From 774bfaa4cbb5f168b2c61f280c16c0cece4a5196 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 28 Oct 2024 20:13:44 +0100 Subject: [PATCH] Remove premake sources After 486509d5b978de72b6a64a0504937bceda9455d5 we no longer use the bundled sources, remove them. Also remove the build.sh for building the bundled sources and update .gitignore. Signed-off-by: Ralph Sennhauser --- .gitignore | 19 +- build/premake/build.sh | 34 - build/premake/premake5/BUILD.txt | 101 - build/premake/premake5/CHANGES.txt | 555 - build/premake/premake5/CONTRIBUTORS.txt | 75 - build/premake/premake5/LICENSE.txt | 27 - build/premake/premake5/README.md | 91 - build/premake/premake5/appveyor.yml | 19 - .../premake5/binmodules/example/main.c | 28 - .../premake5/binmodules/example/premake5.lua | 28 - .../premake/premake5/binmodules/luasocket/FIX | 28 - .../premake5/binmodules/luasocket/LICENSE | 20 - .../premake5/binmodules/luasocket/Lua51.props | 28 - .../premake5/binmodules/luasocket/Lua52.props | 28 - .../premake/premake5/binmodules/luasocket/NEW | 44 - .../premake5/binmodules/luasocket/README | 11 - .../premake5/binmodules/luasocket/TODO | 81 - .../premake5/binmodules/luasocket/WISH | 22 - .../binmodules/luasocket/doc/dns.html | 183 - .../binmodules/luasocket/doc/ftp.html | 288 - .../binmodules/luasocket/doc/http.html | 335 - .../binmodules/luasocket/doc/index.html | 215 - .../luasocket/doc/installation.html | 127 - .../luasocket/doc/introduction.html | 333 - .../binmodules/luasocket/doc/ltn12.html | 430 - .../binmodules/luasocket/doc/lua05.ppt | Bin 304128 -> 0 bytes .../binmodules/luasocket/doc/luasocket.png | 3 - .../binmodules/luasocket/doc/mime.html | 477 - .../binmodules/luasocket/doc/reference.css | 55 - .../binmodules/luasocket/doc/reference.html | 260 - .../binmodules/luasocket/doc/smtp.html | 418 - .../binmodules/luasocket/doc/socket.html | 479 - .../binmodules/luasocket/doc/tcp.html | 721 - .../binmodules/luasocket/doc/udp.html | 596 - .../binmodules/luasocket/doc/url.html | 328 - .../premake5/binmodules/luasocket/etc/README | 89 - .../premake5/binmodules/luasocket/etc/b64.lua | 19 - .../binmodules/luasocket/etc/check-links.lua | 111 - .../binmodules/luasocket/etc/check-memory.lua | 17 - .../binmodules/luasocket/etc/cookie.lua | 88 - .../binmodules/luasocket/etc/dict.lua | 151 - .../binmodules/luasocket/etc/dispatch.lua | 307 - .../premake5/binmodules/luasocket/etc/eol.lua | 13 - .../binmodules/luasocket/etc/forward.lua | 65 - .../premake5/binmodules/luasocket/etc/get.lua | 141 - .../premake5/binmodules/luasocket/etc/links | 17 - .../premake5/binmodules/luasocket/etc/lp.lua | 323 - .../premake5/binmodules/luasocket/etc/qp.lua | 23 - .../binmodules/luasocket/etc/tftp.lua | 154 - .../premake5/binmodules/luasocket/gem/ex1.lua | 4 - .../binmodules/luasocket/gem/ex10.lua | 17 - .../binmodules/luasocket/gem/ex11.lua | 7 - .../binmodules/luasocket/gem/ex12.lua | 34 - .../premake5/binmodules/luasocket/gem/ex2.lua | 11 - .../premake5/binmodules/luasocket/gem/ex3.lua | 15 - .../premake5/binmodules/luasocket/gem/ex4.lua | 5 - .../premake5/binmodules/luasocket/gem/ex5.lua | 15 - .../premake5/binmodules/luasocket/gem/ex6.lua | 14 - .../premake5/binmodules/luasocket/gem/ex7.lua | 16 - .../premake5/binmodules/luasocket/gem/ex8.lua | 5 - .../premake5/binmodules/luasocket/gem/ex9.lua | 3 - .../premake5/binmodules/luasocket/gem/gem.c | 54 - .../premake5/binmodules/luasocket/gem/gt.b64 | 206 - .../binmodules/luasocket/gem/input.bin | Bin 11732 -> 0 bytes .../binmodules/luasocket/gem/ltn012.tex | 695 - .../binmodules/luasocket/gem/luasocket.png | 3 - .../binmodules/luasocket/gem/myps2pdf | 113 - .../premake5/binmodules/luasocket/gem/t1.lua | 25 - .../binmodules/luasocket/gem/t1lf.txt | 5 - .../premake5/binmodules/luasocket/gem/t2.lua | 36 - .../premake5/binmodules/luasocket/gem/t2.txt | 4 - .../premake5/binmodules/luasocket/gem/t2gt.qp | 5 - .../premake5/binmodules/luasocket/gem/t3.lua | 25 - .../premake5/binmodules/luasocket/gem/t4.lua | 10 - .../premake5/binmodules/luasocket/gem/t5.lua | 30 - .../binmodules/luasocket/gem/test.lua | 46 - .../premake5/binmodules/luasocket/linux.cmd | 1 - .../premake5/binmodules/luasocket/logo.ps | 210 - .../premake5/binmodules/luasocket/ltn012.wiki | 393 - .../premake5/binmodules/luasocket/ltn013.wiki | 194 - .../luasocket/luasocket-scm-0.rockspec | 105 - .../premake5/binmodules/luasocket/macosx.cmd | 1 - .../premake5/binmodules/luasocket/main.c | 15 - .../binmodules/luasocket/makefile.dist | 139 - .../premake5/binmodules/luasocket/mingw.cmd | 1 - .../binmodules/luasocket/premake5.lua | 51 - .../rockspec/luasocket-3.0rc2-1.rockspec | 105 - .../binmodules/luasocket/samples/README | 50 - .../binmodules/luasocket/samples/cddb.lua | 46 - .../luasocket/samples/daytimeclnt.lua | 22 - .../binmodules/luasocket/samples/echoclnt.lua | 23 - .../binmodules/luasocket/samples/echosrvr.lua | 28 - .../binmodules/luasocket/samples/listener.lua | 25 - .../binmodules/luasocket/samples/lpr.lua | 51 - .../binmodules/luasocket/samples/mclisten.lua | 18 - .../binmodules/luasocket/samples/mcsend.lua | 20 - .../binmodules/luasocket/samples/talker.lua | 20 - .../binmodules/luasocket/samples/tinyirc.lua | 89 - .../binmodules/luasocket/src/auxiliar.c | 158 - .../binmodules/luasocket/src/auxiliar.h | 48 - .../binmodules/luasocket/src/buffer.c | 273 - .../binmodules/luasocket/src/buffer.h | 45 - .../binmodules/luasocket/src/compat.c | 19 - .../binmodules/luasocket/src/compat.h | 11 - .../binmodules/luasocket/src/except.c | 133 - .../binmodules/luasocket/src/except.h | 38 - .../premake5/binmodules/luasocket/src/ftp.lua | 329 - .../binmodules/luasocket/src/headers.lua | 104 - .../binmodules/luasocket/src/http.lua | 382 - .../premake5/binmodules/luasocket/src/inet.c | 543 - .../premake5/binmodules/luasocket/src/inet.h | 50 - .../premake5/binmodules/luasocket/src/io.c | 30 - .../premake5/binmodules/luasocket/src/io.h | 65 - .../binmodules/luasocket/src/ltn12.lua | 309 - .../binmodules/luasocket/src/luasocket.c | 114 - .../binmodules/luasocket/src/luasocket.h | 29 - .../binmodules/luasocket/src/mbox.lua | 92 - .../premake5/binmodules/luasocket/src/mime.c | 721 - .../premake5/binmodules/luasocket/src/mime.h | 29 - .../binmodules/luasocket/src/mime.lua | 90 - .../binmodules/luasocket/src/options.c | 374 - .../binmodules/luasocket/src/options.h | 62 - .../binmodules/luasocket/src/pierror.h | 28 - .../binmodules/luasocket/src/select.c | 220 - .../binmodules/luasocket/src/select.h | 15 - .../binmodules/luasocket/src/serial.c | 172 - .../binmodules/luasocket/src/smtp.lua | 256 - .../binmodules/luasocket/src/socket.h | 78 - .../binmodules/luasocket/src/socket.lua | 149 - .../premake5/binmodules/luasocket/src/tcp.c | 451 - .../premake5/binmodules/luasocket/src/tcp.h | 35 - .../binmodules/luasocket/src/timeout.c | 228 - .../binmodules/luasocket/src/timeout.h | 29 - .../premake5/binmodules/luasocket/src/tp.lua | 134 - .../premake5/binmodules/luasocket/src/udp.c | 483 - .../premake5/binmodules/luasocket/src/udp.h | 31 - .../premake5/binmodules/luasocket/src/unix.c | 70 - .../premake5/binmodules/luasocket/src/unix.h | 30 - .../binmodules/luasocket/src/unixdgram.c | 408 - .../binmodules/luasocket/src/unixdgram.h | 20 - .../binmodules/luasocket/src/unixstream.c | 357 - .../binmodules/luasocket/src/unixstream.h | 21 - .../premake5/binmodules/luasocket/src/url.lua | 309 - .../binmodules/luasocket/src/usocket.c | 451 - .../binmodules/luasocket/src/usocket.h | 59 - .../binmodules/luasocket/src/wsocket.c | 433 - .../binmodules/luasocket/src/wsocket.h | 33 - .../premake5/binmodules/luasocket/test/README | 14 - .../binmodules/luasocket/test/auth/.htaccess | 4 - .../binmodules/luasocket/test/auth/.htpasswd | 1 - .../binmodules/luasocket/test/auth/index.html | 3002 --- .../binmodules/luasocket/test/cgi/cat | 6 - .../luasocket/test/cgi/cat-index-html | 5 - .../binmodules/luasocket/test/cgi/env | 5 - .../luasocket/test/cgi/query-string | 4 - .../luasocket/test/cgi/redirect-loop | 3 - .../binmodules/luasocket/test/cgi/request-uri | 4 - .../binmodules/luasocket/test/dicttest.lua | 5 - .../binmodules/luasocket/test/excepttest.lua | 30 - .../luasocket/test/find-connect-limit | 32 - .../binmodules/luasocket/test/ftptest.lua | 122 - .../binmodules/luasocket/test/hello.lua | 3 - .../binmodules/luasocket/test/httptest.lua | 441 - .../binmodules/luasocket/test/index.html | 3002 --- .../binmodules/luasocket/test/ltn12test.lua | 299 - .../binmodules/luasocket/test/luasocket.png | 3 - .../binmodules/luasocket/test/mimetest.lua | 299 - .../binmodules/luasocket/test/smtptest.lua | 259 - .../binmodules/luasocket/test/stufftest.lua | 21 - .../binmodules/luasocket/test/tcp-getoptions | 41 - .../binmodules/luasocket/test/test_bind.lua | 6 - .../luasocket/test/test_getaddrinfo.lua | 15 - .../luasocket/test/test_socket_error.lua | 31 - .../binmodules/luasocket/test/testclnt.lua | 803 - .../binmodules/luasocket/test/testmesg.lua | 96 - .../binmodules/luasocket/test/testsrvr.lua | 20 - .../binmodules/luasocket/test/testsupport.lua | 37 - .../binmodules/luasocket/test/tftptest.lua | 20 - .../luasocket/test/udp-zero-length-send | 25 - .../luasocket/test/udp-zero-length-send-recv | 37 - .../luasocket/test/udpconnectclnt.lua | 19 - .../luasocket/test/udpconnectsrvr.lua | 16 - .../luasocket/test/unixdgramclnt.lua | 9 - .../luasocket/test/unixdgramsrvr.lua | 9 - .../luasocket/test/unixstreamclnt.lua | 8 - .../luasocket/test/unixstreamsrvr.lua | 9 - .../binmodules/luasocket/test/upload.html | 15 - .../binmodules/luasocket/test/urltest.lua | 704 - .../binmodules/luasocket/test/utestclnt.lua | 644 - .../binmodules/luasocket/test/utestsrvr.lua | 17 - .../premake5/binmodules/luasocket/win32.cmd | 1 - .../premake5/build/gmake2.bsd/Makefile | 132 - .../premake5/build/gmake2.bsd/Premake5.make | 390 - .../premake5/build/gmake2.bsd/curl-lib.make | 768 - .../premake5/build/gmake2.bsd/example.make | 140 - .../premake5/build/gmake2.bsd/lua-lib.make | 293 - .../build/gmake2.bsd/luashim-lib.make | 138 - .../premake5/build/gmake2.bsd/luasocket.make | 230 - .../build/gmake2.bsd/mbedtls-lib.make | 483 - .../premake5/build/gmake2.bsd/zip-lib.make | 563 - .../premake5/build/gmake2.bsd/zlib-lib.make | 208 - .../premake5/build/gmake2.macosx/Makefile | 132 - .../build/gmake2.macosx/Premake5.make | 397 - .../build/gmake2.macosx/curl-lib.make | 775 - .../premake5/build/gmake2.macosx/example.make | 147 - .../premake5/build/gmake2.macosx/lua-lib.make | 300 - .../build/gmake2.macosx/luashim-lib.make | 145 - .../build/gmake2.macosx/luasocket.make | 237 - .../build/gmake2.macosx/mbedtls-lib.make | 490 - .../premake5/build/gmake2.macosx/zip-lib.make | 570 - .../build/gmake2.macosx/zlib-lib.make | 215 - .../premake5/build/gmake2.unix/Makefile | 132 - .../premake5/build/gmake2.unix/Premake5.make | 390 - .../premake5/build/gmake2.unix/curl-lib.make | 768 - .../premake5/build/gmake2.unix/example.make | 140 - .../premake5/build/gmake2.unix/lua-lib.make | 293 - .../build/gmake2.unix/luashim-lib.make | 138 - .../premake5/build/gmake2.unix/luasocket.make | 230 - .../build/gmake2.unix/mbedtls-lib.make | 483 - .../premake5/build/gmake2.unix/zip-lib.make | 563 - .../premake5/build/gmake2.unix/zlib-lib.make | 208 - .../premake5/build/vs2017/Premake5.sln | 120 - .../premake5/build/vs2017/Premake5.vcxproj | 600 - .../build/vs2017/Premake5.vcxproj.filters | 1320 -- .../build/vs2017/Premake5.vcxproj.user | 17 - .../premake5/build/vs2017/curl-lib.vcxproj | 455 - .../build/vs2017/curl-lib.vcxproj.filters | 813 - .../premake5/build/vs2017/example.vcxproj | 195 - .../premake5/build/vs2017/lua-lib.vcxproj | 237 - .../premake5/build/vs2017/luashim-lib.vcxproj | 185 - .../premake5/build/vs2017/luasocket.vcxproj | 240 - .../build/vs2017/luasocket.vcxproj.filters | 135 - .../premake5/build/vs2017/mbedtls-lib.vcxproj | 316 - .../build/vs2017/mbedtls-lib.vcxproj.filters | 426 - .../premake5/build/vs2017/zip-lib.vcxproj | 275 - .../build/vs2017/zip-lib.vcxproj.filters | 113 - .../premake5/build/vs2017/zlib-lib.vcxproj | 202 - .../premake5/build/vs2019/Premake5.sln | 120 - .../premake5/build/vs2019/Premake5.vcxproj | 599 - .../build/vs2019/Premake5.vcxproj.filters | 1320 -- .../build/vs2019/Premake5.vcxproj.user | 17 - .../premake5/build/vs2019/curl-lib.vcxproj | 454 - .../build/vs2019/curl-lib.vcxproj.filters | 813 - .../premake5/build/vs2019/example.vcxproj | 194 - .../premake5/build/vs2019/lua-lib.vcxproj | 236 - .../premake5/build/vs2019/luashim-lib.vcxproj | 184 - .../premake5/build/vs2019/luasocket.vcxproj | 239 - .../build/vs2019/luasocket.vcxproj.filters | 135 - .../premake5/build/vs2019/mbedtls-lib.vcxproj | 315 - .../build/vs2019/mbedtls-lib.vcxproj.filters | 426 - .../premake5/build/vs2019/zip-lib.vcxproj | 274 - .../build/vs2019/zip-lib.vcxproj.filters | 113 - .../premake5/build/vs2019/zlib-lib.vcxproj | 201 - .../premake5/contrib/curl/include/Makefile.am | 5 - .../premake5/contrib/curl/include/README | 55 - .../contrib/curl/include/curl/Makefile.am | 53 - .../premake5/contrib/curl/include/curl/curl.h | 2536 -- .../contrib/curl/include/curl/curlbuild.h | 602 - .../curl/include/curl/curlbuild.h.cmake | 197 - .../contrib/curl/include/curl/curlbuild.h.in | 197 - .../contrib/curl/include/curl/curlrules.h | 262 - .../contrib/curl/include/curl/curlver.h | 77 - .../premake5/contrib/curl/include/curl/easy.h | 102 - .../contrib/curl/include/curl/mprintf.h | 50 - .../contrib/curl/include/curl/multi.h | 439 - .../contrib/curl/include/curl/stdcheaders.h | 33 - .../contrib/curl/include/curl/typecheck-gcc.h | 624 - .../premake5/contrib/curl/lib/CMakeLists.txt | 109 - .../premake5/contrib/curl/lib/Makefile.Watcom | 279 - .../premake5/contrib/curl/lib/Makefile.am | 155 - .../premake5/contrib/curl/lib/Makefile.b32 | 185 - .../premake5/contrib/curl/lib/Makefile.inc | 80 - .../premake5/contrib/curl/lib/Makefile.m32 | 363 - .../contrib/curl/lib/Makefile.netware | 799 - .../contrib/curl/lib/Makefile.vxworks | 177 - .../premake5/contrib/curl/lib/amigaos.c | 77 - .../premake5/contrib/curl/lib/amigaos.h | 39 - .../premake5/contrib/curl/lib/arpa_telnet.h | 104 - .../premake5/contrib/curl/lib/asyn-ares.c | 691 - .../premake5/contrib/curl/lib/asyn-thread.c | 707 - .../premake/premake5/contrib/curl/lib/asyn.h | 168 - .../premake5/contrib/curl/lib/base64.c | 320 - .../premake5/contrib/curl/lib/checksrc.pl | 552 - .../contrib/curl/lib/config-amigaos.h | 166 - .../premake5/contrib/curl/lib/config-dos.h | 181 - .../premake5/contrib/curl/lib/config-linux.h | 964 - .../premake5/contrib/curl/lib/config-mac.h | 125 - .../premake5/contrib/curl/lib/config-os400.h | 563 - .../premake5/contrib/curl/lib/config-osx.h | 964 - .../premake5/contrib/curl/lib/config-riscos.h | 513 - .../contrib/curl/lib/config-symbian.h | 811 - .../premake5/contrib/curl/lib/config-tpf.h | 772 - .../contrib/curl/lib/config-vxworks.h | 928 - .../premake5/contrib/curl/lib/config-win32.h | 736 - .../contrib/curl/lib/config-win32ce.h | 448 - .../premake5/contrib/curl/lib/conncache.c | 371 - .../premake5/contrib/curl/lib/conncache.h | 68 - .../premake5/contrib/curl/lib/connect.c | 1419 -- .../premake5/contrib/curl/lib/connect.h | 147 - .../contrib/curl/lib/content_encoding.c | 432 - .../contrib/curl/lib/content_encoding.h | 48 - .../premake5/contrib/curl/lib/cookie.c | 1450 -- .../premake5/contrib/curl/lib/cookie.h | 104 - .../premake5/contrib/curl/lib/curl_addrinfo.c | 616 - .../premake5/contrib/curl/lib/curl_addrinfo.h | 110 - .../premake5/contrib/curl/lib/curl_base64.h | 35 - .../contrib/curl/lib/curl_config.h.cmake | 1002 - .../premake5/contrib/curl/lib/curl_des.c | 63 - .../premake5/contrib/curl/lib/curl_des.h | 34 - .../premake5/contrib/curl/lib/curl_endian.c | 236 - .../premake5/contrib/curl/lib/curl_endian.h | 70 - .../premake5/contrib/curl/lib/curl_fnmatch.c | 426 - .../premake5/contrib/curl/lib/curl_fnmatch.h | 44 - .../contrib/curl/lib/curl_gethostname.c | 100 - .../contrib/curl/lib/curl_gethostname.h | 31 - .../premake5/contrib/curl/lib/curl_gssapi.c | 131 - .../premake5/contrib/curl/lib/curl_gssapi.h | 75 - .../premake5/contrib/curl/lib/curl_hmac.h | 67 - .../premake5/contrib/curl/lib/curl_ldap.h | 35 - .../premake5/contrib/curl/lib/curl_md4.h | 35 - .../premake5/contrib/curl/lib/curl_md5.h | 63 - .../premake5/contrib/curl/lib/curl_memory.h | 156 - .../premake5/contrib/curl/lib/curl_memrchr.c | 61 - .../premake5/contrib/curl/lib/curl_memrchr.h | 44 - .../contrib/curl/lib/curl_multibyte.c | 84 - .../contrib/curl/lib/curl_multibyte.h | 92 - .../contrib/curl/lib/curl_ntlm_core.c | 790 - .../contrib/curl/lib/curl_ntlm_core.h | 106 - .../premake5/contrib/curl/lib/curl_ntlm_wb.c | 431 - .../premake5/contrib/curl/lib/curl_ntlm_wb.h | 38 - .../premake5/contrib/curl/lib/curl_printf.h | 56 - .../premake5/contrib/curl/lib/curl_rtmp.c | 306 - .../premake5/contrib/curl/lib/curl_rtmp.h | 33 - .../premake5/contrib/curl/lib/curl_sasl.c | 623 - .../premake5/contrib/curl/lib/curl_sasl.h | 143 - .../premake5/contrib/curl/lib/curl_sec.h | 51 - .../premake5/contrib/curl/lib/curl_setup.h | 782 - .../contrib/curl/lib/curl_setup_once.h | 551 - .../premake5/contrib/curl/lib/curl_sspi.c | 235 - .../premake5/contrib/curl/lib/curl_sspi.h | 350 - .../premake5/contrib/curl/lib/curl_threads.c | 139 - .../premake5/contrib/curl/lib/curl_threads.h | 63 - .../premake/premake5/contrib/curl/lib/curlx.h | 115 - .../premake/premake5/contrib/curl/lib/dict.c | 278 - .../premake/premake5/contrib/curl/lib/dict.h | 29 - .../premake5/contrib/curl/lib/dotdot.c | 179 - .../premake5/contrib/curl/lib/dotdot.h | 25 - .../premake/premake5/contrib/curl/lib/easy.c | 1117 - .../premake5/contrib/curl/lib/easyif.h | 33 - .../premake5/contrib/curl/lib/escape.c | 244 - .../premake5/contrib/curl/lib/escape.h | 33 - .../premake/premake5/contrib/curl/lib/file.c | 598 - .../premake/premake5/contrib/curl/lib/file.h | 41 - .../premake5/contrib/curl/lib/fileinfo.c | 50 - .../premake5/contrib/curl/lib/fileinfo.h | 33 - .../contrib/curl/lib/firefox-db2pem.sh | 54 - .../premake5/contrib/curl/lib/formdata.c | 1608 -- .../premake5/contrib/curl/lib/formdata.h | 99 - build/premake/premake5/contrib/curl/lib/ftp.c | 4549 ---- build/premake/premake5/contrib/curl/lib/ftp.h | 159 - .../premake5/contrib/curl/lib/ftplistparser.c | 1027 - .../premake5/contrib/curl/lib/ftplistparser.h | 41 - .../premake5/contrib/curl/lib/getenv.c | 54 - .../premake5/contrib/curl/lib/getinfo.c | 442 - .../premake5/contrib/curl/lib/getinfo.h | 27 - .../premake5/contrib/curl/lib/gopher.c | 166 - .../premake5/contrib/curl/lib/gopher.h | 29 - .../premake/premake5/contrib/curl/lib/hash.c | 390 - .../premake/premake5/contrib/curl/lib/hash.h | 99 - .../premake/premake5/contrib/curl/lib/hmac.c | 132 - .../premake5/contrib/curl/lib/hostasyn.c | 153 - .../premake5/contrib/curl/lib/hostcheck.c | 150 - .../premake5/contrib/curl/lib/hostcheck.h | 32 - .../premake5/contrib/curl/lib/hostip.c | 884 - .../premake5/contrib/curl/lib/hostip.h | 250 - .../premake5/contrib/curl/lib/hostip4.c | 307 - .../premake5/contrib/curl/lib/hostip6.c | 234 - .../premake5/contrib/curl/lib/hostsyn.c | 107 - .../premake/premake5/contrib/curl/lib/http.c | 3773 --- .../premake/premake5/contrib/curl/lib/http.h | 258 - .../premake/premake5/contrib/curl/lib/http2.c | 2227 -- .../premake/premake5/contrib/curl/lib/http2.h | 79 - .../premake5/contrib/curl/lib/http_chunks.c | 381 - .../premake5/contrib/curl/lib/http_chunks.h | 91 - .../premake5/contrib/curl/lib/http_digest.c | 180 - .../premake5/contrib/curl/lib/http_digest.h | 42 - .../contrib/curl/lib/http_negotiate.c | 138 - .../contrib/curl/lib/http_negotiate.h | 38 - .../premake5/contrib/curl/lib/http_ntlm.c | 238 - .../premake5/contrib/curl/lib/http_ntlm.h | 40 - .../premake5/contrib/curl/lib/http_proxy.c | 643 - .../premake5/contrib/curl/lib/http_proxy.h | 42 - .../premake5/contrib/curl/lib/idn_win32.c | 111 - .../premake/premake5/contrib/curl/lib/if2ip.c | 272 - .../premake/premake5/contrib/curl/lib/if2ip.h | 83 - .../premake/premake5/contrib/curl/lib/imap.c | 2132 -- .../premake/premake5/contrib/curl/lib/imap.h | 96 - .../premake5/contrib/curl/lib/inet_ntop.c | 197 - .../premake5/contrib/curl/lib/inet_ntop.h | 38 - .../premake5/contrib/curl/lib/inet_pton.c | 236 - .../premake5/contrib/curl/lib/inet_pton.h | 37 - .../premake/premake5/contrib/curl/lib/krb5.c | 338 - .../premake/premake5/contrib/curl/lib/ldap.c | 1015 - .../premake5/contrib/curl/lib/libcurl.plist | 35 - .../premake5/contrib/curl/lib/libcurl.rc | 63 - .../premake5/contrib/curl/lib/libcurl.vers.in | 13 - .../premake/premake5/contrib/curl/lib/llist.c | 214 - .../premake/premake5/contrib/curl/lib/llist.h | 57 - .../premake5/contrib/curl/lib/makefile.amiga | 21 - .../premake5/contrib/curl/lib/makefile.dj | 73 - build/premake/premake5/contrib/curl/lib/md4.c | 305 - build/premake/premake5/contrib/curl/lib/md5.c | 563 - .../premake5/contrib/curl/lib/memdebug.c | 488 - .../premake5/contrib/curl/lib/memdebug.h | 173 - .../premake5/contrib/curl/lib/mk-ca-bundle.pl | 554 - .../contrib/curl/lib/mk-ca-bundle.vbs | 431 - .../premake5/contrib/curl/lib/mprintf.c | 1185 - .../premake/premake5/contrib/curl/lib/multi.c | 3165 --- .../premake5/contrib/curl/lib/multihandle.h | 154 - .../premake5/contrib/curl/lib/multiif.h | 98 - .../premake/premake5/contrib/curl/lib/netrc.c | 201 - .../premake/premake5/contrib/curl/lib/netrc.h | 36 - .../premake5/contrib/curl/lib/non-ascii.c | 338 - .../premake5/contrib/curl/lib/non-ascii.h | 63 - .../premake5/contrib/curl/lib/nonblock.c | 91 - .../premake5/contrib/curl/lib/nonblock.h | 31 - .../premake/premake5/contrib/curl/lib/nwlib.c | 327 - .../premake/premake5/contrib/curl/lib/nwos.c | 88 - .../contrib/curl/lib/objnames-test08.sh | 217 - .../contrib/curl/lib/objnames-test10.sh | 217 - .../premake5/contrib/curl/lib/objnames.inc | 107 - .../premake5/contrib/curl/lib/openldap.c | 711 - .../premake5/contrib/curl/lib/parsedate.c | 585 - .../premake5/contrib/curl/lib/parsedate.h | 31 - .../premake5/contrib/curl/lib/pingpong.c | 510 - .../premake5/contrib/curl/lib/pingpong.h | 150 - .../premake5/contrib/curl/lib/pipeline.c | 439 - .../premake5/contrib/curl/lib/pipeline.h | 56 - .../premake/premake5/contrib/curl/lib/pop3.c | 1612 -- .../premake/premake5/contrib/curl/lib/pop3.h | 95 - .../premake5/contrib/curl/lib/progress.c | 567 - .../premake5/contrib/curl/lib/progress.h | 77 - .../premake/premake5/contrib/curl/lib/rand.c | 132 - .../premake/premake5/contrib/curl/lib/rand.h | 43 - .../premake/premake5/contrib/curl/lib/rtsp.c | 819 - .../premake/premake5/contrib/curl/lib/rtsp.h | 69 - .../premake5/contrib/curl/lib/security.c | 588 - .../premake5/contrib/curl/lib/select.c | 583 - .../premake5/contrib/curl/lib/select.h | 115 - .../premake/premake5/contrib/curl/lib/sendf.c | 839 - .../premake/premake5/contrib/curl/lib/sendf.h | 94 - .../premake5/contrib/curl/lib/setup-os400.h | 223 - .../premake5/contrib/curl/lib/setup-vms.h | 443 - .../premake/premake5/contrib/curl/lib/share.c | 244 - .../premake/premake5/contrib/curl/lib/share.h | 61 - .../premake5/contrib/curl/lib/sigpipe.h | 78 - .../premake/premake5/contrib/curl/lib/slist.c | 145 - .../premake/premake5/contrib/curl/lib/slist.h | 40 - build/premake/premake5/contrib/curl/lib/smb.c | 982 - build/premake/premake5/contrib/curl/lib/smb.h | 271 - .../premake/premake5/contrib/curl/lib/smtp.c | 1673 -- .../premake/premake5/contrib/curl/lib/smtp.h | 91 - .../premake5/contrib/curl/lib/sockaddr.h | 43 - .../premake/premake5/contrib/curl/lib/socks.c | 784 - .../premake/premake5/contrib/curl/lib/socks.h | 76 - .../premake5/contrib/curl/lib/socks_gssapi.c | 526 - .../premake5/contrib/curl/lib/socks_sspi.c | 605 - .../premake5/contrib/curl/lib/speedcheck.c | 74 - .../premake5/contrib/curl/lib/speedcheck.h | 33 - .../premake/premake5/contrib/curl/lib/splay.c | 288 - .../premake/premake5/contrib/curl/lib/splay.h | 66 - build/premake/premake5/contrib/curl/lib/ssh.c | 3464 --- build/premake/premake5/contrib/curl/lib/ssh.h | 198 - .../premake5/contrib/curl/lib/strcase.c | 176 - .../premake5/contrib/curl/lib/strcase.h | 51 - .../premake5/contrib/curl/lib/strdup.c | 100 - .../premake5/contrib/curl/lib/strdup.h | 32 - .../premake5/contrib/curl/lib/strerror.c | 1072 - .../premake5/contrib/curl/lib/strerror.h | 37 - .../premake5/contrib/curl/lib/strtok.c | 66 - .../premake5/contrib/curl/lib/strtok.h | 34 - .../premake5/contrib/curl/lib/strtoofft.c | 188 - .../premake5/contrib/curl/lib/strtoofft.h | 75 - .../premake5/contrib/curl/lib/system_win32.c | 329 - .../premake5/contrib/curl/lib/system_win32.h | 61 - .../premake5/contrib/curl/lib/telnet.c | 1678 -- .../premake5/contrib/curl/lib/telnet.h | 29 - .../premake/premake5/contrib/curl/lib/tftp.c | 1392 -- .../premake/premake5/contrib/curl/lib/tftp.h | 29 - .../premake5/contrib/curl/lib/timeval.c | 150 - .../premake5/contrib/curl/lib/timeval.h | 58 - .../premake5/contrib/curl/lib/transfer.c | 1965 -- .../premake5/contrib/curl/lib/transfer.h | 68 - build/premake/premake5/contrib/curl/lib/url.c | 7065 ------ build/premake/premake5/contrib/curl/lib/url.h | 93 - .../premake5/contrib/curl/lib/urldata.h | 1839 -- .../contrib/curl/lib/vauth/cleartext.c | 165 - .../premake5/contrib/curl/lib/vauth/cram.c | 138 - .../premake5/contrib/curl/lib/vauth/digest.c | 900 - .../premake5/contrib/curl/lib/vauth/digest.h | 43 - .../contrib/curl/lib/vauth/digest_sspi.c | 628 - .../contrib/curl/lib/vauth/krb5_gssapi.c | 401 - .../contrib/curl/lib/vauth/krb5_sspi.c | 518 - .../premake5/contrib/curl/lib/vauth/ntlm.c | 858 - .../premake5/contrib/curl/lib/vauth/ntlm.h | 143 - .../contrib/curl/lib/vauth/ntlm_sspi.c | 335 - .../premake5/contrib/curl/lib/vauth/oauth2.c | 86 - .../contrib/curl/lib/vauth/spnego_gssapi.c | 274 - .../contrib/curl/lib/vauth/spnego_sspi.c | 321 - .../premake5/contrib/curl/lib/vauth/vauth.c | 147 - .../premake5/contrib/curl/lib/vauth/vauth.h | 204 - .../premake5/contrib/curl/lib/version.c | 399 - .../premake5/contrib/curl/lib/vtls/axtls.c | 700 - .../premake5/contrib/curl/lib/vtls/axtls.h | 71 - .../premake5/contrib/curl/lib/vtls/cyassl.c | 947 - .../premake5/contrib/curl/lib/vtls/cyassl.h | 92 - .../contrib/curl/lib/vtls/darwinssl.c | 2593 -- .../contrib/curl/lib/vtls/darwinssl.h | 76 - .../premake5/contrib/curl/lib/vtls/gskit.c | 1307 -- .../premake5/contrib/curl/lib/vtls/gskit.h | 74 - .../premake5/contrib/curl/lib/vtls/gtls.c | 1700 -- .../premake5/contrib/curl/lib/vtls/gtls.h | 96 - .../premake5/contrib/curl/lib/vtls/mbedtls.c | 943 - .../premake5/contrib/curl/lib/vtls/mbedtls.h | 79 - .../premake5/contrib/curl/lib/vtls/nss.c | 2197 -- .../premake5/contrib/curl/lib/vtls/nssg.h | 108 - .../premake5/contrib/curl/lib/vtls/openssl.c | 3325 --- .../premake5/contrib/curl/lib/vtls/openssl.h | 126 - .../premake5/contrib/curl/lib/vtls/polarssl.c | 825 - .../premake5/contrib/curl/lib/vtls/polarssl.h | 82 - .../curl/lib/vtls/polarssl_threadlock.c | 153 - .../curl/lib/vtls/polarssl_threadlock.h | 53 - .../premake5/contrib/curl/lib/vtls/schannel.c | 1684 -- .../premake5/contrib/curl/lib/vtls/schannel.h | 121 - .../premake5/contrib/curl/lib/vtls/vtls.c | 969 - .../premake5/contrib/curl/lib/vtls/vtls.h | 202 - .../premake5/contrib/curl/lib/warnless.c | 543 - .../premake5/contrib/curl/lib/warnless.h | 113 - .../premake5/contrib/curl/lib/wildcard.c | 69 - .../premake5/contrib/curl/lib/wildcard.h | 58 - .../premake5/contrib/curl/lib/x509asn1.c | 1199 - .../premake5/contrib/curl/lib/x509asn1.h | 134 - .../premake5/contrib/curl/premake5.lua | 49 - .../premake/premake5/contrib/libzip/config.h | 59 - .../premake5/contrib/libzip/include/zconf.h | 514 - .../premake5/contrib/libzip/include/zipconf.h | 120 - .../premake5/contrib/libzip/include/zlib.h | 1768 -- .../premake/premake5/contrib/libzip/mkstemp.c | 151 - .../premake5/contrib/libzip/premake5.lua | 23 - build/premake/premake5/contrib/libzip/zconf.h | 513 - build/premake/premake5/contrib/libzip/zip.h | 322 - .../premake/premake5/contrib/libzip/zip_add.c | 52 - .../premake5/contrib/libzip/zip_add_dir.c | 47 - .../premake5/contrib/libzip/zip_add_entry.c | 67 - .../premake5/contrib/libzip/zip_close.c | 653 - .../premake5/contrib/libzip/zip_delete.c | 63 - .../premake5/contrib/libzip/zip_dir_add.c | 95 - .../premake5/contrib/libzip/zip_dirent.c | 1025 - .../premake5/contrib/libzip/zip_discard.c | 83 - .../premake5/contrib/libzip/zip_entry.c | 55 - .../premake5/contrib/libzip/zip_err_str.c | 76 - .../premake5/contrib/libzip/zip_error.c | 115 - .../premake5/contrib/libzip/zip_error_clear.c | 47 - .../premake5/contrib/libzip/zip_error_get.c | 44 - .../contrib/libzip/zip_error_get_sys_type.c | 47 - .../contrib/libzip/zip_error_strerror.c | 90 - .../contrib/libzip/zip_error_to_str.c | 70 - .../premake5/contrib/libzip/zip_extra_field.c | 386 - .../contrib/libzip/zip_extra_field_api.c | 374 - .../premake5/contrib/libzip/zip_fclose.c | 68 - .../premake5/contrib/libzip/zip_fdopen.c | 75 - .../premake5/contrib/libzip/zip_file_add.c | 55 - .../contrib/libzip/zip_file_error_clear.c | 47 - .../contrib/libzip/zip_file_error_get.c | 44 - .../contrib/libzip/zip_file_get_comment.c | 58 - .../libzip/zip_file_get_external_attributes.c | 51 - .../contrib/libzip/zip_file_get_offset.c | 76 - .../premake5/contrib/libzip/zip_file_rename.c | 70 - .../contrib/libzip/zip_file_replace.c | 111 - .../contrib/libzip/zip_file_set_comment.c | 105 - .../libzip/zip_file_set_external_attributes.c | 83 - .../contrib/libzip/zip_file_strerror.c | 44 - .../contrib/libzip/zip_filerange_crc.c | 71 - .../premake5/contrib/libzip/zip_fopen.c | 49 - .../contrib/libzip/zip_fopen_encrypted.c | 49 - .../premake5/contrib/libzip/zip_fopen_index.c | 48 - .../libzip/zip_fopen_index_encrypted.c | 106 - .../premake5/contrib/libzip/zip_fread.c | 65 - .../contrib/libzip/zip_get_archive_comment.c | 61 - .../contrib/libzip/zip_get_archive_flag.c | 48 - .../zip_get_compression_implementation.c | 46 - .../zip_get_encryption_implementation.c | 46 - .../contrib/libzip/zip_get_file_comment.c | 53 - .../premake5/contrib/libzip/zip_get_name.c | 63 - .../contrib/libzip/zip_get_num_entries.c | 55 - .../contrib/libzip/zip_get_num_files.c | 49 - .../premake5/contrib/libzip/zip_memdup.c | 58 - .../premake5/contrib/libzip/zip_name_locate.c | 91 - .../premake/premake5/contrib/libzip/zip_new.c | 72 - .../premake5/contrib/libzip/zip_open.c | 742 - .../premake5/contrib/libzip/zip_rename.c | 47 - .../premake5/contrib/libzip/zip_replace.c | 45 - .../contrib/libzip/zip_set_archive_comment.c | 84 - .../contrib/libzip/zip_set_archive_flag.c | 69 - .../contrib/libzip/zip_set_default_password.c | 62 - .../contrib/libzip/zip_set_file_comment.c | 51 - .../contrib/libzip/zip_set_file_compression.c | 90 - .../premake5/contrib/libzip/zip_set_name.c | 117 - .../contrib/libzip/zip_source_buffer.c | 161 - .../contrib/libzip/zip_source_close.c | 54 - .../premake5/contrib/libzip/zip_source_crc.c | 166 - .../contrib/libzip/zip_source_deflate.c | 392 - .../contrib/libzip/zip_source_error.c | 84 - .../premake5/contrib/libzip/zip_source_file.c | 56 - .../contrib/libzip/zip_source_filep.c | 251 - .../premake5/contrib/libzip/zip_source_free.c | 59 - .../contrib/libzip/zip_source_function.c | 78 - .../contrib/libzip/zip_source_layered.c | 59 - .../premake5/contrib/libzip/zip_source_open.c | 76 - .../contrib/libzip/zip_source_pkware.c | 234 - .../premake5/contrib/libzip/zip_source_pop.c | 63 - .../premake5/contrib/libzip/zip_source_read.c | 64 - .../premake5/contrib/libzip/zip_source_stat.c | 72 - .../contrib/libzip/zip_source_window.c | 150 - .../premake5/contrib/libzip/zip_source_zip.c | 61 - .../contrib/libzip/zip_source_zip_new.c | 172 - .../premake5/contrib/libzip/zip_stat.c | 49 - .../premake5/contrib/libzip/zip_stat_index.c | 88 - .../premake5/contrib/libzip/zip_stat_init.c | 52 - .../premake5/contrib/libzip/zip_strerror.c | 44 - .../premake5/contrib/libzip/zip_string.c | 196 - .../premake5/contrib/libzip/zip_unchange.c | 74 - .../contrib/libzip/zip_unchange_all.c | 55 - .../contrib/libzip/zip_unchange_archive.c | 54 - .../contrib/libzip/zip_unchange_data.c | 56 - .../premake5/contrib/libzip/zip_utf-8.c | 255 - .../premake/premake5/contrib/libzip/zipconf.h | 120 - .../premake/premake5/contrib/libzip/zipint.h | 514 - build/premake/premake5/contrib/libzip/zlib.h | 1768 -- build/premake/premake5/contrib/lua/README | 6 - .../premake5/contrib/lua/doc/contents.html | 619 - .../premake5/contrib/lua/doc/index.css | 21 - .../premake/premake5/contrib/lua/doc/logo.gif | Bin 9893 -> 0 bytes build/premake/premake5/contrib/lua/doc/lua.1 | 112 - .../premake/premake5/contrib/lua/doc/lua.css | 161 - build/premake/premake5/contrib/lua/doc/luac.1 | 118 - .../premake5/contrib/lua/doc/manual.css | 21 - .../premake5/contrib/lua/doc/manual.html | 10982 --------- .../contrib/lua/doc/osi-certified-72x60.png | 3 - .../premake5/contrib/lua/doc/readme.html | 365 - .../premake/premake5/contrib/lua/premake5.lua | 28 - build/premake/premake5/contrib/lua/src/lapi.c | 1299 - build/premake/premake5/contrib/lua/src/lapi.h | 24 - .../premake5/contrib/lua/src/lauxlib.c | 1043 - .../premake5/contrib/lua/src/lauxlib.h | 264 - .../premake5/contrib/lua/src/lbaselib.c | 498 - .../premake5/contrib/lua/src/lbitlib.c | 233 - .../premake/premake5/contrib/lua/src/lcode.c | 1203 - .../premake/premake5/contrib/lua/src/lcode.h | 88 - .../premake5/contrib/lua/src/lcorolib.c | 168 - .../premake/premake5/contrib/lua/src/lctype.c | 55 - .../premake/premake5/contrib/lua/src/lctype.h | 95 - .../premake/premake5/contrib/lua/src/ldblib.c | 456 - .../premake/premake5/contrib/lua/src/ldebug.c | 699 - .../premake/premake5/contrib/lua/src/ldebug.h | 39 - build/premake/premake5/contrib/lua/src/ldo.c | 802 - build/premake/premake5/contrib/lua/src/ldo.h | 58 - .../premake/premake5/contrib/lua/src/ldump.c | 215 - .../premake/premake5/contrib/lua/src/lfunc.c | 151 - .../premake/premake5/contrib/lua/src/lfunc.h | 61 - build/premake/premake5/contrib/lua/src/lgc.c | 1179 - build/premake/premake5/contrib/lua/src/lgc.h | 147 - .../premake/premake5/contrib/lua/src/linit.c | 68 - .../premake/premake5/contrib/lua/src/liolib.c | 805 - build/premake/premake5/contrib/lua/src/llex.c | 565 - build/premake/premake5/contrib/lua/src/llex.h | 85 - .../premake5/contrib/lua/src/llimits.h | 323 - .../premake5/contrib/lua/src/lmathlib.c | 410 - build/premake/premake5/contrib/lua/src/lmem.c | 100 - build/premake/premake5/contrib/lua/src/lmem.h | 69 - .../premake5/contrib/lua/src/loadlib.c | 790 - .../premake5/contrib/lua/src/lobject.c | 522 - .../premake5/contrib/lua/src/lobject.h | 549 - .../premake5/contrib/lua/src/lopcodes.c | 124 - .../premake5/contrib/lua/src/lopcodes.h | 297 - .../premake/premake5/contrib/lua/src/loslib.c | 409 - .../premake5/contrib/lua/src/lparser.c | 1650 -- .../premake5/contrib/lua/src/lparser.h | 133 - .../premake5/contrib/lua/src/lprefix.h | 45 - .../premake/premake5/contrib/lua/src/lstate.c | 347 - .../premake/premake5/contrib/lua/src/lstate.h | 253 - .../premake5/contrib/lua/src/lstring.c | 248 - .../premake5/contrib/lua/src/lstring.h | 49 - .../premake5/contrib/lua/src/lstrlib.c | 1584 -- .../premake/premake5/contrib/lua/src/ltable.c | 688 - .../premake/premake5/contrib/lua/src/ltable.h | 66 - .../premake5/contrib/lua/src/ltablib.c | 450 - build/premake/premake5/contrib/lua/src/ltm.c | 165 - build/premake/premake5/contrib/lua/src/ltm.h | 76 - build/premake/premake5/contrib/lua/src/lua.c | 612 - build/premake/premake5/contrib/lua/src/lua.h | 486 - .../premake/premake5/contrib/lua/src/lua.hpp | 9 - build/premake/premake5/contrib/lua/src/luac.c | 450 - .../premake5/contrib/lua/src/luaconf.h | 790 - .../premake/premake5/contrib/lua/src/lualib.h | 61 - .../premake5/contrib/lua/src/lundump.c | 279 - .../premake5/contrib/lua/src/lundump.h | 32 - .../premake5/contrib/lua/src/lutf8lib.c | 256 - build/premake/premake5/contrib/lua/src/lvm.c | 1322 -- build/premake/premake5/contrib/lua/src/lvm.h | 113 - build/premake/premake5/contrib/lua/src/lzio.c | 68 - build/premake/premake5/contrib/lua/src/lzio.h | 66 - .../premake/premake5/contrib/luashim/lua.txt | 134 - .../premake5/contrib/luashim/luashim.c | 861 - .../premake5/contrib/luashim/luashim.h | 152 - .../premake5/contrib/luashim/premake5.lua | 20 - .../premake5/contrib/mbedtls/CMakeLists.txt | 137 - .../premake5/contrib/mbedtls/ChangeLog | 1943 -- .../contrib/mbedtls/DartConfiguration.tcl | 4 - .../premake/premake5/contrib/mbedtls/LICENSE | 2 - .../premake5/contrib/mbedtls/README.md | 173 - .../premake5/contrib/mbedtls/apache-2.0.txt | 202 - .../contrib/mbedtls/configs/README.txt | 26 - .../mbedtls/configs/config-ccm-psk-tls1_2.h | 85 - .../mbedtls/configs/config-mini-tls1_1.h | 75 - .../contrib/mbedtls/configs/config-picocoin.h | 71 - .../contrib/mbedtls/configs/config-suite-b.h | 114 - .../contrib/mbedtls/configs/config-thread.h | 94 - .../mbedtls/doxygen/input/doc_encdec.h | 69 - .../mbedtls/doxygen/input/doc_hashing.h | 40 - .../mbedtls/doxygen/input/doc_mainpage.h | 93 - .../contrib/mbedtls/doxygen/input/doc_rng.h | 43 - .../mbedtls/doxygen/input/doc_ssltls.h | 48 - .../contrib/mbedtls/doxygen/input/doc_tcpip.h | 43 - .../contrib/mbedtls/doxygen/input/doc_x509.h | 42 - .../contrib/mbedtls/doxygen/mbedtls.doxyfile | 1911 -- .../contrib/mbedtls/include/CMakeLists.txt | 11 - .../contrib/mbedtls/include/mbedtls/aes.h | 297 - .../contrib/mbedtls/include/mbedtls/aesni.h | 111 - .../contrib/mbedtls/include/mbedtls/arc4.h | 113 - .../contrib/mbedtls/include/mbedtls/asn1.h | 342 - .../mbedtls/include/mbedtls/asn1write.h | 239 - .../contrib/mbedtls/include/mbedtls/base64.h | 88 - .../contrib/mbedtls/include/mbedtls/bignum.h | 722 - .../mbedtls/include/mbedtls/blowfish.h | 203 - .../contrib/mbedtls/include/mbedtls/bn_mul.h | 876 - .../mbedtls/include/mbedtls/camellia.h | 235 - .../contrib/mbedtls/include/mbedtls/ccm.h | 141 - .../contrib/mbedtls/include/mbedtls/certs.h | 99 - .../mbedtls/include/mbedtls/check_config.h | 540 - .../contrib/mbedtls/include/mbedtls/cipher.h | 698 - .../mbedtls/include/mbedtls/cipher_internal.h | 109 - .../mbedtls/include/mbedtls/compat-1.3.h | 2634 --- .../contrib/mbedtls/include/mbedtls/config.h | 2511 -- .../mbedtls/include/mbedtls/ctr_drbg.h | 290 - .../contrib/mbedtls/include/mbedtls/debug.h | 125 - .../contrib/mbedtls/include/mbedtls/des.h | 306 - .../contrib/mbedtls/include/mbedtls/dhm.h | 305 - .../contrib/mbedtls/include/mbedtls/ecdh.h | 214 - .../contrib/mbedtls/include/mbedtls/ecdsa.h | 248 - .../contrib/mbedtls/include/mbedtls/ecjpake.h | 238 - .../contrib/mbedtls/include/mbedtls/ecp.h | 669 - .../contrib/mbedtls/include/mbedtls/entropy.h | 252 - .../mbedtls/include/mbedtls/entropy_poll.h | 89 - .../contrib/mbedtls/include/mbedtls/error.h | 107 - .../contrib/mbedtls/include/mbedtls/gcm.h | 220 - .../contrib/mbedtls/include/mbedtls/havege.h | 74 - .../mbedtls/include/mbedtls/hmac_drbg.h | 299 - .../contrib/mbedtls/include/mbedtls/md.h | 353 - .../contrib/mbedtls/include/mbedtls/md2.h | 136 - .../contrib/mbedtls/include/mbedtls/md4.h | 136 - .../contrib/mbedtls/include/mbedtls/md5.h | 136 - .../mbedtls/include/mbedtls/md_internal.h | 114 - .../include/mbedtls/memory_buffer_alloc.h | 146 - .../contrib/mbedtls/include/mbedtls/net.h | 225 - .../contrib/mbedtls/include/mbedtls/oid.h | 570 - .../contrib/mbedtls/include/mbedtls/padlock.h | 107 - .../contrib/mbedtls/include/mbedtls/pem.h | 129 - .../contrib/mbedtls/include/mbedtls/pk.h | 615 - .../mbedtls/include/mbedtls/pk_internal.h | 114 - .../contrib/mbedtls/include/mbedtls/pkcs11.h | 173 - .../contrib/mbedtls/include/mbedtls/pkcs12.h | 119 - .../contrib/mbedtls/include/mbedtls/pkcs5.h | 94 - .../mbedtls/include/mbedtls/platform.h | 214 - .../mbedtls/include/mbedtls/ripemd160.h | 138 - .../contrib/mbedtls/include/mbedtls/rsa.h | 652 - .../contrib/mbedtls/include/mbedtls/sha1.h | 136 - .../contrib/mbedtls/include/mbedtls/sha256.h | 141 - .../contrib/mbedtls/include/mbedtls/sha512.h | 141 - .../contrib/mbedtls/include/mbedtls/ssl.h | 2393 -- .../mbedtls/include/mbedtls/ssl_cache.h | 143 - .../include/mbedtls/ssl_ciphersuites.h | 321 - .../mbedtls/include/mbedtls/ssl_cookie.h | 108 - .../mbedtls/include/mbedtls/ssl_internal.h | 495 - .../mbedtls/include/mbedtls/ssl_ticket.h | 135 - .../mbedtls/include/mbedtls/threading.h | 104 - .../contrib/mbedtls/include/mbedtls/timing.h | 141 - .../contrib/mbedtls/include/mbedtls/version.h | 111 - .../contrib/mbedtls/include/mbedtls/x509.h | 331 - .../mbedtls/include/mbedtls/x509_crl.h | 173 - .../mbedtls/include/mbedtls/x509_crt.h | 645 - .../mbedtls/include/mbedtls/x509_csr.h | 292 - .../contrib/mbedtls/include/mbedtls/xtea.h | 139 - .../contrib/mbedtls/library/CMakeLists.txt | 161 - .../premake5/contrib/mbedtls/library/aes.c | 1490 -- .../premake5/contrib/mbedtls/library/aesni.c | 464 - .../premake5/contrib/mbedtls/library/arc4.c | 205 - .../contrib/mbedtls/library/asn1parse.c | 392 - .../contrib/mbedtls/library/asn1write.c | 361 - .../premake5/contrib/mbedtls/library/base64.c | 289 - .../premake5/contrib/mbedtls/library/bignum.c | 2433 -- .../contrib/mbedtls/library/blowfish.c | 656 - .../contrib/mbedtls/library/camellia.c | 1072 - .../premake5/contrib/mbedtls/library/ccm.c | 464 - .../premake5/contrib/mbedtls/library/certs.c | 351 - .../premake5/contrib/mbedtls/library/cipher.c | 886 - .../contrib/mbedtls/library/cipher_wrap.c | 1451 -- .../contrib/mbedtls/library/ctr_drbg.c | 593 - .../premake5/contrib/mbedtls/library/debug.c | 367 - .../premake5/contrib/mbedtls/library/des.c | 1061 - .../premake5/contrib/mbedtls/library/dhm.c | 624 - .../premake5/contrib/mbedtls/library/ecdh.c | 264 - .../premake5/contrib/mbedtls/library/ecdsa.c | 448 - .../contrib/mbedtls/library/ecjpake.c | 1103 - .../premake5/contrib/mbedtls/library/ecp.c | 2090 -- .../contrib/mbedtls/library/ecp_curves.c | 1325 -- .../contrib/mbedtls/library/entropy.c | 493 - .../contrib/mbedtls/library/entropy_poll.c | 216 - .../premake5/contrib/mbedtls/library/error.c | 700 - .../premake5/contrib/mbedtls/library/gcm.c | 953 - .../premake5/contrib/mbedtls/library/havege.c | 243 - .../contrib/mbedtls/library/hmac_drbg.c | 529 - .../premake5/contrib/mbedtls/library/md.c | 471 - .../premake5/contrib/mbedtls/library/md2.c | 288 - .../premake5/contrib/mbedtls/library/md4.c | 384 - .../premake5/contrib/mbedtls/library/md5.c | 404 - .../contrib/mbedtls/library/md_wrap.c | 575 - .../mbedtls/library/memory_buffer_alloc.c | 750 - .../premake5/contrib/mbedtls/library/net.c | 575 - .../premake5/contrib/mbedtls/library/oid.c | 650 - .../contrib/mbedtls/library/padlock.c | 170 - .../premake5/contrib/mbedtls/library/pem.c | 447 - .../premake5/contrib/mbedtls/library/pk.c | 374 - .../contrib/mbedtls/library/pk_wrap.c | 495 - .../premake5/contrib/mbedtls/library/pkcs11.c | 240 - .../premake5/contrib/mbedtls/library/pkcs12.c | 365 - .../premake5/contrib/mbedtls/library/pkcs5.c | 405 - .../contrib/mbedtls/library/pkparse.c | 1293 - .../contrib/mbedtls/library/pkwrite.c | 439 - .../contrib/mbedtls/library/platform.c | 193 - .../contrib/mbedtls/library/ripemd160.c | 464 - .../premake5/contrib/mbedtls/library/rsa.c | 1705 -- .../premake5/contrib/mbedtls/library/sha1.c | 448 - .../premake5/contrib/mbedtls/library/sha256.c | 445 - .../premake5/contrib/mbedtls/library/sha512.c | 500 - .../contrib/mbedtls/library/ssl_cache.c | 326 - .../mbedtls/library/ssl_ciphersuites.c | 1852 -- .../contrib/mbedtls/library/ssl_cli.c | 3390 --- .../contrib/mbedtls/library/ssl_cookie.c | 260 - .../contrib/mbedtls/library/ssl_srv.c | 3881 --- .../contrib/mbedtls/library/ssl_ticket.c | 489 - .../contrib/mbedtls/library/ssl_tls.c | 7602 ------ .../contrib/mbedtls/library/threading.c | 136 - .../premake5/contrib/mbedtls/library/timing.c | 520 - .../contrib/mbedtls/library/version.c | 50 - .../mbedtls/library/version_features.c | 635 - .../premake5/contrib/mbedtls/library/x509.c | 1024 - .../contrib/mbedtls/library/x509_create.c | 340 - .../contrib/mbedtls/library/x509_crl.c | 721 - .../contrib/mbedtls/library/x509_crt.c | 2372 -- .../contrib/mbedtls/library/x509_csr.c | 417 - .../contrib/mbedtls/library/x509write_crt.c | 456 - .../contrib/mbedtls/library/x509write_csr.c | 256 - .../premake5/contrib/mbedtls/library/xtea.c | 281 - .../premake5/contrib/mbedtls/premake5.lua | 19 - .../contrib/mbedtls/programs/CMakeLists.txt | 8 - .../mbedtls/programs/aes/CMakeLists.txt | 9 - .../contrib/mbedtls/programs/aes/aescrypt2.c | 452 - .../mbedtls/programs/aes/crypt_and_hash.c | 545 - .../mbedtls/programs/hash/CMakeLists.txt | 9 - .../mbedtls/programs/hash/generic_sum.c | 227 - .../contrib/mbedtls/programs/hash/hello.c | 68 - .../mbedtls/programs/pkey/CMakeLists.txt | 63 - .../contrib/mbedtls/programs/pkey/dh_client.c | 300 - .../mbedtls/programs/pkey/dh_genprime.c | 194 - .../mbedtls/programs/pkey/dh_prime.txt | 2 - .../contrib/mbedtls/programs/pkey/dh_server.c | 303 - .../mbedtls/programs/pkey/ecdh_curve25519.c | 237 - .../contrib/mbedtls/programs/pkey/ecdsa.c | 231 - .../contrib/mbedtls/programs/pkey/gen_key.c | 421 - .../contrib/mbedtls/programs/pkey/key_app.c | 281 - .../mbedtls/programs/pkey/key_app_writer.c | 406 - .../contrib/mbedtls/programs/pkey/mpi_demo.c | 109 - .../mbedtls/programs/pkey/pk_decrypt.c | 168 - .../mbedtls/programs/pkey/pk_encrypt.c | 168 - .../contrib/mbedtls/programs/pkey/pk_sign.c | 174 - .../contrib/mbedtls/programs/pkey/pk_verify.c | 149 - .../mbedtls/programs/pkey/rsa_decrypt.c | 182 - .../mbedtls/programs/pkey/rsa_encrypt.c | 172 - .../mbedtls/programs/pkey/rsa_genkey.c | 172 - .../mbedtls/programs/pkey/rsa_priv.txt | 8 - .../contrib/mbedtls/programs/pkey/rsa_pub.txt | 2 - .../contrib/mbedtls/programs/pkey/rsa_sign.c | 168 - .../mbedtls/programs/pkey/rsa_sign_pss.c | 177 - .../mbedtls/programs/pkey/rsa_verify.c | 160 - .../mbedtls/programs/pkey/rsa_verify_pss.c | 155 - .../mbedtls/programs/random/CMakeLists.txt | 12 - .../mbedtls/programs/random/gen_entropy.c | 96 - .../programs/random/gen_random_ctr_drbg.c | 130 - .../programs/random/gen_random_havege.c | 101 - .../mbedtls/programs/ssl/CMakeLists.txt | 62 - .../mbedtls/programs/ssl/dtls_client.c | 350 - .../mbedtls/programs/ssl/dtls_server.c | 424 - .../mbedtls/programs/ssl/mini_client.c | 294 - .../mbedtls/programs/ssl/ssl_client1.c | 310 - .../mbedtls/programs/ssl/ssl_client2.c | 1670 -- .../mbedtls/programs/ssl/ssl_fork_server.c | 407 - .../mbedtls/programs/ssl/ssl_mail_client.c | 839 - .../mbedtls/programs/ssl/ssl_pthread_server.c | 529 - .../contrib/mbedtls/programs/ssl/ssl_server.c | 398 - .../mbedtls/programs/ssl/ssl_server2.c | 2335 -- .../mbedtls/programs/test/CMakeLists.txt | 27 - .../contrib/mbedtls/programs/test/benchmark.c | 824 - .../contrib/mbedtls/programs/test/selftest.c | 303 - .../mbedtls/programs/test/ssl_cert_test.c | 256 - .../contrib/mbedtls/programs/test/udp_proxy.c | 617 - .../mbedtls/programs/util/CMakeLists.txt | 13 - .../contrib/mbedtls/programs/util/pem2der.c | 286 - .../contrib/mbedtls/programs/util/strerror.c | 92 - .../contrib/mbedtls/programs/wince_main.c | 45 - .../mbedtls/programs/x509/CMakeLists.txt | 30 - .../contrib/mbedtls/programs/x509/cert_app.c | 499 - .../contrib/mbedtls/programs/x509/cert_req.c | 344 - .../mbedtls/programs/x509/cert_write.c | 667 - .../contrib/mbedtls/programs/x509/crl_app.c | 145 - .../contrib/mbedtls/programs/x509/req_app.c | 145 - .../contrib/mbedtls/scripts/bump_version.sh | 130 - .../contrib/mbedtls/scripts/config.pl | 130 - .../mbedtls/scripts/data_files/error.fmt | 122 - .../scripts/data_files/rename-1.3-2.0.txt | 2175 -- .../scripts/data_files/version_features.fmt | 60 - .../scripts/data_files/vs6-app-template.dsp | 101 - .../scripts/data_files/vs6-main-template.dsp | 94 - .../data_files/vs6-workspace-template.dsw | 18 - .../contrib/mbedtls/scripts/ecc-heap.sh | 74 - .../mbedtls/scripts/find-mem-leak.cocci | 20 - .../contrib/mbedtls/scripts/footprint.sh | 94 - .../mbedtls/scripts/generate_errors.pl | 195 - .../mbedtls/scripts/generate_features.pl | 74 - .../mbedtls/scripts/generate_visualc_files.pl | 195 - .../contrib/mbedtls/scripts/malloc-init.pl | 70 - .../contrib/mbedtls/scripts/massif_max.pl | 33 - .../contrib/mbedtls/scripts/memory.sh | 126 - .../contrib/mbedtls/scripts/rename.pl | 96 - .../mbedtls/scripts/rm-malloc-cast.cocci | 7 - .../mbedtls/scripts/tmp_ignore_makefiles.sh | 44 - .../contrib/mbedtls/tests/CMakeLists.txt | 120 - .../contrib/mbedtls/tests/Descriptions.txt | 22 - .../premake5/contrib/mbedtls/tests/compat.sh | 1232 - .../mbedtls/tests/data_files/Readme-x509.txt | 93 - .../tests/data_files/bitstring-in-dn.pem | 51 - .../tests/data_files/cert_example_multi.crt | 80 - .../data_files/cert_example_multi_nocn.crt | 13 - .../data_files/cert_example_wildcard.crt | 77 - .../mbedtls/tests/data_files/cert_md2.crt | 77 - .../mbedtls/tests/data_files/cert_md4.crt | 77 - .../mbedtls/tests/data_files/cert_md5.crt | 77 - .../mbedtls/tests/data_files/cert_sha1.crt | 77 - .../mbedtls/tests/data_files/cert_sha224.crt | 77 - .../mbedtls/tests/data_files/cert_sha256.crt | 77 - .../mbedtls/tests/data_files/cert_sha384.crt | 77 - .../mbedtls/tests/data_files/cert_sha512.crt | 77 - .../tests/data_files/cert_v1_with_ext.crt | 23 - .../contrib/mbedtls/tests/data_files/cli2.crt | 14 - .../contrib/mbedtls/tests/data_files/cli2.key | 5 - .../mbedtls/tests/data_files/crl-ec-sha1.pem | 10 - .../tests/data_files/crl-ec-sha224.pem | 10 - .../tests/data_files/crl-ec-sha256.pem | 10 - .../tests/data_files/crl-ec-sha384.pem | 10 - .../tests/data_files/crl-ec-sha512.pem | 10 - .../mbedtls/tests/data_files/crl-future.pem | 11 - .../data_files/crl-rsa-pss-sha1-badsign.pem | 14 - .../tests/data_files/crl-rsa-pss-sha1.pem | 14 - .../tests/data_files/crl-rsa-pss-sha224.pem | 16 - .../tests/data_files/crl-rsa-pss-sha256.pem | 16 - .../tests/data_files/crl-rsa-pss-sha384.pem | 16 - .../tests/data_files/crl-rsa-pss-sha512.pem | 16 - .../contrib/mbedtls/tests/data_files/crl.pem | 11 - .../tests/data_files/crl_cat_ec-rsa.pem | 21 - .../tests/data_files/crl_cat_ecfut-rsa.pem | 22 - .../tests/data_files/crl_cat_rsa-ec.pem | 21 - .../tests/data_files/crl_cat_rsabadpem-ec.pem | 21 - .../mbedtls/tests/data_files/crl_expired.pem | 11 - .../mbedtls/tests/data_files/crl_md2.pem | 11 - .../mbedtls/tests/data_files/crl_md4.pem | 11 - .../mbedtls/tests/data_files/crl_md5.pem | 11 - .../mbedtls/tests/data_files/crl_sha1.pem | 11 - .../mbedtls/tests/data_files/crl_sha224.pem | 11 - .../mbedtls/tests/data_files/crl_sha256.pem | 11 - .../mbedtls/tests/data_files/crl_sha384.pem | 11 - .../mbedtls/tests/data_files/crl_sha512.pem | 11 - .../tests/data_files/crt_cat_rsaexp-ec.pem | 21 - .../mbedtls/tests/data_files/dh.1000.pem | 34 - .../mbedtls/tests/data_files/dh.optlen.pem | 58 - .../mbedtls/tests/data_files/dhparams.pem | 5 - .../mbedtls/tests/data_files/dir1/test-ca.crt | 80 - .../mbedtls/tests/data_files/dir2/test-ca.crt | 80 - .../tests/data_files/dir2/test-ca2.crt | 15 - .../mbedtls/tests/data_files/dir3/Readme | 1 - .../mbedtls/tests/data_files/dir3/test-ca.crt | 80 - .../tests/data_files/dir3/test-ca2.crt | 15 - .../mbedtls/tests/data_files/dir4/Readme | 47 - .../mbedtls/tests/data_files/dir4/cert11.crt | 18 - .../mbedtls/tests/data_files/dir4/cert12.crt | 19 - .../mbedtls/tests/data_files/dir4/cert13.crt | 19 - .../mbedtls/tests/data_files/dir4/cert14.crt | 19 - .../mbedtls/tests/data_files/dir4/cert21.crt | 18 - .../mbedtls/tests/data_files/dir4/cert22.crt | 19 - .../mbedtls/tests/data_files/dir4/cert23.crt | 19 - .../mbedtls/tests/data_files/dir4/cert31.crt | 18 - .../mbedtls/tests/data_files/dir4/cert32.crt | 19 - .../mbedtls/tests/data_files/dir4/cert33.crt | 19 - .../mbedtls/tests/data_files/dir4/cert34.crt | 19 - .../mbedtls/tests/data_files/dir4/cert41.crt | 18 - .../mbedtls/tests/data_files/dir4/cert42.crt | 19 - .../mbedtls/tests/data_files/dir4/cert43.crt | 19 - .../mbedtls/tests/data_files/dir4/cert44.crt | 19 - .../mbedtls/tests/data_files/dir4/cert45.crt | 19 - .../mbedtls/tests/data_files/dir4/cert51.crt | 18 - .../mbedtls/tests/data_files/dir4/cert52.crt | 19 - .../mbedtls/tests/data_files/dir4/cert53.crt | 19 - .../mbedtls/tests/data_files/dir4/cert54.crt | 19 - .../mbedtls/tests/data_files/dir4/cert61.crt | 18 - .../mbedtls/tests/data_files/dir4/cert62.crt | 19 - .../mbedtls/tests/data_files/dir4/cert63.crt | 19 - .../mbedtls/tests/data_files/dir4/cert71.crt | 18 - .../mbedtls/tests/data_files/dir4/cert72.crt | 19 - .../mbedtls/tests/data_files/dir4/cert73.crt | 19 - .../mbedtls/tests/data_files/dir4/cert74.crt | 19 - .../mbedtls/tests/data_files/dir4/cert81.crt | 11 - .../mbedtls/tests/data_files/dir4/cert82.crt | 11 - .../mbedtls/tests/data_files/dir4/cert83.crt | 11 - .../mbedtls/tests/data_files/dir4/cert91.crt | 11 - .../mbedtls/tests/data_files/dir4/cert92.crt | 11 - .../mbedtls/tests/data_files/ec_224_prv.pem | 5 - .../mbedtls/tests/data_files/ec_224_pub.pem | 4 - .../mbedtls/tests/data_files/ec_256_prv.pem | 5 - .../mbedtls/tests/data_files/ec_256_pub.pem | 4 - .../mbedtls/tests/data_files/ec_384_prv.pem | 6 - .../mbedtls/tests/data_files/ec_384_pub.pem | 5 - .../mbedtls/tests/data_files/ec_521_prv.pem | 7 - .../mbedtls/tests/data_files/ec_521_pub.pem | 6 - .../mbedtls/tests/data_files/ec_bp256_prv.pem | 5 - .../mbedtls/tests/data_files/ec_bp256_pub.pem | 4 - .../mbedtls/tests/data_files/ec_bp384_prv.pem | 6 - .../mbedtls/tests/data_files/ec_bp384_pub.pem | 5 - .../mbedtls/tests/data_files/ec_bp512_prv.pem | 7 - .../mbedtls/tests/data_files/ec_bp512_pub.pem | 6 - .../mbedtls/tests/data_files/ec_prv.noopt.der | Bin 67 -> 0 bytes .../mbedtls/tests/data_files/ec_prv.pk8.der | Bin 113 -> 0 bytes .../mbedtls/tests/data_files/ec_prv.pk8.pem | 5 - .../tests/data_files/ec_prv.pk8.pw.der | Bin 148 -> 0 bytes .../tests/data_files/ec_prv.pk8.pw.pem | 6 - .../mbedtls/tests/data_files/ec_prv.sec1.der | Bin 97 -> 0 bytes .../mbedtls/tests/data_files/ec_prv.sec1.pem | 5 - .../tests/data_files/ec_prv.sec1.pw.pem | 8 - .../tests/data_files/ec_prv.specdom.der | Bin 214 -> 0 bytes .../mbedtls/tests/data_files/ec_pub.der | Bin 75 -> 0 bytes .../mbedtls/tests/data_files/ec_pub.pem | 4 - .../tests/data_files/enco-ca-prstr.pem | 14 - .../tests/data_files/enco-cert-utf8str.pem | 13 - .../mbedtls/tests/data_files/format_gen.key | 16 - .../mbedtls/tests/data_files/format_gen.pub | 6 - .../tests/data_files/format_pkcs12.fmt | Bin 3381 -> 0 bytes .../mbedtls/tests/data_files/format_rsa.key | 15 - .../mbedtls/tests/data_files/hash_file_1 | Bin 5120 -> 0 bytes .../mbedtls/tests/data_files/hash_file_2 | 2 - .../mbedtls/tests/data_files/hash_file_3 | Bin 13 -> 0 bytes .../mbedtls/tests/data_files/hash_file_4 | 0 .../mbedtls/tests/data_files/hash_file_5 | 1 - .../data_files/keyUsage.decipherOnly.crt | 14 - .../contrib/mbedtls/tests/data_files/keyfile | 15 - .../mbedtls/tests/data_files/keyfile.3des | 18 - .../mbedtls/tests/data_files/keyfile.aes128 | 18 - .../mbedtls/tests/data_files/keyfile.aes192 | 18 - .../mbedtls/tests/data_files/keyfile.aes256 | 18 - .../mbedtls/tests/data_files/keyfile.des | 18 - .../contrib/mbedtls/tests/data_files/mpi_10 | 1 - .../mbedtls/tests/data_files/mpi_too_big | 1 - .../mbedtls/tests/data_files/passwd.psk | 1 - .../tests/data_files/pkcs8_pbe_sha1_2des.key | 29 - .../tests/data_files/pkcs8_pbe_sha1_3des.der | Bin 1262 -> 0 bytes .../tests/data_files/pkcs8_pbe_sha1_3des.key | 29 - .../data_files/pkcs8_pbe_sha1_rc4_128.key | 29 - .../data_files/pkcs8_pbes2_pbkdf2_3des.der | Bin 1298 -> 0 bytes .../data_files/pkcs8_pbes2_pbkdf2_3des.key | 30 - .../data_files/pkcs8_pbes2_pbkdf2_des.key | 29 - .../mbedtls/tests/data_files/rsa4096_prv.pem | 51 - .../mbedtls/tests/data_files/rsa4096_pub.pem | 14 - .../tests/data_files/server1-nospace.crt | 21 - .../mbedtls/tests/data_files/server1-v1.crt | 19 - .../tests/data_files/server1.cert_type.crt | 20 - .../mbedtls/tests/data_files/server1.crt | 20 - .../tests/data_files/server1.ext_ku.crt | 22 - .../mbedtls/tests/data_files/server1.key | 27 - .../tests/data_files/server1.key_usage.crt | 20 - .../mbedtls/tests/data_files/server1.pubkey | 9 - .../tests/data_files/server1.req.cert_type | 17 - .../tests/data_files/server1.req.key_usage | 17 - .../tests/data_files/server1.req.ku-ct | 17 - .../mbedtls/tests/data_files/server1.req.md4 | 16 - .../mbedtls/tests/data_files/server1.req.md5 | 16 - .../mbedtls/tests/data_files/server1.req.sha1 | 16 - .../tests/data_files/server1.req.sha224 | 16 - .../tests/data_files/server1.req.sha256 | 16 - .../tests/data_files/server1.req.sha384 | 16 - .../tests/data_files/server1.req.sha512 | 16 - .../mbedtls/tests/data_files/server1.v1.crt | 18 - .../mbedtls/tests/data_files/server10.key | 5 - .../data_files/server10_int3_int-ca2.crt | 80 - .../data_files/server10_int3_int-ca2_ca.crt | 160 - .../mbedtls/tests/data_files/server1_ca.crt | 41 - .../tests/data_files/server2-badsign.crt | 20 - .../tests/data_files/server2-v1-chain.crt | 38 - .../mbedtls/tests/data_files/server2-v1.crt | 19 - .../mbedtls/tests/data_files/server2.crt | 77 - .../mbedtls/tests/data_files/server2.key | 27 - .../tests/data_files/server2.ku-ds.crt | 21 - .../tests/data_files/server2.ku-ds_ke.crt | 21 - .../tests/data_files/server2.ku-ka.crt | 21 - .../tests/data_files/server2.ku-ke.crt | 21 - .../mbedtls/tests/data_files/server3.crt | 17 - .../mbedtls/tests/data_files/server3.key | 5 - .../mbedtls/tests/data_files/server4.crt | 18 - .../mbedtls/tests/data_files/server4.key | 27 - .../tests/data_files/server5-badsign.crt | 14 - .../tests/data_files/server5-expired.crt | 14 - .../tests/data_files/server5-future.crt | 14 - .../tests/data_files/server5-selfsigned.crt | 12 - .../mbedtls/tests/data_files/server5-sha1.crt | 14 - .../tests/data_files/server5-sha224.crt | 14 - .../tests/data_files/server5-sha384.crt | 14 - .../tests/data_files/server5-sha512.crt | 14 - .../mbedtls/tests/data_files/server5.crt | 14 - .../tests/data_files/server5.eku-cli.crt | 13 - .../tests/data_files/server5.eku-cs.crt | 13 - .../tests/data_files/server5.eku-cs_any.crt | 13 - .../tests/data_files/server5.eku-srv.crt | 13 - .../tests/data_files/server5.eku-srv_cli.crt | 13 - .../mbedtls/tests/data_files/server5.key | 5 - .../tests/data_files/server5.ku-ds.crt | 14 - .../tests/data_files/server5.ku-ka.crt | 14 - .../tests/data_files/server5.ku-ke.crt | 14 - .../tests/data_files/server5.req.ku.sha1 | 8 - .../mbedtls/tests/data_files/server5.req.sha1 | 8 - .../tests/data_files/server5.req.sha224 | 8 - .../tests/data_files/server5.req.sha256 | 8 - .../tests/data_files/server5.req.sha384 | 8 - .../tests/data_files/server5.req.sha512 | 8 - .../tests/data_files/server6-ss-child.crt | 13 - .../mbedtls/tests/data_files/server6.crt | 14 - .../mbedtls/tests/data_files/server6.key | 5 - .../mbedtls/tests/data_files/server7.crt | 23 - .../mbedtls/tests/data_files/server7.key | 5 - .../tests/data_files/server7_all_space.crt | 47 - .../tests/data_files/server7_int-ca.crt | 47 - .../tests/data_files/server7_int-ca_ca2.crt | 62 - .../tests/data_files/server7_pem_space.crt | 47 - .../data_files/server7_trailing_space.crt | 47 - .../mbedtls/tests/data_files/server8.crt | 18 - .../mbedtls/tests/data_files/server8.key | 27 - .../tests/data_files/server8_int-ca2.crt | 36 - .../tests/data_files/server9-bad-mgfhash.crt | 20 - .../tests/data_files/server9-bad-saltlen.crt | 20 - .../tests/data_files/server9-badsign.crt | 19 - .../tests/data_files/server9-defaults.crt | 19 - .../tests/data_files/server9-sha224.crt | 20 - .../tests/data_files/server9-sha256.crt | 20 - .../tests/data_files/server9-sha384.crt | 20 - .../tests/data_files/server9-sha512.crt | 20 - .../tests/data_files/server9-with-ca.crt | 99 - .../mbedtls/tests/data_files/server9.crt | 19 - .../mbedtls/tests/data_files/server9.key | 15 - .../mbedtls/tests/data_files/server9.req.sha1 | 11 - .../tests/data_files/server9.req.sha224 | 12 - .../tests/data_files/server9.req.sha256 | 12 - .../tests/data_files/server9.req.sha384 | 12 - .../tests/data_files/server9.req.sha512 | 12 - .../mbedtls/tests/data_files/test-ca-v1.crt | 19 - .../mbedtls/tests/data_files/test-ca.crt | 80 - .../mbedtls/tests/data_files/test-ca.key | 30 - .../mbedtls/tests/data_files/test-ca2.crt | 15 - .../mbedtls/tests/data_files/test-ca2.key | 6 - .../tests/data_files/test-ca2.ku-crl.crt | 12 - .../tests/data_files/test-ca2.ku-crt.crt | 12 - .../tests/data_files/test-ca2.ku-crt_crl.crt | 12 - .../tests/data_files/test-ca2.ku-ds.crt | 12 - .../tests/data_files/test-ca_cat12.crt | 95 - .../tests/data_files/test-ca_cat21.crt | 95 - .../mbedtls/tests/data_files/test-int-ca.crt | 24 - .../mbedtls/tests/data_files/test-int-ca.key | 51 - .../mbedtls/tests/data_files/test-int-ca2.crt | 18 - .../mbedtls/tests/data_files/test-int-ca2.key | 6 - .../mbedtls/tests/data_files/test-int-ca3.crt | 12 - .../mbedtls/tests/data_files/test-int-ca3.key | 8 - .../contrib/mbedtls/tests/scripts/all.sh | 304 - .../tests/scripts/check-doxy-blocks.pl | 57 - .../tests/scripts/check-generated-files.sh | 24 - .../mbedtls/tests/scripts/check-names.sh | 76 - .../contrib/mbedtls/tests/scripts/curves.pl | 45 - .../mbedtls/tests/scripts/gen_ctr_drbg.pl | 93 - .../mbedtls/tests/scripts/gen_gcm_decrypt.pl | 98 - .../mbedtls/tests/scripts/gen_gcm_encrypt.pl | 81 - .../scripts/gen_pkcs1_v21_sign_verify.pl | 72 - .../mbedtls/tests/scripts/generate_code.pl | 254 - .../mbedtls/tests/scripts/key-exchanges.pl | 43 - .../mbedtls/tests/scripts/list-enum-consts.pl | 35 - .../mbedtls/tests/scripts/list-identifiers.sh | 34 - .../mbedtls/tests/scripts/list-macros.sh | 16 - .../mbedtls/tests/scripts/list-symbols.sh | 26 - .../mbedtls/tests/scripts/recursion.pl | 44 - .../mbedtls/tests/scripts/run-test-suites.pl | 35 - .../mbedtls/tests/scripts/test-ref-configs.pl | 96 - .../mbedtls/tests/scripts/yotta-build.sh | 36 - .../premake5/contrib/mbedtls/tests/ssl-opt.sh | 3446 --- .../mbedtls/tests/suites/helpers.function | 300 - .../mbedtls/tests/suites/main_test.function | 371 - .../tests/suites/test_suite_aes.cbc.data | 215 - .../tests/suites/test_suite_aes.cfb.data | 467 - .../tests/suites/test_suite_aes.ecb.data | 230 - .../tests/suites/test_suite_aes.function | 297 - .../tests/suites/test_suite_aes.rest.data | 15 - .../mbedtls/tests/suites/test_suite_arc4.data | 27 - .../tests/suites/test_suite_arc4.function | 46 - .../tests/suites/test_suite_asn1write.data | 50 - .../suites/test_suite_asn1write.function | 84 - .../tests/suites/test_suite_base64.data | 172 - .../tests/suites/test_suite_base64.function | 124 - .../tests/suites/test_suite_blowfish.data | 308 - .../tests/suites/test_suite_blowfish.function | 260 - .../tests/suites/test_suite_camellia.data | 201 - .../tests/suites/test_suite_camellia.function | 229 - .../mbedtls/tests/suites/test_suite_ccm.data | 1482 -- .../tests/suites/test_suite_ccm.function | 189 - .../tests/suites/test_suite_cipher.aes.data | 1099 - .../tests/suites/test_suite_cipher.arc4.data | 103 - .../suites/test_suite_cipher.blowfish.data | 603 - .../suites/test_suite_cipher.camellia.data | 759 - .../tests/suites/test_suite_cipher.ccm.data | 480 - .../tests/suites/test_suite_cipher.des.data | 591 - .../tests/suites/test_suite_cipher.function | 676 - .../tests/suites/test_suite_cipher.gcm.data | 703 - .../tests/suites/test_suite_cipher.null.data | 95 - .../suites/test_suite_cipher.padding.data | 234 - .../tests/suites/test_suite_ctr_drbg.data | 732 - .../tests/suites/test_suite_ctr_drbg.function | 193 - .../tests/suites/test_suite_debug.data | 64 - .../tests/suites/test_suite_debug.function | 198 - .../mbedtls/tests/suites/test_suite_des.data | 251 - .../tests/suites/test_suite_des.function | 367 - .../mbedtls/tests/suites/test_suite_dhm.data | 17 - .../tests/suites/test_suite_dhm.function | 128 - .../mbedtls/tests/suites/test_suite_ecdh.data | 39 - .../tests/suites/test_suite_ecdh.function | 160 - .../tests/suites/test_suite_ecdsa.data | 252 - .../tests/suites/test_suite_ecdsa.function | 194 - .../tests/suites/test_suite_ecjpake.data | 230 - .../tests/suites/test_suite_ecjpake.function | 190 - .../mbedtls/tests/suites/test_suite_ecp.data | 338 - .../tests/suites/test_suite_ecp.function | 512 - .../tests/suites/test_suite_entropy.data | 41 - .../tests/suites/test_suite_entropy.function | 180 - .../tests/suites/test_suite_error.data | 21 - .../tests/suites/test_suite_error.function | 21 - .../suites/test_suite_gcm.aes128_de.data | 675 - .../suites/test_suite_gcm.aes128_en.data | 675 - .../suites/test_suite_gcm.aes192_de.data | 675 - .../suites/test_suite_gcm.aes192_en.data | 675 - .../suites/test_suite_gcm.aes256_de.data | 675 - .../suites/test_suite_gcm.aes256_en.data | 675 - .../tests/suites/test_suite_gcm.camellia.data | 215 - .../tests/suites/test_suite_gcm.function | 124 - .../suites/test_suite_hmac_drbg.function | 319 - .../suites/test_suite_hmac_drbg.misc.data | 82 - .../test_suite_hmac_drbg.no_reseed.data | 1200 - .../suites/test_suite_hmac_drbg.nopr.data | 1200 - .../tests/suites/test_suite_hmac_drbg.pr.data | 1200 - .../mbedtls/tests/suites/test_suite_md.data | 1225 - .../tests/suites/test_suite_md.function | 367 - .../mbedtls/tests/suites/test_suite_mdx.data | 98 - .../tests/suites/test_suite_mdx.function | 114 - .../test_suite_memory_buffer_alloc.data | 2 - .../test_suite_memory_buffer_alloc.function | 16 - .../mbedtls/tests/suites/test_suite_mpi.data | 719 - .../tests/suites/test_suite_mpi.function | 852 - .../mbedtls/tests/suites/test_suite_pem.data | 17 - .../tests/suites/test_suite_pem.function | 40 - .../mbedtls/tests/suites/test_suite_pk.data | 152 - .../tests/suites/test_suite_pk.function | 490 - .../tests/suites/test_suite_pkcs1_v21.data | 789 - .../suites/test_suite_pkcs1_v21.function | 267 - .../tests/suites/test_suite_pkcs5.data | 123 - .../tests/suites/test_suite_pkcs5.function | 80 - .../tests/suites/test_suite_pkparse.data | 228 - .../tests/suites/test_suite_pkparse.function | 141 - .../tests/suites/test_suite_pkwrite.data | 39 - .../tests/suites/test_suite_pkwrite.function | 74 - .../mbedtls/tests/suites/test_suite_rsa.data | 366 - .../tests/suites/test_suite_rsa.function | 695 - .../mbedtls/tests/suites/test_suite_shax.data | 171 - .../tests/suites/test_suite_shax.function | 131 - .../mbedtls/tests/suites/test_suite_ssl.data | 56 - .../tests/suites/test_suite_ssl.function | 42 - .../tests/suites/test_suite_version.data | 15 - .../tests/suites/test_suite_version.function | 73 - .../tests/suites/test_suite_x509parse.data | 1462 -- .../suites/test_suite_x509parse.function | 628 - .../tests/suites/test_suite_x509write.data | 77 - .../suites/test_suite_x509write.function | 179 - .../mbedtls/tests/suites/test_suite_xtea.data | 76 - .../tests/suites/test_suite_xtea.function | 129 - .../contrib/mbedtls/yotta/create-module.sh | 47 - .../contrib/mbedtls/yotta/data/README.md | 103 - .../mbedtls/yotta/data/adjust-config.sh | 74 - .../yotta/data/entropy_hardware_poll.c | 65 - .../yotta/data/example-authcrypt/README.md | 68 - .../yotta/data/example-authcrypt/main.cpp | 199 - .../yotta/data/example-benchmark/README.md | 94 - .../yotta/data/example-benchmark/main.cpp | 953 - .../yotta/data/example-hashing/README.md | 67 - .../yotta/data/example-hashing/main.cpp | 179 - .../yotta/data/example-selftest/README.md | 82 - .../yotta/data/example-selftest/main.cpp | 270 - .../contrib/mbedtls/yotta/data/module.json | 18 - .../mbedtls/yotta/data/target_config.h | 35 - build/premake/premake5/contrib/zlib/adler32.c | 179 - .../premake/premake5/contrib/zlib/compress.c | 80 - build/premake/premake5/contrib/zlib/crc32.c | 425 - build/premake/premake5/contrib/zlib/crc32.h | 441 - build/premake/premake5/contrib/zlib/deflate.c | 1967 -- build/premake/premake5/contrib/zlib/deflate.h | 346 - build/premake/premake5/contrib/zlib/gzclose.c | 25 - build/premake/premake5/contrib/zlib/gzguts.h | 209 - build/premake/premake5/contrib/zlib/gzlib.c | 634 - build/premake/premake5/contrib/zlib/gzread.c | 594 - build/premake/premake5/contrib/zlib/gzwrite.c | 577 - build/premake/premake5/contrib/zlib/infback.c | 640 - build/premake/premake5/contrib/zlib/inffast.c | 340 - build/premake/premake5/contrib/zlib/inffast.h | 11 - .../premake/premake5/contrib/zlib/inffixed.h | 94 - build/premake/premake5/contrib/zlib/inflate.c | 1512 -- build/premake/premake5/contrib/zlib/inflate.h | 122 - .../premake/premake5/contrib/zlib/inftrees.c | 306 - .../premake/premake5/contrib/zlib/inftrees.h | 62 - .../premake5/contrib/zlib/premake5.lua | 17 - build/premake/premake5/contrib/zlib/trees.c | 1226 - build/premake/premake5/contrib/zlib/trees.h | 128 - build/premake/premake5/contrib/zlib/uncompr.c | 59 - build/premake/premake5/contrib/zlib/zconf.h | 513 - build/premake/premake5/contrib/zlib/zlib.h | 1768 -- build/premake/premake5/contrib/zlib/zutil.c | 324 - build/premake/premake5/contrib/zlib/zutil.h | 253 - build/premake/premake5/doxyfile | 258 - build/premake/premake5/mobdebug.lua | 1707 -- .../premake5/modules/android/LICENSE.txt | 27 - .../premake5/modules/android/README.md | 9 - .../premake5/modules/android/_manifest.lua | 8 - .../premake5/modules/android/_preload.lua | 104 - .../premake5/modules/android/android.lua | 25 - .../premake5/modules/android/tests/_tests.lua | 6 - .../android/tests/test_android_files.lua | 47 - .../android/tests/test_android_project.lua | 150 - .../modules/android/vsandroid_androidproj.lua | 271 - .../modules/android/vsandroid_sln2005.lua | 36 - .../modules/android/vsandroid_vcxproj.lua | 642 - .../modules/android/vsandroid_vstudio.lua | 38 - .../premake5/modules/codelite/README.md | 13 - .../premake5/modules/codelite/_manifest.lua | 6 - .../premake5/modules/codelite/_preload.lua | 58 - .../premake5/modules/codelite/codelite.lua | 86 - .../modules/codelite/codelite_project.lua | 480 - .../modules/codelite/codelite_workspace.lua | 103 - .../modules/codelite/tests/_tests.lua | 7 - .../codelite/tests/test_codelite_config.lua | 324 - .../codelite/tests/test_codelite_project.lua | 102 - .../tests/test_codelite_workspace.lua | 224 - build/premake/premake5/modules/d/LICENSE.txt | 27 - build/premake/premake5/modules/d/README.md | 84 - .../premake/premake5/modules/d/_manifest.lua | 10 - build/premake/premake5/modules/d/_preload.lua | 267 - .../premake5/modules/d/actions/gmake.lua | 387 - .../premake5/modules/d/actions/vcxproj.lua | 526 - .../premake5/modules/d/actions/visuald.lua | 359 - build/premake/premake5/modules/d/d.lua | 49 - .../premake5/modules/d/tests/_tests.lua | 9 - .../premake5/modules/d/tests/test_dmd.lua | 106 - .../premake5/modules/d/tests/test_gdc.lua | 106 - .../premake5/modules/d/tests/test_gmake.lua | 195 - .../premake5/modules/d/tests/test_ldc.lua | 106 - .../modules/d/tests/test_visualstudio.lua | 75 - .../premake/premake5/modules/d/tools/dmd.lua | 481 - .../premake/premake5/modules/d/tools/gdc.lua | 327 - .../premake/premake5/modules/d/tools/ldc.lua | 413 - .../premake5/modules/gmake/_manifest.lua | 9 - .../premake5/modules/gmake/_preload.lua | 64 - .../premake/premake5/modules/gmake/gmake.lua | 302 - .../premake5/modules/gmake/gmake_cpp.lua | 634 - .../premake5/modules/gmake/gmake_csharp.lua | 315 - .../premake5/modules/gmake/gmake_makefile.lua | 93 - .../premake5/modules/gmake/gmake_utility.lua | 67 - .../modules/gmake/gmake_workspace.lua | 188 - .../premake5/modules/gmake/tests/_tests.lua | 33 - .../modules/gmake/tests/cpp/test_clang.lua | 46 - .../gmake/tests/cpp/test_file_rules.lua | 170 - .../modules/gmake/tests/cpp/test_flags.lua | 144 - .../modules/gmake/tests/cpp/test_ldflags.lua | 78 - .../gmake/tests/cpp/test_make_linking.lua | 270 - .../modules/gmake/tests/cpp/test_make_pch.lua | 142 - .../modules/gmake/tests/cpp/test_objects.lua | 250 - .../gmake/tests/cpp/test_target_rules.lua | 57 - .../modules/gmake/tests/cpp/test_tools.lua | 35 - .../modules/gmake/tests/cpp/test_wiidev.lua | 58 - .../gmake/tests/cs/test_embed_files.lua | 75 - .../modules/gmake/tests/cs/test_flags.lua | 65 - .../modules/gmake/tests/cs/test_links.lua | 60 - .../modules/gmake/tests/cs/test_response.lua | 90 - .../modules/gmake/tests/cs/test_sources.lua | 90 - .../gmake/tests/test_make_escaping.lua | 31 - .../modules/gmake/tests/test_make_tovar.lua | 35 - .../tests/workspace/test_config_maps.lua | 78 - .../tests/workspace/test_default_config.lua | 87 - .../gmake/tests/workspace/test_group_rule.lua | 61 - .../gmake/tests/workspace/test_help_rule.lua | 41 - .../tests/workspace/test_project_rule.lua | 42 - .../premake5/modules/gmake2/_manifest.lua | 9 - .../premake5/modules/gmake2/_preload.lua | 70 - .../premake5/modules/gmake2/gmake2.lua | 427 - .../premake5/modules/gmake2/gmake2_cpp.lua | 821 - .../premake5/modules/gmake2/gmake2_csharp.lua | 317 - .../modules/gmake2/gmake2_makefile.lua | 111 - .../modules/gmake2/gmake2_utility.lua | 386 - .../modules/gmake2/gmake2_workspace.lua | 202 - .../premake5/modules/gmake2/tests/_tests.lua | 16 - .../gmake2/tests/test_gmake2_buildcmds.lua | 48 - .../gmake2/tests/test_gmake2_clang.lua | 46 - .../gmake2/tests/test_gmake2_file_rules.lua | 320 - .../gmake2/tests/test_gmake2_flags.lua | 145 - .../gmake2/tests/test_gmake2_ldflags.lua | 79 - .../gmake2/tests/test_gmake2_linking.lua | 272 - .../gmake2/tests/test_gmake2_makefile.lua | 101 - .../gmake2/tests/test_gmake2_objects.lua | 474 - .../modules/gmake2/tests/test_gmake2_pch.lua | 224 - .../tests/test_gmake2_perfile_flags.lua | 110 - .../gmake2/tests/test_gmake2_target_rules.lua | 60 - .../gmake2/tests/test_gmake2_tools.lua | 36 - build/premake/premake5/modules/raw/README.md | 9 - .../premake5/modules/raw/_manifest.lua | 5 - .../premake/premake5/modules/raw/_preload.lua | 16 - build/premake/premake5/modules/raw/raw.lua | 11 - .../premake5/modules/raw/raw_action.lua | 76 - .../premake5/modules/self-test/_manifest.lua | 7 - .../premake5/modules/self-test/self-test.lua | 106 - .../modules/self-test/test_assertions.lua | 240 - .../modules/self-test/test_declare.lua | 246 - .../modules/self-test/test_helpers.lua | 87 - .../modules/self-test/test_runner.lua | 337 - .../premake5/modules/vstudio/_manifest.lua | 28 - .../premake5/modules/vstudio/_preload.lua | 173 - .../premake5/modules/vstudio/tests/_tests.lua | 99 - .../vstudio/tests/cs2005/projectsettings.lua | 291 - .../tests/cs2005/test_assembly_refs.lua | 289 - .../tests/cs2005/test_build_events.lua | 101 - .../tests/cs2005/test_common_props.lua | 39 - .../tests/cs2005/test_compiler_props.lua | 73 - .../vstudio/tests/cs2005/test_debug_props.lua | 106 - .../vstudio/tests/cs2005/test_files.lua | 401 - .../vstudio/tests/cs2005/test_icon.lua | 51 - .../vstudio/tests/cs2005/test_netcore.lua | 103 - .../vstudio/tests/cs2005/test_no_warn.lua | 50 - .../tests/cs2005/test_nuget_config.lua | 83 - .../cs2005/test_nuget_packages_config.lua | 58 - .../tests/cs2005/test_nuget_references.lua | 39 - .../tests/cs2005/test_output_props.lua | 66 - .../tests/cs2005/test_platform_groups.lua | 108 - .../tests/cs2005/test_project_refs.lua | 148 - .../vstudio/tests/cs2005/test_targets.lua | 46 - .../vstudio/tests/cs2005/test_user_file.lua | 50 - .../tests/dotnet2005/projectelement.lua | 104 - .../test_nuget_framework_folders.lua | 42 - .../vstudio/tests/fs2005/projectsettings.lua | 289 - .../tests/sln2005/test_dependencies.lua | 97 - .../vstudio/tests/sln2005/test_header.lua | 78 - .../tests/sln2005/test_nested_projects.lua | 104 - .../vstudio/tests/sln2005/test_platforms.lua | 804 - .../vstudio/tests/sln2005/test_projects.lua | 198 - .../vstudio/tests/sln2005/test_sections.lua | 54 - .../tests/sln2005/test_shared_projects.lua | 72 - .../tests/vc200x/test_assembly_refs.lua | 86 - .../vstudio/tests/vc200x/test_build_steps.lua | 76 - .../tests/vc200x/test_compiler_block.lua | 659 - .../tests/vc200x/test_configuration.lua | 123 - .../tests/vc200x/test_debug_settings.lua | 137 - .../tests/vc200x/test_excluded_configs.lua | 75 - .../vstudio/tests/vc200x/test_files.lua | 844 - .../tests/vc200x/test_linker_block.lua | 278 - .../tests/vc200x/test_manifest_block.lua | 57 - .../tests/vc200x/test_nmake_settings.lua | 123 - .../vstudio/tests/vc200x/test_platforms.lua | 80 - .../vstudio/tests/vc200x/test_project.lua | 214 - .../tests/vc200x/test_project_refs.lua | 78 - .../tests/vc200x/test_resource_compiler.lua | 73 - .../vstudio/tests/vc200x/test_user_file.lua | 49 - .../tests/vc2010/test_assembly_refs.lua | 86 - .../tests/vc2010/test_build_events.lua | 131 - .../vstudio/tests/vc2010/test_build_log.lua | 52 - .../vstudio/tests/vc2010/test_build_steps.lua | 92 - .../tests/vc2010/test_character_set.lua | 57 - .../tests/vc2010/test_compile_settings.lua | 1403 -- .../tests/vc2010/test_config_props.lua | 344 - .../tests/vc2010/test_debug_settings.lua | 148 - .../vc2010/test_ensure_nuget_imports.lua | 58 - .../tests/vc2010/test_excluded_configs.lua | 78 - .../tests/vc2010/test_extension_settings.lua | 90 - .../tests/vc2010/test_extension_targets.lua | 108 - .../vstudio/tests/vc2010/test_files.lua | 905 - .../vstudio/tests/vc2010/test_filter_ids.lua | 108 - .../vstudio/tests/vc2010/test_filters.lua | 214 - .../tests/vc2010/test_floatingpoint.lua | 53 - .../tests/vc2010/test_fxcompile_settings.lua | 258 - .../vstudio/tests/vc2010/test_globals.lua | 364 - .../vstudio/tests/vc2010/test_header.lua | 47 - .../tests/vc2010/test_item_def_group.lua | 98 - .../tests/vc2010/test_language_settings.lua | 41 - .../tests/vc2010/test_language_targets.lua | 41 - .../vstudio/tests/vc2010/test_link.lua | 740 - .../vstudio/tests/vc2010/test_manifest.lua | 88 - .../vstudio/tests/vc2010/test_nmake_props.lua | 203 - .../vc2010/test_nuget_package_references.lua | 71 - .../vc2010/test_nuget_packages_config.lua | 57 - .../tests/vc2010/test_output_props.lua | 287 - .../tests/vc2010/test_platform_toolset.lua | 124 - .../tests/vc2010/test_project_configs.lua | 106 - .../tests/vc2010/test_project_refs.lua | 116 - .../vstudio/tests/vc2010/test_prop_sheet.lua | 41 - .../tests/vc2010/test_resource_compile.lua | 105 - .../vstudio/tests/vc2010/test_rule_props.lua | 70 - .../tests/vc2010/test_rule_targets.lua | 97 - .../vstudio/tests/vc2010/test_rule_vars.lua | 135 - .../vstudio/tests/vc2010/test_rule_xml.lua | 238 - .../tests/vc2010/test_target_machine.lua | 89 - .../vstudio/tests/vc2010/test_tokens.lua | 91 - .../vstudio/tests/vc2010/test_user_file.lua | 49 - .../tests/vc2010/test_vectorextensions.lua | 93 - .../vstudio/tests/vc2013/test_vcxitems.lua | 109 - .../premake5/modules/vstudio/vs2005.lua | 121 - .../modules/vstudio/vs2005_csproj.lua | 104 - .../modules/vstudio/vs2005_csproj_user.lua | 91 - .../modules/vstudio/vs2005_dotnetbase.lua | 775 - .../modules/vstudio/vs2005_fsproj.lua | 89 - .../modules/vstudio/vs2005_fsproj_user.lua | 91 - .../modules/vstudio/vs2005_solution.lua | 415 - .../premake5/modules/vstudio/vs2008.lua | 56 - .../modules/vstudio/vs200x_vcproj.lua | 1619 -- .../modules/vstudio/vs200x_vcproj_user.lua | 131 - .../premake5/modules/vstudio/vs2010.lua | 206 - .../premake5/modules/vstudio/vs2010_nuget.lua | 437 - .../modules/vstudio/vs2010_rules_props.lua | 182 - .../modules/vstudio/vs2010_rules_targets.lua | 492 - .../modules/vstudio/vs2010_rules_xml.lua | 428 - .../modules/vstudio/vs2010_vcxproj.lua | 2890 --- .../vstudio/vs2010_vcxproj_filters.lua | 99 - .../modules/vstudio/vs2010_vcxproj_user.lua | 152 - .../premake5/modules/vstudio/vs2012.lua | 67 - .../premake5/modules/vstudio/vs2013.lua | 68 - .../modules/vstudio/vs2013_vcxitems.lua | 142 - .../premake5/modules/vstudio/vs2015.lua | 68 - .../premake5/modules/vstudio/vs2017.lua | 68 - .../premake5/modules/vstudio/vs2019.lua | 69 - .../premake5/modules/vstudio/vstudio.lua | 653 - .../premake5/modules/xcode/LICENSE.TXT | 27 - .../premake5/modules/xcode/_manifest.lua | 7 - .../premake5/modules/xcode/_preload.lua | 89 - .../premake5/modules/xcode/tests/_tests.lua | 9 - .../xcode/tests/test_header_footer.lua | 51 - .../xcode/tests/test_xcode4_project.lua | 111 - .../xcode/tests/test_xcode4_workspace.lua | 133 - .../xcode/tests/test_xcode_dependencies.lua | 318 - .../xcode/tests/test_xcode_project.lua | 3564 --- .../premake/premake5/modules/xcode/xcode.lua | 19 - .../modules/xcode/xcode4_workspace.lua | 133 - .../premake5/modules/xcode/xcode_common.lua | 1527 -- .../premake5/modules/xcode/xcode_project.lua | 262 - build/premake/premake5/premake4.lua | 123 - build/premake/premake5/premake5.lua | 241 - build/premake/premake5/scripts/RELEASE.md | 50 - build/premake/premake5/scripts/changes.lua | 69 - build/premake/premake5/scripts/embed.lua | 210 - build/premake/premake5/scripts/package.lua | 289 - build/premake/premake5/src/_manifest.lua | 72 - build/premake/premake5/src/_modules.lua | 15 - build/premake/premake5/src/_premake_init.lua | 1834 -- build/premake/premake5/src/_premake_main.lua | 394 - .../premake5/src/actions/clean/_clean.lua | 21 - .../premake/premake5/src/base/_foundation.lua | 438 - build/premake/premake5/src/base/action.lua | 278 - build/premake/premake5/src/base/api.lua | 1179 - build/premake/premake5/src/base/config.lua | 591 - build/premake/premake5/src/base/configset.lua | 499 - build/premake/premake5/src/base/container.lua | 361 - build/premake/premake5/src/base/context.lua | 256 - build/premake/premake5/src/base/criteria.lua | 179 - build/premake/premake5/src/base/detoken.lua | 202 - build/premake/premake5/src/base/field.lua | 391 - .../premake/premake5/src/base/fileconfig.lua | 300 - build/premake/premake5/src/base/global.lua | 113 - build/premake/premake5/src/base/globals.lua | 90 - build/premake/premake5/src/base/group.lua | 22 - build/premake/premake5/src/base/help.lua | 81 - build/premake/premake5/src/base/http.lua | 68 - build/premake/premake5/src/base/io.lua | 47 - build/premake/premake5/src/base/json.lua | 1548 -- .../premake/premake5/src/base/jsonwrapper.lua | 59 - build/premake/premake5/src/base/languages.lua | 24 - .../premake5/src/base/moduledownloader.lua | 67 - build/premake/premake5/src/base/option.lua | 174 - build/premake/premake5/src/base/os.lua | 758 - build/premake/premake5/src/base/oven.lua | 792 - build/premake/premake5/src/base/path.lua | 304 - build/premake/premake5/src/base/premake.lua | 432 - build/premake/premake5/src/base/project.lua | 563 - build/premake/premake5/src/base/rule.lua | 174 - build/premake/premake5/src/base/semver.lua | 209 - build/premake/premake5/src/base/string.lua | 103 - build/premake/premake5/src/base/table.lua | 602 - build/premake/premake5/src/base/term.lua | 45 - build/premake/premake5/src/base/tools.lua | 61 - build/premake/premake5/src/base/tree.lua | 329 - .../premake/premake5/src/base/validation.lua | 239 - build/premake/premake5/src/base/workspace.lua | 202 - build/premake/premake5/src/host/buffered_io.c | 125 - build/premake/premake5/src/host/buffered_io.h | 24 - .../premake5/src/host/criteria_matches.c | 310 - build/premake/premake5/src/host/curl_utils.c | 207 - build/premake/premake5/src/host/curl_utils.h | 36 - .../premake/premake5/src/host/debug_prompt.c | 47 - .../premake/premake5/src/host/http_download.c | 76 - build/premake/premake5/src/host/http_get.c | 59 - build/premake/premake5/src/host/http_post.c | 57 - build/premake/premake5/src/host/lua_auxlib.c | 177 - .../premake/premake5/src/host/lua_shimtable.h | 147 - build/premake/premake5/src/host/os_chdir.c | 50 - build/premake/premake5/src/host/os_chmod.c | 46 - .../premake5/src/host/os_comparefiles.c | 132 - build/premake/premake5/src/host/os_compile.c | 56 - build/premake/premake5/src/host/os_copyfile.c | 60 - .../premake5/src/host/os_getWindowsRegistry.c | 144 - build/premake/premake5/src/host/os_getcwd.c | 40 - build/premake/premake5/src/host/os_getpass.c | 38 - .../premake/premake5/src/host/os_getversion.c | 253 - build/premake/premake5/src/host/os_host.c | 13 - build/premake/premake5/src/host/os_is64bit.c | 30 - build/premake/premake5/src/host/os_isdir.c | 56 - build/premake/premake5/src/host/os_isfile.c | 48 - build/premake/premake5/src/host/os_islink.c | 43 - .../src/host/os_listWindowsRegistry.c | 252 - build/premake/premake5/src/host/os_locate.c | 62 - build/premake/premake5/src/host/os_match.c | 206 - build/premake/premake5/src/host/os_mkdir.c | 78 - .../premake/premake5/src/host/os_pathsearch.c | 93 - build/premake/premake5/src/host/os_realpath.c | 37 - build/premake/premake5/src/host/os_remove.c | 51 - build/premake/premake5/src/host/os_rename.c | 59 - build/premake/premake5/src/host/os_rmdir.c | 40 - build/premake/premake5/src/host/os_stat.c | 60 - .../premake/premake5/src/host/os_touchfile.c | 107 - build/premake/premake5/src/host/os_uuid.c | 75 - .../src/host/os_writefile_ifnotequal.c | 109 - .../premake5/src/host/path_getabsolute.c | 105 - .../premake5/src/host/path_getrelative.c | 99 - .../premake5/src/host/path_isabsolute.c | 119 - .../premake5/src/host/path_isabsolute.h | 9 - build/premake/premake5/src/host/path_join.c | 191 - .../premake5/src/host/path_normalize.c | 223 - .../premake5/src/host/path_translate.c | 65 - .../premake5/src/host/path_wildcards.c | 80 - build/premake/premake5/src/host/premake.c | 705 - build/premake/premake5/src/host/premake.h | 201 - .../premake/premake5/src/host/premake_main.c | 24 - .../premake5/src/host/string_endswith.c | 28 - build/premake/premake5/src/host/string_hash.c | 36 - build/premake/premake5/src/host/string_sha1.c | 185 - .../premake5/src/host/string_startswith.c | 24 - .../premake5/src/host/term_textColor.c | 114 - build/premake/premake5/src/host/zip_extract.c | 234 - build/premake/premake5/src/scripts.c | 19512 ---------------- build/premake/premake5/src/tools/clang.lua | 315 - build/premake/premake5/src/tools/dotnet.lua | 329 - build/premake/premake5/src/tools/gcc.lua | 568 - build/premake/premake5/src/tools/mingw.lua | 8 - build/premake/premake5/src/tools/msc.lua | 379 - build/premake/premake5/src/tools/snc.lua | 144 - build/premake/premake5/tests/_tests.lua | 65 - .../premake5/tests/api/test_boolean_kind.lua | 80 - .../premake5/tests/api/test_containers.lua | 94 - .../premake5/tests/api/test_deprecations.lua | 66 - .../tests/api/test_directory_kind.lua | 49 - .../premake5/tests/api/test_list_kind.lua | 86 - .../premake5/tests/api/test_path_kind.lua | 38 - .../premake5/tests/api/test_register.lua | 88 - .../premake5/tests/api/test_string_kind.lua | 85 - .../premake5/tests/api/test_table_kind.lua | 54 - .../premake/premake5/tests/base/.testDotFile | 1 - .../premake5/tests/base/test_aliasing.lua | 65 - .../premake5/tests/base/test_binmodules.lua | 19 - .../premake5/tests/base/test_configset.lua | 261 - .../premake5/tests/base/test_context.lua | 113 - .../premake5/tests/base/test_criteria.lua | 362 - .../premake5/tests/base/test_detoken.lua | 170 - .../premake5/tests/base/test_filename.lua | 99 - .../premake/premake5/tests/base/test_http.lua | 80 - .../premake5/tests/base/test_include.lua | 67 - .../premake/premake5/tests/base/test_json.lua | 32 - .../tests/base/test_module_loader.lua | 38 - .../premake5/tests/base/test_option.lua | 45 - build/premake/premake5/tests/base/test_os.lua | 452 - .../premake5/tests/base/test_override.lua | 75 - .../premake/premake5/tests/base/test_path.lua | 789 - .../tests/base/test_premake_command.lua | 12 - .../premake5/tests/base/test_table.lua | 97 - .../premake/premake5/tests/base/test_tree.lua | 286 - .../premake/premake5/tests/base/test_uuid.lua | 52 - .../premake5/tests/base/test_validation.lua | 130 - .../premake5/tests/base/test_versions.lua | 187 - .../premake5/tests/config/test_linkinfo.lua | 117 - .../premake5/tests/config/test_links.lua | 224 - .../premake5/tests/config/test_targetinfo.lua | 296 - build/premake/premake5/tests/folder/ok.lua | 1 - .../premake5/tests/folder/premake5.lua | 1 - .../premake5/tests/folder/subfolder/hello.txt | 1 - .../premake5/tests/oven/test_filtering.lua | 142 - .../premake5/tests/oven/test_objdirs.lua | 84 - .../premake5/tests/pepperfish_profiler.lua | 629 - .../tests/project/test_config_maps.lua | 165 - .../tests/project/test_eachconfig.lua | 173 - .../premake5/tests/project/test_getconfig.lua | 114 - .../premake5/tests/project/test_location.lua | 57 - .../premake5/tests/project/test_sources.lua | 94 - .../premake5/tests/project/test_vpaths.lua | 151 - build/premake/premake5/tests/test | 2 - build/premake/premake5/tests/test.bat | 4 - build/premake/premake5/tests/test_premake.lua | 37 - build/premake/premake5/tests/test_stress.lua | 72 - build/premake/premake5/tests/test_string.lua | 100 - .../premake5/tests/tools/test_dotnet.lua | 57 - .../premake/premake5/tests/tools/test_gcc.lua | 913 - .../premake/premake5/tests/tools/test_msc.lua | 508 - .../premake/premake5/tests/tools/test_snc.lua | 182 - .../tests/workspace/test_eachconfig.lua | 85 - .../tests/workspace/test_location.lua | 44 - .../premake5/tests/workspace/test_objdirs.lua | 86 - 1760 files changed, 1 insertion(+), 498986 deletions(-) delete mode 100755 build/premake/build.sh delete mode 100644 build/premake/premake5/BUILD.txt delete mode 100644 build/premake/premake5/CHANGES.txt delete mode 100644 build/premake/premake5/CONTRIBUTORS.txt delete mode 100644 build/premake/premake5/LICENSE.txt delete mode 100644 build/premake/premake5/README.md delete mode 100644 build/premake/premake5/appveyor.yml delete mode 100644 build/premake/premake5/binmodules/example/main.c delete mode 100644 build/premake/premake5/binmodules/example/premake5.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/FIX delete mode 100644 build/premake/premake5/binmodules/luasocket/LICENSE delete mode 100644 build/premake/premake5/binmodules/luasocket/Lua51.props delete mode 100644 build/premake/premake5/binmodules/luasocket/Lua52.props delete mode 100644 build/premake/premake5/binmodules/luasocket/NEW delete mode 100644 build/premake/premake5/binmodules/luasocket/README delete mode 100644 build/premake/premake5/binmodules/luasocket/TODO delete mode 100644 build/premake/premake5/binmodules/luasocket/WISH delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/dns.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/ftp.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/http.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/index.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/installation.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/introduction.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/ltn12.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/lua05.ppt delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/luasocket.png delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/mime.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/reference.css delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/reference.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/smtp.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/socket.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/tcp.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/udp.html delete mode 100644 build/premake/premake5/binmodules/luasocket/doc/url.html delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/README delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/b64.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/check-links.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/check-memory.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/cookie.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/dict.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/dispatch.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/eol.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/forward.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/get.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/links delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/lp.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/qp.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/etc/tftp.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex1.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex10.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex11.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex12.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex2.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex3.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex4.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex5.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex6.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex7.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex8.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ex9.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/gem.c delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/gt.b64 delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/input.bin delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/ltn012.tex delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/luasocket.png delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/myps2pdf delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t1.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t1lf.txt delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t2.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t2.txt delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t2gt.qp delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t3.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t4.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/t5.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/gem/test.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/linux.cmd delete mode 100644 build/premake/premake5/binmodules/luasocket/logo.ps delete mode 100644 build/premake/premake5/binmodules/luasocket/ltn012.wiki delete mode 100644 build/premake/premake5/binmodules/luasocket/ltn013.wiki delete mode 100644 build/premake/premake5/binmodules/luasocket/luasocket-scm-0.rockspec delete mode 100644 build/premake/premake5/binmodules/luasocket/macosx.cmd delete mode 100644 build/premake/premake5/binmodules/luasocket/main.c delete mode 100644 build/premake/premake5/binmodules/luasocket/makefile.dist delete mode 100644 build/premake/premake5/binmodules/luasocket/mingw.cmd delete mode 100644 build/premake/premake5/binmodules/luasocket/premake5.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/rockspec/luasocket-3.0rc2-1.rockspec delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/README delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/cddb.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/daytimeclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/echoclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/echosrvr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/listener.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/lpr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/mclisten.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/mcsend.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/talker.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/samples/tinyirc.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/auxiliar.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/auxiliar.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/buffer.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/buffer.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/compat.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/compat.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/except.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/except.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/ftp.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/headers.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/http.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/inet.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/inet.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/io.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/io.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/ltn12.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/luasocket.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/luasocket.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/mbox.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/mime.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/mime.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/mime.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/options.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/options.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/pierror.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/select.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/select.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/serial.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/smtp.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/socket.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/socket.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/tcp.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/tcp.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/timeout.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/timeout.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/tp.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/udp.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/udp.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/unix.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/unix.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/unixdgram.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/unixdgram.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/unixstream.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/unixstream.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/url.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/src/usocket.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/usocket.h delete mode 100644 build/premake/premake5/binmodules/luasocket/src/wsocket.c delete mode 100644 build/premake/premake5/binmodules/luasocket/src/wsocket.h delete mode 100644 build/premake/premake5/binmodules/luasocket/test/README delete mode 100644 build/premake/premake5/binmodules/luasocket/test/auth/.htaccess delete mode 100644 build/premake/premake5/binmodules/luasocket/test/auth/.htpasswd delete mode 100644 build/premake/premake5/binmodules/luasocket/test/auth/index.html delete mode 100644 build/premake/premake5/binmodules/luasocket/test/cgi/cat delete mode 100644 build/premake/premake5/binmodules/luasocket/test/cgi/cat-index-html delete mode 100644 build/premake/premake5/binmodules/luasocket/test/cgi/env delete mode 100644 build/premake/premake5/binmodules/luasocket/test/cgi/query-string delete mode 100644 build/premake/premake5/binmodules/luasocket/test/cgi/redirect-loop delete mode 100644 build/premake/premake5/binmodules/luasocket/test/cgi/request-uri delete mode 100644 build/premake/premake5/binmodules/luasocket/test/dicttest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/excepttest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/find-connect-limit delete mode 100644 build/premake/premake5/binmodules/luasocket/test/ftptest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/hello.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/httptest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/index.html delete mode 100644 build/premake/premake5/binmodules/luasocket/test/ltn12test.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/luasocket.png delete mode 100644 build/premake/premake5/binmodules/luasocket/test/mimetest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/smtptest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/stufftest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/tcp-getoptions delete mode 100644 build/premake/premake5/binmodules/luasocket/test/test_bind.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/test_getaddrinfo.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/test_socket_error.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/testclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/testmesg.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/testsrvr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/testsupport.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/tftptest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send delete mode 100644 build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send-recv delete mode 100644 build/premake/premake5/binmodules/luasocket/test/udpconnectclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/udpconnectsrvr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/unixdgramclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/unixdgramsrvr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/unixstreamclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/unixstreamsrvr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/upload.html delete mode 100644 build/premake/premake5/binmodules/luasocket/test/urltest.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/utestclnt.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/test/utestsrvr.lua delete mode 100644 build/premake/premake5/binmodules/luasocket/win32.cmd delete mode 100644 build/premake/premake5/build/gmake2.bsd/Makefile delete mode 100644 build/premake/premake5/build/gmake2.bsd/Premake5.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/curl-lib.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/example.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/lua-lib.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/luashim-lib.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/luasocket.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/mbedtls-lib.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/zip-lib.make delete mode 100644 build/premake/premake5/build/gmake2.bsd/zlib-lib.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/Makefile delete mode 100644 build/premake/premake5/build/gmake2.macosx/Premake5.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/curl-lib.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/example.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/lua-lib.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/luashim-lib.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/luasocket.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/mbedtls-lib.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/zip-lib.make delete mode 100644 build/premake/premake5/build/gmake2.macosx/zlib-lib.make delete mode 100644 build/premake/premake5/build/gmake2.unix/Makefile delete mode 100644 build/premake/premake5/build/gmake2.unix/Premake5.make delete mode 100644 build/premake/premake5/build/gmake2.unix/curl-lib.make delete mode 100644 build/premake/premake5/build/gmake2.unix/example.make delete mode 100644 build/premake/premake5/build/gmake2.unix/lua-lib.make delete mode 100644 build/premake/premake5/build/gmake2.unix/luashim-lib.make delete mode 100644 build/premake/premake5/build/gmake2.unix/luasocket.make delete mode 100644 build/premake/premake5/build/gmake2.unix/mbedtls-lib.make delete mode 100644 build/premake/premake5/build/gmake2.unix/zip-lib.make delete mode 100644 build/premake/premake5/build/gmake2.unix/zlib-lib.make delete mode 100644 build/premake/premake5/build/vs2017/Premake5.sln delete mode 100644 build/premake/premake5/build/vs2017/Premake5.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/Premake5.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2017/Premake5.vcxproj.user delete mode 100644 build/premake/premake5/build/vs2017/curl-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/curl-lib.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2017/example.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/lua-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/luashim-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/luasocket.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/luasocket.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2017/zip-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2017/zip-lib.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2017/zlib-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/Premake5.sln delete mode 100644 build/premake/premake5/build/vs2019/Premake5.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/Premake5.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2019/Premake5.vcxproj.user delete mode 100644 build/premake/premake5/build/vs2019/curl-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/curl-lib.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2019/example.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/lua-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/luashim-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/luasocket.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/luasocket.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2019/zip-lib.vcxproj delete mode 100644 build/premake/premake5/build/vs2019/zip-lib.vcxproj.filters delete mode 100644 build/premake/premake5/build/vs2019/zlib-lib.vcxproj delete mode 100644 build/premake/premake5/contrib/curl/include/Makefile.am delete mode 100644 build/premake/premake5/contrib/curl/include/README delete mode 100644 build/premake/premake5/contrib/curl/include/curl/Makefile.am delete mode 100644 build/premake/premake5/contrib/curl/include/curl/curl.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/curlbuild.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/curlbuild.h.cmake delete mode 100644 build/premake/premake5/contrib/curl/include/curl/curlbuild.h.in delete mode 100644 build/premake/premake5/contrib/curl/include/curl/curlrules.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/curlver.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/easy.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/mprintf.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/multi.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/stdcheaders.h delete mode 100644 build/premake/premake5/contrib/curl/include/curl/typecheck-gcc.h delete mode 100644 build/premake/premake5/contrib/curl/lib/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.Watcom delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.am delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.b32 delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.inc delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.m32 delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.netware delete mode 100644 build/premake/premake5/contrib/curl/lib/Makefile.vxworks delete mode 100644 build/premake/premake5/contrib/curl/lib/amigaos.c delete mode 100644 build/premake/premake5/contrib/curl/lib/amigaos.h delete mode 100644 build/premake/premake5/contrib/curl/lib/arpa_telnet.h delete mode 100644 build/premake/premake5/contrib/curl/lib/asyn-ares.c delete mode 100644 build/premake/premake5/contrib/curl/lib/asyn-thread.c delete mode 100644 build/premake/premake5/contrib/curl/lib/asyn.h delete mode 100644 build/premake/premake5/contrib/curl/lib/base64.c delete mode 100644 build/premake/premake5/contrib/curl/lib/checksrc.pl delete mode 100644 build/premake/premake5/contrib/curl/lib/config-amigaos.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-dos.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-linux.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-mac.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-os400.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-osx.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-riscos.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-symbian.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-tpf.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-vxworks.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-win32.h delete mode 100644 build/premake/premake5/contrib/curl/lib/config-win32ce.h delete mode 100644 build/premake/premake5/contrib/curl/lib/conncache.c delete mode 100644 build/premake/premake5/contrib/curl/lib/conncache.h delete mode 100644 build/premake/premake5/contrib/curl/lib/connect.c delete mode 100644 build/premake/premake5/contrib/curl/lib/connect.h delete mode 100644 build/premake/premake5/contrib/curl/lib/content_encoding.c delete mode 100644 build/premake/premake5/contrib/curl/lib/content_encoding.h delete mode 100644 build/premake/premake5/contrib/curl/lib/cookie.c delete mode 100644 build/premake/premake5/contrib/curl/lib/cookie.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_addrinfo.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_addrinfo.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_base64.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_config.h.cmake delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_des.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_des.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_endian.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_endian.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_fnmatch.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_fnmatch.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_gethostname.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_gethostname.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_gssapi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_gssapi.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_hmac.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_ldap.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_md4.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_md5.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_memory.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_memrchr.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_memrchr.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_multibyte.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_multibyte.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_ntlm_core.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_ntlm_core.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_printf.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_rtmp.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_rtmp.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_sasl.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_sasl.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_sec.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_setup.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_setup_once.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_sspi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_sspi.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_threads.c delete mode 100644 build/premake/premake5/contrib/curl/lib/curl_threads.h delete mode 100644 build/premake/premake5/contrib/curl/lib/curlx.h delete mode 100644 build/premake/premake5/contrib/curl/lib/dict.c delete mode 100644 build/premake/premake5/contrib/curl/lib/dict.h delete mode 100644 build/premake/premake5/contrib/curl/lib/dotdot.c delete mode 100644 build/premake/premake5/contrib/curl/lib/dotdot.h delete mode 100644 build/premake/premake5/contrib/curl/lib/easy.c delete mode 100644 build/premake/premake5/contrib/curl/lib/easyif.h delete mode 100644 build/premake/premake5/contrib/curl/lib/escape.c delete mode 100644 build/premake/premake5/contrib/curl/lib/escape.h delete mode 100644 build/premake/premake5/contrib/curl/lib/file.c delete mode 100644 build/premake/premake5/contrib/curl/lib/file.h delete mode 100644 build/premake/premake5/contrib/curl/lib/fileinfo.c delete mode 100644 build/premake/premake5/contrib/curl/lib/fileinfo.h delete mode 100644 build/premake/premake5/contrib/curl/lib/firefox-db2pem.sh delete mode 100644 build/premake/premake5/contrib/curl/lib/formdata.c delete mode 100644 build/premake/premake5/contrib/curl/lib/formdata.h delete mode 100644 build/premake/premake5/contrib/curl/lib/ftp.c delete mode 100644 build/premake/premake5/contrib/curl/lib/ftp.h delete mode 100644 build/premake/premake5/contrib/curl/lib/ftplistparser.c delete mode 100644 build/premake/premake5/contrib/curl/lib/ftplistparser.h delete mode 100644 build/premake/premake5/contrib/curl/lib/getenv.c delete mode 100644 build/premake/premake5/contrib/curl/lib/getinfo.c delete mode 100644 build/premake/premake5/contrib/curl/lib/getinfo.h delete mode 100644 build/premake/premake5/contrib/curl/lib/gopher.c delete mode 100644 build/premake/premake5/contrib/curl/lib/gopher.h delete mode 100644 build/premake/premake5/contrib/curl/lib/hash.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hash.h delete mode 100644 build/premake/premake5/contrib/curl/lib/hmac.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hostasyn.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hostcheck.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hostcheck.h delete mode 100644 build/premake/premake5/contrib/curl/lib/hostip.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hostip.h delete mode 100644 build/premake/premake5/contrib/curl/lib/hostip4.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hostip6.c delete mode 100644 build/premake/premake5/contrib/curl/lib/hostsyn.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http.h delete mode 100644 build/premake/premake5/contrib/curl/lib/http2.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http2.h delete mode 100644 build/premake/premake5/contrib/curl/lib/http_chunks.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http_chunks.h delete mode 100644 build/premake/premake5/contrib/curl/lib/http_digest.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http_digest.h delete mode 100644 build/premake/premake5/contrib/curl/lib/http_negotiate.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http_negotiate.h delete mode 100644 build/premake/premake5/contrib/curl/lib/http_ntlm.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http_ntlm.h delete mode 100644 build/premake/premake5/contrib/curl/lib/http_proxy.c delete mode 100644 build/premake/premake5/contrib/curl/lib/http_proxy.h delete mode 100644 build/premake/premake5/contrib/curl/lib/idn_win32.c delete mode 100644 build/premake/premake5/contrib/curl/lib/if2ip.c delete mode 100644 build/premake/premake5/contrib/curl/lib/if2ip.h delete mode 100644 build/premake/premake5/contrib/curl/lib/imap.c delete mode 100644 build/premake/premake5/contrib/curl/lib/imap.h delete mode 100644 build/premake/premake5/contrib/curl/lib/inet_ntop.c delete mode 100644 build/premake/premake5/contrib/curl/lib/inet_ntop.h delete mode 100644 build/premake/premake5/contrib/curl/lib/inet_pton.c delete mode 100644 build/premake/premake5/contrib/curl/lib/inet_pton.h delete mode 100644 build/premake/premake5/contrib/curl/lib/krb5.c delete mode 100644 build/premake/premake5/contrib/curl/lib/ldap.c delete mode 100644 build/premake/premake5/contrib/curl/lib/libcurl.plist delete mode 100644 build/premake/premake5/contrib/curl/lib/libcurl.rc delete mode 100644 build/premake/premake5/contrib/curl/lib/libcurl.vers.in delete mode 100644 build/premake/premake5/contrib/curl/lib/llist.c delete mode 100644 build/premake/premake5/contrib/curl/lib/llist.h delete mode 100644 build/premake/premake5/contrib/curl/lib/makefile.amiga delete mode 100644 build/premake/premake5/contrib/curl/lib/makefile.dj delete mode 100644 build/premake/premake5/contrib/curl/lib/md4.c delete mode 100644 build/premake/premake5/contrib/curl/lib/md5.c delete mode 100644 build/premake/premake5/contrib/curl/lib/memdebug.c delete mode 100644 build/premake/premake5/contrib/curl/lib/memdebug.h delete mode 100644 build/premake/premake5/contrib/curl/lib/mk-ca-bundle.pl delete mode 100644 build/premake/premake5/contrib/curl/lib/mk-ca-bundle.vbs delete mode 100644 build/premake/premake5/contrib/curl/lib/mprintf.c delete mode 100644 build/premake/premake5/contrib/curl/lib/multi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/multihandle.h delete mode 100644 build/premake/premake5/contrib/curl/lib/multiif.h delete mode 100644 build/premake/premake5/contrib/curl/lib/netrc.c delete mode 100644 build/premake/premake5/contrib/curl/lib/netrc.h delete mode 100644 build/premake/premake5/contrib/curl/lib/non-ascii.c delete mode 100644 build/premake/premake5/contrib/curl/lib/non-ascii.h delete mode 100644 build/premake/premake5/contrib/curl/lib/nonblock.c delete mode 100644 build/premake/premake5/contrib/curl/lib/nonblock.h delete mode 100644 build/premake/premake5/contrib/curl/lib/nwlib.c delete mode 100644 build/premake/premake5/contrib/curl/lib/nwos.c delete mode 100644 build/premake/premake5/contrib/curl/lib/objnames-test08.sh delete mode 100644 build/premake/premake5/contrib/curl/lib/objnames-test10.sh delete mode 100644 build/premake/premake5/contrib/curl/lib/objnames.inc delete mode 100644 build/premake/premake5/contrib/curl/lib/openldap.c delete mode 100644 build/premake/premake5/contrib/curl/lib/parsedate.c delete mode 100644 build/premake/premake5/contrib/curl/lib/parsedate.h delete mode 100644 build/premake/premake5/contrib/curl/lib/pingpong.c delete mode 100644 build/premake/premake5/contrib/curl/lib/pingpong.h delete mode 100644 build/premake/premake5/contrib/curl/lib/pipeline.c delete mode 100644 build/premake/premake5/contrib/curl/lib/pipeline.h delete mode 100644 build/premake/premake5/contrib/curl/lib/pop3.c delete mode 100644 build/premake/premake5/contrib/curl/lib/pop3.h delete mode 100644 build/premake/premake5/contrib/curl/lib/progress.c delete mode 100644 build/premake/premake5/contrib/curl/lib/progress.h delete mode 100644 build/premake/premake5/contrib/curl/lib/rand.c delete mode 100644 build/premake/premake5/contrib/curl/lib/rand.h delete mode 100644 build/premake/premake5/contrib/curl/lib/rtsp.c delete mode 100644 build/premake/premake5/contrib/curl/lib/rtsp.h delete mode 100644 build/premake/premake5/contrib/curl/lib/security.c delete mode 100644 build/premake/premake5/contrib/curl/lib/select.c delete mode 100644 build/premake/premake5/contrib/curl/lib/select.h delete mode 100644 build/premake/premake5/contrib/curl/lib/sendf.c delete mode 100644 build/premake/premake5/contrib/curl/lib/sendf.h delete mode 100644 build/premake/premake5/contrib/curl/lib/setup-os400.h delete mode 100644 build/premake/premake5/contrib/curl/lib/setup-vms.h delete mode 100644 build/premake/premake5/contrib/curl/lib/share.c delete mode 100644 build/premake/premake5/contrib/curl/lib/share.h delete mode 100644 build/premake/premake5/contrib/curl/lib/sigpipe.h delete mode 100644 build/premake/premake5/contrib/curl/lib/slist.c delete mode 100644 build/premake/premake5/contrib/curl/lib/slist.h delete mode 100644 build/premake/premake5/contrib/curl/lib/smb.c delete mode 100644 build/premake/premake5/contrib/curl/lib/smb.h delete mode 100644 build/premake/premake5/contrib/curl/lib/smtp.c delete mode 100644 build/premake/premake5/contrib/curl/lib/smtp.h delete mode 100644 build/premake/premake5/contrib/curl/lib/sockaddr.h delete mode 100644 build/premake/premake5/contrib/curl/lib/socks.c delete mode 100644 build/premake/premake5/contrib/curl/lib/socks.h delete mode 100644 build/premake/premake5/contrib/curl/lib/socks_gssapi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/socks_sspi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/speedcheck.c delete mode 100644 build/premake/premake5/contrib/curl/lib/speedcheck.h delete mode 100644 build/premake/premake5/contrib/curl/lib/splay.c delete mode 100644 build/premake/premake5/contrib/curl/lib/splay.h delete mode 100644 build/premake/premake5/contrib/curl/lib/ssh.c delete mode 100644 build/premake/premake5/contrib/curl/lib/ssh.h delete mode 100644 build/premake/premake5/contrib/curl/lib/strcase.c delete mode 100644 build/premake/premake5/contrib/curl/lib/strcase.h delete mode 100644 build/premake/premake5/contrib/curl/lib/strdup.c delete mode 100644 build/premake/premake5/contrib/curl/lib/strdup.h delete mode 100644 build/premake/premake5/contrib/curl/lib/strerror.c delete mode 100644 build/premake/premake5/contrib/curl/lib/strerror.h delete mode 100644 build/premake/premake5/contrib/curl/lib/strtok.c delete mode 100644 build/premake/premake5/contrib/curl/lib/strtok.h delete mode 100644 build/premake/premake5/contrib/curl/lib/strtoofft.c delete mode 100644 build/premake/premake5/contrib/curl/lib/strtoofft.h delete mode 100644 build/premake/premake5/contrib/curl/lib/system_win32.c delete mode 100644 build/premake/premake5/contrib/curl/lib/system_win32.h delete mode 100644 build/premake/premake5/contrib/curl/lib/telnet.c delete mode 100644 build/premake/premake5/contrib/curl/lib/telnet.h delete mode 100644 build/premake/premake5/contrib/curl/lib/tftp.c delete mode 100644 build/premake/premake5/contrib/curl/lib/tftp.h delete mode 100644 build/premake/premake5/contrib/curl/lib/timeval.c delete mode 100644 build/premake/premake5/contrib/curl/lib/timeval.h delete mode 100644 build/premake/premake5/contrib/curl/lib/transfer.c delete mode 100644 build/premake/premake5/contrib/curl/lib/transfer.h delete mode 100644 build/premake/premake5/contrib/curl/lib/url.c delete mode 100644 build/premake/premake5/contrib/curl/lib/url.h delete mode 100644 build/premake/premake5/contrib/curl/lib/urldata.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/cleartext.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/cram.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/digest.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/digest.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/digest_sspi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/krb5_gssapi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/krb5_sspi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/ntlm.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/ntlm.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/ntlm_sspi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/oauth2.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/spnego_gssapi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/spnego_sspi.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/vauth.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vauth/vauth.h delete mode 100644 build/premake/premake5/contrib/curl/lib/version.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/axtls.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/axtls.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/cyassl.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/cyassl.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/darwinssl.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/darwinssl.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/gskit.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/gskit.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/gtls.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/gtls.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/mbedtls.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/mbedtls.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/nss.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/nssg.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/openssl.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/openssl.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/polarssl.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/polarssl.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/schannel.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/schannel.h delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/vtls.c delete mode 100644 build/premake/premake5/contrib/curl/lib/vtls/vtls.h delete mode 100644 build/premake/premake5/contrib/curl/lib/warnless.c delete mode 100644 build/premake/premake5/contrib/curl/lib/warnless.h delete mode 100644 build/premake/premake5/contrib/curl/lib/wildcard.c delete mode 100644 build/premake/premake5/contrib/curl/lib/wildcard.h delete mode 100644 build/premake/premake5/contrib/curl/lib/x509asn1.c delete mode 100644 build/premake/premake5/contrib/curl/lib/x509asn1.h delete mode 100644 build/premake/premake5/contrib/curl/premake5.lua delete mode 100644 build/premake/premake5/contrib/libzip/config.h delete mode 100644 build/premake/premake5/contrib/libzip/include/zconf.h delete mode 100644 build/premake/premake5/contrib/libzip/include/zipconf.h delete mode 100644 build/premake/premake5/contrib/libzip/include/zlib.h delete mode 100644 build/premake/premake5/contrib/libzip/mkstemp.c delete mode 100644 build/premake/premake5/contrib/libzip/premake5.lua delete mode 100644 build/premake/premake5/contrib/libzip/zconf.h delete mode 100644 build/premake/premake5/contrib/libzip/zip.h delete mode 100644 build/premake/premake5/contrib/libzip/zip_add.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_add_dir.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_add_entry.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_close.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_delete.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_dir_add.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_dirent.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_discard.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_entry.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_err_str.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_error.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_error_clear.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_error_get.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_error_get_sys_type.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_error_strerror.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_error_to_str.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_extra_field.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_extra_field_api.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fclose.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fdopen.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_add.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_error_clear.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_error_get.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_get_comment.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_get_external_attributes.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_get_offset.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_rename.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_replace.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_set_comment.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_set_external_attributes.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_file_strerror.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_filerange_crc.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fopen.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fopen_encrypted.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fopen_index.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fopen_index_encrypted.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_fread.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_archive_comment.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_archive_flag.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_compression_implementation.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_encryption_implementation.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_file_comment.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_name.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_num_entries.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_get_num_files.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_memdup.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_name_locate.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_new.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_open.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_rename.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_replace.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_set_archive_comment.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_set_archive_flag.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_set_default_password.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_set_file_comment.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_set_file_compression.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_set_name.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_buffer.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_close.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_crc.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_deflate.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_error.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_file.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_filep.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_free.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_function.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_layered.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_open.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_pkware.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_pop.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_read.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_stat.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_window.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_zip.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_source_zip_new.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_stat.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_stat_index.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_stat_init.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_strerror.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_string.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_unchange.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_unchange_all.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_unchange_archive.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_unchange_data.c delete mode 100644 build/premake/premake5/contrib/libzip/zip_utf-8.c delete mode 100644 build/premake/premake5/contrib/libzip/zipconf.h delete mode 100644 build/premake/premake5/contrib/libzip/zipint.h delete mode 100644 build/premake/premake5/contrib/libzip/zlib.h delete mode 100644 build/premake/premake5/contrib/lua/README delete mode 100644 build/premake/premake5/contrib/lua/doc/contents.html delete mode 100644 build/premake/premake5/contrib/lua/doc/index.css delete mode 100644 build/premake/premake5/contrib/lua/doc/logo.gif delete mode 100644 build/premake/premake5/contrib/lua/doc/lua.1 delete mode 100644 build/premake/premake5/contrib/lua/doc/lua.css delete mode 100644 build/premake/premake5/contrib/lua/doc/luac.1 delete mode 100644 build/premake/premake5/contrib/lua/doc/manual.css delete mode 100644 build/premake/premake5/contrib/lua/doc/manual.html delete mode 100644 build/premake/premake5/contrib/lua/doc/osi-certified-72x60.png delete mode 100644 build/premake/premake5/contrib/lua/doc/readme.html delete mode 100644 build/premake/premake5/contrib/lua/premake5.lua delete mode 100644 build/premake/premake5/contrib/lua/src/lapi.c delete mode 100644 build/premake/premake5/contrib/lua/src/lapi.h delete mode 100644 build/premake/premake5/contrib/lua/src/lauxlib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lauxlib.h delete mode 100644 build/premake/premake5/contrib/lua/src/lbaselib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lbitlib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lcode.c delete mode 100644 build/premake/premake5/contrib/lua/src/lcode.h delete mode 100644 build/premake/premake5/contrib/lua/src/lcorolib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lctype.c delete mode 100644 build/premake/premake5/contrib/lua/src/lctype.h delete mode 100644 build/premake/premake5/contrib/lua/src/ldblib.c delete mode 100644 build/premake/premake5/contrib/lua/src/ldebug.c delete mode 100644 build/premake/premake5/contrib/lua/src/ldebug.h delete mode 100644 build/premake/premake5/contrib/lua/src/ldo.c delete mode 100644 build/premake/premake5/contrib/lua/src/ldo.h delete mode 100644 build/premake/premake5/contrib/lua/src/ldump.c delete mode 100644 build/premake/premake5/contrib/lua/src/lfunc.c delete mode 100644 build/premake/premake5/contrib/lua/src/lfunc.h delete mode 100644 build/premake/premake5/contrib/lua/src/lgc.c delete mode 100644 build/premake/premake5/contrib/lua/src/lgc.h delete mode 100644 build/premake/premake5/contrib/lua/src/linit.c delete mode 100644 build/premake/premake5/contrib/lua/src/liolib.c delete mode 100644 build/premake/premake5/contrib/lua/src/llex.c delete mode 100644 build/premake/premake5/contrib/lua/src/llex.h delete mode 100644 build/premake/premake5/contrib/lua/src/llimits.h delete mode 100644 build/premake/premake5/contrib/lua/src/lmathlib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lmem.c delete mode 100644 build/premake/premake5/contrib/lua/src/lmem.h delete mode 100644 build/premake/premake5/contrib/lua/src/loadlib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lobject.c delete mode 100644 build/premake/premake5/contrib/lua/src/lobject.h delete mode 100644 build/premake/premake5/contrib/lua/src/lopcodes.c delete mode 100644 build/premake/premake5/contrib/lua/src/lopcodes.h delete mode 100644 build/premake/premake5/contrib/lua/src/loslib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lparser.c delete mode 100644 build/premake/premake5/contrib/lua/src/lparser.h delete mode 100644 build/premake/premake5/contrib/lua/src/lprefix.h delete mode 100644 build/premake/premake5/contrib/lua/src/lstate.c delete mode 100644 build/premake/premake5/contrib/lua/src/lstate.h delete mode 100644 build/premake/premake5/contrib/lua/src/lstring.c delete mode 100644 build/premake/premake5/contrib/lua/src/lstring.h delete mode 100644 build/premake/premake5/contrib/lua/src/lstrlib.c delete mode 100644 build/premake/premake5/contrib/lua/src/ltable.c delete mode 100644 build/premake/premake5/contrib/lua/src/ltable.h delete mode 100644 build/premake/premake5/contrib/lua/src/ltablib.c delete mode 100644 build/premake/premake5/contrib/lua/src/ltm.c delete mode 100644 build/premake/premake5/contrib/lua/src/ltm.h delete mode 100644 build/premake/premake5/contrib/lua/src/lua.c delete mode 100644 build/premake/premake5/contrib/lua/src/lua.h delete mode 100644 build/premake/premake5/contrib/lua/src/lua.hpp delete mode 100644 build/premake/premake5/contrib/lua/src/luac.c delete mode 100644 build/premake/premake5/contrib/lua/src/luaconf.h delete mode 100644 build/premake/premake5/contrib/lua/src/lualib.h delete mode 100644 build/premake/premake5/contrib/lua/src/lundump.c delete mode 100644 build/premake/premake5/contrib/lua/src/lundump.h delete mode 100644 build/premake/premake5/contrib/lua/src/lutf8lib.c delete mode 100644 build/premake/premake5/contrib/lua/src/lvm.c delete mode 100644 build/premake/premake5/contrib/lua/src/lvm.h delete mode 100644 build/premake/premake5/contrib/lua/src/lzio.c delete mode 100644 build/premake/premake5/contrib/lua/src/lzio.h delete mode 100644 build/premake/premake5/contrib/luashim/lua.txt delete mode 100644 build/premake/premake5/contrib/luashim/luashim.c delete mode 100644 build/premake/premake5/contrib/luashim/luashim.h delete mode 100644 build/premake/premake5/contrib/luashim/premake5.lua delete mode 100644 build/premake/premake5/contrib/mbedtls/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/ChangeLog delete mode 100644 build/premake/premake5/contrib/mbedtls/DartConfiguration.tcl delete mode 100644 build/premake/premake5/contrib/mbedtls/LICENSE delete mode 100644 build/premake/premake5/contrib/mbedtls/README.md delete mode 100644 build/premake/premake5/contrib/mbedtls/apache-2.0.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/configs/README.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/configs/config-ccm-psk-tls1_2.h delete mode 100644 build/premake/premake5/contrib/mbedtls/configs/config-mini-tls1_1.h delete mode 100644 build/premake/premake5/contrib/mbedtls/configs/config-picocoin.h delete mode 100644 build/premake/premake5/contrib/mbedtls/configs/config-suite-b.h delete mode 100644 build/premake/premake5/contrib/mbedtls/configs/config-thread.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_encdec.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_hashing.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_mainpage.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_rng.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_ssltls.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_tcpip.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/input/doc_x509.h delete mode 100644 build/premake/premake5/contrib/mbedtls/doxygen/mbedtls.doxyfile delete mode 100644 build/premake/premake5/contrib/mbedtls/include/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/aes.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/aesni.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/arc4.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1write.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/base64.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/bignum.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/blowfish.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/bn_mul.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/camellia.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ccm.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/certs.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/check_config.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher_internal.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/compat-1.3.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/config.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ctr_drbg.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/debug.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/des.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/dhm.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdh.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdsa.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ecjpake.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ecp.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy_poll.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/error.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/gcm.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/havege.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/hmac_drbg.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/md.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/md2.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/md4.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/md5.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/md_internal.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/memory_buffer_alloc.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/net.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/oid.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/padlock.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/pem.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/pk.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/pk_internal.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs11.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs12.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs5.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/platform.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ripemd160.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/rsa.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/sha1.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/sha256.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/sha512.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cache.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ciphersuites.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cookie.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_internal.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ticket.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/threading.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/timing.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/version.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/x509.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crl.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crt.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_csr.h delete mode 100644 build/premake/premake5/contrib/mbedtls/include/mbedtls/xtea.h delete mode 100644 build/premake/premake5/contrib/mbedtls/library/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/library/aes.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/aesni.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/arc4.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/asn1parse.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/asn1write.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/base64.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/bignum.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/blowfish.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/camellia.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ccm.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/certs.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/cipher.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/cipher_wrap.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ctr_drbg.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/debug.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/des.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/dhm.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ecdh.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ecdsa.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ecjpake.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ecp.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ecp_curves.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/entropy.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/entropy_poll.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/error.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/gcm.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/havege.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/hmac_drbg.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/md.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/md2.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/md4.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/md5.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/md_wrap.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/memory_buffer_alloc.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/net.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/oid.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/padlock.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pem.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pk.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pk_wrap.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pkcs11.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pkcs12.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pkcs5.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pkparse.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/pkwrite.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/platform.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ripemd160.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/rsa.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/sha1.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/sha256.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/sha512.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_cache.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_ciphersuites.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_cli.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_cookie.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_srv.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_ticket.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/ssl_tls.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/threading.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/timing.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/version.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/version_features.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509_create.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509_crl.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509_crt.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509_csr.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509write_crt.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/x509write_csr.c delete mode 100644 build/premake/premake5/contrib/mbedtls/library/xtea.c delete mode 100644 build/premake/premake5/contrib/mbedtls/premake5.lua delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/aes/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/aes/aescrypt2.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/aes/crypt_and_hash.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/hash/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/hash/generic_sum.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/hash/hello.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/dh_client.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/dh_genprime.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/dh_prime.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/dh_server.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/ecdh_curve25519.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/ecdsa.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/gen_key.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/key_app.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/key_app_writer.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/mpi_demo.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/pk_decrypt.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/pk_encrypt.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/pk_sign.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/pk_verify.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_decrypt.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_encrypt.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_genkey.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_priv.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_pub.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign_pss.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify_pss.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/random/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/random/gen_entropy.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/random/gen_random_ctr_drbg.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/random/gen_random_havege.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_client.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_server.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/mini_client.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client1.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client2.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_fork_server.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_mail_client.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_pthread_server.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server2.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/test/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/test/benchmark.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/test/selftest.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/test/ssl_cert_test.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/test/udp_proxy.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/util/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/util/pem2der.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/util/strerror.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/wince_main.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/x509/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/x509/cert_app.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/x509/cert_req.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/x509/cert_write.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/x509/crl_app.c delete mode 100644 build/premake/premake5/contrib/mbedtls/programs/x509/req_app.c delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/bump_version.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/config.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/data_files/error.fmt delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/data_files/rename-1.3-2.0.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/data_files/version_features.fmt delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-app-template.dsp delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-main-template.dsp delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-workspace-template.dsw delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/ecc-heap.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/find-mem-leak.cocci delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/footprint.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/generate_errors.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/generate_features.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/generate_visualc_files.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/malloc-init.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/massif_max.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/memory.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/rename.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/rm-malloc-cast.cocci delete mode 100644 build/premake/premake5/contrib/mbedtls/scripts/tmp_ignore_makefiles.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/CMakeLists.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/Descriptions.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/compat.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/Readme-x509.txt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/bitstring-in-dn.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi_nocn.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_wildcard.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md4.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md5.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha224.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha256.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha384.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha512.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cert_v1_with_ext.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha1.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha224.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha256.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha384.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha512.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-future.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1-badsign.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha224.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha256.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha384.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha512.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ec-rsa.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ecfut-rsa.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsa-ec.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsabadpem-ec.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_expired.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md2.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md4.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md5.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha1.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha224.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha256.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha384.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha512.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/crt_cat_rsaexp-ec.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dh.1000.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dh.optlen.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dhparams.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir1/test-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/Readme delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/Readme delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert11.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert12.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert13.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert14.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert21.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert22.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert23.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert31.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert32.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert33.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert34.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert41.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert42.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert43.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert44.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert45.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert51.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert52.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert53.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert54.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert61.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert62.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert63.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert71.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert72.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert73.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert74.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert81.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert82.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert83.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert91.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert92.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.noopt.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pw.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.specdom.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_pub.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/ec_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/enco-ca-prstr.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/enco-cert-utf8str.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/format_gen.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/format_gen.pub delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/format_pkcs12.fmt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/format_rsa.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_1 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_2 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_3 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_4 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_5 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyUsage.decipherOnly.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyfile delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyfile.3des delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyfile.aes128 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyfile.aes192 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyfile.aes256 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/keyfile.des delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/mpi_10 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/mpi_too_big delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/passwd.psk delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_2des.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_3des.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_3des.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_rc4_128.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbes2_pbkdf2_3des.der delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbes2_pbkdf2_3des.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbes2_pbkdf2_des.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/rsa4096_prv.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/rsa4096_pub.pem delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1-nospace.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1-v1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.cert_type.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.ext_ku.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.key_usage.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.pubkey delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.cert_type delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.key_usage delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.ku-ct delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.md4 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.md5 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.sha1 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.sha224 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.sha256 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.sha384 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.req.sha512 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1.v1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server10.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server10_int3_int-ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server10_int3_int-ca2_ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server1_ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2-badsign.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2-v1-chain.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2-v1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2.ku-ds.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2.ku-ds_ke.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2.ku-ka.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server2.ku-ke.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server3.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server3.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server4.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server4.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-badsign.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-expired.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-future.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-selfsigned.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-sha1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-sha224.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-sha384.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5-sha512.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.eku-cli.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.eku-cs.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.eku-cs_any.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.eku-srv.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.eku-srv_cli.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.ku-ds.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.ku-ka.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.ku-ke.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.req.ku.sha1 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.req.sha1 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.req.sha224 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.req.sha256 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.req.sha384 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server5.req.sha512 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server6-ss-child.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server6.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server6.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7_all_space.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7_int-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7_int-ca_ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7_pem_space.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server7_trailing_space.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server8.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server8.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server8_int-ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-bad-mgfhash.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-bad-saltlen.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-badsign.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-defaults.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-sha224.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-sha256.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-sha384.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-sha512.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9-with-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.req.sha1 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.req.sha224 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.req.sha256 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.req.sha384 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/server9.req.sha512 delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca-v1.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca2.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca2.ku-crl.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca2.ku-crt.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca2.ku-crt_crl.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca2.ku-ds.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca_cat12.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-ca_cat21.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-int-ca.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-int-ca.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-int-ca2.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-int-ca2.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-int-ca3.crt delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/data_files/test-int-ca3.key delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/all.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/check-doxy-blocks.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/check-generated-files.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/check-names.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/curves.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/gen_ctr_drbg.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_decrypt.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_encrypt.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/gen_pkcs1_v21_sign_verify.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/generate_code.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/key-exchanges.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/list-enum-consts.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/list-identifiers.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/list-macros.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/list-symbols.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/recursion.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/run-test-suites.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/test-ref-configs.pl delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/scripts/yotta-build.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/ssl-opt.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/helpers.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/main_test.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cbc.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cfb.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.ecb.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.rest.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.aes.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.arc4.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.blowfish.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.camellia.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.ccm.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.des.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.gcm.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.null.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.padding.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_de.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_en.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_de.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_en.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_de.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_en.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.camellia.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.misc.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.no_reseed.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.nopr.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.pr.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.function delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.data delete mode 100644 build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.function delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/create-module.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/README.md delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/adjust-config.sh delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/entropy_hardware_poll.c delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/README.md delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/main.cpp delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/README.md delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/main.cpp delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/README.md delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/main.cpp delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/README.md delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/main.cpp delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/module.json delete mode 100644 build/premake/premake5/contrib/mbedtls/yotta/data/target_config.h delete mode 100644 build/premake/premake5/contrib/zlib/adler32.c delete mode 100644 build/premake/premake5/contrib/zlib/compress.c delete mode 100644 build/premake/premake5/contrib/zlib/crc32.c delete mode 100644 build/premake/premake5/contrib/zlib/crc32.h delete mode 100644 build/premake/premake5/contrib/zlib/deflate.c delete mode 100644 build/premake/premake5/contrib/zlib/deflate.h delete mode 100644 build/premake/premake5/contrib/zlib/gzclose.c delete mode 100644 build/premake/premake5/contrib/zlib/gzguts.h delete mode 100644 build/premake/premake5/contrib/zlib/gzlib.c delete mode 100644 build/premake/premake5/contrib/zlib/gzread.c delete mode 100644 build/premake/premake5/contrib/zlib/gzwrite.c delete mode 100644 build/premake/premake5/contrib/zlib/infback.c delete mode 100644 build/premake/premake5/contrib/zlib/inffast.c delete mode 100644 build/premake/premake5/contrib/zlib/inffast.h delete mode 100644 build/premake/premake5/contrib/zlib/inffixed.h delete mode 100644 build/premake/premake5/contrib/zlib/inflate.c delete mode 100644 build/premake/premake5/contrib/zlib/inflate.h delete mode 100644 build/premake/premake5/contrib/zlib/inftrees.c delete mode 100644 build/premake/premake5/contrib/zlib/inftrees.h delete mode 100644 build/premake/premake5/contrib/zlib/premake5.lua delete mode 100644 build/premake/premake5/contrib/zlib/trees.c delete mode 100644 build/premake/premake5/contrib/zlib/trees.h delete mode 100644 build/premake/premake5/contrib/zlib/uncompr.c delete mode 100644 build/premake/premake5/contrib/zlib/zconf.h delete mode 100644 build/premake/premake5/contrib/zlib/zlib.h delete mode 100644 build/premake/premake5/contrib/zlib/zutil.c delete mode 100644 build/premake/premake5/contrib/zlib/zutil.h delete mode 100644 build/premake/premake5/doxyfile delete mode 100644 build/premake/premake5/mobdebug.lua delete mode 100644 build/premake/premake5/modules/android/LICENSE.txt delete mode 100644 build/premake/premake5/modules/android/README.md delete mode 100644 build/premake/premake5/modules/android/_manifest.lua delete mode 100644 build/premake/premake5/modules/android/_preload.lua delete mode 100644 build/premake/premake5/modules/android/android.lua delete mode 100644 build/premake/premake5/modules/android/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/android/tests/test_android_files.lua delete mode 100644 build/premake/premake5/modules/android/tests/test_android_project.lua delete mode 100644 build/premake/premake5/modules/android/vsandroid_androidproj.lua delete mode 100644 build/premake/premake5/modules/android/vsandroid_sln2005.lua delete mode 100644 build/premake/premake5/modules/android/vsandroid_vcxproj.lua delete mode 100644 build/premake/premake5/modules/android/vsandroid_vstudio.lua delete mode 100644 build/premake/premake5/modules/codelite/README.md delete mode 100644 build/premake/premake5/modules/codelite/_manifest.lua delete mode 100644 build/premake/premake5/modules/codelite/_preload.lua delete mode 100755 build/premake/premake5/modules/codelite/codelite.lua delete mode 100755 build/premake/premake5/modules/codelite/codelite_project.lua delete mode 100755 build/premake/premake5/modules/codelite/codelite_workspace.lua delete mode 100644 build/premake/premake5/modules/codelite/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/codelite/tests/test_codelite_config.lua delete mode 100644 build/premake/premake5/modules/codelite/tests/test_codelite_project.lua delete mode 100644 build/premake/premake5/modules/codelite/tests/test_codelite_workspace.lua delete mode 100644 build/premake/premake5/modules/d/LICENSE.txt delete mode 100644 build/premake/premake5/modules/d/README.md delete mode 100644 build/premake/premake5/modules/d/_manifest.lua delete mode 100644 build/premake/premake5/modules/d/_preload.lua delete mode 100644 build/premake/premake5/modules/d/actions/gmake.lua delete mode 100644 build/premake/premake5/modules/d/actions/vcxproj.lua delete mode 100644 build/premake/premake5/modules/d/actions/visuald.lua delete mode 100644 build/premake/premake5/modules/d/d.lua delete mode 100644 build/premake/premake5/modules/d/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/d/tests/test_dmd.lua delete mode 100644 build/premake/premake5/modules/d/tests/test_gdc.lua delete mode 100644 build/premake/premake5/modules/d/tests/test_gmake.lua delete mode 100644 build/premake/premake5/modules/d/tests/test_ldc.lua delete mode 100644 build/premake/premake5/modules/d/tests/test_visualstudio.lua delete mode 100644 build/premake/premake5/modules/d/tools/dmd.lua delete mode 100644 build/premake/premake5/modules/d/tools/gdc.lua delete mode 100644 build/premake/premake5/modules/d/tools/ldc.lua delete mode 100644 build/premake/premake5/modules/gmake/_manifest.lua delete mode 100644 build/premake/premake5/modules/gmake/_preload.lua delete mode 100644 build/premake/premake5/modules/gmake/gmake.lua delete mode 100644 build/premake/premake5/modules/gmake/gmake_cpp.lua delete mode 100644 build/premake/premake5/modules/gmake/gmake_csharp.lua delete mode 100644 build/premake/premake5/modules/gmake/gmake_makefile.lua delete mode 100644 build/premake/premake5/modules/gmake/gmake_utility.lua delete mode 100644 build/premake/premake5/modules/gmake/gmake_workspace.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_clang.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_file_rules.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_flags.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_ldflags.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_make_linking.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_make_pch.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_objects.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_target_rules.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_tools.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cpp/test_wiidev.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cs/test_embed_files.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cs/test_flags.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cs/test_links.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cs/test_response.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/cs/test_sources.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/test_make_escaping.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/test_make_tovar.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/workspace/test_config_maps.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/workspace/test_default_config.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/workspace/test_group_rule.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/workspace/test_help_rule.lua delete mode 100644 build/premake/premake5/modules/gmake/tests/workspace/test_project_rule.lua delete mode 100644 build/premake/premake5/modules/gmake2/_manifest.lua delete mode 100644 build/premake/premake5/modules/gmake2/_preload.lua delete mode 100644 build/premake/premake5/modules/gmake2/gmake2.lua delete mode 100644 build/premake/premake5/modules/gmake2/gmake2_cpp.lua delete mode 100644 build/premake/premake5/modules/gmake2/gmake2_csharp.lua delete mode 100644 build/premake/premake5/modules/gmake2/gmake2_makefile.lua delete mode 100644 build/premake/premake5/modules/gmake2/gmake2_utility.lua delete mode 100644 build/premake/premake5/modules/gmake2/gmake2_workspace.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_buildcmds.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_clang.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_file_rules.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_flags.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_ldflags.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_linking.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_makefile.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_objects.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_pch.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_perfile_flags.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_target_rules.lua delete mode 100644 build/premake/premake5/modules/gmake2/tests/test_gmake2_tools.lua delete mode 100644 build/premake/premake5/modules/raw/README.md delete mode 100644 build/premake/premake5/modules/raw/_manifest.lua delete mode 100644 build/premake/premake5/modules/raw/_preload.lua delete mode 100644 build/premake/premake5/modules/raw/raw.lua delete mode 100644 build/premake/premake5/modules/raw/raw_action.lua delete mode 100644 build/premake/premake5/modules/self-test/_manifest.lua delete mode 100644 build/premake/premake5/modules/self-test/self-test.lua delete mode 100644 build/premake/premake5/modules/self-test/test_assertions.lua delete mode 100644 build/premake/premake5/modules/self-test/test_declare.lua delete mode 100644 build/premake/premake5/modules/self-test/test_helpers.lua delete mode 100644 build/premake/premake5/modules/self-test/test_runner.lua delete mode 100644 build/premake/premake5/modules/vstudio/_manifest.lua delete mode 100644 build/premake/premake5/modules/vstudio/_preload.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/projectsettings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_assembly_refs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_build_events.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_common_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_compiler_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_debug_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_files.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_icon.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_netcore.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_no_warn.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_config.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_packages_config.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_references.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_output_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_platform_groups.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_project_refs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_targets.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/cs2005/test_user_file.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/dotnet2005/projectelement.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/dotnet2005/test_nuget_framework_folders.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/fs2005/projectsettings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_dependencies.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_header.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_nested_projects.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_platforms.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_projects.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_sections.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/sln2005/test_shared_projects.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_assembly_refs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_build_steps.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_compiler_block.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_configuration.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_debug_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_excluded_configs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_files.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_linker_block.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_manifest_block.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_nmake_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_platforms.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_project.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_project_refs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_resource_compiler.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc200x/test_user_file.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_assembly_refs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_build_events.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_build_log.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_build_steps.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_character_set.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_compile_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_config_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_debug_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_ensure_nuget_imports.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_excluded_configs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_targets.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_files.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_filter_ids.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_filters.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_floatingpoint.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_fxcompile_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_globals.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_header.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_item_def_group.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_language_settings.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_language_targets.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_link.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_manifest.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_nmake_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_package_references.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_packages_config.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_output_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_platform_toolset.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_project_configs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_project_refs.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_prop_sheet.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_resource_compile.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_targets.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_vars.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_xml.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_target_machine.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_tokens.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_user_file.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2010/test_vectorextensions.lua delete mode 100644 build/premake/premake5/modules/vstudio/tests/vc2013/test_vcxitems.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005_csproj.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005_csproj_user.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005_dotnetbase.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005_fsproj.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005_fsproj_user.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2005_solution.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2008.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs200x_vcproj.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs200x_vcproj_user.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_nuget.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_rules_props.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_rules_targets.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_rules_xml.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_vcxproj.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_vcxproj_filters.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2010_vcxproj_user.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2012.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2013.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2013_vcxitems.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2015.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2017.lua delete mode 100644 build/premake/premake5/modules/vstudio/vs2019.lua delete mode 100644 build/premake/premake5/modules/vstudio/vstudio.lua delete mode 100644 build/premake/premake5/modules/xcode/LICENSE.TXT delete mode 100644 build/premake/premake5/modules/xcode/_manifest.lua delete mode 100644 build/premake/premake5/modules/xcode/_preload.lua delete mode 100644 build/premake/premake5/modules/xcode/tests/_tests.lua delete mode 100644 build/premake/premake5/modules/xcode/tests/test_header_footer.lua delete mode 100644 build/premake/premake5/modules/xcode/tests/test_xcode4_project.lua delete mode 100644 build/premake/premake5/modules/xcode/tests/test_xcode4_workspace.lua delete mode 100644 build/premake/premake5/modules/xcode/tests/test_xcode_dependencies.lua delete mode 100644 build/premake/premake5/modules/xcode/tests/test_xcode_project.lua delete mode 100644 build/premake/premake5/modules/xcode/xcode.lua delete mode 100644 build/premake/premake5/modules/xcode/xcode4_workspace.lua delete mode 100644 build/premake/premake5/modules/xcode/xcode_common.lua delete mode 100644 build/premake/premake5/modules/xcode/xcode_project.lua delete mode 100644 build/premake/premake5/premake4.lua delete mode 100644 build/premake/premake5/premake5.lua delete mode 100644 build/premake/premake5/scripts/RELEASE.md delete mode 100644 build/premake/premake5/scripts/changes.lua delete mode 100644 build/premake/premake5/scripts/embed.lua delete mode 100644 build/premake/premake5/scripts/package.lua delete mode 100644 build/premake/premake5/src/_manifest.lua delete mode 100644 build/premake/premake5/src/_modules.lua delete mode 100644 build/premake/premake5/src/_premake_init.lua delete mode 100644 build/premake/premake5/src/_premake_main.lua delete mode 100644 build/premake/premake5/src/actions/clean/_clean.lua delete mode 100644 build/premake/premake5/src/base/_foundation.lua delete mode 100644 build/premake/premake5/src/base/action.lua delete mode 100755 build/premake/premake5/src/base/api.lua delete mode 100755 build/premake/premake5/src/base/config.lua delete mode 100644 build/premake/premake5/src/base/configset.lua delete mode 100644 build/premake/premake5/src/base/container.lua delete mode 100644 build/premake/premake5/src/base/context.lua delete mode 100644 build/premake/premake5/src/base/criteria.lua delete mode 100644 build/premake/premake5/src/base/detoken.lua delete mode 100644 build/premake/premake5/src/base/field.lua delete mode 100644 build/premake/premake5/src/base/fileconfig.lua delete mode 100644 build/premake/premake5/src/base/global.lua delete mode 100644 build/premake/premake5/src/base/globals.lua delete mode 100644 build/premake/premake5/src/base/group.lua delete mode 100644 build/premake/premake5/src/base/help.lua delete mode 100644 build/premake/premake5/src/base/http.lua delete mode 100644 build/premake/premake5/src/base/io.lua delete mode 100644 build/premake/premake5/src/base/json.lua delete mode 100644 build/premake/premake5/src/base/jsonwrapper.lua delete mode 100644 build/premake/premake5/src/base/languages.lua delete mode 100644 build/premake/premake5/src/base/moduledownloader.lua delete mode 100644 build/premake/premake5/src/base/option.lua delete mode 100644 build/premake/premake5/src/base/os.lua delete mode 100644 build/premake/premake5/src/base/oven.lua delete mode 100644 build/premake/premake5/src/base/path.lua delete mode 100644 build/premake/premake5/src/base/premake.lua delete mode 100755 build/premake/premake5/src/base/project.lua delete mode 100644 build/premake/premake5/src/base/rule.lua delete mode 100644 build/premake/premake5/src/base/semver.lua delete mode 100644 build/premake/premake5/src/base/string.lua delete mode 100644 build/premake/premake5/src/base/table.lua delete mode 100644 build/premake/premake5/src/base/term.lua delete mode 100644 build/premake/premake5/src/base/tools.lua delete mode 100644 build/premake/premake5/src/base/tree.lua delete mode 100644 build/premake/premake5/src/base/validation.lua delete mode 100644 build/premake/premake5/src/base/workspace.lua delete mode 100644 build/premake/premake5/src/host/buffered_io.c delete mode 100644 build/premake/premake5/src/host/buffered_io.h delete mode 100644 build/premake/premake5/src/host/criteria_matches.c delete mode 100644 build/premake/premake5/src/host/curl_utils.c delete mode 100644 build/premake/premake5/src/host/curl_utils.h delete mode 100644 build/premake/premake5/src/host/debug_prompt.c delete mode 100644 build/premake/premake5/src/host/http_download.c delete mode 100644 build/premake/premake5/src/host/http_get.c delete mode 100644 build/premake/premake5/src/host/http_post.c delete mode 100644 build/premake/premake5/src/host/lua_auxlib.c delete mode 100644 build/premake/premake5/src/host/lua_shimtable.h delete mode 100644 build/premake/premake5/src/host/os_chdir.c delete mode 100644 build/premake/premake5/src/host/os_chmod.c delete mode 100644 build/premake/premake5/src/host/os_comparefiles.c delete mode 100644 build/premake/premake5/src/host/os_compile.c delete mode 100644 build/premake/premake5/src/host/os_copyfile.c delete mode 100644 build/premake/premake5/src/host/os_getWindowsRegistry.c delete mode 100644 build/premake/premake5/src/host/os_getcwd.c delete mode 100644 build/premake/premake5/src/host/os_getpass.c delete mode 100644 build/premake/premake5/src/host/os_getversion.c delete mode 100644 build/premake/premake5/src/host/os_host.c delete mode 100644 build/premake/premake5/src/host/os_is64bit.c delete mode 100644 build/premake/premake5/src/host/os_isdir.c delete mode 100644 build/premake/premake5/src/host/os_isfile.c delete mode 100644 build/premake/premake5/src/host/os_islink.c delete mode 100644 build/premake/premake5/src/host/os_listWindowsRegistry.c delete mode 100644 build/premake/premake5/src/host/os_locate.c delete mode 100644 build/premake/premake5/src/host/os_match.c delete mode 100644 build/premake/premake5/src/host/os_mkdir.c delete mode 100644 build/premake/premake5/src/host/os_pathsearch.c delete mode 100644 build/premake/premake5/src/host/os_realpath.c delete mode 100644 build/premake/premake5/src/host/os_remove.c delete mode 100644 build/premake/premake5/src/host/os_rename.c delete mode 100644 build/premake/premake5/src/host/os_rmdir.c delete mode 100644 build/premake/premake5/src/host/os_stat.c delete mode 100644 build/premake/premake5/src/host/os_touchfile.c delete mode 100644 build/premake/premake5/src/host/os_uuid.c delete mode 100644 build/premake/premake5/src/host/os_writefile_ifnotequal.c delete mode 100644 build/premake/premake5/src/host/path_getabsolute.c delete mode 100644 build/premake/premake5/src/host/path_getrelative.c delete mode 100644 build/premake/premake5/src/host/path_isabsolute.c delete mode 100644 build/premake/premake5/src/host/path_isabsolute.h delete mode 100644 build/premake/premake5/src/host/path_join.c delete mode 100644 build/premake/premake5/src/host/path_normalize.c delete mode 100644 build/premake/premake5/src/host/path_translate.c delete mode 100644 build/premake/premake5/src/host/path_wildcards.c delete mode 100644 build/premake/premake5/src/host/premake.c delete mode 100644 build/premake/premake5/src/host/premake.h delete mode 100644 build/premake/premake5/src/host/premake_main.c delete mode 100644 build/premake/premake5/src/host/string_endswith.c delete mode 100644 build/premake/premake5/src/host/string_hash.c delete mode 100644 build/premake/premake5/src/host/string_sha1.c delete mode 100644 build/premake/premake5/src/host/string_startswith.c delete mode 100644 build/premake/premake5/src/host/term_textColor.c delete mode 100644 build/premake/premake5/src/host/zip_extract.c delete mode 100644 build/premake/premake5/src/scripts.c delete mode 100644 build/premake/premake5/src/tools/clang.lua delete mode 100644 build/premake/premake5/src/tools/dotnet.lua delete mode 100644 build/premake/premake5/src/tools/gcc.lua delete mode 100644 build/premake/premake5/src/tools/mingw.lua delete mode 100644 build/premake/premake5/src/tools/msc.lua delete mode 100644 build/premake/premake5/src/tools/snc.lua delete mode 100644 build/premake/premake5/tests/_tests.lua delete mode 100644 build/premake/premake5/tests/api/test_boolean_kind.lua delete mode 100644 build/premake/premake5/tests/api/test_containers.lua delete mode 100644 build/premake/premake5/tests/api/test_deprecations.lua delete mode 100644 build/premake/premake5/tests/api/test_directory_kind.lua delete mode 100644 build/premake/premake5/tests/api/test_list_kind.lua delete mode 100644 build/premake/premake5/tests/api/test_path_kind.lua delete mode 100644 build/premake/premake5/tests/api/test_register.lua delete mode 100644 build/premake/premake5/tests/api/test_string_kind.lua delete mode 100644 build/premake/premake5/tests/api/test_table_kind.lua delete mode 100644 build/premake/premake5/tests/base/.testDotFile delete mode 100644 build/premake/premake5/tests/base/test_aliasing.lua delete mode 100644 build/premake/premake5/tests/base/test_binmodules.lua delete mode 100644 build/premake/premake5/tests/base/test_configset.lua delete mode 100644 build/premake/premake5/tests/base/test_context.lua delete mode 100644 build/premake/premake5/tests/base/test_criteria.lua delete mode 100644 build/premake/premake5/tests/base/test_detoken.lua delete mode 100644 build/premake/premake5/tests/base/test_filename.lua delete mode 100644 build/premake/premake5/tests/base/test_http.lua delete mode 100644 build/premake/premake5/tests/base/test_include.lua delete mode 100644 build/premake/premake5/tests/base/test_json.lua delete mode 100644 build/premake/premake5/tests/base/test_module_loader.lua delete mode 100644 build/premake/premake5/tests/base/test_option.lua delete mode 100644 build/premake/premake5/tests/base/test_os.lua delete mode 100644 build/premake/premake5/tests/base/test_override.lua delete mode 100755 build/premake/premake5/tests/base/test_path.lua delete mode 100644 build/premake/premake5/tests/base/test_premake_command.lua delete mode 100644 build/premake/premake5/tests/base/test_table.lua delete mode 100644 build/premake/premake5/tests/base/test_tree.lua delete mode 100644 build/premake/premake5/tests/base/test_uuid.lua delete mode 100644 build/premake/premake5/tests/base/test_validation.lua delete mode 100644 build/premake/premake5/tests/base/test_versions.lua delete mode 100755 build/premake/premake5/tests/config/test_linkinfo.lua delete mode 100755 build/premake/premake5/tests/config/test_links.lua delete mode 100755 build/premake/premake5/tests/config/test_targetinfo.lua delete mode 100644 build/premake/premake5/tests/folder/ok.lua delete mode 100644 build/premake/premake5/tests/folder/premake5.lua delete mode 100644 build/premake/premake5/tests/folder/subfolder/hello.txt delete mode 100644 build/premake/premake5/tests/oven/test_filtering.lua delete mode 100644 build/premake/premake5/tests/oven/test_objdirs.lua delete mode 100644 build/premake/premake5/tests/pepperfish_profiler.lua delete mode 100644 build/premake/premake5/tests/project/test_config_maps.lua delete mode 100755 build/premake/premake5/tests/project/test_eachconfig.lua delete mode 100755 build/premake/premake5/tests/project/test_getconfig.lua delete mode 100644 build/premake/premake5/tests/project/test_location.lua delete mode 100644 build/premake/premake5/tests/project/test_sources.lua delete mode 100644 build/premake/premake5/tests/project/test_vpaths.lua delete mode 100755 build/premake/premake5/tests/test delete mode 100644 build/premake/premake5/tests/test.bat delete mode 100644 build/premake/premake5/tests/test_premake.lua delete mode 100644 build/premake/premake5/tests/test_stress.lua delete mode 100644 build/premake/premake5/tests/test_string.lua delete mode 100644 build/premake/premake5/tests/tools/test_dotnet.lua delete mode 100644 build/premake/premake5/tests/tools/test_gcc.lua delete mode 100644 build/premake/premake5/tests/tools/test_msc.lua delete mode 100644 build/premake/premake5/tests/tools/test_snc.lua delete mode 100644 build/premake/premake5/tests/workspace/test_eachconfig.lua delete mode 100644 build/premake/premake5/tests/workspace/test_location.lua delete mode 100644 build/premake/premake5/tests/workspace/test_objdirs.lua diff --git a/.gitignore b/.gitignore index e6f336143d..d5032b9ced 100644 --- a/.gitignore +++ b/.gitignore @@ -29,24 +29,7 @@ libraries/source/spirv-reflect/* archives/ source/tools/spirv/rules.*.json -# premake5 build files, adapted from upstream -build/premake/premake5/**/.gitignore -build/premake/premake5/**/.travis.yml -build/premake/premake5/.editorconfig -build/premake/premake5/.github/ -build/premake/premake5/Bootstrap.* -build/premake/premake5/CONTRIBUTING.md -build/premake/premake5/FUNDING.yml -build/premake/premake5/appveyor.yml -build/premake/premake5/bin/release/premake5 -build/premake/premake5/build/*/obj/ -build/premake/premake5/build/codelite* -build/premake/premake5/build/gmake2.windows/ -build/premake/premake5/build/vs200*/ -build/premake/premake5/build/vs201[0-5]/ -build/premake/premake5/build/xcode4/ -build/premake/premake5/packages/ -build/premake/.already-built +# Files generated by running premake5 build/premake/.gccmachine.tmp build/premake/.gccver.tmp diff --git a/build/premake/build.sh b/build/premake/build.sh deleted file mode 100755 index 5cb6c6e4c0..0000000000 --- a/build/premake/build.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -set -e - -LIB_VERSION="premake-5-alpha-14+wildfiregames.1" - -if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ]; then - echo "Premake 5 is already up to date." - exit -fi - -JOBS=${JOBS:="-j2"} -MAKE=${MAKE:="make"} -CFLAGS="${CFLAGS:=""} -Wno-error=implicit-function-declaration" -OS="${OS:=$(uname -s)}" - -echo "Building Premake 5..." -echo - -PREMAKE_BUILD_DIR=premake5/build/gmake2.unix -# BSD and OS X need different Makefiles -case "$OS" in - "GNU/kFreeBSD") - # use default gmake2.unix (needs -ldl as we have a GNU userland and libc) - ;; - *"BSD") - PREMAKE_BUILD_DIR=premake5/build/gmake2.bsd - ;; - "Darwin") - PREMAKE_BUILD_DIR=premake5/build/gmake2.macosx - ;; -esac -${MAKE} -C "${PREMAKE_BUILD_DIR}" "${JOBS}" CFLAGS="$CFLAGS" config=release - -echo "${LIB_VERSION}" >.already-built diff --git a/build/premake/premake5/BUILD.txt b/build/premake/premake5/BUILD.txt deleted file mode 100644 index 9e6c1a783c..0000000000 --- a/build/premake/premake5/BUILD.txt +++ /dev/null @@ -1,101 +0,0 @@ -PREMAKE BUILD INSTRUCTIONS - - Premake is written in a mix of C and Lua. A small host executable, - written in C, launches the app and prepares the environment, at which - point control is handed off to a Lua script. Almost all of Premake is - written in Lua scripts, which allow it to be easily extended and - customized. The catch is that it is slightly more complicated to build - it than your typical C/C++ application. - - If you find all of this very confusing and need some help, visit the - Premake website for help and community links. We will be glad to help! - - -BUILDING FROM A SOURCE PACKAGE - - If you downloaded a source code package (as opposed to pulling the sources - directory from the repository) you will find project files for all of the - officially supported toolsets in the build/ folder. Build the release - configuration and you will be ready to go. For makefiles: - - $ cd build/gmake2.unix - $ make config=release - - The binaries will be placed in the ./bin/release directory. - - -BUILDING FROM THE REPOSITORY - - If you have pulled sources from the Premake source repository, you can - use `Bootstrap.mak` to generate your first premake executable: - - $ make -f Bootstrap.mak PLATFORM - - Where PLATFORM can be osx or linux. - On Windows with Visual Studio use nmake: - - $ nmake -f Bootstrap.mak windows - - Or on Windows with MinGW use mingw32-make: - - $ CC=mingw32-gcc mingw32-make -f Bootstrap.mak mingw - - If your toolset is not supported by the bootstrap Makefile, you will need - to embed the scripts into a C source file so they may be built into the - executable, and also generate the project files for your chosen toolset. In - order do either of these things, you will need a working Premake executable. - - The easiest way to get an executable is to download one of the prebuilt - binaries from the project website. If that isn't possible, or if not binary - is provided for your platform, you can build from a source package as - described above, as they also include pre-generated project files. - - Once you have a working Premake available, you can generate the project - files for your toolset by running a command like the following in the - top-level Premake directory: - - $ premake5 gmake2 # for makefiles - $ premake5 vs2012 # for a Visual Studio 2012 solution - $ premake --help # to see a list of supported toolsets - - If this is the first time you have built Premake, or if you have made - changes to the Lua scripts, you should prepare them to be embedded into the - Premake executable. - - $ premake5 embed - - This creates a C file (at src/host/scripts.c) which contains all of the - Lua scripts as static string buffers. These then get compiled into the - executable, which is how we get away with shipping a single file instead - of a whole bunch of scripts. - - You should now have a solution/makefile/workspace in the top-level folder, - which you can go ahead and build. - - -RUNNING THE TESTS - - Once you have built an executable, you can verify it by running Premake's - unit test suites. From the top-level Premake folder, run: - - $ bin/release/premake5 test - - -RUNTIME SCRIPT LOADING - - If you are modifying or extending Premake, you can skip the embedding - and compilation steps and run the scripts directly from the disk. This - removes the build from the change-build-test cycle and really speeds up - development. - - If you are running Premake from the top of its own source tree (where its - premake5.lua is located) you will get this behavior automatically. If you - are running Premake from some other location, use the --scripts option to - provide the path to that top-level folder: - - $ bin/release/premake5 --scripts=../path/to/premake test - - If you find yourself doing this repeatedly, or if you want Premake to be - able to find other, custom scripts, you can also set a search path with the - PREMAKE_PATH environment variable. Set it just like you would set your - system PATH variable. diff --git a/build/premake/premake5/CHANGES.txt b/build/premake/premake5/CHANGES.txt deleted file mode 100644 index 1f16f4aede..0000000000 --- a/build/premake/premake5/CHANGES.txt +++ /dev/null @@ -1,555 +0,0 @@ --------------------- - 5.0 (in progress) --------------------- - -See https://github.com/premake/premake-core/wiki/What's-New-in-5.0 -for the complete list of changes from the Premake 4.x series. - -Since 5.0-alpha14: - -* PR #1086 Added support for Objective-C and Objective-C++ in xcode and gmake2nil (@LORgames) -* PR #1192 Update path.lua (@dsvi) -* PR #1229 Generated makefiles no longer error when a configuration can be missing (@LORgames) -* PR #1275 Fixed various issues with escaping in CodeLite generator (@LORgames) -* PR #1280 Bootstrap.bat: Default to latest Visual Studio available (@tdesveauxPKFX) -* PR #1281 Source package improvements (@tdesveauxPKFX) -* PR #1282 Fix VS2019 solution icons (@ifarbod) -* PR #1285 Use correct values for MinimumVisualStudioVersion in Android projects (@ifarbod) -* PR #1289 Haiku fixes (@mmuman) -* PR #1296 Fix source packaging (@tdesveauxPKFX) -* PR #1298 Update D module to VS2019 and latest D compiler options. (@TurkeyMan) -* PR #1305 Reconcile logic within os_matchisfile() (@cfs-pure) -* PR #1313 Activating Open Collective (@opencollective) -* PR #1316 Add FUNDING.yml for GitHub Sponsors (@starkos) -* PR #1318 Updated mismatched android config to the value in the allowed stl table (@LORgames) -* PR #1323 Update copyright year in support files (@starkos) -* PR #1324 Add a CONTRIBUTING.md (@starkos) -* PR #1325 Improve the README (@starkos) -* PR #1326 Update issue templates (@premake) -* PR #1327 Add a pull request template (@premake) -* PR #1332 Account for filename collisions on systems with case-insensitive file… (@ratzlaff) -* PR #1333 Cleanup related to #1332 (@ratzlaff) -* PR #1334 Implement 'compileas' for vc2008 (@ratzlaff) -* PR #1337 On OSX, convert systemversion to MACOSX_DEPLOYMENT_TARGET (@baconpaul) -* PR #1340 Upgrade Lua from 5.3.4 to 5.3.5 (@jp31415926) -* PR #1341 Add new issue template "Get help" (@premake) -* PR #1342 Improve bug reporting template (@premake) -* PR #1343 Improve feature request template (@premake) -* PR #1345 New 'listWindowsRegistry' OS API method for enumerating content of single registry subkey (@kaldap) -* PR #1351 Added support for vcxitems project generation for VS2013+ (@LORgames) -* PR #1352 Improved test runner usage (@LORgames) -* PR #1353 Fix premake4.lua bootstrap build script (@fountainment) -* PR #1355 Add shaderincludedirs to fxcompile configuration (@starkos) -* PR #1356 Allow wildcards in xcodebuildresources (@starkos) -* PR #1357 Replace debuggerflavor with debugger (take #2) (@starkos) -* PR #1358 Added support for Dx11.3 shader model (@zlnimda) -* PR #1359 Add assemblyDebug for vs2017 (@tbasnoopy) -* PR #1360 Fix the return value of some os functions (@sp-jordi-vilalta) -* PR #1361 Simplified unit test to resolve path issues (@LORgames) -* PR #1362 Fixed inconsistencies in Android VS project test (@LORgames) -* PR #1365 E2K: fixed build by MCST lcc compiler (@r-a-sattarov) -* PR #1385 Fix pull request template (@tempura-sukiyaki) -* PR #1386 Initial support for generating netcore and netstandard projects (@ClxS) -* PR #1395 Fixed edge case in path.normalize (@LORgames) -* PR #1396 Fixed bug with linkgroups only working on Premake projects (@LORgames) -* PR #1401 Remove commands optimization which breaks tokens (@starkos) -* PR #1402 Remove checkFunc from Resource files (@yuyoyuppe) -* PR #1403 Add build steps to Visual Studio (@redorav) -* PR #1404 Place all generated files in separate GENERATED list, so they all can… (@Mikhael-Danilov) -* PR #1406 Change deferred join delimiter to non-printable character (@starkos) -* PR #1415 Add .c++ extension support to a few spots it was missing (@englercj) -* PR #1419 Fix #1411: Remove "|" from Codelite config names (@starkos) -* PR #1420 Fix MinGW builds of Premake (@premake) -* PR #1421 Enable enablewarnings() for MSC (@starkos) -* PR #1422 Added GitHub Actions (@LORgames) -* PR #1424 Fix systemversion("latest") on VS2017 (@starkos) -* PR #1427 Fix up and improve the release docs and script (@premake) - -Since 5.0-alpha13: - -* PR #1067 Add 'Default', 'Dwarf' and 'SplitDwarf' arguments to 'debugformat' (@ratzlaff) -* PR #1160 use ';' as default separator for vs (@WorldofBay) -* PR #1177 Enable property categories in VS projects (@WorldofBay) -* PR #1178 Avoid impl dependent multi-char constants (@cengizIO) -* PR #1179 fix `xcodebuildsettings` using false (@tempura-sukiyaki) -* PR #1180 Add `os.ios` option in xcode4 (@tempura-sukiyaki) -* PR #1181 Release 5.0 alpha13 (@premake) -* PR #1189 Host path.normalize: Fix normalization for paths containing tokens (@tdesveauxPKFX) -* PR #1191 Fix objname collisions (@ratzlaff) -* PR #1193 Add tests for xcode id generator (@ratzlaff) -* PR #1194 Move rule property string expansion into modules (@WorldofBay) -* PR #1197 Added missing elements in Visual Studio Makefile projects (@LORgames) -* PR #1202 Support %{file.name} token in VS (@Blizzard) -* PR #1203 Add support for JavaCompile in vsandroid (@tempura-sukiyaki) -* PR #1206 Updated code lite to properly add LD_LIBRARY_PATH is set if libdirs is set (@pintodragon) -* PR #1218 Add support & tests for XCTest sharedlibtype (@Dingobloo) -* PR #1220 Implement the androidapilevel() API in Android packaging projects (@ifarbod) -* PR #1221 add nil check to fileconfig.hasFileSetting (gmake) (@WorldofBay) -* PR #1224 add missing local (@WorldofBay) -* PR #1228 Added Win64 as a recognized platform (@LORgames) -* PR #1230 Removed excessive escaping in CodeLite generator (@LORgames) -* PR #1231 Fixed issue with per-configuration build commands not returning errors correctly (@LORgames) -* PR #1236 Added support for Dx12 shader models (@CosmicRey) -* PR #1239 Implemented the startproject option for xcode (@macsforme) -* PR #1240 allow linking of mixed c++ assemblies (@WorldofBay) -* PR #1244 Fixed issue with detoken not handling deferred joins correctly (@LORgames) -* PR #1247 Added support for `csversion` API to dotnet toolset. (@tritao) -* PR #1248 Default to Roslyn-based `csc` compiler on all platforms. (@tritao) -* PR #1249 do not clear _isIncludingExternal in nested calls (@WorldofBay) -* PR #1253 Xcode newid determinism (@ratzlaff) -* PR #1258 Added support for Visual Studio 2019 solutions (@CosmicRey) -* PR #1264 Android changes, stage 1 (#1263) (@ifarbod) -* PR #1266 Implement the 'visibility' API for Android projects (@ifarbod) -* PR #1267 Provide access to json implementation (@ratzlaff) -* PR #1276 Added support for forceincludes in CodeLite (@LORgames) -* PR #1278 Packaging script improvement (@tdesveauxPKFX) - -Since 5.0-alpha12: - -* PR #880 Allow tokens to start with a ! to disable making paths relative. (@Blizzard) -* PR #882 Allow filtering on host. (@Blizzard) -* PR #883 Added basic iOS support to XCode4 (@LORgames) -* PR #889 Fix context.mergeFilters (@tdesveaux) -* PR #897 Fix c(pp)dialect generating uppercase C(++)xx for Xcode, replace gnu99 with compiler-default (@hsandt) -* PR #902 VS fix for projects with multiple manifest files (@Blizzard) -* PR #913 Fix subtle bug in table.translate (@Blizzard) -* PR #919 Add perfile flags test for gmake backend. (@Blizzard) -* PR #920 small fix in self-test module. (@Blizzard) -* PR #921 Compiler warnings (@Blizzard) -* PR #922 gmake2 bug fix. When generating gmake file with pch headers (@Blizzard) -* PR #923 Add Visual Studio ARM64 support. (@Blizzard) -* PR #926 Fixes translateCommandsAndPaths, and debugargs. (@Blizzard) -* PR #927 bug fix for recursive token expansion (@Blizzard) -* PR #928 sometimes due to ordering of test, we're in a rule scope. (@Blizzard) -* PR #931 Added synchronous and C-Throw to VS projects. (@CreativeAssembly) -* PR #932 Added extra information for Windows platform when copyfile fails. (@pjohalloran) -* PR #938 Added `staticruntime` API. (#163) (@premake) -* PR #939 Resolve the rule properties for gmake (#162) (@premake) -* PR #941 Fix makefile PCH tab problem (@premake) -* PR #944 C++0x dialect support (@premake) -* PR #945 Natvis files have an item group. (@premake) -* PR #948 Fixed a bug in gmake2 with clang and pch. (@Gereld) -* PR #949 Added DPI awareness support to VS2010+ projects (@LORgames) -* PR #950 Added defaultplatform support to gmake and gmake2 actions (@LORgames) -* PR #952 Add support for `targetextension` in xcode4 (@tempura-sukiyaki) -* PR #957 fix gmake2 utility (@Blizzard) -* PR #958 fix context.addFilter (@Blizzard) -* PR #959 Multiple gmake2 fixes (@Blizzard) -* PR #960 Improve determinism in sln output. (@Blizzard) -* PR #961 add 64-bit support on windows (@Blizzard) -* PR #962 fix table.insertkeyed (@Blizzard) -* PR #964 Add support for wildcards in mapconfig. (@Blizzard) -* PR #965 Move part of the workspace baking up (@premake) -* PR #966 utility projects also allow configuration of the executable path. (@Blizzard) -* PR #967 return generated fileconfig. (@Blizzard) -* PR #969 Fix buildoutput pathvars (@Blizzard) -* PR #970 Table fix indexof (@Blizzard) -* PR #979 Define _HAS_EXCEPTIONS=0 from vs2010 for exceptionhandling off (@tdesveauxPKFX) -* PR #980 src/base and modules: change links to industriousone.com to working HTTPS github links (@catb0t) -* PR #988 Fixed a bug with normalizing paths that contain dot folders (@LORgames) -* PR #990 Extended Instructions sets (@tdesveauxPKFX) -* PR #993 Fix /usr/lib64 being used as search dir before project's libdir (@alexandre-janniaux) -* PR #994 added a 'latest' systemversion for vs2017 (@dcourtois) -* PR #1005 Fix gmake dependencies (@premake) -* PR #1011 Fixes an issue with custom rules tracking files. (@Dandielo) -* PR #1018 Added release info badges to the readme (@LORgames) -* PR #1019 Remove git submodule commands (@Passw) -* PR #1020 Embed luasocket, add mobdebug and --debugger command line option (@redorav) -* PR #1021 Clear additional global state between unit test runs (@starkos) -* PR #1023 Include library directories in Codelite projects (@Gaztin) -* PR #1029 Replace last global state block in api.reset (@starkos) -* PR #1030 Fix vstudio symbolspath (@tdesveauxPKFX) -* PR #1031 Fix gmake2 Makefile projects callArray (@tdesveauxPKFX) -* PR #1033 vstudio staticlib symbolspath (@tdesveauxPKFX) -* PR #1034 Add 'modules/android/' from premake-android (@LORgames) -* PR #1037 HLSL Shader compilation in Visual Studio (@tdesveauxPKFX) -* PR #1040 Get 'compileas' working when using a 'filter "files: ..."' scope. (@ratzlaff) -* PR #1041 Fleshed out CI builds (@LORgames) -* PR #1042 Add UnsignedChar API (@tdesveauxPKFX) -* PR #1043 Add omitframepointer API (@tdesveauxPKFX) -* PR #1044 Add Visibility API for gcc/clang toolsets (@tdesveauxPKFX) -* PR #1045 Add debuggerflavor API (@tdesveauxPKFX) -* PR #1046 Add structmemberalign API (@tdesveauxPKFX) -* PR #1048 Add conditional behavior to global variables, add systemversion as first implementation (@redorav) -* PR #1049 Add InlinesVisibility API (@tdesveauxPKFX) -* PR #1053 Fixed issue with floatingpoint "Strict" causing errors in XCode (@LORgames) -* PR #1062 Allow system("android") per configuration (@redorav) -* PR #1064 Tiny gcc fix from PR #506. (@tvandijck) -* PR #1065 Fixes a few luasocket compile warnings. (@tvandijck) -* PR #1066 fix a few compiler warnings. (@tvandijck) -* PR #1068 Fix constructing executable path from argv[0] (@lanurmi) -* PR #1069 Support successfully bootstrapping on Solaris (OpenIndiana). (@lanurmi) -* PR #1070 Support successfully bootstrapping on OpenBSD. (@lanurmi) -* PR #1075 Fixed bug with alias tests that caused one to three extra tests to be run (@LORgames) -* PR #1077 Do not output colors e.g. into a pipe, unless forced. (@lanurmi) -* PR #1078 Added GoogleTest style output for unit tests (@LORgames) -* PR #1080 Fix curl compilation on Debian PowerPC. (@lanurmi) -* PR #1081 cache results of shouldUseColors() (@tvandijck) -* PR #1084 Fix httpbin useragent response format. (@SchmidtD) -* PR #1087 Fix missing DebugInformationFormat when symbols are set to full (@rorydriscoll) -* PR #1089 Import paths weren't translated properly (@TurkeyMan) -* PR #1092 CodeLite workspace folders (groups) (@Gaztin) -* PR #1093 Implemented 'debugenvs' for CodeLite (@Gaztin) -* PR #1096 gmake2: Fix dependency for pch (@tdesveauxPKFX) -* PR #1098 Prevent D module from adding D block in unrelated projects (@tdesveauxPKFX) -* PR #1100 gmake2: Remove pch from FORCE_INCLUDE to allow NoPCH per-file (@tdesveauxPKFX) -* PR #1103 gmake*: fix shell type identification (@tdesveauxPKFX) -* PR #1104 Xcode Fixes (@erincatto) -* PR #1105 gmake: Add rules and dependencies for directory creation (@tdesveauxPKFX) -* PR #1107 Only set WindowsSDKDesktopARMSupport for windows systems (#172) (@Blizzard) -* PR #1108 Fix gmake2 (@Blizzard) -* PR #1113 Support buildaction for C++ projects (@Blizzard) -* PR #1115 Remove Xbox 360 code from core to move and expand onto a standalone module (@redorav) -* PR #1117 Fix Xcode autocompletion with excluded files (@sp-jordi-vilalta) -* PR #1118 gmake2: fix cpp perfileflags (@tdesveauxPKFX) -* PR #1125 Swap order of applying project specific config (@Blizzard) -* PR #1126 vpath android.link fix (@Blizzard) -* PR #1132 Refactor path.normalize and handle path ending with . (@tdesveauxPKFX) -* PR #1136 Support server paths (@Gaztin) -* PR #1137 Fix gmake multiple-output rule issue. (@Blizzard) -* PR #1142 Support for CSDialect (@Blizzard) -* PR #1143 Fix `targetextension` in xcode4 (@tempura-sukiyaki) -* PR #1144 Add `sharedlibtype` in xcode4 (@tempura-sukiyaki) -* PR #1145 Add support `kind:Utility` in xcode4 (@tempura-sukiyaki) -* PR #1161 Add `xcodesystemcapabilities` in xcode4 (@tempura-sukiyaki) -* PR #1164 ! fixed pepper fish to work with lua 5.3.4 (@neo2buha) -* PR #1167 Add support for per-file custom build commands in xcode4 (@tempura-sukiyaki) -* PR #1176 path.normalize: Fix when call with path surrounded with quotes (@tdesveauxPKFX) - -Since 5.0-alpha11: - -* PR #617 fix switch/separator in rules_xml (@Blizzard) -* PR #639 Add MSBuild target to Bootstrap.mak (@nta) -* PR #644 Don't treat "dependson" libraries as "links" libraries in Xcode (@macsforme) -* PR #659 Add C11 flag support for GCC (@resetnow) -* PR #668 Fix sporadic failures when using make -j# (@UmbraSoftware) -* PR #672 Fix issue with msc.getlinks and vstudio.getLinks returning different results when 'explicit' is true. (@Blizzard) -* PR #673 Add additional tokens to fileconfig and vs2010+. (@Blizzard) -* PR #675 update semver.lua (@Blizzard) -* PR #678 Escape string literals passed to defines() for Xcode (@macsforme) -* PR #679 Better detect debug build (@TurkeyMan) -* PR #685 Detect native source files. (@TurkeyMan) -* PR #686 Refactor language flags to go through the language API. (@Blizzard) -* PR #687 Windows Registry (@tvandijck) -* PR #690 make buffered_io available for c code too. (@Blizzard) -* PR #707 Fix missing CA certs on Windows (@Jusonex) -* PR #718 Adding support for NotSet characterset in VS2010+ (#79) (@Blizzard) -* PR #721 Fix CodeLite linking issues (@Blizzard) -* PR #728 Add support of UTF-8 for Windows (@DrLynix) -* PR #732 Fix VS2013 and older always rebuilding when debug symbols explicitly … (@jstewart) -* PR #733 Generated project files are now correctly located beside script (@LORgames) -* PR #734 NuGet fixes (@aleksijuvani) -* PR #735 Fixed issue with Clang not actually supporting floatingpoint 'strict' (@LORgames) -* PR #736 Fixed issue where VS2010+ projects didn't support floatingpoint 'Default' (@LORgames) -* PR #737 Add string.escapepattern function (@aleksijuvani) -* PR #738 Update curl to 7.53.1 (@aleksijuvani) -* PR #739 Refactor _OS, os.get() & os.is() (@Blizzard) -* PR #740 Properly deprecate WinMain flag (@LORgames) -* PR #742 Added BSD support (@LORgames) -* PR #743 Clean up the deprecated APIs (@industriousone) -* PR #745 Fixed issue with using startproject API in CodeLite (@LORgames) -* PR #746 Fixed erroneous escape usages in VS2010+ (@LORgames) -* PR #747 Bootstrap makefile now cleans up previous builds before building (@LORgames) -* PR #748 os.translateCommands now supports multiple tokens (@LORgames) -* PR #749 Updated packaging script (@LORgames) -* PR #751 CompileAs element handles C++ now (@LORgames) -* PR #752 Fixed various issues with compiling with VS2012 (@LORgames) -* PR #753 Added proxy URL to http options (@LORgames) -* PR #754 Fixed issue with the OBJDIR value not being escaped (@LORgames) -* PR #755 Add 'supports_language' callback to action (@Blizzard) -* PR #756 Fix a call to deprecated os.get() (@Blizzard) -* PR #757 Increased consistency of p. usage (@LORgames) -* PR #758 Cleaned up inconsistencies in whitespace (@LORgames) -* PR #760 Adding ARM support for Visual Studio. (@Blizzard) -* PR #761 Removed echo off in VS rules prop generator (@LORgames) -* PR #763 [core] Print warnings in purple (@Blizzard) -* PR #764 [core] get file/line information on deprecated API's. (@Blizzard) -* PR #768 [core] Fix Visual Studio ExecutablePath settings. (@Blizzard) -* PR #769 [core] new cmd path decorations with %[] syntax (@Blizzard) -* PR #771 [core] Use 'compileAs' API (@Blizzard) -* PR #772 [core] Don't set default entrypoint, rely on visual studio default. (@Blizzard) -* PR #774 Assure a default toolset is always set. (@Blizzard) -* PR #776 [core] Use 'cdialect' and 'cppdialect' instead of 'language'. (@Blizzard) -* PR #778 Added support at the file level for the NoPCH flag in VS200x projects (@LORgames) -* PR #779 add os.findheader() (@noresources) -* PR #781 Allow filters to be written as tables: (@Blizzard) -* PR #785 Unicode file functions for Windows (@DrLynix) -* PR #786 Fix typo in embed.lua (@DrLynix) -* PR #787 os.comparefiles function (@DrLynix) -* PR #788 Provide a way to 'tag' systems, and filter on those tags. (@Blizzard) -* PR #789 Add 'tags' filter api. (@Blizzard) -* PR #790 [self-test] fix nil dereference crash in test.isequal (@Blizzard) -* PR #798 create object directory before generating precompiled header (@noresources) -* PR #801 Groups in XCode workspace working. (@ricka) -* PR #802 Suppress mkdir warning on Windows if the folder already exists (@aleksijuvani) -* PR #803 Gmake2 module (@Blizzard) -* PR #804 Update to Lua 5.3.4 (@Blizzard) -* PR #805 Add --insecure option for SSL curl requests. (@Blizzard) -* PR #806 Add premake.isSemVer function (@Blizzard) -* PR #807 Added visual studio support for dot net .tt files (@Blizzard) -* PR #808 Added per file rtti generation for Visual Studio (@Blizzard) -* PR #809 Added os touchfile and a workaround for vs2010 reloading (@Blizzard) -* PR #810 Added masm handling of seh exception handling for VS2010 and above (@Blizzard) -* PR #811 Add 'preferredtoolarchitecture' API (@Blizzard) -* PR #812 Add support for cppdialect in VS2015 & VS2017 actions. (@Blizzard) -* PR #813 Add json.encode_pretty wrapper. (@Blizzard) -* PR #814 Add premake.info message function. (@Blizzard) -* PR #815 Errors in red. (@Blizzard) -* PR #816 Fixed C++17 flag to work with current versions of Clang. (@Blizzard) -* PR #817 A few gmake2 fixes due to it moving into a module. (@premake) -* PR #818 Make module of 'gmake' action. (@Blizzard) -* PR #821 Attempt at colors on linux (@Blizzard) -* PR #822 Move VStudio action into a module. (@Blizzard) -* PR #824 Set default toolsets for vs2005 and vs2008. (@Blizzard) -* PR #825 Use workspace everywhere (@Blizzard) -* PR #826 Escape '&' -> '&' (@Mikhael) -* PR #827 Added option to create bundle and frameworks on macOS. (@Blizzard) -* PR #828 Normalize path in 'getfileinfo' for local host. (@Blizzard) -* PR #829 Reduced vs2010+ file sizes by removing redundant config settings (@Blizzard) -* PR #830 Resource generator access (@Blizzard) -* PR #831 Fix in oven, for options that are not strings. (@Blizzard) -* PR #832 Fix a few compiler warnings (@Blizzard) -* PR #833 Fix empty rules. (@Blizzard) -* PR #834 Allow modules to register C code too. (@Blizzard) -* PR #836 Hook setTextColor in tests, so on linux/mac we don't get random color… (@Blizzard) -* PR #837 Removed "installer" kinds from vs2017. (@premake) -* PR #838 Fix bug in 'action.isConfigurable' not checking for onWorkspace. (@Blizzard) -* PR #839 Expand {...} macros in pre|post build commands for codelite (@Mikhael) -* PR #840 Proof of concept for binary modules. (@tvandijck) -* PR #842 Add bsd to the output of possible platforms (@ejb1123) -* PR #843 fix bug in testing framework leaving tests in random working folders. (@tvandijck) -* PR #844 fix unreferenced argument warning. (@tvandijck) -* PR #849 Write out build log element for VS utility projects (@mendsley) -* PR #851 Fix handling of unconventional NuGet .NET Framework folders (@aleksijuvani) -* PR #854 [core] Add High as a new warning level (@Blizzard) -* PR #855 Add filter for files (#135) (@Blizzard) -* PR #856 Fix path_getrelative for Windows (@Blizzard) -* PR #857 Fix action override targetos (@Blizzard) -* PR #858 Fix Nuget package handling to support Unix-style paths (@tritao) -* PR #859 Use NuGet package cache instead of the API if possible (@aleksijuvani) -* PR #860 fix for build failure on macOS in debug. (@Blizzard) -* PR #861 Allow embedding of binary resources. (@Blizzard) -* PR #862 small optimization in oven. (@Blizzard) -* PR #863 fix for duplicate 'allowed'. (@Blizzard) -* PR #864 move tags into globally accessible table, so we don't have to overload… (@Blizzard) -* PR #865 Remove "test.print" calls. (@Blizzard) -* PR #866 fix os.istarget and os.ishost to use the systemTags table as well. (@Blizzard) -* PR #867 Fix path translate (@Blizzard) -* PR #868 Filters always have to use \ regardless of target platform. (@Blizzard) -* PR #870 Fix prj.system bug in oven. (@Blizzard) -* PR #872 Rework binmodule example to silence unit test console output (@starkos) -* PR #874 Disable failing `os.findheader()` unit test on macOS (@starkos) - - -Since 5.0-alpha10: - -* PR 523 New API symbols() replaces and extends "Symbols" flag -* PR 524 New API symbolspath() specifies location of symbol database -* PR 556 Add initialization hook for actions -* PR 553 Enable "list of paths" for rule properties -* PR 555 Allow multiple extensions for custom rules -* PR 561 Add IA32 to vectorextensions() -* PR 568 New API runpathdirs() adds rpath support -* PR 525 Add support for Visual Studio Debug Fast Link setting -* PR 401 Enable GCC link mode with ":static", ":shared" -* PR 543 Remove architecture specific include paths on macOS -* PR 554 Improve token expansion in rules -* PR 570 Normalize paths to os.execute() -* PR 546 Switch from openssl to mbedtls -* PR 545 compilebuildoutputs() adds generated files to build -* PR 575 New "raw" exporter -* PR 581 Fix path.normalize() handling of ".." sequences -* PR 587 Fix os.copyfile() handling of paths with spaces -* PR 597 Enable edit-and-continue for VS 2015 64-bit builds -* PR 583 Allow duplicate build commands -* PR 605 Fix for objdir() forced path operator "!" -* PR 603 Allow toolset-specific arguments to static linker -* PR 608 Allow Visual Studio StaticLib projects to link dependencies -* PR 610 Add defines and include paths to makefile projects -* PR 611 Prevent force includes from breaking precompiled headers -* PR 613 Fix os.match() detection of dot files -* PR 607 Remove support for deprecated MonoDevelop project formats -* PR 600 Fix VS support for symbolpath() -* PR 521 Make Clang default toolset for macOS -* PR 624 GCC support for C90 and C99 -* PR 628 New API linkbuildoutputs() disables automatic linking of *.obj files -* PR 635 Improved parallelization of Makefile builds -* PR 619 Per-file configuration support for C# projects -* PR 649 Fix Visual Studio 2015 solution version identifier -* PR 645 Add initial Visual Studio 2017 support - -Since 5.0-alpha9: - -* New: `symbols()`, replaces and extends flags {"Symbols"} -* New: `symbolspath()` to specify location of symbol database -* New: `table.shallowcopy()` -* New: `vectorextensions` value "IA32" -* Fix: --start-group/--end-group now only enclose project libraries - -Since 5.0-alpha8: - -* New: `buildcustomizations()` imports custom .props files for VS -* New: `frameworksdir()` for Xcode and Make OS X projects -* New: `nuget()` to specify NuGet packages for VS projects -* New: `systemversion()` to specify VS target platform -* New: `io.readfile()` and `io.writefile()` -* New: Configurations may now be filtered by toolset -* New: HTTP calls now support authentication -* New: Support for XSD files in VS C# projects -* New: MASM file categorization for VS -* New: Integrated test framework for Premake module developers -* Fix: VS filter ordering is now deterministic -* Fix: VS projects and groups may now have the same name -* Fix: May now use '.' within shell variable tokens -* Fix: path.translate() now defaults to target system separator -* Fix: getextension() now handles multiple dots -* Fix: replaceextension() no longer adds leading dot -* Fix: Improved configuration baking performance -* Fix: Use -O0 for Clang debug optimization level -* Fix: CodeLite now uses portable path separators -* Fix: Improved ability to find precompiled headers in Makefiles -* Fix: Properly escape defines in Makefile projects -* Fix: Correct casing of UTF8 marker on Visual Studio rule files - -Since 5.0-alpha7: - -* New API: characterset() -* New API: editorintegration() -* New API: largeaddressaware() -* New: Visual Studio projects now default to Unicode -* New: Utility and Makefile project support for GMake exporter -* New: Updated Curl to 7.45.0 -* Fix: Absolute path handling and error reporting in tokens -* Fix: Limit use of TargetMachine to static resource library projects -* Fix: Embed minified scripts by default, rather than bytecode -* Fix: os.isfile() now detects Windows symbolic links -* Fix: Correct handling of DOS environment variables in paths -* Fix: Buffer overflow in buffered writes of large strings -* Fix: Improved handling of absolute vs. relative path tokens -* Fix: --cc command line option works again (stream009) -* Fix: Use relative paths for PCH in Makefiles (stream009) - -Since 5.0-alpha6: - -* New API: additionalusingdirectories() -* New API: largeaddressaware() -* New: Embed bytecode to enable better debugging information -* New: Display elapsed time at completion -* New: Utility project support for Makefiles -* New: Enabled SSL support in HTTP functions -* Fix: Reduce memory usage during baking -* Fix: Improve performance of wildcard processing -* Fix: Preserve environment in recursive token expansion -* Fix: Added missing defines in bootstrap script -* Fix: Remove /usr/lib64 directories from Mac builds -* Fix: Added newline after UTF-8 marker in Visual Studio projects -* Fix: Duplicate escaping on include directories in Makefiles -* Fix: os.isdir() now works with Windows symbolic links -* Fix: Use correct path separators in C# response files - -Since 5.0-alpha5: - -* New API: ignoredefaultlibraries() -* New: Support LLVM platform toolset in Visual Studio -* New: Add framework folder path support -* Fix: Improved path.normalize() handling of DOS drive letters (StiX) -* Fix: os.match...() now supports more complex patterns -* Fix: Only generate project files if changed -* Fix: Improve handling of user platform names in Visual Studio -* Fix: Duplicate ".lib" extensions in Visual Studio -* Fix: Improve handling of mixed case command line options -* Fix: Remove `/E` option from Windows copy operations -* Fix: Multiple externalproject() calls to same project -* Fix: Improved determinism of generated project elements -* Fix: Set platform toolset for emtpty Visual Studio projects -* Fix: Better ".." handling for path.join() - -Since 5.0-alpha4: - -* New: Rename solution() to workspace() -* New API: customtoolnamespace() (tbasnoopy) -* New API: debuggertype() (tbasnoopy) -* New API: entrypoint() (Blizzard) -* New API: exceptionhandling() and rtti() (Blizzard) -* New API: http.get() and http.download() (Blizzard) -* New API: inlining() (Blizzard) -* New API: zip.extract() (Blizzard) -* New: `require()` now accepts optional version ranges -* New: Preloaded modules now return a "should load" test function -* New: Added support for IDL files in VC 2010+ (rhuvendiek) -* New: Added `file.directory` to token environment (Gabi Davar) -* New: Solution configurations are now fully baked (Blizzard) -* New: Enabled per-file configuration queries (Blizzard) -* New: Added more table functions (Blizzard) -* New: Added more values for floatingpoint() -* Fix: Enabled link-time optimization for Clang and GCC -* Fix: Module loader now reports script errors correctly (Tim Wharton) -* Fix: Wrap makefile targets in quotes (leeonix) -* Fix: Provide better default target directories (Blizzard) -* Fix: Escape backslashes in tokens (Damien Courtois) -* Fix: No longer generates containers marked as external -* Fix: Re-enable validation of supported action features (Blizzard) -* Fix: Match Visual C PDB output to target path (leeonix) -* Fix: Remove "." and ".." when joining paths (multiple contributors) -* Fix: Remove trailing newlines from os.outputof() (Tim Wharton) -* Fix: Improve token handling (multiple contributors) - -Since 5.0-alpha2: - -* New: CodeLite support -* New: D language support -* New: MonoDevelop support -* New API: buildlog() -* New API: callingconvention() (Tim Wharton) -* New API: os.writefile_ifnotequal() -* New API: sysincludedirs() -* New API: syslibdirs() -* New: toolset() can now specify a version number -* New: Default values and categories for command line options -* New: Add bootstrapping script for Git repository (Tim Wharton) -* Fix: Modules are now loaded correctly in all situations (Damien Courtois) -* Fix: Make Visual Studio debug commands absolute (amc522) -* Fix: Allow tokens in vpaths() -* Fix: Silence xcopy output from {COPY} command token (StiX) -* Fix: Remove ".." sequences in path.join() -* Fix: Allow CC and CXX overrides from command line (Tim Wharton) -* Fix: Enable solution level filtering on system values -* Fix: Make configuration flag mapping order deterministic -* Fix: Map "Win32" to x86 architecture for Visual Studio -* Fix: Correct formatting for Visual Studio rule paths -* Fix: Make project APIs consistently lowercase -* Fix: Disable SSE/SSE2 flags for Visual Studio 64-bit builds -* Fix: io.open() now creates directory append ("a") mode - -Since 5.0-alpha1: - -* Many new debugger APIs -* New API: endian() -* New API: fpu() -* New API: gccprefix() -* New API: pic() -* New API: runtime() (Tom van Dijck) -* New API: undefines() -* New API: disablewarnings(), enablewarnings(), fatalwarnings() -* Added Visual Studio 2015 support (Tom van Dijck) -* filter() now accepts field value aliases in the conditions -* Fixed _ACTION and _OPTIONS filter prefixes -* Main application logic can now be extended by modules -* Action arguments (_ARGS) are now keyed by both index and value -* Configuration baking and validation now skipped for execute only actions -* os.findlib() now accepts paths to search as argument -* Visual Studio .user files are now only generated if not empty -* Xcode4 exporter is now available -* Modules may now be loaded on demand where feasible -* os.outputof() now returns command exit code as second value -* Added AVX2 to vectorextensions() -* Checks to prevent self-linking (Mark Chandler) -* Added path.replaceextension() (M Skibbe) -* Made clean functions overridable -* Migrated x32/x64 to x86/x86_64 -* Added new debugger selection APIs -* Fixed handling of ../ sequences in path.normalize() (Tom van Dijck) -* Added table.tostring() (Tom van Dijck) -* Added .editorconfig file -* Added string.sha1() (Tom van Dijck) -* Added verbosef() and --verbose flag (Tom van Dijck) diff --git a/build/premake/premake5/CONTRIBUTORS.txt b/build/premake/premake5/CONTRIBUTORS.txt deleted file mode 100644 index 44972fa465..0000000000 --- a/build/premake/premake5/CONTRIBUTORS.txt +++ /dev/null @@ -1,75 +0,0 @@ -As the number of Premake contributors has grown, this list has become more -difficult to manage in a meaningful way. I'm leaving it here as part of the -historical records. If you find yourself in need of a list of contributors, -consider running: - - git shortlog -sn - --------------------------------------------------------------------------- - -This file contains a list of people who've made non-trivial contributions -to Premake 5. People who commit code to the project are encouraged to -add their names here. And many thanks to those who contributed fixes and -improvements to earlier versions of Premake (feel free to add your name -in here too)! - -Original design and implementation: - Jason Perkins - -Main Contributors - Blizzard Entertainment (contact tvandijck@blizzard.com) - Manu Evans - Sam Surtees - -Builds and Infrastructure: - Mihai Sebea - * Nightly binary packages - * Nightly Jenkins builds and error reports - -Patch contributors: - Bastien Brunnenstein - * support wildcards in path tokens - Damien Courtois - * module loading fixes - * bug fixes - David Ely - * symbols() API and flag deprecation - Gabi Davar - * added file.directory to token environment - João Matos (joao@tritao.eu) - * HTTP download support - * C# / C++/CLI language support improvements and bugfixes - * Visual Studio and Make improvements and bugfixes - * response files support for Make backend - * numerous bug fixes and smaller features - leeonix - * bug fixes - Lusito - * path.join() fixes - Mark Chandler - * prevent self-linking - Matthew Endsley - * File matching improvements - Mark Sararu - * Makefile bug fixes - Mihai Sebea - * Xcode exporter fixes and improvements - M Skibbe - * path.replaceextension() - Renaud Guillard - * add library search paths argument to os.findlib() - * return command exit code from os.outputof() - * bug fixes and smaller improvements - rhuvendiek - * Visual C 2010 IDL file support - Sami Kankaristo - * Utility project support for Makefiles - tbasnoopy - * customtoolnamespace() - * debuggertype() - Tim Wharton - * boostrapping scripts - * callingconvention() - * makefile environment overrides - * module loading improvements - * os.outputof() improvements diff --git a/build/premake/premake5/LICENSE.txt b/build/premake/premake5/LICENSE.txt deleted file mode 100644 index f445f596e8..0000000000 --- a/build/premake/premake5/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2003-2019 Jason Perkins and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Premake nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/premake/premake5/README.md b/build/premake/premake5/README.md deleted file mode 100644 index 7054b790d7..0000000000 --- a/build/premake/premake5/README.md +++ /dev/null @@ -1,91 +0,0 @@ -

- Premake -

- -

- Latest release - Release date - Commits - - BSD 3-Clause - -
- - Linux - - - Windows - - - Contributors - - - Contributors - - - - -

- - -# Welcome to Premake - -Premake is a command line utility which reads a scripted definition of a software project, then uses it to perform build configuration tasks or generate project files for toolsets like Visual Studio, Xcode, and GNU Make. Premake's scripts are little [Lua](http://www.lua.org/) programs, so the sky's the limit! - -```lua -workspace "MyWorkspace" - configurations { "Debug", "Release" } - -project "MyProject" - kind "ConsoleApp" - language "C++" - files { "**.h", "**.cpp" } - - filter { "configurations:Debug" } - defines { "DEBUG" } - symbols "On" - - filter { "configurations:Release" } - defines { "NDEBUG" } - optimize "On" -``` - -## Getting Started - -* [Documentation](https://github.com/premake/premake-core/wiki) -* [Contributing](https://github.com/premake/premake-core/blob/master/CONTRIBUTING.md) -* [Issue Tracker](https://github.com/premake/premake-core/issues) - -## Sponsors - -Premake is a BSD-licensed open source project. Our many thanks to these fine people who help us spend more time adding features and supporting the community. :tada: - -Want to join them? [Learn more here](https://opencollective.com/premake). Use Premake at work? Ask your manager or marketing team about contributing too; your company logo will appear on our [website](https://premake.github.io/) and README, as well as all of our [release pages](https://github.com/premake/premake-core/releases). - -### Organizations - - - -### Individuals - - - -## Contributing - -We love getting [pull requests](https://www.quora.com/GitHub-What-is-a-pull-request) and rely heavily on the contributions of our community to keep Premake healthy and growing. If you're new to the project, [our Contributing Guide is here](https://github.com/premake/premake-core/blob/master/CONTRIBUTING.md). - -A great big thank you to all of you who have already contributed your time and know-how! - - - -## Stay in touch - -* Website - https://premake.github.io -* Twitter - [@premakeapp](https://twitter.com/premakeapp) - -## License - -[BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause) - -The Lua language and runtime library is © TeCGraf, PUC-Rio. -See their website at http://www.lua.org/ diff --git a/build/premake/premake5/appveyor.yml b/build/premake/premake5/appveyor.yml deleted file mode 100644 index 9caca38663..0000000000 --- a/build/premake/premake5/appveyor.yml +++ /dev/null @@ -1,19 +0,0 @@ -os: Visual Studio 2015 - -platform: - - Win32 - - x64 - -configuration: - - Debug - - Release - -before_build: - - cmd: git clean -ffxd - -build_script: - - cmd: call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" - - cmd: nmake -f Bootstrap.mak MSDEV=vs2015 windows PLATFORM=%PLATFORM% CONFIG=%CONFIGURATION% - -test_script: - - cmd: bin\%CONFIGURATION%\premake5 test diff --git a/build/premake/premake5/binmodules/example/main.c b/build/premake/premake5/binmodules/example/main.c deleted file mode 100644 index 524ab34dad..0000000000 --- a/build/premake/premake5/binmodules/example/main.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "luashim.h" - - -static int example_test(lua_State* L) -{ - lua_pushstring(L, "hello "); - lua_pushvalue(L, 1); - lua_concat(L, 2); - return 1; -} - - -static const luaL_Reg example_functions[] = { - { "test", example_test }, - { NULL, NULL } -}; - - -#ifdef _WIN32 -__declspec(dllexport) int luaopen_example(lua_State *L) -#else -int luaopen_example(lua_State *L) -#endif -{ - shimInitialize(L); - luaL_register(L, "example", example_functions); - return 0; -} diff --git a/build/premake/premake5/binmodules/example/premake5.lua b/build/premake/premake5/binmodules/example/premake5.lua deleted file mode 100644 index 0be5c17c66..0000000000 --- a/build/premake/premake5/binmodules/example/premake5.lua +++ /dev/null @@ -1,28 +0,0 @@ -project "example" - language "C" - kind "SharedLib" - warnings "extra" - - includedirs { - "../../contrib/lua/src", - "../../contrib/luashim" - } - - links { 'luashim-lib' } - - files - { - "*.c", - "*.lua" - } - - filter "system:not windows" - targetprefix "" - targetextension ".so" - pic "on" - - filter "configurations:Release" - targetdir "../../bin/release" - - filter "configurations:Debug" - targetdir "../../bin/debug" diff --git a/build/premake/premake5/binmodules/luasocket/FIX b/build/premake/premake5/binmodules/luasocket/FIX deleted file mode 100644 index 40f30a1580..0000000000 --- a/build/premake/premake5/binmodules/luasocket/FIX +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - -http was preserving old host header during redirects -fix smtp.send hang on source error -add create field to FTP and SMTP and fix HTTP ugliness -clean timeout argument to open functions in SMTP, HTTP and FTP -eliminate globals from namespaces created by module(). -url.absolute was not working when base_url was already parsed -http.request was redirecting even when the location header was empty -tcp{client}:shutdown() was checking for group instead of class. -tcp{client}:send() now returns i+sent-1... -get rid of a = socket.try() in the manual, except for protected cases. replace it with assert. -get rid of "base." kludge in package.loaded -check all "require("http")" etc in the manual. -make sure sock_gethostname.* only return success if the hp is not null! -change 'l' prefix in C libraries to 'c' to avoid clash with LHF libraries - don't forget the declarations in luasocket.h and mime.h!!! -setpeername was using udp{unconnected} -fixed a bug in http.lua that caused some requests to fail (Florian Berger) -fixed a bug in select.c that prevented sockets with descriptor 0 from working (Renato Maia) -fixed a "bug" that caused dns.toip to crash under uLinux -fixed a "bug" that caused a crash in gethostbyname under VMS -DEBUG and VERSION became _DEBUG and _VERSION -send returns the right value if input is "". Alexander Marinov diff --git a/build/premake/premake5/binmodules/luasocket/LICENSE b/build/premake/premake5/binmodules/luasocket/LICENSE deleted file mode 100644 index b63545107e..0000000000 --- a/build/premake/premake5/binmodules/luasocket/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -LuaSocket 3.0 license -Copyright © 2004-2013 Diego Nehab - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/build/premake/premake5/binmodules/luasocket/Lua51.props b/build/premake/premake5/binmodules/luasocket/Lua51.props deleted file mode 100644 index 33075a63fe..0000000000 --- a/build/premake/premake5/binmodules/luasocket/Lua51.props +++ /dev/null @@ -1,28 +0,0 @@ - - - - - ..\build\vc12\bin\lua\5.1\ - ..\build\vc12\bin\lua\5.1\ - ..\build\vc12\include\lua\5.1\ - lua51.lib - - - <_PropertySheetDisplayName>Lua51 - - - - - $(LUALIB_PATH) - - - $(LUABIN_PATH) - - - $(LUAINC_PATH) - - - $(LUALIB) - - - diff --git a/build/premake/premake5/binmodules/luasocket/Lua52.props b/build/premake/premake5/binmodules/luasocket/Lua52.props deleted file mode 100644 index 3afb2505ea..0000000000 --- a/build/premake/premake5/binmodules/luasocket/Lua52.props +++ /dev/null @@ -1,28 +0,0 @@ - - - - - ..\build\vc12\bin\lua\5.2\ - ..\build\vc12\bin\lua\5.2\ - ..\build\vc12\include\lua\5.2\ - lua52.lib - - - <_PropertySheetDisplayName>Lua52 - - - - - $(LUALIB_PATH) - - - $(LUABIN_PATH) - - - $(LUAINC_PATH) - - - $(LUALIB) - - - diff --git a/build/premake/premake5/binmodules/luasocket/NEW b/build/premake/premake5/binmodules/luasocket/NEW deleted file mode 100644 index 0bff64c1df..0000000000 --- a/build/premake/premake5/binmodules/luasocket/NEW +++ /dev/null @@ -1,44 +0,0 @@ -What's New - -Main changes for LuaSocket 3.0-rc1 are IPv6 support and Lua 5.2 compatibility. - - * Added: Compatible with Lua 5.2 - - Note that unless you define LUA_COMPAT_MODULE, package - tables will not be exported as globals! - * Added: IPv6 support; - - Socket.connect and socket.bind support IPv6 addresses; - - Getpeername and getsockname support IPv6 addresses, and - return the socket family as a third value; - - URL module updated to support IPv6 host names; - - New socket.tcp6 and socket.udp6 functions; - - New socket.dns.getaddrinfo and socket.dns.getnameinfo functions; - * Added: getoption method; - * Fixed: url.unescape was returning additional values; - * Fixed: mime.qp, mime.unqp, mime.b64, and mime.unb64 could - mistaking their own stack slots for functions arguments; - * Fixed: Receiving zero-length datagram is now possible; - * Improved: Hidden all internal library symbols; - * Improved: Better error messages; - * Improved: Better documentation of socket options. - * Fixed: manual sample of HTTP authentication now uses correct - "authorization" header (Alexandre Ittner); - * Fixed: failure on bind() was destroying the socket (Sam Roberts); - * Fixed: receive() returns immediatelly if prefix can satisfy - bytes requested (M Joonas Pihlaja); - * Fixed: multicast didn't work on Windows, or anywhere - else for that matter (Herbert Leuwer, Adrian Sietsma); - * Fixed: select() now reports an error when called with more - sockets than FD_SETSIZE (Lorenzo Leonini); - * Fixed: manual links to home.html changed to index.html (Robert Hahn); - * Fixed: mime.unb64() would return an empty string on results that started - with a null character (Robert Raschke); - * Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray); - * Fixed: calling sleep() with negative numbers could - block forever, wasting CPU. Now it returns immediately (MPB); - * Improved: FTP commands are now sent in upper case to - help buggy servers (Anders Eurenius); - * Improved: known headers now sent in canonic - capitalization to help buggy servers (Joseph Stewart); - * Improved: Clarified tcp:receive() in the manual (MPB); - * Improved: Decent makefiles (LHF). - * Fixed: RFC links in documentation now point to IETF (Cosmin Apreutesei). diff --git a/build/premake/premake5/binmodules/luasocket/README b/build/premake/premake5/binmodules/luasocket/README deleted file mode 100644 index cd8ee59d14..0000000000 --- a/build/premake/premake5/binmodules/luasocket/README +++ /dev/null @@ -1,11 +0,0 @@ -This is the LuaSocket 3.0-rc1. It has been tested on Windows 7, Mac OS X, -and Linux. - -Please use the project page at GitHub - - https://github.com/diegonehab/luasocket - -to file bug reports or propose changes. - -Have fun, -Diego Nehab. diff --git a/build/premake/premake5/binmodules/luasocket/TODO b/build/premake/premake5/binmodules/luasocket/TODO deleted file mode 100644 index a838fc028a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/TODO +++ /dev/null @@ -1,81 +0,0 @@ -- bizarre default values for getnameinfo should throw error instead! - -> It's just too bad it can't talk to gmail - -> reason 1: they absolutely want TLS -> reason 2: unlike all the other SMTP implementations, they -> don't -> tolerate missing < > around adresses - -- document the new bind and connect behavior. -- shouldn't we instead make the code compatible to Lua 5.2 - without any compat stuff, and use a compatibility layer to - make it work on 5.1? -- add what's new to manual -- should there be an equivalent to tohostname for IPv6? -- should we add service name resolution as well to getaddrinfo? -- Maybe the sockaddr to presentation conversion should be done with getnameinfo()? - -- add http POST sample to manual - people keep asking stupid questions -- documentation of dirty/getfd/setfd is problematic because of portability - same for unix and serial. - what to do about this? add a stronger disclaimer? -- fix makefile with decent defaults? - -Done: - -- added IPv6 support to getsockname -- simplified getpeername implementation -- added family to return of getsockname and getpeername - and added modification to the manual to describe - -- connect and bind try all adresses returned by getaddrinfo -- document headers.lua? -- update copyright date everywhere? -- remove RCSID from files? -- move version to 2.1 rather than 2.1.1? -- fixed url package to support ipv6 hosts -- changed domain to family -- implement getfamily methods. - -- remove references to Lua 5.0 from documentation, add 5.2? -- update lua and luasocket version in samples in documentation -- document ipv5_v6only default option being set? -- document tcp6 and udp6 -- document dns.getaddrinfo -- documented zero-sized datagram change? - no. -- document unix socket and serial socket? add raw support? - no. -- document getoption -- merge luaL_typeerror into auxiliar to avoid using luaL prefix? - - - - - - - - - - -replace \r\n with \0xD\0xA in everything -New mime support - -ftp send should return server replies? -make sure there are no object files in the distribution tarball -http handling of 100-continue, see DB patch -DB ftp.lua bug. -test unix.c to return just a function and works with require"unix" -get rid of setmetatable(, nil) since packages don't need this anymore in 5.1 -compat-5.1 novo -ajeitar pra lua-5.1 - -adicionar exemplos de expansão: pipe, local, named pipe -testar os options! - - -- Thread-unsafe functions to protect - gethostbyname(), gethostbyaddr(), gethostent(), -inet_ntoa(), strerror(), - diff --git a/build/premake/premake5/binmodules/luasocket/WISH b/build/premake/premake5/binmodules/luasocket/WISH deleted file mode 100644 index e7e9c0768f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/WISH +++ /dev/null @@ -1,22 +0,0 @@ -... as an l-value to get all results of a function call? -at least ...[i] and #... -extend to full tuples? - -__and __or __not metamethods - -lua_tostring, lua_tonumber, lua_touseradta etc push values in stack -__tostring,__tonumber, __touserdata metamethods are checked -and expected to push an object of correct type on stack - -lua_rawtostring, lua_rawtonumber, lua_rawtouserdata don't -push anything on stack, return data of appropriate type, -skip metamethods and throw error if object not of exact type - -package.findfile exported -module not polluting the global namespace - -coxpcall with a coroutine pool for efficiency (reusing coroutines) - -exception mechanism formalized? just like the package system was. - -a nice bitlib in the core diff --git a/build/premake/premake5/binmodules/luasocket/doc/dns.html b/build/premake/premake5/binmodules/luasocket/doc/dns.html deleted file mode 100644 index c4a0472e23..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/dns.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - -LuaSocket: DNS support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

DNS

- -

-IPv4 name resolution functions -dns.toip -and -dns.tohostname -return all information obtained from -the resolver in a table of the form: -

- -
-resolved4 = {
-  name = canonic-name,
-  alias = alias-list,
-  ip = ip-address-list
-} -
- -

-Note that the alias list can be empty. -

- -

-The more general name resolution function -dns.getaddrinfo, which -supports both IPv6 and IPv4, -returns all information obtained from -the resolver in a table of the form: -

- -
-resolved6 = {
-  [1] = {
-    family = family-name-1,
-    addr = address-1
-  },
-  ...
-  [n] = {
-    family = family-name-n,
-    addr = address-n
-  }
-} -
- -

-Here, family contains the string "inet" for IPv4 -addresses, and "inet6" for IPv6 addresses. -

- - - -

-socket.dns.getaddrinfo(address) -

- -

-Converts from host name to address. -

- -

-Address can be an IPv4 or IPv6 address or host name. -

- -

-The function returns a table with all information returned by -the resolver. In case of error, the function returns nil -followed by an error message. -

- - - -

-socket.dns.gethostname() -

- -

-Returns the standard host name for the machine as a string. -

- - - -

-socket.dns.tohostname(address) -

- -

-Converts from IPv4 address to host name. -

- -

-Address can be an IP address or host name. -

- -

-The function returns a string with the canonic host name of the given -address, followed by a table with all information returned by -the resolver. In case of error, the function returns nil -followed by an error message. -

- - - -

-socket.dns.toip(address) -

- -

-Converts from host name to IPv4 address. -

- -

-Address can be an IP address or host name. -

- -

-Returns a string with the first IP address found for address, -followed by a table with all information returned by the resolver. -In case of error, the function returns nil followed by an error -message. -

- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/ftp.html b/build/premake/premake5/binmodules/luasocket/doc/ftp.html deleted file mode 100644 index 091c88f783..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/ftp.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - -LuaSocket: FTP support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

FTP

- -

-FTP (File Transfer Protocol) is a protocol used to transfer files -between hosts. The ftp namespace offers thorough support -to FTP, under a simple interface. The implementation conforms to -RFC 959. -

- -

-High level functions are provided supporting the most common operations. -These high level functions are implemented on top of a lower level -interface. Using the low-level interface, users can easily create their -own functions to access any operation supported by the FTP -protocol. For that, check the implementation. -

- -

-To really benefit from this module, a good understanding of - -LTN012, Filters sources and sinks is necessary. -

- -

-To obtain the ftp namespace, run: -

- -
--- loads the FTP module and any libraries it requires
-local ftp = require("socket.ftp")
-
- -

-URLs MUST conform to -RFC 1738, -that is, an URL is a string in the form: -

- -
- -[ftp://][<user>[:<password>]@]<host>[:<port>][/<path>][type=a|i] -
- -

-The following constants in the namespace can be set to control the default behavior of -the FTP module: -

- -
    -
  • PASSWORD: default anonymous password. -
  • TIMEOUT: sets the timeout for all I/O operations; -
  • USER: default anonymous user; -
- - - - -

-ftp.get(url)
-ftp.get{
-  host = string,
-  sink = LTN12 sink,
-  argument or path = string,
-  [user = string,]
-  [password = string]
-  [command = string,]
-  [port = number,]
-  [type = string,]
-  [step = LTN12 pump step,]
-  [create = function]
-} -

- -

-The get function has two forms. The simple form has fixed -functionality: it downloads the contents of a URL and returns it as a -string. The generic form allows a lot more control, as explained -below. -

- -

-If the argument of the get function is a table, the function -expects at least the fields host, sink, and one of -argument or path (argument takes -precedence). Host is the server to connect to. Sink is -the simple -LTN12 -sink that will receive the downloaded data. Argument or -path give the target path to the resource in the server. The -optional arguments are the following: -

-
    -
  • user, password: User name and password used for -authentication. Defaults to "ftp:anonymous@anonymous.org"; -
  • command: The FTP command used to obtain data. Defaults to -"retr", but see example below; -
  • port: The port to used for the control connection. Defaults to 21; -
  • type: The transfer mode. Can take values "i" or -"a". Defaults to whatever is the server default; -
  • step: -LTN12 -pump step function used to pass data from the -server to the sink. Defaults to the LTN12 pump.step function; -
  • create: An optional function to be used instead of -socket.tcp when the communications socket is created. -
- -

-If successful, the simple version returns the URL contents as a -string, and the generic function returns 1. In case of error, both -functions return nil and an error message describing the -error. -

- -
--- load the ftp support
-local ftp = require("socket.ftp")
-
--- Log as user "anonymous" on server "ftp.tecgraf.puc-rio.br",
--- and get file "lua.tar.gz" from directory "pub/lua" as binary.
-f, e = ftp.get("ftp://ftp.tecgraf.puc-rio.br/pub/lua/lua.tar.gz;type=i")
-
- -
--- load needed modules
-local ftp = require("socket.ftp")
-local ltn12 = require("ltn12")
-local url = require("socket.url")
-
--- a function that returns a directory listing
-function nlst(u)
-    local t = {}
-    local p = url.parse(u)
-    p.command = "nlst"
-    p.sink = ltn12.sink.table(t)
-    local r, e = ftp.get(p)
-    return r and table.concat(t), e
-end
-
- - - -

-ftp.put(url, content)
-ftp.put{
-  host = string,
-  source = LTN12 sink,
-  argument or path = string,
-  [user = string,]
-  [password = string]
-  [command = string,]
-  [port = number,]
-  [type = string,]
-  [step = LTN12 pump step,]
-  [create = function]
-} -

- -

-The put function has two forms. The simple form has fixed -functionality: it uploads a string of content into a URL. The generic form -allows a lot more control, as explained below. -

- -

-If the argument of the put function is a table, the function -expects at least the fields host, source, and one of -argument or path (argument takes -precedence). Host is the server to connect to. Source is -the simple -LTN12 -source that will provide the contents to be uploaded. -Argument or -path give the target path to the resource in the server. The -optional arguments are the following: -

-
    -
  • user, password: User name and password used for -authentication. Defaults to "ftp:anonymous@anonymous.org"; -
  • command: The FTP command used to send data. Defaults to -"stor", but see example below; -
  • port: The port to used for the control connection. Defaults to 21; -
  • type: The transfer mode. Can take values "i" or -"a". Defaults to whatever is the server default; -
  • step: -LTN12 -pump step function used to pass data from the -server to the sink. Defaults to the LTN12 pump.step function; -
  • create: An optional function to be used instead of -socket.tcp when the communications socket is created. -
- -

-Both functions return 1 if successful, or nil and an error -message describing the reason for failure. -

- -
--- load the ftp support
-local ftp = require("socket.ftp")
-
--- Log as user "fulano" on server "ftp.example.com",
--- using password "silva", and store a file "README" with contents 
--- "wrong password, of course"
-f, e = ftp.put("ftp://fulano:silva@ftp.example.com/README", 
-    "wrong password, of course")
-
- -
--- load the ftp support
-local ftp = require("socket.ftp")
-local ltn12 = require("ltn12")
-
--- Log as user "fulano" on server "ftp.example.com",
--- using password "silva", and append to the remote file "LOG", sending the
--- contents of the local file "LOCAL-LOG"
-f, e = ftp.put{
-  host = "ftp.example.com", 
-  user = "fulano",
-  password = "silva",
-  command = "appe",
-  argument = "LOG",
-  source = ltn12.source.file(io.open("LOCAL-LOG", "r"))
-}
-
- - - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/http.html b/build/premake/premake5/binmodules/luasocket/doc/http.html deleted file mode 100644 index 3b7a8b1a26..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/http.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - -LuaSocket: HTTP support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -introduction · -introduction · -reference -

-
-
-
- - - -

HTTP

- -

-HTTP (Hyper Text Transfer Protocol) is the protocol used to exchange -information between web-browsers and servers. The http -namespace offers full support for the client side of the HTTP -protocol (i.e., -the facilities that would be used by a web-browser implementation). The -implementation conforms to the HTTP/1.1 standard, -RFC 2616. -

- -

-The module exports functions that provide HTTP functionality in different -levels of abstraction. From the simple -string oriented requests, through generic -LTN12 based, down to even lower-level if you bother to look through the source code. -

- -

-To obtain the http namespace, run: -

- -
--- loads the HTTP module and any libraries it requires
-local http = require("socket.http")
-
- -

-URLs must conform to -RFC 1738, -that is, an URL is a string in the form: -

- -
-
-[http://][<user>[:<password>]@]<host>[:<port>][/<path>] 
-
-
- -

-MIME headers are represented as a Lua table in the form: -

- -
- - -
-headers = {
-  field-1-name = field-1-value,
-  field-2-name = field-2-value,
-  field-3-name = field-3-value,
-  ...
-  field-n-name = field-n-value
-} -
-
- -

-Field names are case insensitive (as specified by the standard) and all -functions work with lowercase field names (but see -socket.headers.canonic). -Field values are left unmodified. -

- -

-Note: MIME headers are independent of order. Therefore, there is no problem -in representing them in a Lua table. -

- -

-The following constants can be set to control the default behavior of -the HTTP module: -

- -
    -
  • PROXY: default proxy used for connections; -
  • TIMEOUT: sets the timeout for all I/O operations; -
  • USERAGENT: default user agent reported to server. -
- -

-Note: These constants are global. Changing them will also -change the behavior other code that might be using LuaSocket. -

- - - -

-http.request(url [, body])
-http.request{
-  url = string,
-  [sink = LTN12 sink,]
-  [method = string,]
-  [headers = header-table,]
-  [source = LTN12 source],
-  [step = LTN12 pump step,]
-  [proxy = string,]
-  [redirect = boolean,]
-  [create = function]
-} -

- -

-The request function has two forms. The simple form downloads -a URL using the GET or POST method and is based -on strings. The generic form performs any HTTP method and is -LTN12 based. -

- -

-If the first argument of the request function is a string, it -should be an url. In that case, if a body -is provided as a string, the function will perform a POST method -in the url. Otherwise, it performs a GET in the -url -

- -

-If the first argument is instead a table, the most important fields are -the url and the simple -LTN12 -sink that will receive the downloaded content. -Any part of the url can be overridden by including -the appropriate field in the request table. -If authentication information is provided, the function -uses the Basic Authentication Scheme (see note) -to retrieve the document. If sink is nil, the -function discards the downloaded data. The optional parameters are the -following: -

-
    -
  • method: The HTTP request method. Defaults to "GET"; -
  • headers: Any additional HTTP headers to send with the request; -
  • source: simple -LTN12 -source to provide the request body. If there -is a body, you need to provide an appropriate "content-length" -request header field, or the function will attempt to send the body as -"chunked" (something few servers support). Defaults to the empty source; -
  • step: -LTN12 -pump step function used to move data. -Defaults to the LTN12 pump.step function. -
  • proxy: The URL of a proxy server to use. Defaults to no proxy; -
  • redirect: Set to false to prevent the -function from automatically following 301 or 302 server redirect messages; -
  • create: An optional function to be used instead of -socket.tcp when the communications socket is created. -
- -

-In case of failure, the function returns nil followed by an -error message. If successful, the simple form returns the response -body as a string, followed by the response status code, the response -headers and the response status line. The generic function returns the same -information, except the first return value is just the number 1 (the body -goes to the sink). -

- -

-Even when the server fails to provide the contents of the requested URL (URL not found, for example), -it usually returns a message body (a web page informing the -URL was not found or some other useless page). To make sure the -operation was successful, check the returned status code. For -a list of the possible values and their meanings, refer to RFC 2616. -

- -

-Here are a few examples with the simple interface: -

- -
--- load the http module
-local io = require("io")
-local http = require("socket.http")
-local ltn12 = require("ltn12")
-
--- connect to server "www.cs.princeton.edu" and retrieves this manual
--- file from "~diego/professional/luasocket/http.html" and print it to stdout
-http.request{ 
-    url = "http://www.cs.princeton.edu/~diego/professional/luasocket/http.html", 
-    sink = ltn12.sink.file(io.stdout)
-}
-
--- connect to server "www.example.com" and tries to retrieve
--- "/private/index.html". Fails because authentication is needed.
-b, c, h = http.request("http://www.example.com/private/index.html")
--- b returns some useless page telling about the denied access, 
--- h returns authentication information
--- and c returns with value 401 (Authentication Required)
-
--- tries to connect to server "wrong.host" to retrieve "/"
--- and fails because the host does not exist.
-r, e = http.request("http://wrong.host/")
--- r is nil, and e returns with value "host not found"
-
- -

-And here is an example using the generic interface: -

- -
--- load the http module
-http = require("socket.http")
-
--- Requests information about a document, without downloading it.
--- Useful, for example, if you want to display a download gauge and need
--- to know the size of the document in advance
-r, c, h = http.request {
-  method = "HEAD",
-  url = "http://www.tecgraf.puc-rio.br/~diego"
-}
--- r is 1, c is 200, and h would return the following headers:
--- h = {
---   date = "Tue, 18 Sep 2001 20:42:21 GMT",
---   server = "Apache/1.3.12 (Unix)  (Red Hat/Linux)",
---   ["last-modified"] = "Wed, 05 Sep 2001 06:11:20 GMT",
---   ["content-length"] = 15652,
---   ["connection"] = "close",
---   ["content-Type"] = "text/html"
--- }
-
- -

-Note: When sending a POST request, simple interface adds a -"Content-type: application/x-www-form-urlencoded" -header to the request. This is the type used by -HTML forms. If you need another type, use the generic -interface. -

- -

-Note: Some URLs are protected by their -servers from anonymous download. For those URLs, the server must receive -some sort of authentication along with the request or it will deny -download and return status "401 Authentication Required". -

- -

-The HTTP/1.1 standard defines two authentication methods: the Basic -Authentication Scheme and the Digest Authentication Scheme, both -explained in detail in -RFC 2068. -

- -

The Basic Authentication Scheme sends -<user> and -<password> unencrypted to the server and is therefore -considered unsafe. Unfortunately, by the time of this implementation, -the wide majority of servers and browsers support the Basic Scheme only. -Therefore, this is the method used by the toolkit whenever -authentication is required. -

- -
--- load required modules
-http = require("socket.http")
-mime = require("mime")
-
--- Connect to server "www.example.com" and tries to retrieve
--- "/private/index.html", using the provided name and password to
--- authenticate the request
-b, c, h = http.request("http://fulano:silva@www.example.com/private/index.html")
-
--- Alternatively, one could fill the appropriate header and authenticate
--- the request directly.
-r, c = http.request {
-  url = "http://www.example.com/private/index.html",
-  headers = { authorization = "Basic " .. (mime.b64("fulano:silva")) }
-}
-
- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/index.html b/build/premake/premake5/binmodules/luasocket/doc/index.html deleted file mode 100644 index 7d81b411d0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/index.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - -LuaSocket: Network support for the Lua language - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

What is LuaSocket?

- -

-LuaSocket is a Lua extension library -that is composed by two parts: a C core that provides support for the TCP -and UDP transport layers, and a set of Lua modules that add support for -functionality commonly needed by applications that deal with the Internet. -

- -

-The core support has been implemented so that it is both efficient and -simple to use. It is available to any Lua application once it has been -properly initialized by the interpreter in use. The code has been tested -and runs well on several Windows and UNIX platforms.

- -

-Among the support modules, the most commonly used implement the -SMTP -(sending e-mails), -HTTP -(WWW access) and -FTP -(uploading and downloading files) client -protocols. These provide a very natural and generic interface to the -functionality defined by each protocol. -In addition, you will find that the -MIME (common encodings), -URL -(anything you could possible want to do with one) and -LTN12 -(filters, sinks, sources and pumps) modules can be very handy. -

- -

-The library is available under the same - -terms and conditions as the Lua language, the MIT license. The idea is -that if you can use Lua in a project, you should also be able to use -LuaSocket. -

- -

-Copyright © 1999-2013 Diego Nehab. All rights reserved.
-Author: Diego Nehab -

- - - -

Download

- -

-LuaSocket version 3.0-rc1 is now available for download! -It is compatible with Lua 5.1 and 5.2, and has -been tested on Windows XP, Linux, and Mac OS X. Chances -are it works well on most UNIX distributions and Windows flavors. -

- -

-The current version of the library can be found at -the LuaSocket -project page on GitHub. Besides the full C and Lua source code -for the library, the distribution contains several examples, -this user's manual and basic test procedures. -

- -

Take a look at the installation section of the -manual to find out how to properly install the library. -

- - - -

Special thanks

- -

-This marks the first release of LuaSocket that -wholeheartedly embraces the open-source development -philosophy. After a long hiatus, Matthew Wild finally -convinced me it was time for a release including IPv6 and -Lua 5.2 support. It was more work than we anticipated. -Special thanks to Sam Roberts, Florian Zeitz, and Paul -Aurich, Liam Devine, Alexey Melnichuk, and everybody else -that has helped bring this library back to life. -

- - - -

What's New

- -

-Main changes for LuaSocket 3.0-rc1 are IPv6 support -and Lua 5.2 compatibility. -

- -
    -
  • Added: Compatible with Lua 5.2 -
      -
    • Note that unless you define LUA_COMPAT_MODULE, -package tables will not be exported as globals! -
    -
  • Added: IPv6 support; -
      -
    • Socket.connect and socket.bind support IPv6 addresses; -
    • Getpeername and getsockname support -IPv6 addresses, and return the socket family as a third value; -
    • URL module updated to support IPv6 host names; -
    • New socket.tcp6 and socket.udp6 functions; -
    • New socket.dns.getaddrinfo and - socket.dns.getnameinfo functions; -
    -
  • Added: getoption method; -
  • Fixed: url.unescape was returning additional values; -
  • Fixed: mime.qp, mime.unqp, - mime.b64, and mime.unb64 could - mistaking their own stack slots for functions arguments; -
  • Fixed: Receiving zero-length datagram is now possible; -
  • Improved: Hidden all internal library symbols; -
  • Improved: Better error messages; -
  • Improved: Better documentation of socket options. -
  • Fixed: manual sample of HTTP authentication now uses correct - "authorization" header (Alexandre Ittner); -
  • Fixed: failure on bind() was destroying the socket (Sam Roberts); -
  • Fixed: receive() returns immediatelly if prefix can satisfy - bytes requested (M Joonas Pihlaja); -
  • Fixed: multicast didn't work on Windows, or anywhere - else for that matter (Herbert Leuwer, Adrian Sietsma); -
  • Fixed: select() now reports an error when called with more - sockets than FD_SETSIZE (Lorenzo Leonini); -
  • Fixed: manual links to home.html changed to index.html -(Robert Hahn); -
  • Fixed: mime.unb64() would return an empty string on results that started - with a null character (Robert Raschke); -
  • Fixed: HTTP now automatically redirects on 303 and 307 (Jonathan Gray); -
  • Fixed: calling sleep() with negative numbers could - block forever, wasting CPU. Now it returns immediately (MPB); -
  • Improved: FTP commands are now sent in upper case to - help buggy servers (Anders Eurenius); -
  • Improved: known headers now sent in canonic - capitalization to help buggy servers (Joseph Stewart); -
  • Improved: Clarified tcp:receive() in the manual (MPB); -
  • Improved: Decent makefiles (LHF). -
  • Fixed: RFC links in documentation now point to IETF (Cosmin Apreutesei). -
- - - -

Old Versions

- -

-All previous versions of the LuaSocket library can be downloaded -here. Although these versions are no longer supported, they are -still available for those that have compatibility issues. -

- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/installation.html b/build/premake/premake5/binmodules/luasocket/doc/installation.html deleted file mode 100644 index 28a9fbb5f2..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/installation.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - -LuaSocket: Installation - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

Installation

- -

Here we describe the standard distribution. If the -standard doesn't meet your needs, we refer you to the Lua -discussion list, where any question about the package scheme -will likely already have been answered.

- -

Directory structure

- -

On Unix systems, the standard distribution uses two base -directories, one for system dependent files, and another for system -independent files. Let's call these directories <CDIR> -and <LDIR>, respectively. -For example, in my laptp, Lua 5.1 is configured to -use '/usr/local/lib/lua/5.1' for -<CDIR> and '/usr/local/share/lua/5.1' for -<LDIR>. On Windows, <CDIR> -usually points to the directory where the Lua executable is -found, and <LDIR> points to a -lua/ directory inside <CDIR>. (These -settings can be overridden by environment variables -LUA_PATH and LUA_CPATH. See the Lua -documentation for details.) Here is the standard LuaSocket -distribution directory structure:

- -
-<LDIR>/ltn12.lua
-<LDIR>/socket.lua
-<CDIR>/socket/core.dll
-<LDIR>/socket/http.lua
-<LDIR>/socket/tp.lua
-<LDIR>/socket/ftp.lua
-<LDIR>/socket/smtp.lua
-<LDIR>/socket/url.lua
-<LDIR>/mime.lua
-<CDIR>/mime/core.dll
-
- -

Naturally, on Unix systems, core.dll -would be replaced by core.so. -

- -

Using LuaSocket

- -

With the above setup, and an interpreter with shared library support, -it should be easy to use LuaSocket. Just fire the interpreter and use the -require function to gain access to whatever module you need:

- -
-Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
-> socket = require("socket")
-> print(socket._VERSION)
---> LuaSocket 3.0-rc1
-
- -

Each module loads their dependencies automatically, so you only need to -load the modules you directly depend upon:

- -
-Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
-> http = require("socket.http")
-> print(http.request("http://www.impa.br/~diego/software/luasocket"))
---> homepage gets dumped to terminal
-
- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/introduction.html b/build/premake/premake5/binmodules/luasocket/doc/introduction.html deleted file mode 100644 index fd22f483de..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/introduction.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - -LuaSocket: Introduction to the core - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

Introduction

- -

-LuaSocket is a Lua extension library -that is composed by two parts: a C core that provides support for the TCP -and UDP transport layers, and a set of Lua modules that add support for -the SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and -downloading files) protocols and other functionality commonly needed by -applications that deal with the Internet. This introduction is about the C -core. -

- -

-Communication in LuaSocket is performed via I/O objects. These can -represent different network domains. Currently, support is provided for TCP -and UDP, but nothing prevents other developers from implementing SSL, Local -Domain, Pipes, File Descriptors etc. I/O objects provide a standard -interface to I/O across different domains and operating systems. -

- -

-The API design had two goals in mind. First, users -experienced with the C API to sockets should feel comfortable using LuaSocket. -Second, the simplicity and the feel of the Lua language should be -preserved. To achieve these goals, the LuaSocket API keeps the function names and semantics the C API whenever possible, but their usage in Lua has been greatly simplified. -

- - -

-One of the simplifications is the receive pattern capability. -Applications can read data from stream domains (such as TCP) -line by line, block by block, or until the connection is closed. -All I/O reads are buffered and the performance differences between -different receive patterns are negligible. -

- -

-Another advantage is the flexible timeout control -mechanism. As in C, all I/O operations are blocking by default. For -example, the send, -receive and -accept methods -of the TCP domain will block the caller application until -the operation is completed (if ever!). However, with a call to the -settimeout -method, an application can specify upper limits on -the time it can be blocked by LuaSocket (the "total" timeout), on -the time LuaSocket can internally be blocked by any OS call (the -"block" timeout) or a combination of the two. Each LuaSocket -call might perform several OS calls, so that the two timeout values are -not equivalent. -

- -

-Finally, the host name resolution is transparent, meaning that most -functions and methods accept both IP addresses and host names. In case a -host name is given, the library queries the system's resolver and -tries the main IP address returned. Note that direct use of IP addresses -is more efficient, of course. The -toip -and tohostname -functions from the DNS module are provided to convert between host names and IP addresses. -

- -

-Together, these changes make network programming in LuaSocket much simpler -than it is in C, as the following sections will show. -

- - - -

TCP

- -

-TCP (Transfer Control Protocol) is reliable stream protocol. In other -words, applications communicating through TCP can send and receive data as -an error free stream of bytes. Data is split in one end and -reassembled transparently on the other end. There are no boundaries in -the data transfers. The library allows users to read data from the -sockets in several different granularities: patterns are available for -lines, arbitrary sized blocks or "read up to connection closed", all with -good performance. -

- -

-The library distinguishes three types of TCP sockets: master, -client and server sockets. -

- -

-Master sockets are newly created TCP sockets returned by the function -socket.tcp. A master socket is -transformed into a server socket -after it is associated with a local address by a call to the -bind method followed by a call to the -listen. Conversely, a master socket -can be changed into a client socket with the method -connect, -which associates it with a remote address. -

- -

-On server sockets, applications can use the -accept method -to wait for a client connection. Once a connection is established, a -client socket object is returned representing this connection. The -other methods available for server socket objects are -getsockname, -setoption, -settimeout, and -close. -

- -

-Client sockets are used to exchange data between two applications over -the Internet. Applications can call the methods -send and -receive -to send and receive data. The other methods -available for client socket objects are -getsockname, -getpeername, -setoption, -settimeout, -shutdown, and -close. -

- -

-Example: -

-
-

-A simple echo server, using LuaSocket. The program binds to an ephemeral -port (one that is chosen by the operating system) on the local host and -awaits client connections on that port. When a connection is established, -the program reads a line from the remote end and sends it back, closing -the connection immediately. You can test it using the telnet -program. -

- -
--- load namespace
-local socket = require("socket")
--- create a TCP socket and bind it to the local host, at any port
-local server = assert(socket.bind("*", 0))
--- find out which port the OS chose for us
-local ip, port = server:getsockname()
--- print a message informing what's up
-print("Please telnet to localhost on port " .. port)
-print("After connecting, you have 10s to enter a line to be echoed")
--- loop forever waiting for clients
-while 1 do
-  -- wait for a connection from any client
-  local client = server:accept()
-  -- make sure we don't block waiting for this client's line
-  client:settimeout(10)
-  -- receive the line
-  local line, err = client:receive()
-  -- if there was no error, send it back to the client
-  if not err then client:send(line .. "\n") end
-  -- done with client, close the object
-  client:close()
-end
-
-
- - - -

UDP

- -

-UDP (User Datagram Protocol) is a non-reliable datagram protocol. In -other words, applications communicating through UDP send and receive -data as independent blocks, which are not guaranteed to reach the other -end. Even when they do reach the other end, they are not guaranteed to be -error free. Data transfers are atomic, one datagram at a time. Reading -only part of a datagram discards the rest, so that the following read -operation will act on the next datagram. The advantages are in -simplicity (no connection setup) and performance (no error checking or -error correction). -

- -

-Note that although no guarantees are made, these days -networks are so good that, under normal circumstances, few errors -happen in practice. -

- -

-An UDP socket object is created by the -socket.udp function. UDP -sockets do not need to be connected before use. The method -sendto -can be used immediately after creation to -send a datagram to IP address and port. Host names are not allowed -because performing name resolution for each packet would be forbiddingly -slow. Methods -receive and -receivefrom -can be used to retrieve datagrams, the latter returning the IP and port of -the sender as extra return values (thus being slightly less -efficient). -

- -

-When communication is performed repeatedly with a single peer, an -application should call the -setpeername method to specify a -permanent partner. Methods -sendto and -receivefrom -can no longer be used, but the method -send can be used to send data -directly to the peer, and the method -receive -will only return datagrams originating -from that peer. There is about 30% performance gain due to this practice. -

- -

-To associate an UDP socket with a local address, an application calls the -setsockname -method before sending any datagrams. Otherwise, the socket is -automatically bound to an ephemeral address before the first data -transmission and once bound the local address cannot be changed. -The other methods available for UDP sockets are -getpeername, -getsockname, -settimeout, -setoption and -close. -

- -

-Example: -

-
-

-A simple daytime client, using LuaSocket. The program connects to a remote -server and tries to retrieve the daytime, printing the answer it got or an -error message. -

- -
--- change here to the host an port you want to contact
-local host, port = "localhost", 13
--- load namespace
-local socket = require("socket")
--- convert host name to ip address
-local ip = assert(socket.dns.toip(host))
--- create a new UDP object
-local udp = assert(socket.udp())
--- contact daytime host
-assert(udp:sendto("anything", ip, port))
--- retrieve the answer and print results
-io.write(assert(udp:receive()))
-
-
- - - -

Support modules

- -

Although not covered in the introduction, LuaSocket offers -much more than TCP and UDP functionality. As the library -evolved, support for HTTP, FTP, -and SMTP were built on top of these. These modules -and many others are covered by the reference manual. -

- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/ltn12.html b/build/premake/premake5/binmodules/luasocket/doc/ltn12.html deleted file mode 100644 index 54e66fb6bb..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/ltn12.html +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - -LuaSocket: LTN12 module - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

LTN12

- -

The ltn12 namespace implements the ideas described in - -LTN012, Filters sources and sinks. This manual simply describes the -functions. Please refer to the LTN for a deeper explanation of the -functionality provided by this module. -

- -

-To obtain the ltn12 namespace, run: -

- -
--- loads the LTN21 module
-local ltn12 = require("ltn12")
-
- - - -

Filters

- - - -

-ltn12.filter.chain(filter1, filter2 -[, ... filterN]) -

- -

-Returns a filter that passes all data it receives through each of a -series of given filters. -

- -

-Filter1 to filterN are simple -filters. -

- -

-The function returns the chained filter. -

- -

-The nesting of filters can be arbitrary. For instance, the useless filter -below doesn't do anything but return the data that was passed to it, -unaltered. -

- -
--- load required modules
-local ltn12 = require("ltn12")
-local mime = require("mime")
-
--- create a silly identity filter
-id = ltn12.filter.chain(
-  mime.encode("quoted-printable"),
-  mime.encode("base64"),
-  mime.decode("base64"),
-  mime.decode("quoted-printable")
-)
-
- - - -

-ltn12.filter.cycle(low [, ctx, extra]) -

- -

-Returns a high-level filter that cycles though a low-level filter by -passing it each chunk and updating a context between calls. -

- -

-Low is the low-level filter to be cycled, -ctx is the initial context and extra is any extra -argument the low-level filter might take. -

- -

-The function returns the high-level filter. -

- -
--- load the ltn12 module
-local ltn12 = require("ltn12")
-
--- the base64 mime filter factory
-encodet['base64'] = function()
-    return ltn12.filter.cycle(b64, "")
-end
-
- - - -

Pumps

- - - -

-ltn12.pump.all(source, sink) -

- -

-Pumps all data from a source to a sink. -

- -

-If successful, the function returns a value that evaluates to -true. In case -of error, the function returns a false value, followed by an error message. -

- - - -

-ltn12.pump.step(source, sink) -

- -

-Pumps one chunk of data from a source to a sink. -

- -

-If successful, the function returns a value that evaluates to -true. In case -of error, the function returns a false value, followed by an error message. -

- - - -

Sinks

- - - -

-ltn12.sink.chain(filter, sink) -

- -

-Creates and returns a new sink that passes data through a filter before sending it to a given sink. -

- - - -

-ltn12.sink.error(message) -

- -

-Creates and returns a sink that aborts transmission with the error -message. -

- - - -

-ltn12.sink.file(handle, message) -

- -

-Creates a sink that sends data to a file. -

- -

-Handle is a file handle. If handle is nil, -message should give the reason for failure. -

- -

-The function returns a sink that sends all data to the given handle -and closes the file when done, or a sink that aborts the transmission with -the error message -

- -

-In the following example, notice how the prototype is designed to -fit nicely with the io.open function. -

- -
--- load the ltn12 module
-local ltn12 = require("ltn12")
-
--- copy a file
-ltn12.pump.all(
-  ltn12.source.file(io.open("original.png", "rb")),
-  ltn12.sink.file(io.open("copy.png", "wb"))
-)
-
- - - -

-ltn12.sink.null() -

- -

-Returns a sink that ignores all data it receives. -

- - - -

-ltn12.sink.simplify(sink) -

- -

-Creates and returns a simple sink given a fancy sink. -

- - - -

-ltn12.sink.table([table]) -

- -

-Creates a sink that stores all chunks in a table. The chunks can later be -efficiently concatenated into a single string. -

- -

-Table is used to hold the chunks. If -nil, the function creates its own table. -

- -

-The function returns the sink and the table used to store the chunks. -

- -
--- load needed modules
-local http = require("socket.http")
-local ltn12 = require("ltn12")
-
--- a simplified http.get function
-function http.get(u)
-  local t = {}
-  local respt = request{
-    url = u,
-    sink = ltn12.sink.table(t)
-  }
-  return table.concat(t), respt.headers, respt.code
-end
-
- - - -

Sources

- - - -

-ltn12.source.cat(source1 [, source2, ..., -sourceN]) -

- -

-Creates a new source that produces the concatenation of the data produced -by a number of sources. -

- -

-Source1 to sourceN are the original -sources. -

- -

-The function returns the new source. -

- - - -

-ltn12.source.chain(source, filter) -

- -

-Creates a new source that passes data through a filter -before returning it. -

- -

-The function returns the new source. -

- - - -

-ltn12.source.empty() -

- -

-Creates and returns an empty source. -

- - - -

-ltn12.source.error(message) -

- -

-Creates and returns a source that aborts transmission with the error -message. -

- - - -

-ltn12.source.file(handle, message) -

- -

-Creates a source that produces the contents of a file. -

- -

-Handle is a file handle. If handle is nil, -message should give the reason for failure. -

- -

-The function returns a source that reads chunks of data from -given handle and returns it to the user, -closing the file when done, or a source that aborts the transmission with -the error message -

- -

-In the following example, notice how the prototype is designed to -fit nicely with the io.open function. -

- -
--- load the ltn12 module
-local ltn12 = require("ltn12")
-
--- copy a file
-ltn12.pump.all(
-  ltn12.source.file(io.open("original.png", "rb")),
-  ltn12.sink.file(io.open("copy.png", "wb"))
-)
-
- - - -

-ltn12.source.simplify(source) -

- -

-Creates and returns a simple source given a fancy source. -

- - - -

-ltn12.source.string(string) -

- -

-Creates and returns a source that produces the contents of a -string, chunk by chunk. -

- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/lua05.ppt b/build/premake/premake5/binmodules/luasocket/doc/lua05.ppt deleted file mode 100644 index e2b7ab4b304505811d6f481ac1ab7147af3e8ebc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 304128 zcmeFYc|6qL`#=1eF)@~yL6)+NF=%>Ag9>FC4B0{?Te8GdWX~Rk1|za1nTV7nWXZlH z>pNsiLYARH)+`y4{hoP$d*8qB{rTO$KYsW9&;7@Jd0d|7y3RS*xn9>Fp(9`3fKMEKCOwrQ}@!;_AkfHrX7bfXEL1zk`_vlQ| z`v2+w!w~@Tx!CAk$3kZ?zzP8XEbxlUjV>Jl4)@jQh(rK@BOL*H7ypBdG=K#&{xfPF z9$3*k)(G!y*hvZAsDHD(pd0+)nMrDnCzGsYDSs>A<)|d04{(X@`9e?0)VyD ze>BW%3G`Cn4iMl;&!3^Q0;3?E=p*kRV))IVe~Qx)`i}(spF>vQkNj^wqfv%KJpZBR z_#^*2)LH*S=KK$t?&Cl7Z~6ah_djKZpA6ssSLOfp?|+4iX~&>{>;JFH{om;s*DUc* z?f(&{qkm+EpA6d!WYqo7`v11~-;r@GGIVCdj8UEu8-|Y2@Bj2Y9T|G|Kgei{Av0pe zKt}8t$RLJYUONA0y#H;FQSKO>8OTRxhMv)<|2?0dE;I54{~#UyFZTbHkJA$;{xGAw z5S>lXu2e`HBIGRiTC zp=ZPnL1zXr>M`hFWW-O7&WtuNe~>ZF7;VVYnNbcwXNDayIy2<6e^C4nO8h~oKX~R3 z%KpJ~bY#>&|3^MaM}~jsKeF^6`Sc(8)F1ro52^v6H6lF?23Xcmbo`&`pF6>SQ#bu@ zm38=ImzlZY0@mWkiR%ZF;)YhCtZzRb0-~*qcK@X&-~qtC#)wlGh#m>(1IE;bMyfON z8$mGoD$xX@tDt}Xqd5dY>Ej#(rq_ph0LOna`u~s&0E>%@0EI$fRH74s&L8P~2w(w` zpMS;xlwpOjf^X569#LS8i%}N_wF_7UN7qG*0i%|(UU}DVGe`ueH(XEdE!9b}Sy~2Odr@q5RMyiyP z3zR^2jX-CH>;ddDF@`FGJm`skWky9TeNKu3JP_r7a{q0E3z%nGm}M-C3rvi`K%mdG zZ}cl?FeA+v9E=Ihn23x?|HlOo7qHHxO~2wZKnE8?j{!b&F#^HJ=K=;%O?-Txt*zr}*C8{bI0F2)Ek z4EQfwSLv2q0Vlxw|Aj5YA6uG$JK*z=Z%*|82*8kT_kY(f%pY6kbidqyTl8N0FJ$=l zzhetbzeemITc;1@4-o+7umV$!`F|2G0^Jq>WdCzxCjfTzG-LPzK+ZosMHiurWr(q? z(8*0?jh{ZT{-@~{ZESeyDBE#H-yhZ0!I{vpgU%nI^iBr^Fc!6RVD-?kq+cjI4}(F# zvvkJt%yLinvKGrA3meZx4*!W9FUF#!i&MYqKl-D=@-b@IN7BD4s3ZtCWAYc<33X|d z4k;NYu61R+B7qluWhyuE?5mWXz5amIs*uzu@@$DV1vLF!%0D(XP2ypQs z7aRnI0rbg7{RWQ@{k=9D41IGUwM_x7c2^ipV#ZALh6 zf^iUgp)!a@uabnlHtLd=2Z2z~P+h!OJ0t5Yu5`8GUCrJ0{3_q{+-;BR&Lx*!T=7*x zTs|3Q6l>Zwd#y3L?H5-iv(pC_il`eyD|g@RcQ4;kUH{Txed}WGQDeB>mg?Yz9`99y zCcD`LFG&Z#ThX575-AhAo;Lzl)7O2=S<4b{QkO|ZFWo$c~w{k^<9oFr}zoBxu@qG0#Ljnb0qes08iy_KeMqr8%4^>hcN*P^=Ln+Sn|g*<#^pr%$Xl>=)8f$a9jV@7QJC{Gkv< zA<9wU%Xkl%K#s;JkH4A$gJ$h>1ri_5q^Bw&b1#r<>%Fmn7+C%S46k~xF;uqk;KN0( z$-t$>{#SvDRyL}Tq1{ziSm#2|@^dL$|L?=9`%8@n(Q_GrJF}9H6aAJpJpx8@_o@Ep zdMeMmR&GuNEv=$ulr1|Y^n z&`hmOW4dqwhR6~G$pw5H^A4V)ey?{|^IzMsZZCW=Dxuq8hEDxY$riuV9=M$*j)t|v;a=3>OTjQC7?F^!n<@`r1?07eBusfwDl>pfwYr4E zp^zjGZxS~0?|r+yZ=WVYXa^?_H~Mxn8a_w8r1xo&)LI2DJ(EpbuKLc0xuULQxw$pbKU zptw;R*BuK%I^-6dLc-=nbW)RQ($d7`Ud&0OkI4^CT${QVd>P5gg2S;5y5Ru?k{3&W z5`^MplAeE7r!IF*hwk?qP3-ln_44y)ZED&zL_NByR3AL|>P*Nit#Nz1?{G)I+TGpT zkkoY@&cw=^HAHTnE$rHLZw&TS_9wC^`>&M_%?c2H@R7oxZ9?#3Je==n7)94iJe+KP z5+SRiIwb^c)k8~XH_#o9(8R{3iH$P>iIgX#h;lMnVK9zFoOdJXpok|SvEP80XE0fA zG4Kl}0L%oHV>{9`u~6C78Xvm1lcpBp6SxsKC^1eS_h;6>oiOUl3|W}Y+;4F|+{shh z-fOV-^L;ghUx9t2c;S7_mMcX@z3y+Uyz*PMm2T*zy(y@>cB&N0@d687BVlO961;zZ zNFDE|l!!$@0T=t58tiAkNhg}fnQCBh8q8R~OI~<9Uc(VyZDFft6SNA1eRCNRN7C=< zU>s5lffeHfV>!;nhN9hZxH~6xl(Y6W`hT{UygwLd+>I(!uq}y-*$Q2aSlvDK_x9eb z_nF4Mk9n%wE~247|Gu?C8RsOQOf+x>;WP}Ikr-jFfuA1f#hkRCQ(mE-p07vE278EK zDQ16xSd3Y$t&#D755E7kTa9XGHVyL$V7{6*$znNT>CvXdLEn3( zNF>XU9Nkn@4tVQDn@lA$n@JF_ zmOX}rCscSU`W|+s@gL5G?lewp*EhOG75X1~ZmrfojF3(n^Sg2IP8TGm42vuxUsdaZ{Rax!c8}A!R!CaEcmIWJQX8Z{CI1)t z$!YJ0Kw2yS3Mb&W6HYK|Ai^WGaNKA8;ynh_O>0`+H%C{Y>chvB{mG;l{m%yp;?n z+Yw^fxgY1Q1{HP5*HPkJLHw`Xeb043ezn1f_T_4iFo=W(cfa~IR5!Bu zEpoKZ=O{a>Qvx1VuMSbSP~_I2Z@>L55OxSLFFi{V`N-*{f$fonhPjN;9rBz{e`!ca zo%qIg54*M={F;T*eJO3obxTfDb~7AA!R+U;Q(sk2hOB*i-s-8Lljb_IdPcCIobKi8o}fV*Klq zU9}*OpWkkc=G~aPmPRI@;1>U+M=sNOWBQtfSi*ZBfL$>>8_T5s5&bktuQxydErnx4 zp(Igg&2!ezt_|i6J#$`#B=Weo-@7TKy52^aQ~Mcxf4cY8{#%h>#j7#JOTqm&ugEB5 z22;yzcb-okHuSysTE!P!Ze65KJsO_4zuTO1!M)cghgI`xl z;&hXsQi4$3)RTWB7VeHGQ+_#beuiyKj5l3P`*odJGQViBj)bb7Z>SHdVTa2hO*`+% zXP>>RoEi-r1x!WiM#{Pys(Wfibb6=1QsyqG)%o9hcj3jUD0hYLA9@DLPt3Kh%qAG+ zd`g^gKUioE-J3j|KBQ$H#P6&LA37;)HvV`R(J@xeuX<=5y0^a?I$a$~6R!_QZv}qacss9}>7V`)J_G)x2rXw`)UlF;VfH0~`Q;HjWR3(}55mO*$k2XgYCt zh>Y+Ihejo&6F!aiGYP>3VdQ9uqN*#{Hd32LH$dPNP$x)-6Y(h)FiY}!z-3`_=4Z}{Bi)V#rrwsB&I0CF7O zB(6hH-k>IBi3Fw^b z4=-{@TSAH)ByJbEJ>uqu7iQr7SGM{6jK&)Zd;<=Pet#E^X*_G^DU#v;U7?ZIxWAdX zf8ZYMcoFs@Koii0kg{Tpl=nB-&nO42&azfd-+yPd__F?Qex3`kTWpd)$2WMeS$Oj^bWDDbSX{z=jY&v}Z6#HUnf=a*yB zS?p5Uym0)-a5NVPVGtlR-h6-m_3u+)oIuWfOOlRk4fFNk7{d8 zdSj30LTKfo8~g5u6Mvmamj?r~>i(~tS4qZ^Js93E=WT6-ibZU0C_l^lt|(mc>*=nh z&7G5eTlXx6*3-CapP-2nL zcsr_vjja-o_s3}X!)6vYk*kEF}pBhj7S^tB$D9_GsQpp})Uf zX$S<0MK>NsD5g*DY?y~0UYy*2Jh}6ga=QIgFEaej@Q`_en2F8owug_;&u{DNQ;Unv zH~8XHXKVfH59W`&@nIioWrmYYle*Kjire>(Ny6Z71Fs^%z~1q2UQQ8C7>+1FrLN5K zfrzOj`XfSevOJ)}*Qq1{kHjo5dGb^3N#7O=Zn%`_n=Ln3n)_h4pnlm;25v!LAT$tQ zq=BVXNp3@O#n>{;<5?bwxed$;j7tl(JZBYDk4#*Tghyu0BvsYB%H%Z+U6XN74o8JUm0&cj)V zzl2)}Yr9`0ehKHOS6ZM7AxWo`l;_$wEQ#JCS|3az+uY9g6_Jlb)N7d+9aRoo8m%j= z2Q#O-q&g79a^-YBzW%mIJ@?L~(8n^ckXmKJP96!YywUC{5?%J-y*S^+7+=pBAE`eE(uaC=eEblQL4?9b66G zs-OJ*CeH(v@!C7 zH(Xqc(soBF))q?zcxuQpg$aec1x9GJRQAO~x9HEcRzdEw&iyvltHsx>ZD+Sj8%@kG zQcX$giX6J6{&r~zQ-_ZM$9zw+v%d|f7^=JDw^T&_m2AST+Y(J~W@+Znc<;0GrJR3} ze|4hT>A()ee#dWhWOBQ;By=|>GuT<0l^skzxAaJ9JW#|$+I*gma% zS$|;jYZwVZO&;*A7ml*8vt*hwI>^TXG!n@RaM^JWtcf zN&s9Oo+8GjX%E5apr4u~VZ@}p2i@G<_zK09Sjj==3Vsgsxt76>OTLPOuwJ{w4|!eX z!A`_tn-FISgSXr%R)v2#2MrjDb75DDDlb@PQtE~zDq1)3QAOpYWI-Hmqqw0O(}j!{ zNK7P>*hl3R{EUxojei+OJ0az0^u

z^Ad-F(pw#(e5Y@|aOho|C{Aa=;*K^VGlX z8z&i$>IdsnQ>ByEt4Z<*d4A{#J-BYJo8jnXYYC{mn4x;jEHH!ebE5=I{rzOzc{2!5chkzn2>KM)_~lo^G1?bZeO=Cwip$jmX@?{A5q_hskZO2prcBnN9ms(~-DMDr0v{fAJqr9}}#5-g5H5TJiO78uTDazG;SSe>LHRi|+d z^f9DJWRkoT{()VJy^zw|tzLtK)Kr`aeb+iPQTMDMnpB^r1h1@m?TfUNZ1J)=f2|QB z%bk9=T`X^@89;uyHhPyLrr%-U==Rs0mX;(Fd2Rk^oP{qbIlu1YS8nE96Z?Ai zeEo79nAJ{4;%OEr^%Cy(D#ytjg!d|?f@hkO8hv8ymhC}XYsN${t?0ebgz3fMAa?1Q zds{h1_i4M6`-`{KJRS7lVVp%WT|Y$9lL|~ew*I<1{`?WL>z>8z{@LX-#lb$P2f$^*Kpy?thd3c${4LFmi|cg3#80{bEs?FQ3W46OE$E@6sG?hR0`z+m4az z)8Gz}g0MPJ*t2Iv+5DxYZ&w-|93T89_@5zGoDsMYG0|~PS z&Fi3~1wIG57DbMI%u;OnxD}=e@?XCfv>L(BRS~?@qp<0*Juz6c#bhOB&B2mt${j-CMw2F%2rn`8Z7HM3?SS<84<=h2=I2ZwFq>9-=v|)gb z1Ju|DdWo3MV>7VZY(TIFRz%!%4B85Y0{x)ND&SNL+|V`?%%&b=QFGqR-20}3jzv-R zwdPzKPF zXz*rFAu}R|G=nOV;paLtS9`9~t+av@=`{X2$`U3E_E1Eq&nBaCDi+mN-aa%WwP6La zikw}9ZrlI$vp>j>i?CLDZvVprWN~%R)yk@>3q0mh_s~v4ELJ>{O_d6`HJ^TH2ZiJ# z{lG(8(yqG}Vdtv<`X!5;(l=NLE&JU@bbO=I!bSIYcv?^yvTGGyV3-lG;@3!PP}^U0 zpA>YI=ZJ>3_-}G&Cq=Y;Q3e|)w2qz?PI0=^b>FA5@mWEZhsX!du5Q>wJ$)+*OM;P4 zX(uNqbc%uD*zuNU++|UhAV-*I0KN38X@A;>h3$o0)Z*v^|M5qfh8!BmG>Wf4S$*vm zU~bA{mx4+bh>M#3saROA4kSfIcVJRHVz7?Beh?iAmKzr{C@Mm*2usv=izQgo=elR& zb>fPIIv<)(PpfcC2~+j>Cly$0D{qImv=D+=n@r?=&z6XXk~q_OxWx!CxE;44`sVT0 zF!1=Bg2=~z7YL&q)jyqpC}ae#Uumi@X&jlGE`gMKyxVUxKbSE(oN=+e?`5q$OHnlW zdM?MXt%KLC$Wp-}3@UFnJZeyBE1Ww-o%u1dch_3(2}^PyifQK6Ezc9fgC#V%;J#On`E^GU!D??Gff=)aZ^} zpS~+a1N0!^S>tOAo+V5HO45c1H<-Ay+SOw{zBGh6t zNZ&QN9#O{;t8>+FgV5gx%6p74Z%%hr2*npv$$a5Sbmoc&=8GyPEKyI&y1gMD4lEuD z*Ds^BeCsb8CPhftyPr2Yt(>HzS0?yDE;i|NjUeT6ePqnNQl1UOK~19&gf)+r z!yBtA-L1fjLM8%6999#NMh3sEm%qZNq^72yuY4mW$Baoq-d)(Hr@l6T;Ok@h?z}P> z>)!_TbXSu9$Ps#Xc4Wwu@b_Fs-}+hR%;dq%1Km)!C8JW)!8a7r%gWU-yfdu+DMqxiikvDlxQu51O726F zOn_E2DC5}8L^nN!nH7b*bP-1kp)9`HEl zs!{XnOInWr3`qpJ^|lovpC>umhor-~VIrkfdpH=Jn5re0*YpIY1--{oKHu}k#e9j< z@?79*{T-v&c{t+oxpMuK;vS|5l`Q%r2T~b=B*g0)x>EvN-M4J_SxN?WSuJqYwt?T{ z4}Y*s?v1zi(pS25O!{-mxSKDTn~+Af9vDh-GFcKCvNAPA+#9f3qLzkk%u~O6>ZRGp zJP7(SB%zBw0*Y%_0?UqnX|W%)5R-1PE<8y6^2_4rkBJ^2S~oRd^DJw0lt_G3OxM2W zg`tVL0IL+Ig{q3kwjzb1hI()Tk@E- ziH<%QXgv-Gpjo{>Hwu37t+beU(YKzDQ=R$5vIkEQhfc#1n<(PfybaxhDLKA=*j6)q zJj@Y$wR~`1=&c+44#c1Etk8EW!<6dMd&E=^j?dL!7Eu8QmcV4=GzBlEfJuZOJ(D5P!c*ympc)=kC7lEsx+yOp{8a(Y*Pz+fL-=Y3kMY z6lbTWn$X{vP!u@|MuTX@AZjs=H;fuaaK?+k6qCb92^eq-C2%-**z+S49@pj~mllL6 zC+DA%EBULEgeYvd5MF!})FhHNq9ls}z-*pL$?~8VT6$!YVoIPZvUF|g%fDv~1O0iOK$R#Ct_bwcF#1&Lk znHmsri?G5~W=&ymOZT-W!lFj*u_wEud9bjX+>#o8QiiySx;?VfWp-&Lrn%9xva(8g zR!1WYpfERe6rNxooe-AbRAiykl5UtpY1sXerd@J4U3lnQIXB5Bopf(?IAr?F!Bo(h zNu}tC%g3T4mlqZ~1NdT9`=Zzf@Xkeks5ilPYzBwX0&qcumtkR)w{W-pX+6MgaU~yh zR=HPR!ZJ6Qne6B1T0!G)zSirb^<|(FvD67!pSy`vXP99 z9MNAa@_%VeCn!ke>Afr}o(v(_L9&a)rfMj6un=xNLk$C|wp&IM!PCwGzei74aW&%X zs4FWC^hMV1{d#^p9&dW|oS~CIm8Nc%zRC^5feCSC14_%?f`RdiFbw;vHy_d18YQvH zVm?4jr<(|$#S_Q*&c&Ar5<6Pq!wJu# zSEmACJv6cm&!PL#r+k<3{xO$15<9EIS3^L1)) z0|qZ`Ky^!UMl_StuiO>L3KzeZHP%4QpzIrMWPsxO^{&MC!H0^;cTdjmOV4@Dkrh@% zMfNsU4^LZOKV-HOGwCh4|DEgLw~Ot2KRGbAW@}W!{ev_VUnDbNR$XlOUIwxi@}~Sw zHcrV&R9~%iVevB}6Jk#2tySPP)A#w$jw9GKevg(1!I0wO8oib% z*~j&DH;EUS6=6*lI7e4;5YVk@eb3Bio-Nn4e9W!SExU}IJ2We9p@0B1IjjThkoKKu zo>#__z2pH(n!?kb75Bs0#*O{P1ME!b0P6RY)ZvfNgYu`VceO6U#Bnuw=~3!?R_6Up zYtVDzC`@6)OHlZOr~<8~O6G12C06;@$P2Yh2_<ToO4eWaUD? zZv$8pJ*C>#K>Fu)OFiATdFRUWTkl8i!Yxs{F9(e)`AXB}<+%dBx<#ey_JqkkMHwJ( zc3LAll$>;j%&e_bw9FDoXm)<=o#2HFQQVNBz|&GNJNf}Rf2r#Y4sG4Dk)#5f%KD3M zf#N$rMM!t?V>CQEfi$!yAqiqQCEn6-2G|6OEBU#X+{ocWs=c4a@ewJtMK`Z}0)UktidhB+V>~C|u z-#l^V`}`6|;*bP69b^#XQiN2L%|C_1T&XeY5;9y0hBVm=oS$CVnCY%Nw>)~PhP~uE zSK^Ebb0<>JsA{ZxV~yHcxDN+f-)*kIp->R4Sz0=2;2BNbpiHE><%`v7LHE0nyW{|Y zsLcgug=Lp#r=KQM?)UJUnKf$fB{*Wdy|wO{+IqiZdYLRYlPK}j)7sj_HQ(n>jE#QV zEYd54hWb99cC#j}XfGvD9=8R^rzDw7A!};_AgOQ-Vpb0U#j^1ZGqZ6Q8n zZ*+a_*3S|v;oV^n`@qVNCuc&o$0mP&ru^XJMYIsYps9j3Jy&}!a2LPkmh_V!o_K=N zKZUCp?N&&mSm@c}mz}dj)YG*(gg3#dP> zdpnq;tt}kQDqA8b=c1w`F_&a!R<8l@uyqxH28#(vL_w79N2M6YHsHFqi(RGR8!^$F zBQw|QmOjr~E!nF@D7~m9TmJB^Ppj^8cBNGS*j_<+khRso=Eh8WdN@k(LwY#?_`~e= zP~kX|x-O9fM++qkJ*J>ZS759|#2X4oUP<^!+%&%Y&M{12XNqDN3o$xD$8FTctg<9f zj2WdX5ih+Ifg+-mK6gH%T#VV@kW%YkSPzAjCd}kNRol#)+-)_YG(<=8$)v;VkB-6a zL0+Bnm3LUSyY{nYi%$g2wG`!=;~i(iptS_VFBpXwCQN{@d&&Cu+?f-19UloZn zRglsEtyqw>YEoHoGDrC?Xjf6T1MbNw0J)@J`Zf?PJD=Q+u+Xbppx-&*xch zewr|Sn9Kt?y$KugMn}FZSgBg^o=rYKjX!Da0rJYyxehyGaGt5Db0j`=XXtO2!`~(I zQ`>XyBc3(hTZN(PJ(IhS;<*HhSWMy92ICCSQV<$cmlZse%!zpDb4UT63w8!A)82KP z7I_!7U*ej4KBoi*!X&;!=qC!5-4vp)j5+ia%W&-$vWBhu3{c(d+z4&x0enYmN3Wag zX^J$F^z|_YY@;$NjzvEp!>^!qxy4Nr5;`sfXL(E^(=iy&k4Yxn*o3yWbd;D^!fk@@ z&33W){JViQwc7rA+@PWp-YH3Fd8vT=pTp|6hCoe1M8#X3nrKZ)Z7NE7sAAYHm@@Lg zM=;wj0)dol*?cGR5R-Kg(jOQpcJocUqy#oen$ykZO1&iy@{9jgvy*GoBdDBSr}P^U z-=5iHHi*LVkL1w8s$)NJrS{o~?DZ2Y!V3}}~5IpDZ(`(+y8;#kH#Zj$aC|#I0 z2aoNAKJ;LTqe1={d&{DaZ4ytOoMiEU>!I_>^{ja&AC`SDq2;?qjm7O{G!ey}Rlr|9 zhDmLd&viU5?~7@+e&lX~F)AlXH1mN-SndiwcQKwvG`e4yKU2Uc2obt@b&aI zqChVeo%0Ug6P52=Buo&%M4yfEJHtskD*;7!%VF4&()tn}k{{9H?98yR((JQqJ4d14 z&)%BIc)mCNV0*doFfDVqbdv^VZ?Eq==*$c~R8R{nAz?hYnLU`Va3!Xja@HG~d`m*- z$nrzZFVnt%A3W=BXv8-9)8Er`dwy}zVZrA@Z&a)21;c@N02OmrKuOnYfPNIOMCMnN zCa&ANNT2>Ao7=P4vawhIi^Sd#AY)Y&kG3hsk)f=QPayhN=sUb0-Gdcdoem;Ip z9hQM5_>^*;UJBuww{!2Y+p5xb!QNGHkt5_(=MsCpFr}RI7##;)X=J*V37U!4q*RW3 zN{tGowFY_~&b<@~QMJ1wV!PAwG-Pe_%w#t@`nJpMW&q}#rR2GBFnK$uTC^+a$2)f$ z@n5P>yWcFXER1p7ij-eplVpDhfu)G4ks`4t`1Zc34fmbrun0dLR`o4QC)GUBJHPm& z@~u^2_|jBVM=lU>_O8{sewGMZ#G4CCxHhY$-H=SDZgPseZ6DWi}`Vg$R#Hy$m%TLW(Dk)MaMMUnRJ~s%O{I!7CC>{gJ^9#GMn5HORlU;M zz0;v|4QpbLe%K+xTJqcf8Jiy#`(gn<@RDcfhz?4b=j?0^3Y_X$7nyzg%KIC=JukWR zyDC5K%(CXoSS@Xat3Oe+v~p?R&zPMEyz(W-L@DcPR&9+jx6_q1i{TyjkexmA(BC&# z+Yiq~MBv;T4__UwG#6QP^sezr$rHY=`+ioonPnmRg*_DhY zxyHVhZb8me@(Yuvn^#k;lI863rQmmpYOUYha3~Q|?#AiB6QRgGpYr@}A;_J%cx&p+OGqCDUP{ zS#p47*Y|Y`{=k~_+Aji+#GZR{jIC5pjP+Z;91brC$F*2QG*+n?avE)v?b(KIw2v7b zOr@R4JLHRySlV7am=4{mKb&7}%%4B6UA-2@txg6wU}V_I>w02hmQRyfcRc-fy1I5n zqVL%5&luUp-MsiK_+qzq&83$?&n#EZcgx@3nD(vT-`n?I3VDBBb!TRI`n#M}qkCFZ z6c>=ntAfHo;I-*}`j*7a3K_s2->^juw(#2`r9vuAl2heh#Dk#W9Z*s-Ad;1n>_pc7 z&6*HaqGaV`vt-4ZXqh(cG^WpZ4a8`_iOg^WTe}wC%2zW z?$b{sm4qJ1=7~4YGhwdCHFr>3>r1c|i&j@1-R{D2gC_3Y-Qsr?+U@EKS?Aw!yZPI; zPYl#4?ck*hC_8MtU+y8C8D5%h6_mZSWZSUoJT@kfLQN!Rhrj%o(_zw=Q-JY)d5I~u z0|9Q6HbXkp3!9#hMp6^uthyW#r716+)UP6M41Yv5#83PhI*$aUPAiyGt?n&iKHOfN zYzPVnAZIkCF6WasWg_&^M1hqCVV--*i8`j}7mEolPiDi9n7iik8};y+{Q~Lu}CD1kc4pA zT4Y(}yV*MSIq_;Cr!-a%*5^XEA7`GUMekk00l2Awz`7fKBuo9^`}b>Z^cCO)D95oC zzCWsab_FOON`3N4Uw7vloU&i1SXtyGzpVS>73lAO)oH73WZnr}CN2fW`>Tz<-)y+K zluupm4r0YD6=+RWCgQZ?9nTa1qBL~daoqMA@h6yR%ItEc> z=DiE-5a77C5tgH)J6sVRb`n`|q4EJToK;l_mVh%8%$La-l6QKOBk6EDf+TNOp$=;y zk~G)=>FXaKlG+?-O3e=qwC3+!*#Eu%Gw*QGcILPCnIiY&2;<57OA3bvle;s4Q)`$G zs*-k+OxLO8Rw^~|we)PS)yJ}87uKb*iMlP$RJ$*DTA9kZ?DNaL&g$0W5Oa0gDO@zt#mq1M3a3@G^y--;byR~c;K{c11= z++L#^z|@{Bgh6K4B(M4xul+g?*!lDHKyT?lJtm)hD&-`#j?VnucUK7K)kn=YfF^Uc zrjsm=wPQVWQUysRE<&gi=PAb$W|-lxDpelKc}{f6@5&@1j>3^Wtr%HpooF%-fecF` zX%hp=ppxqNe0>M*@`7trt>MkUk?J1gVxZMhr}DS2GWtp{a70T4J8W~}k_+oh0Lc!5 zVoO4PmWnutnLG$OTpUviJY+fCOY7Eew6uSFe{MK*TJ3P<>AY~l)fvTvuI)V!6@Atd zHR<^><$_LCSSps z6Uz9uE}AO@g@W=9<~$_*ux_7M+b+zk8gjJ&*POtXdDtOH&SrzbY9A`1xMQhGM~ndh zr8lAzxWJ#s0PUrXMGx&0!rT^ZD$yrp>nhEY6bP7x_vBO}8HbRTcTu@~_lXl=g0=hb z1Ljghns3E`?tG?}RdN#AYThiBZuE#jp|(*gWI*@j?WPiA8(t?IDqSGp2&q4uD0r?r zdM@n-{>$Gcte{y9*n4@KC^8iH@=2{s>fxGscVI58_`1Y)!QH$3Ybou=n}`*2R;Y?Wxfts}$m}k!rw&)8QG*w{^}I z{g4Lfjy1SfFK=%=V`Enr0U*nqYp=`roVH4i_Pp`%<(nzN?l)G6=($6iB(m)H zRw!PPXNz~ltm#puS4k%S5 zF8ZTag*bxys7g!ll#86ath5|Y-no+vVsgmdD=BGxiFx&!Eha9wSXtOxQTx`OqA`GA z;-m6pAb&{9)_T~)Hm8%9nxH<9?(PaVaxXD)3Dk!C<(;KlY3|6Jgw=_;=RxeQOLnp( zp6S|@3wA14?5wt??}%UwES^ zb=+|c6t#C8p+^UvCAoe?i$L*Y_s=Hu&DPJJob39cGU46j?^Uj2rC1r$4r7-`_FH3o z8C^&#Oj*>fK-h0RCr~&*gakh6>P(AQTWOeF@jC%u03?xfl^J?AKC&M8D_6A3*M^?y z9ckKijo%ok%}6<(_?IC+!btQu(m>h`$KlejRnic2)|*v}2%3vOdubbYR*rHS9&Lg% z${VPY=}6{bE8`VYstPi@&bD%Cvg)X;IQ6>|J2zm5?6{tdOsY+Mk(S3qKS8ANaP5+4 zgXOSyvmD$=H&y^MAiq;u#jaVyBhT#=DaY<)rLVo^0Xgv?p{E-f{=2+uohxLn`fw(6 zH`DfD^{MTI$j8aEj^Emi-tW7p?ezQD>lh#$y)^kgbc9S+?+VB8qM2EtD>wbY?>R&T zTi;Z>1^BO*N&+b_#_Pv^+^Sf%1d4yHzs{pey<%Vp|Ej<$H)VnW# z-~T%Q(dYNqxTBbq@ZlwLsnv<#tpcai?YAt^P#OJzg?SPA!o<{3%*rDHSlJhL?#=!& z0ex^<*vW!oQsY7E>YkC>@1otz{pK@j6$iO3-1}4XkE7IEncpy6Ecj}JOV`f3DE&O9 zLgaUBNZ%k0?acDIuD(*hL1VvP^&X3Jbyun3L*MFFjl1Cp$_n`rYZqOaoR_Cyd;jOi z^k!`8{%xuNXyJW&<=rFDlHsK~`pY)=pR+O5W4@t>)CZQUD)>)sMJNcC40(3{!r*2$ zE4o_`^Gjts8q51s53oqqYHEo0tXL6$Wx3jJFOIl<(Q1_v3`>MbtqWv?NS_*5SXF=V zX%tQ!a5pVLHvjTkYOo!8Na$%9AMfdrdroXE;@%JG5z{}h_Gk5s9<#W!#H-&@VJoi3` zZi2|dP0~q_$n@=Yz6Id;N?xG40bg-=_??E;py4E-L!%?ug+-_K`mx7vYMBgr1$fA{ ze8IF|KNl9P3IQw*A!(BBGnjn+>hp(#v_RF&&qDB}7Oaoj*ZoP*IGmLgDL#HIF?`@f zeYFt%L4Y3KCq2jIA6~WRjHx}{+dUCfJrQKYb>&!YH!pJw$`CL%Q`dlL93i41&yhEg z=|Vq(Cv9)skbA{8IN+rAW|=-r>&RTN+&iuiM5Kwo=){ zq{X%&a<@&gOFjHVhicNJ4Mox{`CH;eM3&Y!4g`3@TMU5w0^PHB-_;#NUlD5+=is(u zJ1#8tcKL)O$vJ82ucb$>sA+%4gT9cB=b=A;S+Ba=?k81N?5!_ip-POMs~j8)D-rr3FTgI4P`u z8S^E=Ec)BmDgm^XVtM6Fm-agPcC!7FVRw7`rRof9f$}r?&)>Za`D)yUZ1?LENgZzKBA}>%&g(8paW=#&U#)vBHF1b5ip-IiJ7SQBI$2sva$0!_#=5ZQ z`kvVNr5Rx*wehstqMl$Fkr9XdxG+u>LttLzmyM)o)dQO3csx5x;Y2U$l5Nmj>RC;RL3 z!}oT({(*Cy*L7X5*JIqDXhY`@9TIf;5FTNTSEBvaEpI+a>*Nn`ZZdFu%zu9MCuD=IdP8smjb|I8V#qbi(e7`~!xc{PEA6q5e(el;&XeP&h`Mu?{AFiiJ0 z@1y|;3J9cCU%nEv^`w|hx7I46xH$YiA+gE&aPpGh!!ojAe|0I6=Q7;O{Z5serq}g8 zKDC|_8w&`5Pl_=les|d&`B+4R0A6{dcb~@Tej(jEg%a0ZzO#Q|pG$~EIXRpsAwQ zV>K(jY#+yFDF^YQ_QA+Uhi7!2x=@*o)XOHo6B$*jjy=CSwz*D)i15mU_|(maP|OTUjHXjW?nbWaKC#)9zk>imwUXW)B^^otOJPFcu)a(j*h( zo1=~Gw<~7$`R5dsaLwC19d>-y>he@3J(tMYsot>OUD_mlP-|p_F0YFw;8Ky{#iR@t z2FJV}hhH~^F?e(M^1rJx)Hfl_Rh6QmhCm-Qd-7$3hUn_b0*P7R5cd_@o0joL2$vbGip z29quV;x9rbey4L?ehS7ckA5@WlBIw62`^%}KbLLkI){NXU4uj+N6CJTP;#|&*xZd`AEXY+%{WYHp*l4sSi$_OZN7YG#Ltd&<+wKQToqqnWVwKXteA zKTDRdJDNu`F+aXcg>3_Hz)fpcD$Bh#5vBjAZ_PTXpRW6xl9>cbp@`vhZSgJ*ynt&L zlPIIlx;f%!;i3Pzi*nC#Y;P}PJ60k|CtEW`#{}N+`Ufv5(wc$ZBWW9X;6>16reZF6 zqVA)H&Y+CM2j+i{k9no=p>cd>00Q;@c)Gtl zuywY7_u|ye+_?9&uOfg_)9{RiHUyjfIFUE-%TJ5f4ITG{Xc?$4`%k!k@^LLU_q2oC zX4A=;x!(flRatpmb3Ixt21{9aCOQ}sL_!8Ul<%VUX&bYiomBbTy6IvJ#|OJt(P;^R ztM#*a{*U4o<>TrnJ#p*l;CB&rHu5qfhPLK)@FOzISDoJ8Ud}&;F{tkvudpI-18=n4 z0H%S)zF9hdIN=7+Y_q)FXmoodq@<|0AH?w6=<(qL*Yg8Z9$he_vMG^r^Xhr4~xJ5->t!uow{`7Emzq7zr?HbUsc1 zCv@7U*?RJ(l`=MeVQKv`IHp5QwS1s({^+-1G?jX*;XQC*+dKtDUzV>1%)M%FV@N03 z_#RA`EM12;C6~d~lX_pbm}$raNDQ!*Z~+wqMME&9h0hJyqrN#}|8@=Q#^N_(}IuI#OOAqnLL+#xT^Za#ghQ&Z)V zh8sju#adq-SPS?YNMxn@g~**de%zbjQCmi-aytpSmq>#Paa4wD`LI_Nz4AjNw-}2E zxl0~O6NVup?E!9GYE+YCUz7cf9@YgB$fTWQlkIEJy_d!fGi5MZAd(jdhG>61x*92j zeh~b5R>aaz5Ne0RYfYLw@J(EK%CdPFUUQPdra^HH%Lpg=Ci&1}g&2kF;>svrYEgYOk1y z-sT_jWf>EysdR0b{_#eKh{A^5%I#VHlJukLZx`-W8=?8~t|X+uI^t$-hlCf9cDJ|n z5!3E&Gjo^R5koU5U?q_aq{Ua(@Uc=Oqh(j>_}Xls$qV3OzQ(N)JL}({{X>!IhJQ!y z1FQuC*JoY}jbyzco(*F#3&g+I7*eR8*6?>yQ+fPYowYbTYn^@iV9BcYpcV^Lzia3~ z^Gim=hUT9P#|Sl1TJ!FeSG9NkM#t&^8%ueBbQ%r%#c1pZj?qM<$wcPKR++x|^~vY* z=th~VAtnMFt1TR2G(Q-Cl3e8CpAWCyXgEphOW!LnnraTc@eUQjM!zYfR-AbAC&c}l ziVvCzMFRk4J^(!HWl-geg=V1dy<^Zj9^%PS4%l5fd=X4{{+?MXF9$ z=1u$p^`5L8<$k~;I-&6bV#L0o6kzt`zIj3{3j;T)hbm+(RkkLOd|#I4=9l<5dSOP# zL}cj4hIfH;h8TvPR{y6%iaB>d*F$NeKI$ZaM~3j%3%Cur(~wIJKMpIql%+e7f~3wr za(#B78h#2|O-Zbc6eEwJ(8U1zJn#xRzQ84VtW4+A zq#1#KW~1}P7KPN*%-NFttk6y@gkT`fLY!f25~i>PpMl2 z#%UK+i`CRA)gl+rwZC2uGKPxEtJdEKK{#p{5W>Z&C2Z+PlL+<9Hg%dUp}mQyol`##I@_Pa8Y+z_-hpkn;& zFh+;Ft+BF^^i26|f6WgmgnXuk22y!wcidxT(YV(T7yD9=2#jtw0eb34=u56v@L%c1 zjKt3jY`oqNbaR>Mo}>AcJ;{7$>e_?0mi06~J{bAH<8wLrgjFy@&aezY6+l!-jug5< zi~{I{S-qQDP;$UdF{sL0>P?cbgsI|9X6nzDmbe9Srw2_$g>SbM0fC7$P_=3sTe`-B z$Es>s0t$I+vN1BfKi&?O(kn{yYFJ}SfDd!+>NAhy zp_O^0po-toWlNUZs6{dGcxoj=DDM8sJ#^Ko+Um*q7q{0PV$mW`w;rjQJHhDCLtPp? zbll#z;t4CYg_Je*@YG6m7*zlnkl8ZtL8Sd7_%|#g+N7-s2 z3KCWymWHJO9{yHO(IT(^hqaoYalcm<%3#$;&h=yJa5XCCG-RP-5=?uVaIyrC`lnc)|q)%<*0896_nSZ77%c9 zm^YC6v&VTZl=X%x?Iw9mjkXgB6?zP%L8`Go`z0)t=p?Km7}Q#djFFvfNJnig4-&N` z+oh4pC+m={nSs4XQghLIk5wA(3FkuDO=~UAKrd*VMgumo>u2=z_R4Dx04+aC^k37R zXKwSD)dN4kC)9i#YMxTR6?w`1;)G2gpB4H&{NQA6QPYKpVB8smqQUyI00`|bQnpF} zw(HE$3;%oE5c9mC=nnFp5S6vb-;qb%+%KRyw@X!Hg$M%Rc$~`v8$aX8SMv>nLcp*g zQM)znwVtXC+}eGPzEruUjgzX$CY?|y&AxR~$Vax2?1an5z>veemiK8V;~Ac}MK|++ zbMG;&n8jp42TkuxB#(xZi;$c-4>i_Rgmw5{7zX$JIe22Tnv9Tvz^K?_y;G`l>PT4Adpq}kBel0#id~xVVvGn#F?5D8t4Vo z?9nMglB=PA7<3w51qXe``MW783f!@`HcTB@@_J}4`*juv00x*dU}T{BG7#A->JNJP z1w4rhj$ zad!C1{keW*ZPAT5R|ejNluFg0-LheaK#ZHAaV~kRQ1JH8F_g+R7Md(JNKHs3Z=Nu| z+1E$1K!Qt{P8^7+!lg%Y^dLJ~WIm@A7RIbMQB+UP^nqy71ovOjGh3l z#oD@}yngZDmu0KMeDue{c54YXc#*G;T&hvMGcGY2sh|8}T|A$aMaUB)r&O8R88_d> z3gJdguW3W}YLRtO_2?AoB4dZdYjrQ5)@ZO|sX3|SRgMj9l`dE7)=a(I8|x;sAs~T4 z;M&^B56Z?JQIKD)GGded$t7D(ebR7HjR)zkAv z+-lu8O8$UELDl9kYuXb_8Cu5;@W>CuJsA?al4bHgx_%t=lG5DG@Gh4-w{tFN1;J_vTW$B`XMr~g;-b9Z+^?ciq zF4aX_(#4N|>Id~}q!m%Meb~v_6cC1|~;SXVlb8ZbM4uH_F4s2$eO5gY7rx`4rK9|D6pSr!~A3*Y3VPit>6Im&snV&LEB?2HW!bjHc*?D1*~fC0D=;im$f>mD3_5I zVZ|@;)Y4GGik*pbi&F6FnZ_$9|9yP)AW;eB#h&|S|zt6A7e^hrfK-C zM4G0jL5+b{mr|Tb0zNSe(U{VK)Tfp0@XxoSO3uF9l>IF4b7cH$RazR()WRO}>TP13 zgw(Lt9i8=_5r09HPIr6NY=VY1wc7M+)eMtVtYm3tlfA8#R|yeeWE*r5(3xn5fV>UQ z!wLQuLZk`(c@}h8^!@-QcK>W$HDu#sr~17*`$a^aM#f##o1z$(_h$JG5T52a0VFK^ z;=bE(L%X5Z8)1msf!;4|m>c}<%^60uYQ3iX4##((T*-NrD;k=>cTLQ#BET=eU*w3g zEB%M(wx@vL9cEEB5p6qwwO$%Z9uU6ZaMSP)bZNZTvQq`}0LhP~eu8C8odua#N zjcq}(IP0{$9>q&T4CS@V0--G>0|}eS+-$QCyT&VWi~5^3XR2 zwEwgNz(5fP(UvWg}*OMwU0<_nE9_Z43ji& zSLSCk_^fKq!s49?P^Riq^Qfp>Jv$pdU5)SwZy=dEd-mw0U<^veVP|t3{GqZm&s~gJ zpYd+Ou!!)=?xW?6gMPn4HONqD_yya zB)Du1_VnsVY5@&FOnjlHe`EkQ-1tjbjx0kbfJYyG@d2?|6%``1%Tm zrV9@b#cuxbr|^epKAsPz=&CN;EJvecaX${Qhz1Vc6B7uebp#U zetA2V*IR5@ej(Q6?SWUIU%-_S6)X&oS#RjffD!fhX6e{}THY62Ao1}jvRf&o7bTr2 z9|QtcQH^|3=}1yFv`+)m>up{>>3lmTv&O@O`!)<=`NTU)ys+ZIaBSereVIKv2D{?R ztzOMY*-a&C3{Ic0N^A=Wk+CW(FcLQ`CQSRi@po@Hl3VY@vE6!ZuV+LpV&j&*u2U3| zynA%yx?E?(+PpQGSx16lspT%fwBsdJ(04U#}vULh4Q^v#eq<6_N5RZPO6u) z$VW}MRvM=PKa;JQs##WRi*&KKm;@|zz-tr`bQYt5uC~SBvVFAK`5#al5OB3Wep^Qk zvmPi!D~yKQG-Xvp;cx;W_t_TY55e!6|GUw78^~yhqA%>mS?$uYhjKKsCg)QBoUV6? z^o=}vlEehT`_siP5bk};4Y^lAnrkM>idfQgjLz_e z^+Fd?0D-(#DY=Za&jtRA6J==c_=P$ipr=ggv+CRyD`jS`3D{lMta$OS@9u4Bg|eLB zV`Byp#&9pmsRj-I0{P}A;xV+jnVz4J=|@{RH)3BwAc<-nNKjbp$>6MS*?siG>F^{D zV9qlsMnW1DguG`q6GbMqr19pep7DDk44yi{rzNSSCp z`+=w}+MkQ`w^a|rMMM%>=blh)-Y+?spe(Rm>!f3oNgZo?d7`}0c;Yg^Pz!#4mFgGz zxrThVYDcUPRklhaY2-hVu`By>0xvC=T3FwVO``6e3--?yn8b-SkD8t=2_*W4#1MYx zDSTJO-#5wZyZ8O#LQ=LaL-&4PIcSdgSJow;cb@e>MFVwiLD+ln*S^^OSCkeK#dqoC z z<|toeXo%jzHOA9O4frbA{M*i0a&vpnObd23ohj)bHy(cql}VOGI`iM_-cyLX6(t(_ z2xUv~<{oDo!e~#oP+ZJVLw`^3!|`?AkB0ZsErUqHRzq6CpE?vOFsm+*Dd<{LocDrB zl)|m&w?9=yTB4NW|2GMUFLhw+U zrCW~nVZ$QjSClnPwobsyTo8GE-fZ>N_x{eZ6G}hr^OKuXYDv0p*rS28ev1wBr@lh* zqNzu@jHk&>LxL*CGxf8s4KQ>(6B=j~9lKBVQ?{=Sa;v|fUcCX3nqs8@**VZWVz7t!v7uqOXGedcq2U33&u1t_G`EP;;!UMd zJMRm$#bh0E+u89`oku@Nx@=H7du3;5#{ltpGVm6+0RW=FSr6y0(CavN9*Lb?N*XzSOjzD+pk-b{f~|Au|7> z?daV7v9yKMa$=$V-YO8$$C5R>#g;n7(h_h7TS#jU{^vkKN1 zBxJt(U-{;(tJ&Wl{$ipdiANN(k|pj~N@HMv2~t#1)!4v$UwB<8oz)oBo_m(Z1|8MR z2ejg-@|={SBDi`-r0Xw_s&;f7(OQT)Il1R)(ZZ*MgF#=9G|jeIH}1V7MZv9});i8O zsi>|}`;P}hMPwg1v0oEzbJGv-wKLUj{&;awq@zTYDBkqPwAUsKLjYlf{hH_J4`*hA zD*D0k;Bqbgo==36dP;pu;G7%f8Tv*v=y%qhqB>C@k?ZjW!)HDC+i1|esiIY;q-omQ!XmB1j4SB@dUNLR@NjHDn%9^AKryuzI#P7NJwLpVs!TIcS|$}+w&oUeHdb*l zW_f5i*K_gjwk%Ac<7zeTejw`io;=pkLp@caghdEPXf&e0qr(}1F+m&)sSq5Ir4Lw& zW^2L^tgrCyx%)uXixW<~`HMjzVc(I=T?${Kp+pFtm7Cqr=>`}PRfO zCl;yjL%hQfp-JRYP;{E7T#Bw-GxdNmrzn4UfQxDT_Vw(}iY)j9()5FZjE2(?j@o*v z-etZaa2_HXv*qTNGdDN4>6Xjys~q36!!IFIgK-JuDf75{y#qL!Mh>|B3-DNZ>Y;{Z zuRc-*QVs-29`@4`rdCM2E!i-9{k&TgQgGJy1KxDh*}bKF?CiR7h#?mwQvvHSU*`q_ z29iN)U1bNYb!Q}F**k)$`ng%M;+=R-Np*x6pp-cp5>Tv%g~8H{#ic9`YGSo)mzm!C z`j7+r=)2|OR+348I*GA~X_px#+hflmuL>O*bvj5N9$n@*FCrz9QKWU(#wkq={MZ)f z^?q;hY|%&YyomJ-^^Jfy8a>%)6%$iSP3Fzb;yMQ`jHYDD?!>>4M>MHIPMPcrNYXSf zVhK(!XZ=z*D(4R|a0|nPL~8V0llR1aR7X}&_E?kaAHn(M#^q6vTTAfKM8!AdxWzB! zC0V@Mjzu$p7YFG%mp5*Bu{UKnM`gagtd7oFOx&P`)&pl0C9%SX=&k^a@uJQ^++q4U zvH`6uPTy#kCv-p1qQ_#5{l)9LL4bUx+z%y8iJCp0EdM1En3i|3CZGLKGib^bT>*pZ zie`aY@R;;Kp^Pm!Bmb zzshA`AIPycOi#n5ql7DXr8k(5scuf{`IW|JZnhowfUmr_lG?M^LSR1=Vv-uZL zQ`sP1ihyZ=Ye)v)x>5xeaALWXGYb=x09k`Y6<%zHxh(%jX3WmdVLu-nz6qwh!S#u1 zjN${grc2uql_Z=?^TuFC^{dI11pxdT>1CNQK4Z?ew&MS@0B;NF6HAZ2B5inzn+a?~ zA0sw~rH%S@*kXP-9j2+ZO%xYv^st1<~V`_hx+1;i$a2z}hUz5lA1 zVd(l~z#YPJ{Z`lRv#I>xFTO7zR!fKZ*a*HblJ|}GHEFf~u4X>J0+NbKzKW9{j=^Za zyWph+>^G&7fSLQk*@;(0tPsobE6K3*%QjJ4&8R}9%ZcUbQt)(kJdKX`kZ<kY zM1P44hwSf%?~*nfW`f#EH0-K0)$d5^I?w80*W_}Zn_Bq|ccl@Mj{GW(#3Fe47!xW> z*$XPm%MH4iMWvvF(vPz}H>i^apdx^jOCt)AkGlk?y>V=L0R^N!80w8xj2rt9Re7+n zqZoA2Oj-1~I9S1oiHPU}6)8aHGzEI859=}z%(Jt4$ zC;!fW~4W|{g!7JGqaKad>$^-bmqQl1NW{`5J|>3K}(;q!I_LSWH{sraNaJ3 zED-4Cw9xc%{q=4fII#6>A65h!>zuun+=rh|IyN%l5>s5>w>)DC^v_z^76mdaa7~dt zn&s?1`I-C@d7|1iI{s43Vp$&L^WE26_r}id6m5~kt>EstH)s(f8?@TLk5Ih*Lv4>x z&8RTj7>W3!>6XX(P&_u<7uWBXG^u%d6mY+eiS0w_G$z@jT?s_f1I7$%?)xZr``%m9 za&+33rH&Nz1cxBEyKRD!JwMy?pl)k2J-vx|T>GSQz}_|l$)=+^r047VxjG(G@` z>6PVX9bmUICi4B^x#eU6gUow_mxO6%V(!mOjXW8vWwm%{;_xNGv;Xp-6vA}+NaUtX zmEJU8BA4<_9R!_gU zbj_?POWWh+Q3Yn;0vC!uI*UdVyu$stg6{ovl>9G74)P*3DB=YobMx#-arRcszKi{D zo7*-3&G>{*Kt{v5k6Di?4RUISp0PMRh0LO1PHGKg&2Miyp!Fy3NT^j2A66@Z=O>{W z>N{8?CWUf|>hnoIq!)Z!z3ThkIab_jCi6fB!U?k#4zL(rZ0S<1xN&zFK5<}V?I_0f zoUXvK_M-(Hu4u6Muwt)h-~EH2WgGfm+mV%Bm-~=r=``qWf2stFf&WSEhm|ko;KCPC zm?(`deSKD_&KxgsAi~k9rD5*nwOiTYqPc>!PpM@)lulna11h0HP9QbU(Rw++h(f?S z*5O{4<_{~$?I-niQG`uX6iw%5!vk)M=?D5|lMva)@XC8aiMWyvdPXe$UA&$Gg^?9M z=V;W;C$IW^lJ*{XJt+MJI-z51oL@7}!lqjqz?Fb2dqBhcqe1t*NKpu>I3eQtN^Dly zn+*4Px77Te&n}JKybxJWk)sJ0=AM%t-|YG3k;|8XQPDj1zK=8HTNfovGw!7e`Fb7CDo5-?4XDNAl#$v3- z!#tYZy-SqcwZ2p!LiS^^VZlj}O}Bb4DV)ldy@tWSFq%+D$dC9ncO5ur7!Kv_%DQ6a zaJyua^2nW=T@u=~@m_u^Iri(Qw_qpaDH_7GoUQd-SxBrU~x)L1L!0Erqp`dj-eZAWW&Fa8eC(+6FgRP-$7{pylVs->dhx!T7+HVdhW zE;adv&#`{lvgQmWscPM{Ab;YTl$ft3K)Z|h&rF_~CLNqoG-pveY=WxzQ_yn55x?(w%+OyI%PQIIc-A+=()Rti>J`p}N$*w>0-gtOCXtM) zGShJh6z=%FiDplv6;5)^>}PFLgh0OB;Q}n{?7tQfcj`Aum0M9oJWtidHikII{%<=m z=Z79j1dkwVhOnEdF!(EOzla7X>6BGE+N)ywm1qbrN8%Sw`az9UGo#m5!m98MRwFKp zum81+Fc>GSv?lfz0)1lDLLANlU{JVDaX*#qpEQk!N)@$3DWm@Le&Q^O>bU88yFqJR zxMbMX>&dNzN0w)3xu2!)F=)t^HcScy0?iiZmdtUC1?_zWzu@&?Jp3H%KG3-4yz3*f57HB$H34`)A+yhGk*jI#37X7$qorkk^6;E z=mtozxy>?p5_t=G61c+kYhrEG+*+9Ii9~oF7!6zE*Dfn<5z)plaU#~r5i#7>x*Z~( zeeAywcr_?+;&}FEFCo^Y8OA+6Bd+eBa*P4rQguQWD45M$w$WsARuJuSyGQ)-Tf@wo zV}Uw&zm2b76S=@V%>$hrihWn$l&w>eD z8H1Ay`)pjGsPudB=!^DKrrSP2?{(0KkJWXH?!OwDl+Ucj77p%OCtjR>CG5MGsp-A5 z{f8a%<0yB3U+N(Upw9J1-1-JJlm-qGmm6i1aT0G$#_!t*=R$pK4B#sY5k`|HQrZO& zMu_ZJjd=YDp7x~g$M>J!D~myAm_Ap}HVLghV7n{> zON5FFT`flj|2wsQe3_Be)!ZV6xs-9Mf~Vix+*3~+^b9F{<2Ox-+_I=_T0a)& z8|OTPlPh~bHH;#HaT?G&l+vGvty|5HWdFRb2@eW5yC3+aE% zph`KKUj{lI@EDD>wUy5qzt%QQ?hprLESa0rdNm5w8S2-aq&)_~vr@?g+AVWS16P^# z(cH<0-Jtzxl!^1p@pJ=^*`g?hx1bV}7$zel0OzE0R~AApP+$eTQi@$l(bTElFhw6- zGTVYK&i7`{#B(>#eTX#2<=*qv%kDvD3(~fOHgWy5*0IhlOr(J~$F`+UaySjW0cGsO zY-eJBideYI$>q^^wxW$0gdo>vKB9=idBSp5oAYB zFAn1qyO{Szwn?mRY^A56!u`udGpkW5+l?EUiC0pfnw2!ZhCW7RRVpId|LJgY5OiU> znwSVIHl|o^25E02%)}Zm6~L)Ql6o|psNW1xAY6`U0}D@zhQpwZ3W~c-Y&H4M;vduE zo4Si=c?#~X-}LKgqePvBMbQ=d3Qa-enlL z1+35gw6f=$Z4b5L3&uRIb`{aVNQ#Ij#<_EXAYsudeFk6bbhwL**}Jp6{kltkJBwyd zZvWfZ3VPN)b7mxG@-J4^C;51PY^G;#e^DZr<*u}Y&?g|@W-JY(WOAbIQp~jBre`JY za@tX$>BVk+@bTK@8V9lF@8XUCA73_jeqK-k(&5%pJQ}-;(@Of)Yx4$yu&|Z3z4qUW zZw(Uqj*C$~{P7fWKtN#5aJ)*DjnXigpK&8hqb(eFCT4A^+FSSHJy8^pCSF@RQ%2zl z6w@{xn+v}uqS#Rw8R6UbKWHfud+T*1K$5lyZhmWF|nEej0Q}9m$WYbjx#yq13(P694`g>e&IQ-k z*KHg+Qd%F4U=7w+f`Tysx9Z>;IZnK>8Eb& zyvlM<&$dF)QIBQN@$TW;o+*Cv3lt7j1d{l&x2uD9tK<6m4@+~ZqPgvCVc(rXD}KMb zw{haq7U+7Sq!jHQpg80VM?lMt#O(mpvY_YVm??W(?%ZjzOt*F|IFCK6U0pb5^L4Xj zHmCARz{R=J@+pTDX>su=$gIDsKT8c>E6*0?T~sD_ChFh}L`#bkbDbW=+;L&o2qaBQZCBDZOP=l*nReO6!UD%+wQiiY1rZ~Gqo>GoE=r}{N(O?T&L(o%0d-m>*w zk9(HjeCwI^+XX?FIcJL=oFCvOb^A(+4wv04 zyRhm6n9wrU3s3G!v<|fDz73>~R!notjbPX%ahp6S$|&GjiysC4syQYh-8NkV7hS2L zKG#02t$ou@)U`0qh~@T7yG1LlSnfPj9Zmi3+=qtt z-!sdH?jnDrwr^ge2iv9fmRNl!Z5OliNp7pjK2iw(1x4tH>7+OkTike7PyY$1fZ7wu z@j!NCh>?-eShq_iVBxJMmCj`!w(P5G!_k)x0|?*4v5r9E+Q-F=l@ov1=}AS$!};K& z4a#Ea;d5>4ejh$w3@@X2T-_C*fXJ8Z)TwpuYulg0jG_M{UV{i)cZ4_~%W^vYY}M#L zy%HmMKaON7E&vAvim|6gC=7@IY)9Qr?6n^DTvaW&T}6`|^}5IoKIIwb>{oi)J^k(3 z8$I~4FTctr1o|V%W6Il*H)3V457=c}Tg(gQ+EpCZ>J@gvY^VBLT>3Bdcles#k%aUx zS7_e(qr(znSe}2zSTY-~fu;6lD3q;ul-zLkFskkeb=Jz~?Popi_s<>5$^af{_3Ei; zJBr#-R)x;=B@G{Rm zznK%AI*6R(_Sb_(4QOmOoUB_eFTPpys~-N}PwaDMIQ~1@n=dQ|y%Ef`( z%EdwOVbJhSfW?^9?1vHwLa)d`F_&Gr^>d;(uOV+$Mg|fB;VR*JLXV&}+0+hC>DigB z7%2sdInXe@`V_Le4@9#Qex*D56UjEqCuc4@^HKT&sf^3Lf20?e@9DhN2lshyxH7;D zggXRw6yq?HCafu&W08>X@Uc)Jtr$)2fTV1>NMT9Q>pmiZmU~e`2R6>c#>VWA$5uzn zTrNq4j?NXi9&FI<&x%4TUxxOWhI`y^uE?cZ&DtZlKw}YNHBoht3t8mpsz3_eVj`A|Uz{txN zvxqXLr9^&?Y+FJ-+j7u{Jr8a+-Cu}nLo9&Dc5ue$b`1K;&vM3|h1m}wJP9BK7x^Pi zbzQ3~_0Pgm570o(?w zG`v@&Mf(S~7MgD9nLT;APxj@1YGgi{%E#x51|^vh72nzaL&k)Y2P!suCeC*#f+&8# z8YDM5{4r;01WTlS1P@cc187tb2fFRx%*f8QYJnYhC_RKDj*RiHgRe|LpUyK`!B=gn6;$m1!XUc zZK40X1I0uy-J=c&O3nflQyeN(S1*0;9=BHbifMB1$Sm=k2xnu~C$HB#EKd>rwvz8q z!D=Pg?|wxr6Zd;bDN!qpHhRfJ(%OG-0Vll?U~7}y61I}C5oF5Pub?4{}9`|w5J^cJNxs=nW$%s@StB1gwCtUK6EmBelY8>n!z%r9r=~pl=jY8AJA0Ise-q*#Z3QPE(;^0P ziB?WTJN)K&>PG6CGpL_Q{OTLTr&0`Imo_xho8V6U^5#{$T#)5$c62ePMX^hKFO7r~ zIxfospz7NgSrM}s%hFCX=CWG+Mdn|51jh71^y{RxdUljdYX9xNjRHlfemMXoI83IQ zNN`$I?gUKLSy(C*`_a-jdCM3TiqwP{idkPZfYKBdiNbA$29yX6-Rsp{drJp9{9`=y zo4vWEw${FU8*8v&J>|$-9|<@G_IRoD1LS-)(F=p*JD zxidcDO~eTq=vwM6Q=#YvO)QczAggI$?y_;mE?E5&rZ=#hV_VR5LATBXWiIypm-nHb zJvUV@+t)^QTe%vba)t9TfBMsh3D8ST?QYM->B-8G0fu}%l`YZxve|$TF+FCq3HKMb z6TkSb^dH4C=!l6;0-k~?i@H4evv7~>tD+kY$DX-q{B)y`5SNfU7GpB$k+!K{r{9zZP%(S zWPH+X9^VGws>V(QzPnXYqy;15HuLH}q$GS(i^TeKy&7TltAn_ z1Keg^QLFN$&YHDXy4!o;vOB%`awe?`y}@QOl4q4`Eb{4vK#oX2?5C#UDuSQSQNVwb zm`oQK0L7Wa+b}a&T2)<)o4(xTWY*12b7vFp83@$i9`Z8QkxIQ68X7Y1D`a2VM2#LZ z$RpcPo<2{#{!45y0HWAAv!ULV=>6{?AOPM4vitb^S(!0(ab`I9%<|&!Oy%O6u7{=P zshYUNXH^2jusB{cigRghv#hRzAN4M>{@Up8jG#OHA&l-#S_4|SqgvwPWxW8;>l;`5 zUP)i!N@7Y8(okn_5Ox2nGxZSA=(MB)01uNFo8lCNtC`jQL&bs6v*86D3ZB!*RLs}j z{*2IWQt7P!qmCEXpU4_tcWbenT;jrgPPo3Oh!cZR`@j%Ud_Vfl8?o9@P?W{s;r`&78dqLQF*m~N(+S4z=2}Cb<=;ebw|jPnxvYp9!Uo?Qg9P72Mq)7Ea|QBv zVTf%71W$^L-@I01n68n`_~IzfG1lTV2gxV1;Y2b-6<; zi$yE4^75+UMl|2u`3WVuP9WrE!=GaqYr%F2(PR^TLek~i^EU4?tRWSgUIx$=1Xn!G z{RS5R=Zi^^w(jWM>yDcFE~2s5CD8aeXo^zDO`@ih(jdEXfOx1eR%2-IZ$H}f1)zS3 zwfs7M)Md{~pj;~-pPR}+B5KmA34a2?M|5WD=@~KKY72i92x#K7*F1&Z>g2nHcC*vk z4cNx1h3Bn)`7Ic9aY@PUtsNPHtIp5vWMf-nM*+kkol|AX=;LfaIT(oFackd$iUi zbFI6p<$?J5`Nqt)37nC}-MQJZ#Mf@Hs1z6{`j7XmN$J#?OU>5t&H#95@8Ml>i`soL z`Kwl<{VC*!EA;Zv@XSlZQ{l-Tmdm>1F@vZo`32$S+8n~I;Vh_Gj)O~zYgE5(+qQ0@ z>cC~bKB#RNu*s2VKuisTR~6VGxW3#8+WAtxD`P`?eaDc?{W$_Pbt1od{e`nfbMR=Z zWlwCc=g_6Kzd?S}R(?@gQ7O~oleKu}8|3t*q%2(z+IV6D!n?H9U|$Jr%}bT&qi>hU z%1ZU{#`KT+7pBgOsTo{_kXh&x);iC`8w%VMD;EAx&eX}Y)SU7{AI+SkD80ztpD>|e z?C0NF2s?Dy8-RI3p67p`sO3tcp{1v`K7Iu_c6YQ#_m^x5Ha0CY@AZHt25d9clwy)G?vz|OJwBeTq_rw* zMrYIVUu9*}{p9an&}4_mtyB5eHw7;Kk~+@G9T!rO2P=9PI)r};vw3N{ z+D{*vUWu-1I%-S|e(CgJ0K1tRF%sS2(caW-{t1_@cJ(_hRv!YmiEM6B#K_ zJ{tdg1`dmyR4T?a7{v~Xe_O4M90%cXuRpNQycdlLO$ZW(S!&m~-})Mgv)LnzB_!E$ zw3&wM7vEBTRrbUzQCbGPvu^r&tmn5vpG^;qIJ@ft3b-K7DlbaatyDHH=*O~xxGpAwl+-C3nyEVakq`!DM(KD&lq zYa*^C|A|g@=e?Nzdp!T)zrKBHuS?m*A8N^?*Rbi0)z($ocbBZmM`!ILa4E7K!n;|^ zL|?#+krV7TU?vW7kdoHUct2D2mN)S|yI%X8bjJGNzuUu@atEi7E7{V0a&2ZGQ2*}* zsP*GpcT7PWdPCS_r&0s*M6>bS^@Km~K*FzKAKgOUmX7!xu)I$L+tS=~xUt@Nn^Dm* zMP>~WOpu9^`8>o%Pxa&rFUpMw^>oo`QdPNtVLyY&i2sG3^oE*yckw!=Qj)gLblrJD z&J)ToE>Zfollj=T!wff(G@b{l%Y>v-R)_V=P|n-c#7Yei3Szc7ef8rtEQMd@mQJ~8 z_BisI84{0`yJGg(GL?HOxX8{0C0uQGs$d|%@Lg~D#An1Ws26>@baEVd(Ght@zBrun z;lEJjuO1+jTnt|PE4bK@_qtS>y9it*PELDH;uZWP)qpusw)afz=R8lWc7lC=iKn{f zI)3&q3MhFLkuO_cSvnwCnV9=-gdb(<+>#N~&Q<7d4plb7S@JKM^*nKcrYBf9Jp$d< zj?=nghQ8{8sL*CTQZ(ncPY}i@@R*4e@t2x?w|*n)+dOS?yU0QFA=ecSf58gPVfTO3 z0HD}FnXThv$KIye!L^;>agAX*Tuoc%J^u?b_F;R%uXV z3&(!n0S6{dQ(u;3X;Wzt>hk&dh)>`Lud&!XVN6$@<)do;V~|{Zp>?Exi!vg}3DH%3OdB%?%g{f?9>PFez zJoq(x7;qcC=PO$8Lev)IbZyD*!WN-!Hv&p$FZpu}F7SA9 z%wQbrTU%=6CM@{E-5yXGVfIo~P>r45*}_)@MR5Ndg&&Urd+OV#9l+VN5>nyz9o2}e zTwk)hoLoKLLYO;28#ew-V7oVA6;Ro{^LsH(u-E2>jZhu}A8V0l`Ua%E=(5BEyT=5a zO5XY;YywQ3$=RxE*i#%jD77{A)hmnubVCH+Ur;@}cTsYwWT!?}YoQPQ+swKcZW zb1=AIAIB{iq3T|cQAPTZW^d{E{f{yq1a~*uXg)`IK$%&+P${*xO*cV7q7bGl!YDOA za7jNWs8yxs?3oY!eJ5In z5sjvdm7tsNkwJjU!xio+o%k*T>Be0<9*aHkpM+Ile! zBR{IxAuv2yzW#{V4@m$zRGKv<#*tVubtbKXDm`7=9Esi|h}R)Vb|z>36Vt+4zyhxG z6_=XgFrCwMV12FQka}_{Cr%7u=F!wSe)oo)9J(e}Cx|s@Zo162<7B_!LZflZutwlG zok{P+T;PH-xc6_*`kkG)93#6T4eopQB}1;qF#V%&Qa12Gi;xkQWSVD#wHBVG)J~8n zt_=wO6ex@fExBo@c0XzN=R@xQ)ENZhMAP4J=C0EC>^8ta4k31+%U~#|aA^l3~`nS=KVJi4ih#`iYpijWBgvZhKD)Qn&PVsFr(ve~V?y6fRLjX*+3GI^!7 z#aiTsgFKlnt0y`M07!!lDjAl7L26Fqdo~5X*fjMJ&{-%=G~fY7kWmH>tA&Z84G{u* zYzQU}nS0&SR}#QBHf~}p@3yO;W|A2H>>&Kr?%y6yqUS(eR^;2&nFAWo^k~>v!g#kb z&?lv)ZyPs`^lvC$&?Ss@hx!rLH(uvb+rby~yIA zV@%=7!!s3YA3nwR<2?E1Z{`eN#!B<4^+_O#oA;Ci2H=wW5^(zvd6S;xer*i6ud#AU)lUZJ6zo21H0Xr*ArD9(_VYxy{8_?+}lE+V^@4IJWQs4 z(OsTb&Mfhg6lf-X!=#I&&Dy_+Hv_QDl`sv+Vq_flKfMPOgn`s{bV*O3Caj!q^p5(axwdK!3xYw zfW72F(H|?o-api-yT8hZsC#ge89faCfUU027KBWH5?wN?)PnCNU6p#=7Gb&C)3c{2 zJ$#u#C$%}_Cq+9*!Iab0jr&?du^5udj}e4fNyNy?WZf_t$?{{8M>L?iqu1`;IA5$9 zTu*wtXsdi)AA4oG{j|(Ba<}8+t*U}iV7Xd1?HlX@Jtc*iz(UU$^Piv)O)@vP*3)oN zVVjzOPy72A@T`2lFo2i~DyeI}hYHNGm>GIQgJgedHGfZf%-)CfQkt<+&rs|JTnctW z>ZVCRV^kWWD0?)X$)P1sR#Rke&ch5*qSmW36;64#NgIXd#;vp9jTImeI!H4coY_zi z5QTD|9uL{BT!nCbJAAH^H<6)NPgyP8;A(Dc_gbsv;}C_w=@^5ap^>m)B6Rs_F$#5U zp?}k{gyR*sc})(K_N%Q7>gU4*X1LFKD?irV1Ul5SOD+5Q9TB2(bJ;nZ;C`72A{HPr z&>iL%$^h?M;az9b=VKR@W=g+q80%%r8?rbTMkcsZ^oI|TrJekVVC%+{llZgsU9yx! zf9u6x+lVu=;l;nzjuSRNyi4bOA8wM#S^3`HenA?JOyO%E7^xWP-Twr&kPF?(q8hq+v;ZEDXNH$+L{TkIwx@^T ze&h!Cy!xX6TYUfR>6R8ABo~kDMf67`%!y0?w;NB&s{ZYS**wM>lL^hjnK5jTQU?bB z$jRmO3Xa!wa`HkO-2{&Gk55kcM~2*0R?&!wduzCs?GAz?d@aWk2mHj?RQZ;M!IiKdBUytQ^?0#teq3Q@(kkg>Z0u@5sMp26?w^rogSB~{wimz3 zRL{LLgZbTF%-#l58PY~E(ne|69tM55v?E$y3G`k4cK6%g!<$^uLh1ONmcux}df{B? zyjkC61crU4Qai4>ilkmd012l{Gjcc+4*7uDVuC^roQI$NbVRaq9#;$k@k_po_Wb$4 z-em|xL=BeQoq&8%WwW|8ytTXP`K;KDp6pmiq_Yb@`5AbzKSAoaFcg?m#6V#su`&p#ZGvupp~FQwf+I9LrG>zXpk^?HhAu|h#W$pP&f2NkeQ2yz zLeE9I6E#z$u4a+?F*+@(@U#9k;D6EwPg6uWxjSQfisP>hP5t*GHK-8sWD%y_%Pi6R z$q_2g4ne#}U%6DV)n;zEIV}Wv2Y5sHQOolMnMoVHs0{z?q?`~{p3_4_BWW}30q_aa z!69swDS7B~KR5 zr3aM+FgIp~?s`13-y3JqFZi2-BDtQGmtV=LU8jEB$-Rd3G` zTC_H2hu(&(!-{gV2D&RZRykESpFb0eC#wH;yj!p2>)sCRBQ0%hf{n+lf)`l8g5A-sUZkprV!f}mh(mdA zUpg^k#RJMi$qkzS8sr;)51Yw-hg2wrp9LNN{vf4#HoJYeR;Ehr?;8z=lJ~~mo)<)( zu1iJy>$zCmRx7_pGs#SD+`3k!Mh5_E??l<*oC&7Zo6*Q@mFXMyGHA1?6z$%jQZB@Y zI6U}`3)M0o^sDtg7@rN3I2vZwyUoMGtoGY}xE0O8ap|hPX?+EMGv}NX6*b=58Q_Zn zT$dD4yT<8&5-sJzCz`U~=a0BmSuZUJvhZ5GZ#r(h>G3s*0pdSz4FJ8r*Hq}H`5To@ z<1ebjq%OJX{Ps(HPqYT?%wO>)5(Dhq^={lcJNEr%gy0Zc+6w+i2Y6+vnM6>W$HM{KX`9=S5GgF8pHmg| zB7h9+X*=@Nm#UontOqI5dd8ocwRhG-+B#nEu&WLy#nLs{p6^uIMjWnOOrBG`ZY5m5 zlz?>Go>g~ZZ+~7kBnQO}zG1oyM%V+j>cJm|s_T@O+X87eOJFg*Eo`{|$AvEW<1dp6h~@l00=T?1KrF}>&_ZxNqSEN!Rp!0fE=$-khc zdzZL$2hjJSs0uYYJ)@e5;W%A4`9S0Z=Q3QnwkI7?LcNLy?v3nd zOYgP21EO{`md@ArSDq9^q@OIvTUp?nl~vBqmkj5&E`)mgKcMR~)w(mjQE>=D2&ZQR z(9;lq8n6>kg!Y=%V)H;916wJn;;p!iXkS9?k|v0aF+WCWq6deM=1Fj?nVlKWtbp5@ z`y>4$Mpz!!9y^hW~TaXb$K^zkrE+o`9RyZjWE z!OrLlbxVXW+vZggD!s^=>k?^EFcTLPtq|kYLaP)85%J{G5im3+Fn)Ia+#&ohr*O-tkG|qj6b4a z5UBwzz)UaTTt4L8({*|kPgI0aF{oZ#`BCfAzbM$>{NJYDRVjlC^>YYSwgSf8Afs9@ zN+-(LX`kn$jP*x;mSY}EfTD=B&dOcOmglpLZS^en`X|A*1tX&;E9~|? z0Asx?#EMMyn$mt>C4(`Tu@J7Zu8u+2u82F0?&F;4R_o&y#qaemWnFghiFE8FuU z;uxS7O_gp(b2$|)icNyAU2suc?~V?4_D?5BYx9x&q_f>!!y6~(!{!oz{;z9>5f`i% z$5|JPZzH`;rj_(<#2GVpm=ClY!Eb22SueTNCX1r8*{euz!PJV;6EJ zunke)dqIZ*_ik$6_9POq+Wlt2%2VM<*!^Db3FS7n;YCuVGbrW_fW6^S;Fhrkv9u@= zY=7ABvJ&lbNKAuv(|k$}dby}0951A{NnEU{(zFP|n7kI$!Y33zWTMdoh?>Il6k;#I zGDEPU>jWgxbq+d4BG6@m7#Y#V*rdZNeaC&wi})}7YRo*~gf#st%6eitXd4QPR)(9Pp`;}Poql6H(;)R-BF0T?HsF6Gd{p0rdF4nEppk)zsy z?nLYDM**{w2aD$&Rw3tyOiX~&Kl{6HBMzh@FOH}*RR52;WtJ`#h3iB{9yuU~jnhIk z4emVXrUor7x(_wvKAnyrJ-M`~KvVk`iQzYZ6h5L;I;opw^KnRoM&%scddd8*0=8n) zOQ4|#bt4V!V@Px_GR5od#;x27UBwr-KMcNb7Rp}5(SM0a2Ddd5?=b})>@|?&<>x=* zc?NO~^b}j$!wb1nS*f|YIa?4Nqc-*4ljwcgK*J7Dvm&_CLM|E4H^c{~9;K#|ClfSP zanQGqECnJ1ThGr*GSHjT@|$Q{&oYjPH&&?Z9~1C5+KLi`O8Vqlp*w04U^&KmIfUct z5{>^7h9dP_6H_rC=`W1sF_qB`Rui}v>R z14U!U{$>2?j}S)?TC^8!?kElrrnbL&sgEY>;QLJz$GZgGPbR1HYkMBvl*PQWS-YO; z+A1T+wmT%exK#NC$Cy3qZ*IQ5`FvWkEWE9H({*0zB!nm7VG{7;;^4~nM!g$$pN+-s zH5^Lz_o=oYF?a-UH7<8gR*(v0n4Juu{-cz0qjFky9Ge*L{+z3tW1e@F+*63=a5ljA zSy?NTN$ItbsC-|PG>)^~GIKlpZ`bDbMdz!JFAnCWpL-tu^{4LJsuYZF%r^MtiKMwf zAp9L{9zCl@u4-{qCD@E!$ zKdL-7)|DUv;4ND^(MfeqSwDy(#Dzo|<+&Y}(=5Kqmq06wSfOS2j8Uj=6VwbfXmJCI zV3$4&XMoD>d}W@Oa(DNbdZcd_KyT-Zz6A5Tr>e@KK;<^MR3K13#ooiRA4YgA>NbNe zp3o+vyp$1TiG6s<8-`Rrh|erROT1V5w2JyHvL|?9sO7{Af6gbaJG8d7-6}<4%C6#i z7QOuxtQPj1{T86XEzig;D!KXF+XDX@9In0TXeBKMcMZ)QVFB{qSHzU`Kxy_5<~`&; zG^2Z!ZoeltTh31oYMgCdO+9grjU4QnKP~3@aY*dTQa$-(NKK!Ca0*{%((tZsE}7i4 zX)cg!6h_6w%0e!gxdFT=rq=uJDCB`ah9KX2!oEbQF3#AQz@@hDekTp%{5$s)BB}C} zMd*)2K$IGU16(nLc$Y2i)Kr%921Zl+{Nfb7fMpcQ+=I$XDe92y4_AQ*(1$)mTxq_2}T76#4w`-#X9D zOtQGn%|gWAkAo-XvDQi5rI8D-8a{<0;TMYisPy}gE-wZUWG^V8k+52-32 zw*G9_*8w{J*DK$8y6km+cp`uvvU6#xunr0|LztU&BDKd{Jfn1M*m#D&1Jarw+M}qv zMG;{GJ^E{1jm%7ef{;q%QcnBY-WawYa`E2KuCa+bPWD{fx3sL9|q}mENwtaJD{rugL%Qvfe>+SGuMagt~d>k{fu2C6b ziO~Z(nDo_I>DF*$FTD!Okd2^y#M83-}$ z`5Vbkoq1;iyscJOg38DI{hET$eolOxIapBsHJj6zbsxR>98Y+S*hXHSe>Sjl`zjam zbGu4a5t8#Wpp*AS>^Es)oN-lU98Z!kROCtpwWq4Sz7TnYVyCB1{V&9e zIPB{_?VpNv`t!_gddB)gL!R>Zn6-P`Ezq>I6ycz&8SY+FKk0Vc1`PRJ^Nb)uO~fOg zom^YQrzv#yOp*@T1f7v8Dk{KbrTOHG##C2!C?cy{!W6S+JgcT(CSLzgtOwr3@w#VM zdY1Q5AzoEU^|1k~@PCB%@RP&E#rvUJVAc-)$yqsSAIbe?(_2hOF7Fzx#4|(WK(9ll z9q;9({aqh#w`!b^{Bum25C2nk_woENVls4j{`}L$8SBN`QDoDpzy;I!@O)TMC^8kz z#)GwZ|KHIhEZs7#9}UR^0}*_MG)_)1CX{ALl6RaC;1ye;R?CyG<)sMY5Ida1eWC$a zH1<{veV-(9q@l4>6|c;1?@n2HIR3pA+O=p8@xSZ#Z^|CA^y08W zR&FO;#Ja~1*O&(L$HiAXFe1fXl2qwN5s*WtF9NTW(T)xEgU@# z>W{J_57M{Wf`V_hj>phy&;okK9u0e-oKOQ#5AoI_00&Gd4eSGe16bl6om?n>zr_9P zbvT2Z@OPz&ZY73WU`t)Gx6b&rfF=LruOv=lFUskOVII4@Y@VX z<4uqG`J|8++12g@Lk-Le(b7xyI{n6Y=`vUGF--Cxe0a}B7lOkk0}zABOFj|7fqsF0 z)&s_@@+g=y{7vIg>ZqZiVQMNXE0t&BS5ExFmXwlNP2C)2s9d!uqAYk~>t-Z`H3DcO z{bmoPNx%P5S|k4aph^rIwugNuUJ8&iy|)(T8}nrar#%-3h8Jg25$A1pZm8uwh3(ez zr(o+JQY{eN=M(NHC_uNP-rHaN2}0qwM6ue*{F#7K)6Gka66#8tjCGGC(J1ataI)X+ zUM1N~*!rQ$@4;s-Q*&w{%%^g(!T+SxJ`;3$2H_$eF7#|U4GlRVp3@w5VjQqo4gY|n z66{db<>VjZK)>Wq(fx4J+EVasx|Bf=-HDRH+O_&^{YRk{bWK)4QL^rt(HS^34bc{S z#Q~XI%K1S5Y4$qfgG9S4jZK6{N`ShNzMd_;H(!*2rHV?PYkhrdWqoC1dyeJ-oA8*= zoRQB&HAT`}UIc?^T+l;l&dO5k9mM z?<-Ym$YiPcnaF>Ze;aMg<|FK#|DGRym_Pqh5OLTxrTTYag?05ucwVMjFJt+td5-vl z`9QO>3U-Vo8?Ha#R90JyvEMY__5LH}keJLw2{oJeL#(urvBeC!jl;w#qnF!Xop$Ro zq8u9+DtyyQ^Ofy~;^O`I`>$XU+LYp)9uzG`CXQ=0Lz@vcK2+nXIV5FUa+h3QsmL)U zj^~7=K~ar;Iq%Vm%zZ8`Pgq3kSfJ!^)cB3UiS1 zwGUGPzMQ0uvPAbsNv0b$H5pOcn>A);99g3pHk*|T43FCCCka;SC_jOFKaTk|)n4Sj z;>Kl*q6cUB4EpLxK-BWeAGE@`8?`Q!v^F-yYUtH*u6x9H9`mB(AdtAeL<$Vvd+(BI z<>gfcW-@bN7GU&YGS>khH84@_+r?JA{1l!=7rr_+MnLS+fg)J^!Ts_f;Q;SEUPq;a zGJ;6wf9W{bAe@PKq=||ycS*KLQ($PM_gnrI#60Ob?nVEIk1=kmd0ZwI?IK=Z*Wcoq zwdU7y>%Msp8k3ua@4GHwr$)fn&CK#{+Th)Bz9e3jJ{ovP`61U_{^(|dxN+t{+1Sb! z`DAc~efs-rXpf9zt1E@)kiR5q2v!Om3~sZTywY8@U|&&hpyPyJFQj)54N_6fmKf?oI=wA<|$-@ptr?R=?e# z(N0B*K)?7qI6+X*oqb|0i$$UlkwSuewRy)G1+T_Ni`g*kHt7rc(z*!mhQ2NcR+rsC=5GSe#kJ+OmuGX z5523b^&fF-cTuJV27LYJaQ5tYm&b(1sE+NGy|9Lh)UQEPo+NP!f90T*MK1zWw;DFETOYU_0VgSfqM#U_to#u0Z?gF{>)oXwn?EW8P;ugXn8! z*A`9tosZ8UY2HQo@@HG<1Ebg=qAl;!&_8Rtb8(mj93&cP>?Z8Qn0iM-1E7P#BXM(_ z(QY;1h#!;D-$aOzENy8ybpkLB{k7+|{Xz@ESC-?p7I4skP+8^h*Iqos#Ke7e#_zXt z!vUI&QD5)?=m))y6H>j`LZs$bZFG z8&%)W)v?=~ZL!_4dBcs=7@zHdnoIzbhOXdZ#YEqRsZ41nXp0yy2kO(J62L{mVgXk0 zF;WWKjFKVECVzRpQI`4*qrC=quj?`fCW6-<-hWDh-6=uQ7M9RD?4TL^sXtYu=h(vp zC&b^{&R+RUy*UOOk7~qV?{`f9S{w&uv-GVTuEu3s`xW)bW(DI*$AbzyC1M~gHEmv8 ziTs7(NgigKL(*ynG-!FaHZ`S1OoV+ly$aE*m^N$g*u5Tc5w{ zbP;H2;dyqxlu8{bkI%OZBm4u4vy`u9tSh*hdxYm|&dJIO;S#XX3h_Th;8#i}VH>&$ z-00>26MP8cSG`Cp=3p(ImHMy{*1pycl z(hd3|__dJWK)0-<1{L4prjChbkiqrpM(?|)mwLbDZZ>4xqN66{F z;lTHm?Jr{K02N!*#nr#Q)N_h|#Mv2%ED))U1LgyaR=1G6}m+Mqq=`bv<$g< zl4_6myOExHuunVxt!w^^;XA4!Vs&dthqSt=@TvXI79gsm5VxVhhQ*3~_hpV%oGiGSCW0`JEYXt<@ZU5;#>Yj z{<81r(c`w$ zg^8-WquR^b*D5wPRwqv)ET=xin-sCm4^JfJ6?4!Tg8;x)*ZkFxR#KrWS3ZZ)WzGC$ z-)Ys*6UtbsN{f=xxme=#g%=YOoV@;H^20bR38Lk;B)))uC8Ee7%{Gt~WL4i?7?#xTLCw5euAPMb?Eq!oCIjm9v)wb)iT!~Xyy>Bviujt$Q#3#G3(l0N<<*7rE}!=Bg8|gn=#7uo zHVpypTfF~H;`>q~&yM%ZZ6h`XPde7RuZ>#cjhKvX5BegqD&F*Cp!JvFDPm4FH^RzO zG=X`axsu)1hQ#5pH^p2M-GJ>DCaaHlEu2yly|ZtMCxh(;wcmPXO{t!GE6&)Zv3a<#mIZ8{ zG?TqlBlf;Up06BlnXk{URQ^l3`mo8Pj0(q@Ga-_C-VaGp9*+j-YCDvdCUWi>T}C~W zGuKypbTs#zNnXwYzgocwTgF+jym>Ix@?Iv5&2`}lw_g)T6EURZmIsL+ibmLf97M$5 z9kU`2eLV8qNb8E7RhNUl&&XX132nX3RR$Kqipx%@N${u8vP6U^D9?0!YfvMw(NG^~ z?80=rpZ0f$uLnvE?yk?|7vvv#__@RS(KId*$~o-8%gO*mdK#>&n}KO=rbnM`wVSGC z4cOqBXf{cTSXG-Ak7M031_t)S zel$Fi8b04SAf;X$7Y~vH=a2t)8n^%$OH!_Yz+8>!!7A54Zz;^q-%OtU!IAsV+M~(m zP+I=IQ6nuttx3JN-=h9*4+@EZ;0769-K+To(W4!Ue+X%k;K2ZBQJ95SW> zC99A$*Ir{z;GnEjpR1Lpt}^I-OTzN-aO==(?1Z}R{g{CHFl)vTTy_=O_^>u>vSIR( zBY8UF2juhk^~3P(O)5P~n>N}~7dZSk|M2OSCxV9_W8pV3I*HI&F+0l14Md_gl09A9UOQ>F zSi?%hDh4d%)2`L>+W2!$5^#;zP!Q=ouSf0x>I zyz_$!*v6c7EOuWb?ljb7?F};oN=ler zDCc!C&ttcWG1Jl#hA4y}BTAgTa5aFa*|tTtY&==^`^7B`ez@O<7UU8DHGi9 zr)j0*jAs>#pu+DNwF&fu6R)pVJr+>(f&h*Tp!9T1?#3KeRB# zYNsySVchPE%W*88tqcW({FpdwW1Ei*y*qrhdnR{Y<+foeHEd={K3rV?cNpKHbbdT~ zH{!PGnN?@Vm1fV)y_Q|o@X(9Z;nL-BGUTVXE33IM7lYHQZ+O8Q>~chQgVp$Kz~eR9 zc!!u2PZfcyPgZUAaB-D?uJJ|+i}9<1oOF3)XryD@v#+-(Lf94;s~y}zO5kg!ZUKy6 zKU1cMtG7?uf4fh4kgdp&D8`hYEGvIp=hO}>6Zb~VmxEyP(Mv4oY5BpoVO|hpG}Vob zWs`X#;sQ85PWu%pmlthr%Z6P-rtj2U!M&Krr8_G84A|ak$Sdm=o3fc1k9oO9Y?_-y z^o7+1++|qN-=Ez(Sl=RrTTgxym^xo9J1UrKH-r3@ONyMRI&wbViLiv~v#yCDu-^6~ zbPHgo03ND6D9WBqI{^U`y_f%+1ZWMxru20{Sdlkr~QIfj#agge3Uqs-?-Xqky}fjHYip|v}| zAna~$e99g0BPX7sg|7__9#y0^m2}hl-UdHpvcD;(?HD(ij%`*}39vgcmy*D^B%KGp z?%2=GcK>N{QWY==z}u|xRwY`il>r9j_kk9z0=X5YCEdhiZvLs8TG!;|;70+rXaIU* zLl_i*R}gS#RBkO%TkHw+bh9a-lEd&w|EU+Ot)ljzZn(_>_HZs%%g0&+O5EjcB5F4|U_4I_6dp~i%v|ueqh5Y@B zyaCB`UXK`V)|Qs!W-FG3i9(c_VeEberQ@%Bb;VXpLj?Mk3XqqCRy_-jIiG8Y17Af{ZaYt#@x*G)7P6$RRl=dbJMce^spp(UJI1GsK zRa1Hs5=Q)Pi{%l;vfNl)MluAYyUCL+zg9s3)1ea7&4| zyDapN4+j9J{Iwfp^BWmcf|w&kV3GPONTkvuVz(Id@)L%kr)wtkB69zcn;LeTKC*7B zs)Pr%KC(59^T>&>IT61`u66WiJ2Iq(*3RO$M79f#8dXpC|E>xAHutPN=kEkXfn87D zZyWob;T!B+?D-cvu_(-$iWSjB(j;#rA-yvGo+d9M;x$E__Vd$6`zs-2YiqA6 zEL6t#Cv&NY{4e6_cPsLdpt^H8HY6xW`ujV&y(&dMHY!0(jON{9RoguT-;bqTH%|Ir zl<26SK!ZS5*0fdU>nBgAoF8RbC*Pjt3a?nk@A~8Ux@Jrqn9}Do1yWO`2H!`7LFGORQPLjkB=poEhP#s?d&Vh*Q2Bq z!zQQzRVWoKa^SZI^#ATf#%D`D8PKMsz2P?^R(i<*t2A*eTR^Qxr%AiVn-$xWC*R$b zouI(VK*L=$_&&KIwNUHNb*SJyT2E_%Vyak0ZnvR+x3RwVLA!m+1s_9sJEkL6iZysQ zYLWSd$k`XVn4$qwiGN>1EXLXWq6 z9^3o(_wOlXi~PLp{IL9=M|6N)RpZK7*;Z7nQLLzQ=P*Gp>3F+5OC_JHM?GgO0 zA)!V!Nnv9YCMvnYsh6zpD+(iGeVw6&e%1`0MJ45*mWBYAPc;4TbvC#Hf}v6>;e zhVK29V*fq9oGwj3g|i6lldn5G@nXEVd8;v?qv4&c$;WOZQ5uon@gt%W5yD<-3SxdU zSs%Dg<&q^g7Gwqr@XtqFoJF*KlInf?uQmGMpZ2%I&B48;n=8f?iZ4;<<<(CudWwc| zka$sg?x+{Wm9I@CSDcEg`q`+e#* z7*<^ifguBBIMh_oy1rku@{b!D8n!)SxPes9Z0{_0vG720{W84N#*I9#pO6dQGRsHB zmtCgu)g4nB-pkO_!J81rOh?!791LnrLROmPxoZSBvEE=yb8jZ^ah#5UpJJX1>=FZ* zlo3{2pJ3^QPbed}|2TPC<3)~m)F_~;a<*=JzQ0J?KG(z#XE9Wpi}!L51~ez~n|>U# zk<4ngWA{VU%V4?1_%^OVqM_a(4)9eoZ}rusf(P}D4N1&$TgC1Ic5G4fy%~NLY0_*E zpJYi`5s`m2$bS>nTLHC)@}|_1TMj+sAJk8k^8{*j5`qZdZT3uc^DeD9^m~Y6I*8tw z8!9O|R}y9#Ncc(JgArrY$YkK(x*?L!ROqrH1o0_ORBFgHovhky3<0kP^SqXI+ zzA+i}K?Xr8hGVV{Kb3|_)=-ut>&?Nz1LsHlww~K_?Hv(eA8lhA&ow}sos);BzOw|8 z)mH#9zf~yD#zGN2cr`w@5GE5t^Q(|L2Z;ZL^P|L37T7lEf&R3Qf4Fng6NNT`dJf(U z-n~$a$2^Id%7?k8VmiUgrlIlq>*UP18c>4I#P?^$##v7M;L4w!)dJ(Zw}TOFlCZW+ zS^d{wKVt4B_8d|rq}QKNHkRx6vsdvoY3xxA!f?&LuJ+c82S1J7ewvP&8`crsZqwYAbRL)}Sa^|Dn7`%5a`$SM@MxUHN; zA(v6rt<9zQmE*|M-PDV-4y7b%Ji87=0`A-};7cpbF9F>pJCPBK2LJOvDU%v3ljP{59k_3KzU00|6 z2mB+J)^tYBRMy-L3N4Aq4<|YR` zH5M0>-x}MMI$Fa*9v_JSPZ}W+1j0L4}_>E8`i8WNp zUexNUqN2~$Z3h>um>`V^Z5-e^fX3TtV4@=VP0i+DfNRY`xZf4zvq$3~L3Fa(cl*~g zg>1i6Vyx2-4rizmKMm`ptAPhWmY!17_T%92qaIs+>IJwM9M}~ASoAfB7SCp8m6b{U z#M1Le)uhfbynDi&E+~Qo58amlPLpx7Pb)k35sC}iqUvUYas^UHs9-7wZtExikd0qW zvy1K!av8iKE>e?P3I(vrn|&x;rUxed2V}#xWB(EGFw^YwQb3Y3q*ETxSB5Q3f#W)*~JvOar zm|PG{CbaSngjGhsjM9u&mJln0X#E{0S(De_W|(ucH`e_HI(q`LY3?`u;GVn7TnHYL zP^V&rh4y?vms2y|<10e8i-_*-HF9^ZKe8hCwfA(1HQ*3h3N2+B*seA_<>>&69Xmzw z0SpWXI6^{JP(T$@W5e9F~=J43=#8 zQQn=~>Sb+E8D0%D`2v)Sop`SiInrU)W=*c-ypqzXeC?fSzs?@&N6fL#k{9xW`0XFt z>m6+|I_vqqIesz0LJitznSUFt+h+|&O8Va)URfYO$30Mqvac0TGx1~#UAhNxErl&q zea#BMJN><(%75?+Go4H})IRExL$*I)!DhfUF=`G1$TrDaog_(En{$g4D#tiA;kT@B zI;feL$;bs7B^34)RfUveYpbfmtJ{=2s>x+*J|x1Wu*}ygJ)w!%chuC}I(He#Px9dW z93JRg&zZPL+dK58ewi8Y2;zrpPe{(lHdbh2)WzPfGtqr(s^qZ$-)H*p{bT>DM7N%Y zJ6P~w=T|yLMaa}om(}N}#g&-Ky6w~oBsIkoCG?TEU z8L>}477nURx-1ymCy|yevLw6j+kvX_bf714{V>AB#-SqCw-Y)+_NrK z3A8&yCt=BBgT8Hf{Bz63U^a&budVc)KV!2@r2_YI;uWv&doZH>zyaU@j~g@&KHxV) z`7PPfw9>fjrbY-v(HSt+wnb*gD3&2b13-&}TkO{{^a_QcSRIZl=_s&W5e*3ZRZI}h z&LPB6mTNqqPA37QHJa%G_S}Ac*~fH^TK2q3`&-gwN!r#ZD_}N2U@W7eB+KK}pUZN>%P@61zKS0N`TLuxBg$HsAeFVQl(m=ZUei2NK=jl16F;DYg)|jlN6Ypy*cq~| zjiBnfVo|zcihLe-A+IV0i$a%eDBA*Vc|*xG?tcXDXl{#K>a>CApxF3+1we_FZ2<^< zu~?FJ&{c5fD^oKKmg3!vSC-7{5M40(*(zQSkSwE6D&(2KhS>Z1U&BN<&O$$)#jLnL z=Xko06euu%@%M10Co~;s3(9VnwmUm8NWklTsaFX*p#n8Y^3)^M`ziZKa&2%$);x%> zc(1TUYbThn7Hq(nAPRAas!XKu%U?68kpo5j4Ktq=OiFy&#`@xg2(M@5^mrGm*i&=F z4Fk7Yb`chEcE5g#I$m8my*z0@cfEf+>`EB)^J3u}-D^?*%^rnE4s-Z1VFB!WYxSxT zE&NrcwwZswLk~)UoAaJL2^Aw_k!MQ+9cPC*-C(xT%wPfziyz5Se39;MpfDOJrXMiS zyo~C{h*w?$8tF=!+=oqQmzHFd5p-|2HHKU3--h7bFgXK-V{XHJ+$=y8MdqJ$<6Seb zS13YNNwM3%=_IUO`n?b@YU9nmpH(=T&RE>g@T4Wo>TvQ<L!esAu0v4M$B@&b1GdEJPK z?r(~TGGAyBcWFl7Q$QX>an~m!Y3Ez$|FQQifN@o2{%11NHf@v4l(f)5g-a+jg*2oO zu(Soz2eq)JjcrjDaLHt5(u|$VgqaC#MI;Dn1=NDLg3sc!vQ>+ZRbJ9nc6}^rSJXvC zMO~Fu|Covol$HE{zwg{L_s%nuG%YQ?r=6U8&-;AmJKy=f?|k>1-#+}8`Tw!_?I)=A z|FAxE#jU@2`r&^$v)Q-!#-4Be+j(z%+5Uak*G+oWv;Vbq)lnCoW^!lH@Y3P@){=moo`b_czU<01N;*v`~@vYDQ)5redJ(v7P z{8JDAZ~TJq-O=#r3)ih$dwQ&MNA0?+UK{RyYV4tzT%p^~~nqefTfmU%6*f zdh3jPUcKeO;^^2KQZ=u+c-8VvzpZ)X-CzFcH|N~*=$~GH$$7uNYTaMn{nzvb z|GnXo2OfOT`ttj>bhnMs;#+R})%BfSp?5!i+rH<&uP$4$ zeBMd>-?#YmjZ1(2(O-ORX#R}GkL)?|D)q*lKlt)@uln)IdEfp1!&iU$%2iK3a^8bi z{^+YedGLXGU-(knfBx+cpLzJ9M>n6lWO&M+;RpRo_atD?`|-Q)`p%;FpK|iI1}=GY z>%0Hnf6FaPOJzPF??eaWKJfA#3czj4mSpMUo~Z;f|E z+pavJ2`Bcw>0eHrGv`Ae#05&f>gn3;zkl{^?`t_d;GcclzD@Tw?!Io|FeJ|W|eIjX{D1!Vy>EFe(LC52`Qm$aJn%2|C-u#` z@zRF3ynpxo-w1zka7W0u&;Iq6>p%JF zKYjj7-~aEwU2*kq8vbRj;o;x&5kB2f zNe;hO-jteX`!j9d#IsU1sIeft&VD!fCKtRn6uhI2;!OI&dJEs#&Sw0|r8n&>=L1aQ zO#X7|N`4tAAOe1aE_fjem342&py(pGrl|BbcCOT-x+rN4ET(nW4|8{ zpRj1L-#NxC=M>vFFk)L7&b&;|8Nl}w@H6$%C+^X2!jI|b_&y6i3qLy3PUEwWC*#LD zUS|88W~`$fKc-_JSk65AeZK9_wf!?~9~*v>o@2#)XWRY)_{_i1eqRKi?K{VQKi7We zTw}h)whu!*dB0HkhHl1ljhZwx8-B3^naFedN0qkQE_dR@hnI9*{=1W|df|-I)?IPK zosn_x=BqPB3y3tp{2DqacbATc{$@B@r8hq`+Nwh{dWl&_SFKRCT= zim*f)aVUF`4?(qm(z;I&ccuq)+8F_+-F#+8NPXiyOV6D)eF1$oFR1?J-^@(v1wZGi zxWD^3EYX6W+M7fM?e>3f_z^zsZ3y~yp=tc_y+iLvk$`}^#0b~I~epx);QGNkP*b?2` zSL2CQ8NU!DYcIUTx8n!HkKFd$@bG5<66Q1@z@vb`yh|KFbc(9Y>&^{+NE8>gva#9Ea0f^|X%xUR)<169V@@kaW$xPLk8SweeGk4XRHC zKL+3Q&RHe*1nu4-ZAjOj`x~-XQWFqz@r(=$sT`jrNkTc&Y3gxS(>=jKNy9(mSC1|- zl#>h0yS)PISJY=yW;|&w!C8&>1pDn&hqGO#9nLDgC%E%PXorE9fsc8&DP|5{4mWUQ zjibX&>3}Pj3!m*=W|4GCHZrIa;=(pNmkXYDh=Hh+%jQ;G zwcG2rE5zntTp>0u;|ei42n5-6kq*!qEOU6AJ;7ZPqhoWA@-X(>uj zV(ExnyB(fsPteK@U*6bCzFd^#ubxWj>c+3#raad;O8Z=+DDSQ@ly}z%%DWjqyvVz~ zj_FrGC*L{aX2#p$;r0ZFa=!tJHje}e}O@46?rH-|Jw4<49)I6U#uMZX*# z`^Z`~9Ugs8u*;(l_RKhR^TObJAUA#8m#d>#rmGUgJBN@xqIQR?@|?3 z5!9z^{4!GE^OsN$m_XqJYstaGp(dYM*4bnWKgO6U=|7DhSst6Elqfr%Ei`F;(rUaj zhzzMo!+hqMmG>sYeNp&b_%V-NZcZqhqL!<)ilYMw#Ok`~8z%P*b*W0JBz{@79m?I9 zvY=e$Q%Y?{&M=;O@eb!BiyM%w808~#>#)46wE?Ufx1Uaw_8r48;c%E=`~Gp*0H~^r z@!tUW_V6QXPuk(z@%T7z0F2ZffbS^Y06^=t^X3HL;L!<>c8csUyLQJG zO{x-R0L`%lmlKH$9>0^v?^Fj90`Azt6`CE6j4L_1cA(SGPXpXt85i<6$oY7* z*rUbO(BfkcS4JsUIF@rwp+~iWQ7!d{aNNtBDNjn3+sphT;*0h&b@nmsWoGTYOzu>c z+RHp%t;DY6fb3_+@Yho7K#R9ZE7=Y@qwyU5zNT#bkG#Hn@To|jJ^ZP>etGcm;8WVJ z!lOTx?M^)Sc<}MocaQ&3V#((5hl-!+=h*^!{BvbnNe@0Ad_*wCw4s=)MOB<);d-Y0 zXu^-i`IXZtI^TQ24#@5i`c}$$GD&5bBnLBN!|!~P))dU=ZRS1r zc(TjE$SxlKRK}m`;6plo?9ymYe^METJotFEK+8w(*WOaP@u?wH-@ax!xkB2{%c_a@$mEq&fugdW8@TW3- zJpA$Cb1*WRH@_<5j|U$QKHmH~bT(Sv{Hi>^y!E{@d_4TA3?C1FJop^?^~>lH=^wkg zAaAZ!o@*Yht_&X!e?0gcdRpz#=gPLR9(+9bl>VNvy7eo!*XrC;&=h*eTmo{eo%K-N z*?Py;`4=8c#(Hk0hbPDSIVs-U@#ao7cRF}@;^E2o;Yp6CbM9)_#TW(z{s54 z;oN)L6#C)`0x}O?#qjcA;=u%yW8^bkj;Xs(Jw2JHCmTOKnMY$i8tc*6!uzE?8tc(m zkH%6k8T}mw-rVu#jyHF_xx*V&^xZ7<$9^Y@M^8L@;?Wb%q0z6!)!hMiY{`HgOp57= z2a{r$RI%{m# z{&@3eZ2H=qP4H>1^?HqwOuf0KlsC7$xi!YQ#lP2h<2_6N zc*gy6>3>U5Mb6uf95pP%*f(%<9oV;s$|CfQbHN_|k$ z>r1+K2WKH}?Lc^ADzYV(wWfB*dgIBcmFKcwN09zN8^0>-5X>}rsBs2_@qs`DIvQh6A-S{?jX~wipMsmtaY*8 za5pPvR^3S^(N8ssRzLR!`8@(dOuuxO7a@d>UAB*r#*^+c!&woVzp*!!&RQ$tDN_`S z%Ws!{+a3I8#JnOMjt+#gv8dIPPW4%xm#wtoNo(as>kR9nR%`xw=bg8-{?)1U79>FU zrdVWiI^4tXbLK5*Z(p#q{?d&R#&oW=w#Ku))`nDfES*iYT8N#$w0>baYHg2&(^hBi zDk~CBM&nUbW`(m>XF8sY#ImX6()yLDzW#x1EN!7N{k`!>ri~z4h1T7SpLUJ#bi0?^ zAu?`6f`Ei${8a7fj3eyom>#5Eej23j#)~e&V9_}UVF3i`2_~ulq`X9F{XjMmPsXfN zkChE4wiv*&be+o#xPIFmd;?;ZTRpL@R&P9$O{L?JaKcKavawA4%5Vkr02Ut(>% zbW^958R+lFh}CzdQ`uA`m9WCynQS^7$;MO3`b%S(On5WkH&X`I`7wz&V3Y0#0J72B*XdIHe3m z@C<68B7a11#rcMx2KEhj(X|<1O9==iu&0=)0${U(H3bkeC2|_-Y=zMNE@I}lwQFp} z-?nqMSStkqt-f%wetz40d0_%OYJS_oEf#1)t94F$yCe!nqrmWfGY0mcSUstkXvMNVnw*`;+4^z_8iGG&0+7SJA}pPbj704<6qH(M8AoK+b z=C_@vi(R{E-OKGFF59ry>Ptlj60v&R{!Ziwr{RN4$>d6)sb}D)-P!OoBw9?6nv)AN z>6l6njHHr*ku^dn7D1*dmXst@Ox7NmVjQ-UkpN`9XxKQMW*qclaS}odWwY(z5RyMc zq--k((rKWabuD@YvSH>Lo1zOWoNLn%ynu5JnHg{$(_I((pXIX{!|8q)`P;PQ`aI{-lUDBqG)?M)jg2OTGIcZ|aR&6F>USE1@@&Sx6=8)FvzcKs{v0zs{<5;k_;VmMi4|plkXS}2OaC-Z5JB{C zIaB#BxiB+r$?MQ@+8(cy_LwYI_4Zk48*CDR%RE-9}8XtaoC1zQ= z0Y!5em~drcAiM-PO`h#FRyLMMf>-Vf#}jRstz`Au`UfKO((zPVciLKTPW^%f?MPJ= zbCL98V=NhEUTbmNd2I{NmcRAAu|E%gh|DVcRmETI#$THtHI9f3zrVG5%i+fxJe zQXW~;CDt;#ogML{yIB`V$>kz3JuS8i++}J@eLB+5xr?%*Z#v2AWQxd3%qqA zYDH66%Y>g>0=kIBZ9vwoOj|vfV=#LWGL58C*{!Lz`ZnqEhULrWw=X(pftBMDBcy5o zAla5^ED;A;-(G*sKs<|an_p_&B8e1e?Pe>IN+v;_WeK<^$P;glBbiXo_AAw(lGv#4 zkibqKK~+A&{JO8qyzM9YTPrI?Zf`gb)%k zY0hNGbc9ULOEVK8GfkSanPwJ3W|=gcBt8ovmPs?8A+r%O+ob7WNDD$*Od4UPS`pG} z(nvY&2x&KIFe8<35keN3G%}SIBN)GXgUBkAOHVL|`s#PcrpzxtPIevYgcYYUAx=pq zwYw~n%EbBXlC?nvV|{YXj!q{dAz@r*3d2aGbXaj|#UW0+Cg$=vVa>U)srHl8vf{Fc zV7jd)&Mi&rHkInNlaGX4r>oDERZTvpzR~4-C|92;p;G@GxKI`~?b7_&sR%L41MfrD zE`KfNOe-Z68p6(nOJ^-4?B7NVs6}=FtW+$W1~E9_%JgOX+cKm}*VS8aBJH1VHJ78C z&8?D52qu%2C5X+fmZa=XMYp4#=4vV1Rq3me{54x`ZBhVR1=kFMS3vKY>#yg^_+@m9 z>ngep`q2O;>vOKRPMhIg382&nVIo823q*t{5!fN&vwXEk0iwhS&C+~zNCA?hQ^+(8 zAq7YhQwY(TjuaqBI)x1DOoV_S=@2Pp7D7Ofbcmp+g;FeCiVPD-k(y05?%p7WoFq^W zAM^0ZryN9K2}ClbCI_YkIGr@g@r`MnI6jq&Go?VWg?wzelg}XrCY7#>Q=(jX)z_6@ zrbGNL%WH#~A_%klFW&YEjpB#3F#fuL8Nyexdn)>^DKcF8f{szcKynK*m&_3 z7deUJJyiJEsiAa)qDCrN!X-D>GM6ku4(-#rPAOUf8HpdUoEgrmY{0begfqfYGX@YhmqbC4<>lkRDUel z(tI{~$FoV7K%<(|&2#5!I&udZOi|i_=xwgIPAGo~IR~O+p(7OVeJ(meV(!bMBgAmu zOwmTVr#yw zi(}~ls1f3QnMm*U@-aHh%pc5wl+3e_PVTma*V5$?Gw^M5+x!2>W} z%5%+J;-zmE;<5fS-r~D!^_LBp*@y=R!1z-c--36DB7B!+t2H8m2+Oi-Xh#YNB1|F7 z_9DDP4B@-9U@_ho>vs`cmf?MwE4_r_jP_^hLBG8jB>LV3jS6^KBlr7i%k&e^^bf6THI6ThQrg zWjR>QLfP5oS((bPw`Nj~z~(Xwv<@g!&&LYvF7eO0UUSF&R6pqSOk%-MOf(5$3v-u0GVP=WVA zN;)D_gZhNvl%9^uB*s}z8x(cg&U9>$ohFAVZ%{H_a?`OvmIhxaA}l#kutBx61lMBP zARiL=Tuga`BEtGyOnHNzL>9`iG@IUlsf0AM5rT=SOJ>8Jso8*iXS}y!VnNWaLCvT0 zy&X9)FO`7YPi|N0291A6-z8Hs;8a-NqaYLK?0)7!Wh=4ZaqC z7qVphK(O(1mV2hq;e@Xf{_d&Y;sog?L8X4rzV z#zJ6CPEeNFmBT}g1;-kLD^Sv~$6p6i1vV0HFm)B)45m{5s$DUru1UeDAPlPtux#<{ zg(G9?k5Q6Ym9=6SdvMI1jztEr>vwHzY5lsG*1Egp(2Q)ZVFR7qpm2rY^Ojom>u77x z7e*OaFt?_$tH+(Zm8T-=GMF|*Qt8w{7S<9O*o{bRPVUZCnAqM51`lF3c5S!A`~#k~ zJsyJ|TsCuK;25>w%$99~5X}VXSY`kyZ*A?x&N>v^*4CJni1lPa=bmeFyh+Pc2yY?t=9?b2vA9NrF*OshGZ{6ow<;B{V!tNjDnj3$+0C@Hd7LyB$0(A(M+~tjAU-L){wdv0N-Uf|v! zQKOk9;a9kfN{te}9Df}IE7r0tMZ7^U9%rUqK7vu2)><}u4_@};BfXRj4T_bQjOU`% z)q3xq8|&EB&sf|k1FnKbhzbqjdDzOv`#^tWb6*<+F!iRT%SsihV_CN zu`2@6B}{~Z-2!m0w+8}7FnH4ALK32#>{rR-nI=d<0=CncFmg~bwgHx*DV~%;wy%z5 z2tyu{^c2aa3ytJxYpX(Pv+>iak2BE-gCCkUEkm?Hos&#d0Y^1<+N5h`v8HHU>nmNg z&Nfj6wX)$WA&_D5*=$C8iI~UDOJKoBm_EHMS9(5OELS&G)~3g2l&PDmOL5(a)Ykl} z*+gAJbyaV4Rek#5t@;92)w9Y}O)@DP|Iru}u2JmT#A7+y;OH@{>+5n?g;tpg8<6HA z+0cRnET(j3P|3vWO!>9#7BkY-wjG!~|H#c;iQOZV_Wf%vxQ2}&C#r-_3M*RufT{P zgN;L`Hsp%@S2(>H{1=pglB@@+b+P5j_NG%?Guo^=2DnCZ2{mI!TBoh9(pGm2h6yn% z9gfQm11W6I5UZ`eCq)Ge$Up7GTDrq|En{SC8#q?j&{~Ki+Y>g4F=DagwefT+$p$X9 z$24PMQ1iw#oZOCvqP_N*wpkq1I{_LlscaGp})^jMDbWO*dY4);lohQoadOXA`_DIq)D zrOfJql3OtDGZ!?>P zIVx07v&w=pU{;T*NY4p1#e*;j{fQGv^tlg{WJ zSm6?6lsO!*#X;IxNGs}YftZCLOZq(z!@E~P>H0mQ7qmLKiKzyWT7p+3|(P~)^xMvSJG)?W;3(~Je+VNZ6cQm`qCv)BBXhW)VRF=G1JRCxZKUJYy5b!5gpRw^73WBnI3aaP)4?s&(qkiuv(X@>_Q1?%mZO(k_JB^;E%b&!M2VKvt)DxjX8qhH_3G!rfUdO@ zwQ_usP5CBM1^h>gV5(5NOr{hVjoAhl0>O z-hv(lRn5>F;fGZ15V4YNJ`N->sQg1GN_=3b1!1t?8e%zxu0~Cfd|YywH>d(be};dY z9bSWQYAv5tQ-`j=;|(Zjf*Mr2zVh6Jw@7bp^aVgnZz6bVAMyFHIkyjgRqZhTPR48j ztZFCJybrpBiSl<+&DY*HJX|Y(FGOsOdW1=kJtQru^X*d|)9M02HO+4ESEicz=2I7- zh4n*vKIbp`7D`x|h)1??fsRG-dB~+$YN6%L#Am0X{X5b7a}jTPufF=+glhVIA$mq!(LLK6_>tN zZqshT{L($6YFj#%so$tYC(%>XV<#EHn$c9k{Fyb1ziuj;zK;wPt5&R7SA29#bfBJ|6!@imL z8bxD8qiR0D(RjoUlt(5Fr6Kca<4DWQj@%YV1B8i!_dN%?D#-i)=6<%1O5g!0?*cq0o_H~BCtYTxO5`v-4T zclv(va4-6F9P$h!wiW_9h>f}stcwr*%wGc(S_i79dU}TQ)_|be(YOk^g6ft=s=}0d zAjp|{wfyVE=GrDG@7RJ{8>#J4>Njlx@llETZ5!vp8DIOduj6AMd549(WUE)I0hLi% z^t(@4YL$xNEv_~L3i#~VeS?+l78F)ztg54Ty-YxVYq+j zOo=b1A1B@PTA7et|N2^3!P@i#c?|v7iAoGqYYm;G+9$s=hFb>XOC?AQo9vCPRT+bvSz1Yu-!tcV5dCZ_P z58V{CT%|$Y!YU!}_B771P@_N2uu8nt5=J?^03A4cAJBTs;@^|5-K+dcqyQ??AgAruAe%3KHzHM18xvLz}-JCdYTUy z`?%$=ALV=ZgsXSN?NYtl`;D>nj-yxHJ1*mT9jO;R;@CznpZ=8ZUmhJ||Bhff)cM(c zzJ2e0&0RtDjQ{HZli6!PtCdkU05=9X1t+QXASI8LODi0(RAeoqzIsqom0*itsizc&|b(Ue$gP?^2zRr zdwu(-Z<|~wCm=K0t#!K?D!32iRvOaVG(t@Mr`YvxgnUH(rLKQab=|kLpk~qD+BM%b zrOR(MKHX4QGpS0bM9mCm%^O@bH=}0G6r<^UlgI!@3ywJGzeBdZllt#k2!dMEY2>qh zwO>6qqXW9_z)%-57#-?q1tpJ3hbo}Za^U5))S+Hp%X%(HJw}I0JYWx2jzx#+D*v9E zlP34nKQ)o%=gl>iUv{pIUWdBg{|V8d7Ve{Q&3`|t;+p?1_?5JM0}`*-{6Bp5QJ?ix z^XqVAqnL|Glu~DD98xeQS#{ui37m7lvLi{k^4#!aJGq-h>JwDwAE36p!?)r9=L+|h z5Lj~-JowM}@4-Yd6PhShPu(IMf(N;IJJN)vWf3RzZScG73C#ut*7y+aAEG5A2f@vd z)ZWqdv7Nt%x)D2fs^iWt=2W!EV@{2JuGwEyvwFv$C*;@6Nt|DErEQdk5;dbEQga@nqUP!l^<*FgNm*rO|4SNC zX@M{rL>+V?s=uQ=q7o(CE{CYdQxZ`To{y;eyABhg7S-JG$}bd5kwb*2sQIOjsNW1# zO;O)ffuhp9Xe314fi$G3gYb8`5Ov<84EGPwRHcxj5=pmw{O`hBMh{|PlCc?p-{OF4X=;CIJ#!5@wb+Y~Wb?$$%uueBaG%i#WbykO*2ft-H zmgRoxjNKA}U?Ez%ujYqdbS+WZjsU{!m z(&pis3%zU712wnL*fo`6-Ob1!RMW*C1?CQNdOLz91y)Jb@(1Q$_$RKFLPRGXDMYN1 zpahq1;jL%oA4 z)bYq9(>E#|9>J*9z>FrK9P=;=+r~T$!8!3*_vv4u51RuK>N}8J8UQi&>1zNh`?ODd z&$t7CwGsH}+(ci94&*EUb_Xd!uL|RvO>4zKdNaNqGWHvkmUVAAsosM(GpQy4{iw;f z3Fz03M}v4w&7FqPPAW}Kx*CL>1c`X9C}|{eG7+t_M+4*}F!TrHF)f^MNLsjfB3rm^ zQYC_?R-qZTqrIrp!f_;cFs#+(YJ!(QeWvF%=(z<_;jq7hs~>N^)1XH5Z&_Hu8a1I?KXG^)L%l|#X{a%PzZ~(k&chzDBw{RDk=oa1Kjch)K)Q* zJ0mqt7pl__w8B@aM^{b%za$+UzcJSJt~$^&&gHUy94|1PaMibWEV#qzR1NI@%%&8y zh255}OPn5)Lfp|dWyQD?WZqs3aTNbzVhnx+W6nX%VuIM4#X`|b&0-3SGKIZaEL7K< z#av9Pq5q@B9B®xYxHxE52|t9BMwyZy>%OG$2wW#LK+X`!@%#>gAxNIDt z=ISJ;V`Td^0X=6q-7G(F9|=)^4he|5*&o8kArtyTN<2>6PiA`N0U{)dK^p&1kEG4F z8KC|S6D;?!S`KNEUn8x5=;z?ZsN_gUS^9I*AL1F8n~0wFG;r`HAM17NX_rmSqUcVsK(d?&Cw3R+atfwEGi6f7ssf z(Wd8jwV&~-Ka}IU1_miaxtV?&@^VM!I_O`_Ob->z^gC-g)2|Z~ zzgCo5N`>m4>6i?5%}P|L?wLOM5YP18c7J-&pF=X!3wDLvGrhiOrtkgx!Orw~)0J|M zkvG$UfLc%elAr0kW@+>@oyw(BYx?C-BXg$rVr$0C^kBhEzkDiZdT%|kteTmgzxNs# zLUVKL-jqW;)7|}Hf0M2?x1o3@PV^n*n)^$vxxcev__**}-kSSTn~7(VxY(z}k-z5k z>GXNpaH(~*K0Jm?B)tJT&v*zOvwlyA!A8E~fDZR1cb%NHDmZ|{2s?7d96)sOL5Vdw%hq@Yi` z3DX{)J7?O{DbZ@I{bX)ula;f<+c3>ZPRIO)DRn;8Drr63@iyBbtcoLXq87o!9Zjfd z9I*&6@eDPp+o+>lS}pFlH-}CGS5Qvp&Vyq|(z!ndZiYJdN8yKTojX_7+TStUKXjGE z=j++`p0u1iotljw7i%M1E9BuyVq|fn53WHtr3A;6uK#ZTA&?JtqHa^C->%cqL96%r zYX^mgpoyC?tuzutNRE7D_@k0WA57%)yQK%cX;fQuFcC9Uk{)IvfoT`vn*X6XVTP|2 zKj5z|v@&)Mq2!tA`Xk)@!x%fKJg#=kxJy0=ZWYKETaM=#CB)|&Qq~W>0bxe^lWs%$ zxR;!I9Cpl5lhELTYA~Aoc`iB5ww}6#Nk<%r9AC{2zWn%HsJGru1>vWdN_Ld0;xm0#erlPGyzCqxJH6v}HxfUiQ z*Jl86{2J7^cJVY#3>}<4PlMrHHugb*WBR}`D7CDH+9!-*S=}vX9Jk0q--}`5r#oHZ z-y$DdRZ_)i?7T17A}!7>z7@4Gw28k~(w958^>T^b6YSKb;xDn^?euNPPKdsK)cu}M z7@ZTkS^FEYRDvTxR~9cW)Hf?S*IqeSEXqx)ykgPf zjY6^L()x|@&A5OFcMHYReYlrPu3Oi)eDT&iT$t5HVP`Gs1-nlNa(jhZr=Jy1Y?ASm zJpf4ZDxw-Vj zV=t5ve?Iu`um7Vb{$ON1@rSIf;C*=o@i8y{knPsO&%uj7w*6U=_@jvo$;>nU>tM-I zPW<6jQ6q^zv!Q9E_%jQByIcGLYfJIxb705GmXq-{Cm`Svu6+f5%jxIDALJ=1{vbSG z{88UJ6yncLw91fNzg?#z{_Onr!HPdxQ`lQ{L?FkblBTd9Kr!u_fOeGhH6*6ViFi#@C@DKgMVV$K>#)fDQ`5|hWya}+&x9(1q# zl^=-n@T3?|FvsiV$csXjo}W1u?lSP2aol}{Ye}QB*MMb1*%vQj+MB(GE+Hyd%s@q= z_-PVj_8ht}4h#``L#+{h`udQP9++)Gr#~yerIEc`)1DyU!6`YQMsXksTIN3E2jv^LZs>L6&;CGx?o&~3+;7BZZ z8}?1ff}a7u!)C#GO2CPhPj%n}IWk8iYGks=yO0o)HUAjYx}{ljB(PnMHAh*7HQ$9e z!;aP za3AN^U{5`xyft6EvYj{b4_aYPN6bH3zx3C2o9cd~gdFm(tSxfB%$AeJ9W8lao8ES-5!Rv&LFIHg4>hVYjm!_85yb2Zt)3 zu&J?UQ5{>@R5kWcpW<$zdu9dD!u*-F^QVO~i}rH)GfV5jo*MNxH#~;ejN$R9nYu7X zM`t}f)ArX~A*d!g@jx za_)WRV3D)6F5P(Yj7FKZ)gb3I4>@hBC2W~_1_=RR#2uXn&2o`0;0UWXUhf_d5$SG->VyWk=&t&i5bZW;8s$fBg7ydRTz{W(zKX54cdcRh~GVgc6pOwZlijEjoZ@SFn{i-prx1^QY3 zR`WT~DFuZvBS4eqxRpUI8^5CAcX_$5QuGpaWSma^2QKObU$HQx5Gw54Xg&ve&p4OM zHgWWB7AQNT$8frG?e#u-)kmFIb2=^eYO39T<5(Qjr&*K*t2|@+n72*jCemmI=Ab6Y zC` zLUgQz@T{8%zhRuq)%C7A@QzWge9MtB$8s=l71Wk`esrOWv>j?4RKgj${v*beqIs7jv^NR1v;%s5KE+!=wz`KXc}OFqJbE8uABV?Gjv zvE(Dxjy50rHa$jH~kNE;K@AC_U=YM`-4c1omVN=H#K5Y7DG|E`v zuotY^`KGY*jkRMuA+prRA%mm-I3&+T2(3F@HbUU#i%(xErROOJF7io-y%)`JwBJ*G1 zcezgb3AAfueuu>zXhzfT@VWL`7sQ-3ameU_PO zgfWdf-)Y|qdIQFk=Y#M4_T(`fWIBjbfA-C|Tu%K70jFr@RxAE3jU7Z69QnzQ#@!zw zo0EJjMyvaR^4+HXmYe|rv`>60f;bgkC9ma9@L4RedxGua^AGEDyYeUau=Fcf&4>q+ z>Kj~|Lamb8JBdX;RQ68np!`-<-NDNcwkaJ>W_nWT zJ}VlF-~fDmNMt;jORfnYaq08SsA%_p|eUFU?N zI@@nAth4wI4C~++Hq?0}BWK-Dal+DXz61`q_=F|GaNHTT2)`jh7`6$W8aaOjB3Ou=!Y#5la2xQ;Ngv2#kkc)F)F7P5xe>_8^KVI?h@$&GGi3x6 z9gFnwDU_X?7OWX8(X*)e3WVPPx=5C2|L3NZVB2m2yj1QY$THWu)Sx4^`YIKD#Y-uv z>{R$kCp5AUn!`ZOa3kDaF-7zbcjHIHmsMWF} zoQa*gXztSbSBH~XM(P+Vm7JIDjm_&xY!}Y=0@QFND;6m*s*eOxT{1OW7#irpk4-+2 zZ?$+UbC@IBip36Ygu@(3g+U?Ap(;1Bv$Z$*K&Wfq>3jPJZ&i2te)4dydc=3|m-UW? z51tHGL%neC-h*N_M#Bf+1M*Og)i?pb8Hv@n6KTk5+y;Np%?DquS&i8eU!`scc?_$u z4dY^#&KiW1)rerhpN()$xxs2IpIU;|$X~k26OV=A$m5Ca`W-&Jb7f)8rzU^Nn=ehjN75%mM`ce)TYaFs^Xb0xk?L`5EhsChgw!ilJb zJaPNpLUgGi9v|fO=Qo4xHdBPXaDM}S14<`P-1W>*BUZZ#bT8$@MWWjy-9Kr`l5ev1Cj0*=#}PY&URPt>$#|+_?^jbav#+ z#?pmFa}fICeX%xezR}X$Ep{EvuI#xaThrlwCqb@tbLD9+lUY{%^-A3nyai*=O&Dyq zV1_lo;`#r{zKecaEpa|S2AQeLZ+J#R_U9GkeMcgZSu`R$Se~wmmwBHEEB^0NZ;(0`02W_X{>xL zNYP?a%wR|>Lh$W@uA8TO``QtLj}dhU?;i9mLI}Q7&>^QWWHCY(n-Gg3%Mh~6gm5R% z2O|i=Md#vPp)Y_CKt_kqy4_cc5Wq%qZI<{tmyo_{bd8?#q3eo<`cHTx_g^fHiDwheY@)?!C0(jZfmt-+pw(bIOXsyJf5Ded=rul-Xtml~ zEt3VsaBu>jgb4BXnOzNLC~23(h8@$p ziOf=x&qXM7om9qUJt}NAzM>c0l~1k$T^KY_D@`hMChjDnU>hZ`!;BZP+9ae^vDyc3 zCH!lU9r7PP74lP_8+t_I^-%|vSnUtK`|JP6FXz@v`Z)(I^p;Lu^`rh<&2=bK3JPIP zjrLAS#)I<_sx>3OhHN>rnnzpy5E7WzvncT;}EI9n{fa zY*Q77!ZTU!P83{)cTE7i`k3#EL;SbtE ztHA#uEwo-O@m1Q}BM*|Jyui>l_=ba5iS0 zxpuCtZD$;0OiG&r;k8#sdSj6-2y0o}YR$(-dz3RXkRGqjT5RcHrlHDaAq!fqb(gKh!x@s_F4CPj5k@)ZTe^(1bT!3QXi?Nvhf~GE zR%_*kwX5x-r5h^-dU|4Mt6Mx>n1nMRo{UTP&d{-TwynKTms>5m70WC(%8}AFfJ9ZF z0Qg#ThtE387WZ}A(8atGrNaJ!Om8}t8AxPXiej&3WOAUdJC-J-P>J0ZTW7FfsaBFx z>?U;q8zV~c)rx~!jo8gxl2OQIo?@0!9=EvafX6Kou~aehq?wCV2Rv>O;5n+fMND;J z6~}{HL|Gsl6}iR63f$t$ka;9-@gbXA{2cr)7q=MroaPqSj)q%Ao|4=m!b@?B*6{H& z4;8m~r<+?u{iV3YU1v>)*3;t_g(hLq^0qj}@U4LC8CCw)gxn%FisACP#rFXBPK(CC zBgLrripFuOL#!n-*J_Da=bsNY%Xc^aM4A@+WcXbEOd)$VZ_zE{H9&6nZackvomFS z7-sMqjG18#mn)87HLT%#B^`4XDH2JWJl4=-4a@4)Jl2r&#&$lWKG=$pw9%#l%1!$e zL^EpI&soACe@QkG;icHbt``c=K^#9zm^-j68>Qj|)bC~!2XU@WeeIi|j8*C_gtod7 ze~fDJ5v&Ly*HIp|_7?dLKT|fU<^wbdlRX&#DkQc;`zKgFYtmD)Vg5BFgEYDvW+KD4f{h(<1ALaGY6?vk z{}|f<7Z8rj;8EXW7(C7lrFI920hv@}ODxMBN$&mX9YtDN`ph#zwb_Pa@W+|-kP9;> z7GY+8{rF<$P+doDM}v}M4gV+@S;Atg15LHv1hiixgKG7#*npzy<4bz&<4d{#PLdam zFwP#?6t!HAE(yy4Cs4-QU^jbcqyMD2N-WkEb6QL>SWKUWN(P5XyWs?f?Pt7d9Ok>m zi$WZpRD{F(8^;%iyCxHd`=`Mmh1>)urh~!u zQXo{=EDMGTJ6$FfzTJhvlZ!BT*U96H!CjNPf?YE-74~@CmlkDxMG36rQXrPihP0CD zg%iZIpYf{M1HS7ugot??-fC*5h-g$t#KaMK=6qPU*u^~pidyh$|4SgsvlETL<+rh4 zi&#%gv?g`bJ~5F@Kr6~G_31&N0};0KqdmGsWMuQ(R6kB_dTLU~)Q+iLave?CHt88J zt(sDyO$}(%;5fjkA1&&bI#gFJoB-{za0;SL9pliZ-YFdoUBO;C?Y%6VI?Tw4ReD~V z?m*NEpT?(?(58LZ8#CAUxbbNfE#1`(77(0%*Bg zb~2$gZY{$&qGcnDqYJkt7PM>)AYl|BKD6v$bkXb8grPx{=TpbYwHaKns8k`_#QANO zB@@q4U>rpQ&NZf|Gx4Mr6nz;_yr*Lt6Au!jxS%nfILH*NBcz5VS@7wgaKqn0@q2oP z)%}kv)%|djx_jZ>pba}3=Zli-md3g8E2&>5OZ>>jwXGBWuZLEUbNTV4%be6EQVi6t z8spmk5oOJs1D44IUxUF3phl6x-4ShE`;Q_g=68f$D1-_-XKX?%*;=yGgffp0cSD(P zbYm@-c|GIWpgQxwVY+vh)1QM$S82e_z}zh8Up*o%LdFi?iUY(G(auz9^;}I`o@1k2 zQ=D%^JU8;OxkrnkGfA`_32!V&z5UnX@Zb!7-O$3t5O5gh1=*L;jKwzv>8hU>=nV*6 zd1HP(A6Fe180T_zz24UghmF9Je;N%Uc?6ay>T=_Fhc-F?(Tv3}$p9BDFbr`oFnk{^ z*Yvh=E|+caxTeFnI#A#l4I+7ynkedW<2b1)n0jMDp?k%F7n^IM62KdaBV#P6(5ZGT z_}S!cOwV$kO_GVhB3HrMsrD?r-KGuicjG)ODx_PaKOf9GAtW)3FRq~FZkovTkI5h%<_z!nqaHse=BZ+_xSK6c+ z#uGL_bXe~)GVP>Elxe3{2pn1M1n3S6oD4jgUGTWP^0;Z7)0bWC6`MHDU8VHh$pmUc ziMx{-PCVa=#m3oI`4HWPY~o>Z{|) zXl&b(&FNSy+k$iRajd;Qe#br_7l+^C?4L|5(bJagUm~XzwKOkiYiri2@P&9Xm9^4V zwiib(+8<6Q;|XTtnYb2Qx}c0yUmw0VZ)sk0(c1ORtvswhS7}wn>4SYsHpxCOw+`~> z&q-?RgL|$}r}H^?o_z>=RCv#wm#c4hcAwdf*vJa`*OyfGq-mcemlD%E8 z>m+--=EbN9C)u+m+T3oy-&HIPKg}cR56~tDrUj%W5>B`{;XI&Qr{9zpE-|!2yZ-yo3u;Hlu(ux;0#&&+RR<~DwiuNR4 zD6%h>`0~eP&XoAWb$Iw{Y2ru<1WQsig=Xpw)e@)S00o~>Dex;o3qQu_SnWTJcN#?6 zkdY`mUQDLVGf9MbrsC8*JHxBQs_yWA-a|ATd7;GE)(_pvqy?vG%tOegSTvp*$bj~w z)2X!8pH3xXt=6^ibSfK&?i72Rh7{sA3^Xb?Ir$M}h^vdxJz5 z#yS&)kkioPgjj<&Ga-DO5Ew9H%zh)2VG>}<)xOjB_7C2w?)3fS;a(UYAN=XCz1Ykr zx_8N@etC57kob`eSpV(h>nv{O-$nZ1GCr`C>vB#T7c}@rR|pk$ZZrn0-g#d(5Z!md?~Odfpu&CcNeH*lPG{eH=+uToyzkBS=hr!ST49}f-`l_OR0ijx@U+N7Yq zvGOLx%cL|Y{^ep>dy64&lY+Wq_m#ULB^T_@!Zrl9DF|hIL%~7_cvBt1zs{ArWRCQO zwH*w{PwPS*eJGh(9gYjQTzXO|hslL?PQW(|DcS0LnJKj3Zw0KdTV~ofnOC$Nq|8Jn z7yvmOy4e>`W*WsMx$mtY(4PcYjU+R@9cd^ty&1mcIzfKIN3_huJBzB8nUJTX%!KfK zndzzXpDRF=@jDdMjiT&DK8o(@TRbCQT63eQHfKIa6h)mceH5))tRM0}19;%>U_aza zH3`q8IYCtyND6Az4E4b8u*G%ilKgua?;mSDep8s_QTUmfw550a;e)$vJ zMnke8(Zr zFp93l_Z3vLT!?dRdG4=1S_KLjgh6>RI4J&uPyIqI#E~lM?z`39kFnkzvH?rMwOvw_ z*BI%(XpPa6`>#=hZ<}yMP!0M2h}zAlPr_F^N)6e6)=HO%MRgyr%(# z8GAp%Iq#q6pw(#QtWf)>^w_@>;f0I_zh-&tm&0}aC*OZuSJVB+<>o!|lpK46kKfpH z!{1O|zg@DkC($4J)Z~0dq8tsloZWPN7p1BFj>Zmzlfrf~8egZ7lDf|TpRY)JZ?!4# zeZdwc(>4v_YdTT-12L9+tt2m}K)qaI_Zamp-ZUkbVEHq41uARr<^ne2H#f^9Ra0n@ z_)_h$Wi}&A{)qOa1dIn4ilQ!s0)axV=^texI9wCYZa;vyRpD#n(N=3~Z^}xEYY1BNYk!pOER@JV{KTyGGldbw_@A+W9fJ-89~g}-dH*o&R7>)sbpe1OeDim z8cX)I;TG#OE?``}sT1av>1%Oo;?{ILn}r!=cQ~?zqF*@m5OSUs3qw59|#$78*Tp#`UGDMaWZfDMI-8Ek)O0smLuwcFE3C^wb3xPpxh#qD5w@rRX{I zi$uGF(G`{=OXBYnb2>Z%PU6V3)5*8WEaz47T5joCEU|lnT;8;+e(7Q9mq>LZS!2$Y zR865-cH>Z!M?yJbB}nKrfl)pQeHck!-5cg*w${c=LGr@M?Ib*H^_ybbvQ}Rz8l#D3 zHWf)F+N_OGk>VCJu@i>{r_f9xis@K?A|697Qq6E8ld=Xfpjx1(RwfMEH2`DwbYeSc zot>SOZ6J~zNP`r^>Rgh>`}z~HzE~0l@bOgArj%B8Yl`g{NT9$Bt_A}ov@!$TneCY@ zs5LdVBz#}OPdjeD(w)OU1VtdjCn1N1^f9%@m?F}LiFdS+zB3{88`9T+?ieooUi6iu z??dq0-K6jTH0fI+@%f~WAac7L=|i59qz~caNBVZ7={eG8m+X+f_7l3QBzdkcU;;plEZI_md$a`m zaW2BvKn^4OAgP)j}jz!}A5c+TnYdn)}wfe)EOf1S|VJjQ%PQ=>kFV0$9Q|T=k zR0avH2cM;6`XH;JK(Zo{oJ`kNzXDR;R^gXKjN_HAkPL-=N`%v!V{H&VZTXKawZhqK zIMPd=CS&0?SIB!1Dj`#b6DV|ZxO;mRTumaC+}u`=K1EZ>IVeBOYh)qMrXZ41WX!Tc z^c_F}D-`QXrMC;;vj(t#xn^VVbd!yeXVNEL2Cn22)_PSd2rFV>3&TQP_%VrO=I2WI z-78<(kdM$sG9{562e{)?G=}N$B8~~`^^wdmHBo1M*`Gf|o%K[~2ha~#t@A)Fl3 ztKfIIIVOnB6c(QW6btp1golO*VML==eXRjS?UEc5!pDzeq9JFFW3o$jIHtX)Rm(Aj z%5Y520X@h=3`*b1b4*q5l&lTE4P`)O!@7n%zwbh+AZ>IKV_OR_bNWgff%^e8c0Fdv0NI)arSYzoxWNiqz= z9*KrV>q4w#EEdgJxQ-rNObSdzGRi_7Z4E=gQlW{^#@K~5XP_33#F}#zLtTzmq|)Ga z;;%z((2=j*v~K=_w)*8@kCITBhpCg%SJ$K4Y4$+M&`b$bL(zeVt?99OA*iX@(H^L` z?QWuuFjPJ0&~`@P863O7 zRA2LDr}7Ewx2hFht*#6F6VXw)2`*frSKtqMGBtezpJwv6kWaJtLnTUC{Q3Dby9+<& zU(UA{{nK`URPRZtiZwah+@EvdEWrt92|9fdmj@o>NapgMd-58kzS;UKa(O=lPh<3A zRC=<1v_-lC;pFl*!0&W(d0+*}<^2XgEavi%+2wLv9`cZNVtS5|;l*kYK7L#tbuy-8 zzg@D!<+cA~wOrnsGFt-e2q*v1DLpLD<+V%v(Y8CiK~Q-luBug1HHGw6f^^hd9Z62| zbv*(Y{-G?tPhgh6Ixa()k>z_+TaDn(MN+Q@X5|pUn9{y$Icuw5m&*2%;9{}BI>4oZ z@-NmTm(+`Wge<5(^Ojr%MY>LA+pLSO1$9O;Y^O4@y<|}UCkaodbQzn|;p70s_IP%C zv1D)W5*IzUfFY5vu5Kanz3H&ZMg~#M3h5tDeAyrd&bTU25f3xH-C#&~L?BUx5xmHGFq*b6(QZX*ePpHp}NXtf5bqibCi<#?Qu)rFQ}A{_aX;+fXxhtn`h&>Hr( z`enF8T=Ln^CpKEb0S=eO8UceU0ba9w5kRPG-mdKyNf^h%A zDB9~cq`G5i6tXonkcdL;rZ7%%8wo6@Jgx0dT5C34x>jUgTlF7as(WG+8^n)UH~UjqF(C}UMDi7NQe?E5~8tbU|A9>E8H5qnH9yy z6{RY3uF7X!9jY%1+_GCMmRz&4Pe-%Kxo~CQ1N`F3{t@{7?v)+vJ6HB)5?`fF1M-wy z*(nN)^UD4atS4q1{C4@y%HDqG=vMaDGIHE>TaM$XS2FEtk@)+9miU!dcCO?-lCIoJ zu4~&9?9ip*FHzI&s<$p?ZR-SmM_Q>{Bvn($5M*%e-UwIGR4l{Y zOTBBE+-^&At}RR1Jf&m^Vk!hwtDJ}MfuZ>x+g~AW*fCeuOX^V7{+~`Ny1#u0w zFFLS57icBB-N(>cyw&neIxM@LMjB!+jV}L;C(@J=cQrXzj}n?$huLpvranSP)6Cn@ z1=7r$;SaiL<|0iqX*5|%8hRhXA&{u|!_Vovkf$WgMEH2q%$renj%M2BJ2Z3f^Q4*X zFZ?)~1u~aQ8qze$Il0Mvhj%iwxxT|Q>nQqT<4Tc)%(fhbIKg{k%sT4Ei6Ph7UVf-= zxQ>>>37Q?BjDH+|LMMk4$Wsz05PnE;!Y<#z33bBq^JzTTgUy7ZF_gn1)yY>Y8nMmB&c`lRRG}XM@Ez+;x>DV$l zw(b&1JQ9yKTT;O+Ul(2bK3xDoU_Z+4mW6kM#|Dx3+we}rv>PQ+c049{F0I@YZ^8*u z^UQqanGFwcb|Q#nnvUqw^EDe@8Y}< z8}FA5f2obp$=KEyWD%%)GWZ%L(`JcsiG~_IDVQa&f&{(`goerN?r0+dlnryuSdz-8 z3^s?@jBI#&0#>DAmWIy|6EOXx(P+-d)s~1Ti^b;Q+67vNYBN$8r^2^7h3waC%Y(N4tLNy4tKu8yk%MmzV0OFaF*-DmdwmSz^XKT31 z&#^qS6E_2&e+q0XFa&4lduAt<+49^ZAgjPxm9Mhd9egiBu<&C6OALsrGRF_Vyf4*{ z?=G<1Z^qF8`1nFwH!jpmISo^^&7Z!B1h$u81h@oa3Cw+ps;wX+F|7vei$!4P7ti!* zri7oSBFA>CH3dbu1!F(1cJ zB;rZ3$G8Rz+WJ;)E`=S)2tMcrPU-_7=AaCK4z6g~MVpUgtg(PKgKv7~A!5yX7uKAL zW*e;ewqQlg&{yGy+{^B58f&hW_WtWEa*fK3J@g zU6KNB zM?6|xv;HSUt6PCbh8Q)W*#@nq;(^4-4}Yhd812+(^nmoZ**ZKU*)e=VUP?G*m?rD{Z+mUVh0h38sH)f8GK zKH=mk!Tx`H*8$kXk+ny%0RuKRq4$LlFo`k7Kms^~-V%xdQ$m+z$r8wtQE{QV&_gj` zFko<@cbg6dLQP07$K@``9S{*=qzk>1h&y_sD}wy`mUyGwp{?N7TqGdnXo^XAQ) zH*aRSen3@%5#y*-@f;|aC3RyM>GDHW3_{u;#mmL38=x(}$gH`vL6&D_k=G_GdcdG4 zZft-HZi@xOYv{;g@mWE8s@QIZcXy-*RCc+6VFMOak?4=@!D!bTm_YRFJ7(a+U17Qf zt8NT1VDp8p5DT^C_1SRR93D_ zMu+fQ?vfYL_+YTTr0n>hDYC6}$-d)*0^cq<`wqqjc;=>EGTiT8mrOmZr%RS&_IAnF z->Pbte7oa=p|tn`EA~jF;|u+$d0?jnu`&T;TdY+i>%?1*50K~I3)Ngkbt;0K*esm{ zv_Sv9s@W*0=Gslva&=H|bFi^gKyeapPM+}rp1CR2!2Rw~O<&~5Lp5^D zUaE=sxT;hmrl8A?Dwo##99l~X=Y@-ViftTnMY(B+--^{~w33a~X`%eA3SX-5Mf6bltUsv~|3SgZjET3y zWh6EUm2~l7i2R$x+)UD>OH9OiV$Uix$PYfN#2_DFa=RchDQ~ z!yupGC5s0NE2l7`QI!(_z({^CtUL+Ri3%%kj%+Iez_$>9h?UbeE${oX@-2duFXsMb z$K-;Q%SFaKtQ^nWl$FE%?y>T(k#!F%mt*#_^4A(wRn??b2Xz&T(Lvt2tC-G1 zsTSE0>RHBIFF`s90lb#}>1GAd+goTt7P+`csvS3dbS{P50tIkAa!F{P`d1493Rwui` zkq9FxGDMQM^`(3y2qP@6Y@y84?!cjRfpka=8WIx|-GL`CeCY6j6(qs+FOCa}1fR1_eLw$$8j;

q3K#UGuE*q~9)O#l@#|#4d9-E2eW2P*||? zatiTAHkMYhZornk9;pD9)A1&!1oJL>OfDnb3Hi$N@d6UOkZ%}PEBpIebg86Rhoq+n zR47acQwUkg2-`_Pc>d%)37~h1g$283`sdF=bO3=&0qA&-ez+uJr7JFpgwa(6(?1l0 zh@_nSf!^=;B7gWUbG;wgrY1v*d@?E_`Gc&~BYX{g_6Yf-IrlFue^j`94bLd@M=1+y zxI;zcv4XwjV#6wYXmTO)?~y{}_`Md^7e1dDe9KgPtTQT_3c7=3u9O#0Qs!^e>Yf{a z$yPcS(Fzoqv@No&&;(7D5KZ*JIog*diUm!)4m%BM3!$h3uayqWG!X}};Zj!jc;==w z0r$I26FrbG4^7DNdubx#)lcf4N1|0-(x`q32vy1JNVTkBO+hv|NHcMbF3L=LEP#uc z5>|H0!K5%cGZF&0x&q6tutPpZ^zs%C9!&s=9T@pje~ccEmTeiZnFIB6B#-c(4P7Vi z)va+IZN`pdn~ILqK9g1-VGllsMTb>gVpp7Y$VM6}#A8eHqy)!N^4CS4BpKXKu>K z;C{Cm+1Ebx;3voLWn`?~myK?Vks-G7riVe-S8?~!0;OHFI&YW=^3& zvb{kW;wUFz(YyanXmElL4YotJ6&idK*F=M_;hg15gBJu1nz(;?8sr5c|9BKUc;==w z2=}{9gRdcNg%|kA@q1}7`h#^%?*W1j)1t49eY&nxS_4>t2D@O-6c`dDlUzf}0-CF`JLt?mMh;kk&o; zVwQG6`uFekiHfZs*m!zCzgK_Qp=norT=t`@$Ip7n_Eqh5t0HgQzhl*aKF5CPs_p;Q ze3oqaY6)ZZMiNSeK7}q)3}IjVFO^aVd*eqUi4Zo$%~%5_v7?y(Z`V)DnqcFLv;Ylj zfiGE?;4_lrFu-U&K+75r(z5zk#+E-q%Uz5{L z*%70bg|R*?d4h&zTePe$1{qeTmUV{zyD*sAma1i4kxn>1)Bfjb8g>wwJTV9H&eO8? zOSEh?CI^1R8kg;RHTYC~2%G#54Yu@7WF`0x<&jQWHZoGnzRX2>%d~99DlIF>(z2oK zefHg2EnB`>%PwruvZuCbSj^FE`=N#z&uCe_w>0dt zbJUT36HN94tu>5&+CY3+>^PpoEgJ`D*jvTH>=Qq~kLmhTKa!QxV1@HOij_du)Rb!h z4FFIff0j`Ols9qYuN3nupn_J?4I;@m%&y-{N>CBjbfP4N0MJ2NvKv%uwYL{S9! zBm>`7D`@OKzx0~>eDSNKTCb@I8S1@Xu)2?Ca`e$^Z0v{ju#?vmZUdlt;LN}B%}Nl+pSlP-lSD>m7-;Y_#T~+mg2|m$ zPw?u7$yhY^<{9AOg!|1uZ;b$@Hb@lyOZD=%`dEyqu728TavG5NWUd=8e+;#9TwQr?5wxl%q=tcM#Q3qM++UgjW| z_ZQ`V`NK$4$o@3}?4kBY-=cOK)6B~TOt>c|lL%0Gr2$l|8v%O#9RQKbDS);ExB?K_ zd<4+zUkB**e+KBa!JS!MoI`M?cthILu2dqfF&2zIq|W@Fo*6^xNNFUjvtv_PtO&>7 zVqS;$=^2WDfY}gllSUX!x>)|4AKV`4#<)MRv*BjF-R7_vol-Q6we8V1m}bLS+Xp`d zhn^nx86u=>cJ|YEYdv#GL)U5JhBuh7^%=gAN;|ylV7NWnl(8FVV9`VS$29E<2ga7L zW2~;$9mw1_a5qGT;zQ?_s3|H85q2}q?u^$w_o6_(PlhlFMNEY%v4FZx|2G>9^9d{B zfRa7k{jxiqiNC+8_rJD0nkeP@4by70+I03B^TS!Q7j#5k2U%_Z=G_O68W%IPXJ}o& zboLgjU0r%?Sj@x;!ygN4s5tZ-@I>^;!97Cj`yGUSksd5!!PPo1$ew4Kt~Z(!5{xmS z{^{(maO|GBezsw{K7NMHY8uzEy6l*?e8z;B36rMA>Lw3=sCp4>7b%j%te#&R$Ihn` zjMJvgSg<6;?wFHl?tq9sfJcXv9gAng36EKhlniTx?9tx7F?H&=F=M7W=V6nQna;RQ z{)ZVGOA#Jn4FZO3D@>iHGw9?*%_&h z`KvZ>$eUh^dj*W%wAwH_X8hPmx&)`iWShTo>6)pvjxaVsMB8xM;R6fw#<+O4VQ~3plT$*&Sf`*2oU2~@E_3@55^OCSUdzLFRH*ep3~E~m)YH4x z+2ZtZN$b|kbtO9zVFKaWxV0#iJpHF0+LWogF+Rk+FvDV;VKV3@kBwcrdRwyQ7-Kq$ z{TOS~``L@zv*uf7TIMcax^n%>IZ25#Os4dW8_tbNXCJdBgRhosSw1^H-kiK>;qrCM zQyd9qqhZdvtTR)%_n<4qD^q7qoH*H>oHTdQ9E(XedBQmJ!nES)NFtt+IL?|i-hQRz zz>W=b?XJ0t*KgakE-lrOILn#3CTIHvDV=@Fnzh_@{^+i}ELXy;(^Y~!~-Pl zJ(!#1O4TQ%%$mI-f8RRij2T8le0<`fjMI5YD1qMS1Z&Z*=;-AQ)){k?GMA*U%+1@i zBP%TS?Sp;(r2&CS-oh@ z=Cv7%a#pX-&MVrSf6mF{vK`sGXR&4O>cz8Ni?f!euiUU|e)`(wE3-Bo*tof50S{u? zvo+T>B{4145|@-V$3A~qTB1EYWzK@71P?B&bnC#Nl#WnYx(N|-UjwRqXWv_)w-Tb3-?kbB=rZ=!AY?K*UL z%jy-Ymo8biIxBb4+y!&9cJIwwQ*ik3&UIT4fDVx8gL@11?BB3#$+C>h6-%Gmkd`tp zWkunRO)EDaI9RwQ=U}7=l(%+E{*u|rv%xJ=<}8^t!)l(pHhXdE^8EaD>5H~U`Xt)- zaN+Ti{o6Osoi{IY#jfL9vI|$tS+X*H?(F6J_O4xVd?=4^(1G0IqdW4}B_$`%Tby?= zXZ4oFNf}G#COa2y-?4hhkuf~bz=EfC?8#Z38E=eFNXjZ$Jbz`1X;u=5$DX}mzH{do zpG2n~-G1uK)6X233p(9?{KSqeyOuaJlFYVQ^Ec+KUv@T*#}{`n@5r%JPj7e3n!PCZ zV9}QKg_()->~S+^B(Gb$X5mR252VXqyLVsFv225GM$%J-`70J>C&yaj#!jAW%uHM0 z*k|)e)OqI6sf#bXdTz_Iy~mCoK6c{tiR_GJa}(|MIg2)I-BvP<$2a@f-lHX#o;|uQ zz2Lz9JqHdQIlN~6!jzfT1ZP^-#;vE!JW$fEyxqkm=XPbzTAQDnn_sYVcc#rXW758nPHf_e#zFI`CWK? z371b@eCf3}-h1b{vqw)HK6AdLWdGV!huNr0&PvZI$a_=-Dmhqk^~KlUd;5IR&b>Q| zP81gxEKV>!IexTpLE@5iYkT;->CopczVzmw-}&I(H(xwka^d2oOQ*9Fr%W-J=jHFt z+nKwnHIHxfm9x*j{_-E+`oqiT4;P<2dHT$;wTaUv>*G^4ZQqoivs#dN%-JJPzjF2U zH(zPokkEFJF88?YG|g)3sNgKY#w&7hk!M zW{lOxrfoTKqGV2zxLAAOHUs=cJ9h^XBWil^t!n@hmY*bTbp(t z4-|3a{FTcuzx3iW=T02nx%WuP`6JFLK|xW_$XK>ElNX8JDqgEjre2 zKJ2#nsY{6I^py*jp1FMGg-iQ#3%59RQx_lJu{n2zt_Dx;0V3$*hf7YKK6C2yrKfjq z+>+y%Iw^f$Va}$f;=v%%0kk`P?8ttQ&B23*_U}7+EO&Xz3?g%jZt1h2)g( z(RlTANy*8Q^QVzs@y4uzy<27{&d%L2J9%{mNCMrX{mQYUM~aS|IDF#t*?rk7x9rSG zN^ou1HaltMBD_2TIM40dySre|f$e+u7j0d=n|AFza^`q(@xh(Bo7c>o zGJbr<;*`X(b+}B_Ew^yn!4pM$_w6dk*_btB%7n4$i(J-;Aaw{#UDsxB*uJlD%hruq ziU*;MMXzX9a_II-7zyx@0^)12vI{q?73+D#%=rd z95}phZAMz6DK^$V(>g4Kdp$CH@v`+>w-oH!n(3IOn=~%QFikfw7!u-W%JUIcU)ywY zT2^+!u?q(`EuWXRJT=iYsWZgi|A9}d*z{Fvw;n#Xf5Xx_^Oh!AO;fuC2%i=c9cdYB z_MRwQmYQHqoiTm#=*~4D%nqeEi&QIqR0BT4vhf#zZ#M7Gr2fQ5|A|+NO`hm}Xhyr;i&P z7M#xBW6Sq*Jq!=_Cd z)Iz8?SPlQ+W-XgH4Z`4n-!y67tZ|Uv{@Wj{@xjSKrl|(Xc-7~$9lAYA_af7F|Dwy6 zteW4ZAAY*n?Q5ouao75uX~qmshbHj$y)G~|RgO2x{V?Kv%sn;o+F?(;-{w zr2Q|sy;^sIV)@-ar~0!|7e2|w+XU}FTPNz&U+4KRb^mKbI@2QUJ9w;XlzT>p09HD+ z!{))U-RqW0ZPam3YF}7tBew@j1Tg_WYtGKx?L@q=ziki(5?pecb`4p%l*!^4{}<6mo=c7zc;&GqTG`@b!u1b zM@Psa_=|9#MS_u!6Sjj#D-a;w(|#JC@LXC?b6twv@f`#K5S;SL`| z=`J1B4XJH-^lvAJx~+qM+H7$2S`dTA? z>Nw%c?=Ac4T`s*pP-xj8SJAvZfb%(XoGGrjRqr>?{5|0 zVeqU$BL@$Ny06EO#|HIl5H^r%Ce$ z)mcFO=8XetG^!QQD6m$e7EM6?E$;I}EcKOG)-bjp-TkhcEx_bYS)~ux)F8AQFX;Y( z`MIGCPiODn!Xb~bo)rCM_60PgKLVsF{R&The{+`(-Y^hfmWpRJZuT>OGysX>TR`~v z#SN|E4f^>7KEJrNJUb}(+X>nWv5vms4(RQ6_jZqVyPrg?z3U^^`eBH*_b={hm3-@HiF&S}8L>!ZUbZaNJ)FM6J zV~VPMoB8z~GH&XPX%9&KCQp<4MRt#A*=R^BTu*BiK4xmUv}# z&ozaoP*dN6Xi;y_By$>0$95rAbA;H&ss9wyqME;T`%&e8joSYF77mbCd0#Ic{K;K| z9;CmYh+aAQdSbZ~U&PNHBERMa=lWcu*fu(fptGjhElp65cFiT@L2|!hSdufqX{z)3m9WW?YK1ACLvm z{M{Y^-kAClCbnmB#uOQ!_oJz+mjId%{3Ae9U+(~o0Gbb^Y0=LCiu-Gz9)J#;H3a<8 zS<;+eAkKj}zk)=yIDh(!nD?W!M_M~#^#Cn`7z67?pZUNaAHG0&{QG`Cp4UN$gYGe9 zSL%#ge(yPJYV$nNy*y=G?%WcYmEce2#C`2%orPb;n6apV=d(ZdrZ>X^a)cq7zwdY~ zTA&T49Q>{Sb@t%D&K{Nib+-7!jAI{Wocu5|^TUiHER?|<5k8RxW3>VNV_mETT)fLT zumAyDRnQs_m|QMX0cnfH`>e_2uOw`x#Aliv+-0nT)^I2; zO%UI3`AcDgunYsXcyi2<9r#xi6i?rXDYGN7|G&J7MCuzolxKEGseLti^WvUJ=6~4V z66UQsrxWWxXn%bN%z_j@v?sn^5O3;e!OXOUHNR;9>r0kaVSX826(Q;UCAHe?s^rYRMIT1m_TZgV~|rT{tV&4UIji9#E`I5ChSG z?@{#+5{jonILo4IC7nh->7 zejI4DNaRj`wRjDfKJbJ1YRJm;xZIJi)?NG=+s96K_{2Bfv=dRQ9)|4%tkZ;D8BWnK zm(nvQH^UM}UA|A;`uaZ1%v0iIrbg#mKOy?4R+mM{XqbQ{!|cnBoY=VOmXk^NR;vxU za&bd5D{@!y5h|xo{a#hmSNbE0wHh14(@B7NoSmh@+|SC4NZpRKbx7HaYiq^H;}aWN z4HYN#hgD7gMLe(&c06>X<2nP#BsX9YuozeZECrSU%YmnW6~Ibh6|fq}0@eVu)QY|k zmJO^2HUK%mMqm@L8OQ~;0JQ9ewn)ea3V=dj8?YVN0qg{J0lR@cz+PY zMuW2!@B{pTYCv_M1`q($1Zn}bfj}S#r~?E8AwXT=KA;{@A7}tH1R4R2fhIsxpc&8{ zXaTeYS^*N!8fXLD53~gy0NMfVfl#0W@F4II5C(Jv!hude1kf3X1iAoSfo{OVz#~9+ zpa;+shyor3dI66Cy@5VJU!Wh*9~b}(1O@?vfg!+9;BnvyU>GnQ7y*m~qJdGsXkZKw z1B?a60po!Qz>~m4U=lDHm;y`%rUBCd9S{rXfjGbb7=d`e1ek#tz)ZjbBmh>x1|$M@ z;03?|H~|-s1SA6~Kq@dBm;=lO<^l781wa~*4l>99GJ%D_B49DF1R(i-8L%993RnTG z1Xcm7fh+*3H?|g72V?{5fekc;91}*@Eq_w@B;86@DlJc@CxuM@EY(s@CV=;K;xP>fIk6$ z2HphT0^SDx0=xtK6?hkT4|pH=0Qeu^L*OIeZ@~Wo9|P2RehPdB{2lll_y_P$;9tOX z;0xeO;46T}P2T|D0^b49;IbcpAAz5MpMhThD3Z7&F-s!^3N3D3fDxz$R0nDR0YFWl z7El`q1cHD%Krj#j)CKMX>H+nE20%lg5zrWD0yG7h0nLFHKue$%AOWp`Ho*NrTi^kp z9nc;K1v&r^0uKRUKt~`P=mbOnoqy;8CC#@EFh==mYcx z`T_lc0l+|D5HJ`R0t^Kn2c7_i0mFe2z(^n(7zK<5#sD$ESYRA59+&_;2}}eg0h56# zz*JxwFdfhVv49?k0}KH51@SnW05dQHmb1i%W|fJ9&xUn zIlx?C9xxwR0Hguc%E>ynCy#VTCxYyH4n$d{W4gZx)}Kp$cDy&qSrW?6!KJY(MS?(0 z?;w4mSE~2Bb$DJL7k4Yp+llAbq_06jTEGvWD!G&PPxMOdpU&#>`zis!?TI53haY5v zPDC1u&9^u~5HXM!F?ykll41gu4n+5p#dvwY+w_#QpW`5Nvu;neoYB@^&cXZiuDqT z9)gAeRPzwXg0sX!_$3~v_ z2rK!P#07%>c3MZ-d@J`p^~m$WrT%ck?`eSGJt}^GrQGWKl-qT+ z+~lIGxZFg55YfOr1s%e>Ue7J)&W9Jkxnl0F#OK2Wcz7Qk!0#1$SHj;dx>4w$jSn3Z zi$r+3o=bl5+iCYAUm<*uOxMbLkm5^_@qyq15s3SGF8Rf8=RK5sld?|9cbX@&|2;ZX z@wd8iI52sv0s6MP|h!H{{mjmyu9Z5+G zsqWHh;+jBZFMPF3bkLrvWg>w&rJ^KkP^;LXPEpIm!0t+!G!LQi3=Wmo(g4I~_vc{N zEQDqf75RcDiA7P}!{1hIMWmvkp_f-JQ>NVDcW=>>S|;WBan;Ji)3(S6Lup&egquo7 zD1q{A3y$|#`{MI6D$gk;7gw!J?mb!|>y2CYPaeKQ#$pQJd9<_wf+C{h-s;P$MptT? z+=MSHa-w(Eu}O&2XF5xzC6qwgK`zIoUTk_(2k5+DTT;a8xY7%lqOoRrI{tyR785%yTfoqz6lK}D&zT*5f z?#Y~iBm*4Wi>BG=+9#}r&%kkK#`pP^fFVrTv#mKPvs)d~Q(XKb6m& zs^z1W&+njrhv1?G`~ZKT8c-dm0R#Xwfm%RqAP@)w>Hxt2eSEMkfUnoEdO&@k0niX= z1T+Sk08N2rKy#o4&=P0`NI+|#4RAlu7I*+?2eb!5feyffz(YV7&=Cj+@U1Au`5eb#0$fUg3vp}^z7 z6TmQFIDjt&v5`PD@OxkLq{_b}g{$KOkg_^{x|yCr9UrLUgPYpMsq)?3kncP?W$$_~ z*n!Df7Qvd!{idq>(`&G;5Ztym>eO1n< z)bgpke29){Yt3vWt=b!7MAet(3>(x`M@kE&x* z%jZ|{O8}tf7Je6ZC}5peW~Hccwc5Va_NBJ3e_#9Z%(Z&IQ_v*jtoNe`_tw5k zRojnJEfd-q!ehZt*zDuQ(JKf7wr4zO7py}Out%}M|P)sV1Rre65FWxHO zxu{yd!&z0lf$MxW8UFiBNKUzF@A3%O&epN$WA;(xg4=*-g-V@v$e#2b4F*f~7 zgHx&69*Yt%%O+XVN z&m(iRl5bxy<)k)18PM=NiL8XkIUzL=V|#)r%mA|?-X@JOm~^p}Fg>cQ22`%JjI4h4 z1=D&2@>AYRymD8#&_S;(ZzGK>@yg^*2~qaPm~3{Z)X!{FqN3@yJn?lA^^yj^D`_ih~{BO)TB zf`*ULlTY+8DcS5aNuzDC2D{T1Cc(FJR8SXtoRn(N*`;XH07)i6*n&5l%%k0J&QTh@&1(BHw*w7hZ2f1peF|^~VApAU`U* zKnf4m&LN642R9-Hg^Ietg(9FLZKQaWDN_1~(ny!nVzwG2n^AJ=EHjmYrP#$&N`;HN zJ;C$g(^oPYk|mSb;k4P!dYwhG+MEVQP=B2R1n6|drS_D@43CMH9InJf)L2lo-R89E zZ5Bxv>u}n2dZ*cD4H|B6ICSwSFCVv|35ga%g2C$4Q4pjMZ?XVR#BH=cPMgWkyB7G)?H27iR;y;>Af+DvFc)^5W!ikO%ES4N@c!fir4vfGF$* zxDlx-h0SAtD;0Jv#j8wVQvyTEl$a7DHAC@O+0yg3cP$ zIlME!p#ZX1=kP8wCGdtYsar$@52TBW1BE9lbs$%YWVG3(Au%!0VZ5%wq(L#!h%Zu5 zH-33S-q?D`vBkQKMuVL<84$JvvPbP(JH}eTi_F$|X=taBL1PDa>)sYS!=QIcAQV(9 z9&@Ckc2lSkjKI6~0mShTPNEF%SDe^jk6RzvjY5f<mwjNYMJ&;*HCKthNKh(FrF}5}}F{YwvMW!cizuF+3En7~V&4 zjzvW#I2MnIH!qX&Gx{8Ri^>^9rAUP=s zZw0oYv^C0#h_Gy1s|)8yYHMKc-NK}1R$%f9{i4ZP}(@Y*xg5a7CB|MM6ixg@!TXh!mY}BP8MQ=zX_KBFI zK{v!>(fAW>4n!IR4r{k1Ay}zKtGC4=?{-_P%i)xqHe@m$(K*7yd2f}7B9rSGr5DFO z7e&agmHH2ZTiJ%$hTM4lQ=N(W=RF&*f2s(ama^K+5Fa}OoChk=?F5q4NVyNNVU0wczh(9 z_LLr#^V!F2_085}Jm!i#(L5!}7oVmp->naUI*KOxz7bYP=(J{3NZzDlS(@9)_j7^oyPV`O2pfN7q<@b~zTU+9! zI2-yhF3c^Udl_Z?S>b#!Gse)e7#+yMV%A+VO@y^$yOFNK5UlFm8yZ zTmOlSxK9M20U2t*OF(D1;XRN)TtK4a;=Vyc5lsMGFme)Mi2rB;;Q~?>VcL>Q2wd=e zc@gG8a;Xm&d|}=vOk=p<8}lMeCkoRXF8Ip42t$oTBf&*d!gMB=ws66h=0%u3c(&VbCI(rYl_V#d#5iH>K`y2KEKxQQo*j1M_lUagVVn zJ1yfG=EedAI>DSjF`X0gbSd^P+tJ0cvf3GPPSOj$Q#Qo^l#Y~@|N z`Ks=D&g<63<5pX~^5(33Ttr|ZuZo}VXj<0W+b3HI zZKUvU9s%VFM;kD_GW@Ph&^+oHFX6SQU&U*qE!KgMbu~ zT$OGZltVFMkOvG(i|{5>wnZGpBg$Y9{_#GRKLdOZV+z+8U|WJnTbwH$bHl{lmZk?r#)Ph zvZZmHILeppSS}J&xor0$9);V;Bd`A;zbRjtkX3Do25V@WP9!^aBEAG3)yCeYLkGb} z)*{0+l=hbB3ZJ`ZD1WKsyd`=ke1r!08XrDF%v@87j}V1x8Y30(5vAUUFWkpd#}BV7 zs;2+He1Vq|y($+gy}XH+4R=@g0<{8#cIhMc;wVkKGz?Zm;XyWg0+h`1$SM+5Dq51F zg%tdkV&SR!V>E@46$!4CHfcXKfM`ixF{3P7nTwo&F%06v6It^u4K>(ZP$QTV9C}k~ z#e)_+7lVO_&%8iogA#(cNu+Y?)kb-U+}cpg7=6)6M9{G#)oKLlU>>Ik z!5^cU5YxQvmpnE8xX0jxS{iTPK2iYhg#zIZDS-TmB7EB}Z~yh-4;g^`d3-)Cm*`T{ z9RBG4$zP&-pWdHOz_f)wBmnYnP5z;{$54dsdAAj&=K~RnOHLsIAutf35M0>qihB%0 z=$_}GJMO!Sdp-bq6!(w%g!kcKJiJc{5M{SPN|WG0ek4u#$_AWUad)Nth2u_Xe?sw3 z-lf|gNiRzK^O>+vnvplsvd!oe@(^dxTcBX&QyRTw8P$Zo70N&KCUZDlq2?v%^n|h; zqGs8#vn;bxC`G(g8s#m-TzUjr2gE7bV>%2SgfZ#VMFI#9G~tD{q?R;cu(l)ZV9=ukoT zAWAxjnCh^-oTfx`e3bimyVE+1blTqLSclIvd4=*iSX2UkPjjrpy9P~&o{Qu}f^}E~ zh4AT2>+r=F8Xuv&4kLoq_z2~7L?e!_crW z(AOg62k1TmPoQD?JmG1Yb-1g>(=_F`^EAymj58BY)0F)^O|uT;P1(bo65az3z{A-07{o?py-|7sm7Ib?21B-4(V)dLViS zs_6zI30#$CTU5s*UC`XgbFF=&hbk<~o3XMiYds$N?+LwpFfZpf)Q59cDBz|byF@qC zdhU*Z+n&dVmLU(61r>s7JOgFkx;%6!sNh}`aCs?-vd6ENQhC{McZE_1;7*}b(!YwM zJf#k?!Kgq7s|tv0W@qnPQ|ez4lhP{-#WLpL=xMt_@4~EKk|8Q+gh6QCeaE2=KDmYo zbdmC$N_^vQ&Ag;m!rvp^p#LHL+?n0D1O?{nA#accX zV~ye4n0$%9u;#dHPIp`=lMq%SKB?u(8`c)SZONBcA&qYUA#BAft}F>xURvNS2QGAo zfqG9|Q5-}iv{R`#O4C9^I8L;|Vh4p!6AWHqT_FiF?hp@`WnQ1c$5&ABl|VdV$)q+k z5}=WU6C;T>Bv!QNqJD(}dV3)hk!0X~IL_?Atg4yhIuVCAr%@6qUr5rI%82^yeT6Jp z2)aW##iKdIaE=Ouv%om^KR$PZgb3o(DVG&dYSNQFopM*Y_t6{HVdyf-bjwu18lP^t zFWr|CQFz7sbj#o{pLH0{eoAG}=&1K-q4Tr^wy=;@3-H<+W^4@K*?owlfn) zX#%6sw9vB2bMSmVUT>nYp+aI6kBmDY)G;;7@q4Sr#S)q zhfnScV*m=BWR62a*JI)flr5*;Gbk2wgAc=uW0nhsRB;^>VL#^7LHLHbfD`sMn8pg@ zvuqucVMRs*#r`_*Ey^!Vnkn&sYsDL&kF)obj4-mYVS)@w_BfXwV^ukf;6h|5h%9j8 zHAn^+^yr;FQI-y@lZ3kLW|0aX7#`w<1%q|S34!TSnQ#ua9K}6St_T>x;7ZgBu@G_a z`6_<-pyI?Z0+z!mZX`kRy7i|x1jplXkk}VUad3e=gomdgS$)nUskVhxA!)M#q560b znNa9M@TN!Mt&mPL#jA`&b?3ZEq)O2$QHxYZ`J~!b@hX!lWxPKIWaxb2mD=vf&Eq;+ z&|z4VcWU8@y)<8}C~Z<%D{tJcg0!i3DWA5*mRve%%A$y&YDtgrN&12RY|@YUB;CA% zq=`-PiT^kQ6s~cYwJ{q!yuqu-tlGQw^+`~wAi+8aGmuYcVFb)g>6A((AznOGI<-CA zjC7D}2PU^al4g?7v!PE48ZA`sR6zSs{C4Z7kroKh0nKW0{Y6cO%j~=*b5C&klH{vC@(6=oZ?qVjkW_6M`^x{#5iB> z;$y_5#7Gr#^HLz4snbpqbXG$$EakB9sP zWgrh`gle7JaydupUFK@F1g& z6fj`_WG5CHt1Fc=@-(DCVucN@1V0jcbV^{;-9TF_Q1JUIILYK*-E|!d1(7u0!CM--E*Nklx%;NRfrIY{&$kp=2S1#^9M;q;>;x^tJ*tE^2o);DKLaxH4Jj;X*-V zR#_$vnAM|cc^dWbD|iK8@wBbvkvgV&N> zL`Kc!=0%$apCOp?BYQDOfHPsJ4|NXIIAJtKjI%`r4TZI-LxOP`+P_UQD+csYL7t95 z$b#s;q=zIbbnrItK<{8yj>4#OfWO2*XqEIB+;Y2q8vTZmQ8LW4h^&Y;!4x(sXp{?f zsbpi?n+Of^2jfFeoEams6K})W0C#KeapTRByNP*9#byys{`8~}>-dxO6G%@IlVTzK zNnT-831M&=M}9cShf?(8s!?)Lh}e(Oj5-~iu*~L7-hM^XB0g4 zxh7A)GJd?t%aMwe8+0S$lw@~0RV(uxQI>Lem;8w5Iw&4E2b6h^mzV5cvy2~!&&m;4 z#;=p&fwR|wQ=}K^<3}njaR@(e9fLWP@$0Sx#o24!AfD^t(cTgexM*H}A1ySJ_*PeEFG{66FSDwzG#FBf#KW&iRco<`n5BwXTv za~kEL2HSO=u^;?+v*Hbm{LtZlyX$%|bVsWYCYWijFUC3AFW@@yQHs3U4h`J>u2Y)9 z%>Q~Q++crmo#H8bXjv`(9K$o!;7Q@_INv9`YvC>-Lt|L&>(r*wSjbjqo%4uU!`%E= zIV7;v$}Gsmupk*=m=s>kxI~Y&O2BhUoc1Rl(Ge9C1rXG zO1VE$rV>hH1$kvt_Tx=bq*?6$7napP3Mrc=G6|J)`83I$(j4NGrUq$}gq(>qBjBD+ zfdVo$D4BqDnpOEvv24w|=S=LprX>Uidj9|j*)%AkN!I z)9(waeGR<|Na`V+aM&ABrs%aam$c9gz - - - - - -LuaSocket: MIME module - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

MIME

- -

-The mime namespace offers filters that apply and remove common -content transfer encodings, such as Base64 and Quoted-Printable. -It also provides functions to break text into lines and change -the end-of-line convention. -MIME is described mainly in -RFC 2045, -2046, -2047, -2048, and -2049. -

- -

-All functionality provided by the MIME module -follows the ideas presented in - -LTN012, Filters sources and sinks. -

- -

-To obtain the mime namespace, run: -

- -
--- loads the MIME module and everything it requires
-local mime = require("mime")
-
- - - - -

High-level filters

- - - - -

-mime.decode("base64")
-mime.decode("quoted-printable") -

- -

-Returns a filter that decodes data from a given transfer content -encoding. -

- - - -

-mime.encode("base64")
-mime.encode("quoted-printable" [, mode]) -

- -

-Returns a filter that encodes data according to a given transfer content -encoding. -

- -

-In the Quoted-Printable case, the user can specify whether the data is -textual or binary, by passing the mode strings "text" or -"binary". Mode defaults to "text". -

- -

-Although both transfer content encodings specify a limit for the line -length, the encoding filters do not break text into lines (for -added flexibility). -Below is a filter that converts binary data to the Base64 transfer content -encoding and breaks it into lines of the correct size. -

- -
-base64 = ltn12.filter.chain(
-  mime.encode("base64"),
-  mime.wrap("base64")
-)
-
- -

-Note: Text data has to be converted to canonic form -before being encoded. -

- -
-base64 = ltn12.filter.chain(
-  mime.normalize(),
-  mime.encode("base64"),
-  mime.wrap("base64")
-)
-
- - - -

-mime.normalize([marker]) -

- -

-Converts most common end-of-line markers to a specific given marker. -

- -

-Marker is the new marker. It defaults to CRLF, the canonic -end-of-line marker defined by the MIME standard. -

- -

-The function returns a filter that performs the conversion. -

- -

-Note: There is no perfect solution to this problem. Different end-of-line -markers are an evil that will probably plague developers forever. -This function, however, will work perfectly for text created with any of -the most common end-of-line markers, i.e. the Mac OS (CR), the Unix (LF), -or the DOS (CRLF) conventions. Even if the data has mixed end-of-line -markers, the function will still work well, although it doesn't -guarantee that the number of empty lines will be correct. -

- - - -

-mime.stuff()
-

- -

-Creates and returns a filter that performs stuffing of SMTP messages. -

- -

-Note: The smtp.send function -uses this filter automatically. You don't need to chain it with your -source, or apply it to your message body. -

- - - -

-mime.wrap("text" [, length])
-mime.wrap("base64")
-mime.wrap("quoted-printable") -

- -

-Returns a filter that breaks data into lines. -

- -

-The "text" line-wrap filter simply breaks text into lines by -inserting CRLF end-of-line markers at appropriate positions. -Length defaults 76. -The "base64" line-wrap filter works just like the default -"text" line-wrap filter with default length. -The function can also wrap "quoted-printable" lines, taking care -not to break lines in the middle of an escaped character. In that case, the -line length is fixed at 76. -

- -

-For example, to create an encoding filter for the Quoted-Printable transfer content encoding of text data, do the following: -

- -
-qp = ltn12.filter.chain(
-  mime.normalize(),
-  mime.encode("quoted-printable"),
-  mime.wrap("quoted-printable")
-)
-
- -

-Note: To break into lines with a different end-of-line convention, apply -a normalization filter after the line break filter. -

- - - -

Low-level filters

- - - -

-A, B = mime.b64(C [, D]) -

- -

-Low-level filter to perform Base64 encoding. -

- -

-A is the encoded version of the largest prefix of -C..D -that can be encoded unambiguously. B has the remaining bytes of -C..D, before encoding. -If D is nil, A is padded with -the encoding of the remaining bytes of C. -

- -

-Note: The simplest use of this function is to encode a string into it's -Base64 transfer content encoding. Notice the extra parenthesis around the -call to mime.b64, to discard the second return value. -

- -
-print((mime.b64("diego:password")))
---> ZGllZ286cGFzc3dvcmQ=
-
- - -

-A, n = mime.dot(m [, B]) -

- -

-Low-level filter to perform SMTP stuffing and enable transmission of -messages containing the sequence "CRLF.CRLF". -

- -

-A is the stuffed version of B. 'n' gives the -number of characters from the sequence CRLF seen in the end of B. -'m' should tell the same, but for the previous chunk. -

- -

Note: The message body is defined to begin with -an implicit CRLF. Therefore, to stuff a message correctly, the -first m should have the value 2. -

- -
-print((string.gsub(mime.dot(2, ".\r\nStuffing the message.\r\n.\r\n."), "\r\n", "\\n")))
---> ..\nStuffing the message.\n..\n..
-
- -

-Note: The smtp.send function -uses this filter automatically. You don't need to -apply it again. -

- - - -

-A, B = mime.eol(C [, D, marker]) -

- -

-Low-level filter to perform end-of-line marker translation. -For each chunk, the function needs to know if the last character of the -previous chunk could be part of an end-of-line marker or not. This is the -context the function receives besides the chunk. An updated version of -the context is returned after each new chunk. -

- -

-A is the translated version of D. C is the -ASCII value of the last character of the previous chunk, if it was a -candidate for line break, or 0 otherwise. -B is the same as C, but for the current -chunk. Marker gives the new end-of-line marker and defaults to CRLF. -

- -
--- translates the end-of-line marker to UNIX
-unix = mime.eol(0, dos, "\n") 
-
- - - -

-A, B = mime.qp(C [, D, marker]) -

- -

-Low-level filter to perform Quoted-Printable encoding. -

- -

-A is the encoded version of the largest prefix of -C..D -that can be encoded unambiguously. B has the remaining bytes of -C..D, before encoding. -If D is nil, A is padded with -the encoding of the remaining bytes of C. -Throughout encoding, occurrences of CRLF are replaced by the -marker, which itself defaults to CRLF. -

- -

-Note: The simplest use of this function is to encode a string into it's -Quoted-Printable transfer content encoding. -Notice the extra parenthesis around the call to mime.qp, to discard the second return value. -

- -
-print((mime.qp("maçã")))
---> ma=E7=E3=
-
- - - -

-A, m = mime.qpwrp(n [, B, length]) -

- -

-Low-level filter to break Quoted-Printable text into lines. -

- -

-A is a copy of B, broken into lines of at most -length bytes (defaults to 76). -'n' should tell how many bytes are left for the first -line of B and 'm' returns the number of bytes -left in the last line of A. -

- -

-Note: Besides breaking text into lines, this function makes sure the line -breaks don't fall in the middle of an escaped character combination. Also, -this function only breaks lines that are bigger than length bytes. -

- - - -

-A, B = mime.unb64(C [, D]) -

- -

-Low-level filter to perform Base64 decoding. -

- -

-A is the decoded version of the largest prefix of -C..D -that can be decoded unambiguously. B has the remaining bytes of -C..D, before decoding. -If D is nil, A is the empty string -and B returns whatever couldn't be decoded. -

- -

-Note: The simplest use of this function is to decode a string from it's -Base64 transfer content encoding. -Notice the extra parenthesis around the call to mime.unqp, to discard the second return value. -

- -
-print((mime.unb64("ZGllZ286cGFzc3dvcmQ=")))
---> diego:password
-
- - - -

-A, B = mime.unqp(C [, D]) -

- -

-Low-level filter to remove the Quoted-Printable transfer content encoding -from data. -

- -

-A is the decoded version of the largest prefix of -C..D -that can be decoded unambiguously. B has the remaining bytes of -C..D, before decoding. -If D is nil, A is augmented with -the encoding of the remaining bytes of C. -

- -

-Note: The simplest use of this function is to decode a string from it's -Quoted-Printable transfer content encoding. -Notice the extra parenthesis around the call to mime.unqp, to discard the second return value. -

- -
-print((mime.qp("ma=E7=E3=")))
---> maçã
-
- - - -

-A, m = mime.wrp(n [, B, length]) -

- -

-Low-level filter to break text into lines with CRLF marker. -Text is assumed to be in the normalize form. -

- -

-A is a copy of B, broken into lines of at most -length bytes (defaults to 76). -'n' should tell how many bytes are left for the first -line of B and 'm' returns the number of bytes -left in the last line of A. -

- -

-Note: This function only breaks lines that are bigger than -length bytes. The resulting line length does not include the CRLF -marker. -

- - - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/reference.css b/build/premake/premake5/binmodules/luasocket/doc/reference.css deleted file mode 100644 index 04e38cfebe..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/reference.css +++ /dev/null @@ -1,55 +0,0 @@ -body { - margin-left: 1em; - margin-right: 1em; - font-family: "Verdana", sans-serif; - background: #ffffff; -} - -tt { - font-family: "Andale Mono", monospace; -} - -h1, h2, h3, h4 { margin-left: 0em; } - - -h3 { padding-top: 1em; } - -p { margin-left: 1em; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; - margin-left: 0em; -} - -a[href] { color: #00007f; } - -blockquote { margin-left: 3em; } - -pre.example { - background: #ccc; - padding: 1em; - margin-left: 1em; - font-family: "Andale Mono", monospace; - font-size: small; -} - -hr { - margin-left: 0em; - background: #00007f; - border: 0px; - height: 1px; -} - -ul { list-style-type: disc; } - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } -table.index ul { padding-top: 0em; margin-top: 0em; } - -h1:first-letter, -h2:first-letter, -h2:first-letter, -h3:first-letter { color: #00007f; } - -div.header, div.footer { margin-left: 0em; } diff --git a/build/premake/premake5/binmodules/luasocket/doc/reference.html b/build/premake/premake5/binmodules/luasocket/doc/reference.html deleted file mode 100644 index 287dc19d90..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/reference.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - -LuaSocket: Index to reference manual - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

Reference

- -
-DNS (in socket) -
-getaddrinfo, -gethostname, -tohostname, -toip. -
-
- - - -
-FTP -
-get, -put. -
-
- - - -
-HTTP -
-request. -
-
- - - -
-LTN12 -
-filter: -chain, -cycle. -
-
-pump: -all, -step. -
-
-sink: -chain, -error, -file, -null, -simplify, -table. -
-
-source: -cat, -chain, -empty, -error, -file, -simplify, -string. -
-
- - - -
-MIME -
-high-level: -decode, -encode, -normalize, -stuff, -wrap. -
-
-low-level: -b64, -dot, -eol, -qp, -qpwrp, -unb64, -unqp, -wrp. -
-
- - - -
-SMTP -
-message, -send. -
-
- - - -
-Socket -
-bind, -connect, -connect4, -connect6, -_DATAGRAMSIZE, -_DEBUG, -dns, -gettime, -headers.canonic, -newtry, -protect, -select, -sink, -skip, -sleep, -_SETSIZE, -_SOCKETINVALID, -source, -tcp, -tcp4, -tcp6, -try, -udp, -udp4, -udp6, -_VERSION. -
-
- - - -
-TCP (in socket) -
-accept, -bind, -close, -connect, -dirty, -getfd, -getoption, -getpeername, -getsockname, -getstats, -gettimeout, -listen, -receive, -send, -setfd, -setoption, -setstats, -settimeout, -shutdown. -
-
- - - -
-UDP (in socket) -
-close, -getoption, -getpeername, -getsockname, -gettimeout, -receive, -receivefrom, -send, -sendto, -setpeername, -setsockname, -setoption, -settimeout. -
-
- - - -
-URL -
-absolute, -build, -build_path, -escape, -parse, -parse_path, -unescape. -
-
- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/smtp.html b/build/premake/premake5/binmodules/luasocket/doc/smtp.html deleted file mode 100644 index 600ec37529..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/smtp.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - -LuaSocket: SMTP support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

SMTP

- -

The smtp namespace provides functionality to send e-mail -messages. The high-level API consists of two functions: one to -define an e-mail message, and another to actually send the message. -Although almost all users will find that these functions provide more than -enough functionality, the underlying implementation allows for even more -control (if you bother to read the code). -

- -

The implementation conforms to the Simple Mail Transfer Protocol, -RFC 2821. -Another RFC of interest is RFC 2822, -which governs the Internet Message Format. -Multipart messages (those that contain attachments) are part -of the MIME standard, but described mainly -in RFC 2046 - -

In the description below, good understanding of LTN012, Filters -sources and sinks and the MIME module is -assumed. In fact, the SMTP module was the main reason for their -creation.

- -

-To obtain the smtp namespace, run: -

- -
--- loads the SMTP module and everything it requires
-local smtp = require("socket.smtp")
-
- -

-MIME headers are represented as a Lua table in the form: -

- -
- - -
-headers = {
-  field-1-name = field-1-value,
-  field-2-name = field-2-value,
-  field-3-name = field-3-value,
-  ...
-  field-n-name = field-n-value
-} -
-
- -

-Field names are case insensitive (as specified by the standard) and all -functions work with lowercase field names (but see -socket.headers.canonic). -Field values are left unmodified. -

- -

-Note: MIME headers are independent of order. Therefore, there is no problem -in representing them in a Lua table. -

- -

-The following constants can be set to control the default behavior of -the SMTP module: -

- -
    -
  • DOMAIN: domain used to greet the server; -
  • PORT: default port used for the connection; -
  • SERVER: default server used for the connection; -
  • TIMEOUT: default timeout for all I/O operations; -
  • ZONE: default time zone. -
- - - -

-smtp.message(mesgt) -

- -

-Returns a simple -LTN12 source that sends an SMTP message body, possibly multipart (arbitrarily deep). -

- -

-The only parameter of the function is a table describing the message. -Mesgt has the following form (notice the recursive structure): -

- -
- - -
-mesgt = {
-  headers = header-table,
-  body = LTN12 source or string or -multipart-mesgt
-}

-multipart-mesgt = {
-  [preamble = string,]
-  [1] = mesgt,
-  [2] = mesgt,
-  ...
-  [n] = mesgt,
-  [epilogue = string,]
-}
-
-
- -

-For a simple message, all that is needed is a set of headers -and the body. The message body can be given as a string -or as a simple -LTN12 -source. For multipart messages, the body is a table that -recursively defines each part as an independent message, plus an optional -preamble and epilogue. -

- -

-The function returns a simple -LTN12 -source that produces the -message contents as defined by mesgt, chunk by chunk. -Hopefully, the following -example will make things clear. When in doubt, refer to the appropriate RFC -as listed in the introduction.

- -
--- load the smtp support and its friends
-local smtp = require("socket.smtp")
-local mime = require("mime")
-local ltn12 = require("ltn12")
-
--- creates a source to send a message with two parts. The first part is 
--- plain text, the second part is a PNG image, encoded as base64.
-source = smtp.message{
-  headers = {
-     -- Remember that headers are *ignored* by smtp.send. 
-     from = "Sicrano de Oliveira <sicrano@example.com>",
-     to = "Fulano da Silva <fulano@example.com>",
-     subject = "Here is a message with attachments"
-  },
-  body = {
-    preamble = "If your client doesn't understand attachments, \r\n" ..
-               "it will still display the preamble and the epilogue.\r\n" ..
-               "Preamble will probably appear even in a MIME enabled client.",
-    -- first part: no headers means plain text, us-ascii.
-    -- The mime.eol low-level filter normalizes end-of-line markers.
-    [1] = { 
-      body = mime.eol(0, [[
-        Lines in a message body should always end with CRLF. 
-        The smtp module will *NOT* perform translation. However, the 
-        send function *DOES* perform SMTP stuffing, whereas the message
-        function does *NOT*.
-      ]])
-    },
-    -- second part: headers describe content to be a png image, 
-    -- sent under the base64 transfer content encoding.
-    -- notice that nothing happens until the message is actually sent. 
-    -- small chunks are loaded into memory right before transmission and 
-    -- translation happens on the fly.
-    [2] = { 
-      headers = {
-        ["content-type"] = 'image/png; name="image.png"',
-        ["content-disposition"] = 'attachment; filename="image.png"',
-        ["content-description"] = 'a beautiful image',
-        ["content-transfer-encoding"] = "BASE64"
-      },
-      body = ltn12.source.chain(
-        ltn12.source.file(io.open("image.png", "rb")),
-        ltn12.filter.chain(
-          mime.encode("base64"),
-          mime.wrap()
-        )
-      )
-    },
-    epilogue = "This might also show up, but after the attachments"
-  }
-}
-
--- finally send it
-r, e = smtp.send{
-    from = "<sicrano@example.com>",
-    rcpt = "<fulano@example.com>",
-    source = source,
-}
-
- - - - -

-smtp.send{
-  from = string,
-  rcpt = string or string-table,
-  source = LTN12 source,
-  [user = string,]
-  [password = string,]
-  [server = string,]
-  [port = number,]
-  [domain = string,]
-  [step = LTN12 pump step,]
-  [create = function]
-} -

- -

-Sends a message to a recipient list. Since sending messages is not as -simple as downloading an URL from a FTP or HTTP server, this function -doesn't have a simple interface. However, see the -message source factory for -a very powerful way to define the message contents. -

- - -

-The sender is given by the e-mail address in the from field. -Rcpt is a Lua table with one entry for each recipient e-mail -address, or a string -in case there is just one recipient. -The contents of the message are given by a simple -LTN12 -source. Several arguments are optional: -

-
    -
  • user, password: User and password for -authentication. The function will attempt LOGIN and PLAIN authentication -methods if supported by the server (both are unsafe); -
  • server: Server to connect to. Defaults to "localhost"; -
  • port: Port to connect to. Defaults to 25; -
  • domain: Domain name used to greet the server; Defaults to the -local machine host name; -
  • step: -LTN12 -pump step function used to pass data from the -source to the server. Defaults to the LTN12 pump.step function; -
  • create: An optional function to be used instead of -socket.tcp when the communications socket is created. -
- -

-If successful, the function returns 1. Otherwise, the function returns -nil followed by an error message. -

- -

-Note: SMTP servers can be very picky with the format of e-mail -addresses. To be safe, use only addresses of the form -"<fulano@example.com>" in the from and -rcpt arguments to the send function. In headers, e-mail -addresses can take whatever form you like.

- -

-Big note: There is a good deal of misconception with the use of the -destination address field headers, i.e., the 'To', 'Cc', -and, more importantly, the 'Bcc' headers. Do not add a -'Bcc' header to your messages because it will probably do the -exact opposite of what you expect. -

- -

-Only recipients specified in the rcpt list will receive a copy of the -message. Each recipient of an SMTP mail message receives a copy of the -message body along with the headers, and nothing more. The headers -are part of the message and should be produced by the -LTN12 -source function. The rcpt list is not -part of the message and will not be sent to anyone. -

- -

-RFC 2822 -has two important and short sections, "3.6.3. Destination address -fields" and "5. Security considerations", explaining the proper -use of these headers. Here is a summary of what it says: -

- -
    -
  • To: contains the address(es) of the primary recipient(s) -of the message; -
  • Cc: (where the "Cc" means "Carbon Copy" in the sense of -making a copy on a typewriter using carbon paper) contains the -addresses of others who are to receive the message, though the -content of the message may not be directed at them; -
  • Bcc: (where the "Bcc" means "Blind Carbon -Copy") contains addresses of recipients of the message whose addresses are not to be revealed to other recipients of the message. -
- -

-The LuaSocket send function does not care or interpret the -headers you send, but it gives you full control over what is sent and -to whom it is sent: -

-
    -
  • If someone is to receive the message, the e-mail address has -to be in the recipient list. This is the only parameter that controls who -gets a copy of the message; -
  • If there are multiple recipients, none of them will automatically -know that someone else got that message. That is, the default behavior is -similar to the Bcc field of popular e-mail clients; -
  • It is up to you to add the To header with the list of primary -recipients so that other recipients can see it; -
  • It is also up to you to add the Cc header with the -list of additional recipients so that everyone else sees it; -
  • Adding a header Bcc is nonsense, unless it is -empty. Otherwise, everyone receiving the message will see it and that is -exactly what you don't want to happen! -
- -

-I hope this clarifies the issue. Otherwise, please refer to -RFC 2821 -and -RFC 2822. -

- -
--- load the smtp support
-local smtp = require("socket.smtp")
-
--- Connects to server "localhost" and sends a message to users
--- "fulano@example.com",  "beltrano@example.com", 
--- and "sicrano@example.com".
--- Note that "fulano" is the primary recipient, "beltrano" receives a
--- carbon copy and neither of them knows that "sicrano" received a blind
--- carbon copy of the message.
-from = "<luasocket@example.com>"
-
-rcpt = {
-  "<fulano@example.com>",
-  "<beltrano@example.com>",
-  "<sicrano@example.com>"
-}
-
-mesgt = {
-  headers = {
-    to = "Fulano da Silva <fulano@example.com>",
-    cc = '"Beltrano F. Nunes" <beltrano@example.com>',
-    subject = "My first message"
-  },
-  body = "I hope this works. If it does, I can send you another 1000 copies."
-}
-
-r, e = smtp.send{
-  from = from,
-  rcpt = rcpt, 
-  source = smtp.message(mesgt)
-}
-
- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/socket.html b/build/premake/premake5/binmodules/luasocket/doc/socket.html deleted file mode 100644 index 35f8391c84..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/socket.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - -LuaSocket: The socket namespace - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

The socket namespace

- -

-The socket namespace contains the core functionality of LuaSocket. -

- -

-To obtain the socket namespace, run: -

- -
--- loads the socket module 
-local socket = require("socket")
-
- - - -

-socket.headers.canonic

- -

The socket.headers.canonic table -is used by the HTTP and SMTP modules to translate from -lowercase field names back into their canonic -capitalization. When a lowercase field name exists as a key -in this table, the associated value is substituted in -whenever the field name is sent out. -

- -

-You can obtain the headers namespace if case run-time -modifications are required by running: -

- -
--- loads the headers module 
-local headers = require("headers")
-
- - - - -

-socket.bind(address, port [, backlog]) -

- -

-This function is a shortcut that creates and returns a TCP server object -bound to a local address and port, ready to -accept client connections. Optionally, -user can also specify the backlog argument to the -listen method (defaults to 32). -

- -

-Note: The server object returned will have the option "reuseaddr" -set to true. -

- - - -

-socket.connect[46](address, port [, locaddr] [, locport] [, family]) -

- -

-This function is a shortcut that creates and returns a TCP client object -connected to a remote address at a given port. Optionally, -the user can also specify the local address and port to bind -(locaddr and locport), or restrict the socket family -to "inet" or "inet6". -Without specifying family to connect, whether a tcp or tcp6 -connection is created depends on your system configuration. Two variations -of connect are defined as simple helper functions that restrict the -family, socket.connect4 and socket.connect6. -

- - - -

-socket._DEBUG -

- -

-This constant is set to true if the library was compiled -with debug support. -

- - - -

-socket._DATAGRAMSIZE -

- -

-Default datagram size used by calls to -receive and -receivefrom. -(Unless changed in compile time, the value is 8192.) -

- - - -

-socket.gettime() -

- -

-Returns the UNIX time in seconds. You should subtract the values returned by this function -to get meaningful values. -

- -
-t = socket.gettime()
--- do stuff
-print(socket.gettime() - t .. " seconds elapsed")
-
- - - -

-socket.newtry(finalizer) -

- -

-Creates and returns a clean -try -function that allows for cleanup before the exception -is raised. -

- -

-Finalizer is a function that will be called before -try throws the exception. -

- -

-The function returns your customized try function. -

- -

-Note: This idea saved a lot of work with the -implementation of protocols in LuaSocket: -

- -
-foo = socket.protect(function()
-    -- connect somewhere
-    local c = socket.try(socket.connect("somewhere", 42))
-    -- create a try function that closes 'c' on error
-    local try = socket.newtry(function() c:close() end)
-    -- do everything reassured c will be closed 
-    try(c:send("hello there?\r\n"))
-    local answer = try(c:receive())
-    ...
-    try(c:send("good bye\r\n"))
-    c:close()
-end)
-
- - - - -

-socket.protect(func) -

- -

-Converts a function that throws exceptions into a safe function. This -function only catches exceptions thrown by the try -and newtry functions. It does not catch normal -Lua errors. -

- -

-Func is a function that calls -try (or assert, or error) -to throw exceptions. -

- -

-Returns an equivalent function that instead of throwing exceptions in case of -a failed try call, returns nil -followed by an error message. -

- - - -

-socket.select(recvt, sendt [, timeout]) -

- -

-Waits for a number of sockets to change status. -

- -

-Recvt is an array with the sockets to test for characters -available for reading. Sockets in the sendt array are watched to -see if it is OK to immediately write on them. Timeout is the -maximum amount of time (in seconds) to wait for a change in status. A -nil, negative or omitted timeout value allows the -function to block indefinitely. Recvt and sendt can also -be empty tables or nil. Non-socket values (or values with -non-numeric indices) in the arrays will be silently ignored. -

- -

The function returns a list with the sockets ready for -reading, a list with the sockets ready for writing and an error message. -The error message is "timeout" if a timeout -condition was met, "select failed" if the call -to select failed, and -nil otherwise. The returned tables are -doubly keyed both by integers and also by the sockets -themselves, to simplify the test if a specific socket has -changed status. -

- -

-Note: select can monitor a limited number -of sockets, as defined by the constant socket._SETSIZE. This -number may be as high as 1024 or as low as 64 by default, -depending on the system. It is usually possible to change this -at compile time. Invoking select with a larger -number of sockets will raise an error. -

- -

-Important note: a known bug in WinSock causes select to fail -on non-blocking TCP sockets. The function may return a socket as -writable even though the socket is not ready for sending. -

- -

-Another important note: calling select with a server socket in the receive parameter before a call to accept does not guarantee -accept will return immediately. -Use the settimeout -method or accept might block forever. -

- -

-Yet another note: If you close a socket and pass -it to select, it will be ignored. -

- -

-Using select with non-socket objects: Any object that implements getfd and dirty can be used with select, allowing objects from other libraries to be used within a socket.select driven loop. -

- - - -

-socket._SETSIZE -

- -

-The maximum number of sockets that the select function can handle. -

- - - - -

-socket.sink(mode, socket) -

- -

-Creates an -LTN12 -sink from a stream socket object. -

- -

-Mode defines the behavior of the sink. The following -options are available: -

-
    -
  • "http-chunked": sends data through socket after applying the -chunked transfer coding, closing the socket when done; -
  • "close-when-done": sends all received data through the -socket, closing the socket when done; -
  • "keep-open": sends all received data through the -socket, leaving it open when done. -
-

-Socket is the stream socket object used to send the data. -

- -

-The function returns a sink with the appropriate behavior. -

- - - -

-socket.skip(d [, ret1, ret2 ... retN]) -

- -

-Drops a number of arguments and returns the remaining. -

- -

-D is the number of arguments to drop. Ret1 to -retN are the arguments. -

- -

-The function returns retd+1 to retN. -

- -

-Note: This function is useful to avoid creation of dummy variables: -

- -
--- get the status code and separator from SMTP server reply 
-local code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)"))
-
- - - -

-socket.sleep(time) -

- -

-Freezes the program execution during a given amount of time. -

- -

-Time is the number of seconds to sleep for. If -time is negative, the function returns immediately. -

- - - -

-socket.source(mode, socket [, length]) -

- -

-Creates an -LTN12 -source from a stream socket object. -

- -

-Mode defines the behavior of the source. The following -options are available: -

-
    -
  • "http-chunked": receives data from socket and removes the -chunked transfer coding before returning the data; -
  • "by-length": receives a fixed number of bytes from the -socket. This mode requires the extra argument length; -
  • "until-closed": receives data from a socket until the other -side closes the connection. -
-

-Socket is the stream socket object used to receive the data. -

- -

-The function returns a source with the appropriate behavior. -

- - - -

-socket._SOCKETINVALID -

- -

-The OS value for an invalid socket. -

- - - -

-socket.try(ret1 [, ret2 ... retN]) -

- -

-Throws an exception in case ret1 is falsy, using -ret2 as the error message. The exception is supposed to be caught -by a protected function only. -

- -

-Ret1 to retN can be arbitrary -arguments, but are usually the return values of a function call -nested with try. -

- -

-The function returns ret1 to retN if -ret1 is not nil or false. -Otherwise, it calls error passing ret2 wrapped -in a table with metatable used by protect to -distinguish exceptions from runtime errors. -

- -
--- connects or throws an exception with the appropriate error message
-c = socket.try(socket.connect("localhost", 80))
-
- - - -

-socket._VERSION -

- -

-This constant has a string describing the current LuaSocket version. -

- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/tcp.html b/build/premake/premake5/binmodules/luasocket/doc/tcp.html deleted file mode 100644 index c6c6eb2695..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/tcp.html +++ /dev/null @@ -1,721 +0,0 @@ - - - - - - -LuaSocket: TCP/IP support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

TCP

- - - -

-server:accept() -

- -

-Waits for a remote connection on the server -object and returns a client object representing that connection. -

- -

-If a connection is successfully initiated, a client object is returned. -If a timeout condition is met, the method returns nil -followed by the error string 'timeout'. Other errors are -reported by nil followed by a message describing the error. -

- -

-Note: calling socket.select -with a server object in -the recvt parameter before a call to accept does -not guarantee accept will return immediately. Use the settimeout method or accept -might block until another client shows up. -

- - - -

-master:bind(address, port) -

- -

-Binds a master object to address and port on the -local host. - -

-Address can be an IP address or a host name. -Port must be an integer number in the range [0..64K). -If address -is '*', the system binds to all local interfaces -using the INADDR_ANY constant or -IN6ADDR_ANY_INIT, according to the family. -If port is 0, the system automatically -chooses an ephemeral port. -

- -

-In case of success, the method returns 1. In case of error, the -method returns nil followed by an error message. -

- -

-Note: The function socket.bind -is available and is a shortcut for the creation of server sockets. -

- - - -

-master:close()
-client:close()
-server:close() -

- -

-Closes a TCP object. The internal socket used by the object is closed -and the local address to which the object was -bound is made available to other applications. No further operations -(except for further calls to the close method) are allowed on -a closed socket. -

- -

-Note: It is important to close all used sockets once they are not -needed, since, in many systems, each socket uses a file descriptor, -which are limited system resources. Garbage-collected objects are -automatically closed before destruction, though. -

- - - -

-master:connect(address, port) -

- -

-Attempts to connect a master object to a remote host, transforming it into a -client object. -Client objects support methods -send, -receive, -getsockname, -getpeername, -settimeout, -and close. -

- -

-Address can be an IP address or a host name. -Port must be an integer number in the range [1..64K). -

- -

-In case of error, the method returns nil followed by a string -describing the error. In case of success, the method returns 1. -

- -

-Note: The function socket.connect -is available and is a shortcut for the creation of client sockets. -

- -

-Note: Starting with LuaSocket 2.0, -the settimeout -method affects the behavior of connect, causing it to return -with an error in case of a timeout. If that happens, you can still call socket.select with the socket in the -sendt table. The socket will be writable when the connection is -established. -

- -

-Note: Starting with LuaSocket 3.0, the host name resolution -depends on whether the socket was created by -socket.tcp, -socket.tcp4 or -socket.tcp6. Addresses from -the appropriate family (or both) are tried in the order -returned by the resolver until the -first success or until the last failure. If the timeout was -set to zero, only the first address is tried. -

- - - -

-master:dirty()
-client:dirty()
-server:dirty() -

- -

-Check the read buffer status. -

- -

-Returns true if there is any data in the read buffer, false otherwise. -

- -

-Note: This is an internal method, use at your own risk. -

- - - - -

-master:getfd()
-client:getfd()
-server:getfd() -

- -

-Returns the underling socket descriptor or handle associated to the object. -

- -

-The descriptor or handle. In case the object has been closed, the return will be -1. -

- -

-Note: This is an internal method. Unlikely to be -portable. Use at your own risk. -

- - - - -

-client:getoption(option)
-server:getoption(option) -

- -

-Gets options for the TCP object. -See setoption for description of the -option names and values. -

- -

-Option is a string with the option name. -

    - -
  • 'keepalive' -
  • 'linger' -
  • 'reuseaddr' -
  • 'tcp-nodelay' -
- -

-The method returns the option value in case of success, or -nil followed by an error message otherwise. -

- - - - -

-client:getpeername() -

- -

-Returns information about the remote side of a connected client object. -

- -

-Returns a string with the IP address of the peer, the -port number that peer is using for the connection, -and a string with the family ("inet" or "inet6"). -In case of error, the method returns nil. -

- -

-Note: It makes no sense to call this method on server objects. -

- - - -

-master:getsockname()
-client:getsockname()
-server:getsockname() -

- -

-Returns the local address information associated to the object. -

- -

-The method returns a string with local IP address, a number with -the local port, -and a string with the family ("inet" or "inet6"). -In case of error, the method returns nil. -

- - - -

-master:getstats()
-client:getstats()
-server:getstats()
-

- -

-Returns accounting information on the socket, useful for throttling -of bandwidth. -

- -

-The method returns the number of bytes received, the number of bytes sent, -and the age of the socket object in seconds. -

- - - -

-master:gettimeout()
-client:gettimeout()
-server:gettimeout() -

- -

-Returns the current block timeout followed by the curent -total timeout. -

- - - - -

-master:listen(backlog) -

- -

-Specifies the socket is willing to receive connections, transforming the -object into a server object. Server objects support the -accept, -getsockname, -setoption, -settimeout, -and close methods. -

- -

-The parameter backlog specifies the number of client -connections that can -be queued waiting for service. If the queue is full and another client -attempts connection, the connection is refused. -

- -

-In case of success, the method returns 1. In case of error, the -method returns nil followed by an error message. -

- - - -

-client:receive([pattern [, prefix]]) -

- -

-Reads data from a client object, according to the specified read -pattern. Patterns follow the Lua file I/O format, and the difference in performance between all patterns is negligible. -

- -

-Pattern can be any of the following: -

- -
    -
  • '*a': reads from the socket until the connection is -closed. No end-of-line translation is performed; -
  • '*l': reads a line of text from the socket. The line is -terminated by a LF character (ASCII 10), optionally preceded by a -CR character (ASCII 13). The CR and LF characters are not included in -the returned line. In fact, all CR characters are -ignored by the pattern. This is the default pattern; -
  • number: causes the method to read a specified number -of bytes from the socket. -
- -

-Prefix is an optional string to be concatenated to the beginning -of any received data before return. -

- -

-If successful, the method returns the received pattern. In case of error, -the method returns nil followed by an error -message, followed by a (possibly empty) string containing -the partial that was received. The error message can be -the string 'closed' in case the connection was -closed before the transmission was completed or the string -'timeout' in case there was a timeout during the operation. -

- -

-Important note: This function was changed severely. It used -to support multiple patterns (but I have never seen this feature used) and -now it doesn't anymore. Partial results used to be returned in the same -way as successful results. This last feature violated the idea that all -functions should return nil on error. Thus it was changed -too. -

- - - -

-client:send(data [, i [, j]]) -

- -

-Sends data through client object. -

- -

-Data is the string to be sent. The optional arguments -i and j work exactly like the standard -string.sub Lua function to allow the selection of a -substring to be sent. -

- -

-If successful, the method returns the index of the last byte -within [i, j] that has been sent. Notice that, if -i is 1 or absent, this is effectively the total -number of bytes sent. In case of error, the method returns -nil, followed by an error message, followed -by the index of the last byte within [i, j] that -has been sent. You might want to try again from the byte -following that. The error message can be 'closed' -in case the connection was closed before the transmission -was completed or the string 'timeout' in case -there was a timeout during the operation. -

- -

-Note: Output is not buffered. For small strings, -it is always better to concatenate them in Lua -(with the '..' operator) and send the result in one call -instead of calling the method several times. -

- - - -

-client:setoption(option [, value])
-server:setoption(option [, value]) -

- -

-Sets options for the TCP object. Options are only needed by low-level or -time-critical applications. You should only modify an option if you -are sure you need it. -

- -

-Option is a string with the option name, and value -depends on the option being set: - -

    - -
  • 'keepalive': Setting this option to true enables -the periodic transmission of messages on a connected socket. Should the -connected party fail to respond to these messages, the connection is -considered broken and processes using the socket are notified; - -
  • 'linger': Controls the action taken when unsent data are -queued on a socket and a close is performed. The value is a table with a -boolean entry 'on' and a numeric entry for the time interval -'timeout' in seconds. If the 'on' field is set to -true, the system will block the process on the close attempt until -it is able to transmit the data or until 'timeout' has passed. If -'on' is false and a close is issued, the system will -process the close in a manner that allows the process to continue as -quickly as possible. I do not advise you to set this to anything other than -zero; - -
  • 'reuseaddr': Setting this option indicates that the rules -used in validating addresses supplied in a call to -bind should allow reuse of local addresses; - -
  • 'tcp-nodelay': Setting this option to true -disables the Nagle's algorithm for the connection; - -
  • 'ipv6-v6only': -Setting this option to true restricts an inet6 socket to -sending and receiving only IPv6 packets. -
- -

-The method returns 1 in case of success, or nil -followed by an error message otherwise. -

- -

-Note: The descriptions above come from the man pages. -

- - - -

-master:setstats(received, sent, age)
-client:setstats(received, sent, age)
-server:setstats(received, sent, age)
-

- -

-Resets accounting information on the socket, useful for throttling -of bandwidth. -

- -

-Received is a number with the new number of bytes received. -Sent is a number with the new number of bytes sent. -Age is the new age in seconds. -

- -

-The method returns 1 in case of success and nil otherwise. -

- - - -

-master:settimeout(value [, mode])
-client:settimeout(value [, mode])
-server:settimeout(value [, mode]) -

- -

-Changes the timeout values for the object. By default, -all I/O operations are blocking. That is, any call to the methods -send, -receive, and -accept -will block indefinitely, until the operation completes. The -settimeout method defines a limit on the amount of time the -I/O methods can block. When a timeout is set and the specified amount of -time has elapsed, the affected methods give up and fail with an error code. -

- -

-The amount of time to wait is specified as the -value parameter, in seconds. There are two timeout modes and -both can be used together for fine tuning: -

- -
    -
  • 'b': block timeout. Specifies the upper limit on -the amount of time LuaSocket can be blocked by the operating system -while waiting for completion of any single I/O operation. This is the -default mode;
  • - -
  • 't': total timeout. Specifies the upper limit on -the amount of time LuaSocket can block a Lua script before returning from -a call.
  • -
- -

-The nil timeout value allows operations to block -indefinitely. Negative timeout values have the same effect. -

- -

-Note: although timeout values have millisecond precision in LuaSocket, -large blocks can cause I/O functions not to respect timeout values due -to the time the library takes to transfer blocks to and from the OS -and to and from the Lua interpreter. Also, function that accept host names -and perform automatic name resolution might be blocked by the resolver for -longer than the specified timeout value. -

- -

-Note: The old timeout method is deprecated. The name has been -changed for sake of uniformity, since all other method names already -contained verbs making their imperative nature obvious. -

- - - -

-client:shutdown(mode)
-

- -

-Shuts down part of a full-duplex connection. -

- -

-Mode tells which way of the connection should be shut down and can -take the value: -

    -
  • "both": disallow further sends and receives on the object. -This is the default mode; -
  • "send": disallow further sends on the object; -
  • "receive": disallow further receives on the object. -
- -

-This function returns 1. -

- - - -

-master:setfd(fd)
-client:setfd(fd)
-server:setfd(fd) -

- -

-Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made. -

- -

-No return value. -

- -

-Note: This is an internal method. Unlikely to be -portable. Use at your own risk. -

- - - -

-socket.tcp() -

- -

-Creates and returns an TCP master object. A master object can -be transformed into a server object with the method -listen (after a call to bind) or into a client object with -the method connect. The only other -method supported by a master object is the -close method.

- -

-In case of success, a new master object is returned. In case of error, -nil is returned, followed by an error message. -

- -

-Note: The choice between IPv4 and IPv6 happens during a call to -bind or connect, depending on the address -family obtained from the resolver. -

- -

-Note: Before the choice between IPv4 and IPv6 happens, -the internal socket object is invalid and therefore setoption will fail. -

- - - -

-socket.tcp4() -

- -

-Creates and returns an IPv4 TCP master object. A master object can -be transformed into a server object with the method -listen (after a call to bind) or into a client object with -the method connect. The only other -method supported by a master object is the -close method.

- -

-In case of success, a new master object is returned. In case of error, -nil is returned, followed by an error message. -

- - - -

-socket.tcp6() -

- -

-Creates and returns an IPv6 TCP master object. A master object can -be transformed into a server object with the method -listen (after a call to bind) or into a client object with -the method connect. The only other -method supported by a master object is the -close method.

- -

-In case of success, a new master object is returned. In case of error, -nil is returned, followed by an error message. -

- -

-Note: The TCP object returned will have the option -"ipv6-v6only" set to true. -

- - - - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/udp.html b/build/premake/premake5/binmodules/luasocket/doc/udp.html deleted file mode 100644 index 4618aadb97..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/udp.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - - - -LuaSocket: UDP support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - - -

UDP

- - - -

-connected:close()
-unconnected:close() -

- -

-Closes a UDP object. The internal socket -used by the object is closed and the local address to which the -object was bound is made available to other applications. No -further operations (except for further calls to the close -method) are allowed on a closed socket. -

- -

-Note: It is important to close all used sockets -once they are not needed, since, in many systems, each socket uses -a file descriptor, which are limited system resources. -Garbage-collected objects are automatically closed before -destruction, though. -

- - - -

-connected:getoption()
-unconnected:getoption() -

- -

-Gets an option value from the UDP object. -See setoption for -description of the option names and values. -

- -

Option is a string with the option name. -

    -
  • 'dontroute' -
  • 'broadcast' -
  • 'reuseaddr' -
  • 'reuseport' -
  • 'ip-multicast-loop' -
  • 'ipv6-v6only' -
  • 'ip-multicast-if' -
  • 'ip-multicast-ttl' -
  • 'ip-add-membership' -
  • 'ip-drop-membership' -
-

- -

-The method returns the option value in case of -success, or -nil followed by an error message otherwise. -

- - - -

-connected:getpeername() -

- -

-Retrieves information about the peer -associated with a connected UDP object. -

- - -

-Returns a string with the IP address of the peer, the -port number that peer is using for the connection, -and a string with the family ("inet" or "inet6"). -In case of error, the method returns nil. -

- -

-Note: It makes no sense to call this method on unconnected objects. -

- - - -

-connected:getsockname()
-unconnected:getsockname() -

- -

-Returns the local address information associated to the object. -

- - -

-The method returns a string with local IP address, a number with -the local port, -and a string with the family ("inet" or "inet6"). -In case of error, the method returns nil. -

- -

-Note: UDP sockets are not bound to any address -until the setsockname or the -sendto method is called for the -first time (in which case it is bound to an ephemeral port and the -wild-card address). -

- - - -

-connected:settimeout(value)
-unconnected:settimeout(value) -

- -

-Returns the current timeout value. -

- - - - -

-connected:receive([size])
-unconnected:receive([size]) -

- -

-Receives a datagram from the UDP object. If -the UDP object is connected, only datagrams coming from the peer -are accepted. Otherwise, the returned datagram can come from any -host. -

- -

-The optional size parameter -specifies the maximum size of the datagram to be retrieved. If -there are more than size bytes available in the datagram, -the excess bytes are discarded. If there are less then -size bytes available in the current datagram, the -available bytes are returned. -If size is omitted, the -compile-time constant socket._DATAGRAMSIZE is used -(it defaults to 8192 bytes). Larger sizes will cause a -temporary buffer to be allocated for the operation. -

- -

-In case of success, the method returns the -received datagram. In case of timeout, the method returns -nil followed by the string 'timeout'. -

- - - -

-unconnected:receivefrom([size]) -

- -

-Works exactly as the receive -method, except it returns the IP -address and port as extra return values (and is therefore slightly less -efficient). -

- - - -

-connected:send(datagram) -

- -

-Sends a datagram to the UDP peer of a connected object. -

- -

-Datagram is a string with the datagram contents. -The maximum datagram size for UDP is 64K minus IP layer overhead. -However datagrams larger than the link layer packet size will be -fragmented, which may deteriorate performance and/or reliability. -

- -

-If successful, the method returns 1. In case of -error, the method returns nil followed by an error message. -

- -

-Note: In UDP, the send method never blocks -and the only way it can fail is if the underlying transport layer -refuses to send a message to the specified address (i.e. no -interface accepts the address). -

- - - -

-unconnected:sendto(datagram, ip, port) -

- -

-Sends a datagram to the specified IP address and port number. -

- -

-Datagram is a string with the -datagram contents. -The maximum datagram size for UDP is 64K minus IP layer overhead. -However datagrams larger than the link layer packet size will be -fragmented, which may deteriorate performance and/or reliability. -Ip is the IP address of the recipient. -Host names are not allowed for performance reasons. - -Port is the port number at the recipient. -

- -

-If successful, the method returns 1. In case of -error, the method returns nil followed by an error message. -

- -

-Note: In UDP, the send method never blocks -and the only way it can fail is if the underlying transport layer -refuses to send a message to the specified address (i.e. no -interface accepts the address). -

- - - -

-connected:setoption(option [, value])
-unconnected:setoption(option [, value]) -

- -

-Sets options for the UDP object. Options are -only needed by low-level or time-critical applications. You should -only modify an option if you are sure you need it.

-

Option is a string with the option -name, and value depends on the option being set: -

- -
    -
  • 'dontroute': Indicates that outgoing -messages should bypass the standard routing facilities. -Receives a boolean value; -
  • 'broadcast': Requests permission to send -broadcast datagrams on the socket. -Receives a boolean value; -
  • 'reuseaddr': Indicates that the rules used in -validating addresses supplied in a bind() call -should allow reuse of local addresses. -Receives a boolean value; -
  • 'reuseport': Allows completely duplicate -bindings by multiple processes if they all set -'reuseport' before binding the port. -Receives a boolean value; -
  • 'ip-multicast-loop': -Specifies whether or not a copy of an outgoing multicast -datagram is delivered to the sending host as long as it is a -member of the multicast group. -Receives a boolean value; -
  • 'ipv6-v6only': -Specifies whether to restrict inet6 sockets to -sending and receiving only IPv6 packets. -Receive a boolean value; -
  • 'ip-multicast-if': -Sets the interface over which outgoing multicast datagrams -are sent. -Receives an IP address; -
  • 'ip-multicast-ttl': -Sets the Time To Live in the IP header for outgoing -multicast datagrams. -Receives a number; -
  • 'ip-add-membership': -Joins the multicast group specified. -Receives a table with fields -multiaddr and interface, each containing an -IP address; -
  • 'ip-drop-membership': Leaves the multicast -group specified. -Receives a table with fields -multiaddr and interface, each containing an -IP address. -
- -

-The method returns 1 in case of success, or -nil followed by an error message otherwise. -

- -

-Note: The descriptions above come from the man pages. -

- - - - -

-connected:setpeername('*')
-unconnected:setpeername(address, port) -

- -

-Changes the peer of a UDP object. This -method turns an unconnected UDP object into a connected UDP -object or vice versa. -

- -

-For connected objects, outgoing datagrams -will be sent to the specified peer, and datagrams received from -other peers will be discarded by the OS. Connected UDP objects must -use the send and -receive methods instead of -sendto and -receivefrom. -

- -

-Address can be an IP address or a -host name. Port is the port number. If address is -'*' and the object is connected, the peer association is -removed and the object becomes an unconnected object again. In that -case, the port argument is ignored. -

- -

-In case of error the method returns -nil followed by an error message. In case of success, the -method returns 1. -

- -

-Note: Since the address of the peer does not have -to be passed to and from the OS, the use of connected UDP objects -is recommended when the same peer is used for several transmissions -and can result in up to 30% performance gains. -

- -

-Note: Starting with LuaSocket 3.0, the host name resolution -depends on whether the socket was created by socket.udp or socket.udp6. Addresses from -the appropriate family are tried in succession until the -first success or until the last failure. -

- - - -

-unconnected:setsockname(address, port) -

- -

-Binds the UDP object to a local address. -

- -

-Address can be an IP address or a -host name. If address is '*' the system binds to -all local interfaces using the constant INADDR_ANY. If -port is 0, the system chooses an ephemeral port. -

- -

-If successful, the method returns 1. In case of -error, the method returns nil followed by an error -message. -

- -

-Note: This method can only be called before any -datagram is sent through the UDP object, and only once. Otherwise, -the system automatically binds the object to all local interfaces -and chooses an ephemeral port as soon as the first datagram is -sent. After the local address is set, either automatically by the -system or explicitly by setsockname, it cannot be -changed. -

- - - -

-connected:settimeout(value)
-unconnected:settimeout(value) -

- -

-Changes the timeout values for the object. By default, the -receive and -receivefrom -operations are blocking. That is, any call to the methods will block -indefinitely, until data arrives. The settimeout function defines -a limit on the amount of time the functions can block. When a timeout is -set and the specified amount of time has elapsed, the affected methods -give up and fail with an error code. -

- -

-The amount of time to wait is specified as -the value parameter, in seconds. The nil timeout -value allows operations to block indefinitely. Negative -timeout values have the same effect. -

- -

-Note: In UDP, the send -and sendto methods never block (the -datagram is just passed to the OS and the call returns -immediately). Therefore, the settimeout method has no -effect on them. -

- -

-Note: The old timeout method is -deprecated. The name has been changed for sake of uniformity, since -all other method names already contained verbs making their -imperative nature obvious. -

- - - -

-socket.udp() -

- -

-Creates and returns an unconnected UDP object. -Unconnected objects support the -sendto, -receive, -receivefrom, -getoption, -getsockname, -setoption, -settimeout, -setpeername, -setsockname, and -close. -The setpeername -is used to connect the object. -

- -

-In case of success, a new unconnected UDP object -returned. In case of error, nil is returned, followed by -an error message. -

- -

-Note: The choice between IPv4 and IPv6 happens during a call to -sendto, setpeername, or sockname, depending on the address -family obtained from the resolver. -

- -

-Note: Before the choice between IPv4 and IPv6 happens, -the internal socket object is invalid and therefore setoption will fail. -

- - - -

-socket.udp4() -

- -

-Creates and returns an unconnected IPv4 UDP object. -Unconnected objects support the -sendto, -receive, -receivefrom, -getoption, -getsockname, -setoption, -settimeout, -setpeername, -setsockname, and -close. -The setpeername -is used to connect the object. -

- -

-In case of success, a new unconnected UDP object -returned. In case of error, nil is returned, followed by -an error message. -

- - - -

-socket.udp6() -

- -

-Creates and returns an unconnected IPv6 UDP object. -Unconnected objects support the -sendto, -receive, -receivefrom, -getoption, -getsockname, -setoption, -settimeout, -setpeername, -setsockname, and -close. -The setpeername -is used to connect the object. -

- -

-In case of success, a new unconnected UDP object -returned. In case of error, nil is returned, followed by -an error message. -

- -

-Note: The TCP object returned will have the option -"ipv6-v6only" set to true. -

- - - - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/doc/url.html b/build/premake/premake5/binmodules/luasocket/doc/url.html deleted file mode 100644 index 6ff673da56..0000000000 --- a/build/premake/premake5/binmodules/luasocket/doc/url.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - -LuaSocket: URL support - - - - - - - -
-
-
- - - -
-LuaSocket -
Network support for the Lua language -
-

-home · -download · -installation · -introduction · -reference -

-
-
-
- - - -

URL

- -

-The url namespace provides functions to parse, protect, -and build URLs, as well as functions to compose absolute URLs -from base and relative URLs, according to -RFC 2396. -

- -

-To obtain the url namespace, run: -

- -
--- loads the URL module 
-local url = require("socket.url")
-
- -

-An URL is defined by the following grammar: -

- -
- -<url> ::= [<scheme>:][//<authority>][/<path>][;<params>][?<query>][#<fragment>]
-<authority> ::= [<userinfo>@]<host>[:<port>]
-<userinfo> ::= <user>[:<password>]
-<path> ::= {<segment>/}<segment>
-
-
- - - -

-url.absolute(base, relative) -

- -

-Builds an absolute URL from a base URL and a relative URL. -

- -

-Base is a string with the base URL or -a parsed URL table. Relative is a -string with the relative URL. -

- -

-The function returns a string with the absolute URL. -

- -

-Note: The rules that -govern the composition are fairly complex, and are described in detail in -RFC 2396. -The example bellow should give an idea of what the rules are. -

- -
-http://a/b/c/d;p?q
-
-+
-
-g:h      =  g:h
-g        =  http://a/b/c/g
-./g      =  http://a/b/c/g
-g/       =  http://a/b/c/g/
-/g       =  http://a/g
-//g      =  http://g
-?y       =  http://a/b/c/?y
-g?y      =  http://a/b/c/g?y
-#s       =  http://a/b/c/d;p?q#s
-g#s      =  http://a/b/c/g#s
-g?y#s    =  http://a/b/c/g?y#s
-;x       =  http://a/b/c/;x
-g;x      =  http://a/b/c/g;x
-g;x?y#s  =  http://a/b/c/g;x?y#s
-.        =  http://a/b/c/
-./       =  http://a/b/c/
-..       =  http://a/b/
-../      =  http://a/b/
-../g     =  http://a/b/g
-../..    =  http://a/
-../../   =  http://a/
-../../g  =  http://a/g
-
- - - -

-url.build(parsed_url) -

- -

-Rebuilds an URL from its parts. -

- -

-Parsed_url is a table with same components returned by -parse. -Lower level components, if specified, -take precedence over high level components of the URL grammar. -

- -

-The function returns a string with the built URL. -

- - - -

-url.build_path(segments, unsafe) -

- -

-Builds a <path> component from a list of -<segment> parts. -Before composition, any reserved characters found in a segment are escaped into -their protected form, so that the resulting path is a valid URL path -component. -

- -

-Segments is a list of strings with the <segment> -parts. If unsafe is anything but nil, reserved -characters are left untouched. -

- -

-The function returns a string with the -built <path> component. -

- - - -

-url.escape(content) -

- -

-Applies the URL escaping content coding to a string -Each byte is encoded as a percent character followed -by the two byte hexadecimal representation of its integer -value. -

- -

-Content is the string to be encoded. -

- -

-The function returns the encoded string. -

- -
--- load url module
-url = require("socket.url")
-
-code = url.escape("/#?;")
--- code = "%2f%23%3f%3b"
-
- - - -

-url.parse(url, default) -

- -

-Parses an URL given as a string into a Lua table with its components. -

- -

-Url is the URL to be parsed. If the default table is -present, it is used to store the parsed fields. Only fields present in the -URL are overwritten. Therefore, this table can be used to pass default -values for each field. -

- -

-The function returns a table with all the URL components: -

- -
-parsed_url = {
-  url = string,
-  scheme = string,
-  authority = string,
-  path = string,
-  params = string,
-  query = string,
-  fragment = string,
-  userinfo = string,
-  host = string,
-  port = string,
-  user = string,
-  password = string
-} -
- -
--- load url module
-url = require("socket.url")
-
-parsed_url = url.parse("http://www.example.com/cgilua/index.lua?a=2#there")
--- parsed_url = {
---   scheme = "http",
---   authority = "www.example.com",
---   path = "/cgilua/index.lua"
---   query = "a=2",
---   fragment = "there",
---   host = "www.puc-rio.br",
--- }
-
-parsed_url = url.parse("ftp://root:passwd@unsafe.org/pub/virus.exe;type=i")
--- parsed_url = {
---   scheme = "ftp",
---   authority = "root:passwd@unsafe.org",
---   path = "/pub/virus.exe",
---   params = "type=i",
---   userinfo = "root:passwd",
---   host = "unsafe.org",
---   user = "root",
---   password = "passwd",
--- }
-
- - - -

-url.parse_path(path) -

- -

-Breaks a <path> URL component into all its -<segment> parts. -

- -

-Path is a string with the path to be parsed. -

- -

-Since some characters are reserved in URLs, they must be escaped -whenever present in a <path> component. Therefore, before -returning a list with all the parsed segments, the function removes -escaping from all of them. -

- - - -

-url.unescape(content) -

- -

-Removes the URL escaping content coding from a string. -

- -

-Content is the string to be decoded. -

- -

-The function returns the decoded string. -

- - - - - - - diff --git a/build/premake/premake5/binmodules/luasocket/etc/README b/build/premake/premake5/binmodules/luasocket/etc/README deleted file mode 100644 index cfd3e372fa..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/README +++ /dev/null @@ -1,89 +0,0 @@ -This directory contains code that is more useful than the -samples. This code *is* supported. - - tftp.lua -- Trivial FTP client - -This module implements file retrieval by the TFTP protocol. -Its main use was to test the UDP code, but since someone -found it usefull, I turned it into a module that is almost -official (no uploads, yet). - - dict.lua -- Dict client - -The dict.lua module started with a cool simple client -for the DICT protocol, written by Luiz Henrique Figueiredo. -This new version has been converted into a library, similar -to the HTTP and FTP libraries, that can be used from within -any luasocket application. Take a look on the source code -and you will be able to figure out how to use it. - - lp.lua -- LPD client library - -The lp.lua module implements the client part of the Line -Printer Daemon protocol, used to print files on Unix -machines. It is courtesy of David Burgess! See the source -code and the lpr.lua in the examples directory. - - b64.lua - qp.lua - eol.lua - -These are tiny programs that perform Base64, -Quoted-Printable and end-of-line marker conversions. - - get.lua -- file retriever - -This little program is a client that uses the FTP and -HTTP code to implement a command line file graber. Just -run - - lua get.lua [] - -to download a remote file (either ftp:// or http://) to -the specified local file. The program also prints the -download throughput, elapsed time, bytes already downloaded -etc during download. - - check-memory.lua -- checks memory consumption - -This is just to see how much memory each module uses. - - dispatch.lua -- coroutine based dispatcher - -This is a first try at a coroutine based non-blocking -dispatcher for LuaSocket. Take a look at 'check-links.lua' -and at 'forward.lua' to see how to use it. - - check-links.lua -- HTML link checker program - -This little program scans a HTML file and checks for broken -links. It is similar to check-links.pl by Jamie Zawinski, -but uses all facilities of the LuaSocket library and the Lua -language. It has not been thoroughly tested, but it should -work. Just run - - lua check-links.lua [-n] {} > output - -and open the result to see a list of broken links. Make sure -you check the '-n' switch. It runs in non-blocking mode, -using coroutines, and is MUCH faster! - - forward.lua -- coroutine based forward server - -This is a forward server that can accept several connections -and transfers simultaneously using non-blocking I/O and the -coroutine-based dispatcher. You can run, for example - - lua forward.lua 8080:proxy.com:3128 - -to redirect all local conections to port 8080 to the host -'proxy.com' at port 3128. - - unix.c and unix.h - -This is an implementation of Unix local domain sockets and -demonstrates how to extend LuaSocket with a new type of -transport. It has been tested on Linux and on Mac OS X. - -Good luck, -Diego. diff --git a/build/premake/premake5/binmodules/luasocket/etc/b64.lua b/build/premake/premake5/binmodules/luasocket/etc/b64.lua deleted file mode 100644 index 11eeb2d2d7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/b64.lua +++ /dev/null @@ -1,19 +0,0 @@ ------------------------------------------------------------------------------ --- Little program to convert to and from Base64 --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local ltn12 = require("ltn12") -local mime = require("mime") -local source = ltn12.source.file(io.stdin) -local sink = ltn12.sink.file(io.stdout) -local convert -if arg and arg[1] == '-d' then - convert = mime.decode("base64") -else - local base64 = mime.encode("base64") - local wrap = mime.wrap() - convert = ltn12.filter.chain(base64, wrap) -end -sink = ltn12.sink.chain(convert, sink) -ltn12.pump.all(source, sink) diff --git a/build/premake/premake5/binmodules/luasocket/etc/check-links.lua b/build/premake/premake5/binmodules/luasocket/etc/check-links.lua deleted file mode 100644 index 283f3ac2f6..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/check-links.lua +++ /dev/null @@ -1,111 +0,0 @@ ------------------------------------------------------------------------------ --- Little program that checks links in HTML files, using coroutines and --- non-blocking I/O via the dispatcher module. --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local url = require("socket.url") -local dispatch = require("dispatch") -local http = require("socket.http") -dispatch.TIMEOUT = 10 - --- make sure the user knows how to invoke us -arg = arg or {} -if #arg < 1 then - print("Usage:\n luasocket check-links.lua [-n] {}") - exit() -end - --- '-n' means we are running in non-blocking mode -if arg[1] == "-n" then - -- if non-blocking I/O was requested, use real dispatcher interface - table.remove(arg, 1) - handler = dispatch.newhandler("coroutine") -else - -- if using blocking I/O, use fake dispatcher interface - handler = dispatch.newhandler("sequential") -end - -local nthreads = 0 - --- get the status of a URL using the dispatcher -function getstatus(link) - local parsed = url.parse(link, {scheme = "file"}) - if parsed.scheme == "http" then - nthreads = nthreads + 1 - handler:start(function() - local r, c, h, s = http.request{ - method = "HEAD", - url = link, - create = handler.tcp - } - if r and c == 200 then io.write('\t', link, '\n') - else io.write('\t', link, ': ', tostring(c), '\n') end - nthreads = nthreads - 1 - end) - end -end - -function readfile(path) - path = url.unescape(path) - local file, error = io.open(path, "r") - if file then - local body = file:read("*a") - file:close() - return body - else return nil, error end -end - -function load(u) - local parsed = url.parse(u, { scheme = "file" }) - local body, headers, code, error - local base = u - if parsed.scheme == "http" then - body, code, headers = http.request(u) - if code == 200 then - -- if there was a redirect, update base to reflect it - base = headers.location or base - end - if not body then - error = code - end - elseif parsed.scheme == "file" then - body, error = readfile(parsed.path) - else error = string.format("unhandled scheme '%s'", parsed.scheme) end - return base, body, error -end - -function getlinks(body, base) - -- get rid of comments - body = string.gsub(body, "%<%!%-%-.-%-%-%>", "") - local links = {} - -- extract links - body = string.gsub(body, '[Hh][Rr][Ee][Ff]%s*=%s*"([^"]*)"', function(href) - table.insert(links, url.absolute(base, href)) - end) - body = string.gsub(body, "[Hh][Rr][Ee][Ff]%s*=%s*'([^']*)'", function(href) - table.insert(links, url.absolute(base, href)) - end) - string.gsub(body, "[Hh][Rr][Ee][Ff]%s*=%s*(.-)>", function(href) - table.insert(links, url.absolute(base, href)) - end) - return links -end - -function checklinks(address) - local base, body, error = load(address) - if not body then print(error) return end - print("Checking ", base) - local links = getlinks(body, base) - for _, link in ipairs(links) do - getstatus(link) - end -end - -for _, address in ipairs(arg) do - checklinks(url.absolute("file:", address)) -end - -while nthreads > 0 do - handler:step() -end diff --git a/build/premake/premake5/binmodules/luasocket/etc/check-memory.lua b/build/premake/premake5/binmodules/luasocket/etc/check-memory.lua deleted file mode 100644 index 7bd984d8ee..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/check-memory.lua +++ /dev/null @@ -1,17 +0,0 @@ -function load(s) - collectgarbage() - local a = gcinfo() - _G[s] = require(s) - collectgarbage() - local b = gcinfo() - print(s .. ":\t " .. (b-a) .. "k") -end - -load("socket.url") -load("ltn12") -load("socket") -load("mime") -load("socket.tp") -load("socket.smtp") -load("socket.http") -load("socket.ftp") diff --git a/build/premake/premake5/binmodules/luasocket/etc/cookie.lua b/build/premake/premake5/binmodules/luasocket/etc/cookie.lua deleted file mode 100644 index 4adb40317c..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/cookie.lua +++ /dev/null @@ -1,88 +0,0 @@ -local socket = require"socket" -local http = require"socket.http" -local url = require"socket.url" -local ltn12 = require"ltn12" - -local token_class = '[^%c%s%(%)%<%>%@%,%;%:%\\%"%/%[%]%?%=%{%}]' - -local function unquote(t, quoted) - local n = string.match(t, "%$(%d+)$") - if n then n = tonumber(n) end - if quoted[n] then return quoted[n] - else return t end -end - -local function parse_set_cookie(c, quoted, cookie_table) - c = c .. ";$last=last;" - local _, __, n, v, i = string.find(c, "(" .. token_class .. - "+)%s*=%s*(.-)%s*;%s*()") - local cookie = { - name = n, - value = unquote(v, quoted), - attributes = {} - } - while 1 do - _, __, n, v, i = string.find(c, "(" .. token_class .. - "+)%s*=?%s*(.-)%s*;%s*()", i) - if not n or n == "$last" then break end - cookie.attributes[#cookie.attributes+1] = { - name = n, - value = unquote(v, quoted) - } - end - cookie_table[#cookie_table+1] = cookie -end - -local function split_set_cookie(s, cookie_table) - cookie_table = cookie_table or {} - -- remove quoted strings from cookie list - local quoted = {} - s = string.gsub(s, '"(.-)"', function(q) - quoted[#quoted+1] = q - return "$" .. #quoted - end) - -- add sentinel - s = s .. ",$last=" - -- split into individual cookies - i = 1 - while 1 do - local _, __, cookie, next_token - _, __, cookie, i, next_token = string.find(s, "(.-)%s*%,%s*()(" .. - token_class .. "+)%s*=", i) - if not next_token then break end - parse_set_cookie(cookie, quoted, cookie_table) - if next_token == "$last" then break end - end - return cookie_table -end - -local function quote(s) - if string.find(s, "[ %,%;]") then return '"' .. s .. '"' - else return s end -end - -local _empty = {} -local function build_cookies(cookies) - s = "" - for i,v in ipairs(cookies or _empty) do - if v.name then - s = s .. v.name - if v.value and v.value ~= "" then - s = s .. '=' .. quote(v.value) - end - end - if v.name and #(v.attributes or _empty) > 0 then s = s .. "; " end - for j,u in ipairs(v.attributes or _empty) do - if u.name then - s = s .. u.name - if u.value and u.value ~= "" then - s = s .. '=' .. quote(u.value) - end - end - if j < #v.attributes then s = s .. "; " end - end - if i < #cookies then s = s .. ", " end - end - return s -end - diff --git a/build/premake/premake5/binmodules/luasocket/etc/dict.lua b/build/premake/premake5/binmodules/luasocket/etc/dict.lua deleted file mode 100644 index 8c5b711c13..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/dict.lua +++ /dev/null @@ -1,151 +0,0 @@ ------------------------------------------------------------------------------ --- Little program to download DICT word definitions --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Load required modules ------------------------------------------------------------------------------ -local base = _G -local string = require("string") -local table = require("table") -local socket = require("socket") -local url = require("socket.url") -local tp = require("socket.tp") -module("socket.dict") - ------------------------------------------------------------------------------ --- Globals ------------------------------------------------------------------------------ -HOST = "dict.org" -PORT = 2628 -TIMEOUT = 10 - ------------------------------------------------------------------------------ --- Low-level dict API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function open(host, port) - local tp = socket.try(tp.connect(host or HOST, port or PORT, TIMEOUT)) - return base.setmetatable({tp = tp}, metat) -end - -function metat.__index:greet() - return socket.try(self.tp:check(220)) -end - -function metat.__index:check(ok) - local code, status = socket.try(self.tp:check(ok)) - return code, - base.tonumber(socket.skip(2, string.find(status, "^%d%d%d (%d*)"))) -end - -function metat.__index:getdef() - local line = socket.try(self.tp:receive()) - local def = {} - while line ~= "." do - table.insert(def, line) - line = socket.try(self.tp:receive()) - end - return table.concat(def, "\n") -end - -function metat.__index:define(database, word) - database = database or "!" - socket.try(self.tp:command("DEFINE", database .. " " .. word)) - local code, count = self:check(150) - local defs = {} - for i = 1, count do - self:check(151) - table.insert(defs, self:getdef()) - end - self:check(250) - return defs -end - -function metat.__index:match(database, strat, word) - database = database or "!" - strat = strat or "." - socket.try(self.tp:command("MATCH", database .." ".. strat .." ".. word)) - self:check(152) - local mat = {} - local line = socket.try(self.tp:receive()) - while line ~= '.' do - database, word = socket.skip(2, string.find(line, "(%S+) (.*)")) - if not mat[database] then mat[database] = {} end - table.insert(mat[database], word) - line = socket.try(self.tp:receive()) - end - self:check(250) - return mat -end - -function metat.__index:quit() - self.tp:command("QUIT") - return self:check(221) -end - -function metat.__index:close() - return self.tp:close() -end - ------------------------------------------------------------------------------ --- High-level dict API ------------------------------------------------------------------------------ -local default = { - scheme = "dict", - host = "dict.org" -} - -local function there(f) - if f == "" then return nil - else return f end -end - -local function parse(u) - local t = socket.try(url.parse(u, default)) - socket.try(t.scheme == "dict", "invalid scheme '" .. t.scheme .. "'") - socket.try(t.path, "invalid path in url") - local cmd, arg = socket.skip(2, string.find(t.path, "^/(.)(.*)$")) - socket.try(cmd == "d" or cmd == "m", " should be 'm' or 'd'") - socket.try(arg and arg ~= "", "need at least in URL") - t.command, t.argument = cmd, arg - arg = string.gsub(arg, "^:([^:]+)", function(f) t.word = f end) - socket.try(t.word, "need at least in URL") - arg = string.gsub(arg, "^:([^:]*)", function(f) t.database = there(f) end) - if cmd == "m" then - arg = string.gsub(arg, "^:([^:]*)", function(f) t.strat = there(f) end) - end - string.gsub(arg, ":([^:]*)$", function(f) t.n = base.tonumber(f) end) - return t -end - -local function tget(gett) - local con = open(gett.host, gett.port) - con:greet() - if gett.command == "d" then - local def = con:define(gett.database, gett.word) - con:quit() - con:close() - if gett.n then return def[gett.n] - else return def end - elseif gett.command == "m" then - local mat = con:match(gett.database, gett.strat, gett.word) - con:quit() - con:close() - return mat - else return nil, "invalid command" end -end - -local function sget(u) - local gett = parse(u) - return tget(gett) -end - -get = socket.protect(function(gett) - if base.type(gett) == "string" then return sget(gett) - else return tget(gett) end -end) - diff --git a/build/premake/premake5/binmodules/luasocket/etc/dispatch.lua b/build/premake/premake5/binmodules/luasocket/etc/dispatch.lua deleted file mode 100644 index 2485415540..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/dispatch.lua +++ /dev/null @@ -1,307 +0,0 @@ ------------------------------------------------------------------------------ --- A hacked dispatcher module --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local base = _G -local table = require("table") -local string = require("string") -local socket = require("socket") -local coroutine = require("coroutine") -module("dispatch") - --- if too much time goes by without any activity in one of our sockets, we --- just kill it -TIMEOUT = 60 - ------------------------------------------------------------------------------ --- We implement 3 types of dispatchers: --- sequential --- coroutine --- threaded --- The user can choose whatever one is needed ------------------------------------------------------------------------------ -local handlert = {} - --- default handler is coroutine -function newhandler(mode) - mode = mode or "coroutine" - return handlert[mode]() -end - -local function seqstart(self, func) - return func() -end - --- sequential handler simply calls the functions and doesn't wrap I/O -function handlert.sequential() - return { - tcp = socket.tcp, - start = seqstart - } -end - ------------------------------------------------------------------------------ --- Mega hack. Don't try to do this at home. ------------------------------------------------------------------------------ --- we can't yield across calls to protect on Lua 5.1, so we rewrite it with --- coroutines --- make sure you don't require any module that uses socket.protect before --- loading our hack -if string.sub(base._VERSION, -3) == "5.1" then - local function _protect(co, status, ...) - if not status then - local msg = ... - if base.type(msg) == 'table' then - return nil, msg[1] - else - base.error(msg, 0) - end - end - if coroutine.status(co) == "suspended" then - return _protect(co, coroutine.resume(co, coroutine.yield(...))) - else - return ... - end - end - - function socket.protect(f) - return function(...) - local co = coroutine.create(f) - return _protect(co, coroutine.resume(co, ...)) - end - end -end - ------------------------------------------------------------------------------ --- Simple set data structure. O(1) everything. ------------------------------------------------------------------------------ -local function newset() - local reverse = {} - local set = {} - return base.setmetatable(set, {__index = { - insert = function(set, value) - if not reverse[value] then - table.insert(set, value) - reverse[value] = #set - end - end, - remove = function(set, value) - local index = reverse[value] - if index then - reverse[value] = nil - local top = table.remove(set) - if top ~= value then - reverse[top] = index - set[index] = top - end - end - end - }}) -end - ------------------------------------------------------------------------------ --- socket.tcp() wrapper for the coroutine dispatcher ------------------------------------------------------------------------------ -local function cowrap(dispatcher, tcp, error) - if not tcp then return nil, error end - -- put it in non-blocking mode right away - tcp:settimeout(0) - -- metatable for wrap produces new methods on demand for those that we - -- don't override explicitly. - local metat = { __index = function(table, key) - table[key] = function(...) - return tcp[key](tcp,select(2,...)) - end - return table[key] - end} - -- does our user want to do his own non-blocking I/O? - local zero = false - -- create a wrap object that will behave just like a real socket object - local wrap = { } - -- we ignore settimeout to preserve our 0 timeout, but record whether - -- the user wants to do his own non-blocking I/O - function wrap:settimeout(value, mode) - if value == 0 then zero = true - else zero = false end - return 1 - end - -- send in non-blocking mode and yield on timeout - function wrap:send(data, first, last) - first = (first or 1) - 1 - local result, error - while true do - -- return control to dispatcher and tell it we want to send - -- if upon return the dispatcher tells us we timed out, - -- return an error to whoever called us - if coroutine.yield(dispatcher.sending, tcp) == "timeout" then - return nil, "timeout" - end - -- try sending - result, error, first = tcp:send(data, first+1, last) - -- if we are done, or there was an unexpected error, - -- break away from loop - if error ~= "timeout" then return result, error, first end - end - end - -- receive in non-blocking mode and yield on timeout - -- or simply return partial read, if user requested timeout = 0 - function wrap:receive(pattern, partial) - local error = "timeout" - local value - while true do - -- return control to dispatcher and tell it we want to receive - -- if upon return the dispatcher tells us we timed out, - -- return an error to whoever called us - if coroutine.yield(dispatcher.receiving, tcp) == "timeout" then - return nil, "timeout" - end - -- try receiving - value, error, partial = tcp:receive(pattern, partial) - -- if we are done, or there was an unexpected error, - -- break away from loop. also, if the user requested - -- zero timeout, return all we got - if (error ~= "timeout") or zero then - return value, error, partial - end - end - end - -- connect in non-blocking mode and yield on timeout - function wrap:connect(host, port) - local result, error = tcp:connect(host, port) - if error == "timeout" then - -- return control to dispatcher. we will be writable when - -- connection succeeds. - -- if upon return the dispatcher tells us we have a - -- timeout, just abort - if coroutine.yield(dispatcher.sending, tcp) == "timeout" then - return nil, "timeout" - end - -- when we come back, check if connection was successful - result, error = tcp:connect(host, port) - if result or error == "already connected" then return 1 - else return nil, "non-blocking connect failed" end - else return result, error end - end - -- accept in non-blocking mode and yield on timeout - function wrap:accept() - while 1 do - -- return control to dispatcher. we will be readable when a - -- connection arrives. - -- if upon return the dispatcher tells us we have a - -- timeout, just abort - if coroutine.yield(dispatcher.receiving, tcp) == "timeout" then - return nil, "timeout" - end - local client, error = tcp:accept() - if error ~= "timeout" then - return cowrap(dispatcher, client, error) - end - end - end - -- remove cortn from context - function wrap:close() - dispatcher.stamp[tcp] = nil - dispatcher.sending.set:remove(tcp) - dispatcher.sending.cortn[tcp] = nil - dispatcher.receiving.set:remove(tcp) - dispatcher.receiving.cortn[tcp] = nil - return tcp:close() - end - return base.setmetatable(wrap, metat) -end - - ------------------------------------------------------------------------------ --- Our coroutine dispatcher ------------------------------------------------------------------------------ -local cometat = { __index = {} } - -function schedule(cortn, status, operation, tcp) - if status then - if cortn and operation then - operation.set:insert(tcp) - operation.cortn[tcp] = cortn - operation.stamp[tcp] = socket.gettime() - end - else base.error(operation) end -end - -function kick(operation, tcp) - operation.cortn[tcp] = nil - operation.set:remove(tcp) -end - -function wakeup(operation, tcp) - local cortn = operation.cortn[tcp] - -- if cortn is still valid, wake it up - if cortn then - kick(operation, tcp) - return cortn, coroutine.resume(cortn) - -- othrewise, just get scheduler not to do anything - else - return nil, true - end -end - -function abort(operation, tcp) - local cortn = operation.cortn[tcp] - if cortn then - kick(operation, tcp) - coroutine.resume(cortn, "timeout") - end -end - --- step through all active cortns -function cometat.__index:step() - -- check which sockets are interesting and act on them - local readable, writable = socket.select(self.receiving.set, - self.sending.set, 1) - -- for all readable connections, resume their cortns and reschedule - -- when they yield back to us - for _, tcp in base.ipairs(readable) do - schedule(wakeup(self.receiving, tcp)) - end - -- for all writable connections, do the same - for _, tcp in base.ipairs(writable) do - schedule(wakeup(self.sending, tcp)) - end - -- politely ask replacement I/O functions in idle cortns to - -- return reporting a timeout - local now = socket.gettime() - for tcp, stamp in base.pairs(self.stamp) do - if tcp.class == "tcp{client}" and now - stamp > TIMEOUT then - abort(self.sending, tcp) - abort(self.receiving, tcp) - end - end -end - -function cometat.__index:start(func) - local cortn = coroutine.create(func) - schedule(cortn, coroutine.resume(cortn)) -end - -function handlert.coroutine() - local stamp = {} - local dispatcher = { - stamp = stamp, - sending = { - name = "sending", - set = newset(), - cortn = {}, - stamp = stamp - }, - receiving = { - name = "receiving", - set = newset(), - cortn = {}, - stamp = stamp - }, - } - function dispatcher.tcp() - return cowrap(dispatcher, socket.tcp()) - end - return base.setmetatable(dispatcher, cometat) -end - diff --git a/build/premake/premake5/binmodules/luasocket/etc/eol.lua b/build/premake/premake5/binmodules/luasocket/etc/eol.lua deleted file mode 100644 index eeaf0ce032..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/eol.lua +++ /dev/null @@ -1,13 +0,0 @@ ------------------------------------------------------------------------------ --- Little program to adjust end of line markers. --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local mime = require("mime") -local ltn12 = require("ltn12") -local marker = '\n' -if arg and arg[1] == '-d' then marker = '\r\n' end -local filter = mime.normalize(marker) -local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter) -local sink = ltn12.sink.file(io.stdout) -ltn12.pump.all(source, sink) diff --git a/build/premake/premake5/binmodules/luasocket/etc/forward.lua b/build/premake/premake5/binmodules/luasocket/etc/forward.lua deleted file mode 100644 index 05ced1aede..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/forward.lua +++ /dev/null @@ -1,65 +0,0 @@ --- load our favourite library -local dispatch = require("dispatch") -local handler = dispatch.newhandler() - --- make sure the user knows how to invoke us -if #arg < 1 then - print("Usage") - print(" lua forward.lua ...") - os.exit(1) -end - --- function to move data from one socket to the other -local function move(foo, bar) - local live - while 1 do - local data, error, partial = foo:receive(2048) - live = data or error == "timeout" - data = data or partial - local result, error = bar:send(data) - if not live or not result then - foo:close() - bar:close() - break - end - end -end - --- for each tunnel, start a new server -for i, v in ipairs(arg) do - -- capture forwarding parameters - local _, _, iport, ohost, oport = string.find(v, "([^:]+):([^:]+):([^:]+)") - assert(iport, "invalid arguments") - -- create our server socket - local server = assert(handler.tcp()) - assert(server:setoption("reuseaddr", true)) - assert(server:bind("*", iport)) - assert(server:listen(32)) - -- handler for the server object loops accepting new connections - handler:start(function() - while 1 do - local client = assert(server:accept()) - assert(client:settimeout(0)) - -- for each new connection, start a new client handler - handler:start(function() - -- handler tries to connect to peer - local peer = assert(handler.tcp()) - assert(peer:settimeout(0)) - assert(peer:connect(ohost, oport)) - -- if sucessful, starts a new handler to send data from - -- client to peer - handler:start(function() - move(client, peer) - end) - -- afte starting new handler, enter in loop sending data from - -- peer to client - move(peer, client) - end) - end - end) -end - --- simply loop stepping the server -while 1 do - handler:step() -end diff --git a/build/premake/premake5/binmodules/luasocket/etc/get.lua b/build/premake/premake5/binmodules/luasocket/etc/get.lua deleted file mode 100644 index 9edc235702..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/get.lua +++ /dev/null @@ -1,141 +0,0 @@ ------------------------------------------------------------------------------ --- Little program to download files from URLs --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -local http = require("socket.http") -local ftp = require("socket.ftp") -local url = require("socket.url") -local ltn12 = require("ltn12") - --- formats a number of seconds into human readable form -function nicetime(s) - local l = "s" - if s > 60 then - s = s / 60 - l = "m" - if s > 60 then - s = s / 60 - l = "h" - if s > 24 then - s = s / 24 - l = "d" -- hmmm - end - end - end - if l == "s" then return string.format("%5.0f%s", s, l) - else return string.format("%5.2f%s", s, l) end -end - --- formats a number of bytes into human readable form -function nicesize(b) - local l = "B" - if b > 1024 then - b = b / 1024 - l = "KB" - if b > 1024 then - b = b / 1024 - l = "MB" - if b > 1024 then - b = b / 1024 - l = "GB" -- hmmm - end - end - end - return string.format("%7.2f%2s", b, l) -end - --- returns a string with the current state of the download -local remaining_s = "%s received, %s/s throughput, %2.0f%% done, %s remaining" -local elapsed_s = "%s received, %s/s throughput, %s elapsed " -function gauge(got, delta, size) - local rate = got / delta - if size and size >= 1 then - return string.format(remaining_s, nicesize(got), nicesize(rate), - 100*got/size, nicetime((size-got)/rate)) - else - return string.format(elapsed_s, nicesize(got), - nicesize(rate), nicetime(delta)) - end -end - --- creates a new instance of a receive_cb that saves to disk --- kind of copied from luasocket's manual callback examples -function stats(size) - local start = socket.gettime() - local last = start - local got = 0 - return function(chunk) - -- elapsed time since start - local current = socket.gettime() - if chunk then - -- total bytes received - got = got + string.len(chunk) - -- not enough time for estimate - if current - last > 1 then - io.stderr:write("\r", gauge(got, current - start, size)) - io.stderr:flush() - last = current - end - else - -- close up - io.stderr:write("\r", gauge(got, current - start), "\n") - end - return chunk - end -end - --- determines the size of a http file -function gethttpsize(u) - local r, c, h = http.request {method = "HEAD", url = u} - if c == 200 then - return tonumber(h["content-length"]) - end -end - --- downloads a file using the http protocol -function getbyhttp(u, file) - local save = ltn12.sink.file(file or io.stdout) - -- only print feedback if output is not stdout - if file then save = ltn12.sink.chain(stats(gethttpsize(u)), save) end - local r, c, h, s = http.request {url = u, sink = save } - if c ~= 200 then io.stderr:write(s or c, "\n") end -end - --- downloads a file using the ftp protocol -function getbyftp(u, file) - local save = ltn12.sink.file(file or io.stdout) - -- only print feedback if output is not stdout - -- and we don't know how big the file is - if file then save = ltn12.sink.chain(stats(), save) end - local gett = url.parse(u) - gett.sink = save - gett.type = "i" - local ret, err = ftp.get(gett) - if err then print(err) end -end - --- determines the scheme -function getscheme(u) - -- this is an heuristic to solve a common invalid url poblem - if not string.find(u, "//") then u = "//" .. u end - local parsed = url.parse(u, {scheme = "http"}) - return parsed.scheme -end - --- gets a file either by http or ftp, saving as -function get(u, name) - local fout = name and io.open(name, "wb") - local scheme = getscheme(u) - if scheme == "ftp" then getbyftp(u, fout) - elseif scheme == "http" then getbyhttp(u, fout) - else print("unknown scheme" .. scheme) end -end - --- main program -arg = arg or {} -if #arg < 1 then - io.write("Usage:\n lua get.lua []\n") - os.exit(1) -else get(arg[1], arg[2]) end diff --git a/build/premake/premake5/binmodules/luasocket/etc/links b/build/premake/premake5/binmodules/luasocket/etc/links deleted file mode 100644 index 087f1c0e4a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/links +++ /dev/null @@ -1,17 +0,0 @@ - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla - bla diff --git a/build/premake/premake5/binmodules/luasocket/etc/lp.lua b/build/premake/premake5/binmodules/luasocket/etc/lp.lua deleted file mode 100644 index 25f0b95e15..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/lp.lua +++ /dev/null @@ -1,323 +0,0 @@ ------------------------------------------------------------------------------ --- LPD support for the Lua language --- LuaSocket toolkit. --- Author: David Burgess --- Modified by Diego Nehab, but David is in charge ------------------------------------------------------------------------------ ---[[ - if you have any questions: RFC 1179 -]] --- make sure LuaSocket is loaded -local io = require("io") -local base = _G -local os = require("os") -local math = require("math") -local string = require("string") -local socket = require("socket") -local ltn12 = require("ltn12") -module("socket.lp") - --- default port -PORT = 515 -SERVER = os.getenv("SERVER_NAME") or os.getenv("COMPUTERNAME") or "localhost" -PRINTER = os.getenv("PRINTER") or "printer" - -local function connect(localhost, option) - local host = option.host or SERVER - local port = option.port or PORT - local skt - local try = socket.newtry(function() if skt then skt:close() end end) - if option.localbind then - -- bind to a local port (if we can) - local localport = 721 - local done, err - repeat - skt = socket.try(socket.tcp()) - try(skt:settimeout(30)) - done, err = skt:bind(localhost, localport) - if not done then - localport = localport + 1 - skt:close() - skt = nil - else break end - until localport > 731 - socket.try(skt, err) - else skt = socket.try(socket.tcp()) end - try(skt:connect(host, port)) - return { skt = skt, try = try } -end - ---[[ -RFC 1179 -5.3 03 - Send queue state (short) - - +----+-------+----+------+----+ - | 03 | Queue | SP | List | LF | - +----+-------+----+------+----+ - Command code - 3 - Operand 1 - Printer queue name - Other operands - User names or job numbers - - If the user names or job numbers or both are supplied then only those - jobs for those users or with those numbers will be sent. - - The response is an ASCII stream which describes the printer queue. - The stream continues until the connection closes. Ends of lines are - indicated with ASCII LF control characters. The lines may also - contain ASCII HT control characters. - -5.4 04 - Send queue state (long) - - +----+-------+----+------+----+ - | 04 | Queue | SP | List | LF | - +----+-------+----+------+----+ - Command code - 4 - Operand 1 - Printer queue name - Other operands - User names or job numbers - - If the user names or job numbers or both are supplied then only those - jobs for those users or with those numbers will be sent. - - The response is an ASCII stream which describes the printer queue. - The stream continues until the connection closes. Ends of lines are - indicated with ASCII LF control characters. The lines may also - contain ASCII HT control characters. -]] - --- gets server acknowledement -local function recv_ack(con) - local ack = con.skt:receive(1) - con.try(string.char(0) == ack, "failed to receive server acknowledgement") -end - --- sends client acknowledement -local function send_ack(con) - local sent = con.skt:send(string.char(0)) - con.try(sent == 1, "failed to send acknowledgement") -end - --- sends queue request --- 5.2 02 - Receive a printer job --- --- +----+-------+----+ --- | 02 | Queue | LF | --- +----+-------+----+ --- Command code - 2 --- Operand - Printer queue name --- --- Receiving a job is controlled by a second level of commands. The --- daemon is given commands by sending them over the same connection. --- The commands are described in the next section (6). --- --- After this command is sent, the client must read an acknowledgement --- octet from the daemon. A positive acknowledgement is an octet of --- zero bits. A negative acknowledgement is an octet of any other --- pattern. -local function send_queue(con, queue) - queue = queue or PRINTER - local str = string.format("\2%s\10", queue) - local sent = con.skt:send(str) - con.try(sent == string.len(str), "failed to send print request") - recv_ack(con) -end - --- sends control file --- 6.2 02 - Receive control file --- --- +----+-------+----+------+----+ --- | 02 | Count | SP | Name | LF | --- +----+-------+----+------+----+ --- Command code - 2 --- Operand 1 - Number of bytes in control file --- Operand 2 - Name of control file --- --- The control file must be an ASCII stream with the ends of lines --- indicated by ASCII LF. The total number of bytes in the stream is --- sent as the first operand. The name of the control file is sent as --- the second. It should start with ASCII "cfA", followed by a three --- digit job number, followed by the host name which has constructed the --- control file. Acknowledgement processing must occur as usual after --- the command is sent. --- --- The next "Operand 1" octets over the same TCP connection are the --- intended contents of the control file. Once all of the contents have --- been delivered, an octet of zero bits is sent as an indication that --- the file being sent is complete. A second level of acknowledgement --- processing must occur at this point. - --- sends data file --- 6.3 03 - Receive data file --- --- +----+-------+----+------+----+ --- | 03 | Count | SP | Name | LF | --- +----+-------+----+------+----+ --- Command code - 3 --- Operand 1 - Number of bytes in data file --- Operand 2 - Name of data file --- --- The data file may contain any 8 bit values at all. The total number --- of bytes in the stream may be sent as the first operand, otherwise --- the field should be cleared to 0. The name of the data file should --- start with ASCII "dfA". This should be followed by a three digit job --- number. The job number should be followed by the host name which has --- constructed the data file. Interpretation of the contents of the --- data file is determined by the contents of the corresponding control --- file. If a data file length has been specified, the next "Operand 1" --- octets over the same TCP connection are the intended contents of the --- data file. In this case, once all of the contents have been --- delivered, an octet of zero bits is sent as an indication that the --- file being sent is complete. A second level of acknowledgement --- processing must occur at this point. - - -local function send_hdr(con, control) - local sent = con.skt:send(control) - con.try(sent and sent >= 1 , "failed to send header file") - recv_ack(con) -end - -local function send_control(con, control) - local sent = con.skt:send(control) - con.try(sent and sent >= 1, "failed to send control file") - send_ack(con) -end - -local function send_data(con,fh,size) - local buf - while size > 0 do - buf,message = fh:read(8192) - if buf then - st = con.try(con.skt:send(buf)) - size = size - st - else - con.try(size == 0, "file size mismatch") - end - end - recv_ack(con) -- note the double acknowledgement - send_ack(con) - recv_ack(con) - return size -end - - ---[[ -local control_dflt = { - "H"..string.sub(socket.hostname,1,31).."\10", -- host - "C"..string.sub(socket.hostname,1,31).."\10", -- class - "J"..string.sub(filename,1,99).."\10", -- jobname - "L"..string.sub(user,1,31).."\10", -- print banner page - "I"..tonumber(indent).."\10", -- indent column count ('f' only) - "M"..string.sub(mail,1,128).."\10", -- mail when printed user@host - "N"..string.sub(filename,1,131).."\10", -- name of source file - "P"..string.sub(user,1,31).."\10", -- user name - "T"..string.sub(title,1,79).."\10", -- title for banner ('p' only) - "W"..tonumber(width or 132).."\10", -- width of print f,l,p only - - "f"..file.."\10", -- formatted print (remove control chars) - "l"..file.."\10", -- print - "o"..file.."\10", -- postscript - "p"..file.."\10", -- pr format - requires T, L - "r"..file.."\10", -- fortran format - "U"..file.."\10", -- Unlink (data file only) -} -]] - --- generate a varying job number -local seq = 0 -local function newjob(connection) - seq = seq + 1 - return math.floor(socket.gettime() * 1000 + seq)%1000 -end - - -local format_codes = { - binary = 'l', - text = 'f', - ps = 'o', - pr = 'p', - fortran = 'r', - l = 'l', - r = 'r', - o = 'o', - p = 'p', - f = 'f' -} - --- lp.send{option} --- requires option.file - -send = socket.protect(function(option) - socket.try(option and base.type(option) == "table", "invalid options") - local file = option.file - socket.try(file, "invalid file name") - local fh = socket.try(io.open(file,"rb")) - local datafile_size = fh:seek("end") -- get total size - fh:seek("set") -- go back to start of file - local localhost = socket.dns.gethostname() or os.getenv("COMPUTERNAME") - or "localhost" - local con = connect(localhost, option) --- format the control file - local jobno = newjob() - local localip = socket.dns.toip(localhost) - localhost = string.sub(localhost,1,31) - local user = string.sub(option.user or os.getenv("LPRUSER") or - os.getenv("USERNAME") or os.getenv("USER") or "anonymous", 1,31) - local lpfile = string.format("dfA%3.3d%-s", jobno, localhost); - local fmt = format_codes[option.format] or 'l' - local class = string.sub(option.class or localip or localhost,1,31) - local _,_,ctlfn = string.find(file,".*[%/%\\](.*)") - ctlfn = string.sub(ctlfn or file,1,131) - local cfile = - string.format("H%-s\nC%-s\nJ%-s\nP%-s\n%.1s%-s\nU%-s\nN%-s\n", - localhost, - class, - option.job or "LuaSocket", - user, - fmt, lpfile, - lpfile, - ctlfn); -- mandatory part of ctl file - if (option.banner) then cfile = cfile .. 'L'..user..'\10' end - if (option.indent) then cfile = cfile .. 'I'..base.tonumber(option.indent)..'\10' end - if (option.mail) then cfile = cfile .. 'M'..string.sub((option.mail),1,128)..'\10' end - if (fmt == 'p' and option.title) then cfile = cfile .. 'T'..string.sub((option.title),1,79)..'\10' end - if ((fmt == 'p' or fmt == 'l' or fmt == 'f') and option.width) then - cfile = cfile .. 'W'..base.tonumber(option,width)..'\10' - end - - con.skt:settimeout(option.timeout or 65) --- send the queue header - send_queue(con, option.queue) --- send the control file header - local cfilecmd = string.format("\2%d cfA%3.3d%-s\n",string.len(cfile), jobno, localhost); - send_hdr(con,cfilecmd) - --- send the control file - send_control(con,cfile) - --- send the data file header - local dfilecmd = string.format("\3%d dfA%3.3d%-s\n",datafile_size, jobno, localhost); - send_hdr(con,dfilecmd) - --- send the data file - send_data(con,fh,datafile_size) - fh:close() - con.skt:close(); - return jobno, datafile_size -end) - --- --- lp.query({host=,queue=printer|'*', format='l'|'s', list=}) --- -query = socket.protect(function(p) - p = p or {} - local localhost = socket.dns.gethostname() or os.getenv("COMPUTERNAME") - or "localhost" - local con = connect(localhost,p) - local fmt - if string.sub(p.format or 's',1,1) == 's' then fmt = 3 else fmt = 4 end - con.try(con.skt:send(string.format("%c%s %s\n", fmt, p.queue or "*", - p.list or ""))) - local data = con.try(con.skt:receive("*a")) - con.skt:close() - return data -end) diff --git a/build/premake/premake5/binmodules/luasocket/etc/qp.lua b/build/premake/premake5/binmodules/luasocket/etc/qp.lua deleted file mode 100644 index 523238b18f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/qp.lua +++ /dev/null @@ -1,23 +0,0 @@ ------------------------------------------------------------------------------ --- Little program to convert to and from Quoted-Printable --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local ltn12 = require("ltn12") -local mime = require("mime") -local convert -arg = arg or {} -local mode = arg and arg[1] or "-et" -if mode == "-et" then - local normalize = mime.normalize() - local qp = mime.encode("quoted-printable") - local wrap = mime.wrap("quoted-printable") - convert = ltn12.filter.chain(normalize, qp, wrap) -elseif mode == "-eb" then - local qp = mime.encode("quoted-printable", "binary") - local wrap = mime.wrap("quoted-printable") - convert = ltn12.filter.chain(qp, wrap) -else convert = mime.decode("quoted-printable") end -local source = ltn12.source.chain(ltn12.source.file(io.stdin), convert) -local sink = ltn12.sink.file(io.stdout) -ltn12.pump.all(source, sink) diff --git a/build/premake/premake5/binmodules/luasocket/etc/tftp.lua b/build/premake/premake5/binmodules/luasocket/etc/tftp.lua deleted file mode 100644 index ed99cd164b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/etc/tftp.lua +++ /dev/null @@ -1,154 +0,0 @@ ------------------------------------------------------------------------------ --- TFTP support for the Lua language --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Load required files ------------------------------------------------------------------------------ -local base = _G -local table = require("table") -local math = require("math") -local string = require("string") -local socket = require("socket") -local ltn12 = require("ltn12") -local url = require("socket.url") -module("socket.tftp") - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ -local char = string.char -local byte = string.byte - -PORT = 69 -local OP_RRQ = 1 -local OP_WRQ = 2 -local OP_DATA = 3 -local OP_ACK = 4 -local OP_ERROR = 5 -local OP_INV = {"RRQ", "WRQ", "DATA", "ACK", "ERROR"} - ------------------------------------------------------------------------------ --- Packet creation functions ------------------------------------------------------------------------------ -local function RRQ(source, mode) - return char(0, OP_RRQ) .. source .. char(0) .. mode .. char(0) -end - -local function WRQ(source, mode) - return char(0, OP_RRQ) .. source .. char(0) .. mode .. char(0) -end - -local function ACK(block) - local low, high - low = math.mod(block, 256) - high = (block - low)/256 - return char(0, OP_ACK, high, low) -end - -local function get_OP(dgram) - local op = byte(dgram, 1)*256 + byte(dgram, 2) - return op -end - ------------------------------------------------------------------------------ --- Packet analysis functions ------------------------------------------------------------------------------ -local function split_DATA(dgram) - local block = byte(dgram, 3)*256 + byte(dgram, 4) - local data = string.sub(dgram, 5) - return block, data -end - -local function get_ERROR(dgram) - local code = byte(dgram, 3)*256 + byte(dgram, 4) - local msg - _,_, msg = string.find(dgram, "(.*)\000", 5) - return string.format("error code %d: %s", code, msg) -end - ------------------------------------------------------------------------------ --- The real work ------------------------------------------------------------------------------ -local function tget(gett) - local retries, dgram, sent, datahost, dataport, code - local last = 0 - socket.try(gett.host, "missing host") - local con = socket.try(socket.udp()) - local try = socket.newtry(function() con:close() end) - -- convert from name to ip if needed - gett.host = try(socket.dns.toip(gett.host)) - con:settimeout(1) - -- first packet gives data host/port to be used for data transfers - local path = string.gsub(gett.path or "", "^/", "") - path = url.unescape(path) - retries = 0 - repeat - sent = try(con:sendto(RRQ(path, "octet"), gett.host, gett.port)) - dgram, datahost, dataport = con:receivefrom() - retries = retries + 1 - until dgram or datahost ~= "timeout" or retries > 5 - try(dgram, datahost) - -- associate socket with data host/port - try(con:setpeername(datahost, dataport)) - -- default sink - local sink = gett.sink or ltn12.sink.null() - -- process all data packets - while 1 do - -- decode packet - code = get_OP(dgram) - try(code ~= OP_ERROR, get_ERROR(dgram)) - try(code == OP_DATA, "unhandled opcode " .. code) - -- get data packet parts - local block, data = split_DATA(dgram) - -- if not repeated, write - if block == last+1 then - try(sink(data)) - last = block - end - -- last packet brings less than 512 bytes of data - if string.len(data) < 512 then - try(con:send(ACK(block))) - try(con:close()) - try(sink(nil)) - return 1 - end - -- get the next packet - retries = 0 - repeat - sent = try(con:send(ACK(last))) - dgram, err = con:receive() - retries = retries + 1 - until dgram or err ~= "timeout" or retries > 5 - try(dgram, err) - end -end - -local default = { - port = PORT, - path ="/", - scheme = "tftp" -} - -local function parse(u) - local t = socket.try(url.parse(u, default)) - socket.try(t.scheme == "tftp", "invalid scheme '" .. t.scheme .. "'") - socket.try(t.host, "invalid host") - return t -end - -local function sget(u) - local gett = parse(u) - local t = {} - gett.sink = ltn12.sink.table(t) - tget(gett) - return table.concat(t) -end - -get = socket.protect(function(gett) - if base.type(gett) == "string" then return sget(gett) - else return tget(gett) end -end) - diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex1.lua b/build/premake/premake5/binmodules/luasocket/gem/ex1.lua deleted file mode 100644 index 327a54216d..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex1.lua +++ /dev/null @@ -1,4 +0,0 @@ -local CRLF = "\013\010" -local input = source.chain(source.file(io.stdin), normalize(CRLF)) -local output = sink.file(io.stdout) -pump.all(input, output) diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex10.lua b/build/premake/premake5/binmodules/luasocket/gem/ex10.lua deleted file mode 100644 index 2b1b98f2f0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex10.lua +++ /dev/null @@ -1,17 +0,0 @@ -function pump.step(src, snk) - local chunk, src_err = src() - local ret, snk_err = snk(chunk, src_err) - if chunk and ret then return 1 - else return nil, src_err or snk_err end -end - -function pump.all(src, snk, step) - step = step or pump.step - while true do - local ret, err = step(src, snk) - if not ret then - if err then return nil, err - else return 1 end - end - end -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex11.lua b/build/premake/premake5/binmodules/luasocket/gem/ex11.lua deleted file mode 100644 index 1cbf01fd14..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex11.lua +++ /dev/null @@ -1,7 +0,0 @@ -local input = source.chain( - source.file(io.open("input.bin", "rb")), - encode("base64")) -local output = sink.chain( - wrap(76), - sink.file(io.open("output.b64", "w"))) -pump.all(input, output) diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex12.lua b/build/premake/premake5/binmodules/luasocket/gem/ex12.lua deleted file mode 100644 index de17d76f22..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex12.lua +++ /dev/null @@ -1,34 +0,0 @@ -local smtp = require"socket.smtp" -local mime = require"mime" -local ltn12 = require"ltn12" - -CRLF = "\013\010" - -local message = smtp.message{ - headers = { - from = "Sicrano ", - to = "Fulano ", - subject = "A message with an attachment"}, - body = { - preamble = "Hope you can see the attachment" .. CRLF, - [1] = { - body = "Here is our logo" .. CRLF}, - [2] = { - headers = { - ["content-type"] = 'image/png; name="luasocket.png"', - ["content-disposition"] = - 'attachment; filename="luasocket.png"', - ["content-description"] = 'LuaSocket logo', - ["content-transfer-encoding"] = "BASE64"}, - body = ltn12.source.chain( - ltn12.source.file(io.open("luasocket.png", "rb")), - ltn12.filter.chain( - mime.encode("base64"), - mime.wrap()))}}} - -assert(smtp.send{ - rcpt = "", - from = "", - server = "localhost", - port = 2525, - source = message}) diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex2.lua b/build/premake/premake5/binmodules/luasocket/gem/ex2.lua deleted file mode 100644 index 94bde661da..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex2.lua +++ /dev/null @@ -1,11 +0,0 @@ -function filter.cycle(lowlevel, context, extra) - return function(chunk) - local ret - ret, context = lowlevel(context, chunk, extra) - return ret - end -end - -function normalize(marker) - return filter.cycle(eol, 0, marker) -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex3.lua b/build/premake/premake5/binmodules/luasocket/gem/ex3.lua deleted file mode 100644 index a43fefa9de..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex3.lua +++ /dev/null @@ -1,15 +0,0 @@ -local function chainpair(f1, f2) - return function(chunk) - local ret = f2(f1(chunk)) - if chunk then return ret - else return (ret or "") .. (f2() or "") end - end -end - -function filter.chain(...) - local f = select(1, ...) - for i = 2, select('#', ...) do - f = chainpair(f, select(i, ...)) - end - return f -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex4.lua b/build/premake/premake5/binmodules/luasocket/gem/ex4.lua deleted file mode 100644 index c670e0e405..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex4.lua +++ /dev/null @@ -1,5 +0,0 @@ -local qp = filter.chain(normalize(CRLF), encode("quoted-printable"), - wrap("quoted-printable")) -local input = source.chain(source.file(io.stdin), qp) -local output = sink.file(io.stdout) -pump.all(input, output) diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex5.lua b/build/premake/premake5/binmodules/luasocket/gem/ex5.lua deleted file mode 100644 index 196b30a1f0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex5.lua +++ /dev/null @@ -1,15 +0,0 @@ -function source.empty(err) - return function() - return nil, err - end -end - -function source.file(handle, io_err) - if handle then - return function() - local chunk = handle:read(20) - if not chunk then handle:close() end - return chunk - end - else return source.empty(io_err or "unable to open file") end -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex6.lua b/build/premake/premake5/binmodules/luasocket/gem/ex6.lua deleted file mode 100644 index a3fdca0af1..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex6.lua +++ /dev/null @@ -1,14 +0,0 @@ -function source.chain(src, f) - return function() - if not src then - return nil - end - local chunk, err = src() - if not chunk then - src = nil - return f(nil) - else - return f(chunk) - end - end -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex7.lua b/build/premake/premake5/binmodules/luasocket/gem/ex7.lua deleted file mode 100644 index c76698849b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex7.lua +++ /dev/null @@ -1,16 +0,0 @@ -function sink.table(t) - t = t or {} - local f = function(chunk, err) - if chunk then table.insert(t, chunk) end - return 1 - end - return f, t -end - -local function null() - return 1 -end - -function sink.null() - return null -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex8.lua b/build/premake/premake5/binmodules/luasocket/gem/ex8.lua deleted file mode 100644 index 81e288c8a4..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex8.lua +++ /dev/null @@ -1,5 +0,0 @@ -local input = source.file(io.stdin) -local output, t = sink.table() -output = sink.chain(normalize(CRLF), output) -pump.all(input, output) -io.write(table.concat(t)) diff --git a/build/premake/premake5/binmodules/luasocket/gem/ex9.lua b/build/premake/premake5/binmodules/luasocket/gem/ex9.lua deleted file mode 100644 index b857698af0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/ex9.lua +++ /dev/null @@ -1,3 +0,0 @@ -for chunk in source.file(io.stdin) do - io.write(chunk) -end diff --git a/build/premake/premake5/binmodules/luasocket/gem/gem.c b/build/premake/premake5/binmodules/luasocket/gem/gem.c deleted file mode 100644 index 976f74d405..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/gem.c +++ /dev/null @@ -1,54 +0,0 @@ -#include "lua.h" -#include "lauxlib.h" - -#define CR '\xD' -#define LF '\xA' -#define CRLF "\xD\xA" - -#define candidate(c) (c == CR || c == LF) -static int pushchar(int c, int last, const char *marker, - luaL_Buffer *buffer) { - if (candidate(c)) { - if (candidate(last)) { - if (c == last) - luaL_addstring(buffer, marker); - return 0; - } else { - luaL_addstring(buffer, marker); - return c; - } - } else { - luaL_putchar(buffer, c); - return 0; - } -} - -static int eol(lua_State *L) { - int context = luaL_checkint(L, 1); - size_t isize = 0; - const char *input = luaL_optlstring(L, 2, NULL, &isize); - const char *last = input + isize; - const char *marker = luaL_optstring(L, 3, CRLF); - luaL_Buffer buffer; - luaL_buffinit(L, &buffer); - if (!input) { - lua_pushnil(L); - lua_pushnumber(L, 0); - return 2; - } - while (input < last) - context = pushchar(*input++, context, marker, &buffer); - luaL_pushresult(&buffer); - lua_pushnumber(L, context); - return 2; -} - -static luaL_reg func[] = { - { "eol", eol }, - { NULL, NULL } -}; - -int luaopen_gem(lua_State *L) { - luaL_openlib(L, "gem", func, 0); - return 0; -} diff --git a/build/premake/premake5/binmodules/luasocket/gem/gt.b64 b/build/premake/premake5/binmodules/luasocket/gem/gt.b64 deleted file mode 100644 index 28071bdd42..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/gt.b64 +++ /dev/null @@ -1,206 +0,0 @@ -iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAtU0lEQVR42u19eXRURdb4rarXa5LO -RshKEshC2MLOBIjsCoMLGJhRPnUEcUGZEX7j4Iw6zqd+zjkzzowL6gzKMOoBRHAAPyQKUZQlxLAk -EIEkQkhCyEoISegs3f1eVf3+qPTj0Z3udEJImN/Pe/rkdF6/V6/q3qp7b92tEOccfoT+A9zfHfj/ -HX4kQD/DjwToZ/iRAP0MPxKgn+FHAvQz/EiAfgapvzvQQ3DfviCE+rtTPYH/AAKouEYIcc4ForUX -tXeKexhj6k8IIe2DvdUl0SYAcN7RGYQ63oAQ4hx8fBu6BXfC6vBcsHyDeNRi7cYboZQjBIRgl/lB -KQcAQnyl+q1IAC9YU7/s2bOnsrKSUupwOHQ63cMPP2wymRhjGOOrV6/m5ORYLJbg4OABAwZYLBaD -waBtQUsD34mqRT0hHc/abEpNjbWlxYEQCgw0RET463QEABjjjHFfyND/LEg737XsQpblhoaGioqK -CxcunD9/fv78+ampqepgZFk2mUwBAQEYY6PRSAhRG7Tb7cXFxXa73W63W63Wn/zkJ4sXL1YfVHGB -EFI5VZc0EDcwxjnnkoRbWhw7dxZt316Yn19TW9siyxQADAZddHRAWlrMffeNnDcvUa8nlDKEAGNv -7ffbClCnoYoFFRFiIufn53/88cfBwcERERERERHjxo2LjIz0ZbaqFLXb7ZcuXZIkKSoqShAYY7xn -z576+vpJkybFxcUZjUZfOJKKfQBACP75z/yXXtpfXX0JAAFIAAQAAXAADsAAZAA0dGjMa6/Nueee -FEoZQsgLDfqTAFqWIstyRUVFXFycJEniJ6vV2tTUFBUVRQhxkb0q2TTS7xr9tNxG/bdjtAjl5eXl -5ubW1dUhhJKTkzMyMkwmk0p4AMAYq91Tv1DKCMENDW0PPLBj797vEdJjrAfgjF2HP+d8B8YcAMry -5VP//vf5Oh3h3OM66P8V0NTU9N133+Xl5SmKsnr16qCgIBc8MsbE5HXXgjqdU9oRie8YY5c2W1tb -CwsLS0tLFy5cqEoILWnFI84rHGNUXW29/fYPCwsvSpI/pQLxntYNxxhjDIpinTNn1K5d/2Uy6Zwd -cNWO+o4A7mjFGOfk5OzcuTMsLGzixInjxo2zWCwqIlSpAL2k47tMc+18FN8vXLgAAHFxce4Cqa1N -njlzw9GjZZLkryiK6KP3twEgnY7I8tWf/WzCtm33McZVJVV7H3nppZf6BvXaL+rAFEVJSEhYvHjx -4MGDDQaDykxAw1h6S38XLxUcRnRGnXyiM4cOHdqyZUtDQ0N0dLSfn5/4SUz/Z57Zs3PnCZ0uQFEU -ANQV9jvIwxiTJOPp0xdCQgLS0gZRyjF2Hc5NXwEu866lpUWv1+v1enVBqFsnwWS0dLrZ4K7dlpSU -ZGZmVlVVpaen33PPPYL1HzlSOXnyewCk+6gSo2OhocaCgl9GR1vEOtCO7qbbglQsY4yPHj366quv -nj59GjScWtBGq0f2mVHBZbVxzhMSElatWvXzn//cORUAANau/Y5zB8YYoLsUQJxzQqSGhqb1648D -gFClXO+4eSNUZ9alS5e2b99eXl4+d+7cqVOnCrl361hvOt2LCNWlttY6bNjbTU22Hk9WhBDnjhEj -IgoKVoqdc1+vAFmW//WvfymK8uyzz86aNUvlP72HPrjBWaR2RkgIoXeJ2ZqbW9nUdBVj0uPGOecA -ujNn6s+cuQRui6CXd8JaJUedSsJUEBoaqtfrtdd9p4HQ3rTGL9UE1ik2BZ/trmnMRePinAFAQUEt -AMMYuXMP34EQRKnjzJlLqakRLr3uTQJoJarLzigyMpIxJiStVr/0pTXOQdgAMEaEYACOEPb+tKCU -UOEVhYq9qKCKTwYyzW0XL169cUaNEAJglZVXwc2Q3msE0GKfEFJYWGg2m+Pj41UtyMeJr8W7olCB -dFVS2mxKZeXVqqqrFRXN9fVtDQ1tbW2yw0EBQK8nJpNuwABTWJjfoEGB0dEBMTEWk0mHEBYPU8oY -Y04S+roEbTalt1Bkt1P3i728AjjnhJCjR49u3rw5IyNDEACcvBW8ajgqRhSFCUsvQhghVF/fmptb -efjwxWPHqs6da6iutlLqAFA86yQIQCJEHxkZkJQUMnFi9JQpg9LSYsLD/THusCtw3mHR7JIMfn66 -3sKP2dxJU70sAzDGBw4c2Llz5/333z958mRVqfD+lBb1GCNhxa2oaP788x8++6z4yJFKq9UKQAGI -+CCkw1jvqVkhPylllZVXKivrv/22EID4+wdMmhS9YEHKggVD4+KCxAqjlHkig9DfASA+PkismO7r -oNeAMQ6A4+ODwG0K9o4aqtoajx07tnnz5mXLlo0ePVplO12iXhjZMUYYI1mme/aUrF+f/9VXJTZb -CwAG0GFMhDHLxfjlHQTTF/KTMQogAzCDwW/27ITHHhs/f36SXk+8GO4VhUkSzsoqmTv3XxgbbkQI -A3BJQmfO/DI5eYAQhL1JAK0l68qVK1euXElMTOyS6av6EqViI4bb2+WNGwveeCO3uLgSAAAMhBCA -Dh/TjQMhCABRSgHsAJCUFL16ddrDD4/289OrfQDNahBGiKYm2/Dha2tqrAj1YCcMAIAxYsw+aVLs -kSMr3G2IN7QPcOqFXJ3IISEhCQkJvmBfaIeKIqQifPDBiREj3n3iiW3FxTUYmwgxCWT1FvYBgFJO -KQVAhJgwNp07V7ty5afDh7+7fn0e50AIVhTGmNZiCIrCgoKMixYNB7D3aCcMTvalPPjgGNEHl597 -vgI8Gd8FL/JkLnaf+IcPV6xatScv7zxCEsYGdQd0k6HDvs2Yg3PH6NFD3npr3vTp8Wqv1D0Hxqik -5MrYse+0tFCn48X3LSTHGDMmJySEnDjxy4AAfa+tAK1yWVpampubqxJDMLhOub9W2BKC29uVX/7y -i/T09/LyygjxQ0hPKe0T7AMAYoxTShGSCPEvKKiYMWP9E0/sbm11iKXgHAIoCktMDHnxxVkAbTpd -t9DFnahW/vSneQEBHYzOBS09IYA62THGra2tmzZtOnfunO9PCeF25Ejl+PHr3n13PyE6jI1O1Pex -dQgxBpRSjA2E6N9//+DYseuysyskCVPKBTsiBDHGn302ffHiCbJs1ekkJ3K7GC5CSKfDlFrXrJm1 -ePFwShnGnYyuJwTQ+vk2bdrk5+e3ZMkS9Scv2GeMU8p1OvLOO0enTn3v7Nk6QvwpFQbRfjTMIcYY -pZwQ/9LS+mnT3n/99e8kCQtmKNYB53zTpkV33jlGlpslSWzIPZFBhKUQjLksW596auZrr92hYt8d -Pz1cAQKhmZmZpaWlS5culSRJsKNOJYrWqY0xeuKJz3/1q38DYIz1lIrNYT9gHyFXAxGlFGM9xtIz -z+xctuwzYUESXnXOQacj//u/S3796zsUxU6pDSGQJEKIsHB0fAhBkkQQ4pS2Ygyvv77o3XfvFNjv -zagIVZLs27cvMDBwwoQJqpHHE98Xno3WVvlnP9v65ZcFkhSgKKybAu0GgQMgse2iVIQviIFjjDHG -YnvccZskYUWxzp49cseO+y0Wg+i82DFIEj58uOL55/cdPFgKYHfuDcUoGAAFYISY77572B//OGv4 -8DBFYd6jg3pIAE8hCF6w39xsu+uuTdnZZyXJv2+x34F6xhjndgAOoPfzM5nNEqXcarXLsg1AAdBh -rIcOB5GgQcukSQlffPGL0FCTGIJgSmI65+VV79xZnJNzsby8UQ3MSkgImT49PiNjWHJyqBrC5d3u -1A0CuHstvOv7KufBGFmtjnnzPsrJKZEkP0WhfTnxnV1t0+mMs2YlLVyYMnFiVHS0xWzWUcqammzn -zl359tuyf/+7sKSkGiEJIT1jFAAkiShK68SJg7OylgYFGcVAAECrqiKEZJm2tysIgdmsc14EWRY2 -FY/q+A0RQG3Re2yIerMsszvv3Pj114WS5N/n2McACufKz38+/uWXZ6SkDHDvs4rH7duLXnjh69LS -GkLMlHIALmgwbVry3r0PGwwd4T3gNDcJkqiUUC8SgjEWPoyuba6+CmFtAMH+/ftra2s7COjVuim0 -iEcf/axfsI8x5twRGGjYufPhrVsXJyeHUsrEdlf7oZTLMiUE33//yFOnVj7yyBRK2wgBAKQoVJL8 -Dh78YenSHerqV13cOl2HhUr1DmGMdDpSX3/p22/3C1+3FnU3RAC1obNnz+7atau9vd1L007WzwnB -r756YOPGI/0y9xmTo6IsBw8+vnBhiixT4dIRWNN+CEE6HRF7LoOBbNiw4JVX5lNqwxg5aeC/deux -F1/cRwimVJV/AM79ppAK6opvb2/ftWtXSUlJl9iHbsUFiXds2rQpOTl52rRpnoydzoAfJkk4M/Ps -Y4/twNjotIH0ndQFYP7+ur17l40ZEyHLVJKwpy26+q/Q7hWFzZw5uKVFyck5R4gwjQDGhgMHzqam -Ro8YMVBs472YuYKDg69cuVJQUJCWlubi5nQHn1aAuu5OnDhRU1MzZ84c7/cLda2mpuWJJz4DQJx3 -14Ryo4AxAnC8+ead48dHORxUhIx7R4Rzb48IwYyx116bm56eRGm7sMFxDgDSU0/9b0VFsyRhL/YS -8Yrbb7+9trY2Ly9Pxd4NEUCFc+fOTZgwYeDAgWL6u9+g2kcB4Omnd1dVNRCi57wvN7rC/mWbNWvo -8uXjKWU6He5SErrQQAjb116bCyAJAwnnjBBdXV3jr36122WY7sAYCwsLGz9+vOBCXbzURy3Iydap -oijafIfr7+kw4UoS3rLl1H/912ZCTJT2tZkBIcS5PTNz6fz5yaIzvicMqWillEsSzsjYsnNnASEm -oRQRgilt+/DD+x9+eKyzZe6GhA7M2O12Qoga7O3pdb6yIPEXY+w1qodzziUJNzXZXnghC0ByKgJ9 -BxgD546UlIjbb08AAEKuCUwfQTu0hx4aDYDUKcoYB9D9/vdfX77c5oURiZWk1+tFYD14FcVdEECr -fbq8wH36g9Ph8Ne/ZpeV1fU581HRp8ycOVinI6pVuQftCH1/6tTYoCALY1SIUs45IfrKyvo///mQ -kx6uyHVHTqc49JUA2na1Ar2zUXHOQZJweXnTO+/kAhj7nvmoMG5c9I08rlpABw70T0oKBVCc4xV+ -JNM//nHk3LkGwdw6fVz7txc2YoyxrVu3lpaWImecs4fbOACsXftdc7OVEOlGwgh6DJwDAImNDdTi -omcghhMTYwFg2glNCGltbX3jjRzoLNhWizSEUHl5+datW51G307AGwFU/amqqur48eOSJHm9EyQJ -V1Vd/fDDEwCG/jLxc84BkNEoAXRD8HpoCgDAZNJdP5PEIjBs2lRQXt4kFoEXFi9J0vHjxysrK8GD -PurTCvj+++9jYmJiY2O9CHQxFz766ERjYxMh0s1OO/AEIoDH4VBUDN4g2GyK20zihEhW69UPPsgD -z4tACIOYmJiYmBgRkd8pdEEAsXssKioaOnQoeBAj4pokYYeDbtpUAKDrD+eiOmwAoCIKE3ywBHgd -OwKAqqqrAC68XvBh/ebN37e3y5KEPWOGA0BycnJRURFowgOve0uX/bBarYqiCAJ4gI44hm++KS0q -qkVI31/TX2AHAPLza26kCTU5oKGhraTkCgBxGRHngLHu/PlLWVkl0FmwiRaGDx8uy3JTU1Onv3at -hgYEBKxevTo2NhY8y3TRvU8/PQ1ARZbnTcaytw4DSPv3lzHGvMxN39qB3NyLDQ3NGEvubYjYrU8/ -PeOpBRVXMTExq1evDgwM7PQ2bwRQce2Siu4OkoStVntW1vn+5T8AwBhHSHfqVPWBAxfAq5biCdSg -MQDYvPl7pwrE3V8EoP/669LGxnZP+qgAQojJZPLkG/BIAHXiMK/bWTWO6tixqsrKKwjp+rv2hBgk -FWqi6Ex3nU6UMknCBQW1//73GQADpZ1MKc4BY6murik3txKgI4PBS8ue3ANdywDkBPDo/AIA2Lev -FEDpNPSlbwExxhEyff756W3bTksSVhSP4RpuA7mWmgAAzz2XJcs2LxGJgtL79p33gjoXBLpDFwRo -bGwsLi7W1gXopAmMACAn56K7sOonEGUbpJUrPz93rkGnI7JMVX+Wx2ec2JdlJkn4j3888OWXZwgx -ednQcM4ByHffXVSR4OEeYIz98MMPjY2N3SCAQHphYeG2bdu8+h0BY9TY2H7mzCUA7+o/BwBJwuKD -8Q1F3HsFYVWWLl+23nXXxoqKZkED1UnrptJ0/KsojFKu15O///3Y73+/F2NTp8zn+gelwsLLly61 -CiO2xw4htHXr1sLCQnBj6dhz0wAADQ0N4eHhXpawuF5aeqW+vsVrKnOHl0pRWsSHMYcz1vWm0IAx -hrHh7NlLU6a8n51dIXwyAsXOND+uutFlmQonEsbouee+XrlyB8Z6sey9vINzQAg3NbWWlDQAeHMP -IIQiIyMvXboE18cVgpcMGTHrm5qagoKCwHMqj2iqqOgygEyI5FkjRgA0JMT/oYemMMbNZik7u+Lw -4dKbKbQ7aFBV1Txjxvqnnpry/PO3RUT4u3gyEOpYxAihb74pW7MmKz+/lBATpeCLFw9jRKlcVHR5 -ypRY7wMJCQnpdCvQBQFqampGjRrllQAcAM6fvwLAvOTxYIwYYxER/m++OU+WqU5H/vzn7MOHfyDE -IIzGN48GCOk452+/vf/DD/MXLhy+cGHK2LER4eH+BgNhjLe0OMrKmg4evLBly+mjR0sBgBA/Sn2N -GxNDPn/+CnheAeK62WwWDjIXNHZBgGnTpkVFRUFX4ebl5U2+ONc45yIwRKcjvZh54R1FnDPOESF+ -Vqt948bcjRuP6HTmsDA/k0lijDc12RsbW0SQIcZGABBJHD5uZYTtr7y8CTy4SVS8DR8+XPASn1iQ -2sqUKVPUnAsPdwIA1Na2+DhfCMGS1FHWrk8IAKJjlFIATIiZc5BlWl3d6JzjCIBIkr8QBt0NHhDR -QLW1LeDZ9C2iZuPi4uLj413Q65EAmjypTqrruOAUABobbW4Wq1sN1KhCBIAQujZwkSmlva27LTc2 -2gDAwxS9LoPapRwXdOkPgK58GkL/bWlx9GuAfzeQ5RyaWu/gWnC5Om7fmxMsqLXVIaLYfbv/OvDG -grR830vrjHFZ7gPvu8hX6ZhBIkyhM6q73MY830Mo5ZxTkQ/sXBmYENJVRTJXbMkyY4x7spZ5R6a3 -fUBLS8uWLVvq6+vBqzlFNQfdzG2wCM6hYg9BaZsT+7yz2xTnbe2aeobqDYKjUkVp4dxuNOojI4Ni -YkIiIgJNJj3nsqK0cE67lRPp3RAkfrpy5cqWLVuam5tdEOUtU16W5ZMnT6alpYWFhXnxhWGMhOHX -R5NLDwAhxLmSmDhw6dIxisIaG9vffvuou5EAIcS5nJoac999IxWFVVdffe+945p7OIDI226LjBzw -4INjfvrTxKSk0MBAA8ZI5AqUlFzZu/f8Bx/k1dZewdjkm2OVq3GPngiAEGptbT1x4oQIKtQi0xsB -JEkym83ecSra0uvJTfUBYIwoVZKSQl54YRoAlJc3/f3vx9yttOK21NTw55+/DQAKCmrfe++YBoMI -IWDM9sQT6X/961x/f9cAJ4vFEBUVMH16/G9/O3X58s+2by/A2OidBsJwrdcTX5Q6s9ks/Oq+pqmK -ux0Oh1cCdHS9D5wwKsZFioTnLl2z7WgvY4w4t/2f/zNt3bq7jUZJWEnb2uTy8qZz5xpqaqxCkDoc -1GIxbNt23223JTDmS342t1gMahKcJ7DZbACg07nW6/C2AvR6vUhE7Wq0KDTUBNC9ALQegLrKnUmK -ncO11S1h7UXG5Li4ga+8MotzTgi6etX+4ovf7thRePlyG6XcYCCDBwc//fRPHntsvMNB9Xry7LO3 -HTpUKp72/C4AYCEhRuiq8Ep7eztCSK/Xd4MAGOPHHntM1PL0nH8KABAdbfEgFW8VEEabO+5I9Pc3 -tLXJZrPu/vs/3bPnBMZ+jImodKWwsOrxxz9ubZVXr04DgPHjowIC/K1WG0Letzg8OtqiosIdBOqS -kpIef/xx99CeLvwB4eHhQgx42oWJ9e6s6dLfaO4KxoyJBACzWXfgQNmePWckKciZ44gAMCEGAOMn -n5wUN1ssBn9/PYA3didsQaIOjXcsmUymiIgI9xsk762L8nVqRpj78+JKSkooAOmrKgM9AcY6nPWt -rQ4AyM4uBxD7gA59X5hFAXBbm+K7QUIUAkpJGQDXMwltipxKg04R6G0jxjVlNzyB2AkPHTqAEEM/ -BoN2CZxzAN2nn5749NPjAICQjhADAEeoo2QQ54xzBaAlPn6okyRdj4UxBmBwEuAa6kGjC6hGuk43 -Yt6iDcUKsFqtfn5+nuISRVNxcUFxcUGlpZcRkm5VixAC4BgbCUGEYIdDobTdyV4wgC4gwBgVFTB9 -+k9efHG6ry0i4JzGxAQPHhwMzrmoTSRV+YdLQrX2YhcEqK+vX7du3YoVK8LDwz3xOEqZwSCNHRtR -WlqLsa6v7Mw9Ac5BURRZtpnNAWPHJo0eHT506IDBg4NiYizh4f4DBpj1euKJV7iD2HaMGRMhSj6p -GawIIVGhua2tbefOnQ888IBIquCaepLqsujCHxAYGMg5r62tDQ8PBw9iQEz5GTPit28/0d8Y9oZ8 -hDDnsr+/Yc2a2cuXj42OtrjkPAuk1NW1DhhgliRfeCkC4NOnx6tI4M6ikQcPHszOzo6MjLRarcXF -xXFxcRaLRSS3MsbKysqioqLE8RHehDDn3Gg0hoWFlZeXjx492jOlOABMnz4Yof7MCegCVQhxLkdF -WfbsWTpq1EBhvUEItbfLVVXWysqrZWWNZ8827N9fTik7cuQx8MG0RSkD0M+cORg6WLHgchgApkyZ -Eh8fn5WVxRj7/PPPbTabxWKJiopKTEwMDAz8+OOPn3zySXEgiDcCCGIOGjSouLgYPAgl9YyUUaPC -x42LyMu7eMP17W4UtPsvFUSm0IYN944aNdBmU4xG6fDhin/841hOzsXKyquybAdQMAbG6MiR8T7y -H8Yco0ZFjh0bKf510gA45xaLJSgoqLq6OiIiYuTIkefPn7948eKFCxf279/f0NCQkpISGRkJLn6J -zpArVMyU9vZ2tR5Kp3dSyiUJ3XNPSl5eGUJGgJu7DrwkmwLwyEg/l6uEIErtkycPmTcvyeGgRqP0 -t79995vf7EKIca5T62ASgh0Ouyj02hWIIgjyXXcNxRiJkihOSndwaUrpnDlzBMYSEhKGDBkixHJj -Y6PZbAY199UL9gVPTEpKSk5O9u6cEZczMob/z/8cuHkZ8S6ntbj/DsABsJiSLmMBoGlpMQCg15Pq -auvLL2cBSJKkUxQm3DLCNwDABUftCkSahnHx4hHunXGWLcCHDh3Ky8tDCA0aNGjq1KkiwCc0NFSV -85zzLjxiWsekp4Q/5KzNOXJk+OzZgwEcvgQoIoQAsBqn5eXj3CJdA6NRMplc3B8dWbQDBwbOnDmk -09GEh/uLb+XlV6xWGWNJRGupN0gSAXAMGxaqGbtHCzyAfcaM+HHjotQCNi5427VrV2ZmZnJycmJi -Yk5OjsPhOHnypOpcUbUgn6xa2mM/PBn9Bd9/9NEJaje8E4BzGaBFUVrVUC1PH84V56JmAKAoLDzc -f9y4CACbXt9R+EGSCCEYoPU3v7ltwACzqCbtAlZrh1k3IiJAr8ecc0lSH0eSRByOlvDw0Fdeud05 -duHkwm7hNuI7f/TR8eAWgC12r3V1dceOHVuxYsX8+fMTEhLi4uIGDRqUm5u7bds2uD5+ouvSxej6 -2kyeQDDBBQuGjRoVfepUDcZ6T6JYrI/x4wc98sjtAQEGr1l/YDJJu3efLS6uA5AqKpplmYrH//Sn -eXPm1FitzSK0i3PKOaxcOXvNmnS1sI8WKQD4++9rAcDhoEOGhDz2WNq77+5jTM8YEtoj5zBpUuLG -jfeKoiqEYEIwxgqAnXOjtmAlQpgxx9ChkYsWjQC38A6BpbKystDQUBEGcezYsYSEBAC4995733nn -ncrKypiYGLXUQBcEUGNSDh482NzcfPfdd3dapAA5yyHqdHjVqsmPProNIYO7KBaF6MUsnjVryJw5 -CV62PMLxK0m4vr61uPiiJPn98EPd4cMVM2YMttuVSZOi8/OfWrs2Ny+vRlFYQkLwL34xZt68RADY -uLHgrruSQ0PN6pZQxPLv23e+pKQhMTFUlunatT/9yU+it207U1fXoteThISQBQtS7rwzyWCQGhvb -jUbJaEQGg/SrX6W/8UZua6ujudnmHAvHGFOqPP30ZOFUEDWxtKgAAD8/v6tXrzocDs55ZWXlrFmz -AMBisRiNRhf/iq95wnq9/rvvvrNarWpghadF8NBDY1JTB1HaiStD6KyEYEKQpyqCngBjBMDWrNnb -0uIwGCRZpoMHB61dOz87+5EjRx7bvHnRHXckAMBf/5rzyiv7goONoIlY5hwwJm1tbatXfymyORnj -Dz00eteuJUeOPJ6dvfzDDxcuXJhiMEj5+TXp6RvKyhoRQna7smpVWlXVMw8/PAbARggSyg+l9pSU -qGXLxrlMf62eMmzYMKPRuHXr1ry8vIEDB0ZHRwPA6dOnKaXiu08uSe1948aNy8rKOnny5G233ebJ -LCoWgV5P/vCHmYsXb3KZzgCorU0+dOiC78YixlhgoLG2tgUAKwrD2HD8+IVZsz745z8XpqaGq3HO -oj/Nze0vv3zgzTe/iY+PPHSowmzWnTp1SdsUxsbMzNNz5360bt09Q4YEO+cQF1HTly+3vv320ddf -P9Ta2rxhw4m//W2uWoxAOFydwQ3AOX3xxZkmk+v0V3l1W1ub2Wx+5JFHNm7cKPhPTk5OTU1Nbm5u -RkaGwWDQchGf4gkFF9q9e/fJkyefe+457dmCbljukEJ33bUxM/MMIWZnpJ/qrunBeQgEAKsBDYzZ -JUmaPj1xxoy4uLggnY5cvtyan1+7e/cP9fUNGJsZY863IAA1XxyphVSMRuOcOUnp6bExMRaEUG2t -9ejR6qysksbGKxibADBjjgULRt5zT4rJJFVVWf/1r/yiolqEJIQQY+1z5qR89dVS7cFsKkIF9r/4 -4osFCxbodDpZlk+dOnXq1Kn6+nqz2Zyeni7OI9VObp8IIO6ur6/funXrkiVLhCbrKVZXBBsXFdVP -nPiP1lbFibsOGvTAaaNWkxT/OQ9BsQOoQZxC2OjV8Gz1LW7hPeJxUT6ROTmw+rhOhOUihDi3qSH1 -AHonq+BGI8rNXTF6dIRaDVQb+EYIaWxsfOutt1asWBEREUEpdT8IE67Hgk8pSuJLaGjok08+6QX7 -HS1ipChs2LCwV16ZA2BzMQyIXU+3Pi7dYYxxDoQYJcmfEDMhJvEFIaI66zXPos4eR86nTNc/TtXH -CTGpjSMkidgTgPY//GHW6NERatF3AfX19QL7lNLg4OCwsDCRGAwaxb2trU1dKNpJ373kKRfC+MaI -ThPi52RE/6HACSGUtt1+e0pW1jXmI5Bgs9lef/31gICABQsWDBo0CCH0zTffHDlyJCUlpbGx0Waz -ORyOpqamMWPGLFy40L3OW/fKVoLGeOuJBiLaUj2BdPLkdRUVTRjr+7tAdM+xL0rQR0YG5OauiI0N -FEPT8pPa2tq9e/eeOXNm6NChCxcuBIC33norPDw8MDDQZDL5+fkZDIbU1NROmUf3YtmcWZy0tbU1 -ICDAMw2u1e07ePDCnDkbZFn1Cv1n0aDj9BiEWFbWstmzh7gXylLnYmVl5e7du0tLS8ePH19RUbFg -wYLk5GRtbdtO0dW9mnGilYKCgrffflsEunRKvw5nm4QVhU2bFrdhwyIAu6hZeMvGrXQ6XBHKyLn9 -/ffvnT17iKi+6C5UBURHR69YsWLFihX19fXV1dUHDhxoaWkRKoOQLp1O1m4fZ4sQCgkJOXz4cFNT -0/Dhw9UW3TNDOOeEYEWhY8dG+vub9+49TYj+epXmVgYOgCQJUdr6xz/euWpVmkjs6TQHpr29/bPP -PtuxY0dRUdGkSZOmTZsWExNTVFSUlZVlt9tjY2NFPFanWUbdI4DQeXU6XVhY2K5duxISEgRf8xCa -isQ5RpTy9PRYQvTffHNGkv4jaNCBfUVpfeGFef/93zO0ey4XwwNj7P33329sbExPT9fr9YmJiQI/ -aWlpFoslPz9/xIgRJpMJPOjg3ZYB4NRwPv7448rKymeffRa8pvAh5ylVkoT/9Kfs5577nBAjY7jv -y8n5PkqEMMac0vaXX57/hz9M91SCXjipjh07lpWVtWbNGrWcoSzLe/bsSU9PDw4OppS6HMbuAt07 -yE3b0J133nnlirfsQO39hICi0N/9Lj0kxLRixQ7OMSG6W1I35RgTzmVK6TvvLF65cqIn7KuGkKqq -qoiICL1eL8syxlhUNTlx4oSiKPfee2+X7+v5ESYWi2Xw4MEuEqlTd42TBliW6eOPj//yy0eCg42U -tkuScKrcImJZJPITxtoDAgyff7505cqJskxdsK8OkznPlIuKiqqoqGhtbRWRz4qi6HS66dOni6TU -Ls9w7DYBtL1Rjy1xiezw9IgkYVmmc+cmHD/+1MSJgxWlhRDo6flcvYx9jDEhoCgtY8bEHj/+5F13 -JQudx9MACSFiso8dO9ZsNn/44YeiUqu48/Lly2qCu/cXd1sLguvLMoovly5dUhTFZDJ5OstE02+s -KCwkxLRs2Vi7nWRnn+dcIUTv9Oj2PUfqyBdjzME5Xb165iefLB440F/oPNrxav2INpvt8OHDR48e -tVqt0dHRI0eOzM7OPnjwoF6vlyQpNzf38OHD9913X1BQkJcM347GbySpSDWUbtiwwWq1Pv300ypt -vItlcWCLOI9lxYrdp0+XI2TEWHKu674hA3dGSimc21JSYtetu+v6s9w6hgiaEAWEUGNj4/r16yml -AwcOLCsrE5bnkJCQL7/8sqCgQJZlPz+/u+++e8SIEVor6U0hgIrQq1evvvHGG3FxcUuXLgXPSpH2 -EVU1stuVd9459uqr+5uaGvuKDNeh3mIJfP756atWpQkPl/ASg5PBqtNfDeh8//33CSHLly8HgLa2 -to8//ri0tHTVqlXh4eF2u729vT0gIEA1gnYZ5dgTFnQdARFijBmNxmHDhu3Zs+fixYujR4/2/mIt -OxJG3alTY5ctGwugP3WqzmazAiCMJe8FYHqGdwDkFKoK5+1+fuaVK9O3bFk8b16SKJWrMn2xshlj -Fy9erK2t9fPz0+v1CKGmpqY9e/YsWrQoKCiIUmowGMaNG1dcXHzmzJlJkyYRQoxGI3Kecuc9lkfA -jZ4nrHY0PDx8+fLl3377rcPhMBgM4HUdqNNKnISgKCwszO8vf7n9179Oe++9vPXr86qr6wEAQC8E -XbdOse3sdcI9KU4HdQBARMSARx8dt2LFhOhoC2PcRdcUgyopKdm5c6fVahWCbfHixampqeJXNW1L -WPx/+tOfrl+/vq6uLjw8XCj+XmoL9DIBtNSOj49ftmyZOgzBSbyXOVBrjgosRET4v/TSjDVrpmRm -nvvoo5P795e1tVkBAEAHIKk4UvPcPaFbcA6V0XGuUKoAcJMpYNq05IcfHn333UNFlqTgOcLCIxoU -6M7Pz//kk09mzJiRnp5OCMnMzBTFZgIDA+Pi4r766qvhw4cTQhRFAYCgoCBCiN1uB429wUffU68d -6KyuXK28cr/i4XEQfFk9XlkMoLraundvyZ49JTk5FysrmwDEKWDCQyk+1zXpNHIw50ds9PRRUUFT -pgyaNy9x7tzEmJiOoGj1CGn3GOnGxsa//OUv99xzT1pamjYmU8yn+vr6N998MyEh4cEHH9TpdAih -L7/88uTJk7/97W99n/i9TACVDNfaRSgvLy8iIiI6OrrL7bg7ISnlCF07q6u9Xf7hh4a8vOrvv68r -LKyvrLx66VKr1eqQZVlzJh4CwDqd5O+vHzjQLybGMmxYWGpq+PjxUcOGDTCZdFoFzNP5aoKlZGdn -Hzhw4He/+506lxFCLS0ttbW1JpMpOjq6srLygw8+UBRlxIgRjY2NFy9efOSRR4YMGeLLIeIu0Jtn -yrsYab///vtt27YtW7YsJSVFXQq+tAAA6lmaooSM0SiNGRMxenQ4dIh93txsa262NzfbbDZFVKrQ -6bDRKAUGGi0WQ1CQ0WVqi7P7xKmFWut8px0wGAytra1NTU2hoaGKopSXlx85cqS4uNhms1FKp0yZ -snjx4meeeSY3N/f8+fMhISH33nvvwIEDuQ8ZXZ0MuRdXgArq8L744ouvvvrqjjvumD17ttejNzy1 -I8JAROHBDtYv+IYXh6jTRX7tLFRN8lAXJdWdC679jTfeYIwlJiaWl5c3NDRERUVNmDBhyJAhZWVl -27dv/8UvfjF27NgunS39QwAt98cYnzlzZvPmzUuWLBk1apSWn/asu2pvPVVkVaN3tP92t32EUHV1 -dWZmZnNzc0JCwsSJE0U0lfhp3bp1gYGBS5YsURRF3eX2gPvfLAK406ClpcVgMOh0Og361KolXWvK -fQlaa4/LF+HVkiTp7bffjo6OzsjIELLtBvvfwyPNvYM6u4Uyqk2yFIYUdffgyX7Xl6BqONq9K3cm -1MmyzJ1nF0qSdOjQocrKysmTJ4NTON/g7OlNIawFtVtaHU5c+eijjzDGGRkZAwYM8FE43yTQmnVB -M+XVBVpXV/fBBx/Mnj07NTX16tWr+/bty8vLe+CBByIjIz2dpNZtRPXZ7FOXc2lp6RdffFFRUTF2 -7NhZs2aJBNjr+tQj8dDdzqjTXFWRtdtGZ2CHsmvXrtzcXJPJpChKWFhYRkZGbGyslwOsuwt9vfxV -Mpw9e3bHjh1JSUmLFi1y2eyoJtxep4SLyFH/LS8vz8zMHD16dHp6urtuc+nSpbq6uuDg4KioKME5 -u9xa3ooEUMejVmJUFEVRFJEuK8Zjs9lUY1ZH/9yQ1bP3goa0Ku7sdntOTk5+fn59fX1CQsIdd9wR -FxenfbX7svDdyuYj3CwZ4A7qNk0MQARTqmfNAYDNZlu7dq3FYpkwYUJSUpI4ckKrh2hnnIvBw9O7 -tPeD2ykuIm8rMTHxoYceEjsp7SMuEkIVxb27KPtHA3HX9gTDPXv27MmTJ8+fP2+1WtPS0jIyMnqw -uXdRIgU0NzdXVlYWFhaOHz8+ISFBZXoqu+uyQupNgr5bAVpwd2oCgCRJw4YNGz58uKIo586dcxED -R44cqampGTRoUGBgoMViCQ4OFhsLLaIZY4qiUEpFjSN1J7hjxw5ZlgkhgYGBqampLj1RVaA+EP6d -oKJ/dXABWg4LTkah5d0iSe3YsWMOh8Nms8myvHLlyujoaDGR29vb169f39LSIqwI4eHhK1euBKdh -ubq6uqioaMiQIZGRkULegJvZqh93grcEAQRop7N2q6xlVoyx1tZWq9U6YMAAbSDU8ePHEULiANOg -oKDY2FithHCRFv0y0z3BLUQAT6C6d7TaIfiAR5c9bZcBA/0C/wEEEKDtZ6duHy1a3Wtk37LwH0OA -/1fhphjjfgTf4f8C4VLHz/5KLxoAAAA8dEVYdGNvbW1lbnQAIEltYWdlIGdlbmVyYXRlZCBieSBH -TlUgR2hvc3RzY3JpcHQgKGRldmljZT1wbm1yYXcpCvqLFvMAAAAASUVORK5CYII= diff --git a/build/premake/premake5/binmodules/luasocket/gem/input.bin b/build/premake/premake5/binmodules/luasocket/gem/input.bin deleted file mode 100644 index d24a95495b55894b96aec1b01d0b7c02cc43f168..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11732 zcmW++1ymGm7oH`T4vD3t6_iHlmKN!jUJ*q)M0$ml4r%F-?(Rkw1f;uDI;HcU@1L`A z&hG3xbMD^v-Y0Ibx~c*JE;TLy00c^kvYOyK;=d;p4SZEGI!^%rPAw%_Y3(nw``+#@ z+H#YZC52O;q6g)Bl}USLraK2Qg7$Fz@nAnRBwR5Zr4vbf)|SIW2J?Idh4}}=@OJR~ zcy=JN4uB*Ju0|~DuW}aRuPic(GQG-Br7ezyI}@F|`~1_jk<vF(q$U3K0YJ;ImxnqIVrJD)*0_au!r(hC8CxFA^2o+Lf5kb64 z>*Yn$i0Rh3b7WNR<^N^eVjo458Ow};G)uUWX2%9(ymGEf6aj91t+u_Hs=Ug|Xw4l5 zAs3N_E+R=AzC;)twpOH9_IG_c}6sn**$rhYO2AIsRqMas}{!22RRMUY#g>}f0?5`f$9U(DgE z=VgXql9O04ZEkM*-X8aKbaasX|5!tXhlYinTGkel)y(ZDa2ZFlus?gIObmlJTMeaM zUtcT5JOOWrDqP-FC_2O&kb>S{4c#V~%$gc|;{Xsv00V$H0EF$pJK%-Ohk;LJe;PK^ z$dsvMdhrOZV*tZ=rhX?mIXNSv6c(k`r$rO9WWqwU$>w$cDeEf95Z3$eFJ*3j(Y$qdwfl`bQ^=sXA%1DG(9vj>cBLpN-5eSL4ffuDoJX7yJv7|$wwj%Q5T1wc#o zT9b&0l~f+A(q^ihH*r$Aq%_EYaq@G~-Y!@S%i8uBrHl;P=qQ#( zAMa0X`ERuU5Jm3efR#ou8vMlUfz=PkhtF& zy|AXR`-vxzeUnf66P}rg^7Av5S9tqNWH{m=cg|0n10ELnSp0gYs4PvwoBBnH;jny> z!g-=bhh>f9;3HB}-4esIf9VhN!sGxjS$Y@YjE#b2G?7WAILl-Q1mvFWMxrCsbBqq_ z-I=wmCUagV)Y>nZn3zbo9n2SK<>5BC?dsc$EQCTQa%v|C+c(EGAJ%KUFE`XW7U;1%C zZf!LMA|)-&33S04oQamc63Z5>4J5uUC?Mf#Ie3Hifwi!Ikd2Qon)eAyiEi6z&dWjR zX@Ex_X$C|PpWjz!#Hz25e+y~J&j?Y&;`?Ju$!*f&C?8IYW)>Hx*YW53;wOw@i*#a5 zefd!DZb|S?XV1bTq+2W4SR=SXe|({^#t>7TglHwv}Dd5UH}KPh#xa z0WJL>OBvE%M@AsLyc97?fy5LW;CHqvC z!pzLCh=G)5@@8wHXYypu-6i=S?r;CmOWYJ+_C_feP2fsFf-V`dyYvqW3>YQZEx~|1 zd%oLtS4)hzyunsUB5N^|?(@TZwYKW_3-@QNJCpzL5`;lQLb3SA!EVMBf|n4nw&ve% zi+dhHT{ue}NhezC{_n44e|-33aYIW{<17={46i(l*&x^RJhs?0{b53nRp2cifHiEc zg5>S*zTBY07^6Ii;l*V@=kf2bKi@<4Jf;DQb+n0EGwgu;n-b|@-?K!~3sV@4oh%gH zK}p7H@Rm>59YKt2Q36U>cl+X=>y;WQsi^ElZx>yY=2$QX%*}0t)8H+BVXmvMCj|g} zBr$@Jek>fF5ejH1L-qhLjx8Rpvt2}y=l{lvyn#Q~#PUJ8Pv(wRK7Fz-hMt){#Rm|) z76TF=HTR;JpU>L{304z1?0hpy?PX+S#KFO7H8cGX7{ZjzNPoSyyN1Ojh7^V6itQ4U+12{z zhre^r*2t?xk57xI+sD>r59YZYW2Le?h8(q9vJ_Vr!2@6q2qo8;9XV% zlsFj}8YU$t7m>c=saI`i)14;uo12R>y*~*(J-s+N>4P4>QdDE#f3$}VScGXQlSD(0 zx!Ll6@WSsNsqNX>x(4Me)1tBAzE;6^KkhaFY(bWfi9*4E0h;2Rx^wMxwYi`usmI{ zTUqs-1xKq7QyKlLzISJbEI4@Y*(M>IUSqj(Zi~Y5@yV=8Hof9e(#Ra*um+B|=^oa9Kb0+HS}f5? ziW@=DG7}RMb8^7)$Q8$;RQ^+yHDt0NoY!MDc*ysx$QRu#>?}6qkGZ57J)<5vNe&rY z95u>6v}aVi$8Ro8YT`O5oyYue)AriuZda77TeX0I@jHu5P`QJP7gRc0mUuO`)&jq* zt#xa`?T~Ex@J~KeCwgzLj+=+ap%aNy7}fJ=i83vGQuoSAa_)K~0W+E`gRM9jZ6E6^ zIzz>NmNt?*=qo&o7iHl&@0iSDE>|&_ChpV|al=XBztud=t4J#0Rlj<*c|j+pk89?3 zK+w$w12D~yKMq?xr|BPrK3yL1$eAzx^!HE%)EJ>Ap{YDOo0<`aQ5;SN zumrOy@BRw*ud0m4!lde!0;GxxnUL=iYwMmvzs?jpn_w7F2#`naToRB-*^YSH1bI|( zREZwWU!F~Ui(X&aobCZ|H~WTsCGIy8tg^H59S*BPdiLi+O}?z`j*e2x48%GCTpxIB z4Nn$Zh-mQXR>YTI2;xNN$EtIa`tedogq7Nsw&I%G0v-2vH=jOz5`}I}G_qF*DbU{) zo0doN{+%a*eVA_ew^H(!^6Aq+&Awls^=>j_`}tTg!1V9c%F~rN=_OO1gF=98HtpzJ z!pFDf+oN@V<4>nL0WWr3Q^DyyM`*_xu3mW9`2 zs*^)F9c8T^W@{+sJH895n4ei3*hCVo4(1^oS}UU@`eQy&X%RXSPcHwjHq+(Hae9BX zth->sAD7!)cPl7O=M|v2+Hts~`1rr8e_gQCbrFpR zswqMmT3Y;8gS3Yic&;V6xf{VxCD5f(+@_FDKM}lW4$W78Q`dSFglV;rVV(*|XZuKK zM_9#_Npf;pn(W7>@(xErU{p)(&R$Ngip8A!ob)(k&c3aswpM_fTdjK$OoeaGn}ctD z@R%>Rf3>)7TFRJJfGlt4x#{V=B+lAw<`!)1ythn#`DyE9V~yQXgzi9-v~gGpItN|? zj{yfAXETi0*w}cj%%^6~^2b3t41~2bl0MDLGRDp03Y@*aCkwLJX1xM;54U+%lt~vW zH^zPMrryh_#GcnALKuHFi1Ryd-(LOB;%|M5U+^I(_BH8X?{uZJ6@>9gCK-tzyY0t&oyW*RT_?i($Nm??qi~d>u9i>w5xm`JEPNZu~I`R zY{FADWn4`4lr?f6mNChD$MyLJtd4mRZ=;(!N&$%A6EyTviB8~OsN?(TjyS@Jej zeo3{R2BLjeP*}KgdAt_Q;@Z9@ z8S{&Y$7WVr-DHu4;wvQux6+6&pZ4jcE)fo?{5y_78Vw8cnj2pmr~+-OBN1) z#5np#RrCmh3DL8nu8qIQFl`eur?QGv)ZLvRlITSr3YCKT|M>5Kkwh)AyGR2So*d7f zQH!{+eIaIEO=2+*^tYSU1~PVuHnT)*fD9(wM_%O^U+6^95Fp?LxSCCl%pA}S7UuU;D%unrrP2U7$P(R1}XX=!QYwS6uLz{0>NHfa$N z5TFq2cNu9>lN2YAl8fJbgQ~0}L|44INZ>^^54>5L{W?D%N&`1pIL0`?f{j{DIe2ZYhc5?xQ-$*cPfNsv=2D7x)vpM6EAY%hvm#Tn1w z1*V&?Jo9jWEtq0tJY4UNqEMgJuJZwzpx^IK)@hCu0oPTYvN?m75j)crg?)X`q1)F@ z=SUa}xpmf-id(8`ET2**CT0!DLa6}soKzL|K?uB{w3J=2jx>YWzvFd(+B~{(Kd_E* zv~`OHOxKl>No~J4&9R5@qDc6>@2|FP=Tu*l>XJpSP}`w5#3up3kaz-XzW_H$u;1v- zdFq9q2qi}2D@u$HHZ~kwT$7WSTiG~a0K?PGtfumvr^J>t*>TS$CEZHF?p~>);~U>& zl`@@R`9$e5(pT&VY$Z@$_nBdbK}fILlCgHw^2%egFfaj$!o$NC7!Xn(=H@H4wsXzb zbP)LX^t8|40aoB}M-m%Q>Rk0dCXk!=#5C85=Q6Ebbe%$lguItVpHSM(9d)@aVhhtO zor-CDxSKxoZKH&1^oUlLLdf*Jj`>dAA-wpijvIm@AxL~z*xBW)M=zF7T3bP$Gb zyF4Gpgjic!%ZF2M!~wLxV0s%`d-M9SSr`mXLUM24Dy$Y?psH|xySdjD=*#enAq*uL zi3Qyj+5|hnLl@CMN-kQkLxQ-OWM$z_D_Y^5CpNLvUfPm zqgN8X_qbn7AghftHWY+>lrKI@BR+!YQBF=;Z{_dC#+z25DWOd!9@#wRmLKjbbaE;D zgCvYTx<%e=sQGZ3$Ss$@IS`aif4k6njofNfW1_z%0<-Mb^UQKbu2K>9S3PDD|S2d9eNHc=`$9EBJkbHp%dC z+0dau#BM415l4Q_1Y_2;chiH&5z4RHYw7iFn4`e~`e9SA-u4e^CY4P7!lrqY*wQPu zjTEgYqCF$3AH<_Na(sF=zxm){o|W3Z5|(?3y)a-~4js(2 zAd>!={OG2+YL0Bvc0b7@V28l(r>5M;m3g}tJIu`f78Wv0OlWVOh;LSARXeCQ#XZ_y zAZGDtblT_xR|6@IG4TecmP!0Z%u}`8oSbjpzPTTNGY>&fuABFD%yD1zA9)>hnc6$yPd&NM~?VNv2s{eEeuLy^R3C#kF4YJp6&>4`nnP zIREu%+xKqQ$k%rYcpBPGOis?@?Qv`GE9!c6GE{5N4I-~ptWJlLsYj-z!5 z1tCpzgn@c!E-o!ZDLl_mav{h~F5{~G58UuDp}M>D2Y%ay#-?z2C4Hs2+4Yl?T<1+{ zYwKc}?;^D07Q8ldpOKQc8_9*LO$?MzSa7~ePI>vxagU^(ZJb`2 zDmvnL?I#-AZHX?8%wnC8n8<8aRwo_CPIPqiW8YiHi{Uh`TL@SZW$?euehWT3DBd1j z`fz}Y3Jb;nstnwgrDoE^tytK56W4+O9!4x+?P+=nnc!OvEMH%7gy83=Hqu#y;cgs> zD!D;H&g-v{eAoMo=r`EpLce3i609oCw4G|)6r-c z8irPsmhBCQLk6Wa$P8)||3Kh9Pr@J5Nw{nwI{d*6%K_F`bgUm|AZ6C8_n-b829gA2 zi2|x(D5FMZLrID4=3pw3*bzdpa5>2%dZ%)$lb#p`>lH35DIp*t!X~niQn{kyU#+v3 z99e>$2Y4ZQHY?lO%>N|K^e04yN7UA@i{WLDPt*{?%;H&0zp$e%kLC3gDJ~CYMPU;? z9vB>q2n(w=ECFS8P!pyIm1C*nL-qCbWo2dkIwn~JSDXLvBH-J%xP$~yPMzh?5du`w zC19EN12|h~I#5S01v!KBJp&QzaVhf_X=qJdzmCpiUtf`>Ww_Olz}}LnD!ZuDI`2_O zwH!P8@KA~{Ohmt8*$D>Zsw9%q)2GM9b;E9M{|(s+BzIc`hlD7rsNmz{-(IdorhAR9509!2|8UM_-;hW*}k6cE~^2xVns%WrHH zVPdja?~U3VN^kpey!s7~^89dVX?Xa1bTlay6%LnA@Zk67+5@rY=bvjHE9bds_OaqD zIIAg}m{7^cBa)j4n^}_4j(Qa(6N-=w%KI@-i4q05f3IZ7|2(a0^S(%4+LH-#EY;dI zBlV*rY+^f|B@bePo*26kbi;z9*;JL?96l;mXLn2Oo4-tFhM zf+$93Ymq&f=j#*%+A$UOab=SN9FJE?4pJTCIom;vzOTRk6_kMb#fP2o0;cw-FJ5TJ z{Y&}BC1zpRlbwf@Trd73?DXz(Z^j=&+ls-)gapc|^ENit=9!Gqe`@e08qL$w8C0WV zV-2PVXOE2_18+j@H#YQ&b*bP=vY!eB6-glu_%sxSR80zaVhC?k*rnrI);O8~*Oxhv zJimYc9z^RPXHZp*=vonSKgr%P(x_obFE*ToONvq5VJ`Wej^J1eHa|i*Q)S3$7*42j zs?iUUZ)Uv*GT1o8=6&bup+K_9lE$TUG?WpRaVFT-VA~E<e%GuCfhlIdI_Jb-O=u?>sggFDV`2Yynt|Oa_=2&0+feZmVR;M@fx=HN$)-c zf>mbVYsRP4a1p7_KWoicWq$DX z3};4#QiKC_M}%KucKr5ijpW^LwX8Z@Q7yfxtf?3z@;fG;=0P+6Z?o?p!U&iD z{XrJX|Fp<7r|nqY?o-jvhMB*#cs($!Lb1EkcPrY&FDt6^0YFl+4J1(_w1k81mX;gE z230`2MFlKep7J52%)Qg2<-X~#waT!>+U#4N+|lqWxTY4i#%%EOS6jtk0Kexw^GgHZ z810kAGjpS>JTMl6T(ISq7>i1Z-b67gJf3TIAE9$&0oqL;lK%BQzwz@A&j{B4OUv^F zG&G9zeAz37sn&?ZUwBNFvMNM~rKPsqb`gOt-46>M#jC5A+uJmKebgi}pPMSJbqsYT z_=zONu-fIJq6=?QM*41Obn&8cS;-t@=M-;ZNu*n#e~u~%c!WW z#RQ(?c1=6nUVbyElDOQIq|D6?C~_RklKk^$pS#U#`Hx^*aAc&IOMa)#WU7d((i|BI zH83#dyy;VIw;=v107G<>m{MabfxE8t?tEm*RC0WFw%NQZxb4oi)G$m+$SAdgpk3Je zxI6Jl%rn~b50kTO&Kg#nC9# zb67IK1CPMOlV5aJ3;E5WqhkPCZns%khDa79F?`?oZ?@Ojgyw#S%`+Ly^R~;?P)t0E zEf*1kcr`F2VD-Dc_NbakNlW7zWS&s9ONTNXl$Mn(HM;Ibv%W??*=5(&!=RxgpHNG= zjGWZ%4sIf(K5hT_Q#Xd}L6}Io0zF?kMP_hNV({4q4)lowtN?5r3x?UBz!Gsj5 zD_}eWJf0RU%QN@=G3NDfK^hWh(_G3!Kib%M?UvN(7VCq~w=}z}B=k{fkDnU5^6Kjk zAGTuDB(^bc=r}F1*+5CMT+bvC-OQO6Kgd|EPJ(N}Jj{_031j`8PR!5v?k-kP+rax1;eNA zZYe2wW6UJggv(wf?s>D4c-o)!0eQ?CgIz1A5W#w}vypnFI_(-J-{H zF)=Y7p5b?VS65e5_yObNnZy*H!Z+=aj?(?+Uh-#^rjjb6=ofN>+A1qL4{*vq9w^OD-I;& zbxS^PF&bTz+X$_ak>uarBvaIxcQFA?`37J5Q6(-SMkIZ`4R?1JhpFP8LHVs)T-unj z3JPWVV9y942g5osF#-CDA3lC0dFKC}D^+#Uj@~Mi7#9ae*z3|kOKa?CrE7v>f&Ufg zbDGIz!h7VeZ;~$##NPznd&K?K#Uezo;AqTV_ed@_SnDJy?rp!o&TVPAs~VD+tAHzL zXpCel#pHrF_2`k7wsve>oMqh{91fQg)6FxGUtmTIySs`Q>+4UK8aILP0mJkkaZ<=H zVfomT(^Gw!()jRc$9-e%fO z3NbUh{;>b|m4q^q2bD5){v8sLHN14kCC>7z+M=6qke9LXt)}1x?9rg5 z^0w$92Pm~4q`_+D682oj7I6YhRKl)m;$VUSm5v4Q>1KH+fpisT7JsO8ae2N!99 zmRooXmVW&9T4dzINxuSE+GA^9M>`bGGg%n0oIFC!qNCxb`?k7l^aWR{7?+n3#t09^ zhK7U`=I4K~wIz=l3d!1XX#}fuX!bbQki(t;q`E~TlG8DG@8~p$#oPd7iBD)H@5e!t zg*@jQ@z(a0QA?P27%yW68z&s~>#^khy0IH8UTV)6fWv4}3EIGuHUhqvD}h;>MfLwq zHu|monl32a-s1V~_Va~sgEKFhWZm!h+(r6j$Lx#QIKVjA%;-0zzOzc-G-8xJJl#4M zSJ>&Lgb#EG8@G7;eVWekSZLUEOKkSo`YuQyc^}L*g~-P>h9x5-Bg_gBAi$USa+G0G zmcYU;D0l&W3jzUC&{9aiUy4B4vlJ-4jJ2CC@35|sxH}ztX4@QU>1Y-z6lvKVvXG~i z!2Ir)zEkOLD<6LLI%{wRL) z`}gnMZMT&f8B+0#4k<^SljyvxoQng! z#`B$`o8%4&Ocd&Xg!OY%OG}G51B28{zt2<~(~l@z=pZB(VN~HL^R9sXnX1jz?oe>X;QZc# zQ=Ifr328yj1YrZo=?6;7jPWaRaCAQ7BXB9RG` zXLd?++7yphXb(?&TKxHin3&hq$p)yZlyt4|!0?w{>GH>vQ;;B{mv0VWv*Y+ z9aP&|!8x3juE0k!WO5J$IR7LQv|xuF-qNA4q*X?@Ra|OR((Kf>y5dOeWgu>1fS=Jg z+vsNhJ58KbSeWwp^JL%`yIJQec8RH%+b^7WHWh46Pc<~8wQ}*31i2j#=70V85s~rX z4Epf`wv9re+HN?uFWc_zc+ugps zclu?E3J`}sH7m!)&CSik#3Ulp*uP&d%E-O}H5M%@YB9cF2@Gg%-Z^Y5d(Kf@R^05d ztywg&^WD=IZq|A5@f(uY3@(JY5@`=aI6EYs)y}g(Hn@Uj8pL&DD@DyJ4dY`jw%EH)dJC1{b>8XxbgO>&T<48c2Z=p(ouFJv|T)aQ+3_$jiVa%Cc#WqZGFDIy|bu(y}Eav$qvsf+nf zi@!+IH@?C*m1F^At{2O{eWnsJtc7MaX(c#+{J2eN>ZPHf@n1{~s@?}l`?pP>OS&x*dCX-rHKT=`WQqbmSfzw^bd5Dt zU--|lb1~UJ=jA=l417!~%D&IcMJhwy-O|K%qk!%>b&k;mmfAfq+C%A*_BDoMqoaI$ zd>-WuZW>IOF9Zekbag2xC?e=3B^Vi{Ej^w!?N-X{yzy&&3o&$XvqnR(D1keY1|0Ut zVguzgXA*RU2wJdGQoZ<~Zf2IzZGl5bNI`?gnMDN;$x>IA3uktHS`Y6bG>FGx1k(vT zlS^DfCqshxJ~boD*VO@HNQkE@pSiKXq_jU>0VfRXdSCUsvKds_x3)g;M$OI5O_iB0 zjgB%EL&44jPGMo>nKytD1~CPg@ljDxGK+}hnL>Iuzd8&E#)rJB&qc+Sx?vTQle$F{ zB4+J?EyFlyv69HF0%I8&8Pn7HB}j)TiaWkB@eWQ|KrN%ut$LR65}}YFZkqr>ze9U~ zU=U~QTjkl&a~dvudbd=0ME?r$ptq6>Tl2wKT6sWQ(d-$zSLUV$r>w4cb*_o /dev/null` - then - ofilename=`echo $1 | sed 's/\..*$/.pdf/'` - else - echo "$usage" 1>&2 - exit 1 - fi ;; -*) echo "$usage" 1>&2 ; exit 1 ;; -esac - -if [ $best == 1 ] -then - options="-dPDFSETTINGS=/prepress \ - -r1200 \ - -dMonoImageResolution=1200 \ - -dGrayImageResolution=1200 \ - -dColorImageResolution=1200 \ - -dDownsampleMonoImages=false \ - -dDownsampleGrayImages=false \ - -dDownsampleColorImages=false \ - -dAutoFilterMonoImages=false \ - -dAutoFilterGrayImages=false \ - -dAutoFilterColorImages=false \ - -dMonoImageFilter=/FlateEncode \ - -dGrayImageFilter=/FlateEncode \ - -dColorImageFilter=/FlateEncode" -else - options="-dPDFSETTINGS=/prepress \ - -r600 \ - -dDownsampleMonoImages=true \ - -dDownsampleGrayImages=true \ - -dDownsampleColorImages=true \ - -dMonoImageDownsampleThreshold=2.0 \ - -dGrayImageDownsampleThreshold=1.5 \ - -dColorImageDownsampleThreshold=1.5 \ - -dMonoImageResolution=600 \ - -dGrayImageResolution=600 \ - -dColorImageResolution=600 \ - -dAutoFilterMonoImages=false \ - -dMonoImageFilter=/FlateEncode \ - -dAutoFilterGrayImages=true \ - -dAutoFilterColorImages=true" -fi - -if [ $rot == 1 ] -then - options="$options -dAutoRotatePages=/PageByPage" -fi - -if [ $eps == 1 ] -then - options="$options -dEPSCrop" -fi - -set -x - -if [ $a4 == 1 ] -then - # Resize from A4 to letter size - psresize -Pa4 -pletter "$ifilename" myps2pdf.temp.ps - ifilename=myps2pdf.temp.ps -fi - -gs -q -dSAFER -dNOPAUSE -dBATCH \ - -sDEVICE=pdfwrite -sPAPERSIZE=letter -sOutputFile=myps2pdf.temp.pdf \ - -dCompatibilityLevel=1.3 \ - $options \ - -dMaxSubsetPct=100 \ - -dSubsetFonts=true \ - -dEmbedAllFonts=true \ - -dColorConversionStrategy=/LeaveColorUnchanged \ - -dDoThumbnails=true \ - -dPreserveEPSInfo=true \ - -c .setpdfwrite -f "$ifilename" - -if [ $do_opt == 1 ] -then - pdfopt myps2pdf.temp.pdf $ofilename -else - mv myps2pdf.temp.pdf $ofilename -fi -rm -f myps2pdf.temp.pdf myps2pdf.temp.ps diff --git a/build/premake/premake5/binmodules/luasocket/gem/t1.lua b/build/premake/premake5/binmodules/luasocket/gem/t1.lua deleted file mode 100644 index 0c054c907a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t1.lua +++ /dev/null @@ -1,25 +0,0 @@ -source = {} -sink = {} -pump = {} -filter = {} - --- source.chain -dofile("ex6.lua") - --- source.file -dofile("ex5.lua") - --- normalize -require"gem" -eol = gem.eol -dofile("ex2.lua") - --- sink.file -require"ltn12" -sink.file = ltn12.sink.file - --- pump.all -dofile("ex10.lua") - --- run test -dofile("ex1.lua") diff --git a/build/premake/premake5/binmodules/luasocket/gem/t1lf.txt b/build/premake/premake5/binmodules/luasocket/gem/t1lf.txt deleted file mode 100644 index 8cddd1b5d3..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t1lf.txt +++ /dev/null @@ -1,5 +0,0 @@ -this is a test file -it should have been saved as lf eol -but t1.lua will convert it to crlf eol -otherwise it is broken! - diff --git a/build/premake/premake5/binmodules/luasocket/gem/t2.lua b/build/premake/premake5/binmodules/luasocket/gem/t2.lua deleted file mode 100644 index a81ed733c5..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t2.lua +++ /dev/null @@ -1,36 +0,0 @@ -source = {} -sink = {} -pump = {} -filter = {} - --- filter.chain -dofile("ex3.lua") - --- normalize -require"gem" -eol = gem.eol -dofile("ex2.lua") - --- encode -require"mime" -encode = mime.encode - --- wrap -wrap = mime.wrap - --- source.chain -dofile("ex6.lua") - --- source.file -dofile("ex5.lua") - --- sink.file -require"ltn12" -sink.file = ltn12.sink.file - --- pump.all -dofile("ex10.lua") - --- run test -CRLF = "\013\010" -dofile("ex4.lua") diff --git a/build/premake/premake5/binmodules/luasocket/gem/t2.txt b/build/premake/premake5/binmodules/luasocket/gem/t2.txt deleted file mode 100644 index f484fe8eb9..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t2.txt +++ /dev/null @@ -1,4 +0,0 @@ -esse é um texto com acentos -quoted-printable tem que quebrar linhas longas, com mais que 76 linhas de texto -fora que as quebras de linhas têm que ser normalizadas -vamos ver o que dá isso aqui diff --git a/build/premake/premake5/binmodules/luasocket/gem/t2gt.qp b/build/premake/premake5/binmodules/luasocket/gem/t2gt.qp deleted file mode 100644 index d63d894edb..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t2gt.qp +++ /dev/null @@ -1,5 +0,0 @@ -esse =E9 um texto com acentos -quoted-printable tem que quebrar linhas longas, com mais que 76 linhas de t= -exto -fora que as quebras de linhas t=EAm que ser normalizadas -vamos ver o que d=E1 isso aqui diff --git a/build/premake/premake5/binmodules/luasocket/gem/t3.lua b/build/premake/premake5/binmodules/luasocket/gem/t3.lua deleted file mode 100644 index 4bb98ba581..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t3.lua +++ /dev/null @@ -1,25 +0,0 @@ -source = {} -sink = {} -pump = {} -filter = {} - --- source.file -dofile("ex5.lua") - --- sink.table -dofile("ex7.lua") - --- sink.chain -require"ltn12" -sink.chain = ltn12.sink.chain - --- normalize -require"gem" -eol = gem.eol -dofile("ex2.lua") - --- pump.all -dofile("ex10.lua") - --- run test -dofile("ex8.lua") diff --git a/build/premake/premake5/binmodules/luasocket/gem/t4.lua b/build/premake/premake5/binmodules/luasocket/gem/t4.lua deleted file mode 100644 index 8b8071c2bd..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t4.lua +++ /dev/null @@ -1,10 +0,0 @@ -source = {} -sink = {} -pump = {} -filter = {} - --- source.file -dofile("ex5.lua") - --- run test -dofile("ex9.lua") diff --git a/build/premake/premake5/binmodules/luasocket/gem/t5.lua b/build/premake/premake5/binmodules/luasocket/gem/t5.lua deleted file mode 100644 index 7c569eadd8..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/t5.lua +++ /dev/null @@ -1,30 +0,0 @@ -source = {} -sink = {} -pump = {} -filter = {} - --- source.chain -dofile("ex6.lua") - --- source.file -dofile("ex5.lua") - --- encode -require"mime" -encode = mime.encode - --- sink.chain -require"ltn12" -sink.chain = ltn12.sink.chain - --- wrap -wrap = mime.wrap - --- sink.file -sink.file = ltn12.sink.file - --- pump.all -dofile("ex10.lua") - --- run test -dofile("ex11.lua") diff --git a/build/premake/premake5/binmodules/luasocket/gem/test.lua b/build/premake/premake5/binmodules/luasocket/gem/test.lua deleted file mode 100644 index a937b9a1f0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/gem/test.lua +++ /dev/null @@ -1,46 +0,0 @@ -function readfile(n) - local f = io.open(n, "rb") - local s = f:read("*a") - f:close() - return s -end - -lf = readfile("t1lf.txt") -os.remove("t1crlf.txt") -os.execute("lua t1.lua < t1lf.txt > t1crlf.txt") -crlf = readfile("t1crlf.txt") -assert(crlf == string.gsub(lf, "\010", "\013\010"), "broken") - -gt = readfile("t2gt.qp") -os.remove("t2.qp") -os.execute("lua t2.lua < t2.txt > t2.qp") -t2 = readfile("t2.qp") -assert(gt == t2, "broken") - -os.remove("t1crlf.txt") -os.execute("lua t3.lua < t1lf.txt > t1crlf.txt") -crlf = readfile("t1crlf.txt") -assert(crlf == string.gsub(lf, "\010", "\013\010"), "broken") - -t = readfile("test.lua") -os.execute("lua t4.lua < test.lua > t") -t2 = readfile("t") -assert(t == t2, "broken") - -os.remove("output.b64") -gt = readfile("gt.b64") -os.execute("lua t5.lua") -t5 = readfile("output.b64") -assert(gt == t5, "failed") - -print("1 2 5 6 10 passed") -print("2 3 4 5 6 10 passed") -print("2 5 6 7 8 10 passed") -print("5 9 passed") -print("5 6 10 11 passed") - -os.remove("t") -os.remove("t2.qp") -os.remove("t1crlf.txt") -os.remove("t11.b64") -os.remove("output.b64") diff --git a/build/premake/premake5/binmodules/luasocket/linux.cmd b/build/premake/premake5/binmodules/luasocket/linux.cmd deleted file mode 100644 index 6c6636b8f7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/linux.cmd +++ /dev/null @@ -1 +0,0 @@ -make PLAT=linux DEBUG=DEBUG LUAINC_linux_base=/home/diego/build/ubuntu/include LUAPREFIX_linux=/home/diego/build/ubuntu diff --git a/build/premake/premake5/binmodules/luasocket/logo.ps b/build/premake/premake5/binmodules/luasocket/logo.ps deleted file mode 100644 index 8b5809ab7f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/logo.ps +++ /dev/null @@ -1,210 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: Lua logo -%%Creator: lua@tecgraf.puc-rio.br -%%CreationDate: Wed Nov 29 19:04:04 EDT 2000 -%%BoundingBox: -45 0 1035 1080 -%%Pages: 1 -%%EndComments -%%EndProlog - -%------------------------------------------------------------------------------ -% -% Copyright (C) 1998-2000. All rights reserved. -% Graphic design by Alexandre Nakonechny (nako@openlink.com.br). -% PostScript programming by the Lua team (lua@tecgraf.puc-rio.br). -% -% Permission is hereby granted, without written agreement and without license -% or royalty fees, to use, copy, and distribute this logo for any purpose, -% including commercial applications, subject to the following conditions: -% -% * The origin of this logo must not be misrepresented; you must not -% claim that you drew the original logo. We recommend that you give credit -% to the graphics designer in all printed matter that includes the logo. -% -% * The only modification you can make is to adapt the orbiting text to -% your product name. -% -% * The logo can be used in any scale as long as the relative proportions -% of its elements are maintained. -% -%------------------------------------------------------------------------------ - -/LABEL (tekcoS) def - -%-- DO NOT CHANGE ANYTHING BELOW THIS LINE ------------------------------------ - -/PLANETCOLOR {0 0 0.5 setrgbcolor} bind def -/HOLECOLOR {1.0 setgray} bind def -/ORBITCOLOR {0.5 setgray} bind def -/LOGOFONT {/Helvetica 0.90} def -/LABELFONT {/Helvetica 0.36} def - -%------------------------------------------------------------------------------ - -/MOONCOLOR {PLANETCOLOR} bind def -/LOGOCOLOR {HOLECOLOR} bind def -/LABELCOLOR {ORBITCOLOR} bind def - -/LABELANGLE 325 def -/LOGO (Lua) def - -/DASHANGLE 10 def -/HALFDASHANGLE DASHANGLE 2 div def - -% moon radius. planet radius is 1. -/r 1 2 sqrt 2 div sub def - -/D {0 360 arc fill} bind def -/F {exch findfont exch scalefont setfont} bind def - -% place it nicely on the paper -/RESOLUTION 1024 def -RESOLUTION 2 div dup translate -RESOLUTION 2 div 2 sqrt div dup scale - -%-------------------------------------------------------------------- planet -- -PLANETCOLOR -0 0 1 D - -%---------------------------------------------------------------------- hole -- -HOLECOLOR -1 2 r mul sub dup r D - -%---------------------------------------------------------------------- moon -- -MOONCOLOR -1 1 r D - -%---------------------------------------------------------------------- logo -- -LOGOCOLOR -LOGOFONT -F -LOGO stringwidth pop 2 div neg --0.5 moveto -LOGO show - -%------------------------------------------------------------------------------ -% based on code from Blue Book Program 10, on pages 167--169 -% available at ftp://ftp.adobe.com/pub/adobe/displaypostscript/bluebook.shar - -% str ptsize centerangle radius outsidecircletext -- -/outsidecircletext { - circtextdict begin - /radius exch def - /centerangle exch def - /ptsize exch def - /str exch def - - gsave - str radius ptsize findhalfangle - centerangle - add rotate - str - { /charcode exch def - ( ) dup 0 charcode put outsideplacechar - } forall - - grestore - end -} def - -% string radius ptsize findhalfangle halfangle -/findhalfangle { - 4 div add - exch - stringwidth pop 2 div - exch - 2 mul 3.1415926535 mul div 360 mul -} def - -/circtextdict 16 dict def -circtextdict begin - - /outsideplacechar { - /char exch def - /halfangle char radius ptsize findhalfangle def - gsave - halfangle neg rotate - 1.4 0 translate - 90 rotate - char stringwidth pop 2 div neg 0 moveto - char show - grestore - halfangle 2 mul neg rotate - } def - -end - -%--------------------------------------------------------------------- label -- -LABELFONT -F - -/LABELSIZE LABELFONT exch pop def -/LABELRADIUS LABELSIZE 3 div 1 r add sub neg 1.02 mul def - - -/HALFANGLE - LABEL LABELRADIUS LABELSIZE findhalfangle - HALFDASHANGLE div ceiling HALFDASHANGLE mul -def - -/LABELANGLE - 60 LABELANGLE HALFANGLE sub - lt - { - HALFANGLE - HALFANGLE DASHANGLE div floor DASHANGLE mul - eq - {LABELANGLE DASHANGLE div ceiling DASHANGLE mul} - {LABELANGLE HALFDASHANGLE sub DASHANGLE div round DASHANGLE mul HALFDASHANGLE add} - ifelse - } - {HALFANGLE 60 add} - ifelse -def - -LABELCOLOR -LABEL -LABELSIZE -LABELANGLE -LABELRADIUS -outsidecircletext - -%--------------------------------------------------------------------- orbit -- -ORBITCOLOR -0.03 setlinewidth -[1 r add 3.1415926535 180 div HALFDASHANGLE mul mul] 0 setdash -newpath -0 0 -1 r add -3 copy -30 -LABELANGLE HALFANGLE add -arcn -stroke -60 -LABELANGLE HALFANGLE sub -2 copy -lt {arc stroke} {4 {pop} repeat} ifelse - -%------------------------------------------------------------------ copyright -- -/COPYRIGHT -(Graphic design by A. Nakonechny. Copyright (c) 1998, All rights reserved.) -def - -LABELCOLOR -LOGOFONT -32 div -F -2 sqrt 0.99 mul -dup -neg -moveto -COPYRIGHT -90 rotate -%show - -%---------------------------------------------------------------------- done -- -showpage - -%%Trailer -%%EOF diff --git a/build/premake/premake5/binmodules/luasocket/ltn012.wiki b/build/premake/premake5/binmodules/luasocket/ltn012.wiki deleted file mode 100644 index 96b13ae492..0000000000 --- a/build/premake/premake5/binmodules/luasocket/ltn012.wiki +++ /dev/null @@ -1,393 +0,0 @@ -===Filters, sources and sinks: design, motivation and examples=== -==or Functional programming for the rest of us== -by DiegoNehab - -{{{ - -}}} - -===Abstract=== -Certain operations can be implemented in the form of filters. A filter is a function that processes data received in consecutive function calls, returning partial results chunk by chunk. Examples of operations that can be implemented as filters include the end-of-line normalization for text, Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing, and there are many others. Filters become even more powerful when we allow them to be chained together to create composite filters. Filters can be seen as middle nodes in a chain of data transformations. Sources an sinks are the corresponding end points of these chains. A source is a function that produces data, chunk by chunk, and a sink is a function that takes data, chunk by chunk. In this technical note, we define an elegant interface for filters, sources, sinks and chaining. We evolve our interface progressively, until we reach a high degree of generality. We discuss difficulties that arise during the implementation of this interface and we provide solutions and examples. - -===Introduction=== - -Applications sometimes have too much information to process to fit in memory and are thus forced to process data in smaller parts. Even when there is enough memory, processing all the data atomically may take long enough to frustrate a user that wants to interact with the application. Furthermore, complex transformations can often be defined as series of simpler operations. Several different complex transformations might share the same simpler operations, so that an uniform interface to combine them is desirable. The following concepts constitute our solution to these problems. - -''Filters'' are functions that accept successive chunks of input, and produce successive chunks of output. Furthermore, the result of concatenating all the output data is the same as the result of applying the filter over the concatenation of the input data. As a consequence, boundaries are irrelevant: filters have to handle input data split arbitrarily by the user. - -A ''chain'' is a function that combines the effect of two (or more) other functions, but whose interface is indistinguishable from the interface of one of its components. Thus, a chained filter can be used wherever an atomic filter can be used. However, its effect on data is the combined effect of its component filters. Note that, as a consequence, chains can be chained themselves to create arbitrarily complex operations that can be used just like atomic operations. - -Filters can be seen as internal nodes in a network through which data flows, potentially being transformed along its way. Chains connect these nodes together. To complete the picture, we need ''sources'' and ''sinks'' as initial and final nodes of the network, respectively. Less abstractly, a source is a function that produces new data every time it is called. On the other hand, sinks are functions that give a final destination to the data they receive. Naturally, sources and sinks can be chained with filters. - -Finally, filters, chains, sources, and sinks are all passive entities: they need to be repeatedly called in order for something to happen. ''Pumps'' provide the driving force that pushes data through the network, from a source to a sink. - - Hopefully, these concepts will become clear with examples. In the following sections, we start with simplified interfaces, which we improve several times until we can find no obvious shortcomings. The evolution we present is not contrived: it follows the steps we followed ourselves as we consolidated our understanding of these concepts. - -== A concrete example == - -Some data transformations are easier to implement as filters than others. Examples of operations that can be implemented as filters include the end-of-line normalization for text, the Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing, and many others. Let's use the end-of-line normalization as an example to define our initial filter interface. We later discuss why the implementation might not be trivial. - -Assume we are given text in an unknown end-of-line convention (including possibly mixed conventions) out of the commonly found Unix (LF), Mac OS (CR), and DOS (CRLF) conventions. We would like to be able to write code like the following: - {{{ -input = source.chain(source.file(io.stdin), normalize("\r\n")) -output = sink.file(io.stdout) -pump(input, output) -}}} - -This program should read data from the standard input stream and normalize the end-of-line markers to the canonic CRLF marker defined by the MIME standard, finally sending the results to the standard output stream. For that, we use a ''file source'' to produce data from standard input, and chain it with a filter that normalizes the data. The pump then repeatedly gets data from the source, and moves it to the ''file sink'' that sends it to standard output. - -To make the discussion even more concrete, we start by discussing the implementation of the normalization filter. The {{normalize}} ''factory'' is a function that creates such a filter. Our initial filter interface is as follows: the filter receives a chunk of input data, and returns a chunk of processed data. When there is no more input data, the user notifies the filter by invoking it with a {{nil}} chunk. The filter then returns the final chunk of processed data. - -Although the interface is extremely simple, the implementation doesn't seem so obvious. Any filter respecting this interface needs to keep some kind of context between calls. This is because chunks can be broken between the CR and LF characters marking the end of a line. This need for context storage is what motivates the use of factories: each time the factory is called, it returns a filter with its own context so that we can have several independent filters being used at the same time. For the normalization filter, we know that the obvious solution (i.e. concatenating all the input into the context before producing any output) is not good enough, so we will have to find another way. - -We will break the implementation in two parts: a low-level filter, and a factory of high-level filters. The low-level filter will be implemented in C and will not carry any context between function calls. The high-level filter factory, implemented in Lua, will create and return a high-level filter that keeps whatever context the low-level filter needs, but isolates the user from its internal details. That way, we take advantage of C's efficiency to perform the dirty work, and take advantage of Lua's simplicity for the bookkeeping. - -==The Lua part of the implementation== - -Below is the implementation of the factory of high-level end-of-line normalization filters: - {{{ -function filter.cycle(low, ctx, extra) - return function(chunk) - local ret - ret, ctx = low(ctx, chunk, extra) - return ret - end -end - -function normalize(marker) - return cycle(eol, 0, marker) -end -}}} - -The {{normalize}} factory simply calls a more generic factory, the {{cycle}} factory. This factory receives a low-level filter, an initial context and some extra value and returns the corresponding high-level filter. Each time the high level filer is called with a new chunk, it calls the low-level filter passing the previous context, the new chunk and the extra argument. The low-level filter produces the chunk of processed data and a new context. Finally, the high-level filter updates its internal context and returns the processed chunk of data to the user. It is the low-level filter that does all the work. Notice that this implementation takes advantage of the Lua 5.0 lexical scoping rules to store the context locally, between function calls. - -Moving to the low-level filter, we notice there is no perfect solution to the end-of-line marker normalization problem itself. The difficulty comes from an inherent ambiguity on the definition of empty lines within mixed input. However, the following solution works well for any consistent input, as well as for non-empty lines in mixed input. It also does a reasonable job with empty lines and serves as a good example of how to implement a low-level filter. - -Here is what we do: CR and LF are considered candidates for line break. We issue ''one'' end-of-line line marker if one of the candidates is seen alone, or followed by a ''different'' candidate. That is, CR CR and LF LF issue two end of line markers each, but CR LF and LF CR issue only one marker. This idea takes care of Mac OS, Mac OS X, VMS and Unix, DOS and MIME, as well as probably other more obscure conventions. - -==The C part of the implementation== - -The low-level filter is divided into two simple functions. The inner function actually does the conversion. It takes each input character in turn, deciding what to output and how to modify the context. The context tells if the last character seen was a candidate and, if so, which candidate it was. - {{{ -#define candidate(c) (c == CR || c == LF) -static int process(int c, int last, const char *marker, luaL_Buffer *buffer) { - if (candidate(c)) { - if (candidate(last)) { - if (c == last) luaL_addstring(buffer, marker); - return 0; - } else { - luaL_addstring(buffer, marker); - return c; - } - } else { - luaL_putchar(buffer, c); - return 0; - } -} -}}} - -The inner function makes use of Lua's auxiliary library's buffer interface for its efficiency and ease of use. The outer function simply interfaces with Lua. It receives the context and the input chunk (as well as an optional end-of-line marker), and returns the transformed output and the new context. - {{{ -static int eol(lua_State *L) { - int ctx = luaL_checkint(L, 1); - size_t isize = 0; - const char *input = luaL_optlstring(L, 2, NULL, &isize); - const char *last = input + isize; - const char *marker = luaL_optstring(L, 3, CRLF); - luaL_Buffer buffer; - luaL_buffinit(L, &buffer); - if (!input) { - lua_pushnil(L); - lua_pushnumber(L, 0); - return 2; - } - while (input < last) - ctx = process(*input++, ctx, marker, &buffer); - luaL_pushresult(&buffer); - lua_pushnumber(L, ctx); - return 2; -} -}}} - -Notice that if the input chunk is {{nil}}, the operation is considered to be finished. In that case, the loop will not execute a single time and the context is reset to the initial state. This allows the filter to be reused indefinitely. It is a good idea to write filters like this, when possible. - -Besides the end-of-line normalization filter shown above, many other filters can be implemented with the same ideas. Examples include Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing etc. The challenging part is to decide what will be the context. For line breaking, for instance, it could be the number of bytes left in the current line. For Base64 encoding, it could be the bytes that remain in the division of the input into 3-byte atoms. - -===Chaining=== - -Filters become more powerful when the concept of chaining is introduced. Suppose you have a filter for Quoted-Printable encoding and you want to encode some text. According to the standard, the text has to be normalized into its canonic form prior to encoding. A nice interface that simplifies this task is a factory that creates a composite filter that passes data through multiple filters, but that can be used wherever a primitive filter is used. - {{{ -local function chain2(f1, f2) - return function(chunk) - local ret = f2(f1(chunk)) - if chunk then return ret - else return ret .. f2() end - end -end - -function filter.chain(...) - local arg = {...} - local f = arg[1] - for i = 2, #arg do - f = chain2(f, arg[i]) - end - return f -end - -local chain = filter.chain(normalize("\r\n"), encode("quoted-printable")) -while 1 do - local chunk = io.read(2048) - io.write(chain(chunk)) - if not chunk then break end -end -}}} - -The chaining factory is very simple. All it does is return a function that passes data through all filters and returns the result to the user. It uses the simpler auxiliary function that knows how to chain two filters together. In the auxiliary function, special care must be taken if the chunk is final. This is because the final chunk notification has to be pushed through both filters in turn. Thanks to the chain factory, it is easy to perform the Quoted-Printable conversion, as the above example shows. - -===Sources, sinks, and pumps=== - -As we noted in the introduction, the filters we introduced so far act as the internal nodes in a network of transformations. Information flows from node to node (or rather from one filter to the next) and is transformed on its way out. Chaining filters together is the way we found to connect nodes in the network. But what about the end nodes? In the beginning of the network, we need a node that provides the data, a source. In the end of the network, we need a node that takes in the data, a sink. - -==Sources== - -We start with two simple sources. The first is the {{empty}} source: It simply returns no data, possibly returning an error message. The second is the {{file}} source, which produces the contents of a file in a chunk by chunk fashion, closing the file handle when done. - {{{ -function source.empty(err) - return function() - return nil, err - end -end - -function source.file(handle, io_err) - if handle then - return function() - local chunk = handle:read(2048) - if not chunk then handle:close() end - return chunk - end - else return source.empty(io_err or "unable to open file") end -end -}}} - -A source returns the next chunk of data each time it is called. When there is no more data, it just returns {{nil}}. If there is an error, the source can inform the caller by returning {{nil}} followed by an error message. Adrian Sietsma noticed that, although not on purpose, the interface for sources is compatible with the idea of iterators in Lua 5.0. That is, a data source can be nicely used in conjunction with {{for}} loops. Using our file source as an iterator, we can rewrite our first example: - {{{ -local process = normalize("\r\n") -for chunk in source.file(io.stdin) do - io.write(process(chunk)) -end -io.write(process(nil)) -}}} - -Notice that the last call to the filter obtains the last chunk of processed data. The loop terminates when the source returns {{nil}} and therefore we need that final call outside of the loop. - -==Maintaining state between calls== - -It is often the case that a source needs to change its behavior after some event. One simple example would be a file source that wants to make sure it returns {{nil}} regardless of how many times it is called after the end of file, avoiding attempts to read past the end of the file. Another example would be a source that returns the contents of several files, as if they were concatenated, moving from one file to the next until the end of the last file is reached. - -One way to implement this kind of source is to have the factory declare extra state variables that the source can use via lexical scoping. Our file source could set the file handle itself to {{nil}} when it detects the end-of-file. Then, every time the source is called, it could check if the handle is still valid and act accordingly: - {{{ -function source.file(handle, io_err) - if handle then - return function() - if not handle then return nil end - local chunk = handle:read(2048) - if not chunk then - handle:close() - handle = nil - end - return chunk - end - else return source.empty(io_err or "unable to open file") end -end -}}} - -Another way to implement this behavior involves a change in the source interface to makes it more flexible. Let's allow a source to return a second value, besides the next chunk of data. If the returned chunk is {{nil}}, the extra return value tells us what happened. A second {{nil}} means that there is just no more data and the source is empty. Any other value is considered to be an error message. On the other hand, if the chunk was ''not'' {{nil}}, the second return value tells us whether the source wants to be replaced. If it is {{nil}}, we should proceed using the same source. Otherwise it has to be another source, which we have to use from then on, to get the remaining data. - -This extra freedom is good for someone writing a source function, but it is a pain for those that have to use it. Fortunately, given one of these ''fancy'' sources, we can transform it into a simple source that never needs to be replaced, using the following factory. - {{{ -function source.simplify(src) - return function() - local chunk, err_or_new = src() - src = err_or_new or src - if not chunk then return nil, err_or_new - else return chunk end - end -end -}}} - -The simplification factory allows us to write fancy sources and use them as if they were simple. Therefore, our next functions will only produce simple sources, and functions that take sources will assume they are simple. - -Going back to our file source, the extended interface allows for a more elegant implementation. The new source just asks to be replaced by an empty source as soon as there is no more data. There is no repeated checking of the handle. To make things simpler to the user, the factory itself simplifies the the fancy file source before returning it to the user: - {{{ -function source.file(handle, io_err) - if handle then - return source.simplify(function() - local chunk = handle:read(2048) - if not chunk then - handle:close() - return "", source.empty() - end - return chunk - end) - else return source.empty(io_err or "unable to open file") end -end -}}} - -We can make these ideas even more powerful if we use a new feature of Lua 5.0: coroutines. Coroutines suffer from a great lack of advertisement, and I am going to play my part here. Just like lexical scoping, coroutines taste odd at first, but once you get used with the concept, it can save your day. I have to admit that using coroutines to implement our file source would be overkill, so let's implement a concatenated source factory instead. - {{{ -function source.cat(...) - local arg = {...} - local co = coroutine.create(function() - local i = 1 - while i <= #arg do - local chunk, err = arg[i]() - if chunk then coroutine.yield(chunk) - elseif err then return nil, err - else i = i + 1 end - end - end) - return function() - return shift(coroutine.resume(co)) - end -end -}}} - -The factory creates two functions. The first is an auxiliary that does all the work, in the form of a coroutine. It reads a chunk from one of the sources. If the chunk is {{nil}}, it moves to the next source, otherwise it just yields returning the chunk. When it is resumed, it continues from where it stopped and tries to read the next chunk. The second function is the source itself, and just resumes the execution of the auxiliary coroutine, returning to the user whatever chunks it returns (skipping the first result that tells us if the coroutine terminated). Imagine writing the same function without coroutines and you will notice the simplicity of this implementation. We will use coroutines again when we make the filter interface more powerful. - -==Chaining Sources== - -What does it mean to chain a source with a filter? The most useful interpretation is that the combined source-filter is a new source that produces data and passes it through the filter before returning it. Here is a factory that does it: - {{{ -function source.chain(src, f) - return source.simplify(function() - local chunk, err = src() - if not chunk then return f(nil), source.empty(err) - else return f(chunk) end - end) -end -}}} - -Our motivating example in the introduction chains a source with a filter. The idea of chaining a source with a filter is useful when one thinks about functions that might get their input data from a source. By chaining a simple source with one or more filters, the same function can be provided with filtered data even though it is unaware of the filtering that is happening behind its back. - -==Sinks== - -Just as we defined an interface for an initial source of data, we can also define an interface for a final destination of data. We call any function respecting that interface a ''sink''. Below are two simple factories that return sinks. The table factory creates a sink that stores all obtained data into a table. The data can later be efficiently concatenated into a single string with the {{table.concat}} library function. As another example, we introduce the {{null}} sink: A sink that simply discards the data it receives. - {{{ -function sink.table(t) - t = t or {} - local f = function(chunk, err) - if chunk then table.insert(t, chunk) end - return 1 - end - return f, t -end - -local function null() - return 1 -end - -function sink.null() - return null -end -}}} - -Sinks receive consecutive chunks of data, until the end of data is notified with a {{nil}} chunk. An error is notified by an extra argument giving an error message after the {{nil}} chunk. If a sink detects an error itself and wishes not to be called again, it should return {{nil}}, optionally followed by an error message. A return value that is not {{nil}} means the source will accept more data. Finally, just as sources can choose to be replaced, so can sinks, following the same interface. Once again, it is easy to implement a {{sink.simplify}} factory that transforms a fancy sink into a simple sink. - -As an example, let's create a source that reads from the standard input, then chain it with a filter that normalizes the end-of-line convention and let's use a sink to place all data into a table, printing the result in the end. - {{{ -local load = source.chain(source.file(io.stdin), normalize("\r\n")) -local store, t = sink.table() -while 1 do - local chunk = load() - store(chunk) - if not chunk then break end -end -print(table.concat(t)) -}}} - -Again, just as we created a factory that produces a chained source-filter from a source and a filter, it is easy to create a factory that produces a new sink given a sink and a filter. The new sink passes all data it receives through the filter before handing it in to the original sink. Here is the implementation: - {{{ -function sink.chain(f, snk) - return function(chunk, err) - local r, e = snk(f(chunk)) - if not r then return nil, e end - if not chunk then return snk(nil, err) end - return 1 - end -end -}}} - -==Pumps== - -There is a while loop that has been around for too long in our examples. It's always there because everything that we designed so far is passive. Sources, sinks, filters: None of them will do anything on their own. The operation of pumping all data a source can provide into a sink is so common that we will provide a couple helper functions to do that for us. - {{{ -function pump.step(src, snk) - local chunk, src_err = src() - local ret, snk_err = snk(chunk, src_err) - return chunk and ret and not src_err and not snk_err, src_err or snk_err -end - -function pump.all(src, snk, step) - step = step or pump.step - while true do - local ret, err = step(src, snk) - if not ret then return not err, err end - end -end -}}} - -The {{pump.step}} function moves one chunk of data from the source to the sink. The {{pump.all}} function takes an optional {{step}} function and uses it to pump all the data from the source to the sink. We can now use everything we have to write a program that reads a binary file from disk and stores it in another file, after encoding it to the Base64 transfer content encoding: - {{{ -local load = source.chain( - source.file(io.open("input.bin", "rb")), - encode("base64") -) -local store = sink.chain( - wrap(76), - sink.file(io.open("output.b64", "w")), -) -pump.all(load, store) -}}} - -The way we split the filters here is not intuitive, on purpose. Alternatively, we could have chained the Base64 encode filter and the line-wrap filter together, and then chain the resulting filter with either the file source or the file sink. It doesn't really matter. - -===One last important change=== - -Turns out we still have a problem. When David Burgess was writing his gzip filter, he noticed that the decompression filter can explode a small input chunk into a huge amount of data. Although we wished we could ignore this problem, we soon agreed we couldn't. The only solution is to allow filters to return partial results, and that is what we chose to do. After invoking the filter to pass input data, the user now has to loop invoking the filter to find out if it has more output data to return. Note that these extra calls can't pass more data to the filter. - -More specifically, after passing a chunk of input data to a filter and collecting the first chunk of output data, the user invokes the filter repeatedly, passing the empty string, to get extra output chunks. When the filter itself returns an empty string, the user knows there is no more output data, and can proceed to pass the next input chunk. In the end, after the user passes a {{nil}} notifying the filter that there is no more input data, the filter might still have produced too much output data to return in a single chunk. The user has to loop again, this time passing {{nil}} each time, until the filter itself returns {{nil}} to notify the user it is finally done. - -Most filters won't need this extra freedom. Fortunately, the new filter interface is easy to implement. In fact, the end-of-line translation filter we created in the introduction already conforms to it. On the other hand, the chaining function becomes much more complicated. If it wasn't for coroutines, I wouldn't be happy to implement it. Let me know if you can find a simpler implementation that does not use coroutines! - {{{ -local function chain2(f1, f2) - local co = coroutine.create(function(chunk) - while true do - local filtered1 = f1(chunk) - local filtered2 = f2(filtered1) - local done2 = filtered1 and "" - while true do - if filtered2 == "" or filtered2 == nil then break end - coroutine.yield(filtered2) - filtered2 = f2(done2) - end - if filtered1 == "" then chunk = coroutine.yield(filtered1) - elseif filtered1 == nil then return nil - else chunk = chunk and "" end - end - end) - return function(chunk) - local _, res = coroutine.resume(co, chunk) - return res - end -end -}}} - -Chaining sources also becomes more complicated, but a similar solution is possible with coroutines. Chaining sinks is just as simple as it has always been. Interestingly, these modifications do not have a measurable negative impact in the the performance of filters that didn't need the added flexibility. They do severely improve the efficiency of filters like the gzip filter, though, and that is why we are keeping them. - -===Final considerations=== - -These ideas were created during the development of {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket] 2.0, and are available as the LTN12 module. As a result, {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket] implementation was greatly simplified and became much more powerful. The MIME module is especially integrated to LTN12 and provides many other filters. We felt these concepts deserved to be made public even to those that don't care about {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket], hence the LTN. - -One extra application that deserves mentioning makes use of an identity filter. Suppose you want to provide some feedback to the user while a file is being downloaded into a sink. Chaining the sink with an identity filter (a filter that simply returns the received data unaltered), you can update a progress counter on the fly. The original sink doesn't have to be modified. Another interesting idea is that of a T sink: A sink that sends data to two other sinks. In summary, there appears to be enough room for many other interesting ideas. - -In this technical note we introduced filters, sources, sinks, and pumps. These are useful tools for data processing in general. Sources provide a simple abstraction for data acquisition. Sinks provide an abstraction for final data destinations. Filters define an interface for data transformations. The chaining of filters, sources and sinks provides an elegant way to create arbitrarily complex data transformation from simpler transformations. Pumps just put the machinery to work. diff --git a/build/premake/premake5/binmodules/luasocket/ltn013.wiki b/build/premake/premake5/binmodules/luasocket/ltn013.wiki deleted file mode 100644 index a62242403c..0000000000 --- a/build/premake/premake5/binmodules/luasocket/ltn013.wiki +++ /dev/null @@ -1,194 +0,0 @@ -===Using finalized exceptions=== -==or How to get rid of all those if statements== -by DiegoNehab - -{{{ - -}}} - -===Abstract=== -This little LTN describes a simple exception scheme that greatly simplifies error checking in Lua programs. All the needed functionality ships standard with Lua, but is hidden between the {{assert}} and {{pcall}} functions. To make it more evident, we stick to a convenient standard (you probably already use anyways) for Lua function return values, and define two very simple helper functions (either in C or in Lua itself). - -===Introduction=== - -Most Lua functions return {{nil}} in case of error, followed by a message describing the error. If you don't use this convention, you probably have good reasons. Hopefully, after reading on, you will realize your reasons are not good enough. - -If you are like me, you hate error checking. Most nice little code snippets that look beautiful when you first write them lose some of their charm when you add all that error checking code. Yet, error checking is as important as the rest of the code. How sad. - -Even if you stick to a return convention, any complex task involving several function calls makes error checking both boring and error-prone (do you see the ''error'' below?) - {{{ -function task(arg1, arg2, ...) - local ret1, err = task1(arg1) - if not ret1 then - cleanup1() - return nil, error - end - local ret2, err = task2(arg2) - if not ret then - cleanup2() - return nil, error - end - ... -end -}}} - -The standard {{assert}} function provides an interesting alternative. To use it, simply nest every function call to be error checked with a call to {{assert}}. The {{assert}} function checks the value of its first argument. If it is {{nil}}, {{assert}} throws the second argument as an error message. Otherwise, {{assert}} lets all arguments through as if had not been there. The idea greatly simplifies error checking: - {{{ -function task(arg1, arg2, ...) - local ret1 = assert(task1(arg1)) - local ret2 = assert(task2(arg2)) - ... -end -}}} - -If any task fails, the execution is aborted by {{assert}} and the error message is displayed to the user as the cause of the problem. If no error happens, the task completes as before. There isn't a single {{if}} statement and this is great. However, there are some problems with the idea. - -First, the topmost {{task}} function doesn't respect the protocol followed by the lower-level tasks: It raises an error instead of returning {{nil}} followed by the error messages. Here is where the standard {{pcall}} comes in handy. - {{{ -function xtask(arg1, arg2, ...) - local ret1 = assert(task1(arg1)) - local ret2 = assert(task2(arg2)) - ... -end - -function task(arg1, arg2, ...) - local ok, ret_or_err = pcall(xtask, arg1, arg2, ...) - if ok then return ret_or_err - else return nil, ret_or_err end -end -}}} - -Our new {{task}} function is well behaved. {{Pcall}} catches any error raised by the calls to {{assert}} and returns it after the status code. That way, errors don't get propagated to the user of the high level {{task}} function. - -These are the main ideas for our exception scheme, but there are still a few glitches to fix: - - * Directly using {{pcall}} ruined the simplicity of the code; - * What happened to the cleanup function calls? What if we have to, say, close a file? - * {{Assert}} messes with the error message before raising the error (it adds line number information). - -Fortunately, all these problems are very easy to solve and that's what we do in the following sections. - -== Introducing the {{protect}} factory == - -We used the {{pcall}} function to shield the user from errors that could be raised by the underlying implementation. Instead of directly using {{pcall}} (and thus duplicating code) every time we prefer a factory that does the same job: - {{{ -local function pack(ok, ...) - return ok, {...} -end - -function protect(f) - return function(...) - local ok, ret = pack(pcall(f, ...)) - if ok then return unpack(ret) - else return nil, ret[1] end - end -end -}}} - -The {{protect}} factory receives a function that might raise exceptions and returns a function that respects our return value convention. Now we can rewrite the top-level {{task}} function in a much cleaner way: - {{{ -task = protect(function(arg1, arg2, ...) - local ret1 = assert(task1(arg1)) - local ret2 = assert(task2(arg2)) - ... -end) -}}} - -The Lua implementation of the {{protect}} factory suffers with the creation of tables to hold multiple arguments and return values. It is possible (and easy) to implement the same function in C, without any table creation. - {{{ -static int safecall(lua_State *L) { - lua_pushvalue(L, lua_upvalueindex(1)); - lua_insert(L, 1); - if (lua_pcall(L, lua_gettop(L) - 1, LUA_MULTRET, 0) != 0) { - lua_pushnil(L); - lua_insert(L, 1); - return 2; - } else return lua_gettop(L); -} - -static int protect(lua_State *L) { - lua_pushcclosure(L, safecall, 1); - return 1; -} -}}} - -===The {{newtry}} factory=== - -Let's solve the two remaining issues with a single shot and use a concrete example to illustrate the proposed solution. Suppose you want to write a function to download an HTTP document. You have to connect, send the request and read the reply. Each of these tasks can fail, but if something goes wrong after you connected, you have to close the connection before returning the error message. - {{{ -get = protect(function(host, path) - local c - -- create a try function with a finalizer to close the socket - local try = newtry(function() - if c then c:close() end - end) - -- connect and send request - c = try(connect(host, 80)) - try(c:send("GET " .. path .. " HTTP/1.0\r\n\r\n")) - -- get headers - local h = {} - while 1 do - l = try(c:receive()) - if l == "" then break end - table.insert(h, l) - end - -- get body - local b = try(c:receive("*a")) - c:close() - return b, h -end) -}}} - -The {{newtry}} factory returns a function that works just like {{assert}}. The differences are that the {{try}} function doesn't mess with the error message and it calls an optional ''finalizer'' before raising the error. In our example, the finalizer simply closes the socket. - -Even with a simple example like this, we see that the finalized exceptions simplified our life. Let's see what we gain in general, not just in this example: - - * We don't need to declare dummy variables to hold error messages in case any ever shows up; - * We avoid using a variable to hold something that could either be a return value or an error message; - * We didn't have to use several ''if'' statements to check for errors; - * If an error happens, we know our finalizer is going to be invoked automatically; - * Exceptions get propagated, so we don't repeat these ''if'' statements until the error reaches the user. - -Try writing the same function without the tricks we used above and you will see that the code gets ugly. Longer sequences of operations with error checking would get even uglier. So let's implement the {{newtry}} function in Lua: - {{{ -function newtry(f) - return function(...) - if not arg[1] then - if f then f() end - error(arg[2], 0) - else - return ... - end - end -end -}}} - -Again, the implementation suffers from the creation of tables at each function call, so we prefer the C version: - {{{ -static int finalize(lua_State *L) { - if (!lua_toboolean(L, 1)) { - lua_pushvalue(L, lua_upvalueindex(1)); - lua_pcall(L, 0, 0, 0); - lua_settop(L, 2); - lua_error(L); - return 0; - } else return lua_gettop(L); -} - -static int do_nothing(lua_State *L) { - (void) L; - return 0; -} - -static int newtry(lua_State *L) { - lua_settop(L, 1); - if (lua_isnil(L, 1)) - lua_pushcfunction(L, do_nothing); - lua_pushcclosure(L, finalize, 1); - return 1; -} -}}} - -===Final considerations=== - -The {{protect}} and {{newtry}} functions saved a ''lot'' of work in the implementation of {{LuaSocket}}[http://www.tecgraf.puc-rio.br/luasocket]. The size of some modules was cut in half by the these ideas. It's true the scheme is not as generic as the exception mechanism of programming languages like C++ or Java, but the power/simplicity ratio is favorable and I hope it serves you as well as it served {{LuaSocket}}. diff --git a/build/premake/premake5/binmodules/luasocket/luasocket-scm-0.rockspec b/build/premake/premake5/binmodules/luasocket/luasocket-scm-0.rockspec deleted file mode 100644 index 61bd64519d..0000000000 --- a/build/premake/premake5/binmodules/luasocket/luasocket-scm-0.rockspec +++ /dev/null @@ -1,105 +0,0 @@ -package = "LuaSocket" -version = "scm-0" -source = { - url = "https://github.com/diegonehab/luasocket/archive/master.zip", - dir = "luasocket-master", -} -description = { - summary = "Network support for the Lua language", - detailed = [[ - LuaSocket is a Lua extension library that is composed by two parts: a C core - that provides support for the TCP and UDP transport layers, and a set of Lua - modules that add support for functionality commonly needed by applications - that deal with the Internet. - ]], - homepage = "http://luaforge.net/projects/luasocket/", - license = "MIT" -} -dependencies = { - "lua >= 5.1" -} - -local function make_plat(plat) - local defines = { - unix = { - "LUASOCKET_DEBUG", - "LUASOCKET_API=__attribute__((visibility(\"default\")))", - "UNIX_API=__attribute__((visibility(\"default\")))", - "MIME_API=__attribute__((visibility(\"default\")))" - }, - macosx = { - "LUASOCKET_DEBUG", - "UNIX_HAS_SUN_LEN", - "LUASOCKET_API=__attribute__((visibility(\"default\")))", - "UNIX_API=__attribute__((visibility(\"default\")))", - "MIME_API=__attribute__((visibility(\"default\")))" - }, - win32 = { - "LUASOCKET_DEBUG", - "NDEBUG", - "LUASOCKET_API=__declspec(dllexport)", - "MIME_API=__declspec(dllexport)" - }, - mingw32 = { - "LUASOCKET_DEBUG", - "LUASOCKET_INET_PTON", - "WINVER=0x0501", - "LUASOCKET_API=__declspec(dllexport)", - "MIME_API=__declspec(dllexport)" - } - } - local modules = { - ["socket.core"] = { - sources = { "src/luasocket.c", "src/timeout.c", "src/buffer.c", "src/io.c", "src/auxiliar.c", "src/options.c", "src/inet.c", "src/except.c", "src/select.c", "src/tcp.c", "src/udp.c", "src/compat.c" }, - defines = defines[plat], - incdir = "/src" - }, - ["mime.core"] = { - sources = { "src/mime.c", "src/compat.c" }, - defines = defines[plat], - incdir = "/src" - }, - ["socket.http"] = "src/http.lua", - ["socket.url"] = "src/url.lua", - ["socket.tp"] = "src/tp.lua", - ["socket.ftp"] = "src/ftp.lua", - ["socket.headers"] = "src/headers.lua", - ["socket.smtp"] = "src/smtp.lua", - ltn12 = "src/ltn12.lua", - socket = "src/socket.lua", - mime = "src/mime.lua" - } - if plat == "unix" or plat == "macosx" or plat == "haiku" then - modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" - if plat == "haiku" then - modules["socket.core"].libraries = {"network"} - end - modules["socket.unix"] = { - sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/unix.c" }, - defines = defines[plat], - incdir = "/src" - } - modules["socket.serial"] = { - sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/serial.c" }, - defines = defines[plat], - incdir = "/src" - } - end - if plat == "win32" or plat == "mingw32" then - modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" - modules["socket.core"].libraries = { "ws2_32" } - end - return { modules = modules } -end - -build = { - type = "builtin", - platforms = { - unix = make_plat("unix"), - macosx = make_plat("macosx"), - haiku = make_plat("haiku"), - win32 = make_plat("win32"), - mingw32 = make_plat("mingw32") - }, - copy_directories = { "doc", "samples", "etc", "test" } -} diff --git a/build/premake/premake5/binmodules/luasocket/macosx.cmd b/build/premake/premake5/binmodules/luasocket/macosx.cmd deleted file mode 100644 index 46a07092cb..0000000000 --- a/build/premake/premake5/binmodules/luasocket/macosx.cmd +++ /dev/null @@ -1 +0,0 @@ -make DEBUG=DEBUG PLAT=macosx LUAINC_macosx_base=/Users/diego/build/macosx/include LUAPREFIX_macosx=/Users/diego/build/macosx install-both diff --git a/build/premake/premake5/binmodules/luasocket/main.c b/build/premake/premake5/binmodules/luasocket/main.c deleted file mode 100644 index f2ab5d506e..0000000000 --- a/build/premake/premake5/binmodules/luasocket/main.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -int luaopen_socket_core(lua_State *L); - -#ifdef _WIN32 -__declspec(dllexport) int luaopen_luasocket(lua_State *L) -#else -int luaopen_luasocket(lua_State *L) -#endif -{ - shimInitialize(L); - luaL_requiref(L, "socket", luaopen_socket_core, 1); - lua_pop(L, 1); - return 0; -} diff --git a/build/premake/premake5/binmodules/luasocket/makefile.dist b/build/premake/premake5/binmodules/luasocket/makefile.dist deleted file mode 100644 index 45a8866cde..0000000000 --- a/build/premake/premake5/binmodules/luasocket/makefile.dist +++ /dev/null @@ -1,139 +0,0 @@ -#-------------------------------------------------------------------------- -# Distribution makefile -#-------------------------------------------------------------------------- -DIST = luasocket-3.0-rc1 - -TEST = \ - test/README \ - test/hello.lua \ - test/testclnt.lua \ - test/testsrvr.lua \ - test/testsupport.lua - -SAMPLES = \ - samples/README \ - samples/cddb.lua \ - samples/daytimeclnt.lua \ - samples/echoclnt.lua \ - samples/echosrvr.lua \ - samples/mclisten.lua \ - samples/mcsend.lua \ - samples/listener.lua \ - samples/lpr.lua \ - samples/talker.lua \ - samples/tinyirc.lua - -ETC = \ - etc/README \ - etc/b64.lua \ - etc/check-links.lua \ - etc/check-memory.lua \ - etc/dict.lua \ - etc/dispatch.lua \ - etc/eol.lua \ - etc/forward.lua \ - etc/get.lua \ - etc/lp.lua \ - etc/qp.lua \ - etc/tftp.lua - -SRC = \ - src/makefile \ - src/auxiliar.c \ - src/auxiliar.h \ - src/buffer.c \ - src/buffer.h \ - src/except.c \ - src/except.h \ - src/inet.c \ - src/inet.h \ - src/io.c \ - src/io.h \ - src/luasocket.c \ - src/luasocket.h \ - src/mime.c \ - src/mime.h \ - src/options.c \ - src/options.h \ - src/select.c \ - src/select.h \ - src/socket.h \ - src/tcp.c \ - src/tcp.h \ - src/timeout.c \ - src/timeout.h \ - src/udp.c \ - src/udp.h \ - src/unix.c \ - src/serial.c \ - src/unix.h \ - src/usocket.c \ - src/usocket.h \ - src/wsocket.c \ - src/wsocket.h \ - src/ftp.lua \ - src/http.lua \ - src/ltn12.lua \ - src/mime.lua \ - src/smtp.lua \ - src/socket.lua \ - src/headers.lua \ - src/tp.lua \ - src/url.lua - -MAKE = \ - makefile \ - luasocket.sln \ - luasocket-scm-0.rockspec \ - Lua51.props \ - Lua52.props \ - socket.vcxproj.filters \ - mime.vcxproj.filters \ - socket.vcxproj \ - mime.vcxproj - -DOC = \ - doc/dns.html \ - doc/ftp.html \ - doc/index.html \ - doc/http.html \ - doc/installation.html \ - doc/introduction.html \ - doc/ltn12.html \ - doc/luasocket.png \ - doc/mime.html \ - doc/reference.css \ - doc/reference.html \ - doc/smtp.html \ - doc/socket.html \ - doc/tcp.html \ - doc/udp.html \ - doc/url.html - -dist: - mkdir -p $(DIST) - cp -vf NEW $(DIST) - cp -vf LICENSE $(DIST) - cp -vf README $(DIST) - cp -vf $(MAKE) $(DIST) - - mkdir -p $(DIST)/etc - cp -vf $(ETC) $(DIST)/etc - - mkdir -p $(DIST)/src - cp -vf $(SRC) $(DIST)/src - - mkdir -p $(DIST)/doc - cp -vf $(DOC) $(DIST)/doc - - mkdir -p $(DIST)/samples - cp -vf $(SAMPLES) $(DIST)/samples - - mkdir -p $(DIST)/test - cp -vf $(TEST) $(DIST)/test - - tar -zcvf $(DIST).tar.gz $(DIST) - zip -r $(DIST).zip $(DIST) - -clean: - \rm -rf $(DIST) $(DIST).tar.gz $(DIST).zip diff --git a/build/premake/premake5/binmodules/luasocket/mingw.cmd b/build/premake/premake5/binmodules/luasocket/mingw.cmd deleted file mode 100644 index bf2b7ed2c6..0000000000 --- a/build/premake/premake5/binmodules/luasocket/mingw.cmd +++ /dev/null @@ -1 +0,0 @@ -make PLAT=mingw LUAINC_mingw_base=/home/diego/build/mingw/include LUALIB_mingw_base=/home/diego/build/mingw/bin LUAPREFIX_mingw=/home/diego/build/mingw/bin DEBUG=DEBUG install-both diff --git a/build/premake/premake5/binmodules/luasocket/premake5.lua b/build/premake/premake5/binmodules/luasocket/premake5.lua deleted file mode 100644 index b60be72f6d..0000000000 --- a/build/premake/premake5/binmodules/luasocket/premake5.lua +++ /dev/null @@ -1,51 +0,0 @@ -project "luasocket" - language "C" - kind "SharedLib" - warnings "extra" - - includedirs - { - "../../contrib/lua/src", - "../../contrib/luashim" - } - - links { 'luashim-lib' } - - files - { - "src/*.c", - "src/*.h", - "src/*.lua", - "*.c" - } - - filter "system:windows" - removefiles - { - "src/serial.c", - "src/unixdgram.*", - "src/unixstream.*", - "src/unix.*", - "src/usocket.*", - } - - links { 'ws2_32' } - characterset "MBCS" - - defines { "LUASOCKET_API=__declspec(dllexport)" } - - filter "system:not windows" - removefiles - { - "src/wsocket.*", - } - - pic "on" - - defines { "LUASOCKET_API=__attribute__((visibility(\"default\")))" } - - filter "configurations:Release" - targetdir "../../bin/release" - - filter "configurations:Debug" - targetdir "../../bin/debug" \ No newline at end of file diff --git a/build/premake/premake5/binmodules/luasocket/rockspec/luasocket-3.0rc2-1.rockspec b/build/premake/premake5/binmodules/luasocket/rockspec/luasocket-3.0rc2-1.rockspec deleted file mode 100644 index 8e37a4a3af..0000000000 --- a/build/premake/premake5/binmodules/luasocket/rockspec/luasocket-3.0rc2-1.rockspec +++ /dev/null @@ -1,105 +0,0 @@ -package = "LuaSocket" -version = "3.0rc2-1" -source = { - url = "git://github.com/diegonehab/luasocket.git", - tag = "v3.0-rc2", -} -description = { - summary = "Network support for the Lua language", - detailed = [[ - LuaSocket is a Lua extension library that is composed by two parts: a C core - that provides support for the TCP and UDP transport layers, and a set of Lua - modules that add support for functionality commonly needed by applications - that deal with the Internet. - ]], - homepage = "http://luaforge.net/projects/luasocket/", - license = "MIT" -} -dependencies = { - "lua >= 5.1" -} - -local function make_plat(plat) - local defines = { - unix = { - "LUASOCKET_DEBUG", - "LUASOCKET_API=__attribute__((visibility(\"default\")))", - "UNIX_API=__attribute__((visibility(\"default\")))", - "MIME_API=__attribute__((visibility(\"default\")))" - }, - macosx = { - "LUASOCKET_DEBUG", - "UNIX_HAS_SUN_LEN", - "LUASOCKET_API=__attribute__((visibility(\"default\")))", - "UNIX_API=__attribute__((visibility(\"default\")))", - "MIME_API=__attribute__((visibility(\"default\")))" - }, - win32 = { - "LUASOCKET_DEBUG", - "NDEBUG", - "LUASOCKET_API=__declspec(dllexport)", - "MIME_API=__declspec(dllexport)" - }, - mingw32 = { - "LUASOCKET_DEBUG", - "LUASOCKET_INET_PTON", - "WINVER=0x0501", - "LUASOCKET_API=__declspec(dllexport)", - "MIME_API=__declspec(dllexport)" - } - } - local modules = { - ["socket.core"] = { - sources = { "src/luasocket.c", "src/timeout.c", "src/buffer.c", "src/io.c", "src/auxiliar.c", "src/options.c", "src/inet.c", "src/except.c", "src/select.c", "src/tcp.c", "src/udp.c", "src/compat.c" }, - defines = defines[plat], - incdir = "/src" - }, - ["mime.core"] = { - sources = { "src/mime.c", "src/compat.c" }, - defines = defines[plat], - incdir = "/src" - }, - ["socket.http"] = "src/http.lua", - ["socket.url"] = "src/url.lua", - ["socket.tp"] = "src/tp.lua", - ["socket.ftp"] = "src/ftp.lua", - ["socket.headers"] = "src/headers.lua", - ["socket.smtp"] = "src/smtp.lua", - ltn12 = "src/ltn12.lua", - socket = "src/socket.lua", - mime = "src/mime.lua" - } - if plat == "unix" or plat == "macosx" or plat == "haiku" then - modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/usocket.c" - if plat == "haiku" then - modules["socket.core"].libraries = {"network"} - end - modules["socket.unix"] = { - sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/unix.c" }, - defines = defines[plat], - incdir = "/src" - } - modules["socket.serial"] = { - sources = { "src/buffer.c", "src/auxiliar.c", "src/options.c", "src/timeout.c", "src/io.c", "src/usocket.c", "src/serial.c" }, - defines = defines[plat], - incdir = "/src" - } - end - if plat == "win32" or plat == "mingw32" then - modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" - modules["socket.core"].libraries = { "ws2_32" } - end - return { modules = modules } -end - -build = { - type = "builtin", - platforms = { - unix = make_plat("unix"), - macosx = make_plat("macosx"), - haiku = make_plat("haiku"), - win32 = make_plat("win32"), - mingw32 = make_plat("mingw32") - }, - copy_directories = { "doc", "samples", "etc", "test" } -} diff --git a/build/premake/premake5/binmodules/luasocket/samples/README b/build/premake/premake5/binmodules/luasocket/samples/README deleted file mode 100644 index e63a6f5214..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/README +++ /dev/null @@ -1,50 +0,0 @@ -This directory contains some sample programs using -LuaSocket. This code is not supported. - - listener.lua -- socket to stdout - talker.lua -- stdin to socket - -listener.lua and talker.lua are about the simplest -applications you can write using LuaSocket. Run - - 'lua listener.lua' and 'lua talker.lua' - -on different terminals. Whatever you type on talk.lua will -be printed by listen.lua. - - lpr.lua -- lpr client - -This is a cool program written by David Burgess to print -files using the Line Printer Daemon protocol, widely used in -Unix machines. It uses the lp.lua implementation, in the -etc directory. Just run 'lua lpr.lua -queue=' and the file will print! - - cddb.lua -- CDDB client - -This is the first try on a simple CDDB client. Not really -useful, but one day it might become a module. - - daytimeclnt.lua -- day time client - -Just run the program to retrieve the hour and date in -readable form from any server running an UDP daytime daemon. - - echoclnt.lua -- UDP echo client - echosrvr.lua -- UDP echo server - -These are a UDP echo client/server pair. They work with -other client and servers as well. - - tinyirc.lua -- irc like broadcast server - -This is a simple server that waits simultaneously on two -server sockets for telnet connections. Everything it -receives from the telnet clients is broadcasted to every -other connected client. It tests the select function and -shows how to create a simple server whith LuaSocket. Just -run tinyirc.lua and then open as many telnet connections -as you want to ports 8080 and 8081. - -Good luck, -Diego. diff --git a/build/premake/premake5/binmodules/luasocket/samples/cddb.lua b/build/premake/premake5/binmodules/luasocket/samples/cddb.lua deleted file mode 100644 index 49a187119f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/cddb.lua +++ /dev/null @@ -1,46 +0,0 @@ -local socket = require("socket") -local http = require("socket.http") - -if not arg or not arg[1] or not arg[2] then - print("luasocket cddb.lua []") - os.exit(1) -end - -local server = arg[3] or "http://freedb.freedb.org/~cddb/cddb.cgi" - -function parse(body) - local lines = string.gfind(body, "(.-)\r\n") - local status = lines() - local code, message = socket.skip(2, string.find(status, "(%d%d%d) (.*)")) - if tonumber(code) ~= 210 then - return nil, code, message - end - local data = {} - for l in lines do - local c = string.sub(l, 1, 1) - if c ~= '#' and c ~= '.' then - local key, value = socket.skip(2, string.find(l, "(.-)=(.*)")) - value = string.gsub(value, "\\n", "\n") - value = string.gsub(value, "\\\\", "\\") - value = string.gsub(value, "\\t", "\t") - data[key] = value - end - end - return data, code, message -end - -local host = socket.dns.gethostname() -local query = "%s?cmd=cddb+read+%s+%s&hello=LuaSocket+%s+LuaSocket+2.0&proto=6" -local url = string.format(query, server, arg[1], arg[2], host) -local body, headers, code = http.request(url) - -if code == 200 then - local data, code, error = parse(body) - if not data then - print(error or code) - else - for i,v in pairs(data) do - io.write(i, ': ', v, '\n') - end - end -else print(error) end diff --git a/build/premake/premake5/binmodules/luasocket/samples/daytimeclnt.lua b/build/premake/premake5/binmodules/luasocket/samples/daytimeclnt.lua deleted file mode 100644 index f81e37c488..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/daytimeclnt.lua +++ /dev/null @@ -1,22 +0,0 @@ ------------------------------------------------------------------------------ --- UDP sample: daytime protocol client --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require"socket" -host = host or "127.0.0.1" -port = port or 13 -if arg then - host = arg[1] or host - port = arg[2] or port -end -host = socket.dns.toip(host) -udp = socket.udp() -print("Using host '" ..host.. "' and port " ..port.. "...") -udp:setpeername(host, port) -udp:settimeout(3) -sent, err = udp:send("anything") -if err then print(err) os.exit() end -dgram, err = udp:receive() -if not dgram then print(err) os.exit() end -io.write(dgram) diff --git a/build/premake/premake5/binmodules/luasocket/samples/echoclnt.lua b/build/premake/premake5/binmodules/luasocket/samples/echoclnt.lua deleted file mode 100644 index bb22557a0b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/echoclnt.lua +++ /dev/null @@ -1,23 +0,0 @@ ------------------------------------------------------------------------------ --- UDP sample: echo protocol client --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -host = host or "localhost" -port = port or 7 -if arg then - host = arg[1] or host - port = arg[2] or port -end -host = socket.dns.toip(host) -udp = assert(socket.udp()) -assert(udp:setpeername(host, port)) -print("Using remote host '" ..host.. "' and port " .. port .. "...") -while 1 do - line = io.read() - if not line or line == "" then os.exit() end - assert(udp:send(line)) - dgram = assert(udp:receive()) - print(dgram) -end diff --git a/build/premake/premake5/binmodules/luasocket/samples/echosrvr.lua b/build/premake/premake5/binmodules/luasocket/samples/echosrvr.lua deleted file mode 100644 index ea564e246d..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/echosrvr.lua +++ /dev/null @@ -1,28 +0,0 @@ ------------------------------------------------------------------------------ --- UDP sample: echo protocol server --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -host = host or "127.0.0.1" -port = port or 7 -if arg then - host = arg[1] or host - port = arg[2] or port -end -print("Binding to host '" ..host.. "' and port " ..port.. "...") -udp = assert(socket.udp()) -assert(udp:setsockname(host, port)) -assert(udp:settimeout(5)) -ip, port = udp:getsockname() -assert(ip, port) -print("Waiting packets on " .. ip .. ":" .. port .. "...") -while 1 do - dgram, ip, port = udp:receivefrom() - if dgram then - print("Echoing '" .. dgram .. "' to " .. ip .. ":" .. port) - udp:sendto(dgram, ip, port) - else - print(ip) - end -end diff --git a/build/premake/premake5/binmodules/luasocket/samples/listener.lua b/build/premake/premake5/binmodules/luasocket/samples/listener.lua deleted file mode 100644 index 77db2d539b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/listener.lua +++ /dev/null @@ -1,25 +0,0 @@ ------------------------------------------------------------------------------ --- TCP sample: Little program to dump lines received at a given port --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -host = host or "*" -port = port or 8080 -if arg then - host = arg[1] or host - port = arg[2] or port -end -print("Binding to host '" ..host.. "' and port " ..port.. "...") -s = assert(socket.bind(host, port)) -i, p = s:getsockname() -assert(i, p) -print("Waiting connection from talker on " .. i .. ":" .. p .. "...") -c = assert(s:accept()) -print("Connected. Here is the stuff:") -l, e = c:receive() -while not e do - print(l) - l, e = c:receive() -end -print(e) diff --git a/build/premake/premake5/binmodules/luasocket/samples/lpr.lua b/build/premake/premake5/binmodules/luasocket/samples/lpr.lua deleted file mode 100644 index 49a1dfa9a7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/lpr.lua +++ /dev/null @@ -1,51 +0,0 @@ -local lp = require("socket.lp") - -local function usage() - print('\nUsage: lua lpr.lua [filename] [keyword=val...]\n') - print('Valid keywords are :') - print( - ' host=remote host or IP address (default "localhost")\n' .. - ' queue=remote queue or printer name (default "printer")\n' .. - ' port=remote port number (default 515)\n' .. - ' user=sending user name\n' .. - ' format=["binary" | "text" | "ps" | "pr" | "fortran"] (default "binary")\n' .. - ' banner=true|false\n' .. - ' indent=number of columns to indent\n' .. - ' mail=email of address to notify when print is complete\n' .. - ' title=title to use for "pr" format\n' .. - ' width=width for "text" or "pr" formats\n' .. - ' class=\n' .. - ' job=\n' .. - ' name=\n' .. - ' localbind=true|false\n' - ) - return nil -end - -if not arg or not arg[1] then - return usage() -end - -do - local opt = {} - local pat = "[%s%c%p]*([%w]*)=([\"]?[%w%s_!@#$%%^&*()<>:;]+[\"]?.?)" - for i = 2, #arg, 1 do - string.gsub(arg[i], pat, function(name, value) opt[name] = value end) - end - if not arg[2] then - return usage() - end - if arg[1] ~= "query" then - opt.file = arg[1] - r,e=lp.send(opt) - io.stdout:write(tostring(r or e),'\n') - else - r,e=lp.query(opt) - io.stdout:write(tostring(r or e), '\n') - end -end - --- trivial tests ---lua lp.lua lp.lua queue=default host=localhost ---lua lp.lua lp.lua queue=default host=localhost format=binary localbind=1 ---lua lp.lua query queue=default host=localhost diff --git a/build/premake/premake5/binmodules/luasocket/samples/mclisten.lua b/build/premake/premake5/binmodules/luasocket/samples/mclisten.lua deleted file mode 100644 index d40d7893d6..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/mclisten.lua +++ /dev/null @@ -1,18 +0,0 @@ -local socket = require"socket" -local group = "225.0.0.37" -local port = 12345 -local c = assert(socket.udp()) -print(assert(c:setoption("reuseport", true))) -print(assert(c:setsockname("*", port))) ---print("loop:", c:getoption("ip-multicast-loop")) ---print(assert(c:setoption("ip-multicast-loop", false))) ---print("loop:", c:getoption("ip-multicast-loop")) ---print("if:", c:getoption("ip-multicast-if")) ---print(assert(c:setoption("ip-multicast-if", "127.0.0.1"))) ---print("if:", c:getoption("ip-multicast-if")) ---print(assert(c:setoption("ip-multicast-if", "10.0.1.4"))) ---print("if:", c:getoption("ip-multicast-if")) -print(assert(c:setoption("ip-add-membership", {multiaddr = group, interface = "*"}))) -while 1 do - print(c:receivefrom()) -end diff --git a/build/premake/premake5/binmodules/luasocket/samples/mcsend.lua b/build/premake/premake5/binmodules/luasocket/samples/mcsend.lua deleted file mode 100644 index 7c24cdf2b2..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/mcsend.lua +++ /dev/null @@ -1,20 +0,0 @@ -local socket = require"socket" -local group = "225.0.0.37" -local port = 12345 -local c = assert(socket.udp()) ---print(assert(c:setoption("reuseport", true))) ---print(assert(c:setsockname("*", port))) ---print(assert(c:setoption("ip-multicast-loop", false))) ---print(assert(c:setoption("ip-multicast-ttl", 4))) ---print(assert(c:setoption("ip-multicast-if", "10.0.1.3"))) ---print(assert(c:setoption("ip-add-membership", {multiaddr = group, interface = "*"}))) -local i = 0 -while 1 do - local message = string.format("hello all %d!", i) - assert(c:sendto(message, group, port)) - print("sent " .. message) - socket.sleep(1) - c:settimeout(0.5) - print(c:receivefrom()) - i = i + 1 -end diff --git a/build/premake/premake5/binmodules/luasocket/samples/talker.lua b/build/premake/premake5/binmodules/luasocket/samples/talker.lua deleted file mode 100644 index 172bf89088..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/talker.lua +++ /dev/null @@ -1,20 +0,0 @@ ------------------------------------------------------------------------------ --- TCP sample: Little program to send text lines to a given host/port --- LuaSocket sample files --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -host = host or "localhost" -port = port or 8080 -if arg then - host = arg[1] or host - port = arg[2] or port -end -print("Attempting connection to host '" ..host.. "' and port " ..port.. "...") -c = assert(socket.connect(host, port)) -print("Connected! Please type stuff (empty line to stop):") -l = io.read() -while l and l ~= "" and not e do - assert(c:send(l .. "\n")) - l = io.read() -end diff --git a/build/premake/premake5/binmodules/luasocket/samples/tinyirc.lua b/build/premake/premake5/binmodules/luasocket/samples/tinyirc.lua deleted file mode 100644 index 5babb7e1ea..0000000000 --- a/build/premake/premake5/binmodules/luasocket/samples/tinyirc.lua +++ /dev/null @@ -1,89 +0,0 @@ ------------------------------------------------------------------------------ --- Select sample: simple text line server --- LuaSocket sample files. --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -host = host or "*" -port1 = port1 or 8080 -port2 = port2 or 8181 -if arg then - host = arg[1] or host - port1 = arg[2] or port1 - port2 = arg[3] or port2 -end - -server1 = assert(socket.bind(host, port1)) -server2 = assert(socket.bind(host, port2)) -server1:settimeout(1) -- make sure we don't block in accept -server2:settimeout(1) - -io.write("Servers bound\n") - --- simple set implementation --- the select function doesn't care about what is passed to it as long as --- it behaves like a table --- creates a new set data structure -function newset() - local reverse = {} - local set = {} - return setmetatable(set, {__index = { - insert = function(set, value) - if not reverse[value] then - table.insert(set, value) - reverse[value] = #set - end - end, - remove = function(set, value) - local index = reverse[value] - if index then - reverse[value] = nil - local top = table.remove(set) - if top ~= value then - reverse[top] = index - set[index] = top - end - end - end - }}) -end - -set = newset() - -io.write("Inserting servers in set\n") -set:insert(server1) -set:insert(server2) - -while 1 do - local readable, _, error = socket.select(set, nil) - for _, input in ipairs(readable) do - -- is it a server socket? - if input == server1 or input == server2 then - io.write("Waiting for clients\n") - local new = input:accept() - if new then - new:settimeout(1) - io.write("Inserting client in set\n") - set:insert(new) - end - -- it is a client socket - else - local line, error = input:receive() - if error then - input:close() - io.write("Removing client from set\n") - set:remove(input) - else - io.write("Broadcasting line '", line, "'\n") - writable, error = socket.skip(1, socket.select(nil, set, 1)) - if not error then - for __, output in ipairs(writable) do - if output ~= input then - output:send(line .. "\n") - end - end - else io.write("No client ready to receive!!!\n") end - end - end - end -end diff --git a/build/premake/premake5/binmodules/luasocket/src/auxiliar.c b/build/premake/premake5/binmodules/luasocket/src/auxiliar.c deleted file mode 100644 index 18fa8e4c3c..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/auxiliar.c +++ /dev/null @@ -1,158 +0,0 @@ -/*=========================================================================*\ -* Auxiliar routines for class hierarchy manipulation -* LuaSocket toolkit -\*=========================================================================*/ -#include -#include - -#include "auxiliar.h" - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initializes the module -\*-------------------------------------------------------------------------*/ -int auxiliar_open(lua_State *L) { - (void) L; - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Creates a new class with given methods -* Methods whose names start with __ are passed directly to the metatable. -\*-------------------------------------------------------------------------*/ -void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func) { - luaL_newmetatable(L, classname); /* mt */ - /* create __index table to place methods */ - lua_pushstring(L, "__index"); /* mt,"__index" */ - lua_newtable(L); /* mt,"__index",it */ - /* put class name into class metatable */ - lua_pushstring(L, "class"); /* mt,"__index",it,"class" */ - lua_pushstring(L, classname); /* mt,"__index",it,"class",classname */ - lua_rawset(L, -3); /* mt,"__index",it */ - /* pass all methods that start with _ to the metatable, and all others - * to the index table */ - for (; func->name; func++) { /* mt,"__index",it */ - lua_pushstring(L, func->name); - lua_pushcfunction(L, func->func); - lua_rawset(L, func->name[0] == '_' ? -5: -3); - } - lua_rawset(L, -3); /* mt */ - lua_pop(L, 1); -} - -/*-------------------------------------------------------------------------*\ -* Prints the value of a class in a nice way -\*-------------------------------------------------------------------------*/ -int auxiliar_tostring(lua_State *L) { - char buf[32]; - if (!lua_getmetatable(L, 1)) goto error; - lua_pushstring(L, "__index"); - lua_gettable(L, -2); - if (!lua_istable(L, -1)) goto error; - lua_pushstring(L, "class"); - lua_gettable(L, -2); - if (!lua_isstring(L, -1)) goto error; - sprintf(buf, "%p", lua_touserdata(L, 1)); - lua_pushfstring(L, "%s: %s", lua_tostring(L, -1), buf); - return 1; -error: - lua_pushstring(L, "invalid object passed to 'auxiliar.c:__tostring'"); - lua_error(L); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Insert class into group -\*-------------------------------------------------------------------------*/ -void auxiliar_add2group(lua_State *L, const char *classname, const char *groupname) { - luaL_getmetatable(L, classname); - lua_pushstring(L, groupname); - lua_pushboolean(L, 1); - lua_rawset(L, -3); - lua_pop(L, 1); -} - -/*-------------------------------------------------------------------------*\ -* Make sure argument is a boolean -\*-------------------------------------------------------------------------*/ -int auxiliar_checkboolean(lua_State *L, int objidx) { - if (!lua_isboolean(L, objidx)) - auxiliar_typeerror(L, objidx, lua_typename(L, LUA_TBOOLEAN)); - return lua_toboolean(L, objidx); -} - -/*-------------------------------------------------------------------------*\ -* Return userdata pointer if object belongs to a given class, abort with -* error otherwise -\*-------------------------------------------------------------------------*/ -void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx) { - void *data = auxiliar_getclassudata(L, classname, objidx); - if (!data) { - char msg[45]; - sprintf(msg, "%.35s expected", classname); - luaL_argerror(L, objidx, msg); - } - return data; -} - -/*-------------------------------------------------------------------------*\ -* Return userdata pointer if object belongs to a given group, abort with -* error otherwise -\*-------------------------------------------------------------------------*/ -void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx) { - void *data = auxiliar_getgroupudata(L, groupname, objidx); - if (!data) { - char msg[45]; - sprintf(msg, "%.35s expected", groupname); - luaL_argerror(L, objidx, msg); - } - return data; -} - -/*-------------------------------------------------------------------------*\ -* Set object class -\*-------------------------------------------------------------------------*/ -void auxiliar_setclass(lua_State *L, const char *classname, int objidx) { - luaL_getmetatable(L, classname); - if (objidx < 0) objidx--; - lua_setmetatable(L, objidx); -} - -/*-------------------------------------------------------------------------*\ -* Get a userdata pointer if object belongs to a given group. Return NULL -* otherwise -\*-------------------------------------------------------------------------*/ -void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx) { - if (!lua_getmetatable(L, objidx)) - return NULL; - lua_pushstring(L, groupname); - lua_rawget(L, -2); - if (lua_isnil(L, -1)) { - lua_pop(L, 2); - return NULL; - } else { - lua_pop(L, 2); - return lua_touserdata(L, objidx); - } -} - -/*-------------------------------------------------------------------------*\ -* Get a userdata pointer if object belongs to a given class. Return NULL -* otherwise -\*-------------------------------------------------------------------------*/ -void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) { - return luaL_checkudata(L, objidx, classname); -} - -/*-------------------------------------------------------------------------*\ -* Throws error when argument does not have correct type. -* Used to be part of lauxlib in Lua 5.1, was dropped from 5.2. -\*-------------------------------------------------------------------------*/ -int auxiliar_typeerror (lua_State *L, int narg, const char *tname) { - const char *msg = lua_pushfstring(L, "%s expected, got %s", tname, - luaL_typename(L, narg)); - return luaL_argerror(L, narg, msg); -} - diff --git a/build/premake/premake5/binmodules/luasocket/src/auxiliar.h b/build/premake/premake5/binmodules/luasocket/src/auxiliar.h deleted file mode 100644 index 65511d4de5..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/auxiliar.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef AUXILIAR_H -#define AUXILIAR_H -/*=========================================================================*\ -* Auxiliar routines for class hierarchy manipulation -* LuaSocket toolkit (but completely independent of other LuaSocket modules) -* -* A LuaSocket class is a name associated with Lua metatables. A LuaSocket -* group is a name associated with a class. A class can belong to any number -* of groups. This module provides the functionality to: -* -* - create new classes -* - add classes to groups -* - set the class of objects -* - check if an object belongs to a given class or group -* - get the userdata associated to objects -* - print objects in a pretty way -* -* LuaSocket class names follow the convention {}. Modules -* can define any number of classes and groups. The module tcp.c, for -* example, defines the classes tcp{master}, tcp{client} and tcp{server} and -* the groups tcp{client,server} and tcp{any}. Module functions can then -* perform type-checking on their arguments by either class or group. -* -* LuaSocket metatables define the __index metamethod as being a table. This -* table has one field for each method supported by the class, and a field -* "class" with the class name. -* -* The mapping from class name to the corresponding metatable and the -* reverse mapping are done using lauxlib. -\*=========================================================================*/ - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -int auxiliar_open(lua_State *L); -void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func); -void auxiliar_add2group(lua_State *L, const char *classname, const char *group); -void auxiliar_setclass(lua_State *L, const char *classname, int objidx); -void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx); -void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx); -void *auxiliar_getclassudata(lua_State *L, const char *groupname, int objidx); -void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx); -int auxiliar_checkboolean(lua_State *L, int objidx); -int auxiliar_tostring(lua_State *L); -int auxiliar_typeerror(lua_State *L, int narg, const char *tname); - -#endif /* AUXILIAR_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/buffer.c b/build/premake/premake5/binmodules/luasocket/src/buffer.c deleted file mode 100644 index fff16346f0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/buffer.c +++ /dev/null @@ -1,273 +0,0 @@ -/*=========================================================================*\ -* Input/Output interface for Lua programs -* LuaSocket toolkit -\*=========================================================================*/ -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "buffer.h" - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int recvraw(p_buffer buf, size_t wanted, luaL_Buffer *b); -static int recvline(p_buffer buf, luaL_Buffer *b); -static int recvall(p_buffer buf, luaL_Buffer *b); -static int buffer_get(p_buffer buf, const char **data, size_t *count); -static void buffer_skip(p_buffer buf, size_t count); -static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent); - -/* min and max macros */ -#ifndef MIN -#define MIN(x, y) ((x) < (y) ? x : y) -#endif -#ifndef MAX -#define MAX(x, y) ((x) > (y) ? x : y) -#endif - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int buffer_open(lua_State *L) { - (void) L; - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Initializes C structure -\*-------------------------------------------------------------------------*/ -void buffer_init(p_buffer buf, p_io io, p_timeout tm) { - buf->first = buf->last = 0; - buf->io = io; - buf->tm = tm; - buf->received = buf->sent = 0; - buf->birthday = timeout_gettime(); -} - -/*-------------------------------------------------------------------------*\ -* object:getstats() interface -\*-------------------------------------------------------------------------*/ -int buffer_meth_getstats(lua_State *L, p_buffer buf) { - lua_pushnumber(L, (lua_Number) buf->received); - lua_pushnumber(L, (lua_Number) buf->sent); - lua_pushnumber(L, timeout_gettime() - buf->birthday); - return 3; -} - -/*-------------------------------------------------------------------------*\ -* object:setstats() interface -\*-------------------------------------------------------------------------*/ -int buffer_meth_setstats(lua_State *L, p_buffer buf) { - buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received); - buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent); - if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* object:send() interface -\*-------------------------------------------------------------------------*/ -int buffer_meth_send(lua_State *L, p_buffer buf) { - int top = lua_gettop(L); - int err = IO_DONE; - size_t size = 0, sent = 0; - const char *data = luaL_checklstring(L, 2, &size); - long start = (long) luaL_optnumber(L, 3, 1); - long end = (long) luaL_optnumber(L, 4, -1); - timeout_markstart(buf->tm); - if (start < 0) start = (long) (size+start+1); - if (end < 0) end = (long) (size+end+1); - if (start < 1) start = (long) 1; - if (end > (long) size) end = (long) size; - if (start <= end) err = sendraw(buf, data+start-1, end-start+1, &sent); - /* check if there was an error */ - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, buf->io->error(buf->io->ctx, err)); - lua_pushnumber(L, (lua_Number) (sent+start-1)); - } else { - lua_pushnumber(L, (lua_Number) (sent+start-1)); - lua_pushnil(L); - lua_pushnil(L); - } -#ifdef LUASOCKET_DEBUG - /* push time elapsed during operation as the last return value */ - lua_pushnumber(L, timeout_gettime() - timeout_getstart(buf->tm)); -#endif - return lua_gettop(L) - top; -} - -/*-------------------------------------------------------------------------*\ -* object:receive() interface -\*-------------------------------------------------------------------------*/ -int buffer_meth_receive(lua_State *L, p_buffer buf) { - int err = IO_DONE, top = lua_gettop(L); - luaL_Buffer b; - size_t size; - const char *part = luaL_optlstring(L, 3, "", &size); - timeout_markstart(buf->tm); - /* initialize buffer with optional extra prefix - * (useful for concatenating previous partial results) */ - luaL_buffinit(L, &b); - luaL_addlstring(&b, part, size); - /* receive new patterns */ - if (!lua_isnumber(L, 2)) { - const char *p= luaL_optstring(L, 2, "*l"); - if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b); - else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b); - else luaL_argcheck(L, 0, 2, "invalid receive pattern"); - /* get a fixed number of bytes (minus what was already partially - * received) */ - } else { - double n = lua_tonumber(L, 2); - size_t wanted = (size_t) n; - luaL_argcheck(L, n >= 0, 2, "invalid receive pattern"); - if (size == 0 || wanted > size) - err = recvraw(buf, wanted-size, &b); - } - /* check if there was an error */ - if (err != IO_DONE) { - /* we can't push anyting in the stack before pushing the - * contents of the buffer. this is the reason for the complication */ - luaL_pushresult(&b); - lua_pushstring(L, buf->io->error(buf->io->ctx, err)); - lua_pushvalue(L, -2); - lua_pushnil(L); - lua_replace(L, -4); - } else { - luaL_pushresult(&b); - lua_pushnil(L); - lua_pushnil(L); - } -#ifdef LUASOCKET_DEBUG - /* push time elapsed during operation as the last return value */ - lua_pushnumber(L, timeout_gettime() - timeout_getstart(buf->tm)); -#endif - return lua_gettop(L) - top; -} - -/*-------------------------------------------------------------------------*\ -* Determines if there is any data in the read buffer -\*-------------------------------------------------------------------------*/ -int buffer_isempty(p_buffer buf) { - return buf->first >= buf->last; -} - -/*=========================================================================*\ -* Internal functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Sends a block of data (unbuffered) -\*-------------------------------------------------------------------------*/ -#define STEPSIZE 8192 -static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent) { - p_io io = buf->io; - p_timeout tm = buf->tm; - size_t total = 0; - int err = IO_DONE; - while (total < count && err == IO_DONE) { - size_t done = 0; - size_t step = (count-total <= STEPSIZE)? count-total: STEPSIZE; - err = io->send(io->ctx, data+total, step, &done, tm); - total += done; - } - *sent = total; - buf->sent += total; - return err; -} - -/*-------------------------------------------------------------------------*\ -* Reads a fixed number of bytes (buffered) -\*-------------------------------------------------------------------------*/ -static int recvraw(p_buffer buf, size_t wanted, luaL_Buffer *b) { - int err = IO_DONE; - size_t total = 0; - while (err == IO_DONE) { - size_t count; const char *data; - err = buffer_get(buf, &data, &count); - count = MIN(count, wanted - total); - luaL_addlstring(b, data, count); - buffer_skip(buf, count); - total += count; - if (total >= wanted) break; - } - return err; -} - -/*-------------------------------------------------------------------------*\ -* Reads everything until the connection is closed (buffered) -\*-------------------------------------------------------------------------*/ -static int recvall(p_buffer buf, luaL_Buffer *b) { - int err = IO_DONE; - size_t total = 0; - while (err == IO_DONE) { - const char *data; size_t count; - err = buffer_get(buf, &data, &count); - total += count; - luaL_addlstring(b, data, count); - buffer_skip(buf, count); - } - if (err == IO_CLOSED) { - if (total > 0) return IO_DONE; - else return IO_CLOSED; - } else return err; -} - -/*-------------------------------------------------------------------------*\ -* Reads a line terminated by a CR LF pair or just by a LF. The CR and LF -* are not returned by the function and are discarded from the buffer -\*-------------------------------------------------------------------------*/ -static int recvline(p_buffer buf, luaL_Buffer *b) { - int err = IO_DONE; - while (err == IO_DONE) { - size_t count, pos; const char *data; - err = buffer_get(buf, &data, &count); - pos = 0; - while (pos < count && data[pos] != '\n') { - /* we ignore all \r's */ - if (data[pos] != '\r') luaL_addchar(b, data[pos]); - pos++; - } - if (pos < count) { /* found '\n' */ - buffer_skip(buf, pos+1); /* skip '\n' too */ - break; /* we are done */ - } else /* reached the end of the buffer */ - buffer_skip(buf, pos); - } - return err; -} - -/*-------------------------------------------------------------------------*\ -* Skips a given number of bytes from read buffer. No data is read from the -* transport layer -\*-------------------------------------------------------------------------*/ -static void buffer_skip(p_buffer buf, size_t count) { - buf->received += count; - buf->first += count; - if (buffer_isempty(buf)) - buf->first = buf->last = 0; -} - -/*-------------------------------------------------------------------------*\ -* Return any data available in buffer, or get more data from transport layer -* if buffer is empty -\*-------------------------------------------------------------------------*/ -static int buffer_get(p_buffer buf, const char **data, size_t *count) { - int err = IO_DONE; - p_io io = buf->io; - p_timeout tm = buf->tm; - if (buffer_isempty(buf)) { - size_t got; - err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm); - buf->first = 0; - buf->last = got; - } - *count = buf->last - buf->first; - *data = buf->data + buf->first; - return err; -} diff --git a/build/premake/premake5/binmodules/luasocket/src/buffer.h b/build/premake/premake5/binmodules/luasocket/src/buffer.h deleted file mode 100644 index 1281bb3914..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/buffer.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef BUF_H -#define BUF_H -/*=========================================================================*\ -* Input/Output interface for Lua programs -* LuaSocket toolkit -* -* Line patterns require buffering. Reading one character at a time involves -* too many system calls and is very slow. This module implements the -* LuaSocket interface for input/output on connected objects, as seen by -* Lua programs. -* -* Input is buffered. Output is *not* buffered because there was no simple -* way of making sure the buffered output data would ever be sent. -* -* The module is built on top of the I/O abstraction defined in io.h and the -* timeout management is done with the timeout.h interface. -\*=========================================================================*/ -#include "lua.h" - -#include "io.h" -#include "timeout.h" - -/* buffer size in bytes */ -#define BUF_SIZE 8192 - -/* buffer control structure */ -typedef struct t_buffer_ { - double birthday; /* throttle support info: creation time, */ - size_t sent, received; /* bytes sent, and bytes received */ - p_io io; /* IO driver used for this buffer */ - p_timeout tm; /* timeout management for this buffer */ - size_t first, last; /* index of first and last bytes of stored data */ - char data[BUF_SIZE]; /* storage space for buffer data */ -} t_buffer; -typedef t_buffer *p_buffer; - -int buffer_open(lua_State *L); -void buffer_init(p_buffer buf, p_io io, p_timeout tm); -int buffer_meth_send(lua_State *L, p_buffer buf); -int buffer_meth_receive(lua_State *L, p_buffer buf); -int buffer_meth_getstats(lua_State *L, p_buffer buf); -int buffer_meth_setstats(lua_State *L, p_buffer buf); -int buffer_isempty(p_buffer buf); - -#endif /* BUF_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/compat.c b/build/premake/premake5/binmodules/luasocket/src/compat.c deleted file mode 100644 index c2d99cb20c..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/compat.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "compat.h" - -#if LUA_VERSION_NUM==501 -/* -** Adapted from Lua 5.2 -*/ -void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { - luaL_checkstack(L, nup+1, "too many upvalues"); - for (; l->name != NULL; l++) { /* fill the table with given functions */ - int i; - lua_pushstring(L, l->name); - for (i = 0; i < nup; i++) /* copy upvalues to the top */ - lua_pushvalue(L, -(nup+1)); - lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ - lua_settable(L, -(nup + 3)); - } - lua_pop(L, nup); /* remove upvalues */ -} -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/compat.h b/build/premake/premake5/binmodules/luasocket/src/compat.h deleted file mode 100644 index 7bf8010ea8..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/compat.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef COMPAT_H -#define COMPAT_H - -#include "lua.h" -#include "lauxlib.h" - -#if LUA_VERSION_NUM==501 -void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); -#endif - -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/except.c b/build/premake/premake5/binmodules/luasocket/src/except.c deleted file mode 100644 index 60b5005823..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/except.c +++ /dev/null @@ -1,133 +0,0 @@ -/*=========================================================================*\ -* Simple exception support -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "except.h" - -#if LUA_VERSION_NUM < 502 -#define lua_pcallk(L, na, nr, err, ctx, cont) \ - (((void)ctx),((void)cont),lua_pcall(L, na, nr, err)) -#endif - -#if LUA_VERSION_NUM < 503 -typedef int lua_KContext; -#endif - -/*=========================================================================*\ -* Internal function prototypes. -\*=========================================================================*/ -static int global_protect(lua_State *L); -static int global_newtry(lua_State *L); -static int protected_(lua_State *L); -static int finalize(lua_State *L); -static int do_nothing(lua_State *L); - -/* except functions */ -static luaL_Reg func[] = { - {"newtry", global_newtry}, - {"protect", global_protect}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Try factory -\*-------------------------------------------------------------------------*/ -static void wrap(lua_State *L) { - lua_createtable(L, 1, 0); - lua_pushvalue(L, -2); - lua_rawseti(L, -2, 1); - lua_pushvalue(L, lua_upvalueindex(1)); - lua_setmetatable(L, -2); -} - -static int finalize(lua_State *L) { - if (!lua_toboolean(L, 1)) { - lua_pushvalue(L, lua_upvalueindex(2)); - lua_call(L, 0, 0); - lua_settop(L, 2); - wrap(L); - lua_error(L); - return 0; - } else return lua_gettop(L); -} - -static int do_nothing(lua_State *L) { - (void) L; - return 0; -} - -static int global_newtry(lua_State *L) { - lua_settop(L, 1); - if (lua_isnil(L, 1)) lua_pushcfunction(L, do_nothing); - lua_pushvalue(L, lua_upvalueindex(1)); - lua_insert(L, -2); - lua_pushcclosure(L, finalize, 2); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Protect factory -\*-------------------------------------------------------------------------*/ -static int unwrap(lua_State *L) { - if (lua_istable(L, -1) && lua_getmetatable(L, -1)) { - int r = lua_rawequal(L, -1, lua_upvalueindex(1)); - lua_pop(L, 1); - if (r) { - lua_pushnil(L); - lua_rawgeti(L, -2, 1); - return 1; - } - } - return 0; -} - -static int protected_finish(lua_State *L, int status, lua_KContext ctx) { - (void)ctx; - if (status != 0 && status != LUA_YIELD) { - if (unwrap(L)) return 2; - else return lua_error(L); - } else return lua_gettop(L); -} - -#if LUA_VERSION_NUM == 502 -static int protected_cont(lua_State *L) { - int ctx = 0; - int status = lua_getctx(L, &ctx); - return protected_finish(L, status, ctx); -} -#else -#define protected_cont protected_finish -#endif - -static int protected_(lua_State *L) { - int status; - lua_pushvalue(L, lua_upvalueindex(2)); - lua_insert(L, 1); - status = lua_pcallk(L, lua_gettop(L) - 1, LUA_MULTRET, 0, 0, protected_cont); - return protected_finish(L, status, 0); -} - -static int global_protect(lua_State *L) { - lua_settop(L, 1); - lua_pushvalue(L, lua_upvalueindex(1)); - lua_insert(L, 1); - lua_pushcclosure(L, protected_, 2); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Init module -\*-------------------------------------------------------------------------*/ -int except_open(lua_State *L) { - lua_newtable(L); /* metatable for wrapped exceptions */ - lua_pushboolean(L, 0); - lua_setfield(L, -2, "__metatable"); - luaL_setfuncs(L, func, 1); - return 0; -} diff --git a/build/premake/premake5/binmodules/luasocket/src/except.h b/build/premake/premake5/binmodules/luasocket/src/except.h deleted file mode 100644 index 2497c0566b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/except.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef EXCEPT_H -#define EXCEPT_H -/*=========================================================================*\ -* Exception control -* LuaSocket toolkit (but completely independent from other modules) -* -* This provides support for simple exceptions in Lua. During the -* development of the HTTP/FTP/SMTP support, it became aparent that -* error checking was taking a substantial amount of the coding. These -* function greatly simplify the task of checking errors. -* -* The main idea is that functions should return nil as their first return -* values when they find an error, and return an error message (or value) -* following nil. In case of success, as long as the first value is not nil, -* the other values don't matter. -* -* The idea is to nest function calls with the "try" function. This function -* checks the first value, and, if it's falsy, wraps the second value in a -* table with metatable and calls "error" on it. Otherwise, it returns all -* values it received. Basically, it works like the Lua "assert" function, -* but it creates errors targeted specifically at "protect". -* -* The "newtry" function is a factory for "try" functions that call a -* finalizer in protected mode before calling "error". -* -* The "protect" function returns a new function that behaves exactly like -* the function it receives, but the new function catches exceptions thrown -* by "try" functions and returns nil followed by the error message instead. -* -* With these three functions, it's easy to write functions that throw -* exceptions on error, but that don't interrupt the user script. -\*=========================================================================*/ - -#include "lua.h" - -int except_open(lua_State *L); - -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/ftp.lua b/build/premake/premake5/binmodules/luasocket/src/ftp.lua deleted file mode 100644 index bd528caa2e..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/ftp.lua +++ /dev/null @@ -1,329 +0,0 @@ ------------------------------------------------------------------------------ --- FTP support for the Lua language --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local table = require("table") -local string = require("string") -local math = require("math") -local socket = require("socket") -local url = require("socket.url") -local tp = require("socket.tp") -local ltn12 = require("ltn12") -socket.ftp = {} -local _M = socket.ftp ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ --- timeout in seconds before the program gives up on a connection -_M.TIMEOUT = 60 --- default port for ftp service -local PORT = 21 --- this is the default anonymous password. used when no password is --- provided in url. should be changed to your e-mail. -_M.USER = "ftp" -_M.PASSWORD = "anonymous@anonymous.org" - ------------------------------------------------------------------------------ --- Low level FTP API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function _M.open(server, port, create) - local tp = socket.try(tp.connect(server, port or PORT, _M.TIMEOUT, create)) - local f = base.setmetatable({ tp = tp }, metat) - -- make sure everything gets closed in an exception - f.try = socket.newtry(function() f:close() end) - return f -end - -function metat.__index:portconnect() - self.try(self.server:settimeout(_M.TIMEOUT)) - self.data = self.try(self.server:accept()) - self.try(self.data:settimeout(_M.TIMEOUT)) -end - -function metat.__index:pasvconnect() - self.data = self.try(socket.tcp()) - self.try(self.data:settimeout(_M.TIMEOUT)) - self.try(self.data:connect(self.pasvt.address, self.pasvt.port)) -end - -function metat.__index:login(user, password) - self.try(self.tp:command("user", user or _M.USER)) - local code, reply = self.try(self.tp:check{"2..", 331}) - if code == 331 then - self.try(self.tp:command("pass", password or _M.PASSWORD)) - self.try(self.tp:check("2..")) - end - return 1 -end - -function metat.__index:pasv() - self.try(self.tp:command("pasv")) - local code, reply = self.try(self.tp:check("2..")) - local pattern = "(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)" - local a, b, c, d, p1, p2 = socket.skip(2, string.find(reply, pattern)) - self.try(a and b and c and d and p1 and p2, reply) - self.pasvt = { - address = string.format("%d.%d.%d.%d", a, b, c, d), - port = p1*256 + p2 - } - if self.server then - self.server:close() - self.server = nil - end - return self.pasvt.address, self.pasvt.port -end - -function metat.__index:epsv() - self.try(self.tp:command("epsv")) - local code, reply = self.try(self.tp:check("229")) - local pattern = "%((.)(.-)%1(.-)%1(.-)%1%)" - local d, prt, address, port = string.match(reply, pattern) - self.try(port, "invalid epsv response") - self.pasvt = { - address = self.tp:getpeername(), - port = port - } - if self.server then - self.server:close() - self.server = nil - end - return self.pasvt.address, self.pasvt.port -end - - -function metat.__index:port(address, port) - self.pasvt = nil - if not address then - address, port = self.try(self.tp:getsockname()) - self.server = self.try(socket.bind(address, 0)) - address, port = self.try(self.server:getsockname()) - self.try(self.server:settimeout(_M.TIMEOUT)) - end - local pl = math.mod(port, 256) - local ph = (port - pl)/256 - local arg = string.gsub(string.format("%s,%d,%d", address, ph, pl), "%.", ",") - self.try(self.tp:command("port", arg)) - self.try(self.tp:check("2..")) - return 1 -end - -function metat.__index:eprt(family, address, port) - self.pasvt = nil - if not address then - address, port = self.try(self.tp:getsockname()) - self.server = self.try(socket.bind(address, 0)) - address, port = self.try(self.server:getsockname()) - self.try(self.server:settimeout(_M.TIMEOUT)) - end - local arg = string.format("|%s|%s|%d|", family, address, port) - self.try(self.tp:command("eprt", arg)) - self.try(self.tp:check("2..")) - return 1 -end - - -function metat.__index:send(sendt) - self.try(self.pasvt or self.server, "need port or pasv first") - -- if there is a pasvt table, we already sent a PASV command - -- we just get the data connection into self.data - if self.pasvt then self:pasvconnect() end - -- get the transfer argument and command - local argument = sendt.argument or - url.unescape(string.gsub(sendt.path or "", "^[/\\]", "")) - if argument == "" then argument = nil end - local command = sendt.command or "stor" - -- send the transfer command and check the reply - self.try(self.tp:command(command, argument)) - local code, reply = self.try(self.tp:check{"2..", "1.."}) - -- if there is not a pasvt table, then there is a server - -- and we already sent a PORT command - if not self.pasvt then self:portconnect() end - -- get the sink, source and step for the transfer - local step = sendt.step or ltn12.pump.step - local readt = { self.tp } - local checkstep = function(src, snk) - -- check status in control connection while downloading - local readyt = socket.select(readt, nil, 0) - if readyt[tp] then code = self.try(self.tp:check("2..")) end - return step(src, snk) - end - local sink = socket.sink("close-when-done", self.data) - -- transfer all data and check error - self.try(ltn12.pump.all(sendt.source, sink, checkstep)) - if string.find(code, "1..") then self.try(self.tp:check("2..")) end - -- done with data connection - self.data:close() - -- find out how many bytes were sent - local sent = socket.skip(1, self.data:getstats()) - self.data = nil - return sent -end - -function metat.__index:receive(recvt) - self.try(self.pasvt or self.server, "need port or pasv first") - if self.pasvt then self:pasvconnect() end - local argument = recvt.argument or - url.unescape(string.gsub(recvt.path or "", "^[/\\]", "")) - if argument == "" then argument = nil end - local command = recvt.command or "retr" - self.try(self.tp:command(command, argument)) - local code,reply = self.try(self.tp:check{"1..", "2.."}) - if (code >= 200) and (code <= 299) then - recvt.sink(reply) - return 1 - end - if not self.pasvt then self:portconnect() end - local source = socket.source("until-closed", self.data) - local step = recvt.step or ltn12.pump.step - self.try(ltn12.pump.all(source, recvt.sink, step)) - if string.find(code, "1..") then self.try(self.tp:check("2..")) end - self.data:close() - self.data = nil - return 1 -end - -function metat.__index:cwd(dir) - self.try(self.tp:command("cwd", dir)) - self.try(self.tp:check(250)) - return 1 -end - -function metat.__index:type(type) - self.try(self.tp:command("type", type)) - self.try(self.tp:check(200)) - return 1 -end - -function metat.__index:greet() - local code = self.try(self.tp:check{"1..", "2.."}) - if string.find(code, "1..") then self.try(self.tp:check("2..")) end - return 1 -end - -function metat.__index:quit() - self.try(self.tp:command("quit")) - self.try(self.tp:check("2..")) - return 1 -end - -function metat.__index:close() - if self.data then self.data:close() end - if self.server then self.server:close() end - return self.tp:close() -end - ------------------------------------------------------------------------------ --- High level FTP API ------------------------------------------------------------------------------ -local function override(t) - if t.url then - local u = url.parse(t.url) - for i,v in base.pairs(t) do - u[i] = v - end - return u - else return t end -end - -local function tput(putt) - putt = override(putt) - socket.try(putt.host, "missing hostname") - local f = _M.open(putt.host, putt.port, putt.create) - f:greet() - f:login(putt.user, putt.password) - if putt.type then f:type(putt.type) end - f:epsv() - local sent = f:send(putt) - f:quit() - f:close() - return sent -end - -local default = { - path = "/", - scheme = "ftp" -} - -local function genericform(u) - local t = socket.try(url.parse(u, default)) - socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'") - socket.try(t.host, "missing hostname") - local pat = "^type=(.)$" - if t.params then - t.type = socket.skip(2, string.find(t.params, pat)) - socket.try(t.type == "a" or t.type == "i", - "invalid type '" .. t.type .. "'") - end - return t -end - -_M.genericform = genericform - -local function sput(u, body) - local putt = genericform(u) - putt.source = ltn12.source.string(body) - return tput(putt) -end - -_M.put = socket.protect(function(putt, body) - if base.type(putt) == "string" then return sput(putt, body) - else return tput(putt) end -end) - -local function tget(gett) - gett = override(gett) - socket.try(gett.host, "missing hostname") - local f = _M.open(gett.host, gett.port, gett.create) - f:greet() - f:login(gett.user, gett.password) - if gett.type then f:type(gett.type) end - f:epsv() - f:receive(gett) - f:quit() - return f:close() -end - -local function sget(u) - local gett = genericform(u) - local t = {} - gett.sink = ltn12.sink.table(t) - tget(gett) - return table.concat(t) -end - -_M.command = socket.protect(function(cmdt) - cmdt = override(cmdt) - socket.try(cmdt.host, "missing hostname") - socket.try(cmdt.command, "missing command") - local f = _M.open(cmdt.host, cmdt.port, cmdt.create) - f:greet() - f:login(cmdt.user, cmdt.password) - if type(cmdt.command) == "table" then - local argument = cmdt.argument or {} - local check = cmdt.check or {} - for i,cmd in ipairs(cmdt.command) do - f.try(f.tp:command(cmd, argument[i])) - if check[i] then f.try(f.tp:check(check[i])) end - end - else - f.try(f.tp:command(cmdt.command, cmdt.argument)) - if cmdt.check then f.try(f.tp:check(cmdt.check)) end - end - f:quit() - return f:close() -end) - -_M.get = socket.protect(function(gett) - if base.type(gett) == "string" then return sget(gett) - else return tget(gett) end -end) - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/headers.lua b/build/premake/premake5/binmodules/luasocket/src/headers.lua deleted file mode 100644 index 1eb8223b9d..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/headers.lua +++ /dev/null @@ -1,104 +0,0 @@ ------------------------------------------------------------------------------ --- Canonic header field capitalization --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ -local socket = require("socket") -socket.headers = {} -local _M = socket.headers - -_M.canonic = { - ["accept"] = "Accept", - ["accept-charset"] = "Accept-Charset", - ["accept-encoding"] = "Accept-Encoding", - ["accept-language"] = "Accept-Language", - ["accept-ranges"] = "Accept-Ranges", - ["action"] = "Action", - ["alternate-recipient"] = "Alternate-Recipient", - ["age"] = "Age", - ["allow"] = "Allow", - ["arrival-date"] = "Arrival-Date", - ["authorization"] = "Authorization", - ["bcc"] = "Bcc", - ["cache-control"] = "Cache-Control", - ["cc"] = "Cc", - ["comments"] = "Comments", - ["connection"] = "Connection", - ["content-description"] = "Content-Description", - ["content-disposition"] = "Content-Disposition", - ["content-encoding"] = "Content-Encoding", - ["content-id"] = "Content-ID", - ["content-language"] = "Content-Language", - ["content-length"] = "Content-Length", - ["content-location"] = "Content-Location", - ["content-md5"] = "Content-MD5", - ["content-range"] = "Content-Range", - ["content-transfer-encoding"] = "Content-Transfer-Encoding", - ["content-type"] = "Content-Type", - ["cookie"] = "Cookie", - ["date"] = "Date", - ["diagnostic-code"] = "Diagnostic-Code", - ["dsn-gateway"] = "DSN-Gateway", - ["etag"] = "ETag", - ["expect"] = "Expect", - ["expires"] = "Expires", - ["final-log-id"] = "Final-Log-ID", - ["final-recipient"] = "Final-Recipient", - ["from"] = "From", - ["host"] = "Host", - ["if-match"] = "If-Match", - ["if-modified-since"] = "If-Modified-Since", - ["if-none-match"] = "If-None-Match", - ["if-range"] = "If-Range", - ["if-unmodified-since"] = "If-Unmodified-Since", - ["in-reply-to"] = "In-Reply-To", - ["keywords"] = "Keywords", - ["last-attempt-date"] = "Last-Attempt-Date", - ["last-modified"] = "Last-Modified", - ["location"] = "Location", - ["max-forwards"] = "Max-Forwards", - ["message-id"] = "Message-ID", - ["mime-version"] = "MIME-Version", - ["original-envelope-id"] = "Original-Envelope-ID", - ["original-recipient"] = "Original-Recipient", - ["pragma"] = "Pragma", - ["proxy-authenticate"] = "Proxy-Authenticate", - ["proxy-authorization"] = "Proxy-Authorization", - ["range"] = "Range", - ["received"] = "Received", - ["received-from-mta"] = "Received-From-MTA", - ["references"] = "References", - ["referer"] = "Referer", - ["remote-mta"] = "Remote-MTA", - ["reply-to"] = "Reply-To", - ["reporting-mta"] = "Reporting-MTA", - ["resent-bcc"] = "Resent-Bcc", - ["resent-cc"] = "Resent-Cc", - ["resent-date"] = "Resent-Date", - ["resent-from"] = "Resent-From", - ["resent-message-id"] = "Resent-Message-ID", - ["resent-reply-to"] = "Resent-Reply-To", - ["resent-sender"] = "Resent-Sender", - ["resent-to"] = "Resent-To", - ["retry-after"] = "Retry-After", - ["return-path"] = "Return-Path", - ["sender"] = "Sender", - ["server"] = "Server", - ["smtp-remote-recipient"] = "SMTP-Remote-Recipient", - ["status"] = "Status", - ["subject"] = "Subject", - ["te"] = "TE", - ["to"] = "To", - ["trailer"] = "Trailer", - ["transfer-encoding"] = "Transfer-Encoding", - ["upgrade"] = "Upgrade", - ["user-agent"] = "User-Agent", - ["vary"] = "Vary", - ["via"] = "Via", - ["warning"] = "Warning", - ["will-retry-until"] = "Will-Retry-Until", - ["www-authenticate"] = "WWW-Authenticate", - ["x-mailer"] = "X-Mailer", -} - -return _M \ No newline at end of file diff --git a/build/premake/premake5/binmodules/luasocket/src/http.lua b/build/premake/premake5/binmodules/luasocket/src/http.lua deleted file mode 100644 index a386165e82..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/http.lua +++ /dev/null @@ -1,382 +0,0 @@ ------------------------------------------------------------------------------ --- HTTP/1.1 client support for the Lua language. --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies -------------------------------------------------------------------------------- -local socket = require("socket") -local url = require("socket.url") -local ltn12 = require("ltn12") -local mime = require("mime") -local string = require("string") -local headers = require("socket.headers") -local base = _G -local table = require("table") -socket.http = {} -local _M = socket.http - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ --- connection timeout in seconds -_M.TIMEOUT = 60 --- user agent field sent in request -_M.USERAGENT = socket._VERSION - --- supported schemes -local SCHEMES = { ["http"] = true } --- default port for document retrieval -local PORT = 80 - ------------------------------------------------------------------------------ --- Reads MIME headers from a connection, unfolding where needed ------------------------------------------------------------------------------ -local function receiveheaders(sock, headers) - local line, name, value, err - headers = headers or {} - -- get first line - line, err = sock:receive() - if err then return nil, err end - -- headers go until a blank line is found - while line ~= "" do - -- get field-name and value - name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)")) - if not (name and value) then return nil, "malformed reponse headers" end - name = string.lower(name) - -- get next line (value might be folded) - line, err = sock:receive() - if err then return nil, err end - -- unfold any folded values - while string.find(line, "^%s") do - value = value .. line - line = sock:receive() - if err then return nil, err end - end - -- save pair in table - if headers[name] then headers[name] = headers[name] .. ", " .. value - else headers[name] = value end - end - return headers -end - ------------------------------------------------------------------------------ --- Extra sources and sinks ------------------------------------------------------------------------------ -socket.sourcet["http-chunked"] = function(sock, headers) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function() - -- get chunk size, skip extention - local line, err = sock:receive() - if err then return nil, err end - local size = base.tonumber(string.gsub(line, ";.*", ""), 16) - if not size then return nil, "invalid chunk size" end - -- was it the last chunk? - if size > 0 then - -- if not, get chunk and skip terminating CRLF - local chunk, err, part = sock:receive(size) - if chunk then sock:receive() end - return chunk, err - else - -- if it was, read trailers into headers table - headers, err = receiveheaders(sock, headers) - if not headers then return nil, err end - end - end - }) -end - -socket.sinkt["http-chunked"] = function(sock) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function(self, chunk, err) - if not chunk then return sock:send("0\r\n\r\n") end - local size = string.format("%X\r\n", string.len(chunk)) - return sock:send(size .. chunk .. "\r\n") - end - }) -end - ------------------------------------------------------------------------------ --- Low level HTTP API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function _M.open(host, port, create) - -- create socket with user connect function, or with default - local c = socket.try((create or socket.tcp)()) - local h = base.setmetatable({ c = c }, metat) - -- create finalized try - h.try = socket.newtry(function() h:close() end) - -- set timeout before connecting - h.try(c:settimeout(_M.TIMEOUT)) - h.try(c:connect(host, port or PORT)) - -- here everything worked - return h -end - -function metat.__index:sendrequestline(method, uri) - local reqline = string.format("%s %s HTTP/1.1\r\n", method or "GET", uri) - return self.try(self.c:send(reqline)) -end - -function metat.__index:sendheaders(tosend) - local canonic = headers.canonic - local h = "\r\n" - for f, v in base.pairs(tosend) do - h = (canonic[f] or f) .. ": " .. v .. "\r\n" .. h - end - self.try(self.c:send(h)) - return 1 -end - -function metat.__index:sendbody(headers, source, step) - source = source or ltn12.source.empty() - step = step or ltn12.pump.step - -- if we don't know the size in advance, send chunked and hope for the best - local mode = "http-chunked" - if headers["content-length"] then mode = "keep-open" end - return self.try(ltn12.pump.all(source, socket.sink(mode, self.c), step)) -end - -function metat.__index:receivestatusline() - local status = self.try(self.c:receive(5)) - -- identify HTTP/0.9 responses, which do not contain a status line - -- this is just a heuristic, but is what the RFC recommends - if status ~= "HTTP/" then return nil, status end - -- otherwise proceed reading a status line - status = self.try(self.c:receive("*l", status)) - local code = socket.skip(2, string.find(status, "HTTP/%d*%.%d* (%d%d%d)")) - return self.try(base.tonumber(code), status) -end - -function metat.__index:receiveheaders() - return self.try(receiveheaders(self.c)) -end - -function metat.__index:receivebody(headers, sink, step) - sink = sink or ltn12.sink.null() - step = step or ltn12.pump.step - local length = base.tonumber(headers["content-length"]) - local t = headers["transfer-encoding"] -- shortcut - local mode = "default" -- connection close - if t and t ~= "identity" then mode = "http-chunked" - elseif base.tonumber(headers["content-length"]) then mode = "by-length" end - return self.try(ltn12.pump.all(socket.source(mode, self.c, length), - sink, step)) -end - -function metat.__index:receive09body(status, sink, step) - local source = ltn12.source.rewind(socket.source("until-closed", self.c)) - source(status) - return self.try(ltn12.pump.all(source, sink, step)) -end - -function metat.__index:close() - return self.c:close() -end - ------------------------------------------------------------------------------ --- High level HTTP API ------------------------------------------------------------------------------ -local function adjusturi(reqt) - local u = reqt - -- if there is a proxy, we need the full url. otherwise, just a part. - if not reqt.proxy and not _M.PROXY then - u = { - path = socket.try(reqt.path, "invalid path 'nil'"), - params = reqt.params, - query = reqt.query, - fragment = reqt.fragment - } - end - return url.build(u) -end - -local function adjustproxy(reqt) - local proxy = reqt.proxy or _M.PROXY - if proxy then - proxy = url.parse(proxy) - return proxy.host, proxy.port or 3128 - else - return reqt.host, reqt.port - end -end - -local function adjustheaders(reqt) - -- default headers - local host = string.gsub(reqt.authority, "^.-@", "") - local lower = { - ["user-agent"] = _M.USERAGENT, - ["host"] = host, - ["connection"] = "close, TE", - ["te"] = "trailers" - } - -- if we have authentication information, pass it along - if reqt.user and reqt.password then - lower["authorization"] = - "Basic " .. (mime.b64(reqt.user .. ":" .. - url.unescape(reqt.password))) - end - -- if we have proxy authentication information, pass it along - local proxy = reqt.proxy or _M.PROXY - if proxy then - proxy = url.parse(proxy) - if proxy.user and proxy.password then - lower["proxy-authorization"] = - "Basic " .. (mime.b64(proxy.user .. ":" .. proxy.password)) - end - end - -- override with user headers - for i,v in base.pairs(reqt.headers or lower) do - lower[string.lower(i)] = v - end - return lower -end - --- default url parts -local default = { - host = "", - port = PORT, - path ="/", - scheme = "http" -} - -local function adjustrequest(reqt) - -- parse url if provided - local nreqt = reqt.url and url.parse(reqt.url, default) or {} - -- explicit components override url - for i,v in base.pairs(reqt) do nreqt[i] = v end - if nreqt.port == "" then nreqt.port = PORT end - if not (nreqt.host and nreqt.host ~= "") then - socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'") - end - -- compute uri if user hasn't overriden - nreqt.uri = reqt.uri or adjusturi(nreqt) - -- adjust headers in request - nreqt.headers = adjustheaders(nreqt) - -- ajust host and port if there is a proxy - nreqt.host, nreqt.port = adjustproxy(nreqt) - return nreqt -end - -local function shouldredirect(reqt, code, headers) - local location = headers.location - if not location then return false end - location = string.gsub(location, "%s", "") - if location == "" then return false end - local scheme = string.match(location, "^([%w][%w%+%-%.]*)%:") - if scheme and not SCHEMES[scheme] then return false end - return (reqt.redirect ~= false) and - (code == 301 or code == 302 or code == 303 or code == 307) and - (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD") - and (not reqt.nredirects or reqt.nredirects < 5) -end - -local function shouldreceivebody(reqt, code) - if reqt.method == "HEAD" then return nil end - if code == 204 or code == 304 then return nil end - if code >= 100 and code < 200 then return nil end - return 1 -end - --- forward declarations -local trequest, tredirect - ---[[local]] function tredirect(reqt, location) - local result, code, headers, status = trequest { - -- the RFC says the redirect URL has to be absolute, but some - -- servers do not respect that - url = url.absolute(reqt.url, location), - source = reqt.source, - sink = reqt.sink, - headers = reqt.headers, - proxy = reqt.proxy, - nredirects = (reqt.nredirects or 0) + 1, - create = reqt.create - } - -- pass location header back as a hint we redirected - headers = headers or {} - headers.location = headers.location or location - return result, code, headers, status -end - ---[[local]] function trequest(reqt) - -- we loop until we get what we want, or - -- until we are sure there is no way to get it - local nreqt = adjustrequest(reqt) - local h = _M.open(nreqt.host, nreqt.port, nreqt.create) - -- send request line and headers - h:sendrequestline(nreqt.method, nreqt.uri) - h:sendheaders(nreqt.headers) - -- if there is a body, send it - if nreqt.source then - h:sendbody(nreqt.headers, nreqt.source, nreqt.step) - end - local code, status = h:receivestatusline() - -- if it is an HTTP/0.9 server, simply get the body and we are done - if not code then - h:receive09body(status, nreqt.sink, nreqt.step) - return 1, 200 - end - local headers - -- ignore any 100-continue messages - while code == 100 do - headers = h:receiveheaders() - code, status = h:receivestatusline() - end - headers = h:receiveheaders() - -- at this point we should have a honest reply from the server - -- we can't redirect if we already used the source, so we report the error - if shouldredirect(nreqt, code, headers) and not nreqt.source then - h:close() - return tredirect(reqt, headers.location) - end - -- here we are finally done - if shouldreceivebody(nreqt, code) then - h:receivebody(headers, nreqt.sink, nreqt.step) - end - h:close() - return 1, code, headers, status -end - --- turns an url and a body into a generic request -local function genericform(u, b) - local t = {} - local reqt = { - url = u, - sink = ltn12.sink.table(t), - target = t - } - if b then - reqt.source = ltn12.source.string(b) - reqt.headers = { - ["content-length"] = string.len(b), - ["content-type"] = "application/x-www-form-urlencoded" - } - reqt.method = "POST" - end - return reqt -end - -_M.genericform = genericform - -local function srequest(u, b) - local reqt = genericform(u, b) - local _, code, headers, status = trequest(reqt) - return table.concat(reqt.target), code, headers, status -end - -_M.request = socket.protect(function(reqt, body) - if base.type(reqt) == "string" then return srequest(reqt, body) - else return trequest(reqt) end -end) - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/inet.c b/build/premake/premake5/binmodules/luasocket/src/inet.c deleted file mode 100644 index f4c84044eb..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/inet.c +++ /dev/null @@ -1,543 +0,0 @@ -/*=========================================================================*\ -* Internet domain functions -* LuaSocket toolkit -\*=========================================================================*/ -#include -#include -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "inet.h" - -/*=========================================================================*\ -* Internal function prototypes. -\*=========================================================================*/ -static int inet_global_toip(lua_State *L); -static int inet_global_getaddrinfo(lua_State *L); -static int inet_global_tohostname(lua_State *L); -static int inet_global_getnameinfo(lua_State *L); -static void inet_pushresolved(lua_State *L, struct hostent *hp); -static int inet_global_gethostname(lua_State *L); - -/* DNS functions */ -static luaL_Reg func[] = { - { "toip", inet_global_toip}, - { "getaddrinfo", inet_global_getaddrinfo}, - { "tohostname", inet_global_tohostname}, - { "getnameinfo", inet_global_getnameinfo}, - { "gethostname", inet_global_gethostname}, - { NULL, NULL} -}; - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int inet_open(lua_State *L) -{ - lua_pushstring(L, "dns"); - lua_newtable(L); - luaL_setfuncs(L, func, 0); - lua_settable(L, -3); - return 0; -} - -/*=========================================================================*\ -* Global Lua functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Returns all information provided by the resolver given a host name -* or ip address -\*-------------------------------------------------------------------------*/ -static int inet_gethost(const char *address, struct hostent **hp) { - struct in_addr addr; - if (inet_aton(address, &addr)) - return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp); - else - return socket_gethostbyname(address, hp); -} - -/*-------------------------------------------------------------------------*\ -* Returns all information provided by the resolver given a host name -* or ip address -\*-------------------------------------------------------------------------*/ -static int inet_global_tohostname(lua_State *L) { - const char *address = luaL_checkstring(L, 1); - struct hostent *hp = NULL; - int err = inet_gethost(address, &hp); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, socket_hoststrerror(err)); - return 2; - } - lua_pushstring(L, hp->h_name); - inet_pushresolved(L, hp); - return 2; -} - -static int inet_global_getnameinfo(lua_State *L) { - char hbuf[NI_MAXHOST]; - char sbuf[NI_MAXSERV]; - int i, ret; - struct addrinfo hints; - struct addrinfo *resolved, *iter; - const char *host = luaL_optstring(L, 1, NULL); - const char *serv = luaL_optstring(L, 2, NULL); - - if (!(host || serv)) - luaL_error(L, "host and serv cannot be both nil"); - - memset(&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = AF_UNSPEC; - - ret = getaddrinfo(host, serv, &hints, &resolved); - if (ret != 0) { - lua_pushnil(L); - lua_pushstring(L, socket_gaistrerror(ret)); - return 2; - } - - lua_newtable(L); - for (i = 1, iter = resolved; iter; i++, iter = iter->ai_next) { - getnameinfo(iter->ai_addr, (socklen_t) iter->ai_addrlen, - hbuf, host? (socklen_t) sizeof(hbuf): 0, - sbuf, serv? (socklen_t) sizeof(sbuf): 0, 0); - if (host) { - lua_pushnumber(L, i); - lua_pushstring(L, hbuf); - lua_settable(L, -3); - } - } - freeaddrinfo(resolved); - - if (serv) { - lua_pushstring(L, sbuf); - return 2; - } else { - return 1; - } -} - -/*-------------------------------------------------------------------------*\ -* Returns all information provided by the resolver given a host name -* or ip address -\*-------------------------------------------------------------------------*/ -static int inet_global_toip(lua_State *L) -{ - const char *address = luaL_checkstring(L, 1); - struct hostent *hp = NULL; - int err = inet_gethost(address, &hp); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, socket_hoststrerror(err)); - return 2; - } - lua_pushstring(L, inet_ntoa(*((struct in_addr *) hp->h_addr))); - inet_pushresolved(L, hp); - return 2; -} - -int inet_optfamily(lua_State* L, int narg, const char* def) -{ - static const char* optname[] = { "unspec", "inet", "inet6", NULL }; - static int optvalue[] = { AF_UNSPEC, AF_INET, AF_INET6, 0 }; - - return optvalue[luaL_checkoption(L, narg, def, optname)]; -} - -int inet_optsocktype(lua_State* L, int narg, const char* def) -{ - static const char* optname[] = { "stream", "dgram", NULL }; - static int optvalue[] = { SOCK_STREAM, SOCK_DGRAM, 0 }; - - return optvalue[luaL_checkoption(L, narg, def, optname)]; -} - -static int inet_global_getaddrinfo(lua_State *L) -{ - const char *hostname = luaL_checkstring(L, 1); - struct addrinfo *iterator = NULL, *resolved = NULL; - struct addrinfo hints; - int i = 1, ret = 0; - memset(&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = AF_UNSPEC; - ret = getaddrinfo(hostname, NULL, &hints, &resolved); - if (ret != 0) { - lua_pushnil(L); - lua_pushstring(L, socket_gaistrerror(ret)); - return 2; - } - lua_newtable(L); - for (iterator = resolved; iterator; iterator = iterator->ai_next) { - char hbuf[NI_MAXHOST]; - ret = getnameinfo(iterator->ai_addr, (socklen_t) iterator->ai_addrlen, - hbuf, (socklen_t) sizeof(hbuf), NULL, 0, NI_NUMERICHOST); - if (ret){ - freeaddrinfo(resolved); - lua_pushnil(L); - lua_pushstring(L, socket_gaistrerror(ret)); - return 2; - } - lua_pushnumber(L, i); - lua_newtable(L); - switch (iterator->ai_family) { - case AF_INET: - lua_pushliteral(L, "family"); - lua_pushliteral(L, "inet"); - lua_settable(L, -3); - break; - case AF_INET6: - lua_pushliteral(L, "family"); - lua_pushliteral(L, "inet6"); - lua_settable(L, -3); - break; - case AF_UNSPEC: - lua_pushliteral(L, "family"); - lua_pushliteral(L, "unspec"); - lua_settable(L, -3); - break; - default: - lua_pushliteral(L, "family"); - lua_pushliteral(L, "unknown"); - lua_settable(L, -3); - break; - } - lua_pushliteral(L, "addr"); - lua_pushstring(L, hbuf); - lua_settable(L, -3); - lua_settable(L, -3); - i++; - } - freeaddrinfo(resolved); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Gets the host name -\*-------------------------------------------------------------------------*/ -static int inet_global_gethostname(lua_State *L) -{ - char name[257]; - name[256] = '\0'; - if (gethostname(name, 256) < 0) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(errno)); - return 2; - } else { - lua_pushstring(L, name); - return 1; - } -} - -/*=========================================================================*\ -* Lua methods -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Retrieves socket peer name -\*-------------------------------------------------------------------------*/ -int inet_meth_getpeername(lua_State *L, p_socket ps, int family) -{ - int err; - struct sockaddr_storage peer; - socklen_t peer_len = sizeof(peer); - char name[INET6_ADDRSTRLEN]; - char port[6]; /* 65535 = 5 bytes + 0 to terminate it */ - if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(errno)); - return 2; - } - err = getnameinfo((struct sockaddr *) &peer, peer_len, - name, INET6_ADDRSTRLEN, - port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV); - if (err) { - lua_pushnil(L); - lua_pushstring(L, gai_strerror(err)); - return 2; - } - lua_pushstring(L, name); - lua_pushinteger(L, (int) strtol(port, (char **) NULL, 10)); - switch (family) { - case AF_INET: lua_pushliteral(L, "inet"); break; - case AF_INET6: lua_pushliteral(L, "inet6"); break; - case AF_UNSPEC: lua_pushliteral(L, "unspec"); break; - default: lua_pushliteral(L, "unknown"); break; - } - return 3; -} - -/*-------------------------------------------------------------------------*\ -* Retrieves socket local name -\*-------------------------------------------------------------------------*/ -int inet_meth_getsockname(lua_State *L, p_socket ps, int family) -{ - int err; - struct sockaddr_storage peer; - socklen_t peer_len = sizeof(peer); - char name[INET6_ADDRSTRLEN]; - char port[6]; /* 65535 = 5 bytes + 0 to terminate it */ - if (getsockname(*ps, (SA *) &peer, &peer_len) < 0) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(errno)); - return 2; - } - err=getnameinfo((struct sockaddr *)&peer, peer_len, - name, INET6_ADDRSTRLEN, port, 6, NI_NUMERICHOST | NI_NUMERICSERV); - if (err) { - lua_pushnil(L); - lua_pushstring(L, gai_strerror(err)); - return 2; - } - lua_pushstring(L, name); - lua_pushstring(L, port); - switch (family) { - case AF_INET: lua_pushliteral(L, "inet"); break; - case AF_INET6: lua_pushliteral(L, "inet6"); break; - case AF_UNSPEC: lua_pushliteral(L, "unspec"); break; - default: lua_pushliteral(L, "unknown"); break; - } - return 3; -} - -/*=========================================================================*\ -* Internal functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Passes all resolver information to Lua as a table -\*-------------------------------------------------------------------------*/ -static void inet_pushresolved(lua_State *L, struct hostent *hp) -{ - char **alias; - struct in_addr **addr; - int i, resolved; - lua_newtable(L); resolved = lua_gettop(L); - lua_pushstring(L, "name"); - lua_pushstring(L, hp->h_name); - lua_settable(L, resolved); - lua_pushstring(L, "ip"); - lua_pushstring(L, "alias"); - i = 1; - alias = hp->h_aliases; - lua_newtable(L); - if (alias) { - while (*alias) { - lua_pushnumber(L, i); - lua_pushstring(L, *alias); - lua_settable(L, -3); - i++; alias++; - } - } - lua_settable(L, resolved); - i = 1; - lua_newtable(L); - addr = (struct in_addr **) hp->h_addr_list; - if (addr) { - while (*addr) { - lua_pushnumber(L, i); - lua_pushstring(L, inet_ntoa(**addr)); - lua_settable(L, -3); - i++; addr++; - } - } - lua_settable(L, resolved); -} - -/*-------------------------------------------------------------------------*\ -* Tries to create a new inet socket -\*-------------------------------------------------------------------------*/ -const char *inet_trycreate(p_socket ps, int family, int type, int protocol) { - const char *err = socket_strerror(socket_create(ps, family, type, protocol)); - if (err == NULL && family == AF_INET6) { - int yes = 1; - setsockopt(*ps, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&yes, sizeof(yes)); - } - return err; -} - -/*-------------------------------------------------------------------------*\ -* "Disconnects" a DGRAM socket -\*-------------------------------------------------------------------------*/ -const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm) -{ - switch (family) { - case AF_INET: { - struct sockaddr_in sin; - memset((char *) &sin, 0, sizeof(sin)); - sin.sin_family = AF_UNSPEC; - sin.sin_addr.s_addr = INADDR_ANY; - return socket_strerror(socket_connect(ps, (SA *) &sin, - sizeof(sin), tm)); - } - case AF_INET6: { - struct sockaddr_in6 sin6; - struct in6_addr addrany = IN6ADDR_ANY_INIT; - memset((char *) &sin6, 0, sizeof(sin6)); - sin6.sin6_family = AF_UNSPEC; - sin6.sin6_addr = addrany; - return socket_strerror(socket_connect(ps, (SA *) &sin6, - sizeof(sin6), tm)); - } - } - return NULL; -} - -/*-------------------------------------------------------------------------*\ -* Tries to connect to remote address (address, port) -\*-------------------------------------------------------------------------*/ -const char *inet_tryconnect(p_socket ps, int *family, const char *address, - const char *serv, p_timeout tm, struct addrinfo *connecthints) -{ - struct addrinfo *iterator = NULL, *resolved = NULL; - const char *err = NULL; - int current_family = *family; - /* try resolving */ - err = socket_gaistrerror(getaddrinfo(address, serv, - connecthints, &resolved)); - if (err != NULL) { - if (resolved) freeaddrinfo(resolved); - return err; - } - for (iterator = resolved; iterator; iterator = iterator->ai_next) { - timeout_markstart(tm); - /* create new socket if necessary. if there was no - * bind, we need to create one for every new family - * that shows up while iterating. if there was a - * bind, all families will be the same and we will - * not enter this branch. */ - if (current_family != iterator->ai_family || *ps == SOCKET_INVALID) { - socket_destroy(ps); - err = inet_trycreate(ps, iterator->ai_family, - iterator->ai_socktype, iterator->ai_protocol); - if (err) continue; - current_family = iterator->ai_family; - /* set non-blocking before connect */ - socket_setnonblocking(ps); - } - /* try connecting to remote address */ - err = socket_strerror(socket_connect(ps, (SA *) iterator->ai_addr, - (socklen_t) iterator->ai_addrlen, tm)); - /* if success or timeout is zero, break out of loop */ - if (err == NULL || timeout_iszero(tm)) { - *family = current_family; - break; - } - } - freeaddrinfo(resolved); - /* here, if err is set, we failed */ - return err; -} - -/*-------------------------------------------------------------------------*\ -* Tries to accept a socket -\*-------------------------------------------------------------------------*/ -const char *inet_tryaccept(p_socket server, int family, p_socket client, - p_timeout tm) { - socklen_t len; - t_sockaddr_storage addr; - switch (family) { - case AF_INET6: len = sizeof(struct sockaddr_in6); break; - case AF_INET: len = sizeof(struct sockaddr_in); break; - default: len = sizeof(addr); break; - } - return socket_strerror(socket_accept(server, client, (SA *) &addr, - &len, tm)); -} - -/*-------------------------------------------------------------------------*\ -* Tries to bind socket to (address, port) -\*-------------------------------------------------------------------------*/ -const char *inet_trybind(p_socket ps, int *family, const char *address, - const char *serv, struct addrinfo *bindhints) { - struct addrinfo *iterator = NULL, *resolved = NULL; - const char *err = NULL; - int current_family = *family; - /* translate luasocket special values to C */ - if (strcmp(address, "*") == 0) address = NULL; - if (!serv) serv = "0"; - /* try resolving */ - err = socket_gaistrerror(getaddrinfo(address, serv, bindhints, &resolved)); - if (err) { - if (resolved) freeaddrinfo(resolved); - return err; - } - /* iterate over resolved addresses until one is good */ - for (iterator = resolved; iterator; iterator = iterator->ai_next) { - if (current_family != iterator->ai_family || *ps == SOCKET_INVALID) { - socket_destroy(ps); - err = inet_trycreate(ps, iterator->ai_family, - iterator->ai_socktype, iterator->ai_protocol); - if (err) continue; - current_family = iterator->ai_family; - } - /* try binding to local address */ - err = socket_strerror(socket_bind(ps, (SA *) iterator->ai_addr, - (socklen_t) iterator->ai_addrlen)); - /* keep trying unless bind succeeded */ - if (err == NULL) { - *family = current_family; - /* set to non-blocking after bind */ - socket_setnonblocking(ps); - break; - } - } - /* cleanup and return error */ - freeaddrinfo(resolved); - /* here, if err is set, we failed */ - return err; -} - -/*-------------------------------------------------------------------------*\ -* Some systems do not provide these so that we provide our own. -\*-------------------------------------------------------------------------*/ -#ifdef LUASOCKET_INET_ATON -int inet_aton(const char *cp, struct in_addr *inp) -{ - unsigned int a = 0, b = 0, c = 0, d = 0; - int n = 0, r; - unsigned long int addr = 0; - r = sscanf(cp, "%u.%u.%u.%u%n", &a, &b, &c, &d, &n); - if (r == 0 || n == 0) return 0; - cp += n; - if (*cp) return 0; - if (a > 255 || b > 255 || c > 255 || d > 255) return 0; - if (inp) { - addr += a; addr <<= 8; - addr += b; addr <<= 8; - addr += c; addr <<= 8; - addr += d; - inp->s_addr = htonl(addr); - } - return 1; -} -#endif - -#ifdef LUASOCKET_INET_PTON -int inet_pton(int af, const char *src, void *dst) -{ - struct addrinfo hints, *res; - int ret = 1; - memset(&hints, 0, sizeof(struct addrinfo)); - hints.ai_family = af; - hints.ai_flags = AI_NUMERICHOST; - if (getaddrinfo(src, NULL, &hints, &res) != 0) return -1; - if (af == AF_INET) { - struct sockaddr_in *in = (struct sockaddr_in *) res->ai_addr; - memcpy(dst, &in->sin_addr, sizeof(in->sin_addr)); - } else if (af == AF_INET6) { - struct sockaddr_in6 *in = (struct sockaddr_in6 *) res->ai_addr; - memcpy(dst, &in->sin6_addr, sizeof(in->sin6_addr)); - } else { - ret = -1; - } - freeaddrinfo(res); - return ret; -} - -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/inet.h b/build/premake/premake5/binmodules/luasocket/src/inet.h deleted file mode 100644 index feb3541d42..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/inet.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef INET_H -#define INET_H -/*=========================================================================*\ -* Internet domain functions -* LuaSocket toolkit -* -* This module implements the creation and connection of internet domain -* sockets, on top of the socket.h interface, and the interface of with the -* resolver. -* -* The function inet_aton is provided for the platforms where it is not -* available. The module also implements the interface of the internet -* getpeername and getsockname functions as seen by Lua programs. -* -* The Lua functions toip and tohostname are also implemented here. -\*=========================================================================*/ -#include "lua.h" -#include "socket.h" -#include "timeout.h" - -#ifdef _WIN32 -#define LUASOCKET_INET_ATON -#endif - -int inet_open(lua_State *L); - -const char *inet_trycreate(p_socket ps, int family, int type, int protocol); -const char *inet_tryconnect(p_socket ps, int *family, const char *address, - const char *serv, p_timeout tm, struct addrinfo *connecthints); -const char *inet_trybind(p_socket ps, int *family, const char *address, - const char *serv, struct addrinfo *bindhints); -const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); -const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); - -int inet_meth_getpeername(lua_State *L, p_socket ps, int family); -int inet_meth_getsockname(lua_State *L, p_socket ps, int family); - -int inet_optfamily(lua_State* L, int narg, const char* def); -int inet_optsocktype(lua_State* L, int narg, const char* def); - -#ifdef LUASOCKET_INET_ATON -int inet_aton(const char *cp, struct in_addr *inp); -#endif - -#ifdef LUASOCKET_INET_PTON -const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); -int inet_pton(int af, const char *src, void *dst); -#endif - -#endif /* INET_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/io.c b/build/premake/premake5/binmodules/luasocket/src/io.c deleted file mode 100644 index a4230ce82b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/io.c +++ /dev/null @@ -1,30 +0,0 @@ -/*=========================================================================*\ -* Input/Output abstraction -* LuaSocket toolkit -\*=========================================================================*/ -#include "io.h" - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initializes C structure -\*-------------------------------------------------------------------------*/ -void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { - io->send = send; - io->recv = recv; - io->error = error; - io->ctx = ctx; -} - -/*-------------------------------------------------------------------------*\ -* I/O error strings -\*-------------------------------------------------------------------------*/ -const char *io_strerror(int err) { - switch (err) { - case IO_DONE: return NULL; - case IO_CLOSED: return "closed"; - case IO_TIMEOUT: return "timeout"; - default: return "unknown error"; - } -} diff --git a/build/premake/premake5/binmodules/luasocket/src/io.h b/build/premake/premake5/binmodules/luasocket/src/io.h deleted file mode 100644 index 8cca08a860..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/io.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef IO_H -#define IO_H -/*=========================================================================*\ -* Input/Output abstraction -* LuaSocket toolkit -* -* This module defines the interface that LuaSocket expects from the -* transport layer for streamed input/output. The idea is that if any -* transport implements this interface, then the buffer.c functions -* automatically work on it. -* -* The module socket.h implements this interface, and thus the module tcp.h -* is very simple. -\*=========================================================================*/ -#include -#include "lua.h" - -#include "timeout.h" - -/* IO error codes */ -enum { - IO_DONE = 0, /* operation completed successfully */ - IO_TIMEOUT = -1, /* operation timed out */ - IO_CLOSED = -2, /* the connection has been closed */ - IO_UNKNOWN = -3 -}; - -/* interface to error message function */ -typedef const char *(*p_error) ( - void *ctx, /* context needed by send */ - int err /* error code */ -); - -/* interface to send function */ -typedef int (*p_send) ( - void *ctx, /* context needed by send */ - const char *data, /* pointer to buffer with data to send */ - size_t count, /* number of bytes to send from buffer */ - size_t *sent, /* number of bytes sent uppon return */ - p_timeout tm /* timeout control */ -); - -/* interface to recv function */ -typedef int (*p_recv) ( - void *ctx, /* context needed by recv */ - char *data, /* pointer to buffer where data will be writen */ - size_t count, /* number of bytes to receive into buffer */ - size_t *got, /* number of bytes received uppon return */ - p_timeout tm /* timeout control */ -); - -/* IO driver definition */ -typedef struct t_io_ { - void *ctx; /* context needed by send/recv */ - p_send send; /* send function pointer */ - p_recv recv; /* receive function pointer */ - p_error error; /* strerror function */ -} t_io; -typedef t_io *p_io; - -void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx); -const char *io_strerror(int err); - -#endif /* IO_H */ - diff --git a/build/premake/premake5/binmodules/luasocket/src/ltn12.lua b/build/premake/premake5/binmodules/luasocket/src/ltn12.lua deleted file mode 100644 index 575c5a7f1b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/ltn12.lua +++ /dev/null @@ -1,309 +0,0 @@ ------------------------------------------------------------------------------ --- LTN12 - Filters, sources, sinks and pumps. --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module ------------------------------------------------------------------------------ -local string = require("string") -local table = require("table") -local unpack = unpack or table.unpack -local base = _G -local _M = {} -if module then -- heuristic for exporting a global package table - ltn12 = _M -end -local filter,source,sink,pump = {},{},{},{} - -_M.filter = filter -_M.source = source -_M.sink = sink -_M.pump = pump - -local unpack = unpack or table.unpack -local select = base.select - --- 2048 seems to be better in windows... -_M.BLOCKSIZE = 2048 -_M._VERSION = "LTN12 1.0.3" - ------------------------------------------------------------------------------ --- Filter stuff ------------------------------------------------------------------------------ --- returns a high level filter that cycles a low-level filter -function filter.cycle(low, ctx, extra) - base.assert(low) - return function(chunk) - local ret - ret, ctx = low(ctx, chunk, extra) - return ret - end -end - --- chains a bunch of filters together --- (thanks to Wim Couwenberg) -function filter.chain(...) - local arg = {...} - local n = base.select('#',...) - local top, index = 1, 1 - local retry = "" - return function(chunk) - retry = chunk and retry - while true do - if index == top then - chunk = arg[index](chunk) - if chunk == "" or top == n then return chunk - elseif chunk then index = index + 1 - else - top = top+1 - index = top - end - else - chunk = arg[index](chunk or "") - if chunk == "" then - index = index - 1 - chunk = retry - elseif chunk then - if index == n then return chunk - else index = index + 1 end - else base.error("filter returned inappropriate nil") end - end - end - end -end - ------------------------------------------------------------------------------ --- Source stuff ------------------------------------------------------------------------------ --- create an empty source -local function empty() - return nil -end - -function source.empty() - return empty -end - --- returns a source that just outputs an error -function source.error(err) - return function() - return nil, err - end -end - --- creates a file source -function source.file(handle, io_err) - if handle then - return function() - local chunk = handle:read(_M.BLOCKSIZE) - if not chunk then handle:close() end - return chunk - end - else return source.error(io_err or "unable to open file") end -end - --- turns a fancy source into a simple source -function source.simplify(src) - base.assert(src) - return function() - local chunk, err_or_new = src() - src = err_or_new or src - if not chunk then return nil, err_or_new - else return chunk end - end -end - --- creates string source -function source.string(s) - if s then - local i = 1 - return function() - local chunk = string.sub(s, i, i+_M.BLOCKSIZE-1) - i = i + _M.BLOCKSIZE - if chunk ~= "" then return chunk - else return nil end - end - else return source.empty() end -end - --- creates rewindable source -function source.rewind(src) - base.assert(src) - local t = {} - return function(chunk) - if not chunk then - chunk = table.remove(t) - if not chunk then return src() - else return chunk end - else - table.insert(t, chunk) - end - end -end - --- chains a source with one or several filter(s) -function source.chain(src, f, ...) - if ... then f=filter.chain(f, ...) end - base.assert(src and f) - local last_in, last_out = "", "" - local state = "feeding" - local err - return function() - if not last_out then - base.error('source is empty!', 2) - end - while true do - if state == "feeding" then - last_in, err = src() - if err then return nil, err end - last_out = f(last_in) - if not last_out then - if last_in then - base.error('filter returned inappropriate nil') - else - return nil - end - elseif last_out ~= "" then - state = "eating" - if last_in then last_in = "" end - return last_out - end - else - last_out = f(last_in) - if last_out == "" then - if last_in == "" then - state = "feeding" - else - base.error('filter returned ""') - end - elseif not last_out then - if last_in then - base.error('filter returned inappropriate nil') - else - return nil - end - else - return last_out - end - end - end - end -end - --- creates a source that produces contents of several sources, one after the --- other, as if they were concatenated --- (thanks to Wim Couwenberg) -function source.cat(...) - local arg = {...} - local src = table.remove(arg, 1) - return function() - while src do - local chunk, err = src() - if chunk then return chunk end - if err then return nil, err end - src = table.remove(arg, 1) - end - end -end - ------------------------------------------------------------------------------ --- Sink stuff ------------------------------------------------------------------------------ --- creates a sink that stores into a table -function sink.table(t) - t = t or {} - local f = function(chunk, err) - if chunk then table.insert(t, chunk) end - return 1 - end - return f, t -end - --- turns a fancy sink into a simple sink -function sink.simplify(snk) - base.assert(snk) - return function(chunk, err) - local ret, err_or_new = snk(chunk, err) - if not ret then return nil, err_or_new end - snk = err_or_new or snk - return 1 - end -end - --- creates a file sink -function sink.file(handle, io_err) - if handle then - return function(chunk, err) - if not chunk then - handle:close() - return 1 - else return handle:write(chunk) end - end - else return sink.error(io_err or "unable to open file") end -end - --- creates a sink that discards data -local function null() - return 1 -end - -function sink.null() - return null -end - --- creates a sink that just returns an error -function sink.error(err) - return function() - return nil, err - end -end - --- chains a sink with one or several filter(s) -function sink.chain(f, snk, ...) - if ... then - local args = { f, snk, ... } - snk = table.remove(args, #args) - f = filter.chain(unpack(args)) - end - base.assert(f and snk) - return function(chunk, err) - if chunk ~= "" then - local filtered = f(chunk) - local done = chunk and "" - while true do - local ret, snkerr = snk(filtered, err) - if not ret then return nil, snkerr end - if filtered == done then return 1 end - filtered = f(done) - end - else return 1 end - end -end - ------------------------------------------------------------------------------ --- Pump stuff ------------------------------------------------------------------------------ --- pumps one chunk from the source to the sink -function pump.step(src, snk) - local chunk, src_err = src() - local ret, snk_err = snk(chunk, src_err) - if chunk and ret then return 1 - else return nil, src_err or snk_err end -end - --- pumps all data from a source to a sink, using a step function -function pump.all(src, snk, step) - base.assert(src and snk) - step = step or pump.step - while true do - local ret, err = step(src, snk) - if not ret then - if err then return nil, err - else return 1 end - end - end -end - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/luasocket.c b/build/premake/premake5/binmodules/luasocket/src/luasocket.c deleted file mode 100644 index 031cc67f10..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/luasocket.c +++ /dev/null @@ -1,114 +0,0 @@ -/*=========================================================================*\ -* LuaSocket toolkit -* Networking support for the Lua language -* Diego Nehab -* 26/11/1999 -* -* This library is part of an effort to progressively increase the network -* connectivity of the Lua language. The Lua interface to networking -* functions follows the Sockets API closely, trying to simplify all tasks -* involved in setting up both client and server connections. The provided -* IO routines, however, follow the Lua style, being very similar to the -* standard Lua read and write functions. -\*=========================================================================*/ - -/*=========================================================================*\ -* Standard include files -\*=========================================================================*/ -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -/*=========================================================================*\ -* LuaSocket includes -\*=========================================================================*/ -#include "luasocket.h" -#include "auxiliar.h" -#include "except.h" -#include "timeout.h" -#include "buffer.h" -#include "inet.h" -#include "tcp.h" -#include "udp.h" -#include "select.h" - -/*-------------------------------------------------------------------------*\ -* Internal function prototypes -\*-------------------------------------------------------------------------*/ -static int global_skip(lua_State *L); -static int global_unload(lua_State *L); -static int base_open(lua_State *L); - -/*-------------------------------------------------------------------------*\ -* Modules and functions -\*-------------------------------------------------------------------------*/ -static const luaL_Reg mod[] = { - {"auxiliar", auxiliar_open}, - {"except", except_open}, - {"timeout", timeout_open}, - {"buffer", buffer_open}, - {"inet", inet_open}, - {"tcp", tcp_open}, - {"udp", udp_open}, - {"select", select_open}, - {NULL, NULL} -}; - -static luaL_Reg func[] = { - {"skip", global_skip}, - {"__unload", global_unload}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Skip a few arguments -\*-------------------------------------------------------------------------*/ -static int global_skip(lua_State *L) { - int amount = (int)luaL_checkinteger(L, 1); - int ret = lua_gettop(L) - amount - 1; - return ret >= 0 ? ret : 0; -} - -/*-------------------------------------------------------------------------*\ -* Unloads the library -\*-------------------------------------------------------------------------*/ -static int global_unload(lua_State *L) { - (void) L; - socket_close(); - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Setup basic stuff. -\*-------------------------------------------------------------------------*/ -static int base_open(lua_State *L) { - if (socket_open()) { - /* export functions (and leave namespace table on top of stack) */ - lua_newtable(L); - luaL_setfuncs(L, func, 0); -#ifdef LUASOCKET_DEBUG - lua_pushstring(L, "_DEBUG"); - lua_pushboolean(L, 1); - lua_rawset(L, -3); -#endif - /* make version string available to scripts */ - lua_pushstring(L, "_VERSION"); - lua_pushstring(L, LUASOCKET_VERSION); - lua_rawset(L, -3); - return 1; - } else { - lua_pushstring(L, "unable to initialize library"); - lua_error(L); - return 0; - } -} - -/*-------------------------------------------------------------------------*\ -* Initializes all library modules. -\*-------------------------------------------------------------------------*/ -LUASOCKET_API int luaopen_socket_core(lua_State *L) { - int i; - base_open(L); - for (i = 0; mod[i].name; i++) mod[i].func(L); - return 1; -} diff --git a/build/premake/premake5/binmodules/luasocket/src/luasocket.h b/build/premake/premake5/binmodules/luasocket/src/luasocket.h deleted file mode 100644 index f75d21f226..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/luasocket.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef LUASOCKET_H -#define LUASOCKET_H -/*=========================================================================*\ -* LuaSocket toolkit -* Networking support for the Lua language -* Diego Nehab -* 9/11/1999 -\*=========================================================================*/ -#include "lua.h" - -/*-------------------------------------------------------------------------*\ -* Current socket library version -\*-------------------------------------------------------------------------*/ -#define LUASOCKET_VERSION "LuaSocket 3.0-rc1" -#define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab" - -/*-------------------------------------------------------------------------*\ -* This macro prefixes all exported API functions -\*-------------------------------------------------------------------------*/ -#ifndef LUASOCKET_API -#define LUASOCKET_API extern -#endif - -/*-------------------------------------------------------------------------*\ -* Initializes the library. -\*-------------------------------------------------------------------------*/ -LUASOCKET_API int luaopen_socket_core(lua_State *L); - -#endif /* LUASOCKET_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/mbox.lua b/build/premake/premake5/binmodules/luasocket/src/mbox.lua deleted file mode 100644 index ed9e7814e6..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/mbox.lua +++ /dev/null @@ -1,92 +0,0 @@ -local _M = {} - -if module then - mbox = _M -end - -function _M.split_message(message_s) - local message = {} - message_s = string.gsub(message_s, "\r\n", "\n") - string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end) - string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end) - if not message.body then - string.gsub(message_s, "^\n(.*)", function (b) message.body = b end) - end - if not message.headers and not message.body then - message.headers = message_s - end - return message.headers or "", message.body or "" -end - -function _M.split_headers(headers_s) - local headers = {} - headers_s = string.gsub(headers_s, "\r\n", "\n") - headers_s = string.gsub(headers_s, "\n[ ]+", " ") - string.gsub("\n" .. headers_s, "\n([^\n]+)", function (h) table.insert(headers, h) end) - return headers -end - -function _M.parse_header(header_s) - header_s = string.gsub(header_s, "\n[ ]+", " ") - header_s = string.gsub(header_s, "\n+", "") - local _, __, name, value = string.find(header_s, "([^%s:]-):%s*(.*)") - return name, value -end - -function _M.parse_headers(headers_s) - local headers_t = _M.split_headers(headers_s) - local headers = {} - for i = 1, #headers_t do - local name, value = _M.parse_header(headers_t[i]) - if name then - name = string.lower(name) - if headers[name] then - headers[name] = headers[name] .. ", " .. value - else headers[name] = value end - end - end - return headers -end - -function _M.parse_from(from) - local _, __, name, address = string.find(from, "^%s*(.-)%s*%<(.-)%>") - if not address then - _, __, address = string.find(from, "%s*(.+)%s*") - end - name = name or "" - address = address or "" - if name == "" then name = address end - name = string.gsub(name, '"', "") - return name, address -end - -function _M.split_mbox(mbox_s) - local mbox = {} - mbox_s = string.gsub(mbox_s, "\r\n", "\n") .."\n\nFrom \n" - local nj, i, j = 1, 1, 1 - while 1 do - i, nj = string.find(mbox_s, "\n\nFrom .-\n", j) - if not i then break end - local message = string.sub(mbox_s, j, i-1) - table.insert(mbox, message) - j = nj+1 - end - return mbox -end - -function _M.parse(mbox_s) - local mbox = _M.split_mbox(mbox_s) - for i = 1, #mbox do - mbox[i] = _M.parse_message(mbox[i]) - end - return mbox -end - -function _M.parse_message(message_s) - local message = {} - message.headers, message.body = _M.split_message(message_s) - message.headers = _M.parse_headers(message.headers) - return message -end - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/mime.c b/build/premake/premake5/binmodules/luasocket/src/mime.c deleted file mode 100644 index 84c3e75c60..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/mime.c +++ /dev/null @@ -1,721 +0,0 @@ -/*=========================================================================*\ -* MIME support functions -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "mime.h" - -/*=========================================================================*\ -* Don't want to trust escape character constants -\*=========================================================================*/ -typedef unsigned char UC; -static const char CRLF[] = "\r\n"; -static const char EQCRLF[] = "=\r\n"; - -/*=========================================================================*\ -* Internal function prototypes. -\*=========================================================================*/ -static int mime_global_wrp(lua_State *L); -static int mime_global_b64(lua_State *L); -static int mime_global_unb64(lua_State *L); -static int mime_global_qp(lua_State *L); -static int mime_global_unqp(lua_State *L); -static int mime_global_qpwrp(lua_State *L); -static int mime_global_eol(lua_State *L); -static int mime_global_dot(lua_State *L); - -static size_t dot(int c, size_t state, luaL_Buffer *buffer); -static void b64setup(UC *base); -static size_t b64encode(UC c, UC *input, size_t size, luaL_Buffer *buffer); -static size_t b64pad(const UC *input, size_t size, luaL_Buffer *buffer); -static size_t b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer); - -static void qpsetup(UC *class, UC *unbase); -static void qpquote(UC c, luaL_Buffer *buffer); -static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer); -static size_t qpencode(UC c, UC *input, size_t size, - const char *marker, luaL_Buffer *buffer); -static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer); - -/* code support functions */ -static luaL_Reg func[] = { - { "dot", mime_global_dot }, - { "b64", mime_global_b64 }, - { "eol", mime_global_eol }, - { "qp", mime_global_qp }, - { "qpwrp", mime_global_qpwrp }, - { "unb64", mime_global_unb64 }, - { "unqp", mime_global_unqp }, - { "wrp", mime_global_wrp }, - { NULL, NULL } -}; - -/*-------------------------------------------------------------------------*\ -* Quoted-printable globals -\*-------------------------------------------------------------------------*/ -static UC qpclass[256]; -static UC qpbase[] = "0123456789ABCDEF"; -static UC qpunbase[256]; -enum {QP_PLAIN, QP_QUOTED, QP_CR, QP_IF_LAST}; - -/*-------------------------------------------------------------------------*\ -* Base64 globals -\*-------------------------------------------------------------------------*/ -static const UC b64base[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static UC b64unbase[256]; - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -MIME_API int luaopen_mime_core(lua_State *L) -{ - lua_newtable(L); - luaL_setfuncs(L, func, 0); - /* make version string available to scripts */ - lua_pushstring(L, "_VERSION"); - lua_pushstring(L, MIME_VERSION); - lua_rawset(L, -3); - /* initialize lookup tables */ - qpsetup(qpclass, qpunbase); - b64setup(b64unbase); - return 1; -} - -/*=========================================================================*\ -* Global Lua functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Incrementaly breaks a string into lines. The string can have CRLF breaks. -* A, n = wrp(l, B, length) -* A is a copy of B, broken into lines of at most 'length' bytes. -* 'l' is how many bytes are left for the first line of B. -* 'n' is the number of bytes left in the last line of A. -\*-------------------------------------------------------------------------*/ -static int mime_global_wrp(lua_State *L) -{ - size_t size = 0; - int left = (int) luaL_checknumber(L, 1); - const UC *input = (const UC *) luaL_optlstring(L, 2, NULL, &size); - const UC *last = input + size; - int length = (int) luaL_optnumber(L, 3, 76); - luaL_Buffer buffer; - /* end of input black-hole */ - if (!input) { - /* if last line has not been terminated, add a line break */ - if (left < length) lua_pushstring(L, CRLF); - /* otherwise, we are done */ - else lua_pushnil(L); - lua_pushnumber(L, length); - return 2; - } - luaL_buffinit(L, &buffer); - while (input < last) { - switch (*input) { - case '\r': - break; - case '\n': - luaL_addstring(&buffer, CRLF); - left = length; - break; - default: - if (left <= 0) { - left = length; - luaL_addstring(&buffer, CRLF); - } - luaL_addchar(&buffer, *input); - left--; - break; - } - input++; - } - luaL_pushresult(&buffer); - lua_pushnumber(L, left); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Fill base64 decode map. -\*-------------------------------------------------------------------------*/ -static void b64setup(UC *unbase) -{ - int i; - for (i = 0; i <= 255; i++) unbase[i] = (UC) 255; - for (i = 0; i < 64; i++) unbase[b64base[i]] = (UC) i; - unbase['='] = 0; -} - -/*-------------------------------------------------------------------------*\ -* Acumulates bytes in input buffer until 3 bytes are available. -* Translate the 3 bytes into Base64 form and append to buffer. -* Returns new number of bytes in buffer. -\*-------------------------------------------------------------------------*/ -static size_t b64encode(UC c, UC *input, size_t size, - luaL_Buffer *buffer) -{ - input[size++] = c; - if (size == 3) { - UC code[4]; - unsigned long value = 0; - value += input[0]; value <<= 8; - value += input[1]; value <<= 8; - value += input[2]; - code[3] = b64base[value & 0x3f]; value >>= 6; - code[2] = b64base[value & 0x3f]; value >>= 6; - code[1] = b64base[value & 0x3f]; value >>= 6; - code[0] = b64base[value]; - luaL_addlstring(buffer, (char *) code, 4); - size = 0; - } - return size; -} - -/*-------------------------------------------------------------------------*\ -* Encodes the Base64 last 1 or 2 bytes and adds padding '=' -* Result, if any, is appended to buffer. -* Returns 0. -\*-------------------------------------------------------------------------*/ -static size_t b64pad(const UC *input, size_t size, - luaL_Buffer *buffer) -{ - unsigned long value = 0; - UC code[4] = {'=', '=', '=', '='}; - switch (size) { - case 1: - value = input[0] << 4; - code[1] = b64base[value & 0x3f]; value >>= 6; - code[0] = b64base[value]; - luaL_addlstring(buffer, (char *) code, 4); - break; - case 2: - value = input[0]; value <<= 8; - value |= input[1]; value <<= 2; - code[2] = b64base[value & 0x3f]; value >>= 6; - code[1] = b64base[value & 0x3f]; value >>= 6; - code[0] = b64base[value]; - luaL_addlstring(buffer, (char *) code, 4); - break; - default: - break; - } - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Acumulates bytes in input buffer until 4 bytes are available. -* Translate the 4 bytes from Base64 form and append to buffer. -* Returns new number of bytes in buffer. -\*-------------------------------------------------------------------------*/ -static size_t b64decode(UC c, UC *input, size_t size, - luaL_Buffer *buffer) -{ - /* ignore invalid characters */ - if (b64unbase[c] > 64) return size; - input[size++] = c; - /* decode atom */ - if (size == 4) { - UC decoded[3]; - int valid, value = 0; - value = b64unbase[input[0]]; value <<= 6; - value |= b64unbase[input[1]]; value <<= 6; - value |= b64unbase[input[2]]; value <<= 6; - value |= b64unbase[input[3]]; - decoded[2] = (UC) (value & 0xff); value >>= 8; - decoded[1] = (UC) (value & 0xff); value >>= 8; - decoded[0] = (UC) value; - /* take care of paddding */ - valid = (input[2] == '=') ? 1 : (input[3] == '=') ? 2 : 3; - luaL_addlstring(buffer, (char *) decoded, valid); - return 0; - /* need more data */ - } else return size; -} - -/*-------------------------------------------------------------------------*\ -* Incrementally applies the Base64 transfer content encoding to a string -* A, B = b64(C, D) -* A is the encoded version of the largest prefix of C .. D that is -* divisible by 3. B has the remaining bytes of C .. D, *without* encoding. -* The easiest thing would be to concatenate the two strings and -* encode the result, but we can't afford that or Lua would dupplicate -* every chunk we received. -\*-------------------------------------------------------------------------*/ -static int mime_global_b64(lua_State *L) -{ - UC atom[3]; - size_t isize = 0, asize = 0; - const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); - const UC *last = input + isize; - luaL_Buffer buffer; - /* end-of-input blackhole */ - if (!input) { - lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* make sure we don't confuse buffer stuff with arguments */ - lua_settop(L, 2); - /* process first part of the input */ - luaL_buffinit(L, &buffer); - while (input < last) - asize = b64encode(*input++, atom, asize, &buffer); - input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); - /* if second part is nil, we are done */ - if (!input) { - size_t osize = 0; - asize = b64pad(atom, asize, &buffer); - luaL_pushresult(&buffer); - /* if the output is empty and the input is nil, return nil */ - lua_tolstring(L, -1, &osize); - if (osize == 0) lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* otherwise process the second part */ - last = input + isize; - while (input < last) - asize = b64encode(*input++, atom, asize, &buffer); - luaL_pushresult(&buffer); - lua_pushlstring(L, (char *) atom, asize); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Incrementally removes the Base64 transfer content encoding from a string -* A, B = b64(C, D) -* A is the encoded version of the largest prefix of C .. D that is -* divisible by 4. B has the remaining bytes of C .. D, *without* encoding. -\*-------------------------------------------------------------------------*/ -static int mime_global_unb64(lua_State *L) -{ - UC atom[4]; - size_t isize = 0, asize = 0; - const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); - const UC *last = input + isize; - luaL_Buffer buffer; - /* end-of-input blackhole */ - if (!input) { - lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* make sure we don't confuse buffer stuff with arguments */ - lua_settop(L, 2); - /* process first part of the input */ - luaL_buffinit(L, &buffer); - while (input < last) - asize = b64decode(*input++, atom, asize, &buffer); - input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); - /* if second is nil, we are done */ - if (!input) { - size_t osize = 0; - luaL_pushresult(&buffer); - /* if the output is empty and the input is nil, return nil */ - lua_tolstring(L, -1, &osize); - if (osize == 0) lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* otherwise, process the rest of the input */ - last = input + isize; - while (input < last) - asize = b64decode(*input++, atom, asize, &buffer); - luaL_pushresult(&buffer); - lua_pushlstring(L, (char *) atom, asize); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Quoted-printable encoding scheme -* all (except CRLF in text) can be =XX -* CLRL in not text must be =XX=XX -* 33 through 60 inclusive can be plain -* 62 through 126 inclusive can be plain -* 9 and 32 can be plain, unless in the end of a line, where must be =XX -* encoded lines must be no longer than 76 not counting CRLF -* soft line-break are =CRLF -* To encode one byte, we need to see the next two. -* Worst case is when we see a space, and wonder if a CRLF is comming -\*-------------------------------------------------------------------------*/ -/*-------------------------------------------------------------------------*\ -* Split quoted-printable characters into classes -* Precompute reverse map for encoding -\*-------------------------------------------------------------------------*/ -static void qpsetup(UC *cl, UC *unbase) -{ - int i; - for (i = 0; i < 256; i++) cl[i] = QP_QUOTED; - for (i = 33; i <= 60; i++) cl[i] = QP_PLAIN; - for (i = 62; i <= 126; i++) cl[i] = QP_PLAIN; - cl['\t'] = QP_IF_LAST; - cl[' '] = QP_IF_LAST; - cl['\r'] = QP_CR; - for (i = 0; i < 256; i++) unbase[i] = 255; - unbase['0'] = 0; unbase['1'] = 1; unbase['2'] = 2; - unbase['3'] = 3; unbase['4'] = 4; unbase['5'] = 5; - unbase['6'] = 6; unbase['7'] = 7; unbase['8'] = 8; - unbase['9'] = 9; unbase['A'] = 10; unbase['a'] = 10; - unbase['B'] = 11; unbase['b'] = 11; unbase['C'] = 12; - unbase['c'] = 12; unbase['D'] = 13; unbase['d'] = 13; - unbase['E'] = 14; unbase['e'] = 14; unbase['F'] = 15; - unbase['f'] = 15; -} - -/*-------------------------------------------------------------------------*\ -* Output one character in form =XX -\*-------------------------------------------------------------------------*/ -static void qpquote(UC c, luaL_Buffer *buffer) -{ - luaL_addchar(buffer, '='); - luaL_addchar(buffer, qpbase[c >> 4]); - luaL_addchar(buffer, qpbase[c & 0x0F]); -} - -/*-------------------------------------------------------------------------*\ -* Accumulate characters until we are sure about how to deal with them. -* Once we are sure, output to the buffer, in the correct form. -\*-------------------------------------------------------------------------*/ -static size_t qpencode(UC c, UC *input, size_t size, - const char *marker, luaL_Buffer *buffer) -{ - input[size++] = c; - /* deal with all characters we can have */ - while (size > 0) { - switch (qpclass[input[0]]) { - /* might be the CR of a CRLF sequence */ - case QP_CR: - if (size < 2) return size; - if (input[1] == '\n') { - luaL_addstring(buffer, marker); - return 0; - } else qpquote(input[0], buffer); - break; - /* might be a space and that has to be quoted if last in line */ - case QP_IF_LAST: - if (size < 3) return size; - /* if it is the last, quote it and we are done */ - if (input[1] == '\r' && input[2] == '\n') { - qpquote(input[0], buffer); - luaL_addstring(buffer, marker); - return 0; - } else luaL_addchar(buffer, input[0]); - break; - /* might have to be quoted always */ - case QP_QUOTED: - qpquote(input[0], buffer); - break; - /* might never have to be quoted */ - default: - luaL_addchar(buffer, input[0]); - break; - } - input[0] = input[1]; input[1] = input[2]; - size--; - } - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Deal with the final characters -\*-------------------------------------------------------------------------*/ -static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer) -{ - size_t i; - for (i = 0; i < size; i++) { - if (qpclass[input[i]] == QP_PLAIN) luaL_addchar(buffer, input[i]); - else qpquote(input[i], buffer); - } - if (size > 0) luaL_addstring(buffer, EQCRLF); - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Incrementally converts a string to quoted-printable -* A, B = qp(C, D, marker) -* Marker is the text to be used to replace CRLF sequences found in A. -* A is the encoded version of the largest prefix of C .. D that -* can be encoded without doubts. -* B has the remaining bytes of C .. D, *without* encoding. -\*-------------------------------------------------------------------------*/ -static int mime_global_qp(lua_State *L) -{ - - size_t asize = 0, isize = 0; - UC atom[3]; - const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); - const UC *last = input + isize; - const char *marker = luaL_optstring(L, 3, CRLF); - luaL_Buffer buffer; - /* end-of-input blackhole */ - if (!input) { - lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* make sure we don't confuse buffer stuff with arguments */ - lua_settop(L, 3); - /* process first part of input */ - luaL_buffinit(L, &buffer); - while (input < last) - asize = qpencode(*input++, atom, asize, marker, &buffer); - input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); - /* if second part is nil, we are done */ - if (!input) { - asize = qppad(atom, asize, &buffer); - luaL_pushresult(&buffer); - if (!(*lua_tostring(L, -1))) lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* otherwise process rest of input */ - last = input + isize; - while (input < last) - asize = qpencode(*input++, atom, asize, marker, &buffer); - luaL_pushresult(&buffer); - lua_pushlstring(L, (char *) atom, asize); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Accumulate characters until we are sure about how to deal with them. -* Once we are sure, output the to the buffer, in the correct form. -\*-------------------------------------------------------------------------*/ -static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer) { - int d; - input[size++] = c; - /* deal with all characters we can deal */ - switch (input[0]) { - /* if we have an escape character */ - case '=': - if (size < 3) return size; - /* eliminate soft line break */ - if (input[1] == '\r' && input[2] == '\n') return 0; - /* decode quoted representation */ - c = qpunbase[input[1]]; d = qpunbase[input[2]]; - /* if it is an invalid, do not decode */ - if (c > 15 || d > 15) luaL_addlstring(buffer, (char *)input, 3); - else luaL_addchar(buffer, (char) ((c << 4) + d)); - return 0; - case '\r': - if (size < 2) return size; - if (input[1] == '\n') luaL_addlstring(buffer, (char *)input, 2); - return 0; - default: - if (input[0] == '\t' || (input[0] > 31 && input[0] < 127)) - luaL_addchar(buffer, input[0]); - return 0; - } -} - -/*-------------------------------------------------------------------------*\ -* Incrementally decodes a string in quoted-printable -* A, B = qp(C, D) -* A is the decoded version of the largest prefix of C .. D that -* can be decoded without doubts. -* B has the remaining bytes of C .. D, *without* decoding. -\*-------------------------------------------------------------------------*/ -static int mime_global_unqp(lua_State *L) -{ - size_t asize = 0, isize = 0; - UC atom[3]; - const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); - const UC *last = input + isize; - luaL_Buffer buffer; - /* end-of-input blackhole */ - if (!input) { - lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* make sure we don't confuse buffer stuff with arguments */ - lua_settop(L, 2); - /* process first part of input */ - luaL_buffinit(L, &buffer); - while (input < last) - asize = qpdecode(*input++, atom, asize, &buffer); - input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); - /* if second part is nil, we are done */ - if (!input) { - luaL_pushresult(&buffer); - if (!(*lua_tostring(L, -1))) lua_pushnil(L); - lua_pushnil(L); - return 2; - } - /* otherwise process rest of input */ - last = input + isize; - while (input < last) - asize = qpdecode(*input++, atom, asize, &buffer); - luaL_pushresult(&buffer); - lua_pushlstring(L, (char *) atom, asize); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Incrementally breaks a quoted-printed string into lines -* A, n = qpwrp(l, B, length) -* A is a copy of B, broken into lines of at most 'length' bytes. -* 'l' is how many bytes are left for the first line of B. -* 'n' is the number of bytes left in the last line of A. -* There are two complications: lines can't be broken in the middle -* of an encoded =XX, and there might be line breaks already -\*-------------------------------------------------------------------------*/ -static int mime_global_qpwrp(lua_State *L) -{ - size_t size = 0; - int left = (int) luaL_checknumber(L, 1); - const UC *input = (const UC *) luaL_optlstring(L, 2, NULL, &size); - const UC *last = input + size; - int length = (int) luaL_optnumber(L, 3, 76); - luaL_Buffer buffer; - /* end-of-input blackhole */ - if (!input) { - if (left < length) lua_pushstring(L, EQCRLF); - else lua_pushnil(L); - lua_pushnumber(L, length); - return 2; - } - /* process all input */ - luaL_buffinit(L, &buffer); - while (input < last) { - switch (*input) { - case '\r': - break; - case '\n': - left = length; - luaL_addstring(&buffer, CRLF); - break; - case '=': - if (left <= 3) { - left = length; - luaL_addstring(&buffer, EQCRLF); - } - luaL_addchar(&buffer, *input); - left--; - break; - default: - if (left <= 1) { - left = length; - luaL_addstring(&buffer, EQCRLF); - } - luaL_addchar(&buffer, *input); - left--; - break; - } - input++; - } - luaL_pushresult(&buffer); - lua_pushnumber(L, left); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Here is what we do: \n, and \r are considered candidates for line -* break. We issue *one* new line marker if any of them is seen alone, or -* followed by a different one. That is, \n\n and \r\r will issue two -* end of line markers each, but \r\n, \n\r etc will only issue *one* -* marker. This covers Mac OS, Mac OS X, VMS, Unix and DOS, as well as -* probably other more obscure conventions. -* -* c is the current character being processed -* last is the previous character -\*-------------------------------------------------------------------------*/ -#define eolcandidate(c) (c == '\r' || c == '\n') -static int eolprocess(int c, int last, const char *marker, - luaL_Buffer *buffer) -{ - if (eolcandidate(c)) { - if (eolcandidate(last)) { - if (c == last) luaL_addstring(buffer, marker); - return 0; - } else { - luaL_addstring(buffer, marker); - return c; - } - } else { - luaL_addchar(buffer, (char) c); - return 0; - } -} - -/*-------------------------------------------------------------------------*\ -* Converts a string to uniform EOL convention. -* A, n = eol(o, B, marker) -* A is the converted version of the largest prefix of B that can be -* converted unambiguously. 'o' is the context returned by the previous -* call. 'n' is the new context. -\*-------------------------------------------------------------------------*/ -static int mime_global_eol(lua_State *L) -{ - int ctx = (int)luaL_checkinteger(L, 1); - size_t isize = 0; - const char *input = luaL_optlstring(L, 2, NULL, &isize); - const char *last = input + isize; - const char *marker = luaL_optstring(L, 3, CRLF); - luaL_Buffer buffer; - luaL_buffinit(L, &buffer); - /* end of input blackhole */ - if (!input) { - lua_pushnil(L); - lua_pushnumber(L, 0); - return 2; - } - /* process all input */ - while (input < last) - ctx = eolprocess(*input++, ctx, marker, &buffer); - luaL_pushresult(&buffer); - lua_pushnumber(L, ctx); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Takes one byte and stuff it if needed. -\*-------------------------------------------------------------------------*/ -static size_t dot(int c, size_t state, luaL_Buffer *buffer) -{ - luaL_addchar(buffer, (char) c); - switch (c) { - case '\r': - return 1; - case '\n': - return (state == 1)? 2: 0; - case '.': - if (state == 2) - luaL_addchar(buffer, '.'); - default: - return 0; - } -} - -/*-------------------------------------------------------------------------*\ -* Incrementally applies smtp stuffing to a string -* A, n = dot(l, D) -\*-------------------------------------------------------------------------*/ -static int mime_global_dot(lua_State *L) -{ - size_t isize = 0, state = (size_t) luaL_checknumber(L, 1); - const char *input = luaL_optlstring(L, 2, NULL, &isize); - const char *last = input + isize; - luaL_Buffer buffer; - /* end-of-input blackhole */ - if (!input) { - lua_pushnil(L); - lua_pushnumber(L, 2); - return 2; - } - /* process all input */ - luaL_buffinit(L, &buffer); - while (input < last) - state = dot(*input++, state, &buffer); - luaL_pushresult(&buffer); - lua_pushnumber(L, (lua_Number) state); - return 2; -} - diff --git a/build/premake/premake5/binmodules/luasocket/src/mime.h b/build/premake/premake5/binmodules/luasocket/src/mime.h deleted file mode 100644 index 99968a55d1..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/mime.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef MIME_H -#define MIME_H -/*=========================================================================*\ -* Core MIME support -* LuaSocket toolkit -* -* This module provides functions to implement transfer content encodings -* and formatting conforming to RFC 2045. It is used by mime.lua, which -* provide a higher level interface to this functionality. -\*=========================================================================*/ -#include "lua.h" - -/*-------------------------------------------------------------------------*\ -* Current MIME library version -\*-------------------------------------------------------------------------*/ -#define MIME_VERSION "MIME 1.0.3" -#define MIME_COPYRIGHT "Copyright (C) 2004-2013 Diego Nehab" -#define MIME_AUTHORS "Diego Nehab" - -/*-------------------------------------------------------------------------*\ -* This macro prefixes all exported API functions -\*-------------------------------------------------------------------------*/ -#ifndef MIME_API -#define MIME_API extern -#endif - -MIME_API int luaopen_mime_core(lua_State *L); - -#endif /* MIME_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/mime.lua b/build/premake/premake5/binmodules/luasocket/src/mime.lua deleted file mode 100644 index 642cd9ca6e..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/mime.lua +++ /dev/null @@ -1,90 +0,0 @@ ------------------------------------------------------------------------------ --- MIME support for the Lua language. --- Author: Diego Nehab --- Conforming to RFCs 2045-2049 ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local ltn12 = require("ltn12") -local mime = require("mime.core") -local io = require("io") -local string = require("string") -local _M = mime - --- encode, decode and wrap algorithm tables -local encodet, decodet, wrapt = {},{},{} - -_M.encodet = encodet -_M.decodet = decodet -_M.wrapt = wrapt - --- creates a function that chooses a filter by name from a given table -local function choose(table) - return function(name, opt1, opt2) - if base.type(name) ~= "string" then - name, opt1, opt2 = "default", name, opt1 - end - local f = table[name or "nil"] - if not f then - base.error("unknown key (" .. base.tostring(name) .. ")", 3) - else return f(opt1, opt2) end - end -end - --- define the encoding filters -encodet['base64'] = function() - return ltn12.filter.cycle(_M.b64, "") -end - -encodet['quoted-printable'] = function(mode) - return ltn12.filter.cycle(_M.qp, "", - (mode == "binary") and "=0D=0A" or "\r\n") -end - --- define the decoding filters -decodet['base64'] = function() - return ltn12.filter.cycle(_M.unb64, "") -end - -decodet['quoted-printable'] = function() - return ltn12.filter.cycle(_M.unqp, "") -end - -local function format(chunk) - if chunk then - if chunk == "" then return "''" - else return string.len(chunk) end - else return "nil" end -end - --- define the line-wrap filters -wrapt['text'] = function(length) - length = length or 76 - return ltn12.filter.cycle(_M.wrp, length, length) -end -wrapt['base64'] = wrapt['text'] -wrapt['default'] = wrapt['text'] - -wrapt['quoted-printable'] = function() - return ltn12.filter.cycle(_M.qpwrp, 76, 76) -end - --- function that choose the encoding, decoding or wrap algorithm -_M.encode = choose(encodet) -_M.decode = choose(decodet) -_M.wrap = choose(wrapt) - --- define the end-of-line normalization filter -function _M.normalize(marker) - return ltn12.filter.cycle(_M.eol, 0, marker) -end - --- high level stuffing filter -function _M.stuff() - return ltn12.filter.cycle(_M.dot, 2) -end - -return _M \ No newline at end of file diff --git a/build/premake/premake5/binmodules/luasocket/src/options.c b/build/premake/premake5/binmodules/luasocket/src/options.c deleted file mode 100644 index fabfe8ce3e..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/options.c +++ /dev/null @@ -1,374 +0,0 @@ -/*=========================================================================*\ -* Common option interface -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lauxlib.h" - -#include "auxiliar.h" -#include "options.h" -#include "inet.h" - - -/*=========================================================================*\ -* Internal functions prototypes -\*=========================================================================*/ -static int opt_setmembership(lua_State *L, p_socket ps, int level, int name); -static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name); -static int opt_setboolean(lua_State *L, p_socket ps, int level, int name); -static int opt_getboolean(lua_State *L, p_socket ps, int level, int name); -static int opt_setint(lua_State *L, p_socket ps, int level, int name); -static int opt_getint(lua_State *L, p_socket ps, int level, int name); -static int opt_set(lua_State *L, p_socket ps, int level, int name, - void *val, int len); -static int opt_get(lua_State *L, p_socket ps, int level, int name, - void *val, int* len); - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Calls appropriate option handler -\*-------------------------------------------------------------------------*/ -int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps) -{ - const char *name = luaL_checkstring(L, 2); /* obj, name, ... */ - while (opt->name && strcmp(name, opt->name)) - opt++; - if (!opt->func) { - char msg[57]; - sprintf(msg, "unsupported option `%.35s'", name); - luaL_argerror(L, 2, msg); - } - return opt->func(L, ps); -} - -int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps) -{ - const char *name = luaL_checkstring(L, 2); /* obj, name, ... */ - while (opt->name && strcmp(name, opt->name)) - opt++; - if (!opt->func) { - char msg[57]; - sprintf(msg, "unsupported option `%.35s'", name); - luaL_argerror(L, 2, msg); - } - return opt->func(L, ps); -} - -/* enables reuse of local address */ -int opt_set_reuseaddr(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEADDR); -} - -int opt_get_reuseaddr(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEADDR); -} - -/* enables reuse of local port */ -int opt_set_reuseport(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEPORT); -} - -int opt_get_reuseport(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEPORT); -} - -/* disables the Naggle algorithm */ -int opt_set_tcp_nodelay(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, IPPROTO_TCP, TCP_NODELAY); -} - -int opt_get_tcp_nodelay(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, IPPROTO_TCP, TCP_NODELAY); -} - -int opt_set_keepalive(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE); -} - -int opt_get_keepalive(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE); -} - -int opt_set_dontroute(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, SOL_SOCKET, SO_DONTROUTE); -} - -int opt_get_dontroute(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, SOL_SOCKET, SO_DONTROUTE); -} - -int opt_set_broadcast(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, SOL_SOCKET, SO_BROADCAST); -} - -int opt_get_broadcast(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, SOL_SOCKET, SO_BROADCAST); -} - -int opt_set_ip6_unicast_hops(lua_State *L, p_socket ps) -{ - return opt_setint(L, ps, IPPROTO_IPV6, IPV6_UNICAST_HOPS); -} - -int opt_get_ip6_unicast_hops(lua_State *L, p_socket ps) -{ - return opt_getint(L, ps, IPPROTO_IPV6, IPV6_UNICAST_HOPS); -} - -int opt_set_ip6_multicast_hops(lua_State *L, p_socket ps) -{ - return opt_setint(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_HOPS); -} - -int opt_get_ip6_multicast_hops(lua_State *L, p_socket ps) -{ - return opt_getint(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_HOPS); -} - -int opt_set_ip_multicast_loop(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP); -} - -int opt_get_ip_multicast_loop(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP); -} - -int opt_set_ip6_multicast_loop(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_LOOP); -} - -int opt_get_ip6_multicast_loop(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_LOOP); -} - -int opt_set_linger(lua_State *L, p_socket ps) -{ - struct linger li; /* obj, name, table */ - if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); - lua_pushstring(L, "on"); - lua_gettable(L, 3); - if (!lua_isboolean(L, -1)) - luaL_argerror(L, 3, "boolean 'on' field expected"); - li.l_onoff = (u_short) lua_toboolean(L, -1); - lua_pushstring(L, "timeout"); - lua_gettable(L, 3); - if (!lua_isnumber(L, -1)) - luaL_argerror(L, 3, "number 'timeout' field expected"); - li.l_linger = (u_short) lua_tonumber(L, -1); - return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li)); -} - -int opt_get_linger(lua_State *L, p_socket ps) -{ - struct linger li; /* obj, name */ - int len = sizeof(li); - int err = opt_get(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, &len); - if (err) - return err; - lua_newtable(L); - lua_pushboolean(L, li.l_onoff); - lua_setfield(L, -2, "on"); - lua_pushinteger(L, li.l_linger); - lua_setfield(L, -2, "timeout"); - return 1; -} - -int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps) -{ - return opt_setint(L, ps, IPPROTO_IP, IP_MULTICAST_TTL); -} - -int opt_set_ip_multicast_if(lua_State *L, p_socket ps) -{ - const char *address = luaL_checkstring(L, 3); /* obj, name, ip */ - struct in_addr val; - val.s_addr = htonl(INADDR_ANY); - if (strcmp(address, "*") && !inet_aton(address, &val)) - luaL_argerror(L, 3, "ip expected"); - return opt_set(L, ps, IPPROTO_IP, IP_MULTICAST_IF, - (char *) &val, sizeof(val)); -} - -int opt_get_ip_multicast_if(lua_State *L, p_socket ps) -{ - struct in_addr val; - socklen_t len = sizeof(val); - if (getsockopt(*ps, IPPROTO_IP, IP_MULTICAST_IF, (char *) &val, &len) < 0) { - lua_pushnil(L); - lua_pushstring(L, "getsockopt failed"); - return 2; - } - lua_pushstring(L, inet_ntoa(val)); - return 1; -} - -int opt_set_ip_add_membership(lua_State *L, p_socket ps) -{ - return opt_setmembership(L, ps, IPPROTO_IP, IP_ADD_MEMBERSHIP); -} - -int opt_set_ip_drop_membersip(lua_State *L, p_socket ps) -{ - return opt_setmembership(L, ps, IPPROTO_IP, IP_DROP_MEMBERSHIP); -} - -int opt_set_ip6_add_membership(lua_State *L, p_socket ps) -{ - return opt_ip6_setmembership(L, ps, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP); -} - -int opt_set_ip6_drop_membersip(lua_State *L, p_socket ps) -{ - return opt_ip6_setmembership(L, ps, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP); -} - -int opt_get_ip6_v6only(lua_State *L, p_socket ps) -{ - return opt_getboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY); -} - -int opt_set_ip6_v6only(lua_State *L, p_socket ps) -{ - return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY); -} - -/*=========================================================================*\ -* Auxiliar functions -\*=========================================================================*/ -static int opt_setmembership(lua_State *L, p_socket ps, int level, int name) -{ - struct ip_mreq val; /* obj, name, table */ - if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); - lua_pushstring(L, "multiaddr"); - lua_gettable(L, 3); - if (!lua_isstring(L, -1)) - luaL_argerror(L, 3, "string 'multiaddr' field expected"); - if (!inet_aton(lua_tostring(L, -1), &val.imr_multiaddr)) - luaL_argerror(L, 3, "invalid 'multiaddr' ip address"); - lua_pushstring(L, "interface"); - lua_gettable(L, 3); - if (!lua_isstring(L, -1)) - luaL_argerror(L, 3, "string 'interface' field expected"); - val.imr_interface.s_addr = htonl(INADDR_ANY); - if (strcmp(lua_tostring(L, -1), "*") && - !inet_aton(lua_tostring(L, -1), &val.imr_interface)) - luaL_argerror(L, 3, "invalid 'interface' ip address"); - return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); -} - -static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name) -{ - struct ipv6_mreq val; /* obj, opt-name, table */ - memset(&val, 0, sizeof(val)); - if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); - lua_pushstring(L, "multiaddr"); - lua_gettable(L, 3); - if (!lua_isstring(L, -1)) - luaL_argerror(L, 3, "string 'multiaddr' field expected"); - if (!inet_pton(AF_INET6, lua_tostring(L, -1), &val.ipv6mr_multiaddr)) - luaL_argerror(L, 3, "invalid 'multiaddr' ip address"); - lua_pushstring(L, "interface"); - lua_gettable(L, 3); - /* By default we listen to interface on default route - * (sigh). However, interface= can override it. We should - * support either number, or name for it. Waiting for - * windows port of if_nametoindex */ - if (!lua_isnil(L, -1)) { - if (lua_isnumber(L, -1)) { - val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1); - } else - luaL_argerror(L, -1, "number 'interface' field expected"); - } - return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); -} - -static -int opt_get(lua_State *L, p_socket ps, int level, int name, void *val, int* len) -{ - socklen_t socklen = *len; - if (getsockopt(*ps, level, name, (char *) val, &socklen) < 0) { - lua_pushnil(L); - lua_pushstring(L, "getsockopt failed"); - return 2; - } - *len = socklen; - return 0; -} - -static -int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len) -{ - if (setsockopt(*ps, level, name, (char *) val, len) < 0) { - lua_pushnil(L); - lua_pushstring(L, "setsockopt failed"); - return 2; - } - lua_pushnumber(L, 1); - return 1; -} - -static int opt_getboolean(lua_State *L, p_socket ps, int level, int name) -{ - int val = 0; - int len = sizeof(val); - int err = opt_get(L, ps, level, name, (char *) &val, &len); - if (err) - return err; - lua_pushboolean(L, val); - return 1; -} - -int opt_get_error(lua_State *L, p_socket ps) -{ - int val = 0; - socklen_t len = sizeof(val); - if (getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *) &val, &len) < 0) { - lua_pushnil(L); - lua_pushstring(L, "getsockopt failed"); - return 2; - } - lua_pushstring(L, socket_strerror(val)); - return 1; -} - -static int opt_setboolean(lua_State *L, p_socket ps, int level, int name) -{ - int val = auxiliar_checkboolean(L, 3); /* obj, name, bool */ - return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); -} - -static int opt_getint(lua_State *L, p_socket ps, int level, int name) -{ - int val = 0; - int len = sizeof(val); - int err = opt_get(L, ps, level, name, (char *) &val, &len); - if (err) - return err; - lua_pushnumber(L, val); - return 1; -} - -static int opt_setint(lua_State *L, p_socket ps, int level, int name) -{ - int val = (int) lua_tonumber(L, 3); /* obj, name, int */ - return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); -} diff --git a/build/premake/premake5/binmodules/luasocket/src/options.h b/build/premake/premake5/binmodules/luasocket/src/options.h deleted file mode 100644 index 19ba0dfc2c..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/options.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef OPTIONS_H -#define OPTIONS_H -/*=========================================================================*\ -* Common option interface -* LuaSocket toolkit -* -* This module provides a common interface to socket options, used mainly by -* modules UDP and TCP. -\*=========================================================================*/ - -#include "lua.h" -#include "socket.h" - -/* option registry */ -typedef struct t_opt { - const char *name; - int (*func)(lua_State *L, p_socket ps); -} t_opt; -typedef t_opt *p_opt; - -/* supported options for setoption */ -int opt_set_dontroute(lua_State *L, p_socket ps); -int opt_set_broadcast(lua_State *L, p_socket ps); -int opt_set_tcp_nodelay(lua_State *L, p_socket ps); -int opt_set_keepalive(lua_State *L, p_socket ps); -int opt_set_linger(lua_State *L, p_socket ps); -int opt_set_reuseaddr(lua_State *L, p_socket ps); -int opt_set_reuseport(lua_State *L, p_socket ps); -int opt_set_ip_multicast_if(lua_State *L, p_socket ps); -int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps); -int opt_set_ip_multicast_loop(lua_State *L, p_socket ps); -int opt_set_ip_add_membership(lua_State *L, p_socket ps); -int opt_set_ip_drop_membersip(lua_State *L, p_socket ps); -int opt_set_ip6_unicast_hops(lua_State *L, p_socket ps); -int opt_set_ip6_multicast_hops(lua_State *L, p_socket ps); -int opt_set_ip6_multicast_loop(lua_State *L, p_socket ps); -int opt_set_ip6_add_membership(lua_State *L, p_socket ps); -int opt_set_ip6_drop_membersip(lua_State *L, p_socket ps); -int opt_set_ip6_v6only(lua_State *L, p_socket ps); - -/* supported options for getoption */ -int opt_get_dontroute(lua_State *L, p_socket ps); -int opt_get_broadcast(lua_State *L, p_socket ps); -int opt_get_reuseaddr(lua_State *L, p_socket ps); -int opt_get_reuseport(lua_State *L, p_socket ps); -int opt_get_tcp_nodelay(lua_State *L, p_socket ps); -int opt_get_keepalive(lua_State *L, p_socket ps); -int opt_get_linger(lua_State *L, p_socket ps); -int opt_get_ip_multicast_loop(lua_State *L, p_socket ps); -int opt_get_ip_multicast_if(lua_State *L, p_socket ps); -int opt_get_error(lua_State *L, p_socket ps); -int opt_get_ip6_multicast_loop(lua_State *L, p_socket ps); -int opt_get_ip6_multicast_hops(lua_State *L, p_socket ps); -int opt_get_ip6_unicast_hops(lua_State *L, p_socket ps); -int opt_get_ip6_v6only(lua_State *L, p_socket ps); -int opt_get_reuseport(lua_State *L, p_socket ps); - -/* invokes the appropriate option handler */ -int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps); -int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps); - -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/pierror.h b/build/premake/premake5/binmodules/luasocket/src/pierror.h deleted file mode 100644 index cb773ab7f4..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/pierror.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef PIERROR_H -#define PIERROR_H -/*=========================================================================*\ -* Error messages -* Defines platform independent error messages -\*=========================================================================*/ - -#define PIE_HOST_NOT_FOUND "host not found" -#define PIE_ADDRINUSE "address already in use" -#define PIE_ISCONN "already connected" -#define PIE_ACCESS "permission denied" -#define PIE_CONNREFUSED "connection refused" -#define PIE_CONNABORTED "closed" -#define PIE_CONNRESET "closed" -#define PIE_TIMEDOUT "timeout" -#define PIE_AGAIN "temporary failure in name resolution" -#define PIE_BADFLAGS "invalid value for ai_flags" -#define PIE_BADHINTS "invalid value for hints" -#define PIE_FAIL "non-recoverable failure in name resolution" -#define PIE_FAMILY "ai_family not supported" -#define PIE_MEMORY "memory allocation failure" -#define PIE_NONAME "host or service not provided, or not known" -#define PIE_OVERFLOW "argument buffer overflow" -#define PIE_PROTOCOL "resolved protocol is unknown" -#define PIE_SERVICE "service not supported for socket type" -#define PIE_SOCKTYPE "ai_socktype not supported" - -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/select.c b/build/premake/premake5/binmodules/luasocket/src/select.c deleted file mode 100644 index 9d133b7ab4..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/select.c +++ /dev/null @@ -1,220 +0,0 @@ -/*=========================================================================*\ -* Select implementation -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "socket.h" -#include "timeout.h" -#include "select.h" - -/*=========================================================================*\ -* Internal function prototypes. -\*=========================================================================*/ -static t_socket getfd(lua_State *L); -static int dirty(lua_State *L); -static void collect_fd(lua_State *L, int tab, int itab, - fd_set *set, t_socket *max_fd); -static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set); -static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, - int itab, int tab, int start); -static void make_assoc(lua_State *L, int tab); -static int global_select(lua_State *L); - -/* functions in library namespace */ -static luaL_Reg func[] = { - {"select", global_select}, - {NULL, NULL} -}; - -/*=========================================================================*\ -* Exported functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int select_open(lua_State *L) { - lua_pushstring(L, "_SETSIZE"); - lua_pushinteger(L, FD_SETSIZE); - lua_rawset(L, -3); - lua_pushstring(L, "_SOCKETINVALID"); - lua_pushinteger(L, SOCKET_INVALID); - lua_rawset(L, -3); - luaL_setfuncs(L, func, 0); - return 0; -} - -/*=========================================================================*\ -* Global Lua functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Waits for a set of sockets until a condition is met or timeout. -\*-------------------------------------------------------------------------*/ -static int global_select(lua_State *L) { - int rtab, wtab, itab, ret, ndirty; - t_socket max_fd = SOCKET_INVALID; - fd_set rset, wset; - t_timeout tm; - double t = luaL_optnumber(L, 3, -1); - FD_ZERO(&rset); FD_ZERO(&wset); - lua_settop(L, 3); - lua_newtable(L); itab = lua_gettop(L); - lua_newtable(L); rtab = lua_gettop(L); - lua_newtable(L); wtab = lua_gettop(L); - collect_fd(L, 1, itab, &rset, &max_fd); - collect_fd(L, 2, itab, &wset, &max_fd); - ndirty = check_dirty(L, 1, rtab, &rset); - t = ndirty > 0? 0.0: t; - timeout_init(&tm, t, -1); - timeout_markstart(&tm); - ret = socket_select(max_fd+1, &rset, &wset, NULL, &tm); - if (ret > 0 || ndirty > 0) { - return_fd(L, &rset, max_fd+1, itab, rtab, ndirty); - return_fd(L, &wset, max_fd+1, itab, wtab, 0); - make_assoc(L, rtab); - make_assoc(L, wtab); - return 2; - } else if (ret == 0) { - lua_pushstring(L, "timeout"); - return 3; - } else { - luaL_error(L, "select failed"); - return 3; - } -} - -/*=========================================================================*\ -* Internal functions -\*=========================================================================*/ -static t_socket getfd(lua_State *L) { - t_socket fd = SOCKET_INVALID; - lua_pushstring(L, "getfd"); - lua_gettable(L, -2); - if (!lua_isnil(L, -1)) { - lua_pushvalue(L, -2); - lua_call(L, 1, 1); - if (lua_isnumber(L, -1)) { - double numfd = lua_tonumber(L, -1); - fd = (numfd >= 0.0)? (t_socket) numfd: SOCKET_INVALID; - } - } - lua_pop(L, 1); - return fd; -} - -static int dirty(lua_State *L) { - int is = 0; - lua_pushstring(L, "dirty"); - lua_gettable(L, -2); - if (!lua_isnil(L, -1)) { - lua_pushvalue(L, -2); - lua_call(L, 1, 1); - is = lua_toboolean(L, -1); - } - lua_pop(L, 1); - return is; -} - -static void collect_fd(lua_State *L, int tab, int itab, - fd_set *set, t_socket *max_fd) { - int i = 1, n = 0; - /* nil is the same as an empty table */ - if (lua_isnil(L, tab)) return; - /* otherwise we need it to be a table */ - luaL_checktype(L, tab, LUA_TTABLE); - for ( ;; ) { - t_socket fd; - lua_pushnumber(L, i); - lua_gettable(L, tab); - if (lua_isnil(L, -1)) { - lua_pop(L, 1); - break; - } - /* getfd figures out if this is a socket */ - fd = getfd(L); - if (fd != SOCKET_INVALID) { - /* make sure we don't overflow the fd_set */ -#ifdef _WIN32 - if (n >= FD_SETSIZE) - luaL_argerror(L, tab, "too many sockets"); -#else - if (fd >= FD_SETSIZE) - luaL_argerror(L, tab, "descriptor too large for set size"); -#endif - FD_SET(fd, set); - n++; - /* keep track of the largest descriptor so far */ - if (*max_fd == SOCKET_INVALID || *max_fd < fd) - *max_fd = fd; - /* make sure we can map back from descriptor to the object */ - lua_pushnumber(L, (lua_Number) fd); - lua_pushvalue(L, -2); - lua_settable(L, itab); - } - lua_pop(L, 1); - i = i + 1; - } -} - -static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) { - int ndirty = 0, i = 1; - if (lua_isnil(L, tab)) - return 0; - for ( ;; ) { - t_socket fd; - lua_pushnumber(L, i); - lua_gettable(L, tab); - if (lua_isnil(L, -1)) { - lua_pop(L, 1); - break; - } - fd = getfd(L); - if (fd != SOCKET_INVALID && dirty(L)) { - lua_pushnumber(L, ++ndirty); - lua_pushvalue(L, -2); - lua_settable(L, dtab); - FD_CLR(fd, set); - } - lua_pop(L, 1); - i = i + 1; - } - return ndirty; -} - -static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, - int itab, int tab, int start) { - t_socket fd; - for (fd = 0; fd < max_fd; fd++) { - if (FD_ISSET(fd, set)) { - lua_pushnumber(L, ++start); - lua_pushnumber(L, (lua_Number) fd); - lua_gettable(L, itab); - lua_settable(L, tab); - } - } -} - -static void make_assoc(lua_State *L, int tab) { - int i = 1, atab; - lua_newtable(L); atab = lua_gettop(L); - for ( ;; ) { - lua_pushnumber(L, i); - lua_gettable(L, tab); - if (!lua_isnil(L, -1)) { - lua_pushnumber(L, i); - lua_pushvalue(L, -2); - lua_settable(L, atab); - lua_pushnumber(L, i); - lua_settable(L, atab); - } else { - lua_pop(L, 1); - break; - } - i = i+1; - } -} - diff --git a/build/premake/premake5/binmodules/luasocket/src/select.h b/build/premake/premake5/binmodules/luasocket/src/select.h deleted file mode 100644 index 8750200395..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/select.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef SELECT_H -#define SELECT_H -/*=========================================================================*\ -* Select implementation -* LuaSocket toolkit -* -* Each object that can be passed to the select function has to export -* method getfd() which returns the descriptor to be passed to the -* underlying select function. Another method, dirty(), should return -* true if there is data ready for reading (required for buffered input). -\*=========================================================================*/ - -int select_open(lua_State *L); - -#endif /* SELECT_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/serial.c b/build/premake/premake5/binmodules/luasocket/src/serial.c deleted file mode 100644 index 7bdb21c330..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/serial.c +++ /dev/null @@ -1,172 +0,0 @@ -/*=========================================================================*\ -* Serial stream -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lua.h" -#include "lauxlib.h" - -#include "auxiliar.h" -#include "socket.h" -#include "options.h" -#include "unix.h" -#include - -/* -Reuses userdata definition from unix.h, since it is useful for all -stream-like objects. - -If we stored the serial path for use in error messages or userdata -printing, we might need our own userdata definition. - -Group usage is semi-inherited from unix.c, but unnecessary since we -have only one object type. -*/ - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int global_create(lua_State *L); -static int meth_send(lua_State *L); -static int meth_receive(lua_State *L); -static int meth_close(lua_State *L); -static int meth_settimeout(lua_State *L); -static int meth_getfd(lua_State *L); -static int meth_setfd(lua_State *L); -static int meth_dirty(lua_State *L); -static int meth_getstats(lua_State *L); -static int meth_setstats(lua_State *L); - -/* serial object methods */ -static luaL_Reg serial_methods[] = { - {"__gc", meth_close}, - {"__tostring", auxiliar_tostring}, - {"close", meth_close}, - {"dirty", meth_dirty}, - {"getfd", meth_getfd}, - {"getstats", meth_getstats}, - {"setstats", meth_setstats}, - {"receive", meth_receive}, - {"send", meth_send}, - {"setfd", meth_setfd}, - {"settimeout", meth_settimeout}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -LUASOCKET_API int luaopen_socket_serial(lua_State *L) { - /* create classes */ - auxiliar_newclass(L, "serial{client}", serial_methods); - /* create class groups */ - auxiliar_add2group(L, "serial{client}", "serial{any}"); - lua_pushcfunction(L, global_create); - return 1; -} - -/*=========================================================================*\ -* Lua methods -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Just call buffered IO methods -\*-------------------------------------------------------------------------*/ -static int meth_send(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); - return buffer_meth_send(L, &un->buf); -} - -static int meth_receive(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); - return buffer_meth_receive(L, &un->buf); -} - -static int meth_getstats(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); - return buffer_meth_getstats(L, &un->buf); -} - -static int meth_setstats(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); - return buffer_meth_setstats(L, &un->buf); -} - -/*-------------------------------------------------------------------------*\ -* Select support methods -\*-------------------------------------------------------------------------*/ -static int meth_getfd(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); - lua_pushnumber(L, (int) un->sock); - return 1; -} - -/* this is very dangerous, but can be handy for those that are brave enough */ -static int meth_setfd(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); - un->sock = (t_socket) luaL_checknumber(L, 2); - return 0; -} - -static int meth_dirty(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); - lua_pushboolean(L, !buffer_isempty(&un->buf)); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Closes socket used by object -\*-------------------------------------------------------------------------*/ -static int meth_close(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); - socket_destroy(&un->sock); - lua_pushnumber(L, 1); - return 1; -} - - -/*-------------------------------------------------------------------------*\ -* Just call tm methods -\*-------------------------------------------------------------------------*/ -static int meth_settimeout(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); - return timeout_meth_settimeout(L, &un->tm); -} - -/*=========================================================================*\ -* Library functions -\*=========================================================================*/ - - -/*-------------------------------------------------------------------------*\ -* Creates a serial object -\*-------------------------------------------------------------------------*/ -static int global_create(lua_State *L) { - const char* path = luaL_checkstring(L, 1); - - /* allocate unix object */ - p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix)); - - /* open serial device */ - t_socket sock = open(path, O_NOCTTY|O_RDWR); - - /*printf("open %s on %d\n", path, sock);*/ - - if (sock < 0) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(errno)); - lua_pushnumber(L, errno); - return 3; - } - /* set its type as client object */ - auxiliar_setclass(L, "serial{client}", -1); - /* initialize remaining structure fields */ - socket_setnonblocking(&sock); - un->sock = sock; - io_init(&un->io, (p_send) socket_write, (p_recv) socket_read, - (p_error) socket_ioerror, &un->sock); - timeout_init(&un->tm, -1, -1); - buffer_init(&un->buf, &un->io, &un->tm); - return 1; -} diff --git a/build/premake/premake5/binmodules/luasocket/src/smtp.lua b/build/premake/premake5/binmodules/luasocket/src/smtp.lua deleted file mode 100644 index b113d00677..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/smtp.lua +++ /dev/null @@ -1,256 +0,0 @@ ------------------------------------------------------------------------------ --- SMTP client support for the Lua language. --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local coroutine = require("coroutine") -local string = require("string") -local math = require("math") -local os = require("os") -local socket = require("socket") -local tp = require("socket.tp") -local ltn12 = require("ltn12") -local headers = require("socket.headers") -local mime = require("mime") - -socket.smtp = {} -local _M = socket.smtp - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ --- timeout for connection -_M.TIMEOUT = 60 --- default server used to send e-mails -_M.SERVER = "localhost" --- default port -_M.PORT = 25 --- domain used in HELO command and default sendmail --- If we are under a CGI, try to get from environment -_M.DOMAIN = os.getenv("SERVER_NAME") or "localhost" --- default time zone (means we don't know) -_M.ZONE = "-0000" - ---------------------------------------------------------------------------- --- Low level SMTP API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function metat.__index:greet(domain) - self.try(self.tp:check("2..")) - self.try(self.tp:command("EHLO", domain or _M.DOMAIN)) - return socket.skip(1, self.try(self.tp:check("2.."))) -end - -function metat.__index:mail(from) - self.try(self.tp:command("MAIL", "FROM:" .. from)) - return self.try(self.tp:check("2..")) -end - -function metat.__index:rcpt(to) - self.try(self.tp:command("RCPT", "TO:" .. to)) - return self.try(self.tp:check("2..")) -end - -function metat.__index:data(src, step) - self.try(self.tp:command("DATA")) - self.try(self.tp:check("3..")) - self.try(self.tp:source(src, step)) - self.try(self.tp:send("\r\n.\r\n")) - return self.try(self.tp:check("2..")) -end - -function metat.__index:quit() - self.try(self.tp:command("QUIT")) - return self.try(self.tp:check("2..")) -end - -function metat.__index:close() - return self.tp:close() -end - -function metat.__index:login(user, password) - self.try(self.tp:command("AUTH", "LOGIN")) - self.try(self.tp:check("3..")) - self.try(self.tp:send(mime.b64(user) .. "\r\n")) - self.try(self.tp:check("3..")) - self.try(self.tp:send(mime.b64(password) .. "\r\n")) - return self.try(self.tp:check("2..")) -end - -function metat.__index:plain(user, password) - local auth = "PLAIN " .. mime.b64("\0" .. user .. "\0" .. password) - self.try(self.tp:command("AUTH", auth)) - return self.try(self.tp:check("2..")) -end - -function metat.__index:auth(user, password, ext) - if not user or not password then return 1 end - if string.find(ext, "AUTH[^\n]+LOGIN") then - return self:login(user, password) - elseif string.find(ext, "AUTH[^\n]+PLAIN") then - return self:plain(user, password) - else - self.try(nil, "authentication not supported") - end -end - --- send message or throw an exception -function metat.__index:send(mailt) - self:mail(mailt.from) - if base.type(mailt.rcpt) == "table" then - for i,v in base.ipairs(mailt.rcpt) do - self:rcpt(v) - end - else - self:rcpt(mailt.rcpt) - end - self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step) -end - -function _M.open(server, port, create) - local tp = socket.try(tp.connect(server or _M.SERVER, port or _M.PORT, - _M.TIMEOUT, create)) - local s = base.setmetatable({tp = tp}, metat) - -- make sure tp is closed if we get an exception - s.try = socket.newtry(function() - s:close() - end) - return s -end - --- convert headers to lowercase -local function lower_headers(headers) - local lower = {} - for i,v in base.pairs(headers or lower) do - lower[string.lower(i)] = v - end - return lower -end - ---------------------------------------------------------------------------- --- Multipart message source ------------------------------------------------------------------------------ --- returns a hopefully unique mime boundary -local seqno = 0 -local function newboundary() - seqno = seqno + 1 - return string.format('%s%05d==%05u', os.date('%d%m%Y%H%M%S'), - math.random(0, 99999), seqno) -end - --- send_message forward declaration -local send_message - --- yield the headers all at once, it's faster -local function send_headers(tosend) - local canonic = headers.canonic - local h = "\r\n" - for f,v in base.pairs(tosend) do - h = (canonic[f] or f) .. ': ' .. v .. "\r\n" .. h - end - coroutine.yield(h) -end - --- yield multipart message body from a multipart message table -local function send_multipart(mesgt) - -- make sure we have our boundary and send headers - local bd = newboundary() - local headers = lower_headers(mesgt.headers or {}) - headers['content-type'] = headers['content-type'] or 'multipart/mixed' - headers['content-type'] = headers['content-type'] .. - '; boundary="' .. bd .. '"' - send_headers(headers) - -- send preamble - if mesgt.body.preamble then - coroutine.yield(mesgt.body.preamble) - coroutine.yield("\r\n") - end - -- send each part separated by a boundary - for i, m in base.ipairs(mesgt.body) do - coroutine.yield("\r\n--" .. bd .. "\r\n") - send_message(m) - end - -- send last boundary - coroutine.yield("\r\n--" .. bd .. "--\r\n\r\n") - -- send epilogue - if mesgt.body.epilogue then - coroutine.yield(mesgt.body.epilogue) - coroutine.yield("\r\n") - end -end - --- yield message body from a source -local function send_source(mesgt) - -- make sure we have a content-type - local headers = lower_headers(mesgt.headers or {}) - headers['content-type'] = headers['content-type'] or - 'text/plain; charset="iso-8859-1"' - send_headers(headers) - -- send body from source - while true do - local chunk, err = mesgt.body() - if err then coroutine.yield(nil, err) - elseif chunk then coroutine.yield(chunk) - else break end - end -end - --- yield message body from a string -local function send_string(mesgt) - -- make sure we have a content-type - local headers = lower_headers(mesgt.headers or {}) - headers['content-type'] = headers['content-type'] or - 'text/plain; charset="iso-8859-1"' - send_headers(headers) - -- send body from string - coroutine.yield(mesgt.body) -end - --- message source -function send_message(mesgt) - if base.type(mesgt.body) == "table" then send_multipart(mesgt) - elseif base.type(mesgt.body) == "function" then send_source(mesgt) - else send_string(mesgt) end -end - --- set defaul headers -local function adjust_headers(mesgt) - local lower = lower_headers(mesgt.headers) - lower["date"] = lower["date"] or - os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE) - lower["x-mailer"] = lower["x-mailer"] or socket._VERSION - -- this can't be overriden - lower["mime-version"] = "1.0" - return lower -end - -function _M.message(mesgt) - mesgt.headers = adjust_headers(mesgt) - -- create and return message source - local co = coroutine.create(function() send_message(mesgt) end) - return function() - local ret, a, b = coroutine.resume(co) - if ret then return a, b - else return nil, a end - end -end - ---------------------------------------------------------------------------- --- High level SMTP API ------------------------------------------------------------------------------ -_M.send = socket.protect(function(mailt) - local s = _M.open(mailt.server, mailt.port, mailt.create) - local ext = s:greet(mailt.domain) - s:auth(mailt.user, mailt.password, ext) - s:send(mailt) - s:quit() - return s:close() -end) - -return _M \ No newline at end of file diff --git a/build/premake/premake5/binmodules/luasocket/src/socket.h b/build/premake/premake5/binmodules/luasocket/src/socket.h deleted file mode 100644 index 63573de5da..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/socket.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef SOCKET_H -#define SOCKET_H -/*=========================================================================*\ -* Socket compatibilization module -* LuaSocket toolkit -* -* BSD Sockets and WinSock are similar, but there are a few irritating -* differences. Also, not all *nix platforms behave the same. This module -* (and the associated usocket.h and wsocket.h) factor these differences and -* creates a interface compatible with the io.h module. -\*=========================================================================*/ -#include "io.h" - -/*=========================================================================*\ -* Platform specific compatibilization -\*=========================================================================*/ -#ifdef _WIN32 -#include "wsocket.h" -#else -#include "usocket.h" -#endif - -/*=========================================================================*\ -* The connect and accept functions accept a timeout and their -* implementations are somewhat complicated. We chose to move -* the timeout control into this module for these functions in -* order to simplify the modules that use them. -\*=========================================================================*/ -#include "timeout.h" - -/* we are lazy... */ -typedef struct sockaddr SA; - -/*=========================================================================*\ -* Functions bellow implement a comfortable platform independent -* interface to sockets -\*=========================================================================*/ -int socket_open(void); -int socket_close(void); -void socket_destroy(p_socket ps); -void socket_shutdown(p_socket ps, int how); -int socket_sendto(p_socket ps, const char *data, size_t count, - size_t *sent, SA *addr, socklen_t addr_len, p_timeout tm); -int socket_recvfrom(p_socket ps, char *data, size_t count, - size_t *got, SA *addr, socklen_t *addr_len, p_timeout tm); - -void socket_setnonblocking(p_socket ps); -void socket_setblocking(p_socket ps); - -int socket_waitfd(p_socket ps, int sw, p_timeout tm); -int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, - p_timeout tm); - -int socket_connect(p_socket ps, SA *addr, socklen_t addr_len, p_timeout tm); -int socket_create(p_socket ps, int domain, int type, int protocol); -int socket_bind(p_socket ps, SA *addr, socklen_t addr_len); -int socket_listen(p_socket ps, int backlog); -int socket_accept(p_socket ps, p_socket pa, SA *addr, - socklen_t *addr_len, p_timeout tm); - -const char *socket_hoststrerror(int err); -const char *socket_gaistrerror(int err); -const char *socket_strerror(int err); - -/* these are perfect to use with the io abstraction module - and the buffered input module */ -int socket_send(p_socket ps, const char *data, size_t count, - size_t *sent, p_timeout tm); -int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm); -int socket_write(p_socket ps, const char *data, size_t count, - size_t *sent, p_timeout tm); -int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm); -const char *socket_ioerror(p_socket ps, int err); - -int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp); -int socket_gethostbyname(const char *addr, struct hostent **hp); - -#endif /* SOCKET_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/socket.lua b/build/premake/premake5/binmodules/luasocket/src/socket.lua deleted file mode 100644 index d1c0b16492..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/socket.lua +++ /dev/null @@ -1,149 +0,0 @@ ------------------------------------------------------------------------------ --- LuaSocket helper module --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local string = require("string") -local math = require("math") -local socket = require("socket.core") - -local _M = socket - ------------------------------------------------------------------------------ --- Exported auxiliar functions ------------------------------------------------------------------------------ -function _M.connect4(address, port, laddress, lport) - return socket.connect(address, port, laddress, lport, "inet") -end - -function _M.connect6(address, port, laddress, lport) - return socket.connect(address, port, laddress, lport, "inet6") -end - -function _M.bind(host, port, backlog) - if host == "*" then host = "0.0.0.0" end - local addrinfo, err = socket.dns.getaddrinfo(host); - if not addrinfo then return nil, err end - local sock, res - err = "no info on address" - for i, alt in base.ipairs(addrinfo) do - if alt.family == "inet" then - sock, err = socket.tcp4() - else - sock, err = socket.tcp6() - end - if not sock then return nil, err end - sock:setoption("reuseaddr", true) - res, err = sock:bind(alt.addr, port) - if not res then - sock:close() - else - res, err = sock:listen(backlog) - if not res then - sock:close() - else - return sock - end - end - end - return nil, err -end - -_M.try = _M.newtry() - -function _M.choose(table) - return function(name, opt1, opt2) - if base.type(name) ~= "string" then - name, opt1, opt2 = "default", name, opt1 - end - local f = table[name or "nil"] - if not f then base.error("unknown key (".. base.tostring(name) ..")", 3) - else return f(opt1, opt2) end - end -end - ------------------------------------------------------------------------------ --- Socket sources and sinks, conforming to LTN12 ------------------------------------------------------------------------------ --- create namespaces inside LuaSocket namespace -local sourcet, sinkt = {}, {} -_M.sourcet = sourcet -_M.sinkt = sinkt - -_M.BLOCKSIZE = 2048 - -sinkt["close-when-done"] = function(sock) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function(self, chunk, err) - if not chunk then - sock:close() - return 1 - else return sock:send(chunk) end - end - }) -end - -sinkt["keep-open"] = function(sock) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function(self, chunk, err) - if chunk then return sock:send(chunk) - else return 1 end - end - }) -end - -sinkt["default"] = sinkt["keep-open"] - -_M.sink = _M.choose(sinkt) - -sourcet["by-length"] = function(sock, length) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function() - if length <= 0 then return nil end - local size = math.min(socket.BLOCKSIZE, length) - local chunk, err = sock:receive(size) - if err then return nil, err end - length = length - string.len(chunk) - return chunk - end - }) -end - -sourcet["until-closed"] = function(sock) - local done - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function() - if done then return nil end - local chunk, err, partial = sock:receive(socket.BLOCKSIZE) - if not err then return chunk - elseif err == "closed" then - sock:close() - done = 1 - return partial - else return nil, err end - end - }) -end - - -sourcet["default"] = sourcet["until-closed"] - -_M.source = _M.choose(sourcet) - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/tcp.c b/build/premake/premake5/binmodules/luasocket/src/tcp.c deleted file mode 100644 index ef9ee6f9c2..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/tcp.c +++ /dev/null @@ -1,451 +0,0 @@ -/*=========================================================================*\ -* TCP object -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "auxiliar.h" -#include "socket.h" -#include "inet.h" -#include "options.h" -#include "tcp.h" - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int global_create(lua_State *L); -static int global_create4(lua_State *L); -static int global_create6(lua_State *L); -static int global_connect(lua_State *L); -static int meth_connect(lua_State *L); -static int meth_listen(lua_State *L); -static int meth_getfamily(lua_State *L); -static int meth_bind(lua_State *L); -static int meth_send(lua_State *L); -static int meth_getstats(lua_State *L); -static int meth_setstats(lua_State *L); -static int meth_getsockname(lua_State *L); -static int meth_getpeername(lua_State *L); -static int meth_shutdown(lua_State *L); -static int meth_receive(lua_State *L); -static int meth_accept(lua_State *L); -static int meth_close(lua_State *L); -static int meth_getoption(lua_State *L); -static int meth_setoption(lua_State *L); -static int meth_gettimeout(lua_State *L); -static int meth_settimeout(lua_State *L); -static int meth_getfd(lua_State *L); -static int meth_setfd(lua_State *L); -static int meth_dirty(lua_State *L); - -/* tcp object methods */ -static luaL_Reg tcp_methods[] = { - {"__gc", meth_close}, - {"__tostring", auxiliar_tostring}, - {"accept", meth_accept}, - {"bind", meth_bind}, - {"close", meth_close}, - {"connect", meth_connect}, - {"dirty", meth_dirty}, - {"getfamily", meth_getfamily}, - {"getfd", meth_getfd}, - {"getoption", meth_getoption}, - {"getpeername", meth_getpeername}, - {"getsockname", meth_getsockname}, - {"getstats", meth_getstats}, - {"setstats", meth_setstats}, - {"listen", meth_listen}, - {"receive", meth_receive}, - {"send", meth_send}, - {"setfd", meth_setfd}, - {"setoption", meth_setoption}, - {"setpeername", meth_connect}, - {"setsockname", meth_bind}, - {"settimeout", meth_settimeout}, - {"gettimeout", meth_gettimeout}, - {"shutdown", meth_shutdown}, - {NULL, NULL} -}; - -/* socket option handlers */ -static t_opt optget[] = { - {"keepalive", opt_get_keepalive}, - {"reuseaddr", opt_get_reuseaddr}, - {"reuseport", opt_get_reuseport}, - {"tcp-nodelay", opt_get_tcp_nodelay}, - {"linger", opt_get_linger}, - {"error", opt_get_error}, - {NULL, NULL} -}; - -static t_opt optset[] = { - {"keepalive", opt_set_keepalive}, - {"reuseaddr", opt_set_reuseaddr}, - {"reuseport", opt_set_reuseport}, - {"tcp-nodelay", opt_set_tcp_nodelay}, - {"ipv6-v6only", opt_set_ip6_v6only}, - {"linger", opt_set_linger}, - {NULL, NULL} -}; - -/* functions in library namespace */ -static luaL_Reg func[] = { - {"tcp", global_create}, - {"tcp4", global_create4}, - {"tcp6", global_create6}, - {"connect", global_connect}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int tcp_open(lua_State *L) -{ - /* create classes */ - auxiliar_newclass(L, "tcp{master}", tcp_methods); - auxiliar_newclass(L, "tcp{client}", tcp_methods); - auxiliar_newclass(L, "tcp{server}", tcp_methods); - /* create class groups */ - auxiliar_add2group(L, "tcp{master}", "tcp{any}"); - auxiliar_add2group(L, "tcp{client}", "tcp{any}"); - auxiliar_add2group(L, "tcp{server}", "tcp{any}"); - /* define library functions */ - luaL_setfuncs(L, func, 0); - return 0; -} - -/*=========================================================================*\ -* Lua methods -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Just call buffered IO methods -\*-------------------------------------------------------------------------*/ -static int meth_send(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); - return buffer_meth_send(L, &tcp->buf); -} - -static int meth_receive(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); - return buffer_meth_receive(L, &tcp->buf); -} - -static int meth_getstats(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); - return buffer_meth_getstats(L, &tcp->buf); -} - -static int meth_setstats(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); - return buffer_meth_setstats(L, &tcp->buf); -} - -/*-------------------------------------------------------------------------*\ -* Just call option handler -\*-------------------------------------------------------------------------*/ -static int meth_getoption(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - return opt_meth_getoption(L, optget, &tcp->sock); -} - -static int meth_setoption(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - return opt_meth_setoption(L, optset, &tcp->sock); -} - -/*-------------------------------------------------------------------------*\ -* Select support methods -\*-------------------------------------------------------------------------*/ -static int meth_getfd(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - lua_pushnumber(L, (int) tcp->sock); - return 1; -} - -/* this is very dangerous, but can be handy for those that are brave enough */ -static int meth_setfd(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - tcp->sock = (t_socket) luaL_checknumber(L, 2); - return 0; -} - -static int meth_dirty(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - lua_pushboolean(L, !buffer_isempty(&tcp->buf)); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Waits for and returns a client object attempting connection to the -* server object -\*-------------------------------------------------------------------------*/ -static int meth_accept(lua_State *L) -{ - p_tcp server = (p_tcp) auxiliar_checkclass(L, "tcp{server}", 1); - p_timeout tm = timeout_markstart(&server->tm); - t_socket sock; - const char *err = inet_tryaccept(&server->sock, server->family, &sock, tm); - /* if successful, push client socket */ - if (err == NULL) { - p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); - auxiliar_setclass(L, "tcp{client}", -1); - /* initialize structure fields */ - memset(clnt, 0, sizeof(t_tcp)); - socket_setnonblocking(&sock); - clnt->sock = sock; - io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, - (p_error) socket_ioerror, &clnt->sock); - timeout_init(&clnt->tm, -1, -1); - buffer_init(&clnt->buf, &clnt->io, &clnt->tm); - clnt->family = server->family; - return 1; - } else { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } -} - -/*-------------------------------------------------------------------------*\ -* Binds an object to an address -\*-------------------------------------------------------------------------*/ -static int meth_bind(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1); - const char *address = luaL_checkstring(L, 2); - const char *port = luaL_checkstring(L, 3); - const char *err; - struct addrinfo bindhints; - memset(&bindhints, 0, sizeof(bindhints)); - bindhints.ai_socktype = SOCK_STREAM; - bindhints.ai_family = tcp->family; - bindhints.ai_flags = AI_PASSIVE; - err = inet_trybind(&tcp->sock, &tcp->family, address, port, &bindhints); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Turns a master tcp object into a client object. -\*-------------------------------------------------------------------------*/ -static int meth_connect(lua_State *L) { - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - const char *address = luaL_checkstring(L, 2); - const char *port = luaL_checkstring(L, 3); - struct addrinfo connecthints; - const char *err; - memset(&connecthints, 0, sizeof(connecthints)); - connecthints.ai_socktype = SOCK_STREAM; - /* make sure we try to connect only to the same family */ - connecthints.ai_family = tcp->family; - timeout_markstart(&tcp->tm); - err = inet_tryconnect(&tcp->sock, &tcp->family, address, port, - &tcp->tm, &connecthints); - /* have to set the class even if it failed due to non-blocking connects */ - auxiliar_setclass(L, "tcp{client}", 1); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Closes socket used by object -\*-------------------------------------------------------------------------*/ -static int meth_close(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - socket_destroy(&tcp->sock); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Returns family as string -\*-------------------------------------------------------------------------*/ -static int meth_getfamily(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - if (tcp->family == AF_INET6) { - lua_pushliteral(L, "inet6"); - return 1; - } else if (tcp->family == AF_INET) { - lua_pushliteral(L, "inet4"); - return 1; - } else { - lua_pushliteral(L, "inet4"); - return 1; - } -} - -/*-------------------------------------------------------------------------*\ -* Puts the sockt in listen mode -\*-------------------------------------------------------------------------*/ -static int meth_listen(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1); - int backlog = (int) luaL_optnumber(L, 2, 32); - int err = socket_listen(&tcp->sock, backlog); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(err)); - return 2; - } - /* turn master object into a server object */ - auxiliar_setclass(L, "tcp{server}", 1); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Shuts the connection down partially -\*-------------------------------------------------------------------------*/ -static int meth_shutdown(lua_State *L) -{ - /* SHUT_RD, SHUT_WR, SHUT_RDWR have the value 0, 1, 2, so we can use method index directly */ - static const char* methods[] = { "receive", "send", "both", NULL }; - p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); - int how = luaL_checkoption(L, 2, "both", methods); - socket_shutdown(&tcp->sock, how); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Just call inet methods -\*-------------------------------------------------------------------------*/ -static int meth_getpeername(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - return inet_meth_getpeername(L, &tcp->sock, tcp->family); -} - -static int meth_getsockname(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - return inet_meth_getsockname(L, &tcp->sock, tcp->family); -} - -/*-------------------------------------------------------------------------*\ -* Just call tm methods -\*-------------------------------------------------------------------------*/ -static int meth_settimeout(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - return timeout_meth_settimeout(L, &tcp->tm); -} - -static int meth_gettimeout(lua_State *L) -{ - p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); - return timeout_meth_gettimeout(L, &tcp->tm); -} - -/*=========================================================================*\ -* Library functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Creates a master tcp object -\*-------------------------------------------------------------------------*/ -static int tcp_create(lua_State *L, int family) { - p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); - memset(tcp, 0, sizeof(t_tcp)); - /* set its type as master object */ - auxiliar_setclass(L, "tcp{master}", -1); - /* if family is AF_UNSPEC, we leave the socket invalid and - * store AF_UNSPEC into family. This will allow it to later be - * replaced with an AF_INET6 or AF_INET socket upon first use. */ - tcp->sock = SOCKET_INVALID; - tcp->family = family; - io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, - (p_error) socket_ioerror, &tcp->sock); - timeout_init(&tcp->tm, -1, -1); - buffer_init(&tcp->buf, &tcp->io, &tcp->tm); - if (family != AF_UNSPEC) { - const char *err = inet_trycreate(&tcp->sock, family, SOCK_STREAM, 0); - if (err != NULL) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - socket_setnonblocking(&tcp->sock); - } - return 1; -} - -static int global_create(lua_State *L) { - return tcp_create(L, AF_UNSPEC); -} - -static int global_create4(lua_State *L) { - return tcp_create(L, AF_INET); -} - -static int global_create6(lua_State *L) { - return tcp_create(L, AF_INET6); -} - -static int global_connect(lua_State *L) { - const char *remoteaddr = luaL_checkstring(L, 1); - const char *remoteserv = luaL_checkstring(L, 2); - const char *localaddr = luaL_optstring(L, 3, NULL); - const char *localserv = luaL_optstring(L, 4, "0"); - int family = inet_optfamily(L, 5, "unspec"); - p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); - struct addrinfo bindhints, connecthints; - const char *err = NULL; - /* initialize tcp structure */ - memset(tcp, 0, sizeof(t_tcp)); - io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, - (p_error) socket_ioerror, &tcp->sock); - timeout_init(&tcp->tm, -1, -1); - buffer_init(&tcp->buf, &tcp->io, &tcp->tm); - tcp->sock = SOCKET_INVALID; - tcp->family = AF_UNSPEC; - /* allow user to pick local address and port */ - memset(&bindhints, 0, sizeof(bindhints)); - bindhints.ai_socktype = SOCK_STREAM; - bindhints.ai_family = family; - bindhints.ai_flags = AI_PASSIVE; - if (localaddr) { - err = inet_trybind(&tcp->sock, &tcp->family, localaddr, - localserv, &bindhints); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - } - /* try to connect to remote address and port */ - memset(&connecthints, 0, sizeof(connecthints)); - connecthints.ai_socktype = SOCK_STREAM; - /* make sure we try to connect only to the same family */ - connecthints.ai_family = tcp->family; - err = inet_tryconnect(&tcp->sock, &tcp->family, remoteaddr, remoteserv, - &tcp->tm, &connecthints); - if (err) { - socket_destroy(&tcp->sock); - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - auxiliar_setclass(L, "tcp{client}", -1); - return 1; -} diff --git a/build/premake/premake5/binmodules/luasocket/src/tcp.h b/build/premake/premake5/binmodules/luasocket/src/tcp.h deleted file mode 100644 index eded620324..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/tcp.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef TCP_H -#define TCP_H -/*=========================================================================*\ -* TCP object -* LuaSocket toolkit -* -* The tcp.h module is basicly a glue that puts together modules buffer.h, -* timeout.h socket.h and inet.h to provide the LuaSocket TCP (AF_INET, -* SOCK_STREAM) support. -* -* Three classes are defined: master, client and server. The master class is -* a newly created tcp object, that has not been bound or connected. Server -* objects are tcp objects bound to some local address. Client objects are -* tcp objects either connected to some address or returned by the accept -* method of a server object. -\*=========================================================================*/ -#include "lua.h" - -#include "buffer.h" -#include "timeout.h" -#include "socket.h" - -typedef struct t_tcp_ { - t_socket sock; - t_io io; - t_buffer buf; - t_timeout tm; - int family; -} t_tcp; - -typedef t_tcp *p_tcp; - -int tcp_open(lua_State *L); - -#endif /* TCP_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/timeout.c b/build/premake/premake5/binmodules/luasocket/src/timeout.c deleted file mode 100644 index 5a601d5410..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/timeout.c +++ /dev/null @@ -1,228 +0,0 @@ -/*=========================================================================*\ -* Timeout management functions -* LuaSocket toolkit -\*=========================================================================*/ -#include -#include -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "auxiliar.h" -#include "timeout.h" - -#ifdef _WIN32 -#include -#else -#include -#include -#endif - -/* min and max macros */ -#ifndef MIN -#define MIN(x, y) ((x) < (y) ? x : y) -#endif -#ifndef MAX -#define MAX(x, y) ((x) > (y) ? x : y) -#endif - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int timeout_lua_gettime(lua_State *L); -static int timeout_lua_sleep(lua_State *L); - -static luaL_Reg func[] = { - { "gettime", timeout_lua_gettime }, - { "sleep", timeout_lua_sleep }, - { NULL, NULL } -}; - -/*=========================================================================*\ -* Exported functions. -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Initialize structure -\*-------------------------------------------------------------------------*/ -void timeout_init(p_timeout tm, double block, double total) { - tm->block = block; - tm->total = total; -} - -/*-------------------------------------------------------------------------*\ -* Determines how much time we have left for the next system call, -* if the previous call was successful -* Input -* tm: timeout control structure -* Returns -* the number of ms left or -1 if there is no time limit -\*-------------------------------------------------------------------------*/ -double timeout_get(p_timeout tm) { - if (tm->block < 0.0 && tm->total < 0.0) { - return -1; - } else if (tm->block < 0.0) { - double t = tm->total - timeout_gettime() + tm->start; - return MAX(t, 0.0); - } else if (tm->total < 0.0) { - return tm->block; - } else { - double t = tm->total - timeout_gettime() + tm->start; - return MIN(tm->block, MAX(t, 0.0)); - } -} - -/*-------------------------------------------------------------------------*\ -* Returns time since start of operation -* Input -* tm: timeout control structure -* Returns -* start field of structure -\*-------------------------------------------------------------------------*/ -double timeout_getstart(p_timeout tm) { - return tm->start; -} - -/*-------------------------------------------------------------------------*\ -* Determines how much time we have left for the next system call, -* if the previous call was a failure -* Input -* tm: timeout control structure -* Returns -* the number of ms left or -1 if there is no time limit -\*-------------------------------------------------------------------------*/ -double timeout_getretry(p_timeout tm) { - if (tm->block < 0.0 && tm->total < 0.0) { - return -1; - } else if (tm->block < 0.0) { - double t = tm->total - timeout_gettime() + tm->start; - return MAX(t, 0.0); - } else if (tm->total < 0.0) { - double t = tm->block - timeout_gettime() + tm->start; - return MAX(t, 0.0); - } else { - double t = tm->total - timeout_gettime() + tm->start; - return MIN(tm->block, MAX(t, 0.0)); - } -} - -/*-------------------------------------------------------------------------*\ -* Marks the operation start time in structure -* Input -* tm: timeout control structure -\*-------------------------------------------------------------------------*/ -p_timeout timeout_markstart(p_timeout tm) { - tm->start = timeout_gettime(); - return tm; -} - -/*-------------------------------------------------------------------------*\ -* Gets time in s, relative to January 1, 1970 (UTC) -* Returns -* time in s. -\*-------------------------------------------------------------------------*/ -#ifdef _WIN32 -double timeout_gettime(void) { - FILETIME ft; - double t; - GetSystemTimeAsFileTime(&ft); - /* Windows file time (time since January 1, 1601 (UTC)) */ - t = ft.dwLowDateTime/1.0e7 + ft.dwHighDateTime*(4294967296.0/1.0e7); - /* convert to Unix Epoch time (time since January 1, 1970 (UTC)) */ - return (t - 11644473600.0); -} -#else -double timeout_gettime(void) { - struct timeval v; - gettimeofday(&v, (struct timezone *) NULL); - /* Unix Epoch time (time since January 1, 1970 (UTC)) */ - return v.tv_sec + v.tv_usec/1.0e6; -} -#endif - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int timeout_open(lua_State *L) { - luaL_setfuncs(L, func, 0); - return 0; -} - -/*-------------------------------------------------------------------------*\ -* Sets timeout values for IO operations -* Lua Input: base, time [, mode] -* time: time out value in seconds -* mode: "b" for block timeout, "t" for total timeout. (default: b) -\*-------------------------------------------------------------------------*/ -int timeout_meth_settimeout(lua_State *L, p_timeout tm) { - double t = luaL_optnumber(L, 2, -1); - const char *mode = luaL_optstring(L, 3, "b"); - switch (*mode) { - case 'b': - tm->block = t; - break; - case 'r': case 't': - tm->total = t; - break; - default: - luaL_argcheck(L, 0, 3, "invalid timeout mode"); - break; - } - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Gets timeout values for IO operations -* Lua Output: block, total -\*-------------------------------------------------------------------------*/ -int timeout_meth_gettimeout(lua_State *L, p_timeout tm) { - lua_pushnumber(L, tm->block); - lua_pushnumber(L, tm->total); - return 2; -} - -/*=========================================================================*\ -* Test support functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Returns the time the system has been up, in secconds. -\*-------------------------------------------------------------------------*/ -static int timeout_lua_gettime(lua_State *L) -{ - lua_pushnumber(L, timeout_gettime()); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Sleep for n seconds. -\*-------------------------------------------------------------------------*/ -#ifdef _WIN32 -int timeout_lua_sleep(lua_State *L) -{ - double n = luaL_checknumber(L, 1); - if (n < 0.0) n = 0.0; - if (n < DBL_MAX/1000.0) n *= 1000.0; - if (n > INT_MAX) n = INT_MAX; - Sleep((int)n); - return 0; -} -#else -int timeout_lua_sleep(lua_State *L) -{ - double n = luaL_checknumber(L, 1); - struct timespec t, r; - if (n < 0.0) n = 0.0; - if (n > INT_MAX) n = INT_MAX; - t.tv_sec = (int) n; - n -= t.tv_sec; - t.tv_nsec = (int) (n * 1000000000); - if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999; - while (nanosleep(&t, &r) != 0) { - t.tv_sec = r.tv_sec; - t.tv_nsec = r.tv_nsec; - } - return 0; -} -#endif diff --git a/build/premake/premake5/binmodules/luasocket/src/timeout.h b/build/premake/premake5/binmodules/luasocket/src/timeout.h deleted file mode 100644 index af902318b0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/timeout.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef TIMEOUT_H -#define TIMEOUT_H -/*=========================================================================*\ -* Timeout management functions -* LuaSocket toolkit -\*=========================================================================*/ -#include "lua.h" - -/* timeout control structure */ -typedef struct t_timeout_ { - double block; /* maximum time for blocking calls */ - double total; /* total number of miliseconds for operation */ - double start; /* time of start of operation */ -} t_timeout; -typedef t_timeout *p_timeout; - -int timeout_open(lua_State *L); -void timeout_init(p_timeout tm, double block, double total); -double timeout_get(p_timeout tm); -double timeout_getretry(p_timeout tm); -p_timeout timeout_markstart(p_timeout tm); -double timeout_getstart(p_timeout tm); -double timeout_gettime(void); -int timeout_meth_settimeout(lua_State *L, p_timeout tm); -int timeout_meth_gettimeout(lua_State *L, p_timeout tm); - -#define timeout_iszero(tm) ((tm)->block == 0.0) - -#endif /* TIMEOUT_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/tp.lua b/build/premake/premake5/binmodules/luasocket/src/tp.lua deleted file mode 100644 index b8ebc56d16..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/tp.lua +++ /dev/null @@ -1,134 +0,0 @@ ------------------------------------------------------------------------------ --- Unified SMTP/FTP subsystem --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local string = require("string") -local socket = require("socket") -local ltn12 = require("ltn12") - -socket.tp = {} -local _M = socket.tp - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ -_M.TIMEOUT = 60 - ------------------------------------------------------------------------------ --- Implementation ------------------------------------------------------------------------------ --- gets server reply (works for SMTP and FTP) -local function get_reply(c) - local code, current, sep - local line, err = c:receive() - local reply = line - if err then return nil, err end - code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) - if not code then return nil, "invalid server reply" end - if sep == "-" then -- reply is multiline - repeat - line, err = c:receive() - if err then return nil, err end - current, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) - reply = reply .. "\n" .. line - -- reply ends with same code - until code == current and sep == " " - end - return code, reply -end - --- metatable for sock object -local metat = { __index = {} } - -function metat.__index:getpeername() - return self.c:getpeername() -end - -function metat.__index:getsockname() - return self.c:getpeername() -end - -function metat.__index:check(ok) - local code, reply = get_reply(self.c) - if not code then return nil, reply end - if base.type(ok) ~= "function" then - if base.type(ok) == "table" then - for i, v in base.ipairs(ok) do - if string.find(code, v) then - return base.tonumber(code), reply - end - end - return nil, reply - else - if string.find(code, ok) then return base.tonumber(code), reply - else return nil, reply end - end - else return ok(base.tonumber(code), reply) end -end - -function metat.__index:command(cmd, arg) - cmd = string.upper(cmd) - if arg then - return self.c:send(cmd .. " " .. arg.. "\r\n") - else - return self.c:send(cmd .. "\r\n") - end -end - -function metat.__index:sink(snk, pat) - local chunk, err = self.c:receive(pat) - return snk(chunk, err) -end - -function metat.__index:send(data) - return self.c:send(data) -end - -function metat.__index:receive(pat) - return self.c:receive(pat) -end - -function metat.__index:getfd() - return self.c:getfd() -end - -function metat.__index:dirty() - return self.c:dirty() -end - -function metat.__index:getcontrol() - return self.c -end - -function metat.__index:source(source, step) - local sink = socket.sink("keep-open", self.c) - local ret, err = ltn12.pump.all(source, sink, step or ltn12.pump.step) - return ret, err -end - --- closes the underlying c -function metat.__index:close() - self.c:close() - return 1 -end - --- connect with server and return c object -function _M.connect(host, port, timeout, create) - local c, e = (create or socket.tcp)() - if not c then return nil, e end - c:settimeout(timeout or _M.TIMEOUT) - local r, e = c:connect(host, port) - if not r then - c:close() - return nil, e - end - return base.setmetatable({c = c}, metat) -end - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/udp.c b/build/premake/premake5/binmodules/luasocket/src/udp.c deleted file mode 100644 index 605c1950f2..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/udp.c +++ /dev/null @@ -1,483 +0,0 @@ -/*=========================================================================*\ -* UDP object -* LuaSocket toolkit -\*=========================================================================*/ -#include -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "auxiliar.h" -#include "socket.h" -#include "inet.h" -#include "options.h" -#include "udp.h" - -/* min and max macros */ -#ifndef MIN -#define MIN(x, y) ((x) < (y) ? x : y) -#endif -#ifndef MAX -#define MAX(x, y) ((x) > (y) ? x : y) -#endif - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int global_create(lua_State *L); -static int global_create4(lua_State *L); -static int global_create6(lua_State *L); -static int meth_send(lua_State *L); -static int meth_sendto(lua_State *L); -static int meth_receive(lua_State *L); -static int meth_receivefrom(lua_State *L); -static int meth_getfamily(lua_State *L); -static int meth_getsockname(lua_State *L); -static int meth_getpeername(lua_State *L); -static int meth_gettimeout(lua_State *L); -static int meth_setsockname(lua_State *L); -static int meth_setpeername(lua_State *L); -static int meth_close(lua_State *L); -static int meth_setoption(lua_State *L); -static int meth_getoption(lua_State *L); -static int meth_settimeout(lua_State *L); -static int meth_getfd(lua_State *L); -static int meth_setfd(lua_State *L); -static int meth_dirty(lua_State *L); - -/* udp object methods */ -static luaL_Reg udp_methods[] = { - {"__gc", meth_close}, - {"__tostring", auxiliar_tostring}, - {"close", meth_close}, - {"dirty", meth_dirty}, - {"getfamily", meth_getfamily}, - {"getfd", meth_getfd}, - {"getpeername", meth_getpeername}, - {"getsockname", meth_getsockname}, - {"receive", meth_receive}, - {"receivefrom", meth_receivefrom}, - {"send", meth_send}, - {"sendto", meth_sendto}, - {"setfd", meth_setfd}, - {"setoption", meth_setoption}, - {"getoption", meth_getoption}, - {"setpeername", meth_setpeername}, - {"setsockname", meth_setsockname}, - {"settimeout", meth_settimeout}, - {"gettimeout", meth_gettimeout}, - {NULL, NULL} -}; - -/* socket options for setoption */ -static t_opt optset[] = { - {"dontroute", opt_set_dontroute}, - {"broadcast", opt_set_broadcast}, - {"reuseaddr", opt_set_reuseaddr}, - {"reuseport", opt_set_reuseport}, - {"ip-multicast-if", opt_set_ip_multicast_if}, - {"ip-multicast-ttl", opt_set_ip_multicast_ttl}, - {"ip-multicast-loop", opt_set_ip_multicast_loop}, - {"ip-add-membership", opt_set_ip_add_membership}, - {"ip-drop-membership", opt_set_ip_drop_membersip}, - {"ipv6-unicast-hops", opt_set_ip6_unicast_hops}, - {"ipv6-multicast-hops", opt_set_ip6_unicast_hops}, - {"ipv6-multicast-loop", opt_set_ip6_multicast_loop}, - {"ipv6-add-membership", opt_set_ip6_add_membership}, - {"ipv6-drop-membership", opt_set_ip6_drop_membersip}, - {"ipv6-v6only", opt_set_ip6_v6only}, - {NULL, NULL} -}; - -/* socket options for getoption */ -static t_opt optget[] = { - {"dontroute", opt_get_dontroute}, - {"broadcast", opt_get_broadcast}, - {"reuseaddr", opt_get_reuseaddr}, - {"reuseport", opt_get_reuseport}, - {"ip-multicast-if", opt_get_ip_multicast_if}, - {"ip-multicast-loop", opt_get_ip_multicast_loop}, - {"error", opt_get_error}, - {"ipv6-unicast-hops", opt_get_ip6_unicast_hops}, - {"ipv6-multicast-hops", opt_get_ip6_unicast_hops}, - {"ipv6-multicast-loop", opt_get_ip6_multicast_loop}, - {"ipv6-v6only", opt_get_ip6_v6only}, - {NULL, NULL} -}; - -/* functions in library namespace */ -static luaL_Reg func[] = { - {"udp", global_create}, - {"udp4", global_create4}, - {"udp6", global_create6}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int udp_open(lua_State *L) { - /* create classes */ - auxiliar_newclass(L, "udp{connected}", udp_methods); - auxiliar_newclass(L, "udp{unconnected}", udp_methods); - /* create class groups */ - auxiliar_add2group(L, "udp{connected}", "udp{any}"); - auxiliar_add2group(L, "udp{unconnected}", "udp{any}"); - auxiliar_add2group(L, "udp{connected}", "select{able}"); - auxiliar_add2group(L, "udp{unconnected}", "select{able}"); - /* define library functions */ - luaL_setfuncs(L, func, 0); - /* export default UDP size */ - lua_pushliteral(L, "_DATAGRAMSIZE"); - lua_pushinteger(L, UDP_DATAGRAMSIZE); - lua_rawset(L, -3); - return 0; -} - -/*=========================================================================*\ -* Lua methods -\*=========================================================================*/ -static const char *udp_strerror(int err) { - /* a 'closed' error on an unconnected means the target address was not - * accepted by the transport layer */ - if (err == IO_CLOSED) return "refused"; - else return socket_strerror(err); -} - -/*-------------------------------------------------------------------------*\ -* Send data through connected udp socket -\*-------------------------------------------------------------------------*/ -static int meth_send(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1); - p_timeout tm = &udp->tm; - size_t count, sent = 0; - int err; - const char *data = luaL_checklstring(L, 2, &count); - timeout_markstart(tm); - err = socket_send(&udp->sock, data, count, &sent, tm); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, udp_strerror(err)); - return 2; - } - lua_pushnumber(L, (lua_Number) sent); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Send data through unconnected udp socket -\*-------------------------------------------------------------------------*/ -static int meth_sendto(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1); - size_t count, sent = 0; - const char *data = luaL_checklstring(L, 2, &count); - const char *ip = luaL_checkstring(L, 3); - const char *port = luaL_checkstring(L, 4); - p_timeout tm = &udp->tm; - int err; - struct addrinfo aihint; - struct addrinfo *ai; - memset(&aihint, 0, sizeof(aihint)); - aihint.ai_family = udp->family; - aihint.ai_socktype = SOCK_DGRAM; - aihint.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV; - err = getaddrinfo(ip, port, &aihint, &ai); - if (err) { - lua_pushnil(L); - lua_pushstring(L, gai_strerror(err)); - return 2; - } - - /* create socket if on first sendto if AF_UNSPEC was set */ - if (udp->family == AF_UNSPEC && udp->sock == SOCKET_INVALID) { - struct addrinfo *ap; - const char *errstr = NULL; - for (ap = ai; ap != NULL; ap = ap->ai_next) { - errstr = inet_trycreate(&udp->sock, ap->ai_family, SOCK_DGRAM, 0); - if (errstr == NULL) { - socket_setnonblocking(&udp->sock); - udp->family = ap->ai_family; - break; - } - } - if (errstr != NULL) { - lua_pushnil(L); - lua_pushstring(L, errstr); - freeaddrinfo(ai); - return 2; - } - } - - timeout_markstart(tm); - err = socket_sendto(&udp->sock, data, count, &sent, ai->ai_addr, - (socklen_t) ai->ai_addrlen, tm); - freeaddrinfo(ai); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, udp_strerror(err)); - return 2; - } - lua_pushnumber(L, (lua_Number) sent); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Receives data from a UDP socket -\*-------------------------------------------------------------------------*/ -static int meth_receive(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - char buf[UDP_DATAGRAMSIZE]; - size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); - char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; - int err; - p_timeout tm = &udp->tm; - timeout_markstart(tm); - if (!dgram) { - lua_pushnil(L); - lua_pushliteral(L, "out of memory"); - return 2; - } - err = socket_recv(&udp->sock, dgram, wanted, &got, tm); - /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */ - if (err != IO_DONE && err != IO_CLOSED) { - lua_pushnil(L); - lua_pushstring(L, udp_strerror(err)); - if (wanted > sizeof(buf)) free(dgram); - return 2; - } - lua_pushlstring(L, dgram, got); - if (wanted > sizeof(buf)) free(dgram); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Receives data and sender from a UDP socket -\*-------------------------------------------------------------------------*/ -static int meth_receivefrom(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1); - char buf[UDP_DATAGRAMSIZE]; - size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); - char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; - struct sockaddr_storage addr; - socklen_t addr_len = sizeof(addr); - char addrstr[INET6_ADDRSTRLEN]; - char portstr[6]; - int err; - p_timeout tm = &udp->tm; - timeout_markstart(tm); - if (!dgram) { - lua_pushnil(L); - lua_pushliteral(L, "out of memory"); - return 2; - } - err = socket_recvfrom(&udp->sock, dgram, wanted, &got, (SA *) &addr, - &addr_len, tm); - /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */ - if (err != IO_DONE && err != IO_CLOSED) { - lua_pushnil(L); - lua_pushstring(L, udp_strerror(err)); - if (wanted > sizeof(buf)) free(dgram); - return 2; - } - err = getnameinfo((struct sockaddr *)&addr, addr_len, addrstr, - INET6_ADDRSTRLEN, portstr, 6, NI_NUMERICHOST | NI_NUMERICSERV); - if (err) { - lua_pushnil(L); - lua_pushstring(L, gai_strerror(err)); - if (wanted > sizeof(buf)) free(dgram); - return 2; - } - lua_pushlstring(L, dgram, got); - lua_pushstring(L, addrstr); - lua_pushinteger(L, (int) strtol(portstr, (char **) NULL, 10)); - if (wanted > sizeof(buf)) free(dgram); - return 3; -} - -/*-------------------------------------------------------------------------*\ -* Returns family as string -\*-------------------------------------------------------------------------*/ -static int meth_getfamily(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - if (udp->family == AF_INET6) { - lua_pushliteral(L, "inet6"); - return 1; - } else { - lua_pushliteral(L, "inet4"); - return 1; - } -} - -/*-------------------------------------------------------------------------*\ -* Select support methods -\*-------------------------------------------------------------------------*/ -static int meth_getfd(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - lua_pushnumber(L, (int) udp->sock); - return 1; -} - -/* this is very dangerous, but can be handy for those that are brave enough */ -static int meth_setfd(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - udp->sock = (t_socket) luaL_checknumber(L, 2); - return 0; -} - -static int meth_dirty(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - (void) udp; - lua_pushboolean(L, 0); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Just call inet methods -\*-------------------------------------------------------------------------*/ -static int meth_getpeername(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1); - return inet_meth_getpeername(L, &udp->sock, udp->family); -} - -static int meth_getsockname(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - return inet_meth_getsockname(L, &udp->sock, udp->family); -} - -/*-------------------------------------------------------------------------*\ -* Just call option handler -\*-------------------------------------------------------------------------*/ -static int meth_setoption(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - return opt_meth_setoption(L, optset, &udp->sock); -} - -/*-------------------------------------------------------------------------*\ -* Just call option handler -\*-------------------------------------------------------------------------*/ -static int meth_getoption(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - return opt_meth_getoption(L, optget, &udp->sock); -} - -/*-------------------------------------------------------------------------*\ -* Just call tm methods -\*-------------------------------------------------------------------------*/ -static int meth_settimeout(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - return timeout_meth_settimeout(L, &udp->tm); -} - -static int meth_gettimeout(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - return timeout_meth_gettimeout(L, &udp->tm); -} - -/*-------------------------------------------------------------------------*\ -* Turns a master udp object into a client object. -\*-------------------------------------------------------------------------*/ -static int meth_setpeername(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - p_timeout tm = &udp->tm; - const char *address = luaL_checkstring(L, 2); - int connecting = strcmp(address, "*"); - const char *port = connecting? luaL_checkstring(L, 3): "0"; - struct addrinfo connecthints; - const char *err; - memset(&connecthints, 0, sizeof(connecthints)); - connecthints.ai_socktype = SOCK_DGRAM; - /* make sure we try to connect only to the same family */ - connecthints.ai_family = udp->family; - if (connecting) { - err = inet_tryconnect(&udp->sock, &udp->family, address, - port, tm, &connecthints); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - auxiliar_setclass(L, "udp{connected}", 1); - } else { - /* we ignore possible errors because Mac OS X always - * returns EAFNOSUPPORT */ - inet_trydisconnect(&udp->sock, udp->family, tm); - auxiliar_setclass(L, "udp{unconnected}", 1); - } - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Closes socket used by object -\*-------------------------------------------------------------------------*/ -static int meth_close(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); - socket_destroy(&udp->sock); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Turns a master object into a server object -\*-------------------------------------------------------------------------*/ -static int meth_setsockname(lua_State *L) { - p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1); - const char *address = luaL_checkstring(L, 2); - const char *port = luaL_checkstring(L, 3); - const char *err; - struct addrinfo bindhints; - memset(&bindhints, 0, sizeof(bindhints)); - bindhints.ai_socktype = SOCK_DGRAM; - bindhints.ai_family = udp->family; - bindhints.ai_flags = AI_PASSIVE; - err = inet_trybind(&udp->sock, &udp->family, address, port, &bindhints); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - lua_pushnumber(L, 1); - return 1; -} - -/*=========================================================================*\ -* Library functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Creates a master udp object -\*-------------------------------------------------------------------------*/ -static int udp_create(lua_State *L, int family) { - /* allocate udp object */ - p_udp udp = (p_udp) lua_newuserdata(L, sizeof(t_udp)); - auxiliar_setclass(L, "udp{unconnected}", -1); - /* if family is AF_UNSPEC, we leave the socket invalid and - * store AF_UNSPEC into family. This will allow it to later be - * replaced with an AF_INET6 or AF_INET socket upon first use. */ - udp->sock = SOCKET_INVALID; - timeout_init(&udp->tm, -1, -1); - udp->family = family; - if (family != AF_UNSPEC) { - const char *err = inet_trycreate(&udp->sock, family, SOCK_DGRAM, 0); - if (err != NULL) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - socket_setnonblocking(&udp->sock); - } - return 1; -} - -static int global_create(lua_State *L) { - return udp_create(L, AF_UNSPEC); -} - -static int global_create4(lua_State *L) { - return udp_create(L, AF_INET); -} - -static int global_create6(lua_State *L) { - return udp_create(L, AF_INET6); -} diff --git a/build/premake/premake5/binmodules/luasocket/src/udp.h b/build/premake/premake5/binmodules/luasocket/src/udp.h deleted file mode 100644 index be9b6a5530..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/udp.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef UDP_H -#define UDP_H -/*=========================================================================*\ -* UDP object -* LuaSocket toolkit -* -* The udp.h module provides LuaSocket with support for UDP protocol -* (AF_INET, SOCK_DGRAM). -* -* Two classes are defined: connected and unconnected. UDP objects are -* originally unconnected. They can be "connected" to a given address -* with a call to the setpeername function. The same function can be used to -* break the connection. -\*=========================================================================*/ -#include "lua.h" - -#include "timeout.h" -#include "socket.h" - -#define UDP_DATAGRAMSIZE 8192 - -typedef struct t_udp_ { - t_socket sock; - t_timeout tm; - int family; -} t_udp; -typedef t_udp *p_udp; - -int udp_open(lua_State *L); - -#endif /* UDP_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/unix.c b/build/premake/premake5/binmodules/luasocket/src/unix.c deleted file mode 100644 index dbc87100da..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/unix.c +++ /dev/null @@ -1,70 +0,0 @@ -/*=========================================================================*\ -* Unix domain socket -* LuaSocket toolkit -\*=========================================================================*/ -#include "lua.h" -#include "lauxlib.h" - -#include "unixstream.h" -#include "unixdgram.h" - -/*-------------------------------------------------------------------------*\ -* Modules and functions -\*-------------------------------------------------------------------------*/ -static const luaL_Reg mod[] = { - {"stream", unixstream_open}, - {"dgram", unixdgram_open}, - {NULL, NULL} -}; - -static void add_alias(lua_State *L, int index, const char *name, const char *target) -{ - lua_getfield(L, index, target); - lua_setfield(L, index, name); -} - -static int compat_socket_unix_call(lua_State *L) -{ - /* Look up socket.unix.stream in the socket.unix table (which is the first - * argument). */ - lua_getfield(L, 1, "stream"); - - /* Replace the stack entry for the socket.unix table with the - * socket.unix.stream function. */ - lua_replace(L, 1); - - /* Call socket.unix.stream, passing along any arguments. */ - int n = lua_gettop(L); - lua_call(L, n-1, LUA_MULTRET); - - /* Pass along the return values from socket.unix.stream. */ - n = lua_gettop(L); - return n; -} - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int luaopen_socket_unix(lua_State *L) -{ - int i; - lua_newtable(L); - int socket_unix_table = lua_gettop(L); - - for (i = 0; mod[i].name; i++) - mod[i].func(L); - - /* Add backwards compatibility aliases "tcp" and "udp" for the "stream" and - * "dgram" functions. */ - add_alias(L, socket_unix_table, "tcp", "stream"); - add_alias(L, socket_unix_table, "udp", "dgram"); - - /* Add a backwards compatibility function and a metatable setup to call it - * for the old socket.unix() interface. */ - lua_pushcfunction(L, compat_socket_unix_call); - lua_setfield(L, socket_unix_table, "__call"); - lua_pushvalue(L, socket_unix_table); - lua_setmetatable(L, socket_unix_table); - - return 1; -} diff --git a/build/premake/premake5/binmodules/luasocket/src/unix.h b/build/premake/premake5/binmodules/luasocket/src/unix.h deleted file mode 100644 index 8cc7a79324..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/unix.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef UNIX_H -#define UNIX_H -/*=========================================================================*\ -* Unix domain object -* LuaSocket toolkit -* -* This module is just an example of how to extend LuaSocket with a new -* domain. -\*=========================================================================*/ -#include "lua.h" - -#include "buffer.h" -#include "timeout.h" -#include "socket.h" - -#ifndef UNIX_API -#define UNIX_API extern -#endif - -typedef struct t_unix_ { - t_socket sock; - t_io io; - t_buffer buf; - t_timeout tm; -} t_unix; -typedef t_unix *p_unix; - -UNIX_API int luaopen_socket_unix(lua_State *L); - -#endif /* UNIX_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/unixdgram.c b/build/premake/premake5/binmodules/luasocket/src/unixdgram.c deleted file mode 100644 index 4645892fbe..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/unixdgram.c +++ /dev/null @@ -1,408 +0,0 @@ -/*=========================================================================*\ -* Unix domain socket dgram submodule -* LuaSocket toolkit -\*=========================================================================*/ -#include -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "auxiliar.h" -#include "socket.h" -#include "options.h" -#include "unix.h" -#include - -#define UNIXDGRAM_DATAGRAMSIZE 8192 - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int global_create(lua_State *L); -static int meth_connect(lua_State *L); -static int meth_bind(lua_State *L); -static int meth_send(lua_State *L); -static int meth_receive(lua_State *L); -static int meth_close(lua_State *L); -static int meth_setoption(lua_State *L); -static int meth_settimeout(lua_State *L); -static int meth_gettimeout(lua_State *L); -static int meth_getfd(lua_State *L); -static int meth_setfd(lua_State *L); -static int meth_dirty(lua_State *L); -static int meth_receivefrom(lua_State *L); -static int meth_sendto(lua_State *L); -static int meth_getsockname(lua_State *L); - -static const char *unixdgram_tryconnect(p_unix un, const char *path); -static const char *unixdgram_trybind(p_unix un, const char *path); - -/* unixdgram object methods */ -static luaL_Reg unixdgram_methods[] = { - {"__gc", meth_close}, - {"__tostring", auxiliar_tostring}, - {"bind", meth_bind}, - {"close", meth_close}, - {"connect", meth_connect}, - {"dirty", meth_dirty}, - {"getfd", meth_getfd}, - {"send", meth_send}, - {"sendto", meth_sendto}, - {"receive", meth_receive}, - {"receivefrom", meth_receivefrom}, - {"setfd", meth_setfd}, - {"setoption", meth_setoption}, - {"setpeername", meth_connect}, - {"setsockname", meth_bind}, - {"getsockname", meth_getsockname}, - {"settimeout", meth_settimeout}, - {"gettimeout", meth_gettimeout}, - {NULL, NULL} -}; - -/* socket option handlers */ -static t_opt optset[] = { - {"reuseaddr", opt_set_reuseaddr}, - {NULL, NULL} -}; - -/* functions in library namespace */ -static luaL_Reg func[] = { - {"dgram", global_create}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int unixdgram_open(lua_State *L) -{ - /* create classes */ - auxiliar_newclass(L, "unixdgram{connected}", unixdgram_methods); - auxiliar_newclass(L, "unixdgram{unconnected}", unixdgram_methods); - /* create class groups */ - auxiliar_add2group(L, "unixdgram{connected}", "unixdgram{any}"); - auxiliar_add2group(L, "unixdgram{unconnected}", "unixdgram{any}"); - auxiliar_add2group(L, "unixdgram{connected}", "select{able}"); - auxiliar_add2group(L, "unixdgram{unconnected}", "select{able}"); - - luaL_setfuncs(L, func, 0); - return 0; -} - -/*=========================================================================*\ -* Lua methods -\*=========================================================================*/ -static const char *unixdgram_strerror(int err) -{ - /* a 'closed' error on an unconnected means the target address was not - * accepted by the transport layer */ - if (err == IO_CLOSED) return "refused"; - else return socket_strerror(err); -} - -static int meth_send(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{connected}", 1); - p_timeout tm = &un->tm; - size_t count, sent = 0; - int err; - const char *data = luaL_checklstring(L, 2, &count); - timeout_markstart(tm); - err = socket_send(&un->sock, data, count, &sent, tm); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, unixdgram_strerror(err)); - return 2; - } - lua_pushnumber(L, (lua_Number) sent); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Send data through unconnected unixdgram socket -\*-------------------------------------------------------------------------*/ -static int meth_sendto(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1); - size_t count, sent = 0; - const char *data = luaL_checklstring(L, 2, &count); - const char *path = luaL_checkstring(L, 3); - p_timeout tm = &un->tm; - int err; - struct sockaddr_un remote; - size_t len = strlen(path); - - if (len >= sizeof(remote.sun_path)) { - lua_pushnil(L); - lua_pushstring(L, "path too long"); - return 2; - } - - memset(&remote, 0, sizeof(remote)); - strcpy(remote.sun_path, path); - remote.sun_family = AF_UNIX; - timeout_markstart(tm); -#ifdef UNIX_HAS_SUN_LEN - remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len) - + len + 1; - err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, remote.sun_len, tm); -#else - err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, - sizeof(remote.sun_family) + len, tm); -#endif - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, unixdgram_strerror(err)); - return 2; - } - lua_pushnumber(L, (lua_Number) sent); - return 1; -} - -static int meth_receive(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - char buf[UNIXDGRAM_DATAGRAMSIZE]; - size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); - char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; - int err; - p_timeout tm = &un->tm; - timeout_markstart(tm); - if (!dgram) { - lua_pushnil(L); - lua_pushliteral(L, "out of memory"); - return 2; - } - err = socket_recv(&un->sock, dgram, wanted, &got, tm); - /* Unlike STREAM, recv() of zero is not closed, but a zero-length packet. */ - if (err != IO_DONE && err != IO_CLOSED) { - lua_pushnil(L); - lua_pushstring(L, unixdgram_strerror(err)); - if (wanted > sizeof(buf)) free(dgram); - return 2; - } - lua_pushlstring(L, dgram, got); - if (wanted > sizeof(buf)) free(dgram); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Receives data and sender from a DGRAM socket -\*-------------------------------------------------------------------------*/ -static int meth_receivefrom(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1); - char buf[UNIXDGRAM_DATAGRAMSIZE]; - size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); - char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; - struct sockaddr_un addr; - socklen_t addr_len = sizeof(addr); - int err; - p_timeout tm = &un->tm; - timeout_markstart(tm); - if (!dgram) { - lua_pushnil(L); - lua_pushliteral(L, "out of memory"); - return 2; - } - addr.sun_path[0] = '\0'; - err = socket_recvfrom(&un->sock, dgram, wanted, &got, (SA *) &addr, - &addr_len, tm); - /* Unlike STREAM, recv() of zero is not closed, but a zero-length packet. */ - if (err != IO_DONE && err != IO_CLOSED) { - lua_pushnil(L); - lua_pushstring(L, unixdgram_strerror(err)); - if (wanted > sizeof(buf)) free(dgram); - return 2; - } - - lua_pushlstring(L, dgram, got); - /* the path may be empty, when client send without bind */ - lua_pushstring(L, addr.sun_path); - if (wanted > sizeof(buf)) free(dgram); - return 2; -} - -/*-------------------------------------------------------------------------*\ -* Just call option handler -\*-------------------------------------------------------------------------*/ -static int meth_setoption(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - return opt_meth_setoption(L, optset, &un->sock); -} - -/*-------------------------------------------------------------------------*\ -* Select support methods -\*-------------------------------------------------------------------------*/ -static int meth_getfd(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - lua_pushnumber(L, (int) un->sock); - return 1; -} - -/* this is very dangerous, but can be handy for those that are brave enough */ -static int meth_setfd(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - un->sock = (t_socket) luaL_checknumber(L, 2); - return 0; -} - -static int meth_dirty(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - (void) un; - lua_pushboolean(L, 0); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Binds an object to an address -\*-------------------------------------------------------------------------*/ -static const char *unixdgram_trybind(p_unix un, const char *path) { - struct sockaddr_un local; - size_t len = strlen(path); - int err; - if (len >= sizeof(local.sun_path)) return "path too long"; - memset(&local, 0, sizeof(local)); - strcpy(local.sun_path, path); - local.sun_family = AF_UNIX; -#ifdef UNIX_HAS_SUN_LEN - local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len) - + len + 1; - err = socket_bind(&un->sock, (SA *) &local, local.sun_len); - -#else - err = socket_bind(&un->sock, (SA *) &local, - sizeof(local.sun_family) + len); -#endif - if (err != IO_DONE) socket_destroy(&un->sock); - return socket_strerror(err); -} - -static int meth_bind(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1); - const char *path = luaL_checkstring(L, 2); - const char *err = unixdgram_trybind(un, path); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - lua_pushnumber(L, 1); - return 1; -} - -static int meth_getsockname(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - struct sockaddr_un peer = {0}; - socklen_t peer_len = sizeof(peer); - - if (getsockname(un->sock, (SA *) &peer, &peer_len) < 0) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(errno)); - return 2; - } - - lua_pushstring(L, peer.sun_path); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Turns a master unixdgram object into a client object. -\*-------------------------------------------------------------------------*/ -static const char *unixdgram_tryconnect(p_unix un, const char *path) -{ - struct sockaddr_un remote; - int err; - size_t len = strlen(path); - if (len >= sizeof(remote.sun_path)) return "path too long"; - memset(&remote, 0, sizeof(remote)); - strcpy(remote.sun_path, path); - remote.sun_family = AF_UNIX; - timeout_markstart(&un->tm); -#ifdef UNIX_HAS_SUN_LEN - remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len) - + len + 1; - err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm); -#else - err = socket_connect(&un->sock, (SA *) &remote, - sizeof(remote.sun_family) + len, &un->tm); -#endif - if (err != IO_DONE) socket_destroy(&un->sock); - return socket_strerror(err); -} - -static int meth_connect(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - const char *path = luaL_checkstring(L, 2); - const char *err = unixdgram_tryconnect(un, path); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - /* turn unconnected object into a connected object */ - auxiliar_setclass(L, "unixdgram{connected}", 1); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Closes socket used by object -\*-------------------------------------------------------------------------*/ -static int meth_close(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - socket_destroy(&un->sock); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Just call tm methods -\*-------------------------------------------------------------------------*/ -static int meth_settimeout(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - return timeout_meth_settimeout(L, &un->tm); -} - -static int meth_gettimeout(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); - return timeout_meth_gettimeout(L, &un->tm); -} - -/*=========================================================================*\ -* Library functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Creates a master unixdgram object -\*-------------------------------------------------------------------------*/ -static int global_create(lua_State *L) -{ - t_socket sock; - int err = socket_create(&sock, AF_UNIX, SOCK_DGRAM, 0); - /* try to allocate a system socket */ - if (err == IO_DONE) { - /* allocate unixdgram object */ - p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix)); - /* set its type as master object */ - auxiliar_setclass(L, "unixdgram{unconnected}", -1); - /* initialize remaining structure fields */ - socket_setnonblocking(&sock); - un->sock = sock; - io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, - (p_error) socket_ioerror, &un->sock); - timeout_init(&un->tm, -1, -1); - buffer_init(&un->buf, &un->io, &un->tm); - return 1; - } else { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(err)); - return 2; - } -} diff --git a/build/premake/premake5/binmodules/luasocket/src/unixdgram.h b/build/premake/premake5/binmodules/luasocket/src/unixdgram.h deleted file mode 100644 index 7187966d48..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/unixdgram.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef UNIXDGRAM_H -#define UNIXDGRAM_H -/*=========================================================================*\ -* DGRAM object -* LuaSocket toolkit -* -* The dgram.h module provides LuaSocket with support for DGRAM protocol -* (AF_INET, SOCK_DGRAM). -* -* Two classes are defined: connected and unconnected. DGRAM objects are -* originally unconnected. They can be "connected" to a given address -* with a call to the setpeername function. The same function can be used to -* break the connection. -\*=========================================================================*/ - -#include "unix.h" - -int unixdgram_open(lua_State *L); - -#endif /* UNIXDGRAM_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/unixstream.c b/build/premake/premake5/binmodules/luasocket/src/unixstream.c deleted file mode 100644 index 0b9055ccbc..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/unixstream.c +++ /dev/null @@ -1,357 +0,0 @@ -/*=========================================================================*\ -* Unix domain socket stream sub module -* LuaSocket toolkit -\*=========================================================================*/ -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - -#include "auxiliar.h" -#include "socket.h" -#include "options.h" -#include "unixstream.h" -#include - -/*=========================================================================*\ -* Internal function prototypes -\*=========================================================================*/ -static int global_create(lua_State *L); -static int meth_connect(lua_State *L); -static int meth_listen(lua_State *L); -static int meth_bind(lua_State *L); -static int meth_send(lua_State *L); -static int meth_shutdown(lua_State *L); -static int meth_receive(lua_State *L); -static int meth_accept(lua_State *L); -static int meth_close(lua_State *L); -static int meth_setoption(lua_State *L); -static int meth_settimeout(lua_State *L); -static int meth_getfd(lua_State *L); -static int meth_setfd(lua_State *L); -static int meth_dirty(lua_State *L); -static int meth_getstats(lua_State *L); -static int meth_setstats(lua_State *L); -static int meth_getsockname(lua_State *L); - -static const char *unixstream_tryconnect(p_unix un, const char *path); -static const char *unixstream_trybind(p_unix un, const char *path); - -/* unixstream object methods */ -static luaL_Reg unixstream_methods[] = { - {"__gc", meth_close}, - {"__tostring", auxiliar_tostring}, - {"accept", meth_accept}, - {"bind", meth_bind}, - {"close", meth_close}, - {"connect", meth_connect}, - {"dirty", meth_dirty}, - {"getfd", meth_getfd}, - {"getstats", meth_getstats}, - {"setstats", meth_setstats}, - {"listen", meth_listen}, - {"receive", meth_receive}, - {"send", meth_send}, - {"setfd", meth_setfd}, - {"setoption", meth_setoption}, - {"setpeername", meth_connect}, - {"setsockname", meth_bind}, - {"getsockname", meth_getsockname}, - {"settimeout", meth_settimeout}, - {"shutdown", meth_shutdown}, - {NULL, NULL} -}; - -/* socket option handlers */ -static t_opt optset[] = { - {"keepalive", opt_set_keepalive}, - {"reuseaddr", opt_set_reuseaddr}, - {"linger", opt_set_linger}, - {NULL, NULL} -}; - -/* functions in library namespace */ -static luaL_Reg func[] = { - {"stream", global_create}, - {NULL, NULL} -}; - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int unixstream_open(lua_State *L) -{ - /* create classes */ - auxiliar_newclass(L, "unixstream{master}", unixstream_methods); - auxiliar_newclass(L, "unixstream{client}", unixstream_methods); - auxiliar_newclass(L, "unixstream{server}", unixstream_methods); - - /* create class groups */ - auxiliar_add2group(L, "unixstream{master}", "unixstream{any}"); - auxiliar_add2group(L, "unixstream{client}", "unixstream{any}"); - auxiliar_add2group(L, "unixstream{server}", "unixstream{any}"); - - luaL_setfuncs(L, func, 0); - return 0; -} - -/*=========================================================================*\ -* Lua methods -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Just call buffered IO methods -\*-------------------------------------------------------------------------*/ -static int meth_send(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); - return buffer_meth_send(L, &un->buf); -} - -static int meth_receive(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); - return buffer_meth_receive(L, &un->buf); -} - -static int meth_getstats(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); - return buffer_meth_getstats(L, &un->buf); -} - -static int meth_setstats(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); - return buffer_meth_setstats(L, &un->buf); -} - -/*-------------------------------------------------------------------------*\ -* Just call option handler -\*-------------------------------------------------------------------------*/ -static int meth_setoption(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - return opt_meth_setoption(L, optset, &un->sock); -} - -/*-------------------------------------------------------------------------*\ -* Select support methods -\*-------------------------------------------------------------------------*/ -static int meth_getfd(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - lua_pushnumber(L, (int) un->sock); - return 1; -} - -/* this is very dangerous, but can be handy for those that are brave enough */ -static int meth_setfd(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - un->sock = (t_socket) luaL_checknumber(L, 2); - return 0; -} - -static int meth_dirty(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - lua_pushboolean(L, !buffer_isempty(&un->buf)); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Waits for and returns a client object attempting connection to the -* server object -\*-------------------------------------------------------------------------*/ -static int meth_accept(lua_State *L) { - p_unix server = (p_unix) auxiliar_checkclass(L, "unixstream{server}", 1); - p_timeout tm = timeout_markstart(&server->tm); - t_socket sock; - int err = socket_accept(&server->sock, &sock, NULL, NULL, tm); - /* if successful, push client socket */ - if (err == IO_DONE) { - p_unix clnt = (p_unix) lua_newuserdata(L, sizeof(t_unix)); - auxiliar_setclass(L, "unixstream{client}", -1); - /* initialize structure fields */ - socket_setnonblocking(&sock); - clnt->sock = sock; - io_init(&clnt->io, (p_send)socket_send, (p_recv)socket_recv, - (p_error) socket_ioerror, &clnt->sock); - timeout_init(&clnt->tm, -1, -1); - buffer_init(&clnt->buf, &clnt->io, &clnt->tm); - return 1; - } else { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(err)); - return 2; - } -} - -/*-------------------------------------------------------------------------*\ -* Binds an object to an address -\*-------------------------------------------------------------------------*/ -static const char *unixstream_trybind(p_unix un, const char *path) { - struct sockaddr_un local; - size_t len = strlen(path); - int err; - if (len >= sizeof(local.sun_path)) return "path too long"; - memset(&local, 0, sizeof(local)); - strcpy(local.sun_path, path); - local.sun_family = AF_UNIX; -#ifdef UNIX_HAS_SUN_LEN - local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len) - + len + 1; - err = socket_bind(&un->sock, (SA *) &local, local.sun_len); - -#else - err = socket_bind(&un->sock, (SA *) &local, - sizeof(local.sun_family) + len); -#endif - if (err != IO_DONE) socket_destroy(&un->sock); - return socket_strerror(err); -} - -static int meth_bind(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1); - const char *path = luaL_checkstring(L, 2); - const char *err = unixstream_trybind(un, path); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - lua_pushnumber(L, 1); - return 1; -} - -static int meth_getsockname(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - struct sockaddr_un peer = {0}; - socklen_t peer_len = sizeof(peer); - - if (getsockname(un->sock, (SA *) &peer, &peer_len) < 0) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(errno)); - return 2; - } - - lua_pushstring(L, peer.sun_path); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Turns a master unixstream object into a client object. -\*-------------------------------------------------------------------------*/ -static const char *unixstream_tryconnect(p_unix un, const char *path) -{ - struct sockaddr_un remote; - int err; - size_t len = strlen(path); - if (len >= sizeof(remote.sun_path)) return "path too long"; - memset(&remote, 0, sizeof(remote)); - strcpy(remote.sun_path, path); - remote.sun_family = AF_UNIX; - timeout_markstart(&un->tm); -#ifdef UNIX_HAS_SUN_LEN - remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len) - + len + 1; - err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm); -#else - err = socket_connect(&un->sock, (SA *) &remote, - sizeof(remote.sun_family) + len, &un->tm); -#endif - if (err != IO_DONE) socket_destroy(&un->sock); - return socket_strerror(err); -} - -static int meth_connect(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1); - const char *path = luaL_checkstring(L, 2); - const char *err = unixstream_tryconnect(un, path); - if (err) { - lua_pushnil(L); - lua_pushstring(L, err); - return 2; - } - /* turn master object into a client object */ - auxiliar_setclass(L, "unixstream{client}", 1); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Closes socket used by object -\*-------------------------------------------------------------------------*/ -static int meth_close(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - socket_destroy(&un->sock); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Puts the sockt in listen mode -\*-------------------------------------------------------------------------*/ -static int meth_listen(lua_State *L) -{ - p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1); - int backlog = (int) luaL_optnumber(L, 2, 32); - int err = socket_listen(&un->sock, backlog); - if (err != IO_DONE) { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(err)); - return 2; - } - /* turn master object into a server object */ - auxiliar_setclass(L, "unixstream{server}", 1); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Shuts the connection down partially -\*-------------------------------------------------------------------------*/ -static int meth_shutdown(lua_State *L) -{ - /* SHUT_RD, SHUT_WR, SHUT_RDWR have the value 0, 1, 2, so we can use method index directly */ - static const char* methods[] = { "receive", "send", "both", NULL }; - p_unix stream = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); - int how = luaL_checkoption(L, 2, "both", methods); - socket_shutdown(&stream->sock, how); - lua_pushnumber(L, 1); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Just call tm methods -\*-------------------------------------------------------------------------*/ -static int meth_settimeout(lua_State *L) { - p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); - return timeout_meth_settimeout(L, &un->tm); -} - -/*=========================================================================*\ -* Library functions -\*=========================================================================*/ -/*-------------------------------------------------------------------------*\ -* Creates a master unixstream object -\*-------------------------------------------------------------------------*/ -static int global_create(lua_State *L) { - t_socket sock; - int err = socket_create(&sock, AF_UNIX, SOCK_STREAM, 0); - /* try to allocate a system socket */ - if (err == IO_DONE) { - /* allocate unixstream object */ - p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix)); - /* set its type as master object */ - auxiliar_setclass(L, "unixstream{master}", -1); - /* initialize remaining structure fields */ - socket_setnonblocking(&sock); - un->sock = sock; - io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, - (p_error) socket_ioerror, &un->sock); - timeout_init(&un->tm, -1, -1); - buffer_init(&un->buf, &un->io, &un->tm); - return 1; - } else { - lua_pushnil(L); - lua_pushstring(L, socket_strerror(err)); - return 2; - } -} diff --git a/build/premake/premake5/binmodules/luasocket/src/unixstream.h b/build/premake/premake5/binmodules/luasocket/src/unixstream.h deleted file mode 100644 index ef1d071ec7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/unixstream.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef UNIXSTREAM_H -#define UNIXSTREAM_H -/*=========================================================================*\ -* UNIX STREAM object -* LuaSocket toolkit -* -* The unixstream.h module is basicly a glue that puts together modules buffer.h, -* timeout.h socket.h and inet.h to provide the LuaSocket UNIX STREAM (AF_UNIX, -* SOCK_STREAM) support. -* -* Three classes are defined: master, client and server. The master class is -* a newly created unixstream object, that has not been bound or connected. Server -* objects are unixstream objects bound to some local address. Client objects are -* unixstream objects either connected to some address or returned by the accept -* method of a server object. -\*=========================================================================*/ -#include "unix.h" - -int unixstream_open(lua_State *L); - -#endif /* UNIXSTREAM_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/url.lua b/build/premake/premake5/binmodules/luasocket/src/url.lua deleted file mode 100644 index 110ea940d5..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/url.lua +++ /dev/null @@ -1,309 +0,0 @@ ------------------------------------------------------------------------------ --- URI parsing, composition and relative URL resolution --- LuaSocket toolkit. --- Author: Diego Nehab ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module ------------------------------------------------------------------------------ -local string = require("string") -local base = _G -local table = require("table") -local socket = require("socket") - -socket.url = {} -local _M = socket.url - ------------------------------------------------------------------------------ --- Module version ------------------------------------------------------------------------------ -_M._VERSION = "URL 1.0.3" - ------------------------------------------------------------------------------ --- Encodes a string into its escaped hexadecimal representation --- Input --- s: binary string to be encoded --- Returns --- escaped representation of string binary ------------------------------------------------------------------------------ -function _M.escape(s) - return (string.gsub(s, "([^A-Za-z0-9_])", function(c) - return string.format("%%%02x", string.byte(c)) - end)) -end - ------------------------------------------------------------------------------ --- Protects a path segment, to prevent it from interfering with the --- url parsing. --- Input --- s: binary string to be encoded --- Returns --- escaped representation of string binary ------------------------------------------------------------------------------ -local function make_set(t) - local s = {} - for i,v in base.ipairs(t) do - s[t[i]] = 1 - end - return s -end - --- these are allowed within a path segment, along with alphanum --- other characters must be escaped -local segment_set = make_set { - "-", "_", ".", "!", "~", "*", "'", "(", - ")", ":", "@", "&", "=", "+", "$", ",", -} - -local function protect_segment(s) - return string.gsub(s, "([^A-Za-z0-9_])", function (c) - if segment_set[c] then return c - else return string.format("%%%02X", string.byte(c)) end - end) -end - ------------------------------------------------------------------------------ --- Unencodes a escaped hexadecimal string into its binary representation --- Input --- s: escaped hexadecimal string to be unencoded --- Returns --- unescaped binary representation of escaped hexadecimal binary ------------------------------------------------------------------------------ -function _M.unescape(s) - return (string.gsub(s, "%%(%x%x)", function(hex) - return string.char(base.tonumber(hex, 16)) - end)) -end - ------------------------------------------------------------------------------ --- Builds a path from a base path and a relative path --- Input --- base_path --- relative_path --- Returns --- corresponding absolute path ------------------------------------------------------------------------------ -local function absolute_path(base_path, relative_path) - if string.sub(relative_path, 1, 1) == "/" then return relative_path end - local path = string.gsub(base_path, "[^/]*$", "") - path = path .. relative_path - path = string.gsub(path, "([^/]*%./)", function (s) - if s ~= "./" then return s else return "" end - end) - path = string.gsub(path, "/%.$", "/") - local reduced - while reduced ~= path do - reduced = path - path = string.gsub(reduced, "([^/]*/%.%./)", function (s) - if s ~= "../../" then return "" else return s end - end) - end - path = string.gsub(reduced, "([^/]*/%.%.)$", function (s) - if s ~= "../.." then return "" else return s end - end) - return path -end - ------------------------------------------------------------------------------ --- Parses a url and returns a table with all its parts according to RFC 2396 --- The following grammar describes the names given to the URL parts --- ::= :///;?# --- ::= @: --- ::= [:] --- :: = {/} --- Input --- url: uniform resource locator of request --- default: table with default values for each field --- Returns --- table with the following fields, where RFC naming conventions have --- been preserved: --- scheme, authority, userinfo, user, password, host, port, --- path, params, query, fragment --- Obs: --- the leading '/' in {/} is considered part of ------------------------------------------------------------------------------ -function _M.parse(url, default) - -- initialize default parameters - local parsed = {} - for i,v in base.pairs(default or parsed) do parsed[i] = v end - -- empty url is parsed to nil - if not url or url == "" then return nil, "invalid url" end - -- remove whitespace - -- url = string.gsub(url, "%s", "") - -- get scheme - url = string.gsub(url, "^([%w][%w%+%-%.]*)%:", - function(s) parsed.scheme = s; return "" end) - -- get authority - url = string.gsub(url, "^//([^/]*)", function(n) - parsed.authority = n - return "" - end) - -- get fragment - url = string.gsub(url, "#(.*)$", function(f) - parsed.fragment = f - return "" - end) - -- get query string - url = string.gsub(url, "%?(.*)", function(q) - parsed.query = q - return "" - end) - -- get params - url = string.gsub(url, "%;(.*)", function(p) - parsed.params = p - return "" - end) - -- path is whatever was left - if url ~= "" then parsed.path = url end - local authority = parsed.authority - if not authority then return parsed end - authority = string.gsub(authority,"^([^@]*)@", - function(u) parsed.userinfo = u; return "" end) - authority = string.gsub(authority, ":([^:%]]*)$", - function(p) parsed.port = p; return "" end) - if authority ~= "" then - -- IPv6? - parsed.host = string.match(authority, "^%[(.+)%]$") or authority - end - local userinfo = parsed.userinfo - if not userinfo then return parsed end - userinfo = string.gsub(userinfo, ":([^:]*)$", - function(p) parsed.password = p; return "" end) - parsed.user = userinfo - return parsed -end - ------------------------------------------------------------------------------ --- Rebuilds a parsed URL from its components. --- Components are protected if any reserved or unallowed characters are found --- Input --- parsed: parsed URL, as returned by parse --- Returns --- a stringing with the corresponding URL ------------------------------------------------------------------------------ -function _M.build(parsed) - --local ppath = _M.parse_path(parsed.path or "") - --local url = _M.build_path(ppath) - local url = parsed.path or "" - if parsed.params then url = url .. ";" .. parsed.params end - if parsed.query then url = url .. "?" .. parsed.query end - local authority = parsed.authority - if parsed.host then - authority = parsed.host - if string.find(authority, ":") then -- IPv6? - authority = "[" .. authority .. "]" - end - if parsed.port then authority = authority .. ":" .. base.tostring(parsed.port) end - local userinfo = parsed.userinfo - if parsed.user then - userinfo = parsed.user - if parsed.password then - userinfo = userinfo .. ":" .. parsed.password - end - end - if userinfo then authority = userinfo .. "@" .. authority end - end - if authority then url = "//" .. authority .. url end - if parsed.scheme then url = parsed.scheme .. ":" .. url end - if parsed.fragment then url = url .. "#" .. parsed.fragment end - -- url = string.gsub(url, "%s", "") - return url -end - ------------------------------------------------------------------------------ --- Builds a absolute URL from a base and a relative URL according to RFC 2396 --- Input --- base_url --- relative_url --- Returns --- corresponding absolute url ------------------------------------------------------------------------------ -function _M.absolute(base_url, relative_url) - local base_parsed - if base.type(base_url) == "table" then - base_parsed = base_url - base_url = _M.build(base_parsed) - else - base_parsed = _M.parse(base_url) - end - local relative_parsed = _M.parse(relative_url) - if not base_parsed then return relative_url - elseif not relative_parsed then return base_url - elseif relative_parsed.scheme then return relative_url - else - relative_parsed.scheme = base_parsed.scheme - if not relative_parsed.authority then - relative_parsed.authority = base_parsed.authority - if not relative_parsed.path then - relative_parsed.path = base_parsed.path - if not relative_parsed.params then - relative_parsed.params = base_parsed.params - if not relative_parsed.query then - relative_parsed.query = base_parsed.query - end - end - else - relative_parsed.path = absolute_path(base_parsed.path or "", - relative_parsed.path) - end - end - return _M.build(relative_parsed) - end -end - ------------------------------------------------------------------------------ --- Breaks a path into its segments, unescaping the segments --- Input --- path --- Returns --- segment: a table with one entry per segment ------------------------------------------------------------------------------ -function _M.parse_path(path) - local parsed = {} - path = path or "" - --path = string.gsub(path, "%s", "") - string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end) - for i = 1, #parsed do - parsed[i] = _M.unescape(parsed[i]) - end - if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end - if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end - return parsed -end - ------------------------------------------------------------------------------ --- Builds a path component from its segments, escaping protected characters. --- Input --- parsed: path segments --- unsafe: if true, segments are not protected before path is built --- Returns --- path: corresponding path stringing ------------------------------------------------------------------------------ -function _M.build_path(parsed, unsafe) - local path = "" - local n = #parsed - if unsafe then - for i = 1, n-1 do - path = path .. parsed[i] - path = path .. "/" - end - if n > 0 then - path = path .. parsed[n] - if parsed.is_directory then path = path .. "/" end - end - else - for i = 1, n-1 do - path = path .. protect_segment(parsed[i]) - path = path .. "/" - end - if n > 0 then - path = path .. protect_segment(parsed[n]) - if parsed.is_directory then path = path .. "/" end - end - end - if parsed.is_absolute then path = "/" .. path end - return path -end - -return _M diff --git a/build/premake/premake5/binmodules/luasocket/src/usocket.c b/build/premake/premake5/binmodules/luasocket/src/usocket.c deleted file mode 100644 index 6e7f8f6747..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/usocket.c +++ /dev/null @@ -1,451 +0,0 @@ -/*=========================================================================*\ -* Socket compatibilization module for Unix -* LuaSocket toolkit -* -* The code is now interrupt-safe. -* The penalty of calling select to avoid busy-wait is only paid when -* the I/O call fail in the first place. -\*=========================================================================*/ -#include -#include - -#include "socket.h" -#include "pierror.h" - -/*-------------------------------------------------------------------------*\ -* Wait for readable/writable/connected socket with timeout -\*-------------------------------------------------------------------------*/ -#ifndef SOCKET_SELECT -#include - -#define WAITFD_R POLLIN -#define WAITFD_W POLLOUT -#define WAITFD_C (POLLIN|POLLOUT) -int socket_waitfd(p_socket ps, int sw, p_timeout tm) { - int ret; - struct pollfd pfd; - pfd.fd = *ps; - pfd.events = sw; - pfd.revents = 0; - if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ - do { - int t = (int)(timeout_getretry(tm)*1e3); - ret = poll(&pfd, 1, t >= 0? t: -1); - } while (ret == -1 && errno == EINTR); - if (ret == -1) return errno; - if (ret == 0) return IO_TIMEOUT; - if (sw == WAITFD_C && (pfd.revents & (POLLIN|POLLERR))) return IO_CLOSED; - return IO_DONE; -} -#else - -#define WAITFD_R 1 -#define WAITFD_W 2 -#define WAITFD_C (WAITFD_R|WAITFD_W) - -int socket_waitfd(p_socket ps, int sw, p_timeout tm) { - int ret; - fd_set rfds, wfds, *rp, *wp; - struct timeval tv, *tp; - double t; - if (*ps >= FD_SETSIZE) return EINVAL; - if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ - do { - /* must set bits within loop, because select may have modifed them */ - rp = wp = NULL; - if (sw & WAITFD_R) { FD_ZERO(&rfds); FD_SET(*ps, &rfds); rp = &rfds; } - if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; } - t = timeout_getretry(tm); - tp = NULL; - if (t >= 0.0) { - tv.tv_sec = (int)t; - tv.tv_usec = (int)((t-tv.tv_sec)*1.0e6); - tp = &tv; - } - ret = select(*ps+1, rp, wp, NULL, tp); - } while (ret == -1 && errno == EINTR); - if (ret == -1) return errno; - if (ret == 0) return IO_TIMEOUT; - if (sw == WAITFD_C && FD_ISSET(*ps, &rfds)) return IO_CLOSED; - return IO_DONE; -} -#endif - - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int socket_open(void) { - /* installs a handler to ignore sigpipe or it will crash us */ - signal(SIGPIPE, SIG_IGN); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Close module -\*-------------------------------------------------------------------------*/ -int socket_close(void) { - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Close and inutilize socket -\*-------------------------------------------------------------------------*/ -void socket_destroy(p_socket ps) { - if (*ps != SOCKET_INVALID) { - close(*ps); - *ps = SOCKET_INVALID; - } -} - -/*-------------------------------------------------------------------------*\ -* Select with timeout control -\*-------------------------------------------------------------------------*/ -int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, - p_timeout tm) { - int ret; - do { - struct timeval tv; - double t = timeout_getretry(tm); - tv.tv_sec = (int) t; - tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6); - /* timeout = 0 means no wait */ - ret = select(n, rfds, wfds, efds, t >= 0.0 ? &tv: NULL); - } while (ret < 0 && errno == EINTR); - return ret; -} - -/*-------------------------------------------------------------------------*\ -* Creates and sets up a socket -\*-------------------------------------------------------------------------*/ -int socket_create(p_socket ps, int domain, int type, int protocol) { - *ps = socket(domain, type, protocol); - if (*ps != SOCKET_INVALID) return IO_DONE; - else return errno; -} - -/*-------------------------------------------------------------------------*\ -* Binds or returns error message -\*-------------------------------------------------------------------------*/ -int socket_bind(p_socket ps, SA *addr, socklen_t len) { - int err = IO_DONE; - socket_setblocking(ps); - if (bind(*ps, addr, len) < 0) err = errno; - socket_setnonblocking(ps); - return err; -} - -/*-------------------------------------------------------------------------*\ -* -\*-------------------------------------------------------------------------*/ -int socket_listen(p_socket ps, int backlog) { - int err = IO_DONE; - if (listen(*ps, backlog)) err = errno; - return err; -} - -/*-------------------------------------------------------------------------*\ -* -\*-------------------------------------------------------------------------*/ -void socket_shutdown(p_socket ps, int how) { - shutdown(*ps, how); -} - -/*-------------------------------------------------------------------------*\ -* Connects or returns error message -\*-------------------------------------------------------------------------*/ -int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) { - int err; - /* avoid calling on closed sockets */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; - /* call connect until done or failed without being interrupted */ - do if (connect(*ps, addr, len) == 0) return IO_DONE; - while ((err = errno) == EINTR); - /* if connection failed immediately, return error code */ - if (err != EINPROGRESS && err != EAGAIN) return err; - /* zero timeout case optimization */ - if (timeout_iszero(tm)) return IO_TIMEOUT; - /* wait until we have the result of the connection attempt or timeout */ - err = socket_waitfd(ps, WAITFD_C, tm); - if (err == IO_CLOSED) { - if (recv(*ps, (char *) &err, 0, 0) == 0) return IO_DONE; - else return errno; - } else return err; -} - -/*-------------------------------------------------------------------------*\ -* Accept with timeout -\*-------------------------------------------------------------------------*/ -int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout tm) { - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - int err; - if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE; - err = errno; - if (err == EINTR) continue; - if (err != EAGAIN && err != ECONNABORTED) return err; - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } - /* can't reach here */ - return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Send with timeout -\*-------------------------------------------------------------------------*/ -int socket_send(p_socket ps, const char *data, size_t count, - size_t *sent, p_timeout tm) -{ - int err; - *sent = 0; - /* avoid making system calls on closed sockets */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; - /* loop until we send something or we give up on error */ - for ( ;; ) { - long put = (long) send(*ps, data, count, 0); - /* if we sent anything, we are done */ - if (put >= 0) { - *sent = put; - return IO_DONE; - } - err = errno; - /* EPIPE means the connection was closed */ - if (err == EPIPE) return IO_CLOSED; - /* EPROTOTYPE means the connection is being closed (on Yosemite!)*/ - if (err == EPROTOTYPE) continue; - /* we call was interrupted, just try again */ - if (err == EINTR) continue; - /* if failed fatal reason, report error */ - if (err != EAGAIN) return err; - /* wait until we can send something or we timeout */ - if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; - } - /* can't reach here */ - return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Sendto with timeout -\*-------------------------------------------------------------------------*/ -int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, - SA *addr, socklen_t len, p_timeout tm) -{ - int err; - *sent = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - long put = (long) sendto(*ps, data, count, 0, addr, len); - if (put >= 0) { - *sent = put; - return IO_DONE; - } - err = errno; - if (err == EPIPE) return IO_CLOSED; - if (err == EPROTOTYPE) continue; - if (err == EINTR) continue; - if (err != EAGAIN) return err; - if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; - } - return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Receive with timeout -\*-------------------------------------------------------------------------*/ -int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) { - int err; - *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - long taken = (long) recv(*ps, data, count, 0); - if (taken > 0) { - *got = taken; - return IO_DONE; - } - err = errno; - if (taken == 0) return IO_CLOSED; - if (err == EINTR) continue; - if (err != EAGAIN) return err; - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } - return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Recvfrom with timeout -\*-------------------------------------------------------------------------*/ -int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, - SA *addr, socklen_t *len, p_timeout tm) { - int err; - *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - long taken = (long) recvfrom(*ps, data, count, 0, addr, len); - if (taken > 0) { - *got = taken; - return IO_DONE; - } - err = errno; - if (taken == 0) return IO_CLOSED; - if (err == EINTR) continue; - if (err != EAGAIN) return err; - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } - return IO_UNKNOWN; -} - - -/*-------------------------------------------------------------------------*\ -* Write with timeout -* -* socket_read and socket_write are cut-n-paste of socket_send and socket_recv, -* with send/recv replaced with write/read. We can't just use write/read -* in the socket version, because behaviour when size is zero is different. -\*-------------------------------------------------------------------------*/ -int socket_write(p_socket ps, const char *data, size_t count, - size_t *sent, p_timeout tm) -{ - int err; - *sent = 0; - /* avoid making system calls on closed sockets */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; - /* loop until we send something or we give up on error */ - for ( ;; ) { - long put = (long) write(*ps, data, count); - /* if we sent anything, we are done */ - if (put >= 0) { - *sent = put; - return IO_DONE; - } - err = errno; - /* EPIPE means the connection was closed */ - if (err == EPIPE) return IO_CLOSED; - /* EPROTOTYPE means the connection is being closed (on Yosemite!)*/ - if (err == EPROTOTYPE) continue; - /* we call was interrupted, just try again */ - if (err == EINTR) continue; - /* if failed fatal reason, report error */ - if (err != EAGAIN) return err; - /* wait until we can send something or we timeout */ - if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; - } - /* can't reach here */ - return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Read with timeout -* See note for socket_write -\*-------------------------------------------------------------------------*/ -int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) { - int err; - *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - long taken = (long) read(*ps, data, count); - if (taken > 0) { - *got = taken; - return IO_DONE; - } - err = errno; - if (taken == 0) return IO_CLOSED; - if (err == EINTR) continue; - if (err != EAGAIN) return err; - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } - return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Put socket into blocking mode -\*-------------------------------------------------------------------------*/ -void socket_setblocking(p_socket ps) { - int flags = fcntl(*ps, F_GETFL, 0); - flags &= (~(O_NONBLOCK)); - fcntl(*ps, F_SETFL, flags); -} - -/*-------------------------------------------------------------------------*\ -* Put socket into non-blocking mode -\*-------------------------------------------------------------------------*/ -void socket_setnonblocking(p_socket ps) { - int flags = fcntl(*ps, F_GETFL, 0); - flags |= O_NONBLOCK; - fcntl(*ps, F_SETFL, flags); -} - -/*-------------------------------------------------------------------------*\ -* DNS helpers -\*-------------------------------------------------------------------------*/ -int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) { - *hp = gethostbyaddr(addr, len, AF_INET); - if (*hp) return IO_DONE; - else if (h_errno) return h_errno; - else if (errno) return errno; - else return IO_UNKNOWN; -} - -int socket_gethostbyname(const char *addr, struct hostent **hp) { - *hp = gethostbyname(addr); - if (*hp) return IO_DONE; - else if (h_errno) return h_errno; - else if (errno) return errno; - else return IO_UNKNOWN; -} - -/*-------------------------------------------------------------------------*\ -* Error translation functions -* Make sure important error messages are standard -\*-------------------------------------------------------------------------*/ -const char *socket_hoststrerror(int err) { - if (err <= 0) return io_strerror(err); - switch (err) { - case HOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; - default: return hstrerror(err); - } -} - -const char *socket_strerror(int err) { - if (err <= 0) return io_strerror(err); - switch (err) { - case EADDRINUSE: return PIE_ADDRINUSE; - case EISCONN: return PIE_ISCONN; - case EACCES: return PIE_ACCESS; - case ECONNREFUSED: return PIE_CONNREFUSED; - case ECONNABORTED: return PIE_CONNABORTED; - case ECONNRESET: return PIE_CONNRESET; - case ETIMEDOUT: return PIE_TIMEDOUT; - default: { - return strerror(err); - } - } -} - -const char *socket_ioerror(p_socket ps, int err) { - (void) ps; - return socket_strerror(err); -} - -const char *socket_gaistrerror(int err) { - if (err == 0) return NULL; - switch (err) { - case EAI_AGAIN: return PIE_AGAIN; - case EAI_BADFLAGS: return PIE_BADFLAGS; -#ifdef EAI_BADHINTS - case EAI_BADHINTS: return PIE_BADHINTS; -#endif - case EAI_FAIL: return PIE_FAIL; - case EAI_FAMILY: return PIE_FAMILY; - case EAI_MEMORY: return PIE_MEMORY; - case EAI_NONAME: return PIE_NONAME; - case EAI_OVERFLOW: return PIE_OVERFLOW; -#ifdef EAI_PROTOCOL - case EAI_PROTOCOL: return PIE_PROTOCOL; -#endif - case EAI_SERVICE: return PIE_SERVICE; - case EAI_SOCKTYPE: return PIE_SOCKTYPE; - case EAI_SYSTEM: return strerror(errno); - default: return gai_strerror(err); - } -} - diff --git a/build/premake/premake5/binmodules/luasocket/src/usocket.h b/build/premake/premake5/binmodules/luasocket/src/usocket.h deleted file mode 100644 index 45f2f99f7f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/usocket.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef USOCKET_H -#define USOCKET_H -/*=========================================================================*\ -* Socket compatibilization module for Unix -* LuaSocket toolkit -\*=========================================================================*/ - -/*=========================================================================*\ -* BSD include files -\*=========================================================================*/ -/* error codes */ -#include -/* close function */ -#include -/* fnctnl function and associated constants */ -#include -/* struct sockaddr */ -#include -/* socket function */ -#include -/* struct timeval */ -#include -/* gethostbyname and gethostbyaddr functions */ -#include -/* sigpipe handling */ -#include -/* IP stuff*/ -#include -#include -/* TCP options (nagle algorithm disable) */ -#include -#include - -#ifndef SO_REUSEPORT -#define SO_REUSEPORT SO_REUSEADDR -#endif - -/* Some platforms use IPV6_JOIN_GROUP instead if - * IPV6_ADD_MEMBERSHIP. The semantics are same, though. */ -#ifndef IPV6_ADD_MEMBERSHIP -#ifdef IPV6_JOIN_GROUP -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#endif /* IPV6_JOIN_GROUP */ -#endif /* !IPV6_ADD_MEMBERSHIP */ - -/* Same with IPV6_DROP_MEMBERSHIP / IPV6_LEAVE_GROUP. */ -#ifndef IPV6_DROP_MEMBERSHIP -#ifdef IPV6_LEAVE_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP -#endif /* IPV6_LEAVE_GROUP */ -#endif /* !IPV6_DROP_MEMBERSHIP */ - -typedef int t_socket; -typedef t_socket *p_socket; -typedef struct sockaddr_storage t_sockaddr_storage; - -#define SOCKET_INVALID (-1) - -#endif /* USOCKET_H */ diff --git a/build/premake/premake5/binmodules/luasocket/src/wsocket.c b/build/premake/premake5/binmodules/luasocket/src/wsocket.c deleted file mode 100644 index 16901863d1..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/wsocket.c +++ /dev/null @@ -1,433 +0,0 @@ -/*=========================================================================*\ -* Socket compatibilization module for Win32 -* LuaSocket toolkit -* -* The penalty of calling select to avoid busy-wait is only paid when -* the I/O call fail in the first place. -\*=========================================================================*/ -#include - -#include "socket.h" -#include "pierror.h" - -/* WinSock doesn't have a strerror... */ -static const char *wstrerror(int err); - -/*-------------------------------------------------------------------------*\ -* Initializes module -\*-------------------------------------------------------------------------*/ -int socket_open(void) { - WSADATA wsaData; - WORD wVersionRequested = MAKEWORD(2, 0); - int err = WSAStartup(wVersionRequested, &wsaData ); - if (err != 0) return 0; - if ((LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) && - (LOBYTE(wsaData.wVersion) != 1 || HIBYTE(wsaData.wVersion) != 1)) { - WSACleanup(); - return 0; - } - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Close module -\*-------------------------------------------------------------------------*/ -int socket_close(void) { - WSACleanup(); - return 1; -} - -/*-------------------------------------------------------------------------*\ -* Wait for readable/writable/connected socket with timeout -\*-------------------------------------------------------------------------*/ -#define WAITFD_R 1 -#define WAITFD_W 2 -#define WAITFD_E 4 -#define WAITFD_C (WAITFD_E|WAITFD_W) - -int socket_waitfd(p_socket ps, int sw, p_timeout tm) { - int ret; - fd_set rfds, wfds, efds, *rp = NULL, *wp = NULL, *ep = NULL; - struct timeval tv, *tp = NULL; - double t; - if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ - if (sw & WAITFD_R) { - FD_ZERO(&rfds); - FD_SET(*ps, &rfds); - rp = &rfds; - } - if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; } - if (sw & WAITFD_C) { FD_ZERO(&efds); FD_SET(*ps, &efds); ep = &efds; } - if ((t = timeout_get(tm)) >= 0.0) { - tv.tv_sec = (int) t; - tv.tv_usec = (int) ((t-tv.tv_sec)*1.0e6); - tp = &tv; - } - ret = select(0, rp, wp, ep, tp); - if (ret == -1) return WSAGetLastError(); - if (ret == 0) return IO_TIMEOUT; - if (sw == WAITFD_C && FD_ISSET(*ps, &efds)) return IO_CLOSED; - return IO_DONE; -} - -/*-------------------------------------------------------------------------*\ -* Select with int timeout in ms -\*-------------------------------------------------------------------------*/ -int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, - p_timeout tm) { - struct timeval tv; - double t = timeout_get(tm); - tv.tv_sec = (int) t; - tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6); - if (n <= 0) { - Sleep((DWORD) (1000*t)); - return 0; - } else return select(0, rfds, wfds, efds, t >= 0.0? &tv: NULL); -} - -/*-------------------------------------------------------------------------*\ -* Close and inutilize socket -\*-------------------------------------------------------------------------*/ -void socket_destroy(p_socket ps) { - if (*ps != SOCKET_INVALID) { - socket_setblocking(ps); /* close can take a long time on WIN32 */ - closesocket(*ps); - *ps = SOCKET_INVALID; - } -} - -/*-------------------------------------------------------------------------*\ -* -\*-------------------------------------------------------------------------*/ -void socket_shutdown(p_socket ps, int how) { - socket_setblocking(ps); - shutdown(*ps, how); - socket_setnonblocking(ps); -} - -/*-------------------------------------------------------------------------*\ -* Creates and sets up a socket -\*-------------------------------------------------------------------------*/ -int socket_create(p_socket ps, int domain, int type, int protocol) { - *ps = socket(domain, type, protocol); - if (*ps != SOCKET_INVALID) return IO_DONE; - else return WSAGetLastError(); -} - -/*-------------------------------------------------------------------------*\ -* Connects or returns error message -\*-------------------------------------------------------------------------*/ -int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) { - int err; - /* don't call on closed socket */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; - /* ask system to connect */ - if (connect(*ps, addr, len) == 0) return IO_DONE; - /* make sure the system is trying to connect */ - err = WSAGetLastError(); - if (err != WSAEWOULDBLOCK && err != WSAEINPROGRESS) return err; - /* zero timeout case optimization */ - if (timeout_iszero(tm)) return IO_TIMEOUT; - /* we wait until something happens */ - err = socket_waitfd(ps, WAITFD_C, tm); - if (err == IO_CLOSED) { - int err_len = sizeof(err); - /* give windows time to set the error (yes, disgusting) */ - Sleep(10); - /* find out why we failed */ - getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &err_len); - /* we KNOW there was an error. if 'why' is 0, we will return - * "unknown error", but it's not really our fault */ - return err > 0? err: IO_UNKNOWN; - } else return err; - -} - -/*-------------------------------------------------------------------------*\ -* Binds or returns error message -\*-------------------------------------------------------------------------*/ -int socket_bind(p_socket ps, SA *addr, socklen_t len) { - int err = IO_DONE; - socket_setblocking(ps); - if (bind(*ps, addr, len) < 0) err = WSAGetLastError(); - socket_setnonblocking(ps); - return err; -} - -/*-------------------------------------------------------------------------*\ -* -\*-------------------------------------------------------------------------*/ -int socket_listen(p_socket ps, int backlog) { - int err = IO_DONE; - socket_setblocking(ps); - if (listen(*ps, backlog) < 0) err = WSAGetLastError(); - socket_setnonblocking(ps); - return err; -} - -/*-------------------------------------------------------------------------*\ -* Accept with timeout -\*-------------------------------------------------------------------------*/ -int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, - p_timeout tm) { - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - int err; - /* try to get client socket */ - if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE; - /* find out why we failed */ - err = WSAGetLastError(); - /* if we failed because there was no connectoin, keep trying */ - if (err != WSAEWOULDBLOCK && err != WSAECONNABORTED) return err; - /* call select to avoid busy wait */ - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } -} - -/*-------------------------------------------------------------------------*\ -* Send with timeout -* On windows, if you try to send 10MB, the OS will buffer EVERYTHING -* this can take an awful lot of time and we will end up blocked. -* Therefore, whoever calls this function should not pass a huge buffer. -\*-------------------------------------------------------------------------*/ -int socket_send(p_socket ps, const char *data, size_t count, - size_t *sent, p_timeout tm) -{ - int err; - *sent = 0; - /* avoid making system calls on closed sockets */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; - /* loop until we send something or we give up on error */ - for ( ;; ) { - /* try to send something */ - int put = send(*ps, data, (int) count, 0); - /* if we sent something, we are done */ - if (put > 0) { - *sent = put; - return IO_DONE; - } - /* deal with failure */ - err = WSAGetLastError(); - /* we can only proceed if there was no serious error */ - if (err != WSAEWOULDBLOCK) return err; - /* avoid busy wait */ - if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; - } -} - -/*-------------------------------------------------------------------------*\ -* Sendto with timeout -\*-------------------------------------------------------------------------*/ -int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, - SA *addr, socklen_t len, p_timeout tm) -{ - int err; - *sent = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - int put = sendto(*ps, data, (int) count, 0, addr, len); - if (put > 0) { - *sent = put; - return IO_DONE; - } - err = WSAGetLastError(); - if (err != WSAEWOULDBLOCK) return err; - if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; - } -} - -/*-------------------------------------------------------------------------*\ -* Receive with timeout -\*-------------------------------------------------------------------------*/ -int socket_recv(p_socket ps, char *data, size_t count, size_t *got, - p_timeout tm) -{ - int err, prev = IO_DONE; - *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - int taken = recv(*ps, data, (int) count, 0); - if (taken > 0) { - *got = taken; - return IO_DONE; - } - if (taken == 0) return IO_CLOSED; - err = WSAGetLastError(); - /* On UDP, a connreset simply means the previous send failed. - * So we try again. - * On TCP, it means our socket is now useless, so the error passes. - * (We will loop again, exiting because the same error will happen) */ - if (err != WSAEWOULDBLOCK) { - if (err != WSAECONNRESET || prev == WSAECONNRESET) return err; - prev = err; - } - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } -} - -/*-------------------------------------------------------------------------*\ -* Recvfrom with timeout -\*-------------------------------------------------------------------------*/ -int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, - SA *addr, socklen_t *len, p_timeout tm) -{ - int err, prev = IO_DONE; - *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; - for ( ;; ) { - int taken = recvfrom(*ps, data, (int) count, 0, addr, len); - if (taken > 0) { - *got = taken; - return IO_DONE; - } - if (taken == 0) return IO_CLOSED; - err = WSAGetLastError(); - /* On UDP, a connreset simply means the previous send failed. - * So we try again. - * On TCP, it means our socket is now useless, so the error passes. - * (We will loop again, exiting because the same error will happen) */ - if (err != WSAEWOULDBLOCK) { - if (err != WSAECONNRESET || prev == WSAECONNRESET) return err; - prev = err; - } - if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; - } -} - -/*-------------------------------------------------------------------------*\ -* Put socket into blocking mode -\*-------------------------------------------------------------------------*/ -void socket_setblocking(p_socket ps) { - u_long argp = 0; - ioctlsocket(*ps, FIONBIO, &argp); -} - -/*-------------------------------------------------------------------------*\ -* Put socket into non-blocking mode -\*-------------------------------------------------------------------------*/ -void socket_setnonblocking(p_socket ps) { - u_long argp = 1; - ioctlsocket(*ps, FIONBIO, &argp); -} - -/*-------------------------------------------------------------------------*\ -* DNS helpers -\*-------------------------------------------------------------------------*/ -int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) { - *hp = gethostbyaddr(addr, len, AF_INET); - if (*hp) return IO_DONE; - else return WSAGetLastError(); -} - -int socket_gethostbyname(const char *addr, struct hostent **hp) { - *hp = gethostbyname(addr); - if (*hp) return IO_DONE; - else return WSAGetLastError(); -} - -/*-------------------------------------------------------------------------*\ -* Error translation functions -\*-------------------------------------------------------------------------*/ -const char *socket_hoststrerror(int err) { - if (err <= 0) return io_strerror(err); - switch (err) { - case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; - default: return wstrerror(err); - } -} - -const char *socket_strerror(int err) { - if (err <= 0) return io_strerror(err); - switch (err) { - case WSAEADDRINUSE: return PIE_ADDRINUSE; - case WSAECONNREFUSED : return PIE_CONNREFUSED; - case WSAEISCONN: return PIE_ISCONN; - case WSAEACCES: return PIE_ACCESS; - case WSAECONNABORTED: return PIE_CONNABORTED; - case WSAECONNRESET: return PIE_CONNRESET; - case WSAETIMEDOUT: return PIE_TIMEDOUT; - default: return wstrerror(err); - } -} - -const char *socket_ioerror(p_socket ps, int err) { - (void) ps; - return socket_strerror(err); -} - -static const char *wstrerror(int err) { - switch (err) { - case WSAEINTR: return "Interrupted function call"; - case WSAEACCES: return PIE_ACCESS; // "Permission denied"; - case WSAEFAULT: return "Bad address"; - case WSAEINVAL: return "Invalid argument"; - case WSAEMFILE: return "Too many open files"; - case WSAEWOULDBLOCK: return "Resource temporarily unavailable"; - case WSAEINPROGRESS: return "Operation now in progress"; - case WSAEALREADY: return "Operation already in progress"; - case WSAENOTSOCK: return "Socket operation on nonsocket"; - case WSAEDESTADDRREQ: return "Destination address required"; - case WSAEMSGSIZE: return "Message too long"; - case WSAEPROTOTYPE: return "Protocol wrong type for socket"; - case WSAENOPROTOOPT: return "Bad protocol option"; - case WSAEPROTONOSUPPORT: return "Protocol not supported"; - case WSAESOCKTNOSUPPORT: return PIE_SOCKTYPE; // "Socket type not supported"; - case WSAEOPNOTSUPP: return "Operation not supported"; - case WSAEPFNOSUPPORT: return "Protocol family not supported"; - case WSAEAFNOSUPPORT: return PIE_FAMILY; // "Address family not supported by protocol family"; - case WSAEADDRINUSE: return PIE_ADDRINUSE; // "Address already in use"; - case WSAEADDRNOTAVAIL: return "Cannot assign requested address"; - case WSAENETDOWN: return "Network is down"; - case WSAENETUNREACH: return "Network is unreachable"; - case WSAENETRESET: return "Network dropped connection on reset"; - case WSAECONNABORTED: return "Software caused connection abort"; - case WSAECONNRESET: return PIE_CONNRESET; // "Connection reset by peer"; - case WSAENOBUFS: return "No buffer space available"; - case WSAEISCONN: return PIE_ISCONN; // "Socket is already connected"; - case WSAENOTCONN: return "Socket is not connected"; - case WSAESHUTDOWN: return "Cannot send after socket shutdown"; - case WSAETIMEDOUT: return PIE_TIMEDOUT; // "Connection timed out"; - case WSAECONNREFUSED: return PIE_CONNREFUSED; // "Connection refused"; - case WSAEHOSTDOWN: return "Host is down"; - case WSAEHOSTUNREACH: return "No route to host"; - case WSAEPROCLIM: return "Too many processes"; - case WSASYSNOTREADY: return "Network subsystem is unavailable"; - case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range"; - case WSANOTINITIALISED: - return "Successful WSAStartup not yet performed"; - case WSAEDISCON: return "Graceful shutdown in progress"; - case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; // "Host not found"; - case WSATRY_AGAIN: return "Nonauthoritative host not found"; - case WSANO_RECOVERY: return PIE_FAIL; // "Nonrecoverable name lookup error"; - case WSANO_DATA: return "Valid name, no data record of requested type"; - default: return "Unknown error"; - } -} - -const char *socket_gaistrerror(int err) { - if (err == 0) return NULL; - switch (err) { - case EAI_AGAIN: return PIE_AGAIN; - case EAI_BADFLAGS: return PIE_BADFLAGS; -#ifdef EAI_BADHINTS - case EAI_BADHINTS: return PIE_BADHINTS; -#endif - case EAI_FAIL: return PIE_FAIL; - case EAI_FAMILY: return PIE_FAMILY; - case EAI_MEMORY: return PIE_MEMORY; - case EAI_NONAME: return PIE_NONAME; -#ifdef EAI_OVERFLOW - case EAI_OVERFLOW: return PIE_OVERFLOW; -#endif -#ifdef EAI_PROTOCOL - case EAI_PROTOCOL: return PIE_PROTOCOL; -#endif - case EAI_SERVICE: return PIE_SERVICE; - case EAI_SOCKTYPE: return PIE_SOCKTYPE; -#ifdef EAI_SYSTEM - case EAI_SYSTEM: return strerror(errno); -#endif - default: return gai_strerror(err); - } -} - diff --git a/build/premake/premake5/binmodules/luasocket/src/wsocket.h b/build/premake/premake5/binmodules/luasocket/src/wsocket.h deleted file mode 100644 index 398664026f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/src/wsocket.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef WSOCKET_H -#define WSOCKET_H -/*=========================================================================*\ -* Socket compatibilization module for Win32 -* LuaSocket toolkit -\*=========================================================================*/ - -/*=========================================================================*\ -* WinSock include files -\*=========================================================================*/ -#include -#include - -typedef int socklen_t; -typedef SOCKADDR_STORAGE t_sockaddr_storage; -typedef SOCKET t_socket; -typedef t_socket *p_socket; - -#ifndef IPV6_V6ONLY -#define IPV6_V6ONLY 27 -#endif - -#define SOCKET_INVALID (INVALID_SOCKET) - -#ifndef SO_REUSEPORT -#define SO_REUSEPORT SO_REUSEADDR -#endif - -#ifndef AI_NUMERICSERV -#define AI_NUMERICSERV (0) -#endif - -#endif /* WSOCKET_H */ diff --git a/build/premake/premake5/binmodules/luasocket/test/README b/build/premake/premake5/binmodules/luasocket/test/README deleted file mode 100644 index 27837e04d9..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/README +++ /dev/null @@ -1,14 +0,0 @@ -This provides the automated test scripts used to make sure the library -is working properly. - -The files provided are: - - testsrvr.lua -- test server - testclnt.lua -- test client - -To run these tests, just run lua on the server and then on the client. - - hello.lua -- run to verify if installation worked - -Good luck, -Diego. diff --git a/build/premake/premake5/binmodules/luasocket/test/auth/.htaccess b/build/premake/premake5/binmodules/luasocket/test/auth/.htaccess deleted file mode 100644 index 2509ae36aa..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/auth/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -AuthName "test-auth" - AuthType Basic - AuthUserFile /home/diego/impa/luasocket/test/auth/.htpasswd - Require valid-user diff --git a/build/premake/premake5/binmodules/luasocket/test/auth/.htpasswd b/build/premake/premake5/binmodules/luasocket/test/auth/.htpasswd deleted file mode 100644 index cfb26034b7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/auth/.htpasswd +++ /dev/null @@ -1 +0,0 @@ -luasocket:$apr1$47u2O.Me$.m/5BWAtt7GVoxsouIPBR1 diff --git a/build/premake/premake5/binmodules/luasocket/test/auth/index.html b/build/premake/premake5/binmodules/luasocket/test/auth/index.html deleted file mode 100644 index 786694ef6a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/auth/index.html +++ /dev/null @@ -1,3002 +0,0 @@ - - -This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
- - diff --git a/build/premake/premake5/binmodules/luasocket/test/cgi/cat b/build/premake/premake5/binmodules/luasocket/test/cgi/cat deleted file mode 100644 index 8d41255ea9..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/cgi/cat +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -echo Content-type: text/plain -echo - -cat > /tmp/luasocket.cat.tmp -cat /tmp/luasocket.cat.tmp diff --git a/build/premake/premake5/binmodules/luasocket/test/cgi/cat-index-html b/build/premake/premake5/binmodules/luasocket/test/cgi/cat-index-html deleted file mode 100644 index 7595043b1f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/cgi/cat-index-html +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -echo Content-type: text/plain -echo - -cat ../index.html diff --git a/build/premake/premake5/binmodules/luasocket/test/cgi/env b/build/premake/premake5/binmodules/luasocket/test/cgi/env deleted file mode 100644 index 412a716ea9..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/cgi/env +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -echo Content-type: text/plain -echo - -env diff --git a/build/premake/premake5/binmodules/luasocket/test/cgi/query-string b/build/premake/premake5/binmodules/luasocket/test/cgi/query-string deleted file mode 100644 index 2342af5329..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/cgi/query-string +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -echo Content-type: text/plain -echo -echo $QUERY_STRING diff --git a/build/premake/premake5/binmodules/luasocket/test/cgi/redirect-loop b/build/premake/premake5/binmodules/luasocket/test/cgi/redirect-loop deleted file mode 100644 index bd32f2048f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/cgi/redirect-loop +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo Location: http://$HTTP_HOST$REQUEST_URI -echo diff --git a/build/premake/premake5/binmodules/luasocket/test/cgi/request-uri b/build/premake/premake5/binmodules/luasocket/test/cgi/request-uri deleted file mode 100644 index 20ebe9fedb..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/cgi/request-uri +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -echo Content-type: text/plain -echo -echo $REQUEST_URI diff --git a/build/premake/premake5/binmodules/luasocket/test/dicttest.lua b/build/premake/premake5/binmodules/luasocket/test/dicttest.lua deleted file mode 100644 index a0da2e1843..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/dicttest.lua +++ /dev/null @@ -1,5 +0,0 @@ -local dict = require"socket.dict" - -print(dict.get("dict://localhost/d:teste")) - -for i,v in pairs(dict.get("dict://localhost/d:teste")) do print(v) end diff --git a/build/premake/premake5/binmodules/luasocket/test/excepttest.lua b/build/premake/premake5/binmodules/luasocket/test/excepttest.lua deleted file mode 100644 index 80c9cb80a4..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/excepttest.lua +++ /dev/null @@ -1,30 +0,0 @@ -local socket = require("socket") - -local finalizer_called - -local func = socket.protect(function(err, ...) - local try = socket.newtry(function() - finalizer_called = true - end) - - if err then - return error(err, 0) - else - return try(...) - end -end) - -local ret1, ret2, ret3 = func(false, 1, 2, 3) -assert(not finalizer_called, "unexpected finalizer call") -assert(ret1 == 1 and ret2 == 2 and ret3 == 3, "incorrect return values") - -ret1, ret2, ret3 = func(false, false, "error message") -assert(finalizer_called, "finalizer not called") -assert(ret1 == nil and ret2 == "error message" and ret3 == nil, "incorrect return values") - -local err = {key = "value"} -ret1, ret2 = pcall(func, err) -assert(not ret1, "error not rethrown") -assert(ret2 == err, "incorrect error rethrown") - -print("OK") diff --git a/build/premake/premake5/binmodules/luasocket/test/find-connect-limit b/build/premake/premake5/binmodules/luasocket/test/find-connect-limit deleted file mode 100644 index ad0c3f5530..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/find-connect-limit +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env lua ---[[ -Find out how many TCP connections we can make. - -Use ulimit to increase the max number of descriptors: - -ulimit -n 10000 -ulimit -n - -You'll probably need to be root to do this. -]] - -require "socket" - -host = arg[1] or "google.com" -port = arg[2] or 80 - -connections = {} - -repeat - c = assert(socket.connect(hostip or host, 80)) - table.insert(connections, c) - - if not hostip then - hostip = c:getpeername() - print("resolved", host, "to", hostip) - end - - print("connection #", #connections, c, "fd", c:getfd()) - -until false - diff --git a/build/premake/premake5/binmodules/luasocket/test/ftptest.lua b/build/premake/premake5/binmodules/luasocket/test/ftptest.lua deleted file mode 100644 index 3ea0d39590..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/ftptest.lua +++ /dev/null @@ -1,122 +0,0 @@ -local socket = require("socket") -local ftp = require("socket.ftp") -local url = require("socket.url") -local ltn12 = require("ltn12") - --- use dscl to create user "luasocket" with password "password" --- with home in /Users/diego/luasocket/test/ftp --- with group com.apple.access_ftp --- with shell set to /sbin/nologin --- set /etc/ftpchroot to chroot luasocket --- must set group com.apple.access_ftp on user _ftp (for anonymous access) --- copy index.html to /var/empty/pub (home of user ftp) --- start ftp server with --- sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist --- copy index.html to /Users/diego/luasocket/test/ftp --- stop with --- sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist - --- override protection to make sure we see all errors ---socket.protect = function(s) return s end - -dofile("testsupport.lua") - -local host = host or "localhost" -local port, index_file, index, back, err, ret - -local t = socket.gettime() - -index_file = "index.html" - --- a function that returns a directory listing -local function nlst(u) - local t = {} - local p = url.parse(u) - p.command = "nlst" - p.sink = ltn12.sink.table(t) - local r, e = ftp.get(p) - return r and table.concat(t), e -end - --- function that removes a remote file -local function dele(u) - local p = url.parse(u) - p.command = "dele" - p.argument = string.gsub(p.path, "^/", "") - if p.argumet == "" then p.argument = nil end - p.check = 250 - return ftp.command(p) -end - --- read index with CRLF convention -index = readfile(index_file) - -io.write("testing wrong scheme: ") -back, err = ftp.get("wrong://banana.com/lixo") -assert(not back and err == "wrong scheme 'wrong'", err) -print("ok") - -io.write("testing invalid url: ") -back, err = ftp.get("localhost/dir1/index.html;type=i") -assert(not back and err) -print("ok") - -io.write("testing anonymous file download: ") -back, err = socket.ftp.get("ftp://" .. host .. "/pub/index.html;type=i") -assert(not err and back == index, err) -print("ok") - -io.write("erasing before upload: ") -ret, err = dele("ftp://luasocket:password@" .. host .. "/index.up.html") -if not ret then print(err) -else print("ok") end - -io.write("testing upload: ") -ret, err = ftp.put("ftp://luasocket:password@" .. host .. "/index.up.html;type=i", index) -assert(ret and not err, err) -print("ok") - -io.write("downloading uploaded file: ") -back, err = ftp.get("ftp://luasocket:password@" .. host .. "/index.up.html;type=i") -assert(ret and not err and index == back, err) -print("ok") - -io.write("erasing after upload/download: ") -ret, err = dele("ftp://luasocket:password@" .. host .. "/index.up.html") -assert(ret and not err, err) -print("ok") - -io.write("testing weird-character translation: ") -back, err = ftp.get("ftp://luasocket:password@" .. host .. "/%23%3f;type=i") -assert(not err and back == index, err) -print("ok") - -io.write("testing parameter overriding: ") -local back = {} -ret, err = ftp.get{ - url = "//stupid:mistake@" .. host .. "/index.html", - user = "luasocket", - password = "password", - type = "i", - sink = ltn12.sink.table(back) -} -assert(ret and not err and table.concat(back) == index, err) -print("ok") - -io.write("testing upload denial: ") -ret, err = ftp.put("ftp://" .. host .. "/index.up.html;type=a", index) -assert(not ret and err, "should have failed") -print(err) - -io.write("testing authentication failure: ") -ret, err = ftp.get("ftp://luasocket:wrong@".. host .. "/index.html;type=a") -assert(not ret and err, "should have failed") -print(err) - -io.write("testing wrong file: ") -back, err = ftp.get("ftp://".. host .. "/index.wrong.html;type=a") -assert(not back and err, "should have failed") -print(err) - -print("passed all tests") -print(string.format("done in %.2fs", socket.gettime() - t)) diff --git a/build/premake/premake5/binmodules/luasocket/test/hello.lua b/build/premake/premake5/binmodules/luasocket/test/hello.lua deleted file mode 100644 index 3f385dc242..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/hello.lua +++ /dev/null @@ -1,3 +0,0 @@ -local socket = require"socket" -local mime = require"mime" -print("Hello from " .. socket._VERSION .. " and " .. mime._VERSION .. "!") diff --git a/build/premake/premake5/binmodules/luasocket/test/httptest.lua b/build/premake/premake5/binmodules/luasocket/test/httptest.lua deleted file mode 100644 index 63ff921762..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/httptest.lua +++ /dev/null @@ -1,441 +0,0 @@ --- needs Alias from /home/c/diego/tec/luasocket/test to --- "/luasocket-test" and "/luasocket-test/" --- needs ScriptAlias from /home/c/diego/tec/luasocket/test/cgi --- to "/luasocket-test-cgi" and "/luasocket-test-cgi/" --- needs "AllowOverride AuthConfig" on /home/c/diego/tec/luasocket/test/auth -local socket = require("socket") -local http = require("socket.http") -local url = require("socket.url") - -local mime = require("mime") -local ltn12 = require("ltn12") - --- override protection to make sure we see all errors --- socket.protect = function(s) return s end - -dofile("testsupport.lua") - -local host, proxy, request, response, index_file -local ignore, expect, index, prefix, cgiprefix, index_crlf - -http.TIMEOUT = 10 - -local t = socket.gettime() - ---host = host or "diego.student.princeton.edu" ---host = host or "diego.student.princeton.edu" -host = host or "localhost" -proxy = proxy or "http://localhost:3128" -prefix = prefix or "/luasocket-test" -cgiprefix = cgiprefix or "/luasocket-test-cgi" -index_file = "index.html" - --- read index with CRLF convention -index = readfile(index_file) - -local check_result = function(response, expect, ignore) - for i,v in pairs(response) do - if not ignore[i] then - if v ~= expect[i] then - local f = io.open("err", "w") - f:write(tostring(v), "\n\n versus\n\n", tostring(expect[i])) - f:close() - fail(i .. " differs!") - end - end - end - for i,v in pairs(expect) do - if not ignore[i] then - if v ~= response[i] then - local f = io.open("err", "w") - f:write(tostring(response[i]), "\n\n versus\n\n", tostring(v)) - v = string.sub(type(v) == "string" and v or "", 1, 70) - f:close() - fail(i .. " differs!") - end - end - end - print("ok") -end - -local check_request = function(request, expect, ignore) - local t - if not request.sink then request.sink, t = ltn12.sink.table() end - request.source = request.source or - (request.body and ltn12.source.string(request.body)) - local response = {} - response.code, response.headers, response.status = - socket.skip(1, http.request(request)) - if t and #t > 0 then response.body = table.concat(t) end - check_result(response, expect, ignore) -end - ------------------------------------------------------------------------- -io.write("testing request uri correctness: ") -local forth = cgiprefix .. "/request-uri?" .. "this+is+the+query+string" -local back, c, h = http.request("http://" .. host .. forth) -if not back then fail(c) end -back = url.parse(back) -if similar(back.query, "this+is+the+query+string") then print("ok") -else fail(back.query) end - ------------------------------------------------------------------------- -io.write("testing query string correctness: ") -forth = "this+is+the+query+string" -back = http.request("http://" .. host .. cgiprefix .. - "/query-string?" .. forth) -if similar(back, forth) then print("ok") -else fail("failed!") end - ------------------------------------------------------------------------- -io.write("testing document retrieval: ") -request = { - url = "http://" .. host .. prefix .. "/index.html" -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing redirect loop: ") -request = { - url = "http://" .. host .. cgiprefix .. "/redirect-loop" -} -expect = { - code = 302 -} -ignore = { - status = 1, - headers = 1, - body = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing invalid url: ") -local r, e = http.request{url = host .. prefix} -assert(r == nil and e == "invalid host ''") -r, re = http.request(host .. prefix) -assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) .. - " vs " .. tostring(e)) -print("ok") - -io.write("testing invalid empty port: ") -request = { - url = "http://" .. host .. ":" .. prefix .. "/index.html" -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing post method: ") --- wanted to test chunked post, but apache doesn't support it... -request = { - url = "http://" .. host .. cgiprefix .. "/cat", - method = "POST", - body = index, - -- remove content-length header to send chunked body - headers = { ["content-length"] = string.len(index) } -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- ---[[ -io.write("testing proxy with post method: ") -request = { - url = "http://" .. host .. cgiprefix .. "/cat", - method = "POST", - body = index, - headers = { ["content-length"] = string.len(index) }, - proxy= proxy -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) -]] - ------------------------------------------------------------------------- -io.write("testing simple post function: ") -back = http.request("http://" .. host .. cgiprefix .. "/cat", index) -assert(back == index) -print("ok") - ------------------------------------------------------------------------- -io.write("testing ltn12.(sink|source).file: ") -request = { - url = "http://" .. host .. cgiprefix .. "/cat", - method = "POST", - source = ltn12.source.file(io.open(index_file, "rb")), - sink = ltn12.sink.file(io.open(index_file .. "-back", "wb")), - headers = { ["content-length"] = string.len(index) } -} -expect = { - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) -back = readfile(index_file .. "-back") -assert(back == index) -os.remove(index_file .. "-back") - ------------------------------------------------------------------------- -io.write("testing ltn12.(sink|source).chain and mime.(encode|decode): ") - -local function b64length(len) - local a = math.ceil(len/3)*4 - local l = math.ceil(a/76) - return a + l*2 -end - -local source = ltn12.source.chain( - ltn12.source.file(io.open(index_file, "rb")), - ltn12.filter.chain( - mime.encode("base64"), - mime.wrap("base64") - ) -) - -local sink = ltn12.sink.chain( - mime.decode("base64"), - ltn12.sink.file(io.open(index_file .. "-back", "wb")) -) - -request = { - url = "http://" .. host .. cgiprefix .. "/cat", - method = "POST", - source = source, - sink = sink, - headers = { ["content-length"] = b64length(string.len(index)) } -} -expect = { - code = 200 -} -ignore = { - body_cb = 1, - status = 1, - headers = 1 -} -check_request(request, expect, ignore) -back = readfile(index_file .. "-back") -assert(back == index) -os.remove(index_file .. "-back") - ------------------------------------------------------------------------- -io.write("testing http redirection: ") -request = { - url = "http://" .. host .. prefix -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- ---[[ -io.write("testing proxy with redirection: ") -request = { - url = "http://" .. host .. prefix, - proxy = proxy -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) -]] - ------------------------------------------------------------------------- -io.write("testing automatic auth failure: ") -request = { - url = "http://really:wrong@" .. host .. prefix .. "/auth/index.html" -} -expect = { - code = 401 -} -ignore = { - body = 1, - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing http redirection failure: ") -request = { - url = "http://" .. host .. prefix, - redirect = false -} -expect = { - code = 301 -} -ignore = { - body = 1, - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing document not found: ") -request = { - url = "http://" .. host .. "/wrongdocument.html" -} -expect = { - code = 404 -} -ignore = { - body = 1, - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing auth failure: ") -request = { - url = "http://" .. host .. prefix .. "/auth/index.html" -} -expect = { - code = 401 -} -ignore = { - body = 1, - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing manual basic auth: ") -request = { - url = "http://" .. host .. prefix .. "/auth/index.html", - headers = { - authorization = "Basic " .. (mime.b64("luasocket:password")) - } -} -expect = { - code = 200, - body = index -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing automatic basic auth: ") -request = { - url = "http://luasocket:password@" .. host .. prefix .. "/auth/index.html" -} -expect = { - code = 200, - body = index -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing auth info overriding: ") -request = { - url = "http://really:wrong@" .. host .. prefix .. "/auth/index.html", - user = "luasocket", - password = "password" -} -expect = { - code = 200, - body = index -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -io.write("testing cgi output retrieval (probably chunked...): ") -request = { - url = "http://" .. host .. cgiprefix .. "/cat-index-html" -} -expect = { - body = index, - code = 200 -} -ignore = { - status = 1, - headers = 1 -} -check_request(request, expect, ignore) - ------------------------------------------------------------------------- -local body -io.write("testing simple request function: ") -body = http.request("http://" .. host .. prefix .. "/index.html") -assert(body == index) -print("ok") - ------------------------------------------------------------------------- -io.write("testing HEAD method: ") -local r, c, h = http.request { - method = "HEAD", - url = "http://www.tecgraf.puc-rio.br/~diego/" -} -assert(r and h and (c == 200), c) -print("ok") - ------------------------------------------------------------------------- -io.write("testing host not found: ") -local c, e = socket.connect("example.invalid", 80) -local r, re = http.request{url = "http://example.invalid/does/not/exist"} -assert(r == nil and e == re, tostring(r) .. " " .. tostring(re)) -r, re = http.request("http://example.invalid/does/not/exist") -assert(r == nil and e == re) -print("ok") - ------------------------------------------------------------------------- -print("passed all tests") -os.remove("err") - -print(string.format("done in %.2fs", socket.gettime() - t)) diff --git a/build/premake/premake5/binmodules/luasocket/test/index.html b/build/premake/premake5/binmodules/luasocket/test/index.html deleted file mode 100644 index 786694ef6a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/index.html +++ /dev/null @@ -1,3002 +0,0 @@ - - -This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
-This document can contain anything, as long as it is long enough!
- - diff --git a/build/premake/premake5/binmodules/luasocket/test/ltn12test.lua b/build/premake/premake5/binmodules/luasocket/test/ltn12test.lua deleted file mode 100644 index e3f85fb40a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/ltn12test.lua +++ /dev/null @@ -1,299 +0,0 @@ -local ltn12 = require("ltn12") - -dofile("testsupport.lua") - -local function format(chunk) - if chunk then - if chunk == "" then return "''" - else return string.len(chunk) end - else return "nil" end -end - -local function show(name, input, output) - local sin = format(input) - local sout = format(output) - io.write(name, ": ", sin, " -> ", sout, "\n") -end - -local function chunked(length) - local tmp - return function(chunk) - local ret - if chunk and chunk ~= "" then - tmp = chunk - end - ret = string.sub(tmp, 1, length) - tmp = string.sub(tmp, length+1) - if not chunk and ret == "" then ret = nil end - return ret - end -end - -local function named(f, name) - return function(chunk) - local ret = f(chunk) - show(name, chunk, ret) - return ret - end -end - --------------------------------- -local function split(size) - local buffer = "" - local last_out = "" - local last_in = "" - local function output(chunk) - local part = string.sub(buffer, 1, size) - buffer = string.sub(buffer, size+1) - last_out = (part ~= "" or chunk) and part - last_in = chunk - return last_out - end - return function(chunk, done) - if done then - return not last_in and not last_out - end - -- check if argument is consistent with state - if not chunk then - if last_in and last_in ~= "" and last_out ~= "" then - error("nil chunk following data chunk", 2) - end - if not last_out then error("extra nil chunk", 2) end - return output(chunk) - elseif chunk == "" then - if last_out == "" then error('extra "" chunk', 2) end - if not last_out then error('"" chunk following nil return', 2) end - if not last_in then error('"" chunk following nil chunk', 2) end - return output(chunk) - else - if not last_in then error("data chunk following nil chunk", 2) end - if last_in ~= "" and last_out ~= "" then - error("data chunk following data chunk", 2) - end - buffer = chunk - return output(chunk) - end - end -end - --------------------------------- -local function format(chunk) - if chunk then - if chunk == "" then return "''" - else return string.len(chunk) end - else return "nil" end -end - --------------------------------- -local function merge(size) - local buffer = "" - local last_out = "" - local last_in = "" - local function output(chunk) - local part - if string.len(buffer) >= size or not chunk then - part = buffer - buffer = "" - else - part = "" - end - last_out = (part ~= "" or chunk) and part - last_in = chunk - return last_out - end - return function(chunk, done) - if done then - return not last_in and not last_out - end - -- check if argument is consistent with state - if not chunk then - if last_in and last_in ~= "" and last_out ~= "" then - error("nil chunk following data chunk", 2) - end - if not last_out then error("extra nil chunk", 2) end - return output(chunk) - elseif chunk == "" then - if last_out == "" then error('extra "" chunk', 2) end - if not last_out then error('"" chunk following nil return', 2) end - if not last_in then error('"" chunk following nil chunk', 2) end - return output(chunk) - else - if not last_in then error("data chunk following nil chunk", 2) end - if last_in ~= "" and last_out ~= "" then - error("data chunk following data chunk", 2) - end - buffer = buffer .. chunk - return output(chunk) - end - end -end - --------------------------------- -io.write("testing sink.table: ") -local sink, t = ltn12.sink.table() -local s, c = "", "" -for i = 0, 10 do - c = string.rep(string.char(i), i) - s = s .. c - assert(sink(c), "returned error") -end -assert(sink(nil), "returned error") -assert(table.concat(t) == s, "mismatch") -print("ok") - --------------------------------- -io.write("testing sink.chain (with split): ") -sink, t = ltn12.sink.table() -local filter = split(3) -sink = ltn12.sink.chain(filter, sink) -s = "123456789012345678901234567890" -assert(sink(s), "returned error") -assert(sink(s), "returned error") -assert(sink(nil), "returned error") -assert(table.concat(t) == s .. s, "mismatch") -assert(filter(nil, 1), "filter not empty") -print("ok") - --------------------------------- -io.write("testing sink.chain (with merge): ") -sink, t = ltn12.sink.table() -filter = merge(10) -sink = ltn12.sink.chain(filter, sink) -s = string.rep("123", 30) -s = s .. string.rep("4321", 30) -for i = 1, 30 do - assert(sink("123"), "returned error") -end -for i = 1, 30 do - assert(sink("4321"), "returned error") -end -assert(sink(nil), "returned error") -assert(filter(nil, 1), "filter not empty") -assert(table.concat(t) == s, "mismatch") -print("ok") - --------------------------------- -io.write("testing source.string and pump.all: ") -local source = ltn12.source.string(s) -sink, t = ltn12.sink.table() -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == s, "mismatch") -print("ok") - --------------------------------- -io.write("testing source.chain (with split): ") -source = ltn12.source.string(s) -filter = split(5) -source = ltn12.source.chain(source, filter) -sink, t = ltn12.sink.table() -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == s, "mismatch") -assert(filter(nil, 1), "filter not empty") -print("ok") - --------------------------------- -io.write("testing source.chain (with several filters): ") -local function double(x) -- filter turning "ABC" into "AABBCC" - if not x then return end - local b={} - for k in x:gmatch'.' do table.insert(b, k..k) end - return table.concat(b) -end -source = ltn12.source.string(s) -source = ltn12.source.chain(source, double, double, double) -sink, t = ltn12.sink.table() -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == double(double(double(s))), "mismatch") -print("ok") - --------------------------------- -io.write("testing source.chain (with split) and sink.chain (with merge): ") -source = ltn12.source.string(s) -filter = split(5) -source = ltn12.source.chain(source, filter) -local filter2 = merge(13) -sink, t = ltn12.sink.table() -sink = ltn12.sink.chain(filter2, sink) -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == s, "mismatch") -assert(filter(nil, 1), "filter not empty") -assert(filter2(nil, 1), "filter2 not empty") -print("ok") - --------------------------------- -io.write("testing sink.chain (with several filters): ") -source = ltn12.source.string(s) -sink, t = ltn12.sink.table() -sink = ltn12.sink.chain(double, double, double, sink) -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == double(double(double(s))), "mismatch") -print("ok") - --------------------------------- -io.write("testing filter.chain (and sink.chain, with split, merge): ") -source = ltn12.source.string(s) -filter = split(5) -filter2 = merge(13) -local chain = ltn12.filter.chain(filter, filter2) -sink, t = ltn12.sink.table() -sink = ltn12.sink.chain(chain, sink) -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == s, "mismatch") -assert(filter(nil, 1), "filter not empty") -assert(filter2(nil, 1), "filter2 not empty") -print("ok") - --------------------------------- -io.write("testing filter.chain (and sink.chain, a bunch): ") -source = ltn12.source.string(s) -filter = split(5) -filter2 = merge(13) -local filter3 = split(7) -local filter4 = merge(11) -local filter5 = split(10) -chain = ltn12.filter.chain(filter, filter2, filter3, filter4, filter5) -sink, t = ltn12.sink.table() -sink = ltn12.sink.chain(chain, sink) -assert(ltn12.pump.all(source, sink)) -assert(table.concat(t) == s, "mismatch") -assert(filter(nil, 1), "filter not empty") -assert(filter2(nil, 1), "filter2 not empty") -assert(filter3(nil, 1), "filter3 not empty") -assert(filter4(nil, 1), "filter4 not empty") -assert(filter5(nil, 1), "filter5 not empty") -print("ok") - --------------------------------- -io.write("testing filter.chain (and source.chain, with split, merge): ") -source = ltn12.source.string(s) -filter = split(5) -filter2 = merge(13) -local chain = ltn12.filter.chain(filter, filter2) -sink, t = ltn12.sink.table() -source = ltn12.source.chain(source, chain) -assert(ltn12.pump.all(source, sink), "returned error") -assert(table.concat(t) == s, "mismatch") -assert(filter(nil, 1), "filter not empty") -assert(filter2(nil, 1), "filter2 not empty") -print("ok") - --------------------------------- -io.write("testing filter.chain (and source.chain, a bunch): ") -source = ltn12.source.string(s) -filter = split(5) -filter2 = merge(13) -local filter3 = split(7) -local filter4 = merge(11) -local filter5 = split(10) -chain = ltn12.filter.chain(filter, filter2, filter3, filter4, filter5) -sink, t = ltn12.sink.table() -source = ltn12.source.chain(source, chain) -assert(ltn12.pump.all(source, sink)) -assert(table.concat(t) == s, "mismatch") -assert(filter(nil, 1), "filter not empty") -assert(filter2(nil, 1), "filter2 not empty") -assert(filter3(nil, 1), "filter3 not empty") -assert(filter4(nil, 1), "filter4 not empty") -assert(filter5(nil, 1), "filter5 not empty") -print("ok") - diff --git a/build/premake/premake5/binmodules/luasocket/test/luasocket.png b/build/premake/premake5/binmodules/luasocket/test/luasocket.png deleted file mode 100644 index 539f702625..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/luasocket.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:43f1a7e7247dc9e2b603343c57ef035011e5f26c3e2f51463e4100df70e344f2 -size 11732 diff --git a/build/premake/premake5/binmodules/luasocket/test/mimetest.lua b/build/premake/premake5/binmodules/luasocket/test/mimetest.lua deleted file mode 100644 index f5b37471e0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/mimetest.lua +++ /dev/null @@ -1,299 +0,0 @@ -local socket = require("socket") -local ltn12 = require("ltn12") -local mime = require("mime") - -local unpack = unpack or table.unpack - -dofile("testsupport.lua") - -local qptest = "qptest.bin" -local eqptest = "qptest.bin2" -local dqptest = "qptest.bin3" - -local b64test = "b64test.bin" -local eb64test = "b64test.bin2" -local db64test = "b64test.bin3" - - --- from Machado de Assis, "A Mão e a Rosa" -local mao = [[ - Cursavam estes dois moços a academia de S. Paulo, estando - Luís Alves no quarto ano e Estêvão no terceiro. - Conheceram-se na academia, e ficaram amigos íntimos, tanto - quanto podiam sê-lo dois espíritos diferentes, ou talvez por - isso mesmo que o eram. Estêvão, dotado de extrema - sensibilidade, e não menor fraqueza de ânimo, afetuoso e - bom, não daquela bondade varonil, que é apanágio de uma alma - forte, mas dessa outra bondade mole e de cera, que vai à - mercê de todas as circunstâncias, tinha, além de tudo isso, - o infortúnio de trazer ainda sobre o nariz os óculos - cor-de-rosa de suas virginais ilusões. Luís Alves via bem - com os olhos da cara. Não era mau rapaz, mas tinha o seu - grão de egoísmo, e se não era incapaz de afeições, sabia - regê-las, moderá-las, e sobretudo guiá-las ao seu próprio - interesse. Entre estes dois homens travara-se amizade - íntima, nascida para um na simpatia, para outro no costume. - Eram eles os naturais confidentes um do outro, com a - diferença que Luís Alves dava menos do que recebia, e, ainda - assim, nem tudo o que dava exprimia grande confiança. -]] - -local function random(handle, io_err) - if handle then - return function() - if not handle then error("source is empty!", 2) end - local len = math.random(0, 1024) - local chunk = handle:read(len) - if not chunk then - handle:close() - handle = nil - end - return chunk - end - else return ltn12.source.empty(io_err or "unable to open file") end -end - - -local function named(f) - return f -end - -local what = nil -local function transform(input, output, filter) - local source = random(io.open(input, "rb")) - local sink = ltn12.sink.file(io.open(output, "wb")) - if what then - sink = ltn12.sink.chain(filter, sink) - else - source = ltn12.source.chain(source, filter) - end - --what = not what - ltn12.pump.all(source, sink) -end - -local function encode_qptest(mode) - local encode = mime.encode("quoted-printable", mode) - local split = mime.wrap("quoted-printable") - local chain = ltn12.filter.chain(encode, split) - transform(qptest, eqptest, chain) -end - -local function compare_qptest() -io.write("testing qp encoding and wrap: ") - compare(qptest, dqptest) -end - -local function decode_qptest() - local decode = mime.decode("quoted-printable") - transform(eqptest, dqptest, decode) -end - -local function create_qptest() - local f, err = io.open(qptest, "wb") - if not f then fail(err) end - -- try all characters - for i = 0, 255 do - f:write(string.char(i)) - end - -- try all characters and different line sizes - for i = 0, 255 do - for j = 0, i do - f:write(string.char(i)) - end - f:write("\r\n") - end - -- test latin text - f:write(mao) - -- force soft line breaks and treatment of space/tab in end of line - local tab - f:write(string.gsub(mao, "(%s)", function(c) - if tab then - tab = nil - return "\t" - else - tab = 1 - return " " - end - end)) - -- test crazy end of line conventions - local eol = { "\r\n", "\r", "\n", "\n\r" } - local which = 0 - f:write(string.gsub(mao, "(\n)", function(c) - which = which + 1 - if which > 4 then which = 1 end - return eol[which] - end)) - for i = 1, 4 do - for j = 1, 4 do - f:write(eol[i]) - f:write(eol[j]) - end - end - -- try long spaced and tabbed lines - f:write("\r\n") - for i = 0, 255 do - f:write(string.char(9)) - end - f:write("\r\n") - for i = 0, 255 do - f:write(' ') - end - f:write("\r\n") - for i = 0, 255 do - f:write(string.char(9),' ') - end - f:write("\r\n") - for i = 0, 255 do - f:write(' ',string.char(32)) - end - f:write("\r\n") - - f:close() -end - -local function cleanup_qptest() - os.remove(qptest) - os.remove(eqptest) - os.remove(dqptest) -end - --- create test file -local function create_b64test() - local f = assert(io.open(b64test, "wb")) - local t = {} - for j = 1, 100 do - for i = 1, 100 do - t[i] = math.random(0, 255) - end - f:write(string.char(unpack(t))) - end - f:close() -end - -local function encode_b64test() - local e1 = mime.encode("base64") - local e2 = mime.encode("base64") - local e3 = mime.encode("base64") - local e4 = mime.encode("base64") - local sp4 = mime.wrap() - local sp3 = mime.wrap(59) - local sp2 = mime.wrap("base64", 30) - local sp1 = mime.wrap(27) - local chain = ltn12.filter.chain(e1, sp1, e2, sp2, e3, sp3, e4, sp4) - transform(b64test, eb64test, chain) -end - -local function decode_b64test() - local d1 = named(mime.decode("base64"), "d1") - local d2 = named(mime.decode("base64"), "d2") - local d3 = named(mime.decode("base64"), "d3") - local d4 = named(mime.decode("base64"), "d4") - local chain = named(ltn12.filter.chain(d1, d2, d3, d4), "chain") - transform(eb64test, db64test, chain) -end - -local function cleanup_b64test() - os.remove(b64test) - os.remove(eb64test) - os.remove(db64test) -end - -local function compare_b64test() -io.write("testing b64 chained encode: ") - compare(b64test, db64test) -end - -local function identity_test() -io.write("testing identity: ") - local chain = named(ltn12.filter.chain( - named(mime.encode("quoted-printable"), "1 eq"), - named(mime.encode("base64"), "2 eb"), - named(mime.decode("base64"), "3 db"), - named(mime.decode("quoted-printable"), "4 dq") - ), "chain") - transform(b64test, eb64test, chain) - compare(b64test, eb64test) - os.remove(eb64test) -end - - -local function padcheck(original, encoded) - local e = (mime.b64(original)) - local d = (mime.unb64(encoded)) - if e ~= encoded then fail("encoding failed") end - if d ~= original then fail("decoding failed") end -end - -local function chunkcheck(original, encoded) - local len = string.len(original) - for i = 0, len do - local a = string.sub(original, 1, i) - local b = string.sub(original, i+1) - local e, r = mime.b64(a, b) - local f = (mime.b64(r)) - if (e .. (f or "") ~= encoded) then fail(e .. (f or "")) end - end -end - -local function padding_b64test() -io.write("testing b64 padding: ") - padcheck("a", "YQ==") - padcheck("ab", "YWI=") - padcheck("abc", "YWJj") - padcheck("abcd", "YWJjZA==") - padcheck("abcde", "YWJjZGU=") - padcheck("abcdef", "YWJjZGVm") - padcheck("abcdefg", "YWJjZGVmZw==") - padcheck("abcdefgh", "YWJjZGVmZ2g=") - padcheck("abcdefghi", "YWJjZGVmZ2hp") - padcheck("abcdefghij", "YWJjZGVmZ2hpag==") - chunkcheck("abcdefgh", "YWJjZGVmZ2g=") - chunkcheck("abcdefghi", "YWJjZGVmZ2hp") - chunkcheck("abcdefghij", "YWJjZGVmZ2hpag==") - print("ok") -end - -local function test_b64lowlevel() -io.write("testing b64 low-level: ") - local a, b - a, b = mime.b64("", "") - assert(a == "" and b == "") - a, b = mime.b64(nil, "blablabla") - assert(a == nil and b == nil) - a, b = mime.b64("", nil) - assert(a == nil and b == nil) - a, b = mime.unb64("", "") - assert(a == "" and b == "") - a, b = mime.unb64(nil, "blablabla") - assert(a == nil and b == nil) - a, b = mime.unb64("", nil) - assert(a == nil and b == nil) - local binary=string.char(0x00,0x44,0x1D,0x14,0x0F,0xF4,0xDA,0x11,0xA9,0x78,0x00,0x14,0x38,0x50,0x60,0xCE) - local encoded = mime.b64(binary) - local decoded=mime.unb64(encoded) - assert(binary == decoded) - print("ok") -end - -local t = socket.gettime() - -create_b64test() -identity_test() -encode_b64test() -decode_b64test() -compare_b64test() -cleanup_b64test() -padding_b64test() -test_b64lowlevel() - -create_qptest() -encode_qptest() -decode_qptest() -compare_qptest() -encode_qptest("binary") -decode_qptest() -compare_qptest() -cleanup_qptest() - - -print(string.format("done in %.2fs", socket.gettime() - t)) diff --git a/build/premake/premake5/binmodules/luasocket/test/smtptest.lua b/build/premake/premake5/binmodules/luasocket/test/smtptest.lua deleted file mode 100644 index b5380ffc65..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/smtptest.lua +++ /dev/null @@ -1,259 +0,0 @@ -local sent = {} - -local from = "diego@localhost" -local server = "localhost" -local rcpt = "luasocket@localhost" - -local files = { - "/var/spool/mail/luasocket", - "/var/spool/mail/luasock1", - "/var/spool/mail/luasock2", - "/var/spool/mail/luasock3", -} - -local t = socket.time() -local err - -dofile("mbox.lua") -local parse = mbox.parse -dofile("testsupport.lua") - -local total = function() - local t = 0 - for i = 1, #sent do - t = t + sent[i].count - end - return t -end - -local similar = function(s1, s2) - return - string.lower(string.gsub(s1, "%s", "")) == - string.lower(string.gsub(s2, "%s", "")) -end - -local fail = function(s) - s = s or "failed!" - print(s) - os.exit() -end - -local readfile = function(name) - local f = io.open(name, "r") - if not f then - fail("unable to open file!") - return nil - end - local s = f:read("*a") - f:close() - return s -end - -local empty = function() - for i,v in ipairs(files) do - local f = io.open(v, "w") - if not f then - fail("unable to open file!") - end - f:close() - end -end - -local get = function() - local s = "" - for i,v in ipairs(files) do - s = s .. "\n" .. readfile(v) - end - return s -end - -local check_headers = function(sent, got) - sent = sent or {} - got = got or {} - for i,v in pairs(sent) do - if not similar(v, got[i]) then fail("header " .. v .. "failed!") end - end -end - -local check_body = function(sent, got) - sent = sent or "" - got = got or "" - if not similar(sent, got) then fail("bodies differ!") end -end - -local check = function(sent, m) - io.write("checking ", m.headers.title, ": ") - for i = 1, #sent do - local s = sent[i] - if s.title == m.headers.title and s.count > 0 then - check_headers(s.headers, m.headers) - check_body(s.body, m.body) - s.count = s.count - 1 - print("ok") - return - end - end - fail("not found") -end - -local insert = function(sent, message) - if type(message.rcpt) == "table" then - message.count = #message.rcpt - else message.count = 1 end - message.headers = message.headers or {} - message.headers.title = message.title - table.insert(sent, message) -end - -local mark = function() - local time = socket.time() - return { time = time } -end - -local wait = function(sentinel, n) - local to - io.write("waiting for ", n, " messages: ") - while 1 do - local mbox = parse(get()) - if n == #mbox then break end - if socket.time() - sentinel.time > 50 then - to = 1 - break - end - socket.sleep(1) - io.write(".") - io.stdout:flush() - end - if to then fail("timeout") - else print("ok") end -end - -local stuffed_body = [[ -This message body needs to be -stuffed because it has a dot -. -by itself on a line. -Otherwise the mailer would -think that the dot -. -is the end of the message -and the remaining text would cause -a lot of trouble. -]] - -insert(sent, { - from = from, - rcpt = { - "luasocket@localhost", - "luasock3@dell-diego.cs.princeton.edu", - "luasock1@dell-diego.cs.princeton.edu" - }, - body = "multiple rcpt body", - title = "multiple rcpt", -}) - -insert(sent, { - from = from, - rcpt = { - "luasock2@localhost", - "luasock3", - "luasock1" - }, - headers = { - header1 = "header 1", - header2 = "header 2", - header3 = "header 3", - header4 = "header 4", - header5 = "header 5", - header6 = "header 6", - }, - body = stuffed_body, - title = "complex message", -}) - -insert(sent, { - from = from, - rcpt = rcpt, - server = server, - body = "simple message body", - title = "simple message" -}) - -insert(sent, { - from = from, - rcpt = rcpt, - server = server, - body = stuffed_body, - title = "stuffed message body" -}) - -insert(sent, { - from = from, - rcpt = rcpt, - headers = { - header1 = "header 1", - header2 = "header 2", - header3 = "header 3", - header4 = "header 4", - header5 = "header 5", - header6 = "header 6", - }, - title = "multiple headers" -}) - -insert(sent, { - from = from, - rcpt = rcpt, - title = "minimum message" -}) - -io.write("testing host not found: ") -local c, e = socket.connect("wrong.host", 25) -local ret, err = socket.smtp.mail{ - from = from, - rcpt = rcpt, - server = "wrong.host" -} -if ret or e ~= err then fail("wrong error message") -else print("ok") end - -io.write("testing invalid from: ") -local ret, err = socket.smtp.mail{ - from = ' " " (( _ * ', - rcpt = rcpt, -} -if ret or not err then fail("wrong error message") -else print(err) end - -io.write("testing no rcpt: ") -local ret, err = socket.smtp.mail{ - from = from, -} -if ret or not err then fail("wrong error message") -else print(err) end - -io.write("clearing mailbox: ") -empty() -print("ok") - -io.write("sending messages: ") -for i = 1, #sent do - ret, err = socket.smtp.mail(sent[i]) - if not ret then fail(err) end - io.write("+") - io.stdout:flush() -end -print("ok") - -wait(mark(), total()) - -io.write("parsing mailbox: ") -local mbox = parse(get()) -print(#mbox .. " messages found!") - -for i = 1, #mbox do - check(sent, mbox[i]) -end - -print("passed all tests") -print(string.format("done in %.2fs", socket.time() - t)) diff --git a/build/premake/premake5/binmodules/luasocket/test/stufftest.lua b/build/premake/premake5/binmodules/luasocket/test/stufftest.lua deleted file mode 100644 index 490053f280..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/stufftest.lua +++ /dev/null @@ -1,21 +0,0 @@ -local mime = require("mime") - -function test_dot(original, right) - local result, n = mime.dot(2, original) - assert(result == right, "->" .. result .. "<-") - print("ok") -end - -function test_stuff(original, right) - local result, n = mime.dot(2, original) - assert(result == right, "->" .. result .. "<-") - print("ok") -end - -test_dot("abc", "abc") -test_dot("", "") -test_dot("\r\n", "\r\n") -test_dot("\r\n.", "\r\n..") -test_dot(".\r\n.", "..\r\n..") -test_dot(".\r\n.", "..\r\n..") -test_dot("abcd.\r\n.", "abcd.\r\n..") diff --git a/build/premake/premake5/binmodules/luasocket/test/tcp-getoptions b/build/premake/premake5/binmodules/luasocket/test/tcp-getoptions deleted file mode 100644 index f9b3d1bb8a..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/tcp-getoptions +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env lua - -require"socket" - -port = 8765 - -function options(o) - print("options for", o) - - for _, opt in ipairs{"keepalive", "reuseaddr", "tcp-nodelay"} do - print("getoption", opt, o:getoption(opt)) - end - - print("getoption", "linger", - "on", o:getoption("linger").on, - "timeout", o:getoption("linger").timeout) -end - -local m = socket.tcp() - -options(m) - -assert(m:bind("*", port)) -assert(m:listen()) - -options(m) - -m:close() - -local m = socket.bind("*", port) - -options(m) - -local c = socket.connect("localhost", port) - -options(c) - -local s = m:accept() - -options(s) - diff --git a/build/premake/premake5/binmodules/luasocket/test/test_bind.lua b/build/premake/premake5/binmodules/luasocket/test/test_bind.lua deleted file mode 100644 index 93c42d7291..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/test_bind.lua +++ /dev/null @@ -1,6 +0,0 @@ -local socket = require "socket" -local u = socket.udp() assert(u:setsockname("*", 5088)) u:close() -local u = socket.udp() assert(u:setsockname("*", 0)) u:close() -local t = socket.tcp() assert(t:bind("*", 5088)) t:close() -local t = socket.tcp() assert(t:bind("*", 0)) t:close() -print("done!") \ No newline at end of file diff --git a/build/premake/premake5/binmodules/luasocket/test/test_getaddrinfo.lua b/build/premake/premake5/binmodules/luasocket/test/test_getaddrinfo.lua deleted file mode 100644 index 4b52ff924f..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/test_getaddrinfo.lua +++ /dev/null @@ -1,15 +0,0 @@ -local socket = require "socket" -local addresses = assert(socket.dns.getaddrinfo("localhost")) -assert(type(addresses) == 'table') - -local ipv4mask = "^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?$" - -for i, alt in ipairs(addresses) do - if alt.family == 'inet' then - assert(type(alt.addr) == 'string') - assert(alt.addr:find(ipv4mask)) - assert(alt.addr == '127.0.0.1') - end -end - -print("done!") diff --git a/build/premake/premake5/binmodules/luasocket/test/test_socket_error.lua b/build/premake/premake5/binmodules/luasocket/test/test_socket_error.lua deleted file mode 100644 index bda64081d0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/test_socket_error.lua +++ /dev/null @@ -1,31 +0,0 @@ -local socket = require "socket" - -local host, port = "127.0.0.1", "5462" - -assert(socket.bind(host, port)):close() - -local sock = socket.tcp() -sock:settimeout(0) - -local ok, err = sock:connect(host, port) -assert(not ok) -assert('timeout' == err) - -for i = 1, 10 do - -- select pass even if socket has error - local _, rec, err = socket.select(nil, {sock}, 1) - local _, ss = next(rec) - if ss then - assert(ss == sock) - else - assert('timeout' == err, 'unexpected error :' .. tostring(err)) - end - err = sock:getoption("error") -- i get 'connection refused' on WinXP - if err then - print("Passed! Error is '" .. err .. "'.") - os.exit(0) - end -end - -print("Fail! No error detected!") -os.exit(1) diff --git a/build/premake/premake5/binmodules/luasocket/test/testclnt.lua b/build/premake/premake5/binmodules/luasocket/test/testclnt.lua deleted file mode 100644 index 170e1878b0..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/testclnt.lua +++ /dev/null @@ -1,803 +0,0 @@ -local socket = require"socket" - -host = host or "localhost" -port = port or "8383" - -function printf(...) - io.stderr:write(string.format(...)) -end - -function pass(...) - printf(...) - io.stderr:write("\n") -end - -function fail(...) - io.stderr:write("ERROR: ") - printf(...) - io.stderr:write("!\n") - os.exit() -end - -function warn(...) - local s = string.format(...) - io.stderr:write("WARNING: ", s, "\n") -end - -function remote(...) - local s = string.format(...) - s = string.gsub(s, "\n", ";") - s = string.gsub(s, "%s+", " ") - s = string.gsub(s, "^%s*", "") - control:send(s .. "\n") - control:receive() -end - -function test(test) - io.stderr:write("----------------------------------------------\n", - "testing: ", test, "\n", - "----------------------------------------------\n") -end - -function check_timeout(tm, sl, elapsed, err, opp, mode, alldone) - if tm < sl then - if opp == "send" then - if not err then warn("must be buffered") - elseif err == "timeout" then pass("proper timeout") - else fail("unexpected error '%s'", err) end - else - if err ~= "timeout" then fail("should have timed out") - else pass("proper timeout") end - end - else - if mode == "total" then - if elapsed > tm then - if err ~= "timeout" then fail("should have timed out") - else pass("proper timeout") end - elseif elapsed < tm then - if err then fail(err) - else pass("ok") end - else - if alldone then - if err then fail("unexpected error '%s'", err) - else pass("ok") end - else - if err ~= "timeout" then fail(err) - else pass("proper timeoutk") end - end - end - else - if err then fail(err) - else pass("ok") end - end - end -end - -if not socket._DEBUG then - fail("Please define LUASOCKET_DEBUG and recompile LuaSocket") -end - -io.stderr:write("----------------------------------------------\n", -"LuaSocket Test Procedures\n", -"----------------------------------------------\n") - -start = socket.gettime() - -function reconnect() - if data then data:close() end - remote [[ - if data then data:close() data = nil end - data = server:accept() - data:setoption("tcp-nodelay", true) - ]] - data, err = socket.connect(host, port) - if not data then fail(err) end - data:setoption("tcp-nodelay", true) -end - -printf("attempting control connection...") -control, err = socket.connect(host, port) -if err then fail(err) -else pass("connected!") end -control:setoption("tcp-nodelay", true) - ------------------------------------------------------------------------- -function test_methods(sock, methods) - for _, v in pairs(methods) do - if type(sock[v]) ~= "function" then - fail(sock.class .. " method '" .. v .. "' not registered") - end - end - pass(sock.class .. " methods are ok") -end - ------------------------------------------------------------------------- -function test_mixed(len) - reconnect() - io.stderr:write("length " .. len .. ": ") - local inter = math.ceil(len/4) - local p1 = "unix " .. string.rep("x", inter) .. "line\n" - local p2 = "dos " .. string.rep("y", inter) .. "line\r\n" - local p3 = "raw " .. string.rep("z", inter) .. "bytes" - local p4 = "end" .. string.rep("w", inter) .. "bytes" - local bp1, bp2, bp3, bp4 -remote (string.format("str = data:receive(%d)", - string.len(p1)+string.len(p2)+string.len(p3)+string.len(p4))) - sent, err = data:send(p1..p2..p3..p4) - if err then fail(err) end -remote "data:send(str); data:close()" - bp1, err = data:receive() - if err then fail(err) end - bp2, err = data:receive() - if err then fail(err) end - bp3, err = data:receive(string.len(p3)) - if err then fail(err) end - bp4, err = data:receive("*a") - if err then fail(err) end - if bp1.."\n" == p1 and bp2.."\r\n" == p2 and bp3 == p3 and bp4 == p4 then - pass("patterns match") - else fail("patterns don't match") end -end - ------------------------------------------------------------------------- -if not math.mod then - math.mod = math.fmod -end -function test_asciiline(len) - reconnect() - io.stderr:write("length " .. len .. ": ") - local str, str10, back, err - str = string.rep("x", math.mod(len, 10)) - str10 = string.rep("aZb.c#dAe?", math.floor(len/10)) - str = str .. str10 -remote "str = data:receive()" - sent, err = data:send(str.."\n") - if err then fail(err) end -remote "data:send(str ..'\\n')" - back, err = data:receive() - if err then fail(err) end - if back == str then pass("lines match") - else fail("lines don't match") end -end - ------------------------------------------------------------------------- -function test_rawline(len) - reconnect() - io.stderr:write("length " .. len .. ": ") - local str, str10, back, err - str = string.rep(string.char(47), math.mod(len, 10)) - str10 = string.rep(string.char(120,21,77,4,5,0,7,36,44,100), - math.floor(len/10)) - str = str .. str10 -remote "str = data:receive()" - sent, err = data:send(str.."\n") - if err then fail(err) end -remote "data:send(str..'\\n')" - back, err = data:receive() - if err then fail(err) end - if back == str then pass("lines match") - else fail("lines don't match") end -end - ------------------------------------------------------------------------- -function test_raw(len) - reconnect() - io.stderr:write("length " .. len .. ": ") - local half = math.floor(len/2) - local s1, s2, back, err - s1 = string.rep("x", half) - s2 = string.rep("y", len-half) -remote (string.format("str = data:receive(%d)", len)) - sent, err = data:send(s1) - if err then fail(err) end - sent, err = data:send(s2) - if err then fail(err) end -remote "data:send(str)" - back, err = data:receive(len) - if err then fail(err) end - if back == s1..s2 then pass("blocks match") - else fail("blocks don't match") end -end - ------------------------------------------------------------------------- -function test_totaltimeoutreceive(len, tm, sl) - reconnect() - local str, err, partial - printf("%d bytes, %ds total timeout, %ds pause: ", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = string.rep('a', %d) - data:send(str) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - data:send(str) - ]], 2*tm, len, sl, sl)) - data:settimeout(tm, "total") -local t = socket.gettime() - str, err, partial, elapsed = data:receive(2*len) - check_timeout(tm, sl, elapsed, err, "receive", "total", - string.len(str or partial) == 2*len) -end - ------------------------------------------------------------------------- -function test_totaltimeoutsend(len, tm, sl) - reconnect() - local str, err, total - printf("%d bytes, %ds total timeout, %ds pause: ", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = data:receive(%d) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - str = data:receive(%d) - ]], 2*tm, len, sl, sl, len)) - data:settimeout(tm, "total") - str = string.rep("a", 2*len) - total, err, partial, elapsed = data:send(str) - check_timeout(tm, sl, elapsed, err, "send", "total", - total == 2*len) -end - ------------------------------------------------------------------------- -function test_blockingtimeoutreceive(len, tm, sl) - reconnect() - local str, err, partial - printf("%d bytes, %ds blocking timeout, %ds pause: ", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = string.rep('a', %d) - data:send(str) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - data:send(str) - ]], 2*tm, len, sl, sl)) - data:settimeout(tm) - str, err, partial, elapsed = data:receive(2*len) - check_timeout(tm, sl, elapsed, err, "receive", "blocking", - string.len(str or partial) == 2*len) -end - ------------------------------------------------------------------------- -function test_blockingtimeoutsend(len, tm, sl) - reconnect() - local str, err, total - printf("%d bytes, %ds blocking timeout, %ds pause: ", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = data:receive(%d) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - str = data:receive(%d) - ]], 2*tm, len, sl, sl, len)) - data:settimeout(tm) - str = string.rep("a", 2*len) - total, err, partial, elapsed = data:send(str) - check_timeout(tm, sl, elapsed, err, "send", "blocking", - total == 2*len) -end - ------------------------------------------------------------------------- -function empty_connect() - printf("empty connect: ") - reconnect() - if data then data:close() data = nil end - remote [[ - if data then data:close() data = nil end - data = server:accept() - ]] - data, err = socket.connect("", port) - if not data then - pass("ok") - data = socket.connect(host, port) - else - pass("gethostbyname returns localhost on empty string...") - end -end - ------------------------------------------------------------------------- -function isclosed(c) - return c:getfd() == -1 or c:getfd() == (2^32-1) -end - -function active_close() - local tcp = socket.tcp4() - if isclosed(tcp) then fail("should not be closed") end - tcp:close() - if not isclosed(tcp) then fail("should be closed") end - tcp = socket.tcp() - if not isclosed(tcp) then fail("should be closed") end - tcp = nil - local udp = socket.udp4() - if isclosed(udp) then fail("should not be closed") end - udp:close() - if not isclosed(udp) then fail("should be closed") end - udp = socket.udp() - if not isclosed(udp) then fail("should be closed") end - udp = nil - pass("ok") -end - ------------------------------------------------------------------------- -function test_closed() - local back, partial, err - local str = 'little string' - reconnect() - printf("trying read detection: ") - remote (string.format ([[ - data:send('%s') - data:close() - data = nil - ]], str)) - -- try to get a line - back, err, partial = data:receive() - if not err then fail("should have gotten 'closed'.") - elseif err ~= "closed" then fail("got '"..err.."' instead of 'closed'.") - elseif str ~= partial then fail("didn't receive partial result.") - else pass("graceful 'closed' received") end - reconnect() - printf("trying write detection: ") - remote [[ - data:close() - data = nil - ]] - total, err, partial = data:send(string.rep("ugauga", 100000)) - if not err then - pass("failed: output buffer is at least %d bytes long!", total) - elseif err ~= "closed" then - fail("got '"..err.."' instead of 'closed'.") - else - pass("graceful 'closed' received after %d bytes were sent", partial) - end -end - ------------------------------------------------------------------------- -function test_selectbugs() - local r, s, e = socket.select(nil, nil, 0.1) - assert(type(r) == "table" and type(s) == "table" and - (e == "timeout" or e == "error")) - pass("both nil: ok") - local udp = socket.udp() - udp:close() - r, s, e = socket.select({ udp }, { udp }, 0.1) - assert(type(r) == "table" and type(s) == "table" and - (e == "timeout" or e == "error")) - pass("closed sockets: ok") - e = pcall(socket.select, "wrong", 1, 0.1) - assert(e == false, tostring(e)) - e = pcall(socket.select, {}, 1, 0.1) - assert(e == false, tostring(e)) - pass("invalid input: ok") - local toomany = {} - for i = 1, socket._SETSIZE+1 do - toomany[#toomany+1] = socket.udp4() - end - if #toomany > socket._SETSIZE then - local e = pcall(socket.select, toomany, nil, 0.1) - assert(e == false, tostring(e)) - pass("too many sockets (" .. #toomany .. "): ok") - else - pass("unable to create enough sockets (max was "..#toomany..")") - pass("try using ulimit") - end - for _, c in ipairs(toomany) do c:close() end -end - ------------------------------------------------------------------------- -function accept_timeout() - printf("accept with timeout (if it hangs, it failed): ") - local s, e = socket.bind("*", 0, 0) - assert(s, e) - local t = socket.gettime() - s:settimeout(1) - local c, e = s:accept() - assert(not c, "should not accept") - assert(e == "timeout", string.format("wrong error message (%s)", e)) - t = socket.gettime() - t - assert(t < 2, string.format("took to long to give up (%gs)", t)) - s:close() - pass("good") -end - ------------------------------------------------------------------------- -function connect_timeout() - printf("connect with timeout (if it hangs, it failed!): ") - local t = socket.gettime() - local c, e = socket.tcp() - assert(c, e) - c:settimeout(0.1) - local t = socket.gettime() - local r, e = c:connect("10.0.0.1", 81) - assert(not r, "should not connect") - assert(socket.gettime() - t < 2, "took too long to give up.") - c:close() - pass("ok") -end - ------------------------------------------------------------------------- -function accept_errors() - printf("not listening: ") - local d, e = socket.bind("*", 0) - assert(d, e); - local c, e = socket.tcp(); - assert(c, e); - d:setfd(c:getfd()) - d:settimeout(2) - local r, e = d:accept() - assert(not r and e) - pass("ok") - printf("not supported: ") - local c, e = socket.udp() - assert(c, e); - d:setfd(c:getfd()) - local r, e = d:accept() - assert(not r and e) - pass("ok") -end - ------------------------------------------------------------------------- -function connect_errors() - printf("connection refused: ") - local c, e = socket.connect("localhost", 1); - assert(not c and e) - pass("ok") - printf("host not found: ") - local c, e = socket.connect("host.is.invalid", 1); - assert(not c and e, e) - pass("ok") -end - ------------------------------------------------------------------------- -function rebind_test() - local c ,c1 = socket.bind("127.0.0.1", 0) - if not c then pass ("failed to bind! " .. tostring(c) .. ' ' .. tostring(c1)) return end - assert(c,c1) - local i, p = c:getsockname() - local s, e = socket.tcp() - assert(s, e) - s:setoption("reuseaddr", false) - r, e = s:bind(i, p) - assert(not r, "managed to rebind!") - assert(e) - pass("ok") -end - ------------------------------------------------------------------------- -function getstats_test() - reconnect() - local t = 0 - for i = 1, 25 do - local c = math.random(1, 100) - remote (string.format ([[ - str = data:receive(%d) - data:send(str) - ]], c)) - data:send(string.rep("a", c)) - data:receive(c) - t = t + c - local r, s, a = data:getstats() - assert(r == t, "received count failed" .. tostring(r) - .. "/" .. tostring(t)) - assert(s == t, "sent count failed" .. tostring(s) - .. "/" .. tostring(t)) - end - pass("ok") -end - - ------------------------------------------------------------------------- -function test_nonblocking(size) - reconnect() - printf("testing " .. 2*size .. " bytes: ") -remote(string.format([[ - data:send(string.rep("a", %d)) - socket.sleep(0.5) - data:send(string.rep("b", %d) .. "\n") -]], size, size)) - local err = "timeout" - local part = "" - local str - data:settimeout(0) - while 1 do - str, err, part = data:receive("*l", part) - if err ~= "timeout" then break end - end - assert(str == (string.rep("a", size) .. string.rep("b", size))) - reconnect() -remote(string.format([[ - str = data:receive(%d) - socket.sleep(0.5) - str = data:receive(2*%d, str) - data:send(str) -]], size, size)) - data:settimeout(0) - local start = 0 - while 1 do - ret, err, start = data:send(str, start+1) - if err ~= "timeout" then break end - end - data:send("\n") - data:settimeout(-1) - local back = data:receive(2*size) - assert(back == str, "'" .. back .. "' vs '" .. str .. "'") - pass("ok") -end - ------------------------------------------------------------------------- -function test_readafterclose() - local back, partial, err - local str = 'little string' - reconnect() - printf("trying repeated '*a' pattern") - remote (string.format ([[ - data:send('%s') - data:close() - data = nil - ]], str)) - back, err, partial = data:receive("*a") - assert(back == str, "unexpected data read") - back, err, partial = data:receive("*a") - assert(back == nil and err == "closed", "should have returned 'closed'") - pass("ok") - reconnect() - printf("trying active close before '*a'") - remote (string.format ([[ - data:close() - data = nil - ]])) - data:close() - back, err, partial = data:receive("*a") - assert(back == nil and err == "closed", "should have returned 'closed'") - pass("ok") - reconnect() - printf("trying active close before '*l'") - remote (string.format ([[ - data:close() - data = nil - ]])) - data:close() - back, err, partial = data:receive() - assert(back == nil and err == "closed", "should have returned 'closed'") - pass("ok") - reconnect() - printf("trying active close before raw 1") - remote (string.format ([[ - data:close() - data = nil - ]])) - data:close() - back, err, partial = data:receive(1) - assert(back == nil and err == "closed", "should have returned 'closed'") - pass("ok") - reconnect() - printf("trying active close before raw 0") - remote (string.format ([[ - data:close() - data = nil - ]])) - data:close() - back, err, partial = data:receive(0) - assert(back == nil and err == "closed", "should have returned 'closed'") - pass("ok") -end - ------------------------------------------------------------------------- -function test_writeafterclose() - local str = 'little string' - reconnect() - remote (string.format ([[ - data:close() - data = nil - ]])) - local sent, err, errsent - while not err do - sent, err, errsent, time = data:send(str) - end - assert(err == "closed", "got " .. err .. " instead of 'closed'") - pass("ok") -end - ------------------------------------------------------------------------- - -function test_partialrecv() - local str = 'little string' - reconnect() -remote([[ - data:send("7890") -]]) - data:settimeout(1) - back, err = data:receive(10, "123456") - assert(back == "1234567890", "failed on exact mixed length") - back, err = data:receive(8, "87654321") - assert(back == "87654321", "failed on exact length") - back, err = data:receive(4, "87654321") - assert(back == "87654321", "failed on smaller length") - pass("ok") -end - ------------------------------------------------------------------------- -test("method registration") - -local tcp_methods = { - "accept", - "bind", - "close", - "connect", - "dirty", - "getfamily", - "getfd", - "getoption", - "getpeername", - "getsockname", - "getstats", - "setstats", - "listen", - "receive", - "send", - "setfd", - "setoption", - "setpeername", - "setsockname", - "settimeout", - "shutdown", -} -test_methods(socket.tcp(), tcp_methods) -do local sock = socket.tcp6() -if sock then test_methods(socket.tcp6(), tcp_methods) -else io.stderr:write("Warning! IPv6 does not support!\n") end -end - -local udp_methods = { - "close", - "dirty", - "getfamily", - "getfd", - "getoption", - "getpeername", - "getsockname", - "receive", - "receivefrom", - "send", - "sendto", - "setfd", - "setoption", - "setpeername", - "setsockname", - "settimeout" -} - ------------------------------------------------------------------------- -test_methods(socket.udp(), udp_methods) -do local sock = socket.tcp6() -if sock then test_methods(socket.udp6(), udp_methods) -else io.stderr:write("Warning! IPv6 does not support!\n") end -end - -test("closed connection detection: ") -test_closed() - -test("partial receive") -test_partialrecv() - -test("select function") -test_selectbugs() - -test("read after close") -test_readafterclose() - -test("write after close") -test_writeafterclose() - -test("connect function") -connect_timeout() -empty_connect() -connect_errors() - -test("rebinding: ") -rebind_test() - -test("active close: ") -active_close() - -test("accept function: ") -accept_timeout() -accept_errors() - -test("getstats test") -getstats_test() - -test("character line") -test_asciiline(1) -test_asciiline(17) -test_asciiline(200) -test_asciiline(4091) -test_asciiline(80199) -test_asciiline(8000000) -test_asciiline(80199) -test_asciiline(4091) -test_asciiline(200) -test_asciiline(17) -test_asciiline(1) - -test("mixed patterns") -test_mixed(1) -test_mixed(17) -test_mixed(200) -test_mixed(4091) -test_mixed(801990) -test_mixed(4091) -test_mixed(200) -test_mixed(17) -test_mixed(1) - -test("binary line") -test_rawline(1) -test_rawline(17) -test_rawline(200) -test_rawline(4091) -test_rawline(80199) -test_rawline(8000000) -test_rawline(80199) -test_rawline(4091) -test_rawline(200) -test_rawline(17) -test_rawline(1) - -test("raw transfer") -test_raw(1) -test_raw(17) -test_raw(200) -test_raw(4091) -test_raw(80199) -test_raw(8000000) -test_raw(80199) -test_raw(4091) -test_raw(200) -test_raw(17) -test_raw(1) - -test("non-blocking transfer") -test_nonblocking(1) -test_nonblocking(17) -test_nonblocking(200) -test_nonblocking(4091) -test_nonblocking(80199) -test_nonblocking(800000) -test_nonblocking(80199) -test_nonblocking(4091) -test_nonblocking(200) -test_nonblocking(17) -test_nonblocking(1) - -test("total timeout on send") -test_totaltimeoutsend(800091, 1, 3) -test_totaltimeoutsend(800091, 2, 3) -test_totaltimeoutsend(800091, 5, 2) -test_totaltimeoutsend(800091, 3, 1) - -test("total timeout on receive") -test_totaltimeoutreceive(800091, 1, 3) -test_totaltimeoutreceive(800091, 2, 3) -test_totaltimeoutreceive(800091, 3, 2) -test_totaltimeoutreceive(800091, 3, 1) - -test("blocking timeout on send") -test_blockingtimeoutsend(800091, 1, 3) -test_blockingtimeoutsend(800091, 2, 3) -test_blockingtimeoutsend(800091, 3, 2) -test_blockingtimeoutsend(800091, 3, 1) - -test("blocking timeout on receive") -test_blockingtimeoutreceive(800091, 1, 3) -test_blockingtimeoutreceive(800091, 2, 3) -test_blockingtimeoutreceive(800091, 3, 2) -test_blockingtimeoutreceive(800091, 3, 1) - -test("shutting server down") -reconnect() -remote("os.exit()") - -test(string.format("done in %.2fs", socket.gettime() - start)) diff --git a/build/premake/premake5/binmodules/luasocket/test/testmesg.lua b/build/premake/premake5/binmodules/luasocket/test/testmesg.lua deleted file mode 100644 index 135a008d66..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/testmesg.lua +++ /dev/null @@ -1,96 +0,0 @@ --- load the smtp support and its friends -local smtp = require("socket.smtp") -local mime = require("mime") -local ltn12 = require("ltn12") - -function filter(s) - if s then io.write(s) end - return s -end - -source = smtp.message { - headers = { ['content-type'] = 'multipart/alternative' }, - body = { - [1] = { - headers = { ['Content-type'] = 'text/html' }, - body = " Hi, there... " - }, - [2] = { - headers = { ['content-type'] = 'text/plain' }, - body = "Hi, there..." - } - } -} - -r, e = smtp.send{ - rcpt = {"", - "" }, - from = "", - source = ltn12.source.chain(source, filter), - --server = "mail.cs.princeton.edu" - server = "localhost", - port = 2525 -} - -print(r, e) - --- creates a source to send a message with two parts. The first part is --- plain text, the second part is a PNG image, encoded as base64. -source = smtp.message{ - headers = { - -- Remember that headers are *ignored* by smtp.send. - from = "Sicrano ", - to = "Fulano ", - subject = "Here is a message with attachments" - }, - body = { - preamble = "If your client doesn't understand attachments, \r\n" .. - "it will still display the preamble and the epilogue.\r\n" .. - "Preamble might show up even in a MIME enabled client.", - -- first part: No headers means plain text, us-ascii. - -- The mime.eol low-level filter normalizes end-of-line markers. - [1] = { - body = mime.eol(0, [[ - Lines in a message body should always end with CRLF. - The smtp module will *NOT* perform translation. It will - perform necessary stuffing, though. - ]]) - }, - -- second part: Headers describe content the to be an image, - -- sent under the base64 transfer content encoding. - -- Notice that nothing happens until the message is sent. Small - -- chunks are loaded into memory and translation happens on the fly. - [2] = { - headers = { - ["ConTenT-tYpE"] = 'image/png; name="luasocket.png"', - ["content-disposition"] = 'attachment; filename="luasocket.png"', - ["content-description"] = 'our logo', - ["content-transfer-encoding"] = "BASE64" - }, - body = ltn12.source.chain( - ltn12.source.file(io.open("luasocket.png", "rb")), - ltn12.filter.chain( - mime.encode("base64"), - mime.wrap() - ) - ) - }, - epilogue = "This might also show up, but after the attachments" - } -} - - -r, e = smtp.send{ - rcpt = {"", - "" }, - from = "", - source = ltn12.source.chain(source, filter), - --server = "mail.cs.princeton.edu", - --port = 25 - server = "localhost", - port = 2525 -} - -print(r, e) - - diff --git a/build/premake/premake5/binmodules/luasocket/test/testsrvr.lua b/build/premake/premake5/binmodules/luasocket/test/testsrvr.lua deleted file mode 100644 index 1eb2d5b1f7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/testsrvr.lua +++ /dev/null @@ -1,20 +0,0 @@ -socket = require("socket"); -host = host or "localhost"; -port = port or "8383"; -server = assert(socket.bind(host, port)); -ack = "\n"; -while 1 do - print("server: waiting for client connection..."); - control = assert(server:accept()); - while 1 do - command, emsg = control:receive(); - if emsg == "closed" then - control:close() - break - end - assert(command, emsg) - assert(control:send(ack)); - print(command); - ((loadstring or load)(command))(); - end -end diff --git a/build/premake/premake5/binmodules/luasocket/test/testsupport.lua b/build/premake/premake5/binmodules/luasocket/test/testsupport.lua deleted file mode 100644 index b9860882c2..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/testsupport.lua +++ /dev/null @@ -1,37 +0,0 @@ -function readfile(name) - local f = io.open(name, "rb") - if not f then return nil end - local s = f:read("*a") - f:close() - return s -end - -function similar(s1, s2) - return string.lower(string.gsub(s1 or "", "%s", "")) == - string.lower(string.gsub(s2 or "", "%s", "")) -end - -function fail(msg) - msg = msg or "failed" - error(msg, 2) -end - -function compare(input, output) - local original = readfile(input) - local recovered = readfile(output) - if original ~= recovered then fail("comparison failed") - else print("ok") end -end - -local G = _G -local set = rawset -local warn = print - -local setglobal = function(table, key, value) - warn("changed " .. key) - set(table, key, value) -end - -setmetatable(G, { - __newindex = setglobal -}) diff --git a/build/premake/premake5/binmodules/luasocket/test/tftptest.lua b/build/premake/premake5/binmodules/luasocket/test/tftptest.lua deleted file mode 100644 index 35078e8365..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/tftptest.lua +++ /dev/null @@ -1,20 +0,0 @@ --- load tftpclnt.lua -local tftp = require("socket.tftp") - --- needs tftp server running on localhost, with root pointing to --- a directory with index.html in it - -function readfile(file) - local f = io.open(file, "r") - if not f then return nil end - local a = f:read("*a") - f:close() - return a -end - -host = host or "diego.student.princeton.edu" -retrieved, err = tftp.get("tftp://" .. host .."/index.html") -assert(not err, err) -original = readfile("test/index.html") -assert(original == retrieved, "files differ!") -print("passed") diff --git a/build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send b/build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send deleted file mode 100644 index a594944c83..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/lua - ---[[ -Show that luasocket returns an error message on zero-length UDP sends, -even though the send is valid, and in fact the UDP packet is sent -to the peer: - -% sudo tcpdump -i lo -n -tcpdump: verbose output suppressed, use -v or -vv for full protocol decode -listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes -13:40:16.652808 IP 127.0.0.1.56573 > 127.0.0.1.5432: UDP, length 0 - -]] - -require"socket" - -s = assert(socket.udp()) -r = assert(socket.udp()) -assert(r:setsockname("*", 5432)) -assert(s:setpeername("127.0.0.1", 5432)) - -ssz, emsg = s:send("") - -print(ssz == 0 and "OK" or "FAIL",[[send:("")]], ssz, emsg) - diff --git a/build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send-recv b/build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send-recv deleted file mode 100644 index 541efd4325..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/udp-zero-length-send-recv +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/lua - ---[[ -Show that luasocket returns an error message on zero-length UDP sends, -even though the send is valid, and in fact the UDP packet is sent -to the peer: - -% sudo tcpdump -i lo -n -tcpdump: verbose output suppressed, use -v or -vv for full protocol decode -listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes -13:40:16.652808 IP 127.0.0.1.56573 > 127.0.0.1.5432: UDP, length 0 - -]] - -require"socket" - -s = assert(socket.udp()) -r = assert(socket.udp()) -assert(r:setsockname("*", 5432)) -assert(s:setpeername("127.0.0.1", 5432)) - -ok, emsg = s:send("") -if ok ~= 0 then - print("send of zero failed with:", ok, emsg) -end - -assert(r:settimeout(2)) - -ok, emsg = r:receive() - -if not ok or string.len(ok) ~= 0 then - print("fail - receive of zero failed with:", ok, emsg) - os.exit(1) -end - -print"ok" - diff --git a/build/premake/premake5/binmodules/luasocket/test/udpconnectclnt.lua b/build/premake/premake5/binmodules/luasocket/test/udpconnectclnt.lua deleted file mode 100644 index ad6ab6a459..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/udpconnectclnt.lua +++ /dev/null @@ -1,19 +0,0 @@ -local socket = require"socket" -local udp = socket.udp -local localhost = "127.0.0.1" -local port = assert(arg[1], "missing port argument") - -se = udp(); se:setoption("reuseaddr", true) -se:setsockname(localhost, 5062) -print("se", se:getsockname()) -sc = udp(); sc:setoption("reuseaddr", true) -sc:setsockname(localhost, 5061) -print("sc", sc:getsockname()) - -se:sendto("this is a test from se", localhost, port) -socket.sleep(1) -sc:sendto("this is a test from sc", localhost, port) -socket.sleep(1) -se:sendto("this is a test from se", localhost, port) -socket.sleep(1) -sc:sendto("this is a test from sc", localhost, port) diff --git a/build/premake/premake5/binmodules/luasocket/test/udpconnectsrvr.lua b/build/premake/premake5/binmodules/luasocket/test/udpconnectsrvr.lua deleted file mode 100644 index 5a9772ec6c..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/udpconnectsrvr.lua +++ /dev/null @@ -1,16 +0,0 @@ -local socket = require"socket" -local udp = socket.udp -local localhost = "127.0.0.1" -local s = assert(udp()) -assert(tostring(s):find("udp{unconnected}")) -print("setpeername", s:setpeername(localhost, 5061)) -print("getsockname", s:getsockname()) -assert(tostring(s):find("udp{connected}")) -print(s:receive()) -print("setpeername", s:setpeername("*")) -print("getsockname", s:getsockname()) -s:sendto("a", localhost, 12345) -print("getsockname", s:getsockname()) -assert(tostring(s):find("udp{unconnected}")) -print(s:receivefrom()) -s:close() diff --git a/build/premake/premake5/binmodules/luasocket/test/unixdgramclnt.lua b/build/premake/premake5/binmodules/luasocket/test/unixdgramclnt.lua deleted file mode 100644 index 9bd60f7f7b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/unixdgramclnt.lua +++ /dev/null @@ -1,9 +0,0 @@ -socket = require"socket" -socket.unix = require"socket.unix" -c = assert(socket.unix.dgram()) -print(c:bind("/tmp/bar")) -while 1 do - local l = io.read("*l") - assert(c:sendto(l, "/tmp/foo")) - print(assert(c:receivefrom())) -end diff --git a/build/premake/premake5/binmodules/luasocket/test/unixdgramsrvr.lua b/build/premake/premake5/binmodules/luasocket/test/unixdgramsrvr.lua deleted file mode 100644 index 4c11f552c6..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/unixdgramsrvr.lua +++ /dev/null @@ -1,9 +0,0 @@ - socket = require"socket" - socket.unix = require"socket.unix" - u = assert(socket.unix.dgram()) - assert(u:bind("/tmp/foo")) - while 1 do - x, r = assert(u:receivefrom()) - print(x, r) - assert(u:sendto(">" .. x, r)) - end diff --git a/build/premake/premake5/binmodules/luasocket/test/unixstreamclnt.lua b/build/premake/premake5/binmodules/luasocket/test/unixstreamclnt.lua deleted file mode 100644 index 4f2e1e3c18..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/unixstreamclnt.lua +++ /dev/null @@ -1,8 +0,0 @@ -socket = require"socket" -socket.unix = require"socket.unix" -c = assert(socket.unix.stream()) -assert(c:connect("/tmp/foo")) -while 1 do - local l = io.read() - assert(c:send(l .. "\n")) -end diff --git a/build/premake/premake5/binmodules/luasocket/test/unixstreamsrvr.lua b/build/premake/premake5/binmodules/luasocket/test/unixstreamsrvr.lua deleted file mode 100644 index 0a5c644be4..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/unixstreamsrvr.lua +++ /dev/null @@ -1,9 +0,0 @@ - socket = require"socket" - socket.unix = require"socket.unix" - u = assert(socket.unix.stream()) - assert(u:bind("/tmp/foo")) - assert(u:listen()) - c = assert(u:accept()) - while 1 do - print(assert(c:receive())) - end diff --git a/build/premake/premake5/binmodules/luasocket/test/upload.html b/build/premake/premake5/binmodules/luasocket/test/upload.html deleted file mode 100644 index b4674a8850..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/upload.html +++ /dev/null @@ -1,15 +0,0 @@ - - -POST test - - - -
-
- -

- -

-
- - diff --git a/build/premake/premake5/binmodules/luasocket/test/urltest.lua b/build/premake/premake5/binmodules/luasocket/test/urltest.lua deleted file mode 100644 index 1090a7ecd7..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/urltest.lua +++ /dev/null @@ -1,704 +0,0 @@ -local socket = require("socket") -socket.url = require("socket.url") -dofile("testsupport.lua") - -local check_build_url = function(parsed) - local built = socket.url.build(parsed) - if built ~= parsed.url then - print("built is different from expected") - print(built) - print(expected) - os.exit() - end -end - -local check_protect = function(parsed, path, unsafe) - local built = socket.url.build_path(parsed, unsafe) - if built ~= path then - print(built, path) - print("path composition failed.") - os.exit() - end -end - -local check_invert = function(url) - local parsed = socket.url.parse(url) - parsed.path = socket.url.build_path(socket.url.parse_path(parsed.path)) - local rebuilt = socket.url.build(parsed) - if rebuilt ~= url then - print(url, rebuilt) - print("original and rebuilt are different") - os.exit() - end -end - -local check_parse_path = function(path, expect) - local parsed = socket.url.parse_path(path) - for i = 1, math.max(#parsed, #expect) do - if parsed[i] ~= expect[i] then - print(path) - os.exit() - end - end - if expect.is_directory ~= parsed.is_directory then - print(path) - print("is_directory mismatch") - os.exit() - end - if expect.is_absolute ~= parsed.is_absolute then - print(path) - print("is_absolute mismatch") - os.exit() - end - local built = socket.url.build_path(expect) - if built ~= path then - print(built, path) - print("path composition failed.") - os.exit() - end -end - -local check_absolute_url = function(base, relative, absolute) - local res = socket.url.absolute(base, relative) - if res ~= absolute then - io.write("absolute: In test for '", relative, "' expected '", - absolute, "' but got '", res, "'\n") - os.exit() - end -end - -local check_parse_url = function(gaba) - local url = gaba.url - gaba.url = nil - local parsed = socket.url.parse(url) - for i, v in pairs(gaba) do - if v ~= parsed[i] then - io.write("parse: In test for '", url, "' expected ", i, " = '", - v, "' but got '", tostring(parsed[i]), "'\n") - for i,v in pairs(parsed) do print(i,v) end - os.exit() - end - end - for i, v in pairs(parsed) do - if v ~= gaba[i] then - io.write("parse: In test for '", url, "' expected ", i, " = '", - tostring(gaba[i]), "' but got '", v, "'\n") - for i,v in pairs(parsed) do print(i,v) end - os.exit() - end - end -end - -print("testing URL parsing") -check_parse_url{ - url = "scheme://user:pass$%?#wd@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:pass$%?#wd@host:port", - host = "host", - port = "port", - userinfo = "user:pass$%?#wd", - password = "pass$%?#wd", - user = "user", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} -check_parse_url{ - url = "scheme://user:pass?#wd@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:pass?#wd@host:port", - host = "host", - port = "port", - userinfo = "user:pass?#wd", - password = "pass?#wd", - user = "user", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} -check_parse_url{ - url = "scheme://user:pass-wd@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:pass-wd@host:port", - host = "host", - port = "port", - userinfo = "user:pass-wd", - password = "pass-wd", - user = "user", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} -check_parse_url{ - url = "scheme://user:pass#wd@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:pass#wd@host:port", - host = "host", - port = "port", - userinfo = "user:pass#wd", - password = "pass#wd", - user = "user", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} -check_parse_url{ - url = "scheme://user:pass#wd@host:port/path;params?query", - scheme = "scheme", - authority = "user:pass#wd@host:port", - host = "host", - port = "port", - userinfo = "user:pass#wd", - password = "pass#wd", - user = "user", - path = "/path", - params = "params", - query = "query", -} -check_parse_url{ - url = "scheme://userinfo@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://user:password@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:password@host:port", - host = "host", - port = "port", - userinfo = "user:password", - user = "user", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment", -} - -check_parse_url{ - url = "scheme://userinfo@host:port/path;params?query#", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "params", - query = "query", - fragment = "" -} - -check_parse_url{ - url = "scheme://userinfo@host:port/path;params?#fragment", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "params", - query = "", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://userinfo@host:port/path;params#fragment", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "params", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://userinfo@host:port/path;?query#fragment", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "", - query = "query", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://userinfo@host:port/path?query#fragment", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - query = "query", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://userinfo@host:port/;params?query#fragment", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/", - params = "params", - query = "query", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://userinfo@host:port", - scheme = "scheme", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", -} - -check_parse_url{ - url = "//userinfo@host:port/path;params?query#fragment", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_parse_url{ - url = "//userinfo@host:port/path", - authority = "userinfo@host:port", - host = "host", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", -} - -check_parse_url{ - url = "//userinfo@host/path", - authority = "userinfo@host", - host = "host", - userinfo = "userinfo", - user = "userinfo", - path = "/path", -} - -check_parse_url{ - url = "//user:password@host/path", - authority = "user:password@host", - host = "host", - userinfo = "user:password", - password = "password", - user = "user", - path = "/path", -} - -check_parse_url{ - url = "//user:@host/path", - authority = "user:@host", - host = "host", - userinfo = "user:", - password = "", - user = "user", - path = "/path", -} - -check_parse_url{ - url = "//user@host:port/path", - authority = "user@host:port", - host = "host", - userinfo = "user", - user = "user", - port = "port", - path = "/path", -} - -check_parse_url{ - url = "//host:port/path", - authority = "host:port", - port = "port", - host = "host", - path = "/path", -} - -check_parse_url{ - url = "//host/path", - authority = "host", - host = "host", - path = "/path", -} - -check_parse_url{ - url = "//host", - authority = "host", - host = "host", -} - -check_parse_url{ - url = "/path", - path = "/path", -} - -check_parse_url{ - url = "path", - path = "path", -} - --- IPv6 tests - -check_parse_url{ - url = "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html", - scheme = "http", - host = "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", - authority = "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80", - port = "80", - path = "/index.html" -} - -check_parse_url{ - url = "http://[1080:0:0:0:8:800:200C:417A]/index.html", - scheme = "http", - host = "1080:0:0:0:8:800:200C:417A", - authority = "[1080:0:0:0:8:800:200C:417A]", - path = "/index.html" -} - -check_parse_url{ - url = "http://[3ffe:2a00:100:7031::1]", - scheme = "http", - host = "3ffe:2a00:100:7031::1", - authority = "[3ffe:2a00:100:7031::1]", -} - -check_parse_url{ - url = "http://[1080::8:800:200C:417A]/foo", - scheme = "http", - host = "1080::8:800:200C:417A", - authority = "[1080::8:800:200C:417A]", - path = "/foo" -} - -check_parse_url{ - url = "http://[::192.9.5.5]/ipng", - scheme = "http", - host = "::192.9.5.5", - authority = "[::192.9.5.5]", - path = "/ipng" -} - -check_parse_url{ - url = "http://[::FFFF:129.144.52.38]:80/index.html", - scheme = "http", - host = "::FFFF:129.144.52.38", - port = "80", - authority = "[::FFFF:129.144.52.38]:80", - path = "/index.html" -} - -check_parse_url{ - url = "http://[2010:836B:4179::836B:4179]", - scheme = "http", - host = "2010:836B:4179::836B:4179", - authority = "[2010:836B:4179::836B:4179]", -} - -check_parse_url{ - url = "//userinfo@[::FFFF:129.144.52.38]:port/path;params?query#fragment", - authority = "userinfo@[::FFFF:129.144.52.38]:port", - host = "::FFFF:129.144.52.38", - port = "port", - userinfo = "userinfo", - user = "userinfo", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_parse_url{ - url = "scheme://user:password@[::192.9.5.5]:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:password@[::192.9.5.5]:port", - host = "::192.9.5.5", - port = "port", - userinfo = "user:password", - user = "user", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -print("testing URL building") -check_build_url { - url = "scheme://user:password@host:port/path;params?query#fragment", - scheme = "scheme", - host = "host", - port = "port", - user = "user", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url{ - url = "//userinfo@[::FFFF:129.144.52.38]:port/path;params?query#fragment", - host = "::FFFF:129.144.52.38", - port = "port", - user = "userinfo", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url{ - url = "scheme://user:password@[::192.9.5.5]:port/path;params?query#fragment", - scheme = "scheme", - host = "::192.9.5.5", - port = "port", - user = "user", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://user:password@host/path;params?query#fragment", - scheme = "scheme", - host = "host", - user = "user", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://user@host/path;params?query#fragment", - scheme = "scheme", - host = "host", - user = "user", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://host/path;params?query#fragment", - scheme = "scheme", - host = "host", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://host/path;params#fragment", - scheme = "scheme", - host = "host", - path = "/path", - params = "params", - fragment = "fragment" -} - -check_build_url { - url = "scheme://host/path#fragment", - scheme = "scheme", - host = "host", - path = "/path", - fragment = "fragment" -} - -check_build_url { - url = "scheme://host/path", - scheme = "scheme", - host = "host", - path = "/path", -} - -check_build_url { - url = "//host/path", - host = "host", - path = "/path", -} - -check_build_url { - url = "/path", - path = "/path", -} - -check_build_url { - url = "scheme://user:password@host:port/path;params?query#fragment", - scheme = "scheme", - host = "host", - port = "port", - user = "user", - userinfo = "not used", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://user:password@host:port/path;params?query#fragment", - scheme = "scheme", - host = "host", - port = "port", - user = "user", - userinfo = "not used", - authority = "not used", - password = "password", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://user:password@host:port/path;params?query#fragment", - scheme = "scheme", - host = "host", - port = "port", - userinfo = "user:password", - authority = "not used", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - -check_build_url { - url = "scheme://user:password@host:port/path;params?query#fragment", - scheme = "scheme", - authority = "user:password@host:port", - path = "/path", - params = "params", - query = "query", - fragment = "fragment" -} - --- standard RFC tests -print("testing absolute resolution") -check_absolute_url("http://a/b/c/d;p?q#f", "g:h", "g:h") -check_absolute_url("http://a/b/c/d;p?q#f", "g", "http://a/b/c/g") -check_absolute_url("http://a/b/c/d;p?q#f", "./g", "http://a/b/c/g") -check_absolute_url("http://a/b/c/d;p?q#f", "g/", "http://a/b/c/g/") -check_absolute_url("http://a/b/c/d;p?q#f", "/g", "http://a/g") -check_absolute_url("http://a/b/c/d;p?q#f", "//g", "http://g") -check_absolute_url("http://a/b/c/d;p?q#f", "?y", "http://a/b/c/d;p?y") -check_absolute_url("http://a/b/c/d;p?q#f", "g?y", "http://a/b/c/g?y") -check_absolute_url("http://a/b/c/d;p?q#f", "g?y/./x", "http://a/b/c/g?y/./x") -check_absolute_url("http://a/b/c/d;p?q#f", "#s", "http://a/b/c/d;p?q#s") -check_absolute_url("http://a/b/c/d;p?q#f", "g#s", "http://a/b/c/g#s") -check_absolute_url("http://a/b/c/d;p?q#f", "g#s/./x", "http://a/b/c/g#s/./x") -check_absolute_url("http://a/b/c/d;p?q#f", "g?y#s", "http://a/b/c/g?y#s") -check_absolute_url("http://a/b/c/d;p?q#f", ";x", "http://a/b/c/d;x") -check_absolute_url("http://a/b/c/d;p?q#f", "g;x", "http://a/b/c/g;x") -check_absolute_url("http://a/b/c/d;p?q#f", "g;x?y#s", "http://a/b/c/g;x?y#s") -check_absolute_url("http://a/b/c/d;p?q#f", ".", "http://a/b/c/") -check_absolute_url("http://a/b/c/d;p?q#f", "./", "http://a/b/c/") -check_absolute_url("http://a/b/c/d;p?q#f", "..", "http://a/b/") -check_absolute_url("http://a/b/c/d;p?q#f", "../", "http://a/b/") -check_absolute_url("http://a/b/c/d;p?q#f", "../g", "http://a/b/g") -check_absolute_url("http://a/b/c/d;p?q#f", "../..", "http://a/") -check_absolute_url("http://a/b/c/d;p?q#f", "../../", "http://a/") -check_absolute_url("http://a/b/c/d;p?q#f", "../../g", "http://a/g") -check_absolute_url("http://a/b/c/d;p?q#f", "", "http://a/b/c/d;p?q#f") -check_absolute_url("http://a/b/c/d;p?q#f", "/./g", "http://a/./g") -check_absolute_url("http://a/b/c/d;p?q#f", "/../g", "http://a/../g") -check_absolute_url("http://a/b/c/d;p?q#f", "g.", "http://a/b/c/g.") -check_absolute_url("http://a/b/c/d;p?q#f", ".g", "http://a/b/c/.g") -check_absolute_url("http://a/b/c/d;p?q#f", "g..", "http://a/b/c/g..") -check_absolute_url("http://a/b/c/d;p?q#f", "..g", "http://a/b/c/..g") -check_absolute_url("http://a/b/c/d;p?q#f", "./../g", "http://a/b/g") -check_absolute_url("http://a/b/c/d;p?q#f", "./g/.", "http://a/b/c/g/") -check_absolute_url("http://a/b/c/d;p?q#f", "g/./h", "http://a/b/c/g/h") -check_absolute_url("http://a/b/c/d;p?q#f", "g/../h", "http://a/b/c/h") - --- extra tests -check_absolute_url("//a/b/c/d;p?q#f", "d/e/f", "//a/b/c/d/e/f") -check_absolute_url("/a/b/c/d;p?q#f", "d/e/f", "/a/b/c/d/e/f") -check_absolute_url("a/b/c/d", "d/e/f", "a/b/c/d/e/f") -check_absolute_url("a/b/c/d/../", "d/e/f", "a/b/c/d/e/f") -check_absolute_url("http://velox.telemar.com.br", "/dashboard/index.html", - "http://velox.telemar.com.br/dashboard/index.html") - -print("testing path parsing and composition") -check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 }) -check_parse_path("/eu/", { "eu"; is_absolute = 1, is_directory = 1 }) -check_parse_path("eu/tu/ele/nos/vos/eles/", - { "eu", "tu", "ele", "nos", "vos", "eles"; is_directory = 1}) -check_parse_path("/", { is_absolute = 1, is_directory = 1}) -check_parse_path("", { }) -check_parse_path("eu%01/%02tu/e%03l%04e/nos/vos%05/e%12les/", - { "eu\1", "\2tu", "e\3l\4e", "nos", "vos\5", "e\18les"; is_directory = 1}) -check_parse_path("eu/tu", { "eu", "tu" }) - -print("testing path protection") -check_protect({ "eu", "-_.!~*'():@&=+$,", "tu" }, "eu/-_.!~*'():@&=+$,/tu") -check_protect({ "eu ", "~diego" }, "eu%20/~diego") -check_protect({ "/eu>", "", "/ tm then - if err ~= "timeout" then fail("should have timed out") - else pass("proper timeout") end - elseif elapsed < tm then - if err then fail(err) - else pass("ok") end - else - if alldone then - if err then fail("unexpected error '%s'", err) - else pass("ok") end - else - if err ~= "timeout" then fail(err) - else pass("proper timeoutk") end - end - end - else - if err then fail(err) - else pass("ok") end - end - end -end - -if not socket._DEBUG then - fail("Please define LUASOCKET_DEBUG and recompile LuaSocket") -end - -io.stderr:write("----------------------------------------------\n", -"LuaSocket Test Procedures\n", -"----------------------------------------------\n") - -start = socket.gettime() - -function reconnect() - io.stderr:write("attempting data connection... ") - if data then data:close() end - remote [[ - i = i or 1 - if data then data:close() data = nil end - print("accepting") - data = server:accept() - i = i + 1 - print("done " .. i) - ]] - data, err = uconnect(host, port) - if not data then fail(err) - else pass("connected!") end -end - -pass("attempting control connection...") -control, err = uconnect(host, port) -if err then fail(err) -else pass("connected!") end - ------------------------------------------------------------------------- -function test_methods(sock, methods) - for _, v in pairs(methods) do - if type(sock[v]) ~= "function" then - fail(sock.class .. " method '" .. v .. "' not registered") - end - end - pass(sock.class .. " methods are ok") -end - ------------------------------------------------------------------------- -function test_mixed(len) - reconnect() - local inter = math.ceil(len/4) - local p1 = "unix " .. string.rep("x", inter) .. "line\n" - local p2 = "dos " .. string.rep("y", inter) .. "line\r\n" - local p3 = "raw " .. string.rep("z", inter) .. "bytes" - local p4 = "end" .. string.rep("w", inter) .. "bytes" - local bp1, bp2, bp3, bp4 -remote (string.format("str = data:receive(%d)", - string.len(p1)+string.len(p2)+string.len(p3)+string.len(p4))) - sent, err = data:send(p1..p2..p3..p4) - if err then fail(err) end -remote "data:send(str); data:close()" - bp1, err = data:receive() - if err then fail(err) end - bp2, err = data:receive() - if err then fail(err) end - bp3, err = data:receive(string.len(p3)) - if err then fail(err) end - bp4, err = data:receive("*a") - if err then fail(err) end - if bp1.."\n" == p1 and bp2.."\r\n" == p2 and bp3 == p3 and bp4 == p4 then - pass("patterns match") - else fail("patterns don't match") end -end - ------------------------------------------------------------------------- -function test_asciiline(len) - reconnect() - local str, str10, back, err - str = string.rep("x", math.mod(len, 10)) - str10 = string.rep("aZb.c#dAe?", math.floor(len/10)) - str = str .. str10 -remote "str = data:receive()" - sent, err = data:send(str.."\n") - if err then fail(err) end -remote "data:send(str ..'\\n')" - back, err = data:receive() - if err then fail(err) end - if back == str then pass("lines match") - else fail("lines don't match") end -end - ------------------------------------------------------------------------- -function test_rawline(len) - reconnect() - local str, str10, back, err - str = string.rep(string.char(47), math.mod(len, 10)) - str10 = string.rep(string.char(120,21,77,4,5,0,7,36,44,100), - math.floor(len/10)) - str = str .. str10 -remote "str = data:receive()" - sent, err = data:send(str.."\n") - if err then fail(err) end -remote "data:send(str..'\\n')" - back, err = data:receive() - if err then fail(err) end - if back == str then pass("lines match") - else fail("lines don't match") end -end - ------------------------------------------------------------------------- -function test_raw(len) - reconnect() - local half = math.floor(len/2) - local s1, s2, back, err - s1 = string.rep("x", half) - s2 = string.rep("y", len-half) -remote (string.format("str = data:receive(%d)", len)) - sent, err = data:send(s1) - if err then fail(err) end - sent, err = data:send(s2) - if err then fail(err) end -remote "data:send(str)" - back, err = data:receive(len) - if err then fail(err) end - if back == s1..s2 then pass("blocks match") - else fail("blocks don't match") end -end - ------------------------------------------------------------------------- -function test_totaltimeoutreceive(len, tm, sl) - reconnect() - local str, err, partial - pass("%d bytes, %ds total timeout, %ds pause", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = string.rep('a', %d) - data:send(str) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - data:send(str) - ]], 2*tm, len, sl, sl)) - data:settimeout(tm, "total") -local t = socket.gettime() - str, err, partial, elapsed = data:receive(2*len) - check_timeout(tm, sl, elapsed, err, "receive", "total", - string.len(str or partial) == 2*len) -end - ------------------------------------------------------------------------- -function test_totaltimeoutsend(len, tm, sl) - reconnect() - local str, err, total - pass("%d bytes, %ds total timeout, %ds pause", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = data:receive(%d) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - str = data:receive(%d) - ]], 2*tm, len, sl, sl, len)) - data:settimeout(tm, "total") - str = string.rep("a", 2*len) - total, err, partial, elapsed = data:send(str) - check_timeout(tm, sl, elapsed, err, "send", "total", - total == 2*len) -end - ------------------------------------------------------------------------- -function test_blockingtimeoutreceive(len, tm, sl) - reconnect() - local str, err, partial - pass("%d bytes, %ds blocking timeout, %ds pause", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = string.rep('a', %d) - data:send(str) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - data:send(str) - ]], 2*tm, len, sl, sl)) - data:settimeout(tm) - str, err, partial, elapsed = data:receive(2*len) - check_timeout(tm, sl, elapsed, err, "receive", "blocking", - string.len(str or partial) == 2*len) -end - ------------------------------------------------------------------------- -function test_blockingtimeoutsend(len, tm, sl) - reconnect() - local str, err, total - pass("%d bytes, %ds blocking timeout, %ds pause", len, tm, sl) - remote (string.format ([[ - data:settimeout(%d) - str = data:receive(%d) - print('server: sleeping for %ds') - socket.sleep(%d) - print('server: woke up') - str = data:receive(%d) - ]], 2*tm, len, sl, sl, len)) - data:settimeout(tm) - str = string.rep("a", 2*len) - total, err, partial, elapsed = data:send(str) - check_timeout(tm, sl, elapsed, err, "send", "blocking", - total == 2*len) -end - ------------------------------------------------------------------------- -function empty_connect() - reconnect() - if data then data:close() data = nil end - remote [[ - if data then data:close() data = nil end - data = server:accept() - ]] - data, err = socket.connect("", port) - if not data then - pass("ok") - data = socket.connect(host, port) - else - pass("gethostbyname returns localhost on empty string...") - end -end - ------------------------------------------------------------------------- -function isclosed(c) - return c:getfd() == -1 or c:getfd() == (2^32-1) -end - -function active_close() - reconnect() - if isclosed(data) then fail("should not be closed") end - data:close() - if not isclosed(data) then fail("should be closed") end - data = nil - local udp = socket.udp() - if isclosed(udp) then fail("should not be closed") end - udp:close() - if not isclosed(udp) then fail("should be closed") end - pass("ok") -end - ------------------------------------------------------------------------- -function test_closed() - local back, partial, err - local str = 'little string' - reconnect() - pass("trying read detection") - remote (string.format ([[ - data:send('%s') - data:close() - data = nil - ]], str)) - -- try to get a line - back, err, partial = data:receive() - if not err then fail("should have gotten 'closed'.") - elseif err ~= "closed" then fail("got '"..err.."' instead of 'closed'.") - elseif str ~= partial then fail("didn't receive partial result.") - else pass("graceful 'closed' received") end - reconnect() - pass("trying write detection") - remote [[ - data:close() - data = nil - ]] - total, err, partial = data:send(string.rep("ugauga", 100000)) - if not err then - pass("failed: output buffer is at least %d bytes long!", total) - elseif err ~= "closed" then - fail("got '"..err.."' instead of 'closed'.") - else - pass("graceful 'closed' received after %d bytes were sent", partial) - end -end - ------------------------------------------------------------------------- -function test_selectbugs() - local r, s, e = socket.select(nil, nil, 0.1) - assert(type(r) == "table" and type(s) == "table" and - (e == "timeout" or e == "error")) - pass("both nil: ok") - local udp = socket.udp() - udp:close() - r, s, e = socket.select({ udp }, { udp }, 0.1) - assert(type(r) == "table" and type(s) == "table" and - (e == "timeout" or e == "error")) - pass("closed sockets: ok") - e = pcall(socket.select, "wrong", 1, 0.1) - assert(e == false) - e = pcall(socket.select, {}, 1, 0.1) - assert(e == false) - pass("invalid input: ok") -end - ------------------------------------------------------------------------- -function accept_timeout() - io.stderr:write("accept with timeout (if it hangs, it failed): ") - local s, e = socket.bind("*", 0, 0) - assert(s, e) - local t = socket.gettime() - s:settimeout(1) - local c, e = s:accept() - assert(not c, "should not accept") - assert(e == "timeout", string.format("wrong error message (%s)", e)) - t = socket.gettime() - t - assert(t < 2, string.format("took to long to give up (%gs)", t)) - s:close() - pass("good") -end - ------------------------------------------------------------------------- -function connect_timeout() - io.stderr:write("connect with timeout (if it hangs, it failed!): ") - local t = socket.gettime() - local c, e = socket.tcp() - assert(c, e) - c:settimeout(0.1) - local t = socket.gettime() - local r, e = c:connect("127.0.0.2", 80) - assert(not r, "should not connect") - assert(socket.gettime() - t < 2, "took too long to give up.") - c:close() - print("ok") -end - ------------------------------------------------------------------------- -function accept_errors() - io.stderr:write("not listening: ") - local d, e = socket.bind("*", 0) - assert(d, e); - local c, e = socket.tcp(); - assert(c, e); - d:setfd(c:getfd()) - d:settimeout(2) - local r, e = d:accept() - assert(not r and e) - print("ok: ", e) - io.stderr:write("not supported: ") - local c, e = socket.udp() - assert(c, e); - d:setfd(c:getfd()) - local r, e = d:accept() - assert(not r and e) - print("ok: ", e) -end - ------------------------------------------------------------------------- -function connect_errors() - io.stderr:write("connection refused: ") - local c, e = socket.connect("localhost", 1); - assert(not c and e) - print("ok: ", e) - io.stderr:write("host not found: ") - local c, e = socket.connect("host.is.invalid", 1); - assert(not c and e, e) - print("ok: ", e) -end - ------------------------------------------------------------------------- -function rebind_test() - local c = socket.bind("localhost", 0) - local i, p = c:getsockname() - local s, e = socket.tcp() - assert(s, e) - s:setoption("reuseaddr", false) - r, e = s:bind("localhost", p) - assert(not r, "managed to rebind!") - assert(e) - print("ok: ", e) -end - ------------------------------------------------------------------------- -function getstats_test() - reconnect() - local t = 0 - for i = 1, 25 do - local c = math.random(1, 100) - remote (string.format ([[ - str = data:receive(%d) - data:send(str) - ]], c)) - data:send(string.rep("a", c)) - data:receive(c) - t = t + c - local r, s, a = data:getstats() - assert(r == t, "received count failed" .. tostring(r) - .. "/" .. tostring(t)) - assert(s == t, "sent count failed" .. tostring(s) - .. "/" .. tostring(t)) - end - print("ok") -end - - ------------------------------------------------------------------------- -function test_nonblocking(size) - reconnect() -print("Testing " .. 2*size .. " bytes") -remote(string.format([[ - data:send(string.rep("a", %d)) - socket.sleep(0.5) - data:send(string.rep("b", %d) .. "\n") -]], size, size)) - local err = "timeout" - local part = "" - local str - data:settimeout(0) - while 1 do - str, err, part = data:receive("*l", part) - if err ~= "timeout" then break end - end - assert(str == (string.rep("a", size) .. string.rep("b", size))) - reconnect() -remote(string.format([[ - str = data:receive(%d) - socket.sleep(0.5) - str = data:receive(%d, str) - data:send(str) -]], size, size)) - data:settimeout(0) - local start = 0 - while 1 do - ret, err, start = data:send(str, start+1) - if err ~= "timeout" then break end - end - data:send("\n") - data:settimeout(-1) - local back = data:receive(2*size) - assert(back == str, "'" .. back .. "' vs '" .. str .. "'") - print("ok") -end - ------------------------------------------------------------------------- - -test("method registration") -test_methods(socket.unix(), { - "accept", - "bind", - "close", - "connect", - "dirty", - "getfd", - "getstats", - "setstats", - "listen", - "receive", - "send", - "setfd", - "setoption", - "setpeername", - "setsockname", - "settimeout", - "shutdown", -}) - -test("connect function") ---connect_timeout() ---empty_connect() ---connect_errors() - ---test("rebinding: ") ---rebind_test() - -test("active close: ") -active_close() - -test("closed connection detection: ") -test_closed() - -test("accept function: ") -accept_timeout() -accept_errors() - -test("getstats test") -getstats_test() - -test("character line") -test_asciiline(1) -test_asciiline(17) -test_asciiline(200) -test_asciiline(4091) -test_asciiline(80199) -test_asciiline(8000000) -test_asciiline(80199) -test_asciiline(4091) -test_asciiline(200) -test_asciiline(17) -test_asciiline(1) - -test("mixed patterns") -test_mixed(1) -test_mixed(17) -test_mixed(200) -test_mixed(4091) -test_mixed(801990) -test_mixed(4091) -test_mixed(200) -test_mixed(17) -test_mixed(1) - -test("binary line") -test_rawline(1) -test_rawline(17) -test_rawline(200) -test_rawline(4091) -test_rawline(80199) -test_rawline(8000000) -test_rawline(80199) -test_rawline(4091) -test_rawline(200) -test_rawline(17) -test_rawline(1) - -test("raw transfer") -test_raw(1) -test_raw(17) -test_raw(200) -test_raw(4091) -test_raw(80199) -test_raw(8000000) -test_raw(80199) -test_raw(4091) -test_raw(200) -test_raw(17) -test_raw(1) - -test("non-blocking transfer") -test_nonblocking(1) -test_nonblocking(17) -test_nonblocking(200) -test_nonblocking(4091) -test_nonblocking(80199) -test_nonblocking(8000000) -test_nonblocking(80199) -test_nonblocking(4091) -test_nonblocking(200) -test_nonblocking(17) -test_nonblocking(1) - -test("total timeout on send") -test_totaltimeoutsend(800091, 1, 3) -test_totaltimeoutsend(800091, 2, 3) -test_totaltimeoutsend(800091, 5, 2) -test_totaltimeoutsend(800091, 3, 1) - -test("total timeout on receive") -test_totaltimeoutreceive(800091, 1, 3) -test_totaltimeoutreceive(800091, 2, 3) -test_totaltimeoutreceive(800091, 3, 2) -test_totaltimeoutreceive(800091, 3, 1) - -test("blocking timeout on send") -test_blockingtimeoutsend(800091, 1, 3) -test_blockingtimeoutsend(800091, 2, 3) -test_blockingtimeoutsend(800091, 3, 2) -test_blockingtimeoutsend(800091, 3, 1) - -test("blocking timeout on receive") -test_blockingtimeoutreceive(800091, 1, 3) -test_blockingtimeoutreceive(800091, 2, 3) -test_blockingtimeoutreceive(800091, 3, 2) -test_blockingtimeoutreceive(800091, 3, 1) - -test(string.format("done in %.2fs", socket.gettime() - start)) diff --git a/build/premake/premake5/binmodules/luasocket/test/utestsrvr.lua b/build/premake/premake5/binmodules/luasocket/test/utestsrvr.lua deleted file mode 100644 index a96b570e1b..0000000000 --- a/build/premake/premake5/binmodules/luasocket/test/utestsrvr.lua +++ /dev/null @@ -1,17 +0,0 @@ -socket=require("socket"); -os.remove("/tmp/luasocket") -socket.unix = require("socket.unix"); -host = host or "luasocket"; -server = assert(socket.unix()) -assert(server:bind(host)) -assert(server:listen(5)) -ack = "\n"; -while 1 do - print("server: waiting for client connection..."); - control = assert(server:accept()); - while 1 do - command = assert(control:receive()); - assert(control:send(ack)); - ((loadstring or load)(command))(); - end -end diff --git a/build/premake/premake5/binmodules/luasocket/win32.cmd b/build/premake/premake5/binmodules/luasocket/win32.cmd deleted file mode 100644 index 304572152d..0000000000 --- a/build/premake/premake5/binmodules/luasocket/win32.cmd +++ /dev/null @@ -1 +0,0 @@ -make LUAPREFIX_win32='c:\cygwin\home\diego\vc12' LUAV=5.1 PLAT=win32 LUALIBNAME_win32=lualib.lib PLATFORM_win32=Debug install-both diff --git a/build/premake/premake5/build/gmake2.bsd/Makefile b/build/premake/premake5/build/gmake2.bsd/Makefile deleted file mode 100644 index ae6d5ac4ce..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -# Alternative GNU Make workspace makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -ifeq ($(config),release) - Premake5_config = release - lua_lib_config = release - luashim_lib_config = release - zlib_lib_config = release - zip_lib_config = release - mbedtls_lib_config = release - curl_lib_config = release - example_config = release - luasocket_config = release - -else ifeq ($(config),debug) - Premake5_config = debug - lua_lib_config = debug - luashim_lib_config = debug - zlib_lib_config = debug - zip_lib_config = debug - mbedtls_lib_config = debug - curl_lib_config = debug - example_config = debug - luasocket_config = debug - -else - $(error "invalid configuration $(config)") -endif - -PROJECTS := Premake5 lua-lib luashim-lib zlib-lib zip-lib mbedtls-lib curl-lib example luasocket - -.PHONY: all clean help $(PROJECTS) Binary Modules contrib - -all: $(PROJECTS) - -Binary Modules: example luasocket - -contrib: curl-lib lua-lib luashim-lib mbedtls-lib zip-lib zlib-lib - -Premake5: lua-lib zip-lib zlib-lib curl-lib mbedtls-lib -ifneq (,$(Premake5_config)) - @echo "==== Building Premake5 ($(Premake5_config)) ====" - @${MAKE} --no-print-directory -C . -f Premake5.make config=$(Premake5_config) -endif - -lua-lib: -ifneq (,$(lua_lib_config)) - @echo "==== Building lua-lib ($(lua_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f lua-lib.make config=$(lua_lib_config) -endif - -luashim-lib: -ifneq (,$(luashim_lib_config)) - @echo "==== Building luashim-lib ($(luashim_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f luashim-lib.make config=$(luashim_lib_config) -endif - -zlib-lib: -ifneq (,$(zlib_lib_config)) - @echo "==== Building zlib-lib ($(zlib_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f zlib-lib.make config=$(zlib_lib_config) -endif - -zip-lib: -ifneq (,$(zip_lib_config)) - @echo "==== Building zip-lib ($(zip_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f zip-lib.make config=$(zip_lib_config) -endif - -mbedtls-lib: -ifneq (,$(mbedtls_lib_config)) - @echo "==== Building mbedtls-lib ($(mbedtls_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f mbedtls-lib.make config=$(mbedtls_lib_config) -endif - -curl-lib: -ifneq (,$(curl_lib_config)) - @echo "==== Building curl-lib ($(curl_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f curl-lib.make config=$(curl_lib_config) -endif - -example: luashim-lib -ifneq (,$(example_config)) - @echo "==== Building example ($(example_config)) ====" - @${MAKE} --no-print-directory -C . -f example.make config=$(example_config) -endif - -luasocket: luashim-lib -ifneq (,$(luasocket_config)) - @echo "==== Building luasocket ($(luasocket_config)) ====" - @${MAKE} --no-print-directory -C . -f luasocket.make config=$(luasocket_config) -endif - -clean: - @${MAKE} --no-print-directory -C . -f Premake5.make clean - @${MAKE} --no-print-directory -C . -f lua-lib.make clean - @${MAKE} --no-print-directory -C . -f luashim-lib.make clean - @${MAKE} --no-print-directory -C . -f zlib-lib.make clean - @${MAKE} --no-print-directory -C . -f zip-lib.make clean - @${MAKE} --no-print-directory -C . -f mbedtls-lib.make clean - @${MAKE} --no-print-directory -C . -f curl-lib.make clean - @${MAKE} --no-print-directory -C . -f example.make clean - @${MAKE} --no-print-directory -C . -f luasocket.make clean - -help: - @echo "Usage: make [config=name] [target]" - @echo "" - @echo "CONFIGURATIONS:" - @echo " release" - @echo " debug" - @echo "" - @echo "TARGETS:" - @echo " all (default)" - @echo " clean" - @echo " Premake5" - @echo " lua-lib" - @echo " luashim-lib" - @echo " zlib-lib" - @echo " zip-lib" - @echo " mbedtls-lib" - @echo " curl-lib" - @echo " example" - @echo " luasocket" - @echo "" - @echo "For more information, see https://github.com/premake/premake-core/wiki" \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/Premake5.make b/build/premake/premake5/build/gmake2.bsd/Premake5.make deleted file mode 100644 index 7b6a8e8dfe..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/Premake5.make +++ /dev/null @@ -1,390 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -I../../contrib/zlib -I../../contrib/libzip -I../../contrib/curl/include -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/premake5 -OBJDIR = obj/Release/Premake5 -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm -LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/premake5 -OBJDIR = obj/Debug/Premake5 -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm -LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -ALL_LDFLAGS += $(LDFLAGS) -rdynamic - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/buffered_io.o -GENERATED += $(OBJDIR)/criteria_matches.o -GENERATED += $(OBJDIR)/curl_utils.o -GENERATED += $(OBJDIR)/debug_prompt.o -GENERATED += $(OBJDIR)/http_download.o -GENERATED += $(OBJDIR)/http_get.o -GENERATED += $(OBJDIR)/http_post.o -GENERATED += $(OBJDIR)/lua_auxlib.o -GENERATED += $(OBJDIR)/os_chdir.o -GENERATED += $(OBJDIR)/os_chmod.o -GENERATED += $(OBJDIR)/os_comparefiles.o -GENERATED += $(OBJDIR)/os_compile.o -GENERATED += $(OBJDIR)/os_copyfile.o -GENERATED += $(OBJDIR)/os_getWindowsRegistry.o -GENERATED += $(OBJDIR)/os_getcwd.o -GENERATED += $(OBJDIR)/os_getpass.o -GENERATED += $(OBJDIR)/os_getversion.o -GENERATED += $(OBJDIR)/os_host.o -GENERATED += $(OBJDIR)/os_is64bit.o -GENERATED += $(OBJDIR)/os_isdir.o -GENERATED += $(OBJDIR)/os_isfile.o -GENERATED += $(OBJDIR)/os_islink.o -GENERATED += $(OBJDIR)/os_listWindowsRegistry.o -GENERATED += $(OBJDIR)/os_locate.o -GENERATED += $(OBJDIR)/os_match.o -GENERATED += $(OBJDIR)/os_mkdir.o -GENERATED += $(OBJDIR)/os_pathsearch.o -GENERATED += $(OBJDIR)/os_realpath.o -GENERATED += $(OBJDIR)/os_remove.o -GENERATED += $(OBJDIR)/os_rename.o -GENERATED += $(OBJDIR)/os_rmdir.o -GENERATED += $(OBJDIR)/os_stat.o -GENERATED += $(OBJDIR)/os_touchfile.o -GENERATED += $(OBJDIR)/os_uuid.o -GENERATED += $(OBJDIR)/os_writefile_ifnotequal.o -GENERATED += $(OBJDIR)/path_getabsolute.o -GENERATED += $(OBJDIR)/path_getrelative.o -GENERATED += $(OBJDIR)/path_isabsolute.o -GENERATED += $(OBJDIR)/path_join.o -GENERATED += $(OBJDIR)/path_normalize.o -GENERATED += $(OBJDIR)/path_translate.o -GENERATED += $(OBJDIR)/path_wildcards.o -GENERATED += $(OBJDIR)/premake.o -GENERATED += $(OBJDIR)/premake_main.o -GENERATED += $(OBJDIR)/scripts.o -GENERATED += $(OBJDIR)/string_endswith.o -GENERATED += $(OBJDIR)/string_hash.o -GENERATED += $(OBJDIR)/string_sha1.o -GENERATED += $(OBJDIR)/string_startswith.o -GENERATED += $(OBJDIR)/term_textColor.o -GENERATED += $(OBJDIR)/zip_extract.o -OBJECTS += $(OBJDIR)/buffered_io.o -OBJECTS += $(OBJDIR)/criteria_matches.o -OBJECTS += $(OBJDIR)/curl_utils.o -OBJECTS += $(OBJDIR)/debug_prompt.o -OBJECTS += $(OBJDIR)/http_download.o -OBJECTS += $(OBJDIR)/http_get.o -OBJECTS += $(OBJDIR)/http_post.o -OBJECTS += $(OBJDIR)/lua_auxlib.o -OBJECTS += $(OBJDIR)/os_chdir.o -OBJECTS += $(OBJDIR)/os_chmod.o -OBJECTS += $(OBJDIR)/os_comparefiles.o -OBJECTS += $(OBJDIR)/os_compile.o -OBJECTS += $(OBJDIR)/os_copyfile.o -OBJECTS += $(OBJDIR)/os_getWindowsRegistry.o -OBJECTS += $(OBJDIR)/os_getcwd.o -OBJECTS += $(OBJDIR)/os_getpass.o -OBJECTS += $(OBJDIR)/os_getversion.o -OBJECTS += $(OBJDIR)/os_host.o -OBJECTS += $(OBJDIR)/os_is64bit.o -OBJECTS += $(OBJDIR)/os_isdir.o -OBJECTS += $(OBJDIR)/os_isfile.o -OBJECTS += $(OBJDIR)/os_islink.o -OBJECTS += $(OBJDIR)/os_listWindowsRegistry.o -OBJECTS += $(OBJDIR)/os_locate.o -OBJECTS += $(OBJDIR)/os_match.o -OBJECTS += $(OBJDIR)/os_mkdir.o -OBJECTS += $(OBJDIR)/os_pathsearch.o -OBJECTS += $(OBJDIR)/os_realpath.o -OBJECTS += $(OBJDIR)/os_remove.o -OBJECTS += $(OBJDIR)/os_rename.o -OBJECTS += $(OBJDIR)/os_rmdir.o -OBJECTS += $(OBJDIR)/os_stat.o -OBJECTS += $(OBJDIR)/os_touchfile.o -OBJECTS += $(OBJDIR)/os_uuid.o -OBJECTS += $(OBJDIR)/os_writefile_ifnotequal.o -OBJECTS += $(OBJDIR)/path_getabsolute.o -OBJECTS += $(OBJDIR)/path_getrelative.o -OBJECTS += $(OBJDIR)/path_isabsolute.o -OBJECTS += $(OBJDIR)/path_join.o -OBJECTS += $(OBJDIR)/path_normalize.o -OBJECTS += $(OBJDIR)/path_translate.o -OBJECTS += $(OBJDIR)/path_wildcards.o -OBJECTS += $(OBJDIR)/premake.o -OBJECTS += $(OBJDIR)/premake_main.o -OBJECTS += $(OBJDIR)/scripts.o -OBJECTS += $(OBJDIR)/string_endswith.o -OBJECTS += $(OBJDIR)/string_hash.o -OBJECTS += $(OBJDIR)/string_sha1.o -OBJECTS += $(OBJDIR)/string_startswith.o -OBJECTS += $(OBJDIR)/term_textColor.o -OBJECTS += $(OBJDIR)/zip_extract.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking Premake5 - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning Premake5 -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/buffered_io.o: ../../src/host/buffered_io.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/criteria_matches.o: ../../src/host/criteria_matches.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_utils.o: ../../src/host/curl_utils.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/debug_prompt.o: ../../src/host/debug_prompt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_download.o: ../../src/host/http_download.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_get.o: ../../src/host/http_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_post.o: ../../src/host/http_post.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lua_auxlib.o: ../../src/host/lua_auxlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_chdir.o: ../../src/host/os_chdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_chmod.o: ../../src/host/os_chmod.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_comparefiles.o: ../../src/host/os_comparefiles.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_compile.o: ../../src/host/os_compile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_copyfile.o: ../../src/host/os_copyfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getWindowsRegistry.o: ../../src/host/os_getWindowsRegistry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getcwd.o: ../../src/host/os_getcwd.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getpass.o: ../../src/host/os_getpass.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getversion.o: ../../src/host/os_getversion.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_host.o: ../../src/host/os_host.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_is64bit.o: ../../src/host/os_is64bit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_isdir.o: ../../src/host/os_isdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_isfile.o: ../../src/host/os_isfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_islink.o: ../../src/host/os_islink.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_listWindowsRegistry.o: ../../src/host/os_listWindowsRegistry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_locate.o: ../../src/host/os_locate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_match.o: ../../src/host/os_match.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_mkdir.o: ../../src/host/os_mkdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_pathsearch.o: ../../src/host/os_pathsearch.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_realpath.o: ../../src/host/os_realpath.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_remove.o: ../../src/host/os_remove.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_rename.o: ../../src/host/os_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_rmdir.o: ../../src/host/os_rmdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_stat.o: ../../src/host/os_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_touchfile.o: ../../src/host/os_touchfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_uuid.o: ../../src/host/os_uuid.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_writefile_ifnotequal.o: ../../src/host/os_writefile_ifnotequal.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_getabsolute.o: ../../src/host/path_getabsolute.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_getrelative.o: ../../src/host/path_getrelative.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_isabsolute.o: ../../src/host/path_isabsolute.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_join.o: ../../src/host/path_join.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_normalize.o: ../../src/host/path_normalize.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_translate.o: ../../src/host/path_translate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_wildcards.o: ../../src/host/path_wildcards.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/premake.o: ../../src/host/premake.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/premake_main.o: ../../src/host/premake_main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_endswith.o: ../../src/host/string_endswith.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_hash.o: ../../src/host/string_hash.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_sha1.o: ../../src/host/string_sha1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_startswith.o: ../../src/host/string_startswith.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/term_textColor.o: ../../src/host/term_textColor.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extract.o: ../../src/host/zip_extract.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/scripts.o: ../../src/scripts.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/curl-lib.make b/build/premake/premake5/build/gmake2.bsd/curl-lib.make deleted file mode 100644 index bc56dbf066..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/curl-lib.make +++ /dev/null @@ -1,768 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/curl/include -I../../contrib/curl/lib -I../../contrib/mbedtls/include -I../../contrib/zlib -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libcurl-lib.a -OBJDIR = obj/Release/curl-lib -DEFINES += -DPREMAKE_COMPRESSION -DPREMAKE_CURL -DNDEBUG -DBUILDING_LIBCURL -DCURL_STATICLIB -DHTTP_ONLY -DUSE_ZLIB -DUSE_MBEDTLS -DCURL_HIDDEN_SYMBOLS -DCURL_CA_BUNDLE=\"/etc/ssl/cert.pem\" -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libcurl-lib.a -OBJDIR = obj/Debug/curl-lib -DEFINES += -DPREMAKE_COMPRESSION -DPREMAKE_CURL -D_DEBUG -DBUILDING_LIBCURL -DCURL_STATICLIB -DHTTP_ONLY -DUSE_ZLIB -DUSE_MBEDTLS -DCURL_HIDDEN_SYMBOLS -DCURL_CA_BUNDLE=\"/etc/ssl/cert.pem\" -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/amigaos.o -GENERATED += $(OBJDIR)/asyn-ares.o -GENERATED += $(OBJDIR)/asyn-thread.o -GENERATED += $(OBJDIR)/axtls.o -GENERATED += $(OBJDIR)/base64.o -GENERATED += $(OBJDIR)/cleartext.o -GENERATED += $(OBJDIR)/conncache.o -GENERATED += $(OBJDIR)/connect.o -GENERATED += $(OBJDIR)/content_encoding.o -GENERATED += $(OBJDIR)/cookie.o -GENERATED += $(OBJDIR)/cram.o -GENERATED += $(OBJDIR)/curl_addrinfo.o -GENERATED += $(OBJDIR)/curl_des.o -GENERATED += $(OBJDIR)/curl_endian.o -GENERATED += $(OBJDIR)/curl_fnmatch.o -GENERATED += $(OBJDIR)/curl_gethostname.o -GENERATED += $(OBJDIR)/curl_gssapi.o -GENERATED += $(OBJDIR)/curl_memrchr.o -GENERATED += $(OBJDIR)/curl_multibyte.o -GENERATED += $(OBJDIR)/curl_ntlm_core.o -GENERATED += $(OBJDIR)/curl_ntlm_wb.o -GENERATED += $(OBJDIR)/curl_rtmp.o -GENERATED += $(OBJDIR)/curl_sasl.o -GENERATED += $(OBJDIR)/curl_sspi.o -GENERATED += $(OBJDIR)/curl_threads.o -GENERATED += $(OBJDIR)/cyassl.o -GENERATED += $(OBJDIR)/darwinssl.o -GENERATED += $(OBJDIR)/dict.o -GENERATED += $(OBJDIR)/digest.o -GENERATED += $(OBJDIR)/digest_sspi.o -GENERATED += $(OBJDIR)/dotdot.o -GENERATED += $(OBJDIR)/easy.o -GENERATED += $(OBJDIR)/escape.o -GENERATED += $(OBJDIR)/file.o -GENERATED += $(OBJDIR)/fileinfo.o -GENERATED += $(OBJDIR)/formdata.o -GENERATED += $(OBJDIR)/ftp.o -GENERATED += $(OBJDIR)/ftplistparser.o -GENERATED += $(OBJDIR)/getenv.o -GENERATED += $(OBJDIR)/getinfo.o -GENERATED += $(OBJDIR)/gopher.o -GENERATED += $(OBJDIR)/gskit.o -GENERATED += $(OBJDIR)/gtls.o -GENERATED += $(OBJDIR)/hash.o -GENERATED += $(OBJDIR)/hmac.o -GENERATED += $(OBJDIR)/hostasyn.o -GENERATED += $(OBJDIR)/hostcheck.o -GENERATED += $(OBJDIR)/hostip.o -GENERATED += $(OBJDIR)/hostip4.o -GENERATED += $(OBJDIR)/hostip6.o -GENERATED += $(OBJDIR)/hostsyn.o -GENERATED += $(OBJDIR)/http.o -GENERATED += $(OBJDIR)/http2.o -GENERATED += $(OBJDIR)/http_chunks.o -GENERATED += $(OBJDIR)/http_digest.o -GENERATED += $(OBJDIR)/http_negotiate.o -GENERATED += $(OBJDIR)/http_ntlm.o -GENERATED += $(OBJDIR)/http_proxy.o -GENERATED += $(OBJDIR)/idn_win32.o -GENERATED += $(OBJDIR)/if2ip.o -GENERATED += $(OBJDIR)/imap.o -GENERATED += $(OBJDIR)/inet_ntop.o -GENERATED += $(OBJDIR)/inet_pton.o -GENERATED += $(OBJDIR)/krb5.o -GENERATED += $(OBJDIR)/krb5_gssapi.o -GENERATED += $(OBJDIR)/krb5_sspi.o -GENERATED += $(OBJDIR)/ldap.o -GENERATED += $(OBJDIR)/llist.o -GENERATED += $(OBJDIR)/mbedtls.o -GENERATED += $(OBJDIR)/md4.o -GENERATED += $(OBJDIR)/md5.o -GENERATED += $(OBJDIR)/memdebug.o -GENERATED += $(OBJDIR)/mprintf.o -GENERATED += $(OBJDIR)/multi.o -GENERATED += $(OBJDIR)/netrc.o -GENERATED += $(OBJDIR)/non-ascii.o -GENERATED += $(OBJDIR)/nonblock.o -GENERATED += $(OBJDIR)/nss.o -GENERATED += $(OBJDIR)/ntlm.o -GENERATED += $(OBJDIR)/ntlm_sspi.o -GENERATED += $(OBJDIR)/nwlib.o -GENERATED += $(OBJDIR)/nwos.o -GENERATED += $(OBJDIR)/oauth2.o -GENERATED += $(OBJDIR)/openldap.o -GENERATED += $(OBJDIR)/openssl.o -GENERATED += $(OBJDIR)/parsedate.o -GENERATED += $(OBJDIR)/pingpong.o -GENERATED += $(OBJDIR)/pipeline.o -GENERATED += $(OBJDIR)/polarssl.o -GENERATED += $(OBJDIR)/polarssl_threadlock.o -GENERATED += $(OBJDIR)/pop3.o -GENERATED += $(OBJDIR)/progress.o -GENERATED += $(OBJDIR)/rand.o -GENERATED += $(OBJDIR)/rtsp.o -GENERATED += $(OBJDIR)/schannel.o -GENERATED += $(OBJDIR)/security.o -GENERATED += $(OBJDIR)/select.o -GENERATED += $(OBJDIR)/sendf.o -GENERATED += $(OBJDIR)/share.o -GENERATED += $(OBJDIR)/slist.o -GENERATED += $(OBJDIR)/smb.o -GENERATED += $(OBJDIR)/smtp.o -GENERATED += $(OBJDIR)/socks.o -GENERATED += $(OBJDIR)/socks_gssapi.o -GENERATED += $(OBJDIR)/socks_sspi.o -GENERATED += $(OBJDIR)/speedcheck.o -GENERATED += $(OBJDIR)/splay.o -GENERATED += $(OBJDIR)/spnego_gssapi.o -GENERATED += $(OBJDIR)/spnego_sspi.o -GENERATED += $(OBJDIR)/ssh.o -GENERATED += $(OBJDIR)/strcase.o -GENERATED += $(OBJDIR)/strdup.o -GENERATED += $(OBJDIR)/strerror.o -GENERATED += $(OBJDIR)/strtok.o -GENERATED += $(OBJDIR)/strtoofft.o -GENERATED += $(OBJDIR)/system_win32.o -GENERATED += $(OBJDIR)/telnet.o -GENERATED += $(OBJDIR)/tftp.o -GENERATED += $(OBJDIR)/timeval.o -GENERATED += $(OBJDIR)/transfer.o -GENERATED += $(OBJDIR)/url.o -GENERATED += $(OBJDIR)/vauth.o -GENERATED += $(OBJDIR)/version.o -GENERATED += $(OBJDIR)/vtls.o -GENERATED += $(OBJDIR)/warnless.o -GENERATED += $(OBJDIR)/wildcard.o -GENERATED += $(OBJDIR)/x509asn1.o -OBJECTS += $(OBJDIR)/amigaos.o -OBJECTS += $(OBJDIR)/asyn-ares.o -OBJECTS += $(OBJDIR)/asyn-thread.o -OBJECTS += $(OBJDIR)/axtls.o -OBJECTS += $(OBJDIR)/base64.o -OBJECTS += $(OBJDIR)/cleartext.o -OBJECTS += $(OBJDIR)/conncache.o -OBJECTS += $(OBJDIR)/connect.o -OBJECTS += $(OBJDIR)/content_encoding.o -OBJECTS += $(OBJDIR)/cookie.o -OBJECTS += $(OBJDIR)/cram.o -OBJECTS += $(OBJDIR)/curl_addrinfo.o -OBJECTS += $(OBJDIR)/curl_des.o -OBJECTS += $(OBJDIR)/curl_endian.o -OBJECTS += $(OBJDIR)/curl_fnmatch.o -OBJECTS += $(OBJDIR)/curl_gethostname.o -OBJECTS += $(OBJDIR)/curl_gssapi.o -OBJECTS += $(OBJDIR)/curl_memrchr.o -OBJECTS += $(OBJDIR)/curl_multibyte.o -OBJECTS += $(OBJDIR)/curl_ntlm_core.o -OBJECTS += $(OBJDIR)/curl_ntlm_wb.o -OBJECTS += $(OBJDIR)/curl_rtmp.o -OBJECTS += $(OBJDIR)/curl_sasl.o -OBJECTS += $(OBJDIR)/curl_sspi.o -OBJECTS += $(OBJDIR)/curl_threads.o -OBJECTS += $(OBJDIR)/cyassl.o -OBJECTS += $(OBJDIR)/darwinssl.o -OBJECTS += $(OBJDIR)/dict.o -OBJECTS += $(OBJDIR)/digest.o -OBJECTS += $(OBJDIR)/digest_sspi.o -OBJECTS += $(OBJDIR)/dotdot.o -OBJECTS += $(OBJDIR)/easy.o -OBJECTS += $(OBJDIR)/escape.o -OBJECTS += $(OBJDIR)/file.o -OBJECTS += $(OBJDIR)/fileinfo.o -OBJECTS += $(OBJDIR)/formdata.o -OBJECTS += $(OBJDIR)/ftp.o -OBJECTS += $(OBJDIR)/ftplistparser.o -OBJECTS += $(OBJDIR)/getenv.o -OBJECTS += $(OBJDIR)/getinfo.o -OBJECTS += $(OBJDIR)/gopher.o -OBJECTS += $(OBJDIR)/gskit.o -OBJECTS += $(OBJDIR)/gtls.o -OBJECTS += $(OBJDIR)/hash.o -OBJECTS += $(OBJDIR)/hmac.o -OBJECTS += $(OBJDIR)/hostasyn.o -OBJECTS += $(OBJDIR)/hostcheck.o -OBJECTS += $(OBJDIR)/hostip.o -OBJECTS += $(OBJDIR)/hostip4.o -OBJECTS += $(OBJDIR)/hostip6.o -OBJECTS += $(OBJDIR)/hostsyn.o -OBJECTS += $(OBJDIR)/http.o -OBJECTS += $(OBJDIR)/http2.o -OBJECTS += $(OBJDIR)/http_chunks.o -OBJECTS += $(OBJDIR)/http_digest.o -OBJECTS += $(OBJDIR)/http_negotiate.o -OBJECTS += $(OBJDIR)/http_ntlm.o -OBJECTS += $(OBJDIR)/http_proxy.o -OBJECTS += $(OBJDIR)/idn_win32.o -OBJECTS += $(OBJDIR)/if2ip.o -OBJECTS += $(OBJDIR)/imap.o -OBJECTS += $(OBJDIR)/inet_ntop.o -OBJECTS += $(OBJDIR)/inet_pton.o -OBJECTS += $(OBJDIR)/krb5.o -OBJECTS += $(OBJDIR)/krb5_gssapi.o -OBJECTS += $(OBJDIR)/krb5_sspi.o -OBJECTS += $(OBJDIR)/ldap.o -OBJECTS += $(OBJDIR)/llist.o -OBJECTS += $(OBJDIR)/mbedtls.o -OBJECTS += $(OBJDIR)/md4.o -OBJECTS += $(OBJDIR)/md5.o -OBJECTS += $(OBJDIR)/memdebug.o -OBJECTS += $(OBJDIR)/mprintf.o -OBJECTS += $(OBJDIR)/multi.o -OBJECTS += $(OBJDIR)/netrc.o -OBJECTS += $(OBJDIR)/non-ascii.o -OBJECTS += $(OBJDIR)/nonblock.o -OBJECTS += $(OBJDIR)/nss.o -OBJECTS += $(OBJDIR)/ntlm.o -OBJECTS += $(OBJDIR)/ntlm_sspi.o -OBJECTS += $(OBJDIR)/nwlib.o -OBJECTS += $(OBJDIR)/nwos.o -OBJECTS += $(OBJDIR)/oauth2.o -OBJECTS += $(OBJDIR)/openldap.o -OBJECTS += $(OBJDIR)/openssl.o -OBJECTS += $(OBJDIR)/parsedate.o -OBJECTS += $(OBJDIR)/pingpong.o -OBJECTS += $(OBJDIR)/pipeline.o -OBJECTS += $(OBJDIR)/polarssl.o -OBJECTS += $(OBJDIR)/polarssl_threadlock.o -OBJECTS += $(OBJDIR)/pop3.o -OBJECTS += $(OBJDIR)/progress.o -OBJECTS += $(OBJDIR)/rand.o -OBJECTS += $(OBJDIR)/rtsp.o -OBJECTS += $(OBJDIR)/schannel.o -OBJECTS += $(OBJDIR)/security.o -OBJECTS += $(OBJDIR)/select.o -OBJECTS += $(OBJDIR)/sendf.o -OBJECTS += $(OBJDIR)/share.o -OBJECTS += $(OBJDIR)/slist.o -OBJECTS += $(OBJDIR)/smb.o -OBJECTS += $(OBJDIR)/smtp.o -OBJECTS += $(OBJDIR)/socks.o -OBJECTS += $(OBJDIR)/socks_gssapi.o -OBJECTS += $(OBJDIR)/socks_sspi.o -OBJECTS += $(OBJDIR)/speedcheck.o -OBJECTS += $(OBJDIR)/splay.o -OBJECTS += $(OBJDIR)/spnego_gssapi.o -OBJECTS += $(OBJDIR)/spnego_sspi.o -OBJECTS += $(OBJDIR)/ssh.o -OBJECTS += $(OBJDIR)/strcase.o -OBJECTS += $(OBJDIR)/strdup.o -OBJECTS += $(OBJDIR)/strerror.o -OBJECTS += $(OBJDIR)/strtok.o -OBJECTS += $(OBJDIR)/strtoofft.o -OBJECTS += $(OBJDIR)/system_win32.o -OBJECTS += $(OBJDIR)/telnet.o -OBJECTS += $(OBJDIR)/tftp.o -OBJECTS += $(OBJDIR)/timeval.o -OBJECTS += $(OBJDIR)/transfer.o -OBJECTS += $(OBJDIR)/url.o -OBJECTS += $(OBJDIR)/vauth.o -OBJECTS += $(OBJDIR)/version.o -OBJECTS += $(OBJDIR)/vtls.o -OBJECTS += $(OBJDIR)/warnless.o -OBJECTS += $(OBJDIR)/wildcard.o -OBJECTS += $(OBJDIR)/x509asn1.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking curl-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning curl-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/amigaos.o: ../../contrib/curl/lib/amigaos.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asyn-ares.o: ../../contrib/curl/lib/asyn-ares.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asyn-thread.o: ../../contrib/curl/lib/asyn-thread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/base64.o: ../../contrib/curl/lib/base64.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/conncache.o: ../../contrib/curl/lib/conncache.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/connect.o: ../../contrib/curl/lib/connect.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/content_encoding.o: ../../contrib/curl/lib/content_encoding.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cookie.o: ../../contrib/curl/lib/cookie.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_addrinfo.o: ../../contrib/curl/lib/curl_addrinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_des.o: ../../contrib/curl/lib/curl_des.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_endian.o: ../../contrib/curl/lib/curl_endian.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_fnmatch.o: ../../contrib/curl/lib/curl_fnmatch.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_gethostname.o: ../../contrib/curl/lib/curl_gethostname.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_gssapi.o: ../../contrib/curl/lib/curl_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_memrchr.o: ../../contrib/curl/lib/curl_memrchr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_multibyte.o: ../../contrib/curl/lib/curl_multibyte.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_ntlm_core.o: ../../contrib/curl/lib/curl_ntlm_core.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_ntlm_wb.o: ../../contrib/curl/lib/curl_ntlm_wb.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_rtmp.o: ../../contrib/curl/lib/curl_rtmp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_sasl.o: ../../contrib/curl/lib/curl_sasl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_sspi.o: ../../contrib/curl/lib/curl_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_threads.o: ../../contrib/curl/lib/curl_threads.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dict.o: ../../contrib/curl/lib/dict.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dotdot.o: ../../contrib/curl/lib/dotdot.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/easy.o: ../../contrib/curl/lib/easy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/escape.o: ../../contrib/curl/lib/escape.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/file.o: ../../contrib/curl/lib/file.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/fileinfo.o: ../../contrib/curl/lib/fileinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/formdata.o: ../../contrib/curl/lib/formdata.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ftp.o: ../../contrib/curl/lib/ftp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ftplistparser.o: ../../contrib/curl/lib/ftplistparser.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/getenv.o: ../../contrib/curl/lib/getenv.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/getinfo.o: ../../contrib/curl/lib/getinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gopher.o: ../../contrib/curl/lib/gopher.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hash.o: ../../contrib/curl/lib/hash.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hmac.o: ../../contrib/curl/lib/hmac.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostasyn.o: ../../contrib/curl/lib/hostasyn.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostcheck.o: ../../contrib/curl/lib/hostcheck.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip.o: ../../contrib/curl/lib/hostip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip4.o: ../../contrib/curl/lib/hostip4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip6.o: ../../contrib/curl/lib/hostip6.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostsyn.o: ../../contrib/curl/lib/hostsyn.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http.o: ../../contrib/curl/lib/http.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http2.o: ../../contrib/curl/lib/http2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_chunks.o: ../../contrib/curl/lib/http_chunks.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_digest.o: ../../contrib/curl/lib/http_digest.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_negotiate.o: ../../contrib/curl/lib/http_negotiate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_ntlm.o: ../../contrib/curl/lib/http_ntlm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_proxy.o: ../../contrib/curl/lib/http_proxy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/idn_win32.o: ../../contrib/curl/lib/idn_win32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/if2ip.o: ../../contrib/curl/lib/if2ip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/imap.o: ../../contrib/curl/lib/imap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet_ntop.o: ../../contrib/curl/lib/inet_ntop.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet_pton.o: ../../contrib/curl/lib/inet_pton.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5.o: ../../contrib/curl/lib/krb5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldap.o: ../../contrib/curl/lib/ldap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/llist.o: ../../contrib/curl/lib/llist.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md4.o: ../../contrib/curl/lib/md4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md5.o: ../../contrib/curl/lib/md5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/memdebug.o: ../../contrib/curl/lib/memdebug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mprintf.o: ../../contrib/curl/lib/mprintf.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/multi.o: ../../contrib/curl/lib/multi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/netrc.o: ../../contrib/curl/lib/netrc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/non-ascii.o: ../../contrib/curl/lib/non-ascii.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nonblock.o: ../../contrib/curl/lib/nonblock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nwlib.o: ../../contrib/curl/lib/nwlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nwos.o: ../../contrib/curl/lib/nwos.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/openldap.o: ../../contrib/curl/lib/openldap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/parsedate.o: ../../contrib/curl/lib/parsedate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pingpong.o: ../../contrib/curl/lib/pingpong.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pipeline.o: ../../contrib/curl/lib/pipeline.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pop3.o: ../../contrib/curl/lib/pop3.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/progress.o: ../../contrib/curl/lib/progress.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rand.o: ../../contrib/curl/lib/rand.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rtsp.o: ../../contrib/curl/lib/rtsp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/security.o: ../../contrib/curl/lib/security.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/select.o: ../../contrib/curl/lib/select.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sendf.o: ../../contrib/curl/lib/sendf.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/share.o: ../../contrib/curl/lib/share.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/slist.o: ../../contrib/curl/lib/slist.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/smb.o: ../../contrib/curl/lib/smb.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/smtp.o: ../../contrib/curl/lib/smtp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks.o: ../../contrib/curl/lib/socks.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks_gssapi.o: ../../contrib/curl/lib/socks_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks_sspi.o: ../../contrib/curl/lib/socks_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/speedcheck.o: ../../contrib/curl/lib/speedcheck.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/splay.o: ../../contrib/curl/lib/splay.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssh.o: ../../contrib/curl/lib/ssh.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strcase.o: ../../contrib/curl/lib/strcase.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strdup.o: ../../contrib/curl/lib/strdup.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strerror.o: ../../contrib/curl/lib/strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strtok.o: ../../contrib/curl/lib/strtok.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strtoofft.o: ../../contrib/curl/lib/strtoofft.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/system_win32.o: ../../contrib/curl/lib/system_win32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/telnet.o: ../../contrib/curl/lib/telnet.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/tftp.o: ../../contrib/curl/lib/tftp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timeval.o: ../../contrib/curl/lib/timeval.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/transfer.o: ../../contrib/curl/lib/transfer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/url.o: ../../contrib/curl/lib/url.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cleartext.o: ../../contrib/curl/lib/vauth/cleartext.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cram.o: ../../contrib/curl/lib/vauth/cram.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/digest.o: ../../contrib/curl/lib/vauth/digest.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/digest_sspi.o: ../../contrib/curl/lib/vauth/digest_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5_gssapi.o: ../../contrib/curl/lib/vauth/krb5_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5_sspi.o: ../../contrib/curl/lib/vauth/krb5_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ntlm.o: ../../contrib/curl/lib/vauth/ntlm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ntlm_sspi.o: ../../contrib/curl/lib/vauth/ntlm_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/oauth2.o: ../../contrib/curl/lib/vauth/oauth2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/spnego_gssapi.o: ../../contrib/curl/lib/vauth/spnego_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/spnego_sspi.o: ../../contrib/curl/lib/vauth/spnego_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/vauth.o: ../../contrib/curl/lib/vauth/vauth.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version.o: ../../contrib/curl/lib/version.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/axtls.o: ../../contrib/curl/lib/vtls/axtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cyassl.o: ../../contrib/curl/lib/vtls/cyassl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/darwinssl.o: ../../contrib/curl/lib/vtls/darwinssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gskit.o: ../../contrib/curl/lib/vtls/gskit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gtls.o: ../../contrib/curl/lib/vtls/gtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mbedtls.o: ../../contrib/curl/lib/vtls/mbedtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nss.o: ../../contrib/curl/lib/vtls/nss.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/openssl.o: ../../contrib/curl/lib/vtls/openssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/polarssl.o: ../../contrib/curl/lib/vtls/polarssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/polarssl_threadlock.o: ../../contrib/curl/lib/vtls/polarssl_threadlock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/schannel.o: ../../contrib/curl/lib/vtls/schannel.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/vtls.o: ../../contrib/curl/lib/vtls/vtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/warnless.o: ../../contrib/curl/lib/warnless.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/wildcard.o: ../../contrib/curl/lib/wildcard.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509asn1.o: ../../contrib/curl/lib/x509asn1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/example.make b/build/premake/premake5/build/gmake2.bsd/example.make deleted file mode 100644 index 4dc7a917f3..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/example.make +++ /dev/null @@ -1,140 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/example.so -OBJDIR = obj/Release/example -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/libluashim-lib.a -LDDEPS += bin/Release/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared -s - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/example.so -OBJDIR = obj/Debug/example -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -LIBS += bin/Debug/libluashim-lib.a -LDDEPS += bin/Debug/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/main.o -OBJECTS += $(OBJDIR)/main.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking example - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning example -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/main.o: ../../binmodules/example/main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/lua-lib.make b/build/premake/premake5/build/gmake2.bsd/lua-lib.make deleted file mode 100644 index 90d87a8dcf..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/lua-lib.make +++ /dev/null @@ -1,293 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/liblua-lib.a -OBJDIR = obj/Release/lua-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/liblua-lib.a -OBJDIR = obj/Debug/lua-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/lapi.o -GENERATED += $(OBJDIR)/lbaselib.o -GENERATED += $(OBJDIR)/lbitlib.o -GENERATED += $(OBJDIR)/lcode.o -GENERATED += $(OBJDIR)/lcorolib.o -GENERATED += $(OBJDIR)/lctype.o -GENERATED += $(OBJDIR)/ldblib.o -GENERATED += $(OBJDIR)/ldebug.o -GENERATED += $(OBJDIR)/ldo.o -GENERATED += $(OBJDIR)/ldump.o -GENERATED += $(OBJDIR)/lfunc.o -GENERATED += $(OBJDIR)/lgc.o -GENERATED += $(OBJDIR)/linit.o -GENERATED += $(OBJDIR)/liolib.o -GENERATED += $(OBJDIR)/llex.o -GENERATED += $(OBJDIR)/lmathlib.o -GENERATED += $(OBJDIR)/lmem.o -GENERATED += $(OBJDIR)/loadlib.o -GENERATED += $(OBJDIR)/lobject.o -GENERATED += $(OBJDIR)/lopcodes.o -GENERATED += $(OBJDIR)/loslib.o -GENERATED += $(OBJDIR)/lparser.o -GENERATED += $(OBJDIR)/lstate.o -GENERATED += $(OBJDIR)/lstring.o -GENERATED += $(OBJDIR)/lstrlib.o -GENERATED += $(OBJDIR)/ltable.o -GENERATED += $(OBJDIR)/ltablib.o -GENERATED += $(OBJDIR)/ltm.o -GENERATED += $(OBJDIR)/lundump.o -GENERATED += $(OBJDIR)/lutf8lib.o -GENERATED += $(OBJDIR)/lvm.o -GENERATED += $(OBJDIR)/lzio.o -OBJECTS += $(OBJDIR)/lapi.o -OBJECTS += $(OBJDIR)/lbaselib.o -OBJECTS += $(OBJDIR)/lbitlib.o -OBJECTS += $(OBJDIR)/lcode.o -OBJECTS += $(OBJDIR)/lcorolib.o -OBJECTS += $(OBJDIR)/lctype.o -OBJECTS += $(OBJDIR)/ldblib.o -OBJECTS += $(OBJDIR)/ldebug.o -OBJECTS += $(OBJDIR)/ldo.o -OBJECTS += $(OBJDIR)/ldump.o -OBJECTS += $(OBJDIR)/lfunc.o -OBJECTS += $(OBJDIR)/lgc.o -OBJECTS += $(OBJDIR)/linit.o -OBJECTS += $(OBJDIR)/liolib.o -OBJECTS += $(OBJDIR)/llex.o -OBJECTS += $(OBJDIR)/lmathlib.o -OBJECTS += $(OBJDIR)/lmem.o -OBJECTS += $(OBJDIR)/loadlib.o -OBJECTS += $(OBJDIR)/lobject.o -OBJECTS += $(OBJDIR)/lopcodes.o -OBJECTS += $(OBJDIR)/loslib.o -OBJECTS += $(OBJDIR)/lparser.o -OBJECTS += $(OBJDIR)/lstate.o -OBJECTS += $(OBJDIR)/lstring.o -OBJECTS += $(OBJDIR)/lstrlib.o -OBJECTS += $(OBJDIR)/ltable.o -OBJECTS += $(OBJDIR)/ltablib.o -OBJECTS += $(OBJDIR)/ltm.o -OBJECTS += $(OBJDIR)/lundump.o -OBJECTS += $(OBJDIR)/lutf8lib.o -OBJECTS += $(OBJDIR)/lvm.o -OBJECTS += $(OBJDIR)/lzio.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking lua-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning lua-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/lapi.o: ../../contrib/lua/src/lapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lbaselib.o: ../../contrib/lua/src/lbaselib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lbitlib.o: ../../contrib/lua/src/lbitlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lcode.o: ../../contrib/lua/src/lcode.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lcorolib.o: ../../contrib/lua/src/lcorolib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lctype.o: ../../contrib/lua/src/lctype.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldblib.o: ../../contrib/lua/src/ldblib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldebug.o: ../../contrib/lua/src/ldebug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldo.o: ../../contrib/lua/src/ldo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldump.o: ../../contrib/lua/src/ldump.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lfunc.o: ../../contrib/lua/src/lfunc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lgc.o: ../../contrib/lua/src/lgc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/linit.o: ../../contrib/lua/src/linit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/liolib.o: ../../contrib/lua/src/liolib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/llex.o: ../../contrib/lua/src/llex.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lmathlib.o: ../../contrib/lua/src/lmathlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lmem.o: ../../contrib/lua/src/lmem.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/loadlib.o: ../../contrib/lua/src/loadlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lobject.o: ../../contrib/lua/src/lobject.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lopcodes.o: ../../contrib/lua/src/lopcodes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/loslib.o: ../../contrib/lua/src/loslib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lparser.o: ../../contrib/lua/src/lparser.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstate.o: ../../contrib/lua/src/lstate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstring.o: ../../contrib/lua/src/lstring.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstrlib.o: ../../contrib/lua/src/lstrlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltable.o: ../../contrib/lua/src/ltable.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltablib.o: ../../contrib/lua/src/ltablib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltm.o: ../../contrib/lua/src/ltm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lundump.o: ../../contrib/lua/src/lundump.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lutf8lib.o: ../../contrib/lua/src/lutf8lib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lvm.o: ../../contrib/lua/src/lvm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lzio.o: ../../contrib/lua/src/lzio.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/luashim-lib.make b/build/premake/premake5/build/gmake2.bsd/luashim-lib.make deleted file mode 100644 index 342a7c60df..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/luashim-lib.make +++ /dev/null @@ -1,138 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libluashim-lib.a -OBJDIR = obj/Release/luashim-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libluashim-lib.a -OBJDIR = obj/Debug/luashim-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/luashim.o -OBJECTS += $(OBJDIR)/luashim.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking luashim-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning luashim-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/luashim.o: ../../contrib/luashim/luashim.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/luasocket.make b/build/premake/premake5/build/gmake2.bsd/luasocket.make deleted file mode 100644 index fb76281084..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/luasocket.make +++ /dev/null @@ -1,230 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/libluasocket.so -OBJDIR = obj/Release/luasocket -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUASOCKET_API=__attribute__\(\(visibility\(\"default\"\)\)\) -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/libluashim-lib.a -LDDEPS += bin/Release/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared -s - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/libluasocket.so -OBJDIR = obj/Debug/luasocket -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUASOCKET_API=__attribute__\(\(visibility\(\"default\"\)\)\) -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -LIBS += bin/Debug/libluashim-lib.a -LDDEPS += bin/Debug/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/auxiliar.o -GENERATED += $(OBJDIR)/buffer.o -GENERATED += $(OBJDIR)/compat.o -GENERATED += $(OBJDIR)/except.o -GENERATED += $(OBJDIR)/inet.o -GENERATED += $(OBJDIR)/io.o -GENERATED += $(OBJDIR)/luasocket.o -GENERATED += $(OBJDIR)/main.o -GENERATED += $(OBJDIR)/mime.o -GENERATED += $(OBJDIR)/options.o -GENERATED += $(OBJDIR)/select.o -GENERATED += $(OBJDIR)/serial.o -GENERATED += $(OBJDIR)/tcp.o -GENERATED += $(OBJDIR)/timeout.o -GENERATED += $(OBJDIR)/udp.o -GENERATED += $(OBJDIR)/unix.o -GENERATED += $(OBJDIR)/unixdgram.o -GENERATED += $(OBJDIR)/unixstream.o -GENERATED += $(OBJDIR)/usocket.o -OBJECTS += $(OBJDIR)/auxiliar.o -OBJECTS += $(OBJDIR)/buffer.o -OBJECTS += $(OBJDIR)/compat.o -OBJECTS += $(OBJDIR)/except.o -OBJECTS += $(OBJDIR)/inet.o -OBJECTS += $(OBJDIR)/io.o -OBJECTS += $(OBJDIR)/luasocket.o -OBJECTS += $(OBJDIR)/main.o -OBJECTS += $(OBJDIR)/mime.o -OBJECTS += $(OBJDIR)/options.o -OBJECTS += $(OBJDIR)/select.o -OBJECTS += $(OBJDIR)/serial.o -OBJECTS += $(OBJDIR)/tcp.o -OBJECTS += $(OBJDIR)/timeout.o -OBJECTS += $(OBJDIR)/udp.o -OBJECTS += $(OBJDIR)/unix.o -OBJECTS += $(OBJDIR)/unixdgram.o -OBJECTS += $(OBJDIR)/unixstream.o -OBJECTS += $(OBJDIR)/usocket.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking luasocket - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning luasocket -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/main.o: ../../binmodules/luasocket/main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/auxiliar.o: ../../binmodules/luasocket/src/auxiliar.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/buffer.o: ../../binmodules/luasocket/src/buffer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/compat.o: ../../binmodules/luasocket/src/compat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/except.o: ../../binmodules/luasocket/src/except.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet.o: ../../binmodules/luasocket/src/inet.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/io.o: ../../binmodules/luasocket/src/io.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/luasocket.o: ../../binmodules/luasocket/src/luasocket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mime.o: ../../binmodules/luasocket/src/mime.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/options.o: ../../binmodules/luasocket/src/options.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/select.o: ../../binmodules/luasocket/src/select.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/serial.o: ../../binmodules/luasocket/src/serial.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/tcp.o: ../../binmodules/luasocket/src/tcp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timeout.o: ../../binmodules/luasocket/src/timeout.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/udp.o: ../../binmodules/luasocket/src/udp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unix.o: ../../binmodules/luasocket/src/unix.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unixdgram.o: ../../binmodules/luasocket/src/unixdgram.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unixstream.o: ../../binmodules/luasocket/src/unixstream.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/usocket.o: ../../binmodules/luasocket/src/usocket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/mbedtls-lib.make b/build/premake/premake5/build/gmake2.bsd/mbedtls-lib.make deleted file mode 100644 index 4a930d1c40..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/mbedtls-lib.make +++ /dev/null @@ -1,483 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/mbedtls/include -I../../contrib/zlib -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libmbedtls-lib.a -OBJDIR = obj/Release/mbedtls-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DMBEDTLS_ZLIB_SUPPORT -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libmbedtls-lib.a -OBJDIR = obj/Debug/mbedtls-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DMBEDTLS_ZLIB_SUPPORT -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/aes.o -GENERATED += $(OBJDIR)/aesni.o -GENERATED += $(OBJDIR)/arc4.o -GENERATED += $(OBJDIR)/asn1parse.o -GENERATED += $(OBJDIR)/asn1write.o -GENERATED += $(OBJDIR)/base64.o -GENERATED += $(OBJDIR)/bignum.o -GENERATED += $(OBJDIR)/blowfish.o -GENERATED += $(OBJDIR)/camellia.o -GENERATED += $(OBJDIR)/ccm.o -GENERATED += $(OBJDIR)/certs.o -GENERATED += $(OBJDIR)/cipher.o -GENERATED += $(OBJDIR)/cipher_wrap.o -GENERATED += $(OBJDIR)/ctr_drbg.o -GENERATED += $(OBJDIR)/debug.o -GENERATED += $(OBJDIR)/des.o -GENERATED += $(OBJDIR)/dhm.o -GENERATED += $(OBJDIR)/ecdh.o -GENERATED += $(OBJDIR)/ecdsa.o -GENERATED += $(OBJDIR)/ecjpake.o -GENERATED += $(OBJDIR)/ecp.o -GENERATED += $(OBJDIR)/ecp_curves.o -GENERATED += $(OBJDIR)/entropy.o -GENERATED += $(OBJDIR)/entropy_poll.o -GENERATED += $(OBJDIR)/error.o -GENERATED += $(OBJDIR)/gcm.o -GENERATED += $(OBJDIR)/havege.o -GENERATED += $(OBJDIR)/hmac_drbg.o -GENERATED += $(OBJDIR)/md.o -GENERATED += $(OBJDIR)/md2.o -GENERATED += $(OBJDIR)/md4.o -GENERATED += $(OBJDIR)/md5.o -GENERATED += $(OBJDIR)/md_wrap.o -GENERATED += $(OBJDIR)/memory_buffer_alloc.o -GENERATED += $(OBJDIR)/net.o -GENERATED += $(OBJDIR)/oid.o -GENERATED += $(OBJDIR)/padlock.o -GENERATED += $(OBJDIR)/pem.o -GENERATED += $(OBJDIR)/pk.o -GENERATED += $(OBJDIR)/pk_wrap.o -GENERATED += $(OBJDIR)/pkcs11.o -GENERATED += $(OBJDIR)/pkcs12.o -GENERATED += $(OBJDIR)/pkcs5.o -GENERATED += $(OBJDIR)/pkparse.o -GENERATED += $(OBJDIR)/pkwrite.o -GENERATED += $(OBJDIR)/platform.o -GENERATED += $(OBJDIR)/ripemd160.o -GENERATED += $(OBJDIR)/rsa.o -GENERATED += $(OBJDIR)/sha1.o -GENERATED += $(OBJDIR)/sha256.o -GENERATED += $(OBJDIR)/sha512.o -GENERATED += $(OBJDIR)/ssl_cache.o -GENERATED += $(OBJDIR)/ssl_ciphersuites.o -GENERATED += $(OBJDIR)/ssl_cli.o -GENERATED += $(OBJDIR)/ssl_cookie.o -GENERATED += $(OBJDIR)/ssl_srv.o -GENERATED += $(OBJDIR)/ssl_ticket.o -GENERATED += $(OBJDIR)/ssl_tls.o -GENERATED += $(OBJDIR)/threading.o -GENERATED += $(OBJDIR)/timing.o -GENERATED += $(OBJDIR)/version.o -GENERATED += $(OBJDIR)/version_features.o -GENERATED += $(OBJDIR)/x509.o -GENERATED += $(OBJDIR)/x509_create.o -GENERATED += $(OBJDIR)/x509_crl.o -GENERATED += $(OBJDIR)/x509_crt.o -GENERATED += $(OBJDIR)/x509_csr.o -GENERATED += $(OBJDIR)/x509write_crt.o -GENERATED += $(OBJDIR)/x509write_csr.o -GENERATED += $(OBJDIR)/xtea.o -OBJECTS += $(OBJDIR)/aes.o -OBJECTS += $(OBJDIR)/aesni.o -OBJECTS += $(OBJDIR)/arc4.o -OBJECTS += $(OBJDIR)/asn1parse.o -OBJECTS += $(OBJDIR)/asn1write.o -OBJECTS += $(OBJDIR)/base64.o -OBJECTS += $(OBJDIR)/bignum.o -OBJECTS += $(OBJDIR)/blowfish.o -OBJECTS += $(OBJDIR)/camellia.o -OBJECTS += $(OBJDIR)/ccm.o -OBJECTS += $(OBJDIR)/certs.o -OBJECTS += $(OBJDIR)/cipher.o -OBJECTS += $(OBJDIR)/cipher_wrap.o -OBJECTS += $(OBJDIR)/ctr_drbg.o -OBJECTS += $(OBJDIR)/debug.o -OBJECTS += $(OBJDIR)/des.o -OBJECTS += $(OBJDIR)/dhm.o -OBJECTS += $(OBJDIR)/ecdh.o -OBJECTS += $(OBJDIR)/ecdsa.o -OBJECTS += $(OBJDIR)/ecjpake.o -OBJECTS += $(OBJDIR)/ecp.o -OBJECTS += $(OBJDIR)/ecp_curves.o -OBJECTS += $(OBJDIR)/entropy.o -OBJECTS += $(OBJDIR)/entropy_poll.o -OBJECTS += $(OBJDIR)/error.o -OBJECTS += $(OBJDIR)/gcm.o -OBJECTS += $(OBJDIR)/havege.o -OBJECTS += $(OBJDIR)/hmac_drbg.o -OBJECTS += $(OBJDIR)/md.o -OBJECTS += $(OBJDIR)/md2.o -OBJECTS += $(OBJDIR)/md4.o -OBJECTS += $(OBJDIR)/md5.o -OBJECTS += $(OBJDIR)/md_wrap.o -OBJECTS += $(OBJDIR)/memory_buffer_alloc.o -OBJECTS += $(OBJDIR)/net.o -OBJECTS += $(OBJDIR)/oid.o -OBJECTS += $(OBJDIR)/padlock.o -OBJECTS += $(OBJDIR)/pem.o -OBJECTS += $(OBJDIR)/pk.o -OBJECTS += $(OBJDIR)/pk_wrap.o -OBJECTS += $(OBJDIR)/pkcs11.o -OBJECTS += $(OBJDIR)/pkcs12.o -OBJECTS += $(OBJDIR)/pkcs5.o -OBJECTS += $(OBJDIR)/pkparse.o -OBJECTS += $(OBJDIR)/pkwrite.o -OBJECTS += $(OBJDIR)/platform.o -OBJECTS += $(OBJDIR)/ripemd160.o -OBJECTS += $(OBJDIR)/rsa.o -OBJECTS += $(OBJDIR)/sha1.o -OBJECTS += $(OBJDIR)/sha256.o -OBJECTS += $(OBJDIR)/sha512.o -OBJECTS += $(OBJDIR)/ssl_cache.o -OBJECTS += $(OBJDIR)/ssl_ciphersuites.o -OBJECTS += $(OBJDIR)/ssl_cli.o -OBJECTS += $(OBJDIR)/ssl_cookie.o -OBJECTS += $(OBJDIR)/ssl_srv.o -OBJECTS += $(OBJDIR)/ssl_ticket.o -OBJECTS += $(OBJDIR)/ssl_tls.o -OBJECTS += $(OBJDIR)/threading.o -OBJECTS += $(OBJDIR)/timing.o -OBJECTS += $(OBJDIR)/version.o -OBJECTS += $(OBJDIR)/version_features.o -OBJECTS += $(OBJDIR)/x509.o -OBJECTS += $(OBJDIR)/x509_create.o -OBJECTS += $(OBJDIR)/x509_crl.o -OBJECTS += $(OBJDIR)/x509_crt.o -OBJECTS += $(OBJDIR)/x509_csr.o -OBJECTS += $(OBJDIR)/x509write_crt.o -OBJECTS += $(OBJDIR)/x509write_csr.o -OBJECTS += $(OBJDIR)/xtea.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking mbedtls-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning mbedtls-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/aes.o: ../../contrib/mbedtls/library/aes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/aesni.o: ../../contrib/mbedtls/library/aesni.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/arc4.o: ../../contrib/mbedtls/library/arc4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asn1parse.o: ../../contrib/mbedtls/library/asn1parse.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asn1write.o: ../../contrib/mbedtls/library/asn1write.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/base64.o: ../../contrib/mbedtls/library/base64.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/bignum.o: ../../contrib/mbedtls/library/bignum.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/blowfish.o: ../../contrib/mbedtls/library/blowfish.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/camellia.o: ../../contrib/mbedtls/library/camellia.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ccm.o: ../../contrib/mbedtls/library/ccm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/certs.o: ../../contrib/mbedtls/library/certs.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cipher.o: ../../contrib/mbedtls/library/cipher.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cipher_wrap.o: ../../contrib/mbedtls/library/cipher_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ctr_drbg.o: ../../contrib/mbedtls/library/ctr_drbg.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/debug.o: ../../contrib/mbedtls/library/debug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/des.o: ../../contrib/mbedtls/library/des.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dhm.o: ../../contrib/mbedtls/library/dhm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecdh.o: ../../contrib/mbedtls/library/ecdh.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecdsa.o: ../../contrib/mbedtls/library/ecdsa.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecjpake.o: ../../contrib/mbedtls/library/ecjpake.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecp.o: ../../contrib/mbedtls/library/ecp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecp_curves.o: ../../contrib/mbedtls/library/ecp_curves.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/entropy.o: ../../contrib/mbedtls/library/entropy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/entropy_poll.o: ../../contrib/mbedtls/library/entropy_poll.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/error.o: ../../contrib/mbedtls/library/error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gcm.o: ../../contrib/mbedtls/library/gcm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/havege.o: ../../contrib/mbedtls/library/havege.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hmac_drbg.o: ../../contrib/mbedtls/library/hmac_drbg.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md.o: ../../contrib/mbedtls/library/md.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md2.o: ../../contrib/mbedtls/library/md2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md4.o: ../../contrib/mbedtls/library/md4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md5.o: ../../contrib/mbedtls/library/md5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md_wrap.o: ../../contrib/mbedtls/library/md_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/memory_buffer_alloc.o: ../../contrib/mbedtls/library/memory_buffer_alloc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/net.o: ../../contrib/mbedtls/library/net.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/oid.o: ../../contrib/mbedtls/library/oid.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/padlock.o: ../../contrib/mbedtls/library/padlock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pem.o: ../../contrib/mbedtls/library/pem.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pk.o: ../../contrib/mbedtls/library/pk.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pk_wrap.o: ../../contrib/mbedtls/library/pk_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs11.o: ../../contrib/mbedtls/library/pkcs11.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs12.o: ../../contrib/mbedtls/library/pkcs12.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs5.o: ../../contrib/mbedtls/library/pkcs5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkparse.o: ../../contrib/mbedtls/library/pkparse.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkwrite.o: ../../contrib/mbedtls/library/pkwrite.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/platform.o: ../../contrib/mbedtls/library/platform.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ripemd160.o: ../../contrib/mbedtls/library/ripemd160.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rsa.o: ../../contrib/mbedtls/library/rsa.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha1.o: ../../contrib/mbedtls/library/sha1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha256.o: ../../contrib/mbedtls/library/sha256.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha512.o: ../../contrib/mbedtls/library/sha512.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cache.o: ../../contrib/mbedtls/library/ssl_cache.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_ciphersuites.o: ../../contrib/mbedtls/library/ssl_ciphersuites.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cli.o: ../../contrib/mbedtls/library/ssl_cli.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cookie.o: ../../contrib/mbedtls/library/ssl_cookie.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_srv.o: ../../contrib/mbedtls/library/ssl_srv.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_ticket.o: ../../contrib/mbedtls/library/ssl_ticket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_tls.o: ../../contrib/mbedtls/library/ssl_tls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/threading.o: ../../contrib/mbedtls/library/threading.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timing.o: ../../contrib/mbedtls/library/timing.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version.o: ../../contrib/mbedtls/library/version.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version_features.o: ../../contrib/mbedtls/library/version_features.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509.o: ../../contrib/mbedtls/library/x509.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_create.o: ../../contrib/mbedtls/library/x509_create.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_crl.o: ../../contrib/mbedtls/library/x509_crl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_crt.o: ../../contrib/mbedtls/library/x509_crt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_csr.o: ../../contrib/mbedtls/library/x509_csr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509write_crt.o: ../../contrib/mbedtls/library/x509write_crt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509write_csr.o: ../../contrib/mbedtls/library/x509write_csr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/xtea.o: ../../contrib/mbedtls/library/xtea.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/zip-lib.make b/build/premake/premake5/build/gmake2.bsd/zip-lib.make deleted file mode 100644 index 8da1cc3052..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/zip-lib.make +++ /dev/null @@ -1,563 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/libzip/include -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libzip-lib.a -OBJDIR = obj/Release/zip-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DN_FSEEKO -DHAVE_SSIZE_T_LIBZIP -DHAVE_CONFIG_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libzip-lib.a -OBJDIR = obj/Debug/zip-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DN_FSEEKO -DHAVE_SSIZE_T_LIBZIP -DHAVE_CONFIG_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/mkstemp.o -GENERATED += $(OBJDIR)/zip_add.o -GENERATED += $(OBJDIR)/zip_add_dir.o -GENERATED += $(OBJDIR)/zip_add_entry.o -GENERATED += $(OBJDIR)/zip_close.o -GENERATED += $(OBJDIR)/zip_delete.o -GENERATED += $(OBJDIR)/zip_dir_add.o -GENERATED += $(OBJDIR)/zip_dirent.o -GENERATED += $(OBJDIR)/zip_discard.o -GENERATED += $(OBJDIR)/zip_entry.o -GENERATED += $(OBJDIR)/zip_err_str.o -GENERATED += $(OBJDIR)/zip_error.o -GENERATED += $(OBJDIR)/zip_error_clear.o -GENERATED += $(OBJDIR)/zip_error_get.o -GENERATED += $(OBJDIR)/zip_error_get_sys_type.o -GENERATED += $(OBJDIR)/zip_error_strerror.o -GENERATED += $(OBJDIR)/zip_error_to_str.o -GENERATED += $(OBJDIR)/zip_extra_field.o -GENERATED += $(OBJDIR)/zip_extra_field_api.o -GENERATED += $(OBJDIR)/zip_fclose.o -GENERATED += $(OBJDIR)/zip_fdopen.o -GENERATED += $(OBJDIR)/zip_file_add.o -GENERATED += $(OBJDIR)/zip_file_error_clear.o -GENERATED += $(OBJDIR)/zip_file_error_get.o -GENERATED += $(OBJDIR)/zip_file_get_comment.o -GENERATED += $(OBJDIR)/zip_file_get_external_attributes.o -GENERATED += $(OBJDIR)/zip_file_get_offset.o -GENERATED += $(OBJDIR)/zip_file_rename.o -GENERATED += $(OBJDIR)/zip_file_replace.o -GENERATED += $(OBJDIR)/zip_file_set_comment.o -GENERATED += $(OBJDIR)/zip_file_set_external_attributes.o -GENERATED += $(OBJDIR)/zip_file_strerror.o -GENERATED += $(OBJDIR)/zip_filerange_crc.o -GENERATED += $(OBJDIR)/zip_fopen.o -GENERATED += $(OBJDIR)/zip_fopen_encrypted.o -GENERATED += $(OBJDIR)/zip_fopen_index.o -GENERATED += $(OBJDIR)/zip_fopen_index_encrypted.o -GENERATED += $(OBJDIR)/zip_fread.o -GENERATED += $(OBJDIR)/zip_get_archive_comment.o -GENERATED += $(OBJDIR)/zip_get_archive_flag.o -GENERATED += $(OBJDIR)/zip_get_compression_implementation.o -GENERATED += $(OBJDIR)/zip_get_encryption_implementation.o -GENERATED += $(OBJDIR)/zip_get_file_comment.o -GENERATED += $(OBJDIR)/zip_get_name.o -GENERATED += $(OBJDIR)/zip_get_num_entries.o -GENERATED += $(OBJDIR)/zip_get_num_files.o -GENERATED += $(OBJDIR)/zip_memdup.o -GENERATED += $(OBJDIR)/zip_name_locate.o -GENERATED += $(OBJDIR)/zip_new.o -GENERATED += $(OBJDIR)/zip_open.o -GENERATED += $(OBJDIR)/zip_rename.o -GENERATED += $(OBJDIR)/zip_replace.o -GENERATED += $(OBJDIR)/zip_set_archive_comment.o -GENERATED += $(OBJDIR)/zip_set_archive_flag.o -GENERATED += $(OBJDIR)/zip_set_default_password.o -GENERATED += $(OBJDIR)/zip_set_file_comment.o -GENERATED += $(OBJDIR)/zip_set_file_compression.o -GENERATED += $(OBJDIR)/zip_set_name.o -GENERATED += $(OBJDIR)/zip_source_buffer.o -GENERATED += $(OBJDIR)/zip_source_close.o -GENERATED += $(OBJDIR)/zip_source_crc.o -GENERATED += $(OBJDIR)/zip_source_deflate.o -GENERATED += $(OBJDIR)/zip_source_error.o -GENERATED += $(OBJDIR)/zip_source_file.o -GENERATED += $(OBJDIR)/zip_source_filep.o -GENERATED += $(OBJDIR)/zip_source_free.o -GENERATED += $(OBJDIR)/zip_source_function.o -GENERATED += $(OBJDIR)/zip_source_layered.o -GENERATED += $(OBJDIR)/zip_source_open.o -GENERATED += $(OBJDIR)/zip_source_pkware.o -GENERATED += $(OBJDIR)/zip_source_pop.o -GENERATED += $(OBJDIR)/zip_source_read.o -GENERATED += $(OBJDIR)/zip_source_stat.o -GENERATED += $(OBJDIR)/zip_source_window.o -GENERATED += $(OBJDIR)/zip_source_zip.o -GENERATED += $(OBJDIR)/zip_source_zip_new.o -GENERATED += $(OBJDIR)/zip_stat.o -GENERATED += $(OBJDIR)/zip_stat_index.o -GENERATED += $(OBJDIR)/zip_stat_init.o -GENERATED += $(OBJDIR)/zip_strerror.o -GENERATED += $(OBJDIR)/zip_string.o -GENERATED += $(OBJDIR)/zip_unchange.o -GENERATED += $(OBJDIR)/zip_unchange_all.o -GENERATED += $(OBJDIR)/zip_unchange_archive.o -GENERATED += $(OBJDIR)/zip_unchange_data.o -GENERATED += $(OBJDIR)/zip_utf-8.o -OBJECTS += $(OBJDIR)/mkstemp.o -OBJECTS += $(OBJDIR)/zip_add.o -OBJECTS += $(OBJDIR)/zip_add_dir.o -OBJECTS += $(OBJDIR)/zip_add_entry.o -OBJECTS += $(OBJDIR)/zip_close.o -OBJECTS += $(OBJDIR)/zip_delete.o -OBJECTS += $(OBJDIR)/zip_dir_add.o -OBJECTS += $(OBJDIR)/zip_dirent.o -OBJECTS += $(OBJDIR)/zip_discard.o -OBJECTS += $(OBJDIR)/zip_entry.o -OBJECTS += $(OBJDIR)/zip_err_str.o -OBJECTS += $(OBJDIR)/zip_error.o -OBJECTS += $(OBJDIR)/zip_error_clear.o -OBJECTS += $(OBJDIR)/zip_error_get.o -OBJECTS += $(OBJDIR)/zip_error_get_sys_type.o -OBJECTS += $(OBJDIR)/zip_error_strerror.o -OBJECTS += $(OBJDIR)/zip_error_to_str.o -OBJECTS += $(OBJDIR)/zip_extra_field.o -OBJECTS += $(OBJDIR)/zip_extra_field_api.o -OBJECTS += $(OBJDIR)/zip_fclose.o -OBJECTS += $(OBJDIR)/zip_fdopen.o -OBJECTS += $(OBJDIR)/zip_file_add.o -OBJECTS += $(OBJDIR)/zip_file_error_clear.o -OBJECTS += $(OBJDIR)/zip_file_error_get.o -OBJECTS += $(OBJDIR)/zip_file_get_comment.o -OBJECTS += $(OBJDIR)/zip_file_get_external_attributes.o -OBJECTS += $(OBJDIR)/zip_file_get_offset.o -OBJECTS += $(OBJDIR)/zip_file_rename.o -OBJECTS += $(OBJDIR)/zip_file_replace.o -OBJECTS += $(OBJDIR)/zip_file_set_comment.o -OBJECTS += $(OBJDIR)/zip_file_set_external_attributes.o -OBJECTS += $(OBJDIR)/zip_file_strerror.o -OBJECTS += $(OBJDIR)/zip_filerange_crc.o -OBJECTS += $(OBJDIR)/zip_fopen.o -OBJECTS += $(OBJDIR)/zip_fopen_encrypted.o -OBJECTS += $(OBJDIR)/zip_fopen_index.o -OBJECTS += $(OBJDIR)/zip_fopen_index_encrypted.o -OBJECTS += $(OBJDIR)/zip_fread.o -OBJECTS += $(OBJDIR)/zip_get_archive_comment.o -OBJECTS += $(OBJDIR)/zip_get_archive_flag.o -OBJECTS += $(OBJDIR)/zip_get_compression_implementation.o -OBJECTS += $(OBJDIR)/zip_get_encryption_implementation.o -OBJECTS += $(OBJDIR)/zip_get_file_comment.o -OBJECTS += $(OBJDIR)/zip_get_name.o -OBJECTS += $(OBJDIR)/zip_get_num_entries.o -OBJECTS += $(OBJDIR)/zip_get_num_files.o -OBJECTS += $(OBJDIR)/zip_memdup.o -OBJECTS += $(OBJDIR)/zip_name_locate.o -OBJECTS += $(OBJDIR)/zip_new.o -OBJECTS += $(OBJDIR)/zip_open.o -OBJECTS += $(OBJDIR)/zip_rename.o -OBJECTS += $(OBJDIR)/zip_replace.o -OBJECTS += $(OBJDIR)/zip_set_archive_comment.o -OBJECTS += $(OBJDIR)/zip_set_archive_flag.o -OBJECTS += $(OBJDIR)/zip_set_default_password.o -OBJECTS += $(OBJDIR)/zip_set_file_comment.o -OBJECTS += $(OBJDIR)/zip_set_file_compression.o -OBJECTS += $(OBJDIR)/zip_set_name.o -OBJECTS += $(OBJDIR)/zip_source_buffer.o -OBJECTS += $(OBJDIR)/zip_source_close.o -OBJECTS += $(OBJDIR)/zip_source_crc.o -OBJECTS += $(OBJDIR)/zip_source_deflate.o -OBJECTS += $(OBJDIR)/zip_source_error.o -OBJECTS += $(OBJDIR)/zip_source_file.o -OBJECTS += $(OBJDIR)/zip_source_filep.o -OBJECTS += $(OBJDIR)/zip_source_free.o -OBJECTS += $(OBJDIR)/zip_source_function.o -OBJECTS += $(OBJDIR)/zip_source_layered.o -OBJECTS += $(OBJDIR)/zip_source_open.o -OBJECTS += $(OBJDIR)/zip_source_pkware.o -OBJECTS += $(OBJDIR)/zip_source_pop.o -OBJECTS += $(OBJDIR)/zip_source_read.o -OBJECTS += $(OBJDIR)/zip_source_stat.o -OBJECTS += $(OBJDIR)/zip_source_window.o -OBJECTS += $(OBJDIR)/zip_source_zip.o -OBJECTS += $(OBJDIR)/zip_source_zip_new.o -OBJECTS += $(OBJDIR)/zip_stat.o -OBJECTS += $(OBJDIR)/zip_stat_index.o -OBJECTS += $(OBJDIR)/zip_stat_init.o -OBJECTS += $(OBJDIR)/zip_strerror.o -OBJECTS += $(OBJDIR)/zip_string.o -OBJECTS += $(OBJDIR)/zip_unchange.o -OBJECTS += $(OBJDIR)/zip_unchange_all.o -OBJECTS += $(OBJDIR)/zip_unchange_archive.o -OBJECTS += $(OBJDIR)/zip_unchange_data.o -OBJECTS += $(OBJDIR)/zip_utf-8.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking zip-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning zip-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/mkstemp.o: ../../contrib/libzip/mkstemp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add.o: ../../contrib/libzip/zip_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add_dir.o: ../../contrib/libzip/zip_add_dir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add_entry.o: ../../contrib/libzip/zip_add_entry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_close.o: ../../contrib/libzip/zip_close.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_delete.o: ../../contrib/libzip/zip_delete.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_dir_add.o: ../../contrib/libzip/zip_dir_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_dirent.o: ../../contrib/libzip/zip_dirent.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_discard.o: ../../contrib/libzip/zip_discard.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_entry.o: ../../contrib/libzip/zip_entry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_err_str.o: ../../contrib/libzip/zip_err_str.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error.o: ../../contrib/libzip/zip_error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_clear.o: ../../contrib/libzip/zip_error_clear.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_get.o: ../../contrib/libzip/zip_error_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_get_sys_type.o: ../../contrib/libzip/zip_error_get_sys_type.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_strerror.o: ../../contrib/libzip/zip_error_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_to_str.o: ../../contrib/libzip/zip_error_to_str.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extra_field.o: ../../contrib/libzip/zip_extra_field.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extra_field_api.o: ../../contrib/libzip/zip_extra_field_api.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fclose.o: ../../contrib/libzip/zip_fclose.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fdopen.o: ../../contrib/libzip/zip_fdopen.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_add.o: ../../contrib/libzip/zip_file_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_error_clear.o: ../../contrib/libzip/zip_file_error_clear.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_error_get.o: ../../contrib/libzip/zip_file_error_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_comment.o: ../../contrib/libzip/zip_file_get_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_external_attributes.o: ../../contrib/libzip/zip_file_get_external_attributes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_offset.o: ../../contrib/libzip/zip_file_get_offset.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_rename.o: ../../contrib/libzip/zip_file_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_replace.o: ../../contrib/libzip/zip_file_replace.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_set_comment.o: ../../contrib/libzip/zip_file_set_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_set_external_attributes.o: ../../contrib/libzip/zip_file_set_external_attributes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_strerror.o: ../../contrib/libzip/zip_file_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_filerange_crc.o: ../../contrib/libzip/zip_filerange_crc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen.o: ../../contrib/libzip/zip_fopen.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_encrypted.o: ../../contrib/libzip/zip_fopen_encrypted.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_index.o: ../../contrib/libzip/zip_fopen_index.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_index_encrypted.o: ../../contrib/libzip/zip_fopen_index_encrypted.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fread.o: ../../contrib/libzip/zip_fread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_archive_comment.o: ../../contrib/libzip/zip_get_archive_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_archive_flag.o: ../../contrib/libzip/zip_get_archive_flag.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_compression_implementation.o: ../../contrib/libzip/zip_get_compression_implementation.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_encryption_implementation.o: ../../contrib/libzip/zip_get_encryption_implementation.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_file_comment.o: ../../contrib/libzip/zip_get_file_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_name.o: ../../contrib/libzip/zip_get_name.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_num_entries.o: ../../contrib/libzip/zip_get_num_entries.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_num_files.o: ../../contrib/libzip/zip_get_num_files.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_memdup.o: ../../contrib/libzip/zip_memdup.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_name_locate.o: ../../contrib/libzip/zip_name_locate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_new.o: ../../contrib/libzip/zip_new.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_open.o: ../../contrib/libzip/zip_open.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_rename.o: ../../contrib/libzip/zip_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_replace.o: ../../contrib/libzip/zip_replace.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_archive_comment.o: ../../contrib/libzip/zip_set_archive_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_archive_flag.o: ../../contrib/libzip/zip_set_archive_flag.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_default_password.o: ../../contrib/libzip/zip_set_default_password.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_file_comment.o: ../../contrib/libzip/zip_set_file_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_file_compression.o: ../../contrib/libzip/zip_set_file_compression.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_name.o: ../../contrib/libzip/zip_set_name.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_buffer.o: ../../contrib/libzip/zip_source_buffer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_close.o: ../../contrib/libzip/zip_source_close.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_crc.o: ../../contrib/libzip/zip_source_crc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_deflate.o: ../../contrib/libzip/zip_source_deflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_error.o: ../../contrib/libzip/zip_source_error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_file.o: ../../contrib/libzip/zip_source_file.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_filep.o: ../../contrib/libzip/zip_source_filep.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_free.o: ../../contrib/libzip/zip_source_free.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_function.o: ../../contrib/libzip/zip_source_function.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_layered.o: ../../contrib/libzip/zip_source_layered.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_open.o: ../../contrib/libzip/zip_source_open.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_pkware.o: ../../contrib/libzip/zip_source_pkware.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_pop.o: ../../contrib/libzip/zip_source_pop.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_read.o: ../../contrib/libzip/zip_source_read.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_stat.o: ../../contrib/libzip/zip_source_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_window.o: ../../contrib/libzip/zip_source_window.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_zip.o: ../../contrib/libzip/zip_source_zip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_zip_new.o: ../../contrib/libzip/zip_source_zip_new.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat.o: ../../contrib/libzip/zip_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat_index.o: ../../contrib/libzip/zip_stat_index.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat_init.o: ../../contrib/libzip/zip_stat_init.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_strerror.o: ../../contrib/libzip/zip_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_string.o: ../../contrib/libzip/zip_string.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange.o: ../../contrib/libzip/zip_unchange.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_all.o: ../../contrib/libzip/zip_unchange_all.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_archive.o: ../../contrib/libzip/zip_unchange_archive.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_data.o: ../../contrib/libzip/zip_unchange_data.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_utf-8.o: ../../contrib/libzip/zip_utf-8.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.bsd/zlib-lib.make b/build/premake/premake5/build/gmake2.bsd/zlib-lib.make deleted file mode 100644 index 668999ece1..0000000000 --- a/build/premake/premake5/build/gmake2.bsd/zlib-lib.make +++ /dev/null @@ -1,208 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libzlib-lib.a -OBJDIR = obj/Release/zlib-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DN_FSEEKO -DHAVE_UNISTD_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libzlib-lib.a -OBJDIR = obj/Debug/zlib-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DN_FSEEKO -DHAVE_UNISTD_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/adler32.o -GENERATED += $(OBJDIR)/compress.o -GENERATED += $(OBJDIR)/crc32.o -GENERATED += $(OBJDIR)/deflate.o -GENERATED += $(OBJDIR)/gzclose.o -GENERATED += $(OBJDIR)/gzlib.o -GENERATED += $(OBJDIR)/gzread.o -GENERATED += $(OBJDIR)/gzwrite.o -GENERATED += $(OBJDIR)/infback.o -GENERATED += $(OBJDIR)/inffast.o -GENERATED += $(OBJDIR)/inflate.o -GENERATED += $(OBJDIR)/inftrees.o -GENERATED += $(OBJDIR)/trees.o -GENERATED += $(OBJDIR)/uncompr.o -GENERATED += $(OBJDIR)/zutil.o -OBJECTS += $(OBJDIR)/adler32.o -OBJECTS += $(OBJDIR)/compress.o -OBJECTS += $(OBJDIR)/crc32.o -OBJECTS += $(OBJDIR)/deflate.o -OBJECTS += $(OBJDIR)/gzclose.o -OBJECTS += $(OBJDIR)/gzlib.o -OBJECTS += $(OBJDIR)/gzread.o -OBJECTS += $(OBJDIR)/gzwrite.o -OBJECTS += $(OBJDIR)/infback.o -OBJECTS += $(OBJDIR)/inffast.o -OBJECTS += $(OBJDIR)/inflate.o -OBJECTS += $(OBJDIR)/inftrees.o -OBJECTS += $(OBJDIR)/trees.o -OBJECTS += $(OBJDIR)/uncompr.o -OBJECTS += $(OBJDIR)/zutil.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking zlib-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning zlib-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/adler32.o: ../../contrib/zlib/adler32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/compress.o: ../../contrib/zlib/compress.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/crc32.o: ../../contrib/zlib/crc32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/deflate.o: ../../contrib/zlib/deflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzclose.o: ../../contrib/zlib/gzclose.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzlib.o: ../../contrib/zlib/gzlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzread.o: ../../contrib/zlib/gzread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzwrite.o: ../../contrib/zlib/gzwrite.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/infback.o: ../../contrib/zlib/infback.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inffast.o: ../../contrib/zlib/inffast.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inflate.o: ../../contrib/zlib/inflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inftrees.o: ../../contrib/zlib/inftrees.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/trees.o: ../../contrib/zlib/trees.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/uncompr.o: ../../contrib/zlib/uncompr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zutil.o: ../../contrib/zlib/zutil.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/Makefile b/build/premake/premake5/build/gmake2.macosx/Makefile deleted file mode 100644 index 99492152c4..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -# Alternative GNU Make workspace makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -ifeq ($(config),release) - Premake5_config = release - lua_lib_config = release - luashim_lib_config = release - zlib_lib_config = release - zip_lib_config = release - mbedtls_lib_config = release - curl_lib_config = release - example_config = release - luasocket_config = release - -else ifeq ($(config),debug) - Premake5_config = debug - lua_lib_config = debug - luashim_lib_config = debug - zlib_lib_config = debug - zip_lib_config = debug - mbedtls_lib_config = debug - curl_lib_config = debug - example_config = debug - luasocket_config = debug - -else - $(error "invalid configuration $(config)") -endif - -PROJECTS := Premake5 lua-lib luashim-lib zlib-lib zip-lib mbedtls-lib curl-lib example luasocket - -.PHONY: all clean help $(PROJECTS) Binary Modules contrib - -all: $(PROJECTS) - -Binary Modules: example luasocket - -contrib: curl-lib lua-lib luashim-lib mbedtls-lib zip-lib zlib-lib - -Premake5: lua-lib zip-lib zlib-lib curl-lib -ifneq (,$(Premake5_config)) - @echo "==== Building Premake5 ($(Premake5_config)) ====" - @${MAKE} --no-print-directory -C . -f Premake5.make config=$(Premake5_config) -endif - -lua-lib: -ifneq (,$(lua_lib_config)) - @echo "==== Building lua-lib ($(lua_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f lua-lib.make config=$(lua_lib_config) -endif - -luashim-lib: -ifneq (,$(luashim_lib_config)) - @echo "==== Building luashim-lib ($(luashim_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f luashim-lib.make config=$(luashim_lib_config) -endif - -zlib-lib: -ifneq (,$(zlib_lib_config)) - @echo "==== Building zlib-lib ($(zlib_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f zlib-lib.make config=$(zlib_lib_config) -endif - -zip-lib: -ifneq (,$(zip_lib_config)) - @echo "==== Building zip-lib ($(zip_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f zip-lib.make config=$(zip_lib_config) -endif - -mbedtls-lib: -ifneq (,$(mbedtls_lib_config)) - @echo "==== Building mbedtls-lib ($(mbedtls_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f mbedtls-lib.make config=$(mbedtls_lib_config) -endif - -curl-lib: -ifneq (,$(curl_lib_config)) - @echo "==== Building curl-lib ($(curl_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f curl-lib.make config=$(curl_lib_config) -endif - -example: luashim-lib -ifneq (,$(example_config)) - @echo "==== Building example ($(example_config)) ====" - @${MAKE} --no-print-directory -C . -f example.make config=$(example_config) -endif - -luasocket: luashim-lib -ifneq (,$(luasocket_config)) - @echo "==== Building luasocket ($(luasocket_config)) ====" - @${MAKE} --no-print-directory -C . -f luasocket.make config=$(luasocket_config) -endif - -clean: - @${MAKE} --no-print-directory -C . -f Premake5.make clean - @${MAKE} --no-print-directory -C . -f lua-lib.make clean - @${MAKE} --no-print-directory -C . -f luashim-lib.make clean - @${MAKE} --no-print-directory -C . -f zlib-lib.make clean - @${MAKE} --no-print-directory -C . -f zip-lib.make clean - @${MAKE} --no-print-directory -C . -f mbedtls-lib.make clean - @${MAKE} --no-print-directory -C . -f curl-lib.make clean - @${MAKE} --no-print-directory -C . -f example.make clean - @${MAKE} --no-print-directory -C . -f luasocket.make clean - -help: - @echo "Usage: make [config=name] [target]" - @echo "" - @echo "CONFIGURATIONS:" - @echo " release" - @echo " debug" - @echo "" - @echo "TARGETS:" - @echo " all (default)" - @echo " clean" - @echo " Premake5" - @echo " lua-lib" - @echo " luashim-lib" - @echo " zlib-lib" - @echo " zip-lib" - @echo " mbedtls-lib" - @echo " curl-lib" - @echo " example" - @echo " luasocket" - @echo "" - @echo "For more information, see https://github.com/premake/premake-core/wiki" \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/Premake5.make b/build/premake/premake5/build/gmake2.macosx/Premake5.make deleted file mode 100644 index b74794eb07..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/Premake5.make +++ /dev/null @@ -1,397 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -I../../contrib/zlib -I../../contrib/libzip -I../../contrib/curl/include -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/premake5 -OBJDIR = obj/Release/Premake5 -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_MACOSX -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a -framework CoreServices -framework Foundation -framework Security -lreadline -LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/premake5 -OBJDIR = obj/Debug/Premake5 -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_MACOSX -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a -framework CoreServices -framework Foundation -framework Security -lreadline -LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/buffered_io.o -GENERATED += $(OBJDIR)/criteria_matches.o -GENERATED += $(OBJDIR)/curl_utils.o -GENERATED += $(OBJDIR)/debug_prompt.o -GENERATED += $(OBJDIR)/http_download.o -GENERATED += $(OBJDIR)/http_get.o -GENERATED += $(OBJDIR)/http_post.o -GENERATED += $(OBJDIR)/lua_auxlib.o -GENERATED += $(OBJDIR)/os_chdir.o -GENERATED += $(OBJDIR)/os_chmod.o -GENERATED += $(OBJDIR)/os_comparefiles.o -GENERATED += $(OBJDIR)/os_compile.o -GENERATED += $(OBJDIR)/os_copyfile.o -GENERATED += $(OBJDIR)/os_getWindowsRegistry.o -GENERATED += $(OBJDIR)/os_getcwd.o -GENERATED += $(OBJDIR)/os_getpass.o -GENERATED += $(OBJDIR)/os_getversion.o -GENERATED += $(OBJDIR)/os_host.o -GENERATED += $(OBJDIR)/os_is64bit.o -GENERATED += $(OBJDIR)/os_isdir.o -GENERATED += $(OBJDIR)/os_isfile.o -GENERATED += $(OBJDIR)/os_islink.o -GENERATED += $(OBJDIR)/os_listWindowsRegistry.o -GENERATED += $(OBJDIR)/os_locate.o -GENERATED += $(OBJDIR)/os_match.o -GENERATED += $(OBJDIR)/os_mkdir.o -GENERATED += $(OBJDIR)/os_pathsearch.o -GENERATED += $(OBJDIR)/os_realpath.o -GENERATED += $(OBJDIR)/os_remove.o -GENERATED += $(OBJDIR)/os_rename.o -GENERATED += $(OBJDIR)/os_rmdir.o -GENERATED += $(OBJDIR)/os_stat.o -GENERATED += $(OBJDIR)/os_touchfile.o -GENERATED += $(OBJDIR)/os_uuid.o -GENERATED += $(OBJDIR)/os_writefile_ifnotequal.o -GENERATED += $(OBJDIR)/path_getabsolute.o -GENERATED += $(OBJDIR)/path_getrelative.o -GENERATED += $(OBJDIR)/path_isabsolute.o -GENERATED += $(OBJDIR)/path_join.o -GENERATED += $(OBJDIR)/path_normalize.o -GENERATED += $(OBJDIR)/path_translate.o -GENERATED += $(OBJDIR)/path_wildcards.o -GENERATED += $(OBJDIR)/premake.o -GENERATED += $(OBJDIR)/premake_main.o -GENERATED += $(OBJDIR)/scripts.o -GENERATED += $(OBJDIR)/string_endswith.o -GENERATED += $(OBJDIR)/string_hash.o -GENERATED += $(OBJDIR)/string_sha1.o -GENERATED += $(OBJDIR)/string_startswith.o -GENERATED += $(OBJDIR)/term_textColor.o -GENERATED += $(OBJDIR)/zip_extract.o -OBJECTS += $(OBJDIR)/buffered_io.o -OBJECTS += $(OBJDIR)/criteria_matches.o -OBJECTS += $(OBJDIR)/curl_utils.o -OBJECTS += $(OBJDIR)/debug_prompt.o -OBJECTS += $(OBJDIR)/http_download.o -OBJECTS += $(OBJDIR)/http_get.o -OBJECTS += $(OBJDIR)/http_post.o -OBJECTS += $(OBJDIR)/lua_auxlib.o -OBJECTS += $(OBJDIR)/os_chdir.o -OBJECTS += $(OBJDIR)/os_chmod.o -OBJECTS += $(OBJDIR)/os_comparefiles.o -OBJECTS += $(OBJDIR)/os_compile.o -OBJECTS += $(OBJDIR)/os_copyfile.o -OBJECTS += $(OBJDIR)/os_getWindowsRegistry.o -OBJECTS += $(OBJDIR)/os_getcwd.o -OBJECTS += $(OBJDIR)/os_getpass.o -OBJECTS += $(OBJDIR)/os_getversion.o -OBJECTS += $(OBJDIR)/os_host.o -OBJECTS += $(OBJDIR)/os_is64bit.o -OBJECTS += $(OBJDIR)/os_isdir.o -OBJECTS += $(OBJDIR)/os_isfile.o -OBJECTS += $(OBJDIR)/os_islink.o -OBJECTS += $(OBJDIR)/os_listWindowsRegistry.o -OBJECTS += $(OBJDIR)/os_locate.o -OBJECTS += $(OBJDIR)/os_match.o -OBJECTS += $(OBJDIR)/os_mkdir.o -OBJECTS += $(OBJDIR)/os_pathsearch.o -OBJECTS += $(OBJDIR)/os_realpath.o -OBJECTS += $(OBJDIR)/os_remove.o -OBJECTS += $(OBJDIR)/os_rename.o -OBJECTS += $(OBJDIR)/os_rmdir.o -OBJECTS += $(OBJDIR)/os_stat.o -OBJECTS += $(OBJDIR)/os_touchfile.o -OBJECTS += $(OBJDIR)/os_uuid.o -OBJECTS += $(OBJDIR)/os_writefile_ifnotequal.o -OBJECTS += $(OBJDIR)/path_getabsolute.o -OBJECTS += $(OBJDIR)/path_getrelative.o -OBJECTS += $(OBJDIR)/path_isabsolute.o -OBJECTS += $(OBJDIR)/path_join.o -OBJECTS += $(OBJDIR)/path_normalize.o -OBJECTS += $(OBJDIR)/path_translate.o -OBJECTS += $(OBJDIR)/path_wildcards.o -OBJECTS += $(OBJDIR)/premake.o -OBJECTS += $(OBJDIR)/premake_main.o -OBJECTS += $(OBJDIR)/scripts.o -OBJECTS += $(OBJDIR)/string_endswith.o -OBJECTS += $(OBJDIR)/string_hash.o -OBJECTS += $(OBJDIR)/string_sha1.o -OBJECTS += $(OBJDIR)/string_startswith.o -OBJECTS += $(OBJDIR)/term_textColor.o -OBJECTS += $(OBJDIR)/zip_extract.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking Premake5 - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning Premake5 -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/buffered_io.o: ../../src/host/buffered_io.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/criteria_matches.o: ../../src/host/criteria_matches.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_utils.o: ../../src/host/curl_utils.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/debug_prompt.o: ../../src/host/debug_prompt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_download.o: ../../src/host/http_download.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_get.o: ../../src/host/http_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_post.o: ../../src/host/http_post.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lua_auxlib.o: ../../src/host/lua_auxlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_chdir.o: ../../src/host/os_chdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_chmod.o: ../../src/host/os_chmod.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_comparefiles.o: ../../src/host/os_comparefiles.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_compile.o: ../../src/host/os_compile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_copyfile.o: ../../src/host/os_copyfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getWindowsRegistry.o: ../../src/host/os_getWindowsRegistry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getcwd.o: ../../src/host/os_getcwd.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getpass.o: ../../src/host/os_getpass.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getversion.o: ../../src/host/os_getversion.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_host.o: ../../src/host/os_host.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_is64bit.o: ../../src/host/os_is64bit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_isdir.o: ../../src/host/os_isdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_isfile.o: ../../src/host/os_isfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_islink.o: ../../src/host/os_islink.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_listWindowsRegistry.o: ../../src/host/os_listWindowsRegistry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_locate.o: ../../src/host/os_locate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_match.o: ../../src/host/os_match.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_mkdir.o: ../../src/host/os_mkdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_pathsearch.o: ../../src/host/os_pathsearch.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_realpath.o: ../../src/host/os_realpath.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_remove.o: ../../src/host/os_remove.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_rename.o: ../../src/host/os_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_rmdir.o: ../../src/host/os_rmdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_stat.o: ../../src/host/os_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_touchfile.o: ../../src/host/os_touchfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_uuid.o: ../../src/host/os_uuid.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_writefile_ifnotequal.o: ../../src/host/os_writefile_ifnotequal.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_getabsolute.o: ../../src/host/path_getabsolute.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_getrelative.o: ../../src/host/path_getrelative.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_isabsolute.o: ../../src/host/path_isabsolute.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_join.o: ../../src/host/path_join.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_normalize.o: ../../src/host/path_normalize.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_translate.o: ../../src/host/path_translate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_wildcards.o: ../../src/host/path_wildcards.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/premake.o: ../../src/host/premake.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/premake_main.o: ../../src/host/premake_main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_endswith.o: ../../src/host/string_endswith.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_hash.o: ../../src/host/string_hash.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_sha1.o: ../../src/host/string_sha1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_startswith.o: ../../src/host/string_startswith.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/term_textColor.o: ../../src/host/term_textColor.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extract.o: ../../src/host/zip_extract.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/scripts.o: ../../src/scripts.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/curl-lib.make b/build/premake/premake5/build/gmake2.macosx/curl-lib.make deleted file mode 100644 index 255325fdd6..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/curl-lib.make +++ /dev/null @@ -1,775 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/curl/include -I../../contrib/curl/lib -I../../contrib/mbedtls/include -I../../contrib/zlib -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libcurl-lib.a -OBJDIR = obj/Release/curl-lib -DEFINES += -DPREMAKE_COMPRESSION -DPREMAKE_CURL -DNDEBUG -DBUILDING_LIBCURL -DCURL_STATICLIB -DHTTP_ONLY -DUSE_ZLIB -DUSE_DARWINSSL -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libcurl-lib.a -OBJDIR = obj/Debug/curl-lib -DEFINES += -DPREMAKE_COMPRESSION -DPREMAKE_CURL -D_DEBUG -DBUILDING_LIBCURL -DCURL_STATICLIB -DHTTP_ONLY -DUSE_ZLIB -DUSE_DARWINSSL -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/amigaos.o -GENERATED += $(OBJDIR)/asyn-ares.o -GENERATED += $(OBJDIR)/asyn-thread.o -GENERATED += $(OBJDIR)/axtls.o -GENERATED += $(OBJDIR)/base64.o -GENERATED += $(OBJDIR)/cleartext.o -GENERATED += $(OBJDIR)/conncache.o -GENERATED += $(OBJDIR)/connect.o -GENERATED += $(OBJDIR)/content_encoding.o -GENERATED += $(OBJDIR)/cookie.o -GENERATED += $(OBJDIR)/cram.o -GENERATED += $(OBJDIR)/curl_addrinfo.o -GENERATED += $(OBJDIR)/curl_des.o -GENERATED += $(OBJDIR)/curl_endian.o -GENERATED += $(OBJDIR)/curl_fnmatch.o -GENERATED += $(OBJDIR)/curl_gethostname.o -GENERATED += $(OBJDIR)/curl_gssapi.o -GENERATED += $(OBJDIR)/curl_memrchr.o -GENERATED += $(OBJDIR)/curl_multibyte.o -GENERATED += $(OBJDIR)/curl_ntlm_core.o -GENERATED += $(OBJDIR)/curl_ntlm_wb.o -GENERATED += $(OBJDIR)/curl_rtmp.o -GENERATED += $(OBJDIR)/curl_sasl.o -GENERATED += $(OBJDIR)/curl_sspi.o -GENERATED += $(OBJDIR)/curl_threads.o -GENERATED += $(OBJDIR)/cyassl.o -GENERATED += $(OBJDIR)/darwinssl.o -GENERATED += $(OBJDIR)/dict.o -GENERATED += $(OBJDIR)/digest.o -GENERATED += $(OBJDIR)/digest_sspi.o -GENERATED += $(OBJDIR)/dotdot.o -GENERATED += $(OBJDIR)/easy.o -GENERATED += $(OBJDIR)/escape.o -GENERATED += $(OBJDIR)/file.o -GENERATED += $(OBJDIR)/fileinfo.o -GENERATED += $(OBJDIR)/formdata.o -GENERATED += $(OBJDIR)/ftp.o -GENERATED += $(OBJDIR)/ftplistparser.o -GENERATED += $(OBJDIR)/getenv.o -GENERATED += $(OBJDIR)/getinfo.o -GENERATED += $(OBJDIR)/gopher.o -GENERATED += $(OBJDIR)/gskit.o -GENERATED += $(OBJDIR)/gtls.o -GENERATED += $(OBJDIR)/hash.o -GENERATED += $(OBJDIR)/hmac.o -GENERATED += $(OBJDIR)/hostasyn.o -GENERATED += $(OBJDIR)/hostcheck.o -GENERATED += $(OBJDIR)/hostip.o -GENERATED += $(OBJDIR)/hostip4.o -GENERATED += $(OBJDIR)/hostip6.o -GENERATED += $(OBJDIR)/hostsyn.o -GENERATED += $(OBJDIR)/http.o -GENERATED += $(OBJDIR)/http2.o -GENERATED += $(OBJDIR)/http_chunks.o -GENERATED += $(OBJDIR)/http_digest.o -GENERATED += $(OBJDIR)/http_negotiate.o -GENERATED += $(OBJDIR)/http_ntlm.o -GENERATED += $(OBJDIR)/http_proxy.o -GENERATED += $(OBJDIR)/idn_win32.o -GENERATED += $(OBJDIR)/if2ip.o -GENERATED += $(OBJDIR)/imap.o -GENERATED += $(OBJDIR)/inet_ntop.o -GENERATED += $(OBJDIR)/inet_pton.o -GENERATED += $(OBJDIR)/krb5.o -GENERATED += $(OBJDIR)/krb5_gssapi.o -GENERATED += $(OBJDIR)/krb5_sspi.o -GENERATED += $(OBJDIR)/ldap.o -GENERATED += $(OBJDIR)/llist.o -GENERATED += $(OBJDIR)/mbedtls.o -GENERATED += $(OBJDIR)/md4.o -GENERATED += $(OBJDIR)/md5.o -GENERATED += $(OBJDIR)/memdebug.o -GENERATED += $(OBJDIR)/mprintf.o -GENERATED += $(OBJDIR)/multi.o -GENERATED += $(OBJDIR)/netrc.o -GENERATED += $(OBJDIR)/non-ascii.o -GENERATED += $(OBJDIR)/nonblock.o -GENERATED += $(OBJDIR)/nss.o -GENERATED += $(OBJDIR)/ntlm.o -GENERATED += $(OBJDIR)/ntlm_sspi.o -GENERATED += $(OBJDIR)/nwlib.o -GENERATED += $(OBJDIR)/nwos.o -GENERATED += $(OBJDIR)/oauth2.o -GENERATED += $(OBJDIR)/openldap.o -GENERATED += $(OBJDIR)/openssl.o -GENERATED += $(OBJDIR)/parsedate.o -GENERATED += $(OBJDIR)/pingpong.o -GENERATED += $(OBJDIR)/pipeline.o -GENERATED += $(OBJDIR)/polarssl.o -GENERATED += $(OBJDIR)/polarssl_threadlock.o -GENERATED += $(OBJDIR)/pop3.o -GENERATED += $(OBJDIR)/progress.o -GENERATED += $(OBJDIR)/rand.o -GENERATED += $(OBJDIR)/rtsp.o -GENERATED += $(OBJDIR)/schannel.o -GENERATED += $(OBJDIR)/security.o -GENERATED += $(OBJDIR)/select.o -GENERATED += $(OBJDIR)/sendf.o -GENERATED += $(OBJDIR)/share.o -GENERATED += $(OBJDIR)/slist.o -GENERATED += $(OBJDIR)/smb.o -GENERATED += $(OBJDIR)/smtp.o -GENERATED += $(OBJDIR)/socks.o -GENERATED += $(OBJDIR)/socks_gssapi.o -GENERATED += $(OBJDIR)/socks_sspi.o -GENERATED += $(OBJDIR)/speedcheck.o -GENERATED += $(OBJDIR)/splay.o -GENERATED += $(OBJDIR)/spnego_gssapi.o -GENERATED += $(OBJDIR)/spnego_sspi.o -GENERATED += $(OBJDIR)/ssh.o -GENERATED += $(OBJDIR)/strcase.o -GENERATED += $(OBJDIR)/strdup.o -GENERATED += $(OBJDIR)/strerror.o -GENERATED += $(OBJDIR)/strtok.o -GENERATED += $(OBJDIR)/strtoofft.o -GENERATED += $(OBJDIR)/system_win32.o -GENERATED += $(OBJDIR)/telnet.o -GENERATED += $(OBJDIR)/tftp.o -GENERATED += $(OBJDIR)/timeval.o -GENERATED += $(OBJDIR)/transfer.o -GENERATED += $(OBJDIR)/url.o -GENERATED += $(OBJDIR)/vauth.o -GENERATED += $(OBJDIR)/version.o -GENERATED += $(OBJDIR)/vtls.o -GENERATED += $(OBJDIR)/warnless.o -GENERATED += $(OBJDIR)/wildcard.o -GENERATED += $(OBJDIR)/x509asn1.o -OBJECTS += $(OBJDIR)/amigaos.o -OBJECTS += $(OBJDIR)/asyn-ares.o -OBJECTS += $(OBJDIR)/asyn-thread.o -OBJECTS += $(OBJDIR)/axtls.o -OBJECTS += $(OBJDIR)/base64.o -OBJECTS += $(OBJDIR)/cleartext.o -OBJECTS += $(OBJDIR)/conncache.o -OBJECTS += $(OBJDIR)/connect.o -OBJECTS += $(OBJDIR)/content_encoding.o -OBJECTS += $(OBJDIR)/cookie.o -OBJECTS += $(OBJDIR)/cram.o -OBJECTS += $(OBJDIR)/curl_addrinfo.o -OBJECTS += $(OBJDIR)/curl_des.o -OBJECTS += $(OBJDIR)/curl_endian.o -OBJECTS += $(OBJDIR)/curl_fnmatch.o -OBJECTS += $(OBJDIR)/curl_gethostname.o -OBJECTS += $(OBJDIR)/curl_gssapi.o -OBJECTS += $(OBJDIR)/curl_memrchr.o -OBJECTS += $(OBJDIR)/curl_multibyte.o -OBJECTS += $(OBJDIR)/curl_ntlm_core.o -OBJECTS += $(OBJDIR)/curl_ntlm_wb.o -OBJECTS += $(OBJDIR)/curl_rtmp.o -OBJECTS += $(OBJDIR)/curl_sasl.o -OBJECTS += $(OBJDIR)/curl_sspi.o -OBJECTS += $(OBJDIR)/curl_threads.o -OBJECTS += $(OBJDIR)/cyassl.o -OBJECTS += $(OBJDIR)/darwinssl.o -OBJECTS += $(OBJDIR)/dict.o -OBJECTS += $(OBJDIR)/digest.o -OBJECTS += $(OBJDIR)/digest_sspi.o -OBJECTS += $(OBJDIR)/dotdot.o -OBJECTS += $(OBJDIR)/easy.o -OBJECTS += $(OBJDIR)/escape.o -OBJECTS += $(OBJDIR)/file.o -OBJECTS += $(OBJDIR)/fileinfo.o -OBJECTS += $(OBJDIR)/formdata.o -OBJECTS += $(OBJDIR)/ftp.o -OBJECTS += $(OBJDIR)/ftplistparser.o -OBJECTS += $(OBJDIR)/getenv.o -OBJECTS += $(OBJDIR)/getinfo.o -OBJECTS += $(OBJDIR)/gopher.o -OBJECTS += $(OBJDIR)/gskit.o -OBJECTS += $(OBJDIR)/gtls.o -OBJECTS += $(OBJDIR)/hash.o -OBJECTS += $(OBJDIR)/hmac.o -OBJECTS += $(OBJDIR)/hostasyn.o -OBJECTS += $(OBJDIR)/hostcheck.o -OBJECTS += $(OBJDIR)/hostip.o -OBJECTS += $(OBJDIR)/hostip4.o -OBJECTS += $(OBJDIR)/hostip6.o -OBJECTS += $(OBJDIR)/hostsyn.o -OBJECTS += $(OBJDIR)/http.o -OBJECTS += $(OBJDIR)/http2.o -OBJECTS += $(OBJDIR)/http_chunks.o -OBJECTS += $(OBJDIR)/http_digest.o -OBJECTS += $(OBJDIR)/http_negotiate.o -OBJECTS += $(OBJDIR)/http_ntlm.o -OBJECTS += $(OBJDIR)/http_proxy.o -OBJECTS += $(OBJDIR)/idn_win32.o -OBJECTS += $(OBJDIR)/if2ip.o -OBJECTS += $(OBJDIR)/imap.o -OBJECTS += $(OBJDIR)/inet_ntop.o -OBJECTS += $(OBJDIR)/inet_pton.o -OBJECTS += $(OBJDIR)/krb5.o -OBJECTS += $(OBJDIR)/krb5_gssapi.o -OBJECTS += $(OBJDIR)/krb5_sspi.o -OBJECTS += $(OBJDIR)/ldap.o -OBJECTS += $(OBJDIR)/llist.o -OBJECTS += $(OBJDIR)/mbedtls.o -OBJECTS += $(OBJDIR)/md4.o -OBJECTS += $(OBJDIR)/md5.o -OBJECTS += $(OBJDIR)/memdebug.o -OBJECTS += $(OBJDIR)/mprintf.o -OBJECTS += $(OBJDIR)/multi.o -OBJECTS += $(OBJDIR)/netrc.o -OBJECTS += $(OBJDIR)/non-ascii.o -OBJECTS += $(OBJDIR)/nonblock.o -OBJECTS += $(OBJDIR)/nss.o -OBJECTS += $(OBJDIR)/ntlm.o -OBJECTS += $(OBJDIR)/ntlm_sspi.o -OBJECTS += $(OBJDIR)/nwlib.o -OBJECTS += $(OBJDIR)/nwos.o -OBJECTS += $(OBJDIR)/oauth2.o -OBJECTS += $(OBJDIR)/openldap.o -OBJECTS += $(OBJDIR)/openssl.o -OBJECTS += $(OBJDIR)/parsedate.o -OBJECTS += $(OBJDIR)/pingpong.o -OBJECTS += $(OBJDIR)/pipeline.o -OBJECTS += $(OBJDIR)/polarssl.o -OBJECTS += $(OBJDIR)/polarssl_threadlock.o -OBJECTS += $(OBJDIR)/pop3.o -OBJECTS += $(OBJDIR)/progress.o -OBJECTS += $(OBJDIR)/rand.o -OBJECTS += $(OBJDIR)/rtsp.o -OBJECTS += $(OBJDIR)/schannel.o -OBJECTS += $(OBJDIR)/security.o -OBJECTS += $(OBJDIR)/select.o -OBJECTS += $(OBJDIR)/sendf.o -OBJECTS += $(OBJDIR)/share.o -OBJECTS += $(OBJDIR)/slist.o -OBJECTS += $(OBJDIR)/smb.o -OBJECTS += $(OBJDIR)/smtp.o -OBJECTS += $(OBJDIR)/socks.o -OBJECTS += $(OBJDIR)/socks_gssapi.o -OBJECTS += $(OBJDIR)/socks_sspi.o -OBJECTS += $(OBJDIR)/speedcheck.o -OBJECTS += $(OBJDIR)/splay.o -OBJECTS += $(OBJDIR)/spnego_gssapi.o -OBJECTS += $(OBJDIR)/spnego_sspi.o -OBJECTS += $(OBJDIR)/ssh.o -OBJECTS += $(OBJDIR)/strcase.o -OBJECTS += $(OBJDIR)/strdup.o -OBJECTS += $(OBJDIR)/strerror.o -OBJECTS += $(OBJDIR)/strtok.o -OBJECTS += $(OBJDIR)/strtoofft.o -OBJECTS += $(OBJDIR)/system_win32.o -OBJECTS += $(OBJDIR)/telnet.o -OBJECTS += $(OBJDIR)/tftp.o -OBJECTS += $(OBJDIR)/timeval.o -OBJECTS += $(OBJDIR)/transfer.o -OBJECTS += $(OBJDIR)/url.o -OBJECTS += $(OBJDIR)/vauth.o -OBJECTS += $(OBJDIR)/version.o -OBJECTS += $(OBJDIR)/vtls.o -OBJECTS += $(OBJDIR)/warnless.o -OBJECTS += $(OBJDIR)/wildcard.o -OBJECTS += $(OBJDIR)/x509asn1.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking curl-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning curl-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/amigaos.o: ../../contrib/curl/lib/amigaos.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asyn-ares.o: ../../contrib/curl/lib/asyn-ares.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asyn-thread.o: ../../contrib/curl/lib/asyn-thread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/base64.o: ../../contrib/curl/lib/base64.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/conncache.o: ../../contrib/curl/lib/conncache.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/connect.o: ../../contrib/curl/lib/connect.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/content_encoding.o: ../../contrib/curl/lib/content_encoding.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cookie.o: ../../contrib/curl/lib/cookie.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_addrinfo.o: ../../contrib/curl/lib/curl_addrinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_des.o: ../../contrib/curl/lib/curl_des.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_endian.o: ../../contrib/curl/lib/curl_endian.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_fnmatch.o: ../../contrib/curl/lib/curl_fnmatch.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_gethostname.o: ../../contrib/curl/lib/curl_gethostname.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_gssapi.o: ../../contrib/curl/lib/curl_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_memrchr.o: ../../contrib/curl/lib/curl_memrchr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_multibyte.o: ../../contrib/curl/lib/curl_multibyte.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_ntlm_core.o: ../../contrib/curl/lib/curl_ntlm_core.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_ntlm_wb.o: ../../contrib/curl/lib/curl_ntlm_wb.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_rtmp.o: ../../contrib/curl/lib/curl_rtmp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_sasl.o: ../../contrib/curl/lib/curl_sasl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_sspi.o: ../../contrib/curl/lib/curl_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_threads.o: ../../contrib/curl/lib/curl_threads.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dict.o: ../../contrib/curl/lib/dict.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dotdot.o: ../../contrib/curl/lib/dotdot.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/easy.o: ../../contrib/curl/lib/easy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/escape.o: ../../contrib/curl/lib/escape.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/file.o: ../../contrib/curl/lib/file.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/fileinfo.o: ../../contrib/curl/lib/fileinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/formdata.o: ../../contrib/curl/lib/formdata.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ftp.o: ../../contrib/curl/lib/ftp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ftplistparser.o: ../../contrib/curl/lib/ftplistparser.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/getenv.o: ../../contrib/curl/lib/getenv.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/getinfo.o: ../../contrib/curl/lib/getinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gopher.o: ../../contrib/curl/lib/gopher.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hash.o: ../../contrib/curl/lib/hash.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hmac.o: ../../contrib/curl/lib/hmac.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostasyn.o: ../../contrib/curl/lib/hostasyn.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostcheck.o: ../../contrib/curl/lib/hostcheck.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip.o: ../../contrib/curl/lib/hostip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip4.o: ../../contrib/curl/lib/hostip4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip6.o: ../../contrib/curl/lib/hostip6.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostsyn.o: ../../contrib/curl/lib/hostsyn.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http.o: ../../contrib/curl/lib/http.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http2.o: ../../contrib/curl/lib/http2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_chunks.o: ../../contrib/curl/lib/http_chunks.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_digest.o: ../../contrib/curl/lib/http_digest.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_negotiate.o: ../../contrib/curl/lib/http_negotiate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_ntlm.o: ../../contrib/curl/lib/http_ntlm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_proxy.o: ../../contrib/curl/lib/http_proxy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/idn_win32.o: ../../contrib/curl/lib/idn_win32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/if2ip.o: ../../contrib/curl/lib/if2ip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/imap.o: ../../contrib/curl/lib/imap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet_ntop.o: ../../contrib/curl/lib/inet_ntop.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet_pton.o: ../../contrib/curl/lib/inet_pton.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5.o: ../../contrib/curl/lib/krb5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldap.o: ../../contrib/curl/lib/ldap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/llist.o: ../../contrib/curl/lib/llist.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md4.o: ../../contrib/curl/lib/md4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md5.o: ../../contrib/curl/lib/md5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/memdebug.o: ../../contrib/curl/lib/memdebug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mprintf.o: ../../contrib/curl/lib/mprintf.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/multi.o: ../../contrib/curl/lib/multi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/netrc.o: ../../contrib/curl/lib/netrc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/non-ascii.o: ../../contrib/curl/lib/non-ascii.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nonblock.o: ../../contrib/curl/lib/nonblock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nwlib.o: ../../contrib/curl/lib/nwlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nwos.o: ../../contrib/curl/lib/nwos.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/openldap.o: ../../contrib/curl/lib/openldap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/parsedate.o: ../../contrib/curl/lib/parsedate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pingpong.o: ../../contrib/curl/lib/pingpong.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pipeline.o: ../../contrib/curl/lib/pipeline.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pop3.o: ../../contrib/curl/lib/pop3.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/progress.o: ../../contrib/curl/lib/progress.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rand.o: ../../contrib/curl/lib/rand.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rtsp.o: ../../contrib/curl/lib/rtsp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/security.o: ../../contrib/curl/lib/security.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/select.o: ../../contrib/curl/lib/select.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sendf.o: ../../contrib/curl/lib/sendf.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/share.o: ../../contrib/curl/lib/share.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/slist.o: ../../contrib/curl/lib/slist.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/smb.o: ../../contrib/curl/lib/smb.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/smtp.o: ../../contrib/curl/lib/smtp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks.o: ../../contrib/curl/lib/socks.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks_gssapi.o: ../../contrib/curl/lib/socks_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks_sspi.o: ../../contrib/curl/lib/socks_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/speedcheck.o: ../../contrib/curl/lib/speedcheck.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/splay.o: ../../contrib/curl/lib/splay.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssh.o: ../../contrib/curl/lib/ssh.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strcase.o: ../../contrib/curl/lib/strcase.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strdup.o: ../../contrib/curl/lib/strdup.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strerror.o: ../../contrib/curl/lib/strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strtok.o: ../../contrib/curl/lib/strtok.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strtoofft.o: ../../contrib/curl/lib/strtoofft.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/system_win32.o: ../../contrib/curl/lib/system_win32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/telnet.o: ../../contrib/curl/lib/telnet.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/tftp.o: ../../contrib/curl/lib/tftp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timeval.o: ../../contrib/curl/lib/timeval.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/transfer.o: ../../contrib/curl/lib/transfer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/url.o: ../../contrib/curl/lib/url.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cleartext.o: ../../contrib/curl/lib/vauth/cleartext.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cram.o: ../../contrib/curl/lib/vauth/cram.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/digest.o: ../../contrib/curl/lib/vauth/digest.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/digest_sspi.o: ../../contrib/curl/lib/vauth/digest_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5_gssapi.o: ../../contrib/curl/lib/vauth/krb5_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5_sspi.o: ../../contrib/curl/lib/vauth/krb5_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ntlm.o: ../../contrib/curl/lib/vauth/ntlm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ntlm_sspi.o: ../../contrib/curl/lib/vauth/ntlm_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/oauth2.o: ../../contrib/curl/lib/vauth/oauth2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/spnego_gssapi.o: ../../contrib/curl/lib/vauth/spnego_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/spnego_sspi.o: ../../contrib/curl/lib/vauth/spnego_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/vauth.o: ../../contrib/curl/lib/vauth/vauth.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version.o: ../../contrib/curl/lib/version.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/axtls.o: ../../contrib/curl/lib/vtls/axtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cyassl.o: ../../contrib/curl/lib/vtls/cyassl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/darwinssl.o: ../../contrib/curl/lib/vtls/darwinssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gskit.o: ../../contrib/curl/lib/vtls/gskit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gtls.o: ../../contrib/curl/lib/vtls/gtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mbedtls.o: ../../contrib/curl/lib/vtls/mbedtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nss.o: ../../contrib/curl/lib/vtls/nss.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/openssl.o: ../../contrib/curl/lib/vtls/openssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/polarssl.o: ../../contrib/curl/lib/vtls/polarssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/polarssl_threadlock.o: ../../contrib/curl/lib/vtls/polarssl_threadlock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/schannel.o: ../../contrib/curl/lib/vtls/schannel.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/vtls.o: ../../contrib/curl/lib/vtls/vtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/warnless.o: ../../contrib/curl/lib/warnless.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/wildcard.o: ../../contrib/curl/lib/wildcard.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509asn1.o: ../../contrib/curl/lib/x509asn1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/example.make b/build/premake/premake5/build/gmake2.macosx/example.make deleted file mode 100644 index b9e5b522c3..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/example.make +++ /dev/null @@ -1,147 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -ALL_LDFLAGS += $(LDFLAGS) -dynamiclib -Wl,-install_name,@rpath/example.so -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/example.so -OBJDIR = obj/Release/example -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/libluashim-lib.a -LDDEPS += bin/Release/libluashim-lib.a - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/example.so -OBJDIR = obj/Debug/example -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -LIBS += bin/Debug/libluashim-lib.a -LDDEPS += bin/Debug/libluashim-lib.a - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/main.o -OBJECTS += $(OBJDIR)/main.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking example - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning example -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/main.o: ../../binmodules/example/main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/lua-lib.make b/build/premake/premake5/build/gmake2.macosx/lua-lib.make deleted file mode 100644 index 47baaf8c53..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/lua-lib.make +++ /dev/null @@ -1,300 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/lua/src -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/liblua-lib.a -OBJDIR = obj/Release/lua-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_MACOSX -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/liblua-lib.a -OBJDIR = obj/Debug/lua-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_MACOSX -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/lapi.o -GENERATED += $(OBJDIR)/lbaselib.o -GENERATED += $(OBJDIR)/lbitlib.o -GENERATED += $(OBJDIR)/lcode.o -GENERATED += $(OBJDIR)/lcorolib.o -GENERATED += $(OBJDIR)/lctype.o -GENERATED += $(OBJDIR)/ldblib.o -GENERATED += $(OBJDIR)/ldebug.o -GENERATED += $(OBJDIR)/ldo.o -GENERATED += $(OBJDIR)/ldump.o -GENERATED += $(OBJDIR)/lfunc.o -GENERATED += $(OBJDIR)/lgc.o -GENERATED += $(OBJDIR)/linit.o -GENERATED += $(OBJDIR)/liolib.o -GENERATED += $(OBJDIR)/llex.o -GENERATED += $(OBJDIR)/lmathlib.o -GENERATED += $(OBJDIR)/lmem.o -GENERATED += $(OBJDIR)/loadlib.o -GENERATED += $(OBJDIR)/lobject.o -GENERATED += $(OBJDIR)/lopcodes.o -GENERATED += $(OBJDIR)/loslib.o -GENERATED += $(OBJDIR)/lparser.o -GENERATED += $(OBJDIR)/lstate.o -GENERATED += $(OBJDIR)/lstring.o -GENERATED += $(OBJDIR)/lstrlib.o -GENERATED += $(OBJDIR)/ltable.o -GENERATED += $(OBJDIR)/ltablib.o -GENERATED += $(OBJDIR)/ltm.o -GENERATED += $(OBJDIR)/lundump.o -GENERATED += $(OBJDIR)/lutf8lib.o -GENERATED += $(OBJDIR)/lvm.o -GENERATED += $(OBJDIR)/lzio.o -OBJECTS += $(OBJDIR)/lapi.o -OBJECTS += $(OBJDIR)/lbaselib.o -OBJECTS += $(OBJDIR)/lbitlib.o -OBJECTS += $(OBJDIR)/lcode.o -OBJECTS += $(OBJDIR)/lcorolib.o -OBJECTS += $(OBJDIR)/lctype.o -OBJECTS += $(OBJDIR)/ldblib.o -OBJECTS += $(OBJDIR)/ldebug.o -OBJECTS += $(OBJDIR)/ldo.o -OBJECTS += $(OBJDIR)/ldump.o -OBJECTS += $(OBJDIR)/lfunc.o -OBJECTS += $(OBJDIR)/lgc.o -OBJECTS += $(OBJDIR)/linit.o -OBJECTS += $(OBJDIR)/liolib.o -OBJECTS += $(OBJDIR)/llex.o -OBJECTS += $(OBJDIR)/lmathlib.o -OBJECTS += $(OBJDIR)/lmem.o -OBJECTS += $(OBJDIR)/loadlib.o -OBJECTS += $(OBJDIR)/lobject.o -OBJECTS += $(OBJDIR)/lopcodes.o -OBJECTS += $(OBJDIR)/loslib.o -OBJECTS += $(OBJDIR)/lparser.o -OBJECTS += $(OBJDIR)/lstate.o -OBJECTS += $(OBJDIR)/lstring.o -OBJECTS += $(OBJDIR)/lstrlib.o -OBJECTS += $(OBJDIR)/ltable.o -OBJECTS += $(OBJDIR)/ltablib.o -OBJECTS += $(OBJDIR)/ltm.o -OBJECTS += $(OBJDIR)/lundump.o -OBJECTS += $(OBJDIR)/lutf8lib.o -OBJECTS += $(OBJDIR)/lvm.o -OBJECTS += $(OBJDIR)/lzio.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking lua-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning lua-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/lapi.o: ../../contrib/lua/src/lapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lbaselib.o: ../../contrib/lua/src/lbaselib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lbitlib.o: ../../contrib/lua/src/lbitlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lcode.o: ../../contrib/lua/src/lcode.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lcorolib.o: ../../contrib/lua/src/lcorolib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lctype.o: ../../contrib/lua/src/lctype.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldblib.o: ../../contrib/lua/src/ldblib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldebug.o: ../../contrib/lua/src/ldebug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldo.o: ../../contrib/lua/src/ldo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldump.o: ../../contrib/lua/src/ldump.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lfunc.o: ../../contrib/lua/src/lfunc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lgc.o: ../../contrib/lua/src/lgc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/linit.o: ../../contrib/lua/src/linit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/liolib.o: ../../contrib/lua/src/liolib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/llex.o: ../../contrib/lua/src/llex.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lmathlib.o: ../../contrib/lua/src/lmathlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lmem.o: ../../contrib/lua/src/lmem.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/loadlib.o: ../../contrib/lua/src/loadlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lobject.o: ../../contrib/lua/src/lobject.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lopcodes.o: ../../contrib/lua/src/lopcodes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/loslib.o: ../../contrib/lua/src/loslib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lparser.o: ../../contrib/lua/src/lparser.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstate.o: ../../contrib/lua/src/lstate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstring.o: ../../contrib/lua/src/lstring.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstrlib.o: ../../contrib/lua/src/lstrlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltable.o: ../../contrib/lua/src/ltable.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltablib.o: ../../contrib/lua/src/ltablib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltm.o: ../../contrib/lua/src/ltm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lundump.o: ../../contrib/lua/src/lundump.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lutf8lib.o: ../../contrib/lua/src/lutf8lib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lvm.o: ../../contrib/lua/src/lvm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lzio.o: ../../contrib/lua/src/lzio.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/luashim-lib.make b/build/premake/premake5/build/gmake2.macosx/luashim-lib.make deleted file mode 100644 index d055a520b6..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/luashim-lib.make +++ /dev/null @@ -1,145 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/lua/src -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libluashim-lib.a -OBJDIR = obj/Release/luashim-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_MACOSX -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libluashim-lib.a -OBJDIR = obj/Debug/luashim-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_MACOSX -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/luashim.o -OBJECTS += $(OBJDIR)/luashim.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking luashim-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning luashim-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/luashim.o: ../../contrib/luashim/luashim.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/luasocket.make b/build/premake/premake5/build/gmake2.macosx/luasocket.make deleted file mode 100644 index 40ec301a56..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/luasocket.make +++ /dev/null @@ -1,237 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -ALL_LDFLAGS += $(LDFLAGS) -dynamiclib -Wl,-install_name,@rpath/libluasocket.dylib -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/libluasocket.dylib -OBJDIR = obj/Release/luasocket -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUASOCKET_API=__attribute__\(\(visibility\(\"default\"\)\)\) -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/libluashim-lib.a -LDDEPS += bin/Release/libluashim-lib.a - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/libluasocket.dylib -OBJDIR = obj/Debug/luasocket -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUASOCKET_API=__attribute__\(\(visibility\(\"default\"\)\)\) -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -LIBS += bin/Debug/libluashim-lib.a -LDDEPS += bin/Debug/libluashim-lib.a - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/auxiliar.o -GENERATED += $(OBJDIR)/buffer.o -GENERATED += $(OBJDIR)/compat.o -GENERATED += $(OBJDIR)/except.o -GENERATED += $(OBJDIR)/inet.o -GENERATED += $(OBJDIR)/io.o -GENERATED += $(OBJDIR)/luasocket.o -GENERATED += $(OBJDIR)/main.o -GENERATED += $(OBJDIR)/mime.o -GENERATED += $(OBJDIR)/options.o -GENERATED += $(OBJDIR)/select.o -GENERATED += $(OBJDIR)/serial.o -GENERATED += $(OBJDIR)/tcp.o -GENERATED += $(OBJDIR)/timeout.o -GENERATED += $(OBJDIR)/udp.o -GENERATED += $(OBJDIR)/unix.o -GENERATED += $(OBJDIR)/unixdgram.o -GENERATED += $(OBJDIR)/unixstream.o -GENERATED += $(OBJDIR)/usocket.o -OBJECTS += $(OBJDIR)/auxiliar.o -OBJECTS += $(OBJDIR)/buffer.o -OBJECTS += $(OBJDIR)/compat.o -OBJECTS += $(OBJDIR)/except.o -OBJECTS += $(OBJDIR)/inet.o -OBJECTS += $(OBJDIR)/io.o -OBJECTS += $(OBJDIR)/luasocket.o -OBJECTS += $(OBJDIR)/main.o -OBJECTS += $(OBJDIR)/mime.o -OBJECTS += $(OBJDIR)/options.o -OBJECTS += $(OBJDIR)/select.o -OBJECTS += $(OBJDIR)/serial.o -OBJECTS += $(OBJDIR)/tcp.o -OBJECTS += $(OBJDIR)/timeout.o -OBJECTS += $(OBJDIR)/udp.o -OBJECTS += $(OBJDIR)/unix.o -OBJECTS += $(OBJDIR)/unixdgram.o -OBJECTS += $(OBJDIR)/unixstream.o -OBJECTS += $(OBJDIR)/usocket.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking luasocket - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning luasocket -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/main.o: ../../binmodules/luasocket/main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/auxiliar.o: ../../binmodules/luasocket/src/auxiliar.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/buffer.o: ../../binmodules/luasocket/src/buffer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/compat.o: ../../binmodules/luasocket/src/compat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/except.o: ../../binmodules/luasocket/src/except.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet.o: ../../binmodules/luasocket/src/inet.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/io.o: ../../binmodules/luasocket/src/io.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/luasocket.o: ../../binmodules/luasocket/src/luasocket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mime.o: ../../binmodules/luasocket/src/mime.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/options.o: ../../binmodules/luasocket/src/options.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/select.o: ../../binmodules/luasocket/src/select.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/serial.o: ../../binmodules/luasocket/src/serial.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/tcp.o: ../../binmodules/luasocket/src/tcp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timeout.o: ../../binmodules/luasocket/src/timeout.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/udp.o: ../../binmodules/luasocket/src/udp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unix.o: ../../binmodules/luasocket/src/unix.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unixdgram.o: ../../binmodules/luasocket/src/unixdgram.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unixstream.o: ../../binmodules/luasocket/src/unixstream.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/usocket.o: ../../binmodules/luasocket/src/usocket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/mbedtls-lib.make b/build/premake/premake5/build/gmake2.macosx/mbedtls-lib.make deleted file mode 100644 index 45c9cc38a3..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/mbedtls-lib.make +++ /dev/null @@ -1,490 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/mbedtls/include -I../../contrib/zlib -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libmbedtls-lib.a -OBJDIR = obj/Release/mbedtls-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DMBEDTLS_ZLIB_SUPPORT -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libmbedtls-lib.a -OBJDIR = obj/Debug/mbedtls-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DMBEDTLS_ZLIB_SUPPORT -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/aes.o -GENERATED += $(OBJDIR)/aesni.o -GENERATED += $(OBJDIR)/arc4.o -GENERATED += $(OBJDIR)/asn1parse.o -GENERATED += $(OBJDIR)/asn1write.o -GENERATED += $(OBJDIR)/base64.o -GENERATED += $(OBJDIR)/bignum.o -GENERATED += $(OBJDIR)/blowfish.o -GENERATED += $(OBJDIR)/camellia.o -GENERATED += $(OBJDIR)/ccm.o -GENERATED += $(OBJDIR)/certs.o -GENERATED += $(OBJDIR)/cipher.o -GENERATED += $(OBJDIR)/cipher_wrap.o -GENERATED += $(OBJDIR)/ctr_drbg.o -GENERATED += $(OBJDIR)/debug.o -GENERATED += $(OBJDIR)/des.o -GENERATED += $(OBJDIR)/dhm.o -GENERATED += $(OBJDIR)/ecdh.o -GENERATED += $(OBJDIR)/ecdsa.o -GENERATED += $(OBJDIR)/ecjpake.o -GENERATED += $(OBJDIR)/ecp.o -GENERATED += $(OBJDIR)/ecp_curves.o -GENERATED += $(OBJDIR)/entropy.o -GENERATED += $(OBJDIR)/entropy_poll.o -GENERATED += $(OBJDIR)/error.o -GENERATED += $(OBJDIR)/gcm.o -GENERATED += $(OBJDIR)/havege.o -GENERATED += $(OBJDIR)/hmac_drbg.o -GENERATED += $(OBJDIR)/md.o -GENERATED += $(OBJDIR)/md2.o -GENERATED += $(OBJDIR)/md4.o -GENERATED += $(OBJDIR)/md5.o -GENERATED += $(OBJDIR)/md_wrap.o -GENERATED += $(OBJDIR)/memory_buffer_alloc.o -GENERATED += $(OBJDIR)/net.o -GENERATED += $(OBJDIR)/oid.o -GENERATED += $(OBJDIR)/padlock.o -GENERATED += $(OBJDIR)/pem.o -GENERATED += $(OBJDIR)/pk.o -GENERATED += $(OBJDIR)/pk_wrap.o -GENERATED += $(OBJDIR)/pkcs11.o -GENERATED += $(OBJDIR)/pkcs12.o -GENERATED += $(OBJDIR)/pkcs5.o -GENERATED += $(OBJDIR)/pkparse.o -GENERATED += $(OBJDIR)/pkwrite.o -GENERATED += $(OBJDIR)/platform.o -GENERATED += $(OBJDIR)/ripemd160.o -GENERATED += $(OBJDIR)/rsa.o -GENERATED += $(OBJDIR)/sha1.o -GENERATED += $(OBJDIR)/sha256.o -GENERATED += $(OBJDIR)/sha512.o -GENERATED += $(OBJDIR)/ssl_cache.o -GENERATED += $(OBJDIR)/ssl_ciphersuites.o -GENERATED += $(OBJDIR)/ssl_cli.o -GENERATED += $(OBJDIR)/ssl_cookie.o -GENERATED += $(OBJDIR)/ssl_srv.o -GENERATED += $(OBJDIR)/ssl_ticket.o -GENERATED += $(OBJDIR)/ssl_tls.o -GENERATED += $(OBJDIR)/threading.o -GENERATED += $(OBJDIR)/timing.o -GENERATED += $(OBJDIR)/version.o -GENERATED += $(OBJDIR)/version_features.o -GENERATED += $(OBJDIR)/x509.o -GENERATED += $(OBJDIR)/x509_create.o -GENERATED += $(OBJDIR)/x509_crl.o -GENERATED += $(OBJDIR)/x509_crt.o -GENERATED += $(OBJDIR)/x509_csr.o -GENERATED += $(OBJDIR)/x509write_crt.o -GENERATED += $(OBJDIR)/x509write_csr.o -GENERATED += $(OBJDIR)/xtea.o -OBJECTS += $(OBJDIR)/aes.o -OBJECTS += $(OBJDIR)/aesni.o -OBJECTS += $(OBJDIR)/arc4.o -OBJECTS += $(OBJDIR)/asn1parse.o -OBJECTS += $(OBJDIR)/asn1write.o -OBJECTS += $(OBJDIR)/base64.o -OBJECTS += $(OBJDIR)/bignum.o -OBJECTS += $(OBJDIR)/blowfish.o -OBJECTS += $(OBJDIR)/camellia.o -OBJECTS += $(OBJDIR)/ccm.o -OBJECTS += $(OBJDIR)/certs.o -OBJECTS += $(OBJDIR)/cipher.o -OBJECTS += $(OBJDIR)/cipher_wrap.o -OBJECTS += $(OBJDIR)/ctr_drbg.o -OBJECTS += $(OBJDIR)/debug.o -OBJECTS += $(OBJDIR)/des.o -OBJECTS += $(OBJDIR)/dhm.o -OBJECTS += $(OBJDIR)/ecdh.o -OBJECTS += $(OBJDIR)/ecdsa.o -OBJECTS += $(OBJDIR)/ecjpake.o -OBJECTS += $(OBJDIR)/ecp.o -OBJECTS += $(OBJDIR)/ecp_curves.o -OBJECTS += $(OBJDIR)/entropy.o -OBJECTS += $(OBJDIR)/entropy_poll.o -OBJECTS += $(OBJDIR)/error.o -OBJECTS += $(OBJDIR)/gcm.o -OBJECTS += $(OBJDIR)/havege.o -OBJECTS += $(OBJDIR)/hmac_drbg.o -OBJECTS += $(OBJDIR)/md.o -OBJECTS += $(OBJDIR)/md2.o -OBJECTS += $(OBJDIR)/md4.o -OBJECTS += $(OBJDIR)/md5.o -OBJECTS += $(OBJDIR)/md_wrap.o -OBJECTS += $(OBJDIR)/memory_buffer_alloc.o -OBJECTS += $(OBJDIR)/net.o -OBJECTS += $(OBJDIR)/oid.o -OBJECTS += $(OBJDIR)/padlock.o -OBJECTS += $(OBJDIR)/pem.o -OBJECTS += $(OBJDIR)/pk.o -OBJECTS += $(OBJDIR)/pk_wrap.o -OBJECTS += $(OBJDIR)/pkcs11.o -OBJECTS += $(OBJDIR)/pkcs12.o -OBJECTS += $(OBJDIR)/pkcs5.o -OBJECTS += $(OBJDIR)/pkparse.o -OBJECTS += $(OBJDIR)/pkwrite.o -OBJECTS += $(OBJDIR)/platform.o -OBJECTS += $(OBJDIR)/ripemd160.o -OBJECTS += $(OBJDIR)/rsa.o -OBJECTS += $(OBJDIR)/sha1.o -OBJECTS += $(OBJDIR)/sha256.o -OBJECTS += $(OBJDIR)/sha512.o -OBJECTS += $(OBJDIR)/ssl_cache.o -OBJECTS += $(OBJDIR)/ssl_ciphersuites.o -OBJECTS += $(OBJDIR)/ssl_cli.o -OBJECTS += $(OBJDIR)/ssl_cookie.o -OBJECTS += $(OBJDIR)/ssl_srv.o -OBJECTS += $(OBJDIR)/ssl_ticket.o -OBJECTS += $(OBJDIR)/ssl_tls.o -OBJECTS += $(OBJDIR)/threading.o -OBJECTS += $(OBJDIR)/timing.o -OBJECTS += $(OBJDIR)/version.o -OBJECTS += $(OBJDIR)/version_features.o -OBJECTS += $(OBJDIR)/x509.o -OBJECTS += $(OBJDIR)/x509_create.o -OBJECTS += $(OBJDIR)/x509_crl.o -OBJECTS += $(OBJDIR)/x509_crt.o -OBJECTS += $(OBJDIR)/x509_csr.o -OBJECTS += $(OBJDIR)/x509write_crt.o -OBJECTS += $(OBJDIR)/x509write_csr.o -OBJECTS += $(OBJDIR)/xtea.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking mbedtls-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning mbedtls-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/aes.o: ../../contrib/mbedtls/library/aes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/aesni.o: ../../contrib/mbedtls/library/aesni.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/arc4.o: ../../contrib/mbedtls/library/arc4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asn1parse.o: ../../contrib/mbedtls/library/asn1parse.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asn1write.o: ../../contrib/mbedtls/library/asn1write.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/base64.o: ../../contrib/mbedtls/library/base64.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/bignum.o: ../../contrib/mbedtls/library/bignum.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/blowfish.o: ../../contrib/mbedtls/library/blowfish.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/camellia.o: ../../contrib/mbedtls/library/camellia.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ccm.o: ../../contrib/mbedtls/library/ccm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/certs.o: ../../contrib/mbedtls/library/certs.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cipher.o: ../../contrib/mbedtls/library/cipher.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cipher_wrap.o: ../../contrib/mbedtls/library/cipher_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ctr_drbg.o: ../../contrib/mbedtls/library/ctr_drbg.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/debug.o: ../../contrib/mbedtls/library/debug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/des.o: ../../contrib/mbedtls/library/des.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dhm.o: ../../contrib/mbedtls/library/dhm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecdh.o: ../../contrib/mbedtls/library/ecdh.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecdsa.o: ../../contrib/mbedtls/library/ecdsa.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecjpake.o: ../../contrib/mbedtls/library/ecjpake.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecp.o: ../../contrib/mbedtls/library/ecp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecp_curves.o: ../../contrib/mbedtls/library/ecp_curves.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/entropy.o: ../../contrib/mbedtls/library/entropy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/entropy_poll.o: ../../contrib/mbedtls/library/entropy_poll.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/error.o: ../../contrib/mbedtls/library/error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gcm.o: ../../contrib/mbedtls/library/gcm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/havege.o: ../../contrib/mbedtls/library/havege.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hmac_drbg.o: ../../contrib/mbedtls/library/hmac_drbg.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md.o: ../../contrib/mbedtls/library/md.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md2.o: ../../contrib/mbedtls/library/md2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md4.o: ../../contrib/mbedtls/library/md4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md5.o: ../../contrib/mbedtls/library/md5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md_wrap.o: ../../contrib/mbedtls/library/md_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/memory_buffer_alloc.o: ../../contrib/mbedtls/library/memory_buffer_alloc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/net.o: ../../contrib/mbedtls/library/net.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/oid.o: ../../contrib/mbedtls/library/oid.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/padlock.o: ../../contrib/mbedtls/library/padlock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pem.o: ../../contrib/mbedtls/library/pem.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pk.o: ../../contrib/mbedtls/library/pk.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pk_wrap.o: ../../contrib/mbedtls/library/pk_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs11.o: ../../contrib/mbedtls/library/pkcs11.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs12.o: ../../contrib/mbedtls/library/pkcs12.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs5.o: ../../contrib/mbedtls/library/pkcs5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkparse.o: ../../contrib/mbedtls/library/pkparse.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkwrite.o: ../../contrib/mbedtls/library/pkwrite.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/platform.o: ../../contrib/mbedtls/library/platform.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ripemd160.o: ../../contrib/mbedtls/library/ripemd160.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rsa.o: ../../contrib/mbedtls/library/rsa.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha1.o: ../../contrib/mbedtls/library/sha1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha256.o: ../../contrib/mbedtls/library/sha256.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha512.o: ../../contrib/mbedtls/library/sha512.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cache.o: ../../contrib/mbedtls/library/ssl_cache.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_ciphersuites.o: ../../contrib/mbedtls/library/ssl_ciphersuites.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cli.o: ../../contrib/mbedtls/library/ssl_cli.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cookie.o: ../../contrib/mbedtls/library/ssl_cookie.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_srv.o: ../../contrib/mbedtls/library/ssl_srv.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_ticket.o: ../../contrib/mbedtls/library/ssl_ticket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_tls.o: ../../contrib/mbedtls/library/ssl_tls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/threading.o: ../../contrib/mbedtls/library/threading.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timing.o: ../../contrib/mbedtls/library/timing.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version.o: ../../contrib/mbedtls/library/version.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version_features.o: ../../contrib/mbedtls/library/version_features.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509.o: ../../contrib/mbedtls/library/x509.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_create.o: ../../contrib/mbedtls/library/x509_create.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_crl.o: ../../contrib/mbedtls/library/x509_crl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_crt.o: ../../contrib/mbedtls/library/x509_crt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_csr.o: ../../contrib/mbedtls/library/x509_csr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509write_crt.o: ../../contrib/mbedtls/library/x509write_crt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509write_csr.o: ../../contrib/mbedtls/library/x509write_csr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/xtea.o: ../../contrib/mbedtls/library/xtea.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/zip-lib.make b/build/premake/premake5/build/gmake2.macosx/zip-lib.make deleted file mode 100644 index 0f79c369a9..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/zip-lib.make +++ /dev/null @@ -1,570 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -I../../contrib/libzip/include -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libzip-lib.a -OBJDIR = obj/Release/zip-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DN_FSEEKO -DHAVE_SSIZE_T_LIBZIP -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libzip-lib.a -OBJDIR = obj/Debug/zip-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DN_FSEEKO -DHAVE_SSIZE_T_LIBZIP -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/mkstemp.o -GENERATED += $(OBJDIR)/zip_add.o -GENERATED += $(OBJDIR)/zip_add_dir.o -GENERATED += $(OBJDIR)/zip_add_entry.o -GENERATED += $(OBJDIR)/zip_close.o -GENERATED += $(OBJDIR)/zip_delete.o -GENERATED += $(OBJDIR)/zip_dir_add.o -GENERATED += $(OBJDIR)/zip_dirent.o -GENERATED += $(OBJDIR)/zip_discard.o -GENERATED += $(OBJDIR)/zip_entry.o -GENERATED += $(OBJDIR)/zip_err_str.o -GENERATED += $(OBJDIR)/zip_error.o -GENERATED += $(OBJDIR)/zip_error_clear.o -GENERATED += $(OBJDIR)/zip_error_get.o -GENERATED += $(OBJDIR)/zip_error_get_sys_type.o -GENERATED += $(OBJDIR)/zip_error_strerror.o -GENERATED += $(OBJDIR)/zip_error_to_str.o -GENERATED += $(OBJDIR)/zip_extra_field.o -GENERATED += $(OBJDIR)/zip_extra_field_api.o -GENERATED += $(OBJDIR)/zip_fclose.o -GENERATED += $(OBJDIR)/zip_fdopen.o -GENERATED += $(OBJDIR)/zip_file_add.o -GENERATED += $(OBJDIR)/zip_file_error_clear.o -GENERATED += $(OBJDIR)/zip_file_error_get.o -GENERATED += $(OBJDIR)/zip_file_get_comment.o -GENERATED += $(OBJDIR)/zip_file_get_external_attributes.o -GENERATED += $(OBJDIR)/zip_file_get_offset.o -GENERATED += $(OBJDIR)/zip_file_rename.o -GENERATED += $(OBJDIR)/zip_file_replace.o -GENERATED += $(OBJDIR)/zip_file_set_comment.o -GENERATED += $(OBJDIR)/zip_file_set_external_attributes.o -GENERATED += $(OBJDIR)/zip_file_strerror.o -GENERATED += $(OBJDIR)/zip_filerange_crc.o -GENERATED += $(OBJDIR)/zip_fopen.o -GENERATED += $(OBJDIR)/zip_fopen_encrypted.o -GENERATED += $(OBJDIR)/zip_fopen_index.o -GENERATED += $(OBJDIR)/zip_fopen_index_encrypted.o -GENERATED += $(OBJDIR)/zip_fread.o -GENERATED += $(OBJDIR)/zip_get_archive_comment.o -GENERATED += $(OBJDIR)/zip_get_archive_flag.o -GENERATED += $(OBJDIR)/zip_get_compression_implementation.o -GENERATED += $(OBJDIR)/zip_get_encryption_implementation.o -GENERATED += $(OBJDIR)/zip_get_file_comment.o -GENERATED += $(OBJDIR)/zip_get_name.o -GENERATED += $(OBJDIR)/zip_get_num_entries.o -GENERATED += $(OBJDIR)/zip_get_num_files.o -GENERATED += $(OBJDIR)/zip_memdup.o -GENERATED += $(OBJDIR)/zip_name_locate.o -GENERATED += $(OBJDIR)/zip_new.o -GENERATED += $(OBJDIR)/zip_open.o -GENERATED += $(OBJDIR)/zip_rename.o -GENERATED += $(OBJDIR)/zip_replace.o -GENERATED += $(OBJDIR)/zip_set_archive_comment.o -GENERATED += $(OBJDIR)/zip_set_archive_flag.o -GENERATED += $(OBJDIR)/zip_set_default_password.o -GENERATED += $(OBJDIR)/zip_set_file_comment.o -GENERATED += $(OBJDIR)/zip_set_file_compression.o -GENERATED += $(OBJDIR)/zip_set_name.o -GENERATED += $(OBJDIR)/zip_source_buffer.o -GENERATED += $(OBJDIR)/zip_source_close.o -GENERATED += $(OBJDIR)/zip_source_crc.o -GENERATED += $(OBJDIR)/zip_source_deflate.o -GENERATED += $(OBJDIR)/zip_source_error.o -GENERATED += $(OBJDIR)/zip_source_file.o -GENERATED += $(OBJDIR)/zip_source_filep.o -GENERATED += $(OBJDIR)/zip_source_free.o -GENERATED += $(OBJDIR)/zip_source_function.o -GENERATED += $(OBJDIR)/zip_source_layered.o -GENERATED += $(OBJDIR)/zip_source_open.o -GENERATED += $(OBJDIR)/zip_source_pkware.o -GENERATED += $(OBJDIR)/zip_source_pop.o -GENERATED += $(OBJDIR)/zip_source_read.o -GENERATED += $(OBJDIR)/zip_source_stat.o -GENERATED += $(OBJDIR)/zip_source_window.o -GENERATED += $(OBJDIR)/zip_source_zip.o -GENERATED += $(OBJDIR)/zip_source_zip_new.o -GENERATED += $(OBJDIR)/zip_stat.o -GENERATED += $(OBJDIR)/zip_stat_index.o -GENERATED += $(OBJDIR)/zip_stat_init.o -GENERATED += $(OBJDIR)/zip_strerror.o -GENERATED += $(OBJDIR)/zip_string.o -GENERATED += $(OBJDIR)/zip_unchange.o -GENERATED += $(OBJDIR)/zip_unchange_all.o -GENERATED += $(OBJDIR)/zip_unchange_archive.o -GENERATED += $(OBJDIR)/zip_unchange_data.o -GENERATED += $(OBJDIR)/zip_utf-8.o -OBJECTS += $(OBJDIR)/mkstemp.o -OBJECTS += $(OBJDIR)/zip_add.o -OBJECTS += $(OBJDIR)/zip_add_dir.o -OBJECTS += $(OBJDIR)/zip_add_entry.o -OBJECTS += $(OBJDIR)/zip_close.o -OBJECTS += $(OBJDIR)/zip_delete.o -OBJECTS += $(OBJDIR)/zip_dir_add.o -OBJECTS += $(OBJDIR)/zip_dirent.o -OBJECTS += $(OBJDIR)/zip_discard.o -OBJECTS += $(OBJDIR)/zip_entry.o -OBJECTS += $(OBJDIR)/zip_err_str.o -OBJECTS += $(OBJDIR)/zip_error.o -OBJECTS += $(OBJDIR)/zip_error_clear.o -OBJECTS += $(OBJDIR)/zip_error_get.o -OBJECTS += $(OBJDIR)/zip_error_get_sys_type.o -OBJECTS += $(OBJDIR)/zip_error_strerror.o -OBJECTS += $(OBJDIR)/zip_error_to_str.o -OBJECTS += $(OBJDIR)/zip_extra_field.o -OBJECTS += $(OBJDIR)/zip_extra_field_api.o -OBJECTS += $(OBJDIR)/zip_fclose.o -OBJECTS += $(OBJDIR)/zip_fdopen.o -OBJECTS += $(OBJDIR)/zip_file_add.o -OBJECTS += $(OBJDIR)/zip_file_error_clear.o -OBJECTS += $(OBJDIR)/zip_file_error_get.o -OBJECTS += $(OBJDIR)/zip_file_get_comment.o -OBJECTS += $(OBJDIR)/zip_file_get_external_attributes.o -OBJECTS += $(OBJDIR)/zip_file_get_offset.o -OBJECTS += $(OBJDIR)/zip_file_rename.o -OBJECTS += $(OBJDIR)/zip_file_replace.o -OBJECTS += $(OBJDIR)/zip_file_set_comment.o -OBJECTS += $(OBJDIR)/zip_file_set_external_attributes.o -OBJECTS += $(OBJDIR)/zip_file_strerror.o -OBJECTS += $(OBJDIR)/zip_filerange_crc.o -OBJECTS += $(OBJDIR)/zip_fopen.o -OBJECTS += $(OBJDIR)/zip_fopen_encrypted.o -OBJECTS += $(OBJDIR)/zip_fopen_index.o -OBJECTS += $(OBJDIR)/zip_fopen_index_encrypted.o -OBJECTS += $(OBJDIR)/zip_fread.o -OBJECTS += $(OBJDIR)/zip_get_archive_comment.o -OBJECTS += $(OBJDIR)/zip_get_archive_flag.o -OBJECTS += $(OBJDIR)/zip_get_compression_implementation.o -OBJECTS += $(OBJDIR)/zip_get_encryption_implementation.o -OBJECTS += $(OBJDIR)/zip_get_file_comment.o -OBJECTS += $(OBJDIR)/zip_get_name.o -OBJECTS += $(OBJDIR)/zip_get_num_entries.o -OBJECTS += $(OBJDIR)/zip_get_num_files.o -OBJECTS += $(OBJDIR)/zip_memdup.o -OBJECTS += $(OBJDIR)/zip_name_locate.o -OBJECTS += $(OBJDIR)/zip_new.o -OBJECTS += $(OBJDIR)/zip_open.o -OBJECTS += $(OBJDIR)/zip_rename.o -OBJECTS += $(OBJDIR)/zip_replace.o -OBJECTS += $(OBJDIR)/zip_set_archive_comment.o -OBJECTS += $(OBJDIR)/zip_set_archive_flag.o -OBJECTS += $(OBJDIR)/zip_set_default_password.o -OBJECTS += $(OBJDIR)/zip_set_file_comment.o -OBJECTS += $(OBJDIR)/zip_set_file_compression.o -OBJECTS += $(OBJDIR)/zip_set_name.o -OBJECTS += $(OBJDIR)/zip_source_buffer.o -OBJECTS += $(OBJDIR)/zip_source_close.o -OBJECTS += $(OBJDIR)/zip_source_crc.o -OBJECTS += $(OBJDIR)/zip_source_deflate.o -OBJECTS += $(OBJDIR)/zip_source_error.o -OBJECTS += $(OBJDIR)/zip_source_file.o -OBJECTS += $(OBJDIR)/zip_source_filep.o -OBJECTS += $(OBJDIR)/zip_source_free.o -OBJECTS += $(OBJDIR)/zip_source_function.o -OBJECTS += $(OBJDIR)/zip_source_layered.o -OBJECTS += $(OBJDIR)/zip_source_open.o -OBJECTS += $(OBJDIR)/zip_source_pkware.o -OBJECTS += $(OBJDIR)/zip_source_pop.o -OBJECTS += $(OBJDIR)/zip_source_read.o -OBJECTS += $(OBJDIR)/zip_source_stat.o -OBJECTS += $(OBJDIR)/zip_source_window.o -OBJECTS += $(OBJDIR)/zip_source_zip.o -OBJECTS += $(OBJDIR)/zip_source_zip_new.o -OBJECTS += $(OBJDIR)/zip_stat.o -OBJECTS += $(OBJDIR)/zip_stat_index.o -OBJECTS += $(OBJDIR)/zip_stat_init.o -OBJECTS += $(OBJDIR)/zip_strerror.o -OBJECTS += $(OBJDIR)/zip_string.o -OBJECTS += $(OBJDIR)/zip_unchange.o -OBJECTS += $(OBJDIR)/zip_unchange_all.o -OBJECTS += $(OBJDIR)/zip_unchange_archive.o -OBJECTS += $(OBJDIR)/zip_unchange_data.o -OBJECTS += $(OBJDIR)/zip_utf-8.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking zip-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning zip-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/mkstemp.o: ../../contrib/libzip/mkstemp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add.o: ../../contrib/libzip/zip_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add_dir.o: ../../contrib/libzip/zip_add_dir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add_entry.o: ../../contrib/libzip/zip_add_entry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_close.o: ../../contrib/libzip/zip_close.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_delete.o: ../../contrib/libzip/zip_delete.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_dir_add.o: ../../contrib/libzip/zip_dir_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_dirent.o: ../../contrib/libzip/zip_dirent.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_discard.o: ../../contrib/libzip/zip_discard.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_entry.o: ../../contrib/libzip/zip_entry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_err_str.o: ../../contrib/libzip/zip_err_str.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error.o: ../../contrib/libzip/zip_error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_clear.o: ../../contrib/libzip/zip_error_clear.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_get.o: ../../contrib/libzip/zip_error_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_get_sys_type.o: ../../contrib/libzip/zip_error_get_sys_type.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_strerror.o: ../../contrib/libzip/zip_error_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_to_str.o: ../../contrib/libzip/zip_error_to_str.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extra_field.o: ../../contrib/libzip/zip_extra_field.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extra_field_api.o: ../../contrib/libzip/zip_extra_field_api.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fclose.o: ../../contrib/libzip/zip_fclose.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fdopen.o: ../../contrib/libzip/zip_fdopen.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_add.o: ../../contrib/libzip/zip_file_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_error_clear.o: ../../contrib/libzip/zip_file_error_clear.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_error_get.o: ../../contrib/libzip/zip_file_error_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_comment.o: ../../contrib/libzip/zip_file_get_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_external_attributes.o: ../../contrib/libzip/zip_file_get_external_attributes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_offset.o: ../../contrib/libzip/zip_file_get_offset.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_rename.o: ../../contrib/libzip/zip_file_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_replace.o: ../../contrib/libzip/zip_file_replace.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_set_comment.o: ../../contrib/libzip/zip_file_set_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_set_external_attributes.o: ../../contrib/libzip/zip_file_set_external_attributes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_strerror.o: ../../contrib/libzip/zip_file_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_filerange_crc.o: ../../contrib/libzip/zip_filerange_crc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen.o: ../../contrib/libzip/zip_fopen.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_encrypted.o: ../../contrib/libzip/zip_fopen_encrypted.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_index.o: ../../contrib/libzip/zip_fopen_index.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_index_encrypted.o: ../../contrib/libzip/zip_fopen_index_encrypted.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fread.o: ../../contrib/libzip/zip_fread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_archive_comment.o: ../../contrib/libzip/zip_get_archive_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_archive_flag.o: ../../contrib/libzip/zip_get_archive_flag.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_compression_implementation.o: ../../contrib/libzip/zip_get_compression_implementation.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_encryption_implementation.o: ../../contrib/libzip/zip_get_encryption_implementation.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_file_comment.o: ../../contrib/libzip/zip_get_file_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_name.o: ../../contrib/libzip/zip_get_name.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_num_entries.o: ../../contrib/libzip/zip_get_num_entries.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_num_files.o: ../../contrib/libzip/zip_get_num_files.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_memdup.o: ../../contrib/libzip/zip_memdup.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_name_locate.o: ../../contrib/libzip/zip_name_locate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_new.o: ../../contrib/libzip/zip_new.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_open.o: ../../contrib/libzip/zip_open.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_rename.o: ../../contrib/libzip/zip_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_replace.o: ../../contrib/libzip/zip_replace.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_archive_comment.o: ../../contrib/libzip/zip_set_archive_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_archive_flag.o: ../../contrib/libzip/zip_set_archive_flag.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_default_password.o: ../../contrib/libzip/zip_set_default_password.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_file_comment.o: ../../contrib/libzip/zip_set_file_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_file_compression.o: ../../contrib/libzip/zip_set_file_compression.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_name.o: ../../contrib/libzip/zip_set_name.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_buffer.o: ../../contrib/libzip/zip_source_buffer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_close.o: ../../contrib/libzip/zip_source_close.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_crc.o: ../../contrib/libzip/zip_source_crc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_deflate.o: ../../contrib/libzip/zip_source_deflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_error.o: ../../contrib/libzip/zip_source_error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_file.o: ../../contrib/libzip/zip_source_file.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_filep.o: ../../contrib/libzip/zip_source_filep.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_free.o: ../../contrib/libzip/zip_source_free.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_function.o: ../../contrib/libzip/zip_source_function.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_layered.o: ../../contrib/libzip/zip_source_layered.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_open.o: ../../contrib/libzip/zip_source_open.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_pkware.o: ../../contrib/libzip/zip_source_pkware.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_pop.o: ../../contrib/libzip/zip_source_pop.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_read.o: ../../contrib/libzip/zip_source_read.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_stat.o: ../../contrib/libzip/zip_source_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_window.o: ../../contrib/libzip/zip_source_window.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_zip.o: ../../contrib/libzip/zip_source_zip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_zip_new.o: ../../contrib/libzip/zip_source_zip_new.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat.o: ../../contrib/libzip/zip_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat_index.o: ../../contrib/libzip/zip_stat_index.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat_init.o: ../../contrib/libzip/zip_stat_init.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_strerror.o: ../../contrib/libzip/zip_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_string.o: ../../contrib/libzip/zip_string.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange.o: ../../contrib/libzip/zip_unchange.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_all.o: ../../contrib/libzip/zip_unchange_all.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_archive.o: ../../contrib/libzip/zip_unchange_archive.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_data.o: ../../contrib/libzip/zip_unchange_data.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_utf-8.o: ../../contrib/libzip/zip_utf-8.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.macosx/zlib-lib.make b/build/premake/premake5/build/gmake2.macosx/zlib-lib.make deleted file mode 100644 index 98abbb379c..0000000000 --- a/build/premake/premake5/build/gmake2.macosx/zlib-lib.make +++ /dev/null @@ -1,215 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -INCLUDES += -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -ALL_LDFLAGS += $(LDFLAGS) -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libzlib-lib.a -OBJDIR = obj/Release/zlib-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DN_FSEEKO -DHAVE_UNISTD_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libzlib-lib.a -OBJDIR = obj/Debug/zlib-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DN_FSEEKO -DHAVE_UNISTD_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/adler32.o -GENERATED += $(OBJDIR)/compress.o -GENERATED += $(OBJDIR)/crc32.o -GENERATED += $(OBJDIR)/deflate.o -GENERATED += $(OBJDIR)/gzclose.o -GENERATED += $(OBJDIR)/gzlib.o -GENERATED += $(OBJDIR)/gzread.o -GENERATED += $(OBJDIR)/gzwrite.o -GENERATED += $(OBJDIR)/infback.o -GENERATED += $(OBJDIR)/inffast.o -GENERATED += $(OBJDIR)/inflate.o -GENERATED += $(OBJDIR)/inftrees.o -GENERATED += $(OBJDIR)/trees.o -GENERATED += $(OBJDIR)/uncompr.o -GENERATED += $(OBJDIR)/zutil.o -OBJECTS += $(OBJDIR)/adler32.o -OBJECTS += $(OBJDIR)/compress.o -OBJECTS += $(OBJDIR)/crc32.o -OBJECTS += $(OBJDIR)/deflate.o -OBJECTS += $(OBJDIR)/gzclose.o -OBJECTS += $(OBJDIR)/gzlib.o -OBJECTS += $(OBJDIR)/gzread.o -OBJECTS += $(OBJDIR)/gzwrite.o -OBJECTS += $(OBJDIR)/infback.o -OBJECTS += $(OBJDIR)/inffast.o -OBJECTS += $(OBJDIR)/inflate.o -OBJECTS += $(OBJDIR)/inftrees.o -OBJECTS += $(OBJDIR)/trees.o -OBJECTS += $(OBJDIR)/uncompr.o -OBJECTS += $(OBJDIR)/zutil.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking zlib-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning zlib-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/adler32.o: ../../contrib/zlib/adler32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/compress.o: ../../contrib/zlib/compress.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/crc32.o: ../../contrib/zlib/crc32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/deflate.o: ../../contrib/zlib/deflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzclose.o: ../../contrib/zlib/gzclose.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzlib.o: ../../contrib/zlib/gzlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzread.o: ../../contrib/zlib/gzread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzwrite.o: ../../contrib/zlib/gzwrite.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/infback.o: ../../contrib/zlib/infback.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inffast.o: ../../contrib/zlib/inffast.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inflate.o: ../../contrib/zlib/inflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inftrees.o: ../../contrib/zlib/inftrees.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/trees.o: ../../contrib/zlib/trees.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/uncompr.o: ../../contrib/zlib/uncompr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zutil.o: ../../contrib/zlib/zutil.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/Makefile b/build/premake/premake5/build/gmake2.unix/Makefile deleted file mode 100644 index ae6d5ac4ce..0000000000 --- a/build/premake/premake5/build/gmake2.unix/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -# Alternative GNU Make workspace makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -ifeq ($(config),release) - Premake5_config = release - lua_lib_config = release - luashim_lib_config = release - zlib_lib_config = release - zip_lib_config = release - mbedtls_lib_config = release - curl_lib_config = release - example_config = release - luasocket_config = release - -else ifeq ($(config),debug) - Premake5_config = debug - lua_lib_config = debug - luashim_lib_config = debug - zlib_lib_config = debug - zip_lib_config = debug - mbedtls_lib_config = debug - curl_lib_config = debug - example_config = debug - luasocket_config = debug - -else - $(error "invalid configuration $(config)") -endif - -PROJECTS := Premake5 lua-lib luashim-lib zlib-lib zip-lib mbedtls-lib curl-lib example luasocket - -.PHONY: all clean help $(PROJECTS) Binary Modules contrib - -all: $(PROJECTS) - -Binary Modules: example luasocket - -contrib: curl-lib lua-lib luashim-lib mbedtls-lib zip-lib zlib-lib - -Premake5: lua-lib zip-lib zlib-lib curl-lib mbedtls-lib -ifneq (,$(Premake5_config)) - @echo "==== Building Premake5 ($(Premake5_config)) ====" - @${MAKE} --no-print-directory -C . -f Premake5.make config=$(Premake5_config) -endif - -lua-lib: -ifneq (,$(lua_lib_config)) - @echo "==== Building lua-lib ($(lua_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f lua-lib.make config=$(lua_lib_config) -endif - -luashim-lib: -ifneq (,$(luashim_lib_config)) - @echo "==== Building luashim-lib ($(luashim_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f luashim-lib.make config=$(luashim_lib_config) -endif - -zlib-lib: -ifneq (,$(zlib_lib_config)) - @echo "==== Building zlib-lib ($(zlib_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f zlib-lib.make config=$(zlib_lib_config) -endif - -zip-lib: -ifneq (,$(zip_lib_config)) - @echo "==== Building zip-lib ($(zip_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f zip-lib.make config=$(zip_lib_config) -endif - -mbedtls-lib: -ifneq (,$(mbedtls_lib_config)) - @echo "==== Building mbedtls-lib ($(mbedtls_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f mbedtls-lib.make config=$(mbedtls_lib_config) -endif - -curl-lib: -ifneq (,$(curl_lib_config)) - @echo "==== Building curl-lib ($(curl_lib_config)) ====" - @${MAKE} --no-print-directory -C . -f curl-lib.make config=$(curl_lib_config) -endif - -example: luashim-lib -ifneq (,$(example_config)) - @echo "==== Building example ($(example_config)) ====" - @${MAKE} --no-print-directory -C . -f example.make config=$(example_config) -endif - -luasocket: luashim-lib -ifneq (,$(luasocket_config)) - @echo "==== Building luasocket ($(luasocket_config)) ====" - @${MAKE} --no-print-directory -C . -f luasocket.make config=$(luasocket_config) -endif - -clean: - @${MAKE} --no-print-directory -C . -f Premake5.make clean - @${MAKE} --no-print-directory -C . -f lua-lib.make clean - @${MAKE} --no-print-directory -C . -f luashim-lib.make clean - @${MAKE} --no-print-directory -C . -f zlib-lib.make clean - @${MAKE} --no-print-directory -C . -f zip-lib.make clean - @${MAKE} --no-print-directory -C . -f mbedtls-lib.make clean - @${MAKE} --no-print-directory -C . -f curl-lib.make clean - @${MAKE} --no-print-directory -C . -f example.make clean - @${MAKE} --no-print-directory -C . -f luasocket.make clean - -help: - @echo "Usage: make [config=name] [target]" - @echo "" - @echo "CONFIGURATIONS:" - @echo " release" - @echo " debug" - @echo "" - @echo "TARGETS:" - @echo " all (default)" - @echo " clean" - @echo " Premake5" - @echo " lua-lib" - @echo " luashim-lib" - @echo " zlib-lib" - @echo " zip-lib" - @echo " mbedtls-lib" - @echo " curl-lib" - @echo " example" - @echo " luasocket" - @echo "" - @echo "For more information, see https://github.com/premake/premake-core/wiki" \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/Premake5.make b/build/premake/premake5/build/gmake2.unix/Premake5.make deleted file mode 100644 index dbb8cdc8e4..0000000000 --- a/build/premake/premake5/build/gmake2.unix/Premake5.make +++ /dev/null @@ -1,390 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -I../../contrib/zlib -I../../contrib/libzip -I../../contrib/curl/include -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/premake5 -OBJDIR = obj/Release/Premake5 -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm -ldl -lrt -LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/premake5 -OBJDIR = obj/Debug/Premake5 -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm -ldl -lrt -LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -ALL_LDFLAGS += $(LDFLAGS) -rdynamic - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/buffered_io.o -GENERATED += $(OBJDIR)/criteria_matches.o -GENERATED += $(OBJDIR)/curl_utils.o -GENERATED += $(OBJDIR)/debug_prompt.o -GENERATED += $(OBJDIR)/http_download.o -GENERATED += $(OBJDIR)/http_get.o -GENERATED += $(OBJDIR)/http_post.o -GENERATED += $(OBJDIR)/lua_auxlib.o -GENERATED += $(OBJDIR)/os_chdir.o -GENERATED += $(OBJDIR)/os_chmod.o -GENERATED += $(OBJDIR)/os_comparefiles.o -GENERATED += $(OBJDIR)/os_compile.o -GENERATED += $(OBJDIR)/os_copyfile.o -GENERATED += $(OBJDIR)/os_getWindowsRegistry.o -GENERATED += $(OBJDIR)/os_getcwd.o -GENERATED += $(OBJDIR)/os_getpass.o -GENERATED += $(OBJDIR)/os_getversion.o -GENERATED += $(OBJDIR)/os_host.o -GENERATED += $(OBJDIR)/os_is64bit.o -GENERATED += $(OBJDIR)/os_isdir.o -GENERATED += $(OBJDIR)/os_isfile.o -GENERATED += $(OBJDIR)/os_islink.o -GENERATED += $(OBJDIR)/os_listWindowsRegistry.o -GENERATED += $(OBJDIR)/os_locate.o -GENERATED += $(OBJDIR)/os_match.o -GENERATED += $(OBJDIR)/os_mkdir.o -GENERATED += $(OBJDIR)/os_pathsearch.o -GENERATED += $(OBJDIR)/os_realpath.o -GENERATED += $(OBJDIR)/os_remove.o -GENERATED += $(OBJDIR)/os_rename.o -GENERATED += $(OBJDIR)/os_rmdir.o -GENERATED += $(OBJDIR)/os_stat.o -GENERATED += $(OBJDIR)/os_touchfile.o -GENERATED += $(OBJDIR)/os_uuid.o -GENERATED += $(OBJDIR)/os_writefile_ifnotequal.o -GENERATED += $(OBJDIR)/path_getabsolute.o -GENERATED += $(OBJDIR)/path_getrelative.o -GENERATED += $(OBJDIR)/path_isabsolute.o -GENERATED += $(OBJDIR)/path_join.o -GENERATED += $(OBJDIR)/path_normalize.o -GENERATED += $(OBJDIR)/path_translate.o -GENERATED += $(OBJDIR)/path_wildcards.o -GENERATED += $(OBJDIR)/premake.o -GENERATED += $(OBJDIR)/premake_main.o -GENERATED += $(OBJDIR)/scripts.o -GENERATED += $(OBJDIR)/string_endswith.o -GENERATED += $(OBJDIR)/string_hash.o -GENERATED += $(OBJDIR)/string_sha1.o -GENERATED += $(OBJDIR)/string_startswith.o -GENERATED += $(OBJDIR)/term_textColor.o -GENERATED += $(OBJDIR)/zip_extract.o -OBJECTS += $(OBJDIR)/buffered_io.o -OBJECTS += $(OBJDIR)/criteria_matches.o -OBJECTS += $(OBJDIR)/curl_utils.o -OBJECTS += $(OBJDIR)/debug_prompt.o -OBJECTS += $(OBJDIR)/http_download.o -OBJECTS += $(OBJDIR)/http_get.o -OBJECTS += $(OBJDIR)/http_post.o -OBJECTS += $(OBJDIR)/lua_auxlib.o -OBJECTS += $(OBJDIR)/os_chdir.o -OBJECTS += $(OBJDIR)/os_chmod.o -OBJECTS += $(OBJDIR)/os_comparefiles.o -OBJECTS += $(OBJDIR)/os_compile.o -OBJECTS += $(OBJDIR)/os_copyfile.o -OBJECTS += $(OBJDIR)/os_getWindowsRegistry.o -OBJECTS += $(OBJDIR)/os_getcwd.o -OBJECTS += $(OBJDIR)/os_getpass.o -OBJECTS += $(OBJDIR)/os_getversion.o -OBJECTS += $(OBJDIR)/os_host.o -OBJECTS += $(OBJDIR)/os_is64bit.o -OBJECTS += $(OBJDIR)/os_isdir.o -OBJECTS += $(OBJDIR)/os_isfile.o -OBJECTS += $(OBJDIR)/os_islink.o -OBJECTS += $(OBJDIR)/os_listWindowsRegistry.o -OBJECTS += $(OBJDIR)/os_locate.o -OBJECTS += $(OBJDIR)/os_match.o -OBJECTS += $(OBJDIR)/os_mkdir.o -OBJECTS += $(OBJDIR)/os_pathsearch.o -OBJECTS += $(OBJDIR)/os_realpath.o -OBJECTS += $(OBJDIR)/os_remove.o -OBJECTS += $(OBJDIR)/os_rename.o -OBJECTS += $(OBJDIR)/os_rmdir.o -OBJECTS += $(OBJDIR)/os_stat.o -OBJECTS += $(OBJDIR)/os_touchfile.o -OBJECTS += $(OBJDIR)/os_uuid.o -OBJECTS += $(OBJDIR)/os_writefile_ifnotequal.o -OBJECTS += $(OBJDIR)/path_getabsolute.o -OBJECTS += $(OBJDIR)/path_getrelative.o -OBJECTS += $(OBJDIR)/path_isabsolute.o -OBJECTS += $(OBJDIR)/path_join.o -OBJECTS += $(OBJDIR)/path_normalize.o -OBJECTS += $(OBJDIR)/path_translate.o -OBJECTS += $(OBJDIR)/path_wildcards.o -OBJECTS += $(OBJDIR)/premake.o -OBJECTS += $(OBJDIR)/premake_main.o -OBJECTS += $(OBJDIR)/scripts.o -OBJECTS += $(OBJDIR)/string_endswith.o -OBJECTS += $(OBJDIR)/string_hash.o -OBJECTS += $(OBJDIR)/string_sha1.o -OBJECTS += $(OBJDIR)/string_startswith.o -OBJECTS += $(OBJDIR)/term_textColor.o -OBJECTS += $(OBJDIR)/zip_extract.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking Premake5 - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning Premake5 -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/buffered_io.o: ../../src/host/buffered_io.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/criteria_matches.o: ../../src/host/criteria_matches.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_utils.o: ../../src/host/curl_utils.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/debug_prompt.o: ../../src/host/debug_prompt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_download.o: ../../src/host/http_download.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_get.o: ../../src/host/http_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_post.o: ../../src/host/http_post.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lua_auxlib.o: ../../src/host/lua_auxlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_chdir.o: ../../src/host/os_chdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_chmod.o: ../../src/host/os_chmod.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_comparefiles.o: ../../src/host/os_comparefiles.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_compile.o: ../../src/host/os_compile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_copyfile.o: ../../src/host/os_copyfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getWindowsRegistry.o: ../../src/host/os_getWindowsRegistry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getcwd.o: ../../src/host/os_getcwd.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getpass.o: ../../src/host/os_getpass.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_getversion.o: ../../src/host/os_getversion.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_host.o: ../../src/host/os_host.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_is64bit.o: ../../src/host/os_is64bit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_isdir.o: ../../src/host/os_isdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_isfile.o: ../../src/host/os_isfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_islink.o: ../../src/host/os_islink.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_listWindowsRegistry.o: ../../src/host/os_listWindowsRegistry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_locate.o: ../../src/host/os_locate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_match.o: ../../src/host/os_match.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_mkdir.o: ../../src/host/os_mkdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_pathsearch.o: ../../src/host/os_pathsearch.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_realpath.o: ../../src/host/os_realpath.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_remove.o: ../../src/host/os_remove.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_rename.o: ../../src/host/os_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_rmdir.o: ../../src/host/os_rmdir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_stat.o: ../../src/host/os_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_touchfile.o: ../../src/host/os_touchfile.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_uuid.o: ../../src/host/os_uuid.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/os_writefile_ifnotequal.o: ../../src/host/os_writefile_ifnotequal.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_getabsolute.o: ../../src/host/path_getabsolute.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_getrelative.o: ../../src/host/path_getrelative.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_isabsolute.o: ../../src/host/path_isabsolute.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_join.o: ../../src/host/path_join.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_normalize.o: ../../src/host/path_normalize.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_translate.o: ../../src/host/path_translate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/path_wildcards.o: ../../src/host/path_wildcards.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/premake.o: ../../src/host/premake.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/premake_main.o: ../../src/host/premake_main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_endswith.o: ../../src/host/string_endswith.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_hash.o: ../../src/host/string_hash.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_sha1.o: ../../src/host/string_sha1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/string_startswith.o: ../../src/host/string_startswith.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/term_textColor.o: ../../src/host/term_textColor.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extract.o: ../../src/host/zip_extract.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/scripts.o: ../../src/scripts.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/curl-lib.make b/build/premake/premake5/build/gmake2.unix/curl-lib.make deleted file mode 100644 index bc56dbf066..0000000000 --- a/build/premake/premake5/build/gmake2.unix/curl-lib.make +++ /dev/null @@ -1,768 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/curl/include -I../../contrib/curl/lib -I../../contrib/mbedtls/include -I../../contrib/zlib -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libcurl-lib.a -OBJDIR = obj/Release/curl-lib -DEFINES += -DPREMAKE_COMPRESSION -DPREMAKE_CURL -DNDEBUG -DBUILDING_LIBCURL -DCURL_STATICLIB -DHTTP_ONLY -DUSE_ZLIB -DUSE_MBEDTLS -DCURL_HIDDEN_SYMBOLS -DCURL_CA_BUNDLE=\"/etc/ssl/cert.pem\" -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libcurl-lib.a -OBJDIR = obj/Debug/curl-lib -DEFINES += -DPREMAKE_COMPRESSION -DPREMAKE_CURL -D_DEBUG -DBUILDING_LIBCURL -DCURL_STATICLIB -DHTTP_ONLY -DUSE_ZLIB -DUSE_MBEDTLS -DCURL_HIDDEN_SYMBOLS -DCURL_CA_BUNDLE=\"/etc/ssl/cert.pem\" -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/amigaos.o -GENERATED += $(OBJDIR)/asyn-ares.o -GENERATED += $(OBJDIR)/asyn-thread.o -GENERATED += $(OBJDIR)/axtls.o -GENERATED += $(OBJDIR)/base64.o -GENERATED += $(OBJDIR)/cleartext.o -GENERATED += $(OBJDIR)/conncache.o -GENERATED += $(OBJDIR)/connect.o -GENERATED += $(OBJDIR)/content_encoding.o -GENERATED += $(OBJDIR)/cookie.o -GENERATED += $(OBJDIR)/cram.o -GENERATED += $(OBJDIR)/curl_addrinfo.o -GENERATED += $(OBJDIR)/curl_des.o -GENERATED += $(OBJDIR)/curl_endian.o -GENERATED += $(OBJDIR)/curl_fnmatch.o -GENERATED += $(OBJDIR)/curl_gethostname.o -GENERATED += $(OBJDIR)/curl_gssapi.o -GENERATED += $(OBJDIR)/curl_memrchr.o -GENERATED += $(OBJDIR)/curl_multibyte.o -GENERATED += $(OBJDIR)/curl_ntlm_core.o -GENERATED += $(OBJDIR)/curl_ntlm_wb.o -GENERATED += $(OBJDIR)/curl_rtmp.o -GENERATED += $(OBJDIR)/curl_sasl.o -GENERATED += $(OBJDIR)/curl_sspi.o -GENERATED += $(OBJDIR)/curl_threads.o -GENERATED += $(OBJDIR)/cyassl.o -GENERATED += $(OBJDIR)/darwinssl.o -GENERATED += $(OBJDIR)/dict.o -GENERATED += $(OBJDIR)/digest.o -GENERATED += $(OBJDIR)/digest_sspi.o -GENERATED += $(OBJDIR)/dotdot.o -GENERATED += $(OBJDIR)/easy.o -GENERATED += $(OBJDIR)/escape.o -GENERATED += $(OBJDIR)/file.o -GENERATED += $(OBJDIR)/fileinfo.o -GENERATED += $(OBJDIR)/formdata.o -GENERATED += $(OBJDIR)/ftp.o -GENERATED += $(OBJDIR)/ftplistparser.o -GENERATED += $(OBJDIR)/getenv.o -GENERATED += $(OBJDIR)/getinfo.o -GENERATED += $(OBJDIR)/gopher.o -GENERATED += $(OBJDIR)/gskit.o -GENERATED += $(OBJDIR)/gtls.o -GENERATED += $(OBJDIR)/hash.o -GENERATED += $(OBJDIR)/hmac.o -GENERATED += $(OBJDIR)/hostasyn.o -GENERATED += $(OBJDIR)/hostcheck.o -GENERATED += $(OBJDIR)/hostip.o -GENERATED += $(OBJDIR)/hostip4.o -GENERATED += $(OBJDIR)/hostip6.o -GENERATED += $(OBJDIR)/hostsyn.o -GENERATED += $(OBJDIR)/http.o -GENERATED += $(OBJDIR)/http2.o -GENERATED += $(OBJDIR)/http_chunks.o -GENERATED += $(OBJDIR)/http_digest.o -GENERATED += $(OBJDIR)/http_negotiate.o -GENERATED += $(OBJDIR)/http_ntlm.o -GENERATED += $(OBJDIR)/http_proxy.o -GENERATED += $(OBJDIR)/idn_win32.o -GENERATED += $(OBJDIR)/if2ip.o -GENERATED += $(OBJDIR)/imap.o -GENERATED += $(OBJDIR)/inet_ntop.o -GENERATED += $(OBJDIR)/inet_pton.o -GENERATED += $(OBJDIR)/krb5.o -GENERATED += $(OBJDIR)/krb5_gssapi.o -GENERATED += $(OBJDIR)/krb5_sspi.o -GENERATED += $(OBJDIR)/ldap.o -GENERATED += $(OBJDIR)/llist.o -GENERATED += $(OBJDIR)/mbedtls.o -GENERATED += $(OBJDIR)/md4.o -GENERATED += $(OBJDIR)/md5.o -GENERATED += $(OBJDIR)/memdebug.o -GENERATED += $(OBJDIR)/mprintf.o -GENERATED += $(OBJDIR)/multi.o -GENERATED += $(OBJDIR)/netrc.o -GENERATED += $(OBJDIR)/non-ascii.o -GENERATED += $(OBJDIR)/nonblock.o -GENERATED += $(OBJDIR)/nss.o -GENERATED += $(OBJDIR)/ntlm.o -GENERATED += $(OBJDIR)/ntlm_sspi.o -GENERATED += $(OBJDIR)/nwlib.o -GENERATED += $(OBJDIR)/nwos.o -GENERATED += $(OBJDIR)/oauth2.o -GENERATED += $(OBJDIR)/openldap.o -GENERATED += $(OBJDIR)/openssl.o -GENERATED += $(OBJDIR)/parsedate.o -GENERATED += $(OBJDIR)/pingpong.o -GENERATED += $(OBJDIR)/pipeline.o -GENERATED += $(OBJDIR)/polarssl.o -GENERATED += $(OBJDIR)/polarssl_threadlock.o -GENERATED += $(OBJDIR)/pop3.o -GENERATED += $(OBJDIR)/progress.o -GENERATED += $(OBJDIR)/rand.o -GENERATED += $(OBJDIR)/rtsp.o -GENERATED += $(OBJDIR)/schannel.o -GENERATED += $(OBJDIR)/security.o -GENERATED += $(OBJDIR)/select.o -GENERATED += $(OBJDIR)/sendf.o -GENERATED += $(OBJDIR)/share.o -GENERATED += $(OBJDIR)/slist.o -GENERATED += $(OBJDIR)/smb.o -GENERATED += $(OBJDIR)/smtp.o -GENERATED += $(OBJDIR)/socks.o -GENERATED += $(OBJDIR)/socks_gssapi.o -GENERATED += $(OBJDIR)/socks_sspi.o -GENERATED += $(OBJDIR)/speedcheck.o -GENERATED += $(OBJDIR)/splay.o -GENERATED += $(OBJDIR)/spnego_gssapi.o -GENERATED += $(OBJDIR)/spnego_sspi.o -GENERATED += $(OBJDIR)/ssh.o -GENERATED += $(OBJDIR)/strcase.o -GENERATED += $(OBJDIR)/strdup.o -GENERATED += $(OBJDIR)/strerror.o -GENERATED += $(OBJDIR)/strtok.o -GENERATED += $(OBJDIR)/strtoofft.o -GENERATED += $(OBJDIR)/system_win32.o -GENERATED += $(OBJDIR)/telnet.o -GENERATED += $(OBJDIR)/tftp.o -GENERATED += $(OBJDIR)/timeval.o -GENERATED += $(OBJDIR)/transfer.o -GENERATED += $(OBJDIR)/url.o -GENERATED += $(OBJDIR)/vauth.o -GENERATED += $(OBJDIR)/version.o -GENERATED += $(OBJDIR)/vtls.o -GENERATED += $(OBJDIR)/warnless.o -GENERATED += $(OBJDIR)/wildcard.o -GENERATED += $(OBJDIR)/x509asn1.o -OBJECTS += $(OBJDIR)/amigaos.o -OBJECTS += $(OBJDIR)/asyn-ares.o -OBJECTS += $(OBJDIR)/asyn-thread.o -OBJECTS += $(OBJDIR)/axtls.o -OBJECTS += $(OBJDIR)/base64.o -OBJECTS += $(OBJDIR)/cleartext.o -OBJECTS += $(OBJDIR)/conncache.o -OBJECTS += $(OBJDIR)/connect.o -OBJECTS += $(OBJDIR)/content_encoding.o -OBJECTS += $(OBJDIR)/cookie.o -OBJECTS += $(OBJDIR)/cram.o -OBJECTS += $(OBJDIR)/curl_addrinfo.o -OBJECTS += $(OBJDIR)/curl_des.o -OBJECTS += $(OBJDIR)/curl_endian.o -OBJECTS += $(OBJDIR)/curl_fnmatch.o -OBJECTS += $(OBJDIR)/curl_gethostname.o -OBJECTS += $(OBJDIR)/curl_gssapi.o -OBJECTS += $(OBJDIR)/curl_memrchr.o -OBJECTS += $(OBJDIR)/curl_multibyte.o -OBJECTS += $(OBJDIR)/curl_ntlm_core.o -OBJECTS += $(OBJDIR)/curl_ntlm_wb.o -OBJECTS += $(OBJDIR)/curl_rtmp.o -OBJECTS += $(OBJDIR)/curl_sasl.o -OBJECTS += $(OBJDIR)/curl_sspi.o -OBJECTS += $(OBJDIR)/curl_threads.o -OBJECTS += $(OBJDIR)/cyassl.o -OBJECTS += $(OBJDIR)/darwinssl.o -OBJECTS += $(OBJDIR)/dict.o -OBJECTS += $(OBJDIR)/digest.o -OBJECTS += $(OBJDIR)/digest_sspi.o -OBJECTS += $(OBJDIR)/dotdot.o -OBJECTS += $(OBJDIR)/easy.o -OBJECTS += $(OBJDIR)/escape.o -OBJECTS += $(OBJDIR)/file.o -OBJECTS += $(OBJDIR)/fileinfo.o -OBJECTS += $(OBJDIR)/formdata.o -OBJECTS += $(OBJDIR)/ftp.o -OBJECTS += $(OBJDIR)/ftplistparser.o -OBJECTS += $(OBJDIR)/getenv.o -OBJECTS += $(OBJDIR)/getinfo.o -OBJECTS += $(OBJDIR)/gopher.o -OBJECTS += $(OBJDIR)/gskit.o -OBJECTS += $(OBJDIR)/gtls.o -OBJECTS += $(OBJDIR)/hash.o -OBJECTS += $(OBJDIR)/hmac.o -OBJECTS += $(OBJDIR)/hostasyn.o -OBJECTS += $(OBJDIR)/hostcheck.o -OBJECTS += $(OBJDIR)/hostip.o -OBJECTS += $(OBJDIR)/hostip4.o -OBJECTS += $(OBJDIR)/hostip6.o -OBJECTS += $(OBJDIR)/hostsyn.o -OBJECTS += $(OBJDIR)/http.o -OBJECTS += $(OBJDIR)/http2.o -OBJECTS += $(OBJDIR)/http_chunks.o -OBJECTS += $(OBJDIR)/http_digest.o -OBJECTS += $(OBJDIR)/http_negotiate.o -OBJECTS += $(OBJDIR)/http_ntlm.o -OBJECTS += $(OBJDIR)/http_proxy.o -OBJECTS += $(OBJDIR)/idn_win32.o -OBJECTS += $(OBJDIR)/if2ip.o -OBJECTS += $(OBJDIR)/imap.o -OBJECTS += $(OBJDIR)/inet_ntop.o -OBJECTS += $(OBJDIR)/inet_pton.o -OBJECTS += $(OBJDIR)/krb5.o -OBJECTS += $(OBJDIR)/krb5_gssapi.o -OBJECTS += $(OBJDIR)/krb5_sspi.o -OBJECTS += $(OBJDIR)/ldap.o -OBJECTS += $(OBJDIR)/llist.o -OBJECTS += $(OBJDIR)/mbedtls.o -OBJECTS += $(OBJDIR)/md4.o -OBJECTS += $(OBJDIR)/md5.o -OBJECTS += $(OBJDIR)/memdebug.o -OBJECTS += $(OBJDIR)/mprintf.o -OBJECTS += $(OBJDIR)/multi.o -OBJECTS += $(OBJDIR)/netrc.o -OBJECTS += $(OBJDIR)/non-ascii.o -OBJECTS += $(OBJDIR)/nonblock.o -OBJECTS += $(OBJDIR)/nss.o -OBJECTS += $(OBJDIR)/ntlm.o -OBJECTS += $(OBJDIR)/ntlm_sspi.o -OBJECTS += $(OBJDIR)/nwlib.o -OBJECTS += $(OBJDIR)/nwos.o -OBJECTS += $(OBJDIR)/oauth2.o -OBJECTS += $(OBJDIR)/openldap.o -OBJECTS += $(OBJDIR)/openssl.o -OBJECTS += $(OBJDIR)/parsedate.o -OBJECTS += $(OBJDIR)/pingpong.o -OBJECTS += $(OBJDIR)/pipeline.o -OBJECTS += $(OBJDIR)/polarssl.o -OBJECTS += $(OBJDIR)/polarssl_threadlock.o -OBJECTS += $(OBJDIR)/pop3.o -OBJECTS += $(OBJDIR)/progress.o -OBJECTS += $(OBJDIR)/rand.o -OBJECTS += $(OBJDIR)/rtsp.o -OBJECTS += $(OBJDIR)/schannel.o -OBJECTS += $(OBJDIR)/security.o -OBJECTS += $(OBJDIR)/select.o -OBJECTS += $(OBJDIR)/sendf.o -OBJECTS += $(OBJDIR)/share.o -OBJECTS += $(OBJDIR)/slist.o -OBJECTS += $(OBJDIR)/smb.o -OBJECTS += $(OBJDIR)/smtp.o -OBJECTS += $(OBJDIR)/socks.o -OBJECTS += $(OBJDIR)/socks_gssapi.o -OBJECTS += $(OBJDIR)/socks_sspi.o -OBJECTS += $(OBJDIR)/speedcheck.o -OBJECTS += $(OBJDIR)/splay.o -OBJECTS += $(OBJDIR)/spnego_gssapi.o -OBJECTS += $(OBJDIR)/spnego_sspi.o -OBJECTS += $(OBJDIR)/ssh.o -OBJECTS += $(OBJDIR)/strcase.o -OBJECTS += $(OBJDIR)/strdup.o -OBJECTS += $(OBJDIR)/strerror.o -OBJECTS += $(OBJDIR)/strtok.o -OBJECTS += $(OBJDIR)/strtoofft.o -OBJECTS += $(OBJDIR)/system_win32.o -OBJECTS += $(OBJDIR)/telnet.o -OBJECTS += $(OBJDIR)/tftp.o -OBJECTS += $(OBJDIR)/timeval.o -OBJECTS += $(OBJDIR)/transfer.o -OBJECTS += $(OBJDIR)/url.o -OBJECTS += $(OBJDIR)/vauth.o -OBJECTS += $(OBJDIR)/version.o -OBJECTS += $(OBJDIR)/vtls.o -OBJECTS += $(OBJDIR)/warnless.o -OBJECTS += $(OBJDIR)/wildcard.o -OBJECTS += $(OBJDIR)/x509asn1.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking curl-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning curl-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/amigaos.o: ../../contrib/curl/lib/amigaos.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asyn-ares.o: ../../contrib/curl/lib/asyn-ares.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asyn-thread.o: ../../contrib/curl/lib/asyn-thread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/base64.o: ../../contrib/curl/lib/base64.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/conncache.o: ../../contrib/curl/lib/conncache.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/connect.o: ../../contrib/curl/lib/connect.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/content_encoding.o: ../../contrib/curl/lib/content_encoding.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cookie.o: ../../contrib/curl/lib/cookie.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_addrinfo.o: ../../contrib/curl/lib/curl_addrinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_des.o: ../../contrib/curl/lib/curl_des.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_endian.o: ../../contrib/curl/lib/curl_endian.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_fnmatch.o: ../../contrib/curl/lib/curl_fnmatch.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_gethostname.o: ../../contrib/curl/lib/curl_gethostname.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_gssapi.o: ../../contrib/curl/lib/curl_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_memrchr.o: ../../contrib/curl/lib/curl_memrchr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_multibyte.o: ../../contrib/curl/lib/curl_multibyte.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_ntlm_core.o: ../../contrib/curl/lib/curl_ntlm_core.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_ntlm_wb.o: ../../contrib/curl/lib/curl_ntlm_wb.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_rtmp.o: ../../contrib/curl/lib/curl_rtmp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_sasl.o: ../../contrib/curl/lib/curl_sasl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_sspi.o: ../../contrib/curl/lib/curl_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/curl_threads.o: ../../contrib/curl/lib/curl_threads.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dict.o: ../../contrib/curl/lib/dict.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dotdot.o: ../../contrib/curl/lib/dotdot.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/easy.o: ../../contrib/curl/lib/easy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/escape.o: ../../contrib/curl/lib/escape.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/file.o: ../../contrib/curl/lib/file.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/fileinfo.o: ../../contrib/curl/lib/fileinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/formdata.o: ../../contrib/curl/lib/formdata.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ftp.o: ../../contrib/curl/lib/ftp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ftplistparser.o: ../../contrib/curl/lib/ftplistparser.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/getenv.o: ../../contrib/curl/lib/getenv.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/getinfo.o: ../../contrib/curl/lib/getinfo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gopher.o: ../../contrib/curl/lib/gopher.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hash.o: ../../contrib/curl/lib/hash.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hmac.o: ../../contrib/curl/lib/hmac.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostasyn.o: ../../contrib/curl/lib/hostasyn.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostcheck.o: ../../contrib/curl/lib/hostcheck.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip.o: ../../contrib/curl/lib/hostip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip4.o: ../../contrib/curl/lib/hostip4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostip6.o: ../../contrib/curl/lib/hostip6.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hostsyn.o: ../../contrib/curl/lib/hostsyn.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http.o: ../../contrib/curl/lib/http.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http2.o: ../../contrib/curl/lib/http2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_chunks.o: ../../contrib/curl/lib/http_chunks.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_digest.o: ../../contrib/curl/lib/http_digest.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_negotiate.o: ../../contrib/curl/lib/http_negotiate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_ntlm.o: ../../contrib/curl/lib/http_ntlm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/http_proxy.o: ../../contrib/curl/lib/http_proxy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/idn_win32.o: ../../contrib/curl/lib/idn_win32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/if2ip.o: ../../contrib/curl/lib/if2ip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/imap.o: ../../contrib/curl/lib/imap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet_ntop.o: ../../contrib/curl/lib/inet_ntop.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet_pton.o: ../../contrib/curl/lib/inet_pton.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5.o: ../../contrib/curl/lib/krb5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldap.o: ../../contrib/curl/lib/ldap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/llist.o: ../../contrib/curl/lib/llist.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md4.o: ../../contrib/curl/lib/md4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md5.o: ../../contrib/curl/lib/md5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/memdebug.o: ../../contrib/curl/lib/memdebug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mprintf.o: ../../contrib/curl/lib/mprintf.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/multi.o: ../../contrib/curl/lib/multi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/netrc.o: ../../contrib/curl/lib/netrc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/non-ascii.o: ../../contrib/curl/lib/non-ascii.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nonblock.o: ../../contrib/curl/lib/nonblock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nwlib.o: ../../contrib/curl/lib/nwlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nwos.o: ../../contrib/curl/lib/nwos.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/openldap.o: ../../contrib/curl/lib/openldap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/parsedate.o: ../../contrib/curl/lib/parsedate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pingpong.o: ../../contrib/curl/lib/pingpong.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pipeline.o: ../../contrib/curl/lib/pipeline.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pop3.o: ../../contrib/curl/lib/pop3.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/progress.o: ../../contrib/curl/lib/progress.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rand.o: ../../contrib/curl/lib/rand.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rtsp.o: ../../contrib/curl/lib/rtsp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/security.o: ../../contrib/curl/lib/security.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/select.o: ../../contrib/curl/lib/select.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sendf.o: ../../contrib/curl/lib/sendf.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/share.o: ../../contrib/curl/lib/share.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/slist.o: ../../contrib/curl/lib/slist.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/smb.o: ../../contrib/curl/lib/smb.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/smtp.o: ../../contrib/curl/lib/smtp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks.o: ../../contrib/curl/lib/socks.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks_gssapi.o: ../../contrib/curl/lib/socks_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/socks_sspi.o: ../../contrib/curl/lib/socks_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/speedcheck.o: ../../contrib/curl/lib/speedcheck.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/splay.o: ../../contrib/curl/lib/splay.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssh.o: ../../contrib/curl/lib/ssh.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strcase.o: ../../contrib/curl/lib/strcase.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strdup.o: ../../contrib/curl/lib/strdup.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strerror.o: ../../contrib/curl/lib/strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strtok.o: ../../contrib/curl/lib/strtok.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/strtoofft.o: ../../contrib/curl/lib/strtoofft.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/system_win32.o: ../../contrib/curl/lib/system_win32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/telnet.o: ../../contrib/curl/lib/telnet.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/tftp.o: ../../contrib/curl/lib/tftp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timeval.o: ../../contrib/curl/lib/timeval.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/transfer.o: ../../contrib/curl/lib/transfer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/url.o: ../../contrib/curl/lib/url.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cleartext.o: ../../contrib/curl/lib/vauth/cleartext.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cram.o: ../../contrib/curl/lib/vauth/cram.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/digest.o: ../../contrib/curl/lib/vauth/digest.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/digest_sspi.o: ../../contrib/curl/lib/vauth/digest_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5_gssapi.o: ../../contrib/curl/lib/vauth/krb5_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/krb5_sspi.o: ../../contrib/curl/lib/vauth/krb5_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ntlm.o: ../../contrib/curl/lib/vauth/ntlm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ntlm_sspi.o: ../../contrib/curl/lib/vauth/ntlm_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/oauth2.o: ../../contrib/curl/lib/vauth/oauth2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/spnego_gssapi.o: ../../contrib/curl/lib/vauth/spnego_gssapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/spnego_sspi.o: ../../contrib/curl/lib/vauth/spnego_sspi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/vauth.o: ../../contrib/curl/lib/vauth/vauth.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version.o: ../../contrib/curl/lib/version.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/axtls.o: ../../contrib/curl/lib/vtls/axtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cyassl.o: ../../contrib/curl/lib/vtls/cyassl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/darwinssl.o: ../../contrib/curl/lib/vtls/darwinssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gskit.o: ../../contrib/curl/lib/vtls/gskit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gtls.o: ../../contrib/curl/lib/vtls/gtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mbedtls.o: ../../contrib/curl/lib/vtls/mbedtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/nss.o: ../../contrib/curl/lib/vtls/nss.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/openssl.o: ../../contrib/curl/lib/vtls/openssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/polarssl.o: ../../contrib/curl/lib/vtls/polarssl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/polarssl_threadlock.o: ../../contrib/curl/lib/vtls/polarssl_threadlock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/schannel.o: ../../contrib/curl/lib/vtls/schannel.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/vtls.o: ../../contrib/curl/lib/vtls/vtls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/warnless.o: ../../contrib/curl/lib/warnless.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/wildcard.o: ../../contrib/curl/lib/wildcard.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509asn1.o: ../../contrib/curl/lib/x509asn1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/example.make b/build/premake/premake5/build/gmake2.unix/example.make deleted file mode 100644 index a14a5e41d9..0000000000 --- a/build/premake/premake5/build/gmake2.unix/example.make +++ /dev/null @@ -1,140 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/example.so -OBJDIR = obj/Release/example -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/libluashim-lib.a -LDDEPS += bin/Release/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=example.so -s - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/example.so -OBJDIR = obj/Debug/example -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -LIBS += bin/Debug/libluashim-lib.a -LDDEPS += bin/Debug/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=example.so - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/main.o -OBJECTS += $(OBJDIR)/main.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking example - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning example -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/main.o: ../../binmodules/example/main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/lua-lib.make b/build/premake/premake5/build/gmake2.unix/lua-lib.make deleted file mode 100644 index 90d87a8dcf..0000000000 --- a/build/premake/premake5/build/gmake2.unix/lua-lib.make +++ /dev/null @@ -1,293 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/liblua-lib.a -OBJDIR = obj/Release/lua-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/liblua-lib.a -OBJDIR = obj/Debug/lua-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/lapi.o -GENERATED += $(OBJDIR)/lbaselib.o -GENERATED += $(OBJDIR)/lbitlib.o -GENERATED += $(OBJDIR)/lcode.o -GENERATED += $(OBJDIR)/lcorolib.o -GENERATED += $(OBJDIR)/lctype.o -GENERATED += $(OBJDIR)/ldblib.o -GENERATED += $(OBJDIR)/ldebug.o -GENERATED += $(OBJDIR)/ldo.o -GENERATED += $(OBJDIR)/ldump.o -GENERATED += $(OBJDIR)/lfunc.o -GENERATED += $(OBJDIR)/lgc.o -GENERATED += $(OBJDIR)/linit.o -GENERATED += $(OBJDIR)/liolib.o -GENERATED += $(OBJDIR)/llex.o -GENERATED += $(OBJDIR)/lmathlib.o -GENERATED += $(OBJDIR)/lmem.o -GENERATED += $(OBJDIR)/loadlib.o -GENERATED += $(OBJDIR)/lobject.o -GENERATED += $(OBJDIR)/lopcodes.o -GENERATED += $(OBJDIR)/loslib.o -GENERATED += $(OBJDIR)/lparser.o -GENERATED += $(OBJDIR)/lstate.o -GENERATED += $(OBJDIR)/lstring.o -GENERATED += $(OBJDIR)/lstrlib.o -GENERATED += $(OBJDIR)/ltable.o -GENERATED += $(OBJDIR)/ltablib.o -GENERATED += $(OBJDIR)/ltm.o -GENERATED += $(OBJDIR)/lundump.o -GENERATED += $(OBJDIR)/lutf8lib.o -GENERATED += $(OBJDIR)/lvm.o -GENERATED += $(OBJDIR)/lzio.o -OBJECTS += $(OBJDIR)/lapi.o -OBJECTS += $(OBJDIR)/lbaselib.o -OBJECTS += $(OBJDIR)/lbitlib.o -OBJECTS += $(OBJDIR)/lcode.o -OBJECTS += $(OBJDIR)/lcorolib.o -OBJECTS += $(OBJDIR)/lctype.o -OBJECTS += $(OBJDIR)/ldblib.o -OBJECTS += $(OBJDIR)/ldebug.o -OBJECTS += $(OBJDIR)/ldo.o -OBJECTS += $(OBJDIR)/ldump.o -OBJECTS += $(OBJDIR)/lfunc.o -OBJECTS += $(OBJDIR)/lgc.o -OBJECTS += $(OBJDIR)/linit.o -OBJECTS += $(OBJDIR)/liolib.o -OBJECTS += $(OBJDIR)/llex.o -OBJECTS += $(OBJDIR)/lmathlib.o -OBJECTS += $(OBJDIR)/lmem.o -OBJECTS += $(OBJDIR)/loadlib.o -OBJECTS += $(OBJDIR)/lobject.o -OBJECTS += $(OBJDIR)/lopcodes.o -OBJECTS += $(OBJDIR)/loslib.o -OBJECTS += $(OBJDIR)/lparser.o -OBJECTS += $(OBJDIR)/lstate.o -OBJECTS += $(OBJDIR)/lstring.o -OBJECTS += $(OBJDIR)/lstrlib.o -OBJECTS += $(OBJDIR)/ltable.o -OBJECTS += $(OBJDIR)/ltablib.o -OBJECTS += $(OBJDIR)/ltm.o -OBJECTS += $(OBJDIR)/lundump.o -OBJECTS += $(OBJDIR)/lutf8lib.o -OBJECTS += $(OBJDIR)/lvm.o -OBJECTS += $(OBJDIR)/lzio.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking lua-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning lua-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/lapi.o: ../../contrib/lua/src/lapi.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lbaselib.o: ../../contrib/lua/src/lbaselib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lbitlib.o: ../../contrib/lua/src/lbitlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lcode.o: ../../contrib/lua/src/lcode.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lcorolib.o: ../../contrib/lua/src/lcorolib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lctype.o: ../../contrib/lua/src/lctype.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldblib.o: ../../contrib/lua/src/ldblib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldebug.o: ../../contrib/lua/src/ldebug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldo.o: ../../contrib/lua/src/ldo.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ldump.o: ../../contrib/lua/src/ldump.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lfunc.o: ../../contrib/lua/src/lfunc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lgc.o: ../../contrib/lua/src/lgc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/linit.o: ../../contrib/lua/src/linit.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/liolib.o: ../../contrib/lua/src/liolib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/llex.o: ../../contrib/lua/src/llex.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lmathlib.o: ../../contrib/lua/src/lmathlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lmem.o: ../../contrib/lua/src/lmem.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/loadlib.o: ../../contrib/lua/src/loadlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lobject.o: ../../contrib/lua/src/lobject.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lopcodes.o: ../../contrib/lua/src/lopcodes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/loslib.o: ../../contrib/lua/src/loslib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lparser.o: ../../contrib/lua/src/lparser.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstate.o: ../../contrib/lua/src/lstate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstring.o: ../../contrib/lua/src/lstring.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lstrlib.o: ../../contrib/lua/src/lstrlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltable.o: ../../contrib/lua/src/ltable.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltablib.o: ../../contrib/lua/src/ltablib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ltm.o: ../../contrib/lua/src/ltm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lundump.o: ../../contrib/lua/src/lundump.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lutf8lib.o: ../../contrib/lua/src/lutf8lib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lvm.o: ../../contrib/lua/src/lvm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/lzio.o: ../../contrib/lua/src/lzio.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/luashim-lib.make b/build/premake/premake5/build/gmake2.unix/luashim-lib.make deleted file mode 100644 index 342a7c60df..0000000000 --- a/build/premake/premake5/build/gmake2.unix/luashim-lib.make +++ /dev/null @@ -1,138 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libluashim-lib.a -OBJDIR = obj/Release/luashim-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libluashim-lib.a -OBJDIR = obj/Debug/luashim-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/luashim.o -OBJECTS += $(OBJDIR)/luashim.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking luashim-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning luashim-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/luashim.o: ../../contrib/luashim/luashim.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/luasocket.make b/build/premake/premake5/build/gmake2.unix/luasocket.make deleted file mode 100644 index c18bf5b538..0000000000 --- a/build/premake/premake5/build/gmake2.unix/luasocket.make +++ /dev/null @@ -1,230 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/lua/src -I../../contrib/luashim -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = ../../bin/release -TARGET = $(TARGETDIR)/libluasocket.so -OBJDIR = obj/Release/luasocket -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUASOCKET_API=__attribute__\(\(visibility\(\"default\"\)\)\) -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -fPIC -Wall -Wextra -fno-stack-protector -LIBS += bin/Release/libluashim-lib.a -LDDEPS += bin/Release/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libluasocket.so -s - -else ifeq ($(config),debug) -TARGETDIR = ../../bin/debug -TARGET = $(TARGETDIR)/libluasocket.so -OBJDIR = obj/Debug/luasocket -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUASOCKET_API=__attribute__\(\(visibility\(\"default\"\)\)\) -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -fPIC -g -Wall -Wextra -LIBS += bin/Debug/libluashim-lib.a -LDDEPS += bin/Debug/libluashim-lib.a -ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libluasocket.so - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/auxiliar.o -GENERATED += $(OBJDIR)/buffer.o -GENERATED += $(OBJDIR)/compat.o -GENERATED += $(OBJDIR)/except.o -GENERATED += $(OBJDIR)/inet.o -GENERATED += $(OBJDIR)/io.o -GENERATED += $(OBJDIR)/luasocket.o -GENERATED += $(OBJDIR)/main.o -GENERATED += $(OBJDIR)/mime.o -GENERATED += $(OBJDIR)/options.o -GENERATED += $(OBJDIR)/select.o -GENERATED += $(OBJDIR)/serial.o -GENERATED += $(OBJDIR)/tcp.o -GENERATED += $(OBJDIR)/timeout.o -GENERATED += $(OBJDIR)/udp.o -GENERATED += $(OBJDIR)/unix.o -GENERATED += $(OBJDIR)/unixdgram.o -GENERATED += $(OBJDIR)/unixstream.o -GENERATED += $(OBJDIR)/usocket.o -OBJECTS += $(OBJDIR)/auxiliar.o -OBJECTS += $(OBJDIR)/buffer.o -OBJECTS += $(OBJDIR)/compat.o -OBJECTS += $(OBJDIR)/except.o -OBJECTS += $(OBJDIR)/inet.o -OBJECTS += $(OBJDIR)/io.o -OBJECTS += $(OBJDIR)/luasocket.o -OBJECTS += $(OBJDIR)/main.o -OBJECTS += $(OBJDIR)/mime.o -OBJECTS += $(OBJDIR)/options.o -OBJECTS += $(OBJDIR)/select.o -OBJECTS += $(OBJDIR)/serial.o -OBJECTS += $(OBJDIR)/tcp.o -OBJECTS += $(OBJDIR)/timeout.o -OBJECTS += $(OBJDIR)/udp.o -OBJECTS += $(OBJDIR)/unix.o -OBJECTS += $(OBJDIR)/unixdgram.o -OBJECTS += $(OBJDIR)/unixstream.o -OBJECTS += $(OBJDIR)/usocket.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking luasocket - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning luasocket -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/main.o: ../../binmodules/luasocket/main.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/auxiliar.o: ../../binmodules/luasocket/src/auxiliar.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/buffer.o: ../../binmodules/luasocket/src/buffer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/compat.o: ../../binmodules/luasocket/src/compat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/except.o: ../../binmodules/luasocket/src/except.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inet.o: ../../binmodules/luasocket/src/inet.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/io.o: ../../binmodules/luasocket/src/io.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/luasocket.o: ../../binmodules/luasocket/src/luasocket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/mime.o: ../../binmodules/luasocket/src/mime.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/options.o: ../../binmodules/luasocket/src/options.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/select.o: ../../binmodules/luasocket/src/select.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/serial.o: ../../binmodules/luasocket/src/serial.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/tcp.o: ../../binmodules/luasocket/src/tcp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timeout.o: ../../binmodules/luasocket/src/timeout.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/udp.o: ../../binmodules/luasocket/src/udp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unix.o: ../../binmodules/luasocket/src/unix.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unixdgram.o: ../../binmodules/luasocket/src/unixdgram.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/unixstream.o: ../../binmodules/luasocket/src/unixstream.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/usocket.o: ../../binmodules/luasocket/src/usocket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/mbedtls-lib.make b/build/premake/premake5/build/gmake2.unix/mbedtls-lib.make deleted file mode 100644 index 4a930d1c40..0000000000 --- a/build/premake/premake5/build/gmake2.unix/mbedtls-lib.make +++ /dev/null @@ -1,483 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/mbedtls/include -I../../contrib/zlib -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libmbedtls-lib.a -OBJDIR = obj/Release/mbedtls-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DMBEDTLS_ZLIB_SUPPORT -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libmbedtls-lib.a -OBJDIR = obj/Debug/mbedtls-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DMBEDTLS_ZLIB_SUPPORT -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/aes.o -GENERATED += $(OBJDIR)/aesni.o -GENERATED += $(OBJDIR)/arc4.o -GENERATED += $(OBJDIR)/asn1parse.o -GENERATED += $(OBJDIR)/asn1write.o -GENERATED += $(OBJDIR)/base64.o -GENERATED += $(OBJDIR)/bignum.o -GENERATED += $(OBJDIR)/blowfish.o -GENERATED += $(OBJDIR)/camellia.o -GENERATED += $(OBJDIR)/ccm.o -GENERATED += $(OBJDIR)/certs.o -GENERATED += $(OBJDIR)/cipher.o -GENERATED += $(OBJDIR)/cipher_wrap.o -GENERATED += $(OBJDIR)/ctr_drbg.o -GENERATED += $(OBJDIR)/debug.o -GENERATED += $(OBJDIR)/des.o -GENERATED += $(OBJDIR)/dhm.o -GENERATED += $(OBJDIR)/ecdh.o -GENERATED += $(OBJDIR)/ecdsa.o -GENERATED += $(OBJDIR)/ecjpake.o -GENERATED += $(OBJDIR)/ecp.o -GENERATED += $(OBJDIR)/ecp_curves.o -GENERATED += $(OBJDIR)/entropy.o -GENERATED += $(OBJDIR)/entropy_poll.o -GENERATED += $(OBJDIR)/error.o -GENERATED += $(OBJDIR)/gcm.o -GENERATED += $(OBJDIR)/havege.o -GENERATED += $(OBJDIR)/hmac_drbg.o -GENERATED += $(OBJDIR)/md.o -GENERATED += $(OBJDIR)/md2.o -GENERATED += $(OBJDIR)/md4.o -GENERATED += $(OBJDIR)/md5.o -GENERATED += $(OBJDIR)/md_wrap.o -GENERATED += $(OBJDIR)/memory_buffer_alloc.o -GENERATED += $(OBJDIR)/net.o -GENERATED += $(OBJDIR)/oid.o -GENERATED += $(OBJDIR)/padlock.o -GENERATED += $(OBJDIR)/pem.o -GENERATED += $(OBJDIR)/pk.o -GENERATED += $(OBJDIR)/pk_wrap.o -GENERATED += $(OBJDIR)/pkcs11.o -GENERATED += $(OBJDIR)/pkcs12.o -GENERATED += $(OBJDIR)/pkcs5.o -GENERATED += $(OBJDIR)/pkparse.o -GENERATED += $(OBJDIR)/pkwrite.o -GENERATED += $(OBJDIR)/platform.o -GENERATED += $(OBJDIR)/ripemd160.o -GENERATED += $(OBJDIR)/rsa.o -GENERATED += $(OBJDIR)/sha1.o -GENERATED += $(OBJDIR)/sha256.o -GENERATED += $(OBJDIR)/sha512.o -GENERATED += $(OBJDIR)/ssl_cache.o -GENERATED += $(OBJDIR)/ssl_ciphersuites.o -GENERATED += $(OBJDIR)/ssl_cli.o -GENERATED += $(OBJDIR)/ssl_cookie.o -GENERATED += $(OBJDIR)/ssl_srv.o -GENERATED += $(OBJDIR)/ssl_ticket.o -GENERATED += $(OBJDIR)/ssl_tls.o -GENERATED += $(OBJDIR)/threading.o -GENERATED += $(OBJDIR)/timing.o -GENERATED += $(OBJDIR)/version.o -GENERATED += $(OBJDIR)/version_features.o -GENERATED += $(OBJDIR)/x509.o -GENERATED += $(OBJDIR)/x509_create.o -GENERATED += $(OBJDIR)/x509_crl.o -GENERATED += $(OBJDIR)/x509_crt.o -GENERATED += $(OBJDIR)/x509_csr.o -GENERATED += $(OBJDIR)/x509write_crt.o -GENERATED += $(OBJDIR)/x509write_csr.o -GENERATED += $(OBJDIR)/xtea.o -OBJECTS += $(OBJDIR)/aes.o -OBJECTS += $(OBJDIR)/aesni.o -OBJECTS += $(OBJDIR)/arc4.o -OBJECTS += $(OBJDIR)/asn1parse.o -OBJECTS += $(OBJDIR)/asn1write.o -OBJECTS += $(OBJDIR)/base64.o -OBJECTS += $(OBJDIR)/bignum.o -OBJECTS += $(OBJDIR)/blowfish.o -OBJECTS += $(OBJDIR)/camellia.o -OBJECTS += $(OBJDIR)/ccm.o -OBJECTS += $(OBJDIR)/certs.o -OBJECTS += $(OBJDIR)/cipher.o -OBJECTS += $(OBJDIR)/cipher_wrap.o -OBJECTS += $(OBJDIR)/ctr_drbg.o -OBJECTS += $(OBJDIR)/debug.o -OBJECTS += $(OBJDIR)/des.o -OBJECTS += $(OBJDIR)/dhm.o -OBJECTS += $(OBJDIR)/ecdh.o -OBJECTS += $(OBJDIR)/ecdsa.o -OBJECTS += $(OBJDIR)/ecjpake.o -OBJECTS += $(OBJDIR)/ecp.o -OBJECTS += $(OBJDIR)/ecp_curves.o -OBJECTS += $(OBJDIR)/entropy.o -OBJECTS += $(OBJDIR)/entropy_poll.o -OBJECTS += $(OBJDIR)/error.o -OBJECTS += $(OBJDIR)/gcm.o -OBJECTS += $(OBJDIR)/havege.o -OBJECTS += $(OBJDIR)/hmac_drbg.o -OBJECTS += $(OBJDIR)/md.o -OBJECTS += $(OBJDIR)/md2.o -OBJECTS += $(OBJDIR)/md4.o -OBJECTS += $(OBJDIR)/md5.o -OBJECTS += $(OBJDIR)/md_wrap.o -OBJECTS += $(OBJDIR)/memory_buffer_alloc.o -OBJECTS += $(OBJDIR)/net.o -OBJECTS += $(OBJDIR)/oid.o -OBJECTS += $(OBJDIR)/padlock.o -OBJECTS += $(OBJDIR)/pem.o -OBJECTS += $(OBJDIR)/pk.o -OBJECTS += $(OBJDIR)/pk_wrap.o -OBJECTS += $(OBJDIR)/pkcs11.o -OBJECTS += $(OBJDIR)/pkcs12.o -OBJECTS += $(OBJDIR)/pkcs5.o -OBJECTS += $(OBJDIR)/pkparse.o -OBJECTS += $(OBJDIR)/pkwrite.o -OBJECTS += $(OBJDIR)/platform.o -OBJECTS += $(OBJDIR)/ripemd160.o -OBJECTS += $(OBJDIR)/rsa.o -OBJECTS += $(OBJDIR)/sha1.o -OBJECTS += $(OBJDIR)/sha256.o -OBJECTS += $(OBJDIR)/sha512.o -OBJECTS += $(OBJDIR)/ssl_cache.o -OBJECTS += $(OBJDIR)/ssl_ciphersuites.o -OBJECTS += $(OBJDIR)/ssl_cli.o -OBJECTS += $(OBJDIR)/ssl_cookie.o -OBJECTS += $(OBJDIR)/ssl_srv.o -OBJECTS += $(OBJDIR)/ssl_ticket.o -OBJECTS += $(OBJDIR)/ssl_tls.o -OBJECTS += $(OBJDIR)/threading.o -OBJECTS += $(OBJDIR)/timing.o -OBJECTS += $(OBJDIR)/version.o -OBJECTS += $(OBJDIR)/version_features.o -OBJECTS += $(OBJDIR)/x509.o -OBJECTS += $(OBJDIR)/x509_create.o -OBJECTS += $(OBJDIR)/x509_crl.o -OBJECTS += $(OBJDIR)/x509_crt.o -OBJECTS += $(OBJDIR)/x509_csr.o -OBJECTS += $(OBJDIR)/x509write_crt.o -OBJECTS += $(OBJDIR)/x509write_csr.o -OBJECTS += $(OBJDIR)/xtea.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking mbedtls-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning mbedtls-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/aes.o: ../../contrib/mbedtls/library/aes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/aesni.o: ../../contrib/mbedtls/library/aesni.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/arc4.o: ../../contrib/mbedtls/library/arc4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asn1parse.o: ../../contrib/mbedtls/library/asn1parse.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/asn1write.o: ../../contrib/mbedtls/library/asn1write.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/base64.o: ../../contrib/mbedtls/library/base64.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/bignum.o: ../../contrib/mbedtls/library/bignum.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/blowfish.o: ../../contrib/mbedtls/library/blowfish.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/camellia.o: ../../contrib/mbedtls/library/camellia.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ccm.o: ../../contrib/mbedtls/library/ccm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/certs.o: ../../contrib/mbedtls/library/certs.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cipher.o: ../../contrib/mbedtls/library/cipher.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/cipher_wrap.o: ../../contrib/mbedtls/library/cipher_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ctr_drbg.o: ../../contrib/mbedtls/library/ctr_drbg.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/debug.o: ../../contrib/mbedtls/library/debug.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/des.o: ../../contrib/mbedtls/library/des.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/dhm.o: ../../contrib/mbedtls/library/dhm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecdh.o: ../../contrib/mbedtls/library/ecdh.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecdsa.o: ../../contrib/mbedtls/library/ecdsa.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecjpake.o: ../../contrib/mbedtls/library/ecjpake.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecp.o: ../../contrib/mbedtls/library/ecp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ecp_curves.o: ../../contrib/mbedtls/library/ecp_curves.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/entropy.o: ../../contrib/mbedtls/library/entropy.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/entropy_poll.o: ../../contrib/mbedtls/library/entropy_poll.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/error.o: ../../contrib/mbedtls/library/error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gcm.o: ../../contrib/mbedtls/library/gcm.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/havege.o: ../../contrib/mbedtls/library/havege.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hmac_drbg.o: ../../contrib/mbedtls/library/hmac_drbg.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md.o: ../../contrib/mbedtls/library/md.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md2.o: ../../contrib/mbedtls/library/md2.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md4.o: ../../contrib/mbedtls/library/md4.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md5.o: ../../contrib/mbedtls/library/md5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/md_wrap.o: ../../contrib/mbedtls/library/md_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/memory_buffer_alloc.o: ../../contrib/mbedtls/library/memory_buffer_alloc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/net.o: ../../contrib/mbedtls/library/net.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/oid.o: ../../contrib/mbedtls/library/oid.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/padlock.o: ../../contrib/mbedtls/library/padlock.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pem.o: ../../contrib/mbedtls/library/pem.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pk.o: ../../contrib/mbedtls/library/pk.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pk_wrap.o: ../../contrib/mbedtls/library/pk_wrap.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs11.o: ../../contrib/mbedtls/library/pkcs11.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs12.o: ../../contrib/mbedtls/library/pkcs12.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkcs5.o: ../../contrib/mbedtls/library/pkcs5.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkparse.o: ../../contrib/mbedtls/library/pkparse.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/pkwrite.o: ../../contrib/mbedtls/library/pkwrite.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/platform.o: ../../contrib/mbedtls/library/platform.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ripemd160.o: ../../contrib/mbedtls/library/ripemd160.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/rsa.o: ../../contrib/mbedtls/library/rsa.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha1.o: ../../contrib/mbedtls/library/sha1.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha256.o: ../../contrib/mbedtls/library/sha256.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/sha512.o: ../../contrib/mbedtls/library/sha512.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cache.o: ../../contrib/mbedtls/library/ssl_cache.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_ciphersuites.o: ../../contrib/mbedtls/library/ssl_ciphersuites.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cli.o: ../../contrib/mbedtls/library/ssl_cli.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_cookie.o: ../../contrib/mbedtls/library/ssl_cookie.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_srv.o: ../../contrib/mbedtls/library/ssl_srv.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_ticket.o: ../../contrib/mbedtls/library/ssl_ticket.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/ssl_tls.o: ../../contrib/mbedtls/library/ssl_tls.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/threading.o: ../../contrib/mbedtls/library/threading.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/timing.o: ../../contrib/mbedtls/library/timing.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version.o: ../../contrib/mbedtls/library/version.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/version_features.o: ../../contrib/mbedtls/library/version_features.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509.o: ../../contrib/mbedtls/library/x509.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_create.o: ../../contrib/mbedtls/library/x509_create.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_crl.o: ../../contrib/mbedtls/library/x509_crl.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_crt.o: ../../contrib/mbedtls/library/x509_crt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509_csr.o: ../../contrib/mbedtls/library/x509_csr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509write_crt.o: ../../contrib/mbedtls/library/x509write_crt.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/x509write_csr.o: ../../contrib/mbedtls/library/x509write_csr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/xtea.o: ../../contrib/mbedtls/library/xtea.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/zip-lib.make b/build/premake/premake5/build/gmake2.unix/zip-lib.make deleted file mode 100644 index 8da1cc3052..0000000000 --- a/build/premake/premake5/build/gmake2.unix/zip-lib.make +++ /dev/null @@ -1,563 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -I../../contrib/libzip/include -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libzip-lib.a -OBJDIR = obj/Release/zip-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DN_FSEEKO -DHAVE_SSIZE_T_LIBZIP -DHAVE_CONFIG_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libzip-lib.a -OBJDIR = obj/Debug/zip-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DN_FSEEKO -DHAVE_SSIZE_T_LIBZIP -DHAVE_CONFIG_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/mkstemp.o -GENERATED += $(OBJDIR)/zip_add.o -GENERATED += $(OBJDIR)/zip_add_dir.o -GENERATED += $(OBJDIR)/zip_add_entry.o -GENERATED += $(OBJDIR)/zip_close.o -GENERATED += $(OBJDIR)/zip_delete.o -GENERATED += $(OBJDIR)/zip_dir_add.o -GENERATED += $(OBJDIR)/zip_dirent.o -GENERATED += $(OBJDIR)/zip_discard.o -GENERATED += $(OBJDIR)/zip_entry.o -GENERATED += $(OBJDIR)/zip_err_str.o -GENERATED += $(OBJDIR)/zip_error.o -GENERATED += $(OBJDIR)/zip_error_clear.o -GENERATED += $(OBJDIR)/zip_error_get.o -GENERATED += $(OBJDIR)/zip_error_get_sys_type.o -GENERATED += $(OBJDIR)/zip_error_strerror.o -GENERATED += $(OBJDIR)/zip_error_to_str.o -GENERATED += $(OBJDIR)/zip_extra_field.o -GENERATED += $(OBJDIR)/zip_extra_field_api.o -GENERATED += $(OBJDIR)/zip_fclose.o -GENERATED += $(OBJDIR)/zip_fdopen.o -GENERATED += $(OBJDIR)/zip_file_add.o -GENERATED += $(OBJDIR)/zip_file_error_clear.o -GENERATED += $(OBJDIR)/zip_file_error_get.o -GENERATED += $(OBJDIR)/zip_file_get_comment.o -GENERATED += $(OBJDIR)/zip_file_get_external_attributes.o -GENERATED += $(OBJDIR)/zip_file_get_offset.o -GENERATED += $(OBJDIR)/zip_file_rename.o -GENERATED += $(OBJDIR)/zip_file_replace.o -GENERATED += $(OBJDIR)/zip_file_set_comment.o -GENERATED += $(OBJDIR)/zip_file_set_external_attributes.o -GENERATED += $(OBJDIR)/zip_file_strerror.o -GENERATED += $(OBJDIR)/zip_filerange_crc.o -GENERATED += $(OBJDIR)/zip_fopen.o -GENERATED += $(OBJDIR)/zip_fopen_encrypted.o -GENERATED += $(OBJDIR)/zip_fopen_index.o -GENERATED += $(OBJDIR)/zip_fopen_index_encrypted.o -GENERATED += $(OBJDIR)/zip_fread.o -GENERATED += $(OBJDIR)/zip_get_archive_comment.o -GENERATED += $(OBJDIR)/zip_get_archive_flag.o -GENERATED += $(OBJDIR)/zip_get_compression_implementation.o -GENERATED += $(OBJDIR)/zip_get_encryption_implementation.o -GENERATED += $(OBJDIR)/zip_get_file_comment.o -GENERATED += $(OBJDIR)/zip_get_name.o -GENERATED += $(OBJDIR)/zip_get_num_entries.o -GENERATED += $(OBJDIR)/zip_get_num_files.o -GENERATED += $(OBJDIR)/zip_memdup.o -GENERATED += $(OBJDIR)/zip_name_locate.o -GENERATED += $(OBJDIR)/zip_new.o -GENERATED += $(OBJDIR)/zip_open.o -GENERATED += $(OBJDIR)/zip_rename.o -GENERATED += $(OBJDIR)/zip_replace.o -GENERATED += $(OBJDIR)/zip_set_archive_comment.o -GENERATED += $(OBJDIR)/zip_set_archive_flag.o -GENERATED += $(OBJDIR)/zip_set_default_password.o -GENERATED += $(OBJDIR)/zip_set_file_comment.o -GENERATED += $(OBJDIR)/zip_set_file_compression.o -GENERATED += $(OBJDIR)/zip_set_name.o -GENERATED += $(OBJDIR)/zip_source_buffer.o -GENERATED += $(OBJDIR)/zip_source_close.o -GENERATED += $(OBJDIR)/zip_source_crc.o -GENERATED += $(OBJDIR)/zip_source_deflate.o -GENERATED += $(OBJDIR)/zip_source_error.o -GENERATED += $(OBJDIR)/zip_source_file.o -GENERATED += $(OBJDIR)/zip_source_filep.o -GENERATED += $(OBJDIR)/zip_source_free.o -GENERATED += $(OBJDIR)/zip_source_function.o -GENERATED += $(OBJDIR)/zip_source_layered.o -GENERATED += $(OBJDIR)/zip_source_open.o -GENERATED += $(OBJDIR)/zip_source_pkware.o -GENERATED += $(OBJDIR)/zip_source_pop.o -GENERATED += $(OBJDIR)/zip_source_read.o -GENERATED += $(OBJDIR)/zip_source_stat.o -GENERATED += $(OBJDIR)/zip_source_window.o -GENERATED += $(OBJDIR)/zip_source_zip.o -GENERATED += $(OBJDIR)/zip_source_zip_new.o -GENERATED += $(OBJDIR)/zip_stat.o -GENERATED += $(OBJDIR)/zip_stat_index.o -GENERATED += $(OBJDIR)/zip_stat_init.o -GENERATED += $(OBJDIR)/zip_strerror.o -GENERATED += $(OBJDIR)/zip_string.o -GENERATED += $(OBJDIR)/zip_unchange.o -GENERATED += $(OBJDIR)/zip_unchange_all.o -GENERATED += $(OBJDIR)/zip_unchange_archive.o -GENERATED += $(OBJDIR)/zip_unchange_data.o -GENERATED += $(OBJDIR)/zip_utf-8.o -OBJECTS += $(OBJDIR)/mkstemp.o -OBJECTS += $(OBJDIR)/zip_add.o -OBJECTS += $(OBJDIR)/zip_add_dir.o -OBJECTS += $(OBJDIR)/zip_add_entry.o -OBJECTS += $(OBJDIR)/zip_close.o -OBJECTS += $(OBJDIR)/zip_delete.o -OBJECTS += $(OBJDIR)/zip_dir_add.o -OBJECTS += $(OBJDIR)/zip_dirent.o -OBJECTS += $(OBJDIR)/zip_discard.o -OBJECTS += $(OBJDIR)/zip_entry.o -OBJECTS += $(OBJDIR)/zip_err_str.o -OBJECTS += $(OBJDIR)/zip_error.o -OBJECTS += $(OBJDIR)/zip_error_clear.o -OBJECTS += $(OBJDIR)/zip_error_get.o -OBJECTS += $(OBJDIR)/zip_error_get_sys_type.o -OBJECTS += $(OBJDIR)/zip_error_strerror.o -OBJECTS += $(OBJDIR)/zip_error_to_str.o -OBJECTS += $(OBJDIR)/zip_extra_field.o -OBJECTS += $(OBJDIR)/zip_extra_field_api.o -OBJECTS += $(OBJDIR)/zip_fclose.o -OBJECTS += $(OBJDIR)/zip_fdopen.o -OBJECTS += $(OBJDIR)/zip_file_add.o -OBJECTS += $(OBJDIR)/zip_file_error_clear.o -OBJECTS += $(OBJDIR)/zip_file_error_get.o -OBJECTS += $(OBJDIR)/zip_file_get_comment.o -OBJECTS += $(OBJDIR)/zip_file_get_external_attributes.o -OBJECTS += $(OBJDIR)/zip_file_get_offset.o -OBJECTS += $(OBJDIR)/zip_file_rename.o -OBJECTS += $(OBJDIR)/zip_file_replace.o -OBJECTS += $(OBJDIR)/zip_file_set_comment.o -OBJECTS += $(OBJDIR)/zip_file_set_external_attributes.o -OBJECTS += $(OBJDIR)/zip_file_strerror.o -OBJECTS += $(OBJDIR)/zip_filerange_crc.o -OBJECTS += $(OBJDIR)/zip_fopen.o -OBJECTS += $(OBJDIR)/zip_fopen_encrypted.o -OBJECTS += $(OBJDIR)/zip_fopen_index.o -OBJECTS += $(OBJDIR)/zip_fopen_index_encrypted.o -OBJECTS += $(OBJDIR)/zip_fread.o -OBJECTS += $(OBJDIR)/zip_get_archive_comment.o -OBJECTS += $(OBJDIR)/zip_get_archive_flag.o -OBJECTS += $(OBJDIR)/zip_get_compression_implementation.o -OBJECTS += $(OBJDIR)/zip_get_encryption_implementation.o -OBJECTS += $(OBJDIR)/zip_get_file_comment.o -OBJECTS += $(OBJDIR)/zip_get_name.o -OBJECTS += $(OBJDIR)/zip_get_num_entries.o -OBJECTS += $(OBJDIR)/zip_get_num_files.o -OBJECTS += $(OBJDIR)/zip_memdup.o -OBJECTS += $(OBJDIR)/zip_name_locate.o -OBJECTS += $(OBJDIR)/zip_new.o -OBJECTS += $(OBJDIR)/zip_open.o -OBJECTS += $(OBJDIR)/zip_rename.o -OBJECTS += $(OBJDIR)/zip_replace.o -OBJECTS += $(OBJDIR)/zip_set_archive_comment.o -OBJECTS += $(OBJDIR)/zip_set_archive_flag.o -OBJECTS += $(OBJDIR)/zip_set_default_password.o -OBJECTS += $(OBJDIR)/zip_set_file_comment.o -OBJECTS += $(OBJDIR)/zip_set_file_compression.o -OBJECTS += $(OBJDIR)/zip_set_name.o -OBJECTS += $(OBJDIR)/zip_source_buffer.o -OBJECTS += $(OBJDIR)/zip_source_close.o -OBJECTS += $(OBJDIR)/zip_source_crc.o -OBJECTS += $(OBJDIR)/zip_source_deflate.o -OBJECTS += $(OBJDIR)/zip_source_error.o -OBJECTS += $(OBJDIR)/zip_source_file.o -OBJECTS += $(OBJDIR)/zip_source_filep.o -OBJECTS += $(OBJDIR)/zip_source_free.o -OBJECTS += $(OBJDIR)/zip_source_function.o -OBJECTS += $(OBJDIR)/zip_source_layered.o -OBJECTS += $(OBJDIR)/zip_source_open.o -OBJECTS += $(OBJDIR)/zip_source_pkware.o -OBJECTS += $(OBJDIR)/zip_source_pop.o -OBJECTS += $(OBJDIR)/zip_source_read.o -OBJECTS += $(OBJDIR)/zip_source_stat.o -OBJECTS += $(OBJDIR)/zip_source_window.o -OBJECTS += $(OBJDIR)/zip_source_zip.o -OBJECTS += $(OBJDIR)/zip_source_zip_new.o -OBJECTS += $(OBJDIR)/zip_stat.o -OBJECTS += $(OBJDIR)/zip_stat_index.o -OBJECTS += $(OBJDIR)/zip_stat_init.o -OBJECTS += $(OBJDIR)/zip_strerror.o -OBJECTS += $(OBJDIR)/zip_string.o -OBJECTS += $(OBJDIR)/zip_unchange.o -OBJECTS += $(OBJDIR)/zip_unchange_all.o -OBJECTS += $(OBJDIR)/zip_unchange_archive.o -OBJECTS += $(OBJDIR)/zip_unchange_data.o -OBJECTS += $(OBJDIR)/zip_utf-8.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking zip-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning zip-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/mkstemp.o: ../../contrib/libzip/mkstemp.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add.o: ../../contrib/libzip/zip_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add_dir.o: ../../contrib/libzip/zip_add_dir.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_add_entry.o: ../../contrib/libzip/zip_add_entry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_close.o: ../../contrib/libzip/zip_close.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_delete.o: ../../contrib/libzip/zip_delete.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_dir_add.o: ../../contrib/libzip/zip_dir_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_dirent.o: ../../contrib/libzip/zip_dirent.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_discard.o: ../../contrib/libzip/zip_discard.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_entry.o: ../../contrib/libzip/zip_entry.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_err_str.o: ../../contrib/libzip/zip_err_str.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error.o: ../../contrib/libzip/zip_error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_clear.o: ../../contrib/libzip/zip_error_clear.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_get.o: ../../contrib/libzip/zip_error_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_get_sys_type.o: ../../contrib/libzip/zip_error_get_sys_type.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_strerror.o: ../../contrib/libzip/zip_error_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_error_to_str.o: ../../contrib/libzip/zip_error_to_str.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extra_field.o: ../../contrib/libzip/zip_extra_field.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_extra_field_api.o: ../../contrib/libzip/zip_extra_field_api.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fclose.o: ../../contrib/libzip/zip_fclose.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fdopen.o: ../../contrib/libzip/zip_fdopen.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_add.o: ../../contrib/libzip/zip_file_add.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_error_clear.o: ../../contrib/libzip/zip_file_error_clear.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_error_get.o: ../../contrib/libzip/zip_file_error_get.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_comment.o: ../../contrib/libzip/zip_file_get_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_external_attributes.o: ../../contrib/libzip/zip_file_get_external_attributes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_get_offset.o: ../../contrib/libzip/zip_file_get_offset.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_rename.o: ../../contrib/libzip/zip_file_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_replace.o: ../../contrib/libzip/zip_file_replace.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_set_comment.o: ../../contrib/libzip/zip_file_set_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_set_external_attributes.o: ../../contrib/libzip/zip_file_set_external_attributes.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_file_strerror.o: ../../contrib/libzip/zip_file_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_filerange_crc.o: ../../contrib/libzip/zip_filerange_crc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen.o: ../../contrib/libzip/zip_fopen.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_encrypted.o: ../../contrib/libzip/zip_fopen_encrypted.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_index.o: ../../contrib/libzip/zip_fopen_index.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fopen_index_encrypted.o: ../../contrib/libzip/zip_fopen_index_encrypted.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_fread.o: ../../contrib/libzip/zip_fread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_archive_comment.o: ../../contrib/libzip/zip_get_archive_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_archive_flag.o: ../../contrib/libzip/zip_get_archive_flag.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_compression_implementation.o: ../../contrib/libzip/zip_get_compression_implementation.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_encryption_implementation.o: ../../contrib/libzip/zip_get_encryption_implementation.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_file_comment.o: ../../contrib/libzip/zip_get_file_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_name.o: ../../contrib/libzip/zip_get_name.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_num_entries.o: ../../contrib/libzip/zip_get_num_entries.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_get_num_files.o: ../../contrib/libzip/zip_get_num_files.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_memdup.o: ../../contrib/libzip/zip_memdup.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_name_locate.o: ../../contrib/libzip/zip_name_locate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_new.o: ../../contrib/libzip/zip_new.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_open.o: ../../contrib/libzip/zip_open.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_rename.o: ../../contrib/libzip/zip_rename.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_replace.o: ../../contrib/libzip/zip_replace.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_archive_comment.o: ../../contrib/libzip/zip_set_archive_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_archive_flag.o: ../../contrib/libzip/zip_set_archive_flag.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_default_password.o: ../../contrib/libzip/zip_set_default_password.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_file_comment.o: ../../contrib/libzip/zip_set_file_comment.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_file_compression.o: ../../contrib/libzip/zip_set_file_compression.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_set_name.o: ../../contrib/libzip/zip_set_name.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_buffer.o: ../../contrib/libzip/zip_source_buffer.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_close.o: ../../contrib/libzip/zip_source_close.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_crc.o: ../../contrib/libzip/zip_source_crc.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_deflate.o: ../../contrib/libzip/zip_source_deflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_error.o: ../../contrib/libzip/zip_source_error.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_file.o: ../../contrib/libzip/zip_source_file.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_filep.o: ../../contrib/libzip/zip_source_filep.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_free.o: ../../contrib/libzip/zip_source_free.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_function.o: ../../contrib/libzip/zip_source_function.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_layered.o: ../../contrib/libzip/zip_source_layered.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_open.o: ../../contrib/libzip/zip_source_open.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_pkware.o: ../../contrib/libzip/zip_source_pkware.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_pop.o: ../../contrib/libzip/zip_source_pop.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_read.o: ../../contrib/libzip/zip_source_read.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_stat.o: ../../contrib/libzip/zip_source_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_window.o: ../../contrib/libzip/zip_source_window.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_zip.o: ../../contrib/libzip/zip_source_zip.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_source_zip_new.o: ../../contrib/libzip/zip_source_zip_new.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat.o: ../../contrib/libzip/zip_stat.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat_index.o: ../../contrib/libzip/zip_stat_index.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_stat_init.o: ../../contrib/libzip/zip_stat_init.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_strerror.o: ../../contrib/libzip/zip_strerror.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_string.o: ../../contrib/libzip/zip_string.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange.o: ../../contrib/libzip/zip_unchange.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_all.o: ../../contrib/libzip/zip_unchange_all.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_archive.o: ../../contrib/libzip/zip_unchange_archive.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_unchange_data.o: ../../contrib/libzip/zip_unchange_data.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zip_utf-8.o: ../../contrib/libzip/zip_utf-8.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/gmake2.unix/zlib-lib.make b/build/premake/premake5/build/gmake2.unix/zlib-lib.make deleted file mode 100644 index 668999ece1..0000000000 --- a/build/premake/premake5/build/gmake2.unix/zlib-lib.make +++ /dev/null @@ -1,208 +0,0 @@ -# Alternative GNU Make project makefile autogenerated by Premake - -ifndef config - config=release -endif - -ifndef verbose - SILENT = @ -endif - -.PHONY: clean prebuild - -SHELLTYPE := posix -ifeq (.exe,$(findstring .exe,$(ComSpec))) - SHELLTYPE := msdos -endif - -# Configurations -# ############################################# - -RESCOMP = windres -INCLUDES += -FORCE_INCLUDE += -ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) -LIBS += -LDDEPS += -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) -define PREBUILDCMDS -endef -define PRELINKCMDS -endef -define POSTBUILDCMDS -endef - -ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/libzlib-lib.a -OBJDIR = obj/Release/zlib-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DN_FSEEKO -DHAVE_UNISTD_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -w -fno-stack-protector -ALL_LDFLAGS += $(LDFLAGS) -s - -else ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/libzlib-lib.a -OBJDIR = obj/Debug/zlib-lib -DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DN_FSEEKO -DHAVE_UNISTD_H -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -w -ALL_LDFLAGS += $(LDFLAGS) - -endif - -# Per File Configurations -# ############################################# - - -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/adler32.o -GENERATED += $(OBJDIR)/compress.o -GENERATED += $(OBJDIR)/crc32.o -GENERATED += $(OBJDIR)/deflate.o -GENERATED += $(OBJDIR)/gzclose.o -GENERATED += $(OBJDIR)/gzlib.o -GENERATED += $(OBJDIR)/gzread.o -GENERATED += $(OBJDIR)/gzwrite.o -GENERATED += $(OBJDIR)/infback.o -GENERATED += $(OBJDIR)/inffast.o -GENERATED += $(OBJDIR)/inflate.o -GENERATED += $(OBJDIR)/inftrees.o -GENERATED += $(OBJDIR)/trees.o -GENERATED += $(OBJDIR)/uncompr.o -GENERATED += $(OBJDIR)/zutil.o -OBJECTS += $(OBJDIR)/adler32.o -OBJECTS += $(OBJDIR)/compress.o -OBJECTS += $(OBJDIR)/crc32.o -OBJECTS += $(OBJDIR)/deflate.o -OBJECTS += $(OBJDIR)/gzclose.o -OBJECTS += $(OBJDIR)/gzlib.o -OBJECTS += $(OBJDIR)/gzread.o -OBJECTS += $(OBJDIR)/gzwrite.o -OBJECTS += $(OBJDIR)/infback.o -OBJECTS += $(OBJDIR)/inffast.o -OBJECTS += $(OBJDIR)/inflate.o -OBJECTS += $(OBJDIR)/inftrees.o -OBJECTS += $(OBJDIR)/trees.o -OBJECTS += $(OBJDIR)/uncompr.o -OBJECTS += $(OBJDIR)/zutil.o - -# Rules -# ############################################# - -all: $(TARGET) - @: - -$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) - $(PRELINKCMDS) - @echo Linking zlib-lib - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - -$(TARGETDIR): - @echo Creating $(TARGETDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(TARGETDIR) -else - $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) -endif - -$(OBJDIR): - @echo Creating $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) mkdir -p $(OBJDIR) -else - $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) -endif - -clean: - @echo Cleaning zlib-lib -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(TARGET) - $(SILENT) rm -rf $(GENERATED) - $(SILENT) rm -rf $(OBJDIR) -else - $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) - $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) - $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) -endif - -prebuild: | $(OBJDIR) - $(PREBUILDCMDS) - -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - - -# File Rules -# ############################################# - -$(OBJDIR)/adler32.o: ../../contrib/zlib/adler32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/compress.o: ../../contrib/zlib/compress.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/crc32.o: ../../contrib/zlib/crc32.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/deflate.o: ../../contrib/zlib/deflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzclose.o: ../../contrib/zlib/gzclose.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzlib.o: ../../contrib/zlib/gzlib.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzread.o: ../../contrib/zlib/gzread.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/gzwrite.o: ../../contrib/zlib/gzwrite.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/infback.o: ../../contrib/zlib/infback.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inffast.o: ../../contrib/zlib/inffast.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inflate.o: ../../contrib/zlib/inflate.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/inftrees.o: ../../contrib/zlib/inftrees.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/trees.o: ../../contrib/zlib/trees.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/uncompr.o: ../../contrib/zlib/uncompr.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/zutil.o: ../../contrib/zlib/zutil.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - --include $(OBJECTS:%.o=%.d) -ifneq (,$(PCH)) - -include $(PCH_PLACEHOLDER).d -endif \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/Premake5.sln b/build/premake/premake5/build/vs2017/Premake5.sln deleted file mode 100644 index 3a85d3ee11..0000000000 --- a/build/premake/premake5/build/vs2017/Premake5.sln +++ /dev/null @@ -1,120 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Binary Modules", "Binary Modules", "{EADEF033-D66D-7AFD-7F8C-8EF86BFA8AA3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcxproj", "{F1997D81-5D79-FC1C-6691-87F3D2EF627E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luasocket", "luasocket.vcxproj", "{7085D54F-DCEF-89C6-252E-3B6C91D7671B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Premake5", "Premake5.vcxproj", "{DF59398B-CB26-9496-F43F-823EE06BC924}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contrib", "contrib", "{9D86B421-0947-3058-D281-79D53E017534}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl-lib", "curl-lib.vcxproj", "{BF552F19-AB22-8A24-D43B-78CCC067BFB2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib", "lua-lib.vcxproj", "{AB9F3295-177F-B130-2097-3C078CF51792}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luashim-lib", "luashim-lib.vcxproj", "{9C53798E-0809-F283-91FD-EB5AFDB1E887}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbedtls-lib", "mbedtls-lib.vcxproj", "{34744A64-A029-C359-291E-BD3095D2B95D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zip-lib", "zip-lib.vcxproj", "{3C7AF3AF-A859-724B-B171-FD211DD0D8AC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib-lib", "zlib-lib.vcxproj", "{7AF09988-66BD-F493-8FD6-E23B7B022A22}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|Win32.Build.0 = Debug|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|x64.ActiveCfg = Debug|x64 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|x64.Build.0 = Debug|x64 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|Win32.ActiveCfg = Release|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|Win32.Build.0 = Release|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|x64.ActiveCfg = Release|x64 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|x64.Build.0 = Release|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|Win32.ActiveCfg = Debug|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|Win32.Build.0 = Debug|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|x64.ActiveCfg = Debug|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|x64.Build.0 = Debug|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|Win32.ActiveCfg = Release|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|Win32.Build.0 = Release|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|x64.ActiveCfg = Release|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|x64.Build.0 = Release|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|Win32.Build.0 = Debug|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|x64.ActiveCfg = Debug|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|x64.Build.0 = Debug|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|Win32.ActiveCfg = Release|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|Win32.Build.0 = Release|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|x64.ActiveCfg = Release|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|x64.Build.0 = Release|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|Win32.Build.0 = Debug|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|x64.ActiveCfg = Debug|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|x64.Build.0 = Debug|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|Win32.ActiveCfg = Release|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|Win32.Build.0 = Release|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|x64.ActiveCfg = Release|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|x64.Build.0 = Release|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|Win32.ActiveCfg = Debug|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|Win32.Build.0 = Debug|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|x64.ActiveCfg = Debug|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|x64.Build.0 = Debug|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|Win32.ActiveCfg = Release|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|Win32.Build.0 = Release|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|x64.ActiveCfg = Release|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|x64.Build.0 = Release|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|Win32.Build.0 = Debug|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|x64.ActiveCfg = Debug|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|x64.Build.0 = Debug|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|Win32.ActiveCfg = Release|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|Win32.Build.0 = Release|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|x64.ActiveCfg = Release|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|x64.Build.0 = Release|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|Win32.ActiveCfg = Debug|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|Win32.Build.0 = Debug|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|x64.ActiveCfg = Debug|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|x64.Build.0 = Debug|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|Win32.ActiveCfg = Release|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|Win32.Build.0 = Release|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|x64.ActiveCfg = Release|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|x64.Build.0 = Release|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|Win32.Build.0 = Debug|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|x64.ActiveCfg = Debug|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|x64.Build.0 = Debug|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|Win32.ActiveCfg = Release|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|Win32.Build.0 = Release|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|x64.ActiveCfg = Release|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|x64.Build.0 = Release|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|Win32.ActiveCfg = Debug|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|Win32.Build.0 = Debug|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|x64.ActiveCfg = Debug|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|x64.Build.0 = Debug|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|Win32.ActiveCfg = Release|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|Win32.Build.0 = Release|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|x64.ActiveCfg = Release|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {F1997D81-5D79-FC1C-6691-87F3D2EF627E} = {EADEF033-D66D-7AFD-7F8C-8EF86BFA8AA3} - {7085D54F-DCEF-89C6-252E-3B6C91D7671B} = {EADEF033-D66D-7AFD-7F8C-8EF86BFA8AA3} - {BF552F19-AB22-8A24-D43B-78CCC067BFB2} = {9D86B421-0947-3058-D281-79D53E017534} - {AB9F3295-177F-B130-2097-3C078CF51792} = {9D86B421-0947-3058-D281-79D53E017534} - {9C53798E-0809-F283-91FD-EB5AFDB1E887} = {9D86B421-0947-3058-D281-79D53E017534} - {34744A64-A029-C359-291E-BD3095D2B95D} = {9D86B421-0947-3058-D281-79D53E017534} - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC} = {9D86B421-0947-3058-D281-79D53E017534} - {7AF09988-66BD-F493-8FD6-E23B7B022A22} = {9D86B421-0947-3058-D281-79D53E017534} - EndGlobalSection -EndGlobal diff --git a/build/premake/premake5/build/vs2017/Premake5.vcxproj b/build/premake/premake5/build/vs2017/Premake5.vcxproj deleted file mode 100644 index b9c7e92f09..0000000000 --- a/build/premake/premake5/build/vs2017/Premake5.vcxproj +++ /dev/null @@ -1,600 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {DF59398B-CB26-9496-F43F-823EE06BC924} - true - Win32Proj - Premake5 - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - Application - false - Unicode - v141 - true - - - Application - false - Unicode - v141 - true - - - Application - true - Unicode - v141 - - - Application - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - false - ..\..\bin\release\ - obj\x86\Release\Premake5\ - premake5 - .exe - - - false - ..\..\bin\release\ - obj\x64\Release\Premake5\ - premake5 - .exe - - - true - ..\..\bin\debug\ - obj\x86\Debug\Premake5\ - premake5 - .exe - - - true - ..\..\bin\debug\ - obj\x64\Debug\Premake5\ - premake5 - .exe - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Console - true - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Console - true - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Console - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Console - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {AB9F3295-177F-B130-2097-3C078CF51792} - - - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC} - - - {7AF09988-66BD-F493-8FD6-E23B7B022A22} - - - {BF552F19-AB22-8A24-D43B-78CCC067BFB2} - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/Premake5.vcxproj.filters b/build/premake/premake5/build/vs2017/Premake5.vcxproj.filters deleted file mode 100644 index 2e9afdf19f..0000000000 --- a/build/premake/premake5/build/vs2017/Premake5.vcxproj.filters +++ /dev/null @@ -1,1320 +0,0 @@ - - - - - {FEAC8BD4-6A8C-0A70-73A4-9546DF0271D1} - - - {4E56C0F1-BAE1-2DB6-C3F2-B0AA2FFD89B6} - - - {B043763C-1CB0-3137-E5A3-C99451CF539F} - - - {56255C4E-421E-7BA0-6B50-602557A85AAC} - - - {B8384320-A432-6C72-8D9F-02837938D2DE} - - - {F1EA2A26-5D55-DF9C-A693-9042123DBDF1} - - - {B1B1DF92-1DC8-DD28-663F-694AD294AEB0} - - - {9386D446-FF11-420B-0823-C5FF742D9E0B} - - - {51F0D946-BD7B-470B-C68C-CAFF3297A30B} - - - {12B50CC7-7E75-88FD-47B0-D17AB32FCDD9} - - - {74A5A7AC-E006-85BA-6974-CB6CD5D4BB79} - - - {46B9405A-B2F0-88F1-BBFA-EC1427B1AFEA} - - - {19F6011A-05F0-2A6C-EE5C-C17CDAF590D8} - - - {F29FF7B5-5EB8-DEDF-2765-6E79933C7379} - - - {8457A3A8-7025-97AE-59B9-07D545267313} - - - {66D59E88-5264-2852-FB82-3C4DE7F038F8} - - - {B7B3915C-2369-0A52-AC5D-042918120156} - - - {E460CE8C-5077-CC22-99EE-574405449DAA} - - - {BB1B144F-27A7-8113-30B8-04089CC2DD13} - - - {DDA65563-4913-115E-1207-A9BB7E3233C6} - - - {69C9B067-5584-A013-FE3B-195EEAD5EAA3} - - - {616A373C-4DBB-227E-761F-114062CFB5E7} - - - {4C43B06E-38FE-9F1A-E1B5-1865CD4FEAAA} - - - {C07C5821-2C95-3F4B-F541-CFE46119D4E4} - - - {8F45E192-7B00-D13E-24B8-498910521BCF} - - - {6845E192-5400-D13E-FDB7-4989E9511BCF} - - - {6B45E192-5700-D13E-00B8-4989EC511BCF} - - - {80143BC8-ECD4-B6FE-B50F-007C218FFBDA} - - - {625F6748-CEC0-4456-572E-8B08C38E7B15} - - - {6D076287-D9E6-E022-E2FE-6BF94E5D4784} - - - {2DAB880B-99B4-887C-2230-9F7C8E38947C} - - - {EDED2727-59A3-A01C-E297-9AF34E4C9720} - - - {9FCE2E0B-0BE5-2CA1-545C-B8C2C0B1FD28} - - - {F7972DCF-E364-88DA-0C7E-7682F8A9BD68} - - - {DA1D31CF-C6EA-8BDA-EF03-7A82DB2FC168} - - - {8DED2DB6-F957-E22C-4296-93D2AE3FC081} - - - {78756B10-E489-93C1-AD0B-372119DF8FF2} - - - {C1E2B49B-2D4D-6912-768B-1AB8E2344767} - - - {22895112-0E41-935F-7748-6CBB631F2E50} - - - {9D2D28F0-8990-B794-3216-F04A1E588317} - - - {C38526F7-AFE8-B59B-586E-EE5144B0811E} - - - {9F015912-8BB9-9A5F-F4C0-73BBE0973550} - - - {DEA9F6E4-4A6A-721B-13A5-BB987F24B7F7} - - - {1804D05D-84B9-4853-0DAE-422A79623F57} - - - {F6443252-62D0-9F16-6BE1-220BD7EBFB16} - - - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src - - - - - - - - - - modules\android - - - modules\android - - - modules\android - - - modules\android - - - modules\android - - - modules\android\tests - - - modules\android\tests - - - modules\android\tests - - - modules\android - - - modules\android - - - modules\android - - - modules\android - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite\tests - - - modules\codelite\tests - - - modules\codelite\tests - - - modules\codelite\tests - - - modules\d - - - modules\d - - - modules\d - - - modules\d - - - modules\d\actions - - - modules\d\actions - - - modules\d\actions - - - modules\d - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tools - - - modules\d\tools - - - modules\d\tools - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake\tests - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests - - - modules\gmake\tests - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\raw - - - modules\raw - - - modules\raw - - - modules\raw - - - modules\raw - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio\tests - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\dotnet2005 - - - modules\vstudio\tests\dotnet2005 - - - modules\vstudio\tests\fs2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2013 - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\xcode - - - modules\xcode - - - modules\xcode - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode - - - modules\xcode - - - modules\xcode - - - modules\xcode - - - - - scripts - - - scripts - - - scripts - - - src - - - src - - - src - - - src - - - src\actions\clean - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\tools - - - src\tools - - - src\tools - - - src\tools - - - src\tools - - - src\tools - - - tests - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\config - - - tests\config - - - tests\config - - - tests\folder - - - tests\folder - - - tests\oven - - - tests\oven - - - tests - - - tests\project - - - tests\project - - - tests\project - - - tests\project - - - tests\project - - - tests\project - - - tests - - - tests - - - tests - - - tests\tools - - - tests\tools - - - tests\tools - - - tests\tools - - - tests\workspace - - - tests\workspace - - - tests\workspace - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/Premake5.vcxproj.user b/build/premake/premake5/build/vs2017/Premake5.vcxproj.user deleted file mode 100644 index dfef4a6a5e..0000000000 --- a/build/premake/premake5/build/vs2017/Premake5.vcxproj.user +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - ..\.. - WindowsLocalDebugger - --scripts=$(ProjectDir)/../.. test - - - ..\.. - WindowsLocalDebugger - --scripts=$(ProjectDir)/../.. test - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/curl-lib.vcxproj b/build/premake/premake5/build/vs2017/curl-lib.vcxproj deleted file mode 100644 index ac73617db3..0000000000 --- a/build/premake/premake5/build/vs2017/curl-lib.vcxproj +++ /dev/null @@ -1,455 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {BF552F19-AB22-8A24-D43B-78CCC067BFB2} - true - Win32Proj - curl-lib - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - true - Unicode - v141 - - - StaticLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\curl-lib\ - curl-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\curl-lib\ - curl-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\curl-lib\ - curl-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\curl-lib\ - curl-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/curl-lib.vcxproj.filters b/build/premake/premake5/build/vs2017/curl-lib.vcxproj.filters deleted file mode 100644 index a0093b5ac5..0000000000 --- a/build/premake/premake5/build/vs2017/curl-lib.vcxproj.filters +++ /dev/null @@ -1,813 +0,0 @@ - - - - - {89AF369E-F58E-B539-FEA6-40106A051C9B} - - - {2E97D969-1AFA-680E-C37F-A1C4AFC13491} - - - {3C8C880B-A895-887C-3111-9F7C9D19947C} - - - {13BC98EB-7F26-4D62-C864-FE07340E2BB7} - - - {F4C14AA2-E08E-A5AD-09A8-9355F5D3DA3B} - - - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib - - - lib - - - lib - - - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib - - - lib - - - lib - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/example.vcxproj b/build/premake/premake5/build/vs2017/example.vcxproj deleted file mode 100644 index 494b1ce000..0000000000 --- a/build/premake/premake5/build/vs2017/example.vcxproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {F1997D81-5D79-FC1C-6691-87F3D2EF627E} - true - Win32Proj - example - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - DynamicLibrary - false - Unicode - v141 - true - - - DynamicLibrary - false - Unicode - v141 - true - - - DynamicLibrary - true - Unicode - v141 - - - DynamicLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - false - ..\..\bin\release\ - obj\x86\Release\example\ - example - .dll - - - false - ..\..\bin\release\ - obj\x64\Release\example\ - example - .dll - - - true - ..\..\bin\debug\ - obj\x86\Debug\example\ - example - .dll - - - true - ..\..\bin\debug\ - obj\x64\Debug\example\ - example - .dll - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ..\..\bin\release\example.lib - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ..\..\bin\release\example.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\bin\debug\example.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\bin\debug\example.lib - - - - - - - - - - - {9C53798E-0809-F283-91FD-EB5AFDB1E887} - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/lua-lib.vcxproj b/build/premake/premake5/build/vs2017/lua-lib.vcxproj deleted file mode 100644 index 6f2b29ad81..0000000000 --- a/build/premake/premake5/build/vs2017/lua-lib.vcxproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {AB9F3295-177F-B130-2097-3C078CF51792} - true - Win32Proj - lua-lib - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - true - Unicode - v141 - - - StaticLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\lua-lib\ - lua-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\lua-lib\ - lua-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\lua-lib\ - lua-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\lua-lib\ - lua-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/luashim-lib.vcxproj b/build/premake/premake5/build/vs2017/luashim-lib.vcxproj deleted file mode 100644 index ae9270226e..0000000000 --- a/build/premake/premake5/build/vs2017/luashim-lib.vcxproj +++ /dev/null @@ -1,185 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {9C53798E-0809-F283-91FD-EB5AFDB1E887} - true - Win32Proj - luashim-lib - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - true - Unicode - v141 - - - StaticLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\luashim-lib\ - luashim-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\luashim-lib\ - luashim-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\luashim-lib\ - luashim-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\luashim-lib\ - luashim-lib - .lib - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/luasocket.vcxproj b/build/premake/premake5/build/vs2017/luasocket.vcxproj deleted file mode 100644 index 01916d7c22..0000000000 --- a/build/premake/premake5/build/vs2017/luasocket.vcxproj +++ /dev/null @@ -1,240 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {7085D54F-DCEF-89C6-252E-3B6C91D7671B} - true - Win32Proj - luasocket - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - DynamicLibrary - false - MultiByte - v141 - true - - - DynamicLibrary - false - MultiByte - v141 - true - - - DynamicLibrary - true - MultiByte - v141 - - - DynamicLibrary - true - MultiByte - v141 - - - - - - - - - - - - - - - - - - - false - ..\..\bin\release\ - obj\x86\Release\luasocket\ - luasocket - .dll - - - false - ..\..\bin\release\ - obj\x64\Release\luasocket\ - luasocket - .dll - - - true - ..\..\bin\debug\ - obj\x86\Debug\luasocket\ - luasocket - .dll - - - true - ..\..\bin\debug\ - obj\x64\Debug\luasocket\ - luasocket - .dll - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\release\luasocket.lib - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\release\luasocket.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\debug\luasocket.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\debug\luasocket.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {9C53798E-0809-F283-91FD-EB5AFDB1E887} - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/luasocket.vcxproj.filters b/build/premake/premake5/build/vs2017/luasocket.vcxproj.filters deleted file mode 100644 index 13675a66af..0000000000 --- a/build/premake/premake5/build/vs2017/luasocket.vcxproj.filters +++ /dev/null @@ -1,135 +0,0 @@ - - - - - {2DAB880B-99B4-887C-2230-9F7C8E38947C} - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj b/build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj deleted file mode 100644 index 1f87b8c07e..0000000000 --- a/build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {34744A64-A029-C359-291E-BD3095D2B95D} - true - Win32Proj - mbedtls-lib - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - true - Unicode - v141 - - - StaticLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\mbedtls-lib\ - mbedtls-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\mbedtls-lib\ - mbedtls-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\mbedtls-lib\ - mbedtls-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\mbedtls-lib\ - mbedtls-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj.filters b/build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj.filters deleted file mode 100644 index 05989b86a3..0000000000 --- a/build/premake/premake5/build/vs2017/mbedtls-lib.vcxproj.filters +++ /dev/null @@ -1,426 +0,0 @@ - - - - - {89AF369E-F58E-B539-FEA6-40106A051C9B} - - - {4326A6EE-AFB1-13B3-B8C2-96A724CD6FB3} - - - {3A796C79-A658-EB14-AF70-76EB1BCF5176} - - - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/zip-lib.vcxproj b/build/premake/premake5/build/vs2017/zip-lib.vcxproj deleted file mode 100644 index 8b3ec87545..0000000000 --- a/build/premake/premake5/build/vs2017/zip-lib.vcxproj +++ /dev/null @@ -1,275 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC} - true - Win32Proj - zip-lib - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - true - Unicode - v141 - - - StaticLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\zip-lib\ - zip-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\zip-lib\ - zip-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\zip-lib\ - zip-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\zip-lib\ - zip-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/zip-lib.vcxproj.filters b/build/premake/premake5/build/vs2017/zip-lib.vcxproj.filters deleted file mode 100644 index a4c1d259f3..0000000000 --- a/build/premake/premake5/build/vs2017/zip-lib.vcxproj.filters +++ /dev/null @@ -1,113 +0,0 @@ - - - - - {89AF369E-F58E-B539-FEA6-40106A051C9B} - - - - - - include - - - include - - - include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2017/zlib-lib.vcxproj b/build/premake/premake5/build/vs2017/zlib-lib.vcxproj deleted file mode 100644 index 9baef7ddf2..0000000000 --- a/build/premake/premake5/build/vs2017/zlib-lib.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {7AF09988-66BD-F493-8FD6-E23B7B022A22} - true - Win32Proj - zlib-lib - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - false - Unicode - v141 - true - - - StaticLibrary - true - Unicode - v141 - - - StaticLibrary - true - Unicode - v141 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\zlib-lib\ - zlib-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\zlib-lib\ - zlib-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\zlib-lib\ - zlib-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\zlib-lib\ - zlib-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/Premake5.sln b/build/premake/premake5/build/vs2019/Premake5.sln deleted file mode 100644 index 83d3976d62..0000000000 --- a/build/premake/premake5/build/vs2019/Premake5.sln +++ /dev/null @@ -1,120 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Binary Modules", "Binary Modules", "{EADEF033-D66D-7AFD-7F8C-8EF86BFA8AA3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcxproj", "{F1997D81-5D79-FC1C-6691-87F3D2EF627E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luasocket", "luasocket.vcxproj", "{7085D54F-DCEF-89C6-252E-3B6C91D7671B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Premake5", "Premake5.vcxproj", "{DF59398B-CB26-9496-F43F-823EE06BC924}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contrib", "contrib", "{9D86B421-0947-3058-D281-79D53E017534}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl-lib", "curl-lib.vcxproj", "{BF552F19-AB22-8A24-D43B-78CCC067BFB2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib", "lua-lib.vcxproj", "{AB9F3295-177F-B130-2097-3C078CF51792}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luashim-lib", "luashim-lib.vcxproj", "{9C53798E-0809-F283-91FD-EB5AFDB1E887}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbedtls-lib", "mbedtls-lib.vcxproj", "{34744A64-A029-C359-291E-BD3095D2B95D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zip-lib", "zip-lib.vcxproj", "{3C7AF3AF-A859-724B-B171-FD211DD0D8AC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib-lib", "zlib-lib.vcxproj", "{7AF09988-66BD-F493-8FD6-E23B7B022A22}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|Win32.Build.0 = Debug|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|x64.ActiveCfg = Debug|x64 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Debug|x64.Build.0 = Debug|x64 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|Win32.ActiveCfg = Release|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|Win32.Build.0 = Release|Win32 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|x64.ActiveCfg = Release|x64 - {F1997D81-5D79-FC1C-6691-87F3D2EF627E}.Release|x64.Build.0 = Release|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|Win32.ActiveCfg = Debug|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|Win32.Build.0 = Debug|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|x64.ActiveCfg = Debug|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Debug|x64.Build.0 = Debug|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|Win32.ActiveCfg = Release|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|Win32.Build.0 = Release|Win32 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|x64.ActiveCfg = Release|x64 - {7085D54F-DCEF-89C6-252E-3B6C91D7671B}.Release|x64.Build.0 = Release|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|Win32.Build.0 = Debug|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|x64.ActiveCfg = Debug|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Debug|x64.Build.0 = Debug|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|Win32.ActiveCfg = Release|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|Win32.Build.0 = Release|Win32 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|x64.ActiveCfg = Release|x64 - {DF59398B-CB26-9496-F43F-823EE06BC924}.Release|x64.Build.0 = Release|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|Win32.Build.0 = Debug|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|x64.ActiveCfg = Debug|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Debug|x64.Build.0 = Debug|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|Win32.ActiveCfg = Release|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|Win32.Build.0 = Release|Win32 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|x64.ActiveCfg = Release|x64 - {BF552F19-AB22-8A24-D43B-78CCC067BFB2}.Release|x64.Build.0 = Release|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|Win32.ActiveCfg = Debug|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|Win32.Build.0 = Debug|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|x64.ActiveCfg = Debug|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Debug|x64.Build.0 = Debug|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|Win32.ActiveCfg = Release|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|Win32.Build.0 = Release|Win32 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|x64.ActiveCfg = Release|x64 - {AB9F3295-177F-B130-2097-3C078CF51792}.Release|x64.Build.0 = Release|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|Win32.Build.0 = Debug|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|x64.ActiveCfg = Debug|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Debug|x64.Build.0 = Debug|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|Win32.ActiveCfg = Release|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|Win32.Build.0 = Release|Win32 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|x64.ActiveCfg = Release|x64 - {9C53798E-0809-F283-91FD-EB5AFDB1E887}.Release|x64.Build.0 = Release|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|Win32.ActiveCfg = Debug|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|Win32.Build.0 = Debug|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|x64.ActiveCfg = Debug|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Debug|x64.Build.0 = Debug|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|Win32.ActiveCfg = Release|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|Win32.Build.0 = Release|Win32 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|x64.ActiveCfg = Release|x64 - {34744A64-A029-C359-291E-BD3095D2B95D}.Release|x64.Build.0 = Release|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|Win32.Build.0 = Debug|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|x64.ActiveCfg = Debug|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Debug|x64.Build.0 = Debug|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|Win32.ActiveCfg = Release|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|Win32.Build.0 = Release|Win32 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|x64.ActiveCfg = Release|x64 - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC}.Release|x64.Build.0 = Release|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|Win32.ActiveCfg = Debug|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|Win32.Build.0 = Debug|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|x64.ActiveCfg = Debug|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Debug|x64.Build.0 = Debug|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|Win32.ActiveCfg = Release|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|Win32.Build.0 = Release|Win32 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|x64.ActiveCfg = Release|x64 - {7AF09988-66BD-F493-8FD6-E23B7B022A22}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {F1997D81-5D79-FC1C-6691-87F3D2EF627E} = {EADEF033-D66D-7AFD-7F8C-8EF86BFA8AA3} - {7085D54F-DCEF-89C6-252E-3B6C91D7671B} = {EADEF033-D66D-7AFD-7F8C-8EF86BFA8AA3} - {BF552F19-AB22-8A24-D43B-78CCC067BFB2} = {9D86B421-0947-3058-D281-79D53E017534} - {AB9F3295-177F-B130-2097-3C078CF51792} = {9D86B421-0947-3058-D281-79D53E017534} - {9C53798E-0809-F283-91FD-EB5AFDB1E887} = {9D86B421-0947-3058-D281-79D53E017534} - {34744A64-A029-C359-291E-BD3095D2B95D} = {9D86B421-0947-3058-D281-79D53E017534} - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC} = {9D86B421-0947-3058-D281-79D53E017534} - {7AF09988-66BD-F493-8FD6-E23B7B022A22} = {9D86B421-0947-3058-D281-79D53E017534} - EndGlobalSection -EndGlobal diff --git a/build/premake/premake5/build/vs2019/Premake5.vcxproj b/build/premake/premake5/build/vs2019/Premake5.vcxproj deleted file mode 100644 index 27769c0828..0000000000 --- a/build/premake/premake5/build/vs2019/Premake5.vcxproj +++ /dev/null @@ -1,599 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {DF59398B-CB26-9496-F43F-823EE06BC924} - true - Win32Proj - Premake5 - - - - Application - false - Unicode - v142 - true - - - Application - false - Unicode - v142 - true - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - ..\..\bin\release\ - obj\x86\Release\Premake5\ - premake5 - .exe - - - false - ..\..\bin\release\ - obj\x64\Release\Premake5\ - premake5 - .exe - - - true - ..\..\bin\debug\ - obj\x86\Debug\Premake5\ - premake5 - .exe - - - true - ..\..\bin\debug\ - obj\x64\Debug\Premake5\ - premake5 - .exe - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Console - true - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Console - true - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Console - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;..\..\contrib\zlib;..\..\contrib\libzip;..\..\contrib\curl\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Console - true - ole32.lib;ws2_32.lib;advapi32.lib;version.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {AB9F3295-177F-B130-2097-3C078CF51792} - - - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC} - - - {7AF09988-66BD-F493-8FD6-E23B7B022A22} - - - {BF552F19-AB22-8A24-D43B-78CCC067BFB2} - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/Premake5.vcxproj.filters b/build/premake/premake5/build/vs2019/Premake5.vcxproj.filters deleted file mode 100644 index 2e9afdf19f..0000000000 --- a/build/premake/premake5/build/vs2019/Premake5.vcxproj.filters +++ /dev/null @@ -1,1320 +0,0 @@ - - - - - {FEAC8BD4-6A8C-0A70-73A4-9546DF0271D1} - - - {4E56C0F1-BAE1-2DB6-C3F2-B0AA2FFD89B6} - - - {B043763C-1CB0-3137-E5A3-C99451CF539F} - - - {56255C4E-421E-7BA0-6B50-602557A85AAC} - - - {B8384320-A432-6C72-8D9F-02837938D2DE} - - - {F1EA2A26-5D55-DF9C-A693-9042123DBDF1} - - - {B1B1DF92-1DC8-DD28-663F-694AD294AEB0} - - - {9386D446-FF11-420B-0823-C5FF742D9E0B} - - - {51F0D946-BD7B-470B-C68C-CAFF3297A30B} - - - {12B50CC7-7E75-88FD-47B0-D17AB32FCDD9} - - - {74A5A7AC-E006-85BA-6974-CB6CD5D4BB79} - - - {46B9405A-B2F0-88F1-BBFA-EC1427B1AFEA} - - - {19F6011A-05F0-2A6C-EE5C-C17CDAF590D8} - - - {F29FF7B5-5EB8-DEDF-2765-6E79933C7379} - - - {8457A3A8-7025-97AE-59B9-07D545267313} - - - {66D59E88-5264-2852-FB82-3C4DE7F038F8} - - - {B7B3915C-2369-0A52-AC5D-042918120156} - - - {E460CE8C-5077-CC22-99EE-574405449DAA} - - - {BB1B144F-27A7-8113-30B8-04089CC2DD13} - - - {DDA65563-4913-115E-1207-A9BB7E3233C6} - - - {69C9B067-5584-A013-FE3B-195EEAD5EAA3} - - - {616A373C-4DBB-227E-761F-114062CFB5E7} - - - {4C43B06E-38FE-9F1A-E1B5-1865CD4FEAAA} - - - {C07C5821-2C95-3F4B-F541-CFE46119D4E4} - - - {8F45E192-7B00-D13E-24B8-498910521BCF} - - - {6845E192-5400-D13E-FDB7-4989E9511BCF} - - - {6B45E192-5700-D13E-00B8-4989EC511BCF} - - - {80143BC8-ECD4-B6FE-B50F-007C218FFBDA} - - - {625F6748-CEC0-4456-572E-8B08C38E7B15} - - - {6D076287-D9E6-E022-E2FE-6BF94E5D4784} - - - {2DAB880B-99B4-887C-2230-9F7C8E38947C} - - - {EDED2727-59A3-A01C-E297-9AF34E4C9720} - - - {9FCE2E0B-0BE5-2CA1-545C-B8C2C0B1FD28} - - - {F7972DCF-E364-88DA-0C7E-7682F8A9BD68} - - - {DA1D31CF-C6EA-8BDA-EF03-7A82DB2FC168} - - - {8DED2DB6-F957-E22C-4296-93D2AE3FC081} - - - {78756B10-E489-93C1-AD0B-372119DF8FF2} - - - {C1E2B49B-2D4D-6912-768B-1AB8E2344767} - - - {22895112-0E41-935F-7748-6CBB631F2E50} - - - {9D2D28F0-8990-B794-3216-F04A1E588317} - - - {C38526F7-AFE8-B59B-586E-EE5144B0811E} - - - {9F015912-8BB9-9A5F-F4C0-73BBE0973550} - - - {DEA9F6E4-4A6A-721B-13A5-BB987F24B7F7} - - - {1804D05D-84B9-4853-0DAE-422A79623F57} - - - {F6443252-62D0-9F16-6BE1-220BD7EBFB16} - - - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src\host - - - src - - - - - - - - - - modules\android - - - modules\android - - - modules\android - - - modules\android - - - modules\android - - - modules\android\tests - - - modules\android\tests - - - modules\android\tests - - - modules\android - - - modules\android - - - modules\android - - - modules\android - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite - - - modules\codelite\tests - - - modules\codelite\tests - - - modules\codelite\tests - - - modules\codelite\tests - - - modules\d - - - modules\d - - - modules\d - - - modules\d - - - modules\d\actions - - - modules\d\actions - - - modules\d\actions - - - modules\d - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tests - - - modules\d\tools - - - modules\d\tools - - - modules\d\tools - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake - - - modules\gmake\tests - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cpp - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests\cs - - - modules\gmake\tests - - - modules\gmake\tests - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake\tests\workspace - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2 - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\gmake2\tests - - - modules\raw - - - modules\raw - - - modules\raw - - - modules\raw - - - modules\raw - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\self-test - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio\tests - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\cs2005 - - - modules\vstudio\tests\dotnet2005 - - - modules\vstudio\tests\dotnet2005 - - - modules\vstudio\tests\fs2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\sln2005 - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc200x - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2010 - - - modules\vstudio\tests\vc2013 - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\vstudio - - - modules\xcode - - - modules\xcode - - - modules\xcode - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode\tests - - - modules\xcode - - - modules\xcode - - - modules\xcode - - - modules\xcode - - - - - scripts - - - scripts - - - scripts - - - src - - - src - - - src - - - src - - - src\actions\clean - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\base - - - src\tools - - - src\tools - - - src\tools - - - src\tools - - - src\tools - - - src\tools - - - tests - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\api - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\base - - - tests\config - - - tests\config - - - tests\config - - - tests\folder - - - tests\folder - - - tests\oven - - - tests\oven - - - tests - - - tests\project - - - tests\project - - - tests\project - - - tests\project - - - tests\project - - - tests\project - - - tests - - - tests - - - tests - - - tests\tools - - - tests\tools - - - tests\tools - - - tests\tools - - - tests\workspace - - - tests\workspace - - - tests\workspace - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/Premake5.vcxproj.user b/build/premake/premake5/build/vs2019/Premake5.vcxproj.user deleted file mode 100644 index ad67bb7c8c..0000000000 --- a/build/premake/premake5/build/vs2019/Premake5.vcxproj.user +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - ..\.. - WindowsLocalDebugger - --scripts=$(ProjectDir)/../.. test - - - ..\.. - WindowsLocalDebugger - --scripts=$(ProjectDir)/../.. test - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/curl-lib.vcxproj b/build/premake/premake5/build/vs2019/curl-lib.vcxproj deleted file mode 100644 index 0bd45ca3f6..0000000000 --- a/build/premake/premake5/build/vs2019/curl-lib.vcxproj +++ /dev/null @@ -1,454 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {BF552F19-AB22-8A24-D43B-78CCC067BFB2} - true - Win32Proj - curl-lib - - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\curl-lib\ - curl-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\curl-lib\ - curl-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\curl-lib\ - curl-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\curl-lib\ - curl-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;BUILDING_LIBCURL;CURL_STATICLIB;HTTP_ONLY;USE_ZLIB;USE_SCHANNEL;USE_WINDOWS_SSPI;%(PreprocessorDefinitions) - ..\..\contrib\curl\include;..\..\contrib\curl\lib;..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - crypt32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/curl-lib.vcxproj.filters b/build/premake/premake5/build/vs2019/curl-lib.vcxproj.filters deleted file mode 100644 index a0093b5ac5..0000000000 --- a/build/premake/premake5/build/vs2019/curl-lib.vcxproj.filters +++ /dev/null @@ -1,813 +0,0 @@ - - - - - {89AF369E-F58E-B539-FEA6-40106A051C9B} - - - {2E97D969-1AFA-680E-C37F-A1C4AFC13491} - - - {3C8C880B-A895-887C-3111-9F7C9D19947C} - - - {13BC98EB-7F26-4D62-C864-FE07340E2BB7} - - - {F4C14AA2-E08E-A5AD-09A8-9355F5D3DA3B} - - - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - include\curl - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib - - - lib - - - lib - - - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib\vauth - - - lib - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib\vtls - - - lib - - - lib - - - lib - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/example.vcxproj b/build/premake/premake5/build/vs2019/example.vcxproj deleted file mode 100644 index 12f5a5926e..0000000000 --- a/build/premake/premake5/build/vs2019/example.vcxproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {F1997D81-5D79-FC1C-6691-87F3D2EF627E} - true - Win32Proj - example - - - - DynamicLibrary - false - Unicode - v142 - true - - - DynamicLibrary - false - Unicode - v142 - true - - - DynamicLibrary - true - Unicode - v142 - - - DynamicLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - false - ..\..\bin\release\ - obj\x86\Release\example\ - example - .dll - - - false - ..\..\bin\release\ - obj\x64\Release\example\ - example - .dll - - - true - ..\..\bin\debug\ - obj\x86\Debug\example\ - example - .dll - - - true - ..\..\bin\debug\ - obj\x64\Debug\example\ - example - .dll - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ..\..\bin\release\example.lib - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ..\..\bin\release\example.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\bin\debug\example.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\bin\debug\example.lib - - - - - - - - - - - {9C53798E-0809-F283-91FD-EB5AFDB1E887} - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/lua-lib.vcxproj b/build/premake/premake5/build/vs2019/lua-lib.vcxproj deleted file mode 100644 index d5b67ccbc6..0000000000 --- a/build/premake/premake5/build/vs2019/lua-lib.vcxproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {AB9F3295-177F-B130-2097-3C078CF51792} - true - Win32Proj - lua-lib - - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\lua-lib\ - lua-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\lua-lib\ - lua-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\lua-lib\ - lua-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\lua-lib\ - lua-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/luashim-lib.vcxproj b/build/premake/premake5/build/vs2019/luashim-lib.vcxproj deleted file mode 100644 index 9cc696c2ee..0000000000 --- a/build/premake/premake5/build/vs2019/luashim-lib.vcxproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {9C53798E-0809-F283-91FD-EB5AFDB1E887} - true - Win32Proj - luashim-lib - - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\luashim-lib\ - luashim-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\luashim-lib\ - luashim-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\luashim-lib\ - luashim-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\luashim-lib\ - luashim-lib - .lib - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - ..\..\contrib\lua\src;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/luasocket.vcxproj b/build/premake/premake5/build/vs2019/luasocket.vcxproj deleted file mode 100644 index 176e4d67b3..0000000000 --- a/build/premake/premake5/build/vs2019/luasocket.vcxproj +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {7085D54F-DCEF-89C6-252E-3B6C91D7671B} - true - Win32Proj - luasocket - - - - DynamicLibrary - false - MultiByte - v142 - true - - - DynamicLibrary - false - MultiByte - v142 - true - - - DynamicLibrary - true - MultiByte - v142 - - - DynamicLibrary - true - MultiByte - v142 - - - - - - - - - - - - - - - - - - - false - ..\..\bin\release\ - obj\x86\Release\luasocket\ - luasocket - .dll - - - false - ..\..\bin\release\ - obj\x64\Release\luasocket\ - luasocket - .dll - - - true - ..\..\bin\debug\ - obj\x86\Debug\luasocket\ - luasocket - .dll - - - true - ..\..\bin\debug\ - obj\x64\Debug\luasocket\ - luasocket - .dll - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\release\luasocket.lib - - - - - NotUsing - Level4 - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\release\luasocket.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\debug\luasocket.lib - - - - - NotUsing - Level4 - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;LUASOCKET_API=__declspec(dllexport);%(PreprocessorDefinitions) - ..\..\contrib\lua\src;..\..\contrib\luashim;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ws2_32.lib;%(AdditionalDependencies) - ..\..\bin\debug\luasocket.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {9C53798E-0809-F283-91FD-EB5AFDB1E887} - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/luasocket.vcxproj.filters b/build/premake/premake5/build/vs2019/luasocket.vcxproj.filters deleted file mode 100644 index 13675a66af..0000000000 --- a/build/premake/premake5/build/vs2019/luasocket.vcxproj.filters +++ /dev/null @@ -1,135 +0,0 @@ - - - - - {2DAB880B-99B4-887C-2230-9F7C8E38947C} - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - src - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj b/build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj deleted file mode 100644 index 60dd72fa2c..0000000000 --- a/build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj +++ /dev/null @@ -1,315 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {34744A64-A029-C359-291E-BD3095D2B95D} - true - Win32Proj - mbedtls-lib - - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\mbedtls-lib\ - mbedtls-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\mbedtls-lib\ - mbedtls-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\mbedtls-lib\ - mbedtls-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\mbedtls-lib\ - mbedtls-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;MBEDTLS_ZLIB_SUPPORT;%(PreprocessorDefinitions) - ..\..\contrib\mbedtls\include;..\..\contrib\zlib;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj.filters b/build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj.filters deleted file mode 100644 index 05989b86a3..0000000000 --- a/build/premake/premake5/build/vs2019/mbedtls-lib.vcxproj.filters +++ /dev/null @@ -1,426 +0,0 @@ - - - - - {89AF369E-F58E-B539-FEA6-40106A051C9B} - - - {4326A6EE-AFB1-13B3-B8C2-96A724CD6FB3} - - - {3A796C79-A658-EB14-AF70-76EB1BCF5176} - - - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - include\mbedtls - - - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - library - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/zip-lib.vcxproj b/build/premake/premake5/build/vs2019/zip-lib.vcxproj deleted file mode 100644 index 82b0ee31cb..0000000000 --- a/build/premake/premake5/build/vs2019/zip-lib.vcxproj +++ /dev/null @@ -1,274 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {3C7AF3AF-A859-724B-B171-FD211DD0D8AC} - true - Win32Proj - zip-lib - - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\zip-lib\ - zip-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\zip-lib\ - zip-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\zip-lib\ - zip-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\zip-lib\ - zip-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - ..\..\contrib\libzip\include;%(AdditionalIncludeDirectories) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/zip-lib.vcxproj.filters b/build/premake/premake5/build/vs2019/zip-lib.vcxproj.filters deleted file mode 100644 index a4c1d259f3..0000000000 --- a/build/premake/premake5/build/vs2019/zip-lib.vcxproj.filters +++ /dev/null @@ -1,113 +0,0 @@ - - - - - {89AF369E-F58E-B539-FEA6-40106A051C9B} - - - - - - include - - - include - - - include - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/build/vs2019/zlib-lib.vcxproj b/build/premake/premake5/build/vs2019/zlib-lib.vcxproj deleted file mode 100644 index 8c9e391430..0000000000 --- a/build/premake/premake5/build/vs2019/zlib-lib.vcxproj +++ /dev/null @@ -1,201 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Debug - Win32 - - - Debug - x64 - - - - {7AF09988-66BD-F493-8FD6-E23B7B022A22} - true - Win32Proj - zlib-lib - - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - true - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - - - - - - - - - - - - - - - - - bin\x86\Release\ - obj\x86\Release\zlib-lib\ - zlib-lib - .lib - - - bin\x64\Release\ - obj\x64\Release\zlib-lib\ - zlib-lib - .lib - - - bin\x86\Debug\ - obj\x86\Debug\zlib-lib\ - zlib-lib - .lib - - - bin\x64\Debug\ - obj\x64\Debug\zlib-lib\ - zlib-lib - .lib - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - Default - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - false - true - - - Windows - true - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - TurnOffAllWarnings - PREMAKE_COMPRESSION;CURL_STATICLIB;PREMAKE_CURL;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;N_FSEEKO;_WINDOWS;%(PreprocessorDefinitions) - EditAndContinue - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/premake/premake5/contrib/curl/include/Makefile.am b/build/premake/premake5/contrib/curl/include/Makefile.am deleted file mode 100644 index 3b24860299..0000000000 --- a/build/premake/premake5/contrib/curl/include/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = curl - -EXTRA_DIST = README - -AUTOMAKE_OPTIONS = foreign no-dependencies diff --git a/build/premake/premake5/contrib/curl/include/README b/build/premake/premake5/contrib/curl/include/README deleted file mode 100644 index 6eb73b2b74..0000000000 --- a/build/premake/premake5/contrib/curl/include/README +++ /dev/null @@ -1,55 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -Include files for libcurl, external users. - -They're all placed in the curl subdirectory here for better fit in any kind -of environment. You must include files from here using... - - #include - -... style and point the compiler's include path to the directory holding the -curl subdirectory. It makes it more likely to survive future modifications. - -NOTE FOR LIBCURL HACKERS - -The following notes apply to libcurl version 7.19.0 and later. - -* The distributed curl/curlbuild.h file is only intended to be used on systems - which can not run the also distributed configure script. - -* The distributed curlbuild.h file is generated as a copy of curlbuild.h.dist - when the libcurl source code distribution archive file is originally created. - -* If you check out from git on a non-configure platform, you must run the - appropriate buildconf* script to set up curlbuild.h and other local files - before being able of compiling the library. - -* On systems capable of running the configure script, the configure process - will overwrite the distributed include/curl/curlbuild.h file with one that - is suitable and specific to the library being configured and built, which - is generated from the include/curl/curlbuild.h.in template file. - -* If you intend to distribute an already compiled libcurl library you _MUST_ - also distribute along with it the generated curl/curlbuild.h which has been - used to compile it. Otherwise the library will be of no use for the users of - the library that you have built. It is _your_ responsibility to provide this - file. No one at the curl project can know how you have built the library. - -* File curl/curlbuild.h includes platform and configuration dependent info, - and must not be modified by anyone. Configure script generates it for you. - -* We cannot assume anything else but very basic compiler features being - present. While libcurl requires an ANSI C compiler to build, some of the - earlier ANSI compilers clearly can't deal with some preprocessor operators. - -* Newlines must remain unix-style for older compilers' sake. - -* Comments must be written in the old-style /* unnested C-fashion */ - -To figure out how to do good and portable checks for features, operating -systems or specific hardwarare, a very good resource is Bjorn Reese's -collection at http://predef.sf.net/ diff --git a/build/premake/premake5/contrib/curl/include/curl/Makefile.am b/build/premake/premake5/contrib/curl/include/curl/Makefile.am deleted file mode 100644 index 7c924fcb5a..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -########################################################################### -pkginclude_HEADERS = \ - curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \ - typecheck-gcc.h curlbuild.h curlrules.h - -pkgincludedir= $(includedir)/curl - -# curlbuild.h does not exist in the git tree. When the original libcurl -# source code distribution archive file is created, curlbuild.h.dist is -# renamed to curlbuild.h and included in the tarball so that it can be -# used directly on non-configure systems. -# -# The distributed curlbuild.h will be overwritten on configure systems -# when the configure script runs, with one that is suitable and specific -# to the library being configured and built. -# -# curlbuild.h.in is the distributed template file from which the configure -# script creates curlbuild.h at library configuration time, overwiting the -# one included in the distribution archive. -# -# curlbuild.h.dist is not included in the source code distribution archive. - -EXTRA_DIST = curlbuild.h.in - -DISTCLEANFILES = curlbuild.h - -checksrc: - @@PERL@ $(top_srcdir)/lib/checksrc.pl -Wcurlbuild.h -D$(top_srcdir)/include/curl $(pkginclude_HEADERS) $(EXTRA_DIST) - -if CURLDEBUG -# for debug builds, we scan the sources on all regular make invokes -all-local: checksrc -endif diff --git a/build/premake/premake5/contrib/curl/include/curl/curl.h b/build/premake/premake5/contrib/curl/include/curl/curl.h deleted file mode 100644 index 467bb02409..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/curl.h +++ /dev/null @@ -1,2536 +0,0 @@ -#ifndef __CURL_CURL_H -#define __CURL_CURL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * If you have libcurl problems, all docs and details are found here: - * https://curl.haxx.se/libcurl/ - * - * curl-library mailing list subscription and unsubscription web interface: - * https://cool.haxx.se/mailman/listinfo/curl-library/ - */ - -#ifdef CURL_NO_OLDIES -#define CURL_STRICTER -#endif - -#include "curlver.h" /* libcurl version defines */ -#include "curlbuild.h" /* libcurl build definitions */ -#include "curlrules.h" /* libcurl rules enforcement */ - -/* - * Define WIN32 when build target is Win32 API - */ - -#if (defined(_WIN32) || defined(__WIN32__)) && \ - !defined(WIN32) && !defined(__SYMBIAN32__) -#define WIN32 -#endif - -#include -#include - -#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) -/* Needed for __FreeBSD_version symbol definition */ -#include -#endif - -/* The include stuff here below is mainly for time_t! */ -#include -#include - -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \ - defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include -#include -#endif -#endif - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on systems that are known to - require it! */ -#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ - defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ - (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) -#include -#endif - -#if !defined(WIN32) && !defined(_WIN32_WCE) -#include -#endif - -#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) -#include -#endif - -#ifdef __BEOS__ -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) -typedef struct Curl_easy CURL; -typedef struct Curl_share CURLSH; -#else -typedef void CURL; -typedef void CURLSH; -#endif - -/* - * libcurl external API function linkage decorations. - */ - -#ifdef CURL_STATICLIB -# define CURL_EXTERN -#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) -# if defined(BUILDING_LIBCURL) -# define CURL_EXTERN __declspec(dllexport) -# else -# define CURL_EXTERN __declspec(dllimport) -# endif -#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) -# define CURL_EXTERN CURL_EXTERN_SYMBOL -#else -# define CURL_EXTERN -#endif - -#ifndef curl_socket_typedef -/* socket typedef */ -#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H) -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif -#define curl_socket_typedef -#endif /* curl_socket_typedef */ - -struct curl_httppost { - struct curl_httppost *next; /* next entry in the list */ - char *name; /* pointer to allocated name */ - long namelength; /* length of name length */ - char *contents; /* pointer to allocated data contents */ - long contentslength; /* length of contents field, see also - CURL_HTTPPOST_LARGE */ - char *buffer; /* pointer to allocated buffer contents */ - long bufferlength; /* length of buffer field */ - char *contenttype; /* Content-Type */ - struct curl_slist *contentheader; /* list of extra headers for this form */ - struct curl_httppost *more; /* if one field name has more than one - file, this link should link to following - files */ - long flags; /* as defined below */ - -/* specified content is a file name */ -#define CURL_HTTPPOST_FILENAME (1<<0) -/* specified content is a file name */ -#define CURL_HTTPPOST_READFILE (1<<1) -/* name is only stored pointer do not free in formfree */ -#define CURL_HTTPPOST_PTRNAME (1<<2) -/* contents is only stored pointer do not free in formfree */ -#define CURL_HTTPPOST_PTRCONTENTS (1<<3) -/* upload file from buffer */ -#define CURL_HTTPPOST_BUFFER (1<<4) -/* upload file from pointer contents */ -#define CURL_HTTPPOST_PTRBUFFER (1<<5) -/* upload file contents by using the regular read callback to get the data and - pass the given pointer as custom pointer */ -#define CURL_HTTPPOST_CALLBACK (1<<6) -/* use size in 'contentlen', added in 7.46.0 */ -#define CURL_HTTPPOST_LARGE (1<<7) - - char *showfilename; /* The file name to show. If not set, the - actual file name will be used (if this - is a file part) */ - void *userp; /* custom pointer used for - HTTPPOST_CALLBACK posts */ - curl_off_t contentlen; /* alternative length of contents - field. Used if CURL_HTTPPOST_LARGE is - set. Added in 7.46.0 */ -}; - -/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered - deprecated but was the only choice up until 7.31.0 */ -typedef int (*curl_progress_callback)(void *clientp, - double dltotal, - double dlnow, - double ultotal, - double ulnow); - -/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in - 7.32.0, it avoids floating point and provides more detailed information. */ -typedef int (*curl_xferinfo_callback)(void *clientp, - curl_off_t dltotal, - curl_off_t dlnow, - curl_off_t ultotal, - curl_off_t ulnow); - -#ifndef CURL_MAX_READ_SIZE - /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */ -#define CURL_MAX_READ_SIZE 524288 -#endif - -#ifndef CURL_MAX_WRITE_SIZE - /* Tests have proven that 20K is a very bad buffer size for uploads on - Windows, while 16K for some odd reason performed a lot better. - We do the ifndef check to allow this value to easier be changed at build - time for those who feel adventurous. The practical minimum is about - 400 bytes since libcurl uses a buffer of this size as a scratch area - (unrelated to network send operations). */ -#define CURL_MAX_WRITE_SIZE 16384 -#endif - -#ifndef CURL_MAX_HTTP_HEADER -/* The only reason to have a max limit for this is to avoid the risk of a bad - server feeding libcurl with a never-ending header that will cause reallocs - infinitely */ -#define CURL_MAX_HTTP_HEADER (100*1024) -#endif - -/* This is a magic return code for the write callback that, when returned, - will signal libcurl to pause receiving on the current transfer. */ -#define CURL_WRITEFUNC_PAUSE 0x10000001 - -typedef size_t (*curl_write_callback)(char *buffer, - size_t size, - size_t nitems, - void *outstream); - - - -/* enumeration of file types */ -typedef enum { - CURLFILETYPE_FILE = 0, - CURLFILETYPE_DIRECTORY, - CURLFILETYPE_SYMLINK, - CURLFILETYPE_DEVICE_BLOCK, - CURLFILETYPE_DEVICE_CHAR, - CURLFILETYPE_NAMEDPIPE, - CURLFILETYPE_SOCKET, - CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ - - CURLFILETYPE_UNKNOWN /* should never occur */ -} curlfiletype; - -#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) -#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) -#define CURLFINFOFLAG_KNOWN_TIME (1<<2) -#define CURLFINFOFLAG_KNOWN_PERM (1<<3) -#define CURLFINFOFLAG_KNOWN_UID (1<<4) -#define CURLFINFOFLAG_KNOWN_GID (1<<5) -#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) -#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) - -/* Content of this structure depends on information which is known and is - achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man - page for callbacks returning this structure -- some fields are mandatory, - some others are optional. The FLAG field has special meaning. */ -struct curl_fileinfo { - char *filename; - curlfiletype filetype; - time_t time; - unsigned int perm; - int uid; - int gid; - curl_off_t size; - long int hardlinks; - - struct { - /* If some of these fields is not NULL, it is a pointer to b_data. */ - char *time; - char *perm; - char *user; - char *group; - char *target; /* pointer to the target filename of a symlink */ - } strings; - - unsigned int flags; - - /* used internally */ - char *b_data; - size_t b_size; - size_t b_used; -}; - -/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ -#define CURL_CHUNK_BGN_FUNC_OK 0 -#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ -#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ - -/* if splitting of data transfer is enabled, this callback is called before - download of an individual chunk started. Note that parameter "remains" works - only for FTP wildcard downloading (for now), otherwise is not used */ -typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, - void *ptr, - int remains); - -/* return codes for CURLOPT_CHUNK_END_FUNCTION */ -#define CURL_CHUNK_END_FUNC_OK 0 -#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ - -/* If splitting of data transfer is enabled this callback is called after - download of an individual chunk finished. - Note! After this callback was set then it have to be called FOR ALL chunks. - Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. - This is the reason why we don't need "transfer_info" parameter in this - callback and we are not interested in "remains" parameter too. */ -typedef long (*curl_chunk_end_callback)(void *ptr); - -/* return codes for FNMATCHFUNCTION */ -#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ -#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ -#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ - -/* callback type for wildcard downloading pattern matching. If the - string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ -typedef int (*curl_fnmatch_callback)(void *ptr, - const char *pattern, - const char *string); - -/* These are the return codes for the seek callbacks */ -#define CURL_SEEKFUNC_OK 0 -#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ -#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so - libcurl might try other means instead */ -typedef int (*curl_seek_callback)(void *instream, - curl_off_t offset, - int origin); /* 'whence' */ - -/* This is a return code for the read callback that, when returned, will - signal libcurl to immediately abort the current transfer. */ -#define CURL_READFUNC_ABORT 0x10000000 -/* This is a return code for the read callback that, when returned, will - signal libcurl to pause sending data on the current transfer. */ -#define CURL_READFUNC_PAUSE 0x10000001 - -typedef size_t (*curl_read_callback)(char *buffer, - size_t size, - size_t nitems, - void *instream); - -typedef enum { - CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ - CURLSOCKTYPE_LAST /* never use */ -} curlsocktype; - -/* The return code from the sockopt_callback can signal information back - to libcurl: */ -#define CURL_SOCKOPT_OK 0 -#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return - CURLE_ABORTED_BY_CALLBACK */ -#define CURL_SOCKOPT_ALREADY_CONNECTED 2 - -typedef int (*curl_sockopt_callback)(void *clientp, - curl_socket_t curlfd, - curlsocktype purpose); - -struct curl_sockaddr { - int family; - int socktype; - int protocol; - unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it - turned really ugly and painful on the systems that - lack this type */ - struct sockaddr addr; -}; - -typedef curl_socket_t -(*curl_opensocket_callback)(void *clientp, - curlsocktype purpose, - struct curl_sockaddr *address); - -typedef int -(*curl_closesocket_callback)(void *clientp, curl_socket_t item); - -typedef enum { - CURLIOE_OK, /* I/O operation successful */ - CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ - CURLIOE_FAILRESTART, /* failed to restart the read */ - CURLIOE_LAST /* never use */ -} curlioerr; - -typedef enum { - CURLIOCMD_NOP, /* no operation */ - CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ - CURLIOCMD_LAST /* never use */ -} curliocmd; - -typedef curlioerr (*curl_ioctl_callback)(CURL *handle, - int cmd, - void *clientp); - -#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS -/* - * The following typedef's are signatures of malloc, free, realloc, strdup and - * calloc respectively. Function pointers of these types can be passed to the - * curl_global_init_mem() function to set user defined memory management - * callback routines. - */ -typedef void *(*curl_malloc_callback)(size_t size); -typedef void (*curl_free_callback)(void *ptr); -typedef void *(*curl_realloc_callback)(void *ptr, size_t size); -typedef char *(*curl_strdup_callback)(const char *str); -typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); - -#define CURL_DID_MEMORY_FUNC_TYPEDEFS -#endif - -/* the kind of data that is passed to information_callback*/ -typedef enum { - CURLINFO_TEXT = 0, - CURLINFO_HEADER_IN, /* 1 */ - CURLINFO_HEADER_OUT, /* 2 */ - CURLINFO_DATA_IN, /* 3 */ - CURLINFO_DATA_OUT, /* 4 */ - CURLINFO_SSL_DATA_IN, /* 5 */ - CURLINFO_SSL_DATA_OUT, /* 6 */ - CURLINFO_END -} curl_infotype; - -typedef int (*curl_debug_callback) - (CURL *handle, /* the handle/transfer this concerns */ - curl_infotype type, /* what kind of data */ - char *data, /* points to the data */ - size_t size, /* size of the data pointed to */ - void *userptr); /* whatever the user please */ - -/* All possible error codes from all sorts of curl functions. Future versions - may return other values, stay prepared. - - Always add new return codes last. Never *EVER* remove any. The return - codes must remain the same! - */ - -typedef enum { - CURLE_OK = 0, - CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ - CURLE_FAILED_INIT, /* 2 */ - CURLE_URL_MALFORMAT, /* 3 */ - CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for - 7.17.0, reused in April 2011 for 7.21.5] */ - CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ - CURLE_COULDNT_RESOLVE_HOST, /* 6 */ - CURLE_COULDNT_CONNECT, /* 7 */ - CURLE_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server - due to lack of access - when login fails - this is not returned. */ - CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for - 7.15.4, reused in Dec 2011 for 7.24.0]*/ - CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server - [was obsoleted in August 2007 for 7.17.0, - reused in Dec 2011 for 7.24.0]*/ - CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ - CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ - CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. - [was obsoleted in August 2007 for 7.17.0, - reused in July 2014 for 7.38.0] */ - CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ - CURLE_PARTIAL_FILE, /* 18 */ - CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ - CURLE_OBSOLETE20, /* 20 - NOT USED */ - CURLE_QUOTE_ERROR, /* 21 - quote command failure */ - CURLE_HTTP_RETURNED_ERROR, /* 22 */ - CURLE_WRITE_ERROR, /* 23 */ - CURLE_OBSOLETE24, /* 24 - NOT USED */ - CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ - CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ - CURLE_OUT_OF_MEMORY, /* 27 */ - /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error - instead of a memory allocation error if CURL_DOES_CONVERSIONS - is defined - */ - CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ - CURLE_OBSOLETE29, /* 29 - NOT USED */ - CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ - CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ - CURLE_OBSOLETE32, /* 32 - NOT USED */ - CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ - CURLE_HTTP_POST_ERROR, /* 34 */ - CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ - CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ - CURLE_FILE_COULDNT_READ_FILE, /* 37 */ - CURLE_LDAP_CANNOT_BIND, /* 38 */ - CURLE_LDAP_SEARCH_FAILED, /* 39 */ - CURLE_OBSOLETE40, /* 40 - NOT USED */ - CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */ - CURLE_ABORTED_BY_CALLBACK, /* 42 */ - CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_OBSOLETE44, /* 44 - NOT USED */ - CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ - CURLE_OBSOLETE46, /* 46 - NOT USED */ - CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ - CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */ - CURLE_OBSOLETE50, /* 50 - NOT USED */ - CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint - wasn't verified fine */ - CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ - CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ - CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as - default */ - CURLE_SEND_ERROR, /* 55 - failed sending network data */ - CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_OBSOLETE57, /* 57 - NOT IN USE */ - CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ - CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ - CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ - CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ - CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ - CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind - that failed */ - CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ - CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not - accepted and we failed to login */ - CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ - CURLE_TFTP_PERM, /* 69 - permission problem on server */ - CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ - CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ - CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ - CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ - CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ - CURLE_CONV_FAILED, /* 75 - conversion failed */ - CURLE_CONV_REQD, /* 76 - caller must register conversion - callbacks using curl_easy_setopt options - CURLOPT_CONV_FROM_NETWORK_FUNCTION, - CURLOPT_CONV_TO_NETWORK_FUNCTION, and - CURLOPT_CONV_FROM_UTF8_FUNCTION */ - CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing - or wrong format */ - CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ - CURLE_SSH, /* 79 - error from the SSH layer, somewhat - generic so the error message will be of - interest when this has happened */ - - CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL - connection */ - CURLE_AGAIN, /* 81 - socket is not ready for send/recv, - wait till it's ready and try again (Added - in 7.18.2) */ - CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or - wrong format (Added in 7.19.0) */ - CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in - 7.19.0) */ - CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ - CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ - CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ - CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ - CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ - CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the - session will be queued */ - CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not - match */ - CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ - CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer - */ - CURL_LAST /* never use! */ -} CURLcode; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Previously obsolete error code re-used in 7.38.0 */ -#define CURLE_OBSOLETE16 CURLE_HTTP2 - -/* Previously obsolete error codes re-used in 7.24.0 */ -#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED -#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT - -/* compatibility with older names */ -#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING -#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY - -/* The following were added in 7.21.5, April 2011 */ -#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION - -/* The following were added in 7.17.1 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION - -/* The following were added in 7.17.0 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ -#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 -#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 -#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 -#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 -#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 -#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 -#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 -#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 -#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 -#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 -#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 -#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN - -#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED -#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE -#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR -#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL -#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS -#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR -#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED - -/* The following were added earlier */ - -#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT - -#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED -#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED - -#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME - -/* This was the error code 50 in 7.7.3 and a few earlier versions, this - is no longer used by libcurl but is instead #defined here only to not - make programs break */ -#define CURLE_ALREADY_COMPLETE 99999 - -/* Provide defines for really old option names */ -#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */ -#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */ -#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA - -/* Since long deprecated options with no code in the lib that does anything - with them. */ -#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 -#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 - -#endif /*!CURL_NO_OLDIES*/ - -/* This prototype applies to all conversion callbacks */ -typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); - -typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ - void *ssl_ctx, /* actually an - OpenSSL SSL_CTX */ - void *userptr); - -typedef enum { - CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use - CONNECT HTTP/1.1 */ - CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT - HTTP/1.0 */ - CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ - CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already - in 7.10 */ - CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ - CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ - CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the - host name rather than the IP address. added - in 7.18.0 */ -} curl_proxytype; /* this enum was added in 7.10 */ - -/* - * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: - * - * CURLAUTH_NONE - No HTTP authentication - * CURLAUTH_BASIC - HTTP Basic authentication (default) - * CURLAUTH_DIGEST - HTTP Digest authentication - * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication - * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) - * CURLAUTH_NTLM - HTTP NTLM authentication - * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour - * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper - * CURLAUTH_ONLY - Use together with a single other type to force no - * authentication or just that single type - * CURLAUTH_ANY - All fine types set - * CURLAUTH_ANYSAFE - All fine types except Basic - */ - -#define CURLAUTH_NONE ((unsigned long)0) -#define CURLAUTH_BASIC (((unsigned long)1)<<0) -#define CURLAUTH_DIGEST (((unsigned long)1)<<1) -#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) -/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ -#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE -#define CURLAUTH_NTLM (((unsigned long)1)<<3) -#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) -#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) -#define CURLAUTH_ONLY (((unsigned long)1)<<31) -#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) -#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) - -#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ -#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ -#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ -#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ -#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ -#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ -#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ -#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY - -#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ -#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ -#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ - -#define CURL_ERROR_SIZE 256 - -enum curl_khtype { - CURLKHTYPE_UNKNOWN, - CURLKHTYPE_RSA1, - CURLKHTYPE_RSA, - CURLKHTYPE_DSS -}; - -struct curl_khkey { - const char *key; /* points to a zero-terminated string encoded with base64 - if len is zero, otherwise to the "raw" data */ - size_t len; - enum curl_khtype keytype; -}; - -/* this is the set of return values expected from the curl_sshkeycallback - callback */ -enum curl_khstat { - CURLKHSTAT_FINE_ADD_TO_FILE, - CURLKHSTAT_FINE, - CURLKHSTAT_REJECT, /* reject the connection, return an error */ - CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so - this causes a CURLE_DEFER error but otherwise the - connection will be left intact etc */ - CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ -}; - -/* this is the set of status codes pass in to the callback */ -enum curl_khmatch { - CURLKHMATCH_OK, /* match */ - CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ - CURLKHMATCH_MISSING, /* no matching host/key found */ - CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ -}; - -typedef int - (*curl_sshkeycallback) (CURL *easy, /* easy handle */ - const struct curl_khkey *knownkey, /* known */ - const struct curl_khkey *foundkey, /* found */ - enum curl_khmatch, /* libcurl's view on the keys */ - void *clientp); /* custom pointer passed from app */ - -/* parameter for the CURLOPT_USE_SSL option */ -typedef enum { - CURLUSESSL_NONE, /* do not attempt to use SSL */ - CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ - CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ - CURLUSESSL_ALL, /* SSL for all communication or fail */ - CURLUSESSL_LAST /* not an option, never use */ -} curl_usessl; - -/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ - -/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the - name of improving interoperability with older servers. Some SSL libraries - have introduced work-arounds for this flaw but those work-arounds sometimes - make the SSL communication fail. To regain functionality with those broken - servers, a user can this way allow the vulnerability back. */ -#define CURLSSLOPT_ALLOW_BEAST (1<<0) - -/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those - SSL backends where such behavior is present. */ -#define CURLSSLOPT_NO_REVOKE (1<<1) - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2009 */ - -#define CURLFTPSSL_NONE CURLUSESSL_NONE -#define CURLFTPSSL_TRY CURLUSESSL_TRY -#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL -#define CURLFTPSSL_ALL CURLUSESSL_ALL -#define CURLFTPSSL_LAST CURLUSESSL_LAST -#define curl_ftpssl curl_usessl -#endif /*!CURL_NO_OLDIES*/ - -/* parameter for the CURLOPT_FTP_SSL_CCC option */ -typedef enum { - CURLFTPSSL_CCC_NONE, /* do not send CCC */ - CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ - CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ - CURLFTPSSL_CCC_LAST /* not an option, never use */ -} curl_ftpccc; - -/* parameter for the CURLOPT_FTPSSLAUTH option */ -typedef enum { - CURLFTPAUTH_DEFAULT, /* let libcurl decide */ - CURLFTPAUTH_SSL, /* use "AUTH SSL" */ - CURLFTPAUTH_TLS, /* use "AUTH TLS" */ - CURLFTPAUTH_LAST /* not an option, never use */ -} curl_ftpauth; - -/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ -typedef enum { - CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ - CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD - again if MKD succeeded, for SFTP this does - similar magic */ - CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD - again even if MKD failed! */ - CURLFTP_CREATE_DIR_LAST /* not an option, never use */ -} curl_ftpcreatedir; - -/* parameter for the CURLOPT_FTP_FILEMETHOD option */ -typedef enum { - CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ - CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ - CURLFTPMETHOD_NOCWD, /* no CWD at all */ - CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ - CURLFTPMETHOD_LAST /* not an option, never use */ -} curl_ftpmethod; - -/* bitmask defines for CURLOPT_HEADEROPT */ -#define CURLHEADER_UNIFIED 0 -#define CURLHEADER_SEPARATE (1<<0) - -/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ -#define CURLPROTO_HTTP (1<<0) -#define CURLPROTO_HTTPS (1<<1) -#define CURLPROTO_FTP (1<<2) -#define CURLPROTO_FTPS (1<<3) -#define CURLPROTO_SCP (1<<4) -#define CURLPROTO_SFTP (1<<5) -#define CURLPROTO_TELNET (1<<6) -#define CURLPROTO_LDAP (1<<7) -#define CURLPROTO_LDAPS (1<<8) -#define CURLPROTO_DICT (1<<9) -#define CURLPROTO_FILE (1<<10) -#define CURLPROTO_TFTP (1<<11) -#define CURLPROTO_IMAP (1<<12) -#define CURLPROTO_IMAPS (1<<13) -#define CURLPROTO_POP3 (1<<14) -#define CURLPROTO_POP3S (1<<15) -#define CURLPROTO_SMTP (1<<16) -#define CURLPROTO_SMTPS (1<<17) -#define CURLPROTO_RTSP (1<<18) -#define CURLPROTO_RTMP (1<<19) -#define CURLPROTO_RTMPT (1<<20) -#define CURLPROTO_RTMPE (1<<21) -#define CURLPROTO_RTMPTE (1<<22) -#define CURLPROTO_RTMPS (1<<23) -#define CURLPROTO_RTMPTS (1<<24) -#define CURLPROTO_GOPHER (1<<25) -#define CURLPROTO_SMB (1<<26) -#define CURLPROTO_SMBS (1<<27) -#define CURLPROTO_ALL (~0) /* enable everything */ - -/* long may be 32 or 64 bits, but we should never depend on anything else - but 32 */ -#define CURLOPTTYPE_LONG 0 -#define CURLOPTTYPE_OBJECTPOINT 10000 -#define CURLOPTTYPE_STRINGPOINT 10000 -#define CURLOPTTYPE_FUNCTIONPOINT 20000 -#define CURLOPTTYPE_OFF_T 30000 - -/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the - string options from the header file */ - -/* name is uppercase CURLOPT_, - type is one of the defined CURLOPTTYPE_ - number is unique identifier */ -#ifdef CINIT -#undef CINIT -#endif - -#ifdef CURL_ISOCPP -#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define LONG CURLOPTTYPE_LONG -#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT -#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT -#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT -#define OFF_T CURLOPTTYPE_OFF_T -#define CINIT(name,type,number) CURLOPT_/**/name = type + number -#endif - -/* - * This macro-mania below setups the CURLOPT_[what] enum, to be used with - * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] - * word. - */ - -typedef enum { - /* This is the FILE * or void * the regular output should be written to. */ - CINIT(WRITEDATA, OBJECTPOINT, 1), - - /* The full URL to get/put */ - CINIT(URL, STRINGPOINT, 2), - - /* Port number to connect to, if other than default. */ - CINIT(PORT, LONG, 3), - - /* Name of proxy to use. */ - CINIT(PROXY, STRINGPOINT, 4), - - /* "user:password;options" to use when fetching. */ - CINIT(USERPWD, STRINGPOINT, 5), - - /* "user:password" to use with proxy. */ - CINIT(PROXYUSERPWD, STRINGPOINT, 6), - - /* Range to get, specified as an ASCII string. */ - CINIT(RANGE, STRINGPOINT, 7), - - /* not used */ - - /* Specified file stream to upload from (use as input): */ - CINIT(READDATA, OBJECTPOINT, 9), - - /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE - * bytes big. If this is not used, error messages go to stderr instead: */ - CINIT(ERRORBUFFER, OBJECTPOINT, 10), - - /* Function that will be called to store the output (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), - - /* Function that will be called to read the input (instead of fread). The - * parameters will use fread() syntax, make sure to follow them. */ - CINIT(READFUNCTION, FUNCTIONPOINT, 12), - - /* Time-out the read operation after this amount of seconds */ - CINIT(TIMEOUT, LONG, 13), - - /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about - * how large the file being sent really is. That allows better error - * checking and better verifies that the upload was successful. -1 means - * unknown size. - * - * For large file support, there is also a _LARGE version of the key - * which takes an off_t type, allowing platforms with larger off_t - * sizes to handle larger files. See below for INFILESIZE_LARGE. - */ - CINIT(INFILESIZE, LONG, 14), - - /* POST static input fields. */ - CINIT(POSTFIELDS, OBJECTPOINT, 15), - - /* Set the referrer page (needed by some CGIs) */ - CINIT(REFERER, STRINGPOINT, 16), - - /* Set the FTP PORT string (interface name, named or numerical IP address) - Use i.e '-' to use default address. */ - CINIT(FTPPORT, STRINGPOINT, 17), - - /* Set the User-Agent string (examined by some CGIs) */ - CINIT(USERAGENT, STRINGPOINT, 18), - - /* If the download receives less than "low speed limit" bytes/second - * during "low speed time" seconds, the operations is aborted. - * You could i.e if you have a pretty high speed connection, abort if - * it is less than 2000 bytes/sec during 20 seconds. - */ - - /* Set the "low speed limit" */ - CINIT(LOW_SPEED_LIMIT, LONG, 19), - - /* Set the "low speed time" */ - CINIT(LOW_SPEED_TIME, LONG, 20), - - /* Set the continuation offset. - * - * Note there is also a _LARGE version of this key which uses - * off_t types, allowing for large file offsets on platforms which - * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. - */ - CINIT(RESUME_FROM, LONG, 21), - - /* Set cookie in request: */ - CINIT(COOKIE, STRINGPOINT, 22), - - /* This points to a linked list of headers, struct curl_slist kind. This - list is also used for RTSP (in spite of its name) */ - CINIT(HTTPHEADER, OBJECTPOINT, 23), - - /* This points to a linked list of post entries, struct curl_httppost */ - CINIT(HTTPPOST, OBJECTPOINT, 24), - - /* name of the file keeping your private SSL-certificate */ - CINIT(SSLCERT, STRINGPOINT, 25), - - /* password for the SSL or SSH private key */ - CINIT(KEYPASSWD, STRINGPOINT, 26), - - /* send TYPE parameter? */ - CINIT(CRLF, LONG, 27), - - /* send linked-list of QUOTE commands */ - CINIT(QUOTE, OBJECTPOINT, 28), - - /* send FILE * or void * to store headers to, if you use a callback it - is simply passed to the callback unmodified */ - CINIT(HEADERDATA, OBJECTPOINT, 29), - - /* point to a file to read the initial cookies from, also enables - "cookie awareness" */ - CINIT(COOKIEFILE, STRINGPOINT, 31), - - /* What version to specifically try to use. - See CURL_SSLVERSION defines below. */ - CINIT(SSLVERSION, LONG, 32), - - /* What kind of HTTP time condition to use, see defines */ - CINIT(TIMECONDITION, LONG, 33), - - /* Time to use with the above condition. Specified in number of seconds - since 1 Jan 1970 */ - CINIT(TIMEVALUE, LONG, 34), - - /* 35 = OBSOLETE */ - - /* Custom request, for customizing the get command like - HTTP: DELETE, TRACE and others - FTP: to use a different list command - */ - CINIT(CUSTOMREQUEST, STRINGPOINT, 36), - - /* FILE handle to use instead of stderr */ - CINIT(STDERR, OBJECTPOINT, 37), - - /* 38 is not used */ - - /* send linked-list of post-transfer QUOTE commands */ - CINIT(POSTQUOTE, OBJECTPOINT, 39), - - CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */ - - CINIT(VERBOSE, LONG, 41), /* talk a lot */ - CINIT(HEADER, LONG, 42), /* throw the header out too */ - CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ - CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ - CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */ - CINIT(UPLOAD, LONG, 46), /* this is an upload */ - CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ - - CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ - - /* Specify whether to read the user+password from the .netrc or the URL. - * This must be one of the CURL_NETRC_* enums below. */ - CINIT(NETRC, LONG, 51), - - CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ - - CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ - CINIT(PUT, LONG, 54), /* HTTP PUT */ - - /* 55 = OBSOLETE */ - - /* DEPRECATED - * Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_progress_callback - * prototype defines. */ - CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), - - /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION - callbacks */ - CINIT(PROGRESSDATA, OBJECTPOINT, 57), -#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA - - /* We want the referrer field set automatically when following locations */ - CINIT(AUTOREFERER, LONG, 58), - - /* Port of the proxy, can be set in the proxy string as well with: - "[host]:[port]" */ - CINIT(PROXYPORT, LONG, 59), - - /* size of the POST input data, if strlen() is not good to use */ - CINIT(POSTFIELDSIZE, LONG, 60), - - /* tunnel non-http operations through a HTTP proxy */ - CINIT(HTTPPROXYTUNNEL, LONG, 61), - - /* Set the interface string to use as outgoing network interface */ - CINIT(INTERFACE, STRINGPOINT, 62), - - /* Set the krb4/5 security level, this also enables krb4/5 awareness. This - * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string - * is set but doesn't match one of these, 'private' will be used. */ - CINIT(KRBLEVEL, STRINGPOINT, 63), - - /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ - CINIT(SSL_VERIFYPEER, LONG, 64), - - /* The CApath or CAfile used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAINFO, STRINGPOINT, 65), - - /* 66 = OBSOLETE */ - /* 67 = OBSOLETE */ - - /* Maximum number of http redirects to follow */ - CINIT(MAXREDIRS, LONG, 68), - - /* Pass a long set to 1 to get the date of the requested document (if - possible)! Pass a zero to shut it off. */ - CINIT(FILETIME, LONG, 69), - - /* This points to a linked list of telnet options */ - CINIT(TELNETOPTIONS, OBJECTPOINT, 70), - - /* Max amount of cached alive connections */ - CINIT(MAXCONNECTS, LONG, 71), - - CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */ - - /* 73 = OBSOLETE */ - - /* Set to explicitly use a new connection for the upcoming transfer. - Do not use this unless you're absolutely sure of this, as it makes the - operation slower and is less friendly for the network. */ - CINIT(FRESH_CONNECT, LONG, 74), - - /* Set to explicitly forbid the upcoming transfer's connection to be re-used - when done. Do not use this unless you're absolutely sure of this, as it - makes the operation slower and is less friendly for the network. */ - CINIT(FORBID_REUSE, LONG, 75), - - /* Set to a file name that contains random data for libcurl to use to - seed the random engine when doing SSL connects. */ - CINIT(RANDOM_FILE, STRINGPOINT, 76), - - /* Set to the Entropy Gathering Daemon socket pathname */ - CINIT(EGDSOCKET, STRINGPOINT, 77), - - /* Time-out connect operations after this amount of seconds, if connects are - OK within this time, then fine... This only aborts the connect phase. */ - CINIT(CONNECTTIMEOUT, LONG, 78), - - /* Function that will be called to store headers (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), - - /* Set this to force the HTTP request to get back to GET. Only really usable - if POST, PUT or a custom request have been used first. - */ - CINIT(HTTPGET, LONG, 80), - - /* Set if we should verify the Common name from the peer certificate in ssl - * handshake, set 1 to check existence, 2 to ensure that it matches the - * provided hostname. */ - CINIT(SSL_VERIFYHOST, LONG, 81), - - /* Specify which file name to write all known cookies in after completed - operation. Set file name to "-" (dash) to make it go to stdout. */ - CINIT(COOKIEJAR, STRINGPOINT, 82), - - /* Specify which SSL ciphers to use */ - CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83), - - /* Specify which HTTP version to use! This must be set to one of the - CURL_HTTP_VERSION* enums set below. */ - CINIT(HTTP_VERSION, LONG, 84), - - /* Specifically switch on or off the FTP engine's use of the EPSV command. By - default, that one will always be attempted before the more traditional - PASV command. */ - CINIT(FTP_USE_EPSV, LONG, 85), - - /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ - CINIT(SSLCERTTYPE, STRINGPOINT, 86), - - /* name of the file keeping your private SSL-key */ - CINIT(SSLKEY, STRINGPOINT, 87), - - /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ - CINIT(SSLKEYTYPE, STRINGPOINT, 88), - - /* crypto engine for the SSL-sub system */ - CINIT(SSLENGINE, STRINGPOINT, 89), - - /* set the crypto engine for the SSL-sub system as default - the param has no meaning... - */ - CINIT(SSLENGINE_DEFAULT, LONG, 90), - - /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ - - /* DNS cache timeout */ - CINIT(DNS_CACHE_TIMEOUT, LONG, 92), - - /* send linked-list of pre-transfer QUOTE commands */ - CINIT(PREQUOTE, OBJECTPOINT, 93), - - /* set the debug function */ - CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), - - /* set the data for the debug function */ - CINIT(DEBUGDATA, OBJECTPOINT, 95), - - /* mark this as start of a cookie session */ - CINIT(COOKIESESSION, LONG, 96), - - /* The CApath directory used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAPATH, STRINGPOINT, 97), - - /* Instruct libcurl to use a smaller receive buffer */ - CINIT(BUFFERSIZE, LONG, 98), - - /* Instruct libcurl to not use any signal/alarm handlers, even when using - timeouts. This option is useful for multi-threaded applications. - See libcurl-the-guide for more background information. */ - CINIT(NOSIGNAL, LONG, 99), - - /* Provide a CURLShare for mutexing non-ts data */ - CINIT(SHARE, OBJECTPOINT, 100), - - /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and - CURLPROXY_SOCKS5. */ - CINIT(PROXYTYPE, LONG, 101), - - /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. Before 7.21.6, this was known as - CURLOPT_ENCODING */ - CINIT(ACCEPT_ENCODING, STRINGPOINT, 102), - - /* Set pointer to private data */ - CINIT(PRIVATE, OBJECTPOINT, 103), - - /* Set aliases for HTTP 200 in the HTTP Response header */ - CINIT(HTTP200ALIASES, OBJECTPOINT, 104), - - /* Continue to send authentication (user+password) when following locations, - even when hostname changed. This can potentially send off the name - and password to whatever host the server decides. */ - CINIT(UNRESTRICTED_AUTH, LONG, 105), - - /* Specifically switch on or off the FTP engine's use of the EPRT command ( - it also disables the LPRT attempt). By default, those ones will always be - attempted before the good old traditional PORT command. */ - CINIT(FTP_USE_EPRT, LONG, 106), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_USERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CINIT(HTTPAUTH, LONG, 107), - - /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx - in second argument. The function must be matching the - curl_ssl_ctx_callback proto. */ - CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), - - /* Set the userdata for the ssl context callback function's third - argument */ - CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), - - /* FTP Option that causes missing dirs to be created on the remote server. - In 7.19.4 we introduced the convenience enums for this option using the - CURLFTP_CREATE_DIR prefix. - */ - CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CINIT(PROXYAUTH, LONG, 111), - - /* FTP option that changes the timeout, in seconds, associated with - getting a response. This is different from transfer timeout time and - essentially places a demand on the FTP server to acknowledge commands - in a timely manner. */ - CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), -#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT - - /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to - tell libcurl to resolve names to those IP versions only. This only has - affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ - CINIT(IPRESOLVE, LONG, 113), - - /* Set this option to limit the size of a file that will be downloaded from - an HTTP or FTP server. - - Note there is also _LARGE version which adds large file support for - platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ - CINIT(MAXFILESIZE, LONG, 114), - - /* See the comment for INFILESIZE above, but in short, specifies - * the size of the file being uploaded. -1 means unknown. - */ - CINIT(INFILESIZE_LARGE, OFF_T, 115), - - /* Sets the continuation offset. There is also a LONG version of this; - * look above for RESUME_FROM. - */ - CINIT(RESUME_FROM_LARGE, OFF_T, 116), - - /* Sets the maximum size of data that will be downloaded from - * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. - */ - CINIT(MAXFILESIZE_LARGE, OFF_T, 117), - - /* Set this option to the file name of your .netrc file you want libcurl - to parse (using the CURLOPT_NETRC option). If not set, libcurl will do - a poor attempt to find the user's home directory and check for a .netrc - file in there. */ - CINIT(NETRC_FILE, STRINGPOINT, 118), - - /* Enable SSL/TLS for FTP, pick one of: - CURLUSESSL_TRY - try using SSL, proceed anyway otherwise - CURLUSESSL_CONTROL - SSL for the control connection or fail - CURLUSESSL_ALL - SSL for all communication or fail - */ - CINIT(USE_SSL, LONG, 119), - - /* The _LARGE version of the standard POSTFIELDSIZE option */ - CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), - - /* Enable/disable the TCP Nagle algorithm */ - CINIT(TCP_NODELAY, LONG, 121), - - /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 123 OBSOLETE. Gone in 7.16.0 */ - /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 127 OBSOLETE. Gone in 7.16.0 */ - /* 128 OBSOLETE. Gone in 7.16.0 */ - - /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option - can be used to change libcurl's default action which is to first try - "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK - response has been received. - - Available parameters are: - CURLFTPAUTH_DEFAULT - let libcurl decide - CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS - CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL - */ - CINIT(FTPSSLAUTH, LONG, 129), - - CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), - CINIT(IOCTLDATA, OBJECTPOINT, 131), - - /* 132 OBSOLETE. Gone in 7.16.0 */ - /* 133 OBSOLETE. Gone in 7.16.0 */ - - /* zero terminated string for pass on to the FTP server when asked for - "account" info */ - CINIT(FTP_ACCOUNT, STRINGPOINT, 134), - - /* feed cookie into cookie engine */ - CINIT(COOKIELIST, STRINGPOINT, 135), - - /* ignore Content-Length */ - CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), - - /* Set to non-zero to skip the IP address received in a 227 PASV FTP server - response. Typically used for FTP-SSL purposes but is not restricted to - that. libcurl will then instead use the same IP address it used for the - control connection. */ - CINIT(FTP_SKIP_PASV_IP, LONG, 137), - - /* Select "file method" to use when doing FTP, see the curl_ftpmethod - above. */ - CINIT(FTP_FILEMETHOD, LONG, 138), - - /* Local port number to bind the socket to */ - CINIT(LOCALPORT, LONG, 139), - - /* Number of ports to try, including the first one set with LOCALPORT. - Thus, setting it to 1 will make no additional attempts but the first. - */ - CINIT(LOCALPORTRANGE, LONG, 140), - - /* no transfer, set up connection and let application use the socket by - extracting it with CURLINFO_LASTSOCKET */ - CINIT(CONNECT_ONLY, LONG, 141), - - /* Function that will be called to convert from the - network encoding (instead of using the iconv calls in libcurl) */ - CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), - - /* Function that will be called to convert to the - network encoding (instead of using the iconv calls in libcurl) */ - CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), - - /* Function that will be called to convert from UTF8 - (instead of using the iconv calls in libcurl) - Note that this is used only for SSL certificate processing */ - CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), - - /* if the connection proceeds too quickly then need to slow it down */ - /* limit-rate: maximum number of bytes per second to send or receive */ - CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), - CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), - - /* Pointer to command string to send if USER/PASS fails. */ - CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147), - - /* callback function for setting socket options */ - CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), - CINIT(SOCKOPTDATA, OBJECTPOINT, 149), - - /* set to 0 to disable session ID re-use for this transfer, default is - enabled (== 1) */ - CINIT(SSL_SESSIONID_CACHE, LONG, 150), - - /* allowed SSH authentication methods */ - CINIT(SSH_AUTH_TYPES, LONG, 151), - - /* Used by scp/sftp to do public/private key authentication */ - CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152), - CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153), - - /* Send CCC (Clear Command Channel) after authentication */ - CINIT(FTP_SSL_CCC, LONG, 154), - - /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ - CINIT(TIMEOUT_MS, LONG, 155), - CINIT(CONNECTTIMEOUT_MS, LONG, 156), - - /* set to zero to disable the libcurl's decoding and thus pass the raw body - data to the application even when it is encoded/compressed */ - CINIT(HTTP_TRANSFER_DECODING, LONG, 157), - CINIT(HTTP_CONTENT_DECODING, LONG, 158), - - /* Permission used when creating new files and directories on the remote - server for protocols that support it, SFTP/SCP/FILE */ - CINIT(NEW_FILE_PERMS, LONG, 159), - CINIT(NEW_DIRECTORY_PERMS, LONG, 160), - - /* Set the behaviour of POST when redirecting. Values must be set to one - of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ - CINIT(POSTREDIR, LONG, 161), - - /* used by scp/sftp to verify the host's public key */ - CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162), - - /* Callback function for opening socket (instead of socket(2)). Optionally, - callback is able change the address or refuse to connect returning - CURL_SOCKET_BAD. The callback should have type - curl_opensocket_callback */ - CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), - CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), - - /* POST volatile input fields. */ - CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), - - /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ - CINIT(PROXY_TRANSFER_MODE, LONG, 166), - - /* Callback function for seeking in the input stream */ - CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), - CINIT(SEEKDATA, OBJECTPOINT, 168), - - /* CRL file */ - CINIT(CRLFILE, STRINGPOINT, 169), - - /* Issuer certificate */ - CINIT(ISSUERCERT, STRINGPOINT, 170), - - /* (IPv6) Address scope */ - CINIT(ADDRESS_SCOPE, LONG, 171), - - /* Collect certificate chain info and allow it to get retrievable with - CURLINFO_CERTINFO after the transfer is complete. */ - CINIT(CERTINFO, LONG, 172), - - /* "name" and "pwd" to use when fetching. */ - CINIT(USERNAME, STRINGPOINT, 173), - CINIT(PASSWORD, STRINGPOINT, 174), - - /* "name" and "pwd" to use with Proxy when fetching. */ - CINIT(PROXYUSERNAME, STRINGPOINT, 175), - CINIT(PROXYPASSWORD, STRINGPOINT, 176), - - /* Comma separated list of hostnames defining no-proxy zones. These should - match both hostnames directly, and hostnames within a domain. For - example, local.com will match local.com and www.local.com, but NOT - notlocal.com or www.notlocal.com. For compatibility with other - implementations of this, .local.com will be considered to be the same as - local.com. A single * is the only valid wildcard, and effectively - disables the use of proxy. */ - CINIT(NOPROXY, STRINGPOINT, 177), - - /* block size for TFTP transfers */ - CINIT(TFTP_BLKSIZE, LONG, 178), - - /* Socks Service */ - CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */ - - /* Socks Service */ - CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), - - /* set the bitmask for the protocols that are allowed to be used for the - transfer, which thus helps the app which takes URLs from users or other - external inputs and want to restrict what protocol(s) to deal - with. Defaults to CURLPROTO_ALL. */ - CINIT(PROTOCOLS, LONG, 181), - - /* set the bitmask for the protocols that libcurl is allowed to follow to, - as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs - to be set in both bitmasks to be allowed to get redirected to. Defaults - to all protocols except FILE and SCP. */ - CINIT(REDIR_PROTOCOLS, LONG, 182), - - /* set the SSH knownhost file name to use */ - CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183), - - /* set the SSH host key callback, must point to a curl_sshkeycallback - function */ - CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), - - /* set the SSH host key callback custom pointer */ - CINIT(SSH_KEYDATA, OBJECTPOINT, 185), - - /* set the SMTP mail originator */ - CINIT(MAIL_FROM, STRINGPOINT, 186), - - /* set the list of SMTP mail receiver(s) */ - CINIT(MAIL_RCPT, OBJECTPOINT, 187), - - /* FTP: send PRET before PASV */ - CINIT(FTP_USE_PRET, LONG, 188), - - /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ - CINIT(RTSP_REQUEST, LONG, 189), - - /* The RTSP session identifier */ - CINIT(RTSP_SESSION_ID, STRINGPOINT, 190), - - /* The RTSP stream URI */ - CINIT(RTSP_STREAM_URI, STRINGPOINT, 191), - - /* The Transport: header to use in RTSP requests */ - CINIT(RTSP_TRANSPORT, STRINGPOINT, 192), - - /* Manually initialize the client RTSP CSeq for this handle */ - CINIT(RTSP_CLIENT_CSEQ, LONG, 193), - - /* Manually initialize the server RTSP CSeq for this handle */ - CINIT(RTSP_SERVER_CSEQ, LONG, 194), - - /* The stream to pass to INTERLEAVEFUNCTION. */ - CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), - - /* Let the application define a custom write method for RTP data */ - CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), - - /* Turn on wildcard matching */ - CINIT(WILDCARDMATCH, LONG, 197), - - /* Directory matching callback called before downloading of an - individual file (chunk) started */ - CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), - - /* Directory matching callback called after the file (chunk) - was downloaded, or skipped */ - CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), - - /* Change match (fnmatch-like) callback for wildcard matching */ - CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), - - /* Let the application define custom chunk data pointer */ - CINIT(CHUNK_DATA, OBJECTPOINT, 201), - - /* FNMATCH_FUNCTION user pointer */ - CINIT(FNMATCH_DATA, OBJECTPOINT, 202), - - /* send linked-list of name:port:address sets */ - CINIT(RESOLVE, OBJECTPOINT, 203), - - /* Set a username for authenticated TLS */ - CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204), - - /* Set a password for authenticated TLS */ - CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205), - - /* Set authentication type for authenticated TLS */ - CINIT(TLSAUTH_TYPE, STRINGPOINT, 206), - - /* Set to 1 to enable the "TE:" header in HTTP requests to ask for - compressed transfer-encoded responses. Set to 0 to disable the use of TE: - in outgoing requests. The current default is 0, but it might change in a - future libcurl release. - - libcurl will ask for the compressed methods it knows of, and if that - isn't any, it will not ask for transfer-encoding at all even if this - option is set to 1. - - */ - CINIT(TRANSFER_ENCODING, LONG, 207), - - /* Callback function for closing socket (instead of close(2)). The callback - should have type curl_closesocket_callback */ - CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), - CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), - - /* allow GSSAPI credential delegation */ - CINIT(GSSAPI_DELEGATION, LONG, 210), - - /* Set the name servers to use for DNS resolution */ - CINIT(DNS_SERVERS, STRINGPOINT, 211), - - /* Time-out accept operations (currently for FTP only) after this amount - of miliseconds. */ - CINIT(ACCEPTTIMEOUT_MS, LONG, 212), - - /* Set TCP keepalive */ - CINIT(TCP_KEEPALIVE, LONG, 213), - - /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ - CINIT(TCP_KEEPIDLE, LONG, 214), - CINIT(TCP_KEEPINTVL, LONG, 215), - - /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ - CINIT(SSL_OPTIONS, LONG, 216), - - /* Set the SMTP auth originator */ - CINIT(MAIL_AUTH, STRINGPOINT, 217), - - /* Enable/disable SASL initial response */ - CINIT(SASL_IR, LONG, 218), - - /* Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_xferinfo_callback - * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ - CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), - - /* The XOAUTH2 bearer token */ - CINIT(XOAUTH2_BEARER, STRINGPOINT, 220), - - /* Set the interface string to use as outgoing network - * interface for DNS requests. - * Only supported by the c-ares DNS backend */ - CINIT(DNS_INTERFACE, STRINGPOINT, 221), - - /* Set the local IPv4 address to use for outgoing DNS requests. - * Only supported by the c-ares DNS backend */ - CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222), - - /* Set the local IPv4 address to use for outgoing DNS requests. - * Only supported by the c-ares DNS backend */ - CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223), - - /* Set authentication options directly */ - CINIT(LOGIN_OPTIONS, STRINGPOINT, 224), - - /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ - CINIT(SSL_ENABLE_NPN, LONG, 225), - - /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ - CINIT(SSL_ENABLE_ALPN, LONG, 226), - - /* Time to wait for a response to a HTTP request containing an - * Expect: 100-continue header before sending the data anyway. */ - CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227), - - /* This points to a linked list of headers used for proxy requests only, - struct curl_slist kind */ - CINIT(PROXYHEADER, OBJECTPOINT, 228), - - /* Pass in a bitmask of "header options" */ - CINIT(HEADEROPT, LONG, 229), - - /* The public key in DER form used to validate the peer public key - this option is used only if SSL_VERIFYPEER is true */ - CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230), - - /* Path to Unix domain socket */ - CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231), - - /* Set if we should verify the certificate status. */ - CINIT(SSL_VERIFYSTATUS, LONG, 232), - - /* Set if we should enable TLS false start. */ - CINIT(SSL_FALSESTART, LONG, 233), - - /* Do not squash dot-dot sequences */ - CINIT(PATH_AS_IS, LONG, 234), - - /* Proxy Service Name */ - CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235), - - /* Service Name */ - CINIT(SERVICE_NAME, STRINGPOINT, 236), - - /* Wait/don't wait for pipe/mutex to clarify */ - CINIT(PIPEWAIT, LONG, 237), - - /* Set the protocol used when curl is given a URL without a protocol */ - CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238), - - /* Set stream weight, 1 - 256 (default is 16) */ - CINIT(STREAM_WEIGHT, LONG, 239), - - /* Set stream dependency on another CURL handle */ - CINIT(STREAM_DEPENDS, OBJECTPOINT, 240), - - /* Set E-xclusive stream dependency on another CURL handle */ - CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241), - - /* Do not send any tftp option requests to the server */ - CINIT(TFTP_NO_OPTIONS, LONG, 242), - - /* Linked-list of host:port:connect-to-host:connect-to-port, - overrides the URL's host:port (only for the network layer) */ - CINIT(CONNECT_TO, OBJECTPOINT, 243), - - /* Set TCP Fast Open */ - CINIT(TCP_FASTOPEN, LONG, 244), - - /* Continue to send data if the server responds early with an - * HTTP status code >= 300 */ - CINIT(KEEP_SENDING_ON_ERROR, LONG, 245), - - /* The CApath or CAfile used to validate the proxy certificate - this option is used only if PROXY_SSL_VERIFYPEER is true */ - CINIT(PROXY_CAINFO, STRINGPOINT, 246), - - /* The CApath directory used to validate the proxy certificate - this option is used only if PROXY_SSL_VERIFYPEER is true */ - CINIT(PROXY_CAPATH, STRINGPOINT, 247), - - /* Set if we should verify the proxy in ssl handshake, - set 1 to verify. */ - CINIT(PROXY_SSL_VERIFYPEER, LONG, 248), - - /* Set if we should verify the Common name from the proxy certificate in ssl - * handshake, set 1 to check existence, 2 to ensure that it matches - * the provided hostname. */ - CINIT(PROXY_SSL_VERIFYHOST, LONG, 249), - - /* What version to specifically try to use for proxy. - See CURL_SSLVERSION defines below. */ - CINIT(PROXY_SSLVERSION, LONG, 250), - - /* Set a username for authenticated TLS for proxy */ - CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251), - - /* Set a password for authenticated TLS for proxy */ - CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252), - - /* Set authentication type for authenticated TLS for proxy */ - CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253), - - /* name of the file keeping your private SSL-certificate for proxy */ - CINIT(PROXY_SSLCERT, STRINGPOINT, 254), - - /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for - proxy */ - CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255), - - /* name of the file keeping your private SSL-key for proxy */ - CINIT(PROXY_SSLKEY, STRINGPOINT, 256), - - /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for - proxy */ - CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257), - - /* password for the SSL private key for proxy */ - CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258), - - /* Specify which SSL ciphers to use for proxy */ - CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259), - - /* CRL file for proxy */ - CINIT(PROXY_CRLFILE, STRINGPOINT, 260), - - /* Enable/disable specific SSL features with a bitmask for proxy, see - CURLSSLOPT_* */ - CINIT(PROXY_SSL_OPTIONS, LONG, 261), - - /* Name of pre proxy to use. */ - CINIT(PRE_PROXY, STRINGPOINT, 262), - - /* The public key in DER form used to validate the proxy public key - this option is used only if PROXY_SSL_VERIFYPEER is true */ - CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263), - - /* Path to an abstract Unix domain socket */ - CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264), - - CURLOPT_LASTENTRY /* the last unused */ -} CURLoption; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2011 */ - -/* This was added in version 7.19.1 */ -#define CURLOPT_POST301 CURLOPT_POSTREDIR - -/* These are scheduled to disappear by 2009 */ - -/* The following were added in 7.17.0 */ -#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_FTPAPPEND CURLOPT_APPEND -#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY -#define CURLOPT_FTP_SSL CURLOPT_USE_SSL - -/* The following were added earlier */ - -#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL - -#else -/* This is set if CURL_NO_OLDIES is defined at compile-time */ -#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -#endif - - - /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host - name resolves addresses using more than one IP protocol version, this - option might be handy to force libcurl to use a specific IP version. */ -#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP - versions that your system allows */ -#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ -#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ - - /* three convenient "aliases" that follow the name scheme better */ -#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER - - /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ -enum { - CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd - like the library to choose the best possible - for us! */ - CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ - CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ - CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */ - CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ - CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 - Upgrade */ - - CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ -}; - -/* Convenience definition simple because the name of the version is HTTP/2 and - not 2.0. The 2_0 version of the enum name was set while the version was - still planned to be 2.0 and we stick to it for compatibility. */ -#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0 - -/* - * Public API enums for RTSP requests - */ -enum { - CURL_RTSPREQ_NONE, /* first in list */ - CURL_RTSPREQ_OPTIONS, - CURL_RTSPREQ_DESCRIBE, - CURL_RTSPREQ_ANNOUNCE, - CURL_RTSPREQ_SETUP, - CURL_RTSPREQ_PLAY, - CURL_RTSPREQ_PAUSE, - CURL_RTSPREQ_TEARDOWN, - CURL_RTSPREQ_GET_PARAMETER, - CURL_RTSPREQ_SET_PARAMETER, - CURL_RTSPREQ_RECORD, - CURL_RTSPREQ_RECEIVE, - CURL_RTSPREQ_LAST /* last in list */ -}; - - /* These enums are for use with the CURLOPT_NETRC option. */ -enum CURL_NETRC_OPTION { - CURL_NETRC_IGNORED, /* The .netrc will never be read. - * This is the default. */ - CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred - * to one in the .netrc. */ - CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. - * Unless one is set programmatically, the .netrc - * will be queried. */ - CURL_NETRC_LAST -}; - -enum { - CURL_SSLVERSION_DEFAULT, - CURL_SSLVERSION_TLSv1, /* TLS 1.x */ - CURL_SSLVERSION_SSLv2, - CURL_SSLVERSION_SSLv3, - CURL_SSLVERSION_TLSv1_0, - CURL_SSLVERSION_TLSv1_1, - CURL_SSLVERSION_TLSv1_2, - CURL_SSLVERSION_TLSv1_3, - - CURL_SSLVERSION_LAST /* never use, keep last */ -}; - -enum CURL_TLSAUTH { - CURL_TLSAUTH_NONE, - CURL_TLSAUTH_SRP, - CURL_TLSAUTH_LAST /* never use, keep last */ -}; - -/* symbols to use with CURLOPT_POSTREDIR. - CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 - can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 - | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ - -#define CURL_REDIR_GET_ALL 0 -#define CURL_REDIR_POST_301 1 -#define CURL_REDIR_POST_302 2 -#define CURL_REDIR_POST_303 4 -#define CURL_REDIR_POST_ALL \ - (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) - -typedef enum { - CURL_TIMECOND_NONE, - - CURL_TIMECOND_IFMODSINCE, - CURL_TIMECOND_IFUNMODSINCE, - CURL_TIMECOND_LASTMOD, - - CURL_TIMECOND_LAST -} curl_TimeCond; - - -/* curl_strequal() and curl_strnequal() are subject for removal in a future - libcurl, see lib/README.curlx for details - - !checksrc! disable SPACEBEFOREPAREN 2 -*/ -CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); -CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); - -/* name is uppercase CURLFORM_ */ -#ifdef CFINIT -#undef CFINIT -#endif - -#ifdef CURL_ISOCPP -#define CFINIT(name) CURLFORM_ ## name -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define CFINIT(name) CURLFORM_/**/name -#endif - -typedef enum { - CFINIT(NOTHING), /********* the first one is unused ************/ - - /* */ - CFINIT(COPYNAME), - CFINIT(PTRNAME), - CFINIT(NAMELENGTH), - CFINIT(COPYCONTENTS), - CFINIT(PTRCONTENTS), - CFINIT(CONTENTSLENGTH), - CFINIT(FILECONTENT), - CFINIT(ARRAY), - CFINIT(OBSOLETE), - CFINIT(FILE), - - CFINIT(BUFFER), - CFINIT(BUFFERPTR), - CFINIT(BUFFERLENGTH), - - CFINIT(CONTENTTYPE), - CFINIT(CONTENTHEADER), - CFINIT(FILENAME), - CFINIT(END), - CFINIT(OBSOLETE2), - - CFINIT(STREAM), - CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */ - - CURLFORM_LASTENTRY /* the last unused */ -} CURLformoption; - -#undef CFINIT /* done */ - -/* structure to be used as parameter for CURLFORM_ARRAY */ -struct curl_forms { - CURLformoption option; - const char *value; -}; - -/* use this for multipart formpost building */ -/* Returns code for curl_formadd() - * - * Returns: - * CURL_FORMADD_OK on success - * CURL_FORMADD_MEMORY if the FormInfo allocation fails - * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form - * CURL_FORMADD_NULL if a null pointer was given for a char - * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed - * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used - * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated - * CURL_FORMADD_MEMORY if some allocation for string copying failed. - * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array - * - ***************************************************************************/ -typedef enum { - CURL_FORMADD_OK, /* first, no error */ - - CURL_FORMADD_MEMORY, - CURL_FORMADD_OPTION_TWICE, - CURL_FORMADD_NULL, - CURL_FORMADD_UNKNOWN_OPTION, - CURL_FORMADD_INCOMPLETE, - CURL_FORMADD_ILLEGAL_ARRAY, - CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ - - CURL_FORMADD_LAST /* last */ -} CURLFORMcode; - -/* - * NAME curl_formadd() - * - * DESCRIPTION - * - * Pretty advanced function for building multi-part formposts. Each invoke - * adds one part that together construct a full post. Then use - * CURLOPT_HTTPPOST to send it off to libcurl. - */ -CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...); - -/* - * callback function for curl_formget() - * The void *arg pointer will be the one passed as second argument to - * curl_formget(). - * The character buffer passed to it must not be freed. - * Should return the buffer length passed to it as the argument "len" on - * success. - */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, - size_t len); - -/* - * NAME curl_formget() - * - * DESCRIPTION - * - * Serialize a curl_httppost struct built with curl_formadd(). - * Accepts a void pointer as second argument which will be passed to - * the curl_formget_callback function. - * Returns 0 on success. - */ -CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, - curl_formget_callback append); -/* - * NAME curl_formfree() - * - * DESCRIPTION - * - * Free a multipart formpost previously built with curl_formadd(). - */ -CURL_EXTERN void curl_formfree(struct curl_httppost *form); - -/* - * NAME curl_getenv() - * - * DESCRIPTION - * - * Returns a malloc()'ed string that MUST be curl_free()ed after usage is - * complete. DEPRECATED - see lib/README.curlx - */ -CURL_EXTERN char *curl_getenv(const char *variable); - -/* - * NAME curl_version() - * - * DESCRIPTION - * - * Returns a static ascii string of the libcurl version. - */ -CURL_EXTERN char *curl_version(void); - -/* - * NAME curl_easy_escape() - * - * DESCRIPTION - * - * Escapes URL strings (converts all letters consider illegal in URLs to their - * %XX versions). This function returns a new allocated string or NULL if an - * error occurred. - */ -CURL_EXTERN char *curl_easy_escape(CURL *handle, - const char *string, - int length); - -/* the previous version: */ -CURL_EXTERN char *curl_escape(const char *string, - int length); - - -/* - * NAME curl_easy_unescape() - * - * DESCRIPTION - * - * Unescapes URL encoding in strings (converts all %XX codes to their 8bit - * versions). This function returns a new allocated string or NULL if an error - * occurred. - * Conversion Note: On non-ASCII platforms the ASCII %XX codes are - * converted into the host encoding. - */ -CURL_EXTERN char *curl_easy_unescape(CURL *handle, - const char *string, - int length, - int *outlength); - -/* the previous version */ -CURL_EXTERN char *curl_unescape(const char *string, - int length); - -/* - * NAME curl_free() - * - * DESCRIPTION - * - * Provided for de-allocation in the same translation unit that did the - * allocation. Added in libcurl 7.10 - */ -CURL_EXTERN void curl_free(void *p); - -/* - * NAME curl_global_init() - * - * DESCRIPTION - * - * curl_global_init() should be invoked exactly once for each application that - * uses libcurl and before any call of other libcurl functions. - * - * This function is not thread-safe! - */ -CURL_EXTERN CURLcode curl_global_init(long flags); - -/* - * NAME curl_global_init_mem() - * - * DESCRIPTION - * - * curl_global_init() or curl_global_init_mem() should be invoked exactly once - * for each application that uses libcurl. This function can be used to - * initialize libcurl and set user defined memory management callback - * functions. Users can implement memory management routines to check for - * memory leaks, check for mis-use of the curl library etc. User registered - * callback routines with be invoked by this library instead of the system - * memory management routines like malloc, free etc. - */ -CURL_EXTERN CURLcode curl_global_init_mem(long flags, - curl_malloc_callback m, - curl_free_callback f, - curl_realloc_callback r, - curl_strdup_callback s, - curl_calloc_callback c); - -/* - * NAME curl_global_cleanup() - * - * DESCRIPTION - * - * curl_global_cleanup() should be invoked exactly once for each application - * that uses libcurl - */ -CURL_EXTERN void curl_global_cleanup(void); - -/* linked-list structure for the CURLOPT_QUOTE option (and other) */ -struct curl_slist { - char *data; - struct curl_slist *next; -}; - -/* - * NAME curl_slist_append() - * - * DESCRIPTION - * - * Appends a string to a linked list. If no list exists, it will be created - * first. Returns the new list, after appending. - */ -CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, - const char *); - -/* - * NAME curl_slist_free_all() - * - * DESCRIPTION - * - * free a previously built curl_slist. - */ -CURL_EXTERN void curl_slist_free_all(struct curl_slist *); - -/* - * NAME curl_getdate() - * - * DESCRIPTION - * - * Returns the time, in seconds since 1 Jan 1970 of the time string given in - * the first argument. The time argument in the second parameter is unused - * and should be set to NULL. - */ -CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); - -/* info about the certificate chain, only for OpenSSL builds. Asked - for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ -struct curl_certinfo { - int num_of_certs; /* number of certificates with information */ - struct curl_slist **certinfo; /* for each index in this array, there's a - linked list with textual information in the - format "name: value" */ -}; - -/* enum for the different supported SSL backends */ -typedef enum { - CURLSSLBACKEND_NONE = 0, - CURLSSLBACKEND_OPENSSL = 1, - CURLSSLBACKEND_GNUTLS = 2, - CURLSSLBACKEND_NSS = 3, - CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ - CURLSSLBACKEND_GSKIT = 5, - CURLSSLBACKEND_POLARSSL = 6, - CURLSSLBACKEND_CYASSL = 7, - CURLSSLBACKEND_SCHANNEL = 8, - CURLSSLBACKEND_DARWINSSL = 9, - CURLSSLBACKEND_AXTLS = 10, - CURLSSLBACKEND_MBEDTLS = 11 -} curl_sslbackend; - -/* aliases for library clones and renames */ -#define CURLSSLBACKEND_LIBRESSL 1 -#define CURLSSLBACKEND_BORINGSSL 1 -#define CURLSSLBACKEND_WOLFSSL 6 - -/* Information about the SSL library used and the respective internal SSL - handle, which can be used to obtain further information regarding the - connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ -struct curl_tlssessioninfo { - curl_sslbackend backend; - void *internals; -}; - -#define CURLINFO_STRING 0x100000 -#define CURLINFO_LONG 0x200000 -#define CURLINFO_DOUBLE 0x300000 -#define CURLINFO_SLIST 0x400000 -#define CURLINFO_SOCKET 0x500000 -#define CURLINFO_MASK 0x0fffff -#define CURLINFO_TYPEMASK 0xf00000 - -typedef enum { - CURLINFO_NONE, /* first, never use this */ - CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, - CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, - CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, - CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, - CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, - CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, - CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, - CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, - CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, - CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, - CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, - CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, - CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, - CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, - CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, - CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, - CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, - CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, - CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, - CURLINFO_PRIVATE = CURLINFO_STRING + 21, - CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, - CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, - CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, - CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, - CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, - CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, - CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, - CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, - CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, - CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, - CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, - CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_SLIST + 34, - CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, - CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, - CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, - CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, - CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, - CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, - CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, - CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, - CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, - CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, - CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, - CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, - CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, - CURLINFO_PROTOCOL = CURLINFO_LONG + 48, - CURLINFO_SCHEME = CURLINFO_STRING + 49, - /* Fill in new entries below here! */ - - CURLINFO_LASTONE = 49 -} CURLINFO; - -/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as - CURLINFO_HTTP_CODE */ -#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE - -typedef enum { - CURLCLOSEPOLICY_NONE, /* first, never use this */ - - CURLCLOSEPOLICY_OLDEST, - CURLCLOSEPOLICY_LEAST_RECENTLY_USED, - CURLCLOSEPOLICY_LEAST_TRAFFIC, - CURLCLOSEPOLICY_SLOWEST, - CURLCLOSEPOLICY_CALLBACK, - - CURLCLOSEPOLICY_LAST /* last, never use this */ -} curl_closepolicy; - -#define CURL_GLOBAL_SSL (1<<0) -#define CURL_GLOBAL_WIN32 (1<<1) -#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) -#define CURL_GLOBAL_NOTHING 0 -#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL -#define CURL_GLOBAL_ACK_EINTR (1<<2) - - -/***************************************************************************** - * Setup defines, protos etc for the sharing stuff. - */ - -/* Different data locks for a single share */ -typedef enum { - CURL_LOCK_DATA_NONE = 0, - /* CURL_LOCK_DATA_SHARE is used internally to say that - * the locking is just made to change the internal state of the share - * itself. - */ - CURL_LOCK_DATA_SHARE, - CURL_LOCK_DATA_COOKIE, - CURL_LOCK_DATA_DNS, - CURL_LOCK_DATA_SSL_SESSION, - CURL_LOCK_DATA_CONNECT, - CURL_LOCK_DATA_LAST -} curl_lock_data; - -/* Different lock access types */ -typedef enum { - CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ - CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ - CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ - CURL_LOCK_ACCESS_LAST /* never use */ -} curl_lock_access; - -typedef void (*curl_lock_function)(CURL *handle, - curl_lock_data data, - curl_lock_access locktype, - void *userptr); -typedef void (*curl_unlock_function)(CURL *handle, - curl_lock_data data, - void *userptr); - - -typedef enum { - CURLSHE_OK, /* all is fine */ - CURLSHE_BAD_OPTION, /* 1 */ - CURLSHE_IN_USE, /* 2 */ - CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* 4 out of memory */ - CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ - CURLSHE_LAST /* never use */ -} CURLSHcode; - -typedef enum { - CURLSHOPT_NONE, /* don't use */ - CURLSHOPT_SHARE, /* specify a data type to share */ - CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ - CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ - CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ - CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock - callback functions */ - CURLSHOPT_LAST /* never use */ -} CURLSHoption; - -CURL_EXTERN CURLSH *curl_share_init(void); -CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); -CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); - -/**************************************************************************** - * Structures for querying information about the curl library at runtime. - */ - -typedef enum { - CURLVERSION_FIRST, - CURLVERSION_SECOND, - CURLVERSION_THIRD, - CURLVERSION_FOURTH, - CURLVERSION_LAST /* never actually use this */ -} CURLversion; - -/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by - basically all programs ever that want to get version information. It is - meant to be a built-in version number for what kind of struct the caller - expects. If the struct ever changes, we redefine the NOW to another enum - from above. */ -#define CURLVERSION_NOW CURLVERSION_FOURTH - -typedef struct { - CURLversion age; /* age of the returned struct */ - const char *version; /* LIBCURL_VERSION */ - unsigned int version_num; /* LIBCURL_VERSION_NUM */ - const char *host; /* OS/host/cpu/machine when configured */ - int features; /* bitmask, see defines below */ - const char *ssl_version; /* human readable string */ - long ssl_version_num; /* not used anymore, always 0 */ - const char *libz_version; /* human readable string */ - /* protocols is terminated by an entry with a NULL protoname */ - const char * const *protocols; - - /* The fields below this were added in CURLVERSION_SECOND */ - const char *ares; - int ares_num; - - /* This field was added in CURLVERSION_THIRD */ - const char *libidn; - - /* These field were added in CURLVERSION_FOURTH */ - - /* Same as '_libiconv_version' if built with HAVE_ICONV */ - int iconv_ver_num; - - const char *libssh_version; /* human readable string */ - -} curl_version_info_data; - -#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported - (deprecated) */ -#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ -#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ -#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ -#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported - (deprecated) */ -#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ -#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ -#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ -#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are - supported */ -#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ -#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ -#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ -#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ -#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper - is suported */ -#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ -#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ -#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ -#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ -#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used - for cookie domain verification */ -#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ - - /* - * NAME curl_version_info() - * - * DESCRIPTION - * - * This function returns a pointer to a static copy of the version info - * struct. See above. - */ -CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); - -/* - * NAME curl_easy_strerror() - * - * DESCRIPTION - * - * The curl_easy_strerror function may be used to turn a CURLcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_easy_strerror(CURLcode); - -/* - * NAME curl_share_strerror() - * - * DESCRIPTION - * - * The curl_share_strerror function may be used to turn a CURLSHcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_share_strerror(CURLSHcode); - -/* - * NAME curl_easy_pause() - * - * DESCRIPTION - * - * The curl_easy_pause function pauses or unpauses transfers. Select the new - * state by setting the bitmask, use the convenience defines below. - * - */ -CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); - -#define CURLPAUSE_RECV (1<<0) -#define CURLPAUSE_RECV_CONT (0) - -#define CURLPAUSE_SEND (1<<2) -#define CURLPAUSE_SEND_CONT (0) - -#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) -#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) - -#ifdef __cplusplus -} -#endif - -/* unfortunately, the easy.h and multi.h include files need options and info - stuff before they can be included! */ -#include "easy.h" /* nothing in curl is fun without the easy stuff */ -#include "multi.h" - -/* the typechecker doesn't work in C++ (yet) */ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ - ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ - !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) -#include "typecheck-gcc.h" -#else -#if defined(__STDC__) && (__STDC__ >= 1) -/* This preprocessor magic that replaces a call with the exact same call is - only done to make sure application authors pass exactly three arguments - to these functions. */ -#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) -#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) -#endif /* __STDC__ >= 1 */ -#endif /* gcc >= 4.3 && !__cplusplus */ - -#endif /* __CURL_CURL_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/curlbuild.h b/build/premake/premake5/contrib/curl/include/curl/curlbuild.h deleted file mode 100644 index 1d97927f96..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/curlbuild.h +++ /dev/null @@ -1,602 +0,0 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * See file include/curl/curlbuild.h.in, run configure, and forget - * that this file exists it is only used for non-configure systems. - * But you can keep reading if you want ;-) - * - */ - -/* ================================================================ */ -/* NOTES FOR NON-CONFIGURE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * Try to keep one section per platform, compiler and architecture, - * otherwise, if an existing section is reused for a different one and - * later on the original is adjusted, probably the piggybacking one can - * be adversely changed. - * - * In order to differentiate between platforms/compilers/architectures - * use only compiler built in predefined preprocessor symbols. - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * For any given platform/compiler curl_off_t must be typedef'ed to a - * 64-bit wide signed integral data type. The width of this data type - * must remain constant and independent of any possible large file - * support settings. - * - * As an exception to the above, curl_off_t shall be typedef'ed to a - * 32-bit wide signed integral data type if there is no 64-bit type. - * - * As a general rule, curl_off_t shall not be mapped to off_t. This - * rule shall only be violated if off_t is the only 64-bit data type - * available and the size of off_t is independent of large file support - * settings. Keep your build on the safe side avoiding an off_t gating. - * If you have a 64-bit off_t then take for sure that another 64-bit - * data type exists, dig deeper and you will find it. - * - * NOTE 3: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.dist or - * at file include/curl/curlbuild.h, this is due to the following reason: - * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h - * when the libcurl source code distribution archive file is created. - * - * File include/curl/curlbuild.h.dist is not included in the distribution - * archive. File include/curl/curlbuild.h is not present in the git tree. - * - * The distributed include/curl/curlbuild.h file is only intended to be used - * on systems which can not run the also distributed configure script. - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - * If you check out from git on a non-configure platform, you must run the - * appropriate buildconf* script to set up curlbuild.h and other local files. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ -/* ================================================================ */ - -#if defined(__DJGPP__) || defined(__GO32__) -# if defined(__DJGPP__) && (__DJGPP__ > 1) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__SALFORDC__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__BORLANDC__) -# if (__BORLANDC__ < 0x520) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__TURBOC__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__WATCOMC__) -# if defined(__386__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__POCC__) -# if (__POCC__ < 280) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# elif defined(_MSC_VER) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__LCC__) -# if defined(__e2k__) /* MCST eLbrus C Compiler */ -# define CURL_SIZEOF_LONG 8 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# else /* Local (or Little) C Compiler */ -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 -# endif - -#elif defined(__SYMBIAN32__) -# if defined(__EABI__) /* Treat all ARM compilers equally */ -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__CW32__) -# pragma longlong on -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__VC32__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__MWERKS__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(_WIN32_WCE) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__MINGW32__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__VMS) -# if defined(__VAX) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -#elif defined(__OS400__) -# if defined(__ILEC400__) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# endif - -#elif defined(__MVS__) -# if defined(__IBMC__) || defined(__IBMCPP__) -# if defined(_ILP32) -# define CURL_SIZEOF_LONG 4 -# elif defined(_LP64) -# define CURL_SIZEOF_LONG 8 -# endif -# if defined(_LONG_LONG) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# endif - -#elif defined(__370__) -# if defined(__IBMC__) || defined(__IBMCPP__) -# if defined(_ILP32) -# define CURL_SIZEOF_LONG 4 -# elif defined(_LP64) -# define CURL_SIZEOF_LONG 8 -# endif -# if defined(_LONG_LONG) -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(_LP64) -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# else -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 -# endif - -#elif defined(TPF) -# define CURL_SIZEOF_LONG 8 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -/* ===================================== */ -/* KEEP MSVC THE PENULTIMATE ENTRY */ -/* ===================================== */ - -#elif defined(_MSC_VER) -# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T __int64 -# define CURL_FORMAT_CURL_OFF_T "I64d" -# define CURL_FORMAT_CURL_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T i64 -# define CURL_SUFFIX_CURL_OFF_TU ui64 -# else -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T int -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -/* ===================================== */ -/* KEEP GENERIC GCC THE LAST ENTRY */ -/* ===================================== */ - -#elif defined(__GNUC__) -# if !defined(__LP64__) && (defined(__ILP32__) || \ - defined(__i386__) || defined(__ppc__) || defined(__PPC__) || defined(__arm__) || \ - defined(__sparc__) || defined(__mips__) || defined(__sh__)) -# define CURL_SIZEOF_LONG 4 -# define CURL_TYPEOF_CURL_OFF_T long long -# define CURL_FORMAT_CURL_OFF_T "lld" -# define CURL_FORMAT_CURL_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T LL -# define CURL_SUFFIX_CURL_OFF_TU ULL -# elif defined(__LP64__) || \ - defined(__x86_64__) || defined(__ppc64__) || defined(__PPC64__) || defined(__sparc64__) || \ - defined(__e2k__) /* MCST Elbrus 2000 */ -# define CURL_SIZEOF_LONG 8 -# define CURL_TYPEOF_CURL_OFF_T long -# define CURL_FORMAT_CURL_OFF_T "ld" -# define CURL_FORMAT_CURL_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 -# define CURL_SUFFIX_CURL_OFF_T L -# define CURL_SUFFIX_CURL_OFF_TU UL -# endif -# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURL_SIZEOF_CURL_SOCKLEN_T 4 -# define CURL_PULL_SYS_TYPES_H 1 -# define CURL_PULL_SYS_SOCKET_H 1 - -#else -# error "Unknown non-configure build target!" - Error Compilation_aborted_Unknown_non_configure_build_target -#endif - -/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ -/* sys/types.h is required here to properly make type definitions below. */ -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ -/* sys/socket.h is required here to properly make type definitions below. */ -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* Data type definition of curl_socklen_t. */ - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T - typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; -#endif - -/* Data type definition of curl_off_t. */ - -#ifdef CURL_TYPEOF_CURL_OFF_T - typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; -#endif - -#endif /* __CURL_CURLBUILD_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/curlbuild.h.cmake b/build/premake/premake5/contrib/curl/include/curl/curlbuild.h.cmake deleted file mode 100644 index bbb31a9408..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/curlbuild.h.cmake +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.in or - * at file include/curl/curlbuild.h, this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -#cmakedefine CURL_PULL_WS2TCPIP_H -#ifdef CURL_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#cmakedefine CURL_PULL_SYS_TYPES_H -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file stdint.h must be included by the external interface. */ -#cmakedefine CURL_PULL_STDINT_H -#ifdef CURL_PULL_STDINT_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file inttypes.h must be included by the external interface. */ -#cmakedefine CURL_PULL_INTTYPES_H -#ifdef CURL_PULL_INTTYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#cmakedefine CURL_PULL_SYS_SOCKET_H -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/poll.h must be included by the external interface. */ -#cmakedefine CURL_PULL_SYS_POLL_H -#ifdef CURL_PULL_SYS_POLL_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG} - -/* Integral data type used for curl_socklen_t. */ -#define CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T} - -/* The size of `curl_socklen_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T} - -/* Data type definition of curl_socklen_t. */ -typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; - -/* Signed integral data type used for curl_off_t. */ -#define CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T} - -/* Data type definition of curl_off_t. */ -typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; - -/* curl_off_t formatting string directive without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}" - -/* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}" - -/* curl_off_t formatting string directive with "%" conversion specifier. */ -#define CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}" - -/* The size of `curl_off_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T} - -/* curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T} - -/* unsigned curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU} - -#endif /* __CURL_CURLBUILD_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/curlbuild.h.in b/build/premake/premake5/contrib/curl/include/curl/curlbuild.h.in deleted file mode 100644 index ffab356709..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/curlbuild.h.in +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.in or - * at file include/curl/curlbuild.h, this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -#undef CURL_PULL_WS2TCPIP_H -#ifdef CURL_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#undef CURL_PULL_SYS_TYPES_H -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file stdint.h must be included by the external interface. */ -#undef CURL_PULL_STDINT_H -#ifdef CURL_PULL_STDINT_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file inttypes.h must be included by the external interface. */ -#undef CURL_PULL_INTTYPES_H -#ifdef CURL_PULL_INTTYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#undef CURL_PULL_SYS_SOCKET_H -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/poll.h must be included by the external interface. */ -#undef CURL_PULL_SYS_POLL_H -#ifdef CURL_PULL_SYS_POLL_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#undef CURL_SIZEOF_LONG - -/* Integral data type used for curl_socklen_t. */ -#undef CURL_TYPEOF_CURL_SOCKLEN_T - -/* The size of `curl_socklen_t', as computed by sizeof. */ -#undef CURL_SIZEOF_CURL_SOCKLEN_T - -/* Data type definition of curl_socklen_t. */ -typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; - -/* Signed integral data type used for curl_off_t. */ -#undef CURL_TYPEOF_CURL_OFF_T - -/* Data type definition of curl_off_t. */ -typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; - -/* curl_off_t formatting string directive without "%" conversion specifier. */ -#undef CURL_FORMAT_CURL_OFF_T - -/* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#undef CURL_FORMAT_CURL_OFF_TU - -/* curl_off_t formatting string directive with "%" conversion specifier. */ -#undef CURL_FORMAT_OFF_T - -/* The size of `curl_off_t', as computed by sizeof. */ -#undef CURL_SIZEOF_CURL_OFF_T - -/* curl_off_t constant suffix. */ -#undef CURL_SUFFIX_CURL_OFF_T - -/* unsigned curl_off_t constant suffix. */ -#undef CURL_SUFFIX_CURL_OFF_TU - -#endif /* __CURL_CURLBUILD_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/curlrules.h b/build/premake/premake5/contrib/curl/include/curl/curlrules.h deleted file mode 100644 index 55d21f68f1..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/curlrules.h +++ /dev/null @@ -1,262 +0,0 @@ -#ifndef __CURL_CURLRULES_H -#define __CURL_CURLRULES_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* COMPILE TIME SANITY CHECKS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * All checks done in this file are intentionally placed in a public - * header file which is pulled by curl/curl.h when an application is - * being built using an already built libcurl library. Additionally - * this file is also included and used when building the library. - * - * If compilation fails on this file it is certainly sure that the - * problem is elsewhere. It could be a problem in the curlbuild.h - * header file, or simply that you are using different compilation - * settings than those used to build the library. - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * Do not deactivate any check, these are done to make sure that the - * library is properly built and used. - * - * You can find further help on the libcurl development mailing list: - * https://cool.haxx.se/mailman/listinfo/curl-library/ - * - * NOTE 2 - * ------ - * - * Some of the following compile time checks are based on the fact - * that the dimension of a constant array can not be a negative one. - * In this way if the compile time verification fails, the compilation - * will fail issuing an error. The error description wording is compiler - * dependent but it will be quite similar to one of the following: - * - * "negative subscript or subscript is too large" - * "array must have at least one element" - * "-1 is an illegal array size" - * "size of array is negative" - * - * If you are building an application which tries to use an already - * built libcurl library and you are getting this kind of errors on - * this file, it is a clear indication that there is a mismatch between - * how the library was built and how you are trying to use it for your - * application. Your already compiled or binary library provider is the - * only one who can give you the details you need to properly use it. - */ - -/* - * Verify that some macros are actually defined. - */ - -#ifndef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing -#endif - -#ifndef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing -#endif - -/* - * Macros private to this header file. - */ - -#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 - -#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 - -/* - * Verify that the size previously defined and expected for long - * is the same as the one reported by sizeof() at compile time. - */ - -typedef char - __curl_rule_01__ - [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; - -/* - * Verify that the size previously defined and expected for - * curl_off_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_02__ - [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; - -/* - * Verify at compile time that the size of curl_off_t as reported - * by sizeof() is greater or equal than the one reported for long - * for the current compilation. - */ - -typedef char - __curl_rule_03__ - [CurlchkszGE(curl_off_t, long)]; - -/* - * Verify that the size previously defined and expected for - * curl_socklen_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_04__ - [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; - -/* - * Verify at compile time that the size of curl_socklen_t as reported - * by sizeof() is greater or equal than the one reported for int for - * the current compilation. - */ - -typedef char - __curl_rule_05__ - [CurlchkszGE(curl_socklen_t, int)]; - -/* ================================================================ */ -/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ -/* ================================================================ */ - -/* - * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow - * these to be visible and exported by the external libcurl interface API, - * while also making them visible to the library internals, simply including - * curl_setup.h, without actually needing to include curl.h internally. - * If some day this section would grow big enough, all this should be moved - * to its own header file. - */ - -/* - * Figure out if we can use the ## preprocessor operator, which is supported - * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ - * or __cplusplus so we need to carefully check for them too. - */ - -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ - defined(__ILEC400__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif - -/* - * Macros for minimum-width signed and unsigned curl_off_t integer constants. - */ - -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) -# define __CURL_OFF_T_C_HLPR2(x) x -# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) -# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ - __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ - __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) -#else -# ifdef CURL_ISOCPP -# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix -# else -# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix -# endif -# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) -# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) -# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) -#endif - -/* - * Get rid of macros private to this header file. - */ - -#undef CurlchkszEQ -#undef CurlchkszGE - -/* - * Get rid of macros not intended to exist beyond this point. - */ - -#undef CURL_PULL_WS2TCPIP_H -#undef CURL_PULL_SYS_TYPES_H -#undef CURL_PULL_SYS_SOCKET_H -#undef CURL_PULL_SYS_POLL_H -#undef CURL_PULL_STDINT_H -#undef CURL_PULL_INTTYPES_H - -#undef CURL_TYPEOF_CURL_SOCKLEN_T -#undef CURL_TYPEOF_CURL_OFF_T - -#ifdef CURL_NO_OLDIES -#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ -#endif - -#endif /* __CURL_CURLRULES_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/curlver.h b/build/premake/premake5/contrib/curl/include/curl/curlver.h deleted file mode 100644 index 349e9fe888..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/curlver.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef __CURL_CURLVER_H -#define __CURL_CURLVER_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* This header file contains nothing but libcurl version info, generated by - a script at release-time. This was made its own header file in 7.11.2 */ - -/* This is the global package copyright */ -#define LIBCURL_COPYRIGHT "1996 - 2017 Daniel Stenberg, ." - -/* This is the version number of the libcurl package from which this header - file origins: */ -#define LIBCURL_VERSION "7.53.1-DEV" - -/* The numeric version number is also available "in parts" by using these - defines: */ -#define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 53 -#define LIBCURL_VERSION_PATCH 1 - -/* This is the numeric version of the libcurl version number, meant for easier - parsing and comparions by programs. The LIBCURL_VERSION_NUM define will - always follow this syntax: - - 0xXXYYZZ - - Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal (using 8 bits each). All three numbers are always represented - using two digits. 1.2 would appear as "0x010200" while version 9.11.7 - appears as "0x090b07". - - This 6-digit (24 bits) hexadecimal number does not show pre-release number, - and it is always a greater number in a more recent release. It makes - comparisons with greater than and less than work. - - Note: This define is the full hex number and _does not_ use the - CURL_VERSION_BITS() macro since curl's own configure script greps for it - and needs it to contain the full number. -*/ -#define LIBCURL_VERSION_NUM 0x073501 - -/* - * This is the date and time when the full source package was created. The - * timestamp is not stored in git, as the timestamp is properly set in the - * tarballs by the maketgz script. - * - * The format of the date should follow this template: - * - * "Mon Feb 12 11:35:33 UTC 2007" - */ -#define LIBCURL_TIMESTAMP "DEV" - -#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) -#define CURL_AT_LEAST_VERSION(x,y,z) \ - (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) - -#endif /* __CURL_CURLVER_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/easy.h b/build/premake/premake5/contrib/curl/include/curl/easy.h deleted file mode 100644 index 752c5049f8..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/easy.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef __CURL_EASY_H -#define __CURL_EASY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN CURL *curl_easy_init(void); -CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); -CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); -CURL_EXTERN void curl_easy_cleanup(CURL *curl); - -/* - * NAME curl_easy_getinfo() - * - * DESCRIPTION - * - * Request internal information from the curl session with this function. The - * third argument MUST be a pointer to a long, a pointer to a char * or a - * pointer to a double (as the documentation describes elsewhere). The data - * pointed to will be filled in accordingly and can be relied upon only if the - * function returns CURLE_OK. This function is intended to get used *AFTER* a - * performed transfer, all results from this function are undefined until the - * transfer is completed. - */ -CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); - - -/* - * NAME curl_easy_duphandle() - * - * DESCRIPTION - * - * Creates a new curl session handle with the same options set for the handle - * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistent connections cannot - * be transferred. It is useful in multithreaded applications when you can run - * curl_easy_duphandle() for each new thread to avoid a series of identical - * curl_easy_setopt() invokes in every thread. - */ -CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); - -/* - * NAME curl_easy_reset() - * - * DESCRIPTION - * - * Re-initializes a CURL handle to the default values. This puts back the - * handle to the same state as it was in when it was just created. - * - * It does keep: live connections, the Session ID cache, the DNS cache and the - * cookies. - */ -CURL_EXTERN void curl_easy_reset(CURL *curl); - -/* - * NAME curl_easy_recv() - * - * DESCRIPTION - * - * Receives data from the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, - size_t *n); - -/* - * NAME curl_easy_send() - * - * DESCRIPTION - * - * Sends data over the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, - size_t buflen, size_t *n); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/build/premake/premake5/contrib/curl/include/curl/mprintf.h b/build/premake/premake5/contrib/curl/include/curl/mprintf.h deleted file mode 100644 index e20f546e19..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/mprintf.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __CURL_MPRINTF_H -#define __CURL_MPRINTF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include -#include /* needed for FILE */ -#include "curl.h" /* for CURL_EXTERN */ - -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN int curl_mprintf(const char *format, ...); -CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); -CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, - const char *format, ...); -CURL_EXTERN int curl_mvprintf(const char *format, va_list args); -CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); -CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, - const char *format, va_list args); -CURL_EXTERN char *curl_maprintf(const char *format, ...); -CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); - -#ifdef __cplusplus -} -#endif - -#endif /* __CURL_MPRINTF_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/multi.h b/build/premake/premake5/contrib/curl/include/curl/multi.h deleted file mode 100644 index d1e00cc5d3..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/multi.h +++ /dev/null @@ -1,439 +0,0 @@ -#ifndef __CURL_MULTI_H -#define __CURL_MULTI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -/* - This is an "external" header file. Don't give away any internals here! - - GOALS - - o Enable a "pull" interface. The application that uses libcurl decides where - and when to ask libcurl to get/send data. - - o Enable multiple simultaneous transfers in the same thread without making it - complicated for the application. - - o Enable the application to select() on its own file descriptors and curl's - file descriptors simultaneous easily. - -*/ - -/* - * This header file should not really need to include "curl.h" since curl.h - * itself includes this file and we expect user applications to do #include - * without the need for especially including multi.h. - * - * For some reason we added this include here at one point, and rather than to - * break existing (wrongly written) libcurl applications, we leave it as-is - * but with this warning attached. - */ -#include "curl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) -typedef struct Curl_multi CURLM; -#else -typedef void CURLM; -#endif - -typedef enum { - CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or - curl_multi_socket*() soon */ - CURLM_OK, - CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ - CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ - CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ - CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ - CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ - CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ - CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was - attempted to get added - again */ - CURLM_LAST -} CURLMcode; - -/* just to make code nicer when using curl_multi_socket() you can now check - for CURLM_CALL_MULTI_SOCKET too in the same style it works for - curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ -#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM - -/* bitmask bits for CURLMOPT_PIPELINING */ -#define CURLPIPE_NOTHING 0L -#define CURLPIPE_HTTP1 1L -#define CURLPIPE_MULTIPLEX 2L - -typedef enum { - CURLMSG_NONE, /* first, not used */ - CURLMSG_DONE, /* This easy handle has completed. 'result' contains - the CURLcode of the transfer */ - CURLMSG_LAST /* last, not used */ -} CURLMSG; - -struct CURLMsg { - CURLMSG msg; /* what this message means */ - CURL *easy_handle; /* the handle it concerns */ - union { - void *whatever; /* message-specific data */ - CURLcode result; /* return code for transfer */ - } data; -}; -typedef struct CURLMsg CURLMsg; - -/* Based on poll(2) structure and values. - * We don't use pollfd and POLL* constants explicitly - * to cover platforms without poll(). */ -#define CURL_WAIT_POLLIN 0x0001 -#define CURL_WAIT_POLLPRI 0x0002 -#define CURL_WAIT_POLLOUT 0x0004 - -struct curl_waitfd { - curl_socket_t fd; - short events; - short revents; /* not supported yet */ -}; - -/* - * Name: curl_multi_init() - * - * Desc: inititalize multi-style curl usage - * - * Returns: a new CURLM handle to use in all 'curl_multi' functions. - */ -CURL_EXTERN CURLM *curl_multi_init(void); - -/* - * Name: curl_multi_add_handle() - * - * Desc: add a standard curl handle to the multi stack - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_remove_handle() - * - * Desc: removes a curl handle from the multi stack again - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_fdset() - * - * Desc: Ask curl for its fd_set sets. The app can use these to select() or - * poll() on. We want curl_multi_perform() called as soon as one of - * them are ready. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *exc_fd_set, - int *max_fd); - -/* - * Name: curl_multi_wait() - * - * Desc: Poll on all fds within a CURLM set as well as any - * additional fds passed to the function. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, - struct curl_waitfd extra_fds[], - unsigned int extra_nfds, - int timeout_ms, - int *ret); - - /* - * Name: curl_multi_perform() - * - * Desc: When the app thinks there's data available for curl it calls this - * function to read/write whatever there is right now. This returns - * as soon as the reads and writes are done. This function does not - * require that there actually is data available for reading or that - * data can be written, it can be called just in case. It returns - * the number of handles that still transfer data in the second - * argument's integer-pointer. - * - * Returns: CURLMcode type, general multi error code. *NOTE* that this only - * returns errors etc regarding the whole multi stack. There might - * still have occurred problems on invidual transfers even when this - * returns OK. - */ -CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, - int *running_handles); - - /* - * Name: curl_multi_cleanup() - * - * Desc: Cleans up and removes a whole multi stack. It does not free or - * touch any individual easy handles in any way. We need to define - * in what state those handles will be if this function is called - * in the middle of a transfer. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); - -/* - * Name: curl_multi_info_read() - * - * Desc: Ask the multi handle if there's any messages/informationals from - * the individual transfers. Messages include informationals such as - * error code from the transfer or just the fact that a transfer is - * completed. More details on these should be written down as well. - * - * Repeated calls to this function will return a new struct each - * time, until a special "end of msgs" struct is returned as a signal - * that there is no more to get at this point. - * - * The data the returned pointer points to will not survive calling - * curl_multi_cleanup(). - * - * The 'CURLMsg' struct is meant to be very simple and only contain - * very basic informations. If more involved information is wanted, - * we will provide the particular "transfer handle" in that struct - * and that should/could/would be used in subsequent - * curl_easy_getinfo() calls (or similar). The point being that we - * must never expose complex structs to applications, as then we'll - * undoubtably get backwards compatibility problems in the future. - * - * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out - * of structs. It also writes the number of messages left in the - * queue (after this read) in the integer the second argument points - * to. - */ -CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, - int *msgs_in_queue); - -/* - * Name: curl_multi_strerror() - * - * Desc: The curl_multi_strerror function may be used to turn a CURLMcode - * value into the equivalent human readable error string. This is - * useful for printing meaningful error messages. - * - * Returns: A pointer to a zero-terminated error message. - */ -CURL_EXTERN const char *curl_multi_strerror(CURLMcode); - -/* - * Name: curl_multi_socket() and - * curl_multi_socket_all() - * - * Desc: An alternative version of curl_multi_perform() that allows the - * application to pass in one of the file descriptors that have been - * detected to have "action" on them and let libcurl perform. - * See man page for details. - */ -#define CURL_POLL_NONE 0 -#define CURL_POLL_IN 1 -#define CURL_POLL_OUT 2 -#define CURL_POLL_INOUT 3 -#define CURL_POLL_REMOVE 4 - -#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD - -#define CURL_CSELECT_IN 0x01 -#define CURL_CSELECT_OUT 0x02 -#define CURL_CSELECT_ERR 0x04 - -typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int what, /* see above */ - void *userp, /* private callback - pointer */ - void *socketp); /* private socket - pointer */ -/* - * Name: curl_multi_timer_callback - * - * Desc: Called by libcurl whenever the library detects a change in the - * maximum number of milliseconds the app is allowed to wait before - * curl_multi_socket() or curl_multi_perform() must be called - * (to allow libcurl's timed events to take place). - * - * Returns: The callback should return zero. - */ -typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ - long timeout_ms, /* see above */ - void *userp); /* private callback - pointer */ - -CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t s, - int ev_bitmask, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, - int *running_handles); - -#ifndef CURL_ALLOW_OLD_MULTI_SOCKET -/* This macro below was added in 7.16.3 to push users who recompile to use - the new curl_multi_socket_action() instead of the old curl_multi_socket() -*/ -#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) -#endif - -/* - * Name: curl_multi_timeout() - * - * Desc: Returns the maximum number of milliseconds the app is allowed to - * wait before curl_multi_socket() or curl_multi_perform() must be - * called (to allow libcurl's timed events to take place). - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, - long *milliseconds); - -#undef CINIT /* re-using the same name as in curl.h */ - -#ifdef CURL_ISOCPP -#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define LONG CURLOPTTYPE_LONG -#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT -#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT -#define OFF_T CURLOPTTYPE_OFF_T -#define CINIT(name,type,number) CURLMOPT_/**/name = type + number -#endif - -typedef enum { - /* This is the socket callback function pointer */ - CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), - - /* This is the argument passed to the socket callback */ - CINIT(SOCKETDATA, OBJECTPOINT, 2), - - /* set to 1 to enable pipelining for this multi handle */ - CINIT(PIPELINING, LONG, 3), - - /* This is the timer callback function pointer */ - CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), - - /* This is the argument passed to the timer callback */ - CINIT(TIMERDATA, OBJECTPOINT, 5), - - /* maximum number of entries in the connection cache */ - CINIT(MAXCONNECTS, LONG, 6), - - /* maximum number of (pipelining) connections to one host */ - CINIT(MAX_HOST_CONNECTIONS, LONG, 7), - - /* maximum number of requests in a pipeline */ - CINIT(MAX_PIPELINE_LENGTH, LONG, 8), - - /* a connection with a content-length longer than this - will not be considered for pipelining */ - CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9), - - /* a connection with a chunk length longer than this - will not be considered for pipelining */ - CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10), - - /* a list of site names(+port) that are blacklisted from - pipelining */ - CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11), - - /* a list of server types that are blacklisted from - pipelining */ - CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12), - - /* maximum number of open connections in total */ - CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), - - /* This is the server push callback function pointer */ - CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14), - - /* This is the argument passed to the server push callback */ - CINIT(PUSHDATA, OBJECTPOINT, 15), - - CURLMOPT_LASTENTRY /* the last unused */ -} CURLMoption; - - -/* - * Name: curl_multi_setopt() - * - * Desc: Sets options for the multi handle. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, - CURLMoption option, ...); - - -/* - * Name: curl_multi_assign() - * - * Desc: This function sets an association in the multi handle between the - * given socket and a private pointer of the application. This is - * (only) useful for curl_multi_socket uses. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, - curl_socket_t sockfd, void *sockp); - - -/* - * Name: curl_push_callback - * - * Desc: This callback gets called when a new stream is being pushed by the - * server. It approves or denies the new stream. - * - * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. - */ -#define CURL_PUSH_OK 0 -#define CURL_PUSH_DENY 1 - -struct curl_pushheaders; /* forward declaration only */ - -CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, - size_t num); -CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, - const char *name); - -typedef int (*curl_push_callback)(CURL *parent, - CURL *easy, - size_t num_headers, - struct curl_pushheaders *headers, - void *userp); - -#ifdef __cplusplus -} /* end of extern "C" */ -#endif - -#endif diff --git a/build/premake/premake5/contrib/curl/include/curl/stdcheaders.h b/build/premake/premake5/contrib/curl/include/curl/stdcheaders.h deleted file mode 100644 index 027b6f4211..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/stdcheaders.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __STDC_HEADERS_H -#define __STDC_HEADERS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -size_t fread(void *, size_t, size_t, FILE *); -size_t fwrite(const void *, size_t, size_t, FILE *); - -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); - -#endif /* __STDC_HEADERS_H */ diff --git a/build/premake/premake5/contrib/curl/include/curl/typecheck-gcc.h b/build/premake/premake5/contrib/curl/include/curl/typecheck-gcc.h deleted file mode 100644 index 3d683152b6..0000000000 --- a/build/premake/premake5/contrib/curl/include/curl/typecheck-gcc.h +++ /dev/null @@ -1,624 +0,0 @@ -#ifndef __CURL_TYPECHECK_GCC_H -#define __CURL_TYPECHECK_GCC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* wraps curl_easy_setopt() with typechecking */ - -/* To add a new kind of warning, add an - * if(_curl_is_sometype_option(_curl_opt)) - * if(!_curl_is_sometype(value)) - * _curl_easy_setopt_err_sometype(); - * block and define _curl_is_sometype_option, _curl_is_sometype and - * _curl_easy_setopt_err_sometype below - * - * NOTE: We use two nested 'if' statements here instead of the && operator, in - * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x - * when compiling with -Wlogical-op. - * - * To add an option that uses the same type as an existing option, you'll just - * need to extend the appropriate _curl_*_option macro - */ -#define curl_easy_setopt(handle, option, value) \ -__extension__ ({ \ - __typeof__(option) _curl_opt = option; \ - if(__builtin_constant_p(_curl_opt)) { \ - if(_curl_is_long_option(_curl_opt)) \ - if(!_curl_is_long(value)) \ - _curl_easy_setopt_err_long(); \ - if(_curl_is_off_t_option(_curl_opt)) \ - if(!_curl_is_off_t(value)) \ - _curl_easy_setopt_err_curl_off_t(); \ - if(_curl_is_string_option(_curl_opt)) \ - if(!_curl_is_string(value)) \ - _curl_easy_setopt_err_string(); \ - if(_curl_is_write_cb_option(_curl_opt)) \ - if(!_curl_is_write_cb(value)) \ - _curl_easy_setopt_err_write_callback(); \ - if((_curl_opt) == CURLOPT_READFUNCTION) \ - if(!_curl_is_read_cb(value)) \ - _curl_easy_setopt_err_read_cb(); \ - if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ - if(!_curl_is_ioctl_cb(value)) \ - _curl_easy_setopt_err_ioctl_cb(); \ - if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ - if(!_curl_is_sockopt_cb(value)) \ - _curl_easy_setopt_err_sockopt_cb(); \ - if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ - if(!_curl_is_opensocket_cb(value)) \ - _curl_easy_setopt_err_opensocket_cb(); \ - if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ - if(!_curl_is_progress_cb(value)) \ - _curl_easy_setopt_err_progress_cb(); \ - if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ - if(!_curl_is_debug_cb(value)) \ - _curl_easy_setopt_err_debug_cb(); \ - if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ - if(!_curl_is_ssl_ctx_cb(value)) \ - _curl_easy_setopt_err_ssl_ctx_cb(); \ - if(_curl_is_conv_cb_option(_curl_opt)) \ - if(!_curl_is_conv_cb(value)) \ - _curl_easy_setopt_err_conv_cb(); \ - if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ - if(!_curl_is_seek_cb(value)) \ - _curl_easy_setopt_err_seek_cb(); \ - if(_curl_is_cb_data_option(_curl_opt)) \ - if(!_curl_is_cb_data(value)) \ - _curl_easy_setopt_err_cb_data(); \ - if((_curl_opt) == CURLOPT_ERRORBUFFER) \ - if(!_curl_is_error_buffer(value)) \ - _curl_easy_setopt_err_error_buffer(); \ - if((_curl_opt) == CURLOPT_STDERR) \ - if(!_curl_is_FILE(value)) \ - _curl_easy_setopt_err_FILE(); \ - if(_curl_is_postfields_option(_curl_opt)) \ - if(!_curl_is_postfields(value)) \ - _curl_easy_setopt_err_postfields(); \ - if((_curl_opt) == CURLOPT_HTTPPOST) \ - if(!_curl_is_arr((value), struct curl_httppost)) \ - _curl_easy_setopt_err_curl_httpost(); \ - if(_curl_is_slist_option(_curl_opt)) \ - if(!_curl_is_arr((value), struct curl_slist)) \ - _curl_easy_setopt_err_curl_slist(); \ - if((_curl_opt) == CURLOPT_SHARE) \ - if(!_curl_is_ptr((value), CURLSH)) \ - _curl_easy_setopt_err_CURLSH(); \ - } \ - curl_easy_setopt(handle, _curl_opt, value); \ -}) - -/* wraps curl_easy_getinfo() with typechecking */ -/* FIXME: don't allow const pointers */ -#define curl_easy_getinfo(handle, info, arg) \ -__extension__ ({ \ - __typeof__(info) _curl_info = info; \ - if(__builtin_constant_p(_curl_info)) { \ - if(_curl_is_string_info(_curl_info)) \ - if(!_curl_is_arr((arg), char *)) \ - _curl_easy_getinfo_err_string(); \ - if(_curl_is_long_info(_curl_info)) \ - if(!_curl_is_arr((arg), long)) \ - _curl_easy_getinfo_err_long(); \ - if(_curl_is_double_info(_curl_info)) \ - if(!_curl_is_arr((arg), double)) \ - _curl_easy_getinfo_err_double(); \ - if(_curl_is_slist_info(_curl_info)) \ - if(!_curl_is_arr((arg), struct curl_slist *)) \ - _curl_easy_getinfo_err_curl_slist(); \ - } \ - curl_easy_getinfo(handle, _curl_info, arg); \ -}) - -/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), - * for now just make sure that the functions are called with three - * arguments - */ -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) - - -/* the actual warnings, triggered by calling the _curl_easy_setopt_err* - * functions */ - -/* To define a new warning, use _CURL_WARNING(identifier, "message") */ -#define _CURL_WARNING(id, message) \ - static void __attribute__((__warning__(message))) \ - __attribute__((__unused__)) __attribute__((__noinline__)) \ - id(void) { __asm__(""); } - -_CURL_WARNING(_curl_easy_setopt_err_long, - "curl_easy_setopt expects a long argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, - "curl_easy_setopt expects a curl_off_t argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a " - "string ('char *' or char[]) argument for this option" - ) -_CURL_WARNING(_curl_easy_setopt_err_write_callback, - "curl_easy_setopt expects a curl_write_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_read_cb, - "curl_easy_setopt expects a curl_read_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, - "curl_easy_setopt expects a curl_ioctl_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, - "curl_easy_setopt expects a curl_sockopt_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a " - "curl_opensocket_callback argument for this option" - ) -_CURL_WARNING(_curl_easy_setopt_err_progress_cb, - "curl_easy_setopt expects a curl_progress_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_debug_cb, - "curl_easy_setopt expects a curl_debug_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, - "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_conv_cb, - "curl_easy_setopt expects a curl_conv_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_seek_cb, - "curl_easy_setopt expects a curl_seek_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a " - "private data pointer as argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a " - "char buffer of CURL_ERROR_SIZE as argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_FILE, - "curl_easy_setopt expects a 'FILE *' argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_postfields, - "curl_easy_setopt expects a 'void *' or 'char *' argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, - "curl_easy_setopt expects a 'struct curl_httppost *' " - "argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_slist, - "curl_easy_setopt expects a 'struct curl_slist *' argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_CURLSH, - "curl_easy_setopt expects a CURLSH* argument for this option") - -_CURL_WARNING(_curl_easy_getinfo_err_string, - "curl_easy_getinfo expects a pointer to 'char *' for this info") -_CURL_WARNING(_curl_easy_getinfo_err_long, - "curl_easy_getinfo expects a pointer to long for this info") -_CURL_WARNING(_curl_easy_getinfo_err_double, - "curl_easy_getinfo expects a pointer to double for this info") -_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, - "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info") - -/* groups of curl_easy_setops options that take the same type of argument */ - -/* To add a new option to one of the groups, just add - * (option) == CURLOPT_SOMETHING - * to the or-expression. If the option takes a long or curl_off_t, you don't - * have to do anything - */ - -/* evaluates to true if option takes a long argument */ -#define _curl_is_long_option(option) \ - (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) - -#define _curl_is_off_t_option(option) \ - ((option) > CURLOPTTYPE_OFF_T) - -/* evaluates to true if option takes a char* argument */ -#define _curl_is_string_option(option) \ - ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \ - (option) == CURLOPT_ACCEPT_ENCODING || \ - (option) == CURLOPT_CAINFO || \ - (option) == CURLOPT_CAPATH || \ - (option) == CURLOPT_COOKIE || \ - (option) == CURLOPT_COOKIEFILE || \ - (option) == CURLOPT_COOKIEJAR || \ - (option) == CURLOPT_COOKIELIST || \ - (option) == CURLOPT_CRLFILE || \ - (option) == CURLOPT_CUSTOMREQUEST || \ - (option) == CURLOPT_DEFAULT_PROTOCOL || \ - (option) == CURLOPT_DNS_INTERFACE || \ - (option) == CURLOPT_DNS_LOCAL_IP4 || \ - (option) == CURLOPT_DNS_LOCAL_IP6 || \ - (option) == CURLOPT_DNS_SERVERS || \ - (option) == CURLOPT_EGDSOCKET || \ - (option) == CURLOPT_FTPPORT || \ - (option) == CURLOPT_FTP_ACCOUNT || \ - (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ - (option) == CURLOPT_INTERFACE || \ - (option) == CURLOPT_ISSUERCERT || \ - (option) == CURLOPT_KEYPASSWD || \ - (option) == CURLOPT_KRBLEVEL || \ - (option) == CURLOPT_LOGIN_OPTIONS || \ - (option) == CURLOPT_MAIL_AUTH || \ - (option) == CURLOPT_MAIL_FROM || \ - (option) == CURLOPT_NETRC_FILE || \ - (option) == CURLOPT_NOPROXY || \ - (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PINNEDPUBLICKEY || \ - (option) == CURLOPT_PROXY || \ - (option) == CURLOPT_PROXYPASSWORD || \ - (option) == CURLOPT_PROXYUSERNAME || \ - (option) == CURLOPT_PROXYUSERPWD || \ - (option) == CURLOPT_PROXY_SERVICE_NAME || \ - (option) == CURLOPT_RANDOM_FILE || \ - (option) == CURLOPT_RANGE || \ - (option) == CURLOPT_REFERER || \ - (option) == CURLOPT_RTSP_SESSION_ID || \ - (option) == CURLOPT_RTSP_STREAM_URI || \ - (option) == CURLOPT_RTSP_TRANSPORT || \ - (option) == CURLOPT_SERVICE_NAME || \ - (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ - (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ - (option) == CURLOPT_SSH_KNOWNHOSTS || \ - (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ - (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ - (option) == CURLOPT_SSLCERT || \ - (option) == CURLOPT_SSLCERTTYPE || \ - (option) == CURLOPT_SSLENGINE || \ - (option) == CURLOPT_SSLKEY || \ - (option) == CURLOPT_SSLKEYTYPE || \ - (option) == CURLOPT_SSL_CIPHER_LIST || \ - (option) == CURLOPT_TLSAUTH_PASSWORD || \ - (option) == CURLOPT_TLSAUTH_TYPE || \ - (option) == CURLOPT_TLSAUTH_USERNAME || \ - (option) == CURLOPT_UNIX_SOCKET_PATH || \ - (option) == CURLOPT_URL || \ - (option) == CURLOPT_USERAGENT || \ - (option) == CURLOPT_USERNAME || \ - (option) == CURLOPT_USERPWD || \ - (option) == CURLOPT_XOAUTH2_BEARER || \ - 0) - -/* evaluates to true if option takes a curl_write_callback argument */ -#define _curl_is_write_cb_option(option) \ - ((option) == CURLOPT_HEADERFUNCTION || \ - (option) == CURLOPT_WRITEFUNCTION) - -/* evaluates to true if option takes a curl_conv_callback argument */ -#define _curl_is_conv_cb_option(option) \ - ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) - -/* evaluates to true if option takes a data argument to pass to a callback */ -#define _curl_is_cb_data_option(option) \ - ((option) == CURLOPT_CHUNK_DATA || \ - (option) == CURLOPT_CLOSESOCKETDATA || \ - (option) == CURLOPT_DEBUGDATA || \ - (option) == CURLOPT_FNMATCH_DATA || \ - (option) == CURLOPT_HEADERDATA || \ - (option) == CURLOPT_INTERLEAVEDATA || \ - (option) == CURLOPT_IOCTLDATA || \ - (option) == CURLOPT_OPENSOCKETDATA || \ - (option) == CURLOPT_PRIVATE || \ - (option) == CURLOPT_PROGRESSDATA || \ - (option) == CURLOPT_READDATA || \ - (option) == CURLOPT_SEEKDATA || \ - (option) == CURLOPT_SOCKOPTDATA || \ - (option) == CURLOPT_SSH_KEYDATA || \ - (option) == CURLOPT_SSL_CTX_DATA || \ - (option) == CURLOPT_WRITEDATA || \ - 0) - -/* evaluates to true if option takes a POST data argument (void* or char*) */ -#define _curl_is_postfields_option(option) \ - ((option) == CURLOPT_POSTFIELDS || \ - (option) == CURLOPT_COPYPOSTFIELDS || \ - 0) - -/* evaluates to true if option takes a struct curl_slist * argument */ -#define _curl_is_slist_option(option) \ - ((option) == CURLOPT_HTTP200ALIASES || \ - (option) == CURLOPT_HTTPHEADER || \ - (option) == CURLOPT_MAIL_RCPT || \ - (option) == CURLOPT_POSTQUOTE || \ - (option) == CURLOPT_PREQUOTE || \ - (option) == CURLOPT_PROXYHEADER || \ - (option) == CURLOPT_QUOTE || \ - (option) == CURLOPT_RESOLVE || \ - (option) == CURLOPT_TELNETOPTIONS || \ - 0) - -/* groups of curl_easy_getinfo infos that take the same type of argument */ - -/* evaluates to true if info expects a pointer to char * argument */ -#define _curl_is_string_info(info) \ - (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) - -/* evaluates to true if info expects a pointer to long argument */ -#define _curl_is_long_info(info) \ - (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) - -/* evaluates to true if info expects a pointer to double argument */ -#define _curl_is_double_info(info) \ - (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) - -/* true if info expects a pointer to struct curl_slist * argument */ -#define _curl_is_slist_info(info) \ - (CURLINFO_SLIST < (info)) - - -/* typecheck helpers -- check whether given expression has requested type*/ - -/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, - * otherwise define a new macro. Search for __builtin_types_compatible_p - * in the GCC manual. - * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is - * the actual expression passed to the curl_easy_setopt macro. This - * means that you can only apply the sizeof and __typeof__ operators, no - * == or whatsoever. - */ - -/* XXX: should evaluate to true iff expr is a pointer */ -#define _curl_is_any_ptr(expr) \ - (sizeof(expr) == sizeof(void *)) - -/* evaluates to true if expr is NULL */ -/* XXX: must not evaluate expr, so this check is not accurate */ -#define _curl_is_NULL(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) - -/* evaluates to true if expr is type*, const type* or NULL */ -#define _curl_is_ptr(expr, type) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), type *) || \ - __builtin_types_compatible_p(__typeof__(expr), const type *)) - -/* evaluates to true if expr is one of type[], type*, NULL or const type* */ -#define _curl_is_arr(expr, type) \ - (_curl_is_ptr((expr), type) || \ - __builtin_types_compatible_p(__typeof__(expr), type [])) - -/* evaluates to true if expr is a string */ -#define _curl_is_string(expr) \ - (_curl_is_arr((expr), char) || \ - _curl_is_arr((expr), signed char) || \ - _curl_is_arr((expr), unsigned char)) - -/* evaluates to true if expr is a long (no matter the signedness) - * XXX: for now, int is also accepted (and therefore short and char, which - * are promoted to int when passed to a variadic function) */ -#define _curl_is_long(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), long) || \ - __builtin_types_compatible_p(__typeof__(expr), signed long) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ - __builtin_types_compatible_p(__typeof__(expr), int) || \ - __builtin_types_compatible_p(__typeof__(expr), signed int) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ - __builtin_types_compatible_p(__typeof__(expr), short) || \ - __builtin_types_compatible_p(__typeof__(expr), signed short) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ - __builtin_types_compatible_p(__typeof__(expr), char) || \ - __builtin_types_compatible_p(__typeof__(expr), signed char) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned char)) - -/* evaluates to true if expr is of type curl_off_t */ -#define _curl_is_off_t(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) - -/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ -/* XXX: also check size of an char[] array? */ -#define _curl_is_error_buffer(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), char *) || \ - __builtin_types_compatible_p(__typeof__(expr), char[])) - -/* evaluates to true if expr is of type (const) void* or (const) FILE* */ -#if 0 -#define _curl_is_cb_data(expr) \ - (_curl_is_ptr((expr), void) || \ - _curl_is_ptr((expr), FILE)) -#else /* be less strict */ -#define _curl_is_cb_data(expr) \ - _curl_is_any_ptr(expr) -#endif - -/* evaluates to true if expr is of type FILE* */ -#define _curl_is_FILE(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), FILE *)) - -/* evaluates to true if expr can be passed as POST data (void* or char*) */ -#define _curl_is_postfields(expr) \ - (_curl_is_ptr((expr), void) || \ - _curl_is_arr((expr), char)) - -/* FIXME: the whole callback checking is messy... - * The idea is to tolerate char vs. void and const vs. not const - * pointers in arguments at least - */ -/* helper: __builtin_types_compatible_p distinguishes between functions and - * function pointers, hide it */ -#define _curl_callback_compatible(func, type) \ - (__builtin_types_compatible_p(__typeof__(func), type) || \ - __builtin_types_compatible_p(__typeof__(func), type*)) - -/* evaluates to true if expr is of type curl_read_callback or "similar" */ -#define _curl_is_read_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ - _curl_callback_compatible((expr), _curl_read_callback1) || \ - _curl_callback_compatible((expr), _curl_read_callback2) || \ - _curl_callback_compatible((expr), _curl_read_callback3) || \ - _curl_callback_compatible((expr), _curl_read_callback4) || \ - _curl_callback_compatible((expr), _curl_read_callback5) || \ - _curl_callback_compatible((expr), _curl_read_callback6)) -typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void *); -typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void *); -typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE *); -typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void *); -typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void *); -typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE *); - -/* evaluates to true if expr is of type curl_write_callback or "similar" */ -#define _curl_is_write_cb(expr) \ - (_curl_is_read_cb(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ - _curl_callback_compatible((expr), _curl_write_callback1) || \ - _curl_callback_compatible((expr), _curl_write_callback2) || \ - _curl_callback_compatible((expr), _curl_write_callback3) || \ - _curl_callback_compatible((expr), _curl_write_callback4) || \ - _curl_callback_compatible((expr), _curl_write_callback5) || \ - _curl_callback_compatible((expr), _curl_write_callback6)) -typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void *); -typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, - const void *); -typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE *); -typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void *); -typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, - const void *); -typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE *); - -/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ -#define _curl_is_ioctl_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback4)) -typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void *); -typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void *); -typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void *); -typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void *); - -/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ -#define _curl_is_sockopt_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ - _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ - _curl_callback_compatible((expr), _curl_sockopt_callback2)) -typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, - curlsocktype); - -/* evaluates to true if expr is of type curl_opensocket_callback or - "similar" */ -#define _curl_is_opensocket_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ - _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback4)) -typedef curl_socket_t (_curl_opensocket_callback1) - (void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback2) - (void *, curlsocktype, const struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback3) - (const void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback4) - (const void *, curlsocktype, const struct curl_sockaddr *); - -/* evaluates to true if expr is of type curl_progress_callback or "similar" */ -#define _curl_is_progress_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ - _curl_callback_compatible((expr), _curl_progress_callback1) || \ - _curl_callback_compatible((expr), _curl_progress_callback2)) -typedef int (_curl_progress_callback1)(void *, - double, double, double, double); -typedef int (_curl_progress_callback2)(const void *, - double, double, double, double); - -/* evaluates to true if expr is of type curl_debug_callback or "similar" */ -#define _curl_is_debug_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ - _curl_callback_compatible((expr), _curl_debug_callback1) || \ - _curl_callback_compatible((expr), _curl_debug_callback2) || \ - _curl_callback_compatible((expr), _curl_debug_callback3) || \ - _curl_callback_compatible((expr), _curl_debug_callback4) || \ - _curl_callback_compatible((expr), _curl_debug_callback5) || \ - _curl_callback_compatible((expr), _curl_debug_callback6) || \ - _curl_callback_compatible((expr), _curl_debug_callback7) || \ - _curl_callback_compatible((expr), _curl_debug_callback8)) -typedef int (_curl_debug_callback1) (CURL *, - curl_infotype, char *, size_t, void *); -typedef int (_curl_debug_callback2) (CURL *, - curl_infotype, char *, size_t, const void *); -typedef int (_curl_debug_callback3) (CURL *, - curl_infotype, const char *, size_t, void *); -typedef int (_curl_debug_callback4) (CURL *, - curl_infotype, const char *, size_t, const void *); -typedef int (_curl_debug_callback5) (CURL *, - curl_infotype, unsigned char *, size_t, void *); -typedef int (_curl_debug_callback6) (CURL *, - curl_infotype, unsigned char *, size_t, const void *); -typedef int (_curl_debug_callback7) (CURL *, - curl_infotype, const unsigned char *, size_t, void *); -typedef int (_curl_debug_callback8) (CURL *, - curl_infotype, const unsigned char *, size_t, const void *); - -/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ -/* this is getting even messier... */ -#define _curl_is_ssl_ctx_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) -typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); -typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); -#ifdef HEADER_SSL_H -/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX - * this will of course break if we're included before OpenSSL headers... - */ -typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); -typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, - const void *); -#else -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; -#endif - -/* evaluates to true if expr is of type curl_conv_callback or "similar" */ -#define _curl_is_conv_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ - _curl_callback_compatible((expr), _curl_conv_callback1) || \ - _curl_callback_compatible((expr), _curl_conv_callback2) || \ - _curl_callback_compatible((expr), _curl_conv_callback3) || \ - _curl_callback_compatible((expr), _curl_conv_callback4)) -typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); -typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); -typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); -typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); - -/* evaluates to true if expr is of type curl_seek_callback or "similar" */ -#define _curl_is_seek_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ - _curl_callback_compatible((expr), _curl_seek_callback1) || \ - _curl_callback_compatible((expr), _curl_seek_callback2)) -typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); -typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); - - -#endif /* __CURL_TYPECHECK_GCC_H */ diff --git a/build/premake/premake5/contrib/curl/lib/CMakeLists.txt b/build/premake/premake5/contrib/curl/lib/CMakeLists.txt deleted file mode 100644 index eb2de6d87a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -set(LIB_NAME libcurl) - -configure_file(${CURL_SOURCE_DIR}/include/curl/curlbuild.h.cmake - ${CURL_BINARY_DIR}/include/curl/curlbuild.h) -configure_file(curl_config.h.cmake - ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h) - -transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") -include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake) - -list(APPEND HHEADERS - ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h - ${CURL_BINARY_DIR}/include/curl/curlbuild.h - ) - -if(MSVC) - list(APPEND CSOURCES libcurl.rc) -endif() - -# SET(CSOURCES -# # memdebug.c -not used -# # nwlib.c - Not used -# # strtok.c - specify later -# # strtoofft.c - specify later -# ) - -# # if we have Kerberos 4, right now this is never on -# #OPTION(CURL_KRB4 "Use Kerberos 4" OFF) -# IF(CURL_KRB4) -# SET(CSOURCES ${CSOURCES} -# krb4.c -# security.c -# ) -# ENDIF(CURL_KRB4) - -# #OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF) -# MARK_AS_ADVANCED(CURL_MALLOC_DEBUG) -# IF(CURL_MALLOC_DEBUG) -# SET(CSOURCES ${CSOURCES} -# memdebug.c -# ) -# ENDIF(CURL_MALLOC_DEBUG) - -# # only build compat strtoofft if we need to -# IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64) -# SET(CSOURCES ${CSOURCES} -# strtoofft.c -# ) -# ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64) - - -# The rest of the build - -include_directories(${CMAKE_CURRENT_BINARY_DIR}/../include) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include) -include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -if(USE_ARES) - include_directories(${CARES_INCLUDE_DIR}) -endif() - -if(CURL_STATICLIB) - # Static lib - set(CURL_USER_DEFINED_DYNAMIC_OR_STATIC STATIC) -else() - # DLL / so dynamic lib - set(CURL_USER_DEFINED_DYNAMIC_OR_STATIC SHARED) -endif() - -add_library( - ${LIB_NAME} - ${CURL_USER_DEFINED_DYNAMIC_OR_STATIC} - ${HHEADERS} ${CSOURCES} - ) - -if(MSVC AND CURL_STATICLIB) - set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) -endif() - -target_link_libraries(${LIB_NAME} ${CURL_LIBS}) - -if(WIN32) - add_definitions( -D_USRDLL ) -endif() - -set_target_properties(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL) - -if(HIDES_CURL_PRIVATE_SYMBOLS) - set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_HIDDEN_SYMBOLS") - set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_FLAGS ${CURL_CFLAG_SYMBOLS_HIDE}) -endif() - -# Remove the "lib" prefix since the library is already named "libcurl". -set_target_properties(${LIB_NAME} PROPERTIES PREFIX "") -set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "") - -if(WIN32) - if(NOT CURL_STATICLIB) - # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" - set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") - endif() -endif() - -install(TARGETS ${LIB_NAME} - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.Watcom b/build/premake/premake5/contrib/curl/lib/Makefile.Watcom deleted file mode 100644 index cbc54cfc76..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.Watcom +++ /dev/null @@ -1,279 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 2005 - 2009, Gisle Vanem . -# Copyright (C) 2005 - 2015, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# -# Watcom / OpenWatcom / Win32 makefile for libcurl. -# - -.ERASE - -!if $(__VERSION__) < 1280 -!message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!message ! This Open Watcom version is too old and is no longer supported ! -!message ! Please download latest version from www.openwatcom.org ! -!message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!error Unsupported version of Open Watcom -!endif - -!ifndef %watcom -!error WATCOM environment variable not set! -!endif - -# In order to process Makefile.inc wmake must be called with -u switch! -!ifndef %MAKEFLAGS -!error You MUST call wmake with the -u switch! -!endif - -!ifdef %libname -LIBNAME = $(%libname) -!else -LIBNAME = libcurl -!endif -TARGETS = $(LIBNAME).dll $(LIBNAME).lib - -CC = wcc386 -LD = wlink -AR = wlib -RC = wrc - -!ifdef __LOADDLL__ -! loaddll wcc386 wccd386 -! loaddll wpp386 wppd386 -! loaddll wlib wlibd -! loaddll wlink wlinkd -!endif - -!ifdef __LINUX__ -CP = cp -MD = mkdir -p -!else -CP = copy 2>NUL -MD = mkdir -!endif -!if $(__VERSION__) > 1290 -RD = rm -rf -!else ifdef __UNIX__ -RD = rm -rf -!else -RD = rmdir /q /s 2>NUL -!endif - -SYS_INCL = -I"$(%watcom)/h/nt" -I"$(%watcom)/h" - -CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm & - -wcd=201 -bt=nt -d+ -dWIN32 -dCURL_WANTS_CA_BUNDLE_ENV & - -dBUILDING_LIBCURL -I. -I"../include" $(SYS_INCL) - -!ifdef %debug -DEBUG = -dDEBUG=1 -dDEBUGBUILD -CFLAGS += -d3 $(DEBUG) -!else -CFLAGS += -d0 -!endif - -!ifdef %use_ipv6 -CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6 -!endif - -!ifdef %use_sspi -CFLAGS += -dUSE_WINDOWS_SSPI -!endif - -!ifdef %use_winssl -CFLAGS += -dUSE_WINDOWS_SSPI -CFLAGS += -DUSE_SCHANNEL -!endif - -!ifdef %use_winidn -CFLAGS += -dWINVER=0x0600 -dUSE_WIN32_IDN -! if $(__VERSION__) <= 1290 -CFLAGS += -dWANT_IDN_PROTOTYPES -! endif -!endif - -# -# Change to suite. -# -!ifdef %zlib_root -ZLIB_ROOT = $(%zlib_root) -!else -ZLIB_ROOT = ../../zlib-1.2.8 -!endif - -!ifdef %libssh2_root -LIBSSH2_ROOT = $(%libssh2_root) -!else -LIBSSH2_ROOT = ../../libssh2-1.5.0 -!endif - -!ifdef %librtmp_root -LIBRTMP_ROOT = $(%librtmp_root) -!else -LIBRTMP_ROOT = ../../rtmpdump-2.3 -!endif - -!ifdef %openssl_root -OPENSSL_ROOT = $(%openssl_root) -!else -OPENSSL_ROOT = ../../openssl-1.0.2a -!endif - -!ifdef %ares_root -ARES_ROOT = $(%ares_root) -!else -ARES_ROOT = ../ares -!endif - -!ifdef %use_zlib -CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I"$(ZLIB_ROOT)" -!endif - -!ifdef %use_rtmp -CFLAGS += -dUSE_LIBRTMP -I"$(LIBRTMP_ROOT)" -!endif - -!ifdef %use_ssh2 -CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -I"$(LIBSSH2_ROOT)/include" -I"$(LIBSSH2_ROOT)/win32" -!endif - -!ifdef %use_ssl -CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I"$(OPENSSL_ROOT)/inc32" -!endif - -!ifdef %use_ares -CFLAGS += -dUSE_ARES -I"$(ARES_ROOT)" -!endif - -!ifdef %use_watt32 -CFLAGS += -dUSE_WATT32 -I"$(%watt_root)/inc" -!endif - -OBJ_BASE = WC_Win32.obj -!if $(__VERSION__) > 1290 -OBJ_STAT = $(OBJ_BASE)/stat -OBJ_DYN = $(OBJ_BASE)/dyn -!else ifdef __UNIX__ -OBJ_STAT = $(OBJ_BASE)/stat -OBJ_DYN = $(OBJ_BASE)/dyn -!else -OBJ_STAT = $(OBJ_BASE)\stat -OBJ_DYN = $(OBJ_BASE)\dyn -!endif - -LINK_ARG = $(OBJ_DYN)/wlink.arg -LIB_ARG = $(OBJ_STAT)/wlib.arg - -!include Makefile.inc - -OBJS1 = ./$(CSOURCES:.c=.obj) -OBJS2 = $(OBJS1:vtls/=) -OBJS3 = $(OBJS2:vauth/=) -OBJS4 = $(OBJS3: = ./) -OBJS_STAT = $(OBJS4:./=$(OBJ_STAT)/) -OBJS_DYN = $(OBJS4:./=$(OBJ_DYN)/) - -CURLBUILDH = ../include/curl/curlbuild.h -RESOURCE = $(OBJ_DYN)/libcurl.res - -DIRS = $(OBJ_BASE) $(OBJ_BASE)/stat $(OBJ_BASE)/dyn - -.c : vauth vtls - -all: $(CURLBUILDH) $(DIRS) $(TARGETS) .SYMBOLIC - @echo Welcome to libcurl - -clean: .SYMBOLIC - -rm -f $(OBJS_STAT) - -rm -f $(OBJS_DYN) - -rm -f $(RESOURCE) $(LINK_ARG) $(LIB_ARG) - -vclean distclean: clean .SYMBOLIC - -rm -f $(TARGETS) $(LIBNAME).map $(LIBNAME).sym - -$(RD) $(OBJ_STAT) - -$(RD) $(OBJ_DYN) - -$(RD) $(OBJ_BASE) - -$(DIRS): - -$(MD) $^@ - -$(CURLBUILDH): .EXISTSONLY - $(CP) $^@.dist $^@ - -$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(__MAKEFILES__) - %create $(LINK_ARG) - @%append $(LINK_ARG) system nt dll -!ifdef %debug - @%append $(LINK_ARG) debug all - @%append $(LINK_ARG) option symfile -!endif - @%append $(LINK_ARG) option quiet, caseexact, eliminate - @%append $(LINK_ARG) option map=$(OBJ_DYN)/$(LIBNAME).map - @%append $(LINK_ARG) option implib=$(LIBNAME)_imp.lib - @%append $(LINK_ARG) option res=$(RESOURCE) - @for %f in ($(OBJS_DYN)) do @%append $(LINK_ARG) file %f - @%append $(LINK_ARG) library wldap32.lib -!ifdef %use_watt32 - @%append $(LINK_ARG) library '$(%watt_root)/lib/wattcpw_imp.lib' -!else - @%append $(LINK_ARG) library ws2_32.lib -!endif -!ifdef %use_zlib - @%append $(LINK_ARG) library '$(ZLIB_ROOT)/zlib.lib' -!endif -!ifdef %use_rtmp - @%append $(LINK_ARG) library '$(LIBRTMP_ROOT)/librtmp/librtmp.lib' -!endif -!ifdef %use_ssh2 - @%append $(LINK_ARG) library '$(LIBSSH2_ROOT)/win32/libssh2.lib' -!endif -!ifdef %use_ssl - @%append $(LINK_ARG) library '$(OPENSSL_ROOT)/out32/libeay32.lib' - @%append $(LINK_ARG) library '$(OPENSSL_ROOT)/out32/ssleay32.lib' -!endif -!ifdef %use_ares - @%append $(LINK_ARG) library '$(ARES_ROOT)/cares.lib' -!endif -!ifdef %use_winidn -! if $(__VERSION__) > 1290 - @%append $(LINK_ARG) library normaliz.lib -! else - @%append $(LINK_ARG) import '_IdnToAscii@20' 'NORMALIZ.DLL'.'IdnToAscii' - @%append $(LINK_ARG) import '_IdnToUnicode@20' 'NORMALIZ.DLL'.'IdnToUnicode' -! endif -!endif - $(LD) name $^@ @$(LINK_ARG) - -$(LIBNAME).lib: $(OBJS_STAT) - %create $(LIB_ARG) - @for %f in ($<) do @%append $(LIB_ARG) +- %f - $(AR) -q -b -c -pa $^@ @$(LIB_ARG) - -$(RESOURCE): libcurl.rc - $(RC) $(DEBUG) -q -r -zm -bt=nt -I"../include" $(SYS_INCL) $[@ -fo=$^@ - -.c{$(OBJ_DYN)}.obj: - $(CC) $(CFLAGS) -bd -br $[@ -fo=$^@ - -.c{$(OBJ_STAT)}.obj: - $(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@ - diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.am b/build/premake/premake5/contrib/curl/lib/Makefile.am deleted file mode 100644 index cc7ee9031e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.am +++ /dev/null @@ -1,155 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -########################################################################### -AUTOMAKE_OPTIONS = foreign nostdinc - -CMAKE_DIST = CMakeLists.txt curl_config.h.cmake - -EXTRA_DIST = Makefile.b32 Makefile.m32 config-win32.h \ - config-win32ce.h config-riscos.h config-mac.h curl_config.h.in \ - makefile.dj config-dos.h libcurl.plist libcurl.rc config-amigaos.h \ - makefile.amiga Makefile.netware nwlib.c nwos.c config-win32ce.h \ - config-os400.h setup-os400.h config-symbian.h Makefile.Watcom \ - config-tpf.h mk-ca-bundle.pl mk-ca-bundle.vbs $(CMAKE_DIST) \ - firefox-db2pem.sh config-vxworks.h Makefile.vxworks checksrc.pl \ - objnames-test08.sh objnames-test10.sh objnames.inc - -lib_LTLIBRARIES = libcurl.la - -if BUILD_UNITTESTS -noinst_LTLIBRARIES = libcurlu.la -else -noinst_LTLIBRARIES = -endif - -# This might hold -Werror -CFLAGS += @CURL_CFLAG_EXTRAS@ - -# Specify our include paths here, and do it relative to $(top_srcdir) and -# $(top_builddir), to ensure that these paths which belong to the library -# being currently built and tested are searched before the library which -# might possibly already be installed in the system. -# -# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h -# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h -# $(top_srcdir)/include is for libcurl's external include files -# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file -# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files -# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file -# $(top_srcdir)/ares is for in-tree c-ares's external include files - -AM_CPPFLAGS = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib - -if USE_EMBEDDED_ARES -AM_CPPFLAGS += -I$(top_builddir)/ares \ - -I$(top_srcdir)/ares -endif - -# Prevent LIBS from being used for all link targets -LIBS = $(BLANK_AT_MAKETIME) - -if SONAME_BUMP -# -# Bumping of SONAME conditionally may seem like a weird thing to do, and yeah -# it is. The problem is that we try to avoid the bump as hard as possible, but -# yet it is still necessary for a few rare situations. The configure script will -# attempt to figure out these situations, and it can be forced to consider this -# to be such a case! See README.curl_off_t for further details. -# -# This conditional soname bump SHOULD be removed at next "proper" bump. -# -VERSIONINFO=-version-info 9:0:4 -else -VERSIONINFO=-version-info 8:0:4 -endif - -# This flag accepts an argument of the form current[:revision[:age]]. So, -# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to -# 1. -# -# Here's the simplified rule guide on how to change -version-info: -# (current version is C:R:A) -# -# 1. if there are only source changes, use C:R+1:A -# 2. if interfaces were added use C+1:0:A+1 -# 3. if interfaces were removed, then use C+1:0:0 -# -# For the full guide on libcurl ABI rules, see docs/libcurl/ABI - -AM_CPPFLAGS += -DBUILDING_LIBCURL -AM_LDFLAGS = -AM_CFLAGS = - -libcurl_la_CPPFLAGS_EXTRA = -libcurl_la_LDFLAGS_EXTRA = -libcurl_la_CFLAGS_EXTRA = - -if CURL_LT_SHLIB_USE_VERSION_INFO -libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) -endif - -if CURL_LT_SHLIB_USE_NO_UNDEFINED -libcurl_la_LDFLAGS_EXTRA += -no-undefined -endif - -if CURL_LT_SHLIB_USE_MIMPURE_TEXT -libcurl_la_LDFLAGS_EXTRA += -mimpure-text -endif - -if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS -libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers -endif - -if USE_CPPFLAG_CURL_STATICLIB -libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB -endif - -if DOING_CURL_SYMBOL_HIDING -libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS -libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) -endif - -libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) -libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LDFLAGS) $(LIBCURL_LIBS) -libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) - -libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS -libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS) -libcurlu_la_CFLAGS = $(AM_CFLAGS) - -# Makefile.inc provides the CSOURCES and HHEADERS defines -include Makefile.inc - -libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) -libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS) - -checksrc: - @PERL@ $(srcdir)/checksrc.pl -D$(srcdir) -W$(srcdir)/curl_config.h \ - $(srcdir)/*.[ch] $(srcdir)/vauth/*.[ch] $(srcdir)/vtls/*.[ch] - -if CURLDEBUG -# for debug builds, we scan the sources on all regular make invokes -all-local: checksrc -endif diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.b32 b/build/premake/premake5/contrib/curl/lib/Makefile.b32 deleted file mode 100644 index 481386157d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.b32 +++ /dev/null @@ -1,185 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 2000, Jaepil Kim, . -# Copyright (C) 2001 - 2015, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -############################################################ -# -# Makefile.b32 - Borland's C++ Compiler 5.X -# -# 'BCCDIR' has to be set up to point to the base directory -# of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55 -# -############################################################ - -!if "$(__MAKE__)" == "" -!error __MAKE__ not defined. Use Borlands's MAKE to process this makefile. -!endif - -# Borland's $(MAKEDIR) expands to the path where make.exe is located, -# use this feature to define BCCDIR when user has not defined BCCDIR. -!ifndef BCCDIR -BCCDIR = $(MAKEDIR)\.. -!endif - -# Edit the path below to point to the base of your Zlib sources. -!ifndef ZLIB_PATH -ZLIB_PATH = ..\..\zlib-1.2.8 -!endif - -# Edit the path below to point to the base of your OpenSSL package. -!ifndef OPENSSL_PATH -OPENSSL_PATH = ..\..\openssl-1.0.2a -!endif - -# Set libcurl static lib, dll and import lib -LIBCURL_LIB = libcurl.lib -LIBCURL_DLL = libcurl.dll -LIBCURL_IMPLIB = libcurl_imp.lib - -# Setup environment -PP_CMD = cpp32 -q -P- -CC_CMD = bcc32 -q -c -LD = bcc32 -RM = del 2>NUL -MKDIR = md -RMDIR = rd /q -LIB = tlib -IMPLIB = implib - -CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -w-inl -w-pia -w-pin -Dinline=__inline -LIBFLAGS = /C /P32 -LDFLAGS = -q -lq -laa -tWD - -SRCDIR = .;.\vauth;.\vtls -OBJDIR = .\BCC_objs -INCDIRS = -I.;.\lib;..\include -LINKLIB = $(BCCDIR)\lib\cw32mt.lib $(BCCDIR)\lib\ws2_32.lib -DEFINES = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL - -# By default SSPI support is enabled for BCC -!ifndef DISABLE_SSPI -DEFINES = $(DEFINES) -DUSE_WINDOWS_SSPI -!endif - -# By default LDAP support is disabled for BCC -!ifndef WITH_LDAP -DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP -!endif - -# ZLIB support is enabled setting WITH_ZLIB=1 -!ifdef WITH_ZLIB -DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H -INCDIRS = $(INCDIRS);$(ZLIB_PATH) -LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib -!endif - -# SSL support is enabled setting WITH_SSL=1 -!ifdef WITH_SSL -DEFINES = $(DEFINES) -DUSE_OPENSSL -INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl -LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib -!endif - -.autodepend - -.path.c = $(SRCDIR) -.path.obj = $(OBJDIR) -.path.int = $(OBJDIR) - -# Makefile.inc provides the CSOURCES and HHEADERS defines -!include Makefile.inc - -# Borland's command line librarian program TLIB version 4.5 is not capable -# of building a library when any of its objects contains an hypen in its -# name, due to a command line parsing bug. In order to workaround this, we -# build source files with hyphens in their name as objects with underscores -# using explicit compilation build rules instead of implicit ones. - -NOHYPHEN1 = $(CSOURCES:-=_) -NOHYPHEN2 = $(NOHYPHEN1:vauth/=) -NOHYPHEN3 = $(NOHYPHEN2:vtls/=) - -OBJECTS = $(NOHYPHEN3:.c=.obj) -PREPROCESSED = $(NOHYPHEN3:.c=.int) - -# Borland's command line compiler (BCC32) version 5.5.1 integrated -# preprocessor has a bug which results in silently generating wrong -# definitions for libcurl macros such as CURL_OFF_T_C, on the other -# hand Borland's command line preprocessor (CPP32) version 5.5.1 does -# not have the bug and achieves proper results. In order to avoid the -# silent bug we first preprocess source files and later compile the -# preprocessed result. - -.c.obj: - @-$(RM) $(@R).int - $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<) - $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int - -all: $(OBJDIR) $(LIBCURL_LIB) $(LIBCURL_DLL) - -asyn_ares.obj: asyn-ares.c - @-$(RM) $(@R).int - $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?) - $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int - -asyn_thread.obj: asyn-thread.c - @-$(RM) $(@R).int - $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?) - $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int - -non_ascii.obj: non-ascii.c - @-$(RM) $(@R).int - $(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(?) - $(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int - -clean: - cd $(OBJDIR) - @-$(RM) $(OBJECTS) - @-$(RM) $(PREPROCESSED) - cd .. - @-$(RMDIR) $(OBJDIR) - @-$(RM) $(LIBCURL_LIB) - @-$(RM) $(LIBCURL_IMPLIB) - @-$(RM) libcurl.tds - -$(OBJDIR): - @-$(RMDIR) $(OBJDIR) - @-$(MKDIR) $(OBJDIR) - -$(LIBCURL_LIB): $(OBJECTS) - @-$(RM) $(LIBCURL_LIB) - $(LIB) $(LIBFLAGS) $@ @&&! -+$(**: = &^ -+) -! - -$(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB) - @-$(RM) $(LIBCURL_DLL) - @-$(RM) $(LIBCURL_IMPLIB) - $(LD) $(LDFLAGS) -e$(LIBCURL_DLL) @&&! -$(**: = ^ -) -! - $(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL) - - -# End of Makefile.b32 diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.inc b/build/premake/premake5/contrib/curl/lib/Makefile.inc deleted file mode 100644 index 19f58000a1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.inc +++ /dev/null @@ -1,80 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -########################################################################### - -LIB_VAUTH_CFILES = vauth/vauth.c vauth/cleartext.c vauth/cram.c \ - vauth/digest.c vauth/digest_sspi.c vauth/krb5_gssapi.c \ - vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c \ - vauth/spnego_gssapi.c vauth/spnego_sspi.c - -LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h - -LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c \ - vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c \ - vtls/cyassl.c vtls/schannel.c vtls/darwinssl.c vtls/gskit.c \ - vtls/mbedtls.c - -LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h \ - vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h \ - vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h \ - vtls/mbedtls.h - -LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ - cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \ - ldap.c version.c getenv.c escape.c mprintf.c telnet.c netrc.c \ - getinfo.c transfer.c strcase.c easy.c security.c curl_fnmatch.c \ - fileinfo.c ftplistparser.c wildcard.c krb5.c memdebug.c http_chunks.c \ - strtok.c connect.c llist.c hash.c multi.c content_encoding.c share.c \ - http_digest.c md4.c md5.c http_negotiate.c inet_pton.c strtoofft.c \ - strerror.c amigaos.c hostasyn.c hostip4.c hostip6.c hostsyn.c \ - inet_ntop.c parsedate.c select.c tftp.c splay.c strdup.c socks.c \ - ssh.c curl_addrinfo.c socks_gssapi.c socks_sspi.c \ - curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c pop3.c smtp.c \ - pingpong.c rtsp.c curl_threads.c warnless.c hmac.c curl_rtmp.c \ - openldap.c curl_gethostname.c gopher.c idn_win32.c \ - http_proxy.c non-ascii.c asyn-ares.c asyn-thread.c curl_gssapi.c \ - http_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_sasl.c rand.c \ - curl_multibyte.c hostcheck.c conncache.c pipeline.c dotdot.c \ - x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c - -LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ - formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h \ - speedcheck.h urldata.h curl_ldap.h escape.h telnet.h getinfo.h \ - strcase.h curl_sec.h memdebug.h http_chunks.h curl_fnmatch.h \ - wildcard.h fileinfo.h ftplistparser.h strtok.h connect.h llist.h \ - hash.h content_encoding.h share.h curl_md4.h curl_md5.h http_digest.h \ - http_negotiate.h inet_pton.h amigaos.h strtoofft.h strerror.h \ - inet_ntop.h curlx.h curl_memory.h curl_setup.h transfer.h select.h \ - easyif.h multiif.h parsedate.h tftp.h sockaddr.h splay.h strdup.h \ - socks.h ssh.h curl_base64.h curl_addrinfo.h curl_sspi.h \ - slist.h nonblock.h curl_memrchr.h imap.h pop3.h smtp.h pingpong.h \ - rtsp.h curl_threads.h warnless.h curl_hmac.h curl_rtmp.h \ - curl_gethostname.h gopher.h http_proxy.h non-ascii.h asyn.h \ - http_ntlm.h curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h \ - curl_sasl.h curl_multibyte.h hostcheck.h conncache.h \ - curl_setup_once.h multihandle.h setup-vms.h pipeline.h dotdot.h \ - x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h \ - curl_printf.h system_win32.h rand.h - -LIB_RCFILES = libcurl.rc - -CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) -HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.m32 b/build/premake/premake5/contrib/curl/lib/Makefile.m32 deleted file mode 100644 index 522dbd1df7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.m32 +++ /dev/null @@ -1,363 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 1999 - 2015, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -########################################################################### -# -## Makefile for building libcurl.a with MingW (GCC-3.2 or later) -## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4) -## -## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...] -## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-sspi-winidn -## -## Hint: you can also set environment vars to control the build, f.e.: -## set ZLIB_PATH=c:/zlib-1.2.8 -## set ZLIB=1 -# -########################################################################### - -# Edit the path below to point to the base of your Zlib sources. -ifndef ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -endif -# Edit the path below to point to the base of your OpenSSL package. -ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -endif -# Edit the path below to point to the base of your LibSSH2 package. -ifndef LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -endif -# Edit the path below to point to the base of your librtmp package. -ifndef LIBRTMP_PATH -LIBRTMP_PATH = ../../librtmp-2.4 -endif -# Edit the path below to point to the base of your libidn package. -ifndef LIBIDN_PATH -LIBIDN_PATH = ../../libidn-1.32 -endif -# Edit the path below to point to the base of your MS IDN package. -# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1 -# https://www.microsoft.com/en-us/download/details.aspx?id=734 -ifndef WINIDN_PATH -WINIDN_PATH = ../../Microsoft IDN Mitigation APIs -endif -# Edit the path below to point to the base of your Novell LDAP NDK. -ifndef LDAP_SDK -LDAP_SDK = c:/novell/ndk/cldapsdk/win32 -endif -# Edit the path below to point to the base of your nghttp2 package. -ifndef NGHTTP2_PATH -NGHTTP2_PATH = ../../nghttp2-1.0.0 -endif - -PROOT = .. - -# Edit the path below to point to the base of your c-ares package. -ifndef LIBCARES_PATH -LIBCARES_PATH = $(PROOT)/ares -endif - -CC = $(CROSSPREFIX)gcc -CFLAGS = $(CURL_CFLAG_EXTRAS) -g -O2 -Wall -CFLAGS += -fno-strict-aliasing -# comment LDFLAGS below to keep debug info -LDFLAGS = $(CURL_LDFLAG_EXTRAS) $(CURL_LDFLAG_EXTRAS_DLL) -s -AR = $(CROSSPREFIX)ar -RANLIB = $(CROSSPREFIX)ranlib -RC = $(CROSSPREFIX)windres -RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF -STRIP = $(CROSSPREFIX)strip -g - -# Set environment var ARCH to your architecture to override autodetection. -ifndef ARCH -ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64) -ARCH = w64 -else -ARCH = w32 -endif -endif - -ifeq ($(ARCH),w64) -CFLAGS += -m64 -D_AMD64_ -LDFLAGS += -m64 -RCFLAGS += -F pe-x86-64 -else -CFLAGS += -m32 -LDFLAGS += -m32 -RCFLAGS += -F pe-i386 -endif - -# Platform-dependent helper tool macros -ifeq ($(findstring /sh,$(SHELL)),/sh) -DEL = rm -f $1 -RMDIR = rm -fr $1 -MKDIR = mkdir -p $1 -COPY = -cp -afv $1 $2 -#COPYR = -cp -afr $1/* $2 -COPYR = -rsync -aC $1/* $2 -TOUCH = touch $1 -CAT = cat -ECHONL = echo "" -DL = ' -else -ifeq "$(OS)" "Windows_NT" -DEL = -del 2>NUL /q /f $(subst /,\,$1) -RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) -else -DEL = -del 2>NUL $(subst /,\,$1) -RMDIR = -deltree 2>NUL /y $(subst /,\,$1) -endif -MKDIR = -md 2>NUL $(subst /,\,$1) -COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) -COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) -TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, -CAT = type -ECHONL = $(ComSpec) /c echo. -endif - -######################################################## -## Nothing more to do below this line! - -ifeq ($(findstring -dyn,$(CFG)),-dyn) -DYN = 1 -endif -ifeq ($(findstring -ares,$(CFG)),-ares) -ARES = 1 -endif -ifeq ($(findstring -sync,$(CFG)),-sync) -SYNC = 1 -endif -ifeq ($(findstring -rtmp,$(CFG)),-rtmp) -RTMP = 1 -SSL = 1 -ZLIB = 1 -endif -ifeq ($(findstring -ssh2,$(CFG)),-ssh2) -SSH2 = 1 -ifneq ($(findstring -winssl,$(CFG)),-winssl) -SSL = 1 -endif -ZLIB = 1 -endif -ifeq ($(findstring -ssl,$(CFG)),-ssl) -SSL = 1 -endif -ifeq ($(findstring -srp,$(CFG)),-srp) -SRP = 1 -endif -ifeq ($(findstring -zlib,$(CFG)),-zlib) -ZLIB = 1 -endif -ifeq ($(findstring -idn,$(CFG)),-idn) -IDN = 1 -endif -ifeq ($(findstring -winidn,$(CFG)),-winidn) -WINIDN = 1 -endif -ifeq ($(findstring -sspi,$(CFG)),-sspi) -SSPI = 1 -endif -ifeq ($(findstring -ldaps,$(CFG)),-ldaps) -LDAPS = 1 -endif -ifeq ($(findstring -ipv6,$(CFG)),-ipv6) -IPV6 = 1 -endif -ifeq ($(findstring -winssl,$(CFG)),-winssl) -WINSSL = 1 -SSPI = 1 -endif -ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2) -NGHTTP2 = 1 -endif - -INCLUDES = -I. -I../include -CFLAGS += -DBUILDING_LIBCURL - -ifdef SYNC - CFLAGS += -DUSE_SYNC_DNS -else - ifdef ARES - INCLUDES += -I"$(LIBCARES_PATH)" - CFLAGS += -DUSE_ARES -DCARES_STATICLIB - DLL_LIBS += -L"$(LIBCARES_PATH)" -lcares - libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a - endif -endif -ifdef RTMP - INCLUDES += -I"$(LIBRTMP_PATH)" - CFLAGS += -DUSE_LIBRTMP - DLL_LIBS += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm -endif -ifdef NGHTTP2 - INCLUDES += -I"$(NGHTTP2_PATH)/include" - CFLAGS += -DUSE_NGHTTP2 - DLL_LIBS += -L"$(NGHTTP2_PATH)/lib" -lnghttp2 -endif -ifdef SSH2 - INCLUDES += -I"$(LIBSSH2_PATH)/include" -I"$(LIBSSH2_PATH)/win32" - CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H - DLL_LIBS += -L"$(LIBSSH2_PATH)/win32" -lssh2 - ifdef WINSSL - ifndef DYN - DLL_LIBS += -lbcrypt -lcrypt32 - endif - endif -endif -ifdef SSL - ifndef OPENSSL_INCLUDE - ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc" - OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc - endif - ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include" - OPENSSL_INCLUDE = $(OPENSSL_PATH)/include - endif - endif - ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h" - $(error Invalid path to OpenSSL package: $(OPENSSL_PATH)) - endif - ifndef OPENSSL_LIBPATH - ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out" - OPENSSL_LIBPATH = $(OPENSSL_PATH)/out - OPENSSL_LIBS = -leay32 -lssl32 - endif - ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib" - OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib - OPENSSL_LIBS = -lcrypto -lssl - endif - endif - ifndef DYN - OPENSSL_LIBS += -lgdi32 -lcrypt32 - endif - INCLUDES += -I"$(OPENSSL_INCLUDE)" - CFLAGS += -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \ - -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \ - -DCURL_WANTS_CA_BUNDLE_ENV - DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS) - ifdef SRP - ifeq "$(wildcard $(OPENSSL_INCLUDE)/openssl/srp.h)" "$(OPENSSL_INCLUDE)/openssl/srp.h" - CFLAGS += -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP - endif - endif -else -ifdef WINSSL - DLL_LIBS += -lcrypt32 -endif -endif -ifdef ZLIB - INCLUDES += -I"$(ZLIB_PATH)" - CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H - DLL_LIBS += -L"$(ZLIB_PATH)" -lz -endif -ifdef IDN - INCLUDES += -I"$(LIBIDN_PATH)/include" - CFLAGS += -DUSE_LIBIDN - DLL_LIBS += -L"$(LIBIDN_PATH)/lib" -lidn -else -ifdef WINIDN - CFLAGS += -DUSE_WIN32_IDN - CFLAGS += -DWANT_IDN_PROTOTYPES - DLL_LIBS += -L"$(WINIDN_PATH)" -lnormaliz -endif -endif -ifdef SSPI - CFLAGS += -DUSE_WINDOWS_SSPI - ifdef WINSSL - CFLAGS += -DUSE_SCHANNEL - endif -endif -ifdef SPNEGO - CFLAGS += -DHAVE_SPNEGO -endif -ifdef IPV6 - CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501 -endif -ifdef LDAPS - CFLAGS += -DHAVE_LDAP_SSL -endif -ifdef USE_LDAP_NOVELL - INCLUDES += -I"$(LDAP_SDK)/inc" - CFLAGS += -DCURL_HAS_NOVELL_LDAPSDK - DLL_LIBS += -L"$(LDAP_SDK)/lib/mscvc" -lldapsdk -lldapssl -lldapx -endif -ifdef USE_LDAP_OPENLDAP - INCLUDES += -I"$(LDAP_SDK)/include" - CFLAGS += -DCURL_HAS_OPENLDAP_LDAPSDK - DLL_LIBS += -L"$(LDAP_SDK)/lib" -lldap -llber -endif -ifndef USE_LDAP_NOVELL -ifndef USE_LDAP_OPENLDAP - DLL_LIBS += -lwldap32 -endif -endif -DLL_LIBS += -lws2_32 - -# Makefile.inc provides the CSOURCES and HHEADERS defines -include Makefile.inc - -libcurl_dll_LIBRARY = libcurl.dll -libcurl_dll_a_LIBRARY = libcurldll.a -libcurl_a_LIBRARY = libcurl.a - -libcurl_a_OBJECTS := $(patsubst %.c,%.o,$(strip $(CSOURCES))) -libcurl_a_DEPENDENCIES := $(strip $(CSOURCES) $(HHEADERS)) - -RESOURCE = libcurl.res - - -all: $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) - -$(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES) - @$(call DEL, $@) - $(AR) cru $@ $(libcurl_a_OBJECTS) - $(RANLIB) $@ - $(STRIP) $@ - -# remove the last line above to keep debug info - -$(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENCIES) - @$(call DEL, $@) - $(CC) $(LDFLAGS) -shared -o $@ \ - -Wl,--output-def,$(@:.dll=.def),--out-implib,$(libcurl_dll_a_LIBRARY) \ - $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS) - -%.o: %.c $(PROOT)/include/curl/curlbuild.h - $(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@ - -%.res: %.rc - $(RC) $(RCFLAGS) -i $< -o $@ - -clean: -ifeq "$(wildcard $(PROOT)/include/curl/curlbuild.h.dist)" "$(PROOT)/include/curl/curlbuild.h.dist" - @$(call DEL, $(PROOT)/include/curl/curlbuild.h) -endif - @$(call DEL, $(libcurl_a_OBJECTS) $(RESOURCE)) - -distclean vclean: clean - @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_LIBRARY:.dll=.def) $(libcurl_dll_a_LIBRARY)) - -$(PROOT)/include/curl/curlbuild.h: - @echo Creating $@ - @$(call COPY, $@.dist, $@) - -$(LIBCARES_PATH)/libcares.a: - $(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32 diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.netware b/build/premake/premake5/contrib/curl/lib/Makefile.netware deleted file mode 100644 index f689a36f80..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.netware +++ /dev/null @@ -1,799 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 2004 - 2015, Guenter Knauf, . -# Copyright (C) 2001 - 2015, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -################################################################# -# -## Makefile for building libcurl.nlm (NetWare version - gnu make) -## -## Use: make -f Makefile.netware -# -################################################################# - -# Edit the path below to point to the base of your Novell NDK. -ifndef NDKBASE -NDKBASE = c:/novell -endif - -# Edit the path below to point to the base of your Zlib sources. -ifndef ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 -endif - -# Edit the path below to point to the base of your OpenSSL package. -ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2a -endif - -# Edit the path below to point to the base of your LibSSH2 package. -ifndef LIBSSH2_PATH -LIBSSH2_PATH = ../../libssh2-1.5.0 -endif - -# Edit the path below to point to the base of your axTLS package. -ifndef AXTLS_PATH -AXTLS_PATH = ../../axTLS-1.2.7 -endif - -# Edit the path below to point to the base of your libidn package. -ifndef LIBIDN_PATH -LIBIDN_PATH = ../../libidn-1.18 -endif - -# Edit the path below to point to the base of your librtmp package. -ifndef LIBRTMP_PATH -LIBRTMP_PATH = ../../librtmp-2.3 -endif - -# Edit the path below to point to the base of your nghttp2 package. -ifndef NGHTTP2_PATH -NGHTTP2_PATH = ../../nghttp2-0.6.7 -endif - -# Edit the path below to point to the base of your fbopenssl package. -ifndef FBOPENSSL_PATH -FBOPENSSL_PATH = ../../fbopenssl-0.4 -endif - -# Edit the path below to point to the base of your c-ares package. -ifndef LIBCARES_PATH -LIBCARES_PATH = ../ares -endif - -ifndef INSTDIR -INSTDIR = ..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw -endif - -# Edit the vars below to change NLM target settings. -TARGET = libcurl -VERSION = $(LIBCURL_VERSION) -COPYR = Copyright (C) $(LIBCURL_COPYRIGHT_STR) -DESCR = curl libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - https://curl.haxx.se -MTSAFE = YES -STACK = 64000 -SCREEN = none -EXPORTF = $(TARGET).imp -EXPORTS = @$(EXPORTF) - -# Uncomment the next line to enable linking with POSIX semantics. -# POSIXFL = 1 - -# Edit the var below to point to your lib architecture. -ifndef LIBARCH -LIBARCH = LIBC -endif - -# must be equal to NDEBUG or DEBUG, CURLDEBUG -ifndef DB -DB = NDEBUG -endif -# Optimization: -O or debugging: -g -ifeq ($(DB),NDEBUG) - OPT = -O2 - OBJDIR = release -else - OPT = -g - OBJDIR = debug -endif - -# The following lines defines your compiler. -ifdef CWFolder - METROWERKS = $(CWFolder) -endif -ifdef METROWERKS - # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support - MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support - CC = mwccnlm -else - CC = gcc -endif -PERL = perl -# Here you can find a native Win32 binary of the original awk: -# http://www.gknw.net/development/prgtools/awk-20100523.zip -AWK = awk -CP = cp -afv -MKDIR = mkdir -# RM = rm -f -# If you want to mark the target as MTSAFE you will need a tool for -# generating the xdc data for the linker; here's a minimal tool: -# http://www.gknw.net/development/prgtools/mkxdc.zip -MPKXDC = mkxdc - -# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH)) -LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH)) - -# Include the version info retrieved from curlver.h --include $(OBJDIR)/version.inc - -# Global flags for all compilers -CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc - -ifeq ($(CC),mwccnlm) -LD = mwldnlm -LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile -AR = mwldnlm -ARFLAGS = -nostdlib -type library -o -LIBEXT = lib -#RANLIB = -CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586 -CFLAGS += -relax_pointers -#CFLAGS += -w on -ifeq ($(LIBARCH),LIBC) -ifeq ($(POSIXFL),1) - PRELUDE = $(NDK_LIBC)/imports/posixpre.o -else - PRELUDE = $(NDK_LIBC)/imports/libcpre.o -endif - CFLAGS += -align 4 -else - # PRELUDE = $(NDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK - PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" - # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" - CFLAGS += -align 1 -endif -else -LD = nlmconv -LDFLAGS = -T -AR = ar -ARFLAGS = -cq -LIBEXT = a -RANLIB = ranlib -CFLAGS += -m32 -CFLAGS += -fno-builtin -fno-strict-aliasing -ifeq ($(findstring gcc,$(CC)),gcc) -CFLAGS += -fpcc-struct-return -endif -CFLAGS += -Wall # -pedantic -ifeq ($(LIBARCH),LIBC) -ifeq ($(POSIXFL),1) - PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o -else - PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o -endif -else - PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK - # http://www.gknw.net/development/mk_nlm/gcc_pre.zip - # PRELUDE = $(NDK_ROOT)/pre/prelude.o - CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h -endif -endif - -NDK_ROOT = $(NDKBASE)/ndk -ifndef NDK_CLIB -NDK_CLIB = $(NDK_ROOT)/nwsdk -endif -ifndef NDK_LIBC -NDK_LIBC = $(NDK_ROOT)/libc -endif -ifndef NDK_LDAP -NDK_LDAP = $(NDK_ROOT)/cldapsdk/netware -endif -CURL_INC = ../include -CURL_LIB = ../lib - -INCLUDES = -I$(CURL_INC) -I$(CURL_LIB) - -ifeq ($(findstring -static,$(CFG)),-static) -LINK_STATIC = 1 -endif -ifeq ($(findstring -ares,$(CFG)),-ares) -WITH_ARES = 1 -endif -ifeq ($(findstring -rtmp,$(CFG)),-rtmp) -WITH_RTMP = 1 -WITH_SSL = 1 -WITH_ZLIB = 1 -endif -ifeq ($(findstring -ssh2,$(CFG)),-ssh2) -WITH_SSH2 = 1 -WITH_SSL = 1 -WITH_ZLIB = 1 -endif -ifeq ($(findstring -axtls,$(CFG)),-axtls) -WITH_AXTLS = 1 -WITH_SSL = -else -ifeq ($(findstring -ssl,$(CFG)),-ssl) -WITH_SSL = 1 -ifeq ($(findstring -srp,$(CFG)),-srp) -ifeq "$(wildcard $(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl/srp.h)" "$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl/srp.h" -WITH_SRP = 1 -endif -endif -endif -endif -ifeq ($(findstring -zlib,$(CFG)),-zlib) -WITH_ZLIB = 1 -endif -ifeq ($(findstring -idn,$(CFG)),-idn) -WITH_IDN = 1 -endif -ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2) -WITH_NGHTTP2 = 1 -endif -ifeq ($(findstring -ipv6,$(CFG)),-ipv6) -ENABLE_IPV6 = 1 -endif - -ifdef WITH_ARES - INCLUDES += -I$(LIBCARES_PATH) - LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT) -endif -ifdef WITH_SSH2 - INCLUDES += -I$(LIBSSH2_PATH)/include -ifdef LINK_STATIC - LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT) -else - MODULES += libssh2.nlm - IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp -endif -endif -ifdef WITH_RTMP - INCLUDES += -I$(LIBRTMP_PATH) - LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT) -endif -ifdef WITH_SSL - INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) - LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT) - LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) - IMPORTS += GetProcessSwitchCount RunningProcess - INSTDEP += ca-bundle.crt -else -ifdef WITH_AXTLS - INCLUDES += -I$(AXTLS_PATH)/inc -ifdef LINK_STATIC - LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT) -else - MODULES += libaxtls.nlm - IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp -endif - INSTDEP += ca-bundle.crt -endif -endif -ifdef WITH_ZLIB - INCLUDES += -I$(ZLIB_PATH) -ifdef LINK_STATIC - LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) -else - MODULES += libz.nlm - IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp -endif -endif -ifdef WITH_IDN - INCLUDES += -I$(LIBIDN_PATH)/include - LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT) -endif -ifdef WITH_NGHTTP2 - INCLUDES += -I$(NGHTTP2_PATH)/include - LDLIBS += $(NGHTTP2_PATH)/lib/libnghttp2.$(LIBEXT) -endif - -ifeq ($(LIBARCH),LIBC) - INCLUDES += -I$(NDK_LIBC)/include - # INCLUDES += -I$(NDK_LIBC)/include/nks - # INCLUDES += -I$(NDK_LIBC)/include/winsock - CFLAGS += -D_POSIX_SOURCE -else - INCLUDES += -I$(NDK_CLIB)/include/nlm - # INCLUDES += -I$(NDK_CLIB)/include/nlm/obsolete - # INCLUDES += -I$(NDK_CLIB)/include -endif -ifndef DISABLE_LDAP - INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc -endif -CFLAGS += $(INCLUDES) - -ifeq ($(MTSAFE),YES) - XDCOPT = -n -endif -ifeq ($(MTSAFE),NO) - XDCOPT = -u -endif -ifdef XDCOPT - XDCDATA = $(OBJDIR)/$(TARGET).xdc -endif - -ifeq ($(findstring /sh,$(SHELL)),/sh) -DL = ' -DS = / -PCT = % -#-include $(NDKBASE)/nlmconv/ncpfs.inc -else -DS = \\ -PCT = %% -endif - -# Makefile.inc provides the CSOURCES and HHEADERS defines -include Makefile.inc - -OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(notdir $(CSOURCES)))) $(OBJDIR)/nwos.o - -OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS) - -vpath %.c . vauth vtls - -all: lib nlm - -nlm: prebuild $(TARGET).nlm - -lib: prebuild $(TARGET).$(LIBEXT) - -prebuild: $(OBJDIR) $(CURL_INC)/curl/curlbuild.h $(OBJDIR)/version.inc curl_config.h - -$(OBJDIR)/%.o: %.c -# @echo Compiling $< - $(CC) $(CFLAGS) -c $< -o $@ - -$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR) - @echo Creating $@ - @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@ - -install: $(INSTDIR) all $(INSTDEP) - @$(CP) $(TARGET).nlm $(INSTDIR) - @$(CP) $(TARGET).$(LIBEXT) $(INSTDIR) - @$(CP) ../CHANGES $(INSTDIR) - @$(CP) ../COPYING $(INSTDIR) - @$(CP) ../README $(INSTDIR) - @$(CP) ../RELEASE-NOTES $(INSTDIR) -ifdef WITH_SSL - @-$(CP) ca-bundle.crt $(INSTDIR)/ca-bundle.crt -endif - -clean: - -$(RM) curl_config.h - -$(RM) -r $(OBJDIR) - -distclean vclean: clean - -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm $(TARGET).imp - -$(RM) certdata.txt ca-bundle.crt - -$(OBJDIR) $(INSTDIR): - @$(MKDIR) $@ - -$(TARGET).$(LIBEXT): $(OBJS) - @echo Creating $@ - @-$(RM) $@ - @$(AR) $(ARFLAGS) $@ $^ -ifdef RANLIB - @$(RANLIB) $@ -endif - -$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(EXPORTF) $(XDCDATA) - @echo Linking $@ - @-$(RM) $@ - @$(LD) $(LDFLAGS) $< - -$(OBJDIR)/%.xdc: Makefile.netware - @echo Creating $@ - @$(MPKXDC) $(XDCOPT) $@ - -$(OBJDIR)/%.def: Makefile.netware - @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@ - @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@ - @echo $(DL)# All your changes will be lost!!$(DL) >> $@ - @echo $(DL)#$(DL) >> $@ - @echo $(DL)copyright "$(COPYR)"$(DL) >> $@ - @echo $(DL)description "$(DESCR)"$(DL) >> $@ - @echo $(DL)version $(VERSION)$(DL) >> $@ -ifdef NLMTYPE - @echo $(DL)type $(NLMTYPE)$(DL) >> $@ -endif -ifdef STACK - @echo $(DL)stack $(STACK)$(DL) >> $@ -endif -ifdef SCREEN - @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@ -else - @echo $(DL)screenname "DEFAULT"$(DL) >> $@ -endif -ifneq ($(DB),NDEBUG) - @echo $(DL)debug$(DL) >> $@ -endif - @echo $(DL)threadname "$(TARGET)"$(DL) >> $@ -ifdef XDCDATA - @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@ -endif - @echo $(DL)flag_on 64$(DL) >> $@ -ifeq ($(LIBARCH),CLIB) - @echo $(DL)start _Prelude$(DL) >> $@ - @echo $(DL)exit _Stop$(DL) >> $@ - @echo $(DL)import @$(NDK_CLIB)/imports/clib.imp$(DL) >> $@ - @echo $(DL)import @$(NDK_CLIB)/imports/threads.imp$(DL) >> $@ - @echo $(DL)import @$(NDK_CLIB)/imports/nlmlib.imp$(DL) >> $@ - @echo $(DL)import @$(NDK_CLIB)/imports/socklib.imp$(DL) >> $@ - @echo $(DL)module clib$(DL) >> $@ -ifndef DISABLE_LDAP - @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@ - @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@ -# @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@ - @echo $(DL)module ldapsdk ldapssl$(DL) >> $@ -endif -else -ifeq ($(POSIXFL),1) - @echo $(DL)flag_on 4194304$(DL) >> $@ -endif - @echo $(DL)pseudopreemption$(DL) >> $@ -ifeq ($(findstring posixpre,$(PRELUDE)),posixpre) - @echo $(DL)start POSIX_Start$(DL) >> $@ - @echo $(DL)exit POSIX_Stop$(DL) >> $@ - @echo $(DL)check POSIX_CheckUnload$(DL) >> $@ -else - @echo $(DL)start _LibCPrelude$(DL) >> $@ - @echo $(DL)exit _LibCPostlude$(DL) >> $@ - @echo $(DL)check _LibCCheckUnload$(DL) >> $@ -endif - @echo $(DL)import @$(NDK_LIBC)/imports/libc.imp$(DL) >> $@ - @echo $(DL)import @$(NDK_LIBC)/imports/netware.imp$(DL) >> $@ - @echo $(DL)module libc$(DL) >> $@ -ifndef DISABLE_LDAP - @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@ - @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@ -# @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@ - @echo $(DL)module lldapsdk lldapssl$(DL) >> $@ -endif -endif -ifdef MODULES - @echo $(DL)module $(MODULES)$(DL) >> $@ -endif -ifdef EXPORTS - @echo $(DL)export $(EXPORTS)$(DL) >> $@ -endif -ifdef IMPORTS - @echo $(DL)import $(IMPORTS)$(DL) >> $@ -endif -ifeq ($(findstring nlmconv,$(LD)),nlmconv) - @echo $(DL)input $(PRELUDE)$(DL) >> $@ - @echo $(DL)input $(OBJL)$(DL) >> $@ -#ifdef LDLIBS -# @echo $(DL)input $(LDLIBS)$(DL) >> $@ -#endif - @echo $(DL)output $(TARGET).nlm$(DL) >> $@ -endif - -curl_config.h: Makefile.netware - @echo Creating $@ - @echo $(DL)/* $@ for NetWare target.$(DL) > $@ - @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ - @echo $(DL)** All your changes will be lost!!$(DL) >> $@ - @echo $(DL)*/$(DL) >> $@ - @echo $(DL)#ifndef NETWARE$(DL) >> $@ - @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ - @echo $(DL)#endif$(DL) >> $@ - @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@ - @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/"$(DL) >> $@ -ifeq ($(LIBARCH),CLIB) - @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@ - @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@ - @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@ - @echo $(DL)#define SIZEOF_SIZE_T 4$(DL) >> $@ - @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@ -else - @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ - @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@ - @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@ - @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@ - @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ - @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@ - @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@ - @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@ - @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@ - @echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@ - @echo $(DL)#define SIZEOF_SIZE_T 8$(DL) >> $@ - @echo $(DL)#define _LARGEFILE 1$(DL) >> $@ -ifdef ENABLE_IPV6 - @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@ - @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@ - @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@ - @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@ - @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@ - @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@ - @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@ -endif -endif - @echo $(DL)#define USE_MANUAL 1$(DL) >> $@ - @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@ - @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@ - @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@ - @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@ - @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@ - @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@ - @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@ - @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_LL 1$(DL) >> $@ - @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ - @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_RECV 1$(DL) >> $@ - @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@ - @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@ - @echo $(DL)#define HAVE_SEND 1$(DL) >> $@ - @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@ - @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@ - @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@ - @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@ - @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@ - @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@ - @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@ - @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@ - @echo $(DL)#define RETSIGTYPE void$(DL) >> $@ - @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@ - @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@ - @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@ - @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ - @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@ -ifdef DISABLE_LDAP - @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@ -else - @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@ -ifndef DISABLE_LDAPS - @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@ -endif - @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@ -endif -ifdef NW_WINSOCK - @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@ -else - @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@ -endif -ifdef WITH_ARES - @echo $(DL)#define USE_ARES 1$(DL) >> $@ -endif -ifdef WITH_ZLIB - @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@ -endif -ifdef WITH_SSL - @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@ - @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@ - @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@ - @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@ -ifdef WITH_SRP - @echo $(DL)#define HAVE_SSLEAY_SRP 1$(DL) >> $@ - @echo $(DL)#define USE_TLS_SRP 1$(DL) >> $@ -endif -ifdef WITH_SPNEGO - @echo $(DL)#define HAVE_SPNEGO 1$(DL) >> $@ -endif -else -ifdef WITH_AXTLS - @echo $(DL)#define USE_AXTLS 1$(DL) >> $@ -endif -endif -ifdef WITH_SSH2 - @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@ - @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@ -endif -ifdef WITH_IDN - @echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@ - @echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@ -endif -ifdef WITH_RTMP - @echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@ -endif -ifdef WITH_NGHTTP2 - @echo $(DL)#define USE_NGHTTP2 1$(DL) >> $@ -endif - @echo $(DL)#ifdef __GNUC__$(DL) >> $@ - @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@ - @echo $(DL)#else$(DL) >> $@ - @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@ - @echo $(DL)#endif$(DL) >> $@ -ifdef CABUNDLE - @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@ -else - @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@ -endif - -$(EXPORTF): $(CURL_INC)/curl/curl.h $(CURL_INC)/curl/easy.h $(CURL_INC)/curl/multi.h $(CURL_INC)/curl/mprintf.h - @echo Creating $@ - @$(AWK) -f ../packages/NetWare/get_exp.awk $^ > $@ - -FORCE: ; - -info: $(OBJDIR)/version.inc - @echo Configured to build $(TARGET) with these options: - @echo libarchitecture: $(LIBARCH) - @echo curl version: $(LIBCURL_VERSION_STR) - @echo compiler/linker: $(CC) / $(LD) -ifdef CABUNDLE - @echo ca-bundle path: $(CABUNDLE) -endif -ifdef WITH_SSL - @echo SSL support: enabled (OpenSSL) -else - @echo SSL support: no -endif -ifdef WITH_SRP - @echo SRP support: enabled -else - @echo SRP support: no -endif -ifdef WITH_SSH2 - @echo SSH2 support: enabled (libssh2) -else - @echo SSH2 support: no -endif -ifdef WITH_ZLIB - @echo zlib support: enabled -else - @echo zlib support: no -endif -ifdef WITH_NGHTTP2 - @echo http2 support: enabled -else - @echo http2 support: no -endif -ifdef WITH_ARES - @echo c-ares support: enabled -else - @echo c-ares support: no -endif -ifdef ENABLE_IPV6 - @echo IPv6 support: enabled -else - @echo IPv6 support: no -endif - -$(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE - @echo Creating $@ - @echo $(DL)/* $@ intended for NetWare target.$(DL) > $@ - @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ - @echo $(DL)** All your changes will be lost!!$(DL) >> $@ - @echo $(DL)*/$(DL) >> $@ - @echo $(DL)#ifndef NETWARE$(DL) >> $@ - @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ - @echo $(DL)#endif$(DL) >> $@ - @echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) >> $@ - @echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@ -ifeq ($(LIBARCH),LIBC) - @echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_SOCKLEN_T 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_OFF_T long long$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_T "lld"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "llu"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)lld"$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T LL$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU ULL$(DL) >> $@ -else - @echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_SOCKLEN_T int$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_SOCKLEN_T 4$(DL) >> $@ - @echo $(DL)#define CURL_TYPEOF_CURL_OFF_T long$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_T "ld"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "lu"$(DL) >> $@ - @echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)ld"$(DL) >> $@ - @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T L$(DL) >> $@ - @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU UL$(DL) >> $@ -endif - @echo $(DL)typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;$(DL) >> $@ - @echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@ - @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@ - -$(LIBCARES_PATH)/libcares.$(LIBEXT): - $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib - -ca-bundle.crt: mk-ca-bundle.pl - @echo Creating $@ - @-$(PERL) $< -b -n $@ - diff --git a/build/premake/premake5/contrib/curl/lib/Makefile.vxworks b/build/premake/premake5/contrib/curl/lib/Makefile.vxworks deleted file mode 100644 index 7ff197f033..0000000000 --- a/build/premake/premake5/contrib/curl/lib/Makefile.vxworks +++ /dev/null @@ -1,177 +0,0 @@ -#***************************************************************************** -# -# -#Filename : Makefile.vxworks -#Description: makefile to be used in order to compile libcurl for VxWoorks 6.3. -# -#How to use: -# 1. Adjust environment variables at the file beginning -# 2. Open the Command Prompt window and change directory ('cd') -# into the 'lib' folder -# 3. Add /bin folder to the PATH environment variable -# For example type 'set PATH=C:/embedded/cygwin/bin;%PATH%' -# 4. Build the library by typing 'make -f ./Makefile.vxworks' -# As a result the libcurl.a should be created in the 'lib' folder. -# To clean package use 'make -f ./Makefile.vxworks clean' -#Requirements: -# 1. WinXP machine -# 2. Full CYGWIN installation (open source) with GNU make version -# v3.78 or higher -# 3. WindRiver Workbench with vxWorks 6.3 (commercial) -#***************************************************************************** - -# ---------------------------------------------------------------------- -# Environment -# ---------------------------------------------------------------------- - -export WIND_HOME := C:/embedded/Workbench2.5.0.1 -export WIND_BASE := $(WIND_HOME)/vxworks-6.3 -export WIND_HOST_TYPE := x86-win32 - -# BUILD_TYE:= | (build with debugging info or optimized) -BUILD_TYPE := debug -USER_CFLAGS:= - -# directories where to seek for includes and libraries -OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8zc-vxWorks6.3/include -OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8zc-vxWorks6.3 -ZLIB_INC := D:/libraries/zlib/zlib-1.2.8-VxWorks6.3/zlib-1.2.8 -ZLIB_LIB := D:/libraries/zlib/zlib-1.2.8-VxWorks6.3/binaries/vxworks_3.1_gnu/Debug/lib -ARES_INC := -ARES_LIB := - - -# ---------------------------------------------------------------------- -# Compiler -# ---------------------------------------------------------------------- - -CC := ccppc -AR := arppc -LINK := ccppc -CFLAGS := -D__GNUC__ -D__ppc__ -msoft-float -fno-builtin -mcpu=604 -mlongcall -DCPU=PPC604 -D_GNU_TOOL -Wall -W -Winline $(USER_CFLAGS) -LDFLAGS := -nostdlib -Wl,-i -Wl,-X -INCLUDE_FLAG := -I -C_DEBUGFLAG := -g -C_OPTFLAG := -O2 -COMPILE_ONLY_FLAG := -c -OBJ_EXTENSION := .o -CC_OBJ_OUTPUT = -o $@ -ARFLAGS := -rc -LIBS_FLAG := -l -LIBS_DIRFLAG:= -L -LD_DEBUGFLAG := $(C_DEBUGFLAG) -EXECUTE_EXTENSION := .out -TOOL_CHAIN_BIN := $(WIND_HOME)/gnu/3.4.4-vxworks-6.3/$(WIND_HOST_TYPE)/bin/ - -# ---------------------------------------------------------------------- - -# Add -DINET6 if the OS kernel image was built with IPv6 support -# CFLAGS += -DINET6 - -# Set up compiler and linker flags for debug or optimization -ifeq ($(BUILD_TYPE), debug) -CFLAGS += $(C_DEBUGFLAG) -LDFLAGS += $(LD_DEBUGFLAG) -else -CFLAGS += $(C_OPTFLAG) -endif - -# ---------------------------------------------------------------------- - -# Main Makefile and possible sub-make files -MAKEFILES := Makefile.vxworks - -# List of external include directories -#----- -# IMPORTANT: include OPENSSL directories before system -# in order to prevent WindRiver OpenSSL to be used. -#----- -INCLUDE_DIRS := ../include $(OPENSSL_INC) $(ZLIB_INC) $(ARES_INC) $(WIND_BASE)/target/h $(WIND_BASE)/target/h/wrn/coreip - -# List of external libraries and their directories -LIBS_LIST := . -LIB_DIRS := . -ifneq ($(OPENSSL_LIB), ) -LIBS_LIST += crypto ssl -LIB_DIRS += $(OPENSSL_LIB) -endif -ifneq ($(ZLIB_LIB), ) -LIBS_LIST += z -LIB_DIRS += $(ZLIB_LIB) -endif -ifneq ($(ARES_LIB), ) -LIBS_LIST += ares -LIB_DIRS += $(ARES_LIB) -endif - -# Add include and library directories and libraries -CFLAGS += $(INCLUDE_DIRS:%=$(INCLUDE_FLAG)%) -LDFLAGS += $(LIB_DIRS:%=$(LIBS_DIRFLAG)%) - -# List of targets to make for libs target -LIBS_TARGET_LIST := libcurl.a - -# List of execuatble applications to make in addition to libs for all target -EXE_TARGET_LIST := - -# Support for echoing rules -# If ECHORULES variable was set (for example, using 'make' command line) -# some shell commands in the rules will be echoed -ifneq ($(strip $(findstring $(ECHORULES), yes YES 1 true TRUE)),) -_@_ := -else -_@_ := @ -endif - -# Directory to hold compilation intermediate files -TMP_DIR := tmp - -# Get sources and headers to be compiled -include Makefile.inc - -# List of headers -INCLUDE_FILES := $(HHEADERS) -INCLUDE_FILES += $(shell find ../include -name \*.h) - -# List of sources -OBJLIST := $(CSOURCES:%.c=$(TMP_DIR)/%$(OBJ_EXTENSION)) - - -# ---------------------------------------------------------------------- - -#### default rule -# It should be first rule in this file -.PHONY: default -default: libcurl.a - -#### Compiling C files -$(TMP_DIR)/%$(OBJ_EXTENSION): %.c $(MAKEFILES) - @echo Compiling C file $< $(ECHO_STDOUT) - @[ -d $(@D) ] || mkdir -p $(@D) - $(_@_) $(TOOL_CHAIN_BIN)$(CC) $(COMPILE_ONLY_FLAG) $(CFLAGS) $< $(CC_OBJ_OUTPUT) - -#### Creating library -$(LIBS_TARGET_LIST): $(INCLUDE_FILES) $(MAKEFILES) $(OBJLIST) - @echo Creating library $@ $(ECHO_STDOUT) - $(_@_) [ -d $(@D) ] || mkdir -p $(@D) - $(_@_) rm -f $@ - $(_@_) $(TOOL_CHAIN_BIN)$(AR) $(ARFLAGS) $@ $(filter %$(OBJ_EXTENSION), $^) - -#### Creating application -$(EXE_TARGET_LIST): $(INCLUDE_FILES) $(MAKEFILES) $(LIBS_TARGET_LIST) - @echo Creating application $@ - @[ -d $(@D) ] || mkdir -p $(@D) - $(_@_) $(TOOL_CHAIN_BIN)$(LINK) $(CC_OBJ_OUTPUT) $($(@)_EXE_OBJ_LIST) $(LDFLAGS) $($(@)_EXE_LIBS_NEEDED:%=$(LIBS_FLAG)%) $(LIBS_LIST:%=$(LIBS_FLAG)%) $(USER_LIBS_LIST) $(USER_LIBS_LIST) - -#### Master Targets -libs: $(LIBS_TARGET_LIST) - @echo All libs made. - -all: $(LIBS_TARGET_LIST) $(EXE_TARGET_LIST) $(INCLUDE_TARGET_LIST) - @echo All targets made. - -# Clean up -.PHONY: clean -clean: - $(_@_) rm -rf $(TMP_DIR) - @echo libcurl was cleaned. diff --git a/build/premake/premake5/contrib/curl/lib/amigaos.c b/build/premake/premake5/contrib/curl/lib/amigaos.c deleted file mode 100644 index 4f55b30e76..0000000000 --- a/build/premake/premake5/contrib/curl/lib/amigaos.c +++ /dev/null @@ -1,77 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(__AMIGA__) && !defined(__ixemul__) - -#include - -#include "amigaos.h" - -struct Library *SocketBase = NULL; -extern int errno, h_errno; - -#ifdef __libnix__ -#include -void __request(const char *msg); -#else -# define __request(msg) Printf(msg "\n\a") -#endif - -void Curl_amiga_cleanup() -{ - if(SocketBase) { - CloseLibrary(SocketBase); - SocketBase = NULL; - } -} - -bool Curl_amiga_init() -{ - if(!SocketBase) - SocketBase = OpenLibrary("bsdsocket.library", 4); - - if(!SocketBase) { - __request("No TCP/IP Stack running!"); - return FALSE; - } - - if(SocketBaseTags(SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG) &errno, - SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG) "curl", - TAG_DONE)) { - __request("SocketBaseTags ERROR"); - return FALSE; - } - -#ifndef __libnix__ - atexit(Curl_amiga_cleanup); -#endif - - return TRUE; -} - -#ifdef __libnix__ -ADD2EXIT(Curl_amiga_cleanup, -50); -#endif - -#endif /* __AMIGA__ && ! __ixemul__ */ diff --git a/build/premake/premake5/contrib/curl/lib/amigaos.h b/build/premake/premake5/contrib/curl/lib/amigaos.h deleted file mode 100644 index 02bee16107..0000000000 --- a/build/premake/premake5/contrib/curl/lib/amigaos.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef HEADER_CURL_AMIGAOS_H -#define HEADER_CURL_AMIGAOS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#if defined(__AMIGA__) && !defined(__ixemul__) - -bool Curl_amiga_init(); -void Curl_amiga_cleanup(); - -#else - -#define Curl_amiga_init() 1 -#define Curl_amiga_cleanup() Curl_nop_stmt - -#endif - -#endif /* HEADER_CURL_AMIGAOS_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/arpa_telnet.h b/build/premake/premake5/contrib/curl/lib/arpa_telnet.h deleted file mode 100644 index ec238729dd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/arpa_telnet.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef HEADER_CURL_ARPA_TELNET_H -#define HEADER_CURL_ARPA_TELNET_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifndef CURL_DISABLE_TELNET -/* - * Telnet option defines. Add more here if in need. - */ -#define CURL_TELOPT_BINARY 0 /* binary 8bit data */ -#define CURL_TELOPT_ECHO 1 /* just echo! */ -#define CURL_TELOPT_SGA 3 /* Suppress Go Ahead */ -#define CURL_TELOPT_EXOPL 255 /* EXtended OPtions List */ -#define CURL_TELOPT_TTYPE 24 /* Terminal TYPE */ -#define CURL_TELOPT_NAWS 31 /* Negotiate About Window Size */ -#define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */ - -#define CURL_TELOPT_NEW_ENVIRON 39 /* NEW ENVIRONment variables */ -#define CURL_NEW_ENV_VAR 0 -#define CURL_NEW_ENV_VALUE 1 - -/* - * The telnet options represented as strings - */ -static const char * const telnetoptions[]= -{ - "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", - "NAME", "STATUS", "TIMING MARK", "RCTE", - "NAOL", "NAOP", "NAOCRD", "NAOHTS", - "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD", - "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", - "DE TERMINAL", "SUPDUP", "SUPDUP OUTPUT", "SEND LOCATION", - "TERM TYPE", "END OF RECORD", "TACACS UID", "OUTPUT MARKING", - "TTYLOC", "3270 REGIME", "X3 PAD", "NAWS", - "TERM SPEED", "LFLOW", "LINEMODE", "XDISPLOC", - "OLD-ENVIRON", "AUTHENTICATION", "ENCRYPT", "NEW-ENVIRON" -}; - -#define CURL_TELOPT_MAXIMUM CURL_TELOPT_NEW_ENVIRON - -#define CURL_TELOPT_OK(x) ((x) <= CURL_TELOPT_MAXIMUM) -#define CURL_TELOPT(x) telnetoptions[x] - -#define CURL_NTELOPTS 40 - -/* - * First some defines - */ -#define CURL_xEOF 236 /* End Of File */ -#define CURL_SE 240 /* Sub negotiation End */ -#define CURL_NOP 241 /* No OPeration */ -#define CURL_DM 242 /* Data Mark */ -#define CURL_GA 249 /* Go Ahead, reverse the line */ -#define CURL_SB 250 /* SuBnegotiation */ -#define CURL_WILL 251 /* Our side WILL use this option */ -#define CURL_WONT 252 /* Our side WON'T use this option */ -#define CURL_DO 253 /* DO use this option! */ -#define CURL_DONT 254 /* DON'T use this option! */ -#define CURL_IAC 255 /* Interpret As Command */ - -/* - * Then those numbers represented as strings: - */ -static const char * const telnetcmds[]= -{ - "EOF", "SUSP", "ABORT", "EOR", "SE", - "NOP", "DMARK", "BRK", "IP", "AO", - "AYT", "EC", "EL", "GA", "SB", - "WILL", "WONT", "DO", "DONT", "IAC" -}; - -#define CURL_TELCMD_MINIMUM CURL_xEOF /* the first one */ -#define CURL_TELCMD_MAXIMUM CURL_IAC /* surprise, 255 is the last one! ;-) */ - -#define CURL_TELQUAL_IS 0 -#define CURL_TELQUAL_SEND 1 -#define CURL_TELQUAL_INFO 2 -#define CURL_TELQUAL_NAME 3 - -#define CURL_TELCMD_OK(x) ( ((unsigned int)(x) >= CURL_TELCMD_MINIMUM) && \ - ((unsigned int)(x) <= CURL_TELCMD_MAXIMUM) ) -#define CURL_TELCMD(x) telnetcmds[(x)-CURL_TELCMD_MINIMUM] - -#endif /* CURL_DISABLE_TELNET */ - -#endif /* HEADER_CURL_ARPA_TELNET_H */ diff --git a/build/premake/premake5/contrib/curl/lib/asyn-ares.c b/build/premake/premake5/contrib/curl/lib/asyn-ares.c deleted file mode 100644 index c038c2a3f1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/asyn-ares.c +++ /dev/null @@ -1,691 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_LIMITS_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_PROCESS_H -#include -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -/*********************************************************************** - * Only for ares-enabled builds - * And only for functions that fulfill the asynch resolver backend API - * as defined in asyn.h, nothing else belongs in this file! - **********************************************************************/ - -#ifdef CURLRES_ARES - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "multiif.h" -#include "inet_pton.h" -#include "connect.h" -#include "select.h" -#include "progress.h" - -# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \ - (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) -# define CARES_STATICLIB -# endif -# include -# include /* really old c-ares didn't include this by - itself */ - -#if ARES_VERSION >= 0x010500 -/* c-ares 1.5.0 or later, the callback proto is modified */ -#define HAVE_CARES_CALLBACK_TIMEOUTS 1 -#endif - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -struct ResolverResults { - int num_pending; /* number of ares_gethostbyname() requests */ - Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares parts */ - int last_status; -}; - -/* - * Curl_resolver_global_init() - the generic low-level asynchronous name - * resolve API. Called from curl_global_init() to initialize global resolver - * environment. Initializes ares library. - */ -int Curl_resolver_global_init(void) -{ -#ifdef CARES_HAVE_ARES_LIBRARY_INIT - if(ares_library_init(ARES_LIB_INIT_ALL)) { - return CURLE_FAILED_INIT; - } -#endif - return CURLE_OK; -} - -/* - * Curl_resolver_global_cleanup() - * - * Called from curl_global_cleanup() to destroy global resolver environment. - * Deinitializes ares library. - */ -void Curl_resolver_global_cleanup(void) -{ -#ifdef CARES_HAVE_ARES_LIBRARY_CLEANUP - ares_library_cleanup(); -#endif -} - -/* - * Curl_resolver_init() - * - * Called from curl_easy_init() -> Curl_open() to initialize resolver - * URL-state specific environment ('resolver' member of the UrlState - * structure). Fills the passed pointer by the initialized ares_channel. - */ -CURLcode Curl_resolver_init(void **resolver) -{ - int status = ares_init((ares_channel*)resolver); - if(status != ARES_SUCCESS) { - if(status == ARES_ENOMEM) - return CURLE_OUT_OF_MEMORY; - else - return CURLE_FAILED_INIT; - } - return CURLE_OK; - /* make sure that all other returns from this function should destroy the - ares channel before returning error! */ -} - -/* - * Curl_resolver_cleanup() - * - * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver - * URL-state specific environment ('resolver' member of the UrlState - * structure). Destroys the ares channel. - */ -void Curl_resolver_cleanup(void *resolver) -{ - ares_destroy((ares_channel)resolver); -} - -/* - * Curl_resolver_duphandle() - * - * Called from curl_easy_duphandle() to duplicate resolver URL-state specific - * environment ('resolver' member of the UrlState structure). Duplicates the - * 'from' ares channel and passes the resulting channel to the 'to' pointer. - */ -int Curl_resolver_duphandle(void **to, void *from) -{ - /* Clone the ares channel for the new handle */ - if(ARES_SUCCESS != ares_dup((ares_channel*)to, (ares_channel)from)) - return CURLE_FAILED_INIT; - return CURLE_OK; -} - -static void destroy_async_data(struct Curl_async *async); - -/* - * Cancel all possibly still on-going resolves for this connection. - */ -void Curl_resolver_cancel(struct connectdata *conn) -{ - if(conn->data && conn->data->state.resolver) - ares_cancel((ares_channel)conn->data->state.resolver); - destroy_async_data(&conn->async); -} - -/* - * destroy_async_data() cleans up async resolver data. - */ -static void destroy_async_data(struct Curl_async *async) -{ - free(async->hostname); - - if(async->os_specific) { - struct ResolverResults *res = (struct ResolverResults *)async->os_specific; - if(res) { - if(res->temp_ai) { - Curl_freeaddrinfo(res->temp_ai); - res->temp_ai = NULL; - } - free(res); - } - async->os_specific = NULL; - } - - async->hostname = NULL; -} - -/* - * Curl_resolver_getsock() is called when someone from the outside world - * (using curl_multi_fdset()) wants to get our fd_set setup and we're talking - * with ares. The caller must make sure that this function is only called when - * we have a working ares channel. - * - * Returns: sockets-in-use-bitmap - */ - -int Curl_resolver_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) - -{ - struct timeval maxtime; - struct timeval timebuf; - struct timeval *timeout; - long milli; - int max = ares_getsock((ares_channel)conn->data->state.resolver, - (ares_socket_t *)socks, numsocks); - - maxtime.tv_sec = CURL_TIMEOUT_RESOLVE; - maxtime.tv_usec = 0; - - timeout = ares_timeout((ares_channel)conn->data->state.resolver, &maxtime, - &timebuf); - milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000); - if(milli == 0) - milli += 10; - Curl_expire_latest(conn->data, milli); - - return max; -} - -/* - * waitperform() - * - * 1) Ask ares what sockets it currently plays with, then - * 2) wait for the timeout period to check for action on ares' sockets. - * 3) tell ares to act on all the sockets marked as "with action" - * - * return number of sockets it worked on - */ - -static int waitperform(struct connectdata *conn, int timeout_ms) -{ - struct Curl_easy *data = conn->data; - int nfds; - int bitmask; - ares_socket_t socks[ARES_GETSOCK_MAXNUM]; - struct pollfd pfd[ARES_GETSOCK_MAXNUM]; - int i; - int num = 0; - - bitmask = ares_getsock((ares_channel)data->state.resolver, socks, - ARES_GETSOCK_MAXNUM); - - for(i=0; i < ARES_GETSOCK_MAXNUM; i++) { - pfd[i].events = 0; - pfd[i].revents = 0; - if(ARES_GETSOCK_READABLE(bitmask, i)) { - pfd[i].fd = socks[i]; - pfd[i].events |= POLLRDNORM|POLLIN; - } - if(ARES_GETSOCK_WRITABLE(bitmask, i)) { - pfd[i].fd = socks[i]; - pfd[i].events |= POLLWRNORM|POLLOUT; - } - if(pfd[i].events != 0) - num++; - else - break; - } - - if(num) - nfds = Curl_poll(pfd, num, timeout_ms); - else - nfds = 0; - - if(!nfds) - /* Call ares_process() unconditonally here, even if we simply timed out - above, as otherwise the ares name resolve won't timeout! */ - ares_process_fd((ares_channel)data->state.resolver, ARES_SOCKET_BAD, - ARES_SOCKET_BAD); - else { - /* move through the descriptors and ask for processing on them */ - for(i=0; i < num; i++) - ares_process_fd((ares_channel)data->state.resolver, - pfd[i].revents & (POLLRDNORM|POLLIN)? - pfd[i].fd:ARES_SOCKET_BAD, - pfd[i].revents & (POLLWRNORM|POLLOUT)? - pfd[i].fd:ARES_SOCKET_BAD); - } - return nfds; -} - -/* - * Curl_resolver_is_resolved() is called repeatedly to check if a previous - * name resolve request has completed. It should also make sure to time-out if - * the operation seems to take too long. - * - * Returns normal CURLcode errors. - */ -CURLcode Curl_resolver_is_resolved(struct connectdata *conn, - struct Curl_dns_entry **dns) -{ - struct Curl_easy *data = conn->data; - struct ResolverResults *res = (struct ResolverResults *) - conn->async.os_specific; - CURLcode result = CURLE_OK; - - *dns = NULL; - - waitperform(conn, 0); - - if(res && !res->num_pending) { - (void)Curl_addrinfo_callback(conn, res->last_status, res->temp_ai); - /* temp_ai ownership is moved to the connection, so we need not free-up - them */ - res->temp_ai = NULL; - if(!conn->async.dns) { - failf(data, "Could not resolve: %s (%s)", - conn->async.hostname, ares_strerror(conn->async.status)); - result = conn->bits.proxy?CURLE_COULDNT_RESOLVE_PROXY: - CURLE_COULDNT_RESOLVE_HOST; - } - else - *dns = conn->async.dns; - - destroy_async_data(&conn->async); - } - - return result; -} - -/* - * Curl_resolver_wait_resolv() - * - * waits for a resolve to finish. This function should be avoided since using - * this risk getting the multi interface to "hang". - * - * If 'entry' is non-NULL, make it point to the resolved dns entry - * - * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and - * CURLE_OPERATION_TIMEDOUT if a time-out occurred. - */ -CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, - struct Curl_dns_entry **entry) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - long timeout; - struct timeval now = Curl_tvnow(); - struct Curl_dns_entry *temp_entry; - - timeout = Curl_timeleft(data, &now, TRUE); - if(!timeout) - timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */ - - /* Wait for the name resolve query to complete. */ - for(;;) { - struct timeval *tvp, tv, store; - long timediff; - int itimeout; - int timeout_ms; - - itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout; - - store.tv_sec = itimeout/1000; - store.tv_usec = (itimeout%1000)*1000; - - tvp = ares_timeout((ares_channel)data->state.resolver, &store, &tv); - - /* use the timeout period ares returned to us above if less than one - second is left, otherwise just use 1000ms to make sure the progress - callback gets called frequent enough */ - if(!tvp->tv_sec) - timeout_ms = (int)(tvp->tv_usec/1000); - else - timeout_ms = 1000; - - waitperform(conn, timeout_ms); - Curl_resolver_is_resolved(conn, &temp_entry); - - if(conn->async.done) - break; - - if(Curl_pgrsUpdate(conn)) { - result = CURLE_ABORTED_BY_CALLBACK; - timeout = -1; /* trigger the cancel below */ - } - else { - struct timeval now2 = Curl_tvnow(); - timediff = Curl_tvdiff(now2, now); /* spent time */ - timeout -= timediff?timediff:1; /* always deduct at least 1 */ - now = now2; /* for next loop */ - } - - if(timeout < 0) { - /* our timeout, so we cancel the ares operation */ - ares_cancel((ares_channel)data->state.resolver); - break; - } - } - - /* Operation complete, if the lookup was successful we now have the entry - in the cache. */ - if(entry) - *entry = conn->async.dns; - - if(result) - /* close the connection, since we can't return failure here without - cleaning up this connection properly. - TODO: remove this action from here, it is not a name resolver decision. - */ - connclose(conn, "c-ares resolve failed"); - - return result; -} - -/* Connects results to the list */ -static void compound_results(struct ResolverResults *res, - Curl_addrinfo *ai) -{ - Curl_addrinfo *ai_tail; - if(!ai) - return; - ai_tail = ai; - - while(ai_tail->ai_next) - ai_tail = ai_tail->ai_next; - - /* Add the new results to the list of old results. */ - ai_tail->ai_next = res->temp_ai; - res->temp_ai = ai; -} - -/* - * ares_query_completed_cb() is the callback that ares will call when - * the host query initiated by ares_gethostbyname() from Curl_getaddrinfo(), - * when using ares, is completed either successfully or with failure. - */ -static void query_completed_cb(void *arg, /* (struct connectdata *) */ - int status, -#ifdef HAVE_CARES_CALLBACK_TIMEOUTS - int timeouts, -#endif - struct hostent *hostent) -{ - struct connectdata *conn = (struct connectdata *)arg; - struct ResolverResults *res; - -#ifdef HAVE_CARES_CALLBACK_TIMEOUTS - (void)timeouts; /* ignored */ -#endif - - if(ARES_EDESTRUCTION == status) - /* when this ares handle is getting destroyed, the 'arg' pointer may not - be valid so only defer it when we know the 'status' says its fine! */ - return; - - res = (struct ResolverResults *)conn->async.os_specific; - res->num_pending--; - - if(CURL_ASYNC_SUCCESS == status) { - Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port); - if(ai) { - compound_results(res, ai); - } - } - /* A successful result overwrites any previous error */ - if(res->last_status != ARES_SUCCESS) - res->last_status = status; -} - -/* - * Curl_resolver_getaddrinfo() - when using ares - * - * Returns name information about the given hostname and port number. If - * successful, the 'hostent' is returned and the forth argument will point to - * memory we need to free after use. That memory *MUST* be freed with - * Curl_freeaddrinfo(), nothing else. - */ -Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) -{ - char *bufp; - struct Curl_easy *data = conn->data; - struct in_addr in; - int family = PF_INET; -#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */ - struct in6_addr in6; -#endif /* CURLRES_IPV6 */ - - *waitp = 0; /* default to synchronous response */ - - /* First check if this is an IPv4 address string */ - if(Curl_inet_pton(AF_INET, hostname, &in) > 0) { - /* This is a dotted IP address 123.123.123.123-style */ - return Curl_ip2addr(AF_INET, &in, hostname, port); - } - -#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */ - /* Otherwise, check if this is an IPv6 address string */ - if(Curl_inet_pton (AF_INET6, hostname, &in6) > 0) - /* This must be an IPv6 address literal. */ - return Curl_ip2addr(AF_INET6, &in6, hostname, port); - - switch(conn->ip_version) { - default: -#if ARES_VERSION >= 0x010601 - family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older - c-ares versions this just falls through and defaults - to PF_INET */ - break; -#endif - case CURL_IPRESOLVE_V4: - family = PF_INET; - break; - case CURL_IPRESOLVE_V6: - family = PF_INET6; - break; - } -#endif /* CURLRES_IPV6 */ - - bufp = strdup(hostname); - if(bufp) { - struct ResolverResults *res = NULL; - free(conn->async.hostname); - conn->async.hostname = bufp; - conn->async.port = port; - conn->async.done = FALSE; /* not done */ - conn->async.status = 0; /* clear */ - conn->async.dns = NULL; /* clear */ - res = calloc(sizeof(struct ResolverResults), 1); - if(!res) { - free(conn->async.hostname); - conn->async.hostname = NULL; - return NULL; - } - conn->async.os_specific = res; - - /* initial status - failed */ - res->last_status = ARES_ENOTFOUND; -#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */ - if(family == PF_UNSPEC) { - if(Curl_ipv6works()) { - res->num_pending = 2; - - /* areschannel is already setup in the Curl_open() function */ - ares_gethostbyname((ares_channel)data->state.resolver, hostname, - PF_INET, query_completed_cb, conn); - ares_gethostbyname((ares_channel)data->state.resolver, hostname, - PF_INET6, query_completed_cb, conn); - } - else { - res->num_pending = 1; - - /* areschannel is already setup in the Curl_open() function */ - ares_gethostbyname((ares_channel)data->state.resolver, hostname, - PF_INET, query_completed_cb, conn); - } - } - else -#endif /* CURLRES_IPV6 */ - { - res->num_pending = 1; - - /* areschannel is already setup in the Curl_open() function */ - ares_gethostbyname((ares_channel)data->state.resolver, hostname, family, - query_completed_cb, conn); - } - - *waitp = 1; /* expect asynchronous response */ - } - return NULL; /* no struct yet */ -} - -CURLcode Curl_set_dns_servers(struct Curl_easy *data, - char *servers) -{ - CURLcode result = CURLE_NOT_BUILT_IN; - int ares_result; - - /* If server is NULL or empty, this would purge all DNS servers - * from ares library, which will cause any and all queries to fail. - * So, just return OK if none are configured and don't actually make - * any changes to c-ares. This lets c-ares use it's defaults, which - * it gets from the OS (for instance from /etc/resolv.conf on Linux). - */ - if(!(servers && servers[0])) - return CURLE_OK; - -#if (ARES_VERSION >= 0x010704) - ares_result = ares_set_servers_csv(data->state.resolver, servers); - switch(ares_result) { - case ARES_SUCCESS: - result = CURLE_OK; - break; - case ARES_ENOMEM: - result = CURLE_OUT_OF_MEMORY; - break; - case ARES_ENOTINITIALIZED: - case ARES_ENODATA: - case ARES_EBADSTR: - default: - result = CURLE_BAD_FUNCTION_ARGUMENT; - break; - } -#else /* too old c-ares version! */ - (void)data; - (void)(ares_result); -#endif - return result; -} - -CURLcode Curl_set_dns_interface(struct Curl_easy *data, - const char *interf) -{ -#if (ARES_VERSION >= 0x010704) - if(!interf) - interf = ""; - - ares_set_local_dev((ares_channel)data->state.resolver, interf); - - return CURLE_OK; -#else /* c-ares version too old! */ - (void)data; - (void)interf; - return CURLE_NOT_BUILT_IN; -#endif -} - -CURLcode Curl_set_dns_local_ip4(struct Curl_easy *data, - const char *local_ip4) -{ -#if (ARES_VERSION >= 0x010704) - struct in_addr a4; - - if((!local_ip4) || (local_ip4[0] == 0)) { - a4.s_addr = 0; /* disabled: do not bind to a specific address */ - } - else { - if(Curl_inet_pton(AF_INET, local_ip4, &a4) != 1) { - return CURLE_BAD_FUNCTION_ARGUMENT; - } - } - - ares_set_local_ip4((ares_channel)data->state.resolver, ntohl(a4.s_addr)); - - return CURLE_OK; -#else /* c-ares version too old! */ - (void)data; - (void)local_ip4; - return CURLE_NOT_BUILT_IN; -#endif -} - -CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data, - const char *local_ip6) -{ -#if (ARES_VERSION >= 0x010704) && defined(ENABLE_IPV6) - unsigned char a6[INET6_ADDRSTRLEN]; - - if((!local_ip6) || (local_ip6[0] == 0)) { - /* disabled: do not bind to a specific address */ - memset(a6, 0, sizeof(a6)); - } - else { - if(Curl_inet_pton(AF_INET6, local_ip6, a6) != 1) { - return CURLE_BAD_FUNCTION_ARGUMENT; - } - } - - ares_set_local_ip6((ares_channel)data->state.resolver, a6); - - return CURLE_OK; -#else /* c-ares version too old! */ - (void)data; - (void)local_ip6; - return CURLE_NOT_BUILT_IN; -#endif -} -#endif /* CURLRES_ARES */ diff --git a/build/premake/premake5/contrib/curl/lib/asyn-thread.c b/build/premake/premake5/contrib/curl/lib/asyn-thread.c deleted file mode 100644 index 26a15b110c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/asyn-thread.c +++ /dev/null @@ -1,707 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#if defined(USE_THREADS_POSIX) -# ifdef HAVE_PTHREAD_H -# include -# endif -#elif defined(USE_THREADS_WIN32) -# ifdef HAVE_PROCESS_H -# include -# endif -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -#ifdef HAVE_GETADDRINFO -# define RESOLVER_ENOMEM EAI_MEMORY -#else -# define RESOLVER_ENOMEM ENOMEM -#endif - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "multiif.h" -#include "inet_pton.h" -#include "inet_ntop.h" -#include "curl_threads.h" -#include "connect.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/*********************************************************************** - * Only for threaded name resolves builds - **********************************************************************/ -#ifdef CURLRES_THREADED - -/* - * Curl_resolver_global_init() - * Called from curl_global_init() to initialize global resolver environment. - * Does nothing here. - */ -int Curl_resolver_global_init(void) -{ - return CURLE_OK; -} - -/* - * Curl_resolver_global_cleanup() - * Called from curl_global_cleanup() to destroy global resolver environment. - * Does nothing here. - */ -void Curl_resolver_global_cleanup(void) -{ -} - -/* - * Curl_resolver_init() - * Called from curl_easy_init() -> Curl_open() to initialize resolver - * URL-state specific environment ('resolver' member of the UrlState - * structure). Does nothing here. - */ -CURLcode Curl_resolver_init(void **resolver) -{ - (void)resolver; - return CURLE_OK; -} - -/* - * Curl_resolver_cleanup() - * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver - * URL-state specific environment ('resolver' member of the UrlState - * structure). Does nothing here. - */ -void Curl_resolver_cleanup(void *resolver) -{ - (void)resolver; -} - -/* - * Curl_resolver_duphandle() - * Called from curl_easy_duphandle() to duplicate resolver URL state-specific - * environment ('resolver' member of the UrlState structure). Does nothing - * here. - */ -int Curl_resolver_duphandle(void **to, void *from) -{ - (void)to; - (void)from; - return CURLE_OK; -} - -static void destroy_async_data(struct Curl_async *); - -/* - * Cancel all possibly still on-going resolves for this connection. - */ -void Curl_resolver_cancel(struct connectdata *conn) -{ - destroy_async_data(&conn->async); -} - -/* This function is used to init a threaded resolve */ -static bool init_resolve_thread(struct connectdata *conn, - const char *hostname, int port, - const struct addrinfo *hints); - - -/* Data for synchronization between resolver thread and its parent */ -struct thread_sync_data { - curl_mutex_t * mtx; - int done; - - char *hostname; /* hostname to resolve, Curl_async.hostname - duplicate */ - int port; - int sock_error; - Curl_addrinfo *res; -#ifdef HAVE_GETADDRINFO - struct addrinfo hints; -#endif - struct thread_data *td; /* for thread-self cleanup */ -}; - -struct thread_data { - curl_thread_t thread_hnd; - unsigned int poll_interval; - time_t interval_end; - struct thread_sync_data tsd; -}; - -static struct thread_sync_data *conn_thread_sync_data(struct connectdata *conn) -{ - return &(((struct thread_data *)conn->async.os_specific)->tsd); -} - -#define CONN_THREAD_SYNC_DATA(conn) &(((conn)->async.os_specific)->tsd); - -/* Destroy resolver thread synchronization data */ -static -void destroy_thread_sync_data(struct thread_sync_data * tsd) -{ - if(tsd->mtx) { - Curl_mutex_destroy(tsd->mtx); - free(tsd->mtx); - } - - free(tsd->hostname); - - if(tsd->res) - Curl_freeaddrinfo(tsd->res); - - memset(tsd, 0, sizeof(*tsd)); -} - -/* Initialize resolver thread synchronization data */ -static -int init_thread_sync_data(struct thread_data * td, - const char *hostname, - int port, - const struct addrinfo *hints) -{ - struct thread_sync_data *tsd = &td->tsd; - - memset(tsd, 0, sizeof(*tsd)); - - tsd->td = td; - tsd->port = port; -#ifdef HAVE_GETADDRINFO - DEBUGASSERT(hints); - tsd->hints = *hints; -#else - (void) hints; -#endif - - tsd->mtx = malloc(sizeof(curl_mutex_t)); - if(tsd->mtx == NULL) - goto err_exit; - - Curl_mutex_init(tsd->mtx); - - tsd->sock_error = CURL_ASYNC_SUCCESS; - - /* Copying hostname string because original can be destroyed by parent - * thread during gethostbyname execution. - */ - tsd->hostname = strdup(hostname); - if(!tsd->hostname) - goto err_exit; - - return 1; - - err_exit: - /* Memory allocation failed */ - destroy_thread_sync_data(tsd); - return 0; -} - -static int getaddrinfo_complete(struct connectdata *conn) -{ - struct thread_sync_data *tsd = conn_thread_sync_data(conn); - int rc; - - rc = Curl_addrinfo_callback(conn, tsd->sock_error, tsd->res); - /* The tsd->res structure has been copied to async.dns and perhaps the DNS - cache. Set our copy to NULL so destroy_thread_sync_data doesn't free it. - */ - tsd->res = NULL; - - return rc; -} - - -#ifdef HAVE_GETADDRINFO - -/* - * getaddrinfo_thread() resolves a name and then exits. - * - * For builds without ARES, but with ENABLE_IPV6, create a resolver thread - * and wait on it. - */ -static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg) -{ - struct thread_sync_data *tsd = (struct thread_sync_data*)arg; - struct thread_data *td = tsd->td; - char service[12]; - int rc; - - snprintf(service, sizeof(service), "%d", tsd->port); - - rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res); - - if(rc != 0) { - tsd->sock_error = SOCKERRNO?SOCKERRNO:rc; - if(tsd->sock_error == 0) - tsd->sock_error = RESOLVER_ENOMEM; - } - else { - Curl_addrinfo_set_port(tsd->res, tsd->port); - } - - Curl_mutex_acquire(tsd->mtx); - if(tsd->done) { - /* too late, gotta clean up the mess */ - Curl_mutex_release(tsd->mtx); - destroy_thread_sync_data(tsd); - free(td); - } - else { - tsd->done = 1; - Curl_mutex_release(tsd->mtx); - } - - return 0; -} - -#else /* HAVE_GETADDRINFO */ - -/* - * gethostbyname_thread() resolves a name and then exits. - */ -static unsigned int CURL_STDCALL gethostbyname_thread(void *arg) -{ - struct thread_sync_data *tsd = (struct thread_sync_data *)arg; - struct thread_data *td = tsd->td; - - tsd->res = Curl_ipv4_resolve_r(tsd->hostname, tsd->port); - - if(!tsd->res) { - tsd->sock_error = SOCKERRNO; - if(tsd->sock_error == 0) - tsd->sock_error = RESOLVER_ENOMEM; - } - - Curl_mutex_acquire(tsd->mtx); - if(tsd->done) { - /* too late, gotta clean up the mess */ - Curl_mutex_release(tsd->mtx); - destroy_thread_sync_data(tsd); - free(td); - } - else { - tsd->done = 1; - Curl_mutex_release(tsd->mtx); - } - - return 0; -} - -#endif /* HAVE_GETADDRINFO */ - -/* - * destroy_async_data() cleans up async resolver data and thread handle. - */ -static void destroy_async_data(struct Curl_async *async) -{ - if(async->os_specific) { - struct thread_data *td = (struct thread_data*) async->os_specific; - int done; - - /* - * if the thread is still blocking in the resolve syscall, detach it and - * let the thread do the cleanup... - */ - Curl_mutex_acquire(td->tsd.mtx); - done = td->tsd.done; - td->tsd.done = 1; - Curl_mutex_release(td->tsd.mtx); - - if(!done) { - Curl_thread_destroy(td->thread_hnd); - } - else { - if(td->thread_hnd != curl_thread_t_null) - Curl_thread_join(&td->thread_hnd); - - destroy_thread_sync_data(&td->tsd); - - free(async->os_specific); - } - } - async->os_specific = NULL; - - free(async->hostname); - async->hostname = NULL; -} - -/* - * init_resolve_thread() starts a new thread that performs the actual - * resolve. This function returns before the resolve is done. - * - * Returns FALSE in case of failure, otherwise TRUE. - */ -static bool init_resolve_thread(struct connectdata *conn, - const char *hostname, int port, - const struct addrinfo *hints) -{ - struct thread_data *td = calloc(1, sizeof(struct thread_data)); - int err = RESOLVER_ENOMEM; - - conn->async.os_specific = (void *)td; - if(!td) - goto err_exit; - - conn->async.port = port; - conn->async.done = FALSE; - conn->async.status = 0; - conn->async.dns = NULL; - td->thread_hnd = curl_thread_t_null; - - if(!init_thread_sync_data(td, hostname, port, hints)) - goto err_exit; - - free(conn->async.hostname); - conn->async.hostname = strdup(hostname); - if(!conn->async.hostname) - goto err_exit; - -#ifdef HAVE_GETADDRINFO - td->thread_hnd = Curl_thread_create(getaddrinfo_thread, &td->tsd); -#else - td->thread_hnd = Curl_thread_create(gethostbyname_thread, &td->tsd); -#endif - - if(!td->thread_hnd) { -#ifndef _WIN32_WCE - err = errno; -#endif - goto err_exit; - } - - return TRUE; - - err_exit: - destroy_async_data(&conn->async); - - SET_ERRNO(err); - - return FALSE; -} - -/* - * resolver_error() calls failf() with the appropriate message after a resolve - * error - */ - -static CURLcode resolver_error(struct connectdata *conn) -{ - const char *host_or_proxy; - CURLcode result; - - if(conn->bits.httpproxy) { - host_or_proxy = "proxy"; - result = CURLE_COULDNT_RESOLVE_PROXY; - } - else { - host_or_proxy = "host"; - result = CURLE_COULDNT_RESOLVE_HOST; - } - - failf(conn->data, "Could not resolve %s: %s", host_or_proxy, - conn->async.hostname); - - return result; -} - -/* - * Curl_resolver_wait_resolv() - * - * waits for a resolve to finish. This function should be avoided since using - * this risk getting the multi interface to "hang". - * - * If 'entry' is non-NULL, make it point to the resolved dns entry - * - * This is the version for resolves-in-a-thread. - */ -CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, - struct Curl_dns_entry **entry) -{ - struct thread_data *td = (struct thread_data*) conn->async.os_specific; - CURLcode result = CURLE_OK; - - DEBUGASSERT(conn && td); - - /* wait for the thread to resolve the name */ - if(Curl_thread_join(&td->thread_hnd)) - result = getaddrinfo_complete(conn); - else - DEBUGASSERT(0); - - conn->async.done = TRUE; - - if(entry) - *entry = conn->async.dns; - - if(!conn->async.dns) - /* a name was not resolved, report error */ - result = resolver_error(conn); - - destroy_async_data(&conn->async); - - if(!conn->async.dns) - connclose(conn, "asynch resolve failed"); - - return result; -} - -/* - * Curl_resolver_is_resolved() is called repeatedly to check if a previous - * name resolve request has completed. It should also make sure to time-out if - * the operation seems to take too long. - */ -CURLcode Curl_resolver_is_resolved(struct connectdata *conn, - struct Curl_dns_entry **entry) -{ - struct Curl_easy *data = conn->data; - struct thread_data *td = (struct thread_data*) conn->async.os_specific; - int done = 0; - - *entry = NULL; - - if(!td) { - DEBUGASSERT(td); - return CURLE_COULDNT_RESOLVE_HOST; - } - - Curl_mutex_acquire(td->tsd.mtx); - done = td->tsd.done; - Curl_mutex_release(td->tsd.mtx); - - if(done) { - getaddrinfo_complete(conn); - - if(!conn->async.dns) { - CURLcode result = resolver_error(conn); - destroy_async_data(&conn->async); - return result; - } - destroy_async_data(&conn->async); - *entry = conn->async.dns; - } - else { - /* poll for name lookup done with exponential backoff up to 250ms */ - time_t elapsed = Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle); - if(elapsed < 0) - elapsed = 0; - - if(td->poll_interval == 0) - /* Start at 1ms poll interval */ - td->poll_interval = 1; - else if(elapsed >= td->interval_end) - /* Back-off exponentially if last interval expired */ - td->poll_interval *= 2; - - if(td->poll_interval > 250) - td->poll_interval = 250; - - td->interval_end = elapsed + td->poll_interval; - Curl_expire(conn->data, td->poll_interval); - } - - return CURLE_OK; -} - -int Curl_resolver_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - (void)conn; - (void)socks; - (void)numsocks; - return 0; -} - -#ifndef HAVE_GETADDRINFO -/* - * Curl_getaddrinfo() - for platforms without getaddrinfo - */ -Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) -{ - struct in_addr in; - - *waitp = 0; /* default to synchronous response */ - - if(Curl_inet_pton(AF_INET, hostname, &in) > 0) - /* This is a dotted IP address 123.123.123.123-style */ - return Curl_ip2addr(AF_INET, &in, hostname, port); - - /* fire up a new resolver thread! */ - if(init_resolve_thread(conn, hostname, port, NULL)) { - *waitp = 1; /* expect asynchronous response */ - return NULL; - } - - /* fall-back to blocking version */ - return Curl_ipv4_resolve_r(hostname, port); -} - -#else /* !HAVE_GETADDRINFO */ - -/* - * Curl_resolver_getaddrinfo() - for getaddrinfo - */ -Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) -{ - struct addrinfo hints; - struct in_addr in; - Curl_addrinfo *res; - int error; - char sbuf[12]; - int pf = PF_INET; -#ifdef CURLRES_IPV6 - struct in6_addr in6; -#endif /* CURLRES_IPV6 */ - - *waitp = 0; /* default to synchronous response */ - -#ifndef USE_RESOLVE_ON_IPS - /* First check if this is an IPv4 address string */ - if(Curl_inet_pton(AF_INET, hostname, &in) > 0) - /* This is a dotted IP address 123.123.123.123-style */ - return Curl_ip2addr(AF_INET, &in, hostname, port); - -#ifdef CURLRES_IPV6 - /* check if this is an IPv6 address string */ - if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0) - /* This is an IPv6 address literal */ - return Curl_ip2addr(AF_INET6, &in6, hostname, port); -#endif /* CURLRES_IPV6 */ -#endif /* !USE_RESOLVE_ON_IPS */ - -#ifdef CURLRES_IPV6 - /* - * Check if a limited name resolve has been requested. - */ - switch(conn->ip_version) { - case CURL_IPRESOLVE_V4: - pf = PF_INET; - break; - case CURL_IPRESOLVE_V6: - pf = PF_INET6; - break; - default: - pf = PF_UNSPEC; - break; - } - - if((pf != PF_INET) && !Curl_ipv6works()) - /* The stack seems to be a non-IPv6 one */ - pf = PF_INET; -#endif /* CURLRES_IPV6 */ - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = pf; - hints.ai_socktype = conn->socktype; - - snprintf(sbuf, sizeof(sbuf), "%d", port); - - /* fire up a new resolver thread! */ - if(init_resolve_thread(conn, hostname, port, &hints)) { - *waitp = 1; /* expect asynchronous response */ - return NULL; - } - - /* fall-back to blocking version */ - infof(conn->data, "init_resolve_thread() failed for %s; %s\n", - hostname, Curl_strerror(conn, ERRNO)); - - error = Curl_getaddrinfo_ex(hostname, sbuf, &hints, &res); - if(error) { - infof(conn->data, "getaddrinfo() failed for %s:%d; %s\n", - hostname, port, Curl_strerror(conn, SOCKERRNO)); - return NULL; - } - else { - Curl_addrinfo_set_port(res, port); - } - - return res; -} - -#endif /* !HAVE_GETADDRINFO */ - -CURLcode Curl_set_dns_servers(struct Curl_easy *data, - char *servers) -{ - (void)data; - (void)servers; - return CURLE_NOT_BUILT_IN; - -} - -CURLcode Curl_set_dns_interface(struct Curl_easy *data, - const char *interf) -{ - (void)data; - (void)interf; - return CURLE_NOT_BUILT_IN; -} - -CURLcode Curl_set_dns_local_ip4(struct Curl_easy *data, - const char *local_ip4) -{ - (void)data; - (void)local_ip4; - return CURLE_NOT_BUILT_IN; -} - -CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data, - const char *local_ip6) -{ - (void)data; - (void)local_ip6; - return CURLE_NOT_BUILT_IN; -} - -#endif /* CURLRES_THREADED */ diff --git a/build/premake/premake5/contrib/curl/lib/asyn.h b/build/premake/premake5/contrib/curl/lib/asyn.h deleted file mode 100644 index 3adc3664a2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/asyn.h +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef HEADER_CURL_ASYN_H -#define HEADER_CURL_ASYN_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" -#include "curl_addrinfo.h" - -struct addrinfo; -struct hostent; -struct Curl_easy; -struct connectdata; -struct Curl_dns_entry; - -/* - * This header defines all functions in the internal asynch resolver interface. - * All asynch resolvers need to provide these functions. - * asyn-ares.c and asyn-thread.c are the current implementations of asynch - * resolver backends. - */ - -/* - * Curl_resolver_global_init() - * - * Called from curl_global_init() to initialize global resolver environment. - * Returning anything else than CURLE_OK fails curl_global_init(). - */ -int Curl_resolver_global_init(void); - -/* - * Curl_resolver_global_cleanup() - * Called from curl_global_cleanup() to destroy global resolver environment. - */ -void Curl_resolver_global_cleanup(void); - -/* - * Curl_resolver_init() - * Called from curl_easy_init() -> Curl_open() to initialize resolver - * URL-state specific environment ('resolver' member of the UrlState - * structure). Should fill the passed pointer by the initialized handler. - * Returning anything else than CURLE_OK fails curl_easy_init() with the - * correspondent code. - */ -CURLcode Curl_resolver_init(void **resolver); - -/* - * Curl_resolver_cleanup() - * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver - * URL-state specific environment ('resolver' member of the UrlState - * structure). Should destroy the handler and free all resources connected to - * it. - */ -void Curl_resolver_cleanup(void *resolver); - -/* - * Curl_resolver_duphandle() - * Called from curl_easy_duphandle() to duplicate resolver URL-state specific - * environment ('resolver' member of the UrlState structure). Should - * duplicate the 'from' handle and pass the resulting handle to the 'to' - * pointer. Returning anything else than CURLE_OK causes failed - * curl_easy_duphandle() call. - */ -int Curl_resolver_duphandle(void **to, void *from); - -/* - * Curl_resolver_cancel(). - * - * It is called from inside other functions to cancel currently performing - * resolver request. Should also free any temporary resources allocated to - * perform a request. - */ -void Curl_resolver_cancel(struct connectdata *conn); - -/* Curl_resolver_getsock() - * - * This function is called from the multi_getsock() function. 'sock' is a - * pointer to an array to hold the file descriptors, with 'numsock' being the - * size of that array (in number of entries). This function is supposed to - * return bitmask indicating what file descriptors (referring to array indexes - * in the 'sock' array) to wait for, read/write. - */ -int Curl_resolver_getsock(struct connectdata *conn, curl_socket_t *sock, - int numsocks); - -/* - * Curl_resolver_is_resolved() - * - * Called repeatedly to check if a previous name resolve request has - * completed. It should also make sure to time-out if the operation seems to - * take too long. - * - * Returns normal CURLcode errors. - */ -CURLcode Curl_resolver_is_resolved(struct connectdata *conn, - struct Curl_dns_entry **dns); - -/* - * Curl_resolver_wait_resolv() - * - * waits for a resolve to finish. This function should be avoided since using - * this risk getting the multi interface to "hang". - * - * If 'entry' is non-NULL, make it point to the resolved dns entry - * - * Returns CURLE_COULDNT_RESOLVE_HOST if the host was not resolved, and - * CURLE_OPERATION_TIMEDOUT if a time-out occurred. - - */ -CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, - struct Curl_dns_entry **dnsentry); - -/* - * Curl_resolver_getaddrinfo() - when using this resolver - * - * Returns name information about the given hostname and port number. If - * successful, the 'hostent' is returned and the forth argument will point to - * memory we need to free after use. That memory *MUST* be freed with - * Curl_freeaddrinfo(), nothing else. - * - * Each resolver backend must of course make sure to return data in the - * correct format to comply with this. - */ -Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp); - -#ifndef CURLRES_ASYNCH -/* convert these functions if an asynch resolver isn't used */ -#define Curl_resolver_cancel(x) Curl_nop_stmt -#define Curl_resolver_is_resolved(x,y) CURLE_COULDNT_RESOLVE_HOST -#define Curl_resolver_wait_resolv(x,y) CURLE_COULDNT_RESOLVE_HOST -#define Curl_resolver_getsock(x,y,z) 0 -#define Curl_resolver_duphandle(x,y) CURLE_OK -#define Curl_resolver_init(x) CURLE_OK -#define Curl_resolver_global_init() CURLE_OK -#define Curl_resolver_global_cleanup() Curl_nop_stmt -#define Curl_resolver_cleanup(x) Curl_nop_stmt -#endif - -#ifdef CURLRES_ASYNCH -#define Curl_resolver_asynch() 1 -#else -#define Curl_resolver_asynch() 0 -#endif - - -/********** end of generic resolver interface functions *****************/ -#endif /* HEADER_CURL_ASYN_H */ diff --git a/build/premake/premake5/contrib/curl/lib/base64.c b/build/premake/premake5/contrib/curl/lib/base64.c deleted file mode 100644 index 204a2273d1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/base64.c +++ /dev/null @@ -1,320 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* Base64 encoding/decoding */ - -#include "curl_setup.h" -#include "urldata.h" /* for the Curl_easy definition */ -#include "warnless.h" -#include "curl_base64.h" -#include "non-ascii.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* ---- Base64 Encoding/Decoding Table --- */ -static const char base64[]= - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -/* The Base 64 encoding with an URL and filename safe alphabet, RFC 4648 - section 5 */ -static const char base64url[]= - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - -static size_t decodeQuantum(unsigned char *dest, const char *src) -{ - size_t padding = 0; - const char *s, *p; - unsigned long i, x = 0; - - for(i = 0, s = src; i < 4; i++, s++) { - unsigned long v = 0; - - if(*s == '=') { - x = (x << 6); - padding++; - } - else { - p = base64; - - while(*p && (*p != *s)) { - v++; - p++; - } - - if(*p == *s) - x = (x << 6) + v; - else - return 0; - } - } - - if(padding < 1) - dest[2] = curlx_ultouc(x & 0xFFUL); - - x >>= 8; - if(padding < 2) - dest[1] = curlx_ultouc(x & 0xFFUL); - - x >>= 8; - dest[0] = curlx_ultouc(x & 0xFFUL); - - return 3 - padding; -} - -/* - * Curl_base64_decode() - * - * Given a base64 NUL-terminated string at src, decode it and return a - * pointer in *outptr to a newly allocated memory area holding decoded - * data. Size of decoded data is returned in variable pointed by outlen. - * - * Returns CURLE_OK on success, otherwise specific error code. Function - * output shall not be considered valid unless CURLE_OK is returned. - * - * When decoded data length is 0, returns NULL in *outptr. - * - * @unittest: 1302 - */ -CURLcode Curl_base64_decode(const char *src, - unsigned char **outptr, size_t *outlen) -{ - size_t srclen = 0; - size_t length = 0; - size_t padding = 0; - size_t i; - size_t numQuantums; - size_t rawlen = 0; - unsigned char *pos; - unsigned char *newstr; - - *outptr = NULL; - *outlen = 0; - srclen = strlen(src); - - /* Check the length of the input string is valid */ - if(!srclen || srclen % 4) - return CURLE_BAD_CONTENT_ENCODING; - - /* Find the position of any = padding characters */ - while((src[length] != '=') && src[length]) - length++; - - /* A maximum of two = padding characters is allowed */ - if(src[length] == '=') { - padding++; - if(src[length + 1] == '=') - padding++; - } - - /* Check the = padding characters weren't part way through the input */ - if(length + padding != srclen) - return CURLE_BAD_CONTENT_ENCODING; - - /* Calculate the number of quantums */ - numQuantums = srclen / 4; - - /* Calculate the size of the decoded string */ - rawlen = (numQuantums * 3) - padding; - - /* Allocate our buffer including room for a zero terminator */ - newstr = malloc(rawlen + 1); - if(!newstr) - return CURLE_OUT_OF_MEMORY; - - pos = newstr; - - /* Decode the quantums */ - for(i = 0; i < numQuantums; i++) { - size_t result = decodeQuantum(pos, src); - if(!result) { - free(newstr); - - return CURLE_BAD_CONTENT_ENCODING; - } - - pos += result; - src += 4; - } - - /* Zero terminate */ - *pos = '\0'; - - /* Return the decoded data */ - *outptr = newstr; - *outlen = rawlen; - - return CURLE_OK; -} - -static CURLcode base64_encode(const char *table64, - struct Curl_easy *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen) -{ - CURLcode result; - unsigned char ibuf[3]; - unsigned char obuf[4]; - int i; - int inputparts; - char *output; - char *base64data; - char *convbuf = NULL; - - const char *indata = inputbuff; - - *outptr = NULL; - *outlen = 0; - - if(!insize) - insize = strlen(indata); - -#if SIZEOF_SIZE_T == 4 - if(insize > UINT_MAX/4) - return CURLE_OUT_OF_MEMORY; -#endif - - base64data = output = malloc(insize * 4 / 3 + 4); - if(!output) - return CURLE_OUT_OF_MEMORY; - - /* - * The base64 data needs to be created using the network encoding - * not the host encoding. And we can't change the actual input - * so we copy it to a buffer, translate it, and use that instead. - */ - result = Curl_convert_clone(data, indata, insize, &convbuf); - if(result) { - free(output); - return result; - } - - if(convbuf) - indata = (char *)convbuf; - - while(insize > 0) { - for(i = inputparts = 0; i < 3; i++) { - if(insize > 0) { - inputparts++; - ibuf[i] = (unsigned char) *indata; - indata++; - insize--; - } - else - ibuf[i] = 0; - } - - obuf[0] = (unsigned char) ((ibuf[0] & 0xFC) >> 2); - obuf[1] = (unsigned char) (((ibuf[0] & 0x03) << 4) | \ - ((ibuf[1] & 0xF0) >> 4)); - obuf[2] = (unsigned char) (((ibuf[1] & 0x0F) << 2) | \ - ((ibuf[2] & 0xC0) >> 6)); - obuf[3] = (unsigned char) (ibuf[2] & 0x3F); - - switch(inputparts) { - case 1: /* only one byte read */ - snprintf(output, 5, "%c%c==", - table64[obuf[0]], - table64[obuf[1]]); - break; - - case 2: /* two bytes read */ - snprintf(output, 5, "%c%c%c=", - table64[obuf[0]], - table64[obuf[1]], - table64[obuf[2]]); - break; - - default: - snprintf(output, 5, "%c%c%c%c", - table64[obuf[0]], - table64[obuf[1]], - table64[obuf[2]], - table64[obuf[3]]); - break; - } - output += 4; - } - - /* Zero terminate */ - *output = '\0'; - - /* Return the pointer to the new data (allocated memory) */ - *outptr = base64data; - - free(convbuf); - - /* Return the length of the new data */ - *outlen = strlen(base64data); - - return CURLE_OK; -} - -/* - * Curl_base64_encode() - * - * Given a pointer to an input buffer and an input size, encode it and - * return a pointer in *outptr to a newly allocated memory area holding - * encoded data. Size of encoded data is returned in variable pointed by - * outlen. - * - * Input length of 0 indicates input buffer holds a NUL-terminated string. - * - * Returns CURLE_OK on success, otherwise specific error code. Function - * output shall not be considered valid unless CURLE_OK is returned. - * - * When encoded data length is 0, returns NULL in *outptr. - * - * @unittest: 1302 - */ -CURLcode Curl_base64_encode(struct Curl_easy *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen) -{ - return base64_encode(base64, data, inputbuff, insize, outptr, outlen); -} - -/* - * Curl_base64url_encode() - * - * Given a pointer to an input buffer and an input size, encode it and - * return a pointer in *outptr to a newly allocated memory area holding - * encoded data. Size of encoded data is returned in variable pointed by - * outlen. - * - * Input length of 0 indicates input buffer holds a NUL-terminated string. - * - * Returns CURLE_OK on success, otherwise specific error code. Function - * output shall not be considered valid unless CURLE_OK is returned. - * - * When encoded data length is 0, returns NULL in *outptr. - * - * @unittest: 1302 - */ -CURLcode Curl_base64url_encode(struct Curl_easy *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen) -{ - return base64_encode(base64url, data, inputbuff, insize, outptr, outlen); -} diff --git a/build/premake/premake5/contrib/curl/lib/checksrc.pl b/build/premake/premake5/contrib/curl/lib/checksrc.pl deleted file mode 100644 index 7857bbfc78..0000000000 --- a/build/premake/premake5/contrib/curl/lib/checksrc.pl +++ /dev/null @@ -1,552 +0,0 @@ -#!/usr/bin/perl -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -########################################################################### - -my $max_column = 79; -my $indent = 2; - -my $warnings; -my $errors; -my $supressed; # whitelisted problems -my $file; -my $dir="."; -my $wlist; -my $windows_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin'; -my $verbose; -my %whitelist; - -my %warnings = ( - 'LONGLINE' => "Line longer than $max_column", - 'TABS' => 'TAB characters not allowed', - 'TRAILINGSPACE' => 'Trailing white space on the line', - 'CPPCOMMENTS' => '// comment detected', - 'SPACEBEFOREPAREN' => 'space before an open parenthesis', - 'SPACEAFTERPAREN' => 'space after open parenthesis', - 'SPACEBEFORECLOSE' => 'space before a close parenthesis', - 'SPACEBEFORECOMMA' => 'space before a comma', - 'RETURNNOSPACE' => 'return without space', - 'COMMANOSPACE' => 'comma without following space', - 'BRACEELSE' => '} else on the same line', - 'PARENBRACE' => '){ without sufficient space', - 'SPACESEMILCOLON' => 'space before semicolon', - 'BANNEDFUNC' => 'a banned function was used', - 'FOPENMODE' => 'fopen needs a macro for the mode string', - 'BRACEPOS' => 'wrong position for an open brace', - 'INDENTATION' => 'wrong start column for code', - 'COPYRIGHT' => 'file missing a copyright statement', - 'BADCOMMAND' => 'bad !checksrc! instruction', - 'UNUSEDIGNORE' => 'a warning ignore was not used', - 'OPENCOMMENT' => 'file ended with a /* comment still "open"', - 'ASTERISKSPACE' => 'pointer declared with space after asterisk', - 'ASTERISKNOSPACE' => 'pointer declared without space before asterisk', - 'ASSIGNWITHINCONDITION' => 'assignment within conditional expression' - ); - -sub readwhitelist { - open(W, "<$dir/checksrc.whitelist"); - my @all=; - for(@all) { - $windows_os ? $_ =~ s/\r?\n$// : chomp; - $whitelist{$_}=1; - } - close(W); -} - -sub checkwarn { - my ($name, $num, $col, $file, $line, $msg, $error) = @_; - - my $w=$error?"error":"warning"; - my $nowarn=0; - - #if(!$warnings{$name}) { - # print STDERR "Dev! there's no description for $name!\n"; - #} - - # checksrc.whitelist - if($whitelist{$line}) { - $nowarn = 1; - } - # !checksrc! controlled - elsif($ignore{$name}) { - $ignore{$name}--; - $ignore_used{$name}++; - $nowarn = 1; - if(!$ignore{$name}) { - # reached zero, enable again - enable_warn($name, $line, $file, $l); - } - } - - if($nowarn) { - $supressed++; - if($w) { - $swarnings++; - } - else { - $serrors++; - } - return; - } - - if($w) { - $warnings++; - } - else { - $errors++; - } - - $col++; - print "$file:$num:$col: $w: $msg ($name)\n"; - print " $line\n"; - - if($col < 80) { - my $pref = (' ' x $col); - print "${pref}^\n"; - } -} - -$file = shift @ARGV; - -while(1) { - - if($file =~ /-D(.*)/) { - $dir = $1; - $file = shift @ARGV; - next; - } - elsif($file =~ /-W(.*)/) { - $wlist .= " $1 "; - $file = shift @ARGV; - next; - } - elsif($file =~ /^(-h|--help)/) { - undef $file; - last; - } - - last; -} - -if(!$file) { - print "checksrc.pl [option] [file2] ...\n"; - print " Options:\n"; - print " -D[DIR] Directory to prepend file names\n"; - print " -h Show help output\n"; - print " -W[file] Whitelist the given file - ignore all its flaws\n"; - print "\nDetects and warns for these problems:\n"; - for(sort keys %warnings) { - printf (" %-18s: %s\n", $_, $warnings{$_}); - } - exit; -} - -readwhitelist(); - -do { - if("$wlist" !~ / $file /) { - my $fullname = $file; - $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/'); - scanfile($fullname); - } - $file = shift @ARGV; - -} while($file); - -sub checksrc_clear { - undef %ignore; - undef %ignore_set; - undef @ignore_line; -} - -sub checksrc_endoffile { - my ($file) = @_; - for(keys %ignore_set) { - if($ignore_set{$_} && !$ignore_used{$_}) { - checkwarn("UNUSEDIGNORE", $ignore_set{$_}, - length($_)+11, $file, - $ignore_line[$ignore_set{$_}], - "Unused ignore: $_"); - } - } -} - -sub enable_warn { - my ($what, $line, $file, $l) = @_; - - # switch it back on, but warn if not triggered! - if(!$ignore_used{$what}) { - checkwarn("UNUSEDIGNORE", - $line, length($what) + 11, $file, $l, - "No warning was inhibited!"); - } - $ignore_set{$what}=0; - $ignore_used{$what}=0; - $ignore{$what}=0; -} -sub checksrc { - my ($cmd, $line, $file, $l) = @_; - if($cmd =~ / *([^ ]*) *(.*)/) { - my ($enable, $what) = ($1, $2); - $what =~ s: *\*/$::; # cut off end of C comment - # print "ENABLE $enable WHAT $what\n"; - if($enable eq "disable") { - my ($warn, $scope)=($1, $2); - if($what =~ /([^ ]*) +(.*)/) { - ($warn, $scope)=($1, $2); - } - else { - $warn = $what; - $scope = 1; - } - # print "IGNORE $warn for SCOPE $scope\n"; - if($scope eq "all") { - $scope=999999; - } - - if($ignore_set{$warn}) { - checkwarn("BADCOMMAND", - $line, 0, $file, $l, - "$warn already disabled from line $ignore_set{$warn}"); - } - else { - $ignore{$warn}=$scope; - $ignore_set{$warn}=$line; - $ignore_line[$line]=$l; - } - } - elsif($enable eq "enable") { - enable_warn($what, $line, $file, $l); - } - else { - checkwarn("BADCOMMAND", - $line, 0, $file, $l, - "Illegal !checksrc! command"); - } - } -} - -sub nostrings { - my ($str) = @_; - $str =~ s/\".*\"//g; - return $str; -} - -sub scanfile { - my ($file) = @_; - - my $line = 1; - my $prevl; - my $l; - open(R, "<$file") || die "failed to open $file"; - - my $incomment=0; - my $copyright=0; - checksrc_clear(); # for file based ignores - - while() { - $windows_os ? $_ =~ s/\r?\n$// : chomp; - my $l = $_; - my $ol = $l; # keep the unmodified line for error reporting - my $column = 0; - - # check for !checksrc! commands - if($l =~ /\!checksrc\! (.*)/) { - my $cmd = $1; - checksrc($cmd, $line, $file, $l) - } - - # check for a copyright statement - if(!$copyright && ($l =~ /copyright .* \d\d\d\d/i)) { - $copyright=1; - } - - # detect long lines - if(length($l) > $max_column) { - checkwarn("LONGLINE", $line, length($l), $file, $l, - "Longer than $max_column columns"); - } - # detect TAB characters - if($l =~ /^(.*)\t/) { - checkwarn("TABS", - $line, length($1), $file, $l, "Contains TAB character", 1); - } - # detect trailing white space - if($l =~ /^(.*)[ \t]+\z/) { - checkwarn("TRAILINGSPACE", - $line, length($1), $file, $l, "Trailing whitespace"); - } - - # ------------------------------------------------------------ - # Above this marker, the checks were done on lines *including* - # comments - # ------------------------------------------------------------ - - # strip off C89 comments - - comment: - if(!$incomment) { - if($l =~ s/\/\*.*\*\// /g) { - # full /* comments */ were removed! - } - if($l =~ s/\/\*.*//) { - # start of /* comment was removed - $incomment = 1; - } - } - else { - if($l =~ s/.*\*\///) { - # end of comment */ was removed - $incomment = 0; - goto comment; - } - else { - # still within a comment - $l=""; - } - } - - # ------------------------------------------------------------ - # Below this marker, the checks were done on lines *without* - # comments - # ------------------------------------------------------------ - - # crude attempt to detect // comments without too many false - # positives - if($l =~ /^([^"\*]*)[^:"]\/\//) { - checkwarn("CPPCOMMENTS", - $line, length($1), $file, $l, "\/\/ comment"); - } - - my $nostr = nostrings($l); - # check spaces after for/if/while/function call - if($nostr =~ /^(.*)(for|if|while| ([a-zA-Z0-9_]+)) \((.)/) { - if($1 =~ / *\#/) { - # this is a #if, treat it differently - } - elsif($3 eq "return") { - # return must have a space - } - elsif($4 eq "*") { - # (* beginning makes the space OK! - } - elsif($1 =~ / *typedef/) { - # typedefs can use space-paren - } - else { - checkwarn("SPACEBEFOREPAREN", $line, length($1)+length($2), $file, $l, - "$2 with space"); - } - } - - if($nostr =~ /^((.*)(if) *\()(.*)\)/) { - my $pos = length($1); - if($4 =~ / = /) { - checkwarn("ASSIGNWITHINCONDITION", - $line, $pos+1, $file, $l, - "assignment within conditional expression"); - } - } - # check spaces after open parentheses - if($l =~ /^(.*[a-z])\( /i) { - checkwarn("SPACEAFTERPAREN", - $line, length($1)+1, $file, $l, - "space after open parenthesis"); - } - - # check spaces before close parentheses, unless it was a space or a - # close parenthesis! - if($l =~ /(.*[^\) ]) \)/) { - checkwarn("SPACEBEFORECLOSE", - $line, length($1)+1, $file, $l, - "space before close parenthesis"); - } - - # check spaces before comma! - if($l =~ /(.*[^ ]) ,/) { - checkwarn("SPACEBEFORECOMMA", - $line, length($1)+1, $file, $l, - "space before comma"); - } - - # check for "return(" without space - if($l =~ /^(.*)return\(/) { - if($1 =~ / *\#/) { - # this is a #if, treat it differently - } - else { - checkwarn("RETURNNOSPACE", $line, length($1)+6, $file, $l, - "return without space before paren"); - } - } - - # check for comma without space - if($l =~ /^(.*),[^ \n]/) { - my $pref=$1; - my $ign=0; - if($pref =~ / *\#/) { - # this is a #if, treat it differently - $ign=1; - } - elsif($pref =~ /\/\*/) { - # this is a comment - $ign=1; - } - elsif($pref =~ /[\"\']/) { - $ign = 1; - # There is a quote here, figure out whether the comma is - # within a string or '' or not. - if($pref =~ /\"/) { - # withing a string - } - elsif($pref =~ /\'$/) { - # a single letter - } - else { - $ign = 0; - } - } - if(!$ign) { - checkwarn("COMMANOSPACE", $line, length($pref)+1, $file, $l, - "comma without following space"); - } - } - - # check for "} else" - if($l =~ /^(.*)\} *else/) { - checkwarn("BRACEELSE", - $line, length($1), $file, $l, "else after closing brace on same line"); - } - # check for "){" - if($l =~ /^(.*)\)\{/) { - checkwarn("PARENBRACE", - $line, length($1)+1, $file, $l, "missing space after close paren"); - } - - # check for space before the semicolon last in a line - if($l =~ /^(.*[^ ].*) ;$/) { - checkwarn("SPACESEMILCOLON", - $line, length($1), $file, $ol, "space before last semicolon"); - } - - # scan for use of banned functions - if($l =~ /^(.*\W) - (gets| - strtok| - v?sprintf| - (str|_mbs|_tcs|_wcs)n?cat| - LoadLibrary(Ex)?(A|W)?) - \s*\( - /x) { - checkwarn("BANNEDFUNC", - $line, length($1), $file, $ol, - "use of $2 is banned"); - } - - # scan for use of non-binary fopen without the macro - if($l =~ /^(.*\W)fopen\s*\([^,]*, *\"([^"]*)/) { - my $mode = $2; - if($mode !~ /b/) { - checkwarn("FOPENMODE", - $line, length($1), $file, $ol, - "use of non-binary fopen without FOPEN_* macro: $mode"); - } - } - - # check for open brace first on line but not first column - # only alert if previous line ended with a close paren and wasn't a cpp - # line - if((($prevl =~ /\)\z/) && ($prevl !~ /^ *#/)) && ($l =~ /^( +)\{/)) { - checkwarn("BRACEPOS", - $line, length($1), $file, $ol, "badly placed open brace"); - } - - # if the previous line starts with if/while/for AND ends with an open - # brace, check that this line is indented $indent more steps, if not - # a cpp line - if($prevl =~ /^( *)(if|while|for)\(.*\{\z/) { - my $first = length($1); - - # this line has some character besides spaces - if(($l !~ /^ *#/) && ($l =~ /^( *)[^ ]/)) { - my $second = length($1); - my $expect = $first+$indent; - if($expect != $second) { - my $diff = $second - $first; - checkwarn("INDENTATION", $line, length($1), $file, $ol, - "not indented $indent steps, uses $diff)"); - - } - } - } - - # check for 'char * name' - if(($l =~ /(^.*(char|int|long|void|curl_slist|CURL|CURLM|CURLMsg|curl_httppost) *(\*+)) (\w+)/) && ($4 ne "const")) { - checkwarn("ASTERISKNOSPACE", - $line, length($1), $file, $ol, - "no space after declarative asterisk"); - } - # check for 'char*' - if(($l =~ /(^.*(char|int|long|void|curl_slist|CURL|CURLM|CURLMsg|curl_httppost|sockaddr_in|FILE)\*)/)) { - checkwarn("ASTERISKNOSPACE", - $line, length($1)-1, $file, $ol, - "no space before asterisk"); - } - - # check for 'void func() {', but avoid false positives by requiring - # both an open and closed parentheses before the open brace - if($l =~ /^((\w).*){\z/) { - my $k = $1; - $k =~ s/const *//; - $k =~ s/static *//; - if($k =~ /\(.*\)/) { - checkwarn("BRACEPOS", - $line, length($l)-1, $file, $ol, - "wrongly placed open brace"); - } - } - $line++; - $prevl = $ol; - } - - if(!$copyright) { - checkwarn("COPYRIGHT", 1, 0, $file, "", "Missing copyright statement", 1); - } - if($incomment) { - checkwarn("OPENCOMMENT", 1, 0, $file, "", "Missing closing comment", 1); - } - - checksrc_endoffile($file); - - close(R); - -} - - -if($errors || $warnings || $verbose) { - printf "checksrc: %d errors and %d warnings\n", $errors, $warnings; - if($supressed) { - printf "checksrc: %d errors and %d warnings suppressed\n", - $serrors, - $swarnings; - } - exit 5; # return failure -} diff --git a/build/premake/premake5/contrib/curl/lib/config-amigaos.h b/build/premake/premake5/contrib/curl/lib/config-amigaos.h deleted file mode 100644 index 31cfc3afc2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-amigaos.h +++ /dev/null @@ -1,166 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_AMIGAOS_H -#define HEADER_CURL_CONFIG_AMIGAOS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* Hand crafted config file for AmigaOS */ -/* ================================================================ */ - -#ifdef __AMIGA__ /* Any AmigaOS flavour */ - -#define HAVE_ARPA_INET_H 1 -#define HAVE_CLOSESOCKET_CAMEL 1 -#define HAVE_ERRNO_H 1 -#define HAVE_GETHOSTBYADDR 1 -#define HAVE_INET_ADDR 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_IOCTLSOCKET_CAMEL 1 -#define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1 -#define HAVE_LIBCRYPTO 1 -#define HAVE_LIBSSL 1 -#define HAVE_LIBZ 1 -#define HAVE_LONGLONG 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_OPENSSL_CRYPTO_H 1 -#define HAVE_OPENSSL_ERR_H 1 -#define HAVE_OPENSSL_PEM_H 1 -#define HAVE_OPENSSL_RSA_H 1 -#define HAVE_OPENSSL_SSL_H 1 -#define HAVE_OPENSSL_X509_H 1 -#define HAVE_PERROR 1 -#define HAVE_PWD_H 1 -#define HAVE_RAND_EGD 1 -#define HAVE_RAND_STATUS 1 -#define HAVE_SELECT 1 -#define HAVE_SETJMP_H 1 -#define HAVE_SGTTY_H 1 -#define HAVE_SIGNAL 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_SIG_ATOMIC_T 1 -#define HAVE_SOCKET 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRDUP 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRICMP 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRSTR 1 -#define HAVE_STRUCT_TIMEVAL 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_SOCKIO_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_TIME_H 1 -#define HAVE_UNAME 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UTIME 1 -#define HAVE_UTIME_H 1 -#define HAVE_WRITABLE_ARGV 1 -#define HAVE_ZLIB_H 1 -#define HAVE_SYS_IOCTL_H 1 - -#define NEED_MALLOC_H 1 - -#define SIZEOF_INT 4 -#define SIZEOF_SHORT 2 -#define SIZEOF_SIZE_T 4 - -#define USE_MANUAL 1 -#define USE_OPENSSL 1 -#define CURL_DISABLE_LDAP 1 - -#define OS "AmigaOS" - -#define PACKAGE "curl" -#define PACKAGE_BUGREPORT "a suitable mailing list: https://curl.haxx.se/mail/" -#define PACKAGE_NAME "curl" -#define PACKAGE_STRING "curl -" -#define PACKAGE_TARNAME "curl" -#define PACKAGE_VERSION "-" -#define CURL_CA_BUNDLE "s:curl-ca-bundle.crt" - -#define RETSIGTYPE void -#define SELECT_TYPE_ARG1 int -#define SELECT_TYPE_ARG234 (fd_set *) -#define SELECT_TYPE_ARG5 (struct timeval *) - -#define STDC_HEADERS 1 -#define TIME_WITH_SYS_TIME 1 - -#define in_addr_t int - -#ifndef F_OK -# define F_OK 0 -#endif - -#ifndef O_RDONLY -# define O_RDONLY 0x0000 -#endif - -#ifndef LONG_MAX -# define LONG_MAX 0x7fffffffL -#endif - -#ifndef LONG_MIN -# define LONG_MIN (-0x7fffffffL-1) -#endif - -#define HAVE_GETNAMEINFO 1 -#define GETNAMEINFO_QUAL_ARG1 const -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -#define GETNAMEINFO_TYPE_ARG2 int -#define GETNAMEINFO_TYPE_ARG46 size_t -#define GETNAMEINFO_TYPE_ARG7 int - -#define HAVE_RECV 1 -#define RECV_TYPE_ARG1 long -#define RECV_TYPE_ARG2 char * -#define RECV_TYPE_ARG3 long -#define RECV_TYPE_ARG4 long -#define RECV_TYPE_RETV long - -#define HAVE_RECVFROM 1 -#define RECVFROM_TYPE_ARG1 long -#define RECVFROM_TYPE_ARG2 char -#define RECVFROM_TYPE_ARG3 long -#define RECVFROM_TYPE_ARG4 long -#define RECVFROM_TYPE_ARG5 struct sockaddr -#define RECVFROM_TYPE_ARG6 long -#define RECVFROM_TYPE_RETV long - -#define HAVE_SEND 1 -#define SEND_TYPE_ARG1 int -#define SEND_QUAL_ARG2 const -#define SEND_TYPE_ARG2 char * -#define SEND_TYPE_ARG3 int -#define SEND_TYPE_ARG4 int -#define SEND_TYPE_RETV int - -#endif /* __AMIGA__ */ -#endif /* HEADER_CURL_CONFIG_AMIGAOS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-dos.h b/build/premake/premake5/contrib/curl/lib/config-dos.h deleted file mode 100644 index f2c9ff4035..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-dos.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_DOS_H -#define HEADER_CURL_CONFIG_DOS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - - -/* ================================================================ */ -/* lib/config-dos.h - Hand crafted config file for DOS */ -/* ================================================================ */ - -#if defined(DJGPP) - #define OS "MSDOS/djgpp" -#elif defined(__HIGHC__) - #define OS "MSDOS/HighC" -#elif defined(__WATCOMC__) - #define OS "MSDOS/Watcom" -#else - #define OS "MSDOS/?" -#endif - -#define PACKAGE "curl" - -#define HAVE_ARPA_INET_H 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETNAMEINFO 1 -#define HAVE_GETPROTOBYNAME 1 -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_IO_H 1 -#define HAVE_IOCTL 1 -#define HAVE_IOCTL_FIONBIO 1 -#define HAVE_IOCTLSOCKET 1 -#define HAVE_IOCTLSOCKET_FIONBIO 1 -#define HAVE_LIMITS_H 1 -#define HAVE_LOCALE_H 1 -#define HAVE_LONGLONG 1 -#define HAVE_MEMORY_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_NETINET_TCP_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_PROCESS_H 1 -#define HAVE_RECV 1 -#define HAVE_RECVFROM 1 -#define HAVE_SELECT 1 -#define HAVE_SEND 1 -#define HAVE_SETJMP_H 1 -#define HAVE_SETLOCALE 1 -#define HAVE_SETMODE 1 -#define HAVE_SIGNAL 1 -#define HAVE_SOCKET 1 -#define HAVE_STRDUP 1 -#define HAVE_STRICMP 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRUCT_TIMEVAL 1 -#define HAVE_STRUCT_IN6_ADDR 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_TIME_H 1 -#define HAVE_UNISTD_H 1 - -#define NEED_MALLOC_H 1 - -#define RETSIGTYPE void -#define SIZEOF_INT 4 -#define SIZEOF_LONG_DOUBLE 16 -#define SIZEOF_SHORT 2 -#define SIZEOF_SIZE_T 4 -#define STDC_HEADERS 1 -#define TIME_WITH_SYS_TIME 1 - -/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */ - -#define SEND_TYPE_ARG1 int -#define SEND_QUAL_ARG2 const -#define SEND_TYPE_ARG2 void * -#define SEND_TYPE_ARG3 int -#define SEND_TYPE_ARG4 int -#define SEND_TYPE_RETV int - -#define RECV_TYPE_ARG1 int -#define RECV_TYPE_ARG2 void * -#define RECV_TYPE_ARG3 int -#define RECV_TYPE_ARG4 int -#define RECV_TYPE_RETV int - -#define RECVFROM_TYPE_ARG1 int -#define RECVFROM_TYPE_ARG2 void -#define RECVFROM_TYPE_ARG3 int -#define RECVFROM_TYPE_ARG4 int -#define RECVFROM_TYPE_ARG5 struct sockaddr -#define RECVFROM_TYPE_ARG6 int -#define RECVFROM_TYPE_RETV int -#define RECVFROM_TYPE_ARG2_IS_VOID 1 - -#define GETNAMEINFO_QUAL_ARG1 const -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -#define GETNAMEINFO_TYPE_ARG2 int -#define GETNAMEINFO_TYPE_ARG46 int -#define GETNAMEINFO_TYPE_ARG7 int - -#define BSD - -/* CURLDEBUG definition enables memory tracking */ -/* #define CURLDEBUG */ - -/* USE_ZLIB on cmd-line */ -#ifdef USE_ZLIB - #define HAVE_ZLIB_H 1 - #define HAVE_LIBZ 1 -#endif - -/* USE_OPENSSL on cmd-line */ -#ifdef USE_OPENSSL - #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 - #define HAVE_OPENSSL_ENGINE_H 1 - #define OPENSSL_NO_KRB5 1 -#endif - -/* to disable LDAP */ -#define CURL_DISABLE_LDAP 1 - -#define in_addr_t u_long - -#if defined(__HIGHC__) || \ - (defined(__GNUC__) && (__GNUC__ < 4)) - #define ssize_t int -#endif - -#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE") - -/* Target HAVE_x section */ - -#if defined(DJGPP) - #define HAVE_BASENAME 1 - #define HAVE_STRCASECMP 1 - #define HAVE_SIGACTION 1 - #define HAVE_SIGSETJMP 1 - #define HAVE_SYS_TIME_H 1 - #define HAVE_TERMIOS_H 1 - #define HAVE_VARIADIC_MACROS_GCC 1 - -#elif defined(__WATCOMC__) - #define HAVE_STRCASECMP 1 - -#elif defined(__HIGHC__) - #define HAVE_SYS_TIME_H 1 - #define strerror(e) strerror_s_((e)) -#endif - -#ifdef MSDOS /* Watt-32 */ - #define HAVE_CLOSE_S 1 -#endif - -#undef word -#undef byte - -#endif /* HEADER_CURL_CONFIG_DOS_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/config-linux.h b/build/premake/premake5/contrib/curl/lib/config-linux.h deleted file mode 100644 index b8a4640fc9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-linux.h +++ /dev/null @@ -1,964 +0,0 @@ -/* lib/curl_config.h.in. Generated somehow by cmake. */ - -/* when building libcurl itself */ -/* #undef BUILDING_LIBCURL */ - -/* Location of default ca bundle */ -/* #undef CURL_CA_BUNDLE */ - -/* Location of default ca path */ -/* #undef CURL_CA_PATH */ - -/* to disable cookies support */ -/* #undef CURL_DISABLE_COOKIES */ - -/* to disable cryptographic authentication */ -/* #undef CURL_DISABLE_CRYPTO_AUTH */ - -/* to disable DICT */ -/* #undef CURL_DISABLE_DICT */ - -/* to disable FILE */ -/* #undef CURL_DISABLE_FILE */ - -/* to disable FTP */ -/* #undef CURL_DISABLE_FTP */ - -/* to disable HTTP */ -/* #undef CURL_DISABLE_HTTP */ - -/* to disable LDAP */ -/* #undef CURL_DISABLE_LDAP */ - -/* to disable LDAPS */ -/* #undef CURL_DISABLE_LDAPS */ - -/* to disable proxies */ -/* #undef CURL_DISABLE_PROXY */ - -/* to disable TELNET */ -/* #undef CURL_DISABLE_TELNET */ - -/* to disable TFTP */ -/* #undef CURL_DISABLE_TFTP */ - -/* to disable verbose strings */ -/* #undef CURL_DISABLE_VERBOSE_STRINGS */ - -/* to make a symbol visible */ -/* #undef CURL_EXTERN_SYMBOL */ -/* Ensure using CURL_EXTERN_SYMBOL is possible */ -#ifndef CURL_EXTERN_SYMBOL -#define CURL_EXTERN_SYMBOL -#endif - -/* Use Windows LDAP implementation */ -/* #undef USE_WIN32_LDAP */ - -/* when not building a shared library */ -/* #undef CURL_STATICLIB */ - -/* Set to explicitly specify we don't want to use thread-safe functions */ -/* #undef DISABLED_THREADSAFE */ - -/* your Entropy Gathering Daemon socket pathname */ -/* #undef EGD_SOCKET */ - -/* Define if you want to enable IPv6 support */ -#define ENABLE_IPV6 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_QUAL_ARG1 */ - -/* Define to the type of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG1 */ - -/* Define to the type of arg 2 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG2 */ - -/* Define to the type of args 4 and 6 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG46 */ - -/* Define to the type of arg 7 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG7 */ - -/* Specifies the number of arguments to getservbyport_r */ -/* #undef GETSERVBYPORT_R_ARGS */ - -/* Specifies the size of the buffer to pass to getservbyport_r */ -/* #undef GETSERVBYPORT_R_BUFSIZE */ - -/* Define to 1 if you have the alarm function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_TFTP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `basename' function. */ -#define HAVE_BASENAME 1 - -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 - -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */ - -/* Define to 1 if you have the `closesocket' function. */ -/* #undef HAVE_CLOSESOCKET */ - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRYPTO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -/* #undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define to 1 if you have the fcntl function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the fdopen function. */ -/* #undef HAVE_FDOPEN */ - -/* Define to 1 if you have the `fork' function. */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have the freeifaddrs function. */ -#define HAVE_FREEIFADDRS 1 - -/* Define to 1 if you have the ftruncate function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyaddr_r function. */ -#define HAVE_GETHOSTBYADDR_R 1 - -/* gethostbyaddr_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYADDR_R_5 */ - -/* gethostbyaddr_r() takes 7 args */ -/* #undef HAVE_GETHOSTBYADDR_R_7 */ - -/* gethostbyaddr_r() takes 8 args */ -#define HAVE_GETHOSTBYADDR_R_8 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostbyname_r function. */ -#define HAVE_GETHOSTBYNAME_R 1 - -/* gethostbyname_r() takes 3 args */ -/* #undef HAVE_GETHOSTBYNAME_R_3 */ - -/* gethostbyname_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYNAME_R_5 */ - -/* gethostbyname_r() takes 6 args */ -#define HAVE_GETHOSTBYNAME_R_6 1 - -/* Define to 1 if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have a working getifaddrs function. */ -/* #undef HAVE_GETIFADDRS */ - -/* Define to 1 if you have the getnameinfo function. */ -/* #undef HAVE_GETNAMEINFO */ - -/* Define to 1 if you have the `getpass_r' function. */ -/* #undef HAVE_GETPASS_R */ - -/* Define to 1 if you have the `getppid' function. */ -/* #undef HAVE_GETPPID */ - -/* Define to 1 if you have the `getprotobyname' function. */ -#define HAVE_GETPROTOBYNAME 1 - -/* Define to 1 if you have the `getpwuid' function. */ -#define HAVE_GETPWUID 1 - -/* Define to 1 if you have the `getrlimit' function. */ -#define HAVE_GETRLIMIT 1 - -/* Define to 1 if you have the getservbyport_r function. */ -/* #undef HAVE_GETSERVBYPORT_R */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have a working glibc-style strerror_r function. */ -/* #undef HAVE_GLIBC_STRERROR_R */ - -/* Define to 1 if you have a working gmtime_r function. */ -#define HAVE_GMTIME_R 1 - -/* if you have the gssapi libraries */ -/* #undef HAVE_GSSAPI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */ - -/* if you have the GNU gssapi libraries */ -/* #undef HAVE_GSSGNU */ - -/* if you have the Heimdal gssapi libraries */ -/* #undef HAVE_GSSHEIMDAL */ - -/* if you have the MIT gssapi libraries */ -/* #undef HAVE_GSSMIT */ - -/* Define to 1 if you have the `idna_strerror' function. */ -/* #undef HAVE_IDNA_STRERROR */ - -/* Define to 1 if you have the `idn_free' function. */ -/* #undef HAVE_IDN_FREE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IDN_FREE_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_IFADDRS_H 1 - -/* Define to 1 if you have the `inet_addr' function. */ -#define HAVE_INET_ADDR 1 - -/* Define to 1 if you have the inet_ntoa_r function. */ -/* #undef HAVE_INET_NTOA_R */ - -/* inet_ntoa_r() takes 2 args */ -/* #undef HAVE_INET_NTOA_R_2 */ - -/* inet_ntoa_r() takes 3 args */ -/* #undef HAVE_INET_NTOA_R_3 */ - -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ -#define HAVE_INET_PTON 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the ioctl function. */ -#define HAVE_IOCTL 1 - -/* Define to 1 if you have the ioctlsocket function. */ -/* #undef HAVE_IOCTLSOCKET */ - -/* Define to 1 if you have the IoctlSocket camel case function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL */ - -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -/* #undef HAVE_IOCTLSOCKET_FIONBIO */ - -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 - -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* if you have the Kerberos4 libraries (including -ldes) */ -/* #undef HAVE_KRB4 */ - -/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KRB_H */ - -/* Define to 1 if you have the lber.h header file. */ -#define HAVE_LBER_H 1 - -/* Define to 1 if you have the ldapssl.h header file. */ -/* #undef HAVE_LDAPSSL_H */ - -/* Define to 1 if you have the ldap.h header file. */ -#define HAVE_LDAP_H 1 - -/* Use LDAPS implementation */ -/* #undef HAVE_LDAP_SSL */ - -/* Define to 1 if you have the ldap_ssl.h header file. */ -/* #undef HAVE_LDAP_SSL_H */ - -/* Define to 1 if you have the `ldap_url_parse' function. */ -#define HAVE_LDAP_URL_PARSE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBGEN_H 1 - -/* Define to 1 if you have the `idn' library (-lidn). */ -/* #undef HAVE_LIBIDN */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -/* #undef HAVE_LIBRESOLV */ - -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the `ssh2' library (-lssh2). */ -/* #undef HAVE_LIBSSH2 */ - -/* Define to 1 if libssh2 provides `libssh2_version'. */ -/* #undef HAVE_LIBSSH2_VERSION */ - -/* Define to 1 if libssh2 provides `libssh2_init'. */ -/* #undef HAVE_LIBSSH2_INIT */ - -/* Define to 1 if libssh2 provides `libssh2_exit'. */ -/* #undef HAVE_LIBSSH2_EXIT */ - -/* Define to 1 if libssh2 provides `libssh2_scp_send64'. */ -/* #undef HAVE_LIBSSH2_SCP_SEND64 */ - -/* Define to 1 if libssh2 provides `libssh2_session_handshake'. */ -/* #undef HAVE_LIBSSH2_SESSION_HANDSHAKE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBSSH2_H */ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -/* #undef HAVE_LIBSSL */ - -/* if zlib is available */ -#define HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* if your compiler supports LL */ -#define HAVE_LL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have a working localtime_r function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG 1 - -/* Define to 1 if you have the malloc.h header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#define HAVE_MSG_NOSIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if NI_WITHSCOPEID exists and works. */ -/* #undef HAVE_NI_WITHSCOPEID */ - -/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE */ -/* #undef HAVE_OLD_GSSMIT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_CRYPTO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_ENGINE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_ERR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_PEM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_PKCS12_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_RSA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_SSL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_X509_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PEM_H */ - -/* Define to 1 if you have the `perror' function. */ -#define HAVE_PERROR 1 - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have a working poll function. */ -#define HAVE_POLL 1 - -/* If you have a fine poll */ -#define HAVE_POLL_FINE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have a working POSIX-style strerror_r function. */ -#define HAVE_POSIX_STRERROR_R 1 - -/* Define to 1 if you have the header file */ -/* #undef HAVE_PTHREAD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `RAND_egd' function. */ -/* #undef HAVE_RAND_EGD */ - -/* Define to 1 if you have the `RAND_screen' function. */ -/* #undef HAVE_RAND_SCREEN */ - -/* Define to 1 if you have the `RAND_status' function. */ -/* #undef HAVE_RAND_STATUS */ - -/* Define to 1 if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to 1 if you have the recvfrom function. */ -/* #undef HAVE_RECVFROM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RSA_H */ - -/* Define to 1 if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SETJMP_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmode' function. */ -/* #undef HAVE_SETMODE */ - -/* Define to 1 if you have the `setrlimit' function. */ -#define HAVE_SETRLIMIT 1 - -/* Define to 1 if you have the setsockopt function. */ -#define HAVE_SETSOCKOPT 1 - -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SGTTY_H 1 - -/* Define to 1 if you have the sigaction function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the siginterrupt function. */ -#define HAVE_SIGINTERRUPT 1 - -/* Define to 1 if you have the signal function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the sigsetjmp function or macro. */ -#define HAVE_SIGSETJMP 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `SSL_get_shutdown' function. */ -/* #undef HAVE_SSL_GET_SHUTDOWN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the strcasestr function. */ -/* #undef HAVE_STRCASESTR */ - -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the strerror_r function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the stricmp function. */ -/* #undef HAVE_STRICMP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the strlcat function. */ -/* #undef HAVE_STRLCAT */ - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the strncasecmp function. */ -/* #undef HAVE_STRNCASECMP */ - -/* Define to 1 if you have the strncmpi function. */ -/* #undef HAVE_STRNCMPI */ - -/* Define to 1 if you have the strnicmp function. */ -/* #undef HAVE_STRNICMP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the strtok_r function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the strtoll function. */ -#define HAVE_STRTOLL 1 - -/* if struct sockaddr_storage is defined */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if you have the timeval struct. */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FILIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_POLL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UTIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TLD_H */ - -/* Define to 1 if you have the `tld_strerror' function. */ -/* #undef HAVE_TLD_STRERROR */ - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if compiler supports C99 variadic macro style. */ -/* #undef HAVE_VARIADIC_MACROS_C99 */ - -/* Define to 1 if compiler supports old gcc variadic macro style. */ -/* #undef HAVE_VARIADIC_MACROS_GCC */ - -/* Define to 1 if you have the winber.h header file. */ -/* #undef HAVE_WINBER_H */ - -/* Define to 1 if you have the windows.h header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Define to 1 if you have the winldap.h header file. */ -/* #undef HAVE_WINLDAP_H */ - -/* Define to 1 if you have the winsock2.h header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define this symbol if your OS supports changing the contents of argv */ -/* #undef HAVE_WRITABLE_ARGV */ - -/* Define to 1 if you have the writev function. */ -/* #undef HAVE_WRITEV */ - -/* Define to 1 if you have the ws2tcpip.h header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_X509_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_PROCESS_H */ - -/* if you have the zlib.h header file */ -#define HAVE_ZLIB_H 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -/* #undef LT_OBJDIR */ - -/* If you lack a fine basename() prototype */ -/* #undef NEED_BASENAME_PROTO */ - -/* Define to 1 if you need the lber.h header file even with ldap.h */ -/* #undef NEED_LBER_H */ - -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* cpu-machine-OS */ -#define OS "Linux" - -/* Name of package */ -/* #undef PACKAGE */ - -/* Define to the address where bug reports for this package should be sent. */ -/* #undef PACKAGE_BUGREPORT */ - -/* Define to the full name of this package. */ -/* #undef PACKAGE_NAME */ - -/* Define to the full name and version of this package. */ -/* #undef PACKAGE_STRING */ - -/* Define to the one symbol short name of this package. */ -/* #undef PACKAGE_TARNAME */ - -/* Define to the version of this package. */ -/* #undef PACKAGE_VERSION */ - -/* a suitable file to read random data from */ -#define RANDOM_FILE "/dev/urandom" - -/* Define to the type of arg 1 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG1 */ - -/* Define to the type pointed by arg 2 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG2 */ - -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG2_IS_VOID */ - -/* Define to the type of arg 3 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG3 */ - -/* Define to the type of arg 4 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG4 */ - -/* Define to the type pointed by arg 5 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG5 */ - -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ - -/* Define to the type pointed by arg 6 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG6 */ - -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ - -/* Define to the function return type for recvfrom. */ -/* #undef RECVFROM_TYPE_RETV */ - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* Define to the type qualifier of arg 5 for select. */ -/* #undef SELECT_QUAL_ARG5 */ - -/* Define to the type of arg 1 for select. */ -/* #undef SELECT_TYPE_ARG1 */ - -/* Define to the type of args 2, 3 and 4 for select. */ -/* #undef SELECT_TYPE_ARG234 */ - -/* Define to the type of arg 5 for select. */ -/* #undef SELECT_TYPE_ARG5 */ - -/* Define to the function return type for select. */ -/* #undef SELECT_TYPE_RETV */ - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `off_t', as computed by sizeof. */ -/* #undef SIZEOF_OFF_T */ - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 8 - -/* The size of `void*', as computed by sizeof. */ -/* #undef SIZEOF_VOIDP */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to the type of arg 3 for strerror_r. */ -/* #undef STRERROR_R_TYPE_ARG3 */ - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if you want to enable c-ares support */ -/* #undef USE_ARES */ - -/* Define if you want to enable POSIX threaded DNS lookup */ -/* #undef USE_THREADS_POSIX */ - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* if GnuTLS is enabled */ -/* #undef USE_GNUTLS */ - -/* if PolarSSL is enabled */ -/* #undef USE_POLARSSL */ - -/* if libSSH2 is in use */ -/* #undef USE_LIBSSH2 */ - -/* If you want to build curl with the built-in manual */ -#define USE_MANUAL 1 - -/* if NSS is enabled */ -/* #undef USE_NSS */ - -/* if you want to use OpenLDAP code instead of legacy ldap implementation */ -/* #undef USE_OPENLDAP */ - -/* if OpenSSL is in use */ -/* #undef USE_OPENSSL */ - -/* if Unix domain sockets are enabled */ -#define USE_UNIX_SOCKETS - -/* Define to 1 if you are building a Windows target without large file - support. */ -/* #undef USE_WIN32_LARGE_FILES */ - -/* to enable SSPI support */ -/* #undef USE_WINDOWS_SSPI */ - -/* to enable Windows SSL */ -/* #undef USE_SCHANNEL */ - -/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */ -/* #undef USE_YASSLEMUL */ - -/* Version number of package */ -/* #undef VERSION */ - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define to 1 if OS is AIX. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* define this if you need it to compile thread-safe code */ -/* #undef _THREAD_SAFE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ diff --git a/build/premake/premake5/contrib/curl/lib/config-mac.h b/build/premake/premake5/contrib/curl/lib/config-mac.h deleted file mode 100644 index 3c12bdfacc..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-mac.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_MAC_H -#define HEADER_CURL_CONFIG_MAC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* =================================================================== */ -/* Hand crafted config file for Mac OS 9 */ -/* =================================================================== */ -/* On Mac OS X you must run configure to generate curl_config.h file */ -/* =================================================================== */ - -#define OS "mac" - -/* Define if you want the built-in manual */ -#define USE_MANUAL 1 - -#define HAVE_ERRNO_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_ARPA_INET_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_NET_IF_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_FCNTL_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_ALLOCA_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_TIME_H 1 -#define HAVE_UTIME_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_UTIME_H 1 - -#define TIME_WITH_SYS_TIME 1 - -#define HAVE_ALARM 1 -#define HAVE_FTRUNCATE 1 -#define HAVE_UTIME 1 -#define HAVE_SETVBUF 1 -#define HAVE_STRFTIME 1 -#define HAVE_INET_ADDR 1 -#define HAVE_MEMCPY 1 -#define HAVE_SELECT 1 -#define HAVE_SOCKET 1 -#define HAVE_STRUCT_TIMEVAL 1 - -#define HAVE_SIGACTION 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_SIG_ATOMIC_T 1 - -#ifdef MACOS_SSL_SUPPORT -# define USE_OPENSSL 1 -#endif - -#define CURL_DISABLE_LDAP 1 - -#define HAVE_RAND_STATUS 1 -#define HAVE_RAND_EGD 1 - -#define HAVE_IOCTL 1 -#define HAVE_IOCTL_FIONBIO 1 - -#define RETSIGTYPE void - -#define SIZEOF_INT 4 -#define SIZEOF_SHORT 2 -#define SIZEOF_SIZE_T 4 - -#define HAVE_GETNAMEINFO 1 -#define GETNAMEINFO_QUAL_ARG1 const -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * -#define GETNAMEINFO_TYPE_ARG2 socklen_t -#define GETNAMEINFO_TYPE_ARG46 size_t -#define GETNAMEINFO_TYPE_ARG7 int - -#define HAVE_RECV 1 -#define RECV_TYPE_ARG1 int -#define RECV_TYPE_ARG2 void * -#define RECV_TYPE_ARG3 size_t -#define RECV_TYPE_ARG4 int -#define RECV_TYPE_RETV ssize_t - -#define HAVE_RECVFROM 1 -#define RECVFROM_TYPE_ARG1 int -#define RECVFROM_TYPE_ARG2 void -#define RECVFROM_TYPE_ARG3 size_t -#define RECVFROM_TYPE_ARG4 int -#define RECVFROM_TYPE_ARG5 struct sockaddr -#define RECVFROM_TYPE_ARG6 int -#define RECVFROM_TYPE_RETV ssize_t -#define RECVFROM_TYPE_ARG2_IS_VOID 1 - -#define HAVE_SEND 1 -#define SEND_TYPE_ARG1 int -#define SEND_QUAL_ARG2 const -#define SEND_TYPE_ARG2 void * -#define SEND_TYPE_ARG3 size_T -#define SEND_TYPE_ARG4 int -#define SEND_TYPE_RETV ssize_t - -#define HAVE_EXTRA_STRICMP_H 1 -#define HAVE_EXTRA_STRDUP_H 1 - -#endif /* HEADER_CURL_CONFIG_MAC_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-os400.h b/build/premake/premake5/contrib/curl/lib/config-os400.h deleted file mode 100644 index fe5b864d64..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-os400.h +++ /dev/null @@ -1,563 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_OS400_H -#define HEADER_CURL_CONFIG_OS400_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* Hand crafted config file for OS/400 */ -/* ================================================================ */ - -#pragma enum(int) - -#undef PACKAGE - -/* Version number of this archive. */ -#undef VERSION - -/* Define if you have the getpass function. */ -#undef HAVE_GETPASS - -/* Define cpu-machine-OS */ -#define OS "OS/400" - -/* Define if you have the gethostbyaddr_r() function with 5 arguments */ -#define HAVE_GETHOSTBYADDR_R_5 - -/* Define if you have the gethostbyaddr_r() function with 7 arguments */ -#undef HAVE_GETHOSTBYADDR_R_7 - -/* Define if you have the gethostbyaddr_r() function with 8 arguments */ -#undef HAVE_GETHOSTBYADDR_R_8 - -/* OS400 supports a 3-argument ASCII version of gethostbyaddr_r(), but its - * prototype is incompatible with the "standard" one (1st argument is not - * const). However, getaddrinfo() is supported (ASCII version defined as - * a local wrapper in setup-os400.h) in a threadsafe way: we can then - * configure getaddrinfo() as such and get rid of gethostbyname_r() without - * loss of threadsafeness. */ -#undef HAVE_GETHOSTBYNAME_R -#undef HAVE_GETHOSTBYNAME_R_3 -#undef HAVE_GETHOSTBYNAME_R_5 -#undef HAVE_GETHOSTBYNAME_R_6 -#define HAVE_GETADDRINFO -#define HAVE_GETADDRINFO_THREADSAFE - -/* Define if you need the _REENTRANT define for some functions */ -#undef NEED_REENTRANT - -/* Define if you have the Kerberos4 libraries (including -ldes) */ -#undef HAVE_KRB4 - -/* Define if you want to enable IPv6 support */ -#define ENABLE_IPV6 - -/* Define if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define this to 'int' if ssize_t is not an available typedefed type */ -#undef ssize_t - -/* Define this as a suitable file to read random data from */ -#undef RANDOM_FILE - -/* Define this to your Entropy Gathering Daemon socket pathname */ -#undef EGD_SOCKET - -/* Define to 1 if you have the alarm function. */ -#define HAVE_ALARM 1 - -/* Define if you have the header file. */ -#undef HAVE_ALLOCA_H - -/* Define if you have the header file. */ -#define HAVE_ARPA_INET_H - -/* Define if you have the `closesocket' function. */ -#undef HAVE_CLOSESOCKET - -/* Define if you have the header file. */ -#undef HAVE_CRYPTO_H - -/* Define if you have the header file. */ -#undef HAVE_DES_H - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H - -/* Define if you have the header file. */ -#undef HAVE_ERR_H - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H - -/* Define if you have the `geteuid' function. */ -#define HAVE_GETEUID - -/* Define if you have the `gethostbyaddr' function. */ -#define HAVE_GETHOSTBYADDR - -/* Define if you have the `gethostbyaddr_r' function. */ -#define HAVE_GETHOSTBYADDR_R - -/* Define if you have the `gethostname' function. */ -#define HAVE_GETHOSTNAME - -/* Define if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define if you have the `getpass_r' function. */ -#undef HAVE_GETPASS_R - -/* Define if you have the `getpwuid' function. */ -#define HAVE_GETPWUID - -/* Define if you have the `getservbyname' function. */ -#define HAVE_GETSERVBYNAME - -/* Define if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY - -/* Define if you have the `timeval' struct. */ -#define HAVE_STRUCT_TIMEVAL - -/* Define if you have the `inet_addr' function. */ -#define HAVE_INET_ADDR - -/* Define if you have the header file. */ -#define HAVE_INTTYPES_H - -/* Define if you have the header file. */ -#undef HAVE_IO_H - -/* Define if you have the `krb_get_our_ip_for_realm' function. */ -#undef HAVE_KRB_GET_OUR_IP_FOR_REALM - -/* Define if you have the header file. */ -#undef HAVE_KRB_H - -/* Define if you have the `crypto' library (-lcrypto). */ -#undef HAVE_LIBCRYPTO - -/* Define if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the `resolv' library (-lresolv). */ -#undef HAVE_LIBRESOLV - -/* Define if you have the `resolve' library (-lresolve). */ -#undef HAVE_LIBRESOLVE - -/* Define if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Define if you have the `ssl' library (-lssl). */ -#undef HAVE_LIBSSL - -/* Define if you have GSS API. */ -#define HAVE_GSSAPI - -/* Define if you have the GNU gssapi libraries */ -#undef HAVE_GSSGNU - -/* Define if you have the Heimdal gssapi libraries */ -#define HAVE_GSSHEIMDAL - -/* Define if you have the MIT gssapi libraries */ -#undef HAVE_GSSMIT - -/* Define if you have the `ucb' library (-lucb). */ -#undef HAVE_LIBUCB - -/* Define if you have the `localtime_r' function. */ -#define HAVE_LOCALTIME_R - -/* Define if you have the header file. */ -#define HAVE_MALLOC_H - -/* Define if you need the malloc.h header file even with stdlib.h */ -/* #define NEED_MALLOC_H 1 */ - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the header file. */ -#define HAVE_NETDB_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IF_ETHER_H - -/* Define if you have the header file. */ -#define HAVE_NETINET_IN_H - -/* Define if you have the header file. */ -#define HAVE_NET_IF_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_CRYPTO_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_PEM_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_X509_H - -/* Define if you have the header file. */ -#undef HAVE_PEM_H - -/* Define if you have the `perror' function. */ -#define HAVE_PERROR - -/* Define if you have the header file. */ -#define HAVE_PWD_H - -/* Define if you have the `RAND_egd' function. */ -#undef HAVE_RAND_EGD - -/* Define if you have the `RAND_screen' function. */ -#undef HAVE_RAND_SCREEN - -/* Define if you have the `RAND_status' function. */ -#undef HAVE_RAND_STATUS - -/* Define if you have the header file. */ -#undef HAVE_RSA_H - -/* Define if you have the `select' function. */ -#define HAVE_SELECT - -/* Define if you have the `setvbuf' function. */ -#define HAVE_SETVBUF - -/* Define if you have the header file. */ -#undef HAVE_SGTTY_H - -/* Define if you have the `sigaction' function. */ -#define HAVE_SIGACTION - -/* Define if you have the `signal' function. */ -#undef HAVE_SIGNAL - -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H - -/* Define if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T - -/* Define if sig_atomic_t is already defined as volatile. */ -#undef HAVE_SIG_ATOMIC_T_VOLATILE - -/* Define if you have the `socket' function. */ -#define HAVE_SOCKET - -/* Define if you have the header file. */ -#undef HAVE_SSL_H - -/* Define if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - - -/* The following define is needed on OS400 to enable strcmpi(), stricmp() and - strdup(). */ -#define __cplusplus__strings__ - -/* Define if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the `strcmpi' function. */ -#define HAVE_STRCMPI - -/* Define if you have the `stricmp' function. */ -#define HAVE_STRICMP - -/* Define if you have the `strdup' function. */ -#define HAVE_STRDUP - - -/* Define if you have the `strftime' function. */ -#define HAVE_STRFTIME - -/* Define if you have the header file. */ -#define HAVE_STRINGS_H - -/* Define if you have the header file. */ -#define HAVE_STRING_H - -/* Define if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define if you have the header file. */ -#undef HAVE_STROPTS_H - -/* Define if you have the `strstr' function. */ -#define HAVE_STRSTR - -/* Define if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R - -/* Define if you have the `strtoll' function. */ -#undef HAVE_STRTOLL /* Allows ASCII compile on V5R1. */ - -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SOCKIO_H - -/* Define if you have the header file. */ -#define HAVE_SYS_STAT_H - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H - -/* Define if you have the header file. */ -#define HAVE_SYS_UN_H - -/* Define if you have the header file. */ -#define HAVE_SYS_IOCTL_H - -/* Define if you have the `tcgetattr' function. */ -#undef HAVE_TCGETATTR - -/* Define if you have the `tcsetattr' function. */ -#undef HAVE_TCSETATTR - -/* Define if you have the header file. */ -#undef HAVE_TERMIOS_H - -/* Define if you have the header file. */ -#undef HAVE_TERMIO_H - -/* Define if you have the header file. */ -#define HAVE_TIME_H - -/* Define if you have the `uname' function. */ -#undef HAVE_UNAME - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H - -/* Define if you have the header file. */ -#undef HAVE_WINSOCK_H - -/* Define if you have the header file. */ -#undef HAVE_X509_H - -/* Name of package */ -#undef PACKAGE - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of a `long double', as computed by sizeof. */ -#define SIZEOF_LONG_DOUBLE 8 - -/* Define if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG - -/* The size of a `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* Whether long long constants must be suffixed by LL. */ - -#define HAVE_LL - -/* Define this if you have struct sockaddr_storage */ -#define HAVE_STRUCT_SOCKADDR_STORAGE - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define for large files, on AIX-style hosts. */ -#define _LARGE_FILES - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* type to use in place of in_addr_t if not defined */ -#define in_addr_t unsigned long - -/* Define to `unsigned' if does not define. */ -#undef size_t - -/* Define if you have the ioctl function. */ -#define HAVE_IOCTL - -/* Define if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO - -/* Define if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR - -/* To disable LDAP */ -#undef CURL_DISABLE_LDAP - -/* Definition to make a library symbol externally visible. */ -#define CURL_EXTERN_SYMBOL - -/* Define if you have the ldap_url_parse procedure. */ -/* #define HAVE_LDAP_URL_PARSE */ /* Disabled because of an IBM bug. */ - -/* Define if you have the getnameinfo function. */ -/* OS400 has no ASCII version of this procedure: wrapped in setup-os400.h. */ -#define HAVE_GETNAMEINFO - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const - -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * - -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 socklen_t - -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int - -/* Define if you have the recv function. */ -#define HAVE_RECV - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 char * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 int - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV int - -/* Define if you have the recvfrom function. */ -#define HAVE_RECVFROM - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 char - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 int - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 int - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV int - -/* Define if you have the send function. */ -#define HAVE_SEND - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 char * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 int - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV int - -/* Define to use the GSKit package. */ -#define USE_GSKIT - -/* Define to use the OS/400 crypto library. */ -#define USE_OS400CRYPTO - -/* Define to use Unix sockets. */ -#define USE_UNIX_SOCKETS - -/* Use the system keyring as the default CA bundle. */ -#define CURL_CA_BUNDLE "/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB" - -/* ---------------------------------------------------------------- */ -/* ADDITIONAL DEFINITIONS */ -/* ---------------------------------------------------------------- */ - -/* The following must be defined BEFORE system header files inclusion. */ - -#define __ptr128 /* No teraspace. */ -#define qadrt_use_fputc_inline /* Generate fputc() wrapper inline. */ -#define qadrt_use_fread_inline /* Generate fread() wrapper inline. */ -#define qadrt_use_fwrite_inline /* Generate fwrite() wrapper inline. */ - -#endif /* HEADER_CURL_CONFIG_OS400_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-osx.h b/build/premake/premake5/contrib/curl/lib/config-osx.h deleted file mode 100644 index 8ce6024424..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-osx.h +++ /dev/null @@ -1,964 +0,0 @@ -/* lib/curl_config.h.in. Generated somehow by cmake. */ - -/* when building libcurl itself */ -/* #undef BUILDING_LIBCURL */ - -/* Location of default ca bundle */ -/* #undef CURL_CA_BUNDLE */ - -/* Location of default ca path */ -/* #undef CURL_CA_PATH */ - -/* to disable cookies support */ -/* #undef CURL_DISABLE_COOKIES */ - -/* to disable cryptographic authentication */ -/* #undef CURL_DISABLE_CRYPTO_AUTH */ - -/* to disable DICT */ -/* #undef CURL_DISABLE_DICT */ - -/* to disable FILE */ -/* #undef CURL_DISABLE_FILE */ - -/* to disable FTP */ -/* #undef CURL_DISABLE_FTP */ - -/* to disable HTTP */ -/* #undef CURL_DISABLE_HTTP */ - -/* to disable LDAP */ -/* #undef CURL_DISABLE_LDAP */ - -/* to disable LDAPS */ -/* #undef CURL_DISABLE_LDAPS */ - -/* to disable proxies */ -/* #undef CURL_DISABLE_PROXY */ - -/* to disable TELNET */ -/* #undef CURL_DISABLE_TELNET */ - -/* to disable TFTP */ -/* #undef CURL_DISABLE_TFTP */ - -/* to disable verbose strings */ -/* #undef CURL_DISABLE_VERBOSE_STRINGS */ - -/* to make a symbol visible */ -/* #undef CURL_EXTERN_SYMBOL */ -/* Ensure using CURL_EXTERN_SYMBOL is possible */ -#ifndef CURL_EXTERN_SYMBOL -#define CURL_EXTERN_SYMBOL -#endif - -/* Use Windows LDAP implementation */ -/* #undef USE_WIN32_LDAP */ - -/* when not building a shared library */ -/* #undef CURL_STATICLIB */ - -/* Set to explicitly specify we don't want to use thread-safe functions */ -/* #undef DISABLED_THREADSAFE */ - -/* your Entropy Gathering Daemon socket pathname */ -/* #undef EGD_SOCKET */ - -/* Define if you want to enable IPv6 support */ -#define ENABLE_IPV6 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_QUAL_ARG1 */ - -/* Define to the type of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG1 */ - -/* Define to the type of arg 2 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG2 */ - -/* Define to the type of args 4 and 6 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG46 */ - -/* Define to the type of arg 7 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG7 */ - -/* Specifies the number of arguments to getservbyport_r */ -/* #undef GETSERVBYPORT_R_ARGS */ - -/* Specifies the size of the buffer to pass to getservbyport_r */ -/* #undef GETSERVBYPORT_R_BUFSIZE */ - -/* Define to 1 if you have the alarm function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_TFTP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `basename' function. */ -#define HAVE_BASENAME 1 - -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 - -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */ - -/* Define to 1 if you have the `closesocket' function. */ -/* #undef HAVE_CLOSESOCKET */ - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRYPTO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -/* #undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define to 1 if you have the fcntl function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the fdopen function. */ -/* #undef HAVE_FDOPEN */ - -/* Define to 1 if you have the `fork' function. */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have the freeifaddrs function. */ -#define HAVE_FREEIFADDRS 1 - -/* Define to 1 if you have the ftruncate function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyaddr_r function. */ -/* #undef HAVE_GETHOSTBYADDR_R */ - -/* gethostbyaddr_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYADDR_R_5 */ - -/* gethostbyaddr_r() takes 7 args */ -/* #undef HAVE_GETHOSTBYADDR_R_7 */ - -/* gethostbyaddr_r() takes 8 args */ -/* #undef HAVE_GETHOSTBYADDR_R_8 */ - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostbyname_r function. */ -/* #undef HAVE_GETHOSTBYNAME_R */ - -/* gethostbyname_r() takes 3 args */ -/* #undef HAVE_GETHOSTBYNAME_R_3 */ - -/* gethostbyname_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYNAME_R_5 */ - -/* gethostbyname_r() takes 6 args */ -/* #undef HAVE_GETHOSTBYNAME_R_6 */ - -/* Define to 1 if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have a working getifaddrs function. */ -/* #undef HAVE_GETIFADDRS */ - -/* Define to 1 if you have the getnameinfo function. */ -/* #undef HAVE_GETNAMEINFO */ - -/* Define to 1 if you have the `getpass_r' function. */ -/* #undef HAVE_GETPASS_R */ - -/* Define to 1 if you have the `getppid' function. */ -/* #undef HAVE_GETPPID */ - -/* Define to 1 if you have the `getprotobyname' function. */ -#define HAVE_GETPROTOBYNAME 1 - -/* Define to 1 if you have the `getpwuid' function. */ -#define HAVE_GETPWUID 1 - -/* Define to 1 if you have the `getrlimit' function. */ -#define HAVE_GETRLIMIT 1 - -/* Define to 1 if you have the getservbyport_r function. */ -/* #undef HAVE_GETSERVBYPORT_R */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have a working glibc-style strerror_r function. */ -/* #undef HAVE_GLIBC_STRERROR_R */ - -/* Define to 1 if you have a working gmtime_r function. */ -#define HAVE_GMTIME_R 1 - -/* if you have the gssapi libraries */ -/* #undef HAVE_GSSAPI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */ - -/* if you have the GNU gssapi libraries */ -/* #undef HAVE_GSSGNU */ - -/* if you have the Heimdal gssapi libraries */ -/* #undef HAVE_GSSHEIMDAL */ - -/* if you have the MIT gssapi libraries */ -/* #undef HAVE_GSSMIT */ - -/* Define to 1 if you have the `idna_strerror' function. */ -/* #undef HAVE_IDNA_STRERROR */ - -/* Define to 1 if you have the `idn_free' function. */ -/* #undef HAVE_IDN_FREE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IDN_FREE_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_IFADDRS_H 1 - -/* Define to 1 if you have the `inet_addr' function. */ -#define HAVE_INET_ADDR 1 - -/* Define to 1 if you have the inet_ntoa_r function. */ -/* #undef HAVE_INET_NTOA_R */ - -/* inet_ntoa_r() takes 2 args */ -/* #undef HAVE_INET_NTOA_R_2 */ - -/* inet_ntoa_r() takes 3 args */ -/* #undef HAVE_INET_NTOA_R_3 */ - -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ -#define HAVE_INET_PTON 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the ioctl function. */ -#define HAVE_IOCTL 1 - -/* Define to 1 if you have the ioctlsocket function. */ -/* #undef HAVE_IOCTLSOCKET */ - -/* Define to 1 if you have the IoctlSocket camel case function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL */ - -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -/* #undef HAVE_IOCTLSOCKET_FIONBIO */ - -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 - -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* if you have the Kerberos4 libraries (including -ldes) */ -/* #undef HAVE_KRB4 */ - -/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KRB_H */ - -/* Define to 1 if you have the lber.h header file. */ -#define HAVE_LBER_H 1 - -/* Define to 1 if you have the ldapssl.h header file. */ -/* #undef HAVE_LDAPSSL_H */ - -/* Define to 1 if you have the ldap.h header file. */ -#define HAVE_LDAP_H 1 - -/* Use LDAPS implementation */ -/* #undef HAVE_LDAP_SSL */ - -/* Define to 1 if you have the ldap_ssl.h header file. */ -/* #undef HAVE_LDAP_SSL_H */ - -/* Define to 1 if you have the `ldap_url_parse' function. */ -#define HAVE_LDAP_URL_PARSE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBGEN_H 1 - -/* Define to 1 if you have the `idn' library (-lidn). */ -/* #undef HAVE_LIBIDN */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -/* #undef HAVE_LIBRESOLV */ - -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the `ssh2' library (-lssh2). */ -/* #undef HAVE_LIBSSH2 */ - -/* Define to 1 if libssh2 provides `libssh2_version'. */ -/* #undef HAVE_LIBSSH2_VERSION */ - -/* Define to 1 if libssh2 provides `libssh2_init'. */ -/* #undef HAVE_LIBSSH2_INIT */ - -/* Define to 1 if libssh2 provides `libssh2_exit'. */ -/* #undef HAVE_LIBSSH2_EXIT */ - -/* Define to 1 if libssh2 provides `libssh2_scp_send64'. */ -/* #undef HAVE_LIBSSH2_SCP_SEND64 */ - -/* Define to 1 if libssh2 provides `libssh2_session_handshake'. */ -/* #undef HAVE_LIBSSH2_SESSION_HANDSHAKE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBSSH2_H */ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -/* #undef HAVE_LIBSSL */ - -/* if zlib is available */ -/* #undef HAVE_LIBZ */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* if your compiler supports LL */ -#define HAVE_LL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have a working localtime_r function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG 1 - -/* Define to 1 if you have the malloc.h header file. */ -/* #undef HAVE_MALLOC_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/* #undef HAVE_MSG_NOSIGNAL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if NI_WITHSCOPEID exists and works. */ -/* #undef HAVE_NI_WITHSCOPEID */ - -/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE */ -/* #undef HAVE_OLD_GSSMIT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_CRYPTO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_ENGINE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_ERR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_PEM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_PKCS12_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_RSA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_SSL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_X509_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PEM_H */ - -/* Define to 1 if you have the `perror' function. */ -#define HAVE_PERROR 1 - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have a working poll function. */ -#define HAVE_POLL 1 - -/* If you have a fine poll */ -#define HAVE_POLL_FINE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have a working POSIX-style strerror_r function. */ -#define HAVE_POSIX_STRERROR_R 1 - -/* Define to 1 if you have the header file */ -/* #undef HAVE_PTHREAD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `RAND_egd' function. */ -/* #undef HAVE_RAND_EGD */ - -/* Define to 1 if you have the `RAND_screen' function. */ -/* #undef HAVE_RAND_SCREEN */ - -/* Define to 1 if you have the `RAND_status' function. */ -/* #undef HAVE_RAND_STATUS */ - -/* Define to 1 if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to 1 if you have the recvfrom function. */ -/* #undef HAVE_RECVFROM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RSA_H */ - -/* Define to 1 if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SETJMP_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmode' function. */ -/* #undef HAVE_SETMODE */ - -/* Define to 1 if you have the `setrlimit' function. */ -#define HAVE_SETRLIMIT 1 - -/* Define to 1 if you have the setsockopt function. */ -#define HAVE_SETSOCKOPT 1 - -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SGTTY_H 1 - -/* Define to 1 if you have the sigaction function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the siginterrupt function. */ -#define HAVE_SIGINTERRUPT 1 - -/* Define to 1 if you have the signal function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the sigsetjmp function or macro. */ -#define HAVE_SIGSETJMP 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `SSL_get_shutdown' function. */ -/* #undef HAVE_SSL_GET_SHUTDOWN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the strcasestr function. */ -/* #undef HAVE_STRCASESTR */ - -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the strerror_r function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the stricmp function. */ -/* #undef HAVE_STRICMP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the strlcat function. */ -#define HAVE_STRLCAT 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the strncasecmp function. */ -/* #undef HAVE_STRNCASECMP */ - -/* Define to 1 if you have the strncmpi function. */ -/* #undef HAVE_STRNCMPI */ - -/* Define to 1 if you have the strnicmp function. */ -/* #undef HAVE_STRNICMP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the strtok_r function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the strtoll function. */ -#define HAVE_STRTOLL 1 - -/* if struct sockaddr_storage is defined */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if you have the timeval struct. */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_POLL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UTIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TERMIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TLD_H */ - -/* Define to 1 if you have the `tld_strerror' function. */ -/* #undef HAVE_TLD_STRERROR */ - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if compiler supports C99 variadic macro style. */ -/* #undef HAVE_VARIADIC_MACROS_C99 */ - -/* Define to 1 if compiler supports old gcc variadic macro style. */ -/* #undef HAVE_VARIADIC_MACROS_GCC */ - -/* Define to 1 if you have the winber.h header file. */ -/* #undef HAVE_WINBER_H */ - -/* Define to 1 if you have the windows.h header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Define to 1 if you have the winldap.h header file. */ -/* #undef HAVE_WINLDAP_H */ - -/* Define to 1 if you have the winsock2.h header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define this symbol if your OS supports changing the contents of argv */ -/* #undef HAVE_WRITABLE_ARGV */ - -/* Define to 1 if you have the writev function. */ -/* #undef HAVE_WRITEV */ - -/* Define to 1 if you have the ws2tcpip.h header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_X509_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_PROCESS_H */ - -/* if you have the zlib.h header file */ -/* #undef HAVE_ZLIB_H */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -/* #undef LT_OBJDIR */ - -/* If you lack a fine basename() prototype */ -/* #undef NEED_BASENAME_PROTO */ - -/* Define to 1 if you need the lber.h header file even with ldap.h */ -/* #undef NEED_LBER_H */ - -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* cpu-machine-OS */ -#define OS "Darwin" - -/* Name of package */ -/* #undef PACKAGE */ - -/* Define to the address where bug reports for this package should be sent. */ -/* #undef PACKAGE_BUGREPORT */ - -/* Define to the full name of this package. */ -/* #undef PACKAGE_NAME */ - -/* Define to the full name and version of this package. */ -/* #undef PACKAGE_STRING */ - -/* Define to the one symbol short name of this package. */ -/* #undef PACKAGE_TARNAME */ - -/* Define to the version of this package. */ -/* #undef PACKAGE_VERSION */ - -/* a suitable file to read random data from */ -#define RANDOM_FILE "/dev/urandom" - -/* Define to the type of arg 1 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG1 */ - -/* Define to the type pointed by arg 2 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG2 */ - -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG2_IS_VOID */ - -/* Define to the type of arg 3 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG3 */ - -/* Define to the type of arg 4 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG4 */ - -/* Define to the type pointed by arg 5 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG5 */ - -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ - -/* Define to the type pointed by arg 6 for recvfrom. */ -/* #undef RECVFROM_TYPE_ARG6 */ - -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ - -/* Define to the function return type for recvfrom. */ -/* #undef RECVFROM_TYPE_RETV */ - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* Define to the type qualifier of arg 5 for select. */ -/* #undef SELECT_QUAL_ARG5 */ - -/* Define to the type of arg 1 for select. */ -/* #undef SELECT_TYPE_ARG1 */ - -/* Define to the type of args 2, 3 and 4 for select. */ -/* #undef SELECT_TYPE_ARG234 */ - -/* Define to the type of arg 5 for select. */ -/* #undef SELECT_TYPE_ARG5 */ - -/* Define to the function return type for select. */ -/* #undef SELECT_TYPE_RETV */ - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `off_t', as computed by sizeof. */ -/* #undef SIZEOF_OFF_T */ - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 8 - -/* The size of `void*', as computed by sizeof. */ -/* #undef SIZEOF_VOIDP */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to the type of arg 3 for strerror_r. */ -/* #undef STRERROR_R_TYPE_ARG3 */ - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if you want to enable c-ares support */ -/* #undef USE_ARES */ - -/* Define if you want to enable POSIX threaded DNS lookup */ -/* #undef USE_THREADS_POSIX */ - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* if GnuTLS is enabled */ -/* #undef USE_GNUTLS */ - -/* if PolarSSL is enabled */ -/* #undef USE_POLARSSL */ - -/* if libSSH2 is in use */ -/* #undef USE_LIBSSH2 */ - -/* If you want to build curl with the built-in manual */ -#define USE_MANUAL 1 - -/* if NSS is enabled */ -/* #undef USE_NSS */ - -/* if you want to use OpenLDAP code instead of legacy ldap implementation */ -/* #undef USE_OPENLDAP */ - -/* if OpenSSL is in use */ -/* #undef USE_OPENSSL */ - -/* if Unix domain sockets are enabled */ -#define USE_UNIX_SOCKETS - -/* Define to 1 if you are building a Windows target without large file - support. */ -/* #undef USE_WIN32_LARGE_FILES */ - -/* to enable SSPI support */ -/* #undef USE_WINDOWS_SSPI */ - -/* to enable Windows SSL */ -/* #undef USE_SCHANNEL */ - -/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */ -/* #undef USE_YASSLEMUL */ - -/* Version number of package */ -/* #undef VERSION */ - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define to 1 if OS is AIX. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* define this if you need it to compile thread-safe code */ -/* #undef _THREAD_SAFE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ diff --git a/build/premake/premake5/contrib/curl/lib/config-riscos.h b/build/premake/premake5/contrib/curl/lib/config-riscos.h deleted file mode 100644 index 0379524fb3..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-riscos.h +++ /dev/null @@ -1,513 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_RISCOS_H -#define HEADER_CURL_CONFIG_RISCOS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* Hand crafted config file for RISC OS */ -/* ================================================================ */ - -/* Name of this package! */ -#undef PACKAGE - -/* Version number of this archive. */ -#undef VERSION - -/* Define if you have the getpass function. */ -#undef HAVE_GETPASS - -/* Define cpu-machine-OS */ -#define OS "ARM-RISC OS" - -/* Define if you want the built-in manual */ -#define USE_MANUAL - -/* Define if you have the gethostbyaddr_r() function with 5 arguments */ -#undef HAVE_GETHOSTBYADDR_R_5 - -/* Define if you have the gethostbyaddr_r() function with 7 arguments */ -#undef HAVE_GETHOSTBYADDR_R_7 - -/* Define if you have the gethostbyaddr_r() function with 8 arguments */ -#undef HAVE_GETHOSTBYADDR_R_8 - -/* Define if you have the gethostbyname_r() function with 3 arguments */ -#undef HAVE_GETHOSTBYNAME_R_3 - -/* Define if you have the gethostbyname_r() function with 5 arguments */ -#undef HAVE_GETHOSTBYNAME_R_5 - -/* Define if you have the gethostbyname_r() function with 6 arguments */ -#undef HAVE_GETHOSTBYNAME_R_6 - -/* Define if you need the _REENTRANT define for some functions */ -#undef NEED_REENTRANT - -/* Define if you have the Kerberos4 libraries (including -ldes) */ -#undef HAVE_KRB4 - -/* Define if you want to enable IPv6 support */ -#undef ENABLE_IPV6 - -/* Define if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define this to 'int' if ssize_t is not an available typedefed type */ -#undef ssize_t - -/* Define this as a suitable file to read random data from */ -#undef RANDOM_FILE - -/* Define this to your Entropy Gathering Daemon socket pathname */ -#undef EGD_SOCKET - -/* Define if you want to enable IPv6 support */ -#undef ENABLE_IPV6 - -/* Define if you have the alarm function. */ -#define HAVE_ALARM - -/* Define if you have the header file. */ -#define HAVE_ALLOCA_H - -/* Define if you have the header file. */ -#define HAVE_ARPA_INET_H - -/* Define if you have the `closesocket' function. */ -#undef HAVE_CLOSESOCKET - -/* Define if you have the header file. */ -#undef HAVE_CRYPTO_H - -/* Define if you have the header file. */ -#undef HAVE_DES_H - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H - -/* Define if you have the header file. */ -#undef HAVE_ERR_H - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H - -/* Define if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE - -/* Define if getaddrinfo exists and works */ -#define HAVE_GETADDRINFO - -/* Define if you have the `geteuid' function. */ -#undef HAVE_GETEUID - -/* Define if you have the `gethostbyaddr' function. */ -#define HAVE_GETHOSTBYADDR - -/* Define if you have the `gethostbyaddr_r' function. */ -#undef HAVE_GETHOSTBYADDR_R - -/* Define if you have the `gethostbyname_r' function. */ -#undef HAVE_GETHOSTBYNAME_R - -/* Define if you have the `gethostname' function. */ -#define HAVE_GETHOSTNAME - -/* Define if you have the header file. */ -#define HAVE_GETOPT_H - -/* Define if you have the `getpass_r' function. */ -#undef HAVE_GETPASS_R - -/* Define if you have the `getpwuid' function. */ -#undef HAVE_GETPWUID - -/* Define if you have the `getservbyname' function. */ -#undef HAVE_GETSERVBYNAME - -/* Define if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY - -/* Define if you have the `timeval' struct. */ -#define HAVE_STRUCT_TIMEVAL - -/* Define if you have the `inet_addr' function. */ -#undef HAVE_INET_ADDR - -/* Define if you have the header file. */ -#define HAVE_INTTYPES_H - -/* Define if you have the header file. */ -#undef HAVE_IO_H - -/* Define if you have the `krb_get_our_ip_for_realm' function. */ -#undef HAVE_KRB_GET_OUR_IP_FOR_REALM - -/* Define if you have the header file. */ -#undef HAVE_KRB_H - -/* Define if you have the `crypto' library (-lcrypto). */ -#undef HAVE_LIBCRYPTO - -/* Define if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the `resolv' library (-lresolv). */ -#undef HAVE_LIBRESOLV - -/* Define if you have the `resolve' library (-lresolve). */ -#undef HAVE_LIBRESOLVE - -/* Define if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Define if you have the `ssl' library (-lssl). */ -#undef HAVE_LIBSSL - -/* Define if you have the `ucb' library (-lucb). */ -#undef HAVE_LIBUCB - -/* Define if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define if you have the header file. */ -#define HAVE_MALLOC_H - -/* Define if you need the malloc.h header file even with stdlib.h */ -/* #define NEED_MALLOC_H 1 */ - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the header file. */ -#define HAVE_NETDB_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IF_ETHER_H - -/* Define if you have the header file. */ -#define HAVE_NETINET_IN_H - -/* Define if you have the header file. */ -#define HAVE_NET_IF_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_CRYPTO_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_PEM_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_X509_H - -/* Define if you have the header file. */ -#undef HAVE_PEM_H - -/* Define if you have the `perror' function. */ -#undef HAVE_PERROR - -/* Define if you have the header file. */ -#undef HAVE_PWD_H - -/* Define if you have the `RAND_egd' function. */ -#undef HAVE_RAND_EGD - -/* Define if you have the `RAND_screen' function. */ -#undef HAVE_RAND_SCREEN - -/* Define if you have the `RAND_status' function. */ -#undef HAVE_RAND_STATUS - -/* Define if you have the header file. */ -#undef HAVE_RSA_H - -/* Define if you have the `select' function. */ -#define HAVE_SELECT - -/* Define if you have the `setvbuf' function. */ -#undef HAVE_SETVBUF - -/* Define if you have the header file. */ -#define HAVE_SGTTY_H - -/* Define if you have the `sigaction' function. */ -#undef HAVE_SIGACTION - -/* Define if you have the `signal' function. */ -#define HAVE_SIGNAL - -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H - -/* Define if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T - -/* Define if sig_atomic_t is already defined as volatile. */ -#undef HAVE_SIG_ATOMIC_T_VOLATILE - -/* Define if you have the `socket' function. */ -#define HAVE_SOCKET - -/* Define if you have the header file. */ -#undef HAVE_SSL_H - -/* Define if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the `strcmpi' function. */ -#undef HAVE_STRCMPI - -/* Define if you have the `strdup' function. */ -#define HAVE_STRDUP - -/* Define if you have the `strftime' function. */ -#define HAVE_STRFTIME - -/* Define if you have the `stricmp' function. */ -#define HAVE_STRICMP - -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define if you have the header file. */ -#define HAVE_STRING_H - -/* Define if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define if you have the `strstr' function. */ -#define HAVE_STRSTR - -/* Define if you have the `strtok_r' function. */ -#undef HAVE_STRTOK_R - -/* Define if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SOCKIO_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H - -/* Define if you have the `tcgetattr' function. */ -#define HAVE_TCGETATTR - -/* Define if you have the `tcsetattr' function. */ -#define HAVE_TCSETATTR - -/* Define if you have the header file. */ -#define HAVE_TERMIOS_H - -/* Define if you have the header file. */ -#undef HAVE_TERMIO_H - -/* Define if you have the header file. */ -#undef HAVE_TIME_H - -/* Define if you have the `uname' function. */ -#define HAVE_UNAME - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H - -/* Define if you have the header file. */ -#undef HAVE_WINSOCK_H - -/* Define if you have the header file. */ -#undef HAVE_X509_H - -/* Name of package */ -#undef PACKAGE - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long double', as computed by sizeof. */ -#undef SIZEOF_LONG_DOUBLE - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 4 - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `unsigned' if does not define. */ -#undef size_t - -/* Define to `int' if does not define. */ -#undef ssize_t - -/* Define if you have the ioctl function. */ -#define HAVE_IOCTL - -/* Define if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO - -/* to disable LDAP */ -#define CURL_DISABLE_LDAP - -/* Define if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const - -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * - -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t - -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int - -/* Define if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV ssize_t - -/* Define 1 if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void - -/* Define if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 int - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t - -/* Define if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV ssize_t - -#endif /* HEADER_CURL_CONFIG_RISCOS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-symbian.h b/build/premake/premake5/contrib/curl/lib/config-symbian.h deleted file mode 100644 index 92983d2421..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-symbian.h +++ /dev/null @@ -1,811 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_SYMBIAN_H -#define HEADER_CURL_CONFIG_SYMBIAN_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* Hand crafted config file for Symbian */ -/* ================================================================ */ - -/* Location of default ca bundle */ -/* #define CURL_CA_BUNDLE "/etc/pki/tls/certs/ca-bundle.crt"*/ - -/* Location of default ca path */ -/* #undef CURL_CA_PATH */ - -/* to disable cookies support */ -/* #undef CURL_DISABLE_COOKIES */ - -/* to disable cryptographic authentication */ -/* #undef CURL_DISABLE_CRYPTO_AUTH */ - -/* to disable DICT */ -/* #undef CURL_DISABLE_DICT */ - -/* to disable FILE */ -/* #undef CURL_DISABLE_FILE */ - -/* to disable FTP */ -/* #undef CURL_DISABLE_FTP */ - -/* to disable HTTP */ -/* #undef CURL_DISABLE_HTTP */ - -/* to disable LDAP */ -#define CURL_DISABLE_LDAP 1 - -/* to disable LDAPS */ -#define CURL_DISABLE_LDAPS 1 - -/* to disable TELNET */ -/* #undef CURL_DISABLE_TELNET */ - -/* to disable TFTP */ -/* #undef CURL_DISABLE_TFTP */ - -/* to disable verbose strings */ -/* #define CURL_DISABLE_VERBOSE_STRINGS 1*/ - -/* Definition to make a library symbol externally visible. */ -/* #undef CURL_EXTERN_SYMBOL */ - -/* Use Windows LDAP implementation */ -/* #undef USE_WIN32_LDAP */ - -/* your Entropy Gathering Daemon socket pathname */ -/* #undef EGD_SOCKET */ - -/* Define if you want to enable IPv6 support */ -#define ENABLE_IPV6 1 - -/* Define if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const - -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * - -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t - -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int - -/* Define to 1 if you have the header file. */ -/*#define HAVE_ALLOCA_H 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -/*#define HAVE_ARPA_TFTP_H 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `basename' function. */ -/*#define HAVE_BASENAME 1*/ - -/* Define to 1 if bool is an available type. */ -/*#define HAVE_BOOL_T 1*/ - -/* Define to 1 if you have the `closesocket' function. */ -/* #undef HAVE_CLOSESOCKET */ - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -/*#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1*/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRYPTO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -/*#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the fcntl function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the `fork' function. */ -/*#define HAVE_FORK 1*/ - -/* Define to 1 if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE 1 - -/* Define if getaddrinfo exists and works */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `gethostbyaddr' function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* If you have gethostbyname */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gethostbyname_r' function. */ -/* #undef HAVE_GETHOSTBYNAME_R */ - -/* gethostbyname_r() takes 3 args */ -/* #undef HAVE_GETHOSTBYNAME_R_3 */ - -/* gethostbyname_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYNAME_R_5 */ - -/* gethostbyname_r() takes 6 args */ -/* #undef HAVE_GETHOSTBYNAME_R_6 */ - -/* Define to 1 if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `getpass_r' function. */ -/* #undef HAVE_GETPASS_R */ - -/* Define to 1 if you have the `getppid' function. */ -#define HAVE_GETPPID 1 - -/* Define to 1 if you have the `getprotobyname' function. */ -#define HAVE_GETPROTOBYNAME 1 - -/* Define to 1 if you have the `getpwuid' function. */ -#define HAVE_GETPWUID 1 - -/* Define to 1 if you have the `getrlimit' function. */ -/*#define HAVE_GETRLIMIT 1*/ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* we have a glibc-style strerror_r() */ -/* #undef HAVE_GLIBC_STRERROR_R */ - -/* Define to 1 if you have the `gmtime_r' function. */ -#define HAVE_GMTIME_R 1 - -/* if you have the gssapi libraries */ -/* #undef HAVE_GSSAPI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */ - -/* if you have the GNU gssapi libraries */ -/* #undef HAVE_GSSGNU */ - -/* if you have the Heimdal gssapi libraries */ -/* #undef HAVE_GSSHEIMDAL */ - -/* if you have the MIT gssapi libraries */ -/* #undef HAVE_GSSMIT */ - -/* Define to 1 if you have the `idna_strerror' function. */ -/*#define HAVE_IDNA_STRERROR 1*/ - -/* Define to 1 if you have the `idn_free' function. */ -/*#define HAVE_IDN_FREE 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_IDN_FREE_H 1*/ - -/* Define to 1 if you have the `inet_addr' function. */ -/*#define HAVE_INET_ADDR 1*/ - -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -/*#define HAVE_INET_NTOP 1*/ - -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ -/*#define HAVE_INET_PTON 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the ioctl function. */ -#define HAVE_IOCTL 1 - -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 - -/* Define to 1 if you have the ioctlsocket function. */ -/* #undef HAVE_IOCTLSOCKET */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -/* #undef HAVE_IOCTLSOCKET_FIONBIO */ - -/* Define to 1 if you have the IoctlSocket camel case function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL */ - -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO - function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* if you have the Kerberos4 libraries (including -ldes) */ -/* #undef HAVE_KRB4 */ - -/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KRB_H */ - -/* Define to 1 if you have the lber.h header file. */ -/*#define HAVE_LBER_H 1*/ - -/* Define to 1 if you have the ldapssl.h header file. */ -/* #undef HAVE_LDAPSSL_H */ - -/* Define to 1 if you have the ldap.h header file. */ -/*#define HAVE_LDAP_H 1*/ - -/* Use LDAPS implementation */ -/*#define HAVE_LDAP_SSL 1*/ - -/* Define to 1 if you have the ldap_ssl.h header file. */ -/* #undef HAVE_LDAP_SSL_H */ - -/* Define to 1 if you have the `ldap_url_parse' function. */ -/*#define HAVE_LDAP_URL_PARSE 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_LIBGEN_H 1*/ - -/* Define to 1 if you have the `idn' library (-lidn). */ -/*#define HAVE_LIBIDN 1*/ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -/* #undef HAVE_LIBRESOLV */ - -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the `ssh2' library (-lssh2). */ -/*#define HAVE_LIBSSH2 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_LIBSSH2_H 1*/ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -/*#define HAVE_LIBSSL 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* if your compiler supports LL */ -#define HAVE_LL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the `localtime_r' function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG 1 - -/* Define to 1 if you have the malloc.h header file. */ -/*#define HAVE_MALLOC_H 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/*#define HAVE_MSG_NOSIGNAL 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -/*#define HAVE_NETINET_TCP_H 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if NI_WITHSCOPEID exists and works. */ -/*#define HAVE_NI_WITHSCOPEID 1*/ - -/* we have no strerror_r() proto */ -/* #undef HAVE_NO_STRERROR_R_DECL */ - -/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE - */ -/* #undef HAVE_OLD_GSSMIT */ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_CRYPTO_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_ENGINE_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_ERR_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_PEM_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_PKCS12_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_RSA_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_SSL_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_OPENSSL_X509_H 1*/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PEM_H */ - -/* Define to 1 if you have the `perror' function. */ -#define HAVE_PERROR 1 - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have the `poll' function. */ -/*#define HAVE_POLL 1*/ - -/* If you have a fine poll */ -/*#define HAVE_POLL_FINE 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_POLL_H 1*/ - -/* we have a POSIX-style strerror_r() */ -#define HAVE_POSIX_STRERROR_R 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `RAND_egd' function. */ -#define HAVE_RAND_EGD 1 - -/* Define to 1 if you have the `RAND_screen' function. */ -/* #undef HAVE_RAND_SCREEN */ - -/* Define to 1 if you have the `RAND_status' function. */ -/*#define HAVE_RAND_STATUS 1*/ - -/* Define to 1 if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to 1 if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RSA_H */ - -/* Define to 1 if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SETJMP_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmode' function. */ -/* #undef HAVE_SETMODE */ - -/* Define to 1 if you have the `setrlimit' function. */ -/*#define HAVE_SETRLIMIT 1*/ - -/* Define to 1 if you have the setsockopt function. */ -/* #undef HAVE_SETSOCKOPT */ - -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_SGTTY_H 1*/ - -/* Define to 1 if you have the `sigaction' function. */ -/*#define HAVE_SIGACTION 1*/ - -/* Define to 1 if you have the `siginterrupt' function. */ -/*#define HAVE_SIGINTERRUPT 1*/ - -/* Define to 1 if you have the `signal' function. */ -/*#define HAVE_SIGNAL 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* If you have sigsetjmp */ -/*#define HAVE_SIGSETJMP 1*/ - -/* Define to 1 if sig_atomic_t is an available typedef. */ -/*#define HAVE_SIG_ATOMIC_T 1*/ - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `SSL_get_shutdown' function. */ -/*#define HAVE_SSL_GET_SHUTDOWN 1*/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strcmpi' function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the `stricmp' function. */ -/* #undef HAVE_STRICMP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* if struct sockaddr_storage is defined */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if you have the timeval struct. */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/*#define HAVE_SYS_POLL_H 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UTIME_H */ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_TERMIOS_H 1*/ - -/* Define to 1 if you have the header file. */ -/*#define HAVE_TERMIO_H 1*/ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -/*#define HAVE_TLD_H 1*/ - -/* Define to 1 if you have the `tld_strerror' function. */ -/*#define HAVE_TLD_STRERROR 1*/ - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if compiler supports C99 variadic macro style. */ -#define HAVE_VARIADIC_MACROS_C99 1 - -/* Define to 1 if compiler supports old gcc variadic macro style. */ -/*#define HAVE_VARIADIC_MACROS_GCC 1*/ - -/* Define to 1 if you have the winber.h header file. */ -/* #undef HAVE_WINBER_H */ - -/* Define to 1 if you have the windows.h header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Define to 1 if you have the winldap.h header file. */ -/* #undef HAVE_WINLDAP_H */ - -/* Define to 1 if you have the winsock2.h header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define this symbol if your OS supports changing the contents of argv */ -/*#define HAVE_WRITABLE_ARGV 1*/ - -/* Define to 1 if you have the ws2tcpip.h header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_X509_H */ - -/* Define to 1 if you need the lber.h header file even with ldap.h */ -/* #undef NEED_LBER_H */ - -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#ifdef __WINS__ -#define OS "i386-pc-epoc32" -#elif __MARM__ -#define OS "arm-unknown-epoc32" -#else -/* This won't happen on any current Symbian version */ -#define OS "unknown-unknown-epoc32" -#endif - -/* Name of package */ -/*#define PACKAGE "curl"*/ - -/* Define to the address where bug reports for this package should be sent. */ -/*#define PACKAGE_BUGREPORT \ - "a suitable curl mailing list => https://curl.haxx.se/mail/"*/ - -/* Define to the full name of this package. */ -/*#define PACKAGE_NAME "curl"*/ - -/* Define to the full name and version of this package. */ -/*#define PACKAGE_STRING "curl -"*/ - -/* Define to the one symbol short name of this package. */ -/*#define PACKAGE_TARNAME "curl"*/ - -/* Define to the version of this package. */ -/*#define PACKAGE_VERSION "-"*/ - -/* a suitable file to read random data from */ -/*#define RANDOM_FILE "/dev/urandom"*/ - -#define RECV_TYPE_ARG1 int -#define RECV_TYPE_ARG2 void * -#define RECV_TYPE_ARG3 size_t -#define RECV_TYPE_ARG4 int -#define RECV_TYPE_RETV ssize_t - -#define RECVFROM_TYPE_ARG1 int -#define RECVFROM_TYPE_ARG2 void -#define RECVFROM_TYPE_ARG3 size_t -#define RECVFROM_TYPE_ARG4 int -#define RECVFROM_TYPE_ARG5 struct sockaddr -#define RECVFROM_TYPE_ARG6 size_t -#define RECVFROM_TYPE_RETV ssize_t -#define RECVFROM_TYPE_ARG2_IS_VOID 1 - -#define SEND_TYPE_ARG1 int -#define SEND_QUAL_ARG2 const -#define SEND_TYPE_ARG2 void * -#define SEND_TYPE_ARG3 size_t -#define SEND_TYPE_ARG4 int -#define SEND_TYPE_RETV ssize_t - - -/* Define as the return type of signal handlers (`int' or `void'). */ -/*#define RETSIGTYPE void*/ - -/* Define to the type of arg 1 for `select'. */ -#define SELECT_TYPE_ARG1 int - -/* Define to the type of args 2, 3 and 4 for `select'. */ -#define SELECT_TYPE_ARG234 (fd_set *) - -/* Define to the type of arg 5 for `select'. */ -#define SELECT_TYPE_ARG5 (struct timeval *) - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `off_t', as computed by sizeof. */ -#define SIZEOF_OFF_T 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 4 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 4 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if you want to enable c-ares support */ -/* #undef USE_ARES */ - -/* Define to disable non-blocking sockets */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* if GnuTLS is enabled */ -/* #undef USE_GNUTLS */ - -/* if libSSH2 is in use */ -/*#define USE_LIBSSH2 1*/ - -/* If you want to build curl with the built-in manual */ -/*#define USE_MANUAL 1*/ - -/* if NSS is enabled */ -/* #undef USE_NSS */ - -/* to enable SSPI support */ -/* #undef USE_WINDOWS_SSPI */ - -/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */ -/* #undef USE_YASSLEMUL */ - -/* Version number of package */ -/*#define VERSION "7.18.2-CVS"*/ - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define to 1 if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* type to use in place of in_addr_t if not defined */ -/* #undef in_addr_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ - -/* Enabling curl debug mode when building in Symbian debug mode would work */ -/* except that debug mode introduces new exports that must be frozen. */ -#ifdef _DEBUG -/* #define CURLDEBUG */ -#endif - -/* sys/cdefs.h fails to define this for WINSCW prior to Symbian OS ver. 9.4 */ -#ifndef __LONG_LONG_SUPPORTED -#define __LONG_LONG_SUPPORTED -#endif - -/* Enable appropriate header only when zlib support is enabled */ -#ifdef HAVE_LIBZ -#define HAVE_ZLIB_H 1 -#endif - -#endif /* HEADER_CURL_CONFIG_SYMBIAN_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-tpf.h b/build/premake/premake5/contrib/curl/lib/config-tpf.h deleted file mode 100644 index d1714fdfc4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-tpf.h +++ /dev/null @@ -1,772 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_TPF_H -#define HEADER_CURL_CONFIG_TPF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* Hand crafted config file for TPF */ -/* ================================================================ */ - -/* ---------------------------------------------------------------- */ -/* FEATURES, FUNCTIONS, and DEFINITIONS */ -/* ---------------------------------------------------------------- */ - -/* NOTE: Refer also to the .mak file for some of the flags below */ - -/* to disable cookies support */ -/* #undef CURL_DISABLE_COOKIES */ - -/* to disable cryptographic authentication */ -/* #undef CURL_DISABLE_CRYPTO_AUTH */ - -/* to disable DICT */ -/* #undef CURL_DISABLE_DICT */ - -/* to disable FILE */ -/* #undef CURL_DISABLE_FILE */ - -/* to disable FTP */ -/* #undef CURL_DISABLE_FTP */ - -/* to disable HTTP */ -/* #undef CURL_DISABLE_HTTP */ - -/* to disable LDAP */ -/* #undef CURL_DISABLE_LDAP */ - -/* to disable TELNET */ -/* #undef CURL_DISABLE_TELNET */ - -/* to disable TFTP */ -/* #undef CURL_DISABLE_TFTP */ - -/* to disable verbose strings */ -/* #undef CURL_DISABLE_VERBOSE_STRINGS */ - -/* lber dynamic library file */ -/* #undef DL_LBER_FILE */ - -/* ldap dynamic library file */ -/* #undef DL_LDAP_FILE */ - -/* your Entropy Gathering Daemon socket pathname */ -/* #undef EGD_SOCKET */ - -/* Define if you want to enable IPv6 support */ -/* #undef ENABLE_IPV6 */ - -/* Define if struct sockaddr_in6 has the sin6_scope_id member */ -/* #undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID */ - -/* Define to the type of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG1 */ - -/* Define to the type of arg 2 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG2 */ - -/* Define to the type of args 4 and 6 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG46 */ - -/* Define to the type of arg 7 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG7 */ - -/* Define to 1 if you have the alarm function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_TFTP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `basename' function. */ -#define HAVE_BASENAME 1 - -/* Define to 1 if you have the `closesocket' function. */ -/* #undef HAVE_CLOSESOCKET */ - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */ -#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRYPTO_H */ -#define HAVE_CRYPTO_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DES_H */ -#define HAVE_DES_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -/* #undef HAVE_ENGINE_LOAD_BUILTIN_ENGINES */ -#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ERR_H */ -#define HAVE_ERR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the fcntl function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE 1 - -/* Define if getaddrinfo exists and works */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `gethostbyaddr' function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* If you have gethostbyname */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gethostbyname_r' function. */ -/* #undef HAVE_GETHOSTBYNAME_R */ - -/* gethostbyname_r() takes 3 args */ -/* #undef HAVE_GETHOSTBYNAME_R_3 */ - -/* gethostbyname_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYNAME_R_5 */ - -/* gethostbyname_r() takes 6 args */ -/* #undef HAVE_GETHOSTBYNAME_R_6 1 */ - -/* Define to 1 if you have the getnameinfo function. */ -/* #undef HAVE_GETNAMEINFO */ - -/* Define to 1 if you have the `getpass_r' function. */ -/* #undef HAVE_GETPASS_R */ - -/* Define to 1 if you have the `getprotobyname' function. */ -/* #undef HAVE_GETPROTOBYNAME */ - -/* Define to 1 if you have the `getpwuid' function. */ -#define HAVE_GETPWUID 1 - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* we have a glibc-style strerror_r() */ -/* #undef HAVE_GLIBC_STRERROR_R */ -#define HAVE_GLIBC_STRERROR_R 1 - -/* Define to 1 if you have the `gmtime_r' function. */ -#define HAVE_GMTIME_R 1 - -/* if you have the gssapi libraries */ -/* #undef HAVE_GSSAPI */ - -/* if you have the GNU gssapi libraries */ -/* #undef HAVE_GSSGNU */ - -/* if you have the Heimdal gssapi libraries */ -/* #undef HAVE_GSSHEIMDAL */ - -/* if you have the MIT gssapi libraries */ -/* #undef HAVE_GSSMIT */ - -/* Define to 1 if you have the `iconv' functions. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the `idna_strerror' function. */ -/* #undef HAVE_IDNA_STRERROR */ - -/* Define to 1 if you have the `idn_free' function. */ -/* #undef HAVE_IDN_FREE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IDN_FREE_H */ - -/* Define to 1 if you have the `inet_addr' function. */ -#define HAVE_INET_ADDR 1 - -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the ioctl function. */ -#define HAVE_IOCTL 1 - -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 - -/* Define to 1 if you have the ioctlsocket function. */ -/* #undef HAVE_IOCTLSOCKET */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -/* #undef HAVE_IOCTLSOCKET_FIONBIO */ - -/* Define to 1 if you have the IoctlSocket camel case function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL */ - -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO - function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* if you have the Kerberos4 libraries (including -ldes) */ -/* #undef HAVE_KRB4 */ - -/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KRB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBGEN_H 1 */ - -/* Define to 1 if you have the `idn' library (-lidn). */ -/* #undef HAVE_LIBIDN */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -/* #undef HAVE_LIBRESOLV */ - -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -/* #undef HAVE_LIBSSL */ -#define HAVE_LIBSSL 1 - -/* if zlib is available */ -/* #undef HAVE_LIBZ */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* if your compiler supports LL */ -#define HAVE_LL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the `localtime_r' function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG 1 - -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -/* undef HAVE_NETINET_TCP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define if NI_WITHSCOPEID exists and works */ -/* #undef HAVE_NI_WITHSCOPEID */ - -/* we have no strerror_r() proto */ -/* #undef HAVE_NO_STRERROR_R_DECL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_CRYPTO_H */ -#define HAVE_OPENSSL_CRYPTO_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_ENGINE_H */ -#define HAVE_OPENSSL_ENGINE_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_ERR_H */ -#define HAVE_OPENSSL_ERR_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_PEM_H */ -#define HAVE_OPENSSL_PEM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_PKCS12_H */ -#define HAVE_OPENSSL_PKCS12_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_RSA_H */ -#define HAVE_OPENSSL_RSA_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_SSL_H */ -#define HAVE_OPENSSL_SSL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OPENSSL_X509_H */ -#define HAVE_OPENSSL_X509_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PEM_H */ -#define HAVE_PEM_H 1 - -/* Define to 1 if you have the `perror' function. */ -#define HAVE_PERROR 1 - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have the `poll' function. */ -/* #undef HAVE_POLL */ - -/* If you have a fine poll */ -/* #undef HAVE_POLL_FINE */ - -/* we have a POSIX-style strerror_r() */ -/* #undef HAVE_POSIX_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `RAND_egd' function. */ -/* #undef HAVE_RAND_EGD */ -#define HAVE_RAND_EGD 1 - -/* Define to 1 if you have the `RAND_screen' function. */ -/* #undef HAVE_RAND_SCREEN */ - -/* Define to 1 if you have the `RAND_status' function. */ -/* #undef HAVE_RAND_STATUS */ -#define HAVE_RAND_STATUS 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RSA_H */ -#define HAVE_RSA_H 1 - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SETJMP_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setrlimit' function. */ -#define HAVE_SETRLIMIT 1 - -/* Define to 1 if you have the setsockopt function. */ -/* #undef HAVE_SETSOCKOPT */ - -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SGTTY_H 1 */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* If you have sigsetjmp */ -/* #undef HAVE_SIGSETJMP */ - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSL_H */ -#define HAVE_SSL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strcmpi' function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the `stricmp' function. */ -/* #undef HAVE_STRICMP */ -#define HAVE_STRICMP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* if struct sockaddr_storage is defined */ -/* #undef HAVE_STRUCT_SOCKADDR_STORAGE */ - -/* Define this if you have struct timeval */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_POLL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ -#define HAVE_SYS_SOCKIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UTIME_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TERMIOS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TERMIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TLD_H */ - -/* Define to 1 if you have the `tld_strerror' function. */ -/* #undef HAVE_TLD_STRERROR */ - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define this symbol if your OS supports changing the contents of argv */ -/* #undef HAVE_WRITABLE_ARGV */ - -/* Define to 1 if you have the ws2tcpip.h header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_X509_H */ - -/* if you have the zlib.h header file */ -/* #undef HAVE_ZLIB_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* cpu-machine-OS */ -#define OS "s390x-ibm-tpf" - -/* Name of package */ -#define PACKAGE "curl" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT \ - "a suitable curl mailing list => https://curl.haxx.se/mail/" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "curl" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "curl -" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "curl" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "-" - -/* a suitable file to read random data from */ -/* #undef RANDOM_FILE */ - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* Define to the type of arg 1 for `select'. */ -#define SELECT_TYPE_ARG1 int - -/* Define to the type of args 2, 3 and 4 for `select'. */ -#define SELECT_TYPE_ARG234 (fd_set *) - -/* Define to the type of arg 5 for `select'. */ -#define SELECT_TYPE_ARG5 (struct timeval *) - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `off_t', as computed by sizeof. */ -#define SIZEOF_OFF_T 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 8 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if you want to enable ares support */ -/* #undef USE_ARES */ - -/* Define to disable non-blocking sockets */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* if GnuTLS is enabled */ -/* #undef USE_GNUTLS */ - -/* If you want to build curl with the built-in manual */ -/* #undef USE_MANUAL */ - -/* if OpenSSL is in use */ -/* #undef USE_OPENSSL */ - -/* if SSL is enabled */ -/* #undef USE_OPENSSL */ - -/* to enable SSPI support */ -/* #undef USE_WINDOWS_SSPI */ - -/* Version number of package */ -#define VERSION "not-used" - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define to 1 if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* type to use in place of in_addr_t if not defined */ -/* #undef in_addr_t */ - -/* Define to `unsigned' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ - -/* Define to 1 if you have the getnameinfo function. */ -/* #undef HAVE_GETNAMEINFO 1 */ - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_QUAL_ARG1 const */ - -/* Define to the type of arg 1 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG1 struct sockaddr * */ - -/* Define to the type of arg 2 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG2 socklen_t */ - -/* Define to the type of args 4 and 6 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG46 size_t */ - -/* Define to the type of arg 7 for getnameinfo. */ -/* #undef GETNAMEINFO_TYPE_ARG7 int */ - -/* Define to 1 if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 char * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 int - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV int - -/* Define to 1 if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 char - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 int - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 int - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV int - -/* Define to 1 if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 char * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 int - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV int - -#define CURL_DOES_CONVERSIONS -#ifndef CURL_ICONV_CODESET_OF_HOST -#define CURL_ICONV_CODESET_OF_HOST "IBM-1047" -#endif - - -#endif /* HEADER_CURL_CONFIG_TPF_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-vxworks.h b/build/premake/premake5/contrib/curl/lib/config-vxworks.h deleted file mode 100644 index 780a4a225f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-vxworks.h +++ /dev/null @@ -1,928 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_VXWORKS_H -#define HEADER_CURL_CONFIG_VXWORKS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* =============================================================== */ -/* Hand crafted config file for VxWorks */ -/* =============================================================== */ - -/* Location of default ca bundle */ -/* #undef CURL_CA_BUNDLE */ - -/* Location of default ca path */ -/* #undef CURL_CA_PATH */ - -/* to disable cookies support */ -/* #undef CURL_DISABLE_COOKIES */ - -/* to disable cryptographic authentication */ -/* #undef CURL_DISABLE_CRYPTO_AUTH */ - -/* to disable DICT */ -/* #undef CURL_DISABLE_DICT */ - -/* to disable FILE */ -/* #undef CURL_DISABLE_FILE */ - -/* to disable FTP */ -#define CURL_DISABLE_FTP 1 - -/* to disable HTTP */ -/* #undef CURL_DISABLE_HTTP */ - -/* to disable LDAP */ -#define CURL_DISABLE_LDAP 1 - -/* to disable LDAPS */ -#define CURL_DISABLE_LDAPS 1 - -/* to disable NTLM authentication */ -#define CURL_DISABLE_NTLM 1 - -/* to disable proxies */ -/* #undef CURL_DISABLE_PROXY */ - -/* to disable TELNET */ -#define CURL_DISABLE_TELNET 1 - -/* to disable TFTP */ -#define CURL_DISABLE_TFTP 1 - -/* to disable verbose strings */ -/* #undef CURL_DISABLE_VERBOSE_STRINGS */ - -/* Definition to make a library symbol externally visible. */ -/* #undef CURL_EXTERN_SYMBOL */ - -/* Use Windows LDAP implementation */ -/* #undef USE_WIN32_LDAP */ - -/* your Entropy Gathering Daemon socket pathname */ -/* #undef EGD_SOCKET */ - -/* Define if you want to enable IPv6 support */ -#define ENABLE_IPV6 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const - -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * - -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 size_t - -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 unsigned int - -/* Specifies the number of arguments to getservbyport_r */ -#define GETSERVBYPORT_R_ARGS 6 - -/* Specifies the size of the buffer to pass to getservbyport_r */ -#define GETSERVBYPORT_R_BUFSIZE 4096 - -/* Define to 1 if you have the alarm function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_TFTP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `basename' function. */ -/* #undef HAVE_BASENAME */ - -/* Define to 1 if bool is an available type. */ -#define HAVE_BOOL_T 1 - -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */ - -/* Define to 1 if you have the `closesocket' function. */ -/* #undef HAVE_CLOSESOCKET */ - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRYPTO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ERR_H */ - -/* Define to 1 if you have the fcntl function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#define HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the fdopen function. */ -#define HAVE_FDOPEN 1 - -/* Define to 1 if you have the `fork' function. */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have the freeifaddrs function. */ -#define HAVE_FREEIFADDRS 1 - -/* Define to 1 if you have the ftruncate function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyaddr_r function. */ -#define HAVE_GETHOSTBYADDR_R 1 - -/* gethostbyaddr_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYADDR_R_5 */ - -/* gethostbyaddr_r() takes 7 args */ -/* #undef HAVE_GETHOSTBYADDR_R_7 */ - -/* gethostbyaddr_r() takes 8 args */ -#define HAVE_GETHOSTBYADDR_R_8 1 - -/* Define to 1 if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostbyname_r function. */ -/* #undef HAVE_GETHOSTBYNAME_R */ - -/* gethostbyname_r() takes 3 args */ -/* #undef HAVE_GETHOSTBYNAME_R_3 */ - -/* gethostbyname_r() takes 5 args */ -/* #undef HAVE_GETHOSTBYNAME_R_5 */ - -/* gethostbyname_r() takes 6 args */ -/* #undef HAVE_GETHOSTBYNAME_R_6 */ - -/* Define to 1 if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have a working getifaddrs function. */ -/* #undef HAVE_GETIFADDRS */ - -/* Define to 1 if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `getpass_r' function. */ -/* #undef HAVE_GETPASS_R */ - -/* Define to 1 if you have the `getppid' function. */ -#define HAVE_GETPPID 1 - -/* Define to 1 if you have the `getprotobyname' function. */ -#define HAVE_GETPROTOBYNAME 1 - -/* Define to 1 if you have the `getpwuid' function. */ -/* #undef HAVE_GETPWUID */ - -/* Define to 1 if you have the `getrlimit' function. */ -#define HAVE_GETRLIMIT 1 - -/* Define to 1 if you have the getservbyport_r function. */ -/* #undef HAVE_GETSERVBYPORT_R */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have a working glibc-style strerror_r function. */ -/* #undef HAVE_GLIBC_STRERROR_R */ - -/* Define to 1 if you have a working gmtime_r function. */ -#define HAVE_GMTIME_R 1 - -/* if you have the gssapi libraries */ -/* #undef HAVE_GSSAPI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */ - -/* if you have the GNU gssapi libraries */ -/* #undef HAVE_GSSGNU */ - -/* if you have the Heimdal gssapi libraries */ -/* #undef HAVE_GSSHEIMDAL */ - -/* if you have the MIT gssapi libraries */ -/* #undef HAVE_GSSMIT */ - -/* Define to 1 if you have the `idna_strerror' function. */ -/* #undef HAVE_IDNA_STRERROR */ - -/* Define to 1 if you have the `idn_free' function. */ -/* #undef HAVE_IDN_FREE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IDN_FREE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IFADDRS_H */ - -/* Define to 1 if you have the `inet_addr' function. */ -#define HAVE_INET_ADDR 1 - -/* Define to 1 if you have the inet_ntoa_r function. */ -/* #undef HAVE_INET_NTOA_R */ - -/* inet_ntoa_r() takes 2 args */ -/* #undef HAVE_INET_NTOA_R_2 */ - -/* inet_ntoa_r() takes 3 args */ -/* #undef HAVE_INET_NTOA_R_3 */ - -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the ioctl function. */ -#define HAVE_IOCTL 1 - -/* Define to 1 if you have the ioctlsocket function. */ -/* #undef HAVE_IOCTLSOCKET */ - -/* Define to 1 if you have the IoctlSocket camel case function. */ -/* #undef HAVE_IOCTLSOCKET_CAMEL */ - -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -/* #undef HAVE_IOCTLSOCKET_FIONBIO */ - -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#define HAVE_IOCTL_FIONBIO 1 - -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#define HAVE_IOCTL_SIOCGIFADDR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_IO_H 1 - -/* if you have the Kerberos4 libraries (including -ldes) */ -/* #undef HAVE_KRB4 */ - -/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_KRB_H */ - -/* Define to 1 if you have the lber.h header file. */ -/* #undef HAVE_LBER_H */ - -/* Define to 1 if you have the ldapssl.h header file. */ -/* #undef HAVE_LDAPSSL_H */ - -/* Define to 1 if you have the ldap.h header file. */ -/* #undef HAVE_LDAP_H */ - -/* Use LDAPS implementation */ -/* #undef HAVE_LDAP_SSL */ - -/* Define to 1 if you have the ldap_ssl.h header file. */ -/* #undef HAVE_LDAP_SSL_H */ - -/* Define to 1 if you have the `ldap_url_parse' function. */ -/* #undef HAVE_LDAP_URL_PARSE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBGEN_H */ - -/* Define to 1 if you have the `idn' library (-lidn). */ -/* #undef HAVE_LIBIDN */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -/* #undef HAVE_LIBRESOLV */ - -/* Define to 1 if you have the `resolve' library (-lresolve). */ -/* #undef HAVE_LIBRESOLVE */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the `ssh2' library (-lssh2). */ -/* #undef HAVE_LIBSSH2 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBSSH2_H */ - -/* Define to 1 if you have the `libssh2_version' function. */ -/* #undef HAVE_LIBSSH2_VERSION */ - -/* Define to 1 if you have the `ssl' library (-lssl). */ -#define HAVE_LIBSSL 1 - -/* if zlib is available */ -#define HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* if your compiler supports LL */ -#define HAVE_LL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have a working localtime_r function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if the compiler supports the 'long long' data type. */ -#define HAVE_LONGLONG 1 - -/* Define to 1 if you have the malloc.h header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the memory.h header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -/* #undef HAVE_MSG_NOSIGNAL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if NI_WITHSCOPEID exists and works. */ -/* #undef HAVE_NI_WITHSCOPEID */ - -/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE - */ -/* #undef HAVE_OLD_GSSMIT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_CRYPTO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_ENGINE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_ERR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_PEM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_PKCS12_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_RSA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_SSL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_X509_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PEM_H */ - -/* Define to 1 if you have the `perror' function. */ -#define HAVE_PERROR 1 - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have a working poll function. */ -/* #undef HAVE_POLL */ - -/* If you have a fine poll */ -/* #undef HAVE_POLL_FINE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_POLL_H */ - -/* Define to 1 if you have a working POSIX-style strerror_r function. */ -/* #undef HAVE_POSIX_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PWD_H */ - -/* Define to 1 if you have the `RAND_egd' function. */ -#define HAVE_RAND_EGD 1 - -/* Define to 1 if you have the `RAND_screen' function. */ -/* #undef HAVE_RAND_SCREEN */ - -/* Define to 1 if you have the `RAND_status' function. */ -#define HAVE_RAND_STATUS 1 - -/* Define to 1 if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to 1 if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RSA_H */ - -/* Define to 1 if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SETJMP_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmode' function. */ -#define HAVE_SETMODE 1 - -/* Define to 1 if you have the `setrlimit' function. */ -#define HAVE_SETRLIMIT 1 - -/* Define to 1 if you have the setsockopt function. */ -#define HAVE_SETSOCKOPT 1 - -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SGTTY_H */ - -/* Define to 1 if you have the sigaction function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the siginterrupt function. */ -#define HAVE_SIGINTERRUPT 1 - -/* Define to 1 if you have the signal function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the sigsetjmp function or macro. */ -/* #undef HAVE_SIGSETJMP */ - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ - -/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `SSL_get_shutdown' function. */ -#define HAVE_SSL_GET_SHUTDOWN 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the strcmpi function. */ -/* #undef HAVE_STRCMPI */ - -/* Define to 1 if you have the strdup function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the strerror_r function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the stricmp function. */ -/* #undef HAVE_STRICMP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the strncasecmp function. */ -#define HAVE_STRNCASECMP 1 - -/* Define to 1 if you have the strncmpi function. */ -/* #undef HAVE_STRNCMPI */ - -/* Define to 1 if you have the strnicmp function. */ -/* #undef HAVE_STRNICMP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define to 1 if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the strtok_r function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the strtoll function. */ -/* #undef HAVE_STRTOLL */ - -/* if struct sockaddr_storage is defined */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if you have the timeval struct. */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_FILIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_POLL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UTIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TLD_H */ - -/* Define to 1 if you have the `tld_strerror' function. */ -/* #undef HAVE_TLD_STRERROR */ - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if compiler supports C99 variadic macro style. */ -#define HAVE_VARIADIC_MACROS_C99 1 - -/* Define to 1 if compiler supports old gcc variadic macro style. */ -#define HAVE_VARIADIC_MACROS_GCC 1 - -/* Define to 1 if you have a working vxworks-style strerror_r function. */ -#define HAVE_VXWORKS_STRERROR_R 1 - -/* Define to 1 if you have the winber.h header file. */ -/* #undef HAVE_WINBER_H */ - -/* Define to 1 if you have the windows.h header file. */ -/* #undef HAVE_WINDOWS_H */ - -/* Define to 1 if you have the winldap.h header file. */ -/* #undef HAVE_WINLDAP_H */ - -/* Define to 1 if you have the winsock2.h header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define to 1 if you have the winsock.h header file. */ -/* #undef HAVE_WINSOCK_H */ - -/* Define this symbol if your OS supports changing the contents of argv */ -#define HAVE_WRITABLE_ARGV 1 - -/* Define to 1 if you have the writev function. */ -#define HAVE_WRITEV 1 - -/* Define to 1 if you have the ws2tcpip.h header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_X509_H */ - -/* if you have the zlib.h header file */ -#define HAVE_ZLIB_H 1 - -/* Define to 1 if you need the lber.h header file even with ldap.h */ -/* #undef NEED_LBER_H */ - -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -/* #undef NEED_MALLOC_H */ - -/* Define to 1 if you need the memory.h header file even with stdlib.h */ -/* #undef NEED_MEMORY_H */ - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -/* #undef NEED_REENTRANT */ - -/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ -/* #undef NEED_THREAD_SAFE */ - -/* Define to 1 if the open function requires three arguments. */ -#define OPEN_NEEDS_ARG3 1 - -/* cpu-machine-OS */ -#define OS "unknown-unknown-vxworks" - -/* Name of package */ -#define PACKAGE "curl" - -/* a suitable file to read random data from */ -#define RANDOM_FILE "/dev/urandom" - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void - -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID 1 - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 socklen_t - -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV int - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 int - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 void * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV int - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* Define to the type qualifier of arg 5 for select. */ -#define SELECT_QUAL_ARG5 - -/* Define to the type of arg 1 for select. */ -#define SELECT_TYPE_ARG1 int - -/* Define to the type of args 2, 3 and 4 for select. */ -#define SELECT_TYPE_ARG234 fd_set * - -/* Define to the type of arg 5 for select. */ -#define SELECT_TYPE_ARG5 struct timeval * - -/* Define to the function return type for select. */ -#define SELECT_TYPE_RETV int - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 int - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 void * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV int - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `off_t', as computed by sizeof. */ -#define SIZEOF_OFF_T 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 4 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 4 - -/* The size of `void*', as computed by sizeof. */ -#define SIZEOF_VOIDP 4 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to the type of arg 3 for strerror_r. */ -/* #undef STRERROR_R_TYPE_ARG3 */ - -/* Define to 1 if you can safely include both and . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* Define if you want to enable c-ares support */ -/* #undef USE_ARES */ - -/* Define to disable non-blocking sockets. */ -/* #undef USE_BLOCKING_SOCKETS */ - -/* if GnuTLS is enabled */ -/* #undef USE_GNUTLS */ - -/* if libSSH2 is in use */ -/* #undef USE_LIBSSH2 */ - -/* If you want to build curl with the built-in manual */ -#define USE_MANUAL 1 - -/* if NSS is enabled */ -/* #undef USE_NSS */ - -/* if OpenSSL is in use */ -#define USE_OPENSSL 1 - -/* Define to 1 if you are building a Windows target without large file - support. */ -/* #undef USE_WIN32_LARGE_FILES */ - -/* to enable SSPI support */ -/* #undef USE_WINDOWS_SSPI */ - -/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */ -/* #undef USE_YASSLEMUL */ - -/* Define to avoid automatic inclusion of winsock.h */ -/* #undef WIN32_LEAN_AND_MEAN */ - -/* Define to 1 if OS is AIX. */ -#ifndef _ALL_SOURCE -/* # undef _ALL_SOURCE */ -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Type to use in place of in_addr_t when system does not provide it. */ -/* #undef in_addr_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* the signed version of size_t */ -/* #undef ssize_t */ - -#endif /* HEADER_CURL_CONFIG_VXWORKS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-win32.h b/build/premake/premake5/contrib/curl/lib/config-win32.h deleted file mode 100644 index af7bb1fb0c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-win32.h +++ /dev/null @@ -1,736 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_WIN32_H -#define HEADER_CURL_CONFIG_WIN32_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* Hand crafted config file for Windows */ -/* ================================================================ */ - -/* ---------------------------------------------------------------- */ -/* HEADER FILES */ -/* ---------------------------------------------------------------- */ - -/* Define if you have the header file. */ -/* #define HAVE_ARPA_INET_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_CRYPTO_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_ERR_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#if defined(__MINGW32__) || defined(__POCC__) -#define HAVE_GETOPT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1800) -#define HAVE_INTTYPES_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_IO_H 1 - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define if you need header even with header file. */ -#if !defined(__SALFORDC__) && !defined(__POCC__) -#define NEED_MALLOC_H 1 -#endif - -/* Define if you have the header file. */ -/* #define HAVE_NETDB_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_NETINET_IN_H 1 */ - -/* Define if you have the header file. */ -#ifndef __SALFORDC__ -#define HAVE_PROCESS_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_SGTTY_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SSL_H 1 */ - -/* Define to 1 if you have the header file. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1800) -#define HAVE_STDBOOL_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_SYS_PARAM_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SELECT_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SOCKET_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SOCKIO_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_SYS_TIME_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the header file. */ -#ifndef __BORLANDC__ -#define HAVE_SYS_UTIME_H 1 -#endif - -/* Define if you have the header file. */ -/* #define HAVE_TERMIO_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_TERMIOS_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if you have the header file. */ -#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \ - defined(__POCC__) -#define HAVE_UNISTD_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_WINDOWS_H 1 - -/* Define if you have the header file. */ -#define HAVE_WINSOCK_H 1 - -/* Define if you have the header file. */ -#ifndef __SALFORDC__ -#define HAVE_WINSOCK2_H 1 -#endif - -/* Define if you have the header file. */ -#ifndef __SALFORDC__ -#define HAVE_WS2TCPIP_H 1 -#endif - -/* ---------------------------------------------------------------- */ -/* OTHER HEADER INFO */ -/* ---------------------------------------------------------------- */ - -/* Define if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -/* #define TIME_WITH_SYS_TIME 1 */ - -/* Define to 1 if bool is an available type. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1800) -#define HAVE_BOOL_T 1 -#endif - -/* ---------------------------------------------------------------- */ -/* FUNCTIONS */ -/* ---------------------------------------------------------------- */ - -/* Define if you have the closesocket function. */ -#define HAVE_CLOSESOCKET 1 - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #define HAVE_DOPRNT 1 */ - -/* Define if you have the ftruncate function. */ -#define HAVE_FTRUNCATE 1 - -/* Define if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define if you have the getpass function. */ -/* #define HAVE_GETPASS 1 */ - -/* Define if you have the getservbyname function. */ -#define HAVE_GETSERVBYNAME 1 - -/* Define if you have the getprotobyname function. */ -#define HAVE_GETPROTOBYNAME - -/* Define if you have the gettimeofday function. */ -/* #define HAVE_GETTIMEOFDAY 1 */ - -/* Define if you have the inet_addr function. */ -#define HAVE_INET_ADDR 1 - -/* Define if you have the ioctlsocket function. */ -#define HAVE_IOCTLSOCKET 1 - -/* Define if you have a working ioctlsocket FIONBIO function. */ -#define HAVE_IOCTLSOCKET_FIONBIO 1 - -/* Define if you have the perror function. */ -#define HAVE_PERROR 1 - -/* Define if you have the RAND_screen function when using SSL. */ -#define HAVE_RAND_SCREEN 1 - -/* Define if you have the `RAND_status' function when using SSL. */ -#define HAVE_RAND_STATUS 1 - -/* Define if you have the `CRYPTO_cleanup_all_ex_data' function. - This is present in OpenSSL versions after 0.9.6b */ -#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 - -/* Define if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 - -/* Define if you have the setmode function. */ -#define HAVE_SETMODE 1 - -/* Define if you have the setvbuf function. */ -#define HAVE_SETVBUF 1 - -/* Define if you have the socket function. */ -#define HAVE_SOCKET 1 - -/* Define if you have the strcasecmp function. */ -/* #define HAVE_STRCASECMP 1 */ - -/* Define if you have the strdup function. */ -#define HAVE_STRDUP 1 - -/* Define if you have the strftime function. */ -#define HAVE_STRFTIME 1 - -/* Define if you have the stricmp function. */ -#define HAVE_STRICMP 1 - -/* Define if you have the strncasecmp function. */ -/* #define HAVE_STRNCASECMP 1 */ - -/* Define if you have the strnicmp function. */ -#define HAVE_STRNICMP 1 - -/* Define if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define if you have the strtoll function. */ -#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__) || \ - (defined(_MSC_VER) && (_MSC_VER >= 1800)) -#define HAVE_STRTOLL 1 -#endif - -/* Define if you have the tcgetattr function. */ -/* #define HAVE_TCGETATTR 1 */ - -/* Define if you have the tcsetattr function. */ -/* #define HAVE_TCSETATTR 1 */ - -/* Define if you have the utime function. */ -#ifndef __BORLANDC__ -#define HAVE_UTIME 1 -#endif - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const - -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * - -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 DWORD - -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int - -/* Define if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 SOCKET - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 char * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 int - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV int - -/* Define if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 SOCKET - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 char - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 int - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 int - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV int - -/* Define if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 SOCKET - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 char * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 int - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV int - -/* ---------------------------------------------------------------- */ -/* TYPEDEF REPLACEMENTS */ -/* ---------------------------------------------------------------- */ - -/* Define if in_addr_t is not an available 'typedefed' type. */ -#define in_addr_t unsigned long - -/* Define to the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define if ssize_t is not an available 'typedefed' type. */ -#ifndef _SSIZE_T_DEFINED -# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \ - defined(__POCC__) || \ - defined(__MINGW32__) -# elif defined(_WIN64) -# define _SSIZE_T_DEFINED -# define ssize_t __int64 -# else -# define _SSIZE_T_DEFINED -# define ssize_t int -# endif -#endif - -/* ---------------------------------------------------------------- */ -/* TYPE SIZES */ -/* ---------------------------------------------------------------- */ - -/* Define to the size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* Define to the size of `long double', as computed by sizeof. */ -#define SIZEOF_LONG_DOUBLE 16 - -/* Define to the size of `long long', as computed by sizeof. */ -/* #define SIZEOF_LONG_LONG 8 */ - -/* Define to the size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to the size of `size_t', as computed by sizeof. */ -#if defined(_WIN64) -# define SIZEOF_SIZE_T 8 -#else -# define SIZEOF_SIZE_T 4 -#endif - -/* ---------------------------------------------------------------- */ -/* BSD-style lwIP TCP/IP stack SPECIFIC */ -/* ---------------------------------------------------------------- */ - -/* Define to use BSD-style lwIP TCP/IP stack. */ -/* #define USE_LWIPSOCK 1 */ - -#ifdef USE_LWIPSOCK -# undef USE_WINSOCK -# undef HAVE_WINSOCK_H -# undef HAVE_WINSOCK2_H -# undef HAVE_WS2TCPIP_H -# undef HAVE_ERRNO_H -# undef HAVE_GETHOSTNAME -# undef HAVE_GETNAMEINFO -# undef LWIP_POSIX_SOCKETS_IO_NAMES -# undef RECV_TYPE_ARG1 -# undef RECV_TYPE_ARG3 -# undef SEND_TYPE_ARG1 -# undef SEND_TYPE_ARG3 -# define HAVE_FREEADDRINFO -# define HAVE_GETADDRINFO -# define HAVE_GETHOSTBYNAME -# define HAVE_GETHOSTBYNAME_R -# define HAVE_GETHOSTBYNAME_R_6 -# define LWIP_POSIX_SOCKETS_IO_NAMES 0 -# define RECV_TYPE_ARG1 int -# define RECV_TYPE_ARG3 size_t -# define SEND_TYPE_ARG1 int -# define SEND_TYPE_ARG3 size_t -#endif - -/* ---------------------------------------------------------------- */ -/* Watt-32 tcp/ip SPECIFIC */ -/* ---------------------------------------------------------------- */ - -#ifdef USE_WATT32 - #include - #undef byte - #undef word - #undef USE_WINSOCK - #undef HAVE_WINSOCK_H - #undef HAVE_WINSOCK2_H - #undef HAVE_WS2TCPIP_H - #define HAVE_GETADDRINFO - #define HAVE_GETNAMEINFO - #define HAVE_SYS_IOCTL_H - #define HAVE_SYS_SOCKET_H - #define HAVE_NETINET_IN_H - #define HAVE_NETDB_H - #define HAVE_ARPA_INET_H - #define HAVE_FREEADDRINFO - #define SOCKET int -#endif - - -/* ---------------------------------------------------------------- */ -/* COMPILER SPECIFIC */ -/* ---------------------------------------------------------------- */ - -/* Define to nothing if compiler does not support 'const' qualifier. */ -/* #define const */ - -/* Define to nothing if compiler does not support 'volatile' qualifier. */ -/* #define volatile */ - -/* Windows should not have HAVE_GMTIME_R defined */ -/* #undef HAVE_GMTIME_R */ - -/* Define if the compiler supports C99 variadic macro style. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1400) -#define HAVE_VARIADIC_MACROS_C99 1 -#endif - -/* Define if the compiler supports the 'long long' data type. */ -#if defined(__MINGW32__) || defined(__WATCOMC__) || \ - (defined(_MSC_VER) && (_MSC_VER >= 1310)) || \ - (defined(__BORLANDC__) && (__BORLANDC__ >= 0x561)) -#define HAVE_LONGLONG 1 -#endif - -/* Define to avoid VS2005 complaining about portable C functions. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1400) -#define _CRT_SECURE_NO_DEPRECATE 1 -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif - -/* VS2005 and later dafault size for time_t is 64-bit, unless - _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1400) -# ifndef _USE_32BIT_TIME_T -# define SIZEOF_TIME_T 8 -# else -# define SIZEOF_TIME_T 4 -# endif -#endif - -/* Define some minimum and default build targets for Visual Studio */ -#if defined(_MSC_VER) - /* Officially, Microsoft's Windows SDK versions 6.X does not support Windows - 2000 as a supported build target. VS2008 default installations provides - an embedded Windows SDK v6.0A along with the claim that Windows 2000 is a - valid build target for VS2008. Popular belief is that binaries built with - VS2008 using Windows SDK versions v6.X and Windows 2000 as a build target - are functional. */ -# define VS2008_MIN_TARGET 0x0500 - - /* The minimum build target for VS2012 is Vista unless Update 1 is installed - and the v110_xp toolset is choosen. */ -# if defined(_USING_V110_SDK71_) -# define VS2012_MIN_TARGET 0x0501 -# else -# define VS2012_MIN_TARGET 0x0600 -# endif - - /* VS2008 default build target is Windows Vista. We override default target - to be Windows XP. */ -# define VS2008_DEF_TARGET 0x0501 - - /* VS2012 default build target is Windows Vista unless Update 1 is installed - and the v110_xp toolset is choosen. */ -# if defined(_USING_V110_SDK71_) -# define VS2012_DEF_TARGET 0x0501 -# else -# define VS2012_DEF_TARGET 0x0600 -# endif -#endif - -/* VS2008 default target settings and minimum build target check. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_MSC_VER <= 1600) -# ifndef _WIN32_WINNT -# define _WIN32_WINNT VS2008_DEF_TARGET -# endif -# ifndef WINVER -# define WINVER VS2008_DEF_TARGET -# endif -# if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET) -# error VS2008 does not support Windows build targets prior to Windows 2000 -# endif -#endif - -/* VS2012 default target settings and minimum build target check. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1700) -# ifndef _WIN32_WINNT -# define _WIN32_WINNT VS2012_DEF_TARGET -# endif -# ifndef WINVER -# define WINVER VS2012_DEF_TARGET -# endif -# if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET) -# if defined(_USING_V110_SDK71_) -# error VS2012 does not support Windows build targets prior to Windows XP -# else -# error VS2012 does not support Windows build targets prior to Windows \ -Vista -# endif -# endif -#endif - -/* When no build target is specified Pelles C 5.00 and later default build - target is Windows Vista. We override default target to be Windows 2000. */ -#if defined(__POCC__) && (__POCC__ >= 500) -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0500 -# endif -# ifndef WINVER -# define WINVER 0x0500 -# endif -#endif - -/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is - quite convoluted, compiler dependent and even build target dependent. */ -#if defined(HAVE_WS2TCPIP_H) -# if defined(__POCC__) -# define HAVE_FREEADDRINFO 1 -# define HAVE_GETADDRINFO 1 -# define HAVE_GETADDRINFO_THREADSAFE 1 -# define HAVE_GETNAMEINFO 1 -# elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) -# define HAVE_FREEADDRINFO 1 -# define HAVE_GETADDRINFO 1 -# define HAVE_GETADDRINFO_THREADSAFE 1 -# define HAVE_GETNAMEINFO 1 -# elif defined(_MSC_VER) && (_MSC_VER >= 1200) -# define HAVE_FREEADDRINFO 1 -# define HAVE_GETADDRINFO 1 -# define HAVE_GETADDRINFO_THREADSAFE 1 -# define HAVE_GETNAMEINFO 1 -# endif -#endif - -#if defined(__POCC__) -# ifndef _MSC_VER -# error Microsoft extensions /Ze compiler option is required -# endif -# ifndef __POCC__OLDNAMES -# error Compatibility names /Go compiler option is required -# endif -#endif - -/* ---------------------------------------------------------------- */ -/* STRUCT RELATED */ -/* ---------------------------------------------------------------- */ - -/* Define if you have struct sockaddr_storage. */ -#if !defined(__SALFORDC__) && !defined(__BORLANDC__) -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -#endif - -/* Define if you have struct timeval. */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define if struct sockaddr_in6 has the sin6_scope_id member. */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -#if defined(HAVE_WINSOCK2_H) && defined(_WIN32_WINNT) && \ - (_WIN32_WINNT >= 0x0600) -#define HAVE_STRUCT_POLLFD 1 -#endif - -/* ---------------------------------------------------------------- */ -/* LARGE FILE SUPPORT */ -/* ---------------------------------------------------------------- */ - -#if defined(_MSC_VER) && !defined(_WIN32_WCE) -# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define USE_WIN32_LARGE_FILES -# else -# define USE_WIN32_SMALL_FILES -# endif -#endif - -#if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES) -# define USE_WIN32_LARGE_FILES -#endif - -#if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES) -# define USE_WIN32_LARGE_FILES -#endif - -#if defined(__POCC__) -# undef USE_WIN32_LARGE_FILES -#endif - -#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES) -# define USE_WIN32_SMALL_FILES -#endif - -/* ---------------------------------------------------------------- */ -/* DNS RESOLVER SPECIALTY */ -/* ---------------------------------------------------------------- */ - -/* - * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS. - */ - -/* Define to enable c-ares asynchronous DNS lookups. */ -/* #define USE_ARES 1 */ - -/* Default define to enable threaded asynchronous DNS lookups. */ -#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \ - !defined(USE_THREADS_WIN32) -# define USE_THREADS_WIN32 1 -#endif - -#if defined(USE_ARES) && defined(USE_THREADS_WIN32) -# error "Only one DNS lookup specialty may be defined at most" -#endif - -/* ---------------------------------------------------------------- */ -/* LDAP SUPPORT */ -/* ---------------------------------------------------------------- */ - -#if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK) -#undef USE_WIN32_LDAP -#define HAVE_LDAP_SSL_H 1 -#define HAVE_LDAP_URL_PARSE 1 -#elif defined(CURL_HAS_OPENLDAP_LDAPSDK) -#undef USE_WIN32_LDAP -#define HAVE_LDAP_URL_PARSE 1 -#else -#undef HAVE_LDAP_URL_PARSE -#define USE_WIN32_LDAP 1 -#endif - -#if defined(__WATCOMC__) && defined(USE_WIN32_LDAP) -#if __WATCOMC__ < 1280 -#define WINBERAPI __declspec(cdecl) -#define WINLDAPAPI __declspec(cdecl) -#endif -#endif - -#if defined(__POCC__) && defined(USE_WIN32_LDAP) -# define CURL_DISABLE_LDAP 1 -#endif - -/* Define to use the Windows crypto library. */ -#if !defined(USE_OPENSSL) && !defined(USE_NSS) -#define USE_WIN32_CRYPTO -#endif - -/* ---------------------------------------------------------------- */ -/* ADDITIONAL DEFINITIONS */ -/* ---------------------------------------------------------------- */ - -/* Define cpu-machine-OS */ -#undef OS -#if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */ -#define OS "i386-pc-win32" -#elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (MSVC >=2005 or gcc) */ -#define OS "x86_64-pc-win32" -#elif defined(_M_IA64) /* Itanium */ -#define OS "ia64-pc-win32" -#else -#define OS "unknown-pc-win32" -#endif - -/* Name of package */ -#define PACKAGE "curl" - -/* If you want to build curl with the built-in manual */ -#define USE_MANUAL 1 - -#if defined(__POCC__) || defined(USE_IPV6) -# define ENABLE_IPV6 1 -#endif - -#endif /* HEADER_CURL_CONFIG_WIN32_H */ diff --git a/build/premake/premake5/contrib/curl/lib/config-win32ce.h b/build/premake/premake5/contrib/curl/lib/config-win32ce.h deleted file mode 100644 index 383948576d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/config-win32ce.h +++ /dev/null @@ -1,448 +0,0 @@ -#ifndef HEADER_CURL_CONFIG_WIN32CE_H -#define HEADER_CURL_CONFIG_WIN32CE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* ================================================================ */ -/* lib/config-win32ce.h - Hand crafted config file for windows ce */ -/* ================================================================ */ - -/* ---------------------------------------------------------------- */ -/* HEADER FILES */ -/* ---------------------------------------------------------------- */ - -/* Define if you have the header file. */ -/* #define HAVE_ARPA_INET_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_ASSERT_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_CRYPTO_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_ERRNO_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_ERR_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_GETOPT_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_IO_H 1 - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you need the malloc.h header header file even with stdlib.h */ -#define NEED_MALLOC_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_NETDB_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_NETINET_IN_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_SGTTY_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SSL_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_PROCESS_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_PARAM_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SELECT_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SOCKET_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SOCKIO_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the header file */ -/* #define HAVE_SYS_TIME_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_TYPES_H 1 */ - -/* Define if you have the header file */ -#define HAVE_SYS_UTIME_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_TERMIO_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_TERMIOS_H 1 */ - -/* Define if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if you have the header file. */ -#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) -#define HAVE_UNISTD_H 1 -#endif - -/* Define if you have the header file. */ -#define HAVE_WINDOWS_H 1 - -/* Define if you have the header file. */ -#define HAVE_WINSOCK_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_WINSOCK2_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_WS2TCPIP_H 1 */ - -/* ---------------------------------------------------------------- */ -/* OTHER HEADER INFO */ -/* ---------------------------------------------------------------- */ - -/* Define if sig_atomic_t is an available typedef. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -/* #define TIME_WITH_SYS_TIME 1 */ - -/* ---------------------------------------------------------------- */ -/* FUNCTIONS */ -/* ---------------------------------------------------------------- */ - -/* Define if you have the closesocket function. */ -#define HAVE_CLOSESOCKET 1 - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #define HAVE_DOPRNT 1 */ - -/* Define if you have the gethostbyaddr function. */ -#define HAVE_GETHOSTBYADDR 1 - -/* Define if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define if you have the getpass function. */ -/* #define HAVE_GETPASS 1 */ - -/* Define if you have the getservbyname function. */ -#define HAVE_GETSERVBYNAME 1 - -/* Define if you have the gettimeofday function. */ -/* #define HAVE_GETTIMEOFDAY 1 */ - -/* Define if you have the inet_addr function. */ -#define HAVE_INET_ADDR 1 - -/* Define if you have the ioctlsocket function. */ -#define HAVE_IOCTLSOCKET 1 - -/* Define if you have a working ioctlsocket FIONBIO function. */ -#define HAVE_IOCTLSOCKET_FIONBIO 1 - -/* Define if you have the perror function. */ -#define HAVE_PERROR 1 - -/* Define if you have the RAND_screen function when using SSL */ -#define HAVE_RAND_SCREEN 1 - -/* Define if you have the `RAND_status' function when using SSL. */ -#define HAVE_RAND_STATUS 1 - -/* Define if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define if you have the setvbuf function. */ -#define HAVE_SETVBUF 1 - -/* Define if you have the socket function. */ -#define HAVE_SOCKET 1 - -/* Define if you have the strcasecmp function. */ -/* #define HAVE_STRCASECMP 1 */ - -/* Define if you have the strdup function. */ -/* #define HAVE_STRDUP 1 */ - -/* Define if you have the strftime function. */ -/* #define HAVE_STRFTIME 1 */ - -/* Define if you have the stricmp function. */ -/* #define HAVE_STRICMP 1 */ - -/* Define if you have the strncasecmp function. */ -/* #define HAVE_STRNCASECMP 1 */ - -/* Define if you have the strnicmp function. */ -/* #define HAVE_STRNICMP 1 */ - -/* Define if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define if you have the strtoll function. */ -#if defined(__MINGW32__) || defined(__WATCOMC__) -#define HAVE_STRTOLL 1 -#endif - -/* Define if you have the tcgetattr function. */ -/* #define HAVE_TCGETATTR 1 */ - -/* Define if you have the tcsetattr function. */ -/* #define HAVE_TCSETATTR 1 */ - -/* Define if you have the utime function */ -#define HAVE_UTIME 1 - -/* Define if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#define GETNAMEINFO_QUAL_ARG1 const - -/* Define to the type of arg 1 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * - -/* Define to the type of arg 2 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG2 socklen_t - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG46 DWORD - -/* Define to the type of arg 7 for getnameinfo. */ -#define GETNAMEINFO_TYPE_ARG7 int - -/* Define if you have the recv function. */ -#define HAVE_RECV 1 - -/* Define to the type of arg 1 for recv. */ -#define RECV_TYPE_ARG1 SOCKET - -/* Define to the type of arg 2 for recv. */ -#define RECV_TYPE_ARG2 char * - -/* Define to the type of arg 3 for recv. */ -#define RECV_TYPE_ARG3 int - -/* Define to the type of arg 4 for recv. */ -#define RECV_TYPE_ARG4 int - -/* Define to the function return type for recv. */ -#define RECV_TYPE_RETV int - -/* Define if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 SOCKET - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 char - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 int - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 int - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV int - -/* Define if you have the send function. */ -#define HAVE_SEND 1 - -/* Define to the type of arg 1 for send. */ -#define SEND_TYPE_ARG1 SOCKET - -/* Define to the type qualifier of arg 2 for send. */ -#define SEND_QUAL_ARG2 const - -/* Define to the type of arg 2 for send. */ -#define SEND_TYPE_ARG2 char * - -/* Define to the type of arg 3 for send. */ -#define SEND_TYPE_ARG3 int - -/* Define to the type of arg 4 for send. */ -#define SEND_TYPE_ARG4 int - -/* Define to the function return type for send. */ -#define SEND_TYPE_RETV int - -/* ---------------------------------------------------------------- */ -/* TYPEDEF REPLACEMENTS */ -/* ---------------------------------------------------------------- */ - -/* Define this if in_addr_t is not an available 'typedefed' type */ -#define in_addr_t unsigned long - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define ssize_t if it is not an available 'typedefed' type */ -#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) -#elif defined(_WIN64) -#define ssize_t __int64 -#else -#define ssize_t int -#endif - -/* ---------------------------------------------------------------- */ -/* TYPE SIZES */ -/* ---------------------------------------------------------------- */ - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long double', as computed by sizeof. */ -#define SIZEOF_LONG_DOUBLE 16 - -/* The size of `long long', as computed by sizeof. */ -/* #define SIZEOF_LONG_LONG 8 */ - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#if defined(_WIN64) -# define SIZEOF_SIZE_T 8 -#else -# define SIZEOF_SIZE_T 4 -#endif - -/* ---------------------------------------------------------------- */ -/* STRUCT RELATED */ -/* ---------------------------------------------------------------- */ - -/* Define this if you have struct sockaddr_storage */ -/* #define HAVE_STRUCT_SOCKADDR_STORAGE 1 */ - -/* Define this if you have struct timeval */ -#define HAVE_STRUCT_TIMEVAL 1 - -/* Define this if struct sockaddr_in6 has the sin6_scope_id member */ -#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* ---------------------------------------------------------------- */ -/* COMPILER SPECIFIC */ -/* ---------------------------------------------------------------- */ - -/* Undef keyword 'const' if it does not work. */ -/* #undef const */ - -/* Define to avoid VS2005 complaining about portable C functions */ -#if defined(_MSC_VER) && (_MSC_VER >= 1400) -#define _CRT_SECURE_NO_DEPRECATE 1 -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif - -/* VS2005 and later dafault size for time_t is 64-bit, unless */ -/* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */ -#if defined(_MSC_VER) && (_MSC_VER >= 1400) -# ifndef _USE_32BIT_TIME_T -# define SIZEOF_TIME_T 8 -# else -# define SIZEOF_TIME_T 4 -# endif -#endif - -/* ---------------------------------------------------------------- */ -/* LARGE FILE SUPPORT */ -/* ---------------------------------------------------------------- */ - -#if defined(_MSC_VER) && !defined(_WIN32_WCE) -# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define USE_WIN32_LARGE_FILES -# else -# define USE_WIN32_SMALL_FILES -# endif -#endif - -#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES) -# define USE_WIN32_SMALL_FILES -#endif - -/* ---------------------------------------------------------------- */ -/* LDAP SUPPORT */ -/* ---------------------------------------------------------------- */ - -#define USE_WIN32_LDAP 1 -#undef HAVE_LDAP_URL_PARSE - -/* ---------------------------------------------------------------- */ -/* ADDITIONAL DEFINITIONS */ -/* ---------------------------------------------------------------- */ - -/* Define cpu-machine-OS */ -#undef OS -#define OS "i386-pc-win32ce" - -/* Name of package */ -#define PACKAGE "curl" - -/* ---------------------------------------------------------------- */ -/* WinCE */ -/* ---------------------------------------------------------------- */ - -#ifndef UNICODE -# define UNICODE -#endif - -#ifndef _UNICODE -# define _UNICODE -#endif - -#define CURL_DISABLE_FILE 1 -#define CURL_DISABLE_TELNET 1 -#define CURL_DISABLE_LDAP 1 - -#define ENOSPC 1 -#define ENOMEM 2 -#define EAGAIN 3 - -extern int stat(const char *path, struct stat *buffer); - -#endif /* HEADER_CURL_CONFIG_WIN32CE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/conncache.c b/build/premake/premake5/contrib/curl/lib/conncache.c deleted file mode 100644 index a51c8fd760..0000000000 --- a/build/premake/premake5/contrib/curl/lib/conncache.c +++ /dev/null @@ -1,371 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012, 2016, Linus Nielsen Feltzing, - * Copyright (C) 2012 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "urldata.h" -#include "url.h" -#include "progress.h" -#include "multiif.h" -#include "sendf.h" -#include "conncache.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -static void conn_llist_dtor(void *user, void *element) -{ - struct connectdata *data = element; - (void)user; - - data->bundle = NULL; -} - -static CURLcode bundle_create(struct Curl_easy *data, - struct connectbundle **cb_ptr) -{ - (void)data; - DEBUGASSERT(*cb_ptr == NULL); - *cb_ptr = malloc(sizeof(struct connectbundle)); - if(!*cb_ptr) - return CURLE_OUT_OF_MEMORY; - - (*cb_ptr)->num_connections = 0; - (*cb_ptr)->multiuse = BUNDLE_UNKNOWN; - - (*cb_ptr)->conn_list = Curl_llist_alloc((curl_llist_dtor) conn_llist_dtor); - if(!(*cb_ptr)->conn_list) { - Curl_safefree(*cb_ptr); - return CURLE_OUT_OF_MEMORY; - } - return CURLE_OK; -} - -static void bundle_destroy(struct connectbundle *cb_ptr) -{ - if(!cb_ptr) - return; - - if(cb_ptr->conn_list) { - Curl_llist_destroy(cb_ptr->conn_list, NULL); - cb_ptr->conn_list = NULL; - } - free(cb_ptr); -} - -/* Add a connection to a bundle */ -static CURLcode bundle_add_conn(struct connectbundle *cb_ptr, - struct connectdata *conn) -{ - if(!Curl_llist_insert_next(cb_ptr->conn_list, cb_ptr->conn_list->tail, conn)) - return CURLE_OUT_OF_MEMORY; - - conn->bundle = cb_ptr; - - cb_ptr->num_connections++; - return CURLE_OK; -} - -/* Remove a connection from a bundle */ -static int bundle_remove_conn(struct connectbundle *cb_ptr, - struct connectdata *conn) -{ - struct curl_llist_element *curr; - - curr = cb_ptr->conn_list->head; - while(curr) { - if(curr->ptr == conn) { - Curl_llist_remove(cb_ptr->conn_list, curr, NULL); - cb_ptr->num_connections--; - conn->bundle = NULL; - return 1; /* we removed a handle */ - } - curr = curr->next; - } - return 0; -} - -static void free_bundle_hash_entry(void *freethis) -{ - struct connectbundle *b = (struct connectbundle *) freethis; - - bundle_destroy(b); -} - -int Curl_conncache_init(struct conncache *connc, int size) -{ - return Curl_hash_init(&connc->hash, size, Curl_hash_str, - Curl_str_key_compare, free_bundle_hash_entry); -} - -void Curl_conncache_destroy(struct conncache *connc) -{ - if(connc) - Curl_hash_destroy(&connc->hash); -} - -/* returns an allocated key to find a bundle for this connection */ -static char *hashkey(struct connectdata *conn) -{ - const char *hostname; - - if(conn->bits.socksproxy) - hostname = conn->socks_proxy.host.name; - else if(conn->bits.httpproxy) - hostname = conn->http_proxy.host.name; - else if(conn->bits.conn_to_host) - hostname = conn->conn_to_host.name; - else - hostname = conn->host.name; - - return aprintf("%s:%ld", hostname, conn->port); -} - -/* Look up the bundle with all the connections to the same host this - connectdata struct is setup to use. */ -struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn, - struct conncache *connc) -{ - struct connectbundle *bundle = NULL; - if(connc) { - char *key = hashkey(conn); - if(key) { - bundle = Curl_hash_pick(&connc->hash, key, strlen(key)); - free(key); - } - } - - return bundle; -} - -static bool conncache_add_bundle(struct conncache *connc, - char *key, - struct connectbundle *bundle) -{ - void *p = Curl_hash_add(&connc->hash, key, strlen(key), bundle); - - return p?TRUE:FALSE; -} - -static void conncache_remove_bundle(struct conncache *connc, - struct connectbundle *bundle) -{ - struct curl_hash_iterator iter; - struct curl_hash_element *he; - - if(!connc) - return; - - Curl_hash_start_iterate(&connc->hash, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - if(he->ptr == bundle) { - /* The bundle is destroyed by the hash destructor function, - free_bundle_hash_entry() */ - Curl_hash_delete(&connc->hash, he->key, he->key_len); - return; - } - - he = Curl_hash_next_element(&iter); - } -} - -CURLcode Curl_conncache_add_conn(struct conncache *connc, - struct connectdata *conn) -{ - CURLcode result; - struct connectbundle *bundle; - struct connectbundle *new_bundle = NULL; - struct Curl_easy *data = conn->data; - - bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache); - if(!bundle) { - char *key; - int rc; - - result = bundle_create(data, &new_bundle); - if(result) - return result; - - key = hashkey(conn); - if(!key) { - bundle_destroy(new_bundle); - return CURLE_OUT_OF_MEMORY; - } - - rc = conncache_add_bundle(data->state.conn_cache, key, new_bundle); - free(key); - if(!rc) { - bundle_destroy(new_bundle); - return CURLE_OUT_OF_MEMORY; - } - bundle = new_bundle; - } - - result = bundle_add_conn(bundle, conn); - if(result) { - if(new_bundle) - conncache_remove_bundle(data->state.conn_cache, new_bundle); - return result; - } - - conn->connection_id = connc->next_connection_id++; - connc->num_connections++; - - DEBUGF(infof(conn->data, "Added connection %ld. " - "The cache now contains %" CURL_FORMAT_CURL_OFF_TU " members\n", - conn->connection_id, (curl_off_t) connc->num_connections)); - - return CURLE_OK; -} - -void Curl_conncache_remove_conn(struct conncache *connc, - struct connectdata *conn) -{ - struct connectbundle *bundle = conn->bundle; - - /* The bundle pointer can be NULL, since this function can be called - due to a failed connection attempt, before being added to a bundle */ - if(bundle) { - bundle_remove_conn(bundle, conn); - if(bundle->num_connections == 0) { - conncache_remove_bundle(connc, bundle); - } - - if(connc) { - connc->num_connections--; - - DEBUGF(infof(conn->data, "The cache now contains %" - CURL_FORMAT_CURL_OFF_TU " members\n", - (curl_off_t) connc->num_connections)); - } - } -} - -/* This function iterates the entire connection cache and calls the - function func() with the connection pointer as the first argument - and the supplied 'param' argument as the other, - - Return 0 from func() to continue the loop, return 1 to abort it. - */ -void Curl_conncache_foreach(struct conncache *connc, - void *param, - int (*func)(struct connectdata *conn, void *param)) -{ - struct curl_hash_iterator iter; - struct curl_llist_element *curr; - struct curl_hash_element *he; - - if(!connc) - return; - - Curl_hash_start_iterate(&connc->hash, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - struct connectbundle *bundle; - - bundle = he->ptr; - he = Curl_hash_next_element(&iter); - - curr = bundle->conn_list->head; - while(curr) { - /* Yes, we need to update curr before calling func(), because func() - might decide to remove the connection */ - struct connectdata *conn = curr->ptr; - curr = curr->next; - - if(1 == func(conn, param)) - return; - } - } -} - -/* Return the first connection found in the cache. Used when closing all - connections */ -struct connectdata * -Curl_conncache_find_first_connection(struct conncache *connc) -{ - struct curl_hash_iterator iter; - struct curl_hash_element *he; - struct connectbundle *bundle; - - Curl_hash_start_iterate(&connc->hash, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - struct curl_llist_element *curr; - bundle = he->ptr; - - curr = bundle->conn_list->head; - if(curr) { - return curr->ptr; - } - - he = Curl_hash_next_element(&iter); - } - - return NULL; -} - - -#if 0 -/* Useful for debugging the connection cache */ -void Curl_conncache_print(struct conncache *connc) -{ - struct curl_hash_iterator iter; - struct curl_llist_element *curr; - struct curl_hash_element *he; - - if(!connc) - return; - - fprintf(stderr, "=Bundle cache=\n"); - - Curl_hash_start_iterate(connc->hash, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - struct connectbundle *bundle; - struct connectdata *conn; - - bundle = he->ptr; - - fprintf(stderr, "%s -", he->key); - curr = bundle->conn_list->head; - while(curr) { - conn = curr->ptr; - - fprintf(stderr, " [%p %d]", (void *)conn, conn->inuse); - curr = curr->next; - } - fprintf(stderr, "\n"); - - he = Curl_hash_next_element(&iter); - } -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/conncache.h b/build/premake/premake5/contrib/curl/lib/conncache.h deleted file mode 100644 index b1dadf9906..0000000000 --- a/build/premake/premake5/contrib/curl/lib/conncache.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef HEADER_CURL_CONNCACHE_H -#define HEADER_CURL_CONNCACHE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2015, Daniel Stenberg, , et al. - * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -struct conncache { - struct curl_hash hash; - size_t num_connections; - long next_connection_id; - struct timeval last_cleanup; -}; - -#define BUNDLE_NO_MULTIUSE -1 -#define BUNDLE_UNKNOWN 0 /* initial value */ -#define BUNDLE_PIPELINING 1 -#define BUNDLE_MULTIPLEX 2 - -struct connectbundle { - int multiuse; /* supports multi-use */ - size_t num_connections; /* Number of connections in the bundle */ - struct curl_llist *conn_list; /* The connectdata members of the bundle */ -}; - -int Curl_conncache_init(struct conncache *, int size); - -void Curl_conncache_destroy(struct conncache *connc); - -/* return the correct bundle, to a host or a proxy */ -struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn, - struct conncache *connc); - -CURLcode Curl_conncache_add_conn(struct conncache *connc, - struct connectdata *conn); - -void Curl_conncache_remove_conn(struct conncache *connc, - struct connectdata *conn); - -void Curl_conncache_foreach(struct conncache *connc, - void *param, - int (*func)(struct connectdata *conn, - void *param)); - -struct connectdata * -Curl_conncache_find_first_connection(struct conncache *connc); - -void Curl_conncache_print(struct conncache *connc); - -#endif /* HEADER_CURL_CONNCACHE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/connect.c b/build/premake/premake5/contrib/curl/lib/connect.c deleted file mode 100644 index 524d885eb6..0000000000 --- a/build/premake/premake5/contrib/curl/lib/connect.c +++ /dev/null @@ -1,1419 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include /* may need it */ -#endif -#ifdef HAVE_SYS_UN_H -#include /* for sockaddr_un */ -#endif -#ifdef HAVE_NETINET_TCP_H -#include /* for TCP_NODELAY */ -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE)) -#include -#endif -#ifdef NETWARE -#undef in_addr_t -#define in_addr_t unsigned long -#endif -#ifdef __VMS -#include -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "if2ip.h" -#include "strerror.h" -#include "connect.h" -#include "select.h" -#include "url.h" /* for Curl_safefree() */ -#include "multiif.h" -#include "sockaddr.h" /* required for Curl_sockaddr_storage */ -#include "inet_ntop.h" -#include "inet_pton.h" -#include "vtls/vtls.h" /* for Curl_ssl_check_cxn() */ -#include "progress.h" -#include "warnless.h" -#include "conncache.h" -#include "multihandle.h" -#include "system_win32.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifdef __SYMBIAN32__ -/* This isn't actually supported under Symbian OS */ -#undef SO_NOSIGPIPE -#endif - -static bool verifyconnect(curl_socket_t sockfd, int *error); - -#if defined(__DragonFly__) || defined(HAVE_WINSOCK_H) -/* DragonFlyBSD and Windows use millisecond units */ -#define KEEPALIVE_FACTOR(x) (x *= 1000) -#else -#define KEEPALIVE_FACTOR(x) -#endif - -#if defined(HAVE_WINSOCK2_H) && !defined(SIO_KEEPALIVE_VALS) -#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4) - -struct tcp_keepalive { - u_long onoff; - u_long keepalivetime; - u_long keepaliveinterval; -}; -#endif - -static void -tcpkeepalive(struct Curl_easy *data, - curl_socket_t sockfd) -{ - int optval = data->set.tcp_keepalive?1:0; - - /* only set IDLE and INTVL if setting KEEPALIVE is successful */ - if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, - (void *)&optval, sizeof(optval)) < 0) { - infof(data, "Failed to set SO_KEEPALIVE on fd %d\n", sockfd); - } - else { -#if defined(SIO_KEEPALIVE_VALS) - struct tcp_keepalive vals; - DWORD dummy; - vals.onoff = 1; - optval = curlx_sltosi(data->set.tcp_keepidle); - KEEPALIVE_FACTOR(optval); - vals.keepalivetime = optval; - optval = curlx_sltosi(data->set.tcp_keepintvl); - KEEPALIVE_FACTOR(optval); - vals.keepaliveinterval = optval; - if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID) &vals, sizeof(vals), - NULL, 0, &dummy, NULL, NULL) != 0) { - infof(data, "Failed to set SIO_KEEPALIVE_VALS on fd %d: %d\n", - (int)sockfd, WSAGetLastError()); - } -#else -#ifdef TCP_KEEPIDLE - optval = curlx_sltosi(data->set.tcp_keepidle); - KEEPALIVE_FACTOR(optval); - if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, - (void *)&optval, sizeof(optval)) < 0) { - infof(data, "Failed to set TCP_KEEPIDLE on fd %d\n", sockfd); - } -#endif -#ifdef TCP_KEEPINTVL - optval = curlx_sltosi(data->set.tcp_keepintvl); - KEEPALIVE_FACTOR(optval); - if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL, - (void *)&optval, sizeof(optval)) < 0) { - infof(data, "Failed to set TCP_KEEPINTVL on fd %d\n", sockfd); - } -#endif -#ifdef TCP_KEEPALIVE - /* Mac OS X style */ - optval = curlx_sltosi(data->set.tcp_keepidle); - KEEPALIVE_FACTOR(optval); - if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE, - (void *)&optval, sizeof(optval)) < 0) { - infof(data, "Failed to set TCP_KEEPALIVE on fd %d\n", sockfd); - } -#endif -#endif - } -} - -static CURLcode -singleipconnect(struct connectdata *conn, - const Curl_addrinfo *ai, /* start connecting to this */ - curl_socket_t *sock); - -/* - * Curl_timeleft() returns the amount of milliseconds left allowed for the - * transfer/connection. If the value is negative, the timeout time has already - * elapsed. - * - * The start time is stored in progress.t_startsingle - as set with - * Curl_pgrsTime(..., TIMER_STARTSINGLE); - * - * If 'nowp' is non-NULL, it points to the current time. - * 'duringconnect' is FALSE if not during a connect, as then of course the - * connect timeout is not taken into account! - * - * @unittest: 1303 - */ -time_t Curl_timeleft(struct Curl_easy *data, - struct timeval *nowp, - bool duringconnect) -{ - int timeout_set = 0; - time_t timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0; - struct timeval now; - - /* if a timeout is set, use the most restrictive one */ - - if(data->set.timeout > 0) - timeout_set |= 1; - if(duringconnect && (data->set.connecttimeout > 0)) - timeout_set |= 2; - - switch(timeout_set) { - case 1: - timeout_ms = data->set.timeout; - break; - case 2: - timeout_ms = data->set.connecttimeout; - break; - case 3: - if(data->set.timeout < data->set.connecttimeout) - timeout_ms = data->set.timeout; - else - timeout_ms = data->set.connecttimeout; - break; - default: - /* use the default */ - if(!duringconnect) - /* if we're not during connect, there's no default timeout so if we're - at zero we better just return zero and not make it a negative number - by the math below */ - return 0; - break; - } - - if(!nowp) { - now = Curl_tvnow(); - nowp = &now; - } - - /* subtract elapsed time */ - if(duringconnect) - /* since this most recent connect started */ - timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle); - else - /* since the entire operation started */ - timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startop); - if(!timeout_ms) - /* avoid returning 0 as that means no timeout! */ - return -1; - - return timeout_ms; -} - -static CURLcode bindlocal(struct connectdata *conn, - curl_socket_t sockfd, int af, unsigned int scope) -{ - struct Curl_easy *data = conn->data; - - struct Curl_sockaddr_storage sa; - struct sockaddr *sock = (struct sockaddr *)&sa; /* bind to this address */ - curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */ - struct sockaddr_in *si4 = (struct sockaddr_in *)&sa; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa; -#endif - - struct Curl_dns_entry *h=NULL; - unsigned short port = data->set.localport; /* use this port number, 0 for - "random" */ - /* how many port numbers to try to bind to, increasing one at a time */ - int portnum = data->set.localportrange; - const char *dev = data->set.str[STRING_DEVICE]; - int error; - - /************************************************************* - * Select device to bind socket to - *************************************************************/ - if(!dev && !port) - /* no local kind of binding was requested */ - return CURLE_OK; - - memset(&sa, 0, sizeof(struct Curl_sockaddr_storage)); - - if(dev && (strlen(dev)<255) ) { - char myhost[256] = ""; - int done = 0; /* -1 for error, 1 for address found */ - bool is_interface = FALSE; - bool is_host = FALSE; - static const char *if_prefix = "if!"; - static const char *host_prefix = "host!"; - - if(strncmp(if_prefix, dev, strlen(if_prefix)) == 0) { - dev += strlen(if_prefix); - is_interface = TRUE; - } - else if(strncmp(host_prefix, dev, strlen(host_prefix)) == 0) { - dev += strlen(host_prefix); - is_host = TRUE; - } - - /* interface */ - if(!is_host) { - switch(Curl_if2ip(af, scope, conn->scope_id, dev, - myhost, sizeof(myhost))) { - case IF2IP_NOT_FOUND: - if(is_interface) { - /* Do not fall back to treating it as a host name */ - failf(data, "Couldn't bind to interface '%s'", dev); - return CURLE_INTERFACE_FAILED; - } - break; - case IF2IP_AF_NOT_SUPPORTED: - /* Signal the caller to try another address family if available */ - return CURLE_UNSUPPORTED_PROTOCOL; - case IF2IP_FOUND: - is_interface = TRUE; - /* - * We now have the numerical IP address in the 'myhost' buffer - */ - infof(data, "Local Interface %s is ip %s using address family %i\n", - dev, myhost, af); - done = 1; - -#ifdef SO_BINDTODEVICE - /* I am not sure any other OSs than Linux that provide this feature, - * and at the least I cannot test. --Ben - * - * This feature allows one to tightly bind the local socket to a - * particular interface. This will force even requests to other - * local interfaces to go out the external interface. - * - * - * Only bind to the interface when specified as interface, not just - * as a hostname or ip address. - */ - if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, - dev, (curl_socklen_t)strlen(dev)+1) != 0) { - error = SOCKERRNO; - infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;" - " will do regular bind\n", - dev, error, Curl_strerror(conn, error)); - /* This is typically "errno 1, error: Operation not permitted" if - you're not running as root or another suitable privileged - user */ - } -#endif - break; - } - } - if(!is_interface) { - /* - * This was not an interface, resolve the name as a host name - * or IP number - * - * Temporarily force name resolution to use only the address type - * of the connection. The resolve functions should really be changed - * to take a type parameter instead. - */ - long ipver = conn->ip_version; - int rc; - - if(af == AF_INET) - conn->ip_version = CURL_IPRESOLVE_V4; -#ifdef ENABLE_IPV6 - else if(af == AF_INET6) - conn->ip_version = CURL_IPRESOLVE_V6; -#endif - - rc = Curl_resolv(conn, dev, 0, &h); - if(rc == CURLRESOLV_PENDING) - (void)Curl_resolver_wait_resolv(conn, &h); - conn->ip_version = ipver; - - if(h) { - /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */ - Curl_printable_address(h->addr, myhost, sizeof(myhost)); - infof(data, "Name '%s' family %i resolved to '%s' family %i\n", - dev, af, myhost, h->addr->ai_family); - Curl_resolv_unlock(data, h); - done = 1; - } - else { - /* - * provided dev was no interface (or interfaces are not supported - * e.g. solaris) no ip address and no domain we fail here - */ - done = -1; - } - } - - if(done > 0) { -#ifdef ENABLE_IPV6 - /* IPv6 address */ - if(af == AF_INET6) { -#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - char *scope_ptr = strchr(myhost, '%'); - if(scope_ptr) - *(scope_ptr++) = 0; -#endif - if(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) { - si6->sin6_family = AF_INET6; - si6->sin6_port = htons(port); -#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - if(scope_ptr) - /* The "myhost" string either comes from Curl_if2ip or from - Curl_printable_address. The latter returns only numeric scope - IDs and the former returns none at all. So the scope ID, if - present, is known to be numeric */ - si6->sin6_scope_id = atoi(scope_ptr); -#endif - } - sizeof_sa = sizeof(struct sockaddr_in6); - } - else -#endif - /* IPv4 address */ - if((af == AF_INET) && - (Curl_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) { - si4->sin_family = AF_INET; - si4->sin_port = htons(port); - sizeof_sa = sizeof(struct sockaddr_in); - } - } - - if(done < 1) { - failf(data, "Couldn't bind to '%s'", dev); - return CURLE_INTERFACE_FAILED; - } - } - else { - /* no device was given, prepare sa to match af's needs */ -#ifdef ENABLE_IPV6 - if(af == AF_INET6) { - si6->sin6_family = AF_INET6; - si6->sin6_port = htons(port); - sizeof_sa = sizeof(struct sockaddr_in6); - } - else -#endif - if(af == AF_INET) { - si4->sin_family = AF_INET; - si4->sin_port = htons(port); - sizeof_sa = sizeof(struct sockaddr_in); - } - } - - for(;;) { - if(bind(sockfd, sock, sizeof_sa) >= 0) { - /* we succeeded to bind */ - struct Curl_sockaddr_storage add; - curl_socklen_t size = sizeof(add); - memset(&add, 0, sizeof(struct Curl_sockaddr_storage)); - if(getsockname(sockfd, (struct sockaddr *) &add, &size) < 0) { - data->state.os_errno = error = SOCKERRNO; - failf(data, "getsockname() failed with errno %d: %s", - error, Curl_strerror(conn, error)); - return CURLE_INTERFACE_FAILED; - } - infof(data, "Local port: %hu\n", port); - conn->bits.bound = TRUE; - return CURLE_OK; - } - - if(--portnum > 0) { - infof(data, "Bind to local port %hu failed, trying next\n", port); - port++; /* try next port */ - /* We re-use/clobber the port variable here below */ - if(sock->sa_family == AF_INET) - si4->sin_port = ntohs(port); -#ifdef ENABLE_IPV6 - else - si6->sin6_port = ntohs(port); -#endif - } - else - break; - } - - data->state.os_errno = error = SOCKERRNO; - failf(data, "bind failed with errno %d: %s", - error, Curl_strerror(conn, error)); - - return CURLE_INTERFACE_FAILED; -} - -/* - * verifyconnect() returns TRUE if the connect really has happened. - */ -static bool verifyconnect(curl_socket_t sockfd, int *error) -{ - bool rc = TRUE; -#ifdef SO_ERROR - int err = 0; - curl_socklen_t errSize = sizeof(err); - -#ifdef WIN32 - /* - * In October 2003 we effectively nullified this function on Windows due to - * problems with it using all CPU in multi-threaded cases. - * - * In May 2004, we bring it back to offer more info back on connect failures. - * Gisle Vanem could reproduce the former problems with this function, but - * could avoid them by adding this SleepEx() call below: - * - * "I don't have Rational Quantify, but the hint from his post was - * ntdll::NtRemoveIoCompletion(). So I'd assume the SleepEx (or maybe - * just Sleep(0) would be enough?) would release whatever - * mutex/critical-section the ntdll call is waiting on. - * - * Someone got to verify this on Win-NT 4.0, 2000." - */ - -#ifdef _WIN32_WCE - Sleep(0); -#else - SleepEx(0, FALSE); -#endif - -#endif - - if(0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize)) - err = SOCKERRNO; -#ifdef _WIN32_WCE - /* Old WinCE versions don't support SO_ERROR */ - if(WSAENOPROTOOPT == err) { - SET_SOCKERRNO(0); - err = 0; - } -#endif -#ifdef __minix - /* Minix 3.1.x doesn't support getsockopt on UDP sockets */ - if(EBADIOCTL == err) { - SET_SOCKERRNO(0); - err = 0; - } -#endif - if((0 == err) || (EISCONN == err)) - /* we are connected, awesome! */ - rc = TRUE; - else - /* This wasn't a successful connect */ - rc = FALSE; - if(error) - *error = err; -#else - (void)sockfd; - if(error) - *error = SOCKERRNO; -#endif - return rc; -} - -/* Used within the multi interface. Try next IP address, return TRUE if no - more address exists or error */ -static CURLcode trynextip(struct connectdata *conn, - int sockindex, - int tempindex) -{ - const int other = tempindex ^ 1; - CURLcode result = CURLE_COULDNT_CONNECT; - - /* First clean up after the failed socket. - Don't close it yet to ensure that the next IP's socket gets a different - file descriptor, which can prevent bugs when the curl_multi_socket_action - interface is used with certain select() replacements such as kqueue. */ - curl_socket_t fd_to_close = conn->tempsock[tempindex]; - conn->tempsock[tempindex] = CURL_SOCKET_BAD; - - if(sockindex == FIRSTSOCKET) { - Curl_addrinfo *ai = NULL; - int family = AF_UNSPEC; - - if(conn->tempaddr[tempindex]) { - /* find next address in the same protocol family */ - family = conn->tempaddr[tempindex]->ai_family; - ai = conn->tempaddr[tempindex]->ai_next; - } -#ifdef ENABLE_IPV6 - else if(conn->tempaddr[0]) { - /* happy eyeballs - try the other protocol family */ - int firstfamily = conn->tempaddr[0]->ai_family; - family = (firstfamily == AF_INET) ? AF_INET6 : AF_INET; - ai = conn->tempaddr[0]->ai_next; - } -#endif - - while(ai) { - if(conn->tempaddr[other]) { - /* we can safely skip addresses of the other protocol family */ - while(ai && ai->ai_family != family) - ai = ai->ai_next; - } - - if(ai) { - result = singleipconnect(conn, ai, &conn->tempsock[tempindex]); - if(result == CURLE_COULDNT_CONNECT) { - ai = ai->ai_next; - continue; - } - - conn->tempaddr[tempindex] = ai; - } - break; - } - } - - if(fd_to_close != CURL_SOCKET_BAD) - Curl_closesocket(conn, fd_to_close); - - return result; -} - -/* Copies connection info into the session handle to make it available - when the session handle is no longer associated with a connection. */ -void Curl_persistconninfo(struct connectdata *conn) -{ - memcpy(conn->data->info.conn_primary_ip, conn->primary_ip, MAX_IPADR_LEN); - memcpy(conn->data->info.conn_local_ip, conn->local_ip, MAX_IPADR_LEN); - conn->data->info.conn_scheme = conn->handler->scheme; - conn->data->info.conn_protocol = conn->handler->protocol; - conn->data->info.conn_primary_port = conn->primary_port; - conn->data->info.conn_local_port = conn->local_port; -} - -/* retrieves ip address and port from a sockaddr structure */ -static bool getaddressinfo(struct sockaddr *sa, char *addr, - long *port) -{ - unsigned short us_port; - struct sockaddr_in *si = NULL; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 *si6 = NULL; -#endif -#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX) - struct sockaddr_un *su = NULL; -#endif - - switch(sa->sa_family) { - case AF_INET: - si = (struct sockaddr_in *)(void *) sa; - if(Curl_inet_ntop(sa->sa_family, &si->sin_addr, - addr, MAX_IPADR_LEN)) { - us_port = ntohs(si->sin_port); - *port = us_port; - return TRUE; - } - break; -#ifdef ENABLE_IPV6 - case AF_INET6: - si6 = (struct sockaddr_in6 *)(void *) sa; - if(Curl_inet_ntop(sa->sa_family, &si6->sin6_addr, - addr, MAX_IPADR_LEN)) { - us_port = ntohs(si6->sin6_port); - *port = us_port; - return TRUE; - } - break; -#endif -#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX) - case AF_UNIX: - su = (struct sockaddr_un*)sa; - snprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path); - *port = 0; - return TRUE; -#endif - default: - break; - } - - addr[0] = '\0'; - *port = 0; - - return FALSE; -} - -/* retrieves the start/end point information of a socket of an established - connection */ -void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd) -{ - curl_socklen_t len; - struct Curl_sockaddr_storage ssrem; - struct Curl_sockaddr_storage ssloc; - struct Curl_easy *data = conn->data; - - if(conn->socktype == SOCK_DGRAM) - /* there's no connection! */ - return; - - if(!conn->bits.reuse && !conn->bits.tcp_fastopen) { - int error; - - len = sizeof(struct Curl_sockaddr_storage); - if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) { - error = SOCKERRNO; - failf(data, "getpeername() failed with errno %d: %s", - error, Curl_strerror(conn, error)); - return; - } - - len = sizeof(struct Curl_sockaddr_storage); - memset(&ssloc, 0, sizeof(ssloc)); - if(getsockname(sockfd, (struct sockaddr*) &ssloc, &len)) { - error = SOCKERRNO; - failf(data, "getsockname() failed with errno %d: %s", - error, Curl_strerror(conn, error)); - return; - } - - if(!getaddressinfo((struct sockaddr*)&ssrem, - conn->primary_ip, &conn->primary_port)) { - error = ERRNO; - failf(data, "ssrem inet_ntop() failed with errno %d: %s", - error, Curl_strerror(conn, error)); - return; - } - memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN); - - if(!getaddressinfo((struct sockaddr*)&ssloc, - conn->local_ip, &conn->local_port)) { - error = ERRNO; - failf(data, "ssloc inet_ntop() failed with errno %d: %s", - error, Curl_strerror(conn, error)); - return; - } - - } - - /* persist connection info in session handle */ - Curl_persistconninfo(conn); -} - -/* - * Curl_is_connected() checks if the socket has connected. - */ - -CURLcode Curl_is_connected(struct connectdata *conn, - int sockindex, - bool *connected) -{ - struct Curl_easy *data = conn->data; - CURLcode result = CURLE_OK; - time_t allow; - int error = 0; - struct timeval now; - int rc; - int i; - - DEBUGASSERT(sockindex >= FIRSTSOCKET && sockindex <= SECONDARYSOCKET); - - *connected = FALSE; /* a very negative world view is best */ - - if(conn->bits.tcpconnect[sockindex]) { - /* we are connected already! */ - *connected = TRUE; - return CURLE_OK; - } - - now = Curl_tvnow(); - - /* figure out how long time we have left to connect */ - allow = Curl_timeleft(data, &now, TRUE); - - if(allow < 0) { - /* time-out, bail out, go home */ - failf(data, "Connection time-out"); - return CURLE_OPERATION_TIMEDOUT; - } - - for(i=0; i<2; i++) { - const int other = i ^ 1; - if(conn->tempsock[i] == CURL_SOCKET_BAD) - continue; - -#ifdef mpeix - /* Call this function once now, and ignore the results. We do this to - "clear" the error state on the socket so that we can later read it - reliably. This is reported necessary on the MPE/iX operating system. */ - (void)verifyconnect(conn->tempsock[i], NULL); -#endif - - /* check socket for connect */ - rc = SOCKET_WRITABLE(conn->tempsock[i], 0); - - if(rc == 0) { /* no connection yet */ - error = 0; - if(curlx_tvdiff(now, conn->connecttime) >= conn->timeoutms_per_addr) { - infof(data, "After %ldms connect time, move on!\n", - conn->timeoutms_per_addr); - error = ETIMEDOUT; - } - - /* should we try another protocol family? */ - if(i == 0 && conn->tempaddr[1] == NULL && - curlx_tvdiff(now, conn->connecttime) >= HAPPY_EYEBALLS_TIMEOUT) { - trynextip(conn, sockindex, 1); - } - } - else if(rc == CURL_CSELECT_OUT || conn->bits.tcp_fastopen) { - if(verifyconnect(conn->tempsock[i], &error)) { - /* we are connected with TCP, awesome! */ - - /* use this socket from now on */ - conn->sock[sockindex] = conn->tempsock[i]; - conn->ip_addr = conn->tempaddr[i]; - conn->tempsock[i] = CURL_SOCKET_BAD; - - /* close the other socket, if open */ - if(conn->tempsock[other] != CURL_SOCKET_BAD) { - Curl_closesocket(conn, conn->tempsock[other]); - conn->tempsock[other] = CURL_SOCKET_BAD; - } - - /* see if we need to do any proxy magic first once we connected */ - result = Curl_connected_proxy(conn, sockindex); - if(result) - return result; - - conn->bits.tcpconnect[sockindex] = TRUE; - - *connected = TRUE; - if(sockindex == FIRSTSOCKET) - Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */ - Curl_updateconninfo(conn, conn->sock[sockindex]); - Curl_verboseconnect(conn); - - return CURLE_OK; - } - else - infof(data, "Connection failed\n"); - } - else if(rc & CURL_CSELECT_ERR) - (void)verifyconnect(conn->tempsock[i], &error); - - /* - * The connection failed here, we should attempt to connect to the "next - * address" for the given host. But first remember the latest error. - */ - if(error) { - data->state.os_errno = error; - SET_SOCKERRNO(error); - if(conn->tempaddr[i]) { - CURLcode status; - char ipaddress[MAX_IPADR_LEN]; - Curl_printable_address(conn->tempaddr[i], ipaddress, MAX_IPADR_LEN); - infof(data, "connect to %s port %ld failed: %s\n", - ipaddress, conn->port, Curl_strerror(conn, error)); - - conn->timeoutms_per_addr = conn->tempaddr[i]->ai_next == NULL ? - allow : allow / 2; - - status = trynextip(conn, sockindex, i); - if(status != CURLE_COULDNT_CONNECT - || conn->tempsock[other] == CURL_SOCKET_BAD) - /* the last attempt failed and no other sockets remain open */ - result = status; - } - } - } - - if(result) { - /* no more addresses to try */ - - const char *hostname; - - /* if the first address family runs out of addresses to try before - the happy eyeball timeout, go ahead and try the next family now */ - if(conn->tempaddr[1] == NULL) { - result = trynextip(conn, sockindex, 1); - if(!result) - return result; - } - - if(conn->bits.socksproxy) - hostname = conn->socks_proxy.host.name; - else if(conn->bits.httpproxy) - hostname = conn->http_proxy.host.name; - else if(conn->bits.conn_to_host) - hostname = conn->conn_to_host.name; - else - hostname = conn->host.name; - - failf(data, "Failed to connect to %s port %ld: %s", - hostname, conn->port, Curl_strerror(conn, error)); - } - - return result; -} - -void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) -{ -#if defined(TCP_NODELAY) -#if !defined(CURL_DISABLE_VERBOSE_STRINGS) - struct Curl_easy *data = conn->data; -#endif - curl_socklen_t onoff = (curl_socklen_t) 1; - int level = IPPROTO_TCP; - -#if 0 - /* The use of getprotobyname() is disabled since it isn't thread-safe on - numerous systems. On these getprotobyname_r() should be used instead, but - that exists in at least one 4 arg version and one 5 arg version, and - since the proto number rarely changes anyway we now just use the hard - coded number. The "proper" fix would need a configure check for the - correct function much in the same style the gethostbyname_r versions are - detected. */ - struct protoent *pe = getprotobyname("tcp"); - if(pe) - level = pe->p_proto; -#endif - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) conn; -#endif - - if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, - sizeof(onoff)) < 0) - infof(data, "Could not set TCP_NODELAY: %s\n", - Curl_strerror(conn, SOCKERRNO)); - else - infof(data, "TCP_NODELAY set\n"); -#else - (void)conn; - (void)sockfd; -#endif -} - -#ifdef SO_NOSIGPIPE -/* The preferred method on Mac OS X (10.2 and later) to prevent SIGPIPEs when - sending data to a dead peer (instead of relying on the 4th argument to send - being MSG_NOSIGNAL). Possibly also existing and in use on other BSD - systems? */ -static void nosigpipe(struct connectdata *conn, - curl_socket_t sockfd) -{ - struct Curl_easy *data= conn->data; - int onoff = 1; - if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff, - sizeof(onoff)) < 0) - infof(data, "Could not set SO_NOSIGPIPE: %s\n", - Curl_strerror(conn, SOCKERRNO)); -} -#else -#define nosigpipe(x,y) Curl_nop_stmt -#endif - -#ifdef USE_WINSOCK -/* When you run a program that uses the Windows Sockets API, you may - experience slow performance when you copy data to a TCP server. - - https://support.microsoft.com/kb/823764 - - Work-around: Make the Socket Send Buffer Size Larger Than the Program Send - Buffer Size - - The problem described in this knowledge-base is applied only to pre-Vista - Windows. Following function trying to detect OS version and skips - SO_SNDBUF adjustment for Windows Vista and above. -*/ -#define DETECT_OS_NONE 0 -#define DETECT_OS_PREVISTA 1 -#define DETECT_OS_VISTA_OR_LATER 2 - -void Curl_sndbufset(curl_socket_t sockfd) -{ - int val = CURL_MAX_WRITE_SIZE + 32; - int curval = 0; - int curlen = sizeof(curval); - - static int detectOsState = DETECT_OS_NONE; - - if(detectOsState == DETECT_OS_NONE) { - if(Curl_verify_windows_version(6, 0, PLATFORM_WINNT, - VERSION_GREATER_THAN_EQUAL)) - detectOsState = DETECT_OS_VISTA_OR_LATER; - else - detectOsState = DETECT_OS_PREVISTA; - } - - if(detectOsState == DETECT_OS_VISTA_OR_LATER) - return; - - if(getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&curval, &curlen) == 0) - if(curval > val) - return; - - setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&val, sizeof(val)); -} -#endif - -/* - * singleipconnect() - * - * Note that even on connect fail it returns CURLE_OK, but with 'sock' set to - * CURL_SOCKET_BAD. Other errors will however return proper errors. - * - * singleipconnect() connects to the given IP only, and it may return without - * having connected. - */ -static CURLcode singleipconnect(struct connectdata *conn, - const Curl_addrinfo *ai, - curl_socket_t *sockp) -{ - struct Curl_sockaddr_ex addr; - int rc = -1; - int error = 0; - bool isconnected = FALSE; - struct Curl_easy *data = conn->data; - curl_socket_t sockfd; - CURLcode result; - char ipaddress[MAX_IPADR_LEN]; - long port; - bool is_tcp; - - *sockp = CURL_SOCKET_BAD; - - result = Curl_socket(conn, ai, &addr, &sockfd); - if(result) - /* Failed to create the socket, but still return OK since we signal the - lack of socket as well. This allows the parent function to keep looping - over alternative addresses/socket families etc. */ - return CURLE_OK; - - /* store remote address and port used in this connection attempt */ - if(!getaddressinfo((struct sockaddr*)&addr.sa_addr, - ipaddress, &port)) { - /* malformed address or bug in inet_ntop, try next address */ - error = ERRNO; - failf(data, "sa_addr inet_ntop() failed with errno %d: %s", - error, Curl_strerror(conn, error)); - Curl_closesocket(conn, sockfd); - return CURLE_OK; - } - infof(data, " Trying %s...\n", ipaddress); - -#ifdef ENABLE_IPV6 - is_tcp = (addr.family == AF_INET || addr.family == AF_INET6) && - addr.socktype == SOCK_STREAM; -#else - is_tcp = (addr.family == AF_INET) && addr.socktype == SOCK_STREAM; -#endif - if(is_tcp && data->set.tcp_nodelay) - Curl_tcpnodelay(conn, sockfd); - - nosigpipe(conn, sockfd); - - Curl_sndbufset(sockfd); - - if(is_tcp && data->set.tcp_keepalive) - tcpkeepalive(data, sockfd); - - if(data->set.fsockopt) { - /* activate callback for setting socket options */ - error = data->set.fsockopt(data->set.sockopt_client, - sockfd, - CURLSOCKTYPE_IPCXN); - - if(error == CURL_SOCKOPT_ALREADY_CONNECTED) - isconnected = TRUE; - else if(error) { - Curl_closesocket(conn, sockfd); /* close the socket and bail out */ - return CURLE_ABORTED_BY_CALLBACK; - } - } - - /* possibly bind the local end to an IP, interface or port */ - if(addr.family == AF_INET -#ifdef ENABLE_IPV6 - || addr.family == AF_INET6 -#endif - ) { - result = bindlocal(conn, sockfd, addr.family, - Curl_ipv6_scope((struct sockaddr*)&addr.sa_addr)); - if(result) { - Curl_closesocket(conn, sockfd); /* close socket and bail out */ - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - /* The address family is not supported on this interface. - We can continue trying addresses */ - return CURLE_COULDNT_CONNECT; - } - return result; - } - } - - /* set socket non-blocking */ - (void)curlx_nonblock(sockfd, TRUE); - - conn->connecttime = Curl_tvnow(); - if(conn->num_addr > 1) - Curl_expire_latest(data, conn->timeoutms_per_addr); - - /* Connect TCP sockets, bind UDP */ - if(!isconnected && (conn->socktype == SOCK_STREAM)) { - if(conn->bits.tcp_fastopen) { -#if defined(CONNECT_DATA_IDEMPOTENT) /* OS X */ - sa_endpoints_t endpoints; - endpoints.sae_srcif = 0; - endpoints.sae_srcaddr = NULL; - endpoints.sae_srcaddrlen = 0; - endpoints.sae_dstaddr = &addr.sa_addr; - endpoints.sae_dstaddrlen = addr.addrlen; - - rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY, - CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT, - NULL, 0, NULL, NULL); -#elif defined(MSG_FASTOPEN) /* Linux */ - if(conn->given->flags & PROTOPT_SSL) - rc = connect(sockfd, &addr.sa_addr, addr.addrlen); - else - rc = 0; /* Do nothing */ -#endif - } - else { - rc = connect(sockfd, &addr.sa_addr, addr.addrlen); - } - - if(-1 == rc) - error = SOCKERRNO; - } - else { - *sockp = sockfd; - return CURLE_OK; - } - -#ifdef ENABLE_IPV6 - conn->bits.ipv6 = (addr.family == AF_INET6)?TRUE:FALSE; -#endif - - if(-1 == rc) { - switch(error) { - case EINPROGRESS: - case EWOULDBLOCK: -#if defined(EAGAIN) -#if (EAGAIN) != (EWOULDBLOCK) - /* On some platforms EAGAIN and EWOULDBLOCK are the - * same value, and on others they are different, hence - * the odd #if - */ - case EAGAIN: -#endif -#endif - result = CURLE_OK; - break; - - default: - /* unknown error, fallthrough and try another address! */ - infof(data, "Immediate connect fail for %s: %s\n", - ipaddress, Curl_strerror(conn, error)); - data->state.os_errno = error; - - /* connect failed */ - Curl_closesocket(conn, sockfd); - result = CURLE_COULDNT_CONNECT; - } - } - - if(!result) - *sockp = sockfd; - - return result; -} - -/* - * TCP connect to the given host with timeout, proxy or remote doesn't matter. - * There might be more than one IP address to try out. Fill in the passed - * pointer with the connected socket. - */ - -CURLcode Curl_connecthost(struct connectdata *conn, /* context */ - const struct Curl_dns_entry *remotehost) -{ - struct Curl_easy *data = conn->data; - struct timeval before = Curl_tvnow(); - CURLcode result = CURLE_COULDNT_CONNECT; - - time_t timeout_ms = Curl_timeleft(data, &before, TRUE); - - if(timeout_ms < 0) { - /* a precaution, no need to continue if time already is up */ - failf(data, "Connection time-out"); - return CURLE_OPERATION_TIMEDOUT; - } - - conn->num_addr = Curl_num_addresses(remotehost->addr); - conn->tempaddr[0] = remotehost->addr; - conn->tempaddr[1] = NULL; - conn->tempsock[0] = CURL_SOCKET_BAD; - conn->tempsock[1] = CURL_SOCKET_BAD; - Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT); - - /* Max time for the next connection attempt */ - conn->timeoutms_per_addr = - conn->tempaddr[0]->ai_next == NULL ? timeout_ms : timeout_ms / 2; - - /* start connecting to first IP */ - while(conn->tempaddr[0]) { - result = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0])); - if(!result) - break; - conn->tempaddr[0] = conn->tempaddr[0]->ai_next; - } - - if(conn->tempsock[0] == CURL_SOCKET_BAD) { - if(!result) - result = CURLE_COULDNT_CONNECT; - return result; - } - - data->info.numconnects++; /* to track the number of connections made */ - - return CURLE_OK; -} - -struct connfind { - struct connectdata *tofind; - bool found; -}; - -static int conn_is_conn(struct connectdata *conn, void *param) -{ - struct connfind *f = (struct connfind *)param; - if(conn == f->tofind) { - f->found = TRUE; - return 1; - } - return 0; -} - -/* - * Used to extract socket and connectdata struct for the most recent - * transfer on the given Curl_easy. - * - * The returned socket will be CURL_SOCKET_BAD in case of failure! - */ -curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, - struct connectdata **connp) -{ - curl_socket_t sockfd; - - DEBUGASSERT(data); - - /* this works for an easy handle: - * - that has been used for curl_easy_perform() - * - that is associated with a multi handle, and whose connection - * was detached with CURLOPT_CONNECT_ONLY - */ - if(data->state.lastconnect && (data->multi_easy || data->multi)) { - struct connectdata *c = data->state.lastconnect; - struct connfind find; - find.tofind = data->state.lastconnect; - find.found = FALSE; - - Curl_conncache_foreach(data->multi_easy? - &data->multi_easy->conn_cache: - &data->multi->conn_cache, &find, conn_is_conn); - - if(!find.found) { - data->state.lastconnect = NULL; - return CURL_SOCKET_BAD; - } - - if(connp) - /* only store this if the caller cares for it */ - *connp = c; - sockfd = c->sock[FIRSTSOCKET]; - } - else - return CURL_SOCKET_BAD; - - return sockfd; -} - -/* - * Check if a connection seems to be alive. - */ -bool Curl_connalive(struct connectdata *conn) -{ - /* First determine if ssl */ - if(conn->ssl[FIRSTSOCKET].use) { - /* use the SSL context */ - if(!Curl_ssl_check_cxn(conn)) - return false; /* FIN received */ - } -/* Minix 3.1 doesn't support any flags on recv; just assume socket is OK */ -#ifdef MSG_PEEK - else if(conn->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) - return false; - else { - /* use the socket */ - char buf; - if(recv((RECV_TYPE_ARG1)conn->sock[FIRSTSOCKET], (RECV_TYPE_ARG2)&buf, - (RECV_TYPE_ARG3)1, (RECV_TYPE_ARG4)MSG_PEEK) == 0) { - return false; /* FIN received */ - } - } -#endif - return true; -} - -/* - * Close a socket. - * - * 'conn' can be NULL, beware! - */ -int Curl_closesocket(struct connectdata *conn, - curl_socket_t sock) -{ - if(conn && conn->fclosesocket) { - if((sock == conn->sock[SECONDARYSOCKET]) && - conn->sock_accepted[SECONDARYSOCKET]) - /* if this socket matches the second socket, and that was created with - accept, then we MUST NOT call the callback but clear the accepted - status */ - conn->sock_accepted[SECONDARYSOCKET] = FALSE; - else { - Curl_multi_closed(conn, sock); - return conn->fclosesocket(conn->closesocket_client, sock); - } - } - - if(conn) - /* tell the multi-socket code about this */ - Curl_multi_closed(conn, sock); - - sclose(sock); - - return 0; -} - -/* - * Create a socket based on info from 'conn' and 'ai'. - * - * 'addr' should be a pointer to the correct struct to get data back, or NULL. - * 'sockfd' must be a pointer to a socket descriptor. - * - * If the open socket callback is set, used that! - * - */ -CURLcode Curl_socket(struct connectdata *conn, - const Curl_addrinfo *ai, - struct Curl_sockaddr_ex *addr, - curl_socket_t *sockfd) -{ - struct Curl_easy *data = conn->data; - struct Curl_sockaddr_ex dummy; - - if(!addr) - /* if the caller doesn't want info back, use a local temp copy */ - addr = &dummy; - - /* - * The Curl_sockaddr_ex structure is basically libcurl's external API - * curl_sockaddr structure with enough space available to directly hold - * any protocol-specific address structures. The variable declared here - * will be used to pass / receive data to/from the fopensocket callback - * if this has been set, before that, it is initialized from parameters. - */ - - addr->family = ai->ai_family; - addr->socktype = conn->socktype; - addr->protocol = conn->socktype==SOCK_DGRAM?IPPROTO_UDP:ai->ai_protocol; - addr->addrlen = ai->ai_addrlen; - - if(addr->addrlen > sizeof(struct Curl_sockaddr_storage)) - addr->addrlen = sizeof(struct Curl_sockaddr_storage); - memcpy(&addr->sa_addr, ai->ai_addr, addr->addrlen); - - if(data->set.fopensocket) - /* - * If the opensocket callback is set, all the destination address - * information is passed to the callback. Depending on this information the - * callback may opt to abort the connection, this is indicated returning - * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When - * the callback returns a valid socket the destination address information - * might have been changed and this 'new' address will actually be used - * here to connect. - */ - *sockfd = data->set.fopensocket(data->set.opensocket_client, - CURLSOCKTYPE_IPCXN, - (struct curl_sockaddr *)addr); - else - /* opensocket callback not set, so simply create the socket now */ - *sockfd = socket(addr->family, addr->socktype, addr->protocol); - - if(*sockfd == CURL_SOCKET_BAD) - /* no socket, no connection */ - return CURLE_COULDNT_CONNECT; - -#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) - if(conn->scope_id && (addr->family == AF_INET6)) { - struct sockaddr_in6 * const sa6 = (void *)&addr->sa_addr; - sa6->sin6_scope_id = conn->scope_id; - } -#endif - - return CURLE_OK; - -} - -/* - * Curl_conncontrol() marks streams or connection for closure. - */ -void Curl_conncontrol(struct connectdata *conn, - int ctrl /* see defines in header */ -#ifdef DEBUGBUILD - , const char *reason -#endif - ) -{ - /* close if a connection, or a stream that isn't multiplexed */ - bool closeit = (ctrl == CONNCTRL_CONNECTION) || - ((ctrl == CONNCTRL_STREAM) && !(conn->handler->flags & PROTOPT_STREAM)); - if((ctrl == CONNCTRL_STREAM) && - (conn->handler->flags & PROTOPT_STREAM)) - DEBUGF(infof(conn->data, "Kill stream: %s\n", reason)); - else if(closeit != conn->bits.close) { - DEBUGF(infof(conn->data, "Marked for [%s]: %s\n", - closeit?"closure":"keep alive", reason)); - conn->bits.close = closeit; /* the only place in the source code that - should assign this bit */ - } -} - -/* Data received can be cached at various levels, so check them all here. */ -bool Curl_conn_data_pending(struct connectdata *conn, int sockindex) -{ - int readable; - - if(Curl_ssl_data_pending(conn, sockindex) || - Curl_recv_has_postponed_data(conn, sockindex)) - return true; - - readable = SOCKET_READABLE(conn->sock[sockindex], 0); - return (readable > 0 && (readable & CURL_CSELECT_IN)); -} diff --git a/build/premake/premake5/contrib/curl/lib/connect.h b/build/premake/premake5/contrib/curl/lib/connect.h deleted file mode 100644 index 5653cb4e50..0000000000 --- a/build/premake/premake5/contrib/curl/lib/connect.h +++ /dev/null @@ -1,147 +0,0 @@ -#ifndef HEADER_CURL_CONNECT_H -#define HEADER_CURL_CONNECT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#include "nonblock.h" /* for curlx_nonblock(), formerly Curl_nonblock() */ -#include "sockaddr.h" - -CURLcode Curl_is_connected(struct connectdata *conn, - int sockindex, - bool *connected); - -CURLcode Curl_connecthost(struct connectdata *conn, - const struct Curl_dns_entry *host); - -/* generic function that returns how much time there's left to run, according - to the timeouts set */ -time_t Curl_timeleft(struct Curl_easy *data, - struct timeval *nowp, - bool duringconnect); - -#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */ -#define HAPPY_EYEBALLS_TIMEOUT 200 /* milliseconds to wait between - IPv4/IPv6 connection attempts */ - -/* - * Used to extract socket and connectdata struct for the most recent - * transfer on the given Curl_easy. - * - * The returned socket will be CURL_SOCKET_BAD in case of failure! - */ -curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, - struct connectdata **connp); - -/* - * Check if a connection seems to be alive. - */ -bool Curl_connalive(struct connectdata *conn); - -#ifdef USE_WINSOCK -/* When you run a program that uses the Windows Sockets API, you may - experience slow performance when you copy data to a TCP server. - - https://support.microsoft.com/kb/823764 - - Work-around: Make the Socket Send Buffer Size Larger Than the Program Send - Buffer Size - -*/ -void Curl_sndbufset(curl_socket_t sockfd); -#else -#define Curl_sndbufset(y) Curl_nop_stmt -#endif - -void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd); -void Curl_persistconninfo(struct connectdata *conn); -int Curl_closesocket(struct connectdata *conn, curl_socket_t sock); - -/* - * The Curl_sockaddr_ex structure is basically libcurl's external API - * curl_sockaddr structure with enough space available to directly hold any - * protocol-specific address structures. The variable declared here will be - * used to pass / receive data to/from the fopensocket callback if this has - * been set, before that, it is initialized from parameters. - */ -struct Curl_sockaddr_ex { - int family; - int socktype; - int protocol; - unsigned int addrlen; - union { - struct sockaddr addr; - struct Curl_sockaddr_storage buff; - } _sa_ex_u; -}; -#define sa_addr _sa_ex_u.addr - -/* - * Create a socket based on info from 'conn' and 'ai'. - * - * Fill in 'addr' and 'sockfd' accordingly if OK is returned. If the open - * socket callback is set, used that! - * - */ -CURLcode Curl_socket(struct connectdata *conn, - const Curl_addrinfo *ai, - struct Curl_sockaddr_ex *addr, - curl_socket_t *sockfd); - -void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd); - -/* - * Curl_conncontrol() marks the end of a connection/stream. The 'closeit' - * argument specifies if it is the end of a connection or a stream. - * - * For stream-based protocols (such as HTTP/2), a stream close will not cause - * a connection close. Other protocols will close the connection for both - * cases. - * - * It sets the bit.close bit to TRUE (with an explanation for debug builds), - * when the connection will close. - */ - -#define CONNCTRL_KEEP 0 /* undo a marked closure */ -#define CONNCTRL_CONNECTION 1 -#define CONNCTRL_STREAM 2 - -void Curl_conncontrol(struct connectdata *conn, - int closeit -#ifdef DEBUGBUILD - , const char *reason -#endif - ); - -#ifdef DEBUGBUILD -#define streamclose(x,y) Curl_conncontrol(x, CONNCTRL_STREAM, y) -#define connclose(x,y) Curl_conncontrol(x, CONNCTRL_CONNECTION, y) -#define connkeep(x,y) Curl_conncontrol(x, CONNCTRL_KEEP, y) -#else /* if !CURLDEBUG */ -#define streamclose(x,y) Curl_conncontrol(x, CONNCTRL_STREAM) -#define connclose(x,y) Curl_conncontrol(x, CONNCTRL_CONNECTION) -#define connkeep(x,y) Curl_conncontrol(x, CONNCTRL_KEEP) -#endif - -bool Curl_conn_data_pending(struct connectdata *conn, int sockindex); - -#endif /* HEADER_CURL_CONNECT_H */ diff --git a/build/premake/premake5/contrib/curl/lib/content_encoding.c b/build/premake/premake5/contrib/curl/lib/content_encoding.c deleted file mode 100644 index c3996a1130..0000000000 --- a/build/premake/premake5/contrib/curl/lib/content_encoding.c +++ /dev/null @@ -1,432 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_LIBZ - -#include "urldata.h" -#include -#include "sendf.h" -#include "content_encoding.h" -#include "strdup.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Comment this out if zlib is always going to be at least ver. 1.2.0.4 - (doing so will reduce code size slightly). */ -#define OLD_ZLIB_SUPPORT 1 - -#define DSIZ CURL_MAX_WRITE_SIZE /* buffer size for decompressed data */ - -#define GZIP_MAGIC_0 0x1f -#define GZIP_MAGIC_1 0x8b - -/* gzip flag byte */ -#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ -#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define RESERVED 0xE0 /* bits 5..7: reserved */ - -static voidpf -zalloc_cb(voidpf opaque, unsigned int items, unsigned int size) -{ - (void) opaque; - /* not a typo, keep it calloc() */ - return (voidpf) calloc(items, size); -} - -static void -zfree_cb(voidpf opaque, voidpf ptr) -{ - (void) opaque; - free(ptr); -} - -static CURLcode -process_zlib_error(struct connectdata *conn, z_stream *z) -{ - struct Curl_easy *data = conn->data; - if(z->msg) - failf(data, "Error while processing content unencoding: %s", - z->msg); - else - failf(data, "Error while processing content unencoding: " - "Unknown failure within decompression software."); - - return CURLE_BAD_CONTENT_ENCODING; -} - -static CURLcode -exit_zlib(z_stream *z, zlibInitState *zlib_init, CURLcode result) -{ - inflateEnd(z); - *zlib_init = ZLIB_UNINIT; - return result; -} - -static CURLcode -inflate_stream(struct connectdata *conn, - struct SingleRequest *k) -{ - int allow_restart = 1; - z_stream *z = &k->z; /* zlib state structure */ - uInt nread = z->avail_in; - Bytef *orig_in = z->next_in; - int status; /* zlib status */ - CURLcode result = CURLE_OK; /* Curl_client_write status */ - char *decomp; /* Put the decompressed data here. */ - - /* Dynamically allocate a buffer for decompression because it's uncommonly - large to hold on the stack */ - decomp = malloc(DSIZ); - if(decomp == NULL) { - return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY); - } - - /* because the buffer size is fixed, iteratively decompress and transfer to - the client via client_write. */ - for(;;) { - /* (re)set buffer for decompressed output for every iteration */ - z->next_out = (Bytef *)decomp; - z->avail_out = DSIZ; - - status = inflate(z, Z_SYNC_FLUSH); - if(status == Z_OK || status == Z_STREAM_END) { - allow_restart = 0; - if((DSIZ - z->avail_out) && (!k->ignorebody)) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, decomp, - DSIZ - z->avail_out); - /* if !CURLE_OK, clean up, return */ - if(result) { - free(decomp); - return exit_zlib(z, &k->zlib_init, result); - } - } - - /* Done? clean up, return */ - if(status == Z_STREAM_END) { - free(decomp); - if(inflateEnd(z) == Z_OK) - return exit_zlib(z, &k->zlib_init, result); - else - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); - } - - /* Done with these bytes, exit */ - - /* status is always Z_OK at this point! */ - if(z->avail_in == 0) { - free(decomp); - return result; - } - } - else if(allow_restart && status == Z_DATA_ERROR) { - /* some servers seem to not generate zlib headers, so this is an attempt - to fix and continue anyway */ - - (void) inflateEnd(z); /* don't care about the return code */ - if(inflateInit2(z, -MAX_WBITS) != Z_OK) { - free(decomp); - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); - } - z->next_in = orig_in; - z->avail_in = nread; - allow_restart = 0; - continue; - } - else { /* Error; exit loop, handle below */ - free(decomp); - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); - } - } - /* Will never get here */ -} - -CURLcode -Curl_unencode_deflate_write(struct connectdata *conn, - struct SingleRequest *k, - ssize_t nread) -{ - z_stream *z = &k->z; /* zlib state structure */ - - /* Initialize zlib? */ - if(k->zlib_init == ZLIB_UNINIT) { - memset(z, 0, sizeof(z_stream)); - z->zalloc = (alloc_func)zalloc_cb; - z->zfree = (free_func)zfree_cb; - - if(inflateInit(z) != Z_OK) - return process_zlib_error(conn, z); - k->zlib_init = ZLIB_INIT; - } - - /* Set the compressed input when this function is called */ - z->next_in = (Bytef *)k->str; - z->avail_in = (uInt)nread; - - /* Now uncompress the data */ - return inflate_stream(conn, k); -} - -#ifdef OLD_ZLIB_SUPPORT -/* Skip over the gzip header */ -static enum { - GZIP_OK, - GZIP_BAD, - GZIP_UNDERFLOW -} check_gzip_header(unsigned char const *data, ssize_t len, ssize_t *headerlen) -{ - int method, flags; - const ssize_t totallen = len; - - /* The shortest header is 10 bytes */ - if(len < 10) - return GZIP_UNDERFLOW; - - if((data[0] != GZIP_MAGIC_0) || (data[1] != GZIP_MAGIC_1)) - return GZIP_BAD; - - method = data[2]; - flags = data[3]; - - if(method != Z_DEFLATED || (flags & RESERVED) != 0) { - /* Can't handle this compression method or unknown flag */ - return GZIP_BAD; - } - - /* Skip over time, xflags, OS code and all previous bytes */ - len -= 10; - data += 10; - - if(flags & EXTRA_FIELD) { - ssize_t extra_len; - - if(len < 2) - return GZIP_UNDERFLOW; - - extra_len = (data[1] << 8) | data[0]; - - if(len < (extra_len+2)) - return GZIP_UNDERFLOW; - - len -= (extra_len + 2); - data += (extra_len + 2); - } - - if(flags & ORIG_NAME) { - /* Skip over NUL-terminated file name */ - while(len && *data) { - --len; - ++data; - } - if(!len || *data) - return GZIP_UNDERFLOW; - - /* Skip over the NUL */ - --len; - ++data; - } - - if(flags & COMMENT) { - /* Skip over NUL-terminated comment */ - while(len && *data) { - --len; - ++data; - } - if(!len || *data) - return GZIP_UNDERFLOW; - - /* Skip over the NUL */ - --len; - } - - if(flags & HEAD_CRC) { - if(len < 2) - return GZIP_UNDERFLOW; - - len -= 2; - } - - *headerlen = totallen - len; - return GZIP_OK; -} -#endif - -CURLcode -Curl_unencode_gzip_write(struct connectdata *conn, - struct SingleRequest *k, - ssize_t nread) -{ - z_stream *z = &k->z; /* zlib state structure */ - - /* Initialize zlib? */ - if(k->zlib_init == ZLIB_UNINIT) { - memset(z, 0, sizeof(z_stream)); - z->zalloc = (alloc_func)zalloc_cb; - z->zfree = (free_func)zfree_cb; - - if(strcmp(zlibVersion(), "1.2.0.4") >= 0) { - /* zlib ver. >= 1.2.0.4 supports transparent gzip decompressing */ - if(inflateInit2(z, MAX_WBITS+32) != Z_OK) { - return process_zlib_error(conn, z); - } - k->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */ - } - else { - /* we must parse the gzip header ourselves */ - if(inflateInit2(z, -MAX_WBITS) != Z_OK) { - return process_zlib_error(conn, z); - } - k->zlib_init = ZLIB_INIT; /* Initial call state */ - } - } - - if(k->zlib_init == ZLIB_INIT_GZIP) { - /* Let zlib handle the gzip decompression entirely */ - z->next_in = (Bytef *)k->str; - z->avail_in = (uInt)nread; - /* Now uncompress the data */ - return inflate_stream(conn, k); - } - -#ifndef OLD_ZLIB_SUPPORT - /* Support for old zlib versions is compiled away and we are running with - an old version, so return an error. */ - return exit_zlib(z, &k->zlib_init, CURLE_WRITE_ERROR); - -#else - /* This next mess is to get around the potential case where there isn't - * enough data passed in to skip over the gzip header. If that happens, we - * malloc a block and copy what we have then wait for the next call. If - * there still isn't enough (this is definitely a worst-case scenario), we - * make the block bigger, copy the next part in and keep waiting. - * - * This is only required with zlib versions < 1.2.0.4 as newer versions - * can handle the gzip header themselves. - */ - - switch(k->zlib_init) { - /* Skip over gzip header? */ - case ZLIB_INIT: - { - /* Initial call state */ - ssize_t hlen; - - switch(check_gzip_header((unsigned char *)k->str, nread, &hlen)) { - case GZIP_OK: - z->next_in = (Bytef *)k->str + hlen; - z->avail_in = (uInt)(nread - hlen); - k->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ - break; - - case GZIP_UNDERFLOW: - /* We need more data so we can find the end of the gzip header. It's - * possible that the memory block we malloc here will never be freed if - * the transfer abruptly aborts after this point. Since it's unlikely - * that circumstances will be right for this code path to be followed in - * the first place, and it's even more unlikely for a transfer to fail - * immediately afterwards, it should seldom be a problem. - */ - z->avail_in = (uInt)nread; - z->next_in = malloc(z->avail_in); - if(z->next_in == NULL) { - return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY); - } - memcpy(z->next_in, k->str, z->avail_in); - k->zlib_init = ZLIB_GZIP_HEADER; /* Need more gzip header data state */ - /* We don't have any data to inflate yet */ - return CURLE_OK; - - case GZIP_BAD: - default: - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); - } - - } - break; - - case ZLIB_GZIP_HEADER: - { - /* Need more gzip header data state */ - ssize_t hlen; - z->avail_in += (uInt)nread; - z->next_in = Curl_saferealloc(z->next_in, z->avail_in); - if(z->next_in == NULL) { - return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY); - } - /* Append the new block of data to the previous one */ - memcpy(z->next_in + z->avail_in - nread, k->str, nread); - - switch(check_gzip_header(z->next_in, z->avail_in, &hlen)) { - case GZIP_OK: - /* This is the zlib stream data */ - free(z->next_in); - /* Don't point into the malloced block since we just freed it */ - z->next_in = (Bytef *)k->str + hlen + nread - z->avail_in; - z->avail_in = (uInt)(z->avail_in - hlen); - k->zlib_init = ZLIB_GZIP_INFLATING; /* Inflating stream state */ - break; - - case GZIP_UNDERFLOW: - /* We still don't have any data to inflate! */ - return CURLE_OK; - - case GZIP_BAD: - default: - free(z->next_in); - return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z)); - } - - } - break; - - case ZLIB_GZIP_INFLATING: - default: - /* Inflating stream state */ - z->next_in = (Bytef *)k->str; - z->avail_in = (uInt)nread; - break; - } - - if(z->avail_in == 0) { - /* We don't have any data to inflate; wait until next time */ - return CURLE_OK; - } - - /* We've parsed the header, now uncompress the data */ - return inflate_stream(conn, k); -#endif -} - -void Curl_unencode_cleanup(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - struct SingleRequest *k = &data->req; - z_stream *z = &k->z; - if(k->zlib_init != ZLIB_UNINIT) - (void) exit_zlib(z, &k->zlib_init, CURLE_OK); -} - -#endif /* HAVE_LIBZ */ diff --git a/build/premake/premake5/contrib/curl/lib/content_encoding.h b/build/premake/premake5/contrib/curl/lib/content_encoding.h deleted file mode 100644 index 3fadd28997..0000000000 --- a/build/premake/premake5/contrib/curl/lib/content_encoding.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef HEADER_CURL_CONTENT_ENCODING_H -#define HEADER_CURL_CONTENT_ENCODING_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -/* - * Comma-separated list all supported Content-Encodings ('identity' is implied) - */ -#ifdef HAVE_LIBZ -#define ALL_CONTENT_ENCODINGS "deflate, gzip" -/* force a cleanup */ -void Curl_unencode_cleanup(struct connectdata *conn); -#else -#define ALL_CONTENT_ENCODINGS "identity" -#define Curl_unencode_cleanup(x) Curl_nop_stmt -#endif - -CURLcode Curl_unencode_deflate_write(struct connectdata *conn, - struct SingleRequest *req, - ssize_t nread); - -CURLcode -Curl_unencode_gzip_write(struct connectdata *conn, - struct SingleRequest *k, - ssize_t nread); - - -#endif /* HEADER_CURL_CONTENT_ENCODING_H */ diff --git a/build/premake/premake5/contrib/curl/lib/cookie.c b/build/premake/premake5/contrib/curl/lib/cookie.c deleted file mode 100644 index 946284331d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/cookie.c +++ /dev/null @@ -1,1450 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/*** - - -RECEIVING COOKIE INFORMATION -============================ - -struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, - const char *file, struct CookieInfo *inc, bool newsession); - - Inits a cookie struct to store data in a local file. This is always - called before any cookies are set. - -struct Cookie *Curl_cookie_add(struct Curl_easy *data, - struct CookieInfo *c, bool httpheader, char *lineptr, - const char *domain, const char *path); - - The 'lineptr' parameter is a full "Set-cookie:" line as - received from a server. - - The function need to replace previously stored lines that this new - line superceeds. - - It may remove lines that are expired. - - It should return an indication of success/error. - - -SENDING COOKIE INFORMATION -========================== - -struct Cookies *Curl_cookie_getlist(struct CookieInfo *cookie, - char *host, char *path, bool secure); - - For a given host and path, return a linked list of cookies that - the client should send to the server if used now. The secure - boolean informs the cookie if a secure connection is achieved or - not. - - It shall only return cookies that haven't expired. - - -Example set of cookies: - - Set-cookie: PRODUCTINFO=webxpress; domain=.fidelity.com; path=/; secure - Set-cookie: PERSONALIZE=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; - domain=.fidelity.com; path=/ftgw; secure - Set-cookie: FidHist=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; - domain=.fidelity.com; path=/; secure - Set-cookie: FidOrder=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; - domain=.fidelity.com; path=/; secure - Set-cookie: DisPend=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; - domain=.fidelity.com; path=/; secure - Set-cookie: FidDis=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; - domain=.fidelity.com; path=/; secure - Set-cookie: - Session_Key@6791a9e0-901a-11d0-a1c8-9b012c88aa77=none;expires=Monday, - 13-Jun-1988 03:04:55 GMT; domain=.fidelity.com; path=/; secure -****/ - - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - -#ifdef USE_LIBPSL -# include -#endif - -#include "urldata.h" -#include "cookie.h" -#include "strtok.h" -#include "sendf.h" -#include "slist.h" -#include "share.h" -#include "strtoofft.h" -#include "strcase.h" -#include "curl_memrchr.h" -#include "inet_pton.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -static void freecookie(struct Cookie *co) -{ - free(co->expirestr); - free(co->domain); - free(co->path); - free(co->spath); - free(co->name); - free(co->value); - free(co->maxage); - free(co->version); - free(co); -} - -static bool tailmatch(const char *cooke_domain, const char *hostname) -{ - size_t cookie_domain_len = strlen(cooke_domain); - size_t hostname_len = strlen(hostname); - - if(hostname_len < cookie_domain_len) - return FALSE; - - if(!strcasecompare(cooke_domain, hostname+hostname_len-cookie_domain_len)) - return FALSE; - - /* A lead char of cookie_domain is not '.'. - RFC6265 4.1.2.3. The Domain Attribute says: - For example, if the value of the Domain attribute is - "example.com", the user agent will include the cookie in the Cookie - header when making HTTP requests to example.com, www.example.com, and - www.corp.example.com. - */ - if(hostname_len == cookie_domain_len) - return TRUE; - if('.' == *(hostname + hostname_len - cookie_domain_len - 1)) - return TRUE; - return FALSE; -} - -/* - * matching cookie path and url path - * RFC6265 5.1.4 Paths and Path-Match - */ -static bool pathmatch(const char *cookie_path, const char *request_uri) -{ - size_t cookie_path_len; - size_t uri_path_len; - char *uri_path = NULL; - char *pos; - bool ret = FALSE; - - /* cookie_path must not have last '/' separator. ex: /sample */ - cookie_path_len = strlen(cookie_path); - if(1 == cookie_path_len) { - /* cookie_path must be '/' */ - return TRUE; - } - - uri_path = strdup(request_uri); - if(!uri_path) - return FALSE; - pos = strchr(uri_path, '?'); - if(pos) - *pos = 0x0; - - /* #-fragments are already cut off! */ - if(0 == strlen(uri_path) || uri_path[0] != '/') { - free(uri_path); - uri_path = strdup("/"); - if(!uri_path) - return FALSE; - } - - /* here, RFC6265 5.1.4 says - 4. Output the characters of the uri-path from the first character up - to, but not including, the right-most %x2F ("/"). - but URL path /hoge?fuga=xxx means /hoge/index.cgi?fuga=xxx in some site - without redirect. - Ignore this algorithm because /hoge is uri path for this case - (uri path is not /). - */ - - uri_path_len = strlen(uri_path); - - if(uri_path_len < cookie_path_len) { - ret = FALSE; - goto pathmatched; - } - - /* not using checkprefix() because matching should be case-sensitive */ - if(strncmp(cookie_path, uri_path, cookie_path_len)) { - ret = FALSE; - goto pathmatched; - } - - /* The cookie-path and the uri-path are identical. */ - if(cookie_path_len == uri_path_len) { - ret = TRUE; - goto pathmatched; - } - - /* here, cookie_path_len < url_path_len */ - if(uri_path[cookie_path_len] == '/') { - ret = TRUE; - goto pathmatched; - } - - ret = FALSE; - -pathmatched: - free(uri_path); - return ret; -} - -/* - * cookie path sanitize - */ -static char *sanitize_cookie_path(const char *cookie_path) -{ - size_t len; - char *new_path = strdup(cookie_path); - if(!new_path) - return NULL; - - /* some stupid site sends path attribute with '"'. */ - len = strlen(new_path); - if(new_path[0] == '\"') { - memmove((void *)new_path, (const void *)(new_path + 1), len); - len--; - } - if(len && (new_path[len - 1] == '\"')) { - new_path[len - 1] = 0x0; - len--; - } - - /* RFC6265 5.2.4 The Path Attribute */ - if(new_path[0] != '/') { - /* Let cookie-path be the default-path. */ - free(new_path); - new_path = strdup("/"); - return new_path; - } - - /* convert /hoge/ to /hoge */ - if(len && new_path[len - 1] == '/') { - new_path[len - 1] = 0x0; - } - - return new_path; -} - -/* - * Load cookies from all given cookie files (CURLOPT_COOKIEFILE). - * - * NOTE: OOM or cookie parsing failures are ignored. - */ -void Curl_cookie_loadfiles(struct Curl_easy *data) -{ - struct curl_slist *list = data->change.cookielist; - if(list) { - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - while(list) { - struct CookieInfo *newcookies = Curl_cookie_init(data, - list->data, - data->cookies, - data->set.cookiesession); - if(!newcookies) - /* Failure may be due to OOM or a bad cookie; both are ignored - * but only the first should be - */ - infof(data, "ignoring failed cookie_init for %s\n", list->data); - else - data->cookies = newcookies; - list = list->next; - } - curl_slist_free_all(data->change.cookielist); /* clean up list */ - data->change.cookielist = NULL; /* don't do this again! */ - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } -} - -/* - * strstore() makes a strdup() on the 'newstr' and if '*str' is non-NULL - * that will be freed before the allocated string is stored there. - * - * It is meant to easily replace strdup() - */ -static void strstore(char **str, const char *newstr) -{ - free(*str); - *str = strdup(newstr); -} - -/* - * remove_expired() removes expired cookies. - */ -static void remove_expired(struct CookieInfo *cookies) -{ - struct Cookie *co, *nx, *pv; - curl_off_t now = (curl_off_t)time(NULL); - - co = cookies->cookies; - pv = NULL; - while(co) { - nx = co->next; - if(co->expires && co->expires < now) { - if(co == cookies->cookies) { - cookies->cookies = co->next; - } - else { - pv->next = co->next; - } - cookies->numcookies--; - freecookie(co); - } - else { - pv = co; - } - co = nx; - } -} - -/* - * Return true if the given string is an IP(v4|v6) address. - */ -static bool isip(const char *domain) -{ - struct in_addr addr; -#ifdef ENABLE_IPV6 - struct in6_addr addr6; -#endif - - if(Curl_inet_pton(AF_INET, domain, &addr) -#ifdef ENABLE_IPV6 - || Curl_inet_pton(AF_INET6, domain, &addr6) -#endif - ) { - /* domain name given as IP address */ - return TRUE; - } - - return FALSE; -} - -/**************************************************************************** - * - * Curl_cookie_add() - * - * Add a single cookie line to the cookie keeping object. - * - * Be aware that sometimes we get an IP-only host name, and that might also be - * a numerical IPv6 address. - * - * Returns NULL on out of memory or invalid cookie. This is suboptimal, - * as they should be treated separately. - ***************************************************************************/ - -struct Cookie * -Curl_cookie_add(struct Curl_easy *data, - /* The 'data' pointer here may be NULL at times, and thus - must only be used very carefully for things that can deal - with data being NULL. Such as infof() and similar */ - - struct CookieInfo *c, - bool httpheader, /* TRUE if HTTP header-style line */ - char *lineptr, /* first character of the line */ - const char *domain, /* default domain */ - const char *path) /* full path used when this cookie is set, - used to get default path for the cookie - unless set */ -{ - struct Cookie *clist; - char name[MAX_NAME]; - struct Cookie *co; - struct Cookie *lastc=NULL; - time_t now = time(NULL); - bool replace_old = FALSE; - bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */ - -#ifdef USE_LIBPSL - const psl_ctx_t *psl; -#endif - -#ifdef CURL_DISABLE_VERBOSE_STRINGS - (void)data; -#endif - - /* First, alloc and init a new struct for it */ - co = calloc(1, sizeof(struct Cookie)); - if(!co) - return NULL; /* bail out if we're this low on memory */ - - if(httpheader) { - /* This line was read off a HTTP-header */ - const char *ptr; - const char *semiptr; - char *what; - - what = malloc(MAX_COOKIE_LINE); - if(!what) { - free(co); - return NULL; - } - - semiptr=strchr(lineptr, ';'); /* first, find a semicolon */ - - while(*lineptr && ISBLANK(*lineptr)) - lineptr++; - - ptr = lineptr; - do { - /* we have a = pair or a stand-alone word here */ - name[0]=what[0]=0; /* init the buffers */ - if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n=] =%" - MAX_COOKIE_LINE_TXT "[^;\r\n]", - name, what)) { - /* Use strstore() below to properly deal with received cookie - headers that have the same string property set more than once, - and then we use the last one. */ - const char *whatptr; - bool done = FALSE; - bool sep; - size_t len=strlen(what); - size_t nlen = strlen(name); - const char *endofn = &ptr[ nlen ]; - - /* name ends with a '=' ? */ - sep = (*endofn == '=')?TRUE:FALSE; - - if(nlen) { - endofn--; /* move to the last character */ - if(ISBLANK(*endofn)) { - /* skip trailing spaces in name */ - while(*endofn && ISBLANK(*endofn) && nlen) { - endofn--; - nlen--; - } - name[nlen]=0; /* new end of name */ - } - } - - /* Strip off trailing whitespace from the 'what' */ - while(len && ISBLANK(what[len-1])) { - what[len-1]=0; - len--; - } - - /* Skip leading whitespace from the 'what' */ - whatptr=what; - while(*whatptr && ISBLANK(*whatptr)) - whatptr++; - - if(!co->name && sep) { - /* The very first name/value pair is the actual cookie name */ - co->name = strdup(name); - co->value = strdup(whatptr); - if(!co->name || !co->value) { - badcookie = TRUE; - break; - } - } - else if(!len) { - /* this was a "=" with no content, and we must allow - 'secure' and 'httponly' specified this weirdly */ - done = TRUE; - if(strcasecompare("secure", name)) - co->secure = TRUE; - else if(strcasecompare("httponly", name)) - co->httponly = TRUE; - else if(sep) - /* there was a '=' so we're not done parsing this field */ - done = FALSE; - } - if(done) - ; - else if(strcasecompare("path", name)) { - strstore(&co->path, whatptr); - if(!co->path) { - badcookie = TRUE; /* out of memory bad */ - break; - } - co->spath = sanitize_cookie_path(co->path); - if(!co->spath) { - badcookie = TRUE; /* out of memory bad */ - break; - } - } - else if(strcasecompare("domain", name)) { - bool is_ip; - - /* Now, we make sure that our host is within the given domain, - or the given domain is not valid and thus cannot be set. */ - - if('.' == whatptr[0]) - whatptr++; /* ignore preceding dot */ - -#ifndef USE_LIBPSL - /* - * Without PSL we don't know when the incoming cookie is set on a - * TLD or otherwise "protected" suffix. To reduce risk, we require a - * dot OR the exact host name being "localhost". - */ - { - const char *dotp; - /* check for more dots */ - dotp = strchr(whatptr, '.'); - if(!dotp && !strcasecompare("localhost", whatptr)) - domain=":"; - } -#endif - - is_ip = isip(domain ? domain : whatptr); - - if(!domain - || (is_ip && !strcmp(whatptr, domain)) - || (!is_ip && tailmatch(whatptr, domain))) { - strstore(&co->domain, whatptr); - if(!co->domain) { - badcookie = TRUE; - break; - } - if(!is_ip) - co->tailmatch=TRUE; /* we always do that if the domain name was - given */ - } - else { - /* we did not get a tailmatch and then the attempted set domain - is not a domain to which the current host belongs. Mark as - bad. */ - badcookie=TRUE; - infof(data, "skipped cookie with bad tailmatch domain: %s\n", - whatptr); - } - } - else if(strcasecompare("version", name)) { - strstore(&co->version, whatptr); - if(!co->version) { - badcookie = TRUE; - break; - } - } - else if(strcasecompare("max-age", name)) { - /* Defined in RFC2109: - - Optional. The Max-Age attribute defines the lifetime of the - cookie, in seconds. The delta-seconds value is a decimal non- - negative integer. After delta-seconds seconds elapse, the - client should discard the cookie. A value of zero means the - cookie should be discarded immediately. - - */ - strstore(&co->maxage, whatptr); - if(!co->maxage) { - badcookie = TRUE; - break; - } - } - else if(strcasecompare("expires", name)) { - strstore(&co->expirestr, whatptr); - if(!co->expirestr) { - badcookie = TRUE; - break; - } - } - /* - else this is the second (or more) name we don't know - about! */ - } - else { - /* this is an "illegal" = pair */ - } - - if(!semiptr || !*semiptr) { - /* we already know there are no more cookies */ - semiptr = NULL; - continue; - } - - ptr=semiptr+1; - while(*ptr && ISBLANK(*ptr)) - ptr++; - semiptr=strchr(ptr, ';'); /* now, find the next semicolon */ - - if(!semiptr && *ptr) - /* There are no more semicolons, but there's a final name=value pair - coming up */ - semiptr=strchr(ptr, '\0'); - } while(semiptr); - - if(co->maxage) { - co->expires = - curlx_strtoofft((*co->maxage=='\"')? - &co->maxage[1]:&co->maxage[0], NULL, 10); - if(CURL_OFF_T_MAX - now < co->expires) - /* avoid overflow */ - co->expires = CURL_OFF_T_MAX; - else - co->expires += now; - } - else if(co->expirestr) { - /* Note that if the date couldn't get parsed for whatever reason, - the cookie will be treated as a session cookie */ - co->expires = curl_getdate(co->expirestr, NULL); - - /* Session cookies have expires set to 0 so if we get that back - from the date parser let's add a second to make it a - non-session cookie */ - if(co->expires == 0) - co->expires = 1; - else if(co->expires < 0) - co->expires = 0; - } - - if(!badcookie && !co->domain) { - if(domain) { - /* no domain was given in the header line, set the default */ - co->domain=strdup(domain); - if(!co->domain) - badcookie = TRUE; - } - } - - if(!badcookie && !co->path && path) { - /* No path was given in the header line, set the default. - Note that the passed-in path to this function MAY have a '?' and - following part that MUST not be stored as part of the path. */ - char *queryp = strchr(path, '?'); - - /* queryp is where the interesting part of the path ends, so now we - want to the find the last */ - char *endslash; - if(!queryp) - endslash = strrchr(path, '/'); - else - endslash = memrchr(path, '/', (size_t)(queryp - path)); - if(endslash) { - size_t pathlen = (size_t)(endslash-path+1); /* include ending slash */ - co->path=malloc(pathlen+1); /* one extra for the zero byte */ - if(co->path) { - memcpy(co->path, path, pathlen); - co->path[pathlen]=0; /* zero terminate */ - co->spath = sanitize_cookie_path(co->path); - if(!co->spath) - badcookie = TRUE; /* out of memory bad */ - } - else - badcookie = TRUE; - } - } - - free(what); - - if(badcookie || !co->name) { - /* we didn't get a cookie name or a bad one, - this is an illegal line, bail out */ - freecookie(co); - return NULL; - } - - } - else { - /* This line is NOT a HTTP header style line, we do offer support for - reading the odd netscape cookies-file format here */ - char *ptr; - char *firstptr; - char *tok_buf=NULL; - int fields; - - /* IE introduced HTTP-only cookies to prevent XSS attacks. Cookies - marked with httpOnly after the domain name are not accessible - from javascripts, but since curl does not operate at javascript - level, we include them anyway. In Firefox's cookie files, these - lines are preceded with #HttpOnly_ and then everything is - as usual, so we skip 10 characters of the line.. - */ - if(strncmp(lineptr, "#HttpOnly_", 10) == 0) { - lineptr += 10; - co->httponly = TRUE; - } - - if(lineptr[0]=='#') { - /* don't even try the comments */ - free(co); - return NULL; - } - /* strip off the possible end-of-line characters */ - ptr=strchr(lineptr, '\r'); - if(ptr) - *ptr=0; /* clear it */ - ptr=strchr(lineptr, '\n'); - if(ptr) - *ptr=0; /* clear it */ - - firstptr=strtok_r(lineptr, "\t", &tok_buf); /* tokenize it on the TAB */ - - /* Now loop through the fields and init the struct we already have - allocated */ - for(ptr=firstptr, fields=0; ptr && !badcookie; - ptr=strtok_r(NULL, "\t", &tok_buf), fields++) { - switch(fields) { - case 0: - if(ptr[0]=='.') /* skip preceding dots */ - ptr++; - co->domain = strdup(ptr); - if(!co->domain) - badcookie = TRUE; - break; - case 1: - /* This field got its explanation on the 23rd of May 2001 by - Andrés García: - - flag: A TRUE/FALSE value indicating if all machines within a given - domain can access the variable. This value is set automatically by - the browser, depending on the value you set for the domain. - - As far as I can see, it is set to true when the cookie says - .domain.com and to false when the domain is complete www.domain.com - */ - co->tailmatch = strcasecompare(ptr, "TRUE")?TRUE:FALSE; - break; - case 2: - /* It turns out, that sometimes the file format allows the path - field to remain not filled in, we try to detect this and work - around it! Andrés García made us aware of this... */ - if(strcmp("TRUE", ptr) && strcmp("FALSE", ptr)) { - /* only if the path doesn't look like a boolean option! */ - co->path = strdup(ptr); - if(!co->path) - badcookie = TRUE; - else { - co->spath = sanitize_cookie_path(co->path); - if(!co->spath) { - badcookie = TRUE; /* out of memory bad */ - } - } - break; - } - /* this doesn't look like a path, make one up! */ - co->path = strdup("/"); - if(!co->path) - badcookie = TRUE; - co->spath = strdup("/"); - if(!co->spath) - badcookie = TRUE; - fields++; /* add a field and fall down to secure */ - /* FALLTHROUGH */ - case 3: - co->secure = strcasecompare(ptr, "TRUE")?TRUE:FALSE; - break; - case 4: - co->expires = curlx_strtoofft(ptr, NULL, 10); - break; - case 5: - co->name = strdup(ptr); - if(!co->name) - badcookie = TRUE; - break; - case 6: - co->value = strdup(ptr); - if(!co->value) - badcookie = TRUE; - break; - } - } - if(6 == fields) { - /* we got a cookie with blank contents, fix it */ - co->value = strdup(""); - if(!co->value) - badcookie = TRUE; - else - fields++; - } - - if(!badcookie && (7 != fields)) - /* we did not find the sufficient number of fields */ - badcookie = TRUE; - - if(badcookie) { - freecookie(co); - return NULL; - } - - } - - if(!c->running && /* read from a file */ - c->newsession && /* clean session cookies */ - !co->expires) { /* this is a session cookie since it doesn't expire! */ - freecookie(co); - return NULL; - } - - co->livecookie = c->running; - - /* now, we have parsed the incoming line, we must now check if this - superceeds an already existing cookie, which it may if the previous have - the same domain and path as this */ - - /* at first, remove expired cookies */ - remove_expired(c); - -#ifdef USE_LIBPSL - /* Check if the domain is a Public Suffix and if yes, ignore the cookie. - This needs a libpsl compiled with builtin data. */ - if(domain && co->domain && !isip(co->domain)) { - psl = psl_builtin(); - if(psl && !psl_is_cookie_domain_acceptable(psl, domain, co->domain)) { - infof(data, - "cookie '%s' dropped, domain '%s' must not set cookies for '%s'\n", - co->name, domain, co->domain); - freecookie(co); - return NULL; - } - } -#endif - - clist = c->cookies; - replace_old = FALSE; - while(clist) { - if(strcasecompare(clist->name, co->name)) { - /* the names are identical */ - - if(clist->domain && co->domain) { - if(strcasecompare(clist->domain, co->domain) && - (clist->tailmatch == co->tailmatch)) - /* The domains are identical */ - replace_old=TRUE; - } - else if(!clist->domain && !co->domain) - replace_old = TRUE; - - if(replace_old) { - /* the domains were identical */ - - if(clist->spath && co->spath) { - if(strcasecompare(clist->spath, co->spath)) { - replace_old = TRUE; - } - else - replace_old = FALSE; - } - else if(!clist->spath && !co->spath) - replace_old = TRUE; - else - replace_old = FALSE; - - } - - if(replace_old && !co->livecookie && clist->livecookie) { - /* Both cookies matched fine, except that the already present - cookie is "live", which means it was set from a header, while - the new one isn't "live" and thus only read from a file. We let - live cookies stay alive */ - - /* Free the newcomer and get out of here! */ - freecookie(co); - return NULL; - } - - if(replace_old) { - co->next = clist->next; /* get the next-pointer first */ - - /* then free all the old pointers */ - free(clist->name); - free(clist->value); - free(clist->domain); - free(clist->path); - free(clist->spath); - free(clist->expirestr); - free(clist->version); - free(clist->maxage); - - *clist = *co; /* then store all the new data */ - - free(co); /* free the newly alloced memory */ - co = clist; /* point to the previous struct instead */ - - /* We have replaced a cookie, now skip the rest of the list but - make sure the 'lastc' pointer is properly set */ - do { - lastc = clist; - clist = clist->next; - } while(clist); - break; - } - } - lastc = clist; - clist = clist->next; - } - - if(c->running) - /* Only show this when NOT reading the cookies from a file */ - infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, " - "expire %" CURL_FORMAT_CURL_OFF_T "\n", - replace_old?"Replaced":"Added", co->name, co->value, - co->domain, co->path, co->expires); - - if(!replace_old) { - /* then make the last item point on this new one */ - if(lastc) - lastc->next = co; - else - c->cookies = co; - c->numcookies++; /* one more cookie in the jar */ - } - - return co; -} - -/* - * get_line() makes sure to only return complete whole lines that fit in 'len' - * bytes and end with a newline. - */ -static char *get_line(char *buf, int len, FILE *input) -{ - bool partial = FALSE; - while(1) { - char *b = fgets(buf, len, input); - if(b) { - size_t rlen = strlen(b); - if(rlen && (b[rlen-1] == '\n')) { - if(partial) { - partial = FALSE; - continue; - } - return b; - } - else - /* read a partial, discard the next piece that ends with newline */ - partial = TRUE; - } - else - break; - } - return NULL; -} - - -/***************************************************************************** - * - * Curl_cookie_init() - * - * Inits a cookie struct to read data from a local file. This is always - * called before any cookies are set. File may be NULL. - * - * If 'newsession' is TRUE, discard all "session cookies" on read from file. - * - * Returns NULL on out of memory. Invalid cookies are ignored. - ****************************************************************************/ -struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, - const char *file, - struct CookieInfo *inc, - bool newsession) -{ - struct CookieInfo *c; - FILE *fp = NULL; - bool fromfile=TRUE; - char *line = NULL; - - if(NULL == inc) { - /* we didn't get a struct, create one */ - c = calloc(1, sizeof(struct CookieInfo)); - if(!c) - return NULL; /* failed to get memory */ - c->filename = strdup(file?file:"none"); /* copy the name just in case */ - if(!c->filename) - goto fail; /* failed to get memory */ - } - else { - /* we got an already existing one, use that */ - c = inc; - } - c->running = FALSE; /* this is not running, this is init */ - - if(file && !strcmp(file, "-")) { - fp = stdin; - fromfile=FALSE; - } - else if(file && !*file) { - /* points to a "" string */ - fp = NULL; - } - else - fp = file?fopen(file, FOPEN_READTEXT):NULL; - - c->newsession = newsession; /* new session? */ - - if(fp) { - char *lineptr; - bool headerline; - - line = malloc(MAX_COOKIE_LINE); - if(!line) - goto fail; - while(get_line(line, MAX_COOKIE_LINE, fp)) { - if(checkprefix("Set-Cookie:", line)) { - /* This is a cookie line, get it! */ - lineptr=&line[11]; - headerline=TRUE; - } - else { - lineptr=line; - headerline=FALSE; - } - while(*lineptr && ISBLANK(*lineptr)) - lineptr++; - - Curl_cookie_add(data, c, headerline, lineptr, NULL, NULL); - } - free(line); /* free the line buffer */ - - if(fromfile) - fclose(fp); - } - - c->running = TRUE; /* now, we're running */ - - return c; - -fail: - free(line); - if(!inc) - /* Only clean up if we allocated it here, as the original could still be in - * use by a share handle */ - Curl_cookie_cleanup(c); - if(fromfile && fp) - fclose(fp); - return NULL; /* out of memory */ -} - -/* sort this so that the longest path gets before the shorter path */ -static int cookie_sort(const void *p1, const void *p2) -{ - struct Cookie *c1 = *(struct Cookie **)p1; - struct Cookie *c2 = *(struct Cookie **)p2; - size_t l1, l2; - - /* 1 - compare cookie path lengths */ - l1 = c1->path ? strlen(c1->path) : 0; - l2 = c2->path ? strlen(c2->path) : 0; - - if(l1 != l2) - return (l2 > l1) ? 1 : -1 ; /* avoid size_t <=> int conversions */ - - /* 2 - compare cookie domain lengths */ - l1 = c1->domain ? strlen(c1->domain) : 0; - l2 = c2->domain ? strlen(c2->domain) : 0; - - if(l1 != l2) - return (l2 > l1) ? 1 : -1 ; /* avoid size_t <=> int conversions */ - - /* 3 - compare cookie names */ - if(c1->name && c2->name) - return strcmp(c1->name, c2->name); - - /* sorry, can't be more deterministic */ - return 0; -} - -#define CLONE(field) \ - do { \ - if(src->field) { \ - d->field = strdup(src->field); \ - if(!d->field) \ - goto fail; \ - } \ - } while(0) - -static struct Cookie *dup_cookie(struct Cookie *src) -{ - struct Cookie *d = calloc(sizeof(struct Cookie), 1); - if(d) { - CLONE(expirestr); - CLONE(domain); - CLONE(path); - CLONE(spath); - CLONE(name); - CLONE(value); - CLONE(maxage); - CLONE(version); - d->expires = src->expires; - d->tailmatch = src->tailmatch; - d->secure = src->secure; - d->livecookie = src->livecookie; - d->httponly = src->httponly; - } - return d; - - fail: - freecookie(d); - return NULL; -} - -/***************************************************************************** - * - * Curl_cookie_getlist() - * - * For a given host and path, return a linked list of cookies that the - * client should send to the server if used now. The secure boolean informs - * the cookie if a secure connection is achieved or not. - * - * It shall only return cookies that haven't expired. - * - ****************************************************************************/ - -struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, - const char *host, const char *path, - bool secure) -{ - struct Cookie *newco; - struct Cookie *co; - time_t now = time(NULL); - struct Cookie *mainco=NULL; - size_t matches = 0; - bool is_ip; - - if(!c || !c->cookies) - return NULL; /* no cookie struct or no cookies in the struct */ - - /* at first, remove expired cookies */ - remove_expired(c); - - /* check if host is an IP(v4|v6) address */ - is_ip = isip(host); - - co = c->cookies; - - while(co) { - /* only process this cookie if it is not expired or had no expire - date AND that if the cookie requires we're secure we must only - continue if we are! */ - if((!co->expires || (co->expires > now)) && - (co->secure?secure:TRUE)) { - - /* now check if the domain is correct */ - if(!co->domain || - (co->tailmatch && !is_ip && tailmatch(co->domain, host)) || - ((!co->tailmatch || is_ip) && strcasecompare(host, co->domain)) ) { - /* the right part of the host matches the domain stuff in the - cookie data */ - - /* now check the left part of the path with the cookies path - requirement */ - if(!co->spath || pathmatch(co->spath, path) ) { - - /* and now, we know this is a match and we should create an - entry for the return-linked-list */ - - newco = dup_cookie(co); - if(newco) { - /* then modify our next */ - newco->next = mainco; - - /* point the main to us */ - mainco = newco; - - matches++; - } - else { - fail: - /* failure, clear up the allocated chain and return NULL */ - Curl_cookie_freelist(mainco); - return NULL; - } - } - } - } - co = co->next; - } - - if(matches) { - /* Now we need to make sure that if there is a name appearing more than - once, the longest specified path version comes first. To make this - the swiftest way, we just sort them all based on path length. */ - struct Cookie **array; - size_t i; - - /* alloc an array and store all cookie pointers */ - array = malloc(sizeof(struct Cookie *) * matches); - if(!array) - goto fail; - - co = mainco; - - for(i=0; co; co = co->next) - array[i++] = co; - - /* now sort the cookie pointers in path length order */ - qsort(array, matches, sizeof(struct Cookie *), cookie_sort); - - /* remake the linked list order according to the new order */ - - mainco = array[0]; /* start here */ - for(i=0; inext = array[i+1]; - array[matches-1]->next = NULL; /* terminate the list */ - - free(array); /* remove the temporary data again */ - } - - return mainco; /* return the new list */ -} - -/***************************************************************************** - * - * Curl_cookie_clearall() - * - * Clear all existing cookies and reset the counter. - * - ****************************************************************************/ -void Curl_cookie_clearall(struct CookieInfo *cookies) -{ - if(cookies) { - Curl_cookie_freelist(cookies->cookies); - cookies->cookies = NULL; - cookies->numcookies = 0; - } -} - -/***************************************************************************** - * - * Curl_cookie_freelist() - * - * Free a list of cookies previously returned by Curl_cookie_getlist(); - * - ****************************************************************************/ - -void Curl_cookie_freelist(struct Cookie *co) -{ - struct Cookie *next; - while(co) { - next = co->next; - freecookie(co); - co = next; - } -} - - -/***************************************************************************** - * - * Curl_cookie_clearsess() - * - * Free all session cookies in the cookies list. - * - ****************************************************************************/ -void Curl_cookie_clearsess(struct CookieInfo *cookies) -{ - struct Cookie *first, *curr, *next, *prev = NULL; - - if(!cookies || !cookies->cookies) - return; - - first = curr = prev = cookies->cookies; - - for(; curr; curr = next) { - next = curr->next; - if(!curr->expires) { - if(first == curr) - first = next; - - if(prev == curr) - prev = next; - else - prev->next = next; - - freecookie(curr); - cookies->numcookies--; - } - else - prev = curr; - } - - cookies->cookies = first; -} - - -/***************************************************************************** - * - * Curl_cookie_cleanup() - * - * Free a "cookie object" previous created with Curl_cookie_init(). - * - ****************************************************************************/ -void Curl_cookie_cleanup(struct CookieInfo *c) -{ - if(c) { - free(c->filename); - Curl_cookie_freelist(c->cookies); - free(c); /* free the base struct as well */ - } -} - -/* get_netscape_format() - * - * Formats a string for Netscape output file, w/o a newline at the end. - * - * Function returns a char * to a formatted line. Has to be free()d -*/ -static char *get_netscape_format(const struct Cookie *co) -{ - return aprintf( - "%s" /* httponly preamble */ - "%s%s\t" /* domain */ - "%s\t" /* tailmatch */ - "%s\t" /* path */ - "%s\t" /* secure */ - "%" CURL_FORMAT_CURL_OFF_T "\t" /* expires */ - "%s\t" /* name */ - "%s", /* value */ - co->httponly?"#HttpOnly_":"", - /* Make sure all domains are prefixed with a dot if they allow - tailmatching. This is Mozilla-style. */ - (co->tailmatch && co->domain && co->domain[0] != '.')? ".":"", - co->domain?co->domain:"unknown", - co->tailmatch?"TRUE":"FALSE", - co->path?co->path:"/", - co->secure?"TRUE":"FALSE", - co->expires, - co->name, - co->value?co->value:""); -} - -/* - * cookie_output() - * - * Writes all internally known cookies to the specified file. Specify - * "-" as file name to write to stdout. - * - * The function returns non-zero on write failure. - */ -static int cookie_output(struct CookieInfo *c, const char *dumphere) -{ - struct Cookie *co; - FILE *out; - bool use_stdout=FALSE; - char *format_ptr; - - if((NULL == c) || (0 == c->numcookies)) - /* If there are no known cookies, we don't write or even create any - destination file */ - return 0; - - /* at first, remove expired cookies */ - remove_expired(c); - - if(!strcmp("-", dumphere)) { - /* use stdout */ - out = stdout; - use_stdout=TRUE; - } - else { - out = fopen(dumphere, FOPEN_WRITETEXT); - if(!out) - return 1; /* failure */ - } - - fputs("# Netscape HTTP Cookie File\n" - "# https://curl.haxx.se/docs/http-cookies.html\n" - "# This file was generated by libcurl! Edit at your own risk.\n\n", - out); - - for(co = c->cookies; co; co = co->next) { - if(!co->domain) - continue; - format_ptr = get_netscape_format(co); - if(format_ptr == NULL) { - fprintf(out, "#\n# Fatal libcurl error\n"); - if(!use_stdout) - fclose(out); - return 1; - } - fprintf(out, "%s\n", format_ptr); - free(format_ptr); - } - - if(!use_stdout) - fclose(out); - - return 0; -} - -struct curl_slist *Curl_cookie_list(struct Curl_easy *data) -{ - struct curl_slist *list = NULL; - struct curl_slist *beg; - struct Cookie *c; - char *line; - - if((data->cookies == NULL) || - (data->cookies->numcookies == 0)) - return NULL; - - for(c = data->cookies->cookies; c; c = c->next) { - if(!c->domain) - continue; - line = get_netscape_format(c); - if(!line) { - curl_slist_free_all(list); - return NULL; - } - beg = Curl_slist_append_nodup(list, line); - if(!beg) { - free(line); - curl_slist_free_all(list); - return NULL; - } - list = beg; - } - - return list; -} - -void Curl_flush_cookies(struct Curl_easy *data, int cleanup) -{ - if(data->set.str[STRING_COOKIEJAR]) { - if(data->change.cookielist) { - /* If there is a list of cookie files to read, do it first so that - we have all the told files read before we write the new jar. - Curl_cookie_loadfiles() LOCKS and UNLOCKS the share itself! */ - Curl_cookie_loadfiles(data); - } - - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - - /* if we have a destination file for all the cookies to get dumped to */ - if(cookie_output(data->cookies, data->set.str[STRING_COOKIEJAR])) - infof(data, "WARNING: failed to save cookies in %s\n", - data->set.str[STRING_COOKIEJAR]); - } - else { - if(cleanup && data->change.cookielist) { - /* since nothing is written, we can just free the list of cookie file - names */ - curl_slist_free_all(data->change.cookielist); /* clean up list */ - data->change.cookielist = NULL; - } - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - } - - if(cleanup && (!data->share || (data->cookies != data->share->cookies))) { - Curl_cookie_cleanup(data->cookies); - } - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); -} - -#endif /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */ diff --git a/build/premake/premake5/contrib/curl/lib/cookie.h b/build/premake/premake5/contrib/curl/lib/cookie.h deleted file mode 100644 index a9a45785c6..0000000000 --- a/build/premake/premake5/contrib/curl/lib/cookie.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef HEADER_CURL_COOKIE_H -#define HEADER_CURL_COOKIE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#include - -struct Cookie { - struct Cookie *next; /* next in the chain */ - char *name; /* = value */ - char *value; /* name = */ - char *path; /* path = which is in Set-Cookie: */ - char *spath; /* sanitized cookie path */ - char *domain; /* domain = */ - curl_off_t expires; /* expires = */ - char *expirestr; /* the plain text version */ - bool tailmatch; /* weather we do tail-matchning of the domain name */ - - /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */ - char *version; /* Version = */ - char *maxage; /* Max-Age = */ - - bool secure; /* whether the 'secure' keyword was used */ - bool livecookie; /* updated from a server, not a stored file */ - bool httponly; /* true if the httponly directive is present */ -}; - -struct CookieInfo { - /* linked list of cookies we know of */ - struct Cookie *cookies; - - char *filename; /* file we read from/write to */ - bool running; /* state info, for cookie adding information */ - long numcookies; /* number of cookies in the "jar" */ - bool newsession; /* new session, discard session cookies on load */ -}; - -/* This is the maximum line length we accept for a cookie line. RFC 2109 - section 6.3 says: - - "at least 4096 bytes per cookie (as measured by the size of the characters - that comprise the cookie non-terminal in the syntax description of the - Set-Cookie header)" - -*/ -#define MAX_COOKIE_LINE 5000 -#define MAX_COOKIE_LINE_TXT "4999" - -/* This is the maximum length of a cookie name we deal with: */ -#define MAX_NAME 1024 -#define MAX_NAME_TXT "1023" - -struct Curl_easy; -/* - * Add a cookie to the internal list of cookies. The domain and path arguments - * are only used if the header boolean is TRUE. - */ - -struct Cookie *Curl_cookie_add(struct Curl_easy *data, - struct CookieInfo *, bool header, char *lineptr, - const char *domain, const char *path); - -struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *, - const char *, bool); -void Curl_cookie_freelist(struct Cookie *cookies); -void Curl_cookie_clearall(struct CookieInfo *cookies); -void Curl_cookie_clearsess(struct CookieInfo *cookies); - -#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_COOKIES) -#define Curl_cookie_list(x) NULL -#define Curl_cookie_loadfiles(x) Curl_nop_stmt -#define Curl_cookie_init(x,y,z,w) NULL -#define Curl_cookie_cleanup(x) Curl_nop_stmt -#define Curl_flush_cookies(x,y) Curl_nop_stmt -#else -void Curl_flush_cookies(struct Curl_easy *data, int cleanup); -void Curl_cookie_cleanup(struct CookieInfo *); -struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, - const char *, struct CookieInfo *, bool); -struct curl_slist *Curl_cookie_list(struct Curl_easy *data); -void Curl_cookie_loadfiles(struct Curl_easy *data); -#endif - -#endif /* HEADER_CURL_COOKIE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_addrinfo.c b/build/premake/premake5/contrib/curl/lib/curl_addrinfo.c deleted file mode 100644 index 3dbfb3ebf4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_addrinfo.c +++ /dev/null @@ -1,616 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif -#ifdef HAVE_SYS_UN_H -# include -#endif - -#ifdef __VMS -# include -# include -#endif - -#if defined(NETWARE) && defined(__NOVELL_LIBC__) -# undef in_addr_t -# define in_addr_t unsigned long -#endif - -#include - -#include "curl_addrinfo.h" -#include "inet_pton.h" -#include "warnless.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_freeaddrinfo() - * - * This is used to free a linked list of Curl_addrinfo structs along - * with all its associated allocated storage. This function should be - * called once for each successful call to Curl_getaddrinfo_ex() or to - * any function call which actually allocates a Curl_addrinfo struct. - */ - -#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \ - defined(__OPTIMIZE__) && defined(__unix__) && defined(__i386__) - /* workaround icc 9.1 optimizer issue */ -# define vqualifier volatile -#else -# define vqualifier -#endif - -void -Curl_freeaddrinfo(Curl_addrinfo *cahead) -{ - Curl_addrinfo *vqualifier canext; - Curl_addrinfo *ca; - - for(ca = cahead; ca != NULL; ca = canext) { - free(ca->ai_addr); - free(ca->ai_canonname); - canext = ca->ai_next; - - free(ca); - } -} - - -#ifdef HAVE_GETADDRINFO -/* - * Curl_getaddrinfo_ex() - * - * This is a wrapper function around system's getaddrinfo(), with - * the only difference that instead of returning a linked list of - * addrinfo structs this one returns a linked list of Curl_addrinfo - * ones. The memory allocated by this function *MUST* be free'd with - * Curl_freeaddrinfo(). For each successful call to this function - * there must be an associated call later to Curl_freeaddrinfo(). - * - * There should be no single call to system's getaddrinfo() in the - * whole library, any such call should be 'routed' through this one. - */ - -int -Curl_getaddrinfo_ex(const char *nodename, - const char *servname, - const struct addrinfo *hints, - Curl_addrinfo **result) -{ - const struct addrinfo *ai; - struct addrinfo *aihead; - Curl_addrinfo *cafirst = NULL; - Curl_addrinfo *calast = NULL; - Curl_addrinfo *ca; - size_t ss_size; - int error; - - *result = NULL; /* assume failure */ - - error = getaddrinfo(nodename, servname, hints, &aihead); - if(error) - return error; - - /* traverse the addrinfo list */ - - for(ai = aihead; ai != NULL; ai = ai->ai_next) { - - /* ignore elements with unsupported address family, */ - /* settle family-specific sockaddr structure size. */ - if(ai->ai_family == AF_INET) - ss_size = sizeof(struct sockaddr_in); -#ifdef ENABLE_IPV6 - else if(ai->ai_family == AF_INET6) - ss_size = sizeof(struct sockaddr_in6); -#endif - else - continue; - - /* ignore elements without required address info */ - if((ai->ai_addr == NULL) || !(ai->ai_addrlen > 0)) - continue; - - /* ignore elements with bogus address size */ - if((size_t)ai->ai_addrlen < ss_size) - continue; - - ca = malloc(sizeof(Curl_addrinfo)); - if(!ca) { - error = EAI_MEMORY; - break; - } - - /* copy each structure member individually, member ordering, */ - /* size, or padding might be different for each platform. */ - - ca->ai_flags = ai->ai_flags; - ca->ai_family = ai->ai_family; - ca->ai_socktype = ai->ai_socktype; - ca->ai_protocol = ai->ai_protocol; - ca->ai_addrlen = (curl_socklen_t)ss_size; - ca->ai_addr = NULL; - ca->ai_canonname = NULL; - ca->ai_next = NULL; - - ca->ai_addr = malloc(ss_size); - if(!ca->ai_addr) { - error = EAI_MEMORY; - free(ca); - break; - } - memcpy(ca->ai_addr, ai->ai_addr, ss_size); - - if(ai->ai_canonname != NULL) { - ca->ai_canonname = strdup(ai->ai_canonname); - if(!ca->ai_canonname) { - error = EAI_MEMORY; - free(ca->ai_addr); - free(ca); - break; - } - } - - /* if the return list is empty, this becomes the first element */ - if(!cafirst) - cafirst = ca; - - /* add this element last in the return list */ - if(calast) - calast->ai_next = ca; - calast = ca; - - } - - /* destroy the addrinfo list */ - if(aihead) - freeaddrinfo(aihead); - - /* if we failed, also destroy the Curl_addrinfo list */ - if(error) { - Curl_freeaddrinfo(cafirst); - cafirst = NULL; - } - else if(!cafirst) { -#ifdef EAI_NONAME - /* rfc3493 conformant */ - error = EAI_NONAME; -#else - /* rfc3493 obsoleted */ - error = EAI_NODATA; -#endif -#ifdef USE_WINSOCK - SET_SOCKERRNO(error); -#endif - } - - *result = cafirst; - - /* This is not a CURLcode */ - return error; -} -#endif /* HAVE_GETADDRINFO */ - - -/* - * Curl_he2ai() - * - * This function returns a pointer to the first element of a newly allocated - * Curl_addrinfo struct linked list filled with the data of a given hostent. - * Curl_addrinfo is meant to work like the addrinfo struct does for a IPv6 - * stack, but usable also for IPv4, all hosts and environments. - * - * The memory allocated by this function *MUST* be free'd later on calling - * Curl_freeaddrinfo(). For each successful call to this function there - * must be an associated call later to Curl_freeaddrinfo(). - * - * Curl_addrinfo defined in "lib/curl_addrinfo.h" - * - * struct Curl_addrinfo { - * int ai_flags; - * int ai_family; - * int ai_socktype; - * int ai_protocol; - * curl_socklen_t ai_addrlen; * Follow rfc3493 struct addrinfo * - * char *ai_canonname; - * struct sockaddr *ai_addr; - * struct Curl_addrinfo *ai_next; - * }; - * typedef struct Curl_addrinfo Curl_addrinfo; - * - * hostent defined in - * - * struct hostent { - * char *h_name; - * char **h_aliases; - * int h_addrtype; - * int h_length; - * char **h_addr_list; - * }; - * - * for backward compatibility: - * - * #define h_addr h_addr_list[0] - */ - -Curl_addrinfo * -Curl_he2ai(const struct hostent *he, int port) -{ - Curl_addrinfo *ai; - Curl_addrinfo *prevai = NULL; - Curl_addrinfo *firstai = NULL; - struct sockaddr_in *addr; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 *addr6; -#endif - CURLcode result = CURLE_OK; - int i; - char *curr; - - if(!he) - /* no input == no output! */ - return NULL; - - DEBUGASSERT((he->h_name != NULL) && (he->h_addr_list != NULL)); - - for(i=0; (curr = he->h_addr_list[i]) != NULL; i++) { - - size_t ss_size; -#ifdef ENABLE_IPV6 - if(he->h_addrtype == AF_INET6) - ss_size = sizeof(struct sockaddr_in6); - else -#endif - ss_size = sizeof(struct sockaddr_in); - - ai = calloc(1, sizeof(Curl_addrinfo)); - if(!ai) { - result = CURLE_OUT_OF_MEMORY; - break; - } - ai->ai_canonname = strdup(he->h_name); - if(!ai->ai_canonname) { - result = CURLE_OUT_OF_MEMORY; - free(ai); - break; - } - ai->ai_addr = calloc(1, ss_size); - if(!ai->ai_addr) { - result = CURLE_OUT_OF_MEMORY; - free(ai->ai_canonname); - free(ai); - break; - } - - if(!firstai) - /* store the pointer we want to return from this function */ - firstai = ai; - - if(prevai) - /* make the previous entry point to this */ - prevai->ai_next = ai; - - ai->ai_family = he->h_addrtype; - - /* we return all names as STREAM, so when using this address for TFTP - the type must be ignored and conn->socktype be used instead! */ - ai->ai_socktype = SOCK_STREAM; - - ai->ai_addrlen = (curl_socklen_t)ss_size; - - /* leave the rest of the struct filled with zero */ - - switch(ai->ai_family) { - case AF_INET: - addr = (void *)ai->ai_addr; /* storage area for this info */ - - memcpy(&addr->sin_addr, curr, sizeof(struct in_addr)); - addr->sin_family = (unsigned short)(he->h_addrtype); - addr->sin_port = htons((unsigned short)port); - break; - -#ifdef ENABLE_IPV6 - case AF_INET6: - addr6 = (void *)ai->ai_addr; /* storage area for this info */ - - memcpy(&addr6->sin6_addr, curr, sizeof(struct in6_addr)); - addr6->sin6_family = (unsigned short)(he->h_addrtype); - addr6->sin6_port = htons((unsigned short)port); - break; -#endif - } - - prevai = ai; - } - - if(result) { - Curl_freeaddrinfo(firstai); - firstai = NULL; - } - - return firstai; -} - - -struct namebuff { - struct hostent hostentry; - union { - struct in_addr ina4; -#ifdef ENABLE_IPV6 - struct in6_addr ina6; -#endif - } addrentry; - char *h_addr_list[2]; -}; - - -/* - * Curl_ip2addr() - * - * This function takes an internet address, in binary form, as input parameter - * along with its address family and the string version of the address, and it - * returns a Curl_addrinfo chain filled in correctly with information for the - * given address/host - */ - -Curl_addrinfo * -Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port) -{ - Curl_addrinfo *ai; - -#if defined(__VMS) && \ - defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64) -#pragma pointer_size save -#pragma pointer_size short -#pragma message disable PTRMISMATCH -#endif - - struct hostent *h; - struct namebuff *buf; - char *addrentry; - char *hoststr; - size_t addrsize; - - DEBUGASSERT(inaddr && hostname); - - buf = malloc(sizeof(struct namebuff)); - if(!buf) - return NULL; - - hoststr = strdup(hostname); - if(!hoststr) { - free(buf); - return NULL; - } - - switch(af) { - case AF_INET: - addrsize = sizeof(struct in_addr); - addrentry = (void *)&buf->addrentry.ina4; - memcpy(addrentry, inaddr, sizeof(struct in_addr)); - break; -#ifdef ENABLE_IPV6 - case AF_INET6: - addrsize = sizeof(struct in6_addr); - addrentry = (void *)&buf->addrentry.ina6; - memcpy(addrentry, inaddr, sizeof(struct in6_addr)); - break; -#endif - default: - free(hoststr); - free(buf); - return NULL; - } - - h = &buf->hostentry; - h->h_name = hoststr; - h->h_aliases = NULL; - h->h_addrtype = (short)af; - h->h_length = (short)addrsize; - h->h_addr_list = &buf->h_addr_list[0]; - h->h_addr_list[0] = addrentry; - h->h_addr_list[1] = NULL; /* terminate list of entries */ - -#if defined(__VMS) && \ - defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64) -#pragma pointer_size restore -#pragma message enable PTRMISMATCH -#endif - - ai = Curl_he2ai(h, port); - - free(hoststr); - free(buf); - - return ai; -} - -/* - * Given an IPv4 or IPv6 dotted string address, this converts it to a proper - * allocated Curl_addrinfo struct and returns it. - */ -Curl_addrinfo *Curl_str2addr(char *address, int port) -{ - struct in_addr in; - if(Curl_inet_pton(AF_INET, address, &in) > 0) - /* This is a dotted IP address 123.123.123.123-style */ - return Curl_ip2addr(AF_INET, &in, address, port); -#ifdef ENABLE_IPV6 - else { - struct in6_addr in6; - if(Curl_inet_pton(AF_INET6, address, &in6) > 0) - /* This is a dotted IPv6 address ::1-style */ - return Curl_ip2addr(AF_INET6, &in6, address, port); - } -#endif - return NULL; /* bad input format */ -} - -#ifdef USE_UNIX_SOCKETS -/** - * Given a path to a Unix domain socket, return a newly allocated Curl_addrinfo - * struct initialized with this path. - * Set '*longpath' to TRUE if the error is a too long path. - */ -Curl_addrinfo *Curl_unix2addr(const char *path, bool *longpath, bool abstract) -{ - Curl_addrinfo *ai; - struct sockaddr_un *sa_un; - size_t path_len; - - *longpath = FALSE; - - ai = calloc(1, sizeof(Curl_addrinfo)); - if(!ai) - return NULL; - ai->ai_addr = calloc(1, sizeof(struct sockaddr_un)); - if(!ai->ai_addr) { - free(ai); - return NULL; - } - - sa_un = (void *) ai->ai_addr; - sa_un->sun_family = AF_UNIX; - - /* sun_path must be able to store the NUL-terminated path */ - path_len = strlen(path) + 1; - if(path_len > sizeof(sa_un->sun_path)) { - free(ai->ai_addr); - free(ai); - *longpath = TRUE; - return NULL; - } - - ai->ai_family = AF_UNIX; - ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */ - ai->ai_addrlen = (curl_socklen_t) - ((offsetof(struct sockaddr_un, sun_path) + path_len) & 0x7FFFFFFF); - - /* Abstract Unix domain socket have NULL prefix instead of suffix */ - if(abstract) - memcpy(sa_un->sun_path + 1, path, path_len - 1); - else - memcpy(sa_un->sun_path, path, path_len); /* copy NUL byte */ - - return ai; -} -#endif - -#if defined(CURLDEBUG) && defined(HAVE_FREEADDRINFO) -/* - * curl_dofreeaddrinfo() - * - * This is strictly for memory tracing and are using the same style as the - * family otherwise present in memdebug.c. I put these ones here since they - * require a bunch of structs I didn't want to include in memdebug.c - */ - -void -curl_dofreeaddrinfo(struct addrinfo *freethis, - int line, const char *source) -{ -#ifdef USE_LWIPSOCK - lwip_freeaddrinfo(freethis); -#else - (freeaddrinfo)(freethis); -#endif - curl_memlog("ADDR %s:%d freeaddrinfo(%p)\n", - source, line, (void *)freethis); -} -#endif /* defined(CURLDEBUG) && defined(HAVE_FREEADDRINFO) */ - - -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) -/* - * curl_dogetaddrinfo() - * - * This is strictly for memory tracing and are using the same style as the - * family otherwise present in memdebug.c. I put these ones here since they - * require a bunch of structs I didn't want to include in memdebug.c - */ - -int -curl_dogetaddrinfo(const char *hostname, - const char *service, - const struct addrinfo *hints, - struct addrinfo **result, - int line, const char *source) -{ -#ifdef USE_LWIPSOCK - int res=lwip_getaddrinfo(hostname, service, hints, result); -#else - int res=(getaddrinfo)(hostname, service, hints, result); -#endif - if(0 == res) - /* success */ - curl_memlog("ADDR %s:%d getaddrinfo() = %p\n", - source, line, (void *)*result); - else - curl_memlog("ADDR %s:%d getaddrinfo() failed\n", - source, line); - return res; -} -#endif /* defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) */ - -#if defined(HAVE_GETADDRINFO) && defined(USE_RESOLVE_ON_IPS) -/* - * Work-arounds the sin6_port is always zero bug on iOS 9.3.2 and Mac OS X - * 10.11.5. - */ -void Curl_addrinfo_set_port(Curl_addrinfo *addrinfo, int port) -{ - Curl_addrinfo *ca; - struct sockaddr_in *addr; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 *addr6; -#endif - for(ca = addrinfo; ca != NULL; ca = ca->ai_next) { - switch(ca->ai_family) { - case AF_INET: - addr = (void *)ca->ai_addr; /* storage area for this info */ - addr->sin_port = htons((unsigned short)port); - break; - -#ifdef ENABLE_IPV6 - case AF_INET6: - addr6 = (void *)ca->ai_addr; /* storage area for this info */ - addr6->sin6_port = htons((unsigned short)port); - break; -#endif - } - } -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/curl_addrinfo.h b/build/premake/premake5/contrib/curl/lib/curl_addrinfo.h deleted file mode 100644 index 8f6f3d1064..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_addrinfo.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef HEADER_CURL_ADDRINFO_H -#define HEADER_CURL_ADDRINFO_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif - -#ifdef __VMS -# include -# include -# include -#endif - - -/* - * Curl_addrinfo is our internal struct definition that we use to allow - * consistent internal handling of this data. We use this even when the - * system provides an addrinfo structure definition. And we use this for - * all sorts of IPv4 and IPV6 builds. - */ - -struct Curl_addrinfo { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - curl_socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */ - char *ai_canonname; - struct sockaddr *ai_addr; - struct Curl_addrinfo *ai_next; -}; -typedef struct Curl_addrinfo Curl_addrinfo; - -void -Curl_freeaddrinfo(Curl_addrinfo *cahead); - -#ifdef HAVE_GETADDRINFO -int -Curl_getaddrinfo_ex(const char *nodename, - const char *servname, - const struct addrinfo *hints, - Curl_addrinfo **result); -#endif - -Curl_addrinfo * -Curl_he2ai(const struct hostent *he, int port); - -Curl_addrinfo * -Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port); - -Curl_addrinfo *Curl_str2addr(char *dotted, int port); - -#ifdef USE_UNIX_SOCKETS -Curl_addrinfo *Curl_unix2addr(const char *path, bool *longpath, bool abstract); -#endif - -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) && \ - defined(HAVE_FREEADDRINFO) -void -curl_dofreeaddrinfo(struct addrinfo *freethis, - int line, const char *source); -#endif - -#if defined(CURLDEBUG) && defined(HAVE_GETADDRINFO) -int -curl_dogetaddrinfo(const char *hostname, - const char *service, - const struct addrinfo *hints, - struct addrinfo **result, - int line, const char *source); -#endif - -#ifdef HAVE_GETADDRINFO -#ifdef USE_RESOLVE_ON_IPS -void Curl_addrinfo_set_port(Curl_addrinfo *addrinfo, int port); -#else -#define Curl_addrinfo_set_port(x,y) -#endif -#endif - -#endif /* HEADER_CURL_ADDRINFO_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_base64.h b/build/premake/premake5/contrib/curl/lib/curl_base64.h deleted file mode 100644 index 7e9fc26062..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_base64.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef HEADER_CURL_BASE64_H -#define HEADER_CURL_BASE64_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -CURLcode Curl_base64_encode(struct Curl_easy *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen); -CURLcode Curl_base64url_encode(struct Curl_easy *data, - const char *inputbuff, size_t insize, - char **outptr, size_t *outlen); - -CURLcode Curl_base64_decode(const char *src, - unsigned char **outptr, size_t *outlen); - -#endif /* HEADER_CURL_BASE64_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_config.h.cmake b/build/premake/premake5/contrib/curl/lib/curl_config.h.cmake deleted file mode 100644 index 49c1b8a2d0..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_config.h.cmake +++ /dev/null @@ -1,1002 +0,0 @@ -/* lib/curl_config.h.in. Generated somehow by cmake. */ - -/* when building libcurl itself */ -#cmakedefine BUILDING_LIBCURL 1 - -/* Location of default ca bundle */ -#cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE} - -/* Location of default ca path */ -#cmakedefine CURL_CA_PATH ${CURL_CA_PATH} - -/* to disable cookies support */ -#cmakedefine CURL_DISABLE_COOKIES 1 - -/* to disable cryptographic authentication */ -#cmakedefine CURL_DISABLE_CRYPTO_AUTH 1 - -/* to disable DICT */ -#cmakedefine CURL_DISABLE_DICT 1 - -/* to disable FILE */ -#cmakedefine CURL_DISABLE_FILE 1 - -/* to disable FTP */ -#cmakedefine CURL_DISABLE_FTP 1 - -/* to disable GOPHER */ -#cmakedefine CURL_DISABLE_GOPHER 1 - -/* to disable IMAP */ -#cmakedefine CURL_DISABLE_IMAP 1 - -/* to disable HTTP */ -#cmakedefine CURL_DISABLE_HTTP 1 - -/* to disable LDAP */ -#cmakedefine CURL_DISABLE_LDAP 1 - -/* to disable LDAPS */ -#cmakedefine CURL_DISABLE_LDAPS 1 - -/* to disable POP3 */ -#cmakedefine CURL_DISABLE_POP3 1 - -/* to disable proxies */ -#cmakedefine CURL_DISABLE_PROXY 1 - -/* to disable RTSP */ -#cmakedefine CURL_DISABLE_RTSP 1 - -/* to disable RTMP */ -#cmakedefine CURL_DISABLE_RTMP 1 - -/* to disable SMB */ -#cmakedefine CURL_DISABLE_SMB 1 - -/* to disable SMTP */ -#cmakedefine CURL_DISABLE_SMTP 1 - -/* to disable TELNET */ -#cmakedefine CURL_DISABLE_TELNET 1 - -/* to disable TFTP */ -#cmakedefine CURL_DISABLE_TFTP 1 - -/* to disable verbose strings */ -#cmakedefine CURL_DISABLE_VERBOSE_STRINGS 1 - -/* to make a symbol visible */ -#cmakedefine CURL_EXTERN_SYMBOL ${CURL_EXTERN_SYMBOL} -/* Ensure using CURL_EXTERN_SYMBOL is possible */ -#ifndef CURL_EXTERN_SYMBOL -#define CURL_EXTERN_SYMBOL -#endif - -/* Use Windows LDAP implementation */ -#cmakedefine USE_WIN32_LDAP 1 - -/* when not building a shared library */ -#cmakedefine CURL_STATICLIB 1 - -/* Set to explicitly specify we don't want to use thread-safe functions */ -#cmakedefine DISABLED_THREADSAFE 1 - -/* your Entropy Gathering Daemon socket pathname */ -#cmakedefine EGD_SOCKET ${EGD_SOCKET} - -/* Define if you want to enable IPv6 support */ -#cmakedefine ENABLE_IPV6 1 - -/* Define to the type qualifier of arg 1 for getnameinfo. */ -#cmakedefine GETNAMEINFO_QUAL_ARG1 ${GETNAMEINFO_QUAL_ARG1} - -/* Define to the type of arg 1 for getnameinfo. */ -#cmakedefine GETNAMEINFO_TYPE_ARG1 ${GETNAMEINFO_TYPE_ARG1} - -/* Define to the type of arg 2 for getnameinfo. */ -#cmakedefine GETNAMEINFO_TYPE_ARG2 ${GETNAMEINFO_TYPE_ARG2} - -/* Define to the type of args 4 and 6 for getnameinfo. */ -#cmakedefine GETNAMEINFO_TYPE_ARG46 ${GETNAMEINFO_TYPE_ARG46} - -/* Define to the type of arg 7 for getnameinfo. */ -#cmakedefine GETNAMEINFO_TYPE_ARG7 ${GETNAMEINFO_TYPE_ARG7} - -/* Specifies the number of arguments to getservbyport_r */ -#cmakedefine GETSERVBYPORT_R_ARGS ${GETSERVBYPORT_R_ARGS} - -/* Specifies the size of the buffer to pass to getservbyport_r */ -#cmakedefine GETSERVBYPORT_R_BUFSIZE ${GETSERVBYPORT_R_BUFSIZE} - -/* Define to 1 if you have the alarm function. */ -#cmakedefine HAVE_ALARM 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ARPA_TFTP_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `basename' function. */ -#cmakedefine HAVE_BASENAME 1 - -/* Define to 1 if bool is an available type. */ -#cmakedefine HAVE_BOOL_T 1 - -/* Define to 1 if you have the clock_gettime function and monotonic timer. */ -#cmakedefine HAVE_CLOCK_GETTIME_MONOTONIC 1 - -/* Define to 1 if you have the `closesocket' function. */ -#cmakedefine HAVE_CLOSESOCKET 1 - -/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ -#cmakedefine HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CRYPTO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -#cmakedefine HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ERR_H 1 - -/* Define to 1 if you have the fcntl function. */ -#cmakedefine HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_FCNTL_H 1 - -/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ -#cmakedefine HAVE_FCNTL_O_NONBLOCK 1 - -/* Define to 1 if you have the fdopen function. */ -#cmakedefine HAVE_FDOPEN 1 - -/* Define to 1 if you have the `fork' function. */ -#cmakedefine HAVE_FORK 1 - -/* Define to 1 if you have the freeaddrinfo function. */ -#cmakedefine HAVE_FREEADDRINFO 1 - -/* Define to 1 if you have the freeifaddrs function. */ -#cmakedefine HAVE_FREEIFADDRS 1 - -/* Define to 1 if you have the ftruncate function. */ -#cmakedefine HAVE_FTRUNCATE 1 - -/* Define to 1 if you have a working getaddrinfo function. */ -#cmakedefine HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `geteuid' function. */ -#cmakedefine HAVE_GETEUID 1 - -/* Define to 1 if you have the gethostbyaddr function. */ -#cmakedefine HAVE_GETHOSTBYADDR 1 - -/* Define to 1 if you have the gethostbyaddr_r function. */ -#cmakedefine HAVE_GETHOSTBYADDR_R 1 - -/* gethostbyaddr_r() takes 5 args */ -#cmakedefine HAVE_GETHOSTBYADDR_R_5 1 - -/* gethostbyaddr_r() takes 7 args */ -#cmakedefine HAVE_GETHOSTBYADDR_R_7 1 - -/* gethostbyaddr_r() takes 8 args */ -#cmakedefine HAVE_GETHOSTBYADDR_R_8 1 - -/* Define to 1 if you have the gethostbyname function. */ -#cmakedefine HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the gethostbyname_r function. */ -#cmakedefine HAVE_GETHOSTBYNAME_R 1 - -/* gethostbyname_r() takes 3 args */ -#cmakedefine HAVE_GETHOSTBYNAME_R_3 1 - -/* gethostbyname_r() takes 5 args */ -#cmakedefine HAVE_GETHOSTBYNAME_R_5 1 - -/* gethostbyname_r() takes 6 args */ -#cmakedefine HAVE_GETHOSTBYNAME_R_6 1 - -/* Define to 1 if you have the gethostname function. */ -#cmakedefine HAVE_GETHOSTNAME 1 - -/* Define to 1 if you have a working getifaddrs function. */ -#cmakedefine HAVE_GETIFADDRS 1 - -/* Define to 1 if you have the getnameinfo function. */ -#cmakedefine HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `getpass_r' function. */ -#cmakedefine HAVE_GETPASS_R 1 - -/* Define to 1 if you have the `getppid' function. */ -#cmakedefine HAVE_GETPPID 1 - -/* Define to 1 if you have the `getprotobyname' function. */ -#cmakedefine HAVE_GETPROTOBYNAME 1 - -/* Define to 1 if you have the `getpwuid' function. */ -#cmakedefine HAVE_GETPWUID 1 - -/* Define to 1 if you have the `getrlimit' function. */ -#cmakedefine HAVE_GETRLIMIT 1 - -/* Define to 1 if you have the getservbyport_r function. */ -#cmakedefine HAVE_GETSERVBYPORT_R 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#cmakedefine HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have a working glibc-style strerror_r function. */ -#cmakedefine HAVE_GLIBC_STRERROR_R 1 - -/* Define to 1 if you have a working gmtime_r function. */ -#cmakedefine HAVE_GMTIME_R 1 - -/* if you have the gssapi libraries */ -#cmakedefine HAVE_GSSAPI 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GSSAPI_GSSAPI_GENERIC_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GSSAPI_GSSAPI_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GSSAPI_GSSAPI_KRB5_H 1 - -/* if you have the GNU gssapi libraries */ -#cmakedefine HAVE_GSSGNU 1 - -/* if you have the Heimdal gssapi libraries */ -#cmakedefine HAVE_GSSHEIMDAL 1 - -/* if you have the MIT gssapi libraries */ -#cmakedefine HAVE_GSSMIT 1 - -/* Define to 1 if you have the `idna_strerror' function. */ -#cmakedefine HAVE_IDNA_STRERROR 1 - -/* Define to 1 if you have the `idn_free' function. */ -#cmakedefine HAVE_IDN_FREE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IDN_FREE_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IFADDRS_H 1 - -/* Define to 1 if you have the `inet_addr' function. */ -#cmakedefine HAVE_INET_ADDR 1 - -/* Define to 1 if you have the inet_ntoa_r function. */ -#cmakedefine HAVE_INET_NTOA_R 1 - -/* inet_ntoa_r() takes 2 args */ -#cmakedefine HAVE_INET_NTOA_R_2 1 - -/* inet_ntoa_r() takes 3 args */ -#cmakedefine HAVE_INET_NTOA_R_3 1 - -/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ -#cmakedefine HAVE_INET_NTOP 1 - -/* Define to 1 if you have a IPv6 capable working inet_pton function. */ -#cmakedefine HAVE_INET_PTON 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the ioctl function. */ -#cmakedefine HAVE_IOCTL 1 - -/* Define to 1 if you have the ioctlsocket function. */ -#cmakedefine HAVE_IOCTLSOCKET 1 - -/* Define to 1 if you have the IoctlSocket camel case function. */ -#cmakedefine HAVE_IOCTLSOCKET_CAMEL 1 - -/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. - */ -#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1 - -/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ -#cmakedefine HAVE_IOCTLSOCKET_FIONBIO 1 - -/* Define to 1 if you have a working ioctl FIONBIO function. */ -#cmakedefine HAVE_IOCTL_FIONBIO 1 - -/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ -#cmakedefine HAVE_IOCTL_SIOCGIFADDR 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_IO_H 1 - -/* if you have the Kerberos4 libraries (including -ldes) */ -#cmakedefine HAVE_KRB4 1 - -/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */ -#cmakedefine HAVE_KRB_GET_OUR_IP_FOR_REALM 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_KRB_H 1 - -/* Define to 1 if you have the lber.h header file. */ -#cmakedefine HAVE_LBER_H 1 - -/* Define to 1 if you have the ldapssl.h header file. */ -#cmakedefine HAVE_LDAPSSL_H 1 - -/* Define to 1 if you have the ldap.h header file. */ -#cmakedefine HAVE_LDAP_H 1 - -/* Use LDAPS implementation */ -#cmakedefine HAVE_LDAP_SSL 1 - -/* Define to 1 if you have the ldap_ssl.h header file. */ -#cmakedefine HAVE_LDAP_SSL_H 1 - -/* Define to 1 if you have the `ldap_url_parse' function. */ -#cmakedefine HAVE_LDAP_URL_PARSE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIBGEN_H 1 - -/* Define to 1 if you have the `idn' library (-lidn). */ -#cmakedefine HAVE_LIBIDN 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#cmakedefine HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `resolve' library (-lresolve). */ -#cmakedefine HAVE_LIBRESOLVE 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#cmakedefine HAVE_LIBSOCKET 1 - -/* Define to 1 if you have the `ssh2' library (-lssh2). */ -#cmakedefine HAVE_LIBSSH2 1 - -/* Define to 1 if libssh2 provides `libssh2_version'. */ -#cmakedefine HAVE_LIBSSH2_VERSION 1 - -/* Define to 1 if libssh2 provides `libssh2_init'. */ -#cmakedefine HAVE_LIBSSH2_INIT 1 - -/* Define to 1 if libssh2 provides `libssh2_exit'. */ -#cmakedefine HAVE_LIBSSH2_EXIT 1 - -/* Define to 1 if libssh2 provides `libssh2_scp_send64'. */ -#cmakedefine HAVE_LIBSSH2_SCP_SEND64 1 - -/* Define to 1 if libssh2 provides `libssh2_session_handshake'. */ -#cmakedefine HAVE_LIBSSH2_SESSION_HANDSHAKE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIBSSH2_H 1 - -/* Define to 1 if you have the `ssl' library (-lssl). */ -#cmakedefine HAVE_LIBSSL 1 - -/* if zlib is available */ -#cmakedefine HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIMITS_H 1 - -/* if your compiler supports LL */ -#cmakedefine HAVE_LL 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LOCALE_H 1 - -/* Define to 1 if you have a working localtime_r function. */ -#cmakedefine HAVE_LOCALTIME_R 1 - -/* Define to 1 if the compiler supports the 'long long' data type. */ -#cmakedefine HAVE_LONGLONG 1 - -/* Define to 1 if you have the malloc.h header file. */ -#cmakedefine HAVE_MALLOC_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H 1 - -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#cmakedefine HAVE_MSG_NOSIGNAL 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_NET_IF_H 1 - -/* Define to 1 if NI_WITHSCOPEID exists and works. */ -#cmakedefine HAVE_NI_WITHSCOPEID 1 - -/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE */ -#cmakedefine HAVE_OLD_GSSMIT 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_CRYPTO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_ENGINE_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_ERR_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_PEM_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_PKCS12_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_RSA_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_SSL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_OPENSSL_X509_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_PEM_H 1 - -/* Define to 1 if you have the `perror' function. */ -#cmakedefine HAVE_PERROR 1 - -/* Define to 1 if you have the `pipe' function. */ -#cmakedefine HAVE_PIPE 1 - -/* Define to 1 if you have a working poll function. */ -#cmakedefine HAVE_POLL 1 - -/* If you have a fine poll */ -#cmakedefine HAVE_POLL_FINE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_POLL_H 1 - -/* Define to 1 if you have a working POSIX-style strerror_r function. */ -#cmakedefine HAVE_POSIX_STRERROR_R 1 - -/* Define to 1 if you have the header file */ -#cmakedefine HAVE_PTHREAD_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_PWD_H 1 - -/* Define to 1 if you have the `RAND_egd' function. */ -#cmakedefine HAVE_RAND_EGD 1 - -/* Define to 1 if you have the `RAND_screen' function. */ -#cmakedefine HAVE_RAND_SCREEN 1 - -/* Define to 1 if you have the `RAND_status' function. */ -#cmakedefine HAVE_RAND_STATUS 1 - -/* Define to 1 if you have the recv function. */ -#cmakedefine HAVE_RECV 1 - -/* Define to 1 if you have the recvfrom function. */ -#cmakedefine HAVE_RECVFROM 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_RSA_H 1 - -/* Define to 1 if you have the select function. */ -#cmakedefine HAVE_SELECT 1 - -/* Define to 1 if you have the send function. */ -#cmakedefine HAVE_SEND 1 - -/* Define to 1 if you have the 'fsetxattr' function. */ -#cmakedefine HAVE_FSETXATTR 1 - -/* fsetxattr() takes 5 args */ -#cmakedefine HAVE_FSETXATTR_5 1 - -/* fsetxattr() takes 6 args */ -#cmakedefine HAVE_FSETXATTR_6 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SETJMP_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#cmakedefine HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setmode' function. */ -#cmakedefine HAVE_SETMODE 1 - -/* Define to 1 if you have the `setrlimit' function. */ -#cmakedefine HAVE_SETRLIMIT 1 - -/* Define to 1 if you have the setsockopt function. */ -#cmakedefine HAVE_SETSOCKOPT 1 - -/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ -#cmakedefine HAVE_SETSOCKOPT_SO_NONBLOCK 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SGTTY_H 1 - -/* Define to 1 if you have the sigaction function. */ -#cmakedefine HAVE_SIGACTION 1 - -/* Define to 1 if you have the siginterrupt function. */ -#cmakedefine HAVE_SIGINTERRUPT 1 - -/* Define to 1 if you have the signal function. */ -#cmakedefine HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the sigsetjmp function or macro. */ -#cmakedefine HAVE_SIGSETJMP 1 - -/* Define to 1 if sig_atomic_t is an available typedef. */ -#cmakedefine HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if sig_atomic_t is already defined as volatile. */ -#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE 1 - -/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */ -#cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 - -/* Define to 1 if you have the `socket' function. */ -#cmakedefine HAVE_SOCKET 1 - -/* Define to 1 if you have the `SSL_get_shutdown' function. */ -#cmakedefine HAVE_SSL_GET_SHUTDOWN 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SSL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H 1 - -/* Define to 1 if you have the strcasecmp function. */ -#cmakedefine HAVE_STRCASECMP 1 - -/* Define to 1 if you have the strcasestr function. */ -#cmakedefine HAVE_STRCASESTR 1 - -/* Define to 1 if you have the strcmpi function. */ -#cmakedefine HAVE_STRCMPI 1 - -/* Define to 1 if you have the strdup function. */ -#cmakedefine HAVE_STRDUP 1 - -/* Define to 1 if you have the strerror_r function. */ -#cmakedefine HAVE_STRERROR_R 1 - -/* Define to 1 if you have the stricmp function. */ -#cmakedefine HAVE_STRICMP 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define to 1 if you have the strlcat function. */ -#cmakedefine HAVE_STRLCAT 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#cmakedefine HAVE_STRLCPY 1 - -/* Define to 1 if you have the strncasecmp function. */ -#cmakedefine HAVE_STRNCASECMP 1 - -/* Define to 1 if you have the strncmpi function. */ -#cmakedefine HAVE_STRNCMPI 1 - -/* Define to 1 if you have the strnicmp function. */ -#cmakedefine HAVE_STRNICMP 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STROPTS_H 1 - -/* Define to 1 if you have the strstr function. */ -#cmakedefine HAVE_STRSTR 1 - -/* Define to 1 if you have the strtok_r function. */ -#cmakedefine HAVE_STRTOK_R 1 - -/* Define to 1 if you have the strtoll function. */ -#cmakedefine HAVE_STRTOLL 1 - -/* if struct sockaddr_storage is defined */ -#cmakedefine HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if you have the timeval struct. */ -#cmakedefine HAVE_STRUCT_TIMEVAL 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_FILIO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_POLL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SOCKIO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UTIME_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TERMIOS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TERMIO_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_TLD_H 1 - -/* Define to 1 if you have the `tld_strerror' function. */ -#cmakedefine HAVE_TLD_STRERROR 1 - -/* Define to 1 if you have the `uname' function. */ -#cmakedefine HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `utime' function. */ -#cmakedefine HAVE_UTIME 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UTIME_H 1 - -/* Define to 1 if compiler supports C99 variadic macro style. */ -#cmakedefine HAVE_VARIADIC_MACROS_C99 1 - -/* Define to 1 if compiler supports old gcc variadic macro style. */ -#cmakedefine HAVE_VARIADIC_MACROS_GCC 1 - -/* Define to 1 if you have the winber.h header file. */ -#cmakedefine HAVE_WINBER_H 1 - -/* Define to 1 if you have the windows.h header file. */ -#cmakedefine HAVE_WINDOWS_H 1 - -/* Define to 1 if you have the winldap.h header file. */ -#cmakedefine HAVE_WINLDAP_H 1 - -/* Define to 1 if you have the winsock2.h header file. */ -#cmakedefine HAVE_WINSOCK2_H 1 - -/* Define to 1 if you have the winsock.h header file. */ -#cmakedefine HAVE_WINSOCK_H 1 - -/* Define this symbol if your OS supports changing the contents of argv */ -#cmakedefine HAVE_WRITABLE_ARGV 1 - -/* Define to 1 if you have the writev function. */ -#cmakedefine HAVE_WRITEV 1 - -/* Define to 1 if you have the ws2tcpip.h header file. */ -#cmakedefine HAVE_WS2TCPIP_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_X509_H 1 - -/* Define if you have the header file. */ -#cmakedefine HAVE_PROCESS_H 1 - -/* if you have the zlib.h header file */ -#cmakedefine HAVE_ZLIB_H 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#cmakedefine LT_OBJDIR ${LT_OBJDIR} - -/* If you lack a fine basename() prototype */ -#cmakedefine NEED_BASENAME_PROTO 1 - -/* Define to 1 if you need the lber.h header file even with ldap.h */ -#cmakedefine NEED_LBER_H 1 - -/* Define to 1 if you need the malloc.h header file even with stdlib.h */ -#cmakedefine NEED_MALLOC_H 1 - -/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ -#cmakedefine NEED_REENTRANT 1 - -/* cpu-machine-OS */ -#cmakedefine OS ${OS} - -/* Name of package */ -#cmakedefine PACKAGE ${PACKAGE} - -/* Define to the address where bug reports for this package should be sent. */ -#cmakedefine PACKAGE_BUGREPORT ${PACKAGE_BUGREPORT} - -/* Define to the full name of this package. */ -#cmakedefine PACKAGE_NAME ${PACKAGE_NAME} - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING ${PACKAGE_STRING} - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME ${PACKAGE_TARNAME} - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION} - -/* a suitable file to read random data from */ -#cmakedefine RANDOM_FILE "${RANDOM_FILE}" - -/* Define to the type of arg 1 for recvfrom. */ -#cmakedefine RECVFROM_TYPE_ARG1 ${RECVFROM_TYPE_ARG1} - -/* Define to the type pointed by arg 2 for recvfrom. */ -#cmakedefine RECVFROM_TYPE_ARG2 ${RECVFROM_TYPE_ARG2} - -/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ -#cmakedefine RECVFROM_TYPE_ARG2_IS_VOID 1 - -/* Define to the type of arg 3 for recvfrom. */ -#cmakedefine RECVFROM_TYPE_ARG3 ${RECVFROM_TYPE_ARG3} - -/* Define to the type of arg 4 for recvfrom. */ -#cmakedefine RECVFROM_TYPE_ARG4 ${RECVFROM_TYPE_ARG4} - -/* Define to the type pointed by arg 5 for recvfrom. */ -#cmakedefine RECVFROM_TYPE_ARG5 ${RECVFROM_TYPE_ARG5} - -/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ -#cmakedefine RECVFROM_TYPE_ARG5_IS_VOID 1 - -/* Define to the type pointed by arg 6 for recvfrom. */ -#cmakedefine RECVFROM_TYPE_ARG6 ${RECVFROM_TYPE_ARG6} - -/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ -#cmakedefine RECVFROM_TYPE_ARG6_IS_VOID 1 - -/* Define to the function return type for recvfrom. */ -#cmakedefine RECVFROM_TYPE_RETV ${RECVFROM_TYPE_RETV} - -/* Define to the type of arg 1 for recv. */ -#cmakedefine RECV_TYPE_ARG1 ${RECV_TYPE_ARG1} - -/* Define to the type of arg 2 for recv. */ -#cmakedefine RECV_TYPE_ARG2 ${RECV_TYPE_ARG2} - -/* Define to the type of arg 3 for recv. */ -#cmakedefine RECV_TYPE_ARG3 ${RECV_TYPE_ARG3} - -/* Define to the type of arg 4 for recv. */ -#cmakedefine RECV_TYPE_ARG4 ${RECV_TYPE_ARG4} - -/* Define to the function return type for recv. */ -#cmakedefine RECV_TYPE_RETV ${RECV_TYPE_RETV} - -/* Define as the return type of signal handlers (`int' or `void'). */ -#cmakedefine RETSIGTYPE ${RETSIGTYPE} - -/* Define to the type qualifier of arg 5 for select. */ -#cmakedefine SELECT_QUAL_ARG5 ${SELECT_QUAL_ARG5} - -/* Define to the type of arg 1 for select. */ -#cmakedefine SELECT_TYPE_ARG1 ${SELECT_TYPE_ARG1} - -/* Define to the type of args 2, 3 and 4 for select. */ -#cmakedefine SELECT_TYPE_ARG234 ${SELECT_TYPE_ARG234} - -/* Define to the type of arg 5 for select. */ -#cmakedefine SELECT_TYPE_ARG5 ${SELECT_TYPE_ARG5} - -/* Define to the function return type for select. */ -#cmakedefine SELECT_TYPE_RETV ${SELECT_TYPE_RETV} - -/* Define to the type qualifier of arg 2 for send. */ -#cmakedefine SEND_QUAL_ARG2 ${SEND_QUAL_ARG2} - -/* Define to the type of arg 1 for send. */ -#cmakedefine SEND_TYPE_ARG1 ${SEND_TYPE_ARG1} - -/* Define to the type of arg 2 for send. */ -#cmakedefine SEND_TYPE_ARG2 ${SEND_TYPE_ARG2} - -/* Define to the type of arg 3 for send. */ -#cmakedefine SEND_TYPE_ARG3 ${SEND_TYPE_ARG3} - -/* Define to the type of arg 4 for send. */ -#cmakedefine SEND_TYPE_ARG4 ${SEND_TYPE_ARG4} - -/* Define to the function return type for send. */ -#cmakedefine SEND_TYPE_RETV ${SEND_TYPE_RETV} - -/* The size of `int', as computed by sizeof. */ -#cmakedefine SIZEOF_INT ${SIZEOF_INT} - -/* The size of `short', as computed by sizeof. */ -#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT} - -/* The size of `long', as computed by sizeof. */ -#cmakedefine SIZEOF_LONG ${SIZEOF_LONG} - -/* The size of `off_t', as computed by sizeof. */ -#cmakedefine SIZEOF_OFF_T ${SIZEOF_OFF_T} - -/* The size of `size_t', as computed by sizeof. */ -#cmakedefine SIZEOF_SIZE_T ${SIZEOF_SIZE_T} - -/* The size of `time_t', as computed by sizeof. */ -#cmakedefine SIZEOF_TIME_T ${SIZEOF_TIME_T} - -/* The size of `void*', as computed by sizeof. */ -#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP} - -/* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS 1 - -/* Define to the type of arg 3 for strerror_r. */ -#cmakedefine STRERROR_R_TYPE_ARG3 ${STRERROR_R_TYPE_ARG3} - -/* Define to 1 if you can safely include both and . */ -#cmakedefine TIME_WITH_SYS_TIME 1 - -/* Define if you want to enable c-ares support */ -#cmakedefine USE_ARES 1 - -/* Define if you want to enable POSIX threaded DNS lookup */ -#cmakedefine USE_THREADS_POSIX 1 - -/* Define if you want to enable WIN32 threaded DNS lookup */ -#cmakedefine USE_THREADS_WIN32 1 - -/* Define to disable non-blocking sockets. */ -#cmakedefine USE_BLOCKING_SOCKETS 1 - -/* if GnuTLS is enabled */ -#cmakedefine USE_GNUTLS 1 - -/* if PolarSSL is enabled */ -#cmakedefine USE_POLARSSL 1 - -/* if mbedTLS is enabled */ -#cmakedefine USE_MBEDTLS 1 - -/* if libSSH2 is in use */ -#cmakedefine USE_LIBSSH2 1 - -/* If you want to build curl with the built-in manual */ -#cmakedefine USE_MANUAL 1 - -/* if NSS is enabled */ -#cmakedefine USE_NSS 1 - -/* if you want to use OpenLDAP code instead of legacy ldap implementation */ -#cmakedefine USE_OPENLDAP 1 - -/* if OpenSSL is in use */ -#cmakedefine USE_OPENSSL 1 - -/* to enable NGHTTP2 */ -#cmakedefine USE_NGHTTP2 1 - -/* if Unix domain sockets are enabled */ -#cmakedefine USE_UNIX_SOCKETS - -/* Define to 1 if you are building a Windows target with large file support. */ -#cmakedefine USE_WIN32_LARGE_FILES 1 - -/* to enable SSPI support */ -#cmakedefine USE_WINDOWS_SSPI 1 - -/* to enable Windows SSL */ -#cmakedefine USE_SCHANNEL 1 - -/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */ -#cmakedefine USE_YASSLEMUL 1 - -/* Version number of package */ -#cmakedefine VERSION ${VERSION} - -/* Define to avoid automatic inclusion of winsock.h */ -#cmakedefine WIN32_LEAN_AND_MEAN 1 - -/* Define to 1 if OS is AIX. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#cmakedefine _FILE_OFFSET_BITS ${_FILE_OFFSET_BITS} - -/* Define for large files, on AIX-style hosts. */ -#cmakedefine _LARGE_FILES ${_LARGE_FILES} - -/* define this if you need it to compile thread-safe code */ -#cmakedefine _THREAD_SAFE ${_THREAD_SAFE} - -/* Define to empty if `const' does not conform to ANSI C. */ -#cmakedefine const ${const} - -/* Type to use in place of in_addr_t when system does not provide it. */ -#cmakedefine in_addr_t ${in_addr_t} - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `unsigned int' if does not define. */ -#cmakedefine size_t ${size_t} - -/* the signed version of size_t */ -#cmakedefine ssize_t ${ssize_t} diff --git a/build/premake/premake5/contrib/curl/lib/curl_des.c b/build/premake/premake5/contrib/curl/lib/curl_des.c deleted file mode 100644 index b123a00f01..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_des.c +++ /dev/null @@ -1,63 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2015, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_NTLM) && !defined(USE_OPENSSL) - -#include "curl_des.h" - -/* - * Curl_des_set_odd_parity() - * - * This is used to apply odd parity to the given byte array. It is typically - * used by when a cryptography engines doesn't have it's own version. - * - * The function is a port of the Java based oddParity() function over at: - * - * https://davenport.sourceforge.io/ntlm.html - * - * Parameters: - * - * bytes [in/out] - The data whose parity bits are to be adjusted for - * odd parity. - * len [out] - The length of the data. - */ -void Curl_des_set_odd_parity(unsigned char *bytes, size_t len) -{ - size_t i; - - for(i = 0; i < len; i++) { - unsigned char b = bytes[i]; - - bool needs_parity = (((b >> 7) ^ (b >> 6) ^ (b >> 5) ^ - (b >> 4) ^ (b >> 3) ^ (b >> 2) ^ - (b >> 1)) & 0x01) == 0; - - if(needs_parity) - bytes[i] |= 0x01; - else - bytes[i] &= 0xfe; - } -} - -#endif /* USE_NTLM && !USE_OPENSSL */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_des.h b/build/premake/premake5/contrib/curl/lib/curl_des.h deleted file mode 100644 index 129060ff7d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_des.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef HEADER_CURL_DES_H -#define HEADER_CURL_DES_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2015, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_NTLM) && !defined(USE_OPENSSL) - -/* Applies odd parity to the given byte array */ -void Curl_des_set_odd_parity(unsigned char *bytes, size_t length); - -#endif /* USE_NTLM && !USE_OPENSSL */ - -#endif /* HEADER_CURL_DES_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_endian.c b/build/premake/premake5/contrib/curl/lib/curl_endian.c deleted file mode 100644 index c2d21de5ee..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_endian.c +++ /dev/null @@ -1,236 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "curl_endian.h" - -/* - * Curl_read16_le() - * - * This function converts a 16-bit integer from the little endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 2 byte buffer. - * - * Returns the integer. - */ -unsigned short Curl_read16_le(const unsigned char *buf) -{ - return (unsigned short)(((unsigned short)buf[0]) | - ((unsigned short)buf[1] << 8)); -} - -/* - * Curl_read32_le() - * - * This function converts a 32-bit integer from the little endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 4 byte buffer. - * - * Returns the integer. - */ -unsigned int Curl_read32_le(const unsigned char *buf) -{ - return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) | - ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); -} - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_read64_le() - * - * This function converts a 64-bit integer from the little endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 8 byte buffer. - * - * Returns the integer. - */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_le(const unsigned char *buf) -{ - return ((unsigned long long)buf[0]) | - ((unsigned long long)buf[1] << 8) | - ((unsigned long long)buf[2] << 16) | - ((unsigned long long)buf[3] << 24) | - ((unsigned long long)buf[4] << 32) | - ((unsigned long long)buf[5] << 40) | - ((unsigned long long)buf[6] << 48) | - ((unsigned long long)buf[7] << 56); -} -#else -unsigned __int64 Curl_read64_le(const unsigned char *buf) -{ - return ((unsigned __int64)buf[0]) | ((unsigned __int64)buf[1] << 8) | - ((unsigned __int64)buf[2] << 16) | ((unsigned __int64)buf[3] << 24) | - ((unsigned __int64)buf[4] << 32) | ((unsigned __int64)buf[5] << 40) | - ((unsigned __int64)buf[6] << 48) | ((unsigned __int64)buf[7] << 56); -} -#endif - -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ - -/* - * Curl_read16_be() - * - * This function converts a 16-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 2 byte buffer. - * - * Returns the integer. - */ -unsigned short Curl_read16_be(const unsigned char *buf) -{ - return (unsigned short)(((unsigned short)buf[0] << 8) | - ((unsigned short)buf[1])); -} - -/* - * Curl_read32_be() - * - * This function converts a 32-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 4 byte buffer. - * - * Returns the integer. - */ -unsigned int Curl_read32_be(const unsigned char *buf) -{ - return ((unsigned int)buf[0] << 24) | ((unsigned int)buf[1] << 16) | - ((unsigned int)buf[2] << 8) | ((unsigned int)buf[3]); -} - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_read64_be() - * - * This function converts a 64-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 8 byte buffer. - * - * Returns the integer. - */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_be(const unsigned char *buf) -{ - return ((unsigned long long)buf[0] << 56) | - ((unsigned long long)buf[1] << 48) | - ((unsigned long long)buf[2] << 40) | - ((unsigned long long)buf[3] << 32) | - ((unsigned long long)buf[4] << 24) | - ((unsigned long long)buf[5] << 16) | - ((unsigned long long)buf[6] << 8) | - ((unsigned long long)buf[7]); -} -#else -unsigned __int64 Curl_read64_be(const unsigned char *buf) -{ - return ((unsigned __int64)buf[0] << 56) | ((unsigned __int64)buf[1] << 48) | - ((unsigned __int64)buf[2] << 40) | ((unsigned __int64)buf[3] << 32) | - ((unsigned __int64)buf[4] << 24) | ((unsigned __int64)buf[5] << 16) | - ((unsigned __int64)buf[6] << 8) | ((unsigned __int64)buf[7]); -} -#endif - -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ - -/* - * Curl_write16_le() - * - * This function converts a 16-bit integer from the native endian format, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 16-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -void Curl_write16_le(const short value, unsigned char *buffer) -{ - buffer[0] = (char)(value & 0x00FF); - buffer[1] = (char)((value & 0xFF00) >> 8); -} - -/* - * Curl_write32_le() - * - * This function converts a 32-bit integer from the native endian format, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 32-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -void Curl_write32_le(const int value, unsigned char *buffer) -{ - buffer[0] = (char)(value & 0x000000FF); - buffer[1] = (char)((value & 0x0000FF00) >> 8); - buffer[2] = (char)((value & 0x00FF0000) >> 16); - buffer[3] = (char)((value & 0xFF000000) >> 24); -} - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_write64_le() - * - * This function converts a 64-bit integer from the native endian format, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 64-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -#if defined(HAVE_LONGLONG) -void Curl_write64_le(const long long value, unsigned char *buffer) -#else -void Curl_write64_le(const __int64 value, unsigned char *buffer) -#endif -{ - Curl_write32_le((int)value, buffer); - Curl_write32_le((int)(value >> 32), buffer + 4); -} -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_endian.h b/build/premake/premake5/contrib/curl/lib/curl_endian.h deleted file mode 100644 index 8a2b07ad85..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_endian.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef HEADER_CURL_ENDIAN_H -#define HEADER_CURL_ENDIAN_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* Converts a 16-bit integer from little endian */ -unsigned short Curl_read16_le(const unsigned char *buf); - -/* Converts a 32-bit integer from little endian */ -unsigned int Curl_read32_le(const unsigned char *buf); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer from little endian */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_le(const unsigned char *buf); -#else -unsigned __int64 Curl_read64_le(const unsigned char *buf); -#endif -#endif - -/* Converts a 16-bit integer from big endian */ -unsigned short Curl_read16_be(const unsigned char *buf); - -/* Converts a 32-bit integer from big endian */ -unsigned int Curl_read32_be(const unsigned char *buf); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer from big endian */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_be(const unsigned char *buf); -#else -unsigned __int64 Curl_read64_be(const unsigned char *buf); -#endif -#endif - -/* Converts a 16-bit integer to little endian */ -void Curl_write16_le(const short value, unsigned char *buffer); - -/* Converts a 32-bit integer to little endian */ -void Curl_write32_le(const int value, unsigned char *buffer); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer to little endian */ -#if defined(HAVE_LONGLONG) -void Curl_write64_le(const long long value, unsigned char *buffer); -#else -void Curl_write64_le(const __int64 value, unsigned char *buffer); -#endif -#endif - -#endif /* HEADER_CURL_ENDIAN_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_fnmatch.c b/build/premake/premake5/contrib/curl/lib/curl_fnmatch.c deleted file mode 100644 index e8108bb10e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_fnmatch.c +++ /dev/null @@ -1,426 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "curl_fnmatch.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -#define CURLFNM_CHARSET_LEN (sizeof(char) * 256) -#define CURLFNM_CHSET_SIZE (CURLFNM_CHARSET_LEN + 15) - -#define CURLFNM_NEGATE CURLFNM_CHARSET_LEN - -#define CURLFNM_ALNUM (CURLFNM_CHARSET_LEN + 1) -#define CURLFNM_DIGIT (CURLFNM_CHARSET_LEN + 2) -#define CURLFNM_XDIGIT (CURLFNM_CHARSET_LEN + 3) -#define CURLFNM_ALPHA (CURLFNM_CHARSET_LEN + 4) -#define CURLFNM_PRINT (CURLFNM_CHARSET_LEN + 5) -#define CURLFNM_BLANK (CURLFNM_CHARSET_LEN + 6) -#define CURLFNM_LOWER (CURLFNM_CHARSET_LEN + 7) -#define CURLFNM_GRAPH (CURLFNM_CHARSET_LEN + 8) -#define CURLFNM_SPACE (CURLFNM_CHARSET_LEN + 9) -#define CURLFNM_UPPER (CURLFNM_CHARSET_LEN + 10) - -typedef enum { - CURLFNM_LOOP_DEFAULT = 0, - CURLFNM_LOOP_BACKSLASH -} loop_state; - -typedef enum { - CURLFNM_SCHS_DEFAULT = 0, - CURLFNM_SCHS_MAYRANGE, - CURLFNM_SCHS_MAYRANGE2, - CURLFNM_SCHS_RIGHTBR, - CURLFNM_SCHS_RIGHTBRLEFTBR -} setcharset_state; - -typedef enum { - CURLFNM_PKW_INIT = 0, - CURLFNM_PKW_DDOT -} parsekey_state; - -#define SETCHARSET_OK 1 -#define SETCHARSET_FAIL 0 - -static int parsekeyword(unsigned char **pattern, unsigned char *charset) -{ - parsekey_state state = CURLFNM_PKW_INIT; -#define KEYLEN 10 - char keyword[KEYLEN] = { 0 }; - int found = FALSE; - int i; - unsigned char *p = *pattern; - for(i = 0; !found; i++) { - char c = *p++; - if(i >= KEYLEN) - return SETCHARSET_FAIL; - switch(state) { - case CURLFNM_PKW_INIT: - if(ISALPHA(c) && ISLOWER(c)) - keyword[i] = c; - else if(c == ':') - state = CURLFNM_PKW_DDOT; - else - return 0; - break; - case CURLFNM_PKW_DDOT: - if(c == ']') - found = TRUE; - else - return SETCHARSET_FAIL; - } - } -#undef KEYLEN - - *pattern = p; /* move caller's pattern pointer */ - if(strcmp(keyword, "digit") == 0) - charset[CURLFNM_DIGIT] = 1; - else if(strcmp(keyword, "alnum") == 0) - charset[CURLFNM_ALNUM] = 1; - else if(strcmp(keyword, "alpha") == 0) - charset[CURLFNM_ALPHA] = 1; - else if(strcmp(keyword, "xdigit") == 0) - charset[CURLFNM_XDIGIT] = 1; - else if(strcmp(keyword, "print") == 0) - charset[CURLFNM_PRINT] = 1; - else if(strcmp(keyword, "graph") == 0) - charset[CURLFNM_GRAPH] = 1; - else if(strcmp(keyword, "space") == 0) - charset[CURLFNM_SPACE] = 1; - else if(strcmp(keyword, "blank") == 0) - charset[CURLFNM_BLANK] = 1; - else if(strcmp(keyword, "upper") == 0) - charset[CURLFNM_UPPER] = 1; - else if(strcmp(keyword, "lower") == 0) - charset[CURLFNM_LOWER] = 1; - else - return SETCHARSET_FAIL; - return SETCHARSET_OK; -} - -/* returns 1 (true) if pattern is OK, 0 if is bad ("p" is pattern pointer) */ -static int setcharset(unsigned char **p, unsigned char *charset) -{ - setcharset_state state = CURLFNM_SCHS_DEFAULT; - unsigned char rangestart = 0; - unsigned char lastchar = 0; - bool something_found = FALSE; - unsigned char c; - for(;;) { - c = **p; - switch(state) { - case CURLFNM_SCHS_DEFAULT: - if(ISALNUM(c)) { /* ASCII value */ - rangestart = c; - charset[c] = 1; - (*p)++; - state = CURLFNM_SCHS_MAYRANGE; - something_found = TRUE; - } - else if(c == ']') { - if(something_found) - return SETCHARSET_OK; - else - something_found = TRUE; - state = CURLFNM_SCHS_RIGHTBR; - charset[c] = 1; - (*p)++; - } - else if(c == '[') { - char c2 = *((*p)+1); - if(c2 == ':') { /* there has to be a keyword */ - (*p) += 2; - if(parsekeyword(p, charset)) { - state = CURLFNM_SCHS_DEFAULT; - } - else - return SETCHARSET_FAIL; - } - else { - charset[c] = 1; - (*p)++; - } - something_found = TRUE; - } - else if(c == '?' || c == '*') { - something_found = TRUE; - charset[c] = 1; - (*p)++; - } - else if(c == '^' || c == '!') { - if(!something_found) { - if(charset[CURLFNM_NEGATE]) { - charset[c] = 1; - something_found = TRUE; - } - else - charset[CURLFNM_NEGATE] = 1; /* negate charset */ - } - else - charset[c] = 1; - (*p)++; - } - else if(c == '\\') { - c = *(++(*p)); - if(ISPRINT((c))) { - something_found = TRUE; - state = CURLFNM_SCHS_MAYRANGE; - charset[c] = 1; - rangestart = c; - (*p)++; - } - else - return SETCHARSET_FAIL; - } - else if(c == '\0') { - return SETCHARSET_FAIL; - } - else { - charset[c] = 1; - (*p)++; - something_found = TRUE; - } - break; - case CURLFNM_SCHS_MAYRANGE: - if(c == '-') { - charset[c] = 1; - (*p)++; - lastchar = '-'; - state = CURLFNM_SCHS_MAYRANGE2; - } - else if(c == '[') { - state = CURLFNM_SCHS_DEFAULT; - } - else if(ISALNUM(c)) { - charset[c] = 1; - (*p)++; - } - else if(c == '\\') { - c = *(++(*p)); - if(ISPRINT(c)) { - charset[c] = 1; - (*p)++; - } - else - return SETCHARSET_FAIL; - } - else if(c == ']') { - return SETCHARSET_OK; - } - else - return SETCHARSET_FAIL; - break; - case CURLFNM_SCHS_MAYRANGE2: - if(c == '\\') { - c = *(++(*p)); - if(!ISPRINT(c)) - return SETCHARSET_FAIL; - } - if(c == ']') { - return SETCHARSET_OK; - } - else if(c == '\\') { - c = *(++(*p)); - if(ISPRINT(c)) { - charset[c] = 1; - state = CURLFNM_SCHS_DEFAULT; - (*p)++; - } - else - return SETCHARSET_FAIL; - } - if(c >= rangestart) { - if((ISLOWER(c) && ISLOWER(rangestart)) || - (ISDIGIT(c) && ISDIGIT(rangestart)) || - (ISUPPER(c) && ISUPPER(rangestart))) { - charset[lastchar] = 0; - rangestart++; - while(rangestart++ <= c) - charset[rangestart-1] = 1; - (*p)++; - state = CURLFNM_SCHS_DEFAULT; - } - else - return SETCHARSET_FAIL; - } - break; - case CURLFNM_SCHS_RIGHTBR: - if(c == '[') { - state = CURLFNM_SCHS_RIGHTBRLEFTBR; - charset[c] = 1; - (*p)++; - } - else if(c == ']') { - return SETCHARSET_OK; - } - else if(c == '\0') { - return SETCHARSET_FAIL; - } - else if(ISPRINT(c)) { - charset[c] = 1; - (*p)++; - state = CURLFNM_SCHS_DEFAULT; - } - else - /* used 'goto fail' instead of 'return SETCHARSET_FAIL' to avoid a - * nonsense warning 'statement not reached' at end of the fnc when - * compiling on Solaris */ - goto fail; - break; - case CURLFNM_SCHS_RIGHTBRLEFTBR: - if(c == ']') { - return SETCHARSET_OK; - } - else { - state = CURLFNM_SCHS_DEFAULT; - charset[c] = 1; - (*p)++; - } - break; - } - } -fail: - return SETCHARSET_FAIL; -} - -static int loop(const unsigned char *pattern, const unsigned char *string) -{ - loop_state state = CURLFNM_LOOP_DEFAULT; - unsigned char *p = (unsigned char *)pattern; - unsigned char *s = (unsigned char *)string; - unsigned char charset[CURLFNM_CHSET_SIZE] = { 0 }; - int rc = 0; - - for(;;) { - switch(state) { - case CURLFNM_LOOP_DEFAULT: - if(*p == '*') { - while(*(p+1) == '*') /* eliminate multiple stars */ - p++; - if(*s == '\0' && *(p+1) == '\0') - return CURL_FNMATCH_MATCH; - rc = loop(p + 1, s); /* *.txt matches .txt <=> .txt matches .txt */ - if(rc == CURL_FNMATCH_MATCH) - return CURL_FNMATCH_MATCH; - if(*s) /* let the star eat up one character */ - s++; - else - return CURL_FNMATCH_NOMATCH; - } - else if(*p == '?') { - if(ISPRINT(*s)) { - s++; - p++; - } - else if(*s == '\0') - return CURL_FNMATCH_NOMATCH; - else - return CURL_FNMATCH_FAIL; /* cannot deal with other character */ - } - else if(*p == '\0') { - if(*s == '\0') - return CURL_FNMATCH_MATCH; - else - return CURL_FNMATCH_NOMATCH; - } - else if(*p == '\\') { - state = CURLFNM_LOOP_BACKSLASH; - p++; - } - else if(*p == '[') { - unsigned char *pp = p+1; /* cannot handle with pointer to register */ - if(setcharset(&pp, charset)) { - int found = FALSE; - if(charset[(unsigned int)*s]) - found = TRUE; - else if(charset[CURLFNM_ALNUM]) - found = ISALNUM(*s); - else if(charset[CURLFNM_ALPHA]) - found = ISALPHA(*s); - else if(charset[CURLFNM_DIGIT]) - found = ISDIGIT(*s); - else if(charset[CURLFNM_XDIGIT]) - found = ISXDIGIT(*s); - else if(charset[CURLFNM_PRINT]) - found = ISPRINT(*s); - else if(charset[CURLFNM_SPACE]) - found = ISSPACE(*s); - else if(charset[CURLFNM_UPPER]) - found = ISUPPER(*s); - else if(charset[CURLFNM_LOWER]) - found = ISLOWER(*s); - else if(charset[CURLFNM_BLANK]) - found = ISBLANK(*s); - else if(charset[CURLFNM_GRAPH]) - found = ISGRAPH(*s); - - if(charset[CURLFNM_NEGATE]) - found = !found; - - if(found) { - p = pp+1; - s++; - memset(charset, 0, CURLFNM_CHSET_SIZE); - } - else - return CURL_FNMATCH_NOMATCH; - } - else - return CURL_FNMATCH_FAIL; - } - else { - if(*p++ != *s++) - return CURL_FNMATCH_NOMATCH; - } - break; - case CURLFNM_LOOP_BACKSLASH: - if(ISPRINT(*p)) { - if(*p++ == *s++) - state = CURLFNM_LOOP_DEFAULT; - else - return CURL_FNMATCH_NOMATCH; - } - else - return CURL_FNMATCH_FAIL; - break; - } - } -} - -/* - * @unittest: 1307 - */ -int Curl_fnmatch(void *ptr, const char *pattern, const char *string) -{ - (void)ptr; /* the argument is specified by the curl_fnmatch_callback - prototype, but not used by Curl_fnmatch() */ - if(!pattern || !string) { - return CURL_FNMATCH_FAIL; - } - return loop((unsigned char *)pattern, (unsigned char *)string); -} diff --git a/build/premake/premake5/contrib/curl/lib/curl_fnmatch.h b/build/premake/premake5/contrib/curl/lib/curl_fnmatch.h deleted file mode 100644 index 69ffe392fd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_fnmatch.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef HEADER_CURL_FNMATCH_H -#define HEADER_CURL_FNMATCH_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#define CURL_FNMATCH_MATCH 0 -#define CURL_FNMATCH_NOMATCH 1 -#define CURL_FNMATCH_FAIL 2 - -/* default pattern matching function - * ================================= - * Implemented with recursive backtracking, if you want to use Curl_fnmatch, - * please note that there is not implemented UTF/UNICODE support. - * - * Implemented features: - * '?' notation, does not match UTF characters - * '*' can also work with UTF string - * [a-zA-Z0-9] enumeration support - * - * keywords: alnum, digit, xdigit, alpha, print, blank, lower, graph, space - * and upper (use as "[[:alnum:]]") - */ -int Curl_fnmatch(void *ptr, const char *pattern, const char *string); - -#endif /* HEADER_CURL_FNMATCH_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_gethostname.c b/build/premake/premake5/contrib/curl/lib/curl_gethostname.c deleted file mode 100644 index 8337c72e81..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_gethostname.c +++ /dev/null @@ -1,100 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "curl_gethostname.h" - -/* - * Curl_gethostname() is a wrapper around gethostname() which allows - * overriding the host name that the function would normally return. - * This capability is used by the test suite to verify exact matching - * of NTLM authentication, which exercises libcurl's MD4 and DES code - * as well as by the SMTP module when a hostname is not provided. - * - * For libcurl debug enabled builds host name overriding takes place - * when environment variable CURL_GETHOSTNAME is set, using the value - * held by the variable to override returned host name. - * - * Note: The function always returns the un-qualified hostname rather - * than being provider dependent. - * - * For libcurl shared library release builds the test suite preloads - * another shared library named libhostname using the LD_PRELOAD - * mechanism which intercepts, and might override, the gethostname() - * function call. In this case a given platform must support the - * LD_PRELOAD mechanism and additionally have environment variable - * CURL_GETHOSTNAME set in order to override the returned host name. - * - * For libcurl static library release builds no overriding takes place. - */ - -int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) -{ -#ifndef HAVE_GETHOSTNAME - - /* Allow compilation and return failure when unavailable */ - (void) name; - (void) namelen; - return -1; - -#else - int err; - char *dot; - -#ifdef DEBUGBUILD - - /* Override host name when environment variable CURL_GETHOSTNAME is set */ - const char *force_hostname = getenv("CURL_GETHOSTNAME"); - if(force_hostname) { - strncpy(name, force_hostname, namelen); - err = 0; - } - else { - name[0] = '\0'; - err = gethostname(name, namelen); - } - -#else /* DEBUGBUILD */ - - /* The call to system's gethostname() might get intercepted by the - libhostname library when libcurl is built as a non-debug shared - library when running the test suite. */ - name[0] = '\0'; - err = gethostname(name, namelen); - -#endif - - name[namelen - 1] = '\0'; - - if(err) - return err; - - /* Truncate domain, leave only machine name */ - dot = strchr(name, '.'); - if(dot) - *dot = '\0'; - - return 0; -#endif - -} diff --git a/build/premake/premake5/contrib/curl/lib/curl_gethostname.h b/build/premake/premake5/contrib/curl/lib/curl_gethostname.h deleted file mode 100644 index 07517c5359..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_gethostname.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef HEADER_CURL_GETHOSTNAME_H -#define HEADER_CURL_GETHOSTNAME_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* Hostname buffer size */ -#define HOSTNAME_MAX 1024 - -/* This returns the local machine's un-qualified hostname */ -int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen); - -#endif /* HEADER_CURL_GETHOSTNAME_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_gssapi.c b/build/premake/premake5/contrib/curl/lib/curl_gssapi.c deleted file mode 100644 index 83f3fa0c43..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_gssapi.c +++ /dev/null @@ -1,131 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_GSSAPI - -#include "curl_gssapi.h" -#include "sendf.h" - -static char spnego_oid_bytes[] = "\x2b\x06\x01\x05\x05\x02"; -gss_OID_desc Curl_spnego_mech_oid = { 6, &spnego_oid_bytes }; -static char krb5_oid_bytes[] = "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"; -gss_OID_desc Curl_krb5_mech_oid = { 9, &krb5_oid_bytes }; - -OM_uint32 Curl_gss_init_sec_context( - struct Curl_easy *data, - OM_uint32 *minor_status, - gss_ctx_id_t *context, - gss_name_t target_name, - gss_OID mech_type, - gss_channel_bindings_t input_chan_bindings, - gss_buffer_t input_token, - gss_buffer_t output_token, - const bool mutual_auth, - OM_uint32 *ret_flags) -{ - OM_uint32 req_flags = GSS_C_REPLAY_FLAG; - - if(mutual_auth) - req_flags |= GSS_C_MUTUAL_FLAG; - - if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) { -#ifdef GSS_C_DELEG_POLICY_FLAG - req_flags |= GSS_C_DELEG_POLICY_FLAG; -#else - infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not " - "compiled in\n"); -#endif - } - - if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_FLAG) - req_flags |= GSS_C_DELEG_FLAG; - - return gss_init_sec_context(minor_status, - GSS_C_NO_CREDENTIAL, /* cred_handle */ - context, - target_name, - mech_type, - req_flags, - 0, /* time_req */ - input_chan_bindings, - input_token, - NULL, /* actual_mech_type */ - output_token, - ret_flags, - NULL /* time_rec */); -} - -#define GSS_LOG_BUFFER_LEN 1024 -static size_t display_gss_error(OM_uint32 status, int type, - char *buf, size_t len) { - OM_uint32 maj_stat; - OM_uint32 min_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc status_string; - - do { - maj_stat = gss_display_status(&min_stat, - status, - type, - GSS_C_NO_OID, - &msg_ctx, - &status_string); - if(GSS_LOG_BUFFER_LEN > len + status_string.length + 3) { - len += snprintf(buf + len, GSS_LOG_BUFFER_LEN - len, - "%.*s. ", (int)status_string.length, - (char *)status_string.value); - } - gss_release_buffer(&min_stat, &status_string); - } while(!GSS_ERROR(maj_stat) && msg_ctx != 0); - - return len; -} - -/* - * Curl_gss_log_error() - * - * This is used to log a GSS-API error status. - * - * Parameters: - * - * data [in] - The session handle. - * prefix [in] - The prefix of the log message. - * major [in] - The major status code. - * minor [in] - The minor status code. - */ -void Curl_gss_log_error(struct Curl_easy *data, const char *prefix, - OM_uint32 major, OM_uint32 minor) -{ - char buf[GSS_LOG_BUFFER_LEN]; - size_t len = 0; - - if(major != GSS_S_FAILURE) - len = display_gss_error(major, GSS_C_GSS_CODE, buf, len); - - display_gss_error(minor, GSS_C_MECH_CODE, buf, len); - - infof(data, "%s%s\n", prefix, buf); -} - -#endif /* HAVE_GSSAPI */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_gssapi.h b/build/premake/premake5/contrib/curl/lib/curl_gssapi.h deleted file mode 100644 index 9700a28174..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_gssapi.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef HEADER_CURL_GSSAPI_H -#define HEADER_CURL_GSSAPI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2011 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" -#include "urldata.h" - -#ifdef HAVE_GSSAPI - -#ifdef HAVE_GSSGNU -# include -#elif defined HAVE_GSSMIT - /* MIT style */ -# include -# include -# include -#else - /* Heimdal-style */ -# include -#endif - -extern gss_OID_desc Curl_spnego_mech_oid; -extern gss_OID_desc Curl_krb5_mech_oid; - -/* Common method for using GSS-API */ -OM_uint32 Curl_gss_init_sec_context( - struct Curl_easy *data, - OM_uint32 *minor_status, - gss_ctx_id_t *context, - gss_name_t target_name, - gss_OID mech_type, - gss_channel_bindings_t input_chan_bindings, - gss_buffer_t input_token, - gss_buffer_t output_token, - const bool mutual_auth, - OM_uint32 *ret_flags); - -/* Helper to log a GSS-API error status */ -void Curl_gss_log_error(struct Curl_easy *data, const char *prefix, - OM_uint32 major, OM_uint32 minor); - -/* Provide some definitions missing in old headers */ -#ifdef HAVE_OLD_GSSMIT -#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name -#define NCOMPAT 1 -#endif - -/* Define our privacy and integrity protection values */ -#define GSSAUTH_P_NONE 1 -#define GSSAUTH_P_INTEGRITY 2 -#define GSSAUTH_P_PRIVACY 4 - -#endif /* HAVE_GSSAPI */ - -#endif /* HEADER_CURL_GSSAPI_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_hmac.h b/build/premake/premake5/contrib/curl/lib/curl_hmac.h deleted file mode 100644 index 756dc9e4cd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_hmac.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef HEADER_CURL_HMAC_H -#define HEADER_CURL_HMAC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifndef CURL_DISABLE_CRYPTO_AUTH - -typedef void (* HMAC_hinit_func)(void *context); -typedef void (* HMAC_hupdate_func)(void *context, - const unsigned char *data, - unsigned int len); -typedef void (* HMAC_hfinal_func)(unsigned char *result, void *context); - - -/* Per-hash function HMAC parameters. */ - -typedef struct { - HMAC_hinit_func hmac_hinit; /* Initialize context procedure. */ - HMAC_hupdate_func hmac_hupdate; /* Update context with data. */ - HMAC_hfinal_func hmac_hfinal; /* Get final result procedure. */ - unsigned int hmac_ctxtsize; /* Context structure size. */ - unsigned int hmac_maxkeylen; /* Maximum key length (bytes). */ - unsigned int hmac_resultlen; /* Result length (bytes). */ -} HMAC_params; - - -/* HMAC computation context. */ - -typedef struct { - const HMAC_params *hmac_hash; /* Hash function definition. */ - void *hmac_hashctxt1; /* Hash function context 1. */ - void *hmac_hashctxt2; /* Hash function context 2. */ -} HMAC_context; - - -/* Prototypes. */ - -HMAC_context * Curl_HMAC_init(const HMAC_params *hashparams, - const unsigned char *key, - unsigned int keylen); -int Curl_HMAC_update(HMAC_context *context, - const unsigned char *data, - unsigned int len); -int Curl_HMAC_final(HMAC_context *context, unsigned char *result); - -#endif - -#endif /* HEADER_CURL_HMAC_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_ldap.h b/build/premake/premake5/contrib/curl/lib/curl_ldap.h deleted file mode 100644 index 27d03810fb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_ldap.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef HEADER_CURL_LDAP_H -#define HEADER_CURL_LDAP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifndef CURL_DISABLE_LDAP -extern const struct Curl_handler Curl_handler_ldap; - -#if !defined(CURL_DISABLE_LDAPS) && \ - ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \ - (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))) -extern const struct Curl_handler Curl_handler_ldaps; -#endif - -#endif -#endif /* HEADER_CURL_LDAP_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/curl_md4.h b/build/premake/premake5/contrib/curl/lib/curl_md4.h deleted file mode 100644 index 8c26d1222a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_md4.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef HEADER_CURL_MD4_H -#define HEADER_CURL_MD4_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -/* NSS and OS/400 crypto library do not provide the MD4 hash algorithm, so - * that we have a local implementation of it */ -#if defined(USE_NSS) || defined(USE_OS400CRYPTO) - -void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len); - -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ - -#endif /* HEADER_CURL_MD4_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_md5.h b/build/premake/premake5/contrib/curl/lib/curl_md5.h deleted file mode 100644 index 5f70c96346..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_md5.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef HEADER_CURL_MD5_H -#define HEADER_CURL_MD5_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifndef CURL_DISABLE_CRYPTO_AUTH -#include "curl_hmac.h" - -#define MD5_DIGEST_LEN 16 - -typedef void (* Curl_MD5_init_func)(void *context); -typedef void (* Curl_MD5_update_func)(void *context, - const unsigned char *data, - unsigned int len); -typedef void (* Curl_MD5_final_func)(unsigned char *result, void *context); - -typedef struct { - Curl_MD5_init_func md5_init_func; /* Initialize context procedure */ - Curl_MD5_update_func md5_update_func; /* Update context with data */ - Curl_MD5_final_func md5_final_func; /* Get final result procedure */ - unsigned int md5_ctxtsize; /* Context structure size */ - unsigned int md5_resultlen; /* Result length (bytes) */ -} MD5_params; - -typedef struct { - const MD5_params *md5_hash; /* Hash function definition */ - void *md5_hashctx; /* Hash function context */ -} MD5_context; - -extern const MD5_params Curl_DIGEST_MD5[1]; -extern const HMAC_params Curl_HMAC_MD5[1]; - -void Curl_md5it(unsigned char *output, - const unsigned char *input); - -MD5_context * Curl_MD5_init(const MD5_params *md5params); -int Curl_MD5_update(MD5_context *context, - const unsigned char *data, - unsigned int len); -int Curl_MD5_final(MD5_context *context, unsigned char *result); - -#endif - -#endif /* HEADER_CURL_MD5_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_memory.h b/build/premake/premake5/contrib/curl/lib/curl_memory.h deleted file mode 100644 index 6f792fffda..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_memory.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef HEADER_CURL_MEMORY_H -#define HEADER_CURL_MEMORY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Nasty internal details ahead... - * - * File curl_memory.h must be included by _all_ *.c source files - * that use memory related functions strdup, malloc, calloc, realloc - * or free, and given source file is used to build libcurl library. - * It should be included immediately before memdebug.h as the last files - * included to avoid undesired interaction with other memory function - * headers in dependent libraries. - * - * There is nearly no exception to above rule. All libcurl source - * files in 'lib' subdirectory as well as those living deep inside - * 'packages' subdirectories and linked together in order to build - * libcurl library shall follow it. - * - * File lib/strdup.c is an exception, given that it provides a strdup - * clone implementation while using malloc. Extra care needed inside - * this one. TODO: revisit this paragraph and related code. - * - * The need for curl_memory.h inclusion is due to libcurl's feature - * of allowing library user to provide memory replacement functions, - * memory callbacks, at runtime with curl_global_init_mem() - * - * Any *.c source file used to build libcurl library that does not - * include curl_memory.h and uses any memory function of the five - * mentioned above will compile without any indication, but it will - * trigger weird memory related issues at runtime. - * - * OTOH some source files from 'lib' subdirectory may additionally be - * used directly as source code when using some curlx_ functions by - * third party programs that don't even use libcurl at all. When using - * these source files in this way it is necessary these are compiled - * with CURLX_NO_MEMORY_CALLBACKS defined, in order to ensure that no - * attempt of calling libcurl's memory callbacks is done from code - * which can not use this machinery. - * - * Notice that libcurl's 'memory tracking' system works chaining into - * the memory callback machinery. This implies that when compiling - * 'lib' source files with CURLX_NO_MEMORY_CALLBACKS defined this file - * disengages usage of libcurl's 'memory tracking' system, defining - * MEMDEBUG_NODEFINES and overriding CURLDEBUG purpose. - * - * CURLX_NO_MEMORY_CALLBACKS takes precedence over CURLDEBUG. This is - * done in order to allow building a 'memory tracking' enabled libcurl - * and at the same time allow building programs which do not use it. - * - * Programs and libraries in 'tests' subdirectories have specific - * purposes and needs, and as such each one will use whatever fits - * best, depending additionally wether it links with libcurl or not. - * - * Caveat emptor. Proper curlx_* separation is a work in progress - * the same as CURLX_NO_MEMORY_CALLBACKS usage, some adjustments may - * still be required. IOW don't use them yet, there are sharp edges. - */ - -#ifdef HEADER_CURL_MEMDEBUG_H -#error "Header memdebug.h shall not be included before curl_memory.h" -#endif - -#ifndef CURLX_NO_MEMORY_CALLBACKS - -#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS /* only if not already done */ -/* - * The following memory function replacement typedef's are COPIED from - * curl/curl.h and MUST match the originals. We copy them to avoid having to - * include curl/curl.h here. We avoid that include since it includes stdio.h - * and other headers that may get messed up with defines done here. - */ -typedef void *(*curl_malloc_callback)(size_t size); -typedef void (*curl_free_callback)(void *ptr); -typedef void *(*curl_realloc_callback)(void *ptr, size_t size); -typedef char *(*curl_strdup_callback)(const char *str); -typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); -#define CURL_DID_MEMORY_FUNC_TYPEDEFS -#endif - -extern curl_malloc_callback Curl_cmalloc; -extern curl_free_callback Curl_cfree; -extern curl_realloc_callback Curl_crealloc; -extern curl_strdup_callback Curl_cstrdup; -extern curl_calloc_callback Curl_ccalloc; -#if defined(WIN32) && defined(UNICODE) -extern curl_wcsdup_callback Curl_cwcsdup; -#endif - -#ifndef CURLDEBUG - -/* - * libcurl's 'memory tracking' system defines strdup, malloc, calloc, - * realloc and free, along with others, in memdebug.h in a different - * way although still using memory callbacks forward declared above. - * When using the 'memory tracking' system (CURLDEBUG defined) we do - * not define here the five memory functions given that definitions - * from memdebug.h are the ones that shall be used. - */ - -#undef strdup -#define strdup(ptr) Curl_cstrdup(ptr) -#undef malloc -#define malloc(size) Curl_cmalloc(size) -#undef calloc -#define calloc(nbelem,size) Curl_ccalloc(nbelem, size) -#undef realloc -#define realloc(ptr,size) Curl_crealloc(ptr, size) -#undef free -#define free(ptr) Curl_cfree(ptr) - -#ifdef WIN32 -# ifdef UNICODE -# undef wcsdup -# define wcsdup(ptr) Curl_cwcsdup(ptr) -# undef _wcsdup -# define _wcsdup(ptr) Curl_cwcsdup(ptr) -# undef _tcsdup -# define _tcsdup(ptr) Curl_cwcsdup(ptr) -# else -# undef _tcsdup -# define _tcsdup(ptr) Curl_cstrdup(ptr) -# endif -#endif - -#endif /* CURLDEBUG */ - -#else /* CURLX_NO_MEMORY_CALLBACKS */ - -#ifndef MEMDEBUG_NODEFINES -#define MEMDEBUG_NODEFINES -#endif - -#endif /* CURLX_NO_MEMORY_CALLBACKS */ - -#endif /* HEADER_CURL_MEMORY_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_memrchr.c b/build/premake/premake5/contrib/curl/lib/curl_memrchr.c deleted file mode 100644 index c521497b21..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_memrchr.c +++ /dev/null @@ -1,61 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "curl_memrchr.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -#ifndef HAVE_MEMRCHR - -/* - * Curl_memrchr() - * - * Our memrchr() function clone for systems which lack this function. The - * memrchr() function is like the memchr() function, except that it searches - * backwards from the end of the n bytes pointed to by s instead of forward - * from the beginning. - */ - -void * -Curl_memrchr(const void *s, int c, size_t n) -{ - const unsigned char *p = s; - const unsigned char *q = s; - - p += n - 1; - - while(p >= q) { - if(*p == (unsigned char)c) - return (void *)p; - p--; - } - - return NULL; -} - -#endif /* HAVE_MEMRCHR */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_memrchr.h b/build/premake/premake5/contrib/curl/lib/curl_memrchr.h deleted file mode 100644 index 747509c45a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_memrchr.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef HEADER_CURL_MEMRCHR_H -#define HEADER_CURL_MEMRCHR_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_MEMRCHR - -#ifdef HAVE_STRING_H -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif - -#else /* HAVE_MEMRCHR */ - -void *Curl_memrchr(const void *s, int c, size_t n); - -#define memrchr(x,y,z) Curl_memrchr((x),(y),(z)) - -#endif /* HAVE_MEMRCHR */ - -#endif /* HEADER_CURL_MEMRCHR_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_multibyte.c b/build/premake/premake5/contrib/curl/lib/curl_multibyte.c deleted file mode 100644 index e78bb5002e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_multibyte.c +++ /dev/null @@ -1,84 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \ - defined(USE_WIN32_LDAP)) && defined(UNICODE)) - - /* - * MultiByte conversions using Windows kernel32 library. - */ - -#include "curl_multibyte.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8) -{ - wchar_t *str_w = NULL; - - if(str_utf8) { - int str_w_len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, - str_utf8, -1, NULL, 0); - if(str_w_len > 0) { - str_w = malloc(str_w_len * sizeof(wchar_t)); - if(str_w) { - if(MultiByteToWideChar(CP_UTF8, 0, str_utf8, -1, str_w, - str_w_len) == 0) { - free(str_w); - return NULL; - } - } - } - } - - return str_w; -} - -char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w) -{ - char *str_utf8 = NULL; - - if(str_w) { - int str_utf8_len = WideCharToMultiByte(CP_UTF8, 0, str_w, -1, NULL, - 0, NULL, NULL); - if(str_utf8_len > 0) { - str_utf8 = malloc(str_utf8_len * sizeof(wchar_t)); - if(str_utf8) { - if(WideCharToMultiByte(CP_UTF8, 0, str_w, -1, str_utf8, str_utf8_len, - NULL, FALSE) == 0) { - free(str_utf8); - return NULL; - } - } - } - } - - return str_utf8; -} - -#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_multibyte.h b/build/premake/premake5/contrib/curl/lib/curl_multibyte.h deleted file mode 100644 index 615f5c086c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_multibyte.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef HEADER_CURL_MULTIBYTE_H -#define HEADER_CURL_MULTIBYTE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \ - defined(USE_WIN32_LDAP)) && defined(UNICODE)) - - /* - * MultiByte conversions using Windows kernel32 library. - */ - -wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8); -char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w); - -#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */ - - -#if defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI) || \ - defined(USE_WIN32_LDAP) - -/* - * Macros Curl_convert_UTF8_to_tchar(), Curl_convert_tchar_to_UTF8() - * and Curl_unicodefree() main purpose is to minimize the number of - * preprocessor conditional directives needed by code using these - * to differentiate UNICODE from non-UNICODE builds. - * - * When building with UNICODE defined, this two macros - * Curl_convert_UTF8_to_tchar() and Curl_convert_tchar_to_UTF8() - * return a pointer to a newly allocated memory area holding result. - * When the result is no longer needed, allocated memory is intended - * to be free'ed with Curl_unicodefree(). - * - * When building without UNICODE defined, this macros - * Curl_convert_UTF8_to_tchar() and Curl_convert_tchar_to_UTF8() - * return the pointer received as argument. Curl_unicodefree() does - * no actual free'ing of this pointer it is simply set to NULL. - */ - -#ifdef UNICODE - -#define Curl_convert_UTF8_to_tchar(ptr) Curl_convert_UTF8_to_wchar((ptr)) -#define Curl_convert_tchar_to_UTF8(ptr) Curl_convert_wchar_to_UTF8((ptr)) -#define Curl_unicodefree(ptr) \ - do {if((ptr)) {free((ptr)); (ptr) = NULL;}} WHILE_FALSE - -typedef union { - unsigned short *tchar_ptr; - const unsigned short *const_tchar_ptr; - unsigned short *tbyte_ptr; - const unsigned short *const_tbyte_ptr; -} xcharp_u; - -#else - -#define Curl_convert_UTF8_to_tchar(ptr) (ptr) -#define Curl_convert_tchar_to_UTF8(ptr) (ptr) -#define Curl_unicodefree(ptr) \ - do {(ptr) = NULL;} WHILE_FALSE - -typedef union { - char *tchar_ptr; - const char *const_tchar_ptr; - unsigned char *tbyte_ptr; - const unsigned char *const_tbyte_ptr; -} xcharp_u; - -#endif /* UNICODE */ - -#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI || USE_WIN32_LDAP */ - -#endif /* HEADER_CURL_MULTIBYTE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_ntlm_core.c b/build/premake/premake5/contrib/curl/lib/curl_ntlm_core.c deleted file mode 100644 index e02983ce6a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_ntlm_core.c +++ /dev/null @@ -1,790 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_NTLM) - -/* - * NTLM details: - * - * https://davenport.sourceforge.io/ntlm.html - * https://www.innovation.ch/java/ntlm.html - */ - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - -#ifdef USE_OPENSSL - -# ifdef USE_OPENSSL -# include -# ifndef OPENSSL_NO_MD4 -# include -# endif -# include -# include -# include -# else -# include -# ifndef OPENSSL_NO_MD4 -# include -# endif -# include -# include -# include -# endif -# if (OPENSSL_VERSION_NUMBER < 0x00907001L) -# define DES_key_schedule des_key_schedule -# define DES_cblock des_cblock -# define DES_set_odd_parity des_set_odd_parity -# define DES_set_key des_set_key -# define DES_ecb_encrypt des_ecb_encrypt -# define DESKEY(x) x -# define DESKEYARG(x) x -# else -# define DESKEYARG(x) *x -# define DESKEY(x) &x -# endif - -#elif defined(USE_GNUTLS_NETTLE) - -# include -# include - -#elif defined(USE_GNUTLS) - -# include -# define MD5_DIGEST_LENGTH 16 -# define MD4_DIGEST_LENGTH 16 - -#elif defined(USE_MBEDTLS) - -# include -# include - -#elif defined(USE_NSS) - -# include -# include -# include -# include "curl_md4.h" -# define MD5_DIGEST_LENGTH MD5_LENGTH - -#elif defined(USE_DARWINSSL) - -# include -# include - -#elif defined(USE_OS400CRYPTO) -# include "cipher.mih" /* mih/cipher */ -# include "curl_md4.h" -#elif defined(USE_WIN32_CRYPTO) -# include -#else -# error "Can't compile NTLM support without a crypto library." -#endif - -#include "urldata.h" -#include "non-ascii.h" -#include "strcase.h" -#include "curl_ntlm_core.h" -#include "curl_md5.h" -#include "curl_hmac.h" -#include "warnless.h" -#include "curl_endian.h" -#include "curl_des.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#define NTLM_HMAC_MD5_LEN (16) -#define NTLMv2_BLOB_SIGNATURE "\x01\x01\x00\x00" -#define NTLMv2_BLOB_LEN (44 -16 + ntlm->target_info_len + 4) - -/* -* Turns a 56-bit key into being 64-bit wide. -*/ -static void extend_key_56_to_64(const unsigned char *key_56, char *key) -{ - key[0] = key_56[0]; - key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1)); - key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2)); - key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3)); - key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4)); - key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5)); - key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6)); - key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF); -} - -#ifdef USE_OPENSSL -/* - * Turns a 56 bit key into the 64 bit, odd parity key and sets the key. The - * key schedule ks is also set. - */ -static void setup_des_key(const unsigned char *key_56, - DES_key_schedule DESKEYARG(ks)) -{ - DES_cblock key; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, (char *) &key); - - /* Set the key parity to odd */ - DES_set_odd_parity(&key); - - /* Set the key */ - DES_set_key(&key, ks); -} - -#elif defined(USE_GNUTLS_NETTLE) - -static void setup_des_key(const unsigned char *key_56, - struct des_ctx *des) -{ - char key[8]; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, key); - - /* Set the key parity to odd */ - Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); - - /* Set the key */ - des_set_key(des, (const uint8_t *) key); -} - -#elif defined(USE_GNUTLS) - -/* - * Turns a 56 bit key into the 64 bit, odd parity key and sets the key. - */ -static void setup_des_key(const unsigned char *key_56, - gcry_cipher_hd_t *des) -{ - char key[8]; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, key); - - /* Set the key parity to odd */ - Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); - - /* Set the key */ - gcry_cipher_setkey(*des, key, sizeof(key)); -} - -#elif defined(USE_MBEDTLS) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - mbedtls_des_context ctx; - char key[8]; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, key); - - /* Set the key parity to odd */ - mbedtls_des_key_set_parity((unsigned char *) key); - - /* Perform the encryption */ - mbedtls_des_init(&ctx); - mbedtls_des_setkey_enc(&ctx, (unsigned char *) key); - return mbedtls_des_crypt_ecb(&ctx, in, out) == 0; -} - -#elif defined(USE_NSS) - -/* - * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using - * the expanded key. The caller is responsible for giving 64 bit of valid - * data is IN and (at least) 64 bit large buffer as OUT. - */ -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */ - PK11SlotInfo *slot = NULL; - char key[8]; /* expanded 64 bit key */ - SECItem key_item; - PK11SymKey *symkey = NULL; - SECItem *param = NULL; - PK11Context *ctx = NULL; - int out_len; /* not used, required by NSS */ - bool rv = FALSE; - - /* use internal slot for DES encryption (requires NSS to be initialized) */ - slot = PK11_GetInternalKeySlot(); - if(!slot) - return FALSE; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, key); - - /* Set the key parity to odd */ - Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); - - /* Import the key */ - key_item.data = (unsigned char *)key; - key_item.len = sizeof(key); - symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT, - &key_item, NULL); - if(!symkey) - goto fail; - - /* Create the DES encryption context */ - param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL); - if(!param) - goto fail; - ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param); - if(!ctx) - goto fail; - - /* Perform the encryption */ - if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8, - (unsigned char *)in, /* inbuflen */ 8) - && SECSuccess == PK11_Finalize(ctx)) - rv = /* all OK */ TRUE; - -fail: - /* cleanup */ - if(ctx) - PK11_DestroyContext(ctx, PR_TRUE); - if(symkey) - PK11_FreeSymKey(symkey); - if(param) - SECITEM_FreeItem(param, PR_TRUE); - PK11_FreeSlot(slot); - return rv; -} - -#elif defined(USE_DARWINSSL) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - char key[8]; - size_t out_len; - CCCryptorStatus err; - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, key); - - /* Set the key parity to odd */ - Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); - - /* Perform the encryption */ - err = CCCrypt(kCCEncrypt, kCCAlgorithmDES, kCCOptionECBMode, key, - kCCKeySizeDES, NULL, in, 8 /* inbuflen */, out, - 8 /* outbuflen */, &out_len); - - return err == kCCSuccess; -} - -#elif defined(USE_OS400CRYPTO) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - char key[8]; - _CIPHER_Control_T ctl; - - /* Setup the cipher control structure */ - ctl.Func_ID = ENCRYPT_ONLY; - ctl.Data_Len = sizeof(key); - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, ctl.Crypto_Key); - - /* Set the key parity to odd */ - Curl_des_set_odd_parity((unsigned char *) ctl.Crypto_Key, ctl.Data_Len); - - /* Perform the encryption */ - _CIPHER((_SPCPTR *) &out, &ctl, (_SPCPTR *) &in); - - return TRUE; -} - -#elif defined(USE_WIN32_CRYPTO) - -static bool encrypt_des(const unsigned char *in, unsigned char *out, - const unsigned char *key_56) -{ - HCRYPTPROV hprov; - HCRYPTKEY hkey; - struct { - BLOBHEADER hdr; - unsigned int len; - char key[8]; - } blob; - DWORD len = 8; - - /* Acquire the crypto provider */ - if(!CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) - return FALSE; - - /* Setup the key blob structure */ - memset(&blob, 0, sizeof(blob)); - blob.hdr.bType = PLAINTEXTKEYBLOB; - blob.hdr.bVersion = 2; - blob.hdr.aiKeyAlg = CALG_DES; - blob.len = sizeof(blob.key); - - /* Expand the 56-bit key to 64-bits */ - extend_key_56_to_64(key_56, blob.key); - - /* Set the key parity to odd */ - Curl_des_set_odd_parity((unsigned char *) blob.key, sizeof(blob.key)); - - /* Import the key */ - if(!CryptImportKey(hprov, (BYTE *) &blob, sizeof(blob), 0, 0, &hkey)) { - CryptReleaseContext(hprov, 0); - - return FALSE; - } - - memcpy(out, in, 8); - - /* Perform the encryption */ - CryptEncrypt(hkey, 0, FALSE, 0, out, &len, len); - - CryptDestroyKey(hkey); - CryptReleaseContext(hprov, 0); - - return TRUE; -} - -#endif /* defined(USE_WIN32_CRYPTO) */ - - /* - * takes a 21 byte array and treats it as 3 56-bit DES keys. The - * 8 byte plaintext is encrypted with each key and the resulting 24 - * bytes are stored in the results array. - */ -void Curl_ntlm_core_lm_resp(const unsigned char *keys, - const unsigned char *plaintext, - unsigned char *results) -{ -#ifdef USE_OPENSSL - DES_key_schedule ks; - - setup_des_key(keys, DESKEY(ks)); - DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results, - DESKEY(ks), DES_ENCRYPT); - - setup_des_key(keys + 7, DESKEY(ks)); - DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 8), - DESKEY(ks), DES_ENCRYPT); - - setup_des_key(keys + 14, DESKEY(ks)); - DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 16), - DESKEY(ks), DES_ENCRYPT); -#elif defined(USE_GNUTLS_NETTLE) - struct des_ctx des; - setup_des_key(keys, &des); - des_encrypt(&des, 8, results, plaintext); - setup_des_key(keys + 7, &des); - des_encrypt(&des, 8, results + 8, plaintext); - setup_des_key(keys + 14, &des); - des_encrypt(&des, 8, results + 16, plaintext); -#elif defined(USE_GNUTLS) - gcry_cipher_hd_t des; - - gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); - setup_des_key(keys, &des); - gcry_cipher_encrypt(des, results, 8, plaintext, 8); - gcry_cipher_close(des); - - gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); - setup_des_key(keys + 7, &des); - gcry_cipher_encrypt(des, results + 8, 8, plaintext, 8); - gcry_cipher_close(des); - - gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); - setup_des_key(keys + 14, &des); - gcry_cipher_encrypt(des, results + 16, 8, plaintext, 8); - gcry_cipher_close(des); -#elif defined(USE_MBEDTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) \ - || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) - encrypt_des(plaintext, results, keys); - encrypt_des(plaintext, results + 8, keys + 7); - encrypt_des(plaintext, results + 16, keys + 14); -#endif -} - -/* - * Set up lanmanager hashed password - */ -CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, - const char *password, - unsigned char *lmbuffer /* 21 bytes */) -{ - CURLcode result; - unsigned char pw[14]; - static const unsigned char magic[] = { - 0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */ - }; - size_t len = CURLMIN(strlen(password), 14); - - Curl_strntoupper((char *)pw, password, len); - memset(&pw[len], 0, 14 - len); - - /* - * The LanManager hashed password needs to be created using the - * password in the network encoding not the host encoding. - */ - result = Curl_convert_to_network(data, (char *)pw, 14); - if(result) - return result; - - { - /* Create LanManager hashed password. */ - -#ifdef USE_OPENSSL - DES_key_schedule ks; - - setup_des_key(pw, DESKEY(ks)); - DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer, - DESKEY(ks), DES_ENCRYPT); - - setup_des_key(pw + 7, DESKEY(ks)); - DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer + 8), - DESKEY(ks), DES_ENCRYPT); -#elif defined(USE_GNUTLS_NETTLE) - struct des_ctx des; - setup_des_key(pw, &des); - des_encrypt(&des, 8, lmbuffer, magic); - setup_des_key(pw + 7, &des); - des_encrypt(&des, 8, lmbuffer + 8, magic); -#elif defined(USE_GNUTLS) - gcry_cipher_hd_t des; - - gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); - setup_des_key(pw, &des); - gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8); - gcry_cipher_close(des); - - gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); - setup_des_key(pw + 7, &des); - gcry_cipher_encrypt(des, lmbuffer + 8, 8, magic, 8); - gcry_cipher_close(des); -#elif defined(USE_MBEDTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) \ - || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) - encrypt_des(magic, lmbuffer, pw); - encrypt_des(magic, lmbuffer + 8, pw + 7); -#endif - - memset(lmbuffer + 16, 0, 21 - 16); - } - - return CURLE_OK; -} - -#if USE_NTRESPONSES -static void ascii_to_unicode_le(unsigned char *dest, const char *src, - size_t srclen) -{ - size_t i; - for(i = 0; i < srclen; i++) { - dest[2 * i] = (unsigned char)src[i]; - dest[2 * i + 1] = '\0'; - } -} - -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) - -static void ascii_uppercase_to_unicode_le(unsigned char *dest, - const char *src, size_t srclen) -{ - size_t i; - for(i = 0; i < srclen; i++) { - dest[2 * i] = (unsigned char)(toupper(src[i])); - dest[2 * i + 1] = '\0'; - } -} - -#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ - -/* - * Set up nt hashed passwords - * @unittest: 1600 - */ -CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, - const char *password, - unsigned char *ntbuffer /* 21 bytes */) -{ - size_t len = strlen(password); - unsigned char *pw = malloc(len * 2); - CURLcode result; - if(!pw) - return CURLE_OUT_OF_MEMORY; - - ascii_to_unicode_le(pw, password, len); - - /* - * The NT hashed password needs to be created using the password in the - * network encoding not the host encoding. - */ - result = Curl_convert_to_network(data, (char *)pw, len * 2); - if(result) - return result; - - { - /* Create NT hashed password. */ -#ifdef USE_OPENSSL - MD4_CTX MD4pw; - MD4_Init(&MD4pw); - MD4_Update(&MD4pw, pw, 2 * len); - MD4_Final(ntbuffer, &MD4pw); -#elif defined(USE_GNUTLS_NETTLE) - struct md4_ctx MD4pw; - md4_init(&MD4pw); - md4_update(&MD4pw, (unsigned int)(2 * len), pw); - md4_digest(&MD4pw, MD4_DIGEST_SIZE, ntbuffer); -#elif defined(USE_GNUTLS) - gcry_md_hd_t MD4pw; - gcry_md_open(&MD4pw, GCRY_MD_MD4, 0); - gcry_md_write(MD4pw, pw, 2 * len); - memcpy(ntbuffer, gcry_md_read(MD4pw, 0), MD4_DIGEST_LENGTH); - gcry_md_close(MD4pw); -#elif defined(USE_MBEDTLS) - mbedtls_md4(pw, 2 * len, ntbuffer); -#elif defined(USE_NSS) || defined(USE_OS400CRYPTO) - Curl_md4it(ntbuffer, pw, 2 * len); -#elif defined(USE_DARWINSSL) - (void)CC_MD4(pw, (CC_LONG)(2 * len), ntbuffer); -#elif defined(USE_WIN32_CRYPTO) - HCRYPTPROV hprov; - if(CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) { - HCRYPTHASH hhash; - if(CryptCreateHash(hprov, CALG_MD4, 0, 0, &hhash)) { - DWORD length = 16; - CryptHashData(hhash, pw, (unsigned int)len * 2, 0); - CryptGetHashParam(hhash, HP_HASHVAL, ntbuffer, &length, 0); - CryptDestroyHash(hhash); - } - CryptReleaseContext(hprov, 0); - } -#endif - - memset(ntbuffer + 16, 0, 21 - 16); - } - - free(pw); - - return CURLE_OK; -} - -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) - -/* This returns the HMAC MD5 digest */ -CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, - const unsigned char *data, unsigned int datalen, - unsigned char *output) -{ - HMAC_context *ctxt = Curl_HMAC_init(Curl_HMAC_MD5, key, keylen); - - if(!ctxt) - return CURLE_OUT_OF_MEMORY; - - /* Update the digest with the given challenge */ - Curl_HMAC_update(ctxt, data, datalen); - - /* Finalise the digest */ - Curl_HMAC_final(ctxt, output); - - return CURLE_OK; -} - -/* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode - * (uppercase UserName + Domain) as the data - */ -CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, - const char *domain, size_t domlen, - unsigned char *ntlmhash, - unsigned char *ntlmv2hash) -{ - /* Unicode representation */ - size_t identity_len = (userlen + domlen) * 2; - unsigned char *identity = malloc(identity_len); - CURLcode result = CURLE_OK; - - if(!identity) - return CURLE_OUT_OF_MEMORY; - - ascii_uppercase_to_unicode_le(identity, user, userlen); - ascii_to_unicode_le(identity + (userlen << 1), domain, domlen); - - result = Curl_hmac_md5(ntlmhash, 16, identity, curlx_uztoui(identity_len), - ntlmv2hash); - - free(identity); - - return result; -} - -/* - * Curl_ntlm_core_mk_ntlmv2_resp() - * - * This creates the NTLMv2 response as set in the ntlm type-3 message. - * - * Parameters: - * - * ntlmv2hash [in] - The ntlmv2 hash (16 bytes) - * challenge_client [in] - The client nonce (8 bytes) - * ntlm [in] - The ntlm data struct being used to read TargetInfo - and Server challenge received in the type-2 message - * ntresp [out] - The address where a pointer to newly allocated - * memory holding the NTLMv2 response. - * ntresp_len [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, - unsigned char *challenge_client, - struct ntlmdata *ntlm, - unsigned char **ntresp, - unsigned int *ntresp_len) -{ -/* NTLMv2 response structure : ------------------------------------------------------------------------------- -0 HMAC MD5 16 bytes -------BLOB-------------------------------------------------------------------- -16 Signature 0x01010000 -20 Reserved long (0x00000000) -24 Timestamp LE, 64-bit signed value representing the number of - tenths of a microsecond since January 1, 1601. -32 Client Nonce 8 bytes -40 Unknown 4 bytes -44 Target Info N bytes (from the type-2 message) -44+N Unknown 4 bytes ------------------------------------------------------------------------------- -*/ - - unsigned int len = 0; - unsigned char *ptr = NULL; - unsigned char hmac_output[NTLM_HMAC_MD5_LEN]; - curl_off_t tw; - - CURLcode result = CURLE_OK; - -#if CURL_SIZEOF_CURL_OFF_T < 8 -#error "this section needs 64bit support to work" -#endif - - /* Calculate the timestamp */ -#ifdef DEBUGBUILD - char *force_timestamp = getenv("CURL_FORCETIME"); - if(force_timestamp) - tw = CURL_OFF_T_C(11644473600) * 10000000; - else -#endif - tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; - - /* Calculate the response len */ - len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN; - - /* Allocate the response */ - ptr = malloc(len); - if(!ptr) - return CURLE_OUT_OF_MEMORY; - - memset(ptr, 0, len); - - /* Create the BLOB structure */ - snprintf((char *)ptr + NTLM_HMAC_MD5_LEN, NTLMv2_BLOB_LEN, - "%c%c%c%c" /* NTLMv2_BLOB_SIGNATURE */ - "%c%c%c%c", /* Reserved = 0 */ - NTLMv2_BLOB_SIGNATURE[0], NTLMv2_BLOB_SIGNATURE[1], - NTLMv2_BLOB_SIGNATURE[2], NTLMv2_BLOB_SIGNATURE[3], - 0, 0, 0, 0); - - Curl_write64_le(tw, ptr + 24); - memcpy(ptr + 32, challenge_client, 8); - memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len); - - /* Concatenate the Type 2 challenge with the BLOB and do HMAC MD5 */ - memcpy(ptr + 8, &ntlm->nonce[0], 8); - result = Curl_hmac_md5(ntlmv2hash, NTLM_HMAC_MD5_LEN, ptr + 8, - NTLMv2_BLOB_LEN + 8, hmac_output); - if(result) { - free(ptr); - return result; - } - - /* Concatenate the HMAC MD5 output with the BLOB */ - memcpy(ptr, hmac_output, NTLM_HMAC_MD5_LEN); - - /* Return the response */ - *ntresp = ptr; - *ntresp_len = len; - - return result; -} - -/* - * Curl_ntlm_core_mk_lmv2_resp() - * - * This creates the LMv2 response as used in the ntlm type-3 message. - * - * Parameters: - * - * ntlmv2hash [in] - The ntlmv2 hash (16 bytes) - * challenge_client [in] - The client nonce (8 bytes) - * challenge_client [in] - The server challenge (8 bytes) - * lmresp [out] - The LMv2 response (24 bytes) - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, - unsigned char *challenge_client, - unsigned char *challenge_server, - unsigned char *lmresp) -{ - unsigned char data[16]; - unsigned char hmac_output[16]; - CURLcode result = CURLE_OK; - - memcpy(&data[0], challenge_server, 8); - memcpy(&data[8], challenge_client, 8); - - result = Curl_hmac_md5(ntlmv2hash, 16, &data[0], 16, hmac_output); - if(result) - return result; - - /* Concatenate the HMAC MD5 output with the client nonce */ - memcpy(lmresp, hmac_output, 16); - memcpy(lmresp+16, challenge_client, 8); - - return result; -} - -#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ - -#endif /* USE_NTRESPONSES */ - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* USE_NTLM */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_ntlm_core.h b/build/premake/premake5/contrib/curl/lib/curl_ntlm_core.h deleted file mode 100644 index c5f90e778e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_ntlm_core.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef HEADER_CURL_NTLM_CORE_H -#define HEADER_CURL_NTLM_CORE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_NTLM) - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - -#ifdef USE_OPENSSL -# if !defined(OPENSSL_VERSION_NUMBER) && \ - !defined(HEADER_SSL_H) && !defined(HEADER_MD5_H) -# error "curl_ntlm_core.h shall not be included before OpenSSL headers." -# endif -# ifdef OPENSSL_NO_MD4 -# define USE_NTRESPONSES 0 -# define USE_NTLM2SESSION 0 -# define USE_NTLM_V2 0 -# endif -#endif - -/* Define USE_NTRESPONSES to 1 in order to make the type-3 message include - * the NT response message. */ -#ifndef USE_NTRESPONSES -#define USE_NTRESPONSES 1 -#endif - -/* Define USE_NTLM2SESSION to 1 in order to make the type-3 message include the - NTLM2Session response message, requires USE_NTRESPONSES defined to 1 and a - Crypto engine that we have curl_ssl_md5sum() for. */ -#if !defined(USE_NTLM2SESSION) && USE_NTRESPONSES && !defined(USE_WIN32_CRYPTO) -#define USE_NTLM2SESSION 1 -#endif - -/* Define USE_NTLM_V2 to 1 in order to allow the type-3 message to include the - LMv2 and NTLMv2 response messages, requires USE_NTRESPONSES defined to 1 - and support for 64-bit integers. */ -#if !defined(USE_NTLM_V2) && USE_NTRESPONSES && (CURL_SIZEOF_CURL_OFF_T > 4) -#define USE_NTLM_V2 1 -#endif - -void Curl_ntlm_core_lm_resp(const unsigned char *keys, - const unsigned char *plaintext, - unsigned char *results); - -CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, - const char *password, - unsigned char *lmbuffer /* 21 bytes */); - -#if USE_NTRESPONSES -CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, - const char *password, - unsigned char *ntbuffer /* 21 bytes */); - -#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) - -CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, - const unsigned char *data, unsigned int datalen, - unsigned char *output); - -CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, - const char *domain, size_t domlen, - unsigned char *ntlmhash, - unsigned char *ntlmv2hash); - -CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, - unsigned char *challenge_client, - struct ntlmdata *ntlm, - unsigned char **ntresp, - unsigned int *ntresp_len); - -CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, - unsigned char *challenge_client, - unsigned char *challenge_server, - unsigned char *lmresp); - -#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ - -#endif /* USE_NTRESPONSES */ - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* USE_NTLM */ - -#endif /* HEADER_CURL_NTLM_CORE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.c b/build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.c deleted file mode 100644 index 9f5b87bc3f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.c +++ /dev/null @@ -1,431 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) - -/* - * NTLM details: - * - * https://davenport.sourceforge.io/ntlm.html - * https://www.innovation.ch/java/ntlm.html - */ - -#define DEBUG_ME 0 - -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "select.h" -#include "vauth/ntlm.h" -#include "curl_ntlm_wb.h" -#include "url.h" -#include "strerror.h" -#include "strdup.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#if DEBUG_ME -# define DEBUG_OUT(x) x -#else -# define DEBUG_OUT(x) Curl_nop_stmt -#endif - -/* Portable 'sclose_nolog' used only in child process instead of 'sclose' - to avoid fooling the socket leak detector */ -#if defined(HAVE_CLOSESOCKET) -# define sclose_nolog(x) closesocket((x)) -#elif defined(HAVE_CLOSESOCKET_CAMEL) -# define sclose_nolog(x) CloseSocket((x)) -#else -# define sclose_nolog(x) close((x)) -#endif - -void Curl_ntlm_wb_cleanup(struct connectdata *conn) -{ - if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD) { - sclose(conn->ntlm_auth_hlpr_socket); - conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD; - } - - if(conn->ntlm_auth_hlpr_pid) { - int i; - for(i = 0; i < 4; i++) { - pid_t ret = waitpid(conn->ntlm_auth_hlpr_pid, NULL, WNOHANG); - if(ret == conn->ntlm_auth_hlpr_pid || errno == ECHILD) - break; - switch(i) { - case 0: - kill(conn->ntlm_auth_hlpr_pid, SIGTERM); - break; - case 1: - /* Give the process another moment to shut down cleanly before - bringing down the axe */ - Curl_wait_ms(1); - break; - case 2: - kill(conn->ntlm_auth_hlpr_pid, SIGKILL); - break; - case 3: - break; - } - } - conn->ntlm_auth_hlpr_pid = 0; - } - - free(conn->challenge_header); - conn->challenge_header = NULL; - free(conn->response_header); - conn->response_header = NULL; -} - -static CURLcode ntlm_wb_init(struct connectdata *conn, const char *userp) -{ - curl_socket_t sockfds[2]; - pid_t child_pid; - const char *username; - char *slash, *domain = NULL; - const char *ntlm_auth = NULL; - char *ntlm_auth_alloc = NULL; -#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID) - struct passwd pw, *pw_res; - char pwbuf[1024]; -#endif - int error; - - /* Return if communication with ntlm_auth already set up */ - if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD || - conn->ntlm_auth_hlpr_pid) - return CURLE_OK; - - username = userp; - /* The real ntlm_auth really doesn't like being invoked with an - empty username. It won't make inferences for itself, and expects - the client to do so (mostly because it's really designed for - servers like squid to use for auth, and client support is an - afterthought for it). So try hard to provide a suitable username - if we don't already have one. But if we can't, provide the - empty one anyway. Perhaps they have an implementation of the - ntlm_auth helper which *doesn't* need it so we might as well try */ - if(!username || !username[0]) { - username = getenv("NTLMUSER"); - if(!username || !username[0]) - username = getenv("LOGNAME"); - if(!username || !username[0]) - username = getenv("USER"); -#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID) - if((!username || !username[0]) && - !getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) && - pw_res) { - username = pw.pw_name; - } -#endif - if(!username || !username[0]) - username = userp; - } - slash = strpbrk(username, "\\/"); - if(slash) { - domain = strdup(username); - if(!domain) - return CURLE_OUT_OF_MEMORY; - slash = domain + (slash - username); - *slash = '\0'; - username = username + (slash - domain) + 1; - } - - /* For testing purposes, when DEBUGBUILD is defined and environment - variable CURL_NTLM_WB_FILE is set a fake_ntlm is used to perform - NTLM challenge/response which only accepts commands and output - strings pre-written in test case definitions */ -#ifdef DEBUGBUILD - ntlm_auth_alloc = curl_getenv("CURL_NTLM_WB_FILE"); - if(ntlm_auth_alloc) - ntlm_auth = ntlm_auth_alloc; - else -#endif - ntlm_auth = NTLM_WB_FILE; - - if(access(ntlm_auth, X_OK) != 0) { - error = ERRNO; - failf(conn->data, "Could not access ntlm_auth: %s errno %d: %s", - ntlm_auth, error, Curl_strerror(conn, error)); - goto done; - } - - if(socketpair(AF_UNIX, SOCK_STREAM, 0, sockfds)) { - error = ERRNO; - failf(conn->data, "Could not open socket pair. errno %d: %s", - error, Curl_strerror(conn, error)); - goto done; - } - - child_pid = fork(); - if(child_pid == -1) { - error = ERRNO; - sclose(sockfds[0]); - sclose(sockfds[1]); - failf(conn->data, "Could not fork. errno %d: %s", - error, Curl_strerror(conn, error)); - goto done; - } - else if(!child_pid) { - /* - * child process - */ - - /* Don't use sclose in the child since it fools the socket leak detector */ - sclose_nolog(sockfds[0]); - if(dup2(sockfds[1], STDIN_FILENO) == -1) { - error = ERRNO; - failf(conn->data, "Could not redirect child stdin. errno %d: %s", - error, Curl_strerror(conn, error)); - exit(1); - } - - if(dup2(sockfds[1], STDOUT_FILENO) == -1) { - error = ERRNO; - failf(conn->data, "Could not redirect child stdout. errno %d: %s", - error, Curl_strerror(conn, error)); - exit(1); - } - - if(domain) - execl(ntlm_auth, ntlm_auth, - "--helper-protocol", "ntlmssp-client-1", - "--use-cached-creds", - "--username", username, - "--domain", domain, - NULL); - else - execl(ntlm_auth, ntlm_auth, - "--helper-protocol", "ntlmssp-client-1", - "--use-cached-creds", - "--username", username, - NULL); - - error = ERRNO; - sclose_nolog(sockfds[1]); - failf(conn->data, "Could not execl(). errno %d: %s", - error, Curl_strerror(conn, error)); - exit(1); - } - - sclose(sockfds[1]); - conn->ntlm_auth_hlpr_socket = sockfds[0]; - conn->ntlm_auth_hlpr_pid = child_pid; - free(domain); - free(ntlm_auth_alloc); - return CURLE_OK; - -done: - free(domain); - free(ntlm_auth_alloc); - return CURLE_REMOTE_ACCESS_DENIED; -} - -static CURLcode ntlm_wb_response(struct connectdata *conn, - const char *input, curlntlm state) -{ - char *buf = malloc(NTLM_BUFSIZE); - size_t len_in = strlen(input), len_out = 0; - - if(!buf) - return CURLE_OUT_OF_MEMORY; - - while(len_in > 0) { - ssize_t written = swrite(conn->ntlm_auth_hlpr_socket, input, len_in); - if(written == -1) { - /* Interrupted by a signal, retry it */ - if(errno == EINTR) - continue; - /* write failed if other errors happen */ - goto done; - } - input += written; - len_in -= written; - } - /* Read one line */ - while(1) { - ssize_t size; - char *newbuf; - - size = sread(conn->ntlm_auth_hlpr_socket, buf + len_out, NTLM_BUFSIZE); - if(size == -1) { - if(errno == EINTR) - continue; - goto done; - } - else if(size == 0) - goto done; - - len_out += size; - if(buf[len_out - 1] == '\n') { - buf[len_out - 1] = '\0'; - break; - } - newbuf = Curl_saferealloc(buf, len_out + NTLM_BUFSIZE); - if(!newbuf) - return CURLE_OUT_OF_MEMORY; - - buf = newbuf; - } - - /* Samba/winbind installed but not configured */ - if(state == NTLMSTATE_TYPE1 && - len_out == 3 && - buf[0] == 'P' && buf[1] == 'W') - goto done; - /* invalid response */ - if(len_out < 4) - goto done; - if(state == NTLMSTATE_TYPE1 && - (buf[0]!='Y' || buf[1]!='R' || buf[2]!=' ')) - goto done; - if(state == NTLMSTATE_TYPE2 && - (buf[0]!='K' || buf[1]!='K' || buf[2]!=' ') && - (buf[0]!='A' || buf[1]!='F' || buf[2]!=' ')) - goto done; - - conn->response_header = aprintf("NTLM %.*s", len_out - 4, buf + 3); - free(buf); - return CURLE_OK; -done: - free(buf); - return CURLE_REMOTE_ACCESS_DENIED; -} - -/* - * This is for creating ntlm header output by delegating challenge/response - * to Samba's winbind daemon helper ntlm_auth. - */ -CURLcode Curl_output_ntlm_wb(struct connectdata *conn, - bool proxy) -{ - /* point to the address of the pointer that holds the string to send to the - server, which is for a plain host or for a HTTP proxy */ - char **allocuserpwd; - /* point to the name and password for this */ - const char *userp; - /* point to the correct struct with this */ - struct ntlmdata *ntlm; - struct auth *authp; - - CURLcode res = CURLE_OK; - char *input; - - DEBUGASSERT(conn); - DEBUGASSERT(conn->data); - - if(proxy) { - allocuserpwd = &conn->allocptr.proxyuserpwd; - userp = conn->http_proxy.user; - ntlm = &conn->proxyntlm; - authp = &conn->data->state.authproxy; - } - else { - allocuserpwd = &conn->allocptr.userpwd; - userp = conn->user; - ntlm = &conn->ntlm; - authp = &conn->data->state.authhost; - } - authp->done = FALSE; - - /* not set means empty */ - if(!userp) - userp=""; - - switch(ntlm->state) { - case NTLMSTATE_TYPE1: - default: - /* Use Samba's 'winbind' daemon to support NTLM authentication, - * by delegating the NTLM challenge/response protocal to a helper - * in ntlm_auth. - * http://devel.squid-cache.org/ntlm/squid_helper_protocol.html - * https://www.samba.org/samba/docs/man/manpages-3/winbindd.8.html - * https://www.samba.org/samba/docs/man/manpages-3/ntlm_auth.1.html - * Preprocessor symbol 'NTLM_WB_ENABLED' is defined when this - * feature is enabled and 'NTLM_WB_FILE' symbol holds absolute - * filename of ntlm_auth helper. - * If NTLM authentication using winbind fails, go back to original - * request handling process. - */ - /* Create communication with ntlm_auth */ - res = ntlm_wb_init(conn, userp); - if(res) - return res; - res = ntlm_wb_response(conn, "YR\n", ntlm->state); - if(res) - return res; - - free(*allocuserpwd); - *allocuserpwd = aprintf("%sAuthorization: %s\r\n", - proxy ? "Proxy-" : "", - conn->response_header); - DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd)); - free(conn->response_header); - conn->response_header = NULL; - break; - case NTLMSTATE_TYPE2: - input = aprintf("TT %s\n", conn->challenge_header); - if(!input) - return CURLE_OUT_OF_MEMORY; - res = ntlm_wb_response(conn, input, ntlm->state); - free(input); - input = NULL; - if(res) - return res; - - free(*allocuserpwd); - *allocuserpwd = aprintf("%sAuthorization: %s\r\n", - proxy ? "Proxy-" : "", - conn->response_header); - DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd)); - ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */ - authp->done = TRUE; - Curl_ntlm_wb_cleanup(conn); - break; - case NTLMSTATE_TYPE3: - /* connection is already authenticated, - * don't send a header in future requests */ - free(*allocuserpwd); - *allocuserpwd=NULL; - authp->done = TRUE; - break; - } - - return CURLE_OK; -} - -#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.h b/build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.h deleted file mode 100644 index aba3d469c3..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_ntlm_wb.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef HEADER_CURL_NTLM_WB_H -#define HEADER_CURL_NTLM_WB_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) - -/* this is for creating ntlm header output by delegating challenge/response - to Samba's winbind daemon helper ntlm_auth */ -CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy); - -void Curl_ntlm_wb_cleanup(struct connectdata *conn); - -#endif /* !CURL_DISABLE_HTTP && USE_NTLM && NTLM_WB_ENABLED */ - -#endif /* HEADER_CURL_NTLM_WB_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_printf.h b/build/premake/premake5/contrib/curl/lib/curl_printf.h deleted file mode 100644 index 49857cdb0d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_printf.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef HEADER_CURL_PRINTF_H -#define HEADER_CURL_PRINTF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * This header should be included by ALL code in libcurl that uses any - * *rintf() functions. - */ - -#include - -# undef printf -# undef fprintf -# undef snprintf -# undef vprintf -# undef vfprintf -# undef vsnprintf -# undef aprintf -# undef vaprintf -# define printf curl_mprintf -# define fprintf curl_mfprintf -# define snprintf curl_msnprintf -# define vprintf curl_mvprintf -# define vfprintf curl_mvfprintf -# define vsnprintf curl_mvsnprintf -# define aprintf curl_maprintf -# define vaprintf curl_mvaprintf - -/* We define away the sprintf functions unconditonally since we don't want - internal code to be using them, intentionally or by mistake!*/ -# undef sprintf -# undef vsprintf -# define sprintf sprintf_was_used -# define vsprintf vsprintf_was_used - -#endif /* HEADER_CURL_PRINTF_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_rtmp.c b/build/premake/premake5/contrib/curl/lib/curl_rtmp.c deleted file mode 100644 index 06dd047a40..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_rtmp.c +++ /dev/null @@ -1,306 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2015, Daniel Stenberg, , et al. - * Copyright (C) 2010, Howard Chu, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_LIBRTMP - -#include "urldata.h" -#include "nonblock.h" /* for curlx_nonblock */ -#include "progress.h" /* for Curl_pgrsSetUploadSize */ -#include "transfer.h" -#include "warnless.h" -#include -#include -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -#ifdef _WIN32 -#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) -#define SET_RCVTIMEO(tv,s) int tv = s*1000 -#else -#define SET_RCVTIMEO(tv,s) struct timeval tv = {s,0} -#endif - -#define DEF_BUFTIME (2*60*60*1000) /* 2 hours */ - -static CURLcode rtmp_setup_connection(struct connectdata *conn); -static CURLcode rtmp_do(struct connectdata *conn, bool *done); -static CURLcode rtmp_done(struct connectdata *conn, CURLcode, bool premature); -static CURLcode rtmp_connect(struct connectdata *conn, bool *done); -static CURLcode rtmp_disconnect(struct connectdata *conn, bool dead); - -static Curl_recv rtmp_recv; -static Curl_send rtmp_send; - -/* - * RTMP protocol handler.h, based on https://rtmpdump.mplayerhq.hu - */ - -const struct Curl_handler Curl_handler_rtmp = { - "RTMP", /* scheme */ - rtmp_setup_connection, /* setup_connection */ - rtmp_do, /* do_it */ - rtmp_done, /* done */ - ZERO_NULL, /* do_more */ - rtmp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtmp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_RTMP, /* defport */ - CURLPROTO_RTMP, /* protocol */ - PROTOPT_NONE /* flags*/ -}; - -const struct Curl_handler Curl_handler_rtmpt = { - "RTMPT", /* scheme */ - rtmp_setup_connection, /* setup_connection */ - rtmp_do, /* do_it */ - rtmp_done, /* done */ - ZERO_NULL, /* do_more */ - rtmp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtmp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_RTMPT, /* defport */ - CURLPROTO_RTMPT, /* protocol */ - PROTOPT_NONE /* flags*/ -}; - -const struct Curl_handler Curl_handler_rtmpe = { - "RTMPE", /* scheme */ - rtmp_setup_connection, /* setup_connection */ - rtmp_do, /* do_it */ - rtmp_done, /* done */ - ZERO_NULL, /* do_more */ - rtmp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtmp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_RTMP, /* defport */ - CURLPROTO_RTMPE, /* protocol */ - PROTOPT_NONE /* flags*/ -}; - -const struct Curl_handler Curl_handler_rtmpte = { - "RTMPTE", /* scheme */ - rtmp_setup_connection, /* setup_connection */ - rtmp_do, /* do_it */ - rtmp_done, /* done */ - ZERO_NULL, /* do_more */ - rtmp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtmp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_RTMPT, /* defport */ - CURLPROTO_RTMPTE, /* protocol */ - PROTOPT_NONE /* flags*/ -}; - -const struct Curl_handler Curl_handler_rtmps = { - "RTMPS", /* scheme */ - rtmp_setup_connection, /* setup_connection */ - rtmp_do, /* do_it */ - rtmp_done, /* done */ - ZERO_NULL, /* do_more */ - rtmp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtmp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_RTMPS, /* defport */ - CURLPROTO_RTMPS, /* protocol */ - PROTOPT_NONE /* flags*/ -}; - -const struct Curl_handler Curl_handler_rtmpts = { - "RTMPTS", /* scheme */ - rtmp_setup_connection, /* setup_connection */ - rtmp_do, /* do_it */ - rtmp_done, /* done */ - ZERO_NULL, /* do_more */ - rtmp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtmp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_RTMPS, /* defport */ - CURLPROTO_RTMPTS, /* protocol */ - PROTOPT_NONE /* flags*/ -}; - -static CURLcode rtmp_setup_connection(struct connectdata *conn) -{ - RTMP *r = RTMP_Alloc(); - if(!r) - return CURLE_OUT_OF_MEMORY; - - RTMP_Init(r); - RTMP_SetBufferMS(r, DEF_BUFTIME); - if(!RTMP_SetupURL(r, conn->data->change.url)) { - RTMP_Free(r); - return CURLE_URL_MALFORMAT; - } - conn->proto.generic = r; - return CURLE_OK; -} - -static CURLcode rtmp_connect(struct connectdata *conn, bool *done) -{ - RTMP *r = conn->proto.generic; - SET_RCVTIMEO(tv, 10); - - r->m_sb.sb_socket = conn->sock[FIRSTSOCKET]; - - /* We have to know if it's a write before we send the - * connect request packet - */ - if(conn->data->set.upload) - r->Link.protocol |= RTMP_FEATURE_WRITE; - - /* For plain streams, use the buffer toggle trick to keep data flowing */ - if(!(r->Link.lFlags & RTMP_LF_LIVE) && - !(r->Link.protocol & RTMP_FEATURE_HTTP)) - r->Link.lFlags |= RTMP_LF_BUFX; - - (void)curlx_nonblock(r->m_sb.sb_socket, FALSE); - setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO, - (char *)&tv, sizeof(tv)); - - if(!RTMP_Connect1(r, NULL)) - return CURLE_FAILED_INIT; - - /* Clients must send a periodic BytesReceived report to the server */ - r->m_bSendCounter = true; - - *done = TRUE; - conn->recv[FIRSTSOCKET] = rtmp_recv; - conn->send[FIRSTSOCKET] = rtmp_send; - return CURLE_OK; -} - -static CURLcode rtmp_do(struct connectdata *conn, bool *done) -{ - RTMP *r = conn->proto.generic; - - if(!RTMP_ConnectStream(r, 0)) - return CURLE_FAILED_INIT; - - if(conn->data->set.upload) { - Curl_pgrsSetUploadSize(conn->data, conn->data->state.infilesize); - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL); - } - else - Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL); - *done = TRUE; - return CURLE_OK; -} - -static CURLcode rtmp_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - (void)conn; /* unused */ - (void)status; /* unused */ - (void)premature; /* unused */ - - return CURLE_OK; -} - -static CURLcode rtmp_disconnect(struct connectdata *conn, - bool dead_connection) -{ - RTMP *r = conn->proto.generic; - (void)dead_connection; - if(r) { - conn->proto.generic = NULL; - RTMP_Close(r); - RTMP_Free(r); - } - return CURLE_OK; -} - -static ssize_t rtmp_recv(struct connectdata *conn, int sockindex, char *buf, - size_t len, CURLcode *err) -{ - RTMP *r = conn->proto.generic; - ssize_t nread; - - (void)sockindex; /* unused */ - - nread = RTMP_Read(r, buf, curlx_uztosi(len)); - if(nread < 0) { - if(r->m_read.status == RTMP_READ_COMPLETE || - r->m_read.status == RTMP_READ_EOF) { - conn->data->req.size = conn->data->req.bytecount; - nread = 0; - } - else - *err = CURLE_RECV_ERROR; - } - return nread; -} - -static ssize_t rtmp_send(struct connectdata *conn, int sockindex, - const void *buf, size_t len, CURLcode *err) -{ - RTMP *r = conn->proto.generic; - ssize_t num; - - (void)sockindex; /* unused */ - - num = RTMP_Write(r, (char *)buf, curlx_uztosi(len)); - if(num < 0) - *err = CURLE_SEND_ERROR; - - return num; -} -#endif /* USE_LIBRTMP */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_rtmp.h b/build/premake/premake5/contrib/curl/lib/curl_rtmp.h deleted file mode 100644 index 3306e22005..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_rtmp.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HEADER_CURL_RTMP_H -#define HEADER_CURL_RTMP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010, Howard Chu, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifdef USE_LIBRTMP -extern const struct Curl_handler Curl_handler_rtmp; -extern const struct Curl_handler Curl_handler_rtmpt; -extern const struct Curl_handler Curl_handler_rtmpe; -extern const struct Curl_handler Curl_handler_rtmpte; -extern const struct Curl_handler Curl_handler_rtmps; -extern const struct Curl_handler Curl_handler_rtmpts; -#endif - -#endif /* HEADER_CURL_RTMP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_sasl.c b/build/premake/premake5/contrib/curl/lib/curl_sasl.c deleted file mode 100644 index 807f5de7e8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_sasl.c +++ /dev/null @@ -1,623 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC2195 CRAM-MD5 authentication - * RFC2617 Basic and Digest Access Authentication - * RFC2831 DIGEST-MD5 authentication - * RFC4422 Simple Authentication and Security Layer (SASL) - * RFC4616 PLAIN authentication - * RFC6749 OAuth 2.0 Authorization Framework - * RFC7628 A Set of SASL Mechanisms for OAuth - * Draft LOGIN SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "urldata.h" - -#include "curl_base64.h" -#include "curl_md5.h" -#include "vauth/vauth.h" -#include "vtls/vtls.h" -#include "curl_hmac.h" -#include "curl_sasl.h" -#include "warnless.h" -#include "strtok.h" -#include "sendf.h" -#include "non-ascii.h" /* included for Curl_convert_... prototypes */ -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Supported mechanisms */ -const struct { - const char *name; /* Name */ - size_t len; /* Name length */ - unsigned int bit; /* Flag bit */ -} mechtable[] = { - { "LOGIN", 5, SASL_MECH_LOGIN }, - { "PLAIN", 5, SASL_MECH_PLAIN }, - { "CRAM-MD5", 8, SASL_MECH_CRAM_MD5 }, - { "DIGEST-MD5", 10, SASL_MECH_DIGEST_MD5 }, - { "GSSAPI", 6, SASL_MECH_GSSAPI }, - { "EXTERNAL", 8, SASL_MECH_EXTERNAL }, - { "NTLM", 4, SASL_MECH_NTLM }, - { "XOAUTH2", 7, SASL_MECH_XOAUTH2 }, - { "OAUTHBEARER", 11, SASL_MECH_OAUTHBEARER }, - { ZERO_NULL, 0, 0 } -}; - -/* - * Curl_sasl_cleanup() - * - * This is used to cleanup any libraries or curl modules used by the sasl - * functions. - * - * Parameters: - * - * conn [in] - The connection data. - * authused [in] - The authentication mechanism used. - */ -void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused) -{ -#if defined(USE_KERBEROS5) - /* Cleanup the gssapi structure */ - if(authused == SASL_MECH_GSSAPI) { - Curl_auth_gssapi_cleanup(&conn->krb5); - } -#endif - -#if defined(USE_NTLM) - /* Cleanup the NTLM structure */ - if(authused == SASL_MECH_NTLM) { - Curl_auth_ntlm_cleanup(&conn->ntlm); - } -#endif - -#if !defined(USE_KERBEROS5) && !defined(USE_NTLM) - /* Reserved for future use */ - (void)conn; - (void)authused; -#endif -} - -/* - * Curl_sasl_decode_mech() - * - * Convert a SASL mechanism name into a token. - * - * Parameters: - * - * ptr [in] - The mechanism string. - * maxlen [in] - Maximum mechanism string length. - * len [out] - If not NULL, effective name length. - * - * Returns the SASL mechanism token or 0 if no match. - */ -unsigned int Curl_sasl_decode_mech(const char *ptr, size_t maxlen, size_t *len) -{ - unsigned int i; - char c; - - for(i = 0; mechtable[i].name; i++) { - if(maxlen >= mechtable[i].len && - !memcmp(ptr, mechtable[i].name, mechtable[i].len)) { - if(len) - *len = mechtable[i].len; - - if(maxlen == mechtable[i].len) - return mechtable[i].bit; - - c = ptr[mechtable[i].len]; - if(!ISUPPER(c) && !ISDIGIT(c) && c != '-' && c != '_') - return mechtable[i].bit; - } - } - - return 0; -} - -/* - * Curl_sasl_parse_url_auth_option() - * - * Parse the URL login options. - */ -CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl, - const char *value, size_t len) -{ - CURLcode result = CURLE_OK; - unsigned int mechbit; - size_t mechlen; - - if(!len) - return CURLE_URL_MALFORMAT; - - if(sasl->resetprefs) { - sasl->resetprefs = FALSE; - sasl->prefmech = SASL_AUTH_NONE; - } - - if(!strncmp(value, "*", len)) - sasl->prefmech = SASL_AUTH_DEFAULT; - else { - mechbit = Curl_sasl_decode_mech(value, len, &mechlen); - if(mechbit && mechlen == len) - sasl->prefmech |= mechbit; - else - result = CURLE_URL_MALFORMAT; - } - - return result; -} - -/* - * Curl_sasl_init() - * - * Initializes the SASL structure. - */ -void Curl_sasl_init(struct SASL *sasl, const struct SASLproto *params) -{ - sasl->params = params; /* Set protocol dependent parameters */ - sasl->state = SASL_STOP; /* Not yet running */ - sasl->authmechs = SASL_AUTH_NONE; /* No known authentication mechanism yet */ - sasl->prefmech = SASL_AUTH_DEFAULT; /* Prefer all mechanisms */ - sasl->authused = SASL_AUTH_NONE; /* No the authentication mechanism used */ - sasl->resetprefs = TRUE; /* Reset prefmech upon AUTH parsing. */ - sasl->mutual_auth = FALSE; /* No mutual authentication (GSSAPI only) */ - sasl->force_ir = FALSE; /* Respect external option */ -} - -/* - * state() - * - * This is the ONLY way to change SASL state! - */ -static void state(struct SASL *sasl, struct connectdata *conn, - saslstate newstate) -{ -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* for debug purposes */ - static const char * const names[]={ - "STOP", - "PLAIN", - "LOGIN", - "LOGIN_PASSWD", - "EXTERNAL", - "CRAMMD5", - "DIGESTMD5", - "DIGESTMD5_RESP", - "NTLM", - "NTLM_TYPE2MSG", - "GSSAPI", - "GSSAPI_TOKEN", - "GSSAPI_NO_DATA", - "OAUTH2", - "OAUTH2_RESP", - "CANCEL", - "FINAL", - /* LAST */ - }; - - if(sasl->state != newstate) - infof(conn->data, "SASL %p state change from %s to %s\n", - (void *)sasl, names[sasl->state], names[newstate]); -#else - (void) conn; -#endif - - sasl->state = newstate; -} - -/* - * Curl_sasl_can_authenticate() - * - * Check if we have enough auth data and capabilities to authenticate. - */ -bool Curl_sasl_can_authenticate(struct SASL *sasl, struct connectdata *conn) -{ - /* Have credentials been provided? */ - if(conn->bits.user_passwd) - return TRUE; - - /* EXTERNAL can authenticate without a user name and/or password */ - if(sasl->authmechs & sasl->prefmech & SASL_MECH_EXTERNAL) - return TRUE; - - return FALSE; -} - -/* - * Curl_sasl_start() - * - * Calculate the required login details for SASL authentication. - */ -CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, - bool force_ir, saslprogress *progress) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - unsigned int enabledmechs; - const char *mech = NULL; - char *resp = NULL; - size_t len = 0; - saslstate state1 = SASL_STOP; - saslstate state2 = SASL_FINAL; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; -#if defined(USE_KERBEROS5) - const char *service = data->set.str[STRING_SERVICE_NAME] ? - data->set.str[STRING_SERVICE_NAME] : - sasl->params->service; -#endif - - sasl->force_ir = force_ir; /* Latch for future use */ - sasl->authused = 0; /* No mechanism used yet */ - enabledmechs = sasl->authmechs & sasl->prefmech; - *progress = SASL_IDLE; - - /* Calculate the supported authentication mechanism, by decreasing order of - security, as well as the initial response where appropriate */ - if((enabledmechs & SASL_MECH_EXTERNAL) && !conn->passwd[0]) { - mech = SASL_MECH_STRING_EXTERNAL; - state1 = SASL_EXTERNAL; - sasl->authused = SASL_MECH_EXTERNAL; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_external_message(data, conn->user, &resp, - &len); - } - else if(conn->bits.user_passwd) { -#if defined(USE_KERBEROS5) - if((enabledmechs & SASL_MECH_GSSAPI) && Curl_auth_is_gssapi_supported() && - Curl_auth_user_contains_domain(conn->user)) { - sasl->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ - mech = SASL_MECH_STRING_GSSAPI; - state1 = SASL_GSSAPI; - state2 = SASL_GSSAPI_TOKEN; - sasl->authused = SASL_MECH_GSSAPI; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_gssapi_user_message(data, conn->user, - conn->passwd, - service, - data->easy_conn-> - host.name, - sasl->mutual_auth, - NULL, &conn->krb5, - &resp, &len); - } - else -#endif -#ifndef CURL_DISABLE_CRYPTO_AUTH - if((enabledmechs & SASL_MECH_DIGEST_MD5) && - Curl_auth_is_digest_supported()) { - mech = SASL_MECH_STRING_DIGEST_MD5; - state1 = SASL_DIGESTMD5; - sasl->authused = SASL_MECH_DIGEST_MD5; - } - else if(enabledmechs & SASL_MECH_CRAM_MD5) { - mech = SASL_MECH_STRING_CRAM_MD5; - state1 = SASL_CRAMMD5; - sasl->authused = SASL_MECH_CRAM_MD5; - } - else -#endif -#ifdef USE_NTLM - if((enabledmechs & SASL_MECH_NTLM) && Curl_auth_is_ntlm_supported()) { - mech = SASL_MECH_STRING_NTLM; - state1 = SASL_NTLM; - state2 = SASL_NTLM_TYPE2MSG; - sasl->authused = SASL_MECH_NTLM; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_ntlm_type1_message(conn->user, conn->passwd, - &conn->ntlm, &resp, &len); - } - else -#endif - if((enabledmechs & SASL_MECH_OAUTHBEARER) && conn->oauth_bearer) { - mech = SASL_MECH_STRING_OAUTHBEARER; - state1 = SASL_OAUTH2; - state2 = SASL_OAUTH2_RESP; - sasl->authused = SASL_MECH_OAUTHBEARER; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_oauth_bearer_message(data, conn->user, - hostname, - port, - conn->oauth_bearer, - &resp, &len); - } - else if((enabledmechs & SASL_MECH_XOAUTH2) && conn->oauth_bearer) { - mech = SASL_MECH_STRING_XOAUTH2; - state1 = SASL_OAUTH2; - sasl->authused = SASL_MECH_XOAUTH2; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_oauth_bearer_message(data, conn->user, - NULL, 0, - conn->oauth_bearer, - &resp, &len); - } - else if(enabledmechs & SASL_MECH_LOGIN) { - mech = SASL_MECH_STRING_LOGIN; - state1 = SASL_LOGIN; - state2 = SASL_LOGIN_PASSWD; - sasl->authused = SASL_MECH_LOGIN; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_login_message(data, conn->user, &resp, &len); - } - else if(enabledmechs & SASL_MECH_PLAIN) { - mech = SASL_MECH_STRING_PLAIN; - state1 = SASL_PLAIN; - sasl->authused = SASL_MECH_PLAIN; - - if(force_ir || data->set.sasl_ir) - result = Curl_auth_create_plain_message(data, conn->user, conn->passwd, - &resp, &len); - } - } - - if(!result && mech) { - if(resp && sasl->params->maxirlen && - strlen(mech) + len > sasl->params->maxirlen) { - free(resp); - resp = NULL; - } - - result = sasl->params->sendauth(conn, mech, resp); - if(!result) { - *progress = SASL_INPROGRESS; - state(sasl, conn, resp ? state2 : state1); - } - } - - free(resp); - - return result; -} - -/* - * Curl_sasl_continue() - * - * Continue the authentication. - */ -CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, - int code, saslprogress *progress) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - saslstate newstate = SASL_FINAL; - char *resp = NULL; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; -#if !defined(CURL_DISABLE_CRYPTO_AUTH) - char *serverdata; - char *chlg = NULL; - size_t chlglen = 0; -#endif -#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) - const char *service = data->set.str[STRING_SERVICE_NAME] ? - data->set.str[STRING_SERVICE_NAME] : - sasl->params->service; -#endif - size_t len = 0; - - *progress = SASL_INPROGRESS; - - if(sasl->state == SASL_FINAL) { - if(code != sasl->params->finalcode) - result = CURLE_LOGIN_DENIED; - *progress = SASL_DONE; - state(sasl, conn, SASL_STOP); - return result; - } - - if(sasl->state != SASL_CANCEL && sasl->state != SASL_OAUTH2_RESP && - code != sasl->params->contcode) { - *progress = SASL_DONE; - state(sasl, conn, SASL_STOP); - return CURLE_LOGIN_DENIED; - } - - switch(sasl->state) { - case SASL_STOP: - *progress = SASL_DONE; - return result; - case SASL_PLAIN: - result = Curl_auth_create_plain_message(data, conn->user, conn->passwd, - &resp, - &len); - break; - case SASL_LOGIN: - result = Curl_auth_create_login_message(data, conn->user, &resp, &len); - newstate = SASL_LOGIN_PASSWD; - break; - case SASL_LOGIN_PASSWD: - result = Curl_auth_create_login_message(data, conn->passwd, &resp, &len); - break; - case SASL_EXTERNAL: - result = Curl_auth_create_external_message(data, conn->user, &resp, &len); - break; - -#ifndef CURL_DISABLE_CRYPTO_AUTH - case SASL_CRAMMD5: - sasl->params->getmessage(data->state.buffer, &serverdata); - result = Curl_auth_decode_cram_md5_message(serverdata, &chlg, &chlglen); - if(!result) - result = Curl_auth_create_cram_md5_message(data, chlg, conn->user, - conn->passwd, &resp, &len); - free(chlg); - break; - case SASL_DIGESTMD5: - sasl->params->getmessage(data->state.buffer, &serverdata); - result = Curl_auth_create_digest_md5_message(data, serverdata, - conn->user, conn->passwd, - service, - &resp, &len); - newstate = SASL_DIGESTMD5_RESP; - break; - case SASL_DIGESTMD5_RESP: - resp = strdup(""); - if(!resp) - result = CURLE_OUT_OF_MEMORY; - break; -#endif - -#ifdef USE_NTLM - case SASL_NTLM: - /* Create the type-1 message */ - result = Curl_auth_create_ntlm_type1_message(conn->user, conn->passwd, - &conn->ntlm, &resp, &len); - newstate = SASL_NTLM_TYPE2MSG; - break; - case SASL_NTLM_TYPE2MSG: - /* Decode the type-2 message */ - sasl->params->getmessage(data->state.buffer, &serverdata); - result = Curl_auth_decode_ntlm_type2_message(data, serverdata, - &conn->ntlm); - if(!result) - result = Curl_auth_create_ntlm_type3_message(data, conn->user, - conn->passwd, &conn->ntlm, - &resp, &len); - break; -#endif - -#if defined(USE_KERBEROS5) - case SASL_GSSAPI: - result = Curl_auth_create_gssapi_user_message(data, conn->user, - conn->passwd, - service, - data->easy_conn->host.name, - sasl->mutual_auth, NULL, - &conn->krb5, - &resp, &len); - newstate = SASL_GSSAPI_TOKEN; - break; - case SASL_GSSAPI_TOKEN: - sasl->params->getmessage(data->state.buffer, &serverdata); - if(sasl->mutual_auth) { - /* Decode the user token challenge and create the optional response - message */ - result = Curl_auth_create_gssapi_user_message(data, NULL, NULL, - NULL, NULL, - sasl->mutual_auth, - serverdata, &conn->krb5, - &resp, &len); - newstate = SASL_GSSAPI_NO_DATA; - } - else - /* Decode the security challenge and create the response message */ - result = Curl_auth_create_gssapi_security_message(data, serverdata, - &conn->krb5, - &resp, &len); - break; - case SASL_GSSAPI_NO_DATA: - sasl->params->getmessage(data->state.buffer, &serverdata); - /* Decode the security challenge and create the response message */ - result = Curl_auth_create_gssapi_security_message(data, serverdata, - &conn->krb5, - &resp, &len); - break; -#endif - - case SASL_OAUTH2: - /* Create the authorisation message */ - if(sasl->authused == SASL_MECH_OAUTHBEARER) { - result = Curl_auth_create_oauth_bearer_message(data, conn->user, - hostname, - port, - conn->oauth_bearer, - &resp, &len); - - /* Failures maybe sent by the server as continuations for OAUTHBEARER */ - newstate = SASL_OAUTH2_RESP; - } - else - result = Curl_auth_create_oauth_bearer_message(data, conn->user, - NULL, 0, - conn->oauth_bearer, - &resp, &len); - break; - - case SASL_OAUTH2_RESP: - /* The continuation is optional so check the response code */ - if(code == sasl->params->finalcode) { - /* Final response was received so we are done */ - *progress = SASL_DONE; - state(sasl, conn, SASL_STOP); - return result; - } - else if(code == sasl->params->contcode) { - /* Acknowledge the continuation by sending a 0x01 response base64 - encoded */ - resp = strdup("AQ=="); - if(!resp) - result = CURLE_OUT_OF_MEMORY; - break; - } - else { - *progress = SASL_DONE; - state(sasl, conn, SASL_STOP); - return CURLE_LOGIN_DENIED; - } - - case SASL_CANCEL: - /* Remove the offending mechanism from the supported list */ - sasl->authmechs ^= sasl->authused; - - /* Start an alternative SASL authentication */ - result = Curl_sasl_start(sasl, conn, sasl->force_ir, progress); - newstate = sasl->state; /* Use state from Curl_sasl_start() */ - break; - default: - failf(data, "Unsupported SASL authentication mechanism"); - result = CURLE_UNSUPPORTED_PROTOCOL; /* Should not happen */ - break; - } - - switch(result) { - case CURLE_BAD_CONTENT_ENCODING: - /* Cancel dialog */ - result = sasl->params->sendcont(conn, "*"); - newstate = SASL_CANCEL; - break; - case CURLE_OK: - if(resp) - result = sasl->params->sendcont(conn, resp); - break; - default: - newstate = SASL_STOP; /* Stop on error */ - *progress = SASL_DONE; - break; - } - - free(resp); - - state(sasl, conn, newstate); - - return result; -} diff --git a/build/premake/premake5/contrib/curl/lib/curl_sasl.h b/build/premake/premake5/contrib/curl/lib/curl_sasl.h deleted file mode 100644 index 7647a48be4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_sasl.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef HEADER_CURL_SASL_H -#define HEADER_CURL_SASL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -struct Curl_easy; -struct connectdata; - -/* Authentication mechanism flags */ -#define SASL_MECH_LOGIN (1 << 0) -#define SASL_MECH_PLAIN (1 << 1) -#define SASL_MECH_CRAM_MD5 (1 << 2) -#define SASL_MECH_DIGEST_MD5 (1 << 3) -#define SASL_MECH_GSSAPI (1 << 4) -#define SASL_MECH_EXTERNAL (1 << 5) -#define SASL_MECH_NTLM (1 << 6) -#define SASL_MECH_XOAUTH2 (1 << 7) -#define SASL_MECH_OAUTHBEARER (1 << 8) - -/* Authentication mechanism values */ -#define SASL_AUTH_NONE 0 -#define SASL_AUTH_ANY ~0U -#define SASL_AUTH_DEFAULT (SASL_AUTH_ANY & ~SASL_MECH_EXTERNAL) - -/* Authentication mechanism strings */ -#define SASL_MECH_STRING_LOGIN "LOGIN" -#define SASL_MECH_STRING_PLAIN "PLAIN" -#define SASL_MECH_STRING_CRAM_MD5 "CRAM-MD5" -#define SASL_MECH_STRING_DIGEST_MD5 "DIGEST-MD5" -#define SASL_MECH_STRING_GSSAPI "GSSAPI" -#define SASL_MECH_STRING_EXTERNAL "EXTERNAL" -#define SASL_MECH_STRING_NTLM "NTLM" -#define SASL_MECH_STRING_XOAUTH2 "XOAUTH2" -#define SASL_MECH_STRING_OAUTHBEARER "OAUTHBEARER" - -/* SASL machine states */ -typedef enum { - SASL_STOP, - SASL_PLAIN, - SASL_LOGIN, - SASL_LOGIN_PASSWD, - SASL_EXTERNAL, - SASL_CRAMMD5, - SASL_DIGESTMD5, - SASL_DIGESTMD5_RESP, - SASL_NTLM, - SASL_NTLM_TYPE2MSG, - SASL_GSSAPI, - SASL_GSSAPI_TOKEN, - SASL_GSSAPI_NO_DATA, - SASL_OAUTH2, - SASL_OAUTH2_RESP, - SASL_CANCEL, - SASL_FINAL -} saslstate; - -/* Progress indicator */ -typedef enum { - SASL_IDLE, - SASL_INPROGRESS, - SASL_DONE -} saslprogress; - -/* Protocol dependent SASL parameters */ -struct SASLproto { - const char *service; /* The service name */ - int contcode; /* Code to receive when continuation is expected */ - int finalcode; /* Code to receive upon authentication success */ - size_t maxirlen; /* Maximum initial response length */ - CURLcode (*sendauth)(struct connectdata *conn, - const char *mech, const char *ir); - /* Send authentication command */ - CURLcode (*sendcont)(struct connectdata *conn, const char *contauth); - /* Send authentication continuation */ - void (*getmessage)(char *buffer, char **outptr); - /* Get SASL response message */ -}; - -/* Per-connection parameters */ -struct SASL { - const struct SASLproto *params; /* Protocol dependent parameters */ - saslstate state; /* Current machine state */ - unsigned int authmechs; /* Accepted authentication mechanisms */ - unsigned int prefmech; /* Preferred authentication mechanism */ - unsigned int authused; /* Auth mechanism used for the connection */ - bool resetprefs; /* For URL auth option parsing. */ - bool mutual_auth; /* Mutual authentication enabled (GSSAPI only) */ - bool force_ir; /* Protocol always supports initial response */ -}; - -/* This is used to test whether the line starts with the given mechanism */ -#define sasl_mech_equal(line, wordlen, mech) \ - (wordlen == (sizeof(mech) - 1) / sizeof(char) && \ - !memcmp(line, mech, wordlen)) - -/* This is used to cleanup any libraries or curl modules used by the sasl - functions */ -void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused); - -/* Convert a mechanism name to a token */ -unsigned int Curl_sasl_decode_mech(const char *ptr, - size_t maxlen, size_t *len); - -/* Parse the URL login options */ -CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl, - const char *value, size_t len); - -/* Initializes an SASL structure */ -void Curl_sasl_init(struct SASL *sasl, const struct SASLproto *params); - -/* Check if we have enough auth data and capabilities to authenticate */ -bool Curl_sasl_can_authenticate(struct SASL *sasl, struct connectdata *conn); - -/* Calculate the required login details for SASL authentication */ -CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, - bool force_ir, saslprogress *progress); - -/* Continue an SASL authentication */ -CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, - int code, saslprogress *progress); - -#endif /* HEADER_CURL_SASL_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_sec.h b/build/premake/premake5/contrib/curl/lib/curl_sec.h deleted file mode 100644 index 7bdde269b1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_sec.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef HEADER_CURL_SECURITY_H -#define HEADER_CURL_SECURITY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -struct Curl_sec_client_mech { - const char *name; - size_t size; - int (*init)(void *); - int (*auth)(void *, struct connectdata *); - void (*end)(void *); - int (*check_prot)(void *, int); - int (*overhead)(void *, int, int); - int (*encode)(void *, const void *, int, int, void **); - int (*decode)(void *, void *, int, int, struct connectdata *); -}; - -#define AUTH_OK 0 -#define AUTH_CONTINUE 1 -#define AUTH_ERROR 2 - -#ifdef HAVE_GSSAPI -int Curl_sec_read_msg(struct connectdata *conn, char *, - enum protection_level); -void Curl_sec_end(struct connectdata *); -CURLcode Curl_sec_login(struct connectdata *); -int Curl_sec_request_prot(struct connectdata *conn, const char *level); - -extern struct Curl_sec_client_mech Curl_krb5_client_mech; -#endif - -#endif /* HEADER_CURL_SECURITY_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_setup.h b/build/premake/premake5/contrib/curl/lib/curl_setup.h deleted file mode 100644 index 5b20ad7806..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_setup.h +++ /dev/null @@ -1,782 +0,0 @@ -#ifndef HEADER_CURL_SETUP_H -#define HEADER_CURL_SETUP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Define WIN32 when build target is Win32 API - */ - -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \ - !defined(__SYMBIAN32__) -#define WIN32 -#endif - -/* - * Include configuration script results or hand-crafted - * configuration file for platforms which lack config tool. - */ - -#ifdef HAVE_CONFIG_H - -#include "curl_config.h" - -#else /* HAVE_CONFIG_H */ - -#ifdef _WIN32_WCE -# include "config-win32ce.h" -#else -# ifdef WIN32 -# include "config-win32.h" -# endif -#endif - -#if defined(macintosh) && defined(__MRC__) -# include "config-mac.h" -#endif - -#ifdef __riscos__ -# include "config-riscos.h" -#endif - -#ifdef __AMIGA__ -# include "config-amigaos.h" -#endif - -#ifdef __SYMBIAN32__ -# include "config-symbian.h" -#endif - -#ifdef __OS400__ -# include "config-os400.h" -#endif - -#ifdef TPF -# include "config-tpf.h" -#endif - -#ifdef __VXWORKS__ -# include "config-vxworks.h" -#endif - -#ifdef __linux__ -# include "config-linux.h" -#endif - -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -# include "config-linux.h" -#endif - -#if defined(__sun__) && defined(__svr4__) || defined(__HAIKU__) -# include "config-linux.h" -# undef HAVE_IOCTL_SIOCGIFADDR -#endif - -#ifdef __APPLE__ && __MACH__ -# include "config-osx.h" -#endif - -#endif /* HAVE_CONFIG_H */ - -/* ================================================================ */ -/* Definition of preprocessor macros/symbols which modify compiler */ -/* behavior or generated code characteristics must be done here, */ -/* as appropriate, before any system header file is included. It is */ -/* also possible to have them defined in the config file included */ -/* before this point. As a result of all this we frown inclusion of */ -/* system header files in our config files, avoid this at any cost. */ -/* ================================================================ */ - -/* - * AIX 4.3 and newer needs _THREAD_SAFE defined to build - * proper reentrant code. Others may also need it. - */ - -#ifdef NEED_THREAD_SAFE -# ifndef _THREAD_SAFE -# define _THREAD_SAFE -# endif -#endif - -/* - * Tru64 needs _REENTRANT set for a few function prototypes and - * things to appear in the system header files. Unixware needs it - * to build proper reentrant code. Others may also need it. - */ - -#ifdef NEED_REENTRANT -# ifndef _REENTRANT -# define _REENTRANT -# endif -#endif - -/* Solaris needs this to get a POSIX-conformant getpwuid_r */ -#if defined(sun) || defined(__sun) -# ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -# endif -#endif - -/* ================================================================ */ -/* If you need to include a system header file for your platform, */ -/* please, do it beyond the point further indicated in this file. */ -/* ================================================================ */ - -/* - * libcurl's external interface definitions are also used internally, - * and might also include required system header files to define them. - */ - -#include - -/* - * Compile time sanity checks must also be done when building the library. - */ - -#include - -/* - * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro - */ - -#ifdef SIZEOF_CURL_OFF_T -# error "SIZEOF_CURL_OFF_T shall not be defined!" - Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined -#endif - -/* - * Disable other protocols when http is the only one desired. - */ - -#ifdef HTTP_ONLY -# ifndef CURL_DISABLE_TFTP -# define CURL_DISABLE_TFTP -# endif -# ifndef CURL_DISABLE_FTP -# define CURL_DISABLE_FTP -# endif -# ifndef CURL_DISABLE_LDAP -# define CURL_DISABLE_LDAP -# endif -# ifndef CURL_DISABLE_TELNET -# define CURL_DISABLE_TELNET -# endif -# ifndef CURL_DISABLE_DICT -# define CURL_DISABLE_DICT -# endif -# ifndef CURL_DISABLE_FILE -# define CURL_DISABLE_FILE -# endif -# ifndef CURL_DISABLE_RTSP -# define CURL_DISABLE_RTSP -# endif -# ifndef CURL_DISABLE_POP3 -# define CURL_DISABLE_POP3 -# endif -# ifndef CURL_DISABLE_IMAP -# define CURL_DISABLE_IMAP -# endif -# ifndef CURL_DISABLE_SMTP -# define CURL_DISABLE_SMTP -# endif -# ifndef CURL_DISABLE_RTMP -# define CURL_DISABLE_RTMP -# endif -# ifndef CURL_DISABLE_GOPHER -# define CURL_DISABLE_GOPHER -# endif -# ifndef CURL_DISABLE_SMB -# define CURL_DISABLE_SMB -# endif -#endif - -/* - * When http is disabled rtsp is not supported. - */ - -#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP) -# define CURL_DISABLE_RTSP -#endif - -/* ================================================================ */ -/* No system header file shall be included in this file before this */ -/* point. The only allowed ones are those included from curlbuild.h */ -/* ================================================================ */ - -/* - * OS/400 setup file includes some system headers. - */ - -#ifdef __OS400__ -# include "setup-os400.h" -#endif - -/* - * VMS setup file includes some system headers. - */ - -#ifdef __VMS -# include "setup-vms.h" -#endif - -/* - * Use getaddrinfo to resolve the IPv4 address literal. If the current network - * interface doesn’t support IPv4, but supports IPv6, NAT64, and DNS64, - * performing this task will result in a synthesized IPv6 address. - */ -#ifdef __APPLE__ -#define USE_RESOLVE_ON_IPS 1 -#endif - -/* - * Include header files for windows builds before redefining anything. - * Use this preprocessor block only to include or exclude windows.h, - * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs - * to any other further and independent block. Under Cygwin things work - * just as under linux (e.g. ) and the winsock headers should - * never be included when __CYGWIN__ is defined. configure script takes - * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H, - * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined. - */ - -#ifdef HAVE_WINDOWS_H -# if defined(UNICODE) && !defined(_UNICODE) -# define _UNICODE -# endif -# if defined(_UNICODE) && !defined(UNICODE) -# define UNICODE -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# ifdef HAVE_WINSOCK2_H -# include -# ifdef HAVE_WS2TCPIP_H -# include -# endif -# else -# ifdef HAVE_WINSOCK_H -# include -# endif -# endif -# include -# ifdef UNICODE - typedef wchar_t *(*curl_wcsdup_callback)(const wchar_t *str); -# endif -#endif - -/* - * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else - * define USE_WINSOCK to 1 if we have and use WINSOCK API, else - * undefine USE_WINSOCK. - */ - -#undef USE_WINSOCK - -#ifdef HAVE_WINSOCK2_H -# define USE_WINSOCK 2 -#else -# ifdef HAVE_WINSOCK_H -# define USE_WINSOCK 1 -# endif -#endif - -#ifdef USE_LWIPSOCK -# include -# include -# include -#endif - -#ifdef HAVE_EXTRA_STRICMP_H -# include -#endif - -#ifdef HAVE_EXTRA_STRDUP_H -# include -#endif - -#ifdef TPF -# include /* for bzero, strcasecmp, and strncasecmp */ -# include /* for strcpy and strlen */ -# include /* for rand and srand */ -# include /* for select and ioctl*/ -# include /* for in_addr_t definition */ -# include /* for tpf_process_signals */ - /* change which select is used for libcurl */ -# define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e) -#endif - -#ifdef __VXWORKS__ -# include /* for generic BSD socket functions */ -# include /* for basic I/O interface functions */ -#endif - -#ifdef __AMIGA__ -# ifndef __ixemul__ -# include -# include -# include -# include -# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) -# endif -#endif - -#include -#ifdef HAVE_ASSERT_H -#include -#endif - -#ifdef __TANDEM /* for nsr-tandem-nsk systems */ -#include -#endif - -#ifndef STDC_HEADERS /* no standard C headers! */ -#include -#endif - -#ifdef __POCC__ -# include -# include -# define sys_nerr EILSEQ -#endif - -/* - * Salford-C kludge section (mostly borrowed from wxWidgets). - */ -#ifdef __SALFORDC__ - #pragma suppress 353 /* Possible nested comments */ - #pragma suppress 593 /* Define not used */ - #pragma suppress 61 /* enum has no name */ - #pragma suppress 106 /* unnamed, unused parameter */ - #include -#endif - -/* - * Large file (>2Gb) support using WIN32 functions. - */ - -#ifdef USE_WIN32_LARGE_FILES -# include -# include -# include -# undef lseek -# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence) -# undef fstat -# define fstat(fdes,stp) _fstati64(fdes, stp) -# undef stat -# define stat(fname,stp) _stati64(fname, stp) -# define struct_stat struct _stati64 -# define LSEEK_ERROR (__int64)-1 -#endif - -/* - * Small file (<2Gb) support using WIN32 functions. - */ - -#ifdef USE_WIN32_SMALL_FILES -# include -# include -# include -# ifndef _WIN32_WCE -# undef lseek -# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence) -# define fstat(fdes,stp) _fstat(fdes, stp) -# define stat(fname,stp) _stat(fname, stp) -# define struct_stat struct _stat -# endif -# define LSEEK_ERROR (long)-1 -#endif - -#ifndef struct_stat -# define struct_stat struct stat -#endif - -#ifndef LSEEK_ERROR -# define LSEEK_ERROR (off_t)-1 -#endif - -/* - * Default sizeof(off_t) in case it hasn't been defined in config file. - */ - -#ifndef SIZEOF_OFF_T -# if defined(__VMS) && !defined(__VAX) -# if defined(_LARGEFILE) -# define SIZEOF_OFF_T 8 -# endif -# elif defined(__OS400__) && defined(__ILEC400__) -# if defined(_LARGE_FILES) -# define SIZEOF_OFF_T 8 -# endif -# elif defined(__MVS__) && defined(__IBMC__) -# if defined(_LP64) || defined(_LARGE_FILES) -# define SIZEOF_OFF_T 8 -# endif -# elif defined(__370__) && defined(__IBMC__) -# if defined(_LP64) || defined(_LARGE_FILES) -# define SIZEOF_OFF_T 8 -# endif -# endif -# ifndef SIZEOF_OFF_T -# define SIZEOF_OFF_T 4 -# endif -#endif - -/* - * Arg 2 type for gethostname in case it hasn't been defined in config file. - */ - -#ifndef GETHOSTNAME_TYPE_ARG2 -# ifdef USE_WINSOCK -# define GETHOSTNAME_TYPE_ARG2 int -# else -# define GETHOSTNAME_TYPE_ARG2 size_t -# endif -#endif - -/* Below we define some functions. They should - - 4. set the SIGALRM signal timeout - 5. set dir/file naming defines - */ - -#ifdef WIN32 - -# define DIR_CHAR "\\" -# define DOT_CHAR "_" - -#else /* WIN32 */ - -# ifdef MSDOS /* Watt-32 */ - -# include -# define select(n,r,w,x,t) select_s(n,r,w,x,t) -# define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z)) -# include -# ifdef word -# undef word -# endif -# ifdef byte -# undef byte -# endif - -# endif /* MSDOS */ - -# ifdef __minix - /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */ - extern char *strtok_r(char *s, const char *delim, char **last); - extern struct tm *gmtime_r(const time_t * const timep, struct tm *tmp); -# endif - -# define DIR_CHAR "/" -# ifndef DOT_CHAR -# define DOT_CHAR "." -# endif - -# ifdef MSDOS -# undef DOT_CHAR -# define DOT_CHAR "_" -# endif - -# ifndef fileno /* sunos 4 have this as a macro! */ - int fileno(FILE *stream); -# endif - -#endif /* WIN32 */ - -/* - * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN - * defined in ws2tcpip.h as well as to provide IPv6 support. - * Does not apply if lwIP is used. - */ - -#if defined(_MSC_VER) && !defined(__POCC__) && !defined(USE_LWIPSOCK) -# if !defined(HAVE_WS2TCPIP_H) || \ - ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN)) -# undef HAVE_GETADDRINFO_THREADSAFE -# undef HAVE_FREEADDRINFO -# undef HAVE_GETADDRINFO -# undef HAVE_GETNAMEINFO -# undef ENABLE_IPV6 -# endif -#endif - -/* ---------------------------------------------------------------- */ -/* resolver specialty compile-time defines */ -/* CURLRES_* defines to use in the host*.c sources */ -/* ---------------------------------------------------------------- */ - -/* - * lcc-win32 doesn't have _beginthreadex(), lacks threads support. - */ - -#if defined(__LCC__) && defined(WIN32) -# undef USE_THREADS_POSIX -# undef USE_THREADS_WIN32 -#endif - -/* - * MSVC threads support requires a multi-threaded runtime library. - * _beginthreadex() is not available in single-threaded ones. - */ - -#if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT) -# undef USE_THREADS_POSIX -# undef USE_THREADS_WIN32 -#endif - -/* - * Mutually exclusive CURLRES_* definitions. - */ - -#ifdef USE_ARES -# define CURLRES_ASYNCH -# define CURLRES_ARES -/* now undef the stock libc functions just to avoid them being used */ -# undef HAVE_GETADDRINFO -# undef HAVE_FREEADDRINFO -# undef HAVE_GETHOSTBYNAME -#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) -# define CURLRES_ASYNCH -# define CURLRES_THREADED -#else -# define CURLRES_SYNCH -#endif - -#ifdef ENABLE_IPV6 -# define CURLRES_IPV6 -#else -# define CURLRES_IPV4 -#endif - -/* ---------------------------------------------------------------- */ - -/* - * When using WINSOCK, TELNET protocol requires WINSOCK2 API. - */ - -#if defined(USE_WINSOCK) && (USE_WINSOCK != 2) -# define CURL_DISABLE_TELNET 1 -#endif - -/* - * msvc 6.0 does not have struct sockaddr_storage and - * does not define IPPROTO_ESP in winsock2.h. But both - * are available if PSDK is properly installed. - */ - -#if defined(_MSC_VER) && !defined(__POCC__) -# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP)) -# undef HAVE_STRUCT_SOCKADDR_STORAGE -# endif -#endif - -/* - * Intentionally fail to build when using msvc 6.0 without PSDK installed. - * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK - * in lib/config-win32.h although absolutely discouraged and unsupported. - */ - -#if defined(_MSC_VER) && !defined(__POCC__) -# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_)) -# if !defined(ALLOW_MSVC6_WITHOUT_PSDK) -# error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \ - "Windows Server 2003 PSDK" -# else -# define CURL_DISABLE_LDAP 1 -# endif -# endif -#endif - -#ifdef NETWARE -int netware_init(void); -#ifndef __NOVELL_LIBC__ -#include -#include -#endif -#endif - -#if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) -/* The lib and header are present */ -#define USE_LIBIDN2 -#endif - -#ifndef SIZEOF_TIME_T -/* assume default size of time_t to be 32 bit */ -#define SIZEOF_TIME_T 4 -#endif - -#define LIBIDN_REQUIRED_VERSION "0.4.1" - -#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_NSS) || \ - defined(USE_POLARSSL) || defined(USE_AXTLS) || defined(USE_MBEDTLS) || \ - defined(USE_CYASSL) || defined(USE_SCHANNEL) || \ - defined(USE_DARWINSSL) || defined(USE_GSKIT) -#define USE_SSL /* SSL support has been enabled */ -#endif - -/* Single point where USE_SPNEGO definition might be defined */ -#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \ - (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) -#define USE_SPNEGO -#endif - -/* Single point where USE_KERBEROS5 definition might be defined */ -#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \ - (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) -#define USE_KERBEROS5 -#endif - -/* Single point where USE_NTLM definition might be defined */ -#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH) -#if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \ - defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \ - defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) - -#define USE_NTLM - -#elif defined(USE_MBEDTLS) -# include -# if defined(MBEDTLS_MD4_C) -#define USE_NTLM -# endif - -#endif -#endif - -/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */ -#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE) -#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE") -#endif - -/* - * Provide a mechanism to silence picky compilers, such as gcc 4.6+. - * Parameters should of course normally not be unused, but for example when - * we have multiple implementations of the same interface it may happen. - */ - -#if defined(__GNUC__) && ((__GNUC__ >= 3) || \ - ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7))) -# define UNUSED_PARAM __attribute__((__unused__)) -# define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define UNUSED_PARAM /*NOTHING*/ -# define WARN_UNUSED_RESULT -#endif - -/* - * Include macros and defines that should only be processed once. - */ - -#ifndef HEADER_CURL_SETUP_ONCE_H -#include "curl_setup_once.h" -#endif - -/* - * Definition of our NOP statement Object-like macro - */ - -#ifndef Curl_nop_stmt -# define Curl_nop_stmt do { } WHILE_FALSE -#endif - -/* - * Ensure that Winsock and lwIP TCP/IP stacks are not mixed. - */ - -#if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H) -# if defined(SOCKET) || \ - defined(USE_WINSOCK) || \ - defined(HAVE_WINSOCK_H) || \ - defined(HAVE_WINSOCK2_H) || \ - defined(HAVE_WS2TCPIP_H) -# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!" -# endif -#endif - -/* - * Portable symbolic names for Winsock shutdown() mode flags. - */ - -#ifdef USE_WINSOCK -# define SHUT_RD 0x00 -# define SHUT_WR 0x01 -# define SHUT_RDWR 0x02 -#endif - -/* Define S_ISREG if not defined by system headers, f.e. MSVC */ -#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - -/* Define S_ISDIR if not defined by system headers, f.e. MSVC */ -#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - -/* In Windows the default file mode is text but an application can override it. -Therefore we specify it explicitly. https://github.com/curl/curl/pull/258 -*/ -#if defined(WIN32) || defined(MSDOS) -#define FOPEN_READTEXT "rt" -#define FOPEN_WRITETEXT "wt" -#elif defined(__CYGWIN__) -/* Cygwin has specific behavior we need to address when WIN32 is not defined. -https://cygwin.com/cygwin-ug-net/using-textbinary.html -For write we want our output to have line endings of LF and be compatible with -other Cygwin utilities. For read we want to handle input that may have line -endings either CRLF or LF so 't' is appropriate. -*/ -#define FOPEN_READTEXT "rt" -#define FOPEN_WRITETEXT "w" -#else -#define FOPEN_READTEXT "r" -#define FOPEN_WRITETEXT "w" -#endif - -/* WinSock destroys recv() buffer when send() failed. - * Enabled automatically for Windows and for Cygwin as Cygwin sockets are - * wrappers for WinSock sockets. https://github.com/curl/curl/issues/657 - * Define DONT_USE_RECV_BEFORE_SEND_WORKAROUND to force disable workaround. - */ -#if !defined(DONT_USE_RECV_BEFORE_SEND_WORKAROUND) -# if defined(WIN32) || defined(__CYGWIN__) -# define USE_RECV_BEFORE_SEND_WORKAROUND -# endif -#else /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */ -# ifdef USE_RECV_BEFORE_SEND_WORKAROUND -# undef USE_RECV_BEFORE_SEND_WORKAROUND -# endif -#endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */ - -/* Detect Windows App environment which has a restricted access - * to the Win32 APIs. */ -# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602) -# include -# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ - !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -# define CURL_WINDOWS_APP -# endif -# endif - -#endif /* HEADER_CURL_SETUP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_setup_once.h b/build/premake/premake5/contrib/curl/lib/curl_setup_once.h deleted file mode 100644 index 4da83499af..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_setup_once.h +++ /dev/null @@ -1,551 +0,0 @@ -#ifndef HEADER_CURL_SETUP_ONCE_H -#define HEADER_CURL_SETUP_ONCE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - - -/* - * Inclusion of common header files. - */ - -#include -#include -#include -#include -#include - -#ifdef HAVE_ERRNO_H -#include -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef NEED_MALLOC_H -#include -#endif - -#ifdef NEED_MEMORY_H -#include -#endif - -#ifdef HAVE_SYS_STAT_H -#include -#endif - -#ifdef HAVE_SYS_TIME_H -#include -#ifdef TIME_WITH_SYS_TIME -#include -#endif -#else -#ifdef HAVE_TIME_H -#include -#endif -#endif - -#ifdef WIN32 -#include -#include -#endif - -#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T) -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef __hpux -# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL) -# ifdef _APP32_64BIT_OFF_T -# define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T -# undef _APP32_64BIT_OFF_T -# else -# undef OLD_APP32_64BIT_OFF_T -# endif -# endif -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef __hpux -# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL) -# ifdef OLD_APP32_64BIT_OFF_T -# define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T -# undef OLD_APP32_64BIT_OFF_T -# endif -# endif -#endif - - -/* - * Definition of timeval struct for platforms that don't have it. - */ - -#ifndef HAVE_STRUCT_TIMEVAL -struct timeval { - long tv_sec; - long tv_usec; -}; -#endif - - -/* - * If we have the MSG_NOSIGNAL define, make sure we use - * it as the fourth argument of function send() - */ - -#ifdef HAVE_MSG_NOSIGNAL -#define SEND_4TH_ARG MSG_NOSIGNAL -#else -#define SEND_4TH_ARG 0 -#endif - - -#if defined(__minix) -/* Minix doesn't support recv on TCP sockets */ -#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \ - (RECV_TYPE_ARG2)(y), \ - (RECV_TYPE_ARG3)(z)) - -#elif defined(HAVE_RECV) -/* - * The definitions for the return type and arguments types - * of functions recv() and send() belong and come from the - * configuration file. Do not define them in any other place. - * - * HAVE_RECV is defined if you have a function named recv() - * which is used to read incoming data from sockets. If your - * function has another name then don't define HAVE_RECV. - * - * If HAVE_RECV is defined then RECV_TYPE_ARG1, RECV_TYPE_ARG2, - * RECV_TYPE_ARG3, RECV_TYPE_ARG4 and RECV_TYPE_RETV must also - * be defined. - * - * HAVE_SEND is defined if you have a function named send() - * which is used to write outgoing data on a connected socket. - * If yours has another name then don't define HAVE_SEND. - * - * If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_QUAL_ARG2, - * SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4 and - * SEND_TYPE_RETV must also be defined. - */ - -#if !defined(RECV_TYPE_ARG1) || \ - !defined(RECV_TYPE_ARG2) || \ - !defined(RECV_TYPE_ARG3) || \ - !defined(RECV_TYPE_ARG4) || \ - !defined(RECV_TYPE_RETV) - /* */ - Error Missing_definition_of_return_and_arguments_types_of_recv - /* */ -#else -#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \ - (RECV_TYPE_ARG2)(y), \ - (RECV_TYPE_ARG3)(z), \ - (RECV_TYPE_ARG4)(0)) -#endif -#else /* HAVE_RECV */ -#ifndef sread - /* */ - Error Missing_definition_of_macro_sread - /* */ -#endif -#endif /* HAVE_RECV */ - - -#if defined(__minix) -/* Minix doesn't support send on TCP sockets */ -#define swrite(x,y,z) (ssize_t)write((SEND_TYPE_ARG1)(x), \ - (SEND_TYPE_ARG2)(y), \ - (SEND_TYPE_ARG3)(z)) - -#elif defined(HAVE_SEND) -#if !defined(SEND_TYPE_ARG1) || \ - !defined(SEND_QUAL_ARG2) || \ - !defined(SEND_TYPE_ARG2) || \ - !defined(SEND_TYPE_ARG3) || \ - !defined(SEND_TYPE_ARG4) || \ - !defined(SEND_TYPE_RETV) - /* */ - Error Missing_definition_of_return_and_arguments_types_of_send - /* */ -#else -#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \ - (SEND_TYPE_ARG2)(y), \ - (SEND_TYPE_ARG3)(z), \ - (SEND_TYPE_ARG4)(SEND_4TH_ARG)) -#endif -#else /* HAVE_SEND */ -#ifndef swrite - /* */ - Error Missing_definition_of_macro_swrite - /* */ -#endif -#endif /* HAVE_SEND */ - - -#if 0 -#if defined(HAVE_RECVFROM) -/* - * Currently recvfrom is only used on udp sockets. - */ -#if !defined(RECVFROM_TYPE_ARG1) || \ - !defined(RECVFROM_TYPE_ARG2) || \ - !defined(RECVFROM_TYPE_ARG3) || \ - !defined(RECVFROM_TYPE_ARG4) || \ - !defined(RECVFROM_TYPE_ARG5) || \ - !defined(RECVFROM_TYPE_ARG6) || \ - !defined(RECVFROM_TYPE_RETV) - /* */ - Error Missing_definition_of_return_and_arguments_types_of_recvfrom - /* */ -#else -#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \ - (RECVFROM_TYPE_ARG2 *)(b), \ - (RECVFROM_TYPE_ARG3) (bl), \ - (RECVFROM_TYPE_ARG4) (0), \ - (RECVFROM_TYPE_ARG5 *)(f), \ - (RECVFROM_TYPE_ARG6 *)(fl)) -#endif -#else /* HAVE_RECVFROM */ -#ifndef sreadfrom - /* */ - Error Missing_definition_of_macro_sreadfrom - /* */ -#endif -#endif /* HAVE_RECVFROM */ - - -#ifdef RECVFROM_TYPE_ARG6_IS_VOID -# define RECVFROM_ARG6_T int -#else -# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6 -#endif -#endif /* if 0 */ - - -/* - * Function-like macro definition used to close a socket. - */ - -#if defined(HAVE_CLOSESOCKET) -# define sclose(x) closesocket((x)) -#elif defined(HAVE_CLOSESOCKET_CAMEL) -# define sclose(x) CloseSocket((x)) -#elif defined(HAVE_CLOSE_S) -# define sclose(x) close_s((x)) -#elif defined(USE_LWIPSOCK) -# define sclose(x) lwip_close((x)) -#else -# define sclose(x) close((x)) -#endif - -/* - * Stack-independent version of fcntl() on sockets: - */ -#if defined(USE_LWIPSOCK) -# define sfcntl lwip_fcntl -#else -# define sfcntl fcntl -#endif - -/* - * Uppercase macro versions of ANSI/ISO is*() functions/macros which - * avoid negative number inputs with argument byte codes > 127. - */ - -#define ISSPACE(x) (isspace((int) ((unsigned char)x))) -#define ISDIGIT(x) (isdigit((int) ((unsigned char)x))) -#define ISALNUM(x) (isalnum((int) ((unsigned char)x))) -#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x))) -#define ISGRAPH(x) (isgraph((int) ((unsigned char)x))) -#define ISALPHA(x) (isalpha((int) ((unsigned char)x))) -#define ISPRINT(x) (isprint((int) ((unsigned char)x))) -#define ISUPPER(x) (isupper((int) ((unsigned char)x))) -#define ISLOWER(x) (islower((int) ((unsigned char)x))) -#define ISASCII(x) (isascii((int) ((unsigned char)x))) - -#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \ - (((unsigned char)x) == '\t')) - -#define TOLOWER(x) (tolower((int) ((unsigned char)x))) - - -/* - * 'bool' stuff compatible with HP-UX headers. - */ - -#if defined(__hpux) && !defined(HAVE_BOOL_T) - typedef int bool; -# define false 0 -# define true 1 -# define HAVE_BOOL_T -#endif - - -/* - * 'bool' exists on platforms with , i.e. C99 platforms. - * On non-C99 platforms there's no bool, so define an enum for that. - * On C99 platforms 'false' and 'true' also exist. Enum uses a - * global namespace though, so use bool_false and bool_true. - */ - -#ifndef HAVE_BOOL_T - typedef enum { - bool_false = 0, - bool_true = 1 - } bool; - -/* - * Use a define to let 'true' and 'false' use those enums. There - * are currently no use of true and false in libcurl proper, but - * there are some in the examples. This will cater for any later - * code happening to use true and false. - */ -# define false bool_false -# define true bool_true -# define HAVE_BOOL_T -#endif - - -/* - * Redefine TRUE and FALSE too, to catch current use. With this - * change, 'bool found = 1' will give a warning on MIPSPro, but - * 'bool found = TRUE' will not. Change tested on IRIX/MIPSPro, - * AIX 5.1/Xlc, Tru64 5.1/cc, w/make test too. - */ - -#ifndef TRUE -#define TRUE true -#endif -#ifndef FALSE -#define FALSE false -#endif - - -/* - * Macro WHILE_FALSE may be used to build single-iteration do-while loops, - * avoiding compiler warnings. Mostly intended for other macro definitions. - */ - -#define WHILE_FALSE while(0) - -#if defined(_MSC_VER) && !defined(__POCC__) -# undef WHILE_FALSE -# if (_MSC_VER < 1500) -# define WHILE_FALSE while(1, 0) -# else -# define WHILE_FALSE \ -__pragma(warning(push)) \ -__pragma(warning(disable:4127)) \ -while(0) \ -__pragma(warning(pop)) -# endif -#endif - - -/* - * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type. - */ - -#ifndef HAVE_SIG_ATOMIC_T -typedef int sig_atomic_t; -#define HAVE_SIG_ATOMIC_T -#endif - - -/* - * Convenience SIG_ATOMIC_T definition - */ - -#ifdef HAVE_SIG_ATOMIC_T_VOLATILE -#define SIG_ATOMIC_T static sig_atomic_t -#else -#define SIG_ATOMIC_T static volatile sig_atomic_t -#endif - - -/* - * Default return type for signal handlers. - */ - -#ifndef RETSIGTYPE -#define RETSIGTYPE void -#endif - - -/* - * Macro used to include code only in debug builds. - */ - -#ifdef DEBUGBUILD -#define DEBUGF(x) x -#else -#define DEBUGF(x) do { } WHILE_FALSE -#endif - - -/* - * Macro used to include assertion code only in debug builds. - */ - -#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H) -#define DEBUGASSERT(x) assert(x) -#else -#define DEBUGASSERT(x) do { } WHILE_FALSE -#endif - - -/* - * Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno - * (or equivalent) on this platform to hide platform details to code using it. - */ - -#ifdef USE_WINSOCK -#define SOCKERRNO ((int)WSAGetLastError()) -#define SET_SOCKERRNO(x) (WSASetLastError((int)(x))) -#else -#define SOCKERRNO (errno) -#define SET_SOCKERRNO(x) (errno = (x)) -#endif - - -/* - * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno - * (or equivalent) on this platform to hide platform details to code using it. - */ - -#if defined(WIN32) && !defined(USE_LWIPSOCK) -#define ERRNO ((int)GetLastError()) -#define SET_ERRNO(x) (SetLastError((DWORD)(x))) -#else -#define ERRNO (errno) -#define SET_ERRNO(x) (errno = (x)) -#endif - - -/* - * Portable error number symbolic names defined to Winsock error codes. - */ - -#ifdef USE_WINSOCK -#undef EBADF /* override definition in errno.h */ -#define EBADF WSAEBADF -#undef EINTR /* override definition in errno.h */ -#define EINTR WSAEINTR -#undef EINVAL /* override definition in errno.h */ -#define EINVAL WSAEINVAL -#undef EWOULDBLOCK /* override definition in errno.h */ -#define EWOULDBLOCK WSAEWOULDBLOCK -#undef EINPROGRESS /* override definition in errno.h */ -#define EINPROGRESS WSAEINPROGRESS -#undef EALREADY /* override definition in errno.h */ -#define EALREADY WSAEALREADY -#undef ENOTSOCK /* override definition in errno.h */ -#define ENOTSOCK WSAENOTSOCK -#undef EDESTADDRREQ /* override definition in errno.h */ -#define EDESTADDRREQ WSAEDESTADDRREQ -#undef EMSGSIZE /* override definition in errno.h */ -#define EMSGSIZE WSAEMSGSIZE -#undef EPROTOTYPE /* override definition in errno.h */ -#define EPROTOTYPE WSAEPROTOTYPE -#undef ENOPROTOOPT /* override definition in errno.h */ -#define ENOPROTOOPT WSAENOPROTOOPT -#undef EPROTONOSUPPORT /* override definition in errno.h */ -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#undef EOPNOTSUPP /* override definition in errno.h */ -#define EOPNOTSUPP WSAEOPNOTSUPP -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#undef EAFNOSUPPORT /* override definition in errno.h */ -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#undef EADDRINUSE /* override definition in errno.h */ -#define EADDRINUSE WSAEADDRINUSE -#undef EADDRNOTAVAIL /* override definition in errno.h */ -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#undef ENETDOWN /* override definition in errno.h */ -#define ENETDOWN WSAENETDOWN -#undef ENETUNREACH /* override definition in errno.h */ -#define ENETUNREACH WSAENETUNREACH -#undef ENETRESET /* override definition in errno.h */ -#define ENETRESET WSAENETRESET -#undef ECONNABORTED /* override definition in errno.h */ -#define ECONNABORTED WSAECONNABORTED -#undef ECONNRESET /* override definition in errno.h */ -#define ECONNRESET WSAECONNRESET -#undef ENOBUFS /* override definition in errno.h */ -#define ENOBUFS WSAENOBUFS -#undef EISCONN /* override definition in errno.h */ -#define EISCONN WSAEISCONN -#undef ENOTCONN /* override definition in errno.h */ -#define ENOTCONN WSAENOTCONN -#define ESHUTDOWN WSAESHUTDOWN -#define ETOOMANYREFS WSAETOOMANYREFS -#undef ETIMEDOUT /* override definition in errno.h */ -#define ETIMEDOUT WSAETIMEDOUT -#undef ECONNREFUSED /* override definition in errno.h */ -#define ECONNREFUSED WSAECONNREFUSED -#undef ELOOP /* override definition in errno.h */ -#define ELOOP WSAELOOP -#ifndef ENAMETOOLONG /* possible previous definition in errno.h */ -#define ENAMETOOLONG WSAENAMETOOLONG -#endif -#define EHOSTDOWN WSAEHOSTDOWN -#undef EHOSTUNREACH /* override definition in errno.h */ -#define EHOSTUNREACH WSAEHOSTUNREACH -#ifndef ENOTEMPTY /* possible previous definition in errno.h */ -#define ENOTEMPTY WSAENOTEMPTY -#endif -#define EPROCLIM WSAEPROCLIM -#define EUSERS WSAEUSERS -#define EDQUOT WSAEDQUOT -#define ESTALE WSAESTALE -#define EREMOTE WSAEREMOTE -#endif - -/* - * Macro argv_item_t hides platform details to code using it. - */ - -#ifdef __VMS -#define argv_item_t __char_ptr32 -#else -#define argv_item_t char * -#endif - - -/* - * We use this ZERO_NULL to avoid picky compiler warnings, - * when assigning a NULL pointer to a function pointer var. - */ - -#define ZERO_NULL 0 - - -#endif /* HEADER_CURL_SETUP_ONCE_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/curl_sspi.c b/build/premake/premake5/contrib/curl/lib/curl_sspi.c deleted file mode 100644 index 11a7120a9f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_sspi.c +++ /dev/null @@ -1,235 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_WINDOWS_SSPI - -#include -#include "curl_sspi.h" -#include "curl_multibyte.h" -#include "system_win32.h" -#include "warnless.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* We use our own typedef here since some headers might lack these */ -typedef PSecurityFunctionTable (APIENTRY *INITSECURITYINTERFACE_FN)(VOID); - -/* See definition of SECURITY_ENTRYPOINT in sspi.h */ -#ifdef UNICODE -# ifdef _WIN32_WCE -# define SECURITYENTRYPOINT L"InitSecurityInterfaceW" -# else -# define SECURITYENTRYPOINT "InitSecurityInterfaceW" -# endif -#else -# define SECURITYENTRYPOINT "InitSecurityInterfaceA" -#endif - -/* Handle of security.dll or secur32.dll, depending on Windows version */ -HMODULE s_hSecDll = NULL; - -/* Pointer to SSPI dispatch table */ -PSecurityFunctionTable s_pSecFn = NULL; - -/* - * Curl_sspi_global_init() - * - * This is used to load the Security Service Provider Interface (SSPI) - * dynamic link library portably across all Windows versions, without - * the need to directly link libcurl, nor the application using it, at - * build time. - * - * Once this function has been executed, Windows SSPI functions can be - * called through the Security Service Provider Interface dispatch table. - * - * Parameters: - * - * None. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_sspi_global_init(void) -{ - INITSECURITYINTERFACE_FN pInitSecurityInterface; - - /* If security interface is not yet initialized try to do this */ - if(!s_hSecDll) { - /* Security Service Provider Interface (SSPI) functions are located in - * security.dll on WinNT 4.0 and in secur32.dll on Win9x. Win2K and XP - * have both these DLLs (security.dll forwards calls to secur32.dll) */ - - /* Load SSPI dll into the address space of the calling process */ - if(Curl_verify_windows_version(4, 0, PLATFORM_WINNT, VERSION_EQUAL)) - s_hSecDll = Curl_load_library(TEXT("security.dll")); - else - s_hSecDll = Curl_load_library(TEXT("secur32.dll")); - if(!s_hSecDll) - return CURLE_FAILED_INIT; - - /* Get address of the InitSecurityInterfaceA function from the SSPI dll */ - pInitSecurityInterface = (INITSECURITYINTERFACE_FN) - GetProcAddress(s_hSecDll, SECURITYENTRYPOINT); - if(!pInitSecurityInterface) - return CURLE_FAILED_INIT; - - /* Get pointer to Security Service Provider Interface dispatch table */ - s_pSecFn = pInitSecurityInterface(); - if(!s_pSecFn) - return CURLE_FAILED_INIT; - } - - return CURLE_OK; -} - -/* - * Curl_sspi_global_cleanup() - * - * This deinitializes the Security Service Provider Interface from libcurl. - * - * Parameters: - * - * None. - */ -void Curl_sspi_global_cleanup(void) -{ - if(s_hSecDll) { - FreeLibrary(s_hSecDll); - s_hSecDll = NULL; - s_pSecFn = NULL; - } -} - -/* - * Curl_create_sspi_identity() - * - * This is used to populate a SSPI identity structure based on the supplied - * username and password. - * - * Parameters: - * - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * identity [in/out] - The identity structure. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp, - SEC_WINNT_AUTH_IDENTITY *identity) -{ - xcharp_u useranddomain; - xcharp_u user, dup_user; - xcharp_u domain, dup_domain; - xcharp_u passwd, dup_passwd; - size_t domlen = 0; - - domain.const_tchar_ptr = TEXT(""); - - /* Initialize the identity */ - memset(identity, 0, sizeof(*identity)); - - useranddomain.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)userp); - if(!useranddomain.tchar_ptr) - return CURLE_OUT_OF_MEMORY; - - user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('\\')); - if(!user.const_tchar_ptr) - user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('/')); - - if(user.tchar_ptr) { - domain.tchar_ptr = useranddomain.tchar_ptr; - domlen = user.tchar_ptr - useranddomain.tchar_ptr; - user.tchar_ptr++; - } - else { - user.tchar_ptr = useranddomain.tchar_ptr; - domain.const_tchar_ptr = TEXT(""); - domlen = 0; - } - - /* Setup the identity's user and length */ - dup_user.tchar_ptr = _tcsdup(user.tchar_ptr); - if(!dup_user.tchar_ptr) { - Curl_unicodefree(useranddomain.tchar_ptr); - return CURLE_OUT_OF_MEMORY; - } - identity->User = dup_user.tbyte_ptr; - identity->UserLength = curlx_uztoul(_tcslen(dup_user.tchar_ptr)); - dup_user.tchar_ptr = NULL; - - /* Setup the identity's domain and length */ - dup_domain.tchar_ptr = malloc(sizeof(TCHAR) * (domlen + 1)); - if(!dup_domain.tchar_ptr) { - Curl_unicodefree(useranddomain.tchar_ptr); - return CURLE_OUT_OF_MEMORY; - } - _tcsncpy(dup_domain.tchar_ptr, domain.tchar_ptr, domlen); - *(dup_domain.tchar_ptr + domlen) = TEXT('\0'); - identity->Domain = dup_domain.tbyte_ptr; - identity->DomainLength = curlx_uztoul(domlen); - dup_domain.tchar_ptr = NULL; - - Curl_unicodefree(useranddomain.tchar_ptr); - - /* Setup the identity's password and length */ - passwd.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)passwdp); - if(!passwd.tchar_ptr) - return CURLE_OUT_OF_MEMORY; - dup_passwd.tchar_ptr = _tcsdup(passwd.tchar_ptr); - if(!dup_passwd.tchar_ptr) { - Curl_unicodefree(passwd.tchar_ptr); - return CURLE_OUT_OF_MEMORY; - } - identity->Password = dup_passwd.tbyte_ptr; - identity->PasswordLength = curlx_uztoul(_tcslen(dup_passwd.tchar_ptr)); - dup_passwd.tchar_ptr = NULL; - - Curl_unicodefree(passwd.tchar_ptr); - - /* Setup the identity's flags */ - identity->Flags = SECFLAG_WINNT_AUTH_IDENTITY; - - return CURLE_OK; -} - -/* - * Curl_sspi_free_identity() - * - * This is used to free the contents of a SSPI identifier structure. - * - * Parameters: - * - * identity [in/out] - The identity structure. - */ -void Curl_sspi_free_identity(SEC_WINNT_AUTH_IDENTITY *identity) -{ - if(identity) { - Curl_safefree(identity->User); - Curl_safefree(identity->Password); - Curl_safefree(identity->Domain); - } -} - -#endif /* USE_WINDOWS_SSPI */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_sspi.h b/build/premake/premake5/contrib/curl/lib/curl_sspi.h deleted file mode 100644 index 2bbf9477bb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_sspi.h +++ /dev/null @@ -1,350 +0,0 @@ -#ifndef HEADER_CURL_SSPI_H -#define HEADER_CURL_SSPI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_WINDOWS_SSPI - -#include - -/* - * When including the following three headers, it is mandatory to define either - * SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code. - */ - -#undef SECURITY_WIN32 -#undef SECURITY_KERNEL -#define SECURITY_WIN32 1 -#include -#include -#include - -CURLcode Curl_sspi_global_init(void); -void Curl_sspi_global_cleanup(void); - -/* This is used to populate the domain in a SSPI identity structure */ -CURLcode Curl_override_sspi_http_realm(const char *chlg, - SEC_WINNT_AUTH_IDENTITY *identity); - -/* This is used to generate an SSPI identity structure */ -CURLcode Curl_create_sspi_identity(const char *userp, const char *passwdp, - SEC_WINNT_AUTH_IDENTITY *identity); - -/* This is used to free an SSPI identity structure */ -void Curl_sspi_free_identity(SEC_WINNT_AUTH_IDENTITY *identity); - -/* Forward-declaration of global variables defined in curl_sspi.c */ -extern HMODULE s_hSecDll; -extern PSecurityFunctionTable s_pSecFn; - -/* Provide some definitions missing in old headers */ -#define SP_NAME_DIGEST "WDigest" -#define SP_NAME_NTLM "NTLM" -#define SP_NAME_NEGOTIATE "Negotiate" -#define SP_NAME_KERBEROS "Kerberos" - -#ifndef ISC_REQ_USE_HTTP_STYLE -#define ISC_REQ_USE_HTTP_STYLE 0x01000000 -#endif - -#ifndef ISC_RET_REPLAY_DETECT -#define ISC_RET_REPLAY_DETECT 0x00000004 -#endif - -#ifndef ISC_RET_SEQUENCE_DETECT -#define ISC_RET_SEQUENCE_DETECT 0x00000008 -#endif - -#ifndef ISC_RET_CONFIDENTIALITY -#define ISC_RET_CONFIDENTIALITY 0x00000010 -#endif - -#ifndef ISC_RET_ALLOCATED_MEMORY -#define ISC_RET_ALLOCATED_MEMORY 0x00000100 -#endif - -#ifndef ISC_RET_STREAM -#define ISC_RET_STREAM 0x00008000 -#endif - -#ifndef SEC_E_INSUFFICIENT_MEMORY -# define SEC_E_INSUFFICIENT_MEMORY ((HRESULT)0x80090300L) -#endif -#ifndef SEC_E_INVALID_HANDLE -# define SEC_E_INVALID_HANDLE ((HRESULT)0x80090301L) -#endif -#ifndef SEC_E_UNSUPPORTED_FUNCTION -# define SEC_E_UNSUPPORTED_FUNCTION ((HRESULT)0x80090302L) -#endif -#ifndef SEC_E_TARGET_UNKNOWN -# define SEC_E_TARGET_UNKNOWN ((HRESULT)0x80090303L) -#endif -#ifndef SEC_E_INTERNAL_ERROR -# define SEC_E_INTERNAL_ERROR ((HRESULT)0x80090304L) -#endif -#ifndef SEC_E_SECPKG_NOT_FOUND -# define SEC_E_SECPKG_NOT_FOUND ((HRESULT)0x80090305L) -#endif -#ifndef SEC_E_NOT_OWNER -# define SEC_E_NOT_OWNER ((HRESULT)0x80090306L) -#endif -#ifndef SEC_E_CANNOT_INSTALL -# define SEC_E_CANNOT_INSTALL ((HRESULT)0x80090307L) -#endif -#ifndef SEC_E_INVALID_TOKEN -# define SEC_E_INVALID_TOKEN ((HRESULT)0x80090308L) -#endif -#ifndef SEC_E_CANNOT_PACK -# define SEC_E_CANNOT_PACK ((HRESULT)0x80090309L) -#endif -#ifndef SEC_E_QOP_NOT_SUPPORTED -# define SEC_E_QOP_NOT_SUPPORTED ((HRESULT)0x8009030AL) -#endif -#ifndef SEC_E_NO_IMPERSONATION -# define SEC_E_NO_IMPERSONATION ((HRESULT)0x8009030BL) -#endif -#ifndef SEC_E_LOGON_DENIED -# define SEC_E_LOGON_DENIED ((HRESULT)0x8009030CL) -#endif -#ifndef SEC_E_UNKNOWN_CREDENTIALS -# define SEC_E_UNKNOWN_CREDENTIALS ((HRESULT)0x8009030DL) -#endif -#ifndef SEC_E_NO_CREDENTIALS -# define SEC_E_NO_CREDENTIALS ((HRESULT)0x8009030EL) -#endif -#ifndef SEC_E_MESSAGE_ALTERED -# define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL) -#endif -#ifndef SEC_E_OUT_OF_SEQUENCE -# define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L) -#endif -#ifndef SEC_E_NO_AUTHENTICATING_AUTHORITY -# define SEC_E_NO_AUTHENTICATING_AUTHORITY ((HRESULT)0x80090311L) -#endif -#ifndef SEC_E_BAD_PKGID -# define SEC_E_BAD_PKGID ((HRESULT)0x80090316L) -#endif -#ifndef SEC_E_CONTEXT_EXPIRED -# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L) -#endif -#ifndef SEC_E_INCOMPLETE_MESSAGE -# define SEC_E_INCOMPLETE_MESSAGE ((HRESULT)0x80090318L) -#endif -#ifndef SEC_E_INCOMPLETE_CREDENTIALS -# define SEC_E_INCOMPLETE_CREDENTIALS ((HRESULT)0x80090320L) -#endif -#ifndef SEC_E_BUFFER_TOO_SMALL -# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L) -#endif -#ifndef SEC_E_WRONG_PRINCIPAL -# define SEC_E_WRONG_PRINCIPAL ((HRESULT)0x80090322L) -#endif -#ifndef SEC_E_TIME_SKEW -# define SEC_E_TIME_SKEW ((HRESULT)0x80090324L) -#endif -#ifndef SEC_E_UNTRUSTED_ROOT -# define SEC_E_UNTRUSTED_ROOT ((HRESULT)0x80090325L) -#endif -#ifndef SEC_E_ILLEGAL_MESSAGE -# define SEC_E_ILLEGAL_MESSAGE ((HRESULT)0x80090326L) -#endif -#ifndef SEC_E_CERT_UNKNOWN -# define SEC_E_CERT_UNKNOWN ((HRESULT)0x80090327L) -#endif -#ifndef SEC_E_CERT_EXPIRED -# define SEC_E_CERT_EXPIRED ((HRESULT)0x80090328L) -#endif -#ifndef SEC_E_ENCRYPT_FAILURE -# define SEC_E_ENCRYPT_FAILURE ((HRESULT)0x80090329L) -#endif -#ifndef SEC_E_DECRYPT_FAILURE -# define SEC_E_DECRYPT_FAILURE ((HRESULT)0x80090330L) -#endif -#ifndef SEC_E_ALGORITHM_MISMATCH -# define SEC_E_ALGORITHM_MISMATCH ((HRESULT)0x80090331L) -#endif -#ifndef SEC_E_SECURITY_QOS_FAILED -# define SEC_E_SECURITY_QOS_FAILED ((HRESULT)0x80090332L) -#endif -#ifndef SEC_E_UNFINISHED_CONTEXT_DELETED -# define SEC_E_UNFINISHED_CONTEXT_DELETED ((HRESULT)0x80090333L) -#endif -#ifndef SEC_E_NO_TGT_REPLY -# define SEC_E_NO_TGT_REPLY ((HRESULT)0x80090334L) -#endif -#ifndef SEC_E_NO_IP_ADDRESSES -# define SEC_E_NO_IP_ADDRESSES ((HRESULT)0x80090335L) -#endif -#ifndef SEC_E_WRONG_CREDENTIAL_HANDLE -# define SEC_E_WRONG_CREDENTIAL_HANDLE ((HRESULT)0x80090336L) -#endif -#ifndef SEC_E_CRYPTO_SYSTEM_INVALID -# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L) -#endif -#ifndef SEC_E_MAX_REFERRALS_EXCEEDED -# define SEC_E_MAX_REFERRALS_EXCEEDED ((HRESULT)0x80090338L) -#endif -#ifndef SEC_E_MUST_BE_KDC -# define SEC_E_MUST_BE_KDC ((HRESULT)0x80090339L) -#endif -#ifndef SEC_E_STRONG_CRYPTO_NOT_SUPPORTED -# define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED ((HRESULT)0x8009033AL) -#endif -#ifndef SEC_E_TOO_MANY_PRINCIPALS -# define SEC_E_TOO_MANY_PRINCIPALS ((HRESULT)0x8009033BL) -#endif -#ifndef SEC_E_NO_PA_DATA -# define SEC_E_NO_PA_DATA ((HRESULT)0x8009033CL) -#endif -#ifndef SEC_E_PKINIT_NAME_MISMATCH -# define SEC_E_PKINIT_NAME_MISMATCH ((HRESULT)0x8009033DL) -#endif -#ifndef SEC_E_SMARTCARD_LOGON_REQUIRED -# define SEC_E_SMARTCARD_LOGON_REQUIRED ((HRESULT)0x8009033EL) -#endif -#ifndef SEC_E_SHUTDOWN_IN_PROGRESS -# define SEC_E_SHUTDOWN_IN_PROGRESS ((HRESULT)0x8009033FL) -#endif -#ifndef SEC_E_KDC_INVALID_REQUEST -# define SEC_E_KDC_INVALID_REQUEST ((HRESULT)0x80090340L) -#endif -#ifndef SEC_E_KDC_UNABLE_TO_REFER -# define SEC_E_KDC_UNABLE_TO_REFER ((HRESULT)0x80090341L) -#endif -#ifndef SEC_E_KDC_UNKNOWN_ETYPE -# define SEC_E_KDC_UNKNOWN_ETYPE ((HRESULT)0x80090342L) -#endif -#ifndef SEC_E_UNSUPPORTED_PREAUTH -# define SEC_E_UNSUPPORTED_PREAUTH ((HRESULT)0x80090343L) -#endif -#ifndef SEC_E_DELEGATION_REQUIRED -# define SEC_E_DELEGATION_REQUIRED ((HRESULT)0x80090345L) -#endif -#ifndef SEC_E_BAD_BINDINGS -# define SEC_E_BAD_BINDINGS ((HRESULT)0x80090346L) -#endif -#ifndef SEC_E_MULTIPLE_ACCOUNTS -# define SEC_E_MULTIPLE_ACCOUNTS ((HRESULT)0x80090347L) -#endif -#ifndef SEC_E_NO_KERB_KEY -# define SEC_E_NO_KERB_KEY ((HRESULT)0x80090348L) -#endif -#ifndef SEC_E_CERT_WRONG_USAGE -# define SEC_E_CERT_WRONG_USAGE ((HRESULT)0x80090349L) -#endif -#ifndef SEC_E_DOWNGRADE_DETECTED -# define SEC_E_DOWNGRADE_DETECTED ((HRESULT)0x80090350L) -#endif -#ifndef SEC_E_SMARTCARD_CERT_REVOKED -# define SEC_E_SMARTCARD_CERT_REVOKED ((HRESULT)0x80090351L) -#endif -#ifndef SEC_E_ISSUING_CA_UNTRUSTED -# define SEC_E_ISSUING_CA_UNTRUSTED ((HRESULT)0x80090352L) -#endif -#ifndef SEC_E_REVOCATION_OFFLINE_C -# define SEC_E_REVOCATION_OFFLINE_C ((HRESULT)0x80090353L) -#endif -#ifndef SEC_E_PKINIT_CLIENT_FAILURE -# define SEC_E_PKINIT_CLIENT_FAILURE ((HRESULT)0x80090354L) -#endif -#ifndef SEC_E_SMARTCARD_CERT_EXPIRED -# define SEC_E_SMARTCARD_CERT_EXPIRED ((HRESULT)0x80090355L) -#endif -#ifndef SEC_E_NO_S4U_PROT_SUPPORT -# define SEC_E_NO_S4U_PROT_SUPPORT ((HRESULT)0x80090356L) -#endif -#ifndef SEC_E_CROSSREALM_DELEGATION_FAILURE -# define SEC_E_CROSSREALM_DELEGATION_FAILURE ((HRESULT)0x80090357L) -#endif -#ifndef SEC_E_REVOCATION_OFFLINE_KDC -# define SEC_E_REVOCATION_OFFLINE_KDC ((HRESULT)0x80090358L) -#endif -#ifndef SEC_E_ISSUING_CA_UNTRUSTED_KDC -# define SEC_E_ISSUING_CA_UNTRUSTED_KDC ((HRESULT)0x80090359L) -#endif -#ifndef SEC_E_KDC_CERT_EXPIRED -# define SEC_E_KDC_CERT_EXPIRED ((HRESULT)0x8009035AL) -#endif -#ifndef SEC_E_KDC_CERT_REVOKED -# define SEC_E_KDC_CERT_REVOKED ((HRESULT)0x8009035BL) -#endif -#ifndef SEC_E_INVALID_PARAMETER -# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL) -#endif -#ifndef SEC_E_DELEGATION_POLICY -# define SEC_E_DELEGATION_POLICY ((HRESULT)0x8009035EL) -#endif -#ifndef SEC_E_POLICY_NLTM_ONLY -# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL) -#endif - -#ifndef SEC_I_CONTINUE_NEEDED -# define SEC_I_CONTINUE_NEEDED ((HRESULT)0x00090312L) -#endif -#ifndef SEC_I_COMPLETE_NEEDED -# define SEC_I_COMPLETE_NEEDED ((HRESULT)0x00090313L) -#endif -#ifndef SEC_I_COMPLETE_AND_CONTINUE -# define SEC_I_COMPLETE_AND_CONTINUE ((HRESULT)0x00090314L) -#endif -#ifndef SEC_I_LOCAL_LOGON -# define SEC_I_LOCAL_LOGON ((HRESULT)0x00090315L) -#endif -#ifndef SEC_I_CONTEXT_EXPIRED -# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L) -#endif -#ifndef SEC_I_INCOMPLETE_CREDENTIALS -# define SEC_I_INCOMPLETE_CREDENTIALS ((HRESULT)0x00090320L) -#endif -#ifndef SEC_I_RENEGOTIATE -# define SEC_I_RENEGOTIATE ((HRESULT)0x00090321L) -#endif -#ifndef SEC_I_NO_LSA_CONTEXT -# define SEC_I_NO_LSA_CONTEXT ((HRESULT)0x00090323L) -#endif -#ifndef SEC_I_SIGNATURE_NEEDED -# define SEC_I_SIGNATURE_NEEDED ((HRESULT)0x0009035CL) -#endif - -#ifndef CRYPT_E_REVOKED -# define CRYPT_E_REVOKED ((HRESULT)0x80092010L) -#endif - -#ifdef UNICODE -# define SECFLAG_WINNT_AUTH_IDENTITY \ - (unsigned long)SEC_WINNT_AUTH_IDENTITY_UNICODE -#else -# define SECFLAG_WINNT_AUTH_IDENTITY \ - (unsigned long)SEC_WINNT_AUTH_IDENTITY_ANSI -#endif - -/* - * Definitions required from ntsecapi.h are directly provided below this point - * to avoid including ntsecapi.h due to a conflict with OpenSSL's safestack.h - */ -#define KERB_WRAP_NO_ENCRYPT 0x80000001 - -#endif /* USE_WINDOWS_SSPI */ - -#endif /* HEADER_CURL_SSPI_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_threads.c b/build/premake/premake5/contrib/curl/lib/curl_threads.c deleted file mode 100644 index a78eff5c2f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_threads.c +++ /dev/null @@ -1,139 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#if defined(USE_THREADS_POSIX) -# ifdef HAVE_PTHREAD_H -# include -# endif -#elif defined(USE_THREADS_WIN32) -# ifdef HAVE_PROCESS_H -# include -# endif -#endif - -#include "curl_threads.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -#if defined(USE_THREADS_POSIX) - -struct curl_actual_call { - unsigned int (*func)(void *); - void *arg; -}; - -static void *curl_thread_create_thunk(void *arg) -{ - struct curl_actual_call * ac = arg; - unsigned int (*func)(void *) = ac->func; - void *real_arg = ac->arg; - - free(ac); - - (*func)(real_arg); - - return 0; -} - -curl_thread_t Curl_thread_create(unsigned int (*func) (void *), void *arg) -{ - curl_thread_t t = malloc(sizeof(pthread_t)); - struct curl_actual_call *ac = malloc(sizeof(struct curl_actual_call)); - if(!(ac && t)) - goto err; - - ac->func = func; - ac->arg = arg; - - if(pthread_create(t, NULL, curl_thread_create_thunk, ac) != 0) - goto err; - - return t; - -err: - free(t); - free(ac); - return curl_thread_t_null; -} - -void Curl_thread_destroy(curl_thread_t hnd) -{ - if(hnd != curl_thread_t_null) { - pthread_detach(*hnd); - free(hnd); - } -} - -int Curl_thread_join(curl_thread_t *hnd) -{ - int ret = (pthread_join(**hnd, NULL) == 0); - - free(*hnd); - *hnd = curl_thread_t_null; - - return ret; -} - -#elif defined(USE_THREADS_WIN32) - -/* !checksrc! disable SPACEBEFOREPAREN 1 */ -curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *), - void *arg) -{ -#ifdef _WIN32_WCE - return CreateThread(NULL, 0, func, arg, 0, NULL); -#else - curl_thread_t t; - t = (curl_thread_t)_beginthreadex(NULL, 0, func, arg, 0, NULL); - if((t == 0) || (t == (curl_thread_t)-1L)) - return curl_thread_t_null; - return t; -#endif -} - -void Curl_thread_destroy(curl_thread_t hnd) -{ - CloseHandle(hnd); -} - -int Curl_thread_join(curl_thread_t *hnd) -{ -#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ - (_WIN32_WINNT < _WIN32_WINNT_VISTA) - int ret = (WaitForSingleObject(*hnd, INFINITE) == WAIT_OBJECT_0); -#else - int ret = (WaitForSingleObjectEx(*hnd, INFINITE, FALSE) == WAIT_OBJECT_0); -#endif - - Curl_thread_destroy(*hnd); - - *hnd = curl_thread_t_null; - - return ret; -} - -#endif /* USE_THREADS_* */ diff --git a/build/premake/premake5/contrib/curl/lib/curl_threads.h b/build/premake/premake5/contrib/curl/lib/curl_threads.h deleted file mode 100644 index 9e0d14a30d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curl_threads.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef HEADER_CURL_THREADS_H -#define HEADER_CURL_THREADS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#if defined(USE_THREADS_POSIX) -# define CURL_STDCALL -# define curl_mutex_t pthread_mutex_t -# define curl_thread_t pthread_t * -# define curl_thread_t_null (pthread_t *)0 -# define Curl_mutex_init(m) pthread_mutex_init(m, NULL) -# define Curl_mutex_acquire(m) pthread_mutex_lock(m) -# define Curl_mutex_release(m) pthread_mutex_unlock(m) -# define Curl_mutex_destroy(m) pthread_mutex_destroy(m) -#elif defined(USE_THREADS_WIN32) -# define CURL_STDCALL __stdcall -# define curl_mutex_t CRITICAL_SECTION -# define curl_thread_t HANDLE -# define curl_thread_t_null (HANDLE)0 -# if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ - (_WIN32_WINNT < _WIN32_WINNT_VISTA) -# define Curl_mutex_init(m) InitializeCriticalSection(m) -# else -# define Curl_mutex_init(m) InitializeCriticalSectionEx(m, 0, 1) -# endif -# define Curl_mutex_acquire(m) EnterCriticalSection(m) -# define Curl_mutex_release(m) LeaveCriticalSection(m) -# define Curl_mutex_destroy(m) DeleteCriticalSection(m) -#endif - -#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) - -/* !checksrc! disable SPACEBEFOREPAREN 1 */ -curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *), - void *arg); - -void Curl_thread_destroy(curl_thread_t hnd); - -int Curl_thread_join(curl_thread_t *hnd); - -#endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */ - -#endif /* HEADER_CURL_THREADS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/curlx.h b/build/premake/premake5/contrib/curl/lib/curlx.h deleted file mode 100644 index 6168dc119f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/curlx.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef HEADER_CURL_CURLX_H -#define HEADER_CURL_CURLX_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Defines protos and includes all header files that provide the curlx_* - * functions. The curlx_* functions are not part of the libcurl API, but are - * stand-alone functions whose sources can be built and linked by apps if need - * be. - */ - -#include -/* this is still a public header file that provides the curl_mprintf() - functions while they still are offered publicly. They will be made library- - private one day */ - -#include "strcase.h" -/* "strcase.h" provides the strcasecompare protos */ - -#include "strtoofft.h" -/* "strtoofft.h" provides this function: curlx_strtoofft(), returns a - curl_off_t number from a given string. -*/ - -#include "timeval.h" -/* - "timeval.h" sets up a 'struct timeval' even for platforms that otherwise - don't have one and has protos for these functions: - - curlx_tvnow() - curlx_tvdiff() - curlx_tvdiff_secs() -*/ - -#include "nonblock.h" -/* "nonblock.h" provides curlx_nonblock() */ - -#include "warnless.h" -/* "warnless.h" provides functions: - - curlx_ultous() - curlx_ultouc() - curlx_uztosi() -*/ - -/* Now setup curlx_ * names for the functions that are to become curlx_ and - be removed from a future libcurl official API: - curlx_getenv - curlx_mprintf (and its variations) - curlx_strcasecompare - curlx_strncasecompare - -*/ - -#define curlx_getenv curl_getenv -#define curlx_mvsnprintf curl_mvsnprintf -#define curlx_msnprintf curl_msnprintf -#define curlx_maprintf curl_maprintf -#define curlx_mvaprintf curl_mvaprintf -#define curlx_msprintf curl_msprintf -#define curlx_mprintf curl_mprintf -#define curlx_mfprintf curl_mfprintf -#define curlx_mvsprintf curl_mvsprintf -#define curlx_mvprintf curl_mvprintf -#define curlx_mvfprintf curl_mvfprintf - -#ifdef ENABLE_CURLX_PRINTF -/* If this define is set, we define all "standard" printf() functions to use - the curlx_* version instead. It makes the source code transparent and - easier to understand/patch. Undefine them first. */ -# undef printf -# undef fprintf -# undef sprintf -# undef snprintf -# undef vprintf -# undef vfprintf -# undef vsprintf -# undef vsnprintf -# undef aprintf -# undef vaprintf - -# define printf curlx_mprintf -# define fprintf curlx_mfprintf -# define sprintf curlx_msprintf -# define snprintf curlx_msnprintf -# define vprintf curlx_mvprintf -# define vfprintf curlx_mvfprintf -# define vsprintf curlx_mvsprintf -# define vsnprintf curlx_mvsnprintf -# define aprintf curlx_maprintf -# define vaprintf curlx_mvaprintf -#endif /* ENABLE_CURLX_PRINTF */ - -#endif /* HEADER_CURL_CURLX_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/dict.c b/build/premake/premake5/contrib/curl/lib/dict.c deleted file mode 100644 index 69defc4cc8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/dict.c +++ /dev/null @@ -1,278 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_DICT - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#include "urldata.h" -#include -#include "transfer.h" -#include "sendf.h" -#include "escape.h" -#include "progress.h" -#include "dict.h" -#include "strcase.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* - * Forward declarations. - */ - -static CURLcode dict_do(struct connectdata *conn, bool *done); - -/* - * DICT protocol handler. - */ - -const struct Curl_handler Curl_handler_dict = { - "DICT", /* scheme */ - ZERO_NULL, /* setup_connection */ - dict_do, /* do_it */ - ZERO_NULL, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_DICT, /* defport */ - CURLPROTO_DICT, /* protocol */ - PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */ -}; - -static char *unescape_word(struct Curl_easy *data, const char *inputbuff) -{ - char *newp; - char *dictp; - char *ptr; - size_t len; - char ch; - int olen=0; - - CURLcode result = Curl_urldecode(data, inputbuff, 0, &newp, &len, FALSE); - if(!newp || result) - return NULL; - - dictp = malloc(((size_t)len)*2 + 1); /* add one for terminating zero */ - if(dictp) { - /* According to RFC2229 section 2.2, these letters need to be escaped with - \[letter] */ - for(ptr = newp; - (ch = *ptr) != 0; - ptr++) { - if((ch <= 32) || (ch == 127) || - (ch == '\'') || (ch == '\"') || (ch == '\\')) { - dictp[olen++] = '\\'; - } - dictp[olen++] = ch; - } - dictp[olen]=0; - } - free(newp); - return dictp; -} - -static CURLcode dict_do(struct connectdata *conn, bool *done) -{ - char *word; - char *eword; - char *ppath; - char *database = NULL; - char *strategy = NULL; - char *nthdef = NULL; /* This is not part of the protocol, but required - by RFC 2229 */ - CURLcode result=CURLE_OK; - struct Curl_easy *data=conn->data; - curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; - - char *path = data->state.path; - curl_off_t *bytecount = &data->req.bytecount; - - *done = TRUE; /* unconditionally */ - - if(conn->bits.user_passwd) { - /* AUTH is missing */ - } - - if(strncasecompare(path, DICT_MATCH, sizeof(DICT_MATCH)-1) || - strncasecompare(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) || - strncasecompare(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) { - - word = strchr(path, ':'); - if(word) { - word++; - database = strchr(word, ':'); - if(database) { - *database++ = (char)0; - strategy = strchr(database, ':'); - if(strategy) { - *strategy++ = (char)0; - nthdef = strchr(strategy, ':'); - if(nthdef) { - *nthdef = (char)0; - } - } - } - } - - if((word == NULL) || (*word == (char)0)) { - infof(data, "lookup word is missing\n"); - word=(char *)"default"; - } - if((database == NULL) || (*database == (char)0)) { - database = (char *)"!"; - } - if((strategy == NULL) || (*strategy == (char)0)) { - strategy = (char *)"."; - } - - eword = unescape_word(data, word); - if(!eword) - return CURLE_OUT_OF_MEMORY; - - result = Curl_sendf(sockfd, conn, - "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n" - "MATCH " - "%s " /* database */ - "%s " /* strategy */ - "%s\r\n" /* word */ - "QUIT\r\n", - - database, - strategy, - eword - ); - - free(eword); - - if(result) { - failf(data, "Failed sending DICT request"); - return result; - } - Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount, - -1, NULL); /* no upload */ - } - else if(strncasecompare(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) || - strncasecompare(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) || - strncasecompare(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) { - - word = strchr(path, ':'); - if(word) { - word++; - database = strchr(word, ':'); - if(database) { - *database++ = (char)0; - nthdef = strchr(database, ':'); - if(nthdef) { - *nthdef = (char)0; - } - } - } - - if((word == NULL) || (*word == (char)0)) { - infof(data, "lookup word is missing\n"); - word=(char *)"default"; - } - if((database == NULL) || (*database == (char)0)) { - database = (char *)"!"; - } - - eword = unescape_word(data, word); - if(!eword) - return CURLE_OUT_OF_MEMORY; - - result = Curl_sendf(sockfd, conn, - "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n" - "DEFINE " - "%s " /* database */ - "%s\r\n" /* word */ - "QUIT\r\n", - database, - eword); - - free(eword); - - if(result) { - failf(data, "Failed sending DICT request"); - return result; - } - Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount, - -1, NULL); /* no upload */ - } - else { - - ppath = strchr(path, '/'); - if(ppath) { - int i; - - ppath++; - for(i = 0; ppath[i]; i++) { - if(ppath[i] == ':') - ppath[i] = ' '; - } - result = Curl_sendf(sockfd, conn, - "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\r\n" - "%s\r\n" - "QUIT\r\n", ppath); - if(result) { - failf(data, "Failed sending DICT request"); - return result; - } - - Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount, -1, NULL); - } - } - - return CURLE_OK; -} -#endif /*CURL_DISABLE_DICT*/ diff --git a/build/premake/premake5/contrib/curl/lib/dict.h b/build/premake/premake5/contrib/curl/lib/dict.h deleted file mode 100644 index 12c0f3394d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/dict.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef HEADER_CURL_DICT_H -#define HEADER_CURL_DICT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifndef CURL_DISABLE_DICT -extern const struct Curl_handler Curl_handler_dict; -#endif - -#endif /* HEADER_CURL_DICT_H */ diff --git a/build/premake/premake5/contrib/curl/lib/dotdot.c b/build/premake/premake5/contrib/curl/lib/dotdot.c deleted file mode 100644 index ea7c8a04f6..0000000000 --- a/build/premake/premake5/contrib/curl/lib/dotdot.c +++ /dev/null @@ -1,179 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "dotdot.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -/* - * "Remove Dot Segments" - * https://tools.ietf.org/html/rfc3986#section-5.2.4 - */ - -/* - * Curl_dedotdotify() - * @unittest: 1395 - * - * This function gets a zero-terminated path with dot and dotdot sequences - * passed in and strips them off according to the rules in RFC 3986 section - * 5.2.4. - * - * The function handles a query part ('?' + stuff) appended but it expects - * that fragments ('#' + stuff) have already been cut off. - * - * RETURNS - * - * an allocated dedotdotified output string - */ -char *Curl_dedotdotify(const char *input) -{ - size_t inlen = strlen(input); - char *clone; - size_t clen = inlen; /* the length of the cloned input */ - char *out = malloc(inlen+1); - char *outptr; - char *orgclone; - char *queryp; - if(!out) - return NULL; /* out of memory */ - - /* get a cloned copy of the input */ - clone = strdup(input); - if(!clone) { - free(out); - return NULL; - } - orgclone = clone; - outptr = out; - - if(!*clone) { - /* zero length string, return that */ - free(out); - return clone; - } - - /* - * To handle query-parts properly, we must find it and remove it during the - * dotdot-operation and then append it again at the end to the output - * string. - */ - queryp = strchr(clone, '?'); - if(queryp) - *queryp = 0; - - do { - - /* A. If the input buffer begins with a prefix of "../" or "./", then - remove that prefix from the input buffer; otherwise, */ - - if(!strncmp("./", clone, 2)) { - clone+=2; - clen-=2; - } - else if(!strncmp("../", clone, 3)) { - clone+=3; - clen-=3; - } - - /* B. if the input buffer begins with a prefix of "/./" or "/.", where - "." is a complete path segment, then replace that prefix with "/" in - the input buffer; otherwise, */ - else if(!strncmp("/./", clone, 3)) { - clone+=2; - clen-=2; - } - else if(!strcmp("/.", clone)) { - clone[1]='/'; - clone++; - clen-=1; - } - - /* C. if the input buffer begins with a prefix of "/../" or "/..", where - ".." is a complete path segment, then replace that prefix with "/" in - the input buffer and remove the last segment and its preceding "/" (if - any) from the output buffer; otherwise, */ - - else if(!strncmp("/../", clone, 4)) { - clone+=3; - clen-=3; - /* remove the last segment from the output buffer */ - while(outptr > out) { - outptr--; - if(*outptr == '/') - break; - } - *outptr = 0; /* zero-terminate where it stops */ - } - else if(!strcmp("/..", clone)) { - clone[2]='/'; - clone+=2; - clen-=2; - /* remove the last segment from the output buffer */ - while(outptr > out) { - outptr--; - if(*outptr == '/') - break; - } - *outptr = 0; /* zero-terminate where it stops */ - } - - /* D. if the input buffer consists only of "." or "..", then remove - that from the input buffer; otherwise, */ - - else if(!strcmp(".", clone) || !strcmp("..", clone)) { - *clone=0; - } - - else { - /* E. move the first path segment in the input buffer to the end of - the output buffer, including the initial "/" character (if any) and - any subsequent characters up to, but not including, the next "/" - character or the end of the input buffer. */ - - do { - *outptr++ = *clone++; - clen--; - } while(*clone && (*clone != '/')); - *outptr = 0; - } - - } while(*clone); - - if(queryp) { - size_t qlen; - /* There was a query part, append that to the output. The 'clone' string - may now have been altered so we copy from the original input string - from the correct index. */ - size_t oindex = queryp - orgclone; - qlen = strlen(&input[oindex]); - memcpy(outptr, &input[oindex], qlen+1); /* include the ending zero byte */ - } - - free(orgclone); - return out; -} diff --git a/build/premake/premake5/contrib/curl/lib/dotdot.h b/build/premake/premake5/contrib/curl/lib/dotdot.h deleted file mode 100644 index fac8e6f2ad..0000000000 --- a/build/premake/premake5/contrib/curl/lib/dotdot.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef HEADER_CURL_DOTDOT_H -#define HEADER_CURL_DOTDOT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -char *Curl_dedotdotify(const char *input); -#endif diff --git a/build/premake/premake5/contrib/curl/lib/easy.c b/build/premake/premake5/contrib/curl/lib/easy.c deleted file mode 100644 index bed94a4444..0000000000 --- a/build/premake/premake5/contrib/curl/lib/easy.c +++ /dev/null @@ -1,1117 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -/* - * See comment in curl_memory.h for the explanation of this sanity check. - */ - -#ifdef CURLX_NO_MEMORY_CALLBACKS -#error "libcurl shall not ever be built with CURLX_NO_MEMORY_CALLBACKS defined" -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#include "urldata.h" -#include -#include "transfer.h" -#include "vtls/vtls.h" -#include "url.h" -#include "getinfo.h" -#include "hostip.h" -#include "share.h" -#include "strdup.h" -#include "progress.h" -#include "easyif.h" -#include "select.h" -#include "sendf.h" /* for failf function prototype */ -#include "connect.h" /* for Curl_getconnectinfo */ -#include "slist.h" -#include "amigaos.h" -#include "non-ascii.h" -#include "warnless.h" -#include "conncache.h" -#include "multiif.h" -#include "sigpipe.h" -#include "ssh.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -void Curl_version_init(void); - -/* win32_cleanup() is for win32 socket cleanup functionality, the opposite - of win32_init() */ -static void win32_cleanup(void) -{ -#ifdef USE_WINSOCK - WSACleanup(); -#endif -#ifdef USE_WINDOWS_SSPI - Curl_sspi_global_cleanup(); -#endif -} - -/* win32_init() performs win32 socket initialization to properly setup the - stack to allow networking */ -static CURLcode win32_init(void) -{ -#ifdef USE_WINSOCK - WORD wVersionRequested; - WSADATA wsaData; - int res; - -#if defined(ENABLE_IPV6) && (USE_WINSOCK < 2) - Error IPV6_requires_winsock2 -#endif - - wVersionRequested = MAKEWORD(USE_WINSOCK, USE_WINSOCK); - - res = WSAStartup(wVersionRequested, &wsaData); - - if(res != 0) - /* Tell the user that we couldn't find a useable */ - /* winsock.dll. */ - return CURLE_FAILED_INIT; - - /* Confirm that the Windows Sockets DLL supports what we need.*/ - /* Note that if the DLL supports versions greater */ - /* than wVersionRequested, it will still return */ - /* wVersionRequested in wVersion. wHighVersion contains the */ - /* highest supported version. */ - - if(LOBYTE(wsaData.wVersion) != LOBYTE(wVersionRequested) || - HIBYTE(wsaData.wVersion) != HIBYTE(wVersionRequested) ) { - /* Tell the user that we couldn't find a useable */ - - /* winsock.dll. */ - WSACleanup(); - return CURLE_FAILED_INIT; - } - /* The Windows Sockets DLL is acceptable. Proceed. */ -#elif defined(USE_LWIPSOCK) - lwip_init(); -#endif - -#ifdef USE_WINDOWS_SSPI - { - CURLcode result = Curl_sspi_global_init(); - if(result) - return result; - } -#endif - - return CURLE_OK; -} - -/* true globals -- for curl_global_init() and curl_global_cleanup() */ -static unsigned int initialized; -static long init_flags; - -/* - * strdup (and other memory functions) is redefined in complicated - * ways, but at this point it must be defined as the system-supplied strdup - * so the callback pointer is initialized correctly. - */ -#if defined(_WIN32_WCE) -#define system_strdup _strdup -#elif !defined(HAVE_STRDUP) -#define system_strdup curlx_strdup -#else -#define system_strdup strdup -#endif - -#if defined(_MSC_VER) && defined(_DLL) && !defined(__POCC__) -# pragma warning(disable:4232) /* MSVC extension, dllimport identity */ -#endif - -#ifndef __SYMBIAN32__ -/* - * If a memory-using function (like curl_getenv) is used before - * curl_global_init() is called, we need to have these pointers set already. - */ -curl_malloc_callback Curl_cmalloc = (curl_malloc_callback)malloc; -curl_free_callback Curl_cfree = (curl_free_callback)free; -curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc; -curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)system_strdup; -curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc; -#if defined(WIN32) && defined(UNICODE) -curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup; -#endif -#else -/* - * Symbian OS doesn't support initialization to code in writeable static data. - * Initialization will occur in the curl_global_init() call. - */ -curl_malloc_callback Curl_cmalloc; -curl_free_callback Curl_cfree; -curl_realloc_callback Curl_crealloc; -curl_strdup_callback Curl_cstrdup; -curl_calloc_callback Curl_ccalloc; -#endif - -#if defined(_MSC_VER) && defined(_DLL) && !defined(__POCC__) -# pragma warning(default:4232) /* MSVC extension, dllimport identity */ -#endif - -/** - * curl_global_init() globally initializes curl given a bitwise set of the - * different features of what to initialize. - */ -static CURLcode global_init(long flags, bool memoryfuncs) -{ - if(initialized++) - return CURLE_OK; - - if(memoryfuncs) { - /* Setup the default memory functions here (again) */ - Curl_cmalloc = (curl_malloc_callback)malloc; - Curl_cfree = (curl_free_callback)free; - Curl_crealloc = (curl_realloc_callback)realloc; - Curl_cstrdup = (curl_strdup_callback)system_strdup; - Curl_ccalloc = (curl_calloc_callback)calloc; -#if defined(WIN32) && defined(UNICODE) - Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup; -#endif - } - - if(flags & CURL_GLOBAL_SSL) - if(!Curl_ssl_init()) { - DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n")); - return CURLE_FAILED_INIT; - } - - if(flags & CURL_GLOBAL_WIN32) - if(win32_init()) { - DEBUGF(fprintf(stderr, "Error: win32_init failed\n")); - return CURLE_FAILED_INIT; - } - -#ifdef __AMIGA__ - if(!Curl_amiga_init()) { - DEBUGF(fprintf(stderr, "Error: Curl_amiga_init failed\n")); - return CURLE_FAILED_INIT; - } -#endif - -#ifdef NETWARE - if(netware_init()) { - DEBUGF(fprintf(stderr, "Warning: LONG namespace not available\n")); - } -#endif - - if(Curl_resolver_global_init()) { - DEBUGF(fprintf(stderr, "Error: resolver_global_init failed\n")); - return CURLE_FAILED_INIT; - } - - (void)Curl_ipv6works(); - -#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_INIT) - if(libssh2_init(0)) { - DEBUGF(fprintf(stderr, "Error: libssh2_init failed\n")); - return CURLE_FAILED_INIT; - } -#endif - - if(flags & CURL_GLOBAL_ACK_EINTR) - Curl_ack_eintr = 1; - - init_flags = flags; - - Curl_version_init(); - - return CURLE_OK; -} - - -/** - * curl_global_init() globally initializes curl given a bitwise set of the - * different features of what to initialize. - */ -CURLcode curl_global_init(long flags) -{ - return global_init(flags, TRUE); -} - -/* - * curl_global_init_mem() globally initializes curl and also registers the - * user provided callback routines. - */ -CURLcode curl_global_init_mem(long flags, curl_malloc_callback m, - curl_free_callback f, curl_realloc_callback r, - curl_strdup_callback s, curl_calloc_callback c) -{ - /* Invalid input, return immediately */ - if(!m || !f || !r || !s || !c) - return CURLE_FAILED_INIT; - - if(initialized) { - /* Already initialized, don't do it again, but bump the variable anyway to - work like curl_global_init() and require the same amount of cleanup - calls. */ - initialized++; - return CURLE_OK; - } - - /* set memory functions before global_init() in case it wants memory - functions */ - Curl_cmalloc = m; - Curl_cfree = f; - Curl_cstrdup = s; - Curl_crealloc = r; - Curl_ccalloc = c; - - /* Call the actual init function, but without setting */ - return global_init(flags, FALSE); -} - -/** - * curl_global_cleanup() globally cleanups curl, uses the value of - * "init_flags" to determine what needs to be cleaned up and what doesn't. - */ -void curl_global_cleanup(void) -{ - if(!initialized) - return; - - if(--initialized) - return; - - Curl_global_host_cache_dtor(); - - if(init_flags & CURL_GLOBAL_SSL) - Curl_ssl_cleanup(); - - Curl_resolver_global_cleanup(); - - if(init_flags & CURL_GLOBAL_WIN32) - win32_cleanup(); - - Curl_amiga_cleanup(); - -#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_EXIT) - (void)libssh2_exit(); -#endif - - init_flags = 0; -} - -/* - * curl_easy_init() is the external interface to alloc, setup and init an - * easy handle that is returned. If anything goes wrong, NULL is returned. - */ -struct Curl_easy *curl_easy_init(void) -{ - CURLcode result; - struct Curl_easy *data; - - /* Make sure we inited the global SSL stuff */ - if(!initialized) { - result = curl_global_init(CURL_GLOBAL_DEFAULT); - if(result) { - /* something in the global init failed, return nothing */ - DEBUGF(fprintf(stderr, "Error: curl_global_init failed\n")); - return NULL; - } - } - - /* We use curl_open() with undefined URL so far */ - result = Curl_open(&data); - if(result) { - DEBUGF(fprintf(stderr, "Error: Curl_open failed\n")); - return NULL; - } - - return data; -} - -/* - * curl_easy_setopt() is the external interface for setting options on an - * easy handle. - */ - -#undef curl_easy_setopt -CURLcode curl_easy_setopt(struct Curl_easy *data, CURLoption tag, ...) -{ - va_list arg; - CURLcode result; - - if(!data) - return CURLE_BAD_FUNCTION_ARGUMENT; - - va_start(arg, tag); - - result = Curl_setopt(data, tag, arg); - - va_end(arg); - return result; -} - -#ifdef CURLDEBUG - -struct socketmonitor { - struct socketmonitor *next; /* the next node in the list or NULL */ - struct pollfd socket; /* socket info of what to monitor */ -}; - -struct events { - long ms; /* timeout, run the timeout function when reached */ - bool msbump; /* set TRUE when timeout is set by callback */ - int num_sockets; /* number of nodes in the monitor list */ - struct socketmonitor *list; /* list of sockets to monitor */ - int running_handles; /* store the returned number */ -}; - -/* events_timer - * - * Callback that gets called with a new value when the timeout should be - * updated. - */ - -static int events_timer(struct Curl_multi *multi, /* multi handle */ - long timeout_ms, /* see above */ - void *userp) /* private callback pointer */ -{ - struct events *ev = userp; - (void)multi; - if(timeout_ms == -1) - /* timeout removed */ - timeout_ms = 0; - else if(timeout_ms == 0) - /* timeout is already reached! */ - timeout_ms = 1; /* trigger asap */ - - ev->ms = timeout_ms; - ev->msbump = TRUE; - return 0; -} - - -/* poll2cselect - * - * convert from poll() bit definitions to libcurl's CURL_CSELECT_* ones - */ -static int poll2cselect(int pollmask) -{ - int omask=0; - if(pollmask & POLLIN) - omask |= CURL_CSELECT_IN; - if(pollmask & POLLOUT) - omask |= CURL_CSELECT_OUT; - if(pollmask & POLLERR) - omask |= CURL_CSELECT_ERR; - return omask; -} - - -/* socketcb2poll - * - * convert from libcurl' CURL_POLL_* bit definitions to poll()'s - */ -static short socketcb2poll(int pollmask) -{ - short omask=0; - if(pollmask & CURL_POLL_IN) - omask |= POLLIN; - if(pollmask & CURL_POLL_OUT) - omask |= POLLOUT; - return omask; -} - -/* events_socket - * - * Callback that gets called with information about socket activity to - * monitor. - */ -static int events_socket(struct Curl_easy *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int what, /* see above */ - void *userp, /* private callback - pointer */ - void *socketp) /* private socket - pointer */ -{ - struct events *ev = userp; - struct socketmonitor *m; - struct socketmonitor *prev=NULL; - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) easy; -#endif - (void)socketp; - - m = ev->list; - while(m) { - if(m->socket.fd == s) { - - if(what == CURL_POLL_REMOVE) { - struct socketmonitor *nxt = m->next; - /* remove this node from the list of monitored sockets */ - if(prev) - prev->next = nxt; - else - ev->list = nxt; - free(m); - m = nxt; - infof(easy, "socket cb: socket %d REMOVED\n", s); - } - else { - /* The socket 's' is already being monitored, update the activity - mask. Convert from libcurl bitmask to the poll one. */ - m->socket.events = socketcb2poll(what); - infof(easy, "socket cb: socket %d UPDATED as %s%s\n", s, - what&CURL_POLL_IN?"IN":"", - what&CURL_POLL_OUT?"OUT":""); - } - break; - } - prev = m; - m = m->next; /* move to next node */ - } - if(!m) { - if(what == CURL_POLL_REMOVE) { - /* this happens a bit too often, libcurl fix perhaps? */ - /* fprintf(stderr, - "%s: socket %d asked to be REMOVED but not present!\n", - __func__, s); */ - } - else { - m = malloc(sizeof(struct socketmonitor)); - if(m) { - m->next = ev->list; - m->socket.fd = s; - m->socket.events = socketcb2poll(what); - m->socket.revents = 0; - ev->list = m; - infof(easy, "socket cb: socket %d ADDED as %s%s\n", s, - what&CURL_POLL_IN?"IN":"", - what&CURL_POLL_OUT?"OUT":""); - } - else - return CURLE_OUT_OF_MEMORY; - } - } - - return 0; -} - - -/* - * events_setup() - * - * Do the multi handle setups that only event-based transfers need. - */ -static void events_setup(struct Curl_multi *multi, struct events *ev) -{ - /* timer callback */ - curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, events_timer); - curl_multi_setopt(multi, CURLMOPT_TIMERDATA, ev); - - /* socket callback */ - curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, events_socket); - curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, ev); -} - - -/* wait_or_timeout() - * - * waits for activity on any of the given sockets, or the timeout to trigger. - */ - -static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) -{ - bool done = FALSE; - CURLMcode mcode; - CURLcode result = CURLE_OK; - - while(!done) { - CURLMsg *msg; - struct socketmonitor *m; - struct pollfd *f; - struct pollfd fds[4]; - int numfds=0; - int pollrc; - int i; - struct timeval before; - struct timeval after; - - /* populate the fds[] array */ - for(m = ev->list, f=&fds[0]; m; m = m->next) { - f->fd = m->socket.fd; - f->events = m->socket.events; - f->revents = 0; - /* fprintf(stderr, "poll() %d check socket %d\n", numfds, f->fd); */ - f++; - numfds++; - } - - /* get the time stamp to use to figure out how long poll takes */ - before = curlx_tvnow(); - - /* wait for activity or timeout */ - pollrc = Curl_poll(fds, numfds, (int)ev->ms); - - after = curlx_tvnow(); - - ev->msbump = FALSE; /* reset here */ - - if(0 == pollrc) { - /* timeout! */ - ev->ms = 0; - /* fprintf(stderr, "call curl_multi_socket_action(TIMEOUT)\n"); */ - mcode = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, - &ev->running_handles); - } - else if(pollrc > 0) { - /* loop over the monitored sockets to see which ones had activity */ - for(i = 0; i< numfds; i++) { - if(fds[i].revents) { - /* socket activity, tell libcurl */ - int act = poll2cselect(fds[i].revents); /* convert */ - infof(multi->easyp, "call curl_multi_socket_action(socket %d)\n", - fds[i].fd); - mcode = curl_multi_socket_action(multi, fds[i].fd, act, - &ev->running_handles); - } - } - - if(!ev->msbump) - /* If nothing updated the timeout, we decrease it by the spent time. - * If it was updated, it has the new timeout time stored already. - */ - ev->ms += curlx_tvdiff(after, before); - - } - else - return CURLE_RECV_ERROR; - - if(mcode) - return CURLE_URL_MALFORMAT; /* TODO: return a proper error! */ - - /* we don't really care about the "msgs_in_queue" value returned in the - second argument */ - msg = curl_multi_info_read(multi, &pollrc); - if(msg) { - result = msg->data.result; - done = TRUE; - } - } - - return result; -} - - -/* easy_events() - * - * Runs a transfer in a blocking manner using the events-based API - */ -static CURLcode easy_events(struct Curl_multi *multi) -{ - struct events evs= {2, FALSE, 0, NULL, 0}; - - /* if running event-based, do some further multi inits */ - events_setup(multi, &evs); - - return wait_or_timeout(multi, &evs); -} -#else /* CURLDEBUG */ -/* when not built with debug, this function doesn't exist */ -#define easy_events(x) CURLE_NOT_BUILT_IN -#endif - -static CURLcode easy_transfer(struct Curl_multi *multi) -{ - bool done = FALSE; - CURLMcode mcode = CURLM_OK; - CURLcode result = CURLE_OK; - struct timeval before; - int without_fds = 0; /* count number of consecutive returns from - curl_multi_wait() without any filedescriptors */ - - while(!done && !mcode) { - int still_running = 0; - int rc; - - before = curlx_tvnow(); - mcode = curl_multi_wait(multi, NULL, 0, 1000, &rc); - - if(!mcode) { - if(!rc) { - struct timeval after = curlx_tvnow(); - - /* If it returns without any filedescriptor instantly, we need to - avoid busy-looping during periods where it has nothing particular - to wait for */ - if(curlx_tvdiff(after, before) <= 10) { - without_fds++; - if(without_fds > 2) { - int sleep_ms = without_fds < 10 ? (1 << (without_fds - 1)) : 1000; - Curl_wait_ms(sleep_ms); - } - } - else - /* it wasn't "instant", restart counter */ - without_fds = 0; - } - else - /* got file descriptor, restart counter */ - without_fds = 0; - - mcode = curl_multi_perform(multi, &still_running); - } - - /* only read 'still_running' if curl_multi_perform() return OK */ - if(!mcode && !still_running) { - CURLMsg *msg = curl_multi_info_read(multi, &rc); - if(msg) { - result = msg->data.result; - done = TRUE; - } - } - } - - /* Make sure to return some kind of error if there was a multi problem */ - if(mcode) { - result = (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY : - /* The other multi errors should never happen, so return - something suitably generic */ - CURLE_BAD_FUNCTION_ARGUMENT; - } - - return result; -} - - -/* - * easy_perform() is the external interface that performs a blocking - * transfer as previously setup. - * - * CONCEPT: This function creates a multi handle, adds the easy handle to it, - * runs curl_multi_perform() until the transfer is done, then detaches the - * easy handle, destroys the multi handle and returns the easy handle's return - * code. - * - * REALITY: it can't just create and destroy the multi handle that easily. It - * needs to keep it around since if this easy handle is used again by this - * function, the same multi handle must be re-used so that the same pools and - * caches can be used. - * - * DEBUG: if 'events' is set TRUE, this function will use a replacement engine - * instead of curl_multi_perform() and use curl_multi_socket_action(). - */ -static CURLcode easy_perform(struct Curl_easy *data, bool events) -{ - struct Curl_multi *multi; - CURLMcode mcode; - CURLcode result = CURLE_OK; - SIGPIPE_VARIABLE(pipe_st); - - if(!data) - return CURLE_BAD_FUNCTION_ARGUMENT; - - if(data->multi) { - failf(data, "easy handle already used in multi handle"); - return CURLE_FAILED_INIT; - } - - if(data->multi_easy) - multi = data->multi_easy; - else { - /* this multi handle will only ever have a single easy handled attached - to it, so make it use minimal hashes */ - multi = Curl_multi_handle(1, 3); - if(!multi) - return CURLE_OUT_OF_MEMORY; - data->multi_easy = multi; - } - - /* Copy the MAXCONNECTS option to the multi handle */ - curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, data->set.maxconnects); - - mcode = curl_multi_add_handle(multi, data); - if(mcode) { - curl_multi_cleanup(multi); - if(mcode == CURLM_OUT_OF_MEMORY) - return CURLE_OUT_OF_MEMORY; - else - return CURLE_FAILED_INIT; - } - - sigpipe_ignore(data, &pipe_st); - - /* assign this after curl_multi_add_handle() since that function checks for - it and rejects this handle otherwise */ - data->multi = multi; - - /* run the transfer */ - result = events ? easy_events(multi) : easy_transfer(multi); - - /* ignoring the return code isn't nice, but atm we can't really handle - a failure here, room for future improvement! */ - (void)curl_multi_remove_handle(multi, data); - - sigpipe_restore(&pipe_st); - - /* The multi handle is kept alive, owned by the easy handle */ - return result; -} - - -/* - * curl_easy_perform() is the external interface that performs a blocking - * transfer as previously setup. - */ -CURLcode curl_easy_perform(struct Curl_easy *data) -{ - return easy_perform(data, FALSE); -} - -#ifdef CURLDEBUG -/* - * curl_easy_perform_ev() is the external interface that performs a blocking - * transfer using the event-based API internally. - */ -CURLcode curl_easy_perform_ev(struct Curl_easy *data) -{ - return easy_perform(data, TRUE); -} - -#endif - -/* - * curl_easy_cleanup() is the external interface to cleaning/freeing the given - * easy handle. - */ -void curl_easy_cleanup(struct Curl_easy *data) -{ - SIGPIPE_VARIABLE(pipe_st); - - if(!data) - return; - - sigpipe_ignore(data, &pipe_st); - Curl_close(data); - sigpipe_restore(&pipe_st); -} - -/* - * curl_easy_getinfo() is an external interface that allows an app to retrieve - * information from a performed transfer and similar. - */ -#undef curl_easy_getinfo -CURLcode curl_easy_getinfo(struct Curl_easy *data, CURLINFO info, ...) -{ - va_list arg; - void *paramp; - CURLcode result; - - va_start(arg, info); - paramp = va_arg(arg, void *); - - result = Curl_getinfo(data, info, paramp); - - va_end(arg); - return result; -} - -/* - * curl_easy_duphandle() is an external interface to allow duplication of a - * given input easy handle. The returned handle will be a new working handle - * with all options set exactly as the input source handle. - */ -struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) -{ - struct Curl_easy *outcurl = calloc(1, sizeof(struct Curl_easy)); - if(NULL == outcurl) - goto fail; - - /* - * We setup a few buffers we need. We should probably make them - * get setup on-demand in the code, as that would probably decrease - * the likeliness of us forgetting to init a buffer here in the future. - */ - outcurl->set.buffer_size = data->set.buffer_size; - outcurl->state.buffer = malloc(CURL_BUFSIZE(outcurl->set.buffer_size) + 1); - if(!outcurl->state.buffer) - goto fail; - - outcurl->state.headerbuff = malloc(HEADERSIZE); - if(!outcurl->state.headerbuff) - goto fail; - outcurl->state.headersize = HEADERSIZE; - - /* copy all userdefined values */ - if(Curl_dupset(outcurl, data)) - goto fail; - - /* the connection cache is setup on demand */ - outcurl->state.conn_cache = NULL; - - outcurl->state.lastconnect = NULL; - - outcurl->progress.flags = data->progress.flags; - outcurl->progress.callback = data->progress.callback; - - if(data->cookies) { - /* If cookies are enabled in the parent handle, we enable them - in the clone as well! */ - outcurl->cookies = Curl_cookie_init(data, - data->cookies->filename, - outcurl->cookies, - data->set.cookiesession); - if(!outcurl->cookies) - goto fail; - } - - /* duplicate all values in 'change' */ - if(data->change.cookielist) { - outcurl->change.cookielist = - Curl_slist_duplicate(data->change.cookielist); - if(!outcurl->change.cookielist) - goto fail; - } - - if(data->change.url) { - outcurl->change.url = strdup(data->change.url); - if(!outcurl->change.url) - goto fail; - outcurl->change.url_alloc = TRUE; - } - - if(data->change.referer) { - outcurl->change.referer = strdup(data->change.referer); - if(!outcurl->change.referer) - goto fail; - outcurl->change.referer_alloc = TRUE; - } - - /* Clone the resolver handle, if present, for the new handle */ - if(Curl_resolver_duphandle(&outcurl->state.resolver, - data->state.resolver)) - goto fail; - - Curl_convert_setup(outcurl); - - Curl_initinfo(outcurl); - - outcurl->magic = CURLEASY_MAGIC_NUMBER; - - /* we reach this point and thus we are OK */ - - return outcurl; - - fail: - - if(outcurl) { - curl_slist_free_all(outcurl->change.cookielist); - outcurl->change.cookielist = NULL; - Curl_safefree(outcurl->state.buffer); - Curl_safefree(outcurl->state.headerbuff); - Curl_safefree(outcurl->change.url); - Curl_safefree(outcurl->change.referer); - Curl_freeset(outcurl); - free(outcurl); - } - - return NULL; -} - -/* - * curl_easy_reset() is an external interface that allows an app to re- - * initialize a session handle to the default values. - */ -void curl_easy_reset(struct Curl_easy *data) -{ - Curl_safefree(data->state.pathbuffer); - - data->state.path = NULL; - - Curl_free_request_state(data); - - /* zero out UserDefined data: */ - Curl_freeset(data); - memset(&data->set, 0, sizeof(struct UserDefined)); - (void)Curl_init_userdefined(&data->set); - - /* zero out Progress data: */ - memset(&data->progress, 0, sizeof(struct Progress)); - - /* zero out PureInfo data: */ - Curl_initinfo(data); - - data->progress.flags |= PGRS_HIDE; - data->state.current_speed = -1; /* init to negative == impossible */ -} - -/* - * curl_easy_pause() allows an application to pause or unpause a specific - * transfer and direction. This function sets the full new state for the - * current connection this easy handle operates on. - * - * NOTE: if you have the receiving paused and you call this function to remove - * the pausing, you may get your write callback called at this point. - * - * Action is a bitmask consisting of CURLPAUSE_* bits in curl/curl.h - */ -CURLcode curl_easy_pause(struct Curl_easy *data, int action) -{ - struct SingleRequest *k = &data->req; - CURLcode result = CURLE_OK; - - /* first switch off both pause bits */ - int newstate = k->keepon &~ (KEEP_RECV_PAUSE| KEEP_SEND_PAUSE); - - /* set the new desired pause bits */ - newstate |= ((action & CURLPAUSE_RECV)?KEEP_RECV_PAUSE:0) | - ((action & CURLPAUSE_SEND)?KEEP_SEND_PAUSE:0); - - /* put it back in the keepon */ - k->keepon = newstate; - - if(!(newstate & KEEP_RECV_PAUSE) && data->state.tempwrite) { - /* we have a buffer for sending that we now seem to be able to deliver - since the receive pausing is lifted! */ - - /* get the pointer in local copy since the function may return PAUSE - again and then we'll get a new copy allocted and stored in - the tempwrite variables */ - char *tempwrite = data->state.tempwrite; - - data->state.tempwrite = NULL; - result = Curl_client_chop_write(data->easy_conn, data->state.tempwritetype, - tempwrite, data->state.tempwritesize); - free(tempwrite); - } - - /* if there's no error and we're not pausing both directions, we want - to have this handle checked soon */ - if(!result && - ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) != - (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) ) - Curl_expire(data, 0); /* get this handle going again */ - - return result; -} - - -static CURLcode easy_connection(struct Curl_easy *data, - curl_socket_t *sfd, - struct connectdata **connp) -{ - if(data == NULL) - return CURLE_BAD_FUNCTION_ARGUMENT; - - /* only allow these to be called on handles with CURLOPT_CONNECT_ONLY */ - if(!data->set.connect_only) { - failf(data, "CONNECT_ONLY is required!"); - return CURLE_UNSUPPORTED_PROTOCOL; - } - - *sfd = Curl_getconnectinfo(data, connp); - - if(*sfd == CURL_SOCKET_BAD) { - failf(data, "Failed to get recent socket"); - return CURLE_UNSUPPORTED_PROTOCOL; - } - - return CURLE_OK; -} - -/* - * Receives data from the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - * Returns CURLE_OK on success, error code on error. - */ -CURLcode curl_easy_recv(struct Curl_easy *data, void *buffer, size_t buflen, - size_t *n) -{ - curl_socket_t sfd; - CURLcode result; - ssize_t n1; - struct connectdata *c; - - result = easy_connection(data, &sfd, &c); - if(result) - return result; - - *n = 0; - result = Curl_read(c, sfd, buffer, buflen, &n1); - - if(result) - return result; - - *n = (size_t)n1; - - return CURLE_OK; -} - -/* - * Sends data over the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer, - size_t buflen, size_t *n) -{ - curl_socket_t sfd; - CURLcode result; - ssize_t n1; - struct connectdata *c = NULL; - - result = easy_connection(data, &sfd, &c); - if(result) - return result; - - *n = 0; - result = Curl_write(c, sfd, buffer, buflen, &n1); - - if(n1 == -1) - return CURLE_SEND_ERROR; - - /* detect EAGAIN */ - if(!result && !n1) - return CURLE_AGAIN; - - *n = (size_t)n1; - - return result; -} diff --git a/build/premake/premake5/contrib/curl/lib/easyif.h b/build/premake/premake5/contrib/curl/lib/easyif.h deleted file mode 100644 index f6132cc70d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/easyif.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HEADER_CURL_EASYIF_H -#define HEADER_CURL_EASYIF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Prototypes for library-wide functions provided by easy.c - */ -#ifdef CURLDEBUG -CURL_EXTERN CURLcode curl_easy_perform_ev(struct Curl_easy *easy); -#endif - -#endif /* HEADER_CURL_EASYIF_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/escape.c b/build/premake/premake5/contrib/curl/lib/escape.c deleted file mode 100644 index 9c811b8ed1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/escape.c +++ /dev/null @@ -1,244 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* Escape and unescape URL encoding in strings. The functions return a new - * allocated string or NULL if an error occurred. */ - -#include "curl_setup.h" - -#include - -#include "urldata.h" -#include "warnless.h" -#include "non-ascii.h" -#include "escape.h" -#include "strdup.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Portable character check (remember EBCDIC). Do not use isalnum() because - its behavior is altered by the current locale. - See https://tools.ietf.org/html/rfc3986#section-2.3 -*/ -static bool Curl_isunreserved(unsigned char in) -{ - switch(in) { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': - case '-': case '.': case '_': case '~': - return TRUE; - default: - break; - } - return FALSE; -} - -/* for ABI-compatibility with previous versions */ -char *curl_escape(const char *string, int inlength) -{ - return curl_easy_escape(NULL, string, inlength); -} - -/* for ABI-compatibility with previous versions */ -char *curl_unescape(const char *string, int length) -{ - return curl_easy_unescape(NULL, string, length, NULL); -} - -char *curl_easy_escape(struct Curl_easy *data, const char *string, - int inlength) -{ - size_t alloc; - char *ns; - char *testing_ptr = NULL; - unsigned char in; /* we need to treat the characters unsigned */ - size_t newlen; - size_t strindex=0; - size_t length; - CURLcode result; - - if(inlength < 0) - return NULL; - - alloc = (inlength?(size_t)inlength:strlen(string))+1; - newlen = alloc; - - ns = malloc(alloc); - if(!ns) - return NULL; - - length = alloc-1; - while(length--) { - in = *string; - - if(Curl_isunreserved(in)) - /* just copy this */ - ns[strindex++]=in; - else { - /* encode it */ - newlen += 2; /* the size grows with two, since this'll become a %XX */ - if(newlen > alloc) { - alloc *= 2; - testing_ptr = Curl_saferealloc(ns, alloc); - if(!testing_ptr) - return NULL; - else { - ns = testing_ptr; - } - } - - result = Curl_convert_to_network(data, &in, 1); - if(result) { - /* Curl_convert_to_network calls failf if unsuccessful */ - free(ns); - return NULL; - } - - snprintf(&ns[strindex], 4, "%%%02X", in); - - strindex+=3; - } - string++; - } - ns[strindex]=0; /* terminate it */ - return ns; -} - -/* - * Curl_urldecode() URL decodes the given string. - * - * Optionally detects control characters (byte codes lower than 32) in the - * data and rejects such data. - * - * Returns a pointer to a malloced string in *ostring with length given in - * *olen. If length == 0, the length is assumed to be strlen(string). - * - */ -CURLcode Curl_urldecode(struct Curl_easy *data, - const char *string, size_t length, - char **ostring, size_t *olen, - bool reject_ctrl) -{ - size_t alloc = (length?length:strlen(string))+1; - char *ns = malloc(alloc); - unsigned char in; - size_t strindex=0; - unsigned long hex; - CURLcode result; - - if(!ns) - return CURLE_OUT_OF_MEMORY; - - while(--alloc > 0) { - in = *string; - if(('%' == in) && (alloc > 2) && - ISXDIGIT(string[1]) && ISXDIGIT(string[2])) { - /* this is two hexadecimal digits following a '%' */ - char hexstr[3]; - char *ptr; - hexstr[0] = string[1]; - hexstr[1] = string[2]; - hexstr[2] = 0; - - hex = strtoul(hexstr, &ptr, 16); - - in = curlx_ultouc(hex); /* this long is never bigger than 255 anyway */ - - result = Curl_convert_from_network(data, &in, 1); - if(result) { - /* Curl_convert_from_network calls failf if unsuccessful */ - free(ns); - return result; - } - - string+=2; - alloc-=2; - } - - if(reject_ctrl && (in < 0x20)) { - free(ns); - return CURLE_URL_MALFORMAT; - } - - ns[strindex++] = in; - string++; - } - ns[strindex]=0; /* terminate it */ - - if(olen) - /* store output size */ - *olen = strindex; - - /* store output string */ - *ostring = ns; - - return CURLE_OK; -} - -/* - * Unescapes the given URL escaped string of given length. Returns a - * pointer to a malloced string with length given in *olen. - * If length == 0, the length is assumed to be strlen(string). - * If olen == NULL, no output length is stored. - */ -char *curl_easy_unescape(struct Curl_easy *data, const char *string, - int length, int *olen) -{ - char *str = NULL; - if(length >= 0) { - size_t inputlen = length; - size_t outputlen; - CURLcode res = Curl_urldecode(data, string, inputlen, &str, &outputlen, - FALSE); - if(res) - return NULL; - - if(olen) { - if(outputlen <= (size_t) INT_MAX) - *olen = curlx_uztosi(outputlen); - else - /* too large to return in an int, fail! */ - Curl_safefree(str); - } - } - return str; -} - -/* For operating systems/environments that use different malloc/free - systems for the app and for this library, we provide a free that uses - the library's memory system */ -void curl_free(void *p) -{ - free(p); -} diff --git a/build/premake/premake5/contrib/curl/lib/escape.h b/build/premake/premake5/contrib/curl/lib/escape.h deleted file mode 100644 index 638666f039..0000000000 --- a/build/premake/premake5/contrib/curl/lib/escape.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HEADER_CURL_ESCAPE_H -#define HEADER_CURL_ESCAPE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -/* Escape and unescape URL encoding in strings. The functions return a new - * allocated string or NULL if an error occurred. */ - -CURLcode Curl_urldecode(struct Curl_easy *data, - const char *string, size_t length, - char **ostring, size_t *olen, - bool reject_crlf); - -#endif /* HEADER_CURL_ESCAPE_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/file.c b/build/premake/premake5/contrib/curl/lib/file.c deleted file mode 100644 index e90902c50e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/file.c +++ /dev/null @@ -1,598 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_FILE - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#include "strtoofft.h" -#include "urldata.h" -#include -#include "progress.h" -#include "sendf.h" -#include "escape.h" -#include "file.h" -#include "speedcheck.h" -#include "getinfo.h" -#include "transfer.h" -#include "url.h" -#include "parsedate.h" /* for the week day and month names */ -#include "warnless.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || \ - defined(__SYMBIAN32__) -#define DOS_FILESYSTEM 1 -#endif - -#ifdef OPEN_NEEDS_ARG3 -# define open_readonly(p,f) open((p),(f),(0)) -#else -# define open_readonly(p,f) open((p),(f)) -#endif - -/* - * Forward declarations. - */ - -static CURLcode file_do(struct connectdata *, bool *done); -static CURLcode file_done(struct connectdata *conn, - CURLcode status, bool premature); -static CURLcode file_connect(struct connectdata *conn, bool *done); -static CURLcode file_disconnect(struct connectdata *conn, - bool dead_connection); -static CURLcode file_setup_connection(struct connectdata *conn); - -/* - * FILE scheme handler. - */ - -const struct Curl_handler Curl_handler_file = { - "FILE", /* scheme */ - file_setup_connection, /* setup_connection */ - file_do, /* do_it */ - file_done, /* done */ - ZERO_NULL, /* do_more */ - file_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - file_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - 0, /* defport */ - CURLPROTO_FILE, /* protocol */ - PROTOPT_NONETWORK | PROTOPT_NOURLQUERY /* flags */ -}; - - -static CURLcode file_setup_connection(struct connectdata *conn) -{ - /* allocate the FILE specific struct */ - conn->data->req.protop = calloc(1, sizeof(struct FILEPROTO)); - if(!conn->data->req.protop) - return CURLE_OUT_OF_MEMORY; - - return CURLE_OK; -} - - /* - Check if this is a range download, and if so, set the internal variables - properly. This code is copied from the FTP implementation and might as - well be factored out. - */ -static CURLcode file_range(struct connectdata *conn) -{ - curl_off_t from, to; - curl_off_t totalsize=-1; - char *ptr; - char *ptr2; - struct Curl_easy *data = conn->data; - - if(data->state.use_range && data->state.range) { - from=curlx_strtoofft(data->state.range, &ptr, 0); - while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) - ptr++; - to=curlx_strtoofft(ptr, &ptr2, 0); - if(ptr == ptr2) { - /* we didn't get any digit */ - to=-1; - } - if((-1 == to) && (from>=0)) { - /* X - */ - data->state.resume_from = from; - DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n", - from)); - } - else if(from < 0) { - /* -Y */ - data->req.maxdownload = -from; - data->state.resume_from = from; - DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n", - -from)); - } - else { - /* X-Y */ - totalsize = to-from; - data->req.maxdownload = totalsize+1; /* include last byte */ - data->state.resume_from = from; - DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T - " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", - from, data->req.maxdownload)); - } - DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T - " to %" CURL_FORMAT_CURL_OFF_T ", totally %" - CURL_FORMAT_CURL_OFF_T " bytes\n", - from, to, data->req.maxdownload)); - } - else - data->req.maxdownload = -1; - return CURLE_OK; -} - -/* - * file_connect() gets called from Curl_protocol_connect() to allow us to - * do protocol-specific actions at connect-time. We emulate a - * connect-then-transfer protocol and "connect" to the file here - */ -static CURLcode file_connect(struct connectdata *conn, bool *done) -{ - struct Curl_easy *data = conn->data; - char *real_path; - struct FILEPROTO *file = data->req.protop; - int fd; -#ifdef DOS_FILESYSTEM - size_t i; - char *actual_path; -#endif - size_t real_path_len; - - CURLcode result = Curl_urldecode(data, data->state.path, 0, &real_path, - &real_path_len, FALSE); - if(result) - return result; - -#ifdef DOS_FILESYSTEM - /* If the first character is a slash, and there's - something that looks like a drive at the beginning of - the path, skip the slash. If we remove the initial - slash in all cases, paths without drive letters end up - relative to the current directory which isn't how - browsers work. - - Some browsers accept | instead of : as the drive letter - separator, so we do too. - - On other platforms, we need the slash to indicate an - absolute pathname. On Windows, absolute paths start - with a drive letter. - */ - actual_path = real_path; - if((actual_path[0] == '/') && - actual_path[1] && - (actual_path[2] == ':' || actual_path[2] == '|')) { - actual_path[2] = ':'; - actual_path++; - real_path_len--; - } - - /* change path separators from '/' to '\\' for DOS, Windows and OS/2 */ - for(i=0; i < real_path_len; ++i) - if(actual_path[i] == '/') - actual_path[i] = '\\'; - else if(!actual_path[i]) { /* binary zero */ - Curl_safefree(real_path); - return CURLE_URL_MALFORMAT; - } - - fd = open_readonly(actual_path, O_RDONLY|O_BINARY); - file->path = actual_path; -#else - if(memchr(real_path, 0, real_path_len)) { - /* binary zeroes indicate foul play */ - Curl_safefree(real_path); - return CURLE_URL_MALFORMAT; - } - - fd = open_readonly(real_path, O_RDONLY); - file->path = real_path; -#endif - file->freepath = real_path; /* free this when done */ - - file->fd = fd; - if(!data->set.upload && (fd == -1)) { - failf(data, "Couldn't open file %s", data->state.path); - file_done(conn, CURLE_FILE_COULDNT_READ_FILE, FALSE); - return CURLE_FILE_COULDNT_READ_FILE; - } - *done = TRUE; - - return CURLE_OK; -} - -static CURLcode file_done(struct connectdata *conn, - CURLcode status, bool premature) -{ - struct FILEPROTO *file = conn->data->req.protop; - (void)status; /* not used */ - (void)premature; /* not used */ - - if(file) { - Curl_safefree(file->freepath); - file->path = NULL; - if(file->fd != -1) - close(file->fd); - file->fd = -1; - } - - return CURLE_OK; -} - -static CURLcode file_disconnect(struct connectdata *conn, - bool dead_connection) -{ - struct FILEPROTO *file = conn->data->req.protop; - (void)dead_connection; /* not used */ - - if(file) { - Curl_safefree(file->freepath); - file->path = NULL; - if(file->fd != -1) - close(file->fd); - file->fd = -1; - } - - return CURLE_OK; -} - -#ifdef DOS_FILESYSTEM -#define DIRSEP '\\' -#else -#define DIRSEP '/' -#endif - -static CURLcode file_upload(struct connectdata *conn) -{ - struct FILEPROTO *file = conn->data->req.protop; - const char *dir = strchr(file->path, DIRSEP); - int fd; - int mode; - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - char *buf = data->state.buffer; - size_t nread; - size_t nwrite; - curl_off_t bytecount = 0; - struct timeval now = Curl_tvnow(); - struct_stat file_stat; - const char *buf2; - - /* - * Since FILE: doesn't do the full init, we need to provide some extra - * assignments here. - */ - conn->data->req.upload_fromhere = buf; - - if(!dir) - return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */ - - if(!dir[1]) - return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */ - -#ifdef O_BINARY -#define MODE_DEFAULT O_WRONLY|O_CREAT|O_BINARY -#else -#define MODE_DEFAULT O_WRONLY|O_CREAT -#endif - - if(data->state.resume_from) - mode = MODE_DEFAULT|O_APPEND; - else - mode = MODE_DEFAULT|O_TRUNC; - - fd = open(file->path, mode, conn->data->set.new_file_perms); - if(fd < 0) { - failf(data, "Can't open %s for writing", file->path); - return CURLE_WRITE_ERROR; - } - - if(-1 != data->state.infilesize) - /* known size of data to "upload" */ - Curl_pgrsSetUploadSize(data, data->state.infilesize); - - /* treat the negative resume offset value as the case of "-" */ - if(data->state.resume_from < 0) { - if(fstat(fd, &file_stat)) { - close(fd); - failf(data, "Can't get the size of %s", file->path); - return CURLE_WRITE_ERROR; - } - else - data->state.resume_from = (curl_off_t)file_stat.st_size; - } - - while(!result) { - int readcount; - result = Curl_fillreadbuffer(conn, BUFSIZE, &readcount); - if(result) - break; - - if(readcount <= 0) /* fix questionable compare error. curlvms */ - break; - - nread = (size_t)readcount; - - /*skip bytes before resume point*/ - if(data->state.resume_from) { - if((curl_off_t)nread <= data->state.resume_from) { - data->state.resume_from -= nread; - nread = 0; - buf2 = buf; - } - else { - buf2 = buf + data->state.resume_from; - nread -= (size_t)data->state.resume_from; - data->state.resume_from = 0; - } - } - else - buf2 = buf; - - /* write the data to the target */ - nwrite = write(fd, buf2, nread); - if(nwrite != nread) { - result = CURLE_SEND_ERROR; - break; - } - - bytecount += nread; - - Curl_pgrsSetUploadCounter(data, bytecount); - - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - else - result = Curl_speedcheck(data, now); - } - if(!result && Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - - close(fd); - - return result; -} - -/* - * file_do() is the protocol-specific function for the do-phase, separated - * from the connect-phase above. Other protocols merely setup the transfer in - * the do-phase, to have it done in the main transfer loop but since some - * platforms we support don't allow select()ing etc on file handles (as - * opposed to sockets) we instead perform the whole do-operation in this - * function. - */ -static CURLcode file_do(struct connectdata *conn, bool *done) -{ - /* This implementation ignores the host name in conformance with - RFC 1738. Only local files (reachable via the standard file system) - are supported. This means that files on remotely mounted directories - (via NFS, Samba, NT sharing) can be accessed through a file:// URL - */ - CURLcode result = CURLE_OK; - struct_stat statbuf; /* struct_stat instead of struct stat just to allow the - Windows version to have a different struct without - having to redefine the simple word 'stat' */ - curl_off_t expected_size=0; - bool size_known; - bool fstated=FALSE; - ssize_t nread; - struct Curl_easy *data = conn->data; - char *buf = data->state.buffer; - curl_off_t bytecount = 0; - int fd; - struct timeval now = Curl_tvnow(); - struct FILEPROTO *file; - - *done = TRUE; /* unconditionally */ - - Curl_initinfo(data); - Curl_pgrsStartNow(data); - - if(data->set.upload) - return file_upload(conn); - - file = conn->data->req.protop; - - /* get the fd from the connection phase */ - fd = file->fd; - - /* VMS: This only works reliable for STREAMLF files */ - if(-1 != fstat(fd, &statbuf)) { - /* we could stat it, then read out the size */ - expected_size = statbuf.st_size; - /* and store the modification time */ - data->info.filetime = (long)statbuf.st_mtime; - fstated = TRUE; - } - - if(fstated && !data->state.range && data->set.timecondition) { - if(!Curl_meets_timecondition(data, (time_t)data->info.filetime)) { - *done = TRUE; - return CURLE_OK; - } - } - - /* If we have selected NOBODY and HEADER, it means that we only want file - information. Which for FILE can't be much more than the file size and - date. */ - if(data->set.opt_no_body && data->set.include_header && fstated) { - time_t filetime; - struct tm buffer; - const struct tm *tm = &buffer; - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), - "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); - if(result) - return result; - - result = Curl_client_write(conn, CLIENTWRITE_BOTH, - (char *)"Accept-ranges: bytes\r\n", 0); - if(result) - return result; - - filetime = (time_t)statbuf.st_mtime; - result = Curl_gmtime(filetime, &buffer); - if(result) - return result; - - /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ - snprintf(buf, BUFSIZE-1, - "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", - Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], - tm->tm_mday, - Curl_month[tm->tm_mon], - tm->tm_year + 1900, - tm->tm_hour, - tm->tm_min, - tm->tm_sec); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); - if(!result) - /* set the file size to make it available post transfer */ - Curl_pgrsSetDownloadSize(data, expected_size); - return result; - } - - /* Check whether file range has been specified */ - file_range(conn); - - /* Adjust the start offset in case we want to get the N last bytes - * of the stream iff the filesize could be determined */ - if(data->state.resume_from < 0) { - if(!fstated) { - failf(data, "Can't get the size of file."); - return CURLE_READ_ERROR; - } - else - data->state.resume_from += (curl_off_t)statbuf.st_size; - } - - if(data->state.resume_from <= expected_size) - expected_size -= data->state.resume_from; - else { - failf(data, "failed to resume file:// transfer"); - return CURLE_BAD_DOWNLOAD_RESUME; - } - - /* A high water mark has been specified so we obey... */ - if(data->req.maxdownload > 0) - expected_size = data->req.maxdownload; - - if(!fstated || (expected_size == 0)) - size_known = FALSE; - else - size_known = TRUE; - - /* The following is a shortcut implementation of file reading - this is both more efficient than the former call to download() and - it avoids problems with select() and recv() on file descriptors - in Winsock */ - if(fstated) - Curl_pgrsSetDownloadSize(data, expected_size); - - if(data->state.resume_from) { - if(data->state.resume_from != - lseek(fd, data->state.resume_from, SEEK_SET)) - return CURLE_BAD_DOWNLOAD_RESUME; - } - - Curl_pgrsTime(data, TIMER_STARTTRANSFER); - - while(!result) { - /* Don't fill a whole buffer if we want less than all data */ - size_t bytestoread; - - if(size_known) { - bytestoread = - (expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ? - curlx_sotouz(expected_size) : BUFSIZE - 1; - } - else - bytestoread = BUFSIZE-1; - - nread = read(fd, buf, bytestoread); - - if(nread > 0) - buf[nread] = 0; - - if(nread <= 0 || (size_known && (expected_size == 0))) - break; - - bytecount += nread; - if(size_known) - expected_size -= nread; - - result = Curl_client_write(conn, CLIENTWRITE_BODY, buf, nread); - if(result) - return result; - - Curl_pgrsSetDownloadCounter(data, bytecount); - - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - else - result = Curl_speedcheck(data, now); - } - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - - return result; -} - -#endif diff --git a/build/premake/premake5/contrib/curl/lib/file.h b/build/premake/premake5/contrib/curl/lib/file.h deleted file mode 100644 index c12ae0e09e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/file.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef HEADER_CURL_FILE_H -#define HEADER_CURL_FILE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - - -/**************************************************************************** - * FILE unique setup - ***************************************************************************/ -struct FILEPROTO { - char *path; /* the path we operate on */ - char *freepath; /* pointer to the allocated block we must free, this might - differ from the 'path' pointer */ - int fd; /* open file descriptor to read from! */ -}; - -#ifndef CURL_DISABLE_FILE -extern const struct Curl_handler Curl_handler_file; -#endif - -#endif /* HEADER_CURL_FILE_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/fileinfo.c b/build/premake/premake5/contrib/curl/lib/fileinfo.c deleted file mode 100644 index 144c65b1d8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/fileinfo.c +++ /dev/null @@ -1,50 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "strdup.h" -#include "fileinfo.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -struct curl_fileinfo *Curl_fileinfo_alloc(void) -{ - struct curl_fileinfo *tmp = malloc(sizeof(struct curl_fileinfo)); - if(!tmp) - return NULL; - memset(tmp, 0, sizeof(struct curl_fileinfo)); - return tmp; -} - -void Curl_fileinfo_dtor(void *user, void *element) -{ - struct curl_fileinfo *finfo = element; - (void) user; - if(!finfo) - return; - - Curl_safefree(finfo->b_data); - - free(finfo); -} diff --git a/build/premake/premake5/contrib/curl/lib/fileinfo.h b/build/premake/premake5/contrib/curl/lib/fileinfo.h deleted file mode 100644 index 5324f1a404..0000000000 --- a/build/premake/premake5/contrib/curl/lib/fileinfo.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HEADER_CURL_FILEINFO_H -#define HEADER_CURL_FILEINFO_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -struct curl_fileinfo *Curl_fileinfo_alloc(void); - -void Curl_fileinfo_dtor(void *, void *); - -struct curl_fileinfo *Curl_fileinfo_dup(const struct curl_fileinfo *src); - -#endif /* HEADER_CURL_FILEINFO_H */ diff --git a/build/premake/premake5/contrib/curl/lib/firefox-db2pem.sh b/build/premake/premake5/contrib/curl/lib/firefox-db2pem.sh deleted file mode 100644 index 7d691ff6b9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/firefox-db2pem.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# *************************************************************************** -# * _ _ ____ _ -# * Project ___| | | | _ \| | -# * / __| | | | |_) | | -# * | (__| |_| | _ <| |___ -# * \___|\___/|_| \_\_____| -# * -# * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. -# * -# * This software is licensed as described in the file COPYING, which -# * you should have received as part of this distribution. The terms -# * are also available at https://curl.haxx.se/docs/copyright.html. -# * -# * You may opt to use, copy, modify, merge, publish, distribute and/or sell -# * copies of the Software, and permit persons to whom the Software is -# * furnished to do so, under the terms of the COPYING file. -# * -# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# * KIND, either express or implied. -# * -# *************************************************************************** -# This shell script creates a fresh ca-bundle.crt file for use with libcurl. -# It extracts all ca certs it finds in the local Firefox database and converts -# them all into PEM format. -# -db=`ls -1d $HOME/.mozilla/firefox/*default*` -out=$1 - -if test -z "$out"; then - out="ca-bundle.crt" # use a sensible default -fi - -currentdate=`date` - -cat >$out <> $out - diff --git a/build/premake/premake5/contrib/curl/lib/formdata.c b/build/premake/premake5/contrib/curl/lib/formdata.c deleted file mode 100644 index c214ba28e9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/formdata.c +++ /dev/null @@ -1,1608 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#ifndef CURL_DISABLE_HTTP - -#if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME) -#include -#endif - -#include "urldata.h" /* for struct Curl_easy */ -#include "formdata.h" -#include "vtls/vtls.h" -#include "strcase.h" -#include "sendf.h" -#include "strdup.h" -#include "rand.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifndef HAVE_BASENAME -static char *Curl_basename(char *path); -#define basename(x) Curl_basename((x)) -#endif - -static size_t readfromfile(struct Form *form, char *buffer, size_t size); -static char *formboundary(struct Curl_easy *data); - -/* What kind of Content-Type to use on un-specified files with unrecognized - extensions. */ -#define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream" - -#define FORM_FILE_SEPARATOR ',' -#define FORM_TYPE_SEPARATOR ';' - -#define HTTPPOST_PTRNAME CURL_HTTPPOST_PTRNAME -#define HTTPPOST_FILENAME CURL_HTTPPOST_FILENAME -#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS -#define HTTPPOST_READFILE CURL_HTTPPOST_READFILE -#define HTTPPOST_PTRBUFFER CURL_HTTPPOST_PTRBUFFER -#define HTTPPOST_CALLBACK CURL_HTTPPOST_CALLBACK -#define HTTPPOST_BUFFER CURL_HTTPPOST_BUFFER - -/*************************************************************************** - * - * AddHttpPost() - * - * Adds a HttpPost structure to the list, if parent_post is given becomes - * a subpost of parent_post instead of a direct list element. - * - * Returns newly allocated HttpPost on success and NULL if malloc failed. - * - ***************************************************************************/ -static struct curl_httppost * -AddHttpPost(char *name, size_t namelength, - char *value, curl_off_t contentslength, - char *buffer, size_t bufferlength, - char *contenttype, - long flags, - struct curl_slist *contentHeader, - char *showfilename, char *userp, - struct curl_httppost *parent_post, - struct curl_httppost **httppost, - struct curl_httppost **last_post) -{ - struct curl_httppost *post; - post = calloc(1, sizeof(struct curl_httppost)); - if(post) { - post->name = name; - post->namelength = (long)(name?(namelength?namelength:strlen(name)):0); - post->contents = value; - post->contentlen = contentslength; - post->buffer = buffer; - post->bufferlength = (long)bufferlength; - post->contenttype = contenttype; - post->contentheader = contentHeader; - post->showfilename = showfilename; - post->userp = userp, - post->flags = flags | CURL_HTTPPOST_LARGE; - } - else - return NULL; - - if(parent_post) { - /* now, point our 'more' to the original 'more' */ - post->more = parent_post->more; - - /* then move the original 'more' to point to ourselves */ - parent_post->more = post; - } - else { - /* make the previous point to this */ - if(*last_post) - (*last_post)->next = post; - else - (*httppost) = post; - - (*last_post) = post; - } - return post; -} - -/*************************************************************************** - * - * AddFormInfo() - * - * Adds a FormInfo structure to the list presented by parent_form_info. - * - * Returns newly allocated FormInfo on success and NULL if malloc failed/ - * parent_form_info is NULL. - * - ***************************************************************************/ -static FormInfo * AddFormInfo(char *value, - char *contenttype, - FormInfo *parent_form_info) -{ - FormInfo *form_info; - form_info = calloc(1, sizeof(struct FormInfo)); - if(form_info) { - if(value) - form_info->value = value; - if(contenttype) - form_info->contenttype = contenttype; - form_info->flags = HTTPPOST_FILENAME; - } - else - return NULL; - - if(parent_form_info) { - /* now, point our 'more' to the original 'more' */ - form_info->more = parent_form_info->more; - - /* then move the original 'more' to point to ourselves */ - parent_form_info->more = form_info; - } - - return form_info; -} - -/*************************************************************************** - * - * ContentTypeForFilename() - * - * Provides content type for filename if one of the known types (else - * (either the prevtype or the default is returned). - * - * Returns some valid contenttype for filename. - * - ***************************************************************************/ -static const char *ContentTypeForFilename(const char *filename, - const char *prevtype) -{ - const char *contenttype = NULL; - unsigned int i; - /* - * No type was specified, we scan through a few well-known - * extensions and pick the first we match! - */ - struct ContentType { - const char *extension; - const char *type; - }; - static const struct ContentType ctts[]={ - {".gif", "image/gif"}, - {".jpg", "image/jpeg"}, - {".jpeg", "image/jpeg"}, - {".txt", "text/plain"}, - {".html", "text/html"}, - {".xml", "application/xml"} - }; - - if(prevtype) - /* default to the previously set/used! */ - contenttype = prevtype; - else - contenttype = HTTPPOST_CONTENTTYPE_DEFAULT; - - if(filename) { /* in case a NULL was passed in */ - for(i=0; i= strlen(ctts[i].extension)) { - if(strcasecompare(filename + - strlen(filename) - strlen(ctts[i].extension), - ctts[i].extension)) { - contenttype = ctts[i].type; - break; - } - } - } - } - /* we have a contenttype by now */ - return contenttype; -} - -/*************************************************************************** - * - * FormAdd() - * - * Stores a formpost parameter and builds the appropriate linked list. - * - * Has two principal functionalities: using files and byte arrays as - * post parts. Byte arrays are either copied or just the pointer is stored - * (as the user requests) while for files only the filename and not the - * content is stored. - * - * While you may have only one byte array for each name, multiple filenames - * are allowed (and because of this feature CURLFORM_END is needed after - * using CURLFORM_FILE). - * - * Examples: - * - * Simple name/value pair with copied contents: - * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name", - * CURLFORM_COPYCONTENTS, "value", CURLFORM_END); - * - * name/value pair where only the content pointer is remembered: - * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name", - * CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10, CURLFORM_END); - * (if CURLFORM_CONTENTSLENGTH is missing strlen () is used) - * - * storing a filename (CONTENTTYPE is optional!): - * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name", - * CURLFORM_FILE, "filename1", CURLFORM_CONTENTTYPE, "plain/text", - * CURLFORM_END); - * - * storing multiple filenames: - * curl_formadd (&post, &last, CURLFORM_COPYNAME, "name", - * CURLFORM_FILE, "filename1", CURLFORM_FILE, "filename2", CURLFORM_END); - * - * Returns: - * CURL_FORMADD_OK on success - * CURL_FORMADD_MEMORY if the FormInfo allocation fails - * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form - * CURL_FORMADD_NULL if a null pointer was given for a char - * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed - * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used - * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a HttpPost struct cannot be allocated - * CURL_FORMADD_MEMORY if some allocation for string copying failed. - * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array - * - ***************************************************************************/ - -static -CURLFORMcode FormAdd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - va_list params) -{ - FormInfo *first_form, *current_form, *form = NULL; - CURLFORMcode return_value = CURL_FORMADD_OK; - const char *prevtype = NULL; - struct curl_httppost *post = NULL; - CURLformoption option; - struct curl_forms *forms = NULL; - char *array_value=NULL; /* value read from an array */ - - /* This is a state variable, that if TRUE means that we're parsing an - array that we got passed to us. If FALSE we're parsing the input - va_list arguments. */ - bool array_state = FALSE; - - /* - * We need to allocate the first struct to fill in. - */ - first_form = calloc(1, sizeof(struct FormInfo)); - if(!first_form) - return CURL_FORMADD_MEMORY; - - current_form = first_form; - - /* - * Loop through all the options set. Break if we have an error to report. - */ - while(return_value == CURL_FORMADD_OK) { - - /* first see if we have more parts of the array param */ - if(array_state && forms) { - /* get the upcoming option from the given array */ - option = forms->option; - array_value = (char *)forms->value; - - forms++; /* advance this to next entry */ - if(CURLFORM_END == option) { - /* end of array state */ - array_state = FALSE; - continue; - } - } - else { - /* This is not array-state, get next option */ - option = va_arg(params, CURLformoption); - if(CURLFORM_END == option) - break; - } - - switch(option) { - case CURLFORM_ARRAY: - if(array_state) - /* we don't support an array from within an array */ - return_value = CURL_FORMADD_ILLEGAL_ARRAY; - else { - forms = va_arg(params, struct curl_forms *); - if(forms) - array_state = TRUE; - else - return_value = CURL_FORMADD_NULL; - } - break; - - /* - * Set the Name property. - */ - case CURLFORM_PTRNAME: -#ifdef CURL_DOES_CONVERSIONS - /* Treat CURLFORM_PTR like CURLFORM_COPYNAME so that libcurl will copy - * the data in all cases so that we'll have safe memory for the eventual - * conversion. - */ -#else - current_form->flags |= HTTPPOST_PTRNAME; /* fall through */ -#endif - case CURLFORM_COPYNAME: - if(current_form->name) - return_value = CURL_FORMADD_OPTION_TWICE; - else { - char *name = array_state? - array_value:va_arg(params, char *); - if(name) - current_form->name = name; /* store for the moment */ - else - return_value = CURL_FORMADD_NULL; - } - break; - case CURLFORM_NAMELENGTH: - if(current_form->namelength) - return_value = CURL_FORMADD_OPTION_TWICE; - else - current_form->namelength = - array_state?(size_t)array_value:(size_t)va_arg(params, long); - break; - - /* - * Set the contents property. - */ - case CURLFORM_PTRCONTENTS: - current_form->flags |= HTTPPOST_PTRCONTENTS; /* fall through */ - case CURLFORM_COPYCONTENTS: - if(current_form->value) - return_value = CURL_FORMADD_OPTION_TWICE; - else { - char *value = - array_state?array_value:va_arg(params, char *); - if(value) - current_form->value = value; /* store for the moment */ - else - return_value = CURL_FORMADD_NULL; - } - break; - case CURLFORM_CONTENTSLENGTH: - current_form->contentslength = - array_state?(size_t)array_value:(size_t)va_arg(params, long); - break; - - case CURLFORM_CONTENTLEN: - current_form->flags |= CURL_HTTPPOST_LARGE; - current_form->contentslength = - array_state?(curl_off_t)(size_t)array_value:va_arg(params, curl_off_t); - break; - - /* Get contents from a given file name */ - case CURLFORM_FILECONTENT: - if(current_form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_READFILE)) - return_value = CURL_FORMADD_OPTION_TWICE; - else { - const char *filename = array_state? - array_value:va_arg(params, char *); - if(filename) { - current_form->value = strdup(filename); - if(!current_form->value) - return_value = CURL_FORMADD_MEMORY; - else { - current_form->flags |= HTTPPOST_READFILE; - current_form->value_alloc = TRUE; - } - } - else - return_value = CURL_FORMADD_NULL; - } - break; - - /* We upload a file */ - case CURLFORM_FILE: - { - const char *filename = array_state?array_value: - va_arg(params, char *); - - if(current_form->value) { - if(current_form->flags & HTTPPOST_FILENAME) { - if(filename) { - char *fname = strdup(filename); - if(!fname) - return_value = CURL_FORMADD_MEMORY; - else { - form = AddFormInfo(fname, NULL, current_form); - if(!form) { - free(fname); - return_value = CURL_FORMADD_MEMORY; - } - else { - form->value_alloc = TRUE; - current_form = form; - form = NULL; - } - } - } - else - return_value = CURL_FORMADD_NULL; - } - else - return_value = CURL_FORMADD_OPTION_TWICE; - } - else { - if(filename) { - current_form->value = strdup(filename); - if(!current_form->value) - return_value = CURL_FORMADD_MEMORY; - else { - current_form->flags |= HTTPPOST_FILENAME; - current_form->value_alloc = TRUE; - } - } - else - return_value = CURL_FORMADD_NULL; - } - break; - } - - case CURLFORM_BUFFERPTR: - current_form->flags |= HTTPPOST_PTRBUFFER|HTTPPOST_BUFFER; - if(current_form->buffer) - return_value = CURL_FORMADD_OPTION_TWICE; - else { - char *buffer = - array_state?array_value:va_arg(params, char *); - if(buffer) { - current_form->buffer = buffer; /* store for the moment */ - current_form->value = buffer; /* make it non-NULL to be accepted - as fine */ - } - else - return_value = CURL_FORMADD_NULL; - } - break; - - case CURLFORM_BUFFERLENGTH: - if(current_form->bufferlength) - return_value = CURL_FORMADD_OPTION_TWICE; - else - current_form->bufferlength = - array_state?(size_t)array_value:(size_t)va_arg(params, long); - break; - - case CURLFORM_STREAM: - current_form->flags |= HTTPPOST_CALLBACK; - if(current_form->userp) - return_value = CURL_FORMADD_OPTION_TWICE; - else { - char *userp = - array_state?array_value:va_arg(params, char *); - if(userp) { - current_form->userp = userp; - current_form->value = userp; /* this isn't strictly true but we - derive a value from this later on - and we need this non-NULL to be - accepted as a fine form part */ - } - else - return_value = CURL_FORMADD_NULL; - } - break; - - case CURLFORM_CONTENTTYPE: - { - const char *contenttype = - array_state?array_value:va_arg(params, char *); - if(current_form->contenttype) { - if(current_form->flags & HTTPPOST_FILENAME) { - if(contenttype) { - char *type = strdup(contenttype); - if(!type) - return_value = CURL_FORMADD_MEMORY; - else { - form = AddFormInfo(NULL, type, current_form); - if(!form) { - free(type); - return_value = CURL_FORMADD_MEMORY; - } - else { - form->contenttype_alloc = TRUE; - current_form = form; - form = NULL; - } - } - } - else - return_value = CURL_FORMADD_NULL; - } - else - return_value = CURL_FORMADD_OPTION_TWICE; - } - else { - if(contenttype) { - current_form->contenttype = strdup(contenttype); - if(!current_form->contenttype) - return_value = CURL_FORMADD_MEMORY; - else - current_form->contenttype_alloc = TRUE; - } - else - return_value = CURL_FORMADD_NULL; - } - break; - } - case CURLFORM_CONTENTHEADER: - { - /* this "cast increases required alignment of target type" but - we consider it OK anyway */ - struct curl_slist *list = array_state? - (struct curl_slist *)(void *)array_value: - va_arg(params, struct curl_slist *); - - if(current_form->contentheader) - return_value = CURL_FORMADD_OPTION_TWICE; - else - current_form->contentheader = list; - - break; - } - case CURLFORM_FILENAME: - case CURLFORM_BUFFER: - { - const char *filename = array_state?array_value: - va_arg(params, char *); - if(current_form->showfilename) - return_value = CURL_FORMADD_OPTION_TWICE; - else { - current_form->showfilename = strdup(filename); - if(!current_form->showfilename) - return_value = CURL_FORMADD_MEMORY; - else - current_form->showfilename_alloc = TRUE; - } - break; - } - default: - return_value = CURL_FORMADD_UNKNOWN_OPTION; - break; - } - } - - if(CURL_FORMADD_OK != return_value) { - /* On error, free allocated fields for all nodes of the FormInfo linked - list without deallocating nodes. List nodes are deallocated later on */ - FormInfo *ptr; - for(ptr = first_form; ptr != NULL; ptr = ptr->more) { - if(ptr->name_alloc) { - Curl_safefree(ptr->name); - ptr->name_alloc = FALSE; - } - if(ptr->value_alloc) { - Curl_safefree(ptr->value); - ptr->value_alloc = FALSE; - } - if(ptr->contenttype_alloc) { - Curl_safefree(ptr->contenttype); - ptr->contenttype_alloc = FALSE; - } - if(ptr->showfilename_alloc) { - Curl_safefree(ptr->showfilename); - ptr->showfilename_alloc = FALSE; - } - } - } - - if(CURL_FORMADD_OK == return_value) { - /* go through the list, check for completeness and if everything is - * alright add the HttpPost item otherwise set return_value accordingly */ - - post = NULL; - for(form = first_form; - form != NULL; - form = form->more) { - if(((!form->name || !form->value) && !post) || - ( (form->contentslength) && - (form->flags & HTTPPOST_FILENAME) ) || - ( (form->flags & HTTPPOST_FILENAME) && - (form->flags & HTTPPOST_PTRCONTENTS) ) || - - ( (!form->buffer) && - (form->flags & HTTPPOST_BUFFER) && - (form->flags & HTTPPOST_PTRBUFFER) ) || - - ( (form->flags & HTTPPOST_READFILE) && - (form->flags & HTTPPOST_PTRCONTENTS) ) - ) { - return_value = CURL_FORMADD_INCOMPLETE; - break; - } - else { - if(((form->flags & HTTPPOST_FILENAME) || - (form->flags & HTTPPOST_BUFFER)) && - !form->contenttype) { - char *f = form->flags & HTTPPOST_BUFFER? - form->showfilename : form->value; - - /* our contenttype is missing */ - form->contenttype = strdup(ContentTypeForFilename(f, prevtype)); - if(!form->contenttype) { - return_value = CURL_FORMADD_MEMORY; - break; - } - form->contenttype_alloc = TRUE; - } - if(!(form->flags & HTTPPOST_PTRNAME) && - (form == first_form) ) { - /* Note that there's small risk that form->name is NULL here if the - app passed in a bad combo, so we better check for that first. */ - if(form->name) { - /* copy name (without strdup; possibly contains null characters) */ - form->name = Curl_memdup(form->name, form->namelength? - form->namelength: - strlen(form->name)+1); - } - if(!form->name) { - return_value = CURL_FORMADD_MEMORY; - break; - } - form->name_alloc = TRUE; - } - if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE | - HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER | - HTTPPOST_CALLBACK)) && form->value) { - /* copy value (without strdup; possibly contains null characters) */ - size_t clen = (size_t) form->contentslength; - if(!clen) - clen = strlen(form->value)+1; - - form->value = Curl_memdup(form->value, clen); - - if(!form->value) { - return_value = CURL_FORMADD_MEMORY; - break; - } - form->value_alloc = TRUE; - } - post = AddHttpPost(form->name, form->namelength, - form->value, form->contentslength, - form->buffer, form->bufferlength, - form->contenttype, form->flags, - form->contentheader, form->showfilename, - form->userp, - post, httppost, - last_post); - - if(!post) { - return_value = CURL_FORMADD_MEMORY; - break; - } - - if(form->contenttype) - prevtype = form->contenttype; - } - } - if(CURL_FORMADD_OK != return_value) { - /* On error, free allocated fields for nodes of the FormInfo linked - list which are not already owned by the httppost linked list - without deallocating nodes. List nodes are deallocated later on */ - FormInfo *ptr; - for(ptr = form; ptr != NULL; ptr = ptr->more) { - if(ptr->name_alloc) { - Curl_safefree(ptr->name); - ptr->name_alloc = FALSE; - } - if(ptr->value_alloc) { - Curl_safefree(ptr->value); - ptr->value_alloc = FALSE; - } - if(ptr->contenttype_alloc) { - Curl_safefree(ptr->contenttype); - ptr->contenttype_alloc = FALSE; - } - if(ptr->showfilename_alloc) { - Curl_safefree(ptr->showfilename); - ptr->showfilename_alloc = FALSE; - } - } - } - } - - /* Always deallocate FormInfo linked list nodes without touching node - fields given that these have either been deallocated or are owned - now by the httppost linked list */ - while(first_form) { - FormInfo *ptr = first_form->more; - free(first_form); - first_form = ptr; - } - - return return_value; -} - -/* - * curl_formadd() is a public API to add a section to the multipart formpost. - * - * @unittest: 1308 - */ - -CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...) -{ - va_list arg; - CURLFORMcode result; - va_start(arg, last_post); - result = FormAdd(httppost, last_post, arg); - va_end(arg); - return result; -} - -#ifdef __VMS -#include -/* - * get_vms_file_size does what it takes to get the real size of the file - * - * For fixed files, find out the size of the EOF block and adjust. - * - * For all others, have to read the entire file in, discarding the contents. - * Most posted text files will be small, and binary files like zlib archives - * and CD/DVD images should be either a STREAM_LF format or a fixed format. - * - */ -curl_off_t VmsRealFileSize(const char *name, - const struct_stat *stat_buf) -{ - char buffer[8192]; - curl_off_t count; - int ret_stat; - FILE * file; - - file = fopen(name, FOPEN_READTEXT); /* VMS */ - if(file == NULL) - return 0; - - count = 0; - ret_stat = 1; - while(ret_stat > 0) { - ret_stat = fread(buffer, 1, sizeof(buffer), file); - if(ret_stat != 0) - count += ret_stat; - } - fclose(file); - - return count; -} - -/* - * - * VmsSpecialSize checks to see if the stat st_size can be trusted and - * if not to call a routine to get the correct size. - * - */ -static curl_off_t VmsSpecialSize(const char *name, - const struct_stat *stat_buf) -{ - switch(stat_buf->st_fab_rfm) { - case FAB$C_VAR: - case FAB$C_VFC: - return VmsRealFileSize(name, stat_buf); - break; - default: - return stat_buf->st_size; - } -} - -#endif - -#ifndef __VMS -#define filesize(name, stat_data) (stat_data.st_size) -#else - /* Getting the expected file size needs help on VMS */ -#define filesize(name, stat_data) VmsSpecialSize(name, &stat_data) -#endif - -/* - * AddFormData() adds a chunk of data to the FormData linked list. - * - * size is incremented by the chunk length, unless it is NULL - */ -static CURLcode AddFormData(struct FormData **formp, - enum formtype type, - const void *line, - curl_off_t length, - curl_off_t *size) -{ - struct FormData *newform; - char *alloc2 = NULL; - CURLcode result = CURLE_OK; - if(length < 0 || (size && *size < 0)) - return CURLE_BAD_FUNCTION_ARGUMENT; - - newform = malloc(sizeof(struct FormData)); - if(!newform) - return CURLE_OUT_OF_MEMORY; - newform->next = NULL; - - if(type <= FORM_CONTENT) { - /* we make it easier for plain strings: */ - if(!length) - length = strlen((char *)line); -#if (SIZEOF_SIZE_T < CURL_SIZEOF_CURL_OFF_T) - else if(length >= (curl_off_t)(size_t)-1) { - result = CURLE_BAD_FUNCTION_ARGUMENT; - goto error; - } -#endif - if(type != FORM_DATAMEM) { - newform->line = malloc((size_t)length+1); - if(!newform->line) { - result = CURLE_OUT_OF_MEMORY; - goto error; - } - alloc2 = newform->line; - memcpy(newform->line, line, (size_t)length); - - /* zero terminate for easier debugging */ - newform->line[(size_t)length]=0; - } - else { - newform->line = (char *)line; - type = FORM_DATA; /* in all other aspects this is just FORM_DATA */ - } - newform->length = (size_t)length; - } - else - /* For callbacks and files we don't have any actual data so we just keep a - pointer to whatever this points to */ - newform->line = (char *)line; - - newform->type = type; - - if(size) { - if(type != FORM_FILE) - /* for static content as well as callback data we add the size given - as input argument */ - *size += length; - else { - /* Since this is a file to be uploaded here, add the size of the actual - file */ - if(strcmp("-", newform->line)) { - struct_stat file; - if(!stat(newform->line, &file) && !S_ISDIR(file.st_mode)) - *size += filesize(newform->line, file); - else { - result = CURLE_BAD_FUNCTION_ARGUMENT; - goto error; - } - } - } - } - - if(*formp) { - (*formp)->next = newform; - *formp = newform; - } - else - *formp = newform; - - return CURLE_OK; - error: - if(newform) - free(newform); - if(alloc2) - free(alloc2); - return result; -} - -/* - * AddFormDataf() adds printf()-style formatted data to the formdata chain. - */ - -static CURLcode AddFormDataf(struct FormData **formp, - curl_off_t *size, - const char *fmt, ...) -{ - char *s; - CURLcode result; - va_list ap; - va_start(ap, fmt); - s = curl_mvaprintf(fmt, ap); - va_end(ap); - - if(!s) - return CURLE_OUT_OF_MEMORY; - - result = AddFormData(formp, FORM_DATAMEM, s, 0, size); - if(result) - free(s); - - return result; -} - -/* - * Curl_formclean() is used from http.c, this cleans a built FormData linked - * list - */ -void Curl_formclean(struct FormData **form_ptr) -{ - struct FormData *next, *form; - - form = *form_ptr; - if(!form) - return; - - do { - next=form->next; /* the following form line */ - if(form->type <= FORM_CONTENT) - free(form->line); /* free the line */ - free(form); /* free the struct */ - form = next; - } while(form); /* continue */ - - *form_ptr = NULL; -} - -/* - * curl_formget() - * Serialize a curl_httppost struct. - * Returns 0 on success. - * - * @unittest: 1308 - */ -int curl_formget(struct curl_httppost *form, void *arg, - curl_formget_callback append) -{ - CURLcode result; - curl_off_t size; - struct FormData *data, *ptr; - - result = Curl_getformdata(NULL, &data, form, NULL, &size); - if(result) - return (int)result; - - for(ptr = data; ptr; ptr = ptr->next) { - if((ptr->type == FORM_FILE) || (ptr->type == FORM_CALLBACK)) { - char buffer[8192]; - size_t nread; - struct Form temp; - - Curl_FormInit(&temp, ptr); - - do { - nread = readfromfile(&temp, buffer, sizeof(buffer)); - if((nread == (size_t) -1) || - (nread > sizeof(buffer)) || - (nread != append(arg, buffer, nread))) { - if(temp.fp) - fclose(temp.fp); - Curl_formclean(&data); - return -1; - } - } while(nread); - } - else { - if(ptr->length != append(arg, ptr->line, ptr->length)) { - Curl_formclean(&data); - return -1; - } - } - } - Curl_formclean(&data); - return 0; -} - -/* - * curl_formfree() is an external function to free up a whole form post - * chain - */ -void curl_formfree(struct curl_httppost *form) -{ - struct curl_httppost *next; - - if(!form) - /* no form to free, just get out of this */ - return; - - do { - next=form->next; /* the following form line */ - - /* recurse to sub-contents */ - curl_formfree(form->more); - - if(!(form->flags & HTTPPOST_PTRNAME)) - free(form->name); /* free the name */ - if(!(form->flags & - (HTTPPOST_PTRCONTENTS|HTTPPOST_BUFFER|HTTPPOST_CALLBACK)) - ) - free(form->contents); /* free the contents */ - free(form->contenttype); /* free the content type */ - free(form->showfilename); /* free the faked file name */ - free(form); /* free the struct */ - form = next; - } while(form); /* continue */ -} - -#ifndef HAVE_BASENAME -/* - (Quote from The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 - Edition) - - The basename() function shall take the pathname pointed to by path and - return a pointer to the final component of the pathname, deleting any - trailing '/' characters. - - If the string pointed to by path consists entirely of the '/' character, - basename() shall return a pointer to the string "/". If the string pointed - to by path is exactly "//", it is implementation-defined whether '/' or "//" - is returned. - - If path is a null pointer or points to an empty string, basename() shall - return a pointer to the string ".". - - The basename() function may modify the string pointed to by path, and may - return a pointer to static storage that may then be overwritten by a - subsequent call to basename(). - - The basename() function need not be reentrant. A function that is not - required to be reentrant is not required to be thread-safe. - -*/ -static char *Curl_basename(char *path) -{ - /* Ignore all the details above for now and make a quick and simple - implementaion here */ - char *s1; - char *s2; - - s1=strrchr(path, '/'); - s2=strrchr(path, '\\'); - - if(s1 && s2) { - path = (s1 > s2? s1 : s2)+1; - } - else if(s1) - path = s1 + 1; - else if(s2) - path = s2 + 1; - - return path; -} -#endif - -static char *strippath(const char *fullfile) -{ - char *filename; - char *base; - filename = strdup(fullfile); /* duplicate since basename() may ruin the - buffer it works on */ - if(!filename) - return NULL; - base = strdup(basename(filename)); - - free(filename); /* free temporary buffer */ - - return base; /* returns an allocated string or NULL ! */ -} - -static CURLcode formdata_add_filename(const struct curl_httppost *file, - struct FormData **form, - curl_off_t *size) -{ - CURLcode result = CURLE_OK; - char *filename = file->showfilename; - char *filebasename = NULL; - char *filename_escaped = NULL; - - if(!filename) { - filebasename = strippath(file->contents); - if(!filebasename) - return CURLE_OUT_OF_MEMORY; - filename = filebasename; - } - - if(strchr(filename, '\\') || strchr(filename, '"')) { - char *p0, *p1; - - /* filename need be escaped */ - filename_escaped = malloc(strlen(filename)*2+1); - if(!filename_escaped) { - free(filebasename); - return CURLE_OUT_OF_MEMORY; - } - p0 = filename_escaped; - p1 = filename; - while(*p1) { - if(*p1 == '\\' || *p1 == '"') - *p0++ = '\\'; - *p0++ = *p1++; - } - *p0 = '\0'; - filename = filename_escaped; - } - result = AddFormDataf(form, size, - "; filename=\"%s\"", - filename); - free(filename_escaped); - free(filebasename); - return result; -} - -/* - * Curl_getformdata() converts a linked list of "meta data" into a complete - * (possibly huge) multipart formdata. The input list is in 'post', while the - * output resulting linked lists gets stored in '*finalform'. *sizep will get - * the total size of the whole POST. - * A multipart/form_data content-type is built, unless a custom content-type - * is passed in 'custom_content_type'. - * - * This function will not do a failf() for the potential memory failures but - * should for all other errors it spots. Just note that this function MAY get - * a NULL pointer in the 'data' argument. - */ - -CURLcode Curl_getformdata(struct Curl_easy *data, - struct FormData **finalform, - struct curl_httppost *post, - const char *custom_content_type, - curl_off_t *sizep) -{ - struct FormData *form = NULL; - struct FormData *firstform; - struct curl_httppost *file; - CURLcode result = CURLE_OK; - - curl_off_t size = 0; /* support potentially ENORMOUS formposts */ - char *boundary; - char *fileboundary = NULL; - struct curl_slist *curList; - - *finalform = NULL; /* default form is empty */ - - if(!post) - return result; /* no input => no output! */ - - boundary = formboundary(data); - if(!boundary) - return CURLE_OUT_OF_MEMORY; - - /* Make the first line of the output */ - result = AddFormDataf(&form, NULL, - "%s; boundary=%s\r\n", - custom_content_type?custom_content_type: - "Content-Type: multipart/form-data", - boundary); - - if(result) { - free(boundary); - return result; - } - /* we DO NOT include that line in the total size of the POST, since it'll be - part of the header! */ - - firstform = form; - - do { - - if(size) { - result = AddFormDataf(&form, &size, "\r\n"); - if(result) - break; - } - - /* boundary */ - result = AddFormDataf(&form, &size, "--%s\r\n", boundary); - if(result) - break; - - /* Maybe later this should be disabled when a custom_content_type is - passed, since Content-Disposition is not meaningful for all multipart - types. - */ - result = AddFormDataf(&form, &size, - "Content-Disposition: form-data; name=\""); - if(result) - break; - - result = AddFormData(&form, FORM_DATA, post->name, post->namelength, - &size); - if(result) - break; - - result = AddFormDataf(&form, &size, "\""); - if(result) - break; - - if(post->more) { - /* If used, this is a link to more file names, we must then do - the magic to include several files with the same field name */ - - free(fileboundary); - fileboundary = formboundary(data); - if(!fileboundary) { - result = CURLE_OUT_OF_MEMORY; - break; - } - - result = AddFormDataf(&form, &size, - "\r\nContent-Type: multipart/mixed;" - " boundary=%s\r\n", - fileboundary); - if(result) - break; - } - - file = post; - - do { - - /* If 'showfilename' is set, that is a faked name passed on to us - to use to in the formpost. If that is not set, the actually used - local file name should be added. */ - - if(post->more) { - /* if multiple-file */ - result = AddFormDataf(&form, &size, - "\r\n--%s\r\nContent-Disposition: " - "attachment", - fileboundary); - if(result) - break; - result = formdata_add_filename(file, &form, &size); - if(result) - break; - } - else if(post->flags & (HTTPPOST_FILENAME|HTTPPOST_BUFFER| - HTTPPOST_CALLBACK)) { - /* it should be noted that for the HTTPPOST_FILENAME and - HTTPPOST_CALLBACK cases the ->showfilename struct member is always - assigned at this point */ - if(post->showfilename || (post->flags & HTTPPOST_FILENAME)) { - result = formdata_add_filename(post, &form, &size); - } - - if(result) - break; - } - - if(file->contenttype) { - /* we have a specified type */ - result = AddFormDataf(&form, &size, - "\r\nContent-Type: %s", - file->contenttype); - if(result) - break; - } - - curList = file->contentheader; - while(curList) { - /* Process the additional headers specified for this form */ - result = AddFormDataf(&form, &size, "\r\n%s", curList->data); - if(result) - break; - curList = curList->next; - } - if(result) - break; - - result = AddFormDataf(&form, &size, "\r\n\r\n"); - if(result) - break; - - if((post->flags & HTTPPOST_FILENAME) || - (post->flags & HTTPPOST_READFILE)) { - /* we should include the contents from the specified file */ - FILE *fileread; - - fileread = !strcmp("-", file->contents)? - stdin:fopen(file->contents, "rb"); /* binary read for win32 */ - - /* - * VMS: This only allows for stream files on VMS. Stream files are - * OK, as are FIXED & VAR files WITHOUT implied CC For implied CC, - * every record needs to have a \n appended & 1 added to SIZE - */ - - if(fileread) { - if(fileread != stdin) { - /* close the file */ - fclose(fileread); - /* add the file name only - for later reading from this */ - result = AddFormData(&form, FORM_FILE, file->contents, 0, &size); - } - else { - /* When uploading from stdin, we can't know the size of the file, - * thus must read the full file as before. We *could* use chunked - * transfer-encoding, but that only works for HTTP 1.1 and we - * can't be sure we work with such a server. - */ - size_t nread; - char buffer[512]; - while((nread = fread(buffer, 1, sizeof(buffer), fileread)) != 0) { - result = AddFormData(&form, FORM_CONTENT, buffer, nread, &size); - if(result || feof(fileread) || ferror(fileread)) - break; - } - } - } - else { - if(data) - failf(data, "couldn't open file \"%s\"", file->contents); - *finalform = NULL; - result = CURLE_READ_ERROR; - } - } - else if(post->flags & HTTPPOST_BUFFER) - /* include contents of buffer */ - result = AddFormData(&form, FORM_CONTENT, post->buffer, - post->bufferlength, &size); - else if(post->flags & HTTPPOST_CALLBACK) - /* the contents should be read with the callback and the size is set - with the contentslength */ - result = AddFormData(&form, FORM_CALLBACK, post->userp, - post->flags&CURL_HTTPPOST_LARGE? - post->contentlen:post->contentslength, &size); - else - /* include the contents we got */ - result = AddFormData(&form, FORM_CONTENT, post->contents, - post->flags&CURL_HTTPPOST_LARGE? - post->contentlen:post->contentslength, &size); - file = file->more; - } while(file && !result); /* for each specified file for this field */ - - if(result) - break; - - if(post->more) { - /* this was a multiple-file inclusion, make a termination file - boundary: */ - result = AddFormDataf(&form, &size, - "\r\n--%s--", - fileboundary); - if(result) - break; - } - post = post->next; - } while(post); /* for each field */ - - /* end-boundary for everything */ - if(!result) - result = AddFormDataf(&form, &size, "\r\n--%s--\r\n", boundary); - - if(result) { - Curl_formclean(&firstform); - free(fileboundary); - free(boundary); - return result; - } - - *sizep = size; - - free(fileboundary); - free(boundary); - - *finalform = firstform; - - return result; -} - -/* - * Curl_FormInit() inits the struct 'form' points to with the 'formdata' - * and resets the 'sent' counter. - */ -int Curl_FormInit(struct Form *form, struct FormData *formdata) -{ - if(!formdata) - return 1; /* error */ - - form->data = formdata; - form->sent = 0; - form->fp = NULL; - form->fread_func = ZERO_NULL; - - return 0; -} - -#ifndef __VMS -# define fopen_read fopen -#else - /* - * vmsfopenread - * - * For upload to work as expected on VMS, different optional - * parameters must be added to the fopen command based on - * record format of the file. - * - */ -# define fopen_read vmsfopenread -static FILE * vmsfopenread(const char *file, const char *mode) -{ - struct_stat statbuf; - int result; - - result = stat(file, &statbuf); - - switch(statbuf.st_fab_rfm) { - case FAB$C_VAR: - case FAB$C_VFC: - case FAB$C_STMCR: - return fopen(file, FOPEN_READTEXT); /* VMS */ - break; - default: - return fopen(file, FOPEN_READTEXT, "rfm=stmlf", "ctx=stm"); - } -} -#endif - -/* - * readfromfile() - * - * The read callback that this function may use can return a value larger than - * 'size' (which then this function returns) that indicates a problem and it - * must be properly dealt with - */ -static size_t readfromfile(struct Form *form, char *buffer, - size_t size) -{ - size_t nread; - bool callback = (form->data->type == FORM_CALLBACK)?TRUE:FALSE; - - if(callback) { - if(form->fread_func == ZERO_NULL) - return 0; - else - nread = form->fread_func(buffer, 1, size, form->data->line); - } - else { - if(!form->fp) { - /* this file hasn't yet been opened */ - form->fp = fopen_read(form->data->line, "rb"); /* b is for binary */ - if(!form->fp) - return (size_t)-1; /* failure */ - } - nread = fread(buffer, 1, size, form->fp); - } - if(!nread) { - /* this is the last chunk from the file, move on */ - if(form->fp) { - fclose(form->fp); - form->fp = NULL; - } - form->data = form->data->next; - } - - return nread; -} - -/* - * Curl_FormReader() is the fread() emulation function that will be used to - * deliver the formdata to the transfer loop and then sent away to the peer. - */ -size_t Curl_FormReader(char *buffer, - size_t size, - size_t nitems, - FILE *mydata) -{ - struct Form *form; - size_t wantedsize; - size_t gotsize = 0; - - form=(struct Form *)mydata; - - wantedsize = size * nitems; - - if(!form->data) - return 0; /* nothing, error, empty */ - - if((form->data->type == FORM_FILE) || - (form->data->type == FORM_CALLBACK)) { - gotsize = readfromfile(form, buffer, wantedsize); - - if(gotsize) - /* If positive or -1, return. If zero, continue! */ - return gotsize; - } - do { - - if((form->data->length - form->sent) > wantedsize - gotsize) { - - memcpy(buffer + gotsize, form->data->line + form->sent, - wantedsize - gotsize); - - form->sent += wantedsize-gotsize; - - return wantedsize; - } - - memcpy(buffer+gotsize, - form->data->line + form->sent, - (form->data->length - form->sent) ); - gotsize += form->data->length - form->sent; - - form->sent = 0; - - form->data = form->data->next; /* advance */ - - } while(form->data && (form->data->type < FORM_CALLBACK)); - /* If we got an empty line and we have more data, we proceed to the next - line immediately to avoid returning zero before we've reached the end. */ - - return gotsize; -} - -/* - * Curl_formpostheader() returns the first line of the formpost, the - * request-header part (which is not part of the request-body like the rest of - * the post). - */ -char *Curl_formpostheader(void *formp, size_t *len) -{ - char *header; - struct Form *form=(struct Form *)formp; - - if(!form->data) - return NULL; /* nothing, ERROR! */ - - header = form->data->line; - *len = form->data->length; - - form->data = form->data->next; /* advance */ - - return header; -} - -/* - * formboundary() creates a suitable boundary string and returns an allocated - * one. - */ -static char *formboundary(struct Curl_easy *data) -{ - /* 24 dashes and 16 hexadecimal digits makes 64 bit (18446744073709551615) - combinations */ - unsigned int rnd[2]; - CURLcode result = Curl_rand(data, &rnd[0], 2); - if(result) - return NULL; - - return aprintf("------------------------%08x%08x", rnd[0], rnd[1]); -} - -#else /* CURL_DISABLE_HTTP */ -CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...) -{ - (void)httppost; - (void)last_post; - return CURL_FORMADD_DISABLED; -} - -int curl_formget(struct curl_httppost *form, void *arg, - curl_formget_callback append) -{ - (void) form; - (void) arg; - (void) append; - return CURL_FORMADD_DISABLED; -} - -void curl_formfree(struct curl_httppost *form) -{ - (void)form; - /* does nothing HTTP is disabled */ -} - - -#endif /* !defined(CURL_DISABLE_HTTP) */ diff --git a/build/premake/premake5/contrib/curl/lib/formdata.h b/build/premake/premake5/contrib/curl/lib/formdata.h deleted file mode 100644 index 69629f628c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/formdata.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef HEADER_CURL_FORMDATA_H -#define HEADER_CURL_FORMDATA_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -enum formtype { - FORM_DATAMEM, /* already allocated FORM_DATA memory */ - FORM_DATA, /* form metadata (convert to network encoding if necessary) */ - FORM_CONTENT, /* form content (never convert) */ - FORM_CALLBACK, /* 'line' points to the custom pointer we pass to the callback - */ - FORM_FILE /* 'line' points to a file name we should read from - to create the form data (never convert) */ -}; - -/* plain and simple linked list with lines to send */ -struct FormData { - struct FormData *next; - enum formtype type; - char *line; - size_t length; -}; - -struct Form { - struct FormData *data; /* current form line to send */ - size_t sent; /* number of bytes of the current line that has - already been sent in a previous invoke */ - FILE *fp; /* file to read from */ - curl_read_callback fread_func; /* fread callback pointer */ -}; - -/* used by FormAdd for temporary storage */ -typedef struct FormInfo { - char *name; - bool name_alloc; - size_t namelength; - char *value; - bool value_alloc; - curl_off_t contentslength; - char *contenttype; - bool contenttype_alloc; - long flags; - char *buffer; /* pointer to existing buffer used for file upload */ - size_t bufferlength; - char *showfilename; /* The file name to show. If not set, the actual - file name will be used */ - bool showfilename_alloc; - char *userp; /* pointer for the read callback */ - struct curl_slist *contentheader; - struct FormInfo *more; -} FormInfo; - -int Curl_FormInit(struct Form *form, struct FormData *formdata); - -CURLcode Curl_getformdata(struct Curl_easy *data, - struct FormData **, - struct curl_httppost *post, - const char *custom_contenttype, - curl_off_t *size); - -/* fread() emulation */ -size_t Curl_FormReader(char *buffer, - size_t size, - size_t nitems, - FILE *mydata); - -/* - * Curl_formpostheader() returns the first line of the formpost, the - * request-header part (which is not part of the request-body like the rest of - * the post). - */ -char *Curl_formpostheader(void *formp, size_t *len); - -char *Curl_FormBoundary(void); - -void Curl_formclean(struct FormData **); - -CURLcode Curl_formconvert(struct Curl_easy *, struct FormData *); - -#endif /* HEADER_CURL_FORMDATA_H */ diff --git a/build/premake/premake5/contrib/curl/lib/ftp.c b/build/premake/premake5/contrib/curl/lib/ftp.c deleted file mode 100644 index aa4d5ac2d7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ftp.c +++ /dev/null @@ -1,4549 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_FTP - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_UTSNAME_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -#include -#include "urldata.h" -#include "sendf.h" -#include "if2ip.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ -#include "socks.h" -#include "ftp.h" -#include "fileinfo.h" -#include "ftplistparser.h" -#include "curl_sec.h" -#include "strtoofft.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "connect.h" -#include "strerror.h" -#include "inet_ntop.h" -#include "inet_pton.h" -#include "select.h" -#include "parsedate.h" /* for the week day and month names */ -#include "sockaddr.h" /* required for Curl_sockaddr_storage */ -#include "multiif.h" -#include "url.h" -#include "strcase.h" -#include "speedcheck.h" -#include "warnless.h" -#include "http_proxy.h" -#include "non-ascii.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifndef NI_MAXHOST -#define NI_MAXHOST 1025 -#endif -#ifndef INET_ADDRSTRLEN -#define INET_ADDRSTRLEN 16 -#endif - -#ifdef CURL_DISABLE_VERBOSE_STRINGS -#define ftp_pasv_verbose(a,b,c,d) Curl_nop_stmt -#endif - -/* Local API functions */ -#ifndef DEBUGBUILD -static void _state(struct connectdata *conn, - ftpstate newstate); -#define state(x,y) _state(x,y) -#else -static void _state(struct connectdata *conn, - ftpstate newstate, - int lineno); -#define state(x,y) _state(x,y,__LINE__) -#endif - -static CURLcode ftp_sendquote(struct connectdata *conn, - struct curl_slist *quote); -static CURLcode ftp_quit(struct connectdata *conn); -static CURLcode ftp_parse_url_path(struct connectdata *conn); -static CURLcode ftp_regular_transfer(struct connectdata *conn, bool *done); -#ifndef CURL_DISABLE_VERBOSE_STRINGS -static void ftp_pasv_verbose(struct connectdata *conn, - Curl_addrinfo *ai, - char *newhost, /* ascii version */ - int port); -#endif -static CURLcode ftp_state_prepare_transfer(struct connectdata *conn); -static CURLcode ftp_state_mdtm(struct connectdata *conn); -static CURLcode ftp_state_quote(struct connectdata *conn, - bool init, ftpstate instate); -static CURLcode ftp_nb_type(struct connectdata *conn, - bool ascii, ftpstate newstate); -static int ftp_need_type(struct connectdata *conn, - bool ascii); -static CURLcode ftp_do(struct connectdata *conn, bool *done); -static CURLcode ftp_done(struct connectdata *conn, - CURLcode, bool premature); -static CURLcode ftp_connect(struct connectdata *conn, bool *done); -static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection); -static CURLcode ftp_do_more(struct connectdata *conn, int *completed); -static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done); -static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode ftp_doing(struct connectdata *conn, - bool *dophase_done); -static CURLcode ftp_setup_connection(struct connectdata * conn); - -static CURLcode init_wc_data(struct connectdata *conn); -static CURLcode wc_statemach(struct connectdata *conn); - -static void wc_data_dtor(void *ptr); - -static CURLcode ftp_state_retr(struct connectdata *conn, curl_off_t filesize); - -static CURLcode ftp_readresp(curl_socket_t sockfd, - struct pingpong *pp, - int *ftpcode, - size_t *size); -static CURLcode ftp_dophase_done(struct connectdata *conn, - bool connected); - -/* easy-to-use macro: */ -#define PPSENDF(x,y,z) result = Curl_pp_sendf(x,y,z); \ - if(result) \ - return result - - -/* - * FTP protocol handler. - */ - -const struct Curl_handler Curl_handler_ftp = { - "FTP", /* scheme */ - ftp_setup_connection, /* setup_connection */ - ftp_do, /* do_it */ - ftp_done, /* done */ - ftp_do_more, /* do_more */ - ftp_connect, /* connect_it */ - ftp_multi_statemach, /* connecting */ - ftp_doing, /* doing */ - ftp_getsock, /* proto_getsock */ - ftp_getsock, /* doing_getsock */ - ftp_domore_getsock, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ftp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_FTP, /* defport */ - CURLPROTO_FTP, /* protocol */ - PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD - | PROTOPT_NOURLQUERY /* flags */ -}; - - -#ifdef USE_SSL -/* - * FTPS protocol handler. - */ - -const struct Curl_handler Curl_handler_ftps = { - "FTPS", /* scheme */ - ftp_setup_connection, /* setup_connection */ - ftp_do, /* do_it */ - ftp_done, /* done */ - ftp_do_more, /* do_more */ - ftp_connect, /* connect_it */ - ftp_multi_statemach, /* connecting */ - ftp_doing, /* doing */ - ftp_getsock, /* proto_getsock */ - ftp_getsock, /* doing_getsock */ - ftp_domore_getsock, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ftp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_FTPS, /* defport */ - CURLPROTO_FTPS, /* protocol */ - PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION | - PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY /* flags */ -}; -#endif - -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed FTP protocol handler. - */ - -static const struct Curl_handler Curl_handler_ftp_proxy = { - "FTP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_FTP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - - -#ifdef USE_SSL -/* - * HTTP-proxyed FTPS protocol handler. - */ - -static const struct Curl_handler Curl_handler_ftps_proxy = { - "FTPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_FTPS, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - -static void close_secondarysocket(struct connectdata *conn) -{ - if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) { - Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); - conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; - } - conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE; - conn->tunnel_state[SECONDARYSOCKET] = TUNNEL_INIT; -} - -/* - * NOTE: back in the old days, we added code in the FTP code that made NOBODY - * requests on files respond with headers passed to the client/stdout that - * looked like HTTP ones. - * - * This approach is not very elegant, it causes confusion and is error-prone. - * It is subject for removal at the next (or at least a future) soname bump. - * Until then you can test the effects of the removal by undefining the - * following define named CURL_FTP_HTTPSTYLE_HEAD. - */ -#define CURL_FTP_HTTPSTYLE_HEAD 1 - -static void freedirs(struct ftp_conn *ftpc) -{ - int i; - if(ftpc->dirs) { - for(i=0; i < ftpc->dirdepth; i++) { - free(ftpc->dirs[i]); - ftpc->dirs[i]=NULL; - } - free(ftpc->dirs); - ftpc->dirs = NULL; - ftpc->dirdepth = 0; - } - Curl_safefree(ftpc->file); - - /* no longer of any use */ - Curl_safefree(ftpc->newhost); -} - -/* Returns non-zero if the given string contains CR (\r) or LF (\n), - which are not allowed within RFC 959 . - Note: The input string is in the client's encoding which might - not be ASCII, so escape sequences \r & \n must be used instead - of hex values 0x0d & 0x0a. -*/ -static bool isBadFtpString(const char *string) -{ - return ((NULL != strchr(string, '\r')) || - (NULL != strchr(string, '\n'))) ? TRUE : FALSE; -} - -/*********************************************************************** - * - * AcceptServerConnect() - * - * After connection request is received from the server this function is - * called to accept the connection and close the listening socket - * - */ -static CURLcode AcceptServerConnect(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - curl_socket_t sock = conn->sock[SECONDARYSOCKET]; - curl_socket_t s = CURL_SOCKET_BAD; -#ifdef ENABLE_IPV6 - struct Curl_sockaddr_storage add; -#else - struct sockaddr_in add; -#endif - curl_socklen_t size = (curl_socklen_t) sizeof(add); - - if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) { - size = sizeof(add); - - s=accept(sock, (struct sockaddr *) &add, &size); - } - Curl_closesocket(conn, sock); /* close the first socket */ - - if(CURL_SOCKET_BAD == s) { - failf(data, "Error accept()ing server connect"); - return CURLE_FTP_PORT_FAILED; - } - infof(data, "Connection accepted from server\n"); - /* when this happens within the DO state it is important that we mark us as - not needing DO_MORE anymore */ - conn->bits.do_more = FALSE; - - conn->sock[SECONDARYSOCKET] = s; - (void)curlx_nonblock(s, TRUE); /* enable non-blocking */ - conn->sock_accepted[SECONDARYSOCKET] = TRUE; - - if(data->set.fsockopt) { - int error = 0; - - /* activate callback for setting socket options */ - error = data->set.fsockopt(data->set.sockopt_client, - s, - CURLSOCKTYPE_ACCEPT); - - if(error) { - close_secondarysocket(conn); - return CURLE_ABORTED_BY_CALLBACK; - } - } - - return CURLE_OK; - -} - -/* - * ftp_timeleft_accept() returns the amount of milliseconds left allowed for - * waiting server to connect. If the value is negative, the timeout time has - * already elapsed. - * - * The start time is stored in progress.t_acceptdata - as set with - * Curl_pgrsTime(..., TIMER_STARTACCEPT); - * - */ -static time_t ftp_timeleft_accept(struct Curl_easy *data) -{ - time_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT; - time_t other; - struct timeval now; - - if(data->set.accepttimeout > 0) - timeout_ms = data->set.accepttimeout; - - now = Curl_tvnow(); - - /* check if the generic timeout possibly is set shorter */ - other = Curl_timeleft(data, &now, FALSE); - if(other && (other < timeout_ms)) - /* note that this also works fine for when other happens to be negative - due to it already having elapsed */ - timeout_ms = other; - else { - /* subtract elapsed time */ - timeout_ms -= Curl_tvdiff(now, data->progress.t_acceptdata); - if(!timeout_ms) - /* avoid returning 0 as that means no timeout! */ - return -1; - } - - return timeout_ms; -} - - -/*********************************************************************** - * - * ReceivedServerConnect() - * - * After allowing server to connect to us from data port, this function - * checks both data connection for connection establishment and ctrl - * connection for a negative response regarding a failure in connecting - * - */ -static CURLcode ReceivedServerConnect(struct connectdata *conn, bool *received) -{ - struct Curl_easy *data = conn->data; - curl_socket_t ctrl_sock = conn->sock[FIRSTSOCKET]; - curl_socket_t data_sock = conn->sock[SECONDARYSOCKET]; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - int result; - time_t timeout_ms; - ssize_t nread; - int ftpcode; - - *received = FALSE; - - timeout_ms = ftp_timeleft_accept(data); - infof(data, "Checking for server connect\n"); - if(timeout_ms < 0) { - /* if a timeout was already reached, bail out */ - failf(data, "Accept timeout occurred while waiting server connect"); - return CURLE_FTP_ACCEPT_TIMEOUT; - } - - /* First check whether there is a cached response from server */ - if(pp->cache_size && pp->cache && pp->cache[0] > '3') { - /* Data connection could not be established, let's return */ - infof(data, "There is negative response in cache while serv connect\n"); - Curl_GetFTPResponse(&nread, conn, &ftpcode); - return CURLE_FTP_ACCEPT_FAILED; - } - - result = Curl_socket_check(ctrl_sock, data_sock, CURL_SOCKET_BAD, 0); - - /* see if the connection request is already here */ - switch(result) { - case -1: /* error */ - /* let's die here */ - failf(data, "Error while waiting for server connect"); - return CURLE_FTP_ACCEPT_FAILED; - case 0: /* Server connect is not received yet */ - break; /* loop */ - default: - - if(result & CURL_CSELECT_IN2) { - infof(data, "Ready to accept data connection from server\n"); - *received = TRUE; - } - else if(result & CURL_CSELECT_IN) { - infof(data, "Ctrl conn has data while waiting for data conn\n"); - Curl_GetFTPResponse(&nread, conn, &ftpcode); - - if(ftpcode/100 > 3) - return CURLE_FTP_ACCEPT_FAILED; - - return CURLE_WEIRD_SERVER_REPLY; - } - - break; - } /* switch() */ - - return CURLE_OK; -} - - -/*********************************************************************** - * - * InitiateTransfer() - * - * After connection from server is accepted this function is called to - * setup transfer parameters and initiate the data transfer. - * - */ -static CURLcode InitiateTransfer(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - struct FTP *ftp = data->req.protop; - CURLcode result = CURLE_OK; - - if(conn->bits.ftp_use_data_ssl) { - /* since we only have a plaintext TCP connection here, we must now - * do the TLS stuff */ - infof(data, "Doing the SSL/TLS handshake on the data stream\n"); - result = Curl_ssl_connect(conn, SECONDARYSOCKET); - if(result) - return result; - } - - if(conn->proto.ftpc.state_saved == FTP_STOR) { - *(ftp->bytecountp)=0; - - /* When we know we're uploading a specified file, we can get the file - size prior to the actual upload. */ - - Curl_pgrsSetUploadSize(data, data->state.infilesize); - - /* set the SO_SNDBUF for the secondary socket for those who need it */ - Curl_sndbufset(conn->sock[SECONDARYSOCKET]); - - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */ - SECONDARYSOCKET, ftp->bytecountp); - } - else { - /* FTP download: */ - Curl_setup_transfer(conn, SECONDARYSOCKET, - conn->proto.ftpc.retr_size_saved, FALSE, - ftp->bytecountp, -1, NULL); /* no upload here */ - } - - conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */ - state(conn, FTP_STOP); - - return CURLE_OK; -} - -/*********************************************************************** - * - * AllowServerConnect() - * - * When we've issue the PORT command, we have told the server to connect to - * us. This function checks whether data connection is established if so it is - * accepted. - * - */ -static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) -{ - struct Curl_easy *data = conn->data; - time_t timeout_ms; - CURLcode result = CURLE_OK; - - *connected = FALSE; - infof(data, "Preparing for accepting server on data port\n"); - - /* Save the time we start accepting server connect */ - Curl_pgrsTime(data, TIMER_STARTACCEPT); - - timeout_ms = ftp_timeleft_accept(data); - if(timeout_ms < 0) { - /* if a timeout was already reached, bail out */ - failf(data, "Accept timeout occurred while waiting server connect"); - return CURLE_FTP_ACCEPT_TIMEOUT; - } - - /* see if the connection request is already here */ - result = ReceivedServerConnect(conn, connected); - if(result) - return result; - - if(*connected) { - result = AcceptServerConnect(conn); - if(result) - return result; - - result = InitiateTransfer(conn); - if(result) - return result; - } - else { - /* Add timeout to multi handle and break out of the loop */ - if(!result && *connected == FALSE) { - if(data->set.accepttimeout > 0) - Curl_expire(data, data->set.accepttimeout); - else - Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT); - } - } - - return result; -} - -/* macro to check for a three-digit ftp status code at the start of the - given string */ -#define STATUSCODE(line) (ISDIGIT(line[0]) && ISDIGIT(line[1]) && \ - ISDIGIT(line[2])) - -/* macro to check for the last line in an FTP server response */ -#define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3])) - -static bool ftp_endofresp(struct connectdata *conn, char *line, size_t len, - int *code) -{ - (void)conn; - - if((len > 3) && LASTLINE(line)) { - *code = curlx_sltosi(strtol(line, NULL, 10)); - return TRUE; - } - - return FALSE; -} - -static CURLcode ftp_readresp(curl_socket_t sockfd, - struct pingpong *pp, - int *ftpcode, /* return the ftp-code if done */ - size_t *size) /* size of the response */ -{ - struct connectdata *conn = pp->conn; - struct Curl_easy *data = conn->data; -#ifdef HAVE_GSSAPI - char * const buf = data->state.buffer; -#endif - CURLcode result = CURLE_OK; - int code; - - result = Curl_pp_readresp(sockfd, pp, &code, size); - -#if defined(HAVE_GSSAPI) - /* handle the security-oriented responses 6xx ***/ - /* FIXME: some errorchecking perhaps... ***/ - switch(code) { - case 631: - code = Curl_sec_read_msg(conn, buf, PROT_SAFE); - break; - case 632: - code = Curl_sec_read_msg(conn, buf, PROT_PRIVATE); - break; - case 633: - code = Curl_sec_read_msg(conn, buf, PROT_CONFIDENTIAL); - break; - default: - /* normal ftp stuff we pass through! */ - break; - } -#endif - - /* store the latest code for later retrieval */ - data->info.httpcode=code; - - if(ftpcode) - *ftpcode = code; - - if(421 == code) { - /* 421 means "Service not available, closing control connection." and FTP - * servers use it to signal that idle session timeout has been exceeded. - * If we ignored the response, it could end up hanging in some cases. - * - * This response code can come at any point so having it treated - * generically is a good idea. - */ - infof(data, "We got a 421 - timeout!\n"); - state(conn, FTP_STOP); - return CURLE_OPERATION_TIMEDOUT; - } - - return result; -} - -/* --- parse FTP server responses --- */ - -/* - * Curl_GetFTPResponse() is a BLOCKING function to read the full response - * from a server after a command. - * - */ - -CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ - struct connectdata *conn, - int *ftpcode) /* return the ftp-code */ -{ - /* - * We cannot read just one byte per read() and then go back to select() as - * the OpenSSL read() doesn't grok that properly. - * - * Alas, read as much as possible, split up into lines, use the ending - * line in a response or continue reading. */ - - curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; - time_t timeout; /* timeout in milliseconds */ - time_t interval_ms; - struct Curl_easy *data = conn->data; - CURLcode result = CURLE_OK; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - size_t nread; - int cache_skip=0; - int value_to_be_ignored=0; - - if(ftpcode) - *ftpcode = 0; /* 0 for errors */ - else - /* make the pointer point to something for the rest of this function */ - ftpcode = &value_to_be_ignored; - - *nreadp=0; - - while(!*ftpcode && !result) { - /* check and reset timeout value every lap */ - timeout = Curl_pp_state_timeout(pp); - - if(timeout <=0) { - failf(data, "FTP response timeout"); - return CURLE_OPERATION_TIMEDOUT; /* already too little time */ - } - - interval_ms = 1000; /* use 1 second timeout intervals */ - if(timeout < interval_ms) - interval_ms = timeout; - - /* - * Since this function is blocking, we need to wait here for input on the - * connection and only then we call the response reading function. We do - * timeout at least every second to make the timeout check run. - * - * A caution here is that the ftp_readresp() function has a cache that may - * contain pieces of a response from the previous invoke and we need to - * make sure we don't just wait for input while there is unhandled data in - * that cache. But also, if the cache is there, we call ftp_readresp() and - * the cache wasn't good enough to continue we must not just busy-loop - * around this function. - * - */ - - if(pp->cache && (cache_skip < 2)) { - /* - * There's a cache left since before. We then skipping the wait for - * socket action, unless this is the same cache like the previous round - * as then the cache was deemed not enough to act on and we then need to - * wait for more data anyway. - */ - } - else if(!Curl_conn_data_pending(conn, FIRSTSOCKET)) { - switch(SOCKET_READABLE(sockfd, interval_ms)) { - case -1: /* select() error, stop reading */ - failf(data, "FTP response aborted due to select/poll error: %d", - SOCKERRNO); - return CURLE_RECV_ERROR; - - case 0: /* timeout */ - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - continue; /* just continue in our loop for the timeout duration */ - - default: /* for clarity */ - break; - } - } - result = ftp_readresp(sockfd, pp, ftpcode, &nread); - if(result) - break; - - if(!nread && pp->cache) - /* bump cache skip counter as on repeated skips we must wait for more - data */ - cache_skip++; - else - /* when we got data or there is no cache left, we reset the cache skip - counter */ - cache_skip=0; - - *nreadp += nread; - - } /* while there's buffer left and loop is requested */ - - pp->pending_resp = FALSE; - - return result; -} - -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* for debug purposes */ -static const char * const ftp_state_names[]={ - "STOP", - "WAIT220", - "AUTH", - "USER", - "PASS", - "ACCT", - "PBSZ", - "PROT", - "CCC", - "PWD", - "SYST", - "NAMEFMT", - "QUOTE", - "RETR_PREQUOTE", - "STOR_PREQUOTE", - "POSTQUOTE", - "CWD", - "MKD", - "MDTM", - "TYPE", - "LIST_TYPE", - "RETR_TYPE", - "STOR_TYPE", - "SIZE", - "RETR_SIZE", - "STOR_SIZE", - "REST", - "RETR_REST", - "PORT", - "PRET", - "PASV", - "LIST", - "RETR", - "STOR", - "QUIT" -}; -#endif - -/* This is the ONLY way to change FTP state! */ -static void _state(struct connectdata *conn, - ftpstate newstate -#ifdef DEBUGBUILD - , int lineno -#endif - ) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - -#if defined(DEBUGBUILD) - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) lineno; -#else - if(ftpc->state != newstate) - infof(conn->data, "FTP %p (line %d) state change from %s to %s\n", - (void *)ftpc, lineno, ftp_state_names[ftpc->state], - ftp_state_names[newstate]); -#endif -#endif - - ftpc->state = newstate; -} - -static CURLcode ftp_state_user(struct connectdata *conn) -{ - CURLcode result; - struct FTP *ftp = conn->data->req.protop; - /* send USER */ - PPSENDF(&conn->proto.ftpc.pp, "USER %s", ftp->user?ftp->user:""); - - state(conn, FTP_USER); - conn->data->state.ftp_trying_alternative = FALSE; - - return CURLE_OK; -} - -static CURLcode ftp_state_pwd(struct connectdata *conn) -{ - CURLcode result; - - /* send PWD to discover our entry point */ - PPSENDF(&conn->proto.ftpc.pp, "%s", "PWD"); - state(conn, FTP_PWD); - - return CURLE_OK; -} - -/* For the FTP "protocol connect" and "doing" phases only */ -static int ftp_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); -} - -/* For the FTP "DO_MORE" phase only */ -static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if(!numsocks) - return GETSOCK_BLANK; - - /* When in DO_MORE state, we could be either waiting for us to connect to a - * remote site, or we could wait for that site to connect to us. Or just - * handle ordinary commands. - */ - - if(FTP_STOP == ftpc->state) { - int bits = GETSOCK_READSOCK(0); - - /* if stopped and still in this state, then we're also waiting for a - connect on the secondary connection */ - socks[0] = conn->sock[FIRSTSOCKET]; - - if(!conn->data->set.ftp_use_port) { - int s; - int i; - /* PORT is used to tell the server to connect to us, and during that we - don't do happy eyeballs, but we do if we connect to the server */ - for(s=1, i=0; i<2; i++) { - if(conn->tempsock[i] != CURL_SOCKET_BAD) { - socks[s] = conn->tempsock[i]; - bits |= GETSOCK_WRITESOCK(s++); - } - } - } - else { - socks[1] = conn->sock[SECONDARYSOCKET]; - bits |= GETSOCK_WRITESOCK(1) | GETSOCK_READSOCK(1); - } - - return bits; - } - else - return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); -} - -/* This is called after the FTP_QUOTE state is passed. - - ftp_state_cwd() sends the range of CWD commands to the server to change to - the correct directory. It may also need to send MKD commands to create - missing ones, if that option is enabled. -*/ -static CURLcode ftp_state_cwd(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if(ftpc->cwddone) - /* already done and fine */ - result = ftp_state_mdtm(conn); - else { - ftpc->count2 = 0; /* count2 counts failed CWDs */ - - /* count3 is set to allow a MKD to fail once. In the case when first CWD - fails and then MKD fails (due to another session raced it to create the - dir) this then allows for a second try to CWD to it */ - ftpc->count3 = (conn->data->set.ftp_create_missing_dirs==2)?1:0; - - if(conn->bits.reuse && ftpc->entrypath) { - /* This is a re-used connection. Since we change directory to where the - transfer is taking place, we must first get back to the original dir - where we ended up after login: */ - ftpc->count1 = 0; /* we count this as the first path, then we add one - for all upcoming ones in the ftp->dirs[] array */ - PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->entrypath); - state(conn, FTP_CWD); - } - else { - if(ftpc->dirdepth) { - ftpc->count1 = 1; - /* issue the first CWD, the rest is sent when the CWD responses are - received... */ - PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->dirs[ftpc->count1 -1]); - state(conn, FTP_CWD); - } - else { - /* No CWD necessary */ - result = ftp_state_mdtm(conn); - } - } - } - return result; -} - -typedef enum { - EPRT, - PORT, - DONE -} ftpport; - -static CURLcode ftp_state_use_port(struct connectdata *conn, - ftpport fcmd) /* start with this */ - -{ - CURLcode result = CURLE_OK; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct Curl_easy *data=conn->data; - curl_socket_t portsock= CURL_SOCKET_BAD; - char myhost[256] = ""; - - struct Curl_sockaddr_storage ss; - Curl_addrinfo *res, *ai; - curl_socklen_t sslen; - char hbuf[NI_MAXHOST]; - struct sockaddr *sa=(struct sockaddr *)&ss; - struct sockaddr_in * const sa4 = (void *)sa; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 * const sa6 = (void *)sa; -#endif - char tmp[1024]; - static const char mode[][5] = { "EPRT", "PORT" }; - int rc; - int error; - char *host = NULL; - char *string_ftpport = data->set.str[STRING_FTPPORT]; - struct Curl_dns_entry *h=NULL; - unsigned short port_min = 0; - unsigned short port_max = 0; - unsigned short port; - bool possibly_non_local = TRUE; - - char *addr = NULL; - - /* Step 1, figure out what is requested, - * accepted format : - * (ipv4|ipv6|domain|interface)?(:port(-range)?)? - */ - - if(data->set.str[STRING_FTPPORT] && - (strlen(data->set.str[STRING_FTPPORT]) > 1)) { - -#ifdef ENABLE_IPV6 - size_t addrlen = INET6_ADDRSTRLEN > strlen(string_ftpport) ? - INET6_ADDRSTRLEN : strlen(string_ftpport); -#else - size_t addrlen = INET_ADDRSTRLEN > strlen(string_ftpport) ? - INET_ADDRSTRLEN : strlen(string_ftpport); -#endif - char *ip_start = string_ftpport; - char *ip_end = NULL; - char *port_start = NULL; - char *port_sep = NULL; - - addr = calloc(addrlen+1, 1); - if(!addr) - return CURLE_OUT_OF_MEMORY; - -#ifdef ENABLE_IPV6 - if(*string_ftpport == '[') { - /* [ipv6]:port(-range) */ - ip_start = string_ftpport + 1; - ip_end = strchr(string_ftpport, ']'); - if(ip_end) - strncpy(addr, ip_start, ip_end - ip_start); - } - else -#endif - if(*string_ftpport == ':') { - /* :port */ - ip_end = string_ftpport; - } - else { - ip_end = strchr(string_ftpport, ':'); - if(ip_end) { - /* either ipv6 or (ipv4|domain|interface):port(-range) */ -#ifdef ENABLE_IPV6 - if(Curl_inet_pton(AF_INET6, string_ftpport, sa6) == 1) { - /* ipv6 */ - port_min = port_max = 0; - strcpy(addr, string_ftpport); - ip_end = NULL; /* this got no port ! */ - } - else -#endif - /* (ipv4|domain|interface):port(-range) */ - strncpy(addr, string_ftpport, ip_end - ip_start); - } - else - /* ipv4|interface */ - strcpy(addr, string_ftpport); - } - - /* parse the port */ - if(ip_end != NULL) { - port_start = strchr(ip_end, ':'); - if(port_start) { - port_min = curlx_ultous(strtoul(port_start+1, NULL, 10)); - port_sep = strchr(port_start, '-'); - if(port_sep) { - port_max = curlx_ultous(strtoul(port_sep + 1, NULL, 10)); - } - else - port_max = port_min; - } - } - - /* correct errors like: - * :1234-1230 - * :-4711, in this case port_min is (unsigned)-1, - * therefore port_min > port_max for all cases - * but port_max = (unsigned)-1 - */ - if(port_min > port_max) - port_min = port_max = 0; - - - if(*addr != '\0') { - /* attempt to get the address of the given interface name */ - switch(Curl_if2ip(conn->ip_addr->ai_family, - Curl_ipv6_scope(conn->ip_addr->ai_addr), - conn->scope_id, addr, hbuf, sizeof(hbuf))) { - case IF2IP_NOT_FOUND: - /* not an interface, use the given string as host name instead */ - host = addr; - break; - case IF2IP_AF_NOT_SUPPORTED: - return CURLE_FTP_PORT_FAILED; - case IF2IP_FOUND: - host = hbuf; /* use the hbuf for host name */ - } - } - else - /* there was only a port(-range) given, default the host */ - host = NULL; - } /* data->set.ftpport */ - - if(!host) { - /* not an interface and not a host name, get default by extracting - the IP from the control connection */ - - sslen = sizeof(ss); - if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) { - failf(data, "getsockname() failed: %s", - Curl_strerror(conn, SOCKERRNO) ); - free(addr); - return CURLE_FTP_PORT_FAILED; - } - switch(sa->sa_family) { -#ifdef ENABLE_IPV6 - case AF_INET6: - Curl_inet_ntop(sa->sa_family, &sa6->sin6_addr, hbuf, sizeof(hbuf)); - break; -#endif - default: - Curl_inet_ntop(sa->sa_family, &sa4->sin_addr, hbuf, sizeof(hbuf)); - break; - } - host = hbuf; /* use this host name */ - possibly_non_local = FALSE; /* we know it is local now */ - } - - /* resolv ip/host to ip */ - rc = Curl_resolv(conn, host, 0, &h); - if(rc == CURLRESOLV_PENDING) - (void)Curl_resolver_wait_resolv(conn, &h); - if(h) { - res = h->addr; - /* when we return from this function, we can forget about this entry - to we can unlock it now already */ - Curl_resolv_unlock(data, h); - } /* (h) */ - else - res = NULL; /* failure! */ - - if(res == NULL) { - failf(data, "failed to resolve the address provided to PORT: %s", host); - free(addr); - return CURLE_FTP_PORT_FAILED; - } - - free(addr); - host = NULL; - - /* step 2, create a socket for the requested address */ - - portsock = CURL_SOCKET_BAD; - error = 0; - for(ai = res; ai; ai = ai->ai_next) { - result = Curl_socket(conn, ai, NULL, &portsock); - if(result) { - error = SOCKERRNO; - continue; - } - break; - } - if(!ai) { - failf(data, "socket failure: %s", Curl_strerror(conn, error)); - return CURLE_FTP_PORT_FAILED; - } - - /* step 3, bind to a suitable local address */ - - memcpy(sa, ai->ai_addr, ai->ai_addrlen); - sslen = ai->ai_addrlen; - - for(port = port_min; port <= port_max;) { - if(sa->sa_family == AF_INET) - sa4->sin_port = htons(port); -#ifdef ENABLE_IPV6 - else - sa6->sin6_port = htons(port); -#endif - /* Try binding the given address. */ - if(bind(portsock, sa, sslen) ) { - /* It failed. */ - error = SOCKERRNO; - if(possibly_non_local && (error == EADDRNOTAVAIL)) { - /* The requested bind address is not local. Use the address used for - * the control connection instead and restart the port loop - */ - - infof(data, "bind(port=%hu) on non-local address failed: %s\n", port, - Curl_strerror(conn, error) ); - - sslen = sizeof(ss); - if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) { - failf(data, "getsockname() failed: %s", - Curl_strerror(conn, SOCKERRNO) ); - Curl_closesocket(conn, portsock); - return CURLE_FTP_PORT_FAILED; - } - port = port_min; - possibly_non_local = FALSE; /* don't try this again */ - continue; - } - else if(error != EADDRINUSE && error != EACCES) { - failf(data, "bind(port=%hu) failed: %s", port, - Curl_strerror(conn, error) ); - Curl_closesocket(conn, portsock); - return CURLE_FTP_PORT_FAILED; - } - } - else - break; - - port++; - } - - /* maybe all ports were in use already*/ - if(port > port_max) { - failf(data, "bind() failed, we ran out of ports!"); - Curl_closesocket(conn, portsock); - return CURLE_FTP_PORT_FAILED; - } - - /* get the name again after the bind() so that we can extract the - port number it uses now */ - sslen = sizeof(ss); - if(getsockname(portsock, (struct sockaddr *)sa, &sslen)) { - failf(data, "getsockname() failed: %s", - Curl_strerror(conn, SOCKERRNO) ); - Curl_closesocket(conn, portsock); - return CURLE_FTP_PORT_FAILED; - } - - /* step 4, listen on the socket */ - - if(listen(portsock, 1)) { - failf(data, "socket failure: %s", Curl_strerror(conn, SOCKERRNO)); - Curl_closesocket(conn, portsock); - return CURLE_FTP_PORT_FAILED; - } - - /* step 5, send the proper FTP command */ - - /* get a plain printable version of the numerical address to work with - below */ - Curl_printable_address(ai, myhost, sizeof(myhost)); - -#ifdef ENABLE_IPV6 - if(!conn->bits.ftp_use_eprt && conn->bits.ipv6) - /* EPRT is disabled but we are connected to a IPv6 host, so we ignore the - request and enable EPRT again! */ - conn->bits.ftp_use_eprt = TRUE; -#endif - - for(; fcmd != DONE; fcmd++) { - - if(!conn->bits.ftp_use_eprt && (EPRT == fcmd)) - /* if disabled, goto next */ - continue; - - if((PORT == fcmd) && sa->sa_family != AF_INET) - /* PORT is IPv4 only */ - continue; - - switch(sa->sa_family) { - case AF_INET: - port = ntohs(sa4->sin_port); - break; -#ifdef ENABLE_IPV6 - case AF_INET6: - port = ntohs(sa6->sin6_port); - break; -#endif - default: - continue; /* might as well skip this */ - } - - if(EPRT == fcmd) { - /* - * Two fine examples from RFC2428; - * - * EPRT |1|132.235.1.2|6275| - * - * EPRT |2|1080::8:800:200C:417A|5282| - */ - - result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], - sa->sa_family == AF_INET?1:2, - myhost, port); - if(result) { - failf(data, "Failure sending EPRT command: %s", - curl_easy_strerror(result)); - Curl_closesocket(conn, portsock); - /* don't retry using PORT */ - ftpc->count1 = PORT; - /* bail out */ - state(conn, FTP_STOP); - return result; - } - break; - } - else if(PORT == fcmd) { - char *source = myhost; - char *dest = tmp; - - /* translate x.x.x.x to x,x,x,x */ - while(source && *source) { - if(*source == '.') - *dest=','; - else - *dest = *source; - dest++; - source++; - } - *dest = 0; - snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); - - result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); - if(result) { - failf(data, "Failure sending PORT command: %s", - curl_easy_strerror(result)); - Curl_closesocket(conn, portsock); - /* bail out */ - state(conn, FTP_STOP); - return result; - } - break; - } - } - - /* store which command was sent */ - ftpc->count1 = fcmd; - - close_secondarysocket(conn); - - /* we set the secondary socket variable to this for now, it is only so that - the cleanup function will close it in case we fail before the true - secondary stuff is made */ - conn->sock[SECONDARYSOCKET] = portsock; - - /* this tcpconnect assignment below is a hackish work-around to make the - multi interface with active FTP work - as it will not wait for a - (passive) connect in Curl_is_connected(). - - The *proper* fix is to make sure that the active connection from the - server is done in a non-blocking way. Currently, it is still BLOCKING. - */ - conn->bits.tcpconnect[SECONDARYSOCKET] = TRUE; - - state(conn, FTP_PORT); - return result; -} - -static CURLcode ftp_state_use_pasv(struct connectdata *conn) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - CURLcode result = CURLE_OK; - /* - Here's the excecutive summary on what to do: - - PASV is RFC959, expect: - 227 Entering Passive Mode (a1,a2,a3,a4,p1,p2) - - LPSV is RFC1639, expect: - 228 Entering Long Passive Mode (4,4,a1,a2,a3,a4,2,p1,p2) - - EPSV is RFC2428, expect: - 229 Entering Extended Passive Mode (|||port|) - - */ - - static const char mode[][5] = { "EPSV", "PASV" }; - int modeoff; - -#ifdef PF_INET6 - if(!conn->bits.ftp_use_epsv && conn->bits.ipv6) - /* EPSV is disabled but we are connected to a IPv6 host, so we ignore the - request and enable EPSV again! */ - conn->bits.ftp_use_epsv = TRUE; -#endif - - modeoff = conn->bits.ftp_use_epsv?0:1; - - PPSENDF(&ftpc->pp, "%s", mode[modeoff]); - - ftpc->count1 = modeoff; - state(conn, FTP_PASV); - infof(conn->data, "Connect data stream passively\n"); - - return result; -} - -/* - * ftp_state_prepare_transfer() starts PORT, PASV or PRET etc. - * - * REST is the last command in the chain of commands when a "head"-like - * request is made. Thus, if an actual transfer is to be made this is where we - * take off for real. - */ -static CURLcode ftp_state_prepare_transfer(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct FTP *ftp = conn->data->req.protop; - struct Curl_easy *data = conn->data; - - if(ftp->transfer != FTPTRANSFER_BODY) { - /* doesn't transfer any data */ - - /* still possibly do PRE QUOTE jobs */ - state(conn, FTP_RETR_PREQUOTE); - result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE); - } - else if(data->set.ftp_use_port) { - /* We have chosen to use the PORT (or similar) command */ - result = ftp_state_use_port(conn, EPRT); - } - else { - /* We have chosen (this is default) to use the PASV (or similar) command */ - if(data->set.ftp_use_pret) { - /* The user has requested that we send a PRET command - to prepare the server for the upcoming PASV */ - if(!conn->proto.ftpc.file) { - PPSENDF(&conn->proto.ftpc.pp, "PRET %s", - data->set.str[STRING_CUSTOMREQUEST]? - data->set.str[STRING_CUSTOMREQUEST]: - (data->set.ftp_list_only?"NLST":"LIST")); - } - else if(data->set.upload) { - PPSENDF(&conn->proto.ftpc.pp, "PRET STOR %s", conn->proto.ftpc.file); - } - else { - PPSENDF(&conn->proto.ftpc.pp, "PRET RETR %s", conn->proto.ftpc.file); - } - state(conn, FTP_PRET); - } - else { - result = ftp_state_use_pasv(conn); - } - } - return result; -} - -static CURLcode ftp_state_rest(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct FTP *ftp = conn->data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if((ftp->transfer != FTPTRANSFER_BODY) && ftpc->file) { - /* if a "head"-like request is being made (on a file) */ - - /* Determine if server can respond to REST command and therefore - whether it supports range */ - PPSENDF(&conn->proto.ftpc.pp, "REST %d", 0); - - state(conn, FTP_REST); - } - else - result = ftp_state_prepare_transfer(conn); - - return result; -} - -static CURLcode ftp_state_size(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct FTP *ftp = conn->data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if((ftp->transfer == FTPTRANSFER_INFO) && ftpc->file) { - /* if a "head"-like request is being made (on a file) */ - - /* we know ftpc->file is a valid pointer to a file name */ - PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); - - state(conn, FTP_SIZE); - } - else - result = ftp_state_rest(conn); - - return result; -} - -static CURLcode ftp_state_list(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - /* If this output is to be machine-parsed, the NLST command might be better - to use, since the LIST command output is not specified or standard in any - way. It has turned out that the NLST list output is not the same on all - servers either... */ - - /* - if FTPFILE_NOCWD was specified, we are currently in - the user's home directory, so we should add the path - as argument for the LIST / NLST / or custom command. - Whether the server will support this, is uncertain. - - The other ftp_filemethods will CWD into dir/dir/ first and - then just do LIST (in that case: nothing to do here) - */ - char *cmd, *lstArg, *slashPos; - - lstArg = NULL; - if((data->set.ftp_filemethod == FTPFILE_NOCWD) && - data->state.path && - data->state.path[0] && - strchr(data->state.path, '/')) { - - lstArg = strdup(data->state.path); - if(!lstArg) - return CURLE_OUT_OF_MEMORY; - - /* Check if path does not end with /, as then we cut off the file part */ - if(lstArg[strlen(lstArg) - 1] != '/') { - - /* chop off the file part if format is dir/dir/file */ - slashPos = strrchr(lstArg, '/'); - if(slashPos) - *(slashPos+1) = '\0'; - } - } - - cmd = aprintf("%s%s%s", - data->set.str[STRING_CUSTOMREQUEST]? - data->set.str[STRING_CUSTOMREQUEST]: - (data->set.ftp_list_only?"NLST":"LIST"), - lstArg? " ": "", - lstArg? lstArg: ""); - - if(!cmd) { - free(lstArg); - return CURLE_OUT_OF_MEMORY; - } - - result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", cmd); - - free(lstArg); - free(cmd); - - if(result) - return result; - - state(conn, FTP_LIST); - - return result; -} - -static CURLcode ftp_state_retr_prequote(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* We've sent the TYPE, now we must send the list of prequote strings */ - - result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE); - - return result; -} - -static CURLcode ftp_state_stor_prequote(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* We've sent the TYPE, now we must send the list of prequote strings */ - - result = ftp_state_quote(conn, TRUE, FTP_STOR_PREQUOTE); - - return result; -} - -static CURLcode ftp_state_type(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct FTP *ftp = conn->data->req.protop; - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - /* If we have selected NOBODY and HEADER, it means that we only want file - information. Which in FTP can't be much more than the file size and - date. */ - if(data->set.opt_no_body && ftpc->file && - ftp_need_type(conn, data->set.prefer_ascii)) { - /* The SIZE command is _not_ RFC 959 specified, and therefor many servers - may not support it! It is however the only way we have to get a file's - size! */ - - ftp->transfer = FTPTRANSFER_INFO; - /* this means no actual transfer will be made */ - - /* Some servers return different sizes for different modes, and thus we - must set the proper type before we check the size */ - result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_TYPE); - if(result) - return result; - } - else - result = ftp_state_size(conn); - - return result; -} - -/* This is called after the CWD commands have been done in the beginning of - the DO phase */ -static CURLcode ftp_state_mdtm(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - /* Requested time of file or time-depended transfer? */ - if((data->set.get_filetime || data->set.timecondition) && ftpc->file) { - - /* we have requested to get the modified-time of the file, this is a white - spot as the MDTM is not mentioned in RFC959 */ - PPSENDF(&ftpc->pp, "MDTM %s", ftpc->file); - - state(conn, FTP_MDTM); - } - else - result = ftp_state_type(conn); - - return result; -} - - -/* This is called after the TYPE and possible quote commands have been sent */ -static CURLcode ftp_state_ul_setup(struct connectdata *conn, - bool sizechecked) -{ - CURLcode result = CURLE_OK; - struct FTP *ftp = conn->data->req.protop; - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - int seekerr = CURL_SEEKFUNC_OK; - - if((data->state.resume_from && !sizechecked) || - ((data->state.resume_from > 0) && sizechecked)) { - /* we're about to continue the uploading of a file */ - /* 1. get already existing file's size. We use the SIZE command for this - which may not exist in the server! The SIZE command is not in - RFC959. */ - - /* 2. This used to set REST. But since we can do append, we - don't another ftp command. We just skip the source file - offset and then we APPEND the rest on the file instead */ - - /* 3. pass file-size number of bytes in the source file */ - /* 4. lower the infilesize counter */ - /* => transfer as usual */ - - if(data->state.resume_from < 0) { - /* Got no given size to start from, figure it out */ - PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); - state(conn, FTP_STOR_SIZE); - return result; - } - - /* enable append */ - data->set.ftp_append = TRUE; - - /* Let's read off the proper amount of bytes from the input. */ - if(conn->seek_func) { - seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, - SEEK_SET); - } - - if(seekerr != CURL_SEEKFUNC_OK) { - if(seekerr != CURL_SEEKFUNC_CANTSEEK) { - failf(data, "Could not seek stream"); - return CURLE_FTP_COULDNT_USE_REST; - } - /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ - else { - curl_off_t passed=0; - do { - size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); - - size_t actuallyread = - data->state.fread_func(data->state.buffer, 1, readthisamountnow, - data->state.in); - - passed += actuallyread; - if((actuallyread == 0) || (actuallyread > readthisamountnow)) { - /* this checks for greater-than only to make sure that the - CURL_READFUNC_ABORT return code still aborts */ - failf(data, "Failed to read data"); - return CURLE_FTP_COULDNT_USE_REST; - } - } while(passed < data->state.resume_from); - } - } - /* now, decrease the size of the read */ - if(data->state.infilesize>0) { - data->state.infilesize -= data->state.resume_from; - - if(data->state.infilesize <= 0) { - infof(data, "File already completely uploaded\n"); - - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - - /* Set ->transfer so that we won't get any error in - * ftp_done() because we didn't transfer anything! */ - ftp->transfer = FTPTRANSFER_NONE; - - state(conn, FTP_STOP); - return CURLE_OK; - } - } - /* we've passed, proceed as normal */ - } /* resume_from */ - - PPSENDF(&ftpc->pp, data->set.ftp_append?"APPE %s":"STOR %s", - ftpc->file); - - state(conn, FTP_STOR); - - return result; -} - -static CURLcode ftp_state_quote(struct connectdata *conn, - bool init, - ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct FTP *ftp = data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - bool quote=FALSE; - struct curl_slist *item; - - switch(instate) { - case FTP_QUOTE: - default: - item = data->set.quote; - break; - case FTP_RETR_PREQUOTE: - case FTP_STOR_PREQUOTE: - item = data->set.prequote; - break; - case FTP_POSTQUOTE: - item = data->set.postquote; - break; - } - - /* - * This state uses: - * 'count1' to iterate over the commands to send - * 'count2' to store wether to allow commands to fail - */ - - if(init) - ftpc->count1 = 0; - else - ftpc->count1++; - - if(item) { - int i = 0; - - /* Skip count1 items in the linked list */ - while((i< ftpc->count1) && item) { - item = item->next; - i++; - } - if(item) { - char *cmd = item->data; - if(cmd[0] == '*') { - cmd++; - ftpc->count2 = 1; /* the sent command is allowed to fail */ - } - else - ftpc->count2 = 0; /* failure means cancel operation */ - - PPSENDF(&ftpc->pp, "%s", cmd); - state(conn, instate); - quote = TRUE; - } - } - - if(!quote) { - /* No more quote to send, continue to ... */ - switch(instate) { - case FTP_QUOTE: - default: - result = ftp_state_cwd(conn); - break; - case FTP_RETR_PREQUOTE: - if(ftp->transfer != FTPTRANSFER_BODY) - state(conn, FTP_STOP); - else { - if(ftpc->known_filesize != -1) { - Curl_pgrsSetDownloadSize(data, ftpc->known_filesize); - result = ftp_state_retr(conn, ftpc->known_filesize); - } - else { - if(data->set.ignorecl) { - /* This code is to support download of growing files. It prevents - the state machine from requesting the file size from the - server. With an unknown file size the download continues until - the server terminates it, otherwise the client stops if the - received byte count exceeds the reported file size. Set option - CURLOPT_IGNORE_CONTENT_LENGTH to 1 to enable this behavior.*/ - PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); - state(conn, FTP_RETR); - } - else { - PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); - state(conn, FTP_RETR_SIZE); - } - } - } - break; - case FTP_STOR_PREQUOTE: - result = ftp_state_ul_setup(conn, FALSE); - break; - case FTP_POSTQUOTE: - break; - } - } - - return result; -} - -/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV - problems */ -static CURLcode ftp_epsv_disable(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - if(conn->bits.ipv6) { - /* We can't disable EPSV when doing IPv6, so this is instead a fail */ - failf(conn->data, "Failed EPSV attempt, exiting\n"); - return CURLE_WEIRD_SERVER_REPLY; - } - - infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n"); - /* disable it for next transfer */ - conn->bits.ftp_use_epsv = FALSE; - conn->data->state.errorbuf = FALSE; /* allow error message to get - rewritten */ - PPSENDF(&conn->proto.ftpc.pp, "%s", "PASV"); - conn->proto.ftpc.count1++; - /* remain in/go to the FTP_PASV state */ - state(conn, FTP_PASV); - return result; -} - - -static char *control_address(struct connectdata *conn) -{ - /* Returns the control connection IP address. - If a proxy tunnel is used, returns the original host name instead, because - the effective control connection address is the proxy address, - not the ftp host. */ - if(conn->bits.tunnel_proxy || conn->bits.socksproxy) - return conn->host.name; - - return conn->ip_addr_str; -} - -static CURLcode ftp_state_pasv_resp(struct connectdata *conn, - int ftpcode) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - CURLcode result; - struct Curl_easy *data=conn->data; - struct Curl_dns_entry *addr=NULL; - int rc; - unsigned short connectport; /* the local port connect() should use! */ - char *str=&data->state.buffer[4]; /* start on the first letter */ - - /* if we come here again, make sure the former name is cleared */ - Curl_safefree(ftpc->newhost); - - if((ftpc->count1 == 0) && - (ftpcode == 229)) { - /* positive EPSV response */ - char *ptr = strchr(str, '('); - if(ptr) { - unsigned int num; - char separator[4]; - ptr++; - if(5 == sscanf(ptr, "%c%c%c%u%c", - &separator[0], - &separator[1], - &separator[2], - &num, - &separator[3])) { - const char sep1 = separator[0]; - int i; - - /* The four separators should be identical, or else this is an oddly - formatted reply and we bail out immediately. */ - for(i=1; i<4; i++) { - if(separator[i] != sep1) { - ptr=NULL; /* set to NULL to signal error */ - break; - } - } - if(num > 0xffff) { - failf(data, "Illegal port number in EPSV reply"); - return CURLE_FTP_WEIRD_PASV_REPLY; - } - if(ptr) { - ftpc->newport = (unsigned short)(num & 0xffff); - ftpc->newhost = strdup(control_address(conn)); - if(!ftpc->newhost) - return CURLE_OUT_OF_MEMORY; - } - } - else - ptr=NULL; - } - if(!ptr) { - failf(data, "Weirdly formatted EPSV reply"); - return CURLE_FTP_WEIRD_PASV_REPLY; - } - } - else if((ftpc->count1 == 1) && - (ftpcode == 227)) { - /* positive PASV response */ - int ip[4]; - int port[2]; - - /* - * Scan for a sequence of six comma-separated numbers and use them as - * IP+port indicators. - * - * Found reply-strings include: - * "227 Entering Passive Mode (127,0,0,1,4,51)" - * "227 Data transfer will passively listen to 127,0,0,1,4,51" - * "227 Entering passive mode. 127,0,0,1,4,51" - */ - while(*str) { - if(6 == sscanf(str, "%d,%d,%d,%d,%d,%d", - &ip[0], &ip[1], &ip[2], &ip[3], - &port[0], &port[1])) - break; - str++; - } - - if(!*str) { - failf(data, "Couldn't interpret the 227-response"); - return CURLE_FTP_WEIRD_227_FORMAT; - } - - /* we got OK from server */ - if(data->set.ftp_skip_ip) { - /* told to ignore the remotely given IP but instead use the host we used - for the control connection */ - infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n", - ip[0], ip[1], ip[2], ip[3], - conn->host.name); - ftpc->newhost = strdup(control_address(conn)); - } - else - ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); - - if(!ftpc->newhost) - return CURLE_OUT_OF_MEMORY; - - ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff); - } - else if(ftpc->count1 == 0) { - /* EPSV failed, move on to PASV */ - return ftp_epsv_disable(conn); - } - else { - failf(data, "Bad PASV/EPSV response: %03d", ftpcode); - return CURLE_FTP_WEIRD_PASV_REPLY; - } - - if(conn->bits.proxy) { - /* - * This connection uses a proxy and we need to connect to the proxy again - * here. We don't want to rely on a former host lookup that might've - * expired now, instead we remake the lookup here and now! - */ - const char * const host_name = conn->bits.socksproxy ? - conn->socks_proxy.host.name : conn->http_proxy.host.name; - rc = Curl_resolv(conn, host_name, (int)conn->port, &addr); - if(rc == CURLRESOLV_PENDING) - /* BLOCKING, ignores the return code but 'addr' will be NULL in - case of failure */ - (void)Curl_resolver_wait_resolv(conn, &addr); - - connectport = - (unsigned short)conn->port; /* we connect to the proxy's port */ - - if(!addr) { - failf(data, "Can't resolve proxy host %s:%hu", host_name, connectport); - return CURLE_COULDNT_RESOLVE_PROXY; - } - } - else { - /* normal, direct, ftp connection */ - rc = Curl_resolv(conn, ftpc->newhost, ftpc->newport, &addr); - if(rc == CURLRESOLV_PENDING) - /* BLOCKING */ - (void)Curl_resolver_wait_resolv(conn, &addr); - - connectport = ftpc->newport; /* we connect to the remote port */ - - if(!addr) { - failf(data, "Can't resolve new host %s:%hu", ftpc->newhost, connectport); - return CURLE_FTP_CANT_GET_HOST; - } - } - - conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE; - result = Curl_connecthost(conn, addr); - - if(result) { - Curl_resolv_unlock(data, addr); /* we're done using this address */ - if(ftpc->count1 == 0 && ftpcode == 229) - return ftp_epsv_disable(conn); - - return result; - } - - - /* - * When this is used from the multi interface, this might've returned with - * the 'connected' set to FALSE and thus we are now awaiting a non-blocking - * connect to connect. - */ - - if(data->set.verbose) - /* this just dumps information about this second connection */ - ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport); - - Curl_safefree(conn->secondaryhostname); - conn->secondaryhostname = strdup(ftpc->newhost); - conn->secondary_port = ftpc->newport; - - Curl_resolv_unlock(data, addr); /* we're done using this address */ - conn->bits.do_more = TRUE; - state(conn, FTP_STOP); /* this phase is completed */ - - return result; -} - -static CURLcode ftp_state_port_resp(struct connectdata *conn, - int ftpcode) -{ - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - ftpport fcmd = (ftpport)ftpc->count1; - CURLcode result = CURLE_OK; - - /* The FTP spec tells a positive response should have code 200. - Be more permissive here to tolerate deviant servers. */ - if(ftpcode / 100 != 2) { - /* the command failed */ - - if(EPRT == fcmd) { - infof(data, "disabling EPRT usage\n"); - conn->bits.ftp_use_eprt = FALSE; - } - fcmd++; - - if(fcmd == DONE) { - failf(data, "Failed to do PORT"); - result = CURLE_FTP_PORT_FAILED; - } - else - /* try next */ - result = ftp_state_use_port(conn, fcmd); - } - else { - infof(data, "Connect data stream actively\n"); - state(conn, FTP_STOP); /* end of DO phase */ - result = ftp_dophase_done(conn, FALSE); - } - - return result; -} - -static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, - int ftpcode) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; - struct FTP *ftp = data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - switch(ftpcode) { - case 213: - { - /* we got a time. Format should be: "YYYYMMDDHHMMSS[.sss]" where the - last .sss part is optional and means fractions of a second */ - int year, month, day, hour, minute, second; - char *buf = data->state.buffer; - if(6 == sscanf(buf+4, "%04d%02d%02d%02d%02d%02d", - &year, &month, &day, &hour, &minute, &second)) { - /* we have a time, reformat it */ - time_t secs=time(NULL); - /* using the good old yacc/bison yuck */ - snprintf(buf, CURL_BUFSIZE(conn->data->set.buffer_size), - "%04d%02d%02d %02d:%02d:%02d GMT", - year, month, day, hour, minute, second); - /* now, convert this into a time() value: */ - data->info.filetime = (long)curl_getdate(buf, &secs); - } - -#ifdef CURL_FTP_HTTPSTYLE_HEAD - /* If we asked for a time of the file and we actually got one as well, - we "emulate" a HTTP-style header in our output. */ - - if(data->set.opt_no_body && - ftpc->file && - data->set.get_filetime && - (data->info.filetime>=0) ) { - time_t filetime = (time_t)data->info.filetime; - struct tm buffer; - const struct tm *tm = &buffer; - - result = Curl_gmtime(filetime, &buffer); - if(result) - return result; - - /* format: "Tue, 15 Nov 1994 12:45:26" */ - snprintf(buf, BUFSIZE-1, - "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", - Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], - tm->tm_mday, - Curl_month[tm->tm_mon], - tm->tm_year + 1900, - tm->tm_hour, - tm->tm_min, - tm->tm_sec); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); - if(result) - return result; - } /* end of a ridiculous amount of conditionals */ -#endif - } - break; - default: - infof(data, "unsupported MDTM reply format\n"); - break; - case 550: /* "No such file or directory" */ - failf(data, "Given file does not exist"); - result = CURLE_FTP_COULDNT_RETR_FILE; - break; - } - - if(data->set.timecondition) { - if((data->info.filetime > 0) && (data->set.timevalue > 0)) { - switch(data->set.timecondition) { - case CURL_TIMECOND_IFMODSINCE: - default: - if(data->info.filetime <= data->set.timevalue) { - infof(data, "The requested document is not new enough\n"); - ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */ - data->info.timecond = TRUE; - state(conn, FTP_STOP); - return CURLE_OK; - } - break; - case CURL_TIMECOND_IFUNMODSINCE: - if(data->info.filetime > data->set.timevalue) { - infof(data, "The requested document is not old enough\n"); - ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */ - data->info.timecond = TRUE; - state(conn, FTP_STOP); - return CURLE_OK; - } - break; - } /* switch */ - } - else { - infof(data, "Skipping time comparison\n"); - } - } - - if(!result) - result = ftp_state_type(conn); - - return result; -} - -static CURLcode ftp_state_type_resp(struct connectdata *conn, - int ftpcode, - ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; - - if(ftpcode/100 != 2) { - /* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a - successful 'TYPE I'. While that is not as RFC959 says, it is still a - positive response code and we allow that. */ - failf(data, "Couldn't set desired mode"); - return CURLE_FTP_COULDNT_SET_TYPE; - } - if(ftpcode != 200) - infof(data, "Got a %03d response code instead of the assumed 200\n", - ftpcode); - - if(instate == FTP_TYPE) - result = ftp_state_size(conn); - else if(instate == FTP_LIST_TYPE) - result = ftp_state_list(conn); - else if(instate == FTP_RETR_TYPE) - result = ftp_state_retr_prequote(conn); - else if(instate == FTP_STOR_TYPE) - result = ftp_state_stor_prequote(conn); - - return result; -} - -static CURLcode ftp_state_retr(struct connectdata *conn, - curl_off_t filesize) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; - struct FTP *ftp = data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if(data->set.max_filesize && (filesize > data->set.max_filesize)) { - failf(data, "Maximum file size exceeded"); - return CURLE_FILESIZE_EXCEEDED; - } - ftp->downloadsize = filesize; - - if(data->state.resume_from) { - /* We always (attempt to) get the size of downloads, so it is done before - this even when not doing resumes. */ - if(filesize == -1) { - infof(data, "ftp server doesn't support SIZE\n"); - /* We couldn't get the size and therefore we can't know if there really - is a part of the file left to get, although the server will just - close the connection when we start the connection so it won't cause - us any harm, just not make us exit as nicely. */ - } - else { - /* We got a file size report, so we check that there actually is a - part of the file left to get, or else we go home. */ - if(data->state.resume_from< 0) { - /* We're supposed to download the last abs(from) bytes */ - if(filesize < -data->state.resume_from) { - failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T - ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")", - data->state.resume_from, filesize); - return CURLE_BAD_DOWNLOAD_RESUME; - } - /* convert to size to download */ - ftp->downloadsize = -data->state.resume_from; - /* download from where? */ - data->state.resume_from = filesize - ftp->downloadsize; - } - else { - if(filesize < data->state.resume_from) { - failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T - ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")", - data->state.resume_from, filesize); - return CURLE_BAD_DOWNLOAD_RESUME; - } - /* Now store the number of bytes we are expected to download */ - ftp->downloadsize = filesize-data->state.resume_from; - } - } - - if(ftp->downloadsize == 0) { - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - infof(data, "File already completely downloaded\n"); - - /* Set ->transfer so that we won't get any error in ftp_done() - * because we didn't transfer the any file */ - ftp->transfer = FTPTRANSFER_NONE; - state(conn, FTP_STOP); - return CURLE_OK; - } - - /* Set resume file transfer offset */ - infof(data, "Instructs server to resume from offset %" - CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from); - - PPSENDF(&ftpc->pp, "REST %" CURL_FORMAT_CURL_OFF_T, - data->state.resume_from); - - state(conn, FTP_RETR_REST); - } - else { - /* no resume */ - PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); - state(conn, FTP_RETR); - } - - return result; -} - -static CURLcode ftp_state_size_resp(struct connectdata *conn, - int ftpcode, - ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data=conn->data; - curl_off_t filesize; - char *buf = data->state.buffer; - - /* get the size from the ascii string: */ - filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1; - - if(instate == FTP_SIZE) { -#ifdef CURL_FTP_HTTPSTYLE_HEAD - if(-1 != filesize) { - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), - "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); - if(result) - return result; - } -#endif - Curl_pgrsSetDownloadSize(data, filesize); - result = ftp_state_rest(conn); - } - else if(instate == FTP_RETR_SIZE) { - Curl_pgrsSetDownloadSize(data, filesize); - result = ftp_state_retr(conn, filesize); - } - else if(instate == FTP_STOR_SIZE) { - data->state.resume_from = filesize; - result = ftp_state_ul_setup(conn, TRUE); - } - - return result; -} - -static CURLcode ftp_state_rest_resp(struct connectdata *conn, - int ftpcode, - ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - switch(instate) { - case FTP_REST: - default: -#ifdef CURL_FTP_HTTPSTYLE_HEAD - if(ftpcode == 350) { - char buffer[24]= { "Accept-ranges: bytes\r\n" }; - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buffer, 0); - if(result) - return result; - } -#endif - result = ftp_state_prepare_transfer(conn); - break; - - case FTP_RETR_REST: - if(ftpcode != 350) { - failf(conn->data, "Couldn't use REST"); - result = CURLE_FTP_COULDNT_USE_REST; - } - else { - PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); - state(conn, FTP_RETR); - } - break; - } - - return result; -} - -static CURLcode ftp_state_stor_resp(struct connectdata *conn, - int ftpcode, ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - if(ftpcode>=400) { - failf(data, "Failed FTP upload: %0d", ftpcode); - state(conn, FTP_STOP); - /* oops, we never close the sockets! */ - return CURLE_UPLOAD_FAILED; - } - - conn->proto.ftpc.state_saved = instate; - - /* PORT means we are now awaiting the server to connect to us. */ - if(data->set.ftp_use_port) { - bool connected; - - state(conn, FTP_STOP); /* no longer in STOR state */ - - result = AllowServerConnect(conn, &connected); - if(result) - return result; - - if(!connected) { - struct ftp_conn *ftpc = &conn->proto.ftpc; - infof(data, "Data conn was not available immediately\n"); - ftpc->wait_data_conn = TRUE; - } - - return CURLE_OK; - } - else - return InitiateTransfer(conn); -} - -/* for LIST and RETR responses */ -static CURLcode ftp_state_get_resp(struct connectdata *conn, - int ftpcode, - ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct FTP *ftp = data->req.protop; - char *buf = data->state.buffer; - - if((ftpcode == 150) || (ftpcode == 125)) { - - /* - A; - 150 Opening BINARY mode data connection for /etc/passwd (2241 - bytes). (ok, the file is being transferred) - - B: - 150 Opening ASCII mode data connection for /bin/ls - - C: - 150 ASCII data connection for /bin/ls (137.167.104.91,37445) (0 bytes). - - D: - 150 Opening ASCII mode data connection for [file] (0.0.0.0,0) (545 bytes) - - E: - 125 Data connection already open; Transfer starting. */ - - curl_off_t size=-1; /* default unknown size */ - - - /* - * It appears that there are FTP-servers that return size 0 for files when - * SIZE is used on the file while being in BINARY mode. To work around - * that (stupid) behavior, we attempt to parse the RETR response even if - * the SIZE returned size zero. - * - * Debugging help from Salvatore Sorrentino on February 26, 2003. - */ - - if((instate != FTP_LIST) && - !data->set.prefer_ascii && - (ftp->downloadsize < 1)) { - /* - * It seems directory listings either don't show the size or very - * often uses size 0 anyway. ASCII transfers may very well turn out - * that the transferred amount of data is not the same as this line - * tells, why using this number in those cases only confuses us. - * - * Example D above makes this parsing a little tricky */ - char *bytes; - bytes=strstr(buf, " bytes"); - if(bytes--) { - long in=(long)(bytes-buf); - /* this is a hint there is size information in there! ;-) */ - while(--in) { - /* scan for the left parenthesis and break there */ - if('(' == *bytes) - break; - /* skip only digits */ - if(!ISDIGIT(*bytes)) { - bytes=NULL; - break; - } - /* one more estep backwards */ - bytes--; - } - /* if we have nothing but digits: */ - if(bytes++) { - /* get the number! */ - size = curlx_strtoofft(bytes, NULL, 0); - } - } - } - else if(ftp->downloadsize > -1) - size = ftp->downloadsize; - - if(size > data->req.maxdownload && data->req.maxdownload > 0) - size = data->req.size = data->req.maxdownload; - else if((instate != FTP_LIST) && (data->set.prefer_ascii)) - size = -1; /* kludge for servers that understate ASCII mode file size */ - - infof(data, "Maxdownload = %" CURL_FORMAT_CURL_OFF_T "\n", - data->req.maxdownload); - - if(instate != FTP_LIST) - infof(data, "Getting file with size: %" CURL_FORMAT_CURL_OFF_T "\n", - size); - - /* FTP download: */ - conn->proto.ftpc.state_saved = instate; - conn->proto.ftpc.retr_size_saved = size; - - if(data->set.ftp_use_port) { - bool connected; - - result = AllowServerConnect(conn, &connected); - if(result) - return result; - - if(!connected) { - struct ftp_conn *ftpc = &conn->proto.ftpc; - infof(data, "Data conn was not available immediately\n"); - state(conn, FTP_STOP); - ftpc->wait_data_conn = TRUE; - } - } - else - return InitiateTransfer(conn); - } - else { - if((instate == FTP_LIST) && (ftpcode == 450)) { - /* simply no matching files in the dir listing */ - ftp->transfer = FTPTRANSFER_NONE; /* don't download anything */ - state(conn, FTP_STOP); /* this phase is over */ - } - else { - failf(data, "RETR response: %03d", ftpcode); - return instate == FTP_RETR && ftpcode == 550? - CURLE_REMOTE_FILE_NOT_FOUND: - CURLE_FTP_COULDNT_RETR_FILE; - } - } - - return result; -} - -/* after USER, PASS and ACCT */ -static CURLcode ftp_state_loggedin(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - if(conn->ssl[FIRSTSOCKET].use) { - /* PBSZ = PROTECTION BUFFER SIZE. - - The 'draft-murray-auth-ftp-ssl' (draft 12, page 7) says: - - Specifically, the PROT command MUST be preceded by a PBSZ - command and a PBSZ command MUST be preceded by a successful - security data exchange (the TLS negotiation in this case) - - ... (and on page 8): - - Thus the PBSZ command must still be issued, but must have a - parameter of '0' to indicate that no buffering is taking place - and the data connection should not be encapsulated. - */ - PPSENDF(&conn->proto.ftpc.pp, "PBSZ %d", 0); - state(conn, FTP_PBSZ); - } - else { - result = ftp_state_pwd(conn); - } - return result; -} - -/* for USER and PASS responses */ -static CURLcode ftp_state_user_resp(struct connectdata *conn, - int ftpcode, - ftpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct FTP *ftp = data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - (void)instate; /* no use for this yet */ - - /* some need password anyway, and others just return 2xx ignored */ - if((ftpcode == 331) && (ftpc->state == FTP_USER)) { - /* 331 Password required for ... - (the server requires to send the user's password too) */ - PPSENDF(&ftpc->pp, "PASS %s", ftp->passwd?ftp->passwd:""); - state(conn, FTP_PASS); - } - else if(ftpcode/100 == 2) { - /* 230 User ... logged in. - (the user logged in with or without password) */ - result = ftp_state_loggedin(conn); - } - else if(ftpcode == 332) { - if(data->set.str[STRING_FTP_ACCOUNT]) { - PPSENDF(&ftpc->pp, "ACCT %s", data->set.str[STRING_FTP_ACCOUNT]); - state(conn, FTP_ACCT); - } - else { - failf(data, "ACCT requested but none available"); - result = CURLE_LOGIN_DENIED; - } - } - else { - /* All other response codes, like: - - 530 User ... access denied - (the server denies to log the specified user) */ - - if(conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER] && - !conn->data->state.ftp_trying_alternative) { - /* Ok, USER failed. Let's try the supplied command. */ - PPSENDF(&conn->proto.ftpc.pp, "%s", - conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER]); - conn->data->state.ftp_trying_alternative = TRUE; - state(conn, FTP_USER); - result = CURLE_OK; - } - else { - failf(data, "Access denied: %03d", ftpcode); - result = CURLE_LOGIN_DENIED; - } - } - return result; -} - -/* for ACCT response */ -static CURLcode ftp_state_acct_resp(struct connectdata *conn, - int ftpcode) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - if(ftpcode != 230) { - failf(data, "ACCT rejected by server: %03d", ftpcode); - result = CURLE_FTP_WEIRD_PASS_REPLY; /* FIX */ - } - else - result = ftp_state_loggedin(conn); - - return result; -} - - -static CURLcode ftp_statemach_act(struct connectdata *conn) -{ - CURLcode result; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - struct Curl_easy *data=conn->data; - int ftpcode; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - static const char ftpauth[][4] = { "SSL", "TLS" }; - size_t nread = 0; - - if(pp->sendleft) - return Curl_pp_flushsend(pp); - - result = ftp_readresp(sock, pp, &ftpcode, &nread); - if(result) - return result; - - if(ftpcode) { - /* we have now received a full FTP server response */ - switch(ftpc->state) { - case FTP_WAIT220: - if(ftpcode == 230) - /* 230 User logged in - already! */ - return ftp_state_user_resp(conn, ftpcode, ftpc->state); - else if(ftpcode != 220) { - failf(data, "Got a %03d ftp-server response when 220 was expected", - ftpcode); - return CURLE_WEIRD_SERVER_REPLY; - } - - /* We have received a 220 response fine, now we proceed. */ -#ifdef HAVE_GSSAPI - if(data->set.krb) { - /* If not anonymous login, try a secure login. Note that this - procedure is still BLOCKING. */ - - Curl_sec_request_prot(conn, "private"); - /* We set private first as default, in case the line below fails to - set a valid level */ - Curl_sec_request_prot(conn, data->set.str[STRING_KRB_LEVEL]); - - if(Curl_sec_login(conn)) - infof(data, "Logging in with password in cleartext!\n"); - else - infof(data, "Authentication successful\n"); - } -#endif - - if(data->set.use_ssl && - (!conn->ssl[FIRSTSOCKET].use || - (conn->bits.proxy_ssl_connected[FIRSTSOCKET] && - !conn->proxy_ssl[FIRSTSOCKET].use))) { - /* We don't have a SSL/TLS connection yet, but FTPS is - requested. Try a FTPS connection now */ - - ftpc->count3=0; - switch(data->set.ftpsslauth) { - case CURLFTPAUTH_DEFAULT: - case CURLFTPAUTH_SSL: - ftpc->count2 = 1; /* add one to get next */ - ftpc->count1 = 0; - break; - case CURLFTPAUTH_TLS: - ftpc->count2 = -1; /* subtract one to get next */ - ftpc->count1 = 1; - break; - default: - failf(data, "unsupported parameter to CURLOPT_FTPSSLAUTH: %d", - (int)data->set.ftpsslauth); - return CURLE_UNKNOWN_OPTION; /* we don't know what to do */ - } - PPSENDF(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]); - state(conn, FTP_AUTH); - } - else { - result = ftp_state_user(conn); - if(result) - return result; - } - - break; - - case FTP_AUTH: - /* we have gotten the response to a previous AUTH command */ - - /* RFC2228 (page 5) says: - * - * If the server is willing to accept the named security mechanism, - * and does not require any security data, it must respond with - * reply code 234/334. - */ - - if((ftpcode == 234) || (ftpcode == 334)) { - /* Curl_ssl_connect is BLOCKING */ - result = Curl_ssl_connect(conn, FIRSTSOCKET); - if(!result) { - conn->bits.ftp_use_data_ssl = FALSE; /* clear-text data */ - result = ftp_state_user(conn); - } - } - else if(ftpc->count3 < 1) { - ftpc->count3++; - ftpc->count1 += ftpc->count2; /* get next attempt */ - result = Curl_pp_sendf(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]); - /* remain in this same state */ - } - else { - if(data->set.use_ssl > CURLUSESSL_TRY) - /* we failed and CURLUSESSL_CONTROL or CURLUSESSL_ALL is set */ - result = CURLE_USE_SSL_FAILED; - else - /* ignore the failure and continue */ - result = ftp_state_user(conn); - } - - if(result) - return result; - break; - - case FTP_USER: - case FTP_PASS: - result = ftp_state_user_resp(conn, ftpcode, ftpc->state); - break; - - case FTP_ACCT: - result = ftp_state_acct_resp(conn, ftpcode); - break; - - case FTP_PBSZ: - PPSENDF(&ftpc->pp, "PROT %c", - data->set.use_ssl == CURLUSESSL_CONTROL ? 'C' : 'P'); - state(conn, FTP_PROT); - - break; - - case FTP_PROT: - if(ftpcode/100 == 2) - /* We have enabled SSL for the data connection! */ - conn->bits.ftp_use_data_ssl = - (data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE; - /* FTP servers typically responds with 500 if they decide to reject - our 'P' request */ - else if(data->set.use_ssl > CURLUSESSL_CONTROL) - /* we failed and bails out */ - return CURLE_USE_SSL_FAILED; - - if(data->set.ftp_ccc) { - /* CCC - Clear Command Channel - */ - PPSENDF(&ftpc->pp, "%s", "CCC"); - state(conn, FTP_CCC); - } - else { - result = ftp_state_pwd(conn); - if(result) - return result; - } - break; - - case FTP_CCC: - if(ftpcode < 500) { - /* First shut down the SSL layer (note: this call will block) */ - result = Curl_ssl_shutdown(conn, FIRSTSOCKET); - - if(result) { - failf(conn->data, "Failed to clear the command channel (CCC)"); - return result; - } - } - - /* Then continue as normal */ - result = ftp_state_pwd(conn); - if(result) - return result; - break; - - case FTP_PWD: - if(ftpcode == 257) { - char *ptr=&data->state.buffer[4]; /* start on the first letter */ - const size_t buf_size = CURL_BUFSIZE(data->set.buffer_size); - char *dir; - char *store; - - dir = malloc(nread + 1); - if(!dir) - return CURLE_OUT_OF_MEMORY; - - /* Reply format is like - 257[rubbish]"" and the - RFC959 says - - The directory name can contain any character; embedded - double-quotes should be escaped by double-quotes (the - "quote-doubling" convention). - */ - - /* scan for the first double-quote for non-standard responses */ - while(ptr < &data->state.buffer[buf_size] - && *ptr != '\n' && *ptr != '\0' && *ptr != '"') - ptr++; - - if('\"' == *ptr) { - /* it started good */ - ptr++; - for(store = dir; *ptr;) { - if('\"' == *ptr) { - if('\"' == ptr[1]) { - /* "quote-doubling" */ - *store = ptr[1]; - ptr++; - } - else { - /* end of path */ - *store = '\0'; /* zero terminate */ - break; /* get out of this loop */ - } - } - else - *store = *ptr; - store++; - ptr++; - } - - /* If the path name does not look like an absolute path (i.e.: it - does not start with a '/'), we probably need some server-dependent - adjustments. For example, this is the case when connecting to - an OS400 FTP server: this server supports two name syntaxes, - the default one being incompatible with standard pathes. In - addition, this server switches automatically to the regular path - syntax when one is encountered in a command: this results in - having an entrypath in the wrong syntax when later used in CWD. - The method used here is to check the server OS: we do it only - if the path name looks strange to minimize overhead on other - systems. */ - - if(!ftpc->server_os && dir[0] != '/') { - - result = Curl_pp_sendf(&ftpc->pp, "%s", "SYST"); - if(result) { - free(dir); - return result; - } - Curl_safefree(ftpc->entrypath); - ftpc->entrypath = dir; /* remember this */ - infof(data, "Entry path is '%s'\n", ftpc->entrypath); - /* also save it where getinfo can access it: */ - data->state.most_recent_ftp_entrypath = ftpc->entrypath; - state(conn, FTP_SYST); - break; - } - - Curl_safefree(ftpc->entrypath); - ftpc->entrypath = dir; /* remember this */ - infof(data, "Entry path is '%s'\n", ftpc->entrypath); - /* also save it where getinfo can access it: */ - data->state.most_recent_ftp_entrypath = ftpc->entrypath; - } - else { - /* couldn't get the path */ - free(dir); - infof(data, "Failed to figure out path\n"); - } - } - state(conn, FTP_STOP); /* we are done with the CONNECT phase! */ - DEBUGF(infof(data, "protocol connect phase DONE\n")); - break; - - case FTP_SYST: - if(ftpcode == 215) { - char *ptr=&data->state.buffer[4]; /* start on the first letter */ - char *os; - char *store; - - os = malloc(nread + 1); - if(!os) - return CURLE_OUT_OF_MEMORY; - - /* Reply format is like - 215 - */ - while(*ptr == ' ') - ptr++; - for(store = os; *ptr && *ptr != ' ';) - *store++ = *ptr++; - *store = '\0'; /* zero terminate */ - - /* Check for special servers here. */ - - if(strcasecompare(os, "OS/400")) { - /* Force OS400 name format 1. */ - result = Curl_pp_sendf(&ftpc->pp, "%s", "SITE NAMEFMT 1"); - if(result) { - free(os); - return result; - } - /* remember target server OS */ - Curl_safefree(ftpc->server_os); - ftpc->server_os = os; - state(conn, FTP_NAMEFMT); - break; - } - else { - /* Nothing special for the target server. */ - /* remember target server OS */ - Curl_safefree(ftpc->server_os); - ftpc->server_os = os; - } - } - else { - /* Cannot identify server OS. Continue anyway and cross fingers. */ - } - - state(conn, FTP_STOP); /* we are done with the CONNECT phase! */ - DEBUGF(infof(data, "protocol connect phase DONE\n")); - break; - - case FTP_NAMEFMT: - if(ftpcode == 250) { - /* Name format change successful: reload initial path. */ - ftp_state_pwd(conn); - break; - } - - state(conn, FTP_STOP); /* we are done with the CONNECT phase! */ - DEBUGF(infof(data, "protocol connect phase DONE\n")); - break; - - case FTP_QUOTE: - case FTP_POSTQUOTE: - case FTP_RETR_PREQUOTE: - case FTP_STOR_PREQUOTE: - if((ftpcode >= 400) && !ftpc->count2) { - /* failure response code, and not allowed to fail */ - failf(conn->data, "QUOT command failed with %03d", ftpcode); - return CURLE_QUOTE_ERROR; - } - result = ftp_state_quote(conn, FALSE, ftpc->state); - if(result) - return result; - - break; - - case FTP_CWD: - if(ftpcode/100 != 2) { - /* failure to CWD there */ - if(conn->data->set.ftp_create_missing_dirs && - ftpc->count1 && !ftpc->count2) { - /* try making it */ - ftpc->count2++; /* counter to prevent CWD-MKD loops */ - PPSENDF(&ftpc->pp, "MKD %s", ftpc->dirs[ftpc->count1 - 1]); - state(conn, FTP_MKD); - } - else { - /* return failure */ - failf(data, "Server denied you to change to the given directory"); - ftpc->cwdfail = TRUE; /* don't remember this path as we failed - to enter it */ - return CURLE_REMOTE_ACCESS_DENIED; - } - } - else { - /* success */ - ftpc->count2=0; - if(++ftpc->count1 <= ftpc->dirdepth) { - /* send next CWD */ - PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]); - } - else { - result = ftp_state_mdtm(conn); - if(result) - return result; - } - } - break; - - case FTP_MKD: - if((ftpcode/100 != 2) && !ftpc->count3--) { - /* failure to MKD the dir */ - failf(data, "Failed to MKD dir: %03d", ftpcode); - return CURLE_REMOTE_ACCESS_DENIED; - } - state(conn, FTP_CWD); - /* send CWD */ - PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]); - break; - - case FTP_MDTM: - result = ftp_state_mdtm_resp(conn, ftpcode); - break; - - case FTP_TYPE: - case FTP_LIST_TYPE: - case FTP_RETR_TYPE: - case FTP_STOR_TYPE: - result = ftp_state_type_resp(conn, ftpcode, ftpc->state); - break; - - case FTP_SIZE: - case FTP_RETR_SIZE: - case FTP_STOR_SIZE: - result = ftp_state_size_resp(conn, ftpcode, ftpc->state); - break; - - case FTP_REST: - case FTP_RETR_REST: - result = ftp_state_rest_resp(conn, ftpcode, ftpc->state); - break; - - case FTP_PRET: - if(ftpcode != 200) { - /* there only is this one standard OK return code. */ - failf(data, "PRET command not accepted: %03d", ftpcode); - return CURLE_FTP_PRET_FAILED; - } - result = ftp_state_use_pasv(conn); - break; - - case FTP_PASV: - result = ftp_state_pasv_resp(conn, ftpcode); - break; - - case FTP_PORT: - result = ftp_state_port_resp(conn, ftpcode); - break; - - case FTP_LIST: - case FTP_RETR: - result = ftp_state_get_resp(conn, ftpcode, ftpc->state); - break; - - case FTP_STOR: - result = ftp_state_stor_resp(conn, ftpcode, ftpc->state); - break; - - case FTP_QUIT: - /* fallthrough, just stop! */ - default: - /* internal error */ - state(conn, FTP_STOP); - break; - } - } /* if(ftpcode) */ - - return result; -} - - -/* called repeatedly until done from multi.c */ -static CURLcode ftp_multi_statemach(struct connectdata *conn, - bool *done) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE); - - /* Check for the state outside of the Curl_socket_check() return code checks - since at times we are in fact already in this state when this function - gets called. */ - *done = (ftpc->state == FTP_STOP) ? TRUE : FALSE; - - return result; -} - -static CURLcode ftp_block_statemach(struct connectdata *conn) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - CURLcode result = CURLE_OK; - - while(ftpc->state != FTP_STOP) { - result = Curl_pp_statemach(pp, TRUE); - if(result) - break; - } - - return result; -} - -/* - * ftp_connect() should do everything that is to be considered a part of - * the connection phase. - * - * The variable 'done' points to will be TRUE if the protocol-layer connect - * phase is done when this function returns, or FALSE if not. - * - */ -static CURLcode ftp_connect(struct connectdata *conn, - bool *done) /* see description above */ -{ - CURLcode result; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - - *done = FALSE; /* default to not done yet */ - - /* We always support persistent connections on ftp */ - connkeep(conn, "FTP default"); - - pp->response_time = RESP_TIMEOUT; /* set default response time-out */ - pp->statemach_act = ftp_statemach_act; - pp->endofresp = ftp_endofresp; - pp->conn = conn; - - if(conn->handler->flags & PROTOPT_SSL) { - /* BLOCKING */ - result = Curl_ssl_connect(conn, FIRSTSOCKET); - if(result) - return result; - } - - Curl_pp_init(pp); /* init the generic pingpong data */ - - /* When we connect, we start in the state where we await the 220 - response */ - state(conn, FTP_WAIT220); - - result = ftp_multi_statemach(conn, done); - - return result; -} - -/*********************************************************************** - * - * ftp_done() - * - * The DONE function. This does what needs to be done after a single DO has - * performed. - * - * Input argument is already checked for validity. - */ -static CURLcode ftp_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - struct Curl_easy *data = conn->data; - struct FTP *ftp = data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - ssize_t nread; - int ftpcode; - CURLcode result = CURLE_OK; - char *path = NULL; - const char *path_to_use = data->state.path; - - if(!ftp) - return CURLE_OK; - - switch(status) { - case CURLE_BAD_DOWNLOAD_RESUME: - case CURLE_FTP_WEIRD_PASV_REPLY: - case CURLE_FTP_PORT_FAILED: - case CURLE_FTP_ACCEPT_FAILED: - case CURLE_FTP_ACCEPT_TIMEOUT: - case CURLE_FTP_COULDNT_SET_TYPE: - case CURLE_FTP_COULDNT_RETR_FILE: - case CURLE_PARTIAL_FILE: - case CURLE_UPLOAD_FAILED: - case CURLE_REMOTE_ACCESS_DENIED: - case CURLE_FILESIZE_EXCEEDED: - case CURLE_REMOTE_FILE_NOT_FOUND: - case CURLE_WRITE_ERROR: - /* the connection stays alive fine even though this happened */ - /* fall-through */ - case CURLE_OK: /* doesn't affect the control connection's status */ - if(!premature) - break; - - /* until we cope better with prematurely ended requests, let them - * fallback as if in complete failure */ - default: /* by default, an error means the control connection is - wedged and should not be used anymore */ - ftpc->ctl_valid = FALSE; - ftpc->cwdfail = TRUE; /* set this TRUE to prevent us to remember the - current path, as this connection is going */ - connclose(conn, "FTP ended with bad error code"); - result = status; /* use the already set error code */ - break; - } - - /* now store a copy of the directory we are in */ - free(ftpc->prevpath); - - if(data->set.wildcardmatch) { - if(data->set.chunk_end && ftpc->file) { - data->set.chunk_end(data->wildcard.customptr); - } - ftpc->known_filesize = -1; - } - - if(!result) - /* get the "raw" path */ - result = Curl_urldecode(data, path_to_use, 0, &path, NULL, FALSE); - if(result) { - /* We can limp along anyway (and should try to since we may already be in - * the error path) */ - ftpc->ctl_valid = FALSE; /* mark control connection as bad */ - connclose(conn, "FTP: out of memory!"); /* mark for connection closure */ - ftpc->prevpath = NULL; /* no path remembering */ - } - else { - size_t flen = ftpc->file?strlen(ftpc->file):0; /* file is "raw" already */ - size_t dlen = strlen(path)-flen; - if(!ftpc->cwdfail) { - if(dlen && (data->set.ftp_filemethod != FTPFILE_NOCWD)) { - ftpc->prevpath = path; - if(flen) - /* if 'path' is not the whole string */ - ftpc->prevpath[dlen]=0; /* terminate */ - } - else { - /* we never changed dir */ - ftpc->prevpath=strdup(""); - free(path); - } - if(ftpc->prevpath) - infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath); - } - else { - ftpc->prevpath = NULL; /* no path */ - free(path); - } - } - /* free the dir tree and file parts */ - freedirs(ftpc); - - /* shut down the socket to inform the server we're done */ - -#ifdef _WIN32_WCE - shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */ -#endif - - if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) { - if(!result && ftpc->dont_check && data->req.maxdownload > 0) { - /* partial download completed */ - result = Curl_pp_sendf(pp, "%s", "ABOR"); - if(result) { - failf(data, "Failure sending ABOR command: %s", - curl_easy_strerror(result)); - ftpc->ctl_valid = FALSE; /* mark control connection as bad */ - connclose(conn, "ABOR command failed"); /* connection closure */ - } - } - - if(conn->ssl[SECONDARYSOCKET].use) { - /* The secondary socket is using SSL so we must close down that part - first before we close the socket for real */ - Curl_ssl_close(conn, SECONDARYSOCKET); - - /* Note that we keep "use" set to TRUE since that (next) connection is - still requested to use SSL */ - } - close_secondarysocket(conn); - } - - if(!result && (ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid && - pp->pending_resp && !premature) { - /* - * Let's see what the server says about the transfer we just performed, - * but lower the timeout as sometimes this connection has died while the - * data has been transferred. This happens when doing through NATs etc that - * abandon old silent connections. - */ - long old_time = pp->response_time; - - pp->response_time = 60*1000; /* give it only a minute for now */ - pp->response = Curl_tvnow(); /* timeout relative now */ - - result = Curl_GetFTPResponse(&nread, conn, &ftpcode); - - pp->response_time = old_time; /* set this back to previous value */ - - if(!nread && (CURLE_OPERATION_TIMEDOUT == result)) { - failf(data, "control connection looks dead"); - ftpc->ctl_valid = FALSE; /* mark control connection as bad */ - connclose(conn, "Timeout or similar in FTP DONE operation"); /* close */ - } - - if(result) - return result; - - if(ftpc->dont_check && data->req.maxdownload > 0) { - /* we have just sent ABOR and there is no reliable way to check if it was - * successful or not; we have to close the connection now */ - infof(data, "partial download completed, closing connection\n"); - connclose(conn, "Partial download with no ability to check"); - return result; - } - - if(!ftpc->dont_check) { - /* 226 Transfer complete, 250 Requested file action okay, completed. */ - if((ftpcode != 226) && (ftpcode != 250)) { - failf(data, "server did not report OK, got %d", ftpcode); - result = CURLE_PARTIAL_FILE; - } - } - } - - if(result || premature) - /* the response code from the transfer showed an error already so no - use checking further */ - ; - else if(data->set.upload) { - if((-1 != data->state.infilesize) && - (data->state.infilesize != *ftp->bytecountp) && - !data->set.crlf && - (ftp->transfer == FTPTRANSFER_BODY)) { - failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T - " out of %" CURL_FORMAT_CURL_OFF_T " bytes)", - *ftp->bytecountp, data->state.infilesize); - result = CURLE_PARTIAL_FILE; - } - } - else { - if((-1 != data->req.size) && - (data->req.size != *ftp->bytecountp) && -#ifdef CURL_DO_LINEEND_CONV - /* Most FTP servers don't adjust their file SIZE response for CRLFs, so - * we'll check to see if the discrepancy can be explained by the number - * of CRLFs we've changed to LFs. - */ - ((data->req.size + data->state.crlf_conversions) != - *ftp->bytecountp) && -#endif /* CURL_DO_LINEEND_CONV */ - (data->req.maxdownload != *ftp->bytecountp)) { - failf(data, "Received only partial file: %" CURL_FORMAT_CURL_OFF_T - " bytes", *ftp->bytecountp); - result = CURLE_PARTIAL_FILE; - } - else if(!ftpc->dont_check && - !*ftp->bytecountp && - (data->req.size>0)) { - failf(data, "No data was received!"); - result = CURLE_FTP_COULDNT_RETR_FILE; - } - } - - /* clear these for next connection */ - ftp->transfer = FTPTRANSFER_BODY; - ftpc->dont_check = FALSE; - - /* Send any post-transfer QUOTE strings? */ - if(!status && !result && !premature && data->set.postquote) - result = ftp_sendquote(conn, data->set.postquote); - - return result; -} - -/*********************************************************************** - * - * ftp_sendquote() - * - * Where a 'quote' means a list of custom commands to send to the server. - * The quote list is passed as an argument. - * - * BLOCKING - */ - -static -CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote) -{ - struct curl_slist *item; - ssize_t nread; - int ftpcode; - CURLcode result; - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - - item = quote; - while(item) { - if(item->data) { - char *cmd = item->data; - bool acceptfail = FALSE; - - /* if a command starts with an asterisk, which a legal FTP command never - can, the command will be allowed to fail without it causing any - aborts or cancels etc. It will cause libcurl to act as if the command - is successful, whatever the server reponds. */ - - if(cmd[0] == '*') { - cmd++; - acceptfail = TRUE; - } - - PPSENDF(&conn->proto.ftpc.pp, "%s", cmd); - - pp->response = Curl_tvnow(); /* timeout relative now */ - - result = Curl_GetFTPResponse(&nread, conn, &ftpcode); - if(result) - return result; - - if(!acceptfail && (ftpcode >= 400)) { - failf(conn->data, "QUOT string not accepted: %s", cmd); - return CURLE_QUOTE_ERROR; - } - } - - item = item->next; - } - - return CURLE_OK; -} - -/*********************************************************************** - * - * ftp_need_type() - * - * Returns TRUE if we in the current situation should send TYPE - */ -static int ftp_need_type(struct connectdata *conn, - bool ascii_wanted) -{ - return conn->proto.ftpc.transfertype != (ascii_wanted?'A':'I'); -} - -/*********************************************************************** - * - * ftp_nb_type() - * - * Set TYPE. We only deal with ASCII or BINARY so this function - * sets one of them. - * If the transfer type is not sent, simulate on OK response in newstate - */ -static CURLcode ftp_nb_type(struct connectdata *conn, - bool ascii, ftpstate newstate) -{ - struct ftp_conn *ftpc = &conn->proto.ftpc; - CURLcode result; - char want = (char)(ascii?'A':'I'); - - if(ftpc->transfertype == want) { - state(conn, newstate); - return ftp_state_type_resp(conn, 200, newstate); - } - - PPSENDF(&ftpc->pp, "TYPE %c", want); - state(conn, newstate); - - /* keep track of our current transfer type */ - ftpc->transfertype = want; - return CURLE_OK; -} - -/*************************************************************************** - * - * ftp_pasv_verbose() - * - * This function only outputs some informationals about this second connection - * when we've issued a PASV command before and thus we have connected to a - * possibly new IP address. - * - */ -#ifndef CURL_DISABLE_VERBOSE_STRINGS -static void -ftp_pasv_verbose(struct connectdata *conn, - Curl_addrinfo *ai, - char *newhost, /* ascii version */ - int port) -{ - char buf[256]; - Curl_printable_address(ai, buf, sizeof(buf)); - infof(conn->data, "Connecting to %s (%s) port %d\n", newhost, buf, port); -} -#endif - -/* - Check if this is a range download, and if so, set the internal variables - properly. - */ - -static CURLcode ftp_range(struct connectdata *conn) -{ - curl_off_t from, to; - char *ptr; - char *ptr2; - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if(data->state.use_range && data->state.range) { - from=curlx_strtoofft(data->state.range, &ptr, 0); - while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) - ptr++; - to=curlx_strtoofft(ptr, &ptr2, 0); - if(ptr == ptr2) { - /* we didn't get any digit */ - to=-1; - } - if((-1 == to) && (from>=0)) { - /* X - */ - data->state.resume_from = from; - DEBUGF(infof(conn->data, "FTP RANGE %" CURL_FORMAT_CURL_OFF_T - " to end of file\n", from)); - } - else if(from < 0) { - /* -Y */ - data->req.maxdownload = -from; - data->state.resume_from = from; - DEBUGF(infof(conn->data, "FTP RANGE the last %" CURL_FORMAT_CURL_OFF_T - " bytes\n", -from)); - } - else { - /* X-Y */ - data->req.maxdownload = (to-from)+1; /* include last byte */ - data->state.resume_from = from; - DEBUGF(infof(conn->data, "FTP RANGE from %" CURL_FORMAT_CURL_OFF_T - " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", - from, data->req.maxdownload)); - } - DEBUGF(infof(conn->data, "range-download from %" CURL_FORMAT_CURL_OFF_T - " to %" CURL_FORMAT_CURL_OFF_T ", totally %" - CURL_FORMAT_CURL_OFF_T " bytes\n", - from, to, data->req.maxdownload)); - ftpc->dont_check = TRUE; /* dont check for successful transfer */ - } - else - data->req.maxdownload = -1; - return CURLE_OK; -} - - -/* - * ftp_do_more() - * - * This function shall be called when the second FTP (data) connection is - * connected. - * - * 'complete' can return 0 for incomplete, 1 for done and -1 for go back - * (which basically is only for when PASV is being sent to retry a failed - * EPSV). - */ - -static CURLcode ftp_do_more(struct connectdata *conn, int *completep) -{ - struct Curl_easy *data=conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - CURLcode result = CURLE_OK; - bool connected = FALSE; - bool complete = FALSE; - - /* the ftp struct is inited in ftp_connect() */ - struct FTP *ftp = data->req.protop; - - /* if the second connection isn't done yet, wait for it */ - if(!conn->bits.tcpconnect[SECONDARYSOCKET]) { - if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { - /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port - aren't used so we blank their arguments. TODO: make this nicer */ - result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE); - - return result; - } - - result = Curl_is_connected(conn, SECONDARYSOCKET, &connected); - - /* Ready to do more? */ - if(connected) { - DEBUGF(infof(data, "DO-MORE connected phase starts\n")); - } - else { - if(result && (ftpc->count1 == 0)) { - *completep = -1; /* go back to DOING please */ - /* this is a EPSV connect failing, try PASV instead */ - return ftp_epsv_disable(conn); - } - return result; - } - } - - result = Curl_proxy_connect(conn, SECONDARYSOCKET); - if(result) - return result; - - if(CONNECT_SECONDARYSOCKET_PROXY_SSL()) - return result; - - if(conn->bits.tunnel_proxy && conn->bits.httpproxy && - conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE) - return result; - - - if(ftpc->state) { - /* already in a state so skip the intial commands. - They are only done to kickstart the do_more state */ - result = ftp_multi_statemach(conn, &complete); - - *completep = (int)complete; - - /* if we got an error or if we don't wait for a data connection return - immediately */ - if(result || (ftpc->wait_data_conn != TRUE)) - return result; - - if(ftpc->wait_data_conn) - /* if we reach the end of the FTP state machine here, *complete will be - TRUE but so is ftpc->wait_data_conn, which says we need to wait for - the data connection and therefore we're not actually complete */ - *completep = 0; - } - - if(ftp->transfer <= FTPTRANSFER_INFO) { - /* a transfer is about to take place, or if not a file name was given - so we'll do a SIZE on it later and then we need the right TYPE first */ - - if(ftpc->wait_data_conn == TRUE) { - bool serv_conned; - - result = ReceivedServerConnect(conn, &serv_conned); - if(result) - return result; /* Failed to accept data connection */ - - if(serv_conned) { - /* It looks data connection is established */ - result = AcceptServerConnect(conn); - ftpc->wait_data_conn = FALSE; - if(!result) - result = InitiateTransfer(conn); - - if(result) - return result; - - *completep = 1; /* this state is now complete when the server has - connected back to us */ - } - } - else if(data->set.upload) { - result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE); - if(result) - return result; - - result = ftp_multi_statemach(conn, &complete); - if(ftpc->wait_data_conn) - /* if we reach the end of the FTP state machine here, *complete will be - TRUE but so is ftpc->wait_data_conn, which says we need to wait for - the data connection and therefore we're not actually complete */ - *completep = 0; - else - *completep = (int)complete; - } - else { - /* download */ - ftp->downloadsize = -1; /* unknown as of yet */ - - result = ftp_range(conn); - if(result) - ; - else if(data->set.ftp_list_only || !ftpc->file) { - /* The specified path ends with a slash, and therefore we think this - is a directory that is requested, use LIST. But before that we - need to set ASCII transfer mode. */ - - /* But only if a body transfer was requested. */ - if(ftp->transfer == FTPTRANSFER_BODY) { - result = ftp_nb_type(conn, TRUE, FTP_LIST_TYPE); - if(result) - return result; - } - /* otherwise just fall through */ - } - else { - result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_RETR_TYPE); - if(result) - return result; - } - - result = ftp_multi_statemach(conn, &complete); - *completep = (int)complete; - } - return result; - } - - if(!result && (ftp->transfer != FTPTRANSFER_BODY)) - /* no data to transfer. FIX: it feels like a kludge to have this here - too! */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - - if(!ftpc->wait_data_conn) { - /* no waiting for the data connection so this is now complete */ - *completep = 1; - DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result)); - } - - return result; -} - - - -/*********************************************************************** - * - * ftp_perform() - * - * This is the actual DO function for FTP. Get a file/directory according to - * the options previously setup. - */ - -static -CURLcode ftp_perform(struct connectdata *conn, - bool *connected, /* connect status after PASV / PORT */ - bool *dophase_done) -{ - /* this is FTP and no proxy */ - CURLcode result=CURLE_OK; - - DEBUGF(infof(conn->data, "DO phase starts\n")); - - if(conn->data->set.opt_no_body) { - /* requested no body means no transfer... */ - struct FTP *ftp = conn->data->req.protop; - ftp->transfer = FTPTRANSFER_INFO; - } - - *dophase_done = FALSE; /* not done yet */ - - /* start the first command in the DO phase */ - result = ftp_state_quote(conn, TRUE, FTP_QUOTE); - if(result) - return result; - - /* run the state-machine */ - result = ftp_multi_statemach(conn, dophase_done); - - *connected = conn->bits.tcpconnect[SECONDARYSOCKET]; - - infof(conn->data, "ftp_perform ends with SECONDARY: %d\n", *connected); - - if(*dophase_done) - DEBUGF(infof(conn->data, "DO phase is complete1\n")); - - return result; -} - -static void wc_data_dtor(void *ptr) -{ - struct ftp_wc_tmpdata *tmp = ptr; - if(tmp) - Curl_ftp_parselist_data_free(&tmp->parser); - free(tmp); -} - -static CURLcode init_wc_data(struct connectdata *conn) -{ - char *last_slash; - char *path = conn->data->state.path; - struct WildcardData *wildcard = &(conn->data->wildcard); - CURLcode result = CURLE_OK; - struct ftp_wc_tmpdata *ftp_tmp; - - last_slash = strrchr(conn->data->state.path, '/'); - if(last_slash) { - last_slash++; - if(last_slash[0] == '\0') { - wildcard->state = CURLWC_CLEAN; - result = ftp_parse_url_path(conn); - return result; - } - else { - wildcard->pattern = strdup(last_slash); - if(!wildcard->pattern) - return CURLE_OUT_OF_MEMORY; - last_slash[0] = '\0'; /* cut file from path */ - } - } - else { /* there is only 'wildcard pattern' or nothing */ - if(path[0]) { - wildcard->pattern = strdup(path); - if(!wildcard->pattern) - return CURLE_OUT_OF_MEMORY; - path[0] = '\0'; - } - else { /* only list */ - wildcard->state = CURLWC_CLEAN; - result = ftp_parse_url_path(conn); - return result; - } - } - - /* program continues only if URL is not ending with slash, allocate needed - resources for wildcard transfer */ - - /* allocate ftp protocol specific temporary wildcard data */ - ftp_tmp = calloc(1, sizeof(struct ftp_wc_tmpdata)); - if(!ftp_tmp) { - Curl_safefree(wildcard->pattern); - return CURLE_OUT_OF_MEMORY; - } - - /* INITIALIZE parselist structure */ - ftp_tmp->parser = Curl_ftp_parselist_data_alloc(); - if(!ftp_tmp->parser) { - Curl_safefree(wildcard->pattern); - free(ftp_tmp); - return CURLE_OUT_OF_MEMORY; - } - - wildcard->tmp = ftp_tmp; /* put it to the WildcardData tmp pointer */ - wildcard->tmp_dtor = wc_data_dtor; - - /* wildcard does not support NOCWD option (assert it?) */ - if(conn->data->set.ftp_filemethod == FTPFILE_NOCWD) - conn->data->set.ftp_filemethod = FTPFILE_MULTICWD; - - /* try to parse ftp url */ - result = ftp_parse_url_path(conn); - if(result) { - Curl_safefree(wildcard->pattern); - wildcard->tmp_dtor(wildcard->tmp); - wildcard->tmp_dtor = ZERO_NULL; - wildcard->tmp = NULL; - return result; - } - - wildcard->path = strdup(conn->data->state.path); - if(!wildcard->path) { - Curl_safefree(wildcard->pattern); - wildcard->tmp_dtor(wildcard->tmp); - wildcard->tmp_dtor = ZERO_NULL; - wildcard->tmp = NULL; - return CURLE_OUT_OF_MEMORY; - } - - /* backup old write_function */ - ftp_tmp->backup.write_function = conn->data->set.fwrite_func; - /* parsing write function */ - conn->data->set.fwrite_func = Curl_ftp_parselist; - /* backup old file descriptor */ - ftp_tmp->backup.file_descriptor = conn->data->set.out; - /* let the writefunc callback know what curl pointer is working with */ - conn->data->set.out = conn; - - infof(conn->data, "Wildcard - Parsing started\n"); - return CURLE_OK; -} - -/* This is called recursively */ -static CURLcode wc_statemach(struct connectdata *conn) -{ - struct WildcardData * const wildcard = &(conn->data->wildcard); - CURLcode result = CURLE_OK; - - switch(wildcard->state) { - case CURLWC_INIT: - result = init_wc_data(conn); - if(wildcard->state == CURLWC_CLEAN) - /* only listing! */ - break; - else - wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING; - break; - - case CURLWC_MATCHING: { - /* In this state is LIST response successfully parsed, so lets restore - previous WRITEFUNCTION callback and WRITEDATA pointer */ - struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp; - conn->data->set.fwrite_func = ftp_tmp->backup.write_function; - conn->data->set.out = ftp_tmp->backup.file_descriptor; - ftp_tmp->backup.write_function = ZERO_NULL; - ftp_tmp->backup.file_descriptor = NULL; - wildcard->state = CURLWC_DOWNLOADING; - - if(Curl_ftp_parselist_geterror(ftp_tmp->parser)) { - /* error found in LIST parsing */ - wildcard->state = CURLWC_CLEAN; - return wc_statemach(conn); - } - else if(wildcard->filelist->size == 0) { - /* no corresponding file */ - wildcard->state = CURLWC_CLEAN; - return CURLE_REMOTE_FILE_NOT_FOUND; - } - return wc_statemach(conn); - } - - case CURLWC_DOWNLOADING: { - /* filelist has at least one file, lets get first one */ - struct ftp_conn *ftpc = &conn->proto.ftpc; - struct curl_fileinfo *finfo = wildcard->filelist->head->ptr; - - char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename); - if(!tmp_path) - return CURLE_OUT_OF_MEMORY; - - /* switch default "state.pathbuffer" and tmp_path, good to see - ftp_parse_url_path function to understand this trick */ - Curl_safefree(conn->data->state.pathbuffer); - conn->data->state.pathbuffer = tmp_path; - conn->data->state.path = tmp_path; - - infof(conn->data, "Wildcard - START of \"%s\"\n", finfo->filename); - if(conn->data->set.chunk_bgn) { - long userresponse = conn->data->set.chunk_bgn( - finfo, wildcard->customptr, (int)wildcard->filelist->size); - switch(userresponse) { - case CURL_CHUNK_BGN_FUNC_SKIP: - infof(conn->data, "Wildcard - \"%s\" skipped by user\n", - finfo->filename); - wildcard->state = CURLWC_SKIP; - return wc_statemach(conn); - case CURL_CHUNK_BGN_FUNC_FAIL: - return CURLE_CHUNK_FAILED; - } - } - - if(finfo->filetype != CURLFILETYPE_FILE) { - wildcard->state = CURLWC_SKIP; - return wc_statemach(conn); - } - - if(finfo->flags & CURLFINFOFLAG_KNOWN_SIZE) - ftpc->known_filesize = finfo->size; - - result = ftp_parse_url_path(conn); - if(result) - return result; - - /* we don't need the Curl_fileinfo of first file anymore */ - Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL); - - if(wildcard->filelist->size == 0) { /* remains only one file to down. */ - wildcard->state = CURLWC_CLEAN; - /* after that will be ftp_do called once again and no transfer - will be done because of CURLWC_CLEAN state */ - return CURLE_OK; - } - } break; - - case CURLWC_SKIP: { - if(conn->data->set.chunk_end) - conn->data->set.chunk_end(conn->data->wildcard.customptr); - Curl_llist_remove(wildcard->filelist, wildcard->filelist->head, NULL); - wildcard->state = (wildcard->filelist->size == 0) ? - CURLWC_CLEAN : CURLWC_DOWNLOADING; - return wc_statemach(conn); - } - - case CURLWC_CLEAN: { - struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp; - result = CURLE_OK; - if(ftp_tmp) - result = Curl_ftp_parselist_geterror(ftp_tmp->parser); - - wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE; - } break; - - case CURLWC_DONE: - case CURLWC_ERROR: - break; - } - - return result; -} - -/*********************************************************************** - * - * ftp_do() - * - * This function is registered as 'curl_do' function. It decodes the path - * parts etc as a wrapper to the actual DO function (ftp_perform). - * - * The input argument is already checked for validity. - */ -static CURLcode ftp_do(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - *done = FALSE; /* default to false */ - ftpc->wait_data_conn = FALSE; /* default to no such wait */ - - if(conn->data->set.wildcardmatch) { - result = wc_statemach(conn); - if(conn->data->wildcard.state == CURLWC_SKIP || - conn->data->wildcard.state == CURLWC_DONE) { - /* do not call ftp_regular_transfer */ - return CURLE_OK; - } - if(result) /* error, loop or skipping the file */ - return result; - } - else { /* no wildcard FSM needed */ - result = ftp_parse_url_path(conn); - if(result) - return result; - } - - result = ftp_regular_transfer(conn, done); - - return result; -} - - -CURLcode Curl_ftpsend(struct connectdata *conn, const char *cmd) -{ - ssize_t bytes_written; -#define SBUF_SIZE 1024 - char s[SBUF_SIZE]; - size_t write_len; - char *sptr=s; - CURLcode result = CURLE_OK; -#ifdef HAVE_GSSAPI - enum protection_level data_sec = conn->data_prot; -#endif - - write_len = strlen(cmd); - if(write_len > (sizeof(s) -3)) - return CURLE_BAD_FUNCTION_ARGUMENT; - - strcpy(&s[write_len], "\r\n"); /* append a trailing CRLF */ - write_len +=2; - - bytes_written=0; - - result = Curl_convert_to_network(conn->data, s, write_len); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; - - for(;;) { -#ifdef HAVE_GSSAPI - conn->data_prot = PROT_CMD; -#endif - result = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len, - &bytes_written); -#ifdef HAVE_GSSAPI - DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); - conn->data_prot = data_sec; -#endif - - if(result) - break; - - if(conn->data->set.verbose) - Curl_debug(conn->data, CURLINFO_HEADER_OUT, - sptr, (size_t)bytes_written, conn); - - if(bytes_written != (ssize_t)write_len) { - write_len -= bytes_written; - sptr += bytes_written; - } - else - break; - } - - return result; -} - -/*********************************************************************** - * - * ftp_quit() - * - * This should be called before calling sclose() on an ftp control connection - * (not data connections). We should then wait for the response from the - * server before returning. The calling code should then try to close the - * connection. - * - */ -static CURLcode ftp_quit(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - if(conn->proto.ftpc.ctl_valid) { - result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "QUIT"); - if(result) { - failf(conn->data, "Failure sending QUIT command: %s", - curl_easy_strerror(result)); - conn->proto.ftpc.ctl_valid = FALSE; /* mark control connection as bad */ - connclose(conn, "QUIT command failed"); /* mark for connection closure */ - state(conn, FTP_STOP); - return result; - } - - state(conn, FTP_QUIT); - - result = ftp_block_statemach(conn); - } - - return result; -} - -/*********************************************************************** - * - * ftp_disconnect() - * - * Disconnect from an FTP server. Cleanup protocol-specific per-connection - * resources. BLOCKING. - */ -static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection) -{ - struct ftp_conn *ftpc= &conn->proto.ftpc; - struct pingpong *pp = &ftpc->pp; - - /* We cannot send quit unconditionally. If this connection is stale or - bad in any way, sending quit and waiting around here will make the - disconnect wait in vain and cause more problems than we need to. - - ftp_quit() will check the state of ftp->ctl_valid. If it's ok it - will try to send the QUIT command, otherwise it will just return. - */ - if(dead_connection) - ftpc->ctl_valid = FALSE; - - /* The FTP session may or may not have been allocated/setup at this point! */ - (void)ftp_quit(conn); /* ignore errors on the QUIT */ - - if(ftpc->entrypath) { - struct Curl_easy *data = conn->data; - if(data->state.most_recent_ftp_entrypath == ftpc->entrypath) { - data->state.most_recent_ftp_entrypath = NULL; - } - free(ftpc->entrypath); - ftpc->entrypath = NULL; - } - - freedirs(ftpc); - free(ftpc->prevpath); - ftpc->prevpath = NULL; - free(ftpc->server_os); - ftpc->server_os = NULL; - - Curl_pp_disconnect(pp); - -#ifdef HAVE_GSSAPI - Curl_sec_end(conn); -#endif - - return CURLE_OK; -} - -/*********************************************************************** - * - * ftp_parse_url_path() - * - * Parse the URL path into separate path components. - * - */ -static -CURLcode ftp_parse_url_path(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - /* the ftp struct is already inited in ftp_connect() */ - struct FTP *ftp = data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - const char *slash_pos; /* position of the first '/' char in curpos */ - const char *path_to_use = data->state.path; - const char *cur_pos; - const char *filename = NULL; - - cur_pos = path_to_use; /* current position in path. point at the begin of - next path component */ - - ftpc->ctl_valid = FALSE; - ftpc->cwdfail = FALSE; - - switch(data->set.ftp_filemethod) { - case FTPFILE_NOCWD: - /* fastest, but less standard-compliant */ - - /* - The best time to check whether the path is a file or directory is right - here. so: - - the first condition in the if() right here, is there just in case - someone decides to set path to NULL one day - */ - if(path_to_use[0] && - (path_to_use[strlen(path_to_use) - 1] != '/') ) - filename = path_to_use; /* this is a full file path */ - /* - else { - ftpc->file is not used anywhere other than for operations on a file. - In other words, never for directory operations. - So we can safely leave filename as NULL here and use it as a - argument in dir/file decisions. - } - */ - break; - - case FTPFILE_SINGLECWD: - /* get the last slash */ - if(!path_to_use[0]) { - /* no dir, no file */ - ftpc->dirdepth = 0; - break; - } - slash_pos=strrchr(cur_pos, '/'); - if(slash_pos || !*cur_pos) { - size_t dirlen = slash_pos-cur_pos; - CURLcode result; - - ftpc->dirs = calloc(1, sizeof(ftpc->dirs[0])); - if(!ftpc->dirs) - return CURLE_OUT_OF_MEMORY; - - if(!dirlen) - dirlen++; - - result = Curl_urldecode(conn->data, slash_pos ? cur_pos : "/", - slash_pos ? dirlen : 1, - &ftpc->dirs[0], NULL, - FALSE); - if(result) { - freedirs(ftpc); - return result; - } - ftpc->dirdepth = 1; /* we consider it to be a single dir */ - filename = slash_pos ? slash_pos+1 : cur_pos; /* rest is file name */ - } - else - filename = cur_pos; /* this is a file name only */ - break; - - default: /* allow pretty much anything */ - case FTPFILE_MULTICWD: - ftpc->dirdepth = 0; - ftpc->diralloc = 5; /* default dir depth to allocate */ - ftpc->dirs = calloc(ftpc->diralloc, sizeof(ftpc->dirs[0])); - if(!ftpc->dirs) - return CURLE_OUT_OF_MEMORY; - - /* we have a special case for listing the root dir only */ - if(!strcmp(path_to_use, "/")) { - cur_pos++; /* make it point to the zero byte */ - ftpc->dirs[0] = strdup("/"); - ftpc->dirdepth++; - } - else { - /* parse the URL path into separate path components */ - while((slash_pos = strchr(cur_pos, '/')) != NULL) { - /* 1 or 0 pointer offset to indicate absolute directory */ - ssize_t absolute_dir = ((cur_pos - data->state.path > 0) && - (ftpc->dirdepth == 0))?1:0; - - /* seek out the next path component */ - if(slash_pos-cur_pos) { - /* we skip empty path components, like "x//y" since the FTP command - CWD requires a parameter and a non-existent parameter a) doesn't - work on many servers and b) has no effect on the others. */ - size_t len = slash_pos - cur_pos + absolute_dir; - CURLcode result = - Curl_urldecode(conn->data, cur_pos - absolute_dir, len, - &ftpc->dirs[ftpc->dirdepth], NULL, - TRUE); - if(result) { - free(ftpc->dirs[ftpc->dirdepth]); - freedirs(ftpc); - return result; - } - } - else { - cur_pos = slash_pos + 1; /* jump to the rest of the string */ - if(!ftpc->dirdepth) { - /* path starts with a slash, add that as a directory */ - ftpc->dirs[ftpc->dirdepth] = strdup("/"); - if(!ftpc->dirs[ftpc->dirdepth++]) { /* run out of memory ... */ - failf(data, "no memory"); - freedirs(ftpc); - return CURLE_OUT_OF_MEMORY; - } - } - continue; - } - - cur_pos = slash_pos + 1; /* jump to the rest of the string */ - if(++ftpc->dirdepth >= ftpc->diralloc) { - /* enlarge array */ - char **bigger; - ftpc->diralloc *= 2; /* double the size each time */ - bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0])); - if(!bigger) { - freedirs(ftpc); - return CURLE_OUT_OF_MEMORY; - } - ftpc->dirs = bigger; - } - } - } - filename = cur_pos; /* the rest is the file name */ - break; - } /* switch */ - - if(filename && *filename) { - CURLcode result = - Curl_urldecode(conn->data, filename, 0, &ftpc->file, NULL, TRUE); - - if(result) { - freedirs(ftpc); - return result; - } - } - else - ftpc->file=NULL; /* instead of point to a zero byte, we make it a NULL - pointer */ - - if(data->set.upload && !ftpc->file && (ftp->transfer == FTPTRANSFER_BODY)) { - /* We need a file name when uploading. Return error! */ - failf(data, "Uploading to a URL without a file name!"); - return CURLE_URL_MALFORMAT; - } - - ftpc->cwddone = FALSE; /* default to not done */ - - if(ftpc->prevpath) { - /* prevpath is "raw" so we convert the input path before we compare the - strings */ - size_t dlen; - char *path; - CURLcode result = - Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); - if(result) { - freedirs(ftpc); - return result; - } - - dlen -= ftpc->file?strlen(ftpc->file):0; - if((dlen == strlen(ftpc->prevpath)) && - !strncmp(path, ftpc->prevpath, dlen)) { - infof(data, "Request has same path as previous transfer\n"); - ftpc->cwddone = TRUE; - } - free(path); - } - - return CURLE_OK; -} - -/* call this when the DO phase has completed */ -static CURLcode ftp_dophase_done(struct connectdata *conn, - bool connected) -{ - struct FTP *ftp = conn->data->req.protop; - struct ftp_conn *ftpc = &conn->proto.ftpc; - - if(connected) { - int completed; - CURLcode result = ftp_do_more(conn, &completed); - - if(result) { - close_secondarysocket(conn); - return result; - } - } - - if(ftp->transfer != FTPTRANSFER_BODY) - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - else if(!connected) - /* since we didn't connect now, we want do_more to get called */ - conn->bits.do_more = TRUE; - - ftpc->ctl_valid = TRUE; /* seems good */ - - return CURLE_OK; -} - -/* called from multi.c while DOing */ -static CURLcode ftp_doing(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result = ftp_multi_statemach(conn, dophase_done); - - if(result) - DEBUGF(infof(conn->data, "DO phase failed\n")); - else if(*dophase_done) { - result = ftp_dophase_done(conn, FALSE /* not connected */); - - DEBUGF(infof(conn->data, "DO phase is complete2\n")); - } - return result; -} - -/*********************************************************************** - * - * ftp_regular_transfer() - * - * The input argument is already checked for validity. - * - * Performs all commands done before a regular transfer between a local and a - * remote host. - * - * ftp->ctl_valid starts out as FALSE, and gets set to TRUE if we reach the - * ftp_done() function without finding any major problem. - */ -static -CURLcode ftp_regular_transfer(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result=CURLE_OK; - bool connected=FALSE; - struct Curl_easy *data = conn->data; - struct ftp_conn *ftpc = &conn->proto.ftpc; - data->req.size = -1; /* make sure this is unknown at this point */ - - Curl_pgrsSetUploadCounter(data, 0); - Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); - - ftpc->ctl_valid = TRUE; /* starts good */ - - result = ftp_perform(conn, - &connected, /* have we connected after PASV/PORT */ - dophase_done); /* all commands in the DO-phase done? */ - - if(!result) { - - if(!*dophase_done) - /* the DO phase has not completed yet */ - return CURLE_OK; - - result = ftp_dophase_done(conn, connected); - - if(result) - return result; - } - else - freedirs(ftpc); - - return result; -} - -static CURLcode ftp_setup_connection(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - char *type; - char command; - struct FTP *ftp; - - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel ftp operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_ftp) - conn->handler = &Curl_handler_ftp_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_ftps_proxy; -#else - failf(data, "FTPS not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - /* set it up as a HTTP connection instead */ - return conn->handler->setup_connection(conn); -#else - failf(data, "FTP over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - conn->data->req.protop = ftp = malloc(sizeof(struct FTP)); - if(NULL == ftp) - return CURLE_OUT_OF_MEMORY; - - data->state.path++; /* don't include the initial slash */ - data->state.slash_removed = TRUE; /* we've skipped the slash */ - - /* FTP URLs support an extension like ";type=" that - * we'll try to get now! */ - type = strstr(data->state.path, ";type="); - - if(!type) - type = strstr(conn->host.rawalloc, ";type="); - - if(type) { - *type = 0; /* it was in the middle of the hostname */ - command = Curl_raw_toupper(type[6]); - conn->bits.type_set = TRUE; - - switch(command) { - case 'A': /* ASCII mode */ - data->set.prefer_ascii = TRUE; - break; - - case 'D': /* directory mode */ - data->set.ftp_list_only = TRUE; - break; - - case 'I': /* binary mode */ - default: - /* switch off ASCII */ - data->set.prefer_ascii = FALSE; - break; - } - } - - /* get some initial data into the ftp struct */ - ftp->bytecountp = &conn->data->req.bytecount; - ftp->transfer = FTPTRANSFER_BODY; - ftp->downloadsize = 0; - - /* No need to duplicate user+password, the connectdata struct won't change - during a session, but we re-init them here since on subsequent inits - since the conn struct may have changed or been replaced. - */ - ftp->user = conn->user; - ftp->passwd = conn->passwd; - if(isBadFtpString(ftp->user)) - return CURLE_URL_MALFORMAT; - if(isBadFtpString(ftp->passwd)) - return CURLE_URL_MALFORMAT; - - conn->proto.ftpc.known_filesize = -1; /* unknown size for now */ - - return CURLE_OK; -} - -#endif /* CURL_DISABLE_FTP */ diff --git a/build/premake/premake5/contrib/curl/lib/ftp.h b/build/premake/premake5/contrib/curl/lib/ftp.h deleted file mode 100644 index 3bbf26206e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ftp.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef HEADER_CURL_FTP_H -#define HEADER_CURL_FTP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "pingpong.h" - -#ifndef CURL_DISABLE_FTP -extern const struct Curl_handler Curl_handler_ftp; - -#ifdef USE_SSL -extern const struct Curl_handler Curl_handler_ftps; -#endif - -CURLcode Curl_ftpsend(struct connectdata *, const char *cmd); -CURLcode Curl_GetFTPResponse(ssize_t *nread, struct connectdata *conn, - int *ftpcode); -#endif /* CURL_DISABLE_FTP */ - -/**************************************************************************** - * FTP unique setup - ***************************************************************************/ -typedef enum { - FTP_STOP, /* do nothing state, stops the state machine */ - FTP_WAIT220, /* waiting for the initial 220 response immediately after - a connect */ - FTP_AUTH, - FTP_USER, - FTP_PASS, - FTP_ACCT, - FTP_PBSZ, - FTP_PROT, - FTP_CCC, - FTP_PWD, - FTP_SYST, - FTP_NAMEFMT, - FTP_QUOTE, /* waiting for a response to a command sent in a quote list */ - FTP_RETR_PREQUOTE, - FTP_STOR_PREQUOTE, - FTP_POSTQUOTE, - FTP_CWD, /* change dir */ - FTP_MKD, /* if the dir didn't exist */ - FTP_MDTM, /* to figure out the datestamp */ - FTP_TYPE, /* to set type when doing a head-like request */ - FTP_LIST_TYPE, /* set type when about to do a dir list */ - FTP_RETR_TYPE, /* set type when about to RETR a file */ - FTP_STOR_TYPE, /* set type when about to STOR a file */ - FTP_SIZE, /* get the remote file's size for head-like request */ - FTP_RETR_SIZE, /* get the remote file's size for RETR */ - FTP_STOR_SIZE, /* get the size for STOR */ - FTP_REST, /* when used to check if the server supports it in head-like */ - FTP_RETR_REST, /* when asking for "resume" in for RETR */ - FTP_PORT, /* generic state for PORT, LPRT and EPRT, check count1 */ - FTP_PRET, /* generic state for PRET RETR, PRET STOR and PRET LIST/NLST */ - FTP_PASV, /* generic state for PASV and EPSV, check count1 */ - FTP_LIST, /* generic state for LIST, NLST or a custom list command */ - FTP_RETR, - FTP_STOR, /* generic state for STOR and APPE */ - FTP_QUIT, - FTP_LAST /* never used */ -} ftpstate; - -struct ftp_parselist_data; /* defined later in ftplistparser.c */ - -struct ftp_wc_tmpdata { - struct ftp_parselist_data *parser; - - struct { - curl_write_callback write_function; - FILE *file_descriptor; - } backup; -}; - -typedef enum { - FTPFILE_MULTICWD = 1, /* as defined by RFC1738 */ - FTPFILE_NOCWD = 2, /* use SIZE / RETR / STOR on the full path */ - FTPFILE_SINGLECWD = 3 /* make one CWD, then SIZE / RETR / STOR on the - file */ -} curl_ftpfile; - -/* This FTP struct is used in the Curl_easy. All FTP data that is - connection-oriented must be in FTP_conn to properly deal with the fact that - perhaps the Curl_easy is changed between the times the connection is - used. */ -struct FTP { - curl_off_t *bytecountp; - char *user; /* user name string */ - char *passwd; /* password string */ - - /* transfer a file/body or not, done as a typedefed enum just to make - debuggers display the full symbol and not just the numerical value */ - curl_pp_transfer transfer; - curl_off_t downloadsize; -}; - - -/* ftp_conn is used for struct connection-oriented data in the connectdata - struct */ -struct ftp_conn { - struct pingpong pp; - char *entrypath; /* the PWD reply when we logged on */ - char **dirs; /* realloc()ed array for path components */ - int dirdepth; /* number of entries used in the 'dirs' array */ - int diralloc; /* number of entries allocated for the 'dirs' array */ - char *file; /* decoded file */ - bool dont_check; /* Set to TRUE to prevent the final (post-transfer) - file size and 226/250 status check. It should still - read the line, just ignore the result. */ - bool ctl_valid; /* Tells Curl_ftp_quit() whether or not to do anything. If - the connection has timed out or been closed, this - should be FALSE when it gets to Curl_ftp_quit() */ - bool cwddone; /* if it has been determined that the proper CWD combo - already has been done */ - bool cwdfail; /* set TRUE if a CWD command fails, as then we must prevent - caching the current directory */ - bool wait_data_conn; /* this is set TRUE if data connection is waited */ - char *prevpath; /* conn->path from the previous transfer */ - char transfertype; /* set by ftp_transfertype for use by Curl_client_write()a - and others (A/I or zero) */ - int count1; /* general purpose counter for the state machine */ - int count2; /* general purpose counter for the state machine */ - int count3; /* general purpose counter for the state machine */ - ftpstate state; /* always use ftp.c:state() to change state! */ - ftpstate state_saved; /* transfer type saved to be reloaded after - data connection is established */ - curl_off_t retr_size_saved; /* Size of retrieved file saved */ - char *server_os; /* The target server operating system. */ - curl_off_t known_filesize; /* file size is different from -1, if wildcard - LIST parsing was done and wc_statemach set - it */ - /* newhost is the (allocated) IP addr or host name to connect the data - connection to */ - char *newhost; /* this is the pair to connect the DATA... */ - unsigned short newport; /* connection to */ - -}; - -#define DEFAULT_ACCEPT_TIMEOUT 60000 /* milliseconds == one minute */ - -#endif /* HEADER_CURL_FTP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/ftplistparser.c b/build/premake/premake5/contrib/curl/lib/ftplistparser.c deleted file mode 100644 index f94b31b9c5..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ftplistparser.c +++ /dev/null @@ -1,1027 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/** - * Now implemented: - * - * 1) Unix version 1 - * drwxr-xr-x 1 user01 ftp 512 Jan 29 23:32 prog - * 2) Unix version 2 - * drwxr-xr-x 1 user01 ftp 512 Jan 29 1997 prog - * 3) Unix version 3 - * drwxr-xr-x 1 1 1 512 Jan 29 23:32 prog - * 4) Unix symlink - * lrwxr-xr-x 1 user01 ftp 512 Jan 29 23:32 prog -> prog2000 - * 5) DOS style - * 01-29-97 11:32PM prog - */ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_FTP - -#include - -#include "urldata.h" -#include "fileinfo.h" -#include "llist.h" -#include "strtoofft.h" -#include "ftp.h" -#include "ftplistparser.h" -#include "curl_fnmatch.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* allocs buffer which will contain one line of LIST command response */ -#define FTP_BUFFER_ALLOCSIZE 160 - -typedef enum { - PL_UNIX_TOTALSIZE = 0, - PL_UNIX_FILETYPE, - PL_UNIX_PERMISSION, - PL_UNIX_HLINKS, - PL_UNIX_USER, - PL_UNIX_GROUP, - PL_UNIX_SIZE, - PL_UNIX_TIME, - PL_UNIX_FILENAME, - PL_UNIX_SYMLINK -} pl_unix_mainstate; - -typedef union { - enum { - PL_UNIX_TOTALSIZE_INIT = 0, - PL_UNIX_TOTALSIZE_READING - } total_dirsize; - - enum { - PL_UNIX_HLINKS_PRESPACE = 0, - PL_UNIX_HLINKS_NUMBER - } hlinks; - - enum { - PL_UNIX_USER_PRESPACE = 0, - PL_UNIX_USER_PARSING - } user; - - enum { - PL_UNIX_GROUP_PRESPACE = 0, - PL_UNIX_GROUP_NAME - } group; - - enum { - PL_UNIX_SIZE_PRESPACE = 0, - PL_UNIX_SIZE_NUMBER - } size; - - enum { - PL_UNIX_TIME_PREPART1 = 0, - PL_UNIX_TIME_PART1, - PL_UNIX_TIME_PREPART2, - PL_UNIX_TIME_PART2, - PL_UNIX_TIME_PREPART3, - PL_UNIX_TIME_PART3 - } time; - - enum { - PL_UNIX_FILENAME_PRESPACE = 0, - PL_UNIX_FILENAME_NAME, - PL_UNIX_FILENAME_WINDOWSEOL - } filename; - - enum { - PL_UNIX_SYMLINK_PRESPACE = 0, - PL_UNIX_SYMLINK_NAME, - PL_UNIX_SYMLINK_PRETARGET1, - PL_UNIX_SYMLINK_PRETARGET2, - PL_UNIX_SYMLINK_PRETARGET3, - PL_UNIX_SYMLINK_PRETARGET4, - PL_UNIX_SYMLINK_TARGET, - PL_UNIX_SYMLINK_WINDOWSEOL - } symlink; -} pl_unix_substate; - -typedef enum { - PL_WINNT_DATE = 0, - PL_WINNT_TIME, - PL_WINNT_DIRORSIZE, - PL_WINNT_FILENAME -} pl_winNT_mainstate; - -typedef union { - enum { - PL_WINNT_TIME_PRESPACE = 0, - PL_WINNT_TIME_TIME - } time; - enum { - PL_WINNT_DIRORSIZE_PRESPACE = 0, - PL_WINNT_DIRORSIZE_CONTENT - } dirorsize; - enum { - PL_WINNT_FILENAME_PRESPACE = 0, - PL_WINNT_FILENAME_CONTENT, - PL_WINNT_FILENAME_WINEOL - } filename; -} pl_winNT_substate; - -/* This struct is used in wildcard downloading - for parsing LIST response */ -struct ftp_parselist_data { - enum { - OS_TYPE_UNKNOWN = 0, - OS_TYPE_UNIX, - OS_TYPE_WIN_NT - } os_type; - - union { - struct { - pl_unix_mainstate main; - pl_unix_substate sub; - } UNIX; - - struct { - pl_winNT_mainstate main; - pl_winNT_substate sub; - } NT; - } state; - - CURLcode error; - struct curl_fileinfo *file_data; - unsigned int item_length; - size_t item_offset; - struct { - size_t filename; - size_t user; - size_t group; - size_t time; - size_t perm; - size_t symlink_target; - } offsets; -}; - -struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void) -{ - return calloc(1, sizeof(struct ftp_parselist_data)); -} - - -void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data) -{ - free(*pl_data); - *pl_data = NULL; -} - - -CURLcode Curl_ftp_parselist_geterror(struct ftp_parselist_data *pl_data) -{ - return pl_data->error; -} - - -#define FTP_LP_MALFORMATED_PERM 0x01000000 - -static int ftp_pl_get_permission(const char *str) -{ - int permissions = 0; - /* USER */ - if(str[0] == 'r') - permissions |= 1 << 8; - else if(str[0] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - if(str[1] == 'w') - permissions |= 1 << 7; - else if(str[1] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - - if(str[2] == 'x') - permissions |= 1 << 6; - else if(str[2] == 's') { - permissions |= 1 << 6; - permissions |= 1 << 11; - } - else if(str[2] == 'S') - permissions |= 1 << 11; - else if(str[2] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - /* GROUP */ - if(str[3] == 'r') - permissions |= 1 << 5; - else if(str[3] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - if(str[4] == 'w') - permissions |= 1 << 4; - else if(str[4] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - if(str[5] == 'x') - permissions |= 1 << 3; - else if(str[5] == 's') { - permissions |= 1 << 3; - permissions |= 1 << 10; - } - else if(str[5] == 'S') - permissions |= 1 << 10; - else if(str[5] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - /* others */ - if(str[6] == 'r') - permissions |= 1 << 2; - else if(str[6] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - if(str[7] == 'w') - permissions |= 1 << 1; - else if(str[7] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - if(str[8] == 'x') - permissions |= 1; - else if(str[8] == 't') { - permissions |= 1; - permissions |= 1 << 9; - } - else if(str[8] == 'T') - permissions |= 1 << 9; - else if(str[8] != '-') - permissions |= FTP_LP_MALFORMATED_PERM; - - return permissions; -} - -static void PL_ERROR(struct connectdata *conn, CURLcode err) -{ - struct ftp_wc_tmpdata *tmpdata = conn->data->wildcard.tmp; - struct ftp_parselist_data *parser = tmpdata->parser; - if(parser->file_data) - Curl_fileinfo_dtor(NULL, parser->file_data); - parser->file_data = NULL; - parser->error = err; -} - -static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, - struct curl_fileinfo *finfo) -{ - curl_fnmatch_callback compare; - struct WildcardData *wc = &conn->data->wildcard; - struct ftp_wc_tmpdata *tmpdata = wc->tmp; - struct curl_llist *llist = wc->filelist; - struct ftp_parselist_data *parser = tmpdata->parser; - bool add = TRUE; - - /* move finfo pointers to b_data */ - char *str = finfo->b_data; - finfo->filename = str + parser->offsets.filename; - finfo->strings.group = parser->offsets.group ? - str + parser->offsets.group : NULL; - finfo->strings.perm = parser->offsets.perm ? - str + parser->offsets.perm : NULL; - finfo->strings.target = parser->offsets.symlink_target ? - str + parser->offsets.symlink_target : NULL; - finfo->strings.time = str + parser->offsets.time; - finfo->strings.user = parser->offsets.user ? - str + parser->offsets.user : NULL; - - /* get correct fnmatch callback */ - compare = conn->data->set.fnmatch; - if(!compare) - compare = Curl_fnmatch; - - /* filter pattern-corresponding filenames */ - if(compare(conn->data->set.fnmatch_data, wc->pattern, - finfo->filename) == 0) { - /* discard symlink which is containing multiple " -> " */ - if((finfo->filetype == CURLFILETYPE_SYMLINK) && finfo->strings.target && - (strstr(finfo->strings.target, " -> "))) { - add = FALSE; - } - } - else { - add = FALSE; - } - - if(add) { - if(!Curl_llist_insert_next(llist, llist->tail, finfo)) { - Curl_fileinfo_dtor(NULL, finfo); - tmpdata->parser->file_data = NULL; - return CURLE_OUT_OF_MEMORY; - } - } - else { - Curl_fileinfo_dtor(NULL, finfo); - } - - tmpdata->parser->file_data = NULL; - return CURLE_OK; -} - -size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, - void *connptr) -{ - size_t bufflen = size*nmemb; - struct connectdata *conn = (struct connectdata *)connptr; - struct ftp_wc_tmpdata *tmpdata = conn->data->wildcard.tmp; - struct ftp_parselist_data *parser = tmpdata->parser; - struct curl_fileinfo *finfo; - unsigned long i = 0; - CURLcode result; - - if(parser->error) { /* error in previous call */ - /* scenario: - * 1. call => OK.. - * 2. call => OUT_OF_MEMORY (or other error) - * 3. (last) call => is skipped RIGHT HERE and the error is hadled later - * in wc_statemach() - */ - return bufflen; - } - - if(parser->os_type == OS_TYPE_UNKNOWN && bufflen > 0) { - /* considering info about FILE response format */ - parser->os_type = (buffer[0] >= '0' && buffer[0] <= '9') ? - OS_TYPE_WIN_NT : OS_TYPE_UNIX; - } - - while(i < bufflen) { /* FSM */ - - char c = buffer[i]; - if(!parser->file_data) { /* tmp file data is not allocated yet */ - parser->file_data = Curl_fileinfo_alloc(); - if(!parser->file_data) { - parser->error = CURLE_OUT_OF_MEMORY; - return bufflen; - } - parser->file_data->b_data = malloc(FTP_BUFFER_ALLOCSIZE); - if(!parser->file_data->b_data) { - PL_ERROR(conn, CURLE_OUT_OF_MEMORY); - return bufflen; - } - parser->file_data->b_size = FTP_BUFFER_ALLOCSIZE; - parser->item_offset = 0; - parser->item_length = 0; - } - - finfo = parser->file_data; - finfo->b_data[finfo->b_used++] = c; - - if(finfo->b_used >= finfo->b_size - 1) { - /* if it is important, extend buffer space for file data */ - char *tmp = realloc(finfo->b_data, - finfo->b_size + FTP_BUFFER_ALLOCSIZE); - if(tmp) { - finfo->b_size += FTP_BUFFER_ALLOCSIZE; - finfo->b_data = tmp; - } - else { - Curl_fileinfo_dtor(NULL, parser->file_data); - parser->file_data = NULL; - parser->error = CURLE_OUT_OF_MEMORY; - PL_ERROR(conn, CURLE_OUT_OF_MEMORY); - return bufflen; - } - } - - switch(parser->os_type) { - case OS_TYPE_UNIX: - switch(parser->state.UNIX.main) { - case PL_UNIX_TOTALSIZE: - switch(parser->state.UNIX.sub.total_dirsize) { - case PL_UNIX_TOTALSIZE_INIT: - if(c == 't') { - parser->state.UNIX.sub.total_dirsize = PL_UNIX_TOTALSIZE_READING; - parser->item_length++; - } - else { - parser->state.UNIX.main = PL_UNIX_FILETYPE; - /* start FSM again not considering size of directory */ - finfo->b_used = 0; - i--; - } - break; - case PL_UNIX_TOTALSIZE_READING: - parser->item_length++; - if(c == '\r') { - parser->item_length--; - finfo->b_used--; - } - else if(c == '\n') { - finfo->b_data[parser->item_length - 1] = 0; - if(strncmp("total ", finfo->b_data, 6) == 0) { - char *endptr = finfo->b_data+6; - /* here we can deal with directory size, pass the leading white - spaces and then the digits */ - while(ISSPACE(*endptr)) - endptr++; - while(ISDIGIT(*endptr)) - endptr++; - if(*endptr != 0) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - else { - parser->state.UNIX.main = PL_UNIX_FILETYPE; - finfo->b_used = 0; - } - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - break; - } - break; - case PL_UNIX_FILETYPE: - switch(c) { - case '-': - finfo->filetype = CURLFILETYPE_FILE; - break; - case 'd': - finfo->filetype = CURLFILETYPE_DIRECTORY; - break; - case 'l': - finfo->filetype = CURLFILETYPE_SYMLINK; - break; - case 'p': - finfo->filetype = CURLFILETYPE_NAMEDPIPE; - break; - case 's': - finfo->filetype = CURLFILETYPE_SOCKET; - break; - case 'c': - finfo->filetype = CURLFILETYPE_DEVICE_CHAR; - break; - case 'b': - finfo->filetype = CURLFILETYPE_DEVICE_BLOCK; - break; - case 'D': - finfo->filetype = CURLFILETYPE_DOOR; - break; - default: - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - parser->state.UNIX.main = PL_UNIX_PERMISSION; - parser->item_length = 0; - parser->item_offset = 1; - break; - case PL_UNIX_PERMISSION: - parser->item_length++; - if(parser->item_length <= 9) { - if(!strchr("rwx-tTsS", c)) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - else if(parser->item_length == 10) { - unsigned int perm; - if(c != ' ') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - finfo->b_data[10] = 0; /* terminate permissions */ - perm = ftp_pl_get_permission(finfo->b_data + parser->item_offset); - if(perm & FTP_LP_MALFORMATED_PERM) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_PERM; - parser->file_data->perm = perm; - parser->offsets.perm = parser->item_offset; - - parser->item_length = 0; - parser->state.UNIX.main = PL_UNIX_HLINKS; - parser->state.UNIX.sub.hlinks = PL_UNIX_HLINKS_PRESPACE; - } - break; - case PL_UNIX_HLINKS: - switch(parser->state.UNIX.sub.hlinks) { - case PL_UNIX_HLINKS_PRESPACE: - if(c != ' ') { - if(c >= '0' && c <= '9') { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.UNIX.sub.hlinks = PL_UNIX_HLINKS_NUMBER; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - break; - case PL_UNIX_HLINKS_NUMBER: - parser->item_length ++; - if(c == ' ') { - char *p; - long int hlinks; - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - hlinks = strtol(finfo->b_data + parser->item_offset, &p, 10); - if(p[0] == '\0' && hlinks != LONG_MAX && hlinks != LONG_MIN) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_HLINKCOUNT; - parser->file_data->hardlinks = hlinks; - } - parser->item_length = 0; - parser->item_offset = 0; - parser->state.UNIX.main = PL_UNIX_USER; - parser->state.UNIX.sub.user = PL_UNIX_USER_PRESPACE; - } - else if(c < '0' || c > '9') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - case PL_UNIX_USER: - switch(parser->state.UNIX.sub.user) { - case PL_UNIX_USER_PRESPACE: - if(c != ' ') { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.UNIX.sub.user = PL_UNIX_USER_PARSING; - } - break; - case PL_UNIX_USER_PARSING: - parser->item_length++; - if(c == ' ') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - parser->offsets.user = parser->item_offset; - parser->state.UNIX.main = PL_UNIX_GROUP; - parser->state.UNIX.sub.group = PL_UNIX_GROUP_PRESPACE; - parser->item_offset = 0; - parser->item_length = 0; - } - break; - } - break; - case PL_UNIX_GROUP: - switch(parser->state.UNIX.sub.group) { - case PL_UNIX_GROUP_PRESPACE: - if(c != ' ') { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.UNIX.sub.group = PL_UNIX_GROUP_NAME; - } - break; - case PL_UNIX_GROUP_NAME: - parser->item_length++; - if(c == ' ') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - parser->offsets.group = parser->item_offset; - parser->state.UNIX.main = PL_UNIX_SIZE; - parser->state.UNIX.sub.size = PL_UNIX_SIZE_PRESPACE; - parser->item_offset = 0; - parser->item_length = 0; - } - break; - } - break; - case PL_UNIX_SIZE: - switch(parser->state.UNIX.sub.size) { - case PL_UNIX_SIZE_PRESPACE: - if(c != ' ') { - if(c >= '0' && c <= '9') { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.UNIX.sub.size = PL_UNIX_SIZE_NUMBER; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - break; - case PL_UNIX_SIZE_NUMBER: - parser->item_length++; - if(c == ' ') { - char *p; - curl_off_t fsize; - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - fsize = curlx_strtoofft(finfo->b_data+parser->item_offset, &p, 10); - if(p[0] == '\0' && fsize != CURL_OFF_T_MAX && - fsize != CURL_OFF_T_MIN) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_SIZE; - parser->file_data->size = fsize; - } - parser->item_length = 0; - parser->item_offset = 0; - parser->state.UNIX.main = PL_UNIX_TIME; - parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART1; - } - else if(!ISDIGIT(c)) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - case PL_UNIX_TIME: - switch(parser->state.UNIX.sub.time) { - case PL_UNIX_TIME_PREPART1: - if(c != ' ') { - if(ISALNUM(c)) { - parser->item_offset = finfo->b_used -1; - parser->item_length = 1; - parser->state.UNIX.sub.time = PL_UNIX_TIME_PART1; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - break; - case PL_UNIX_TIME_PART1: - parser->item_length++; - if(c == ' ') { - parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART2; - } - else if(!ISALNUM(c) && c != '.') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - case PL_UNIX_TIME_PREPART2: - parser->item_length++; - if(c != ' ') { - if(ISALNUM(c)) { - parser->state.UNIX.sub.time = PL_UNIX_TIME_PART2; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - break; - case PL_UNIX_TIME_PART2: - parser->item_length++; - if(c == ' ') { - parser->state.UNIX.sub.time = PL_UNIX_TIME_PREPART3; - } - else if(!ISALNUM(c) && c != '.') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - case PL_UNIX_TIME_PREPART3: - parser->item_length++; - if(c != ' ') { - if(ISALNUM(c)) { - parser->state.UNIX.sub.time = PL_UNIX_TIME_PART3; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - break; - case PL_UNIX_TIME_PART3: - parser->item_length++; - if(c == ' ') { - finfo->b_data[parser->item_offset + parser->item_length -1] = 0; - parser->offsets.time = parser->item_offset; - /* - if(ftp_pl_gettime(parser, finfo->b_data + parser->item_offset)) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_TIME; - } - */ - if(finfo->filetype == CURLFILETYPE_SYMLINK) { - parser->state.UNIX.main = PL_UNIX_SYMLINK; - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRESPACE; - } - else { - parser->state.UNIX.main = PL_UNIX_FILENAME; - parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_PRESPACE; - } - } - else if(!ISALNUM(c) && c != '.' && c != ':') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - case PL_UNIX_FILENAME: - switch(parser->state.UNIX.sub.filename) { - case PL_UNIX_FILENAME_PRESPACE: - if(c != ' ') { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_NAME; - } - break; - case PL_UNIX_FILENAME_NAME: - parser->item_length++; - if(c == '\r') { - parser->state.UNIX.sub.filename = PL_UNIX_FILENAME_WINDOWSEOL; - } - else if(c == '\n') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - parser->offsets.filename = parser->item_offset; - parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); - return bufflen; - } - } - break; - case PL_UNIX_FILENAME_WINDOWSEOL: - if(c == '\n') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - parser->offsets.filename = parser->item_offset; - parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); - return bufflen; - } - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - case PL_UNIX_SYMLINK: - switch(parser->state.UNIX.sub.symlink) { - case PL_UNIX_SYMLINK_PRESPACE: - if(c != ' ') { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; - } - break; - case PL_UNIX_SYMLINK_NAME: - parser->item_length++; - if(c == ' ') { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET1; - } - else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - case PL_UNIX_SYMLINK_PRETARGET1: - parser->item_length++; - if(c == '-') { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET2; - } - else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - else { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; - } - break; - case PL_UNIX_SYMLINK_PRETARGET2: - parser->item_length++; - if(c == '>') { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET3; - } - else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - else { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; - } - break; - case PL_UNIX_SYMLINK_PRETARGET3: - parser->item_length++; - if(c == ' ') { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_PRETARGET4; - /* now place where is symlink following */ - finfo->b_data[parser->item_offset + parser->item_length - 4] = 0; - parser->offsets.filename = parser->item_offset; - parser->item_length = 0; - parser->item_offset = 0; - } - else if(c == '\r' || c == '\n') { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - else { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_NAME; - } - break; - case PL_UNIX_SYMLINK_PRETARGET4: - if(c != '\r' && c != '\n') { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_TARGET; - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - case PL_UNIX_SYMLINK_TARGET: - parser->item_length++; - if(c == '\r') { - parser->state.UNIX.sub.symlink = PL_UNIX_SYMLINK_WINDOWSEOL; - } - else if(c == '\n') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - parser->offsets.symlink_target = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); - return bufflen; - } - parser->state.UNIX.main = PL_UNIX_FILETYPE; - } - break; - case PL_UNIX_SYMLINK_WINDOWSEOL: - if(c == '\n') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - parser->offsets.symlink_target = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); - return bufflen; - } - parser->state.UNIX.main = PL_UNIX_FILETYPE; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - } - break; - case OS_TYPE_WIN_NT: - switch(parser->state.NT.main) { - case PL_WINNT_DATE: - parser->item_length++; - if(parser->item_length < 9) { - if(!strchr("0123456789-", c)) { /* only simple control */ - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - else if(parser->item_length == 9) { - if(c == ' ') { - parser->state.NT.main = PL_WINNT_TIME; - parser->state.NT.sub.time = PL_WINNT_TIME_PRESPACE; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - case PL_WINNT_TIME: - parser->item_length++; - switch(parser->state.NT.sub.time) { - case PL_WINNT_TIME_PRESPACE: - if(!ISSPACE(c)) { - parser->state.NT.sub.time = PL_WINNT_TIME_TIME; - } - break; - case PL_WINNT_TIME_TIME: - if(c == ' ') { - parser->offsets.time = parser->item_offset; - finfo->b_data[parser->item_offset + parser->item_length -1] = 0; - parser->state.NT.main = PL_WINNT_DIRORSIZE; - parser->state.NT.sub.dirorsize = PL_WINNT_DIRORSIZE_PRESPACE; - parser->item_length = 0; - } - else if(!strchr("APM0123456789:", c)) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - case PL_WINNT_DIRORSIZE: - switch(parser->state.NT.sub.dirorsize) { - case PL_WINNT_DIRORSIZE_PRESPACE: - if(c == ' ') { - - } - else { - parser->item_offset = finfo->b_used - 1; - parser->item_length = 1; - parser->state.NT.sub.dirorsize = PL_WINNT_DIRORSIZE_CONTENT; - } - break; - case PL_WINNT_DIRORSIZE_CONTENT: - parser->item_length ++; - if(c == ' ') { - finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; - if(strcmp("", finfo->b_data + parser->item_offset) == 0) { - finfo->filetype = CURLFILETYPE_DIRECTORY; - finfo->size = 0; - } - else { - char *endptr; - finfo->size = curlx_strtoofft(finfo->b_data + - parser->item_offset, - &endptr, 10); - if(!*endptr) { - if(finfo->size == CURL_OFF_T_MAX || - finfo->size == CURL_OFF_T_MIN) { - if(errno == ERANGE) { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - } - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - /* correct file type */ - parser->file_data->filetype = CURLFILETYPE_FILE; - } - - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_SIZE; - parser->item_length = 0; - parser->state.NT.main = PL_WINNT_FILENAME; - parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; - } - break; - } - break; - case PL_WINNT_FILENAME: - switch(parser->state.NT.sub.filename) { - case PL_WINNT_FILENAME_PRESPACE: - if(c != ' ') { - parser->item_offset = finfo->b_used -1; - parser->item_length = 1; - parser->state.NT.sub.filename = PL_WINNT_FILENAME_CONTENT; - } - break; - case PL_WINNT_FILENAME_CONTENT: - parser->item_length++; - if(c == '\r') { - parser->state.NT.sub.filename = PL_WINNT_FILENAME_WINEOL; - finfo->b_data[finfo->b_used - 1] = 0; - } - else if(c == '\n') { - parser->offsets.filename = parser->item_offset; - finfo->b_data[finfo->b_used - 1] = 0; - parser->offsets.filename = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); - return bufflen; - } - parser->state.NT.main = PL_WINNT_DATE; - parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; - } - break; - case PL_WINNT_FILENAME_WINEOL: - if(c == '\n') { - parser->offsets.filename = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); - if(result) { - PL_ERROR(conn, result); - return bufflen; - } - parser->state.NT.main = PL_WINNT_DATE; - parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; - } - else { - PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); - return bufflen; - } - break; - } - break; - } - break; - default: - return bufflen + 1; - } - - i++; - } - - return bufflen; -} - -#endif /* CURL_DISABLE_FTP */ diff --git a/build/premake/premake5/contrib/curl/lib/ftplistparser.h b/build/premake/premake5/contrib/curl/lib/ftplistparser.h deleted file mode 100644 index 8128887c0b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ftplistparser.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef HEADER_CURL_FTPLISTPARSER_H -#define HEADER_CURL_FTPLISTPARSER_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifndef CURL_DISABLE_FTP - -/* WRITEFUNCTION callback for parsing LIST responses */ -size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, - void *connptr); - -struct ftp_parselist_data; /* defined inside ftplibparser.c */ - -CURLcode Curl_ftp_parselist_geterror(struct ftp_parselist_data *pl_data); - -struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void); - -void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data); - -#endif /* CURL_DISABLE_FTP */ -#endif /* HEADER_CURL_FTPLISTPARSER_H */ diff --git a/build/premake/premake5/contrib/curl/lib/getenv.c b/build/premake/premake5/contrib/curl/lib/getenv.c deleted file mode 100644 index 89d181de3c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/getenv.c +++ /dev/null @@ -1,54 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "curl_memory.h" - -#include "memdebug.h" - -static -char *GetEnv(const char *variable) -{ -#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) - (void)variable; - return NULL; -#else -#ifdef WIN32 - char env[MAX_PATH]; /* MAX_PATH is from windef.h */ - char *temp = getenv(variable); - env[0] = '\0'; - if(temp != NULL) - ExpandEnvironmentStringsA(temp, env, sizeof(env)); - return (env[0] != '\0')?strdup(env):NULL; -#else - char *env = getenv(variable); - return (env && env[0])?strdup(env):NULL; -#endif -#endif -} - -char *curl_getenv(const char *v) -{ - return GetEnv(v); -} diff --git a/build/premake/premake5/contrib/curl/lib/getinfo.c b/build/premake/premake5/contrib/curl/lib/getinfo.c deleted file mode 100644 index a1ce5058e8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/getinfo.c +++ /dev/null @@ -1,442 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "urldata.h" -#include "getinfo.h" - -#include "vtls/vtls.h" -#include "connect.h" /* Curl_getconnectinfo() */ -#include "progress.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Initialize statistical and informational data. - * - * This function is called in curl_easy_reset, curl_easy_duphandle and at the - * beginning of a perform session. It must reset the session-info variables, - * in particular all variables in struct PureInfo. - */ -CURLcode Curl_initinfo(struct Curl_easy *data) -{ - struct Progress *pro = &data->progress; - struct PureInfo *info = &data->info; - - pro->t_nslookup = 0; - pro->t_connect = 0; - pro->t_appconnect = 0; - pro->t_pretransfer = 0; - pro->t_starttransfer = 0; - pro->timespent = 0; - pro->t_redirect = 0; - - info->httpcode = 0; - info->httpproxycode = 0; - info->httpversion = 0; - info->filetime = -1; /* -1 is an illegal time and thus means unknown */ - info->timecond = FALSE; - - info->header_size = 0; - info->request_size = 0; - info->proxyauthavail = 0; - info->httpauthavail = 0; - info->numconnects = 0; - - free(info->contenttype); - info->contenttype = NULL; - - free(info->wouldredirect); - info->wouldredirect = NULL; - - info->conn_primary_ip[0] = '\0'; - info->conn_local_ip[0] = '\0'; - info->conn_primary_port = 0; - info->conn_local_port = 0; - - info->conn_scheme = 0; - info->conn_protocol = 0; - -#ifdef USE_SSL - Curl_ssl_free_certinfo(data); -#endif - - return CURLE_OK; -} - -static CURLcode getinfo_char(struct Curl_easy *data, CURLINFO info, - const char **param_charp) -{ - switch(info) { - case CURLINFO_EFFECTIVE_URL: - *param_charp = data->change.url?data->change.url:(char *)""; - break; - case CURLINFO_CONTENT_TYPE: - *param_charp = data->info.contenttype; - break; - case CURLINFO_PRIVATE: - *param_charp = (char *) data->set.private_data; - break; - case CURLINFO_FTP_ENTRY_PATH: - /* Return the entrypath string from the most recent connection. - This pointer was copied from the connectdata structure by FTP. - The actual string may be free()ed by subsequent libcurl calls so - it must be copied to a safer area before the next libcurl call. - Callers must never free it themselves. */ - *param_charp = data->state.most_recent_ftp_entrypath; - break; - case CURLINFO_REDIRECT_URL: - /* Return the URL this request would have been redirected to if that - option had been enabled! */ - *param_charp = data->info.wouldredirect; - break; - case CURLINFO_PRIMARY_IP: - /* Return the ip address of the most recent (primary) connection */ - *param_charp = data->info.conn_primary_ip; - break; - case CURLINFO_LOCAL_IP: - /* Return the source/local ip address of the most recent (primary) - connection */ - *param_charp = data->info.conn_local_ip; - break; - case CURLINFO_RTSP_SESSION_ID: - *param_charp = data->set.str[STRING_RTSP_SESSION_ID]; - break; - case CURLINFO_SCHEME: - *param_charp = data->info.conn_scheme; - break; - - default: - return CURLE_UNKNOWN_OPTION; - } - - return CURLE_OK; -} - -static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info, - long *param_longp) -{ - curl_socket_t sockfd; - - union { - unsigned long *to_ulong; - long *to_long; - } lptr; - - switch(info) { - case CURLINFO_RESPONSE_CODE: - *param_longp = data->info.httpcode; - break; - case CURLINFO_HTTP_CONNECTCODE: - *param_longp = data->info.httpproxycode; - break; - case CURLINFO_FILETIME: - *param_longp = data->info.filetime; - break; - case CURLINFO_HEADER_SIZE: - *param_longp = data->info.header_size; - break; - case CURLINFO_REQUEST_SIZE: - *param_longp = data->info.request_size; - break; - case CURLINFO_SSL_VERIFYRESULT: - *param_longp = data->set.ssl.certverifyresult; - break; - case CURLINFO_PROXY_SSL_VERIFYRESULT: - *param_longp = data->set.proxy_ssl.certverifyresult; - break; - case CURLINFO_REDIRECT_COUNT: - *param_longp = data->set.followlocation; - break; - case CURLINFO_HTTPAUTH_AVAIL: - lptr.to_long = param_longp; - *lptr.to_ulong = data->info.httpauthavail; - break; - case CURLINFO_PROXYAUTH_AVAIL: - lptr.to_long = param_longp; - *lptr.to_ulong = data->info.proxyauthavail; - break; - case CURLINFO_OS_ERRNO: - *param_longp = data->state.os_errno; - break; - case CURLINFO_NUM_CONNECTS: - *param_longp = data->info.numconnects; - break; - case CURLINFO_LASTSOCKET: - sockfd = Curl_getconnectinfo(data, NULL); - - /* note: this is not a good conversion for systems with 64 bit sockets and - 32 bit longs */ - if(sockfd != CURL_SOCKET_BAD) - *param_longp = (long)sockfd; - else - /* this interface is documented to return -1 in case of badness, which - may not be the same as the CURL_SOCKET_BAD value */ - *param_longp = -1; - break; - case CURLINFO_PRIMARY_PORT: - /* Return the (remote) port of the most recent (primary) connection */ - *param_longp = data->info.conn_primary_port; - break; - case CURLINFO_LOCAL_PORT: - /* Return the local port of the most recent (primary) connection */ - *param_longp = data->info.conn_local_port; - break; - case CURLINFO_CONDITION_UNMET: - /* return if the condition prevented the document to get transferred */ - *param_longp = data->info.timecond ? 1L : 0L; - break; - case CURLINFO_RTSP_CLIENT_CSEQ: - *param_longp = data->state.rtsp_next_client_CSeq; - break; - case CURLINFO_RTSP_SERVER_CSEQ: - *param_longp = data->state.rtsp_next_server_CSeq; - break; - case CURLINFO_RTSP_CSEQ_RECV: - *param_longp = data->state.rtsp_CSeq_recv; - break; - case CURLINFO_HTTP_VERSION: - switch(data->info.httpversion) { - case 10: - *param_longp = CURL_HTTP_VERSION_1_0; - break; - case 11: - *param_longp = CURL_HTTP_VERSION_1_1; - break; - case 20: - *param_longp = CURL_HTTP_VERSION_2_0; - break; - default: - *param_longp = CURL_HTTP_VERSION_NONE; - break; - } - break; - case CURLINFO_PROTOCOL: - *param_longp = data->info.conn_protocol; - break; - - default: - return CURLE_UNKNOWN_OPTION; - } - - return CURLE_OK; -} - -static CURLcode getinfo_double(struct Curl_easy *data, CURLINFO info, - double *param_doublep) -{ - switch(info) { - case CURLINFO_TOTAL_TIME: - *param_doublep = data->progress.timespent; - break; - case CURLINFO_NAMELOOKUP_TIME: - *param_doublep = data->progress.t_nslookup; - break; - case CURLINFO_CONNECT_TIME: - *param_doublep = data->progress.t_connect; - break; - case CURLINFO_APPCONNECT_TIME: - *param_doublep = data->progress.t_appconnect; - break; - case CURLINFO_PRETRANSFER_TIME: - *param_doublep = data->progress.t_pretransfer; - break; - case CURLINFO_STARTTRANSFER_TIME: - *param_doublep = data->progress.t_starttransfer; - break; - case CURLINFO_SIZE_UPLOAD: - *param_doublep = (double)data->progress.uploaded; - break; - case CURLINFO_SIZE_DOWNLOAD: - *param_doublep = (double)data->progress.downloaded; - break; - case CURLINFO_SPEED_DOWNLOAD: - *param_doublep = (double)data->progress.dlspeed; - break; - case CURLINFO_SPEED_UPLOAD: - *param_doublep = (double)data->progress.ulspeed; - break; - case CURLINFO_CONTENT_LENGTH_DOWNLOAD: - *param_doublep = (data->progress.flags & PGRS_DL_SIZE_KNOWN)? - (double)data->progress.size_dl:-1; - break; - case CURLINFO_CONTENT_LENGTH_UPLOAD: - *param_doublep = (data->progress.flags & PGRS_UL_SIZE_KNOWN)? - (double)data->progress.size_ul:-1; - break; - case CURLINFO_REDIRECT_TIME: - *param_doublep = data->progress.t_redirect; - break; - - default: - return CURLE_UNKNOWN_OPTION; - } - - return CURLE_OK; -} - -static CURLcode getinfo_slist(struct Curl_easy *data, CURLINFO info, - struct curl_slist **param_slistp) -{ - union { - struct curl_certinfo *to_certinfo; - struct curl_slist *to_slist; - } ptr; - - switch(info) { - case CURLINFO_SSL_ENGINES: - *param_slistp = Curl_ssl_engines_list(data); - break; - case CURLINFO_COOKIELIST: - *param_slistp = Curl_cookie_list(data); - break; - case CURLINFO_CERTINFO: - /* Return the a pointer to the certinfo struct. Not really an slist - pointer but we can pretend it is here */ - ptr.to_certinfo = &data->info.certs; - *param_slistp = ptr.to_slist; - break; - case CURLINFO_TLS_SESSION: - case CURLINFO_TLS_SSL_PTR: - { - struct curl_tlssessioninfo **tsip = (struct curl_tlssessioninfo **) - param_slistp; - struct curl_tlssessioninfo *tsi = &data->tsi; - struct connectdata *conn = data->easy_conn; - - *tsip = tsi; - tsi->backend = Curl_ssl_backend(); - tsi->internals = NULL; - - if(conn && tsi->backend != CURLSSLBACKEND_NONE) { - unsigned int i; - for(i = 0; i < (sizeof(conn->ssl) / sizeof(conn->ssl[0])); ++i) { - if(conn->ssl[i].use) { -#if defined(USE_AXTLS) - tsi->internals = (void *)conn->ssl[i].ssl; -#elif defined(USE_CYASSL) - tsi->internals = (void *)conn->ssl[i].handle; -#elif defined(USE_DARWINSSL) - tsi->internals = (void *)conn->ssl[i].ssl_ctx; -#elif defined(USE_GNUTLS) - tsi->internals = (void *)conn->ssl[i].session; -#elif defined(USE_GSKIT) - tsi->internals = (void *)conn->ssl[i].handle; -#elif defined(USE_MBEDTLS) - tsi->internals = (void *)&conn->ssl[i].ssl; -#elif defined(USE_NSS) - tsi->internals = (void *)conn->ssl[i].handle; -#elif defined(USE_OPENSSL) - /* Legacy: CURLINFO_TLS_SESSION must return an SSL_CTX pointer. */ - tsi->internals = ((info == CURLINFO_TLS_SESSION) ? - (void *)conn->ssl[i].ctx : - (void *)conn->ssl[i].handle); -#elif defined(USE_POLARSSL) - tsi->internals = (void *)&conn->ssl[i].ssl; -#elif defined(USE_SCHANNEL) - tsi->internals = (void *)&conn->ssl[i].ctxt->ctxt_handle; -#elif defined(USE_SSL) -#error "SSL backend specific information missing for CURLINFO_TLS_SSL_PTR" -#endif - break; - } - } - } - } - break; - default: - return CURLE_UNKNOWN_OPTION; - } - - return CURLE_OK; -} - -static CURLcode getinfo_socket(struct Curl_easy *data, CURLINFO info, - curl_socket_t *param_socketp) -{ - switch(info) { - case CURLINFO_ACTIVESOCKET: - *param_socketp = Curl_getconnectinfo(data, NULL); - break; - default: - return CURLE_UNKNOWN_OPTION; - } - - return CURLE_OK; -} - -CURLcode Curl_getinfo(struct Curl_easy *data, CURLINFO info, ...) -{ - va_list arg; - long *param_longp = NULL; - double *param_doublep = NULL; - const char **param_charp = NULL; - struct curl_slist **param_slistp = NULL; - curl_socket_t *param_socketp = NULL; - int type; - CURLcode result = CURLE_UNKNOWN_OPTION; - - if(!data) - return result; - - va_start(arg, info); - - type = CURLINFO_TYPEMASK & (int)info; - switch(type) { - case CURLINFO_STRING: - param_charp = va_arg(arg, const char **); - if(param_charp) - result = getinfo_char(data, info, param_charp); - break; - case CURLINFO_LONG: - param_longp = va_arg(arg, long *); - if(param_longp) - result = getinfo_long(data, info, param_longp); - break; - case CURLINFO_DOUBLE: - param_doublep = va_arg(arg, double *); - if(param_doublep) - result = getinfo_double(data, info, param_doublep); - break; - case CURLINFO_SLIST: - param_slistp = va_arg(arg, struct curl_slist **); - if(param_slistp) - result = getinfo_slist(data, info, param_slistp); - break; - case CURLINFO_SOCKET: - param_socketp = va_arg(arg, curl_socket_t *); - if(param_socketp) - result = getinfo_socket(data, info, param_socketp); - break; - default: - break; - } - - va_end(arg); - - return result; -} diff --git a/build/premake/premake5/contrib/curl/lib/getinfo.h b/build/premake/premake5/contrib/curl/lib/getinfo.h deleted file mode 100644 index aecf717f75..0000000000 --- a/build/premake/premake5/contrib/curl/lib/getinfo.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef HEADER_CURL_GETINFO_H -#define HEADER_CURL_GETINFO_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -CURLcode Curl_getinfo(struct Curl_easy *data, CURLINFO info, ...); -CURLcode Curl_initinfo(struct Curl_easy *data); - -#endif /* HEADER_CURL_GETINFO_H */ diff --git a/build/premake/premake5/contrib/curl/lib/gopher.c b/build/premake/premake5/contrib/curl/lib/gopher.c deleted file mode 100644 index a073d0ba27..0000000000 --- a/build/premake/premake5/contrib/curl/lib/gopher.c +++ /dev/null @@ -1,166 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_GOPHER - -#include "urldata.h" -#include -#include "transfer.h" -#include "sendf.h" -#include "progress.h" -#include "gopher.h" -#include "select.h" -#include "url.h" -#include "escape.h" -#include "warnless.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* - * Forward declarations. - */ - -static CURLcode gopher_do(struct connectdata *conn, bool *done); - -/* - * Gopher protocol handler. - * This is also a nice simple template to build off for simple - * connect-command-download protocols. - */ - -const struct Curl_handler Curl_handler_gopher = { - "GOPHER", /* scheme */ - ZERO_NULL, /* setup_connection */ - gopher_do, /* do_it */ - ZERO_NULL, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_GOPHER, /* defport */ - CURLPROTO_GOPHER, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -static CURLcode gopher_do(struct connectdata *conn, bool *done) -{ - CURLcode result=CURLE_OK; - struct Curl_easy *data=conn->data; - curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; - - curl_off_t *bytecount = &data->req.bytecount; - char *path = data->state.path; - char *sel; - char *sel_org = NULL; - ssize_t amount, k; - size_t len; - - *done = TRUE; /* unconditionally */ - - /* Create selector. Degenerate cases: / and /1 => convert to "" */ - if(strlen(path) <= 2) { - sel = (char *)""; - len = (int)strlen(sel); - } - else { - char *newp; - size_t j, i; - - /* Otherwise, drop / and the first character (i.e., item type) ... */ - newp = path; - newp+=2; - - /* ... then turn ? into TAB for search servers, Veronica, etc. ... */ - j = strlen(newp); - for(i=0; i, et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifndef CURL_DISABLE_GOPHER -extern const struct Curl_handler Curl_handler_gopher; -#endif - -#endif /* HEADER_CURL_GOPHER_H */ diff --git a/build/premake/premake5/contrib/curl/lib/hash.c b/build/premake/premake5/contrib/curl/lib/hash.c deleted file mode 100644 index 065504235d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hash.c +++ /dev/null @@ -1,390 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "hash.h" -#include "llist.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -static void -hash_element_dtor(void *user, void *element) -{ - struct curl_hash *h = (struct curl_hash *) user; - struct curl_hash_element *e = (struct curl_hash_element *) element; - - Curl_safefree(e->key); - - if(e->ptr) { - h->dtor(e->ptr); - e->ptr = NULL; - } - - e->key_len = 0; - - free(e); -} - -/* Initializes a hash structure. - * Return 1 on error, 0 is fine. - * - * @unittest: 1602 - * @unittest: 1603 - */ -int -Curl_hash_init(struct curl_hash *h, - int slots, - hash_function hfunc, - comp_function comparator, - curl_hash_dtor dtor) -{ - int i; - - if(!slots || !hfunc || !comparator ||!dtor) { - return 1; /* failure */ - } - - h->hash_func = hfunc; - h->comp_func = comparator; - h->dtor = dtor; - h->size = 0; - h->slots = slots; - - h->table = malloc(slots * sizeof(struct curl_llist *)); - if(h->table) { - for(i = 0; i < slots; ++i) { - h->table[i] = Curl_llist_alloc((curl_llist_dtor) hash_element_dtor); - if(!h->table[i]) { - while(i--) { - Curl_llist_destroy(h->table[i], NULL); - h->table[i] = NULL; - } - free(h->table); - h->table = NULL; - h->slots = 0; - return 1; /* failure */ - } - } - return 0; /* fine */ - } - else { - h->slots = 0; - return 1; /* failure */ - } -} - -static struct curl_hash_element * -mk_hash_element(const void *key, size_t key_len, const void *p) -{ - struct curl_hash_element *he = malloc(sizeof(struct curl_hash_element)); - - if(he) { - void *dupkey = malloc(key_len); - if(dupkey) { - /* copy the key */ - memcpy(dupkey, key, key_len); - - he->key = dupkey; - he->key_len = key_len; - he->ptr = (void *) p; - } - else { - /* failed to duplicate the key, free memory and fail */ - free(he); - he = NULL; - } - } - return he; -} - -#define FETCH_LIST(x,y,z) x->table[x->hash_func(y, z, x->slots)] - -/* Insert the data in the hash. If there already was a match in the hash, - * that data is replaced. - * - * @unittest: 1305 - * @unittest: 1602 - * @unittest: 1603 - */ -void * -Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p) -{ - struct curl_hash_element *he; - struct curl_llist_element *le; - struct curl_llist *l = FETCH_LIST(h, key, key_len); - - for(le = l->head; le; le = le->next) { - he = (struct curl_hash_element *) le->ptr; - if(h->comp_func(he->key, he->key_len, key, key_len)) { - Curl_llist_remove(l, le, (void *)h); - --h->size; - break; - } - } - - he = mk_hash_element(key, key_len, p); - if(he) { - if(Curl_llist_insert_next(l, l->tail, he)) { - ++h->size; - return p; /* return the new entry */ - } - /* - * Couldn't insert it, destroy the 'he' element and the key again. We - * don't call hash_element_dtor() since that would also call the - * "destructor" for the actual data 'p'. When we fail, we shall not touch - * that data. - */ - free(he->key); - free(he); - } - - return NULL; /* failure */ -} - -/* Remove the identified hash entry. - * Returns non-zero on failure. - * - * @unittest: 1603 - */ -int Curl_hash_delete(struct curl_hash *h, void *key, size_t key_len) -{ - struct curl_llist_element *le; - struct curl_hash_element *he; - struct curl_llist *l = FETCH_LIST(h, key, key_len); - - for(le = l->head; le; le = le->next) { - he = le->ptr; - if(h->comp_func(he->key, he->key_len, key, key_len)) { - Curl_llist_remove(l, le, (void *) h); - --h->size; - return 0; - } - } - return 1; -} - -/* Retrieves a hash element. - * - * @unittest: 1603 - */ -void * -Curl_hash_pick(struct curl_hash *h, void *key, size_t key_len) -{ - struct curl_llist_element *le; - struct curl_hash_element *he; - struct curl_llist *l; - - if(h) { - l = FETCH_LIST(h, key, key_len); - for(le = l->head; le; le = le->next) { - he = le->ptr; - if(h->comp_func(he->key, he->key_len, key, key_len)) { - return he->ptr; - } - } - } - - return NULL; -} - -#if defined(DEBUGBUILD) && defined(AGGRESIVE_TEST) -void -Curl_hash_apply(curl_hash *h, void *user, - void (*cb)(void *user, void *ptr)) -{ - struct curl_llist_element *le; - int i; - - for(i = 0; i < h->slots; ++i) { - for(le = (h->table[i])->head; - le; - le = le->next) { - curl_hash_element *el = le->ptr; - cb(user, el->ptr); - } - } -} -#endif - -/* Destroys all the entries in the given hash and resets its attributes, - * prepping the given hash for [static|dynamic] deallocation. - * - * @unittest: 1305 - * @unittest: 1602 - * @unittest: 1603 - */ -void -Curl_hash_destroy(struct curl_hash *h) -{ - int i; - - for(i = 0; i < h->slots; ++i) { - Curl_llist_destroy(h->table[i], (void *) h); - h->table[i] = NULL; - } - - Curl_safefree(h->table); - h->size = 0; - h->slots = 0; -} - -/* Removes all the entries in the given hash. - * - * @unittest: 1602 - */ -void -Curl_hash_clean(struct curl_hash *h) -{ - Curl_hash_clean_with_criterium(h, NULL, NULL); -} - -/* Cleans all entries that pass the comp function criteria. */ -void -Curl_hash_clean_with_criterium(struct curl_hash *h, void *user, - int (*comp)(void *, void *)) -{ - struct curl_llist_element *le; - struct curl_llist_element *lnext; - struct curl_llist *list; - int i; - - if(!h) - return; - - for(i = 0; i < h->slots; ++i) { - list = h->table[i]; - le = list->head; /* get first list entry */ - while(le) { - struct curl_hash_element *he = le->ptr; - lnext = le->next; - /* ask the callback function if we shall remove this entry or not */ - if(comp == NULL || comp(user, he->ptr)) { - Curl_llist_remove(list, le, (void *) h); - --h->size; /* one less entry in the hash now */ - } - le = lnext; - } - } -} - -size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num) -{ - const char *key_str = (const char *) key; - const char *end = key_str + key_length; - unsigned long h = 5381; - - while(key_str < end) { - h += h << 5; - h ^= (unsigned long) *key_str++; - } - - return (h % slots_num); -} - -size_t Curl_str_key_compare(void *k1, size_t key1_len, - void *k2, size_t key2_len) -{ - if((key1_len == key2_len) && !memcmp(k1, k2, key1_len)) - return 1; - - return 0; -} - -void Curl_hash_start_iterate(struct curl_hash *hash, - struct curl_hash_iterator *iter) -{ - iter->hash = hash; - iter->slot_index = 0; - iter->current_element = NULL; -} - -struct curl_hash_element * -Curl_hash_next_element(struct curl_hash_iterator *iter) -{ - int i; - struct curl_hash *h = iter->hash; - - /* Get the next element in the current list, if any */ - if(iter->current_element) - iter->current_element = iter->current_element->next; - - /* If we have reached the end of the list, find the next one */ - if(!iter->current_element) { - for(i = iter->slot_index;i < h->slots;i++) { - if(h->table[i]->head) { - iter->current_element = h->table[i]->head; - iter->slot_index = i+1; - break; - } - } - } - - if(iter->current_element) { - struct curl_hash_element *he = iter->current_element->ptr; - return he; - } - else { - iter->current_element = NULL; - return NULL; - } -} - -#if 0 /* useful function for debugging hashes and their contents */ -void Curl_hash_print(struct curl_hash *h, - void (*func)(void *)) -{ - struct curl_hash_iterator iter; - struct curl_hash_element *he; - int last_index = -1; - - if(!h) - return; - - fprintf(stderr, "=Hash dump=\n"); - - Curl_hash_start_iterate(h, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - if(iter.slot_index != last_index) { - fprintf(stderr, "index %d:", iter.slot_index); - if(last_index >= 0) { - fprintf(stderr, "\n"); - } - last_index = iter.slot_index; - } - - if(func) - func(he->ptr); - else - fprintf(stderr, " [%p]", (void *)he->ptr); - - he = Curl_hash_next_element(&iter); - } - fprintf(stderr, "\n"); -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/hash.h b/build/premake/premake5/contrib/curl/lib/hash.h deleted file mode 100644 index a5a6cac720..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hash.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef HEADER_CURL_HASH_H -#define HEADER_CURL_HASH_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "llist.h" - -/* Hash function prototype */ -typedef size_t (*hash_function) (void *key, - size_t key_length, - size_t slots_num); - -/* - Comparator function prototype. Compares two keys. -*/ -typedef size_t (*comp_function) (void *key1, - size_t key1_len, - void *key2, - size_t key2_len); - -typedef void (*curl_hash_dtor)(void *); - -struct curl_hash { - struct curl_llist **table; - - /* Hash function to be used for this hash table */ - hash_function hash_func; - - /* Comparator function to compare keys */ - comp_function comp_func; - curl_hash_dtor dtor; - int slots; - size_t size; -}; - -struct curl_hash_element { - void *ptr; - char *key; - size_t key_len; -}; - -struct curl_hash_iterator { - struct curl_hash *hash; - int slot_index; - struct curl_llist_element *current_element; -}; - -int Curl_hash_init(struct curl_hash *h, - int slots, - hash_function hfunc, - comp_function comparator, - curl_hash_dtor dtor); - -void *Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p); -int Curl_hash_delete(struct curl_hash *h, void *key, size_t key_len); -void *Curl_hash_pick(struct curl_hash *, void *key, size_t key_len); -void Curl_hash_apply(struct curl_hash *h, void *user, - void (*cb)(void *user, void *ptr)); -int Curl_hash_count(struct curl_hash *h); -void Curl_hash_destroy(struct curl_hash *h); -void Curl_hash_clean(struct curl_hash *h); -void Curl_hash_clean_with_criterium(struct curl_hash *h, void *user, - int (*comp)(void *, void *)); -size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num); -size_t Curl_str_key_compare(void *k1, size_t key1_len, void *k2, - size_t key2_len); -void Curl_hash_start_iterate(struct curl_hash *hash, - struct curl_hash_iterator *iter); -struct curl_hash_element * -Curl_hash_next_element(struct curl_hash_iterator *iter); - -void Curl_hash_print(struct curl_hash *h, - void (*func)(void *)); - - -#endif /* HEADER_CURL_HASH_H */ diff --git a/build/premake/premake5/contrib/curl/lib/hmac.c b/build/premake/premake5/contrib/curl/lib/hmac.c deleted file mode 100644 index dae95054b0..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hmac.c +++ /dev/null @@ -1,132 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC2104 Keyed-Hashing for Message Authentication - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_CRYPTO_AUTH - -#include - -#include "curl_hmac.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -/* - * Generic HMAC algorithm. - * - * This module computes HMAC digests based on any hash function. Parameters - * and computing procedures are set-up dynamically at HMAC computation - * context initialisation. - */ - -static const unsigned char hmac_ipad = 0x36; -static const unsigned char hmac_opad = 0x5C; - - - -HMAC_context * -Curl_HMAC_init(const HMAC_params * hashparams, - const unsigned char *key, - unsigned int keylen) -{ - size_t i; - HMAC_context *ctxt; - unsigned char *hkey; - unsigned char b; - - /* Create HMAC context. */ - i = sizeof *ctxt + 2 * hashparams->hmac_ctxtsize + - hashparams->hmac_resultlen; - ctxt = malloc(i); - - if(!ctxt) - return ctxt; - - ctxt->hmac_hash = hashparams; - ctxt->hmac_hashctxt1 = (void *) (ctxt + 1); - ctxt->hmac_hashctxt2 = (void *) ((char *) ctxt->hmac_hashctxt1 + - hashparams->hmac_ctxtsize); - - /* If the key is too long, replace it by its hash digest. */ - if(keylen > hashparams->hmac_maxkeylen) { - (*hashparams->hmac_hinit)(ctxt->hmac_hashctxt1); - (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, key, keylen); - hkey = (unsigned char *) ctxt->hmac_hashctxt2 + hashparams->hmac_ctxtsize; - (*hashparams->hmac_hfinal)(hkey, ctxt->hmac_hashctxt1); - key = hkey; - keylen = hashparams->hmac_resultlen; - } - - /* Prime the two hash contexts with the modified key. */ - (*hashparams->hmac_hinit)(ctxt->hmac_hashctxt1); - (*hashparams->hmac_hinit)(ctxt->hmac_hashctxt2); - - for(i = 0; i < keylen; i++) { - b = (unsigned char)(*key ^ hmac_ipad); - (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &b, 1); - b = (unsigned char)(*key++ ^ hmac_opad); - (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &b, 1); - } - - for(; i < hashparams->hmac_maxkeylen; i++) { - (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt1, &hmac_ipad, 1); - (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, &hmac_opad, 1); - } - - /* Done, return pointer to HMAC context. */ - return ctxt; -} - -int Curl_HMAC_update(HMAC_context * ctxt, - const unsigned char *data, - unsigned int len) -{ - /* Update first hash calculation. */ - (*ctxt->hmac_hash->hmac_hupdate)(ctxt->hmac_hashctxt1, data, len); - return 0; -} - - -int Curl_HMAC_final(HMAC_context *ctxt, unsigned char *result) -{ - const HMAC_params * hashparams = ctxt->hmac_hash; - - /* Do not get result if called with a null parameter: only release - storage. */ - - if(!result) - result = (unsigned char *) ctxt->hmac_hashctxt2 + - ctxt->hmac_hash->hmac_ctxtsize; - - (*hashparams->hmac_hfinal)(result, ctxt->hmac_hashctxt1); - (*hashparams->hmac_hupdate)(ctxt->hmac_hashctxt2, - result, hashparams->hmac_resultlen); - (*hashparams->hmac_hfinal)(result, ctxt->hmac_hashctxt2); - free((char *) ctxt); - return 0; -} - -#endif /* CURL_DISABLE_CRYPTO_AUTH */ diff --git a/build/premake/premake5/contrib/curl/lib/hostasyn.c b/build/premake/premake5/contrib/curl/lib/hostasyn.c deleted file mode 100644 index 28bdf7a48a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostasyn.c +++ /dev/null @@ -1,153 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_PROCESS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/*********************************************************************** - * Only for builds using asynchronous name resolves - **********************************************************************/ -#ifdef CURLRES_ASYNCH - -/* - * Curl_addrinfo_callback() gets called by ares, gethostbyname_thread() - * or getaddrinfo_thread() when we got the name resolved (or not!). - * - * If the status argument is CURL_ASYNC_SUCCESS, this function takes - * ownership of the Curl_addrinfo passed, storing the resolved data - * in the DNS cache. - * - * The storage operation locks and unlocks the DNS cache. - */ -CURLcode Curl_addrinfo_callback(struct connectdata *conn, - int status, - struct Curl_addrinfo *ai) -{ - struct Curl_dns_entry *dns = NULL; - CURLcode result = CURLE_OK; - - conn->async.status = status; - - if(CURL_ASYNC_SUCCESS == status) { - if(ai) { - struct Curl_easy *data = conn->data; - - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - dns = Curl_cache_addr(data, ai, - conn->async.hostname, - conn->async.port); - if(!dns) { - /* failed to store, cleanup and return error */ - Curl_freeaddrinfo(ai); - result = CURLE_OUT_OF_MEMORY; - } - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - } - else { - result = CURLE_OUT_OF_MEMORY; - } - } - - conn->async.dns = dns; - - /* Set async.done TRUE last in this function since it may be used multi- - threaded and once this is TRUE the other thread may read fields from the - async struct */ - conn->async.done = TRUE; - - /* IPv4: The input hostent struct will be freed by ares when we return from - this function */ - return result; -} - -/* Call this function after Curl_connect() has returned async=TRUE and - then a successful name resolve has been received. - - Note: this function disconnects and frees the conn data in case of - resolve failure */ -CURLcode Curl_async_resolved(struct connectdata *conn, - bool *protocol_done) -{ - CURLcode result; - - if(conn->async.dns) { - conn->dns_entry = conn->async.dns; - conn->async.dns = NULL; - } - - result = Curl_setup_conn(conn, protocol_done); - - if(result) - /* We're not allowed to return failure with memory left allocated - in the connectdata struct, free those here */ - Curl_disconnect(conn, FALSE); /* close the connection */ - - return result; -} - -/* - * Curl_getaddrinfo() is the generic low-level name resolve API within this - * source file. There are several versions of this function - for different - * name resolve layers (selected at build-time). They all take this same set - * of arguments - */ -Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) -{ - return Curl_resolver_getaddrinfo(conn, hostname, port, waitp); -} - -#endif /* CURLRES_ASYNCH */ diff --git a/build/premake/premake5/contrib/curl/lib/hostcheck.c b/build/premake/premake5/contrib/curl/lib/hostcheck.c deleted file mode 100644 index cbd0893601..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostcheck.c +++ /dev/null @@ -1,150 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_OPENSSL) \ - || defined(USE_AXTLS) \ - || defined(USE_GSKIT) \ - || (defined(USE_SCHANNEL) && defined(_WIN32_WCE)) -/* these backends use functions from this file */ - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#include "hostcheck.h" -#include "strcase.h" -#include "inet_pton.h" - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* - * Match a hostname against a wildcard pattern. - * E.g. - * "foo.host.com" matches "*.host.com". - * - * We use the matching rule described in RFC6125, section 6.4.3. - * https://tools.ietf.org/html/rfc6125#section-6.4.3 - * - * In addition: ignore trailing dots in the host names and wildcards, so that - * the names are used normalized. This is what the browsers do. - * - * Do not allow wildcard matching on IP numbers. There are apparently - * certificates being used with an IP address in the CN field, thus making no - * apparent distinction between a name and an IP. We need to detect the use of - * an IP address and not wildcard match on such names. - * - * NOTE: hostmatch() gets called with copied buffers so that it can modify the - * contents at will. - */ - -static int hostmatch(char *hostname, char *pattern) -{ - const char *pattern_label_end, *pattern_wildcard, *hostname_label_end; - int wildcard_enabled; - size_t prefixlen, suffixlen; - struct in_addr ignored; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 si6; -#endif - - /* normalize pattern and hostname by stripping off trailing dots */ - size_t len = strlen(hostname); - if(hostname[len-1]=='.') - hostname[len-1]=0; - len = strlen(pattern); - if(pattern[len-1]=='.') - pattern[len-1]=0; - - pattern_wildcard = strchr(pattern, '*'); - if(pattern_wildcard == NULL) - return strcasecompare(pattern, hostname) ? - CURL_HOST_MATCH : CURL_HOST_NOMATCH; - - /* detect IP address as hostname and fail the match if so */ - if(Curl_inet_pton(AF_INET, hostname, &ignored) > 0) - return CURL_HOST_NOMATCH; -#ifdef ENABLE_IPV6 - else if(Curl_inet_pton(AF_INET6, hostname, &si6.sin6_addr) > 0) - return CURL_HOST_NOMATCH; -#endif - - /* We require at least 2 dots in pattern to avoid too wide wildcard - match. */ - wildcard_enabled = 1; - pattern_label_end = strchr(pattern, '.'); - if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL || - pattern_wildcard > pattern_label_end || - strncasecompare(pattern, "xn--", 4)) { - wildcard_enabled = 0; - } - if(!wildcard_enabled) - return strcasecompare(pattern, hostname) ? - CURL_HOST_MATCH : CURL_HOST_NOMATCH; - - hostname_label_end = strchr(hostname, '.'); - if(hostname_label_end == NULL || - !strcasecompare(pattern_label_end, hostname_label_end)) - return CURL_HOST_NOMATCH; - - /* The wildcard must match at least one character, so the left-most - label of the hostname is at least as large as the left-most label - of the pattern. */ - if(hostname_label_end - hostname < pattern_label_end - pattern) - return CURL_HOST_NOMATCH; - - prefixlen = pattern_wildcard - pattern; - suffixlen = pattern_label_end - (pattern_wildcard+1); - return strncasecompare(pattern, hostname, prefixlen) && - strncasecompare(pattern_wildcard+1, hostname_label_end - suffixlen, - suffixlen) ? - CURL_HOST_MATCH : CURL_HOST_NOMATCH; -} - -int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) -{ - char *matchp; - char *hostp; - int res = 0; - if(!match_pattern || !*match_pattern || - !hostname || !*hostname) /* sanity check */ - ; - else { - matchp = strdup(match_pattern); - if(matchp) { - hostp = strdup(hostname); - if(hostp) { - if(hostmatch(hostp, matchp) == CURL_HOST_MATCH) - res= 1; - free(hostp); - } - free(matchp); - } - } - - return res; -} - -#endif /* OPENSSL, AXTLS, GSKIT or schannel+wince */ diff --git a/build/premake/premake5/contrib/curl/lib/hostcheck.h b/build/premake/premake5/contrib/curl/lib/hostcheck.h deleted file mode 100644 index 86e3b96a97..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostcheck.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef HEADER_CURL_HOSTCHECK_H -#define HEADER_CURL_HOSTCHECK_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -#define CURL_HOST_NOMATCH 0 -#define CURL_HOST_MATCH 1 -int Curl_cert_hostcheck(const char *match_pattern, const char *hostname); - -#endif /* HEADER_CURL_HOSTCHECK_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/hostip.c b/build/premake/premake5/contrib/curl/lib/hostip.c deleted file mode 100644 index fa4bad9824..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostip.c +++ /dev/null @@ -1,884 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_SETJMP_H -#include -#endif -#ifdef HAVE_SIGNAL_H -#include -#endif - -#ifdef HAVE_PROCESS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "inet_ntop.h" -#include "warnless.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#if defined(CURLRES_SYNCH) && \ - defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP) -/* alarm-based timeouts can only be used with all the dependencies satisfied */ -#define USE_ALARM_TIMEOUT -#endif - -/* - * hostip.c explained - * ================== - * - * The main COMPILE-TIME DEFINES to keep in mind when reading the host*.c - * source file are these: - * - * CURLRES_IPV6 - this host has getaddrinfo() and family, and thus we use - * that. The host may not be able to resolve IPv6, but we don't really have to - * take that into account. Hosts that aren't IPv6-enabled have CURLRES_IPV4 - * defined. - * - * CURLRES_ARES - is defined if libcurl is built to use c-ares for - * asynchronous name resolves. This can be Windows or *nix. - * - * CURLRES_THREADED - is defined if libcurl is built to run under (native) - * Windows, and then the name resolve will be done in a new thread, and the - * supported API will be the same as for ares-builds. - * - * If any of the two previous are defined, CURLRES_ASYNCH is defined too. If - * libcurl is not built to use an asynchronous resolver, CURLRES_SYNCH is - * defined. - * - * The host*.c sources files are split up like this: - * - * hostip.c - method-independent resolver functions and utility functions - * hostasyn.c - functions for asynchronous name resolves - * hostsyn.c - functions for synchronous name resolves - * hostip4.c - IPv4 specific functions - * hostip6.c - IPv6 specific functions - * - * The two asynchronous name resolver backends are implemented in: - * asyn-ares.c - functions for ares-using name resolves - * asyn-thread.c - functions for threaded name resolves - - * The hostip.h is the united header file for all this. It defines the - * CURLRES_* defines based on the config*.h and curl_setup.h defines. - */ - -/* These two symbols are for the global DNS cache */ -static struct curl_hash hostname_cache; -static int host_cache_initialized; - -static void freednsentry(void *freethis); - -/* - * Curl_global_host_cache_init() initializes and sets up a global DNS cache. - * Global DNS cache is general badness. Do not use. This will be removed in - * a future version. Use the share interface instead! - * - * Returns a struct curl_hash pointer on success, NULL on failure. - */ -struct curl_hash *Curl_global_host_cache_init(void) -{ - int rc = 0; - if(!host_cache_initialized) { - rc = Curl_hash_init(&hostname_cache, 7, Curl_hash_str, - Curl_str_key_compare, freednsentry); - if(!rc) - host_cache_initialized = 1; - } - return rc?NULL:&hostname_cache; -} - -/* - * Destroy and cleanup the global DNS cache - */ -void Curl_global_host_cache_dtor(void) -{ - if(host_cache_initialized) { - Curl_hash_destroy(&hostname_cache); - host_cache_initialized = 0; - } -} - -/* - * Return # of adresses in a Curl_addrinfo struct - */ -int Curl_num_addresses(const Curl_addrinfo *addr) -{ - int i = 0; - while(addr) { - addr = addr->ai_next; - i++; - } - return i; -} - -/* - * Curl_printable_address() returns a printable version of the 1st address - * given in the 'ai' argument. The result will be stored in the buf that is - * bufsize bytes big. - * - * If the conversion fails, it returns NULL. - */ -const char * -Curl_printable_address(const Curl_addrinfo *ai, char *buf, size_t bufsize) -{ - const struct sockaddr_in *sa4; - const struct in_addr *ipaddr4; -#ifdef ENABLE_IPV6 - const struct sockaddr_in6 *sa6; - const struct in6_addr *ipaddr6; -#endif - - switch(ai->ai_family) { - case AF_INET: - sa4 = (const void *)ai->ai_addr; - ipaddr4 = &sa4->sin_addr; - return Curl_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, - bufsize); -#ifdef ENABLE_IPV6 - case AF_INET6: - sa6 = (const void *)ai->ai_addr; - ipaddr6 = &sa6->sin6_addr; - return Curl_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, - bufsize); -#endif - default: - break; - } - return NULL; -} - -/* - * Return a hostcache id string for the provided host + port, to be used by - * the DNS caching. - */ -static char * -create_hostcache_id(const char *name, int port) -{ - /* create and return the new allocated entry */ - char *id = aprintf("%s:%d", name, port); - char *ptr = id; - if(ptr) { - /* lower case the name part */ - while(*ptr && (*ptr != ':')) { - *ptr = (char)TOLOWER(*ptr); - ptr++; - } - } - return id; -} - -struct hostcache_prune_data { - long cache_timeout; - time_t now; -}; - -/* - * This function is set as a callback to be called for every entry in the DNS - * cache when we want to prune old unused entries. - * - * Returning non-zero means remove the entry, return 0 to keep it in the - * cache. - */ -static int -hostcache_timestamp_remove(void *datap, void *hc) -{ - struct hostcache_prune_data *data = - (struct hostcache_prune_data *) datap; - struct Curl_dns_entry *c = (struct Curl_dns_entry *) hc; - - return (0 != c->timestamp) - && (data->now - c->timestamp >= data->cache_timeout); -} - -/* - * Prune the DNS cache. This assumes that a lock has already been taken. - */ -static void -hostcache_prune(struct curl_hash *hostcache, long cache_timeout, time_t now) -{ - struct hostcache_prune_data user; - - user.cache_timeout = cache_timeout; - user.now = now; - - Curl_hash_clean_with_criterium(hostcache, - (void *) &user, - hostcache_timestamp_remove); -} - -/* - * Library-wide function for pruning the DNS cache. This function takes and - * returns the appropriate locks. - */ -void Curl_hostcache_prune(struct Curl_easy *data) -{ - time_t now; - - if((data->set.dns_cache_timeout == -1) || !data->dns.hostcache) - /* cache forever means never prune, and NULL hostcache means - we can't do it */ - return; - - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - time(&now); - - /* Remove outdated and unused entries from the hostcache */ - hostcache_prune(data->dns.hostcache, - data->set.dns_cache_timeout, - now); - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); -} - -#ifdef HAVE_SIGSETJMP -/* Beware this is a global and unique instance. This is used to store the - return address that we can jump back to from inside a signal handler. This - is not thread-safe stuff. */ -sigjmp_buf curl_jmpenv; -#endif - -/* lookup address, returns entry if found and not stale */ -static struct Curl_dns_entry * -fetch_addr(struct connectdata *conn, - const char *hostname, - int port) -{ - char *entry_id = NULL; - struct Curl_dns_entry *dns = NULL; - size_t entry_len; - struct Curl_easy *data = conn->data; - - /* Create an entry id, based upon the hostname and port */ - entry_id = create_hostcache_id(hostname, port); - /* If we can't create the entry id, fail */ - if(!entry_id) - return dns; - - entry_len = strlen(entry_id); - - /* See if its already in our dns cache */ - dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1); - - if(dns && (data->set.dns_cache_timeout != -1)) { - /* See whether the returned entry is stale. Done before we release lock */ - struct hostcache_prune_data user; - - time(&user.now); - user.cache_timeout = data->set.dns_cache_timeout; - - if(hostcache_timestamp_remove(&user, dns)) { - infof(data, "Hostname in DNS cache was stale, zapped\n"); - dns = NULL; /* the memory deallocation is being handled by the hash */ - Curl_hash_delete(data->dns.hostcache, entry_id, entry_len+1); - } - } - - /* free the allocated entry_id again */ - free(entry_id); - - return dns; -} - -/* - * Curl_fetch_addr() fetches a 'Curl_dns_entry' already in the DNS cache. - * - * Curl_resolv() checks initially and multi_runsingle() checks each time - * it discovers the handle in the state WAITRESOLVE whether the hostname - * has already been resolved and the address has already been stored in - * the DNS cache. This short circuits waiting for a lot of pending - * lookups for the same hostname requested by different handles. - * - * Returns the Curl_dns_entry entry pointer or NULL if not in the cache. - * - * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after - * use, or we'll leak memory! - */ -struct Curl_dns_entry * -Curl_fetch_addr(struct connectdata *conn, - const char *hostname, - int port) -{ - struct Curl_easy *data = conn->data; - struct Curl_dns_entry *dns = NULL; - - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - dns = fetch_addr(conn, hostname, port); - - if(dns) - dns->inuse++; /* we use it! */ - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - - return dns; -} - -/* - * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache. - * - * When calling Curl_resolv() has resulted in a response with a returned - * address, we call this function to store the information in the dns - * cache etc - * - * Returns the Curl_dns_entry entry pointer or NULL if the storage failed. - */ -struct Curl_dns_entry * -Curl_cache_addr(struct Curl_easy *data, - Curl_addrinfo *addr, - const char *hostname, - int port) -{ - char *entry_id; - size_t entry_len; - struct Curl_dns_entry *dns; - struct Curl_dns_entry *dns2; - - /* Create an entry id, based upon the hostname and port */ - entry_id = create_hostcache_id(hostname, port); - /* If we can't create the entry id, fail */ - if(!entry_id) - return NULL; - entry_len = strlen(entry_id); - - /* Create a new cache entry */ - dns = calloc(1, sizeof(struct Curl_dns_entry)); - if(!dns) { - free(entry_id); - return NULL; - } - - dns->inuse = 1; /* the cache has the first reference */ - dns->addr = addr; /* this is the address(es) */ - time(&dns->timestamp); - if(dns->timestamp == 0) - dns->timestamp = 1; /* zero indicates CURLOPT_RESOLVE entry */ - - /* Store the resolved data in our DNS cache. */ - dns2 = Curl_hash_add(data->dns.hostcache, entry_id, entry_len+1, - (void *)dns); - if(!dns2) { - free(dns); - free(entry_id); - return NULL; - } - - dns = dns2; - dns->inuse++; /* mark entry as in-use */ - - /* free the allocated entry_id */ - free(entry_id); - - return dns; -} - -/* - * Curl_resolv() is the main name resolve function within libcurl. It resolves - * a name and returns a pointer to the entry in the 'entry' argument (if one - * is provided). This function might return immediately if we're using asynch - * resolves. See the return codes. - * - * The cache entry we return will get its 'inuse' counter increased when this - * function is used. You MUST call Curl_resolv_unlock() later (when you're - * done using this struct) to decrease the counter again. - * - * In debug mode, we specifically test for an interface name "LocalHost" - * and resolve "localhost" instead as a means to permit test cases - * to connect to a local test server with any host name. - * - * Return codes: - * - * CURLRESOLV_ERROR (-1) = error, no pointer - * CURLRESOLV_RESOLVED (0) = OK, pointer provided - * CURLRESOLV_PENDING (1) = waiting for response, no pointer - */ - -int Curl_resolv(struct connectdata *conn, - const char *hostname, - int port, - struct Curl_dns_entry **entry) -{ - struct Curl_dns_entry *dns = NULL; - struct Curl_easy *data = conn->data; - CURLcode result; - int rc = CURLRESOLV_ERROR; /* default to failure */ - - *entry = NULL; - - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - dns = fetch_addr(conn, hostname, port); - - if(dns) { - infof(data, "Hostname %s was found in DNS cache\n", hostname); - dns->inuse++; /* we use it! */ - rc = CURLRESOLV_RESOLVED; - } - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - - if(!dns) { - /* The entry was not in the cache. Resolve it to IP address */ - - Curl_addrinfo *addr; - int respwait; - - /* Check what IP specifics the app has requested and if we can provide it. - * If not, bail out. */ - if(!Curl_ipvalid(conn)) - return CURLRESOLV_ERROR; - - /* If Curl_getaddrinfo() returns NULL, 'respwait' might be set to a - non-zero value indicating that we need to wait for the response to the - resolve call */ - addr = Curl_getaddrinfo(conn, -#ifdef DEBUGBUILD - (data->set.str[STRING_DEVICE] - && !strcmp(data->set.str[STRING_DEVICE], - "LocalHost"))?"localhost": -#endif - hostname, port, &respwait); - - if(!addr) { - if(respwait) { - /* the response to our resolve call will come asynchronously at - a later time, good or bad */ - /* First, check that we haven't received the info by now */ - result = Curl_resolver_is_resolved(conn, &dns); - if(result) /* error detected */ - return CURLRESOLV_ERROR; - if(dns) - rc = CURLRESOLV_RESOLVED; /* pointer provided */ - else - rc = CURLRESOLV_PENDING; /* no info yet */ - } - } - else { - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - /* we got a response, store it in the cache */ - dns = Curl_cache_addr(data, addr, hostname, port); - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - - if(!dns) - /* returned failure, bail out nicely */ - Curl_freeaddrinfo(addr); - else - rc = CURLRESOLV_RESOLVED; - } - } - - *entry = dns; - - return rc; -} - -#ifdef USE_ALARM_TIMEOUT -/* - * This signal handler jumps back into the main libcurl code and continues - * execution. This effectively causes the remainder of the application to run - * within a signal handler which is nonportable and could lead to problems. - */ -static -RETSIGTYPE alarmfunc(int sig) -{ - /* this is for "-ansi -Wall -pedantic" to stop complaining! (rabe) */ - (void)sig; - siglongjmp(curl_jmpenv, 1); - return; -} -#endif /* USE_ALARM_TIMEOUT */ - -/* - * Curl_resolv_timeout() is the same as Curl_resolv() but specifies a - * timeout. This function might return immediately if we're using asynch - * resolves. See the return codes. - * - * The cache entry we return will get its 'inuse' counter increased when this - * function is used. You MUST call Curl_resolv_unlock() later (when you're - * done using this struct) to decrease the counter again. - * - * If built with a synchronous resolver and use of signals is not - * disabled by the application, then a nonzero timeout will cause a - * timeout after the specified number of milliseconds. Otherwise, timeout - * is ignored. - * - * Return codes: - * - * CURLRESOLV_TIMEDOUT(-2) = warning, time too short or previous alarm expired - * CURLRESOLV_ERROR (-1) = error, no pointer - * CURLRESOLV_RESOLVED (0) = OK, pointer provided - * CURLRESOLV_PENDING (1) = waiting for response, no pointer - */ - -int Curl_resolv_timeout(struct connectdata *conn, - const char *hostname, - int port, - struct Curl_dns_entry **entry, - time_t timeoutms) -{ -#ifdef USE_ALARM_TIMEOUT -#ifdef HAVE_SIGACTION - struct sigaction keep_sigact; /* store the old struct here */ - volatile bool keep_copysig = FALSE; /* wether old sigact has been saved */ - struct sigaction sigact; -#else -#ifdef HAVE_SIGNAL - void (*keep_sigact)(int); /* store the old handler here */ -#endif /* HAVE_SIGNAL */ -#endif /* HAVE_SIGACTION */ - volatile long timeout; - volatile unsigned int prev_alarm = 0; - struct Curl_easy *data = conn->data; -#endif /* USE_ALARM_TIMEOUT */ - int rc; - - *entry = NULL; - - if(timeoutms < 0) - /* got an already expired timeout */ - return CURLRESOLV_TIMEDOUT; - -#ifdef USE_ALARM_TIMEOUT - if(data->set.no_signal) - /* Ignore the timeout when signals are disabled */ - timeout = 0; - else - timeout = timeoutms; - - if(!timeout) - /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */ - return Curl_resolv(conn, hostname, port, entry); - - if(timeout < 1000) { - /* The alarm() function only provides integer second resolution, so if - we want to wait less than one second we must bail out already now. */ - failf(data, - "remaining timeout of %ld too small to resolve via SIGALRM method", - timeout); - return CURLRESOLV_TIMEDOUT; - } - /* This allows us to time-out from the name resolver, as the timeout - will generate a signal and we will siglongjmp() from that here. - This technique has problems (see alarmfunc). - This should be the last thing we do before calling Curl_resolv(), - as otherwise we'd have to worry about variables that get modified - before we invoke Curl_resolv() (and thus use "volatile"). */ - if(sigsetjmp(curl_jmpenv, 1)) { - /* this is coming from a siglongjmp() after an alarm signal */ - failf(data, "name lookup timed out"); - rc = CURLRESOLV_ERROR; - goto clean_up; - } - else { - /************************************************************* - * Set signal handler to catch SIGALRM - * Store the old value to be able to set it back later! - *************************************************************/ -#ifdef HAVE_SIGACTION - sigaction(SIGALRM, NULL, &sigact); - keep_sigact = sigact; - keep_copysig = TRUE; /* yes, we have a copy */ - sigact.sa_handler = alarmfunc; -#ifdef SA_RESTART - /* HPUX doesn't have SA_RESTART but defaults to that behaviour! */ - sigact.sa_flags &= ~SA_RESTART; -#endif - /* now set the new struct */ - sigaction(SIGALRM, &sigact, NULL); -#else /* HAVE_SIGACTION */ - /* no sigaction(), revert to the much lamer signal() */ -#ifdef HAVE_SIGNAL - keep_sigact = signal(SIGALRM, alarmfunc); -#endif -#endif /* HAVE_SIGACTION */ - - /* alarm() makes a signal get sent when the timeout fires off, and that - will abort system calls */ - prev_alarm = alarm(curlx_sltoui(timeout/1000L)); - } - -#else -#ifndef CURLRES_ASYNCH - if(timeoutms) - infof(conn->data, "timeout on name lookup is not supported\n"); -#else - (void)timeoutms; /* timeoutms not used with an async resolver */ -#endif -#endif /* USE_ALARM_TIMEOUT */ - - /* Perform the actual name resolution. This might be interrupted by an - * alarm if it takes too long. - */ - rc = Curl_resolv(conn, hostname, port, entry); - -#ifdef USE_ALARM_TIMEOUT -clean_up: - - if(!prev_alarm) - /* deactivate a possibly active alarm before uninstalling the handler */ - alarm(0); - -#ifdef HAVE_SIGACTION - if(keep_copysig) { - /* we got a struct as it looked before, now put that one back nice - and clean */ - sigaction(SIGALRM, &keep_sigact, NULL); /* put it back */ - } -#else -#ifdef HAVE_SIGNAL - /* restore the previous SIGALRM handler */ - signal(SIGALRM, keep_sigact); -#endif -#endif /* HAVE_SIGACTION */ - - /* switch back the alarm() to either zero or to what it was before minus - the time we spent until now! */ - if(prev_alarm) { - /* there was an alarm() set before us, now put it back */ - unsigned long elapsed_ms = Curl_tvdiff(Curl_tvnow(), conn->created); - - /* the alarm period is counted in even number of seconds */ - unsigned long alarm_set = prev_alarm - elapsed_ms/1000; - - if(!alarm_set || - ((alarm_set >= 0x80000000) && (prev_alarm < 0x80000000)) ) { - /* if the alarm time-left reached zero or turned "negative" (counted - with unsigned values), we should fire off a SIGALRM here, but we - won't, and zero would be to switch it off so we never set it to - less than 1! */ - alarm(1); - rc = CURLRESOLV_TIMEDOUT; - failf(data, "Previous alarm fired off!"); - } - else - alarm((unsigned int)alarm_set); - } -#endif /* USE_ALARM_TIMEOUT */ - - return rc; -} - -/* - * Curl_resolv_unlock() unlocks the given cached DNS entry. When this has been - * made, the struct may be destroyed due to pruning. It is important that only - * one unlock is made for each Curl_resolv() call. - * - * May be called with 'data' == NULL for global cache. - */ -void Curl_resolv_unlock(struct Curl_easy *data, struct Curl_dns_entry *dns) -{ - if(data && data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - freednsentry(dns); - - if(data && data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); -} - -/* - * File-internal: release cache dns entry reference, free if inuse drops to 0 - */ -static void freednsentry(void *freethis) -{ - struct Curl_dns_entry *dns = (struct Curl_dns_entry *) freethis; - DEBUGASSERT(dns && (dns->inuse>0)); - - dns->inuse--; - if(dns->inuse == 0) { - Curl_freeaddrinfo(dns->addr); - free(dns); - } -} - -/* - * Curl_mk_dnscache() inits a new DNS cache and returns success/failure. - */ -int Curl_mk_dnscache(struct curl_hash *hash) -{ - return Curl_hash_init(hash, 7, Curl_hash_str, Curl_str_key_compare, - freednsentry); -} - -/* - * Curl_hostcache_clean() - * - * This _can_ be called with 'data' == NULL but then of course no locking - * can be done! - */ - -void Curl_hostcache_clean(struct Curl_easy *data, - struct curl_hash *hash) -{ - if(data && data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - Curl_hash_clean(hash); - - if(data && data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); -} - - -CURLcode Curl_loadhostpairs(struct Curl_easy *data) -{ - struct curl_slist *hostp; - char hostname[256]; - char address[256]; - int port; - - for(hostp = data->change.resolve; hostp; hostp = hostp->next) { - if(!hostp->data) - continue; - if(hostp->data[0] == '-') { - char *entry_id; - size_t entry_len; - - if(2 != sscanf(hostp->data + 1, "%255[^:]:%d", hostname, &port)) { - infof(data, "Couldn't parse CURLOPT_RESOLVE removal entry '%s'!\n", - hostp->data); - continue; - } - - /* Create an entry id, based upon the hostname and port */ - entry_id = create_hostcache_id(hostname, port); - /* If we can't create the entry id, fail */ - if(!entry_id) { - return CURLE_OUT_OF_MEMORY; - } - - entry_len = strlen(entry_id); - - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - /* delete entry, ignore if it didn't exist */ - Curl_hash_delete(data->dns.hostcache, entry_id, entry_len+1); - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - - /* free the allocated entry_id again */ - free(entry_id); - } - else { - struct Curl_dns_entry *dns; - Curl_addrinfo *addr; - char *entry_id; - size_t entry_len; - - if(3 != sscanf(hostp->data, "%255[^:]:%d:%255s", hostname, &port, - address)) { - infof(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'!\n", - hostp->data); - continue; - } - - addr = Curl_str2addr(address, port); - if(!addr) { - infof(data, "Address in '%s' found illegal!\n", hostp->data); - continue; - } - - /* Create an entry id, based upon the hostname and port */ - entry_id = create_hostcache_id(hostname, port); - /* If we can't create the entry id, fail */ - if(!entry_id) { - Curl_freeaddrinfo(addr); - return CURLE_OUT_OF_MEMORY; - } - - entry_len = strlen(entry_id); - - if(data->share) - Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); - - /* See if its already in our dns cache */ - dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len+1); - - /* free the allocated entry_id again */ - free(entry_id); - - if(!dns) { - /* if not in the cache already, put this host in the cache */ - dns = Curl_cache_addr(data, addr, hostname, port); - if(dns) { - dns->timestamp = 0; /* mark as added by CURLOPT_RESOLVE */ - /* release the returned reference; the cache itself will keep the - * entry alive: */ - dns->inuse--; - } - } - else - /* this is a duplicate, free it again */ - Curl_freeaddrinfo(addr); - - if(data->share) - Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - - if(!dns) { - Curl_freeaddrinfo(addr); - return CURLE_OUT_OF_MEMORY; - } - infof(data, "Added %s:%d:%s to DNS cache\n", - hostname, port, address); - } - } - data->change.resolve = NULL; /* dealt with now */ - - return CURLE_OK; -} diff --git a/build/premake/premake5/contrib/curl/lib/hostip.h b/build/premake/premake5/contrib/curl/lib/hostip.h deleted file mode 100644 index 1dc4079fef..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostip.h +++ /dev/null @@ -1,250 +0,0 @@ -#ifndef HEADER_CURL_HOSTIP_H -#define HEADER_CURL_HOSTIP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" -#include "hash.h" -#include "curl_addrinfo.h" -#include "asyn.h" - -#ifdef HAVE_SETJMP_H -#include -#endif - -#ifdef NETWARE -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -/* Allocate enough memory to hold the full name information structs and - * everything. OSF1 is known to require at least 8872 bytes. The buffer - * required for storing all possible aliases and IP numbers is according to - * Stevens' Unix Network Programming 2nd edition, p. 304: 8192 bytes! - */ -#define CURL_HOSTENT_SIZE 9000 - -#define CURL_TIMEOUT_RESOLVE 300 /* when using asynch methods, we allow this - many seconds for a name resolve */ - -#define CURL_ASYNC_SUCCESS CURLE_OK - -struct addrinfo; -struct hostent; -struct Curl_easy; -struct connectdata; - -/* - * Curl_global_host_cache_init() initializes and sets up a global DNS cache. - * Global DNS cache is general badness. Do not use. This will be removed in - * a future version. Use the share interface instead! - * - * Returns a struct curl_hash pointer on success, NULL on failure. - */ -struct curl_hash *Curl_global_host_cache_init(void); -void Curl_global_host_cache_dtor(void); - -struct Curl_dns_entry { - Curl_addrinfo *addr; - /* timestamp == 0 -- CURLOPT_RESOLVE entry, doesn't timeout */ - time_t timestamp; - /* use-counter, use Curl_resolv_unlock to release reference */ - long inuse; -}; - -/* - * Curl_resolv() returns an entry with the info for the specified host - * and port. - * - * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after - * use, or we'll leak memory! - */ -/* return codes */ -#define CURLRESOLV_TIMEDOUT -2 -#define CURLRESOLV_ERROR -1 -#define CURLRESOLV_RESOLVED 0 -#define CURLRESOLV_PENDING 1 -int Curl_resolv(struct connectdata *conn, const char *hostname, - int port, struct Curl_dns_entry **dnsentry); -int Curl_resolv_timeout(struct connectdata *conn, const char *hostname, - int port, struct Curl_dns_entry **dnsentry, - time_t timeoutms); - -#ifdef CURLRES_IPV6 -/* - * Curl_ipv6works() returns TRUE if IPv6 seems to work. - */ -bool Curl_ipv6works(void); -#else -#define Curl_ipv6works() FALSE -#endif - -/* - * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've - * been set and returns TRUE if they are OK. - */ -bool Curl_ipvalid(struct connectdata *conn); - - -/* - * Curl_getaddrinfo() is the generic low-level name resolve API within this - * source file. There are several versions of this function - for different - * name resolve layers (selected at build-time). They all take this same set - * of arguments - */ -Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp); - - -/* unlock a previously resolved dns entry */ -void Curl_resolv_unlock(struct Curl_easy *data, - struct Curl_dns_entry *dns); - -/* for debugging purposes only: */ -void Curl_scan_cache_used(void *user, void *ptr); - -/* init a new dns cache and return success */ -int Curl_mk_dnscache(struct curl_hash *hash); - -/* prune old entries from the DNS cache */ -void Curl_hostcache_prune(struct Curl_easy *data); - -/* Return # of adresses in a Curl_addrinfo struct */ -int Curl_num_addresses(const Curl_addrinfo *addr); - -#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) -int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa, - GETNAMEINFO_TYPE_ARG2 salen, - char *host, GETNAMEINFO_TYPE_ARG46 hostlen, - char *serv, GETNAMEINFO_TYPE_ARG46 servlen, - GETNAMEINFO_TYPE_ARG7 flags, - int line, const char *source); -#endif - -/* IPv4 threadsafe resolve function used for synch and asynch builds */ -Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, int port); - -CURLcode Curl_async_resolved(struct connectdata *conn, - bool *protocol_connect); - -#ifndef CURLRES_ASYNCH -#define Curl_async_resolved(x,y) CURLE_OK -#endif - -/* - * Curl_addrinfo_callback() is used when we build with any asynch specialty. - * Handles end of async request processing. Inserts ai into hostcache when - * status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async - * request completed whether successful or failed. - */ -CURLcode Curl_addrinfo_callback(struct connectdata *conn, - int status, - Curl_addrinfo *ai); - -/* - * Curl_printable_address() returns a printable version of the 1st address - * given in the 'ip' argument. The result will be stored in the buf that is - * bufsize bytes big. - */ -const char *Curl_printable_address(const Curl_addrinfo *ip, - char *buf, size_t bufsize); - -/* - * Curl_fetch_addr() fetches a 'Curl_dns_entry' already in the DNS cache. - * - * Returns the Curl_dns_entry entry pointer or NULL if not in the cache. - * - * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after - * use, or we'll leak memory! - */ -struct Curl_dns_entry * -Curl_fetch_addr(struct connectdata *conn, - const char *hostname, - int port); -/* - * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache. - * - * Returns the Curl_dns_entry entry pointer or NULL if the storage failed. - */ -struct Curl_dns_entry * -Curl_cache_addr(struct Curl_easy *data, Curl_addrinfo *addr, - const char *hostname, int port); - -#ifndef INADDR_NONE -#define CURL_INADDR_NONE (in_addr_t) ~0 -#else -#define CURL_INADDR_NONE INADDR_NONE -#endif - -#ifdef HAVE_SIGSETJMP -/* Forward-declaration of variable defined in hostip.c. Beware this - * is a global and unique instance. This is used to store the return - * address that we can jump back to from inside a signal handler. - * This is not thread-safe stuff. - */ -extern sigjmp_buf curl_jmpenv; -#endif - -/* - * Function provided by the resolver backend to set DNS servers to use. - */ -CURLcode Curl_set_dns_servers(struct Curl_easy *data, char *servers); - -/* - * Function provided by the resolver backend to set - * outgoing interface to use for DNS requests - */ -CURLcode Curl_set_dns_interface(struct Curl_easy *data, - const char *interf); - -/* - * Function provided by the resolver backend to set - * local IPv4 address to use as source address for DNS requests - */ -CURLcode Curl_set_dns_local_ip4(struct Curl_easy *data, - const char *local_ip4); - -/* - * Function provided by the resolver backend to set - * local IPv6 address to use as source address for DNS requests - */ -CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data, - const char *local_ip6); - -/* - * Clean off entries from the cache - */ -void Curl_hostcache_clean(struct Curl_easy *data, struct curl_hash *hash); - -/* - * Destroy the hostcache of this handle. - */ -void Curl_hostcache_destroy(struct Curl_easy *data); - -/* - * Populate the cache with specified entries from CURLOPT_RESOLVE. - */ -CURLcode Curl_loadhostpairs(struct Curl_easy *data); - -#endif /* HEADER_CURL_HOSTIP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/hostip4.c b/build/premake/premake5/contrib/curl/lib/hostip4.c deleted file mode 100644 index e459328ac3..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostip4.c +++ /dev/null @@ -1,307 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_PROCESS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "inet_pton.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/*********************************************************************** - * Only for plain IPv4 builds - **********************************************************************/ -#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */ -/* - * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've - * been set and returns TRUE if they are OK. - */ -bool Curl_ipvalid(struct connectdata *conn) -{ - if(conn->ip_version == CURL_IPRESOLVE_V6) - /* An IPv6 address was requested and we can't get/use one */ - return FALSE; - - return TRUE; /* OK, proceed */ -} - -#ifdef CURLRES_SYNCH - -/* - * Curl_getaddrinfo() - the IPv4 synchronous version. - * - * The original code to this function was from the Dancer source code, written - * by Bjorn Reese, it has since been patched and modified considerably. - * - * gethostbyname_r() is the thread-safe version of the gethostbyname() - * function. When we build for plain IPv4, we attempt to use this - * function. There are _three_ different gethostbyname_r() versions, and we - * detect which one this platform supports in the configure script and set up - * the HAVE_GETHOSTBYNAME_R_3, HAVE_GETHOSTBYNAME_R_5 or - * HAVE_GETHOSTBYNAME_R_6 defines accordingly. Note that HAVE_GETADDRBYNAME - * has the corresponding rules. This is primarily on *nix. Note that some unix - * flavours have thread-safe versions of the plain gethostbyname() etc. - * - */ -Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) -{ - Curl_addrinfo *ai = NULL; - -#ifdef CURL_DISABLE_VERBOSE_STRINGS - (void)conn; -#endif - - *waitp = 0; /* synchronous response only */ - - ai = Curl_ipv4_resolve_r(hostname, port); - if(!ai) - infof(conn->data, "Curl_ipv4_resolve_r failed for %s\n", hostname); - - return ai; -} -#endif /* CURLRES_SYNCH */ -#endif /* CURLRES_IPV4 */ - -#if defined(CURLRES_IPV4) && !defined(CURLRES_ARES) - -/* - * Curl_ipv4_resolve_r() - ipv4 threadsafe resolver function. - * - * This is used for both synchronous and asynchronous resolver builds, - * implying that only threadsafe code and function calls may be used. - * - */ -Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, - int port) -{ -#if !defined(HAVE_GETADDRINFO_THREADSAFE) && defined(HAVE_GETHOSTBYNAME_R_3) - int res; -#endif - Curl_addrinfo *ai = NULL; - struct hostent *h = NULL; - struct in_addr in; - struct hostent *buf = NULL; - - if(Curl_inet_pton(AF_INET, hostname, &in) > 0) - /* This is a dotted IP address 123.123.123.123-style */ - return Curl_ip2addr(AF_INET, &in, hostname, port); - -#if defined(HAVE_GETADDRINFO_THREADSAFE) - else { - struct addrinfo hints; - char sbuf[12]; - char *sbufptr = NULL; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_INET; - hints.ai_socktype = SOCK_STREAM; - if(port) { - snprintf(sbuf, sizeof(sbuf), "%d", port); - sbufptr = sbuf; - } - - (void)Curl_getaddrinfo_ex(hostname, sbufptr, &hints, &ai); - -#elif defined(HAVE_GETHOSTBYNAME_R) - /* - * gethostbyname_r() is the preferred resolve function for many platforms. - * Since there are three different versions of it, the following code is - * somewhat #ifdef-ridden. - */ - else { - int h_errnop; - - buf = calloc(1, CURL_HOSTENT_SIZE); - if(!buf) - return NULL; /* major failure */ - /* - * The clearing of the buffer is a workaround for a gethostbyname_r bug in - * qnx nto and it is also _required_ for some of these functions on some - * platforms. - */ - -#if defined(HAVE_GETHOSTBYNAME_R_5) - /* Solaris, IRIX and more */ - h = gethostbyname_r(hostname, - (struct hostent *)buf, - (char *)buf + sizeof(struct hostent), - CURL_HOSTENT_SIZE - sizeof(struct hostent), - &h_errnop); - - /* If the buffer is too small, it returns NULL and sets errno to - * ERANGE. The errno is thread safe if this is compiled with - * -D_REENTRANT as then the 'errno' variable is a macro defined to get - * used properly for threads. - */ - - if(h) { - ; - } - else -#elif defined(HAVE_GETHOSTBYNAME_R_6) - /* Linux */ - - (void)gethostbyname_r(hostname, - (struct hostent *)buf, - (char *)buf + sizeof(struct hostent), - CURL_HOSTENT_SIZE - sizeof(struct hostent), - &h, /* DIFFERENCE */ - &h_errnop); - /* Redhat 8, using glibc 2.2.93 changed the behavior. Now all of a - * sudden this function returns EAGAIN if the given buffer size is too - * small. Previous versions are known to return ERANGE for the same - * problem. - * - * This wouldn't be such a big problem if older versions wouldn't - * sometimes return EAGAIN on a common failure case. Alas, we can't - * assume that EAGAIN *or* ERANGE means ERANGE for any given version of - * glibc. - * - * For now, we do that and thus we may call the function repeatedly and - * fail for older glibc versions that return EAGAIN, until we run out of - * buffer size (step_size grows beyond CURL_HOSTENT_SIZE). - * - * If anyone has a better fix, please tell us! - * - * ------------------------------------------------------------------- - * - * On October 23rd 2003, Dan C dug up more details on the mysteries of - * gethostbyname_r() in glibc: - * - * In glibc 2.2.5 the interface is different (this has also been - * discovered in glibc 2.1.1-6 as shipped by Redhat 6). What I can't - * explain, is that tests performed on glibc 2.2.4-34 and 2.2.4-32 - * (shipped/upgraded by Redhat 7.2) don't show this behavior! - * - * In this "buggy" version, the return code is -1 on error and 'errno' - * is set to the ERANGE or EAGAIN code. Note that 'errno' is not a - * thread-safe variable. - */ - - if(!h) /* failure */ -#elif defined(HAVE_GETHOSTBYNAME_R_3) - /* AIX, Digital Unix/Tru64, HPUX 10, more? */ - - /* For AIX 4.3 or later, we don't use gethostbyname_r() at all, because of - * the plain fact that it does not return unique full buffers on each - * call, but instead several of the pointers in the hostent structs will - * point to the same actual data! This have the unfortunate down-side that - * our caching system breaks down horribly. Luckily for us though, AIX 4.3 - * and more recent versions have a "completely thread-safe"[*] libc where - * all the data is stored in thread-specific memory areas making calls to - * the plain old gethostbyname() work fine even for multi-threaded - * programs. - * - * This AIX 4.3 or later detection is all made in the configure script. - * - * Troels Walsted Hansen helped us work this out on March 3rd, 2003. - * - * [*] = much later we've found out that it isn't at all "completely - * thread-safe", but at least the gethostbyname() function is. - */ - - if(CURL_HOSTENT_SIZE >= - (sizeof(struct hostent)+sizeof(struct hostent_data))) { - - /* August 22nd, 2000: Albert Chin-A-Young brought an updated version - * that should work! September 20: Richard Prescott worked on the buffer - * size dilemma. - */ - - res = gethostbyname_r(hostname, - (struct hostent *)buf, - (struct hostent_data *)((char *)buf + - sizeof(struct hostent))); - h_errnop = SOCKERRNO; /* we don't deal with this, but set it anyway */ - } - else - res = -1; /* failure, too smallish buffer size */ - - if(!res) { /* success */ - - h = buf; /* result expected in h */ - - /* This is the worst kind of the different gethostbyname_r() interfaces. - * Since we don't know how big buffer this particular lookup required, - * we can't realloc down the huge alloc without doing closer analysis of - * the returned data. Thus, we always use CURL_HOSTENT_SIZE for every - * name lookup. Fixing this would require an extra malloc() and then - * calling Curl_addrinfo_copy() that subsequent realloc()s down the new - * memory area to the actually used amount. - */ - } - else -#endif /* HAVE_...BYNAME_R_5 || HAVE_...BYNAME_R_6 || HAVE_...BYNAME_R_3 */ - { - h = NULL; /* set return code to NULL */ - free(buf); - } -#else /* HAVE_GETADDRINFO_THREADSAFE || HAVE_GETHOSTBYNAME_R */ - /* - * Here is code for platforms that don't have a thread safe - * getaddrinfo() nor gethostbyname_r() function or for which - * gethostbyname() is the preferred one. - */ - else { - h = gethostbyname((void *)hostname); -#endif /* HAVE_GETADDRINFO_THREADSAFE || HAVE_GETHOSTBYNAME_R */ - } - - if(h) { - ai = Curl_he2ai(h, port); - - if(buf) /* used a *_r() function */ - free(buf); - } - - return ai; -} -#endif /* defined(CURLRES_IPV4) && !defined(CURLRES_ARES) */ diff --git a/build/premake/premake5/contrib/curl/lib/hostip6.c b/build/premake/premake5/contrib/curl/lib/hostip6.c deleted file mode 100644 index 4ebfc2dcfa..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostip6.c +++ /dev/null @@ -1,234 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_PROCESS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "inet_pton.h" -#include "connect.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/*********************************************************************** - * Only for IPv6-enabled builds - **********************************************************************/ -#ifdef CURLRES_IPV6 - -#if defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) -/* These are strictly for memory tracing and are using the same style as the - * family otherwise present in memdebug.c. I put these ones here since they - * require a bunch of structs I didn't want to include in memdebug.c - */ - -/* - * For CURLRES_ARS, this should be written using ares_gethostbyaddr() - * (ignoring the fact c-ares doesn't return 'serv'). - */ - -int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa, - GETNAMEINFO_TYPE_ARG2 salen, - char *host, GETNAMEINFO_TYPE_ARG46 hostlen, - char *serv, GETNAMEINFO_TYPE_ARG46 servlen, - GETNAMEINFO_TYPE_ARG7 flags, - int line, const char *source) -{ - int res = (getnameinfo)(sa, salen, - host, hostlen, - serv, servlen, - flags); - if(0 == res) - /* success */ - curl_memlog("GETNAME %s:%d getnameinfo()\n", - source, line); - else - curl_memlog("GETNAME %s:%d getnameinfo() failed = %d\n", - source, line, res); - return res; -} -#endif /* defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) */ - -/* - * Curl_ipv6works() returns TRUE if IPv6 seems to work. - */ -bool Curl_ipv6works(void) -{ - /* the nature of most system is that IPv6 status doesn't come and go - during a program's lifetime so we only probe the first time and then we - have the info kept for fast re-use */ - static int ipv6_works = -1; - if(-1 == ipv6_works) { - /* probe to see if we have a working IPv6 stack */ - curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0); - if(s == CURL_SOCKET_BAD) - /* an IPv6 address was requested but we can't get/use one */ - ipv6_works = 0; - else { - ipv6_works = 1; - Curl_closesocket(NULL, s); - } - } - return (ipv6_works>0)?TRUE:FALSE; -} - -/* - * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've - * been set and returns TRUE if they are OK. - */ -bool Curl_ipvalid(struct connectdata *conn) -{ - if(conn->ip_version == CURL_IPRESOLVE_V6) - return Curl_ipv6works(); - - return TRUE; -} - -#if defined(CURLRES_SYNCH) - -#ifdef DEBUG_ADDRINFO -static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai) -{ - printf("dump_addrinfo:\n"); - for(; ai; ai = ai->ai_next) { - char buf[INET6_ADDRSTRLEN]; - - printf(" fam %2d, CNAME %s, ", - ai->ai_family, ai->ai_canonname ? ai->ai_canonname : ""); - if(Curl_printable_address(ai, buf, sizeof(buf))) - printf("%s\n", buf); - else - printf("failed; %s\n", Curl_strerror(conn, SOCKERRNO)); - } -} -#else -#define dump_addrinfo(x,y) Curl_nop_stmt -#endif - -/* - * Curl_getaddrinfo() when built IPv6-enabled (non-threading and - * non-ares version). - * - * Returns name information about the given hostname and port number. If - * successful, the 'addrinfo' is returned and the forth argument will point to - * memory we need to free after use. That memory *MUST* be freed with - * Curl_freeaddrinfo(), nothing else. - */ -Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) -{ - struct addrinfo hints; - Curl_addrinfo *res; - int error; - char sbuf[12]; - char *sbufptr = NULL; -#ifndef USE_RESOLVE_ON_IPS - char addrbuf[128]; -#endif - int pf; -#if !defined(CURL_DISABLE_VERBOSE_STRINGS) - struct Curl_easy *data = conn->data; -#endif - - *waitp = 0; /* synchronous response only */ - - /* Check if a limited name resolve has been requested */ - switch(conn->ip_version) { - case CURL_IPRESOLVE_V4: - pf = PF_INET; - break; - case CURL_IPRESOLVE_V6: - pf = PF_INET6; - break; - default: - pf = PF_UNSPEC; - break; - } - - if((pf != PF_INET) && !Curl_ipv6works()) - /* The stack seems to be a non-IPv6 one */ - pf = PF_INET; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = pf; - hints.ai_socktype = conn->socktype; - -#ifndef USE_RESOLVE_ON_IPS - /* - * The AI_NUMERICHOST must not be set to get synthesized IPv6 address from - * an IPv4 address on iOS and Mac OS X. - */ - if((1 == Curl_inet_pton(AF_INET, hostname, addrbuf)) || - (1 == Curl_inet_pton(AF_INET6, hostname, addrbuf))) { - /* the given address is numerical only, prevent a reverse lookup */ - hints.ai_flags = AI_NUMERICHOST; - } -#endif - - if(port) { - snprintf(sbuf, sizeof(sbuf), "%d", port); - sbufptr=sbuf; - } - - error = Curl_getaddrinfo_ex(hostname, sbufptr, &hints, &res); - if(error) { - infof(data, "getaddrinfo(3) failed for %s:%d\n", hostname, port); - return NULL; - } - - if(port) { - Curl_addrinfo_set_port(res, port); - } - - dump_addrinfo(conn, res); - - return res; -} -#endif /* CURLRES_SYNCH */ - -#endif /* CURLRES_IPV6 */ diff --git a/build/premake/premake5/contrib/curl/lib/hostsyn.c b/build/premake/premake5/contrib/curl/lib/hostsyn.c deleted file mode 100644 index 1a95263c62..0000000000 --- a/build/premake/premake5/contrib/curl/lib/hostsyn.c +++ /dev/null @@ -1,107 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_PROCESS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "hash.h" -#include "share.h" -#include "strerror.h" -#include "url.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/*********************************************************************** - * Only for builds using synchronous name resolves - **********************************************************************/ -#ifdef CURLRES_SYNCH - -/* - * Function provided by the resolver backend to set DNS servers to use. - */ -CURLcode Curl_set_dns_servers(struct Curl_easy *data, - char *servers) -{ - (void)data; - (void)servers; - return CURLE_NOT_BUILT_IN; - -} - -/* - * Function provided by the resolver backend to set - * outgoing interface to use for DNS requests - */ -CURLcode Curl_set_dns_interface(struct Curl_easy *data, - const char *interf) -{ - (void)data; - (void)interf; - return CURLE_NOT_BUILT_IN; -} - -/* - * Function provided by the resolver backend to set - * local IPv4 address to use as source address for DNS requests - */ -CURLcode Curl_set_dns_local_ip4(struct Curl_easy *data, - const char *local_ip4) -{ - (void)data; - (void)local_ip4; - return CURLE_NOT_BUILT_IN; -} - -/* - * Function provided by the resolver backend to set - * local IPv6 address to use as source address for DNS requests - */ -CURLcode Curl_set_dns_local_ip6(struct Curl_easy *data, - const char *local_ip6) -{ - (void)data; - (void)local_ip6; - return CURLE_NOT_BUILT_IN; -} - -#endif /* truly sync */ diff --git a/build/premake/premake5/contrib/curl/lib/http.c b/build/premake/premake5/contrib/curl/lib/http.c deleted file mode 100644 index 8db86cd84d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http.c +++ /dev/null @@ -1,3773 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_HTTP - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#include "urldata.h" -#include -#include "transfer.h" -#include "sendf.h" -#include "formdata.h" -#include "progress.h" -#include "curl_base64.h" -#include "cookie.h" -#include "vauth/vauth.h" -#include "vtls/vtls.h" -#include "http_digest.h" -#include "http_ntlm.h" -#include "curl_ntlm_wb.h" -#include "http_negotiate.h" -#include "url.h" -#include "share.h" -#include "hostip.h" -#include "http.h" -#include "select.h" -#include "parsedate.h" /* for the week day and month names */ -#include "strtoofft.h" -#include "multiif.h" -#include "strcase.h" -#include "content_encoding.h" -#include "http_proxy.h" -#include "warnless.h" -#include "non-ascii.h" -#include "conncache.h" -#include "pipeline.h" -#include "http2.h" -#include "connect.h" -#include "strdup.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Forward declarations. - */ - -static int http_getsock_do(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); -static int http_should_fail(struct connectdata *conn); - -#ifdef USE_SSL -static CURLcode https_connecting(struct connectdata *conn, bool *done); -static int https_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); -#else -#define https_connecting(x,y) CURLE_COULDNT_CONNECT -#endif - -/* - * HTTP handler interface. - */ -const struct Curl_handler Curl_handler_http = { - "HTTP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - Curl_http_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - http_getsock_do, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_HTTP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_CREDSPERREQUEST /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTPS handler interface. - */ -const struct Curl_handler Curl_handler_https = { - "HTTPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - Curl_http_connect, /* connect_it */ - https_connecting, /* connecting */ - ZERO_NULL, /* doing */ - https_getsock, /* proto_getsock */ - http_getsock_do, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_HTTPS, /* defport */ - CURLPROTO_HTTPS, /* protocol */ - PROTOPT_SSL | PROTOPT_CREDSPERREQUEST | PROTOPT_ALPN_NPN /* flags */ -}; -#endif - -CURLcode Curl_http_setup_conn(struct connectdata *conn) -{ - /* allocate the HTTP-specific struct for the Curl_easy, only to survive - during this request */ - struct HTTP *http; - DEBUGASSERT(conn->data->req.protop == NULL); - - http = calloc(1, sizeof(struct HTTP)); - if(!http) - return CURLE_OUT_OF_MEMORY; - - conn->data->req.protop = http; - - Curl_http2_setup_conn(conn); - Curl_http2_setup_req(conn->data); - - return CURLE_OK; -} - -/* - * checkheaders() checks the linked list of custom HTTP headers for a - * particular header (prefix). - * - * Returns a pointer to the first matching header or NULL if none matched. - */ -char *Curl_checkheaders(const struct connectdata *conn, - const char *thisheader) -{ - struct curl_slist *head; - size_t thislen = strlen(thisheader); - struct Curl_easy *data = conn->data; - - for(head = data->set.headers;head; head=head->next) { - if(strncasecompare(head->data, thisheader, thislen)) - return head->data; - } - - return NULL; -} - -/* - * checkProxyHeaders() checks the linked list of custom proxy headers - * if proxy headers are not available, then it will lookup into http header - * link list - * - * It takes a connectdata struct as input instead of the Curl_easy simply - * to know if this is a proxy request or not, as it then might check a - * different header list. - */ -char *Curl_checkProxyheaders(const struct connectdata *conn, - const char *thisheader) -{ - struct curl_slist *head; - size_t thislen = strlen(thisheader); - struct Curl_easy *data = conn->data; - - for(head = (conn->bits.proxy && data->set.sep_headers) ? - data->set.proxyheaders : data->set.headers; - head; head=head->next) { - if(strncasecompare(head->data, thisheader, thislen)) - return head->data; - } - - return NULL; -} - -/* - * Strip off leading and trailing whitespace from the value in the - * given HTTP header line and return a strdupped copy. Returns NULL in - * case of allocation failure. Returns an empty string if the header value - * consists entirely of whitespace. - */ -char *Curl_copy_header_value(const char *header) -{ - const char *start; - const char *end; - char *value; - size_t len; - - DEBUGASSERT(header); - - /* Find the end of the header name */ - while(*header && (*header != ':')) - ++header; - - if(*header) - /* Skip over colon */ - ++header; - - /* Find the first non-space letter */ - start = header; - while(*start && ISSPACE(*start)) - start++; - - /* data is in the host encoding so - use '\r' and '\n' instead of 0x0d and 0x0a */ - end = strchr(start, '\r'); - if(!end) - end = strchr(start, '\n'); - if(!end) - end = strchr(start, '\0'); - if(!end) - return NULL; - - /* skip all trailing space letters */ - while((end > start) && ISSPACE(*end)) - end--; - - /* get length of the type */ - len = end - start + 1; - - value = malloc(len + 1); - if(!value) - return NULL; - - memcpy(value, start, len); - value[len] = 0; /* zero terminate */ - - return value; -} - -/* - * http_output_basic() sets up an Authorization: header (or the proxy version) - * for HTTP Basic authentication. - * - * Returns CURLcode. - */ -static CURLcode http_output_basic(struct connectdata *conn, bool proxy) -{ - size_t size = 0; - char *authorization = NULL; - struct Curl_easy *data = conn->data; - char **userp; - const char *user; - const char *pwd; - CURLcode result; - - if(proxy) { - userp = &conn->allocptr.proxyuserpwd; - user = conn->http_proxy.user; - pwd = conn->http_proxy.passwd; - } - else { - userp = &conn->allocptr.userpwd; - user = conn->user; - pwd = conn->passwd; - } - - snprintf(data->state.buffer, CURL_BUFSIZE(data->set.buffer_size), - "%s:%s", user, pwd); - - result = Curl_base64_encode(data, - data->state.buffer, strlen(data->state.buffer), - &authorization, &size); - if(result) - return result; - - if(!authorization) - return CURLE_REMOTE_ACCESS_DENIED; - - free(*userp); - *userp = aprintf("%sAuthorization: Basic %s\r\n", - proxy ? "Proxy-" : "", - authorization); - free(authorization); - if(!*userp) - return CURLE_OUT_OF_MEMORY; - - return CURLE_OK; -} - -/* pickoneauth() selects the most favourable authentication method from the - * ones available and the ones we want. - * - * return TRUE if one was picked - */ -static bool pickoneauth(struct auth *pick) -{ - bool picked; - /* only deal with authentication we want */ - unsigned long avail = pick->avail & pick->want; - picked = TRUE; - - /* The order of these checks is highly relevant, as this will be the order - of preference in case of the existence of multiple accepted types. */ - if(avail & CURLAUTH_NEGOTIATE) - pick->picked = CURLAUTH_NEGOTIATE; - else if(avail & CURLAUTH_DIGEST) - pick->picked = CURLAUTH_DIGEST; - else if(avail & CURLAUTH_NTLM) - pick->picked = CURLAUTH_NTLM; - else if(avail & CURLAUTH_NTLM_WB) - pick->picked = CURLAUTH_NTLM_WB; - else if(avail & CURLAUTH_BASIC) - pick->picked = CURLAUTH_BASIC; - else { - pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */ - picked = FALSE; - } - pick->avail = CURLAUTH_NONE; /* clear it here */ - - return picked; -} - -/* - * Curl_http_perhapsrewind() - * - * If we are doing POST or PUT { - * If we have more data to send { - * If we are doing NTLM { - * Keep sending since we must not disconnect - * } - * else { - * If there is more than just a little data left to send, close - * the current connection by force. - * } - * } - * If we have sent any data { - * If we don't have track of all the data { - * call app to tell it to rewind - * } - * else { - * rewind internally so that the operation can restart fine - * } - * } - * } - */ -static CURLcode http_perhapsrewind(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - struct HTTP *http = data->req.protop; - curl_off_t bytessent; - curl_off_t expectsend = -1; /* default is unknown */ - - if(!http) - /* If this is still NULL, we have not reach very far and we can safely - skip this rewinding stuff */ - return CURLE_OK; - - switch(data->set.httpreq) { - case HTTPREQ_GET: - case HTTPREQ_HEAD: - return CURLE_OK; - default: - break; - } - - bytessent = http->writebytecount; - - if(conn->bits.authneg) { - /* This is a state where we are known to be negotiating and we don't send - any data then. */ - expectsend = 0; - } - else if(!conn->bits.protoconnstart) { - /* HTTP CONNECT in progress: there is no body */ - expectsend = 0; - } - else { - /* figure out how much data we are expected to send */ - switch(data->set.httpreq) { - case HTTPREQ_POST: - if(data->state.infilesize != -1) - expectsend = data->state.infilesize; - else if(data->set.postfields) - expectsend = (curl_off_t)strlen(data->set.postfields); - break; - case HTTPREQ_PUT: - if(data->state.infilesize != -1) - expectsend = data->state.infilesize; - break; - case HTTPREQ_POST_FORM: - expectsend = http->postsize; - break; - default: - break; - } - } - - conn->bits.rewindaftersend = FALSE; /* default */ - - if((expectsend == -1) || (expectsend > bytessent)) { -#if defined(USE_NTLM) - /* There is still data left to send */ - if((data->state.authproxy.picked == CURLAUTH_NTLM) || - (data->state.authhost.picked == CURLAUTH_NTLM) || - (data->state.authproxy.picked == CURLAUTH_NTLM_WB) || - (data->state.authhost.picked == CURLAUTH_NTLM_WB)) { - if(((expectsend - bytessent) < 2000) || - (conn->ntlm.state != NTLMSTATE_NONE) || - (conn->proxyntlm.state != NTLMSTATE_NONE)) { - /* The NTLM-negotiation has started *OR* there is just a little (<2K) - data left to send, keep on sending. */ - - /* rewind data when completely done sending! */ - if(!conn->bits.authneg) { - conn->bits.rewindaftersend = TRUE; - infof(data, "Rewind stream after send\n"); - } - - return CURLE_OK; - } - - if(conn->bits.close) - /* this is already marked to get closed */ - return CURLE_OK; - - infof(data, "NTLM send, close instead of sending %" - CURL_FORMAT_CURL_OFF_T " bytes\n", - (curl_off_t)(expectsend - bytessent)); - } -#endif - - /* This is not NTLM or many bytes left to send: close */ - streamclose(conn, "Mid-auth HTTP and much data left to send"); - data->req.size = 0; /* don't download any more than 0 bytes */ - - /* There still is data left to send, but this connection is marked for - closure so we can safely do the rewind right now */ - } - - if(bytessent) - /* we rewind now at once since if we already sent something */ - return Curl_readrewind(conn); - - return CURLE_OK; -} - -/* - * Curl_http_auth_act() gets called when all HTTP headers have been received - * and it checks what authentication methods that are available and decides - * which one (if any) to use. It will set 'newurl' if an auth method was - * picked. - */ - -CURLcode Curl_http_auth_act(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - bool pickhost = FALSE; - bool pickproxy = FALSE; - CURLcode result = CURLE_OK; - - if(100 <= data->req.httpcode && 199 >= data->req.httpcode) - /* this is a transient response code, ignore */ - return CURLE_OK; - - if(data->state.authproblem) - return data->set.http_fail_on_error?CURLE_HTTP_RETURNED_ERROR:CURLE_OK; - - if(conn->bits.user_passwd && - ((data->req.httpcode == 401) || - (conn->bits.authneg && data->req.httpcode < 300))) { - pickhost = pickoneauth(&data->state.authhost); - if(!pickhost) - data->state.authproblem = TRUE; - } - if(conn->bits.proxy_user_passwd && - ((data->req.httpcode == 407) || - (conn->bits.authneg && data->req.httpcode < 300))) { - pickproxy = pickoneauth(&data->state.authproxy); - if(!pickproxy) - data->state.authproblem = TRUE; - } - - if(pickhost || pickproxy) { - /* In case this is GSS auth, the newurl field is already allocated so - we must make sure to free it before allocating a new one. As figured - out in bug #2284386 */ - Curl_safefree(data->req.newurl); - data->req.newurl = strdup(data->change.url); /* clone URL */ - if(!data->req.newurl) - return CURLE_OUT_OF_MEMORY; - - if((data->set.httpreq != HTTPREQ_GET) && - (data->set.httpreq != HTTPREQ_HEAD) && - !conn->bits.rewindaftersend) { - result = http_perhapsrewind(conn); - if(result) - return result; - } - } - else if((data->req.httpcode < 300) && - (!data->state.authhost.done) && - conn->bits.authneg) { - /* no (known) authentication available, - authentication is not "done" yet and - no authentication seems to be required and - we didn't try HEAD or GET */ - if((data->set.httpreq != HTTPREQ_GET) && - (data->set.httpreq != HTTPREQ_HEAD)) { - data->req.newurl = strdup(data->change.url); /* clone URL */ - if(!data->req.newurl) - return CURLE_OUT_OF_MEMORY; - data->state.authhost.done = TRUE; - } - } - if(http_should_fail(conn)) { - failf(data, "The requested URL returned error: %d", - data->req.httpcode); - result = CURLE_HTTP_RETURNED_ERROR; - } - - return result; -} - -/* - * Output the correct authentication header depending on the auth type - * and whether or not it is to a proxy. - */ -static CURLcode -output_auth_headers(struct connectdata *conn, - struct auth *authstatus, - const char *request, - const char *path, - bool proxy) -{ - const char *auth = NULL; - CURLcode result = CURLE_OK; -#if !defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_SPNEGO) - struct Curl_easy *data = conn->data; -#endif -#ifdef USE_SPNEGO - struct negotiatedata *negdata = proxy ? - &data->state.proxyneg : &data->state.negotiate; -#endif - -#ifdef CURL_DISABLE_CRYPTO_AUTH - (void)request; - (void)path; -#endif - -#ifdef USE_SPNEGO - negdata->state = GSS_AUTHNONE; - if((authstatus->picked == CURLAUTH_NEGOTIATE) && - negdata->context && !GSS_ERROR(negdata->status)) { - auth = "Negotiate"; - result = Curl_output_negotiate(conn, proxy); - if(result) - return result; - authstatus->done = TRUE; - negdata->state = GSS_AUTHSENT; - } - else -#endif -#ifdef USE_NTLM - if(authstatus->picked == CURLAUTH_NTLM) { - auth = "NTLM"; - result = Curl_output_ntlm(conn, proxy); - if(result) - return result; - } - else -#endif -#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) - if(authstatus->picked == CURLAUTH_NTLM_WB) { - auth="NTLM_WB"; - result = Curl_output_ntlm_wb(conn, proxy); - if(result) - return result; - } - else -#endif -#ifndef CURL_DISABLE_CRYPTO_AUTH - if(authstatus->picked == CURLAUTH_DIGEST) { - auth = "Digest"; - result = Curl_output_digest(conn, - proxy, - (const unsigned char *)request, - (const unsigned char *)path); - if(result) - return result; - } - else -#endif - if(authstatus->picked == CURLAUTH_BASIC) { - /* Basic */ - if((proxy && conn->bits.proxy_user_passwd && - !Curl_checkProxyheaders(conn, "Proxy-authorization:")) || - (!proxy && conn->bits.user_passwd && - !Curl_checkheaders(conn, "Authorization:"))) { - auth = "Basic"; - result = http_output_basic(conn, proxy); - if(result) - return result; - } - - /* NOTE: this function should set 'done' TRUE, as the other auth - functions work that way */ - authstatus->done = TRUE; - } - - if(auth) { - infof(data, "%s auth using %s with user '%s'\n", - proxy ? "Proxy" : "Server", auth, - proxy ? (conn->http_proxy.user ? conn->http_proxy.user : "") : - (conn->user ? conn->user : "")); - authstatus->multi = (!authstatus->done) ? TRUE : FALSE; - } - else - authstatus->multi = FALSE; - - return CURLE_OK; -} - -/** - * Curl_http_output_auth() setups the authentication headers for the - * host/proxy and the correct authentication - * method. conn->data->state.authdone is set to TRUE when authentication is - * done. - * - * @param conn all information about the current connection - * @param request pointer to the request keyword - * @param path pointer to the requested path - * @param proxytunnel boolean if this is the request setting up a "proxy - * tunnel" - * - * @returns CURLcode - */ -CURLcode -Curl_http_output_auth(struct connectdata *conn, - const char *request, - const char *path, - bool proxytunnel) /* TRUE if this is the request setting - up the proxy tunnel */ -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct auth *authhost; - struct auth *authproxy; - - DEBUGASSERT(data); - - authhost = &data->state.authhost; - authproxy = &data->state.authproxy; - - if((conn->bits.httpproxy && conn->bits.proxy_user_passwd) || - conn->bits.user_passwd) - /* continue please */; - else { - authhost->done = TRUE; - authproxy->done = TRUE; - return CURLE_OK; /* no authentication with no user or password */ - } - - if(authhost->want && !authhost->picked) - /* The app has selected one or more methods, but none has been picked - so far by a server round-trip. Then we set the picked one to the - want one, and if this is one single bit it'll be used instantly. */ - authhost->picked = authhost->want; - - if(authproxy->want && !authproxy->picked) - /* The app has selected one or more methods, but none has been picked so - far by a proxy round-trip. Then we set the picked one to the want one, - and if this is one single bit it'll be used instantly. */ - authproxy->picked = authproxy->want; - -#ifndef CURL_DISABLE_PROXY - /* Send proxy authentication header if needed */ - if(conn->bits.httpproxy && - (conn->bits.tunnel_proxy == proxytunnel)) { - result = output_auth_headers(conn, authproxy, request, path, TRUE); - if(result) - return result; - } - else -#else - (void)proxytunnel; -#endif /* CURL_DISABLE_PROXY */ - /* we have no proxy so let's pretend we're done authenticating - with it */ - authproxy->done = TRUE; - - /* To prevent the user+password to get sent to other than the original - host due to a location-follow, we do some weirdo checks here */ - if(!data->state.this_is_a_follow || - conn->bits.netrc || - !data->state.first_host || - data->set.http_disable_hostname_check_before_authentication || - strcasecompare(data->state.first_host, conn->host.name)) { - result = output_auth_headers(conn, authhost, request, path, FALSE); - } - else - authhost->done = TRUE; - - return result; -} - -/* - * Curl_http_input_auth() deals with Proxy-Authenticate: and WWW-Authenticate: - * headers. They are dealt with both in the transfer.c main loop and in the - * proxy CONNECT loop. - */ - -CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, - const char *auth) /* the first non-space */ -{ - /* - * This resource requires authentication - */ - struct Curl_easy *data = conn->data; - -#ifdef USE_SPNEGO - struct negotiatedata *negdata = proxy? - &data->state.proxyneg:&data->state.negotiate; -#endif - unsigned long *availp; - struct auth *authp; - - if(proxy) { - availp = &data->info.proxyauthavail; - authp = &data->state.authproxy; - } - else { - availp = &data->info.httpauthavail; - authp = &data->state.authhost; - } - - /* - * Here we check if we want the specific single authentication (using ==) and - * if we do, we initiate usage of it. - * - * If the provided authentication is wanted as one out of several accepted - * types (using &), we OR this authentication type to the authavail - * variable. - * - * Note: - * - * ->picked is first set to the 'want' value (one or more bits) before the - * request is sent, and then it is again set _after_ all response 401/407 - * headers have been received but then only to a single preferred method - * (bit). - */ - - while(*auth) { -#ifdef USE_SPNEGO - if(checkprefix("Negotiate", auth)) { - if((authp->avail & CURLAUTH_NEGOTIATE) || - Curl_auth_is_spnego_supported()) { - *availp |= CURLAUTH_NEGOTIATE; - authp->avail |= CURLAUTH_NEGOTIATE; - - if(authp->picked == CURLAUTH_NEGOTIATE) { - if(negdata->state == GSS_AUTHSENT || - negdata->state == GSS_AUTHNONE) { - CURLcode result = Curl_input_negotiate(conn, proxy, auth); - if(!result) { - DEBUGASSERT(!data->req.newurl); - data->req.newurl = strdup(data->change.url); - if(!data->req.newurl) - return CURLE_OUT_OF_MEMORY; - data->state.authproblem = FALSE; - /* we received a GSS auth token and we dealt with it fine */ - negdata->state = GSS_AUTHRECV; - } - else - data->state.authproblem = TRUE; - } - } - } - } - else -#endif -#ifdef USE_NTLM - /* NTLM support requires the SSL crypto libs */ - if(checkprefix("NTLM", auth)) { - if((authp->avail & CURLAUTH_NTLM) || - (authp->avail & CURLAUTH_NTLM_WB) || - Curl_auth_is_ntlm_supported()) { - *availp |= CURLAUTH_NTLM; - authp->avail |= CURLAUTH_NTLM; - - if(authp->picked == CURLAUTH_NTLM || - authp->picked == CURLAUTH_NTLM_WB) { - /* NTLM authentication is picked and activated */ - CURLcode result = Curl_input_ntlm(conn, proxy, auth); - if(!result) { - data->state.authproblem = FALSE; -#ifdef NTLM_WB_ENABLED - if(authp->picked == CURLAUTH_NTLM_WB) { - *availp &= ~CURLAUTH_NTLM; - authp->avail &= ~CURLAUTH_NTLM; - *availp |= CURLAUTH_NTLM_WB; - authp->avail |= CURLAUTH_NTLM_WB; - - /* Get the challenge-message which will be passed to - * ntlm_auth for generating the type 3 message later */ - while(*auth && ISSPACE(*auth)) - auth++; - if(checkprefix("NTLM", auth)) { - auth += strlen("NTLM"); - while(*auth && ISSPACE(*auth)) - auth++; - if(*auth) { - conn->challenge_header = strdup(auth); - if(!conn->challenge_header) - return CURLE_OUT_OF_MEMORY; - } - } - } -#endif - } - else { - infof(data, "Authentication problem. Ignoring this.\n"); - data->state.authproblem = TRUE; - } - } - } - } - else -#endif -#ifndef CURL_DISABLE_CRYPTO_AUTH - if(checkprefix("Digest", auth)) { - if((authp->avail & CURLAUTH_DIGEST) != 0) - infof(data, "Ignoring duplicate digest auth header.\n"); - else if(Curl_auth_is_digest_supported()) { - CURLcode result; - - *availp |= CURLAUTH_DIGEST; - authp->avail |= CURLAUTH_DIGEST; - - /* We call this function on input Digest headers even if Digest - * authentication isn't activated yet, as we need to store the - * incoming data from this header in case we are going to use - * Digest */ - result = Curl_input_digest(conn, proxy, auth); - if(result) { - infof(data, "Authentication problem. Ignoring this.\n"); - data->state.authproblem = TRUE; - } - } - } - else -#endif - if(checkprefix("Basic", auth)) { - *availp |= CURLAUTH_BASIC; - authp->avail |= CURLAUTH_BASIC; - if(authp->picked == CURLAUTH_BASIC) { - /* We asked for Basic authentication but got a 40X back - anyway, which basically means our name+password isn't - valid. */ - authp->avail = CURLAUTH_NONE; - infof(data, "Authentication problem. Ignoring this.\n"); - data->state.authproblem = TRUE; - } - } - - /* there may be multiple methods on one line, so keep reading */ - while(*auth && *auth != ',') /* read up to the next comma */ - auth++; - if(*auth == ',') /* if we're on a comma, skip it */ - auth++; - while(*auth && ISSPACE(*auth)) - auth++; - } - - return CURLE_OK; -} - -/** - * http_should_fail() determines whether an HTTP response has gotten us - * into an error state or not. - * - * @param conn all information about the current connection - * - * @retval 0 communications should continue - * - * @retval 1 communications should not continue - */ -static int http_should_fail(struct connectdata *conn) -{ - struct Curl_easy *data; - int httpcode; - - DEBUGASSERT(conn); - data = conn->data; - DEBUGASSERT(data); - - httpcode = data->req.httpcode; - - /* - ** If we haven't been asked to fail on error, - ** don't fail. - */ - if(!data->set.http_fail_on_error) - return 0; - - /* - ** Any code < 400 is never terminal. - */ - if(httpcode < 400) - return 0; - - /* - ** Any code >= 400 that's not 401 or 407 is always - ** a terminal error - */ - if((httpcode != 401) && (httpcode != 407)) - return 1; - - /* - ** All we have left to deal with is 401 and 407 - */ - DEBUGASSERT((httpcode == 401) || (httpcode == 407)); - - /* - ** Examine the current authentication state to see if this - ** is an error. The idea is for this function to get - ** called after processing all the headers in a response - ** message. So, if we've been to asked to authenticate a - ** particular stage, and we've done it, we're OK. But, if - ** we're already completely authenticated, it's not OK to - ** get another 401 or 407. - ** - ** It is possible for authentication to go stale such that - ** the client needs to reauthenticate. Once that info is - ** available, use it here. - */ - - /* - ** Either we're not authenticating, or we're supposed to - ** be authenticating something else. This is an error. - */ - if((httpcode == 401) && !conn->bits.user_passwd) - return TRUE; - if((httpcode == 407) && !conn->bits.proxy_user_passwd) - return TRUE; - - return data->state.authproblem; -} - -/* - * readmoredata() is a "fread() emulation" to provide POST and/or request - * data. It is used when a huge POST is to be made and the entire chunk wasn't - * sent in the first send(). This function will then be called from the - * transfer.c loop when more data is to be sent to the peer. - * - * Returns the amount of bytes it filled the buffer with. - */ -static size_t readmoredata(char *buffer, - size_t size, - size_t nitems, - void *userp) -{ - struct connectdata *conn = (struct connectdata *)userp; - struct HTTP *http = conn->data->req.protop; - size_t fullsize = size * nitems; - - if(!http->postsize) - /* nothing to return */ - return 0; - - /* make sure that a HTTP request is never sent away chunked! */ - conn->data->req.forbidchunk = (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE; - - if(http->postsize <= (curl_off_t)fullsize) { - memcpy(buffer, http->postdata, (size_t)http->postsize); - fullsize = (size_t)http->postsize; - - if(http->backup.postsize) { - /* move backup data into focus and continue on that */ - http->postdata = http->backup.postdata; - http->postsize = http->backup.postsize; - conn->data->state.fread_func = http->backup.fread_func; - conn->data->state.in = http->backup.fread_in; - - http->sending++; /* move one step up */ - - http->backup.postsize=0; - } - else - http->postsize = 0; - - return fullsize; - } - - memcpy(buffer, http->postdata, fullsize); - http->postdata += fullsize; - http->postsize -= fullsize; - - return fullsize; -} - -/* ------------------------------------------------------------------------- */ -/* add_buffer functions */ - -/* - * Curl_add_buffer_init() sets up and returns a fine buffer struct - */ -Curl_send_buffer *Curl_add_buffer_init(void) -{ - return calloc(1, sizeof(Curl_send_buffer)); -} - -/* - * Curl_add_buffer_free() frees all associated resources. - */ -void Curl_add_buffer_free(Curl_send_buffer *buff) -{ - if(buff) /* deal with NULL input */ - free(buff->buffer); - free(buff); -} - -/* - * Curl_add_buffer_send() sends a header buffer and frees all associated - * memory. Body data may be appended to the header data if desired. - * - * Returns CURLcode - */ -CURLcode Curl_add_buffer_send(Curl_send_buffer *in, - struct connectdata *conn, - - /* add the number of sent bytes to this - counter */ - long *bytes_written, - - /* how much of the buffer contains body data */ - size_t included_body_bytes, - int socketindex) - -{ - ssize_t amount; - CURLcode result; - char *ptr; - size_t size; - struct HTTP *http = conn->data->req.protop; - size_t sendsize; - curl_socket_t sockfd; - size_t headersize; - - DEBUGASSERT(socketindex <= SECONDARYSOCKET); - - sockfd = conn->sock[socketindex]; - - /* The looping below is required since we use non-blocking sockets, but due - to the circumstances we will just loop and try again and again etc */ - - ptr = in->buffer; - size = in->size_used; - - headersize = size - included_body_bytes; /* the initial part that isn't body - is header */ - - DEBUGASSERT(size > included_body_bytes); - - result = Curl_convert_to_network(conn->data, ptr, headersize); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) { - /* conversion failed, free memory and return to the caller */ - Curl_add_buffer_free(in); - return result; - } - - if((conn->handler->flags & PROTOPT_SSL || - conn->http_proxy.proxytype == CURLPROXY_HTTPS) - && conn->httpversion != 20) { - /* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk - when we speak HTTPS, as if only a fraction of it is sent now, this data - needs to fit into the normal read-callback buffer later on and that - buffer is using this size. - */ - - sendsize = (size > CURL_MAX_WRITE_SIZE) ? CURL_MAX_WRITE_SIZE : size; - - /* OpenSSL is very picky and we must send the SAME buffer pointer to the - library when we attempt to re-send this buffer. Sending the same data - is not enough, we must use the exact same address. For this reason, we - must copy the data to the uploadbuffer first, since that is the buffer - we will be using if this send is retried later. - */ - memcpy(conn->data->state.uploadbuffer, ptr, sendsize); - ptr = conn->data->state.uploadbuffer; - } - else - sendsize = size; - - result = Curl_write(conn, sockfd, ptr, sendsize, &amount); - - if(!result) { - /* - * Note that we may not send the entire chunk at once, and we have a set - * number of data bytes at the end of the big buffer (out of which we may - * only send away a part). - */ - /* how much of the header that was sent */ - size_t headlen = (size_t)amount>headersize ? headersize : (size_t)amount; - size_t bodylen = amount - headlen; - - if(conn->data->set.verbose) { - /* this data _may_ contain binary stuff */ - Curl_debug(conn->data, CURLINFO_HEADER_OUT, ptr, headlen, conn); - if(bodylen) { - /* there was body data sent beyond the initial header part, pass that - on to the debug callback too */ - Curl_debug(conn->data, CURLINFO_DATA_OUT, - ptr+headlen, bodylen, conn); - } - } - - /* 'amount' can never be a very large value here so typecasting it so a - signed 31 bit value should not cause problems even if ssize_t is - 64bit */ - *bytes_written += (long)amount; - - if(http) { - /* if we sent a piece of the body here, up the byte counter for it - accordingly */ - http->writebytecount += bodylen; - - if((size_t)amount != size) { - /* The whole request could not be sent in one system call. We must - queue it up and send it later when we get the chance. We must not - loop here and wait until it might work again. */ - - size -= amount; - - ptr = in->buffer + amount; - - /* backup the currently set pointers */ - http->backup.fread_func = conn->data->state.fread_func; - http->backup.fread_in = conn->data->state.in; - http->backup.postdata = http->postdata; - http->backup.postsize = http->postsize; - - /* set the new pointers for the request-sending */ - conn->data->state.fread_func = (curl_read_callback)readmoredata; - conn->data->state.in = (void *)conn; - http->postdata = ptr; - http->postsize = (curl_off_t)size; - - http->send_buffer = in; - http->sending = HTTPSEND_REQUEST; - - return CURLE_OK; - } - http->sending = HTTPSEND_BODY; - /* the full buffer was sent, clean up and return */ - } - else { - if((size_t)amount != size) - /* We have no continue-send mechanism now, fail. This can only happen - when this function is used from the CONNECT sending function. We - currently (stupidly) assume that the whole request is always sent - away in the first single chunk. - - This needs FIXing. - */ - return CURLE_SEND_ERROR; - else - Curl_pipeline_leave_write(conn); - } - } - Curl_add_buffer_free(in); - - return result; -} - - -/* - * add_bufferf() add the formatted input to the buffer. - */ -CURLcode Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...) -{ - char *s; - va_list ap; - va_start(ap, fmt); - s = vaprintf(fmt, ap); /* this allocs a new string to append */ - va_end(ap); - - if(s) { - CURLcode result = Curl_add_buffer(in, s, strlen(s)); - free(s); - return result; - } - /* If we failed, we cleanup the whole buffer and return error */ - free(in->buffer); - free(in); - return CURLE_OUT_OF_MEMORY; -} - -/* - * add_buffer() appends a memory chunk to the existing buffer - */ -CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size) -{ - char *new_rb; - size_t new_size; - - if(~size < in->size_used) { - /* If resulting used size of send buffer would wrap size_t, cleanup - the whole buffer and return error. Otherwise the required buffer - size will fit into a single allocatable memory chunk */ - Curl_safefree(in->buffer); - free(in); - return CURLE_OUT_OF_MEMORY; - } - - if(!in->buffer || - ((in->size_used + size) > (in->size_max - 1))) { - - /* If current buffer size isn't enough to hold the result, use a - buffer size that doubles the required size. If this new size - would wrap size_t, then just use the largest possible one */ - - if((size > (size_t)-1 / 2) || (in->size_used > (size_t)-1 / 2) || - (~(size * 2) < (in->size_used * 2))) - new_size = (size_t)-1; - else - new_size = (in->size_used+size) * 2; - - if(in->buffer) - /* we have a buffer, enlarge the existing one */ - new_rb = Curl_saferealloc(in->buffer, new_size); - else - /* create a new buffer */ - new_rb = malloc(new_size); - - if(!new_rb) { - /* If we failed, we cleanup the whole buffer and return error */ - free(in); - return CURLE_OUT_OF_MEMORY; - } - - in->buffer = new_rb; - in->size_max = new_size; - } - memcpy(&in->buffer[in->size_used], inptr, size); - - in->size_used += size; - - return CURLE_OK; -} - -/* end of the add_buffer functions */ -/* ------------------------------------------------------------------------- */ - - - -/* - * Curl_compareheader() - * - * Returns TRUE if 'headerline' contains the 'header' with given 'content'. - * Pass headers WITH the colon. - */ -bool -Curl_compareheader(const char *headerline, /* line to check */ - const char *header, /* header keyword _with_ colon */ - const char *content) /* content string to find */ -{ - /* RFC2616, section 4.2 says: "Each header field consists of a name followed - * by a colon (":") and the field value. Field names are case-insensitive. - * The field value MAY be preceded by any amount of LWS, though a single SP - * is preferred." */ - - size_t hlen = strlen(header); - size_t clen; - size_t len; - const char *start; - const char *end; - - if(!strncasecompare(headerline, header, hlen)) - return FALSE; /* doesn't start with header */ - - /* pass the header */ - start = &headerline[hlen]; - - /* pass all white spaces */ - while(*start && ISSPACE(*start)) - start++; - - /* find the end of the header line */ - end = strchr(start, '\r'); /* lines end with CRLF */ - if(!end) { - /* in case there's a non-standard compliant line here */ - end = strchr(start, '\n'); - - if(!end) - /* hm, there's no line ending here, use the zero byte! */ - end = strchr(start, '\0'); - } - - len = end-start; /* length of the content part of the input line */ - clen = strlen(content); /* length of the word to find */ - - /* find the content string in the rest of the line */ - for(;len>=clen;len--, start++) { - if(strncasecompare(start, content, clen)) - return TRUE; /* match! */ - } - - return FALSE; /* no match */ -} - -/* - * Curl_http_connect() performs HTTP stuff to do at connect-time, called from - * the generic Curl_connect(). - */ -CURLcode Curl_http_connect(struct connectdata *conn, bool *done) -{ - CURLcode result; - - /* We default to persistent connections. We set this already in this connect - function to make the re-use checks properly be able to check this bit. */ - connkeep(conn, "HTTP default"); - - /* the CONNECT procedure might not have been completed */ - result = Curl_proxy_connect(conn, FIRSTSOCKET); - if(result) - return result; - - if(CONNECT_FIRSTSOCKET_PROXY_SSL()) - return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */ - - if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) - /* nothing else to do except wait right now - we're not done here. */ - return CURLE_OK; - - if(conn->given->flags & PROTOPT_SSL) { - /* perform SSL initialization */ - result = https_connecting(conn, done); - if(result) - return result; - } - else - *done = TRUE; - - return CURLE_OK; -} - -/* this returns the socket to wait for in the DO and DOING state for the multi - interface and then we're always _sending_ a request and thus we wait for - the single socket to become writable only */ -static int http_getsock_do(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - /* write mode */ - (void)numsocks; /* unused, we trust it to be at least 1 */ - socks[0] = conn->sock[FIRSTSOCKET]; - return GETSOCK_WRITESOCK(0); -} - -#ifdef USE_SSL -static CURLcode https_connecting(struct connectdata *conn, bool *done) -{ - CURLcode result; - DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL)); - - /* perform SSL initialization for this socket */ - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done); - if(result) - connclose(conn, "Failed HTTPS connection"); - - return result; -} - -static int https_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - if(conn->handler->flags & PROTOPT_SSL) - return Curl_ssl_getsock(conn, socks, numsocks); - return GETSOCK_BLANK; -} -#endif /* USE_SSL */ - -/* - * Curl_http_done() gets called after a single HTTP request has been - * performed. - */ - -CURLcode Curl_http_done(struct connectdata *conn, - CURLcode status, bool premature) -{ - struct Curl_easy *data = conn->data; - struct HTTP *http = data->req.protop; - - Curl_unencode_cleanup(conn); - -#ifdef USE_SPNEGO - if(data->state.proxyneg.state == GSS_AUTHSENT || - data->state.negotiate.state == GSS_AUTHSENT) { - /* add forbid re-use if http-code != 401/407 as a WA only needed for - * 401/407 that signal auth failure (empty) otherwise state will be RECV - * with current code. - * Do not close CONNECT_ONLY connections. */ - if((data->req.httpcode != 401) && (data->req.httpcode != 407) && - !data->set.connect_only) - streamclose(conn, "Negotiate transfer completed"); - Curl_cleanup_negotiate(data); - } -#endif - - /* set the proper values (possibly modified on POST) */ - conn->seek_func = data->set.seek_func; /* restore */ - conn->seek_client = data->set.seek_client; /* restore */ - - if(!http) - return CURLE_OK; - - if(http->send_buffer) { - Curl_add_buffer_free(http->send_buffer); - http->send_buffer = NULL; /* clear the pointer */ - } - - Curl_http2_done(conn, premature); - - if(HTTPREQ_POST_FORM == data->set.httpreq) { - data->req.bytecount = http->readbytecount + http->writebytecount; - - Curl_formclean(&http->sendit); /* Now free that whole lot */ - if(http->form.fp) { - /* a file being uploaded was left opened, close it! */ - fclose(http->form.fp); - http->form.fp = NULL; - } - } - else if(HTTPREQ_PUT == data->set.httpreq) - data->req.bytecount = http->readbytecount + http->writebytecount; - - if(status) - return status; - - if(!premature && /* this check is pointless when DONE is called before the - entire operation is complete */ - !conn->bits.retry && - !data->set.connect_only && - (http->readbytecount + - data->req.headerbytecount - - data->req.deductheadercount) <= 0) { - /* If this connection isn't simply closed to be retried, AND nothing was - read from the HTTP server (that counts), this can't be right so we - return an error here */ - failf(data, "Empty reply from server"); - return CURLE_GOT_NOTHING; - } - - return CURLE_OK; -} - -/* - * Determine if we should use HTTP 1.1 (OR BETTER) for this request. Reasons - * to avoid it include: - * - * - if the user specifically requested HTTP 1.0 - * - if the server we are connected to only supports 1.0 - * - if any server previously contacted to handle this request only supports - * 1.0. - */ -static bool use_http_1_1plus(const struct Curl_easy *data, - const struct connectdata *conn) -{ - if((data->state.httpversion == 10) || (conn->httpversion == 10)) - return FALSE; - if((data->set.httpversion == CURL_HTTP_VERSION_1_0) && - (conn->httpversion <= 10)) - return FALSE; - return ((data->set.httpversion == CURL_HTTP_VERSION_NONE) || - (data->set.httpversion >= CURL_HTTP_VERSION_1_1)); -} - -static const char *get_http_string(const struct Curl_easy *data, - const struct connectdata *conn) -{ -#ifdef USE_NGHTTP2 - if(conn->proto.httpc.h2) - return "2"; -#endif - - if(use_http_1_1plus(data, conn)) - return "1.1"; - - return "1.0"; -} - -/* check and possibly add an Expect: header */ -static CURLcode expect100(struct Curl_easy *data, - struct connectdata *conn, - Curl_send_buffer *req_buffer) -{ - CURLcode result = CURLE_OK; - const char *ptr; - data->state.expect100header = FALSE; /* default to false unless it is set - to TRUE below */ - if(use_http_1_1plus(data, conn) && - (conn->httpversion != 20)) { - /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an - Expect: 100-continue to the headers which actually speeds up post - operations (as there is one packet coming back from the web server) */ - ptr = Curl_checkheaders(conn, "Expect:"); - if(ptr) { - data->state.expect100header = - Curl_compareheader(ptr, "Expect:", "100-continue"); - } - else { - result = Curl_add_bufferf(req_buffer, - "Expect: 100-continue\r\n"); - if(!result) - data->state.expect100header = TRUE; - } - } - - return result; -} - -enum proxy_use { - HEADER_SERVER, /* direct to server */ - HEADER_PROXY, /* regular request to proxy */ - HEADER_CONNECT /* sending CONNECT to a proxy */ -}; - -CURLcode Curl_add_custom_headers(struct connectdata *conn, - bool is_connect, - Curl_send_buffer *req_buffer) -{ - char *ptr; - struct curl_slist *h[2]; - struct curl_slist *headers; - int numlists=1; /* by default */ - struct Curl_easy *data = conn->data; - int i; - - enum proxy_use proxy; - - if(is_connect) - proxy = HEADER_CONNECT; - else - proxy = conn->bits.httpproxy && !conn->bits.tunnel_proxy? - HEADER_PROXY:HEADER_SERVER; - - switch(proxy) { - case HEADER_SERVER: - h[0] = data->set.headers; - break; - case HEADER_PROXY: - h[0] = data->set.headers; - if(data->set.sep_headers) { - h[1] = data->set.proxyheaders; - numlists++; - } - break; - case HEADER_CONNECT: - if(data->set.sep_headers) - h[0] = data->set.proxyheaders; - else - h[0] = data->set.headers; - break; - } - - /* loop through one or two lists */ - for(i=0; i < numlists; i++) { - headers = h[i]; - - while(headers) { - ptr = strchr(headers->data, ':'); - if(ptr) { - /* we require a colon for this to be a true header */ - - ptr++; /* pass the colon */ - while(*ptr && ISSPACE(*ptr)) - ptr++; - - if(*ptr) { - /* only send this if the contents was non-blank */ - - if(conn->allocptr.host && - /* a Host: header was sent already, don't pass on any custom Host: - header as that will produce *two* in the same request! */ - checkprefix("Host:", headers->data)) - ; - else if(data->set.httpreq == HTTPREQ_POST_FORM && - /* this header (extended by formdata.c) is sent later */ - checkprefix("Content-Type:", headers->data)) - ; - else if(conn->bits.authneg && - /* while doing auth neg, don't allow the custom length since - we will force length zero then */ - checkprefix("Content-Length", headers->data)) - ; - else if(conn->allocptr.te && - /* when asking for Transfer-Encoding, don't pass on a custom - Connection: */ - checkprefix("Connection", headers->data)) - ; - else if((conn->httpversion == 20) && - checkprefix("Transfer-Encoding:", headers->data)) - /* HTTP/2 doesn't support chunked requests */ - ; - else { - CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n", - headers->data); - if(result) - return result; - } - } - } - else { - ptr = strchr(headers->data, ';'); - if(ptr) { - - ptr++; /* pass the semicolon */ - while(*ptr && ISSPACE(*ptr)) - ptr++; - - if(*ptr) { - /* this may be used for something else in the future */ - } - else { - if(*(--ptr) == ';') { - CURLcode result; - - /* send no-value custom header if terminated by semicolon */ - *ptr = ':'; - result = Curl_add_bufferf(req_buffer, "%s\r\n", - headers->data); - if(result) - return result; - } - } - } - } - headers = headers->next; - } - } - - return CURLE_OK; -} - -CURLcode Curl_add_timecondition(struct Curl_easy *data, - Curl_send_buffer *req_buffer) -{ - const struct tm *tm; - char *buf = data->state.buffer; - struct tm keeptime; - CURLcode result; - - if(data->set.timecondition == CURL_TIMECOND_NONE) - /* no condition was asked for */ - return CURLE_OK; - - result = Curl_gmtime(data->set.timevalue, &keeptime); - if(result) { - failf(data, "Invalid TIMEVALUE"); - return result; - } - tm = &keeptime; - - /* The If-Modified-Since header family should have their times set in - * GMT as RFC2616 defines: "All HTTP date/time stamps MUST be - * represented in Greenwich Mean Time (GMT), without exception. For the - * purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal - * Time)." (see page 20 of RFC2616). - */ - - /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ - snprintf(buf, BUFSIZE-1, - "%s, %02d %s %4d %02d:%02d:%02d GMT", - Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], - tm->tm_mday, - Curl_month[tm->tm_mon], - tm->tm_year + 1900, - tm->tm_hour, - tm->tm_min, - tm->tm_sec); - - switch(data->set.timecondition) { - default: - break; - case CURL_TIMECOND_IFMODSINCE: - result = Curl_add_bufferf(req_buffer, - "If-Modified-Since: %s\r\n", buf); - break; - case CURL_TIMECOND_IFUNMODSINCE: - result = Curl_add_bufferf(req_buffer, - "If-Unmodified-Since: %s\r\n", buf); - break; - case CURL_TIMECOND_LASTMOD: - result = Curl_add_bufferf(req_buffer, - "Last-Modified: %s\r\n", buf); - break; - } - - return result; -} - -/* - * Curl_http() gets called from the generic multi_do() function when a HTTP - * request is to be performed. This creates and sends a properly constructed - * HTTP request. - */ -CURLcode Curl_http(struct connectdata *conn, bool *done) -{ - struct Curl_easy *data = conn->data; - CURLcode result = CURLE_OK; - struct HTTP *http; - const char *ppath = data->state.path; - bool paste_ftp_userpwd = FALSE; - char ftp_typecode[sizeof("/;type=?")] = ""; - const char *host = conn->host.name; - const char *te = ""; /* transfer-encoding */ - const char *ptr; - const char *request; - Curl_HttpReq httpreq = data->set.httpreq; -#if !defined(CURL_DISABLE_COOKIES) - char *addcookies = NULL; -#endif - curl_off_t included_body = 0; - const char *httpstring; - Curl_send_buffer *req_buffer; - curl_off_t postsize = 0; /* curl_off_t to handle large file sizes */ - int seekerr = CURL_SEEKFUNC_OK; - - /* Always consider the DO phase done after this function call, even if there - may be parts of the request that is not yet sent, since we can deal with - the rest of the request in the PERFORM phase. */ - *done = TRUE; - - if(conn->httpversion < 20) { /* unless the connection is re-used and already - http2 */ - switch(conn->negnpn) { - case CURL_HTTP_VERSION_2: - conn->httpversion = 20; /* we know we're on HTTP/2 now */ - - result = Curl_http2_switched(conn, NULL, 0); - if(result) - return result; - break; - case CURL_HTTP_VERSION_1_1: - /* continue with HTTP/1.1 when explicitly requested */ - break; - default: - /* Check if user wants to use HTTP/2 with clear TCP*/ -#ifdef USE_NGHTTP2 - if(conn->data->set.httpversion == - CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) { - DEBUGF(infof(data, "HTTP/2 over clean TCP\n")); - conn->httpversion = 20; - - result = Curl_http2_switched(conn, NULL, 0); - if(result) - return result; - } -#endif - break; - } - } - else { - /* prepare for a http2 request */ - result = Curl_http2_setup(conn); - if(result) - return result; - } - - http = data->req.protop; - - if(!data->state.this_is_a_follow) { - /* Free to avoid leaking memory on multiple requests*/ - free(data->state.first_host); - - data->state.first_host = strdup(conn->host.name); - if(!data->state.first_host) - return CURLE_OUT_OF_MEMORY; - - data->state.first_remote_port = conn->remote_port; - } - http->writebytecount = http->readbytecount = 0; - - if((conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_FTP)) && - data->set.upload) { - httpreq = HTTPREQ_PUT; - } - - /* Now set the 'request' pointer to the proper request string */ - if(data->set.str[STRING_CUSTOMREQUEST]) - request = data->set.str[STRING_CUSTOMREQUEST]; - else { - if(data->set.opt_no_body) - request = "HEAD"; - else { - DEBUGASSERT((httpreq > HTTPREQ_NONE) && (httpreq < HTTPREQ_LAST)); - switch(httpreq) { - case HTTPREQ_POST: - case HTTPREQ_POST_FORM: - request = "POST"; - break; - case HTTPREQ_PUT: - request = "PUT"; - break; - default: /* this should never happen */ - case HTTPREQ_GET: - request = "GET"; - break; - case HTTPREQ_HEAD: - request = "HEAD"; - break; - } - } - } - - /* The User-Agent string might have been allocated in url.c already, because - it might have been used in the proxy connect, but if we have got a header - with the user-agent string specified, we erase the previously made string - here. */ - if(Curl_checkheaders(conn, "User-Agent:")) { - free(conn->allocptr.uagent); - conn->allocptr.uagent=NULL; - } - - /* setup the authentication headers */ - result = Curl_http_output_auth(conn, request, ppath, FALSE); - if(result) - return result; - - if((data->state.authhost.multi || data->state.authproxy.multi) && - (httpreq != HTTPREQ_GET) && - (httpreq != HTTPREQ_HEAD)) { - /* Auth is required and we are not authenticated yet. Make a PUT or POST - with content-length zero as a "probe". */ - conn->bits.authneg = TRUE; - } - else - conn->bits.authneg = FALSE; - - Curl_safefree(conn->allocptr.ref); - if(data->change.referer && !Curl_checkheaders(conn, "Referer:")) { - conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer); - if(!conn->allocptr.ref) - return CURLE_OUT_OF_MEMORY; - } - else - conn->allocptr.ref = NULL; - -#if !defined(CURL_DISABLE_COOKIES) - if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie:")) - addcookies = data->set.str[STRING_COOKIE]; -#endif - - if(!Curl_checkheaders(conn, "Accept-Encoding:") && - data->set.str[STRING_ENCODING]) { - Curl_safefree(conn->allocptr.accept_encoding); - conn->allocptr.accept_encoding = - aprintf("Accept-Encoding: %s\r\n", data->set.str[STRING_ENCODING]); - if(!conn->allocptr.accept_encoding) - return CURLE_OUT_OF_MEMORY; - } - else { - Curl_safefree(conn->allocptr.accept_encoding); - conn->allocptr.accept_encoding = NULL; - } - -#ifdef HAVE_LIBZ - /* we only consider transfer-encoding magic if libz support is built-in */ - - if(!Curl_checkheaders(conn, "TE:") && - data->set.http_transfer_encoding) { - /* When we are to insert a TE: header in the request, we must also insert - TE in a Connection: header, so we need to merge the custom provided - Connection: header and prevent the original to get sent. Note that if - the user has inserted his/hers own TE: header we don't do this magic - but then assume that the user will handle it all! */ - char *cptr = Curl_checkheaders(conn, "Connection:"); -#define TE_HEADER "TE: gzip\r\n" - - Curl_safefree(conn->allocptr.te); - - /* Create the (updated) Connection: header */ - conn->allocptr.te = cptr? aprintf("%s, TE\r\n" TE_HEADER, cptr): - strdup("Connection: TE\r\n" TE_HEADER); - - if(!conn->allocptr.te) - return CURLE_OUT_OF_MEMORY; - } -#endif - - ptr = Curl_checkheaders(conn, "Transfer-Encoding:"); - if(ptr) { - /* Some kind of TE is requested, check if 'chunked' is chosen */ - data->req.upload_chunky = - Curl_compareheader(ptr, "Transfer-Encoding:", "chunked"); - } - else { - if((conn->handler->protocol&PROTO_FAMILY_HTTP) && - data->set.upload && - (data->state.infilesize == -1)) { - if(conn->bits.authneg) - /* don't enable chunked during auth neg */ - ; - else if(use_http_1_1plus(data, conn)) { - /* HTTP, upload, unknown file size and not HTTP 1.0 */ - data->req.upload_chunky = TRUE; - } - else { - failf(data, "Chunky upload is not supported by HTTP 1.0"); - return CURLE_UPLOAD_FAILED; - } - } - else { - /* else, no chunky upload */ - data->req.upload_chunky = FALSE; - } - - if(data->req.upload_chunky) - te = "Transfer-Encoding: chunked\r\n"; - } - - Curl_safefree(conn->allocptr.host); - - ptr = Curl_checkheaders(conn, "Host:"); - if(ptr && (!data->state.this_is_a_follow || - strcasecompare(data->state.first_host, conn->host.name))) { -#if !defined(CURL_DISABLE_COOKIES) - /* If we have a given custom Host: header, we extract the host name in - order to possibly use it for cookie reasons later on. We only allow the - custom Host: header if this is NOT a redirect, as setting Host: in the - redirected request is being out on thin ice. Except if the host name - is the same as the first one! */ - char *cookiehost = Curl_copy_header_value(ptr); - if(!cookiehost) - return CURLE_OUT_OF_MEMORY; - if(!*cookiehost) - /* ignore empty data */ - free(cookiehost); - else { - /* If the host begins with '[', we start searching for the port after - the bracket has been closed */ - int startsearch = 0; - if(*cookiehost == '[') { - char *closingbracket; - /* since the 'cookiehost' is an allocated memory area that will be - freed later we cannot simply increment the pointer */ - memmove(cookiehost, cookiehost + 1, strlen(cookiehost) - 1); - closingbracket = strchr(cookiehost, ']'); - if(closingbracket) - *closingbracket = 0; - } - else { - char *colon = strchr(cookiehost + startsearch, ':'); - if(colon) - *colon = 0; /* The host must not include an embedded port number */ - } - Curl_safefree(conn->allocptr.cookiehost); - conn->allocptr.cookiehost = cookiehost; - } -#endif - - if(strcmp("Host:", ptr)) { - conn->allocptr.host = aprintf("%s\r\n", ptr); - if(!conn->allocptr.host) - return CURLE_OUT_OF_MEMORY; - } - else - /* when clearing the header */ - conn->allocptr.host = NULL; - } - else { - /* When building Host: headers, we must put the host name within - [brackets] if the host name is a plain IPv6-address. RFC2732-style. */ - - if(((conn->given->protocol&CURLPROTO_HTTPS) && - (conn->remote_port == PORT_HTTPS)) || - ((conn->given->protocol&CURLPROTO_HTTP) && - (conn->remote_port == PORT_HTTP)) ) - /* if(HTTPS on port 443) OR (HTTP on port 80) then don't include - the port number in the host string */ - conn->allocptr.host = aprintf("Host: %s%s%s\r\n", - conn->bits.ipv6_ip?"[":"", - host, - conn->bits.ipv6_ip?"]":""); - else - conn->allocptr.host = aprintf("Host: %s%s%s:%hu\r\n", - conn->bits.ipv6_ip?"[":"", - host, - conn->bits.ipv6_ip?"]":"", - conn->remote_port); - - if(!conn->allocptr.host) - /* without Host: we can't make a nice request */ - return CURLE_OUT_OF_MEMORY; - } - -#ifndef CURL_DISABLE_PROXY - if(conn->bits.httpproxy && !conn->bits.tunnel_proxy) { - /* Using a proxy but does not tunnel through it */ - - /* The path sent to the proxy is in fact the entire URL. But if the remote - host is a IDN-name, we must make sure that the request we produce only - uses the encoded host name! */ - if(conn->host.dispname != conn->host.name) { - char *url = data->change.url; - ptr = strstr(url, conn->host.dispname); - if(ptr) { - /* This is where the display name starts in the URL, now replace this - part with the encoded name. TODO: This method of replacing the host - name is rather crude as I believe there's a slight risk that the - user has entered a user name or password that contain the host name - string. */ - size_t currlen = strlen(conn->host.dispname); - size_t newlen = strlen(conn->host.name); - size_t urllen = strlen(url); - - char *newurl; - - newurl = malloc(urllen + newlen - currlen + 1); - if(newurl) { - /* copy the part before the host name */ - memcpy(newurl, url, ptr - url); - /* append the new host name instead of the old */ - memcpy(newurl + (ptr - url), conn->host.name, newlen); - /* append the piece after the host name */ - memcpy(newurl + newlen + (ptr - url), - ptr + currlen, /* copy the trailing zero byte too */ - urllen - (ptr-url) - currlen + 1); - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - data->change.url = newurl; - data->change.url_alloc = TRUE; - } - else - return CURLE_OUT_OF_MEMORY; - } - } - ppath = data->change.url; - if(checkprefix("ftp://", ppath)) { - if(data->set.proxy_transfer_mode) { - /* when doing ftp, append ;type= if not present */ - char *type = strstr(ppath, ";type="); - if(type && type[6] && type[7] == 0) { - switch(Curl_raw_toupper(type[6])) { - case 'A': - case 'D': - case 'I': - break; - default: - type = NULL; - } - } - if(!type) { - char *p = ftp_typecode; - /* avoid sending invalid URLs like ftp://example.com;type=i if the - * user specified ftp://example.com without the slash */ - if(!*data->state.path && ppath[strlen(ppath) - 1] != '/') { - *p++ = '/'; - } - snprintf(p, sizeof(ftp_typecode) - 1, ";type=%c", - data->set.prefer_ascii ? 'a' : 'i'); - } - } - if(conn->bits.user_passwd && !conn->bits.userpwd_in_url) - paste_ftp_userpwd = TRUE; - } - } -#endif /* CURL_DISABLE_PROXY */ - - if(HTTPREQ_POST_FORM == httpreq) { - /* we must build the whole post sequence first, so that we have a size of - the whole transfer before we start to send it */ - result = Curl_getformdata(data, &http->sendit, data->set.httppost, - Curl_checkheaders(conn, "Content-Type:"), - &http->postsize); - if(result) - return result; - } - - http->p_accept = Curl_checkheaders(conn, "Accept:")?NULL:"Accept: */*\r\n"; - - if(( (HTTPREQ_POST == httpreq) || - (HTTPREQ_POST_FORM == httpreq) || - (HTTPREQ_PUT == httpreq) ) && - data->state.resume_from) { - /********************************************************************** - * Resuming upload in HTTP means that we PUT or POST and that we have - * got a resume_from value set. The resume value has already created - * a Range: header that will be passed along. We need to "fast forward" - * the file the given number of bytes and decrease the assume upload - * file size before we continue this venture in the dark lands of HTTP. - *********************************************************************/ - - if(data->state.resume_from < 0) { - /* - * This is meant to get the size of the present remote-file by itself. - * We don't support this now. Bail out! - */ - data->state.resume_from = 0; - } - - if(data->state.resume_from && !data->state.this_is_a_follow) { - /* do we still game? */ - - /* Now, let's read off the proper amount of bytes from the - input. */ - if(conn->seek_func) { - seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, - SEEK_SET); - } - - if(seekerr != CURL_SEEKFUNC_OK) { - if(seekerr != CURL_SEEKFUNC_CANTSEEK) { - failf(data, "Could not seek stream"); - return CURLE_READ_ERROR; - } - /* when seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ - else { - curl_off_t passed=0; - do { - size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); - - size_t actuallyread = - data->state.fread_func(data->state.buffer, 1, readthisamountnow, - data->state.in); - - passed += actuallyread; - if((actuallyread == 0) || (actuallyread > readthisamountnow)) { - /* this checks for greater-than only to make sure that the - CURL_READFUNC_ABORT return code still aborts */ - failf(data, "Could only read %" CURL_FORMAT_CURL_OFF_T - " bytes from the input", passed); - return CURLE_READ_ERROR; - } - } while(passed < data->state.resume_from); - } - } - - /* now, decrease the size of the read */ - if(data->state.infilesize>0) { - data->state.infilesize -= data->state.resume_from; - - if(data->state.infilesize <= 0) { - failf(data, "File already completely uploaded"); - return CURLE_PARTIAL_FILE; - } - } - /* we've passed, proceed as normal */ - } - } - if(data->state.use_range) { - /* - * A range is selected. We use different headers whether we're downloading - * or uploading and we always let customized headers override our internal - * ones if any such are specified. - */ - if(((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) && - !Curl_checkheaders(conn, "Range:")) { - /* if a line like this was already allocated, free the previous one */ - free(conn->allocptr.rangeline); - conn->allocptr.rangeline = aprintf("Range: bytes=%s\r\n", - data->state.range); - } - else if((httpreq != HTTPREQ_GET) && - !Curl_checkheaders(conn, "Content-Range:")) { - - /* if a line like this was already allocated, free the previous one */ - free(conn->allocptr.rangeline); - - if(data->set.set_resume_from < 0) { - /* Upload resume was asked for, but we don't know the size of the - remote part so we tell the server (and act accordingly) that we - upload the whole file (again) */ - conn->allocptr.rangeline = - aprintf("Content-Range: bytes 0-%" CURL_FORMAT_CURL_OFF_T - "/%" CURL_FORMAT_CURL_OFF_T "\r\n", - data->state.infilesize - 1, data->state.infilesize); - - } - else if(data->state.resume_from) { - /* This is because "resume" was selected */ - curl_off_t total_expected_size= - data->state.resume_from + data->state.infilesize; - conn->allocptr.rangeline = - aprintf("Content-Range: bytes %s%" CURL_FORMAT_CURL_OFF_T - "/%" CURL_FORMAT_CURL_OFF_T "\r\n", - data->state.range, total_expected_size-1, - total_expected_size); - } - else { - /* Range was selected and then we just pass the incoming range and - append total size */ - conn->allocptr.rangeline = - aprintf("Content-Range: bytes %s/%" CURL_FORMAT_CURL_OFF_T "\r\n", - data->state.range, data->state.infilesize); - } - if(!conn->allocptr.rangeline) - return CURLE_OUT_OF_MEMORY; - } - } - - httpstring = get_http_string(data, conn); - - /* initialize a dynamic send-buffer */ - req_buffer = Curl_add_buffer_init(); - - if(!req_buffer) - return CURLE_OUT_OF_MEMORY; - - /* add the main request stuff */ - /* GET/HEAD/POST/PUT */ - result = Curl_add_bufferf(req_buffer, "%s ", request); - if(result) - return result; - - /* url */ - if(paste_ftp_userpwd) - result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s", - conn->user, conn->passwd, - ppath + sizeof("ftp://") - 1); - else - result = Curl_add_buffer(req_buffer, ppath, strlen(ppath)); - if(result) - return result; - - result = - Curl_add_bufferf(req_buffer, - "%s" /* ftp typecode (;type=x) */ - " HTTP/%s\r\n" /* HTTP version */ - "%s" /* host */ - "%s" /* proxyuserpwd */ - "%s" /* userpwd */ - "%s" /* range */ - "%s" /* user agent */ - "%s" /* accept */ - "%s" /* TE: */ - "%s" /* accept-encoding */ - "%s" /* referer */ - "%s" /* Proxy-Connection */ - "%s",/* transfer-encoding */ - - ftp_typecode, - httpstring, - (conn->allocptr.host?conn->allocptr.host:""), - conn->allocptr.proxyuserpwd? - conn->allocptr.proxyuserpwd:"", - conn->allocptr.userpwd?conn->allocptr.userpwd:"", - (data->state.use_range && conn->allocptr.rangeline)? - conn->allocptr.rangeline:"", - (data->set.str[STRING_USERAGENT] && - *data->set.str[STRING_USERAGENT] && - conn->allocptr.uagent)? - conn->allocptr.uagent:"", - http->p_accept?http->p_accept:"", - conn->allocptr.te?conn->allocptr.te:"", - (data->set.str[STRING_ENCODING] && - *data->set.str[STRING_ENCODING] && - conn->allocptr.accept_encoding)? - conn->allocptr.accept_encoding:"", - (data->change.referer && conn->allocptr.ref)? - conn->allocptr.ref:"" /* Referer: */, - (conn->bits.httpproxy && - !conn->bits.tunnel_proxy && - !Curl_checkProxyheaders(conn, "Proxy-Connection:"))? - "Proxy-Connection: Keep-Alive\r\n":"", - te - ); - - /* clear userpwd to avoid re-using credentials from re-used connections */ - Curl_safefree(conn->allocptr.userpwd); - - /* - * Free proxyuserpwd for Negotiate/NTLM. Cannot reuse as it is associated - * with the connection and shouldn't be repeated over it either. - */ - switch(data->state.authproxy.picked) { - case CURLAUTH_NEGOTIATE: - case CURLAUTH_NTLM: - case CURLAUTH_NTLM_WB: - Curl_safefree(conn->allocptr.proxyuserpwd); - break; - } - - if(result) - return result; - - if(!(conn->handler->flags&PROTOPT_SSL) && - conn->httpversion != 20 && - (data->set.httpversion == CURL_HTTP_VERSION_2)) { - /* append HTTP2 upgrade magic stuff to the HTTP request if it isn't done - over SSL */ - result = Curl_http2_request_upgrade(req_buffer, conn); - if(result) - return result; - } - -#if !defined(CURL_DISABLE_COOKIES) - if(data->cookies || addcookies) { - struct Cookie *co=NULL; /* no cookies from start */ - int count=0; - - if(data->cookies) { - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - co = Curl_cookie_getlist(data->cookies, - conn->allocptr.cookiehost? - conn->allocptr.cookiehost:host, - data->state.path, - (conn->handler->protocol&CURLPROTO_HTTPS)? - TRUE:FALSE); - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } - if(co) { - struct Cookie *store=co; - /* now loop through all cookies that matched */ - while(co) { - if(co->value) { - if(0 == count) { - result = Curl_add_bufferf(req_buffer, "Cookie: "); - if(result) - break; - } - result = Curl_add_bufferf(req_buffer, - "%s%s=%s", count?"; ":"", - co->name, co->value); - if(result) - break; - count++; - } - co = co->next; /* next cookie please */ - } - Curl_cookie_freelist(store); - } - if(addcookies && !result) { - if(!count) - result = Curl_add_bufferf(req_buffer, "Cookie: "); - if(!result) { - result = Curl_add_bufferf(req_buffer, "%s%s", count?"; ":"", - addcookies); - count++; - } - } - if(count && !result) - result = Curl_add_buffer(req_buffer, "\r\n", 2); - - if(result) - return result; - } -#endif - - result = Curl_add_timecondition(data, req_buffer); - if(result) - return result; - - result = Curl_add_custom_headers(conn, FALSE, req_buffer); - if(result) - return result; - - http->postdata = NULL; /* nothing to post at this point */ - Curl_pgrsSetUploadSize(data, -1); /* upload size is unknown atm */ - - /* If 'authdone' is FALSE, we must not set the write socket index to the - Curl_transfer() call below, as we're not ready to actually upload any - data yet. */ - - switch(httpreq) { - - case HTTPREQ_POST_FORM: - if(!http->sendit || conn->bits.authneg) { - /* nothing to post! */ - result = Curl_add_bufferf(req_buffer, "Content-Length: 0\r\n\r\n"); - if(result) - return result; - - result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); - if(result) - failf(data, "Failed sending POST request"); - else - /* setup variables for the upcoming transfer */ - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, - -1, NULL); - break; - } - - if(Curl_FormInit(&http->form, http->sendit)) { - failf(data, "Internal HTTP POST error!"); - return CURLE_HTTP_POST_ERROR; - } - - /* Get the currently set callback function pointer and store that in the - form struct since we might want the actual user-provided callback later - on. The data->set.fread_func pointer itself will be changed for the - multipart case to the function that returns a multipart formatted - stream. */ - http->form.fread_func = data->state.fread_func; - - /* Set the read function to read from the generated form data */ - data->state.fread_func = (curl_read_callback)Curl_FormReader; - data->state.in = &http->form; - - http->sending = HTTPSEND_BODY; - - if(!data->req.upload_chunky && - !Curl_checkheaders(conn, "Content-Length:")) { - /* only add Content-Length if not uploading chunked */ - result = Curl_add_bufferf(req_buffer, - "Content-Length: %" CURL_FORMAT_CURL_OFF_T - "\r\n", http->postsize); - if(result) - return result; - } - - result = expect100(data, conn, req_buffer); - if(result) - return result; - - { - - /* Get Content-Type: line from Curl_formpostheader. - */ - char *contentType; - size_t linelength=0; - contentType = Curl_formpostheader((void *)&http->form, - &linelength); - if(!contentType) { - failf(data, "Could not get Content-Type header line!"); - return CURLE_HTTP_POST_ERROR; - } - - result = Curl_add_buffer(req_buffer, contentType, linelength); - if(result) - return result; - } - - /* make the request end in a true CRLF */ - result = Curl_add_buffer(req_buffer, "\r\n", 2); - if(result) - return result; - - /* set upload size to the progress meter */ - Curl_pgrsSetUploadSize(data, http->postsize); - - /* fire away the whole request to the server */ - result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); - if(result) - failf(data, "Failed sending POST request"); - else - /* setup variables for the upcoming transfer */ - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, FIRSTSOCKET, - &http->writebytecount); - - if(result) { - Curl_formclean(&http->sendit); /* free that whole lot */ - return result; - } - - /* convert the form data */ - result = Curl_convert_form(data, http->sendit); - if(result) { - Curl_formclean(&http->sendit); /* free that whole lot */ - return result; - } - - break; - - case HTTPREQ_PUT: /* Let's PUT the data to the server! */ - - if(conn->bits.authneg) - postsize = 0; - else - postsize = data->state.infilesize; - - if((postsize != -1) && !data->req.upload_chunky && - (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length:"))) { - /* only add Content-Length if not uploading chunked */ - result = Curl_add_bufferf(req_buffer, - "Content-Length: %" CURL_FORMAT_CURL_OFF_T - "\r\n", postsize); - if(result) - return result; - } - - if(postsize != 0) { - result = expect100(data, conn, req_buffer); - if(result) - return result; - } - - result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers */ - if(result) - return result; - - /* set the upload size to the progress meter */ - Curl_pgrsSetUploadSize(data, postsize); - - /* this sends the buffer and frees all the buffer resources */ - result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); - if(result) - failf(data, "Failed sending PUT request"); - else - /* prepare for transfer */ - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, postsize?FIRSTSOCKET:-1, - postsize?&http->writebytecount:NULL); - if(result) - return result; - break; - - case HTTPREQ_POST: - /* this is the simple POST, using x-www-form-urlencoded style */ - - if(conn->bits.authneg) - postsize = 0; - else { - /* figure out the size of the postfields */ - postsize = (data->state.infilesize != -1)? - data->state.infilesize: - (data->set.postfields? (curl_off_t)strlen(data->set.postfields):-1); - } - - /* We only set Content-Length and allow a custom Content-Length if - we don't upload data chunked, as RFC2616 forbids us to set both - kinds of headers (Transfer-Encoding: chunked and Content-Length) */ - if((postsize != -1) && !data->req.upload_chunky && - (conn->bits.authneg || !Curl_checkheaders(conn, "Content-Length:"))) { - /* we allow replacing this header if not during auth negotiation, - although it isn't very wise to actually set your own */ - result = Curl_add_bufferf(req_buffer, - "Content-Length: %" CURL_FORMAT_CURL_OFF_T - "\r\n", postsize); - if(result) - return result; - } - - if(!Curl_checkheaders(conn, "Content-Type:")) { - result = Curl_add_bufferf(req_buffer, - "Content-Type: application/" - "x-www-form-urlencoded\r\n"); - if(result) - return result; - } - - /* For really small posts we don't use Expect: headers at all, and for - the somewhat bigger ones we allow the app to disable it. Just make - sure that the expect100header is always set to the preferred value - here. */ - ptr = Curl_checkheaders(conn, "Expect:"); - if(ptr) { - data->state.expect100header = - Curl_compareheader(ptr, "Expect:", "100-continue"); - } - else if(postsize > TINY_INITIAL_POST_SIZE || postsize < 0) { - result = expect100(data, conn, req_buffer); - if(result) - return result; - } - else - data->state.expect100header = FALSE; - - if(data->set.postfields) { - - /* In HTTP2, we send request body in DATA frame regardless of - its size. */ - if(conn->httpversion != 20 && - !data->state.expect100header && - (postsize < MAX_INITIAL_POST_SIZE)) { - /* if we don't use expect: 100 AND - postsize is less than MAX_INITIAL_POST_SIZE - - then append the post data to the HTTP request header. This limit - is no magic limit but only set to prevent really huge POSTs to - get the data duplicated with malloc() and family. */ - - result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers! */ - if(result) - return result; - - if(!data->req.upload_chunky) { - /* We're not sending it 'chunked', append it to the request - already now to reduce the number if send() calls */ - result = Curl_add_buffer(req_buffer, data->set.postfields, - (size_t)postsize); - included_body = postsize; - } - else { - if(postsize) { - /* Append the POST data chunky-style */ - result = Curl_add_bufferf(req_buffer, "%x\r\n", (int)postsize); - if(!result) { - result = Curl_add_buffer(req_buffer, data->set.postfields, - (size_t)postsize); - if(!result) - result = Curl_add_buffer(req_buffer, "\r\n", 2); - included_body = postsize + 2; - } - } - if(!result) - result = Curl_add_buffer(req_buffer, "\x30\x0d\x0a\x0d\x0a", 5); - /* 0 CR LF CR LF */ - included_body += 5; - } - if(result) - return result; - /* Make sure the progress information is accurate */ - Curl_pgrsSetUploadSize(data, postsize); - } - else { - /* A huge POST coming up, do data separate from the request */ - http->postsize = postsize; - http->postdata = data->set.postfields; - - http->sending = HTTPSEND_BODY; - - data->state.fread_func = (curl_read_callback)readmoredata; - data->state.in = (void *)conn; - - /* set the upload size to the progress meter */ - Curl_pgrsSetUploadSize(data, http->postsize); - - result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers! */ - if(result) - return result; - } - } - else { - result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers! */ - if(result) - return result; - - if(data->req.upload_chunky && conn->bits.authneg) { - /* Chunky upload is selected and we're negotiating auth still, send - end-of-data only */ - result = Curl_add_buffer(req_buffer, - "\x30\x0d\x0a\x0d\x0a", 5); - /* 0 CR LF CR LF */ - if(result) - return result; - } - - else if(data->state.infilesize) { - /* set the upload size to the progress meter */ - Curl_pgrsSetUploadSize(data, postsize?postsize:-1); - - /* set the pointer to mark that we will send the post body using the - read callback, but only if we're not in authenticate - negotiation */ - if(!conn->bits.authneg) { - http->postdata = (char *)&http->postdata; - http->postsize = postsize; - } - } - } - /* issue the request */ - result = Curl_add_buffer_send(req_buffer, conn, &data->info.request_size, - (size_t)included_body, FIRSTSOCKET); - - if(result) - failf(data, "Failed sending HTTP POST request"); - else - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, http->postdata?FIRSTSOCKET:-1, - http->postdata?&http->writebytecount:NULL); - break; - - default: - result = Curl_add_buffer(req_buffer, "\r\n", 2); - if(result) - return result; - - /* issue the request */ - result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); - - if(result) - failf(data, "Failed sending HTTP request"); - else - /* HTTP GET/HEAD download: */ - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, - http->postdata?FIRSTSOCKET:-1, - http->postdata?&http->writebytecount:NULL); - } - if(result) - return result; - - if(http->writebytecount) { - /* if a request-body has been sent off, we make sure this progress is noted - properly */ - Curl_pgrsSetUploadCounter(data, http->writebytecount); - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - - if(http->writebytecount >= postsize) { - /* already sent the entire request body, mark the "upload" as - complete */ - infof(data, "upload completely sent off: %" CURL_FORMAT_CURL_OFF_T - " out of %" CURL_FORMAT_CURL_OFF_T " bytes\n", - http->writebytecount, postsize); - data->req.upload_done = TRUE; - data->req.keepon &= ~KEEP_SEND; /* we're done writing */ - data->req.exp100 = EXP100_SEND_DATA; /* already sent */ - } - } - - if((conn->httpversion == 20) && data->req.upload_chunky) - /* upload_chunky was set above to set up the request in a chunky fashion, - but is disabled here again to avoid that the chunked encoded version is - actually used when sending the request body over h2 */ - data->req.upload_chunky = FALSE; - return result; -} - -/* - * checkhttpprefix() - * - * Returns TRUE if member of the list matches prefix of string - */ -static bool -checkhttpprefix(struct Curl_easy *data, - const char *s) -{ - struct curl_slist *head = data->set.http200aliases; - bool rc = FALSE; -#ifdef CURL_DOES_CONVERSIONS - /* convert from the network encoding using a scratch area */ - char *scratch = strdup(s); - if(NULL == scratch) { - failf(data, "Failed to allocate memory for conversion!"); - return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ - } - if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) { - /* Curl_convert_from_network calls failf if unsuccessful */ - free(scratch); - return FALSE; /* can't return CURLE_foobar so return FALSE */ - } - s = scratch; -#endif /* CURL_DOES_CONVERSIONS */ - - while(head) { - if(checkprefix(head->data, s)) { - rc = TRUE; - break; - } - head = head->next; - } - - if(!rc && (checkprefix("HTTP/", s))) - rc = TRUE; - -#ifdef CURL_DOES_CONVERSIONS - free(scratch); -#endif /* CURL_DOES_CONVERSIONS */ - return rc; -} - -#ifndef CURL_DISABLE_RTSP -static bool -checkrtspprefix(struct Curl_easy *data, - const char *s) -{ - -#ifdef CURL_DOES_CONVERSIONS - /* convert from the network encoding using a scratch area */ - char *scratch = strdup(s); - if(NULL == scratch) { - failf(data, "Failed to allocate memory for conversion!"); - return FALSE; /* can't return CURLE_OUT_OF_MEMORY so return FALSE */ - } - if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) { - /* Curl_convert_from_network calls failf if unsuccessful */ - free(scratch); - return FALSE; /* can't return CURLE_foobar so return FALSE */ - } - s = scratch; -#else - (void)data; /* unused */ -#endif /* CURL_DOES_CONVERSIONS */ - if(checkprefix("RTSP/", s)) - return TRUE; - else - return FALSE; -} -#endif /* CURL_DISABLE_RTSP */ - -static bool -checkprotoprefix(struct Curl_easy *data, struct connectdata *conn, - const char *s) -{ -#ifndef CURL_DISABLE_RTSP - if(conn->handler->protocol & CURLPROTO_RTSP) - return checkrtspprefix(data, s); -#else - (void)conn; -#endif /* CURL_DISABLE_RTSP */ - - return checkhttpprefix(data, s); -} - -/* - * header_append() copies a chunk of data to the end of the already received - * header. We make sure that the full string fit in the allocated header - * buffer, or else we enlarge it. - */ -static CURLcode header_append(struct Curl_easy *data, - struct SingleRequest *k, - size_t length) -{ - if(k->hbuflen + length >= data->state.headersize) { - /* We enlarge the header buffer as it is too small */ - char *newbuff; - size_t hbufp_index; - size_t newsize; - - if(k->hbuflen + length > CURL_MAX_HTTP_HEADER) { - /* The reason to have a max limit for this is to avoid the risk of a bad - server feeding libcurl with a never-ending header that will cause - reallocs infinitely */ - failf(data, "Avoided giant realloc for header (max is %d)!", - CURL_MAX_HTTP_HEADER); - return CURLE_OUT_OF_MEMORY; - } - - newsize=CURLMAX((k->hbuflen+ length)*3/2, data->state.headersize*2); - hbufp_index = k->hbufp - data->state.headerbuff; - newbuff = realloc(data->state.headerbuff, newsize); - if(!newbuff) { - failf(data, "Failed to alloc memory for big header!"); - return CURLE_OUT_OF_MEMORY; - } - data->state.headersize=newsize; - data->state.headerbuff = newbuff; - k->hbufp = data->state.headerbuff + hbufp_index; - } - memcpy(k->hbufp, k->str_start, length); - k->hbufp += length; - k->hbuflen += length; - *k->hbufp = 0; - - return CURLE_OK; -} - -static void print_http_error(struct Curl_easy *data) -{ - struct SingleRequest *k = &data->req; - char *beg = k->p; - - /* make sure that data->req.p points to the HTTP status line */ - if(!strncmp(beg, "HTTP", 4)) { - - /* skip to HTTP status code */ - beg = strchr(beg, ' '); - if(beg && *++beg) { - - /* find trailing CR */ - char end_char = '\r'; - char *end = strchr(beg, end_char); - if(!end) { - /* try to find LF (workaround for non-compliant HTTP servers) */ - end_char = '\n'; - end = strchr(beg, end_char); - } - - if(end) { - /* temporarily replace CR or LF by NUL and print the error message */ - *end = '\0'; - failf(data, "The requested URL returned error: %s", beg); - - /* restore the previously replaced CR or LF */ - *end = end_char; - return; - } - } - } - - /* fall-back to printing the HTTP status code only */ - failf(data, "The requested URL returned error: %d", k->httpcode); -} - -/* - * Read any HTTP header lines from the server and pass them to the client app. - */ -CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, - struct connectdata *conn, - ssize_t *nread, - bool *stop_reading) -{ - CURLcode result; - struct SingleRequest *k = &data->req; - - /* header line within buffer loop */ - do { - size_t rest_length; - size_t full_length; - int writetype; - - /* str_start is start of line within buf */ - k->str_start = k->str; - - /* data is in network encoding so use 0x0a instead of '\n' */ - k->end_ptr = memchr(k->str_start, 0x0a, *nread); - - if(!k->end_ptr) { - /* Not a complete header line within buffer, append the data to - the end of the headerbuff. */ - result = header_append(data, k, *nread); - if(result) - return result; - - if(!k->headerline && (k->hbuflen>5)) { - /* make a first check that this looks like a protocol header */ - if(!checkprotoprefix(data, conn, data->state.headerbuff)) { - /* this is not the beginning of a protocol first header line */ - k->header = FALSE; - k->badheader = HEADER_ALLBAD; - break; - } - } - - break; /* read more and try again */ - } - - /* decrease the size of the remaining (supposed) header line */ - rest_length = (k->end_ptr - k->str)+1; - *nread -= (ssize_t)rest_length; - - k->str = k->end_ptr + 1; /* move past new line */ - - full_length = k->str - k->str_start; - - result = header_append(data, k, full_length); - if(result) - return result; - - k->end_ptr = k->hbufp; - k->p = data->state.headerbuff; - - /**** - * We now have a FULL header line that p points to - *****/ - - if(!k->headerline) { - /* the first read header */ - if((k->hbuflen>5) && - !checkprotoprefix(data, conn, data->state.headerbuff)) { - /* this is not the beginning of a protocol first header line */ - k->header = FALSE; - if(*nread) - /* since there's more, this is a partial bad header */ - k->badheader = HEADER_PARTHEADER; - else { - /* this was all we read so it's all a bad header */ - k->badheader = HEADER_ALLBAD; - *nread = (ssize_t)rest_length; - } - break; - } - } - - /* headers are in network encoding so - use 0x0a and 0x0d instead of '\n' and '\r' */ - if((0x0a == *k->p) || (0x0d == *k->p)) { - size_t headerlen; - /* Zero-length header line means end of headers! */ - -#ifdef CURL_DOES_CONVERSIONS - if(0x0d == *k->p) { - *k->p = '\r'; /* replace with CR in host encoding */ - k->p++; /* pass the CR byte */ - } - if(0x0a == *k->p) { - *k->p = '\n'; /* replace with LF in host encoding */ - k->p++; /* pass the LF byte */ - } -#else - if('\r' == *k->p) - k->p++; /* pass the \r byte */ - if('\n' == *k->p) - k->p++; /* pass the \n byte */ -#endif /* CURL_DOES_CONVERSIONS */ - - if(100 <= k->httpcode && 199 >= k->httpcode) { - /* "A user agent MAY ignore unexpected 1xx status responses." */ - switch(k->httpcode) { - case 100: - /* - * We have made a HTTP PUT or POST and this is 1.1-lingo - * that tells us that the server is OK with this and ready - * to receive the data. - * However, we'll get more headers now so we must get - * back into the header-parsing state! - */ - k->header = TRUE; - k->headerline = 0; /* restart the header line counter */ - - /* if we did wait for this do enable write now! */ - if(k->exp100 > EXP100_SEND_DATA) { - k->exp100 = EXP100_SEND_DATA; - k->keepon |= KEEP_SEND; - } - break; - case 101: - /* Switching Protocols */ - if(k->upgr101 == UPGR101_REQUESTED) { - /* Switching to HTTP/2 */ - infof(data, "Received 101\n"); - k->upgr101 = UPGR101_RECEIVED; - - /* we'll get more headers (HTTP/2 response) */ - k->header = TRUE; - k->headerline = 0; /* restart the header line counter */ - - /* switch to http2 now. The bytes after response headers - are also processed here, otherwise they are lost. */ - result = Curl_http2_switched(conn, k->str, *nread); - if(result) - return result; - *nread = 0; - } - else { - /* Switching to another protocol (e.g. WebSocket) */ - k->header = FALSE; /* no more header to parse! */ - } - break; - default: - /* the status code 1xx indicates a provisional response, so - we'll get another set of headers */ - k->header = TRUE; - k->headerline = 0; /* restart the header line counter */ - break; - } - } - else { - k->header = FALSE; /* no more header to parse! */ - - if((k->size == -1) && !k->chunk && !conn->bits.close && - (conn->httpversion == 11) && - !(conn->handler->protocol & CURLPROTO_RTSP) && - data->set.httpreq != HTTPREQ_HEAD) { - /* On HTTP 1.1, when connection is not to get closed, but no - Content-Length nor Content-Encoding chunked have been - received, according to RFC2616 section 4.4 point 5, we - assume that the server will close the connection to - signal the end of the document. */ - infof(data, "no chunk, no close, no size. Assume close to " - "signal end\n"); - streamclose(conn, "HTTP: No end-of-message indicator"); - } - } - - /* At this point we have some idea about the fate of the connection. - If we are closing the connection it may result auth failure. */ -#if defined(USE_NTLM) - if(conn->bits.close && - (((data->req.httpcode == 401) && - (conn->ntlm.state == NTLMSTATE_TYPE2)) || - ((data->req.httpcode == 407) && - (conn->proxyntlm.state == NTLMSTATE_TYPE2)))) { - infof(data, "Connection closure while negotiating auth (HTTP 1.0?)\n"); - data->state.authproblem = TRUE; - } -#endif - - /* - * When all the headers have been parsed, see if we should give - * up and return an error. - */ - if(http_should_fail(conn)) { - failf(data, "The requested URL returned error: %d", - k->httpcode); - return CURLE_HTTP_RETURNED_ERROR; - } - - /* now, only output this if the header AND body are requested: - */ - writetype = CLIENTWRITE_HEADER; - if(data->set.include_header) - writetype |= CLIENTWRITE_BODY; - - headerlen = k->p - data->state.headerbuff; - - result = Curl_client_write(conn, writetype, - data->state.headerbuff, - headerlen); - if(result) - return result; - - data->info.header_size += (long)headerlen; - data->req.headerbytecount += (long)headerlen; - - data->req.deductheadercount = - (100 <= k->httpcode && 199 >= k->httpcode)?data->req.headerbytecount:0; - - /* Curl_http_auth_act() checks what authentication methods - * that are available and decides which one (if any) to - * use. It will set 'newurl' if an auth method was picked. */ - result = Curl_http_auth_act(conn); - - if(result) - return result; - - if(k->httpcode >= 300) { - if((!conn->bits.authneg) && !conn->bits.close && - !conn->bits.rewindaftersend) { - /* - * General treatment of errors when about to send data. Including : - * "417 Expectation Failed", while waiting for 100-continue. - * - * The check for close above is done simply because of something - * else has already deemed the connection to get closed then - * something else should've considered the big picture and we - * avoid this check. - * - * rewindaftersend indicates that something has told libcurl to - * continue sending even if it gets discarded - */ - - switch(data->set.httpreq) { - case HTTPREQ_PUT: - case HTTPREQ_POST: - case HTTPREQ_POST_FORM: - /* We got an error response. If this happened before the whole - * request body has been sent we stop sending and mark the - * connection for closure after we've read the entire response. - */ - if(!k->upload_done) { - if(data->set.http_keep_sending_on_error) { - infof(data, "HTTP error before end of send, keep sending\n"); - if(k->exp100 > EXP100_SEND_DATA) { - k->exp100 = EXP100_SEND_DATA; - k->keepon |= KEEP_SEND; - } - } - else { - infof(data, "HTTP error before end of send, stop sending\n"); - streamclose(conn, "Stop sending data before everything sent"); - k->upload_done = TRUE; - k->keepon &= ~KEEP_SEND; /* don't send */ - if(data->state.expect100header) - k->exp100 = EXP100_FAILED; - } - } - break; - - default: /* default label present to avoid compiler warnings */ - break; - } - } - - if(conn->bits.rewindaftersend) { - /* We rewind after a complete send, so thus we continue - sending now */ - infof(data, "Keep sending data to get tossed away!\n"); - k->keepon |= KEEP_SEND; - } - } - - if(!k->header) { - /* - * really end-of-headers. - * - * If we requested a "no body", this is a good time to get - * out and return home. - */ - if(data->set.opt_no_body) - *stop_reading = TRUE; -#ifndef CURL_DISABLE_RTSP - else if((conn->handler->protocol & CURLPROTO_RTSP) && - (data->set.rtspreq == RTSPREQ_DESCRIBE) && - (k->size <= -1)) - /* Respect section 4.4 of rfc2326: If the Content-Length header is - absent, a length 0 must be assumed. It will prevent libcurl from - hanging on DESCRIBE request that got refused for whatever - reason */ - *stop_reading = TRUE; -#endif - else { - /* If we know the expected size of this document, we set the - maximum download size to the size of the expected - document or else, we won't know when to stop reading! - - Note that we set the download maximum even if we read a - "Connection: close" header, to make sure that - "Content-Length: 0" still prevents us from attempting to - read the (missing) response-body. - */ - /* According to RFC2616 section 4.4, we MUST ignore - Content-Length: headers if we are now receiving data - using chunked Transfer-Encoding. - */ - if(k->chunk) - k->maxdownload = k->size = -1; - } - if(-1 != k->size) { - /* We do this operation even if no_body is true, since this - data might be retrieved later with curl_easy_getinfo() - and its CURLINFO_CONTENT_LENGTH_DOWNLOAD option. */ - - Curl_pgrsSetDownloadSize(data, k->size); - k->maxdownload = k->size; - } - - /* If max download size is *zero* (nothing) we already - have nothing and can safely return ok now! */ - if(0 == k->maxdownload) - *stop_reading = TRUE; - - if(*stop_reading) { - /* we make sure that this socket isn't read more now */ - k->keepon &= ~KEEP_RECV; - } - - if(data->set.verbose) - Curl_debug(data, CURLINFO_HEADER_IN, - k->str_start, headerlen, conn); - break; /* exit header line loop */ - } - - /* We continue reading headers, so reset the line-based - header parsing variables hbufp && hbuflen */ - k->hbufp = data->state.headerbuff; - k->hbuflen = 0; - continue; - } - - /* - * Checks for special headers coming up. - */ - - if(!k->headerline++) { - /* This is the first header, it MUST be the error code line - or else we consider this to be the body right away! */ - int httpversion_major; - int rtspversion_major; - int nc = 0; -#ifdef CURL_DOES_CONVERSIONS -#define HEADER1 scratch -#define SCRATCHSIZE 21 - CURLcode res; - char scratch[SCRATCHSIZE+1]; /* "HTTP/major.minor 123" */ - /* We can't really convert this yet because we - don't know if it's the 1st header line or the body. - So we do a partial conversion into a scratch area, - leaving the data at k->p as-is. - */ - strncpy(&scratch[0], k->p, SCRATCHSIZE); - scratch[SCRATCHSIZE] = 0; /* null terminate */ - res = Curl_convert_from_network(data, - &scratch[0], - SCRATCHSIZE); - if(res) - /* Curl_convert_from_network calls failf if unsuccessful */ - return res; -#else -#define HEADER1 k->p /* no conversion needed, just use k->p */ -#endif /* CURL_DOES_CONVERSIONS */ - - if(conn->handler->protocol & PROTO_FAMILY_HTTP) { - /* - * https://tools.ietf.org/html/rfc7230#section-3.1.2 - * - * The reponse code is always a three-digit number in HTTP as the spec - * says. We try to allow any number here, but we cannot make - * guarantees on future behaviors since it isn't within the protocol. - */ - nc = sscanf(HEADER1, - " HTTP/%d.%d %d", - &httpversion_major, - &conn->httpversion, - &k->httpcode); - - if(nc == 1 && httpversion_major == 2 && - 1 == sscanf(HEADER1, " HTTP/2 %d", &k->httpcode)) { - conn->httpversion = 0; - nc = 3; - } - - if(nc==3) { - conn->httpversion += 10 * httpversion_major; - - if(k->upgr101 == UPGR101_RECEIVED) { - /* supposedly upgraded to http2 now */ - if(conn->httpversion != 20) - infof(data, "Lying server, not serving HTTP/2\n"); - } - } - else { - /* this is the real world, not a Nirvana - NCSA 1.5.x returns this crap when asked for HTTP/1.1 - */ - nc=sscanf(HEADER1, " HTTP %3d", &k->httpcode); - conn->httpversion = 10; - - /* If user has set option HTTP200ALIASES, - compare header line against list of aliases - */ - if(!nc) { - if(checkhttpprefix(data, k->p)) { - nc = 1; - k->httpcode = 200; - conn->httpversion = 10; - } - } - } - } - else if(conn->handler->protocol & CURLPROTO_RTSP) { - nc = sscanf(HEADER1, - " RTSP/%d.%d %3d", - &rtspversion_major, - &conn->rtspversion, - &k->httpcode); - if(nc==3) { - conn->rtspversion += 10 * rtspversion_major; - conn->httpversion = 11; /* For us, RTSP acts like HTTP 1.1 */ - } - else { - /* TODO: do we care about the other cases here? */ - nc = 0; - } - } - - if(nc) { - data->info.httpcode = k->httpcode; - - data->info.httpversion = conn->httpversion; - if(!data->state.httpversion || - data->state.httpversion > conn->httpversion) - /* store the lowest server version we encounter */ - data->state.httpversion = conn->httpversion; - - /* - * This code executes as part of processing the header. As a - * result, it's not totally clear how to interpret the - * response code yet as that depends on what other headers may - * be present. 401 and 407 may be errors, but may be OK - * depending on how authentication is working. Other codes - * are definitely errors, so give up here. - */ - if(data->set.http_fail_on_error && (k->httpcode >= 400) && - ((k->httpcode != 401) || !conn->bits.user_passwd) && - ((k->httpcode != 407) || !conn->bits.proxy_user_passwd) ) { - - if(data->state.resume_from && - (data->set.httpreq==HTTPREQ_GET) && - (k->httpcode == 416)) { - /* "Requested Range Not Satisfiable", just proceed and - pretend this is no error */ - } - else { - /* serious error, go home! */ - print_http_error(data); - return CURLE_HTTP_RETURNED_ERROR; - } - } - - if(conn->httpversion == 10) { - /* Default action for HTTP/1.0 must be to close, unless - we get one of those fancy headers that tell us the - server keeps it open for us! */ - infof(data, "HTTP 1.0, assume close after body\n"); - connclose(conn, "HTTP/1.0 close after body"); - } - else if(conn->httpversion == 20 || - (k->upgr101 == UPGR101_REQUESTED && k->httpcode == 101)) { - DEBUGF(infof(data, "HTTP/2 found, allow multiplexing\n")); - - /* HTTP/2 cannot blacklist multiplexing since it is a core - functionality of the protocol */ - conn->bundle->multiuse = BUNDLE_MULTIPLEX; - } - else if(conn->httpversion >= 11 && - !conn->bits.close) { - /* If HTTP version is >= 1.1 and connection is persistent - server supports pipelining. */ - DEBUGF(infof(data, - "HTTP 1.1 or later with persistent connection, " - "pipelining supported\n")); - /* Activate pipelining if needed */ - if(conn->bundle) { - if(!Curl_pipeline_site_blacklisted(data, conn)) - conn->bundle->multiuse = BUNDLE_PIPELINING; - } - } - - switch(k->httpcode) { - case 204: - /* (quote from RFC2616, section 10.2.5): The server has - * fulfilled the request but does not need to return an - * entity-body ... The 204 response MUST NOT include a - * message-body, and thus is always terminated by the first - * empty line after the header fields. */ - /* FALLTHROUGH */ - case 304: - /* (quote from RFC2616, section 10.3.5): The 304 response - * MUST NOT contain a message-body, and thus is always - * terminated by the first empty line after the header - * fields. */ - if(data->set.timecondition) - data->info.timecond = TRUE; - k->size=0; - k->maxdownload=0; - k->ignorecl = TRUE; /* ignore Content-Length headers */ - break; - default: - /* nothing */ - break; - } - } - else { - k->header = FALSE; /* this is not a header line */ - break; - } - } - - result = Curl_convert_from_network(data, k->p, strlen(k->p)); - /* Curl_convert_from_network calls failf if unsuccessful */ - if(result) - return result; - - /* Check for Content-Length: header lines to get size */ - if(!k->ignorecl && !data->set.ignorecl && - checkprefix("Content-Length:", k->p)) { - curl_off_t contentlength = curlx_strtoofft(k->p+15, NULL, 10); - if(data->set.max_filesize && - contentlength > data->set.max_filesize) { - failf(data, "Maximum file size exceeded"); - return CURLE_FILESIZE_EXCEEDED; - } - if(contentlength >= 0) { - k->size = contentlength; - k->maxdownload = k->size; - /* we set the progress download size already at this point - just to make it easier for apps/callbacks to extract this - info as soon as possible */ - Curl_pgrsSetDownloadSize(data, k->size); - } - else { - /* Negative Content-Length is really odd, and we know it - happens for example when older Apache servers send large - files */ - streamclose(conn, "negative content-length"); - infof(data, "Negative content-length: %" CURL_FORMAT_CURL_OFF_T - ", closing after transfer\n", contentlength); - } - } - /* check for Content-Type: header lines to get the MIME-type */ - else if(checkprefix("Content-Type:", k->p)) { - char *contenttype = Curl_copy_header_value(k->p); - if(!contenttype) - return CURLE_OUT_OF_MEMORY; - if(!*contenttype) - /* ignore empty data */ - free(contenttype); - else { - Curl_safefree(data->info.contenttype); - data->info.contenttype = contenttype; - } - } - else if(checkprefix("Server:", k->p)) { - if(conn->httpversion < 20) { - /* only do this for non-h2 servers */ - char *server_name = Curl_copy_header_value(k->p); - - /* Turn off pipelining if the server version is blacklisted */ - if(conn->bundle && (conn->bundle->multiuse == BUNDLE_PIPELINING)) { - if(Curl_pipeline_server_blacklisted(data, server_name)) - conn->bundle->multiuse = BUNDLE_NO_MULTIUSE; - } - free(server_name); - } - } - else if((conn->httpversion == 10) && - conn->bits.httpproxy && - Curl_compareheader(k->p, - "Proxy-Connection:", "keep-alive")) { - /* - * When a HTTP/1.0 reply comes when using a proxy, the - * 'Proxy-Connection: keep-alive' line tells us the - * connection will be kept alive for our pleasure. - * Default action for 1.0 is to close. - */ - connkeep(conn, "Proxy-Connection keep-alive"); /* don't close */ - infof(data, "HTTP/1.0 proxy connection set to keep alive!\n"); - } - else if((conn->httpversion == 11) && - conn->bits.httpproxy && - Curl_compareheader(k->p, - "Proxy-Connection:", "close")) { - /* - * We get a HTTP/1.1 response from a proxy and it says it'll - * close down after this transfer. - */ - connclose(conn, "Proxy-Connection: asked to close after done"); - infof(data, "HTTP/1.1 proxy connection set close!\n"); - } - else if((conn->httpversion == 10) && - Curl_compareheader(k->p, "Connection:", "keep-alive")) { - /* - * A HTTP/1.0 reply with the 'Connection: keep-alive' line - * tells us the connection will be kept alive for our - * pleasure. Default action for 1.0 is to close. - * - * [RFC2068, section 19.7.1] */ - connkeep(conn, "Connection keep-alive"); - infof(data, "HTTP/1.0 connection set to keep alive!\n"); - } - else if(Curl_compareheader(k->p, "Connection:", "close")) { - /* - * [RFC 2616, section 8.1.2.1] - * "Connection: close" is HTTP/1.1 language and means that - * the connection will close when this request has been - * served. - */ - streamclose(conn, "Connection: close used"); - } - else if(checkprefix("Transfer-Encoding:", k->p)) { - /* One or more encodings. We check for chunked and/or a compression - algorithm. */ - /* - * [RFC 2616, section 3.6.1] A 'chunked' transfer encoding - * means that the server will send a series of "chunks". Each - * chunk starts with line with info (including size of the - * coming block) (terminated with CRLF), then a block of data - * with the previously mentioned size. There can be any amount - * of chunks, and a chunk-data set to zero signals the - * end-of-chunks. */ - - char *start; - - /* Find the first non-space letter */ - start = k->p + 18; - - for(;;) { - /* skip whitespaces and commas */ - while(*start && (ISSPACE(*start) || (*start == ','))) - start++; - - if(checkprefix("chunked", start)) { - k->chunk = TRUE; /* chunks coming our way */ - - /* init our chunky engine */ - Curl_httpchunk_init(conn); - - start += 7; - } - - if(k->auto_decoding) - /* TODO: we only support the first mentioned compression for now */ - break; - - if(checkprefix("identity", start)) { - k->auto_decoding = IDENTITY; - start += 8; - } - else if(checkprefix("deflate", start)) { - k->auto_decoding = DEFLATE; - start += 7; - } - else if(checkprefix("gzip", start)) { - k->auto_decoding = GZIP; - start += 4; - } - else if(checkprefix("x-gzip", start)) { - k->auto_decoding = GZIP; - start += 6; - } - else - /* unknown! */ - break; - - } - - } - else if(checkprefix("Content-Encoding:", k->p) && - data->set.str[STRING_ENCODING]) { - /* - * Process Content-Encoding. Look for the values: identity, - * gzip, deflate, compress, x-gzip and x-compress. x-gzip and - * x-compress are the same as gzip and compress. (Sec 3.5 RFC - * 2616). zlib cannot handle compress. However, errors are - * handled further down when the response body is processed - */ - char *start; - - /* Find the first non-space letter */ - start = k->p + 17; - while(*start && ISSPACE(*start)) - start++; - - /* Record the content-encoding for later use */ - if(checkprefix("identity", start)) - k->auto_decoding = IDENTITY; - else if(checkprefix("deflate", start)) - k->auto_decoding = DEFLATE; - else if(checkprefix("gzip", start) - || checkprefix("x-gzip", start)) - k->auto_decoding = GZIP; - } - else if(checkprefix("Content-Range:", k->p)) { - /* Content-Range: bytes [num]- - Content-Range: bytes: [num]- - Content-Range: [num]- - Content-Range: [asterisk]/[total] - - The second format was added since Sun's webserver - JavaWebServer/1.1.1 obviously sends the header this way! - The third added since some servers use that! - The forth means the requested range was unsatisfied. - */ - - char *ptr = k->p + 14; - - /* Move forward until first digit or asterisk */ - while(*ptr && !ISDIGIT(*ptr) && *ptr != '*') - ptr++; - - /* if it truly stopped on a digit */ - if(ISDIGIT(*ptr)) { - k->offset = curlx_strtoofft(ptr, NULL, 10); - - if(data->state.resume_from == k->offset) - /* we asked for a resume and we got it */ - k->content_range = TRUE; - } - else - data->state.resume_from = 0; /* get everything */ - } -#if !defined(CURL_DISABLE_COOKIES) - else if(data->cookies && - checkprefix("Set-Cookie:", k->p)) { - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, - CURL_LOCK_ACCESS_SINGLE); - Curl_cookie_add(data, - data->cookies, TRUE, k->p+11, - /* If there is a custom-set Host: name, use it - here, or else use real peer host name. */ - conn->allocptr.cookiehost? - conn->allocptr.cookiehost:conn->host.name, - data->state.path); - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } -#endif - else if(checkprefix("Last-Modified:", k->p) && - (data->set.timecondition || data->set.get_filetime) ) { - time_t secs=time(NULL); - k->timeofdoc = curl_getdate(k->p+strlen("Last-Modified:"), - &secs); - if(data->set.get_filetime) - data->info.filetime = (long)k->timeofdoc; - } - else if((checkprefix("WWW-Authenticate:", k->p) && - (401 == k->httpcode)) || - (checkprefix("Proxy-authenticate:", k->p) && - (407 == k->httpcode))) { - - bool proxy = (k->httpcode == 407) ? TRUE : FALSE; - char *auth = Curl_copy_header_value(k->p); - if(!auth) - return CURLE_OUT_OF_MEMORY; - - result = Curl_http_input_auth(conn, proxy, auth); - - free(auth); - - if(result) - return result; - } - else if((k->httpcode >= 300 && k->httpcode < 400) && - checkprefix("Location:", k->p) && - !data->req.location) { - /* this is the URL that the server advises us to use instead */ - char *location = Curl_copy_header_value(k->p); - if(!location) - return CURLE_OUT_OF_MEMORY; - if(!*location) - /* ignore empty data */ - free(location); - else { - data->req.location = location; - - if(data->set.http_follow_location) { - DEBUGASSERT(!data->req.newurl); - data->req.newurl = strdup(data->req.location); /* clone */ - if(!data->req.newurl) - return CURLE_OUT_OF_MEMORY; - - /* some cases of POST and PUT etc needs to rewind the data - stream at this point */ - result = http_perhapsrewind(conn); - if(result) - return result; - } - } - } - else if(conn->handler->protocol & CURLPROTO_RTSP) { - result = Curl_rtsp_parseheader(conn, k->p); - if(result) - return result; - } - - /* - * End of header-checks. Write them to the client. - */ - - writetype = CLIENTWRITE_HEADER; - if(data->set.include_header) - writetype |= CLIENTWRITE_BODY; - - if(data->set.verbose) - Curl_debug(data, CURLINFO_HEADER_IN, - k->p, (size_t)k->hbuflen, conn); - - result = Curl_client_write(conn, writetype, k->p, k->hbuflen); - if(result) - return result; - - data->info.header_size += (long)k->hbuflen; - data->req.headerbytecount += (long)k->hbuflen; - - /* reset hbufp pointer && hbuflen */ - k->hbufp = data->state.headerbuff; - k->hbuflen = 0; - } - while(*k->str); /* header line within buffer */ - - /* We might have reached the end of the header part here, but - there might be a non-header part left in the end of the read - buffer. */ - - return CURLE_OK; -} - -#endif /* CURL_DISABLE_HTTP */ diff --git a/build/premake/premake5/contrib/curl/lib/http.h b/build/premake/premake5/contrib/curl/lib/http.h deleted file mode 100644 index 7ce4bd9a0f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http.h +++ /dev/null @@ -1,258 +0,0 @@ -#ifndef HEADER_CURL_HTTP_H -#define HEADER_CURL_HTTP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifndef CURL_DISABLE_HTTP - -#ifdef USE_NGHTTP2 -#include -#endif - -extern const struct Curl_handler Curl_handler_http; - -#ifdef USE_SSL -extern const struct Curl_handler Curl_handler_https; -#endif - -/* Header specific functions */ -bool Curl_compareheader(const char *headerline, /* line to check */ - const char *header, /* header keyword _with_ colon */ - const char *content); /* content string to find */ - -char *Curl_checkheaders(const struct connectdata *conn, - const char *thisheader); -char *Curl_copy_header_value(const char *header); - -char *Curl_checkProxyheaders(const struct connectdata *conn, - const char *thisheader); -/* ------------------------------------------------------------------------- */ -/* - * The add_buffer series of functions are used to build one large memory chunk - * from repeated function invokes. Used so that the entire HTTP request can - * be sent in one go. - */ -struct Curl_send_buffer { - char *buffer; - size_t size_max; - size_t size_used; -}; -typedef struct Curl_send_buffer Curl_send_buffer; - -Curl_send_buffer *Curl_add_buffer_init(void); -void Curl_add_buffer_free(Curl_send_buffer *buff); -CURLcode Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...); -CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size); -CURLcode Curl_add_buffer_send(Curl_send_buffer *in, - struct connectdata *conn, - long *bytes_written, - size_t included_body_bytes, - int socketindex); - -CURLcode Curl_add_timecondition(struct Curl_easy *data, - Curl_send_buffer *buf); -CURLcode Curl_add_custom_headers(struct connectdata *conn, - bool is_connect, - Curl_send_buffer *req_buffer); - -/* protocol-specific functions set up to be called by the main engine */ -CURLcode Curl_http(struct connectdata *conn, bool *done); -CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature); -CURLcode Curl_http_connect(struct connectdata *conn, bool *done); -CURLcode Curl_http_setup_conn(struct connectdata *conn); - -/* The following functions are defined in http_chunks.c */ -void Curl_httpchunk_init(struct connectdata *conn); -CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap, - ssize_t length, ssize_t *wrote); - -/* These functions are in http.c */ -void Curl_http_auth_stage(struct Curl_easy *data, int stage); -CURLcode Curl_http_input_auth(struct connectdata *conn, bool proxy, - const char *auth); -CURLcode Curl_http_auth_act(struct connectdata *conn); -CURLcode Curl_http_perhapsrewind(struct connectdata *conn); - -/* If only the PICKNONE bit is set, there has been a round-trip and we - selected to use no auth at all. Ie, we actively select no auth, as opposed - to not having one selected. The other CURLAUTH_* defines are present in the - public curl/curl.h header. */ -#define CURLAUTH_PICKNONE (1<<30) /* don't use auth */ - -/* MAX_INITIAL_POST_SIZE indicates the number of bytes that will make the POST - data get included in the initial data chunk sent to the server. If the - data is larger than this, it will automatically get split up in multiple - system calls. - - This value used to be fairly big (100K), but we must take into account that - if the server rejects the POST due for authentication reasons, this data - will always be uncondtionally sent and thus it may not be larger than can - always be afforded to send twice. - - It must not be greater than 64K to work on VMS. -*/ -#ifndef MAX_INITIAL_POST_SIZE -#define MAX_INITIAL_POST_SIZE (64*1024) -#endif - -#ifndef TINY_INITIAL_POST_SIZE -#define TINY_INITIAL_POST_SIZE 1024 -#endif - -#endif /* CURL_DISABLE_HTTP */ - -/**************************************************************************** - * HTTP unique setup - ***************************************************************************/ -struct HTTP { - struct FormData *sendit; - curl_off_t postsize; /* off_t to handle large file sizes */ - const char *postdata; - - const char *p_pragma; /* Pragma: string */ - const char *p_accept; /* Accept: string */ - curl_off_t readbytecount; - curl_off_t writebytecount; - - /* For FORM posting */ - struct Form form; - - struct back { - curl_read_callback fread_func; /* backup storage for fread pointer */ - void *fread_in; /* backup storage for fread_in pointer */ - const char *postdata; - curl_off_t postsize; - } backup; - - enum { - HTTPSEND_NADA, /* init */ - HTTPSEND_REQUEST, /* sending a request */ - HTTPSEND_BODY, /* sending body */ - HTTPSEND_LAST /* never use this */ - } sending; - - void *send_buffer; /* used if the request couldn't be sent in one chunk, - points to an allocated send_buffer struct */ - -#ifdef USE_NGHTTP2 - /*********** for HTTP/2 we store stream-local data here *************/ - int32_t stream_id; /* stream we are interested in */ - - bool bodystarted; - /* We store non-final and final response headers here, per-stream */ - Curl_send_buffer *header_recvbuf; - size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into - upper layer */ - Curl_send_buffer *trailer_recvbuf; - int status_code; /* HTTP status code */ - const uint8_t *pausedata; /* pointer to data received in on_data_chunk */ - size_t pauselen; /* the number of bytes left in data */ - bool closed; /* TRUE on HTTP2 stream close */ - bool close_handled; /* TRUE if stream closure is handled by libcurl */ - uint32_t error_code; /* HTTP/2 error code */ - - char *mem; /* points to a buffer in memory to store received data */ - size_t len; /* size of the buffer 'mem' points to */ - size_t memlen; /* size of data copied to mem */ - - const uint8_t *upload_mem; /* points to a buffer to read from */ - size_t upload_len; /* size of the buffer 'upload_mem' points to */ - curl_off_t upload_left; /* number of bytes left to upload */ - - char **push_headers; /* allocated array */ - size_t push_headers_used; /* number of entries filled in */ - size_t push_headers_alloc; /* number of entries allocated */ -#endif -}; - -typedef int (*sending)(void); /* Curl_send */ -typedef int (*recving)(void); /* Curl_recv */ - -#ifdef USE_NGHTTP2 -/* h2 settings for this connection */ -struct h2settings { - uint32_t max_concurrent_streams; - bool enable_push; -}; -#endif - - -struct http_conn { -#ifdef USE_NGHTTP2 -#define H2_BINSETTINGS_LEN 80 - nghttp2_session *h2; - uint8_t binsettings[H2_BINSETTINGS_LEN]; - size_t binlen; /* length of the binsettings data */ - sending send_underlying; /* underlying send Curl_send callback */ - recving recv_underlying; /* underlying recv Curl_recv callback */ - char *inbuf; /* buffer to receive data from underlying socket */ - size_t inbuflen; /* number of bytes filled in inbuf */ - size_t nread_inbuf; /* number of bytes read from in inbuf */ - /* We need separate buffer for transmission and reception because we - may call nghttp2_session_send() after the - nghttp2_session_mem_recv() but mem buffer is still not full. In - this case, we wrongly sends the content of mem buffer if we share - them for both cases. */ - int32_t pause_stream_id; /* stream ID which paused - nghttp2_session_mem_recv */ - size_t drain_total; /* sum of all stream's UrlState.drain */ - - /* this is a hash of all individual streams (Curl_easy structs) */ - struct h2settings settings; - - /* list of settings that will be sent */ - nghttp2_settings_entry local_settings[3]; - size_t local_settings_num; -#else - int unused; /* prevent a compiler warning */ -#endif -}; - -CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, - struct connectdata *conn, - ssize_t *nread, - bool *stop_reading); - -/** - * Curl_http_output_auth() setups the authentication headers for the - * host/proxy and the correct authentication - * method. conn->data->state.authdone is set to TRUE when authentication is - * done. - * - * @param conn all information about the current connection - * @param request pointer to the request keyword - * @param path pointer to the requested path - * @param proxytunnel boolean if this is the request setting up a "proxy - * tunnel" - * - * @returns CURLcode - */ -CURLcode -Curl_http_output_auth(struct connectdata *conn, - const char *request, - const char *path, - bool proxytunnel); /* TRUE if this is the request setting - up the proxy tunnel */ - -#endif /* HEADER_CURL_HTTP_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/http2.c b/build/premake/premake5/contrib/curl/lib/http2.c deleted file mode 100644 index af69c72245..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http2.c +++ /dev/null @@ -1,2227 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_NGHTTP2 -#include -#include "urldata.h" -#include "http2.h" -#include "http.h" -#include "sendf.h" -#include "curl_base64.h" -#include "strcase.h" -#include "multiif.h" -#include "conncache.h" -#include "url.h" -#include "connect.h" -#include "strtoofft.h" -#include "strdup.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#define MIN(x,y) ((x)<(y)?(x):(y)) - -#if (NGHTTP2_VERSION_NUM < 0x010000) -#error too old nghttp2 version, upgrade! -#endif - -#if (NGHTTP2_VERSION_NUM > 0x010800) -#define NGHTTP2_HAS_HTTP2_STRERROR 1 -#endif - -#if (NGHTTP2_VERSION_NUM >= 0x010900) -/* nghttp2_session_callbacks_set_error_callback is present in nghttp2 1.9.0 or - later */ -#define NGHTTP2_HAS_ERROR_CALLBACK 1 -#else -#define nghttp2_session_callbacks_set_error_callback(x,y) -#endif - -#if (NGHTTP2_VERSION_NUM >= 0x010c00) -#define NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE 1 -#endif - -#define HTTP2_HUGE_WINDOW_SIZE (1 << 30) - -/* - * Curl_http2_init_state() is called when the easy handle is created and - * allows for HTTP/2 specific init of state. - */ -void Curl_http2_init_state(struct UrlState *state) -{ - state->stream_weight = NGHTTP2_DEFAULT_WEIGHT; -} - -/* - * Curl_http2_init_userset() is called when the easy handle is created and - * allows for HTTP/2 specific user-set fields. - */ -void Curl_http2_init_userset(struct UserDefined *set) -{ - set->stream_weight = NGHTTP2_DEFAULT_WEIGHT; -} - -static int http2_perform_getsock(const struct connectdata *conn, - curl_socket_t *sock, /* points to - numsocks - number of - sockets */ - int numsocks) -{ - const struct http_conn *c = &conn->proto.httpc; - int bitmap = GETSOCK_BLANK; - (void)numsocks; - - /* TODO We should check underlying socket state if it is SSL socket - because of renegotiation. */ - sock[0] = conn->sock[FIRSTSOCKET]; - - /* in a HTTP/2 connection we can basically always get a frame so we should - always be ready for one */ - bitmap |= GETSOCK_READSOCK(FIRSTSOCKET); - - if(nghttp2_session_want_write(c->h2)) - bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET); - - return bitmap; -} - -static int http2_getsock(struct connectdata *conn, - curl_socket_t *sock, /* points to numsocks - number of sockets */ - int numsocks) -{ - return http2_perform_getsock(conn, sock, numsocks); -} - -/* - * http2_stream_free() free HTTP2 stream related data - */ -static void http2_stream_free(struct HTTP *http) -{ - if(http) { - Curl_add_buffer_free(http->header_recvbuf); - http->header_recvbuf = NULL; /* clear the pointer */ - Curl_add_buffer_free(http->trailer_recvbuf); - http->trailer_recvbuf = NULL; /* clear the pointer */ - for(; http->push_headers_used > 0; --http->push_headers_used) { - free(http->push_headers[http->push_headers_used - 1]); - } - free(http->push_headers); - http->push_headers = NULL; - } -} - -static CURLcode http2_disconnect(struct connectdata *conn, - bool dead_connection) -{ - struct http_conn *c = &conn->proto.httpc; - (void)dead_connection; - - DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n")); - - nghttp2_session_del(c->h2); - Curl_safefree(c->inbuf); - http2_stream_free(conn->data->req.protop); - - DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); - - return CURLE_OK; -} - -/* called from Curl_http_setup_conn */ -void Curl_http2_setup_req(struct Curl_easy *data) -{ - struct HTTP *http = data->req.protop; - - http->nread_header_recvbuf = 0; - http->bodystarted = FALSE; - http->status_code = -1; - http->pausedata = NULL; - http->pauselen = 0; - http->error_code = NGHTTP2_NO_ERROR; - http->closed = FALSE; - http->close_handled = FALSE; - http->mem = data->state.buffer; - http->len = BUFSIZE; - http->memlen = 0; -} - -/* called from Curl_http_setup_conn */ -void Curl_http2_setup_conn(struct connectdata *conn) -{ - conn->proto.httpc.settings.max_concurrent_streams = - DEFAULT_MAX_CONCURRENT_STREAMS; -} - -/* - * HTTP2 handler interface. This isn't added to the general list of protocols - * but will be used at run-time when the protocol is dynamically switched from - * HTTP to HTTP2. - */ -const struct Curl_handler Curl_handler_http2 = { - "HTTP", /* scheme */ - ZERO_NULL, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - http2_getsock, /* proto_getsock */ - http2_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - http2_perform_getsock, /* perform_getsock */ - http2_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_HTTP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_STREAM /* flags */ -}; - -const struct Curl_handler Curl_handler_http2_ssl = { - "HTTPS", /* scheme */ - ZERO_NULL, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - http2_getsock, /* proto_getsock */ - http2_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - http2_perform_getsock, /* perform_getsock */ - http2_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_HTTP, /* defport */ - CURLPROTO_HTTPS, /* protocol */ - PROTOPT_SSL | PROTOPT_STREAM /* flags */ -}; - -/* - * Store nghttp2 version info in this buffer, Prefix with a space. Return - * total length written. - */ -int Curl_http2_ver(char *p, size_t len) -{ - nghttp2_info *h2 = nghttp2_version(0); - return snprintf(p, len, " nghttp2/%s", h2->version_str); -} - -/* HTTP/2 error code to name based on the Error Code Registry. -https://tools.ietf.org/html/rfc7540#page-77 -nghttp2_error_code enums are identical. -*/ -const char *Curl_http2_strerror(uint32_t err) -{ -#ifndef NGHTTP2_HAS_HTTP2_STRERROR - const char *str[] = { - "NO_ERROR", /* 0x0 */ - "PROTOCOL_ERROR", /* 0x1 */ - "INTERNAL_ERROR", /* 0x2 */ - "FLOW_CONTROL_ERROR", /* 0x3 */ - "SETTINGS_TIMEOUT", /* 0x4 */ - "STREAM_CLOSED", /* 0x5 */ - "FRAME_SIZE_ERROR", /* 0x6 */ - "REFUSED_STREAM", /* 0x7 */ - "CANCEL", /* 0x8 */ - "COMPRESSION_ERROR", /* 0x9 */ - "CONNECT_ERROR", /* 0xA */ - "ENHANCE_YOUR_CALM", /* 0xB */ - "INADEQUATE_SECURITY", /* 0xC */ - "HTTP_1_1_REQUIRED" /* 0xD */ - }; - return (err < sizeof str / sizeof str[0]) ? str[err] : "unknown"; -#else - return nghttp2_http2_strerror(err); -#endif -} - -/* - * The implementation of nghttp2_send_callback type. Here we write |data| with - * size |length| to the network and return the number of bytes actually - * written. See the documentation of nghttp2_send_callback for the details. - */ -static ssize_t send_callback(nghttp2_session *h2, - const uint8_t *data, size_t length, int flags, - void *userp) -{ - struct connectdata *conn = (struct connectdata *)userp; - struct http_conn *c = &conn->proto.httpc; - ssize_t written; - CURLcode result = CURLE_OK; - - (void)h2; - (void)flags; - - written = ((Curl_send*)c->send_underlying)(conn, FIRSTSOCKET, - data, length, &result); - - if(result == CURLE_AGAIN) { - return NGHTTP2_ERR_WOULDBLOCK; - } - - if(written == -1) { - failf(conn->data, "Failed sending HTTP2 data"); - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - - if(!written) - return NGHTTP2_ERR_WOULDBLOCK; - - return written; -} - - -/* We pass a pointer to this struct in the push callback, but the contents of - the struct are hidden from the user. */ -struct curl_pushheaders { - struct Curl_easy *data; - const nghttp2_push_promise *frame; -}; - -/* - * push header access function. Only to be used from within the push callback - */ -char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num) -{ - /* Verify that we got a good easy handle in the push header struct, mostly to - detect rubbish input fast(er). */ - if(!h || !GOOD_EASY_HANDLE(h->data)) - return NULL; - else { - struct HTTP *stream = h->data->req.protop; - if(num < stream->push_headers_used) - return stream->push_headers[num]; - } - return NULL; -} - -/* - * push header access function. Only to be used from within the push callback - */ -char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header) -{ - /* Verify that we got a good easy handle in the push header struct, - mostly to detect rubbish input fast(er). Also empty header name - is just a rubbish too. We have to allow ":" at the beginning of - the header, but header == ":" must be rejected. If we have ':' in - the middle of header, it could be matched in middle of the value, - this is because we do prefix match.*/ - if(!h || !GOOD_EASY_HANDLE(h->data) || !header || !header[0] || - !strcmp(header, ":") || strchr(header + 1, ':')) - return NULL; - else { - struct HTTP *stream = h->data->req.protop; - size_t len = strlen(header); - size_t i; - for(i=0; ipush_headers_used; i++) { - if(!strncmp(header, stream->push_headers[i], len)) { - /* sub-match, make sure that it is followed by a colon */ - if(stream->push_headers[i][len] != ':') - continue; - return &stream->push_headers[i][len+1]; - } - } - } - return NULL; -} - -static struct Curl_easy *duphandle(struct Curl_easy *data) -{ - struct Curl_easy *second = curl_easy_duphandle(data); - if(second) { - /* setup the request struct */ - struct HTTP *http = calloc(1, sizeof(struct HTTP)); - if(!http) { - (void)Curl_close(second); - second = NULL; - } - else { - second->req.protop = http; - http->header_recvbuf = Curl_add_buffer_init(); - if(!http->header_recvbuf) { - free(http); - (void)Curl_close(second); - second = NULL; - } - else { - Curl_http2_setup_req(second); - second->state.stream_weight = data->state.stream_weight; - } - } - } - return second; -} - - -static int push_promise(struct Curl_easy *data, - struct connectdata *conn, - const nghttp2_push_promise *frame) -{ - int rv; - DEBUGF(infof(data, "PUSH_PROMISE received, stream %u!\n", - frame->promised_stream_id)); - if(data->multi->push_cb) { - struct HTTP *stream; - struct HTTP *newstream; - struct curl_pushheaders heads; - CURLMcode rc; - struct http_conn *httpc; - size_t i; - /* clone the parent */ - struct Curl_easy *newhandle = duphandle(data); - if(!newhandle) { - infof(data, "failed to duplicate handle\n"); - rv = 1; /* FAIL HARD */ - goto fail; - } - - heads.data = data; - heads.frame = frame; - /* ask the application */ - DEBUGF(infof(data, "Got PUSH_PROMISE, ask application!\n")); - - stream = data->req.protop; - if(!stream) { - failf(data, "Internal NULL stream!\n"); - rv = 1; - goto fail; - } - - rv = data->multi->push_cb(data, newhandle, - stream->push_headers_used, &heads, - data->multi->push_userp); - - /* free the headers again */ - for(i=0; ipush_headers_used; i++) - free(stream->push_headers[i]); - free(stream->push_headers); - stream->push_headers = NULL; - stream->push_headers_used = 0; - - if(rv) { - /* denied, kill off the new handle again */ - http2_stream_free(newhandle->req.protop); - (void)Curl_close(newhandle); - goto fail; - } - - newstream = newhandle->req.protop; - newstream->stream_id = frame->promised_stream_id; - newhandle->req.maxdownload = -1; - newhandle->req.size = -1; - - /* approved, add to the multi handle and immediately switch to PERFORM - state with the given connection !*/ - rc = Curl_multi_add_perform(data->multi, newhandle, conn); - if(rc) { - infof(data, "failed to add handle to multi\n"); - http2_stream_free(newhandle->req.protop); - Curl_close(newhandle); - rv = 1; - goto fail; - } - - httpc = &conn->proto.httpc; - nghttp2_session_set_stream_user_data(httpc->h2, - frame->promised_stream_id, newhandle); - } - else { - DEBUGF(infof(data, "Got PUSH_PROMISE, ignore it!\n")); - rv = 1; - } - fail: - return rv; -} - -static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, - void *userp) -{ - struct connectdata *conn = (struct connectdata *)userp; - struct http_conn *httpc = &conn->proto.httpc; - struct Curl_easy *data_s = NULL; - struct HTTP *stream = NULL; - static int lastStream = -1; - int rv; - size_t left, ncopy; - int32_t stream_id = frame->hd.stream_id; - - if(!stream_id) { - /* stream ID zero is for connection-oriented stuff */ - if(frame->hd.type == NGHTTP2_SETTINGS) { - uint32_t max_conn = httpc->settings.max_concurrent_streams; - DEBUGF(infof(conn->data, "Got SETTINGS\n")); - httpc->settings.max_concurrent_streams = - nghttp2_session_get_remote_settings( - session, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS); - httpc->settings.enable_push = - nghttp2_session_get_remote_settings( - session, NGHTTP2_SETTINGS_ENABLE_PUSH); - DEBUGF(infof(conn->data, "MAX_CONCURRENT_STREAMS == %d\n", - httpc->settings.max_concurrent_streams)); - DEBUGF(infof(conn->data, "ENABLE_PUSH == %s\n", - httpc->settings.enable_push?"TRUE":"false")); - if(max_conn != httpc->settings.max_concurrent_streams) { - /* only signal change if the value actually changed */ - infof(conn->data, - "Connection state changed (MAX_CONCURRENT_STREAMS updated)!\n"); - Curl_multi_connchanged(conn->data->multi); - } - } - return 0; - } - data_s = nghttp2_session_get_stream_user_data(session, stream_id); - if(lastStream != stream_id) { - lastStream = stream_id; - } - if(!data_s) { - DEBUGF(infof(conn->data, - "No Curl_easy associated with stream: %x\n", - stream_id)); - return 0; - } - - stream = data_s->req.protop; - if(!stream) { - DEBUGF(infof(conn->data, "No proto pointer for stream: %x\n", - stream_id)); - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - - DEBUGF(infof(data_s, "on_frame_recv() header %x stream %x\n", - frame->hd.type, stream_id)); - - switch(frame->hd.type) { - case NGHTTP2_DATA: - /* If body started on this stream, then receiving DATA is illegal. */ - if(!stream->bodystarted) { - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - stream_id, NGHTTP2_PROTOCOL_ERROR); - - if(nghttp2_is_fatal(rv)) { - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - } - break; - case NGHTTP2_HEADERS: - if(stream->bodystarted) { - /* Only valid HEADERS after body started is trailer HEADERS. We - buffer them in on_header callback. */ - break; - } - - /* nghttp2 guarantees that :status is received, and we store it to - stream->status_code */ - DEBUGASSERT(stream->status_code != -1); - - /* Only final status code signals the end of header */ - if(stream->status_code / 100 != 1) { - stream->bodystarted = TRUE; - stream->status_code = -1; - } - - Curl_add_buffer(stream->header_recvbuf, "\r\n", 2); - - left = stream->header_recvbuf->size_used - stream->nread_header_recvbuf; - ncopy = MIN(stream->len, left); - - memcpy(&stream->mem[stream->memlen], - stream->header_recvbuf->buffer + stream->nread_header_recvbuf, - ncopy); - stream->nread_header_recvbuf += ncopy; - - DEBUGF(infof(data_s, "Store %zu bytes headers from stream %u at %p\n", - ncopy, stream_id, stream->mem)); - - stream->len -= ncopy; - stream->memlen += ncopy; - - data_s->state.drain++; - httpc->drain_total++; - { - /* get the pointer from userp again since it was re-assigned above */ - struct connectdata *conn_s = (struct connectdata *)userp; - - /* if we receive data for another handle, wake that up */ - if(conn_s->data != data_s) - Curl_expire(data_s, 0); - } - break; - case NGHTTP2_PUSH_PROMISE: - rv = push_promise(data_s, conn, &frame->push_promise); - if(rv) { /* deny! */ - rv = nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE, - frame->push_promise.promised_stream_id, - NGHTTP2_CANCEL); - if(nghttp2_is_fatal(rv)) { - return rv; - } - } - break; - default: - DEBUGF(infof(conn->data, "Got frame type %x for stream %u!\n", - frame->hd.type, stream_id)); - break; - } - return 0; -} - -static int on_invalid_frame_recv(nghttp2_session *session, - const nghttp2_frame *frame, - int lib_error_code, void *userp) -{ - struct Curl_easy *data_s = NULL; - (void)userp; - - data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); - if(data_s) { - DEBUGF(infof(data_s, - "on_invalid_frame_recv() was called, error=%d:%s\n", - lib_error_code, nghttp2_strerror(lib_error_code))); - } - return 0; -} - -static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags, - int32_t stream_id, - const uint8_t *data, size_t len, void *userp) -{ - struct HTTP *stream; - struct Curl_easy *data_s; - size_t nread; - struct connectdata *conn = (struct connectdata *)userp; - (void)session; - (void)flags; - (void)data; - - DEBUGASSERT(stream_id); /* should never be a zero stream ID here */ - - /* get the stream from the hash based on Stream ID */ - data_s = nghttp2_session_get_stream_user_data(session, stream_id); - if(!data_s) - /* Receiving a Stream ID not in the hash should not happen, this is an - internal error more than anything else! */ - return NGHTTP2_ERR_CALLBACK_FAILURE; - - stream = data_s->req.protop; - if(!stream) - return NGHTTP2_ERR_CALLBACK_FAILURE; - - nread = MIN(stream->len, len); - memcpy(&stream->mem[stream->memlen], data, nread); - - stream->len -= nread; - stream->memlen += nread; - - data_s->state.drain++; - conn->proto.httpc.drain_total++; - - /* if we receive data for another handle, wake that up */ - if(conn->data != data_s) - Curl_expire(data_s, 0); - - DEBUGF(infof(data_s, "%zu data received for stream %u " - "(%zu left in buffer %p, total %zu)\n", - nread, stream_id, - stream->len, stream->mem, - stream->memlen)); - - if(nread < len) { - stream->pausedata = data + nread; - stream->pauselen = len - nread; - DEBUGF(infof(data_s, "NGHTTP2_ERR_PAUSE - %zu bytes out of buffer" - ", stream %u\n", - len - nread, stream_id)); - data_s->easy_conn->proto.httpc.pause_stream_id = stream_id; - - return NGHTTP2_ERR_PAUSE; - } - - /* pause execution of nghttp2 if we received data for another handle - in order to process them first. */ - if(conn->data != data_s) { - data_s->easy_conn->proto.httpc.pause_stream_id = stream_id; - - return NGHTTP2_ERR_PAUSE; - } - - return 0; -} - -static int before_frame_send(nghttp2_session *session, - const nghttp2_frame *frame, - void *userp) -{ - struct Curl_easy *data_s; - (void)userp; - - data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); - if(data_s) { - DEBUGF(infof(data_s, "before_frame_send() was called\n")); - } - - return 0; -} -static int on_frame_send(nghttp2_session *session, - const nghttp2_frame *frame, - void *userp) -{ - struct Curl_easy *data_s; - (void)userp; - - data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); - if(data_s) { - DEBUGF(infof(data_s, "on_frame_send() was called, length = %zd\n", - frame->hd.length)); - } - return 0; -} -static int on_frame_not_send(nghttp2_session *session, - const nghttp2_frame *frame, - int lib_error_code, void *userp) -{ - struct Curl_easy *data_s; - (void)userp; - - data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); - if(data_s) { - DEBUGF(infof(data_s, - "on_frame_not_send() was called, lib_error_code = %d\n", - lib_error_code)); - } - return 0; -} -static int on_stream_close(nghttp2_session *session, int32_t stream_id, - uint32_t error_code, void *userp) -{ - struct Curl_easy *data_s; - struct HTTP *stream; - struct connectdata *conn = (struct connectdata *)userp; - (void)session; - (void)stream_id; - - if(stream_id) { - /* get the stream from the hash based on Stream ID, stream ID zero is for - connection-oriented stuff */ - data_s = nghttp2_session_get_stream_user_data(session, stream_id); - if(!data_s) { - /* We could get stream ID not in the hash. For example, if we - decided to reject stream (e.g., PUSH_PROMISE). */ - return 0; - } - DEBUGF(infof(data_s, "on_stream_close(), %s (err %d), stream %u\n", - Curl_http2_strerror(error_code), error_code, stream_id)); - stream = data_s->req.protop; - if(!stream) - return NGHTTP2_ERR_CALLBACK_FAILURE; - - stream->error_code = error_code; - stream->closed = TRUE; - data_s->state.drain++; - conn->proto.httpc.drain_total++; - - /* remove the entry from the hash as the stream is now gone */ - nghttp2_session_set_stream_user_data(session, stream_id, 0); - DEBUGF(infof(data_s, "Removed stream %u hash!\n", stream_id)); - } - return 0; -} - -static int on_begin_headers(nghttp2_session *session, - const nghttp2_frame *frame, void *userp) -{ - struct HTTP *stream; - struct Curl_easy *data_s = NULL; - (void)userp; - - data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); - if(!data_s) { - return 0; - } - - DEBUGF(infof(data_s, "on_begin_headers() was called\n")); - - if(frame->hd.type != NGHTTP2_HEADERS) { - return 0; - } - - stream = data_s->req.protop; - if(!stream || !stream->bodystarted) { - return 0; - } - - /* This is trailer HEADERS started. Allocate buffer for them. */ - DEBUGF(infof(data_s, "trailer field started\n")); - - assert(stream->trailer_recvbuf == NULL); - - stream->trailer_recvbuf = Curl_add_buffer_init(); - if(!stream->trailer_recvbuf) { - return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; - } - - return 0; -} - -/* Decode HTTP status code. Returns -1 if no valid status code was - decoded. */ -static int decode_status_code(const uint8_t *value, size_t len) -{ - int i; - int res; - - if(len != 3) { - return -1; - } - - res = 0; - - for(i = 0; i < 3; ++i) { - char c = value[i]; - - if(c < '0' || c > '9') { - return -1; - } - - res *= 10; - res += c - '0'; - } - - return res; -} - -/* frame->hd.type is either NGHTTP2_HEADERS or NGHTTP2_PUSH_PROMISE */ -static int on_header(nghttp2_session *session, const nghttp2_frame *frame, - const uint8_t *name, size_t namelen, - const uint8_t *value, size_t valuelen, - uint8_t flags, - void *userp) -{ - struct HTTP *stream; - struct Curl_easy *data_s; - int32_t stream_id = frame->hd.stream_id; - struct connectdata *conn = (struct connectdata *)userp; - (void)flags; - - DEBUGASSERT(stream_id); /* should never be a zero stream ID here */ - - /* get the stream from the hash based on Stream ID */ - data_s = nghttp2_session_get_stream_user_data(session, stream_id); - if(!data_s) - /* Receiving a Stream ID not in the hash should not happen, this is an - internal error more than anything else! */ - return NGHTTP2_ERR_CALLBACK_FAILURE; - - stream = data_s->req.protop; - if(!stream) { - failf(data_s, "Internal NULL stream! 5\n"); - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - - /* Store received PUSH_PROMISE headers to be used when the subsequent - PUSH_PROMISE callback comes */ - if(frame->hd.type == NGHTTP2_PUSH_PROMISE) { - char *h; - - if(!stream->push_headers) { - stream->push_headers_alloc = 10; - stream->push_headers = malloc(stream->push_headers_alloc * - sizeof(char *)); - stream->push_headers_used = 0; - } - else if(stream->push_headers_used == - stream->push_headers_alloc) { - char **headp; - stream->push_headers_alloc *= 2; - headp = Curl_saferealloc(stream->push_headers, - stream->push_headers_alloc * sizeof(char *)); - if(!headp) { - stream->push_headers = NULL; - return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; - } - stream->push_headers = headp; - } - h = aprintf("%s:%s", name, value); - if(h) - stream->push_headers[stream->push_headers_used++] = h; - return 0; - } - - if(stream->bodystarted) { - /* This is trailer fields. */ - /* 3 is for ":" and "\r\n". */ - uint32_t n = (uint32_t)(namelen + valuelen + 3); - - DEBUGF(infof(data_s, "h2 trailer: %.*s: %.*s\n", namelen, name, valuelen, - value)); - - Curl_add_buffer(stream->trailer_recvbuf, &n, sizeof(n)); - Curl_add_buffer(stream->trailer_recvbuf, name, namelen); - Curl_add_buffer(stream->trailer_recvbuf, ": ", 2); - Curl_add_buffer(stream->trailer_recvbuf, value, valuelen); - Curl_add_buffer(stream->trailer_recvbuf, "\r\n\0", 3); - - return 0; - } - - if(namelen == sizeof(":status") - 1 && - memcmp(":status", name, namelen) == 0) { - /* nghttp2 guarantees :status is received first and only once, and - value is 3 digits status code, and decode_status_code always - succeeds. */ - stream->status_code = decode_status_code(value, valuelen); - DEBUGASSERT(stream->status_code != -1); - - Curl_add_buffer(stream->header_recvbuf, "HTTP/2 ", 7); - Curl_add_buffer(stream->header_recvbuf, value, valuelen); - /* the space character after the status code is mandatory */ - Curl_add_buffer(stream->header_recvbuf, " \r\n", 3); - /* if we receive data for another handle, wake that up */ - if(conn->data != data_s) - Curl_expire(data_s, 0); - - DEBUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)\n", - stream->status_code, data_s)); - return 0; - } - - /* nghttp2 guarantees that namelen > 0, and :status was already - received, and this is not pseudo-header field . */ - /* convert to a HTTP1-style header */ - Curl_add_buffer(stream->header_recvbuf, name, namelen); - Curl_add_buffer(stream->header_recvbuf, ": ", 2); - Curl_add_buffer(stream->header_recvbuf, value, valuelen); - Curl_add_buffer(stream->header_recvbuf, "\r\n", 2); - /* if we receive data for another handle, wake that up */ - if(conn->data != data_s) - Curl_expire(data_s, 0); - - DEBUGF(infof(data_s, "h2 header: %.*s: %.*s\n", namelen, name, valuelen, - value)); - - return 0; /* 0 is successful */ -} - -static ssize_t data_source_read_callback(nghttp2_session *session, - int32_t stream_id, - uint8_t *buf, size_t length, - uint32_t *data_flags, - nghttp2_data_source *source, - void *userp) -{ - struct Curl_easy *data_s; - struct HTTP *stream = NULL; - size_t nread; - (void)source; - (void)userp; - - if(stream_id) { - /* get the stream from the hash based on Stream ID, stream ID zero is for - connection-oriented stuff */ - data_s = nghttp2_session_get_stream_user_data(session, stream_id); - if(!data_s) - /* Receiving a Stream ID not in the hash should not happen, this is an - internal error more than anything else! */ - return NGHTTP2_ERR_CALLBACK_FAILURE; - - stream = data_s->req.protop; - if(!stream) - return NGHTTP2_ERR_CALLBACK_FAILURE; - } - else - return NGHTTP2_ERR_INVALID_ARGUMENT; - - nread = MIN(stream->upload_len, length); - if(nread > 0) { - memcpy(buf, stream->upload_mem, nread); - stream->upload_mem += nread; - stream->upload_len -= nread; - if(data_s->state.infilesize != -1) - stream->upload_left -= nread; - } - - if(stream->upload_left == 0) - *data_flags = NGHTTP2_DATA_FLAG_EOF; - else if(nread == 0) - return NGHTTP2_ERR_DEFERRED; - - DEBUGF(infof(data_s, "data_source_read_callback: " - "returns %zu bytes stream %u\n", - nread, stream_id)); - - return nread; -} - -#define H2_BUFSIZE 32768 - -#ifdef NGHTTP2_HAS_ERROR_CALLBACK -static int error_callback(nghttp2_session *session, - const char *msg, - size_t len, - void *userp) -{ - struct connectdata *conn = (struct connectdata *)userp; - (void)session; - infof(conn->data, "http2 error: %.*s\n", len, msg); - return 0; -} -#endif - -static void populate_settings(struct connectdata *conn, - struct http_conn *httpc) -{ - nghttp2_settings_entry *iv = httpc->local_settings; - - iv[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS; - iv[0].value = 100; - - iv[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; - iv[1].value = HTTP2_HUGE_WINDOW_SIZE; - - iv[2].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH; - iv[2].value = conn->data->multi->push_cb != NULL; - - httpc->local_settings_num = 3; -} - -void Curl_http2_done(struct connectdata *conn, bool premature) -{ - struct Curl_easy *data = conn->data; - struct HTTP *http = data->req.protop; - struct http_conn *httpc = &conn->proto.httpc; - - if(http->header_recvbuf) { - DEBUGF(infof(data, "free header_recvbuf!!\n")); - Curl_add_buffer_free(http->header_recvbuf); - http->header_recvbuf = NULL; /* clear the pointer */ - Curl_add_buffer_free(http->trailer_recvbuf); - http->trailer_recvbuf = NULL; /* clear the pointer */ - if(http->push_headers) { - /* if they weren't used and then freed before */ - for(; http->push_headers_used > 0; --http->push_headers_used) { - free(http->push_headers[http->push_headers_used - 1]); - } - free(http->push_headers); - http->push_headers = NULL; - } - } - - if(premature) { - /* RST_STREAM */ - nghttp2_submit_rst_stream(httpc->h2, NGHTTP2_FLAG_NONE, http->stream_id, - NGHTTP2_STREAM_CLOSED); - if(http->stream_id == httpc->pause_stream_id) { - infof(data, "stopped the pause stream!\n"); - httpc->pause_stream_id = 0; - } - } - if(http->stream_id) { - nghttp2_session_set_stream_user_data(httpc->h2, http->stream_id, 0); - http->stream_id = 0; - } -} - -/* - * Initialize nghttp2 for a Curl connection - */ -CURLcode Curl_http2_init(struct connectdata *conn) -{ - if(!conn->proto.httpc.h2) { - int rc; - nghttp2_session_callbacks *callbacks; - - conn->proto.httpc.inbuf = malloc(H2_BUFSIZE); - if(conn->proto.httpc.inbuf == NULL) - return CURLE_OUT_OF_MEMORY; - - rc = nghttp2_session_callbacks_new(&callbacks); - - if(rc) { - failf(conn->data, "Couldn't initialize nghttp2 callbacks!"); - return CURLE_OUT_OF_MEMORY; /* most likely at least */ - } - - /* nghttp2_send_callback */ - nghttp2_session_callbacks_set_send_callback(callbacks, send_callback); - /* nghttp2_on_frame_recv_callback */ - nghttp2_session_callbacks_set_on_frame_recv_callback - (callbacks, on_frame_recv); - /* nghttp2_on_invalid_frame_recv_callback */ - nghttp2_session_callbacks_set_on_invalid_frame_recv_callback - (callbacks, on_invalid_frame_recv); - /* nghttp2_on_data_chunk_recv_callback */ - nghttp2_session_callbacks_set_on_data_chunk_recv_callback - (callbacks, on_data_chunk_recv); - /* nghttp2_before_frame_send_callback */ - nghttp2_session_callbacks_set_before_frame_send_callback - (callbacks, before_frame_send); - /* nghttp2_on_frame_send_callback */ - nghttp2_session_callbacks_set_on_frame_send_callback - (callbacks, on_frame_send); - /* nghttp2_on_frame_not_send_callback */ - nghttp2_session_callbacks_set_on_frame_not_send_callback - (callbacks, on_frame_not_send); - /* nghttp2_on_stream_close_callback */ - nghttp2_session_callbacks_set_on_stream_close_callback - (callbacks, on_stream_close); - /* nghttp2_on_begin_headers_callback */ - nghttp2_session_callbacks_set_on_begin_headers_callback - (callbacks, on_begin_headers); - /* nghttp2_on_header_callback */ - nghttp2_session_callbacks_set_on_header_callback(callbacks, on_header); - - nghttp2_session_callbacks_set_error_callback(callbacks, error_callback); - - /* The nghttp2 session is not yet setup, do it */ - rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn); - - nghttp2_session_callbacks_del(callbacks); - - if(rc) { - failf(conn->data, "Couldn't initialize nghttp2!"); - return CURLE_OUT_OF_MEMORY; /* most likely at least */ - } - } - return CURLE_OK; -} - -/* - * Append headers to ask for a HTTP1.1 to HTTP2 upgrade. - */ -CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, - struct connectdata *conn) -{ - CURLcode result; - ssize_t binlen; - char *base64; - size_t blen; - struct SingleRequest *k = &conn->data->req; - uint8_t *binsettings = conn->proto.httpc.binsettings; - struct http_conn *httpc = &conn->proto.httpc; - - populate_settings(conn, httpc); - - /* this returns number of bytes it wrote */ - binlen = nghttp2_pack_settings_payload(binsettings, H2_BINSETTINGS_LEN, - httpc->local_settings, - httpc->local_settings_num); - if(!binlen) { - failf(conn->data, "nghttp2 unexpectedly failed on pack_settings_payload"); - return CURLE_FAILED_INIT; - } - conn->proto.httpc.binlen = binlen; - - result = Curl_base64url_encode(conn->data, (const char *)binsettings, binlen, - &base64, &blen); - if(result) - return result; - - result = Curl_add_bufferf(req, - "Connection: Upgrade, HTTP2-Settings\r\n" - "Upgrade: %s\r\n" - "HTTP2-Settings: %s\r\n", - NGHTTP2_CLEARTEXT_PROTO_VERSION_ID, base64); - free(base64); - - k->upgr101 = UPGR101_REQUESTED; - - return result; -} - -/* - * Returns nonzero if current HTTP/2 session should be closed. - */ -static int should_close_session(struct http_conn *httpc) -{ - return httpc->drain_total == 0 && !nghttp2_session_want_read(httpc->h2) && - !nghttp2_session_want_write(httpc->h2); -} - -static int h2_session_send(struct Curl_easy *data, - nghttp2_session *h2); - -/* - * h2_process_pending_input() processes pending input left in - * httpc->inbuf. Then, call h2_session_send() to send pending data. - * This function returns 0 if it succeeds, or -1 and error code will - * be assigned to *err. - */ -static int h2_process_pending_input(struct Curl_easy *data, - struct http_conn *httpc, - CURLcode *err) -{ - ssize_t nread; - char *inbuf; - ssize_t rv; - - nread = httpc->inbuflen - httpc->nread_inbuf; - inbuf = httpc->inbuf + httpc->nread_inbuf; - - rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread); - if(rv < 0) { - failf(data, - "h2_process_pending_input: nghttp2_session_mem_recv() returned " - "%d:%s\n", rv, nghttp2_strerror((int)rv)); - *err = CURLE_RECV_ERROR; - return -1; - } - - if(nread == rv) { - DEBUGF(infof(data, - "h2_process_pending_input: All data in connection buffer " - "processed\n")); - httpc->inbuflen = 0; - httpc->nread_inbuf = 0; - } - else { - httpc->nread_inbuf += rv; - DEBUGF(infof(data, - "h2_process_pending_input: %zu bytes left in connection " - "buffer\n", - httpc->inbuflen - httpc->nread_inbuf)); - } - - rv = h2_session_send(data, httpc->h2); - if(rv != 0) { - *err = CURLE_SEND_ERROR; - return -1; - } - - if(should_close_session(httpc)) { - DEBUGF(infof(data, - "h2_process_pending_input: nothing to do in this session\n")); - *err = CURLE_HTTP2; - return -1; - } - - return 0; -} - -/* - * Called from transfer.c:done_sending when we stop uploading. - */ -CURLcode Curl_http2_done_sending(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - if((conn->handler == &Curl_handler_http2_ssl) || - (conn->handler == &Curl_handler_http2)) { - /* make sure this is only attempted for HTTP/2 transfers */ - - struct HTTP *stream = conn->data->req.protop; - - if(stream->upload_left) { - /* If the stream still thinks there's data left to upload. */ - struct http_conn *httpc = &conn->proto.httpc; - nghttp2_session *h2 = httpc->h2; - - stream->upload_left = 0; /* DONE! */ - - /* resume sending here to trigger the callback to get called again so - that it can signal EOF to nghttp2 */ - (void)nghttp2_session_resume_data(h2, stream->stream_id); - - (void)h2_process_pending_input(conn->data, httpc, &result); - } - } - return result; -} - - -static ssize_t http2_handle_stream_close(struct connectdata *conn, - struct Curl_easy *data, - struct HTTP *stream, CURLcode *err) -{ - char *trailer_pos, *trailer_end; - CURLcode result; - struct http_conn *httpc = &conn->proto.httpc; - - if(httpc->pause_stream_id == stream->stream_id) { - httpc->pause_stream_id = 0; - } - - DEBUGASSERT(httpc->drain_total >= data->state.drain); - httpc->drain_total -= data->state.drain; - data->state.drain = 0; - - if(httpc->pause_stream_id == 0) { - if(h2_process_pending_input(data, httpc, err) != 0) { - return -1; - } - } - - DEBUGASSERT(data->state.drain == 0); - - /* Reset to FALSE to prevent infinite loop in readwrite_data function. */ - stream->closed = FALSE; - if(stream->error_code != NGHTTP2_NO_ERROR) { - failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)", - stream->stream_id, Curl_http2_strerror(stream->error_code), - stream->error_code); - *err = CURLE_HTTP2_STREAM; - return -1; - } - - if(!stream->bodystarted) { - failf(data, "HTTP/2 stream %u was closed cleanly, but before getting " - " all response header fields, teated as error", - stream->stream_id); - *err = CURLE_HTTP2_STREAM; - return -1; - } - - if(stream->trailer_recvbuf && stream->trailer_recvbuf->buffer) { - trailer_pos = stream->trailer_recvbuf->buffer; - trailer_end = trailer_pos + stream->trailer_recvbuf->size_used; - - for(; trailer_pos < trailer_end;) { - uint32_t n; - memcpy(&n, trailer_pos, sizeof(n)); - trailer_pos += sizeof(n); - - result = Curl_client_write(conn, CLIENTWRITE_HEADER, trailer_pos, n); - if(result) { - *err = result; - return -1; - } - - trailer_pos += n + 1; - } - } - - stream->close_handled = TRUE; - - DEBUGF(infof(data, "http2_recv returns 0, http2_handle_stream_close\n")); - return 0; -} - -/* - * h2_pri_spec() fills in the pri_spec struct, used by nghttp2 to send weight - * and dependency to the peer. It also stores the updated values in the state - * struct. - */ - -static void h2_pri_spec(struct Curl_easy *data, - nghttp2_priority_spec *pri_spec) -{ - struct HTTP *depstream = (data->set.stream_depends_on? - data->set.stream_depends_on->req.protop:NULL); - int32_t depstream_id = depstream? depstream->stream_id:0; - nghttp2_priority_spec_init(pri_spec, depstream_id, data->set.stream_weight, - data->set.stream_depends_e); - data->state.stream_weight = data->set.stream_weight; - data->state.stream_depends_e = data->set.stream_depends_e; - data->state.stream_depends_on = data->set.stream_depends_on; -} - -/* - * h2_session_send() checks if there's been an update in the priority / - * dependency settings and if so it submits a PRIORITY frame with the updated - * info. - */ -static int h2_session_send(struct Curl_easy *data, - nghttp2_session *h2) -{ - struct HTTP *stream = data->req.protop; - if((data->set.stream_weight != data->state.stream_weight) || - (data->set.stream_depends_e != data->state.stream_depends_e) || - (data->set.stream_depends_on != data->state.stream_depends_on) ) { - /* send new weight and/or dependency */ - nghttp2_priority_spec pri_spec; - int rv; - - h2_pri_spec(data, &pri_spec); - - DEBUGF(infof(data, "Queuing PRIORITY on stream %u (easy %p)\n", - stream->stream_id, data)); - rv = nghttp2_submit_priority(h2, NGHTTP2_FLAG_NONE, stream->stream_id, - &pri_spec); - if(rv) - return rv; - } - - return nghttp2_session_send(h2); -} - -static ssize_t http2_recv(struct connectdata *conn, int sockindex, - char *mem, size_t len, CURLcode *err) -{ - CURLcode result = CURLE_OK; - ssize_t rv; - ssize_t nread; - struct http_conn *httpc = &conn->proto.httpc; - struct Curl_easy *data = conn->data; - struct HTTP *stream = data->req.protop; - - (void)sockindex; /* we always do HTTP2 on sockindex 0 */ - - if(should_close_session(httpc)) { - DEBUGF(infof(data, - "http2_recv: nothing to do in this session\n")); - *err = CURLE_HTTP2; - return -1; - } - - /* Nullify here because we call nghttp2_session_send() and they - might refer to the old buffer. */ - stream->upload_mem = NULL; - stream->upload_len = 0; - - /* - * At this point 'stream' is just in the Curl_easy the connection - * identifies as its owner at this time. - */ - - if(stream->bodystarted && - stream->nread_header_recvbuf < stream->header_recvbuf->size_used) { - /* If there is body data pending for this stream to return, do that */ - size_t left = - stream->header_recvbuf->size_used - stream->nread_header_recvbuf; - size_t ncopy = MIN(len, left); - memcpy(mem, stream->header_recvbuf->buffer + stream->nread_header_recvbuf, - ncopy); - stream->nread_header_recvbuf += ncopy; - - DEBUGF(infof(data, "http2_recv: Got %d bytes from header_recvbuf\n", - (int)ncopy)); - return ncopy; - } - - DEBUGF(infof(data, "http2_recv: easy %p (stream %u)\n", - data, stream->stream_id)); - - if((data->state.drain) && stream->memlen) { - DEBUGF(infof(data, "http2_recv: DRAIN %zu bytes stream %u!! (%p => %p)\n", - stream->memlen, stream->stream_id, - stream->mem, mem)); - if(mem != stream->mem) { - /* if we didn't get the same buffer this time, we must move the data to - the beginning */ - memmove(mem, stream->mem, stream->memlen); - stream->len = len - stream->memlen; - stream->mem = mem; - } - if(httpc->pause_stream_id == stream->stream_id && !stream->pausedata) { - /* We have paused nghttp2, but we have no pause data (see - on_data_chunk_recv). */ - httpc->pause_stream_id = 0; - if(h2_process_pending_input(data, httpc, &result) != 0) { - *err = result; - return -1; - } - } - } - else if(stream->pausedata) { - DEBUGASSERT(httpc->pause_stream_id == stream->stream_id); - nread = MIN(len, stream->pauselen); - memcpy(mem, stream->pausedata, nread); - - stream->pausedata += nread; - stream->pauselen -= nread; - - infof(data, "%zu data bytes written\n", nread); - if(stream->pauselen == 0) { - DEBUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id)); - assert(httpc->pause_stream_id == stream->stream_id); - httpc->pause_stream_id = 0; - - stream->pausedata = NULL; - stream->pauselen = 0; - - /* When NGHTTP2_ERR_PAUSE is returned from - data_source_read_callback, we might not process DATA frame - fully. Calling nghttp2_session_mem_recv() again will - continue to process DATA frame, but if there is no incoming - frames, then we have to call it again with 0-length data. - Without this, on_stream_close callback will not be called, - and stream could be hanged. */ - if(h2_process_pending_input(data, httpc, &result) != 0) { - *err = result; - return -1; - } - } - DEBUGF(infof(data, "http2_recv: returns unpaused %zd bytes on stream %u\n", - nread, stream->stream_id)); - return nread; - } - else if(httpc->pause_stream_id) { - /* If a stream paused nghttp2_session_mem_recv previously, and has - not processed all data, it still refers to the buffer in - nghttp2_session. If we call nghttp2_session_mem_recv(), we may - overwrite that buffer. To avoid that situation, just return - here with CURLE_AGAIN. This could be busy loop since data in - socket is not read. But it seems that usually streams are - notified with its drain property, and socket is read again - quickly. */ - DEBUGF(infof(data, "stream %x is paused, pause id: %x\n", - stream->stream_id, httpc->pause_stream_id)); - *err = CURLE_AGAIN; - return -1; - } - else { - char *inbuf; - /* remember where to store incoming data for this stream and how big the - buffer is */ - stream->mem = mem; - stream->len = len; - stream->memlen = 0; - - if(httpc->inbuflen == 0) { - nread = ((Curl_recv *)httpc->recv_underlying)( - conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result); - - if(nread == -1) { - if(result != CURLE_AGAIN) - failf(data, "Failed receiving HTTP2 data"); - else if(stream->closed) - /* received when the stream was already closed! */ - return http2_handle_stream_close(conn, data, stream, err); - - *err = result; - return -1; - } - - if(nread == 0) { - failf(data, "Unexpected EOF"); - *err = CURLE_RECV_ERROR; - return -1; - } - - DEBUGF(infof(data, "nread=%zd\n", nread)); - - httpc->inbuflen = nread; - inbuf = httpc->inbuf; - } - else { - nread = httpc->inbuflen - httpc->nread_inbuf; - inbuf = httpc->inbuf + httpc->nread_inbuf; - - DEBUGF(infof(data, "Use data left in connection buffer, nread=%zd\n", - nread)); - } - rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread); - - if(nghttp2_is_fatal((int)rv)) { - failf(data, "nghttp2_session_mem_recv() returned %d:%s\n", - rv, nghttp2_strerror((int)rv)); - *err = CURLE_RECV_ERROR; - return 0; - } - DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", rv)); - if(nread == rv) { - DEBUGF(infof(data, "All data in connection buffer processed\n")); - httpc->inbuflen = 0; - httpc->nread_inbuf = 0; - } - else { - httpc->nread_inbuf += rv; - DEBUGF(infof(data, "%zu bytes left in connection buffer\n", - httpc->inbuflen - httpc->nread_inbuf)); - } - /* Always send pending frames in nghttp2 session, because - nghttp2_session_mem_recv() may queue new frame */ - rv = h2_session_send(data, httpc->h2); - if(rv != 0) { - *err = CURLE_SEND_ERROR; - return 0; - } - - if(should_close_session(httpc)) { - DEBUGF(infof(data, "http2_recv: nothing to do in this session\n")); - *err = CURLE_HTTP2; - return -1; - } - } - if(stream->memlen) { - ssize_t retlen = stream->memlen; - DEBUGF(infof(data, "http2_recv: returns %zd for stream %u\n", - retlen, stream->stream_id)); - stream->memlen = 0; - - if(httpc->pause_stream_id == stream->stream_id) { - /* data for this stream is returned now, but this stream caused a pause - already so we need it called again asap */ - DEBUGF(infof(data, "Data returned for PAUSED stream %u\n", - stream->stream_id)); - } - else if(!stream->closed) { - DEBUGASSERT(httpc->drain_total >= data->state.drain); - httpc->drain_total -= data->state.drain; - data->state.drain = 0; /* this stream is hereby drained */ - } - - return retlen; - } - /* If stream is closed, return 0 to signal the http routine to close - the connection */ - if(stream->closed) { - return http2_handle_stream_close(conn, data, stream, err); - } - *err = CURLE_AGAIN; - DEBUGF(infof(data, "http2_recv returns AGAIN for stream %u\n", - stream->stream_id)); - return -1; -} - -/* Index where :authority header field will appear in request header - field list. */ -#define AUTHORITY_DST_IDX 3 - -#define HEADER_OVERFLOW(x) \ - (x.namelen > (uint16_t)-1 || x.valuelen > (uint16_t)-1 - x.namelen) - -/* - * Check header memory for the token "trailers". - * Parse the tokens as separated by comma and surrounded by whitespace. - * Returns TRUE if found or FALSE if not. - */ -static bool contains_trailers(const char *p, size_t len) -{ - const char *end = p + len; - for(;;) { - for(; p != end && (*p == ' ' || *p == '\t'); ++p) - ; - if(p == end || (size_t)(end - p) < sizeof("trailers") - 1) - return FALSE; - if(strncasecompare("trailers", p, sizeof("trailers") - 1)) { - p += sizeof("trailers") - 1; - for(; p != end && (*p == ' ' || *p == '\t'); ++p) - ; - if(p == end || *p == ',') - return TRUE; - } - /* skip to next token */ - for(; p != end && *p != ','; ++p) - ; - if(p == end) - return FALSE; - ++p; - } -} - -typedef enum { - /* Send header to server */ - HEADERINST_FORWARD, - /* Don't send header to server */ - HEADERINST_IGNORE, - /* Discard header, and replace it with "te: trailers" */ - HEADERINST_TE_TRAILERS -} header_instruction; - -/* Decides how to treat given header field. */ -static header_instruction inspect_header(const char *name, size_t namelen, - const char *value, size_t valuelen) { - switch(namelen) { - case 2: - if(!strncasecompare("te", name, namelen)) - return HEADERINST_FORWARD; - - return contains_trailers(value, valuelen) ? - HEADERINST_TE_TRAILERS : HEADERINST_IGNORE; - case 7: - return strncasecompare("upgrade", name, namelen) ? - HEADERINST_IGNORE : HEADERINST_FORWARD; - case 10: - return (strncasecompare("connection", name, namelen) || - strncasecompare("keep-alive", name, namelen)) ? - HEADERINST_IGNORE : HEADERINST_FORWARD; - case 16: - return strncasecompare("proxy-connection", name, namelen) ? - HEADERINST_IGNORE : HEADERINST_FORWARD; - case 17: - return strncasecompare("transfer-encoding", name, namelen) ? - HEADERINST_IGNORE : HEADERINST_FORWARD; - default: - return HEADERINST_FORWARD; - } -} - -static ssize_t http2_send(struct connectdata *conn, int sockindex, - const void *mem, size_t len, CURLcode *err) -{ - /* - * BIG TODO: Currently, we send request in this function, but this - * function is also used to send request body. It would be nice to - * add dedicated function for request. - */ - int rv; - struct http_conn *httpc = &conn->proto.httpc; - struct HTTP *stream = conn->data->req.protop; - nghttp2_nv *nva = NULL; - size_t nheader; - size_t i; - size_t authority_idx; - char *hdbuf = (char *)mem; - char *end, *line_end; - nghttp2_data_provider data_prd; - int32_t stream_id; - nghttp2_session *h2 = httpc->h2; - nghttp2_priority_spec pri_spec; - - (void)sockindex; - - DEBUGF(infof(conn->data, "http2_send len=%zu\n", len)); - - if(stream->stream_id != -1) { - if(stream->close_handled) { - infof(conn->data, "stream %d closed\n", stream->stream_id); - *err = CURLE_HTTP2_STREAM; - return -1; - } - else if(stream->closed) { - return http2_handle_stream_close(conn, conn->data, stream, err); - } - /* If stream_id != -1, we have dispatched request HEADERS, and now - are going to send or sending request body in DATA frame */ - stream->upload_mem = mem; - stream->upload_len = len; - nghttp2_session_resume_data(h2, stream->stream_id); - rv = h2_session_send(conn->data, h2); - if(nghttp2_is_fatal(rv)) { - *err = CURLE_SEND_ERROR; - return -1; - } - len -= stream->upload_len; - - /* Nullify here because we call nghttp2_session_send() and they - might refer to the old buffer. */ - stream->upload_mem = NULL; - stream->upload_len = 0; - - if(should_close_session(httpc)) { - DEBUGF(infof(conn->data, "http2_send: nothing to do in this session\n")); - *err = CURLE_HTTP2; - return -1; - } - - if(stream->upload_left) { - /* we are sure that we have more data to send here. Calling the - following API will make nghttp2_session_want_write() return - nonzero if remote window allows it, which then libcurl checks - socket is writable or not. See http2_perform_getsock(). */ - nghttp2_session_resume_data(h2, stream->stream_id); - } - - DEBUGF(infof(conn->data, "http2_send returns %zu for stream %u\n", len, - stream->stream_id)); - return len; - } - - /* Calculate number of headers contained in [mem, mem + len) */ - /* Here, we assume the curl http code generate *correct* HTTP header - field block */ - nheader = 0; - for(i = 1; i < len; ++i) { - if(hdbuf[i] == '\n' && hdbuf[i - 1] == '\r') { - ++nheader; - ++i; - } - } - if(nheader < 2) - goto fail; - - /* We counted additional 2 \r\n in the first and last line. We need 3 - new headers: :method, :path and :scheme. Therefore we need one - more space. */ - nheader += 1; - nva = malloc(sizeof(nghttp2_nv) * nheader); - if(nva == NULL) { - *err = CURLE_OUT_OF_MEMORY; - return -1; - } - - /* Extract :method, :path from request line */ - line_end = strstr(hdbuf, "\r\n"); - - /* Method does not contain spaces */ - end = memchr(hdbuf, ' ', line_end - hdbuf); - if(!end || end == hdbuf) - goto fail; - nva[0].name = (unsigned char *)":method"; - nva[0].namelen = strlen((char *)nva[0].name); - nva[0].value = (unsigned char *)hdbuf; - nva[0].valuelen = (size_t)(end - hdbuf); - nva[0].flags = NGHTTP2_NV_FLAG_NONE; - if(HEADER_OVERFLOW(nva[0])) { - failf(conn->data, "Failed sending HTTP request: Header overflow"); - goto fail; - } - - hdbuf = end + 1; - - /* Path may contain spaces so scan backwards */ - end = NULL; - for(i = (size_t)(line_end - hdbuf); i; --i) { - if(hdbuf[i - 1] == ' ') { - end = &hdbuf[i - 1]; - break; - } - } - if(!end || end == hdbuf) - goto fail; - nva[1].name = (unsigned char *)":path"; - nva[1].namelen = strlen((char *)nva[1].name); - nva[1].value = (unsigned char *)hdbuf; - nva[1].valuelen = (size_t)(end - hdbuf); - nva[1].flags = NGHTTP2_NV_FLAG_NONE; - if(HEADER_OVERFLOW(nva[1])) { - failf(conn->data, "Failed sending HTTP request: Header overflow"); - goto fail; - } - - hdbuf = end + 1; - - end = line_end; - nva[2].name = (unsigned char *)":scheme"; - nva[2].namelen = strlen((char *)nva[2].name); - if(conn->handler->flags & PROTOPT_SSL) - nva[2].value = (unsigned char *)"https"; - else - nva[2].value = (unsigned char *)"http"; - nva[2].valuelen = strlen((char *)nva[2].value); - nva[2].flags = NGHTTP2_NV_FLAG_NONE; - if(HEADER_OVERFLOW(nva[2])) { - failf(conn->data, "Failed sending HTTP request: Header overflow"); - goto fail; - } - - authority_idx = 0; - i = 3; - while(i < nheader) { - size_t hlen; - - hdbuf = line_end + 2; - - line_end = strstr(hdbuf, "\r\n"); - if(line_end == hdbuf) - goto fail; - - /* header continuation lines are not supported */ - if(*hdbuf == ' ' || *hdbuf == '\t') - goto fail; - - for(end = hdbuf; end < line_end && *end != ':'; ++end) - ; - if(end == hdbuf || end == line_end) - goto fail; - hlen = end - hdbuf; - - if(hlen == 4 && strncasecompare("host", hdbuf, 4)) { - authority_idx = i; - nva[i].name = (unsigned char *)":authority"; - nva[i].namelen = strlen((char *)nva[i].name); - } - else { - nva[i].name = (unsigned char *)hdbuf; - nva[i].namelen = (size_t)(end - hdbuf); - } - hdbuf = end + 1; - while(*hdbuf == ' ' || *hdbuf == '\t') - ++hdbuf; - end = line_end; - - switch(inspect_header((const char *)nva[i].name, nva[i].namelen, hdbuf, - end - hdbuf)) { - case HEADERINST_IGNORE: - /* skip header fields prohibited by HTTP/2 specification. */ - --nheader; - continue; - case HEADERINST_TE_TRAILERS: - nva[i].value = (uint8_t*)"trailers"; - nva[i].valuelen = sizeof("trailers") - 1; - break; - default: - nva[i].value = (unsigned char *)hdbuf; - nva[i].valuelen = (size_t)(end - hdbuf); - } - - nva[i].flags = NGHTTP2_NV_FLAG_NONE; - if(HEADER_OVERFLOW(nva[i])) { - failf(conn->data, "Failed sending HTTP request: Header overflow"); - goto fail; - } - ++i; - } - - /* :authority must come before non-pseudo header fields */ - if(authority_idx != 0 && authority_idx != AUTHORITY_DST_IDX) { - nghttp2_nv authority = nva[authority_idx]; - for(i = authority_idx; i > AUTHORITY_DST_IDX; --i) { - nva[i] = nva[i - 1]; - } - nva[i] = authority; - } - - /* Warn stream may be rejected if cumulative length of headers is too large. - It appears nghttp2 will not send a header frame larger than 64KB. */ -#define MAX_ACC 60000 /* <64KB to account for some overhead */ - { - size_t acc = 0; - - for(i = 0; i < nheader; ++i) { - acc += nva[i].namelen + nva[i].valuelen; - - DEBUGF(infof(conn->data, "h2 header: %.*s:%.*s\n", - nva[i].namelen, nva[i].name, - nva[i].valuelen, nva[i].value)); - } - - if(acc > MAX_ACC) { - infof(conn->data, "http2_send: Warning: The cumulative length of all " - "headers exceeds %zu bytes and that could cause the " - "stream to be rejected.\n", MAX_ACC); - } - } - - h2_pri_spec(conn->data, &pri_spec); - - switch(conn->data->set.httpreq) { - case HTTPREQ_POST: - case HTTPREQ_POST_FORM: - case HTTPREQ_PUT: - if(conn->data->state.infilesize != -1) - stream->upload_left = conn->data->state.infilesize; - else - /* data sending without specifying the data amount up front */ - stream->upload_left = -1; /* unknown, but not zero */ - - data_prd.read_callback = data_source_read_callback; - data_prd.source.ptr = NULL; - stream_id = nghttp2_submit_request(h2, &pri_spec, nva, nheader, - &data_prd, conn->data); - break; - default: - stream_id = nghttp2_submit_request(h2, &pri_spec, nva, nheader, - NULL, conn->data); - } - - Curl_safefree(nva); - - if(stream_id < 0) { - DEBUGF(infof(conn->data, "http2_send() send error\n")); - *err = CURLE_SEND_ERROR; - return -1; - } - - infof(conn->data, "Using Stream ID: %x (easy handle %p)\n", - stream_id, conn->data); - stream->stream_id = stream_id; - - /* this does not call h2_session_send() since there can not have been any - * priority upodate since the nghttp2_submit_request() call above */ - rv = nghttp2_session_send(h2); - - if(rv != 0) { - *err = CURLE_SEND_ERROR; - return -1; - } - - if(should_close_session(httpc)) { - DEBUGF(infof(conn->data, "http2_send: nothing to do in this session\n")); - *err = CURLE_HTTP2; - return -1; - } - - if(stream->stream_id != -1) { - /* If whole HEADERS frame was sent off to the underlying socket, - the nghttp2 library calls data_source_read_callback. But only - it found that no data available, so it deferred the DATA - transmission. Which means that nghttp2_session_want_write() - returns 0 on http2_perform_getsock(), which results that no - writable socket check is performed. To workaround this, we - issue nghttp2_session_resume_data() here to bring back DATA - transmission from deferred state. */ - nghttp2_session_resume_data(h2, stream->stream_id); - } - - return len; - -fail: - free(nva); - *err = CURLE_SEND_ERROR; - return -1; -} - -CURLcode Curl_http2_setup(struct connectdata *conn) -{ - CURLcode result; - struct http_conn *httpc = &conn->proto.httpc; - struct HTTP *stream = conn->data->req.protop; - - stream->stream_id = -1; - - if(!stream->header_recvbuf) - stream->header_recvbuf = Curl_add_buffer_init(); - - if((conn->handler == &Curl_handler_http2_ssl) || - (conn->handler == &Curl_handler_http2)) - return CURLE_OK; /* already done */ - - if(conn->handler->flags & PROTOPT_SSL) - conn->handler = &Curl_handler_http2_ssl; - else - conn->handler = &Curl_handler_http2; - - result = Curl_http2_init(conn); - if(result) - return result; - - infof(conn->data, "Using HTTP2, server supports multi-use\n"); - stream->upload_left = 0; - stream->upload_mem = NULL; - stream->upload_len = 0; - - httpc->inbuflen = 0; - httpc->nread_inbuf = 0; - - httpc->pause_stream_id = 0; - httpc->drain_total = 0; - - conn->bits.multiplex = TRUE; /* at least potentially multiplexed */ - conn->httpversion = 20; - conn->bundle->multiuse = BUNDLE_MULTIPLEX; - - infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n"); - Curl_multi_connchanged(conn->data->multi); - - return CURLE_OK; -} - -CURLcode Curl_http2_switched(struct connectdata *conn, - const char *mem, size_t nread) -{ - CURLcode result; - struct http_conn *httpc = &conn->proto.httpc; - int rv; - ssize_t nproc; - struct Curl_easy *data = conn->data; - struct HTTP *stream = conn->data->req.protop; - - result = Curl_http2_setup(conn); - if(result) - return result; - - httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET]; - httpc->send_underlying = (sending)conn->send[FIRSTSOCKET]; - conn->recv[FIRSTSOCKET] = http2_recv; - conn->send[FIRSTSOCKET] = http2_send; - - if(conn->data->req.upgr101 == UPGR101_RECEIVED) { - /* stream 1 is opened implicitly on upgrade */ - stream->stream_id = 1; - /* queue SETTINGS frame (again) */ - rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings, - httpc->binlen, NULL); - if(rv != 0) { - failf(data, "nghttp2_session_upgrade() failed: %s(%d)", - nghttp2_strerror(rv), rv); - return CURLE_HTTP2; - } - - nghttp2_session_set_stream_user_data(httpc->h2, - stream->stream_id, - conn->data); - } - else { - populate_settings(conn, httpc); - - /* stream ID is unknown at this point */ - stream->stream_id = -1; - rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, - httpc->local_settings, - httpc->local_settings_num); - if(rv != 0) { - failf(data, "nghttp2_submit_settings() failed: %s(%d)", - nghttp2_strerror(rv), rv); - return CURLE_HTTP2; - } - } - -#ifdef NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE - rv = nghttp2_session_set_local_window_size(httpc->h2, NGHTTP2_FLAG_NONE, 0, - HTTP2_HUGE_WINDOW_SIZE); - if(rv != 0) { - failf(data, "nghttp2_session_set_local_window_size() failed: %s(%d)", - nghttp2_strerror(rv), rv); - return CURLE_HTTP2; - } -#endif - - /* we are going to copy mem to httpc->inbuf. This is required since - mem is part of buffer pointed by stream->mem, and callbacks - called by nghttp2_session_mem_recv() will write stream specific - data into stream->mem, overwriting data already there. */ - if(H2_BUFSIZE < nread) { - failf(data, "connection buffer size is too small to store data following " - "HTTP Upgrade response header: buflen=%zu, datalen=%zu", - H2_BUFSIZE, nread); - return CURLE_HTTP2; - } - - infof(conn->data, "Copying HTTP/2 data in stream buffer to connection buffer" - " after upgrade: len=%zu\n", - nread); - - if(nread) - memcpy(httpc->inbuf, mem, nread); - httpc->inbuflen = nread; - - nproc = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)httpc->inbuf, - httpc->inbuflen); - - if(nghttp2_is_fatal((int)nproc)) { - failf(data, "nghttp2_session_mem_recv() failed: %s(%d)", - nghttp2_strerror((int)nproc), (int)nproc); - return CURLE_HTTP2; - } - - DEBUGF(infof(data, "nghttp2_session_mem_recv() returns %zd\n", nproc)); - - if((ssize_t)nread == nproc) { - httpc->inbuflen = 0; - httpc->nread_inbuf = 0; - } - else { - httpc->nread_inbuf += nproc; - } - - /* Try to send some frames since we may read SETTINGS already. */ - rv = h2_session_send(data, httpc->h2); - - if(rv != 0) { - failf(data, "nghttp2_session_send() failed: %s(%d)", - nghttp2_strerror(rv), rv); - return CURLE_HTTP2; - } - - if(should_close_session(httpc)) { - DEBUGF(infof(data, - "nghttp2_session_send(): nothing to do in this session\n")); - return CURLE_HTTP2; - } - - return CURLE_OK; -} - -void Curl_http2_add_child(struct Curl_easy *parent, struct Curl_easy *child, - bool exclusive) -{ - struct Curl_http2_dep **tail; - struct Curl_http2_dep *dep = calloc(1, sizeof(struct Curl_http2_dep)); - dep->data = child; - - if(parent->set.stream_dependents && exclusive) { - struct Curl_http2_dep *node = parent->set.stream_dependents; - while(node) { - node->data->set.stream_depends_on = child; - node = node->next; - } - - tail = &child->set.stream_dependents; - while(*tail) - tail = &(*tail)->next; - - DEBUGASSERT(!*tail); - *tail = parent->set.stream_dependents; - parent->set.stream_dependents = 0; - } - - tail = &parent->set.stream_dependents; - while(*tail) { - (*tail)->data->set.stream_depends_e = FALSE; - tail = &(*tail)->next; - } - - DEBUGASSERT(!*tail); - *tail = dep; - - child->set.stream_depends_on = parent; - child->set.stream_depends_e = exclusive; -} - -void Curl_http2_remove_child(struct Curl_easy *parent, struct Curl_easy *child) -{ - struct Curl_http2_dep *last = 0; - struct Curl_http2_dep *data = parent->set.stream_dependents; - DEBUGASSERT(child->set.stream_depends_on == parent); - - while(data && data->data != child) { - last = data; - data = data->next; - } - - DEBUGASSERT(data); - - if(data) { - if(last) { - last->next = data->next; - } - else { - parent->set.stream_dependents = data->next; - } - free(data); - } - - child->set.stream_depends_on = 0; - child->set.stream_depends_e = FALSE; -} - -void Curl_http2_cleanup_dependencies(struct Curl_easy *data) -{ - while(data->set.stream_dependents) { - struct Curl_easy *tmp = data->set.stream_dependents->data; - Curl_http2_remove_child(data, tmp); - if(data->set.stream_depends_on) - Curl_http2_add_child(data->set.stream_depends_on, tmp, FALSE); - } - - if(data->set.stream_depends_on) - Curl_http2_remove_child(data->set.stream_depends_on, data); -} - -#else /* !USE_NGHTTP2 */ - -/* Satisfy external references even if http2 is not compiled in. */ - -#define CURL_DISABLE_TYPECHECK -#include - -char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num) -{ - (void) h; - (void) num; - return NULL; -} - -char *curl_pushheader_byname(struct curl_pushheaders *h, const char *header) -{ - (void) h; - (void) header; - return NULL; -} - -#endif /* USE_NGHTTP2 */ diff --git a/build/premake/premake5/contrib/curl/lib/http2.h b/build/premake/premake5/contrib/curl/lib/http2.h deleted file mode 100644 index f405b3aebd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http2.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef HEADER_CURL_HTTP2_H -#define HEADER_CURL_HTTP2_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_NGHTTP2 -#include "http.h" - -/* value for MAX_CONCURRENT_STREAMS we use until we get an updated setting - from the peer */ -#define DEFAULT_MAX_CONCURRENT_STREAMS 13 - -/* - * Store nghttp2 version info in this buffer, Prefix with a space. Return - * total length written. - */ -int Curl_http2_ver(char *p, size_t len); - -const char *Curl_http2_strerror(uint32_t err); - -CURLcode Curl_http2_init(struct connectdata *conn); -void Curl_http2_init_state(struct UrlState *state); -void Curl_http2_init_userset(struct UserDefined *set); -CURLcode Curl_http2_send_request(struct connectdata *conn); -CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, - struct connectdata *conn); -CURLcode Curl_http2_setup(struct connectdata *conn); -CURLcode Curl_http2_switched(struct connectdata *conn, - const char *data, size_t nread); -/* called from Curl_http_setup_conn */ -void Curl_http2_setup_conn(struct connectdata *conn); -void Curl_http2_setup_req(struct Curl_easy *data); -void Curl_http2_done(struct connectdata *conn, bool premature); -CURLcode Curl_http2_done_sending(struct connectdata *conn); -void Curl_http2_add_child(struct Curl_easy *parent, struct Curl_easy *child, - bool exclusive); -void Curl_http2_remove_child(struct Curl_easy *parent, - struct Curl_easy *child); -void Curl_http2_cleanup_dependencies(struct Curl_easy *data); -#else /* USE_NGHTTP2 */ -#define Curl_http2_init(x) CURLE_UNSUPPORTED_PROTOCOL -#define Curl_http2_send_request(x) CURLE_UNSUPPORTED_PROTOCOL -#define Curl_http2_request_upgrade(x,y) CURLE_UNSUPPORTED_PROTOCOL -#define Curl_http2_setup(x) CURLE_UNSUPPORTED_PROTOCOL -#define Curl_http2_switched(x,y,z) CURLE_UNSUPPORTED_PROTOCOL -#define Curl_http2_setup_conn(x) -#define Curl_http2_setup_req(x) -#define Curl_http2_init_state(x) -#define Curl_http2_init_userset(x) -#define Curl_http2_done(x,y) -#define Curl_http2_done_sending(x) -#define Curl_http2_add_child(x, y, z) -#define Curl_http2_remove_child(x, y) -#define Curl_http2_cleanup_dependencies(x) -#endif - -#endif /* HEADER_CURL_HTTP2_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/http_chunks.c b/build/premake/premake5/contrib/curl/lib/http_chunks.c deleted file mode 100644 index 1bdf6974c1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_chunks.c +++ /dev/null @@ -1,381 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_HTTP - -#include "urldata.h" /* it includes http_chunks.h */ -#include "sendf.h" /* for the client write stuff */ - -#include "content_encoding.h" -#include "http.h" -#include "non-ascii.h" /* for Curl_convert_to_network prototype */ -#include "strtoofft.h" -#include "warnless.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Chunk format (simplified): - * - * [ chunk extension ] CRLF - * CRLF - * - * Highlights from RFC2616 section 3.6 say: - - The chunked encoding modifies the body of a message in order to - transfer it as a series of chunks, each with its own size indicator, - followed by an OPTIONAL trailer containing entity-header fields. This - allows dynamically produced content to be transferred along with the - information necessary for the recipient to verify that it has - received the full message. - - Chunked-Body = *chunk - last-chunk - trailer - CRLF - - chunk = chunk-size [ chunk-extension ] CRLF - chunk-data CRLF - chunk-size = 1*HEX - last-chunk = 1*("0") [ chunk-extension ] CRLF - - chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] ) - chunk-ext-name = token - chunk-ext-val = token | quoted-string - chunk-data = chunk-size(OCTET) - trailer = *(entity-header CRLF) - - The chunk-size field is a string of hex digits indicating the size of - the chunk. The chunked encoding is ended by any chunk whose size is - zero, followed by the trailer, which is terminated by an empty line. - - */ - -/* Check for an ASCII hex digit. - We avoid the use of isxdigit to accommodate non-ASCII hosts. */ -static bool Curl_isxdigit(char digit) -{ - return ( (digit >= 0x30 && digit <= 0x39) /* 0-9 */ - || (digit >= 0x41 && digit <= 0x46) /* A-F */ - || (digit >= 0x61 && digit <= 0x66) /* a-f */) ? TRUE : FALSE; -} - -void Curl_httpchunk_init(struct connectdata *conn) -{ - struct Curl_chunker *chunk = &conn->chunk; - chunk->hexindex=0; /* start at 0 */ - chunk->dataleft=0; /* no data left yet! */ - chunk->state = CHUNK_HEX; /* we get hex first! */ -} - -/* - * chunk_read() returns a OK for normal operations, or a positive return code - * for errors. STOP means this sequence of chunks is complete. The 'wrote' - * argument is set to tell the caller how many bytes we actually passed to the - * client (for byte-counting and whatever). - * - * The states and the state-machine is further explained in the header file. - * - * This function always uses ASCII hex values to accommodate non-ASCII hosts. - * For example, 0x0d and 0x0a are used instead of '\r' and '\n'. - */ -CHUNKcode Curl_httpchunk_read(struct connectdata *conn, - char *datap, - ssize_t datalen, - ssize_t *wrotep) -{ - CURLcode result=CURLE_OK; - struct Curl_easy *data = conn->data; - struct Curl_chunker *ch = &conn->chunk; - struct SingleRequest *k = &data->req; - size_t piece; - curl_off_t length = (curl_off_t)datalen; - size_t *wrote = (size_t *)wrotep; - - *wrote = 0; /* nothing's written yet */ - - /* the original data is written to the client, but we go on with the - chunk read process, to properly calculate the content length*/ - if(data->set.http_te_skip && !k->ignorebody) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, datalen); - if(result) - return CHUNKE_WRITE_ERROR; - } - - while(length) { - switch(ch->state) { - case CHUNK_HEX: - if(Curl_isxdigit(*datap)) { - if(ch->hexindex < MAXNUM_SIZE) { - ch->hexbuffer[ch->hexindex] = *datap; - datap++; - length--; - ch->hexindex++; - } - else { - return CHUNKE_TOO_LONG_HEX; /* longer hex than we support */ - } - } - else { - char *endptr; - if(0 == ch->hexindex) - /* This is illegal data, we received junk where we expected - a hexadecimal digit. */ - return CHUNKE_ILLEGAL_HEX; - - /* length and datap are unmodified */ - ch->hexbuffer[ch->hexindex]=0; - - /* convert to host encoding before calling strtoul */ - result = Curl_convert_from_network(conn->data, ch->hexbuffer, - ch->hexindex); - if(result) { - /* Curl_convert_from_network calls failf if unsuccessful */ - /* Treat it as a bad hex character */ - return CHUNKE_ILLEGAL_HEX; - } - - ch->datasize=curlx_strtoofft(ch->hexbuffer, &endptr, 16); - if((ch->datasize == CURL_OFF_T_MAX) && (errno == ERANGE)) - /* overflow is an error */ - return CHUNKE_ILLEGAL_HEX; - ch->state = CHUNK_LF; /* now wait for the CRLF */ - } - break; - - case CHUNK_LF: - /* waiting for the LF after a chunk size */ - if(*datap == 0x0a) { - /* we're now expecting data to come, unless size was zero! */ - if(0 == ch->datasize) { - ch->state = CHUNK_TRAILER; /* now check for trailers */ - conn->trlPos=0; - } - else - ch->state = CHUNK_DATA; - } - - datap++; - length--; - break; - - case CHUNK_DATA: - /* We expect 'datasize' of data. We have 'length' right now, it can be - more or less than 'datasize'. Get the smallest piece. - */ - piece = curlx_sotouz((ch->datasize >= length)?length:ch->datasize); - - /* Write the data portion available */ -#ifdef HAVE_LIBZ - switch(conn->data->set.http_ce_skip? - IDENTITY : data->req.auto_decoding) { - case IDENTITY: -#endif - if(!k->ignorebody) { - if(!data->set.http_te_skip) - result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, - piece); - else - result = CURLE_OK; - } -#ifdef HAVE_LIBZ - break; - - case DEFLATE: - /* update data->req.keep.str to point to the chunk data. */ - data->req.str = datap; - result = Curl_unencode_deflate_write(conn, &data->req, - (ssize_t)piece); - break; - - case GZIP: - /* update data->req.keep.str to point to the chunk data. */ - data->req.str = datap; - result = Curl_unencode_gzip_write(conn, &data->req, - (ssize_t)piece); - break; - - default: - failf(conn->data, - "Unrecognized content encoding type. " - "libcurl understands `identity', `deflate' and `gzip' " - "content encodings."); - return CHUNKE_BAD_ENCODING; - } -#endif - - if(result) - return CHUNKE_WRITE_ERROR; - - *wrote += piece; - - ch->datasize -= piece; /* decrease amount left to expect */ - datap += piece; /* move read pointer forward */ - length -= piece; /* decrease space left in this round */ - - if(0 == ch->datasize) - /* end of data this round, we now expect a trailing CRLF */ - ch->state = CHUNK_POSTLF; - break; - - case CHUNK_POSTLF: - if(*datap == 0x0a) { - /* The last one before we go back to hex state and start all over. */ - Curl_httpchunk_init(conn); /* sets state back to CHUNK_HEX */ - } - else if(*datap != 0x0d) - return CHUNKE_BAD_CHUNK; - datap++; - length--; - break; - - case CHUNK_TRAILER: - if((*datap == 0x0d) || (*datap == 0x0a)) { - /* this is the end of a trailer, but if the trailer was zero bytes - there was no trailer and we move on */ - - if(conn->trlPos) { - /* we allocate trailer with 3 bytes extra room to fit this */ - conn->trailer[conn->trlPos++]=0x0d; - conn->trailer[conn->trlPos++]=0x0a; - conn->trailer[conn->trlPos]=0; - - /* Convert to host encoding before calling Curl_client_write */ - result = Curl_convert_from_network(conn->data, conn->trailer, - conn->trlPos); - if(result) - /* Curl_convert_from_network calls failf if unsuccessful */ - /* Treat it as a bad chunk */ - return CHUNKE_BAD_CHUNK; - - if(!data->set.http_te_skip) { - result = Curl_client_write(conn, CLIENTWRITE_HEADER, - conn->trailer, conn->trlPos); - if(result) - return CHUNKE_WRITE_ERROR; - } - conn->trlPos=0; - ch->state = CHUNK_TRAILER_CR; - if(*datap == 0x0a) - /* already on the LF */ - break; - } - else { - /* no trailer, we're on the final CRLF pair */ - ch->state = CHUNK_TRAILER_POSTCR; - break; /* don't advance the pointer */ - } - } - else { - /* conn->trailer is assumed to be freed in url.c on a - connection basis */ - if(conn->trlPos >= conn->trlMax) { - /* we always allocate three extra bytes, just because when the full - header has been received we append CRLF\0 */ - char *ptr; - if(conn->trlMax) { - conn->trlMax *= 2; - ptr = realloc(conn->trailer, conn->trlMax + 3); - } - else { - conn->trlMax=128; - ptr = malloc(conn->trlMax + 3); - } - if(!ptr) - return CHUNKE_OUT_OF_MEMORY; - conn->trailer = ptr; - } - conn->trailer[conn->trlPos++]=*datap; - } - datap++; - length--; - break; - - case CHUNK_TRAILER_CR: - if(*datap == 0x0a) { - ch->state = CHUNK_TRAILER_POSTCR; - datap++; - length--; - } - else - return CHUNKE_BAD_CHUNK; - break; - - case CHUNK_TRAILER_POSTCR: - /* We enter this state when a CR should arrive so we expect to - have to first pass a CR before we wait for LF */ - if((*datap != 0x0d) && (*datap != 0x0a)) { - /* not a CR then it must be another header in the trailer */ - ch->state = CHUNK_TRAILER; - break; - } - if(*datap == 0x0d) { - /* skip if CR */ - datap++; - length--; - } - /* now wait for the final LF */ - ch->state = CHUNK_STOP; - break; - - case CHUNK_STOP: - if(*datap == 0x0a) { - length--; - - /* Record the length of any data left in the end of the buffer - even if there's no more chunks to read */ - ch->dataleft = curlx_sotouz(length); - - return CHUNKE_STOP; /* return stop */ - } - else - return CHUNKE_BAD_CHUNK; - } - } - return CHUNKE_OK; -} - -const char *Curl_chunked_strerror(CHUNKcode code) -{ - switch(code) { - default: - return "OK"; - case CHUNKE_TOO_LONG_HEX: - return "Too long hexadecimal number"; - case CHUNKE_ILLEGAL_HEX: - return "Illegal or missing hexadecimal sequence"; - case CHUNKE_BAD_CHUNK: - return "Malformed encoding found"; - case CHUNKE_WRITE_ERROR: - return "Write error"; - case CHUNKE_BAD_ENCODING: - return "Bad content-encoding found"; - case CHUNKE_OUT_OF_MEMORY: - return "Out of memory"; - } -} - -#endif /* CURL_DISABLE_HTTP */ diff --git a/build/premake/premake5/contrib/curl/lib/http_chunks.h b/build/premake/premake5/contrib/curl/lib/http_chunks.h deleted file mode 100644 index 3a8b4ddf37..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_chunks.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef HEADER_CURL_HTTP_CHUNKS_H -#define HEADER_CURL_HTTP_CHUNKS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -/* - * The longest possible hexadecimal number we support in a chunked transfer. - * Weird enough, RFC2616 doesn't set a maximum size! Since we use strtoul() - * to convert it, we "only" support 2^32 bytes chunk data. - */ -#define MAXNUM_SIZE 16 - -typedef enum { - /* await and buffer all hexadecimal digits until we get one that isn't a - hexadecimal digit. When done, we go CHUNK_LF */ - CHUNK_HEX, - - /* wait for LF, ignore all else */ - CHUNK_LF, - - /* We eat the amount of data specified. When done, we move on to the - POST_CR state. */ - CHUNK_DATA, - - /* POSTLF should get a CR and then a LF and nothing else, then move back to - HEX as the CRLF combination marks the end of a chunk. A missing CR is no - big deal. */ - CHUNK_POSTLF, - - /* Used to mark that we're out of the game. NOTE: that there's a 'dataleft' - field in the struct that will tell how many bytes that were not passed to - the client in the end of the last buffer! */ - CHUNK_STOP, - - /* At this point optional trailer headers can be found, unless the next line - is CRLF */ - CHUNK_TRAILER, - - /* A trailer CR has been found - next state is CHUNK_TRAILER_POSTCR. - Next char must be a LF */ - CHUNK_TRAILER_CR, - - /* A trailer LF must be found now, otherwise CHUNKE_BAD_CHUNK will be - signalled If this is an empty trailer CHUNKE_STOP will be signalled. - Otherwise the trailer will be broadcasted via Curl_client_write() and the - next state will be CHUNK_TRAILER */ - CHUNK_TRAILER_POSTCR -} ChunkyState; - -typedef enum { - CHUNKE_STOP = -1, - CHUNKE_OK = 0, - CHUNKE_TOO_LONG_HEX = 1, - CHUNKE_ILLEGAL_HEX, - CHUNKE_BAD_CHUNK, - CHUNKE_WRITE_ERROR, - CHUNKE_BAD_ENCODING, - CHUNKE_OUT_OF_MEMORY, - CHUNKE_LAST -} CHUNKcode; - -const char *Curl_chunked_strerror(CHUNKcode code); - -struct Curl_chunker { - char hexbuffer[ MAXNUM_SIZE + 1]; - int hexindex; - ChunkyState state; - curl_off_t datasize; - size_t dataleft; /* untouched data amount at the end of the last buffer */ -}; - -#endif /* HEADER_CURL_HTTP_CHUNKS_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/http_digest.c b/build/premake/premake5/contrib/curl/lib/http_digest.c deleted file mode 100644 index e2d865b0af..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_digest.c +++ /dev/null @@ -1,180 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH) - -#include "urldata.h" -#include "strcase.h" -#include "vauth/vauth.h" -#include "http_digest.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Test example headers: - -WWW-Authenticate: Digest realm="testrealm", nonce="1053604598" -Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598" - -*/ - -CURLcode Curl_input_digest(struct connectdata *conn, - bool proxy, - const char *header) /* rest of the *-authenticate: - header */ -{ - struct Curl_easy *data = conn->data; - - /* Point to the correct struct with this */ - struct digestdata *digest; - - if(proxy) { - digest = &data->state.proxydigest; - } - else { - digest = &data->state.digest; - } - - if(!checkprefix("Digest", header)) - return CURLE_BAD_CONTENT_ENCODING; - - header += strlen("Digest"); - while(*header && ISSPACE(*header)) - header++; - - return Curl_auth_decode_digest_http_message(header, digest); -} - -CURLcode Curl_output_digest(struct connectdata *conn, - bool proxy, - const unsigned char *request, - const unsigned char *uripath) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - unsigned char *path = NULL; - char *tmp = NULL; - char *response; - size_t len; - bool have_chlg; - - /* Point to the address of the pointer that holds the string to send to the - server, which is for a plain host or for a HTTP proxy */ - char **allocuserpwd; - - /* Point to the name and password for this */ - const char *userp; - const char *passwdp; - - /* Point to the correct struct with this */ - struct digestdata *digest; - struct auth *authp; - - if(proxy) { - digest = &data->state.proxydigest; - allocuserpwd = &conn->allocptr.proxyuserpwd; - userp = conn->http_proxy.user; - passwdp = conn->http_proxy.passwd; - authp = &data->state.authproxy; - } - else { - digest = &data->state.digest; - allocuserpwd = &conn->allocptr.userpwd; - userp = conn->user; - passwdp = conn->passwd; - authp = &data->state.authhost; - } - - Curl_safefree(*allocuserpwd); - - /* not set means empty */ - if(!userp) - userp = ""; - - if(!passwdp) - passwdp = ""; - -#if defined(USE_WINDOWS_SSPI) - have_chlg = digest->input_token ? TRUE : FALSE; -#else - have_chlg = digest->nonce ? TRUE : FALSE; -#endif - - if(!have_chlg) { - authp->done = FALSE; - return CURLE_OK; - } - - /* So IE browsers < v7 cut off the URI part at the query part when they - evaluate the MD5 and some (IIS?) servers work with them so we may need to - do the Digest IE-style. Note that the different ways cause different MD5 - sums to get sent. - - Apache servers can be set to do the Digest IE-style automatically using - the BrowserMatch feature: - https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#msie - - Further details on Digest implementation differences: - http://www.fngtps.com/2006/09/http-authentication - */ - - if(authp->iestyle) { - tmp = strchr((char *)uripath, '?'); - if(tmp) { - size_t urilen = tmp - (char *)uripath; - path = (unsigned char *) aprintf("%.*s", urilen, uripath); - } - } - if(!tmp) - path = (unsigned char *) strdup((char *) uripath); - - if(!path) - return CURLE_OUT_OF_MEMORY; - - result = Curl_auth_create_digest_http_message(data, userp, passwdp, request, - path, digest, &response, &len); - free(path); - if(result) - return result; - - *allocuserpwd = aprintf("%sAuthorization: Digest %s\r\n", - proxy ? "Proxy-" : "", - response); - free(response); - if(!*allocuserpwd) - return CURLE_OUT_OF_MEMORY; - - authp->done = TRUE; - - return CURLE_OK; -} - -void Curl_digest_cleanup(struct Curl_easy *data) -{ - Curl_auth_digest_cleanup(&data->state.digest); - Curl_auth_digest_cleanup(&data->state.proxydigest); -} - -#endif diff --git a/build/premake/premake5/contrib/curl/lib/http_digest.h b/build/premake/premake5/contrib/curl/lib/http_digest.h deleted file mode 100644 index fd225c7c1b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_digest.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef HEADER_CURL_HTTP_DIGEST_H -#define HEADER_CURL_HTTP_DIGEST_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -/* this is for digest header input */ -CURLcode Curl_input_digest(struct connectdata *conn, - bool proxy, const char *header); - -/* this is for creating digest header output */ -CURLcode Curl_output_digest(struct connectdata *conn, - bool proxy, - const unsigned char *request, - const unsigned char *uripath); - -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH) -void Curl_digest_cleanup(struct Curl_easy *data); -#else -#define Curl_digest_cleanup(x) Curl_nop_stmt -#endif - -#endif /* HEADER_CURL_HTTP_DIGEST_H */ diff --git a/build/premake/premake5/contrib/curl/lib/http_negotiate.c b/build/premake/premake5/contrib/curl/lib/http_negotiate.c deleted file mode 100644 index 51375e81d1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_negotiate.c +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO) - -#include "urldata.h" -#include "sendf.h" -#include "http_negotiate.h" -#include "vauth/vauth.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy, - const char *header) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - size_t len; - - /* Point to the username, password, service and host */ - const char *userp; - const char *passwdp; - const char *service; - const char *host; - - /* Point to the correct struct with this */ - struct negotiatedata *neg_ctx; - - if(proxy) { - userp = conn->http_proxy.user; - passwdp = conn->http_proxy.passwd; - service = data->set.str[STRING_PROXY_SERVICE_NAME] ? - data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP"; - host = conn->http_proxy.host.name; - neg_ctx = &data->state.proxyneg; - } - else { - userp = conn->user; - passwdp = conn->passwd; - service = data->set.str[STRING_SERVICE_NAME] ? - data->set.str[STRING_SERVICE_NAME] : "HTTP"; - host = conn->host.name; - neg_ctx = &data->state.negotiate; - } - - /* Not set means empty */ - if(!userp) - userp = ""; - - if(!passwdp) - passwdp = ""; - - /* Obtain the input token, if any */ - header += strlen("Negotiate"); - while(*header && ISSPACE(*header)) - header++; - - len = strlen(header); - if(!len) { - /* Is this the first call in a new negotiation? */ - if(neg_ctx->context) { - /* The server rejected our authentication and hasn't suppled any more - negotiation mechanisms */ - return CURLE_LOGIN_DENIED; - } - } - - /* Initilise the security context and decode our challenge */ - result = Curl_auth_decode_spnego_message(data, userp, passwdp, service, - host, header, neg_ctx); - - if(result) - Curl_auth_spnego_cleanup(neg_ctx); - - return result; -} - -CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy) -{ - struct negotiatedata *neg_ctx = proxy ? &conn->data->state.proxyneg : - &conn->data->state.negotiate; - char *base64 = NULL; - size_t len = 0; - char *userp; - CURLcode result; - - result = Curl_auth_create_spnego_message(conn->data, neg_ctx, &base64, &len); - if(result) - return result; - - userp = aprintf("%sAuthorization: Negotiate %s\r\n", proxy ? "Proxy-" : "", - base64); - - if(proxy) { - Curl_safefree(conn->allocptr.proxyuserpwd); - conn->allocptr.proxyuserpwd = userp; - } - else { - Curl_safefree(conn->allocptr.userpwd); - conn->allocptr.userpwd = userp; - } - - free(base64); - - return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK; -} - -void Curl_cleanup_negotiate(struct Curl_easy *data) -{ - Curl_auth_spnego_cleanup(&data->state.negotiate); - Curl_auth_spnego_cleanup(&data->state.proxyneg); -} - -#endif /* !CURL_DISABLE_HTTP && USE_SPNEGO */ diff --git a/build/premake/premake5/contrib/curl/lib/http_negotiate.h b/build/premake/premake5/contrib/curl/lib/http_negotiate.h deleted file mode 100644 index c64e548251..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_negotiate.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef HEADER_CURL_HTTP_NEGOTIATE_H -#define HEADER_CURL_HTTP_NEGOTIATE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifdef USE_SPNEGO - -/* this is for Negotiate header input */ -CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy, - const char *header); - -/* this is for creating Negotiate header output */ -CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy); - -void Curl_cleanup_negotiate(struct Curl_easy *data); - -#endif /* USE_SPNEGO */ - -#endif /* HEADER_CURL_HTTP_NEGOTIATE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/http_ntlm.c b/build/premake/premake5/contrib/curl/lib/http_ntlm.c deleted file mode 100644 index 8a78bd2930..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_ntlm.c +++ /dev/null @@ -1,238 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) - -/* - * NTLM details: - * - * https://davenport.sourceforge.io/ntlm.html - * https://www.innovation.ch/java/ntlm.html - */ - -#define DEBUG_ME 0 - -#include "urldata.h" -#include "sendf.h" -#include "strcase.h" -#include "http_ntlm.h" -#include "curl_ntlm_wb.h" -#include "vauth/vauth.h" -#include "url.h" - -#if defined(USE_NSS) -#include "vtls/nssg.h" -#elif defined(USE_WINDOWS_SSPI) -#include "curl_sspi.h" -#endif - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#if DEBUG_ME -# define DEBUG_OUT(x) x -#else -# define DEBUG_OUT(x) Curl_nop_stmt -#endif - -CURLcode Curl_input_ntlm(struct connectdata *conn, - bool proxy, /* if proxy or not */ - const char *header) /* rest of the www-authenticate: - header */ -{ - /* point to the correct struct with this */ - struct ntlmdata *ntlm; - CURLcode result = CURLE_OK; - - ntlm = proxy ? &conn->proxyntlm : &conn->ntlm; - - if(checkprefix("NTLM", header)) { - header += strlen("NTLM"); - - while(*header && ISSPACE(*header)) - header++; - - if(*header) { - result = Curl_auth_decode_ntlm_type2_message(conn->data, header, ntlm); - if(result) - return result; - - ntlm->state = NTLMSTATE_TYPE2; /* We got a type-2 message */ - } - else { - if(ntlm->state == NTLMSTATE_LAST) { - infof(conn->data, "NTLM auth restarted\n"); - Curl_http_ntlm_cleanup(conn); - } - else if(ntlm->state == NTLMSTATE_TYPE3) { - infof(conn->data, "NTLM handshake rejected\n"); - Curl_http_ntlm_cleanup(conn); - ntlm->state = NTLMSTATE_NONE; - return CURLE_REMOTE_ACCESS_DENIED; - } - else if(ntlm->state >= NTLMSTATE_TYPE1) { - infof(conn->data, "NTLM handshake failure (internal error)\n"); - return CURLE_REMOTE_ACCESS_DENIED; - } - - ntlm->state = NTLMSTATE_TYPE1; /* We should send away a type-1 */ - } - } - - return result; -} - -/* - * This is for creating ntlm header output - */ -CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy) -{ - char *base64 = NULL; - size_t len = 0; - CURLcode result; - - /* point to the address of the pointer that holds the string to send to the - server, which is for a plain host or for a HTTP proxy */ - char **allocuserpwd; - - /* point to the name and password for this */ - const char *userp; - const char *passwdp; - - /* point to the correct struct with this */ - struct ntlmdata *ntlm; - struct auth *authp; - - DEBUGASSERT(conn); - DEBUGASSERT(conn->data); - -#ifdef USE_NSS - if(CURLE_OK != Curl_nss_force_init(conn->data)) - return CURLE_OUT_OF_MEMORY; -#endif - - if(proxy) { - allocuserpwd = &conn->allocptr.proxyuserpwd; - userp = conn->http_proxy.user; - passwdp = conn->http_proxy.passwd; - ntlm = &conn->proxyntlm; - authp = &conn->data->state.authproxy; - } - else { - allocuserpwd = &conn->allocptr.userpwd; - userp = conn->user; - passwdp = conn->passwd; - ntlm = &conn->ntlm; - authp = &conn->data->state.authhost; - } - authp->done = FALSE; - - /* not set means empty */ - if(!userp) - userp = ""; - - if(!passwdp) - passwdp = ""; - -#ifdef USE_WINDOWS_SSPI - if(s_hSecDll == NULL) { - /* not thread safe and leaks - use curl_global_init() to avoid */ - CURLcode err = Curl_sspi_global_init(); - if(s_hSecDll == NULL) - return err; - } -#endif - - switch(ntlm->state) { - case NTLMSTATE_TYPE1: - default: /* for the weird cases we (re)start here */ - /* Create a type-1 message */ - result = Curl_auth_create_ntlm_type1_message(userp, passwdp, ntlm, &base64, - &len); - if(result) - return result; - - if(base64) { - free(*allocuserpwd); - *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n", - proxy ? "Proxy-" : "", - base64); - free(base64); - if(!*allocuserpwd) - return CURLE_OUT_OF_MEMORY; - - DEBUG_OUT(fprintf(stderr, "**** Header %s\n ", *allocuserpwd)); - } - break; - - case NTLMSTATE_TYPE2: - /* We already received the type-2 message, create a type-3 message */ - result = Curl_auth_create_ntlm_type3_message(conn->data, userp, passwdp, - ntlm, &base64, &len); - if(result) - return result; - - if(base64) { - free(*allocuserpwd); - *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n", - proxy ? "Proxy-" : "", - base64); - free(base64); - if(!*allocuserpwd) - return CURLE_OUT_OF_MEMORY; - - DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd)); - - ntlm->state = NTLMSTATE_TYPE3; /* we send a type-3 */ - authp->done = TRUE; - } - break; - - case NTLMSTATE_TYPE3: - /* connection is already authenticated, - * don't send a header in future requests */ - ntlm->state = NTLMSTATE_LAST; - /* fall-through */ - case NTLMSTATE_LAST: - Curl_safefree(*allocuserpwd); - authp->done = TRUE; - break; - } - - return CURLE_OK; -} - -void Curl_http_ntlm_cleanup(struct connectdata *conn) -{ - Curl_auth_ntlm_cleanup(&conn->ntlm); - Curl_auth_ntlm_cleanup(&conn->proxyntlm); - -#if defined(NTLM_WB_ENABLED) - Curl_ntlm_wb_cleanup(conn); -#endif -} - -#endif /* !CURL_DISABLE_HTTP && USE_NTLM */ diff --git a/build/premake/premake5/contrib/curl/lib/http_ntlm.h b/build/premake/premake5/contrib/curl/lib/http_ntlm.h deleted file mode 100644 index d186bbe370..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_ntlm.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef HEADER_CURL_NTLM_H -#define HEADER_CURL_NTLM_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) - -/* this is for ntlm header input */ -CURLcode Curl_input_ntlm(struct connectdata *conn, bool proxy, - const char *header); - -/* this is for creating ntlm header output */ -CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy); - -void Curl_http_ntlm_cleanup(struct connectdata *conn); - -#endif /* !CURL_DISABLE_HTTP && USE_NTLM */ - -#endif /* HEADER_CURL_NTLM_H */ diff --git a/build/premake/premake5/contrib/curl/lib/http_proxy.c b/build/premake/premake5/contrib/curl/lib/http_proxy.c deleted file mode 100644 index 7fde11dbb8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_proxy.c +++ /dev/null @@ -1,643 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) - -#include "urldata.h" -#include -#include "http_proxy.h" -#include "sendf.h" -#include "http.h" -#include "url.h" -#include "select.h" -#include "progress.h" -#include "non-ascii.h" -#include "connect.h" -#include "curlx.h" -#include "vtls/vtls.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Perform SSL initialization for HTTPS proxy. Sets - * proxy_ssl_connected connection bit when complete. Can be - * called multiple times. - */ -static CURLcode https_proxy_connect(struct connectdata *conn, int sockindex) -{ -#ifdef USE_SSL - CURLcode result = CURLE_OK; - DEBUGASSERT(conn->http_proxy.proxytype == CURLPROXY_HTTPS); - if(!conn->bits.proxy_ssl_connected[sockindex]) { - /* perform SSL initialization for this socket */ - result = - Curl_ssl_connect_nonblocking(conn, sockindex, - &conn->bits.proxy_ssl_connected[sockindex]); - if(result) - conn->bits.close = TRUE; /* a failed connection is marked for closure to - prevent (bad) re-use or similar */ - } - return result; -#else - (void) conn; - (void) sockindex; - return CURLE_NOT_BUILT_IN; -#endif -} - -CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) -{ - if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) { - const CURLcode result = https_proxy_connect(conn, sockindex); - if(result) - return result; - if(!conn->bits.proxy_ssl_connected[sockindex]) - return result; /* wait for HTTPS proxy SSL initialization to complete */ - } - - if(conn->bits.tunnel_proxy && conn->bits.httpproxy) { -#ifndef CURL_DISABLE_PROXY - /* for [protocol] tunneled through HTTP proxy */ - struct HTTP http_proxy; - void *prot_save; - const char *hostname; - int remote_port; - CURLcode result; - - /* BLOCKING */ - /* We want "seamless" operations through HTTP proxy tunnel */ - - /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the - * member conn->proto.http; we want [protocol] through HTTP and we have - * to change the member temporarily for connecting to the HTTP - * proxy. After Curl_proxyCONNECT we have to set back the member to the - * original pointer - * - * This function might be called several times in the multi interface case - * if the proxy's CONNECT response is not instant. - */ - prot_save = conn->data->req.protop; - memset(&http_proxy, 0, sizeof(http_proxy)); - conn->data->req.protop = &http_proxy; - connkeep(conn, "HTTP proxy CONNECT"); - - /* for the secondary socket (FTP), use the "connect to host" - * but ignore the "connect to port" (use the secondary port) - */ - - if(conn->bits.conn_to_host) - hostname = conn->conn_to_host.name; - else if(sockindex == SECONDARYSOCKET) - hostname = conn->secondaryhostname; - else - hostname = conn->host.name; - - if(sockindex == SECONDARYSOCKET) - remote_port = conn->secondary_port; - else if(conn->bits.conn_to_port) - remote_port = conn->conn_to_port; - else - remote_port = conn->remote_port; - result = Curl_proxyCONNECT(conn, sockindex, hostname, - remote_port, FALSE); - conn->data->req.protop = prot_save; - if(CURLE_OK != result) - return result; - Curl_safefree(conn->allocptr.proxyuserpwd); -#else - return CURLE_NOT_BUILT_IN; -#endif - } - /* no HTTP tunnel proxy, just return */ - return CURLE_OK; -} - -/* - * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This - * function will issue the necessary commands to get a seamless tunnel through - * this proxy. After that, the socket can be used just as a normal socket. - * - * 'blocking' set to TRUE means that this function will do the entire CONNECT - * + response in a blocking fashion. Should be avoided! - */ - -CURLcode Curl_proxyCONNECT(struct connectdata *conn, - int sockindex, - const char *hostname, - int remote_port, - bool blocking) -{ - int subversion=0; - struct Curl_easy *data=conn->data; - struct SingleRequest *k = &data->req; - CURLcode result; - curl_socket_t tunnelsocket = conn->sock[sockindex]; - curl_off_t cl=0; - bool closeConnection = FALSE; - bool chunked_encoding = FALSE; - time_t check; - -#define SELECT_OK 0 -#define SELECT_ERROR 1 -#define SELECT_TIMEOUT 2 - int error = SELECT_OK; - - if(conn->tunnel_state[sockindex] == TUNNEL_COMPLETE) - return CURLE_OK; /* CONNECT is already completed */ - - conn->bits.proxy_connect_closed = FALSE; - - do { - if(TUNNEL_INIT == conn->tunnel_state[sockindex]) { - /* BEGIN CONNECT PHASE */ - char *host_port; - Curl_send_buffer *req_buffer; - - infof(data, "Establish HTTP proxy tunnel to %s:%hu\n", - hostname, remote_port); - - /* This only happens if we've looped here due to authentication - reasons, and we don't really use the newly cloned URL here - then. Just free() it. */ - free(data->req.newurl); - data->req.newurl = NULL; - - /* initialize a dynamic send-buffer */ - req_buffer = Curl_add_buffer_init(); - - if(!req_buffer) - return CURLE_OUT_OF_MEMORY; - - host_port = aprintf("%s:%hu", hostname, remote_port); - if(!host_port) { - Curl_add_buffer_free(req_buffer); - return CURLE_OUT_OF_MEMORY; - } - - /* Setup the proxy-authorization header, if any */ - result = Curl_http_output_auth(conn, "CONNECT", host_port, TRUE); - - free(host_port); - - if(!result) { - char *host = NULL; - const char *proxyconn=""; - const char *useragent=""; - const char *http = (conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0) ? - "1.0" : "1.1"; - bool ipv6_ip = conn->bits.ipv6_ip; - char *hostheader; - - /* the hostname may be different */ - if(hostname != conn->host.name) - ipv6_ip = (strchr(hostname, ':') != NULL); - hostheader= /* host:port with IPv6 support */ - aprintf("%s%s%s:%hu", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"", - remote_port); - if(!hostheader) { - Curl_add_buffer_free(req_buffer); - return CURLE_OUT_OF_MEMORY; - } - - if(!Curl_checkProxyheaders(conn, "Host:")) { - host = aprintf("Host: %s\r\n", hostheader); - if(!host) { - free(hostheader); - Curl_add_buffer_free(req_buffer); - return CURLE_OUT_OF_MEMORY; - } - } - if(!Curl_checkProxyheaders(conn, "Proxy-Connection:")) - proxyconn = "Proxy-Connection: Keep-Alive\r\n"; - - if(!Curl_checkProxyheaders(conn, "User-Agent:") && - data->set.str[STRING_USERAGENT]) - useragent = conn->allocptr.uagent; - - result = - Curl_add_bufferf(req_buffer, - "CONNECT %s HTTP/%s\r\n" - "%s" /* Host: */ - "%s" /* Proxy-Authorization */ - "%s" /* User-Agent */ - "%s", /* Proxy-Connection */ - hostheader, - http, - host?host:"", - conn->allocptr.proxyuserpwd? - conn->allocptr.proxyuserpwd:"", - useragent, - proxyconn); - - if(host) - free(host); - free(hostheader); - - if(!result) - result = Curl_add_custom_headers(conn, TRUE, req_buffer); - - if(!result) - /* CRLF terminate the request */ - result = Curl_add_bufferf(req_buffer, "\r\n"); - - if(!result) { - /* Send the connect request to the proxy */ - /* BLOCKING */ - result = - Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, sockindex); - } - req_buffer = NULL; - if(result) - failf(data, "Failed sending CONNECT to proxy"); - } - - Curl_add_buffer_free(req_buffer); - if(result) - return result; - - conn->tunnel_state[sockindex] = TUNNEL_CONNECT; - } /* END CONNECT PHASE */ - - check = Curl_timeleft(data, NULL, TRUE); - if(check <= 0) { - failf(data, "Proxy CONNECT aborted due to timeout"); - return CURLE_RECV_ERROR; - } - - if(!blocking) { - if(!Curl_conn_data_pending(conn, sockindex)) - /* return so we'll be called again polling-style */ - return CURLE_OK; - else { - DEBUGF(infof(data, - "Read response immediately from proxy CONNECT\n")); - } - } - - /* at this point, the tunnel_connecting phase is over. */ - - { /* READING RESPONSE PHASE */ - size_t nread; /* total size read */ - int perline; /* count bytes per line */ - int keepon=TRUE; - ssize_t gotbytes; - char *ptr; - char *line_start; - - ptr = data->state.buffer; - line_start = ptr; - - nread = 0; - perline = 0; - - while(nread < BUFSIZE && keepon && !error) { - int writetype; - - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - - if(ptr >= &data->state.buffer[BUFSIZE]) { - failf(data, "CONNECT response too large!"); - return CURLE_RECV_ERROR; - } - - check = Curl_timeleft(data, NULL, TRUE); - if(check <= 0) { - failf(data, "Proxy CONNECT aborted due to timeout"); - error = SELECT_TIMEOUT; /* already too little time */ - break; - } - - /* Read one byte at a time to avoid a race condition. Wait at most one - second before looping to ensure continuous pgrsUpdates. */ - result = Curl_read(conn, tunnelsocket, ptr, 1, &gotbytes); - if(result == CURLE_AGAIN) { - if(SOCKET_READABLE(tunnelsocket, check<1000L?check:1000) == -1) { - error = SELECT_ERROR; - failf(data, "Proxy CONNECT aborted due to select/poll error"); - break; - } - continue; - } - else if(result) { - keepon = FALSE; - break; - } - else if(gotbytes <= 0) { - if(data->set.proxyauth && data->state.authproxy.avail) { - /* proxy auth was requested and there was proxy auth available, - then deem this as "mere" proxy disconnect */ - conn->bits.proxy_connect_closed = TRUE; - infof(data, "Proxy CONNECT connection closed\n"); - } - else { - error = SELECT_ERROR; - failf(data, "Proxy CONNECT aborted"); - } - keepon = FALSE; - break; - } - - /* We got a byte of data */ - nread++; - - if(keepon > TRUE) { - /* This means we are currently ignoring a response-body */ - - nread = 0; /* make next read start over in the read buffer */ - ptr = data->state.buffer; - if(cl) { - /* A Content-Length based body: simply count down the counter - and make sure to break out of the loop when we're done! */ - cl--; - if(cl <= 0) { - keepon = FALSE; - break; - } - } - else { - /* chunked-encoded body, so we need to do the chunked dance - properly to know when the end of the body is reached */ - CHUNKcode r; - ssize_t tookcareof = 0; - - /* now parse the chunked piece of data so that we can - properly tell when the stream ends */ - r = Curl_httpchunk_read(conn, ptr, 1, &tookcareof); - if(r == CHUNKE_STOP) { - /* we're done reading chunks! */ - infof(data, "chunk reading DONE\n"); - keepon = FALSE; - /* we did the full CONNECT treatment, go COMPLETE */ - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; - } - } - continue; - } - - perline++; /* amount of bytes in this line so far */ - - /* if this is not the end of a header line then continue */ - if(*ptr != 0x0a) { - ptr++; - continue; - } - - /* convert from the network encoding */ - result = Curl_convert_from_network(data, line_start, perline); - /* Curl_convert_from_network calls failf if unsuccessful */ - if(result) - return result; - - /* output debug if that is requested */ - if(data->set.verbose) - Curl_debug(data, CURLINFO_HEADER_IN, - line_start, (size_t)perline, conn); - - /* send the header to the callback */ - writetype = CLIENTWRITE_HEADER; - if(data->set.include_header) - writetype |= CLIENTWRITE_BODY; - - result = Curl_client_write(conn, writetype, line_start, perline); - - data->info.header_size += (long)perline; - data->req.headerbytecount += (long)perline; - - if(result) - return result; - - /* Newlines are CRLF, so the CR is ignored as the line isn't - really terminated until the LF comes. Treat a following CR - as end-of-headers as well.*/ - - if(('\r' == line_start[0]) || - ('\n' == line_start[0])) { - /* end of response-headers from the proxy */ - nread = 0; /* make next read start over in the read - buffer */ - ptr = data->state.buffer; - if((407 == k->httpcode) && !data->state.authproblem) { - /* If we get a 407 response code with content length - when we have no auth problem, we must ignore the - whole response-body */ - keepon = 2; - - if(cl) { - infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T - " bytes of response-body\n", cl); - } - else if(chunked_encoding) { - CHUNKcode r; - - infof(data, "Ignore chunked response-body\n"); - - /* We set ignorebody true here since the chunked - decoder function will acknowledge that. Pay - attention so that this is cleared again when this - function returns! */ - k->ignorebody = TRUE; - - if(line_start[1] == '\n') { - /* this can only be a LF if the letter at index 0 - was a CR */ - line_start++; - } - - /* now parse the chunked piece of data so that we can - properly tell when the stream ends */ - r = Curl_httpchunk_read(conn, line_start + 1, 1, &gotbytes); - if(r == CHUNKE_STOP) { - /* we're done reading chunks! */ - infof(data, "chunk reading DONE\n"); - keepon = FALSE; - /* we did the full CONNECT treatment, go to - COMPLETE */ - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; - } - } - else { - /* without content-length or chunked encoding, we - can't keep the connection alive since the close is - the end signal so we bail out at once instead */ - keepon = FALSE; - } - } - else - keepon = FALSE; - /* we did the full CONNECT treatment, go to COMPLETE */ - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; - continue; - } - - line_start[perline] = 0; /* zero terminate the buffer */ - if((checkprefix("WWW-Authenticate:", line_start) && - (401 == k->httpcode)) || - (checkprefix("Proxy-authenticate:", line_start) && - (407 == k->httpcode))) { - - bool proxy = (k->httpcode == 407) ? TRUE : FALSE; - char *auth = Curl_copy_header_value(line_start); - if(!auth) - return CURLE_OUT_OF_MEMORY; - - result = Curl_http_input_auth(conn, proxy, auth); - - free(auth); - - if(result) - return result; - } - else if(checkprefix("Content-Length:", line_start)) { - if(k->httpcode/100 == 2) { - /* A server MUST NOT send any Transfer-Encoding or - Content-Length header fields in a 2xx (Successful) - response to CONNECT. (RFC 7231 section 4.3.6) */ - failf(data, "Content-Length: in %03d response", - k->httpcode); - return CURLE_RECV_ERROR; - } - - cl = curlx_strtoofft(line_start + - strlen("Content-Length:"), NULL, 10); - } - else if(Curl_compareheader(line_start, "Connection:", "close")) - closeConnection = TRUE; - else if(Curl_compareheader(line_start, - "Transfer-Encoding:", - "chunked")) { - if(k->httpcode/100 == 2) { - /* A server MUST NOT send any Transfer-Encoding or - Content-Length header fields in a 2xx (Successful) - response to CONNECT. (RFC 7231 section 4.3.6) */ - failf(data, "Transfer-Encoding: in %03d response", k->httpcode); - return CURLE_RECV_ERROR; - } - infof(data, "CONNECT responded chunked\n"); - chunked_encoding = TRUE; - /* init our chunky engine */ - Curl_httpchunk_init(conn); - } - else if(Curl_compareheader(line_start, "Proxy-Connection:", "close")) - closeConnection = TRUE; - else if(2 == sscanf(line_start, "HTTP/1.%d %d", - &subversion, - &k->httpcode)) { - /* store the HTTP code from the proxy */ - data->info.httpproxycode = k->httpcode; - } - - perline = 0; /* line starts over here */ - ptr = data->state.buffer; - line_start = ptr; - } /* while there's buffer left and loop is requested */ - - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - - if(error) - return CURLE_RECV_ERROR; - - if(data->info.httpproxycode != 200) { - /* Deal with the possibly already received authenticate - headers. 'newurl' is set to a new URL if we must loop. */ - result = Curl_http_auth_act(conn); - if(result) - return result; - - if(conn->bits.close) - /* the connection has been marked for closure, most likely in the - Curl_http_auth_act() function and thus we can kill it at once - below */ - closeConnection = TRUE; - } - - if(closeConnection && data->req.newurl) { - /* Connection closed by server. Don't use it anymore */ - Curl_closesocket(conn, conn->sock[sockindex]); - conn->sock[sockindex] = CURL_SOCKET_BAD; - break; - } - } /* END READING RESPONSE PHASE */ - - /* If we are supposed to continue and request a new URL, which basically - * means the HTTP authentication is still going on so if the tunnel - * is complete we start over in INIT state */ - if(data->req.newurl && - (TUNNEL_COMPLETE == conn->tunnel_state[sockindex])) { - conn->tunnel_state[sockindex] = TUNNEL_INIT; - infof(data, "TUNNEL_STATE switched to: %d\n", - conn->tunnel_state[sockindex]); - } - - } while(data->req.newurl); - - if(200 != data->req.httpcode) { - if(closeConnection && data->req.newurl) { - conn->bits.proxy_connect_closed = TRUE; - infof(data, "Connect me again please\n"); - } - else { - free(data->req.newurl); - data->req.newurl = NULL; - /* failure, close this connection to avoid re-use */ - streamclose(conn, "proxy CONNECT failure"); - Curl_closesocket(conn, conn->sock[sockindex]); - conn->sock[sockindex] = CURL_SOCKET_BAD; - } - - /* to back to init state */ - conn->tunnel_state[sockindex] = TUNNEL_INIT; - - if(conn->bits.proxy_connect_closed) - /* this is not an error, just part of the connection negotiation */ - return CURLE_OK; - else { - failf(data, "Received HTTP code %d from proxy after CONNECT", - data->req.httpcode); - return CURLE_RECV_ERROR; - } - } - - conn->tunnel_state[sockindex] = TUNNEL_COMPLETE; - - /* If a proxy-authorization header was used for the proxy, then we should - make sure that it isn't accidentally used for the document request - after we've connected. So let's free and clear it here. */ - Curl_safefree(conn->allocptr.proxyuserpwd); - conn->allocptr.proxyuserpwd = NULL; - - data->state.authproxy.done = TRUE; - - infof(data, "Proxy replied OK to CONNECT request\n"); - data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */ - conn->bits.rewindaftersend = FALSE; /* make sure this isn't set for the - document request */ - return CURLE_OK; -} -#endif /* CURL_DISABLE_PROXY */ diff --git a/build/premake/premake5/contrib/curl/lib/http_proxy.h b/build/premake/premake5/contrib/curl/lib/http_proxy.h deleted file mode 100644 index d1f5a7c83f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/http_proxy.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef HEADER_CURL_HTTP_PROXY_H -#define HEADER_CURL_HTTP_PROXY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) -/* ftp can use this as well */ -CURLcode Curl_proxyCONNECT(struct connectdata *conn, - int tunnelsocket, - const char *hostname, int remote_port, - bool blocking); - -/* Default proxy timeout in milliseconds */ -#define PROXY_TIMEOUT (3600*1000) - -CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex); - -#else -#define Curl_proxyCONNECT(x,y,z,w,v) CURLE_NOT_BUILT_IN -#define Curl_proxy_connect(x,y) CURLE_OK -#endif - -#endif /* HEADER_CURL_HTTP_PROXY_H */ diff --git a/build/premake/premake5/contrib/curl/lib/idn_win32.c b/build/premake/premake5/contrib/curl/lib/idn_win32.c deleted file mode 100644 index 8dc300b36d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/idn_win32.c +++ /dev/null @@ -1,111 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - - /* - * IDN conversions using Windows kernel32 and normaliz libraries. - */ - -#include "curl_setup.h" - -#ifdef USE_WIN32_IDN - -#include "curl_multibyte.h" -#include "curl_memory.h" -#include "warnless.h" - - /* The last #include file should be: */ -#include "memdebug.h" - -#ifdef WANT_IDN_PROTOTYPES -# if defined(_SAL_VERSION) -WINNORMALIZEAPI int WINAPI -IdnToAscii(_In_ DWORD dwFlags, - _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr, - _In_ int cchUnicodeChar, - _Out_writes_opt_(cchASCIIChar) LPWSTR lpASCIICharStr, - _In_ int cchASCIIChar); -WINNORMALIZEAPI int WINAPI -IdnToUnicode(_In_ DWORD dwFlags, - _In_reads_(cchASCIIChar) LPCWSTR lpASCIICharStr, - _In_ int cchASCIIChar, - _Out_writes_opt_(cchUnicodeChar) LPWSTR lpUnicodeCharStr, - _In_ int cchUnicodeChar); -# else -WINBASEAPI int WINAPI IdnToAscii(DWORD dwFlags, - const WCHAR *lpUnicodeCharStr, - int cchUnicodeChar, - WCHAR *lpASCIICharStr, - int cchASCIIChar); -WINBASEAPI int WINAPI IdnToUnicode(DWORD dwFlags, - const WCHAR *lpASCIICharStr, - int cchASCIIChar, - WCHAR *lpUnicodeCharStr, - int cchUnicodeChar); -# endif -#endif - -#define IDN_MAX_LENGTH 255 - -bool curl_win32_idn_to_ascii(const char *in, char **out); -bool curl_win32_ascii_to_idn(const char *in, char **out); - -bool curl_win32_idn_to_ascii(const char *in, char **out) -{ - bool success = FALSE; - - wchar_t *in_w = Curl_convert_UTF8_to_wchar(in); - if(in_w) { - wchar_t punycode[IDN_MAX_LENGTH]; - int chars = IdnToAscii(0, in_w, -1, punycode, IDN_MAX_LENGTH); - free(in_w); - if(chars) { - *out = Curl_convert_wchar_to_UTF8(punycode); - if(*out) - success = TRUE; - } - } - - return success; -} - -bool curl_win32_ascii_to_idn(const char *in, char **out) -{ - bool success = FALSE; - - wchar_t *in_w = Curl_convert_UTF8_to_wchar(in); - if(in_w) { - size_t in_len = wcslen(in_w) + 1; - wchar_t unicode[IDN_MAX_LENGTH]; - int chars = IdnToUnicode(0, in_w, curlx_uztosi(in_len), - unicode, IDN_MAX_LENGTH); - free(in_w); - if(chars) { - *out = Curl_convert_wchar_to_UTF8(unicode); - if(*out) - success = TRUE; - } - } - - return success; -} - -#endif /* USE_WIN32_IDN */ diff --git a/build/premake/premake5/contrib/curl/lib/if2ip.c b/build/premake/premake5/contrib/curl/lib/if2ip.c deleted file mode 100644 index d876615ea1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/if2ip.c +++ /dev/null @@ -1,272 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif -#ifdef HAVE_NET_IF_H -# include -#endif -#ifdef HAVE_SYS_IOCTL_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_SYS_SOCKIO_H -# include -#endif -#ifdef HAVE_IFADDRS_H -# include -#endif -#ifdef HAVE_STROPTS_H -# include -#endif -#ifdef __VMS -# include -#endif - -#include "inet_ntop.h" -#include "strcase.h" -#include "if2ip.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* ------------------------------------------------------------------ */ - -/* Return the scope of the given address. */ -unsigned int Curl_ipv6_scope(const struct sockaddr *sa) -{ -#ifndef ENABLE_IPV6 - (void) sa; -#else - if(sa->sa_family == AF_INET6) { - const struct sockaddr_in6 * sa6 = (const struct sockaddr_in6 *)(void *) sa; - const unsigned char *b = sa6->sin6_addr.s6_addr; - unsigned short w = (unsigned short) ((b[0] << 8) | b[1]); - - switch(w & 0xFFC0) { - case 0xFE80: - return IPV6_SCOPE_LINKLOCAL; - case 0xFEC0: - return IPV6_SCOPE_SITELOCAL; - case 0x0000: - w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] | - b[10] | b[11] | b[12] | b[13] | b[14]; - if(w || b[15] != 0x01) - break; - return IPV6_SCOPE_NODELOCAL; - default: - break; - } - } -#endif - - return IPV6_SCOPE_GLOBAL; -} - - -#if defined(HAVE_GETIFADDRS) - -bool Curl_if_is_interface_name(const char *interf) -{ - bool result = FALSE; - - struct ifaddrs *iface, *head; - - if(getifaddrs(&head) >= 0) { - for(iface=head; iface != NULL; iface=iface->ifa_next) { - if(strcasecompare(iface->ifa_name, interf)) { - result = TRUE; - break; - } - } - freeifaddrs(head); - } - return result; -} - -if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size) -{ - struct ifaddrs *iface, *head; - if2ip_result_t res = IF2IP_NOT_FOUND; - -#ifndef ENABLE_IPV6 - (void) remote_scope; - -#ifndef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - (void) remote_scope_id; -#endif - -#endif - - if(getifaddrs(&head) >= 0) { - for(iface = head; iface != NULL; iface=iface->ifa_next) { - if(iface->ifa_addr != NULL) { - if(iface->ifa_addr->sa_family == af) { - if(strcasecompare(iface->ifa_name, interf)) { - void *addr; - char *ip; - char scope[12] = ""; - char ipstr[64]; -#ifdef ENABLE_IPV6 - if(af == AF_INET6) { - unsigned int scopeid = 0; - unsigned int ifscope = Curl_ipv6_scope(iface->ifa_addr); - - if(ifscope != remote_scope) { - /* We are interested only in interface addresses whose - scope matches the remote address we want to - connect to: global for global, link-local for - link-local, etc... */ - if(res == IF2IP_NOT_FOUND) res = IF2IP_AF_NOT_SUPPORTED; - continue; - } - - addr = - &((struct sockaddr_in6 *)(void *)iface->ifa_addr)->sin6_addr; -#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - /* Include the scope of this interface as part of the address */ - scopeid = ((struct sockaddr_in6 *)(void *)iface->ifa_addr) - ->sin6_scope_id; - - /* If given, scope id should match. */ - if(remote_scope_id && scopeid != remote_scope_id) { - if(res == IF2IP_NOT_FOUND) - res = IF2IP_AF_NOT_SUPPORTED; - - continue; - } -#endif - if(scopeid) - snprintf(scope, sizeof(scope), "%%%u", scopeid); - } - else -#endif - addr = - &((struct sockaddr_in *)(void *)iface->ifa_addr)->sin_addr; - res = IF2IP_FOUND; - ip = (char *) Curl_inet_ntop(af, addr, ipstr, sizeof(ipstr)); - snprintf(buf, buf_size, "%s%s", ip, scope); - break; - } - } - else if((res == IF2IP_NOT_FOUND) && - strcasecompare(iface->ifa_name, interf)) { - res = IF2IP_AF_NOT_SUPPORTED; - } - } - } - - freeifaddrs(head); - } - - return res; -} - -#elif defined(HAVE_IOCTL_SIOCGIFADDR) - -bool Curl_if_is_interface_name(const char *interf) -{ - /* This is here just to support the old interfaces */ - char buf[256]; - - return (Curl_if2ip(AF_INET, 0 /* unused */, 0, interf, buf, sizeof(buf)) == - IF2IP_NOT_FOUND) ? FALSE : TRUE; -} - -if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size) -{ - struct ifreq req; - struct in_addr in; - struct sockaddr_in *s; - curl_socket_t dummy; - size_t len; - - (void)remote_scope; - (void)remote_scope_id; - - if(!interf || (af != AF_INET)) - return IF2IP_NOT_FOUND; - - len = strlen(interf); - if(len >= sizeof(req.ifr_name)) - return IF2IP_NOT_FOUND; - - dummy = socket(AF_INET, SOCK_STREAM, 0); - if(CURL_SOCKET_BAD == dummy) - return IF2IP_NOT_FOUND; - - memset(&req, 0, sizeof(req)); - memcpy(req.ifr_name, interf, len+1); - req.ifr_addr.sa_family = AF_INET; - - if(ioctl(dummy, SIOCGIFADDR, &req) < 0) { - sclose(dummy); - /* With SIOCGIFADDR, we cannot tell the difference between an interface - that does not exist and an interface that has no address of the - correct family. Assume the interface does not exist */ - return IF2IP_NOT_FOUND; - } - - s = (struct sockaddr_in *)&req.ifr_addr; - memcpy(&in, &s->sin_addr, sizeof(in)); - Curl_inet_ntop(s->sin_family, &in, buf, buf_size); - - sclose(dummy); - return IF2IP_FOUND; -} - -#else - -bool Curl_if_is_interface_name(const char *interf) -{ - (void) interf; - - return FALSE; -} - -if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size) -{ - (void) af; - (void) remote_scope; - (void) remote_scope_id; - (void) interf; - (void) buf; - (void) buf_size; - return IF2IP_NOT_FOUND; -} - -#endif diff --git a/build/premake/premake5/contrib/curl/lib/if2ip.h b/build/premake/premake5/contrib/curl/lib/if2ip.h deleted file mode 100644 index f3a7ff0b2f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/if2ip.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef HEADER_CURL_IF2IP_H -#define HEADER_CURL_IF2IP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -/* IPv6 address scopes. */ -#define IPV6_SCOPE_GLOBAL 0 /* Global scope. */ -#define IPV6_SCOPE_LINKLOCAL 1 /* Link-local scope. */ -#define IPV6_SCOPE_SITELOCAL 2 /* Site-local scope (deprecated). */ -#define IPV6_SCOPE_NODELOCAL 3 /* Loopback. */ - -unsigned int Curl_ipv6_scope(const struct sockaddr *sa); - -bool Curl_if_is_interface_name(const char *interf); - -typedef enum { - IF2IP_NOT_FOUND = 0, /* Interface not found */ - IF2IP_AF_NOT_SUPPORTED = 1, /* Int. exists but has no address for this af */ - IF2IP_FOUND = 2 /* The address has been stored in "buf" */ -} if2ip_result_t; - -if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, - unsigned int remote_scope_id, const char *interf, - char *buf, int buf_size); - -#ifdef __INTERIX - -/* Nedelcho Stanev's work-around for SFU 3.0 */ -struct ifreq { -#define IFNAMSIZ 16 -#define IFHWADDRLEN 6 - union { - char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - } ifr_ifrn; - - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_broadaddr; - struct sockaddr ifru_netmask; - struct sockaddr ifru_hwaddr; - short ifru_flags; - int ifru_metric; - int ifru_mtu; - } ifr_ifru; -}; - -/* This define was added by Daniel to avoid an extra #ifdef INTERIX in the - C code. */ - -#define ifr_name ifr_ifrn.ifrn_name /* interface name */ -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ - -#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ - -#endif /* __INTERIX */ - -#endif /* HEADER_CURL_IF2IP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/imap.c b/build/premake/premake5/contrib/curl/lib/imap.c deleted file mode 100644 index 44d350be21..0000000000 --- a/build/premake/premake5/contrib/curl/lib/imap.c +++ /dev/null @@ -1,2132 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC2195 CRAM-MD5 authentication - * RFC2595 Using TLS with IMAP, POP3 and ACAP - * RFC2831 DIGEST-MD5 authentication - * RFC3501 IMAPv4 protocol - * RFC4422 Simple Authentication and Security Layer (SASL) - * RFC4616 PLAIN authentication - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism - * RFC4959 IMAP Extension for SASL Initial Client Response - * RFC5092 IMAP URL Scheme - * RFC6749 OAuth 2.0 Authorization Framework - * Draft LOGIN SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_IMAP - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_UTSNAME_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -#include -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ -#include "socks.h" -#include "imap.h" -#include "strtoofft.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "connect.h" -#include "strerror.h" -#include "select.h" -#include "multiif.h" -#include "url.h" -#include "strcase.h" -#include "curl_sasl.h" -#include "warnless.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Local API functions */ -static CURLcode imap_regular_transfer(struct connectdata *conn, bool *done); -static CURLcode imap_do(struct connectdata *conn, bool *done); -static CURLcode imap_done(struct connectdata *conn, CURLcode status, - bool premature); -static CURLcode imap_connect(struct connectdata *conn, bool *done); -static CURLcode imap_disconnect(struct connectdata *conn, bool dead); -static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done); -static int imap_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done); -static CURLcode imap_setup_connection(struct connectdata *conn); -static char *imap_atom(const char *str, bool escape_only); -static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...); -static CURLcode imap_parse_url_options(struct connectdata *conn); -static CURLcode imap_parse_url_path(struct connectdata *conn); -static CURLcode imap_parse_custom_request(struct connectdata *conn); -static CURLcode imap_perform_authenticate(struct connectdata *conn, - const char *mech, - const char *initresp); -static CURLcode imap_continue_authenticate(struct connectdata *conn, - const char *resp); -static void imap_get_message(char *buffer, char **outptr); - -/* - * IMAP protocol handler. - */ - -const struct Curl_handler Curl_handler_imap = { - "IMAP", /* scheme */ - imap_setup_connection, /* setup_connection */ - imap_do, /* do_it */ - imap_done, /* done */ - ZERO_NULL, /* do_more */ - imap_connect, /* connect_it */ - imap_multi_statemach, /* connecting */ - imap_doing, /* doing */ - imap_getsock, /* proto_getsock */ - imap_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - imap_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_IMAP, /* defport */ - CURLPROTO_IMAP, /* protocol */ - PROTOPT_CLOSEACTION| /* flags */ - PROTOPT_URLOPTIONS -}; - -#ifdef USE_SSL -/* - * IMAPS protocol handler. - */ - -const struct Curl_handler Curl_handler_imaps = { - "IMAPS", /* scheme */ - imap_setup_connection, /* setup_connection */ - imap_do, /* do_it */ - imap_done, /* done */ - ZERO_NULL, /* do_more */ - imap_connect, /* connect_it */ - imap_multi_statemach, /* connecting */ - imap_doing, /* doing */ - imap_getsock, /* proto_getsock */ - imap_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - imap_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_IMAPS, /* defport */ - CURLPROTO_IMAPS, /* protocol */ - PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */ -}; -#endif - -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed IMAP protocol handler. - */ - -static const struct Curl_handler Curl_handler_imap_proxy = { - "IMAP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_IMAP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTP-proxyed IMAPS protocol handler. - */ - -static const struct Curl_handler Curl_handler_imaps_proxy = { - "IMAPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_IMAPS, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - -/* SASL parameters for the imap protocol */ -static const struct SASLproto saslimap = { - "imap", /* The service name */ - '+', /* Code received when continuation is expected */ - 'O', /* Code to receive upon authentication success */ - 0, /* Maximum initial response length (no max) */ - imap_perform_authenticate, /* Send authentication command */ - imap_continue_authenticate, /* Send authentication continuation */ - imap_get_message /* Get SASL response message */ -}; - - -#ifdef USE_SSL -static void imap_to_imaps(struct connectdata *conn) -{ - /* Change the connection handler */ - conn->handler = &Curl_handler_imaps; - - /* Set the connection's upgraded to TLS flag */ - conn->tls_upgraded = TRUE; -} -#else -#define imap_to_imaps(x) Curl_nop_stmt -#endif - -/*********************************************************************** - * - * imap_matchresp() - * - * Determines whether the untagged response is related to the specified - * command by checking if it is in format "* ..." or - * "* ...". - * - * The "* " marker is assumed to have already been checked by the caller. - */ -static bool imap_matchresp(const char *line, size_t len, const char *cmd) -{ - const char *end = line + len; - size_t cmd_len = strlen(cmd); - - /* Skip the untagged response marker */ - line += 2; - - /* Do we have a number after the marker? */ - if(line < end && ISDIGIT(*line)) { - /* Skip the number */ - do - line++; - while(line < end && ISDIGIT(*line)); - - /* Do we have the space character? */ - if(line == end || *line != ' ') - return FALSE; - - line++; - } - - /* Does the command name match and is it followed by a space character or at - the end of line? */ - if(line + cmd_len <= end && strncasecompare(line, cmd, cmd_len) && - (line[cmd_len] == ' ' || line + cmd_len + 2 == end)) - return TRUE; - - return FALSE; -} - -/*********************************************************************** - * - * imap_endofresp() - * - * Checks whether the given string is a valid tagged, untagged or continuation - * response which can be processed by the response handler. - */ -static bool imap_endofresp(struct connectdata *conn, char *line, size_t len, - int *resp) -{ - struct IMAP *imap = conn->data->req.protop; - struct imap_conn *imapc = &conn->proto.imapc; - const char *id = imapc->resptag; - size_t id_len = strlen(id); - - /* Do we have a tagged command response? */ - if(len >= id_len + 1 && !memcmp(id, line, id_len) && line[id_len] == ' ') { - line += id_len + 1; - len -= id_len + 1; - - if(len >= 2 && !memcmp(line, "OK", 2)) - *resp = 'O'; - else if(len >= 2 && !memcmp(line, "NO", 2)) - *resp = 'N'; - else if(len >= 3 && !memcmp(line, "BAD", 3)) - *resp = 'B'; - else { - failf(conn->data, "Bad tagged response"); - *resp = -1; - } - - return TRUE; - } - - /* Do we have an untagged command response? */ - if(len >= 2 && !memcmp("* ", line, 2)) { - switch(imapc->state) { - /* States which are interested in untagged responses */ - case IMAP_CAPABILITY: - if(!imap_matchresp(line, len, "CAPABILITY")) - return FALSE; - break; - - case IMAP_LIST: - if((!imap->custom && !imap_matchresp(line, len, "LIST")) || - (imap->custom && !imap_matchresp(line, len, imap->custom) && - (strcmp(imap->custom, "STORE") || - !imap_matchresp(line, len, "FETCH")) && - strcmp(imap->custom, "SELECT") && - strcmp(imap->custom, "EXAMINE") && - strcmp(imap->custom, "SEARCH") && - strcmp(imap->custom, "EXPUNGE") && - strcmp(imap->custom, "LSUB") && - strcmp(imap->custom, "UID") && - strcmp(imap->custom, "NOOP"))) - return FALSE; - break; - - case IMAP_SELECT: - /* SELECT is special in that its untagged responses do not have a - common prefix so accept anything! */ - break; - - case IMAP_FETCH: - if(!imap_matchresp(line, len, "FETCH")) - return FALSE; - break; - - case IMAP_SEARCH: - if(!imap_matchresp(line, len, "SEARCH")) - return FALSE; - break; - - /* Ignore other untagged responses */ - default: - return FALSE; - } - - *resp = '*'; - return TRUE; - } - - /* Do we have a continuation response? This should be a + symbol followed by - a space and optionally some text as per RFC-3501 for the AUTHENTICATE and - APPEND commands and as outlined in Section 4. Examples of RFC-4959 but - some e-mail servers ignore this and only send a single + instead. */ - if(imap && !imap->custom && ((len == 3 && !memcmp("+", line, 1)) || - (len >= 2 && !memcmp("+ ", line, 2)))) { - switch(imapc->state) { - /* States which are interested in continuation responses */ - case IMAP_AUTHENTICATE: - case IMAP_APPEND: - *resp = '+'; - break; - - default: - failf(conn->data, "Unexpected continuation response"); - *resp = -1; - break; - } - - return TRUE; - } - - return FALSE; /* Nothing for us */ -} - -/*********************************************************************** - * - * imap_get_message() - * - * Gets the authentication message from the response buffer. - */ -static void imap_get_message(char *buffer, char **outptr) -{ - size_t len = 0; - char *message = NULL; - - /* Find the start of the message */ - for(message = buffer + 2; *message == ' ' || *message == '\t'; message++) - ; - - /* Find the end of the message */ - for(len = strlen(message); len--;) - if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && - message[len] != '\t') - break; - - /* Terminate the message */ - if(++len) { - message[len] = '\0'; - } - - *outptr = message; -} - -/*********************************************************************** - * - * state() - * - * This is the ONLY way to change IMAP state! - */ -static void state(struct connectdata *conn, imapstate newstate) -{ - struct imap_conn *imapc = &conn->proto.imapc; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* for debug purposes */ - static const char * const names[]={ - "STOP", - "SERVERGREET", - "CAPABILITY", - "STARTTLS", - "UPGRADETLS", - "AUTHENTICATE", - "LOGIN", - "LIST", - "SELECT", - "FETCH", - "FETCH_FINAL", - "APPEND", - "APPEND_FINAL", - "SEARCH", - "LOGOUT", - /* LAST */ - }; - - if(imapc->state != newstate) - infof(conn->data, "IMAP %p state change from %s to %s\n", - (void *)imapc, names[imapc->state], names[newstate]); -#endif - - imapc->state = newstate; -} - -/*********************************************************************** - * - * imap_perform_capability() - * - * Sends the CAPABILITY command in order to obtain a list of server side - * supported capabilities. - */ -static CURLcode imap_perform_capability(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - - imapc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */ - imapc->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */ - imapc->tls_supported = FALSE; /* Clear the TLS capability */ - - /* Send the CAPABILITY command */ - result = imap_sendf(conn, "CAPABILITY"); - - if(!result) - state(conn, IMAP_CAPABILITY); - - return result; -} - -/*********************************************************************** - * - * imap_perform_starttls() - * - * Sends the STARTTLS command to start the upgrade to TLS. - */ -static CURLcode imap_perform_starttls(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Send the STARTTLS command */ - result = imap_sendf(conn, "STARTTLS"); - - if(!result) - state(conn, IMAP_STARTTLS); - - return result; -} - -/*********************************************************************** - * - * imap_perform_upgrade_tls() - * - * Performs the upgrade to TLS. - */ -static CURLcode imap_perform_upgrade_tls(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - - /* Start the SSL connection */ - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone); - - if(!result) { - if(imapc->state != IMAP_UPGRADETLS) - state(conn, IMAP_UPGRADETLS); - - if(imapc->ssldone) { - imap_to_imaps(conn); - result = imap_perform_capability(conn); - } - } - - return result; -} - -/*********************************************************************** - * - * imap_perform_login() - * - * Sends a clear text LOGIN command to authenticate with. - */ -static CURLcode imap_perform_login(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - char *user; - char *passwd; - - /* Check we have a username and password to authenticate with and end the - connect phase if we don't */ - if(!conn->bits.user_passwd) { - state(conn, IMAP_STOP); - - return result; - } - - /* Make sure the username and password are in the correct atom format */ - user = imap_atom(conn->user, false); - passwd = imap_atom(conn->passwd, false); - - /* Send the LOGIN command */ - result = imap_sendf(conn, "LOGIN %s %s", user ? user : "", - passwd ? passwd : ""); - - free(user); - free(passwd); - - if(!result) - state(conn, IMAP_LOGIN); - - return result; -} - -/*********************************************************************** - * - * imap_perform_authenticate() - * - * Sends an AUTHENTICATE command allowing the client to login with the given - * SASL authentication mechanism. - */ -static CURLcode imap_perform_authenticate(struct connectdata *conn, - const char *mech, - const char *initresp) -{ - CURLcode result = CURLE_OK; - - if(initresp) { - /* Send the AUTHENTICATE command with the initial response */ - result = imap_sendf(conn, "AUTHENTICATE %s %s", mech, initresp); - } - else { - /* Send the AUTHENTICATE command */ - result = imap_sendf(conn, "AUTHENTICATE %s", mech); - } - - return result; -} - -/*********************************************************************** - * - * imap_continue_authenticate() - * - * Sends SASL continuation data or cancellation. - */ -static CURLcode imap_continue_authenticate(struct connectdata *conn, - const char *resp) -{ - struct imap_conn *imapc = &conn->proto.imapc; - - return Curl_pp_sendf(&imapc->pp, "%s", resp); -} - -/*********************************************************************** - * - * imap_perform_authentication() - * - * Initiates the authentication sequence, with the appropriate SASL - * authentication mechanism, falling back to clear text should a common - * mechanism not be available between the client and server. - */ -static CURLcode imap_perform_authentication(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - saslprogress progress; - - /* Check we have enough data to authenticate with and end the - connect phase if we don't */ - if(!Curl_sasl_can_authenticate(&imapc->sasl, conn)) { - state(conn, IMAP_STOP); - return result; - } - - /* Calculate the SASL login details */ - result = Curl_sasl_start(&imapc->sasl, conn, imapc->ir_supported, &progress); - - if(!result) { - if(progress == SASL_INPROGRESS) - state(conn, IMAP_AUTHENTICATE); - else if(!imapc->login_disabled && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) - /* Perform clear text authentication */ - result = imap_perform_login(conn); - else { - /* Other mechanisms not supported */ - infof(conn->data, "No known authentication mechanisms supported!\n"); - result = CURLE_LOGIN_DENIED; - } - } - - return result; -} - -/*********************************************************************** - * - * imap_perform_list() - * - * Sends a LIST command or an alternative custom request. - */ -static CURLcode imap_perform_list(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = data->req.protop; - char *mailbox; - - if(imap->custom) - /* Send the custom request */ - result = imap_sendf(conn, "%s%s", imap->custom, - imap->custom_params ? imap->custom_params : ""); - else { - /* Make sure the mailbox is in the correct atom format if necessary */ - mailbox = imap->mailbox ? imap_atom(imap->mailbox, true) : strdup(""); - if(!mailbox) - return CURLE_OUT_OF_MEMORY; - - /* Send the LIST command */ - result = imap_sendf(conn, "LIST \"%s\" *", mailbox); - - free(mailbox); - } - - if(!result) - state(conn, IMAP_LIST); - - return result; -} - -/*********************************************************************** - * - * imap_perform_select() - * - * Sends a SELECT command to ask the server to change the selected mailbox. - */ -static CURLcode imap_perform_select(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = data->req.protop; - struct imap_conn *imapc = &conn->proto.imapc; - char *mailbox; - - /* Invalidate old information as we are switching mailboxes */ - Curl_safefree(imapc->mailbox); - Curl_safefree(imapc->mailbox_uidvalidity); - - /* Check we have a mailbox */ - if(!imap->mailbox) { - failf(conn->data, "Cannot SELECT without a mailbox."); - return CURLE_URL_MALFORMAT; - } - - /* Make sure the mailbox is in the correct atom format */ - mailbox = imap_atom(imap->mailbox, false); - if(!mailbox) - return CURLE_OUT_OF_MEMORY; - - /* Send the SELECT command */ - result = imap_sendf(conn, "SELECT %s", mailbox); - - free(mailbox); - - if(!result) - state(conn, IMAP_SELECT); - - return result; -} - -/*********************************************************************** - * - * imap_perform_fetch() - * - * Sends a FETCH command to initiate the download of a message. - */ -static CURLcode imap_perform_fetch(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct IMAP *imap = conn->data->req.protop; - - /* Check we have a UID */ - if(!imap->uid) { - failf(conn->data, "Cannot FETCH without a UID."); - return CURLE_URL_MALFORMAT; - } - - /* Send the FETCH command */ - if(imap->partial) - result = imap_sendf(conn, "FETCH %s BODY[%s]<%s>", - imap->uid, - imap->section ? imap->section : "", - imap->partial); - else - result = imap_sendf(conn, "FETCH %s BODY[%s]", - imap->uid, - imap->section ? imap->section : ""); - - if(!result) - state(conn, IMAP_FETCH); - - return result; -} - -/*********************************************************************** - * - * imap_perform_append() - * - * Sends an APPEND command to initiate the upload of a message. - */ -static CURLcode imap_perform_append(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct IMAP *imap = conn->data->req.protop; - char *mailbox; - - /* Check we have a mailbox */ - if(!imap->mailbox) { - failf(conn->data, "Cannot APPEND without a mailbox."); - return CURLE_URL_MALFORMAT; - } - - /* Check we know the size of the upload */ - if(conn->data->state.infilesize < 0) { - failf(conn->data, "Cannot APPEND with unknown input file size\n"); - return CURLE_UPLOAD_FAILED; - } - - /* Make sure the mailbox is in the correct atom format */ - mailbox = imap_atom(imap->mailbox, false); - if(!mailbox) - return CURLE_OUT_OF_MEMORY; - - /* Send the APPEND command */ - result = imap_sendf(conn, "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}", - mailbox, conn->data->state.infilesize); - - free(mailbox); - - if(!result) - state(conn, IMAP_APPEND); - - return result; -} - -/*********************************************************************** - * - * imap_perform_search() - * - * Sends a SEARCH command. - */ -static CURLcode imap_perform_search(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct IMAP *imap = conn->data->req.protop; - - /* Check we have a query string */ - if(!imap->query) { - failf(conn->data, "Cannot SEARCH without a query string."); - return CURLE_URL_MALFORMAT; - } - - /* Send the SEARCH command */ - result = imap_sendf(conn, "SEARCH %s", imap->query); - - if(!result) - state(conn, IMAP_SEARCH); - - return result; -} - -/*********************************************************************** - * - * imap_perform_logout() - * - * Performs the logout action prior to sclose() being called. - */ -static CURLcode imap_perform_logout(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Send the LOGOUT command */ - result = imap_sendf(conn, "LOGOUT"); - - if(!result) - state(conn, IMAP_LOGOUT); - - return result; -} - -/* For the initial server greeting */ -static CURLcode imap_state_servergreet_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(imapcode != 'O') { - failf(data, "Got unexpected imap-server response"); - result = CURLE_WEIRD_SERVER_REPLY; - } - else - result = imap_perform_capability(conn); - - return result; -} - -/* For CAPABILITY responses */ -static CURLcode imap_state_capability_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct imap_conn *imapc = &conn->proto.imapc; - const char *line = data->state.buffer; - size_t wordlen; - - (void)instate; /* no use for this yet */ - - /* Do we have a untagged response? */ - if(imapcode == '*') { - line += 2; - - /* Loop through the data line */ - for(;;) { - while(*line && - (*line == ' ' || *line == '\t' || - *line == '\r' || *line == '\n')) { - - line++; - } - - if(!*line) - break; - - /* Extract the word */ - for(wordlen = 0; line[wordlen] && line[wordlen] != ' ' && - line[wordlen] != '\t' && line[wordlen] != '\r' && - line[wordlen] != '\n';) - wordlen++; - - /* Does the server support the STARTTLS capability? */ - if(wordlen == 8 && !memcmp(line, "STARTTLS", 8)) - imapc->tls_supported = TRUE; - - /* Has the server explicitly disabled clear text authentication? */ - else if(wordlen == 13 && !memcmp(line, "LOGINDISABLED", 13)) - imapc->login_disabled = TRUE; - - /* Does the server support the SASL-IR capability? */ - else if(wordlen == 7 && !memcmp(line, "SASL-IR", 7)) - imapc->ir_supported = TRUE; - - /* Do we have a SASL based authentication mechanism? */ - else if(wordlen > 5 && !memcmp(line, "AUTH=", 5)) { - size_t llen; - unsigned int mechbit; - - line += 5; - wordlen -= 5; - - /* Test the word for a matching authentication mechanism */ - mechbit = Curl_sasl_decode_mech(line, wordlen, &llen); - if(mechbit && llen == wordlen) - imapc->sasl.authmechs |= mechbit; - } - - line += wordlen; - } - } - else if(imapcode == 'O') { - if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { - /* We don't have a SSL/TLS connection yet, but SSL is requested */ - if(imapc->tls_supported) - /* Switch to TLS connection now */ - result = imap_perform_starttls(conn); - else if(data->set.use_ssl == CURLUSESSL_TRY) - /* Fallback and carry on with authentication */ - result = imap_perform_authentication(conn); - else { - failf(data, "STARTTLS not supported."); - result = CURLE_USE_SSL_FAILED; - } - } - else - result = imap_perform_authentication(conn); - } - else - result = imap_perform_authentication(conn); - - return result; -} - -/* For STARTTLS responses */ -static CURLcode imap_state_starttls_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(imapcode != 'O') { - if(data->set.use_ssl != CURLUSESSL_TRY) { - failf(data, "STARTTLS denied"); - result = CURLE_USE_SSL_FAILED; - } - else - result = imap_perform_authentication(conn); - } - else - result = imap_perform_upgrade_tls(conn); - - return result; -} - -/* For SASL authentication responses */ -static CURLcode imap_state_auth_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct imap_conn *imapc = &conn->proto.imapc; - saslprogress progress; - - (void)instate; /* no use for this yet */ - - result = Curl_sasl_continue(&imapc->sasl, conn, imapcode, &progress); - if(!result) - switch(progress) { - case SASL_DONE: - state(conn, IMAP_STOP); /* Authenticated */ - break; - case SASL_IDLE: /* No mechanism left after cancellation */ - if((!imapc->login_disabled) && (imapc->preftype & IMAP_TYPE_CLEARTEXT)) - /* Perform clear text authentication */ - result = imap_perform_login(conn); - else { - failf(data, "Authentication cancelled"); - result = CURLE_LOGIN_DENIED; - } - break; - default: - break; - } - - return result; -} - -/* For LOGIN responses */ -static CURLcode imap_state_login_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(imapcode != 'O') { - failf(data, "Access denied. %c", imapcode); - result = CURLE_LOGIN_DENIED; - } - else - /* End of connect phase */ - state(conn, IMAP_STOP); - - return result; -} - -/* For LIST and SEARCH responses */ -static CURLcode imap_state_listsearch_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - char *line = conn->data->state.buffer; - size_t len = strlen(line); - - (void)instate; /* No use for this yet */ - - if(imapcode == '*') { - /* Temporarily add the LF character back and send as body to the client */ - line[len] = '\n'; - result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1); - line[len] = '\0'; - } - else if(imapcode != 'O') - result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */ - else - /* End of DO phase */ - state(conn, IMAP_STOP); - - return result; -} - -/* For SELECT responses */ -static CURLcode imap_state_select_resp(struct connectdata *conn, int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = conn->data->req.protop; - struct imap_conn *imapc = &conn->proto.imapc; - const char *line = data->state.buffer; - char tmp[20]; - - (void)instate; /* no use for this yet */ - - if(imapcode == '*') { - /* See if this is an UIDVALIDITY response */ - if(sscanf(line + 2, "OK [UIDVALIDITY %19[0123456789]]", tmp) == 1) { - Curl_safefree(imapc->mailbox_uidvalidity); - imapc->mailbox_uidvalidity = strdup(tmp); - } - } - else if(imapcode == 'O') { - /* Check if the UIDVALIDITY has been specified and matches */ - if(imap->uidvalidity && imapc->mailbox_uidvalidity && - strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity)) { - failf(conn->data, "Mailbox UIDVALIDITY has changed"); - result = CURLE_REMOTE_FILE_NOT_FOUND; - } - else { - /* Note the currently opened mailbox on this connection */ - imapc->mailbox = strdup(imap->mailbox); - - if(imap->custom) - result = imap_perform_list(conn); - else if(imap->query) - result = imap_perform_search(conn); - else - result = imap_perform_fetch(conn); - } - } - else { - failf(data, "Select failed"); - result = CURLE_LOGIN_DENIED; - } - - return result; -} - -/* For the (first line of the) FETCH responses */ -static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct imap_conn *imapc = &conn->proto.imapc; - struct pingpong *pp = &imapc->pp; - const char *ptr = data->state.buffer; - bool parsed = FALSE; - curl_off_t size = 0; - - (void)instate; /* no use for this yet */ - - if(imapcode != '*') { - Curl_pgrsSetDownloadSize(data, -1); - state(conn, IMAP_STOP); - return CURLE_REMOTE_FILE_NOT_FOUND; /* TODO: Fix error code */ - } - - /* Something like this is received "* 1 FETCH (BODY[TEXT] {2021}\r" so parse - the continuation data contained within the curly brackets */ - while(*ptr && (*ptr != '{')) - ptr++; - - if(*ptr == '{') { - char *endptr; - size = curlx_strtoofft(ptr + 1, &endptr, 10); - if(endptr - ptr > 1 && endptr[0] == '}' && - endptr[1] == '\r' && endptr[2] == '\0') - parsed = TRUE; - } - - if(parsed) { - infof(data, "Found %" CURL_FORMAT_CURL_OFF_TU " bytes to download\n", - size); - Curl_pgrsSetDownloadSize(data, size); - - if(pp->cache) { - /* At this point there is a bunch of data in the header "cache" that is - actually body content, send it as body and then skip it. Do note - that there may even be additional "headers" after the body. */ - size_t chunk = pp->cache_size; - - if(chunk > (size_t)size) - /* The conversion from curl_off_t to size_t is always fine here */ - chunk = (size_t)size; - - result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk); - if(result) - return result; - - data->req.bytecount += chunk; - - infof(data, "Written %" CURL_FORMAT_CURL_OFF_TU - " bytes, %" CURL_FORMAT_CURL_OFF_TU - " bytes are left for transfer\n", (curl_off_t)chunk, - size - chunk); - - /* Have we used the entire cache or just part of it?*/ - if(pp->cache_size > chunk) { - /* Only part of it so shrink the cache to fit the trailing data */ - memmove(pp->cache, pp->cache + chunk, pp->cache_size - chunk); - pp->cache_size -= chunk; - } - else { - /* Free the cache */ - Curl_safefree(pp->cache); - - /* Reset the cache size */ - pp->cache_size = 0; - } - } - - if(data->req.bytecount == size) - /* The entire data is already transferred! */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - else { - /* IMAP download */ - data->req.maxdownload = size; - Curl_setup_transfer(conn, FIRSTSOCKET, size, FALSE, NULL, -1, NULL); - } - } - else { - /* We don't know how to parse this line */ - failf(pp->conn->data, "Failed to parse FETCH response."); - result = CURLE_WEIRD_SERVER_REPLY; - } - - /* End of DO phase */ - state(conn, IMAP_STOP); - - return result; -} - -/* For final FETCH responses performed after the download */ -static CURLcode imap_state_fetch_final_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - - (void)instate; /* No use for this yet */ - - if(imapcode != 'O') - result = CURLE_WEIRD_SERVER_REPLY; - else - /* End of DONE phase */ - state(conn, IMAP_STOP); - - return result; -} - -/* For APPEND responses */ -static CURLcode imap_state_append_resp(struct connectdata *conn, int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* No use for this yet */ - - if(imapcode != '+') { - result = CURLE_UPLOAD_FAILED; - } - else { - /* Set the progress upload size */ - Curl_pgrsSetUploadSize(data, data->state.infilesize); - - /* IMAP upload */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL); - - /* End of DO phase */ - state(conn, IMAP_STOP); - } - - return result; -} - -/* For final APPEND responses performed after the upload */ -static CURLcode imap_state_append_final_resp(struct connectdata *conn, - int imapcode, - imapstate instate) -{ - CURLcode result = CURLE_OK; - - (void)instate; /* No use for this yet */ - - if(imapcode != 'O') - result = CURLE_UPLOAD_FAILED; - else - /* End of DONE phase */ - state(conn, IMAP_STOP); - - return result; -} - -static CURLcode imap_statemach_act(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - int imapcode; - struct imap_conn *imapc = &conn->proto.imapc; - struct pingpong *pp = &imapc->pp; - size_t nread = 0; - - /* Busy upgrading the connection; right now all I/O is SSL/TLS, not IMAP */ - if(imapc->state == IMAP_UPGRADETLS) - return imap_perform_upgrade_tls(conn); - - /* Flush any data that needs to be sent */ - if(pp->sendleft) - return Curl_pp_flushsend(pp); - - do { - /* Read the response from the server */ - result = Curl_pp_readresp(sock, pp, &imapcode, &nread); - if(result) - return result; - - /* Was there an error parsing the response line? */ - if(imapcode == -1) - return CURLE_WEIRD_SERVER_REPLY; - - if(!imapcode) - break; - - /* We have now received a full IMAP server response */ - switch(imapc->state) { - case IMAP_SERVERGREET: - result = imap_state_servergreet_resp(conn, imapcode, imapc->state); - break; - - case IMAP_CAPABILITY: - result = imap_state_capability_resp(conn, imapcode, imapc->state); - break; - - case IMAP_STARTTLS: - result = imap_state_starttls_resp(conn, imapcode, imapc->state); - break; - - case IMAP_AUTHENTICATE: - result = imap_state_auth_resp(conn, imapcode, imapc->state); - break; - - case IMAP_LOGIN: - result = imap_state_login_resp(conn, imapcode, imapc->state); - break; - - case IMAP_LIST: - result = imap_state_listsearch_resp(conn, imapcode, imapc->state); - break; - - case IMAP_SELECT: - result = imap_state_select_resp(conn, imapcode, imapc->state); - break; - - case IMAP_FETCH: - result = imap_state_fetch_resp(conn, imapcode, imapc->state); - break; - - case IMAP_FETCH_FINAL: - result = imap_state_fetch_final_resp(conn, imapcode, imapc->state); - break; - - case IMAP_APPEND: - result = imap_state_append_resp(conn, imapcode, imapc->state); - break; - - case IMAP_APPEND_FINAL: - result = imap_state_append_final_resp(conn, imapcode, imapc->state); - break; - - case IMAP_SEARCH: - result = imap_state_listsearch_resp(conn, imapcode, imapc->state); - break; - - case IMAP_LOGOUT: - /* fallthrough, just stop! */ - default: - /* internal error */ - state(conn, IMAP_STOP); - break; - } - } while(!result && imapc->state != IMAP_STOP && Curl_pp_moredata(pp)); - - return result; -} - -/* Called repeatedly until done from multi.c */ -static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - - if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) { - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone); - if(result || !imapc->ssldone) - return result; - } - - result = Curl_pp_statemach(&imapc->pp, FALSE); - *done = (imapc->state == IMAP_STOP) ? TRUE : FALSE; - - return result; -} - -static CURLcode imap_block_statemach(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - - while(imapc->state != IMAP_STOP && !result) - result = Curl_pp_statemach(&imapc->pp, TRUE); - - return result; -} - -/* Allocate and initialize the struct IMAP for the current Curl_easy if - required */ -static CURLcode imap_init(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap; - - imap = data->req.protop = calloc(sizeof(struct IMAP), 1); - if(!imap) - result = CURLE_OUT_OF_MEMORY; - - return result; -} - -/* For the IMAP "protocol connect" and "doing" phases only */ -static int imap_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - return Curl_pp_getsock(&conn->proto.imapc.pp, socks, numsocks); -} - -/*********************************************************************** - * - * imap_connect() - * - * This function should do everything that is to be considered a part of the - * connection phase. - * - * The variable 'done' points to will be TRUE if the protocol-layer connect - * phase is done when this function returns, or FALSE if not. - */ -static CURLcode imap_connect(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - struct pingpong *pp = &imapc->pp; - - *done = FALSE; /* default to not done yet */ - - /* We always support persistent connections in IMAP */ - connkeep(conn, "IMAP default"); - - /* Set the default response time-out */ - pp->response_time = RESP_TIMEOUT; - pp->statemach_act = imap_statemach_act; - pp->endofresp = imap_endofresp; - pp->conn = conn; - - /* Set the default preferred authentication type and mechanism */ - imapc->preftype = IMAP_TYPE_ANY; - Curl_sasl_init(&imapc->sasl, &saslimap); - - /* Initialise the pingpong layer */ - Curl_pp_init(pp); - - /* Parse the URL options */ - result = imap_parse_url_options(conn); - if(result) - return result; - - /* Start off waiting for the server greeting response */ - state(conn, IMAP_SERVERGREET); - - /* Start off with an response id of '*' */ - strcpy(imapc->resptag, "*"); - - result = imap_multi_statemach(conn, done); - - return result; -} - -/*********************************************************************** - * - * imap_done() - * - * The DONE function. This does what needs to be done after a single DO has - * performed. - * - * Input argument is already checked for validity. - */ -static CURLcode imap_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = data->req.protop; - - (void)premature; - - if(!imap) - return CURLE_OK; - - if(status) { - connclose(conn, "IMAP done with bad status"); /* marked for closure */ - result = status; /* use the already set error code */ - } - else if(!data->set.connect_only && !imap->custom && - (imap->uid || data->set.upload)) { - /* Handle responses after FETCH or APPEND transfer has finished */ - if(!data->set.upload) - state(conn, IMAP_FETCH_FINAL); - else { - /* End the APPEND command first by sending an empty line */ - result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", ""); - if(!result) - state(conn, IMAP_APPEND_FINAL); - } - - /* Run the state-machine - - TODO: when the multi interface is used, this _really_ should be using - the imap_multi_statemach function but we have no general support for - non-blocking DONE operations! - */ - if(!result) - result = imap_block_statemach(conn); - } - - /* Cleanup our per-request based variables */ - Curl_safefree(imap->mailbox); - Curl_safefree(imap->uidvalidity); - Curl_safefree(imap->uid); - Curl_safefree(imap->section); - Curl_safefree(imap->partial); - Curl_safefree(imap->query); - Curl_safefree(imap->custom); - Curl_safefree(imap->custom_params); - - /* Clear the transfer mode for the next request */ - imap->transfer = FTPTRANSFER_BODY; - - return result; -} - -/*********************************************************************** - * - * imap_perform() - * - * This is the actual DO function for IMAP. Fetch or append a message, or do - * other things according to the options previously setup. - */ -static CURLcode imap_perform(struct connectdata *conn, bool *connected, - bool *dophase_done) -{ - /* This is IMAP and no proxy */ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = data->req.protop; - struct imap_conn *imapc = &conn->proto.imapc; - bool selected = FALSE; - - DEBUGF(infof(conn->data, "DO phase starts\n")); - - if(conn->data->set.opt_no_body) { - /* Requested no body means no transfer */ - imap->transfer = FTPTRANSFER_INFO; - } - - *dophase_done = FALSE; /* not done yet */ - - /* Determine if the requested mailbox (with the same UIDVALIDITY if set) - has already been selected on this connection */ - if(imap->mailbox && imapc->mailbox && - !strcmp(imap->mailbox, imapc->mailbox) && - (!imap->uidvalidity || !imapc->mailbox_uidvalidity || - !strcmp(imap->uidvalidity, imapc->mailbox_uidvalidity))) - selected = TRUE; - - /* Start the first command in the DO phase */ - if(conn->data->set.upload) - /* APPEND can be executed directly */ - result = imap_perform_append(conn); - else if(imap->custom && (selected || !imap->mailbox)) - /* Custom command using the same mailbox or no mailbox */ - result = imap_perform_list(conn); - else if(!imap->custom && selected && imap->uid) - /* FETCH from the same mailbox */ - result = imap_perform_fetch(conn); - else if(!imap->custom && selected && imap->query) - /* SEARCH the current mailbox */ - result = imap_perform_search(conn); - else if(imap->mailbox && !selected && - (imap->custom || imap->uid || imap->query)) - /* SELECT the mailbox */ - result = imap_perform_select(conn); - else - /* LIST */ - result = imap_perform_list(conn); - - if(result) - return result; - - /* Run the state-machine */ - result = imap_multi_statemach(conn, dophase_done); - - *connected = conn->bits.tcpconnect[FIRSTSOCKET]; - - if(*dophase_done) - DEBUGF(infof(conn->data, "DO phase is complete\n")); - - return result; -} - -/*********************************************************************** - * - * imap_do() - * - * This function is registered as 'curl_do' function. It decodes the path - * parts etc as a wrapper to the actual DO function (imap_perform). - * - * The input argument is already checked for validity. - */ -static CURLcode imap_do(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - - *done = FALSE; /* default to false */ - - /* Parse the URL path */ - result = imap_parse_url_path(conn); - if(result) - return result; - - /* Parse the custom request */ - result = imap_parse_custom_request(conn); - if(result) - return result; - - result = imap_regular_transfer(conn, done); - - return result; -} - -/*********************************************************************** - * - * imap_disconnect() - * - * Disconnect from an IMAP server. Cleanup protocol-specific per-connection - * resources. BLOCKING. - */ -static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection) -{ - struct imap_conn *imapc = &conn->proto.imapc; - - /* We cannot send quit unconditionally. If this connection is stale or - bad in any way, sending quit and waiting around here will make the - disconnect wait in vain and cause more problems than we need to. */ - - /* The IMAP session may or may not have been allocated/setup at this - point! */ - if(!dead_connection && imapc->pp.conn && imapc->pp.conn->bits.protoconnstart) - if(!imap_perform_logout(conn)) - (void)imap_block_statemach(conn); /* ignore errors on LOGOUT */ - - /* Disconnect from the server */ - Curl_pp_disconnect(&imapc->pp); - - /* Cleanup the SASL module */ - Curl_sasl_cleanup(conn, imapc->sasl.authused); - - /* Cleanup our connection based variables */ - Curl_safefree(imapc->mailbox); - Curl_safefree(imapc->mailbox_uidvalidity); - - return CURLE_OK; -} - -/* Call this when the DO phase has completed */ -static CURLcode imap_dophase_done(struct connectdata *conn, bool connected) -{ - struct IMAP *imap = conn->data->req.protop; - - (void)connected; - - if(imap->transfer != FTPTRANSFER_BODY) - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - - return CURLE_OK; -} - -/* Called from multi.c while DOing */ -static CURLcode imap_doing(struct connectdata *conn, bool *dophase_done) -{ - CURLcode result = imap_multi_statemach(conn, dophase_done); - - if(result) - DEBUGF(infof(conn->data, "DO phase failed\n")); - else if(*dophase_done) { - result = imap_dophase_done(conn, FALSE /* not connected */); - - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - - return result; -} - -/*********************************************************************** - * - * imap_regular_transfer() - * - * The input argument is already checked for validity. - * - * Performs all commands done before a regular transfer between a local and a - * remote host. - */ -static CURLcode imap_regular_transfer(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result = CURLE_OK; - bool connected = FALSE; - struct Curl_easy *data = conn->data; - - /* Make sure size is unknown at this point */ - data->req.size = -1; - - /* Set the progress data */ - Curl_pgrsSetUploadCounter(data, 0); - Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); - - /* Carry out the perform */ - result = imap_perform(conn, &connected, dophase_done); - - /* Perform post DO phase operations if necessary */ - if(!result && *dophase_done) - result = imap_dophase_done(conn, connected); - - return result; -} - -static CURLcode imap_setup_connection(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - - /* Initialise the IMAP layer */ - CURLcode result = imap_init(conn); - if(result) - return result; - - /* Clear the TLS upgraded flag */ - conn->tls_upgraded = FALSE; - - /* Set up the proxy if necessary */ - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel IMAP operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_imap) - conn->handler = &Curl_handler_imap_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_imaps_proxy; -#else - failf(data, "IMAPS not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - /* set it up as an HTTP connection instead */ - return conn->handler->setup_connection(conn); -#else - failf(data, "IMAP over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - data->state.path++; /* don't include the initial slash */ - - return CURLE_OK; -} - -/*********************************************************************** - * - * imap_sendf() - * - * Sends the formated string as an IMAP command to the server. - * - * Designed to never block. - */ -static CURLcode imap_sendf(struct connectdata *conn, const char *fmt, ...) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - char *taggedfmt; - va_list ap; - - DEBUGASSERT(fmt); - - /* Calculate the next command ID wrapping at 3 digits */ - imapc->cmdid = (imapc->cmdid + 1) % 1000; - - /* Calculate the tag based on the connection ID and command ID */ - snprintf(imapc->resptag, sizeof(imapc->resptag), "%c%03d", - 'A' + curlx_sltosi(conn->connection_id % 26), imapc->cmdid); - - /* Prefix the format with the tag */ - taggedfmt = aprintf("%s %s", imapc->resptag, fmt); - if(!taggedfmt) - return CURLE_OUT_OF_MEMORY; - - /* Send the data with the tag */ - va_start(ap, fmt); - result = Curl_pp_vsendf(&imapc->pp, taggedfmt, ap); - va_end(ap); - - free(taggedfmt); - - return result; -} - -/*********************************************************************** - * - * imap_atom() - * - * Checks the input string for characters that need escaping and returns an - * atom ready for sending to the server. - * - * The returned string needs to be freed. - * - */ -static char *imap_atom(const char *str, bool escape_only) -{ - /* !checksrc! disable PARENBRACE 1 */ - const char atom_specials[] = "(){ %*]"; - const char *p1; - char *p2; - size_t backsp_count = 0; - size_t quote_count = 0; - bool others_exists = FALSE; - size_t newlen = 0; - char *newstr = NULL; - - if(!str) - return NULL; - - /* Look for "atom-specials", counting the backslash and quote characters as - these will need escapping */ - p1 = str; - while(*p1) { - if(*p1 == '\\') - backsp_count++; - else if(*p1 == '"') - quote_count++; - else if(!escape_only) { - const char *p3 = atom_specials; - - while(*p3 && !others_exists) { - if(*p1 == *p3) - others_exists = TRUE; - - p3++; - } - } - - p1++; - } - - /* Does the input contain any "atom-special" characters? */ - if(!backsp_count && !quote_count && !others_exists) - return strdup(str); - - /* Calculate the new string length */ - newlen = strlen(str) + backsp_count + quote_count + (others_exists ? 2 : 0); - - /* Allocate the new string */ - newstr = (char *) malloc((newlen + 1) * sizeof(char)); - if(!newstr) - return NULL; - - /* Surround the string in quotes if necessary */ - p2 = newstr; - if(others_exists) { - newstr[0] = '"'; - newstr[newlen - 1] = '"'; - p2++; - } - - /* Copy the string, escaping backslash and quote characters along the way */ - p1 = str; - while(*p1) { - if(*p1 == '\\' || *p1 == '"') { - *p2 = '\\'; - p2++; - } - - *p2 = *p1; - - p1++; - p2++; - } - - /* Terminate the string */ - newstr[newlen] = '\0'; - - return newstr; -} - -/*********************************************************************** - * - * imap_is_bchar() - * - * Portable test of whether the specified char is a "bchar" as defined in the - * grammar of RFC-5092. - */ -static bool imap_is_bchar(char ch) -{ - switch(ch) { - /* bchar */ - case ':': case '@': case '/': - /* bchar -> achar */ - case '&': case '=': - /* bchar -> achar -> uchar -> unreserved */ - case '0': case '1': case '2': case '3': case '4': case '5': case '6': - case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': - case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': - case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': - case 'V': case 'W': case 'X': case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': - case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': - case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': - case 'v': case 'w': case 'x': case 'y': case 'z': - case '-': case '.': case '_': case '~': - /* bchar -> achar -> uchar -> sub-delims-sh */ - case '!': case '$': case '\'': case '(': case ')': case '*': - case '+': case ',': - /* bchar -> achar -> uchar -> pct-encoded */ - case '%': /* HEXDIG chars are already included above */ - return true; - - default: - return false; - } -} - -/*********************************************************************** - * - * imap_parse_url_options() - * - * Parse the URL login options. - */ -static CURLcode imap_parse_url_options(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct imap_conn *imapc = &conn->proto.imapc; - const char *ptr = conn->options; - - imapc->sasl.resetprefs = TRUE; - - while(!result && ptr && *ptr) { - const char *key = ptr; - const char *value; - - while(*ptr && *ptr != '=') - ptr++; - - value = ptr + 1; - - while(*ptr && *ptr != ';') - ptr++; - - if(strncasecompare(key, "AUTH=", 5)) - result = Curl_sasl_parse_url_auth_option(&imapc->sasl, - value, ptr - value); - else - result = CURLE_URL_MALFORMAT; - - if(*ptr == ';') - ptr++; - } - - switch(imapc->sasl.prefmech) { - case SASL_AUTH_NONE: - imapc->preftype = IMAP_TYPE_NONE; - break; - case SASL_AUTH_DEFAULT: - imapc->preftype = IMAP_TYPE_ANY; - break; - default: - imapc->preftype = IMAP_TYPE_SASL; - break; - } - - return result; -} - -/*********************************************************************** - * - * imap_parse_url_path() - * - * Parse the URL path into separate path components. - * - */ -static CURLcode imap_parse_url_path(struct connectdata *conn) -{ - /* The imap struct is already initialised in imap_connect() */ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = data->req.protop; - const char *begin = data->state.path; - const char *ptr = begin; - - /* See how much of the URL is a valid path and decode it */ - while(imap_is_bchar(*ptr)) - ptr++; - - if(ptr != begin) { - /* Remove the trailing slash if present */ - const char *end = ptr; - if(end > begin && end[-1] == '/') - end--; - - result = Curl_urldecode(data, begin, end - begin, &imap->mailbox, NULL, - TRUE); - if(result) - return result; - } - else - imap->mailbox = NULL; - - /* There can be any number of parameters in the form ";NAME=VALUE" */ - while(*ptr == ';') { - char *name; - char *value; - size_t valuelen; - - /* Find the length of the name parameter */ - begin = ++ptr; - while(*ptr && *ptr != '=') - ptr++; - - if(!*ptr) - return CURLE_URL_MALFORMAT; - - /* Decode the name parameter */ - result = Curl_urldecode(data, begin, ptr - begin, &name, NULL, TRUE); - if(result) - return result; - - /* Find the length of the value parameter */ - begin = ++ptr; - while(imap_is_bchar(*ptr)) - ptr++; - - /* Decode the value parameter */ - result = Curl_urldecode(data, begin, ptr - begin, &value, &valuelen, TRUE); - if(result) { - free(name); - return result; - } - - DEBUGF(infof(conn->data, "IMAP URL parameter '%s' = '%s'\n", name, value)); - - /* Process the known hierarchical parameters (UIDVALIDITY, UID, SECTION and - PARTIAL) stripping of the trailing slash character if it is present. - - Note: Unknown parameters trigger a URL_MALFORMAT error. */ - if(strcasecompare(name, "UIDVALIDITY") && !imap->uidvalidity) { - if(valuelen > 0 && value[valuelen - 1] == '/') - value[valuelen - 1] = '\0'; - - imap->uidvalidity = value; - value = NULL; - } - else if(strcasecompare(name, "UID") && !imap->uid) { - if(valuelen > 0 && value[valuelen - 1] == '/') - value[valuelen - 1] = '\0'; - - imap->uid = value; - value = NULL; - } - else if(strcasecompare(name, "SECTION") && !imap->section) { - if(valuelen > 0 && value[valuelen - 1] == '/') - value[valuelen - 1] = '\0'; - - imap->section = value; - value = NULL; - } - else if(strcasecompare(name, "PARTIAL") && !imap->partial) { - if(valuelen > 0 && value[valuelen - 1] == '/') - value[valuelen - 1] = '\0'; - - imap->partial = value; - value = NULL; - } - else { - free(name); - free(value); - - return CURLE_URL_MALFORMAT; - } - - free(name); - free(value); - } - - /* Does the URL contain a query parameter? Only valid when we have a mailbox - and no UID as per RFC-5092 */ - if(imap->mailbox && !imap->uid && *ptr == '?') { - /* Find the length of the query parameter */ - begin = ++ptr; - while(imap_is_bchar(*ptr)) - ptr++; - - /* Decode the query parameter */ - result = Curl_urldecode(data, begin, ptr - begin, &imap->query, NULL, - TRUE); - if(result) - return result; - } - - /* Any extra stuff at the end of the URL is an error */ - if(*ptr) - return CURLE_URL_MALFORMAT; - - return CURLE_OK; -} - -/*********************************************************************** - * - * imap_parse_custom_request() - * - * Parse the custom request. - */ -static CURLcode imap_parse_custom_request(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct IMAP *imap = data->req.protop; - const char *custom = data->set.str[STRING_CUSTOMREQUEST]; - - if(custom) { - /* URL decode the custom request */ - result = Curl_urldecode(data, custom, 0, &imap->custom, NULL, TRUE); - - /* Extract the parameters if specified */ - if(!result) { - const char *params = imap->custom; - - while(*params && *params != ' ') - params++; - - if(*params) { - imap->custom_params = strdup(params); - imap->custom[params - imap->custom] = '\0'; - - if(!imap->custom_params) - result = CURLE_OUT_OF_MEMORY; - } - } - } - - return result; -} - -#endif /* CURL_DISABLE_IMAP */ diff --git a/build/premake/premake5/contrib/curl/lib/imap.h b/build/premake/premake5/contrib/curl/lib/imap.h deleted file mode 100644 index 5e0e228f5e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/imap.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef HEADER_CURL_IMAP_H -#define HEADER_CURL_IMAP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2009 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "pingpong.h" -#include "curl_sasl.h" - -/**************************************************************************** - * IMAP unique setup - ***************************************************************************/ -typedef enum { - IMAP_STOP, /* do nothing state, stops the state machine */ - IMAP_SERVERGREET, /* waiting for the initial greeting immediately after - a connect */ - IMAP_CAPABILITY, - IMAP_STARTTLS, - IMAP_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS - (multi mode only) */ - IMAP_AUTHENTICATE, - IMAP_LOGIN, - IMAP_LIST, - IMAP_SELECT, - IMAP_FETCH, - IMAP_FETCH_FINAL, - IMAP_APPEND, - IMAP_APPEND_FINAL, - IMAP_SEARCH, - IMAP_LOGOUT, - IMAP_LAST /* never used */ -} imapstate; - -/* This IMAP struct is used in the Curl_easy. All IMAP data that is - connection-oriented must be in imap_conn to properly deal with the fact that - perhaps the Curl_easy is changed between the times the connection is - used. */ -struct IMAP { - curl_pp_transfer transfer; - char *mailbox; /* Mailbox to select */ - char *uidvalidity; /* UIDVALIDITY to check in select */ - char *uid; /* Message UID to fetch */ - char *section; /* Message SECTION to fetch */ - char *partial; /* Message PARTIAL to fetch */ - char *query; /* Query to search for */ - char *custom; /* Custom request */ - char *custom_params; /* Parameters for the custom request */ -}; - -/* imap_conn is used for struct connection-oriented data in the connectdata - struct */ -struct imap_conn { - struct pingpong pp; - imapstate state; /* Always use imap.c:state() to change state! */ - bool ssldone; /* Is connect() over SSL done? */ - struct SASL sasl; /* SASL-related parameters */ - unsigned int preftype; /* Preferred authentication type */ - int cmdid; /* Last used command ID */ - char resptag[5]; /* Response tag to wait for */ - bool tls_supported; /* StartTLS capability supported by server */ - bool login_disabled; /* LOGIN command disabled by server */ - bool ir_supported; /* Initial response supported by server */ - char *mailbox; /* The last selected mailbox */ - char *mailbox_uidvalidity; /* UIDVALIDITY parsed from select response */ -}; - -extern const struct Curl_handler Curl_handler_imap; -extern const struct Curl_handler Curl_handler_imaps; - -/* Authentication type flags */ -#define IMAP_TYPE_CLEARTEXT (1 << 0) -#define IMAP_TYPE_SASL (1 << 1) - -/* Authentication type values */ -#define IMAP_TYPE_NONE 0 -#define IMAP_TYPE_ANY ~0U - -#endif /* HEADER_CURL_IMAP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/inet_ntop.c b/build/premake/premake5/contrib/curl/lib/inet_ntop.c deleted file mode 100644 index 9afbdbb327..0000000000 --- a/build/premake/premake5/contrib/curl/lib/inet_ntop.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (C) 1996-2001 Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL - * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* - * Original code by Paul Vixie. "curlified" by Gisle Vanem. - */ - -#include "curl_setup.h" - -#ifndef HAVE_INET_NTOP - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#include "inet_ntop.h" -#include "curl_printf.h" - -#define IN6ADDRSZ 16 -#define INADDRSZ 4 -#define INT16SZ 2 - -/* - * Format an IPv4 address, more or less like inet_ntoa(). - * - * Returns `dst' (as a const) - * Note: - * - uses no statics - * - takes a unsigned char* not an in_addr as input - */ -static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size) -{ - char tmp[sizeof "255.255.255.255"]; - size_t len; - - DEBUGASSERT(size >= 16); - - tmp[0] = '\0'; - (void)snprintf(tmp, sizeof(tmp), "%d.%d.%d.%d", - ((int)((unsigned char)src[0])) & 0xff, - ((int)((unsigned char)src[1])) & 0xff, - ((int)((unsigned char)src[2])) & 0xff, - ((int)((unsigned char)src[3])) & 0xff); - - len = strlen(tmp); - if(len == 0 || len >= size) { - SET_ERRNO(ENOSPC); - return (NULL); - } - strcpy(dst, tmp); - return dst; -} - -#ifdef ENABLE_IPV6 -/* - * Convert IPv6 binary address into presentation (printable) format. - */ -static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) -{ - /* - * Note that int32_t and int16_t need only be "at least" large enough - * to contain a value of the specified size. On some systems, like - * Crays, there is no such thing as an integer variable with 16 bits. - * Keep this in mind if you think this function should have been coded - * to use pointer overlays. All the world's not a VAX. - */ - char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; - char *tp; - struct { - long base; - long len; - } best, cur; - unsigned long words[IN6ADDRSZ / INT16SZ]; - int i; - - /* Preprocess: - * Copy the input (bytewise) array into a wordwise array. - * Find the longest run of 0x00's in src[] for :: shorthanding. - */ - memset(words, '\0', sizeof(words)); - for(i = 0; i < IN6ADDRSZ; i++) - words[i/2] |= (src[i] << ((1 - (i % 2)) << 3)); - - best.base = -1; - cur.base = -1; - best.len = 0; - cur.len = 0; - - for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { - if(words[i] == 0) { - if(cur.base == -1) - cur.base = i, cur.len = 1; - else - cur.len++; - } - else if(cur.base != -1) { - if(best.base == -1 || cur.len > best.len) - best = cur; - cur.base = -1; - } - } - if((cur.base != -1) && (best.base == -1 || cur.len > best.len)) - best = cur; - if(best.base != -1 && best.len < 2) - best.base = -1; - /* Format the result. */ - tp = tmp; - for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { - /* Are we inside the best run of 0x00's? */ - if(best.base != -1 && i >= best.base && i < (best.base + best.len)) { - if(i == best.base) - *tp++ = ':'; - continue; - } - - /* Are we following an initial run of 0x00s or any real hex? - */ - if(i != 0) - *tp++ = ':'; - - /* Is this address an encapsulated IPv4? - */ - if(i == 6 && best.base == 0 && - (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { - if(!inet_ntop4(src+12, tp, sizeof(tmp) - (tp - tmp))) { - SET_ERRNO(ENOSPC); - return (NULL); - } - tp += strlen(tp); - break; - } - tp += snprintf(tp, 5, "%lx", words[i]); - } - - /* Was it a trailing run of 0x00's? - */ - if(best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ)) - *tp++ = ':'; - *tp++ = '\0'; - - /* Check for overflow, copy, and we're done. - */ - if((size_t)(tp - tmp) > size) { - SET_ERRNO(ENOSPC); - return (NULL); - } - strcpy(dst, tmp); - return dst; -} -#endif /* ENABLE_IPV6 */ - -/* - * Convert a network format address to presentation format. - * - * Returns pointer to presentation format address (`buf'). - * Returns NULL on error and errno set with the specific - * error, EAFNOSUPPORT or ENOSPC. - * - * On Windows we store the error in the thread errno, not - * in the winsock error code. This is to avoid losing the - * actual last winsock error. So use macro ERRNO to fetch the - * errno this function sets when returning NULL, not SOCKERRNO. - */ -char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size) -{ - switch(af) { - case AF_INET: - return inet_ntop4((const unsigned char *)src, buf, size); -#ifdef ENABLE_IPV6 - case AF_INET6: - return inet_ntop6((const unsigned char *)src, buf, size); -#endif - default: - SET_ERRNO(EAFNOSUPPORT); - return NULL; - } -} -#endif /* HAVE_INET_NTOP */ diff --git a/build/premake/premake5/contrib/curl/lib/inet_ntop.h b/build/premake/premake5/contrib/curl/lib/inet_ntop.h deleted file mode 100644 index 9f44612710..0000000000 --- a/build/premake/premake5/contrib/curl/lib/inet_ntop.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef HEADER_CURL_INET_NTOP_H -#define HEADER_CURL_INET_NTOP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); - -#ifdef HAVE_INET_NTOP -#ifdef HAVE_ARPA_INET_H -#include -#endif -#define Curl_inet_ntop(af,addr,buf,size) \ - inet_ntop(af, addr, buf, (curl_socklen_t)size) -#endif - -#endif /* HEADER_CURL_INET_NTOP_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/inet_pton.c b/build/premake/premake5/contrib/curl/lib/inet_pton.c deleted file mode 100644 index 475f44abc6..0000000000 --- a/build/premake/premake5/contrib/curl/lib/inet_pton.c +++ /dev/null @@ -1,236 +0,0 @@ -/* This is from the BIND 4.9.4 release, modified to compile by itself */ - -/* Copyright (c) 1996 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include "curl_setup.h" - -#ifndef HAVE_INET_PTON - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#include "inet_pton.h" - -#define IN6ADDRSZ 16 -#define INADDRSZ 4 -#define INT16SZ 2 - -/* - * WARNING: Don't even consider trying to compile this on a system where - * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. - */ - -static int inet_pton4(const char *src, unsigned char *dst); -#ifdef ENABLE_IPV6 -static int inet_pton6(const char *src, unsigned char *dst); -#endif - -/* int - * inet_pton(af, src, dst) - * convert from presentation format (which usually means ASCII printable) - * to network format (which is usually some kind of binary format). - * return: - * 1 if the address was valid for the specified address family - * 0 if the address wasn't valid (`dst' is untouched in this case) - * -1 if some other error occurred (`dst' is untouched in this case, too) - * notice: - * On Windows we store the error in the thread errno, not - * in the winsock error code. This is to avoid losing the - * actual last winsock error. So use macro ERRNO to fetch the - * errno this function sets when returning (-1), not SOCKERRNO. - * author: - * Paul Vixie, 1996. - */ -int -Curl_inet_pton(int af, const char *src, void *dst) -{ - switch(af) { - case AF_INET: - return (inet_pton4(src, (unsigned char *)dst)); -#ifdef ENABLE_IPV6 - case AF_INET6: - return (inet_pton6(src, (unsigned char *)dst)); -#endif - default: - SET_ERRNO(EAFNOSUPPORT); - return (-1); - } - /* NOTREACHED */ -} - -/* int - * inet_pton4(src, dst) - * like inet_aton() but without all the hexadecimal and shorthand. - * return: - * 1 if `src' is a valid dotted quad, else 0. - * notice: - * does not touch `dst' unless it's returning 1. - * author: - * Paul Vixie, 1996. - */ -static int -inet_pton4(const char *src, unsigned char *dst) -{ - static const char digits[] = "0123456789"; - int saw_digit, octets, ch; - unsigned char tmp[INADDRSZ], *tp; - - saw_digit = 0; - octets = 0; - tp = tmp; - *tp = 0; - while((ch = *src++) != '\0') { - const char *pch; - - pch = strchr(digits, ch); - if(pch) { - unsigned int val = *tp * 10 + (unsigned int)(pch - digits); - - if(saw_digit && *tp == 0) - return (0); - if(val > 255) - return (0); - *tp = (unsigned char)val; - if(! saw_digit) { - if(++octets > 4) - return (0); - saw_digit = 1; - } - } - else if(ch == '.' && saw_digit) { - if(octets == 4) - return (0); - *++tp = 0; - saw_digit = 0; - } - else - return (0); - } - if(octets < 4) - return (0); - memcpy(dst, tmp, INADDRSZ); - return (1); -} - -#ifdef ENABLE_IPV6 -/* int - * inet_pton6(src, dst) - * convert presentation level address to network order binary form. - * return: - * 1 if `src' is a valid [RFC1884 2.2] address, else 0. - * notice: - * (1) does not touch `dst' unless it's returning 1. - * (2) :: in a full address is silently ignored. - * credit: - * inspired by Mark Andrews. - * author: - * Paul Vixie, 1996. - */ -static int -inet_pton6(const char *src, unsigned char *dst) -{ - static const char xdigits_l[] = "0123456789abcdef", - xdigits_u[] = "0123456789ABCDEF"; - unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp; - const char *xdigits, *curtok; - int ch, saw_xdigit; - size_t val; - - memset((tp = tmp), 0, IN6ADDRSZ); - endp = tp + IN6ADDRSZ; - colonp = NULL; - /* Leading :: requires some special handling. */ - if(*src == ':') - if(*++src != ':') - return (0); - curtok = src; - saw_xdigit = 0; - val = 0; - while((ch = *src++) != '\0') { - const char *pch; - - pch = strchr((xdigits = xdigits_l), ch); - if(!pch) - pch = strchr((xdigits = xdigits_u), ch); - if(pch != NULL) { - val <<= 4; - val |= (pch - xdigits); - if(++saw_xdigit > 4) - return (0); - continue; - } - if(ch == ':') { - curtok = src; - if(!saw_xdigit) { - if(colonp) - return (0); - colonp = tp; - continue; - } - if(tp + INT16SZ > endp) - return (0); - *tp++ = (unsigned char) ((val >> 8) & 0xff); - *tp++ = (unsigned char) (val & 0xff); - saw_xdigit = 0; - val = 0; - continue; - } - if(ch == '.' && ((tp + INADDRSZ) <= endp) && - inet_pton4(curtok, tp) > 0) { - tp += INADDRSZ; - saw_xdigit = 0; - break; /* '\0' was seen by inet_pton4(). */ - } - return (0); - } - if(saw_xdigit) { - if(tp + INT16SZ > endp) - return (0); - *tp++ = (unsigned char) ((val >> 8) & 0xff); - *tp++ = (unsigned char) (val & 0xff); - } - if(colonp != NULL) { - /* - * Since some memmove()'s erroneously fail to handle - * overlapping regions, we'll do the shift by hand. - */ - const ssize_t n = tp - colonp; - ssize_t i; - - if(tp == endp) - return (0); - for(i = 1; i <= n; i++) { - *(endp - i) = *(colonp + n - i); - *(colonp + n - i) = 0; - } - tp = endp; - } - if(tp != endp) - return (0); - memcpy(dst, tmp, IN6ADDRSZ); - return (1); -} -#endif /* ENABLE_IPV6 */ - -#endif /* HAVE_INET_PTON */ diff --git a/build/premake/premake5/contrib/curl/lib/inet_pton.h b/build/premake/premake5/contrib/curl/lib/inet_pton.h deleted file mode 100644 index 9188d9598f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/inet_pton.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef HEADER_CURL_INET_PTON_H -#define HEADER_CURL_INET_PTON_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -int Curl_inet_pton(int, const char *, void *); - -#ifdef HAVE_INET_PTON -#ifdef HAVE_ARPA_INET_H -#include -#endif -#define Curl_inet_pton(x,y,z) inet_pton(x,y,z) -#endif - -#endif /* HEADER_CURL_INET_PTON_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/krb5.c b/build/premake/premake5/contrib/curl/lib/krb5.c deleted file mode 100644 index 067b0a5778..0000000000 --- a/build/premake/premake5/contrib/curl/lib/krb5.c +++ /dev/null @@ -1,338 +0,0 @@ -/* GSSAPI/krb5 support for FTP - loosely based on old krb4.c - * - * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * Copyright (c) 2004 - 2016 Daniel Stenberg - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. */ - -#include "curl_setup.h" - -#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_FTP) - -#ifdef HAVE_NETDB_H -#include -#endif - -#include "urldata.h" -#include "curl_base64.h" -#include "ftp.h" -#include "curl_gssapi.h" -#include "sendf.h" -#include "curl_sec.h" -#include "warnless.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -static int -krb5_init(void *app_data) -{ - gss_ctx_id_t *context = app_data; - /* Make sure our context is initialized for krb5_end. */ - *context = GSS_C_NO_CONTEXT; - return 0; -} - -static int -krb5_check_prot(void *app_data, int level) -{ - (void)app_data; /* unused */ - if(level == PROT_CONFIDENTIAL) - return -1; - return 0; -} - -static int -krb5_decode(void *app_data, void *buf, int len, - int level UNUSED_PARAM, - struct connectdata *conn UNUSED_PARAM) -{ - gss_ctx_id_t *context = app_data; - OM_uint32 maj, min; - gss_buffer_desc enc, dec; - - (void)level; - (void)conn; - - enc.value = buf; - enc.length = len; - maj = gss_unseal(&min, *context, &enc, &dec, NULL, NULL); - if(maj != GSS_S_COMPLETE) { - if(len >= 4) - strcpy(buf, "599 "); - return -1; - } - - memcpy(buf, dec.value, dec.length); - len = curlx_uztosi(dec.length); - gss_release_buffer(&min, &dec); - - return len; -} - -static int -krb5_overhead(void *app_data, int level, int len) -{ - /* no arguments are used */ - (void)app_data; - (void)level; - (void)len; - return 0; -} - -static int -krb5_encode(void *app_data, const void *from, int length, int level, void **to) -{ - gss_ctx_id_t *context = app_data; - gss_buffer_desc dec, enc; - OM_uint32 maj, min; - int state; - int len; - - /* NOTE that the cast is safe, neither of the krb5, gnu gss and heimdal - * libraries modify the input buffer in gss_seal() - */ - dec.value = (void *)from; - dec.length = length; - maj = gss_seal(&min, *context, - level == PROT_PRIVATE, - GSS_C_QOP_DEFAULT, - &dec, &state, &enc); - - if(maj != GSS_S_COMPLETE) - return -1; - - /* malloc a new buffer, in case gss_release_buffer doesn't work as - expected */ - *to = malloc(enc.length); - if(!*to) - return -1; - memcpy(*to, enc.value, enc.length); - len = curlx_uztosi(enc.length); - gss_release_buffer(&min, &enc); - return len; -} - -static int -krb5_auth(void *app_data, struct connectdata *conn) -{ - int ret = AUTH_OK; - char *p; - const char *host = conn->host.name; - ssize_t nread; - curl_socklen_t l = sizeof(conn->local_addr); - struct Curl_easy *data = conn->data; - CURLcode result; - const char *service = data->set.str[STRING_SERVICE_NAME] ? - data->set.str[STRING_SERVICE_NAME] : - "ftp"; - const char *srv_host = "host"; - gss_buffer_desc input_buffer, output_buffer, _gssresp, *gssresp; - OM_uint32 maj, min; - gss_name_t gssname; - gss_ctx_id_t *context = app_data; - struct gss_channel_bindings_struct chan; - size_t base64_sz = 0; - struct sockaddr_in **remote_addr = - (struct sockaddr_in **)&conn->ip_addr->ai_addr; - - if(getsockname(conn->sock[FIRSTSOCKET], - (struct sockaddr *)&conn->local_addr, &l) < 0) - perror("getsockname()"); - - chan.initiator_addrtype = GSS_C_AF_INET; - chan.initiator_address.length = l - 4; - chan.initiator_address.value = &conn->local_addr.sin_addr.s_addr; - chan.acceptor_addrtype = GSS_C_AF_INET; - chan.acceptor_address.length = l - 4; - chan.acceptor_address.value = &(*remote_addr)->sin_addr.s_addr; - chan.application_data.length = 0; - chan.application_data.value = NULL; - - /* this loop will execute twice (once for service, once for host) */ - for(;;) { - /* this really shouldn't be repeated here, but can't help it */ - if(service == srv_host) { - result = Curl_ftpsend(conn, "AUTH GSSAPI"); - if(result) - return -2; - - if(Curl_GetFTPResponse(&nread, conn, NULL)) - return -1; - - if(data->state.buffer[0] != '3') - return -1; - } - - input_buffer.value = data->state.buffer; - input_buffer.length = snprintf(input_buffer.value, BUFSIZE, "%s@%s", - service, host); - maj = gss_import_name(&min, &input_buffer, GSS_C_NT_HOSTBASED_SERVICE, - &gssname); - if(maj != GSS_S_COMPLETE) { - gss_release_name(&min, &gssname); - if(service == srv_host) { - Curl_failf(data, "Error importing service name %s", - input_buffer.value); - return AUTH_ERROR; - } - service = srv_host; - continue; - } - /* We pass NULL as |output_name_type| to avoid a leak. */ - gss_display_name(&min, gssname, &output_buffer, NULL); - Curl_infof(data, "Trying against %s\n", output_buffer.value); - gssresp = GSS_C_NO_BUFFER; - *context = GSS_C_NO_CONTEXT; - - do { - /* Release the buffer at each iteration to avoid leaking: the first time - we are releasing the memory from gss_display_name. The last item is - taken care by a final gss_release_buffer. */ - gss_release_buffer(&min, &output_buffer); - ret = AUTH_OK; - maj = Curl_gss_init_sec_context(data, - &min, - context, - gssname, - &Curl_krb5_mech_oid, - &chan, - gssresp, - &output_buffer, - TRUE, - NULL); - - if(gssresp) { - free(_gssresp.value); - gssresp = NULL; - } - - if(GSS_ERROR(maj)) { - Curl_infof(data, "Error creating security context\n"); - ret = AUTH_ERROR; - break; - } - - if(output_buffer.length != 0) { - char *cmd; - - result = Curl_base64_encode(data, (char *)output_buffer.value, - output_buffer.length, &p, &base64_sz); - if(result) { - Curl_infof(data, "base64-encoding: %s\n", - curl_easy_strerror(result)); - ret = AUTH_ERROR; - break; - } - - cmd = aprintf("ADAT %s", p); - if(cmd) - result = Curl_ftpsend(conn, cmd); - else - result = CURLE_OUT_OF_MEMORY; - - free(p); - - if(result) { - ret = -2; - break; - } - - if(Curl_GetFTPResponse(&nread, conn, NULL)) { - ret = -1; - break; - } - - if(data->state.buffer[0] != '2' && data->state.buffer[0] != '3') { - Curl_infof(data, "Server didn't accept auth data\n"); - ret = AUTH_ERROR; - break; - } - - p = data->state.buffer + 4; - p = strstr(p, "ADAT="); - if(p) { - result = Curl_base64_decode(p + 5, - (unsigned char **)&_gssresp.value, - &_gssresp.length); - if(result) { - Curl_failf(data, "base64-decoding: %s", - curl_easy_strerror(result)); - ret = AUTH_CONTINUE; - break; - } - } - - gssresp = &_gssresp; - } - } while(maj == GSS_S_CONTINUE_NEEDED); - - gss_release_name(&min, &gssname); - gss_release_buffer(&min, &output_buffer); - - if(gssresp) - free(_gssresp.value); - - if(ret == AUTH_OK || service == srv_host) - return ret; - - service = srv_host; - } - return ret; -} - -static void krb5_end(void *app_data) -{ - OM_uint32 min; - gss_ctx_id_t *context = app_data; - if(*context != GSS_C_NO_CONTEXT) { -#ifdef DEBUGBUILD - OM_uint32 maj = -#endif - gss_delete_sec_context(&min, context, GSS_C_NO_BUFFER); - DEBUGASSERT(maj == GSS_S_COMPLETE); - } -} - -struct Curl_sec_client_mech Curl_krb5_client_mech = { - "GSSAPI", - sizeof(gss_ctx_id_t), - krb5_init, - krb5_auth, - krb5_end, - krb5_check_prot, - krb5_overhead, - krb5_encode, - krb5_decode -}; - -#endif /* HAVE_GSSAPI && !CURL_DISABLE_FTP */ diff --git a/build/premake/premake5/contrib/curl/lib/ldap.c b/build/premake/premake5/contrib/curl/lib/ldap.c deleted file mode 100644 index 979ce7de43..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ldap.c +++ /dev/null @@ -1,1015 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP) - -/* - * Notice that USE_OPENLDAP is only a source code selection switch. When - * libcurl is built with USE_OPENLDAP defined the libcurl source code that - * gets compiled is the code from openldap.c, otherwise the code that gets - * compiled is the code from ldap.c. - * - * When USE_OPENLDAP is defined a recent version of the OpenLDAP library - * might be required for compilation and runtime. In order to use ancient - * OpenLDAP library versions, USE_OPENLDAP shall not be defined. - */ - -#ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */ -# include -# ifndef LDAP_VENDOR_NAME -# error Your Platform SDK is NOT sufficient for LDAP support! \ - Update your Platform SDK, or disable LDAP support! -# else -# include -# endif -#else -# define LDAP_DEPRECATED 1 /* Be sure ldap_init() is defined. */ -# ifdef HAVE_LBER_H -# include -# endif -# include -# if (defined(HAVE_LDAP_SSL) && defined(HAVE_LDAP_SSL_H)) -# include -# endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */ -#endif - -/* These are macros in both (in above ) and typedefs - * in BoringSSL's - */ -#ifdef HAVE_BORINGSSL -# undef X509_NAME -# undef X509_CERT_PAIR -# undef X509_EXTENSIONS -#endif - -#include "urldata.h" -#include -#include "sendf.h" -#include "escape.h" -#include "progress.h" -#include "transfer.h" -#include "strcase.h" -#include "strtok.h" -#include "curl_ldap.h" -#include "curl_multibyte.h" -#include "curl_base64.h" -#include "connect.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifndef HAVE_LDAP_URL_PARSE - -/* Use our own implementation. */ - -typedef struct { - char *lud_host; - int lud_port; -#if defined(USE_WIN32_LDAP) - TCHAR *lud_dn; - TCHAR **lud_attrs; -#else - char *lud_dn; - char **lud_attrs; -#endif - int lud_scope; -#if defined(USE_WIN32_LDAP) - TCHAR *lud_filter; -#else - char *lud_filter; -#endif - char **lud_exts; - size_t lud_attrs_dups; /* how many were dup'ed, this field is not in the - "real" struct so can only be used in code - without HAVE_LDAP_URL_PARSE defined */ -} CURL_LDAPURLDesc; - -#undef LDAPURLDesc -#define LDAPURLDesc CURL_LDAPURLDesc - -static int _ldap_url_parse(const struct connectdata *conn, - LDAPURLDesc **ludp); -static void _ldap_free_urldesc(LDAPURLDesc *ludp); - -#undef ldap_free_urldesc -#define ldap_free_urldesc _ldap_free_urldesc -#endif - -#ifdef DEBUG_LDAP - #define LDAP_TRACE(x) do { \ - _ldap_trace("%u: ", __LINE__); \ - _ldap_trace x; \ - } WHILE_FALSE - - static void _ldap_trace(const char *fmt, ...); -#else - #define LDAP_TRACE(x) Curl_nop_stmt -#endif - - -static CURLcode Curl_ldap(struct connectdata *conn, bool *done); - -/* - * LDAP protocol handler. - */ - -const struct Curl_handler Curl_handler_ldap = { - "LDAP", /* scheme */ - ZERO_NULL, /* setup_connection */ - Curl_ldap, /* do_it */ - ZERO_NULL, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_LDAP, /* defport */ - CURLPROTO_LDAP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef HAVE_LDAP_SSL -/* - * LDAPS protocol handler. - */ - -const struct Curl_handler Curl_handler_ldaps = { - "LDAPS", /* scheme */ - ZERO_NULL, /* setup_connection */ - Curl_ldap, /* do_it */ - ZERO_NULL, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_LDAPS, /* defport */ - CURLPROTO_LDAPS, /* protocol */ - PROTOPT_SSL /* flags */ -}; -#endif - - -static CURLcode Curl_ldap(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - int rc = 0; - LDAP *server = NULL; - LDAPURLDesc *ludp = NULL; - LDAPMessage *ldapmsg = NULL; - LDAPMessage *entryIterator; - int num = 0; - struct Curl_easy *data=conn->data; - int ldap_proto = LDAP_VERSION3; - int ldap_ssl = 0; - char *val_b64 = NULL; - size_t val_b64_sz = 0; - curl_off_t dlsize = 0; -#ifdef LDAP_OPT_NETWORK_TIMEOUT - struct timeval ldap_timeout = {10, 0}; /* 10 sec connection/search timeout */ -#endif -#if defined(USE_WIN32_LDAP) - TCHAR *host = NULL; - TCHAR *user = NULL; - TCHAR *passwd = NULL; -#else - char *host = NULL; - char *user = NULL; - char *passwd = NULL; -#endif - - *done = TRUE; /* unconditionally */ - infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d\n", - LDAP_VENDOR_NAME, LDAP_VENDOR_VERSION); - infof(data, "LDAP local: %s\n", data->change.url); - -#ifdef HAVE_LDAP_URL_PARSE - rc = ldap_url_parse(data->change.url, &ludp); -#else - rc = _ldap_url_parse(conn, &ludp); -#endif - if(rc != 0) { - failf(data, "LDAP local: %s", ldap_err2string(rc)); - result = CURLE_LDAP_INVALID_URL; - goto quit; - } - - /* Get the URL scheme (either ldap or ldaps) */ - if(conn->given->flags & PROTOPT_SSL) - ldap_ssl = 1; - infof(data, "LDAP local: trying to establish %s connection\n", - ldap_ssl ? "encrypted" : "cleartext"); - -#if defined(USE_WIN32_LDAP) - host = Curl_convert_UTF8_to_tchar(conn->host.name); - if(!host) { - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } - - if(conn->bits.user_passwd) { - user = Curl_convert_UTF8_to_tchar(conn->user); - passwd = Curl_convert_UTF8_to_tchar(conn->passwd); - if(!user || !passwd) { - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } - } -#else - host = conn->host.name; - - if(conn->bits.user_passwd) { - user = conn->user; - passwd = conn->passwd; - } -#endif - -#ifdef LDAP_OPT_NETWORK_TIMEOUT - ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, &ldap_timeout); -#endif - ldap_set_option(NULL, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); - - if(ldap_ssl) { -#ifdef HAVE_LDAP_SSL -#ifdef USE_WIN32_LDAP - /* Win32 LDAP SDK doesn't support insecure mode without CA! */ - server = ldap_sslinit(host, (int)conn->port, 1); - ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON); -#else - int ldap_option; - char *ldap_ca = conn->ssl_config.CAfile; -#if defined(CURL_HAS_NOVELL_LDAPSDK) - rc = ldapssl_client_init(NULL, NULL); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ldapssl_client_init %s", ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - if(conn->ssl_config.verifypeer) { - /* Novell SDK supports DER or BASE64 files. */ - int cert_type = LDAPSSL_CERT_FILETYPE_B64; - if((data->set.ssl.cert_type) && - (strcasecompare(data->set.ssl.cert_type, "DER"))) - cert_type = LDAPSSL_CERT_FILETYPE_DER; - if(!ldap_ca) { - failf(data, "LDAP local: ERROR %s CA cert not set!", - (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM")); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - infof(data, "LDAP local: using %s CA cert '%s'\n", - (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"), - ldap_ca); - rc = ldapssl_add_trusted_cert(ldap_ca, cert_type); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ERROR setting %s CA cert: %s", - (cert_type == LDAPSSL_CERT_FILETYPE_DER ? "DER" : "PEM"), - ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - ldap_option = LDAPSSL_VERIFY_SERVER; - } - else - ldap_option = LDAPSSL_VERIFY_NONE; - rc = ldapssl_set_verify_mode(ldap_option); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ERROR setting cert verify mode: %s", - ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - server = ldapssl_init(host, (int)conn->port, 1); - if(server == NULL) { - failf(data, "LDAP local: Cannot connect to %s:%ld", - conn->host.dispname, conn->port); - result = CURLE_COULDNT_CONNECT; - goto quit; - } -#elif defined(LDAP_OPT_X_TLS) - if(conn->ssl_config.verifypeer) { - /* OpenLDAP SDK supports BASE64 files. */ - if((data->set.ssl.cert_type) && - (!strcasecompare(data->set.ssl.cert_type, "PEM"))) { - failf(data, "LDAP local: ERROR OpenLDAP only supports PEM cert-type!"); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - if(!ldap_ca) { - failf(data, "LDAP local: ERROR PEM CA cert not set!"); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - infof(data, "LDAP local: using PEM CA cert: %s\n", ldap_ca); - rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, ldap_ca); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ERROR setting PEM CA cert: %s", - ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - ldap_option = LDAP_OPT_X_TLS_DEMAND; - } - else - ldap_option = LDAP_OPT_X_TLS_NEVER; - - rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &ldap_option); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ERROR setting cert verify mode: %s", - ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } - server = ldap_init(host, (int)conn->port); - if(server == NULL) { - failf(data, "LDAP local: Cannot connect to %s:%ld", - conn->host.dispname, conn->port); - result = CURLE_COULDNT_CONNECT; - goto quit; - } - ldap_option = LDAP_OPT_X_TLS_HARD; - rc = ldap_set_option(server, LDAP_OPT_X_TLS, &ldap_option); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ERROR setting SSL/TLS mode: %s", - ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } -/* - rc = ldap_start_tls_s(server, NULL, NULL); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ERROR starting SSL/TLS mode: %s", - ldap_err2string(rc)); - result = CURLE_SSL_CERTPROBLEM; - goto quit; - } -*/ -#else - /* we should probably never come up to here since configure - should check in first place if we can support LDAP SSL/TLS */ - failf(data, "LDAP local: SSL/TLS not supported with this version " - "of the OpenLDAP toolkit\n"); - result = CURLE_SSL_CERTPROBLEM; - goto quit; -#endif -#endif -#endif /* CURL_LDAP_USE_SSL */ - } - else { - server = ldap_init(host, (int)conn->port); - if(server == NULL) { - failf(data, "LDAP local: Cannot connect to %s:%ld", - conn->host.dispname, conn->port); - result = CURLE_COULDNT_CONNECT; - goto quit; - } - } -#ifdef USE_WIN32_LDAP - ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); -#endif - - rc = ldap_simple_bind_s(server, user, passwd); - if(!ldap_ssl && rc != 0) { - ldap_proto = LDAP_VERSION2; - ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); - rc = ldap_simple_bind_s(server, user, passwd); - } - if(rc != 0) { - failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc)); - result = CURLE_LDAP_CANNOT_BIND; - goto quit; - } - - rc = ldap_search_s(server, ludp->lud_dn, ludp->lud_scope, - ludp->lud_filter, ludp->lud_attrs, 0, &ldapmsg); - - if(rc != 0 && rc != LDAP_SIZELIMIT_EXCEEDED) { - failf(data, "LDAP remote: %s", ldap_err2string(rc)); - result = CURLE_LDAP_SEARCH_FAILED; - goto quit; - } - - for(num = 0, entryIterator = ldap_first_entry(server, ldapmsg); - entryIterator; - entryIterator = ldap_next_entry(server, entryIterator), num++) { - BerElement *ber = NULL; -#if defined(USE_WIN32_LDAP) - TCHAR *attribute; -#else - char *attribute; /*! suspicious that this isn't 'const' */ -#endif - int i; - - /* Get the DN and write it to the client */ - { - char *name; - size_t name_len; -#if defined(USE_WIN32_LDAP) - TCHAR *dn = ldap_get_dn(server, entryIterator); - name = Curl_convert_tchar_to_UTF8(dn); - if(!name) { - ldap_memfree(dn); - - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } -#else - char *dn = name = ldap_get_dn(server, entryIterator); -#endif - name_len = strlen(name); - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4); - if(result) { -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); - - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *) name, - name_len); - if(result) { -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); - - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(result) { -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); - - goto quit; - } - - dlsize += name_len + 5; - -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(name); -#endif - ldap_memfree(dn); - } - - /* Get the attributes and write them to the client */ - for(attribute = ldap_first_attribute(server, entryIterator, &ber); - attribute; - attribute = ldap_next_attribute(server, entryIterator, ber)) { - BerValue **vals; - size_t attr_len; -#if defined(USE_WIN32_LDAP) - char *attr = Curl_convert_tchar_to_UTF8(attribute); - if(!attr) { - if(ber) - ber_free(ber, 0); - - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } -#else - char *attr = attribute; -#endif - attr_len = strlen(attr); - - vals = ldap_get_values_len(server, entryIterator, attribute); - if(vals != NULL) { - for(i = 0; (vals[i] != NULL); i++) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, - (char *) attr, attr_len); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - dlsize += attr_len + 3; - - if((attr_len > 7) && - (strcmp(";binary", (char *) attr + (attr_len - 7)) == 0)) { - /* Binary attribute, encode to base64. */ - result = Curl_base64_encode(data, - vals[i]->bv_val, - vals[i]->bv_len, - &val_b64, - &val_b64_sz); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - if(val_b64_sz > 0) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, - val_b64_sz); - free(val_b64); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - dlsize += val_b64_sz; - } - } - else { - result = Curl_client_write(conn, CLIENTWRITE_BODY, vals[i]->bv_val, - vals[i]->bv_len); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - dlsize += vals[i]->bv_len; - } - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(result) { - ldap_value_free_len(vals); -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - if(ber) - ber_free(ber, 0); - - goto quit; - } - - dlsize++; - } - - /* Free memory used to store values */ - ldap_value_free_len(vals); - } - - /* Free the attribute as we are done with it */ -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(attr); -#endif - ldap_memfree(attribute); - - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(result) - goto quit; - dlsize++; - Curl_pgrsSetDownloadCounter(data, dlsize); - } - - if(ber) - ber_free(ber, 0); - } - -quit: - if(ldapmsg) { - ldap_msgfree(ldapmsg); - LDAP_TRACE(("Received %d entries\n", num)); - } - if(rc == LDAP_SIZELIMIT_EXCEEDED) - infof(data, "There are more than %d entries\n", num); - if(ludp) - ldap_free_urldesc(ludp); - if(server) - ldap_unbind_s(server); -#if defined(HAVE_LDAP_SSL) && defined(CURL_HAS_NOVELL_LDAPSDK) - if(ldap_ssl) - ldapssl_client_deinit(); -#endif /* HAVE_LDAP_SSL && CURL_HAS_NOVELL_LDAPSDK */ - -#if defined(USE_WIN32_LDAP) - Curl_unicodefree(passwd); - Curl_unicodefree(user); - Curl_unicodefree(host); -#endif - - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - connclose(conn, "LDAP connection always disable re-use"); - - return result; -} - -#ifdef DEBUG_LDAP -static void _ldap_trace(const char *fmt, ...) -{ - static int do_trace = -1; - va_list args; - - if(do_trace == -1) { - const char *env = getenv("CURL_TRACE"); - do_trace = (env && strtol(env, NULL, 10) > 0); - } - if(!do_trace) - return; - - va_start(args, fmt); - vfprintf(stderr, fmt, args); - va_end(args); -} -#endif - -#ifndef HAVE_LDAP_URL_PARSE - -/* - * Return scope-value for a scope-string. - */ -static int str2scope(const char *p) -{ - if(strcasecompare(p, "one")) - return LDAP_SCOPE_ONELEVEL; - if(strcasecompare(p, "onetree")) - return LDAP_SCOPE_ONELEVEL; - if(strcasecompare(p, "base")) - return LDAP_SCOPE_BASE; - if(strcasecompare(p, "sub")) - return LDAP_SCOPE_SUBTREE; - if(strcasecompare(p, "subtree")) - return LDAP_SCOPE_SUBTREE; - return (-1); -} - -/* - * Split 'str' into strings separated by commas. - * Note: out[] points into 'str'. - */ -static bool split_str(char *str, char ***out, size_t *count) -{ - char **res; - char *lasts; - char *s; - size_t i; - size_t items = 1; - - s = strchr(str, ','); - while(s) { - items++; - s = strchr(++s, ','); - } - - res = calloc(items, sizeof(char *)); - if(!res) - return FALSE; - - for(i = 0, s = strtok_r(str, ",", &lasts); s && i < items; - s = strtok_r(NULL, ",", &lasts), i++) - res[i] = s; - - *out = res; - *count = items; - - return TRUE; -} - -/* - * Break apart the pieces of an LDAP URL. - * Syntax: - * ldap://:/???? - * - * already known from 'conn->host.name'. - * already known from 'conn->remote_port'. - * extract the rest from 'conn->data->state.path+1'. All fields are optional. - * e.g. - * ldap://:/??? - * yields ludp->lud_dn = "". - * - * Defined in RFC4516 section 2. - */ -static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp) -{ - int rc = LDAP_SUCCESS; - char *path; - char *p; - char *q; - size_t i; - - if(!conn->data || - !conn->data->state.path || - conn->data->state.path[0] != '/' || - !checkprefix("LDAP", conn->data->change.url)) - return LDAP_INVALID_SYNTAX; - - ludp->lud_scope = LDAP_SCOPE_BASE; - ludp->lud_port = conn->remote_port; - ludp->lud_host = conn->host.name; - - /* Duplicate the path */ - p = path = strdup(conn->data->state.path + 1); - if(!path) - return LDAP_NO_MEMORY; - - /* Parse the DN (Distinguished Name) */ - q = strchr(p, '?'); - if(q) - *q++ = '\0'; - - if(*p) { - char *dn = p; - char *unescaped; - CURLcode result; - - LDAP_TRACE(("DN '%s'\n", dn)); - - /* Unescape the DN */ - result = Curl_urldecode(conn->data, dn, 0, &unescaped, NULL, FALSE); - if(result) { - rc = LDAP_NO_MEMORY; - - goto quit; - } - -#if defined(USE_WIN32_LDAP) - /* Convert the unescaped string to a tchar */ - ludp->lud_dn = Curl_convert_UTF8_to_tchar(unescaped); - - /* Free the unescaped string as we are done with it */ - Curl_unicodefree(unescaped); - - if(!ludp->lud_dn) { - rc = LDAP_NO_MEMORY; - - goto quit; - } -#else - ludp->lud_dn = unescaped; -#endif - } - - p = q; - if(!p) - goto quit; - - /* Parse the attributes. skip "??" */ - q = strchr(p, '?'); - if(q) - *q++ = '\0'; - - if(*p) { - char **attributes; - size_t count = 0; - - /* Split the string into an array of attributes */ - if(!split_str(p, &attributes, &count)) { - rc = LDAP_NO_MEMORY; - - goto quit; - } - - /* Allocate our array (+1 for the NULL entry) */ -#if defined(USE_WIN32_LDAP) - ludp->lud_attrs = calloc(count + 1, sizeof(TCHAR *)); -#else - ludp->lud_attrs = calloc(count + 1, sizeof(char *)); -#endif - if(!ludp->lud_attrs) { - free(attributes); - - rc = LDAP_NO_MEMORY; - - goto quit; - } - - for(i = 0; i < count; i++) { - char *unescaped; - CURLcode result; - - LDAP_TRACE(("attr[%d] '%s'\n", i, attributes[i])); - - /* Unescape the attribute */ - result = Curl_urldecode(conn->data, attributes[i], 0, &unescaped, NULL, - FALSE); - if(result) { - free(attributes); - - rc = LDAP_NO_MEMORY; - - goto quit; - } - -#if defined(USE_WIN32_LDAP) - /* Convert the unescaped string to a tchar */ - ludp->lud_attrs[i] = Curl_convert_UTF8_to_tchar(unescaped); - - /* Free the unescaped string as we are done with it */ - Curl_unicodefree(unescaped); - - if(!ludp->lud_attrs[i]) { - free(attributes); - - rc = LDAP_NO_MEMORY; - - goto quit; - } -#else - ludp->lud_attrs[i] = unescaped; -#endif - - ludp->lud_attrs_dups++; - } - - free(attributes); - } - - p = q; - if(!p) - goto quit; - - /* Parse the scope. skip "??" */ - q = strchr(p, '?'); - if(q) - *q++ = '\0'; - - if(*p) { - ludp->lud_scope = str2scope(p); - if(ludp->lud_scope == -1) { - rc = LDAP_INVALID_SYNTAX; - - goto quit; - } - LDAP_TRACE(("scope %d\n", ludp->lud_scope)); - } - - p = q; - if(!p) - goto quit; - - /* Parse the filter */ - q = strchr(p, '?'); - if(q) - *q++ = '\0'; - - if(*p) { - char *filter = p; - char *unescaped; - CURLcode result; - - LDAP_TRACE(("filter '%s'\n", filter)); - - /* Unescape the filter */ - result = Curl_urldecode(conn->data, filter, 0, &unescaped, NULL, FALSE); - if(result) { - rc = LDAP_NO_MEMORY; - - goto quit; - } - -#if defined(USE_WIN32_LDAP) - /* Convert the unescaped string to a tchar */ - ludp->lud_filter = Curl_convert_UTF8_to_tchar(unescaped); - - /* Free the unescaped string as we are done with it */ - Curl_unicodefree(unescaped); - - if(!ludp->lud_filter) { - rc = LDAP_NO_MEMORY; - - goto quit; - } -#else - ludp->lud_filter = unescaped; -#endif - } - - p = q; - if(p && !*p) { - rc = LDAP_INVALID_SYNTAX; - - goto quit; - } - -quit: - free(path); - - return rc; -} - -static int _ldap_url_parse(const struct connectdata *conn, - LDAPURLDesc **ludpp) -{ - LDAPURLDesc *ludp = calloc(1, sizeof(*ludp)); - int rc; - - *ludpp = NULL; - if(!ludp) - return LDAP_NO_MEMORY; - - rc = _ldap_url_parse2(conn, ludp); - if(rc != LDAP_SUCCESS) { - _ldap_free_urldesc(ludp); - ludp = NULL; - } - *ludpp = ludp; - return (rc); -} - -static void _ldap_free_urldesc(LDAPURLDesc *ludp) -{ - size_t i; - - if(!ludp) - return; - - free(ludp->lud_dn); - free(ludp->lud_filter); - - if(ludp->lud_attrs) { - for(i = 0; i < ludp->lud_attrs_dups; i++) - free(ludp->lud_attrs[i]); - free(ludp->lud_attrs); - } - - free(ludp); -} -#endif /* !HAVE_LDAP_URL_PARSE */ -#endif /* !CURL_DISABLE_LDAP && !USE_OPENLDAP */ diff --git a/build/premake/premake5/contrib/curl/lib/libcurl.plist b/build/premake/premake5/contrib/curl/lib/libcurl.plist deleted file mode 100644 index 622f66cfbf..0000000000 --- a/build/premake/premake5/contrib/curl/lib/libcurl.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleInfoDictionaryVersion - 6.0 - - CFBundleDevelopmentRegion - English - - CFBundleExecutable - curl - - CFBundleIdentifier - se.haxx.curl.libcurl - - CFBundleVersion - 7.12.3 - - CFBundleName - libcurl - - CFBundlePackageType - FMWK - - CFBundleSignature - ???? - - CFBundleShortVersionString - libcurl 7.12.3 - - CFBundleGetInfoString - libcurl.plist 7.12.3 - - diff --git a/build/premake/premake5/contrib/curl/lib/libcurl.rc b/build/premake/premake5/contrib/curl/lib/libcurl.rc deleted file mode 100644 index 3316fba191..0000000000 --- a/build/premake/premake5/contrib/curl/lib/libcurl.rc +++ /dev/null @@ -1,63 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include -#include "../include/curl/curlver.h" - -LANGUAGE 0x09,0x01 - -#define RC_VERSION LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR, LIBCURL_VERSION_PATCH, 0 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION RC_VERSION - PRODUCTVERSION RC_VERSION - FILEFLAGSMASK 0x3fL -#if defined(DEBUGBUILD) || defined(_DEBUG) - FILEFLAGS 1 -#else - FILEFLAGS 0 -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L - -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "The curl library, https://curl.haxx.se/\0" - VALUE "FileDescription", "libcurl Shared Library\0" - VALUE "FileVersion", LIBCURL_VERSION "\0" - VALUE "InternalName", "libcurl\0" - VALUE "OriginalFilename", "libcurl.dll\0" - VALUE "ProductName", "The curl library\0" - VALUE "ProductVersion", LIBCURL_VERSION "\0" - VALUE "LegalCopyright", "\xa9 " LIBCURL_COPYRIGHT "\0" /* a9: Copyright symbol */ - VALUE "License", "https://curl.haxx.se/docs/copyright.html\0" - END - END - - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/build/premake/premake5/contrib/curl/lib/libcurl.vers.in b/build/premake/premake5/contrib/curl/lib/libcurl.vers.in deleted file mode 100644 index ae978a485d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/libcurl.vers.in +++ /dev/null @@ -1,13 +0,0 @@ -HIDDEN -{ - local: - __*; - _rest*; - _save*; -}; - -CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@4 -{ - global: curl_*; - local: *; -}; diff --git a/build/premake/premake5/contrib/curl/lib/llist.c b/build/premake/premake5/contrib/curl/lib/llist.c deleted file mode 100644 index 482aaa0410..0000000000 --- a/build/premake/premake5/contrib/curl/lib/llist.c +++ /dev/null @@ -1,214 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "llist.h" -#include "curl_memory.h" - -/* this must be the last include file */ -#include "memdebug.h" - -/* - * @unittest: 1300 - */ -static void -llist_init(struct curl_llist *l, curl_llist_dtor dtor) -{ - l->size = 0; - l->dtor = dtor; - l->head = NULL; - l->tail = NULL; -} - -struct curl_llist * -Curl_llist_alloc(curl_llist_dtor dtor) -{ - struct curl_llist *list; - - list = malloc(sizeof(struct curl_llist)); - if(!list) - return NULL; - - llist_init(list, dtor); - - return list; -} - -/* - * Curl_llist_insert_next() - * - * Inserts a new list element after the given one 'e'. If the given existing - * entry is NULL and the list already has elements, the new one will be - * inserted first in the list. - * - * Returns: 1 on success and 0 on failure. - * - * @unittest: 1300 - */ -int -Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, - const void *p) -{ - struct curl_llist_element *ne = malloc(sizeof(struct curl_llist_element)); - if(!ne) - return 0; - - ne->ptr = (void *) p; - if(list->size == 0) { - list->head = ne; - list->head->prev = NULL; - list->head->next = NULL; - list->tail = ne; - } - else { - /* if 'e' is NULL here, we insert the new element first in the list */ - ne->next = e?e->next:list->head; - ne->prev = e; - if(!e) { - list->head->prev = ne; - list->head = ne; - } - else if(e->next) { - e->next->prev = ne; - } - else { - list->tail = ne; - } - if(e) - e->next = ne; - } - - ++list->size; - - return 1; -} - -/* - * @unittest: 1300 - */ -int -Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, - void *user) -{ - if(e == NULL || list->size == 0) - return 1; - - if(e == list->head) { - list->head = e->next; - - if(list->head == NULL) - list->tail = NULL; - else - e->next->prev = NULL; - } - else { - e->prev->next = e->next; - if(!e->next) - list->tail = e->prev; - else - e->next->prev = e->prev; - } - - list->dtor(user, e->ptr); - - e->ptr = NULL; - e->prev = NULL; - e->next = NULL; - - free(e); - --list->size; - - return 1; -} - -void -Curl_llist_destroy(struct curl_llist *list, void *user) -{ - if(list) { - while(list->size > 0) - Curl_llist_remove(list, list->tail, user); - - free(list); - } -} - -size_t -Curl_llist_count(struct curl_llist *list) -{ - return list->size; -} - -/* - * @unittest: 1300 - */ -int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, - struct curl_llist *to_list, - struct curl_llist_element *to_e) -{ - /* Remove element from list */ - if(e == NULL || list->size == 0) - return 0; - - if(e == list->head) { - list->head = e->next; - - if(list->head == NULL) - list->tail = NULL; - else - e->next->prev = NULL; - } - else { - e->prev->next = e->next; - if(!e->next) - list->tail = e->prev; - else - e->next->prev = e->prev; - } - - --list->size; - - /* Add element to to_list after to_e */ - if(to_list->size == 0) { - to_list->head = e; - to_list->head->prev = NULL; - to_list->head->next = NULL; - to_list->tail = e; - } - else { - e->next = to_e->next; - e->prev = to_e; - if(to_e->next) { - to_e->next->prev = e; - } - else { - to_list->tail = e; - } - to_e->next = e; - } - - ++to_list->size; - - return 1; -} diff --git a/build/premake/premake5/contrib/curl/lib/llist.h b/build/premake/premake5/contrib/curl/lib/llist.h deleted file mode 100644 index 39ff408eeb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/llist.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef HEADER_CURL_LLIST_H -#define HEADER_CURL_LLIST_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" -#include - -typedef void (*curl_llist_dtor)(void *, void *); - -struct curl_llist_element { - void *ptr; - - struct curl_llist_element *prev; - struct curl_llist_element *next; -}; - -struct curl_llist { - struct curl_llist_element *head; - struct curl_llist_element *tail; - - curl_llist_dtor dtor; - - size_t size; -}; - -struct curl_llist *Curl_llist_alloc(curl_llist_dtor); -int Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *, - const void *); -int Curl_llist_remove(struct curl_llist *, struct curl_llist_element *, - void *); -size_t Curl_llist_count(struct curl_llist *); -void Curl_llist_destroy(struct curl_llist *, void *); -int Curl_llist_move(struct curl_llist *, struct curl_llist_element *, - struct curl_llist *, struct curl_llist_element *); - -#endif /* HEADER_CURL_LLIST_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/makefile.amiga b/build/premake/premake5/contrib/curl/lib/makefile.amiga deleted file mode 100644 index c692e5ebe3..0000000000 --- a/build/premake/premake5/contrib/curl/lib/makefile.amiga +++ /dev/null @@ -1,21 +0,0 @@ -# -# libcurl Makefile for AmigaOS ... -# - -# change the follow to where you have the AmiTCP SDK v4.3 includes: - -ATCPSDKI= /GG/netinclude - - -CC = m68k-amigaos-gcc -CFLAGS = -I$(ATCPSDKI) -m68020-60 -O2 -msoft-float -noixemul -g -I. -I../include -W -Wall - -include Makefile.inc -OBJS = $(CSOURCES:.c=.o) - -all: $(OBJS) - ar cru libcurl.a $(OBJS) - ranlib libcurl.a - -install: - $(INSTALL) -c ./libcurl.a /lib/libcurl.a diff --git a/build/premake/premake5/contrib/curl/lib/makefile.dj b/build/premake/premake5/contrib/curl/lib/makefile.dj deleted file mode 100644 index 2331afe313..0000000000 --- a/build/premake/premake5/contrib/curl/lib/makefile.dj +++ /dev/null @@ -1,73 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) 2003 - 2008, Gisle Vanem . -# Copyright (C) 2003 - 2015, Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.haxx.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -#*************************************************************************** - -# -# Adapted for djgpp2 / Watt-32 / DOS -# - -DEPEND_PREREQ = curl_config.h -VPATH = vtls -TOPDIR = .. - -include ../packages/DOS/common.dj -include Makefile.inc - -SOURCES = $(sort $(CSOURCES)) -OBJECTS = $(addprefix $(OBJ_DIR)/, $(notdir $(SOURCES:.c=.o))) - -CURL_LIB = libcurl.a - -# NOTE: if ../include/curl/curlbuild.h is missing, you're probably building -# this from a git checkout and then you need to run buildconf.bat first. - -all: $(OBJ_DIR) curl_config.h $(CURL_LIB) - -$(CURL_LIB): $(OBJECTS) - ar rs $@ $? - -curl_config.h: config-dos.h - $(COPY) $^ $@ - -# clean generated files -# -genclean: - - $(DELETE) curl_config.h - -# clean object files and subdir -# -objclean: genclean - - $(DELETE) $(OBJ_DIR)$(DS)*.o - - $(RMDIR) $(OBJ_DIR) - -# clean without removing built library -# -clean: objclean - - $(DELETE) depend.dj - -# clean everything -# -realclean vclean: clean - - $(DELETE) $(CURL_LIB) - --include depend.dj - diff --git a/build/premake/premake5/contrib/curl/lib/md4.c b/build/premake/premake5/contrib/curl/lib/md4.c deleted file mode 100644 index 1bdc9f367c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/md4.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. - * MD4 Message-Digest Algorithm (RFC 1320). - * - * Homepage: - http://openwall.info/wiki/people/solar/software/public-domain-source-code/md4 - * - * Author: - * Alexander Peslyak, better known as Solar Designer - * - * This software was written by Alexander Peslyak in 2001. No copyright is - * claimed, and the software is hereby placed in the public domain. In case - * this attempt to disclaim copyright and place the software in the public - * domain is deemed null and void, then the software is Copyright (c) 2001 - * Alexander Peslyak and it is hereby released to the general public under the - * following terms: - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted. - * - * There's ABSOLUTELY NO WARRANTY, express or implied. - * - * (This is a heavily cut-down "BSD license".) - * - * This differs from Colin Plumb's older public domain implementation in that - * no exactly 32-bit integer data type is required (any 32-bit or wider - * unsigned integer data type will do), there's no compile-time endianness - * configuration, and the function prototypes match OpenSSL's. No code from - * Colin Plumb's implementation has been reused; this comment merely compares - * the properties of the two independent implementations. - * - * The primary goals of this implementation are portability and ease of use. - * It is meant to be fast, but not as fast as possible. Some known - * optimizations are not included to reduce source code size and avoid - * compile-time configuration. - */ - -#include "curl_setup.h" - -/* NSS and OS/400 crypto library do not provide the MD4 hash algorithm, so - * that we have a local implementation of it */ -#if defined(USE_NSS) || defined(USE_OS400CRYPTO) - -#include "curl_md4.h" -#include "warnless.h" - -#ifndef HAVE_OPENSSL - -#include - -/* Any 32-bit or wider unsigned integer data type will do */ -typedef unsigned int MD4_u32plus; - -typedef struct { - MD4_u32plus lo, hi; - MD4_u32plus a, b, c, d; - unsigned char buffer[64]; - MD4_u32plus block[16]; -} MD4_CTX; - -static void MD4_Init(MD4_CTX *ctx); -static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size); -static void MD4_Final(unsigned char *result, MD4_CTX *ctx); - -/* - * The basic MD4 functions. - * - * F and G are optimized compared to their RFC 1320 definitions, with the - * optimization for F borrowed from Colin Plumb's MD5 implementation. - */ -#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) -#define G(x, y, z) (((x) & ((y) | (z))) | ((y) & (z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) - -/* - * The MD4 transformation for all three rounds. - */ -#define STEP(f, a, b, c, d, x, s) \ - (a) += f((b), (c), (d)) + (x); \ - (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); - -/* - * SET reads 4 input bytes in little-endian byte order and stores them - * in a properly aligned word in host byte order. - * - * The check for little-endian architectures that tolerate unaligned - * memory accesses is just an optimization. Nothing will break if it - * doesn't work. - */ -#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) -#define SET(n) \ - (*(MD4_u32plus *)&ptr[(n) * 4]) -#define GET(n) \ - SET(n) -#else -#define SET(n) \ - (ctx->block[(n)] = \ - (MD4_u32plus)ptr[(n) * 4] | \ - ((MD4_u32plus)ptr[(n) * 4 + 1] << 8) | \ - ((MD4_u32plus)ptr[(n) * 4 + 2] << 16) | \ - ((MD4_u32plus)ptr[(n) * 4 + 3] << 24)) -#define GET(n) \ - (ctx->block[(n)]) -#endif - -/* - * This processes one or more 64-byte data blocks, but does NOT update - * the bit counters. There are no alignment requirements. - */ -static const void *body(MD4_CTX *ctx, const void *data, unsigned long size) -{ - const unsigned char *ptr; - MD4_u32plus a, b, c, d; - MD4_u32plus saved_a, saved_b, saved_c, saved_d; - - ptr = (const unsigned char *)data; - - a = ctx->a; - b = ctx->b; - c = ctx->c; - d = ctx->d; - - do { - saved_a = a; - saved_b = b; - saved_c = c; - saved_d = d; - -/* Round 1 */ - STEP(F, a, b, c, d, SET(0), 3) - STEP(F, d, a, b, c, SET(1), 7) - STEP(F, c, d, a, b, SET(2), 11) - STEP(F, b, c, d, a, SET(3), 19) - STEP(F, a, b, c, d, SET(4), 3) - STEP(F, d, a, b, c, SET(5), 7) - STEP(F, c, d, a, b, SET(6), 11) - STEP(F, b, c, d, a, SET(7), 19) - STEP(F, a, b, c, d, SET(8), 3) - STEP(F, d, a, b, c, SET(9), 7) - STEP(F, c, d, a, b, SET(10), 11) - STEP(F, b, c, d, a, SET(11), 19) - STEP(F, a, b, c, d, SET(12), 3) - STEP(F, d, a, b, c, SET(13), 7) - STEP(F, c, d, a, b, SET(14), 11) - STEP(F, b, c, d, a, SET(15), 19) - -/* Round 2 */ - STEP(G, a, b, c, d, GET(0) + 0x5a827999, 3) - STEP(G, d, a, b, c, GET(4) + 0x5a827999, 5) - STEP(G, c, d, a, b, GET(8) + 0x5a827999, 9) - STEP(G, b, c, d, a, GET(12) + 0x5a827999, 13) - STEP(G, a, b, c, d, GET(1) + 0x5a827999, 3) - STEP(G, d, a, b, c, GET(5) + 0x5a827999, 5) - STEP(G, c, d, a, b, GET(9) + 0x5a827999, 9) - STEP(G, b, c, d, a, GET(13) + 0x5a827999, 13) - STEP(G, a, b, c, d, GET(2) + 0x5a827999, 3) - STEP(G, d, a, b, c, GET(6) + 0x5a827999, 5) - STEP(G, c, d, a, b, GET(10) + 0x5a827999, 9) - STEP(G, b, c, d, a, GET(14) + 0x5a827999, 13) - STEP(G, a, b, c, d, GET(3) + 0x5a827999, 3) - STEP(G, d, a, b, c, GET(7) + 0x5a827999, 5) - STEP(G, c, d, a, b, GET(11) + 0x5a827999, 9) - STEP(G, b, c, d, a, GET(15) + 0x5a827999, 13) - -/* Round 3 */ - STEP(H, a, b, c, d, GET(0) + 0x6ed9eba1, 3) - STEP(H, d, a, b, c, GET(8) + 0x6ed9eba1, 9) - STEP(H, c, d, a, b, GET(4) + 0x6ed9eba1, 11) - STEP(H, b, c, d, a, GET(12) + 0x6ed9eba1, 15) - STEP(H, a, b, c, d, GET(2) + 0x6ed9eba1, 3) - STEP(H, d, a, b, c, GET(10) + 0x6ed9eba1, 9) - STEP(H, c, d, a, b, GET(6) + 0x6ed9eba1, 11) - STEP(H, b, c, d, a, GET(14) + 0x6ed9eba1, 15) - STEP(H, a, b, c, d, GET(1) + 0x6ed9eba1, 3) - STEP(H, d, a, b, c, GET(9) + 0x6ed9eba1, 9) - STEP(H, c, d, a, b, GET(5) + 0x6ed9eba1, 11) - STEP(H, b, c, d, a, GET(13) + 0x6ed9eba1, 15) - STEP(H, a, b, c, d, GET(3) + 0x6ed9eba1, 3) - STEP(H, d, a, b, c, GET(11) + 0x6ed9eba1, 9) - STEP(H, c, d, a, b, GET(7) + 0x6ed9eba1, 11) - STEP(H, b, c, d, a, GET(15) + 0x6ed9eba1, 15) - - a += saved_a; - b += saved_b; - c += saved_c; - d += saved_d; - - ptr += 64; - } while(size -= 64); - - ctx->a = a; - ctx->b = b; - ctx->c = c; - ctx->d = d; - - return ptr; -} - -static void MD4_Init(MD4_CTX *ctx) -{ - ctx->a = 0x67452301; - ctx->b = 0xefcdab89; - ctx->c = 0x98badcfe; - ctx->d = 0x10325476; - - ctx->lo = 0; - ctx->hi = 0; -} - -static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size) -{ - MD4_u32plus saved_lo; - unsigned long used, available; - - saved_lo = ctx->lo; - ctx->lo = (saved_lo + size) & 0x1fffffff; - if(ctx->lo < saved_lo) - ctx->hi++; - ctx->hi += (MD4_u32plus)size >> 29; - - used = saved_lo & 0x3f; - - if(used) { - available = 64 - used; - - if(size < available) { - memcpy(&ctx->buffer[used], data, size); - return; - } - - memcpy(&ctx->buffer[used], data, available); - data = (const unsigned char *)data + available; - size -= available; - body(ctx, ctx->buffer, 64); - } - - if(size >= 64) { - data = body(ctx, data, size & ~(unsigned long)0x3f); - size &= 0x3f; - } - - memcpy(ctx->buffer, data, size); -} - -static void MD4_Final(unsigned char *result, MD4_CTX *ctx) -{ - unsigned long used, available; - - used = ctx->lo & 0x3f; - - ctx->buffer[used++] = 0x80; - - available = 64 - used; - - if(available < 8) { - memset(&ctx->buffer[used], 0, available); - body(ctx, ctx->buffer, 64); - used = 0; - available = 64; - } - - memset(&ctx->buffer[used], 0, available - 8); - - ctx->lo <<= 3; - ctx->buffer[56] = curlx_ultouc((ctx->lo)&0xff); - ctx->buffer[57] = curlx_ultouc((ctx->lo >> 8)&0xff); - ctx->buffer[58] = curlx_ultouc((ctx->lo >> 16)&0xff); - ctx->buffer[59] = curlx_ultouc((ctx->lo >> 24)&0xff); - ctx->buffer[60] = curlx_ultouc((ctx->hi)&0xff); - ctx->buffer[61] = curlx_ultouc((ctx->hi >> 8)&0xff); - ctx->buffer[62] = curlx_ultouc((ctx->hi >> 16)&0xff); - ctx->buffer[63] = curlx_ultouc(ctx->hi >> 24); - - body(ctx, ctx->buffer, 64); - - result[0] = curlx_ultouc((ctx->a)&0xff); - result[1] = curlx_ultouc((ctx->a >> 8)&0xff); - result[2] = curlx_ultouc((ctx->a >> 16)&0xff); - result[3] = curlx_ultouc(ctx->a >> 24); - result[4] = curlx_ultouc((ctx->b)&0xff); - result[5] = curlx_ultouc((ctx->b >> 8)&0xff); - result[6] = curlx_ultouc((ctx->b >> 16)&0xff); - result[7] = curlx_ultouc(ctx->b >> 24); - result[8] = curlx_ultouc((ctx->c)&0xff); - result[9] = curlx_ultouc((ctx->c >> 8)&0xff); - result[10] = curlx_ultouc((ctx->c >> 16)&0xff); - result[11] = curlx_ultouc(ctx->c >> 24); - result[12] = curlx_ultouc((ctx->d)&0xff); - result[13] = curlx_ultouc((ctx->d >> 8)&0xff); - result[14] = curlx_ultouc((ctx->d >> 16)&0xff); - result[15] = curlx_ultouc(ctx->d >> 24); - - memset(ctx, 0, sizeof(*ctx)); -} - -#endif - -void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len) -{ - MD4_CTX ctx; - MD4_Init(&ctx); - MD4_Update(&ctx, input, curlx_uztoui(len)); - MD4_Final(output, &ctx); -} -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ diff --git a/build/premake/premake5/contrib/curl/lib/md5.c b/build/premake/premake5/contrib/curl/lib/md5.c deleted file mode 100644 index f2dc16c099..0000000000 --- a/build/premake/premake5/contrib/curl/lib/md5.c +++ /dev/null @@ -1,563 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_CRYPTO_AUTH - -#include - -#include "curl_md5.h" -#include "curl_hmac.h" -#include "warnless.h" - -#if defined(USE_GNUTLS_NETTLE) - -#include -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -typedef struct md5_ctx MD5_CTX; - -static void MD5_Init(MD5_CTX * ctx) -{ - md5_init(ctx); -} - -static void MD5_Update(MD5_CTX * ctx, - const unsigned char *input, - unsigned int inputLen) -{ - md5_update(ctx, inputLen, input); -} - -static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx) -{ - md5_digest(ctx, 16, digest); -} - -#elif defined(USE_GNUTLS) - -#include -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -typedef gcry_md_hd_t MD5_CTX; - -static void MD5_Init(MD5_CTX * ctx) -{ - gcry_md_open(ctx, GCRY_MD_MD5, 0); -} - -static void MD5_Update(MD5_CTX * ctx, - const unsigned char *input, - unsigned int inputLen) -{ - gcry_md_write(*ctx, input, inputLen); -} - -static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx) -{ - memcpy(digest, gcry_md_read(*ctx, 0), 16); - gcry_md_close(*ctx); -} - -#elif defined(USE_OPENSSL) -/* When OpenSSL is available we use the MD5-function from OpenSSL */ -#include -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \ - (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \ - (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \ - (__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000)) - -/* For Apple operating systems: CommonCrypto has the functions we need. - These functions are available on Tiger and later, as well as iOS 2.0 - and later. If you're building for an older cat, well, sorry. - - Declaring the functions as static like this seems to be a bit more - reliable than defining COMMON_DIGEST_FOR_OPENSSL on older cats. */ -# include -# define MD5_CTX CC_MD5_CTX -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -static void MD5_Init(MD5_CTX *ctx) -{ - CC_MD5_Init(ctx); -} - -static void MD5_Update(MD5_CTX *ctx, - const unsigned char *input, - unsigned int inputLen) -{ - CC_MD5_Update(ctx, input, inputLen); -} - -static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) -{ - CC_MD5_Final(digest, ctx); -} - -#elif defined(_WIN32) && !defined(CURL_WINDOWS_APP) - -#include -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -typedef struct { - HCRYPTPROV hCryptProv; - HCRYPTHASH hHash; -} MD5_CTX; - -static void MD5_Init(MD5_CTX *ctx) -{ - if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { - CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash); - } -} - -static void MD5_Update(MD5_CTX *ctx, - const unsigned char *input, - unsigned int inputLen) -{ - CryptHashData(ctx->hHash, (unsigned char *)input, inputLen, 0); -} - -static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) -{ - unsigned long length = 0; - CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0); - if(length == 16) - CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0); - if(ctx->hHash) - CryptDestroyHash(ctx->hHash); - if(ctx->hCryptProv) - CryptReleaseContext(ctx->hCryptProv, 0); -} - -#elif defined(USE_AXTLS) -#include -#include -#include -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" -#else -/* When no other crypto library is available we use this code segment */ -/* - * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. - * MD5 Message-Digest Algorithm (RFC 1321). - * - * Homepage: - http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 - * - * Author: - * Alexander Peslyak, better known as Solar Designer - * - * This software was written by Alexander Peslyak in 2001. No copyright is - * claimed, and the software is hereby placed in the public domain. - * In case this attempt to disclaim copyright and place the software in the - * public domain is deemed null and void, then the software is - * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the - * general public under the following terms: - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted. - * - * There's ABSOLUTELY NO WARRANTY, express or implied. - * - * (This is a heavily cut-down "BSD license".) - * - * This differs from Colin Plumb's older public domain implementation in that - * no exactly 32-bit integer data type is required (any 32-bit or wider - * unsigned integer data type will do), there's no compile-time endianness - * configuration, and the function prototypes match OpenSSL's. No code from - * Colin Plumb's implementation has been reused; this comment merely compares - * the properties of the two independent implementations. - * - * The primary goals of this implementation are portability and ease of use. - * It is meant to be fast, but not as fast as possible. Some known - * optimizations are not included to reduce source code size and avoid - * compile-time configuration. - */ - -#include - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* Any 32-bit or wider unsigned integer data type will do */ -typedef unsigned int MD5_u32plus; - -typedef struct { - MD5_u32plus lo, hi; - MD5_u32plus a, b, c, d; - unsigned char buffer[64]; - MD5_u32plus block[16]; -} MD5_CTX; - -static void MD5_Init(MD5_CTX *ctx); -static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); -static void MD5_Final(unsigned char *result, MD5_CTX *ctx); - -/* - * The basic MD5 functions. - * - * F and G are optimized compared to their RFC 1321 definitions for - * architectures that lack an AND-NOT instruction, just like in Colin Plumb's - * implementation. - */ -#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) -#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) -#define H(x, y, z) (((x) ^ (y)) ^ (z)) -#define H2(x, y, z) ((x) ^ ((y) ^ (z))) -#define I(x, y, z) ((y) ^ ((x) | ~(z))) - -/* - * The MD5 transformation for all four rounds. - */ -#define STEP(f, a, b, c, d, x, t, s) \ - (a) += f((b), (c), (d)) + (x) + (t); \ - (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ - (a) += (b); - -/* - * SET reads 4 input bytes in little-endian byte order and stores them - * in a properly aligned word in host byte order. - * - * The check for little-endian architectures that tolerate unaligned - * memory accesses is just an optimization. Nothing will break if it - * doesn't work. - */ -#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) -#define SET(n) \ - (*(MD5_u32plus *)&ptr[(n) * 4]) -#define GET(n) \ - SET(n) -#else -#define SET(n) \ - (ctx->block[(n)] = \ - (MD5_u32plus)ptr[(n) * 4] | \ - ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \ - ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \ - ((MD5_u32plus)ptr[(n) * 4 + 3] << 24)) -#define GET(n) \ - (ctx->block[(n)]) -#endif - -/* - * This processes one or more 64-byte data blocks, but does NOT update - * the bit counters. There are no alignment requirements. - */ -static const void *body(MD5_CTX *ctx, const void *data, unsigned long size) -{ - const unsigned char *ptr; - MD5_u32plus a, b, c, d; - MD5_u32plus saved_a, saved_b, saved_c, saved_d; - - ptr = (const unsigned char *)data; - - a = ctx->a; - b = ctx->b; - c = ctx->c; - d = ctx->d; - - do { - saved_a = a; - saved_b = b; - saved_c = c; - saved_d = d; - -/* Round 1 */ - STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7) - STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12) - STEP(F, c, d, a, b, SET(2), 0x242070db, 17) - STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22) - STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7) - STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12) - STEP(F, c, d, a, b, SET(6), 0xa8304613, 17) - STEP(F, b, c, d, a, SET(7), 0xfd469501, 22) - STEP(F, a, b, c, d, SET(8), 0x698098d8, 7) - STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12) - STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17) - STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22) - STEP(F, a, b, c, d, SET(12), 0x6b901122, 7) - STEP(F, d, a, b, c, SET(13), 0xfd987193, 12) - STEP(F, c, d, a, b, SET(14), 0xa679438e, 17) - STEP(F, b, c, d, a, SET(15), 0x49b40821, 22) - -/* Round 2 */ - STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5) - STEP(G, d, a, b, c, GET(6), 0xc040b340, 9) - STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14) - STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20) - STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5) - STEP(G, d, a, b, c, GET(10), 0x02441453, 9) - STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14) - STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20) - STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5) - STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9) - STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14) - STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20) - STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5) - STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9) - STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14) - STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20) - -/* Round 3 */ - STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4) - STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11) - STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16) - STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23) - STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4) - STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11) - STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16) - STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23) - STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4) - STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11) - STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16) - STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23) - STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4) - STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11) - STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16) - STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23) - -/* Round 4 */ - STEP(I, a, b, c, d, GET(0), 0xf4292244, 6) - STEP(I, d, a, b, c, GET(7), 0x432aff97, 10) - STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15) - STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21) - STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6) - STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10) - STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15) - STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21) - STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6) - STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10) - STEP(I, c, d, a, b, GET(6), 0xa3014314, 15) - STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21) - STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6) - STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10) - STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15) - STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21) - - a += saved_a; - b += saved_b; - c += saved_c; - d += saved_d; - - ptr += 64; - } while(size -= 64); - - ctx->a = a; - ctx->b = b; - ctx->c = c; - ctx->d = d; - - return ptr; -} - -static void MD5_Init(MD5_CTX *ctx) -{ - ctx->a = 0x67452301; - ctx->b = 0xefcdab89; - ctx->c = 0x98badcfe; - ctx->d = 0x10325476; - - ctx->lo = 0; - ctx->hi = 0; -} - -static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size) -{ - MD5_u32plus saved_lo; - unsigned long used, available; - - saved_lo = ctx->lo; - ctx->lo = (saved_lo + size) & 0x1fffffff; - if(ctx->lo < saved_lo) - ctx->hi++; - ctx->hi += (MD5_u32plus)size >> 29; - - used = saved_lo & 0x3f; - - if(used) { - available = 64 - used; - - if(size < available) { - memcpy(&ctx->buffer[used], data, size); - return; - } - - memcpy(&ctx->buffer[used], data, available); - data = (const unsigned char *)data + available; - size -= available; - body(ctx, ctx->buffer, 64); - } - - if(size >= 64) { - data = body(ctx, data, size & ~(unsigned long)0x3f); - size &= 0x3f; - } - - memcpy(ctx->buffer, data, size); -} - -static void MD5_Final(unsigned char *result, MD5_CTX *ctx) -{ - unsigned long used, available; - - used = ctx->lo & 0x3f; - - ctx->buffer[used++] = 0x80; - - available = 64 - used; - - if(available < 8) { - memset(&ctx->buffer[used], 0, available); - body(ctx, ctx->buffer, 64); - used = 0; - available = 64; - } - - memset(&ctx->buffer[used], 0, available - 8); - - ctx->lo <<= 3; - ctx->buffer[56] = curlx_ultouc((ctx->lo)&0xff); - ctx->buffer[57] = curlx_ultouc((ctx->lo >> 8)&0xff); - ctx->buffer[58] = curlx_ultouc((ctx->lo >> 16)&0xff); - ctx->buffer[59] = curlx_ultouc(ctx->lo >> 24); - ctx->buffer[60] = curlx_ultouc((ctx->hi)&0xff); - ctx->buffer[61] = curlx_ultouc((ctx->hi >> 8)&0xff); - ctx->buffer[62] = curlx_ultouc((ctx->hi >> 16)&0xff); - ctx->buffer[63] = curlx_ultouc(ctx->hi >> 24); - - body(ctx, ctx->buffer, 64); - - result[0] = curlx_ultouc((ctx->a)&0xff); - result[1] = curlx_ultouc((ctx->a >> 8)&0xff); - result[2] = curlx_ultouc((ctx->a >> 16)&0xff); - result[3] = curlx_ultouc(ctx->a >> 24); - result[4] = curlx_ultouc((ctx->b)&0xff); - result[5] = curlx_ultouc((ctx->b >> 8)&0xff); - result[6] = curlx_ultouc((ctx->b >> 16)&0xff); - result[7] = curlx_ultouc(ctx->b >> 24); - result[8] = curlx_ultouc((ctx->c)&0xff); - result[9] = curlx_ultouc((ctx->c >> 8)&0xff); - result[10] = curlx_ultouc((ctx->c >> 16)&0xff); - result[11] = curlx_ultouc(ctx->c >> 24); - result[12] = curlx_ultouc((ctx->d)&0xff); - result[13] = curlx_ultouc((ctx->d >> 8)&0xff); - result[14] = curlx_ultouc((ctx->d >> 16)&0xff); - result[15] = curlx_ultouc(ctx->d >> 24); - - memset(ctx, 0, sizeof(*ctx)); -} - -#endif /* CRYPTO LIBS */ - -const HMAC_params Curl_HMAC_MD5[] = { - { - (HMAC_hinit_func) MD5_Init, /* Hash initialization function. */ - (HMAC_hupdate_func) MD5_Update, /* Hash update function. */ - (HMAC_hfinal_func) MD5_Final, /* Hash computation end function. */ - sizeof(MD5_CTX), /* Size of hash context structure. */ - 64, /* Maximum key length. */ - 16 /* Result size. */ - } -}; - -const MD5_params Curl_DIGEST_MD5[] = { - { - (Curl_MD5_init_func) MD5_Init, /* Digest initialization function */ - (Curl_MD5_update_func) MD5_Update, /* Digest update function */ - (Curl_MD5_final_func) MD5_Final, /* Digest computation end function */ - sizeof(MD5_CTX), /* Size of digest context struct */ - 16 /* Result size */ - } -}; - -/* - * @unittest: 1601 - */ -void Curl_md5it(unsigned char *outbuffer, /* 16 bytes */ - const unsigned char *input) -{ - MD5_CTX ctx; - MD5_Init(&ctx); - MD5_Update(&ctx, input, curlx_uztoui(strlen((char *)input))); - MD5_Final(outbuffer, &ctx); -} - -MD5_context *Curl_MD5_init(const MD5_params *md5params) -{ - MD5_context *ctxt; - - /* Create MD5 context */ - ctxt = malloc(sizeof *ctxt); - - if(!ctxt) - return ctxt; - - ctxt->md5_hashctx = malloc(md5params->md5_ctxtsize); - - if(!ctxt->md5_hashctx) { - free(ctxt); - return NULL; - } - - ctxt->md5_hash = md5params; - - (*md5params->md5_init_func)(ctxt->md5_hashctx); - - return ctxt; -} - -int Curl_MD5_update(MD5_context *context, - const unsigned char *data, - unsigned int len) -{ - (*context->md5_hash->md5_update_func)(context->md5_hashctx, data, len); - - return 0; -} - -int Curl_MD5_final(MD5_context *context, unsigned char *result) -{ - (*context->md5_hash->md5_final_func)(result, context->md5_hashctx); - - free(context->md5_hashctx); - free(context); - - return 0; -} - -#endif /* CURL_DISABLE_CRYPTO_AUTH */ diff --git a/build/premake/premake5/contrib/curl/lib/memdebug.c b/build/premake/premake5/contrib/curl/lib/memdebug.c deleted file mode 100644 index 15e8661617..0000000000 --- a/build/premake/premake5/contrib/curl/lib/memdebug.c +++ /dev/null @@ -1,488 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef CURLDEBUG - -#include - -#include "urldata.h" - -#define MEMDEBUG_NODEFINES /* don't redefine the standard functions */ - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifndef HAVE_ASSERT_H -# define assert(x) Curl_nop_stmt -#endif - -/* - * Until 2011-08-17 libcurl's Memory Tracking feature also performed - * automatic malloc and free filling operations using 0xA5 and 0x13 - * values. Our own preinitialization of dynamically allocated memory - * might be useful when not using third party memory debuggers, but - * on the other hand this would fool memory debuggers into thinking - * that all dynamically allocated memory is properly initialized. - * - * As a default setting, libcurl's Memory Tracking feature no longer - * performs preinitialization of dynamically allocated memory on its - * own. If you know what you are doing, and really want to retain old - * behavior, you can achieve this compiling with preprocessor symbols - * CURL_MT_MALLOC_FILL and CURL_MT_FREE_FILL defined with appropriate - * values. - */ - -#ifdef CURL_MT_MALLOC_FILL -# if (CURL_MT_MALLOC_FILL < 0) || (CURL_MT_MALLOC_FILL > 0xff) -# error "invalid CURL_MT_MALLOC_FILL or out of range" -# endif -#endif - -#ifdef CURL_MT_FREE_FILL -# if (CURL_MT_FREE_FILL < 0) || (CURL_MT_FREE_FILL > 0xff) -# error "invalid CURL_MT_FREE_FILL or out of range" -# endif -#endif - -#if defined(CURL_MT_MALLOC_FILL) && defined(CURL_MT_FREE_FILL) -# if (CURL_MT_MALLOC_FILL == CURL_MT_FREE_FILL) -# error "CURL_MT_MALLOC_FILL same as CURL_MT_FREE_FILL" -# endif -#endif - -#ifdef CURL_MT_MALLOC_FILL -# define mt_malloc_fill(buf,len) memset((buf), CURL_MT_MALLOC_FILL, (len)) -#else -# define mt_malloc_fill(buf,len) Curl_nop_stmt -#endif - -#ifdef CURL_MT_FREE_FILL -# define mt_free_fill(buf,len) memset((buf), CURL_MT_FREE_FILL, (len)) -#else -# define mt_free_fill(buf,len) Curl_nop_stmt -#endif - -struct memdebug { - size_t size; - union { - curl_off_t o; - double d; - void *p; - } mem[1]; - /* I'm hoping this is the thing with the strictest alignment - * requirements. That also means we waste some space :-( */ -}; - -/* - * Note that these debug functions are very simple and they are meant to - * remain so. For advanced analysis, record a log file and write perl scripts - * to analyze them! - * - * Don't use these with multithreaded test programs! - */ - -#define logfile curl_debuglogfile -FILE *curl_debuglogfile = NULL; -static bool memlimit = FALSE; /* enable memory limit */ -static long memsize = 0; /* set number of mallocs allowed */ - -/* this sets the log file name */ -void curl_memdebug(const char *logname) -{ - if(!logfile) { - if(logname && *logname) - logfile = fopen(logname, FOPEN_WRITETEXT); - else - logfile = stderr; -#ifdef MEMDEBUG_LOG_SYNC - /* Flush the log file after every line so the log isn't lost in a crash */ - setbuf(logfile, (char *)NULL); -#endif - } -} - -/* This function sets the number of malloc() calls that should return - successfully! */ -void curl_memlimit(long limit) -{ - if(!memlimit) { - memlimit = TRUE; - memsize = limit; - } -} - -/* returns TRUE if this isn't allowed! */ -static bool countcheck(const char *func, int line, const char *source) -{ - /* if source is NULL, then the call is made internally and this check - should not be made */ - if(memlimit && source) { - if(!memsize) { - if(source) { - /* log to file */ - curl_memlog("LIMIT %s:%d %s reached memlimit\n", - source, line, func); - /* log to stderr also */ - fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n", - source, line, func); - fflush(logfile); /* because it might crash now */ - } - SET_ERRNO(ENOMEM); - return TRUE; /* RETURN ERROR! */ - } - else - memsize--; /* countdown */ - - - } - - return FALSE; /* allow this */ -} - -void *curl_domalloc(size_t wantedsize, int line, const char *source) -{ - struct memdebug *mem; - size_t size; - - assert(wantedsize != 0); - - if(countcheck("malloc", line, source)) - return NULL; - - /* alloc at least 64 bytes */ - size = sizeof(struct memdebug)+wantedsize; - - mem = (Curl_cmalloc)(size); - if(mem) { - /* fill memory with junk */ - mt_malloc_fill(mem->mem, wantedsize); - mem->size = wantedsize; - } - - if(source) - curl_memlog("MEM %s:%d malloc(%zu) = %p\n", - source, line, wantedsize, - mem ? (void *)mem->mem : (void *)0); - - return (mem ? mem->mem : NULL); -} - -void *curl_docalloc(size_t wanted_elements, size_t wanted_size, - int line, const char *source) -{ - struct memdebug *mem; - size_t size, user_size; - - assert(wanted_elements != 0); - assert(wanted_size != 0); - - if(countcheck("calloc", line, source)) - return NULL; - - /* alloc at least 64 bytes */ - user_size = wanted_size * wanted_elements; - size = sizeof(struct memdebug) + user_size; - - mem = (Curl_ccalloc)(1, size); - if(mem) - mem->size = user_size; - - if(source) - curl_memlog("MEM %s:%d calloc(%zu,%zu) = %p\n", - source, line, wanted_elements, wanted_size, - mem ? (void *)mem->mem : (void *)0); - - return (mem ? mem->mem : NULL); -} - -char *curl_dostrdup(const char *str, int line, const char *source) -{ - char *mem; - size_t len; - - assert(str != NULL); - - if(countcheck("strdup", line, source)) - return NULL; - - len=strlen(str)+1; - - mem=curl_domalloc(len, 0, NULL); /* NULL prevents logging */ - if(mem) - memcpy(mem, str, len); - - if(source) - curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n", - source, line, (void *)str, len, (void *)mem); - - return mem; -} - -#if defined(WIN32) && defined(UNICODE) -wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source) -{ - wchar_t *mem; - size_t wsiz, bsiz; - - assert(str != NULL); - - if(countcheck("wcsdup", line, source)) - return NULL; - - wsiz = wcslen(str) + 1; - bsiz = wsiz * sizeof(wchar_t); - - mem = curl_domalloc(bsiz, 0, NULL); /* NULL prevents logging */ - if(mem) - memcpy(mem, str, bsiz); - - if(source) - curl_memlog("MEM %s:%d wcsdup(%p) (%zu) = %p\n", - source, line, (void *)str, bsiz, (void *)mem); - - return mem; -} -#endif - -/* We provide a realloc() that accepts a NULL as pointer, which then - performs a malloc(). In order to work with ares. */ -void *curl_dorealloc(void *ptr, size_t wantedsize, - int line, const char *source) -{ - struct memdebug *mem=NULL; - - size_t size = sizeof(struct memdebug)+wantedsize; - - assert(wantedsize != 0); - - if(countcheck("realloc", line, source)) - return NULL; - -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:1684) - /* 1684: conversion from pointer to same-sized integral type */ -#endif - - if(ptr) - mem = (void *)((char *)ptr - offsetof(struct memdebug, mem)); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif - - mem = (Curl_crealloc)(mem, size); - if(source) - curl_memlog("MEM %s:%d realloc(%p, %zu) = %p\n", - source, line, (void *)ptr, wantedsize, - mem ? (void *)mem->mem : (void *)0); - - if(mem) { - mem->size = wantedsize; - return mem->mem; - } - - return NULL; -} - -void curl_dofree(void *ptr, int line, const char *source) -{ - struct memdebug *mem; - - if(ptr) { - -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:1684) - /* 1684: conversion from pointer to same-sized integral type */ -#endif - - mem = (void *)((char *)ptr - offsetof(struct memdebug, mem)); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif - - /* destroy */ - mt_free_fill(mem->mem, mem->size); - - /* free for real */ - (Curl_cfree)(mem); - } - - if(source) - curl_memlog("MEM %s:%d free(%p)\n", source, line, (void *)ptr); -} - -curl_socket_t curl_socket(int domain, int type, int protocol, - int line, const char *source) -{ - const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ? - "FD %s:%d socket() = %d\n" : - (sizeof(curl_socket_t) == sizeof(long)) ? - "FD %s:%d socket() = %ld\n" : - "FD %s:%d socket() = %zd\n"; - - curl_socket_t sockfd = socket(domain, type, protocol); - - if(source && (sockfd != CURL_SOCKET_BAD)) - curl_memlog(fmt, source, line, sockfd); - - return sockfd; -} - -#ifdef HAVE_SOCKETPAIR -int curl_socketpair(int domain, int type, int protocol, - curl_socket_t socket_vector[2], - int line, const char *source) -{ - const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ? - "FD %s:%d socketpair() = %d %d\n" : - (sizeof(curl_socket_t) == sizeof(long)) ? - "FD %s:%d socketpair() = %ld %ld\n" : - "FD %s:%d socketpair() = %zd %zd\n"; - - int res = socketpair(domain, type, protocol, socket_vector); - - if(source && (0 == res)) - curl_memlog(fmt, source, line, socket_vector[0], socket_vector[1]); - - return res; -} -#endif - -curl_socket_t curl_accept(curl_socket_t s, void *saddr, void *saddrlen, - int line, const char *source) -{ - const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ? - "FD %s:%d accept() = %d\n" : - (sizeof(curl_socket_t) == sizeof(long)) ? - "FD %s:%d accept() = %ld\n" : - "FD %s:%d accept() = %zd\n"; - - struct sockaddr *addr = (struct sockaddr *)saddr; - curl_socklen_t *addrlen = (curl_socklen_t *)saddrlen; - - curl_socket_t sockfd = accept(s, addr, addrlen); - - if(source && (sockfd != CURL_SOCKET_BAD)) - curl_memlog(fmt, source, line, sockfd); - - return sockfd; -} - -/* separate function to allow libcurl to mark a "faked" close */ -void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source) -{ - const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ? - "FD %s:%d sclose(%d)\n": - (sizeof(curl_socket_t) == sizeof(long)) ? - "FD %s:%d sclose(%ld)\n": - "FD %s:%d sclose(%zd)\n"; - - if(source) - curl_memlog(fmt, source, line, sockfd); -} - -/* this is our own defined way to close sockets on *ALL* platforms */ -int curl_sclose(curl_socket_t sockfd, int line, const char *source) -{ - int res=sclose(sockfd); - curl_mark_sclose(sockfd, line, source); - return res; -} - -FILE *curl_fopen(const char *file, const char *mode, - int line, const char *source) -{ - FILE *res=fopen(file, mode); - - if(source) - curl_memlog("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n", - source, line, file, mode, (void *)res); - - return res; -} - -#ifdef HAVE_FDOPEN -FILE *curl_fdopen(int filedes, const char *mode, - int line, const char *source) -{ - FILE *res=fdopen(filedes, mode); - - if(source) - curl_memlog("FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n", - source, line, filedes, mode, (void *)res); - - return res; -} -#endif - -int curl_fclose(FILE *file, int line, const char *source) -{ - int res; - - assert(file != NULL); - - res=fclose(file); - - if(source) - curl_memlog("FILE %s:%d fclose(%p)\n", - source, line, (void *)file); - - return res; -} - -#define LOGLINE_BUFSIZE 1024 - -/* this does the writting to the memory tracking log file */ -void curl_memlog(const char *format, ...) -{ - char *buf; - int nchars; - va_list ap; - - if(!logfile) - return; - - buf = (Curl_cmalloc)(LOGLINE_BUFSIZE); - if(!buf) - return; - - va_start(ap, format); - nchars = vsnprintf(buf, LOGLINE_BUFSIZE, format, ap); - va_end(ap); - - if(nchars > LOGLINE_BUFSIZE - 1) - nchars = LOGLINE_BUFSIZE - 1; - - if(nchars > 0) - fwrite(buf, 1, nchars, logfile); - - (Curl_cfree)(buf); -} - -#endif /* CURLDEBUG */ diff --git a/build/premake/premake5/contrib/curl/lib/memdebug.h b/build/premake/premake5/contrib/curl/lib/memdebug.h deleted file mode 100644 index 835dab38c7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/memdebug.h +++ /dev/null @@ -1,173 +0,0 @@ -#ifndef HEADER_CURL_MEMDEBUG_H -#define HEADER_CURL_MEMDEBUG_H -#ifdef CURLDEBUG -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * CAUTION: this header is designed to work when included by the app-side - * as well as the library. Do not mix with library internals! - */ - -#define CURL_MT_LOGFNAME_BUFSIZE 512 - -#define logfile curl_debuglogfile - -extern FILE *logfile; - -/* memory functions */ -CURL_EXTERN void *curl_domalloc(size_t size, int line, const char *source); -CURL_EXTERN void *curl_docalloc(size_t elements, size_t size, int line, - const char *source); -CURL_EXTERN void *curl_dorealloc(void *ptr, size_t size, int line, - const char *source); -CURL_EXTERN void curl_dofree(void *ptr, int line, const char *source); -CURL_EXTERN char *curl_dostrdup(const char *str, int line, const char *source); -#if defined(WIN32) && defined(UNICODE) -CURL_EXTERN wchar_t *curl_dowcsdup(const wchar_t *str, int line, - const char *source); -#endif - -CURL_EXTERN void curl_memdebug(const char *logname); -CURL_EXTERN void curl_memlimit(long limit); -CURL_EXTERN void curl_memlog(const char *format, ...); - -/* file descriptor manipulators */ -CURL_EXTERN curl_socket_t curl_socket(int domain, int type, int protocol, - int line, const char *source); -CURL_EXTERN void curl_mark_sclose(curl_socket_t sockfd, - int line, const char *source); -CURL_EXTERN int curl_sclose(curl_socket_t sockfd, - int line, const char *source); -CURL_EXTERN curl_socket_t curl_accept(curl_socket_t s, void *a, void *alen, - int line, const char *source); -#ifdef HAVE_SOCKETPAIR -CURL_EXTERN int curl_socketpair(int domain, int type, int protocol, - curl_socket_t socket_vector[2], - int line, const char *source); -#endif - -/* FILE functions */ -CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line, - const char *source); -#ifdef HAVE_FDOPEN -CURL_EXTERN FILE *curl_fdopen(int filedes, const char *mode, int line, - const char *source); -#endif -CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source); - -#ifndef MEMDEBUG_NODEFINES - -/* Set this symbol on the command-line, recompile all lib-sources */ -#undef strdup -#define strdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__) -#define malloc(size) curl_domalloc(size, __LINE__, __FILE__) -#define calloc(nbelem,size) curl_docalloc(nbelem, size, __LINE__, __FILE__) -#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__) -#define free(ptr) curl_dofree(ptr, __LINE__, __FILE__) - -#ifdef WIN32 -# ifdef UNICODE -# undef wcsdup -# define wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__) -# undef _wcsdup -# define _wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__) -# undef _tcsdup -# define _tcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__) -# else -# undef _tcsdup -# define _tcsdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__) -# endif -#endif - -#undef socket -#define socket(domain,type,protocol)\ - curl_socket(domain, type, protocol, __LINE__, __FILE__) -#undef accept /* for those with accept as a macro */ -#define accept(sock,addr,len)\ - curl_accept(sock, addr, len, __LINE__, __FILE__) -#ifdef HAVE_SOCKETPAIR -#define socketpair(domain,type,protocol,socket_vector)\ - curl_socketpair(domain, type, protocol, socket_vector, __LINE__, __FILE__) -#endif - -#ifdef HAVE_GETADDRINFO -#if defined(getaddrinfo) && defined(__osf__) -/* OSF/1 and Tru64 have getaddrinfo as a define already, so we cannot define - our macro as for other platforms. Instead, we redefine the new name they - define getaddrinfo to become! */ -#define ogetaddrinfo(host,serv,hint,res) \ - curl_dogetaddrinfo(host, serv, hint, res, __LINE__, __FILE__) -#else -#undef getaddrinfo -#define getaddrinfo(host,serv,hint,res) \ - curl_dogetaddrinfo(host, serv, hint, res, __LINE__, __FILE__) -#endif -#endif /* HAVE_GETADDRINFO */ - -#ifdef HAVE_GETNAMEINFO -#undef getnameinfo -#define getnameinfo(sa,salen,host,hostlen,serv,servlen,flags) \ - curl_dogetnameinfo(sa, salen, host, hostlen, serv, servlen, flags, \ - __LINE__, __FILE__) -#endif /* HAVE_GETNAMEINFO */ - -#ifdef HAVE_FREEADDRINFO -#undef freeaddrinfo -#define freeaddrinfo(data) \ - curl_dofreeaddrinfo(data, __LINE__, __FILE__) -#endif /* HAVE_FREEADDRINFO */ - -/* sclose is probably already defined, redefine it! */ -#undef sclose -#define sclose(sockfd) curl_sclose(sockfd,__LINE__,__FILE__) - -#define fake_sclose(sockfd) curl_mark_sclose(sockfd,__LINE__,__FILE__) - -#undef fopen -#define fopen(file,mode) curl_fopen(file,mode,__LINE__,__FILE__) -#undef fdopen -#define fdopen(file,mode) curl_fdopen(file,mode,__LINE__,__FILE__) -#define fclose(file) curl_fclose(file,__LINE__,__FILE__) - -#endif /* MEMDEBUG_NODEFINES */ - -#endif /* CURLDEBUG */ - -/* -** Following section applies even when CURLDEBUG is not defined. -*/ - -#ifndef fake_sclose -#define fake_sclose(x) Curl_nop_stmt -#endif - -/* - * Curl_safefree defined as a macro to allow MemoryTracking feature - * to log free() calls at same location where Curl_safefree is used. - * This macro also assigns NULL to given pointer when free'd. - */ - -#define Curl_safefree(ptr) \ - do { free((ptr)); (ptr) = NULL;} WHILE_FALSE - -#endif /* HEADER_CURL_MEMDEBUG_H */ diff --git a/build/premake/premake5/contrib/curl/lib/mk-ca-bundle.pl b/build/premake/premake5/contrib/curl/lib/mk-ca-bundle.pl deleted file mode 100644 index 9574f1dbf9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/mk-ca-bundle.pl +++ /dev/null @@ -1,554 +0,0 @@ -#!/usr/bin/perl -w -# *************************************************************************** -# * _ _ ____ _ -# * Project ___| | | | _ \| | -# * / __| | | | |_) | | -# * | (__| |_| | _ <| |___ -# * \___|\___/|_| \_\_____| -# * -# * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. -# * -# * This software is licensed as described in the file COPYING, which -# * you should have received as part of this distribution. The terms -# * are also available at https://curl.haxx.se/docs/copyright.html. -# * -# * You may opt to use, copy, modify, merge, publish, distribute and/or sell -# * copies of the Software, and permit persons to whom the Software is -# * furnished to do so, under the terms of the COPYING file. -# * -# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# * KIND, either express or implied. -# * -# *************************************************************************** -# This Perl script creates a fresh ca-bundle.crt file for use with libcurl. -# It downloads certdata.txt from Mozilla's source tree (see URL below), -# then parses certdata.txt and extracts CA Root Certificates into PEM format. -# These are then processed with the OpenSSL commandline tool to produce the -# final ca-bundle.crt file. -# The script is based on the parse-certs script written by Roland Krikava. -# This Perl script works on almost any platform since its only external -# dependency is the OpenSSL commandline tool for optional text listing. -# Hacked by Guenter Knauf. -# -use Encode; -use Getopt::Std; -use MIME::Base64; -use strict; -use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); -use List::Util; -use Text::Wrap; -my $MOD_SHA = "Digest::SHA"; -eval "require $MOD_SHA"; -if ($@) { - $MOD_SHA = "Digest::SHA::PurePerl"; - eval "require $MOD_SHA"; -} -eval "require LWP::UserAgent"; - -my %urls = ( - 'nss' => - 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', - 'central' => - 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', - 'aurora' => - 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', - 'beta' => - 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', - 'release' => - 'https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', -); - -$opt_d = 'release'; - -# If the OpenSSL commandline is not in search path you can configure it here! -my $openssl = 'openssl'; - -my $version = '1.27'; - -$opt_w = 76; # default base64 encoded lines length - -# default cert types to include in the output (default is to include CAs which may issue SSL server certs) -my $default_mozilla_trust_purposes = "SERVER_AUTH"; -my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR"; -$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels; - -my @valid_mozilla_trust_purposes = ( - "DIGITAL_SIGNATURE", - "NON_REPUDIATION", - "KEY_ENCIPHERMENT", - "DATA_ENCIPHERMENT", - "KEY_AGREEMENT", - "KEY_CERT_SIGN", - "CRL_SIGN", - "SERVER_AUTH", - "CLIENT_AUTH", - "CODE_SIGNING", - "EMAIL_PROTECTION", - "IPSEC_END_SYSTEM", - "IPSEC_TUNNEL", - "IPSEC_USER", - "TIME_STAMPING", - "STEP_UP_APPROVED" -); - -my @valid_mozilla_trust_levels = ( - "TRUSTED_DELEGATOR", # CAs - "NOT_TRUSTED", # Don't trust these certs. - "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA. - "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA). -); - -my $default_signature_algorithms = $opt_s = "MD5"; - -my @valid_signature_algorithms = ( - "MD5", - "SHA1", - "SHA256", - "SHA384", - "SHA512" -); - -$0 =~ s@.*(/|\\)@@; -$Getopt::Std::STANDARD_HELP_VERSION = 1; -getopts('bd:fhiklmnp:qs:tuvw:'); - -if(!defined($opt_d)) { - # to make plain "-d" use not cause warnings, and actually still work - $opt_d = 'release'; -} - -# Use predefined URL or else custom URL specified on command line. -my $url; -if(defined($urls{$opt_d})) { - $url = $urls{$opt_d}; - if(!$opt_k && $url !~ /^https:\/\//i) { - die "The URL for '$opt_d' is not HTTPS. Use -k to override (insecure).\n"; - } -} -else { - $url = $opt_d; -} - -my $curl = `curl -V`; - -if ($opt_i) { - print ("=" x 78 . "\n"); - print "Script Version : $version\n"; - print "Perl Version : $]\n"; - print "Operating System Name : $^O\n"; - print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; - print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; - print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n" if($LWP::UserAgent::VERSION); - print "LWP.pm Version : ${LWP::VERSION}\n" if($LWP::VERSION); - print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION); - print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION); - print ("=" x 78 . "\n"); -} - -sub warning_message() { - if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit - print "Warning: Use of this script may pose some risk:\n"; - print "\n"; - print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n"; - print " 2) Default to 'release', but more recent updates may be found in other trees\n"; - print " 3) certdata.txt file format may change, lag time to update this script\n"; - print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; - print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; - print " 6) Use of this script will make a security engineer grind his teeth and\n"; - print " swear at you. ;)\n"; - exit; - } else { # Short Form Warning - print "Warning: Use of this script may pose some risk, -d risk for more details.\n"; - } -} - -sub HELP_MESSAGE() { - print "Usage:\t${0} [-b] [-d] [-f] [-i] [-k] [-l] [-n] [-p] [-q] [-s] [-t] [-u] [-v] [-w] []\n"; - print "\t-b\tbackup an existing version of ca-bundle.crt\n"; - print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n"; - print "\t\t Valid names are:\n"; - print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n"; - print "\t-f\tforce rebuild even if certdata.txt is current\n"; - print "\t-i\tprint version info about used modules\n"; - print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n"; - print "\t-l\tprint license info about certdata.txt\n"; - print "\t-m\tinclude meta data in output\n"; - print "\t-n\tno download of certdata.txt (to use existing)\n"; - print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n"; - print "\t\t Valid purposes are:\n"; - print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n"; - print "\t\t Valid levels are:\n"; - print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n"; - print "\t-q\tbe really quiet (no progress output at all)\n"; - print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n"); - print "\t\t Valid signature algorithms are:\n"; - print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n"; - print "\t-t\tinclude plain text listing of certificates\n"; - print "\t-u\tunlink (remove) certdata.txt after processing\n"; - print "\t-v\tbe verbose and print out processed CAs\n"; - print "\t-w \twrap base64 output lines after chars (default: ${opt_w})\n"; - exit; -} - -sub VERSION_MESSAGE() { - print "${0} version ${version} running Perl ${]} on ${^O}\n"; -} - -warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); -HELP_MESSAGE() if ($opt_h); - -sub report($@) { - my $output = shift; - - print STDERR $output . "\n" unless $opt_q; -} - -sub is_in_list($@) { - my $target = shift; - - return defined(List::Util::first { $target eq $_ } @_); -} - -# Parses $param_string as a case insensitive comma separated list with optional whitespace -# validates that only allowed parameters are supplied -sub parse_csv_param($$@) { - my $description = shift; - my $param_string = shift; - my @valid_values = @_; - - my @values = map { - s/^\s+//; # strip leading spaces - s/\s+$//; # strip trailing spaces - uc $_ # return the modified string as upper case - } split( ',', $param_string ); - - # Find all values which are not in the list of valid values or "ALL" - my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values; - - if ( scalar(@invalid) > 0 ) { - # Tell the user which parameters were invalid and print the standard help message which will exit - print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n"; - HELP_MESSAGE(); - } - - @values = @valid_values if ( is_in_list("ALL",@values) ); - - return @values; -} - -sub sha256 { - my $result; - if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) { - open(FILE, $_[0]) or die "Can't open '$_[0]': $!"; - binmode(FILE); - $result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest; - close(FILE); - } else { - # Use OpenSSL command if Perl Digest::SHA modules not available - $result = `"$openssl" dgst -r -sha256 "$_[0]"`; - $result =~ s/^([0-9a-f]{64}) .+/$1/is; - } - return $result; -} - - -sub oldhash { - my $hash = ""; - open(C, "<$_[0]") || return 0; - while() { - chomp; - if($_ =~ /^\#\# SHA256: (.*)/) { - $hash = $1; - last; - } - } - close(C); - return $hash; -} - -if ( $opt_p !~ m/:/ ) { - print "Error: Mozilla trust identifier list must include both purposes and levels\n"; - HELP_MESSAGE(); -} - -(my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p ); -my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); -my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); - -my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms ); - -sub should_output_cert(%) { - my %trust_purposes_by_level = @_; - - foreach my $level (@included_mozilla_trust_levels) { - # for each level we want to output, see if any of our desired purposes are included - return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); - } - - return 0; -} - -my $crt = $ARGV[0] || 'ca-bundle.crt'; -(my $txt = $url) =~ s@(.*/|\?.*)@@g; - -my $stdout = $crt eq '-'; -my $resp; -my $fetched; - -my $oldhash = oldhash($crt); - -report "SHA256 of old file: $oldhash"; - -if(!$opt_n) { - report "Downloading $txt ..."; - - # If we have an HTTPS URL then use curl - if($url =~ /^https:\/\//i) { - if($curl) { - if($curl =~ /^Protocols:.* https( |$)/m) { - report "Get certdata with curl!"; - my $proto = !$opt_k ? "--proto =https" : ""; - my $quiet = $opt_q ? "-s" : ""; - my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; - if(@out && $out[0] == 200) { - $fetched = 1; - report "Downloaded $txt"; - } - else { - report "Failed downloading via HTTPS with curl"; - if(-e $txt && !unlink($txt)) { - report "Failed to remove '$txt': $!"; - } - } - } - else { - report "curl lacks https support"; - } - } - else { - report "curl not found"; - } - } - - # If nothing was fetched then use LWP - if(!$fetched) { - if($url =~ /^https:\/\//i) { - report "Falling back to HTTP"; - $url =~ s/^https:\/\//http:\/\//i; - } - if(!$opt_k) { - report "URLs other than HTTPS are disabled by default, to enable use -k"; - exit 1; - } - report "Get certdata with LWP!"; - if(!defined(${LWP::UserAgent::VERSION})) { - report "LWP is not available (LWP::UserAgent not found)"; - exit 1; - } - my $ua = new LWP::UserAgent(agent => "$0/$version"); - $ua->env_proxy(); - $resp = $ua->mirror($url, $txt); - if($resp && $resp->code eq '304') { - report "Not modified"; - exit 0 if -e $crt && !$opt_f; - } - else { - $fetched = 1; - report "Downloaded $txt"; - } - if(!$resp || $resp->code !~ /^(?:200|304)$/) { - report "Unable to download latest data: " - . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed"); - exit 1 if -e $crt || ! -r $txt; - } - } -} - -my $filedate = $resp ? $resp->last_modified : (stat($txt))[9]; -my $datesrc = "as of"; -if(!$filedate) { - # mxr.mozilla.org gave us a time, hg.mozilla.org does not! - $filedate = time(); - $datesrc="downloaded on"; -} - -# get the hash from the download file -my $newhash= sha256($txt); - -if(!$opt_f && $oldhash eq $newhash) { - report "Downloaded file identical to previous run\'s source file. Exiting"; - exit; -} - -report "SHA256 of new file: $newhash"; - -my $currentdate = scalar gmtime($filedate); - -my $format = $opt_t ? "plain text and " : ""; -if( $stdout ) { - open(CRT, '> -') or die "Couldn't open STDOUT: $!\n"; -} else { - open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n"; -} -print CRT <) { - if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) { - print CRT; - print if ($opt_l); - while () { - print CRT; - print if ($opt_l); - last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/); - } - } - elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) { - push @precert, $_; - next; - } - elsif(/^#|^\s*$/) { - undef @precert; - next; - } - chomp; - - # this is a match for the start of a certificate - if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { - $start_of_cert = 1 - } - if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) { - $caname = $1; - } - my %trust_purposes_by_level; - if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) { - my $data; - while () { - last if (/^END/); - chomp; - my @octets = split(/\\/); - shift @octets; - for (@octets) { - $data .= chr(oct); - } - } - # scan forwards until the trust part - while () { - last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/); - chomp; - } - # now scan the trust part to determine how we should trust this cert - while () { - last if (/^#/); - if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) { - if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) { - report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2"; - } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) { - report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2"; - } else { - push @{$trust_purposes_by_level{$2}}, $1; - } - } - } - - if ( !should_output_cert(%trust_purposes_by_level) ) { - $skipnum ++; - } else { - my $encoded = MIME::Base64::encode_base64($data, ''); - $encoded =~ s/(.{1,${opt_w}})/$1\n/g; - my $pem = "-----BEGIN CERTIFICATE-----\n" - . $encoded - . "-----END CERTIFICATE-----\n"; - print CRT "\n$caname\n"; - print CRT @precert if($opt_m); - my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK)); - if ($opt_t) { - foreach my $key (keys %trust_purposes_by_level) { - my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}}); - $maxStringLength = List::Util::max( length($string), $maxStringLength ); - print CRT $string . "\n"; - } - } - print CRT ("=" x $maxStringLength . "\n"); - if (!$opt_t) { - print CRT $pem; - } else { - my $pipe = ""; - foreach my $hash (@included_signature_algorithms) { - $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM"; - if (!$stdout) { - $pipe .= " >> $crt.~"; - close(CRT) or die "Couldn't close $crt.~: $!"; - } - open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; - print TMP $pem; - close(TMP) or die "Couldn't close openssl pipe: $!"; - if (!$stdout) { - open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; - } - } - $pipe = "|$openssl x509 -text -inform PEM"; - if (!$stdout) { - $pipe .= " >> $crt.~"; - close(CRT) or die "Couldn't close $crt.~: $!"; - } - open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; - print TMP $pem; - close(TMP) or die "Couldn't close openssl pipe: $!"; - if (!$stdout) { - open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; - } - } - report "Parsing: $caname" if ($opt_v); - $certnum ++; - $start_of_cert = 0; - } - undef @precert; - } - -} -close(TXT) or die "Couldn't close $txt: $!\n"; -close(CRT) or die "Couldn't close $crt.~: $!\n"; -unless( $stdout ) { - if ($opt_b && -e $crt) { - my $bk = 1; - while (-e "$crt.~${bk}~") { - $bk++; - } - rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n"; - } elsif( -e $crt ) { - unlink( $crt ) or die "Failed to remove $crt: $!\n"; - } - rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n"; -} -if($opt_u && -e $txt && !unlink($txt)) { - report "Failed to remove $txt: $!\n"; -} -report "Done ($certnum CA certs processed, $skipnum skipped)."; diff --git a/build/premake/premake5/contrib/curl/lib/mk-ca-bundle.vbs b/build/premake/premake5/contrib/curl/lib/mk-ca-bundle.vbs deleted file mode 100644 index da7a577ea7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/mk-ca-bundle.vbs +++ /dev/null @@ -1,431 +0,0 @@ -'*************************************************************************** -'* _ _ ____ _ -'* Project ___| | | | _ \| | -'* / __| | | | |_) | | -'* | (__| |_| | _ <| |___ -'* \___|\___/|_| \_\_____| -'* -'* Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. -'* -'* This software is licensed as described in the file COPYING, which -'* you should have received as part of this distribution. The terms -'* are also available at https://curl.haxx.se/docs/copyright.html. -'* -'* You may opt to use, copy, modify, merge, publish, distribute and/or sell -'* copies of the Software, and permit persons to whom the Software is -'* furnished to do so, under the terms of the COPYING file. -'* -'* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -'* KIND, either express or implied. -'* -'*************************************************************************** -'* Script to fetch certdata.txt from Mozilla.org site and create a -'* ca-bundle.crt for use with OpenSSL / libcurl / libcurl bindings -'* Requires WinHttp.WinHttpRequest.5.1 and ADODB.Stream which are part of -'* W2000 SP3 or later, WXP SP1 or later, W2003 Server SP1 or later. -'* Hacked by Guenter Knauf -'*************************************************************************** -Option Explicit -Const myVersion = "0.4.0" - -Const myUrl = "https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt" - -Const myOpenSSL = "openssl.exe" -Dim myUseOpenSSL -myUseOpenSSL = TRUE ' Flag: TRUE to use OpenSSL. If TRUE and is not - ' found then a warning is shown before continuing. - -Const myCdSavF = TRUE ' Flag: save downloaded data to file certdata.txt -Const myCaBakF = TRUE ' Flag: backup existing ca-bundle certificate -Const myAskLiF = TRUE ' Flag: display certdata.txt license agreement -Const myWrapLe = 76 ' Default length of base64 output lines - -' cert info code doesn't work properly with any recent openssl, leave disabled. -' Also: we want our certificate output by default to be as similar as possible -' to mk-ca-bundle.pl and setting this TRUE changes the base64 width to -' OpenSSL's built-in default width, which is not the same as mk-ca-bundle.pl. -Const myAskTiF = FALSE ' Flag: ask to include certificate text info - -' -'******************* Nothing to configure below! ******************* -' -Const adTypeBinary = 1 -Const adTypeText = 2 -Const adSaveCreateNotExist = 1 -Const adSaveCreateOverWrite = 2 -Dim objShell, objNetwork, objFSO, objHttp -Dim myBase, mySelf, myStream, myTmpFh, myCdData, myCdFile -Dim myCaFile, myTmpName, myBakNum, myOptTxt, i -Set objNetwork = WScript.CreateObject("WScript.Network") -Set objShell = WScript.CreateObject("WScript.Shell") -Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") -Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest.5.1") -If objHttp Is Nothing Then Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest") -myBase = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\")) -mySelf = Left(WScript.ScriptName, InstrRev(WScript.ScriptName, ".") - 1) & " " & myVersion - -myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1) -myCaFile = "ca-bundle.crt" -myTmpName = InputBox("It will take a minute to download and parse the " & _ - "certificate data." & _ - vbLf & vbLf & _ - "Please enter the output filename:", mySelf, myCaFile) -If (myTmpName = "") Then - WScript.Quit 1 -End If -myCaFile = myTmpName -If (myCdFile = "") Then - MsgBox("URL does not contain filename!"), vbCritical, mySelf - WScript.Quit 1 -End If - -' Don't use OpenSSL if it's not present. -If (myUseOpenSSL = TRUE) Then - Dim errnum - - On Error Resume Next - Call objShell.Run("""" & myOpenSSL & """ version", 0, TRUE) - errnum = Err.Number - On Error GoTo 0 - - If Not (errnum = 0) Then - myUseOpenSSL = FALSE - MsgBox("OpenSSL was not found so the certificate bundle will not " & _ - "include the SHA256 hash of the raw certificate data file " & _ - "that was used to generate the certificates in the bundle. " & _ - vbLf & vbLf & _ - "This does not have any effect on the certificate output, " & _ - "so this script will continue." & _ - vbLf & vbLf & _ - "If you want to set a custom location for OpenSSL or disable " & _ - "this message then edit the variables at the start of the " & _ - "script."), vbInformation, mySelf - End If -End If - -If (myAskTiF = TRUE) And (myUseOpenSSL = TRUE) Then - If (6 = objShell.PopUp("Do you want to include text information about " & _ - "each certificate?" & vbLf & _ - "(Requires OpenSSL.exe in the current directory " & _ - "or search path)",, _ - mySelf, vbQuestion + vbYesNo + vbDefaultButton2)) Then - myOptTxt = TRUE - Else - myOptTxt = FALSE - End If -End If - -' Uncomment the line below to ignore SSL invalid cert errors -' objHttp.Option(4) = 256 + 512 + 4096 + 8192 -objHttp.SetTimeouts 0, 5000, 10000, 10000 -objHttp.Open "GET", myUrl, FALSE -objHttp.setRequestHeader "User-Agent", WScript.ScriptName & "/" & myVersion -objHttp.Send "" -If Not (objHttp.Status = 200) Then - MsgBox("Failed to download '" & myCdFile & "': " & objHttp.Status & " - " & objHttp.StatusText), vbCritical, mySelf - WScript.Quit 1 -End If -' Write received data to file if enabled -If (myCdSavF = TRUE) Then - Call SaveBinaryData(myCdFile, objHttp.ResponseBody) -End If -' Convert data from ResponseBody instead of using ResponseText because of UTF-8 -myCdData = ConvertBinaryToUTF8(objHttp.ResponseBody) -Set objHttp = Nothing -' Backup exitsing ca-bundle certificate file -If (myCaBakF = TRUE) Then - If objFSO.FileExists(myCaFile) Then - Dim myBakFile, b - b = 1 - myBakFile = myCaFile & ".~" & b & "~" - While objFSO.FileExists(myBakFile) - b = b + 1 - myBakFile = myCaFile & ".~" & b & "~" - Wend - Set myTmpFh = objFSO.GetFile(myCaFile) - myTmpFh.Move myBakFile - End If -End If - -' Process the received data -Dim myLines, myPattern, myInsideCert, myInsideLicense, myLicenseText, myNumCerts, myNumSkipped -Dim myLabel, myOctets, myData, myPem, myRev, myUntrusted, j -myNumSkipped = 0 -myNumCerts = 0 -myData = "" -myLines = Split(myCdData, vbLf, -1) -Set myStream = CreateObject("ADODB.Stream") -myStream.Open -myStream.Type = adTypeText -myStream.Charset = "utf-8" -myStream.WriteText "##" & vbLf & _ - "## Bundle of CA Root Certificates" & vbLf & _ - "##" & vbLf & _ - "## Certificate data from Mozilla as of: " & _ - ConvertDateToString(LocalDateToUTC(Now)) & " GMT" & vbLf & _ - "##" & vbLf & _ - "## This is a bundle of X.509 certificates of public Certificate Authorities" & vbLf & _ - "## (CA). These were automatically extracted from Mozilla's root certificates" & vbLf & _ - "## file (certdata.txt). This file can be found in the mozilla source tree:" & vbLf & _ - "## " & myUrl & vbLf & _ - "##" & vbLf & _ - "## It contains the certificates in PEM format and therefore" & vbLf & _ - "## can be directly used with curl / libcurl / php_curl, or with" & vbLf & _ - "## an Apache+mod_ssl webserver for SSL client authentication." & vbLf & _ - "## Just configure this file as the SSLCACertificateFile." & vbLf & _ - "##" & vbLf & _ - "## Conversion done with mk-ca-bundle.vbs version " & myVersion & "." & vbLf -If (myCdSavF = TRUE) And (myUseOpenSSL = TRUE) Then - myStream.WriteText "## SHA256: " & FileSHA256(myCdFile) & vbLf -End If -myStream.WriteText "##" & vbLf & vbLf - -myStream.WriteText vbLf -For i = 0 To UBound(myLines) - If InstrRev(myLines(i), "CKA_LABEL ") Then - myPattern = "^CKA_LABEL\s+[A-Z0-9]+\s+""(.+?)""" - myLabel = RegExprFirst(myPattern, myLines(i)) - End If - If (myInsideCert = TRUE) Then - If InstrRev(myLines(i), "END") Then - myInsideCert = FALSE - While (i < UBound(myLines)) And Not (myLines(i) = "#") - i = i + 1 - If InstrRev(myLines(i), "CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR") Then - myUntrusted = FALSE - End If - Wend - If (myUntrusted = TRUE) Then - myNumSkipped = myNumSkipped + 1 - Else - myStream.WriteText myLabel & vbLf - myStream.WriteText String(Len(myLabel), "=") & vbLf - myPem = "-----BEGIN CERTIFICATE-----" & vbLf & _ - Base64Encode(myData) & vbLf & _ - "-----END CERTIFICATE-----" & vbLf - If (myOptTxt = FALSE) Then - myStream.WriteText myPem & vbLf - Else - Dim myCmd, myRval, myTmpIn, myTmpOut - myTmpIn = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName - myTmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName - Set myTmpFh = objFSO.OpenTextFile(myTmpIn, 2, TRUE) - myTmpFh.Write myPem - myTmpFh.Close - myCmd = """" & myOpenSSL & """ x509 -md5 -fingerprint -text " & _ - "-inform PEM -in " & myTmpIn & " -out " & myTmpOut - myRval = objShell.Run (myCmd, 0, TRUE) - objFSO.DeleteFile myTmpIn, TRUE - If Not (myRval = 0) Then - MsgBox("Failed to process PEM cert with OpenSSL commandline!"), vbCritical, mySelf - objFSO.DeleteFile myTmpOut, TRUE - WScript.Quit 3 - End If - Set myTmpFh = objFSO.OpenTextFile(myTmpOut, 1) - myStream.WriteText myTmpFh.ReadAll & vbLf - myTmpFh.Close - objFSO.DeleteFile myTmpOut, TRUE - End If - myNumCerts = myNumCerts + 1 - End If - Else - myOctets = Split(myLines(i), "\") - For j = 1 To UBound(myOctets) - myData = myData & Chr(CByte("&o" & myOctets(j))) - Next - End If - End If - If InstrRev(myLines(i), "CVS_ID ") Then - myPattern = "^CVS_ID\s+""(.+?)""" - myRev = RegExprFirst(myPattern, myLines(i)) - myStream.WriteText "# " & myRev & vbLf & vbLf - End If - If InstrRev(myLines(i), "CKA_VALUE MULTILINE_OCTAL") Then - myInsideCert = TRUE - myUntrusted = TRUE - myData = "" - End If - If InstrRev(myLines(i), "***** BEGIN LICENSE BLOCK *****") Then - myInsideLicense = TRUE - End If - If (myInsideLicense = TRUE) Then - myStream.WriteText myLines(i) & vbLf - myLicenseText = myLicenseText & Mid(myLines(i), 2) & vbLf - End If - If InstrRev(myLines(i), "***** END LICENSE BLOCK *****") Then - myInsideLicense = FALSE - If (myAskLiF = TRUE) Then - If Not (6 = objShell.PopUp(myLicenseText & vbLf & _ - "Do you agree to the license shown above (required to proceed) ?",, _ - mySelf, vbQuestion + vbYesNo + vbDefaultButton1)) Then - myStream.Close - objFSO.DeleteFile myCaFile, TRUE - WScript.Quit 2 - End If - End If - End If -Next - -' To stop the UTF-8 BOM from being written the stream has to be copied and -' then saved as binary. -Dim myCopy -Set myCopy = CreateObject("ADODB.Stream") -myCopy.Type = adTypeBinary -myCopy.Open -myStream.Position = 3 ' Skip UTF-8 BOM -myStream.CopyTo myCopy -myCopy.SaveToFile myCaFile, adSaveCreateOverWrite -myCopy.Close -myStream.Close -Set myCopy = Nothing -Set myStream = Nothing - -' Done -objShell.PopUp "Done (" & myNumCerts & " CA certs processed, " & myNumSkipped & _ - " untrusted skipped).", 20, mySelf, vbInformation -WScript.Quit 0 - -Function ConvertBinaryToUTF8(arrBytes) - Dim objStream - Set objStream = CreateObject("ADODB.Stream") - objStream.Open - objStream.Type = adTypeBinary - objStream.Write arrBytes - objStream.Position = 0 - objStream.Type = adTypeText - objStream.Charset = "utf-8" - ConvertBinaryToUTF8 = objStream.ReadText - Set objStream = Nothing -End Function - -Function SaveBinaryData(filename, data) - Dim objStream - Set objStream = CreateObject("ADODB.Stream") - objStream.Type = adTypeBinary - objStream.Open - objStream.Write data - objStream.SaveToFile filename, adSaveCreateOverWrite - objStream.Close - Set objStream = Nothing -End Function - -Function RegExprFirst(SearchPattern, TheString) - Dim objRegExp, Matches ' create variables. - Set objRegExp = New RegExp ' create a regular expression. - objRegExp.Pattern = SearchPattern ' sets the search pattern. - objRegExp.IgnoreCase = TRUE ' set to ignores case. - objRegExp.Global = TRUE ' set to gloabal search. - Set Matches = objRegExp.Execute(TheString) ' do the search. - If (Matches.Count) Then - RegExprFirst = Matches(0).SubMatches(0) ' return first match. - Else - RegExprFirst = "" - End If - Set objRegExp = Nothing -End Function - -Function Base64Encode(inData) - Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" - Dim cOut, sOut, lWrap, I - lWrap = Int(myWrapLe * 3 / 4) - - 'For each group of 3 bytes - For I = 1 To Len(inData) Step 3 - Dim nGroup, pOut, sGroup - - 'Create one long from this 3 bytes. - nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _ - &H100 * MyASC(Mid(inData, I + 1, 1)) + _ - MyASC(Mid(inData, I + 2, 1)) - - 'Oct splits the long To 8 groups with 3 bits - nGroup = Oct(nGroup) - - 'Add leading zeros - nGroup = String(8 - Len(nGroup), "0") & nGroup - - 'Convert To base64 - pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) & _ - Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) & _ - Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) & _ - Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1) - - 'Add the part To OutPut string - sOut = sOut + pOut - - 'Add a new line For Each myWrapLe chars In dest - If (I < Len(inData) - 2) Then - If (I + 2) Mod lWrap = 0 Then sOut = sOut & vbLf - End If - Next - Select Case Len(inData) Mod 3 - Case 1: '8 bit final - sOut = Left(sOut, Len(sOut) - 2) & "==" - Case 2: '16 bit final - sOut = Left(sOut, Len(sOut) - 1) & "=" - End Select - Base64Encode = sOut -End Function - -Function MyASC(OneChar) - If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar) -End Function - -' Return the date in the same format as perl to match mk-ca-bundle.pl output: -' Wed Sep 7 03:12:05 2016 -Function ConvertDateToString(input) - Dim output - output = WeekDayName(WeekDay(input), TRUE) & " " & _ - MonthName(Month(input), TRUE) & " " - If (Len(Day(input)) = 1) Then - output = output & " " - End If - output = output & _ - Day(input) & " " & _ - FormatDateTime(input, vbShortTime) & ":" - If (Len(Second(input)) = 1) Then - output = output & "0" - End If - output = output & _ - Second(input) & " " & _ - Year(input) - ConvertDateToString = output -End Function - -' Convert local Date to UTC. Microsoft says: -' Use Win32_ComputerSystem CurrentTimeZone property, because it automatically -' adjusts the Time Zone bias for daylight saving time; Win32_Time Zone Bias -' property does not. -' https://msdn.microsoft.com/en-us/library/windows/desktop/ms696015.aspx -Function LocalDateToUTC(localdate) - Dim item, offset - For Each item In GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem") - offset = item.CurrentTimeZone ' the offset in minutes - Next - If (offset < 0) Then - LocalDateToUTC = DateAdd("n", ABS(offset), localdate) - Else - LocalDateToUTC = DateAdd("n", -ABS(offset), localdate) - End If - 'objShell.PopUp LocalDateToUTC -End Function - -Function FileSHA256(filename) - Dim cmd, rval, tmpOut, tmpFh - if (myUseOpenSSL = TRUE) Then - tmpOut = objFSO.GetSpecialFolder(2).Path & "\" & objFSO.GetTempName - cmd = """" & myOpenSSL & """ dgst -r -sha256 -out """ & tmpOut & """ """ & filename & """" - rval = objShell.Run(cmd, 0, TRUE) - If Not (rval = 0) Then - MsgBox("Failed to get sha256 of """ & filename & """ with OpenSSL commandline!"), vbCritical, mySelf - objFSO.DeleteFile tmpOut, TRUE - WScript.Quit 3 - End If - Set tmpFh = objFSO.OpenTextFile(tmpOut, 1) - FileSHA256 = RegExprFirst("^([0-9a-f]{64}) .+", tmpFh.ReadAll) - tmpFh.Close - objFSO.DeleteFile tmpOut, TRUE - Else - FileSHA256 = "" - End If -End Function diff --git a/build/premake/premake5/contrib/curl/lib/mprintf.c b/build/premake/premake5/contrib/curl/lib/mprintf.c deleted file mode 100644 index e4270abe83..0000000000 --- a/build/premake/premake5/contrib/curl/lib/mprintf.c +++ /dev/null @@ -1,1185 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * - * Purpose: - * A merge of Bjorn Reese's format() function and Daniel's dsprintf() - * 1.0. A full blooded printf() clone with full support for $ - * everywhere (parameters, widths and precisions) including variabled - * sized parameters (like doubles, long longs, long doubles and even - * void * in 64-bit architectures). - * - * Current restrictions: - * - Max 128 parameters - * - No 'long double' support. - * - * If you ever want truly portable and good *printf() clones, the project that - * took on from here is named 'Trio' and you find more details on the trio web - * page at https://daniel.haxx.se/projects/trio/ - */ - -#include "curl_setup.h" -#include - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -#ifndef SIZEOF_LONG_DOUBLE -#define SIZEOF_LONG_DOUBLE 0 -#endif - -/* - * If SIZEOF_SIZE_T has not been defined, default to the size of long. - */ - -#ifndef SIZEOF_SIZE_T -# define SIZEOF_SIZE_T CURL_SIZEOF_LONG -#endif - -#ifdef HAVE_LONGLONG -# define LONG_LONG_TYPE long long -# define HAVE_LONG_LONG_TYPE -#else -# if defined(_MSC_VER) && (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define LONG_LONG_TYPE __int64 -# define HAVE_LONG_LONG_TYPE -# else -# undef LONG_LONG_TYPE -# undef HAVE_LONG_LONG_TYPE -# endif -#endif - -/* - * Non-ANSI integer extensions - */ - -#if (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)) || \ - (defined(__WATCOMC__) && defined(__386__)) || \ - (defined(__POCC__) && defined(_MSC_VER)) || \ - (defined(_WIN32_WCE)) || \ - (defined(__MINGW32__)) || \ - (defined(_MSC_VER) && (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)) -# define MP_HAVE_INT_EXTENSIONS -#endif - -/* - * Max integer data types that mprintf.c is capable - */ - -#ifdef HAVE_LONG_LONG_TYPE -# define mp_intmax_t LONG_LONG_TYPE -# define mp_uintmax_t unsigned LONG_LONG_TYPE -#else -# define mp_intmax_t long -# define mp_uintmax_t unsigned long -#endif - -#define BUFFSIZE 326 /* buffer for long-to-str and float-to-str calcs, should - fit negative DBL_MAX (317 letters) */ -#define MAX_PARAMETERS 128 /* lame static limit */ - -#ifdef __AMIGA__ -# undef FORMAT_INT -#endif - -/* Lower-case digits. */ -static const char lower_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; - -/* Upper-case digits. */ -static const char upper_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - -#define OUTCHAR(x) \ - do{ \ - if(stream((unsigned char)(x), (FILE *)data) != -1) \ - done++; \ - else \ - return done; /* return immediately on failure */ \ - } WHILE_FALSE - -/* Data type to read from the arglist */ -typedef enum { - FORMAT_UNKNOWN = 0, - FORMAT_STRING, - FORMAT_PTR, - FORMAT_INT, - FORMAT_INTPTR, - FORMAT_LONG, - FORMAT_LONGLONG, - FORMAT_DOUBLE, - FORMAT_LONGDOUBLE, - FORMAT_WIDTH /* For internal use */ -} FormatType; - -/* conversion and display flags */ -enum { - FLAGS_NEW = 0, - FLAGS_SPACE = 1<<0, - FLAGS_SHOWSIGN = 1<<1, - FLAGS_LEFT = 1<<2, - FLAGS_ALT = 1<<3, - FLAGS_SHORT = 1<<4, - FLAGS_LONG = 1<<5, - FLAGS_LONGLONG = 1<<6, - FLAGS_LONGDOUBLE = 1<<7, - FLAGS_PAD_NIL = 1<<8, - FLAGS_UNSIGNED = 1<<9, - FLAGS_OCTAL = 1<<10, - FLAGS_HEX = 1<<11, - FLAGS_UPPER = 1<<12, - FLAGS_WIDTH = 1<<13, /* '*' or '*$' used */ - FLAGS_WIDTHPARAM = 1<<14, /* width PARAMETER was specified */ - FLAGS_PREC = 1<<15, /* precision was specified */ - FLAGS_PRECPARAM = 1<<16, /* precision PARAMETER was specified */ - FLAGS_CHAR = 1<<17, /* %c story */ - FLAGS_FLOATE = 1<<18, /* %e or %E */ - FLAGS_FLOATG = 1<<19 /* %g or %G */ -}; - -typedef struct { - FormatType type; - int flags; - long width; /* width OR width parameter number */ - long precision; /* precision OR precision parameter number */ - union { - char *str; - void *ptr; - union { - mp_intmax_t as_signed; - mp_uintmax_t as_unsigned; - } num; - double dnum; - } data; -} va_stack_t; - -struct nsprintf { - char *buffer; - size_t length; - size_t max; -}; - -struct asprintf { - char *buffer; /* allocated buffer */ - size_t len; /* length of string */ - size_t alloc; /* length of alloc */ - int fail; /* (!= 0) if an alloc has failed and thus - the output is not the complete data */ -}; - -static long dprintf_DollarString(char *input, char **end) -{ - int number=0; - while(ISDIGIT(*input)) { - number *= 10; - number += *input-'0'; - input++; - } - if(number && ('$'==*input++)) { - *end = input; - return number; - } - return 0; -} - -static bool dprintf_IsQualifierNoDollar(const char *fmt) -{ -#if defined(MP_HAVE_INT_EXTENSIONS) - if(!strncmp(fmt, "I32", 3) || !strncmp(fmt, "I64", 3)) { - return TRUE; - } -#endif - - switch(*fmt) { - case '-': case '+': case ' ': case '#': case '.': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case 'h': case 'l': case 'L': case 'z': case 'q': - case '*': case 'O': -#if defined(MP_HAVE_INT_EXTENSIONS) - case 'I': -#endif - return TRUE; - - default: - return FALSE; - } -} - -/****************************************************************** - * - * Pass 1: - * Create an index with the type of each parameter entry and its - * value (may vary in size) - * - * Returns zero on success. - * - ******************************************************************/ - -static int dprintf_Pass1(const char *format, va_stack_t *vto, char **endpos, - va_list arglist) -{ - char *fmt = (char *)format; - int param_num = 0; - long this_param; - long width; - long precision; - int flags; - long max_param=0; - long i; - - while(*fmt) { - if(*fmt++ == '%') { - if(*fmt == '%') { - fmt++; - continue; /* while */ - } - - flags = FLAGS_NEW; - - /* Handle the positional case (N$) */ - - param_num++; - - this_param = dprintf_DollarString(fmt, &fmt); - if(0 == this_param) - /* we got no positional, get the next counter */ - this_param = param_num; - - if(this_param > max_param) - max_param = this_param; - - /* - * The parameter with number 'i' should be used. Next, we need - * to get SIZE and TYPE of the parameter. Add the information - * to our array. - */ - - width = 0; - precision = 0; - - /* Handle the flags */ - - while(dprintf_IsQualifierNoDollar(fmt)) { -#if defined(MP_HAVE_INT_EXTENSIONS) - if(!strncmp(fmt, "I32", 3)) { - flags |= FLAGS_LONG; - fmt += 3; - } - else if(!strncmp(fmt, "I64", 3)) { - flags |= FLAGS_LONGLONG; - fmt += 3; - } - else -#endif - - switch(*fmt++) { - case ' ': - flags |= FLAGS_SPACE; - break; - case '+': - flags |= FLAGS_SHOWSIGN; - break; - case '-': - flags |= FLAGS_LEFT; - flags &= ~FLAGS_PAD_NIL; - break; - case '#': - flags |= FLAGS_ALT; - break; - case '.': - if('*' == *fmt) { - /* The precision is picked from a specified parameter */ - - flags |= FLAGS_PRECPARAM; - fmt++; - param_num++; - - i = dprintf_DollarString(fmt, &fmt); - if(i) - precision = i; - else - precision = param_num; - - if(precision > max_param) - max_param = precision; - } - else { - flags |= FLAGS_PREC; - precision = strtol(fmt, &fmt, 10); - } - break; - case 'h': - flags |= FLAGS_SHORT; - break; -#if defined(MP_HAVE_INT_EXTENSIONS) - case 'I': -#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) - flags |= FLAGS_LONGLONG; -#else - flags |= FLAGS_LONG; -#endif - break; -#endif - case 'l': - if(flags & FLAGS_LONG) - flags |= FLAGS_LONGLONG; - else - flags |= FLAGS_LONG; - break; - case 'L': - flags |= FLAGS_LONGDOUBLE; - break; - case 'q': - flags |= FLAGS_LONGLONG; - break; - case 'z': - /* the code below generates a warning if -Wunreachable-code is - used */ -#if (SIZEOF_SIZE_T > CURL_SIZEOF_LONG) - flags |= FLAGS_LONGLONG; -#else - flags |= FLAGS_LONG; -#endif - break; - case 'O': -#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) - flags |= FLAGS_LONGLONG; -#else - flags |= FLAGS_LONG; -#endif - break; - case '0': - if(!(flags & FLAGS_LEFT)) - flags |= FLAGS_PAD_NIL; - /* FALLTHROUGH */ - case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - flags |= FLAGS_WIDTH; - width = strtol(fmt-1, &fmt, 10); - break; - case '*': /* Special case */ - flags |= FLAGS_WIDTHPARAM; - param_num++; - - i = dprintf_DollarString(fmt, &fmt); - if(i) - width = i; - else - width = param_num; - if(width > max_param) - max_param=width; - break; - default: - break; - } - } /* switch */ - - /* Handle the specifier */ - - i = this_param - 1; - - if((i < 0) || (i >= MAX_PARAMETERS)) - /* out of allowed range */ - return 1; - - switch (*fmt) { - case 'S': - flags |= FLAGS_ALT; - /* FALLTHROUGH */ - case 's': - vto[i].type = FORMAT_STRING; - break; - case 'n': - vto[i].type = FORMAT_INTPTR; - break; - case 'p': - vto[i].type = FORMAT_PTR; - break; - case 'd': case 'i': - vto[i].type = FORMAT_INT; - break; - case 'u': - vto[i].type = FORMAT_INT; - flags |= FLAGS_UNSIGNED; - break; - case 'o': - vto[i].type = FORMAT_INT; - flags |= FLAGS_OCTAL; - break; - case 'x': - vto[i].type = FORMAT_INT; - flags |= FLAGS_HEX|FLAGS_UNSIGNED; - break; - case 'X': - vto[i].type = FORMAT_INT; - flags |= FLAGS_HEX|FLAGS_UPPER|FLAGS_UNSIGNED; - break; - case 'c': - vto[i].type = FORMAT_INT; - flags |= FLAGS_CHAR; - break; - case 'f': - vto[i].type = FORMAT_DOUBLE; - break; - case 'e': - vto[i].type = FORMAT_DOUBLE; - flags |= FLAGS_FLOATE; - break; - case 'E': - vto[i].type = FORMAT_DOUBLE; - flags |= FLAGS_FLOATE|FLAGS_UPPER; - break; - case 'g': - vto[i].type = FORMAT_DOUBLE; - flags |= FLAGS_FLOATG; - break; - case 'G': - vto[i].type = FORMAT_DOUBLE; - flags |= FLAGS_FLOATG|FLAGS_UPPER; - break; - default: - vto[i].type = FORMAT_UNKNOWN; - break; - } /* switch */ - - vto[i].flags = flags; - vto[i].width = width; - vto[i].precision = precision; - - if(flags & FLAGS_WIDTHPARAM) { - /* we have the width specified from a parameter, so we make that - parameter's info setup properly */ - long k = width - 1; - vto[i].width = k; - vto[k].type = FORMAT_WIDTH; - vto[k].flags = FLAGS_NEW; - /* can't use width or precision of width! */ - vto[k].width = 0; - vto[k].precision = 0; - } - if(flags & FLAGS_PRECPARAM) { - /* we have the precision specified from a parameter, so we make that - parameter's info setup properly */ - long k = precision - 1; - vto[i].precision = k; - vto[k].type = FORMAT_WIDTH; - vto[k].flags = FLAGS_NEW; - /* can't use width or precision of width! */ - vto[k].width = 0; - vto[k].precision = 0; - } - *endpos++ = fmt + 1; /* end of this sequence */ - } - } - - /* Read the arg list parameters into our data list */ - for(i=0; i$ sequence */ - param=dprintf_DollarString(f, &f); - - if(!param) - param = param_num; - else - --param; - - param_num++; /* increase this always to allow "%2$s %1$s %s" and then the - third %s will pick the 3rd argument */ - - p = &vto[param]; - - /* pick up the specified width */ - if(p->flags & FLAGS_WIDTHPARAM) { - width = (long)vto[p->width].data.num.as_signed; - param_num++; /* since the width is extracted from a parameter, we - must skip that to get to the next one properly */ - if(width < 0) { - /* "A negative field width is taken as a '-' flag followed by a - positive field width." */ - width = -width; - p->flags |= FLAGS_LEFT; - p->flags &= ~FLAGS_PAD_NIL; - } - } - else - width = p->width; - - /* pick up the specified precision */ - if(p->flags & FLAGS_PRECPARAM) { - prec = (long)vto[p->precision].data.num.as_signed; - param_num++; /* since the precision is extracted from a parameter, we - must skip that to get to the next one properly */ - if(prec < 0) - /* "A negative precision is taken as if the precision were - omitted." */ - prec = -1; - } - else if(p->flags & FLAGS_PREC) - prec = p->precision; - else - prec = -1; - - is_alt = (p->flags & FLAGS_ALT) ? 1 : 0; - - switch(p->type) { - case FORMAT_INT: - num = p->data.num.as_unsigned; - if(p->flags & FLAGS_CHAR) { - /* Character. */ - if(!(p->flags & FLAGS_LEFT)) - while(--width > 0) - OUTCHAR(' '); - OUTCHAR((char) num); - if(p->flags & FLAGS_LEFT) - while(--width > 0) - OUTCHAR(' '); - break; - } - if(p->flags & FLAGS_OCTAL) { - /* Octal unsigned integer. */ - base = 8; - goto unsigned_number; - } - else if(p->flags & FLAGS_HEX) { - /* Hexadecimal unsigned integer. */ - - digits = (p->flags & FLAGS_UPPER)? upper_digits : lower_digits; - base = 16; - goto unsigned_number; - } - else if(p->flags & FLAGS_UNSIGNED) { - /* Decimal unsigned integer. */ - base = 10; - goto unsigned_number; - } - - /* Decimal integer. */ - base = 10; - - is_neg = (p->data.num.as_signed < (mp_intmax_t)0) ? 1 : 0; - if(is_neg) { - /* signed_num might fail to hold absolute negative minimum by 1 */ - signed_num = p->data.num.as_signed + (mp_intmax_t)1; - signed_num = -signed_num; - num = (mp_uintmax_t)signed_num; - num += (mp_uintmax_t)1; - } - - goto number; - - unsigned_number: - /* Unsigned number of base BASE. */ - is_neg = 0; - - number: - /* Number of base BASE. */ - - /* Supply a default precision if none was given. */ - if(prec == -1) - prec = 1; - - /* Put the number in WORK. */ - w = workend; - while(num > 0) { - *w-- = digits[num % base]; - num /= base; - } - width -= (long)(workend - w); - prec -= (long)(workend - w); - - if(is_alt && base == 8 && prec <= 0) { - *w-- = '0'; - --width; - } - - if(prec > 0) { - width -= prec; - while(prec-- > 0) - *w-- = '0'; - } - - if(is_alt && base == 16) - width -= 2; - - if(is_neg || (p->flags & FLAGS_SHOWSIGN) || (p->flags & FLAGS_SPACE)) - --width; - - if(!(p->flags & FLAGS_LEFT) && !(p->flags & FLAGS_PAD_NIL)) - while(width-- > 0) - OUTCHAR(' '); - - if(is_neg) - OUTCHAR('-'); - else if(p->flags & FLAGS_SHOWSIGN) - OUTCHAR('+'); - else if(p->flags & FLAGS_SPACE) - OUTCHAR(' '); - - if(is_alt && base == 16) { - OUTCHAR('0'); - if(p->flags & FLAGS_UPPER) - OUTCHAR('X'); - else - OUTCHAR('x'); - } - - if(!(p->flags & FLAGS_LEFT) && (p->flags & FLAGS_PAD_NIL)) - while(width-- > 0) - OUTCHAR('0'); - - /* Write the number. */ - while(++w <= workend) { - OUTCHAR(*w); - } - - if(p->flags & FLAGS_LEFT) - while(width-- > 0) - OUTCHAR(' '); - break; - - case FORMAT_STRING: - /* String. */ - { - static const char null[] = "(nil)"; - const char *str; - size_t len; - - str = (char *) p->data.str; - if(str == NULL) { - /* Write null[] if there's space. */ - if(prec == -1 || prec >= (long) sizeof(null) - 1) { - str = null; - len = sizeof(null) - 1; - /* Disable quotes around (nil) */ - p->flags &= (~FLAGS_ALT); - } - else { - str = ""; - len = 0; - } - } - else if(prec != -1) - len = (size_t)prec; - else - len = strlen(str); - - width -= (len > LONG_MAX) ? LONG_MAX : (long)len; - - if(p->flags & FLAGS_ALT) - OUTCHAR('"'); - - if(!(p->flags&FLAGS_LEFT)) - while(width-- > 0) - OUTCHAR(' '); - - while((len-- > 0) && *str) - OUTCHAR(*str++); - if(p->flags&FLAGS_LEFT) - while(width-- > 0) - OUTCHAR(' '); - - if(p->flags & FLAGS_ALT) - OUTCHAR('"'); - } - break; - - case FORMAT_PTR: - /* Generic pointer. */ - { - void *ptr; - ptr = (void *) p->data.ptr; - if(ptr != NULL) { - /* If the pointer is not NULL, write it as a %#x spec. */ - base = 16; - digits = (p->flags & FLAGS_UPPER)? upper_digits : lower_digits; - is_alt = 1; - num = (size_t) ptr; - is_neg = 0; - goto number; - } - else { - /* Write "(nil)" for a nil pointer. */ - static const char strnil[] = "(nil)"; - const char *point; - - width -= (long)(sizeof(strnil) - 1); - if(p->flags & FLAGS_LEFT) - while(width-- > 0) - OUTCHAR(' '); - for(point = strnil; *point != '\0'; ++point) - OUTCHAR(*point); - if(! (p->flags & FLAGS_LEFT)) - while(width-- > 0) - OUTCHAR(' '); - } - } - break; - - case FORMAT_DOUBLE: - { - char formatbuf[32]="%"; - char *fptr = &formatbuf[1]; - size_t left = sizeof(formatbuf)-strlen(formatbuf); - int len; - - width = -1; - if(p->flags & FLAGS_WIDTH) - width = p->width; - else if(p->flags & FLAGS_WIDTHPARAM) - width = (long)vto[p->width].data.num.as_signed; - - prec = -1; - if(p->flags & FLAGS_PREC) - prec = p->precision; - else if(p->flags & FLAGS_PRECPARAM) - prec = (long)vto[p->precision].data.num.as_signed; - - if(p->flags & FLAGS_LEFT) - *fptr++ = '-'; - if(p->flags & FLAGS_SHOWSIGN) - *fptr++ = '+'; - if(p->flags & FLAGS_SPACE) - *fptr++ = ' '; - if(p->flags & FLAGS_ALT) - *fptr++ = '#'; - - *fptr = 0; - - if(width >= 0) { - if(width >= (long)sizeof(work)) - width = sizeof(work)-1; - /* RECURSIVE USAGE */ - len = curl_msnprintf(fptr, left, "%ld", width); - fptr += len; - left -= len; - } - if(prec >= 0) { - /* for each digit in the integer part, we can have one less - precision */ - size_t maxprec = sizeof(work) - 2; - double val = p->data.dnum; - while(val >= 10.0) { - val /= 10; - maxprec--; - } - - if(prec > (long)maxprec) - prec = (long)maxprec-1; - /* RECURSIVE USAGE */ - len = curl_msnprintf(fptr, left, ".%ld", prec); - fptr += len; - } - if(p->flags & FLAGS_LONG) - *fptr++ = 'l'; - - if(p->flags & FLAGS_FLOATE) - *fptr++ = (char)((p->flags & FLAGS_UPPER) ? 'E':'e'); - else if(p->flags & FLAGS_FLOATG) - *fptr++ = (char)((p->flags & FLAGS_UPPER) ? 'G' : 'g'); - else - *fptr++ = 'f'; - - *fptr = 0; /* and a final zero termination */ - - /* NOTE NOTE NOTE!! Not all sprintf implementations return number of - output characters */ - (sprintf)(work, formatbuf, p->data.dnum); -#ifdef CURLDEBUG - assert(strlen(work) <= sizeof(work)); -#endif - for(fptr=work; *fptr; fptr++) - OUTCHAR(*fptr); - } - break; - - case FORMAT_INTPTR: - /* Answer the count of characters written. */ -#ifdef HAVE_LONG_LONG_TYPE - if(p->flags & FLAGS_LONGLONG) - *(LONG_LONG_TYPE *) p->data.ptr = (LONG_LONG_TYPE)done; - else -#endif - if(p->flags & FLAGS_LONG) - *(long *) p->data.ptr = (long)done; - else if(!(p->flags & FLAGS_SHORT)) - *(int *) p->data.ptr = (int)done; - else - *(short *) p->data.ptr = (short)done; - break; - - default: - break; - } - f = *end++; /* goto end of %-code */ - - } - return done; -} - -/* fputc() look-alike */ -static int addbyter(int output, FILE *data) -{ - struct nsprintf *infop=(struct nsprintf *)data; - unsigned char outc = (unsigned char)output; - - if(infop->length < infop->max) { - /* only do this if we haven't reached max length yet */ - infop->buffer[0] = outc; /* store */ - infop->buffer++; /* increase pointer */ - infop->length++; /* we are now one byte larger */ - return outc; /* fputc() returns like this on success */ - } - return -1; -} - -int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, - va_list ap_save) -{ - int retcode; - struct nsprintf info; - - info.buffer = buffer; - info.length = 0; - info.max = maxlength; - - retcode = dprintf_formatf(&info, addbyter, format, ap_save); - if((retcode != -1) && info.max) { - /* we terminate this with a zero byte */ - if(info.max == info.length) - /* we're at maximum, scrap the last letter */ - info.buffer[-1] = 0; - else - info.buffer[0] = 0; - } - return retcode; -} - -int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...) -{ - int retcode; - va_list ap_save; /* argument pointer */ - va_start(ap_save, format); - retcode = curl_mvsnprintf(buffer, maxlength, format, ap_save); - va_end(ap_save); - return retcode; -} - -/* fputc() look-alike */ -static int alloc_addbyter(int output, FILE *data) -{ - struct asprintf *infop=(struct asprintf *)data; - unsigned char outc = (unsigned char)output; - - if(!infop->buffer) { - infop->buffer = malloc(32); - if(!infop->buffer) { - infop->fail = 1; - return -1; /* fail */ - } - infop->alloc = 32; - infop->len =0; - } - else if(infop->len+1 >= infop->alloc) { - char *newptr = NULL; - size_t newsize = infop->alloc*2; - - /* detect wrap-around or other overflow problems */ - if(newsize > infop->alloc) - newptr = realloc(infop->buffer, newsize); - - if(!newptr) { - infop->fail = 1; - return -1; /* fail */ - } - infop->buffer = newptr; - infop->alloc = newsize; - } - - infop->buffer[ infop->len ] = outc; - - infop->len++; - - return outc; /* fputc() returns like this on success */ -} - -char *curl_maprintf(const char *format, ...) -{ - va_list ap_save; /* argument pointer */ - int retcode; - struct asprintf info; - - info.buffer = NULL; - info.len = 0; - info.alloc = 0; - info.fail = 0; - - va_start(ap_save, format); - retcode = dprintf_formatf(&info, alloc_addbyter, format, ap_save); - va_end(ap_save); - if((-1 == retcode) || info.fail) { - if(info.alloc) - free(info.buffer); - return NULL; - } - if(info.alloc) { - info.buffer[info.len] = 0; /* we terminate this with a zero byte */ - return info.buffer; - } - else - return strdup(""); -} - -char *curl_mvaprintf(const char *format, va_list ap_save) -{ - int retcode; - struct asprintf info; - - info.buffer = NULL; - info.len = 0; - info.alloc = 0; - info.fail = 0; - - retcode = dprintf_formatf(&info, alloc_addbyter, format, ap_save); - if((-1 == retcode) || info.fail) { - if(info.alloc) - free(info.buffer); - return NULL; - } - - if(info.alloc) { - info.buffer[info.len] = 0; /* we terminate this with a zero byte */ - return info.buffer; - } - else - return strdup(""); -} - -static int storebuffer(int output, FILE *data) -{ - char **buffer = (char **)data; - unsigned char outc = (unsigned char)output; - **buffer = outc; - (*buffer)++; - return outc; /* act like fputc() ! */ -} - -int curl_msprintf(char *buffer, const char *format, ...) -{ - va_list ap_save; /* argument pointer */ - int retcode; - va_start(ap_save, format); - retcode = dprintf_formatf(&buffer, storebuffer, format, ap_save); - va_end(ap_save); - *buffer=0; /* we terminate this with a zero byte */ - return retcode; -} - -int curl_mprintf(const char *format, ...) -{ - int retcode; - va_list ap_save; /* argument pointer */ - va_start(ap_save, format); - - retcode = dprintf_formatf(stdout, fputc, format, ap_save); - va_end(ap_save); - return retcode; -} - -int curl_mfprintf(FILE *whereto, const char *format, ...) -{ - int retcode; - va_list ap_save; /* argument pointer */ - va_start(ap_save, format); - retcode = dprintf_formatf(whereto, fputc, format, ap_save); - va_end(ap_save); - return retcode; -} - -int curl_mvsprintf(char *buffer, const char *format, va_list ap_save) -{ - int retcode; - retcode = dprintf_formatf(&buffer, storebuffer, format, ap_save); - *buffer=0; /* we terminate this with a zero byte */ - return retcode; -} - -int curl_mvprintf(const char *format, va_list ap_save) -{ - return dprintf_formatf(stdout, fputc, format, ap_save); -} - -int curl_mvfprintf(FILE *whereto, const char *format, va_list ap_save) -{ - return dprintf_formatf(whereto, fputc, format, ap_save); -} diff --git a/build/premake/premake5/contrib/curl/lib/multi.c b/build/premake/premake5/contrib/curl/lib/multi.c deleted file mode 100644 index bb31dc1d9c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/multi.c +++ /dev/null @@ -1,3165 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "urldata.h" -#include "transfer.h" -#include "url.h" -#include "connect.h" -#include "progress.h" -#include "easyif.h" -#include "share.h" -#include "multiif.h" -#include "sendf.h" -#include "timeval.h" -#include "http.h" -#include "select.h" -#include "warnless.h" -#include "speedcheck.h" -#include "conncache.h" -#include "multihandle.h" -#include "pipeline.h" -#include "sigpipe.h" -#include "vtls/vtls.h" -#include "connect.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - CURL_SOCKET_HASH_TABLE_SIZE should be a prime number. Increasing it from 97 - to 911 takes on a 32-bit machine 4 x 804 = 3211 more bytes. Still, every - CURL handle takes 45-50 K memory, therefore this 3K are not significant. -*/ -#ifndef CURL_SOCKET_HASH_TABLE_SIZE -#define CURL_SOCKET_HASH_TABLE_SIZE 911 -#endif - -#define CURL_CONNECTION_HASH_SIZE 97 - -#define CURL_MULTI_HANDLE 0x000bab1e - -#define GOOD_MULTI_HANDLE(x) \ - ((x) && (x)->type == CURL_MULTI_HANDLE) - -static void singlesocket(struct Curl_multi *multi, - struct Curl_easy *data); -static int update_timer(struct Curl_multi *multi); - -static CURLMcode add_next_timeout(struct timeval now, - struct Curl_multi *multi, - struct Curl_easy *d); -static CURLMcode multi_timeout(struct Curl_multi *multi, - long *timeout_ms); - -#ifdef DEBUGBUILD -static const char * const statename[]={ - "INIT", - "CONNECT_PEND", - "CONNECT", - "WAITRESOLVE", - "WAITCONNECT", - "WAITPROXYCONNECT", - "SENDPROTOCONNECT", - "PROTOCONNECT", - "WAITDO", - "DO", - "DOING", - "DO_MORE", - "DO_DONE", - "WAITPERFORM", - "PERFORM", - "TOOFAST", - "DONE", - "COMPLETED", - "MSGSENT", -}; -#endif - -static void multi_freetimeout(void *a, void *b); - -/* function pointer called once when switching TO a state */ -typedef void (*init_multistate_func)(struct Curl_easy *data); - -/* always use this function to change state, to make debugging easier */ -static void mstate(struct Curl_easy *data, CURLMstate state -#ifdef DEBUGBUILD - , int lineno -#endif -) -{ - CURLMstate oldstate = data->mstate; - static const init_multistate_func finit[CURLM_STATE_LAST] = { - NULL, - NULL, - Curl_init_CONNECT, /* CONNECT */ - /* the rest is NULL too */ - }; - -#if defined(DEBUGBUILD) && defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) lineno; -#endif - - if(oldstate == state) - /* don't bother when the new state is the same as the old state */ - return; - - data->mstate = state; - -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - if(data->mstate >= CURLM_STATE_CONNECT_PEND && - data->mstate < CURLM_STATE_COMPLETED) { - long connection_id = -5000; - - if(data->easy_conn) - connection_id = data->easy_conn->connection_id; - - infof(data, - "STATE: %s => %s handle %p; line %d (connection #%ld)\n", - statename[oldstate], statename[data->mstate], - (void *)data, lineno, connection_id); - } -#endif - - if(state == CURLM_STATE_COMPLETED) - /* changing to COMPLETED means there's one less easy handle 'alive' */ - data->multi->num_alive--; - - /* if this state has an init-function, run it */ - if(finit[state]) - finit[state](data); -} - -#ifndef DEBUGBUILD -#define multistate(x,y) mstate(x,y) -#else -#define multistate(x,y) mstate(x,y, __LINE__) -#endif - -/* - * We add one of these structs to the sockhash for a particular socket - */ - -struct Curl_sh_entry { - struct Curl_easy *easy; - int action; /* what action READ/WRITE this socket waits for */ - curl_socket_t socket; /* mainly to ease debugging */ - void *socketp; /* settable by users with curl_multi_assign() */ -}; -/* bits for 'action' having no bits means this socket is not expecting any - action */ -#define SH_READ 1 -#define SH_WRITE 2 - -/* look up a given socket in the socket hash, skip invalid sockets */ -static struct Curl_sh_entry *sh_getentry(struct curl_hash *sh, - curl_socket_t s) -{ - if(s != CURL_SOCKET_BAD) - /* only look for proper sockets */ - return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t)); - return NULL; -} - -/* make sure this socket is present in the hash for this handle */ -static struct Curl_sh_entry *sh_addentry(struct curl_hash *sh, - curl_socket_t s, - struct Curl_easy *data) -{ - struct Curl_sh_entry *there = sh_getentry(sh, s); - struct Curl_sh_entry *check; - - if(there) - /* it is present, return fine */ - return there; - - /* not present, add it */ - check = calloc(1, sizeof(struct Curl_sh_entry)); - if(!check) - return NULL; /* major failure */ - - check->easy = data; - check->socket = s; - - /* make/add new hash entry */ - if(!Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) { - free(check); - return NULL; /* major failure */ - } - - return check; /* things are good in sockhash land */ -} - - -/* delete the given socket + handle from the hash */ -static void sh_delentry(struct curl_hash *sh, curl_socket_t s) -{ - /* We remove the hash entry. This will end up in a call to - sh_freeentry(). */ - Curl_hash_delete(sh, (char *)&s, sizeof(curl_socket_t)); -} - -/* - * free a sockhash entry - */ -static void sh_freeentry(void *freethis) -{ - struct Curl_sh_entry *p = (struct Curl_sh_entry *) freethis; - - free(p); -} - -static size_t fd_key_compare(void *k1, size_t k1_len, void *k2, size_t k2_len) -{ - (void) k1_len; (void) k2_len; - - return (*((curl_socket_t *) k1)) == (*((curl_socket_t *) k2)); -} - -static size_t hash_fd(void *key, size_t key_length, size_t slots_num) -{ - curl_socket_t fd = *((curl_socket_t *) key); - (void) key_length; - - return (fd % slots_num); -} - -/* - * sh_init() creates a new socket hash and returns the handle for it. - * - * Quote from README.multi_socket: - * - * "Some tests at 7000 and 9000 connections showed that the socket hash lookup - * is somewhat of a bottle neck. Its current implementation may be a bit too - * limiting. It simply has a fixed-size array, and on each entry in the array - * it has a linked list with entries. So the hash only checks which list to - * scan through. The code I had used so for used a list with merely 7 slots - * (as that is what the DNS hash uses) but with 7000 connections that would - * make an average of 1000 nodes in each list to run through. I upped that to - * 97 slots (I believe a prime is suitable) and noticed a significant speed - * increase. I need to reconsider the hash implementation or use a rather - * large default value like this. At 9000 connections I was still below 10us - * per call." - * - */ -static int sh_init(struct curl_hash *hash, int hashsize) -{ - return Curl_hash_init(hash, hashsize, hash_fd, fd_key_compare, - sh_freeentry); -} - -/* - * multi_addmsg() - * - * Called when a transfer is completed. Adds the given msg pointer to - * the list kept in the multi handle. - */ -static CURLMcode multi_addmsg(struct Curl_multi *multi, - struct Curl_message *msg) -{ - if(!Curl_llist_insert_next(multi->msglist, multi->msglist->tail, msg)) - return CURLM_OUT_OF_MEMORY; - - return CURLM_OK; -} - -/* - * multi_freeamsg() - * - * Callback used by the llist system when a single list entry is destroyed. - */ -static void multi_freeamsg(void *a, void *b) -{ - (void)a; - (void)b; -} - -struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */ - int chashsize) /* connection hash */ -{ - struct Curl_multi *multi = calloc(1, sizeof(struct Curl_multi)); - - if(!multi) - return NULL; - - multi->type = CURL_MULTI_HANDLE; - - if(Curl_mk_dnscache(&multi->hostcache)) - goto error; - - if(sh_init(&multi->sockhash, hashsize)) - goto error; - - if(Curl_conncache_init(&multi->conn_cache, chashsize)) - goto error; - - multi->msglist = Curl_llist_alloc(multi_freeamsg); - if(!multi->msglist) - goto error; - - multi->pending = Curl_llist_alloc(multi_freeamsg); - if(!multi->pending) - goto error; - - /* allocate a new easy handle to use when closing cached connections */ - multi->closure_handle = curl_easy_init(); - if(!multi->closure_handle) - goto error; - - multi->closure_handle->multi = multi; - multi->closure_handle->state.conn_cache = &multi->conn_cache; - - multi->max_pipeline_length = 5; - - /* -1 means it not set by user, use the default value */ - multi->maxconnects = -1; - return multi; - - error: - - Curl_hash_destroy(&multi->sockhash); - Curl_hash_destroy(&multi->hostcache); - Curl_conncache_destroy(&multi->conn_cache); - Curl_close(multi->closure_handle); - multi->closure_handle = NULL; - Curl_llist_destroy(multi->msglist, NULL); - Curl_llist_destroy(multi->pending, NULL); - - free(multi); - return NULL; -} - -struct Curl_multi *curl_multi_init(void) -{ - return Curl_multi_handle(CURL_SOCKET_HASH_TABLE_SIZE, - CURL_CONNECTION_HASH_SIZE); -} - -CURLMcode curl_multi_add_handle(struct Curl_multi *multi, - struct Curl_easy *data) -{ - struct curl_llist *timeoutlist; - - /* First, make some basic checks that the CURLM handle is a good handle */ - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - /* Verify that we got a somewhat good easy handle too */ - if(!GOOD_EASY_HANDLE(data)) - return CURLM_BAD_EASY_HANDLE; - - /* Prevent users from adding same easy handle more than once and prevent - adding to more than one multi stack */ - if(data->multi) - return CURLM_ADDED_ALREADY; - - /* Allocate and initialize timeout list for easy handle */ - timeoutlist = Curl_llist_alloc(multi_freetimeout); - if(!timeoutlist) - return CURLM_OUT_OF_MEMORY; - - /* - * No failure allowed in this function beyond this point. And no - * modification of easy nor multi handle allowed before this except for - * potential multi's connection cache growing which won't be undone in this - * function no matter what. - */ - - /* Make easy handle use timeout list initialized above */ - data->state.timeoutlist = timeoutlist; - timeoutlist = NULL; - - /* set the easy handle */ - multistate(data, CURLM_STATE_INIT); - - if((data->set.global_dns_cache) && - (data->dns.hostcachetype != HCACHE_GLOBAL)) { - /* global dns cache was requested but still isn't */ - struct curl_hash *global = Curl_global_host_cache_init(); - if(global) { - /* only do this if the global cache init works */ - data->dns.hostcache = global; - data->dns.hostcachetype = HCACHE_GLOBAL; - } - } - /* for multi interface connections, we share DNS cache automatically if the - easy handle's one is currently not set. */ - else if(!data->dns.hostcache || - (data->dns.hostcachetype == HCACHE_NONE)) { - data->dns.hostcache = &multi->hostcache; - data->dns.hostcachetype = HCACHE_MULTI; - } - - /* Point to the multi's connection cache */ - data->state.conn_cache = &multi->conn_cache; - - /* This adds the new entry at the 'end' of the doubly-linked circular - list of Curl_easy structs to try and maintain a FIFO queue so - the pipelined requests are in order. */ - - /* We add this new entry last in the list. */ - - data->next = NULL; /* end of the line */ - if(multi->easyp) { - struct Curl_easy *last = multi->easylp; - last->next = data; - data->prev = last; - multi->easylp = data; /* the new last node */ - } - else { - /* first node, make prev NULL! */ - data->prev = NULL; - multi->easylp = multi->easyp = data; /* both first and last */ - } - - /* make the Curl_easy refer back to this multi handle */ - data->multi = multi; - - /* Set the timeout for this handle to expire really soon so that it will - be taken care of even when this handle is added in the midst of operation - when only the curl_multi_socket() API is used. During that flow, only - sockets that time-out or have actions will be dealt with. Since this - handle has no action yet, we make sure it times out to get things to - happen. */ - Curl_expire(data, 0); - - /* increase the node-counter */ - multi->num_easy++; - - /* increase the alive-counter */ - multi->num_alive++; - - /* A somewhat crude work-around for a little glitch in update_timer() that - happens if the lastcall time is set to the same time when the handle is - removed as when the next handle is added, as then the check in - update_timer() that prevents calling the application multiple times with - the same timer infor will not trigger and then the new handle's timeout - will not be notified to the app. - - The work-around is thus simply to clear the 'lastcall' variable to force - update_timer() to always trigger a callback to the app when a new easy - handle is added */ - memset(&multi->timer_lastcall, 0, sizeof(multi->timer_lastcall)); - - /* The closure handle only ever has default timeouts set. To improve the - state somewhat we clone the timeouts from each added handle so that the - closure handle always has the same timeouts as the most recently added - easy handle. */ - multi->closure_handle->set.timeout = data->set.timeout; - multi->closure_handle->set.server_response_timeout = - data->set.server_response_timeout; - - update_timer(multi); - return CURLM_OK; -} - -#if 0 -/* Debug-function, used like this: - * - * Curl_hash_print(multi->sockhash, debug_print_sock_hash); - * - * Enable the hash print function first by editing hash.c - */ -static void debug_print_sock_hash(void *p) -{ - struct Curl_sh_entry *sh = (struct Curl_sh_entry *)p; - - fprintf(stderr, " [easy %p/magic %x/socket %d]", - (void *)sh->data, sh->data->magic, (int)sh->socket); -} -#endif - -/* Mark the connection as 'idle', or close it if the cache is full. - Returns TRUE if the connection is kept, or FALSE if it was closed. */ -static bool -ConnectionDone(struct Curl_easy *data, struct connectdata *conn) -{ - /* data->multi->maxconnects can be negative, deal with it. */ - size_t maxconnects = - (data->multi->maxconnects < 0) ? data->multi->num_easy * 4: - data->multi->maxconnects; - struct connectdata *conn_candidate = NULL; - - /* Mark the current connection as 'unused' */ - conn->inuse = FALSE; - - if(maxconnects > 0 && - data->state.conn_cache->num_connections > maxconnects) { - infof(data, "Connection cache is full, closing the oldest one.\n"); - - conn_candidate = Curl_oldest_idle_connection(data); - - if(conn_candidate) { - /* Set the connection's owner correctly */ - conn_candidate->data = data; - - /* the winner gets the honour of being disconnected */ - (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); - } - } - - return (conn_candidate == conn) ? FALSE : TRUE; -} - -static CURLcode multi_done(struct connectdata **connp, - CURLcode status, /* an error if this is called - after an error was detected */ - bool premature) -{ - CURLcode result; - struct connectdata *conn; - struct Curl_easy *data; - - DEBUGASSERT(*connp); - - conn = *connp; - data = conn->data; - - DEBUGF(infof(data, "multi_done\n")); - - if(data->state.done) - /* Stop if multi_done() has already been called */ - return CURLE_OK; - - Curl_getoff_all_pipelines(data, conn); - - /* Cleanup possible redirect junk */ - free(data->req.newurl); - data->req.newurl = NULL; - free(data->req.location); - data->req.location = NULL; - - switch(status) { - case CURLE_ABORTED_BY_CALLBACK: - case CURLE_READ_ERROR: - case CURLE_WRITE_ERROR: - /* When we're aborted due to a callback return code it basically have to - be counted as premature as there is trouble ahead if we don't. We have - many callbacks and protocols work differently, we could potentially do - this more fine-grained in the future. */ - premature = TRUE; - default: - break; - } - - /* this calls the protocol-specific function pointer previously set */ - if(conn->handler->done) - result = conn->handler->done(conn, status, premature); - else - result = status; - - if(CURLE_ABORTED_BY_CALLBACK != result) { - /* avoid this if we already aborted by callback to avoid this calling - another callback */ - CURLcode rc = Curl_pgrsDone(conn); - if(!result && rc) - result = CURLE_ABORTED_BY_CALLBACK; - } - - if(conn->send_pipe->size + conn->recv_pipe->size != 0 && - !data->set.reuse_forbid && - !conn->bits.close) { - /* Stop if pipeline is not empty and we do not have to close - connection. */ - data->easy_conn = NULL; - DEBUGF(infof(data, "Connection still in use, no more multi_done now!\n")); - return CURLE_OK; - } - - data->state.done = TRUE; /* called just now! */ - Curl_resolver_cancel(conn); - - if(conn->dns_entry) { - Curl_resolv_unlock(data, conn->dns_entry); /* done with this */ - conn->dns_entry = NULL; - } - - /* if the transfer was completed in a paused state there can be buffered - data left to write and then kill */ - free(data->state.tempwrite); - data->state.tempwrite = NULL; - - /* if data->set.reuse_forbid is TRUE, it means the libcurl client has - forced us to close this connection. This is ignored for requests taking - place in a NTLM authentication handshake - - if conn->bits.close is TRUE, it means that the connection should be - closed in spite of all our efforts to be nice, due to protocol - restrictions in our or the server's end - - if premature is TRUE, it means this connection was said to be DONE before - the entire request operation is complete and thus we can't know in what - state it is for re-using, so we're forced to close it. In a perfect world - we can add code that keep track of if we really must close it here or not, - but currently we have no such detail knowledge. - */ - - if((data->set.reuse_forbid -#if defined(USE_NTLM) - && !(conn->ntlm.state == NTLMSTATE_TYPE2 || - conn->proxyntlm.state == NTLMSTATE_TYPE2) -#endif - ) || conn->bits.close || premature) { - CURLcode res2 = Curl_disconnect(conn, premature); /* close connection */ - - /* If we had an error already, make sure we return that one. But - if we got a new error, return that. */ - if(!result && res2) - result = res2; - } - else { - /* the connection is no longer in use */ - if(ConnectionDone(data, conn)) { - /* remember the most recently used connection */ - data->state.lastconnect = conn; - - infof(data, "Connection #%ld to host %s left intact\n", - conn->connection_id, - conn->bits.socksproxy ? conn->socks_proxy.host.dispname : - conn->bits.httpproxy ? conn->http_proxy.host.dispname : - conn->bits.conn_to_host ? conn->conn_to_host.dispname : - conn->host.dispname); - } - else - data->state.lastconnect = NULL; - } - - *connp = NULL; /* to make the caller of this function better detect that - this was either closed or handed over to the connection - cache here, and therefore cannot be used from this point on - */ - Curl_free_request_state(data); - - return result; -} - -CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, - struct Curl_easy *data) -{ - struct Curl_easy *easy = data; - bool premature; - bool easy_owns_conn; - struct curl_llist_element *e; - - /* First, make some basic checks that the CURLM handle is a good handle */ - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - /* Verify that we got a somewhat good easy handle too */ - if(!GOOD_EASY_HANDLE(data)) - return CURLM_BAD_EASY_HANDLE; - - /* Prevent users from trying to remove same easy handle more than once */ - if(!data->multi) - return CURLM_OK; /* it is already removed so let's say it is fine! */ - - premature = (data->mstate < CURLM_STATE_COMPLETED) ? TRUE : FALSE; - easy_owns_conn = (data->easy_conn && (data->easy_conn->data == easy)) ? - TRUE : FALSE; - - /* If the 'state' is not INIT or COMPLETED, we might need to do something - nice to put the easy_handle in a good known state when this returns. */ - if(premature) { - /* this handle is "alive" so we need to count down the total number of - alive connections when this is removed */ - multi->num_alive--; - - /* When this handle gets removed, other handles may be able to get the - connection */ - Curl_multi_process_pending_handles(multi); - } - - if(data->easy_conn && - data->mstate > CURLM_STATE_DO && - data->mstate < CURLM_STATE_COMPLETED) { - /* If the handle is in a pipeline and has started sending off its - request but not received its response yet, we need to close - connection. */ - streamclose(data->easy_conn, "Removed with partial response"); - /* Set connection owner so that the DONE function closes it. We can - safely do this here since connection is killed. */ - data->easy_conn->data = easy; - easy_owns_conn = TRUE; - } - - /* The timer must be shut down before data->multi is set to NULL, - else the timenode will remain in the splay tree after - curl_easy_cleanup is called. */ - Curl_expire_clear(data); - - if(data->dns.hostcachetype == HCACHE_MULTI) { - /* stop using the multi handle's DNS cache */ - data->dns.hostcache = NULL; - data->dns.hostcachetype = HCACHE_NONE; - } - - if(data->easy_conn) { - - /* we must call multi_done() here (if we still own the connection) so that - we don't leave a half-baked one around */ - if(easy_owns_conn) { - - /* multi_done() clears the conn->data field to lose the association - between the easy handle and the connection - - Note that this ignores the return code simply because there's - nothing really useful to do with it anyway! */ - (void)multi_done(&data->easy_conn, data->result, premature); - } - else - /* Clear connection pipelines, if multi_done above was not called */ - Curl_getoff_all_pipelines(data, data->easy_conn); - } - - Curl_wildcard_dtor(&data->wildcard); - - /* destroy the timeout list that is held in the easy handle, do this *after* - multi_done() as that may actually call Curl_expire that uses this */ - if(data->state.timeoutlist) { - Curl_llist_destroy(data->state.timeoutlist, NULL); - data->state.timeoutlist = NULL; - } - - /* as this was using a shared connection cache we clear the pointer to that - since we're not part of that multi handle anymore */ - data->state.conn_cache = NULL; - - /* change state without using multistate(), only to make singlesocket() do - what we want */ - data->mstate = CURLM_STATE_COMPLETED; - singlesocket(multi, easy); /* to let the application know what sockets that - vanish with this handle */ - - /* Remove the association between the connection and the handle */ - if(data->easy_conn) { - data->easy_conn->data = NULL; - data->easy_conn = NULL; - } - - data->multi = NULL; /* clear the association to this multi handle */ - - /* make sure there's no pending message in the queue sent from this easy - handle */ - - for(e = multi->msglist->head; e; e = e->next) { - struct Curl_message *msg = e->ptr; - - if(msg->extmsg.easy_handle == easy) { - Curl_llist_remove(multi->msglist, e, NULL); - /* there can only be one from this specific handle */ - break; - } - } - - /* make the previous node point to our next */ - if(data->prev) - data->prev->next = data->next; - else - multi->easyp = data->next; /* point to first node */ - - /* make our next point to our previous node */ - if(data->next) - data->next->prev = data->prev; - else - multi->easylp = data->prev; /* point to last node */ - - /* NOTE NOTE NOTE - We do not touch the easy handle here! */ - multi->num_easy--; /* one less to care about now */ - - update_timer(multi); - return CURLM_OK; -} - -/* Return TRUE if the application asked for a certain set of pipelining */ -bool Curl_pipeline_wanted(const struct Curl_multi *multi, int bits) -{ - return (multi && (multi->pipelining & bits)) ? TRUE : FALSE; -} - -void Curl_multi_handlePipeBreak(struct Curl_easy *data) -{ - data->easy_conn = NULL; -} - -static int waitconnect_getsock(struct connectdata *conn, - curl_socket_t *sock, - int numsocks) -{ - int i; - int s=0; - int rc=0; - - if(!numsocks) - return GETSOCK_BLANK; - -#ifdef USE_SSL - if(CONNECT_FIRSTSOCKET_PROXY_SSL()) - return Curl_ssl_getsock(conn, sock, numsocks); -#endif - - for(i=0; i<2; i++) { - if(conn->tempsock[i] != CURL_SOCKET_BAD) { - sock[s] = conn->tempsock[i]; - rc |= GETSOCK_WRITESOCK(s++); - } - } - - return rc; -} - -static int waitproxyconnect_getsock(struct connectdata *conn, - curl_socket_t *sock, - int numsocks) -{ - if(!numsocks) - return GETSOCK_BLANK; - - sock[0] = conn->sock[FIRSTSOCKET]; - - /* when we've sent a CONNECT to a proxy, we should rather wait for the - socket to become readable to be able to get the response headers */ - if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) - return GETSOCK_READSOCK(0); - - return GETSOCK_WRITESOCK(0); -} - -static int domore_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - if(conn && conn->handler->domore_getsock) - return conn->handler->domore_getsock(conn, socks, numsocks); - return GETSOCK_BLANK; -} - -/* returns bitmapped flags for this handle and its sockets */ -static int multi_getsock(struct Curl_easy *data, - curl_socket_t *socks, /* points to numsocks number - of sockets */ - int numsocks) -{ - /* If the pipe broke, or if there's no connection left for this easy handle, - then we MUST bail out now with no bitmask set. The no connection case can - happen when this is called from curl_multi_remove_handle() => - singlesocket() => multi_getsock(). - */ - if(data->state.pipe_broke || !data->easy_conn) - return 0; - - if(data->mstate > CURLM_STATE_CONNECT && - data->mstate < CURLM_STATE_COMPLETED) { - /* Set up ownership correctly */ - data->easy_conn->data = data; - } - - switch(data->mstate) { - default: -#if 0 /* switch back on these cases to get the compiler to check for all enums - to be present */ - case CURLM_STATE_TOOFAST: /* returns 0, so will not select. */ - case CURLM_STATE_COMPLETED: - case CURLM_STATE_MSGSENT: - case CURLM_STATE_INIT: - case CURLM_STATE_CONNECT: - case CURLM_STATE_WAITDO: - case CURLM_STATE_DONE: - case CURLM_STATE_LAST: - /* this will get called with CURLM_STATE_COMPLETED when a handle is - removed */ -#endif - return 0; - - case CURLM_STATE_WAITRESOLVE: - return Curl_resolver_getsock(data->easy_conn, socks, numsocks); - - case CURLM_STATE_PROTOCONNECT: - case CURLM_STATE_SENDPROTOCONNECT: - return Curl_protocol_getsock(data->easy_conn, socks, numsocks); - - case CURLM_STATE_DO: - case CURLM_STATE_DOING: - return Curl_doing_getsock(data->easy_conn, socks, numsocks); - - case CURLM_STATE_WAITPROXYCONNECT: - return waitproxyconnect_getsock(data->easy_conn, socks, numsocks); - - case CURLM_STATE_WAITCONNECT: - return waitconnect_getsock(data->easy_conn, socks, numsocks); - - case CURLM_STATE_DO_MORE: - return domore_getsock(data->easy_conn, socks, numsocks); - - case CURLM_STATE_DO_DONE: /* since is set after DO is completed, we switch - to waiting for the same as the *PERFORM - states */ - case CURLM_STATE_PERFORM: - case CURLM_STATE_WAITPERFORM: - return Curl_single_getsock(data->easy_conn, socks, numsocks); - } - -} - -CURLMcode curl_multi_fdset(struct Curl_multi *multi, - fd_set *read_fd_set, fd_set *write_fd_set, - fd_set *exc_fd_set, int *max_fd) -{ - /* Scan through all the easy handles to get the file descriptors set. - Some easy handles may not have connected to the remote host yet, - and then we must make sure that is done. */ - struct Curl_easy *data; - int this_max_fd=-1; - curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; - int bitmap; - int i; - (void)exc_fd_set; /* not used */ - - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - data=multi->easyp; - while(data) { - bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); - - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) { - curl_socket_t s = CURL_SOCKET_BAD; - - if((bitmap & GETSOCK_READSOCK(i)) && VALID_SOCK((sockbunch[i]))) { - FD_SET(sockbunch[i], read_fd_set); - s = sockbunch[i]; - } - if((bitmap & GETSOCK_WRITESOCK(i)) && VALID_SOCK((sockbunch[i]))) { - FD_SET(sockbunch[i], write_fd_set); - s = sockbunch[i]; - } - if(s == CURL_SOCKET_BAD) - /* this socket is unused, break out of loop */ - break; - else { - if((int)s > this_max_fd) - this_max_fd = (int)s; - } - } - - data = data->next; /* check next handle */ - } - - *max_fd = this_max_fd; - - return CURLM_OK; -} - -CURLMcode curl_multi_wait(struct Curl_multi *multi, - struct curl_waitfd extra_fds[], - unsigned int extra_nfds, - int timeout_ms, - int *ret) -{ - struct Curl_easy *data; - curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE]; - int bitmap; - unsigned int i; - unsigned int nfds = 0; - unsigned int curlfds; - struct pollfd *ufds = NULL; - long timeout_internal; - int retcode = 0; - - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - /* If the internally desired timeout is actually shorter than requested from - the outside, then use the shorter time! But only if the internal timer - is actually larger than -1! */ - (void)multi_timeout(multi, &timeout_internal); - if((timeout_internal >= 0) && (timeout_internal < (long)timeout_ms)) - timeout_ms = (int)timeout_internal; - - /* Count up how many fds we have from the multi handle */ - data=multi->easyp; - while(data) { - bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); - - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) { - curl_socket_t s = CURL_SOCKET_BAD; - - if(bitmap & GETSOCK_READSOCK(i)) { - ++nfds; - s = sockbunch[i]; - } - if(bitmap & GETSOCK_WRITESOCK(i)) { - ++nfds; - s = sockbunch[i]; - } - if(s == CURL_SOCKET_BAD) { - break; - } - } - - data = data->next; /* check next handle */ - } - - curlfds = nfds; /* number of internal file descriptors */ - nfds += extra_nfds; /* add the externally provided ones */ - - if(nfds || extra_nfds) { - ufds = malloc(nfds * sizeof(struct pollfd)); - if(!ufds) - return CURLM_OUT_OF_MEMORY; - } - nfds = 0; - - /* only do the second loop if we found descriptors in the first stage run - above */ - - if(curlfds) { - /* Add the curl handles to our pollfds first */ - data=multi->easyp; - while(data) { - bitmap = multi_getsock(data, sockbunch, MAX_SOCKSPEREASYHANDLE); - - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) { - curl_socket_t s = CURL_SOCKET_BAD; - - if(bitmap & GETSOCK_READSOCK(i)) { - ufds[nfds].fd = sockbunch[i]; - ufds[nfds].events = POLLIN; - ++nfds; - s = sockbunch[i]; - } - if(bitmap & GETSOCK_WRITESOCK(i)) { - ufds[nfds].fd = sockbunch[i]; - ufds[nfds].events = POLLOUT; - ++nfds; - s = sockbunch[i]; - } - if(s == CURL_SOCKET_BAD) { - break; - } - } - - data = data->next; /* check next handle */ - } - } - - /* Add external file descriptions from poll-like struct curl_waitfd */ - for(i = 0; i < extra_nfds; i++) { - ufds[nfds].fd = extra_fds[i].fd; - ufds[nfds].events = 0; - if(extra_fds[i].events & CURL_WAIT_POLLIN) - ufds[nfds].events |= POLLIN; - if(extra_fds[i].events & CURL_WAIT_POLLPRI) - ufds[nfds].events |= POLLPRI; - if(extra_fds[i].events & CURL_WAIT_POLLOUT) - ufds[nfds].events |= POLLOUT; - ++nfds; - } - - if(nfds) { - int pollrc; - /* wait... */ - pollrc = Curl_poll(ufds, nfds, timeout_ms); - DEBUGF(infof(data, "Curl_poll(%d ds, %d ms) == %d\n", - nfds, timeout_ms, pollrc)); - - if(pollrc > 0) { - retcode = pollrc; - /* copy revents results from the poll to the curl_multi_wait poll - struct, the bit values of the actual underlying poll() implementation - may not be the same as the ones in the public libcurl API! */ - for(i = 0; i < extra_nfds; i++) { - unsigned short mask = 0; - unsigned r = ufds[curlfds + i].revents; - - if(r & POLLIN) - mask |= CURL_WAIT_POLLIN; - if(r & POLLOUT) - mask |= CURL_WAIT_POLLOUT; - if(r & POLLPRI) - mask |= CURL_WAIT_POLLPRI; - - extra_fds[i].revents = mask; - } - } - } - - free(ufds); - if(ret) - *ret = retcode; - return CURLM_OK; -} - -/* - * Curl_multi_connchanged() is called to tell that there is a connection in - * this multi handle that has changed state (pipelining become possible, the - * number of allowed streams changed or similar), and a subsequent use of this - * multi handle should move CONNECT_PEND handles back to CONNECT to have them - * retry. - */ -void Curl_multi_connchanged(struct Curl_multi *multi) -{ - multi->recheckstate = TRUE; -} - -/* - * multi_ischanged() is called - * - * Returns TRUE/FALSE whether the state is changed to trigger a CONNECT_PEND - * => CONNECT action. - * - * Set 'clear' to TRUE to have it also clear the state variable. - */ -static bool multi_ischanged(struct Curl_multi *multi, bool clear) -{ - bool retval = multi->recheckstate; - if(clear) - multi->recheckstate = FALSE; - return retval; -} - -CURLMcode Curl_multi_add_perform(struct Curl_multi *multi, - struct Curl_easy *data, - struct connectdata *conn) -{ - CURLMcode rc; - - rc = curl_multi_add_handle(multi, data); - if(!rc) { - struct SingleRequest *k = &data->req; - - /* pass in NULL for 'conn' here since we don't want to init the - connection, only this transfer */ - Curl_init_do(data, NULL); - - /* take this handle to the perform state right away */ - multistate(data, CURLM_STATE_PERFORM); - data->easy_conn = conn; - k->keepon |= KEEP_RECV; /* setup to receive! */ - } - return rc; -} - -static CURLcode multi_reconnect_request(struct connectdata **connp) -{ - CURLcode result = CURLE_OK; - struct connectdata *conn = *connp; - struct Curl_easy *data = conn->data; - - /* This was a re-use of a connection and we got a write error in the - * DO-phase. Then we DISCONNECT this connection and have another attempt to - * CONNECT and then DO again! The retry cannot possibly find another - * connection to re-use, since we only keep one possible connection for - * each. */ - - infof(data, "Re-used connection seems dead, get a new one\n"); - - connclose(conn, "Reconnect dead connection"); /* enforce close */ - result = multi_done(&conn, result, FALSE); /* we are so done with this */ - - /* conn may no longer be a good pointer, clear it to avoid mistakes by - parent functions */ - *connp = NULL; - - /* - * We need to check for CURLE_SEND_ERROR here as well. This could happen - * when the request failed on a FTP connection and thus multi_done() itself - * tried to use the connection (again). - */ - if(!result || (CURLE_SEND_ERROR == result)) { - bool async; - bool protocol_done = TRUE; - - /* Now, redo the connect and get a new connection */ - result = Curl_connect(data, connp, &async, &protocol_done); - if(!result) { - /* We have connected or sent away a name resolve query fine */ - - conn = *connp; /* setup conn to again point to something nice */ - if(async) { - /* Now, if async is TRUE here, we need to wait for the name - to resolve */ - result = Curl_resolver_wait_resolv(conn, NULL); - if(result) - return result; - - /* Resolved, continue with the connection */ - result = Curl_async_resolved(conn, &protocol_done); - if(result) - return result; - } - } - } - - return result; -} - -/* - * do_complete is called when the DO actions are complete. - * - * We init chunking and trailer bits to their default values here immediately - * before receiving any header data for the current request in the pipeline. - */ -static void do_complete(struct connectdata *conn) -{ - conn->data->req.chunk=FALSE; - conn->data->req.maxfd = (conn->sockfd>conn->writesockfd? - conn->sockfd:conn->writesockfd)+1; - Curl_pgrsTime(conn->data, TIMER_PRETRANSFER); -} - -static CURLcode multi_do(struct connectdata **connp, bool *done) -{ - CURLcode result=CURLE_OK; - struct connectdata *conn = *connp; - struct Curl_easy *data = conn->data; - - if(conn->handler->do_it) { - /* generic protocol-specific function pointer set in curl_connect() */ - result = conn->handler->do_it(conn, done); - - /* This was formerly done in transfer.c, but we better do it here */ - if((CURLE_SEND_ERROR == result) && conn->bits.reuse) { - /* - * If the connection is using an easy handle, call reconnect - * to re-establish the connection. Otherwise, let the multi logic - * figure out how to re-establish the connection. - */ - if(!data->multi) { - result = multi_reconnect_request(connp); - - if(!result) { - /* ... finally back to actually retry the DO phase */ - conn = *connp; /* re-assign conn since multi_reconnect_request - creates a new connection */ - result = conn->handler->do_it(conn, done); - } - } - else - return result; - } - - if(!result && *done) - /* do_complete must be called after the protocol-specific DO function */ - do_complete(conn); - } - return result; -} - -/* - * multi_do_more() is called during the DO_MORE multi state. It is basically a - * second stage DO state which (wrongly) was introduced to support FTP's - * second connection. - * - * TODO: A future libcurl should be able to work away this state. - * - * 'complete' can return 0 for incomplete, 1 for done and -1 for go back to - * DOING state there's more work to do! - */ - -static CURLcode multi_do_more(struct connectdata *conn, int *complete) -{ - CURLcode result=CURLE_OK; - - *complete = 0; - - if(conn->handler->do_more) - result = conn->handler->do_more(conn, complete); - - if(!result && (*complete == 1)) - /* do_complete must be called after the protocol-specific DO function */ - do_complete(conn); - - return result; -} - -static CURLMcode multi_runsingle(struct Curl_multi *multi, - struct timeval now, - struct Curl_easy *data) -{ - struct Curl_message *msg = NULL; - bool connected; - bool async; - bool protocol_connect = FALSE; - bool dophase_done = FALSE; - bool done = FALSE; - CURLMcode rc; - CURLcode result = CURLE_OK; - struct SingleRequest *k; - time_t timeout_ms; - time_t recv_timeout_ms; - time_t send_timeout_ms; - int control; - - if(!GOOD_EASY_HANDLE(data)) - return CURLM_BAD_EASY_HANDLE; - - do { - /* A "stream" here is a logical stream if the protocol can handle that - (HTTP/2), or the full connection for older protocols */ - bool stream_error = FALSE; - rc = CURLM_OK; - - /* Handle the case when the pipe breaks, i.e., the connection - we're using gets cleaned up and we're left with nothing. */ - if(data->state.pipe_broke) { - infof(data, "Pipe broke: handle %p, url = %s\n", - (void *)data, data->state.path); - - if(data->mstate < CURLM_STATE_COMPLETED) { - /* Head back to the CONNECT state */ - multistate(data, CURLM_STATE_CONNECT); - rc = CURLM_CALL_MULTI_PERFORM; - result = CURLE_OK; - } - - data->state.pipe_broke = FALSE; - data->easy_conn = NULL; - continue; - } - - if(!data->easy_conn && - data->mstate > CURLM_STATE_CONNECT && - data->mstate < CURLM_STATE_DONE) { - /* In all these states, the code will blindly access 'data->easy_conn' - so this is precaution that it isn't NULL. And it silences static - analyzers. */ - failf(data, "In state %d with no easy_conn, bail out!\n", data->mstate); - return CURLM_INTERNAL_ERROR; - } - - if(multi_ischanged(multi, TRUE)) { - DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!\n")); - Curl_multi_process_pending_handles(multi); - } - - if(data->easy_conn && data->mstate > CURLM_STATE_CONNECT && - data->mstate < CURLM_STATE_COMPLETED) - /* Make sure we set the connection's current owner */ - data->easy_conn->data = data; - - if(data->easy_conn && - (data->mstate >= CURLM_STATE_CONNECT) && - (data->mstate < CURLM_STATE_COMPLETED)) { - /* we need to wait for the connect state as only then is the start time - stored, but we must not check already completed handles */ - - timeout_ms = Curl_timeleft(data, &now, - (data->mstate <= CURLM_STATE_WAITDO)? - TRUE:FALSE); - - if(timeout_ms < 0) { - /* Handle timed out */ - if(data->mstate == CURLM_STATE_WAITRESOLVE) - failf(data, "Resolving timed out after %ld milliseconds", - Curl_tvdiff(now, data->progress.t_startsingle)); - else if(data->mstate == CURLM_STATE_WAITCONNECT) - failf(data, "Connection timed out after %ld milliseconds", - Curl_tvdiff(now, data->progress.t_startsingle)); - else { - k = &data->req; - if(k->size != -1) { - failf(data, "Operation timed out after %ld milliseconds with %" - CURL_FORMAT_CURL_OFF_T " out of %" - CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(now, data->progress.t_startsingle), - k->bytecount, k->size); - } - else { - failf(data, "Operation timed out after %ld milliseconds with %" - CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(now, data->progress.t_startsingle), - k->bytecount); - } - } - - /* Force connection closed if the connection has indeed been used */ - if(data->mstate > CURLM_STATE_DO) { - streamclose(data->easy_conn, "Disconnected with pending data"); - stream_error = TRUE; - } - result = CURLE_OPERATION_TIMEDOUT; - (void)multi_done(&data->easy_conn, result, TRUE); - /* Skip the statemachine and go directly to error handling section. */ - goto statemachine_end; - } - } - - switch(data->mstate) { - case CURLM_STATE_INIT: - /* init this transfer. */ - result=Curl_pretransfer(data); - - if(!result) { - /* after init, go CONNECT */ - multistate(data, CURLM_STATE_CONNECT); - Curl_pgrsTime(data, TIMER_STARTOP); - rc = CURLM_CALL_MULTI_PERFORM; - } - break; - - case CURLM_STATE_CONNECT_PEND: - /* We will stay here until there is a connection available. Then - we try again in the CURLM_STATE_CONNECT state. */ - break; - - case CURLM_STATE_CONNECT: - /* Connect. We want to get a connection identifier filled in. */ - Curl_pgrsTime(data, TIMER_STARTSINGLE); - result = Curl_connect(data, &data->easy_conn, - &async, &protocol_connect); - if(CURLE_NO_CONNECTION_AVAILABLE == result) { - /* There was no connection available. We will go to the pending - state and wait for an available connection. */ - multistate(data, CURLM_STATE_CONNECT_PEND); - - /* add this handle to the list of connect-pending handles */ - if(!Curl_llist_insert_next(multi->pending, multi->pending->tail, data)) - result = CURLE_OUT_OF_MEMORY; - else - result = CURLE_OK; - break; - } - - if(!result) { - /* Add this handle to the send or pend pipeline */ - result = Curl_add_handle_to_pipeline(data, data->easy_conn); - if(result) - stream_error = TRUE; - else { - if(async) - /* We're now waiting for an asynchronous name lookup */ - multistate(data, CURLM_STATE_WAITRESOLVE); - else { - /* after the connect has been sent off, go WAITCONNECT unless the - protocol connect is already done and we can go directly to - WAITDO or DO! */ - rc = CURLM_CALL_MULTI_PERFORM; - - if(protocol_connect) - multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? - CURLM_STATE_WAITDO:CURLM_STATE_DO); - else { -#ifndef CURL_DISABLE_HTTP - if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) - multistate(data, CURLM_STATE_WAITPROXYCONNECT); - else -#endif - multistate(data, CURLM_STATE_WAITCONNECT); - } - } - } - } - break; - - case CURLM_STATE_WAITRESOLVE: - /* awaiting an asynch name resolve to complete */ - { - struct Curl_dns_entry *dns = NULL; - struct connectdata *conn = data->easy_conn; - const char *hostname; - - if(conn->bits.httpproxy) - hostname = conn->http_proxy.host.name; - else if(conn->bits.conn_to_host) - hostname = conn->conn_to_host.name; - else - hostname = conn->host.name; - - /* check if we have the name resolved by now */ - dns = Curl_fetch_addr(conn, hostname, (int)conn->port); - - if(dns) { -#ifdef CURLRES_ASYNCH - conn->async.dns = dns; - conn->async.done = TRUE; -#endif - result = CURLE_OK; - infof(data, "Hostname '%s' was found in DNS cache\n", hostname); - } - - if(!dns) - result = Curl_resolver_is_resolved(data->easy_conn, &dns); - - /* Update sockets here, because the socket(s) may have been - closed and the application thus needs to be told, even if it - is likely that the same socket(s) will again be used further - down. If the name has not yet been resolved, it is likely - that new sockets have been opened in an attempt to contact - another resolver. */ - singlesocket(multi, data); - - if(dns) { - /* Perform the next step in the connection phase, and then move on - to the WAITCONNECT state */ - result = Curl_async_resolved(data->easy_conn, &protocol_connect); - - if(result) - /* if Curl_async_resolved() returns failure, the connection struct - is already freed and gone */ - data->easy_conn = NULL; /* no more connection */ - else { - /* call again please so that we get the next socket setup */ - rc = CURLM_CALL_MULTI_PERFORM; - if(protocol_connect) - multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? - CURLM_STATE_WAITDO:CURLM_STATE_DO); - else { -#ifndef CURL_DISABLE_HTTP - if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) - multistate(data, CURLM_STATE_WAITPROXYCONNECT); - else -#endif - multistate(data, CURLM_STATE_WAITCONNECT); - } - } - } - - if(result) { - /* failure detected */ - stream_error = TRUE; - break; - } - } - break; - -#ifndef CURL_DISABLE_HTTP - case CURLM_STATE_WAITPROXYCONNECT: - /* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */ - result = Curl_http_connect(data->easy_conn, &protocol_connect); - - if(data->easy_conn->bits.proxy_connect_closed) { - rc = CURLM_CALL_MULTI_PERFORM; - /* connect back to proxy again */ - result = CURLE_OK; - multi_done(&data->easy_conn, CURLE_OK, FALSE); - multistate(data, CURLM_STATE_CONNECT); - } - else if(!result) { - if((data->easy_conn->http_proxy.proxytype != CURLPROXY_HTTPS || - data->easy_conn->bits.proxy_ssl_connected[FIRSTSOCKET]) && - (data->easy_conn->tunnel_state[FIRSTSOCKET] != TUNNEL_CONNECT)) { - rc = CURLM_CALL_MULTI_PERFORM; - /* initiate protocol connect phase */ - multistate(data, CURLM_STATE_SENDPROTOCONNECT); - } - } - break; -#endif - - case CURLM_STATE_WAITCONNECT: - /* awaiting a completion of an asynch TCP connect */ - result = Curl_is_connected(data->easy_conn, FIRSTSOCKET, &connected); - if(connected && !result) { -#ifndef CURL_DISABLE_HTTP - if((data->easy_conn->http_proxy.proxytype == CURLPROXY_HTTPS && - !data->easy_conn->bits.proxy_ssl_connected[FIRSTSOCKET]) || - (data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)) { - multistate(data, CURLM_STATE_WAITPROXYCONNECT); - break; - } -#endif - rc = CURLM_CALL_MULTI_PERFORM; - multistate(data, data->easy_conn->bits.tunnel_proxy? - CURLM_STATE_WAITPROXYCONNECT: - CURLM_STATE_SENDPROTOCONNECT); - } - else if(result) { - /* failure detected */ - /* Just break, the cleaning up is handled all in one place */ - stream_error = TRUE; - break; - } - break; - - case CURLM_STATE_SENDPROTOCONNECT: - result = Curl_protocol_connect(data->easy_conn, &protocol_connect); - if(!protocol_connect) - /* switch to waiting state */ - multistate(data, CURLM_STATE_PROTOCONNECT); - else if(!result) { - /* protocol connect has completed, go WAITDO or DO */ - multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? - CURLM_STATE_WAITDO:CURLM_STATE_DO); - rc = CURLM_CALL_MULTI_PERFORM; - } - else if(result) { - /* failure detected */ - Curl_posttransfer(data); - multi_done(&data->easy_conn, result, TRUE); - stream_error = TRUE; - } - break; - - case CURLM_STATE_PROTOCONNECT: - /* protocol-specific connect phase */ - result = Curl_protocol_connecting(data->easy_conn, &protocol_connect); - if(!result && protocol_connect) { - /* after the connect has completed, go WAITDO or DO */ - multistate(data, Curl_pipeline_wanted(multi, CURLPIPE_HTTP1)? - CURLM_STATE_WAITDO:CURLM_STATE_DO); - rc = CURLM_CALL_MULTI_PERFORM; - } - else if(result) { - /* failure detected */ - Curl_posttransfer(data); - multi_done(&data->easy_conn, result, TRUE); - stream_error = TRUE; - } - break; - - case CURLM_STATE_WAITDO: - /* Wait for our turn to DO when we're pipelining requests */ - if(Curl_pipeline_checkget_write(data, data->easy_conn)) { - /* Grabbed the channel */ - multistate(data, CURLM_STATE_DO); - rc = CURLM_CALL_MULTI_PERFORM; - } - break; - - case CURLM_STATE_DO: - if(data->set.connect_only) { - /* keep connection open for application to use the socket */ - connkeep(data->easy_conn, "CONNECT_ONLY"); - multistate(data, CURLM_STATE_DONE); - result = CURLE_OK; - rc = CURLM_CALL_MULTI_PERFORM; - } - else { - /* Perform the protocol's DO action */ - result = multi_do(&data->easy_conn, &dophase_done); - - /* When multi_do() returns failure, data->easy_conn might be NULL! */ - - if(!result) { - if(!dophase_done) { - /* some steps needed for wildcard matching */ - if(data->set.wildcardmatch) { - struct WildcardData *wc = &data->wildcard; - if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) { - /* skip some states if it is important */ - multi_done(&data->easy_conn, CURLE_OK, FALSE); - multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; - break; - } - } - /* DO was not completed in one function call, we must continue - DOING... */ - multistate(data, CURLM_STATE_DOING); - rc = CURLM_OK; - } - - /* after DO, go DO_DONE... or DO_MORE */ - else if(data->easy_conn->bits.do_more) { - /* we're supposed to do more, but we need to sit down, relax - and wait a little while first */ - multistate(data, CURLM_STATE_DO_MORE); - rc = CURLM_OK; - } - else { - /* we're done with the DO, now DO_DONE */ - multistate(data, CURLM_STATE_DO_DONE); - rc = CURLM_CALL_MULTI_PERFORM; - } - } - else if((CURLE_SEND_ERROR == result) && - data->easy_conn->bits.reuse) { - /* - * In this situation, a connection that we were trying to use - * may have unexpectedly died. If possible, send the connection - * back to the CONNECT phase so we can try again. - */ - char *newurl = NULL; - followtype follow=FOLLOW_NONE; - CURLcode drc; - bool retry = FALSE; - - drc = Curl_retry_request(data->easy_conn, &newurl); - if(drc) { - /* a failure here pretty much implies an out of memory */ - result = drc; - stream_error = TRUE; - } - else - retry = (newurl)?TRUE:FALSE; - - Curl_posttransfer(data); - drc = multi_done(&data->easy_conn, result, FALSE); - - /* When set to retry the connection, we must to go back to - * the CONNECT state */ - if(retry) { - if(!drc || (drc == CURLE_SEND_ERROR)) { - follow = FOLLOW_RETRY; - drc = Curl_follow(data, newurl, follow); - if(!drc) { - multistate(data, CURLM_STATE_CONNECT); - rc = CURLM_CALL_MULTI_PERFORM; - result = CURLE_OK; - } - else { - /* Follow failed */ - result = drc; - free(newurl); - } - } - else { - /* done didn't return OK or SEND_ERROR */ - result = drc; - free(newurl); - } - } - else { - /* Have error handler disconnect conn if we can't retry */ - stream_error = TRUE; - free(newurl); - } - } - else { - /* failure detected */ - Curl_posttransfer(data); - if(data->easy_conn) - multi_done(&data->easy_conn, result, FALSE); - stream_error = TRUE; - } - } - break; - - case CURLM_STATE_DOING: - /* we continue DOING until the DO phase is complete */ - result = Curl_protocol_doing(data->easy_conn, - &dophase_done); - if(!result) { - if(dophase_done) { - /* after DO, go DO_DONE or DO_MORE */ - multistate(data, data->easy_conn->bits.do_more? - CURLM_STATE_DO_MORE: - CURLM_STATE_DO_DONE); - rc = CURLM_CALL_MULTI_PERFORM; - } /* dophase_done */ - } - else { - /* failure detected */ - Curl_posttransfer(data); - multi_done(&data->easy_conn, result, FALSE); - stream_error = TRUE; - } - break; - - case CURLM_STATE_DO_MORE: - /* - * When we are connected, DO MORE and then go DO_DONE - */ - result = multi_do_more(data->easy_conn, &control); - - /* No need to remove this handle from the send pipeline here since that - is done in multi_done() */ - if(!result) { - if(control) { - /* if positive, advance to DO_DONE - if negative, go back to DOING */ - multistate(data, control==1? - CURLM_STATE_DO_DONE: - CURLM_STATE_DOING); - rc = CURLM_CALL_MULTI_PERFORM; - } - else - /* stay in DO_MORE */ - rc = CURLM_OK; - } - else { - /* failure detected */ - Curl_posttransfer(data); - multi_done(&data->easy_conn, result, FALSE); - stream_error = TRUE; - } - break; - - case CURLM_STATE_DO_DONE: - /* Move ourselves from the send to recv pipeline */ - Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn); - /* Check if we can move pending requests to send pipe */ - Curl_multi_process_pending_handles(multi); - - /* Only perform the transfer if there's a good socket to work with. - Having both BAD is a signal to skip immediately to DONE */ - if((data->easy_conn->sockfd != CURL_SOCKET_BAD) || - (data->easy_conn->writesockfd != CURL_SOCKET_BAD)) - multistate(data, CURLM_STATE_WAITPERFORM); - else - multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; - break; - - case CURLM_STATE_WAITPERFORM: - /* Wait for our turn to PERFORM */ - if(Curl_pipeline_checkget_read(data, data->easy_conn)) { - /* Grabbed the channel */ - multistate(data, CURLM_STATE_PERFORM); - rc = CURLM_CALL_MULTI_PERFORM; - } - break; - - case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */ - /* if both rates are within spec, resume transfer */ - if(Curl_pgrsUpdate(data->easy_conn)) - result = CURLE_ABORTED_BY_CALLBACK; - else - result = Curl_speedcheck(data, now); - - if(!result) { - send_timeout_ms = 0; - if(data->set.max_send_speed > 0) - send_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.uploaded, - data->progress.ul_limit_size, - data->set.max_send_speed, - data->progress.ul_limit_start, - now); - - recv_timeout_ms = 0; - if(data->set.max_recv_speed > 0) - recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded, - data->progress.dl_limit_size, - data->set.max_recv_speed, - data->progress.dl_limit_start, - now); - - if(send_timeout_ms <= 0 && recv_timeout_ms <= 0) - multistate(data, CURLM_STATE_PERFORM); - else if(send_timeout_ms >= recv_timeout_ms) - Curl_expire_latest(data, send_timeout_ms); - else - Curl_expire_latest(data, recv_timeout_ms); - } - break; - - case CURLM_STATE_PERFORM: - { - char *newurl = NULL; - bool retry = FALSE; - bool comeback = FALSE; - - /* check if over send speed */ - send_timeout_ms = 0; - if(data->set.max_send_speed > 0) - send_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.uploaded, - data->progress.ul_limit_size, - data->set.max_send_speed, - data->progress.ul_limit_start, - now); - - /* check if over recv speed */ - recv_timeout_ms = 0; - if(data->set.max_recv_speed > 0) - recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded, - data->progress.dl_limit_size, - data->set.max_recv_speed, - data->progress.dl_limit_start, - now); - - if(send_timeout_ms > 0 || recv_timeout_ms > 0) { - multistate(data, CURLM_STATE_TOOFAST); - if(send_timeout_ms >= recv_timeout_ms) - Curl_expire_latest(data, send_timeout_ms); - else - Curl_expire_latest(data, recv_timeout_ms); - break; - } - - /* read/write data if it is ready to do so */ - result = Curl_readwrite(data->easy_conn, data, &done, &comeback); - - k = &data->req; - - if(!(k->keepon & KEEP_RECV)) - /* We're done receiving */ - Curl_pipeline_leave_read(data->easy_conn); - - if(!(k->keepon & KEEP_SEND)) - /* We're done sending */ - Curl_pipeline_leave_write(data->easy_conn); - - if(done || (result == CURLE_RECV_ERROR)) { - /* If CURLE_RECV_ERROR happens early enough, we assume it was a race - * condition and the server closed the re-used connection exactly when - * we wanted to use it, so figure out if that is indeed the case. - */ - CURLcode ret = Curl_retry_request(data->easy_conn, &newurl); - if(!ret) - retry = (newurl)?TRUE:FALSE; - - if(retry) { - /* if we are to retry, set the result to OK and consider the - request as done */ - result = CURLE_OK; - done = TRUE; - } - } - - if(result) { - /* - * The transfer phase returned error, we mark the connection to get - * closed to prevent being re-used. This is because we can't possibly - * know if the connection is in a good shape or not now. Unless it is - * a protocol which uses two "channels" like FTP, as then the error - * happened in the data connection. - */ - - if(!(data->easy_conn->handler->flags & PROTOPT_DUAL) && - result != CURLE_HTTP2_STREAM) - streamclose(data->easy_conn, "Transfer returned error"); - - Curl_posttransfer(data); - multi_done(&data->easy_conn, result, TRUE); - } - else if(done) { - followtype follow=FOLLOW_NONE; - - /* call this even if the readwrite function returned error */ - Curl_posttransfer(data); - - /* we're no longer receiving */ - Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); - - /* expire the new receiving pipeline head */ - if(data->easy_conn->recv_pipe->head) - Curl_expire_latest(data->easy_conn->recv_pipe->head->ptr, 0); - - /* Check if we can move pending requests to send pipe */ - Curl_multi_process_pending_handles(multi); - - /* When we follow redirects or is set to retry the connection, we must - to go back to the CONNECT state */ - if(data->req.newurl || retry) { - if(!retry) { - /* if the URL is a follow-location and not just a retried request - then figure out the URL here */ - free(newurl); - newurl = data->req.newurl; - data->req.newurl = NULL; - follow = FOLLOW_REDIR; - } - else - follow = FOLLOW_RETRY; - result = multi_done(&data->easy_conn, CURLE_OK, FALSE); - if(!result) { - result = Curl_follow(data, newurl, follow); - if(!result) { - multistate(data, CURLM_STATE_CONNECT); - rc = CURLM_CALL_MULTI_PERFORM; - newurl = NULL; /* handed over the memory ownership to - Curl_follow(), make sure we don't free() it - here */ - } - } - } - else { - /* after the transfer is done, go DONE */ - - /* but first check to see if we got a location info even though we're - not following redirects */ - if(data->req.location) { - free(newurl); - newurl = data->req.location; - data->req.location = NULL; - result = Curl_follow(data, newurl, FOLLOW_FAKE); - if(!result) - newurl = NULL; /* allocation was handed over Curl_follow() */ - else - stream_error = TRUE; - } - - multistate(data, CURLM_STATE_DONE); - rc = CURLM_CALL_MULTI_PERFORM; - } - } - else if(comeback) - rc = CURLM_CALL_MULTI_PERFORM; - - free(newurl); - break; - } - - case CURLM_STATE_DONE: - /* this state is highly transient, so run another loop after this */ - rc = CURLM_CALL_MULTI_PERFORM; - - if(data->easy_conn) { - CURLcode res; - - /* Remove ourselves from the receive pipeline, if we are there. */ - Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); - /* Check if we can move pending requests to send pipe */ - Curl_multi_process_pending_handles(multi); - - /* post-transfer command */ - res = multi_done(&data->easy_conn, result, FALSE); - - /* allow a previously set error code take precedence */ - if(!result) - result = res; - - /* - * If there are other handles on the pipeline, multi_done won't set - * easy_conn to NULL. In such a case, curl_multi_remove_handle() can - * access free'd data, if the connection is free'd and the handle - * removed before we perform the processing in CURLM_STATE_COMPLETED - */ - if(data->easy_conn) - data->easy_conn = NULL; - } - - if(data->set.wildcardmatch) { - if(data->wildcard.state != CURLWC_DONE) { - /* if a wildcard is set and we are not ending -> lets start again - with CURLM_STATE_INIT */ - multistate(data, CURLM_STATE_INIT); - break; - } - } - - /* after we have DONE what we're supposed to do, go COMPLETED, and - it doesn't matter what the multi_done() returned! */ - multistate(data, CURLM_STATE_COMPLETED); - break; - - case CURLM_STATE_COMPLETED: - /* this is a completed transfer, it is likely to still be connected */ - - /* This node should be delinked from the list now and we should post - an information message that we are complete. */ - - /* Important: reset the conn pointer so that we don't point to memory - that could be freed anytime */ - data->easy_conn = NULL; - - Curl_expire_clear(data); /* stop all timers */ - break; - - case CURLM_STATE_MSGSENT: - data->result = result; - return CURLM_OK; /* do nothing */ - - default: - return CURLM_INTERNAL_ERROR; - } - statemachine_end: - - if(data->mstate < CURLM_STATE_COMPLETED) { - if(result) { - /* - * If an error was returned, and we aren't in completed state now, - * then we go to completed and consider this transfer aborted. - */ - - /* NOTE: no attempt to disconnect connections must be made - in the case blocks above - cleanup happens only here */ - - data->state.pipe_broke = FALSE; - - /* Check if we can move pending requests to send pipe */ - Curl_multi_process_pending_handles(multi); - - if(data->easy_conn) { - /* if this has a connection, unsubscribe from the pipelines */ - Curl_pipeline_leave_write(data->easy_conn); - Curl_pipeline_leave_read(data->easy_conn); - Curl_removeHandleFromPipeline(data, data->easy_conn->send_pipe); - Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe); - - if(stream_error) { - /* Don't attempt to send data over a connection that timed out */ - bool dead_connection = result == CURLE_OPERATION_TIMEDOUT; - /* disconnect properly */ - Curl_disconnect(data->easy_conn, dead_connection); - - /* This is where we make sure that the easy_conn pointer is reset. - We don't have to do this in every case block above where a - failure is detected */ - data->easy_conn = NULL; - } - } - else if(data->mstate == CURLM_STATE_CONNECT) { - /* Curl_connect() failed */ - (void)Curl_posttransfer(data); - } - - multistate(data, CURLM_STATE_COMPLETED); - } - /* if there's still a connection to use, call the progress function */ - else if(data->easy_conn && Curl_pgrsUpdate(data->easy_conn)) { - /* aborted due to progress callback return code must close the - connection */ - result = CURLE_ABORTED_BY_CALLBACK; - streamclose(data->easy_conn, "Aborted by callback"); - - /* if not yet in DONE state, go there, otherwise COMPLETED */ - multistate(data, (data->mstate < CURLM_STATE_DONE)? - CURLM_STATE_DONE: CURLM_STATE_COMPLETED); - rc = CURLM_CALL_MULTI_PERFORM; - } - } - - if(CURLM_STATE_COMPLETED == data->mstate) { - /* now fill in the Curl_message with this info */ - msg = &data->msg; - - msg->extmsg.msg = CURLMSG_DONE; - msg->extmsg.easy_handle = data; - msg->extmsg.data.result = result; - - rc = multi_addmsg(multi, msg); - - multistate(data, CURLM_STATE_MSGSENT); - } - } while((rc == CURLM_CALL_MULTI_PERFORM) || multi_ischanged(multi, FALSE)); - - data->result = result; - - - return rc; -} - - -CURLMcode curl_multi_perform(struct Curl_multi *multi, int *running_handles) -{ - struct Curl_easy *data; - CURLMcode returncode=CURLM_OK; - struct Curl_tree *t; - struct timeval now = Curl_tvnow(); - - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - data=multi->easyp; - while(data) { - CURLMcode result; - SIGPIPE_VARIABLE(pipe_st); - - sigpipe_ignore(data, &pipe_st); - result = multi_runsingle(multi, now, data); - sigpipe_restore(&pipe_st); - - if(result) - returncode = result; - - data = data->next; /* operate on next handle */ - } - - /* - * Simply remove all expired timers from the splay since handles are dealt - * with unconditionally by this function and curl_multi_timeout() requires - * that already passed/handled expire times are removed from the splay. - * - * It is important that the 'now' value is set at the entry of this function - * and not for the current time as it may have ticked a little while since - * then and then we risk this loop to remove timers that actually have not - * been handled! - */ - do { - multi->timetree = Curl_splaygetbest(now, multi->timetree, &t); - if(t) - /* the removed may have another timeout in queue */ - (void)add_next_timeout(now, multi, t->payload); - - } while(t); - - *running_handles = multi->num_alive; - - if(CURLM_OK >= returncode) - update_timer(multi); - - return returncode; -} - -static void close_all_connections(struct Curl_multi *multi) -{ - struct connectdata *conn; - - conn = Curl_conncache_find_first_connection(&multi->conn_cache); - while(conn) { - SIGPIPE_VARIABLE(pipe_st); - conn->data = multi->closure_handle; - - sigpipe_ignore(conn->data, &pipe_st); - conn->data->easy_conn = NULL; /* clear the easy handle's connection - pointer */ - /* This will remove the connection from the cache */ - connclose(conn, "kill all"); - (void)Curl_disconnect(conn, FALSE); - sigpipe_restore(&pipe_st); - - conn = Curl_conncache_find_first_connection(&multi->conn_cache); - } -} - -CURLMcode curl_multi_cleanup(struct Curl_multi *multi) -{ - struct Curl_easy *data; - struct Curl_easy *nextdata; - - if(GOOD_MULTI_HANDLE(multi)) { - bool restore_pipe = FALSE; - SIGPIPE_VARIABLE(pipe_st); - - multi->type = 0; /* not good anymore */ - - /* Close all the connections in the connection cache */ - close_all_connections(multi); - - if(multi->closure_handle) { - sigpipe_ignore(multi->closure_handle, &pipe_st); - restore_pipe = TRUE; - - multi->closure_handle->dns.hostcache = &multi->hostcache; - Curl_hostcache_clean(multi->closure_handle, - multi->closure_handle->dns.hostcache); - - Curl_close(multi->closure_handle); - } - - Curl_hash_destroy(&multi->sockhash); - Curl_conncache_destroy(&multi->conn_cache); - Curl_llist_destroy(multi->msglist, NULL); - Curl_llist_destroy(multi->pending, NULL); - - /* remove all easy handles */ - data = multi->easyp; - while(data) { - nextdata=data->next; - if(data->dns.hostcachetype == HCACHE_MULTI) { - /* clear out the usage of the shared DNS cache */ - Curl_hostcache_clean(data, data->dns.hostcache); - data->dns.hostcache = NULL; - data->dns.hostcachetype = HCACHE_NONE; - } - - /* Clear the pointer to the connection cache */ - data->state.conn_cache = NULL; - data->multi = NULL; /* clear the association */ - - data = nextdata; - } - - Curl_hash_destroy(&multi->hostcache); - - /* Free the blacklists by setting them to NULL */ - Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl); - Curl_pipeline_set_server_blacklist(NULL, &multi->pipelining_server_bl); - - free(multi); - if(restore_pipe) - sigpipe_restore(&pipe_st); - - return CURLM_OK; - } - else - return CURLM_BAD_HANDLE; -} - -/* - * curl_multi_info_read() - * - * This function is the primary way for a multi/multi_socket application to - * figure out if a transfer has ended. We MUST make this function as fast as - * possible as it will be polled frequently and we MUST NOT scan any lists in - * here to figure out things. We must scale fine to thousands of handles and - * beyond. The current design is fully O(1). - */ - -CURLMsg *curl_multi_info_read(struct Curl_multi *multi, int *msgs_in_queue) -{ - struct Curl_message *msg; - - *msgs_in_queue = 0; /* default to none */ - - if(GOOD_MULTI_HANDLE(multi) && Curl_llist_count(multi->msglist)) { - /* there is one or more messages in the list */ - struct curl_llist_element *e; - - /* extract the head of the list to return */ - e = multi->msglist->head; - - msg = e->ptr; - - /* remove the extracted entry */ - Curl_llist_remove(multi->msglist, e, NULL); - - *msgs_in_queue = curlx_uztosi(Curl_llist_count(multi->msglist)); - - return &msg->extmsg; - } - else - return NULL; -} - -/* - * singlesocket() checks what sockets we deal with and their "action state" - * and if we have a different state in any of those sockets from last time we - * call the callback accordingly. - */ -static void singlesocket(struct Curl_multi *multi, - struct Curl_easy *data) -{ - curl_socket_t socks[MAX_SOCKSPEREASYHANDLE]; - int i; - struct Curl_sh_entry *entry; - curl_socket_t s; - int num; - unsigned int curraction; - - for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) - socks[i] = CURL_SOCKET_BAD; - - /* Fill in the 'current' struct with the state as it is now: what sockets to - supervise and for what actions */ - curraction = multi_getsock(data, socks, MAX_SOCKSPEREASYHANDLE); - - /* We have 0 .. N sockets already and we get to know about the 0 .. M - sockets we should have from now on. Detect the differences, remove no - longer supervised ones and add new ones */ - - /* walk over the sockets we got right now */ - for(i=0; (i< MAX_SOCKSPEREASYHANDLE) && - (curraction & (GETSOCK_READSOCK(i) | GETSOCK_WRITESOCK(i))); - i++) { - int action = CURL_POLL_NONE; - - s = socks[i]; - - /* get it from the hash */ - entry = sh_getentry(&multi->sockhash, s); - - if(curraction & GETSOCK_READSOCK(i)) - action |= CURL_POLL_IN; - if(curraction & GETSOCK_WRITESOCK(i)) - action |= CURL_POLL_OUT; - - if(entry) { - /* yeps, already present so check if it has the same action set */ - if(entry->action == action) - /* same, continue */ - continue; - } - else { - /* this is a socket we didn't have before, add it! */ - entry = sh_addentry(&multi->sockhash, s, data); - if(!entry) - /* fatal */ - return; - } - - /* we know (entry != NULL) at this point, see the logic above */ - if(multi->socket_cb) - multi->socket_cb(data, - s, - action, - multi->socket_userp, - entry->socketp); - - entry->action = action; /* store the current action state */ - } - - num = i; /* number of sockets */ - - /* when we've walked over all the sockets we should have right now, we must - make sure to detect sockets that are removed */ - for(i=0; i< data->numsocks; i++) { - int j; - s = data->sockets[i]; - for(j=0; jsockhash, s); - if(entry) { - /* this socket has been removed. Tell the app to remove it */ - bool remove_sock_from_hash = TRUE; - - /* check if the socket to be removed serves a connection which has - other easy-s in a pipeline. In this case the socket should not be - removed. */ - struct connectdata *easy_conn = data->easy_conn; - if(easy_conn) { - if(easy_conn->recv_pipe && easy_conn->recv_pipe->size > 1) { - /* the handle should not be removed from the pipe yet */ - remove_sock_from_hash = FALSE; - - /* Update the sockhash entry to instead point to the next in line - for the recv_pipe, or the first (in case this particular easy - isn't already) */ - if(entry->easy == data) { - if(Curl_recvpipe_head(data, easy_conn)) - entry->easy = easy_conn->recv_pipe->head->next->ptr; - else - entry->easy = easy_conn->recv_pipe->head->ptr; - } - } - if(easy_conn->send_pipe && easy_conn->send_pipe->size > 1) { - /* the handle should not be removed from the pipe yet */ - remove_sock_from_hash = FALSE; - - /* Update the sockhash entry to instead point to the next in line - for the send_pipe, or the first (in case this particular easy - isn't already) */ - if(entry->easy == data) { - if(Curl_sendpipe_head(data, easy_conn)) - entry->easy = easy_conn->send_pipe->head->next->ptr; - else - entry->easy = easy_conn->send_pipe->head->ptr; - } - } - /* Don't worry about overwriting recv_pipe head with send_pipe_head, - when action will be asked on the socket (see multi_socket()), the - head of the correct pipe will be taken according to the - action. */ - } - - if(remove_sock_from_hash) { - /* in this case 'entry' is always non-NULL */ - if(multi->socket_cb) - multi->socket_cb(data, - s, - CURL_POLL_REMOVE, - multi->socket_userp, - entry->socketp); - sh_delentry(&multi->sockhash, s); - } - } /* if sockhash entry existed */ - } /* for loop over numsocks */ - - memcpy(data->sockets, socks, num*sizeof(curl_socket_t)); - data->numsocks = num; -} - -/* - * Curl_multi_closed() - * - * Used by the connect code to tell the multi_socket code that one of the - * sockets we were using is about to be closed. This function will then - * remove it from the sockethash for this handle to make the multi_socket API - * behave properly, especially for the case when libcurl will create another - * socket again and it gets the same file descriptor number. - */ - -void Curl_multi_closed(struct connectdata *conn, curl_socket_t s) -{ - struct Curl_multi *multi = conn->data->multi; - if(multi) { - /* this is set if this connection is part of a handle that is added to - a multi handle, and only then this is necessary */ - struct Curl_sh_entry *entry = sh_getentry(&multi->sockhash, s); - - if(entry) { - if(multi->socket_cb) - multi->socket_cb(conn->data, s, CURL_POLL_REMOVE, - multi->socket_userp, - entry->socketp); - - /* now remove it from the socket hash */ - sh_delentry(&multi->sockhash, s); - } - } -} - - - -/* - * add_next_timeout() - * - * Each Curl_easy has a list of timeouts. The add_next_timeout() is called - * when it has just been removed from the splay tree because the timeout has - * expired. This function is then to advance in the list to pick the next - * timeout to use (skip the already expired ones) and add this node back to - * the splay tree again. - * - * The splay tree only has each sessionhandle as a single node and the nearest - * timeout is used to sort it on. - */ -static CURLMcode add_next_timeout(struct timeval now, - struct Curl_multi *multi, - struct Curl_easy *d) -{ - struct timeval *tv = &d->state.expiretime; - struct curl_llist *list = d->state.timeoutlist; - struct curl_llist_element *e; - - /* move over the timeout list for this specific handle and remove all - timeouts that are now passed tense and store the next pending - timeout in *tv */ - for(e = list->head; e;) { - struct curl_llist_element *n = e->next; - time_t diff = curlx_tvdiff(*(struct timeval *)e->ptr, now); - if(diff <= 0) - /* remove outdated entry */ - Curl_llist_remove(list, e, NULL); - else - /* the list is sorted so get out on the first mismatch */ - break; - e = n; - } - e = list->head; - if(!e) { - /* clear the expire times within the handles that we remove from the - splay tree */ - tv->tv_sec = 0; - tv->tv_usec = 0; - } - else { - /* copy the first entry to 'tv' */ - memcpy(tv, e->ptr, sizeof(*tv)); - - /* remove first entry from list */ - Curl_llist_remove(list, e, NULL); - - /* insert this node again into the splay */ - multi->timetree = Curl_splayinsert(*tv, multi->timetree, - &d->state.timenode); - } - return CURLM_OK; -} - -static CURLMcode multi_socket(struct Curl_multi *multi, - bool checkall, - curl_socket_t s, - int ev_bitmask, - int *running_handles) -{ - CURLMcode result = CURLM_OK; - struct Curl_easy *data = NULL; - struct Curl_tree *t; - struct timeval now = Curl_tvnow(); - - if(checkall) { - /* *perform() deals with running_handles on its own */ - result = curl_multi_perform(multi, running_handles); - - /* walk through each easy handle and do the socket state change magic - and callbacks */ - if(result != CURLM_BAD_HANDLE) { - data=multi->easyp; - while(data) { - singlesocket(multi, data); - data = data->next; - } - } - - /* or should we fall-through and do the timer-based stuff? */ - return result; - } - else if(s != CURL_SOCKET_TIMEOUT) { - - struct Curl_sh_entry *entry = sh_getentry(&multi->sockhash, s); - - if(!entry) - /* Unmatched socket, we can't act on it but we ignore this fact. In - real-world tests it has been proved that libevent can in fact give - the application actions even though the socket was just previously - asked to get removed, so thus we better survive stray socket actions - and just move on. */ - ; - else { - SIGPIPE_VARIABLE(pipe_st); - - data = entry->easy; - - if(data->magic != CURLEASY_MAGIC_NUMBER) - /* bad bad bad bad bad bad bad */ - return CURLM_INTERNAL_ERROR; - - /* If the pipeline is enabled, take the handle which is in the head of - the pipeline. If we should write into the socket, take the send_pipe - head. If we should read from the socket, take the recv_pipe head. */ - if(data->easy_conn) { - if((ev_bitmask & CURL_POLL_OUT) && - data->easy_conn->send_pipe && - data->easy_conn->send_pipe->head) - data = data->easy_conn->send_pipe->head->ptr; - else if((ev_bitmask & CURL_POLL_IN) && - data->easy_conn->recv_pipe && - data->easy_conn->recv_pipe->head) - data = data->easy_conn->recv_pipe->head->ptr; - } - - if(data->easy_conn && - !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK)) - /* set socket event bitmask if they're not locked */ - data->easy_conn->cselect_bits = ev_bitmask; - - sigpipe_ignore(data, &pipe_st); - result = multi_runsingle(multi, now, data); - sigpipe_restore(&pipe_st); - - if(data->easy_conn && - !(data->easy_conn->handler->flags & PROTOPT_DIRLOCK)) - /* clear the bitmask only if not locked */ - data->easy_conn->cselect_bits = 0; - - if(CURLM_OK >= result) - /* get the socket(s) and check if the state has been changed since - last */ - singlesocket(multi, data); - - /* Now we fall-through and do the timer-based stuff, since we don't want - to force the user to have to deal with timeouts as long as at least - one connection in fact has traffic. */ - - data = NULL; /* set data to NULL again to avoid calling - multi_runsingle() in case there's no need to */ - now = Curl_tvnow(); /* get a newer time since the multi_runsingle() loop - may have taken some time */ - } - } - else { - /* Asked to run due to time-out. Clear the 'lastcall' variable to force - update_timer() to trigger a callback to the app again even if the same - timeout is still the one to run after this call. That handles the case - when the application asks libcurl to run the timeout prematurely. */ - memset(&multi->timer_lastcall, 0, sizeof(multi->timer_lastcall)); - } - - /* - * The loop following here will go on as long as there are expire-times left - * to process in the splay and 'data' will be re-assigned for every expired - * handle we deal with. - */ - do { - /* the first loop lap 'data' can be NULL */ - if(data) { - SIGPIPE_VARIABLE(pipe_st); - - sigpipe_ignore(data, &pipe_st); - result = multi_runsingle(multi, now, data); - sigpipe_restore(&pipe_st); - - if(CURLM_OK >= result) - /* get the socket(s) and check if the state has been changed since - last */ - singlesocket(multi, data); - } - - /* Check if there's one (more) expired timer to deal with! This function - extracts a matching node if there is one */ - - multi->timetree = Curl_splaygetbest(now, multi->timetree, &t); - if(t) { - data = t->payload; /* assign this for next loop */ - (void)add_next_timeout(now, multi, t->payload); - } - - } while(t); - - *running_handles = multi->num_alive; - return result; -} - -#undef curl_multi_setopt -CURLMcode curl_multi_setopt(struct Curl_multi *multi, - CURLMoption option, ...) -{ - CURLMcode res = CURLM_OK; - va_list param; - - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - va_start(param, option); - - switch(option) { - case CURLMOPT_SOCKETFUNCTION: - multi->socket_cb = va_arg(param, curl_socket_callback); - break; - case CURLMOPT_SOCKETDATA: - multi->socket_userp = va_arg(param, void *); - break; - case CURLMOPT_PUSHFUNCTION: - multi->push_cb = va_arg(param, curl_push_callback); - break; - case CURLMOPT_PUSHDATA: - multi->push_userp = va_arg(param, void *); - break; - case CURLMOPT_PIPELINING: - multi->pipelining = va_arg(param, long); - break; - case CURLMOPT_TIMERFUNCTION: - multi->timer_cb = va_arg(param, curl_multi_timer_callback); - break; - case CURLMOPT_TIMERDATA: - multi->timer_userp = va_arg(param, void *); - break; - case CURLMOPT_MAXCONNECTS: - multi->maxconnects = va_arg(param, long); - break; - case CURLMOPT_MAX_HOST_CONNECTIONS: - multi->max_host_connections = va_arg(param, long); - break; - case CURLMOPT_MAX_PIPELINE_LENGTH: - multi->max_pipeline_length = va_arg(param, long); - break; - case CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE: - multi->content_length_penalty_size = va_arg(param, long); - break; - case CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE: - multi->chunk_length_penalty_size = va_arg(param, long); - break; - case CURLMOPT_PIPELINING_SITE_BL: - res = Curl_pipeline_set_site_blacklist(va_arg(param, char **), - &multi->pipelining_site_bl); - break; - case CURLMOPT_PIPELINING_SERVER_BL: - res = Curl_pipeline_set_server_blacklist(va_arg(param, char **), - &multi->pipelining_server_bl); - break; - case CURLMOPT_MAX_TOTAL_CONNECTIONS: - multi->max_total_connections = va_arg(param, long); - break; - default: - res = CURLM_UNKNOWN_OPTION; - break; - } - va_end(param); - return res; -} - -/* we define curl_multi_socket() in the public multi.h header */ -#undef curl_multi_socket - -CURLMcode curl_multi_socket(struct Curl_multi *multi, curl_socket_t s, - int *running_handles) -{ - CURLMcode result = multi_socket(multi, FALSE, s, 0, running_handles); - if(CURLM_OK >= result) - update_timer(multi); - return result; -} - -CURLMcode curl_multi_socket_action(struct Curl_multi *multi, curl_socket_t s, - int ev_bitmask, int *running_handles) -{ - CURLMcode result = multi_socket(multi, FALSE, s, - ev_bitmask, running_handles); - if(CURLM_OK >= result) - update_timer(multi); - return result; -} - -CURLMcode curl_multi_socket_all(struct Curl_multi *multi, int *running_handles) - -{ - CURLMcode result = multi_socket(multi, TRUE, CURL_SOCKET_BAD, 0, - running_handles); - if(CURLM_OK >= result) - update_timer(multi); - return result; -} - -static CURLMcode multi_timeout(struct Curl_multi *multi, - long *timeout_ms) -{ - static struct timeval tv_zero = {0, 0}; - - if(multi->timetree) { - /* we have a tree of expire times */ - struct timeval now = Curl_tvnow(); - - /* splay the lowest to the bottom */ - multi->timetree = Curl_splay(tv_zero, multi->timetree); - - if(Curl_splaycomparekeys(multi->timetree->key, now) > 0) { - /* some time left before expiration */ - *timeout_ms = (long)curlx_tvdiff(multi->timetree->key, now); - if(!*timeout_ms) - /* - * Since we only provide millisecond resolution on the returned value - * and the diff might be less than one millisecond here, we don't - * return zero as that may cause short bursts of busyloops on fast - * processors while the diff is still present but less than one - * millisecond! instead we return 1 until the time is ripe. - */ - *timeout_ms=1; - } - else - /* 0 means immediately */ - *timeout_ms = 0; - } - else - *timeout_ms = -1; - - return CURLM_OK; -} - -CURLMcode curl_multi_timeout(struct Curl_multi *multi, - long *timeout_ms) -{ - /* First, make some basic checks that the CURLM handle is a good handle */ - if(!GOOD_MULTI_HANDLE(multi)) - return CURLM_BAD_HANDLE; - - return multi_timeout(multi, timeout_ms); -} - -/* - * Tell the application it should update its timers, if it subscribes to the - * update timer callback. - */ -static int update_timer(struct Curl_multi *multi) -{ - long timeout_ms; - - if(!multi->timer_cb) - return 0; - if(multi_timeout(multi, &timeout_ms)) { - return -1; - } - if(timeout_ms < 0) { - static const struct timeval none={0, 0}; - if(Curl_splaycomparekeys(none, multi->timer_lastcall)) { - multi->timer_lastcall = none; - /* there's no timeout now but there was one previously, tell the app to - disable it */ - return multi->timer_cb(multi, -1, multi->timer_userp); - } - return 0; - } - - /* When multi_timeout() is done, multi->timetree points to the node with the - * timeout we got the (relative) time-out time for. We can thus easily check - * if this is the same (fixed) time as we got in a previous call and then - * avoid calling the callback again. */ - if(Curl_splaycomparekeys(multi->timetree->key, multi->timer_lastcall) == 0) - return 0; - - multi->timer_lastcall = multi->timetree->key; - - return multi->timer_cb(multi, timeout_ms, multi->timer_userp); -} - -/* - * multi_freetimeout() - * - * Callback used by the llist system when a single timeout list entry is - * destroyed. - */ -static void multi_freetimeout(void *user, void *entryptr) -{ - (void)user; - - /* the entry was plain malloc()'ed */ - free(entryptr); -} - -/* - * multi_addtimeout() - * - * Add a timestamp to the list of timeouts. Keep the list sorted so that head - * of list is always the timeout nearest in time. - * - */ -static CURLMcode -multi_addtimeout(struct curl_llist *timeoutlist, - struct timeval *stamp) -{ - struct curl_llist_element *e; - struct timeval *timedup; - struct curl_llist_element *prev = NULL; - - timedup = malloc(sizeof(*timedup)); - if(!timedup) - return CURLM_OUT_OF_MEMORY; - - /* copy the timestamp */ - memcpy(timedup, stamp, sizeof(*timedup)); - - if(Curl_llist_count(timeoutlist)) { - /* find the correct spot in the list */ - for(e = timeoutlist->head; e; e = e->next) { - struct timeval *checktime = e->ptr; - time_t diff = curlx_tvdiff(*checktime, *timedup); - if(diff > 0) - break; - prev = e; - } - - } - /* else - this is the first timeout on the list */ - - if(!Curl_llist_insert_next(timeoutlist, prev, timedup)) { - free(timedup); - return CURLM_OUT_OF_MEMORY; - } - - return CURLM_OK; -} - -/* - * Curl_expire() - * - * given a number of milliseconds from now to use to set the 'act before - * this'-time for the transfer, to be extracted by curl_multi_timeout() - * - * The timeout will be added to a queue of timeouts if it defines a moment in - * time that is later than the current head of queue. - */ -void Curl_expire(struct Curl_easy *data, time_t milli) -{ - struct Curl_multi *multi = data->multi; - struct timeval *nowp = &data->state.expiretime; - int rc; - struct timeval set; - - /* this is only interesting while there is still an associated multi struct - remaining! */ - if(!multi) - return; - - set = Curl_tvnow(); - set.tv_sec += (long)(milli/1000); - set.tv_usec += (milli%1000)*1000; - - if(set.tv_usec >= 1000000) { - set.tv_sec++; - set.tv_usec -= 1000000; - } - - if(nowp->tv_sec || nowp->tv_usec) { - /* This means that the struct is added as a node in the splay tree. - Compare if the new time is earlier, and only remove-old/add-new if it - is. */ - time_t diff = curlx_tvdiff(set, *nowp); - if(diff > 0) { - /* the new expire time was later so just add it to the queue - and get out */ - multi_addtimeout(data->state.timeoutlist, &set); - return; - } - - /* the new time is newer than the presently set one, so add the current - to the queue and update the head */ - multi_addtimeout(data->state.timeoutlist, nowp); - - /* Since this is an updated time, we must remove the previous entry from - the splay tree first and then re-add the new value */ - rc = Curl_splayremovebyaddr(multi->timetree, - &data->state.timenode, - &multi->timetree); - if(rc) - infof(data, "Internal error removing splay node = %d\n", rc); - } - - *nowp = set; - data->state.timenode.payload = data; - multi->timetree = Curl_splayinsert(*nowp, multi->timetree, - &data->state.timenode); -} - -/* - * Curl_expire_latest() - * - * This is like Curl_expire() but will only add a timeout node to the list of - * timers if there is no timeout that will expire before the given time. - * - * Use this function if the code logic risks calling this function many times - * or if there's no particular conditional wait in the code for this specific - * time-out period to expire. - * - */ -void Curl_expire_latest(struct Curl_easy *data, time_t milli) -{ - struct timeval *expire = &data->state.expiretime; - - struct timeval set; - - set = Curl_tvnow(); - set.tv_sec += (long)(milli / 1000); - set.tv_usec += (milli % 1000) * 1000; - - if(set.tv_usec >= 1000000) { - set.tv_sec++; - set.tv_usec -= 1000000; - } - - if(expire->tv_sec || expire->tv_usec) { - /* This means that the struct is added as a node in the splay tree. - Compare if the new time is earlier, and only remove-old/add-new if it - is. */ - time_t diff = curlx_tvdiff(set, *expire); - if(diff > 0) - /* the new expire time was later than the top time, so just skip this */ - return; - } - - /* Just add the timeout like normal */ - Curl_expire(data, milli); -} - - -/* - * Curl_expire_clear() - * - * Clear ALL timeout values for this handle. - */ -void Curl_expire_clear(struct Curl_easy *data) -{ - struct Curl_multi *multi = data->multi; - struct timeval *nowp = &data->state.expiretime; - int rc; - - /* this is only interesting while there is still an associated multi struct - remaining! */ - if(!multi) - return; - - if(nowp->tv_sec || nowp->tv_usec) { - /* Since this is an cleared time, we must remove the previous entry from - the splay tree */ - struct curl_llist *list = data->state.timeoutlist; - - rc = Curl_splayremovebyaddr(multi->timetree, - &data->state.timenode, - &multi->timetree); - if(rc) - infof(data, "Internal error clearing splay node = %d\n", rc); - - /* flush the timeout list too */ - while(list->size > 0) - Curl_llist_remove(list, list->tail, NULL); - -#ifdef DEBUGBUILD - infof(data, "Expire cleared\n"); -#endif - nowp->tv_sec = 0; - nowp->tv_usec = 0; - } -} - - - - -CURLMcode curl_multi_assign(struct Curl_multi *multi, curl_socket_t s, - void *hashp) -{ - struct Curl_sh_entry *there = NULL; - - there = sh_getentry(&multi->sockhash, s); - - if(!there) - return CURLM_BAD_SOCKET; - - there->socketp = hashp; - - return CURLM_OK; -} - -size_t Curl_multi_max_host_connections(struct Curl_multi *multi) -{ - return multi ? multi->max_host_connections : 0; -} - -size_t Curl_multi_max_total_connections(struct Curl_multi *multi) -{ - return multi ? multi->max_total_connections : 0; -} - -curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi) -{ - return multi ? multi->content_length_penalty_size : 0; -} - -curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi) -{ - return multi ? multi->chunk_length_penalty_size : 0; -} - -struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi) -{ - return multi->pipelining_site_bl; -} - -struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi) -{ - return multi->pipelining_server_bl; -} - -void Curl_multi_process_pending_handles(struct Curl_multi *multi) -{ - struct curl_llist_element *e = multi->pending->head; - - while(e) { - struct Curl_easy *data = e->ptr; - struct curl_llist_element *next = e->next; - - if(data->mstate == CURLM_STATE_CONNECT_PEND) { - multistate(data, CURLM_STATE_CONNECT); - - /* Remove this node from the list */ - Curl_llist_remove(multi->pending, e, NULL); - - /* Make sure that the handle will be processed soonish. */ - Curl_expire_latest(data, 0); - } - - e = next; /* operate on next handle */ - } -} - -#ifdef DEBUGBUILD -void Curl_multi_dump(struct Curl_multi *multi) -{ - struct Curl_easy *data; - int i; - fprintf(stderr, "* Multi status: %d handles, %d alive\n", - multi->num_easy, multi->num_alive); - for(data=multi->easyp; data; data = data->next) { - if(data->mstate < CURLM_STATE_COMPLETED) { - /* only display handles that are not completed */ - fprintf(stderr, "handle %p, state %s, %d sockets\n", - (void *)data, - statename[data->mstate], data->numsocks); - for(i=0; i < data->numsocks; i++) { - curl_socket_t s = data->sockets[i]; - struct Curl_sh_entry *entry = sh_getentry(&multi->sockhash, s); - - fprintf(stderr, "%d ", (int)s); - if(!entry) { - fprintf(stderr, "INTERNAL CONFUSION\n"); - continue; - } - fprintf(stderr, "[%s %s] ", - entry->action&CURL_POLL_IN?"RECVING":"", - entry->action&CURL_POLL_OUT?"SENDING":""); - } - if(data->numsocks) - fprintf(stderr, "\n"); - } - } -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/multihandle.h b/build/premake/premake5/contrib/curl/lib/multihandle.h deleted file mode 100644 index 0b78de943b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/multihandle.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef HEADER_CURL_MULTIHANDLE_H -#define HEADER_CURL_MULTIHANDLE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "conncache.h" - -struct Curl_message { - /* the 'CURLMsg' is the part that is visible to the external user */ - struct CURLMsg extmsg; -}; - -/* NOTE: if you add a state here, add the name to the statename[] array as - well! -*/ -typedef enum { - CURLM_STATE_INIT, /* 0 - start in this state */ - CURLM_STATE_CONNECT_PEND, /* 1 - no connections, waiting for one */ - CURLM_STATE_CONNECT, /* 2 - resolve/connect has been sent off */ - CURLM_STATE_WAITRESOLVE, /* 3 - awaiting the resolve to finalize */ - CURLM_STATE_WAITCONNECT, /* 4 - awaiting the TCP connect to finalize */ - CURLM_STATE_WAITPROXYCONNECT, /* 5 - awaiting HTTPS proxy SSL initialization - to complete and/or proxy CONNECT to - finalize */ - CURLM_STATE_SENDPROTOCONNECT, /* 6 - initiate protocol connect procedure */ - CURLM_STATE_PROTOCONNECT, /* 7 - completing the protocol-specific connect - phase */ - CURLM_STATE_WAITDO, /* 8 - wait for our turn to send the request */ - CURLM_STATE_DO, /* 9 - start send off the request (part 1) */ - CURLM_STATE_DOING, /* 10 - sending off the request (part 1) */ - CURLM_STATE_DO_MORE, /* 11 - send off the request (part 2) */ - CURLM_STATE_DO_DONE, /* 12 - done sending off request */ - CURLM_STATE_WAITPERFORM, /* 13 - wait for our turn to read the response */ - CURLM_STATE_PERFORM, /* 14 - transfer data */ - CURLM_STATE_TOOFAST, /* 15 - wait because limit-rate exceeded */ - CURLM_STATE_DONE, /* 16 - post data transfer operation */ - CURLM_STATE_COMPLETED, /* 17 - operation complete */ - CURLM_STATE_MSGSENT, /* 18 - the operation complete message is sent */ - CURLM_STATE_LAST /* 19 - not a true state, never use this */ -} CURLMstate; - -/* we support N sockets per easy handle. Set the corresponding bit to what - action we should wait for */ -#define MAX_SOCKSPEREASYHANDLE 5 -#define GETSOCK_READABLE (0x00ff) -#define GETSOCK_WRITABLE (0xff00) - -#define CURLPIPE_ANY (CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX) - -/* This is the struct known as CURLM on the outside */ -struct Curl_multi { - /* First a simple identifier to easier detect if a user mix up - this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */ - long type; - - /* We have a doubly-linked circular list with easy handles */ - struct Curl_easy *easyp; - struct Curl_easy *easylp; /* last node */ - - int num_easy; /* amount of entries in the linked list above. */ - int num_alive; /* amount of easy handles that are added but have not yet - reached COMPLETE state */ - - struct curl_llist *msglist; /* a list of messages from completed transfers */ - - struct curl_llist *pending; /* Curl_easys that are in the - CURLM_STATE_CONNECT_PEND state */ - - /* callback function and user data pointer for the *socket() API */ - curl_socket_callback socket_cb; - void *socket_userp; - - /* callback function and user data pointer for server push */ - curl_push_callback push_cb; - void *push_userp; - - /* Hostname cache */ - struct curl_hash hostcache; - - /* timetree points to the splay-tree of time nodes to figure out expire - times of all currently set timers */ - struct Curl_tree *timetree; - - /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note - the pluralis form, there can be more than one easy handle waiting on the - same actual socket) */ - struct curl_hash sockhash; - - /* pipelining wanted bits (CURLPIPE*) */ - long pipelining; - - bool recheckstate; /* see Curl_multi_connchanged */ - - /* Shared connection cache (bundles)*/ - struct conncache conn_cache; - - /* This handle will be used for closing the cached connections in - curl_multi_cleanup() */ - struct Curl_easy *closure_handle; - - long maxconnects; /* if >0, a fixed limit of the maximum number of entries - we're allowed to grow the connection cache to */ - - long max_host_connections; /* if >0, a fixed limit of the maximum number - of connections per host */ - - long max_total_connections; /* if >0, a fixed limit of the maximum number - of connections in total */ - - long max_pipeline_length; /* if >0, maximum number of requests in a - pipeline */ - - long content_length_penalty_size; /* a connection with a - content-length bigger than - this is not considered - for pipelining */ - - long chunk_length_penalty_size; /* a connection with a chunk length - bigger than this is not - considered for pipelining */ - - struct curl_llist *pipelining_site_bl; /* List of sites that are blacklisted - from pipelining */ - - struct curl_llist *pipelining_server_bl; /* List of server types that are - blacklisted from pipelining */ - - /* timer callback and user data pointer for the *socket() API */ - curl_multi_timer_callback timer_cb; - void *timer_userp; - struct timeval timer_lastcall; /* the fixed time for the timeout for the - previous callback */ -}; - -#endif /* HEADER_CURL_MULTIHANDLE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/multiif.h b/build/premake/premake5/contrib/curl/lib/multiif.h deleted file mode 100644 index e5de1fc493..0000000000 --- a/build/premake/premake5/contrib/curl/lib/multiif.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef HEADER_CURL_MULTIIF_H -#define HEADER_CURL_MULTIIF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Prototypes for library-wide functions provided by multi.c - */ -void Curl_expire(struct Curl_easy *data, time_t milli); -void Curl_expire_clear(struct Curl_easy *data); -void Curl_expire_latest(struct Curl_easy *data, time_t milli); -bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits); -void Curl_multi_handlePipeBreak(struct Curl_easy *data); - -/* Internal version of curl_multi_init() accepts size parameters for the - socket and connection hashes */ -struct Curl_multi *Curl_multi_handle(int hashsize, int chashsize); - -/* the write bits start at bit 16 for the *getsock() bitmap */ -#define GETSOCK_WRITEBITSTART 16 - -#define GETSOCK_BLANK 0 /* no bits set */ - -/* set the bit for the given sock number to make the bitmap for writable */ -#define GETSOCK_WRITESOCK(x) (1 << (GETSOCK_WRITEBITSTART + (x))) - -/* set the bit for the given sock number to make the bitmap for readable */ -#define GETSOCK_READSOCK(x) (1 << (x)) - -#ifdef DEBUGBUILD - /* - * Curl_multi_dump is not a stable public function, this is only meant to - * allow easier tracking of the internal handle's state and what sockets - * they use. Only for research and development DEBUGBUILD enabled builds. - */ -void Curl_multi_dump(struct Curl_multi *multi); -#endif - -void Curl_multi_process_pending_handles(struct Curl_multi *multi); - -/* Return the value of the CURLMOPT_MAX_HOST_CONNECTIONS option */ -size_t Curl_multi_max_host_connections(struct Curl_multi *multi); - -/* Return the value of the CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE option */ -curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi); - -/* Return the value of the CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE option */ -curl_off_t Curl_multi_chunk_length_penalty_size(struct Curl_multi *multi); - -/* Return the value of the CURLMOPT_PIPELINING_SITE_BL option */ -struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi); - -/* Return the value of the CURLMOPT_PIPELINING_SERVER_BL option */ -struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi); - -/* Return the value of the CURLMOPT_MAX_TOTAL_CONNECTIONS option */ -size_t Curl_multi_max_total_connections(struct Curl_multi *multi); - -void Curl_multi_connchanged(struct Curl_multi *multi); - -/* - * Curl_multi_closed() - * - * Used by the connect code to tell the multi_socket code that one of the - * sockets we were using is about to be closed. This function will then - * remove it from the sockethash for this handle to make the multi_socket API - * behave properly, especially for the case when libcurl will create another - * socket again and it gets the same file descriptor number. - */ - -void Curl_multi_closed(struct connectdata *conn, curl_socket_t s); - -/* - * Add a handle and move it into PERFORM state at once. For pushed streams. - */ -CURLMcode Curl_multi_add_perform(struct Curl_multi *multi, - struct Curl_easy *data, - struct connectdata *conn); -#endif /* HEADER_CURL_MULTIIF_H */ diff --git a/build/premake/premake5/contrib/curl/lib/netrc.c b/build/premake/premake5/contrib/curl/lib/netrc.c deleted file mode 100644 index 996711d119..0000000000 --- a/build/premake/premake5/contrib/curl/lib/netrc.c +++ /dev/null @@ -1,201 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_PWD_H -#include -#endif - -#include -#include "netrc.h" -#include "strtok.h" -#include "strcase.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Get user and password from .netrc when given a machine name */ - -enum host_lookup_state { - NOTHING, - HOSTFOUND, /* the 'machine' keyword was found */ - HOSTVALID /* this is "our" machine! */ -}; - -/* - * @unittest: 1304 - * - * *loginp and *passwordp MUST be allocated if they aren't NULL when passed - * in. - */ -int Curl_parsenetrc(const char *host, - char **loginp, - char **passwordp, - char *netrcfile) -{ - FILE *file; - int retcode=1; - int specific_login = (*loginp && **loginp != 0); - bool netrc_alloc = FALSE; - enum host_lookup_state state=NOTHING; - - char state_login=0; /* Found a login keyword */ - char state_password=0; /* Found a password keyword */ - int state_our_login=FALSE; /* With specific_login, found *our* login name */ - -#define NETRC DOT_CHAR "netrc" - - if(!netrcfile) { - bool home_alloc = FALSE; - char *home = curl_getenv("HOME"); /* portable environment reader */ - if(home) { - home_alloc = TRUE; -#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID) - } - else { - struct passwd pw, *pw_res; - char pwbuf[1024]; - if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) - && pw_res) { - home = strdup(pw.pw_dir); - if(!home) - return CURLE_OUT_OF_MEMORY; - home_alloc = TRUE; - } -#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID) - } - else { - struct passwd *pw; - pw= getpwuid(geteuid()); - if(pw) { - home = pw->pw_dir; - } -#endif - } - - if(!home) - return retcode; /* no home directory found (or possibly out of memory) */ - - netrcfile = curl_maprintf("%s%s%s", home, DIR_CHAR, NETRC); - if(home_alloc) - free(home); - if(!netrcfile) { - return -1; - } - netrc_alloc = TRUE; - } - - file = fopen(netrcfile, FOPEN_READTEXT); - if(netrc_alloc) - free(netrcfile); - if(file) { - char *tok; - char *tok_buf; - bool done=FALSE; - char netrcbuffer[256]; - int netrcbuffsize = (int)sizeof(netrcbuffer); - - while(!done && fgets(netrcbuffer, netrcbuffsize, file)) { - tok=strtok_r(netrcbuffer, " \t\n", &tok_buf); - while(!done && tok) { - - if((*loginp && **loginp) && (*passwordp && **passwordp)) { - done=TRUE; - break; - } - - switch(state) { - case NOTHING: - if(strcasecompare("machine", tok)) { - /* the next tok is the machine name, this is in itself the - delimiter that starts the stuff entered for this machine, - after this we need to search for 'login' and - 'password'. */ - state=HOSTFOUND; - } - else if(strcasecompare("default", tok)) { - state=HOSTVALID; - retcode=0; /* we did find our host */ - } - break; - case HOSTFOUND: - if(strcasecompare(host, tok)) { - /* and yes, this is our host! */ - state=HOSTVALID; - retcode=0; /* we did find our host */ - } - else - /* not our host */ - state=NOTHING; - break; - case HOSTVALID: - /* we are now parsing sub-keywords concerning "our" host */ - if(state_login) { - if(specific_login) { - state_our_login = strcasecompare(*loginp, tok); - } - else { - free(*loginp); - *loginp = strdup(tok); - if(!*loginp) { - retcode = -1; /* allocation failed */ - goto out; - } - } - state_login=0; - } - else if(state_password) { - if(state_our_login || !specific_login) { - free(*passwordp); - *passwordp = strdup(tok); - if(!*passwordp) { - retcode = -1; /* allocation failed */ - goto out; - } - } - state_password=0; - } - else if(strcasecompare("login", tok)) - state_login=1; - else if(strcasecompare("password", tok)) - state_password=1; - else if(strcasecompare("machine", tok)) { - /* ok, there's machine here go => */ - state = HOSTFOUND; - state_our_login = FALSE; - } - break; - } /* switch (state) */ - - tok = strtok_r(NULL, " \t\n", &tok_buf); - } /* while(tok) */ - } /* while fgets() */ - - out: - fclose(file); - } - - return retcode; -} diff --git a/build/premake/premake5/contrib/curl/lib/netrc.h b/build/premake/premake5/contrib/curl/lib/netrc.h deleted file mode 100644 index d980166e6b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/netrc.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef HEADER_CURL_NETRC_H -#define HEADER_CURL_NETRC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */ -int Curl_parsenetrc(const char *host, - char **loginp, - char **passwordp, - char *filename); - /* Assume: (*passwordp)[0]=0, host[0] != 0. - * If (*loginp)[0] = 0, search for login and password within a machine - * section in the netrc. - * If (*loginp)[0] != 0, search for password within machine and login. - */ - -#endif /* HEADER_CURL_NETRC_H */ diff --git a/build/premake/premake5/contrib/curl/lib/non-ascii.c b/build/premake/premake5/contrib/curl/lib/non-ascii.c deleted file mode 100644 index 2f5de4c681..0000000000 --- a/build/premake/premake5/contrib/curl/lib/non-ascii.c +++ /dev/null @@ -1,338 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef CURL_DOES_CONVERSIONS - -#include - -#include "non-ascii.h" -#include "formdata.h" -#include "sendf.h" -#include "urldata.h" - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -#ifdef HAVE_ICONV -#include -/* set default codesets for iconv */ -#ifndef CURL_ICONV_CODESET_OF_NETWORK -#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1" -#endif -#ifndef CURL_ICONV_CODESET_FOR_UTF8 -#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8" -#endif -#define ICONV_ERROR (size_t)-1 -#endif /* HAVE_ICONV */ - -/* - * Curl_convert_clone() returns a malloced copy of the source string (if - * returning CURLE_OK), with the data converted to network format. - */ -CURLcode Curl_convert_clone(struct Curl_easy *data, - const char *indata, - size_t insize, - char **outbuf) -{ - char *convbuf; - CURLcode result; - - convbuf = malloc(insize); - if(!convbuf) - return CURLE_OUT_OF_MEMORY; - - memcpy(convbuf, indata, insize); - result = Curl_convert_to_network(data, convbuf, insize); - if(result) { - free(convbuf); - return result; - } - - *outbuf = convbuf; /* return the converted buffer */ - - return CURLE_OK; -} - -/* - * Curl_convert_to_network() is an internal function for performing ASCII - * conversions on non-ASCII platforms. It convers the buffer _in place_. - */ -CURLcode Curl_convert_to_network(struct Curl_easy *data, - char *buffer, size_t length) -{ - if(data->set.convtonetwork) { - /* use translation callback */ - CURLcode result = data->set.convtonetwork(buffer, length); - if(result) { - failf(data, - "CURLOPT_CONV_TO_NETWORK_FUNCTION callback returned %d: %s", - (int)result, curl_easy_strerror(result)); - } - - return result; - } - else { -#ifdef HAVE_ICONV - /* do the translation ourselves */ - char *input_ptr, *output_ptr; - size_t in_bytes, out_bytes, rc; - int error; - - /* open an iconv conversion descriptor if necessary */ - if(data->outbound_cd == (iconv_t)-1) { - data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK, - CURL_ICONV_CODESET_OF_HOST); - if(data->outbound_cd == (iconv_t)-1) { - error = ERRNO; - failf(data, - "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s", - CURL_ICONV_CODESET_OF_NETWORK, - CURL_ICONV_CODESET_OF_HOST, - error, strerror(error)); - return CURLE_CONV_FAILED; - } - } - /* call iconv */ - input_ptr = output_ptr = buffer; - in_bytes = out_bytes = length; - rc = iconv(data->outbound_cd, (const char **)&input_ptr, &in_bytes, - &output_ptr, &out_bytes); - if((rc == ICONV_ERROR) || (in_bytes != 0)) { - error = ERRNO; - failf(data, - "The Curl_convert_to_network iconv call failed with errno %i: %s", - error, strerror(error)); - return CURLE_CONV_FAILED; - } -#else - failf(data, "CURLOPT_CONV_TO_NETWORK_FUNCTION callback required"); - return CURLE_CONV_REQD; -#endif /* HAVE_ICONV */ - } - - return CURLE_OK; -} - -/* - * Curl_convert_from_network() is an internal function for performing ASCII - * conversions on non-ASCII platforms. It convers the buffer _in place_. - */ -CURLcode Curl_convert_from_network(struct Curl_easy *data, - char *buffer, size_t length) -{ - if(data->set.convfromnetwork) { - /* use translation callback */ - CURLcode result = data->set.convfromnetwork(buffer, length); - if(result) { - failf(data, - "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback returned %d: %s", - (int)result, curl_easy_strerror(result)); - } - - return result; - } - else { -#ifdef HAVE_ICONV - /* do the translation ourselves */ - char *input_ptr, *output_ptr; - size_t in_bytes, out_bytes, rc; - int error; - - /* open an iconv conversion descriptor if necessary */ - if(data->inbound_cd == (iconv_t)-1) { - data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_OF_NETWORK); - if(data->inbound_cd == (iconv_t)-1) { - error = ERRNO; - failf(data, - "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s", - CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_OF_NETWORK, - error, strerror(error)); - return CURLE_CONV_FAILED; - } - } - /* call iconv */ - input_ptr = output_ptr = buffer; - in_bytes = out_bytes = length; - rc = iconv(data->inbound_cd, (const char **)&input_ptr, &in_bytes, - &output_ptr, &out_bytes); - if((rc == ICONV_ERROR) || (in_bytes != 0)) { - error = ERRNO; - failf(data, - "Curl_convert_from_network iconv call failed with errno %i: %s", - error, strerror(error)); - return CURLE_CONV_FAILED; - } -#else - failf(data, "CURLOPT_CONV_FROM_NETWORK_FUNCTION callback required"); - return CURLE_CONV_REQD; -#endif /* HAVE_ICONV */ - } - - return CURLE_OK; -} - -/* - * Curl_convert_from_utf8() is an internal function for performing UTF-8 - * conversions on non-ASCII platforms. - */ -CURLcode Curl_convert_from_utf8(struct Curl_easy *data, - char *buffer, size_t length) -{ - if(data->set.convfromutf8) { - /* use translation callback */ - CURLcode result = data->set.convfromutf8(buffer, length); - if(result) { - failf(data, - "CURLOPT_CONV_FROM_UTF8_FUNCTION callback returned %d: %s", - (int)result, curl_easy_strerror(result)); - } - - return result; - } - else { -#ifdef HAVE_ICONV - /* do the translation ourselves */ - const char *input_ptr; - char *output_ptr; - size_t in_bytes, out_bytes, rc; - int error; - - /* open an iconv conversion descriptor if necessary */ - if(data->utf8_cd == (iconv_t)-1) { - data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_FOR_UTF8); - if(data->utf8_cd == (iconv_t)-1) { - error = ERRNO; - failf(data, - "The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s", - CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_FOR_UTF8, - error, strerror(error)); - return CURLE_CONV_FAILED; - } - } - /* call iconv */ - input_ptr = output_ptr = buffer; - in_bytes = out_bytes = length; - rc = iconv(data->utf8_cd, &input_ptr, &in_bytes, - &output_ptr, &out_bytes); - if((rc == ICONV_ERROR) || (in_bytes != 0)) { - error = ERRNO; - failf(data, - "The Curl_convert_from_utf8 iconv call failed with errno %i: %s", - error, strerror(error)); - return CURLE_CONV_FAILED; - } - if(output_ptr < input_ptr) { - /* null terminate the now shorter output string */ - *output_ptr = 0x00; - } -#else - failf(data, "CURLOPT_CONV_FROM_UTF8_FUNCTION callback required"); - return CURLE_CONV_REQD; -#endif /* HAVE_ICONV */ - } - - return CURLE_OK; -} - -/* - * Init conversion stuff for a Curl_easy - */ -void Curl_convert_init(struct Curl_easy *data) -{ -#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV) - /* conversion descriptors for iconv calls */ - data->outbound_cd = (iconv_t)-1; - data->inbound_cd = (iconv_t)-1; - data->utf8_cd = (iconv_t)-1; -#else - (void)data; -#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */ -} - -/* - * Setup conversion stuff for a Curl_easy - */ -void Curl_convert_setup(struct Curl_easy *data) -{ - data->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_OF_NETWORK); - data->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK, - CURL_ICONV_CODESET_OF_HOST); - data->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, - CURL_ICONV_CODESET_FOR_UTF8); -} - -/* - * Close conversion stuff for a Curl_easy - */ - -void Curl_convert_close(struct Curl_easy *data) -{ -#ifdef HAVE_ICONV - /* close iconv conversion descriptors */ - if(data->inbound_cd != (iconv_t)-1) { - iconv_close(data->inbound_cd); - } - if(data->outbound_cd != (iconv_t)-1) { - iconv_close(data->outbound_cd); - } - if(data->utf8_cd != (iconv_t)-1) { - iconv_close(data->utf8_cd); - } -#else - (void)data; -#endif /* HAVE_ICONV */ -} - -/* - * Curl_convert_form() is used from http.c, this converts any form items that - need to be sent in the network encoding. Returns CURLE_OK on success. - */ -CURLcode Curl_convert_form(struct Curl_easy *data, struct FormData *form) -{ - CURLcode result; - - if(!data) - return CURLE_BAD_FUNCTION_ARGUMENT; - - while(form) { - if(form->type == FORM_DATA) { - result = Curl_convert_to_network(data, form->line, form->length); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; - } - - form = form->next; - } - - return CURLE_OK; -} - -#endif /* CURL_DOES_CONVERSIONS */ diff --git a/build/premake/premake5/contrib/curl/lib/non-ascii.h b/build/premake/premake5/contrib/curl/lib/non-ascii.h deleted file mode 100644 index e27f1f41f2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/non-ascii.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef HEADER_CURL_NON_ASCII_H -#define HEADER_CURL_NON_ASCII_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef CURL_DOES_CONVERSIONS - -#include "urldata.h" - -/* - * Curl_convert_clone() returns a malloced copy of the source string (if - * returning CURLE_OK), with the data converted to network format. - * - * If no conversion was needed *outbuf may be NULL. - */ -CURLcode Curl_convert_clone(struct Curl_easy *data, - const char *indata, - size_t insize, - char **outbuf); - -void Curl_convert_init(struct Curl_easy *data); -void Curl_convert_setup(struct Curl_easy *data); -void Curl_convert_close(struct Curl_easy *data); - -CURLcode Curl_convert_to_network(struct Curl_easy *data, - char *buffer, size_t length); -CURLcode Curl_convert_from_network(struct Curl_easy *data, - char *buffer, size_t length); -CURLcode Curl_convert_from_utf8(struct Curl_easy *data, - char *buffer, size_t length); -CURLcode Curl_convert_form(struct Curl_easy *data, struct FormData *form); -#else -#define Curl_convert_clone(a,b,c,d) ((void)a, CURLE_OK) -#define Curl_convert_init(x) Curl_nop_stmt -#define Curl_convert_setup(x) Curl_nop_stmt -#define Curl_convert_close(x) Curl_nop_stmt -#define Curl_convert_to_network(a,b,c) ((void)a, CURLE_OK) -#define Curl_convert_from_network(a,b,c) ((void)a, CURLE_OK) -#define Curl_convert_from_utf8(a,b,c) ((void)a, CURLE_OK) -#define Curl_convert_form(a,b) CURLE_OK -#endif - -#endif /* HEADER_CURL_NON_ASCII_H */ diff --git a/build/premake/premake5/contrib/curl/lib/nonblock.c b/build/premake/premake5/contrib/curl/lib/nonblock.c deleted file mode 100644 index b764278a51..0000000000 --- a/build/premake/premake5/contrib/curl/lib/nonblock.c +++ /dev/null @@ -1,91 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_SYS_IOCTL_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE)) -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#include "nonblock.h" - -/* - * curlx_nonblock() set the given socket to either blocking or non-blocking - * mode based on the 'nonblock' boolean argument. This function is highly - * portable. - */ -int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ - int nonblock /* TRUE or FALSE */) -{ -#if defined(USE_BLOCKING_SOCKETS) - - return 0; /* returns success */ - -#elif defined(HAVE_FCNTL_O_NONBLOCK) - - /* most recent unix versions */ - int flags; - flags = sfcntl(sockfd, F_GETFL, 0); - if(nonblock) - return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK); - else - return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); - -#elif defined(HAVE_IOCTL_FIONBIO) - - /* older unix versions */ - int flags = nonblock ? 1 : 0; - return ioctl(sockfd, FIONBIO, &flags); - -#elif defined(HAVE_IOCTLSOCKET_FIONBIO) - - /* Windows */ - unsigned long flags = nonblock ? 1UL : 0UL; - return ioctlsocket(sockfd, FIONBIO, &flags); - -#elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO) - - /* Amiga */ - long flags = nonblock ? 1L : 0L; - return IoctlSocket(sockfd, FIONBIO, (char *)&flags); - -#elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK) - - /* BeOS */ - long b = nonblock ? 1L : 0L; - return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); - -#else -# error "no non-blocking method was found/used/set" -#endif -} diff --git a/build/premake/premake5/contrib/curl/lib/nonblock.h b/build/premake/premake5/contrib/curl/lib/nonblock.h deleted file mode 100644 index 98cdc25ab9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/nonblock.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef HEADER_CURL_NONBLOCK_H -#define HEADER_CURL_NONBLOCK_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include /* for curl_socket_t */ - -int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ - int nonblock /* TRUE or FALSE */); - -#endif /* HEADER_CURL_NONBLOCK_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/nwlib.c b/build/premake/premake5/contrib/curl/lib/nwlib.c deleted file mode 100644 index 290cbe31f4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/nwlib.c +++ /dev/null @@ -1,327 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef NETWARE /* Novell NetWare */ - -#ifdef __NOVELL_LIBC__ -/* For native LibC-based NLM we need to register as a real lib. */ -#include -#include -#include -#include -#include - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -typedef struct -{ - int _errno; - void *twentybytes; -} libthreaddata_t; - -typedef struct -{ - int x; - int y; - int z; - void *tenbytes; - NXKey_t perthreadkey; /* if -1, no key obtained... */ - NXMutex_t *lock; -} libdata_t; - -int gLibId = -1; -void *gLibHandle = (void *) NULL; -rtag_t gAllocTag = (rtag_t) NULL; -NXMutex_t *gLibLock = (NXMutex_t *) NULL; - -/* internal library function prototypes... */ -int DisposeLibraryData(void *); -void DisposeThreadData(void *); -int GetOrSetUpData(int id, libdata_t **data, libthreaddata_t **threaddata); - - -int _NonAppStart(void *NLMHandle, - void *errorScreen, - const char *cmdLine, - const char *loadDirPath, - size_t uninitializedDataLength, - void *NLMFileHandle, - int (*readRoutineP)(int conn, - void *fileHandle, size_t offset, - size_t nbytes, - size_t *bytesRead, - void *buffer), - size_t customDataOffset, - size_t customDataSize, - int messageCount, - const char **messages) -{ - NX_LOCK_INFO_ALLOC(liblock, "Per-Application Data Lock", 0); - -#ifndef __GNUC__ -#pragma unused(cmdLine) -#pragma unused(loadDirPath) -#pragma unused(uninitializedDataLength) -#pragma unused(NLMFileHandle) -#pragma unused(readRoutineP) -#pragma unused(customDataOffset) -#pragma unused(customDataSize) -#pragma unused(messageCount) -#pragma unused(messages) -#endif - - /* - * Here we process our command line, post errors (to the error screen), - * perform initializations and anything else we need to do before being able - * to accept calls into us. If we succeed, we return non-zero and the NetWare - * Loader will leave us up, otherwise we fail to load and get dumped. - */ - gAllocTag = AllocateResourceTag(NLMHandle, - " memory allocations", - AllocSignature); - - if(!gAllocTag) { - OutputToScreen(errorScreen, "Unable to allocate resource tag for " - "library memory allocations.\n"); - return -1; - } - - gLibId = register_library(DisposeLibraryData); - - if(gLibId < -1) { - OutputToScreen(errorScreen, "Unable to register library with kernel.\n"); - return -1; - } - - gLibHandle = NLMHandle; - - gLibLock = NXMutexAlloc(0, 0, &liblock); - - if(!gLibLock) { - OutputToScreen(errorScreen, "Unable to allocate library data lock.\n"); - return -1; - } - - return 0; -} - -/* - * Here we clean up any resources we allocated. Resource tags is a big part - * of what we created, but NetWare doesn't ask us to free those. - */ -void _NonAppStop(void) -{ - (void) unregister_library(gLibId); - NXMutexFree(gLibLock); -} - -/* - * This function cannot be the first in the file for if the file is linked - * first, then the check-unload function's offset will be nlmname.nlm+0 - * which is how to tell that there isn't one. When the check function is - * first in the linked objects, it is ambiguous. For this reason, we will - * put it inside this file after the stop function. - * - * Here we check to see if it's alright to ourselves to be unloaded. If not, - * we return a non-zero value. Right now, there isn't any reason not to allow - * it. - */ -int _NonAppCheckUnload(void) -{ - return 0; -} - -int GetOrSetUpData(int id, libdata_t **appData, - libthreaddata_t **threadData) -{ - int err; - libdata_t *app_data; - libthreaddata_t *thread_data; - NXKey_t key; - NX_LOCK_INFO_ALLOC(liblock, "Application Data Lock", 0); - - err = 0; - thread_data = (libthreaddata_t *) NULL; - - /* - * Attempt to get our data for the application calling us. This is where we - * store whatever application-specific information we need to carry in - * support of calling applications. - */ - app_data = (libdata_t *) get_app_data(id); - - if(!app_data) { - /* - * This application hasn't called us before; set up application AND - * per-thread data. Of course, just in case a thread from this same - * application is calling us simultaneously, we better lock our application - * data-creation mutex. We also need to recheck for data after we acquire - * the lock because WE might be that other thread that was too late to - * create the data and the first thread in will have created it. - */ - NXLock(gLibLock); - - app_data = (libdata_t *) get_app_data(id); - if(!app_data) { - app_data = malloc(sizeof(libdata_t)); - - if(app_data) { - memset(app_data, 0, sizeof(libdata_t)); - - app_data->tenbytes = malloc(10); - app_data->lock = NXMutexAlloc(0, 0, &liblock); - - if(!app_data->tenbytes || !app_data->lock) { - if(app_data->lock) - NXMutexFree(app_data->lock); - - free(app_data); - app_data = (libdata_t *) NULL; - err = ENOMEM; - } - - if(app_data) { - /* - * Here we burn in the application data that we were trying to get - * by calling get_app_data(). Next time we call the first function, - * we'll get this data we're just now setting. We also go on here to - * establish the per-thread data for the calling thread, something - * we'll have to do on each application thread the first time - * it calls us. - */ - err = set_app_data(gLibId, app_data); - - if(err) { - free(app_data); - app_data = (libdata_t *) NULL; - err = ENOMEM; - } - else { - /* create key for thread-specific data... */ - err = NXKeyCreate(DisposeThreadData, (void *) NULL, &key); - - if(err) /* (no more keys left?) */ - key = -1; - - app_data->perthreadkey = key; - } - } - } - } - - NXUnlock(gLibLock); - } - - if(app_data) { - key = app_data->perthreadkey; - - if(key != -1 /* couldn't create a key? no thread data */ - && !(err = NXKeyGetValue(key, (void **) &thread_data)) - && !thread_data) { - /* - * Allocate the per-thread data for the calling thread. Regardless of - * whether there was already application data or not, this may be the - * first call by a new thread. The fact that we allocation 20 bytes on - * a pointer is not very important, this just helps to demonstrate that - * we can have arbitrarily complex per-thread data. - */ - thread_data = malloc(sizeof(libthreaddata_t)); - - if(thread_data) { - thread_data->_errno = 0; - thread_data->twentybytes = malloc(20); - - if(!thread_data->twentybytes) { - free(thread_data); - thread_data = (libthreaddata_t *) NULL; - err = ENOMEM; - } - - err = NXKeySetValue(key, thread_data); - if(err) { - free(thread_data->twentybytes); - free(thread_data); - thread_data = (libthreaddata_t *) NULL; - } - } - } - } - - if(appData) - *appData = app_data; - - if(threadData) - *threadData = thread_data; - - return err; -} - -int DisposeLibraryData(void *data) -{ - if(data) { - void *tenbytes = ((libdata_t *) data)->tenbytes; - - free(tenbytes); - free(data); - } - - return 0; -} - -void DisposeThreadData(void *data) -{ - if(data) { - void *twentybytes = ((libthreaddata_t *) data)->twentybytes; - - free(twentybytes); - free(data); - } -} - -#else /* __NOVELL_LIBC__ */ -/* For native CLib-based NLM seems we can do a bit more simple. */ -#include - -int main(void) -{ - /* initialize any globals here... */ - - /* do this if any global initializing was done - SynchronizeStart(); - */ - ExitThread(TSR_THREAD, 0); - return 0; -} - -#endif /* __NOVELL_LIBC__ */ - -#else /* NETWARE */ - -#ifdef __POCC__ -# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */ -#endif - -#endif /* NETWARE */ diff --git a/build/premake/premake5/contrib/curl/lib/nwos.c b/build/premake/premake5/contrib/curl/lib/nwos.c deleted file mode 100644 index c6c22ccbbf..0000000000 --- a/build/premake/premake5/contrib/curl/lib/nwos.c +++ /dev/null @@ -1,88 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef NETWARE /* Novell NetWare */ - -#ifdef __NOVELL_LIBC__ -/* For native LibC-based NLM we need to do nothing. */ -int netware_init(void) -{ - return 0; -} - -#else /* __NOVELL_LIBC__ */ - -/* For native CLib-based NLM we need to initialize the LONG namespace. */ -#include -#include -#include -/* Make the CLIB Ctx stuff link */ -#include -NETDB_DEFINE_CONTEXT -/* Make the CLIB Inet stuff link */ -#include -#include -NETINET_DEFINE_CONTEXT - -int netware_init(void) -{ - int rc = 0; - unsigned int myHandle = GetNLMHandle(); - /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ - void (*pUnAugmentAsterisk)(int) = (void(*)(int)) - ImportSymbol(myHandle, "UnAugmentAsterisk"); - /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */ - void (*pUseAccurateCaseForPaths)(int) = (void(*)(int)) - ImportSymbol(myHandle, "UseAccurateCaseForPaths"); - if(pUnAugmentAsterisk) - pUnAugmentAsterisk(1); - if(pUseAccurateCaseForPaths) - pUseAccurateCaseForPaths(1); - UnimportSymbol(myHandle, "UnAugmentAsterisk"); - UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); - /* set long name space */ - if((SetCurrentNameSpace(4) == 255)) { - rc = 1; - } - if((SetTargetNameSpace(4) == 255)) { - rc = rc + 2; - } - return rc; -} - -/* dummy function to satisfy newer prelude */ -int __init_environment(void) -{ - return 0; -} - -/* dummy function to satisfy newer prelude */ -int __deinit_environment(void) -{ - return 0; -} - -#endif /* __NOVELL_LIBC__ */ - -#endif /* NETWARE */ diff --git a/build/premake/premake5/contrib/curl/lib/objnames-test08.sh b/build/premake/premake5/contrib/curl/lib/objnames-test08.sh deleted file mode 100644 index 485975765c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/objnames-test08.sh +++ /dev/null @@ -1,217 +0,0 @@ -#!/bin/sh -# *************************************************************************** -# * _ _ ____ _ -# * Project ___| | | | _ \| | -# * / __| | | | |_) | | -# * | (__| |_| | _ <| |___ -# * \___|\___/|_| \_\_____| -# * -# * Copyright (C) 2013, Daniel Stenberg, , et al. -# * -# * This software is licensed as described in the file COPYING, which -# * you should have received as part of this distribution. The terms -# * are also available at https://curl.haxx.se/docs/copyright.html. -# * -# * You may opt to use, copy, modify, merge, publish, distribute and/or sell -# * copies of the Software, and permit persons to whom the Software is -# * furnished to do so, under the terms of the COPYING file. -# * -# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# * KIND, either express or implied. -# * -# *************************************************************************** - -# -# This Bourne shell script file is used by test case 1222 to do -# unit testing of curl_8char_object_name() shell function which -# is defined in file objnames.inc and sourced by this file and -# any other shell script that may use it. -# - -# -# argument validation -# - -if test $# -eq 1; then - : -else - echo "Usage: ${0} srcdir" - exit 1 -fi - -if test -f "${1}/runtests.pl"; then - : -else - echo "${0}: Wrong srcdir" - exit 1 -fi - -srcdir=${1} - -if test -f "$srcdir/../lib/objnames.inc"; then - : -else - echo "$0: Missing objnames.inc" - exit 1 -fi - -# -# Some variables -# - -logdir=log -tstnum=1222 - -list_c=$logdir/${tstnum}_list_c -list_obj=$logdir/${tstnum}_list_obj -list_obj_c=$logdir/${tstnum}_list_obj_c -list_obj_uniq=$logdir/${tstnum}_list_obj_uniq - - -# -# Source curl_8char_object_name() function definition -# - -. $srcdir/../lib/objnames.inc - -# -# Some curl_8char_object_name() unit tests -# - -echo 'Testing curl_8char_object_name...' -echo "" - -argstr=123__678__ABC__FGH__KLM__PQRSTUV -expect=16AFKPQR -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123__678__ABC__FGH__KLM__PQ.S.UV -expect=16AFKPQ -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123__678__ABC..FGH..KLM..PQRSTUV -expect=16ABC -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123__678_.ABC._FGH__KLM__PQRSTUV -expect=16 -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV -expect=123 -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV -expect=1234567 -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV -expect=12345678 -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV -expect=1470AB -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV -expect=12345678 -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV -expect=159CGHIJ -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV -expect=159CDEFG -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV -expect=1590ABCD -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV -expect=1567890A -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV -expect=12345678 -outstr=`curl_8char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -# -# Verify that generated object name is distinct for -# all *.c source files in lib and src subdirectories. -# - -ls $srcdir/../lib/*.c > $list_c -ls $srcdir/../src/*.c >> $list_c - -rm -f $list_obj - -for c_fname in `cat $list_c`; do - obj_name=`curl_8char_object_name $c_fname` - echo "$obj_name" >> $list_obj -done - -sort -u $list_obj > $list_obj_uniq - -cnt_c=`cat $list_c | wc -l` -cnt_u=`cat $list_obj_uniq | wc -l` - -echo "" -echo "" -echo "" -if test $cnt_c -eq $cnt_u; then - echo "8-characters-or-less generated object names are unique." - obj_name_clash="no" -else - echo "8-characters-or-less generated object names are clashing..." - obj_name_clash="yes" -fi - -if test $obj_name_clash = "yes"; then - # - # Show clashing object names and respective source file names - # - echo "" - paste $list_obj $list_c | sort > $list_obj_c - prev_match="no" - prev_line="unknown" - prev_obj_name="unknown" - while read this_line; do - obj_name=`echo "$this_line" | cut -f1` - if test "x$obj_name" = "x$prev_obj_name"; then - if test "x$prev_match" != "xyes"; then - echo "$prev_line" - echo "$this_line" - prev_match="yes" - else - echo "$this_line" - fi - else - prev_match="no" - fi - prev_line=$this_line - prev_obj_name=$obj_name - done < $list_obj_c -fi - -rm -f $list_c -rm -f $list_obj -rm -f $list_obj_c -rm -f $list_obj_uniq - -# end of objnames-test.sh diff --git a/build/premake/premake5/contrib/curl/lib/objnames-test10.sh b/build/premake/premake5/contrib/curl/lib/objnames-test10.sh deleted file mode 100644 index 62184b8640..0000000000 --- a/build/premake/premake5/contrib/curl/lib/objnames-test10.sh +++ /dev/null @@ -1,217 +0,0 @@ -#!/bin/sh -# *************************************************************************** -# * _ _ ____ _ -# * Project ___| | | | _ \| | -# * / __| | | | |_) | | -# * | (__| |_| | _ <| |___ -# * \___|\___/|_| \_\_____| -# * -# * Copyright (C) 2013, Daniel Stenberg, , et al. -# * -# * This software is licensed as described in the file COPYING, which -# * you should have received as part of this distribution. The terms -# * are also available at https://curl.haxx.se/docs/copyright.html. -# * -# * You may opt to use, copy, modify, merge, publish, distribute and/or sell -# * copies of the Software, and permit persons to whom the Software is -# * furnished to do so, under the terms of the COPYING file. -# * -# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# * KIND, either express or implied. -# * -# *************************************************************************** - -# -# This Bourne shell script file is used by test case 1221 to do -# unit testing of curl_10char_object_name() shell function which -# is defined in file objnames.inc and sourced by this file and -# any other shell script that may use it. -# - -# -# argument validation -# - -if test $# -eq 1; then - : -else - echo "Usage: ${0} srcdir" - exit 1 -fi - -if test -f "${1}/runtests.pl"; then - : -else - echo "${0}: Wrong srcdir" - exit 1 -fi - -srcdir=${1} - -if test -f "$srcdir/../lib/objnames.inc"; then - : -else - echo "$0: Missing objnames.inc" - exit 1 -fi - -# -# Some variables -# - -logdir=log -tstnum=1221 - -list_c=$logdir/${tstnum}_list_c -list_obj=$logdir/${tstnum}_list_obj -list_obj_c=$logdir/${tstnum}_list_obj_c -list_obj_uniq=$logdir/${tstnum}_list_obj_uniq - - -# -# Source curl_10char_object_name() function definition -# - -. $srcdir/../lib/objnames.inc - -# -# Some curl_10char_object_name() unit tests -# - -echo 'Testing curl_10char_object_name...' -echo "" - -argstr=123__678__ABC__FGH__KLM__PQRSTUV -expect=16AFKPQRST -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123__678__ABC__FGH__KLM__PQ.S.UV -expect=16AFKPQ -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123__678__ABC..FGH..KLM..PQRSTUV -expect=16ABC -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123__678_.ABC._FGH__KLM__PQRSTUV -expect=16 -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123.567.90ABCDEFGHIJKLMNOPQRSTUV -expect=123 -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567.90A.CDEFGHIJKLMNOPQRSTUV -expect=1234567 -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567890.BCD.FGHIJKLMNOPQRSTUV -expect=1234567890 -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=12=45-78+0AB.DE.GHIJKLMNOPQRSTUV -expect=1470AB -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV -expect=1234567890 -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567_90A_CDE_GHIJKLMNOPQRSTUV -expect=159CGHIJKL -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567_90A_CDEFGHIJKLMNOPQRSTUV -expect=159CDEFGHI -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567_90ABCDEFGHIJKLMNOPQRSTUV -expect=1590ABCDEF -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=123_567890ABCDEFGHIJKLMNOPQRSTUV -expect=1567890ABC -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -argstr=1234567890ABCDEFGHIJKLMNOPQRSTUV -expect=1234567890 -outstr=`curl_10char_object_name $argstr` -echo "result: $outstr expected: $expect input: $argstr" - -# -# Verify that generated object name is distinct for -# all *.c source files in lib and src subdirectories. -# - -ls $srcdir/../lib/*.c > $list_c -ls $srcdir/../src/*.c >> $list_c - -rm -f $list_obj - -for c_fname in `cat $list_c`; do - obj_name=`curl_10char_object_name $c_fname` - echo "$obj_name" >> $list_obj -done - -sort -u $list_obj > $list_obj_uniq - -cnt_c=`cat $list_c | wc -l` -cnt_u=`cat $list_obj_uniq | wc -l` - -echo "" -echo "" -echo "" -if test $cnt_c -eq $cnt_u; then - echo "10-characters-or-less generated object names are unique." - obj_name_clash="no" -else - echo "10-characters-or-less generated object names are clashing..." - obj_name_clash="yes" -fi - -if test $obj_name_clash = "yes"; then - # - # Show clashing object names and respective source file names - # - echo "" - paste $list_obj $list_c | sort > $list_obj_c - prev_match="no" - prev_line="unknown" - prev_obj_name="unknown" - while read this_line; do - obj_name=`echo "$this_line" | cut -f1` - if test "x$obj_name" = "x$prev_obj_name"; then - if test "x$prev_match" != "xyes"; then - echo "$prev_line" - echo "$this_line" - prev_match="yes" - else - echo "$this_line" - fi - else - prev_match="no" - fi - prev_line=$this_line - prev_obj_name=$obj_name - done < $list_obj_c -fi - -rm -f $list_c -rm -f $list_obj -rm -f $list_obj_c -rm -f $list_obj_uniq - -# end of objnames-test10.sh diff --git a/build/premake/premake5/contrib/curl/lib/objnames.inc b/build/premake/premake5/contrib/curl/lib/objnames.inc deleted file mode 100644 index b895528afd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/objnames.inc +++ /dev/null @@ -1,107 +0,0 @@ -# *************************************************************************** -# * _ _ ____ _ -# * Project ___| | | | _ \| | -# * / __| | | | |_) | | -# * | (__| |_| | _ <| |___ -# * \___|\___/|_| \_\_____| -# * -# * Copyright (C) 2012, Daniel Stenberg, , et al. -# * -# * This software is licensed as described in the file COPYING, which -# * you should have received as part of this distribution. The terms -# * are also available at https://curl.haxx.se/docs/copyright.html. -# * -# * You may opt to use, copy, modify, merge, publish, distribute and/or sell -# * copies of the Software, and permit persons to whom the Software is -# * furnished to do so, under the terms of the COPYING file. -# * -# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# * KIND, either express or implied. -# * -# *************************************************************************** - -# -# This file is sourced from curl/packages/OS400/initscript.sh and -# other Bourne shell scripts. Keep it as portable as possible. -# - -# -# curl_10char_object_name -# -# This shell function accepts a single string argument with unspecified -# length representing a (*.c) source file name and returns a string which -# is a transformation of given argument. -# -# The intended purpose of this function is to transliterate a (*.c) source -# file name that may be longer than 10 characters, or not, into a string -# with at most 10 characters which may be used as an OS/400 object name. -# -# This function might not be universally usefull, nor we care about it. -# -# It is intended to be used with libcurl's (*.c) source file names, so -# dependency on libcurl's source file naming scheme is acceptable and -# good enough for its intended use. Specifically it makes use of the fact -# that libcurl's (*.c) source file names which may be longer than 10 chars -# are conformed with underscore '_' separated substrings, or separated by -# other character which does not belong to the [0-9], [a-z] or [A-Z] sets. -# -# This allows repeatable and automatic short object name generation with -# no need for a hardcoded mapping table. -# -# Transformation is done in the following way: -# -# 1) Leading directory components are removed. -# 2) Leftmost dot character and any other char following it are removed. -# 3) Lowercase characters are transliterated to uppercase. -# 4) Characters not in [A-Z] or [0-9] are transliterated to underscore '_'. -# 5) Every sequence of one or more underscores is replaced with a single one. -# 6) Five leftmost substrings which end in an underscore character are -# replaced by the first character of each substring, while retaining -# the rest of the string. -# 7) Finally the result is truncated to 10 characters. -# -# Resulting object name may be shorter than 10 characters. -# -# Test case 1221 does unit testng of this function and also verifies -# that it is possible to generate distinct short object names for all -# curl and libcurl *.c source file names. -# - -curl_10char_object_name() { - echo "${1}" | \ - sed -e 's:.*/::' \ - -e 's:[.].*::' \ - -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \ - -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \ - -e 's:__*:_:g' \ - -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \ - -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \ - -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \ - -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \ - -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \ - -e 's:^\(..........\).*:\1:' -} - -# -# curl_8char_object_name -# -# Same as curl_10char_object_name() description and details above, except -# that object name is limited to 8 charcters maximum. -# - -curl_8char_object_name() { - echo "${1}" | \ - sed -e 's:.*/::' \ - -e 's:[.].*::' \ - -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' \ - -e 's:[^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_]:_:g' \ - -e 's:__*:_:g' \ - -e 's:\([^_]\)[^_]*_\(.*\):\1\2:' \ - -e 's:\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3:' \ - -e 's:\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4:' \ - -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5:' \ - -e 's:\([^_]\)\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\):\1\2\3\4\5\6:' \ - -e 's:^\(........\).*:\1:' -} - -# end of objectname.inc diff --git a/build/premake/premake5/contrib/curl/lib/openldap.c b/build/premake/premake5/contrib/curl/lib/openldap.c deleted file mode 100644 index 4b8cfb9c24..0000000000 --- a/build/premake/premake5/contrib/curl/lib/openldap.c +++ /dev/null @@ -1,711 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010, Howard Chu, - * Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP) - -/* - * Notice that USE_OPENLDAP is only a source code selection switch. When - * libcurl is built with USE_OPENLDAP defined the libcurl source code that - * gets compiled is the code from openldap.c, otherwise the code that gets - * compiled is the code from ldap.c. - * - * When USE_OPENLDAP is defined a recent version of the OpenLDAP library - * might be required for compilation and runtime. In order to use ancient - * OpenLDAP library versions, USE_OPENLDAP shall not be defined. - */ - -#include - -#include "urldata.h" -#include -#include "sendf.h" -#include "vtls/vtls.h" -#include "transfer.h" -#include "curl_ldap.h" -#include "curl_base64.h" -#include "connect.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifndef _LDAP_PVT_H -extern int ldap_pvt_url_scheme2proto(const char *); -extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url, - LDAP **ld); -#endif - -static CURLcode ldap_setup_connection(struct connectdata *conn); -static CURLcode ldap_do(struct connectdata *conn, bool *done); -static CURLcode ldap_done(struct connectdata *conn, CURLcode, bool); -static CURLcode ldap_connect(struct connectdata *conn, bool *done); -static CURLcode ldap_connecting(struct connectdata *conn, bool *done); -static CURLcode ldap_disconnect(struct connectdata *conn, bool dead); - -static Curl_recv ldap_recv; - -/* - * LDAP protocol handler. - */ - -const struct Curl_handler Curl_handler_ldap = { - "LDAP", /* scheme */ - ldap_setup_connection, /* setup_connection */ - ldap_do, /* do_it */ - ldap_done, /* done */ - ZERO_NULL, /* do_more */ - ldap_connect, /* connect_it */ - ldap_connecting, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ldap_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_LDAP, /* defport */ - CURLPROTO_LDAP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * LDAPS protocol handler. - */ - -const struct Curl_handler Curl_handler_ldaps = { - "LDAPS", /* scheme */ - ldap_setup_connection, /* setup_connection */ - ldap_do, /* do_it */ - ldap_done, /* done */ - ZERO_NULL, /* do_more */ - ldap_connect, /* connect_it */ - ldap_connecting, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ldap_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_LDAPS, /* defport */ - CURLPROTO_LDAP, /* protocol */ - PROTOPT_SSL /* flags */ -}; -#endif - -static const char *url_errs[] = { - "success", - "out of memory", - "bad parameter", - "unrecognized scheme", - "unbalanced delimiter", - "bad URL", - "bad host or port", - "bad or missing attributes", - "bad or missing scope", - "bad or missing filter", - "bad or missing extensions" -}; - -typedef struct ldapconninfo { - LDAP *ld; - Curl_recv *recv; /* for stacking SSL handler */ - Curl_send *send; - int proto; - int msgid; - bool ssldone; - bool sslinst; - bool didbind; -} ldapconninfo; - -typedef struct ldapreqinfo { - int msgid; - int nument; -} ldapreqinfo; - -static CURLcode ldap_setup_connection(struct connectdata *conn) -{ - ldapconninfo *li; - LDAPURLDesc *lud; - struct Curl_easy *data=conn->data; - int rc, proto; - CURLcode status; - - rc = ldap_url_parse(data->change.url, &lud); - if(rc != LDAP_URL_SUCCESS) { - const char *msg = "url parsing problem"; - status = CURLE_URL_MALFORMAT; - if(rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) { - if(rc == LDAP_URL_ERR_MEM) - status = CURLE_OUT_OF_MEMORY; - msg = url_errs[rc]; - } - failf(conn->data, "LDAP local: %s", msg); - return status; - } - proto = ldap_pvt_url_scheme2proto(lud->lud_scheme); - ldap_free_urldesc(lud); - - li = calloc(1, sizeof(ldapconninfo)); - if(!li) - return CURLE_OUT_OF_MEMORY; - li->proto = proto; - conn->proto.generic = li; - connkeep(conn, "OpenLDAP default"); - /* TODO: - * - provide option to choose SASL Binds instead of Simple - */ - return CURLE_OK; -} - -#ifdef USE_SSL -static Sockbuf_IO ldapsb_tls; -#endif - -static CURLcode ldap_connect(struct connectdata *conn, bool *done) -{ - ldapconninfo *li = conn->proto.generic; - struct Curl_easy *data = conn->data; - int rc, proto = LDAP_VERSION3; - char hosturl[1024]; - char *ptr; - - (void)done; - - strcpy(hosturl, "ldap"); - ptr = hosturl+4; - if(conn->handler->flags & PROTOPT_SSL) - *ptr++ = 's'; - snprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d", - conn->host.name, conn->remote_port); - - rc = ldap_init_fd(conn->sock[FIRSTSOCKET], li->proto, hosturl, &li->ld); - if(rc) { - failf(data, "LDAP local: Cannot connect to %s, %s", - hosturl, ldap_err2string(rc)); - return CURLE_COULDNT_CONNECT; - } - - ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto); - -#ifdef USE_SSL - if(conn->handler->flags & PROTOPT_SSL) { - CURLcode result; - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone); - if(result) - return result; - } -#endif - - return CURLE_OK; -} - -static CURLcode ldap_connecting(struct connectdata *conn, bool *done) -{ - ldapconninfo *li = conn->proto.generic; - struct Curl_easy *data = conn->data; - LDAPMessage *msg = NULL; - struct timeval tv = {0, 1}, *tvp; - int rc, err; - char *info = NULL; - -#ifdef USE_SSL - if(conn->handler->flags & PROTOPT_SSL) { - /* Is the SSL handshake complete yet? */ - if(!li->ssldone) { - CURLcode result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, - &li->ssldone); - if(result || !li->ssldone) - return result; - } - - /* Have we installed the libcurl SSL handlers into the sockbuf yet? */ - if(!li->sslinst) { - Sockbuf *sb; - ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb); - ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, conn); - li->sslinst = TRUE; - li->recv = conn->recv[FIRSTSOCKET]; - li->send = conn->send[FIRSTSOCKET]; - } - } -#endif - - tvp = &tv; - -retry: - if(!li->didbind) { - char *binddn; - struct berval passwd; - - if(conn->bits.user_passwd) { - binddn = conn->user; - passwd.bv_val = conn->passwd; - passwd.bv_len = strlen(passwd.bv_val); - } - else { - binddn = NULL; - passwd.bv_val = NULL; - passwd.bv_len = 0; - } - rc = ldap_sasl_bind(li->ld, binddn, LDAP_SASL_SIMPLE, &passwd, - NULL, NULL, &li->msgid); - if(rc) - return CURLE_LDAP_CANNOT_BIND; - li->didbind = TRUE; - if(tvp) - return CURLE_OK; - } - - rc = ldap_result(li->ld, li->msgid, LDAP_MSG_ONE, tvp, &msg); - if(rc < 0) { - failf(data, "LDAP local: bind ldap_result %s", ldap_err2string(rc)); - return CURLE_LDAP_CANNOT_BIND; - } - if(rc == 0) { - /* timed out */ - return CURLE_OK; - } - - rc = ldap_parse_result(li->ld, msg, &err, NULL, &info, NULL, NULL, 1); - if(rc) { - failf(data, "LDAP local: bind ldap_parse_result %s", ldap_err2string(rc)); - return CURLE_LDAP_CANNOT_BIND; - } - - /* Try to fallback to LDAPv2? */ - if(err == LDAP_PROTOCOL_ERROR) { - int proto; - ldap_get_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto); - if(proto == LDAP_VERSION3) { - if(info) { - ldap_memfree(info); - info = NULL; - } - proto = LDAP_VERSION2; - ldap_set_option(li->ld, LDAP_OPT_PROTOCOL_VERSION, &proto); - li->didbind = FALSE; - goto retry; - } - } - - if(err) { - failf(data, "LDAP remote: bind failed %s %s", ldap_err2string(rc), - info ? info : ""); - if(info) - ldap_memfree(info); - return CURLE_LOGIN_DENIED; - } - - if(info) - ldap_memfree(info); - conn->recv[FIRSTSOCKET] = ldap_recv; - *done = TRUE; - - return CURLE_OK; -} - -static CURLcode ldap_disconnect(struct connectdata *conn, bool dead_connection) -{ - ldapconninfo *li = conn->proto.generic; - (void) dead_connection; - - if(li) { - if(li->ld) { - ldap_unbind_ext(li->ld, NULL, NULL); - li->ld = NULL; - } - conn->proto.generic = NULL; - free(li); - } - return CURLE_OK; -} - -static CURLcode ldap_do(struct connectdata *conn, bool *done) -{ - ldapconninfo *li = conn->proto.generic; - ldapreqinfo *lr; - CURLcode status = CURLE_OK; - int rc = 0; - LDAPURLDesc *ludp = NULL; - int msgid; - struct Curl_easy *data=conn->data; - - connkeep(conn, "OpenLDAP do"); - - infof(data, "LDAP local: %s\n", data->change.url); - - rc = ldap_url_parse(data->change.url, &ludp); - if(rc != LDAP_URL_SUCCESS) { - const char *msg = "url parsing problem"; - status = CURLE_URL_MALFORMAT; - if(rc > LDAP_URL_SUCCESS && rc <= LDAP_URL_ERR_BADEXTS) { - if(rc == LDAP_URL_ERR_MEM) - status = CURLE_OUT_OF_MEMORY; - msg = url_errs[rc]; - } - failf(conn->data, "LDAP local: %s", msg); - return status; - } - - rc = ldap_search_ext(li->ld, ludp->lud_dn, ludp->lud_scope, - ludp->lud_filter, ludp->lud_attrs, 0, - NULL, NULL, NULL, 0, &msgid); - ldap_free_urldesc(ludp); - if(rc != LDAP_SUCCESS) { - failf(data, "LDAP local: ldap_search_ext %s", ldap_err2string(rc)); - return CURLE_LDAP_SEARCH_FAILED; - } - lr = calloc(1, sizeof(ldapreqinfo)); - if(!lr) - return CURLE_OUT_OF_MEMORY; - lr->msgid = msgid; - data->req.protop = lr; - Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL); - *done = TRUE; - return CURLE_OK; -} - -static CURLcode ldap_done(struct connectdata *conn, CURLcode res, - bool premature) -{ - ldapreqinfo *lr = conn->data->req.protop; - - (void)res; - (void)premature; - - if(lr) { - /* if there was a search in progress, abandon it */ - if(lr->msgid) { - ldapconninfo *li = conn->proto.generic; - ldap_abandon_ext(li->ld, lr->msgid, NULL, NULL); - lr->msgid = 0; - } - conn->data->req.protop = NULL; - free(lr); - } - - return CURLE_OK; -} - -static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, - size_t len, CURLcode *err) -{ - ldapconninfo *li = conn->proto.generic; - struct Curl_easy *data = conn->data; - ldapreqinfo *lr = data->req.protop; - int rc, ret; - LDAPMessage *msg = NULL; - LDAPMessage *ent; - BerElement *ber = NULL; - struct timeval tv = {0, 1}; - - (void)len; - (void)buf; - (void)sockindex; - - rc = ldap_result(li->ld, lr->msgid, LDAP_MSG_RECEIVED, &tv, &msg); - if(rc < 0) { - failf(data, "LDAP local: search ldap_result %s", ldap_err2string(rc)); - *err = CURLE_RECV_ERROR; - return -1; - } - - *err = CURLE_AGAIN; - ret = -1; - - /* timed out */ - if(!msg) - return ret; - - for(ent = ldap_first_message(li->ld, msg); ent; - ent = ldap_next_message(li->ld, ent)) { - struct berval bv, *bvals, **bvp = &bvals; - int binary = 0, msgtype; - CURLcode writeerr; - - msgtype = ldap_msgtype(ent); - if(msgtype == LDAP_RES_SEARCH_RESULT) { - int code; - char *info = NULL; - rc = ldap_parse_result(li->ld, ent, &code, NULL, &info, NULL, NULL, 0); - if(rc) { - failf(data, "LDAP local: search ldap_parse_result %s", - ldap_err2string(rc)); - *err = CURLE_LDAP_SEARCH_FAILED; - } - else if(code && code != LDAP_SIZELIMIT_EXCEEDED) { - failf(data, "LDAP remote: search failed %s %s", ldap_err2string(rc), - info ? info : ""); - *err = CURLE_LDAP_SEARCH_FAILED; - } - else { - /* successful */ - if(code == LDAP_SIZELIMIT_EXCEEDED) - infof(data, "There are more than %d entries\n", lr->nument); - data->req.size = data->req.bytecount; - *err = CURLE_OK; - ret = 0; - } - lr->msgid = 0; - ldap_memfree(info); - break; - } - else if(msgtype != LDAP_RES_SEARCH_ENTRY) - continue; - - lr->nument++; - rc = ldap_get_dn_ber(li->ld, ent, &ber, &bv); - if(rc < 0) { - /* TODO: verify that this is really how this return code should be - handled */ - *err = CURLE_RECV_ERROR; - return -1; - } - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4); - if(writeerr) { - *err = writeerr; - return -1; - } - - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, - bv.bv_len); - if(writeerr) { - *err = writeerr; - return -1; - } - - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1); - if(writeerr) { - *err = writeerr; - return -1; - } - data->req.bytecount += bv.bv_len + 5; - - for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp); - rc == LDAP_SUCCESS; - rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, bvp)) { - int i; - - if(bv.bv_val == NULL) break; - - if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7)) - binary = 1; - else - binary = 0; - - for(i=0; bvals[i].bv_val != NULL; i++) { - int binval = 0; - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1); - if(writeerr) { - *err = writeerr; - return -1; - } - - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, - bv.bv_len); - if(writeerr) { - *err = writeerr; - return -1; - } - - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1); - if(writeerr) { - *err = writeerr; - return -1; - } - data->req.bytecount += bv.bv_len + 2; - - if(!binary) { - /* check for leading or trailing whitespace */ - if(ISSPACE(bvals[i].bv_val[0]) || - ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1])) - binval = 1; - else { - /* check for unprintable characters */ - unsigned int j; - for(j=0; jreq.bytecount += 2; - if(val_b64_sz > 0) { - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, - val_b64_sz); - if(writeerr) { - *err = writeerr; - return -1; - } - free(val_b64); - data->req.bytecount += val_b64_sz; - } - } - else { - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)" ", 1); - if(writeerr) { - *err = writeerr; - return -1; - } - - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, bvals[i].bv_val, - bvals[i].bv_len); - if(writeerr) { - *err = writeerr; - return -1; - } - - data->req.bytecount += bvals[i].bv_len + 1; - } - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); - if(writeerr) { - *err = writeerr; - return -1; - } - - data->req.bytecount++; - } - ber_memfree(bvals); - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); - if(writeerr) { - *err = writeerr; - return -1; - } - data->req.bytecount++; - } - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 0); - if(writeerr) { - *err = writeerr; - return -1; - } - data->req.bytecount++; - ber_free(ber, 0); - } - ldap_msgfree(msg); - return ret; -} - -#ifdef USE_SSL -static int -ldapsb_tls_setup(Sockbuf_IO_Desc *sbiod, void *arg) -{ - sbiod->sbiod_pvt = arg; - return 0; -} - -static int -ldapsb_tls_remove(Sockbuf_IO_Desc *sbiod) -{ - sbiod->sbiod_pvt = NULL; - return 0; -} - -/* We don't need to do anything because libcurl does it already */ -static int -ldapsb_tls_close(Sockbuf_IO_Desc *sbiod) -{ - (void)sbiod; - return 0; -} - -static int -ldapsb_tls_ctrl(Sockbuf_IO_Desc *sbiod, int opt, void *arg) -{ - (void)arg; - if(opt == LBER_SB_OPT_DATA_READY) { - struct connectdata *conn = sbiod->sbiod_pvt; - return Curl_ssl_data_pending(conn, FIRSTSOCKET); - } - return 0; -} - -static ber_slen_t -ldapsb_tls_read(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) -{ - struct connectdata *conn = sbiod->sbiod_pvt; - ldapconninfo *li = conn->proto.generic; - ber_slen_t ret; - CURLcode err = CURLE_RECV_ERROR; - - ret = li->recv(conn, FIRSTSOCKET, buf, len, &err); - if(ret < 0 && err == CURLE_AGAIN) { - SET_SOCKERRNO(EWOULDBLOCK); - } - return ret; -} - -static ber_slen_t -ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len) -{ - struct connectdata *conn = sbiod->sbiod_pvt; - ldapconninfo *li = conn->proto.generic; - ber_slen_t ret; - CURLcode err = CURLE_SEND_ERROR; - - ret = li->send(conn, FIRSTSOCKET, buf, len, &err); - if(ret < 0 && err == CURLE_AGAIN) { - SET_SOCKERRNO(EWOULDBLOCK); - } - return ret; -} - -static Sockbuf_IO ldapsb_tls = -{ - ldapsb_tls_setup, - ldapsb_tls_remove, - ldapsb_tls_ctrl, - ldapsb_tls_read, - ldapsb_tls_write, - ldapsb_tls_close -}; -#endif /* USE_SSL */ - -#endif /* !CURL_DISABLE_LDAP && USE_OPENLDAP */ diff --git a/build/premake/premake5/contrib/curl/lib/parsedate.c b/build/premake/premake5/contrib/curl/lib/parsedate.c deleted file mode 100644 index 3c783be488..0000000000 --- a/build/premake/premake5/contrib/curl/lib/parsedate.c +++ /dev/null @@ -1,585 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -/* - A brief summary of the date string formats this parser groks: - - RFC 2616 3.3.1 - - Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 - Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 - Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format - - we support dates without week day name: - - 06 Nov 1994 08:49:37 GMT - 06-Nov-94 08:49:37 GMT - Nov 6 08:49:37 1994 - - without the time zone: - - 06 Nov 1994 08:49:37 - 06-Nov-94 08:49:37 - - weird order: - - 1994 Nov 6 08:49:37 (GNU date fails) - GMT 08:49:37 06-Nov-94 Sunday - 94 6 Nov 08:49:37 (GNU date fails) - - time left out: - - 1994 Nov 6 - 06-Nov-94 - Sun Nov 6 94 - - unusual separators: - - 1994.Nov.6 - Sun/Nov/6/94/GMT - - commonly used time zone names: - - Sun, 06 Nov 1994 08:49:37 CET - 06 Nov 1994 08:49:37 EST - - time zones specified using RFC822 style: - - Sun, 12 Sep 2004 15:05:58 -0700 - Sat, 11 Sep 2004 21:32:11 +0200 - - compact numerical date strings: - - 20040912 15:05:58 -0700 - 20040911 +0200 - -*/ - -#include "curl_setup.h" - -#ifdef HAVE_LIMITS_H -#include -#endif - -#include -#include "strcase.h" -#include "warnless.h" -#include "parsedate.h" - -const char * const Curl_wkday[] = -{"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; -static const char * const weekday[] = -{ "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday", "Sunday" }; -const char * const Curl_month[]= -{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - -struct tzinfo { - char name[5]; - int offset; /* +/- in minutes */ -}; - -/* - * parsedate() - * - * Returns: - * - * PARSEDATE_OK - a fine conversion - * PARSEDATE_FAIL - failed to convert - * PARSEDATE_LATER - time overflow at the far end of time_t - * PARSEDATE_SOONER - time underflow at the low end of time_t - */ - -static int parsedate(const char *date, time_t *output); - -#define PARSEDATE_OK 0 -#define PARSEDATE_FAIL -1 -#define PARSEDATE_LATER 1 -#define PARSEDATE_SOONER 2 - -/* Here's a bunch of frequently used time zone names. These were supported - by the old getdate parser. */ -#define tDAYZONE -60 /* offset for daylight savings time */ -static const struct tzinfo tz[]= { - {"GMT", 0}, /* Greenwich Mean */ - {"UTC", 0}, /* Universal (Coordinated) */ - {"WET", 0}, /* Western European */ - {"BST", 0 tDAYZONE}, /* British Summer */ - {"WAT", 60}, /* West Africa */ - {"AST", 240}, /* Atlantic Standard */ - {"ADT", 240 tDAYZONE}, /* Atlantic Daylight */ - {"EST", 300}, /* Eastern Standard */ - {"EDT", 300 tDAYZONE}, /* Eastern Daylight */ - {"CST", 360}, /* Central Standard */ - {"CDT", 360 tDAYZONE}, /* Central Daylight */ - {"MST", 420}, /* Mountain Standard */ - {"MDT", 420 tDAYZONE}, /* Mountain Daylight */ - {"PST", 480}, /* Pacific Standard */ - {"PDT", 480 tDAYZONE}, /* Pacific Daylight */ - {"YST", 540}, /* Yukon Standard */ - {"YDT", 540 tDAYZONE}, /* Yukon Daylight */ - {"HST", 600}, /* Hawaii Standard */ - {"HDT", 600 tDAYZONE}, /* Hawaii Daylight */ - {"CAT", 600}, /* Central Alaska */ - {"AHST", 600}, /* Alaska-Hawaii Standard */ - {"NT", 660}, /* Nome */ - {"IDLW", 720}, /* International Date Line West */ - {"CET", -60}, /* Central European */ - {"MET", -60}, /* Middle European */ - {"MEWT", -60}, /* Middle European Winter */ - {"MEST", -60 tDAYZONE}, /* Middle European Summer */ - {"CEST", -60 tDAYZONE}, /* Central European Summer */ - {"MESZ", -60 tDAYZONE}, /* Middle European Summer */ - {"FWT", -60}, /* French Winter */ - {"FST", -60 tDAYZONE}, /* French Summer */ - {"EET", -120}, /* Eastern Europe, USSR Zone 1 */ - {"WAST", -420}, /* West Australian Standard */ - {"WADT", -420 tDAYZONE}, /* West Australian Daylight */ - {"CCT", -480}, /* China Coast, USSR Zone 7 */ - {"JST", -540}, /* Japan Standard, USSR Zone 8 */ - {"EAST", -600}, /* Eastern Australian Standard */ - {"EADT", -600 tDAYZONE}, /* Eastern Australian Daylight */ - {"GST", -600}, /* Guam Standard, USSR Zone 9 */ - {"NZT", -720}, /* New Zealand */ - {"NZST", -720}, /* New Zealand Standard */ - {"NZDT", -720 tDAYZONE}, /* New Zealand Daylight */ - {"IDLE", -720}, /* International Date Line East */ - /* Next up: Military timezone names. RFC822 allowed these, but (as noted in - RFC 1123) had their signs wrong. Here we use the correct signs to match - actual military usage. - */ - {"A", +1 * 60}, /* Alpha */ - {"B", +2 * 60}, /* Bravo */ - {"C", +3 * 60}, /* Charlie */ - {"D", +4 * 60}, /* Delta */ - {"E", +5 * 60}, /* Echo */ - {"F", +6 * 60}, /* Foxtrot */ - {"G", +7 * 60}, /* Golf */ - {"H", +8 * 60}, /* Hotel */ - {"I", +9 * 60}, /* India */ - /* "J", Juliet is not used as a timezone, to indicate the observer's local - time */ - {"K", +10 * 60}, /* Kilo */ - {"L", +11 * 60}, /* Lima */ - {"M", +12 * 60}, /* Mike */ - {"N", -1 * 60}, /* November */ - {"O", -2 * 60}, /* Oscar */ - {"P", -3 * 60}, /* Papa */ - {"Q", -4 * 60}, /* Quebec */ - {"R", -5 * 60}, /* Romeo */ - {"S", -6 * 60}, /* Sierra */ - {"T", -7 * 60}, /* Tango */ - {"U", -8 * 60}, /* Uniform */ - {"V", -9 * 60}, /* Victor */ - {"W", -10 * 60}, /* Whiskey */ - {"X", -11 * 60}, /* X-ray */ - {"Y", -12 * 60}, /* Yankee */ - {"Z", 0}, /* Zulu, zero meridian, a.k.a. UTC */ -}; - -/* returns: - -1 no day - 0 monday - 6 sunday -*/ - -static int checkday(const char *check, size_t len) -{ - int i; - const char * const *what; - bool found= FALSE; - if(len > 3) - what = &weekday[0]; - else - what = &Curl_wkday[0]; - for(i=0; i<7; i++) { - if(strcasecompare(check, what[0])) { - found=TRUE; - break; - } - what++; - } - return found?i:-1; -} - -static int checkmonth(const char *check) -{ - int i; - const char * const *what; - bool found= FALSE; - - what = &Curl_month[0]; - for(i=0; i<12; i++) { - if(strcasecompare(check, what[0])) { - found=TRUE; - break; - } - what++; - } - return found?i:-1; /* return the offset or -1, no real offset is -1 */ -} - -/* return the time zone offset between GMT and the input one, in number - of seconds or -1 if the timezone wasn't found/legal */ - -static int checktz(const char *check) -{ - unsigned int i; - const struct tzinfo *what; - bool found= FALSE; - - what = tz; - for(i=0; i< sizeof(tz)/sizeof(tz[0]); i++) { - if(strcasecompare(check, what->name)) { - found=TRUE; - break; - } - what++; - } - return found?what->offset*60:-1; -} - -static void skip(const char **date) -{ - /* skip everything that aren't letters or digits */ - while(**date && !ISALNUM(**date)) - (*date)++; -} - -enum assume { - DATE_MDAY, - DATE_YEAR, - DATE_TIME -}; - -/* this is a clone of 'struct tm' but with all fields we don't need or use - cut out */ -struct my_tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; -}; - -/* struct tm to time since epoch in GMT time zone. - * This is similar to the standard mktime function but for GMT only, and - * doesn't suffer from the various bugs and portability problems that - * some systems' implementations have. - */ -static time_t my_timegm(struct my_tm *tm) -{ - static const int month_days_cumulative [12] = - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; - int month, year, leap_days; - - if(tm->tm_year < 70) - /* we don't support years before 1970 as they will cause this function - to return a negative value */ - return -1; - - year = tm->tm_year + 1900; - month = tm->tm_mon; - if(month < 0) { - year += (11 - month) / 12; - month = 11 - (11 - month) % 12; - } - else if(month >= 12) { - year -= month / 12; - month = month % 12; - } - - leap_days = year - (tm->tm_mon <= 1); - leap_days = ((leap_days / 4) - (leap_days / 100) + (leap_days / 400) - - (1969 / 4) + (1969 / 100) - (1969 / 400)); - - return ((((time_t) (year - 1970) * 365 - + leap_days + month_days_cumulative [month] + tm->tm_mday - 1) * 24 - + tm->tm_hour) * 60 + tm->tm_min) * 60 + tm->tm_sec; -} - -/* - * parsedate() - * - * Returns: - * - * PARSEDATE_OK - a fine conversion - * PARSEDATE_FAIL - failed to convert - * PARSEDATE_LATER - time overflow at the far end of time_t - * PARSEDATE_SOONER - time underflow at the low end of time_t - */ - -static int parsedate(const char *date, time_t *output) -{ - time_t t = 0; - int wdaynum=-1; /* day of the week number, 0-6 (mon-sun) */ - int monnum=-1; /* month of the year number, 0-11 */ - int mdaynum=-1; /* day of month, 1 - 31 */ - int hournum=-1; - int minnum=-1; - int secnum=-1; - int yearnum=-1; - int tzoff=-1; - struct my_tm tm; - enum assume dignext = DATE_MDAY; - const char *indate = date; /* save the original pointer */ - int part = 0; /* max 6 parts */ - - while(*date && (part < 6)) { - bool found=FALSE; - - skip(&date); - - if(ISALPHA(*date)) { - /* a name coming up */ - char buf[32]=""; - size_t len; - if(sscanf(date, "%31[ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz]", buf)) - len = strlen(buf); - else - len = 0; - - if(wdaynum == -1) { - wdaynum = checkday(buf, len); - if(wdaynum != -1) - found = TRUE; - } - if(!found && (monnum == -1)) { - monnum = checkmonth(buf); - if(monnum != -1) - found = TRUE; - } - - if(!found && (tzoff == -1)) { - /* this just must be a time zone string */ - tzoff = checktz(buf); - if(tzoff != -1) - found = TRUE; - } - - if(!found) - return PARSEDATE_FAIL; /* bad string */ - - date += len; - } - else if(ISDIGIT(*date)) { - /* a digit */ - int val; - char *end; - int len=0; - if((secnum == -1) && - (3 == sscanf(date, "%02d:%02d:%02d%n", - &hournum, &minnum, &secnum, &len))) { - /* time stamp! */ - date += len; - } - else if((secnum == -1) && - (2 == sscanf(date, "%02d:%02d%n", &hournum, &minnum, &len))) { - /* time stamp without seconds */ - date += len; - secnum = 0; - } - else { - long lval; - int error; - int old_errno; - - old_errno = ERRNO; - SET_ERRNO(0); - lval = strtol(date, &end, 10); - error = ERRNO; - if(error != old_errno) - SET_ERRNO(old_errno); - - if(error) - return PARSEDATE_FAIL; - -#if LONG_MAX != INT_MAX - if((lval > (long)INT_MAX) || (lval < (long)INT_MIN)) - return PARSEDATE_FAIL; -#endif - - val = curlx_sltosi(lval); - - if((tzoff == -1) && - ((end - date) == 4) && - (val <= 1400) && - (indate< date) && - ((date[-1] == '+' || date[-1] == '-'))) { - /* four digits and a value less than or equal to 1400 (to take into - account all sorts of funny time zone diffs) and it is preceded - with a plus or minus. This is a time zone indication. 1400 is - picked since +1300 is frequently used and +1400 is mentioned as - an edge number in the document "ISO C 200X Proposal: Timezone - Functions" at http://david.tribble.com/text/c0xtimezone.html If - anyone has a more authoritative source for the exact maximum time - zone offsets, please speak up! */ - found = TRUE; - tzoff = (val/100 * 60 + val%100)*60; - - /* the + and - prefix indicates the local time compared to GMT, - this we need ther reversed math to get what we want */ - tzoff = date[-1]=='+'?-tzoff:tzoff; - } - - if(((end - date) == 8) && - (yearnum == -1) && - (monnum == -1) && - (mdaynum == -1)) { - /* 8 digits, no year, month or day yet. This is YYYYMMDD */ - found = TRUE; - yearnum = val/10000; - monnum = (val%10000)/100-1; /* month is 0 - 11 */ - mdaynum = val%100; - } - - if(!found && (dignext == DATE_MDAY) && (mdaynum == -1)) { - if((val > 0) && (val<32)) { - mdaynum = val; - found = TRUE; - } - dignext = DATE_YEAR; - } - - if(!found && (dignext == DATE_YEAR) && (yearnum == -1)) { - yearnum = val; - found = TRUE; - if(yearnum < 1900) { - if(yearnum > 70) - yearnum += 1900; - else - yearnum += 2000; - } - if(mdaynum == -1) - dignext = DATE_MDAY; - } - - if(!found) - return PARSEDATE_FAIL; - - date = end; - } - } - - part++; - } - - if(-1 == secnum) - secnum = minnum = hournum = 0; /* no time, make it zero */ - - if((-1 == mdaynum) || - (-1 == monnum) || - (-1 == yearnum)) - /* lacks vital info, fail */ - return PARSEDATE_FAIL; - -#if SIZEOF_TIME_T < 5 - /* 32 bit time_t can only hold dates to the beginning of 2038 */ - if(yearnum > 2037) { - *output = 0x7fffffff; - return PARSEDATE_LATER; - } -#endif - - if(yearnum < 1970) { - *output = 0; - return PARSEDATE_SOONER; - } - - if((mdaynum > 31) || (monnum > 11) || - (hournum > 23) || (minnum > 59) || (secnum > 60)) - return PARSEDATE_FAIL; /* clearly an illegal date */ - - tm.tm_sec = secnum; - tm.tm_min = minnum; - tm.tm_hour = hournum; - tm.tm_mday = mdaynum; - tm.tm_mon = monnum; - tm.tm_year = yearnum - 1900; - - /* my_timegm() returns a time_t. time_t is often 32 bits, even on many - architectures that feature 64 bit 'long'. - - Some systems have 64 bit time_t and deal with years beyond 2038. However, - even on some of the systems with 64 bit time_t mktime() returns -1 for - dates beyond 03:14:07 UTC, January 19, 2038. (Such as AIX 5100-06) - */ - t = my_timegm(&tm); - - /* time zone adjust (cast t to int to compare to negative one) */ - if(-1 != (int)t) { - - /* Add the time zone diff between local time zone and GMT. */ - long delta = (long)(tzoff!=-1?tzoff:0); - - if((delta>0) && (t > LONG_MAX - delta)) { - *output = 0x7fffffff; - return PARSEDATE_LATER; /* time_t overflow */ - } - - t += delta; - } - - *output = t; - - return PARSEDATE_OK; -} - -time_t curl_getdate(const char *p, const time_t *now) -{ - time_t parsed = -1; - int rc = parsedate(p, &parsed); - (void)now; /* legacy argument from the past that we ignore */ - - switch(rc) { - case PARSEDATE_OK: - case PARSEDATE_LATER: - case PARSEDATE_SOONER: - return parsed; - } - /* everything else is fail */ - return -1; -} - -/* - * Curl_gmtime() is a gmtime() replacement for portability. Do not use the - * gmtime_r() or gmtime() functions anywhere else but here. - * - */ - -CURLcode Curl_gmtime(time_t intime, struct tm *store) -{ - const struct tm *tm; -#ifdef HAVE_GMTIME_R - /* thread-safe version */ - tm = (struct tm *)gmtime_r(&intime, store); -#else - tm = gmtime(&intime); - if(tm) - *store = *tm; /* copy the pointed struct to the local copy */ -#endif - - if(!tm) - return CURLE_BAD_FUNCTION_ARGUMENT; - return CURLE_OK; -} diff --git a/build/premake/premake5/contrib/curl/lib/parsedate.h b/build/premake/premake5/contrib/curl/lib/parsedate.h deleted file mode 100644 index 2e59eb17c2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/parsedate.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef HEADER_CURL_PARSEDATE_H -#define HEADER_CURL_PARSEDATE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -extern const char * const Curl_wkday[7]; -extern const char * const Curl_month[12]; - -CURLcode Curl_gmtime(time_t intime, struct tm *store); - -#endif /* HEADER_CURL_PARSEDATE_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/pingpong.c b/build/premake/premake5/contrib/curl/lib/pingpong.c deleted file mode 100644 index 7a99357279..0000000000 --- a/build/premake/premake5/contrib/curl/lib/pingpong.c +++ /dev/null @@ -1,510 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * 'pingpong' is for generic back-and-forth support functions used by FTP, - * IMAP, POP3, SMTP and whatever more that likes them. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "urldata.h" -#include "sendf.h" -#include "select.h" -#include "progress.h" -#include "speedcheck.h" -#include "pingpong.h" -#include "multiif.h" -#include "non-ascii.h" -#include "vtls/vtls.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifdef USE_PINGPONG - -/* Returns timeout in ms. 0 or negative number means the timeout has already - triggered */ -time_t Curl_pp_state_timeout(struct pingpong *pp) -{ - struct connectdata *conn = pp->conn; - struct Curl_easy *data=conn->data; - time_t timeout_ms; /* in milliseconds */ - time_t timeout2_ms; /* in milliseconds */ - long response_time= (data->set.server_response_timeout)? - data->set.server_response_timeout: pp->response_time; - - /* if CURLOPT_SERVER_RESPONSE_TIMEOUT is set, use that to determine - remaining time, or use pp->response because SERVER_RESPONSE_TIMEOUT is - supposed to govern the response for any given server response, not for - the time from connect to the given server response. */ - - /* Without a requested timeout, we only wait 'response_time' seconds for the - full response to arrive before we bail out */ - timeout_ms = response_time - - Curl_tvdiff(Curl_tvnow(), pp->response); /* spent time */ - - if(data->set.timeout) { - /* if timeout is requested, find out how much remaining time we have */ - timeout2_ms = data->set.timeout - /* timeout time */ - Curl_tvdiff(Curl_tvnow(), conn->now); /* spent time */ - - /* pick the lowest number */ - timeout_ms = CURLMIN(timeout_ms, timeout2_ms); - } - - return timeout_ms; -} - -/* - * Curl_pp_statemach() - */ -CURLcode Curl_pp_statemach(struct pingpong *pp, bool block) -{ - struct connectdata *conn = pp->conn; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - int rc; - time_t interval_ms; - time_t timeout_ms = Curl_pp_state_timeout(pp); - struct Curl_easy *data=conn->data; - CURLcode result = CURLE_OK; - - if(timeout_ms <=0) { - failf(data, "server response timeout"); - return CURLE_OPERATION_TIMEDOUT; /* already too little time */ - } - - if(block) { - interval_ms = 1000; /* use 1 second timeout intervals */ - if(timeout_ms < interval_ms) - interval_ms = timeout_ms; - } - else - interval_ms = 0; /* immediate */ - - if(Curl_ssl_data_pending(conn, FIRSTSOCKET)) - rc = 1; - else if(Curl_pp_moredata(pp)) - /* We are receiving and there is data in the cache so just read it */ - rc = 1; - else if(!pp->sendleft && Curl_ssl_data_pending(conn, FIRSTSOCKET)) - /* We are receiving and there is data ready in the SSL library */ - rc = 1; - else - rc = Curl_socket_check(pp->sendleft?CURL_SOCKET_BAD:sock, /* reading */ - CURL_SOCKET_BAD, - pp->sendleft?sock:CURL_SOCKET_BAD, /* writing */ - interval_ms); - - if(block) { - /* if we didn't wait, we don't have to spend time on this now */ - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - else - result = Curl_speedcheck(data, Curl_tvnow()); - - if(result) - return result; - } - - if(rc == -1) { - failf(data, "select/poll error"); - result = CURLE_OUT_OF_MEMORY; - } - else if(rc) - result = pp->statemach_act(conn); - - return result; -} - -/* initialize stuff to prepare for reading a fresh new response */ -void Curl_pp_init(struct pingpong *pp) -{ - struct connectdata *conn = pp->conn; - pp->nread_resp = 0; - pp->linestart_resp = conn->data->state.buffer; - pp->pending_resp = TRUE; - pp->response = Curl_tvnow(); /* start response time-out now! */ -} - - - -/*********************************************************************** - * - * Curl_pp_vsendf() - * - * Send the formated string as a command to a pingpong server. Note that - * the string should not have any CRLF appended, as this function will - * append the necessary things itself. - * - * made to never block - */ -CURLcode Curl_pp_vsendf(struct pingpong *pp, - const char *fmt, - va_list args) -{ - ssize_t bytes_written; - size_t write_len; - char *fmt_crlf; - char *s; - CURLcode result; - struct connectdata *conn = pp->conn; - struct Curl_easy *data = conn->data; - -#ifdef HAVE_GSSAPI - enum protection_level data_sec = conn->data_prot; -#endif - - DEBUGASSERT(pp->sendleft == 0); - DEBUGASSERT(pp->sendsize == 0); - DEBUGASSERT(pp->sendthis == NULL); - - fmt_crlf = aprintf("%s\r\n", fmt); /* append a trailing CRLF */ - if(!fmt_crlf) - return CURLE_OUT_OF_MEMORY; - - s = vaprintf(fmt_crlf, args); /* trailing CRLF appended */ - free(fmt_crlf); - if(!s) - return CURLE_OUT_OF_MEMORY; - - bytes_written = 0; - write_len = strlen(s); - - Curl_pp_init(pp); - - result = Curl_convert_to_network(data, s, write_len); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) { - free(s); - return result; - } - -#ifdef HAVE_GSSAPI - conn->data_prot = PROT_CMD; -#endif - result = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len, - &bytes_written); -#ifdef HAVE_GSSAPI - DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); - conn->data_prot = data_sec; -#endif - - if(result) { - free(s); - return result; - } - - if(conn->data->set.verbose) - Curl_debug(conn->data, CURLINFO_HEADER_OUT, - s, (size_t)bytes_written, conn); - - if(bytes_written != (ssize_t)write_len) { - /* the whole chunk was not sent, keep it around and adjust sizes */ - pp->sendthis = s; - pp->sendsize = write_len; - pp->sendleft = write_len - bytes_written; - } - else { - free(s); - pp->sendthis = NULL; - pp->sendleft = pp->sendsize = 0; - pp->response = Curl_tvnow(); - } - - return CURLE_OK; -} - - -/*********************************************************************** - * - * Curl_pp_sendf() - * - * Send the formated string as a command to a pingpong server. Note that - * the string should not have any CRLF appended, as this function will - * append the necessary things itself. - * - * made to never block - */ -CURLcode Curl_pp_sendf(struct pingpong *pp, - const char *fmt, ...) -{ - CURLcode result; - va_list ap; - va_start(ap, fmt); - - result = Curl_pp_vsendf(pp, fmt, ap); - - va_end(ap); - - return result; -} - -/* - * Curl_pp_readresp() - * - * Reads a piece of a server response. - */ -CURLcode Curl_pp_readresp(curl_socket_t sockfd, - struct pingpong *pp, - int *code, /* return the server code if done */ - size_t *size) /* size of the response */ -{ - ssize_t perline; /* count bytes per line */ - bool keepon=TRUE; - ssize_t gotbytes; - char *ptr; - struct connectdata *conn = pp->conn; - struct Curl_easy *data = conn->data; - char * const buf = data->state.buffer; - CURLcode result = CURLE_OK; - - *code = 0; /* 0 for errors or not done */ - *size = 0; - - ptr=buf + pp->nread_resp; - - /* number of bytes in the current line, so far */ - perline = (ssize_t)(ptr-pp->linestart_resp); - - while((pp->nread_respcache) { - /* we had data in the "cache", copy that instead of doing an actual - * read - * - * pp->cache_size is cast to ssize_t here. This should be safe, because - * it would have been populated with something of size int to begin - * with, even though its datatype may be larger than an int. - */ - DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1)); - memcpy(ptr, pp->cache, pp->cache_size); - gotbytes = (ssize_t)pp->cache_size; - free(pp->cache); /* free the cache */ - pp->cache = NULL; /* clear the pointer */ - pp->cache_size = 0; /* zero the size just in case */ - } - else { -#ifdef HAVE_GSSAPI - enum protection_level prot = conn->data_prot; - conn->data_prot = PROT_CLEAR; -#endif - DEBUGASSERT((ptr+BUFSIZE-pp->nread_resp) <= (buf+BUFSIZE+1)); - result = Curl_read(conn, sockfd, ptr, BUFSIZE-pp->nread_resp, - &gotbytes); -#ifdef HAVE_GSSAPI - DEBUGASSERT(prot > PROT_NONE && prot < PROT_LAST); - conn->data_prot = prot; -#endif - if(result == CURLE_AGAIN) - return CURLE_OK; /* return */ - - if(!result && (gotbytes > 0)) - /* convert from the network encoding */ - result = Curl_convert_from_network(data, ptr, gotbytes); - /* Curl_convert_from_network calls failf if unsuccessful */ - - if(result) - /* Set outer result variable to this error. */ - keepon = FALSE; - } - - if(!keepon) - ; - else if(gotbytes <= 0) { - keepon = FALSE; - result = CURLE_RECV_ERROR; - failf(data, "response reading failed"); - } - else { - /* we got a whole chunk of data, which can be anything from one - * byte to a set of lines and possible just a piece of the last - * line */ - ssize_t i; - ssize_t clipamount = 0; - bool restart = FALSE; - - data->req.headerbytecount += (long)gotbytes; - - pp->nread_resp += gotbytes; - for(i = 0; i < gotbytes; ptr++, i++) { - perline++; - if(*ptr=='\n') { - /* a newline is CRLF in pp-talk, so the CR is ignored as - the line isn't really terminated until the LF comes */ - - /* output debug output if that is requested */ -#ifdef HAVE_GSSAPI - if(!conn->sec_complete) -#endif - if(data->set.verbose) - Curl_debug(data, CURLINFO_HEADER_IN, - pp->linestart_resp, (size_t)perline, conn); - - /* - * We pass all response-lines to the callback function registered - * for "headers". The response lines can be seen as a kind of - * headers. - */ - result = Curl_client_write(conn, CLIENTWRITE_HEADER, - pp->linestart_resp, perline); - if(result) - return result; - - if(pp->endofresp(conn, pp->linestart_resp, perline, code)) { - /* This is the end of the last line, copy the last line to the - start of the buffer and zero terminate, for old times sake */ - size_t n = ptr - pp->linestart_resp; - memmove(buf, pp->linestart_resp, n); - buf[n]=0; /* zero terminate */ - keepon=FALSE; - pp->linestart_resp = ptr+1; /* advance pointer */ - i++; /* skip this before getting out */ - - *size = pp->nread_resp; /* size of the response */ - pp->nread_resp = 0; /* restart */ - break; - } - perline=0; /* line starts over here */ - pp->linestart_resp = ptr+1; - } - } - - if(!keepon && (i != gotbytes)) { - /* We found the end of the response lines, but we didn't parse the - full chunk of data we have read from the server. We therefore need - to store the rest of the data to be checked on the next invoke as - it may actually contain another end of response already! */ - clipamount = gotbytes - i; - restart = TRUE; - DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing " - "server response left\n", - (int)clipamount)); - } - else if(keepon) { - - if((perline == gotbytes) && (gotbytes > BUFSIZE/2)) { - /* We got an excessive line without newlines and we need to deal - with it. We keep the first bytes of the line then we throw - away the rest. */ - infof(data, "Excessive server response line length received, " - "%zd bytes. Stripping\n", gotbytes); - restart = TRUE; - - /* we keep 40 bytes since all our pingpong protocols are only - interested in the first piece */ - clipamount = 40; - } - else if(pp->nread_resp > BUFSIZE/2) { - /* We got a large chunk of data and there's potentially still - trailing data to take care of, so we put any such part in the - "cache", clear the buffer to make space and restart. */ - clipamount = perline; - restart = TRUE; - } - } - else if(i == gotbytes) - restart = TRUE; - - if(clipamount) { - pp->cache_size = clipamount; - pp->cache = malloc(pp->cache_size); - if(pp->cache) - memcpy(pp->cache, pp->linestart_resp, pp->cache_size); - else - return CURLE_OUT_OF_MEMORY; - } - if(restart) { - /* now reset a few variables to start over nicely from the start of - the big buffer */ - pp->nread_resp = 0; /* start over from scratch in the buffer */ - ptr = pp->linestart_resp = buf; - perline = 0; - } - - } /* there was data */ - - } /* while there's buffer left and loop is requested */ - - pp->pending_resp = FALSE; - - return result; -} - -int Curl_pp_getsock(struct pingpong *pp, - curl_socket_t *socks, - int numsocks) -{ - struct connectdata *conn = pp->conn; - - if(!numsocks) - return GETSOCK_BLANK; - - socks[0] = conn->sock[FIRSTSOCKET]; - - if(pp->sendleft) { - /* write mode */ - return GETSOCK_WRITESOCK(0); - } - - /* read mode */ - return GETSOCK_READSOCK(0); -} - -CURLcode Curl_pp_flushsend(struct pingpong *pp) -{ - /* we have a piece of a command still left to send */ - struct connectdata *conn = pp->conn; - ssize_t written; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - CURLcode result = Curl_write(conn, sock, pp->sendthis + pp->sendsize - - pp->sendleft, pp->sendleft, &written); - if(result) - return result; - - if(written != (ssize_t)pp->sendleft) { - /* only a fraction was sent */ - pp->sendleft -= written; - } - else { - free(pp->sendthis); - pp->sendthis=NULL; - pp->sendleft = pp->sendsize = 0; - pp->response = Curl_tvnow(); - } - return CURLE_OK; -} - -CURLcode Curl_pp_disconnect(struct pingpong *pp) -{ - free(pp->cache); - pp->cache = NULL; - return CURLE_OK; -} - -bool Curl_pp_moredata(struct pingpong *pp) -{ - return (!pp->sendleft && pp->cache && pp->nread_resp < pp->cache_size) ? - TRUE : FALSE; -} - -#endif diff --git a/build/premake/premake5/contrib/curl/lib/pingpong.h b/build/premake/premake5/contrib/curl/lib/pingpong.h deleted file mode 100644 index 500100ae43..0000000000 --- a/build/premake/premake5/contrib/curl/lib/pingpong.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef HEADER_CURL_PINGPONG_H -#define HEADER_CURL_PINGPONG_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \ - !defined(CURL_DISABLE_POP3) || !defined(CURL_DISABLE_SMTP) -#define USE_PINGPONG -#endif - -/* forward-declaration, this is defined in urldata.h */ -struct connectdata; - -typedef enum { - FTPTRANSFER_BODY, /* yes do transfer a body */ - FTPTRANSFER_INFO, /* do still go through to get info/headers */ - FTPTRANSFER_NONE, /* don't get anything and don't get info */ - FTPTRANSFER_LAST /* end of list marker, never used */ -} curl_pp_transfer; - -/* - * 'pingpong' is the generic struct used for protocols doing server<->client - * conversations in a back-and-forth style such as FTP, IMAP, POP3, SMTP etc. - * - * It holds response cache and non-blocking sending data. - */ -struct pingpong { - char *cache; /* data cache between getresponse()-calls */ - size_t cache_size; /* size of cache in bytes */ - size_t nread_resp; /* number of bytes currently read of a server response */ - char *linestart_resp; /* line start pointer for the server response - reader function */ - bool pending_resp; /* set TRUE when a server response is pending or in - progress, and is cleared once the last response is - read */ - char *sendthis; /* allocated pointer to a buffer that is to be sent to the - server */ - size_t sendleft; /* number of bytes left to send from the sendthis buffer */ - size_t sendsize; /* total size of the sendthis buffer */ - struct timeval response; /* set to Curl_tvnow() when a command has been sent - off, used to time-out response reading */ - long response_time; /* When no timeout is given, this is the amount of - milliseconds we await for a server response. */ - - struct connectdata *conn; /* points to the connectdata struct that this - belongs to */ - - /* Function pointers the protocols MUST implement and provide for the - pingpong layer to function */ - - CURLcode (*statemach_act)(struct connectdata *conn); - - bool (*endofresp)(struct connectdata *conn, char *ptr, size_t len, - int *code); -}; - -/* - * Curl_pp_statemach() - * - * called repeatedly until done. Set 'wait' to make it wait a while on the - * socket if there's no traffic. - */ -CURLcode Curl_pp_statemach(struct pingpong *pp, bool block); - -/* initialize stuff to prepare for reading a fresh new response */ -void Curl_pp_init(struct pingpong *pp); - -/* Returns timeout in ms. 0 or negative number means the timeout has already - triggered */ -time_t Curl_pp_state_timeout(struct pingpong *pp); - - -/*********************************************************************** - * - * Curl_pp_sendf() - * - * Send the formated string as a command to a pingpong server. Note that - * the string should not have any CRLF appended, as this function will - * append the necessary things itself. - * - * made to never block - */ -CURLcode Curl_pp_sendf(struct pingpong *pp, - const char *fmt, ...); - -/*********************************************************************** - * - * Curl_pp_vsendf() - * - * Send the formated string as a command to a pingpong server. Note that - * the string should not have any CRLF appended, as this function will - * append the necessary things itself. - * - * made to never block - */ -CURLcode Curl_pp_vsendf(struct pingpong *pp, - const char *fmt, - va_list args); - -/* - * Curl_pp_readresp() - * - * Reads a piece of a server response. - */ -CURLcode Curl_pp_readresp(curl_socket_t sockfd, - struct pingpong *pp, - int *code, /* return the server code if done */ - size_t *size); /* size of the response */ - - -CURLcode Curl_pp_flushsend(struct pingpong *pp); - -/* call this when a pingpong connection is disconnected */ -CURLcode Curl_pp_disconnect(struct pingpong *pp); - -int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks, - int numsocks); - - -/*********************************************************************** - * - * Curl_pp_moredata() - * - * Returns whether there are still more data in the cache and so a call - * to Curl_pp_readresp() will not block. - */ -bool Curl_pp_moredata(struct pingpong *pp); - -#endif /* HEADER_CURL_PINGPONG_H */ diff --git a/build/premake/premake5/contrib/curl/lib/pipeline.c b/build/premake/premake5/contrib/curl/lib/pipeline.c deleted file mode 100644 index 40a5e82d83..0000000000 --- a/build/premake/premake5/contrib/curl/lib/pipeline.c +++ /dev/null @@ -1,439 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2013, Linus Nielsen Feltzing, - * Copyright (C) 2013-2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "urldata.h" -#include "url.h" -#include "progress.h" -#include "multiif.h" -#include "pipeline.h" -#include "sendf.h" -#include "strcase.h" - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -struct site_blacklist_entry { - char *hostname; - unsigned short port; -}; - -static void site_blacklist_llist_dtor(void *user, void *element) -{ - struct site_blacklist_entry *entry = element; - (void)user; - - Curl_safefree(entry->hostname); - free(entry); -} - -static void server_blacklist_llist_dtor(void *user, void *element) -{ - (void)user; - free(element); -} - -bool Curl_pipeline_penalized(struct Curl_easy *data, - struct connectdata *conn) -{ - if(data) { - bool penalized = FALSE; - curl_off_t penalty_size = - Curl_multi_content_length_penalty_size(data->multi); - curl_off_t chunk_penalty_size = - Curl_multi_chunk_length_penalty_size(data->multi); - curl_off_t recv_size = -2; /* Make it easy to spot in the log */ - - /* Find the head of the recv pipe, if any */ - if(conn->recv_pipe && conn->recv_pipe->head) { - struct Curl_easy *recv_handle = conn->recv_pipe->head->ptr; - - recv_size = recv_handle->req.size; - - if(penalty_size > 0 && recv_size > penalty_size) - penalized = TRUE; - } - - if(chunk_penalty_size > 0 && - (curl_off_t)conn->chunk.datasize > chunk_penalty_size) - penalized = TRUE; - - infof(data, "Conn: %ld (%p) Receive pipe weight: (%" - CURL_FORMAT_CURL_OFF_T "/%zu), penalized: %s\n", - conn->connection_id, (void *)conn, recv_size, - conn->chunk.datasize, penalized?"TRUE":"FALSE"); - return penalized; - } - return FALSE; -} - -static CURLcode addHandleToPipeline(struct Curl_easy *data, - struct curl_llist *pipeline) -{ - if(!Curl_llist_insert_next(pipeline, pipeline->tail, data)) - return CURLE_OUT_OF_MEMORY; - return CURLE_OK; -} - - -CURLcode Curl_add_handle_to_pipeline(struct Curl_easy *handle, - struct connectdata *conn) -{ - struct curl_llist_element *sendhead = conn->send_pipe->head; - struct curl_llist *pipeline; - CURLcode result; - - pipeline = conn->send_pipe; - - result = addHandleToPipeline(handle, pipeline); - - if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) { - /* this is a new one as head, expire it */ - Curl_pipeline_leave_write(conn); /* not in use yet */ - Curl_expire(conn->send_pipe->head->ptr, 0); - } - -#if 0 /* enable for pipeline debugging */ - print_pipeline(conn); -#endif - - return result; -} - -/* Move this transfer from the sending list to the receiving list. - - Pay special attention to the new sending list "leader" as it needs to get - checked to update what sockets it acts on. - -*/ -void Curl_move_handle_from_send_to_recv_pipe(struct Curl_easy *handle, - struct connectdata *conn) -{ - struct curl_llist_element *curr; - - curr = conn->send_pipe->head; - while(curr) { - if(curr->ptr == handle) { - Curl_llist_move(conn->send_pipe, curr, - conn->recv_pipe, conn->recv_pipe->tail); - - if(conn->send_pipe->head) { - /* Since there's a new easy handle at the start of the send pipeline, - set its timeout value to 1ms to make it trigger instantly */ - Curl_pipeline_leave_write(conn); /* not used now */ -#ifdef DEBUGBUILD - infof(conn->data, "%p is at send pipe head B!\n", - (void *)conn->send_pipe->head->ptr); -#endif - Curl_expire(conn->send_pipe->head->ptr, 0); - } - - /* The receiver's list is not really interesting here since either this - handle is now first in the list and we'll deal with it soon, or - another handle is already first and thus is already taken care of */ - - break; /* we're done! */ - } - curr = curr->next; - } -} - -bool Curl_pipeline_site_blacklisted(struct Curl_easy *handle, - struct connectdata *conn) -{ - if(handle->multi) { - struct curl_llist *blacklist = - Curl_multi_pipelining_site_bl(handle->multi); - - if(blacklist) { - struct curl_llist_element *curr; - - curr = blacklist->head; - while(curr) { - struct site_blacklist_entry *site; - - site = curr->ptr; - if(strcasecompare(site->hostname, conn->host.name) && - site->port == conn->remote_port) { - infof(handle, "Site %s:%d is pipeline blacklisted\n", - conn->host.name, conn->remote_port); - return TRUE; - } - curr = curr->next; - } - } - } - return FALSE; -} - -CURLMcode Curl_pipeline_set_site_blacklist(char **sites, - struct curl_llist **list_ptr) -{ - struct curl_llist *old_list = *list_ptr; - struct curl_llist *new_list = NULL; - - if(sites) { - new_list = Curl_llist_alloc((curl_llist_dtor) site_blacklist_llist_dtor); - if(!new_list) - return CURLM_OUT_OF_MEMORY; - - /* Parse the URLs and populate the list */ - while(*sites) { - char *hostname; - char *port; - struct site_blacklist_entry *entry; - - hostname = strdup(*sites); - if(!hostname) { - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } - - entry = malloc(sizeof(struct site_blacklist_entry)); - if(!entry) { - free(hostname); - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } - - port = strchr(hostname, ':'); - if(port) { - *port = '\0'; - port++; - entry->port = (unsigned short)strtol(port, NULL, 10); - } - else { - /* Default port number for HTTP */ - entry->port = 80; - } - - entry->hostname = hostname; - - if(!Curl_llist_insert_next(new_list, new_list->tail, entry)) { - site_blacklist_llist_dtor(NULL, entry); - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } - - sites++; - } - } - - /* Free the old list */ - if(old_list) { - Curl_llist_destroy(old_list, NULL); - } - - /* This might be NULL if sites == NULL, i.e the blacklist is cleared */ - *list_ptr = new_list; - - return CURLM_OK; -} - -bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, - char *server_name) -{ - if(handle->multi && server_name) { - struct curl_llist *blacklist = - Curl_multi_pipelining_server_bl(handle->multi); - - if(blacklist) { - struct curl_llist_element *curr; - - curr = blacklist->head; - while(curr) { - char *bl_server_name; - - bl_server_name = curr->ptr; - if(strncasecompare(bl_server_name, server_name, - strlen(bl_server_name))) { - infof(handle, "Server %s is blacklisted\n", server_name); - return TRUE; - } - curr = curr->next; - } - } - - DEBUGF(infof(handle, "Server %s is not blacklisted\n", server_name)); - } - return FALSE; -} - -CURLMcode Curl_pipeline_set_server_blacklist(char **servers, - struct curl_llist **list_ptr) -{ - struct curl_llist *old_list = *list_ptr; - struct curl_llist *new_list = NULL; - - if(servers) { - new_list = Curl_llist_alloc((curl_llist_dtor) server_blacklist_llist_dtor); - if(!new_list) - return CURLM_OUT_OF_MEMORY; - - /* Parse the URLs and populate the list */ - while(*servers) { - char *server_name; - - server_name = strdup(*servers); - if(!server_name) { - Curl_llist_destroy(new_list, NULL); - return CURLM_OUT_OF_MEMORY; - } - - if(!Curl_llist_insert_next(new_list, new_list->tail, server_name)) { - Curl_llist_destroy(new_list, NULL); - Curl_safefree(server_name); - return CURLM_OUT_OF_MEMORY; - } - - servers++; - } - } - - /* Free the old list */ - if(old_list) { - Curl_llist_destroy(old_list, NULL); - } - - /* This might be NULL if sites == NULL, i.e the blacklist is cleared */ - *list_ptr = new_list; - - return CURLM_OK; -} - -static bool pipe_head(struct Curl_easy *data, - struct curl_llist *pipeline) -{ - if(pipeline) { - struct curl_llist_element *curr = pipeline->head; - if(curr) - return (curr->ptr == data) ? TRUE : FALSE; - } - return FALSE; -} - -/* returns TRUE if the given handle is head of the recv pipe */ -bool Curl_recvpipe_head(struct Curl_easy *data, - struct connectdata *conn) -{ - return pipe_head(data, conn->recv_pipe); -} - -/* returns TRUE if the given handle is head of the send pipe */ -bool Curl_sendpipe_head(struct Curl_easy *data, - struct connectdata *conn) -{ - return pipe_head(data, conn->send_pipe); -} - - -/* - * Check if the write channel is available and this handle as at the head, - * then grab the channel and return TRUE. - * - * If not available, return FALSE. - */ - -bool Curl_pipeline_checkget_write(struct Curl_easy *data, - struct connectdata *conn) -{ - if(conn->bits.multiplex) - /* when multiplexing, we can use it at once */ - return TRUE; - - if(!conn->writechannel_inuse && Curl_sendpipe_head(data, conn)) { - /* Grab the channel */ - conn->writechannel_inuse = TRUE; - return TRUE; - } - return FALSE; -} - - -/* - * Check if the read channel is available and this handle as at the head, then - * grab the channel and return TRUE. - * - * If not available, return FALSE. - */ - -bool Curl_pipeline_checkget_read(struct Curl_easy *data, - struct connectdata *conn) -{ - if(conn->bits.multiplex) - /* when multiplexing, we can use it at once */ - return TRUE; - - if(!conn->readchannel_inuse && Curl_recvpipe_head(data, conn)) { - /* Grab the channel */ - conn->readchannel_inuse = TRUE; - return TRUE; - } - return FALSE; -} - -/* - * The current user of the pipeline write channel gives it up. - */ -void Curl_pipeline_leave_write(struct connectdata *conn) -{ - conn->writechannel_inuse = FALSE; -} - -/* - * The current user of the pipeline read channel gives it up. - */ -void Curl_pipeline_leave_read(struct connectdata *conn) -{ - conn->readchannel_inuse = FALSE; -} - - -#if 0 -void print_pipeline(struct connectdata *conn) -{ - struct curl_llist_element *curr; - struct connectbundle *cb_ptr; - struct Curl_easy *data = conn->data; - - cb_ptr = conn->bundle; - - if(cb_ptr) { - curr = cb_ptr->conn_list->head; - while(curr) { - conn = curr->ptr; - infof(data, "- Conn %ld (%p) send_pipe: %zu, recv_pipe: %zu\n", - conn->connection_id, - (void *)conn, - conn->send_pipe->size, - conn->recv_pipe->size); - curr = curr->next; - } - } -} - -#endif diff --git a/build/premake/premake5/contrib/curl/lib/pipeline.h b/build/premake/premake5/contrib/curl/lib/pipeline.h deleted file mode 100644 index a64f710251..0000000000 --- a/build/premake/premake5/contrib/curl/lib/pipeline.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef HEADER_CURL_PIPELINE_H -#define HEADER_CURL_PIPELINE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2015, Daniel Stenberg, , et al. - * Copyright (C) 2013 - 2014, Linus Nielsen Feltzing, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -CURLcode Curl_add_handle_to_pipeline(struct Curl_easy *handle, - struct connectdata *conn); -void Curl_move_handle_from_send_to_recv_pipe(struct Curl_easy *handle, - struct connectdata *conn); -bool Curl_pipeline_penalized(struct Curl_easy *data, - struct connectdata *conn); - -bool Curl_pipeline_site_blacklisted(struct Curl_easy *handle, - struct connectdata *conn); - -CURLMcode Curl_pipeline_set_site_blacklist(char **sites, - struct curl_llist **list_ptr); - -bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, - char *server_name); - -CURLMcode Curl_pipeline_set_server_blacklist(char **servers, - struct curl_llist **list_ptr); - -bool Curl_pipeline_checkget_write(struct Curl_easy *data, - struct connectdata *conn); -bool Curl_pipeline_checkget_read(struct Curl_easy *data, - struct connectdata *conn); -void Curl_pipeline_leave_write(struct connectdata *conn); -void Curl_pipeline_leave_read(struct connectdata *conn); -bool Curl_recvpipe_head(struct Curl_easy *data, - struct connectdata *conn); -bool Curl_sendpipe_head(struct Curl_easy *data, - struct connectdata *conn); - -#endif /* HEADER_CURL_PIPELINE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/pop3.c b/build/premake/premake5/contrib/curl/lib/pop3.c deleted file mode 100644 index 3feb3be833..0000000000 --- a/build/premake/premake5/contrib/curl/lib/pop3.c +++ /dev/null @@ -1,1612 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC1734 POP3 Authentication - * RFC1939 POP3 protocol - * RFC2195 CRAM-MD5 authentication - * RFC2384 POP URL Scheme - * RFC2449 POP3 Extension Mechanism - * RFC2595 Using TLS with IMAP, POP3 and ACAP - * RFC2831 DIGEST-MD5 authentication - * RFC4422 Simple Authentication and Security Layer (SASL) - * RFC4616 PLAIN authentication - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism - * RFC5034 POP3 SASL Authentication Mechanism - * RFC6749 OAuth 2.0 Authorization Framework - * Draft LOGIN SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_POP3 - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_UTSNAME_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -#include -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ -#include "socks.h" -#include "pop3.h" -#include "strtoofft.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "connect.h" -#include "strerror.h" -#include "select.h" -#include "multiif.h" -#include "url.h" -#include "curl_sasl.h" -#include "curl_md5.h" -#include "warnless.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Local API functions */ -static CURLcode pop3_regular_transfer(struct connectdata *conn, bool *done); -static CURLcode pop3_do(struct connectdata *conn, bool *done); -static CURLcode pop3_done(struct connectdata *conn, CURLcode status, - bool premature); -static CURLcode pop3_connect(struct connectdata *conn, bool *done); -static CURLcode pop3_disconnect(struct connectdata *conn, bool dead); -static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done); -static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done); -static CURLcode pop3_setup_connection(struct connectdata *conn); -static CURLcode pop3_parse_url_options(struct connectdata *conn); -static CURLcode pop3_parse_url_path(struct connectdata *conn); -static CURLcode pop3_parse_custom_request(struct connectdata *conn); -static CURLcode pop3_perform_auth(struct connectdata *conn, const char *mech, - const char *initresp); -static CURLcode pop3_continue_auth(struct connectdata *conn, const char *resp); -static void pop3_get_message(char *buffer, char **outptr); - -/* - * POP3 protocol handler. - */ - -const struct Curl_handler Curl_handler_pop3 = { - "POP3", /* scheme */ - pop3_setup_connection, /* setup_connection */ - pop3_do, /* do_it */ - pop3_done, /* done */ - ZERO_NULL, /* do_more */ - pop3_connect, /* connect_it */ - pop3_multi_statemach, /* connecting */ - pop3_doing, /* doing */ - pop3_getsock, /* proto_getsock */ - pop3_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - pop3_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_POP3, /* defport */ - CURLPROTO_POP3, /* protocol */ - PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY | /* flags */ - PROTOPT_URLOPTIONS -}; - -#ifdef USE_SSL -/* - * POP3S protocol handler. - */ - -const struct Curl_handler Curl_handler_pop3s = { - "POP3S", /* scheme */ - pop3_setup_connection, /* setup_connection */ - pop3_do, /* do_it */ - pop3_done, /* done */ - ZERO_NULL, /* do_more */ - pop3_connect, /* connect_it */ - pop3_multi_statemach, /* connecting */ - pop3_doing, /* doing */ - pop3_getsock, /* proto_getsock */ - pop3_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - pop3_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_POP3S, /* defport */ - CURLPROTO_POP3S, /* protocol */ - PROTOPT_CLOSEACTION | PROTOPT_SSL - | PROTOPT_NOURLQUERY | PROTOPT_URLOPTIONS /* flags */ -}; -#endif - -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed POP3 protocol handler. - */ - -static const struct Curl_handler Curl_handler_pop3_proxy = { - "POP3", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_POP3, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTP-proxyed POP3S protocol handler. - */ - -static const struct Curl_handler Curl_handler_pop3s_proxy = { - "POP3S", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_POP3S, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - -/* SASL parameters for the pop3 protocol */ -static const struct SASLproto saslpop3 = { - "pop", /* The service name */ - '*', /* Code received when continuation is expected */ - '+', /* Code to receive upon authentication success */ - 255 - 8, /* Maximum initial response length (no max) */ - pop3_perform_auth, /* Send authentication command */ - pop3_continue_auth, /* Send authentication continuation */ - pop3_get_message /* Get SASL response message */ -}; - -#ifdef USE_SSL -static void pop3_to_pop3s(struct connectdata *conn) -{ - /* Change the connection handler */ - conn->handler = &Curl_handler_pop3s; - - /* Set the connection's upgraded to TLS flag */ - conn->tls_upgraded = TRUE; -} -#else -#define pop3_to_pop3s(x) Curl_nop_stmt -#endif - -/*********************************************************************** - * - * pop3_endofresp() - * - * Checks for an ending POP3 status code at the start of the given string, but - * also detects the APOP timestamp from the server greeting and various - * capabilities from the CAPA response including the supported authentication - * types and allowed SASL mechanisms. - */ -static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len, - int *resp) -{ - struct pop3_conn *pop3c = &conn->proto.pop3c; - - /* Do we have an error response? */ - if(len >= 4 && !memcmp("-ERR", line, 4)) { - *resp = '-'; - - return TRUE; - } - - /* Are we processing CAPA command responses? */ - if(pop3c->state == POP3_CAPA) { - /* Do we have the terminating line? */ - if(len >= 1 && !memcmp(line, ".", 1)) - /* Treat the response as a success */ - *resp = '+'; - else - /* Treat the response as an untagged continuation */ - *resp = '*'; - - return TRUE; - } - - /* Do we have a success response? */ - if(len >= 3 && !memcmp("+OK", line, 3)) { - *resp = '+'; - - return TRUE; - } - - /* Do we have a continuation response? */ - if(len >= 1 && !memcmp("+", line, 1)) { - *resp = '*'; - - return TRUE; - } - - return FALSE; /* Nothing for us */ -} - -/*********************************************************************** - * - * pop3_get_message() - * - * Gets the authentication message from the response buffer. - */ -static void pop3_get_message(char *buffer, char **outptr) -{ - size_t len = 0; - char *message = NULL; - - /* Find the start of the message */ - for(message = buffer + 2; *message == ' ' || *message == '\t'; message++) - ; - - /* Find the end of the message */ - for(len = strlen(message); len--;) - if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && - message[len] != '\t') - break; - - /* Terminate the message */ - if(++len) { - message[len] = '\0'; - } - - *outptr = message; -} - -/*********************************************************************** - * - * state() - * - * This is the ONLY way to change POP3 state! - */ -static void state(struct connectdata *conn, pop3state newstate) -{ - struct pop3_conn *pop3c = &conn->proto.pop3c; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* for debug purposes */ - static const char * const names[] = { - "STOP", - "SERVERGREET", - "CAPA", - "STARTTLS", - "UPGRADETLS", - "AUTH", - "APOP", - "USER", - "PASS", - "COMMAND", - "QUIT", - /* LAST */ - }; - - if(pop3c->state != newstate) - infof(conn->data, "POP3 %p state change from %s to %s\n", - (void *)pop3c, names[pop3c->state], names[newstate]); -#endif - - pop3c->state = newstate; -} - -/*********************************************************************** - * - * pop3_perform_capa() - * - * Sends the CAPA command in order to obtain a list of server side supported - * capabilities. - */ -static CURLcode pop3_perform_capa(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - - pop3c->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */ - pop3c->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */ - pop3c->tls_supported = FALSE; /* Clear the TLS capability */ - - /* Send the CAPA command */ - result = Curl_pp_sendf(&pop3c->pp, "%s", "CAPA"); - - if(!result) - state(conn, POP3_CAPA); - - return result; -} - -/*********************************************************************** - * - * pop3_perform_starttls() - * - * Sends the STLS command to start the upgrade to TLS. - */ -static CURLcode pop3_perform_starttls(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Send the STLS command */ - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "STLS"); - - if(!result) - state(conn, POP3_STARTTLS); - - return result; -} - -/*********************************************************************** - * - * pop3_perform_upgrade_tls() - * - * Performs the upgrade to TLS. - */ -static CURLcode pop3_perform_upgrade_tls(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - - /* Start the SSL connection */ - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone); - - if(!result) { - if(pop3c->state != POP3_UPGRADETLS) - state(conn, POP3_UPGRADETLS); - - if(pop3c->ssldone) { - pop3_to_pop3s(conn); - result = pop3_perform_capa(conn); - } - } - - return result; -} - -/*********************************************************************** - * - * pop3_perform_user() - * - * Sends a clear text USER command to authenticate with. - */ -static CURLcode pop3_perform_user(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Check we have a username and password to authenticate with and end the - connect phase if we don't */ - if(!conn->bits.user_passwd) { - state(conn, POP3_STOP); - - return result; - } - - /* Send the USER command */ - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s", - conn->user ? conn->user : ""); - if(!result) - state(conn, POP3_USER); - - return result; -} - -#ifndef CURL_DISABLE_CRYPTO_AUTH -/*********************************************************************** - * - * pop3_perform_apop() - * - * Sends an APOP command to authenticate with. - */ -static CURLcode pop3_perform_apop(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - size_t i; - MD5_context *ctxt; - unsigned char digest[MD5_DIGEST_LEN]; - char secret[2 * MD5_DIGEST_LEN + 1]; - - /* Check we have a username and password to authenticate with and end the - connect phase if we don't */ - if(!conn->bits.user_passwd) { - state(conn, POP3_STOP); - - return result; - } - - /* Create the digest */ - ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) - return CURLE_OUT_OF_MEMORY; - - Curl_MD5_update(ctxt, (const unsigned char *) pop3c->apoptimestamp, - curlx_uztoui(strlen(pop3c->apoptimestamp))); - - Curl_MD5_update(ctxt, (const unsigned char *) conn->passwd, - curlx_uztoui(strlen(conn->passwd))); - - /* Finalise the digest */ - Curl_MD5_final(ctxt, digest); - - /* Convert the calculated 16 octet digest into a 32 byte hex string */ - for(i = 0; i < MD5_DIGEST_LEN; i++) - snprintf(&secret[2 * i], 3, "%02x", digest[i]); - - result = Curl_pp_sendf(&pop3c->pp, "APOP %s %s", conn->user, secret); - - if(!result) - state(conn, POP3_APOP); - - return result; -} -#endif - -/*********************************************************************** - * - * pop3_perform_auth() - * - * Sends an AUTH command allowing the client to login with the given SASL - * authentication mechanism. - */ -static CURLcode pop3_perform_auth(struct connectdata *conn, - const char *mech, - const char *initresp) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - - if(initresp) { /* AUTH ... */ - /* Send the AUTH command with the initial response */ - result = Curl_pp_sendf(&pop3c->pp, "AUTH %s %s", mech, initresp); - } - else { - /* Send the AUTH command */ - result = Curl_pp_sendf(&pop3c->pp, "AUTH %s", mech); - } - - return result; -} - -/*********************************************************************** - * - * pop3_continue_auth() - * - * Sends SASL continuation data or cancellation. - */ -static CURLcode pop3_continue_auth(struct connectdata *conn, - const char *resp) -{ - struct pop3_conn *pop3c = &conn->proto.pop3c; - - return Curl_pp_sendf(&pop3c->pp, "%s", resp); -} - -/*********************************************************************** - * - * pop3_perform_authentication() - * - * Initiates the authentication sequence, with the appropriate SASL - * authentication mechanism, falling back to APOP and clear text should a - * common mechanism not be available between the client and server. - */ -static CURLcode pop3_perform_authentication(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - saslprogress progress = SASL_IDLE; - - /* Check we have enough data to authenticate with and end the - connect phase if we don't */ - if(!Curl_sasl_can_authenticate(&pop3c->sasl, conn)) { - state(conn, POP3_STOP); - return result; - } - - if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) { - /* Calculate the SASL login details */ - result = Curl_sasl_start(&pop3c->sasl, conn, FALSE, &progress); - - if(!result) - if(progress == SASL_INPROGRESS) - state(conn, POP3_AUTH); - } - - if(!result && progress == SASL_IDLE) { -#ifndef CURL_DISABLE_CRYPTO_AUTH - if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP) - /* Perform APOP authentication */ - result = pop3_perform_apop(conn); - else -#endif - if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT) - /* Perform clear text authentication */ - result = pop3_perform_user(conn); - else { - /* Other mechanisms not supported */ - infof(conn->data, "No known authentication mechanisms supported!\n"); - result = CURLE_LOGIN_DENIED; - } - } - - return result; -} - -/*********************************************************************** - * - * pop3_perform_command() - * - * Sends a POP3 based command. - */ -static CURLcode pop3_perform_command(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct POP3 *pop3 = data->req.protop; - const char *command = NULL; - - /* Calculate the default command */ - if(pop3->id[0] == '\0' || conn->data->set.ftp_list_only) { - command = "LIST"; - - if(pop3->id[0] != '\0') - /* Message specific LIST so skip the BODY transfer */ - pop3->transfer = FTPTRANSFER_INFO; - } - else - command = "RETR"; - - /* Send the command */ - if(pop3->id[0] != '\0') - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s %s", - (pop3->custom && pop3->custom[0] != '\0' ? - pop3->custom : command), pop3->id); - else - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", - (pop3->custom && pop3->custom[0] != '\0' ? - pop3->custom : command)); - - if(!result) - state(conn, POP3_COMMAND); - - return result; -} - -/*********************************************************************** - * - * pop3_perform_quit() - * - * Performs the quit action prior to sclose() be called. - */ -static CURLcode pop3_perform_quit(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Send the QUIT command */ - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "QUIT"); - - if(!result) - state(conn, POP3_QUIT); - - return result; -} - -/* For the initial server greeting */ -static CURLcode pop3_state_servergreet_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct pop3_conn *pop3c = &conn->proto.pop3c; - const char *line = data->state.buffer; - size_t len = strlen(line); - size_t i; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Got unexpected pop3-server response"); - result = CURLE_WEIRD_SERVER_REPLY; - } - else { - /* Does the server support APOP authentication? */ - if(len >= 4 && line[len - 2] == '>') { - /* Look for the APOP timestamp */ - for(i = 3; i < len - 2; ++i) { - if(line[i] == '<') { - /* Calculate the length of the timestamp */ - size_t timestamplen = len - 1 - i; - if(!timestamplen) - break; - - /* Allocate some memory for the timestamp */ - pop3c->apoptimestamp = (char *)calloc(1, timestamplen + 1); - - if(!pop3c->apoptimestamp) - break; - - /* Copy the timestamp */ - memcpy(pop3c->apoptimestamp, line + i, timestamplen); - pop3c->apoptimestamp[timestamplen] = '\0'; - - /* Store the APOP capability */ - pop3c->authtypes |= POP3_TYPE_APOP; - break; - } - } - } - - result = pop3_perform_capa(conn); - } - - return result; -} - -/* For CAPA responses */ -static CURLcode pop3_state_capa_resp(struct connectdata *conn, int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct pop3_conn *pop3c = &conn->proto.pop3c; - const char *line = data->state.buffer; - size_t len = strlen(line); - size_t wordlen; - - (void)instate; /* no use for this yet */ - - /* Do we have a untagged continuation response? */ - if(pop3code == '*') { - /* Does the server support the STLS capability? */ - if(len >= 4 && !memcmp(line, "STLS", 4)) - pop3c->tls_supported = TRUE; - - /* Does the server support clear text authentication? */ - else if(len >= 4 && !memcmp(line, "USER", 4)) - pop3c->authtypes |= POP3_TYPE_CLEARTEXT; - - /* Does the server support SASL based authentication? */ - else if(len >= 5 && !memcmp(line, "SASL ", 5)) { - pop3c->authtypes |= POP3_TYPE_SASL; - - /* Advance past the SASL keyword */ - line += 5; - len -= 5; - - /* Loop through the data line */ - for(;;) { - size_t llen; - unsigned int mechbit; - - while(len && - (*line == ' ' || *line == '\t' || - *line == '\r' || *line == '\n')) { - - line++; - len--; - } - - if(!len) - break; - - /* Extract the word */ - for(wordlen = 0; wordlen < len && line[wordlen] != ' ' && - line[wordlen] != '\t' && line[wordlen] != '\r' && - line[wordlen] != '\n';) - wordlen++; - - /* Test the word for a matching authentication mechanism */ - mechbit = Curl_sasl_decode_mech(line, wordlen, &llen); - if(mechbit && llen == wordlen) - pop3c->sasl.authmechs |= mechbit; - - line += wordlen; - len -= wordlen; - } - } - } - else if(pop3code == '+') { - if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { - /* We don't have a SSL/TLS connection yet, but SSL is requested */ - if(pop3c->tls_supported) - /* Switch to TLS connection now */ - result = pop3_perform_starttls(conn); - else if(data->set.use_ssl == CURLUSESSL_TRY) - /* Fallback and carry on with authentication */ - result = pop3_perform_authentication(conn); - else { - failf(data, "STLS not supported."); - result = CURLE_USE_SSL_FAILED; - } - } - else - result = pop3_perform_authentication(conn); - } - else { - /* Clear text is supported when CAPA isn't recognised */ - pop3c->authtypes |= POP3_TYPE_CLEARTEXT; - - result = pop3_perform_authentication(conn); - } - - return result; -} - -/* For STARTTLS responses */ -static CURLcode pop3_state_starttls_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - if(data->set.use_ssl != CURLUSESSL_TRY) { - failf(data, "STARTTLS denied"); - result = CURLE_USE_SSL_FAILED; - } - else - result = pop3_perform_authentication(conn); - } - else - result = pop3_perform_upgrade_tls(conn); - - return result; -} - -/* For SASL authentication responses */ -static CURLcode pop3_state_auth_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct pop3_conn *pop3c = &conn->proto.pop3c; - saslprogress progress; - - (void)instate; /* no use for this yet */ - - result = Curl_sasl_continue(&pop3c->sasl, conn, pop3code, &progress); - if(!result) - switch(progress) { - case SASL_DONE: - state(conn, POP3_STOP); /* Authenticated */ - break; - case SASL_IDLE: /* No mechanism left after cancellation */ -#ifndef CURL_DISABLE_CRYPTO_AUTH - if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP) - /* Perform APOP authentication */ - result = pop3_perform_apop(conn); - else -#endif - if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT) - /* Perform clear text authentication */ - result = pop3_perform_user(conn); - else { - failf(data, "Authentication cancelled"); - result = CURLE_LOGIN_DENIED; - } - break; - default: - break; - } - - return result; -} - -#ifndef CURL_DISABLE_CRYPTO_AUTH -/* For APOP responses */ -static CURLcode pop3_state_apop_resp(struct connectdata *conn, int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Authentication failed: %d", pop3code); - result = CURLE_LOGIN_DENIED; - } - else - /* End of connect phase */ - state(conn, POP3_STOP); - - return result; -} -#endif - -/* For USER responses */ -static CURLcode pop3_state_user_resp(struct connectdata *conn, int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Access denied. %c", pop3code); - result = CURLE_LOGIN_DENIED; - } - else - /* Send the PASS command */ - result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s", - conn->passwd ? conn->passwd : ""); - if(!result) - state(conn, POP3_PASS); - - return result; -} - -/* For PASS responses */ -static CURLcode pop3_state_pass_resp(struct connectdata *conn, int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - failf(data, "Access denied. %c", pop3code); - result = CURLE_LOGIN_DENIED; - } - else - /* End of connect phase */ - state(conn, POP3_STOP); - - return result; -} - -/* For command responses */ -static CURLcode pop3_state_command_resp(struct connectdata *conn, - int pop3code, - pop3state instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct POP3 *pop3 = data->req.protop; - struct pop3_conn *pop3c = &conn->proto.pop3c; - struct pingpong *pp = &pop3c->pp; - - (void)instate; /* no use for this yet */ - - if(pop3code != '+') { - state(conn, POP3_STOP); - return CURLE_RECV_ERROR; - } - - /* This 'OK' line ends with a CR LF pair which is the two first bytes of the - EOB string so count this is two matching bytes. This is necessary to make - the code detect the EOB if the only data than comes now is %2e CR LF like - when there is no body to return. */ - pop3c->eob = 2; - - /* But since this initial CR LF pair is not part of the actual body, we set - the strip counter here so that these bytes won't be delivered. */ - pop3c->strip = 2; - - if(pop3->transfer == FTPTRANSFER_BODY) { - /* POP3 download */ - Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL); - - if(pp->cache) { - /* The header "cache" contains a bunch of data that is actually body - content so send it as such. Note that there may even be additional - "headers" after the body */ - - if(!data->set.opt_no_body) { - result = Curl_pop3_write(conn, pp->cache, pp->cache_size); - if(result) - return result; - } - - /* Free the cache */ - Curl_safefree(pp->cache); - - /* Reset the cache size */ - pp->cache_size = 0; - } - } - - /* End of DO phase */ - state(conn, POP3_STOP); - - return result; -} - -static CURLcode pop3_statemach_act(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - int pop3code; - struct pop3_conn *pop3c = &conn->proto.pop3c; - struct pingpong *pp = &pop3c->pp; - size_t nread = 0; - - /* Busy upgrading the connection; right now all I/O is SSL/TLS, not POP3 */ - if(pop3c->state == POP3_UPGRADETLS) - return pop3_perform_upgrade_tls(conn); - - /* Flush any data that needs to be sent */ - if(pp->sendleft) - return Curl_pp_flushsend(pp); - - do { - /* Read the response from the server */ - result = Curl_pp_readresp(sock, pp, &pop3code, &nread); - if(result) - return result; - - if(!pop3code) - break; - - /* We have now received a full POP3 server response */ - switch(pop3c->state) { - case POP3_SERVERGREET: - result = pop3_state_servergreet_resp(conn, pop3code, pop3c->state); - break; - - case POP3_CAPA: - result = pop3_state_capa_resp(conn, pop3code, pop3c->state); - break; - - case POP3_STARTTLS: - result = pop3_state_starttls_resp(conn, pop3code, pop3c->state); - break; - - case POP3_AUTH: - result = pop3_state_auth_resp(conn, pop3code, pop3c->state); - break; - -#ifndef CURL_DISABLE_CRYPTO_AUTH - case POP3_APOP: - result = pop3_state_apop_resp(conn, pop3code, pop3c->state); - break; -#endif - - case POP3_USER: - result = pop3_state_user_resp(conn, pop3code, pop3c->state); - break; - - case POP3_PASS: - result = pop3_state_pass_resp(conn, pop3code, pop3c->state); - break; - - case POP3_COMMAND: - result = pop3_state_command_resp(conn, pop3code, pop3c->state); - break; - - case POP3_QUIT: - /* fallthrough, just stop! */ - default: - /* internal error */ - state(conn, POP3_STOP); - break; - } - } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp)); - - return result; -} - -/* Called repeatedly until done from multi.c */ -static CURLcode pop3_multi_statemach(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - - if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) { - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone); - if(result || !pop3c->ssldone) - return result; - } - - result = Curl_pp_statemach(&pop3c->pp, FALSE); - *done = (pop3c->state == POP3_STOP) ? TRUE : FALSE; - - return result; -} - -static CURLcode pop3_block_statemach(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - - while(pop3c->state != POP3_STOP && !result) - result = Curl_pp_statemach(&pop3c->pp, TRUE); - - return result; -} - -/* Allocate and initialize the POP3 struct for the current Curl_easy if - required */ -static CURLcode pop3_init(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct POP3 *pop3; - - pop3 = data->req.protop = calloc(sizeof(struct POP3), 1); - if(!pop3) - result = CURLE_OUT_OF_MEMORY; - - return result; -} - -/* For the POP3 "protocol connect" and "doing" phases only */ -static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - return Curl_pp_getsock(&conn->proto.pop3c.pp, socks, numsocks); -} - -/*********************************************************************** - * - * pop3_connect() - * - * This function should do everything that is to be considered a part of the - * connection phase. - * - * The variable 'done' points to will be TRUE if the protocol-layer connect - * phase is done when this function returns, or FALSE if not. - */ -static CURLcode pop3_connect(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - struct pingpong *pp = &pop3c->pp; - - *done = FALSE; /* default to not done yet */ - - /* We always support persistent connections in POP3 */ - connkeep(conn, "POP3 default"); - - /* Set the default response time-out */ - pp->response_time = RESP_TIMEOUT; - pp->statemach_act = pop3_statemach_act; - pp->endofresp = pop3_endofresp; - pp->conn = conn; - - /* Set the default preferred authentication type and mechanism */ - pop3c->preftype = POP3_TYPE_ANY; - Curl_sasl_init(&pop3c->sasl, &saslpop3); - - /* Initialise the pingpong layer */ - Curl_pp_init(pp); - - /* Parse the URL options */ - result = pop3_parse_url_options(conn); - if(result) - return result; - - /* Start off waiting for the server greeting response */ - state(conn, POP3_SERVERGREET); - - result = pop3_multi_statemach(conn, done); - - return result; -} - -/*********************************************************************** - * - * pop3_done() - * - * The DONE function. This does what needs to be done after a single DO has - * performed. - * - * Input argument is already checked for validity. - */ -static CURLcode pop3_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct POP3 *pop3 = data->req.protop; - - (void)premature; - - if(!pop3) - return CURLE_OK; - - if(status) { - connclose(conn, "POP3 done with bad status"); - result = status; /* use the already set error code */ - } - - /* Cleanup our per-request based variables */ - Curl_safefree(pop3->id); - Curl_safefree(pop3->custom); - - /* Clear the transfer mode for the next request */ - pop3->transfer = FTPTRANSFER_BODY; - - return result; -} - -/*********************************************************************** - * - * pop3_perform() - * - * This is the actual DO function for POP3. Get a message/listing according to - * the options previously setup. - */ -static CURLcode pop3_perform(struct connectdata *conn, bool *connected, - bool *dophase_done) -{ - /* This is POP3 and no proxy */ - CURLcode result = CURLE_OK; - struct POP3 *pop3 = conn->data->req.protop; - - DEBUGF(infof(conn->data, "DO phase starts\n")); - - if(conn->data->set.opt_no_body) { - /* Requested no body means no transfer */ - pop3->transfer = FTPTRANSFER_INFO; - } - - *dophase_done = FALSE; /* not done yet */ - - /* Start the first command in the DO phase */ - result = pop3_perform_command(conn); - if(result) - return result; - - /* Run the state-machine */ - result = pop3_multi_statemach(conn, dophase_done); - - *connected = conn->bits.tcpconnect[FIRSTSOCKET]; - - if(*dophase_done) - DEBUGF(infof(conn->data, "DO phase is complete\n")); - - return result; -} - -/*********************************************************************** - * - * pop3_do() - * - * This function is registered as 'curl_do' function. It decodes the path - * parts etc as a wrapper to the actual DO function (pop3_perform). - * - * The input argument is already checked for validity. - */ -static CURLcode pop3_do(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - - *done = FALSE; /* default to false */ - - /* Parse the URL path */ - result = pop3_parse_url_path(conn); - if(result) - return result; - - /* Parse the custom request */ - result = pop3_parse_custom_request(conn); - if(result) - return result; - - result = pop3_regular_transfer(conn, done); - - return result; -} - -/*********************************************************************** - * - * pop3_disconnect() - * - * Disconnect from an POP3 server. Cleanup protocol-specific per-connection - * resources. BLOCKING. - */ -static CURLcode pop3_disconnect(struct connectdata *conn, bool dead_connection) -{ - struct pop3_conn *pop3c = &conn->proto.pop3c; - - /* We cannot send quit unconditionally. If this connection is stale or - bad in any way, sending quit and waiting around here will make the - disconnect wait in vain and cause more problems than we need to. */ - - /* The POP3 session may or may not have been allocated/setup at this - point! */ - if(!dead_connection && pop3c->pp.conn && pop3c->pp.conn->bits.protoconnstart) - if(!pop3_perform_quit(conn)) - (void)pop3_block_statemach(conn); /* ignore errors on QUIT */ - - /* Disconnect from the server */ - Curl_pp_disconnect(&pop3c->pp); - - /* Cleanup the SASL module */ - Curl_sasl_cleanup(conn, pop3c->sasl.authused); - - /* Cleanup our connection based variables */ - Curl_safefree(pop3c->apoptimestamp); - - return CURLE_OK; -} - -/* Call this when the DO phase has completed */ -static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected) -{ - (void)conn; - (void)connected; - - return CURLE_OK; -} - -/* Called from multi.c while DOing */ -static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done) -{ - CURLcode result = pop3_multi_statemach(conn, dophase_done); - - if(result) - DEBUGF(infof(conn->data, "DO phase failed\n")); - else if(*dophase_done) { - result = pop3_dophase_done(conn, FALSE /* not connected */); - - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - - return result; -} - -/*********************************************************************** - * - * pop3_regular_transfer() - * - * The input argument is already checked for validity. - * - * Performs all commands done before a regular transfer between a local and a - * remote host. - */ -static CURLcode pop3_regular_transfer(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result = CURLE_OK; - bool connected = FALSE; - struct Curl_easy *data = conn->data; - - /* Make sure size is unknown at this point */ - data->req.size = -1; - - /* Set the progress data */ - Curl_pgrsSetUploadCounter(data, 0); - Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); - - /* Carry out the perform */ - result = pop3_perform(conn, &connected, dophase_done); - - /* Perform post DO phase operations if necessary */ - if(!result && *dophase_done) - result = pop3_dophase_done(conn, connected); - - return result; -} - -static CURLcode pop3_setup_connection(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - - /* Initialise the POP3 layer */ - CURLcode result = pop3_init(conn); - if(result) - return result; - - /* Clear the TLS upgraded flag */ - conn->tls_upgraded = FALSE; - - /* Set up the proxy if necessary */ - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel POP3 operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_pop3) - conn->handler = &Curl_handler_pop3_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_pop3s_proxy; -#else - failf(data, "POP3S not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - /* set it up as an HTTP connection instead */ - return conn->handler->setup_connection(conn); -#else - failf(data, "POP3 over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - data->state.path++; /* don't include the initial slash */ - - return CURLE_OK; -} - -/*********************************************************************** - * - * pop3_parse_url_options() - * - * Parse the URL login options. - */ -static CURLcode pop3_parse_url_options(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct pop3_conn *pop3c = &conn->proto.pop3c; - const char *ptr = conn->options; - - pop3c->sasl.resetprefs = TRUE; - - while(!result && ptr && *ptr) { - const char *key = ptr; - const char *value; - - while(*ptr && *ptr != '=') - ptr++; - - value = ptr + 1; - - while(*ptr && *ptr != ';') - ptr++; - - if(strncasecompare(key, "AUTH=", 5)) { - result = Curl_sasl_parse_url_auth_option(&pop3c->sasl, - value, ptr - value); - - if(result && strncasecompare(value, "+APOP", ptr - value)) { - pop3c->preftype = POP3_TYPE_APOP; - pop3c->sasl.prefmech = SASL_AUTH_NONE; - result = CURLE_OK; - } - } - else - result = CURLE_URL_MALFORMAT; - - if(*ptr == ';') - ptr++; - } - - if(pop3c->preftype != POP3_TYPE_APOP) - switch(pop3c->sasl.prefmech) { - case SASL_AUTH_NONE: - pop3c->preftype = POP3_TYPE_NONE; - break; - case SASL_AUTH_DEFAULT: - pop3c->preftype = POP3_TYPE_ANY; - break; - default: - pop3c->preftype = POP3_TYPE_SASL; - break; - } - - return result; -} - -/*********************************************************************** - * - * pop3_parse_url_path() - * - * Parse the URL path into separate path components. - */ -static CURLcode pop3_parse_url_path(struct connectdata *conn) -{ - /* The POP3 struct is already initialised in pop3_connect() */ - struct Curl_easy *data = conn->data; - struct POP3 *pop3 = data->req.protop; - const char *path = data->state.path; - - /* URL decode the path for the message ID */ - return Curl_urldecode(data, path, 0, &pop3->id, NULL, TRUE); -} - -/*********************************************************************** - * - * pop3_parse_custom_request() - * - * Parse the custom request. - */ -static CURLcode pop3_parse_custom_request(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct POP3 *pop3 = data->req.protop; - const char *custom = data->set.str[STRING_CUSTOMREQUEST]; - - /* URL decode the custom request */ - if(custom) - result = Curl_urldecode(data, custom, 0, &pop3->custom, NULL, TRUE); - - return result; -} - -/*********************************************************************** - * - * Curl_pop3_write() - * - * This function scans the body after the end-of-body and writes everything - * until the end is found. - */ -CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread) -{ - /* This code could be made into a special function in the handler struct */ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SingleRequest *k = &data->req; - - struct pop3_conn *pop3c = &conn->proto.pop3c; - bool strip_dot = FALSE; - size_t last = 0; - size_t i; - - /* Search through the buffer looking for the end-of-body marker which is - 5 bytes (0d 0a 2e 0d 0a). Note that a line starting with a dot matches - the eob so the server will have prefixed it with an extra dot which we - need to strip out. Additionally the marker could of course be spread out - over 5 different data chunks. */ - for(i = 0; i < nread; i++) { - size_t prev = pop3c->eob; - - switch(str[i]) { - case 0x0d: - if(pop3c->eob == 0) { - pop3c->eob++; - - if(i) { - /* Write out the body part that didn't match */ - result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last], - i - last); - - if(result) - return result; - - last = i; - } - } - else if(pop3c->eob == 3) - pop3c->eob++; - else - /* If the character match wasn't at position 0 or 3 then restart the - pattern matching */ - pop3c->eob = 1; - break; - - case 0x0a: - if(pop3c->eob == 1 || pop3c->eob == 4) - pop3c->eob++; - else - /* If the character match wasn't at position 1 or 4 then start the - search again */ - pop3c->eob = 0; - break; - - case 0x2e: - if(pop3c->eob == 2) - pop3c->eob++; - else if(pop3c->eob == 3) { - /* We have an extra dot after the CRLF which we need to strip off */ - strip_dot = TRUE; - pop3c->eob = 0; - } - else - /* If the character match wasn't at position 2 then start the search - again */ - pop3c->eob = 0; - break; - - default: - pop3c->eob = 0; - break; - } - - /* Did we have a partial match which has subsequently failed? */ - if(prev && prev >= pop3c->eob) { - /* Strip can only be non-zero for the very first mismatch after CRLF - and then both prev and strip are equal and nothing will be output - below */ - while(prev && pop3c->strip) { - prev--; - pop3c->strip--; - } - - if(prev) { - /* If the partial match was the CRLF and dot then only write the CRLF - as the server would have inserted the dot */ - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)POP3_EOB, - strip_dot ? prev - 1 : prev); - - if(result) - return result; - - last = i; - strip_dot = FALSE; - } - } - } - - if(pop3c->eob == POP3_EOB_LEN) { - /* We have a full match so the transfer is done, however we must transfer - the CRLF at the start of the EOB as this is considered to be part of the - message as per RFC-1939, sect. 3 */ - result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)POP3_EOB, 2); - - k->keepon &= ~KEEP_RECV; - pop3c->eob = 0; - - return result; - } - - if(pop3c->eob) - /* While EOB is matching nothing should be output */ - return CURLE_OK; - - if(nread - last) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, &str[last], - nread - last); - } - - return result; -} - -#endif /* CURL_DISABLE_POP3 */ diff --git a/build/premake/premake5/contrib/curl/lib/pop3.h b/build/premake/premake5/contrib/curl/lib/pop3.h deleted file mode 100644 index a8e697cde2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/pop3.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef HEADER_CURL_POP3_H -#define HEADER_CURL_POP3_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2009 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "pingpong.h" -#include "curl_sasl.h" - -/**************************************************************************** - * POP3 unique setup - ***************************************************************************/ -typedef enum { - POP3_STOP, /* do nothing state, stops the state machine */ - POP3_SERVERGREET, /* waiting for the initial greeting immediately after - a connect */ - POP3_CAPA, - POP3_STARTTLS, - POP3_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS - (multi mode only) */ - POP3_AUTH, - POP3_APOP, - POP3_USER, - POP3_PASS, - POP3_COMMAND, - POP3_QUIT, - POP3_LAST /* never used */ -} pop3state; - -/* This POP3 struct is used in the Curl_easy. All POP3 data that is - connection-oriented must be in pop3_conn to properly deal with the fact that - perhaps the Curl_easy is changed between the times the connection is - used. */ -struct POP3 { - curl_pp_transfer transfer; - char *id; /* Message ID */ - char *custom; /* Custom Request */ -}; - -/* pop3_conn is used for struct connection-oriented data in the connectdata - struct */ -struct pop3_conn { - struct pingpong pp; - pop3state state; /* Always use pop3.c:state() to change state! */ - bool ssldone; /* Is connect() over SSL done? */ - size_t eob; /* Number of bytes of the EOB (End Of Body) that - have been received so far */ - size_t strip; /* Number of bytes from the start to ignore as - non-body */ - struct SASL sasl; /* SASL-related storage */ - unsigned int authtypes; /* Accepted authentication types */ - unsigned int preftype; /* Preferred authentication type */ - char *apoptimestamp; /* APOP timestamp from the server greeting */ - bool tls_supported; /* StartTLS capability supported by server */ -}; - -extern const struct Curl_handler Curl_handler_pop3; -extern const struct Curl_handler Curl_handler_pop3s; - -/* Authentication type flags */ -#define POP3_TYPE_CLEARTEXT (1 << 0) -#define POP3_TYPE_APOP (1 << 1) -#define POP3_TYPE_SASL (1 << 2) - -/* Authentication type values */ -#define POP3_TYPE_NONE 0 -#define POP3_TYPE_ANY ~0U - -/* This is the 5-bytes End-Of-Body marker for POP3 */ -#define POP3_EOB "\x0d\x0a\x2e\x0d\x0a" -#define POP3_EOB_LEN 5 - -/* This function scans the body after the end-of-body and writes everything - * until the end is found */ -CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread); - -#endif /* HEADER_CURL_POP3_H */ diff --git a/build/premake/premake5/contrib/curl/lib/progress.c b/build/premake/premake5/contrib/curl/lib/progress.c deleted file mode 100644 index 60627b2af4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/progress.c +++ /dev/null @@ -1,567 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "urldata.h" -#include "sendf.h" -#include "progress.h" -#include "curl_printf.h" - -/* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero - byte) */ -static void time2str(char *r, curl_off_t seconds) -{ - curl_off_t d, h, m, s; - if(seconds <= 0) { - strcpy(r, "--:--:--"); - return; - } - h = seconds / CURL_OFF_T_C(3600); - if(h <= CURL_OFF_T_C(99)) { - m = (seconds - (h*CURL_OFF_T_C(3600))) / CURL_OFF_T_C(60); - s = (seconds - (h*CURL_OFF_T_C(3600))) - (m*CURL_OFF_T_C(60)); - snprintf(r, 9, "%2" CURL_FORMAT_CURL_OFF_T ":%02" CURL_FORMAT_CURL_OFF_T - ":%02" CURL_FORMAT_CURL_OFF_T, h, m, s); - } - else { - /* this equals to more than 99 hours, switch to a more suitable output - format to fit within the limits. */ - d = seconds / CURL_OFF_T_C(86400); - h = (seconds - (d*CURL_OFF_T_C(86400))) / CURL_OFF_T_C(3600); - if(d <= CURL_OFF_T_C(999)) - snprintf(r, 9, "%3" CURL_FORMAT_CURL_OFF_T - "d %02" CURL_FORMAT_CURL_OFF_T "h", d, h); - else - snprintf(r, 9, "%7" CURL_FORMAT_CURL_OFF_T "d", d); - } -} - -/* The point of this function would be to return a string of the input data, - but never longer than 5 columns (+ one zero byte). - Add suffix k, M, G when suitable... */ -static char *max5data(curl_off_t bytes, char *max5) -{ -#define ONE_KILOBYTE CURL_OFF_T_C(1024) -#define ONE_MEGABYTE (CURL_OFF_T_C(1024) * ONE_KILOBYTE) -#define ONE_GIGABYTE (CURL_OFF_T_C(1024) * ONE_MEGABYTE) -#define ONE_TERABYTE (CURL_OFF_T_C(1024) * ONE_GIGABYTE) -#define ONE_PETABYTE (CURL_OFF_T_C(1024) * ONE_TERABYTE) - - if(bytes < CURL_OFF_T_C(100000)) - snprintf(max5, 6, "%5" CURL_FORMAT_CURL_OFF_T, bytes); - - else if(bytes < CURL_OFF_T_C(10000) * ONE_KILOBYTE) - snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "k", bytes/ONE_KILOBYTE); - - else if(bytes < CURL_OFF_T_C(100) * ONE_MEGABYTE) - /* 'XX.XM' is good as long as we're less than 100 megs */ - snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0" - CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE, - (bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) ); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) - - else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE) - /* 'XXXXM' is good until we're at 10000MB or above */ - snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE); - - else if(bytes < CURL_OFF_T_C(100) * ONE_GIGABYTE) - /* 10000 MB - 100 GB, we show it as XX.XG */ - snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0" - CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE, - (bytes%ONE_GIGABYTE) / (ONE_GIGABYTE/CURL_OFF_T_C(10)) ); - - else if(bytes < CURL_OFF_T_C(10000) * ONE_GIGABYTE) - /* up to 10000GB, display without decimal: XXXXG */ - snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE); - - else if(bytes < CURL_OFF_T_C(10000) * ONE_TERABYTE) - /* up to 10000TB, display without decimal: XXXXT */ - snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "T", bytes/ONE_TERABYTE); - - else - /* up to 10000PB, display without decimal: XXXXP */ - snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "P", bytes/ONE_PETABYTE); - - /* 16384 petabytes (16 exabytes) is the maximum a 64 bit unsigned number - can hold, but our data type is signed so 8192PB will be the maximum. */ - -#else - - else - snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE); - -#endif - - return max5; -} - -/* - - New proposed interface, 9th of February 2000: - - pgrsStartNow() - sets start time - pgrsSetDownloadSize(x) - known expected download size - pgrsSetUploadSize(x) - known expected upload size - pgrsSetDownloadCounter() - amount of data currently downloaded - pgrsSetUploadCounter() - amount of data currently uploaded - pgrsUpdate() - show progress - pgrsDone() - transfer complete - -*/ - -int Curl_pgrsDone(struct connectdata *conn) -{ - int rc; - struct Curl_easy *data = conn->data; - data->progress.lastshow=0; - rc = Curl_pgrsUpdate(conn); /* the final (forced) update */ - if(rc) - return rc; - - if(!(data->progress.flags & PGRS_HIDE) && - !data->progress.callback) - /* only output if we don't use a progress callback and we're not - * hidden */ - fprintf(data->set.err, "\n"); - - data->progress.speeder_c = 0; /* reset the progress meter display */ - return 0; -} - -/* reset all times except redirect, and reset the known transfer sizes */ -void Curl_pgrsResetTimesSizes(struct Curl_easy *data) -{ - data->progress.t_nslookup = 0.0; - data->progress.t_connect = 0.0; - data->progress.t_pretransfer = 0.0; - data->progress.t_starttransfer = 0.0; - - Curl_pgrsSetDownloadSize(data, -1); - Curl_pgrsSetUploadSize(data, -1); -} - -void Curl_pgrsTime(struct Curl_easy *data, timerid timer) -{ - struct timeval now = Curl_tvnow(); - - switch(timer) { - default: - case TIMER_NONE: - /* mistake filter */ - break; - case TIMER_STARTOP: - /* This is set at the start of a transfer */ - data->progress.t_startop = now; - break; - case TIMER_STARTSINGLE: - /* This is set at the start of each single fetch */ - data->progress.t_startsingle = now; - break; - - case TIMER_STARTACCEPT: - data->progress.t_acceptdata = Curl_tvnow(); - break; - - case TIMER_NAMELOOKUP: - data->progress.t_nslookup = - Curl_tvdiff_secs(now, data->progress.t_startsingle); - break; - case TIMER_CONNECT: - data->progress.t_connect = - Curl_tvdiff_secs(now, data->progress.t_startsingle); - break; - case TIMER_APPCONNECT: - data->progress.t_appconnect = - Curl_tvdiff_secs(now, data->progress.t_startsingle); - break; - case TIMER_PRETRANSFER: - data->progress.t_pretransfer = - Curl_tvdiff_secs(now, data->progress.t_startsingle); - break; - case TIMER_STARTTRANSFER: - data->progress.t_starttransfer = - Curl_tvdiff_secs(now, data->progress.t_startsingle); - break; - case TIMER_POSTRANSFER: - /* this is the normal end-of-transfer thing */ - break; - case TIMER_REDIRECT: - data->progress.t_redirect = Curl_tvdiff_secs(now, data->progress.start); - break; - } -} - -void Curl_pgrsStartNow(struct Curl_easy *data) -{ - data->progress.speeder_c = 0; /* reset the progress meter display */ - data->progress.start = Curl_tvnow(); - data->progress.ul_limit_start.tv_sec = 0; - data->progress.ul_limit_start.tv_usec = 0; - data->progress.dl_limit_start.tv_sec = 0; - data->progress.dl_limit_start.tv_usec = 0; - /* clear all bits except HIDE and HEADERS_OUT */ - data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT; -} - -/* - * This is used to handle speed limits, calculating how much milliseconds we - * need to wait until we're back under the speed limit, if needed. - * - * The way it works is by having a "starting point" (time & amount of data - * transfered by then) used in the speed computation, to be used instead of the - * start of the transfer. - * This starting point is regularly moved as transfer goes on, to keep getting - * accurate values (instead of average over the entire tranfer). - * - * This function takes the current amount of data transfered, the amount at the - * starting point, the limit (in bytes/s), the time of the starting point and - * the current time. - * - * Returns -1 if no waiting is needed (not enough data transfered since - * starting point yet), 0 when no waiting is needed but the starting point - * should be reset (to current), or the number of milliseconds to wait to get - * back under the speed limit. - */ -long Curl_pgrsLimitWaitTime(curl_off_t cursize, - curl_off_t startsize, - curl_off_t limit, - struct timeval start, - struct timeval now) -{ - curl_off_t size = cursize - startsize; - time_t minimum; - time_t actual; - - /* we don't have a starting point yet -- return 0 so it gets (re)set */ - if(start.tv_sec == 0 && start.tv_usec == 0) - return 0; - - /* not enough data yet */ - if(size < limit) - return -1; - - minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit); - actual = Curl_tvdiff(now, start); - - if(actual < minimum) - /* this is a conversion on some systems (64bit time_t => 32bit long) */ - return (long)(minimum - actual); - else - return 0; -} - -void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size) -{ - struct timeval now = Curl_tvnow(); - - data->progress.downloaded = size; - - /* download speed limit */ - if((data->set.max_recv_speed > 0) && - (Curl_pgrsLimitWaitTime(data->progress.downloaded, - data->progress.dl_limit_size, - data->set.max_recv_speed, - data->progress.dl_limit_start, - now) == 0)) { - data->progress.dl_limit_start = now; - data->progress.dl_limit_size = size; - } -} - -void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size) -{ - struct timeval now = Curl_tvnow(); - - data->progress.uploaded = size; - - /* upload speed limit */ - if((data->set.max_send_speed > 0) && - (Curl_pgrsLimitWaitTime(data->progress.uploaded, - data->progress.ul_limit_size, - data->set.max_send_speed, - data->progress.ul_limit_start, - now) == 0)) { - data->progress.ul_limit_start = now; - data->progress.ul_limit_size = size; - } -} - -void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size) -{ - if(size >= 0) { - data->progress.size_dl = size; - data->progress.flags |= PGRS_DL_SIZE_KNOWN; - } - else { - data->progress.size_dl = 0; - data->progress.flags &= ~PGRS_DL_SIZE_KNOWN; - } -} - -void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size) -{ - if(size >= 0) { - data->progress.size_ul = size; - data->progress.flags |= PGRS_UL_SIZE_KNOWN; - } - else { - data->progress.size_ul = 0; - data->progress.flags &= ~PGRS_UL_SIZE_KNOWN; - } -} - -/* - * Curl_pgrsUpdate() returns 0 for success or the value returned by the - * progress callback! - */ -int Curl_pgrsUpdate(struct connectdata *conn) -{ - struct timeval now; - int result; - char max5[6][10]; - curl_off_t dlpercen=0; - curl_off_t ulpercen=0; - curl_off_t total_percen=0; - curl_off_t total_transfer; - curl_off_t total_expected_transfer; - curl_off_t timespent; - struct Curl_easy *data = conn->data; - int nowindex = data->progress.speeder_c% CURR_TIME; - int checkindex; - int countindex; /* amount of seconds stored in the speeder array */ - char time_left[10]; - char time_total[10]; - char time_spent[10]; - curl_off_t ulestimate=0; - curl_off_t dlestimate=0; - curl_off_t total_estimate; - bool shownow=FALSE; - - now = Curl_tvnow(); /* what time is it */ - - /* The time spent so far (from the start) */ - data->progress.timespent = curlx_tvdiff_secs(now, data->progress.start); - timespent = (curl_off_t)data->progress.timespent; - - /* The average download speed this far */ - data->progress.dlspeed = (curl_off_t) - ((double)data->progress.downloaded/ - (data->progress.timespent>0?data->progress.timespent:1)); - - /* The average upload speed this far */ - data->progress.ulspeed = (curl_off_t) - ((double)data->progress.uploaded/ - (data->progress.timespent>0?data->progress.timespent:1)); - - /* Calculations done at most once a second, unless end is reached */ - if(data->progress.lastshow != now.tv_sec) { - shownow = TRUE; - - data->progress.lastshow = now.tv_sec; - - /* Let's do the "current speed" thing, which should use the fastest - of the dl/ul speeds. Store the faster speed at entry 'nowindex'. */ - data->progress.speeder[ nowindex ] = - data->progress.downloaded>data->progress.uploaded? - data->progress.downloaded:data->progress.uploaded; - - /* remember the exact time for this moment */ - data->progress.speeder_time [ nowindex ] = now; - - /* advance our speeder_c counter, which is increased every time we get - here and we expect it to never wrap as 2^32 is a lot of seconds! */ - data->progress.speeder_c++; - - /* figure out how many index entries of data we have stored in our speeder - array. With N_ENTRIES filled in, we have about N_ENTRIES-1 seconds of - transfer. Imagine, after one second we have filled in two entries, - after two seconds we've filled in three entries etc. */ - countindex = ((data->progress.speeder_c>=CURR_TIME)? - CURR_TIME:data->progress.speeder_c) - 1; - - /* first of all, we don't do this if there's no counted seconds yet */ - if(countindex) { - time_t span_ms; - - /* Get the index position to compare with the 'nowindex' position. - Get the oldest entry possible. While we have less than CURR_TIME - entries, the first entry will remain the oldest. */ - checkindex = (data->progress.speeder_c>=CURR_TIME)? - data->progress.speeder_c%CURR_TIME:0; - - /* Figure out the exact time for the time span */ - span_ms = Curl_tvdiff(now, - data->progress.speeder_time[checkindex]); - if(0 == span_ms) - span_ms=1; /* at least one millisecond MUST have passed */ - - /* Calculate the average speed the last 'span_ms' milliseconds */ - { - curl_off_t amount = data->progress.speeder[nowindex]- - data->progress.speeder[checkindex]; - - if(amount > CURL_OFF_T_C(4294967) /* 0xffffffff/1000 */) - /* the 'amount' value is bigger than would fit in 32 bits if - multiplied with 1000, so we use the double math for this */ - data->progress.current_speed = (curl_off_t) - ((double)amount/((double)span_ms/1000.0)); - else - /* the 'amount' value is small enough to fit within 32 bits even - when multiplied with 1000 */ - data->progress.current_speed = amount*CURL_OFF_T_C(1000)/span_ms; - } - } - else - /* the first second we use the main average */ - data->progress.current_speed = - (data->progress.ulspeed>data->progress.dlspeed)? - data->progress.ulspeed:data->progress.dlspeed; - - } /* Calculations end */ - - if(!(data->progress.flags & PGRS_HIDE)) { - /* progress meter has not been shut off */ - - if(data->set.fxferinfo) { - /* There's a callback set, call that */ - result= data->set.fxferinfo(data->set.progress_client, - data->progress.size_dl, - data->progress.downloaded, - data->progress.size_ul, - data->progress.uploaded); - if(result) - failf(data, "Callback aborted"); - return result; - } - else if(data->set.fprogress) { - /* The older deprecated callback is set, call that */ - result= data->set.fprogress(data->set.progress_client, - (double)data->progress.size_dl, - (double)data->progress.downloaded, - (double)data->progress.size_ul, - (double)data->progress.uploaded); - if(result) - failf(data, "Callback aborted"); - return result; - } - - if(!shownow) - /* only show the internal progress meter once per second */ - return 0; - - /* If there's no external callback set, use internal code to show - progress */ - - if(!(data->progress.flags & PGRS_HEADERS_OUT)) { - if(data->state.resume_from) { - fprintf(data->set.err, - "** Resuming transfer from byte position %" - CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from); - } - fprintf(data->set.err, - " %% Total %% Received %% Xferd Average Speed " - "Time Time Time Current\n" - " Dload Upload " - "Total Spent Left Speed\n"); - data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */ - } - - /* Figure out the estimated time of arrival for the upload */ - if((data->progress.flags & PGRS_UL_SIZE_KNOWN) && - (data->progress.ulspeed > CURL_OFF_T_C(0))) { - ulestimate = data->progress.size_ul / data->progress.ulspeed; - - if(data->progress.size_ul > CURL_OFF_T_C(10000)) - ulpercen = data->progress.uploaded / - (data->progress.size_ul/CURL_OFF_T_C(100)); - else if(data->progress.size_ul > CURL_OFF_T_C(0)) - ulpercen = (data->progress.uploaded*100) / - data->progress.size_ul; - } - - /* ... and the download */ - if((data->progress.flags & PGRS_DL_SIZE_KNOWN) && - (data->progress.dlspeed > CURL_OFF_T_C(0))) { - dlestimate = data->progress.size_dl / data->progress.dlspeed; - - if(data->progress.size_dl > CURL_OFF_T_C(10000)) - dlpercen = data->progress.downloaded / - (data->progress.size_dl/CURL_OFF_T_C(100)); - else if(data->progress.size_dl > CURL_OFF_T_C(0)) - dlpercen = (data->progress.downloaded*100) / - data->progress.size_dl; - } - - /* Now figure out which of them is slower and use that one for the - total estimate! */ - total_estimate = ulestimate>dlestimate?ulestimate:dlestimate; - - /* create the three time strings */ - time2str(time_left, total_estimate > 0?(total_estimate - timespent):0); - time2str(time_total, total_estimate); - time2str(time_spent, timespent); - - /* Get the total amount of data expected to get transferred */ - total_expected_transfer = - (data->progress.flags & PGRS_UL_SIZE_KNOWN? - data->progress.size_ul:data->progress.uploaded)+ - (data->progress.flags & PGRS_DL_SIZE_KNOWN? - data->progress.size_dl:data->progress.downloaded); - - /* We have transferred this much so far */ - total_transfer = data->progress.downloaded + data->progress.uploaded; - - /* Get the percentage of data transferred so far */ - if(total_expected_transfer > CURL_OFF_T_C(10000)) - total_percen = total_transfer / - (total_expected_transfer/CURL_OFF_T_C(100)); - else if(total_expected_transfer > CURL_OFF_T_C(0)) - total_percen = (total_transfer*100) / total_expected_transfer; - - fprintf(data->set.err, - "\r" - "%3" CURL_FORMAT_CURL_OFF_T " %s " - "%3" CURL_FORMAT_CURL_OFF_T " %s " - "%3" CURL_FORMAT_CURL_OFF_T " %s %s %s %s %s %s %s", - total_percen, /* 3 letters */ /* total % */ - max5data(total_expected_transfer, max5[2]), /* total size */ - dlpercen, /* 3 letters */ /* rcvd % */ - max5data(data->progress.downloaded, max5[0]), /* rcvd size */ - ulpercen, /* 3 letters */ /* xfer % */ - max5data(data->progress.uploaded, max5[1]), /* xfer size */ - max5data(data->progress.dlspeed, max5[3]), /* avrg dl speed */ - max5data(data->progress.ulspeed, max5[4]), /* avrg ul speed */ - time_total, /* 8 letters */ /* total time */ - time_spent, /* 8 letters */ /* time spent */ - time_left, /* 8 letters */ /* time left */ - max5data(data->progress.current_speed, max5[5]) /* current speed */ - ); - - /* we flush the output stream to make it appear as soon as possible */ - fflush(data->set.err); - - } /* !(data->progress.flags & PGRS_HIDE) */ - - return 0; -} diff --git a/build/premake/premake5/contrib/curl/lib/progress.h b/build/premake/premake5/contrib/curl/lib/progress.h deleted file mode 100644 index 155ff04fe0..0000000000 --- a/build/premake/premake5/contrib/curl/lib/progress.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef HEADER_CURL_PROGRESS_H -#define HEADER_CURL_PROGRESS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "timeval.h" - - -typedef enum { - TIMER_NONE, - TIMER_STARTOP, - TIMER_STARTSINGLE, - TIMER_NAMELOOKUP, - TIMER_CONNECT, - TIMER_APPCONNECT, - TIMER_PRETRANSFER, - TIMER_STARTTRANSFER, - TIMER_POSTRANSFER, - TIMER_STARTACCEPT, - TIMER_REDIRECT, - TIMER_LAST /* must be last */ -} timerid; - -int Curl_pgrsDone(struct connectdata *); -void Curl_pgrsStartNow(struct Curl_easy *data); -void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size); -void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size); -void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size); -void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size); -int Curl_pgrsUpdate(struct connectdata *); -void Curl_pgrsResetTimesSizes(struct Curl_easy *data); -void Curl_pgrsTime(struct Curl_easy *data, timerid timer); -long Curl_pgrsLimitWaitTime(curl_off_t cursize, - curl_off_t startsize, - curl_off_t limit, - struct timeval start, - struct timeval now); - -/* Don't show progress for sizes smaller than: */ -#define LEAST_SIZE_PROGRESS BUFSIZE - -#define PROGRESS_DOWNLOAD (1<<0) -#define PROGRESS_UPLOAD (1<<1) -#define PROGRESS_DOWN_AND_UP (PROGRESS_UPLOAD | PROGRESS_DOWNLOAD) - -#define PGRS_SHOW_DL (1<<0) -#define PGRS_SHOW_UL (1<<1) -#define PGRS_DONE_DL (1<<2) -#define PGRS_DONE_UL (1<<3) -#define PGRS_HIDE (1<<4) -#define PGRS_UL_SIZE_KNOWN (1<<5) -#define PGRS_DL_SIZE_KNOWN (1<<6) - -#define PGRS_HEADERS_OUT (1<<7) /* set when the headers have been written */ - - -#endif /* HEADER_CURL_PROGRESS_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/rand.c b/build/premake/premake5/contrib/curl/lib/rand.c deleted file mode 100644 index 4da37b9dc4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/rand.c +++ /dev/null @@ -1,132 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_FCNTL_H -#include -#endif - -#include -#include "vtls/vtls.h" -#include "sendf.h" -#include "rand.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) -{ - unsigned int r; - CURLcode result = CURLE_OK; - static unsigned int randseed; - static bool seeded = FALSE; - -#ifdef CURLDEBUG - char *force_entropy = getenv("CURL_ENTROPY"); - if(force_entropy) { - if(!seeded) { - size_t elen = strlen(force_entropy); - size_t clen = sizeof(randseed); - size_t min = elen < clen ? elen : clen; - memcpy((char *)&randseed, force_entropy, min); - seeded = TRUE; - } - else - randseed++; - *rnd = randseed; - return CURLE_OK; - } -#endif - - /* data may be NULL! */ - result = Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd)); - if(result != CURLE_NOT_BUILT_IN) - /* only if there is no random funtion in the TLS backend do the non crypto - version, otherwise return result */ - return result; - - /* ---- non-cryptographic version following ---- */ - -#ifdef RANDOM_FILE - if(!seeded) { - /* if there's a random file to read a seed from, use it */ - int fd = open(RANDOM_FILE, O_RDONLY); - if(fd > -1) { - /* read random data into the randseed variable */ - ssize_t nread = read(fd, &randseed, sizeof(randseed)); - if(nread == sizeof(randseed)) - seeded = TRUE; - close(fd); - } - } -#endif - - if(!seeded) { - struct timeval now = curlx_tvnow(); - infof(data, "WARNING: Using weak random seed\n"); - randseed += (unsigned int)now.tv_usec + (unsigned int)now.tv_sec; - randseed = randseed * 1103515245 + 12345; - randseed = randseed * 1103515245 + 12345; - randseed = randseed * 1103515245 + 12345; - seeded = TRUE; - } - - /* Return an unsigned 32-bit pseudo-random number. */ - r = randseed = randseed * 1103515245 + 12345; - *rnd = (r << 16) | ((r >> 16) & 0xFFFF); - return CURLE_OK; -} - -/* - * Curl_rand() stores 'num' number of random unsigned integers in the buffer - * 'rndptr' points to. - * - * If libcurl is built without TLS support or with a TLS backend that lacks a - * proper random API (Gskit, PolarSSL or mbedTLS), this function will use - * "weak" random. - * - * When built *with* TLS support and a backend that offers strong random, it - * will return error if it cannot provide strong random values. - * - * NOTE: 'data' may be passed in as NULL when coming from external API without - * easy handle! - * - */ - -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rndptr, - unsigned int num) -{ - CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; - unsigned int i; - - assert(num > 0); - - for(i = 0; i < num; i++) { - result = randit(data, rndptr++); - if(result) - return result; - } - return result; -} diff --git a/build/premake/premake5/contrib/curl/lib/rand.h b/build/premake/premake5/contrib/curl/lib/rand.h deleted file mode 100644 index 0f8986120e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/rand.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef HEADER_CURL_RAND_H -#define HEADER_CURL_RAND_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Curl_rand() stores 'num' number of random unsigned integers in the buffer - * 'rnd' points to. - * - * If libcurl is built without TLS support or with a TLS backend that lacks a - * proper random API (Gskit, PolarSSL or mbedTLS), this function will use - * "weak" random. - * - * When built *with* TLS support and a backend that offers strong random, it - * will return error if it cannot provide strong random values. - * - * NOTE: 'data' may be passed in as NULL when coming from external API without - * easy handle! - * - */ -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rnd, - unsigned int num); - -#endif /* HEADER_CURL_RAND_H */ diff --git a/build/premake/premake5/contrib/curl/lib/rtsp.c b/build/premake/premake5/contrib/curl/lib/rtsp.c deleted file mode 100644 index 65c6c3b05d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/rtsp.c +++ /dev/null @@ -1,819 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_RTSP - -#include "urldata.h" -#include -#include "transfer.h" -#include "sendf.h" -#include "multiif.h" -#include "http.h" -#include "url.h" -#include "progress.h" -#include "rtsp.h" -#include "strcase.h" -#include "select.h" -#include "connect.h" -#include "strdup.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - * TODO (general) - * -incoming server requests - * -server CSeq counter - * -digest authentication - * -connect thru proxy - * -pipelining? - */ - - -#define RTP_PKT_CHANNEL(p) ((int)((unsigned char)((p)[1]))) - -#define RTP_PKT_LENGTH(p) ((((int)((unsigned char)((p)[2]))) << 8) | \ - ((int)((unsigned char)((p)[3])))) - -/* protocol-specific functions set up to be called by the main engine */ -static CURLcode rtsp_do(struct connectdata *conn, bool *done); -static CURLcode rtsp_done(struct connectdata *conn, CURLcode, bool premature); -static CURLcode rtsp_connect(struct connectdata *conn, bool *done); -static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead); - -static int rtsp_getsock_do(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); - -/* - * Parse and write out any available RTP data. - * - * nread: amount of data left after k->str. will be modified if RTP - * data is parsed and k->str is moved up - * readmore: whether or not the RTP parser needs more data right away - */ -static CURLcode rtsp_rtp_readwrite(struct Curl_easy *data, - struct connectdata *conn, - ssize_t *nread, - bool *readmore); - -static CURLcode rtsp_setup_connection(struct connectdata *conn); - - -/* this returns the socket to wait for in the DO and DOING state for the multi - interface and then we're always _sending_ a request and thus we wait for - the single socket to become writable only */ -static int rtsp_getsock_do(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - /* write mode */ - (void)numsocks; /* unused, we trust it to be at least 1 */ - socks[0] = conn->sock[FIRSTSOCKET]; - return GETSOCK_WRITESOCK(0); -} - -static -CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len); - - -/* - * RTSP handler interface. - */ -const struct Curl_handler Curl_handler_rtsp = { - "RTSP", /* scheme */ - rtsp_setup_connection, /* setup_connection */ - rtsp_do, /* do_it */ - rtsp_done, /* done */ - ZERO_NULL, /* do_more */ - rtsp_connect, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - rtsp_getsock_do, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - rtsp_disconnect, /* disconnect */ - rtsp_rtp_readwrite, /* readwrite */ - PORT_RTSP, /* defport */ - CURLPROTO_RTSP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - - -static CURLcode rtsp_setup_connection(struct connectdata *conn) -{ - struct RTSP *rtsp; - - conn->data->req.protop = rtsp = calloc(1, sizeof(struct RTSP)); - if(!rtsp) - return CURLE_OUT_OF_MEMORY; - - return CURLE_OK; -} - - -/* - * The server may send us RTP data at any point, and RTSPREQ_RECEIVE does not - * want to block the application forever while receiving a stream. Therefore, - * we cannot assume that an RTSP socket is dead just because it is readable. - * - * Instead, if it is readable, run Curl_connalive() to peek at the socket - * and distinguish between closed and data. - */ -bool Curl_rtsp_connisdead(struct connectdata *check) -{ - int sval; - bool ret_val = TRUE; - - sval = SOCKET_READABLE(check->sock[FIRSTSOCKET], 0); - if(sval == 0) { - /* timeout */ - ret_val = FALSE; - } - else if(sval & CURL_CSELECT_ERR) { - /* socket is in an error state */ - ret_val = TRUE; - } - else if(sval & CURL_CSELECT_IN) { - /* readable with no error. could still be closed */ - ret_val = !Curl_connalive(check); - } - - return ret_val; -} - -static CURLcode rtsp_connect(struct connectdata *conn, bool *done) -{ - CURLcode httpStatus; - struct Curl_easy *data = conn->data; - - httpStatus = Curl_http_connect(conn, done); - - /* Initialize the CSeq if not already done */ - if(data->state.rtsp_next_client_CSeq == 0) - data->state.rtsp_next_client_CSeq = 1; - if(data->state.rtsp_next_server_CSeq == 0) - data->state.rtsp_next_server_CSeq = 1; - - conn->proto.rtspc.rtp_channel = -1; - - return httpStatus; -} - -static CURLcode rtsp_disconnect(struct connectdata *conn, bool dead) -{ - (void) dead; - Curl_safefree(conn->proto.rtspc.rtp_buf); - return CURLE_OK; -} - - -static CURLcode rtsp_done(struct connectdata *conn, - CURLcode status, bool premature) -{ - struct Curl_easy *data = conn->data; - struct RTSP *rtsp = data->req.protop; - CURLcode httpStatus; - long CSeq_sent; - long CSeq_recv; - - /* Bypass HTTP empty-reply checks on receive */ - if(data->set.rtspreq == RTSPREQ_RECEIVE) - premature = TRUE; - - httpStatus = Curl_http_done(conn, status, premature); - - if(rtsp) { - /* Check the sequence numbers */ - CSeq_sent = rtsp->CSeq_sent; - CSeq_recv = rtsp->CSeq_recv; - if((data->set.rtspreq != RTSPREQ_RECEIVE) && (CSeq_sent != CSeq_recv)) { - failf(data, - "The CSeq of this request %ld did not match the response %ld", - CSeq_sent, CSeq_recv); - return CURLE_RTSP_CSEQ_ERROR; - } - else if(data->set.rtspreq == RTSPREQ_RECEIVE && - (conn->proto.rtspc.rtp_channel == -1)) { - infof(data, "Got an RTP Receive with a CSeq of %ld\n", CSeq_recv); - /* TODO CPC: Server -> Client logic here */ - } - } - - return httpStatus; -} - -static CURLcode rtsp_do(struct connectdata *conn, bool *done) -{ - struct Curl_easy *data = conn->data; - CURLcode result=CURLE_OK; - Curl_RtspReq rtspreq = data->set.rtspreq; - struct RTSP *rtsp = data->req.protop; - struct HTTP *http; - Curl_send_buffer *req_buffer; - curl_off_t postsize = 0; /* for ANNOUNCE and SET_PARAMETER */ - curl_off_t putsize = 0; /* for ANNOUNCE and SET_PARAMETER */ - - const char *p_request = NULL; - const char *p_session_id = NULL; - const char *p_accept = NULL; - const char *p_accept_encoding = NULL; - const char *p_range = NULL; - const char *p_referrer = NULL; - const char *p_stream_uri = NULL; - const char *p_transport = NULL; - const char *p_uagent = NULL; - const char *p_proxyuserpwd = NULL; - const char *p_userpwd = NULL; - - *done = TRUE; - - http = &(rtsp->http_wrapper); - /* Assert that no one has changed the RTSP struct in an evil way */ - DEBUGASSERT((void *)http == (void *)rtsp); - - rtsp->CSeq_sent = data->state.rtsp_next_client_CSeq; - rtsp->CSeq_recv = 0; - - /* Setup the 'p_request' pointer to the proper p_request string - * Since all RTSP requests are included here, there is no need to - * support custom requests like HTTP. - **/ - data->set.opt_no_body = TRUE; /* most requests don't contain a body */ - switch(rtspreq) { - default: - failf(data, "Got invalid RTSP request"); - return CURLE_BAD_FUNCTION_ARGUMENT; - case RTSPREQ_OPTIONS: - p_request = "OPTIONS"; - break; - case RTSPREQ_DESCRIBE: - p_request = "DESCRIBE"; - data->set.opt_no_body = FALSE; - break; - case RTSPREQ_ANNOUNCE: - p_request = "ANNOUNCE"; - break; - case RTSPREQ_SETUP: - p_request = "SETUP"; - break; - case RTSPREQ_PLAY: - p_request = "PLAY"; - break; - case RTSPREQ_PAUSE: - p_request = "PAUSE"; - break; - case RTSPREQ_TEARDOWN: - p_request = "TEARDOWN"; - break; - case RTSPREQ_GET_PARAMETER: - /* GET_PARAMETER's no_body status is determined later */ - p_request = "GET_PARAMETER"; - data->set.opt_no_body = FALSE; - break; - case RTSPREQ_SET_PARAMETER: - p_request = "SET_PARAMETER"; - break; - case RTSPREQ_RECORD: - p_request = "RECORD"; - break; - case RTSPREQ_RECEIVE: - p_request = ""; - /* Treat interleaved RTP as body*/ - data->set.opt_no_body = FALSE; - break; - case RTSPREQ_LAST: - failf(data, "Got invalid RTSP request: RTSPREQ_LAST"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - if(rtspreq == RTSPREQ_RECEIVE) { - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, -1, NULL); - - return result; - } - - p_session_id = data->set.str[STRING_RTSP_SESSION_ID]; - if(!p_session_id && - (rtspreq & ~(RTSPREQ_OPTIONS | RTSPREQ_DESCRIBE | RTSPREQ_SETUP))) { - failf(data, "Refusing to issue an RTSP request [%s] without a session ID.", - p_request); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - /* TODO: proxy? */ - - /* Stream URI. Default to server '*' if not specified */ - if(data->set.str[STRING_RTSP_STREAM_URI]) { - p_stream_uri = data->set.str[STRING_RTSP_STREAM_URI]; - } - else { - p_stream_uri = "*"; - } - - /* Transport Header for SETUP requests */ - p_transport = Curl_checkheaders(conn, "Transport:"); - if(rtspreq == RTSPREQ_SETUP && !p_transport) { - /* New Transport: setting? */ - if(data->set.str[STRING_RTSP_TRANSPORT]) { - Curl_safefree(conn->allocptr.rtsp_transport); - - conn->allocptr.rtsp_transport = - aprintf("Transport: %s\r\n", - data->set.str[STRING_RTSP_TRANSPORT]); - if(!conn->allocptr.rtsp_transport) - return CURLE_OUT_OF_MEMORY; - } - else { - failf(data, - "Refusing to issue an RTSP SETUP without a Transport: header."); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - p_transport = conn->allocptr.rtsp_transport; - } - - /* Accept Headers for DESCRIBE requests */ - if(rtspreq == RTSPREQ_DESCRIBE) { - /* Accept Header */ - p_accept = Curl_checkheaders(conn, "Accept:")? - NULL:"Accept: application/sdp\r\n"; - - /* Accept-Encoding header */ - if(!Curl_checkheaders(conn, "Accept-Encoding:") && - data->set.str[STRING_ENCODING]) { - Curl_safefree(conn->allocptr.accept_encoding); - conn->allocptr.accept_encoding = - aprintf("Accept-Encoding: %s\r\n", data->set.str[STRING_ENCODING]); - - if(!conn->allocptr.accept_encoding) - return CURLE_OUT_OF_MEMORY; - - p_accept_encoding = conn->allocptr.accept_encoding; - } - } - - /* The User-Agent string might have been allocated in url.c already, because - it might have been used in the proxy connect, but if we have got a header - with the user-agent string specified, we erase the previously made string - here. */ - if(Curl_checkheaders(conn, "User-Agent:") && conn->allocptr.uagent) { - Curl_safefree(conn->allocptr.uagent); - conn->allocptr.uagent = NULL; - } - else if(!Curl_checkheaders(conn, "User-Agent:") && - data->set.str[STRING_USERAGENT]) { - p_uagent = conn->allocptr.uagent; - } - - /* setup the authentication headers */ - result = Curl_http_output_auth(conn, p_request, p_stream_uri, FALSE); - if(result) - return result; - - p_proxyuserpwd = conn->allocptr.proxyuserpwd; - p_userpwd = conn->allocptr.userpwd; - - /* Referrer */ - Curl_safefree(conn->allocptr.ref); - if(data->change.referer && !Curl_checkheaders(conn, "Referer:")) - conn->allocptr.ref = aprintf("Referer: %s\r\n", data->change.referer); - else - conn->allocptr.ref = NULL; - - p_referrer = conn->allocptr.ref; - - /* - * Range Header - * Only applies to PLAY, PAUSE, RECORD - * - * Go ahead and use the Range stuff supplied for HTTP - */ - if(data->state.use_range && - (rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) { - - /* Check to see if there is a range set in the custom headers */ - if(!Curl_checkheaders(conn, "Range:") && data->state.range) { - Curl_safefree(conn->allocptr.rangeline); - conn->allocptr.rangeline = aprintf("Range: %s\r\n", data->state.range); - p_range = conn->allocptr.rangeline; - } - } - - /* - * Sanity check the custom headers - */ - if(Curl_checkheaders(conn, "CSeq:")) { - failf(data, "CSeq cannot be set as a custom header."); - return CURLE_RTSP_CSEQ_ERROR; - } - if(Curl_checkheaders(conn, "Session:")) { - failf(data, "Session ID cannot be set as a custom header."); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - /* Initialize a dynamic send buffer */ - req_buffer = Curl_add_buffer_init(); - - if(!req_buffer) - return CURLE_OUT_OF_MEMORY; - - result = - Curl_add_bufferf(req_buffer, - "%s %s RTSP/1.0\r\n" /* Request Stream-URI RTSP/1.0 */ - "CSeq: %ld\r\n", /* CSeq */ - p_request, p_stream_uri, rtsp->CSeq_sent); - if(result) - return result; - - /* - * Rather than do a normal alloc line, keep the session_id unformatted - * to make comparison easier - */ - if(p_session_id) { - result = Curl_add_bufferf(req_buffer, "Session: %s\r\n", p_session_id); - if(result) - return result; - } - - /* - * Shared HTTP-like options - */ - result = Curl_add_bufferf(req_buffer, - "%s" /* transport */ - "%s" /* accept */ - "%s" /* accept-encoding */ - "%s" /* range */ - "%s" /* referrer */ - "%s" /* user-agent */ - "%s" /* proxyuserpwd */ - "%s" /* userpwd */ - , - p_transport ? p_transport : "", - p_accept ? p_accept : "", - p_accept_encoding ? p_accept_encoding : "", - p_range ? p_range : "", - p_referrer ? p_referrer : "", - p_uagent ? p_uagent : "", - p_proxyuserpwd ? p_proxyuserpwd : "", - p_userpwd ? p_userpwd : ""); - - /* - * Free userpwd now --- cannot reuse this for Negotiate and possibly NTLM - * with basic and digest, it will be freed anyway by the next request - */ - Curl_safefree(conn->allocptr.userpwd); - conn->allocptr.userpwd = NULL; - - if(result) - return result; - - if((rtspreq == RTSPREQ_SETUP) || (rtspreq == RTSPREQ_DESCRIBE)) { - result = Curl_add_timecondition(data, req_buffer); - if(result) - return result; - } - - result = Curl_add_custom_headers(conn, FALSE, req_buffer); - if(result) - return result; - - if(rtspreq == RTSPREQ_ANNOUNCE || - rtspreq == RTSPREQ_SET_PARAMETER || - rtspreq == RTSPREQ_GET_PARAMETER) { - - if(data->set.upload) { - putsize = data->state.infilesize; - data->set.httpreq = HTTPREQ_PUT; - - } - else { - postsize = (data->state.infilesize != -1)? - data->state.infilesize: - (data->set.postfields? (curl_off_t)strlen(data->set.postfields):0); - data->set.httpreq = HTTPREQ_POST; - } - - if(putsize > 0 || postsize > 0) { - /* As stated in the http comments, it is probably not wise to - * actually set a custom Content-Length in the headers */ - if(!Curl_checkheaders(conn, "Content-Length:")) { - result = Curl_add_bufferf(req_buffer, - "Content-Length: %" CURL_FORMAT_CURL_OFF_T"\r\n", - (data->set.upload ? putsize : postsize)); - if(result) - return result; - } - - if(rtspreq == RTSPREQ_SET_PARAMETER || - rtspreq == RTSPREQ_GET_PARAMETER) { - if(!Curl_checkheaders(conn, "Content-Type:")) { - result = Curl_add_bufferf(req_buffer, - "Content-Type: text/parameters\r\n"); - if(result) - return result; - } - } - - if(rtspreq == RTSPREQ_ANNOUNCE) { - if(!Curl_checkheaders(conn, "Content-Type:")) { - result = Curl_add_bufferf(req_buffer, - "Content-Type: application/sdp\r\n"); - if(result) - return result; - } - } - - data->state.expect100header = FALSE; /* RTSP posts are simple/small */ - } - else if(rtspreq == RTSPREQ_GET_PARAMETER) { - /* Check for an empty GET_PARAMETER (heartbeat) request */ - data->set.httpreq = HTTPREQ_HEAD; - data->set.opt_no_body = TRUE; - } - } - - /* RTSP never allows chunked transfer */ - data->req.forbidchunk = TRUE; - /* Finish the request buffer */ - result = Curl_add_buffer(req_buffer, "\r\n", 2); - if(result) - return result; - - if(postsize > 0) { - result = Curl_add_buffer(req_buffer, data->set.postfields, - (size_t)postsize); - if(result) - return result; - } - - /* issue the request */ - result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); - if(result) { - failf(data, "Failed sending RTSP request"); - return result; - } - - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, - putsize?FIRSTSOCKET:-1, - putsize?&http->writebytecount:NULL); - - /* Increment the CSeq on success */ - data->state.rtsp_next_client_CSeq++; - - if(http->writebytecount) { - /* if a request-body has been sent off, we make sure this progress is - noted properly */ - Curl_pgrsSetUploadCounter(data, http->writebytecount); - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - } - - return result; -} - - -static CURLcode rtsp_rtp_readwrite(struct Curl_easy *data, - struct connectdata *conn, - ssize_t *nread, - bool *readmore) { - struct SingleRequest *k = &data->req; - struct rtsp_conn *rtspc = &(conn->proto.rtspc); - - char *rtp; /* moving pointer to rtp data */ - ssize_t rtp_dataleft; /* how much data left to parse in this round */ - char *scratch; - CURLcode result; - - if(rtspc->rtp_buf) { - /* There was some leftover data the last time. Merge buffers */ - char *newptr = Curl_saferealloc(rtspc->rtp_buf, - rtspc->rtp_bufsize + *nread); - if(!newptr) { - rtspc->rtp_buf = NULL; - rtspc->rtp_bufsize = 0; - return CURLE_OUT_OF_MEMORY; - } - rtspc->rtp_buf = newptr; - memcpy(rtspc->rtp_buf + rtspc->rtp_bufsize, k->str, *nread); - rtspc->rtp_bufsize += *nread; - rtp = rtspc->rtp_buf; - rtp_dataleft = rtspc->rtp_bufsize; - } - else { - /* Just parse the request buffer directly */ - rtp = k->str; - rtp_dataleft = *nread; - } - - while((rtp_dataleft > 0) && - (rtp[0] == '$')) { - if(rtp_dataleft > 4) { - int rtp_length; - - /* Parse the header */ - /* The channel identifier immediately follows and is 1 byte */ - rtspc->rtp_channel = RTP_PKT_CHANNEL(rtp); - - /* The length is two bytes */ - rtp_length = RTP_PKT_LENGTH(rtp); - - if(rtp_dataleft < rtp_length + 4) { - /* Need more - incomplete payload*/ - *readmore = TRUE; - break; - } - else { - /* We have the full RTP interleaved packet - * Write out the header including the leading '$' */ - DEBUGF(infof(data, "RTP write channel %d rtp_length %d\n", - rtspc->rtp_channel, rtp_length)); - result = rtp_client_write(conn, &rtp[0], rtp_length + 4); - if(result) { - failf(data, "Got an error writing an RTP packet"); - *readmore = FALSE; - Curl_safefree(rtspc->rtp_buf); - rtspc->rtp_buf = NULL; - rtspc->rtp_bufsize = 0; - return result; - } - - /* Move forward in the buffer */ - rtp_dataleft -= rtp_length + 4; - rtp += rtp_length + 4; - - if(data->set.rtspreq == RTSPREQ_RECEIVE) { - /* If we are in a passive receive, give control back - * to the app as often as we can. - */ - k->keepon &= ~KEEP_RECV; - } - } - } - else { - /* Need more - incomplete header */ - *readmore = TRUE; - break; - } - } - - if(rtp_dataleft != 0 && rtp[0] == '$') { - DEBUGF(infof(data, "RTP Rewinding %zd %s\n", rtp_dataleft, - *readmore ? "(READMORE)" : "")); - - /* Store the incomplete RTP packet for a "rewind" */ - scratch = malloc(rtp_dataleft); - if(!scratch) { - Curl_safefree(rtspc->rtp_buf); - rtspc->rtp_buf = NULL; - rtspc->rtp_bufsize = 0; - return CURLE_OUT_OF_MEMORY; - } - memcpy(scratch, rtp, rtp_dataleft); - Curl_safefree(rtspc->rtp_buf); - rtspc->rtp_buf = scratch; - rtspc->rtp_bufsize = rtp_dataleft; - - /* As far as the transfer is concerned, this data is consumed */ - *nread = 0; - return CURLE_OK; - } - else { - /* Fix up k->str to point just after the last RTP packet */ - k->str += *nread - rtp_dataleft; - - /* either all of the data has been read or... - * rtp now points at the next byte to parse - */ - if(rtp_dataleft > 0) - DEBUGASSERT(k->str[0] == rtp[0]); - - DEBUGASSERT(rtp_dataleft <= *nread); /* sanity check */ - - *nread = rtp_dataleft; - } - - /* If we get here, we have finished with the leftover/merge buffer */ - Curl_safefree(rtspc->rtp_buf); - rtspc->rtp_buf = NULL; - rtspc->rtp_bufsize = 0; - - return CURLE_OK; -} - -static -CURLcode rtp_client_write(struct connectdata *conn, char *ptr, size_t len) -{ - struct Curl_easy *data = conn->data; - size_t wrote; - curl_write_callback writeit; - - if(len == 0) { - failf(data, "Cannot write a 0 size RTP packet."); - return CURLE_WRITE_ERROR; - } - - writeit = data->set.fwrite_rtp?data->set.fwrite_rtp:data->set.fwrite_func; - wrote = writeit(ptr, 1, len, data->set.rtp_out); - - if(CURL_WRITEFUNC_PAUSE == wrote) { - failf(data, "Cannot pause RTP"); - return CURLE_WRITE_ERROR; - } - - if(wrote != len) { - failf(data, "Failed writing RTP data"); - return CURLE_WRITE_ERROR; - } - - return CURLE_OK; -} - -CURLcode Curl_rtsp_parseheader(struct connectdata *conn, - char *header) -{ - struct Curl_easy *data = conn->data; - long CSeq = 0; - - if(checkprefix("CSeq:", header)) { - /* Store the received CSeq. Match is verified in rtsp_done */ - int nc = sscanf(&header[4], ": %ld", &CSeq); - if(nc == 1) { - struct RTSP *rtsp = data->req.protop; - rtsp->CSeq_recv = CSeq; /* mark the request */ - data->state.rtsp_CSeq_recv = CSeq; /* update the handle */ - } - else { - failf(data, "Unable to read the CSeq header: [%s]", header); - return CURLE_RTSP_CSEQ_ERROR; - } - } - else if(checkprefix("Session:", header)) { - char *start; - - /* Find the first non-space letter */ - start = header + 8; - while(*start && ISSPACE(*start)) - start++; - - if(!*start) { - failf(data, "Got a blank Session ID"); - } - else if(data->set.str[STRING_RTSP_SESSION_ID]) { - /* If the Session ID is set, then compare */ - if(strncmp(start, data->set.str[STRING_RTSP_SESSION_ID], - strlen(data->set.str[STRING_RTSP_SESSION_ID])) != 0) { - failf(data, "Got RTSP Session ID Line [%s], but wanted ID [%s]", - start, data->set.str[STRING_RTSP_SESSION_ID]); - return CURLE_RTSP_SESSION_ERROR; - } - } - else { - /* If the Session ID is not set, and we find it in a response, then set - * it. - * - * Allow any non whitespace content, up to the field seperator or end of - * line. RFC 2326 isn't 100% clear on the session ID and for example - * gstreamer does url-encoded session ID's not covered by the standard. - */ - char *end = start; - while(*end && *end != ';' && !ISSPACE(*end)) - end++; - - /* Copy the id substring into a new buffer */ - data->set.str[STRING_RTSP_SESSION_ID] = malloc(end - start + 1); - if(data->set.str[STRING_RTSP_SESSION_ID] == NULL) - return CURLE_OUT_OF_MEMORY; - memcpy(data->set.str[STRING_RTSP_SESSION_ID], start, end - start); - (data->set.str[STRING_RTSP_SESSION_ID])[end - start] = '\0'; - } - } - return CURLE_OK; -} - -#endif /* CURL_DISABLE_RTSP */ diff --git a/build/premake/premake5/contrib/curl/lib/rtsp.h b/build/premake/premake5/contrib/curl/lib/rtsp.h deleted file mode 100644 index 5a8d5556fc..0000000000 --- a/build/premake/premake5/contrib/curl/lib/rtsp.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef HEADER_CURL_RTSP_H -#define HEADER_CURL_RTSP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifndef CURL_DISABLE_RTSP - -extern const struct Curl_handler Curl_handler_rtsp; - -bool Curl_rtsp_connisdead(struct connectdata *check); -CURLcode Curl_rtsp_parseheader(struct connectdata *conn, char *header); - -#else -/* disabled */ -#define Curl_rtsp_parseheader(x,y) CURLE_NOT_BUILT_IN -#define Curl_rtsp_connisdead(x) TRUE - -#endif /* CURL_DISABLE_RTSP */ - -/* - * RTSP Connection data - * - * Currently, only used for tracking incomplete RTP data reads - */ -struct rtsp_conn { - char *rtp_buf; - ssize_t rtp_bufsize; - int rtp_channel; -}; - -/**************************************************************************** - * RTSP unique setup - ***************************************************************************/ -struct RTSP { - /* - * http_wrapper MUST be the first element of this structure for the wrap - * logic to work. In this way, we get a cheap polymorphism because - * &(data->state.proto.rtsp) == &(data->state.proto.http) per the C spec - * - * HTTP functions can safely treat this as an HTTP struct, but RTSP aware - * functions can also index into the later elements. - */ - struct HTTP http_wrapper; /*wrap HTTP to do the heavy lifting */ - - long CSeq_sent; /* CSeq of this request */ - long CSeq_recv; /* CSeq received */ -}; - - -#endif /* HEADER_CURL_RTSP_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/security.c b/build/premake/premake5/contrib/curl/lib/security.c deleted file mode 100644 index f4a8763413..0000000000 --- a/build/premake/premake5/contrib/curl/lib/security.c +++ /dev/null @@ -1,588 +0,0 @@ -/* This source code was modified by Martin Hedenfalk for - * use in Curl. His latest changes were done 2000-09-18. - * - * It has since been patched and modified a lot by Daniel Stenberg - * to make it better applied to curl conditions, and to make - * it not use globals, pollute name space and more. This source code awaits a - * rewrite to work around the paragraph 2 in the BSD licenses as explained - * below. - * - * Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * - * Copyright (C) 2001 - 2015, Daniel Stenberg, , et al. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. */ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_FTP -#ifdef HAVE_GSSAPI - -#ifdef HAVE_NETDB_H -#include -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#include "urldata.h" -#include "curl_base64.h" -#include "curl_memory.h" -#include "curl_sec.h" -#include "ftp.h" -#include "sendf.h" -#include "strcase.h" -#include "warnless.h" -#include "strdup.h" -/* The last #include file should be: */ -#include "memdebug.h" - -static const struct { - enum protection_level level; - const char *name; -} level_names[] = { - { PROT_CLEAR, "clear" }, - { PROT_SAFE, "safe" }, - { PROT_CONFIDENTIAL, "confidential" }, - { PROT_PRIVATE, "private" } -}; - -static enum protection_level -name_to_level(const char *name) -{ - int i; - for(i = 0; i < (int)sizeof(level_names)/(int)sizeof(level_names[0]); i++) - if(checkprefix(name, level_names[i].name)) - return level_names[i].level; - return PROT_NONE; -} - -/* Convert a protocol |level| to its char representation. - We take an int to catch programming mistakes. */ -static char level_to_char(int level) -{ - switch(level) { - case PROT_CLEAR: - return 'C'; - case PROT_SAFE: - return 'S'; - case PROT_CONFIDENTIAL: - return 'E'; - case PROT_PRIVATE: - return 'P'; - case PROT_CMD: - /* Fall through */ - default: - /* Those 2 cases should not be reached! */ - break; - } - DEBUGASSERT(0); - /* Default to the most secure alternative. */ - return 'P'; -} - -/* Send an FTP command defined by |message| and the optional arguments. The - function returns the ftp_code. If an error occurs, -1 is returned. */ -static int ftp_send_command(struct connectdata *conn, const char *message, ...) -{ - int ftp_code; - ssize_t nread=0; - va_list args; - char print_buffer[50]; - - va_start(args, message); - vsnprintf(print_buffer, sizeof(print_buffer), message, args); - va_end(args); - - if(Curl_ftpsend(conn, print_buffer)) { - ftp_code = -1; - } - else { - if(Curl_GetFTPResponse(&nread, conn, &ftp_code)) - ftp_code = -1; - } - - (void)nread; /* Unused */ - return ftp_code; -} - -/* Read |len| from the socket |fd| and store it in |to|. Return a CURLcode - saying whether an error occurred or CURLE_OK if |len| was read. */ -static CURLcode -socket_read(curl_socket_t fd, void *to, size_t len) -{ - char *to_p = to; - CURLcode result; - ssize_t nread; - - while(len > 0) { - result = Curl_read_plain(fd, to_p, len, &nread); - if(!result) { - len -= nread; - to_p += nread; - } - else { - /* FIXME: We are doing a busy wait */ - if(result == CURLE_AGAIN) - continue; - return result; - } - } - return CURLE_OK; -} - - -/* Write |len| bytes from the buffer |to| to the socket |fd|. Return a - CURLcode saying whether an error occurred or CURLE_OK if |len| was - written. */ -static CURLcode -socket_write(struct connectdata *conn, curl_socket_t fd, const void *to, - size_t len) -{ - const char *to_p = to; - CURLcode result; - ssize_t written; - - while(len > 0) { - result = Curl_write_plain(conn, fd, to_p, len, &written); - if(!result) { - len -= written; - to_p += written; - } - else { - /* FIXME: We are doing a busy wait */ - if(result == CURLE_AGAIN) - continue; - return result; - } - } - return CURLE_OK; -} - -static CURLcode read_data(struct connectdata *conn, - curl_socket_t fd, - struct krb5buffer *buf) -{ - int len; - void *tmp = NULL; - CURLcode result; - - result = socket_read(fd, &len, sizeof(len)); - if(result) - return result; - - if(len) { - /* only realloc if there was a length */ - len = ntohl(len); - tmp = Curl_saferealloc(buf->data, len); - } - if(tmp == NULL) - return CURLE_OUT_OF_MEMORY; - - buf->data = tmp; - result = socket_read(fd, buf->data, len); - if(result) - return result; - buf->size = conn->mech->decode(conn->app_data, buf->data, len, - conn->data_prot, conn); - buf->index = 0; - return CURLE_OK; -} - -static size_t -buffer_read(struct krb5buffer *buf, void *data, size_t len) -{ - if(buf->size - buf->index < len) - len = buf->size - buf->index; - memcpy(data, (char *)buf->data + buf->index, len); - buf->index += len; - return len; -} - -/* Matches Curl_recv signature */ -static ssize_t sec_recv(struct connectdata *conn, int sockindex, - char *buffer, size_t len, CURLcode *err) -{ - size_t bytes_read; - size_t total_read = 0; - curl_socket_t fd = conn->sock[sockindex]; - - *err = CURLE_OK; - - /* Handle clear text response. */ - if(conn->sec_complete == 0 || conn->data_prot == PROT_CLEAR) - return read(fd, buffer, len); - - if(conn->in_buffer.eof_flag) { - conn->in_buffer.eof_flag = 0; - return 0; - } - - bytes_read = buffer_read(&conn->in_buffer, buffer, len); - len -= bytes_read; - total_read += bytes_read; - buffer += bytes_read; - - while(len > 0) { - if(read_data(conn, fd, &conn->in_buffer)) - return -1; - if(conn->in_buffer.size == 0) { - if(bytes_read > 0) - conn->in_buffer.eof_flag = 1; - return bytes_read; - } - bytes_read = buffer_read(&conn->in_buffer, buffer, len); - len -= bytes_read; - total_read += bytes_read; - buffer += bytes_read; - } - /* FIXME: Check for overflow */ - return total_read; -} - -/* Send |length| bytes from |from| to the |fd| socket taking care of encoding - and negociating with the server. |from| can be NULL. */ -/* FIXME: We don't check for errors nor report any! */ -static void do_sec_send(struct connectdata *conn, curl_socket_t fd, - const char *from, int length) -{ - int bytes, htonl_bytes; /* 32-bit integers for htonl */ - char *buffer = NULL; - char *cmd_buffer; - size_t cmd_size = 0; - CURLcode error; - enum protection_level prot_level = conn->data_prot; - bool iscmd = (prot_level == PROT_CMD)?TRUE:FALSE; - - DEBUGASSERT(prot_level > PROT_NONE && prot_level < PROT_LAST); - - if(iscmd) { - if(!strncmp(from, "PASS ", 5) || !strncmp(from, "ACCT ", 5)) - prot_level = PROT_PRIVATE; - else - prot_level = conn->command_prot; - } - bytes = conn->mech->encode(conn->app_data, from, length, prot_level, - (void **)&buffer); - if(!buffer || bytes <= 0) - return; /* error */ - - if(iscmd) { - error = Curl_base64_encode(conn->data, buffer, curlx_sitouz(bytes), - &cmd_buffer, &cmd_size); - if(error) { - free(buffer); - return; /* error */ - } - if(cmd_size > 0) { - static const char *enc = "ENC "; - static const char *mic = "MIC "; - if(prot_level == PROT_PRIVATE) - socket_write(conn, fd, enc, 4); - else - socket_write(conn, fd, mic, 4); - - socket_write(conn, fd, cmd_buffer, cmd_size); - socket_write(conn, fd, "\r\n", 2); - infof(conn->data, "Send: %s%s\n", prot_level == PROT_PRIVATE?enc:mic, - cmd_buffer); - free(cmd_buffer); - } - } - else { - htonl_bytes = htonl(bytes); - socket_write(conn, fd, &htonl_bytes, sizeof(htonl_bytes)); - socket_write(conn, fd, buffer, curlx_sitouz(bytes)); - } - free(buffer); -} - -static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd, - const char *buffer, size_t length) -{ - ssize_t tx = 0, len = conn->buffer_size; - - len -= conn->mech->overhead(conn->app_data, conn->data_prot, - curlx_sztosi(len)); - if(len <= 0) - len = length; - while(length) { - if(length < (size_t)len) - len = length; - - do_sec_send(conn, fd, buffer, curlx_sztosi(len)); - length -= len; - buffer += len; - tx += len; - } - return tx; -} - -/* Matches Curl_send signature */ -static ssize_t sec_send(struct connectdata *conn, int sockindex, - const void *buffer, size_t len, CURLcode *err) -{ - curl_socket_t fd = conn->sock[sockindex]; - *err = CURLE_OK; - return sec_write(conn, fd, buffer, len); -} - -int Curl_sec_read_msg(struct connectdata *conn, char *buffer, - enum protection_level level) -{ - /* decoded_len should be size_t or ssize_t but conn->mech->decode returns an - int */ - int decoded_len; - char *buf; - int ret_code = 0; - size_t decoded_sz = 0; - CURLcode error; - - if(!conn->mech) - /* not inititalized, return error */ - return -1; - - DEBUGASSERT(level > PROT_NONE && level < PROT_LAST); - - error = Curl_base64_decode(buffer + 4, (unsigned char **)&buf, &decoded_sz); - if(error || decoded_sz == 0) - return -1; - - if(decoded_sz > (size_t)INT_MAX) { - free(buf); - return -1; - } - decoded_len = curlx_uztosi(decoded_sz); - - decoded_len = conn->mech->decode(conn->app_data, buf, decoded_len, - level, conn); - if(decoded_len <= 0) { - free(buf); - return -1; - } - - if(conn->data->set.verbose) { - buf[decoded_len] = '\n'; - Curl_debug(conn->data, CURLINFO_HEADER_IN, buf, decoded_len + 1, conn); - } - - buf[decoded_len] = '\0'; - if(decoded_len <= 3) - /* suspiciously short */ - return 0; - - if(buf[3] != '-') - /* safe to ignore return code */ - (void)sscanf(buf, "%d", &ret_code); - - if(buf[decoded_len - 1] == '\n') - buf[decoded_len - 1] = '\0'; - /* FIXME: Is |buffer| length always greater than |decoded_len|? */ - strcpy(buffer, buf); - free(buf); - return ret_code; -} - -/* FIXME: The error code returned here is never checked. */ -static int sec_set_protection_level(struct connectdata *conn) -{ - int code; - char *pbsz; - static unsigned int buffer_size = 1 << 20; /* 1048576 */ - enum protection_level level = conn->request_data_prot; - - DEBUGASSERT(level > PROT_NONE && level < PROT_LAST); - - if(!conn->sec_complete) { - infof(conn->data, "Trying to change the protection level after the" - "completion of the data exchange.\n"); - return -1; - } - - /* Bail out if we try to set up the same level */ - if(conn->data_prot == level) - return 0; - - if(level) { - code = ftp_send_command(conn, "PBSZ %u", buffer_size); - if(code < 0) - return -1; - - if(code/100 != 2) { - failf(conn->data, "Failed to set the protection's buffer size."); - return -1; - } - conn->buffer_size = buffer_size; - - pbsz = strstr(conn->data->state.buffer, "PBSZ="); - if(pbsz) { - /* ignore return code, use default value if it fails */ - (void)sscanf(pbsz, "PBSZ=%u", &buffer_size); - if(buffer_size < conn->buffer_size) - conn->buffer_size = buffer_size; - } - } - - /* Now try to negiociate the protection level. */ - code = ftp_send_command(conn, "PROT %c", level_to_char(level)); - - if(code < 0) - return -1; - - if(code/100 != 2) { - failf(conn->data, "Failed to set the protection level."); - return -1; - } - - conn->data_prot = level; - if(level == PROT_PRIVATE) - conn->command_prot = level; - - return 0; -} - -int -Curl_sec_request_prot(struct connectdata *conn, const char *level) -{ - enum protection_level l = name_to_level(level); - if(l == PROT_NONE) - return -1; - DEBUGASSERT(l > PROT_NONE && l < PROT_LAST); - conn->request_data_prot = l; - return 0; -} - -static CURLcode choose_mech(struct connectdata *conn) -{ - int ret; - struct Curl_easy *data = conn->data; - void *tmp_allocation; - const struct Curl_sec_client_mech *mech = &Curl_krb5_client_mech; - - tmp_allocation = realloc(conn->app_data, mech->size); - if(tmp_allocation == NULL) { - failf(data, "Failed realloc of size %u", mech->size); - mech = NULL; - return CURLE_OUT_OF_MEMORY; - } - conn->app_data = tmp_allocation; - - if(mech->init) { - ret = mech->init(conn->app_data); - if(ret) { - infof(data, "Failed initialization for %s. Skipping it.\n", - mech->name); - return CURLE_FAILED_INIT; - } - } - - infof(data, "Trying mechanism %s...\n", mech->name); - ret = ftp_send_command(conn, "AUTH %s", mech->name); - if(ret < 0) - /* FIXME: This error is too generic but it is OK for now. */ - return CURLE_COULDNT_CONNECT; - - if(ret/100 != 3) { - switch(ret) { - case 504: - infof(data, "Mechanism %s is not supported by the server (server " - "returned ftp code: 504).\n", mech->name); - break; - case 534: - infof(data, "Mechanism %s was rejected by the server (server returned " - "ftp code: 534).\n", mech->name); - break; - default: - if(ret/100 == 5) { - infof(data, "server does not support the security extensions\n"); - return CURLE_USE_SSL_FAILED; - } - break; - } - return CURLE_LOGIN_DENIED; - } - - /* Authenticate */ - ret = mech->auth(conn->app_data, conn); - - if(ret != AUTH_CONTINUE) { - if(ret != AUTH_OK) { - /* Mechanism has dumped the error to stderr, don't error here. */ - return -1; - } - DEBUGASSERT(ret == AUTH_OK); - - conn->mech = mech; - conn->sec_complete = 1; - conn->recv[FIRSTSOCKET] = sec_recv; - conn->send[FIRSTSOCKET] = sec_send; - conn->recv[SECONDARYSOCKET] = sec_recv; - conn->send[SECONDARYSOCKET] = sec_send; - conn->command_prot = PROT_SAFE; - /* Set the requested protection level */ - /* BLOCKING */ - (void)sec_set_protection_level(conn); - } - - return CURLE_OK; -} - -CURLcode -Curl_sec_login(struct connectdata *conn) -{ - return choose_mech(conn); -} - - -void -Curl_sec_end(struct connectdata *conn) -{ - if(conn->mech != NULL && conn->mech->end) - conn->mech->end(conn->app_data); - free(conn->app_data); - conn->app_data = NULL; - if(conn->in_buffer.data) { - free(conn->in_buffer.data); - conn->in_buffer.data = NULL; - conn->in_buffer.size = 0; - conn->in_buffer.index = 0; - /* FIXME: Is this really needed? */ - conn->in_buffer.eof_flag = 0; - } - conn->sec_complete = 0; - conn->data_prot = PROT_CLEAR; - conn->mech = NULL; -} - -#endif /* HAVE_GSSAPI */ - -#endif /* CURL_DISABLE_FTP */ diff --git a/build/premake/premake5/contrib/curl/lib/select.c b/build/premake/premake5/contrib/curl/lib/select.c deleted file mode 100644 index 03af645eef..0000000000 --- a/build/premake/premake5/contrib/curl/lib/select.c +++ /dev/null @@ -1,583 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#if !defined(HAVE_SELECT) && !defined(HAVE_POLL_FINE) -#error "We can't compile without select() or poll() support." -#endif - -#if defined(__BEOS__) && !defined(__HAIKU__) -/* BeOS has FD_SET defined in socket.h */ -#include -#endif - -#ifdef MSDOS -#include /* delay() */ -#endif - -#ifdef __VXWORKS__ -#include /* bzero() in FD_SET */ -#endif - -#include - -#include "urldata.h" -#include "connect.h" -#include "select.h" -#include "warnless.h" - -/* Convenience local macros */ -#define ELAPSED_MS() (int)curlx_tvdiff(curlx_tvnow(), initial_tv) - -int Curl_ack_eintr = 0; -#define ERROR_NOT_EINTR(error) (Curl_ack_eintr || error != EINTR) - -/* - * Internal function used for waiting a specific amount of ms - * in Curl_socket_check() and Curl_poll() when no file descriptor - * is provided to wait on, just being used to delay execution. - * WinSock select() and poll() timeout mechanisms need a valid - * socket descriptor in a not null file descriptor set to work. - * Waiting indefinitely with this function is not allowed, a - * zero or negative timeout value will return immediately. - * Timeout resolution, accuracy, as well as maximum supported - * value is system dependent, neither factor is a citical issue - * for the intended use of this function in the library. - * - * Return values: - * -1 = system call error, invalid timeout value, or interrupted - * 0 = specified timeout has elapsed - */ -int Curl_wait_ms(int timeout_ms) -{ -#if !defined(MSDOS) && !defined(USE_WINSOCK) -#ifndef HAVE_POLL_FINE - struct timeval pending_tv; -#endif - struct timeval initial_tv; - int pending_ms; - int error; -#endif - int r = 0; - - if(!timeout_ms) - return 0; - if(timeout_ms < 0) { - SET_SOCKERRNO(EINVAL); - return -1; - } -#if defined(MSDOS) - delay(timeout_ms); -#elif defined(USE_WINSOCK) - Sleep(timeout_ms); -#else - pending_ms = timeout_ms; - initial_tv = curlx_tvnow(); - do { -#if defined(HAVE_POLL_FINE) - r = poll(NULL, 0, pending_ms); -#else - pending_tv.tv_sec = pending_ms / 1000; - pending_tv.tv_usec = (pending_ms % 1000) * 1000; - r = select(0, NULL, NULL, NULL, &pending_tv); -#endif /* HAVE_POLL_FINE */ - if(r != -1) - break; - error = SOCKERRNO; - if(error && ERROR_NOT_EINTR(error)) - break; - pending_ms = timeout_ms - ELAPSED_MS(); - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ - break; - } - } while(r == -1); -#endif /* USE_WINSOCK */ - if(r) - r = -1; - return r; -} - -/* - * Wait for read or write events on a set of file descriptors. It uses poll() - * when a fine poll() is available, in order to avoid limits with FD_SETSIZE, - * otherwise select() is used. An error is returned if select() is being used - * and a file descriptor is too large for FD_SETSIZE. - * - * A negative timeout value makes this function wait indefinitely, - * unles no valid file descriptor is given, when this happens the - * negative timeout is ignored and the function times out immediately. - * - * Return values: - * -1 = system call error or fd >= FD_SETSIZE - * 0 = timeout - * [bitmask] = action as described below - * - * CURL_CSELECT_IN - first socket is readable - * CURL_CSELECT_IN2 - second socket is readable - * CURL_CSELECT_OUT - write socket is writable - * CURL_CSELECT_ERR - an error condition occurred - */ -int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */ - curl_socket_t readfd1, - curl_socket_t writefd, /* socket to write to */ - time_t timeout_ms) /* milliseconds to wait */ -{ -#ifdef HAVE_POLL_FINE - struct pollfd pfd[3]; - int num; -#else - struct timeval pending_tv; - struct timeval *ptimeout; - fd_set fds_read; - fd_set fds_write; - fd_set fds_err; - curl_socket_t maxfd; -#endif - struct timeval initial_tv = {0, 0}; - int pending_ms = 0; - int error; - int r; - int ret; - -#if SIZEOF_LONG != SIZEOF_INT - /* wrap-around precaution */ - if(timeout_ms >= INT_MAX) - timeout_ms = INT_MAX; -#endif - - if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) && - (writefd == CURL_SOCKET_BAD)) { - /* no sockets, just wait */ - r = Curl_wait_ms((int)timeout_ms); - return r; - } - - /* Avoid initial timestamp, avoid curlx_tvnow() call, when elapsed - time in this function does not need to be measured. This happens - when function is called with a zero timeout or a negative timeout - value indicating a blocking call should be performed. */ - - if(timeout_ms > 0) { - pending_ms = (int)timeout_ms; - initial_tv = curlx_tvnow(); - } - -#ifdef HAVE_POLL_FINE - - num = 0; - if(readfd0 != CURL_SOCKET_BAD) { - pfd[num].fd = readfd0; - pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; - pfd[num].revents = 0; - num++; - } - if(readfd1 != CURL_SOCKET_BAD) { - pfd[num].fd = readfd1; - pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; - pfd[num].revents = 0; - num++; - } - if(writefd != CURL_SOCKET_BAD) { - pfd[num].fd = writefd; - pfd[num].events = POLLWRNORM|POLLOUT; - pfd[num].revents = 0; - num++; - } - - do { - if(timeout_ms < 0) - pending_ms = -1; - else if(!timeout_ms) - pending_ms = 0; - r = poll(pfd, num, pending_ms); - if(r != -1) - break; - error = SOCKERRNO; - if(error && ERROR_NOT_EINTR(error)) - break; - if(timeout_ms > 0) { - pending_ms = (int)(timeout_ms - ELAPSED_MS()); - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ - break; - } - } - } while(r == -1); - - if(r < 0) - return -1; - if(r == 0) - return 0; - - ret = 0; - num = 0; - if(readfd0 != CURL_SOCKET_BAD) { - if(pfd[num].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP)) - ret |= CURL_CSELECT_IN; - if(pfd[num].revents & (POLLRDBAND|POLLPRI|POLLNVAL)) - ret |= CURL_CSELECT_ERR; - num++; - } - if(readfd1 != CURL_SOCKET_BAD) { - if(pfd[num].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP)) - ret |= CURL_CSELECT_IN2; - if(pfd[num].revents & (POLLRDBAND|POLLPRI|POLLNVAL)) - ret |= CURL_CSELECT_ERR; - num++; - } - if(writefd != CURL_SOCKET_BAD) { - if(pfd[num].revents & (POLLWRNORM|POLLOUT)) - ret |= CURL_CSELECT_OUT; - if(pfd[num].revents & (POLLERR|POLLHUP|POLLNVAL)) - ret |= CURL_CSELECT_ERR; - } - - return ret; - -#else /* HAVE_POLL_FINE */ - - FD_ZERO(&fds_err); - maxfd = (curl_socket_t)-1; - - FD_ZERO(&fds_read); - if(readfd0 != CURL_SOCKET_BAD) { - VERIFY_SOCK(readfd0); - FD_SET(readfd0, &fds_read); - FD_SET(readfd0, &fds_err); - maxfd = readfd0; - } - if(readfd1 != CURL_SOCKET_BAD) { - VERIFY_SOCK(readfd1); - FD_SET(readfd1, &fds_read); - FD_SET(readfd1, &fds_err); - if(readfd1 > maxfd) - maxfd = readfd1; - } - - FD_ZERO(&fds_write); - if(writefd != CURL_SOCKET_BAD) { - VERIFY_SOCK(writefd); - FD_SET(writefd, &fds_write); - FD_SET(writefd, &fds_err); - if(writefd > maxfd) - maxfd = writefd; - } - - ptimeout = (timeout_ms < 0) ? NULL : &pending_tv; - - do { - if(timeout_ms > 0) { - pending_tv.tv_sec = pending_ms / 1000; - pending_tv.tv_usec = (pending_ms % 1000) * 1000; - } - else if(!timeout_ms) { - pending_tv.tv_sec = 0; - pending_tv.tv_usec = 0; - } - - /* WinSock select() must not be called with an fd_set that contains zero - fd flags, or it will return WSAEINVAL. But, it also can't be called - with no fd_sets at all! From the documentation: - - Any two of the parameters, readfds, writefds, or exceptfds, can be - given as null. At least one must be non-null, and any non-null - descriptor set must contain at least one handle to a socket. - - We know that we have at least one bit set in at least two fd_sets in - this case, but we may have no bits set in either fds_read or fd_write, - so check for that and handle it. Luckily, with WinSock, we can _also_ - ask how many bits are set on an fd_set. - - It is unclear why WinSock doesn't just handle this for us instead of - calling this an error. - - Note also that WinSock ignores the first argument, so we don't worry - about the fact that maxfd is computed incorrectly with WinSock (since - curl_socket_t is unsigned in such cases and thus -1 is the largest - value). - */ -#ifdef USE_WINSOCK - r = select((int)maxfd + 1, - fds_read.fd_count ? &fds_read : NULL, - fds_write.fd_count ? &fds_write : NULL, - &fds_err, ptimeout); -#else - r = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, ptimeout); -#endif - - if(r != -1) - break; - error = SOCKERRNO; - if(error && ERROR_NOT_EINTR(error)) - break; - if(timeout_ms > 0) { - pending_ms = (int)(timeout_ms - ELAPSED_MS()); - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ - break; - } - } - } while(r == -1); - - if(r < 0) - return -1; - if(r == 0) - return 0; - - ret = 0; - if(readfd0 != CURL_SOCKET_BAD) { - if(FD_ISSET(readfd0, &fds_read)) - ret |= CURL_CSELECT_IN; - if(FD_ISSET(readfd0, &fds_err)) - ret |= CURL_CSELECT_ERR; - } - if(readfd1 != CURL_SOCKET_BAD) { - if(FD_ISSET(readfd1, &fds_read)) - ret |= CURL_CSELECT_IN2; - if(FD_ISSET(readfd1, &fds_err)) - ret |= CURL_CSELECT_ERR; - } - if(writefd != CURL_SOCKET_BAD) { - if(FD_ISSET(writefd, &fds_write)) - ret |= CURL_CSELECT_OUT; - if(FD_ISSET(writefd, &fds_err)) - ret |= CURL_CSELECT_ERR; - } - - return ret; - -#endif /* HAVE_POLL_FINE */ - -} - -/* - * This is a wrapper around poll(). If poll() does not exist, then - * select() is used instead. An error is returned if select() is - * being used and a file descriptor is too large for FD_SETSIZE. - * A negative timeout value makes this function wait indefinitely, - * unles no valid file descriptor is given, when this happens the - * negative timeout is ignored and the function times out immediately. - * - * Return values: - * -1 = system call error or fd >= FD_SETSIZE - * 0 = timeout - * N = number of structures with non zero revent fields - */ -int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) -{ -#ifndef HAVE_POLL_FINE - struct timeval pending_tv; - struct timeval *ptimeout; - fd_set fds_read; - fd_set fds_write; - fd_set fds_err; - curl_socket_t maxfd; -#endif - struct timeval initial_tv = {0, 0}; - bool fds_none = TRUE; - unsigned int i; - int pending_ms = 0; - int error; - int r; - - if(ufds) { - for(i = 0; i < nfds; i++) { - if(ufds[i].fd != CURL_SOCKET_BAD) { - fds_none = FALSE; - break; - } - } - } - if(fds_none) { - r = Curl_wait_ms(timeout_ms); - return r; - } - - /* Avoid initial timestamp, avoid curlx_tvnow() call, when elapsed - time in this function does not need to be measured. This happens - when function is called with a zero timeout or a negative timeout - value indicating a blocking call should be performed. */ - - if(timeout_ms > 0) { - pending_ms = timeout_ms; - initial_tv = curlx_tvnow(); - } - -#ifdef HAVE_POLL_FINE - - do { - if(timeout_ms < 0) - pending_ms = -1; - else if(!timeout_ms) - pending_ms = 0; - r = poll(ufds, nfds, pending_ms); - if(r != -1) - break; - error = SOCKERRNO; - if(error && ERROR_NOT_EINTR(error)) - break; - if(timeout_ms > 0) { - pending_ms = (int)(timeout_ms - ELAPSED_MS()); - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ - break; - } - } - } while(r == -1); - - if(r < 0) - return -1; - if(r == 0) - return 0; - - for(i = 0; i < nfds; i++) { - if(ufds[i].fd == CURL_SOCKET_BAD) - continue; - if(ufds[i].revents & POLLHUP) - ufds[i].revents |= POLLIN; - if(ufds[i].revents & POLLERR) - ufds[i].revents |= (POLLIN|POLLOUT); - } - -#else /* HAVE_POLL_FINE */ - - FD_ZERO(&fds_read); - FD_ZERO(&fds_write); - FD_ZERO(&fds_err); - maxfd = (curl_socket_t)-1; - - for(i = 0; i < nfds; i++) { - ufds[i].revents = 0; - if(ufds[i].fd == CURL_SOCKET_BAD) - continue; - VERIFY_SOCK(ufds[i].fd); - if(ufds[i].events & (POLLIN|POLLOUT|POLLPRI| - POLLRDNORM|POLLWRNORM|POLLRDBAND)) { - if(ufds[i].fd > maxfd) - maxfd = ufds[i].fd; - if(ufds[i].events & (POLLRDNORM|POLLIN)) - FD_SET(ufds[i].fd, &fds_read); - if(ufds[i].events & (POLLWRNORM|POLLOUT)) - FD_SET(ufds[i].fd, &fds_write); - if(ufds[i].events & (POLLRDBAND|POLLPRI)) - FD_SET(ufds[i].fd, &fds_err); - } - } - -#ifdef USE_WINSOCK - /* WinSock select() can't handle zero events. See the comment about this in - Curl_check_socket(). */ - if(fds_read.fd_count == 0 && fds_write.fd_count == 0 - && fds_err.fd_count == 0) { - r = Curl_wait_ms(timeout_ms); - return r; - } -#endif - - ptimeout = (timeout_ms < 0) ? NULL : &pending_tv; - - do { - if(timeout_ms > 0) { - pending_tv.tv_sec = pending_ms / 1000; - pending_tv.tv_usec = (pending_ms % 1000) * 1000; - } - else if(!timeout_ms) { - pending_tv.tv_sec = 0; - pending_tv.tv_usec = 0; - } - -#ifdef USE_WINSOCK - r = select((int)maxfd + 1, - /* WinSock select() can't handle fd_sets with zero bits set, so - don't give it such arguments. See the comment about this in - Curl_check_socket(). - */ - fds_read.fd_count ? &fds_read : NULL, - fds_write.fd_count ? &fds_write : NULL, - fds_err.fd_count ? &fds_err : NULL, ptimeout); -#else - r = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, ptimeout); -#endif - if(r != -1) - break; - error = SOCKERRNO; - if(error && ERROR_NOT_EINTR(error)) - break; - if(timeout_ms > 0) { - pending_ms = timeout_ms - ELAPSED_MS(); - if(pending_ms <= 0) { - r = 0; /* Simulate a "call timed out" case */ - break; - } - } - } while(r == -1); - - if(r < 0) - return -1; - if(r == 0) - return 0; - - r = 0; - for(i = 0; i < nfds; i++) { - ufds[i].revents = 0; - if(ufds[i].fd == CURL_SOCKET_BAD) - continue; - if(FD_ISSET(ufds[i].fd, &fds_read)) - ufds[i].revents |= POLLIN; - if(FD_ISSET(ufds[i].fd, &fds_write)) - ufds[i].revents |= POLLOUT; - if(FD_ISSET(ufds[i].fd, &fds_err)) - ufds[i].revents |= POLLPRI; - if(ufds[i].revents != 0) - r++; - } - -#endif /* HAVE_POLL_FINE */ - - return r; -} - -#ifdef TPF -/* - * This is a replacement for select() on the TPF platform. - * It is used whenever libcurl calls select(). - * The call below to tpf_process_signals() is required because - * TPF's select calls are not signal interruptible. - * - * Return values are the same as select's. - */ -int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes, - fd_set* excepts, struct timeval* tv) -{ - int rc; - - rc = tpf_select_bsd(maxfds, reads, writes, excepts, tv); - tpf_process_signals(); - return rc; -} -#endif /* TPF */ diff --git a/build/premake/premake5/contrib/curl/lib/select.h b/build/premake/premake5/contrib/curl/lib/select.h deleted file mode 100644 index e247bd9d05..0000000000 --- a/build/premake/premake5/contrib/curl/lib/select.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef HEADER_CURL_SELECT_H -#define HEADER_CURL_SELECT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_SYS_POLL_H -#include -#elif defined(HAVE_POLL_H) -#include -#endif - -/* - * Definition of pollfd struct and constants for platforms lacking them. - */ - -#if !defined(HAVE_STRUCT_POLLFD) && \ - !defined(HAVE_SYS_POLL_H) && \ - !defined(HAVE_POLL_H) - -#define POLLIN 0x01 -#define POLLPRI 0x02 -#define POLLOUT 0x04 -#define POLLERR 0x08 -#define POLLHUP 0x10 -#define POLLNVAL 0x20 - -struct pollfd -{ - curl_socket_t fd; - short events; - short revents; -}; - -#endif - -#ifndef POLLRDNORM -#define POLLRDNORM POLLIN -#endif - -#ifndef POLLWRNORM -#define POLLWRNORM POLLOUT -#endif - -#ifndef POLLRDBAND -#define POLLRDBAND POLLPRI -#endif - -/* there are three CSELECT defines that are defined in the public header that - are exposed to users, but this *IN2 bit is only ever used internally and - therefore defined here */ -#define CURL_CSELECT_IN2 (CURL_CSELECT_ERR << 1) - -int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2, - curl_socket_t writefd, - time_t timeout_ms); - -#define SOCKET_READABLE(x,z) \ - Curl_socket_check(x, CURL_SOCKET_BAD, CURL_SOCKET_BAD, z) -#define SOCKET_WRITABLE(x,z) \ - Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z) - -int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); - -/* On non-DOS and non-Winsock platforms, when Curl_ack_eintr is set, - * EINTR condition is honored and function might exit early without - * awaiting full timeout. Otherwise EINTR will be ignored and full - * timeout will elapse. */ -extern int Curl_ack_eintr; - -int Curl_wait_ms(int timeout_ms); - -#ifdef TPF -int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes, - fd_set* excepts, struct timeval* tv); -#endif - -/* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1], which - unfortunately makes it impossible for us to easily check if they're valid -*/ -#if defined(USE_WINSOCK) || defined(TPF) -#define VALID_SOCK(x) 1 -#define VERIFY_SOCK(x) Curl_nop_stmt -#else -#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE)) -#define VERIFY_SOCK(x) do { \ - if(!VALID_SOCK(x)) { \ - SET_SOCKERRNO(EINVAL); \ - return -1; \ - } \ -} WHILE_FALSE -#endif - -#endif /* HEADER_CURL_SELECT_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/sendf.c b/build/premake/premake5/contrib/curl/lib/sendf.c deleted file mode 100644 index 7601697824..0000000000 --- a/build/premake/premake5/contrib/curl/lib/sendf.c +++ /dev/null @@ -1,839 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "urldata.h" -#include "sendf.h" -#include "connect.h" -#include "vtls/vtls.h" -#include "ssh.h" -#include "multiif.h" -#include "non-ascii.h" -#include "strerror.h" -#include "select.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifdef CURL_DO_LINEEND_CONV -/* - * convert_lineends() changes CRLF (\r\n) end-of-line markers to a single LF - * (\n), with special processing for CRLF sequences that are split between two - * blocks of data. Remaining, bare CRs are changed to LFs. The possibly new - * size of the data is returned. - */ -static size_t convert_lineends(struct Curl_easy *data, - char *startPtr, size_t size) -{ - char *inPtr, *outPtr; - - /* sanity check */ - if((startPtr == NULL) || (size < 1)) { - return size; - } - - if(data->state.prev_block_had_trailing_cr) { - /* The previous block of incoming data - had a trailing CR, which was turned into a LF. */ - if(*startPtr == '\n') { - /* This block of incoming data starts with the - previous block's LF so get rid of it */ - memmove(startPtr, startPtr+1, size-1); - size--; - /* and it wasn't a bare CR but a CRLF conversion instead */ - data->state.crlf_conversions++; - } - data->state.prev_block_had_trailing_cr = FALSE; /* reset the flag */ - } - - /* find 1st CR, if any */ - inPtr = outPtr = memchr(startPtr, '\r', size); - if(inPtr) { - /* at least one CR, now look for CRLF */ - while(inPtr < (startPtr+size-1)) { - /* note that it's size-1, so we'll never look past the last byte */ - if(memcmp(inPtr, "\r\n", 2) == 0) { - /* CRLF found, bump past the CR and copy the NL */ - inPtr++; - *outPtr = *inPtr; - /* keep track of how many CRLFs we converted */ - data->state.crlf_conversions++; - } - else { - if(*inPtr == '\r') { - /* lone CR, move LF instead */ - *outPtr = '\n'; - } - else { - /* not a CRLF nor a CR, just copy whatever it is */ - *outPtr = *inPtr; - } - } - outPtr++; - inPtr++; - } /* end of while loop */ - - if(inPtr < startPtr+size) { - /* handle last byte */ - if(*inPtr == '\r') { - /* deal with a CR at the end of the buffer */ - *outPtr = '\n'; /* copy a NL instead */ - /* note that a CRLF might be split across two blocks */ - data->state.prev_block_had_trailing_cr = TRUE; - } - else { - /* copy last byte */ - *outPtr = *inPtr; - } - outPtr++; - } - if(outPtr < startPtr+size) - /* tidy up by null terminating the now shorter data */ - *outPtr = '\0'; - - return (outPtr - startPtr); - } - return size; -} -#endif /* CURL_DO_LINEEND_CONV */ - -#ifdef USE_RECV_BEFORE_SEND_WORKAROUND -bool Curl_recv_has_postponed_data(struct connectdata *conn, int sockindex) -{ - struct postponed_data * const psnd = &(conn->postponed[sockindex]); - return psnd->buffer && psnd->allocated_size && - psnd->recv_size > psnd->recv_processed; -} - -static void pre_receive_plain(struct connectdata *conn, int num) -{ - const curl_socket_t sockfd = conn->sock[num]; - struct postponed_data * const psnd = &(conn->postponed[num]); - size_t bytestorecv = psnd->allocated_size - psnd->recv_size; - /* WinSock will destroy unread received data if send() is - failed. - To avoid lossage of received data, recv() must be - performed before every send() if any incoming data is - available. However, skip this, if buffer is already full. */ - if((conn->handler->protocol&PROTO_FAMILY_HTTP) != 0 && - conn->recv[num] == Curl_recv_plain && - (!psnd->buffer || bytestorecv)) { - const int readymask = Curl_socket_check(sockfd, CURL_SOCKET_BAD, - CURL_SOCKET_BAD, 0); - if(readymask != -1 && (readymask & CURL_CSELECT_IN) != 0) { - /* Have some incoming data */ - if(!psnd->buffer) { - /* Use buffer double default size for intermediate buffer */ - psnd->allocated_size = 2 * BUFSIZE; - psnd->buffer = malloc(psnd->allocated_size); - psnd->recv_size = 0; - psnd->recv_processed = 0; -#ifdef DEBUGBUILD - psnd->bindsock = sockfd; /* Used only for DEBUGASSERT */ -#endif /* DEBUGBUILD */ - bytestorecv = psnd->allocated_size; - } - if(psnd->buffer) { - ssize_t recvedbytes; - DEBUGASSERT(psnd->bindsock == sockfd); - recvedbytes = sread(sockfd, psnd->buffer + psnd->recv_size, - bytestorecv); - if(recvedbytes > 0) - psnd->recv_size += recvedbytes; - } - else - psnd->allocated_size = 0; - } - } -} - -static ssize_t get_pre_recved(struct connectdata *conn, int num, char *buf, - size_t len) -{ - struct postponed_data * const psnd = &(conn->postponed[num]); - size_t copysize; - if(!psnd->buffer) - return 0; - - DEBUGASSERT(psnd->allocated_size > 0); - DEBUGASSERT(psnd->recv_size <= psnd->allocated_size); - DEBUGASSERT(psnd->recv_processed <= psnd->recv_size); - /* Check and process data that already received and storied in internal - intermediate buffer */ - if(psnd->recv_size > psnd->recv_processed) { - DEBUGASSERT(psnd->bindsock == conn->sock[num]); - copysize = CURLMIN(len, psnd->recv_size - psnd->recv_processed); - memcpy(buf, psnd->buffer + psnd->recv_processed, copysize); - psnd->recv_processed += copysize; - } - else - copysize = 0; /* buffer was allocated, but nothing was received */ - - /* Free intermediate buffer if it has no unprocessed data */ - if(psnd->recv_processed == psnd->recv_size) { - free(psnd->buffer); - psnd->buffer = NULL; - psnd->allocated_size = 0; - psnd->recv_size = 0; - psnd->recv_processed = 0; -#ifdef DEBUGBUILD - psnd->bindsock = CURL_SOCKET_BAD; -#endif /* DEBUGBUILD */ - } - return (ssize_t)copysize; -} -#else /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ -/* Use "do-nothing" macros instead of functions when workaround not used */ -bool Curl_recv_has_postponed_data(struct connectdata *conn, int sockindex) -{ - (void)conn; - (void)sockindex; - return false; -} -#define pre_receive_plain(c,n) do {} WHILE_FALSE -#define get_pre_recved(c,n,b,l) 0 -#endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ - -/* Curl_infof() is for info message along the way */ - -void Curl_infof(struct Curl_easy *data, const char *fmt, ...) -{ - if(data && data->set.verbose) { - va_list ap; - size_t len; - char print_buffer[2048 + 1]; - va_start(ap, fmt); - vsnprintf(print_buffer, sizeof(print_buffer), fmt, ap); - va_end(ap); - len = strlen(print_buffer); - Curl_debug(data, CURLINFO_TEXT, print_buffer, len, NULL); - } -} - -/* Curl_failf() is for messages stating why we failed. - * The message SHALL NOT include any LF or CR. - */ - -void Curl_failf(struct Curl_easy *data, const char *fmt, ...) -{ - va_list ap; - size_t len; - va_start(ap, fmt); - - vsnprintf(data->state.buffer, BUFSIZE, fmt, ap); - - if(data->set.errorbuffer && !data->state.errorbuf) { - snprintf(data->set.errorbuffer, CURL_ERROR_SIZE, "%s", data->state.buffer); - data->state.errorbuf = TRUE; /* wrote error string */ - } - if(data->set.verbose) { - len = strlen(data->state.buffer); - if(len < BUFSIZE - 1) { - data->state.buffer[len] = '\n'; - data->state.buffer[++len] = '\0'; - } - Curl_debug(data, CURLINFO_TEXT, data->state.buffer, len, NULL); - } - - va_end(ap); -} - -/* Curl_sendf() sends formated data to the server */ -CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, - const char *fmt, ...) -{ - struct Curl_easy *data = conn->data; - ssize_t bytes_written; - size_t write_len; - CURLcode result = CURLE_OK; - char *s; - char *sptr; - va_list ap; - va_start(ap, fmt); - s = vaprintf(fmt, ap); /* returns an allocated string */ - va_end(ap); - if(!s) - return CURLE_OUT_OF_MEMORY; /* failure */ - - bytes_written=0; - write_len = strlen(s); - sptr = s; - - for(;;) { - /* Write the buffer to the socket */ - result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); - - if(result) - break; - - if(data->set.verbose) - Curl_debug(data, CURLINFO_DATA_OUT, sptr, (size_t)bytes_written, conn); - - if((size_t)bytes_written != write_len) { - /* if not all was written at once, we must advance the pointer, decrease - the size left and try again! */ - write_len -= bytes_written; - sptr += bytes_written; - } - else - break; - } - - free(s); /* free the output string */ - - return result; -} - -/* - * Curl_write() is an internal write function that sends data to the - * server. Works with plain sockets, SCP, SSL or kerberos. - * - * If the write would block (CURLE_AGAIN), we return CURLE_OK and - * (*written == 0). Otherwise we return regular CURLcode value. - */ -CURLcode Curl_write(struct connectdata *conn, - curl_socket_t sockfd, - const void *mem, - size_t len, - ssize_t *written) -{ - ssize_t bytes_written; - CURLcode result = CURLE_OK; - int num = (sockfd == conn->sock[SECONDARYSOCKET]); - - bytes_written = conn->send[num](conn, num, mem, len, &result); - - *written = bytes_written; - if(bytes_written >= 0) - /* we completely ignore the curlcode value when subzero is not returned */ - return CURLE_OK; - - /* handle CURLE_AGAIN or a send failure */ - switch(result) { - case CURLE_AGAIN: - *written = 0; - return CURLE_OK; - - case CURLE_OK: - /* general send failure */ - return CURLE_SEND_ERROR; - - default: - /* we got a specific curlcode, forward it */ - return result; - } -} - -ssize_t Curl_send_plain(struct connectdata *conn, int num, - const void *mem, size_t len, CURLcode *code) -{ - curl_socket_t sockfd = conn->sock[num]; - ssize_t bytes_written; - /* WinSock will destroy unread received data if send() is - failed. - To avoid lossage of received data, recv() must be - performed before every send() if any incoming data is - available. */ - pre_receive_plain(conn, num); - -#ifdef MSG_FASTOPEN /* Linux */ - if(conn->bits.tcp_fastopen) { - bytes_written = sendto(sockfd, mem, len, MSG_FASTOPEN, - conn->ip_addr->ai_addr, conn->ip_addr->ai_addrlen); - conn->bits.tcp_fastopen = FALSE; - } - else -#endif - bytes_written = swrite(sockfd, mem, len); - - *code = CURLE_OK; - if(-1 == bytes_written) { - int err = SOCKERRNO; - - if( -#ifdef WSAEWOULDBLOCK - /* This is how Windows does it */ - (WSAEWOULDBLOCK == err) -#else - /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned - due to its inability to send off data without blocking. We therefor - treat both error codes the same here */ - (EWOULDBLOCK == err) || (EAGAIN == err) || (EINTR == err) || - (EINPROGRESS == err) -#endif - ) { - /* this is just a case of EWOULDBLOCK */ - bytes_written=0; - *code = CURLE_AGAIN; - } - else { - failf(conn->data, "Send failure: %s", - Curl_strerror(conn, err)); - conn->data->state.os_errno = err; - *code = CURLE_SEND_ERROR; - } - } - return bytes_written; -} - -/* - * Curl_write_plain() is an internal write function that sends data to the - * server using plain sockets only. Otherwise meant to have the exact same - * proto as Curl_write() - */ -CURLcode Curl_write_plain(struct connectdata *conn, - curl_socket_t sockfd, - const void *mem, - size_t len, - ssize_t *written) -{ - ssize_t bytes_written; - CURLcode result; - int num = (sockfd == conn->sock[SECONDARYSOCKET]); - - bytes_written = Curl_send_plain(conn, num, mem, len, &result); - - *written = bytes_written; - - return result; -} - -ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf, - size_t len, CURLcode *code) -{ - curl_socket_t sockfd = conn->sock[num]; - ssize_t nread; - /* Check and return data that already received and storied in internal - intermediate buffer */ - nread = get_pre_recved(conn, num, buf, len); - if(nread > 0) { - *code = CURLE_OK; - return nread; - } - - nread = sread(sockfd, buf, len); - - *code = CURLE_OK; - if(-1 == nread) { - int err = SOCKERRNO; - - if( -#ifdef WSAEWOULDBLOCK - /* This is how Windows does it */ - (WSAEWOULDBLOCK == err) -#else - /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned - due to its inability to send off data without blocking. We therefor - treat both error codes the same here */ - (EWOULDBLOCK == err) || (EAGAIN == err) || (EINTR == err) -#endif - ) { - /* this is just a case of EWOULDBLOCK */ - *code = CURLE_AGAIN; - } - else { - failf(conn->data, "Recv failure: %s", - Curl_strerror(conn, err)); - conn->data->state.os_errno = err; - *code = CURLE_RECV_ERROR; - } - } - return nread; -} - -static CURLcode pausewrite(struct Curl_easy *data, - int type, /* what type of data */ - const char *ptr, - size_t len) -{ - /* signalled to pause sending on this connection, but since we have data - we want to send we need to dup it to save a copy for when the sending - is again enabled */ - struct SingleRequest *k = &data->req; - char *dupl = malloc(len); - if(!dupl) - return CURLE_OUT_OF_MEMORY; - - memcpy(dupl, ptr, len); - - /* store this information in the state struct for later use */ - data->state.tempwrite = dupl; - data->state.tempwritesize = len; - data->state.tempwritetype = type; - - /* mark the connection as RECV paused */ - k->keepon |= KEEP_RECV_PAUSE; - - DEBUGF(infof(data, "Pausing with %zu bytes in buffer for type %02x\n", - len, type)); - - return CURLE_OK; -} - - -/* Curl_client_chop_write() writes chunks of data not larger than - * CURL_MAX_WRITE_SIZE via client write callback(s) and - * takes care of pause requests from the callbacks. - */ -CURLcode Curl_client_chop_write(struct connectdata *conn, - int type, - char *ptr, - size_t len) -{ - struct Curl_easy *data = conn->data; - curl_write_callback writeheader = NULL; - curl_write_callback writebody = NULL; - - if(!len) - return CURLE_OK; - - /* If reading is actually paused, we're forced to append this chunk of data - to the already held data, but only if it is the same type as otherwise it - can't work and it'll return error instead. */ - if(data->req.keepon & KEEP_RECV_PAUSE) { - size_t newlen; - char *newptr; - if(type != data->state.tempwritetype) - /* major internal confusion */ - return CURLE_RECV_ERROR; - - DEBUGASSERT(data->state.tempwrite); - - /* figure out the new size of the data to save */ - newlen = len + data->state.tempwritesize; - /* allocate the new memory area */ - newptr = realloc(data->state.tempwrite, newlen); - if(!newptr) - return CURLE_OUT_OF_MEMORY; - /* copy the new data to the end of the new area */ - memcpy(newptr + data->state.tempwritesize, ptr, len); - /* update the pointer and the size */ - data->state.tempwrite = newptr; - data->state.tempwritesize = newlen; - return CURLE_OK; - } - - /* Determine the callback(s) to use. */ - if(type & CLIENTWRITE_BODY) - writebody = data->set.fwrite_func; - if((type & CLIENTWRITE_HEADER) && - (data->set.fwrite_header || data->set.writeheader)) { - /* - * Write headers to the same callback or to the especially setup - * header callback function (added after version 7.7.1). - */ - writeheader = - data->set.fwrite_header? data->set.fwrite_header: data->set.fwrite_func; - } - - /* Chop data, write chunks. */ - while(len) { - size_t chunklen = len <= CURL_MAX_WRITE_SIZE? len: CURL_MAX_WRITE_SIZE; - - if(writebody) { - size_t wrote = writebody(ptr, 1, chunklen, data->set.out); - - if(CURL_WRITEFUNC_PAUSE == wrote) { - if(conn->handler->flags & PROTOPT_NONETWORK) { - /* Protocols that work without network cannot be paused. This is - actually only FILE:// just now, and it can't pause since the - transfer isn't done using the "normal" procedure. */ - failf(data, "Write callback asked for PAUSE when not supported!"); - return CURLE_WRITE_ERROR; - } - else - return pausewrite(data, type, ptr, len); - } - else if(wrote != chunklen) { - failf(data, "Failed writing body (%zu != %zu)", wrote, chunklen); - return CURLE_WRITE_ERROR; - } - } - - if(writeheader) { - size_t wrote = writeheader(ptr, 1, chunklen, data->set.writeheader); - - if(CURL_WRITEFUNC_PAUSE == wrote) - /* here we pass in the HEADER bit only since if this was body as well - then it was passed already and clearly that didn't trigger the - pause, so this is saved for later with the HEADER bit only */ - return pausewrite(data, CLIENTWRITE_HEADER, ptr, len); - - if(wrote != chunklen) { - failf(data, "Failed writing header"); - return CURLE_WRITE_ERROR; - } - } - - ptr += chunklen; - len -= chunklen; - } - - return CURLE_OK; -} - - -/* Curl_client_write() sends data to the write callback(s) - - The bit pattern defines to what "streams" to write to. Body and/or header. - The defines are in sendf.h of course. - - If CURL_DO_LINEEND_CONV is enabled, data is converted IN PLACE to the - local character encoding. This is a problem and should be changed in - the future to leave the original data alone. - */ -CURLcode Curl_client_write(struct connectdata *conn, - int type, - char *ptr, - size_t len) -{ - struct Curl_easy *data = conn->data; - - if(0 == len) - len = strlen(ptr); - - /* FTP data may need conversion. */ - if((type & CLIENTWRITE_BODY) && - (conn->handler->protocol & PROTO_FAMILY_FTP) && - conn->proto.ftpc.transfertype == 'A') { - /* convert from the network encoding */ - CURLcode result = Curl_convert_from_network(data, ptr, len); - /* Curl_convert_from_network calls failf if unsuccessful */ - if(result) - return result; - -#ifdef CURL_DO_LINEEND_CONV - /* convert end-of-line markers */ - len = convert_lineends(data, ptr, len); -#endif /* CURL_DO_LINEEND_CONV */ - } - - return Curl_client_chop_write(conn, type, ptr, len); -} - -CURLcode Curl_read_plain(curl_socket_t sockfd, - char *buf, - size_t bytesfromsocket, - ssize_t *n) -{ - ssize_t nread = sread(sockfd, buf, bytesfromsocket); - - if(-1 == nread) { - int err = SOCKERRNO; - int return_error; -#ifdef USE_WINSOCK - return_error = WSAEWOULDBLOCK == err; -#else - return_error = EWOULDBLOCK == err || EAGAIN == err || EINTR == err; -#endif - if(return_error) - return CURLE_AGAIN; - else - return CURLE_RECV_ERROR; - } - - /* we only return number of bytes read when we return OK */ - *n = nread; - return CURLE_OK; -} - -/* - * Internal read-from-socket function. This is meant to deal with plain - * sockets, SSL sockets and kerberos sockets. - * - * Returns a regular CURLcode value. - */ -CURLcode Curl_read(struct connectdata *conn, /* connection data */ - curl_socket_t sockfd, /* read from this socket */ - char *buf, /* store read data here */ - size_t sizerequested, /* max amount to read */ - ssize_t *n) /* amount bytes read */ -{ - CURLcode result = CURLE_RECV_ERROR; - ssize_t nread = 0; - size_t bytesfromsocket = 0; - char *buffertofill = NULL; - - /* if HTTP/1 pipelining is both wanted and possible */ - bool pipelining = Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1) && - (conn->bundle->multiuse == BUNDLE_PIPELINING); - - /* Set 'num' to 0 or 1, depending on which socket that has been sent here. - If it is the second socket, we set num to 1. Otherwise to 0. This lets - us use the correct ssl handle. */ - int num = (sockfd == conn->sock[SECONDARYSOCKET]); - - *n=0; /* reset amount to zero */ - - /* If session can pipeline, check connection buffer */ - if(pipelining) { - size_t bytestocopy = CURLMIN(conn->buf_len - conn->read_pos, - sizerequested); - - /* Copy from our master buffer first if we have some unread data there*/ - if(bytestocopy > 0) { - memcpy(buf, conn->master_buffer + conn->read_pos, bytestocopy); - conn->read_pos += bytestocopy; - conn->bits.stream_was_rewound = FALSE; - - *n = (ssize_t)bytestocopy; - return CURLE_OK; - } - /* If we come here, it means that there is no data to read from the buffer, - * so we read from the socket */ - bytesfromsocket = CURLMIN(sizerequested, BUFSIZE * sizeof(char)); - buffertofill = conn->master_buffer; - } - else { - bytesfromsocket = CURLMIN((long)sizerequested, - conn->data->set.buffer_size ? - conn->data->set.buffer_size : BUFSIZE); - buffertofill = buf; - } - - nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &result); - if(nread < 0) - return result; - - if(pipelining) { - memcpy(buf, conn->master_buffer, nread); - conn->buf_len = nread; - conn->read_pos = nread; - } - - *n += nread; - - return CURLE_OK; -} - -/* return 0 on success */ -static int showit(struct Curl_easy *data, curl_infotype type, - char *ptr, size_t size) -{ - static const char s_infotype[CURLINFO_END][3] = { - "* ", "< ", "> ", "{ ", "} ", "{ ", "} " }; - -#ifdef CURL_DOES_CONVERSIONS - char buf[BUFSIZE+1]; - size_t conv_size = 0; - - switch(type) { - case CURLINFO_HEADER_OUT: - /* assume output headers are ASCII */ - /* copy the data into my buffer so the original is unchanged */ - if(size > BUFSIZE) { - size = BUFSIZE; /* truncate if necessary */ - buf[BUFSIZE] = '\0'; - } - conv_size = size; - memcpy(buf, ptr, size); - /* Special processing is needed for this block if it - * contains both headers and data (separated by CRLFCRLF). - * We want to convert just the headers, leaving the data as-is. - */ - if(size > 4) { - size_t i; - for(i = 0; i < size-4; i++) { - if(memcmp(&buf[i], "\x0d\x0a\x0d\x0a", 4) == 0) { - /* convert everything through this CRLFCRLF but no further */ - conv_size = i + 4; - break; - } - } - } - - Curl_convert_from_network(data, buf, conv_size); - /* Curl_convert_from_network calls failf if unsuccessful */ - /* we might as well continue even if it fails... */ - ptr = buf; /* switch pointer to use my buffer instead */ - break; - default: - /* leave everything else as-is */ - break; - } -#endif /* CURL_DOES_CONVERSIONS */ - - if(data->set.fdebug) - return (*data->set.fdebug)(data, type, ptr, size, - data->set.debugdata); - - switch(type) { - case CURLINFO_TEXT: - case CURLINFO_HEADER_OUT: - case CURLINFO_HEADER_IN: - fwrite(s_infotype[type], 2, 1, data->set.err); - fwrite(ptr, size, 1, data->set.err); -#ifdef CURL_DOES_CONVERSIONS - if(size != conv_size) { - /* we had untranslated data so we need an explicit newline */ - fwrite("\n", 1, 1, data->set.err); - } -#endif - break; - default: /* nada */ - break; - } - return 0; -} - -int Curl_debug(struct Curl_easy *data, curl_infotype type, - char *ptr, size_t size, - struct connectdata *conn) -{ - int rc; - if(data->set.printhost && conn && conn->host.dispname) { - char buffer[160]; - const char *t=NULL; - const char *w="Data"; - switch(type) { - case CURLINFO_HEADER_IN: - w = "Header"; - /* FALLTHROUGH */ - case CURLINFO_DATA_IN: - t = "from"; - break; - case CURLINFO_HEADER_OUT: - w = "Header"; - /* FALLTHROUGH */ - case CURLINFO_DATA_OUT: - t = "to"; - break; - default: - break; - } - - if(t) { - snprintf(buffer, sizeof(buffer), "[%s %s %s]", w, t, - conn->host.dispname); - rc = showit(data, CURLINFO_TEXT, buffer, strlen(buffer)); - if(rc) - return rc; - } - } - rc = showit(data, type, ptr, size); - return rc; -} diff --git a/build/premake/premake5/contrib/curl/lib/sendf.h b/build/premake/premake5/contrib/curl/lib/sendf.h deleted file mode 100644 index fbe4f99c87..0000000000 --- a/build/premake/premake5/contrib/curl/lib/sendf.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef HEADER_CURL_SENDF_H -#define HEADER_CURL_SENDF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *, - const char *fmt, ...); -void Curl_infof(struct Curl_easy *, const char *fmt, ...); -void Curl_failf(struct Curl_easy *, const char *fmt, ...); - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - -#if defined(HAVE_VARIADIC_MACROS_C99) -#define infof(...) Curl_nop_stmt -#elif defined(HAVE_VARIADIC_MACROS_GCC) -#define infof(x...) Curl_nop_stmt -#else -#define infof (void) -#endif - -#else /* CURL_DISABLE_VERBOSE_STRINGS */ - -#define infof Curl_infof - -#endif /* CURL_DISABLE_VERBOSE_STRINGS */ - -#define failf Curl_failf - -#define CLIENTWRITE_BODY (1<<0) -#define CLIENTWRITE_HEADER (1<<1) -#define CLIENTWRITE_BOTH (CLIENTWRITE_BODY|CLIENTWRITE_HEADER) - -CURLcode Curl_client_chop_write(struct connectdata *conn, int type, char *ptr, - size_t len) WARN_UNUSED_RESULT; -CURLcode Curl_client_write(struct connectdata *conn, int type, char *ptr, - size_t len) WARN_UNUSED_RESULT; - -bool Curl_recv_has_postponed_data(struct connectdata *conn, int sockindex); - -/* internal read-function, does plain socket only */ -CURLcode Curl_read_plain(curl_socket_t sockfd, - char *buf, - size_t bytesfromsocket, - ssize_t *n); - -ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf, - size_t len, CURLcode *code); -ssize_t Curl_send_plain(struct connectdata *conn, int num, - const void *mem, size_t len, CURLcode *code); - -/* internal read-function, does plain socket, SSL and krb4 */ -CURLcode Curl_read(struct connectdata *conn, curl_socket_t sockfd, - char *buf, size_t buffersize, - ssize_t *n); -/* internal write-function, does plain socket, SSL, SCP, SFTP and krb4 */ -CURLcode Curl_write(struct connectdata *conn, - curl_socket_t sockfd, - const void *mem, size_t len, - ssize_t *written); - -/* internal write-function, does plain sockets ONLY */ -CURLcode Curl_write_plain(struct connectdata *conn, - curl_socket_t sockfd, - const void *mem, size_t len, - ssize_t *written); - -/* the function used to output verbose information */ -int Curl_debug(struct Curl_easy *handle, curl_infotype type, - char *data, size_t size, - struct connectdata *conn); - - -#endif /* HEADER_CURL_SENDF_H */ diff --git a/build/premake/premake5/contrib/curl/lib/setup-os400.h b/build/premake/premake5/contrib/curl/lib/setup-os400.h deleted file mode 100644 index a3c2a7bdc9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/setup-os400.h +++ /dev/null @@ -1,223 +0,0 @@ -#ifndef HEADER_CURL_SETUP_OS400_H -#define HEADER_CURL_SETUP_OS400_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - - -/* OS/400 netdb.h does not define NI_MAXHOST. */ -#define NI_MAXHOST 1025 - -/* OS/400 netdb.h does not define NI_MAXSERV. */ -#define NI_MAXSERV 32 - -/* No OS/400 header file defines u_int32_t. */ -typedef unsigned long u_int32_t; - - -/* System API wrapper prototypes & definitions to support ASCII parameters. */ - -#include -#include -#include -#include -#include - -extern int Curl_getaddrinfo_a(const char *nodename, - const char *servname, - const struct addrinfo *hints, - struct addrinfo **res); -#define getaddrinfo Curl_getaddrinfo_a - - -extern int Curl_getnameinfo_a(const struct sockaddr *sa, - curl_socklen_t salen, - char *nodename, curl_socklen_t nodenamelen, - char *servname, curl_socklen_t servnamelen, - int flags); -#define getnameinfo Curl_getnameinfo_a - - -/* GSKit wrappers. */ - -extern int Curl_gsk_environment_open(gsk_handle * my_env_handle); -#define gsk_environment_open Curl_gsk_environment_open - -extern int Curl_gsk_secure_soc_open(gsk_handle my_env_handle, - gsk_handle * my_session_handle); -#define gsk_secure_soc_open Curl_gsk_secure_soc_open - -extern int Curl_gsk_environment_close(gsk_handle * my_env_handle); -#define gsk_environment_close Curl_gsk_environment_close - -extern int Curl_gsk_secure_soc_close(gsk_handle * my_session_handle); -#define gsk_secure_soc_close Curl_gsk_secure_soc_close - -extern int Curl_gsk_environment_init(gsk_handle my_env_handle); -#define gsk_environment_init Curl_gsk_environment_init - -extern int Curl_gsk_secure_soc_init(gsk_handle my_session_handle); -#define gsk_secure_soc_init Curl_gsk_secure_soc_init - -extern int Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle, - GSK_BUF_ID bufID, - const char *buffer, - int bufSize); -#define gsk_attribute_set_buffer Curl_gsk_attribute_set_buffer_a - -extern int Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle, - GSK_ENUM_ID enumID, - GSK_ENUM_VALUE enumValue); -#define gsk_attribute_set_enum Curl_gsk_attribute_set_enum - -extern int Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle, - GSK_NUM_ID numID, - int numValue); -#define gsk_attribute_set_numeric_value Curl_gsk_attribute_set_numeric_value - -extern int Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle, - GSK_CALLBACK_ID callBackID, - void *callBackAreaPtr); -#define gsk_attribute_set_callback Curl_gsk_attribute_set_callback - -extern int Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle, - GSK_BUF_ID bufID, - const char **buffer, - int *bufSize); -#define gsk_attribute_get_buffer Curl_gsk_attribute_get_buffer_a - -extern int Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, - GSK_ENUM_ID enumID, - GSK_ENUM_VALUE *enumValue); -#define gsk_attribute_get_enum Curl_gsk_attribute_get_enum - -extern int Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle, - GSK_NUM_ID numID, - int *numValue); -#define gsk_attribute_get_numeric_value Curl_gsk_attribute_get_numeric_value - -extern int Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle, - GSK_CERT_ID certID, - const gsk_cert_data_elem **certDataElem, - int *certDataElementCount); -#define gsk_attribute_get_cert_info Curl_gsk_attribute_get_cert_info - -extern int Curl_gsk_secure_soc_misc(gsk_handle my_session_handle, - GSK_MISC_ID miscID); -#define gsk_secure_soc_misc Curl_gsk_secure_soc_misc - -extern int Curl_gsk_secure_soc_read(gsk_handle my_session_handle, - char *readBuffer, - int readBufSize, int *amtRead); -#define gsk_secure_soc_read Curl_gsk_secure_soc_read - -extern int Curl_gsk_secure_soc_write(gsk_handle my_session_handle, - char *writeBuffer, - int writeBufSize, int *amtWritten); -#define gsk_secure_soc_write Curl_gsk_secure_soc_write - -extern const char * Curl_gsk_strerror_a(int gsk_return_value); -#define gsk_strerror Curl_gsk_strerror_a - -extern int Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle, - int IOCompletionPort, - Qso_OverlappedIO_t * communicationsArea); -#define gsk_secure_soc_startInit Curl_gsk_secure_soc_startInit - - -/* GSSAPI wrappers. */ - -extern OM_uint32 Curl_gss_import_name_a(OM_uint32 * minor_status, - gss_buffer_t in_name, - gss_OID in_name_type, - gss_name_t * out_name); -#define gss_import_name Curl_gss_import_name_a - - -extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status, - OM_uint32 status_value, - int status_type, gss_OID mech_type, - gss_msg_ctx_t * message_context, - gss_buffer_t status_string); -#define gss_display_status Curl_gss_display_status_a - - -extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status, - gss_cred_id_t cred_handle, - gss_ctx_id_t * context_handle, - gss_name_t target_name, - gss_OID mech_type, - gss_flags_t req_flags, - OM_uint32 time_req, - gss_channel_bindings_t - input_chan_bindings, - gss_buffer_t input_token, - gss_OID * actual_mech_type, - gss_buffer_t output_token, - gss_flags_t * ret_flags, - OM_uint32 * time_rec); -#define gss_init_sec_context Curl_gss_init_sec_context_a - - -extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status, - gss_ctx_id_t * context_handle, - gss_buffer_t output_token); -#define gss_delete_sec_context Curl_gss_delete_sec_context_a - - -/* LDAP wrappers. */ - -#define BerValue struct berval - -#define ldap_url_parse ldap_url_parse_utf8 -#define ldap_init Curl_ldap_init_a -#define ldap_simple_bind_s Curl_ldap_simple_bind_s_a -#define ldap_search_s Curl_ldap_search_s_a -#define ldap_get_values_len Curl_ldap_get_values_len_a -#define ldap_err2string Curl_ldap_err2string_a -#define ldap_get_dn Curl_ldap_get_dn_a -#define ldap_first_attribute Curl_ldap_first_attribute_a -#define ldap_next_attribute Curl_ldap_next_attribute_a - -/* Some socket functions must be wrapped to process textual addresses - like AF_UNIX. */ - -extern int Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen); -extern int Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen); -extern int Curl_os400_sendto(int sd, char *buffer, int buflen, int flags, - struct sockaddr * dstaddr, int addrlen); -extern int Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags, - struct sockaddr *fromaddr, int *addrlen); - -#define connect Curl_os400_connect -#define bind Curl_os400_bind -#define sendto Curl_os400_sendto -#define recvfrom Curl_os400_recvfrom - -#ifdef HAVE_LIBZ -#define zlibVersion Curl_os400_zlibVersion -#define inflateInit_ Curl_os400_inflateInit_ -#define inflateInit2_ Curl_os400_inflateInit2_ -#define inflate Curl_os400_inflate -#define inflateEnd Curl_os400_inflateEnd -#endif - -#endif /* HEADER_CURL_SETUP_OS400_H */ diff --git a/build/premake/premake5/contrib/curl/lib/setup-vms.h b/build/premake/premake5/contrib/curl/lib/setup-vms.h deleted file mode 100644 index 6c454aee68..0000000000 --- a/build/premake/premake5/contrib/curl/lib/setup-vms.h +++ /dev/null @@ -1,443 +0,0 @@ -#ifndef HEADER_CURL_SETUP_VMS_H -#define HEADER_CURL_SETUP_VMS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* */ -/* JEM, 12/30/12, VMS now generates config.h, so only define wrappers for */ -/* getenv(), getpwuid() and provide is_vms_shell() */ -/* Also need upper case symbols for system services, and */ -/* OpenSSL, and some Kerberos image */ - -#ifdef __DECC -#pragma message save -#pragma message disable dollarid -#endif - -/* Hide the stuff we are overriding */ -#define getenv decc_getenv -#ifdef __DECC -# if __INITIAL_POINTER_SIZE != 64 -# define getpwuid decc_getpwuid -# endif -#endif -#include -char *decc$getenv(const char *__name); -#include - -#include -#include - -#undef getenv -#undef getpwuid -#define getenv vms_getenv -#define getpwuid vms_getpwuid - -/* VAX needs these in upper case when compiling exact case */ -#define sys$assign SYS$ASSIGN -#define sys$dassgn SYS$DASSGN -#define sys$qiow SYS$QIOW - -#ifdef __DECC -# if __INITIAL_POINTER_SIZE -# pragma __pointer_size __save -# endif -#endif - -#if __USE_LONG_GID_T -# define decc_getpwuid DECC$__LONG_GID_GETPWUID -#else -# if __INITIAL_POINTER_SIZE -# define decc_getpwuid decc$__32_getpwuid -# else -# define decc_getpwuid decc$getpwuid -# endif -#endif - - struct passwd * decc_getpwuid(uid_t uid); - -#ifdef __DECC -# if __INITIAL_POINTER_SIZE == 32 -/* Translate the path, but only if the path is a VMS file specification */ -/* The translation is usually only needed for older versions of VMS */ -static char *vms_translate_path(const char *path) -{ - char *unix_path; - char *test_str; - - /* See if the result is in VMS format, if not, we are done */ - /* Assume that this is a PATH, not just some data */ - test_str = strpbrk(path, ":[<^"); - if(test_str == NULL) { - return (char *)path; - } - - unix_path = decc$translate_vms(path); - - if((int)unix_path <= 0) { - /* We can not translate it, so return the original string */ - return (char *)path; - } -} -# else - /* VMS translate path is actually not needed on the current 64 bit */ - /* VMS platforms, so instead of figuring out the pointer settings */ - /* Change it to a noop */ -# define vms_translate_path(__path) __path -# endif -#endif - -#ifdef __DECC -# if __INITIAL_POINTER_SIZE -# pragma __pointer_size __restore -# endif -#endif - -static char *vms_getenv(const char *envvar) -{ - char *result; - char *vms_path; - - /* first use the DECC getenv() function */ - result = decc$getenv(envvar); - if(result == NULL) { - return result; - } - - vms_path = result; - result = vms_translate_path(vms_path); - - /* note that if you backport this to use VAX C RTL, that the VAX C RTL */ - /* may do a malloc(2048) for each call to getenv(), so you will need */ - /* to add a free(vms_path) */ - /* Do not do a free() for DEC C RTL builds, which should be used for */ - /* VMS 5.5-2 and later, even if using GCC */ - - return result; -} - - -static struct passwd vms_passwd_cache; - -static struct passwd * vms_getpwuid(uid_t uid) -{ - struct passwd * my_passwd; - -/* Hack needed to support 64 bit builds, decc_getpwnam is 32 bit only */ -#ifdef __DECC -# if __INITIAL_POINTER_SIZE - __char_ptr32 unix_path; -# else - char *unix_path; -# endif -#else - char *unix_path; -#endif - - my_passwd = decc_getpwuid(uid); - if(my_passwd == NULL) { - return my_passwd; - } - - unix_path = vms_translate_path(my_passwd->pw_dir); - - if((long)unix_path <= 0) { - /* We can not translate it, so return the original string */ - return my_passwd; - } - - /* If no changes needed just return it */ - if(unix_path == my_passwd->pw_dir) { - return my_passwd; - } - - /* Need to copy the structure returned */ - /* Since curl is only using pw_dir, no need to fix up */ - /* the pw_shell when running under Bash */ - vms_passwd_cache.pw_name = my_passwd->pw_name; - vms_passwd_cache.pw_uid = my_passwd->pw_uid; - vms_passwd_cache.pw_gid = my_passwd->pw_uid; - vms_passwd_cache.pw_dir = unix_path; - vms_passwd_cache.pw_shell = my_passwd->pw_shell; - - return &vms_passwd_cache; -} - -#ifdef __DECC -#pragma message restore -#endif - -/* Bug - VMS OpenSSL and Kerberos universal symbols are in uppercase only */ -/* VMS libraries should have universal symbols in exact and uppercase */ - -#define ASN1_INTEGER_get ASN1_INTEGER_GET -#define ASN1_STRING_data ASN1_STRING_DATA -#define ASN1_STRING_length ASN1_STRING_LENGTH -#define ASN1_STRING_print ASN1_STRING_PRINT -#define ASN1_STRING_to_UTF8 ASN1_STRING_TO_UTF8 -#define ASN1_STRING_type ASN1_STRING_TYPE -#define BIO_ctrl BIO_CTRL -#define BIO_free BIO_FREE -#define BIO_new BIO_NEW -#define BIO_s_mem BIO_S_MEM -#define BN_bn2bin BN_BN2BIN -#define BN_num_bits BN_NUM_BITS -#define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA -#define CRYPTO_free CRYPTO_FREE -#define CRYPTO_malloc CRYPTO_MALLOC -#define CONF_modules_load_file CONF_MODULES_LOAD_FILE -#ifdef __VAX -# ifdef VMS_OLD_SSL - /* Ancient OpenSSL on VAX/VMS missing this constant */ -# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 -# undef CONF_modules_load_file - static int CONF_modules_load_file(const char *filename, - const char *appname, - unsigned long flags) { - return 1; - } -# endif -#endif -#define DES_ecb_encrypt DES_ECB_ENCRYPT -#define DES_set_key DES_SET_KEY -#define DES_set_odd_parity DES_SET_ODD_PARITY -#define ENGINE_ctrl ENGINE_CTRL -#define ENGINE_ctrl_cmd ENGINE_CTRL_CMD -#define ENGINE_finish ENGINE_FINISH -#define ENGINE_free ENGINE_FREE -#define ENGINE_get_first ENGINE_GET_FIRST -#define ENGINE_get_id ENGINE_GET_ID -#define ENGINE_get_next ENGINE_GET_NEXT -#define ENGINE_init ENGINE_INIT -#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES -#define ENGINE_load_private_key ENGINE_LOAD_PRIVATE_KEY -#define ENGINE_set_default ENGINE_SET_DEFAULT -#define ERR_clear_error ERR_CLEAR_ERROR -#define ERR_error_string ERR_ERROR_STRING -#define ERR_error_string_n ERR_ERROR_STRING_N -#define ERR_free_strings ERR_FREE_STRINGS -#define ERR_get_error ERR_GET_ERROR -#define ERR_peek_error ERR_PEEK_ERROR -#define ERR_remove_state ERR_REMOVE_STATE -#define EVP_PKEY_copy_parameters EVP_PKEY_COPY_PARAMETERS -#define EVP_PKEY_free EVP_PKEY_FREE -#define EVP_cleanup EVP_CLEANUP -#define GENERAL_NAMES_free GENERAL_NAMES_FREE -#define i2d_X509_PUBKEY I2D_X509_PUBKEY -#define MD4_Final MD4_FINAL -#define MD4_Init MD4_INIT -#define MD4_Update MD4_UPDATE -#define MD5_Final MD5_FINAL -#define MD5_Init MD5_INIT -#define MD5_Update MD5_UPDATE -#define OPENSSL_add_all_algo_noconf OPENSSL_ADD_ALL_ALGO_NOCONF -#ifndef __VAX -#define OPENSSL_load_builtin_modules OPENSSL_LOAD_BUILTIN_MODULES -#endif -#define PEM_read_X509 PEM_READ_X509 -#define PEM_write_bio_X509 PEM_WRITE_BIO_X509 -#define PKCS12_PBE_add PKCS12_PBE_ADD -#define PKCS12_free PKCS12_FREE -#define PKCS12_parse PKCS12_PARSE -#define RAND_add RAND_ADD -#define RAND_bytes RAND_BYTES -#define RAND_egd RAND_EGD -#define RAND_file_name RAND_FILE_NAME -#define RAND_load_file RAND_LOAD_FILE -#define RAND_status RAND_STATUS -#define SSL_CIPHER_get_name SSL_CIPHER_GET_NAME -#define SSL_CTX_add_client_CA SSL_CTX_ADD_CLIENT_CA -#define SSL_CTX_callback_ctrl SSL_CTX_CALLBACK_CTRL -#define SSL_CTX_check_private_key SSL_CTX_CHECK_PRIVATE_KEY -#define SSL_CTX_ctrl SSL_CTX_CTRL -#define SSL_CTX_free SSL_CTX_FREE -#define SSL_CTX_get_cert_store SSL_CTX_GET_CERT_STORE -#define SSL_CTX_load_verify_locations SSL_CTX_LOAD_VERIFY_LOCATIONS -#define SSL_CTX_new SSL_CTX_NEW -#define SSL_CTX_set_cipher_list SSL_CTX_SET_CIPHER_LIST -#define SSL_CTX_set_def_passwd_cb_ud SSL_CTX_SET_DEF_PASSWD_CB_UD -#define SSL_CTX_set_default_passwd_cb SSL_CTX_SET_DEFAULT_PASSWD_CB -#define SSL_CTX_set_msg_callback SSL_CTX_SET_MSG_CALLBACK -#define SSL_CTX_set_verify SSL_CTX_SET_VERIFY -#define SSL_CTX_use_PrivateKey SSL_CTX_USE_PRIVATEKEY -#define SSL_CTX_use_PrivateKey_file SSL_CTX_USE_PRIVATEKEY_FILE -#define SSL_CTX_use_cert_chain_file SSL_CTX_USE_CERT_CHAIN_FILE -#define SSL_CTX_use_certificate SSL_CTX_USE_CERTIFICATE -#define SSL_CTX_use_certificate_file SSL_CTX_USE_CERTIFICATE_FILE -#define SSL_SESSION_free SSL_SESSION_FREE -#define SSL_connect SSL_CONNECT -#define SSL_free SSL_FREE -#define SSL_get1_session SSL_GET1_SESSION -#define SSL_get_certificate SSL_GET_CERTIFICATE -#define SSL_get_current_cipher SSL_GET_CURRENT_CIPHER -#define SSL_get_error SSL_GET_ERROR -#define SSL_get_peer_cert_chain SSL_GET_PEER_CERT_CHAIN -#define SSL_get_peer_certificate SSL_GET_PEER_CERTIFICATE -#define SSL_get_privatekey SSL_GET_PRIVATEKEY -#define SSL_get_session SSL_GET_SESSION -#define SSL_get_shutdown SSL_GET_SHUTDOWN -#define SSL_get_verify_result SSL_GET_VERIFY_RESULT -#define SSL_library_init SSL_LIBRARY_INIT -#define SSL_load_error_strings SSL_LOAD_ERROR_STRINGS -#define SSL_new SSL_NEW -#define SSL_peek SSL_PEEK -#define SSL_pending SSL_PENDING -#define SSL_read SSL_READ -#define SSL_set_connect_state SSL_SET_CONNECT_STATE -#define SSL_set_fd SSL_SET_FD -#define SSL_set_session SSL_SET_SESSION -#define SSL_shutdown SSL_SHUTDOWN -#define SSL_version SSL_VERSION -#define SSL_write SSL_WRITE -#define SSLeay SSLEAY -#define SSLv23_client_method SSLV23_CLIENT_METHOD -#define SSLv3_client_method SSLV3_CLIENT_METHOD -#define TLSv1_client_method TLSV1_CLIENT_METHOD -#define UI_create_method UI_CREATE_METHOD -#define UI_destroy_method UI_DESTROY_METHOD -#define UI_get0_user_data UI_GET0_USER_DATA -#define UI_get_input_flags UI_GET_INPUT_FLAGS -#define UI_get_string_type UI_GET_STRING_TYPE -#define UI_create_method UI_CREATE_METHOD -#define UI_destroy_method UI_DESTROY_METHOD -#define UI_method_get_closer UI_METHOD_GET_CLOSER -#define UI_method_get_opener UI_METHOD_GET_OPENER -#define UI_method_get_reader UI_METHOD_GET_READER -#define UI_method_get_writer UI_METHOD_GET_WRITER -#define UI_method_set_closer UI_METHOD_SET_CLOSER -#define UI_method_set_opener UI_METHOD_SET_OPENER -#define UI_method_set_reader UI_METHOD_SET_READER -#define UI_method_set_writer UI_METHOD_SET_WRITER -#define UI_OpenSSL UI_OPENSSL -#define UI_set_result UI_SET_RESULT -#define X509V3_EXT_print X509V3_EXT_PRINT -#define X509_EXTENSION_get_critical X509_EXTENSION_GET_CRITICAL -#define X509_EXTENSION_get_data X509_EXTENSION_GET_DATA -#define X509_EXTENSION_get_object X509_EXTENSION_GET_OBJECT -#define X509_LOOKUP_file X509_LOOKUP_FILE -#define X509_NAME_ENTRY_get_data X509_NAME_ENTRY_GET_DATA -#define X509_NAME_get_entry X509_NAME_GET_ENTRY -#define X509_NAME_get_index_by_NID X509_NAME_GET_INDEX_BY_NID -#define X509_NAME_print_ex X509_NAME_PRINT_EX -#define X509_STORE_CTX_get_current_cert X509_STORE_CTX_GET_CURRENT_CERT -#define X509_STORE_add_lookup X509_STORE_ADD_LOOKUP -#define X509_STORE_set_flags X509_STORE_SET_FLAGS -#define X509_check_issued X509_CHECK_ISSUED -#define X509_free X509_FREE -#define X509_get_ext_d2i X509_GET_EXT_D2I -#define X509_get_issuer_name X509_GET_ISSUER_NAME -#define X509_get_pubkey X509_GET_PUBKEY -#define X509_get_serialNumber X509_GET_SERIALNUMBER -#define X509_get_subject_name X509_GET_SUBJECT_NAME -#define X509_load_crl_file X509_LOAD_CRL_FILE -#define X509_verify_cert_error_string X509_VERIFY_CERT_ERROR_STRING -#define d2i_PKCS12_fp D2I_PKCS12_FP -#define i2t_ASN1_OBJECT I2T_ASN1_OBJECT -#define sk_num SK_NUM -#define sk_pop SK_POP -#define sk_pop_free SK_POP_FREE -#define sk_value SK_VALUE -#ifdef __VAX -#define OPENSSL_NO_SHA256 -#endif -#define SHA256_Final SHA256_FINAL -#define SHA256_Init SHA256_INIT -#define SHA256_Update SHA256_UPDATE - -#define USE_UPPERCASE_GSSAPI 1 -#define gss_seal GSS_SEAL -#define gss_unseal GSS_UNSEAL - -#define USE_UPPERCASE_KRBAPI 1 - -/* AI_NUMERICHOST needed for IP V6 support in Curl */ -#ifdef HAVE_NETDB_H -#include -#ifndef AI_NUMERICHOST -#ifdef ENABLE_IPV6 -#undef ENABLE_IPV6 -#endif -#endif -#endif - -/* VAX symbols are always in uppercase */ -#ifdef __VAX -#define inflate INFLATE -#define inflateEnd INFLATEEND -#define inflateInit2_ INFLATEINIT2_ -#define inflateInit_ INFLATEINIT_ -#define zlibVersion ZLIBVERSION -#endif - -/* Older VAX OpenSSL port defines these as Macros */ -/* Need to include the headers first and then redefine */ -/* that way a newer port will also work if some one has one */ -#ifdef __VAX - -# if (OPENSSL_VERSION_NUMBER < 0x00907001L) -# define des_set_odd_parity DES_SET_ODD_PARITY -# define des_set_key DES_SET_KEY -# define des_ecb_encrypt DES_ECB_ENCRYPT - -# endif -# include -# ifndef OpenSSL_add_all_algorithms -# define OpenSSL_add_all_algorithms OPENSSL_ADD_ALL_ALGORITHMS - void OPENSSL_ADD_ALL_ALGORITHMS(void); -# endif - - /* Curl defines these to lower case and VAX needs them in upper case */ - /* So we need static routines */ -# if (OPENSSL_VERSION_NUMBER < 0x00907001L) - -# undef des_set_odd_parity -# undef DES_set_odd_parity -# undef des_set_key -# undef DES_set_key -# undef des_ecb_encrypt -# undef DES_ecb_encrypt - - static void des_set_odd_parity(des_cblock *key) { - DES_SET_ODD_PARITY(key); - } - - static int des_set_key(const_des_cblock *key, - des_key_schedule schedule) { - return DES_SET_KEY(key, schedule); - } - - static void des_ecb_encrypt(const_des_cblock *input, - des_cblock *output, - des_key_schedule ks, int enc) { - DES_ECB_ENCRYPT(input, output, ks, enc); - } -#endif -/* Need this to stop a macro redefinition error */ -#if OPENSSL_VERSION_NUMBER < 0x00907000L -# ifdef X509_STORE_set_flags -# undef X509_STORE_set_flags -# define X509_STORE_set_flags(x,y) Curl_nop_stmt -# endif -#endif -#endif - -#endif /* HEADER_CURL_SETUP_VMS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/share.c b/build/premake/premake5/contrib/curl/lib/share.c deleted file mode 100644 index 5b3957fcfb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/share.c +++ /dev/null @@ -1,244 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "urldata.h" -#include "share.h" -#include "vtls/vtls.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -struct Curl_share * -curl_share_init(void) -{ - struct Curl_share *share = calloc(1, sizeof(struct Curl_share)); - if(share) { - share->specifier |= (1<hostcache)) { - free(share); - return NULL; - } - } - - return share; -} - -#undef curl_share_setopt -CURLSHcode -curl_share_setopt(struct Curl_share *share, CURLSHoption option, ...) -{ - va_list param; - int type; - curl_lock_function lockfunc; - curl_unlock_function unlockfunc; - void *ptr; - CURLSHcode res = CURLSHE_OK; - - if(share->dirty) - /* don't allow setting options while one or more handles are already - using this share */ - return CURLSHE_IN_USE; - - va_start(param, option); - - switch(option) { - case CURLSHOPT_SHARE: - /* this is a type this share will share */ - type = va_arg(param, int); - share->specifier |= (1<cookies) { - share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE); - if(!share->cookies) - res = CURLSHE_NOMEM; - } -#else /* CURL_DISABLE_HTTP */ - res = CURLSHE_NOT_BUILT_IN; -#endif - break; - - case CURL_LOCK_DATA_SSL_SESSION: -#ifdef USE_SSL - if(!share->sslsession) { - share->max_ssl_sessions = 8; - share->sslsession = calloc(share->max_ssl_sessions, - sizeof(struct curl_ssl_session)); - share->sessionage = 0; - if(!share->sslsession) - res = CURLSHE_NOMEM; - } -#else - res = CURLSHE_NOT_BUILT_IN; -#endif - break; - - case CURL_LOCK_DATA_CONNECT: /* not supported (yet) */ - break; - - default: - res = CURLSHE_BAD_OPTION; - } - break; - - case CURLSHOPT_UNSHARE: - /* this is a type this share will no longer share */ - type = va_arg(param, int); - share->specifier &= ~(1<cookies) { - Curl_cookie_cleanup(share->cookies); - share->cookies = NULL; - } -#else /* CURL_DISABLE_HTTP */ - res = CURLSHE_NOT_BUILT_IN; -#endif - break; - - case CURL_LOCK_DATA_SSL_SESSION: -#ifdef USE_SSL - Curl_safefree(share->sslsession); -#else - res = CURLSHE_NOT_BUILT_IN; -#endif - break; - - case CURL_LOCK_DATA_CONNECT: - break; - - default: - res = CURLSHE_BAD_OPTION; - break; - } - break; - - case CURLSHOPT_LOCKFUNC: - lockfunc = va_arg(param, curl_lock_function); - share->lockfunc = lockfunc; - break; - - case CURLSHOPT_UNLOCKFUNC: - unlockfunc = va_arg(param, curl_unlock_function); - share->unlockfunc = unlockfunc; - break; - - case CURLSHOPT_USERDATA: - ptr = va_arg(param, void *); - share->clientdata = ptr; - break; - - default: - res = CURLSHE_BAD_OPTION; - break; - } - - va_end(param); - - return res; -} - -CURLSHcode -curl_share_cleanup(struct Curl_share *share) -{ - if(share == NULL) - return CURLSHE_INVALID; - - if(share->lockfunc) - share->lockfunc(NULL, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE, - share->clientdata); - - if(share->dirty) { - if(share->unlockfunc) - share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata); - return CURLSHE_IN_USE; - } - - Curl_hash_destroy(&share->hostcache); - -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - Curl_cookie_cleanup(share->cookies); -#endif - -#ifdef USE_SSL - if(share->sslsession) { - size_t i; - for(i = 0; i < share->max_ssl_sessions; i++) - Curl_ssl_kill_session(&(share->sslsession[i])); - free(share->sslsession); - } -#endif - - if(share->unlockfunc) - share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata); - free(share); - - return CURLSHE_OK; -} - - -CURLSHcode -Curl_share_lock(struct Curl_easy *data, curl_lock_data type, - curl_lock_access accesstype) -{ - struct Curl_share *share = data->share; - - if(share == NULL) - return CURLSHE_INVALID; - - if(share->specifier & (1<lockfunc) /* only call this if set! */ - share->lockfunc(data, type, accesstype, share->clientdata); - } - /* else if we don't share this, pretend successful lock */ - - return CURLSHE_OK; -} - -CURLSHcode -Curl_share_unlock(struct Curl_easy *data, curl_lock_data type) -{ - struct Curl_share *share = data->share; - - if(share == NULL) - return CURLSHE_INVALID; - - if(share->specifier & (1<unlockfunc) /* only call this if set! */ - share->unlockfunc (data, type, share->clientdata); - } - - return CURLSHE_OK; -} diff --git a/build/premake/premake5/contrib/curl/lib/share.h b/build/premake/premake5/contrib/curl/lib/share.h deleted file mode 100644 index c039a16cb7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/share.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef HEADER_CURL_SHARE_H -#define HEADER_CURL_SHARE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" -#include -#include "cookie.h" -#include "urldata.h" - -/* SalfordC says "A structure member may not be volatile". Hence: - */ -#ifdef __SALFORDC__ -#define CURL_VOLATILE -#else -#define CURL_VOLATILE volatile -#endif - -/* this struct is libcurl-private, don't export details */ -struct Curl_share { - unsigned int specifier; - CURL_VOLATILE unsigned int dirty; - - curl_lock_function lockfunc; - curl_unlock_function unlockfunc; - void *clientdata; - - struct curl_hash hostcache; -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - struct CookieInfo *cookies; -#endif - - struct curl_ssl_session *sslsession; - size_t max_ssl_sessions; - long sessionage; -}; - -CURLSHcode Curl_share_lock(struct Curl_easy *, curl_lock_data, - curl_lock_access); -CURLSHcode Curl_share_unlock(struct Curl_easy *, curl_lock_data); - -#endif /* HEADER_CURL_SHARE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/sigpipe.h b/build/premake/premake5/contrib/curl/lib/sigpipe.h deleted file mode 100644 index 800f9d3b4d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/sigpipe.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef HEADER_CURL_SIGPIPE_H -#define HEADER_CURL_SIGPIPE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && defined(USE_OPENSSL) -#include - -struct sigpipe_ignore { - struct sigaction old_pipe_act; - bool no_signal; -}; - -#define SIGPIPE_VARIABLE(x) struct sigpipe_ignore x - -/* - * sigpipe_ignore() makes sure we ignore SIGPIPE while running libcurl - * internals, and then sigpipe_restore() will restore the situation when we - * return from libcurl again. - */ -static void sigpipe_ignore(struct Curl_easy *data, - struct sigpipe_ignore *ig) -{ - /* get a local copy of no_signal because the Curl_easy might not be - around when we restore */ - ig->no_signal = data->set.no_signal; - if(!data->set.no_signal) { - struct sigaction action; - /* first, extract the existing situation */ - memset(&ig->old_pipe_act, 0, sizeof(struct sigaction)); - sigaction(SIGPIPE, NULL, &ig->old_pipe_act); - action = ig->old_pipe_act; - /* ignore this signal */ - action.sa_handler = SIG_IGN; - sigaction(SIGPIPE, &action, NULL); - } -} - -/* - * sigpipe_restore() puts back the outside world's opinion of signal handler - * and SIGPIPE handling. It MUST only be called after a corresponding - * sigpipe_ignore() was used. - */ -static void sigpipe_restore(struct sigpipe_ignore *ig) -{ - if(!ig->no_signal) - /* restore the outside state */ - sigaction(SIGPIPE, &ig->old_pipe_act, NULL); -} - -#else -/* for systems without sigaction */ -#define sigpipe_ignore(x,y) Curl_nop_stmt -#define sigpipe_restore(x) Curl_nop_stmt -#define SIGPIPE_VARIABLE(x) -#endif - -#endif /* HEADER_CURL_SIGPIPE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/slist.c b/build/premake/premake5/contrib/curl/lib/slist.c deleted file mode 100644 index e5adc0e71a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/slist.c +++ /dev/null @@ -1,145 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "slist.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* returns last node in linked list */ -static struct curl_slist *slist_get_last(struct curl_slist *list) -{ - struct curl_slist *item; - - /* if caller passed us a NULL, return now */ - if(!list) - return NULL; - - /* loop through to find the last item */ - item = list; - while(item->next) { - item = item->next; - } - return item; -} - -/* - * Curl_slist_append_nodup() appends a string to the linked list. Rather than - * copying the string in dynamic storage, it takes its ownership. The string - * should have been malloc()ated. Curl_slist_append_nodup always returns - * the address of the first record, so that you can use this function as an - * initialization function as well as an append function. - * If an error occurs, NULL is returned and the string argument is NOT - * released. - */ -struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, char *data) -{ - struct curl_slist *last; - struct curl_slist *new_item; - - DEBUGASSERT(data); - - new_item = malloc(sizeof(struct curl_slist)); - if(!new_item) - return NULL; - - new_item->next = NULL; - new_item->data = data; - - /* if this is the first item, then new_item *is* the list */ - if(!list) - return new_item; - - last = slist_get_last(list); - last->next = new_item; - return list; -} - -/* - * curl_slist_append() appends a string to the linked list. It always returns - * the address of the first record, so that you can use this function as an - * initialization function as well as an append function. If you find this - * bothersome, then simply create a separate _init function and call it - * appropriately from within the program. - */ -struct curl_slist *curl_slist_append(struct curl_slist *list, - const char *data) -{ - char *dupdata = strdup(data); - - if(!dupdata) - return NULL; - - list = Curl_slist_append_nodup(list, dupdata); - if(!list) - free(dupdata); - - return list; -} - -/* - * Curl_slist_duplicate() duplicates a linked list. It always returns the - * address of the first record of the cloned list or NULL in case of an - * error (or if the input list was NULL). - */ -struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist) -{ - struct curl_slist *outlist = NULL; - struct curl_slist *tmp; - - while(inlist) { - tmp = curl_slist_append(outlist, inlist->data); - - if(!tmp) { - curl_slist_free_all(outlist); - return NULL; - } - - outlist = tmp; - inlist = inlist->next; - } - return outlist; -} - -/* be nice and clean up resources */ -void curl_slist_free_all(struct curl_slist *list) -{ - struct curl_slist *next; - struct curl_slist *item; - - if(!list) - return; - - item = list; - do { - next = item->next; - Curl_safefree(item->data); - free(item); - item = next; - } while(next); -} - diff --git a/build/premake/premake5/contrib/curl/lib/slist.h b/build/premake/premake5/contrib/curl/lib/slist.h deleted file mode 100644 index b3f498c35f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/slist.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef HEADER_CURL_SLIST_H -#define HEADER_CURL_SLIST_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Curl_slist_duplicate() duplicates a linked list. It always returns the - * address of the first record of the cloned list or NULL in case of an - * error (or if the input list was NULL). - */ -struct curl_slist *Curl_slist_duplicate(struct curl_slist *inlist); - -/* - * Curl_slist_append_nodup() takes ownership of the given string and appends - * it to the list. - */ -struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, - char *data); - -#endif /* HEADER_CURL_SLIST_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/smb.c b/build/premake/premake5/contrib/curl/lib/smb.c deleted file mode 100644 index acf31bc563..0000000000 --- a/build/premake/premake5/contrib/curl/lib/smb.c +++ /dev/null @@ -1,982 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014, Bill Nagel , Exacq Technologies - * Copyright (C) 2016-2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - -#define BUILDING_CURL_SMB_C - -#ifdef HAVE_PROCESS_H -#include -#ifdef CURL_WINDOWS_APP -#define getpid GetCurrentProcessId -#else -#define getpid _getpid -#endif -#endif - -#include "smb.h" -#include "urldata.h" -#include "sendf.h" -#include "multiif.h" -#include "connect.h" -#include "progress.h" -#include "transfer.h" -#include "vtls/vtls.h" -#include "curl_ntlm_core.h" -#include "escape.h" -#include "curl_endian.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* Local API functions */ -static CURLcode smb_setup_connection(struct connectdata *conn); -static CURLcode smb_connect(struct connectdata *conn, bool *done); -static CURLcode smb_connection_state(struct connectdata *conn, bool *done); -static CURLcode smb_request_state(struct connectdata *conn, bool *done); -static CURLcode smb_done(struct connectdata *conn, CURLcode status, - bool premature); -static CURLcode smb_disconnect(struct connectdata *conn, bool dead); -static int smb_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode smb_parse_url_path(struct connectdata *conn); - -/* - * SMB handler interface - */ -const struct Curl_handler Curl_handler_smb = { - "SMB", /* scheme */ - smb_setup_connection, /* setup_connection */ - ZERO_NULL, /* do_it */ - smb_done, /* done */ - ZERO_NULL, /* do_more */ - smb_connect, /* connect_it */ - smb_connection_state, /* connecting */ - smb_request_state, /* doing */ - smb_getsock, /* proto_getsock */ - smb_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - smb_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMB, /* defport */ - CURLPROTO_SMB, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * SMBS handler interface - */ -const struct Curl_handler Curl_handler_smbs = { - "SMBS", /* scheme */ - smb_setup_connection, /* setup_connection */ - ZERO_NULL, /* do_it */ - smb_done, /* done */ - ZERO_NULL, /* do_more */ - smb_connect, /* connect_it */ - smb_connection_state, /* connecting */ - smb_request_state, /* doing */ - smb_getsock, /* proto_getsock */ - smb_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - smb_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMBS, /* defport */ - CURLPROTO_SMBS, /* protocol */ - PROTOPT_SSL /* flags */ -}; -#endif - -#define MAX_PAYLOAD_SIZE 0x8000 -#define MAX_MESSAGE_SIZE (MAX_PAYLOAD_SIZE + 0x1000) -#define CLIENTNAME "curl" -#define SERVICENAME "?????" - -/* Append a string to an SMB message */ -#define MSGCAT(str) \ - strcpy(p, (str)); \ - p += strlen(str); - -/* Append a null-terminated string to an SMB message */ -#define MSGCATNULL(str) \ - strcpy(p, (str)); \ - p += strlen(str) + 1; - -/* SMB is mostly little endian */ -#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \ - defined(__OS400__) -static unsigned short smb_swap16(unsigned short x) -{ - return (unsigned short) ((x << 8) | ((x >> 8) & 0xff)); -} - -static unsigned int smb_swap32(unsigned int x) -{ - return (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | - ((x >> 24) & 0xff); -} - -#ifdef HAVE_LONGLONG -static unsigned long long smb_swap64(unsigned long long x) -{ - return ((unsigned long long) smb_swap32((unsigned int) x) << 32) | - smb_swap32((unsigned int) (x >> 32)); -} -#else -static unsigned __int64 smb_swap64(unsigned __int64 x) -{ - return ((unsigned __int64) smb_swap32((unsigned int) x) << 32) | - smb_swap32((unsigned int) (x >> 32)); -} -#endif -#else -# define smb_swap16(x) (x) -# define smb_swap32(x) (x) -# define smb_swap64(x) (x) -#endif - -/* SMB request state */ -enum smb_req_state { - SMB_REQUESTING, - SMB_TREE_CONNECT, - SMB_OPEN, - SMB_DOWNLOAD, - SMB_UPLOAD, - SMB_CLOSE, - SMB_TREE_DISCONNECT, - SMB_DONE -}; - -/* SMB request data */ -struct smb_request { - enum smb_req_state state; - char *share; - char *path; - unsigned short tid; /* Even if we connect to the same tree as another */ - unsigned short fid; /* request, the tid will be different */ - CURLcode result; -}; - -static void conn_state(struct connectdata *conn, enum smb_conn_state newstate) -{ - struct smb_conn *smb = &conn->proto.smbc; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* For debug purposes */ - static const char * const names[] = { - "SMB_NOT_CONNECTED", - "SMB_CONNECTING", - "SMB_NEGOTIATE", - "SMB_SETUP", - "SMB_CONNECTED", - /* LAST */ - }; - - if(smb->state != newstate) - infof(conn->data, "SMB conn %p state change from %s to %s\n", - (void *)smb, names[smb->state], names[newstate]); -#endif - - smb->state = newstate; -} - -static void request_state(struct connectdata *conn, - enum smb_req_state newstate) -{ - struct smb_request *req = conn->data->req.protop; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* For debug purposes */ - static const char * const names[] = { - "SMB_REQUESTING", - "SMB_TREE_CONNECT", - "SMB_OPEN", - "SMB_DOWNLOAD", - "SMB_UPLOAD", - "SMB_CLOSE", - "SMB_TREE_DISCONNECT", - "SMB_DONE", - /* LAST */ - }; - - if(req->state != newstate) - infof(conn->data, "SMB request %p state change from %s to %s\n", - (void *)req, names[req->state], names[newstate]); -#endif - - req->state = newstate; -} - -static CURLcode smb_setup_connection(struct connectdata *conn) -{ - struct smb_request *req; - - /* Initialize the request state */ - conn->data->req.protop = req = calloc(1, sizeof(struct smb_request)); - if(!req) - return CURLE_OUT_OF_MEMORY; - - /* Parse the URL path */ - return smb_parse_url_path(conn); -} - -static CURLcode smb_connect(struct connectdata *conn, bool *done) -{ - struct smb_conn *smbc = &conn->proto.smbc; - char *slash; - - (void) done; - - /* Check we have a username and password to authenticate with */ - if(!conn->bits.user_passwd) - return CURLE_LOGIN_DENIED; - - /* Initialize the connection state */ - memset(smbc, 0, sizeof(*smbc)); - smbc->state = SMB_CONNECTING; - smbc->recv_buf = malloc(MAX_MESSAGE_SIZE); - if(!smbc->recv_buf) - return CURLE_OUT_OF_MEMORY; - - /* Multiple requests are allowed with this connection */ - connkeep(conn, "SMB default"); - - /* Parse the username, domain, and password */ - slash = strchr(conn->user, '/'); - if(!slash) - slash = strchr(conn->user, '\\'); - - if(slash) { - smbc->user = slash + 1; - smbc->domain = strdup(conn->user); - if(!smbc->domain) - return CURLE_OUT_OF_MEMORY; - smbc->domain[slash - conn->user] = 0; - } - else { - smbc->user = conn->user; - smbc->domain = strdup(conn->host.name); - if(!smbc->domain) - return CURLE_OUT_OF_MEMORY; - } - - return CURLE_OK; -} - -static CURLcode smb_recv_message(struct connectdata *conn, void **msg) -{ - struct smb_conn *smbc = &conn->proto.smbc; - char *buf = smbc->recv_buf; - ssize_t bytes_read; - size_t nbt_size; - size_t msg_size; - size_t len = MAX_MESSAGE_SIZE - smbc->got; - CURLcode result; - - result = Curl_read(conn, FIRSTSOCKET, buf + smbc->got, len, &bytes_read); - if(result) - return result; - - if(!bytes_read) - return CURLE_OK; - - smbc->got += bytes_read; - - /* Check for a 32-bit nbt header */ - if(smbc->got < sizeof(unsigned int)) - return CURLE_OK; - - nbt_size = Curl_read16_be((const unsigned char *) - (buf + sizeof(unsigned short))) + - sizeof(unsigned int); - if(smbc->got < nbt_size) - return CURLE_OK; - - msg_size = sizeof(struct smb_header); - if(nbt_size >= msg_size + 1) { - /* Add the word count */ - msg_size += 1 + ((unsigned char) buf[msg_size]) * sizeof(unsigned short); - if(nbt_size >= msg_size + sizeof(unsigned short)) { - /* Add the byte count */ - msg_size += sizeof(unsigned short) + - Curl_read16_le((const unsigned char *)&buf[msg_size]); - if(nbt_size < msg_size) - return CURLE_READ_ERROR; - } - } - - *msg = buf; - - return CURLE_OK; -} - -static void smb_pop_message(struct connectdata *conn) -{ - struct smb_conn *smbc = &conn->proto.smbc; - - smbc->got = 0; -} - -static void smb_format_message(struct connectdata *conn, struct smb_header *h, - unsigned char cmd, size_t len) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_request *req = conn->data->req.protop; - unsigned int pid; - - memset(h, 0, sizeof(*h)); - h->nbt_length = htons((unsigned short) (sizeof(*h) - sizeof(unsigned int) + - len)); - memcpy((char *)h->magic, "\xffSMB", 4); - h->command = cmd; - h->flags = SMB_FLAGS_CANONICAL_PATHNAMES | SMB_FLAGS_CASELESS_PATHNAMES; - h->flags2 = smb_swap16(SMB_FLAGS2_IS_LONG_NAME | SMB_FLAGS2_KNOWS_LONG_NAME); - h->uid = smb_swap16(smbc->uid); - h->tid = smb_swap16(req->tid); - pid = getpid(); - h->pid_high = smb_swap16((unsigned short)(pid >> 16)); - h->pid = smb_swap16((unsigned short) pid); -} - -static CURLcode smb_send(struct connectdata *conn, ssize_t len, - size_t upload_size) -{ - struct smb_conn *smbc = &conn->proto.smbc; - ssize_t bytes_written; - CURLcode result; - - result = Curl_write(conn, FIRSTSOCKET, conn->data->state.uploadbuffer, - len, &bytes_written); - if(result) - return result; - - if(bytes_written != len) { - smbc->send_size = len; - smbc->sent = bytes_written; - } - - smbc->upload_size = upload_size; - - return CURLE_OK; -} - -static CURLcode smb_flush(struct connectdata *conn) -{ - struct smb_conn *smbc = &conn->proto.smbc; - ssize_t bytes_written; - ssize_t len = smbc->send_size - smbc->sent; - CURLcode result; - - if(!smbc->send_size) - return CURLE_OK; - - result = Curl_write(conn, FIRSTSOCKET, - conn->data->state.uploadbuffer + smbc->sent, - len, &bytes_written); - if(result) - return result; - - if(bytes_written != len) - smbc->sent += bytes_written; - else - smbc->send_size = 0; - - return CURLE_OK; -} - -static CURLcode smb_send_message(struct connectdata *conn, unsigned char cmd, - const void *msg, size_t msg_len) -{ - smb_format_message(conn, (struct smb_header *)conn->data->state.uploadbuffer, - cmd, msg_len); - memcpy(conn->data->state.uploadbuffer + sizeof(struct smb_header), - msg, msg_len); - - return smb_send(conn, sizeof(struct smb_header) + msg_len, 0); -} - -static CURLcode smb_send_negotiate(struct connectdata *conn) -{ - const char *msg = "\x00\x0c\x00\x02NT LM 0.12"; - - return smb_send_message(conn, SMB_COM_NEGOTIATE, msg, 15); -} - -static CURLcode smb_send_setup(struct connectdata *conn) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_setup msg; - char *p = msg.bytes; - unsigned char lm_hash[21]; - unsigned char lm[24]; - unsigned char nt_hash[21]; - unsigned char nt[24]; - - size_t byte_count = sizeof(lm) + sizeof(nt); - byte_count += strlen(smbc->user) + strlen(smbc->domain); - byte_count += strlen(OS) + strlen(CLIENTNAME) + 4; /* 4 null chars */ - if(byte_count > sizeof(msg.bytes)) - return CURLE_FILESIZE_EXCEEDED; - - Curl_ntlm_core_mk_lm_hash(conn->data, conn->passwd, lm_hash); - Curl_ntlm_core_lm_resp(lm_hash, smbc->challenge, lm); -#if USE_NTRESPONSES - Curl_ntlm_core_mk_nt_hash(conn->data, conn->passwd, nt_hash); - Curl_ntlm_core_lm_resp(nt_hash, smbc->challenge, nt); -#else - memset(nt, 0, sizeof(nt)); -#endif - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_SETUP_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - msg.max_buffer_size = smb_swap16(MAX_MESSAGE_SIZE); - msg.max_mpx_count = smb_swap16(1); - msg.vc_number = smb_swap16(1); - msg.session_key = smb_swap32(smbc->session_key); - msg.capabilities = smb_swap32(SMB_CAP_LARGE_FILES); - msg.lengths[0] = smb_swap16(sizeof(lm)); - msg.lengths[1] = smb_swap16(sizeof(nt)); - memcpy(p, lm, sizeof(lm)); - p += sizeof(lm); - memcpy(p, nt, sizeof(nt)); - p += sizeof(nt); - MSGCATNULL(smbc->user); - MSGCATNULL(smbc->domain); - MSGCATNULL(OS); - MSGCATNULL(CLIENTNAME); - byte_count = p - msg.bytes; - msg.byte_count = smb_swap16((unsigned short)byte_count); - - return smb_send_message(conn, SMB_COM_SETUP_ANDX, &msg, - sizeof(msg) - sizeof(msg.bytes) + byte_count); -} - -static CURLcode smb_send_tree_connect(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_tree_connect msg; - char *p = msg.bytes; - - size_t byte_count = strlen(conn->host.name) + strlen(req->share); - byte_count += strlen(SERVICENAME) + 5; /* 2 nulls and 3 backslashes */ - if(byte_count > sizeof(msg.bytes)) - return CURLE_FILESIZE_EXCEEDED; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_TREE_CONNECT_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - msg.pw_len = 0; - MSGCAT("\\\\"); - MSGCAT(conn->host.name); - MSGCAT("\\"); - MSGCATNULL(req->share); - MSGCATNULL(SERVICENAME); /* Match any type of service */ - byte_count = p - msg.bytes; - msg.byte_count = smb_swap16((unsigned short)byte_count); - - return smb_send_message(conn, SMB_COM_TREE_CONNECT_ANDX, &msg, - sizeof(msg) - sizeof(msg.bytes) + byte_count); -} - -static CURLcode smb_send_open(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_nt_create msg; - size_t byte_count; - - if((strlen(req->path) + 1) > sizeof(msg.bytes)) - return CURLE_FILESIZE_EXCEEDED; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_NT_CREATE_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - byte_count = strlen(req->path); - msg.name_length = smb_swap16((unsigned short)byte_count); - msg.share_access = smb_swap32(SMB_FILE_SHARE_ALL); - if(conn->data->set.upload) { - msg.access = smb_swap32(SMB_GENERIC_READ | SMB_GENERIC_WRITE); - msg.create_disposition = smb_swap32(SMB_FILE_OVERWRITE_IF); - } - else { - msg.access = smb_swap32(SMB_GENERIC_READ); - msg.create_disposition = smb_swap32(SMB_FILE_OPEN); - } - msg.byte_count = smb_swap16((unsigned short) ++byte_count); - strcpy(msg.bytes, req->path); - - return smb_send_message(conn, SMB_COM_NT_CREATE_ANDX, &msg, - sizeof(msg) - sizeof(msg.bytes) + byte_count); -} - -static CURLcode smb_send_close(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_close msg; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_CLOSE; - msg.fid = smb_swap16(req->fid); - - return smb_send_message(conn, SMB_COM_CLOSE, &msg, sizeof(msg)); -} - -static CURLcode smb_send_tree_disconnect(struct connectdata *conn) -{ - struct smb_tree_disconnect msg; - - memset(&msg, 0, sizeof(msg)); - - return smb_send_message(conn, SMB_COM_TREE_DISCONNECT, &msg, sizeof(msg)); -} - -static CURLcode smb_send_read(struct connectdata *conn) -{ - struct smb_request *req = conn->data->req.protop; - curl_off_t offset = conn->data->req.offset; - struct smb_read msg; - - memset(&msg, 0, sizeof(msg)); - msg.word_count = SMB_WC_READ_ANDX; - msg.andx.command = SMB_COM_NO_ANDX_COMMAND; - msg.fid = smb_swap16(req->fid); - msg.offset = smb_swap32((unsigned int) offset); - msg.offset_high = smb_swap32((unsigned int) (offset >> 32)); - msg.min_bytes = smb_swap16(MAX_PAYLOAD_SIZE); - msg.max_bytes = smb_swap16(MAX_PAYLOAD_SIZE); - - return smb_send_message(conn, SMB_COM_READ_ANDX, &msg, sizeof(msg)); -} - -static CURLcode smb_send_write(struct connectdata *conn) -{ - struct smb_write *msg = (struct smb_write *)conn->data->state.uploadbuffer; - struct smb_request *req = conn->data->req.protop; - curl_off_t offset = conn->data->req.offset; - - curl_off_t upload_size = conn->data->req.size - conn->data->req.bytecount; - if(upload_size >= MAX_PAYLOAD_SIZE - 1) /* There is one byte of padding */ - upload_size = MAX_PAYLOAD_SIZE - 1; - - memset(msg, 0, sizeof(*msg)); - msg->word_count = SMB_WC_WRITE_ANDX; - msg->andx.command = SMB_COM_NO_ANDX_COMMAND; - msg->fid = smb_swap16(req->fid); - msg->offset = smb_swap32((unsigned int) offset); - msg->offset_high = smb_swap32((unsigned int) (offset >> 32)); - msg->data_length = smb_swap16((unsigned short) upload_size); - msg->data_offset = smb_swap16(sizeof(*msg) - sizeof(unsigned int)); - msg->byte_count = smb_swap16((unsigned short) (upload_size + 1)); - - smb_format_message(conn, &msg->h, SMB_COM_WRITE_ANDX, - sizeof(*msg) - sizeof(msg->h) + (size_t) upload_size); - - return smb_send(conn, sizeof(*msg), (size_t) upload_size); -} - -static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg) -{ - struct smb_conn *smbc = &conn->proto.smbc; - CURLcode result; - - /* Check if there is data in the transfer buffer */ - if(!smbc->send_size && smbc->upload_size) { - int nread = smbc->upload_size > BUFSIZE ? BUFSIZE : - (int) smbc->upload_size; - conn->data->req.upload_fromhere = conn->data->state.uploadbuffer; - result = Curl_fillreadbuffer(conn, nread, &nread); - if(result && result != CURLE_AGAIN) - return result; - if(!nread) - return CURLE_OK; - - smbc->upload_size -= nread; - smbc->send_size = nread; - smbc->sent = 0; - } - - /* Check if there is data to send */ - if(smbc->send_size) { - result = smb_flush(conn); - if(result) - return result; - } - - /* Check if there is still data to be sent */ - if(smbc->send_size || smbc->upload_size) - return CURLE_AGAIN; - - return smb_recv_message(conn, msg); -} - -static CURLcode smb_connection_state(struct connectdata *conn, bool *done) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_negotiate_response *nrsp; - struct smb_header *h; - CURLcode result; - void *msg = NULL; - - if(smbc->state == SMB_CONNECTING) { -#ifdef USE_SSL - if((conn->handler->flags & PROTOPT_SSL)) { - bool ssl_done; - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &ssl_done); - if(result && result != CURLE_AGAIN) - return result; - if(!ssl_done) - return CURLE_OK; - } -#endif - - result = smb_send_negotiate(conn); - if(result) { - connclose(conn, "SMB: failed to send negotiate message"); - return result; - } - - conn_state(conn, SMB_NEGOTIATE); - } - - /* Send the previous message and check for a response */ - result = smb_send_and_recv(conn, &msg); - if(result && result != CURLE_AGAIN) { - connclose(conn, "SMB: failed to communicate"); - return result; - } - - if(!msg) - return CURLE_OK; - - h = msg; - - switch(smbc->state) { - case SMB_NEGOTIATE: - if(h->status || smbc->got < sizeof(*nrsp) + sizeof(smbc->challenge) - 1) { - connclose(conn, "SMB: negotiation failed"); - return CURLE_COULDNT_CONNECT; - } - nrsp = msg; - memcpy(smbc->challenge, nrsp->bytes, sizeof(smbc->challenge)); - smbc->session_key = smb_swap32(nrsp->session_key); - result = smb_send_setup(conn); - if(result) { - connclose(conn, "SMB: failed to send setup message"); - return result; - } - conn_state(conn, SMB_SETUP); - break; - - case SMB_SETUP: - if(h->status) { - connclose(conn, "SMB: authentication failed"); - return CURLE_LOGIN_DENIED; - } - smbc->uid = smb_swap16(h->uid); - conn_state(conn, SMB_CONNECTED); - *done = true; - break; - - default: - smb_pop_message(conn); - return CURLE_OK; /* ignore */ - } - - smb_pop_message(conn); - - return CURLE_OK; -} - -static CURLcode smb_request_state(struct connectdata *conn, bool *done) -{ - struct smb_request *req = conn->data->req.protop; - struct smb_header *h; - struct smb_conn *smbc = &conn->proto.smbc; - enum smb_req_state next_state = SMB_DONE; - unsigned short len; - unsigned short off; - CURLcode result; - void *msg = NULL; - - /* Start the request */ - if(req->state == SMB_REQUESTING) { - result = smb_send_tree_connect(conn); - if(result) { - connclose(conn, "SMB: failed to send tree connect message"); - return result; - } - - request_state(conn, SMB_TREE_CONNECT); - } - - /* Send the previous message and check for a response */ - result = smb_send_and_recv(conn, &msg); - if(result && result != CURLE_AGAIN) { - connclose(conn, "SMB: failed to communicate"); - return result; - } - - if(!msg) - return CURLE_OK; - - h = msg; - - switch(req->state) { - case SMB_TREE_CONNECT: - if(h->status) { - req->result = CURLE_REMOTE_FILE_NOT_FOUND; - if(h->status == smb_swap32(SMB_ERR_NOACCESS)) - req->result = CURLE_REMOTE_ACCESS_DENIED; - break; - } - req->tid = smb_swap16(h->tid); - next_state = SMB_OPEN; - break; - - case SMB_OPEN: - if(h->status || smbc->got < sizeof(struct smb_nt_create_response)) { - req->result = CURLE_REMOTE_FILE_NOT_FOUND; - next_state = SMB_TREE_DISCONNECT; - break; - } - req->fid = smb_swap16(((struct smb_nt_create_response *)msg)->fid); - conn->data->req.offset = 0; - if(conn->data->set.upload) { - conn->data->req.size = conn->data->state.infilesize; - Curl_pgrsSetUploadSize(conn->data, conn->data->req.size); - next_state = SMB_UPLOAD; - } - else { - conn->data->req.size = - smb_swap64(((struct smb_nt_create_response *)msg)->end_of_file); - Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size); - next_state = SMB_DOWNLOAD; - } - break; - - case SMB_DOWNLOAD: - if(h->status || smbc->got < sizeof(struct smb_header) + 14) { - req->result = CURLE_RECV_ERROR; - next_state = SMB_CLOSE; - break; - } - len = Curl_read16_le(((const unsigned char *) msg) + - sizeof(struct smb_header) + 11); - off = Curl_read16_le(((const unsigned char *) msg) + - sizeof(struct smb_header) + 13); - if(len > 0) { - if(off + sizeof(unsigned int) + len > smbc->got) { - failf(conn->data, "Invalid input packet"); - result = CURLE_RECV_ERROR; - } - else - result = Curl_client_write(conn, CLIENTWRITE_BODY, - (char *)msg + off + sizeof(unsigned int), - len); - if(result) { - req->result = result; - next_state = SMB_CLOSE; - break; - } - } - conn->data->req.bytecount += len; - conn->data->req.offset += len; - Curl_pgrsSetDownloadCounter(conn->data, conn->data->req.bytecount); - next_state = (len < MAX_PAYLOAD_SIZE) ? SMB_CLOSE : SMB_DOWNLOAD; - break; - - case SMB_UPLOAD: - if(h->status || smbc->got < sizeof(struct smb_header) + 6) { - req->result = CURLE_UPLOAD_FAILED; - next_state = SMB_CLOSE; - break; - } - len = Curl_read16_le(((const unsigned char *) msg) + - sizeof(struct smb_header) + 5); - conn->data->req.bytecount += len; - conn->data->req.offset += len; - Curl_pgrsSetUploadCounter(conn->data, conn->data->req.bytecount); - if(conn->data->req.bytecount >= conn->data->req.size) - next_state = SMB_CLOSE; - else - next_state = SMB_UPLOAD; - break; - - case SMB_CLOSE: - /* We don't care if the close failed, proceed to tree disconnect anyway */ - next_state = SMB_TREE_DISCONNECT; - break; - - case SMB_TREE_DISCONNECT: - next_state = SMB_DONE; - break; - - default: - smb_pop_message(conn); - return CURLE_OK; /* ignore */ - } - - smb_pop_message(conn); - - switch(next_state) { - case SMB_OPEN: - result = smb_send_open(conn); - break; - - case SMB_DOWNLOAD: - result = smb_send_read(conn); - break; - - case SMB_UPLOAD: - result = smb_send_write(conn); - break; - - case SMB_CLOSE: - result = smb_send_close(conn); - break; - - case SMB_TREE_DISCONNECT: - result = smb_send_tree_disconnect(conn); - break; - - case SMB_DONE: - result = req->result; - *done = true; - break; - - default: - break; - } - - if(result) { - connclose(conn, "SMB: failed to send message"); - return result; - } - - request_state(conn, next_state); - - return CURLE_OK; -} - -static CURLcode smb_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - struct smb_request *req = conn->data->req.protop; - - (void) premature; - - Curl_safefree(req->share); - Curl_safefree(conn->data->req.protop); - - return status; -} - -static CURLcode smb_disconnect(struct connectdata *conn, bool dead) -{ - struct smb_conn *smbc = &conn->proto.smbc; - struct smb_request *req = conn->data->req.protop; - - (void) dead; - - Curl_safefree(smbc->domain); - Curl_safefree(smbc->recv_buf); - - /* smb_done is not always called, so cleanup the request */ - if(req) { - Curl_safefree(req->share); - } - - return CURLE_OK; -} - -static int smb_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - struct smb_conn *smbc = &conn->proto.smbc; - - if(!numsocks) - return GETSOCK_BLANK; - - socks[0] = conn->sock[FIRSTSOCKET]; - - if(smbc->send_size || smbc->upload_size) - return GETSOCK_WRITESOCK(0); - - return GETSOCK_READSOCK(0); -} - -static CURLcode smb_parse_url_path(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct smb_request *req = data->req.protop; - char *path; - char *slash; - - /* URL decode the path */ - result = Curl_urldecode(data, data->state.path, 0, &path, NULL, TRUE); - if(result) - return result; - - /* Parse the path for the share */ - req->share = strdup((*path == '/' || *path == '\\') ? path + 1 : path); - if(!req->share) { - free(path); - - return CURLE_OUT_OF_MEMORY; - } - - slash = strchr(req->share, '/'); - if(!slash) - slash = strchr(req->share, '\\'); - - /* The share must be present */ - if(!slash) { - free(path); - - return CURLE_URL_MALFORMAT; - } - - /* Parse the path for the file path converting any forward slashes into - backslashes */ - *slash++ = 0; - req->path = slash; - for(; *slash; slash++) { - if(*slash == '/') - *slash = '\\'; - } - - free(path); - - return CURLE_OK; -} - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* CURL_DISABLE_SMB && USE_NTLM && CURL_SIZEOF_CURL_OFF_T > 4 */ diff --git a/build/premake/premake5/contrib/curl/lib/smb.h b/build/premake/premake5/contrib/curl/lib/smb.h deleted file mode 100644 index 1a4f66e5a8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/smb.h +++ /dev/null @@ -1,271 +0,0 @@ -#ifndef HEADER_CURL_SMB_H -#define HEADER_CURL_SMB_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014, Bill Nagel , Exacq Technologies - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -enum smb_conn_state { - SMB_NOT_CONNECTED = 0, - SMB_CONNECTING, - SMB_NEGOTIATE, - SMB_SETUP, - SMB_CONNECTED -}; - -struct smb_conn { - enum smb_conn_state state; - char *user; - char *domain; - unsigned char challenge[8]; - unsigned int session_key; - unsigned short uid; - char *recv_buf; - size_t upload_size; - size_t send_size; - size_t sent; - size_t got; -}; - -/* - * Definitions for SMB protocol data structures - */ -#ifdef BUILDING_CURL_SMB_C - -#if defined(_MSC_VER) || defined(__ILEC400__) -# define PACK -# pragma pack(push) -# pragma pack(1) -#elif defined(__GNUC__) -# define PACK __attribute__((packed)) -#else -# define PACK -#endif - -#define SMB_COM_CLOSE 0x04 -#define SMB_COM_READ_ANDX 0x2e -#define SMB_COM_WRITE_ANDX 0x2f -#define SMB_COM_TREE_DISCONNECT 0x71 -#define SMB_COM_NEGOTIATE 0x72 -#define SMB_COM_SETUP_ANDX 0x73 -#define SMB_COM_TREE_CONNECT_ANDX 0x75 -#define SMB_COM_NT_CREATE_ANDX 0xa2 -#define SMB_COM_NO_ANDX_COMMAND 0xff - -#define SMB_WC_CLOSE 0x03 -#define SMB_WC_READ_ANDX 0x0c -#define SMB_WC_WRITE_ANDX 0x0e -#define SMB_WC_SETUP_ANDX 0x0d -#define SMB_WC_TREE_CONNECT_ANDX 0x04 -#define SMB_WC_NT_CREATE_ANDX 0x18 - -#define SMB_FLAGS_CANONICAL_PATHNAMES 0x10 -#define SMB_FLAGS_CASELESS_PATHNAMES 0x08 -#define SMB_FLAGS2_UNICODE_STRINGS 0x8000 -#define SMB_FLAGS2_IS_LONG_NAME 0x0040 -#define SMB_FLAGS2_KNOWS_LONG_NAME 0x0001 - -#define SMB_CAP_LARGE_FILES 0x08 -#define SMB_GENERIC_WRITE 0x40000000 -#define SMB_GENERIC_READ 0x80000000 -#define SMB_FILE_SHARE_ALL 0x07 -#define SMB_FILE_OPEN 0x01 -#define SMB_FILE_OVERWRITE_IF 0x05 - -#define SMB_ERR_NOACCESS 0x00050001 - -struct smb_header { - unsigned char nbt_type; - unsigned char nbt_flags; - unsigned short nbt_length; - unsigned char magic[4]; - unsigned char command; - unsigned int status; - unsigned char flags; - unsigned short flags2; - unsigned short pid_high; - unsigned char signature[8]; - unsigned short pad; - unsigned short tid; - unsigned short pid; - unsigned short uid; - unsigned short mid; -} PACK; - -struct smb_negotiate_response { - struct smb_header h; - unsigned char word_count; - unsigned short dialect_index; - unsigned char security_mode; - unsigned short max_mpx_count; - unsigned short max_number_vcs; - unsigned int max_buffer_size; - unsigned int max_raw_size; - unsigned int session_key; - unsigned int capabilities; - unsigned int system_time_low; - unsigned int system_time_high; - unsigned short server_time_zone; - unsigned char encryption_key_length; - unsigned short byte_count; - char bytes[1]; -} PACK; - -struct andx { - unsigned char command; - unsigned char pad; - unsigned short offset; -} PACK; - -struct smb_setup { - unsigned char word_count; - struct andx andx; - unsigned short max_buffer_size; - unsigned short max_mpx_count; - unsigned short vc_number; - unsigned int session_key; - unsigned short lengths[2]; - unsigned int pad; - unsigned int capabilities; - unsigned short byte_count; - char bytes[1024]; -} PACK; - -struct smb_tree_connect { - unsigned char word_count; - struct andx andx; - unsigned short flags; - unsigned short pw_len; - unsigned short byte_count; - char bytes[1024]; -} PACK; - -struct smb_nt_create { - unsigned char word_count; - struct andx andx; - unsigned char pad; - unsigned short name_length; - unsigned int flags; - unsigned int root_fid; - unsigned int access; -#ifdef HAVE_LONGLONG - unsigned long long allocation_size; -#else - unsigned __int64 allocation_size; -#endif - unsigned int ext_file_attributes; - unsigned int share_access; - unsigned int create_disposition; - unsigned int create_options; - unsigned int impersonation_level; - unsigned char security_flags; - unsigned short byte_count; - char bytes[1024]; -} PACK; - -struct smb_nt_create_response { - struct smb_header h; - unsigned char word_count; - struct andx andx; - unsigned char op_lock_level; - unsigned short fid; - unsigned int create_disposition; -#ifdef HAVE_LONGLONG - unsigned long long create_time; - unsigned long long last_access_time; - unsigned long long last_write_time; - unsigned long long last_change_time; -#else - unsigned __int64 create_time; - unsigned __int64 last_access_time; - unsigned __int64 last_write_time; - unsigned __int64 last_change_time; -#endif - unsigned int ext_file_attributes; -#ifdef HAVE_LONGLONG - unsigned long long allocation_size; - unsigned long long end_of_file; -#else - unsigned __int64 allocation_size; - unsigned __int64 end_of_file; -#endif -} PACK; - -struct smb_read { - unsigned char word_count; - struct andx andx; - unsigned short fid; - unsigned int offset; - unsigned short max_bytes; - unsigned short min_bytes; - unsigned int timeout; - unsigned short remaining; - unsigned int offset_high; - unsigned short byte_count; -} PACK; - -struct smb_write { - struct smb_header h; - unsigned char word_count; - struct andx andx; - unsigned short fid; - unsigned int offset; - unsigned int timeout; - unsigned short write_mode; - unsigned short remaining; - unsigned short pad; - unsigned short data_length; - unsigned short data_offset; - unsigned int offset_high; - unsigned short byte_count; - unsigned char pad2; -} PACK; - -struct smb_close { - unsigned char word_count; - unsigned short fid; - unsigned int last_mtime; - unsigned short byte_count; -} PACK; - -struct smb_tree_disconnect { - unsigned char word_count; - unsigned short byte_count; -} PACK; - -#if defined(_MSC_VER) || defined(__ILEC400__) -# pragma pack(pop) -#endif - -#endif /* BUILDING_CURL_SMB_C */ - -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) - -#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) - -extern const struct Curl_handler Curl_handler_smb; -extern const struct Curl_handler Curl_handler_smbs; - -#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ - -#endif /* CURL_DISABLE_SMB && USE_NTLM && CURL_SIZEOF_CURL_OFF_T > 4 */ - -#endif /* HEADER_CURL_SMB_H */ diff --git a/build/premake/premake5/contrib/curl/lib/smtp.c b/build/premake/premake5/contrib/curl/lib/smtp.c deleted file mode 100644 index adc346a693..0000000000 --- a/build/premake/premake5/contrib/curl/lib/smtp.c +++ /dev/null @@ -1,1673 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC1870 SMTP Service Extension for Message Size - * RFC2195 CRAM-MD5 authentication - * RFC2831 DIGEST-MD5 authentication - * RFC3207 SMTP over TLS - * RFC4422 Simple Authentication and Security Layer (SASL) - * RFC4616 PLAIN authentication - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism - * RFC4954 SMTP Authentication - * RFC5321 SMTP protocol - * RFC6749 OAuth 2.0 Authorization Framework - * Draft SMTP URL Interface - * Draft LOGIN SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_SMTP - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_UTSNAME_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -#include -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ -#include "socks.h" -#include "smtp.h" -#include "strtoofft.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "connect.h" -#include "strerror.h" -#include "select.h" -#include "multiif.h" -#include "url.h" -#include "curl_gethostname.h" -#include "curl_sasl.h" -#include "warnless.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Local API functions */ -static CURLcode smtp_regular_transfer(struct connectdata *conn, bool *done); -static CURLcode smtp_do(struct connectdata *conn, bool *done); -static CURLcode smtp_done(struct connectdata *conn, CURLcode status, - bool premature); -static CURLcode smtp_connect(struct connectdata *conn, bool *done); -static CURLcode smtp_disconnect(struct connectdata *conn, bool dead); -static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done); -static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done); -static CURLcode smtp_setup_connection(struct connectdata *conn); -static CURLcode smtp_parse_url_options(struct connectdata *conn); -static CURLcode smtp_parse_url_path(struct connectdata *conn); -static CURLcode smtp_parse_custom_request(struct connectdata *conn); -static CURLcode smtp_perform_auth(struct connectdata *conn, const char *mech, - const char *initresp); -static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp); -static void smtp_get_message(char *buffer, char **outptr); - -/* - * SMTP protocol handler. - */ - -const struct Curl_handler Curl_handler_smtp = { - "SMTP", /* scheme */ - smtp_setup_connection, /* setup_connection */ - smtp_do, /* do_it */ - smtp_done, /* done */ - ZERO_NULL, /* do_more */ - smtp_connect, /* connect_it */ - smtp_multi_statemach, /* connecting */ - smtp_doing, /* doing */ - smtp_getsock, /* proto_getsock */ - smtp_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - smtp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMTP, /* defport */ - CURLPROTO_SMTP, /* protocol */ - PROTOPT_CLOSEACTION | PROTOPT_NOURLQUERY | /* flags */ - PROTOPT_URLOPTIONS -}; - -#ifdef USE_SSL -/* - * SMTPS protocol handler. - */ - -const struct Curl_handler Curl_handler_smtps = { - "SMTPS", /* scheme */ - smtp_setup_connection, /* setup_connection */ - smtp_do, /* do_it */ - smtp_done, /* done */ - ZERO_NULL, /* do_more */ - smtp_connect, /* connect_it */ - smtp_multi_statemach, /* connecting */ - smtp_doing, /* doing */ - smtp_getsock, /* proto_getsock */ - smtp_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - smtp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMTPS, /* defport */ - CURLPROTO_SMTPS, /* protocol */ - PROTOPT_CLOSEACTION | PROTOPT_SSL - | PROTOPT_NOURLQUERY | PROTOPT_URLOPTIONS /* flags */ -}; -#endif - -#ifndef CURL_DISABLE_HTTP -/* - * HTTP-proxyed SMTP protocol handler. - */ - -static const struct Curl_handler Curl_handler_smtp_proxy = { - "SMTP", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMTP, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -#ifdef USE_SSL -/* - * HTTP-proxyed SMTPS protocol handler. - */ - -static const struct Curl_handler Curl_handler_smtps_proxy = { - "SMTPS", /* scheme */ - Curl_http_setup_conn, /* setup_connection */ - Curl_http, /* do_it */ - Curl_http_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SMTPS, /* defport */ - CURLPROTO_HTTP, /* protocol */ - PROTOPT_NONE /* flags */ -}; -#endif -#endif - -/* SASL parameters for the smtp protocol */ -static const struct SASLproto saslsmtp = { - "smtp", /* The service name */ - 334, /* Code received when continuation is expected */ - 235, /* Code to receive upon authentication success */ - 512 - 8, /* Maximum initial response length (no max) */ - smtp_perform_auth, /* Send authentication command */ - smtp_continue_auth, /* Send authentication continuation */ - smtp_get_message /* Get SASL response message */ -}; - -#ifdef USE_SSL -static void smtp_to_smtps(struct connectdata *conn) -{ - /* Change the connection handler */ - conn->handler = &Curl_handler_smtps; - - /* Set the connection's upgraded to TLS flag */ - conn->tls_upgraded = TRUE; -} -#else -#define smtp_to_smtps(x) Curl_nop_stmt -#endif - -/*********************************************************************** - * - * smtp_endofresp() - * - * Checks for an ending SMTP status code at the start of the given string, but - * also detects various capabilities from the EHLO response including the - * supported authentication mechanisms. - */ -static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len, - int *resp) -{ - struct smtp_conn *smtpc = &conn->proto.smtpc; - bool result = FALSE; - - /* Nothing for us */ - if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2])) - return FALSE; - - /* Do we have a command response? This should be the response code followed - by a space and optionally some text as per RFC-5321 and as outlined in - Section 4. Examples of RFC-4954 but some e-mail servers ignore this and - only send the response code instead as per Section 4.2. */ - if(line[3] == ' ' || len == 5) { - result = TRUE; - *resp = curlx_sltosi(strtol(line, NULL, 10)); - - /* Make sure real server never sends internal value */ - if(*resp == 1) - *resp = 0; - } - /* Do we have a multiline (continuation) response? */ - else if(line[3] == '-' && - (smtpc->state == SMTP_EHLO || smtpc->state == SMTP_COMMAND)) { - result = TRUE; - *resp = 1; /* Internal response code */ - } - - return result; -} - -/*********************************************************************** - * - * smtp_get_message() - * - * Gets the authentication message from the response buffer. - */ -static void smtp_get_message(char *buffer, char **outptr) -{ - size_t len = 0; - char *message = NULL; - - /* Find the start of the message */ - for(message = buffer + 4; *message == ' ' || *message == '\t'; message++) - ; - - /* Find the end of the message */ - for(len = strlen(message); len--;) - if(message[len] != '\r' && message[len] != '\n' && message[len] != ' ' && - message[len] != '\t') - break; - - /* Terminate the message */ - if(++len) { - message[len] = '\0'; - } - - *outptr = message; -} - -/*********************************************************************** - * - * state() - * - * This is the ONLY way to change SMTP state! - */ -static void state(struct connectdata *conn, smtpstate newstate) -{ - struct smtp_conn *smtpc = &conn->proto.smtpc; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* for debug purposes */ - static const char * const names[] = { - "STOP", - "SERVERGREET", - "EHLO", - "HELO", - "STARTTLS", - "UPGRADETLS", - "AUTH", - "COMMAND", - "MAIL", - "RCPT", - "DATA", - "POSTDATA", - "QUIT", - /* LAST */ - }; - - if(smtpc->state != newstate) - infof(conn->data, "SMTP %p state change from %s to %s\n", - (void *)smtpc, names[smtpc->state], names[newstate]); -#endif - - smtpc->state = newstate; -} - -/*********************************************************************** - * - * smtp_perform_ehlo() - * - * Sends the EHLO command to not only initialise communication with the ESMTP - * server but to also obtain a list of server side supported capabilities. - */ -static CURLcode smtp_perform_ehlo(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - - smtpc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanism yet */ - smtpc->sasl.authused = SASL_AUTH_NONE; /* Clear the authentication mechanism - used for esmtp connections */ - smtpc->tls_supported = FALSE; /* Clear the TLS capability */ - smtpc->auth_supported = FALSE; /* Clear the AUTH capability */ - - /* Send the EHLO command */ - result = Curl_pp_sendf(&smtpc->pp, "EHLO %s", smtpc->domain); - - if(!result) - state(conn, SMTP_EHLO); - - return result; -} - -/*********************************************************************** - * - * smtp_perform_helo() - * - * Sends the HELO command to initialise communication with the SMTP server. - */ -static CURLcode smtp_perform_helo(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - - smtpc->sasl.authused = SASL_AUTH_NONE; /* No authentication mechanism used - in smtp connections */ - - /* Send the HELO command */ - result = Curl_pp_sendf(&smtpc->pp, "HELO %s", smtpc->domain); - - if(!result) - state(conn, SMTP_HELO); - - return result; -} - -/*********************************************************************** - * - * smtp_perform_starttls() - * - * Sends the STLS command to start the upgrade to TLS. - */ -static CURLcode smtp_perform_starttls(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Send the STARTTLS command */ - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "STARTTLS"); - - if(!result) - state(conn, SMTP_STARTTLS); - - return result; -} - -/*********************************************************************** - * - * smtp_perform_upgrade_tls() - * - * Performs the upgrade to TLS. - */ -static CURLcode smtp_perform_upgrade_tls(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - - /* Start the SSL connection */ - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone); - - if(!result) { - if(smtpc->state != SMTP_UPGRADETLS) - state(conn, SMTP_UPGRADETLS); - - if(smtpc->ssldone) { - smtp_to_smtps(conn); - result = smtp_perform_ehlo(conn); - } - } - - return result; -} - -/*********************************************************************** - * - * smtp_perform_auth() - * - * Sends an AUTH command allowing the client to login with the given SASL - * authentication mechanism. - */ -static CURLcode smtp_perform_auth(struct connectdata *conn, - const char *mech, - const char *initresp) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - - if(initresp) { /* AUTH ... */ - /* Send the AUTH command with the initial response */ - result = Curl_pp_sendf(&smtpc->pp, "AUTH %s %s", mech, initresp); - } - else { - /* Send the AUTH command */ - result = Curl_pp_sendf(&smtpc->pp, "AUTH %s", mech); - } - - return result; -} - -/*********************************************************************** - * - * smtp_continue_auth() - * - * Sends SASL continuation data or cancellation. - */ -static CURLcode smtp_continue_auth(struct connectdata *conn, const char *resp) -{ - struct smtp_conn *smtpc = &conn->proto.smtpc; - - return Curl_pp_sendf(&smtpc->pp, "%s", resp); -} - -/*********************************************************************** - * - * smtp_perform_authentication() - * - * Initiates the authentication sequence, with the appropriate SASL - * authentication mechanism. - */ -static CURLcode smtp_perform_authentication(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - saslprogress progress; - - /* Check we have enough data to authenticate with, and the - server supports authentiation, and end the connect phase if not */ - if(!smtpc->auth_supported || - !Curl_sasl_can_authenticate(&smtpc->sasl, conn)) { - state(conn, SMTP_STOP); - return result; - } - - /* Calculate the SASL login details */ - result = Curl_sasl_start(&smtpc->sasl, conn, FALSE, &progress); - - if(!result) { - if(progress == SASL_INPROGRESS) - state(conn, SMTP_AUTH); - else { - /* Other mechanisms not supported */ - infof(conn->data, "No known authentication mechanisms supported!\n"); - result = CURLE_LOGIN_DENIED; - } - } - - return result; -} - -/*********************************************************************** - * - * smtp_perform_command() - * - * Sends a SMTP based command. - */ -static CURLcode smtp_perform_command(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - - /* Send the command */ - if(smtp->rcpt) - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s %s", - smtp->custom && smtp->custom[0] != '\0' ? - smtp->custom : "VRFY", - smtp->rcpt->data); - else - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", - smtp->custom && smtp->custom[0] != '\0' ? - smtp->custom : "HELP"); - - if(!result) - state(conn, SMTP_COMMAND); - - return result; -} - -/*********************************************************************** - * - * smtp_perform_mail() - * - * Sends an MAIL command to initiate the upload of a message. - */ -static CURLcode smtp_perform_mail(struct connectdata *conn) -{ - char *from = NULL; - char *auth = NULL; - char *size = NULL; - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - /* Calculate the FROM parameter */ - if(!data->set.str[STRING_MAIL_FROM]) - /* Null reverse-path, RFC-5321, sect. 3.6.3 */ - from = strdup("<>"); - else if(data->set.str[STRING_MAIL_FROM][0] == '<') - from = aprintf("%s", data->set.str[STRING_MAIL_FROM]); - else - from = aprintf("<%s>", data->set.str[STRING_MAIL_FROM]); - - if(!from) - return CURLE_OUT_OF_MEMORY; - - /* Calculate the optional AUTH parameter */ - if(data->set.str[STRING_MAIL_AUTH] && conn->proto.smtpc.sasl.authused) { - if(data->set.str[STRING_MAIL_AUTH][0] != '\0') - auth = aprintf("%s", data->set.str[STRING_MAIL_AUTH]); - else - /* Empty AUTH, RFC-2554, sect. 5 */ - auth = strdup("<>"); - - if(!auth) { - free(from); - - return CURLE_OUT_OF_MEMORY; - } - } - - /* Calculate the optional SIZE parameter */ - if(conn->proto.smtpc.size_supported && conn->data->state.infilesize > 0) { - size = aprintf("%" CURL_FORMAT_CURL_OFF_T, data->state.infilesize); - - if(!size) { - free(from); - free(auth); - - return CURLE_OUT_OF_MEMORY; - } - } - - /* Send the MAIL command */ - if(!auth && !size) - result = Curl_pp_sendf(&conn->proto.smtpc.pp, - "MAIL FROM:%s", from); - else if(auth && !size) - result = Curl_pp_sendf(&conn->proto.smtpc.pp, - "MAIL FROM:%s AUTH=%s", from, auth); - else if(auth && size) - result = Curl_pp_sendf(&conn->proto.smtpc.pp, - "MAIL FROM:%s AUTH=%s SIZE=%s", from, auth, size); - else - result = Curl_pp_sendf(&conn->proto.smtpc.pp, - "MAIL FROM:%s SIZE=%s", from, size); - - free(from); - free(auth); - free(size); - - if(!result) - state(conn, SMTP_MAIL); - - return result; -} - -/*********************************************************************** - * - * smtp_perform_rcpt_to() - * - * Sends a RCPT TO command for a given recipient as part of the message upload - * process. - */ -static CURLcode smtp_perform_rcpt_to(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - - /* Send the RCPT TO command */ - if(smtp->rcpt->data[0] == '<') - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s", - smtp->rcpt->data); - else - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>", - smtp->rcpt->data); - if(!result) - state(conn, SMTP_RCPT); - - return result; -} - -/*********************************************************************** - * - * smtp_perform_quit() - * - * Performs the quit action prior to sclose() being called. - */ -static CURLcode smtp_perform_quit(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - - /* Send the QUIT command */ - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "QUIT"); - - if(!result) - state(conn, SMTP_QUIT); - - return result; -} - -/* For the initial server greeting */ -static CURLcode smtp_state_servergreet_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(smtpcode/100 != 2) { - failf(data, "Got unexpected smtp-server response: %d", smtpcode); - result = CURLE_WEIRD_SERVER_REPLY; - } - else - result = smtp_perform_ehlo(conn); - - return result; -} - -/* For STARTTLS responses */ -static CURLcode smtp_state_starttls_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(smtpcode != 220) { - if(data->set.use_ssl != CURLUSESSL_TRY) { - failf(data, "STARTTLS denied, code %d", smtpcode); - result = CURLE_USE_SSL_FAILED; - } - else - result = smtp_perform_authentication(conn); - } - else - result = smtp_perform_upgrade_tls(conn); - - return result; -} - -/* For EHLO responses */ -static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct smtp_conn *smtpc = &conn->proto.smtpc; - const char *line = data->state.buffer; - size_t len = strlen(line); - size_t wordlen; - - (void)instate; /* no use for this yet */ - - if(smtpcode/100 != 2 && smtpcode != 1) { - if(data->set.use_ssl <= CURLUSESSL_TRY || conn->ssl[FIRSTSOCKET].use) - result = smtp_perform_helo(conn); - else { - failf(data, "Remote access denied: %d", smtpcode); - result = CURLE_REMOTE_ACCESS_DENIED; - } - } - else { - line += 4; - len -= 4; - - /* Does the server support the STARTTLS capability? */ - if(len >= 8 && !memcmp(line, "STARTTLS", 8)) - smtpc->tls_supported = TRUE; - - /* Does the server support the SIZE capability? */ - else if(len >= 4 && !memcmp(line, "SIZE", 4)) - smtpc->size_supported = TRUE; - - /* Does the server support authentication? */ - else if(len >= 5 && !memcmp(line, "AUTH ", 5)) { - smtpc->auth_supported = TRUE; - - /* Advance past the AUTH keyword */ - line += 5; - len -= 5; - - /* Loop through the data line */ - for(;;) { - size_t llen; - unsigned int mechbit; - - while(len && - (*line == ' ' || *line == '\t' || - *line == '\r' || *line == '\n')) { - - line++; - len--; - } - - if(!len) - break; - - /* Extract the word */ - for(wordlen = 0; wordlen < len && line[wordlen] != ' ' && - line[wordlen] != '\t' && line[wordlen] != '\r' && - line[wordlen] != '\n';) - wordlen++; - - /* Test the word for a matching authentication mechanism */ - mechbit = Curl_sasl_decode_mech(line, wordlen, &llen); - if(mechbit && llen == wordlen) - smtpc->sasl.authmechs |= mechbit; - - line += wordlen; - len -= wordlen; - } - } - - if(smtpcode != 1) { - if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) { - /* We don't have a SSL/TLS connection yet, but SSL is requested */ - if(smtpc->tls_supported) - /* Switch to TLS connection now */ - result = smtp_perform_starttls(conn); - else if(data->set.use_ssl == CURLUSESSL_TRY) - /* Fallback and carry on with authentication */ - result = smtp_perform_authentication(conn); - else { - failf(data, "STARTTLS not supported."); - result = CURLE_USE_SSL_FAILED; - } - } - else - result = smtp_perform_authentication(conn); - } - } - - return result; -} - -/* For HELO responses */ -static CURLcode smtp_state_helo_resp(struct connectdata *conn, int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(smtpcode/100 != 2) { - failf(data, "Remote access denied: %d", smtpcode); - result = CURLE_REMOTE_ACCESS_DENIED; - } - else - /* End of connect phase */ - state(conn, SMTP_STOP); - - return result; -} - -/* For SASL authentication responses */ -static CURLcode smtp_state_auth_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct smtp_conn *smtpc = &conn->proto.smtpc; - saslprogress progress; - - (void)instate; /* no use for this yet */ - - result = Curl_sasl_continue(&smtpc->sasl, conn, smtpcode, &progress); - if(!result) - switch(progress) { - case SASL_DONE: - state(conn, SMTP_STOP); /* Authenticated */ - break; - case SASL_IDLE: /* No mechanism left after cancellation */ - failf(data, "Authentication cancelled"); - result = CURLE_LOGIN_DENIED; - break; - default: - break; - } - - return result; -} - -/* For command responses */ -static CURLcode smtp_state_command_resp(struct connectdata *conn, int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - char *line = data->state.buffer; - size_t len = strlen(line); - - (void)instate; /* no use for this yet */ - - if((smtp->rcpt && smtpcode/100 != 2 && smtpcode != 553 && smtpcode != 1) || - (!smtp->rcpt && smtpcode/100 != 2 && smtpcode != 1)) { - failf(data, "Command failed: %d", smtpcode); - result = CURLE_RECV_ERROR; - } - else { - /* Temporarily add the LF character back and send as body to the client */ - if(!data->set.opt_no_body) { - line[len] = '\n'; - result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1); - line[len] = '\0'; - } - - if(smtpcode != 1) { - if(smtp->rcpt) { - smtp->rcpt = smtp->rcpt->next; - - if(smtp->rcpt) { - /* Send the next command */ - result = smtp_perform_command(conn); - } - else - /* End of DO phase */ - state(conn, SMTP_STOP); - } - else - /* End of DO phase */ - state(conn, SMTP_STOP); - } - } - - return result; -} - -/* For MAIL responses */ -static CURLcode smtp_state_mail_resp(struct connectdata *conn, int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(smtpcode/100 != 2) { - failf(data, "MAIL failed: %d", smtpcode); - result = CURLE_SEND_ERROR; - } - else - /* Start the RCPT TO command */ - result = smtp_perform_rcpt_to(conn); - - return result; -} - -/* For RCPT responses */ -static CURLcode smtp_state_rcpt_resp(struct connectdata *conn, int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - - (void)instate; /* no use for this yet */ - - if(smtpcode/100 != 2) { - failf(data, "RCPT failed: %d", smtpcode); - result = CURLE_SEND_ERROR; - } - else { - smtp->rcpt = smtp->rcpt->next; - - if(smtp->rcpt) - /* Send the next RCPT TO command */ - result = smtp_perform_rcpt_to(conn); - else { - /* Send the DATA command */ - result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "DATA"); - - if(!result) - state(conn, SMTP_DATA); - } - } - - return result; -} - -/* For DATA response */ -static CURLcode smtp_state_data_resp(struct connectdata *conn, int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - (void)instate; /* no use for this yet */ - - if(smtpcode != 354) { - failf(data, "DATA failed: %d", smtpcode); - result = CURLE_SEND_ERROR; - } - else { - /* Set the progress upload size */ - Curl_pgrsSetUploadSize(data, data->state.infilesize); - - /* SMTP upload */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL); - - /* End of DO phase */ - state(conn, SMTP_STOP); - } - - return result; -} - -/* For POSTDATA responses, which are received after the entire DATA - part has been sent to the server */ -static CURLcode smtp_state_postdata_resp(struct connectdata *conn, - int smtpcode, - smtpstate instate) -{ - CURLcode result = CURLE_OK; - - (void)instate; /* no use for this yet */ - - if(smtpcode != 250) - result = CURLE_RECV_ERROR; - - /* End of DONE phase */ - state(conn, SMTP_STOP); - - return result; -} - -static CURLcode smtp_statemach_act(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - struct Curl_easy *data = conn->data; - int smtpcode; - struct smtp_conn *smtpc = &conn->proto.smtpc; - struct pingpong *pp = &smtpc->pp; - size_t nread = 0; - - /* Busy upgrading the connection; right now all I/O is SSL/TLS, not SMTP */ - if(smtpc->state == SMTP_UPGRADETLS) - return smtp_perform_upgrade_tls(conn); - - /* Flush any data that needs to be sent */ - if(pp->sendleft) - return Curl_pp_flushsend(pp); - - do { - /* Read the response from the server */ - result = Curl_pp_readresp(sock, pp, &smtpcode, &nread); - if(result) - return result; - - /* Store the latest response for later retrieval if necessary */ - if(smtpc->state != SMTP_QUIT && smtpcode != 1) - data->info.httpcode = smtpcode; - - if(!smtpcode) - break; - - /* We have now received a full SMTP server response */ - switch(smtpc->state) { - case SMTP_SERVERGREET: - result = smtp_state_servergreet_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_EHLO: - result = smtp_state_ehlo_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_HELO: - result = smtp_state_helo_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_STARTTLS: - result = smtp_state_starttls_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_AUTH: - result = smtp_state_auth_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_COMMAND: - result = smtp_state_command_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_MAIL: - result = smtp_state_mail_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_RCPT: - result = smtp_state_rcpt_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_DATA: - result = smtp_state_data_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_POSTDATA: - result = smtp_state_postdata_resp(conn, smtpcode, smtpc->state); - break; - - case SMTP_QUIT: - /* fallthrough, just stop! */ - default: - /* internal error */ - state(conn, SMTP_STOP); - break; - } - } while(!result && smtpc->state != SMTP_STOP && Curl_pp_moredata(pp)); - - return result; -} - -/* Called repeatedly until done from multi.c */ -static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - - if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone) { - result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone); - if(result || !smtpc->ssldone) - return result; - } - - result = Curl_pp_statemach(&smtpc->pp, FALSE); - *done = (smtpc->state == SMTP_STOP) ? TRUE : FALSE; - - return result; -} - -static CURLcode smtp_block_statemach(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - - while(smtpc->state != SMTP_STOP && !result) - result = Curl_pp_statemach(&smtpc->pp, TRUE); - - return result; -} - -/* Allocate and initialize the SMTP struct for the current Curl_easy if - required */ -static CURLcode smtp_init(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp; - - smtp = data->req.protop = calloc(sizeof(struct SMTP), 1); - if(!smtp) - result = CURLE_OUT_OF_MEMORY; - - return result; -} - -/* For the SMTP "protocol connect" and "doing" phases only */ -static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks); -} - -/*********************************************************************** - * - * smtp_connect() - * - * This function should do everything that is to be considered a part of - * the connection phase. - * - * The variable pointed to by 'done' will be TRUE if the protocol-layer - * connect phase is done when this function returns, or FALSE if not. - */ -static CURLcode smtp_connect(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - struct pingpong *pp = &smtpc->pp; - - *done = FALSE; /* default to not done yet */ - - /* We always support persistent connections in SMTP */ - connkeep(conn, "SMTP default"); - - /* Set the default response time-out */ - pp->response_time = RESP_TIMEOUT; - pp->statemach_act = smtp_statemach_act; - pp->endofresp = smtp_endofresp; - pp->conn = conn; - - /* Initialize the SASL storage */ - Curl_sasl_init(&smtpc->sasl, &saslsmtp); - - /* Initialise the pingpong layer */ - Curl_pp_init(pp); - - /* Parse the URL options */ - result = smtp_parse_url_options(conn); - if(result) - return result; - - /* Parse the URL path */ - result = smtp_parse_url_path(conn); - if(result) - return result; - - /* Start off waiting for the server greeting response */ - state(conn, SMTP_SERVERGREET); - - result = smtp_multi_statemach(conn, done); - - return result; -} - -/*********************************************************************** - * - * smtp_done() - * - * The DONE function. This does what needs to be done after a single DO has - * performed. - * - * Input argument is already checked for validity. - */ -static CURLcode smtp_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - struct pingpong *pp = &conn->proto.smtpc.pp; - char *eob; - ssize_t len; - ssize_t bytes_written; - - (void)premature; - - if(!smtp || !pp->conn) - return CURLE_OK; - - if(status) { - connclose(conn, "SMTP done with bad status"); /* marked for closure */ - result = status; /* use the already set error code */ - } - else if(!data->set.connect_only && data->set.upload && data->set.mail_rcpt) { - /* Calculate the EOB taking into account any terminating CRLF from the - previous line of the email or the CRLF of the DATA command when there - is "no mail data". RFC-5321, sect. 4.1.1.4. - - Note: As some SSL backends, such as OpenSSL, will cause Curl_write() to - fail when using a different pointer following a previous write, that - returned CURLE_AGAIN, we duplicate the EOB now rather than when the - bytes written doesn't equal len. */ - if(smtp->trailing_crlf || !conn->data->state.infilesize) { - eob = strdup(SMTP_EOB + 2); - len = SMTP_EOB_LEN - 2; - } - else { - eob = strdup(SMTP_EOB); - len = SMTP_EOB_LEN; - } - - if(!eob) - return CURLE_OUT_OF_MEMORY; - - /* Send the end of block data */ - result = Curl_write(conn, conn->writesockfd, eob, len, &bytes_written); - if(result) { - free(eob); - return result; - } - - if(bytes_written != len) { - /* The whole chunk was not sent so keep it around and adjust the - pingpong structure accordingly */ - pp->sendthis = eob; - pp->sendsize = len; - pp->sendleft = len - bytes_written; - } - else { - /* Successfully sent so adjust the response timeout relative to now */ - pp->response = Curl_tvnow(); - - free(eob); - } - - state(conn, SMTP_POSTDATA); - - /* Run the state-machine - - TODO: when the multi interface is used, this _really_ should be using - the smtp_multi_statemach function but we have no general support for - non-blocking DONE operations! - */ - result = smtp_block_statemach(conn); - } - - /* Cleanup our per-request based variables */ - Curl_safefree(smtp->custom); - - /* Clear the transfer mode for the next request */ - smtp->transfer = FTPTRANSFER_BODY; - - return result; -} - -/*********************************************************************** - * - * smtp_perform() - * - * This is the actual DO function for SMTP. Transfer a mail, send a command - * or get some data according to the options previously setup. - */ -static CURLcode smtp_perform(struct connectdata *conn, bool *connected, - bool *dophase_done) -{ - /* This is SMTP and no proxy */ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - - DEBUGF(infof(conn->data, "DO phase starts\n")); - - if(data->set.opt_no_body) { - /* Requested no body means no transfer */ - smtp->transfer = FTPTRANSFER_INFO; - } - - *dophase_done = FALSE; /* not done yet */ - - /* Store the first recipient (or NULL if not specified) */ - smtp->rcpt = data->set.mail_rcpt; - - /* Start the first command in the DO phase */ - if(data->set.upload && data->set.mail_rcpt) - /* MAIL transfer */ - result = smtp_perform_mail(conn); - else - /* SMTP based command (VRFY, EXPN, NOOP, RSET or HELP) */ - result = smtp_perform_command(conn); - - if(result) - return result; - - /* Run the state-machine */ - result = smtp_multi_statemach(conn, dophase_done); - - *connected = conn->bits.tcpconnect[FIRSTSOCKET]; - - if(*dophase_done) - DEBUGF(infof(conn->data, "DO phase is complete\n")); - - return result; -} - -/*********************************************************************** - * - * smtp_do() - * - * This function is registered as 'curl_do' function. It decodes the path - * parts etc as a wrapper to the actual DO function (smtp_perform). - * - * The input argument is already checked for validity. - */ -static CURLcode smtp_do(struct connectdata *conn, bool *done) -{ - CURLcode result = CURLE_OK; - - *done = FALSE; /* default to false */ - - /* Parse the custom request */ - result = smtp_parse_custom_request(conn); - if(result) - return result; - - result = smtp_regular_transfer(conn, done); - - return result; -} - -/*********************************************************************** - * - * smtp_disconnect() - * - * Disconnect from an SMTP server. Cleanup protocol-specific per-connection - * resources. BLOCKING. - */ -static CURLcode smtp_disconnect(struct connectdata *conn, bool dead_connection) -{ - struct smtp_conn *smtpc = &conn->proto.smtpc; - - /* We cannot send quit unconditionally. If this connection is stale or - bad in any way, sending quit and waiting around here will make the - disconnect wait in vain and cause more problems than we need to. */ - - /* The SMTP session may or may not have been allocated/setup at this - point! */ - if(!dead_connection && smtpc->pp.conn && smtpc->pp.conn->bits.protoconnstart) - if(!smtp_perform_quit(conn)) - (void)smtp_block_statemach(conn); /* ignore errors on QUIT */ - - /* Disconnect from the server */ - Curl_pp_disconnect(&smtpc->pp); - - /* Cleanup the SASL module */ - Curl_sasl_cleanup(conn, smtpc->sasl.authused); - - /* Cleanup our connection based variables */ - Curl_safefree(smtpc->domain); - - return CURLE_OK; -} - -/* Call this when the DO phase has completed */ -static CURLcode smtp_dophase_done(struct connectdata *conn, bool connected) -{ - struct SMTP *smtp = conn->data->req.protop; - - (void)connected; - - if(smtp->transfer != FTPTRANSFER_BODY) - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - - return CURLE_OK; -} - -/* Called from multi.c while DOing */ -static CURLcode smtp_doing(struct connectdata *conn, bool *dophase_done) -{ - CURLcode result = smtp_multi_statemach(conn, dophase_done); - - if(result) - DEBUGF(infof(conn->data, "DO phase failed\n")); - else if(*dophase_done) { - result = smtp_dophase_done(conn, FALSE /* not connected */); - - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - - return result; -} - -/*********************************************************************** - * - * smtp_regular_transfer() - * - * The input argument is already checked for validity. - * - * Performs all commands done before a regular transfer between a local and a - * remote host. - */ -static CURLcode smtp_regular_transfer(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result = CURLE_OK; - bool connected = FALSE; - struct Curl_easy *data = conn->data; - - /* Make sure size is unknown at this point */ - data->req.size = -1; - - /* Set the progress data */ - Curl_pgrsSetUploadCounter(data, 0); - Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); - - /* Carry out the perform */ - result = smtp_perform(conn, &connected, dophase_done); - - /* Perform post DO phase operations if necessary */ - if(!result && *dophase_done) - result = smtp_dophase_done(conn, connected); - - return result; -} - -static CURLcode smtp_setup_connection(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - CURLcode result; - - /* Clear the TLS upgraded flag */ - conn->tls_upgraded = FALSE; - - /* Set up the proxy if necessary */ - if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { - /* Unless we have asked to tunnel SMTP operations through the proxy, we - switch and use HTTP operations only */ -#ifndef CURL_DISABLE_HTTP - if(conn->handler == &Curl_handler_smtp) - conn->handler = &Curl_handler_smtp_proxy; - else { -#ifdef USE_SSL - conn->handler = &Curl_handler_smtps_proxy; -#else - failf(data, "SMTPS not supported!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - /* set it up as a HTTP connection instead */ - return conn->handler->setup_connection(conn); - -#else - failf(data, "SMTP over http proxy requires HTTP support built-in!"); - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - } - - /* Initialise the SMTP layer */ - result = smtp_init(conn); - if(result) - return result; - - data->state.path++; /* don't include the initial slash */ - - return CURLE_OK; -} - -/*********************************************************************** - * - * smtp_parse_url_options() - * - * Parse the URL login options. - */ -static CURLcode smtp_parse_url_options(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct smtp_conn *smtpc = &conn->proto.smtpc; - const char *ptr = conn->options; - - smtpc->sasl.resetprefs = TRUE; - - while(!result && ptr && *ptr) { - const char *key = ptr; - const char *value; - - while(*ptr && *ptr != '=') - ptr++; - - value = ptr + 1; - - while(*ptr && *ptr != ';') - ptr++; - - if(strncasecompare(key, "AUTH=", 5)) - result = Curl_sasl_parse_url_auth_option(&smtpc->sasl, - value, ptr - value); - else - result = CURLE_URL_MALFORMAT; - - if(*ptr == ';') - ptr++; - } - - return result; -} - -/*********************************************************************** - * - * smtp_parse_url_path() - * - * Parse the URL path into separate path components. - */ -static CURLcode smtp_parse_url_path(struct connectdata *conn) -{ - /* The SMTP struct is already initialised in smtp_connect() */ - struct Curl_easy *data = conn->data; - struct smtp_conn *smtpc = &conn->proto.smtpc; - const char *path = data->state.path; - char localhost[HOSTNAME_MAX + 1]; - - /* Calculate the path if necessary */ - if(!*path) { - if(!Curl_gethostname(localhost, sizeof(localhost))) - path = localhost; - else - path = "localhost"; - } - - /* URL decode the path and use it as the domain in our EHLO */ - return Curl_urldecode(conn->data, path, 0, &smtpc->domain, NULL, TRUE); -} - -/*********************************************************************** - * - * smtp_parse_custom_request() - * - * Parse the custom request. - */ -static CURLcode smtp_parse_custom_request(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - const char *custom = data->set.str[STRING_CUSTOMREQUEST]; - - /* URL decode the custom request */ - if(custom) - result = Curl_urldecode(data, custom, 0, &smtp->custom, NULL, TRUE); - - return result; -} - -CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) -{ - /* When sending a SMTP payload we must detect CRLF. sequences making sure - they are sent as CRLF.. instead, as a . on the beginning of a line will - be deleted by the server when not part of an EOB terminator and a - genuine CRLF.CRLF which isn't escaped will wrongly be detected as end of - data by the server - */ - ssize_t i; - ssize_t si; - struct Curl_easy *data = conn->data; - struct SMTP *smtp = data->req.protop; - char *scratch = data->state.scratch; - char *newscratch = NULL; - char *oldscratch = NULL; - size_t eob_sent; - - /* Do we need to allocate a scratch buffer? */ - if(!scratch || data->set.crlf) { - oldscratch = scratch; - - scratch = newscratch = malloc(2 * BUFSIZE); - if(!newscratch) { - failf(data, "Failed to alloc scratch buffer!"); - - return CURLE_OUT_OF_MEMORY; - } - } - - /* Have we already sent part of the EOB? */ - eob_sent = smtp->eob; - - /* This loop can be improved by some kind of Boyer-Moore style of - approach but that is saved for later... */ - for(i = 0, si = 0; i < nread; i++) { - if(SMTP_EOB[smtp->eob] == data->req.upload_fromhere[i]) { - smtp->eob++; - - /* Is the EOB potentially the terminating CRLF? */ - if(2 == smtp->eob || SMTP_EOB_LEN == smtp->eob) - smtp->trailing_crlf = TRUE; - else - smtp->trailing_crlf = FALSE; - } - else if(smtp->eob) { - /* A previous substring matched so output that first */ - memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent); - si += smtp->eob - eob_sent; - - /* Then compare the first byte */ - if(SMTP_EOB[0] == data->req.upload_fromhere[i]) - smtp->eob = 1; - else - smtp->eob = 0; - - eob_sent = 0; - - /* Reset the trailing CRLF flag as there was more data */ - smtp->trailing_crlf = FALSE; - } - - /* Do we have a match for CRLF. as per RFC-5321, sect. 4.5.2 */ - if(SMTP_EOB_FIND_LEN == smtp->eob) { - /* Copy the replacement data to the target buffer */ - memcpy(&scratch[si], &SMTP_EOB_REPL[eob_sent], - SMTP_EOB_REPL_LEN - eob_sent); - si += SMTP_EOB_REPL_LEN - eob_sent; - smtp->eob = 0; - eob_sent = 0; - } - else if(!smtp->eob) - scratch[si++] = data->req.upload_fromhere[i]; - } - - if(smtp->eob - eob_sent) { - /* A substring matched before processing ended so output that now */ - memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent); - si += smtp->eob - eob_sent; - } - - /* Only use the new buffer if we replaced something */ - if(si != nread) { - /* Upload from the new (replaced) buffer instead */ - data->req.upload_fromhere = scratch; - - /* Save the buffer so it can be freed later */ - data->state.scratch = scratch; - - /* Free the old scratch buffer */ - free(oldscratch); - - /* Set the new amount too */ - data->req.upload_present = si; - } - else - free(newscratch); - - return CURLE_OK; -} - -#endif /* CURL_DISABLE_SMTP */ diff --git a/build/premake/premake5/contrib/curl/lib/smtp.h b/build/premake/premake5/contrib/curl/lib/smtp.h deleted file mode 100644 index b67340a40c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/smtp.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef HEADER_CURL_SMTP_H -#define HEADER_CURL_SMTP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2009 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "pingpong.h" -#include "curl_sasl.h" - -/**************************************************************************** - * SMTP unique setup - ***************************************************************************/ -typedef enum { - SMTP_STOP, /* do nothing state, stops the state machine */ - SMTP_SERVERGREET, /* waiting for the initial greeting immediately after - a connect */ - SMTP_EHLO, - SMTP_HELO, - SMTP_STARTTLS, - SMTP_UPGRADETLS, /* asynchronously upgrade the connection to SSL/TLS - (multi mode only) */ - SMTP_AUTH, - SMTP_COMMAND, /* VRFY, EXPN, NOOP, RSET and HELP */ - SMTP_MAIL, /* MAIL FROM */ - SMTP_RCPT, /* RCPT TO */ - SMTP_DATA, - SMTP_POSTDATA, - SMTP_QUIT, - SMTP_LAST /* never used */ -} smtpstate; - -/* This SMTP struct is used in the Curl_easy. All SMTP data that is - connection-oriented must be in smtp_conn to properly deal with the fact that - perhaps the Curl_easy is changed between the times the connection is - used. */ -struct SMTP { - curl_pp_transfer transfer; - char *custom; /* Custom Request */ - struct curl_slist *rcpt; /* Recipient list */ - size_t eob; /* Number of bytes of the EOB (End Of Body) that - have been received so far */ - bool trailing_crlf; /* Specifies if the tailing CRLF is present */ -}; - -/* smtp_conn is used for struct connection-oriented data in the connectdata - struct */ -struct smtp_conn { - struct pingpong pp; - smtpstate state; /* Always use smtp.c:state() to change state! */ - bool ssldone; /* Is connect() over SSL done? */ - char *domain; /* Client address/name to send in the EHLO */ - struct SASL sasl; /* SASL-related storage */ - bool tls_supported; /* StartTLS capability supported by server */ - bool size_supported; /* If server supports SIZE extension according to - RFC 1870 */ - bool auth_supported; /* AUTH capability supported by server */ -}; - -extern const struct Curl_handler Curl_handler_smtp; -extern const struct Curl_handler Curl_handler_smtps; - -/* this is the 5-bytes End-Of-Body marker for SMTP */ -#define SMTP_EOB "\x0d\x0a\x2e\x0d\x0a" -#define SMTP_EOB_LEN 5 -#define SMTP_EOB_FIND_LEN 3 - -/* if found in data, replace it with this string instead */ -#define SMTP_EOB_REPL "\x0d\x0a\x2e\x2e" -#define SMTP_EOB_REPL_LEN 4 - -CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread); - -#endif /* HEADER_CURL_SMTP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/sockaddr.h b/build/premake/premake5/contrib/curl/lib/sockaddr.h deleted file mode 100644 index 95ba4c3c97..0000000000 --- a/build/premake/premake5/contrib/curl/lib/sockaddr.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef HEADER_CURL_SOCKADDR_H -#define HEADER_CURL_SOCKADDR_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -struct Curl_sockaddr_storage { - union { - struct sockaddr sa; - struct sockaddr_in sa_in; -#ifdef ENABLE_IPV6 - struct sockaddr_in6 sa_in6; -#endif -#ifdef HAVE_STRUCT_SOCKADDR_STORAGE - struct sockaddr_storage sa_stor; -#else - char cbuf[256]; /* this should be big enough to fit a lot */ -#endif - } buffer; -}; - -#endif /* HEADER_CURL_SOCKADDR_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/socks.c b/build/premake/premake5/contrib/curl/lib/socks.c deleted file mode 100644 index 774fb20b0f..0000000000 --- a/build/premake/premake5/contrib/curl/lib/socks.c +++ /dev/null @@ -1,784 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_PROXY) - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "select.h" -#include "connect.h" -#include "timeval.h" -#include "socks.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -/* - * Helper read-from-socket functions. Does the same as Curl_read() but it - * blocks until all bytes amount of buffersize will be read. No more, no less. - * - * This is STUPID BLOCKING behaviour which we frown upon, but right now this - * is what we have... - */ -int Curl_blockread_all(struct connectdata *conn, /* connection data */ - curl_socket_t sockfd, /* read from this socket */ - char *buf, /* store read data here */ - ssize_t buffersize, /* max amount to read */ - ssize_t *n) /* amount bytes read */ -{ - ssize_t nread; - ssize_t allread = 0; - int result; - time_t timeleft; - *n = 0; - for(;;) { - timeleft = Curl_timeleft(conn->data, NULL, TRUE); - if(timeleft < 0) { - /* we already got the timeout */ - result = CURLE_OPERATION_TIMEDOUT; - break; - } - if(SOCKET_READABLE(sockfd, timeleft) <= 0) { - result = ~CURLE_OK; - break; - } - result = Curl_read_plain(sockfd, buf, buffersize, &nread); - if(CURLE_AGAIN == result) - continue; - else if(result) - break; - - if(buffersize == nread) { - allread += nread; - *n = allread; - result = CURLE_OK; - break; - } - if(!nread) { - result = ~CURLE_OK; - break; - } - - buffersize -= nread; - buf += nread; - allread += nread; - } - return result; -} - -/* -* This function logs in to a SOCKS4 proxy and sends the specifics to the final -* destination server. -* -* Reference : -* http://socks.permeo.com/protocol/socks4.protocol -* -* Note : -* Set protocol4a=true for "SOCKS 4A (Simple Extension to SOCKS 4 Protocol)" -* Nonsupport "Identification Protocol (RFC1413)" -*/ -CURLcode Curl_SOCKS4(const char *proxy_name, - const char *hostname, - int remote_port, - int sockindex, - struct connectdata *conn) -{ - const bool protocol4a = - (conn->socks_proxy.proxytype == CURLPROXY_SOCKS4A) ? TRUE : FALSE; -#define SOCKS4REQLEN 262 - unsigned char socksreq[SOCKS4REQLEN]; /* room for SOCKS4 request incl. user - id */ - int result; - CURLcode code; - curl_socket_t sock = conn->sock[sockindex]; - struct Curl_easy *data = conn->data; - - if(Curl_timeleft(data, NULL, TRUE) < 0) { - /* time-out, bail out, go home */ - failf(data, "Connection time-out"); - return CURLE_OPERATION_TIMEDOUT; - } - - if(conn->bits.httpproxy) - infof(conn->data, "SOCKS4%s: connecting to HTTP proxy %s port %d\n", - protocol4a ? "a" : "", hostname, remote_port); - - (void)curlx_nonblock(sock, FALSE); - - infof(data, "SOCKS4 communication to %s:%d\n", hostname, remote_port); - - /* - * Compose socks4 request - * - * Request format - * - * +----+----+----+----+----+----+----+----+----+----+....+----+ - * | VN | CD | DSTPORT | DSTIP | USERID |NULL| - * +----+----+----+----+----+----+----+----+----+----+....+----+ - * # of bytes: 1 1 2 4 variable 1 - */ - - socksreq[0] = 4; /* version (SOCKS4) */ - socksreq[1] = 1; /* connect */ - socksreq[2] = (unsigned char)((remote_port >> 8) & 0xff); /* PORT MSB */ - socksreq[3] = (unsigned char)(remote_port & 0xff); /* PORT LSB */ - - /* DNS resolve only for SOCKS4, not SOCKS4a */ - if(!protocol4a) { - struct Curl_dns_entry *dns; - Curl_addrinfo *hp=NULL; - int rc; - - rc = Curl_resolv(conn, hostname, remote_port, &dns); - - if(rc == CURLRESOLV_ERROR) - return CURLE_COULDNT_RESOLVE_PROXY; - - if(rc == CURLRESOLV_PENDING) - /* ignores the return code, but 'dns' remains NULL on failure */ - (void)Curl_resolver_wait_resolv(conn, &dns); - - /* - * We cannot use 'hostent' as a struct that Curl_resolv() returns. It - * returns a Curl_addrinfo pointer that may not always look the same. - */ - if(dns) - hp=dns->addr; - if(hp) { - char buf[64]; - Curl_printable_address(hp, buf, sizeof(buf)); - - if(hp->ai_family == AF_INET) { - struct sockaddr_in *saddr_in; - - saddr_in = (struct sockaddr_in *)(void *)hp->ai_addr; - socksreq[4] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[0]; - socksreq[5] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[1]; - socksreq[6] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[2]; - socksreq[7] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[3]; - - infof(data, "SOCKS4 connect to IPv4 %s (locally resolved)\n", buf); - } - else { - hp = NULL; /* fail! */ - - failf(data, "SOCKS4 connection to %s not supported\n", buf); - } - - Curl_resolv_unlock(data, dns); /* not used anymore from now on */ - } - if(!hp) { - failf(data, "Failed to resolve \"%s\" for SOCKS4 connect.", - hostname); - return CURLE_COULDNT_RESOLVE_HOST; - } - } - - /* - * This is currently not supporting "Identification Protocol (RFC1413)". - */ - socksreq[8] = 0; /* ensure empty userid is NUL-terminated */ - if(proxy_name) { - size_t plen = strlen(proxy_name); - if(plen >= sizeof(socksreq) - 8) { - failf(data, "Too long SOCKS proxy name, can't use!\n"); - return CURLE_COULDNT_CONNECT; - } - /* copy the proxy name WITH trailing zero */ - memcpy(socksreq + 8, proxy_name, plen+1); - } - - /* - * Make connection - */ - { - ssize_t actualread; - ssize_t written; - ssize_t hostnamelen = 0; - int packetsize = 9 + - (int)strlen((char *)socksreq + 8); /* size including NUL */ - - /* If SOCKS4a, set special invalid IP address 0.0.0.x */ - if(protocol4a) { - socksreq[4] = 0; - socksreq[5] = 0; - socksreq[6] = 0; - socksreq[7] = 1; - /* If still enough room in buffer, also append hostname */ - hostnamelen = (ssize_t)strlen(hostname) + 1; /* length including NUL */ - if(packetsize + hostnamelen <= SOCKS4REQLEN) - strcpy((char *)socksreq + packetsize, hostname); - else - hostnamelen = 0; /* Flag: hostname did not fit in buffer */ - } - - /* Send request */ - code = Curl_write_plain(conn, sock, (char *)socksreq, - packetsize + hostnamelen, - &written); - if(code || (written != packetsize + hostnamelen)) { - failf(data, "Failed to send SOCKS4 connect request."); - return CURLE_COULDNT_CONNECT; - } - if(protocol4a && hostnamelen == 0) { - /* SOCKS4a with very long hostname - send that name separately */ - hostnamelen = (ssize_t)strlen(hostname) + 1; - code = Curl_write_plain(conn, sock, (char *)hostname, hostnamelen, - &written); - if(code || (written != hostnamelen)) { - failf(data, "Failed to send SOCKS4 connect request."); - return CURLE_COULDNT_CONNECT; - } - } - - packetsize = 8; /* receive data size */ - - /* Receive response */ - result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize, - &actualread); - if(result || (actualread != packetsize)) { - failf(data, "Failed to receive SOCKS4 connect request ack."); - return CURLE_COULDNT_CONNECT; - } - - /* - * Response format - * - * +----+----+----+----+----+----+----+----+ - * | VN | CD | DSTPORT | DSTIP | - * +----+----+----+----+----+----+----+----+ - * # of bytes: 1 1 2 4 - * - * VN is the version of the reply code and should be 0. CD is the result - * code with one of the following values: - * - * 90: request granted - * 91: request rejected or failed - * 92: request rejected because SOCKS server cannot connect to - * identd on the client - * 93: request rejected because the client program and identd - * report different user-ids - */ - - /* wrong version ? */ - if(socksreq[0] != 0) { - failf(data, - "SOCKS4 reply has wrong version, version should be 4."); - return CURLE_COULDNT_CONNECT; - } - - /* Result */ - switch(socksreq[1]) { - case 90: - infof(data, "SOCKS4%s request granted.\n", protocol4a?"a":""); - break; - case 91: - failf(data, - "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)" - ", request rejected or failed.", - (unsigned char)socksreq[4], (unsigned char)socksreq[5], - (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), - (unsigned char)socksreq[1]); - return CURLE_COULDNT_CONNECT; - case 92: - failf(data, - "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)" - ", request rejected because SOCKS server cannot connect to " - "identd on the client.", - (unsigned char)socksreq[4], (unsigned char)socksreq[5], - (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), - (unsigned char)socksreq[1]); - return CURLE_COULDNT_CONNECT; - case 93: - failf(data, - "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)" - ", request rejected because the client program and identd " - "report different user-ids.", - (unsigned char)socksreq[4], (unsigned char)socksreq[5], - (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), - (unsigned char)socksreq[1]); - return CURLE_COULDNT_CONNECT; - default: - failf(data, - "Can't complete SOCKS4 connection to %d.%d.%d.%d:%d. (%d)" - ", Unknown.", - (unsigned char)socksreq[4], (unsigned char)socksreq[5], - (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | (unsigned char)socksreq[9]), - (unsigned char)socksreq[1]); - return CURLE_COULDNT_CONNECT; - } - } - - (void)curlx_nonblock(sock, TRUE); - - return CURLE_OK; /* Proxy was successful! */ -} - -/* - * This function logs in to a SOCKS5 proxy and sends the specifics to the final - * destination server. - */ -CURLcode Curl_SOCKS5(const char *proxy_name, - const char *proxy_password, - const char *hostname, - int remote_port, - int sockindex, - struct connectdata *conn) -{ - /* - According to the RFC1928, section "6. Replies". This is what a SOCK5 - replies: - - +----+-----+-------+------+----------+----------+ - |VER | REP | RSV | ATYP | BND.ADDR | BND.PORT | - +----+-----+-------+------+----------+----------+ - | 1 | 1 | X'00' | 1 | Variable | 2 | - +----+-----+-------+------+----------+----------+ - - Where: - - o VER protocol version: X'05' - o REP Reply field: - o X'00' succeeded - */ - - unsigned char socksreq[600]; /* room for large user/pw (255 max each) */ - ssize_t actualread; - ssize_t written; - int result; - CURLcode code; - curl_socket_t sock = conn->sock[sockindex]; - struct Curl_easy *data = conn->data; - time_t timeout; - bool socks5_resolve_local = - (conn->socks_proxy.proxytype == CURLPROXY_SOCKS5) ? TRUE : FALSE; - const size_t hostname_len = strlen(hostname); - ssize_t len = 0; - - if(conn->bits.httpproxy) - infof(conn->data, "SOCKS5: connecting to HTTP proxy %s port %d\n", - hostname, remote_port); - - /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */ - if(!socks5_resolve_local && hostname_len > 255) { - infof(conn->data, "SOCKS5: server resolving disabled for hostnames of " - "length > 255 [actual len=%zu]\n", hostname_len); - socks5_resolve_local = TRUE; - } - - /* get timeout */ - timeout = Curl_timeleft(data, NULL, TRUE); - - if(timeout < 0) { - /* time-out, bail out, go home */ - failf(data, "Connection time-out"); - return CURLE_OPERATION_TIMEDOUT; - } - - (void)curlx_nonblock(sock, TRUE); - - /* wait until socket gets connected */ - result = SOCKET_WRITABLE(sock, timeout); - - if(-1 == result) { - failf(conn->data, "SOCKS5: no connection here"); - return CURLE_COULDNT_CONNECT; - } - else if(0 == result) { - failf(conn->data, "SOCKS5: connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - if(result & CURL_CSELECT_ERR) { - failf(conn->data, "SOCKS5: error occurred during connection"); - return CURLE_COULDNT_CONNECT; - } - - socksreq[0] = 5; /* version */ -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - socksreq[1] = (char)(proxy_name ? 3 : 2); /* number of methods (below) */ - socksreq[2] = 0; /* no authentication */ - socksreq[3] = 1; /* GSS-API */ - socksreq[4] = 2; /* username/password */ -#else - socksreq[1] = (char)(proxy_name ? 2 : 1); /* number of methods (below) */ - socksreq[2] = 0; /* no authentication */ - socksreq[3] = 2; /* username/password */ -#endif - - (void)curlx_nonblock(sock, FALSE); - - infof(data, "SOCKS5 communication to %s:%d\n", hostname, remote_port); - - code = Curl_write_plain(conn, sock, (char *)socksreq, (2 + (int)socksreq[1]), - &written); - if(code || (written != (2 + (int)socksreq[1]))) { - failf(data, "Unable to send initial SOCKS5 request."); - return CURLE_COULDNT_CONNECT; - } - - (void)curlx_nonblock(sock, TRUE); - - result = SOCKET_READABLE(sock, timeout); - - if(-1 == result) { - failf(conn->data, "SOCKS5 nothing to read"); - return CURLE_COULDNT_CONNECT; - } - else if(0 == result) { - failf(conn->data, "SOCKS5 read timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - if(result & CURL_CSELECT_ERR) { - failf(conn->data, "SOCKS5 read error occurred"); - return CURLE_RECV_ERROR; - } - - (void)curlx_nonblock(sock, FALSE); - - result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); - if(result || (actualread != 2)) { - failf(data, "Unable to receive initial SOCKS5 response."); - return CURLE_COULDNT_CONNECT; - } - - if(socksreq[0] != 5) { - failf(data, "Received invalid version in initial SOCKS5 response."); - return CURLE_COULDNT_CONNECT; - } - if(socksreq[1] == 0) { - /* Nothing to do, no authentication needed */ - ; - } -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - else if(socksreq[1] == 1) { - code = Curl_SOCKS5_gssapi_negotiate(sockindex, conn); - if(code) { - failf(data, "Unable to negotiate SOCKS5 GSS-API context."); - return CURLE_COULDNT_CONNECT; - } - } -#endif - else if(socksreq[1] == 2) { - /* Needs user name and password */ - size_t proxy_name_len, proxy_password_len; - if(proxy_name && proxy_password) { - proxy_name_len = strlen(proxy_name); - proxy_password_len = strlen(proxy_password); - } - else { - proxy_name_len = 0; - proxy_password_len = 0; - } - - /* username/password request looks like - * +----+------+----------+------+----------+ - * |VER | ULEN | UNAME | PLEN | PASSWD | - * +----+------+----------+------+----------+ - * | 1 | 1 | 1 to 255 | 1 | 1 to 255 | - * +----+------+----------+------+----------+ - */ - len = 0; - socksreq[len++] = 1; /* username/pw subnegotiation version */ - socksreq[len++] = (unsigned char) proxy_name_len; - if(proxy_name && proxy_name_len) - memcpy(socksreq + len, proxy_name, proxy_name_len); - len += proxy_name_len; - socksreq[len++] = (unsigned char) proxy_password_len; - if(proxy_password && proxy_password_len) - memcpy(socksreq + len, proxy_password, proxy_password_len); - len += proxy_password_len; - - code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written); - if(code || (len != written)) { - failf(data, "Failed to send SOCKS5 sub-negotiation request."); - return CURLE_COULDNT_CONNECT; - } - - result=Curl_blockread_all(conn, sock, (char *)socksreq, 2, &actualread); - if(result || (actualread != 2)) { - failf(data, "Unable to receive SOCKS5 sub-negotiation response."); - return CURLE_COULDNT_CONNECT; - } - - /* ignore the first (VER) byte */ - if(socksreq[1] != 0) { /* status */ - failf(data, "User was rejected by the SOCKS5 server (%d %d).", - socksreq[0], socksreq[1]); - return CURLE_COULDNT_CONNECT; - } - - /* Everything is good so far, user was authenticated! */ - } - else { - /* error */ -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - if(socksreq[1] == 255) { -#else - if(socksreq[1] == 1) { - failf(data, - "SOCKS5 GSSAPI per-message authentication is not supported."); - return CURLE_COULDNT_CONNECT; - } - else if(socksreq[1] == 255) { -#endif - if(!proxy_name || !*proxy_name) { - failf(data, - "No authentication method was acceptable. (It is quite likely" - " that the SOCKS5 server wanted a username/password, since none" - " was supplied to the server on this connection.)"); - } - else { - failf(data, "No authentication method was acceptable."); - } - return CURLE_COULDNT_CONNECT; - } - else { - failf(data, - "Undocumented SOCKS5 mode attempted to be used by server."); - return CURLE_COULDNT_CONNECT; - } - } - - /* Authentication is complete, now specify destination to the proxy */ - len = 0; - socksreq[len++] = 5; /* version (SOCKS5) */ - socksreq[len++] = 1; /* connect */ - socksreq[len++] = 0; /* must be zero */ - - if(!socks5_resolve_local) { - socksreq[len++] = 3; /* ATYP: domain name = 3 */ - socksreq[len++] = (char) hostname_len; /* address length */ - memcpy(&socksreq[len], hostname, hostname_len); /* address str w/o NULL */ - len += hostname_len; - } - else { - struct Curl_dns_entry *dns; - Curl_addrinfo *hp = NULL; - int rc = Curl_resolv(conn, hostname, remote_port, &dns); - - if(rc == CURLRESOLV_ERROR) - return CURLE_COULDNT_RESOLVE_HOST; - - if(rc == CURLRESOLV_PENDING) { - /* this requires that we're in "wait for resolve" state */ - code = Curl_resolver_wait_resolv(conn, &dns); - if(code) - return code; - } - - /* - * We cannot use 'hostent' as a struct that Curl_resolv() returns. It - * returns a Curl_addrinfo pointer that may not always look the same. - */ - if(dns) - hp=dns->addr; - if(hp) { - int i; - char buf[64]; - Curl_printable_address(hp, buf, sizeof(buf)); - - if(hp->ai_family == AF_INET) { - struct sockaddr_in *saddr_in; - socksreq[len++] = 1; /* ATYP: IPv4 = 1 */ - - saddr_in = (struct sockaddr_in *)(void *)hp->ai_addr; - for(i = 0; i < 4; i++) { - socksreq[len++] = ((unsigned char *)&saddr_in->sin_addr.s_addr)[i]; - } - - infof(data, "SOCKS5 connect to IPv4 %s (locally resolved)\n", buf); - } -#ifdef ENABLE_IPV6 - else if(hp->ai_family == AF_INET6) { - struct sockaddr_in6 *saddr_in6; - socksreq[len++] = 4; /* ATYP: IPv6 = 4 */ - - saddr_in6 = (struct sockaddr_in6 *)(void *)hp->ai_addr; - for(i = 0; i < 16; i++) { - socksreq[len++] = - ((unsigned char *)&saddr_in6->sin6_addr.s6_addr)[i]; - } - - infof(data, "SOCKS5 connect to IPv6 %s (locally resolved)\n", buf); - } -#endif - else { - hp = NULL; /* fail! */ - - failf(data, "SOCKS5 connection to %s not supported\n", buf); - } - - Curl_resolv_unlock(data, dns); /* not used anymore from now on */ - } - if(!hp) { - failf(data, "Failed to resolve \"%s\" for SOCKS5 connect.", - hostname); - return CURLE_COULDNT_RESOLVE_HOST; - } - } - - socksreq[len++] = (unsigned char)((remote_port >> 8) & 0xff); /* PORT MSB */ - socksreq[len++] = (unsigned char)(remote_port & 0xff); /* PORT LSB */ - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - if(conn->socks5_gssapi_enctype) { - failf(data, "SOCKS5 GSS-API protection not yet implemented."); - } - else -#endif - code = Curl_write_plain(conn, sock, (char *)socksreq, len, &written); - - if(code || (len != written)) { - failf(data, "Failed to send SOCKS5 connect request."); - return CURLE_COULDNT_CONNECT; - } - - len = 10; /* minimum packet size is 10 */ - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - if(conn->socks5_gssapi_enctype) { - failf(data, "SOCKS5 GSS-API protection not yet implemented."); - } - else -#endif - result = Curl_blockread_all(conn, sock, (char *)socksreq, - len, &actualread); - - if(result || (len != actualread)) { - failf(data, "Failed to receive SOCKS5 connect request ack."); - return CURLE_COULDNT_CONNECT; - } - - if(socksreq[0] != 5) { /* version */ - failf(data, - "SOCKS5 reply has wrong version, version should be 5."); - return CURLE_COULDNT_CONNECT; - } - - /* Fix: in general, returned BND.ADDR is variable length parameter by RFC - 1928, so the reply packet should be read until the end to avoid errors at - subsequent protocol level. - - +----+-----+-------+------+----------+----------+ - |VER | REP | RSV | ATYP | BND.ADDR | BND.PORT | - +----+-----+-------+------+----------+----------+ - | 1 | 1 | X'00' | 1 | Variable | 2 | - +----+-----+-------+------+----------+----------+ - - ATYP: - o IP v4 address: X'01', BND.ADDR = 4 byte - o domain name: X'03', BND.ADDR = [ 1 byte length, string ] - o IP v6 address: X'04', BND.ADDR = 16 byte - */ - - /* Calculate real packet size */ - if(socksreq[3] == 3) { - /* domain name */ - int addrlen = (int) socksreq[4]; - len = 5 + addrlen + 2; - } - else if(socksreq[3] == 4) { - /* IPv6 */ - len = 4 + 16 + 2; - } - - /* At this point we already read first 10 bytes */ -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - if(!conn->socks5_gssapi_enctype) { - /* decrypt_gssapi_blockread already read the whole packet */ -#endif - if(len > 10) { - result = Curl_blockread_all(conn, sock, (char *)&socksreq[10], - len - 10, &actualread); - if(result || ((len - 10) != actualread)) { - failf(data, "Failed to receive SOCKS5 connect request ack."); - return CURLE_COULDNT_CONNECT; - } - } -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - } -#endif - - if(socksreq[1] != 0) { /* Anything besides 0 is an error */ - if(socksreq[3] == 1) { - failf(data, - "Can't complete SOCKS5 connection to %d.%d.%d.%d:%d. (%d)", - (unsigned char)socksreq[4], (unsigned char)socksreq[5], - (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (((unsigned char)socksreq[8] << 8) | - (unsigned char)socksreq[9]), - (unsigned char)socksreq[1]); - } - else if(socksreq[3] == 3) { - unsigned char port_upper = (unsigned char)socksreq[len - 2]; - socksreq[len - 2] = 0; - failf(data, - "Can't complete SOCKS5 connection to %s:%d. (%d)", - (char *)&socksreq[5], - ((port_upper << 8) | - (unsigned char)socksreq[len - 1]), - (unsigned char)socksreq[1]); - socksreq[len - 2] = port_upper; - } - else if(socksreq[3] == 4) { - failf(data, - "Can't complete SOCKS5 connection to %02x%02x:%02x%02x:" - "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%d. (%d)", - (unsigned char)socksreq[4], (unsigned char)socksreq[5], - (unsigned char)socksreq[6], (unsigned char)socksreq[7], - (unsigned char)socksreq[8], (unsigned char)socksreq[9], - (unsigned char)socksreq[10], (unsigned char)socksreq[11], - (unsigned char)socksreq[12], (unsigned char)socksreq[13], - (unsigned char)socksreq[14], (unsigned char)socksreq[15], - (unsigned char)socksreq[16], (unsigned char)socksreq[17], - (unsigned char)socksreq[18], (unsigned char)socksreq[19], - (((unsigned char)socksreq[20] << 8) | - (unsigned char)socksreq[21]), - (unsigned char)socksreq[1]); - } - return CURLE_COULDNT_CONNECT; - } - else { - infof(data, "SOCKS5 request granted.\n"); - } - - (void)curlx_nonblock(sock, TRUE); - return CURLE_OK; /* Proxy was successful! */ -} - -#endif /* CURL_DISABLE_PROXY */ - diff --git a/build/premake/premake5/contrib/curl/lib/socks.h b/build/premake/premake5/contrib/curl/lib/socks.h deleted file mode 100644 index 348707e74d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/socks.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef HEADER_CURL_SOCKS_H -#define HEADER_CURL_SOCKS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef CURL_DISABLE_PROXY -#define Curl_SOCKS4(a,b,c,d,e) CURLE_NOT_BUILT_IN -#define Curl_SOCKS5(a,b,c,d,e,f) CURLE_NOT_BUILT_IN -#else -/* - * Helper read-from-socket functions. Does the same as Curl_read() but it - * blocks until all bytes amount of buffersize will be read. No more, no less. - * - * This is STUPID BLOCKING behaviour which we frown upon, but right now this - * is what we have... - */ -int Curl_blockread_all(struct connectdata *conn, - curl_socket_t sockfd, - char *buf, - ssize_t buffersize, - ssize_t *n); - -/* - * This function logs in to a SOCKS4(a) proxy and sends the specifics to the - * final destination server. - */ -CURLcode Curl_SOCKS4(const char *proxy_name, - const char *hostname, - int remote_port, - int sockindex, - struct connectdata *conn); - -/* - * This function logs in to a SOCKS5 proxy and sends the specifics to the - * final destination server. - */ -CURLcode Curl_SOCKS5(const char *proxy_name, - const char *proxy_password, - const char *hostname, - int remote_port, - int sockindex, - struct connectdata *conn); - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) -/* - * This function handles the SOCKS5 GSS-API negotiation and initialisation - */ -CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, - struct connectdata *conn); -#endif - -#endif /* CURL_DISABLE_PROXY */ - -#endif /* HEADER_CURL_SOCKS_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/socks_gssapi.c b/build/premake/premake5/contrib/curl/lib/socks_gssapi.c deleted file mode 100644 index 54d0635049..0000000000 --- a/build/premake/premake5/contrib/curl/lib/socks_gssapi.c +++ /dev/null @@ -1,526 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2009, 2011, Markus Moeller, - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_PROXY) - -#include "curl_gssapi.h" -#include "urldata.h" -#include "sendf.h" -#include "connect.h" -#include "timeval.h" -#include "socks.h" -#include "warnless.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT; - -/* - * Helper GSS-API error functions. - */ -static int check_gss_err(struct Curl_easy *data, - OM_uint32 major_status, - OM_uint32 minor_status, - const char *function) -{ - if(GSS_ERROR(major_status)) { - OM_uint32 maj_stat, min_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc status_string; - char buf[1024]; - size_t len; - - len = 0; - msg_ctx = 0; - while(!msg_ctx) { - /* convert major status code (GSS-API error) to text */ - maj_stat = gss_display_status(&min_stat, major_status, - GSS_C_GSS_CODE, - GSS_C_NULL_OID, - &msg_ctx, &status_string); - if(maj_stat == GSS_S_COMPLETE) { - if(sizeof(buf) > len + status_string.length + 1) { - strcpy(buf+len, (char *) status_string.value); - len += status_string.length; - } - gss_release_buffer(&min_stat, &status_string); - break; - } - gss_release_buffer(&min_stat, &status_string); - } - if(sizeof(buf) > len + 3) { - strcpy(buf+len, ".\n"); - len += 2; - } - msg_ctx = 0; - while(!msg_ctx) { - /* convert minor status code (underlying routine error) to text */ - maj_stat = gss_display_status(&min_stat, minor_status, - GSS_C_MECH_CODE, - GSS_C_NULL_OID, - &msg_ctx, &status_string); - if(maj_stat == GSS_S_COMPLETE) { - if(sizeof(buf) > len + status_string.length) - strcpy(buf+len, (char *) status_string.value); - gss_release_buffer(&min_stat, &status_string); - break; - } - gss_release_buffer(&min_stat, &status_string); - } - failf(data, "GSS-API error: %s failed:\n%s", function, buf); - return 1; - } - - return 0; -} - -CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, - struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - curl_socket_t sock = conn->sock[sockindex]; - CURLcode code; - ssize_t actualread; - ssize_t written; - int result; - OM_uint32 gss_major_status, gss_minor_status, gss_status; - OM_uint32 gss_ret_flags; - int gss_conf_state, gss_enc; - gss_buffer_desc service = GSS_C_EMPTY_BUFFER; - gss_buffer_desc gss_send_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc gss_recv_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc gss_w_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc* gss_token = GSS_C_NO_BUFFER; - gss_name_t server = GSS_C_NO_NAME; - gss_name_t gss_client_name = GSS_C_NO_NAME; - unsigned short us_length; - char *user=NULL; - unsigned char socksreq[4]; /* room for GSS-API exchange header only */ - const char *serviceptr = data->set.str[STRING_PROXY_SERVICE_NAME] ? - data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd"; - const size_t serviceptr_length = strlen(serviceptr); - - /* GSS-API request looks like - * +----+------+-----+----------------+ - * |VER | MTYP | LEN | TOKEN | - * +----+------+----------------------+ - * | 1 | 1 | 2 | up to 2^16 - 1 | - * +----+------+-----+----------------+ - */ - - /* prepare service name */ - if(strchr(serviceptr, '/')) { - service.length = serviceptr_length; - service.value = malloc(service.length); - if(!service.value) - return CURLE_OUT_OF_MEMORY; - memcpy(service.value, serviceptr, service.length); - - gss_major_status = gss_import_name(&gss_minor_status, &service, - (gss_OID) GSS_C_NULL_OID, &server); - } - else { - service.value = malloc(serviceptr_length + - strlen(conn->socks_proxy.host.name)+2); - if(!service.value) - return CURLE_OUT_OF_MEMORY; - service.length = serviceptr_length + strlen(conn->socks_proxy.host.name)+1; - snprintf(service.value, service.length+1, "%s@%s", - serviceptr, conn->socks_proxy.host.name); - - gss_major_status = gss_import_name(&gss_minor_status, &service, - GSS_C_NT_HOSTBASED_SERVICE, &server); - } - - gss_release_buffer(&gss_status, &service); /* clear allocated memory */ - - if(check_gss_err(data, gss_major_status, - gss_minor_status, "gss_import_name()")) { - failf(data, "Failed to create service name."); - gss_release_name(&gss_status, &server); - return CURLE_COULDNT_CONNECT; - } - - /* As long as we need to keep sending some context info, and there's no */ - /* errors, keep sending it... */ - for(;;) { - gss_major_status = Curl_gss_init_sec_context(data, - &gss_minor_status, - &gss_context, - server, - &Curl_krb5_mech_oid, - NULL, - gss_token, - &gss_send_token, - TRUE, - &gss_ret_flags); - - if(gss_token != GSS_C_NO_BUFFER) - gss_release_buffer(&gss_status, &gss_recv_token); - if(check_gss_err(data, gss_major_status, - gss_minor_status, "gss_init_sec_context")) { - gss_release_name(&gss_status, &server); - gss_release_buffer(&gss_status, &gss_recv_token); - gss_release_buffer(&gss_status, &gss_send_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - failf(data, "Failed to initial GSS-API token."); - return CURLE_COULDNT_CONNECT; - } - - if(gss_send_token.length != 0) { - socksreq[0] = 1; /* GSS-API subnegotiation version */ - socksreq[1] = 1; /* authentication message type */ - us_length = htons((short)gss_send_token.length); - memcpy(socksreq+2, &us_length, sizeof(short)); - - code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { - failf(data, "Failed to send GSS-API authentication request."); - gss_release_name(&gss_status, &server); - gss_release_buffer(&gss_status, &gss_recv_token); - gss_release_buffer(&gss_status, &gss_send_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - code = Curl_write_plain(conn, sock, (char *)gss_send_token.value, - gss_send_token.length, &written); - - if(code || ((ssize_t)gss_send_token.length != written)) { - failf(data, "Failed to send GSS-API authentication token."); - gss_release_name(&gss_status, &server); - gss_release_buffer(&gss_status, &gss_recv_token); - gss_release_buffer(&gss_status, &gss_send_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - } - - gss_release_buffer(&gss_status, &gss_send_token); - gss_release_buffer(&gss_status, &gss_recv_token); - if(gss_major_status != GSS_S_CONTINUE_NEEDED) break; - - /* analyse response */ - - /* GSS-API response looks like - * +----+------+-----+----------------+ - * |VER | MTYP | LEN | TOKEN | - * +----+------+----------------------+ - * | 1 | 1 | 2 | up to 2^16 - 1 | - * +----+------+-----+----------------+ - */ - - result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { - failf(data, "Failed to receive GSS-API authentication response."); - gss_release_name(&gss_status, &server); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - /* ignore the first (VER) byte */ - if(socksreq[1] == 255) { /* status / message type */ - failf(data, "User was rejected by the SOCKS5 server (%d %d).", - socksreq[0], socksreq[1]); - gss_release_name(&gss_status, &server); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - if(socksreq[1] != 1) { /* status / messgae type */ - failf(data, "Invalid GSS-API authentication response type (%d %d).", - socksreq[0], socksreq[1]); - gss_release_name(&gss_status, &server); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - memcpy(&us_length, socksreq+2, sizeof(short)); - us_length = ntohs(us_length); - - gss_recv_token.length=us_length; - gss_recv_token.value=malloc(us_length); - if(!gss_recv_token.value) { - failf(data, - "Could not allocate memory for GSS-API authentication " - "response token."); - gss_release_name(&gss_status, &server); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_OUT_OF_MEMORY; - } - - result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, - gss_recv_token.length, &actualread); - - if(result || (actualread != us_length)) { - failf(data, "Failed to receive GSS-API authentication token."); - gss_release_name(&gss_status, &server); - gss_release_buffer(&gss_status, &gss_recv_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - gss_token = &gss_recv_token; - } - - gss_release_name(&gss_status, &server); - - /* Everything is good so far, user was authenticated! */ - gss_major_status = gss_inquire_context(&gss_minor_status, gss_context, - &gss_client_name, NULL, NULL, NULL, - NULL, NULL, NULL); - if(check_gss_err(data, gss_major_status, - gss_minor_status, "gss_inquire_context")) { - gss_delete_sec_context(&gss_status, &gss_context, NULL); - gss_release_name(&gss_status, &gss_client_name); - failf(data, "Failed to determine user name."); - return CURLE_COULDNT_CONNECT; - } - gss_major_status = gss_display_name(&gss_minor_status, gss_client_name, - &gss_send_token, NULL); - if(check_gss_err(data, gss_major_status, - gss_minor_status, "gss_display_name")) { - gss_delete_sec_context(&gss_status, &gss_context, NULL); - gss_release_name(&gss_status, &gss_client_name); - gss_release_buffer(&gss_status, &gss_send_token); - failf(data, "Failed to determine user name."); - return CURLE_COULDNT_CONNECT; - } - user=malloc(gss_send_token.length+1); - if(!user) { - gss_delete_sec_context(&gss_status, &gss_context, NULL); - gss_release_name(&gss_status, &gss_client_name); - gss_release_buffer(&gss_status, &gss_send_token); - return CURLE_OUT_OF_MEMORY; - } - - memcpy(user, gss_send_token.value, gss_send_token.length); - user[gss_send_token.length] = '\0'; - gss_release_name(&gss_status, &gss_client_name); - gss_release_buffer(&gss_status, &gss_send_token); - infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n",user); - free(user); - user=NULL; - - /* Do encryption */ - socksreq[0] = 1; /* GSS-API subnegotiation version */ - socksreq[1] = 2; /* encryption message type */ - - gss_enc = 0; /* no data protection */ - /* do confidentiality protection if supported */ - if(gss_ret_flags & GSS_C_CONF_FLAG) - gss_enc = 2; - /* else do integrity protection */ - else if(gss_ret_flags & GSS_C_INTEG_FLAG) - gss_enc = 1; - - infof(data, "SOCKS5 server supports GSS-API %s data protection.\n", - (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality")); - /* force for the moment to no data protection */ - gss_enc = 0; - /* - * Sending the encryption type in clear seems wrong. It should be - * protected with gss_seal()/gss_wrap(). See RFC1961 extract below - * The NEC reference implementations on which this is based is - * therefore at fault - * - * +------+------+------+.......................+ - * + ver | mtyp | len | token | - * +------+------+------+.......................+ - * + 0x01 | 0x02 | 0x02 | up to 2^16 - 1 octets | - * +------+------+------+.......................+ - * - * Where: - * - * - "ver" is the protocol version number, here 1 to represent the - * first version of the SOCKS/GSS-API protocol - * - * - "mtyp" is the message type, here 2 to represent a protection - * -level negotiation message - * - * - "len" is the length of the "token" field in octets - * - * - "token" is the GSS-API encapsulated protection level - * - * The token is produced by encapsulating an octet containing the - * required protection level using gss_seal()/gss_wrap() with conf_req - * set to FALSE. The token is verified using gss_unseal()/ - * gss_unwrap(). - * - */ - if(data->set.socks5_gssapi_nec) { - us_length = htons((short)1); - memcpy(socksreq+2, &us_length, sizeof(short)); - } - else { - gss_send_token.length = 1; - gss_send_token.value = malloc(1); - if(!gss_send_token.value) { - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_OUT_OF_MEMORY; - } - memcpy(gss_send_token.value, &gss_enc, 1); - - gss_major_status = gss_wrap(&gss_minor_status, gss_context, 0, - GSS_C_QOP_DEFAULT, &gss_send_token, - &gss_conf_state, &gss_w_token); - - if(check_gss_err(data, gss_major_status, gss_minor_status, "gss_wrap")) { - gss_release_buffer(&gss_status, &gss_send_token); - gss_release_buffer(&gss_status, &gss_w_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - failf(data, "Failed to wrap GSS-API encryption value into token."); - return CURLE_COULDNT_CONNECT; - } - gss_release_buffer(&gss_status, &gss_send_token); - - us_length = htons((short)gss_w_token.length); - memcpy(socksreq+2, &us_length, sizeof(short)); - } - - code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { - failf(data, "Failed to send GSS-API encryption request."); - gss_release_buffer(&gss_status, &gss_w_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - if(data->set.socks5_gssapi_nec) { - memcpy(socksreq, &gss_enc, 1); - code = Curl_write_plain(conn, sock, socksreq, 1, &written); - if(code || ( 1 != written)) { - failf(data, "Failed to send GSS-API encryption type."); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - } - else { - code = Curl_write_plain(conn, sock, (char *)gss_w_token.value, - gss_w_token.length, &written); - if(code || ((ssize_t)gss_w_token.length != written)) { - failf(data, "Failed to send GSS-API encryption type."); - gss_release_buffer(&gss_status, &gss_w_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - gss_release_buffer(&gss_status, &gss_w_token); - } - - result=Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { - failf(data, "Failed to receive GSS-API encryption response."); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - /* ignore the first (VER) byte */ - if(socksreq[1] == 255) { /* status / message type */ - failf(data, "User was rejected by the SOCKS5 server (%d %d).", - socksreq[0], socksreq[1]); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - if(socksreq[1] != 2) { /* status / messgae type */ - failf(data, "Invalid GSS-API encryption response type (%d %d).", - socksreq[0], socksreq[1]); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - memcpy(&us_length, socksreq+2, sizeof(short)); - us_length = ntohs(us_length); - - gss_recv_token.length= us_length; - gss_recv_token.value=malloc(gss_recv_token.length); - if(!gss_recv_token.value) { - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_OUT_OF_MEMORY; - } - result=Curl_blockread_all(conn, sock, (char *)gss_recv_token.value, - gss_recv_token.length, &actualread); - - if(result || (actualread != us_length)) { - failf(data, "Failed to receive GSS-API encryptrion type."); - gss_release_buffer(&gss_status, &gss_recv_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - if(!data->set.socks5_gssapi_nec) { - gss_major_status = gss_unwrap(&gss_minor_status, gss_context, - &gss_recv_token, &gss_w_token, - 0, GSS_C_QOP_DEFAULT); - - if(check_gss_err(data, gss_major_status, gss_minor_status, "gss_unwrap")) { - gss_release_buffer(&gss_status, &gss_recv_token); - gss_release_buffer(&gss_status, &gss_w_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - failf(data, "Failed to unwrap GSS-API encryption value into token."); - return CURLE_COULDNT_CONNECT; - } - gss_release_buffer(&gss_status, &gss_recv_token); - - if(gss_w_token.length != 1) { - failf(data, "Invalid GSS-API encryption response length (%d).", - gss_w_token.length); - gss_release_buffer(&gss_status, &gss_w_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - memcpy(socksreq, gss_w_token.value, gss_w_token.length); - gss_release_buffer(&gss_status, &gss_w_token); - } - else { - if(gss_recv_token.length != 1) { - failf(data, "Invalid GSS-API encryption response length (%d).", - gss_recv_token.length); - gss_release_buffer(&gss_status, &gss_recv_token); - gss_delete_sec_context(&gss_status, &gss_context, NULL); - return CURLE_COULDNT_CONNECT; - } - - memcpy(socksreq, gss_recv_token.value, gss_recv_token.length); - gss_release_buffer(&gss_status, &gss_recv_token); - } - - infof(data, "SOCKS5 access with%s protection granted.\n", - (socksreq[0]==0)?"out GSS-API data": - ((socksreq[0]==1)?" GSS-API integrity":" GSS-API confidentiality")); - - conn->socks5_gssapi_enctype = socksreq[0]; - if(socksreq[0] == 0) - gss_delete_sec_context(&gss_status, &gss_context, NULL); - - return CURLE_OK; -} - -#endif /* HAVE_GSSAPI && !CURL_DISABLE_PROXY */ diff --git a/build/premake/premake5/contrib/curl/lib/socks_sspi.c b/build/premake/premake5/contrib/curl/lib/socks_sspi.c deleted file mode 100644 index edc73ad2ed..0000000000 --- a/build/premake/premake5/contrib/curl/lib/socks_sspi.c +++ /dev/null @@ -1,605 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * Copyright (C) 2009, 2011, Markus Moeller, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_PROXY) - -#include "urldata.h" -#include "sendf.h" -#include "connect.h" -#include "strerror.h" -#include "timeval.h" -#include "socks.h" -#include "curl_sspi.h" -#include "curl_multibyte.h" -#include "warnless.h" -#include "strdup.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Helper sspi error functions. - */ -static int check_sspi_err(struct connectdata *conn, - SECURITY_STATUS status, - const char *function) -{ - if(status != SEC_E_OK && - status != SEC_I_COMPLETE_AND_CONTINUE && - status != SEC_I_COMPLETE_NEEDED && - status != SEC_I_CONTINUE_NEEDED) { - failf(conn->data, "SSPI error: %s failed: %s", function, - Curl_sspi_strerror(conn, status)); - return 1; - } - return 0; -} - -/* This is the SSPI-using version of this function */ -CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, - struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - curl_socket_t sock = conn->sock[sockindex]; - CURLcode code; - ssize_t actualread; - ssize_t written; - int result; - /* Needs GSS-API authentication */ - SECURITY_STATUS status; - unsigned long sspi_ret_flags = 0; - unsigned char gss_enc; - SecBuffer sspi_send_token, sspi_recv_token, sspi_w_token[3]; - SecBufferDesc input_desc, output_desc, wrap_desc; - SecPkgContext_Sizes sspi_sizes; - CredHandle cred_handle; - CtxtHandle sspi_context; - PCtxtHandle context_handle = NULL; - SecPkgCredentials_Names names; - TimeStamp expiry; - char *service_name = NULL; - unsigned short us_length; - unsigned long qop; - unsigned char socksreq[4]; /* room for GSS-API exchange header only */ - const char *service = data->set.str[STRING_PROXY_SERVICE_NAME] ? - data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd"; - const size_t service_length = strlen(service); - - /* GSS-API request looks like - * +----+------+-----+----------------+ - * |VER | MTYP | LEN | TOKEN | - * +----+------+----------------------+ - * | 1 | 1 | 2 | up to 2^16 - 1 | - * +----+------+-----+----------------+ - */ - - /* prepare service name */ - if(strchr(service, '/')) { - service_name = strdup(service); - if(!service_name) - return CURLE_OUT_OF_MEMORY; - } - else { - service_name = malloc(service_length + - strlen(conn->socks_proxy.host.name) + 2); - if(!service_name) - return CURLE_OUT_OF_MEMORY; - snprintf(service_name, service_length + - strlen(conn->socks_proxy.host.name)+2, "%s/%s", - service, conn->socks_proxy.host.name); - } - - input_desc.cBuffers = 1; - input_desc.pBuffers = &sspi_recv_token; - input_desc.ulVersion = SECBUFFER_VERSION; - - sspi_recv_token.BufferType = SECBUFFER_TOKEN; - sspi_recv_token.cbBuffer = 0; - sspi_recv_token.pvBuffer = NULL; - - output_desc.cBuffers = 1; - output_desc.pBuffers = &sspi_send_token; - output_desc.ulVersion = SECBUFFER_VERSION; - - sspi_send_token.BufferType = SECBUFFER_TOKEN; - sspi_send_token.cbBuffer = 0; - sspi_send_token.pvBuffer = NULL; - - wrap_desc.cBuffers = 3; - wrap_desc.pBuffers = sspi_w_token; - wrap_desc.ulVersion = SECBUFFER_VERSION; - - cred_handle.dwLower = 0; - cred_handle.dwUpper = 0; - - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT("Kerberos"), - SECPKG_CRED_OUTBOUND, - NULL, - NULL, - NULL, - NULL, - &cred_handle, - &expiry); - - if(check_sspi_err(conn, status, "AcquireCredentialsHandle")) { - failf(data, "Failed to acquire credentials."); - free(service_name); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - return CURLE_COULDNT_CONNECT; - } - - /* As long as we need to keep sending some context info, and there's no */ - /* errors, keep sending it... */ - for(;;) { - TCHAR *sname; - - sname = Curl_convert_UTF8_to_tchar(service_name); - if(!sname) - return CURLE_OUT_OF_MEMORY; - - status = s_pSecFn->InitializeSecurityContext(&cred_handle, - context_handle, - sname, - ISC_REQ_MUTUAL_AUTH | - ISC_REQ_ALLOCATE_MEMORY | - ISC_REQ_CONFIDENTIALITY | - ISC_REQ_REPLAY_DETECT, - 0, - SECURITY_NATIVE_DREP, - &input_desc, - 0, - &sspi_context, - &output_desc, - &sspi_ret_flags, - &expiry); - - Curl_unicodefree(sname); - - if(sspi_recv_token.pvBuffer) { - s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer); - sspi_recv_token.pvBuffer = NULL; - sspi_recv_token.cbBuffer = 0; - } - - if(check_sspi_err(conn, status, "InitializeSecurityContext")) { - free(service_name); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - if(sspi_recv_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer); - failf(data, "Failed to initialise security context."); - return CURLE_COULDNT_CONNECT; - } - - if(sspi_send_token.cbBuffer != 0) { - socksreq[0] = 1; /* GSS-API subnegotiation version */ - socksreq[1] = 1; /* authentication message type */ - us_length = htons((short)sspi_send_token.cbBuffer); - memcpy(socksreq+2, &us_length, sizeof(short)); - - code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { - failf(data, "Failed to send SSPI authentication request."); - free(service_name); - if(sspi_send_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); - if(sspi_recv_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer, - sspi_send_token.cbBuffer, &written); - if(code || (sspi_send_token.cbBuffer != (size_t)written)) { - failf(data, "Failed to send SSPI authentication token."); - free(service_name); - if(sspi_send_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); - if(sspi_recv_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - } - - if(sspi_send_token.pvBuffer) { - s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); - sspi_send_token.pvBuffer = NULL; - } - sspi_send_token.cbBuffer = 0; - - if(sspi_recv_token.pvBuffer) { - s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer); - sspi_recv_token.pvBuffer = NULL; - } - sspi_recv_token.cbBuffer = 0; - - if(status != SEC_I_CONTINUE_NEEDED) - break; - - /* analyse response */ - - /* GSS-API response looks like - * +----+------+-----+----------------+ - * |VER | MTYP | LEN | TOKEN | - * +----+------+----------------------+ - * | 1 | 1 | 2 | up to 2^16 - 1 | - * +----+------+-----+----------------+ - */ - - result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { - failf(data, "Failed to receive SSPI authentication response."); - free(service_name); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - /* ignore the first (VER) byte */ - if(socksreq[1] == 255) { /* status / message type */ - failf(data, "User was rejected by the SOCKS5 server (%u %u).", - (unsigned int)socksreq[0], (unsigned int)socksreq[1]); - free(service_name); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - if(socksreq[1] != 1) { /* status / messgae type */ - failf(data, "Invalid SSPI authentication response type (%u %u).", - (unsigned int)socksreq[0], (unsigned int)socksreq[1]); - free(service_name); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - memcpy(&us_length, socksreq+2, sizeof(short)); - us_length = ntohs(us_length); - - sspi_recv_token.cbBuffer = us_length; - sspi_recv_token.pvBuffer = malloc(us_length); - - if(!sspi_recv_token.pvBuffer) { - free(service_name); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_OUT_OF_MEMORY; - } - result = Curl_blockread_all(conn, sock, (char *)sspi_recv_token.pvBuffer, - sspi_recv_token.cbBuffer, &actualread); - - if(result || (actualread != us_length)) { - failf(data, "Failed to receive SSPI authentication token."); - free(service_name); - if(sspi_recv_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_recv_token.pvBuffer); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - context_handle = &sspi_context; - } - - free(service_name); - - /* Everything is good so far, user was authenticated! */ - status = s_pSecFn->QueryCredentialsAttributes(&cred_handle, - SECPKG_CRED_ATTR_NAMES, - &names); - s_pSecFn->FreeCredentialsHandle(&cred_handle); - if(check_sspi_err(conn, status, "QueryCredentialAttributes")) { - s_pSecFn->DeleteSecurityContext(&sspi_context); - s_pSecFn->FreeContextBuffer(names.sUserName); - failf(data, "Failed to determine user name."); - return CURLE_COULDNT_CONNECT; - } - infof(data, "SOCKS5 server authencticated user %s with GSS-API.\n", - names.sUserName); - s_pSecFn->FreeContextBuffer(names.sUserName); - - /* Do encryption */ - socksreq[0] = 1; /* GSS-API subnegotiation version */ - socksreq[1] = 2; /* encryption message type */ - - gss_enc = 0; /* no data protection */ - /* do confidentiality protection if supported */ - if(sspi_ret_flags & ISC_REQ_CONFIDENTIALITY) - gss_enc = 2; - /* else do integrity protection */ - else if(sspi_ret_flags & ISC_REQ_INTEGRITY) - gss_enc = 1; - - infof(data, "SOCKS5 server supports GSS-API %s data protection.\n", - (gss_enc==0)?"no":((gss_enc==1)?"integrity":"confidentiality") ); - /* force to no data protection, avoid encryption/decryption for now */ - gss_enc = 0; - /* - * Sending the encryption type in clear seems wrong. It should be - * protected with gss_seal()/gss_wrap(). See RFC1961 extract below - * The NEC reference implementations on which this is based is - * therefore at fault - * - * +------+------+------+.......................+ - * + ver | mtyp | len | token | - * +------+------+------+.......................+ - * + 0x01 | 0x02 | 0x02 | up to 2^16 - 1 octets | - * +------+------+------+.......................+ - * - * Where: - * - * - "ver" is the protocol version number, here 1 to represent the - * first version of the SOCKS/GSS-API protocol - * - * - "mtyp" is the message type, here 2 to represent a protection - * -level negotiation message - * - * - "len" is the length of the "token" field in octets - * - * - "token" is the GSS-API encapsulated protection level - * - * The token is produced by encapsulating an octet containing the - * required protection level using gss_seal()/gss_wrap() with conf_req - * set to FALSE. The token is verified using gss_unseal()/ - * gss_unwrap(). - * - */ - - if(data->set.socks5_gssapi_nec) { - us_length = htons((short)1); - memcpy(socksreq+2, &us_length, sizeof(short)); - } - else { - status = s_pSecFn->QueryContextAttributes(&sspi_context, - SECPKG_ATTR_SIZES, - &sspi_sizes); - if(check_sspi_err(conn, status, "QueryContextAttributes")) { - s_pSecFn->DeleteSecurityContext(&sspi_context); - failf(data, "Failed to query security context attributes."); - return CURLE_COULDNT_CONNECT; - } - - sspi_w_token[0].cbBuffer = sspi_sizes.cbSecurityTrailer; - sspi_w_token[0].BufferType = SECBUFFER_TOKEN; - sspi_w_token[0].pvBuffer = malloc(sspi_sizes.cbSecurityTrailer); - - if(!sspi_w_token[0].pvBuffer) { - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_OUT_OF_MEMORY; - } - - sspi_w_token[1].cbBuffer = 1; - sspi_w_token[1].pvBuffer = malloc(1); - if(!sspi_w_token[1].pvBuffer) { - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_OUT_OF_MEMORY; - } - - memcpy(sspi_w_token[1].pvBuffer, &gss_enc, 1); - sspi_w_token[2].BufferType = SECBUFFER_PADDING; - sspi_w_token[2].cbBuffer = sspi_sizes.cbBlockSize; - sspi_w_token[2].pvBuffer = malloc(sspi_sizes.cbBlockSize); - if(!sspi_w_token[2].pvBuffer) { - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_OUT_OF_MEMORY; - } - status = s_pSecFn->EncryptMessage(&sspi_context, - KERB_WRAP_NO_ENCRYPT, - &wrap_desc, - 0); - if(check_sspi_err(conn, status, "EncryptMessage")) { - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - failf(data, "Failed to query security context attributes."); - return CURLE_COULDNT_CONNECT; - } - sspi_send_token.cbBuffer = sspi_w_token[0].cbBuffer - + sspi_w_token[1].cbBuffer - + sspi_w_token[2].cbBuffer; - sspi_send_token.pvBuffer = malloc(sspi_send_token.cbBuffer); - if(!sspi_send_token.pvBuffer) { - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_OUT_OF_MEMORY; - } - - memcpy(sspi_send_token.pvBuffer, sspi_w_token[0].pvBuffer, - sspi_w_token[0].cbBuffer); - memcpy((PUCHAR) sspi_send_token.pvBuffer +(int)sspi_w_token[0].cbBuffer, - sspi_w_token[1].pvBuffer, sspi_w_token[1].cbBuffer); - memcpy((PUCHAR) sspi_send_token.pvBuffer - +sspi_w_token[0].cbBuffer - +sspi_w_token[1].cbBuffer, - sspi_w_token[2].pvBuffer, sspi_w_token[2].cbBuffer); - - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - sspi_w_token[0].pvBuffer = NULL; - sspi_w_token[0].cbBuffer = 0; - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - sspi_w_token[1].pvBuffer = NULL; - sspi_w_token[1].cbBuffer = 0; - s_pSecFn->FreeContextBuffer(sspi_w_token[2].pvBuffer); - sspi_w_token[2].pvBuffer = NULL; - sspi_w_token[2].cbBuffer = 0; - - us_length = htons((short)sspi_send_token.cbBuffer); - memcpy(socksreq+2, &us_length, sizeof(short)); - } - - code = Curl_write_plain(conn, sock, (char *)socksreq, 4, &written); - if(code || (4 != written)) { - failf(data, "Failed to send SSPI encryption request."); - if(sspi_send_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - if(data->set.socks5_gssapi_nec) { - memcpy(socksreq, &gss_enc, 1); - code = Curl_write_plain(conn, sock, (char *)socksreq, 1, &written); - if(code || (1 != written)) { - failf(data, "Failed to send SSPI encryption type."); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - } - else { - code = Curl_write_plain(conn, sock, (char *)sspi_send_token.pvBuffer, - sspi_send_token.cbBuffer, &written); - if(code || (sspi_send_token.cbBuffer != (size_t)written)) { - failf(data, "Failed to send SSPI encryption type."); - if(sspi_send_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - if(sspi_send_token.pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_send_token.pvBuffer); - } - - result = Curl_blockread_all(conn, sock, (char *)socksreq, 4, &actualread); - if(result || (actualread != 4)) { - failf(data, "Failed to receive SSPI encryption response."); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - /* ignore the first (VER) byte */ - if(socksreq[1] == 255) { /* status / message type */ - failf(data, "User was rejected by the SOCKS5 server (%u %u).", - (unsigned int)socksreq[0], (unsigned int)socksreq[1]); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - if(socksreq[1] != 2) { /* status / message type */ - failf(data, "Invalid SSPI encryption response type (%u %u).", - (unsigned int)socksreq[0], (unsigned int)socksreq[1]); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - memcpy(&us_length, socksreq+2, sizeof(short)); - us_length = ntohs(us_length); - - sspi_w_token[0].cbBuffer = us_length; - sspi_w_token[0].pvBuffer = malloc(us_length); - if(!sspi_w_token[0].pvBuffer) { - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_OUT_OF_MEMORY; - } - - result = Curl_blockread_all(conn, sock, (char *)sspi_w_token[0].pvBuffer, - sspi_w_token[0].cbBuffer, &actualread); - - if(result || (actualread != us_length)) { - failf(data, "Failed to receive SSPI encryption type."); - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - - if(!data->set.socks5_gssapi_nec) { - wrap_desc.cBuffers = 2; - sspi_w_token[0].BufferType = SECBUFFER_STREAM; - sspi_w_token[1].BufferType = SECBUFFER_DATA; - sspi_w_token[1].cbBuffer = 0; - sspi_w_token[1].pvBuffer = NULL; - - status = s_pSecFn->DecryptMessage(&sspi_context, - &wrap_desc, - 0, - &qop); - - if(check_sspi_err(conn, status, "DecryptMessage")) { - if(sspi_w_token[0].pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - if(sspi_w_token[1].pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - failf(data, "Failed to query security context attributes."); - return CURLE_COULDNT_CONNECT; - } - - if(sspi_w_token[1].cbBuffer != 1) { - failf(data, "Invalid SSPI encryption response length (%lu).", - (unsigned long)sspi_w_token[1].cbBuffer); - if(sspi_w_token[0].pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - if(sspi_w_token[1].pvBuffer) - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - - memcpy(socksreq, sspi_w_token[1].pvBuffer, sspi_w_token[1].cbBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[1].pvBuffer); - } - else { - if(sspi_w_token[0].cbBuffer != 1) { - failf(data, "Invalid SSPI encryption response length (%lu).", - (unsigned long)sspi_w_token[0].cbBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - s_pSecFn->DeleteSecurityContext(&sspi_context); - return CURLE_COULDNT_CONNECT; - } - memcpy(socksreq, sspi_w_token[0].pvBuffer, sspi_w_token[0].cbBuffer); - s_pSecFn->FreeContextBuffer(sspi_w_token[0].pvBuffer); - } - - infof(data, "SOCKS5 access with%s protection granted.\n", - (socksreq[0]==0)?"out GSS-API data": - ((socksreq[0]==1)?" GSS-API integrity":" GSS-API confidentiality")); - - /* For later use if encryption is required - conn->socks5_gssapi_enctype = socksreq[0]; - if(socksreq[0] != 0) - conn->socks5_sspi_context = sspi_context; - else { - s_pSecFn->DeleteSecurityContext(&sspi_context); - conn->socks5_sspi_context = sspi_context; - } - */ - return CURLE_OK; -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/speedcheck.c b/build/premake/premake5/contrib/curl/lib/speedcheck.c deleted file mode 100644 index bc15d97be5..0000000000 --- a/build/premake/premake5/contrib/curl/lib/speedcheck.c +++ /dev/null @@ -1,74 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "urldata.h" -#include "sendf.h" -#include "multiif.h" -#include "speedcheck.h" - -void Curl_speedinit(struct Curl_easy *data) -{ - memset(&data->state.keeps_speed, 0, sizeof(struct timeval)); -} - -CURLcode Curl_speedcheck(struct Curl_easy *data, - struct timeval now) -{ - if((data->progress.current_speed >= 0) && - data->set.low_speed_time && - (Curl_tvlong(data->state.keeps_speed) != 0) && - (data->progress.current_speed < data->set.low_speed_limit)) { - time_t howlong = Curl_tvdiff(now, data->state.keeps_speed); - time_t nextcheck = (data->set.low_speed_time * 1000) - howlong; - - /* We are now below the "low speed limit". If we are below it - for "low speed time" seconds we consider that enough reason - to abort the download. */ - if(nextcheck <= 0) { - /* we have been this slow for long enough, now die */ - failf(data, - "Operation too slow. " - "Less than %ld bytes/sec transferred the last %ld seconds", - data->set.low_speed_limit, - data->set.low_speed_time); - return CURLE_OPERATION_TIMEDOUT; - } - else { - /* wait complete low_speed_time */ - Curl_expire_latest(data, nextcheck); - } - } - else { - /* we keep up the required speed all right */ - data->state.keeps_speed = now; - - if(data->set.low_speed_limit) - /* if there is a low speed limit enabled, we set the expire timer to - make this connection's speed get checked again no later than when - this time is up */ - Curl_expire_latest(data, data->set.low_speed_time*1000); - } - return CURLE_OK; -} diff --git a/build/premake/premake5/contrib/curl/lib/speedcheck.h b/build/premake/premake5/contrib/curl/lib/speedcheck.h deleted file mode 100644 index 7dbe3d6d73..0000000000 --- a/build/premake/premake5/contrib/curl/lib/speedcheck.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef HEADER_CURL_SPEEDCHECK_H -#define HEADER_CURL_SPEEDCHECK_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "timeval.h" - -void Curl_speedinit(struct Curl_easy *data); -CURLcode Curl_speedcheck(struct Curl_easy *data, - struct timeval now); - -#endif /* HEADER_CURL_SPEEDCHECK_H */ diff --git a/build/premake/premake5/contrib/curl/lib/splay.c b/build/premake/premake5/contrib/curl/lib/splay.c deleted file mode 100644 index 7aa2e4bac3..0000000000 --- a/build/premake/premake5/contrib/curl/lib/splay.c +++ /dev/null @@ -1,288 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1997 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "splay.h" - -/* - * This macro compares two node keys i and j and returns: - * - * negative value: when i is smaller than j - * zero : when i is equal to j - * positive when : when i is larger than j - */ -#define compare(i,j) Curl_splaycomparekeys((i),(j)) - -/* - * Splay using the key i (which may or may not be in the tree.) The starting - * root is t. - */ -struct Curl_tree *Curl_splay(struct timeval i, - struct Curl_tree *t) -{ - struct Curl_tree N, *l, *r, *y; - long comp; - - if(t == NULL) - return t; - N.smaller = N.larger = NULL; - l = r = &N; - - for(;;) { - comp = compare(i, t->key); - if(comp < 0) { - if(t->smaller == NULL) - break; - if(compare(i, t->smaller->key) < 0) { - y = t->smaller; /* rotate smaller */ - t->smaller = y->larger; - y->larger = t; - t = y; - if(t->smaller == NULL) - break; - } - r->smaller = t; /* link smaller */ - r = t; - t = t->smaller; - } - else if(comp > 0) { - if(t->larger == NULL) - break; - if(compare(i, t->larger->key) > 0) { - y = t->larger; /* rotate larger */ - t->larger = y->smaller; - y->smaller = t; - t = y; - if(t->larger == NULL) - break; - } - l->larger = t; /* link larger */ - l = t; - t = t->larger; - } - else - break; - } - - l->larger = t->smaller; /* assemble */ - r->smaller = t->larger; - t->smaller = N.larger; - t->larger = N.smaller; - - return t; -} - -/* Insert key i into the tree t. Return a pointer to the resulting tree or - * NULL if something went wrong. - * - * @unittest: 1309 - */ -struct Curl_tree *Curl_splayinsert(struct timeval i, - struct Curl_tree *t, - struct Curl_tree *node) -{ - static const struct timeval KEY_NOTUSED = {-1, -1}; /* will *NEVER* appear */ - - if(node == NULL) - return t; - - if(t != NULL) { - t = Curl_splay(i, t); - if(compare(i, t->key)==0) { - /* There already exists a node in the tree with the very same key. Build - a linked list of nodes. We make the new 'node' struct the new master - node and make the previous node the first one in the 'same' list. */ - - node->same = t; - node->key = i; - node->smaller = t->smaller; - node->larger = t->larger; - - t->smaller = node; /* in the sub node for this same key, we use the - smaller pointer to point back to the master - node */ - - t->key = KEY_NOTUSED; /* and we set the key in the sub node to NOTUSED - to quickly identify this node as a subnode */ - - return node; /* new root node */ - } - } - - if(t == NULL) { - node->smaller = node->larger = NULL; - } - else if(compare(i, t->key) < 0) { - node->smaller = t->smaller; - node->larger = t; - t->smaller = NULL; - - } - else { - node->larger = t->larger; - node->smaller = t; - t->larger = NULL; - } - node->key = i; - - node->same = NULL; /* no identical node (yet) */ - return node; -} - -/* Finds and deletes the best-fit node from the tree. Return a pointer to the - resulting tree. best-fit means the node with the given or lower key */ -struct Curl_tree *Curl_splaygetbest(struct timeval i, - struct Curl_tree *t, - struct Curl_tree **removed) -{ - struct Curl_tree *x; - - if(!t) { - *removed = NULL; /* none removed since there was no root */ - return NULL; - } - - t = Curl_splay(i, t); - if(compare(i, t->key) < 0) { - /* too big node, try the smaller chain */ - if(t->smaller) - t=Curl_splay(t->smaller->key, t); - else { - /* fail */ - *removed = NULL; - return t; - } - } - - if(compare(i, t->key) >= 0) { /* found it */ - /* FIRST! Check if there is a list with identical keys */ - x = t->same; - if(x) { - /* there is, pick one from the list */ - - /* 'x' is the new root node */ - - x->key = t->key; - x->larger = t->larger; - x->smaller = t->smaller; - - *removed = t; - return x; /* new root */ - } - - if(t->smaller == NULL) { - x = t->larger; - } - else { - x = Curl_splay(i, t->smaller); - x->larger = t->larger; - } - *removed = t; - - return x; - } - else { - *removed = NULL; /* no match */ - return t; /* It wasn't there */ - } -} - - -/* Deletes the very node we point out from the tree if it's there. Stores a - * pointer to the new resulting tree in 'newroot'. - * - * Returns zero on success and non-zero on errors! TODO: document error codes. - * When returning error, it does not touch the 'newroot' pointer. - * - * NOTE: when the last node of the tree is removed, there's no tree left so - * 'newroot' will be made to point to NULL. - * - * @unittest: 1309 - */ -int Curl_splayremovebyaddr(struct Curl_tree *t, - struct Curl_tree *removenode, - struct Curl_tree **newroot) -{ - static const struct timeval KEY_NOTUSED = {-1, -1}; /* will *NEVER* appear */ - struct Curl_tree *x; - - if(!t || !removenode) - return 1; - - if(compare(KEY_NOTUSED, removenode->key) == 0) { - /* Key set to NOTUSED means it is a subnode within a 'same' linked list - and thus we can unlink it easily. The 'smaller' link of a subnode - links to the parent node. */ - if(removenode->smaller == NULL) - return 3; - - removenode->smaller->same = removenode->same; - if(removenode->same) - removenode->same->smaller = removenode->smaller; - - /* Ensures that double-remove gets caught. */ - removenode->smaller = NULL; - - /* voila, we're done! */ - *newroot = t; /* return the same root */ - return 0; - } - - t = Curl_splay(removenode->key, t); - - /* First make sure that we got the same root node as the one we want - to remove, as otherwise we might be trying to remove a node that - isn't actually in the tree. - - We cannot just compare the keys here as a double remove in quick - succession of a node with key != KEY_NOTUSED && same != NULL - could return the same key but a different node. */ - if(t != removenode) - return 2; - - /* Check if there is a list with identical sizes, as then we're trying to - remove the root node of a list of nodes with identical keys. */ - x = t->same; - if(x) { - /* 'x' is the new root node, we just make it use the root node's - smaller/larger links */ - - x->key = t->key; - x->larger = t->larger; - x->smaller = t->smaller; - } - else { - /* Remove the root node */ - if(t->smaller == NULL) - x = t->larger; - else { - x = Curl_splay(removenode->key, t->smaller); - x->larger = t->larger; - } - } - - *newroot = x; /* store new root pointer */ - - return 0; -} - diff --git a/build/premake/premake5/contrib/curl/lib/splay.h b/build/premake/premake5/contrib/curl/lib/splay.h deleted file mode 100644 index 427bfc8eb4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/splay.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef HEADER_CURL_SPLAY_H -#define HEADER_CURL_SPLAY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1997 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -struct Curl_tree { - struct Curl_tree *smaller; /* smaller node */ - struct Curl_tree *larger; /* larger node */ - struct Curl_tree *same; /* points to a node with identical key */ - struct timeval key; /* this node's "sort" key */ - void *payload; /* data the splay code doesn't care about */ -}; - -struct Curl_tree *Curl_splay(struct timeval i, - struct Curl_tree *t); - -struct Curl_tree *Curl_splayinsert(struct timeval key, - struct Curl_tree *t, - struct Curl_tree *newnode); - -#if 0 -struct Curl_tree *Curl_splayremove(struct timeval key, - struct Curl_tree *t, - struct Curl_tree **removed); -#endif - -struct Curl_tree *Curl_splaygetbest(struct timeval key, - struct Curl_tree *t, - struct Curl_tree **removed); - -int Curl_splayremovebyaddr(struct Curl_tree *t, - struct Curl_tree *removenode, - struct Curl_tree **newroot); - -#define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \ - ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \ - ( ((i.tv_usec) < (j.tv_usec)) ? -1 : \ - ( ((i.tv_usec) > (j.tv_usec)) ? 1 : 0)))) - -#ifdef DEBUGBUILD -void Curl_splayprint(struct Curl_tree * t, int d, char output); -#else -#define Curl_splayprint(x,y,z) Curl_nop_stmt -#endif - -#endif /* HEADER_CURL_SPLAY_H */ diff --git a/build/premake/premake5/contrib/curl/lib/ssh.c b/build/premake/premake5/contrib/curl/lib/ssh.c deleted file mode 100644 index 086d40ecdb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ssh.c +++ /dev/null @@ -1,3464 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* #define CURL_LIBSSH2_DEBUG */ - -#include "curl_setup.h" - -#ifdef USE_LIBSSH2 - -#ifdef HAVE_LIMITS_H -# include -#endif - -#include -#include - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_UTSNAME_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef __VMS -#include -#include -#endif - -#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) -#undef in_addr_t -#define in_addr_t unsigned long -#endif - -#include -#include "urldata.h" -#include "sendf.h" -#include "hostip.h" -#include "progress.h" -#include "transfer.h" -#include "escape.h" -#include "http.h" /* for HTTP proxy tunnel stuff */ -#include "ssh.h" -#include "url.h" -#include "speedcheck.h" -#include "getinfo.h" -#include "strdup.h" -#include "strcase.h" -#include "vtls/vtls.h" -#include "connect.h" -#include "strerror.h" -#include "inet_ntop.h" -#include "parsedate.h" /* for the week day and month names */ -#include "sockaddr.h" /* required for Curl_sockaddr_storage */ -#include "strtoofft.h" -#include "multiif.h" -#include "select.h" -#include "warnless.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#ifdef WIN32 -# undef PATH_MAX -# define PATH_MAX MAX_PATH -# ifndef R_OK -# define R_OK 4 -# endif -#endif - -#ifndef PATH_MAX -#define PATH_MAX 1024 /* just an extra precaution since there are systems that - have their definition hidden well */ -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010206 -/* libssh2_sftp_statvfs and friends were added in 1.2.6 */ -#define HAS_STATVFS_SUPPORT 1 -#endif - -#define sftp_libssh2_last_error(s) curlx_ultosi(libssh2_sftp_last_error(s)) - -#define sftp_libssh2_realpath(s,p,t,m) \ - libssh2_sftp_symlink_ex((s), (p), curlx_uztoui(strlen(p)), \ - (t), (m), LIBSSH2_SFTP_REALPATH) - -/* Local functions: */ -static const char *sftp_libssh2_strerror(int err); -static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc); -static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc); -static LIBSSH2_FREE_FUNC(my_libssh2_free); - -static CURLcode get_pathname(const char **cpp, char **path); - -static CURLcode ssh_connect(struct connectdata *conn, bool *done); -static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done); -static CURLcode ssh_do(struct connectdata *conn, bool *done); - -static CURLcode ssh_getworkingpath(struct connectdata *conn, - char *homedir, /* when SFTP is used */ - char **path); - -static CURLcode scp_done(struct connectdata *conn, - CURLcode, bool premature); -static CURLcode scp_doing(struct connectdata *conn, - bool *dophase_done); -static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection); - -static CURLcode sftp_done(struct connectdata *conn, - CURLcode, bool premature); -static CURLcode sftp_doing(struct connectdata *conn, - bool *dophase_done); -static CURLcode sftp_disconnect(struct connectdata *conn, bool dead); -static -CURLcode sftp_perform(struct connectdata *conn, - bool *connected, - bool *dophase_done); - -static int ssh_getsock(struct connectdata *conn, - curl_socket_t *sock, /* points to numsocks number - of sockets */ - int numsocks); - -static int ssh_perform_getsock(const struct connectdata *conn, - curl_socket_t *sock, /* points to numsocks - number of sockets */ - int numsocks); - -static CURLcode ssh_setup_connection(struct connectdata *conn); - -/* - * SCP protocol handler. - */ - -const struct Curl_handler Curl_handler_scp = { - "SCP", /* scheme */ - ssh_setup_connection, /* setup_connection */ - ssh_do, /* do_it */ - scp_done, /* done */ - ZERO_NULL, /* do_more */ - ssh_connect, /* connect_it */ - ssh_multi_statemach, /* connecting */ - scp_doing, /* doing */ - ssh_getsock, /* proto_getsock */ - ssh_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ssh_perform_getsock, /* perform_getsock */ - scp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SSH, /* defport */ - CURLPROTO_SCP, /* protocol */ - PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION - | PROTOPT_NOURLQUERY /* flags */ -}; - - -/* - * SFTP protocol handler. - */ - -const struct Curl_handler Curl_handler_sftp = { - "SFTP", /* scheme */ - ssh_setup_connection, /* setup_connection */ - ssh_do, /* do_it */ - sftp_done, /* done */ - ZERO_NULL, /* do_more */ - ssh_connect, /* connect_it */ - ssh_multi_statemach, /* connecting */ - sftp_doing, /* doing */ - ssh_getsock, /* proto_getsock */ - ssh_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ssh_perform_getsock, /* perform_getsock */ - sftp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_SSH, /* defport */ - CURLPROTO_SFTP, /* protocol */ - PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION - | PROTOPT_NOURLQUERY /* flags */ -}; - -static void -kbd_callback(const char *name, int name_len, const char *instruction, - int instruction_len, int num_prompts, - const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, - LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, - void **abstract) -{ - struct connectdata *conn = (struct connectdata *)*abstract; - -#ifdef CURL_LIBSSH2_DEBUG - fprintf(stderr, "name=%s\n", name); - fprintf(stderr, "name_len=%d\n", name_len); - fprintf(stderr, "instruction=%s\n", instruction); - fprintf(stderr, "instruction_len=%d\n", instruction_len); - fprintf(stderr, "num_prompts=%d\n", num_prompts); -#else - (void)name; - (void)name_len; - (void)instruction; - (void)instruction_len; -#endif /* CURL_LIBSSH2_DEBUG */ - if(num_prompts == 1) { - responses[0].text = strdup(conn->passwd); - responses[0].length = curlx_uztoui(strlen(conn->passwd)); - } - (void)prompts; - (void)abstract; -} /* kbd_callback */ - -static CURLcode sftp_libssh2_error_to_CURLE(int err) -{ - switch(err) { - case LIBSSH2_FX_OK: - return CURLE_OK; - - case LIBSSH2_FX_NO_SUCH_FILE: - case LIBSSH2_FX_NO_SUCH_PATH: - return CURLE_REMOTE_FILE_NOT_FOUND; - - case LIBSSH2_FX_PERMISSION_DENIED: - case LIBSSH2_FX_WRITE_PROTECT: - case LIBSSH2_FX_LOCK_CONFlICT: - return CURLE_REMOTE_ACCESS_DENIED; - - case LIBSSH2_FX_NO_SPACE_ON_FILESYSTEM: - case LIBSSH2_FX_QUOTA_EXCEEDED: - return CURLE_REMOTE_DISK_FULL; - - case LIBSSH2_FX_FILE_ALREADY_EXISTS: - return CURLE_REMOTE_FILE_EXISTS; - - case LIBSSH2_FX_DIR_NOT_EMPTY: - return CURLE_QUOTE_ERROR; - - default: - break; - } - - return CURLE_SSH; -} - -static CURLcode libssh2_session_error_to_CURLE(int err) -{ - switch(err) { - /* Ordered by order of appearance in libssh2.h */ - case LIBSSH2_ERROR_NONE: - return CURLE_OK; - - case LIBSSH2_ERROR_SOCKET_NONE: - return CURLE_COULDNT_CONNECT; - - case LIBSSH2_ERROR_ALLOC: - return CURLE_OUT_OF_MEMORY; - - case LIBSSH2_ERROR_SOCKET_SEND: - return CURLE_SEND_ERROR; - - case LIBSSH2_ERROR_HOSTKEY_INIT: - case LIBSSH2_ERROR_HOSTKEY_SIGN: - case LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED: - case LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED: - return CURLE_PEER_FAILED_VERIFICATION; - - case LIBSSH2_ERROR_PASSWORD_EXPIRED: - return CURLE_LOGIN_DENIED; - - case LIBSSH2_ERROR_SOCKET_TIMEOUT: - case LIBSSH2_ERROR_TIMEOUT: - return CURLE_OPERATION_TIMEDOUT; - - case LIBSSH2_ERROR_EAGAIN: - return CURLE_AGAIN; - } - - /* TODO: map some more of the libssh2 errors to the more appropriate CURLcode - error code, and possibly add a few new SSH-related one. We must however - not return or even depend on libssh2 errors in the public libcurl API */ - - return CURLE_SSH; -} - -static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc) -{ - (void)abstract; /* arg not used */ - return malloc(count); -} - -static LIBSSH2_REALLOC_FUNC(my_libssh2_realloc) -{ - (void)abstract; /* arg not used */ - return realloc(ptr, count); -} - -static LIBSSH2_FREE_FUNC(my_libssh2_free) -{ - (void)abstract; /* arg not used */ - if(ptr) /* ssh2 agent sometimes call free with null ptr */ - free(ptr); -} - -/* - * SSH State machine related code - */ -/* This is the ONLY way to change SSH state! */ -static void state(struct connectdata *conn, sshstate nowstate) -{ - struct ssh_conn *sshc = &conn->proto.sshc; -#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) - /* for debug purposes */ - static const char * const names[] = { - "SSH_STOP", - "SSH_INIT", - "SSH_S_STARTUP", - "SSH_HOSTKEY", - "SSH_AUTHLIST", - "SSH_AUTH_PKEY_INIT", - "SSH_AUTH_PKEY", - "SSH_AUTH_PASS_INIT", - "SSH_AUTH_PASS", - "SSH_AUTH_AGENT_INIT", - "SSH_AUTH_AGENT_LIST", - "SSH_AUTH_AGENT", - "SSH_AUTH_HOST_INIT", - "SSH_AUTH_HOST", - "SSH_AUTH_KEY_INIT", - "SSH_AUTH_KEY", - "SSH_AUTH_DONE", - "SSH_SFTP_INIT", - "SSH_SFTP_REALPATH", - "SSH_SFTP_QUOTE_INIT", - "SSH_SFTP_POSTQUOTE_INIT", - "SSH_SFTP_QUOTE", - "SSH_SFTP_NEXT_QUOTE", - "SSH_SFTP_QUOTE_STAT", - "SSH_SFTP_QUOTE_SETSTAT", - "SSH_SFTP_QUOTE_SYMLINK", - "SSH_SFTP_QUOTE_MKDIR", - "SSH_SFTP_QUOTE_RENAME", - "SSH_SFTP_QUOTE_RMDIR", - "SSH_SFTP_QUOTE_UNLINK", - "SSH_SFTP_QUOTE_STATVFS", - "SSH_SFTP_GETINFO", - "SSH_SFTP_FILETIME", - "SSH_SFTP_TRANS_INIT", - "SSH_SFTP_UPLOAD_INIT", - "SSH_SFTP_CREATE_DIRS_INIT", - "SSH_SFTP_CREATE_DIRS", - "SSH_SFTP_CREATE_DIRS_MKDIR", - "SSH_SFTP_READDIR_INIT", - "SSH_SFTP_READDIR", - "SSH_SFTP_READDIR_LINK", - "SSH_SFTP_READDIR_BOTTOM", - "SSH_SFTP_READDIR_DONE", - "SSH_SFTP_DOWNLOAD_INIT", - "SSH_SFTP_DOWNLOAD_STAT", - "SSH_SFTP_CLOSE", - "SSH_SFTP_SHUTDOWN", - "SSH_SCP_TRANS_INIT", - "SSH_SCP_UPLOAD_INIT", - "SSH_SCP_DOWNLOAD_INIT", - "SSH_SCP_DONE", - "SSH_SCP_SEND_EOF", - "SSH_SCP_WAIT_EOF", - "SSH_SCP_WAIT_CLOSE", - "SSH_SCP_CHANNEL_FREE", - "SSH_SESSION_DISCONNECT", - "SSH_SESSION_FREE", - "QUIT" - }; - - if(sshc->state != nowstate) { - infof(conn->data, "SFTP %p state change from %s to %s\n", - (void *)sshc, names[sshc->state], names[nowstate]); - } -#endif - - sshc->state = nowstate; -} - -/* figure out the path to work with in this particular request */ -static CURLcode ssh_getworkingpath(struct connectdata *conn, - char *homedir, /* when SFTP is used */ - char **path) /* returns the allocated - real path to work with */ -{ - struct Curl_easy *data = conn->data; - char *real_path = NULL; - char *working_path; - size_t working_path_len; - CURLcode result = - Curl_urldecode(data, data->state.path, 0, &working_path, - &working_path_len, FALSE); - if(result) - return result; - - /* Check for /~/, indicating relative to the user's home directory */ - if(conn->handler->protocol & CURLPROTO_SCP) { - real_path = malloc(working_path_len+1); - if(real_path == NULL) { - free(working_path); - return CURLE_OUT_OF_MEMORY; - } - if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3))) - /* It is referenced to the home directory, so strip the leading '/~/' */ - memcpy(real_path, working_path+3, 4 + working_path_len-3); - else - memcpy(real_path, working_path, 1 + working_path_len); - } - else if(conn->handler->protocol & CURLPROTO_SFTP) { - if((working_path_len > 1) && (working_path[1] == '~')) { - size_t homelen = strlen(homedir); - real_path = malloc(homelen + working_path_len + 1); - if(real_path == NULL) { - free(working_path); - return CURLE_OUT_OF_MEMORY; - } - /* It is referenced to the home directory, so strip the - leading '/' */ - memcpy(real_path, homedir, homelen); - real_path[homelen] = '/'; - real_path[homelen+1] = '\0'; - if(working_path_len > 3) { - memcpy(real_path+homelen+1, working_path + 3, - 1 + working_path_len -3); - } - } - else { - real_path = malloc(working_path_len+1); - if(real_path == NULL) { - free(working_path); - return CURLE_OUT_OF_MEMORY; - } - memcpy(real_path, working_path, 1+working_path_len); - } - } - - free(working_path); - - /* store the pointer for the caller to receive */ - *path = real_path; - - return CURLE_OK; -} - -#ifdef HAVE_LIBSSH2_KNOWNHOST_API -static int sshkeycallback(struct Curl_easy *easy, - const struct curl_khkey *knownkey, /* known */ - const struct curl_khkey *foundkey, /* found */ - enum curl_khmatch match, - void *clientp) -{ - (void)easy; - (void)knownkey; - (void)foundkey; - (void)clientp; - - /* we only allow perfect matches, and we reject everything else */ - return (match != CURLKHMATCH_OK)?CURLKHSTAT_REJECT:CURLKHSTAT_FINE; -} -#endif - -/* - * Earlier libssh2 versions didn't have the ability to seek to 64bit positions - * with 32bit size_t. - */ -#ifdef HAVE_LIBSSH2_SFTP_SEEK64 -#define SFTP_SEEK(x,y) libssh2_sftp_seek64(x, (libssh2_uint64_t)y) -#else -#define SFTP_SEEK(x,y) libssh2_sftp_seek(x, (size_t)y) -#endif - -/* - * Earlier libssh2 versions didn't do SCP properly beyond 32bit sizes on 32bit - * architectures so we check of the necessary function is present. - */ -#ifndef HAVE_LIBSSH2_SCP_SEND64 -#define SCP_SEND(a,b,c,d) libssh2_scp_send_ex(a, b, (int)(c), (size_t)d, 0, 0) -#else -#define SCP_SEND(a,b,c,d) libssh2_scp_send64(a, b, (int)(c), \ - (libssh2_uint64_t)d, 0, 0) -#endif - -/* - * libssh2 1.2.8 fixed the problem with 32bit ints used for sockets on win64. - */ -#ifdef HAVE_LIBSSH2_SESSION_HANDSHAKE -#define libssh2_session_startup(x,y) libssh2_session_handshake(x,y) -#endif - -static CURLcode ssh_knownhost(struct connectdata *conn) -{ - CURLcode result = CURLE_OK; - -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - struct Curl_easy *data = conn->data; - - if(data->set.str[STRING_SSH_KNOWNHOSTS]) { - /* we're asked to verify the host against a file */ - struct ssh_conn *sshc = &conn->proto.sshc; - int rc; - int keytype; - size_t keylen; - const char *remotekey = libssh2_session_hostkey(sshc->ssh_session, - &keylen, &keytype); - int keycheck = LIBSSH2_KNOWNHOST_CHECK_FAILURE; - int keybit = 0; - - if(remotekey) { - /* - * A subject to figure out is what host name we need to pass in here. - * What host name does OpenSSH store in its file if an IDN name is - * used? - */ - struct libssh2_knownhost *host; - enum curl_khmatch keymatch; - curl_sshkeycallback func = - data->set.ssh_keyfunc?data->set.ssh_keyfunc:sshkeycallback; - struct curl_khkey knownkey; - struct curl_khkey *knownkeyp = NULL; - struct curl_khkey foundkey; - - keybit = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)? - LIBSSH2_KNOWNHOST_KEY_SSHRSA:LIBSSH2_KNOWNHOST_KEY_SSHDSS; - -#ifdef HAVE_LIBSSH2_KNOWNHOST_CHECKP - keycheck = libssh2_knownhost_checkp(sshc->kh, - conn->host.name, - (conn->remote_port != PORT_SSH)? - conn->remote_port:-1, - remotekey, keylen, - LIBSSH2_KNOWNHOST_TYPE_PLAIN| - LIBSSH2_KNOWNHOST_KEYENC_RAW| - keybit, - &host); -#else - keycheck = libssh2_knownhost_check(sshc->kh, - conn->host.name, - remotekey, keylen, - LIBSSH2_KNOWNHOST_TYPE_PLAIN| - LIBSSH2_KNOWNHOST_KEYENC_RAW| - keybit, - &host); -#endif - - infof(data, "SSH host check: %d, key: %s\n", keycheck, - (keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH)? - host->key:""); - - /* setup 'knownkey' */ - if(keycheck <= LIBSSH2_KNOWNHOST_CHECK_MISMATCH) { - knownkey.key = host->key; - knownkey.len = 0; - knownkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)? - CURLKHTYPE_RSA : CURLKHTYPE_DSS; - knownkeyp = &knownkey; - } - - /* setup 'foundkey' */ - foundkey.key = remotekey; - foundkey.len = keylen; - foundkey.keytype = (keytype == LIBSSH2_HOSTKEY_TYPE_RSA)? - CURLKHTYPE_RSA : CURLKHTYPE_DSS; - - /* - * if any of the LIBSSH2_KNOWNHOST_CHECK_* defines and the - * curl_khmatch enum are ever modified, we need to introduce a - * translation table here! - */ - keymatch = (enum curl_khmatch)keycheck; - - /* Ask the callback how to behave */ - rc = func(data, knownkeyp, /* from the knownhosts file */ - &foundkey, /* from the remote host */ - keymatch, data->set.ssh_keyfunc_userp); - } - else - /* no remotekey means failure! */ - rc = CURLKHSTAT_REJECT; - - switch(rc) { - default: /* unknown return codes will equal reject */ - /* FALLTHROUGH */ - case CURLKHSTAT_REJECT: - state(conn, SSH_SESSION_FREE); - /* FALLTHROUGH */ - case CURLKHSTAT_DEFER: - /* DEFER means bail out but keep the SSH_HOSTKEY state */ - result = sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION; - break; - case CURLKHSTAT_FINE: - case CURLKHSTAT_FINE_ADD_TO_FILE: - /* proceed */ - if(keycheck != LIBSSH2_KNOWNHOST_CHECK_MATCH) { - /* the found host+key didn't match but has been told to be fine - anyway so we add it in memory */ - int addrc = libssh2_knownhost_add(sshc->kh, - conn->host.name, NULL, - remotekey, keylen, - LIBSSH2_KNOWNHOST_TYPE_PLAIN| - LIBSSH2_KNOWNHOST_KEYENC_RAW| - keybit, NULL); - if(addrc) - infof(data, "Warning adding the known host %s failed!\n", - conn->host.name); - else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE) { - /* now we write the entire in-memory list of known hosts to the - known_hosts file */ - int wrc = - libssh2_knownhost_writefile(sshc->kh, - data->set.str[STRING_SSH_KNOWNHOSTS], - LIBSSH2_KNOWNHOST_FILE_OPENSSH); - if(wrc) { - infof(data, "Warning, writing %s failed!\n", - data->set.str[STRING_SSH_KNOWNHOSTS]); - } - } - } - break; - } - } -#else /* HAVE_LIBSSH2_KNOWNHOST_API */ - (void)conn; -#endif - return result; -} - -static CURLcode ssh_check_fingerprint(struct connectdata *conn) -{ - struct ssh_conn *sshc = &conn->proto.sshc; - struct Curl_easy *data = conn->data; - const char *pubkey_md5 = data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]; - char md5buffer[33]; - int i; - - const char *fingerprint = libssh2_hostkey_hash(sshc->ssh_session, - LIBSSH2_HOSTKEY_HASH_MD5); - - if(fingerprint) { - /* The fingerprint points to static storage (!), don't free() it. */ - for(i = 0; i < 16; i++) - snprintf(&md5buffer[i*2], 3, "%02x", (unsigned char) fingerprint[i]); - infof(data, "SSH MD5 fingerprint: %s\n", md5buffer); - } - - /* Before we authenticate we check the hostkey's MD5 fingerprint - * against a known fingerprint, if available. - */ - if(pubkey_md5 && strlen(pubkey_md5) == 32) { - if(!fingerprint || !strcasecompare(md5buffer, pubkey_md5)) { - if(fingerprint) - failf(data, - "Denied establishing ssh session: mismatch md5 fingerprint. " - "Remote %s is not equal to %s", md5buffer, pubkey_md5); - else - failf(data, - "Denied establishing ssh session: md5 fingerprint not available"); - state(conn, SSH_SESSION_FREE); - sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION; - return sshc->actualcode; - } - else { - infof(data, "MD5 checksum match!\n"); - /* as we already matched, we skip the check for known hosts */ - return CURLE_OK; - } - } - else - return ssh_knownhost(conn); -} - -/* - * ssh_statemach_act() runs the SSH state machine as far as it can without - * blocking and without reaching the end. The data the pointer 'block' points - * to will be set to TRUE if the libssh2 function returns LIBSSH2_ERROR_EAGAIN - * meaning it wants to be called again when the socket is ready - */ - -static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct SSHPROTO *sftp_scp = data->req.protop; - struct ssh_conn *sshc = &conn->proto.sshc; - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - char *new_readdir_line; - int rc = LIBSSH2_ERROR_NONE; - int err; - int seekerr = CURL_SEEKFUNC_OK; - *block = 0; /* we're not blocking by default */ - - do { - - switch(sshc->state) { - case SSH_INIT: - sshc->secondCreateDirs = 0; - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_OK; - - /* Set libssh2 to non-blocking, since everything internally is - non-blocking */ - libssh2_session_set_blocking(sshc->ssh_session, 0); - - state(conn, SSH_S_STARTUP); - /* fall-through */ - - case SSH_S_STARTUP: - rc = libssh2_session_startup(sshc->ssh_session, (int)sock); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc) { - failf(data, "Failure establishing ssh session"); - state(conn, SSH_SESSION_FREE); - sshc->actualcode = CURLE_FAILED_INIT; - break; - } - - state(conn, SSH_HOSTKEY); - - /* fall-through */ - case SSH_HOSTKEY: - /* - * Before we authenticate we should check the hostkey's fingerprint - * against our known hosts. How that is handled (reading from file, - * whatever) is up to us. - */ - result = ssh_check_fingerprint(conn); - if(!result) - state(conn, SSH_AUTHLIST); - /* ssh_check_fingerprint sets state appropriately on error */ - break; - - case SSH_AUTHLIST: - /* - * Figure out authentication methods - * NB: As soon as we have provided a username to an openssh server we - * must never change it later. Thus, always specify the correct username - * here, even though the libssh2 docs kind of indicate that it should be - * possible to get a 'generic' list (not user-specific) of authentication - * methods, presumably with a blank username. That won't work in my - * experience. - * So always specify it here. - */ - sshc->authlist = libssh2_userauth_list(sshc->ssh_session, - conn->user, - curlx_uztoui(strlen(conn->user))); - - if(!sshc->authlist) { - if(libssh2_userauth_authenticated(sshc->ssh_session)) { - sshc->authed = TRUE; - infof(data, "SSH user accepted with no authentication\n"); - state(conn, SSH_AUTH_DONE); - break; - } - else { - err = libssh2_session_last_errno(sshc->ssh_session); - if(err == LIBSSH2_ERROR_EAGAIN) - rc = LIBSSH2_ERROR_EAGAIN; - else { - state(conn, SSH_SESSION_FREE); - sshc->actualcode = libssh2_session_error_to_CURLE(err); - } - break; - } - } - infof(data, "SSH authentication methods available: %s\n", - sshc->authlist); - - state(conn, SSH_AUTH_PKEY_INIT); - break; - - case SSH_AUTH_PKEY_INIT: - /* - * Check the supported auth types in the order I feel is most secure - * with the requested type of authentication - */ - sshc->authed = FALSE; - - if((data->set.ssh_auth_types & CURLSSH_AUTH_PUBLICKEY) && - (strstr(sshc->authlist, "publickey") != NULL)) { - char *home = NULL; - bool out_of_memory = FALSE; - - sshc->rsa_pub = sshc->rsa = NULL; - - /* To ponder about: should really the lib be messing about with the - HOME environment variable etc? */ - home = curl_getenv("HOME"); - - if(data->set.str[STRING_SSH_PRIVATE_KEY]) - sshc->rsa = strdup(data->set.str[STRING_SSH_PRIVATE_KEY]); - else { - /* If no private key file is specified, try some common paths. */ - if(home) { - /* Try ~/.ssh first. */ - sshc->rsa = aprintf("%s/.ssh/id_rsa", home); - if(!sshc->rsa) - out_of_memory = TRUE; - else if(access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - sshc->rsa = aprintf("%s/.ssh/id_dsa", home); - if(!sshc->rsa) - out_of_memory = TRUE; - else if(access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - } - } - } - if(!out_of_memory && !sshc->rsa) { - /* Nothing found; try the current dir. */ - sshc->rsa = strdup("id_rsa"); - if(sshc->rsa && access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - sshc->rsa = strdup("id_dsa"); - if(sshc->rsa && access(sshc->rsa, R_OK) != 0) { - Curl_safefree(sshc->rsa); - /* Out of guesses. Set to the empty string to avoid - * surprising info messages. */ - sshc->rsa = strdup(""); - } - } - } - } - - /* - * Unless the user explicitly specifies a public key file, let - * libssh2 extract the public key from the private key file. - * This is done by simply passing sshc->rsa_pub = NULL. - */ - if(data->set.str[STRING_SSH_PUBLIC_KEY] - /* treat empty string the same way as NULL */ - && data->set.str[STRING_SSH_PUBLIC_KEY][0]) { - sshc->rsa_pub = strdup(data->set.str[STRING_SSH_PUBLIC_KEY]); - if(!sshc->rsa_pub) - out_of_memory = TRUE; - } - - if(out_of_memory || sshc->rsa == NULL) { - free(home); - Curl_safefree(sshc->rsa); - Curl_safefree(sshc->rsa_pub); - state(conn, SSH_SESSION_FREE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - - sshc->passphrase = data->set.ssl.key_passwd; - if(!sshc->passphrase) - sshc->passphrase = ""; - - free(home); - - if(sshc->rsa_pub) - infof(data, "Using SSH public key file '%s'\n", sshc->rsa_pub); - infof(data, "Using SSH private key file '%s'\n", sshc->rsa); - - state(conn, SSH_AUTH_PKEY); - } - else { - state(conn, SSH_AUTH_PASS_INIT); - } - break; - - case SSH_AUTH_PKEY: - /* The function below checks if the files exists, no need to stat() here. - */ - rc = libssh2_userauth_publickey_fromfile_ex(sshc->ssh_session, - conn->user, - curlx_uztoui( - strlen(conn->user)), - sshc->rsa_pub, - sshc->rsa, sshc->passphrase); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - - Curl_safefree(sshc->rsa_pub); - Curl_safefree(sshc->rsa); - - if(rc == 0) { - sshc->authed = TRUE; - infof(data, "Initialized SSH public key authentication\n"); - state(conn, SSH_AUTH_DONE); - } - else { - char *err_msg; - (void)libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0); - infof(data, "SSH public key authentication failed: %s\n", err_msg); - state(conn, SSH_AUTH_PASS_INIT); - rc = 0; /* clear rc and continue */ - } - break; - - case SSH_AUTH_PASS_INIT: - if((data->set.ssh_auth_types & CURLSSH_AUTH_PASSWORD) && - (strstr(sshc->authlist, "password") != NULL)) { - state(conn, SSH_AUTH_PASS); - } - else { - state(conn, SSH_AUTH_HOST_INIT); - rc = 0; /* clear rc and continue */ - } - break; - - case SSH_AUTH_PASS: - rc = libssh2_userauth_password_ex(sshc->ssh_session, conn->user, - curlx_uztoui(strlen(conn->user)), - conn->passwd, - curlx_uztoui(strlen(conn->passwd)), - NULL); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc == 0) { - sshc->authed = TRUE; - infof(data, "Initialized password authentication\n"); - state(conn, SSH_AUTH_DONE); - } - else { - state(conn, SSH_AUTH_HOST_INIT); - rc = 0; /* clear rc and continue */ - } - break; - - case SSH_AUTH_HOST_INIT: - if((data->set.ssh_auth_types & CURLSSH_AUTH_HOST) && - (strstr(sshc->authlist, "hostbased") != NULL)) { - state(conn, SSH_AUTH_HOST); - } - else { - state(conn, SSH_AUTH_AGENT_INIT); - } - break; - - case SSH_AUTH_HOST: - state(conn, SSH_AUTH_AGENT_INIT); - break; - - case SSH_AUTH_AGENT_INIT: -#ifdef HAVE_LIBSSH2_AGENT_API - if((data->set.ssh_auth_types & CURLSSH_AUTH_AGENT) - && (strstr(sshc->authlist, "publickey") != NULL)) { - - /* Connect to the ssh-agent */ - /* The agent could be shared by a curl thread i believe - but nothing obvious as keys can be added/removed at any time */ - if(!sshc->ssh_agent) { - sshc->ssh_agent = libssh2_agent_init(sshc->ssh_session); - if(!sshc->ssh_agent) { - infof(data, "Could not create agent object\n"); - - state(conn, SSH_AUTH_KEY_INIT); - break; - } - } - - rc = libssh2_agent_connect(sshc->ssh_agent); - if(rc == LIBSSH2_ERROR_EAGAIN) - break; - if(rc < 0) { - infof(data, "Failure connecting to agent\n"); - state(conn, SSH_AUTH_KEY_INIT); - rc = 0; /* clear rc and continue */ - } - else { - state(conn, SSH_AUTH_AGENT_LIST); - } - } - else -#endif /* HAVE_LIBSSH2_AGENT_API */ - state(conn, SSH_AUTH_KEY_INIT); - break; - - case SSH_AUTH_AGENT_LIST: -#ifdef HAVE_LIBSSH2_AGENT_API - rc = libssh2_agent_list_identities(sshc->ssh_agent); - - if(rc == LIBSSH2_ERROR_EAGAIN) - break; - if(rc < 0) { - infof(data, "Failure requesting identities to agent\n"); - state(conn, SSH_AUTH_KEY_INIT); - rc = 0; /* clear rc and continue */ - } - else { - state(conn, SSH_AUTH_AGENT); - sshc->sshagent_prev_identity = NULL; - } -#endif - break; - - case SSH_AUTH_AGENT: -#ifdef HAVE_LIBSSH2_AGENT_API - /* as prev_identity evolves only after an identity user auth finished we - can safely request it again as long as EAGAIN is returned here or by - libssh2_agent_userauth */ - rc = libssh2_agent_get_identity(sshc->ssh_agent, - &sshc->sshagent_identity, - sshc->sshagent_prev_identity); - if(rc == LIBSSH2_ERROR_EAGAIN) - break; - - if(rc == 0) { - rc = libssh2_agent_userauth(sshc->ssh_agent, conn->user, - sshc->sshagent_identity); - - if(rc < 0) { - if(rc != LIBSSH2_ERROR_EAGAIN) - /* tried and failed? go to next identity */ - sshc->sshagent_prev_identity = sshc->sshagent_identity; - else - break; - } - } - - if(rc < 0) - infof(data, "Failure requesting identities to agent\n"); - else if(rc == 1) - infof(data, "No identity would match\n"); - - if(rc == LIBSSH2_ERROR_NONE) { - sshc->authed = TRUE; - infof(data, "Agent based authentication successful\n"); - state(conn, SSH_AUTH_DONE); - } - else { - state(conn, SSH_AUTH_KEY_INIT); - rc = 0; /* clear rc and continue */ - } -#endif - break; - - case SSH_AUTH_KEY_INIT: - if((data->set.ssh_auth_types & CURLSSH_AUTH_KEYBOARD) - && (strstr(sshc->authlist, "keyboard-interactive") != NULL)) { - state(conn, SSH_AUTH_KEY); - } - else { - state(conn, SSH_AUTH_DONE); - } - break; - - case SSH_AUTH_KEY: - /* Authentication failed. Continue with keyboard-interactive now. */ - rc = libssh2_userauth_keyboard_interactive_ex(sshc->ssh_session, - conn->user, - curlx_uztoui( - strlen(conn->user)), - &kbd_callback); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc == 0) { - sshc->authed = TRUE; - infof(data, "Initialized keyboard interactive authentication\n"); - } - state(conn, SSH_AUTH_DONE); - break; - - case SSH_AUTH_DONE: - if(!sshc->authed) { - failf(data, "Authentication failure"); - state(conn, SSH_SESSION_FREE); - sshc->actualcode = CURLE_LOGIN_DENIED; - break; - } - - /* - * At this point we have an authenticated ssh session. - */ - infof(data, "Authentication complete\n"); - - Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSH is connected */ - - conn->sockfd = sock; - conn->writesockfd = CURL_SOCKET_BAD; - - if(conn->handler->protocol == CURLPROTO_SFTP) { - state(conn, SSH_SFTP_INIT); - break; - } - infof(data, "SSH CONNECT phase done\n"); - state(conn, SSH_STOP); - break; - - case SSH_SFTP_INIT: - /* - * Start the libssh2 sftp session - */ - sshc->sftp_session = libssh2_sftp_init(sshc->ssh_session); - if(!sshc->sftp_session) { - if(libssh2_session_last_errno(sshc->ssh_session) == - LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - else { - char *err_msg; - - (void)libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0); - failf(data, "Failure initializing sftp session: %s", err_msg); - state(conn, SSH_SESSION_FREE); - sshc->actualcode = CURLE_FAILED_INIT; - break; - } - } - state(conn, SSH_SFTP_REALPATH); - break; - - case SSH_SFTP_REALPATH: - { - char tempHome[PATH_MAX]; - - /* - * Get the "home" directory - */ - rc = sftp_libssh2_realpath(sshc->sftp_session, ".", - tempHome, PATH_MAX-1); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc > 0) { - /* It seems that this string is not always NULL terminated */ - tempHome[rc] = '\0'; - sshc->homedir = strdup(tempHome); - if(!sshc->homedir) { - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - conn->data->state.most_recent_ftp_entrypath = sshc->homedir; - } - else { - /* Return the error type */ - err = sftp_libssh2_last_error(sshc->sftp_session); - if(err) - result = sftp_libssh2_error_to_CURLE(err); - else - /* in this case, the error wasn't in the SFTP level but for example - a time-out or similar */ - result = CURLE_SSH; - sshc->actualcode = result; - DEBUGF(infof(data, "error = %d makes libcurl = %d\n", - err, (int)result)); - state(conn, SSH_STOP); - break; - } - } - /* This is the last step in the SFTP connect phase. Do note that while - we get the homedir here, we get the "workingpath" in the DO action - since the homedir will remain the same between request but the - working path will not. */ - DEBUGF(infof(data, "SSH CONNECT phase done\n")); - state(conn, SSH_STOP); - break; - - case SSH_SFTP_QUOTE_INIT: - - result = ssh_getworkingpath(conn, sshc->homedir, &sftp_scp->path); - if(result) { - sshc->actualcode = result; - state(conn, SSH_STOP); - break; - } - - if(data->set.quote) { - infof(data, "Sending quote commands\n"); - sshc->quote_item = data->set.quote; - state(conn, SSH_SFTP_QUOTE); - } - else { - state(conn, SSH_SFTP_GETINFO); - } - break; - - case SSH_SFTP_POSTQUOTE_INIT: - if(data->set.postquote) { - infof(data, "Sending quote commands\n"); - sshc->quote_item = data->set.postquote; - state(conn, SSH_SFTP_QUOTE); - } - else { - state(conn, SSH_STOP); - } - break; - - case SSH_SFTP_QUOTE: - /* Send any quote commands */ - { - const char *cp; - - /* - * Support some of the "FTP" commands - */ - char *cmd = sshc->quote_item->data; - sshc->acceptfail = FALSE; - - /* if a command starts with an asterisk, which a legal SFTP command never - can, the command will be allowed to fail without it causing any - aborts or cancels etc. It will cause libcurl to act as if the command - is successful, whatever the server reponds. */ - - if(cmd[0] == '*') { - cmd++; - sshc->acceptfail = TRUE; - } - - if(strcasecompare("pwd", cmd)) { - /* output debug output if that is requested */ - char *tmp = aprintf("257 \"%s\" is current directory.\n", - sftp_scp->path); - if(!tmp) { - result = CURLE_OUT_OF_MEMORY; - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - break; - } - if(data->set.verbose) { - Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"PWD\n", 4, conn); - Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp), conn); - } - /* this sends an FTP-like "header" to the header callback so that the - current directory can be read very similar to how it is read when - using ordinary FTP. */ - result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp)); - free(tmp); - if(result) { - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = result; - } - else - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - } - else if(cmd) { - /* - * the arguments following the command must be separated from the - * command with a space so we can check for it unconditionally - */ - cp = strchr(cmd, ' '); - if(cp == NULL) { - failf(data, "Syntax error in SFTP command. Supply parameter(s)!"); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - - /* - * also, every command takes at least one argument so we get that - * first argument right now - */ - result = get_pathname(&cp, &sshc->quote_path1); - if(result) { - if(result == CURLE_OUT_OF_MEMORY) - failf(data, "Out of memory"); - else - failf(data, "Syntax error: Bad first parameter"); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = result; - break; - } - - /* - * SFTP is a binary protocol, so we don't send text commands - * to the server. Instead, we scan for commands used by - * OpenSSH's sftp program and call the appropriate libssh2 - * functions. - */ - if(strncasecompare(cmd, "chgrp ", 6) || - strncasecompare(cmd, "chmod ", 6) || - strncasecompare(cmd, "chown ", 6) ) { - /* attribute change */ - - /* sshc->quote_path1 contains the mode to set */ - /* get the destination */ - result = get_pathname(&cp, &sshc->quote_path2); - if(result) { - if(result == CURLE_OUT_OF_MEMORY) - failf(data, "Out of memory"); - else - failf(data, "Syntax error in chgrp/chmod/chown: " - "Bad second parameter"); - Curl_safefree(sshc->quote_path1); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = result; - break; - } - memset(&sshc->quote_attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES)); - state(conn, SSH_SFTP_QUOTE_STAT); - break; - } - else if(strncasecompare(cmd, "ln ", 3) || - strncasecompare(cmd, "symlink ", 8)) { - /* symbolic linking */ - /* sshc->quote_path1 is the source */ - /* get the destination */ - result = get_pathname(&cp, &sshc->quote_path2); - if(result) { - if(result == CURLE_OUT_OF_MEMORY) - failf(data, "Out of memory"); - else - failf(data, - "Syntax error in ln/symlink: Bad second parameter"); - Curl_safefree(sshc->quote_path1); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = result; - break; - } - state(conn, SSH_SFTP_QUOTE_SYMLINK); - break; - } - else if(strncasecompare(cmd, "mkdir ", 6)) { - /* create dir */ - state(conn, SSH_SFTP_QUOTE_MKDIR); - break; - } - else if(strncasecompare(cmd, "rename ", 7)) { - /* rename file */ - /* first param is the source path */ - /* second param is the dest. path */ - result = get_pathname(&cp, &sshc->quote_path2); - if(result) { - if(result == CURLE_OUT_OF_MEMORY) - failf(data, "Out of memory"); - else - failf(data, "Syntax error in rename: Bad second parameter"); - Curl_safefree(sshc->quote_path1); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = result; - break; - } - state(conn, SSH_SFTP_QUOTE_RENAME); - break; - } - else if(strncasecompare(cmd, "rmdir ", 6)) { - /* delete dir */ - state(conn, SSH_SFTP_QUOTE_RMDIR); - break; - } - else if(strncasecompare(cmd, "rm ", 3)) { - state(conn, SSH_SFTP_QUOTE_UNLINK); - break; - } -#ifdef HAS_STATVFS_SUPPORT - else if(strncasecompare(cmd, "statvfs ", 8)) { - state(conn, SSH_SFTP_QUOTE_STATVFS); - break; - } -#endif - - failf(data, "Unknown SFTP command"); - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - } - if(!sshc->quote_item) { - state(conn, SSH_SFTP_GETINFO); - } - break; - - case SSH_SFTP_NEXT_QUOTE: - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - - sshc->quote_item = sshc->quote_item->next; - - if(sshc->quote_item) { - state(conn, SSH_SFTP_QUOTE); - } - else { - if(sshc->nextstate != SSH_NO_STATE) { - state(conn, sshc->nextstate); - sshc->nextstate = SSH_NO_STATE; - } - else { - state(conn, SSH_SFTP_GETINFO); - } - } - break; - - case SSH_SFTP_QUOTE_STAT: - { - char *cmd = sshc->quote_item->data; - sshc->acceptfail = FALSE; - - /* if a command starts with an asterisk, which a legal SFTP command never - can, the command will be allowed to fail without it causing any - aborts or cancels etc. It will cause libcurl to act as if the command - is successful, whatever the server reponds. */ - - if(cmd[0] == '*') { - cmd++; - sshc->acceptfail = TRUE; - } - - if(!strncasecompare(cmd, "chmod", 5)) { - /* Since chown and chgrp only set owner OR group but libssh2 wants to - * set them both at once, we need to obtain the current ownership - * first. This takes an extra protocol round trip. - */ - rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2, - curlx_uztoui(strlen(sshc->quote_path2)), - LIBSSH2_SFTP_STAT, - &sshc->quote_attrs); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { /* get those attributes */ - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "Attempt to get SFTP stats failed: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - } - - /* Now set the new attributes... */ - if(strncasecompare(cmd, "chgrp", 5)) { - sshc->quote_attrs.gid = strtoul(sshc->quote_path1, NULL, 10); - sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID; - if(sshc->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0]) && - !sshc->acceptfail) { - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "Syntax error: chgrp gid not a number"); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - } - else if(strncasecompare(cmd, "chmod", 5)) { - sshc->quote_attrs.permissions = strtoul(sshc->quote_path1, NULL, 8); - sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_PERMISSIONS; - /* permissions are octal */ - if(sshc->quote_attrs.permissions == 0 && - !ISDIGIT(sshc->quote_path1[0])) { - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "Syntax error: chmod permissions not a number"); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - } - else if(strncasecompare(cmd, "chown", 5)) { - sshc->quote_attrs.uid = strtoul(sshc->quote_path1, NULL, 10); - sshc->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID; - if(sshc->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0]) && - !sshc->acceptfail) { - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "Syntax error: chown uid not a number"); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - } - - /* Now send the completed structure... */ - state(conn, SSH_SFTP_QUOTE_SETSTAT); - break; - } - - case SSH_SFTP_QUOTE_SETSTAT: - rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2, - curlx_uztoui(strlen(sshc->quote_path2)), - LIBSSH2_SFTP_SETSTAT, - &sshc->quote_attrs); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "Attempt to set SFTP stats failed: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - - case SSH_SFTP_QUOTE_SYMLINK: - rc = libssh2_sftp_symlink_ex(sshc->sftp_session, sshc->quote_path1, - curlx_uztoui(strlen(sshc->quote_path1)), - sshc->quote_path2, - curlx_uztoui(strlen(sshc->quote_path2)), - LIBSSH2_SFTP_SYMLINK); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "symlink command failed: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - - case SSH_SFTP_QUOTE_MKDIR: - rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshc->quote_path1, - curlx_uztoui(strlen(sshc->quote_path1)), - data->set.new_directory_perms); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - failf(data, "mkdir command failed: %s", sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - - case SSH_SFTP_QUOTE_RENAME: - rc = libssh2_sftp_rename_ex(sshc->sftp_session, sshc->quote_path1, - curlx_uztoui(strlen(sshc->quote_path1)), - sshc->quote_path2, - curlx_uztoui(strlen(sshc->quote_path2)), - LIBSSH2_SFTP_RENAME_OVERWRITE | - LIBSSH2_SFTP_RENAME_ATOMIC | - LIBSSH2_SFTP_RENAME_NATIVE); - - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - failf(data, "rename command failed: %s", sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - - case SSH_SFTP_QUOTE_RMDIR: - rc = libssh2_sftp_rmdir_ex(sshc->sftp_session, sshc->quote_path1, - curlx_uztoui(strlen(sshc->quote_path1))); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - failf(data, "rmdir command failed: %s", sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - - case SSH_SFTP_QUOTE_UNLINK: - rc = libssh2_sftp_unlink_ex(sshc->sftp_session, sshc->quote_path1, - curlx_uztoui(strlen(sshc->quote_path1))); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - failf(data, "rm command failed: %s", sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - -#ifdef HAS_STATVFS_SUPPORT - case SSH_SFTP_QUOTE_STATVFS: - { - LIBSSH2_SFTP_STATVFS statvfs; - rc = libssh2_sftp_statvfs(sshc->sftp_session, sshc->quote_path1, - curlx_uztoui(strlen(sshc->quote_path1)), - &statvfs); - - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc != 0 && !sshc->acceptfail) { - err = sftp_libssh2_last_error(sshc->sftp_session); - Curl_safefree(sshc->quote_path1); - failf(data, "statvfs command failed: %s", sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = CURLE_QUOTE_ERROR; - break; - } - else if(rc == 0) { - char *tmp = aprintf("statvfs:\n" - "f_bsize: %llu\n" "f_frsize: %llu\n" - "f_blocks: %llu\n" "f_bfree: %llu\n" - "f_bavail: %llu\n" "f_files: %llu\n" - "f_ffree: %llu\n" "f_favail: %llu\n" - "f_fsid: %llu\n" "f_flag: %llu\n" - "f_namemax: %llu\n", - statvfs.f_bsize, statvfs.f_frsize, - statvfs.f_blocks, statvfs.f_bfree, - statvfs.f_bavail, statvfs.f_files, - statvfs.f_ffree, statvfs.f_favail, - statvfs.f_fsid, statvfs.f_flag, - statvfs.f_namemax); - if(!tmp) { - result = CURLE_OUT_OF_MEMORY; - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - break; - } - - result = Curl_client_write(conn, CLIENTWRITE_HEADER, tmp, strlen(tmp)); - free(tmp); - if(result) { - state(conn, SSH_SFTP_CLOSE); - sshc->nextstate = SSH_NO_STATE; - sshc->actualcode = result; - } - } - state(conn, SSH_SFTP_NEXT_QUOTE); - break; - } -#endif - case SSH_SFTP_GETINFO: - { - if(data->set.get_filetime) { - state(conn, SSH_SFTP_FILETIME); - } - else { - state(conn, SSH_SFTP_TRANS_INIT); - } - break; - } - - case SSH_SFTP_FILETIME: - { - LIBSSH2_SFTP_ATTRIBUTES attrs; - - rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path, - curlx_uztoui(strlen(sftp_scp->path)), - LIBSSH2_SFTP_STAT, &attrs); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc == 0) { - data->info.filetime = (long)attrs.mtime; - } - - state(conn, SSH_SFTP_TRANS_INIT); - break; - } - - case SSH_SFTP_TRANS_INIT: - if(data->set.upload) - state(conn, SSH_SFTP_UPLOAD_INIT); - else { - if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/') - state(conn, SSH_SFTP_READDIR_INIT); - else - state(conn, SSH_SFTP_DOWNLOAD_INIT); - } - break; - - case SSH_SFTP_UPLOAD_INIT: - { - unsigned long flags; - /* - * NOTE!!! libssh2 requires that the destination path is a full path - * that includes the destination file and name OR ends in a "/" - * If this is not done the destination file will be named the - * same name as the last directory in the path. - */ - - if(data->state.resume_from != 0) { - LIBSSH2_SFTP_ATTRIBUTES attrs; - if(data->state.resume_from < 0) { - rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path, - curlx_uztoui(strlen(sftp_scp->path)), - LIBSSH2_SFTP_STAT, &attrs); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc) { - data->state.resume_from = 0; - } - else { - curl_off_t size = attrs.filesize; - if(size < 0) { - failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size); - return CURLE_BAD_DOWNLOAD_RESUME; - } - data->state.resume_from = attrs.filesize; - } - } - } - - if(data->set.ftp_append) - /* Try to open for append, but create if nonexisting */ - flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_APPEND; - else if(data->state.resume_from > 0) - /* If we have restart position then open for append */ - flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_APPEND; - else - /* Clear file before writing (normal behaviour) */ - flags = LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_TRUNC; - - sshc->sftp_handle = - libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path, - curlx_uztoui(strlen(sftp_scp->path)), - flags, data->set.new_file_perms, - LIBSSH2_SFTP_OPENFILE); - - if(!sshc->sftp_handle) { - rc = libssh2_session_last_errno(sshc->ssh_session); - - if(LIBSSH2_ERROR_EAGAIN == rc) - break; - else { - if(LIBSSH2_ERROR_SFTP_PROTOCOL == rc) - /* only when there was an SFTP protocol error can we extract - the sftp error! */ - err = sftp_libssh2_last_error(sshc->sftp_session); - else - err = -1; /* not an sftp error at all */ - - if(sshc->secondCreateDirs) { - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = err>= LIBSSH2_FX_OK? - sftp_libssh2_error_to_CURLE(err):CURLE_SSH; - failf(data, "Creating the dir/file failed: %s", - sftp_libssh2_strerror(err)); - break; - } - else if(((err == LIBSSH2_FX_NO_SUCH_FILE) || - (err == LIBSSH2_FX_FAILURE) || - (err == LIBSSH2_FX_NO_SUCH_PATH)) && - (data->set.ftp_create_missing_dirs && - (strlen(sftp_scp->path) > 1))) { - /* try to create the path remotely */ - rc = 0; /* clear rc and continue */ - sshc->secondCreateDirs = 1; - state(conn, SSH_SFTP_CREATE_DIRS_INIT); - break; - } - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = err>= LIBSSH2_FX_OK? - sftp_libssh2_error_to_CURLE(err):CURLE_SSH; - if(!sshc->actualcode) { - /* Sometimes, for some reason libssh2_sftp_last_error() returns - zero even though libssh2_sftp_open() failed previously! We need - to work around that! */ - sshc->actualcode = CURLE_SSH; - err=-1; - } - failf(data, "Upload failed: %s (%d/%d)", - err>= LIBSSH2_FX_OK?sftp_libssh2_strerror(err):"ssh error", - err, rc); - break; - } - } - - /* If we have a restart point then we need to seek to the correct - position. */ - if(data->state.resume_from > 0) { - /* Let's read off the proper amount of bytes from the input. */ - if(conn->seek_func) { - seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, - SEEK_SET); - } - - if(seekerr != CURL_SEEKFUNC_OK) { - - if(seekerr != CURL_SEEKFUNC_CANTSEEK) { - failf(data, "Could not seek stream"); - return CURLE_FTP_COULDNT_USE_REST; - } - /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ - else { - curl_off_t passed=0; - do { - size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); - - size_t actuallyread = - data->state.fread_func(data->state.buffer, 1, - readthisamountnow, data->state.in); - - passed += actuallyread; - if((actuallyread == 0) || (actuallyread > readthisamountnow)) { - /* this checks for greater-than only to make sure that the - CURL_READFUNC_ABORT return code still aborts */ - failf(data, "Failed to read data"); - return CURLE_FTP_COULDNT_USE_REST; - } - } while(passed < data->state.resume_from); - } - } - - /* now, decrease the size of the read */ - if(data->state.infilesize > 0) { - data->state.infilesize -= data->state.resume_from; - data->req.size = data->state.infilesize; - Curl_pgrsSetUploadSize(data, data->state.infilesize); - } - - SFTP_SEEK(sshc->sftp_handle, data->state.resume_from); - } - if(data->state.infilesize > 0) { - data->req.size = data->state.infilesize; - Curl_pgrsSetUploadSize(data, data->state.infilesize); - } - /* upload data */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL); - - /* not set by Curl_setup_transfer to preserve keepon bits */ - conn->sockfd = conn->writesockfd; - - if(result) { - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = result; - } - else { - /* store this original bitmask setup to use later on if we can't - figure out a "real" bitmask */ - sshc->orig_waitfor = data->req.keepon; - - /* we want to use the _sending_ function even when the socket turns - out readable as the underlying libssh2 sftp send function will deal - with both accordingly */ - conn->cselect_bits = CURL_CSELECT_OUT; - - /* since we don't really wait for anything at this point, we want the - state machine to move on as soon as possible so we set a very short - timeout here */ - Curl_expire(data, 0); - - state(conn, SSH_STOP); - } - break; - } - - case SSH_SFTP_CREATE_DIRS_INIT: - if(strlen(sftp_scp->path) > 1) { - sshc->slash_pos = sftp_scp->path + 1; /* ignore the leading '/' */ - state(conn, SSH_SFTP_CREATE_DIRS); - } - else { - state(conn, SSH_SFTP_UPLOAD_INIT); - } - break; - - case SSH_SFTP_CREATE_DIRS: - sshc->slash_pos = strchr(sshc->slash_pos, '/'); - if(sshc->slash_pos) { - *sshc->slash_pos = 0; - - infof(data, "Creating directory '%s'\n", sftp_scp->path); - state(conn, SSH_SFTP_CREATE_DIRS_MKDIR); - break; - } - else { - state(conn, SSH_SFTP_UPLOAD_INIT); - } - break; - - case SSH_SFTP_CREATE_DIRS_MKDIR: - /* 'mode' - parameter is preliminary - default to 0644 */ - rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sftp_scp->path, - curlx_uztoui(strlen(sftp_scp->path)), - data->set.new_directory_perms); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - *sshc->slash_pos = '/'; - ++sshc->slash_pos; - if(rc < 0) { - /* - * Abort if failure wasn't that the dir already exists or the - * permission was denied (creation might succeed further down the - * path) - retry on unspecific FAILURE also - */ - err = sftp_libssh2_last_error(sshc->sftp_session); - if((err != LIBSSH2_FX_FILE_ALREADY_EXISTS) && - (err != LIBSSH2_FX_FAILURE) && - (err != LIBSSH2_FX_PERMISSION_DENIED)) { - result = sftp_libssh2_error_to_CURLE(err); - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = result?result:CURLE_SSH; - break; - } - else { - rc = 0; /* clear rc and continue */ - } - } - state(conn, SSH_SFTP_CREATE_DIRS); - break; - - case SSH_SFTP_READDIR_INIT: - Curl_pgrsSetDownloadSize(data, -1); - if(data->set.opt_no_body) { - state(conn, SSH_STOP); - break; - } - - /* - * This is a directory that we are trying to get, so produce a directory - * listing - */ - sshc->sftp_handle = libssh2_sftp_open_ex(sshc->sftp_session, - sftp_scp->path, - curlx_uztoui( - strlen(sftp_scp->path)), - 0, 0, LIBSSH2_SFTP_OPENDIR); - if(!sshc->sftp_handle) { - if(libssh2_session_last_errno(sshc->ssh_session) == - LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - else { - err = sftp_libssh2_last_error(sshc->sftp_session); - failf(data, "Could not open directory for reading: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - result = sftp_libssh2_error_to_CURLE(err); - sshc->actualcode = result?result:CURLE_SSH; - break; - } - } - sshc->readdir_filename = malloc(PATH_MAX+1); - if(!sshc->readdir_filename) { - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - sshc->readdir_longentry = malloc(PATH_MAX+1); - if(!sshc->readdir_longentry) { - Curl_safefree(sshc->readdir_filename); - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - state(conn, SSH_SFTP_READDIR); - break; - - case SSH_SFTP_READDIR: - sshc->readdir_len = libssh2_sftp_readdir_ex(sshc->sftp_handle, - sshc->readdir_filename, - PATH_MAX, - sshc->readdir_longentry, - PATH_MAX, - &sshc->readdir_attrs); - if(sshc->readdir_len == LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - if(sshc->readdir_len > 0) { - sshc->readdir_filename[sshc->readdir_len] = '\0'; - - if(data->set.ftp_list_only) { - char *tmpLine; - - tmpLine = aprintf("%s\n", sshc->readdir_filename); - if(tmpLine == NULL) { - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - result = Curl_client_write(conn, CLIENTWRITE_BODY, - tmpLine, sshc->readdir_len+1); - free(tmpLine); - - if(result) { - state(conn, SSH_STOP); - break; - } - /* since this counts what we send to the client, we include the - newline in this counter */ - data->req.bytecount += sshc->readdir_len+1; - - /* output debug output if that is requested */ - if(data->set.verbose) { - Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_filename, - sshc->readdir_len, conn); - } - } - else { - sshc->readdir_currLen = (int)strlen(sshc->readdir_longentry); - sshc->readdir_totalLen = 80 + sshc->readdir_currLen; - sshc->readdir_line = calloc(sshc->readdir_totalLen, 1); - if(!sshc->readdir_line) { - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - - memcpy(sshc->readdir_line, sshc->readdir_longentry, - sshc->readdir_currLen); - if((sshc->readdir_attrs.flags & LIBSSH2_SFTP_ATTR_PERMISSIONS) && - ((sshc->readdir_attrs.permissions & LIBSSH2_SFTP_S_IFMT) == - LIBSSH2_SFTP_S_IFLNK)) { - sshc->readdir_linkPath = malloc(PATH_MAX + 1); - if(sshc->readdir_linkPath == NULL) { - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - - snprintf(sshc->readdir_linkPath, PATH_MAX, "%s%s", sftp_scp->path, - sshc->readdir_filename); - state(conn, SSH_SFTP_READDIR_LINK); - break; - } - state(conn, SSH_SFTP_READDIR_BOTTOM); - break; - } - } - else if(sshc->readdir_len == 0) { - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - state(conn, SSH_SFTP_READDIR_DONE); - break; - } - else if(sshc->readdir_len <= 0) { - err = sftp_libssh2_last_error(sshc->sftp_session); - result = sftp_libssh2_error_to_CURLE(err); - sshc->actualcode = result?result:CURLE_SSH; - failf(data, "Could not open remote file for reading: %s :: %d", - sftp_libssh2_strerror(err), - libssh2_session_last_errno(sshc->ssh_session)); - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - state(conn, SSH_SFTP_CLOSE); - break; - } - break; - - case SSH_SFTP_READDIR_LINK: - sshc->readdir_len = - libssh2_sftp_symlink_ex(sshc->sftp_session, - sshc->readdir_linkPath, - curlx_uztoui(strlen(sshc->readdir_linkPath)), - sshc->readdir_filename, - PATH_MAX, LIBSSH2_SFTP_READLINK); - if(sshc->readdir_len == LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - Curl_safefree(sshc->readdir_linkPath); - - /* get room for the filename and extra output */ - sshc->readdir_totalLen += 4 + sshc->readdir_len; - new_readdir_line = Curl_saferealloc(sshc->readdir_line, - sshc->readdir_totalLen); - if(!new_readdir_line) { - sshc->readdir_line = NULL; - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = CURLE_OUT_OF_MEMORY; - break; - } - sshc->readdir_line = new_readdir_line; - - sshc->readdir_currLen += snprintf(sshc->readdir_line + - sshc->readdir_currLen, - sshc->readdir_totalLen - - sshc->readdir_currLen, - " -> %s", - sshc->readdir_filename); - - state(conn, SSH_SFTP_READDIR_BOTTOM); - break; - - case SSH_SFTP_READDIR_BOTTOM: - sshc->readdir_currLen += snprintf(sshc->readdir_line + - sshc->readdir_currLen, - sshc->readdir_totalLen - - sshc->readdir_currLen, "\n"); - result = Curl_client_write(conn, CLIENTWRITE_BODY, - sshc->readdir_line, - sshc->readdir_currLen); - - if(!result) { - - /* output debug output if that is requested */ - if(data->set.verbose) { - Curl_debug(data, CURLINFO_DATA_OUT, sshc->readdir_line, - sshc->readdir_currLen, conn); - } - data->req.bytecount += sshc->readdir_currLen; - } - Curl_safefree(sshc->readdir_line); - if(result) { - state(conn, SSH_STOP); - } - else - state(conn, SSH_SFTP_READDIR); - break; - - case SSH_SFTP_READDIR_DONE: - if(libssh2_sftp_closedir(sshc->sftp_handle) == - LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - sshc->sftp_handle = NULL; - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - state(conn, SSH_STOP); - break; - - case SSH_SFTP_DOWNLOAD_INIT: - /* - * Work on getting the specified file - */ - sshc->sftp_handle = - libssh2_sftp_open_ex(sshc->sftp_session, sftp_scp->path, - curlx_uztoui(strlen(sftp_scp->path)), - LIBSSH2_FXF_READ, data->set.new_file_perms, - LIBSSH2_SFTP_OPENFILE); - if(!sshc->sftp_handle) { - if(libssh2_session_last_errno(sshc->ssh_session) == - LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - else { - err = sftp_libssh2_last_error(sshc->sftp_session); - failf(data, "Could not open remote file for reading: %s", - sftp_libssh2_strerror(err)); - state(conn, SSH_SFTP_CLOSE); - result = sftp_libssh2_error_to_CURLE(err); - sshc->actualcode = result?result:CURLE_SSH; - break; - } - } - state(conn, SSH_SFTP_DOWNLOAD_STAT); - break; - - case SSH_SFTP_DOWNLOAD_STAT: - { - LIBSSH2_SFTP_ATTRIBUTES attrs; - - rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path, - curlx_uztoui(strlen(sftp_scp->path)), - LIBSSH2_SFTP_STAT, &attrs); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc || - !(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) || - (attrs.filesize == 0)) { - /* - * libssh2_sftp_open() didn't return an error, so maybe the server - * just doesn't support stat() - * OR the server doesn't return a file size with a stat() - * OR file size is 0 - */ - data->req.size = -1; - data->req.maxdownload = -1; - Curl_pgrsSetDownloadSize(data, -1); - } - else { - curl_off_t size = attrs.filesize; - - if(size < 0) { - failf(data, "Bad file size (%" CURL_FORMAT_CURL_OFF_T ")", size); - return CURLE_BAD_DOWNLOAD_RESUME; - } - if(conn->data->state.use_range) { - curl_off_t from, to; - char *ptr; - char *ptr2; - - from=curlx_strtoofft(conn->data->state.range, &ptr, 0); - while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) - ptr++; - to=curlx_strtoofft(ptr, &ptr2, 0); - if((ptr == ptr2) /* no "to" value given */ - || (to >= size)) { - to = size - 1; - } - if(from < 0) { - /* from is relative to end of file */ - from += size; - } - if(from > size) { - failf(data, "Offset (%" - CURL_FORMAT_CURL_OFF_T ") was beyond file size (%" - CURL_FORMAT_CURL_OFF_T ")", from, attrs.filesize); - return CURLE_BAD_DOWNLOAD_RESUME; - } - if(from > to) { - from = to; - size = 0; - } - else { - size = to - from + 1; - } - - SFTP_SEEK(conn->proto.sshc.sftp_handle, from); - } - data->req.size = size; - data->req.maxdownload = size; - Curl_pgrsSetDownloadSize(data, size); - } - - /* We can resume if we can seek to the resume position */ - if(data->state.resume_from) { - if(data->state.resume_from < 0) { - /* We're supposed to download the last abs(from) bytes */ - if((curl_off_t)attrs.filesize < -data->state.resume_from) { - failf(data, "Offset (%" - CURL_FORMAT_CURL_OFF_T ") was beyond file size (%" - CURL_FORMAT_CURL_OFF_T ")", - data->state.resume_from, attrs.filesize); - return CURLE_BAD_DOWNLOAD_RESUME; - } - /* download from where? */ - data->state.resume_from += attrs.filesize; - } - else { - if((curl_off_t)attrs.filesize < data->state.resume_from) { - failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T - ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")", - data->state.resume_from, attrs.filesize); - return CURLE_BAD_DOWNLOAD_RESUME; - } - } - /* Does a completed file need to be seeked and started or closed ? */ - /* Now store the number of bytes we are expected to download */ - data->req.size = attrs.filesize - data->state.resume_from; - data->req.maxdownload = attrs.filesize - data->state.resume_from; - Curl_pgrsSetDownloadSize(data, - attrs.filesize - data->state.resume_from); - SFTP_SEEK(sshc->sftp_handle, data->state.resume_from); - } - } - - /* Setup the actual download */ - if(data->req.size == 0) { - /* no data to transfer */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - infof(data, "File already completely downloaded\n"); - state(conn, SSH_STOP); - break; - } - else { - Curl_setup_transfer(conn, FIRSTSOCKET, data->req.size, - FALSE, NULL, -1, NULL); - - /* not set by Curl_setup_transfer to preserve keepon bits */ - conn->writesockfd = conn->sockfd; - - /* we want to use the _receiving_ function even when the socket turns - out writableable as the underlying libssh2 recv function will deal - with both accordingly */ - conn->cselect_bits = CURL_CSELECT_IN; - } - if(result) { - /* this should never occur; the close state should be entered - at the time the error occurs */ - state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = result; - } - else { - state(conn, SSH_STOP); - } - break; - - case SSH_SFTP_CLOSE: - if(sshc->sftp_handle) { - rc = libssh2_sftp_close(sshc->sftp_handle); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to close libssh2 file\n"); - } - sshc->sftp_handle = NULL; - } - if(sftp_scp) - Curl_safefree(sftp_scp->path); - - DEBUGF(infof(data, "SFTP DONE done\n")); - - /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT - After nextstate is executed, the control should come back to - SSH_SFTP_CLOSE to pass the correct result back */ - if(sshc->nextstate != SSH_NO_STATE && - sshc->nextstate != SSH_SFTP_CLOSE) { - state(conn, sshc->nextstate); - sshc->nextstate = SSH_SFTP_CLOSE; - } - else { - state(conn, SSH_STOP); - result = sshc->actualcode; - } - break; - - case SSH_SFTP_SHUTDOWN: - /* during times we get here due to a broken transfer and then the - sftp_handle might not have been taken down so make sure that is done - before we proceed */ - - if(sshc->sftp_handle) { - rc = libssh2_sftp_close(sshc->sftp_handle); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to close libssh2 file\n"); - } - sshc->sftp_handle = NULL; - } - if(sshc->sftp_session) { - rc = libssh2_sftp_shutdown(sshc->sftp_session); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to stop libssh2 sftp subsystem\n"); - } - sshc->sftp_session = NULL; - } - - Curl_safefree(sshc->homedir); - conn->data->state.most_recent_ftp_entrypath = NULL; - - state(conn, SSH_SESSION_DISCONNECT); - break; - - case SSH_SCP_TRANS_INIT: - result = ssh_getworkingpath(conn, sshc->homedir, &sftp_scp->path); - if(result) { - sshc->actualcode = result; - state(conn, SSH_STOP); - break; - } - - if(data->set.upload) { - if(data->state.infilesize < 0) { - failf(data, "SCP requires a known file size for upload"); - sshc->actualcode = CURLE_UPLOAD_FAILED; - state(conn, SSH_SCP_CHANNEL_FREE); - break; - } - state(conn, SSH_SCP_UPLOAD_INIT); - } - else { - state(conn, SSH_SCP_DOWNLOAD_INIT); - } - break; - - case SSH_SCP_UPLOAD_INIT: - /* - * libssh2 requires that the destination path is a full path that - * includes the destination file and name OR ends in a "/" . If this is - * not done the destination file will be named the same name as the last - * directory in the path. - */ - sshc->ssh_channel = - SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms, - data->state.infilesize); - if(!sshc->ssh_channel) { - if(libssh2_session_last_errno(sshc->ssh_session) == - LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - else { - int ssh_err; - char *err_msg; - - ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0)); - failf(conn->data, "%s", err_msg); - state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); - break; - } - } - - /* upload data */ - Curl_setup_transfer(conn, -1, data->req.size, FALSE, NULL, - FIRSTSOCKET, NULL); - - /* not set by Curl_setup_transfer to preserve keepon bits */ - conn->sockfd = conn->writesockfd; - - if(result) { - state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = result; - } - else { - /* store this original bitmask setup to use later on if we can't - figure out a "real" bitmask */ - sshc->orig_waitfor = data->req.keepon; - - /* we want to use the _sending_ function even when the socket turns - out readable as the underlying libssh2 scp send function will deal - with both accordingly */ - conn->cselect_bits = CURL_CSELECT_OUT; - - state(conn, SSH_STOP); - } - break; - - case SSH_SCP_DOWNLOAD_INIT: - { - curl_off_t bytecount; - - /* - * We must check the remote file; if it is a directory no values will - * be set in sb - */ - - /* - * If support for >2GB files exists, use it. - */ - - /* get a fresh new channel from the ssh layer */ -#if LIBSSH2_VERSION_NUM < 0x010700 - struct stat sb; - memset(&sb, 0, sizeof(struct stat)); - sshc->ssh_channel = libssh2_scp_recv(sshc->ssh_session, - sftp_scp->path, &sb); -#else - libssh2_struct_stat sb; - memset(&sb, 0, sizeof(libssh2_struct_stat)); - sshc->ssh_channel = libssh2_scp_recv2(sshc->ssh_session, - sftp_scp->path, &sb); -#endif - - if(!sshc->ssh_channel) { - if(libssh2_session_last_errno(sshc->ssh_session) == - LIBSSH2_ERROR_EAGAIN) { - rc = LIBSSH2_ERROR_EAGAIN; - break; - } - else { - int ssh_err; - char *err_msg; - - ssh_err = (int)(libssh2_session_last_error(sshc->ssh_session, - &err_msg, NULL, 0)); - failf(conn->data, "%s", err_msg); - state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); - break; - } - } - - /* download data */ - bytecount = (curl_off_t)sb.st_size; - data->req.maxdownload = (curl_off_t)sb.st_size; - Curl_setup_transfer(conn, FIRSTSOCKET, bytecount, FALSE, NULL, -1, NULL); - - /* not set by Curl_setup_transfer to preserve keepon bits */ - conn->writesockfd = conn->sockfd; - - /* we want to use the _receiving_ function even when the socket turns - out writableable as the underlying libssh2 recv function will deal - with both accordingly */ - conn->cselect_bits = CURL_CSELECT_IN; - - if(result) { - state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = result; - } - else - state(conn, SSH_STOP); - } - break; - - case SSH_SCP_DONE: - if(data->set.upload) - state(conn, SSH_SCP_SEND_EOF); - else - state(conn, SSH_SCP_CHANNEL_FREE); - break; - - case SSH_SCP_SEND_EOF: - if(sshc->ssh_channel) { - rc = libssh2_channel_send_eof(sshc->ssh_channel); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc) { - infof(data, "Failed to send libssh2 channel EOF\n"); - } - } - state(conn, SSH_SCP_WAIT_EOF); - break; - - case SSH_SCP_WAIT_EOF: - if(sshc->ssh_channel) { - rc = libssh2_channel_wait_eof(sshc->ssh_channel); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc) { - infof(data, "Failed to get channel EOF: %d\n", rc); - } - } - state(conn, SSH_SCP_WAIT_CLOSE); - break; - - case SSH_SCP_WAIT_CLOSE: - if(sshc->ssh_channel) { - rc = libssh2_channel_wait_closed(sshc->ssh_channel); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc) { - infof(data, "Channel failed to close: %d\n", rc); - } - } - state(conn, SSH_SCP_CHANNEL_FREE); - break; - - case SSH_SCP_CHANNEL_FREE: - if(sshc->ssh_channel) { - rc = libssh2_channel_free(sshc->ssh_channel); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to free libssh2 scp subsystem\n"); - } - sshc->ssh_channel = NULL; - } - DEBUGF(infof(data, "SCP DONE phase complete\n")); -#if 0 /* PREV */ - state(conn, SSH_SESSION_DISCONNECT); -#endif - state(conn, SSH_STOP); - result = sshc->actualcode; - break; - - case SSH_SESSION_DISCONNECT: - /* during weird times when we've been prematurely aborted, the channel - is still alive when we reach this state and we MUST kill the channel - properly first */ - if(sshc->ssh_channel) { - rc = libssh2_channel_free(sshc->ssh_channel); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to free libssh2 scp subsystem\n"); - } - sshc->ssh_channel = NULL; - } - - if(sshc->ssh_session) { - rc = libssh2_session_disconnect(sshc->ssh_session, "Shutdown"); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to disconnect libssh2 session\n"); - } - } - - Curl_safefree(sshc->homedir); - conn->data->state.most_recent_ftp_entrypath = NULL; - - state(conn, SSH_SESSION_FREE); - break; - - case SSH_SESSION_FREE: -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - if(sshc->kh) { - libssh2_knownhost_free(sshc->kh); - sshc->kh = NULL; - } -#endif - -#ifdef HAVE_LIBSSH2_AGENT_API - if(sshc->ssh_agent) { - rc = libssh2_agent_disconnect(sshc->ssh_agent); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to disconnect from libssh2 agent\n"); - } - libssh2_agent_free(sshc->ssh_agent); - sshc->ssh_agent = NULL; - - /* NB: there is no need to free identities, they are part of internal - agent stuff */ - sshc->sshagent_identity = NULL; - sshc->sshagent_prev_identity = NULL; - } -#endif - - if(sshc->ssh_session) { - rc = libssh2_session_free(sshc->ssh_session); - if(rc == LIBSSH2_ERROR_EAGAIN) { - break; - } - else if(rc < 0) { - infof(data, "Failed to free libssh2 session\n"); - } - sshc->ssh_session = NULL; - } - - /* worst-case scenario cleanup */ - - DEBUGASSERT(sshc->ssh_session == NULL); - DEBUGASSERT(sshc->ssh_channel == NULL); - DEBUGASSERT(sshc->sftp_session == NULL); - DEBUGASSERT(sshc->sftp_handle == NULL); -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - DEBUGASSERT(sshc->kh == NULL); -#endif -#ifdef HAVE_LIBSSH2_AGENT_API - DEBUGASSERT(sshc->ssh_agent == NULL); -#endif - - Curl_safefree(sshc->rsa_pub); - Curl_safefree(sshc->rsa); - - Curl_safefree(sshc->quote_path1); - Curl_safefree(sshc->quote_path2); - - Curl_safefree(sshc->homedir); - - Curl_safefree(sshc->readdir_filename); - Curl_safefree(sshc->readdir_longentry); - Curl_safefree(sshc->readdir_line); - Curl_safefree(sshc->readdir_linkPath); - - /* the code we are about to return */ - result = sshc->actualcode; - - memset(sshc, 0, sizeof(struct ssh_conn)); - - connclose(conn, "SSH session free"); - sshc->state = SSH_SESSION_FREE; /* current */ - sshc->nextstate = SSH_NO_STATE; - state(conn, SSH_STOP); - break; - - case SSH_QUIT: - /* fallthrough, just stop! */ - default: - /* internal error */ - sshc->nextstate = SSH_NO_STATE; - state(conn, SSH_STOP); - break; - } - - } while(!rc && (sshc->state != SSH_STOP)); - - if(rc == LIBSSH2_ERROR_EAGAIN) { - /* we would block, we need to wait for the socket to be ready (in the - right direction too)! */ - *block = TRUE; - } - - return result; -} - -/* called by the multi interface to figure out what socket(s) to wait for and - for what actions in the DO_DONE, PERFORM and WAITPERFORM states */ -static int ssh_perform_getsock(const struct connectdata *conn, - curl_socket_t *sock, /* points to numsocks - number of sockets */ - int numsocks) -{ -#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION - int bitmap = GETSOCK_BLANK; - (void)numsocks; - - sock[0] = conn->sock[FIRSTSOCKET]; - - if(conn->waitfor & KEEP_RECV) - bitmap |= GETSOCK_READSOCK(FIRSTSOCKET); - - if(conn->waitfor & KEEP_SEND) - bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET); - - return bitmap; -#else - /* if we don't know the direction we can use the generic *_getsock() - function even for the protocol_connect and doing states */ - return Curl_single_getsock(conn, sock, numsocks); -#endif -} - -/* Generic function called by the multi interface to figure out what socket(s) - to wait for and for what actions during the DOING and PROTOCONNECT states*/ -static int ssh_getsock(struct connectdata *conn, - curl_socket_t *sock, /* points to numsocks number - of sockets */ - int numsocks) -{ -#ifndef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION - (void)conn; - (void)sock; - (void)numsocks; - /* if we don't know any direction we can just play along as we used to and - not provide any sensible info */ - return GETSOCK_BLANK; -#else - /* if we know the direction we can use the generic *_getsock() function even - for the protocol_connect and doing states */ - return ssh_perform_getsock(conn, sock, numsocks); -#endif -} - -#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION -/* - * When one of the libssh2 functions has returned LIBSSH2_ERROR_EAGAIN this - * function is used to figure out in what direction and stores this info so - * that the multi interface can take advantage of it. Make sure to call this - * function in all cases so that when it _doesn't_ return EAGAIN we can - * restore the default wait bits. - */ -static void ssh_block2waitfor(struct connectdata *conn, bool block) -{ - struct ssh_conn *sshc = &conn->proto.sshc; - int dir = 0; - if(block) { - dir = libssh2_session_block_directions(sshc->ssh_session); - if(dir) { - /* translate the libssh2 define bits into our own bit defines */ - conn->waitfor = ((dir&LIBSSH2_SESSION_BLOCK_INBOUND)?KEEP_RECV:0) | - ((dir&LIBSSH2_SESSION_BLOCK_OUTBOUND)?KEEP_SEND:0); - } - } - if(!dir) - /* It didn't block or libssh2 didn't reveal in which direction, put back - the original set */ - conn->waitfor = sshc->orig_waitfor; -} -#else - /* no libssh2 directional support so we simply don't know */ -#define ssh_block2waitfor(x,y) Curl_nop_stmt -#endif - -/* called repeatedly until done from multi.c */ -static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done) -{ - struct ssh_conn *sshc = &conn->proto.sshc; - CURLcode result = CURLE_OK; - bool block; /* we store the status and use that to provide a ssh_getsock() - implementation */ - - result = ssh_statemach_act(conn, &block); - *done = (sshc->state == SSH_STOP) ? TRUE : FALSE; - ssh_block2waitfor(conn, block); - - return result; -} - -static CURLcode ssh_block_statemach(struct connectdata *conn, - bool duringconnect) -{ - struct ssh_conn *sshc = &conn->proto.sshc; - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - while((sshc->state != SSH_STOP) && !result) { - bool block; - long left; - - result = ssh_statemach_act(conn, &block); - if(result) - break; - - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - else { - struct timeval now = Curl_tvnow(); - result = Curl_speedcheck(data, now); - if(result) - break; - } - - left = Curl_timeleft(data, NULL, duringconnect); - if(left < 0) { - failf(data, "Operation timed out"); - return CURLE_OPERATION_TIMEDOUT; - } - -#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION - if(!result && block) { - int dir = libssh2_session_block_directions(sshc->ssh_session); - curl_socket_t sock = conn->sock[FIRSTSOCKET]; - curl_socket_t fd_read = CURL_SOCKET_BAD; - curl_socket_t fd_write = CURL_SOCKET_BAD; - if(LIBSSH2_SESSION_BLOCK_INBOUND & dir) - fd_read = sock; - if(LIBSSH2_SESSION_BLOCK_OUTBOUND & dir) - fd_write = sock; - /* wait for the socket to become ready */ - (void)Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write, - left>1000?1000:left); /* ignore result */ - } -#endif - - } - - return result; -} - -/* - * SSH setup and connection - */ -static CURLcode ssh_setup_connection(struct connectdata *conn) -{ - struct SSHPROTO *ssh; - - conn->data->req.protop = ssh = calloc(1, sizeof(struct SSHPROTO)); - if(!ssh) - return CURLE_OUT_OF_MEMORY; - - return CURLE_OK; -} - -static Curl_recv scp_recv, sftp_recv; -static Curl_send scp_send, sftp_send; - -/* - * Curl_ssh_connect() gets called from Curl_protocol_connect() to allow us to - * do protocol-specific actions at connect-time. - */ -static CURLcode ssh_connect(struct connectdata *conn, bool *done) -{ -#ifdef CURL_LIBSSH2_DEBUG - curl_socket_t sock; -#endif - struct ssh_conn *ssh; - CURLcode result; - struct Curl_easy *data = conn->data; - - /* initialize per-handle data if not already */ - if(!data->req.protop) - ssh_setup_connection(conn); - - /* We default to persistent connections. We set this already in this connect - function to make the re-use checks properly be able to check this bit. */ - connkeep(conn, "SSH default"); - - if(conn->handler->protocol & CURLPROTO_SCP) { - conn->recv[FIRSTSOCKET] = scp_recv; - conn->send[FIRSTSOCKET] = scp_send; - } - else { - conn->recv[FIRSTSOCKET] = sftp_recv; - conn->send[FIRSTSOCKET] = sftp_send; - } - ssh = &conn->proto.sshc; - -#ifdef CURL_LIBSSH2_DEBUG - if(conn->user) { - infof(data, "User: %s\n", conn->user); - } - if(conn->passwd) { - infof(data, "Password: %s\n", conn->passwd); - } - sock = conn->sock[FIRSTSOCKET]; -#endif /* CURL_LIBSSH2_DEBUG */ - - ssh->ssh_session = libssh2_session_init_ex(my_libssh2_malloc, - my_libssh2_free, - my_libssh2_realloc, conn); - if(ssh->ssh_session == NULL) { - failf(data, "Failure initialising ssh session"); - return CURLE_FAILED_INIT; - } - -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - if(data->set.str[STRING_SSH_KNOWNHOSTS]) { - int rc; - ssh->kh = libssh2_knownhost_init(ssh->ssh_session); - if(!ssh->kh) { - /* eeek. TODO: free the ssh_session! */ - return CURLE_FAILED_INIT; - } - - /* read all known hosts from there */ - rc = libssh2_knownhost_readfile(ssh->kh, - data->set.str[STRING_SSH_KNOWNHOSTS], - LIBSSH2_KNOWNHOST_FILE_OPENSSH); - if(rc < 0) - infof(data, "Failed to read known hosts from %s\n", - data->set.str[STRING_SSH_KNOWNHOSTS]); - } -#endif /* HAVE_LIBSSH2_KNOWNHOST_API */ - -#ifdef CURL_LIBSSH2_DEBUG - libssh2_trace(ssh->ssh_session, ~0); - infof(data, "SSH socket: %d\n", (int)sock); -#endif /* CURL_LIBSSH2_DEBUG */ - - state(conn, SSH_INIT); - - result = ssh_multi_statemach(conn, done); - - return result; -} - -/* - *********************************************************************** - * - * scp_perform() - * - * This is the actual DO function for SCP. Get a file according to - * the options previously setup. - */ - -static -CURLcode scp_perform(struct connectdata *conn, - bool *connected, - bool *dophase_done) -{ - CURLcode result = CURLE_OK; - - DEBUGF(infof(conn->data, "DO phase starts\n")); - - *dophase_done = FALSE; /* not done yet */ - - /* start the first command in the DO phase */ - state(conn, SSH_SCP_TRANS_INIT); - - /* run the state-machine */ - result = ssh_multi_statemach(conn, dophase_done); - - *connected = conn->bits.tcpconnect[FIRSTSOCKET]; - - if(*dophase_done) { - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - - return result; -} - -/* called from multi.c while DOing */ -static CURLcode scp_doing(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result; - result = ssh_multi_statemach(conn, dophase_done); - - if(*dophase_done) { - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - return result; -} - -/* - * The DO function is generic for both protocols. There was previously two - * separate ones but this way means less duplicated code. - */ - -static CURLcode ssh_do(struct connectdata *conn, bool *done) -{ - CURLcode result; - bool connected = 0; - struct Curl_easy *data = conn->data; - struct ssh_conn *sshc = &conn->proto.sshc; - - *done = FALSE; /* default to false */ - - data->req.size = -1; /* make sure this is unknown at this point */ - - sshc->actualcode = CURLE_OK; /* reset error code */ - sshc->secondCreateDirs =0; /* reset the create dir attempt state - variable */ - - Curl_pgrsSetUploadCounter(data, 0); - Curl_pgrsSetDownloadCounter(data, 0); - Curl_pgrsSetUploadSize(data, -1); - Curl_pgrsSetDownloadSize(data, -1); - - if(conn->handler->protocol & CURLPROTO_SCP) - result = scp_perform(conn, &connected, done); - else - result = sftp_perform(conn, &connected, done); - - return result; -} - -/* BLOCKING, but the function is using the state machine so the only reason - this is still blocking is that the multi interface code has no support for - disconnecting operations that takes a while */ -static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection) -{ - CURLcode result = CURLE_OK; - struct ssh_conn *ssh = &conn->proto.sshc; - (void) dead_connection; - - if(ssh->ssh_session) { - /* only if there's a session still around to use! */ - - state(conn, SSH_SESSION_DISCONNECT); - - result = ssh_block_statemach(conn, FALSE); - } - - return result; -} - -/* generic done function for both SCP and SFTP called from their specific - done functions */ -static CURLcode ssh_done(struct connectdata *conn, CURLcode status) -{ - CURLcode result = CURLE_OK; - struct SSHPROTO *sftp_scp = conn->data->req.protop; - - if(!status) { - /* run the state-machine - - TODO: when the multi interface is used, this _really_ should be using - the ssh_multi_statemach function but we have no general support for - non-blocking DONE operations! - */ - result = ssh_block_statemach(conn, FALSE); - } - else - result = status; - - if(sftp_scp) - Curl_safefree(sftp_scp->path); - if(Curl_pgrsDone(conn)) - return CURLE_ABORTED_BY_CALLBACK; - - conn->data->req.keepon = 0; /* clear all bits */ - return result; -} - - -static CURLcode scp_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - (void)premature; /* not used */ - - if(!status) - state(conn, SSH_SCP_DONE); - - return ssh_done(conn, status); - -} - -static ssize_t scp_send(struct connectdata *conn, int sockindex, - const void *mem, size_t len, CURLcode *err) -{ - ssize_t nwrite; - (void)sockindex; /* we only support SCP on the fixed known primary socket */ - - /* libssh2_channel_write() returns int! */ - nwrite = (ssize_t) - libssh2_channel_write(conn->proto.sshc.ssh_channel, mem, len); - - ssh_block2waitfor(conn, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE); - - if(nwrite == LIBSSH2_ERROR_EAGAIN) { - *err = CURLE_AGAIN; - nwrite = 0; - } - else if(nwrite < LIBSSH2_ERROR_NONE) { - *err = libssh2_session_error_to_CURLE((int)nwrite); - nwrite = -1; - } - - return nwrite; -} - -static ssize_t scp_recv(struct connectdata *conn, int sockindex, - char *mem, size_t len, CURLcode *err) -{ - ssize_t nread; - (void)sockindex; /* we only support SCP on the fixed known primary socket */ - - /* libssh2_channel_read() returns int */ - nread = (ssize_t) - libssh2_channel_read(conn->proto.sshc.ssh_channel, mem, len); - - ssh_block2waitfor(conn, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE); - if(nread == LIBSSH2_ERROR_EAGAIN) { - *err = CURLE_AGAIN; - nread = -1; - } - - return nread; -} - -/* - * =============== SFTP =============== - */ - -/* - *********************************************************************** - * - * sftp_perform() - * - * This is the actual DO function for SFTP. Get a file/directory according to - * the options previously setup. - */ - -static -CURLcode sftp_perform(struct connectdata *conn, - bool *connected, - bool *dophase_done) -{ - CURLcode result = CURLE_OK; - - DEBUGF(infof(conn->data, "DO phase starts\n")); - - *dophase_done = FALSE; /* not done yet */ - - /* start the first command in the DO phase */ - state(conn, SSH_SFTP_QUOTE_INIT); - - /* run the state-machine */ - result = ssh_multi_statemach(conn, dophase_done); - - *connected = conn->bits.tcpconnect[FIRSTSOCKET]; - - if(*dophase_done) { - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - - return result; -} - -/* called from multi.c while DOing */ -static CURLcode sftp_doing(struct connectdata *conn, - bool *dophase_done) -{ - CURLcode result = ssh_multi_statemach(conn, dophase_done); - - if(*dophase_done) { - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - return result; -} - -/* BLOCKING, but the function is using the state machine so the only reason - this is still blocking is that the multi interface code has no support for - disconnecting operations that takes a while */ -static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection) -{ - CURLcode result = CURLE_OK; - (void) dead_connection; - - DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n")); - - if(conn->proto.sshc.ssh_session) { - /* only if there's a session still around to use! */ - state(conn, SSH_SFTP_SHUTDOWN); - result = ssh_block_statemach(conn, FALSE); - } - - DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n")); - - return result; - -} - -static CURLcode sftp_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - struct ssh_conn *sshc = &conn->proto.sshc; - - if(!status) { - /* Post quote commands are executed after the SFTP_CLOSE state to avoid - errors that could happen due to open file handles during POSTQUOTE - operation */ - if(!status && !premature && conn->data->set.postquote) { - sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT; - state(conn, SSH_SFTP_CLOSE); - } - else - state(conn, SSH_SFTP_CLOSE); - } - return ssh_done(conn, status); -} - -/* return number of sent bytes */ -static ssize_t sftp_send(struct connectdata *conn, int sockindex, - const void *mem, size_t len, CURLcode *err) -{ - ssize_t nwrite; /* libssh2_sftp_write() used to return size_t in 0.14 - but is changed to ssize_t in 0.15. These days we don't - support libssh2 0.15*/ - (void)sockindex; - - nwrite = libssh2_sftp_write(conn->proto.sshc.sftp_handle, mem, len); - - ssh_block2waitfor(conn, (nwrite == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE); - - if(nwrite == LIBSSH2_ERROR_EAGAIN) { - *err = CURLE_AGAIN; - nwrite = 0; - } - else if(nwrite < LIBSSH2_ERROR_NONE) { - *err = libssh2_session_error_to_CURLE((int)nwrite); - nwrite = -1; - } - - return nwrite; -} - -/* - * Return number of received (decrypted) bytes - * or <0 on error - */ -static ssize_t sftp_recv(struct connectdata *conn, int sockindex, - char *mem, size_t len, CURLcode *err) -{ - ssize_t nread; - (void)sockindex; - - nread = libssh2_sftp_read(conn->proto.sshc.sftp_handle, mem, len); - - ssh_block2waitfor(conn, (nread == LIBSSH2_ERROR_EAGAIN)?TRUE:FALSE); - - if(nread == LIBSSH2_ERROR_EAGAIN) { - *err = CURLE_AGAIN; - nread = -1; - - } - else if(nread < 0) { - *err = libssh2_session_error_to_CURLE((int)nread); - } - return nread; -} - -/* The get_pathname() function is being borrowed from OpenSSH sftp.c - version 4.6p1. */ -/* - * Copyright (c) 2001-2004 Damien Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -static CURLcode -get_pathname(const char **cpp, char **path) -{ - const char *cp = *cpp, *end; - char quot; - unsigned int i, j; - static const char WHITESPACE[] = " \t\r\n"; - - cp += strspn(cp, WHITESPACE); - if(!*cp) { - *cpp = cp; - *path = NULL; - return CURLE_QUOTE_ERROR; - } - - *path = malloc(strlen(cp) + 1); - if(*path == NULL) - return CURLE_OUT_OF_MEMORY; - - /* Check for quoted filenames */ - if(*cp == '\"' || *cp == '\'') { - quot = *cp++; - - /* Search for terminating quote, unescape some chars */ - for(i = j = 0; i <= strlen(cp); i++) { - if(cp[i] == quot) { /* Found quote */ - i++; - (*path)[j] = '\0'; - break; - } - if(cp[i] == '\0') { /* End of string */ - /*error("Unterminated quote");*/ - goto fail; - } - if(cp[i] == '\\') { /* Escaped characters */ - i++; - if(cp[i] != '\'' && cp[i] != '\"' && - cp[i] != '\\') { - /*error("Bad escaped character '\\%c'", - cp[i]);*/ - goto fail; - } - } - (*path)[j++] = cp[i]; - } - - if(j == 0) { - /*error("Empty quotes");*/ - goto fail; - } - *cpp = cp + i + strspn(cp + i, WHITESPACE); - } - else { - /* Read to end of filename */ - end = strpbrk(cp, WHITESPACE); - if(end == NULL) - end = strchr(cp, '\0'); - *cpp = end + strspn(end, WHITESPACE); - - memcpy(*path, cp, end - cp); - (*path)[end - cp] = '\0'; - } - return CURLE_OK; - - fail: - Curl_safefree(*path); - return CURLE_QUOTE_ERROR; -} - - -static const char *sftp_libssh2_strerror(int err) -{ - switch(err) { - case LIBSSH2_FX_NO_SUCH_FILE: - return "No such file or directory"; - - case LIBSSH2_FX_PERMISSION_DENIED: - return "Permission denied"; - - case LIBSSH2_FX_FAILURE: - return "Operation failed"; - - case LIBSSH2_FX_BAD_MESSAGE: - return "Bad message from SFTP server"; - - case LIBSSH2_FX_NO_CONNECTION: - return "Not connected to SFTP server"; - - case LIBSSH2_FX_CONNECTION_LOST: - return "Connection to SFTP server lost"; - - case LIBSSH2_FX_OP_UNSUPPORTED: - return "Operation not supported by SFTP server"; - - case LIBSSH2_FX_INVALID_HANDLE: - return "Invalid handle"; - - case LIBSSH2_FX_NO_SUCH_PATH: - return "No such file or directory"; - - case LIBSSH2_FX_FILE_ALREADY_EXISTS: - return "File already exists"; - - case LIBSSH2_FX_WRITE_PROTECT: - return "File is write protected"; - - case LIBSSH2_FX_NO_MEDIA: - return "No media"; - - case LIBSSH2_FX_NO_SPACE_ON_FILESYSTEM: - return "Disk full"; - - case LIBSSH2_FX_QUOTA_EXCEEDED: - return "User quota exceeded"; - - case LIBSSH2_FX_UNKNOWN_PRINCIPLE: - return "Unknown principle"; - - case LIBSSH2_FX_LOCK_CONFlICT: - return "File lock conflict"; - - case LIBSSH2_FX_DIR_NOT_EMPTY: - return "Directory not empty"; - - case LIBSSH2_FX_NOT_A_DIRECTORY: - return "Not a directory"; - - case LIBSSH2_FX_INVALID_FILENAME: - return "Invalid filename"; - - case LIBSSH2_FX_LINK_LOOP: - return "Link points to itself"; - } - return "Unknown error in libssh2"; -} - -#endif /* USE_LIBSSH2 */ diff --git a/build/premake/premake5/contrib/curl/lib/ssh.h b/build/premake/premake5/contrib/curl/lib/ssh.h deleted file mode 100644 index b350dcf3a5..0000000000 --- a/build/premake/premake5/contrib/curl/lib/ssh.h +++ /dev/null @@ -1,198 +0,0 @@ -#ifndef HEADER_CURL_SSH_H -#define HEADER_CURL_SSH_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_LIBSSH2_H -#include -#include -#endif /* HAVE_LIBSSH2_H */ - -/**************************************************************************** - * SSH unique setup - ***************************************************************************/ -typedef enum { - SSH_NO_STATE = -1, /* Used for "nextState" so say there is none */ - SSH_STOP = 0, /* do nothing state, stops the state machine */ - - SSH_INIT, /* First state in SSH-CONNECT */ - SSH_S_STARTUP, /* Session startup */ - SSH_HOSTKEY, /* verify hostkey */ - SSH_AUTHLIST, - SSH_AUTH_PKEY_INIT, - SSH_AUTH_PKEY, - SSH_AUTH_PASS_INIT, - SSH_AUTH_PASS, - SSH_AUTH_AGENT_INIT, /* initialize then wait for connection to agent */ - SSH_AUTH_AGENT_LIST, /* ask for list then wait for entire list to come */ - SSH_AUTH_AGENT, /* attempt one key at a time */ - SSH_AUTH_HOST_INIT, - SSH_AUTH_HOST, - SSH_AUTH_KEY_INIT, - SSH_AUTH_KEY, - SSH_AUTH_DONE, - SSH_SFTP_INIT, - SSH_SFTP_REALPATH, /* Last state in SSH-CONNECT */ - - SSH_SFTP_QUOTE_INIT, /* First state in SFTP-DO */ - SSH_SFTP_POSTQUOTE_INIT, /* (Possibly) First state in SFTP-DONE */ - SSH_SFTP_QUOTE, - SSH_SFTP_NEXT_QUOTE, - SSH_SFTP_QUOTE_STAT, - SSH_SFTP_QUOTE_SETSTAT, - SSH_SFTP_QUOTE_SYMLINK, - SSH_SFTP_QUOTE_MKDIR, - SSH_SFTP_QUOTE_RENAME, - SSH_SFTP_QUOTE_RMDIR, - SSH_SFTP_QUOTE_UNLINK, - SSH_SFTP_QUOTE_STATVFS, - SSH_SFTP_GETINFO, - SSH_SFTP_FILETIME, - SSH_SFTP_TRANS_INIT, - SSH_SFTP_UPLOAD_INIT, - SSH_SFTP_CREATE_DIRS_INIT, - SSH_SFTP_CREATE_DIRS, - SSH_SFTP_CREATE_DIRS_MKDIR, - SSH_SFTP_READDIR_INIT, - SSH_SFTP_READDIR, - SSH_SFTP_READDIR_LINK, - SSH_SFTP_READDIR_BOTTOM, - SSH_SFTP_READDIR_DONE, - SSH_SFTP_DOWNLOAD_INIT, - SSH_SFTP_DOWNLOAD_STAT, /* Last state in SFTP-DO */ - SSH_SFTP_CLOSE, /* Last state in SFTP-DONE */ - SSH_SFTP_SHUTDOWN, /* First state in SFTP-DISCONNECT */ - SSH_SCP_TRANS_INIT, /* First state in SCP-DO */ - SSH_SCP_UPLOAD_INIT, - SSH_SCP_DOWNLOAD_INIT, - SSH_SCP_DONE, - SSH_SCP_SEND_EOF, - SSH_SCP_WAIT_EOF, - SSH_SCP_WAIT_CLOSE, - SSH_SCP_CHANNEL_FREE, /* Last state in SCP-DONE */ - SSH_SESSION_DISCONNECT, /* First state in SCP-DISCONNECT */ - SSH_SESSION_FREE, /* Last state in SCP/SFTP-DISCONNECT */ - SSH_QUIT, - SSH_LAST /* never used */ -} sshstate; - -/* this struct is used in the HandleData struct which is part of the - Curl_easy, which means this is used on a per-easy handle basis. - Everything that is strictly related to a connection is banned from this - struct. */ -struct SSHPROTO { - char *path; /* the path we operate on */ -}; - -/* ssh_conn is used for struct connection-oriented data in the connectdata - struct */ -struct ssh_conn { - const char *authlist; /* List of auth. methods, managed by libssh2 */ -#ifdef USE_LIBSSH2 - const char *passphrase; /* pass-phrase to use */ - char *rsa_pub; /* path name */ - char *rsa; /* path name */ - bool authed; /* the connection has been authenticated fine */ - sshstate state; /* always use ssh.c:state() to change state! */ - sshstate nextstate; /* the state to goto after stopping */ - CURLcode actualcode; /* the actual error code */ - struct curl_slist *quote_item; /* for the quote option */ - char *quote_path1; /* two generic pointers for the QUOTE stuff */ - char *quote_path2; - LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */ - bool acceptfail; /* used by the SFTP_QUOTE (continue if - quote command fails) */ - char *homedir; /* when doing SFTP we figure out home dir in the - connect phase */ - - /* Here's a set of struct members used by the SFTP_READDIR state */ - LIBSSH2_SFTP_ATTRIBUTES readdir_attrs; - char *readdir_filename; - char *readdir_longentry; - int readdir_len, readdir_totalLen, readdir_currLen; - char *readdir_line; - char *readdir_linkPath; - /* end of READDIR stuff */ - - int secondCreateDirs; /* counter use by the code to see if the - second attempt has been made to change - to/create a directory */ - char *slash_pos; /* used by the SFTP_CREATE_DIRS state */ - LIBSSH2_SESSION *ssh_session; /* Secure Shell session */ - LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */ - LIBSSH2_SFTP *sftp_session; /* SFTP handle */ - LIBSSH2_SFTP_HANDLE *sftp_handle; - int orig_waitfor; /* default READ/WRITE bits wait for */ - -#ifdef HAVE_LIBSSH2_AGENT_API - LIBSSH2_AGENT *ssh_agent; /* proxy to ssh-agent/pageant */ - struct libssh2_agent_publickey *sshagent_identity, - *sshagent_prev_identity; -#endif - - /* note that HAVE_LIBSSH2_KNOWNHOST_API is a define set in the libssh2.h - header */ -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - LIBSSH2_KNOWNHOSTS *kh; -#endif -#endif /* USE_LIBSSH2 */ -}; - -#ifdef USE_LIBSSH2 - -/* Feature detection based on version numbers to better work with - non-configure platforms */ - -#if !defined(LIBSSH2_VERSION_NUM) || (LIBSSH2_VERSION_NUM < 0x001000) -# error "SCP/SFTP protocols require libssh2 0.16 or later" -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010000 -#define HAVE_LIBSSH2_SFTP_SEEK64 1 -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010100 -#define HAVE_LIBSSH2_VERSION 1 -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010205 -#define HAVE_LIBSSH2_INIT 1 -#define HAVE_LIBSSH2_EXIT 1 -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010206 -#define HAVE_LIBSSH2_KNOWNHOST_CHECKP 1 -#define HAVE_LIBSSH2_SCP_SEND64 1 -#endif - -#if LIBSSH2_VERSION_NUM >= 0x010208 -#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1 -#endif - -extern const struct Curl_handler Curl_handler_scp; -extern const struct Curl_handler Curl_handler_sftp; - -#endif /* USE_LIBSSH2 */ - -#endif /* HEADER_CURL_SSH_H */ diff --git a/build/premake/premake5/contrib/curl/lib/strcase.c b/build/premake/premake5/contrib/curl/lib/strcase.c deleted file mode 100644 index a750f7b4dd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strcase.c +++ /dev/null @@ -1,176 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "strcase.h" - -/* Portable, consistent toupper (remember EBCDIC). Do not use toupper() because - its behavior is altered by the current locale. */ -char Curl_raw_toupper(char in) -{ -#if !defined(CURL_DOES_CONVERSIONS) - if(in >= 'a' && in <= 'z') - return (char)('A' + in - 'a'); -#else - switch(in) { - case 'a': - return 'A'; - case 'b': - return 'B'; - case 'c': - return 'C'; - case 'd': - return 'D'; - case 'e': - return 'E'; - case 'f': - return 'F'; - case 'g': - return 'G'; - case 'h': - return 'H'; - case 'i': - return 'I'; - case 'j': - return 'J'; - case 'k': - return 'K'; - case 'l': - return 'L'; - case 'm': - return 'M'; - case 'n': - return 'N'; - case 'o': - return 'O'; - case 'p': - return 'P'; - case 'q': - return 'Q'; - case 'r': - return 'R'; - case 's': - return 'S'; - case 't': - return 'T'; - case 'u': - return 'U'; - case 'v': - return 'V'; - case 'w': - return 'W'; - case 'x': - return 'X'; - case 'y': - return 'Y'; - case 'z': - return 'Z'; - } -#endif - - return in; -} - -/* - * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant - * to be locale independent and only compare strings we know are safe for - * this. See https://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for - * some further explanation to why this function is necessary. - * - * The function is capable of comparing a-z case insensitively even for - * non-ascii. - * - * @unittest: 1301 - */ - -int Curl_strcasecompare(const char *first, const char *second) -{ - while(*first && *second) { - if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) - /* get out of the loop as soon as they don't match */ - break; - first++; - second++; - } - /* we do the comparison here (possibly again), just to make sure that if the - loop above is skipped because one of the strings reached zero, we must not - return this as a successful match */ - return (Curl_raw_toupper(*first) == Curl_raw_toupper(*second)); -} - -int Curl_safe_strcasecompare(const char *first, const char *second) -{ - if(first && second) - /* both pointers point to something then compare them */ - return Curl_strcasecompare(first, second); - else - /* if both pointers are NULL then treat them as equal */ - return (NULL == first && NULL == second); -} - -/* - * @unittest: 1301 - */ -int Curl_strncasecompare(const char *first, const char *second, size_t max) -{ - while(*first && *second && max) { - if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) { - break; - } - max--; - first++; - second++; - } - if(0 == max) - return 1; /* they are equal this far */ - - return Curl_raw_toupper(*first) == Curl_raw_toupper(*second); -} - -/* Copy an upper case version of the string from src to dest. The - * strings may overlap. No more than n characters of the string are copied - * (including any NUL) and the destination string will NOT be - * NUL-terminated if that limit is reached. - */ -void Curl_strntoupper(char *dest, const char *src, size_t n) -{ - if(n < 1) - return; - - do { - *dest++ = Curl_raw_toupper(*src); - } while(*src++ && --n); -} - -/* --- public functions --- */ - -int curl_strequal(const char *first, const char *second) -{ - return Curl_strcasecompare(first, second); -} -int curl_strnequal(const char *first, const char *second, size_t max) -{ - return Curl_strncasecompare(first, second, max); -} diff --git a/build/premake/premake5/contrib/curl/lib/strcase.h b/build/premake/premake5/contrib/curl/lib/strcase.h deleted file mode 100644 index ea2abc8b60..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strcase.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef HEADER_CURL_STRCASE_H -#define HEADER_CURL_STRCASE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -/* - * Only "raw" case insensitive strings. This is meant to be locale independent - * and only compare strings we know are safe for this. - * - * The function is capable of comparing a-z case insensitively even for - * non-ascii. - */ - -#define strcasecompare(a,b) Curl_strcasecompare(a,b) -#define strncasecompare(a,b,c) Curl_strncasecompare(a,b,c) - -int Curl_strcasecompare(const char *first, const char *second); -int Curl_safe_strcasecompare(const char *first, const char *second); -int Curl_strncasecompare(const char *first, const char *second, size_t max); - -char Curl_raw_toupper(char in); - -/* checkprefix() is a shorter version of the above, used when the first - argument is zero-byte terminated */ -#define checkprefix(a,b) curl_strnequal(a,b,strlen(a)) - -void Curl_strntoupper(char *dest, const char *src, size_t n); -char Curl_raw_toupper(char in); - -#endif /* HEADER_CURL_STRCASE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/strdup.c b/build/premake/premake5/contrib/curl/lib/strdup.c deleted file mode 100644 index 136b693774..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strdup.c +++ /dev/null @@ -1,100 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "strdup.h" -#include "curl_memory.h" - -/* The last #include file should be: */ -#include "memdebug.h" - -#ifndef HAVE_STRDUP -char *curlx_strdup(const char *str) -{ - size_t len; - char *newstr; - - if(!str) - return (char *)NULL; - - len = strlen(str); - - if(len >= ((size_t)-1) / sizeof(char)) - return (char *)NULL; - - newstr = malloc((len+1)*sizeof(char)); - if(!newstr) - return (char *)NULL; - - memcpy(newstr, str, (len+1)*sizeof(char)); - - return newstr; - -} -#endif - -/*************************************************************************** - * - * Curl_memdup(source, length) - * - * Copies the 'source' data to a newly allocated buffer (that is - * returned). Copies 'length' bytes. - * - * Returns the new pointer or NULL on failure. - * - ***************************************************************************/ -void *Curl_memdup(const void *src, size_t length) -{ - void *buffer = malloc(length); - if(!buffer) - return NULL; /* fail */ - - memcpy(buffer, src, length); - - return buffer; -} - -/*************************************************************************** - * - * Curl_saferealloc(ptr, size) - * - * Does a normal realloc(), but will free the data pointer if the realloc - * fails. If 'size' is zero, it will free the data and return a failure. - * - * This convenience function is provided and used to help us avoid a common - * mistake pattern when we could pass in a zero, catch the NULL return and end - * up free'ing the memory twice. - * - * Returns the new pointer or NULL on failure. - * - ***************************************************************************/ -void *Curl_saferealloc(void *ptr, size_t size) -{ - void *datap = realloc(ptr, size); - if(size && !datap) - /* only free 'ptr' if size was non-zero */ - free(ptr); - return datap; -} diff --git a/build/premake/premake5/contrib/curl/lib/strdup.h b/build/premake/premake5/contrib/curl/lib/strdup.h deleted file mode 100644 index ae3d5d0115..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strdup.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef HEADER_CURL_STRDUP_H -#define HEADER_CURL_STRDUP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifndef HAVE_STRDUP -extern char *curlx_strdup(const char *str); -#endif -void *Curl_memdup(const void *src, size_t buffer_length); -void *Curl_saferealloc(void *ptr, size_t size); - -#endif /* HEADER_CURL_STRDUP_H */ diff --git a/build/premake/premake5/contrib/curl/lib/strerror.c b/build/premake/premake5/contrib/curl/lib/strerror.c deleted file mode 100644 index 7e5cde47b5..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strerror.c +++ /dev/null @@ -1,1072 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2004 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_STRERROR_R -# if (!defined(HAVE_POSIX_STRERROR_R) && \ - !defined(HAVE_GLIBC_STRERROR_R) && \ - !defined(HAVE_VXWORKS_STRERROR_R)) || \ - (defined(HAVE_POSIX_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)) || \ - (defined(HAVE_GLIBC_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R)) || \ - (defined(HAVE_POSIX_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R)) -# error "strerror_r MUST be either POSIX, glibc or vxworks-style" -# endif -#endif - -#include - -#ifdef USE_LIBIDN2 -#include -#endif - -#ifdef USE_WINDOWS_SSPI -#include "curl_sspi.h" -#endif - -#include "strerror.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -const char * -curl_easy_strerror(CURLcode error) -{ -#ifndef CURL_DISABLE_VERBOSE_STRINGS - switch(error) { - case CURLE_OK: - return "No error"; - - case CURLE_UNSUPPORTED_PROTOCOL: - return "Unsupported protocol"; - - case CURLE_FAILED_INIT: - return "Failed initialization"; - - case CURLE_URL_MALFORMAT: - return "URL using bad/illegal format or missing URL"; - - case CURLE_NOT_BUILT_IN: - return "A requested feature, protocol or option was not found built-in in" - " this libcurl due to a build-time decision."; - - case CURLE_COULDNT_RESOLVE_PROXY: - return "Couldn't resolve proxy name"; - - case CURLE_COULDNT_RESOLVE_HOST: - return "Couldn't resolve host name"; - - case CURLE_COULDNT_CONNECT: - return "Couldn't connect to server"; - - case CURLE_WEIRD_SERVER_REPLY: - return "Weird server reply"; - - case CURLE_REMOTE_ACCESS_DENIED: - return "Access denied to remote resource"; - - case CURLE_FTP_ACCEPT_FAILED: - return "FTP: The server failed to connect to data port"; - - case CURLE_FTP_ACCEPT_TIMEOUT: - return "FTP: Accepting server connect has timed out"; - - case CURLE_FTP_PRET_FAILED: - return "FTP: The server did not accept the PRET command."; - - case CURLE_FTP_WEIRD_PASS_REPLY: - return "FTP: unknown PASS reply"; - - case CURLE_FTP_WEIRD_PASV_REPLY: - return "FTP: unknown PASV reply"; - - case CURLE_FTP_WEIRD_227_FORMAT: - return "FTP: unknown 227 response format"; - - case CURLE_FTP_CANT_GET_HOST: - return "FTP: can't figure out the host in the PASV response"; - - case CURLE_HTTP2: - return "Error in the HTTP2 framing layer"; - - case CURLE_FTP_COULDNT_SET_TYPE: - return "FTP: couldn't set file type"; - - case CURLE_PARTIAL_FILE: - return "Transferred a partial file"; - - case CURLE_FTP_COULDNT_RETR_FILE: - return "FTP: couldn't retrieve (RETR failed) the specified file"; - - case CURLE_QUOTE_ERROR: - return "Quote command returned error"; - - case CURLE_HTTP_RETURNED_ERROR: - return "HTTP response code said error"; - - case CURLE_WRITE_ERROR: - return "Failed writing received data to disk/application"; - - case CURLE_UPLOAD_FAILED: - return "Upload failed (at start/before it took off)"; - - case CURLE_READ_ERROR: - return "Failed to open/read local data from file/application"; - - case CURLE_OUT_OF_MEMORY: - return "Out of memory"; - - case CURLE_OPERATION_TIMEDOUT: - return "Timeout was reached"; - - case CURLE_FTP_PORT_FAILED: - return "FTP: command PORT failed"; - - case CURLE_FTP_COULDNT_USE_REST: - return "FTP: command REST failed"; - - case CURLE_RANGE_ERROR: - return "Requested range was not delivered by the server"; - - case CURLE_HTTP_POST_ERROR: - return "Internal problem setting up the POST"; - - case CURLE_SSL_CONNECT_ERROR: - return "SSL connect error"; - - case CURLE_BAD_DOWNLOAD_RESUME: - return "Couldn't resume download"; - - case CURLE_FILE_COULDNT_READ_FILE: - return "Couldn't read a file:// file"; - - case CURLE_LDAP_CANNOT_BIND: - return "LDAP: cannot bind"; - - case CURLE_LDAP_SEARCH_FAILED: - return "LDAP: search failed"; - - case CURLE_FUNCTION_NOT_FOUND: - return "A required function in the library was not found"; - - case CURLE_ABORTED_BY_CALLBACK: - return "Operation was aborted by an application callback"; - - case CURLE_BAD_FUNCTION_ARGUMENT: - return "A libcurl function was given a bad argument"; - - case CURLE_INTERFACE_FAILED: - return "Failed binding local connection end"; - - case CURLE_TOO_MANY_REDIRECTS : - return "Number of redirects hit maximum amount"; - - case CURLE_UNKNOWN_OPTION: - return "An unknown option was passed in to libcurl"; - - case CURLE_TELNET_OPTION_SYNTAX : - return "Malformed telnet option"; - - case CURLE_PEER_FAILED_VERIFICATION: - return "SSL peer certificate or SSH remote key was not OK"; - - case CURLE_GOT_NOTHING: - return "Server returned nothing (no headers, no data)"; - - case CURLE_SSL_ENGINE_NOTFOUND: - return "SSL crypto engine not found"; - - case CURLE_SSL_ENGINE_SETFAILED: - return "Can not set SSL crypto engine as default"; - - case CURLE_SSL_ENGINE_INITFAILED: - return "Failed to initialise SSL crypto engine"; - - case CURLE_SEND_ERROR: - return "Failed sending data to the peer"; - - case CURLE_RECV_ERROR: - return "Failure when receiving data from the peer"; - - case CURLE_SSL_CERTPROBLEM: - return "Problem with the local SSL certificate"; - - case CURLE_SSL_CIPHER: - return "Couldn't use specified SSL cipher"; - - case CURLE_SSL_CACERT: - return "Peer certificate cannot be authenticated with given CA " - "certificates"; - - case CURLE_SSL_CACERT_BADFILE: - return "Problem with the SSL CA cert (path? access rights?)"; - - case CURLE_BAD_CONTENT_ENCODING: - return "Unrecognized or bad HTTP Content or Transfer-Encoding"; - - case CURLE_LDAP_INVALID_URL: - return "Invalid LDAP URL"; - - case CURLE_FILESIZE_EXCEEDED: - return "Maximum file size exceeded"; - - case CURLE_USE_SSL_FAILED: - return "Requested SSL level failed"; - - case CURLE_SSL_SHUTDOWN_FAILED: - return "Failed to shut down the SSL connection"; - - case CURLE_SSL_CRL_BADFILE: - return "Failed to load CRL file (path? access rights?, format?)"; - - case CURLE_SSL_ISSUER_ERROR: - return "Issuer check against peer certificate failed"; - - case CURLE_SEND_FAIL_REWIND: - return "Send failed since rewinding of the data stream failed"; - - case CURLE_LOGIN_DENIED: - return "Login denied"; - - case CURLE_TFTP_NOTFOUND: - return "TFTP: File Not Found"; - - case CURLE_TFTP_PERM: - return "TFTP: Access Violation"; - - case CURLE_REMOTE_DISK_FULL: - return "Disk full or allocation exceeded"; - - case CURLE_TFTP_ILLEGAL: - return "TFTP: Illegal operation"; - - case CURLE_TFTP_UNKNOWNID: - return "TFTP: Unknown transfer ID"; - - case CURLE_REMOTE_FILE_EXISTS: - return "Remote file already exists"; - - case CURLE_TFTP_NOSUCHUSER: - return "TFTP: No such user"; - - case CURLE_CONV_FAILED: - return "Conversion failed"; - - case CURLE_CONV_REQD: - return "Caller must register CURLOPT_CONV_ callback options"; - - case CURLE_REMOTE_FILE_NOT_FOUND: - return "Remote file not found"; - - case CURLE_SSH: - return "Error in the SSH layer"; - - case CURLE_AGAIN: - return "Socket not ready for send/recv"; - - case CURLE_RTSP_CSEQ_ERROR: - return "RTSP CSeq mismatch or invalid CSeq"; - - case CURLE_RTSP_SESSION_ERROR: - return "RTSP session error"; - - case CURLE_FTP_BAD_FILE_LIST: - return "Unable to parse FTP file list"; - - case CURLE_CHUNK_FAILED: - return "Chunk callback failed"; - - case CURLE_NO_CONNECTION_AVAILABLE: - return "The max connection limit is reached"; - - case CURLE_SSL_PINNEDPUBKEYNOTMATCH: - return "SSL public key does not match pinned public key"; - - case CURLE_SSL_INVALIDCERTSTATUS: - return "SSL server certificate status verification FAILED"; - - case CURLE_HTTP2_STREAM: - return "Stream error in the HTTP/2 framing layer"; - - /* error codes not used by current libcurl */ - case CURLE_OBSOLETE20: - case CURLE_OBSOLETE24: - case CURLE_OBSOLETE29: - case CURLE_OBSOLETE32: - case CURLE_OBSOLETE40: - case CURLE_OBSOLETE44: - case CURLE_OBSOLETE46: - case CURLE_OBSOLETE50: - case CURLE_OBSOLETE57: - case CURL_LAST: - break; - } - /* - * By using a switch, gcc -Wall will complain about enum values - * which do not appear, helping keep this function up-to-date. - * By using gcc -Wall -Werror, you can't forget. - * - * A table would not have the same benefit. Most compilers will - * generate code very similar to a table in any case, so there - * is little performance gain from a table. And something is broken - * for the user's application, anyways, so does it matter how fast - * it _doesn't_ work? - * - * The line number for the error will be near this comment, which - * is why it is here, and not at the start of the switch. - */ - return "Unknown error"; -#else - if(!error) - return "No error"; - else - return "Error"; -#endif -} - -const char * -curl_multi_strerror(CURLMcode error) -{ -#ifndef CURL_DISABLE_VERBOSE_STRINGS - switch(error) { - case CURLM_CALL_MULTI_PERFORM: - return "Please call curl_multi_perform() soon"; - - case CURLM_OK: - return "No error"; - - case CURLM_BAD_HANDLE: - return "Invalid multi handle"; - - case CURLM_BAD_EASY_HANDLE: - return "Invalid easy handle"; - - case CURLM_OUT_OF_MEMORY: - return "Out of memory"; - - case CURLM_INTERNAL_ERROR: - return "Internal error"; - - case CURLM_BAD_SOCKET: - return "Invalid socket argument"; - - case CURLM_UNKNOWN_OPTION: - return "Unknown option"; - - case CURLM_ADDED_ALREADY: - return "The easy handle is already added to a multi handle"; - - case CURLM_LAST: - break; - } - - return "Unknown error"; -#else - if(error == CURLM_OK) - return "No error"; - else - return "Error"; -#endif -} - -const char * -curl_share_strerror(CURLSHcode error) -{ -#ifndef CURL_DISABLE_VERBOSE_STRINGS - switch(error) { - case CURLSHE_OK: - return "No error"; - - case CURLSHE_BAD_OPTION: - return "Unknown share option"; - - case CURLSHE_IN_USE: - return "Share currently in use"; - - case CURLSHE_INVALID: - return "Invalid share handle"; - - case CURLSHE_NOMEM: - return "Out of memory"; - - case CURLSHE_NOT_BUILT_IN: - return "Feature not enabled in this library"; - - case CURLSHE_LAST: - break; - } - - return "CURLSHcode unknown"; -#else - if(error == CURLSHE_OK) - return "No error"; - else - return "Error"; -#endif -} - -#ifdef USE_WINSOCK - -/* This function handles most / all (?) Winsock errors curl is able to produce. - */ -static const char * -get_winsock_error (int err, char *buf, size_t len) -{ - const char *p; - -#ifndef CURL_DISABLE_VERBOSE_STRINGS - switch(err) { - case WSAEINTR: - p = "Call interrupted"; - break; - case WSAEBADF: - p = "Bad file"; - break; - case WSAEACCES: - p = "Bad access"; - break; - case WSAEFAULT: - p = "Bad argument"; - break; - case WSAEINVAL: - p = "Invalid arguments"; - break; - case WSAEMFILE: - p = "Out of file descriptors"; - break; - case WSAEWOULDBLOCK: - p = "Call would block"; - break; - case WSAEINPROGRESS: - case WSAEALREADY: - p = "Blocking call in progress"; - break; - case WSAENOTSOCK: - p = "Descriptor is not a socket"; - break; - case WSAEDESTADDRREQ: - p = "Need destination address"; - break; - case WSAEMSGSIZE: - p = "Bad message size"; - break; - case WSAEPROTOTYPE: - p = "Bad protocol"; - break; - case WSAENOPROTOOPT: - p = "Protocol option is unsupported"; - break; - case WSAEPROTONOSUPPORT: - p = "Protocol is unsupported"; - break; - case WSAESOCKTNOSUPPORT: - p = "Socket is unsupported"; - break; - case WSAEOPNOTSUPP: - p = "Operation not supported"; - break; - case WSAEAFNOSUPPORT: - p = "Address family not supported"; - break; - case WSAEPFNOSUPPORT: - p = "Protocol family not supported"; - break; - case WSAEADDRINUSE: - p = "Address already in use"; - break; - case WSAEADDRNOTAVAIL: - p = "Address not available"; - break; - case WSAENETDOWN: - p = "Network down"; - break; - case WSAENETUNREACH: - p = "Network unreachable"; - break; - case WSAENETRESET: - p = "Network has been reset"; - break; - case WSAECONNABORTED: - p = "Connection was aborted"; - break; - case WSAECONNRESET: - p = "Connection was reset"; - break; - case WSAENOBUFS: - p = "No buffer space"; - break; - case WSAEISCONN: - p = "Socket is already connected"; - break; - case WSAENOTCONN: - p = "Socket is not connected"; - break; - case WSAESHUTDOWN: - p = "Socket has been shut down"; - break; - case WSAETOOMANYREFS: - p = "Too many references"; - break; - case WSAETIMEDOUT: - p = "Timed out"; - break; - case WSAECONNREFUSED: - p = "Connection refused"; - break; - case WSAELOOP: - p = "Loop??"; - break; - case WSAENAMETOOLONG: - p = "Name too long"; - break; - case WSAEHOSTDOWN: - p = "Host down"; - break; - case WSAEHOSTUNREACH: - p = "Host unreachable"; - break; - case WSAENOTEMPTY: - p = "Not empty"; - break; - case WSAEPROCLIM: - p = "Process limit reached"; - break; - case WSAEUSERS: - p = "Too many users"; - break; - case WSAEDQUOT: - p = "Bad quota"; - break; - case WSAESTALE: - p = "Something is stale"; - break; - case WSAEREMOTE: - p = "Remote error"; - break; -#ifdef WSAEDISCON /* missing in SalfordC! */ - case WSAEDISCON: - p = "Disconnected"; - break; -#endif - /* Extended Winsock errors */ - case WSASYSNOTREADY: - p = "Winsock library is not ready"; - break; - case WSANOTINITIALISED: - p = "Winsock library not initialised"; - break; - case WSAVERNOTSUPPORTED: - p = "Winsock version not supported"; - break; - - /* getXbyY() errors (already handled in herrmsg): - * Authoritative Answer: Host not found */ - case WSAHOST_NOT_FOUND: - p = "Host not found"; - break; - - /* Non-Authoritative: Host not found, or SERVERFAIL */ - case WSATRY_AGAIN: - p = "Host not found, try again"; - break; - - /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ - case WSANO_RECOVERY: - p = "Unrecoverable error in call to nameserver"; - break; - - /* Valid name, no data record of requested type */ - case WSANO_DATA: - p = "No data record of requested type"; - break; - - default: - return NULL; - } -#else - if(!err) - return NULL; - else - p = "error"; -#endif - strncpy(buf, p, len); - buf [len-1] = '\0'; - return buf; -} -#endif /* USE_WINSOCK */ - -/* - * Our thread-safe and smart strerror() replacement. - * - * The 'err' argument passed in to this function MUST be a true errno number - * as reported on this system. We do no range checking on the number before - * we pass it to the "number-to-message" conversion function and there might - * be systems that don't do proper range checking in there themselves. - * - * We don't do range checking (on systems other than Windows) since there is - * no good reliable and portable way to do it. - */ -const char *Curl_strerror(struct connectdata *conn, int err) -{ - char *buf, *p; - size_t max; - int old_errno = ERRNO; - - DEBUGASSERT(conn); - DEBUGASSERT(err >= 0); - - buf = conn->syserr_buf; - max = sizeof(conn->syserr_buf)-1; - *buf = '\0'; - -#ifdef USE_WINSOCK - -#ifdef _WIN32_WCE - { - wchar_t wbuf[256]; - wbuf[0] = L'\0'; - - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, - LANG_NEUTRAL, wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL); - wcstombs(buf, wbuf, max); - } -#else - /* 'sys_nerr' is the maximum errno number, it is not widely portable */ - if(err >= 0 && err < sys_nerr) - strncpy(buf, strerror(err), max); - else { - if(!get_winsock_error(err, buf, max) && - !FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, - LANG_NEUTRAL, buf, (DWORD)max, NULL)) - snprintf(buf, max, "Unknown error %d (%#x)", err, err); - } -#endif - -#else /* not USE_WINSOCK coming up */ - -#if defined(HAVE_STRERROR_R) && defined(HAVE_POSIX_STRERROR_R) - /* - * The POSIX-style strerror_r() may set errno to ERANGE if insufficient - * storage is supplied via 'strerrbuf' and 'buflen' to hold the generated - * message string, or EINVAL if 'errnum' is not a valid error number. - */ - if(0 != strerror_r(err, buf, max)) { - if('\0' == buf[0]) - snprintf(buf, max, "Unknown error %d", err); - } -#elif defined(HAVE_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R) - /* - * The glibc-style strerror_r() only *might* use the buffer we pass to - * the function, but it always returns the error message as a pointer, - * so we must copy that string unconditionally (if non-NULL). - */ - { - char buffer[256]; - char *msg = strerror_r(err, buffer, sizeof(buffer)); - if(msg) - strncpy(buf, msg, max); - else - snprintf(buf, max, "Unknown error %d", err); - } -#elif defined(HAVE_STRERROR_R) && defined(HAVE_VXWORKS_STRERROR_R) - /* - * The vxworks-style strerror_r() does use the buffer we pass to the function. - * The buffer size should be at least NAME_MAX (256) - */ - { - char buffer[256]; - if(OK == strerror_r(err, buffer)) - strncpy(buf, buffer, max); - else - snprintf(buf, max, "Unknown error %d", err); - } -#else - { - char *msg = strerror(err); - if(msg) - strncpy(buf, msg, max); - else - snprintf(buf, max, "Unknown error %d", err); - } -#endif - -#endif /* end of ! USE_WINSOCK */ - - buf[max] = '\0'; /* make sure the string is zero terminated */ - - /* strip trailing '\r\n' or '\n'. */ - p = strrchr(buf, '\n'); - if(p && (p - buf) >= 2) - *p = '\0'; - p = strrchr(buf, '\r'); - if(p && (p - buf) >= 1) - *p = '\0'; - - if(old_errno != ERRNO) - SET_ERRNO(old_errno); - - return buf; -} - -#ifdef USE_WINDOWS_SSPI -const char *Curl_sspi_strerror (struct connectdata *conn, int err) -{ -#ifndef CURL_DISABLE_VERBOSE_STRINGS - char txtbuf[80]; - char msgbuf[sizeof(conn->syserr_buf)]; - char *p, *str, *msg = NULL; - bool msg_formatted = FALSE; - int old_errno; -#endif - const char *txt; - char *outbuf; - size_t outmax; - - DEBUGASSERT(conn); - - outbuf = conn->syserr_buf; - outmax = sizeof(conn->syserr_buf)-1; - *outbuf = '\0'; - -#ifndef CURL_DISABLE_VERBOSE_STRINGS - - old_errno = ERRNO; - - switch(err) { - case SEC_E_OK: - txt = "No error"; - break; - case CRYPT_E_REVOKED: - txt = "CRYPT_E_REVOKED"; - break; - case SEC_E_ALGORITHM_MISMATCH: - txt = "SEC_E_ALGORITHM_MISMATCH"; - break; - case SEC_E_BAD_BINDINGS: - txt = "SEC_E_BAD_BINDINGS"; - break; - case SEC_E_BAD_PKGID: - txt = "SEC_E_BAD_PKGID"; - break; - case SEC_E_BUFFER_TOO_SMALL: - txt = "SEC_E_BUFFER_TOO_SMALL"; - break; - case SEC_E_CANNOT_INSTALL: - txt = "SEC_E_CANNOT_INSTALL"; - break; - case SEC_E_CANNOT_PACK: - txt = "SEC_E_CANNOT_PACK"; - break; - case SEC_E_CERT_EXPIRED: - txt = "SEC_E_CERT_EXPIRED"; - break; - case SEC_E_CERT_UNKNOWN: - txt = "SEC_E_CERT_UNKNOWN"; - break; - case SEC_E_CERT_WRONG_USAGE: - txt = "SEC_E_CERT_WRONG_USAGE"; - break; - case SEC_E_CONTEXT_EXPIRED: - txt = "SEC_E_CONTEXT_EXPIRED"; - break; - case SEC_E_CROSSREALM_DELEGATION_FAILURE: - txt = "SEC_E_CROSSREALM_DELEGATION_FAILURE"; - break; - case SEC_E_CRYPTO_SYSTEM_INVALID: - txt = "SEC_E_CRYPTO_SYSTEM_INVALID"; - break; - case SEC_E_DECRYPT_FAILURE: - txt = "SEC_E_DECRYPT_FAILURE"; - break; - case SEC_E_DELEGATION_POLICY: - txt = "SEC_E_DELEGATION_POLICY"; - break; - case SEC_E_DELEGATION_REQUIRED: - txt = "SEC_E_DELEGATION_REQUIRED"; - break; - case SEC_E_DOWNGRADE_DETECTED: - txt = "SEC_E_DOWNGRADE_DETECTED"; - break; - case SEC_E_ENCRYPT_FAILURE: - txt = "SEC_E_ENCRYPT_FAILURE"; - break; - case SEC_E_ILLEGAL_MESSAGE: - txt = "SEC_E_ILLEGAL_MESSAGE"; - break; - case SEC_E_INCOMPLETE_CREDENTIALS: - txt = "SEC_E_INCOMPLETE_CREDENTIALS"; - break; - case SEC_E_INCOMPLETE_MESSAGE: - txt = "SEC_E_INCOMPLETE_MESSAGE"; - break; - case SEC_E_INSUFFICIENT_MEMORY: - txt = "SEC_E_INSUFFICIENT_MEMORY"; - break; - case SEC_E_INTERNAL_ERROR: - txt = "SEC_E_INTERNAL_ERROR"; - break; - case SEC_E_INVALID_HANDLE: - txt = "SEC_E_INVALID_HANDLE"; - break; - case SEC_E_INVALID_PARAMETER: - txt = "SEC_E_INVALID_PARAMETER"; - break; - case SEC_E_INVALID_TOKEN: - txt = "SEC_E_INVALID_TOKEN"; - break; - case SEC_E_ISSUING_CA_UNTRUSTED: - txt = "SEC_E_ISSUING_CA_UNTRUSTED"; - break; - case SEC_E_ISSUING_CA_UNTRUSTED_KDC: - txt = "SEC_E_ISSUING_CA_UNTRUSTED_KDC"; - break; - case SEC_E_KDC_CERT_EXPIRED: - txt = "SEC_E_KDC_CERT_EXPIRED"; - break; - case SEC_E_KDC_CERT_REVOKED: - txt = "SEC_E_KDC_CERT_REVOKED"; - break; - case SEC_E_KDC_INVALID_REQUEST: - txt = "SEC_E_KDC_INVALID_REQUEST"; - break; - case SEC_E_KDC_UNABLE_TO_REFER: - txt = "SEC_E_KDC_UNABLE_TO_REFER"; - break; - case SEC_E_KDC_UNKNOWN_ETYPE: - txt = "SEC_E_KDC_UNKNOWN_ETYPE"; - break; - case SEC_E_LOGON_DENIED: - txt = "SEC_E_LOGON_DENIED"; - break; - case SEC_E_MAX_REFERRALS_EXCEEDED: - txt = "SEC_E_MAX_REFERRALS_EXCEEDED"; - break; - case SEC_E_MESSAGE_ALTERED: - txt = "SEC_E_MESSAGE_ALTERED"; - break; - case SEC_E_MULTIPLE_ACCOUNTS: - txt = "SEC_E_MULTIPLE_ACCOUNTS"; - break; - case SEC_E_MUST_BE_KDC: - txt = "SEC_E_MUST_BE_KDC"; - break; - case SEC_E_NOT_OWNER: - txt = "SEC_E_NOT_OWNER"; - break; - case SEC_E_NO_AUTHENTICATING_AUTHORITY: - txt = "SEC_E_NO_AUTHENTICATING_AUTHORITY"; - break; - case SEC_E_NO_CREDENTIALS: - txt = "SEC_E_NO_CREDENTIALS"; - break; - case SEC_E_NO_IMPERSONATION: - txt = "SEC_E_NO_IMPERSONATION"; - break; - case SEC_E_NO_IP_ADDRESSES: - txt = "SEC_E_NO_IP_ADDRESSES"; - break; - case SEC_E_NO_KERB_KEY: - txt = "SEC_E_NO_KERB_KEY"; - break; - case SEC_E_NO_PA_DATA: - txt = "SEC_E_NO_PA_DATA"; - break; - case SEC_E_NO_S4U_PROT_SUPPORT: - txt = "SEC_E_NO_S4U_PROT_SUPPORT"; - break; - case SEC_E_NO_TGT_REPLY: - txt = "SEC_E_NO_TGT_REPLY"; - break; - case SEC_E_OUT_OF_SEQUENCE: - txt = "SEC_E_OUT_OF_SEQUENCE"; - break; - case SEC_E_PKINIT_CLIENT_FAILURE: - txt = "SEC_E_PKINIT_CLIENT_FAILURE"; - break; - case SEC_E_PKINIT_NAME_MISMATCH: - txt = "SEC_E_PKINIT_NAME_MISMATCH"; - break; - case SEC_E_POLICY_NLTM_ONLY: - txt = "SEC_E_POLICY_NLTM_ONLY"; - break; - case SEC_E_QOP_NOT_SUPPORTED: - txt = "SEC_E_QOP_NOT_SUPPORTED"; - break; - case SEC_E_REVOCATION_OFFLINE_C: - txt = "SEC_E_REVOCATION_OFFLINE_C"; - break; - case SEC_E_REVOCATION_OFFLINE_KDC: - txt = "SEC_E_REVOCATION_OFFLINE_KDC"; - break; - case SEC_E_SECPKG_NOT_FOUND: - txt = "SEC_E_SECPKG_NOT_FOUND"; - break; - case SEC_E_SECURITY_QOS_FAILED: - txt = "SEC_E_SECURITY_QOS_FAILED"; - break; - case SEC_E_SHUTDOWN_IN_PROGRESS: - txt = "SEC_E_SHUTDOWN_IN_PROGRESS"; - break; - case SEC_E_SMARTCARD_CERT_EXPIRED: - txt = "SEC_E_SMARTCARD_CERT_EXPIRED"; - break; - case SEC_E_SMARTCARD_CERT_REVOKED: - txt = "SEC_E_SMARTCARD_CERT_REVOKED"; - break; - case SEC_E_SMARTCARD_LOGON_REQUIRED: - txt = "SEC_E_SMARTCARD_LOGON_REQUIRED"; - break; - case SEC_E_STRONG_CRYPTO_NOT_SUPPORTED: - txt = "SEC_E_STRONG_CRYPTO_NOT_SUPPORTED"; - break; - case SEC_E_TARGET_UNKNOWN: - txt = "SEC_E_TARGET_UNKNOWN"; - break; - case SEC_E_TIME_SKEW: - txt = "SEC_E_TIME_SKEW"; - break; - case SEC_E_TOO_MANY_PRINCIPALS: - txt = "SEC_E_TOO_MANY_PRINCIPALS"; - break; - case SEC_E_UNFINISHED_CONTEXT_DELETED: - txt = "SEC_E_UNFINISHED_CONTEXT_DELETED"; - break; - case SEC_E_UNKNOWN_CREDENTIALS: - txt = "SEC_E_UNKNOWN_CREDENTIALS"; - break; - case SEC_E_UNSUPPORTED_FUNCTION: - txt = "SEC_E_UNSUPPORTED_FUNCTION"; - break; - case SEC_E_UNSUPPORTED_PREAUTH: - txt = "SEC_E_UNSUPPORTED_PREAUTH"; - break; - case SEC_E_UNTRUSTED_ROOT: - txt = "SEC_E_UNTRUSTED_ROOT"; - break; - case SEC_E_WRONG_CREDENTIAL_HANDLE: - txt = "SEC_E_WRONG_CREDENTIAL_HANDLE"; - break; - case SEC_E_WRONG_PRINCIPAL: - txt = "SEC_E_WRONG_PRINCIPAL"; - break; - case SEC_I_COMPLETE_AND_CONTINUE: - txt = "SEC_I_COMPLETE_AND_CONTINUE"; - break; - case SEC_I_COMPLETE_NEEDED: - txt = "SEC_I_COMPLETE_NEEDED"; - break; - case SEC_I_CONTEXT_EXPIRED: - txt = "SEC_I_CONTEXT_EXPIRED"; - break; - case SEC_I_CONTINUE_NEEDED: - txt = "SEC_I_CONTINUE_NEEDED"; - break; - case SEC_I_INCOMPLETE_CREDENTIALS: - txt = "SEC_I_INCOMPLETE_CREDENTIALS"; - break; - case SEC_I_LOCAL_LOGON: - txt = "SEC_I_LOCAL_LOGON"; - break; - case SEC_I_NO_LSA_CONTEXT: - txt = "SEC_I_NO_LSA_CONTEXT"; - break; - case SEC_I_RENEGOTIATE: - txt = "SEC_I_RENEGOTIATE"; - break; - case SEC_I_SIGNATURE_NEEDED: - txt = "SEC_I_SIGNATURE_NEEDED"; - break; - default: - txt = "Unknown error"; - } - - if(err == SEC_E_OK) - strncpy(outbuf, txt, outmax); - else if(err == SEC_E_ILLEGAL_MESSAGE) - snprintf(outbuf, outmax, - "SEC_E_ILLEGAL_MESSAGE (0x%08X) - This error usually occurs " - "when a fatal SSL/TLS alert is received (e.g. handshake failed). " - "More detail may be available in the Windows System event log.", - err); - else { - str = txtbuf; - snprintf(txtbuf, sizeof(txtbuf), "%s (0x%08X)", txt, err); - txtbuf[sizeof(txtbuf)-1] = '\0'; - -#ifdef _WIN32_WCE - { - wchar_t wbuf[256]; - wbuf[0] = L'\0'; - - if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err, LANG_NEUTRAL, - wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL)) { - wcstombs(msgbuf, wbuf, sizeof(msgbuf)-1); - msg_formatted = TRUE; - } - } -#else - if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err, LANG_NEUTRAL, - msgbuf, sizeof(msgbuf)-1, NULL)) { - msg_formatted = TRUE; - } -#endif - if(msg_formatted) { - msgbuf[sizeof(msgbuf)-1] = '\0'; - /* strip trailing '\r\n' or '\n' */ - p = strrchr(msgbuf, '\n'); - if(p && (p - msgbuf) >= 2) - *p = '\0'; - p = strrchr(msgbuf, '\r'); - if(p && (p - msgbuf) >= 1) - *p = '\0'; - msg = msgbuf; - } - if(msg) - snprintf(outbuf, outmax, "%s - %s", str, msg); - else - strncpy(outbuf, str, outmax); - } - - if(old_errno != ERRNO) - SET_ERRNO(old_errno); - -#else - - if(err == SEC_E_OK) - txt = "No error"; - else - txt = "Error"; - - strncpy(outbuf, txt, outmax); - -#endif - - outbuf[outmax] = '\0'; - - return outbuf; -} -#endif /* USE_WINDOWS_SSPI */ diff --git a/build/premake/premake5/contrib/curl/lib/strerror.h b/build/premake/premake5/contrib/curl/lib/strerror.h deleted file mode 100644 index 627273eb26..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strerror.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef HEADER_CURL_STRERROR_H -#define HEADER_CURL_STRERROR_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "urldata.h" - -const char *Curl_strerror (struct connectdata *conn, int err); - -#ifdef USE_LIBIDN2 -const char *Curl_idn_strerror (struct connectdata *conn, int err); -#endif - -#ifdef USE_WINDOWS_SSPI -const char *Curl_sspi_strerror (struct connectdata *conn, int err); -#endif - -#endif /* HEADER_CURL_STRERROR_H */ diff --git a/build/premake/premake5/contrib/curl/lib/strtok.c b/build/premake/premake5/contrib/curl/lib/strtok.c deleted file mode 100644 index 460eb87e51..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strtok.c +++ /dev/null @@ -1,66 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef HAVE_STRTOK_R -#include - -#include "strtok.h" - -char * -Curl_strtok_r(char *ptr, const char *sep, char **end) -{ - if(!ptr) - /* we got NULL input so then we get our last position instead */ - ptr = *end; - - /* pass all letters that are including in the separator string */ - while(*ptr && strchr(sep, *ptr)) - ++ptr; - - if(*ptr) { - /* so this is where the next piece of string starts */ - char *start = ptr; - - /* set the end pointer to the first byte after the start */ - *end = start + 1; - - /* scan through the string to find where it ends, it ends on a - null byte or a character that exists in the separator string */ - while(**end && !strchr(sep, **end)) - ++*end; - - if(**end) { - /* the end is not a null byte */ - **end = '\0'; /* zero terminate it! */ - ++*end; /* advance the last pointer to beyond the null byte */ - } - - return start; /* return the position where the string starts */ - } - - /* we ended up on a null byte, there are no more strings to find! */ - return NULL; -} - -#endif /* this was only compiled if strtok_r wasn't present */ diff --git a/build/premake/premake5/contrib/curl/lib/strtok.h b/build/premake/premake5/contrib/curl/lib/strtok.h deleted file mode 100644 index 90b831eb67..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strtok.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef HEADER_CURL_STRTOK_H -#define HEADER_CURL_STRTOK_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" -#include - -#ifndef HAVE_STRTOK_R -char *Curl_strtok_r(char *s, const char *delim, char **last); -#define strtok_r Curl_strtok_r -#else -#include -#endif - -#endif /* HEADER_CURL_STRTOK_H */ diff --git a/build/premake/premake5/contrib/curl/lib/strtoofft.c b/build/premake/premake5/contrib/curl/lib/strtoofft.c deleted file mode 100644 index b854bf4de4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strtoofft.c +++ /dev/null @@ -1,188 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "strtoofft.h" - -/* - * NOTE: - * - * In the ISO C standard (IEEE Std 1003.1), there is a strtoimax() function we - * could use in case strtoll() doesn't exist... See - * http://www.opengroup.org/onlinepubs/009695399/functions/strtoimax.html - */ - -#ifdef NEED_CURL_STRTOLL - -/* Range tests can be used for alphanum decoding if characters are consecutive, - like in ASCII. Else an array is scanned. Determine this condition now. */ - -#if('9' - '0') != 9 || ('Z' - 'A') != 25 || ('z' - 'a') != 25 - -#define NO_RANGE_TEST - -static const char valchars[] = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -#endif - -static int get_char(char c, int base); - -/** - * Emulated version of the strtoll function. This extracts a long long - * value from the given input string and returns it. - */ -curl_off_t -curlx_strtoll(const char *nptr, char **endptr, int base) -{ - char *end; - int is_negative = 0; - int overflow; - int i; - curl_off_t value = 0; - curl_off_t newval; - - /* Skip leading whitespace. */ - end = (char *)nptr; - while(ISSPACE(end[0])) { - end++; - } - - /* Handle the sign, if any. */ - if(end[0] == '-') { - is_negative = 1; - end++; - } - else if(end[0] == '+') { - end++; - } - else if(end[0] == '\0') { - /* We had nothing but perhaps some whitespace -- there was no number. */ - if(endptr) { - *endptr = end; - } - return 0; - } - - /* Handle special beginnings, if present and allowed. */ - if(end[0] == '0' && end[1] == 'x') { - if(base == 16 || base == 0) { - end += 2; - base = 16; - } - } - else if(end[0] == '0') { - if(base == 8 || base == 0) { - end++; - base = 8; - } - } - - /* Matching strtol, if the base is 0 and it doesn't look like - * the number is octal or hex, we assume it's base 10. - */ - if(base == 0) { - base = 10; - } - - /* Loop handling digits. */ - value = 0; - overflow = 0; - for(i = get_char(end[0], base); - i != -1; - end++, i = get_char(end[0], base)) { - newval = base * value + i; - if(newval < value) { - /* We've overflowed. */ - overflow = 1; - break; - } - else - value = newval; - } - - if(!overflow) { - if(is_negative) { - /* Fix the sign. */ - value *= -1; - } - } - else { - if(is_negative) - value = CURL_OFF_T_MIN; - else - value = CURL_OFF_T_MAX; - - SET_ERRNO(ERANGE); - } - - if(endptr) - *endptr = end; - - return value; -} - -/** - * Returns the value of c in the given base, or -1 if c cannot - * be interpreted properly in that base (i.e., is out of range, - * is a null, etc.). - * - * @param c the character to interpret according to base - * @param base the base in which to interpret c - * - * @return the value of c in base, or -1 if c isn't in range - */ -static int get_char(char c, int base) -{ -#ifndef NO_RANGE_TEST - int value = -1; - if(c <= '9' && c >= '0') { - value = c - '0'; - } - else if(c <= 'Z' && c >= 'A') { - value = c - 'A' + 10; - } - else if(c <= 'z' && c >= 'a') { - value = c - 'a' + 10; - } -#else - const char *cp; - int value; - - cp = memchr(valchars, c, 10 + 26 + 26); - - if(!cp) - return -1; - - value = cp - valchars; - - if(value >= 10 + 26) - value -= 26; /* Lowercase. */ -#endif - - if(value >= base) { - value = -1; - } - - return value; -} -#endif /* Only present if we need strtoll, but don't have it. */ diff --git a/build/premake/premake5/contrib/curl/lib/strtoofft.h b/build/premake/premake5/contrib/curl/lib/strtoofft.h deleted file mode 100644 index f4039f3a3b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/strtoofft.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef HEADER_CURL_STRTOOFFT_H -#define HEADER_CURL_STRTOOFFT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -/* - * Determine which string to integral data type conversion function we use - * to implement string conversion to our curl_off_t integral data type. - * - * Notice that curl_off_t might be 64 or 32 bit wide, and that it might use - * an underlying data type which might be 'long', 'int64_t', 'long long' or - * '__int64' and more remotely other data types. - * - * On systems where the size of curl_off_t is greater than the size of 'long' - * the conversion function to use is strtoll() if it is available, otherwise, - * we emulate its functionality with our own clone. - * - * On systems where the size of curl_off_t is smaller or equal than the size - * of 'long' the conversion function to use is strtol(). - */ - -#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG) -# ifdef HAVE_STRTOLL -# define curlx_strtoofft strtoll -# else -# if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64) -# if defined(_SAL_VERSION) - _Check_return_ _CRTIMP __int64 __cdecl _strtoi64( - _In_z_ const char *_String, - _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix); -# else - _CRTIMP __int64 __cdecl _strtoi64(const char *_String, - char **_EndPtr, int _Radix); -# endif -# define curlx_strtoofft _strtoi64 -# else - curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base); -# define curlx_strtoofft curlx_strtoll -# define NEED_CURL_STRTOLL 1 -# endif -# endif -#else -# define curlx_strtoofft strtol -#endif - -#if (CURL_SIZEOF_CURL_OFF_T == 4) -# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF) -#else - /* assume CURL_SIZEOF_CURL_OFF_T == 8 */ -# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) -#endif -#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1)) - -#endif /* HEADER_CURL_STRTOOFFT_H */ diff --git a/build/premake/premake5/contrib/curl/lib/system_win32.c b/build/premake/premake5/contrib/curl/lib/system_win32.c deleted file mode 100644 index 78737593a4..0000000000 --- a/build/premake/premake5/contrib/curl/lib/system_win32.c +++ /dev/null @@ -1,329 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2016, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(WIN32) - -#include -#include "system_win32.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \ - defined(USE_WINSOCK)) - - -#if !defined(LOAD_WITH_ALTERED_SEARCH_PATH) -#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008 -#endif - -#if !defined(LOAD_LIBRARY_SEARCH_SYSTEM32) -#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 -#endif - -/* We use our own typedef here since some headers might lack these */ -typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD); - -/* See function definitions in winbase.h */ -#ifdef UNICODE -# ifdef _WIN32_WCE -# define LOADLIBARYEX L"LoadLibraryExW" -# else -# define LOADLIBARYEX "LoadLibraryExW" -# endif -#else -# define LOADLIBARYEX "LoadLibraryExA" -#endif - -#endif /* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */ - -/* - * Curl_verify_windows_version() - * - * This is used to verify if we are running on a specific windows version. - * - * Parameters: - * - * majorVersion [in] - The major version number. - * minorVersion [in] - The minor version number. - * platform [in] - The optional platform identifer. - * condition [in] - The test condition used to specifier whether we are - * checking a version less then, equal to or greater than - * what is specified in the major and minor version - * numbers. - * - * Returns TRUE if matched; otherwise FALSE. - */ -bool Curl_verify_windows_version(const unsigned int majorVersion, - const unsigned int minorVersion, - const PlatformIdentifier platform, - const VersionCondition condition) -{ - bool matched = FALSE; - -#if defined(CURL_WINDOWS_APP) - /* We have no way to determine the Windows version from Windows apps, - so let's assume we're running on the target Windows version. */ - const WORD fullVersion = MAKEWORD(minorVersion, majorVersion); - const WORD targetVersion = (WORD)_WIN32_WINNT; - - switch(condition) { - case VERSION_LESS_THAN: - matched = targetVersion < fullVersion; - break; - - case VERSION_LESS_THAN_EQUAL: - matched = targetVersion <= fullVersion; - break; - - case VERSION_EQUAL: - matched = targetVersion == fullVersion; - break; - - case VERSION_GREATER_THAN_EQUAL: - matched = targetVersion >= fullVersion; - break; - - case VERSION_GREATER_THAN: - matched = targetVersion > fullVersion; - break; - } - - if(matched && (platform == PLATFORM_WINDOWS)) { - /* we're always running on PLATFORM_WINNT */ - matched = FALSE; - } -#elif !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \ - (_WIN32_WINNT < _WIN32_WINNT_WIN2K) - OSVERSIONINFO osver; - - memset(&osver, 0, sizeof(osver)); - osver.dwOSVersionInfoSize = sizeof(osver); - - /* Find out Windows version */ - if(GetVersionEx(&osver)) { - /* Verify the Operating System version number */ - switch(condition) { - case VERSION_LESS_THAN: - if(osver.dwMajorVersion < majorVersion || - (osver.dwMajorVersion == majorVersion && - osver.dwMinorVersion < minorVersion)) - matched = TRUE; - break; - - case VERSION_LESS_THAN_EQUAL: - if(osver.dwMajorVersion <= majorVersion && - osver.dwMinorVersion <= minorVersion) - matched = TRUE; - break; - - case VERSION_EQUAL: - if(osver.dwMajorVersion == majorVersion && - osver.dwMinorVersion == minorVersion) - matched = TRUE; - break; - - case VERSION_GREATER_THAN_EQUAL: - if(osver.dwMajorVersion >= majorVersion && - osver.dwMinorVersion >= minorVersion) - matched = TRUE; - break; - - case VERSION_GREATER_THAN: - if(osver.dwMajorVersion > majorVersion || - (osver.dwMajorVersion == majorVersion && - osver.dwMinorVersion > minorVersion)) - matched = TRUE; - break; - } - - /* Verify the platform identifier (if necessary) */ - if(matched) { - switch(platform) { - case PLATFORM_WINDOWS: - if(osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) - matched = FALSE; - break; - - case PLATFORM_WINNT: - if(osver.dwPlatformId != VER_PLATFORM_WIN32_NT) - matched = FALSE; - - default: /* like platform == PLATFORM_DONT_CARE */ - break; - } - } - } -#else - ULONGLONG cm = 0; - OSVERSIONINFOEX osver; - BYTE majorCondition; - BYTE minorCondition; - BYTE spMajorCondition; - BYTE spMinorCondition; - - switch(condition) { - case VERSION_LESS_THAN: - majorCondition = VER_LESS; - minorCondition = VER_LESS; - spMajorCondition = VER_LESS_EQUAL; - spMinorCondition = VER_LESS_EQUAL; - break; - - case VERSION_LESS_THAN_EQUAL: - majorCondition = VER_LESS_EQUAL; - minorCondition = VER_LESS_EQUAL; - spMajorCondition = VER_LESS_EQUAL; - spMinorCondition = VER_LESS_EQUAL; - break; - - case VERSION_EQUAL: - majorCondition = VER_EQUAL; - minorCondition = VER_EQUAL; - spMajorCondition = VER_GREATER_EQUAL; - spMinorCondition = VER_GREATER_EQUAL; - break; - - case VERSION_GREATER_THAN_EQUAL: - majorCondition = VER_GREATER_EQUAL; - minorCondition = VER_GREATER_EQUAL; - spMajorCondition = VER_GREATER_EQUAL; - spMinorCondition = VER_GREATER_EQUAL; - break; - - case VERSION_GREATER_THAN: - majorCondition = VER_GREATER; - minorCondition = VER_GREATER; - spMajorCondition = VER_GREATER_EQUAL; - spMinorCondition = VER_GREATER_EQUAL; - break; - - default: - return FALSE; - } - - memset(&osver, 0, sizeof(osver)); - osver.dwOSVersionInfoSize = sizeof(osver); - osver.dwMajorVersion = majorVersion; - osver.dwMinorVersion = minorVersion; - if(platform == PLATFORM_WINDOWS) - osver.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS; - else if(platform == PLATFORM_WINNT) - osver.dwPlatformId = VER_PLATFORM_WIN32_NT; - - cm = VerSetConditionMask(cm, VER_MAJORVERSION, majorCondition); - cm = VerSetConditionMask(cm, VER_MINORVERSION, minorCondition); - cm = VerSetConditionMask(cm, VER_SERVICEPACKMAJOR, spMajorCondition); - cm = VerSetConditionMask(cm, VER_SERVICEPACKMINOR, spMinorCondition); - if(platform != PLATFORM_DONT_CARE) - cm = VerSetConditionMask(cm, VER_PLATFORMID, VER_EQUAL); - - if(VerifyVersionInfo(&osver, (VER_MAJORVERSION | VER_MINORVERSION | - VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR), - cm)) - matched = TRUE; -#endif - - return matched; -} - -#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \ - defined(USE_WINSOCK)) - -/* - * Curl_load_library() - * - * This is used to dynamically load DLLs using the most secure method available - * for the version of Windows that we are running on. - * - * Parameters: - * - * filename [in] - The filename or full path of the DLL to load. If only the - * filename is passed then the DLL will be loaded from the - * Windows system directory. - * - * Returns the handle of the module on success; otherwise NULL. - */ -HMODULE Curl_load_library(LPCTSTR filename) -{ - HMODULE hModule = NULL; - LOADLIBRARYEX_FN pLoadLibraryEx = NULL; - - /* Get a handle to kernel32 so we can access it's functions at runtime */ - HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32")); - if(!hKernel32) - return NULL; - - /* Attempt to find LoadLibraryEx() which is only available on Windows 2000 - and above */ - pLoadLibraryEx = (LOADLIBRARYEX_FN) GetProcAddress(hKernel32, LOADLIBARYEX); - - /* Detect if there's already a path in the filename and load the library if - there is. Note: Both back slashes and forward slashes have been supported - since the earlier days of DOS at an API level although they are not - supported by command prompt */ - if(_tcspbrk(filename, TEXT("\\/"))) { - /** !checksrc! disable BANNEDFUNC 1 **/ - hModule = pLoadLibraryEx ? - pLoadLibraryEx(filename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) : - LoadLibrary(filename); - } - /* Detect if KB2533623 is installed, as LOAD_LIBARY_SEARCH_SYSTEM32 is only - supported on Windows Vista, Windows Server 2008, Windows 7 and Windows - Server 2008 R2 with this patch or natively on Windows 8 and above */ - else if(pLoadLibraryEx && GetProcAddress(hKernel32, "AddDllDirectory")) { - /* Load the DLL from the Windows system directory */ - hModule = pLoadLibraryEx(filename, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); - } - else { - /* Attempt to get the Windows system path */ - UINT systemdirlen = GetSystemDirectory(NULL, 0); - if(systemdirlen) { - /* Allocate space for the full DLL path (Room for the null terminator - is included in systemdirlen) */ - size_t filenamelen = _tcslen(filename); - TCHAR *path = malloc(sizeof(TCHAR) * (systemdirlen + 1 + filenamelen)); - if(path && GetSystemDirectory(path, systemdirlen)) { - /* Calculate the full DLL path */ - _tcscpy(path + _tcslen(path), TEXT("\\")); - _tcscpy(path + _tcslen(path), filename); - - /* Load the DLL from the Windows system directory */ - /** !checksrc! disable BANNEDFUNC 1 **/ - hModule = pLoadLibraryEx ? - pLoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) : - LoadLibrary(path); - - } - free(path); - } - } - - return hModule; -} - -#endif /* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */ - -#endif /* WIN32 */ diff --git a/build/premake/premake5/contrib/curl/lib/system_win32.h b/build/premake/premake5/contrib/curl/lib/system_win32.h deleted file mode 100644 index 1e772856b2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/system_win32.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef HEADER_CURL_SYSTEM_WIN32_H -#define HEADER_CURL_SYSTEM_WIN32_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2016, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(WIN32) - -/* Version condition */ -typedef enum { - VERSION_LESS_THAN, - VERSION_LESS_THAN_EQUAL, - VERSION_EQUAL, - VERSION_GREATER_THAN_EQUAL, - VERSION_GREATER_THAN -} VersionCondition; - -/* Platform identifier */ -typedef enum { - PLATFORM_DONT_CARE, - PLATFORM_WINDOWS, - PLATFORM_WINNT -} PlatformIdentifier; - -/* This is used to verify if we are running on a specific windows version */ -bool Curl_verify_windows_version(const unsigned int majorVersion, - const unsigned int minorVersion, - const PlatformIdentifier platform, - const VersionCondition condition); - -#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \ - defined(USE_WINSOCK)) - -/* This is used to dynamically load DLLs */ -HMODULE Curl_load_library(LPCTSTR filename); - -#endif /* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */ - -#endif /* WIN32 */ - -#endif /* HEADER_CURL_SYSTEM_WIN32_H */ diff --git a/build/premake/premake5/contrib/curl/lib/telnet.c b/build/premake/premake5/contrib/curl/lib/telnet.c deleted file mode 100644 index 162cab757c..0000000000 --- a/build/premake/premake5/contrib/curl/lib/telnet.c +++ /dev/null @@ -1,1678 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_TELNET - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#include "urldata.h" -#include -#include "transfer.h" -#include "sendf.h" -#include "telnet.h" -#include "connect.h" -#include "progress.h" -#include "system_win32.h" - -#define TELOPTS -#define TELCMDS - -#include "arpa_telnet.h" -#include "select.h" -#include "strcase.h" -#include "warnless.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -#define SUBBUFSIZE 512 - -#define CURL_SB_CLEAR(x) x->subpointer = x->subbuffer -#define CURL_SB_TERM(x) \ - do { \ - x->subend = x->subpointer; \ - CURL_SB_CLEAR(x); \ - } WHILE_FALSE -#define CURL_SB_ACCUM(x,c) \ - do { \ - if(x->subpointer < (x->subbuffer+sizeof x->subbuffer)) \ - *x->subpointer++ = (c); \ - } WHILE_FALSE - -#define CURL_SB_GET(x) ((*x->subpointer++)&0xff) -#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff) -#define CURL_SB_EOF(x) (x->subpointer >= x->subend) -#define CURL_SB_LEN(x) (x->subend - x->subpointer) - -#ifdef CURL_DISABLE_VERBOSE_STRINGS -#define printoption(a,b,c,d) Curl_nop_stmt -#endif - -#ifdef USE_WINSOCK -typedef FARPROC WSOCK2_FUNC; -static CURLcode check_wsock2(struct Curl_easy *data); -#endif - -static -CURLcode telrcv(struct connectdata *, - const unsigned char *inbuf, /* Data received from socket */ - ssize_t count); /* Number of bytes received */ - -#ifndef CURL_DISABLE_VERBOSE_STRINGS -static void printoption(struct Curl_easy *data, - const char *direction, - int cmd, int option); -#endif - -static void negotiate(struct connectdata *); -static void send_negotiation(struct connectdata *, int cmd, int option); -static void set_local_option(struct connectdata *, int cmd, int option); -static void set_remote_option(struct connectdata *, int cmd, int option); - -static void printsub(struct Curl_easy *data, - int direction, unsigned char *pointer, - size_t length); -static void suboption(struct connectdata *); -static void sendsuboption(struct connectdata *conn, int option); - -static CURLcode telnet_do(struct connectdata *conn, bool *done); -static CURLcode telnet_done(struct connectdata *conn, - CURLcode, bool premature); -static CURLcode send_telnet_data(struct connectdata *conn, - char *buffer, ssize_t nread); - -/* For negotiation compliant to RFC 1143 */ -#define CURL_NO 0 -#define CURL_YES 1 -#define CURL_WANTYES 2 -#define CURL_WANTNO 3 - -#define CURL_EMPTY 0 -#define CURL_OPPOSITE 1 - -/* - * Telnet receiver states for fsm - */ -typedef enum -{ - CURL_TS_DATA = 0, - CURL_TS_IAC, - CURL_TS_WILL, - CURL_TS_WONT, - CURL_TS_DO, - CURL_TS_DONT, - CURL_TS_CR, - CURL_TS_SB, /* sub-option collection */ - CURL_TS_SE /* looking for sub-option end */ -} TelnetReceive; - -struct TELNET { - int please_negotiate; - int already_negotiated; - int us[256]; - int usq[256]; - int us_preferred[256]; - int him[256]; - int himq[256]; - int him_preferred[256]; - int subnegotiation[256]; - char subopt_ttype[32]; /* Set with suboption TTYPE */ - char subopt_xdisploc[128]; /* Set with suboption XDISPLOC */ - unsigned short subopt_wsx; /* Set with suboption NAWS */ - unsigned short subopt_wsy; /* Set with suboption NAWS */ - struct curl_slist *telnet_vars; /* Environment variables */ - - /* suboptions */ - unsigned char subbuffer[SUBBUFSIZE]; - unsigned char *subpointer, *subend; /* buffer for sub-options */ - - TelnetReceive telrcv_state; -}; - - -/* - * TELNET protocol handler. - */ - -const struct Curl_handler Curl_handler_telnet = { - "TELNET", /* scheme */ - ZERO_NULL, /* setup_connection */ - telnet_do, /* do_it */ - telnet_done, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_TELNET, /* defport */ - CURLPROTO_TELNET, /* protocol */ - PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */ -}; - - -#ifdef USE_WINSOCK -static CURLcode -check_wsock2(struct Curl_easy *data) -{ - int err; - WORD wVersionRequested; - WSADATA wsaData; - - DEBUGASSERT(data); - - /* telnet requires at least WinSock 2.0 so ask for it. */ - wVersionRequested = MAKEWORD(2, 0); - - err = WSAStartup(wVersionRequested, &wsaData); - - /* We must've called this once already, so this call */ - /* should always succeed. But, just in case... */ - if(err != 0) { - failf(data,"WSAStartup failed (%d)",err); - return CURLE_FAILED_INIT; - } - - /* We have to have a WSACleanup call for every successful */ - /* WSAStartup call. */ - WSACleanup(); - - /* Check that our version is supported */ - if(LOBYTE(wsaData.wVersion) != LOBYTE(wVersionRequested) || - HIBYTE(wsaData.wVersion) != HIBYTE(wVersionRequested)) { - /* Our version isn't supported */ - failf(data, "insufficient winsock version to support " - "telnet"); - return CURLE_FAILED_INIT; - } - - /* Our version is supported */ - return CURLE_OK; -} -#endif - -static -CURLcode init_telnet(struct connectdata *conn) -{ - struct TELNET *tn; - - tn = calloc(1, sizeof(struct TELNET)); - if(!tn) - return CURLE_OUT_OF_MEMORY; - - conn->data->req.protop = tn; /* make us known */ - - tn->telrcv_state = CURL_TS_DATA; - - /* Init suboptions */ - CURL_SB_CLEAR(tn); - - /* Set the options we want by default */ - tn->us_preferred[CURL_TELOPT_SGA] = CURL_YES; - tn->him_preferred[CURL_TELOPT_SGA] = CURL_YES; - - /* To be compliant with previous releases of libcurl - we enable this option by default. This behaviour - can be changed thanks to the "BINARY" option in - CURLOPT_TELNETOPTIONS - */ - tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES; - tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES; - - /* We must allow the server to echo what we sent - but it is not necessary to request the server - to do so (it might forces the server to close - the connection). Hence, we ignore ECHO in the - negotiate function - */ - tn->him_preferred[CURL_TELOPT_ECHO] = CURL_YES; - - /* Set the subnegotiation fields to send information - just after negotiation passed (do/will) - - Default values are (0,0) initialized by calloc. - According to the RFC1013 it is valid: - A value equal to zero is acceptable for the width (or height), - and means that no character width (or height) is being sent. - In this case, the width (or height) that will be assumed by the - Telnet server is operating system specific (it will probably be - based upon the terminal type information that may have been sent - using the TERMINAL TYPE Telnet option). */ - tn->subnegotiation[CURL_TELOPT_NAWS] = CURL_YES; - return CURLE_OK; -} - -static void negotiate(struct connectdata *conn) -{ - int i; - struct TELNET *tn = (struct TELNET *) conn->data->req.protop; - - for(i = 0;i < CURL_NTELOPTS;i++) { - if(i==CURL_TELOPT_ECHO) - continue; - - if(tn->us_preferred[i] == CURL_YES) - set_local_option(conn, i, CURL_YES); - - if(tn->him_preferred[i] == CURL_YES) - set_remote_option(conn, i, CURL_YES); - } -} - -#ifndef CURL_DISABLE_VERBOSE_STRINGS -static void printoption(struct Curl_easy *data, - const char *direction, int cmd, int option) -{ - const char *fmt; - const char *opt; - - if(data->set.verbose) { - if(cmd == CURL_IAC) { - if(CURL_TELCMD_OK(option)) - infof(data, "%s IAC %s\n", direction, CURL_TELCMD(option)); - else - infof(data, "%s IAC %d\n", direction, option); - } - else { - fmt = (cmd == CURL_WILL) ? "WILL" : (cmd == CURL_WONT) ? "WONT" : - (cmd == CURL_DO) ? "DO" : (cmd == CURL_DONT) ? "DONT" : 0; - if(fmt) { - if(CURL_TELOPT_OK(option)) - opt = CURL_TELOPT(option); - else if(option == CURL_TELOPT_EXOPL) - opt = "EXOPL"; - else - opt = NULL; - - if(opt) - infof(data, "%s %s %s\n", direction, fmt, opt); - else - infof(data, "%s %s %d\n", direction, fmt, option); - } - else - infof(data, "%s %d %d\n", direction, cmd, option); - } - } -} -#endif - -static void send_negotiation(struct connectdata *conn, int cmd, int option) -{ - unsigned char buf[3]; - ssize_t bytes_written; - int err; - struct Curl_easy *data = conn->data; - - buf[0] = CURL_IAC; - buf[1] = (unsigned char)cmd; - buf[2] = (unsigned char)option; - - bytes_written = swrite(conn->sock[FIRSTSOCKET], buf, 3); - if(bytes_written < 0) { - err = SOCKERRNO; - failf(data,"Sending data failed (%d)",err); - } - - printoption(conn->data, "SENT", cmd, option); -} - -static -void set_remote_option(struct connectdata *conn, int option, int newstate) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - if(newstate == CURL_YES) { - switch(tn->him[option]) { - case CURL_NO: - tn->him[option] = CURL_WANTYES; - send_negotiation(conn, CURL_DO, option); - break; - - case CURL_YES: - /* Already enabled */ - break; - - case CURL_WANTNO: - switch(tn->himq[option]) { - case CURL_EMPTY: - /* Already negotiating for CURL_YES, queue the request */ - tn->himq[option] = CURL_OPPOSITE; - break; - case CURL_OPPOSITE: - /* Error: already queued an enable request */ - break; - } - break; - - case CURL_WANTYES: - switch(tn->himq[option]) { - case CURL_EMPTY: - /* Error: already negotiating for enable */ - break; - case CURL_OPPOSITE: - tn->himq[option] = CURL_EMPTY; - break; - } - break; - } - } - else { /* NO */ - switch(tn->him[option]) { - case CURL_NO: - /* Already disabled */ - break; - - case CURL_YES: - tn->him[option] = CURL_WANTNO; - send_negotiation(conn, CURL_DONT, option); - break; - - case CURL_WANTNO: - switch(tn->himq[option]) { - case CURL_EMPTY: - /* Already negotiating for NO */ - break; - case CURL_OPPOSITE: - tn->himq[option] = CURL_EMPTY; - break; - } - break; - - case CURL_WANTYES: - switch(tn->himq[option]) { - case CURL_EMPTY: - tn->himq[option] = CURL_OPPOSITE; - break; - case CURL_OPPOSITE: - break; - } - break; - } - } -} - -static -void rec_will(struct connectdata *conn, int option) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - switch(tn->him[option]) { - case CURL_NO: - if(tn->him_preferred[option] == CURL_YES) { - tn->him[option] = CURL_YES; - send_negotiation(conn, CURL_DO, option); - } - else - send_negotiation(conn, CURL_DONT, option); - - break; - - case CURL_YES: - /* Already enabled */ - break; - - case CURL_WANTNO: - switch(tn->himq[option]) { - case CURL_EMPTY: - /* Error: DONT answered by WILL */ - tn->him[option] = CURL_NO; - break; - case CURL_OPPOSITE: - /* Error: DONT answered by WILL */ - tn->him[option] = CURL_YES; - tn->himq[option] = CURL_EMPTY; - break; - } - break; - - case CURL_WANTYES: - switch(tn->himq[option]) { - case CURL_EMPTY: - tn->him[option] = CURL_YES; - break; - case CURL_OPPOSITE: - tn->him[option] = CURL_WANTNO; - tn->himq[option] = CURL_EMPTY; - send_negotiation(conn, CURL_DONT, option); - break; - } - break; - } -} - -static -void rec_wont(struct connectdata *conn, int option) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - switch(tn->him[option]) { - case CURL_NO: - /* Already disabled */ - break; - - case CURL_YES: - tn->him[option] = CURL_NO; - send_negotiation(conn, CURL_DONT, option); - break; - - case CURL_WANTNO: - switch(tn->himq[option]) { - case CURL_EMPTY: - tn->him[option] = CURL_NO; - break; - - case CURL_OPPOSITE: - tn->him[option] = CURL_WANTYES; - tn->himq[option] = CURL_EMPTY; - send_negotiation(conn, CURL_DO, option); - break; - } - break; - - case CURL_WANTYES: - switch(tn->himq[option]) { - case CURL_EMPTY: - tn->him[option] = CURL_NO; - break; - case CURL_OPPOSITE: - tn->him[option] = CURL_NO; - tn->himq[option] = CURL_EMPTY; - break; - } - break; - } -} - -static void -set_local_option(struct connectdata *conn, int option, int newstate) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - if(newstate == CURL_YES) { - switch(tn->us[option]) { - case CURL_NO: - tn->us[option] = CURL_WANTYES; - send_negotiation(conn, CURL_WILL, option); - break; - - case CURL_YES: - /* Already enabled */ - break; - - case CURL_WANTNO: - switch(tn->usq[option]) { - case CURL_EMPTY: - /* Already negotiating for CURL_YES, queue the request */ - tn->usq[option] = CURL_OPPOSITE; - break; - case CURL_OPPOSITE: - /* Error: already queued an enable request */ - break; - } - break; - - case CURL_WANTYES: - switch(tn->usq[option]) { - case CURL_EMPTY: - /* Error: already negotiating for enable */ - break; - case CURL_OPPOSITE: - tn->usq[option] = CURL_EMPTY; - break; - } - break; - } - } - else { /* NO */ - switch(tn->us[option]) { - case CURL_NO: - /* Already disabled */ - break; - - case CURL_YES: - tn->us[option] = CURL_WANTNO; - send_negotiation(conn, CURL_WONT, option); - break; - - case CURL_WANTNO: - switch(tn->usq[option]) { - case CURL_EMPTY: - /* Already negotiating for NO */ - break; - case CURL_OPPOSITE: - tn->usq[option] = CURL_EMPTY; - break; - } - break; - - case CURL_WANTYES: - switch(tn->usq[option]) { - case CURL_EMPTY: - tn->usq[option] = CURL_OPPOSITE; - break; - case CURL_OPPOSITE: - break; - } - break; - } - } -} - -static -void rec_do(struct connectdata *conn, int option) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - switch(tn->us[option]) { - case CURL_NO: - if(tn->us_preferred[option] == CURL_YES) { - tn->us[option] = CURL_YES; - send_negotiation(conn, CURL_WILL, option); - if(tn->subnegotiation[option] == CURL_YES) - /* transmission of data option */ - sendsuboption(conn, option); - } - else if(tn->subnegotiation[option] == CURL_YES) { - /* send information to achieve this option*/ - tn->us[option] = CURL_YES; - send_negotiation(conn, CURL_WILL, option); - sendsuboption(conn, option); - } - else - send_negotiation(conn, CURL_WONT, option); - break; - - case CURL_YES: - /* Already enabled */ - break; - - case CURL_WANTNO: - switch(tn->usq[option]) { - case CURL_EMPTY: - /* Error: DONT answered by WILL */ - tn->us[option] = CURL_NO; - break; - case CURL_OPPOSITE: - /* Error: DONT answered by WILL */ - tn->us[option] = CURL_YES; - tn->usq[option] = CURL_EMPTY; - break; - } - break; - - case CURL_WANTYES: - switch(tn->usq[option]) { - case CURL_EMPTY: - tn->us[option] = CURL_YES; - if(tn->subnegotiation[option] == CURL_YES) { - /* transmission of data option */ - sendsuboption(conn, option); - } - break; - case CURL_OPPOSITE: - tn->us[option] = CURL_WANTNO; - tn->himq[option] = CURL_EMPTY; - send_negotiation(conn, CURL_WONT, option); - break; - } - break; - } -} - -static -void rec_dont(struct connectdata *conn, int option) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - switch(tn->us[option]) { - case CURL_NO: - /* Already disabled */ - break; - - case CURL_YES: - tn->us[option] = CURL_NO; - send_negotiation(conn, CURL_WONT, option); - break; - - case CURL_WANTNO: - switch(tn->usq[option]) { - case CURL_EMPTY: - tn->us[option] = CURL_NO; - break; - - case CURL_OPPOSITE: - tn->us[option] = CURL_WANTYES; - tn->usq[option] = CURL_EMPTY; - send_negotiation(conn, CURL_WILL, option); - break; - } - break; - - case CURL_WANTYES: - switch(tn->usq[option]) { - case CURL_EMPTY: - tn->us[option] = CURL_NO; - break; - case CURL_OPPOSITE: - tn->us[option] = CURL_NO; - tn->usq[option] = CURL_EMPTY; - break; - } - break; - } -} - - -static void printsub(struct Curl_easy *data, - int direction, /* '<' or '>' */ - unsigned char *pointer, /* where suboption data is */ - size_t length) /* length of suboption data */ -{ - unsigned int i = 0; - - if(data->set.verbose) { - if(direction) { - infof(data, "%s IAC SB ", (direction == '<')? "RCVD":"SENT"); - if(length >= 3) { - int j; - - i = pointer[length-2]; - j = pointer[length-1]; - - if(i != CURL_IAC || j != CURL_SE) { - infof(data, "(terminated by "); - if(CURL_TELOPT_OK(i)) - infof(data, "%s ", CURL_TELOPT(i)); - else if(CURL_TELCMD_OK(i)) - infof(data, "%s ", CURL_TELCMD(i)); - else - infof(data, "%u ", i); - if(CURL_TELOPT_OK(j)) - infof(data, "%s", CURL_TELOPT(j)); - else if(CURL_TELCMD_OK(j)) - infof(data, "%s", CURL_TELCMD(j)); - else - infof(data, "%d", j); - infof(data, ", not IAC SE!) "); - } - } - length -= 2; - } - if(length < 1) { - infof(data, "(Empty suboption?)"); - return; - } - - if(CURL_TELOPT_OK(pointer[0])) { - switch(pointer[0]) { - case CURL_TELOPT_TTYPE: - case CURL_TELOPT_XDISPLOC: - case CURL_TELOPT_NEW_ENVIRON: - case CURL_TELOPT_NAWS: - infof(data, "%s", CURL_TELOPT(pointer[0])); - break; - default: - infof(data, "%s (unsupported)", CURL_TELOPT(pointer[0])); - break; - } - } - else - infof(data, "%d (unknown)", pointer[i]); - - switch(pointer[0]) { - case CURL_TELOPT_NAWS: - if(length > 4) - infof(data, "Width: %hu ; Height: %hu", (pointer[1]<<8) | pointer[2], - (pointer[3]<<8) | pointer[4]); - break; - default: - switch(pointer[1]) { - case CURL_TELQUAL_IS: - infof(data, " IS"); - break; - case CURL_TELQUAL_SEND: - infof(data, " SEND"); - break; - case CURL_TELQUAL_INFO: - infof(data, " INFO/REPLY"); - break; - case CURL_TELQUAL_NAME: - infof(data, " NAME"); - break; - } - - switch(pointer[0]) { - case CURL_TELOPT_TTYPE: - case CURL_TELOPT_XDISPLOC: - pointer[length] = 0; - infof(data, " \"%s\"", &pointer[2]); - break; - case CURL_TELOPT_NEW_ENVIRON: - if(pointer[1] == CURL_TELQUAL_IS) { - infof(data, " "); - for(i = 3;i < length;i++) { - switch(pointer[i]) { - case CURL_NEW_ENV_VAR: - infof(data, ", "); - break; - case CURL_NEW_ENV_VALUE: - infof(data, " = "); - break; - default: - infof(data, "%c", pointer[i]); - break; - } - } - } - break; - default: - for(i = 2; i < length; i++) - infof(data, " %.2x", pointer[i]); - break; - } - } - if(direction) - infof(data, "\n"); - } -} - -static CURLcode check_telnet_options(struct connectdata *conn) -{ - struct curl_slist *head; - struct curl_slist *beg; - char option_keyword[128] = ""; - char option_arg[256] = ""; - struct Curl_easy *data = conn->data; - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - CURLcode result = CURLE_OK; - int binary_option; - - /* Add the user name as an environment variable if it - was given on the command line */ - if(conn->bits.user_passwd) { - snprintf(option_arg, sizeof(option_arg), "USER,%s", conn->user); - beg = curl_slist_append(tn->telnet_vars, option_arg); - if(!beg) { - curl_slist_free_all(tn->telnet_vars); - tn->telnet_vars = NULL; - return CURLE_OUT_OF_MEMORY; - } - tn->telnet_vars = beg; - tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES; - } - - for(head = data->set.telnet_options; head; head=head->next) { - if(sscanf(head->data, "%127[^= ]%*[ =]%255s", - option_keyword, option_arg) == 2) { - - /* Terminal type */ - if(strcasecompare(option_keyword, "TTYPE")) { - strncpy(tn->subopt_ttype, option_arg, 31); - tn->subopt_ttype[31] = 0; /* String termination */ - tn->us_preferred[CURL_TELOPT_TTYPE] = CURL_YES; - continue; - } - - /* Display variable */ - if(strcasecompare(option_keyword, "XDISPLOC")) { - strncpy(tn->subopt_xdisploc, option_arg, 127); - tn->subopt_xdisploc[127] = 0; /* String termination */ - tn->us_preferred[CURL_TELOPT_XDISPLOC] = CURL_YES; - continue; - } - - /* Environment variable */ - if(strcasecompare(option_keyword, "NEW_ENV")) { - beg = curl_slist_append(tn->telnet_vars, option_arg); - if(!beg) { - result = CURLE_OUT_OF_MEMORY; - break; - } - tn->telnet_vars = beg; - tn->us_preferred[CURL_TELOPT_NEW_ENVIRON] = CURL_YES; - continue; - } - - /* Window Size */ - if(strcasecompare(option_keyword, "WS")) { - if(sscanf(option_arg, "%hu%*[xX]%hu", - &tn->subopt_wsx, &tn->subopt_wsy) == 2) - tn->us_preferred[CURL_TELOPT_NAWS] = CURL_YES; - else { - failf(data, "Syntax error in telnet option: %s", head->data); - result = CURLE_TELNET_OPTION_SYNTAX; - break; - } - continue; - } - - /* To take care or not of the 8th bit in data exchange */ - if(strcasecompare(option_keyword, "BINARY")) { - binary_option=atoi(option_arg); - if(binary_option!=1) { - tn->us_preferred[CURL_TELOPT_BINARY] = CURL_NO; - tn->him_preferred[CURL_TELOPT_BINARY] = CURL_NO; - } - continue; - } - - failf(data, "Unknown telnet option %s", head->data); - result = CURLE_UNKNOWN_TELNET_OPTION; - break; - } - else { - failf(data, "Syntax error in telnet option: %s", head->data); - result = CURLE_TELNET_OPTION_SYNTAX; - break; - } - } - - if(result) { - curl_slist_free_all(tn->telnet_vars); - tn->telnet_vars = NULL; - } - - return result; -} - -/* - * suboption() - * - * Look at the sub-option buffer, and try to be helpful to the other - * side. - */ - -static void suboption(struct connectdata *conn) -{ - struct curl_slist *v; - unsigned char temp[2048]; - ssize_t bytes_written; - size_t len; - size_t tmplen; - int err; - char varname[128] = ""; - char varval[128] = ""; - struct Curl_easy *data = conn->data; - struct TELNET *tn = (struct TELNET *)data->req.protop; - - printsub(data, '<', (unsigned char *)tn->subbuffer, CURL_SB_LEN(tn)+2); - switch(CURL_SB_GET(tn)) { - case CURL_TELOPT_TTYPE: - len = strlen(tn->subopt_ttype) + 4 + 2; - snprintf((char *)temp, sizeof(temp), - "%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_TTYPE, - CURL_TELQUAL_IS, tn->subopt_ttype, CURL_IAC, CURL_SE); - bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len); - if(bytes_written < 0) { - err = SOCKERRNO; - failf(data,"Sending data failed (%d)",err); - } - printsub(data, '>', &temp[2], len-2); - break; - case CURL_TELOPT_XDISPLOC: - len = strlen(tn->subopt_xdisploc) + 4 + 2; - snprintf((char *)temp, sizeof(temp), - "%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_XDISPLOC, - CURL_TELQUAL_IS, tn->subopt_xdisploc, CURL_IAC, CURL_SE); - bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len); - if(bytes_written < 0) { - err = SOCKERRNO; - failf(data,"Sending data failed (%d)",err); - } - printsub(data, '>', &temp[2], len-2); - break; - case CURL_TELOPT_NEW_ENVIRON: - snprintf((char *)temp, sizeof(temp), - "%c%c%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_NEW_ENVIRON, - CURL_TELQUAL_IS); - len = 4; - - for(v = tn->telnet_vars;v;v = v->next) { - tmplen = (strlen(v->data) + 1); - /* Add the variable only if it fits */ - if(len + tmplen < (int)sizeof(temp)-6) { - if(sscanf(v->data, "%127[^,],%127s", varname, varval)) { - snprintf((char *)&temp[len], sizeof(temp) - len, - "%c%s%c%s", CURL_NEW_ENV_VAR, varname, - CURL_NEW_ENV_VALUE, varval); - len += tmplen; - } - } - } - snprintf((char *)&temp[len], sizeof(temp) - len, - "%c%c", CURL_IAC, CURL_SE); - len += 2; - bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len); - if(bytes_written < 0) { - err = SOCKERRNO; - failf(data,"Sending data failed (%d)",err); - } - printsub(data, '>', &temp[2], len-2); - break; - } - return; -} - - -/* - * sendsuboption() - * - * Send suboption information to the server side. - */ - -static void sendsuboption(struct connectdata *conn, int option) -{ - ssize_t bytes_written; - int err; - unsigned short x, y; - unsigned char *uc1, *uc2; - - struct Curl_easy *data = conn->data; - struct TELNET *tn = (struct TELNET *)data->req.protop; - - switch(option) { - case CURL_TELOPT_NAWS: - /* We prepare data to be sent */ - CURL_SB_CLEAR(tn); - CURL_SB_ACCUM(tn, CURL_IAC); - CURL_SB_ACCUM(tn, CURL_SB); - CURL_SB_ACCUM(tn, CURL_TELOPT_NAWS); - /* We must deal either with litte or big endien processors */ - /* Window size must be sent according to the 'network order' */ - x=htons(tn->subopt_wsx); - y=htons(tn->subopt_wsy); - uc1 = (unsigned char *)&x; - uc2 = (unsigned char *)&y; - CURL_SB_ACCUM(tn, uc1[0]); - CURL_SB_ACCUM(tn, uc1[1]); - CURL_SB_ACCUM(tn, uc2[0]); - CURL_SB_ACCUM(tn, uc2[1]); - - CURL_SB_ACCUM(tn, CURL_IAC); - CURL_SB_ACCUM(tn, CURL_SE); - CURL_SB_TERM(tn); - /* data suboption is now ready */ - - printsub(data, '>', (unsigned char *)tn->subbuffer+2, - CURL_SB_LEN(tn)-2); - - /* we send the header of the suboption... */ - bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer, 3); - if(bytes_written < 0) { - err = SOCKERRNO; - failf(data, "Sending data failed (%d)", err); - } - /* ... then the window size with the send_telnet_data() function - to deal with 0xFF cases ... */ - send_telnet_data(conn, (char *)tn->subbuffer+3, 4); - /* ... and the footer */ - bytes_written = swrite(conn->sock[FIRSTSOCKET], tn->subbuffer+7, 2); - if(bytes_written < 0) { - err = SOCKERRNO; - failf(data, "Sending data failed (%d)", err); - } - break; - } -} - - -static -CURLcode telrcv(struct connectdata *conn, - const unsigned char *inbuf, /* Data received from socket */ - ssize_t count) /* Number of bytes received */ -{ - unsigned char c; - CURLcode result; - int in = 0; - int startwrite=-1; - struct Curl_easy *data = conn->data; - struct TELNET *tn = (struct TELNET *)data->req.protop; - -#define startskipping() \ - if(startwrite >= 0) { \ - result = Curl_client_write(conn, \ - CLIENTWRITE_BODY, \ - (char *)&inbuf[startwrite], \ - in-startwrite); \ - if(result) \ - return result; \ - } \ - startwrite = -1 - -#define writebyte() \ - if(startwrite < 0) \ - startwrite = in - -#define bufferflush() startskipping() - - while(count--) { - c = inbuf[in]; - - switch(tn->telrcv_state) { - case CURL_TS_CR: - tn->telrcv_state = CURL_TS_DATA; - if(c == '\0') { - startskipping(); - break; /* Ignore \0 after CR */ - } - writebyte(); - break; - - case CURL_TS_DATA: - if(c == CURL_IAC) { - tn->telrcv_state = CURL_TS_IAC; - startskipping(); - break; - } - else if(c == '\r') - tn->telrcv_state = CURL_TS_CR; - writebyte(); - break; - - case CURL_TS_IAC: - process_iac: - DEBUGASSERT(startwrite < 0); - switch(c) { - case CURL_WILL: - tn->telrcv_state = CURL_TS_WILL; - break; - case CURL_WONT: - tn->telrcv_state = CURL_TS_WONT; - break; - case CURL_DO: - tn->telrcv_state = CURL_TS_DO; - break; - case CURL_DONT: - tn->telrcv_state = CURL_TS_DONT; - break; - case CURL_SB: - CURL_SB_CLEAR(tn); - tn->telrcv_state = CURL_TS_SB; - break; - case CURL_IAC: - tn->telrcv_state = CURL_TS_DATA; - writebyte(); - break; - case CURL_DM: - case CURL_NOP: - case CURL_GA: - default: - tn->telrcv_state = CURL_TS_DATA; - printoption(data, "RCVD", CURL_IAC, c); - break; - } - break; - - case CURL_TS_WILL: - printoption(data, "RCVD", CURL_WILL, c); - tn->please_negotiate = 1; - rec_will(conn, c); - tn->telrcv_state = CURL_TS_DATA; - break; - - case CURL_TS_WONT: - printoption(data, "RCVD", CURL_WONT, c); - tn->please_negotiate = 1; - rec_wont(conn, c); - tn->telrcv_state = CURL_TS_DATA; - break; - - case CURL_TS_DO: - printoption(data, "RCVD", CURL_DO, c); - tn->please_negotiate = 1; - rec_do(conn, c); - tn->telrcv_state = CURL_TS_DATA; - break; - - case CURL_TS_DONT: - printoption(data, "RCVD", CURL_DONT, c); - tn->please_negotiate = 1; - rec_dont(conn, c); - tn->telrcv_state = CURL_TS_DATA; - break; - - case CURL_TS_SB: - if(c == CURL_IAC) - tn->telrcv_state = CURL_TS_SE; - else - CURL_SB_ACCUM(tn, c); - break; - - case CURL_TS_SE: - if(c != CURL_SE) { - if(c != CURL_IAC) { - /* - * This is an error. We only expect to get "IAC IAC" or "IAC SE". - * Several things may have happened. An IAC was not doubled, the - * IAC SE was left off, or another option got inserted into the - * suboption are all possibilities. If we assume that the IAC was - * not doubled, and really the IAC SE was left off, we could get - * into an infinite loop here. So, instead, we terminate the - * suboption, and process the partial suboption if we can. - */ - CURL_SB_ACCUM(tn, CURL_IAC); - CURL_SB_ACCUM(tn, c); - tn->subpointer -= 2; - CURL_SB_TERM(tn); - - printoption(data, "In SUBOPTION processing, RCVD", CURL_IAC, c); - suboption(conn); /* handle sub-option */ - tn->telrcv_state = CURL_TS_IAC; - goto process_iac; - } - CURL_SB_ACCUM(tn, c); - tn->telrcv_state = CURL_TS_SB; - } - else - { - CURL_SB_ACCUM(tn, CURL_IAC); - CURL_SB_ACCUM(tn, CURL_SE); - tn->subpointer -= 2; - CURL_SB_TERM(tn); - suboption(conn); /* handle sub-option */ - tn->telrcv_state = CURL_TS_DATA; - } - break; - } - ++in; - } - bufferflush(); - return CURLE_OK; -} - -/* Escape and send a telnet data block */ -/* TODO: write large chunks of data instead of one byte at a time */ -static CURLcode send_telnet_data(struct connectdata *conn, - char *buffer, ssize_t nread) -{ - unsigned char outbuf[2]; - ssize_t bytes_written, total_written; - int out_count; - CURLcode result = CURLE_OK; - - while(!result && nread--) { - outbuf[0] = *buffer++; - out_count = 1; - if(outbuf[0] == CURL_IAC) - outbuf[out_count++] = CURL_IAC; - - total_written = 0; - do { - /* Make sure socket is writable to avoid EWOULDBLOCK condition */ - struct pollfd pfd[1]; - pfd[0].fd = conn->sock[FIRSTSOCKET]; - pfd[0].events = POLLOUT; - switch(Curl_poll(pfd, 1, -1)) { - case -1: /* error, abort writing */ - case 0: /* timeout (will never happen) */ - result = CURLE_SEND_ERROR; - break; - default: /* write! */ - bytes_written = 0; - result = Curl_write(conn, conn->sock[FIRSTSOCKET], - outbuf+total_written, out_count-total_written, - &bytes_written); - total_written += bytes_written; - break; - } - /* handle partial write */ - } while(!result && total_written < out_count); - } - return result; -} - -static CURLcode telnet_done(struct connectdata *conn, - CURLcode status, bool premature) -{ - struct TELNET *tn = (struct TELNET *)conn->data->req.protop; - (void)status; /* unused */ - (void)premature; /* not used */ - - if(!tn) - return CURLE_OK; - - curl_slist_free_all(tn->telnet_vars); - tn->telnet_vars = NULL; - - Curl_safefree(conn->data->req.protop); - - return CURLE_OK; -} - -static CURLcode telnet_do(struct connectdata *conn, bool *done) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; -#ifdef USE_WINSOCK - HMODULE wsock2; - WSOCK2_FUNC close_event_func; - WSOCK2_FUNC create_event_func; - WSOCK2_FUNC event_select_func; - WSOCK2_FUNC enum_netevents_func; - WSAEVENT event_handle; - WSANETWORKEVENTS events; - HANDLE stdin_handle; - HANDLE objs[2]; - DWORD obj_count; - DWORD wait_timeout; - DWORD waitret; - DWORD readfile_read; - int err; -#else - int interval_ms; - struct pollfd pfd[2]; - int poll_cnt; - curl_off_t total_dl = 0; - curl_off_t total_ul = 0; -#endif - ssize_t nread; - struct timeval now; - bool keepon = TRUE; - char *buf = data->state.buffer; - struct TELNET *tn; - - *done = TRUE; /* unconditionally */ - - result = init_telnet(conn); - if(result) - return result; - - tn = (struct TELNET *)data->req.protop; - - result = check_telnet_options(conn); - if(result) - return result; - -#ifdef USE_WINSOCK - /* - ** This functionality only works with WinSock >= 2.0. So, - ** make sure we have it. - */ - result = check_wsock2(data); - if(result) - return result; - - /* OK, so we have WinSock 2.0. We need to dynamically */ - /* load ws2_32.dll and get the function pointers we need. */ - wsock2 = Curl_load_library(TEXT("WS2_32.DLL")); - if(wsock2 == NULL) { - failf(data, "failed to load WS2_32.DLL (%d)", ERRNO); - return CURLE_FAILED_INIT; - } - - /* Grab a pointer to WSACreateEvent */ - create_event_func = GetProcAddress(wsock2, "WSACreateEvent"); - if(create_event_func == NULL) { - failf(data, "failed to find WSACreateEvent function (%d)", ERRNO); - FreeLibrary(wsock2); - return CURLE_FAILED_INIT; - } - - /* And WSACloseEvent */ - close_event_func = GetProcAddress(wsock2, "WSACloseEvent"); - if(close_event_func == NULL) { - failf(data, "failed to find WSACloseEvent function (%d)", ERRNO); - FreeLibrary(wsock2); - return CURLE_FAILED_INIT; - } - - /* And WSAEventSelect */ - event_select_func = GetProcAddress(wsock2, "WSAEventSelect"); - if(event_select_func == NULL) { - failf(data, "failed to find WSAEventSelect function (%d)", ERRNO); - FreeLibrary(wsock2); - return CURLE_FAILED_INIT; - } - - /* And WSAEnumNetworkEvents */ - enum_netevents_func = GetProcAddress(wsock2, "WSAEnumNetworkEvents"); - if(enum_netevents_func == NULL) { - failf(data, "failed to find WSAEnumNetworkEvents function (%d)", ERRNO); - FreeLibrary(wsock2); - return CURLE_FAILED_INIT; - } - - /* We want to wait for both stdin and the socket. Since - ** the select() function in winsock only works on sockets - ** we have to use the WaitForMultipleObjects() call. - */ - - /* First, create a sockets event object */ - event_handle = (WSAEVENT)create_event_func(); - if(event_handle == WSA_INVALID_EVENT) { - failf(data, "WSACreateEvent failed (%d)", SOCKERRNO); - FreeLibrary(wsock2); - return CURLE_FAILED_INIT; - } - - /* Tell winsock what events we want to listen to */ - if(event_select_func(sockfd, event_handle, FD_READ|FD_CLOSE) == - SOCKET_ERROR) { - close_event_func(event_handle); - FreeLibrary(wsock2); - return CURLE_OK; - } - - /* The get the Windows file handle for stdin */ - stdin_handle = GetStdHandle(STD_INPUT_HANDLE); - - /* Create the list of objects to wait for */ - objs[0] = event_handle; - objs[1] = stdin_handle; - - /* If stdin_handle is a pipe, use PeekNamedPipe() method to check it, - else use the old WaitForMultipleObjects() way */ - if(GetFileType(stdin_handle) == FILE_TYPE_PIPE || - data->set.is_fread_set) { - /* Don't wait for stdin_handle, just wait for event_handle */ - obj_count = 1; - /* Check stdin_handle per 100 milliseconds */ - wait_timeout = 100; - } - else { - obj_count = 2; - wait_timeout = 1000; - } - - /* Keep on listening and act on events */ - while(keepon) { - const DWORD buf_size = (DWORD)CURL_BUFSIZE(data->set.buffer_size); - waitret = WaitForMultipleObjects(obj_count, objs, FALSE, wait_timeout); - switch(waitret) { - case WAIT_TIMEOUT: - { - for(;;) { - if(data->set.is_fread_set) { - /* read from user-supplied method */ - result = (int)data->state.fread_func(buf, 1, BUFSIZE - 1, - data->state.in); - if(result == CURL_READFUNC_ABORT) { - keepon = FALSE; - result = CURLE_READ_ERROR; - break; - } - - if(result == CURL_READFUNC_PAUSE) - break; - - if(result == 0) /* no bytes */ - break; - - readfile_read = result; /* fall thru with number of bytes read */ - } - else { - /* read from stdin */ - if(!PeekNamedPipe(stdin_handle, NULL, 0, NULL, - &readfile_read, NULL)) { - keepon = FALSE; - result = CURLE_READ_ERROR; - break; - } - - if(!readfile_read) - break; - - if(!ReadFile(stdin_handle, buf, buf_size, - &readfile_read, NULL)) { - keepon = FALSE; - result = CURLE_READ_ERROR; - break; - } - } - - result = send_telnet_data(conn, buf, readfile_read); - if(result) { - keepon = FALSE; - break; - } - } - } - break; - - case WAIT_OBJECT_0 + 1: - { - if(!ReadFile(stdin_handle, buf, buf_size, - &readfile_read, NULL)) { - keepon = FALSE; - result = CURLE_READ_ERROR; - break; - } - - result = send_telnet_data(conn, buf, readfile_read); - if(result) { - keepon = FALSE; - break; - } - } - break; - - case WAIT_OBJECT_0: - - events.lNetworkEvents = 0; - if(SOCKET_ERROR == enum_netevents_func(sockfd, event_handle, &events)) { - err = SOCKERRNO; - if(err != EINPROGRESS) { - infof(data, "WSAEnumNetworkEvents failed (%d)", err); - keepon = FALSE; - result = CURLE_READ_ERROR; - } - break; - } - if(events.lNetworkEvents & FD_READ) { - /* read data from network */ - result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread); - /* read would've blocked. Loop again */ - if(result == CURLE_AGAIN) - break; - /* returned not-zero, this an error */ - else if(result) { - keepon = FALSE; - break; - } - /* returned zero but actually received 0 or less here, - the server closed the connection and we bail out */ - else if(nread <= 0) { - keepon = FALSE; - break; - } - - result = telrcv(conn, (unsigned char *) buf, nread); - if(result) { - keepon = FALSE; - break; - } - - /* Negotiate if the peer has started negotiating, - otherwise don't. We don't want to speak telnet with - non-telnet servers, like POP or SMTP. */ - if(tn->please_negotiate && !tn->already_negotiated) { - negotiate(conn); - tn->already_negotiated = 1; - } - } - if(events.lNetworkEvents & FD_CLOSE) { - keepon = FALSE; - } - break; - - } - - if(data->set.timeout) { - now = Curl_tvnow(); - if(Curl_tvdiff(now, conn->created) >= data->set.timeout) { - failf(data, "Time-out"); - result = CURLE_OPERATION_TIMEDOUT; - keepon = FALSE; - } - } - } - - /* We called WSACreateEvent, so call WSACloseEvent */ - if(!close_event_func(event_handle)) { - infof(data, "WSACloseEvent failed (%d)", SOCKERRNO); - } - - /* "Forget" pointers into the library we're about to free */ - create_event_func = NULL; - close_event_func = NULL; - event_select_func = NULL; - enum_netevents_func = NULL; - - /* We called LoadLibrary, so call FreeLibrary */ - if(!FreeLibrary(wsock2)) - infof(data, "FreeLibrary(wsock2) failed (%d)", ERRNO); -#else - pfd[0].fd = sockfd; - pfd[0].events = POLLIN; - - if(data->set.is_fread_set) { - poll_cnt = 1; - interval_ms = 100; /* poll user-supplied read function */ - } - else { - /* really using fread, so infile is a FILE* */ - pfd[1].fd = fileno((FILE *)data->state.in); - pfd[1].events = POLLIN; - poll_cnt = 2; - interval_ms = 1 * 1000; - } - - while(keepon) { - switch(Curl_poll(pfd, poll_cnt, interval_ms)) { - case -1: /* error, stop reading */ - keepon = FALSE; - continue; - case 0: /* timeout */ - pfd[0].revents = 0; - pfd[1].revents = 0; - /* fall through */ - default: /* read! */ - if(pfd[0].revents & POLLIN) { - /* read data from network */ - result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread); - /* read would've blocked. Loop again */ - if(result == CURLE_AGAIN) - break; - /* returned not-zero, this an error */ - else if(result) { - keepon = FALSE; - break; - } - /* returned zero but actually received 0 or less here, - the server closed the connection and we bail out */ - else if(nread <= 0) { - keepon = FALSE; - break; - } - - total_dl += nread; - Curl_pgrsSetDownloadCounter(data, total_dl); - result = telrcv(conn, (unsigned char *)buf, nread); - if(result) { - keepon = FALSE; - break; - } - - /* Negotiate if the peer has started negotiating, - otherwise don't. We don't want to speak telnet with - non-telnet servers, like POP or SMTP. */ - if(tn->please_negotiate && !tn->already_negotiated) { - negotiate(conn); - tn->already_negotiated = 1; - } - } - - nread = 0; - if(poll_cnt == 2) { - if(pfd[1].revents & POLLIN) { /* read from in file */ - nread = read(pfd[1].fd, buf, BUFSIZE - 1); - } - } - else { - /* read from user-supplied method */ - nread = (int)data->state.fread_func(buf, 1, BUFSIZE - 1, - data->state.in); - if(nread == CURL_READFUNC_ABORT) { - keepon = FALSE; - break; - } - if(nread == CURL_READFUNC_PAUSE) - break; - } - - if(nread > 0) { - result = send_telnet_data(conn, buf, nread); - if(result) { - keepon = FALSE; - break; - } - total_ul += nread; - Curl_pgrsSetUploadCounter(data, total_ul); - } - else if(nread < 0) - keepon = FALSE; - - break; - } /* poll switch statement */ - - if(data->set.timeout) { - now = Curl_tvnow(); - if(Curl_tvdiff(now, conn->created) >= data->set.timeout) { - failf(data, "Time-out"); - result = CURLE_OPERATION_TIMEDOUT; - keepon = FALSE; - } - } - - if(Curl_pgrsUpdate(conn)) { - result = CURLE_ABORTED_BY_CALLBACK; - break; - } - } -#endif - /* mark this as "no further transfer wanted" */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - - return result; -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/telnet.h b/build/premake/premake5/contrib/curl/lib/telnet.h deleted file mode 100644 index 419a399b7b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/telnet.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef HEADER_CURL_TELNET_H -#define HEADER_CURL_TELNET_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifndef CURL_DISABLE_TELNET -extern const struct Curl_handler Curl_handler_telnet; -#endif - -#endif /* HEADER_CURL_TELNET_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/tftp.c b/build/premake/premake5/contrib/curl/lib/tftp.c deleted file mode 100644 index f2f834775e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/tftp.c +++ /dev/null @@ -1,1392 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifndef CURL_DISABLE_TFTP - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#include "urldata.h" -#include -#include "transfer.h" -#include "sendf.h" -#include "tftp.h" -#include "progress.h" -#include "connect.h" -#include "strerror.h" -#include "sockaddr.h" /* required for Curl_sockaddr_storage */ -#include "multiif.h" -#include "url.h" -#include "strcase.h" -#include "speedcheck.h" -#include "select.h" -#include "escape.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* RFC2348 allows the block size to be negotiated */ -#define TFTP_BLKSIZE_DEFAULT 512 -#define TFTP_BLKSIZE_MIN 8 -#define TFTP_BLKSIZE_MAX 65464 -#define TFTP_OPTION_BLKSIZE "blksize" - -/* from RFC2349: */ -#define TFTP_OPTION_TSIZE "tsize" -#define TFTP_OPTION_INTERVAL "timeout" - -typedef enum { - TFTP_MODE_NETASCII=0, - TFTP_MODE_OCTET -} tftp_mode_t; - -typedef enum { - TFTP_STATE_START=0, - TFTP_STATE_RX, - TFTP_STATE_TX, - TFTP_STATE_FIN -} tftp_state_t; - -typedef enum { - TFTP_EVENT_NONE = -1, - TFTP_EVENT_INIT = 0, - TFTP_EVENT_RRQ = 1, - TFTP_EVENT_WRQ = 2, - TFTP_EVENT_DATA = 3, - TFTP_EVENT_ACK = 4, - TFTP_EVENT_ERROR = 5, - TFTP_EVENT_OACK = 6, - TFTP_EVENT_TIMEOUT -} tftp_event_t; - -typedef enum { - TFTP_ERR_UNDEF=0, - TFTP_ERR_NOTFOUND, - TFTP_ERR_PERM, - TFTP_ERR_DISKFULL, - TFTP_ERR_ILLEGAL, - TFTP_ERR_UNKNOWNID, - TFTP_ERR_EXISTS, - TFTP_ERR_NOSUCHUSER, /* This will never be triggered by this code */ - - /* The remaining error codes are internal to curl */ - TFTP_ERR_NONE = -100, - TFTP_ERR_TIMEOUT, - TFTP_ERR_NORESPONSE -} tftp_error_t; - -typedef struct tftp_packet { - unsigned char *data; -} tftp_packet_t; - -typedef struct tftp_state_data { - tftp_state_t state; - tftp_mode_t mode; - tftp_error_t error; - tftp_event_t event; - struct connectdata *conn; - curl_socket_t sockfd; - int retries; - int retry_time; - int retry_max; - time_t start_time; - time_t max_time; - time_t rx_time; - unsigned short block; - struct Curl_sockaddr_storage local_addr; - struct Curl_sockaddr_storage remote_addr; - curl_socklen_t remote_addrlen; - int rbytes; - int sbytes; - int blksize; - int requested_blksize; - tftp_packet_t rpacket; - tftp_packet_t spacket; -} tftp_state_data_t; - - -/* Forward declarations */ -static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event); -static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event); -static CURLcode tftp_connect(struct connectdata *conn, bool *done); -static CURLcode tftp_disconnect(struct connectdata *conn, - bool dead_connection); -static CURLcode tftp_do(struct connectdata *conn, bool *done); -static CURLcode tftp_done(struct connectdata *conn, - CURLcode, bool premature); -static CURLcode tftp_setup_connection(struct connectdata * conn); -static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done); -static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done); -static int tftp_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); -static CURLcode tftp_translate_code(tftp_error_t error); - - -/* - * TFTP protocol handler. - */ - -const struct Curl_handler Curl_handler_tftp = { - "TFTP", /* scheme */ - tftp_setup_connection, /* setup_connection */ - tftp_do, /* do_it */ - tftp_done, /* done */ - ZERO_NULL, /* do_more */ - tftp_connect, /* connect_it */ - tftp_multi_statemach, /* connecting */ - tftp_doing, /* doing */ - tftp_getsock, /* proto_getsock */ - tftp_getsock, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - tftp_disconnect, /* disconnect */ - ZERO_NULL, /* readwrite */ - PORT_TFTP, /* defport */ - CURLPROTO_TFTP, /* protocol */ - PROTOPT_NONE | PROTOPT_NOURLQUERY /* flags */ -}; - -/********************************************************** - * - * tftp_set_timeouts - - * - * Set timeouts based on state machine state. - * Use user provided connect timeouts until DATA or ACK - * packet is received, then use user-provided transfer timeouts - * - * - **********************************************************/ -static CURLcode tftp_set_timeouts(tftp_state_data_t *state) -{ - time_t maxtime, timeout; - time_t timeout_ms; - bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE; - - time(&state->start_time); - - /* Compute drop-dead time */ - timeout_ms = Curl_timeleft(state->conn->data, NULL, start); - - if(timeout_ms < 0) { - /* time-out, bail out, go home */ - failf(state->conn->data, "Connection time-out"); - return CURLE_OPERATION_TIMEDOUT; - } - - if(start) { - - maxtime = (time_t)(timeout_ms + 500) / 1000; - state->max_time = state->start_time+maxtime; - - /* Set per-block timeout to total */ - timeout = maxtime; - - /* Average restart after 5 seconds */ - state->retry_max = (int)timeout/5; - - if(state->retry_max < 1) - /* avoid division by zero below */ - state->retry_max = 1; - - /* Compute the re-start interval to suit the timeout */ - state->retry_time = (int)timeout/state->retry_max; - if(state->retry_time<1) - state->retry_time=1; - - } - else { - if(timeout_ms > 0) - maxtime = (time_t)(timeout_ms + 500) / 1000; - else - maxtime = 3600; - - state->max_time = state->start_time+maxtime; - - /* Set per-block timeout to total */ - timeout = maxtime; - - /* Average reposting an ACK after 5 seconds */ - state->retry_max = (int)timeout/5; - } - /* But bound the total number */ - if(state->retry_max<3) - state->retry_max=3; - - if(state->retry_max>50) - state->retry_max=50; - - /* Compute the re-ACK interval to suit the timeout */ - state->retry_time = (int)(timeout/state->retry_max); - if(state->retry_time<1) - state->retry_time=1; - - infof(state->conn->data, - "set timeouts for state %d; Total %ld, retry %d maxtry %d\n", - (int)state->state, (long)(state->max_time-state->start_time), - state->retry_time, state->retry_max); - - /* init RX time */ - time(&state->rx_time); - - return CURLE_OK; -} - -/********************************************************** - * - * tftp_set_send_first - * - * Event handler for the START state - * - **********************************************************/ - -static void setpacketevent(tftp_packet_t *packet, unsigned short num) -{ - packet->data[0] = (unsigned char)(num >> 8); - packet->data[1] = (unsigned char)(num & 0xff); -} - - -static void setpacketblock(tftp_packet_t *packet, unsigned short num) -{ - packet->data[2] = (unsigned char)(num >> 8); - packet->data[3] = (unsigned char)(num & 0xff); -} - -static unsigned short getrpacketevent(const tftp_packet_t *packet) -{ - return (unsigned short)((packet->data[0] << 8) | packet->data[1]); -} - -static unsigned short getrpacketblock(const tftp_packet_t *packet) -{ - return (unsigned short)((packet->data[2] << 8) | packet->data[3]); -} - -static size_t Curl_strnlen(const char *string, size_t maxlen) -{ - const char *end = memchr(string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} - -static const char *tftp_option_get(const char *buf, size_t len, - const char **option, const char **value) -{ - size_t loc; - - loc = Curl_strnlen(buf, len); - loc++; /* NULL term */ - - if(loc >= len) - return NULL; - *option = buf; - - loc += Curl_strnlen(buf+loc, len-loc); - loc++; /* NULL term */ - - if(loc > len) - return NULL; - *value = &buf[strlen(*option) + 1]; - - return &buf[loc]; -} - -static CURLcode tftp_parse_option_ack(tftp_state_data_t *state, - const char *ptr, int len) -{ - const char *tmp = ptr; - struct Curl_easy *data = state->conn->data; - - /* if OACK doesn't contain blksize option, the default (512) must be used */ - state->blksize = TFTP_BLKSIZE_DEFAULT; - - while(tmp < ptr + len) { - const char *option, *value; - - tmp = tftp_option_get(tmp, ptr + len - tmp, &option, &value); - if(tmp == NULL) { - failf(data, "Malformed ACK packet, rejecting"); - return CURLE_TFTP_ILLEGAL; - } - - infof(data, "got option=(%s) value=(%s)\n", option, value); - - if(checkprefix(option, TFTP_OPTION_BLKSIZE)) { - long blksize; - - blksize = strtol(value, NULL, 10); - - if(!blksize) { - failf(data, "invalid blocksize value in OACK packet"); - return CURLE_TFTP_ILLEGAL; - } - else if(blksize > TFTP_BLKSIZE_MAX) { - failf(data, "%s (%d)", "blksize is larger than max supported", - TFTP_BLKSIZE_MAX); - return CURLE_TFTP_ILLEGAL; - } - else if(blksize < TFTP_BLKSIZE_MIN) { - failf(data, "%s (%d)", "blksize is smaller than min supported", - TFTP_BLKSIZE_MIN); - return CURLE_TFTP_ILLEGAL; - } - else if(blksize > state->requested_blksize) { - /* could realloc pkt buffers here, but the spec doesn't call out - * support for the server requesting a bigger blksize than the client - * requests */ - failf(data, "%s (%ld)", - "server requested blksize larger than allocated", blksize); - return CURLE_TFTP_ILLEGAL; - } - - state->blksize = (int)blksize; - infof(data, "%s (%d) %s (%d)\n", "blksize parsed from OACK", - state->blksize, "requested", state->requested_blksize); - } - else if(checkprefix(option, TFTP_OPTION_TSIZE)) { - long tsize = 0; - - tsize = strtol(value, NULL, 10); - infof(data, "%s (%ld)\n", "tsize parsed from OACK", tsize); - - /* tsize should be ignored on upload: Who cares about the size of the - remote file? */ - if(!data->set.upload) { - if(!tsize) { - failf(data, "invalid tsize -:%s:- value in OACK packet", value); - return CURLE_TFTP_ILLEGAL; - } - Curl_pgrsSetDownloadSize(data, tsize); - } - } - } - - return CURLE_OK; -} - -static size_t tftp_option_add(tftp_state_data_t *state, size_t csize, - char *buf, const char *option) -{ - if(( strlen(option) + csize + 1) > (size_t)state->blksize) - return 0; - strcpy(buf, option); - return strlen(option) + 1; -} - -static CURLcode tftp_connect_for_tx(tftp_state_data_t *state, - tftp_event_t event) -{ - CURLcode result; -#ifndef CURL_DISABLE_VERBOSE_STRINGS - struct Curl_easy *data = state->conn->data; - - infof(data, "%s\n", "Connected for transmit"); -#endif - state->state = TFTP_STATE_TX; - result = tftp_set_timeouts(state); - if(result) - return result; - return tftp_tx(state, event); -} - -static CURLcode tftp_connect_for_rx(tftp_state_data_t *state, - tftp_event_t event) -{ - CURLcode result; -#ifndef CURL_DISABLE_VERBOSE_STRINGS - struct Curl_easy *data = state->conn->data; - - infof(data, "%s\n", "Connected for receive"); -#endif - state->state = TFTP_STATE_RX; - result = tftp_set_timeouts(state); - if(result) - return result; - return tftp_rx(state, event); -} - -static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event) -{ - size_t sbytes; - ssize_t senddata; - const char *mode = "octet"; - char *filename; - char buf[64]; - struct Curl_easy *data = state->conn->data; - CURLcode result = CURLE_OK; - - /* Set ascii mode if -B flag was used */ - if(data->set.prefer_ascii) - mode = "netascii"; - - switch(event) { - - case TFTP_EVENT_INIT: /* Send the first packet out */ - case TFTP_EVENT_TIMEOUT: /* Resend the first packet out */ - /* Increment the retry counter, quit if over the limit */ - state->retries++; - if(state->retries>state->retry_max) { - state->error = TFTP_ERR_NORESPONSE; - state->state = TFTP_STATE_FIN; - return result; - } - - if(data->set.upload) { - /* If we are uploading, send an WRQ */ - setpacketevent(&state->spacket, TFTP_EVENT_WRQ); - state->conn->data->req.upload_fromhere = - (char *)state->spacket.data+4; - if(data->state.infilesize != -1) - Curl_pgrsSetUploadSize(data, data->state.infilesize); - } - else { - /* If we are downloading, send an RRQ */ - setpacketevent(&state->spacket, TFTP_EVENT_RRQ); - } - /* As RFC3617 describes the separator slash is not actually part of the - file name so we skip the always-present first letter of the path - string. */ - result = Curl_urldecode(data, &state->conn->data->state.path[1], 0, - &filename, NULL, FALSE); - if(result) - return result; - - snprintf((char *)state->spacket.data+2, - state->blksize, - "%s%c%s%c", filename, '\0', mode, '\0'); - sbytes = 4 + strlen(filename) + strlen(mode); - - /* optional addition of TFTP options */ - if(!data->set.tftp_no_options) { - /* add tsize option */ - if(data->set.upload && (data->state.infilesize != -1)) - snprintf(buf, sizeof(buf), "%" CURL_FORMAT_CURL_OFF_T, - data->state.infilesize); - else - strcpy(buf, "0"); /* the destination is large enough */ - - sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, - TFTP_OPTION_TSIZE); - sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, buf); - /* add blksize option */ - snprintf(buf, sizeof(buf), "%d", state->requested_blksize); - sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, - TFTP_OPTION_BLKSIZE); - sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, buf); - - /* add timeout option */ - snprintf(buf, sizeof(buf), "%d", state->retry_time); - sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, - TFTP_OPTION_INTERVAL); - sbytes += tftp_option_add(state, sbytes, - (char *)state->spacket.data+sbytes, buf); - } - - /* the typecase for the 3rd argument is mostly for systems that do - not have a size_t argument, like older unixes that want an 'int' */ - senddata = sendto(state->sockfd, (void *)state->spacket.data, - (SEND_TYPE_ARG3)sbytes, 0, - state->conn->ip_addr->ai_addr, - state->conn->ip_addr->ai_addrlen); - if(senddata != (ssize_t)sbytes) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - } - free(filename); - break; - - case TFTP_EVENT_OACK: - if(data->set.upload) { - result = tftp_connect_for_tx(state, event); - } - else { - result = tftp_connect_for_rx(state, event); - } - break; - - case TFTP_EVENT_ACK: /* Connected for transmit */ - result = tftp_connect_for_tx(state, event); - break; - - case TFTP_EVENT_DATA: /* Connected for receive */ - result = tftp_connect_for_rx(state, event); - break; - - case TFTP_EVENT_ERROR: - state->state = TFTP_STATE_FIN; - break; - - default: - failf(state->conn->data, "tftp_send_first: internal error"); - break; - } - - return result; -} - -/* the next blocknum is x + 1 but it needs to wrap at an unsigned 16bit - boundary */ -#define NEXT_BLOCKNUM(x) (((x)+1)&0xffff) - -/********************************************************** - * - * tftp_rx - * - * Event handler for the RX state - * - **********************************************************/ -static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) -{ - ssize_t sbytes; - int rblock; - struct Curl_easy *data = state->conn->data; - - switch(event) { - - case TFTP_EVENT_DATA: - /* Is this the block we expect? */ - rblock = getrpacketblock(&state->rpacket); - if(NEXT_BLOCKNUM(state->block) == rblock) { - /* This is the expected block. Reset counters and ACK it. */ - state->retries = 0; - } - else if(state->block == rblock) { - /* This is the last recently received block again. Log it and ACK it - again. */ - infof(data, "Received last DATA packet block %d again.\n", rblock); - } - else { - /* totally unexpected, just log it */ - infof(data, - "Received unexpected DATA packet block %d, expecting block %d\n", - rblock, NEXT_BLOCKNUM(state->block)); - break; - } - - /* ACK this block. */ - state->block = (unsigned short)rblock; - setpacketevent(&state->spacket, TFTP_EVENT_ACK); - setpacketblock(&state->spacket, state->block); - sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - if(sbytes < 0) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - return CURLE_SEND_ERROR; - } - - /* Check if completed (That is, a less than full packet is received) */ - if(state->rbytes < (ssize_t)state->blksize+4) { - state->state = TFTP_STATE_FIN; - } - else { - state->state = TFTP_STATE_RX; - } - time(&state->rx_time); - break; - - case TFTP_EVENT_OACK: - /* ACK option acknowledgement so we can move on to data */ - state->block = 0; - state->retries = 0; - setpacketevent(&state->spacket, TFTP_EVENT_ACK); - setpacketblock(&state->spacket, state->block); - sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - if(sbytes < 0) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - return CURLE_SEND_ERROR; - } - - /* we're ready to RX data */ - state->state = TFTP_STATE_RX; - time(&state->rx_time); - break; - - case TFTP_EVENT_TIMEOUT: - /* Increment the retry count and fail if over the limit */ - state->retries++; - infof(data, - "Timeout waiting for block %d ACK. Retries = %d\n", - NEXT_BLOCKNUM(state->block), state->retries); - if(state->retries > state->retry_max) { - state->error = TFTP_ERR_TIMEOUT; - state->state = TFTP_STATE_FIN; - } - else { - /* Resend the previous ACK */ - sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - if(sbytes<0) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - return CURLE_SEND_ERROR; - } - } - break; - - case TFTP_EVENT_ERROR: - setpacketevent(&state->spacket, TFTP_EVENT_ERROR); - setpacketblock(&state->spacket, state->block); - (void)sendto(state->sockfd, (void *)state->spacket.data, - 4, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - /* don't bother with the return code, but if the socket is still up we - * should be a good TFTP client and let the server know we're done */ - state->state = TFTP_STATE_FIN; - break; - - default: - failf(data, "%s", "tftp_rx: internal error"); - return CURLE_TFTP_ILLEGAL; /* not really the perfect return code for - this */ - } - return CURLE_OK; -} - -/********************************************************** - * - * tftp_tx - * - * Event handler for the TX state - * - **********************************************************/ -static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) -{ - struct Curl_easy *data = state->conn->data; - ssize_t sbytes; - int rblock; - CURLcode result = CURLE_OK; - struct SingleRequest *k = &data->req; - int cb; /* Bytes currently read */ - - switch(event) { - - case TFTP_EVENT_ACK: - case TFTP_EVENT_OACK: - if(event == TFTP_EVENT_ACK) { - /* Ack the packet */ - rblock = getrpacketblock(&state->rpacket); - - if(rblock != state->block && - /* There's a bug in tftpd-hpa that causes it to send us an ack for - * 65535 when the block number wraps to 0. So when we're expecting - * 0, also accept 65535. See - * http://syslinux.zytor.com/archives/2010-September/015253.html - * */ - !(state->block == 0 && rblock == 65535)) { - /* This isn't the expected block. Log it and up the retry counter */ - infof(data, "Received ACK for block %d, expecting %d\n", - rblock, state->block); - state->retries++; - /* Bail out if over the maximum */ - if(state->retries>state->retry_max) { - failf(data, "tftp_tx: giving up waiting for block %d ack", - state->block); - result = CURLE_SEND_ERROR; - } - else { - /* Re-send the data packet */ - sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4+state->sbytes, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - /* Check all sbytes were sent */ - if(sbytes<0) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - result = CURLE_SEND_ERROR; - } - } - - return result; - } - /* This is the expected packet. Reset the counters and send the next - block */ - time(&state->rx_time); - state->block++; - } - else - state->block = 1; /* first data block is 1 when using OACK */ - - state->retries = 0; - setpacketevent(&state->spacket, TFTP_EVENT_DATA); - setpacketblock(&state->spacket, state->block); - if(state->block > 1 && state->sbytes < (int)state->blksize) { - state->state = TFTP_STATE_FIN; - return CURLE_OK; - } - - /* TFTP considers data block size < 512 bytes as an end of session. So - * in some cases we must wait for additional data to build full (512 bytes) - * data block. - * */ - state->sbytes = 0; - state->conn->data->req.upload_fromhere = (char *)state->spacket.data+4; - do { - result = Curl_fillreadbuffer(state->conn, state->blksize - state->sbytes, - &cb); - if(result) - return result; - state->sbytes += cb; - state->conn->data->req.upload_fromhere += cb; - } while(state->sbytes < state->blksize && cb != 0); - - sbytes = sendto(state->sockfd, (void *) state->spacket.data, - 4 + state->sbytes, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - /* Check all sbytes were sent */ - if(sbytes<0) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - return CURLE_SEND_ERROR; - } - /* Update the progress meter */ - k->writebytecount += state->sbytes; - Curl_pgrsSetUploadCounter(data, k->writebytecount); - break; - - case TFTP_EVENT_TIMEOUT: - /* Increment the retry counter and log the timeout */ - state->retries++; - infof(data, "Timeout waiting for block %d ACK. " - " Retries = %d\n", NEXT_BLOCKNUM(state->block), state->retries); - /* Decide if we've had enough */ - if(state->retries > state->retry_max) { - state->error = TFTP_ERR_TIMEOUT; - state->state = TFTP_STATE_FIN; - } - else { - /* Re-send the data packet */ - sbytes = sendto(state->sockfd, (void *)state->spacket.data, - 4+state->sbytes, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - /* Check all sbytes were sent */ - if(sbytes<0) { - failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); - return CURLE_SEND_ERROR; - } - /* since this was a re-send, we remain at the still byte position */ - Curl_pgrsSetUploadCounter(data, k->writebytecount); - } - break; - - case TFTP_EVENT_ERROR: - state->state = TFTP_STATE_FIN; - setpacketevent(&state->spacket, TFTP_EVENT_ERROR); - setpacketblock(&state->spacket, state->block); - (void)sendto(state->sockfd, (void *)state->spacket.data, 4, SEND_4TH_ARG, - (struct sockaddr *)&state->remote_addr, - state->remote_addrlen); - /* don't bother with the return code, but if the socket is still up we - * should be a good TFTP client and let the server know we're done */ - state->state = TFTP_STATE_FIN; - break; - - default: - failf(data, "tftp_tx: internal error, event: %i", (int)(event)); - break; - } - - return result; -} - -/********************************************************** - * - * tftp_translate_code - * - * Translate internal error codes to CURL error codes - * - **********************************************************/ -static CURLcode tftp_translate_code(tftp_error_t error) -{ - CURLcode result = CURLE_OK; - - if(error != TFTP_ERR_NONE) { - switch(error) { - case TFTP_ERR_NOTFOUND: - result = CURLE_TFTP_NOTFOUND; - break; - case TFTP_ERR_PERM: - result = CURLE_TFTP_PERM; - break; - case TFTP_ERR_DISKFULL: - result = CURLE_REMOTE_DISK_FULL; - break; - case TFTP_ERR_UNDEF: - case TFTP_ERR_ILLEGAL: - result = CURLE_TFTP_ILLEGAL; - break; - case TFTP_ERR_UNKNOWNID: - result = CURLE_TFTP_UNKNOWNID; - break; - case TFTP_ERR_EXISTS: - result = CURLE_REMOTE_FILE_EXISTS; - break; - case TFTP_ERR_NOSUCHUSER: - result = CURLE_TFTP_NOSUCHUSER; - break; - case TFTP_ERR_TIMEOUT: - result = CURLE_OPERATION_TIMEDOUT; - break; - case TFTP_ERR_NORESPONSE: - result = CURLE_COULDNT_CONNECT; - break; - default: - result = CURLE_ABORTED_BY_CALLBACK; - break; - } - } - else - result = CURLE_OK; - - return result; -} - -/********************************************************** - * - * tftp_state_machine - * - * The tftp state machine event dispatcher - * - **********************************************************/ -static CURLcode tftp_state_machine(tftp_state_data_t *state, - tftp_event_t event) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = state->conn->data; - - switch(state->state) { - case TFTP_STATE_START: - DEBUGF(infof(data, "TFTP_STATE_START\n")); - result = tftp_send_first(state, event); - break; - case TFTP_STATE_RX: - DEBUGF(infof(data, "TFTP_STATE_RX\n")); - result = tftp_rx(state, event); - break; - case TFTP_STATE_TX: - DEBUGF(infof(data, "TFTP_STATE_TX\n")); - result = tftp_tx(state, event); - break; - case TFTP_STATE_FIN: - infof(data, "%s\n", "TFTP finished"); - break; - default: - DEBUGF(infof(data, "STATE: %d\n", state->state)); - failf(data, "%s", "Internal state machine error"); - result = CURLE_TFTP_ILLEGAL; - break; - } - - return result; -} - -/********************************************************** - * - * tftp_disconnect - * - * The disconnect callback - * - **********************************************************/ -static CURLcode tftp_disconnect(struct connectdata *conn, bool dead_connection) -{ - tftp_state_data_t *state = conn->proto.tftpc; - (void) dead_connection; - - /* done, free dynamically allocated pkt buffers */ - if(state) { - Curl_safefree(state->rpacket.data); - Curl_safefree(state->spacket.data); - free(state); - } - - return CURLE_OK; -} - -/********************************************************** - * - * tftp_connect - * - * The connect callback - * - **********************************************************/ -static CURLcode tftp_connect(struct connectdata *conn, bool *done) -{ - tftp_state_data_t *state; - int blksize, rc; - - blksize = TFTP_BLKSIZE_DEFAULT; - - state = conn->proto.tftpc = calloc(1, sizeof(tftp_state_data_t)); - if(!state) - return CURLE_OUT_OF_MEMORY; - - /* alloc pkt buffers based on specified blksize */ - if(conn->data->set.tftp_blksize) { - blksize = (int)conn->data->set.tftp_blksize; - if(blksize > TFTP_BLKSIZE_MAX || blksize < TFTP_BLKSIZE_MIN) - return CURLE_TFTP_ILLEGAL; - } - - if(!state->rpacket.data) { - state->rpacket.data = calloc(1, blksize + 2 + 2); - - if(!state->rpacket.data) - return CURLE_OUT_OF_MEMORY; - } - - if(!state->spacket.data) { - state->spacket.data = calloc(1, blksize + 2 + 2); - - if(!state->spacket.data) - return CURLE_OUT_OF_MEMORY; - } - - /* we don't keep TFTP connections up basically because there's none or very - * little gain for UDP */ - connclose(conn, "TFTP"); - - state->conn = conn; - state->sockfd = state->conn->sock[FIRSTSOCKET]; - state->state = TFTP_STATE_START; - state->error = TFTP_ERR_NONE; - state->blksize = TFTP_BLKSIZE_DEFAULT; - state->requested_blksize = blksize; - - ((struct sockaddr *)&state->local_addr)->sa_family = - (unsigned short)(conn->ip_addr->ai_family); - - tftp_set_timeouts(state); - - if(!conn->bits.bound) { - /* If not already bound, bind to any interface, random UDP port. If it is - * reused or a custom local port was desired, this has already been done! - * - * We once used the size of the local_addr struct as the third argument - * for bind() to better work with IPv6 or whatever size the struct could - * have, but we learned that at least Tru64, AIX and IRIX *requires* the - * size of that argument to match the exact size of a 'sockaddr_in' struct - * when running IPv4-only. - * - * Therefore we use the size from the address we connected to, which we - * assume uses the same IP version and thus hopefully this works for both - * IPv4 and IPv6... - */ - rc = bind(state->sockfd, (struct sockaddr *)&state->local_addr, - conn->ip_addr->ai_addrlen); - if(rc) { - failf(conn->data, "bind() failed; %s", - Curl_strerror(conn, SOCKERRNO)); - return CURLE_COULDNT_CONNECT; - } - conn->bits.bound = TRUE; - } - - Curl_pgrsStartNow(conn->data); - - *done = TRUE; - - return CURLE_OK; -} - -/********************************************************** - * - * tftp_done - * - * The done callback - * - **********************************************************/ -static CURLcode tftp_done(struct connectdata *conn, CURLcode status, - bool premature) -{ - CURLcode result = CURLE_OK; - tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc; - - (void)status; /* unused */ - (void)premature; /* not used */ - - if(Curl_pgrsDone(conn)) - return CURLE_ABORTED_BY_CALLBACK; - - /* If we have encountered an error */ - if(state) - result = tftp_translate_code(state->error); - - return result; -} - -/********************************************************** - * - * tftp_getsock - * - * The getsock callback - * - **********************************************************/ -static int tftp_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - if(!numsocks) - return GETSOCK_BLANK; - - socks[0] = conn->sock[FIRSTSOCKET]; - - return GETSOCK_READSOCK(0); -} - -/********************************************************** - * - * tftp_receive_packet - * - * Called once select fires and data is ready on the socket - * - **********************************************************/ -static CURLcode tftp_receive_packet(struct connectdata *conn) -{ - struct Curl_sockaddr_storage fromaddr; - curl_socklen_t fromlen; - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc; - struct SingleRequest *k = &data->req; - - /* Receive the packet */ - fromlen = sizeof(fromaddr); - state->rbytes = (int)recvfrom(state->sockfd, - (void *)state->rpacket.data, - state->blksize+4, - 0, - (struct sockaddr *)&fromaddr, - &fromlen); - if(state->remote_addrlen==0) { - memcpy(&state->remote_addr, &fromaddr, fromlen); - state->remote_addrlen = fromlen; - } - - /* Sanity check packet length */ - if(state->rbytes < 4) { - failf(data, "Received too short packet"); - /* Not a timeout, but how best to handle it? */ - state->event = TFTP_EVENT_TIMEOUT; - } - else { - /* The event is given by the TFTP packet time */ - state->event = (tftp_event_t)getrpacketevent(&state->rpacket); - - switch(state->event) { - case TFTP_EVENT_DATA: - /* Don't pass to the client empty or retransmitted packets */ - if(state->rbytes > 4 && - (NEXT_BLOCKNUM(state->block) == getrpacketblock(&state->rpacket))) { - result = Curl_client_write(conn, CLIENTWRITE_BODY, - (char *)state->rpacket.data+4, - state->rbytes-4); - if(result) { - tftp_state_machine(state, TFTP_EVENT_ERROR); - return result; - } - k->bytecount += state->rbytes-4; - Curl_pgrsSetDownloadCounter(data, (curl_off_t) k->bytecount); - } - break; - case TFTP_EVENT_ERROR: - state->error = (tftp_error_t)getrpacketblock(&state->rpacket); - infof(data, "%s\n", (const char *)state->rpacket.data+4); - break; - case TFTP_EVENT_ACK: - break; - case TFTP_EVENT_OACK: - result = tftp_parse_option_ack(state, - (const char *)state->rpacket.data+2, - state->rbytes-2); - if(result) - return result; - break; - case TFTP_EVENT_RRQ: - case TFTP_EVENT_WRQ: - default: - failf(data, "%s", "Internal error: Unexpected packet"); - break; - } - - /* Update the progress meter */ - if(Curl_pgrsUpdate(conn)) { - tftp_state_machine(state, TFTP_EVENT_ERROR); - return CURLE_ABORTED_BY_CALLBACK; - } - } - return result; -} - -/********************************************************** - * - * tftp_state_timeout - * - * Check if timeouts have been reached - * - **********************************************************/ -static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event) -{ - time_t current; - tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc; - - if(event) - *event = TFTP_EVENT_NONE; - - time(¤t); - if(current > state->max_time) { - DEBUGF(infof(conn->data, "timeout: %ld > %ld\n", - (long)current, (long)state->max_time)); - state->error = TFTP_ERR_TIMEOUT; - state->state = TFTP_STATE_FIN; - return 0; - } - else if(current > state->rx_time+state->retry_time) { - if(event) - *event = TFTP_EVENT_TIMEOUT; - time(&state->rx_time); /* update even though we received nothing */ - } - - /* there's a typecast below here since 'time_t' may in fact be larger than - 'long', but we estimate that a 'long' will still be able to hold number - of seconds even if "only" 32 bit */ - return (long)(state->max_time - current); -} - -/********************************************************** - * - * tftp_multi_statemach - * - * Handle single RX socket event and return - * - **********************************************************/ -static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) -{ - int rc; - tftp_event_t event; - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc; - long timeout_ms = tftp_state_timeout(conn, &event); - - *done = FALSE; - - if(timeout_ms <= 0) { - failf(data, "TFTP response timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - else if(event != TFTP_EVENT_NONE) { - result = tftp_state_machine(state, event); - if(result) - return result; - *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE; - if(*done) - /* Tell curl we're done */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - } - else { - /* no timeouts to handle, check our socket */ - rc = SOCKET_READABLE(state->sockfd, 0); - - if(rc == -1) { - /* bail out */ - int error = SOCKERRNO; - failf(data, "%s", Curl_strerror(conn, error)); - state->event = TFTP_EVENT_ERROR; - } - else if(rc != 0) { - result = tftp_receive_packet(conn); - if(result) - return result; - result = tftp_state_machine(state, state->event); - if(result) - return result; - *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE; - if(*done) - /* Tell curl we're done */ - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); - } - /* if rc == 0, then select() timed out */ - } - - return result; -} - -/********************************************************** - * - * tftp_doing - * - * Called from multi.c while DOing - * - **********************************************************/ -static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done) -{ - CURLcode result; - result = tftp_multi_statemach(conn, dophase_done); - - if(*dophase_done) { - DEBUGF(infof(conn->data, "DO phase is complete\n")); - } - else if(!result) { - /* The multi code doesn't have this logic for the DOING state so we - provide it for TFTP since it may do the entire transfer in this - state. */ - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - else - result = Curl_speedcheck(conn->data, Curl_tvnow()); - } - return result; -} - -/********************************************************** - * - * tftp_peform - * - * Entry point for transfer from tftp_do, sarts state mach - * - **********************************************************/ -static CURLcode tftp_perform(struct connectdata *conn, bool *dophase_done) -{ - CURLcode result = CURLE_OK; - tftp_state_data_t *state = (tftp_state_data_t *)conn->proto.tftpc; - - *dophase_done = FALSE; - - result = tftp_state_machine(state, TFTP_EVENT_INIT); - - if((state->state == TFTP_STATE_FIN) || result) - return result; - - tftp_multi_statemach(conn, dophase_done); - - if(*dophase_done) - DEBUGF(infof(conn->data, "DO phase is complete\n")); - - return result; -} - - -/********************************************************** - * - * tftp_do - * - * The do callback - * - * This callback initiates the TFTP transfer - * - **********************************************************/ - -static CURLcode tftp_do(struct connectdata *conn, bool *done) -{ - tftp_state_data_t *state; - CURLcode result; - - *done = FALSE; - - if(!conn->proto.tftpc) { - result = tftp_connect(conn, done); - if(result) - return result; - } - - state = (tftp_state_data_t *)conn->proto.tftpc; - if(!state) - return CURLE_BAD_CALLING_ORDER; - - result = tftp_perform(conn, done); - - /* If tftp_perform() returned an error, use that for return code. If it - was OK, see if tftp_translate_code() has an error. */ - if(!result) - /* If we have encountered an internal tftp error, translate it. */ - result = tftp_translate_code(state->error); - - return result; -} - -static CURLcode tftp_setup_connection(struct connectdata * conn) -{ - struct Curl_easy *data = conn->data; - char *type; - char command; - - conn->socktype = SOCK_DGRAM; /* UDP datagram based */ - - /* TFTP URLs support an extension like ";mode=" that - * we'll try to get now! */ - type = strstr(data->state.path, ";mode="); - - if(!type) - type = strstr(conn->host.rawalloc, ";mode="); - - if(type) { - *type = 0; /* it was in the middle of the hostname */ - command = Curl_raw_toupper(type[6]); - - switch(command) { - case 'A': /* ASCII mode */ - case 'N': /* NETASCII mode */ - data->set.prefer_ascii = TRUE; - break; - - case 'O': /* octet mode */ - case 'I': /* binary mode */ - default: - /* switch off ASCII */ - data->set.prefer_ascii = FALSE; - break; - } - } - - return CURLE_OK; -} -#endif diff --git a/build/premake/premake5/contrib/curl/lib/tftp.h b/build/premake/premake5/contrib/curl/lib/tftp.h deleted file mode 100644 index c2325b2327..0000000000 --- a/build/premake/premake5/contrib/curl/lib/tftp.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef HEADER_CURL_TFTP_H -#define HEADER_CURL_TFTP_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#ifndef CURL_DISABLE_TFTP -extern const struct Curl_handler Curl_handler_tftp; -#endif - -#endif /* HEADER_CURL_TFTP_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/timeval.c b/build/premake/premake5/contrib/curl/lib/timeval.c deleted file mode 100644 index f3b207a37e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/timeval.c +++ /dev/null @@ -1,150 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "timeval.h" - -#if defined(WIN32) && !defined(MSDOS) - -struct timeval curlx_tvnow(void) -{ - /* - ** GetTickCount() is available on _all_ Windows versions from W95 up - ** to nowadays. Returns milliseconds elapsed since last system boot, - ** increases monotonically and wraps once 49.7 days have elapsed. - */ - struct timeval now; -#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ - (_WIN32_WINNT < _WIN32_WINNT_VISTA) - DWORD milliseconds = GetTickCount(); - now.tv_sec = milliseconds / 1000; - now.tv_usec = (milliseconds % 1000) * 1000; -#else - ULONGLONG milliseconds = GetTickCount64(); - now.tv_sec = (long) (milliseconds / 1000); - now.tv_usec = (long) (milliseconds % 1000) * 1000; -#endif - - return now; -} - -#elif defined(HAVE_CLOCK_GETTIME_MONOTONIC) - -struct timeval curlx_tvnow(void) -{ - /* - ** clock_gettime() is granted to be increased monotonically when the - ** monotonic clock is queried. Time starting point is unspecified, it - ** could be the system start-up time, the Epoch, or something else, - ** in any case the time starting point does not change once that the - ** system has started up. - */ - struct timeval now; - struct timespec tsnow; - if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) { - now.tv_sec = tsnow.tv_sec; - now.tv_usec = tsnow.tv_nsec / 1000; - } - /* - ** Even when the configure process has truly detected monotonic clock - ** availability, it might happen that it is not actually available at - ** run-time. When this occurs simply fallback to other time source. - */ -#ifdef HAVE_GETTIMEOFDAY - else - (void)gettimeofday(&now, NULL); -#else - else { - now.tv_sec = (long)time(NULL); - now.tv_usec = 0; - } -#endif - return now; -} - -#elif defined(HAVE_GETTIMEOFDAY) - -struct timeval curlx_tvnow(void) -{ - /* - ** gettimeofday() is not granted to be increased monotonically, due to - ** clock drifting and external source time synchronization it can jump - ** forward or backward in time. - */ - struct timeval now; - (void)gettimeofday(&now, NULL); - return now; -} - -#else - -struct timeval curlx_tvnow(void) -{ - /* - ** time() returns the value of time in seconds since the Epoch. - */ - struct timeval now; - now.tv_sec = (long)time(NULL); - now.tv_usec = 0; - return now; -} - -#endif - -/* - * Make sure that the first argument is the more recent time, as otherwise - * we'll get a weird negative time-diff back... - * - * Returns: the time difference in number of milliseconds. For large diffs it - * returns 0x7fffffff on 32bit time_t systems. - */ -time_t curlx_tvdiff(struct timeval newer, struct timeval older) -{ -#if SIZEOF_TIME_T < 8 - /* for 32bit time_t systems, add a precaution to avoid overflow for really - big time differences */ - time_t diff = newer.tv_sec-older.tv_sec; - if(diff >= (0x7fffffff/1000)) - return 0x7fffffff; -#endif - return (newer.tv_sec-older.tv_sec)*1000+ - (time_t)(newer.tv_usec-older.tv_usec)/1000; -} - -/* - * Same as curlx_tvdiff but with full usec resolution. - * - * Returns: the time difference in seconds with subsecond resolution. - */ -double curlx_tvdiff_secs(struct timeval newer, struct timeval older) -{ - if(newer.tv_sec != older.tv_sec) - return (double)(newer.tv_sec-older.tv_sec)+ - (double)(newer.tv_usec-older.tv_usec)/1000000.0; - else - return (double)(newer.tv_usec-older.tv_usec)/1000000.0; -} - -/* return the number of seconds in the given input timeval struct */ -time_t Curl_tvlong(struct timeval t1) -{ - return t1.tv_sec; -} diff --git a/build/premake/premake5/contrib/curl/lib/timeval.h b/build/premake/premake5/contrib/curl/lib/timeval.h deleted file mode 100644 index 09f8b3a20e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/timeval.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef HEADER_CURL_TIMEVAL_H -#define HEADER_CURL_TIMEVAL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * CAUTION: this header is designed to work when included by the app-side - * as well as the library. Do not mix with library internals! - */ - -#include "curl_setup.h" - -struct timeval curlx_tvnow(void); - -/* - * Make sure that the first argument (t1) is the more recent time and t2 is - * the older time, as otherwise you get a weird negative time-diff back... - * - * Returns: the time difference in number of milliseconds. - */ -time_t curlx_tvdiff(struct timeval t1, struct timeval t2); - -/* - * Same as curlx_tvdiff but with full usec resolution. - * - * Returns: the time difference in seconds with subsecond resolution. - */ -double curlx_tvdiff_secs(struct timeval t1, struct timeval t2); - -time_t Curl_tvlong(struct timeval t1); - -/* These two defines below exist to provide the older API for library - internals only. */ -#define Curl_tvnow() curlx_tvnow() -#define Curl_tvdiff(x,y) curlx_tvdiff(x,y) -#define Curl_tvdiff_secs(x,y) curlx_tvdiff_secs(x,y) - -#endif /* HEADER_CURL_TIMEVAL_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/transfer.c b/build/premake/premake5/contrib/curl/lib/transfer.c deleted file mode 100644 index a577bf7243..0000000000 --- a/build/premake/premake5/contrib/curl/lib/transfer.c +++ /dev/null @@ -1,1965 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" -#include "strtoofft.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif -#ifdef HAVE_SIGNAL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#ifndef HAVE_SOCKET -#error "We can't compile without socket() support!" -#endif - -#include "urldata.h" -#include -#include "netrc.h" - -#include "content_encoding.h" -#include "hostip.h" -#include "transfer.h" -#include "sendf.h" -#include "speedcheck.h" -#include "progress.h" -#include "http.h" -#include "url.h" -#include "getinfo.h" -#include "vtls/vtls.h" -#include "select.h" -#include "multiif.h" -#include "connect.h" -#include "non-ascii.h" -#include "http2.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* - * This function will call the read callback to fill our buffer with data - * to upload. - */ -CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) -{ - struct Curl_easy *data = conn->data; - size_t buffersize = (size_t)bytes; - int nread; -#ifdef CURL_DOES_CONVERSIONS - bool sending_http_headers = FALSE; - - if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) { - const struct HTTP *http = data->req.protop; - - if(http->sending == HTTPSEND_REQUEST) - /* We're sending the HTTP request headers, not the data. - Remember that so we don't re-translate them into garbage. */ - sending_http_headers = TRUE; - } -#endif - - if(data->req.upload_chunky) { - /* if chunked Transfer-Encoding */ - buffersize -= (8 + 2 + 2); /* 32bit hex + CRLF + CRLF */ - data->req.upload_fromhere += (8 + 2); /* 32bit hex + CRLF */ - } - - /* this function returns a size_t, so we typecast to int to prevent warnings - with picky compilers */ - nread = (int)data->state.fread_func(data->req.upload_fromhere, 1, - buffersize, data->state.in); - - if(nread == CURL_READFUNC_ABORT) { - failf(data, "operation aborted by callback"); - *nreadp = 0; - return CURLE_ABORTED_BY_CALLBACK; - } - else if(nread == CURL_READFUNC_PAUSE) { - - if(conn->handler->flags & PROTOPT_NONETWORK) { - /* protocols that work without network cannot be paused. This is - actually only FILE:// just now, and it can't pause since the transfer - isn't done using the "normal" procedure. */ - failf(data, "Read callback asked for PAUSE when not supported!"); - return CURLE_READ_ERROR; - } - else { - struct SingleRequest *k = &data->req; - /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */ - k->keepon |= KEEP_SEND_PAUSE; /* mark socket send as paused */ - if(data->req.upload_chunky) { - /* Back out the preallocation done above */ - data->req.upload_fromhere -= (8 + 2); - } - *nreadp = 0; - } - return CURLE_OK; /* nothing was read */ - } - else if((size_t)nread > buffersize) { - /* the read function returned a too large value */ - *nreadp = 0; - failf(data, "read function returned funny value"); - return CURLE_READ_ERROR; - } - - if(!data->req.forbidchunk && data->req.upload_chunky) { - /* if chunked Transfer-Encoding - * build chunk: - * - * CRLF - * CRLF - */ - /* On non-ASCII platforms the may or may not be - translated based on set.prefer_ascii while the protocol - portion must always be translated to the network encoding. - To further complicate matters, line end conversion might be - done later on, so we need to prevent CRLFs from becoming - CRCRLFs if that's the case. To do this we use bare LFs - here, knowing they'll become CRLFs later on. - */ - - char hexbuffer[11]; - const char *endofline_native; - const char *endofline_network; - int hexlen; - - if( -#ifdef CURL_DO_LINEEND_CONV - (data->set.prefer_ascii) || -#endif - (data->set.crlf)) { - /* \n will become \r\n later on */ - endofline_native = "\n"; - endofline_network = "\x0a"; - } - else { - endofline_native = "\r\n"; - endofline_network = "\x0d\x0a"; - } - hexlen = snprintf(hexbuffer, sizeof(hexbuffer), - "%x%s", nread, endofline_native); - - /* move buffer pointer */ - data->req.upload_fromhere -= hexlen; - nread += hexlen; - - /* copy the prefix to the buffer, leaving out the NUL */ - memcpy(data->req.upload_fromhere, hexbuffer, hexlen); - - /* always append ASCII CRLF to the data */ - memcpy(data->req.upload_fromhere + nread, - endofline_network, - strlen(endofline_network)); - -#ifdef CURL_DOES_CONVERSIONS - CURLcode result; - int length; - if(data->set.prefer_ascii) { - /* translate the protocol and data */ - length = nread; - } - else { - /* just translate the protocol portion */ - length = strlen(hexbuffer); - } - result = Curl_convert_to_network(data, data->req.upload_fromhere, length); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; -#endif /* CURL_DOES_CONVERSIONS */ - - if((nread - hexlen) == 0) - /* mark this as done once this chunk is transferred */ - data->req.upload_done = TRUE; - - nread+=(int)strlen(endofline_native); /* for the added end of line */ - } -#ifdef CURL_DOES_CONVERSIONS - else if((data->set.prefer_ascii) && (!sending_http_headers)) { - CURLcode result; - result = Curl_convert_to_network(data, data->req.upload_fromhere, nread); - /* Curl_convert_to_network calls failf if unsuccessful */ - if(result) - return result; - } -#endif /* CURL_DOES_CONVERSIONS */ - - *nreadp = nread; - - return CURLE_OK; -} - - -/* - * Curl_readrewind() rewinds the read stream. This is typically used for HTTP - * POST/PUT with multi-pass authentication when a sending was denied and a - * resend is necessary. - */ -CURLcode Curl_readrewind(struct connectdata *conn) -{ - struct Curl_easy *data = conn->data; - - conn->bits.rewindaftersend = FALSE; /* we rewind now */ - - /* explicitly switch off sending data on this connection now since we are - about to restart a new transfer and thus we want to avoid inadvertently - sending more data on the existing connection until the next transfer - starts */ - data->req.keepon &= ~KEEP_SEND; - - /* We have sent away data. If not using CURLOPT_POSTFIELDS or - CURLOPT_HTTPPOST, call app to rewind - */ - if(data->set.postfields || - (data->set.httpreq == HTTPREQ_POST_FORM)) - ; /* do nothing */ - else { - if(data->set.seek_func) { - int err; - - err = (data->set.seek_func)(data->set.seek_client, 0, SEEK_SET); - if(err) { - failf(data, "seek callback returned error %d", (int)err); - return CURLE_SEND_FAIL_REWIND; - } - } - else if(data->set.ioctl_func) { - curlioerr err; - - err = (data->set.ioctl_func)(data, CURLIOCMD_RESTARTREAD, - data->set.ioctl_client); - infof(data, "the ioctl callback returned %d\n", (int)err); - - if(err) { - /* FIXME: convert to a human readable error message */ - failf(data, "ioctl callback returned error %d", (int)err); - return CURLE_SEND_FAIL_REWIND; - } - } - else { - /* If no CURLOPT_READFUNCTION is used, we know that we operate on a - given FILE * stream and we can actually attempt to rewind that - ourselves with fseek() */ - if(data->state.fread_func == (curl_read_callback)fread) { - if(-1 != fseek(data->state.in, 0, SEEK_SET)) - /* successful rewind */ - return CURLE_OK; - } - - /* no callback set or failure above, makes us fail at once */ - failf(data, "necessary data rewind wasn't possible"); - return CURLE_SEND_FAIL_REWIND; - } - } - return CURLE_OK; -} - -static int data_pending(const struct connectdata *conn) -{ - /* in the case of libssh2, we can never be really sure that we have emptied - its internal buffers so we MUST always try until we get EAGAIN back */ - return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) || -#if defined(USE_NGHTTP2) - Curl_ssl_data_pending(conn, FIRSTSOCKET) || - /* For HTTP/2, we may read up everything including responde body - with header fields in Curl_http_readwrite_headers. If no - content-length is provided, curl waits for the connection - close, which we emulate it using conn->proto.httpc.closed = - TRUE. The thing is if we read everything, then http2_recv won't - be called and we cannot signal the HTTP/2 stream has closed. As - a workaround, we return nonzero here to call http2_recv. */ - ((conn->handler->protocol&PROTO_FAMILY_HTTP) && conn->httpversion == 20); -#else - Curl_ssl_data_pending(conn, FIRSTSOCKET); -#endif -} - -static void read_rewind(struct connectdata *conn, - size_t thismuch) -{ - DEBUGASSERT(conn->read_pos >= thismuch); - - conn->read_pos -= thismuch; - conn->bits.stream_was_rewound = TRUE; - -#ifdef DEBUGBUILD - { - char buf[512 + 1]; - size_t show; - - show = CURLMIN(conn->buf_len - conn->read_pos, sizeof(buf)-1); - if(conn->master_buffer) { - memcpy(buf, conn->master_buffer + conn->read_pos, show); - buf[show] = '\0'; - } - else { - buf[0] = '\0'; - } - - DEBUGF(infof(conn->data, - "Buffer after stream rewind (read_pos = %zu): [%s]\n", - conn->read_pos, buf)); - } -#endif -} - -/* - * Check to see if CURLOPT_TIMECONDITION was met by comparing the time of the - * remote document with the time provided by CURLOPT_TIMEVAL - */ -bool Curl_meets_timecondition(struct Curl_easy *data, time_t timeofdoc) -{ - if((timeofdoc == 0) || (data->set.timevalue == 0)) - return TRUE; - - switch(data->set.timecondition) { - case CURL_TIMECOND_IFMODSINCE: - default: - if(timeofdoc <= data->set.timevalue) { - infof(data, - "The requested document is not new enough\n"); - data->info.timecond = TRUE; - return FALSE; - } - break; - case CURL_TIMECOND_IFUNMODSINCE: - if(timeofdoc >= data->set.timevalue) { - infof(data, - "The requested document is not old enough\n"); - data->info.timecond = TRUE; - return FALSE; - } - break; - } - - return TRUE; -} - -/* - * Go ahead and do a read if we have a readable socket or if - * the stream was rewound (in which case we have data in a - * buffer) - * - * return '*comeback' TRUE if we didn't properly drain the socket so this - * function should get called again without select() or similar in between! - */ -static CURLcode readwrite_data(struct Curl_easy *data, - struct connectdata *conn, - struct SingleRequest *k, - int *didwhat, bool *done, - bool *comeback) -{ - CURLcode result = CURLE_OK; - ssize_t nread; /* number of bytes read */ - size_t excess = 0; /* excess bytes read */ - bool is_empty_data = FALSE; - bool readmore = FALSE; /* used by RTP to signal for more data */ - int maxloops = 100; - - *done = FALSE; - *comeback = FALSE; - - /* This is where we loop until we have read everything there is to - read or we get a CURLE_AGAIN */ - do { - size_t buffersize = data->set.buffer_size? - data->set.buffer_size : BUFSIZE; - size_t bytestoread = buffersize; - - if( -#if defined(USE_NGHTTP2) - /* For HTTP/2, read data without caring about the content - length. This is safe because body in HTTP/2 is always - segmented thanks to its framing layer. Meanwhile, we have to - call Curl_read to ensure that http2_handle_stream_close is - called when we read all incoming bytes for a particular - stream. */ - !((conn->handler->protocol & PROTO_FAMILY_HTTP) && - conn->httpversion == 20) && -#endif - k->size != -1 && !k->header) { - /* make sure we don't read "too much" if we can help it since we - might be pipelining and then someone else might want to read what - follows! */ - curl_off_t totalleft = k->size - k->bytecount; - if(totalleft < (curl_off_t)bytestoread) - bytestoread = (size_t)totalleft; - } - - if(bytestoread) { - /* receive data from the network! */ - result = Curl_read(conn, conn->sockfd, k->buf, bytestoread, &nread); - - /* read would've blocked */ - if(CURLE_AGAIN == result) - break; /* get out of loop */ - - if(result>0) - return result; - } - else { - /* read nothing but since we wanted nothing we consider this an OK - situation to proceed from */ - DEBUGF(infof(data, "readwrite_data: we're done!\n")); - nread = 0; - } - - if((k->bytecount == 0) && (k->writebytecount == 0)) { - Curl_pgrsTime(data, TIMER_STARTTRANSFER); - if(k->exp100 > EXP100_SEND_DATA) - /* set time stamp to compare with when waiting for the 100 */ - k->start100 = Curl_tvnow(); - } - - *didwhat |= KEEP_RECV; - /* indicates data of zero size, i.e. empty file */ - is_empty_data = ((nread == 0) && (k->bodywrites == 0)) ? TRUE : FALSE; - - /* NUL terminate, allowing string ops to be used */ - if(0 < nread || is_empty_data) { - k->buf[nread] = 0; - } - else if(0 >= nread) { - /* if we receive 0 or less here, the server closed the connection - and we bail out from this! */ - DEBUGF(infof(data, "nread <= 0, server closed connection, bailing\n")); - k->keepon &= ~KEEP_RECV; - break; - } - - /* Default buffer to use when we write the buffer, it may be changed - in the flow below before the actual storing is done. */ - k->str = k->buf; - - if(conn->handler->readwrite) { - result = conn->handler->readwrite(data, conn, &nread, &readmore); - if(result) - return result; - if(readmore) - break; - } - -#ifndef CURL_DISABLE_HTTP - /* Since this is a two-state thing, we check if we are parsing - headers at the moment or not. */ - if(k->header) { - /* we are in parse-the-header-mode */ - bool stop_reading = FALSE; - result = Curl_http_readwrite_headers(data, conn, &nread, &stop_reading); - if(result) - return result; - - if(conn->handler->readwrite && - (k->maxdownload <= 0 && nread > 0)) { - result = conn->handler->readwrite(data, conn, &nread, &readmore); - if(result) - return result; - if(readmore) - break; - } - - if(stop_reading) { - /* We've stopped dealing with input, get out of the do-while loop */ - - if(nread > 0) { - if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) { - infof(data, - "Rewinding stream by : %zd" - " bytes on url %s (zero-length body)\n", - nread, data->state.path); - read_rewind(conn, (size_t)nread); - } - else { - infof(data, - "Excess found in a non pipelined read:" - " excess = %zd" - " url = %s (zero-length body)\n", - nread, data->state.path); - } - } - - break; - } - } -#endif /* CURL_DISABLE_HTTP */ - - - /* This is not an 'else if' since it may be a rest from the header - parsing, where the beginning of the buffer is headers and the end - is non-headers. */ - if(k->str && !k->header && (nread > 0 || is_empty_data)) { - - if(data->set.opt_no_body) { - /* data arrives although we want none, bail out */ - streamclose(conn, "ignoring body"); - *done = TRUE; - return CURLE_WEIRD_SERVER_REPLY; - } - -#ifndef CURL_DISABLE_HTTP - if(0 == k->bodywrites && !is_empty_data) { - /* These checks are only made the first time we are about to - write a piece of the body */ - if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) { - /* HTTP-only checks */ - - if(data->req.newurl) { - if(conn->bits.close) { - /* Abort after the headers if "follow Location" is set - and we're set to close anyway. */ - k->keepon &= ~KEEP_RECV; - *done = TRUE; - return CURLE_OK; - } - /* We have a new url to load, but since we want to be able - to re-use this connection properly, we read the full - response in "ignore more" */ - k->ignorebody = TRUE; - infof(data, "Ignoring the response-body\n"); - } - if(data->state.resume_from && !k->content_range && - (data->set.httpreq==HTTPREQ_GET) && - !k->ignorebody) { - - if(k->size == data->state.resume_from) { - /* The resume point is at the end of file, consider this fine - even if it doesn't allow resume from here. */ - infof(data, "The entire document is already downloaded"); - connclose(conn, "already downloaded"); - /* Abort download */ - k->keepon &= ~KEEP_RECV; - *done = TRUE; - return CURLE_OK; - } - - /* we wanted to resume a download, although the server doesn't - * seem to support this and we did this with a GET (if it - * wasn't a GET we did a POST or PUT resume) */ - failf(data, "HTTP server doesn't seem to support " - "byte ranges. Cannot resume."); - return CURLE_RANGE_ERROR; - } - - if(data->set.timecondition && !data->state.range) { - /* A time condition has been set AND no ranges have been - requested. This seems to be what chapter 13.3.4 of - RFC 2616 defines to be the correct action for a - HTTP/1.1 client */ - - if(!Curl_meets_timecondition(data, k->timeofdoc)) { - *done = TRUE; - /* We're simulating a http 304 from server so we return - what should have been returned from the server */ - data->info.httpcode = 304; - infof(data, "Simulate a HTTP 304 response!\n"); - /* we abort the transfer before it is completed == we ruin the - re-use ability. Close the connection */ - connclose(conn, "Simulated 304 handling"); - return CURLE_OK; - } - } /* we have a time condition */ - - } /* this is HTTP or RTSP */ - } /* this is the first time we write a body part */ -#endif /* CURL_DISABLE_HTTP */ - - k->bodywrites++; - - /* pass data to the debug function before it gets "dechunked" */ - if(data->set.verbose) { - if(k->badheader) { - Curl_debug(data, CURLINFO_DATA_IN, data->state.headerbuff, - (size_t)k->hbuflen, conn); - if(k->badheader == HEADER_PARTHEADER) - Curl_debug(data, CURLINFO_DATA_IN, - k->str, (size_t)nread, conn); - } - else - Curl_debug(data, CURLINFO_DATA_IN, - k->str, (size_t)nread, conn); - } - -#ifndef CURL_DISABLE_HTTP - if(k->chunk) { - /* - * Here comes a chunked transfer flying and we need to decode this - * properly. While the name says read, this function both reads - * and writes away the data. The returned 'nread' holds the number - * of actual data it wrote to the client. - */ - - CHUNKcode res = - Curl_httpchunk_read(conn, k->str, nread, &nread); - - if(CHUNKE_OK < res) { - if(CHUNKE_WRITE_ERROR == res) { - failf(data, "Failed writing data"); - return CURLE_WRITE_ERROR; - } - failf(data, "%s in chunked-encoding", Curl_chunked_strerror(res)); - return CURLE_RECV_ERROR; - } - else if(CHUNKE_STOP == res) { - size_t dataleft; - /* we're done reading chunks! */ - k->keepon &= ~KEEP_RECV; /* read no more */ - - /* There are now possibly N number of bytes at the end of the - str buffer that weren't written to the client. - - We DO care about this data if we are pipelining. - Push it back to be read on the next pass. */ - - dataleft = conn->chunk.dataleft; - if(dataleft != 0) { - infof(conn->data, "Leftovers after chunking: %zu bytes\n", - dataleft); - if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) { - /* only attempt the rewind if we truly are pipelining */ - infof(conn->data, "Rewinding %zu bytes\n",dataleft); - read_rewind(conn, dataleft); - } - } - } - /* If it returned OK, we just keep going */ - } -#endif /* CURL_DISABLE_HTTP */ - - /* Account for body content stored in the header buffer */ - if(k->badheader && !k->ignorebody) { - DEBUGF(infof(data, "Increasing bytecount by %zu from hbuflen\n", - k->hbuflen)); - k->bytecount += k->hbuflen; - } - - if((-1 != k->maxdownload) && - (k->bytecount + nread >= k->maxdownload)) { - - excess = (size_t)(k->bytecount + nread - k->maxdownload); - if(excess > 0 && !k->ignorebody) { - if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) { - /* The 'excess' amount below can't be more than BUFSIZE which - always will fit in a size_t */ - infof(data, - "Rewinding stream by : %zu" - " bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T - ", maxdownload = %" CURL_FORMAT_CURL_OFF_T - ", bytecount = %" CURL_FORMAT_CURL_OFF_T ", nread = %zd)\n", - excess, data->state.path, - k->size, k->maxdownload, k->bytecount, nread); - read_rewind(conn, excess); - } - else { - infof(data, - "Excess found in a non pipelined read:" - " excess = %zu" - ", size = %" CURL_FORMAT_CURL_OFF_T - ", maxdownload = %" CURL_FORMAT_CURL_OFF_T - ", bytecount = %" CURL_FORMAT_CURL_OFF_T "\n", - excess, k->size, k->maxdownload, k->bytecount); - } - } - - nread = (ssize_t) (k->maxdownload - k->bytecount); - if(nread < 0) /* this should be unusual */ - nread = 0; - - k->keepon &= ~KEEP_RECV; /* we're done reading */ - } - - k->bytecount += nread; - - Curl_pgrsSetDownloadCounter(data, k->bytecount); - - if(!k->chunk && (nread || k->badheader || is_empty_data)) { - /* If this is chunky transfer, it was already written */ - - if(k->badheader && !k->ignorebody) { - /* we parsed a piece of data wrongly assuming it was a header - and now we output it as body instead */ - - /* Don't let excess data pollute body writes */ - if(k->maxdownload == -1 || (curl_off_t)k->hbuflen <= k->maxdownload) - result = Curl_client_write(conn, CLIENTWRITE_BODY, - data->state.headerbuff, - k->hbuflen); - else - result = Curl_client_write(conn, CLIENTWRITE_BODY, - data->state.headerbuff, - (size_t)k->maxdownload); - - if(result) - return result; - } - if(k->badheader < HEADER_ALLBAD) { - /* This switch handles various content encodings. If there's an - error here, be sure to check over the almost identical code - in http_chunks.c. - Make sure that ALL_CONTENT_ENCODINGS contains all the - encodings handled here. */ -#ifdef HAVE_LIBZ - switch(conn->data->set.http_ce_skip ? - IDENTITY : k->auto_decoding) { - case IDENTITY: -#endif - /* This is the default when the server sends no - Content-Encoding header. See Curl_readwrite_init; the - memset() call initializes k->auto_decoding to zero. */ - if(!k->ignorebody) { - -#ifndef CURL_DISABLE_POP3 - if(conn->handler->protocol&PROTO_FAMILY_POP3) - result = Curl_pop3_write(conn, k->str, nread); - else -#endif /* CURL_DISABLE_POP3 */ - - result = Curl_client_write(conn, CLIENTWRITE_BODY, k->str, - nread); - } -#ifdef HAVE_LIBZ - break; - - case DEFLATE: - /* Assume CLIENTWRITE_BODY; headers are not encoded. */ - if(!k->ignorebody) - result = Curl_unencode_deflate_write(conn, k, nread); - break; - - case GZIP: - /* Assume CLIENTWRITE_BODY; headers are not encoded. */ - if(!k->ignorebody) - result = Curl_unencode_gzip_write(conn, k, nread); - break; - - default: - failf(data, "Unrecognized content encoding type. " - "libcurl understands `identity', `deflate' and `gzip' " - "content encodings."); - result = CURLE_BAD_CONTENT_ENCODING; - break; - } -#endif - } - k->badheader = HEADER_NORMAL; /* taken care of now */ - - if(result) - return result; - } - - } /* if(!header and data to read) */ - - if(conn->handler->readwrite && - (excess > 0 && !conn->bits.stream_was_rewound)) { - /* Parse the excess data */ - k->str += nread; - nread = (ssize_t)excess; - - result = conn->handler->readwrite(data, conn, &nread, &readmore); - if(result) - return result; - - if(readmore) - k->keepon |= KEEP_RECV; /* we're not done reading */ - break; - } - - if(is_empty_data) { - /* if we received nothing, the server closed the connection and we - are done */ - k->keepon &= ~KEEP_RECV; - } - - } while(data_pending(conn) && maxloops--); - - if(maxloops <= 0) { - /* we mark it as read-again-please */ - conn->cselect_bits = CURL_CSELECT_IN; - *comeback = TRUE; - } - - if(((k->keepon & (KEEP_RECV|KEEP_SEND)) == KEEP_SEND) && - conn->bits.close) { - /* When we've read the entire thing and the close bit is set, the server - may now close the connection. If there's now any kind of sending going - on from our side, we need to stop that immediately. */ - infof(data, "we are done reading and this is set to close, stop send\n"); - k->keepon &= ~KEEP_SEND; /* no writing anymore either */ - } - - return CURLE_OK; -} - -static CURLcode done_sending(struct connectdata *conn, - struct SingleRequest *k) -{ - k->keepon &= ~KEEP_SEND; /* we're done writing */ - - Curl_http2_done_sending(conn); - - if(conn->bits.rewindaftersend) { - CURLcode result = Curl_readrewind(conn); - if(result) - return result; - } - return CURLE_OK; -} - - -/* - * Send data to upload to the server, when the socket is writable. - */ -static CURLcode readwrite_upload(struct Curl_easy *data, - struct connectdata *conn, - struct SingleRequest *k, - int *didwhat) -{ - ssize_t i, si; - ssize_t bytes_written; - CURLcode result; - ssize_t nread; /* number of bytes read */ - bool sending_http_headers = FALSE; - - if((k->bytecount == 0) && (k->writebytecount == 0)) - Curl_pgrsTime(data, TIMER_STARTTRANSFER); - - *didwhat |= KEEP_SEND; - - do { - - /* only read more data if there's no upload data already - present in the upload buffer */ - if(0 == data->req.upload_present) { - /* init the "upload from here" pointer */ - data->req.upload_fromhere = k->uploadbuf; - - if(!k->upload_done) { - /* HTTP pollution, this should be written nicer to become more - protocol agnostic. */ - int fillcount; - struct HTTP *http = data->req.protop; - - if((k->exp100 == EXP100_SENDING_REQUEST) && - (http->sending == HTTPSEND_BODY)) { - /* If this call is to send body data, we must take some action: - We have sent off the full HTTP 1.1 request, and we shall now - go into the Expect: 100 state and await such a header */ - k->exp100 = EXP100_AWAITING_CONTINUE; /* wait for the header */ - k->keepon &= ~KEEP_SEND; /* disable writing */ - k->start100 = Curl_tvnow(); /* timeout count starts now */ - *didwhat &= ~KEEP_SEND; /* we didn't write anything actually */ - - /* set a timeout for the multi interface */ - Curl_expire(data, data->set.expect_100_timeout); - break; - } - - if(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)) { - if(http->sending == HTTPSEND_REQUEST) - /* We're sending the HTTP request headers, not the data. - Remember that so we don't change the line endings. */ - sending_http_headers = TRUE; - else - sending_http_headers = FALSE; - } - - result = Curl_fillreadbuffer(conn, BUFSIZE, &fillcount); - if(result) - return result; - - nread = (ssize_t)fillcount; - } - else - nread = 0; /* we're done uploading/reading */ - - if(!nread && (k->keepon & KEEP_SEND_PAUSE)) { - /* this is a paused transfer */ - break; - } - else if(nread<=0) { - result = done_sending(conn, k); - if(result) - return result; - break; - } - - /* store number of bytes available for upload */ - data->req.upload_present = nread; - - /* convert LF to CRLF if so asked */ - if((!sending_http_headers) && ( -#ifdef CURL_DO_LINEEND_CONV - /* always convert if we're FTPing in ASCII mode */ - (data->set.prefer_ascii) || -#endif - (data->set.crlf))) { - /* Do we need to allocate a scratch buffer? */ - if(!data->state.scratch) { - data->state.scratch = malloc(2 * BUFSIZE); - if(!data->state.scratch) { - failf(data, "Failed to alloc scratch buffer!"); - - return CURLE_OUT_OF_MEMORY; - } - } - - /* - * ASCII/EBCDIC Note: This is presumably a text (not binary) - * transfer so the data should already be in ASCII. - * That means the hex values for ASCII CR (0x0d) & LF (0x0a) - * must be used instead of the escape sequences \r & \n. - */ - for(i = 0, si = 0; i < nread; i++, si++) { - if(data->req.upload_fromhere[i] == 0x0a) { - data->state.scratch[si++] = 0x0d; - data->state.scratch[si] = 0x0a; - if(!data->set.crlf) { - /* we're here only because FTP is in ASCII mode... - bump infilesize for the LF we just added */ - if(data->state.infilesize != -1) - data->state.infilesize++; - } - } - else - data->state.scratch[si] = data->req.upload_fromhere[i]; - } - - if(si != nread) { - /* only perform the special operation if we really did replace - anything */ - nread = si; - - /* upload from the new (replaced) buffer instead */ - data->req.upload_fromhere = data->state.scratch; - - /* set the new amount too */ - data->req.upload_present = nread; - } - } - -#ifndef CURL_DISABLE_SMTP - if(conn->handler->protocol & PROTO_FAMILY_SMTP) { - result = Curl_smtp_escape_eob(conn, nread); - if(result) - return result; - } -#endif /* CURL_DISABLE_SMTP */ - } /* if 0 == data->req.upload_present */ - else { - /* We have a partial buffer left from a previous "round". Use - that instead of reading more data */ - } - - /* write to socket (send away data) */ - result = Curl_write(conn, - conn->writesockfd, /* socket to send to */ - data->req.upload_fromhere, /* buffer pointer */ - data->req.upload_present, /* buffer size */ - &bytes_written); /* actually sent */ - - if(result) - return result; - - if(data->set.verbose) - /* show the data before we change the pointer upload_fromhere */ - Curl_debug(data, CURLINFO_DATA_OUT, data->req.upload_fromhere, - (size_t)bytes_written, conn); - - k->writebytecount += bytes_written; - - if(k->writebytecount == data->state.infilesize) { - /* we have sent all data we were supposed to */ - k->upload_done = TRUE; - infof(data, "We are completely uploaded and fine\n"); - } - - if(data->req.upload_present != bytes_written) { - /* we only wrote a part of the buffer (if anything), deal with it! */ - - /* store the amount of bytes left in the buffer to write */ - data->req.upload_present -= bytes_written; - - /* advance the pointer where to find the buffer when the next send - is to happen */ - data->req.upload_fromhere += bytes_written; - } - else { - /* we've uploaded that buffer now */ - data->req.upload_fromhere = k->uploadbuf; - data->req.upload_present = 0; /* no more bytes left */ - - if(k->upload_done) { - result = done_sending(conn, k); - if(result) - return result; - } - } - - Curl_pgrsSetUploadCounter(data, k->writebytecount); - - } WHILE_FALSE; /* just to break out from! */ - - return CURLE_OK; -} - -/* - * Curl_readwrite() is the low-level function to be called when data is to - * be read and written to/from the connection. - * - * return '*comeback' TRUE if we didn't properly drain the socket so this - * function should get called again without select() or similar in between! - */ -CURLcode Curl_readwrite(struct connectdata *conn, - struct Curl_easy *data, - bool *done, - bool *comeback) -{ - struct SingleRequest *k = &data->req; - CURLcode result; - int didwhat=0; - - curl_socket_t fd_read; - curl_socket_t fd_write; - int select_res = conn->cselect_bits; - - conn->cselect_bits = 0; - - /* only use the proper socket if the *_HOLD bit is not set simultaneously as - then we are in rate limiting state in that transfer direction */ - - if((k->keepon & KEEP_RECVBITS) == KEEP_RECV) - fd_read = conn->sockfd; - else - fd_read = CURL_SOCKET_BAD; - - if((k->keepon & KEEP_SENDBITS) == KEEP_SEND) - fd_write = conn->writesockfd; - else - fd_write = CURL_SOCKET_BAD; - - if(conn->data->state.drain) { - select_res |= CURL_CSELECT_IN; - DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data\n")); - } - - if(!select_res) /* Call for select()/poll() only, if read/write/error - status is not known. */ - select_res = Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write, 0); - - if(select_res == CURL_CSELECT_ERR) { - failf(data, "select/poll returned error"); - return CURLE_SEND_ERROR; - } - - /* We go ahead and do a read if we have a readable socket or if - the stream was rewound (in which case we have data in a - buffer) */ - if((k->keepon & KEEP_RECV) && - ((select_res & CURL_CSELECT_IN) || conn->bits.stream_was_rewound)) { - - result = readwrite_data(data, conn, k, &didwhat, done, comeback); - if(result || *done) - return result; - } - - /* If we still have writing to do, we check if we have a writable socket. */ - if((k->keepon & KEEP_SEND) && (select_res & CURL_CSELECT_OUT)) { - /* write */ - - result = readwrite_upload(data, conn, k, &didwhat); - if(result) - return result; - } - - k->now = Curl_tvnow(); - if(didwhat) { - /* Update read/write counters */ - if(k->bytecountp) - *k->bytecountp = k->bytecount; /* read count */ - if(k->writebytecountp) - *k->writebytecountp = k->writebytecount; /* write count */ - } - else { - /* no read no write, this is a timeout? */ - if(k->exp100 == EXP100_AWAITING_CONTINUE) { - /* This should allow some time for the header to arrive, but only a - very short time as otherwise it'll be too much wasted time too - often. */ - - /* Quoting RFC2616, section "8.2.3 Use of the 100 (Continue) Status": - - Therefore, when a client sends this header field to an origin server - (possibly via a proxy) from which it has never seen a 100 (Continue) - status, the client SHOULD NOT wait for an indefinite period before - sending the request body. - - */ - - time_t ms = Curl_tvdiff(k->now, k->start100); - if(ms >= data->set.expect_100_timeout) { - /* we've waited long enough, continue anyway */ - k->exp100 = EXP100_SEND_DATA; - k->keepon |= KEEP_SEND; - infof(data, "Done waiting for 100-continue\n"); - } - } - } - - if(Curl_pgrsUpdate(conn)) - result = CURLE_ABORTED_BY_CALLBACK; - else - result = Curl_speedcheck(data, k->now); - if(result) - return result; - - if(k->keepon) { - if(0 > Curl_timeleft(data, &k->now, FALSE)) { - if(k->size != -1) { - failf(data, "Operation timed out after %ld milliseconds with %" - CURL_FORMAT_CURL_OFF_T " out of %" - CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(k->now, data->progress.t_startsingle), k->bytecount, - k->size); - } - else { - failf(data, "Operation timed out after %ld milliseconds with %" - CURL_FORMAT_CURL_OFF_T " bytes received", - Curl_tvdiff(k->now, data->progress.t_startsingle), k->bytecount); - } - return CURLE_OPERATION_TIMEDOUT; - } - } - else { - /* - * The transfer has been performed. Just make some general checks before - * returning. - */ - - if(!(data->set.opt_no_body) && (k->size != -1) && - (k->bytecount != k->size) && -#ifdef CURL_DO_LINEEND_CONV - /* Most FTP servers don't adjust their file SIZE response for CRLFs, - so we'll check to see if the discrepancy can be explained - by the number of CRLFs we've changed to LFs. - */ - (k->bytecount != (k->size + data->state.crlf_conversions)) && -#endif /* CURL_DO_LINEEND_CONV */ - !data->req.newurl) { - failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T - " bytes remaining to read", - k->size - k->bytecount); - return CURLE_PARTIAL_FILE; - } - else if(!(data->set.opt_no_body) && - k->chunk && - (conn->chunk.state != CHUNK_STOP)) { - /* - * In chunked mode, return an error if the connection is closed prior to - * the empty (terminating) chunk is read. - * - * The condition above used to check for - * conn->proto.http->chunk.datasize != 0 which is true after reading - * *any* chunk, not just the empty chunk. - * - */ - failf(data, "transfer closed with outstanding read data remaining"); - return CURLE_PARTIAL_FILE; - } - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; - } - - /* Now update the "done" boolean we return */ - *done = (0 == (k->keepon&(KEEP_RECV|KEEP_SEND| - KEEP_RECV_PAUSE|KEEP_SEND_PAUSE))) ? TRUE : FALSE; - - return CURLE_OK; -} - -/* - * Curl_single_getsock() gets called by the multi interface code when the app - * has requested to get the sockets for the current connection. This function - * will then be called once for every connection that the multi interface - * keeps track of. This function will only be called for connections that are - * in the proper state to have this information available. - */ -int Curl_single_getsock(const struct connectdata *conn, - curl_socket_t *sock, /* points to numsocks number - of sockets */ - int numsocks) -{ - const struct Curl_easy *data = conn->data; - int bitmap = GETSOCK_BLANK; - unsigned sockindex = 0; - - if(conn->handler->perform_getsock) - return conn->handler->perform_getsock(conn, sock, numsocks); - - if(numsocks < 2) - /* simple check but we might need two slots */ - return GETSOCK_BLANK; - - /* don't include HOLD and PAUSE connections */ - if((data->req.keepon & KEEP_RECVBITS) == KEEP_RECV) { - - DEBUGASSERT(conn->sockfd != CURL_SOCKET_BAD); - - bitmap |= GETSOCK_READSOCK(sockindex); - sock[sockindex] = conn->sockfd; - } - - /* don't include HOLD and PAUSE connections */ - if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) { - - if((conn->sockfd != conn->writesockfd) || - bitmap == GETSOCK_BLANK) { - /* only if they are not the same socket and we have a readable - one, we increase index */ - if(bitmap != GETSOCK_BLANK) - sockindex++; /* increase index if we need two entries */ - - DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD); - - sock[sockindex] = conn->writesockfd; - } - - bitmap |= GETSOCK_WRITESOCK(sockindex); - } - - return bitmap; -} - -/* Curl_init_CONNECT() gets called each time the handle switches to CONNECT - which means this gets called once for each subsequent redirect etc */ -void Curl_init_CONNECT(struct Curl_easy *data) -{ - data->state.fread_func = data->set.fread_func_set; - data->state.in = data->set.in_set; -} - -/* - * Curl_pretransfer() is called immediately before a transfer starts, and only - * once for one transfer no matter if it has redirects or do multi-pass - * authentication etc. - */ -CURLcode Curl_pretransfer(struct Curl_easy *data) -{ - CURLcode result; - if(!data->change.url) { - /* we can't do anything without URL */ - failf(data, "No URL set!"); - return CURLE_URL_MALFORMAT; - } - - /* Init the SSL session ID cache here. We do it here since we want to do it - after the *_setopt() calls (that could specify the size of the cache) but - before any transfer takes place. */ - result = Curl_ssl_initsessions(data, data->set.general_ssl.max_ssl_sessions); - if(result) - return result; - - data->set.followlocation=0; /* reset the location-follow counter */ - data->state.this_is_a_follow = FALSE; /* reset this */ - data->state.errorbuf = FALSE; /* no error has occurred */ - data->state.httpversion = 0; /* don't assume any particular server version */ - - data->state.authproblem = FALSE; - data->state.authhost.want = data->set.httpauth; - data->state.authproxy.want = data->set.proxyauth; - Curl_safefree(data->info.wouldredirect); - data->info.wouldredirect = NULL; - - if(data->set.httpreq == HTTPREQ_PUT) - data->state.infilesize = data->set.filesize; - else - data->state.infilesize = data->set.postfieldsize; - - /* If there is a list of cookie files to read, do it now! */ - if(data->change.cookielist) - Curl_cookie_loadfiles(data); - - /* If there is a list of host pairs to deal with */ - if(data->change.resolve) - result = Curl_loadhostpairs(data); - - if(!result) { - /* Allow data->set.use_port to set which port to use. This needs to be - * disabled for example when we follow Location: headers to URLs using - * different ports! */ - data->state.allow_port = TRUE; - -#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL) - /************************************************************* - * Tell signal handler to ignore SIGPIPE - *************************************************************/ - if(!data->set.no_signal) - data->state.prev_signal = signal(SIGPIPE, SIG_IGN); -#endif - - Curl_initinfo(data); /* reset session-specific information "variables" */ - Curl_pgrsResetTimesSizes(data); - Curl_pgrsStartNow(data); - - if(data->set.timeout) - Curl_expire(data, data->set.timeout); - - if(data->set.connecttimeout) - Curl_expire(data, data->set.connecttimeout); - - /* In case the handle is re-used and an authentication method was picked - in the session we need to make sure we only use the one(s) we now - consider to be fine */ - data->state.authhost.picked &= data->state.authhost.want; - data->state.authproxy.picked &= data->state.authproxy.want; - - if(data->set.wildcardmatch) { - struct WildcardData *wc = &data->wildcard; - if(!wc->filelist) { - result = Curl_wildcard_init(wc); /* init wildcard structures */ - if(result) - return CURLE_OUT_OF_MEMORY; - } - } - - } - - return result; -} - -/* - * Curl_posttransfer() is called immediately after a transfer ends - */ -CURLcode Curl_posttransfer(struct Curl_easy *data) -{ -#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL) - /* restore the signal handler for SIGPIPE before we get back */ - if(!data->set.no_signal) - signal(SIGPIPE, data->state.prev_signal); -#else - (void)data; /* unused parameter */ -#endif - - return CURLE_OK; -} - -#ifndef CURL_DISABLE_HTTP -/* - * strlen_url() returns the length of the given URL if the spaces within the - * URL were properly URL encoded. - */ -static size_t strlen_url(const char *url) -{ - const unsigned char *ptr; - size_t newlen=0; - bool left=TRUE; /* left side of the ? */ - - for(ptr=(unsigned char *)url; *ptr; ptr++) { - switch(*ptr) { - case '?': - left=FALSE; - /* fall through */ - default: - if(*ptr >= 0x80) - newlen += 2; - newlen++; - break; - case ' ': - if(left) - newlen+=3; - else - newlen++; - break; - } - } - return newlen; -} - -/* strcpy_url() copies a url to a output buffer and URL-encodes the spaces in - * the source URL accordingly. - */ -static void strcpy_url(char *output, const char *url) -{ - /* we must add this with whitespace-replacing */ - bool left=TRUE; - const unsigned char *iptr; - char *optr = output; - for(iptr = (unsigned char *)url; /* read from here */ - *iptr; /* until zero byte */ - iptr++) { - switch(*iptr) { - case '?': - left=FALSE; - /* fall through */ - default: - if(*iptr >= 0x80) { - snprintf(optr, 4, "%%%02x", *iptr); - optr += 3; - } - else - *optr++=*iptr; - break; - case ' ': - if(left) { - *optr++='%'; /* add a '%' */ - *optr++='2'; /* add a '2' */ - *optr++='0'; /* add a '0' */ - } - else - *optr++='+'; /* add a '+' here */ - break; - } - } - *optr=0; /* zero terminate output buffer */ - -} - -/* - * Returns true if the given URL is absolute (as opposed to relative) - */ -static bool is_absolute_url(const char *url) -{ - char prot[16]; /* URL protocol string storage */ - char letter; /* used for a silly sscanf */ - - return (2 == sscanf(url, "%15[^?&/:]://%c", prot, &letter)) ? TRUE : FALSE; -} - -/* - * Concatenate a relative URL to a base URL making it absolute. - * URL-encodes any spaces. - * The returned pointer must be freed by the caller unless NULL - * (returns NULL on out of memory). - */ -static char *concat_url(const char *base, const char *relurl) -{ - /*** - TRY to append this new path to the old URL - to the right of the host part. Oh crap, this is doomed to cause - problems in the future... - */ - char *newest; - char *protsep; - char *pathsep; - size_t newlen; - - const char *useurl = relurl; - size_t urllen; - - /* we must make our own copy of the URL to play with, as it may - point to read-only data */ - char *url_clone=strdup(base); - - if(!url_clone) - return NULL; /* skip out of this NOW */ - - /* protsep points to the start of the host name */ - protsep=strstr(url_clone, "//"); - if(!protsep) - protsep=url_clone; - else - protsep+=2; /* pass the slashes */ - - if('/' != relurl[0]) { - int level=0; - - /* First we need to find out if there's a ?-letter in the URL, - and cut it and the right-side of that off */ - pathsep = strchr(protsep, '?'); - if(pathsep) - *pathsep=0; - - /* we have a relative path to append to the last slash if there's one - available, or if the new URL is just a query string (starts with a - '?') we append the new one at the end of the entire currently worked - out URL */ - if(useurl[0] != '?') { - pathsep = strrchr(protsep, '/'); - if(pathsep) - *pathsep=0; - } - - /* Check if there's any slash after the host name, and if so, remember - that position instead */ - pathsep = strchr(protsep, '/'); - if(pathsep) - protsep = pathsep+1; - else - protsep = NULL; - - /* now deal with one "./" or any amount of "../" in the newurl - and act accordingly */ - - if((useurl[0] == '.') && (useurl[1] == '/')) - useurl+=2; /* just skip the "./" */ - - while((useurl[0] == '.') && - (useurl[1] == '.') && - (useurl[2] == '/')) { - level++; - useurl+=3; /* pass the "../" */ - } - - if(protsep) { - while(level--) { - /* cut off one more level from the right of the original URL */ - pathsep = strrchr(protsep, '/'); - if(pathsep) - *pathsep=0; - else { - *protsep=0; - break; - } - } - } - } - else { - /* We got a new absolute path for this server */ - - if((relurl[0] == '/') && (relurl[1] == '/')) { - /* the new URL starts with //, just keep the protocol part from the - original one */ - *protsep=0; - useurl = &relurl[2]; /* we keep the slashes from the original, so we - skip the new ones */ - } - else { - /* cut off the original URL from the first slash, or deal with URLs - without slash */ - pathsep = strchr(protsep, '/'); - if(pathsep) { - /* When people use badly formatted URLs, such as - "http://www.url.com?dir=/home/daniel" we must not use the first - slash, if there's a ?-letter before it! */ - char *sep = strchr(protsep, '?'); - if(sep && (sep < pathsep)) - pathsep = sep; - *pathsep=0; - } - else { - /* There was no slash. Now, since we might be operating on a badly - formatted URL, such as "http://www.url.com?id=2380" which doesn't - use a slash separator as it is supposed to, we need to check for a - ?-letter as well! */ - pathsep = strchr(protsep, '?'); - if(pathsep) - *pathsep=0; - } - } - } - - /* If the new part contains a space, this is a mighty stupid redirect - but we still make an effort to do "right". To the left of a '?' - letter we replace each space with %20 while it is replaced with '+' - on the right side of the '?' letter. - */ - newlen = strlen_url(useurl); - - urllen = strlen(url_clone); - - newest = malloc(urllen + 1 + /* possible slash */ - newlen + 1 /* zero byte */); - - if(!newest) { - free(url_clone); /* don't leak this */ - return NULL; - } - - /* copy over the root url part */ - memcpy(newest, url_clone, urllen); - - /* check if we need to append a slash */ - if(('/' == useurl[0]) || (protsep && !*protsep) || ('?' == useurl[0])) - ; - else - newest[urllen++]='/'; - - /* then append the new piece on the right side */ - strcpy_url(&newest[urllen], useurl); - - free(url_clone); - - return newest; -} -#endif /* CURL_DISABLE_HTTP */ - -/* - * Curl_follow() handles the URL redirect magic. Pass in the 'newurl' string - * as given by the remote server and set up the new URL to request. - */ -CURLcode Curl_follow(struct Curl_easy *data, - char *newurl, /* this 'newurl' is the Location: string, - and it must be malloc()ed before passed - here */ - followtype type) /* see transfer.h */ -{ -#ifdef CURL_DISABLE_HTTP - (void)data; - (void)newurl; - (void)type; - /* Location: following will not happen when HTTP is disabled */ - return CURLE_TOO_MANY_REDIRECTS; -#else - - /* Location: redirect */ - bool disallowport = FALSE; - - if(type == FOLLOW_REDIR) { - if((data->set.maxredirs != -1) && - (data->set.followlocation >= data->set.maxredirs)) { - failf(data, "Maximum (%ld) redirects followed", data->set.maxredirs); - return CURLE_TOO_MANY_REDIRECTS; - } - - /* mark the next request as a followed location: */ - data->state.this_is_a_follow = TRUE; - - data->set.followlocation++; /* count location-followers */ - - if(data->set.http_auto_referer) { - /* We are asked to automatically set the previous URL as the referer - when we get the next URL. We pick the ->url field, which may or may - not be 100% correct */ - - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; - } - - data->change.referer = strdup(data->change.url); - if(!data->change.referer) - return CURLE_OUT_OF_MEMORY; - data->change.referer_alloc = TRUE; /* yes, free this later */ - } - } - - if(!is_absolute_url(newurl)) { - /*** - *DANG* this is an RFC 2068 violation. The URL is supposed - to be absolute and this doesn't seem to be that! - */ - char *absolute = concat_url(data->change.url, newurl); - if(!absolute) - return CURLE_OUT_OF_MEMORY; - free(newurl); - newurl = absolute; - } - else { - /* The new URL MAY contain space or high byte values, that means a mighty - stupid redirect URL but we still make an effort to do "right". */ - char *newest; - size_t newlen = strlen_url(newurl); - - /* This is an absolute URL, don't allow the custom port number */ - disallowport = TRUE; - - newest = malloc(newlen+1); /* get memory for this */ - if(!newest) - return CURLE_OUT_OF_MEMORY; - strcpy_url(newest, newurl); /* create a space-free URL */ - - free(newurl); /* that was no good */ - newurl = newest; /* use this instead now */ - - } - - if(type == FOLLOW_FAKE) { - /* we're only figuring out the new url if we would've followed locations - but now we're done so we can get out! */ - data->info.wouldredirect = newurl; - return CURLE_OK; - } - - if(disallowport) - data->state.allow_port = FALSE; - - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - - data->change.url = newurl; - data->change.url_alloc = TRUE; - newurl = NULL; /* don't free! */ - - infof(data, "Issue another request to this URL: '%s'\n", data->change.url); - - /* - * We get here when the HTTP code is 300-399 (and 401). We need to perform - * differently based on exactly what return code there was. - * - * News from 7.10.6: we can also get here on a 401 or 407, in case we act on - * a HTTP (proxy-) authentication scheme other than Basic. - */ - switch(data->info.httpcode) { - /* 401 - Act on a WWW-Authenticate, we keep on moving and do the - Authorization: XXXX header in the HTTP request code snippet */ - /* 407 - Act on a Proxy-Authenticate, we keep on moving and do the - Proxy-Authorization: XXXX header in the HTTP request code snippet */ - /* 300 - Multiple Choices */ - /* 306 - Not used */ - /* 307 - Temporary Redirect */ - default: /* for all above (and the unknown ones) */ - /* Some codes are explicitly mentioned since I've checked RFC2616 and they - * seem to be OK to POST to. - */ - break; - case 301: /* Moved Permanently */ - /* (quote from RFC7231, section 6.4.2) - * - * Note: For historical reasons, a user agent MAY change the request - * method from POST to GET for the subsequent request. If this - * behavior is undesired, the 307 (Temporary Redirect) status code - * can be used instead. - * - * ---- - * - * Many webservers expect this, so these servers often answers to a POST - * request with an error page. To be sure that libcurl gets the page that - * most user agents would get, libcurl has to force GET. - * - * This behaviour is forbidden by RFC1945 and the obsolete RFC2616, and - * can be overridden with CURLOPT_POSTREDIR. - */ - if((data->set.httpreq == HTTPREQ_POST - || data->set.httpreq == HTTPREQ_POST_FORM) - && !(data->set.keep_post & CURL_REDIR_POST_301)) { - infof(data, "Switch from POST to GET\n"); - data->set.httpreq = HTTPREQ_GET; - } - break; - case 302: /* Found */ - /* (quote from RFC7231, section 6.4.3) - * - * Note: For historical reasons, a user agent MAY change the request - * method from POST to GET for the subsequent request. If this - * behavior is undesired, the 307 (Temporary Redirect) status code - * can be used instead. - * - * ---- - * - * Many webservers expect this, so these servers often answers to a POST - * request with an error page. To be sure that libcurl gets the page that - * most user agents would get, libcurl has to force GET. - * - * This behaviour is forbidden by RFC1945 and the obsolete RFC2616, and - * can be overridden with CURLOPT_POSTREDIR. - */ - if((data->set.httpreq == HTTPREQ_POST - || data->set.httpreq == HTTPREQ_POST_FORM) - && !(data->set.keep_post & CURL_REDIR_POST_302)) { - infof(data, "Switch from POST to GET\n"); - data->set.httpreq = HTTPREQ_GET; - } - break; - - case 303: /* See Other */ - /* Disable both types of POSTs, unless the user explicitely - asks for POST after POST */ - if(data->set.httpreq != HTTPREQ_GET - && !(data->set.keep_post & CURL_REDIR_POST_303)) { - data->set.httpreq = HTTPREQ_GET; /* enforce GET request */ - infof(data, "Disables POST, goes with %s\n", - data->set.opt_no_body?"HEAD":"GET"); - } - break; - case 304: /* Not Modified */ - /* 304 means we did a conditional request and it was "Not modified". - * We shouldn't get any Location: header in this response! - */ - break; - case 305: /* Use Proxy */ - /* (quote from RFC2616, section 10.3.6): - * "The requested resource MUST be accessed through the proxy given - * by the Location field. The Location field gives the URI of the - * proxy. The recipient is expected to repeat this single request - * via the proxy. 305 responses MUST only be generated by origin - * servers." - */ - break; - } - Curl_pgrsTime(data, TIMER_REDIRECT); - Curl_pgrsResetTimesSizes(data); - - return CURLE_OK; -#endif /* CURL_DISABLE_HTTP */ -} - -/* Returns CURLE_OK *and* sets '*url' if a request retry is wanted. - - NOTE: that the *url is malloc()ed. */ -CURLcode Curl_retry_request(struct connectdata *conn, - char **url) -{ - struct Curl_easy *data = conn->data; - - *url = NULL; - - /* if we're talking upload, we can't do the checks below, unless the protocol - is HTTP as when uploading over HTTP we will still get a response */ - if(data->set.upload && - !(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP))) - return CURLE_OK; - - if((data->req.bytecount + data->req.headerbytecount == 0) && - conn->bits.reuse && - (!data->set.opt_no_body - || (conn->handler->protocol & PROTO_FAMILY_HTTP)) && - (data->set.rtspreq != RTSPREQ_RECEIVE)) { - /* We got no data, we attempted to re-use a connection. For HTTP this - can be a retry so we try again regardless if we expected a body. - For other protocols we only try again only if we expected a body. - - This might happen if the connection was left alive when we were - done using it before, but that was closed when we wanted to read from - it again. Bad luck. Retry the same request on a fresh connect! */ - infof(conn->data, "Connection died, retrying a fresh connect\n"); - *url = strdup(conn->data->change.url); - if(!*url) - return CURLE_OUT_OF_MEMORY; - - connclose(conn, "retry"); /* close this connection */ - conn->bits.retry = TRUE; /* mark this as a connection we're about - to retry. Marking it this way should - prevent i.e HTTP transfers to return - error just because nothing has been - transferred! */ - - - if(conn->handler->protocol&PROTO_FAMILY_HTTP) { - struct HTTP *http = data->req.protop; - if(http->writebytecount) - return Curl_readrewind(conn); - } - } - return CURLE_OK; -} - -/* - * Curl_setup_transfer() is called to setup some basic properties for the - * upcoming transfer. - */ -void -Curl_setup_transfer( - struct connectdata *conn, /* connection data */ - int sockindex, /* socket index to read from or -1 */ - curl_off_t size, /* -1 if unknown at this point */ - bool getheader, /* TRUE if header parsing is wanted */ - curl_off_t *bytecountp, /* return number of bytes read or NULL */ - int writesockindex, /* socket index to write to, it may very well be - the same we read from. -1 disables */ - curl_off_t *writecountp /* return number of bytes written or NULL */ - ) -{ - struct Curl_easy *data; - struct SingleRequest *k; - - DEBUGASSERT(conn != NULL); - - data = conn->data; - k = &data->req; - - DEBUGASSERT((sockindex <= 1) && (sockindex >= -1)); - - /* now copy all input parameters */ - conn->sockfd = sockindex == -1 ? - CURL_SOCKET_BAD : conn->sock[sockindex]; - conn->writesockfd = writesockindex == -1 ? - CURL_SOCKET_BAD:conn->sock[writesockindex]; - k->getheader = getheader; - - k->size = size; - k->bytecountp = bytecountp; - k->writebytecountp = writecountp; - - /* The code sequence below is placed in this function just because all - necessary input is not always known in do_complete() as this function may - be called after that */ - - if(!k->getheader) { - k->header = FALSE; - if(size > 0) - Curl_pgrsSetDownloadSize(data, size); - } - /* we want header and/or body, if neither then don't do this! */ - if(k->getheader || !data->set.opt_no_body) { - - if(conn->sockfd != CURL_SOCKET_BAD) - k->keepon |= KEEP_RECV; - - if(conn->writesockfd != CURL_SOCKET_BAD) { - struct HTTP *http = data->req.protop; - /* HTTP 1.1 magic: - - Even if we require a 100-return code before uploading data, we might - need to write data before that since the REQUEST may not have been - finished sent off just yet. - - Thus, we must check if the request has been sent before we set the - state info where we wait for the 100-return code - */ - if((data->state.expect100header) && - (conn->handler->protocol&PROTO_FAMILY_HTTP) && - (http->sending == HTTPSEND_BODY)) { - /* wait with write until we either got 100-continue or a timeout */ - k->exp100 = EXP100_AWAITING_CONTINUE; - k->start100 = Curl_tvnow(); - - /* Set a timeout for the multi interface. Add the inaccuracy margin so - that we don't fire slightly too early and get denied to run. */ - Curl_expire(data, data->set.expect_100_timeout); - } - else { - if(data->state.expect100header) - /* when we've sent off the rest of the headers, we must await a - 100-continue but first finish sending the request */ - k->exp100 = EXP100_SENDING_REQUEST; - - /* enable the write bit when we're not waiting for continue */ - k->keepon |= KEEP_SEND; - } - } /* if(conn->writesockfd != CURL_SOCKET_BAD) */ - } /* if(k->getheader || !data->set.opt_no_body) */ - -} diff --git a/build/premake/premake5/contrib/curl/lib/transfer.h b/build/premake/premake5/contrib/curl/lib/transfer.h deleted file mode 100644 index 5189672605..0000000000 --- a/build/premake/premake5/contrib/curl/lib/transfer.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef HEADER_CURL_TRANSFER_H -#define HEADER_CURL_TRANSFER_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -void Curl_init_CONNECT(struct Curl_easy *data); - -CURLcode Curl_pretransfer(struct Curl_easy *data); -CURLcode Curl_second_connect(struct connectdata *conn); -CURLcode Curl_posttransfer(struct Curl_easy *data); - -typedef enum { - FOLLOW_NONE, /* not used within the function, just a placeholder to - allow initing to this */ - FOLLOW_FAKE, /* only records stuff, not actually following */ - FOLLOW_RETRY, /* set if this is a request retry as opposed to a real - redirect following */ - FOLLOW_REDIR, /* a full true redirect */ - FOLLOW_LAST /* never used */ -} followtype; - -CURLcode Curl_follow(struct Curl_easy *data, char *newurl, - followtype type); -CURLcode Curl_readwrite(struct connectdata *conn, - struct Curl_easy *data, bool *done, - bool *comeback); -int Curl_single_getsock(const struct connectdata *conn, - curl_socket_t *socks, - int numsocks); -CURLcode Curl_readrewind(struct connectdata *conn); -CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp); -CURLcode Curl_retry_request(struct connectdata *conn, char **url); -bool Curl_meets_timecondition(struct Curl_easy *data, time_t timeofdoc); - -/* This sets up a forthcoming transfer */ -void -Curl_setup_transfer (struct connectdata *data, - int sockindex, /* socket index to read from or -1 */ - curl_off_t size, /* -1 if unknown at this point */ - bool getheader, /* TRUE if header parsing is wanted */ - curl_off_t *bytecountp, /* return number of bytes read */ - int writesockindex, /* socket index to write to, it may - very well be the same we read from. - -1 disables */ - curl_off_t *writecountp /* return number of bytes written */ -); - -#endif /* HEADER_CURL_TRANSFER_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/url.c b/build/premake/premake5/contrib/curl/lib/url.c deleted file mode 100644 index 38b9552f7a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/url.c +++ /dev/null @@ -1,7065 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef __VMS -#include -#include -#endif - -#ifdef HAVE_SYS_UN_H -#include -#endif - -#ifndef HAVE_SOCKET -#error "We can't compile without socket() support!" -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#ifdef USE_LIBIDN2 -#include - -#elif defined(USE_WIN32_IDN) -/* prototype for curl_win32_idn_to_ascii() */ -bool curl_win32_idn_to_ascii(const char *in, char **out); -#endif /* USE_LIBIDN2 */ - -#include "urldata.h" -#include "netrc.h" - -#include "formdata.h" -#include "vtls/vtls.h" -#include "hostip.h" -#include "transfer.h" -#include "sendf.h" -#include "progress.h" -#include "cookie.h" -#include "strcase.h" -#include "strerror.h" -#include "escape.h" -#include "strtok.h" -#include "share.h" -#include "content_encoding.h" -#include "http_digest.h" -#include "http_negotiate.h" -#include "select.h" -#include "multiif.h" -#include "easyif.h" -#include "speedcheck.h" -#include "warnless.h" -#include "non-ascii.h" -#include "inet_pton.h" -#include "getinfo.h" - -/* And now for the protocols */ -#include "ftp.h" -#include "dict.h" -#include "telnet.h" -#include "tftp.h" -#include "http.h" -#include "http2.h" -#include "file.h" -#include "curl_ldap.h" -#include "ssh.h" -#include "imap.h" -#include "url.h" -#include "connect.h" -#include "inet_ntop.h" -#include "http_ntlm.h" -#include "curl_ntlm_wb.h" -#include "socks.h" -#include "curl_rtmp.h" -#include "gopher.h" -#include "http_proxy.h" -#include "conncache.h" -#include "multihandle.h" -#include "pipeline.h" -#include "dotdot.h" -#include "strdup.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* Local static prototypes */ -static struct connectdata * -find_oldest_idle_connection_in_bundle(struct Curl_easy *data, - struct connectbundle *bundle); -static void conn_free(struct connectdata *conn); -static void free_fixed_hostname(struct hostname *host); -static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); -static CURLcode parse_url_login(struct Curl_easy *data, - struct connectdata *conn, - char **userptr, char **passwdptr, - char **optionsptr); -static CURLcode parse_login_details(const char *login, const size_t len, - char **userptr, char **passwdptr, - char **optionsptr); -static unsigned int get_protocol_family(unsigned int protocol); - -/* - * Protocol table. - */ - -static const struct Curl_handler * const protocols[] = { - -#ifndef CURL_DISABLE_HTTP - &Curl_handler_http, -#endif - -#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP) - &Curl_handler_https, -#endif - -#ifndef CURL_DISABLE_FTP - &Curl_handler_ftp, -#endif - -#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP) - &Curl_handler_ftps, -#endif - -#ifndef CURL_DISABLE_TELNET - &Curl_handler_telnet, -#endif - -#ifndef CURL_DISABLE_DICT - &Curl_handler_dict, -#endif - -#ifndef CURL_DISABLE_LDAP - &Curl_handler_ldap, -#if !defined(CURL_DISABLE_LDAPS) && \ - ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \ - (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))) - &Curl_handler_ldaps, -#endif -#endif - -#ifndef CURL_DISABLE_FILE - &Curl_handler_file, -#endif - -#ifndef CURL_DISABLE_TFTP - &Curl_handler_tftp, -#endif - -#ifdef USE_LIBSSH2 - &Curl_handler_scp, - &Curl_handler_sftp, -#endif - -#ifndef CURL_DISABLE_IMAP - &Curl_handler_imap, -#ifdef USE_SSL - &Curl_handler_imaps, -#endif -#endif - -#ifndef CURL_DISABLE_POP3 - &Curl_handler_pop3, -#ifdef USE_SSL - &Curl_handler_pop3s, -#endif -#endif - -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) && \ - (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)) - &Curl_handler_smb, -#ifdef USE_SSL - &Curl_handler_smbs, -#endif -#endif - -#ifndef CURL_DISABLE_SMTP - &Curl_handler_smtp, -#ifdef USE_SSL - &Curl_handler_smtps, -#endif -#endif - -#ifndef CURL_DISABLE_RTSP - &Curl_handler_rtsp, -#endif - -#ifndef CURL_DISABLE_GOPHER - &Curl_handler_gopher, -#endif - -#ifdef USE_LIBRTMP - &Curl_handler_rtmp, - &Curl_handler_rtmpt, - &Curl_handler_rtmpe, - &Curl_handler_rtmpte, - &Curl_handler_rtmps, - &Curl_handler_rtmpts, -#endif - - (struct Curl_handler *) NULL -}; - -/* - * Dummy handler for undefined protocol schemes. - */ - -static const struct Curl_handler Curl_handler_dummy = { - "", /* scheme */ - ZERO_NULL, /* setup_connection */ - ZERO_NULL, /* do_it */ - ZERO_NULL, /* done */ - ZERO_NULL, /* do_more */ - ZERO_NULL, /* connect_it */ - ZERO_NULL, /* connecting */ - ZERO_NULL, /* doing */ - ZERO_NULL, /* proto_getsock */ - ZERO_NULL, /* doing_getsock */ - ZERO_NULL, /* domore_getsock */ - ZERO_NULL, /* perform_getsock */ - ZERO_NULL, /* disconnect */ - ZERO_NULL, /* readwrite */ - 0, /* defport */ - 0, /* protocol */ - PROTOPT_NONE /* flags */ -}; - -void Curl_freeset(struct Curl_easy *data) -{ - /* Free all dynamic strings stored in the data->set substructure. */ - enum dupstring i; - for(i=(enum dupstring)0; i < STRING_LAST; i++) { - Curl_safefree(data->set.str[i]); - } - - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; - } - data->change.referer = NULL; - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - data->change.url = NULL; -} - -static CURLcode setstropt(char **charp, const char *s) -{ - /* Release the previous storage at `charp' and replace by a dynamic storage - copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */ - - Curl_safefree(*charp); - - if(s) { - char *str = strdup(s); - - if(!str) - return CURLE_OUT_OF_MEMORY; - - *charp = str; - } - - return CURLE_OK; -} - -static CURLcode setstropt_userpwd(char *option, char **userp, char **passwdp) -{ - CURLcode result = CURLE_OK; - char *user = NULL; - char *passwd = NULL; - - /* Parse the login details if specified. It not then we treat NULL as a hint - to clear the existing data */ - if(option) { - result = parse_login_details(option, strlen(option), - (userp ? &user : NULL), - (passwdp ? &passwd : NULL), - NULL); - } - - if(!result) { - /* Store the username part of option if required */ - if(userp) { - if(!user && option && option[0] == ':') { - /* Allocate an empty string instead of returning NULL as user name */ - user = strdup(""); - if(!user) - result = CURLE_OUT_OF_MEMORY; - } - - Curl_safefree(*userp); - *userp = user; - } - - /* Store the password part of option if required */ - if(passwdp) { - Curl_safefree(*passwdp); - *passwdp = passwd; - } - } - - return result; -} - -CURLcode Curl_dupset(struct Curl_easy *dst, struct Curl_easy *src) -{ - CURLcode result = CURLE_OK; - enum dupstring i; - - /* Copy src->set into dst->set first, then deal with the strings - afterwards */ - dst->set = src->set; - - /* clear all string pointers first */ - memset(dst->set.str, 0, STRING_LAST * sizeof(char *)); - - /* duplicate all strings */ - for(i=(enum dupstring)0; i< STRING_LASTZEROTERMINATED; i++) { - result = setstropt(&dst->set.str[i], src->set.str[i]); - if(result) - return result; - } - - /* duplicate memory areas pointed to */ - i = STRING_COPYPOSTFIELDS; - if(src->set.postfieldsize && src->set.str[i]) { - /* postfieldsize is curl_off_t, Curl_memdup() takes a size_t ... */ - dst->set.str[i] = Curl_memdup(src->set.str[i], - curlx_sotouz(src->set.postfieldsize)); - if(!dst->set.str[i]) - return CURLE_OUT_OF_MEMORY; - /* point to the new copy */ - dst->set.postfields = dst->set.str[i]; - } - - return CURLE_OK; -} - -/* - * This is the internal function curl_easy_cleanup() calls. This should - * cleanup and free all resources associated with this sessionhandle. - * - * NOTE: if we ever add something that attempts to write to a socket or - * similar here, we must ignore SIGPIPE first. It is currently only done - * when curl_easy_perform() is invoked. - */ - -CURLcode Curl_close(struct Curl_easy *data) -{ - struct Curl_multi *m; - - if(!data) - return CURLE_OK; - - Curl_expire_clear(data); /* shut off timers */ - - m = data->multi; - - if(m) - /* This handle is still part of a multi handle, take care of this first - and detach this handle from there. */ - curl_multi_remove_handle(data->multi, data); - - if(data->multi_easy) - /* when curl_easy_perform() is used, it creates its own multi handle to - use and this is the one */ - curl_multi_cleanup(data->multi_easy); - - /* Destroy the timeout list that is held in the easy handle. It is - /normally/ done by curl_multi_remove_handle() but this is "just in - case" */ - if(data->state.timeoutlist) { - Curl_llist_destroy(data->state.timeoutlist, NULL); - data->state.timeoutlist = NULL; - } - - data->magic = 0; /* force a clear AFTER the possibly enforced removal from - the multi handle, since that function uses the magic - field! */ - - if(data->state.rangestringalloc) - free(data->state.range); - - /* Free the pathbuffer */ - Curl_safefree(data->state.pathbuffer); - data->state.path = NULL; - - /* freed here just in case DONE wasn't called */ - Curl_free_request_state(data); - - /* Close down all open SSL info and sessions */ - Curl_ssl_close_all(data); - Curl_safefree(data->state.first_host); - Curl_safefree(data->state.scratch); - Curl_ssl_free_certinfo(data); - - /* Cleanup possible redirect junk */ - free(data->req.newurl); - data->req.newurl = NULL; - - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; - } - data->change.referer = NULL; - - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - data->change.url = NULL; - - Curl_safefree(data->state.buffer); - Curl_safefree(data->state.headerbuff); - - Curl_flush_cookies(data, 1); - - Curl_digest_cleanup(data); - - Curl_safefree(data->info.contenttype); - Curl_safefree(data->info.wouldredirect); - - /* this destroys the channel and we cannot use it anymore after this */ - Curl_resolver_cleanup(data->state.resolver); - - Curl_http2_cleanup_dependencies(data); - Curl_convert_close(data); - - /* No longer a dirty share, if it exists */ - if(data->share) { - Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); - data->share->dirty--; - Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); - } - - if(data->set.wildcardmatch) { - /* destruct wildcard structures if it is needed */ - struct WildcardData *wc = &data->wildcard; - Curl_wildcard_dtor(wc); - } - - Curl_freeset(data); - free(data); - return CURLE_OK; -} - -/* - * Initialize the UserDefined fields within a Curl_easy. - * This may be safely called on a new or existing Curl_easy. - */ -CURLcode Curl_init_userdefined(struct UserDefined *set) -{ - CURLcode result = CURLE_OK; - - set->out = stdout; /* default output to stdout */ - set->in_set = stdin; /* default input from stdin */ - set->err = stderr; /* default stderr to stderr */ - - /* use fwrite as default function to store output */ - set->fwrite_func = (curl_write_callback)fwrite; - - /* use fread as default function to read input */ - set->fread_func_set = (curl_read_callback)fread; - set->is_fread_set = 0; - set->is_fwrite_set = 0; - - set->seek_func = ZERO_NULL; - set->seek_client = ZERO_NULL; - - /* conversion callbacks for non-ASCII hosts */ - set->convfromnetwork = ZERO_NULL; - set->convtonetwork = ZERO_NULL; - set->convfromutf8 = ZERO_NULL; - - set->filesize = -1; /* we don't know the size */ - set->postfieldsize = -1; /* unknown size */ - set->maxredirs = -1; /* allow any amount by default */ - - set->httpreq = HTTPREQ_GET; /* Default HTTP request */ - set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */ - set->ftp_use_epsv = TRUE; /* FTP defaults to EPSV operations */ - set->ftp_use_eprt = TRUE; /* FTP defaults to EPRT operations */ - set->ftp_use_pret = FALSE; /* mainly useful for drftpd servers */ - set->ftp_filemethod = FTPFILE_MULTICWD; - - set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */ - - /* Set the default size of the SSL session ID cache */ - set->general_ssl.max_ssl_sessions = 5; - - set->proxyport = 0; - set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */ - set->httpauth = CURLAUTH_BASIC; /* defaults to basic */ - set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */ - - /* make libcurl quiet by default: */ - set->hide_progress = TRUE; /* CURLOPT_NOPROGRESS changes these */ - - /* - * libcurl 7.10 introduced SSL verification *by default*! This needs to be - * switched off unless wanted. - */ - set->ssl.primary.verifypeer = TRUE; - set->ssl.primary.verifyhost = TRUE; -#ifdef USE_TLS_SRP - set->ssl.authtype = CURL_TLSAUTH_NONE; -#endif - set->ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth - type */ - set->general_ssl.sessionid = TRUE; /* session ID caching enabled by - default */ - set->proxy_ssl = set->ssl; - - set->new_file_perms = 0644; /* Default permissions */ - set->new_directory_perms = 0755; /* Default permissions */ - - /* for the *protocols fields we don't use the CURLPROTO_ALL convenience - define since we internally only use the lower 16 bits for the passed - in bitmask to not conflict with the private bits */ - set->allowed_protocols = CURLPROTO_ALL; - set->redir_protocols = CURLPROTO_ALL & /* All except FILE, SCP and SMB */ - ~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB | - CURLPROTO_SMBS); - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - /* - * disallow unprotected protection negotiation NEC reference implementation - * seem not to follow rfc1961 section 4.3/4.4 - */ - set->socks5_gssapi_nec = FALSE; -#endif - - /* This is our preferred CA cert bundle/path since install time */ -#if defined(CURL_CA_BUNDLE) - result = setstropt(&set->str[STRING_SSL_CAFILE_ORIG], CURL_CA_BUNDLE); - if(result) - return result; - - result = setstropt(&set->str[STRING_SSL_CAFILE_PROXY], CURL_CA_BUNDLE); - if(result) - return result; -#endif -#if defined(CURL_CA_PATH) - result = setstropt(&set->str[STRING_SSL_CAPATH_ORIG], CURL_CA_PATH); - if(result) - return result; - - result = setstropt(&set->str[STRING_SSL_CAPATH_PROXY], CURL_CA_PATH); - if(result) - return result; -#endif - - set->wildcardmatch = FALSE; - set->chunk_bgn = ZERO_NULL; - set->chunk_end = ZERO_NULL; - - /* tcp keepalives are disabled by default, but provide reasonable values for - * the interval and idle times. - */ - set->tcp_keepalive = FALSE; - set->tcp_keepintvl = 60; - set->tcp_keepidle = 60; - set->tcp_fastopen = FALSE; - set->tcp_nodelay = TRUE; - - set->ssl_enable_npn = TRUE; - set->ssl_enable_alpn = TRUE; - - set->expect_100_timeout = 1000L; /* Wait for a second by default. */ - set->sep_headers = TRUE; /* separated header lists by default */ - - Curl_http2_init_userset(set); - return result; -} - -/** - * Curl_open() - * - * @param curl is a pointer to a sessionhandle pointer that gets set by this - * function. - * @return CURLcode - */ - -CURLcode Curl_open(struct Curl_easy **curl) -{ - CURLcode result; - struct Curl_easy *data; - - /* Very simple start-up: alloc the struct, init it with zeroes and return */ - data = calloc(1, sizeof(struct Curl_easy)); - if(!data) { - /* this is a very serious error */ - DEBUGF(fprintf(stderr, "Error: calloc of Curl_easy failed\n")); - return CURLE_OUT_OF_MEMORY; - } - - data->magic = CURLEASY_MAGIC_NUMBER; - - result = Curl_resolver_init(&data->state.resolver); - if(result) { - DEBUGF(fprintf(stderr, "Error: resolver_init failed\n")); - free(data); - return result; - } - - /* We do some initial setup here, all those fields that can't be just 0 */ - - data->state.buffer = malloc(BUFSIZE + 1); - if(!data->state.buffer) { - DEBUGF(fprintf(stderr, "Error: malloc of buffer failed\n")); - result = CURLE_OUT_OF_MEMORY; - } - - data->state.headerbuff = malloc(HEADERSIZE); - if(!data->state.headerbuff) { - DEBUGF(fprintf(stderr, "Error: malloc of headerbuff failed\n")); - result = CURLE_OUT_OF_MEMORY; - } - else { - result = Curl_init_userdefined(&data->set); - - data->state.headersize=HEADERSIZE; - - Curl_convert_init(data); - - Curl_initinfo(data); - - /* most recent connection is not yet defined */ - data->state.lastconnect = NULL; - - data->progress.flags |= PGRS_HIDE; - data->state.current_speed = -1; /* init to negative == impossible */ - - data->wildcard.state = CURLWC_INIT; - data->wildcard.filelist = NULL; - data->set.fnmatch = ZERO_NULL; - data->set.maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */ - - Curl_http2_init_state(&data->state); - } - - if(result) { - Curl_resolver_cleanup(data->state.resolver); - free(data->state.buffer); - free(data->state.headerbuff); - Curl_freeset(data); - free(data); - data = NULL; - } - else - *curl = data; - - return result; -} - -CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, - va_list param) -{ - char *argptr; - CURLcode result = CURLE_OK; - long arg; -#ifndef CURL_DISABLE_HTTP - curl_off_t bigsize; -#endif - - switch(option) { - case CURLOPT_DNS_CACHE_TIMEOUT: - data->set.dns_cache_timeout = va_arg(param, long); - break; - case CURLOPT_DNS_USE_GLOBAL_CACHE: - /* remember we want this enabled */ - arg = va_arg(param, long); - data->set.global_dns_cache = (0 != arg) ? TRUE : FALSE; - break; - case CURLOPT_SSL_CIPHER_LIST: - /* set a list of cipher we want to use in the SSL connection */ - result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSL_CIPHER_LIST: - /* set a list of cipher we want to use in the SSL connection for proxy */ - result = setstropt(&data->set.str[STRING_SSL_CIPHER_LIST_PROXY], - va_arg(param, char *)); - break; - - case CURLOPT_RANDOM_FILE: - /* - * This is the path name to a file that contains random data to seed - * the random SSL stuff with. The file is only used for reading. - */ - result = setstropt(&data->set.str[STRING_SSL_RANDOM_FILE], - va_arg(param, char *)); - break; - case CURLOPT_EGDSOCKET: - /* - * The Entropy Gathering Daemon socket pathname - */ - result = setstropt(&data->set.str[STRING_SSL_EGDSOCKET], - va_arg(param, char *)); - break; - case CURLOPT_MAXCONNECTS: - /* - * Set the absolute number of maximum simultaneous alive connection that - * libcurl is allowed to have. - */ - data->set.maxconnects = va_arg(param, long); - break; - case CURLOPT_FORBID_REUSE: - /* - * When this transfer is done, it must not be left to be reused by a - * subsequent transfer but shall be closed immediately. - */ - data->set.reuse_forbid = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FRESH_CONNECT: - /* - * This transfer shall not use a previously cached connection but - * should be made with a fresh new connect! - */ - data->set.reuse_fresh = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_VERBOSE: - /* - * Verbose means infof() calls that give a lot of information about - * the connection and transfer procedures as well as internal choices. - */ - data->set.verbose = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_HEADER: - /* - * Set to include the header in the general data output stream. - */ - data->set.include_header = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_NOPROGRESS: - /* - * Shut off the internal supported progress meter - */ - data->set.hide_progress = (0 != va_arg(param, long)) ? TRUE : FALSE; - if(data->set.hide_progress) - data->progress.flags |= PGRS_HIDE; - else - data->progress.flags &= ~PGRS_HIDE; - break; - case CURLOPT_NOBODY: - /* - * Do not include the body part in the output data stream. - */ - data->set.opt_no_body = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FAILONERROR: - /* - * Don't output the >=400 error code HTML-page, but instead only - * return error. - */ - data->set.http_fail_on_error = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_KEEP_SENDING_ON_ERROR: - data->set.http_keep_sending_on_error = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - case CURLOPT_UPLOAD: - case CURLOPT_PUT: - /* - * We want to sent data to the remote host. If this is HTTP, that equals - * using the PUT request. - */ - data->set.upload = (0 != va_arg(param, long)) ? TRUE : FALSE; - if(data->set.upload) { - /* If this is HTTP, PUT is what's needed to "upload" */ - data->set.httpreq = HTTPREQ_PUT; - data->set.opt_no_body = FALSE; /* this is implied */ - } - else - /* In HTTP, the opposite of upload is GET (unless NOBODY is true as - then this can be changed to HEAD later on) */ - data->set.httpreq = HTTPREQ_GET; - break; - case CURLOPT_FILETIME: - /* - * Try to get the file time of the remote document. The time will - * later (possibly) become available using curl_easy_getinfo(). - */ - data->set.get_filetime = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FTP_CREATE_MISSING_DIRS: - /* - * An FTP option that modifies an upload to create missing directories on - * the server. - */ - switch(va_arg(param, long)) { - case 0: - data->set.ftp_create_missing_dirs = 0; - break; - case 1: - data->set.ftp_create_missing_dirs = 1; - break; - case 2: - data->set.ftp_create_missing_dirs = 2; - break; - default: - /* reserve other values for future use */ - result = CURLE_UNKNOWN_OPTION; - break; - } - break; - case CURLOPT_SERVER_RESPONSE_TIMEOUT: - /* - * Option that specifies how quickly an server response must be obtained - * before it is considered failure. For pingpong protocols. - */ - data->set.server_response_timeout = va_arg(param, long) * 1000; - break; - case CURLOPT_TFTP_NO_OPTIONS: - /* - * Option that prevents libcurl from sending TFTP option requests to the - * server. - */ - data->set.tftp_no_options = va_arg(param, long) != 0; - break; - case CURLOPT_TFTP_BLKSIZE: - /* - * TFTP option that specifies the block size to use for data transmission. - */ - data->set.tftp_blksize = va_arg(param, long); - break; - case CURLOPT_DIRLISTONLY: - /* - * An option that changes the command to one that asks for a list - * only, no file info details. - */ - data->set.ftp_list_only = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_APPEND: - /* - * We want to upload and append to an existing file. - */ - data->set.ftp_append = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_FTP_FILEMETHOD: - /* - * How do access files over FTP. - */ - data->set.ftp_filemethod = (curl_ftpfile)va_arg(param, long); - break; - case CURLOPT_NETRC: - /* - * Parse the $HOME/.netrc file - */ - data->set.use_netrc = (enum CURL_NETRC_OPTION)va_arg(param, long); - break; - case CURLOPT_NETRC_FILE: - /* - * Use this file instead of the $HOME/.netrc file - */ - result = setstropt(&data->set.str[STRING_NETRC_FILE], - va_arg(param, char *)); - break; - case CURLOPT_TRANSFERTEXT: - /* - * This option was previously named 'FTPASCII'. Renamed to work with - * more protocols than merely FTP. - * - * Transfer using ASCII (instead of BINARY). - */ - data->set.prefer_ascii = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_TIMECONDITION: - /* - * Set HTTP time condition. This must be one of the defines in the - * curl/curl.h header file. - */ - data->set.timecondition = (curl_TimeCond)va_arg(param, long); - break; - case CURLOPT_TIMEVALUE: - /* - * This is the value to compare with the remote document with the - * method set with CURLOPT_TIMECONDITION - */ - data->set.timevalue = (time_t)va_arg(param, long); - break; - case CURLOPT_SSLVERSION: - /* - * Set explicit SSL version to try to connect with, as some SSL - * implementations are lame. - */ -#ifdef USE_SSL - data->set.ssl.primary.version = va_arg(param, long); -#else - result = CURLE_UNKNOWN_OPTION; -#endif - break; - case CURLOPT_PROXY_SSLVERSION: - /* - * Set explicit SSL version to try to connect with for proxy, as some SSL - * implementations are lame. - */ -#ifdef USE_SSL - data->set.proxy_ssl.primary.version = va_arg(param, long); -#else - result = CURLE_UNKNOWN_OPTION; -#endif - break; - -#ifndef CURL_DISABLE_HTTP - case CURLOPT_AUTOREFERER: - /* - * Switch on automatic referer that gets set if curl follows locations. - */ - data->set.http_auto_referer = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_ACCEPT_ENCODING: - /* - * String to use at the value of Accept-Encoding header. - * - * If the encoding is set to "" we use an Accept-Encoding header that - * encompasses all the encodings we support. - * If the encoding is set to NULL we don't send an Accept-Encoding header - * and ignore an received Content-Encoding header. - * - */ - argptr = va_arg(param, char *); - result = setstropt(&data->set.str[STRING_ENCODING], - (argptr && !*argptr)? - ALL_CONTENT_ENCODINGS: argptr); - break; - - case CURLOPT_TRANSFER_ENCODING: - data->set.http_transfer_encoding = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - - case CURLOPT_FOLLOWLOCATION: - /* - * Follow Location: header hints on a HTTP-server. - */ - data->set.http_follow_location = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_UNRESTRICTED_AUTH: - /* - * Send authentication (user+password) when following locations, even when - * hostname changed. - */ - data->set.http_disable_hostname_check_before_authentication = - (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_MAXREDIRS: - /* - * The maximum amount of hops you allow curl to follow Location: - * headers. This should mostly be used to detect never-ending loops. - */ - data->set.maxredirs = va_arg(param, long); - break; - - case CURLOPT_POSTREDIR: - { - /* - * Set the behaviour of POST when redirecting - * CURL_REDIR_GET_ALL - POST is changed to GET after 301 and 302 - * CURL_REDIR_POST_301 - POST is kept as POST after 301 - * CURL_REDIR_POST_302 - POST is kept as POST after 302 - * CURL_REDIR_POST_303 - POST is kept as POST after 303 - * CURL_REDIR_POST_ALL - POST is kept as POST after 301, 302 and 303 - * other - POST is kept as POST after 301 and 302 - */ - int postRedir = curlx_sltosi(va_arg(param, long)); - data->set.keep_post = postRedir & CURL_REDIR_POST_ALL; - } - break; - - case CURLOPT_POST: - /* Does this option serve a purpose anymore? Yes it does, when - CURLOPT_POSTFIELDS isn't used and the POST data is read off the - callback! */ - if(va_arg(param, long)) { - data->set.httpreq = HTTPREQ_POST; - data->set.opt_no_body = FALSE; /* this is implied */ - } - else - data->set.httpreq = HTTPREQ_GET; - break; - - case CURLOPT_COPYPOSTFIELDS: - /* - * A string with POST data. Makes curl HTTP POST. Even if it is NULL. - * If needed, CURLOPT_POSTFIELDSIZE must have been set prior to - * CURLOPT_COPYPOSTFIELDS and not altered later. - */ - argptr = va_arg(param, char *); - - if(!argptr || data->set.postfieldsize == -1) - result = setstropt(&data->set.str[STRING_COPYPOSTFIELDS], argptr); - else { - /* - * Check that requested length does not overflow the size_t type. - */ - - if((data->set.postfieldsize < 0) || - ((sizeof(curl_off_t) != sizeof(size_t)) && - (data->set.postfieldsize > (curl_off_t)((size_t)-1)))) - result = CURLE_OUT_OF_MEMORY; - else { - char *p; - - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - - /* Allocate even when size == 0. This satisfies the need of possible - later address compare to detect the COPYPOSTFIELDS mode, and - to mark that postfields is used rather than read function or - form data. - */ - p = malloc((size_t)(data->set.postfieldsize? - data->set.postfieldsize:1)); - - if(!p) - result = CURLE_OUT_OF_MEMORY; - else { - if(data->set.postfieldsize) - memcpy(p, argptr, (size_t)data->set.postfieldsize); - - data->set.str[STRING_COPYPOSTFIELDS] = p; - } - } - } - - data->set.postfields = data->set.str[STRING_COPYPOSTFIELDS]; - data->set.httpreq = HTTPREQ_POST; - break; - - case CURLOPT_POSTFIELDS: - /* - * Like above, but use static data instead of copying it. - */ - data->set.postfields = va_arg(param, void *); - /* Release old copied data. */ - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - data->set.httpreq = HTTPREQ_POST; - break; - - case CURLOPT_POSTFIELDSIZE: - /* - * The size of the POSTFIELD data to prevent libcurl to do strlen() to - * figure it out. Enables binary posts. - */ - bigsize = va_arg(param, long); - - if(data->set.postfieldsize < bigsize && - data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { - /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */ - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - data->set.postfields = NULL; - } - - data->set.postfieldsize = bigsize; - break; - - case CURLOPT_POSTFIELDSIZE_LARGE: - /* - * The size of the POSTFIELD data to prevent libcurl to do strlen() to - * figure it out. Enables binary posts. - */ - bigsize = va_arg(param, curl_off_t); - - if(data->set.postfieldsize < bigsize && - data->set.postfields == data->set.str[STRING_COPYPOSTFIELDS]) { - /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */ - (void) setstropt(&data->set.str[STRING_COPYPOSTFIELDS], NULL); - data->set.postfields = NULL; - } - - data->set.postfieldsize = bigsize; - break; - - case CURLOPT_HTTPPOST: - /* - * Set to make us do HTTP POST - */ - data->set.httppost = va_arg(param, struct curl_httppost *); - data->set.httpreq = HTTPREQ_POST_FORM; - data->set.opt_no_body = FALSE; /* this is implied */ - break; - - case CURLOPT_REFERER: - /* - * String to set in the HTTP Referer: field. - */ - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; - } - result = setstropt(&data->set.str[STRING_SET_REFERER], - va_arg(param, char *)); - data->change.referer = data->set.str[STRING_SET_REFERER]; - break; - - case CURLOPT_USERAGENT: - /* - * String to use in the HTTP User-Agent field - */ - result = setstropt(&data->set.str[STRING_USERAGENT], - va_arg(param, char *)); - break; - - case CURLOPT_HTTPHEADER: - /* - * Set a list with HTTP headers to use (or replace internals with) - */ - data->set.headers = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_PROXYHEADER: - /* - * Set a list with proxy headers to use (or replace internals with) - * - * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a - * long time we remain doing it this way until CURLOPT_PROXYHEADER is - * used. As soon as this option has been used, if set to anything but - * NULL, custom headers for proxies are only picked from this list. - * - * Set this option to NULL to restore the previous behavior. - */ - data->set.proxyheaders = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_HEADEROPT: - /* - * Set header option. - */ - arg = va_arg(param, long); - data->set.sep_headers = (arg & CURLHEADER_SEPARATE)? TRUE: FALSE; - break; - - case CURLOPT_HTTP200ALIASES: - /* - * Set a list of aliases for HTTP 200 in response header - */ - data->set.http200aliases = va_arg(param, struct curl_slist *); - break; - -#if !defined(CURL_DISABLE_COOKIES) - case CURLOPT_COOKIE: - /* - * Cookie string to send to the remote server in the request. - */ - result = setstropt(&data->set.str[STRING_COOKIE], - va_arg(param, char *)); - break; - - case CURLOPT_COOKIEFILE: - /* - * Set cookie file to read and parse. Can be used multiple times. - */ - argptr = (char *)va_arg(param, void *); - if(argptr) { - struct curl_slist *cl; - /* append the cookie file name to the list of file names, and deal with - them later */ - cl = curl_slist_append(data->change.cookielist, argptr); - if(!cl) { - curl_slist_free_all(data->change.cookielist); - data->change.cookielist = NULL; - return CURLE_OUT_OF_MEMORY; - } - data->change.cookielist = cl; /* store the list for later use */ - } - break; - - case CURLOPT_COOKIEJAR: - /* - * Set cookie file name to dump all cookies to when we're done. - */ - { - struct CookieInfo *newcookies; - result = setstropt(&data->set.str[STRING_COOKIEJAR], - va_arg(param, char *)); - - /* - * Activate the cookie parser. This may or may not already - * have been made. - */ - newcookies = Curl_cookie_init(data, NULL, data->cookies, - data->set.cookiesession); - if(!newcookies) - result = CURLE_OUT_OF_MEMORY; - data->cookies = newcookies; - } - break; - - case CURLOPT_COOKIESESSION: - /* - * Set this option to TRUE to start a new "cookie session". It will - * prevent the forthcoming read-cookies-from-file actions to accept - * cookies that are marked as being session cookies, as they belong to a - * previous session. - * - * In the original Netscape cookie spec, "session cookies" are cookies - * with no expire date set. RFC2109 describes the same action if no - * 'Max-Age' is set and RFC2965 includes the RFC2109 description and adds - * a 'Discard' action that can enforce the discard even for cookies that - * have a Max-Age. - * - * We run mostly with the original cookie spec, as hardly anyone implements - * anything else. - */ - data->set.cookiesession = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_COOKIELIST: - argptr = va_arg(param, char *); - - if(argptr == NULL) - break; - - if(strcasecompare(argptr, "ALL")) { - /* clear all cookies */ - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - Curl_cookie_clearall(data->cookies); - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } - else if(strcasecompare(argptr, "SESS")) { - /* clear session cookies */ - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - Curl_cookie_clearsess(data->cookies); - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - } - else if(strcasecompare(argptr, "FLUSH")) { - /* flush cookies to file, takes care of the locking */ - Curl_flush_cookies(data, 0); - } - else if(strcasecompare(argptr, "RELOAD")) { - /* reload cookies from file */ - Curl_cookie_loadfiles(data); - break; - } - else { - if(!data->cookies) - /* if cookie engine was not running, activate it */ - data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE); - - argptr = strdup(argptr); - if(!argptr || !data->cookies) { - result = CURLE_OUT_OF_MEMORY; - free(argptr); - } - else { - Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); - - if(checkprefix("Set-Cookie:", argptr)) - /* HTTP Header format line */ - Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL); - - else - /* Netscape format line */ - Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL); - - Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); - free(argptr); - } - } - - break; -#endif /* CURL_DISABLE_COOKIES */ - - case CURLOPT_HTTPGET: - /* - * Set to force us do HTTP GET - */ - if(va_arg(param, long)) { - data->set.httpreq = HTTPREQ_GET; - data->set.upload = FALSE; /* switch off upload */ - data->set.opt_no_body = FALSE; /* this is implied */ - } - break; - - case CURLOPT_HTTP_VERSION: - /* - * This sets a requested HTTP version to be used. The value is one of - * the listed enums in curl/curl.h. - */ - arg = va_arg(param, long); -#ifndef USE_NGHTTP2 - if(arg >= CURL_HTTP_VERSION_2) - return CURLE_UNSUPPORTED_PROTOCOL; -#endif - data->set.httpversion = arg; - break; - - case CURLOPT_HTTPAUTH: - /* - * Set HTTP Authentication type BITMASK. - */ - { - int bitcheck; - bool authbits; - unsigned long auth = va_arg(param, unsigned long); - - if(auth == CURLAUTH_NONE) { - data->set.httpauth = auth; - break; - } - - /* the DIGEST_IE bit is only used to set a special marker, for all the - rest we need to handle it as normal DIGEST */ - data->state.authhost.iestyle = (auth & CURLAUTH_DIGEST_IE) ? TRUE : FALSE; - - if(auth & CURLAUTH_DIGEST_IE) { - auth |= CURLAUTH_DIGEST; /* set standard digest bit */ - auth &= ~CURLAUTH_DIGEST_IE; /* unset ie digest bit */ - } - - /* switch off bits we can't support */ -#ifndef USE_NTLM - auth &= ~CURLAUTH_NTLM; /* no NTLM support */ - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#elif !defined(NTLM_WB_ENABLED) - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#endif -#ifndef USE_SPNEGO - auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without - GSS-API or SSPI */ -#endif - - /* check if any auth bit lower than CURLAUTH_ONLY is still set */ - bitcheck = 0; - authbits = FALSE; - while(bitcheck < 31) { - if(auth & (1UL << bitcheck++)) { - authbits = TRUE; - break; - } - } - if(!authbits) - return CURLE_NOT_BUILT_IN; /* no supported types left! */ - - data->set.httpauth = auth; - } - break; - - case CURLOPT_EXPECT_100_TIMEOUT_MS: - /* - * Time to wait for a response to a HTTP request containing an - * Expect: 100-continue header before sending the data anyway. - */ - data->set.expect_100_timeout = va_arg(param, long); - break; - -#endif /* CURL_DISABLE_HTTP */ - - case CURLOPT_CUSTOMREQUEST: - /* - * Set a custom string to use as request - */ - result = setstropt(&data->set.str[STRING_CUSTOMREQUEST], - va_arg(param, char *)); - - /* we don't set - data->set.httpreq = HTTPREQ_CUSTOM; - here, we continue as if we were using the already set type - and this just changes the actual request keyword */ - break; - -#ifndef CURL_DISABLE_PROXY - case CURLOPT_HTTPPROXYTUNNEL: - /* - * Tunnel operations through the proxy instead of normal proxy use - */ - data->set.tunnel_thru_httpproxy = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - - case CURLOPT_PROXYPORT: - /* - * Explicitly set HTTP proxy port number. - */ - data->set.proxyport = va_arg(param, long); - break; - - case CURLOPT_PROXYAUTH: - /* - * Set HTTP Authentication type BITMASK. - */ - { - int bitcheck; - bool authbits; - unsigned long auth = va_arg(param, unsigned long); - - if(auth == CURLAUTH_NONE) { - data->set.proxyauth = auth; - break; - } - - /* the DIGEST_IE bit is only used to set a special marker, for all the - rest we need to handle it as normal DIGEST */ - data->state.authproxy.iestyle = (auth & CURLAUTH_DIGEST_IE) ? TRUE : FALSE; - - if(auth & CURLAUTH_DIGEST_IE) { - auth |= CURLAUTH_DIGEST; /* set standard digest bit */ - auth &= ~CURLAUTH_DIGEST_IE; /* unset ie digest bit */ - } - /* switch off bits we can't support */ -#ifndef USE_NTLM - auth &= ~CURLAUTH_NTLM; /* no NTLM support */ - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#elif !defined(NTLM_WB_ENABLED) - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ -#endif -#ifndef USE_SPNEGO - auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without - GSS-API or SSPI */ -#endif - - /* check if any auth bit lower than CURLAUTH_ONLY is still set */ - bitcheck = 0; - authbits = FALSE; - while(bitcheck < 31) { - if(auth & (1UL << bitcheck++)) { - authbits = TRUE; - break; - } - } - if(!authbits) - return CURLE_NOT_BUILT_IN; /* no supported types left! */ - - data->set.proxyauth = auth; - } - break; - - case CURLOPT_PROXY: - /* - * Set proxy server:port to use as proxy. - * - * If the proxy is set to "" (and CURLOPT_SOCKS_PROXY is set to "" or NULL) - * we explicitly say that we don't want to use a proxy - * (even though there might be environment variables saying so). - * - * Setting it to NULL, means no proxy but allows the environment variables - * to decide for us (if CURLOPT_SOCKS_PROXY setting it to NULL). - */ - result = setstropt(&data->set.str[STRING_PROXY], - va_arg(param, char *)); - break; - - case CURLOPT_PRE_PROXY: - /* - * Set proxy server:port to use as SOCKS proxy. - * - * If the proxy is set to "" or NULL we explicitly say that we don't want - * to use the socks proxy. - */ - result = setstropt(&data->set.str[STRING_PRE_PROXY], - va_arg(param, char *)); - break; - - case CURLOPT_PROXYTYPE: - /* - * Set proxy type. HTTP/HTTP_1_0/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME - */ - data->set.proxytype = (curl_proxytype)va_arg(param, long); - break; - - case CURLOPT_PROXY_TRANSFER_MODE: - /* - * set transfer mode (;type=) when doing FTP via an HTTP proxy - */ - switch(va_arg(param, long)) { - case 0: - data->set.proxy_transfer_mode = FALSE; - break; - case 1: - data->set.proxy_transfer_mode = TRUE; - break; - default: - /* reserve other values for future use */ - result = CURLE_UNKNOWN_OPTION; - break; - } - break; -#endif /* CURL_DISABLE_PROXY */ - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - case CURLOPT_SOCKS5_GSSAPI_NEC: - /* - * Set flag for NEC SOCK5 support - */ - data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_SOCKS5_GSSAPI_SERVICE: - case CURLOPT_PROXY_SERVICE_NAME: - /* - * Set proxy authentication service name for Kerberos 5 and SPNEGO - */ - result = setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME], - va_arg(param, char *)); - break; -#endif - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ - defined(USE_SPNEGO) - case CURLOPT_SERVICE_NAME: - /* - * Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO - */ - result = setstropt(&data->set.str[STRING_SERVICE_NAME], - va_arg(param, char *)); - break; - -#endif - - case CURLOPT_HEADERDATA: - /* - * Custom pointer to pass the header write callback function - */ - data->set.writeheader = (void *)va_arg(param, void *); - break; - case CURLOPT_ERRORBUFFER: - /* - * Error buffer provided by the caller to get the human readable - * error string in. - */ - data->set.errorbuffer = va_arg(param, char *); - break; - case CURLOPT_WRITEDATA: - /* - * FILE pointer to write to. Or possibly - * used as argument to the write callback. - */ - data->set.out = va_arg(param, void *); - break; - case CURLOPT_FTPPORT: - /* - * Use FTP PORT, this also specifies which IP address to use - */ - result = setstropt(&data->set.str[STRING_FTPPORT], - va_arg(param, char *)); - data->set.ftp_use_port = (data->set.str[STRING_FTPPORT]) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_USE_EPRT: - data->set.ftp_use_eprt = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_USE_EPSV: - data->set.ftp_use_epsv = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_USE_PRET: - data->set.ftp_use_pret = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_SSL_CCC: - data->set.ftp_ccc = (curl_ftpccc)va_arg(param, long); - break; - - case CURLOPT_FTP_SKIP_PASV_IP: - /* - * Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the - * bypass of the IP address in PASV responses. - */ - data->set.ftp_skip_ip = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_READDATA: - /* - * FILE pointer to read the file to be uploaded from. Or possibly - * used as argument to the read callback. - */ - data->set.in_set = va_arg(param, void *); - break; - case CURLOPT_INFILESIZE: - /* - * If known, this should inform curl about the file size of the - * to-be-uploaded file. - */ - data->set.filesize = va_arg(param, long); - break; - case CURLOPT_INFILESIZE_LARGE: - /* - * If known, this should inform curl about the file size of the - * to-be-uploaded file. - */ - data->set.filesize = va_arg(param, curl_off_t); - break; - case CURLOPT_LOW_SPEED_LIMIT: - /* - * The low speed limit that if transfers are below this for - * CURLOPT_LOW_SPEED_TIME, the transfer is aborted. - */ - data->set.low_speed_limit=va_arg(param, long); - break; - case CURLOPT_MAX_SEND_SPEED_LARGE: - /* - * When transfer uploads are faster then CURLOPT_MAX_SEND_SPEED_LARGE - * bytes per second the transfer is throttled.. - */ - data->set.max_send_speed=va_arg(param, curl_off_t); - break; - case CURLOPT_MAX_RECV_SPEED_LARGE: - /* - * When receiving data faster than CURLOPT_MAX_RECV_SPEED_LARGE bytes per - * second the transfer is throttled.. - */ - data->set.max_recv_speed=va_arg(param, curl_off_t); - break; - case CURLOPT_LOW_SPEED_TIME: - /* - * The low speed time that if transfers are below the set - * CURLOPT_LOW_SPEED_LIMIT during this time, the transfer is aborted. - */ - data->set.low_speed_time=va_arg(param, long); - break; - case CURLOPT_URL: - /* - * The URL to fetch. - */ - if(data->change.url_alloc) { - /* the already set URL is allocated, free it first! */ - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - result = setstropt(&data->set.str[STRING_SET_URL], - va_arg(param, char *)); - data->change.url = data->set.str[STRING_SET_URL]; - break; - case CURLOPT_PORT: - /* - * The port number to use when getting the URL - */ - data->set.use_port = va_arg(param, long); - break; - case CURLOPT_TIMEOUT: - /* - * The maximum time you allow curl to use for a single transfer - * operation. - */ - data->set.timeout = va_arg(param, long) * 1000L; - break; - - case CURLOPT_TIMEOUT_MS: - data->set.timeout = va_arg(param, long); - break; - - case CURLOPT_CONNECTTIMEOUT: - /* - * The maximum time you allow curl to use to connect. - */ - data->set.connecttimeout = va_arg(param, long) * 1000L; - break; - - case CURLOPT_CONNECTTIMEOUT_MS: - data->set.connecttimeout = va_arg(param, long); - break; - - case CURLOPT_ACCEPTTIMEOUT_MS: - /* - * The maximum time you allow curl to wait for server connect - */ - data->set.accepttimeout = va_arg(param, long); - break; - - case CURLOPT_USERPWD: - /* - * user:password to use in the operation - */ - result = setstropt_userpwd(va_arg(param, char *), - &data->set.str[STRING_USERNAME], - &data->set.str[STRING_PASSWORD]); - break; - - case CURLOPT_USERNAME: - /* - * authentication user name to use in the operation - */ - result = setstropt(&data->set.str[STRING_USERNAME], - va_arg(param, char *)); - break; - - case CURLOPT_PASSWORD: - /* - * authentication password to use in the operation - */ - result = setstropt(&data->set.str[STRING_PASSWORD], - va_arg(param, char *)); - break; - - case CURLOPT_LOGIN_OPTIONS: - /* - * authentication options to use in the operation - */ - result = setstropt(&data->set.str[STRING_OPTIONS], - va_arg(param, char *)); - break; - - case CURLOPT_XOAUTH2_BEARER: - /* - * OAuth 2.0 bearer token to use in the operation - */ - result = setstropt(&data->set.str[STRING_BEARER], - va_arg(param, char *)); - break; - - case CURLOPT_POSTQUOTE: - /* - * List of RAW FTP commands to use after a transfer - */ - data->set.postquote = va_arg(param, struct curl_slist *); - break; - case CURLOPT_PREQUOTE: - /* - * List of RAW FTP commands to use prior to RETR (Wesley Laxton) - */ - data->set.prequote = va_arg(param, struct curl_slist *); - break; - case CURLOPT_QUOTE: - /* - * List of RAW FTP commands to use before a transfer - */ - data->set.quote = va_arg(param, struct curl_slist *); - break; - case CURLOPT_RESOLVE: - /* - * List of NAME:[address] names to populate the DNS cache with - * Prefix the NAME with dash (-) to _remove_ the name from the cache. - * - * Names added with this API will remain in the cache until explicitly - * removed or the handle is cleaned up. - * - * This API can remove any name from the DNS cache, but only entries - * that aren't actually in use right now will be pruned immediately. - */ - data->set.resolve = va_arg(param, struct curl_slist *); - data->change.resolve = data->set.resolve; - break; - case CURLOPT_PROGRESSFUNCTION: - /* - * Progress callback function - */ - data->set.fprogress = va_arg(param, curl_progress_callback); - if(data->set.fprogress) - data->progress.callback = TRUE; /* no longer internal */ - else - data->progress.callback = FALSE; /* NULL enforces internal */ - break; - - case CURLOPT_XFERINFOFUNCTION: - /* - * Transfer info callback function - */ - data->set.fxferinfo = va_arg(param, curl_xferinfo_callback); - if(data->set.fxferinfo) - data->progress.callback = TRUE; /* no longer internal */ - else - data->progress.callback = FALSE; /* NULL enforces internal */ - - break; - - case CURLOPT_PROGRESSDATA: - /* - * Custom client data to pass to the progress callback - */ - data->set.progress_client = va_arg(param, void *); - break; - -#ifndef CURL_DISABLE_PROXY - case CURLOPT_PROXYUSERPWD: - /* - * user:password needed to use the proxy - */ - result = setstropt_userpwd(va_arg(param, char *), - &data->set.str[STRING_PROXYUSERNAME], - &data->set.str[STRING_PROXYPASSWORD]); - break; - case CURLOPT_PROXYUSERNAME: - /* - * authentication user name to use in the operation - */ - result = setstropt(&data->set.str[STRING_PROXYUSERNAME], - va_arg(param, char *)); - break; - case CURLOPT_PROXYPASSWORD: - /* - * authentication password to use in the operation - */ - result = setstropt(&data->set.str[STRING_PROXYPASSWORD], - va_arg(param, char *)); - break; - case CURLOPT_NOPROXY: - /* - * proxy exception list - */ - result = setstropt(&data->set.str[STRING_NOPROXY], - va_arg(param, char *)); - break; -#endif - - case CURLOPT_RANGE: - /* - * What range of the file you want to transfer - */ - result = setstropt(&data->set.str[STRING_SET_RANGE], - va_arg(param, char *)); - break; - case CURLOPT_RESUME_FROM: - /* - * Resume transfer at the give file position - */ - data->set.set_resume_from = va_arg(param, long); - break; - case CURLOPT_RESUME_FROM_LARGE: - /* - * Resume transfer at the give file position - */ - data->set.set_resume_from = va_arg(param, curl_off_t); - break; - case CURLOPT_DEBUGFUNCTION: - /* - * stderr write callback. - */ - data->set.fdebug = va_arg(param, curl_debug_callback); - /* - * if the callback provided is NULL, it'll use the default callback - */ - break; - case CURLOPT_DEBUGDATA: - /* - * Set to a void * that should receive all error writes. This - * defaults to CURLOPT_STDERR for normal operations. - */ - data->set.debugdata = va_arg(param, void *); - break; - case CURLOPT_STDERR: - /* - * Set to a FILE * that should receive all error writes. This - * defaults to stderr for normal operations. - */ - data->set.err = va_arg(param, FILE *); - if(!data->set.err) - data->set.err = stderr; - break; - case CURLOPT_HEADERFUNCTION: - /* - * Set header write callback - */ - data->set.fwrite_header = va_arg(param, curl_write_callback); - break; - case CURLOPT_WRITEFUNCTION: - /* - * Set data write callback - */ - data->set.fwrite_func = va_arg(param, curl_write_callback); - if(!data->set.fwrite_func) { - data->set.is_fwrite_set = 0; - /* When set to NULL, reset to our internal default function */ - data->set.fwrite_func = (curl_write_callback)fwrite; - } - else - data->set.is_fwrite_set = 1; - break; - case CURLOPT_READFUNCTION: - /* - * Read data callback - */ - data->set.fread_func_set = va_arg(param, curl_read_callback); - if(!data->set.fread_func_set) { - data->set.is_fread_set = 0; - /* When set to NULL, reset to our internal default function */ - data->set.fread_func_set = (curl_read_callback)fread; - } - else - data->set.is_fread_set = 1; - break; - case CURLOPT_SEEKFUNCTION: - /* - * Seek callback. Might be NULL. - */ - data->set.seek_func = va_arg(param, curl_seek_callback); - break; - case CURLOPT_SEEKDATA: - /* - * Seek control callback. Might be NULL. - */ - data->set.seek_client = va_arg(param, void *); - break; - case CURLOPT_CONV_FROM_NETWORK_FUNCTION: - /* - * "Convert from network encoding" callback - */ - data->set.convfromnetwork = va_arg(param, curl_conv_callback); - break; - case CURLOPT_CONV_TO_NETWORK_FUNCTION: - /* - * "Convert to network encoding" callback - */ - data->set.convtonetwork = va_arg(param, curl_conv_callback); - break; - case CURLOPT_CONV_FROM_UTF8_FUNCTION: - /* - * "Convert from UTF-8 encoding" callback - */ - data->set.convfromutf8 = va_arg(param, curl_conv_callback); - break; - case CURLOPT_IOCTLFUNCTION: - /* - * I/O control callback. Might be NULL. - */ - data->set.ioctl_func = va_arg(param, curl_ioctl_callback); - break; - case CURLOPT_IOCTLDATA: - /* - * I/O control data pointer. Might be NULL. - */ - data->set.ioctl_client = va_arg(param, void *); - break; - case CURLOPT_SSLCERT: - /* - * String that holds file name of the SSL certificate to use - */ - result = setstropt(&data->set.str[STRING_CERT_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLCERT: - /* - * String that holds file name of the SSL certificate to use for proxy - */ - result = setstropt(&data->set.str[STRING_CERT_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLCERTTYPE: - /* - * String that holds file type of the SSL certificate to use - */ - result = setstropt(&data->set.str[STRING_CERT_TYPE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLCERTTYPE: - /* - * String that holds file type of the SSL certificate to use for proxy - */ - result = setstropt(&data->set.str[STRING_CERT_TYPE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLKEY: - /* - * String that holds file name of the SSL key to use - */ - result = setstropt(&data->set.str[STRING_KEY_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLKEY: - /* - * String that holds file name of the SSL key to use for proxy - */ - result = setstropt(&data->set.str[STRING_KEY_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLKEYTYPE: - /* - * String that holds file type of the SSL key to use - */ - result = setstropt(&data->set.str[STRING_KEY_TYPE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_SSLKEYTYPE: - /* - * String that holds file type of the SSL key to use for proxy - */ - result = setstropt(&data->set.str[STRING_KEY_TYPE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_KEYPASSWD: - /* - * String that holds the SSL or SSH private key password. - */ - result = setstropt(&data->set.str[STRING_KEY_PASSWD_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_KEYPASSWD: - /* - * String that holds the SSL private key password for proxy. - */ - result = setstropt(&data->set.str[STRING_KEY_PASSWD_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_SSLENGINE: - /* - * String that holds the SSL crypto engine. - */ - argptr = va_arg(param, char *); - if(argptr && argptr[0]) - result = Curl_ssl_set_engine(data, argptr); - break; - - case CURLOPT_SSLENGINE_DEFAULT: - /* - * flag to set engine as default. - */ - result = Curl_ssl_set_engine_default(data); - break; - case CURLOPT_CRLF: - /* - * Kludgy option to enable CRLF conversions. Subject for removal. - */ - data->set.crlf = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_INTERFACE: - /* - * Set what interface or address/hostname to bind the socket to when - * performing an operation and thus what from-IP your connection will use. - */ - result = setstropt(&data->set.str[STRING_DEVICE], - va_arg(param, char *)); - break; - case CURLOPT_LOCALPORT: - /* - * Set what local port to bind the socket to when performing an operation. - */ - data->set.localport = curlx_sltous(va_arg(param, long)); - break; - case CURLOPT_LOCALPORTRANGE: - /* - * Set number of local ports to try, starting with CURLOPT_LOCALPORT. - */ - data->set.localportrange = curlx_sltosi(va_arg(param, long)); - break; - case CURLOPT_KRBLEVEL: - /* - * A string that defines the kerberos security level. - */ - result = setstropt(&data->set.str[STRING_KRB_LEVEL], - va_arg(param, char *)); - data->set.krb = (data->set.str[STRING_KRB_LEVEL]) ? TRUE : FALSE; - break; - case CURLOPT_GSSAPI_DELEGATION: - /* - * GSS-API credential delegation - */ - data->set.gssapi_delegation = va_arg(param, long); - break; - case CURLOPT_SSL_VERIFYPEER: - /* - * Enable peer SSL verifying. - */ - data->set.ssl.primary.verifypeer = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - case CURLOPT_PROXY_SSL_VERIFYPEER: - /* - * Enable peer SSL verifying for proxy. - */ - data->set.proxy_ssl.primary.verifypeer = - (0 != va_arg(param, long))?TRUE:FALSE; - break; - case CURLOPT_SSL_VERIFYHOST: - /* - * Enable verification of the host name in the peer certificate - */ - arg = va_arg(param, long); - - /* Obviously people are not reading documentation and too many thought - this argument took a boolean when it wasn't and misused it. We thus ban - 1 as a sensible input and we warn about its use. Then we only have the - 2 action internally stored as TRUE. */ - - if(1 == arg) { - failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - data->set.ssl.primary.verifyhost = (0 != arg) ? TRUE : FALSE; - break; - case CURLOPT_PROXY_SSL_VERIFYHOST: - /* - * Enable verification of the host name in the peer certificate for proxy - */ - arg = va_arg(param, long); - - /* Obviously people are not reading documentation and too many thought - this argument took a boolean when it wasn't and misused it. We thus ban - 1 as a sensible input and we warn about its use. Then we only have the - 2 action internally stored as TRUE. */ - - if(1 == arg) { - failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - - data->set.proxy_ssl.primary.verifyhost = (0 != arg)?TRUE:FALSE; - break; - case CURLOPT_SSL_VERIFYSTATUS: - /* - * Enable certificate status verifying. - */ - if(!Curl_ssl_cert_status_request()) { - result = CURLE_NOT_BUILT_IN; - break; - } - - data->set.ssl.primary.verifystatus = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - case CURLOPT_SSL_CTX_FUNCTION: -#ifdef have_curlssl_ssl_ctx - /* - * Set a SSL_CTX callback - */ - data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_SSL_CTX_DATA: -#ifdef have_curlssl_ssl_ctx - /* - * Set a SSL_CTX callback parameter pointer - */ - data->set.ssl.fsslctxp = va_arg(param, void *); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_SSL_FALSESTART: - /* - * Enable TLS false start. - */ - if(!Curl_ssl_false_start()) { - result = CURLE_NOT_BUILT_IN; - break; - } - - data->set.ssl.falsestart = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_CERTINFO: -#ifdef have_curlssl_certinfo - data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE; -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_PINNEDPUBLICKEY: -#ifdef have_curlssl_pinnedpubkey /* only by supported backends */ - /* - * Set pinned public key for SSL connection. - * Specify file name of the public key in DER format. - */ - result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_PROXY_PINNEDPUBLICKEY: -#ifdef have_curlssl_pinnedpubkey /* only by supported backends */ - /* - * Set pinned public key for SSL connection. - * Specify file name of the public key in DER format. - */ - result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_CAINFO: - /* - * Set CA info for SSL connection. Specify file name of the CA certificate - */ - result = setstropt(&data->set.str[STRING_SSL_CAFILE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_CAINFO: - /* - * Set CA info SSL connection for proxy. Specify file name of the - * CA certificate - */ - result = setstropt(&data->set.str[STRING_SSL_CAFILE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_CAPATH: -#ifdef have_curlssl_ca_path /* not supported by all backends */ - /* - * Set CA path info for SSL connection. Specify directory name of the CA - * certificates which have been prepared using openssl c_rehash utility. - */ - /* This does not work on windows. */ - result = setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_PROXY_CAPATH: -#ifdef have_curlssl_ca_path /* not supported by all backends */ - /* - * Set CA path info for SSL connection proxy. Specify directory name of the - * CA certificates which have been prepared using openssl c_rehash utility. - */ - /* This does not work on windows. */ - result = setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY], - va_arg(param, char *)); -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_CRLFILE: - /* - * Set CRL file info for SSL connection. Specify file name of the CRL - * to check certificates revocation - */ - result = setstropt(&data->set.str[STRING_SSL_CRLFILE_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_PROXY_CRLFILE: - /* - * Set CRL file info for SSL connection for proxy. Specify file name of the - * CRL to check certificates revocation - */ - result = setstropt(&data->set.str[STRING_SSL_CRLFILE_PROXY], - va_arg(param, char *)); - break; - case CURLOPT_ISSUERCERT: - /* - * Set Issuer certificate file - * to check certificates issuer - */ - result = setstropt(&data->set.str[STRING_SSL_ISSUERCERT_ORIG], - va_arg(param, char *)); - break; - case CURLOPT_TELNETOPTIONS: - /* - * Set a linked list of telnet options - */ - data->set.telnet_options = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_BUFFERSIZE: - /* - * The application kindly asks for a differently sized receive buffer. - * If it seems reasonable, we'll use it. - */ - data->set.buffer_size = va_arg(param, long); - - if(data->set.buffer_size > MAX_BUFSIZE) - data->set.buffer_size = MAX_BUFSIZE; /* huge internal default */ - else if(data->set.buffer_size < 1) - data->set.buffer_size = BUFSIZE; - - /* Resize only if larger than default buffer size. */ - if(data->set.buffer_size > BUFSIZE) { - data->state.buffer = realloc(data->state.buffer, - data->set.buffer_size + 1); - if(!data->state.buffer) { - DEBUGF(fprintf(stderr, "Error: realloc of buffer failed\n")); - result = CURLE_OUT_OF_MEMORY; - } - } - - break; - - case CURLOPT_NOSIGNAL: - /* - * The application asks not to set any signal() or alarm() handlers, - * even when using a timeout. - */ - data->set.no_signal = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_SHARE: - { - struct Curl_share *set; - set = va_arg(param, struct Curl_share *); - - /* disconnect from old share, if any */ - if(data->share) { - Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); - - if(data->dns.hostcachetype == HCACHE_SHARED) { - data->dns.hostcache = NULL; - data->dns.hostcachetype = HCACHE_NONE; - } - -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - if(data->share->cookies == data->cookies) - data->cookies = NULL; -#endif - - if(data->share->sslsession == data->state.session) - data->state.session = NULL; - - data->share->dirty--; - - Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); - data->share = NULL; - } - - /* use new share if it set */ - data->share = set; - if(data->share) { - - Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); - - data->share->dirty++; - - if(data->share->specifier & (1<< CURL_LOCK_DATA_DNS)) { - /* use shared host cache */ - data->dns.hostcache = &data->share->hostcache; - data->dns.hostcachetype = HCACHE_SHARED; - } -#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) - if(data->share->cookies) { - /* use shared cookie list, first free own one if any */ - Curl_cookie_cleanup(data->cookies); - /* enable cookies since we now use a share that uses cookies! */ - data->cookies = data->share->cookies; - } -#endif /* CURL_DISABLE_HTTP */ - if(data->share->sslsession) { - data->set.general_ssl.max_ssl_sessions = data->share->max_ssl_sessions; - data->state.session = data->share->sslsession; - } - Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); - - } - /* check for host cache not needed, - * it will be done by curl_easy_perform */ - } - break; - - case CURLOPT_PRIVATE: - /* - * Set private data pointer. - */ - data->set.private_data = va_arg(param, void *); - break; - - case CURLOPT_MAXFILESIZE: - /* - * Set the maximum size of a file to download. - */ - data->set.max_filesize = va_arg(param, long); - break; - -#ifdef USE_SSL - case CURLOPT_USE_SSL: - /* - * Make transfers attempt to use SSL/TLS. - */ - data->set.use_ssl = (curl_usessl)va_arg(param, long); - break; - - case CURLOPT_SSL_OPTIONS: - arg = va_arg(param, long); - data->set.ssl.enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE; - data->set.ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); - break; - - case CURLOPT_PROXY_SSL_OPTIONS: - arg = va_arg(param, long); - data->set.proxy_ssl.enable_beast = arg&CURLSSLOPT_ALLOW_BEAST?TRUE:FALSE; - data->set.proxy_ssl.no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE); - break; - -#endif - case CURLOPT_FTPSSLAUTH: - /* - * Set a specific auth for FTP-SSL transfers. - */ - data->set.ftpsslauth = (curl_ftpauth)va_arg(param, long); - break; - - case CURLOPT_IPRESOLVE: - data->set.ipver = va_arg(param, long); - break; - - case CURLOPT_MAXFILESIZE_LARGE: - /* - * Set the maximum size of a file to download. - */ - data->set.max_filesize = va_arg(param, curl_off_t); - break; - - case CURLOPT_TCP_NODELAY: - /* - * Enable or disable TCP_NODELAY, which will disable/enable the Nagle - * algorithm - */ - data->set.tcp_nodelay = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_ACCOUNT: - result = setstropt(&data->set.str[STRING_FTP_ACCOUNT], - va_arg(param, char *)); - break; - - case CURLOPT_IGNORE_CONTENT_LENGTH: - data->set.ignorecl = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_CONNECT_ONLY: - /* - * No data transfer, set up connection and let application use the socket - */ - data->set.connect_only = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_FTP_ALTERNATIVE_TO_USER: - result = setstropt(&data->set.str[STRING_FTP_ALTERNATIVE_TO_USER], - va_arg(param, char *)); - break; - - case CURLOPT_SOCKOPTFUNCTION: - /* - * socket callback function: called after socket() but before connect() - */ - data->set.fsockopt = va_arg(param, curl_sockopt_callback); - break; - - case CURLOPT_SOCKOPTDATA: - /* - * socket callback data pointer. Might be NULL. - */ - data->set.sockopt_client = va_arg(param, void *); - break; - - case CURLOPT_OPENSOCKETFUNCTION: - /* - * open/create socket callback function: called instead of socket(), - * before connect() - */ - data->set.fopensocket = va_arg(param, curl_opensocket_callback); - break; - - case CURLOPT_OPENSOCKETDATA: - /* - * socket callback data pointer. Might be NULL. - */ - data->set.opensocket_client = va_arg(param, void *); - break; - - case CURLOPT_CLOSESOCKETFUNCTION: - /* - * close socket callback function: called instead of close() - * when shutting down a connection - */ - data->set.fclosesocket = va_arg(param, curl_closesocket_callback); - break; - - case CURLOPT_CLOSESOCKETDATA: - /* - * socket callback data pointer. Might be NULL. - */ - data->set.closesocket_client = va_arg(param, void *); - break; - - case CURLOPT_SSL_SESSIONID_CACHE: - data->set.general_ssl.sessionid = (0 != va_arg(param, long)) ? - TRUE : FALSE; - break; - -#ifdef USE_LIBSSH2 - /* we only include SSH options if explicitly built to support SSH */ - case CURLOPT_SSH_AUTH_TYPES: - data->set.ssh_auth_types = va_arg(param, long); - break; - - case CURLOPT_SSH_PUBLIC_KEYFILE: - /* - * Use this file instead of the $HOME/.ssh/id_dsa.pub file - */ - result = setstropt(&data->set.str[STRING_SSH_PUBLIC_KEY], - va_arg(param, char *)); - break; - - case CURLOPT_SSH_PRIVATE_KEYFILE: - /* - * Use this file instead of the $HOME/.ssh/id_dsa file - */ - result = setstropt(&data->set.str[STRING_SSH_PRIVATE_KEY], - va_arg(param, char *)); - break; - case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: - /* - * Option to allow for the MD5 of the host public key to be checked - * for validation purposes. - */ - result = setstropt(&data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5], - va_arg(param, char *)); - break; -#ifdef HAVE_LIBSSH2_KNOWNHOST_API - case CURLOPT_SSH_KNOWNHOSTS: - /* - * Store the file name to read known hosts from. - */ - result = setstropt(&data->set.str[STRING_SSH_KNOWNHOSTS], - va_arg(param, char *)); - break; - - case CURLOPT_SSH_KEYFUNCTION: - /* setting to NULL is fine since the ssh.c functions themselves will - then rever to use the internal default */ - data->set.ssh_keyfunc = va_arg(param, curl_sshkeycallback); - break; - - case CURLOPT_SSH_KEYDATA: - /* - * Custom client data to pass to the SSH keyfunc callback - */ - data->set.ssh_keyfunc_userp = va_arg(param, void *); - break; -#endif /* HAVE_LIBSSH2_KNOWNHOST_API */ - -#endif /* USE_LIBSSH2 */ - - case CURLOPT_HTTP_TRANSFER_DECODING: - /* - * disable libcurl transfer encoding is used - */ - data->set.http_te_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_HTTP_CONTENT_DECODING: - /* - * raw data passed to the application when content encoding is used - */ - data->set.http_ce_skip = (0 == va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_NEW_FILE_PERMS: - /* - * Uses these permissions instead of 0644 - */ - data->set.new_file_perms = va_arg(param, long); - break; - - case CURLOPT_NEW_DIRECTORY_PERMS: - /* - * Uses these permissions instead of 0755 - */ - data->set.new_directory_perms = va_arg(param, long); - break; - - case CURLOPT_ADDRESS_SCOPE: - /* - * We always get longs when passed plain numericals, but for this value we - * know that an unsigned int will always hold the value so we blindly - * typecast to this type - */ - data->set.scope_id = curlx_sltoui(va_arg(param, long)); - break; - - case CURLOPT_PROTOCOLS: - /* set the bitmask for the protocols that are allowed to be used for the - transfer, which thus helps the app which takes URLs from users or other - external inputs and want to restrict what protocol(s) to deal - with. Defaults to CURLPROTO_ALL. */ - data->set.allowed_protocols = va_arg(param, long); - break; - - case CURLOPT_REDIR_PROTOCOLS: - /* set the bitmask for the protocols that libcurl is allowed to follow to, - as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs - to be set in both bitmasks to be allowed to get redirected to. Defaults - to all protocols except FILE and SCP. */ - data->set.redir_protocols = va_arg(param, long); - break; - - case CURLOPT_DEFAULT_PROTOCOL: - /* Set the protocol to use when the URL doesn't include any protocol */ - result = setstropt(&data->set.str[STRING_DEFAULT_PROTOCOL], - va_arg(param, char *)); - break; - - case CURLOPT_MAIL_FROM: - /* Set the SMTP mail originator */ - result = setstropt(&data->set.str[STRING_MAIL_FROM], - va_arg(param, char *)); - break; - - case CURLOPT_MAIL_AUTH: - /* Set the SMTP auth originator */ - result = setstropt(&data->set.str[STRING_MAIL_AUTH], - va_arg(param, char *)); - break; - - case CURLOPT_MAIL_RCPT: - /* Set the list of mail recipients */ - data->set.mail_rcpt = va_arg(param, struct curl_slist *); - break; - - case CURLOPT_SASL_IR: - /* Enable/disable SASL initial response */ - data->set.sasl_ir = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - - case CURLOPT_RTSP_REQUEST: - { - /* - * Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) - * Would this be better if the RTSPREQ_* were just moved into here? - */ - long curl_rtspreq = va_arg(param, long); - Curl_RtspReq rtspreq = RTSPREQ_NONE; - switch(curl_rtspreq) { - case CURL_RTSPREQ_OPTIONS: - rtspreq = RTSPREQ_OPTIONS; - break; - - case CURL_RTSPREQ_DESCRIBE: - rtspreq = RTSPREQ_DESCRIBE; - break; - - case CURL_RTSPREQ_ANNOUNCE: - rtspreq = RTSPREQ_ANNOUNCE; - break; - - case CURL_RTSPREQ_SETUP: - rtspreq = RTSPREQ_SETUP; - break; - - case CURL_RTSPREQ_PLAY: - rtspreq = RTSPREQ_PLAY; - break; - - case CURL_RTSPREQ_PAUSE: - rtspreq = RTSPREQ_PAUSE; - break; - - case CURL_RTSPREQ_TEARDOWN: - rtspreq = RTSPREQ_TEARDOWN; - break; - - case CURL_RTSPREQ_GET_PARAMETER: - rtspreq = RTSPREQ_GET_PARAMETER; - break; - - case CURL_RTSPREQ_SET_PARAMETER: - rtspreq = RTSPREQ_SET_PARAMETER; - break; - - case CURL_RTSPREQ_RECORD: - rtspreq = RTSPREQ_RECORD; - break; - - case CURL_RTSPREQ_RECEIVE: - rtspreq = RTSPREQ_RECEIVE; - break; - default: - rtspreq = RTSPREQ_NONE; - } - - data->set.rtspreq = rtspreq; - break; - } - - - case CURLOPT_RTSP_SESSION_ID: - /* - * Set the RTSP Session ID manually. Useful if the application is - * resuming a previously established RTSP session - */ - result = setstropt(&data->set.str[STRING_RTSP_SESSION_ID], - va_arg(param, char *)); - break; - - case CURLOPT_RTSP_STREAM_URI: - /* - * Set the Stream URI for the RTSP request. Unless the request is - * for generic server options, the application will need to set this. - */ - result = setstropt(&data->set.str[STRING_RTSP_STREAM_URI], - va_arg(param, char *)); - break; - - case CURLOPT_RTSP_TRANSPORT: - /* - * The content of the Transport: header for the RTSP request - */ - result = setstropt(&data->set.str[STRING_RTSP_TRANSPORT], - va_arg(param, char *)); - break; - - case CURLOPT_RTSP_CLIENT_CSEQ: - /* - * Set the CSEQ number to issue for the next RTSP request. Useful if the - * application is resuming a previously broken connection. The CSEQ - * will increment from this new number henceforth. - */ - data->state.rtsp_next_client_CSeq = va_arg(param, long); - break; - - case CURLOPT_RTSP_SERVER_CSEQ: - /* Same as the above, but for server-initiated requests */ - data->state.rtsp_next_client_CSeq = va_arg(param, long); - break; - - case CURLOPT_INTERLEAVEDATA: - data->set.rtp_out = va_arg(param, void *); - break; - case CURLOPT_INTERLEAVEFUNCTION: - /* Set the user defined RTP write function */ - data->set.fwrite_rtp = va_arg(param, curl_write_callback); - break; - - case CURLOPT_WILDCARDMATCH: - data->set.wildcardmatch = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_CHUNK_BGN_FUNCTION: - data->set.chunk_bgn = va_arg(param, curl_chunk_bgn_callback); - break; - case CURLOPT_CHUNK_END_FUNCTION: - data->set.chunk_end = va_arg(param, curl_chunk_end_callback); - break; - case CURLOPT_FNMATCH_FUNCTION: - data->set.fnmatch = va_arg(param, curl_fnmatch_callback); - break; - case CURLOPT_CHUNK_DATA: - data->wildcard.customptr = va_arg(param, void *); - break; - case CURLOPT_FNMATCH_DATA: - data->set.fnmatch_data = va_arg(param, void *); - break; -#ifdef USE_TLS_SRP - case CURLOPT_TLSAUTH_USERNAME: - result = setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_ORIG], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype) - data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_PROXY_TLSAUTH_USERNAME: - result = setstropt(&data->set.str[STRING_TLSAUTH_USERNAME_PROXY], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_PROXY] && - !data->set.proxy_ssl.authtype) - data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_TLSAUTH_PASSWORD: - result = setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_ORIG], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_ORIG] && !data->set.ssl.authtype) - data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_PROXY_TLSAUTH_PASSWORD: - result = setstropt(&data->set.str[STRING_TLSAUTH_PASSWORD_PROXY], - va_arg(param, char *)); - if(data->set.str[STRING_TLSAUTH_USERNAME_PROXY] && - !data->set.proxy_ssl.authtype) - data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ - break; - case CURLOPT_TLSAUTH_TYPE: - if(strncasecompare((char *)va_arg(param, char *), "SRP", strlen("SRP"))) - data->set.ssl.authtype = CURL_TLSAUTH_SRP; - else - data->set.ssl.authtype = CURL_TLSAUTH_NONE; - break; - case CURLOPT_PROXY_TLSAUTH_TYPE: - if(strncasecompare((char *)va_arg(param, char *), "SRP", strlen("SRP"))) - data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; - else - data->set.proxy_ssl.authtype = CURL_TLSAUTH_NONE; - break; -#endif - case CURLOPT_DNS_SERVERS: - result = Curl_set_dns_servers(data, va_arg(param, char *)); - break; - case CURLOPT_DNS_INTERFACE: - result = Curl_set_dns_interface(data, va_arg(param, char *)); - break; - case CURLOPT_DNS_LOCAL_IP4: - result = Curl_set_dns_local_ip4(data, va_arg(param, char *)); - break; - case CURLOPT_DNS_LOCAL_IP6: - result = Curl_set_dns_local_ip6(data, va_arg(param, char *)); - break; - - case CURLOPT_TCP_KEEPALIVE: - data->set.tcp_keepalive = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_TCP_KEEPIDLE: - data->set.tcp_keepidle = va_arg(param, long); - break; - case CURLOPT_TCP_KEEPINTVL: - data->set.tcp_keepintvl = va_arg(param, long); - break; - case CURLOPT_TCP_FASTOPEN: -#if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) - data->set.tcp_fastopen = (0 != va_arg(param, long))?TRUE:FALSE; -#else - result = CURLE_NOT_BUILT_IN; -#endif - break; - case CURLOPT_SSL_ENABLE_NPN: - data->set.ssl_enable_npn = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_SSL_ENABLE_ALPN: - data->set.ssl_enable_alpn = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - -#ifdef USE_UNIX_SOCKETS - case CURLOPT_UNIX_SOCKET_PATH: - data->set.abstract_unix_socket = FALSE; - result = setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], - va_arg(param, char *)); - break; - case CURLOPT_ABSTRACT_UNIX_SOCKET: - data->set.abstract_unix_socket = TRUE; - result = setstropt(&data->set.str[STRING_UNIX_SOCKET_PATH], - va_arg(param, char *)); - break; -#endif - - case CURLOPT_PATH_AS_IS: - data->set.path_as_is = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_PIPEWAIT: - data->set.pipewait = (0 != va_arg(param, long)) ? TRUE : FALSE; - break; - case CURLOPT_STREAM_WEIGHT: -#ifndef USE_NGHTTP2 - return CURLE_NOT_BUILT_IN; -#else - arg = va_arg(param, long); - if((arg>=1) && (arg <= 256)) - data->set.stream_weight = (int)arg; - break; -#endif - case CURLOPT_STREAM_DEPENDS: - case CURLOPT_STREAM_DEPENDS_E: - { -#ifndef USE_NGHTTP2 - return CURLE_NOT_BUILT_IN; -#else - struct Curl_easy *dep = va_arg(param, struct Curl_easy *); - if(!dep || GOOD_EASY_HANDLE(dep)) { - if(data->set.stream_depends_on) { - Curl_http2_remove_child(data->set.stream_depends_on, data); - } - Curl_http2_add_child(dep, data, (option == CURLOPT_STREAM_DEPENDS_E)); - } - break; -#endif - } - case CURLOPT_CONNECT_TO: - data->set.connect_to = va_arg(param, struct curl_slist *); - break; - default: - /* unknown tag and its companion, just ignore: */ - result = CURLE_UNKNOWN_OPTION; - break; - } - - return result; -} - -#ifdef USE_RECV_BEFORE_SEND_WORKAROUND -static void conn_reset_postponed_data(struct connectdata *conn, int num) -{ - struct postponed_data * const psnd = &(conn->postponed[num]); - if(psnd->buffer) { - DEBUGASSERT(psnd->allocated_size > 0); - DEBUGASSERT(psnd->recv_size <= psnd->allocated_size); - DEBUGASSERT(psnd->recv_size ? - (psnd->recv_processed < psnd->recv_size) : - (psnd->recv_processed == 0)); - DEBUGASSERT(psnd->bindsock != CURL_SOCKET_BAD); - free(psnd->buffer); - psnd->buffer = NULL; - psnd->allocated_size = 0; - psnd->recv_size = 0; - psnd->recv_processed = 0; -#ifdef DEBUGBUILD - psnd->bindsock = CURL_SOCKET_BAD; /* used only for DEBUGASSERT */ -#endif /* DEBUGBUILD */ - } - else { - DEBUGASSERT(psnd->allocated_size == 0); - DEBUGASSERT(psnd->recv_size == 0); - DEBUGASSERT(psnd->recv_processed == 0); - DEBUGASSERT(psnd->bindsock == CURL_SOCKET_BAD); - } -} - -static void conn_reset_all_postponed_data(struct connectdata *conn) -{ - conn_reset_postponed_data(conn, 0); - conn_reset_postponed_data(conn, 1); -} -#else /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ -/* Use "do-nothing" macros instead of functions when workaround not used */ -#define conn_reset_postponed_data(c,n) do {} WHILE_FALSE -#define conn_reset_all_postponed_data(c) do {} WHILE_FALSE -#endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ - -static void conn_free(struct connectdata *conn) -{ - if(!conn) - return; - - /* possible left-overs from the async name resolvers */ - Curl_resolver_cancel(conn); - - /* close the SSL stuff before we close any sockets since they will/may - write to the sockets */ - Curl_ssl_close(conn, FIRSTSOCKET); - Curl_ssl_close(conn, SECONDARYSOCKET); - - /* close possibly still open sockets */ - if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) - Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); - if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET]) - Curl_closesocket(conn, conn->sock[FIRSTSOCKET]); - if(CURL_SOCKET_BAD != conn->tempsock[0]) - Curl_closesocket(conn, conn->tempsock[0]); - if(CURL_SOCKET_BAD != conn->tempsock[1]) - Curl_closesocket(conn, conn->tempsock[1]); - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) - Curl_ntlm_wb_cleanup(conn); -#endif - - Curl_safefree(conn->user); - Curl_safefree(conn->passwd); - Curl_safefree(conn->oauth_bearer); - Curl_safefree(conn->options); - Curl_safefree(conn->http_proxy.user); - Curl_safefree(conn->socks_proxy.user); - Curl_safefree(conn->http_proxy.passwd); - Curl_safefree(conn->socks_proxy.passwd); - Curl_safefree(conn->allocptr.proxyuserpwd); - Curl_safefree(conn->allocptr.uagent); - Curl_safefree(conn->allocptr.userpwd); - Curl_safefree(conn->allocptr.accept_encoding); - Curl_safefree(conn->allocptr.te); - Curl_safefree(conn->allocptr.rangeline); - Curl_safefree(conn->allocptr.ref); - Curl_safefree(conn->allocptr.host); - Curl_safefree(conn->allocptr.cookiehost); - Curl_safefree(conn->allocptr.rtsp_transport); - Curl_safefree(conn->trailer); - Curl_safefree(conn->host.rawalloc); /* host name buffer */ - Curl_safefree(conn->conn_to_host.rawalloc); /* host name buffer */ - Curl_safefree(conn->secondaryhostname); - Curl_safefree(conn->http_proxy.host.rawalloc); /* http proxy name buffer */ - Curl_safefree(conn->socks_proxy.host.rawalloc); /* socks proxy name buffer */ - Curl_safefree(conn->master_buffer); - - conn_reset_all_postponed_data(conn); - - Curl_llist_destroy(conn->send_pipe, NULL); - Curl_llist_destroy(conn->recv_pipe, NULL); - - conn->send_pipe = NULL; - conn->recv_pipe = NULL; - - Curl_safefree(conn->localdev); - Curl_free_primary_ssl_config(&conn->ssl_config); - Curl_free_primary_ssl_config(&conn->proxy_ssl_config); - -#ifdef USE_UNIX_SOCKETS - Curl_safefree(conn->unix_domain_socket); -#endif - - free(conn); /* free all the connection oriented data */ -} - -/* - * Disconnects the given connection. Note the connection may not be the - * primary connection, like when freeing room in the connection cache or - * killing of a dead old connection. - * - * This function MUST NOT reset state in the Curl_easy struct if that - * isn't strictly bound to the life-time of *this* particular connection. - * - */ - -CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) -{ - struct Curl_easy *data; - if(!conn) - return CURLE_OK; /* this is closed and fine already */ - data = conn->data; - - if(!data) { - DEBUGF(fprintf(stderr, "DISCONNECT without easy handle, ignoring\n")); - return CURLE_OK; - } - - /* - * If this connection isn't marked to force-close, leave it open if there - * are other users of it - */ - if(!conn->bits.close && - (conn->send_pipe->size + conn->recv_pipe->size)) { - DEBUGF(infof(data, "Curl_disconnect, usecounter: %d\n", - conn->send_pipe->size + conn->recv_pipe->size)); - return CURLE_OK; - } - - if(conn->dns_entry != NULL) { - Curl_resolv_unlock(data, conn->dns_entry); - conn->dns_entry = NULL; - } - - Curl_hostcache_prune(data); /* kill old DNS cache entries */ - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) - /* Cleanup NTLM connection-related data */ - Curl_http_ntlm_cleanup(conn); -#endif - - if(conn->handler->disconnect) - /* This is set if protocol-specific cleanups should be made */ - conn->handler->disconnect(conn, dead_connection); - - /* unlink ourselves! */ - infof(data, "Closing connection %ld\n", conn->connection_id); - Curl_conncache_remove_conn(data->state.conn_cache, conn); - - free_fixed_hostname(&conn->host); - free_fixed_hostname(&conn->conn_to_host); - free_fixed_hostname(&conn->http_proxy.host); - free_fixed_hostname(&conn->socks_proxy.host); - - Curl_ssl_close(conn, FIRSTSOCKET); - - /* Indicate to all handles on the pipe that we're dead */ - if(Curl_pipeline_wanted(data->multi, CURLPIPE_ANY)) { - signalPipeClose(conn->send_pipe, TRUE); - signalPipeClose(conn->recv_pipe, TRUE); - } - - conn_free(conn); - - return CURLE_OK; -} - -/* - * This function should return TRUE if the socket is to be assumed to - * be dead. Most commonly this happens when the server has closed the - * connection due to inactivity. - */ -static bool SocketIsDead(curl_socket_t sock) -{ - int sval; - bool ret_val = TRUE; - - sval = SOCKET_READABLE(sock, 0); - if(sval == 0) - /* timeout */ - ret_val = FALSE; - - return ret_val; -} - -/* - * IsPipeliningPossible() returns TRUE if the options set would allow - * pipelining/multiplexing and the connection is using a HTTP protocol. - */ -static bool IsPipeliningPossible(const struct Curl_easy *handle, - const struct connectdata *conn) -{ - /* If a HTTP protocol and pipelining is enabled */ - if((conn->handler->protocol & PROTO_FAMILY_HTTP) && - (!conn->bits.protoconnstart || !conn->bits.close)) { - - if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) && - (handle->set.httpversion != CURL_HTTP_VERSION_1_0) && - (handle->set.httpreq == HTTPREQ_GET || - handle->set.httpreq == HTTPREQ_HEAD)) - /* didn't ask for HTTP/1.0 and a GET or HEAD */ - return TRUE; - - if(Curl_pipeline_wanted(handle->multi, CURLPIPE_MULTIPLEX) && - (handle->set.httpversion >= CURL_HTTP_VERSION_2)) - /* allows HTTP/2 */ - return TRUE; - } - return FALSE; -} - -int Curl_removeHandleFromPipeline(struct Curl_easy *handle, - struct curl_llist *pipeline) -{ - if(pipeline) { - struct curl_llist_element *curr; - - curr = pipeline->head; - while(curr) { - if(curr->ptr == handle) { - Curl_llist_remove(pipeline, curr, NULL); - return 1; /* we removed a handle */ - } - curr = curr->next; - } - } - - return 0; -} - -#if 0 /* this code is saved here as it is useful for debugging purposes */ -static void Curl_printPipeline(struct curl_llist *pipeline) -{ - struct curl_llist_element *curr; - - curr = pipeline->head; - while(curr) { - struct Curl_easy *data = (struct Curl_easy *) curr->ptr; - infof(data, "Handle in pipeline: %s\n", data->state.path); - curr = curr->next; - } -} -#endif - -static struct Curl_easy* gethandleathead(struct curl_llist *pipeline) -{ - struct curl_llist_element *curr = pipeline->head; - if(curr) { - return (struct Curl_easy *) curr->ptr; - } - - return NULL; -} - -/* remove the specified connection from all (possible) pipelines and related - queues */ -void Curl_getoff_all_pipelines(struct Curl_easy *data, - struct connectdata *conn) -{ - bool recv_head = (conn->readchannel_inuse && - Curl_recvpipe_head(data, conn)); - bool send_head = (conn->writechannel_inuse && - Curl_sendpipe_head(data, conn)); - - if(Curl_removeHandleFromPipeline(data, conn->recv_pipe) && recv_head) - Curl_pipeline_leave_read(conn); - if(Curl_removeHandleFromPipeline(data, conn->send_pipe) && send_head) - Curl_pipeline_leave_write(conn); -} - -static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke) -{ - struct curl_llist_element *curr; - - if(!pipeline) - return; - - curr = pipeline->head; - while(curr) { - struct curl_llist_element *next = curr->next; - struct Curl_easy *data = (struct Curl_easy *) curr->ptr; - -#ifdef DEBUGBUILD /* debug-only code */ - if(data->magic != CURLEASY_MAGIC_NUMBER) { - /* MAJOR BADNESS */ - infof(data, "signalPipeClose() found BAAD easy handle\n"); - } -#endif - - if(pipe_broke) - data->state.pipe_broke = TRUE; - Curl_multi_handlePipeBreak(data); - Curl_llist_remove(pipeline, curr, NULL); - curr = next; - } -} - -/* - * This function finds the connection in the connection - * cache that has been unused for the longest time. - * - * Returns the pointer to the oldest idle connection, or NULL if none was - * found. - */ -struct connectdata * -Curl_oldest_idle_connection(struct Curl_easy *data) -{ - struct conncache *bc = data->state.conn_cache; - struct curl_hash_iterator iter; - struct curl_llist_element *curr; - struct curl_hash_element *he; - time_t highscore=-1; - time_t score; - struct timeval now; - struct connectdata *conn_candidate = NULL; - struct connectbundle *bundle; - - now = Curl_tvnow(); - - Curl_hash_start_iterate(&bc->hash, &iter); - - he = Curl_hash_next_element(&iter); - while(he) { - struct connectdata *conn; - - bundle = he->ptr; - - curr = bundle->conn_list->head; - while(curr) { - conn = curr->ptr; - - if(!conn->inuse) { - /* Set higher score for the age passed since the connection was used */ - score = Curl_tvdiff(now, conn->now); - - if(score > highscore) { - highscore = score; - conn_candidate = conn; - } - } - curr = curr->next; - } - - he = Curl_hash_next_element(&iter); - } - - return conn_candidate; -} - -static bool -proxy_info_matches(const struct proxy_info* data, - const struct proxy_info* needle) -{ - if((data->proxytype == needle->proxytype) && - (data->port == needle->port) && - Curl_safe_strcasecompare(data->host.name, needle->host.name) && - Curl_safe_strcasecompare(data->user, needle->user) && - Curl_safe_strcasecompare(data->passwd, needle->passwd)) - return TRUE; - - return FALSE; -} - - -/* - * This function finds the connection in the connection - * bundle that has been unused for the longest time. - * - * Returns the pointer to the oldest idle connection, or NULL if none was - * found. - */ -static struct connectdata * -find_oldest_idle_connection_in_bundle(struct Curl_easy *data, - struct connectbundle *bundle) -{ - struct curl_llist_element *curr; - time_t highscore=-1; - time_t score; - struct timeval now; - struct connectdata *conn_candidate = NULL; - struct connectdata *conn; - - (void)data; - - now = Curl_tvnow(); - - curr = bundle->conn_list->head; - while(curr) { - conn = curr->ptr; - - if(!conn->inuse) { - /* Set higher score for the age passed since the connection was used */ - score = Curl_tvdiff(now, conn->now); - - if(score > highscore) { - highscore = score; - conn_candidate = conn; - } - } - curr = curr->next; - } - - return conn_candidate; -} - -/* - * This function checks if given connection is dead and disconnects if so. - * (That also removes it from the connection cache.) - * - * Returns TRUE if the connection actually was dead and disconnected. - */ -static bool disconnect_if_dead(struct connectdata *conn, - struct Curl_easy *data) -{ - size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size; - if(!pipeLen && !conn->inuse) { - /* The check for a dead socket makes sense only if there are no - handles in pipeline and the connection isn't already marked in - use */ - bool dead; - if(conn->handler->protocol & CURLPROTO_RTSP) - /* RTSP is a special case due to RTP interleaving */ - dead = Curl_rtsp_connisdead(conn); - else - dead = SocketIsDead(conn->sock[FIRSTSOCKET]); - - if(dead) { - conn->data = data; - infof(data, "Connection %ld seems to be dead!\n", conn->connection_id); - - /* disconnect resources */ - Curl_disconnect(conn, /* dead_connection */TRUE); - return TRUE; - } - } - return FALSE; -} - -/* - * Wrapper to use disconnect_if_dead() function in Curl_conncache_foreach() - * - * Returns always 0. - */ -static int call_disconnect_if_dead(struct connectdata *conn, - void *param) -{ - struct Curl_easy* data = (struct Curl_easy*)param; - disconnect_if_dead(conn, data); - return 0; /* continue iteration */ -} - -/* - * This function scans the connection cache for half-open/dead connections, - * closes and removes them. - * The cleanup is done at most once per second. - */ -static void prune_dead_connections(struct Curl_easy *data) -{ - struct timeval now = Curl_tvnow(); - time_t elapsed = Curl_tvdiff(now, data->state.conn_cache->last_cleanup); - - if(elapsed >= 1000L) { - Curl_conncache_foreach(data->state.conn_cache, data, - call_disconnect_if_dead); - data->state.conn_cache->last_cleanup = now; - } -} - - -static size_t max_pipeline_length(struct Curl_multi *multi) -{ - return multi ? multi->max_pipeline_length : 0; -} - - -/* - * Given one filled in connection struct (named needle), this function should - * detect if there already is one that has all the significant details - * exactly the same and thus should be used instead. - * - * If there is a match, this function returns TRUE - and has marked the - * connection as 'in-use'. It must later be called with ConnectionDone() to - * return back to 'idle' (unused) state. - * - * The force_reuse flag is set if the connection must be used, even if - * the pipelining strategy wants to open a new connection instead of reusing. - */ -static bool -ConnectionExists(struct Curl_easy *data, - struct connectdata *needle, - struct connectdata **usethis, - bool *force_reuse, - bool *waitpipe) -{ - struct connectdata *check; - struct connectdata *chosen = 0; - bool foundPendingCandidate = FALSE; - bool canPipeline = IsPipeliningPossible(data, needle); - struct connectbundle *bundle; - -#ifdef USE_NTLM - bool wantNTLMhttp = ((data->state.authhost.want & - (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) && - (needle->handler->protocol & PROTO_FAMILY_HTTP)); - bool wantProxyNTLMhttp = (needle->bits.proxy_user_passwd && - ((data->state.authproxy.want & - (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) && - (needle->handler->protocol & PROTO_FAMILY_HTTP))); -#endif - - *force_reuse = FALSE; - *waitpipe = FALSE; - - /* We can't pipe if the site is blacklisted */ - if(canPipeline && Curl_pipeline_site_blacklisted(data, needle)) { - canPipeline = FALSE; - } - - /* Look up the bundle with all the connections to this - particular host */ - bundle = Curl_conncache_find_bundle(needle, data->state.conn_cache); - if(bundle) { - /* Max pipe length is zero (unlimited) for multiplexed connections */ - size_t max_pipe_len = (bundle->multiuse != BUNDLE_MULTIPLEX)? - max_pipeline_length(data->multi):0; - size_t best_pipe_len = max_pipe_len; - struct curl_llist_element *curr; - - infof(data, "Found bundle for host %s: %p [%s]\n", - (needle->bits.conn_to_host ? needle->conn_to_host.name : - needle->host.name), (void *)bundle, - (bundle->multiuse == BUNDLE_PIPELINING ? - "can pipeline" : - (bundle->multiuse == BUNDLE_MULTIPLEX ? - "can multiplex" : "serially"))); - - /* We can't pipe if we don't know anything about the server */ - if(canPipeline) { - if(bundle->multiuse <= BUNDLE_UNKNOWN) { - if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) { - infof(data, "Server doesn't support multi-use yet, wait\n"); - *waitpipe = TRUE; - return FALSE; /* no re-use */ - } - - infof(data, "Server doesn't support multi-use (yet)\n"); - canPipeline = FALSE; - } - if((bundle->multiuse == BUNDLE_PIPELINING) && - !Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1)) { - /* not asked for, switch off */ - infof(data, "Could pipeline, but not asked to!\n"); - canPipeline = FALSE; - } - else if((bundle->multiuse == BUNDLE_MULTIPLEX) && - !Curl_pipeline_wanted(data->multi, CURLPIPE_MULTIPLEX)) { - infof(data, "Could multiplex, but not asked to!\n"); - canPipeline = FALSE; - } - } - - curr = bundle->conn_list->head; - while(curr) { - bool match = FALSE; - size_t pipeLen; - - /* - * Note that if we use a HTTP proxy in normal mode (no tunneling), we - * check connections to that proxy and not to the actual remote server. - */ - check = curr->ptr; - curr = curr->next; - - if(disconnect_if_dead(check, data)) - continue; - - pipeLen = check->send_pipe->size + check->recv_pipe->size; - - if(canPipeline) { - if(check->bits.protoconnstart && check->bits.close) - continue; - - if(!check->bits.multiplex) { - /* If not multiplexing, make sure the pipe has only GET requests */ - struct Curl_easy* sh = gethandleathead(check->send_pipe); - struct Curl_easy* rh = gethandleathead(check->recv_pipe); - if(sh) { - if(!IsPipeliningPossible(sh, check)) - continue; - } - else if(rh) { - if(!IsPipeliningPossible(rh, check)) - continue; - } - } - } - else { - if(pipeLen > 0) { - /* can only happen within multi handles, and means that another easy - handle is using this connection */ - continue; - } - - if(Curl_resolver_asynch()) { - /* ip_addr_str[0] is NUL only if the resolving of the name hasn't - completed yet and until then we don't re-use this connection */ - if(!check->ip_addr_str[0]) { - infof(data, - "Connection #%ld is still name resolving, can't reuse\n", - check->connection_id); - continue; - } - } - - if((check->sock[FIRSTSOCKET] == CURL_SOCKET_BAD) || - check->bits.close) { - if(!check->bits.close) - foundPendingCandidate = TRUE; - /* Don't pick a connection that hasn't connected yet or that is going - to get closed. */ - infof(data, "Connection #%ld isn't open enough, can't reuse\n", - check->connection_id); -#ifdef DEBUGBUILD - if(check->recv_pipe->size > 0) { - infof(data, - "BAD! Unconnected #%ld has a non-empty recv pipeline!\n", - check->connection_id); - } -#endif - continue; - } - } - -#ifdef USE_UNIX_SOCKETS - if(needle->unix_domain_socket) { - if(!check->unix_domain_socket) - continue; - if(strcmp(needle->unix_domain_socket, check->unix_domain_socket)) - continue; - if(needle->abstract_unix_socket != check->abstract_unix_socket) - continue; - } - else if(check->unix_domain_socket) - continue; -#endif - - if((needle->handler->flags&PROTOPT_SSL) != - (check->handler->flags&PROTOPT_SSL)) - /* don't do mixed SSL and non-SSL connections */ - if(get_protocol_family(check->handler->protocol) != - needle->handler->protocol || !check->tls_upgraded) - /* except protocols that have been upgraded via TLS */ - continue; - - if(needle->bits.httpproxy != check->bits.httpproxy || - needle->bits.socksproxy != check->bits.socksproxy) - continue; - - if(needle->bits.socksproxy && !proxy_info_matches(&needle->socks_proxy, - &check->socks_proxy)) - continue; - - if(needle->bits.conn_to_host != check->bits.conn_to_host) - /* don't mix connections that use the "connect to host" feature and - * connections that don't use this feature */ - continue; - - if(needle->bits.conn_to_port != check->bits.conn_to_port) - /* don't mix connections that use the "connect to port" feature and - * connections that don't use this feature */ - continue; - - if(needle->bits.httpproxy) { - if(!proxy_info_matches(&needle->http_proxy, &check->http_proxy)) - continue; - - if(needle->bits.tunnel_proxy != check->bits.tunnel_proxy) - continue; - - if(needle->http_proxy.proxytype == CURLPROXY_HTTPS) { - /* use https proxy */ - if(needle->handler->flags&PROTOPT_SSL) { - /* use double layer ssl */ - if(!Curl_ssl_config_matches(&needle->proxy_ssl_config, - &check->proxy_ssl_config)) - continue; - if(check->proxy_ssl[FIRSTSOCKET].state != ssl_connection_complete) - continue; - } - else { - if(!Curl_ssl_config_matches(&needle->ssl_config, - &check->ssl_config)) - continue; - if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) - continue; - } - } - } - - if(!canPipeline && check->inuse) - /* this request can't be pipelined but the checked connection is - already in use so we skip it */ - continue; - - if(needle->localdev || needle->localport) { - /* If we are bound to a specific local end (IP+port), we must not - re-use a random other one, although if we didn't ask for a - particular one we can reuse one that was bound. - - This comparison is a bit rough and too strict. Since the input - parameters can be specified in numerous ways and still end up the - same it would take a lot of processing to make it really accurate. - Instead, this matching will assume that re-uses of bound connections - will most likely also re-use the exact same binding parameters and - missing out a few edge cases shouldn't hurt anyone very much. - */ - if((check->localport != needle->localport) || - (check->localportrange != needle->localportrange) || - (needle->localdev && - (!check->localdev || strcmp(check->localdev, needle->localdev)))) - continue; - } - - if(!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) { - /* This protocol requires credentials per connection, - so verify that we're using the same name and password as well */ - if(strcmp(needle->user, check->user) || - strcmp(needle->passwd, check->passwd)) { - /* one of them was different */ - continue; - } - } - - if(!needle->bits.httpproxy || (needle->handler->flags&PROTOPT_SSL) || - needle->bits.tunnel_proxy) { - /* The requested connection does not use a HTTP proxy or it uses SSL or - it is a non-SSL protocol tunneled or it is a non-SSL protocol which - is allowed to be upgraded via TLS */ - - if((strcasecompare(needle->handler->scheme, check->handler->scheme) || - (get_protocol_family(check->handler->protocol) == - needle->handler->protocol && check->tls_upgraded)) && - (!needle->bits.conn_to_host || strcasecompare( - needle->conn_to_host.name, check->conn_to_host.name)) && - (!needle->bits.conn_to_port || - needle->conn_to_port == check->conn_to_port) && - strcasecompare(needle->host.name, check->host.name) && - needle->remote_port == check->remote_port) { - /* The schemes match or the the protocol family is the same and the - previous connection was TLS upgraded, and the hostname and host - port match */ - if(needle->handler->flags & PROTOPT_SSL) { - /* This is a SSL connection so verify that we're using the same - SSL options as well */ - if(!Curl_ssl_config_matches(&needle->ssl_config, - &check->ssl_config)) { - DEBUGF(infof(data, - "Connection #%ld has different SSL parameters, " - "can't reuse\n", - check->connection_id)); - continue; - } - else if(check->ssl[FIRSTSOCKET].state != ssl_connection_complete) { - foundPendingCandidate = TRUE; - DEBUGF(infof(data, - "Connection #%ld has not started SSL connect, " - "can't reuse\n", - check->connection_id)); - continue; - } - } - match = TRUE; - } - } - else { - /* The requested connection is using the same HTTP proxy in normal - mode (no tunneling) */ - match = TRUE; - } - - if(match) { -#if defined(USE_NTLM) - /* If we are looking for an HTTP+NTLM connection, check if this is - already authenticating with the right credentials. If not, keep - looking so that we can reuse NTLM connections if - possible. (Especially we must not reuse the same connection if - partway through a handshake!) */ - if(wantNTLMhttp) { - if(strcmp(needle->user, check->user) || - strcmp(needle->passwd, check->passwd)) - continue; - } - else if(check->ntlm.state != NTLMSTATE_NONE) { - /* Connection is using NTLM auth but we don't want NTLM */ - continue; - } - - /* Same for Proxy NTLM authentication */ - if(wantProxyNTLMhttp) { - /* Both check->http_proxy.user and check->http_proxy.passwd can be - * NULL */ - if(!check->http_proxy.user || !check->http_proxy.passwd) - continue; - - if(strcmp(needle->http_proxy.user, check->http_proxy.user) || - strcmp(needle->http_proxy.passwd, check->http_proxy.passwd)) - continue; - } - else if(check->proxyntlm.state != NTLMSTATE_NONE) { - /* Proxy connection is using NTLM auth but we don't want NTLM */ - continue; - } - - if(wantNTLMhttp || wantProxyNTLMhttp) { - /* Credentials are already checked, we can use this connection */ - chosen = check; - - if((wantNTLMhttp && - (check->ntlm.state != NTLMSTATE_NONE)) || - (wantProxyNTLMhttp && - (check->proxyntlm.state != NTLMSTATE_NONE))) { - /* We must use this connection, no other */ - *force_reuse = TRUE; - break; - } - - /* Continue look up for a better connection */ - continue; - } -#endif - if(canPipeline) { - /* We can pipeline if we want to. Let's continue looking for - the optimal connection to use, i.e the shortest pipe that is not - blacklisted. */ - - if(pipeLen == 0) { - /* We have the optimal connection. Let's stop looking. */ - chosen = check; - break; - } - - /* We can't use the connection if the pipe is full */ - if(max_pipe_len && (pipeLen >= max_pipe_len)) { - infof(data, "Pipe is full, skip (%zu)\n", pipeLen); - continue; - } -#ifdef USE_NGHTTP2 - /* If multiplexed, make sure we don't go over concurrency limit */ - if(check->bits.multiplex) { - /* Multiplexed connections can only be HTTP/2 for now */ - struct http_conn *httpc = &check->proto.httpc; - if(pipeLen >= httpc->settings.max_concurrent_streams) { - infof(data, "MAX_CONCURRENT_STREAMS reached, skip (%zu)\n", - pipeLen); - continue; - } - } -#endif - /* We can't use the connection if the pipe is penalized */ - if(Curl_pipeline_penalized(data, check)) { - infof(data, "Penalized, skip\n"); - continue; - } - - if(max_pipe_len) { - if(pipeLen < best_pipe_len) { - /* This connection has a shorter pipe so far. We'll pick this - and continue searching */ - chosen = check; - best_pipe_len = pipeLen; - continue; - } - } - else { - /* When not pipelining (== multiplexed), we have a match here! */ - chosen = check; - infof(data, "Multiplexed connection found!\n"); - break; - } - } - else { - /* We have found a connection. Let's stop searching. */ - chosen = check; - break; - } - } - } - } - - if(chosen) { - *usethis = chosen; - return TRUE; /* yes, we found one to use! */ - } - - if(foundPendingCandidate && data->set.pipewait) { - infof(data, - "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set\n"); - *waitpipe = TRUE; - } - - return FALSE; /* no matching connecting exists */ -} - -/* after a TCP connection to the proxy has been verified, this function does - the next magic step. - - Note: this function's sub-functions call failf() - -*/ -CURLcode Curl_connected_proxy(struct connectdata *conn, int sockindex) -{ - CURLcode result = CURLE_OK; - - if(conn->bits.socksproxy) { -#ifndef CURL_DISABLE_PROXY - /* for the secondary socket (FTP), use the "connect to host" - * but ignore the "connect to port" (use the secondary port) - */ - const char * const host = conn->bits.httpproxy ? - conn->http_proxy.host.name : - conn->bits.conn_to_host ? - conn->conn_to_host.name : - sockindex == SECONDARYSOCKET ? - conn->secondaryhostname : conn->host.name; - const int port = conn->bits.httpproxy ? (int)conn->http_proxy.port : - sockindex == SECONDARYSOCKET ? conn->secondary_port : - conn->bits.conn_to_port ? conn->conn_to_port : - conn->remote_port; - conn->bits.socksproxy_connecting = TRUE; - switch(conn->socks_proxy.proxytype) { - case CURLPROXY_SOCKS5: - case CURLPROXY_SOCKS5_HOSTNAME: - result = Curl_SOCKS5(conn->socks_proxy.user, conn->socks_proxy.passwd, - host, port, sockindex, conn); - break; - - case CURLPROXY_SOCKS4: - case CURLPROXY_SOCKS4A: - result = Curl_SOCKS4(conn->socks_proxy.user, host, port, sockindex, - conn); - break; - - default: - failf(conn->data, "unknown proxytype option given"); - result = CURLE_COULDNT_CONNECT; - } /* switch proxytype */ - conn->bits.socksproxy_connecting = FALSE; -#else - (void)sockindex; -#endif /* CURL_DISABLE_PROXY */ - } - - return result; -} - -/* - * verboseconnect() displays verbose information after a connect - */ -#ifndef CURL_DISABLE_VERBOSE_STRINGS -void Curl_verboseconnect(struct connectdata *conn) -{ - if(conn->data->set.verbose) - infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n", - conn->bits.socksproxy ? conn->socks_proxy.host.dispname : - conn->bits.httpproxy ? conn->http_proxy.host.dispname : - conn->bits.conn_to_host ? conn->conn_to_host.dispname : - conn->host.dispname, - conn->ip_addr_str, conn->port, conn->connection_id); -} -#endif - -int Curl_protocol_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - if(conn->handler->proto_getsock) - return conn->handler->proto_getsock(conn, socks, numsocks); - return GETSOCK_BLANK; -} - -int Curl_doing_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - if(conn && conn->handler->doing_getsock) - return conn->handler->doing_getsock(conn, socks, numsocks); - return GETSOCK_BLANK; -} - -/* - * We are doing protocol-specific connecting and this is being called over and - * over from the multi interface until the connection phase is done on - * protocol layer. - */ - -CURLcode Curl_protocol_connecting(struct connectdata *conn, - bool *done) -{ - CURLcode result=CURLE_OK; - - if(conn && conn->handler->connecting) { - *done = FALSE; - result = conn->handler->connecting(conn, done); - } - else - *done = TRUE; - - return result; -} - -/* - * We are DOING this is being called over and over from the multi interface - * until the DOING phase is done on protocol layer. - */ - -CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done) -{ - CURLcode result=CURLE_OK; - - if(conn && conn->handler->doing) { - *done = FALSE; - result = conn->handler->doing(conn, done); - } - else - *done = TRUE; - - return result; -} - -/* - * We have discovered that the TCP connection has been successful, we can now - * proceed with some action. - * - */ -CURLcode Curl_protocol_connect(struct connectdata *conn, - bool *protocol_done) -{ - CURLcode result=CURLE_OK; - - *protocol_done = FALSE; - - if(conn->bits.tcpconnect[FIRSTSOCKET] && conn->bits.protoconnstart) { - /* We already are connected, get back. This may happen when the connect - worked fine in the first call, like when we connect to a local server - or proxy. Note that we don't know if the protocol is actually done. - - Unless this protocol doesn't have any protocol-connect callback, as - then we know we're done. */ - if(!conn->handler->connecting) - *protocol_done = TRUE; - - return CURLE_OK; - } - - if(!conn->bits.protoconnstart) { - - result = Curl_proxy_connect(conn, FIRSTSOCKET); - if(result) - return result; - - if(CONNECT_FIRSTSOCKET_PROXY_SSL()) - /* wait for HTTPS proxy SSL initialization to complete */ - return CURLE_OK; - - if(conn->bits.tunnel_proxy && conn->bits.httpproxy && - (conn->tunnel_state[FIRSTSOCKET] != TUNNEL_COMPLETE)) - /* when using an HTTP tunnel proxy, await complete tunnel establishment - before proceeding further. Return CURLE_OK so we'll be called again */ - return CURLE_OK; - - if(conn->handler->connect_it) { - /* is there a protocol-specific connect() procedure? */ - - /* Call the protocol-specific connect function */ - result = conn->handler->connect_it(conn, protocol_done); - } - else - *protocol_done = TRUE; - - /* it has started, possibly even completed but that knowledge isn't stored - in this bit! */ - if(!result) - conn->bits.protoconnstart = TRUE; - } - - return result; /* pass back status */ -} - -/* - * Helpers for IDNA convertions. - */ -static bool is_ASCII_name(const char *hostname) -{ - const unsigned char *ch = (const unsigned char *)hostname; - - while(*ch) { - if(*ch++ & 0x80) - return FALSE; - } - return TRUE; -} - -/* - * Perform any necessary IDN conversion of hostname - */ -static void fix_hostname(struct connectdata *conn, struct hostname *host) -{ - size_t len; - struct Curl_easy *data = conn->data; - -#ifndef USE_LIBIDN2 - (void)data; - (void)conn; -#elif defined(CURL_DISABLE_VERBOSE_STRINGS) - (void)conn; -#endif - - /* set the name we use to display the host name */ - host->dispname = host->name; - - len = strlen(host->name); - if(len && (host->name[len-1] == '.')) - /* strip off a single trailing dot if present, primarily for SNI but - there's no use for it */ - host->name[len-1]=0; - - /* Check name for non-ASCII and convert hostname to ACE form if we can */ - if(!is_ASCII_name(host->name)) { -#ifdef USE_LIBIDN2 - if(idn2_check_version(IDN2_VERSION)) { - char *ace_hostname = NULL; -#if IDN2_VERSION_NUMBER >= 0x00140000 - /* IDN2_NFC_INPUT: Normalize input string using normalization form C. - IDN2_NONTRANSITIONAL: Perform Unicode TR46 non-transitional - processing. */ - int flags = IDN2_NFC_INPUT | IDN2_NONTRANSITIONAL; -#else - int flags = IDN2_NFC_INPUT; -#endif - int rc = idn2_lookup_ul((const char *)host->name, &ace_hostname, flags); - if(rc == IDN2_OK) { - host->encalloc = (char *)ace_hostname; - /* change the name pointer to point to the encoded hostname */ - host->name = host->encalloc; - } - else - infof(data, "Failed to convert %s to ACE; %s\n", host->name, - idn2_strerror(rc)); - } -#elif defined(USE_WIN32_IDN) - char *ace_hostname = NULL; - - if(curl_win32_idn_to_ascii(host->name, &ace_hostname)) { - host->encalloc = ace_hostname; - /* change the name pointer to point to the encoded hostname */ - host->name = host->encalloc; - } - else - infof(data, "Failed to convert %s to ACE;\n", host->name); -#else - infof(data, "IDN support not present, can't parse Unicode domains\n"); -#endif - } -} - -/* - * Frees data allocated by fix_hostname() - */ -static void free_fixed_hostname(struct hostname *host) -{ -#if defined(USE_LIBIDN2) - if(host->encalloc) { - idn2_free(host->encalloc); /* must be freed with idn2_free() since this was - allocated by libidn */ - host->encalloc = NULL; - } -#elif defined(USE_WIN32_IDN) - free(host->encalloc); /* must be freed withidn_free() since this was - allocated by curl_win32_idn_to_ascii */ - host->encalloc = NULL; -#else - (void)host; -#endif -} - -static void llist_dtor(void *user, void *element) -{ - (void)user; - (void)element; - /* Do nothing */ -} - -/* - * Allocate and initialize a new connectdata object. - */ -static struct connectdata *allocate_conn(struct Curl_easy *data) -{ - struct connectdata *conn = calloc(1, sizeof(struct connectdata)); - if(!conn) - return NULL; - - conn->handler = &Curl_handler_dummy; /* Be sure we have a handler defined - already from start to avoid NULL - situations and checks */ - - /* and we setup a few fields in case we end up actually using this struct */ - - conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */ - conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */ - conn->tempsock[0] = CURL_SOCKET_BAD; /* no file descriptor */ - conn->tempsock[1] = CURL_SOCKET_BAD; /* no file descriptor */ - conn->connection_id = -1; /* no ID */ - conn->port = -1; /* unknown at this point */ - conn->remote_port = -1; /* unknown at this point */ -#if defined(USE_RECV_BEFORE_SEND_WORKAROUND) && defined(DEBUGBUILD) - conn->postponed[0].bindsock = CURL_SOCKET_BAD; /* no file descriptor */ - conn->postponed[1].bindsock = CURL_SOCKET_BAD; /* no file descriptor */ -#endif /* USE_RECV_BEFORE_SEND_WORKAROUND && DEBUGBUILD */ - - /* Default protocol-independent behavior doesn't support persistent - connections, so we set this to force-close. Protocols that support - this need to set this to FALSE in their "curl_do" functions. */ - connclose(conn, "Default to force-close"); - - /* Store creation time to help future close decision making */ - conn->created = Curl_tvnow(); - - conn->data = data; /* Setup the association between this connection - and the Curl_easy */ - - conn->http_proxy.proxytype = data->set.proxytype; - conn->socks_proxy.proxytype = CURLPROXY_SOCKS4; - -#ifdef CURL_DISABLE_PROXY - - conn->bits.proxy = FALSE; - conn->bits.httpproxy = FALSE; - conn->bits.socksproxy = FALSE; - conn->bits.proxy_user_passwd = FALSE; - conn->bits.tunnel_proxy = FALSE; - -#else /* CURL_DISABLE_PROXY */ - - /* note that these two proxy bits are now just on what looks to be - requested, they may be altered down the road */ - conn->bits.proxy = (data->set.str[STRING_PROXY] && - *data->set.str[STRING_PROXY]) ? TRUE : FALSE; - conn->bits.httpproxy = (conn->bits.proxy && - (conn->http_proxy.proxytype == CURLPROXY_HTTP || - conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0 || - conn->http_proxy.proxytype == CURLPROXY_HTTPS)) ? - TRUE : FALSE; - conn->bits.socksproxy = (conn->bits.proxy && - !conn->bits.httpproxy) ? TRUE : FALSE; - - if(data->set.str[STRING_PRE_PROXY] && *data->set.str[STRING_PRE_PROXY]) { - conn->bits.proxy = TRUE; - conn->bits.socksproxy = TRUE; - } - - conn->bits.proxy_user_passwd = - (data->set.str[STRING_PROXYUSERNAME]) ? TRUE : FALSE; - conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy; - -#endif /* CURL_DISABLE_PROXY */ - - conn->bits.user_passwd = (data->set.str[STRING_USERNAME]) ? TRUE : FALSE; - conn->bits.ftp_use_epsv = data->set.ftp_use_epsv; - conn->bits.ftp_use_eprt = data->set.ftp_use_eprt; - - conn->ssl_config.verifystatus = data->set.ssl.primary.verifystatus; - conn->ssl_config.verifypeer = data->set.ssl.primary.verifypeer; - conn->ssl_config.verifyhost = data->set.ssl.primary.verifyhost; - conn->proxy_ssl_config.verifystatus = - data->set.proxy_ssl.primary.verifystatus; - conn->proxy_ssl_config.verifypeer = data->set.proxy_ssl.primary.verifypeer; - conn->proxy_ssl_config.verifyhost = data->set.proxy_ssl.primary.verifyhost; - - conn->ip_version = data->set.ipver; - -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) - conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD; - conn->ntlm_auth_hlpr_pid = 0; - conn->challenge_header = NULL; - conn->response_header = NULL; -#endif - - if(Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) && - !conn->master_buffer) { - /* Allocate master_buffer to be used for HTTP/1 pipelining */ - conn->master_buffer = calloc(BUFSIZE, sizeof(char)); - if(!conn->master_buffer) - goto error; - } - - /* Initialize the pipeline lists */ - conn->send_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor); - conn->recv_pipe = Curl_llist_alloc((curl_llist_dtor) llist_dtor); - if(!conn->send_pipe || !conn->recv_pipe) - goto error; - -#ifdef HAVE_GSSAPI - conn->data_prot = PROT_CLEAR; -#endif - - /* Store the local bind parameters that will be used for this connection */ - if(data->set.str[STRING_DEVICE]) { - conn->localdev = strdup(data->set.str[STRING_DEVICE]); - if(!conn->localdev) - goto error; - } - conn->localportrange = data->set.localportrange; - conn->localport = data->set.localport; - - /* the close socket stuff needs to be copied to the connection struct as - it may live on without (this specific) Curl_easy */ - conn->fclosesocket = data->set.fclosesocket; - conn->closesocket_client = data->set.closesocket_client; - - return conn; - error: - - Curl_llist_destroy(conn->send_pipe, NULL); - Curl_llist_destroy(conn->recv_pipe, NULL); - - conn->send_pipe = NULL; - conn->recv_pipe = NULL; - - free(conn->master_buffer); - free(conn->localdev); - free(conn); - return NULL; -} - -static CURLcode findprotocol(struct Curl_easy *data, - struct connectdata *conn, - const char *protostr) -{ - const struct Curl_handler * const *pp; - const struct Curl_handler *p; - - /* Scan protocol handler table and match against 'protostr' to set a few - variables based on the URL. Now that the handler may be changed later - when the protocol specific setup function is called. */ - for(pp = protocols; (p = *pp) != NULL; pp++) { - if(strcasecompare(p->scheme, protostr)) { - /* Protocol found in table. Check if allowed */ - if(!(data->set.allowed_protocols & p->protocol)) - /* nope, get out */ - break; - - /* it is allowed for "normal" request, now do an extra check if this is - the result of a redirect */ - if(data->state.this_is_a_follow && - !(data->set.redir_protocols & p->protocol)) - /* nope, get out */ - break; - - /* Perform setup complement if some. */ - conn->handler = conn->given = p; - - /* 'port' and 'remote_port' are set in setup_connection_internals() */ - return CURLE_OK; - } - } - - - /* The protocol was not found in the table, but we don't have to assign it - to anything since it is already assigned to a dummy-struct in the - create_conn() function when the connectdata struct is allocated. */ - failf(data, "Protocol \"%s\" not supported or disabled in " LIBCURL_NAME, - protostr); - - return CURLE_UNSUPPORTED_PROTOCOL; -} - -/* - * Parse URL and fill in the relevant members of the connection struct. - */ -static CURLcode parseurlandfillconn(struct Curl_easy *data, - struct connectdata *conn, - bool *prot_missing, - char **userp, char **passwdp, - char **optionsp) -{ - char *at; - char *fragment; - char *path = data->state.path; - char *query; - int i; - int rc; - const char *protop = ""; - CURLcode result; - bool rebuild_url = FALSE; - bool url_has_scheme = FALSE; - char protobuf[16]; - - *prot_missing = FALSE; - - /* We might pass the entire URL into the request so we need to make sure - * there are no bad characters in there.*/ - if(strpbrk(data->change.url, "\r\n")) { - failf(data, "Illegal characters found in URL"); - return CURLE_URL_MALFORMAT; - } - - /************************************************************* - * Parse the URL. - * - * We need to parse the url even when using the proxy, because we will need - * the hostname and port in case we are trying to SSL connect through the - * proxy -- and we don't know if we will need to use SSL until we parse the - * url ... - ************************************************************/ - if(data->change.url[0] == ':') { - failf(data, "Bad URL, colon is first character"); - return CURLE_URL_MALFORMAT; - } - - /* Make sure we don't mistake a drive letter for a scheme, for example: - curld --proto-default file c:/foo/bar.txt */ - if((('a' <= data->change.url[0] && data->change.url[0] <= 'z') || - ('A' <= data->change.url[0] && data->change.url[0] <= 'Z')) && - data->change.url[1] == ':' && data->set.str[STRING_DEFAULT_PROTOCOL] && - strcasecompare(data->set.str[STRING_DEFAULT_PROTOCOL], "file")) { - ; /* do nothing */ - } - else { /* check for a scheme */ - for(i = 0; i < 16 && data->change.url[i]; ++i) { - if(data->change.url[i] == '/') - break; - if(data->change.url[i] == ':') { - url_has_scheme = TRUE; - break; - } - } - } - - /* handle the file: scheme */ - if((url_has_scheme && strncasecompare(data->change.url, "file:", 5)) || - (!url_has_scheme && data->set.str[STRING_DEFAULT_PROTOCOL] && - strcasecompare(data->set.str[STRING_DEFAULT_PROTOCOL], "file"))) { - bool path_has_drive = FALSE; - - if(url_has_scheme) - rc = sscanf(data->change.url, "%*15[^\n/:]:%[^\n]", path); - else - rc = sscanf(data->change.url, "%[^\n]", path); - - if(rc != 1) { - failf(data, "Bad URL"); - return CURLE_URL_MALFORMAT; - } - - if(url_has_scheme && path[0] == '/' && path[1] == '/') { - /* Allow omitted hostname (e.g. file:/). This is not strictly - * speaking a valid file: URL by RFC 1738, but treating file:/ as - * file://localhost/ is similar to how other schemes treat missing - * hostnames. See RFC 1808. */ - - /* This cannot be done with strcpy() in a portable manner, since the - memory areas overlap! */ - memmove(path, path + 2, strlen(path + 2)+1); - } - - /* the path may start with a drive letter. for backwards compatibility - we skip some processing on those paths. */ - path_has_drive = (('a' <= path[0] && path[0] <= 'z') || - ('A' <= path[0] && path[0] <= 'Z')) && path[1] == ':'; - - /* - * we deal with file:/// differently since it supports no - * hostname other than "localhost" and "127.0.0.1", which is unique among - * the URL protocols specified in RFC 1738 - */ - if(path[0] != '/' && !path_has_drive) { - /* the URL includes a host name, it must match "localhost" or - "127.0.0.1" to be valid */ - char *ptr; - if(!checkprefix("localhost/", path) && - !checkprefix("127.0.0.1/", path)) { - failf(data, "Invalid file://hostname/, " - "expected localhost or 127.0.0.1 or none"); - return CURLE_URL_MALFORMAT; - } - ptr = &path[9]; /* now points to the slash after the host */ - - /* there was a host name and slash present - - RFC1738 (section 3.1, page 5) says: - - The rest of the locator consists of data specific to the scheme, - and is known as the "url-path". It supplies the details of how the - specified resource can be accessed. Note that the "/" between the - host (or port) and the url-path is NOT part of the url-path. - - As most agents use file://localhost/foo to get '/foo' although the - slash preceding foo is a separator and not a slash for the path, - a URL as file://localhost//foo must be valid as well, to refer to - the same file with an absolute path. - */ - - if('/' == ptr[1]) - /* if there was two slashes, we skip the first one as that is then - used truly as a separator */ - ptr++; - - /* This cannot be made with strcpy, as the memory chunks overlap! */ - memmove(path, ptr, strlen(ptr)+1); - - path_has_drive = (('a' <= path[0] && path[0] <= 'z') || - ('A' <= path[0] && path[0] <= 'Z')) && path[1] == ':'; - } - -#if !defined(MSDOS) && !defined(WIN32) && !defined(__CYGWIN__) - if(path_has_drive) { - failf(data, "File drive letters are only accepted in MSDOS/Windows."); - return CURLE_URL_MALFORMAT; - } -#endif - - protop = "file"; /* protocol string */ - } - else { - /* clear path */ - char slashbuf[4]; - path[0]=0; - - rc = sscanf(data->change.url, - "%15[^\n/:]:%3[/]%[^\n/?#]%[^\n]", - protobuf, slashbuf, conn->host.name, path); - if(2 == rc) { - failf(data, "Bad URL"); - return CURLE_URL_MALFORMAT; - } - if(3 > rc) { - - /* - * The URL was badly formatted, let's try the browser-style _without_ - * protocol specified like 'http://'. - */ - rc = sscanf(data->change.url, "%[^\n/?#]%[^\n]", conn->host.name, path); - if(1 > rc) { - /* - * We couldn't even get this format. - * djgpp 2.04 has a sscanf() bug where 'conn->host.name' is - * assigned, but the return value is EOF! - */ -#if defined(__DJGPP__) && (DJGPP_MINOR == 4) - if(!(rc == -1 && *conn->host.name)) -#endif - { - failf(data, " malformed"); - return CURLE_URL_MALFORMAT; - } - } - - /* - * Since there was no protocol part specified in the URL use the - * user-specified default protocol. If we weren't given a default make a - * guess by matching some protocols against the host's outermost - * sub-domain name. Finally if there was no match use HTTP. - */ - - protop = data->set.str[STRING_DEFAULT_PROTOCOL]; - if(!protop) { - /* Note: if you add a new protocol, please update the list in - * lib/version.c too! */ - if(checkprefix("FTP.", conn->host.name)) - protop = "ftp"; - else if(checkprefix("DICT.", conn->host.name)) - protop = "DICT"; - else if(checkprefix("LDAP.", conn->host.name)) - protop = "LDAP"; - else if(checkprefix("IMAP.", conn->host.name)) - protop = "IMAP"; - else if(checkprefix("SMTP.", conn->host.name)) - protop = "smtp"; - else if(checkprefix("POP3.", conn->host.name)) - protop = "pop3"; - else - protop = "http"; - } - - *prot_missing = TRUE; /* not given in URL */ - } - else { - size_t s = strlen(slashbuf); - protop = protobuf; - if(s != 2) { - infof(data, "Unwillingly accepted illegal URL using %d slash%s!\n", - s, s>1?"es":""); - - if(data->change.url_alloc) - free(data->change.url); - /* repair the URL to use two slashes */ - data->change.url = aprintf("%s://%s%s", - protobuf, conn->host.name, path); - if(!data->change.url) - return CURLE_OUT_OF_MEMORY; - data->change.url_alloc = TRUE; - } - } - } - - /* We search for '?' in the host name (but only on the right side of a - * @-letter to allow ?-letters in username and password) to handle things - * like http://example.com?param= (notice the missing '/'). - */ - at = strchr(conn->host.name, '@'); - if(at) - query = strchr(at+1, '?'); - else - query = strchr(conn->host.name, '?'); - - if(query) { - /* We must insert a slash before the '?'-letter in the URL. If the URL had - a slash after the '?', that is where the path currently begins and the - '?string' is still part of the host name. - - We must move the trailing part from the host name and put it first in - the path. And have it all prefixed with a slash. - */ - - size_t hostlen = strlen(query); - size_t pathlen = strlen(path); - - /* move the existing path plus the zero byte forward, to make room for - the host-name part */ - memmove(path+hostlen+1, path, pathlen+1); - - /* now copy the trailing host part in front of the existing path */ - memcpy(path+1, query, hostlen); - - path[0]='/'; /* prepend the missing slash */ - rebuild_url = TRUE; - - *query=0; /* now cut off the hostname at the ? */ - } - else if(!path[0]) { - /* if there's no path set, use a single slash */ - strcpy(path, "/"); - rebuild_url = TRUE; - } - - /* If the URL is malformatted (missing a '/' after hostname before path) we - * insert a slash here. The only letters except '/' that can start a path is - * '?' and '#' - as controlled by the two sscanf() patterns above. - */ - if(path[0] != '/') { - /* We need this function to deal with overlapping memory areas. We know - that the memory area 'path' points to is 'urllen' bytes big and that - is bigger than the path. Use +1 to move the zero byte too. */ - memmove(&path[1], path, strlen(path)+1); - path[0] = '/'; - rebuild_url = TRUE; - } - else if(!data->set.path_as_is) { - /* sanitise paths and remove ../ and ./ sequences according to RFC3986 */ - char *newp = Curl_dedotdotify(path); - if(!newp) - return CURLE_OUT_OF_MEMORY; - - if(strcmp(newp, path)) { - rebuild_url = TRUE; - free(data->state.pathbuffer); - data->state.pathbuffer = newp; - data->state.path = newp; - path = newp; - } - else - free(newp); - } - - /* - * "rebuild_url" means that one or more URL components have been modified so - * we need to generate an updated full version. We need the corrected URL - * when communicating over HTTP proxy and we don't know at this point if - * we're using a proxy or not. - */ - if(rebuild_url) { - char *reurl; - - size_t plen = strlen(path); /* new path, should be 1 byte longer than - the original */ - size_t urllen = strlen(data->change.url); /* original URL length */ - - size_t prefixlen = strlen(conn->host.name); - - if(!*prot_missing) - prefixlen += strlen(protop) + strlen("://"); - - reurl = malloc(urllen + 2); /* 2 for zerobyte + slash */ - if(!reurl) - return CURLE_OUT_OF_MEMORY; - - /* copy the prefix */ - memcpy(reurl, data->change.url, prefixlen); - - /* append the trailing piece + zerobyte */ - memcpy(&reurl[prefixlen], path, plen + 1); - - /* possible free the old one */ - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - - infof(data, "Rebuilt URL to: %s\n", reurl); - - data->change.url = reurl; - data->change.url_alloc = TRUE; /* free this later */ - } - - result = findprotocol(data, conn, protop); - if(result) - return result; - - /* - * Parse the login details from the URL and strip them out of - * the host name - */ - result = parse_url_login(data, conn, userp, passwdp, optionsp); - if(result) - return result; - - if(conn->host.name[0] == '[') { - /* This looks like an IPv6 address literal. See if there is an address - scope if there is no location header */ - char *percent = strchr(conn->host.name, '%'); - if(percent) { - unsigned int identifier_offset = 3; - char *endp; - unsigned long scope; - if(strncmp("%25", percent, 3) != 0) { - infof(data, - "Please URL encode %% as %%25, see RFC 6874.\n"); - identifier_offset = 1; - } - scope = strtoul(percent + identifier_offset, &endp, 10); - if(*endp == ']') { - /* The address scope was well formed. Knock it out of the - hostname. */ - memmove(percent, endp, strlen(endp)+1); - conn->scope_id = (unsigned int)scope; - } - else { - /* Zone identifier is not numeric */ -#if defined(HAVE_NET_IF_H) && defined(IFNAMSIZ) && defined(HAVE_IF_NAMETOINDEX) - char ifname[IFNAMSIZ + 2]; - char *square_bracket; - unsigned int scopeidx = 0; - strncpy(ifname, percent + identifier_offset, IFNAMSIZ + 2); - /* Ensure nullbyte termination */ - ifname[IFNAMSIZ + 1] = '\0'; - square_bracket = strchr(ifname, ']'); - if(square_bracket) { - /* Remove ']' */ - *square_bracket = '\0'; - scopeidx = if_nametoindex(ifname); - if(scopeidx == 0) { - infof(data, "Invalid network interface: %s; %s\n", ifname, - strerror(errno)); - } - } - if(scopeidx > 0) { - char *p = percent + identifier_offset + strlen(ifname); - - /* Remove zone identifier from hostname */ - memmove(percent, p, strlen(p) + 1); - conn->scope_id = scopeidx; - } - else -#endif /* HAVE_NET_IF_H && IFNAMSIZ */ - infof(data, "Invalid IPv6 address format\n"); - } - } - } - - if(data->set.scope_id) - /* Override any scope that was set above. */ - conn->scope_id = data->set.scope_id; - - /* Remove the fragment part of the path. Per RFC 2396, this is always the - last part of the URI. We are looking for the first '#' so that we deal - gracefully with non conformant URI such as http://example.com#foo#bar. */ - fragment = strchr(path, '#'); - if(fragment) { - *fragment = 0; - - /* we know the path part ended with a fragment, so we know the full URL - string does too and we need to cut it off from there so it isn't used - over proxy */ - fragment = strchr(data->change.url, '#'); - if(fragment) - *fragment = 0; - } - - /* - * So if the URL was A://B/C#D, - * protop is A - * conn->host.name is B - * data->state.path is /C - */ - return CURLE_OK; -} - -/* - * If we're doing a resumed transfer, we need to setup our stuff - * properly. - */ -static CURLcode setup_range(struct Curl_easy *data) -{ - struct UrlState *s = &data->state; - s->resume_from = data->set.set_resume_from; - if(s->resume_from || data->set.str[STRING_SET_RANGE]) { - if(s->rangestringalloc) - free(s->range); - - if(s->resume_from) - s->range = aprintf("%" CURL_FORMAT_CURL_OFF_TU "-", s->resume_from); - else - s->range = strdup(data->set.str[STRING_SET_RANGE]); - - s->rangestringalloc = (s->range) ? TRUE : FALSE; - - if(!s->range) - return CURLE_OUT_OF_MEMORY; - - /* tell ourselves to fetch this range */ - s->use_range = TRUE; /* enable range download */ - } - else - s->use_range = FALSE; /* disable range download */ - - return CURLE_OK; -} - - -/* - * setup_connection_internals() - - * - * Setup connection internals specific to the requested protocol in the - * Curl_easy. This is inited and setup before the connection is made but - * is about the particular protocol that is to be used. - * - * This MUST get called after proxy magic has been figured out. - */ -static CURLcode setup_connection_internals(struct connectdata *conn) -{ - const struct Curl_handler * p; - CURLcode result; - struct Curl_easy *data = conn->data; - - /* in some case in the multi state-machine, we go back to the CONNECT state - and then a second (or third or...) call to this function will be made - without doing a DISCONNECT or DONE in between (since the connection is - yet in place) and therefore this function needs to first make sure - there's no lingering previous data allocated. */ - Curl_free_request_state(data); - - memset(&data->req, 0, sizeof(struct SingleRequest)); - data->req.maxdownload = -1; - - conn->socktype = SOCK_STREAM; /* most of them are TCP streams */ - - /* Perform setup complement if some. */ - p = conn->handler; - - if(p->setup_connection) { - result = (*p->setup_connection)(conn); - - if(result) - return result; - - p = conn->handler; /* May have changed. */ - } - - if(conn->port < 0) - /* we check for -1 here since if proxy was detected already, this - was very likely already set to the proxy port */ - conn->port = p->defport; - - return CURLE_OK; -} - -/* - * Curl_free_request_state() should free temp data that was allocated in the - * Curl_easy for this single request. - */ - -void Curl_free_request_state(struct Curl_easy *data) -{ - Curl_safefree(data->req.protop); - Curl_safefree(data->req.newurl); -} - - -#ifndef CURL_DISABLE_PROXY -/**************************************************************** -* Checks if the host is in the noproxy list. returns true if it matches -* and therefore the proxy should NOT be used. -****************************************************************/ -static bool check_noproxy(const char *name, const char *no_proxy) -{ - /* no_proxy=domain1.dom,host.domain2.dom - * (a comma-separated list of hosts which should - * not be proxied, or an asterisk to override - * all proxy variables) - */ - size_t tok_start; - size_t tok_end; - const char *separator = ", "; - size_t no_proxy_len; - size_t namelen; - char *endptr; - - if(no_proxy && no_proxy[0]) { - if(strcasecompare("*", no_proxy)) { - return TRUE; - } - - /* NO_PROXY was specified and it wasn't just an asterisk */ - - no_proxy_len = strlen(no_proxy); - endptr = strchr(name, ':'); - if(endptr) - namelen = endptr - name; - else - namelen = strlen(name); - - for(tok_start = 0; tok_start < no_proxy_len; tok_start = tok_end + 1) { - while(tok_start < no_proxy_len && - strchr(separator, no_proxy[tok_start]) != NULL) { - /* Look for the beginning of the token. */ - ++tok_start; - } - - if(tok_start == no_proxy_len) - break; /* It was all trailing separator chars, no more tokens. */ - - for(tok_end = tok_start; tok_end < no_proxy_len && - strchr(separator, no_proxy[tok_end]) == NULL; ++tok_end) - /* Look for the end of the token. */ - ; - - /* To match previous behaviour, where it was necessary to specify - * ".local.com" to prevent matching "notlocal.com", we will leave - * the '.' off. - */ - if(no_proxy[tok_start] == '.') - ++tok_start; - - if((tok_end - tok_start) <= namelen) { - /* Match the last part of the name to the domain we are checking. */ - const char *checkn = name + namelen - (tok_end - tok_start); - if(strncasecompare(no_proxy + tok_start, checkn, - tok_end - tok_start)) { - if((tok_end - tok_start) == namelen || *(checkn - 1) == '.') { - /* We either have an exact match, or the previous character is a . - * so it is within the same domain, so no proxy for this host. - */ - return TRUE; - } - } - } /* if((tok_end - tok_start) <= namelen) */ - } /* for(tok_start = 0; tok_start < no_proxy_len; - tok_start = tok_end + 1) */ - } /* NO_PROXY was specified and it wasn't just an asterisk */ - - return FALSE; -} - -/**************************************************************** -* Detect what (if any) proxy to use. Remember that this selects a host -* name and is not limited to HTTP proxies only. -* The returned pointer must be freed by the caller (unless NULL) -****************************************************************/ -static char *detect_proxy(struct connectdata *conn) -{ - char *proxy = NULL; - - /* If proxy was not specified, we check for default proxy environment - * variables, to enable i.e Lynx compliance: - * - * http_proxy=http://some.server.dom:port/ - * https_proxy=http://some.server.dom:port/ - * ftp_proxy=http://some.server.dom:port/ - * no_proxy=domain1.dom,host.domain2.dom - * (a comma-separated list of hosts which should - * not be proxied, or an asterisk to override - * all proxy variables) - * all_proxy=http://some.server.dom:port/ - * (seems to exist for the CERN www lib. Probably - * the first to check for.) - * - * For compatibility, the all-uppercase versions of these variables are - * checked if the lowercase versions don't exist. - */ - char proxy_env[128]; - const char *protop = conn->handler->scheme; - char *envp = proxy_env; - char *prox; - - /* Now, build _proxy and check for such a one to use */ - while(*protop) - *envp++ = (char)tolower((int)*protop++); - - /* append _proxy */ - strcpy(envp, "_proxy"); - - /* read the protocol proxy: */ - prox=curl_getenv(proxy_env); - - /* - * We don't try the uppercase version of HTTP_PROXY because of - * security reasons: - * - * When curl is used in a webserver application - * environment (cgi or php), this environment variable can - * be controlled by the web server user by setting the - * http header 'Proxy:' to some value. - * - * This can cause 'internal' http/ftp requests to be - * arbitrarily redirected by any external attacker. - */ - if(!prox && !strcasecompare("http_proxy", proxy_env)) { - /* There was no lowercase variable, try the uppercase version: */ - Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env)); - prox=curl_getenv(proxy_env); - } - - if(prox) - proxy = prox; /* use this */ - else { - proxy = curl_getenv("all_proxy"); /* default proxy to use */ - if(!proxy) - proxy=curl_getenv("ALL_PROXY"); - } - - return proxy; -} - -/* - * If this is supposed to use a proxy, we need to figure out the proxy - * host name, so that we can re-use an existing connection - * that may exist registered to the same proxy host. - */ -static CURLcode parse_proxy(struct Curl_easy *data, - struct connectdata *conn, char *proxy, - curl_proxytype proxytype) -{ - char *prox_portno; - char *endofprot; - - /* We use 'proxyptr' to point to the proxy name from now on... */ - char *proxyptr; - char *portptr; - char *atsign; - long port = -1; - char *proxyuser = NULL; - char *proxypasswd = NULL; - bool sockstype; - - /* We do the proxy host string parsing here. We want the host name and the - * port name. Accept a protocol:// prefix - */ - - /* Parse the protocol part if present */ - endofprot = strstr(proxy, "://"); - if(endofprot) { - proxyptr = endofprot+3; - if(checkprefix("https", proxy)) - proxytype = CURLPROXY_HTTPS; - else if(checkprefix("socks5h", proxy)) - proxytype = CURLPROXY_SOCKS5_HOSTNAME; - else if(checkprefix("socks5", proxy)) - proxytype = CURLPROXY_SOCKS5; - else if(checkprefix("socks4a", proxy)) - proxytype = CURLPROXY_SOCKS4A; - else if(checkprefix("socks4", proxy) || checkprefix("socks", proxy)) - proxytype = CURLPROXY_SOCKS4; - else if(checkprefix("http:", proxy)) - ; /* leave it as HTTP or HTTP/1.0 */ - else { - /* Any other xxx:// reject! */ - failf(data, "Unsupported proxy scheme for \'%s\'", proxy); - return CURLE_COULDNT_CONNECT; - } - } - else - proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */ - -#ifndef HTTPS_PROXY_SUPPORT - if(proxytype == CURLPROXY_HTTPS) { - failf(data, "Unsupported proxy \'%s\'" - ", libcurl is built without the HTTPS-proxy support.", proxy); - return CURLE_NOT_BUILT_IN; - } -#endif - - sockstype = proxytype == CURLPROXY_SOCKS5_HOSTNAME || - proxytype == CURLPROXY_SOCKS5 || - proxytype == CURLPROXY_SOCKS4A || - proxytype == CURLPROXY_SOCKS4; - - /* Is there a username and password given in this proxy url? */ - atsign = strchr(proxyptr, '@'); - if(atsign) { - CURLcode result = - parse_login_details(proxyptr, atsign - proxyptr, - &proxyuser, &proxypasswd, NULL); - if(result) - return result; - proxyptr = atsign + 1; - } - - /* start scanning for port number at this point */ - portptr = proxyptr; - - /* detect and extract RFC6874-style IPv6-addresses */ - if(*proxyptr == '[') { - char *ptr = ++proxyptr; /* advance beyond the initial bracket */ - while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':') || (*ptr == '.'))) - ptr++; - if(*ptr == '%') { - /* There might be a zone identifier */ - if(strncmp("%25", ptr, 3)) - infof(data, "Please URL encode %% as %%25, see RFC 6874.\n"); - ptr++; - /* Allow unreserved characters as defined in RFC 3986 */ - while(*ptr && (ISALPHA(*ptr) || ISXDIGIT(*ptr) || (*ptr == '-') || - (*ptr == '.') || (*ptr == '_') || (*ptr == '~'))) - ptr++; - } - if(*ptr == ']') - /* yeps, it ended nicely with a bracket as well */ - *ptr++ = 0; - else - infof(data, "Invalid IPv6 address format\n"); - portptr = ptr; - /* Note that if this didn't end with a bracket, we still advanced the - * proxyptr first, but I can't see anything wrong with that as no host - * name nor a numeric can legally start with a bracket. - */ - } - - /* Get port number off proxy.server.com:1080 */ - prox_portno = strchr(portptr, ':'); - if(prox_portno) { - char *endp = NULL; - - *prox_portno = 0x0; /* cut off number from host name */ - prox_portno ++; - /* now set the local port number */ - port = strtol(prox_portno, &endp, 10); - if((endp && *endp && (*endp != '/') && (*endp != ' ')) || - (port < 0) || (port > 65535)) { - /* meant to detect for example invalid IPv6 numerical addresses without - brackets: "2a00:fac0:a000::7:13". Accept a trailing slash only - because we then allow "URL style" with the number followed by a - slash, used in curl test cases already. Space is also an acceptable - terminating symbol. */ - infof(data, "No valid port number in proxy string (%s)\n", - prox_portno); - } - else - conn->port = port; - } - else { - if(proxyptr[0]=='/') - /* If the first character in the proxy string is a slash, fail - immediately. The following code will otherwise clear the string which - will lead to code running as if no proxy was set! */ - return CURLE_COULDNT_RESOLVE_PROXY; - - /* without a port number after the host name, some people seem to use - a slash so we strip everything from the first slash */ - atsign = strchr(proxyptr, '/'); - if(atsign) - *atsign = '\0'; /* cut off path part from host name */ - - if(data->set.proxyport) - /* None given in the proxy string, then get the default one if it is - given */ - port = data->set.proxyport; - else { - if(proxytype == CURLPROXY_HTTPS) - port = CURL_DEFAULT_HTTPS_PROXY_PORT; - else - port = CURL_DEFAULT_PROXY_PORT; - } - } - - if(*proxyptr) { - struct proxy_info *proxyinfo = - sockstype ? &conn->socks_proxy : &conn->http_proxy; - proxyinfo->proxytype = proxytype; - - if(proxyuser) { - /* found user and password, rip them out. note that we are unescaping - them, as there is otherwise no way to have a username or password - with reserved characters like ':' in them. */ - Curl_safefree(proxyinfo->user); - proxyinfo->user = curl_easy_unescape(data, proxyuser, 0, NULL); - - if(!proxyinfo->user) - return CURLE_OUT_OF_MEMORY; - - Curl_safefree(proxyinfo->passwd); - if(proxypasswd && strlen(proxypasswd) < MAX_CURL_PASSWORD_LENGTH) - proxyinfo->passwd = curl_easy_unescape(data, proxypasswd, 0, NULL); - else - proxyinfo->passwd = strdup(""); - - if(!proxyinfo->passwd) - return CURLE_OUT_OF_MEMORY; - - conn->bits.proxy_user_passwd = TRUE; /* enable it */ - } - - if(port >= 0) { - proxyinfo->port = port; - if(conn->port < 0 || sockstype || !conn->socks_proxy.host.rawalloc) - conn->port = port; - } - - /* now, clone the cleaned proxy host name */ - Curl_safefree(proxyinfo->host.rawalloc); - proxyinfo->host.rawalloc = strdup(proxyptr); - proxyinfo->host.name = proxyinfo->host.rawalloc; - - if(!proxyinfo->host.rawalloc) - return CURLE_OUT_OF_MEMORY; - } - - Curl_safefree(proxyuser); - Curl_safefree(proxypasswd); - - return CURLE_OK; -} - -/* - * Extract the user and password from the authentication string - */ -static CURLcode parse_proxy_auth(struct Curl_easy *data, - struct connectdata *conn) -{ - char proxyuser[MAX_CURL_USER_LENGTH]=""; - char proxypasswd[MAX_CURL_PASSWORD_LENGTH]=""; - CURLcode result; - - if(data->set.str[STRING_PROXYUSERNAME] != NULL) { - strncpy(proxyuser, data->set.str[STRING_PROXYUSERNAME], - MAX_CURL_USER_LENGTH); - proxyuser[MAX_CURL_USER_LENGTH-1] = '\0'; /*To be on safe side*/ - } - if(data->set.str[STRING_PROXYPASSWORD] != NULL) { - strncpy(proxypasswd, data->set.str[STRING_PROXYPASSWORD], - MAX_CURL_PASSWORD_LENGTH); - proxypasswd[MAX_CURL_PASSWORD_LENGTH-1] = '\0'; /*To be on safe side*/ - } - - result = Curl_urldecode(data, proxyuser, 0, &conn->http_proxy.user, NULL, - FALSE); - if(!result) - result = Curl_urldecode(data, proxypasswd, 0, &conn->http_proxy.passwd, - NULL, FALSE); - return result; -} -#endif /* CURL_DISABLE_PROXY */ - -/* - * parse_url_login() - * - * Parse the login details (user name, password and options) from the URL and - * strip them out of the host name - * - * Inputs: data->set.use_netrc (CURLOPT_NETRC) - * conn->host.name - * - * Outputs: (almost :- all currently undefined) - * conn->bits.user_passwd - non-zero if non-default passwords exist - * user - non-zero length if defined - * passwd - non-zero length if defined - * options - non-zero length if defined - * conn->host.name - remove user name and password - */ -static CURLcode parse_url_login(struct Curl_easy *data, - struct connectdata *conn, - char **user, char **passwd, char **options) -{ - CURLcode result = CURLE_OK; - char *userp = NULL; - char *passwdp = NULL; - char *optionsp = NULL; - - /* At this point, we're hoping all the other special cases have - * been taken care of, so conn->host.name is at most - * [user[:password][;options]]@]hostname - * - * We need somewhere to put the embedded details, so do that first. - */ - - char *ptr = strchr(conn->host.name, '@'); - char *login = conn->host.name; - - DEBUGASSERT(!**user); - DEBUGASSERT(!**passwd); - DEBUGASSERT(!**options); - DEBUGASSERT(conn->handler); - - if(!ptr) - goto out; - - /* We will now try to extract the - * possible login information in a string like: - * ftp://user:password@ftp.my.site:8021/README */ - conn->host.name = ++ptr; - - /* So the hostname is sane. Only bother interpreting the - * results if we could care. It could still be wasted - * work because it might be overtaken by the programmatically - * set user/passwd, but doing that first adds more cases here :-( - */ - - if(data->set.use_netrc == CURL_NETRC_REQUIRED) - goto out; - - /* We could use the login information in the URL so extract it. Only parse - options if the handler says we should. */ - result = parse_login_details(login, ptr - login - 1, - &userp, &passwdp, - (conn->handler->flags & PROTOPT_URLOPTIONS)? - &optionsp:NULL); - if(result) - goto out; - - if(userp) { - char *newname; - - /* We have a user in the URL */ - conn->bits.userpwd_in_url = TRUE; - conn->bits.user_passwd = TRUE; /* enable user+password */ - - /* Decode the user */ - result = Curl_urldecode(data, userp, 0, &newname, NULL, FALSE); - if(result) { - goto out; - } - - free(*user); - *user = newname; - } - - if(passwdp) { - /* We have a password in the URL so decode it */ - char *newpasswd; - result = Curl_urldecode(data, passwdp, 0, &newpasswd, NULL, FALSE); - if(result) { - goto out; - } - - free(*passwd); - *passwd = newpasswd; - } - - if(optionsp) { - /* We have an options list in the URL so decode it */ - char *newoptions; - result = Curl_urldecode(data, optionsp, 0, &newoptions, NULL, FALSE); - if(result) { - goto out; - } - - free(*options); - *options = newoptions; - } - - - out: - - free(userp); - free(passwdp); - free(optionsp); - - return result; -} - -/* - * parse_login_details() - * - * This is used to parse a login string for user name, password and options in - * the following formats: - * - * user - * user:password - * user:password;options - * user;options - * user;options:password - * :password - * :password;options - * ;options - * ;options:password - * - * Parameters: - * - * login [in] - The login string. - * len [in] - The length of the login string. - * userp [in/out] - The address where a pointer to newly allocated memory - * holding the user will be stored upon completion. - * passdwp [in/out] - The address where a pointer to newly allocated memory - * holding the password will be stored upon completion. - * optionsp [in/out] - The address where a pointer to newly allocated memory - * holding the options will be stored upon completion. - * - * Returns CURLE_OK on success. - */ -static CURLcode parse_login_details(const char *login, const size_t len, - char **userp, char **passwdp, - char **optionsp) -{ - CURLcode result = CURLE_OK; - char *ubuf = NULL; - char *pbuf = NULL; - char *obuf = NULL; - const char *psep = NULL; - const char *osep = NULL; - size_t ulen; - size_t plen; - size_t olen; - - /* Attempt to find the password separator */ - if(passwdp) { - psep = strchr(login, ':'); - - /* Within the constraint of the login string */ - if(psep >= login + len) - psep = NULL; - } - - /* Attempt to find the options separator */ - if(optionsp) { - osep = strchr(login, ';'); - - /* Within the constraint of the login string */ - if(osep >= login + len) - osep = NULL; - } - - /* Calculate the portion lengths */ - ulen = (psep ? - (size_t)(osep && psep > osep ? osep - login : psep - login) : - (osep ? (size_t)(osep - login) : len)); - plen = (psep ? - (osep && osep > psep ? (size_t)(osep - psep) : - (size_t)(login + len - psep)) - 1 : 0); - olen = (osep ? - (psep && psep > osep ? (size_t)(psep - osep) : - (size_t)(login + len - osep)) - 1 : 0); - - /* Allocate the user portion buffer */ - if(userp && ulen) { - ubuf = malloc(ulen + 1); - if(!ubuf) - result = CURLE_OUT_OF_MEMORY; - } - - /* Allocate the password portion buffer */ - if(!result && passwdp && plen) { - pbuf = malloc(plen + 1); - if(!pbuf) { - free(ubuf); - result = CURLE_OUT_OF_MEMORY; - } - } - - /* Allocate the options portion buffer */ - if(!result && optionsp && olen) { - obuf = malloc(olen + 1); - if(!obuf) { - free(pbuf); - free(ubuf); - result = CURLE_OUT_OF_MEMORY; - } - } - - if(!result) { - /* Store the user portion if necessary */ - if(ubuf) { - memcpy(ubuf, login, ulen); - ubuf[ulen] = '\0'; - Curl_safefree(*userp); - *userp = ubuf; - } - - /* Store the password portion if necessary */ - if(pbuf) { - memcpy(pbuf, psep + 1, plen); - pbuf[plen] = '\0'; - Curl_safefree(*passwdp); - *passwdp = pbuf; - } - - /* Store the options portion if necessary */ - if(obuf) { - memcpy(obuf, osep + 1, olen); - obuf[olen] = '\0'; - Curl_safefree(*optionsp); - *optionsp = obuf; - } - } - - return result; -} - -/************************************************************* - * Figure out the remote port number and fix it in the URL - * - * No matter if we use a proxy or not, we have to figure out the remote - * port number of various reasons. - * - * To be able to detect port number flawlessly, we must not confuse them - * IPv6-specified addresses in the [0::1] style. (RFC2732) - * - * The conn->host.name is currently [user:passwd@]host[:port] where host - * could be a hostname, IPv4 address or IPv6 address. - * - * The port number embedded in the URL is replaced, if necessary. - *************************************************************/ -static CURLcode parse_remote_port(struct Curl_easy *data, - struct connectdata *conn) -{ - char *portptr; - char endbracket; - - /* Note that at this point, the IPv6 address cannot contain any scope - suffix as that has already been removed in the parseurlandfillconn() - function */ - if((1 == sscanf(conn->host.name, "[%*45[0123456789abcdefABCDEF:.]%c", - &endbracket)) && - (']' == endbracket)) { - /* this is a RFC2732-style specified IP-address */ - conn->bits.ipv6_ip = TRUE; - - conn->host.name++; /* skip over the starting bracket */ - portptr = strchr(conn->host.name, ']'); - if(portptr) { - *portptr++ = '\0'; /* zero terminate, killing the bracket */ - if(':' != *portptr) - portptr = NULL; /* no port number available */ - } - } - else { -#ifdef ENABLE_IPV6 - struct in6_addr in6; - if(Curl_inet_pton(AF_INET6, conn->host.name, &in6) > 0) { - /* This is a numerical IPv6 address, meaning this is a wrongly formatted - URL */ - failf(data, "IPv6 numerical address used in URL without brackets"); - return CURLE_URL_MALFORMAT; - } -#endif - - portptr = strrchr(conn->host.name, ':'); - } - - if(data->set.use_port && data->state.allow_port) { - /* if set, we use this and ignore the port possibly given in the URL */ - conn->remote_port = (unsigned short)data->set.use_port; - if(portptr) - *portptr = '\0'; /* cut off the name there anyway - if there was a port - number - since the port number is to be ignored! */ - if(conn->bits.httpproxy) { - /* we need to create new URL with the new port number */ - char *url; - char type[12]=""; - - if(conn->bits.type_set) - snprintf(type, sizeof(type), ";type=%c", - data->set.prefer_ascii?'A': - (data->set.ftp_list_only?'D':'I')); - - /* - * This synthesized URL isn't always right--suffixes like ;type=A are - * stripped off. It would be better to work directly from the original - * URL and simply replace the port part of it. - */ - url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->given->scheme, - conn->bits.ipv6_ip?"[":"", conn->host.name, - conn->bits.ipv6_ip?"]":"", conn->remote_port, - data->state.slash_removed?"/":"", data->state.path, - type); - if(!url) - return CURLE_OUT_OF_MEMORY; - - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - - data->change.url = url; - data->change.url_alloc = TRUE; - } - } - else if(portptr) { - /* no CURLOPT_PORT given, extract the one from the URL */ - - char *rest; - long port; - - port=strtol(portptr+1, &rest, 10); /* Port number must be decimal */ - - if((port < 0) || (port > 0xffff)) { - /* Single unix standard says port numbers are 16 bits long */ - failf(data, "Port number out of range"); - return CURLE_URL_MALFORMAT; - } - - else if(rest != &portptr[1]) { - *portptr = '\0'; /* cut off the name there */ - conn->remote_port = curlx_ultous(port); - } - else { - if(rest[0]) { - failf(data, "Illegal port number"); - return CURLE_URL_MALFORMAT; - } - /* Browser behavior adaptation. If there's a colon with no digits after, - just cut off the name there which makes us ignore the colon and just - use the default port. Firefox and Chrome both do that. */ - *portptr = '\0'; - } - } - - /* only if remote_port was not already parsed off the URL we use the - default port number */ - if(conn->remote_port < 0) - conn->remote_port = (unsigned short)conn->given->defport; - - return CURLE_OK; -} - -/* - * Override the login details from the URL with that in the CURLOPT_USERPWD - * option or a .netrc file, if applicable. - */ -static CURLcode override_login(struct Curl_easy *data, - struct connectdata *conn, - char **userp, char **passwdp, char **optionsp) -{ - if(data->set.str[STRING_USERNAME]) { - free(*userp); - *userp = strdup(data->set.str[STRING_USERNAME]); - if(!*userp) - return CURLE_OUT_OF_MEMORY; - } - - if(data->set.str[STRING_PASSWORD]) { - free(*passwdp); - *passwdp = strdup(data->set.str[STRING_PASSWORD]); - if(!*passwdp) - return CURLE_OUT_OF_MEMORY; - } - - if(data->set.str[STRING_OPTIONS]) { - free(*optionsp); - *optionsp = strdup(data->set.str[STRING_OPTIONS]); - if(!*optionsp) - return CURLE_OUT_OF_MEMORY; - } - - conn->bits.netrc = FALSE; - if(data->set.use_netrc != CURL_NETRC_IGNORED) { - int ret = Curl_parsenetrc(conn->host.name, - userp, passwdp, - data->set.str[STRING_NETRC_FILE]); - if(ret > 0) { - infof(data, "Couldn't find host %s in the " - DOT_CHAR "netrc file; using defaults\n", - conn->host.name); - } - else if(ret < 0) { - return CURLE_OUT_OF_MEMORY; - } - else { - /* set bits.netrc TRUE to remember that we got the name from a .netrc - file, so that it is safe to use even if we followed a Location: to a - different host or similar. */ - conn->bits.netrc = TRUE; - - conn->bits.user_passwd = TRUE; /* enable user+password */ - } - } - - return CURLE_OK; -} - -/* - * Set the login details so they're available in the connection - */ -static CURLcode set_login(struct connectdata *conn, - const char *user, const char *passwd, - const char *options) -{ - CURLcode result = CURLE_OK; - - /* If our protocol needs a password and we have none, use the defaults */ - if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_passwd) { - /* Store the default user */ - conn->user = strdup(CURL_DEFAULT_USER); - - /* Store the default password */ - if(conn->user) - conn->passwd = strdup(CURL_DEFAULT_PASSWORD); - else - conn->passwd = NULL; - - /* This is the default password, so DON'T set conn->bits.user_passwd */ - } - else { - /* Store the user, zero-length if not set */ - conn->user = strdup(user); - - /* Store the password (only if user is present), zero-length if not set */ - if(conn->user) - conn->passwd = strdup(passwd); - else - conn->passwd = NULL; - } - - if(!conn->user || !conn->passwd) - result = CURLE_OUT_OF_MEMORY; - - /* Store the options, null if not set */ - if(!result && options[0]) { - conn->options = strdup(options); - - if(!conn->options) - result = CURLE_OUT_OF_MEMORY; - } - - return result; -} - -/* - * Parses a "host:port" string to connect to. - * The hostname and the port may be empty; in this case, NULL is returned for - * the hostname and -1 for the port. - */ -static CURLcode parse_connect_to_host_port(struct Curl_easy *data, - const char *host, - char **hostname_result, - int *port_result) -{ - char *host_dup; - char *hostptr; - char *host_portno; - char *portptr; - int port = -1; - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) data; -#endif - - *hostname_result = NULL; - *port_result = -1; - - if(!host || !*host) - return CURLE_OK; - - host_dup = strdup(host); - if(!host_dup) - return CURLE_OUT_OF_MEMORY; - - hostptr = host_dup; - - /* start scanning for port number at this point */ - portptr = hostptr; - - /* detect and extract RFC6874-style IPv6-addresses */ - if(*hostptr == '[') { - char *ptr = ++hostptr; /* advance beyond the initial bracket */ - while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':') || (*ptr == '.'))) - ptr++; - if(*ptr == '%') { - /* There might be a zone identifier */ - if(strncmp("%25", ptr, 3)) - infof(data, "Please URL encode %% as %%25, see RFC 6874.\n"); - ptr++; - /* Allow unreserved characters as defined in RFC 3986 */ - while(*ptr && (ISALPHA(*ptr) || ISXDIGIT(*ptr) || (*ptr == '-') || - (*ptr == '.') || (*ptr == '_') || (*ptr == '~'))) - ptr++; - } - if(*ptr == ']') - /* yeps, it ended nicely with a bracket as well */ - *ptr++ = '\0'; - else - infof(data, "Invalid IPv6 address format\n"); - portptr = ptr; - /* Note that if this didn't end with a bracket, we still advanced the - * hostptr first, but I can't see anything wrong with that as no host - * name nor a numeric can legally start with a bracket. - */ - } - - /* Get port number off server.com:1080 */ - host_portno = strchr(portptr, ':'); - if(host_portno) { - char *endp = NULL; - *host_portno = '\0'; /* cut off number from host name */ - host_portno++; - if(*host_portno) { - long portparse = strtol(host_portno, &endp, 10); - if((endp && *endp) || (portparse < 0) || (portparse > 65535)) { - infof(data, "No valid port number in connect to host string (%s)\n", - host_portno); - hostptr = NULL; - port = -1; - } - else - port = (int)portparse; /* we know it will fit */ - } - } - - /* now, clone the cleaned host name */ - if(hostptr) { - *hostname_result = strdup(hostptr); - if(!*hostname_result) { - free(host_dup); - return CURLE_OUT_OF_MEMORY; - } - } - - *port_result = port; - - free(host_dup); - return CURLE_OK; -} - -/* - * Parses one "connect to" string in the form: - * "HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT". - */ -static CURLcode parse_connect_to_string(struct Curl_easy *data, - struct connectdata *conn, - const char *conn_to_host, - char **host_result, - int *port_result) -{ - CURLcode result = CURLE_OK; - const char *ptr = conn_to_host; - int host_match = FALSE; - int port_match = FALSE; - - *host_result = NULL; - *port_result = -1; - - if(*ptr == ':') { - /* an empty hostname always matches */ - host_match = TRUE; - ptr++; - } - else { - /* check whether the URL's hostname matches */ - size_t hostname_to_match_len; - char *hostname_to_match = aprintf("%s%s%s", - conn->bits.ipv6_ip ? "[" : "", - conn->host.name, - conn->bits.ipv6_ip ? "]" : ""); - if(!hostname_to_match) - return CURLE_OUT_OF_MEMORY; - hostname_to_match_len = strlen(hostname_to_match); - host_match = strncasecompare(ptr, hostname_to_match, - hostname_to_match_len); - free(hostname_to_match); - ptr += hostname_to_match_len; - - host_match = host_match && *ptr == ':'; - ptr++; - } - - if(host_match) { - if(*ptr == ':') { - /* an empty port always matches */ - port_match = TRUE; - ptr++; - } - else { - /* check whether the URL's port matches */ - char *ptr_next = strchr(ptr, ':'); - if(ptr_next) { - char *endp = NULL; - long port_to_match = strtol(ptr, &endp, 10); - if((endp == ptr_next) && (port_to_match == conn->remote_port)) { - port_match = TRUE; - ptr = ptr_next + 1; - } - } - } - } - - if(host_match && port_match) { - /* parse the hostname and port to connect to */ - result = parse_connect_to_host_port(data, ptr, host_result, port_result); - } - - return result; -} - -/* - * Processes all strings in the "connect to" slist, and uses the "connect - * to host" and "connect to port" of the first string that matches. - */ -static CURLcode parse_connect_to_slist(struct Curl_easy *data, - struct connectdata *conn, - struct curl_slist *conn_to_host) -{ - CURLcode result = CURLE_OK; - char *host = NULL; - int port = -1; - - while(conn_to_host && !host && port == -1) { - result = parse_connect_to_string(data, conn, conn_to_host->data, - &host, &port); - if(result) - return result; - - if(host && *host) { - conn->conn_to_host.rawalloc = host; - conn->conn_to_host.name = host; - conn->bits.conn_to_host = TRUE; - - infof(data, "Connecting to hostname: %s\n", host); - } - else { - /* no "connect to host" */ - conn->bits.conn_to_host = FALSE; - Curl_safefree(host); - } - - if(port >= 0) { - conn->conn_to_port = port; - conn->bits.conn_to_port = TRUE; - infof(data, "Connecting to port: %d\n", port); - } - else { - /* no "connect to port" */ - conn->bits.conn_to_port = FALSE; - port = -1; - } - - conn_to_host = conn_to_host->next; - } - - return result; -} - -/************************************************************* - * Resolve the address of the server or proxy - *************************************************************/ -static CURLcode resolve_server(struct Curl_easy *data, - struct connectdata *conn, - bool *async) -{ - CURLcode result=CURLE_OK; - time_t timeout_ms = Curl_timeleft(data, NULL, TRUE); - - /************************************************************* - * Resolve the name of the server or proxy - *************************************************************/ - if(conn->bits.reuse) - /* We're reusing the connection - no need to resolve anything, and - fix_hostname() was called already in create_conn() for the re-use - case. */ - *async = FALSE; - - else { - /* this is a fresh connect */ - int rc; - struct Curl_dns_entry *hostaddr; - -#ifdef USE_UNIX_SOCKETS - if(conn->unix_domain_socket) { - /* Unix domain sockets are local. The host gets ignored, just use the - * specified domain socket address. Do not cache "DNS entries". There is - * no DNS involved and we already have the filesystem path available */ - const char *path = conn->unix_domain_socket; - - hostaddr = calloc(1, sizeof(struct Curl_dns_entry)); - if(!hostaddr) - result = CURLE_OUT_OF_MEMORY; - else { - bool longpath = FALSE; - hostaddr->addr = Curl_unix2addr(path, &longpath, - conn->abstract_unix_socket); - if(hostaddr->addr) - hostaddr->inuse++; - else { - /* Long paths are not supported for now */ - if(longpath) { - failf(data, "Unix socket path too long: '%s'", path); - result = CURLE_COULDNT_RESOLVE_HOST; - } - else - result = CURLE_OUT_OF_MEMORY; - free(hostaddr); - hostaddr = NULL; - } - } - } - else -#endif - if(!conn->bits.proxy) { - struct hostname *connhost; - if(conn->bits.conn_to_host) - connhost = &conn->conn_to_host; - else - connhost = &conn->host; - - /* If not connecting via a proxy, extract the port from the URL, if it is - * there, thus overriding any defaults that might have been set above. */ - if(conn->bits.conn_to_port) - conn->port = conn->conn_to_port; - else - conn->port = conn->remote_port; - - /* Resolve target host right on */ - rc = Curl_resolv_timeout(conn, connhost->name, (int)conn->port, - &hostaddr, timeout_ms); - if(rc == CURLRESOLV_PENDING) - *async = TRUE; - - else if(rc == CURLRESOLV_TIMEDOUT) - result = CURLE_OPERATION_TIMEDOUT; - - else if(!hostaddr) { - failf(data, "Couldn't resolve host '%s'", connhost->dispname); - result = CURLE_COULDNT_RESOLVE_HOST; - /* don't return yet, we need to clean up the timeout first */ - } - } - else { - /* This is a proxy that hasn't been resolved yet. */ - - struct hostname * const host = conn->bits.socksproxy ? - &conn->socks_proxy.host : &conn->http_proxy.host; - - /* resolve proxy */ - rc = Curl_resolv_timeout(conn, host->name, (int)conn->port, - &hostaddr, timeout_ms); - - if(rc == CURLRESOLV_PENDING) - *async = TRUE; - - else if(rc == CURLRESOLV_TIMEDOUT) - result = CURLE_OPERATION_TIMEDOUT; - - else if(!hostaddr) { - failf(data, "Couldn't resolve proxy '%s'", host->dispname); - result = CURLE_COULDNT_RESOLVE_PROXY; - /* don't return yet, we need to clean up the timeout first */ - } - } - DEBUGASSERT(conn->dns_entry == NULL); - conn->dns_entry = hostaddr; - } - - return result; -} - -/* - * Cleanup the connection just allocated before we can move along and use the - * previously existing one. All relevant data is copied over and old_conn is - * ready for freeing once this function returns. - */ -static void reuse_conn(struct connectdata *old_conn, - struct connectdata *conn) -{ - free_fixed_hostname(&old_conn->http_proxy.host); - free_fixed_hostname(&old_conn->socks_proxy.host); - - free(old_conn->http_proxy.host.rawalloc); - free(old_conn->socks_proxy.host.rawalloc); - - /* free the SSL config struct from this connection struct as this was - allocated in vain and is targeted for destruction */ - Curl_free_primary_ssl_config(&old_conn->ssl_config); - Curl_free_primary_ssl_config(&old_conn->proxy_ssl_config); - - conn->data = old_conn->data; - - /* get the user+password information from the old_conn struct since it may - * be new for this request even when we re-use an existing connection */ - conn->bits.user_passwd = old_conn->bits.user_passwd; - if(conn->bits.user_passwd) { - /* use the new user name and password though */ - Curl_safefree(conn->user); - Curl_safefree(conn->passwd); - conn->user = old_conn->user; - conn->passwd = old_conn->passwd; - old_conn->user = NULL; - old_conn->passwd = NULL; - } - - conn->bits.proxy_user_passwd = old_conn->bits.proxy_user_passwd; - if(conn->bits.proxy_user_passwd) { - /* use the new proxy user name and proxy password though */ - Curl_safefree(conn->http_proxy.user); - Curl_safefree(conn->socks_proxy.user); - Curl_safefree(conn->http_proxy.passwd); - Curl_safefree(conn->socks_proxy.passwd); - conn->http_proxy.user = old_conn->http_proxy.user; - conn->socks_proxy.user = old_conn->socks_proxy.user; - conn->http_proxy.passwd = old_conn->http_proxy.passwd; - conn->socks_proxy.passwd = old_conn->socks_proxy.passwd; - old_conn->http_proxy.user = NULL; - old_conn->socks_proxy.user = NULL; - old_conn->http_proxy.passwd = NULL; - old_conn->socks_proxy.passwd = NULL; - } - - /* host can change, when doing keepalive with a proxy or if the case is - different this time etc */ - free_fixed_hostname(&conn->host); - free_fixed_hostname(&conn->conn_to_host); - Curl_safefree(conn->host.rawalloc); - Curl_safefree(conn->conn_to_host.rawalloc); - conn->host=old_conn->host; - conn->bits.conn_to_host = old_conn->bits.conn_to_host; - conn->conn_to_host = old_conn->conn_to_host; - conn->bits.conn_to_port = old_conn->bits.conn_to_port; - conn->conn_to_port = old_conn->conn_to_port; - - /* persist connection info in session handle */ - Curl_persistconninfo(conn); - - conn_reset_all_postponed_data(old_conn); /* free buffers */ - conn_reset_all_postponed_data(conn); /* reset unprocessed data */ - - /* re-use init */ - conn->bits.reuse = TRUE; /* yes, we're re-using here */ - - Curl_safefree(old_conn->user); - Curl_safefree(old_conn->passwd); - Curl_safefree(old_conn->http_proxy.user); - Curl_safefree(old_conn->socks_proxy.user); - Curl_safefree(old_conn->http_proxy.passwd); - Curl_safefree(old_conn->socks_proxy.passwd); - Curl_safefree(old_conn->localdev); - - Curl_llist_destroy(old_conn->send_pipe, NULL); - Curl_llist_destroy(old_conn->recv_pipe, NULL); - - old_conn->send_pipe = NULL; - old_conn->recv_pipe = NULL; - - Curl_safefree(old_conn->master_buffer); - -#ifdef USE_UNIX_SOCKETS - Curl_safefree(old_conn->unix_domain_socket); -#endif -} - -/** - * create_conn() sets up a new connectdata struct, or re-uses an already - * existing one, and resolves host name. - * - * if this function returns CURLE_OK and *async is set to TRUE, the resolve - * response will be coming asynchronously. If *async is FALSE, the name is - * already resolved. - * - * @param data The sessionhandle pointer - * @param in_connect is set to the next connection data pointer - * @param async is set TRUE when an async DNS resolution is pending - * @see Curl_setup_conn() - * - * *NOTE* this function assigns the conn->data pointer! - */ - -static CURLcode create_conn(struct Curl_easy *data, - struct connectdata **in_connect, - bool *async) -{ - CURLcode result = CURLE_OK; - struct connectdata *conn; - struct connectdata *conn_temp = NULL; - size_t urllen; - char *user = NULL; - char *passwd = NULL; - char *options = NULL; - bool reuse; - char *proxy = NULL; - char *socksproxy = NULL; - char *no_proxy = NULL; - bool prot_missing = FALSE; - bool connections_available = TRUE; - bool force_reuse = FALSE; - bool waitpipe = FALSE; - size_t max_host_connections = Curl_multi_max_host_connections(data->multi); - size_t max_total_connections = Curl_multi_max_total_connections(data->multi); - - *async = FALSE; - - /************************************************************* - * Check input data - *************************************************************/ - - if(!data->change.url) { - result = CURLE_URL_MALFORMAT; - goto out; - } - - /* First, split up the current URL in parts so that we can use the - parts for checking against the already present connections. In order - to not have to modify everything at once, we allocate a temporary - connection data struct and fill in for comparison purposes. */ - conn = allocate_conn(data); - - if(!conn) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - - /* We must set the return variable as soon as possible, so that our - parent can cleanup any possible allocs we may have done before - any failure */ - *in_connect = conn; - - /* This initing continues below, see the comment "Continue connectdata - * initialization here" */ - - /*********************************************************** - * We need to allocate memory to store the path in. We get the size of the - * full URL to be sure, and we need to make it at least 256 bytes since - * other parts of the code will rely on this fact - ***********************************************************/ -#define LEAST_PATH_ALLOC 256 - urllen=strlen(data->change.url); - if(urllen < LEAST_PATH_ALLOC) - urllen=LEAST_PATH_ALLOC; - - /* - * We malloc() the buffers below urllen+2 to make room for 2 possibilities: - * 1 - an extra terminating zero - * 2 - an extra slash (in case a syntax like "www.host.com?moo" is used) - */ - - Curl_safefree(data->state.pathbuffer); - data->state.path = NULL; - - data->state.pathbuffer = malloc(urllen+2); - if(NULL == data->state.pathbuffer) { - result = CURLE_OUT_OF_MEMORY; /* really bad error */ - goto out; - } - data->state.path = data->state.pathbuffer; - - conn->host.rawalloc = malloc(urllen+2); - if(NULL == conn->host.rawalloc) { - Curl_safefree(data->state.pathbuffer); - data->state.path = NULL; - result = CURLE_OUT_OF_MEMORY; - goto out; - } - - conn->host.name = conn->host.rawalloc; - conn->host.name[0] = 0; - - user = strdup(""); - passwd = strdup(""); - options = strdup(""); - if(!user || !passwd || !options) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - - result = parseurlandfillconn(data, conn, &prot_missing, &user, &passwd, - &options); - if(result) - goto out; - - /************************************************************* - * No protocol part in URL was used, add it! - *************************************************************/ - if(prot_missing) { - /* We're guessing prefixes here and if we're told to use a proxy or if - we're gonna follow a Location: later or... then we need the protocol - part added so that we have a valid URL. */ - char *reurl; - char *ch_lower; - - reurl = aprintf("%s://%s", conn->handler->scheme, data->change.url); - - if(!reurl) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - - /* Change protocol prefix to lower-case */ - for(ch_lower = reurl; *ch_lower != ':'; ch_lower++) - *ch_lower = (char)TOLOWER(*ch_lower); - - if(data->change.url_alloc) { - Curl_safefree(data->change.url); - data->change.url_alloc = FALSE; - } - - data->change.url = reurl; - data->change.url_alloc = TRUE; /* free this later */ - } - - /************************************************************* - * If the protocol can't handle url query strings, then cut - * off the unhandable part - *************************************************************/ - if((conn->given->flags&PROTOPT_NOURLQUERY)) { - char *path_q_sep = strchr(conn->data->state.path, '?'); - if(path_q_sep) { - /* according to rfc3986, allow the query (?foo=bar) - also on protocols that can't handle it. - - cut the string-part after '?' - */ - - /* terminate the string */ - path_q_sep[0] = 0; - } - } - - if(data->set.str[STRING_BEARER]) { - conn->oauth_bearer = strdup(data->set.str[STRING_BEARER]); - if(!conn->oauth_bearer) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - } - -#ifndef CURL_DISABLE_PROXY - /************************************************************* - * Extract the user and password from the authentication string - *************************************************************/ - if(conn->bits.proxy_user_passwd) { - result = parse_proxy_auth(data, conn); - if(result) - goto out; - } - - /************************************************************* - * Detect what (if any) proxy to use - *************************************************************/ - if(data->set.str[STRING_PROXY]) { - proxy = strdup(data->set.str[STRING_PROXY]); - /* if global proxy is set, this is it */ - if(NULL == proxy) { - failf(data, "memory shortage"); - result = CURLE_OUT_OF_MEMORY; - goto out; - } - } - - if(data->set.str[STRING_PRE_PROXY]) { - socksproxy = strdup(data->set.str[STRING_PRE_PROXY]); - /* if global socks proxy is set, this is it */ - if(NULL == socksproxy) { - failf(data, "memory shortage"); - result = CURLE_OUT_OF_MEMORY; - goto out; - } - } - - no_proxy = curl_getenv("no_proxy"); - if(!no_proxy) - no_proxy = curl_getenv("NO_PROXY"); - - if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY]) || - (!data->set.str[STRING_NOPROXY] && - check_noproxy(conn->host.name, no_proxy))) { - Curl_safefree(proxy); - Curl_safefree(socksproxy); - } - else if(!proxy && !socksproxy) -#ifndef CURL_DISABLE_HTTP - /* if the host is not in the noproxy list, detect proxy. */ - proxy = detect_proxy(conn); -#else /* !CURL_DISABLE_HTTP */ - proxy = NULL; -#endif /* CURL_DISABLE_HTTP */ - - Curl_safefree(no_proxy); - -#ifdef USE_UNIX_SOCKETS - if(data->set.str[STRING_UNIX_SOCKET_PATH]) { - if(proxy) { - free(proxy); /* Unix domain sockets cannot be proxied, so disable it */ - proxy = NULL; - } - conn->unix_domain_socket = strdup(data->set.str[STRING_UNIX_SOCKET_PATH]); - if(conn->unix_domain_socket == NULL) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - conn->abstract_unix_socket = data->set.abstract_unix_socket; - } -#endif - - if(proxy && (!*proxy || (conn->handler->flags & PROTOPT_NONETWORK))) { - free(proxy); /* Don't bother with an empty proxy string or if the - protocol doesn't work with network */ - proxy = NULL; - } - if(socksproxy && (!*socksproxy || - (conn->handler->flags & PROTOPT_NONETWORK))) { - free(socksproxy); /* Don't bother with an empty socks proxy string or if - the protocol doesn't work with network */ - socksproxy = NULL; - } - - /*********************************************************************** - * If this is supposed to use a proxy, we need to figure out the proxy host - * name, proxy type and port number, so that we can re-use an existing - * connection that may exist registered to the same proxy host. - ***********************************************************************/ - if(proxy || socksproxy) { - if(proxy) { - result = parse_proxy(data, conn, proxy, conn->http_proxy.proxytype); - Curl_safefree(proxy); /* parse_proxy copies the proxy string */ - if(result) - goto out; - } - - if(socksproxy) { - result = parse_proxy(data, conn, socksproxy, - conn->socks_proxy.proxytype); - /* parse_proxy copies the socks proxy string */ - Curl_safefree(socksproxy); - if(result) - goto out; - } - - if(conn->http_proxy.host.rawalloc) { -#ifdef CURL_DISABLE_HTTP - /* asking for a HTTP proxy is a bit funny when HTTP is disabled... */ - result = CURLE_UNSUPPORTED_PROTOCOL; - goto out; -#else - /* force this connection's protocol to become HTTP if not already - compatible - if it isn't tunneling through */ - if(!(conn->handler->protocol & PROTO_FAMILY_HTTP) && - !conn->bits.tunnel_proxy) - conn->handler = &Curl_handler_http; - - conn->bits.httpproxy = TRUE; -#endif - } - else { - conn->bits.httpproxy = FALSE; /* not a HTTP proxy */ - conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */ - } - - if(conn->socks_proxy.host.rawalloc) { - if(!conn->http_proxy.host.rawalloc) { - /* once a socks proxy */ - if(!conn->socks_proxy.user) { - conn->socks_proxy.user = conn->http_proxy.user; - conn->http_proxy.user = NULL; - Curl_safefree(conn->socks_proxy.passwd); - conn->socks_proxy.passwd = conn->http_proxy.passwd; - conn->http_proxy.passwd = NULL; - } - } - conn->bits.socksproxy = TRUE; - } - else - conn->bits.socksproxy = FALSE; /* not a socks proxy */ - } - else { - conn->bits.socksproxy = FALSE; - conn->bits.httpproxy = FALSE; - } - conn->bits.proxy = conn->bits.httpproxy || conn->bits.socksproxy; - - if(!conn->bits.proxy) { - /* we aren't using the proxy after all... */ - conn->bits.proxy = FALSE; - conn->bits.httpproxy = FALSE; - conn->bits.socksproxy = FALSE; - conn->bits.proxy_user_passwd = FALSE; - conn->bits.tunnel_proxy = FALSE; - } - -#endif /* CURL_DISABLE_PROXY */ - - /************************************************************* - * If the protocol is using SSL and HTTP proxy is used, we set - * the tunnel_proxy bit. - *************************************************************/ - if((conn->given->flags&PROTOPT_SSL) && conn->bits.httpproxy) - conn->bits.tunnel_proxy = TRUE; - - /************************************************************* - * Figure out the remote port number and fix it in the URL - *************************************************************/ - result = parse_remote_port(data, conn); - if(result) - goto out; - - /* Check for overridden login details and set them accordingly so they - they are known when protocol->setup_connection is called! */ - result = override_login(data, conn, &user, &passwd, &options); - if(result) - goto out; - result = set_login(conn, user, passwd, options); - if(result) - goto out; - - /************************************************************* - * Process the "connect to" linked list of hostname/port mappings. - * Do this after the remote port number has been fixed in the URL. - *************************************************************/ - result = parse_connect_to_slist(data, conn, data->set.connect_to); - if(result) - goto out; - - /************************************************************* - * IDN-fix the hostnames - *************************************************************/ - fix_hostname(conn, &conn->host); - if(conn->bits.conn_to_host) - fix_hostname(conn, &conn->conn_to_host); - if(conn->bits.httpproxy) - fix_hostname(conn, &conn->http_proxy.host); - if(conn->bits.socksproxy) - fix_hostname(conn, &conn->socks_proxy.host); - - /************************************************************* - * Check whether the host and the "connect to host" are equal. - * Do this after the hostnames have been IDN-fixed. - *************************************************************/ - if(conn->bits.conn_to_host && - strcasecompare(conn->conn_to_host.name, conn->host.name)) { - conn->bits.conn_to_host = FALSE; - } - - /************************************************************* - * Check whether the port and the "connect to port" are equal. - * Do this after the remote port number has been fixed in the URL. - *************************************************************/ - if(conn->bits.conn_to_port && conn->conn_to_port == conn->remote_port) { - conn->bits.conn_to_port = FALSE; - } - - /************************************************************* - * If the "connect to" feature is used with an HTTP proxy, - * we set the tunnel_proxy bit. - *************************************************************/ - if((conn->bits.conn_to_host || conn->bits.conn_to_port) && - conn->bits.httpproxy) - conn->bits.tunnel_proxy = TRUE; - - /************************************************************* - * Setup internals depending on protocol. Needs to be done after - * we figured out what/if proxy to use. - *************************************************************/ - result = setup_connection_internals(conn); - if(result) - goto out; - - conn->recv[FIRSTSOCKET] = Curl_recv_plain; - conn->send[FIRSTSOCKET] = Curl_send_plain; - conn->recv[SECONDARYSOCKET] = Curl_recv_plain; - conn->send[SECONDARYSOCKET] = Curl_send_plain; - - conn->bits.tcp_fastopen = data->set.tcp_fastopen; - - /*********************************************************************** - * file: is a special case in that it doesn't need a network connection - ***********************************************************************/ -#ifndef CURL_DISABLE_FILE - if(conn->handler->flags & PROTOPT_NONETWORK) { - bool done; - /* this is supposed to be the connect function so we better at least check - that the file is present here! */ - DEBUGASSERT(conn->handler->connect_it); - result = conn->handler->connect_it(conn, &done); - - /* Setup a "faked" transfer that'll do nothing */ - if(!result) { - conn->data = data; - conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */ - - Curl_conncache_add_conn(data->state.conn_cache, conn); - - /* - * Setup whatever necessary for a resumed transfer - */ - result = setup_range(data); - if(result) { - DEBUGASSERT(conn->handler->done); - /* we ignore the return code for the protocol-specific DONE */ - (void)conn->handler->done(conn, result, FALSE); - goto out; - } - - Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */ - -1, NULL); /* no upload */ - } - - /* since we skip do_init() */ - Curl_init_do(data, conn); - - goto out; - } -#endif - - /* Get a cloned copy of the SSL config situation stored in the - connection struct. But to get this going nicely, we must first make - sure that the strings in the master copy are pointing to the correct - strings in the session handle strings array! - - Keep in mind that the pointers in the master copy are pointing to strings - that will be freed as part of the Curl_easy struct, but all cloned - copies will be separately allocated. - */ - data->set.ssl.primary.CApath = data->set.str[STRING_SSL_CAPATH_ORIG]; - data->set.proxy_ssl.primary.CApath = data->set.str[STRING_SSL_CAPATH_PROXY]; - data->set.ssl.primary.CAfile = data->set.str[STRING_SSL_CAFILE_ORIG]; - data->set.proxy_ssl.primary.CAfile = data->set.str[STRING_SSL_CAFILE_PROXY]; - data->set.ssl.primary.random_file = data->set.str[STRING_SSL_RANDOM_FILE]; - data->set.proxy_ssl.primary.random_file = - data->set.str[STRING_SSL_RANDOM_FILE]; - data->set.ssl.primary.egdsocket = data->set.str[STRING_SSL_EGDSOCKET]; - data->set.proxy_ssl.primary.egdsocket = data->set.str[STRING_SSL_EGDSOCKET]; - data->set.ssl.primary.cipher_list = - data->set.str[STRING_SSL_CIPHER_LIST_ORIG]; - data->set.proxy_ssl.primary.cipher_list = - data->set.str[STRING_SSL_CIPHER_LIST_PROXY]; - - data->set.ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_ORIG]; - data->set.proxy_ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY]; - data->set.ssl.issuercert = data->set.str[STRING_SSL_ISSUERCERT_ORIG]; - data->set.proxy_ssl.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY]; - data->set.ssl.cert = data->set.str[STRING_CERT_ORIG]; - data->set.proxy_ssl.cert = data->set.str[STRING_CERT_PROXY]; - data->set.ssl.cert_type = data->set.str[STRING_CERT_TYPE_ORIG]; - data->set.proxy_ssl.cert_type = data->set.str[STRING_CERT_TYPE_PROXY]; - data->set.ssl.key = data->set.str[STRING_KEY_ORIG]; - data->set.proxy_ssl.key = data->set.str[STRING_KEY_PROXY]; - data->set.ssl.key_type = data->set.str[STRING_KEY_TYPE_ORIG]; - data->set.proxy_ssl.key_type = data->set.str[STRING_KEY_TYPE_PROXY]; - data->set.ssl.key_passwd = data->set.str[STRING_KEY_PASSWD_ORIG]; - data->set.proxy_ssl.key_passwd = data->set.str[STRING_KEY_PASSWD_PROXY]; - data->set.ssl.primary.clientcert = data->set.str[STRING_CERT_ORIG]; - data->set.proxy_ssl.primary.clientcert = data->set.str[STRING_CERT_PROXY]; -#ifdef USE_TLS_SRP - data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME_ORIG]; - data->set.proxy_ssl.username = data->set.str[STRING_TLSAUTH_USERNAME_PROXY]; - data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD_ORIG]; - data->set.proxy_ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD_PROXY]; -#endif - - if(!Curl_clone_primary_ssl_config(&data->set.ssl.primary, - &conn->ssl_config)) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - - if(!Curl_clone_primary_ssl_config(&data->set.proxy_ssl.primary, - &conn->proxy_ssl_config)) { - result = CURLE_OUT_OF_MEMORY; - goto out; - } - - prune_dead_connections(data); - - /************************************************************* - * Check the current list of connections to see if we can - * re-use an already existing one or if we have to create a - * new one. - *************************************************************/ - - /* reuse_fresh is TRUE if we are told to use a new connection by force, but - we only acknowledge this option if this is not a re-used connection - already (which happens due to follow-location or during a HTTP - authentication phase). */ - if(data->set.reuse_fresh && !data->state.this_is_a_follow) - reuse = FALSE; - else - reuse = ConnectionExists(data, conn, &conn_temp, &force_reuse, &waitpipe); - - /* If we found a reusable connection, we may still want to - open a new connection if we are pipelining. */ - if(reuse && !force_reuse && IsPipeliningPossible(data, conn_temp)) { - size_t pipelen = conn_temp->send_pipe->size + conn_temp->recv_pipe->size; - if(pipelen > 0) { - infof(data, "Found connection %ld, with requests in the pipe (%zu)\n", - conn_temp->connection_id, pipelen); - - if(conn_temp->bundle->num_connections < max_host_connections && - data->state.conn_cache->num_connections < max_total_connections) { - /* We want a new connection anyway */ - reuse = FALSE; - - infof(data, "We can reuse, but we want a new connection anyway\n"); - } - } - } - - if(reuse) { - /* - * We already have a connection for this, we got the former connection - * in the conn_temp variable and thus we need to cleanup the one we - * just allocated before we can move along and use the previously - * existing one. - */ - conn_temp->inuse = TRUE; /* mark this as being in use so that no other - handle in a multi stack may nick it */ - reuse_conn(conn, conn_temp); - free(conn); /* we don't need this anymore */ - conn = conn_temp; - *in_connect = conn; - - infof(data, "Re-using existing connection! (#%ld) with %s %s\n", - conn->connection_id, - conn->bits.proxy?"proxy":"host", - conn->socks_proxy.host.name ? conn->socks_proxy.host.dispname : - conn->http_proxy.host.name ? conn->http_proxy.host.dispname : - conn->host.dispname); - } - else { - /* We have decided that we want a new connection. However, we may not - be able to do that if we have reached the limit of how many - connections we are allowed to open. */ - struct connectbundle *bundle = NULL; - - if(conn->handler->flags & PROTOPT_ALPN_NPN) { - /* The protocol wants it, so set the bits if enabled in the easy handle - (default) */ - if(data->set.ssl_enable_alpn) - conn->bits.tls_enable_alpn = TRUE; - if(data->set.ssl_enable_npn) - conn->bits.tls_enable_npn = TRUE; - } - - if(waitpipe) - /* There is a connection that *might* become usable for pipelining - "soon", and we wait for that */ - connections_available = FALSE; - else - bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache); - - if(max_host_connections > 0 && bundle && - (bundle->num_connections >= max_host_connections)) { - struct connectdata *conn_candidate; - - /* The bundle is full. Let's see if we can kill a connection. */ - conn_candidate = find_oldest_idle_connection_in_bundle(data, bundle); - - if(conn_candidate) { - /* Set the connection's owner correctly, then kill it */ - conn_candidate->data = data; - (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); - } - else { - infof(data, "No more connections allowed to host: %d\n", - max_host_connections); - connections_available = FALSE; - } - } - - if(connections_available && - (max_total_connections > 0) && - (data->state.conn_cache->num_connections >= max_total_connections)) { - struct connectdata *conn_candidate; - - /* The cache is full. Let's see if we can kill a connection. */ - conn_candidate = Curl_oldest_idle_connection(data); - - if(conn_candidate) { - /* Set the connection's owner correctly, then kill it */ - conn_candidate->data = data; - (void)Curl_disconnect(conn_candidate, /* dead_connection */ FALSE); - } - else { - infof(data, "No connections available in cache\n"); - connections_available = FALSE; - } - } - - if(!connections_available) { - infof(data, "No connections available.\n"); - - conn_free(conn); - *in_connect = NULL; - - result = CURLE_NO_CONNECTION_AVAILABLE; - goto out; - } - else { - /* - * This is a brand new connection, so let's store it in the connection - * cache of ours! - */ - Curl_conncache_add_conn(data->state.conn_cache, conn); - } - -#if defined(USE_NTLM) - /* If NTLM is requested in a part of this connection, make sure we don't - assume the state is fine as this is a fresh connection and NTLM is - connection based. */ - if((data->state.authhost.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) && - data->state.authhost.done) { - infof(data, "NTLM picked AND auth done set, clear picked!\n"); - data->state.authhost.picked = CURLAUTH_NONE; - data->state.authhost.done = FALSE; - } - - if((data->state.authproxy.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) && - data->state.authproxy.done) { - infof(data, "NTLM-proxy picked AND auth done set, clear picked!\n"); - data->state.authproxy.picked = CURLAUTH_NONE; - data->state.authproxy.done = FALSE; - } -#endif - } - - /* Mark the connection as used */ - conn->inuse = TRUE; - - /* Setup and init stuff before DO starts, in preparing for the transfer. */ - Curl_init_do(data, conn); - - /* - * Setup whatever necessary for a resumed transfer - */ - result = setup_range(data); - if(result) - goto out; - - /* Continue connectdata initialization here. */ - - /* - * Inherit the proper values from the urldata struct AFTER we have arranged - * the persistent connection stuff - */ - conn->seek_func = data->set.seek_func; - conn->seek_client = data->set.seek_client; - - /************************************************************* - * Resolve the address of the server or proxy - *************************************************************/ - result = resolve_server(data, conn, async); - - out: - - free(options); - free(passwd); - free(user); - free(socksproxy); - free(proxy); - return result; -} - -/* Curl_setup_conn() is called after the name resolve initiated in - * create_conn() is all done. - * - * Curl_setup_conn() also handles reused connections - * - * conn->data MUST already have been setup fine (in create_conn) - */ - -CURLcode Curl_setup_conn(struct connectdata *conn, - bool *protocol_done) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - Curl_pgrsTime(data, TIMER_NAMELOOKUP); - - if(conn->handler->flags & PROTOPT_NONETWORK) { - /* nothing to setup when not using a network */ - *protocol_done = TRUE; - return result; - } - *protocol_done = FALSE; /* default to not done */ - - /* set proxy_connect_closed to false unconditionally already here since it - is used strictly to provide extra information to a parent function in the - case of proxy CONNECT failures and we must make sure we don't have it - lingering set from a previous invoke */ - conn->bits.proxy_connect_closed = FALSE; - - /* - * Set user-agent. Used for HTTP, but since we can attempt to tunnel - * basically anything through a http proxy we can't limit this based on - * protocol. - */ - if(data->set.str[STRING_USERAGENT]) { - Curl_safefree(conn->allocptr.uagent); - conn->allocptr.uagent = - aprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]); - if(!conn->allocptr.uagent) - return CURLE_OUT_OF_MEMORY; - } - - data->req.headerbytecount = 0; - -#ifdef CURL_DO_LINEEND_CONV - data->state.crlf_conversions = 0; /* reset CRLF conversion counter */ -#endif /* CURL_DO_LINEEND_CONV */ - - /* set start time here for timeout purposes in the connect procedure, it - is later set again for the progress meter purpose */ - conn->now = Curl_tvnow(); - - if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) { - conn->bits.tcpconnect[FIRSTSOCKET] = FALSE; - result = Curl_connecthost(conn, conn->dns_entry); - if(result) - return result; - } - else { - Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */ - Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */ - conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; - *protocol_done = TRUE; - Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]); - Curl_verboseconnect(conn); - } - - conn->now = Curl_tvnow(); /* time this *after* the connect is done, we - set this here perhaps a second time */ - -#ifdef __EMX__ - /* - * This check is quite a hack. We're calling _fsetmode to fix the problem - * with fwrite converting newline characters (you get mangled text files, - * and corrupted binary files when you download to stdout and redirect it to - * a file). - */ - - if((data->set.out)->_handle == NULL) { - _fsetmode(stdout, "b"); - } -#endif - - return result; -} - -CURLcode Curl_connect(struct Curl_easy *data, - struct connectdata **in_connect, - bool *asyncp, - bool *protocol_done) -{ - CURLcode result; - - *asyncp = FALSE; /* assume synchronous resolves by default */ - - /* call the stuff that needs to be called */ - result = create_conn(data, in_connect, asyncp); - - if(!result) { - /* no error */ - if((*in_connect)->send_pipe->size || (*in_connect)->recv_pipe->size) - /* pipelining */ - *protocol_done = TRUE; - else if(!*asyncp) { - /* DNS resolution is done: that's either because this is a reused - connection, in which case DNS was unnecessary, or because DNS - really did finish already (synch resolver/fast async resolve) */ - result = Curl_setup_conn(*in_connect, protocol_done); - } - } - - if(result == CURLE_NO_CONNECTION_AVAILABLE) { - *in_connect = NULL; - return result; - } - - if(result && *in_connect) { - /* We're not allowed to return failure with memory left allocated - in the connectdata struct, free those here */ - Curl_disconnect(*in_connect, FALSE); /* close the connection */ - *in_connect = NULL; /* return a NULL */ - } - - return result; -} - -/* - * Curl_init_do() inits the readwrite session. This is inited each time (in - * the DO function before the protocol-specific DO functions are invoked) for - * a transfer, sometimes multiple times on the same Curl_easy. Make sure - * nothing in here depends on stuff that are setup dynamically for the - * transfer. - * - * Allow this function to get called with 'conn' set to NULL. - */ - -CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) -{ - struct SingleRequest *k = &data->req; - - if(conn) - conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to - * use */ - - data->state.done = FALSE; /* *_done() is not called yet */ - data->state.expect100header = FALSE; - - if(data->set.opt_no_body) - /* in HTTP lingo, no body means using the HEAD request... */ - data->set.httpreq = HTTPREQ_HEAD; - else if(HTTPREQ_HEAD == data->set.httpreq) - /* ... but if unset there really is no perfect method that is the - "opposite" of HEAD but in reality most people probably think GET - then. The important thing is that we can't let it remain HEAD if the - opt_no_body is set FALSE since then we'll behave wrong when getting - HTTP. */ - data->set.httpreq = HTTPREQ_GET; - - k->start = Curl_tvnow(); /* start time */ - k->now = k->start; /* current time is now */ - k->header = TRUE; /* assume header */ - - k->bytecount = 0; - - k->buf = data->state.buffer; - k->uploadbuf = data->state.uploadbuffer; - k->hbufp = data->state.headerbuff; - k->ignorebody=FALSE; - - Curl_speedinit(data); - - Curl_pgrsSetUploadCounter(data, 0); - Curl_pgrsSetDownloadCounter(data, 0); - - return CURLE_OK; -} - -/* -* get_protocol_family() -* -* This is used to return the protocol family for a given protocol. -* -* Parameters: -* -* protocol [in] - A single bit protocol identifier such as HTTP or HTTPS. -* -* Returns the family as a single bit protocol identifier. -*/ - -unsigned int get_protocol_family(unsigned int protocol) -{ - unsigned int family; - - switch(protocol) { - case CURLPROTO_HTTP: - case CURLPROTO_HTTPS: - family = CURLPROTO_HTTP; - break; - - case CURLPROTO_FTP: - case CURLPROTO_FTPS: - family = CURLPROTO_FTP; - break; - - case CURLPROTO_SCP: - family = CURLPROTO_SCP; - break; - - case CURLPROTO_SFTP: - family = CURLPROTO_SFTP; - break; - - case CURLPROTO_TELNET: - family = CURLPROTO_TELNET; - break; - - case CURLPROTO_LDAP: - case CURLPROTO_LDAPS: - family = CURLPROTO_LDAP; - break; - - case CURLPROTO_DICT: - family = CURLPROTO_DICT; - break; - - case CURLPROTO_FILE: - family = CURLPROTO_FILE; - break; - - case CURLPROTO_TFTP: - family = CURLPROTO_TFTP; - break; - - case CURLPROTO_IMAP: - case CURLPROTO_IMAPS: - family = CURLPROTO_IMAP; - break; - - case CURLPROTO_POP3: - case CURLPROTO_POP3S: - family = CURLPROTO_POP3; - break; - - case CURLPROTO_SMTP: - case CURLPROTO_SMTPS: - family = CURLPROTO_SMTP; - break; - - case CURLPROTO_RTSP: - family = CURLPROTO_RTSP; - break; - - case CURLPROTO_RTMP: - case CURLPROTO_RTMPS: - family = CURLPROTO_RTMP; - break; - - case CURLPROTO_RTMPT: - case CURLPROTO_RTMPTS: - family = CURLPROTO_RTMPT; - break; - - case CURLPROTO_RTMPE: - family = CURLPROTO_RTMPE; - break; - - case CURLPROTO_RTMPTE: - family = CURLPROTO_RTMPTE; - break; - - case CURLPROTO_GOPHER: - family = CURLPROTO_GOPHER; - break; - - case CURLPROTO_SMB: - case CURLPROTO_SMBS: - family = CURLPROTO_SMB; - break; - - default: - family = 0; - break; - } - - return family; -} diff --git a/build/premake/premake5/contrib/curl/lib/url.h b/build/premake/premake5/contrib/curl/lib/url.h deleted file mode 100644 index f13c8e6640..0000000000 --- a/build/premake/premake5/contrib/curl/lib/url.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef HEADER_CURL_URL_H -#define HEADER_CURL_URL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -/* - * Prototypes for library-wide functions provided by url.c - */ - -CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn); -CURLcode Curl_open(struct Curl_easy **curl); -CURLcode Curl_init_userdefined(struct UserDefined *set); -CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, - va_list arg); -CURLcode Curl_dupset(struct Curl_easy * dst, struct Curl_easy * src); -void Curl_freeset(struct Curl_easy * data); -CURLcode Curl_close(struct Curl_easy *data); /* opposite of curl_open() */ -CURLcode Curl_connect(struct Curl_easy *, struct connectdata **, - bool *async, bool *protocol_connect); -CURLcode Curl_disconnect(struct connectdata *, bool dead_connection); -CURLcode Curl_protocol_connect(struct connectdata *conn, bool *done); -CURLcode Curl_protocol_connecting(struct connectdata *conn, bool *done); -CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done); -CURLcode Curl_setup_conn(struct connectdata *conn, - bool *protocol_done); -void Curl_free_request_state(struct Curl_easy *data); - -int Curl_protocol_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); -int Curl_doing_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); - -bool Curl_isPipeliningEnabled(const struct Curl_easy *handle); -CURLcode Curl_addHandleToPipeline(struct Curl_easy *handle, - struct curl_llist *pipeline); -int Curl_removeHandleFromPipeline(struct Curl_easy *handle, - struct curl_llist *pipeline); -struct connectdata * -Curl_oldest_idle_connection(struct Curl_easy *data); -/* remove the specified connection from all (possible) pipelines and related - queues */ -void Curl_getoff_all_pipelines(struct Curl_easy *data, - struct connectdata *conn); - -void Curl_close_connections(struct Curl_easy *data); - -#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */ -#define CURL_DEFAULT_HTTPS_PROXY_PORT 443 /* default https proxy port unless - specified */ - -CURLcode Curl_connected_proxy(struct connectdata *conn, int sockindex); - -#ifdef CURL_DISABLE_VERBOSE_STRINGS -#define Curl_verboseconnect(x) Curl_nop_stmt -#else -void Curl_verboseconnect(struct connectdata *conn); -#endif - -#define CONNECT_PROXY_SSL()\ - (conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\ - !conn->bits.proxy_ssl_connected[sockindex]) - -#define CONNECT_FIRSTSOCKET_PROXY_SSL()\ - (conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\ - !conn->bits.proxy_ssl_connected[FIRSTSOCKET]) - -#define CONNECT_SECONDARYSOCKET_PROXY_SSL()\ - (conn->http_proxy.proxytype == CURLPROXY_HTTPS &&\ - !conn->bits.proxy_ssl_connected[SECONDARYSOCKET]) - -#endif /* HEADER_CURL_URL_H */ diff --git a/build/premake/premake5/contrib/curl/lib/urldata.h b/build/premake/premake5/contrib/curl/lib/urldata.h deleted file mode 100644 index 7f87913a95..0000000000 --- a/build/premake/premake5/contrib/curl/lib/urldata.h +++ /dev/null @@ -1,1839 +0,0 @@ -#ifndef HEADER_CURL_URLDATA_H -#define HEADER_CURL_URLDATA_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* This file is for lib internal stuff */ - -#include "curl_setup.h" - -#define PORT_FTP 21 -#define PORT_FTPS 990 -#define PORT_TELNET 23 -#define PORT_HTTP 80 -#define PORT_HTTPS 443 -#define PORT_DICT 2628 -#define PORT_LDAP 389 -#define PORT_LDAPS 636 -#define PORT_TFTP 69 -#define PORT_SSH 22 -#define PORT_IMAP 143 -#define PORT_IMAPS 993 -#define PORT_POP3 110 -#define PORT_POP3S 995 -#define PORT_SMB 445 -#define PORT_SMBS 445 -#define PORT_SMTP 25 -#define PORT_SMTPS 465 /* sometimes called SSMTP */ -#define PORT_RTSP 554 -#define PORT_RTMP 1935 -#define PORT_RTMPT PORT_HTTP -#define PORT_RTMPS PORT_HTTPS -#define PORT_GOPHER 70 - -#define DICT_MATCH "/MATCH:" -#define DICT_MATCH2 "/M:" -#define DICT_MATCH3 "/FIND:" -#define DICT_DEFINE "/DEFINE:" -#define DICT_DEFINE2 "/D:" -#define DICT_DEFINE3 "/LOOKUP:" - -#define CURL_DEFAULT_USER "anonymous" -#define CURL_DEFAULT_PASSWORD "ftp@example.com" - -/* Convenience defines for checking protocols or their SSL based version. Each - protocol handler should only ever have a single CURLPROTO_ in its protocol - field. */ -#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP|CURLPROTO_HTTPS) -#define PROTO_FAMILY_FTP (CURLPROTO_FTP|CURLPROTO_FTPS) -#define PROTO_FAMILY_POP3 (CURLPROTO_POP3|CURLPROTO_POP3S) -#define PROTO_FAMILY_SMB (CURLPROTO_SMB|CURLPROTO_SMBS) -#define PROTO_FAMILY_SMTP (CURLPROTO_SMTP|CURLPROTO_SMTPS) - -#define DEFAULT_CONNCACHE_SIZE 5 - -/* length of longest IPv6 address string including the trailing null */ -#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") - -/* Default FTP/IMAP etc response timeout in milliseconds. - Symbian OS panics when given a timeout much greater than 1/2 hour. -*/ -#define RESP_TIMEOUT (1800*1000) - -#include "cookie.h" -#include "formdata.h" - -#ifdef USE_OPENSSL -#include -#ifdef HAVE_OPENSSL_ENGINE_H -#include -#endif -#endif /* USE_OPENSSL */ - -#ifdef USE_GNUTLS -#include -#endif - -#ifdef USE_MBEDTLS - -#include -#include -#include -#include - -#elif defined USE_POLARSSL - -#include -#include -#if POLARSSL_VERSION_NUMBER<0x01010000 -#include -#else -#include -#include -#endif /* POLARSSL_VERSION_NUMBER<0x01010000 */ - -#endif /* USE_POLARSSL */ - -#ifdef USE_CYASSL -#undef OCSP_REQUEST /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */ -#undef OCSP_RESPONSE /* avoid cyassl/openssl/ssl.h clash with wincrypt.h */ -#include -#endif - -#ifdef USE_NSS -#include -#include -#endif - -#ifdef USE_GSKIT -#include -#endif - -#ifdef USE_AXTLS -#include -#include -#undef malloc -#undef calloc -#undef realloc -#endif /* USE_AXTLS */ - -#if defined(USE_SCHANNEL) || defined(USE_WINDOWS_SSPI) -#include "curl_sspi.h" -#endif -#ifdef USE_SCHANNEL -#include -#include -#endif - -#ifdef USE_DARWINSSL -#include -/* For some reason, when building for iOS, the omnibus header above does - * not include SecureTransport.h as of iOS SDK 5.1. */ -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#include "timeval.h" - -#ifdef HAVE_ZLIB_H -#include /* for content-encoding */ -#ifdef __SYMBIAN32__ -/* zlib pollutes the namespace with this definition */ -#undef WIN32 -#endif -#endif - -#include - -#include "http_chunks.h" /* for the structs and enum stuff */ -#include "hostip.h" -#include "hash.h" -#include "splay.h" - -#include "imap.h" -#include "pop3.h" -#include "smtp.h" -#include "ftp.h" -#include "file.h" -#include "ssh.h" -#include "http.h" -#include "rtsp.h" -#include "smb.h" -#include "wildcard.h" -#include "multihandle.h" - -#ifdef HAVE_GSSAPI -# ifdef HAVE_GSSGNU -# include -# elif defined HAVE_GSSMIT -# include -# include -# else -# include -# endif -#endif - -#ifdef HAVE_LIBSSH2_H -#include -#include -#endif /* HAVE_LIBSSH2_H */ - -/* Download buffer size, keep it fairly big for speed reasons */ -#undef BUFSIZE -#define BUFSIZE CURL_MAX_WRITE_SIZE -#undef MAX_BUFSIZE -#define MAX_BUFSIZE CURL_MAX_READ_SIZE -#define CURL_BUFSIZE(x) ((x)?(x):(BUFSIZE)) - -/* Initial size of the buffer to store headers in, it'll be enlarged in case - of need. */ -#define HEADERSIZE 256 - -#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU -#define GOOD_EASY_HANDLE(x) \ - ((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) - -/* Some convenience macros to get the larger/smaller value out of two given. - We prefix with CURL to prevent name collisions. */ -#define CURLMAX(x,y) ((x)>(y)?(x):(y)) -#define CURLMIN(x,y) ((x)<(y)?(x):(y)) - -#ifdef HAVE_GSSAPI -/* Types needed for krb5-ftp connections */ -struct krb5buffer { - void *data; - size_t size; - size_t index; - int eof_flag; -}; - -enum protection_level { - PROT_NONE, /* first in list */ - PROT_CLEAR, - PROT_SAFE, - PROT_CONFIDENTIAL, - PROT_PRIVATE, - PROT_CMD, - PROT_LAST /* last in list */ -}; -#endif - -#ifdef USE_SCHANNEL -/* Structs to store Schannel handles */ -struct curl_schannel_cred { - CredHandle cred_handle; - TimeStamp time_stamp; - int refcount; -}; - -struct curl_schannel_ctxt { - CtxtHandle ctxt_handle; - TimeStamp time_stamp; -}; -#endif - -/* enum for the nonblocking SSL connection state machine */ -typedef enum { - ssl_connect_1, - ssl_connect_2, - ssl_connect_2_reading, - ssl_connect_2_writing, - ssl_connect_3, - ssl_connect_done -} ssl_connect_state; - -typedef enum { - ssl_connection_none, - ssl_connection_negotiating, - ssl_connection_complete -} ssl_connection_state; - -/* struct for data related to each SSL connection */ -struct ssl_connect_data { - /* Use ssl encrypted communications TRUE/FALSE, not necessarily using it atm - but at least asked to or meaning to use it. See 'state' for the exact - current state of the connection. */ - bool use; - ssl_connection_state state; - ssl_connect_state connecting_state; -#if defined(USE_OPENSSL) - /* these ones requires specific SSL-types */ - SSL_CTX* ctx; - SSL* handle; - X509* server_cert; -#elif defined(USE_GNUTLS) - gnutls_session_t session; - gnutls_certificate_credentials_t cred; -#ifdef USE_TLS_SRP - gnutls_srp_client_credentials_t srp_client_cred; -#endif -#elif defined(USE_MBEDTLS) - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_entropy_context entropy; - mbedtls_ssl_context ssl; - int server_fd; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - mbedtls_x509_crl crl; - mbedtls_pk_context pk; - mbedtls_ssl_config config; - const char *protocols[3]; -#elif defined(USE_POLARSSL) - ctr_drbg_context ctr_drbg; - entropy_context entropy; - ssl_context ssl; - int server_fd; - x509_crt cacert; - x509_crt clicert; - x509_crl crl; - rsa_context rsa; -#elif defined(USE_CYASSL) - SSL_CTX* ctx; - SSL* handle; -#elif defined(USE_NSS) - PRFileDesc *handle; - char *client_nickname; - struct Curl_easy *data; - struct curl_llist *obj_list; - PK11GenericObject *obj_clicert; -#elif defined(USE_GSKIT) - gsk_handle handle; - int iocport; - int localfd; - int remotefd; -#elif defined(USE_AXTLS) - SSL_CTX* ssl_ctx; - SSL* ssl; -#elif defined(USE_SCHANNEL) - struct curl_schannel_cred *cred; - struct curl_schannel_ctxt *ctxt; - SecPkgContext_StreamSizes stream_sizes; - size_t encdata_length, decdata_length; - size_t encdata_offset, decdata_offset; - unsigned char *encdata_buffer, *decdata_buffer; - unsigned long req_flags, ret_flags; - CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */ - bool recv_sspi_close_notify; /* true if connection closed by close_notify */ - bool recv_connection_closed; /* true if connection closed, regardless how */ - bool use_alpn; /* true if ALPN is used for this connection */ -#elif defined(USE_DARWINSSL) - SSLContextRef ssl_ctx; - curl_socket_t ssl_sockfd; - bool ssl_direction; /* true if writing, false if reading */ - size_t ssl_write_buffered_length; -#elif defined(USE_SSL) -#error "SSL backend specific information missing from ssl_connect_data" -#endif -}; - -struct ssl_primary_config { - long version; /* what version the client wants to use */ - bool verifypeer; /* set TRUE if this is desired */ - bool verifyhost; /* set TRUE if CN/SAN must match hostname */ - bool verifystatus; /* set TRUE if certificate status must be checked */ - char *CApath; /* certificate dir (doesn't work on windows) */ - char *CAfile; /* certificate to verify peer against */ - char *clientcert; - char *random_file; /* path to file containing "random" data */ - char *egdsocket; /* path to file containing the EGD daemon socket */ - char *cipher_list; /* list of ciphers to use */ -}; - -struct ssl_config_data { - struct ssl_primary_config primary; - bool enable_beast; /* especially allow this flaw for interoperability's - sake*/ - bool no_revoke; /* disable SSL certificate revocation checks */ - long certverifyresult; /* result from the certificate verification */ - char *CRLfile; /* CRL to check certificate revocation */ - char *issuercert;/* optional issuer certificate filename */ - curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */ - void *fsslctxp; /* parameter for call back */ - bool certinfo; /* gather lots of certificate info */ - bool falsestart; - - char *cert; /* client certificate file name */ - char *cert_type; /* format for certificate (default: PEM)*/ - char *key; /* private key file name */ - char *key_type; /* format for private key (default: PEM) */ - char *key_passwd; /* plain text private key password */ - -#ifdef USE_TLS_SRP - char *username; /* TLS username (for, e.g., SRP) */ - char *password; /* TLS password (for, e.g., SRP) */ - enum CURL_TLSAUTH authtype; /* TLS authentication type (default SRP) */ -#endif -}; - -struct ssl_general_config { - bool sessionid; /* cache session IDs or not */ - size_t max_ssl_sessions; /* SSL session id cache size */ -}; - -/* information stored about one single SSL session */ -struct curl_ssl_session { - char *name; /* host name for which this ID was used */ - char *conn_to_host; /* host name for the connection (may be NULL) */ - const char *scheme; /* protocol scheme used */ - void *sessionid; /* as returned from the SSL layer */ - size_t idsize; /* if known, otherwise 0 */ - long age; /* just a number, the higher the more recent */ - int remote_port; /* remote port */ - int conn_to_port; /* remote port for the connection (may be -1) */ - struct ssl_primary_config ssl_config; /* setup for this session */ -}; - -/* Struct used for Digest challenge-response authentication */ -struct digestdata { -#if defined(USE_WINDOWS_SSPI) - BYTE *input_token; - size_t input_token_len; - CtxtHandle *http_context; -#else - char *nonce; - char *cnonce; - char *realm; - int algo; - bool stale; /* set true for re-negotiation */ - char *opaque; - char *qop; - char *algorithm; - int nc; /* nounce count */ -#endif -}; - -typedef enum { - NTLMSTATE_NONE, - NTLMSTATE_TYPE1, - NTLMSTATE_TYPE2, - NTLMSTATE_TYPE3, - NTLMSTATE_LAST -} curlntlm; - -#ifdef USE_WINDOWS_SSPI -#include "curl_sspi.h" -#endif - -#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV) -#include -#endif - -/* Struct used for GSSAPI (Kerberos V5) authentication */ -#if defined(USE_KERBEROS5) -struct kerberos5data { -#if defined(USE_WINDOWS_SSPI) - CredHandle *credentials; - CtxtHandle *context; - TCHAR *spn; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - size_t token_max; - BYTE *output_token; -#else - gss_ctx_id_t context; - gss_name_t spn; -#endif -}; -#endif - -/* Struct used for NTLM challenge-response authentication */ -#if defined(USE_NTLM) -struct ntlmdata { - curlntlm state; -#ifdef USE_WINDOWS_SSPI - CredHandle *credentials; - CtxtHandle *context; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - size_t token_max; - BYTE *output_token; - BYTE *input_token; - size_t input_token_len; -#else - unsigned int flags; - unsigned char nonce[8]; - void *target_info; /* TargetInfo received in the ntlm type-2 message */ - unsigned int target_info_len; -#endif -}; -#endif - -#ifdef USE_SPNEGO -struct negotiatedata { - /* When doing Negotiate (SPNEGO) auth, we first need to send a token - and then validate the received one. */ - enum { GSS_AUTHNONE, GSS_AUTHRECV, GSS_AUTHSENT } state; -#ifdef HAVE_GSSAPI - OM_uint32 status; - gss_ctx_id_t context; - gss_name_t spn; - gss_buffer_desc output_token; -#else -#ifdef USE_WINDOWS_SSPI - DWORD status; - CredHandle *credentials; - CtxtHandle *context; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - TCHAR *spn; - size_t token_max; - BYTE *output_token; - size_t output_token_length; -#endif -#endif -}; -#endif - - -/* - * Boolean values that concerns this connection. - */ -struct ConnectBits { - /* always modify bits.close with the connclose() and connkeep() macros! */ - bool close; /* if set, we close the connection after this request */ - bool reuse; /* if set, this is a re-used connection */ - bool conn_to_host; /* if set, this connection has a "connect to host" - that overrides the host in the URL */ - bool conn_to_port; /* if set, this connection has a "connect to port" - that overrides the port in the URL (remote port) */ - bool proxy; /* if set, this transfer is done through a proxy - any type */ - bool httpproxy; /* if set, this transfer is done through a http proxy */ - bool socksproxy; /* if set, this transfer is done through a socks proxy */ - bool user_passwd; /* do we use user+password for this connection? */ - bool proxy_user_passwd; /* user+password for the proxy? */ - bool ipv6_ip; /* we communicate with a remote site specified with pure IPv6 - IP address */ - bool ipv6; /* we communicate with a site using an IPv6 address */ - - bool do_more; /* this is set TRUE if the ->curl_do_more() function is - supposed to be called, after ->curl_do() */ - bool tcpconnect[2]; /* the TCP layer (or similar) is connected, this is set - the first time on the first connect function call */ - bool protoconnstart;/* the protocol layer has STARTED its operation after - the TCP layer connect */ - - bool retry; /* this connection is about to get closed and then - re-attempted at another connection. */ - bool tunnel_proxy; /* if CONNECT is used to "tunnel" through the proxy. - This is implicit when SSL-protocols are used through - proxies, but can also be enabled explicitly by - apps */ - bool authneg; /* TRUE when the auth phase has started, which means - that we are creating a request with an auth header, - but it is not the final request in the auth - negotiation. */ - bool rewindaftersend;/* TRUE when the sending couldn't be stopped even - though it will be discarded. When the whole send - operation is done, we must call the data rewind - callback. */ - bool ftp_use_epsv; /* As set with CURLOPT_FTP_USE_EPSV, but if we find out - EPSV doesn't work we disable it for the forthcoming - requests */ - - bool ftp_use_eprt; /* As set with CURLOPT_FTP_USE_EPRT, but if we find out - EPRT doesn't work we disable it for the forthcoming - requests */ - bool ftp_use_data_ssl; /* Enabled SSL for the data connection */ - bool netrc; /* name+password provided by netrc */ - bool userpwd_in_url; /* name+password found in url */ - bool stream_was_rewound; /* Indicates that the stream was rewound after a - request read past the end of its response byte - boundary */ - bool proxy_connect_closed; /* set true if a proxy disconnected the - connection in a CONNECT request with auth, so - that libcurl should reconnect and continue. */ - bool bound; /* set true if bind() has already been done on this socket/ - connection */ - bool type_set; /* type= was used in the URL */ - bool multiplex; /* connection is multiplexed */ - - bool tcp_fastopen; /* use TCP Fast Open */ - bool tls_enable_npn; /* TLS NPN extension? */ - bool tls_enable_alpn; /* TLS ALPN extension? */ - bool proxy_ssl_connected[2]; /* TRUE when SSL initialization for HTTPS proxy - is complete */ - bool socksproxy_connecting; /* connecting through a socks proxy */ -}; - -struct hostname { - char *rawalloc; /* allocated "raw" version of the name */ - char *encalloc; /* allocated IDN-encoded version of the name */ - char *name; /* name to use internally, might be encoded, might be raw */ - const char *dispname; /* name to display, as 'name' might be encoded */ -}; - -/* - * Flags on the keepon member of the Curl_transfer_keeper - */ - -#define KEEP_NONE 0 -#define KEEP_RECV (1<<0) /* there is or may be data to read */ -#define KEEP_SEND (1<<1) /* there is or may be data to write */ -#define KEEP_RECV_HOLD (1<<2) /* when set, no reading should be done but there - might still be data to read */ -#define KEEP_SEND_HOLD (1<<3) /* when set, no writing should be done but there - might still be data to write */ -#define KEEP_RECV_PAUSE (1<<4) /* reading is paused */ -#define KEEP_SEND_PAUSE (1<<5) /* writing is paused */ - -#define KEEP_RECVBITS (KEEP_RECV | KEEP_RECV_HOLD | KEEP_RECV_PAUSE) -#define KEEP_SENDBITS (KEEP_SEND | KEEP_SEND_HOLD | KEEP_SEND_PAUSE) - - -#ifdef HAVE_LIBZ -typedef enum { - ZLIB_UNINIT, /* uninitialized */ - ZLIB_INIT, /* initialized */ - ZLIB_GZIP_HEADER, /* reading gzip header */ - ZLIB_GZIP_INFLATING, /* inflating gzip stream */ - ZLIB_INIT_GZIP /* initialized in transparent gzip mode */ -} zlibInitState; -#endif - -#ifdef CURLRES_ASYNCH -struct Curl_async { - char *hostname; - int port; - struct Curl_dns_entry *dns; - bool done; /* set TRUE when the lookup is complete */ - int status; /* if done is TRUE, this is the status from the callback */ - void *os_specific; /* 'struct thread_data' for Windows */ -}; -#endif - -#define FIRSTSOCKET 0 -#define SECONDARYSOCKET 1 - -/* These function pointer types are here only to allow easier typecasting - within the source when we need to cast between data pointers (such as NULL) - and function pointers. */ -typedef CURLcode (*Curl_do_more_func)(struct connectdata *, int *); -typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool); - -enum expect100 { - EXP100_SEND_DATA, /* enough waiting, just send the body now */ - EXP100_AWAITING_CONTINUE, /* waiting for the 100 Continue header */ - EXP100_SENDING_REQUEST, /* still sending the request but will wait for - the 100 header once done with the request */ - EXP100_FAILED /* used on 417 Expectation Failed */ -}; - -enum upgrade101 { - UPGR101_INIT, /* default state */ - UPGR101_REQUESTED, /* upgrade requested */ - UPGR101_RECEIVED, /* response received */ - UPGR101_WORKING /* talking upgraded protocol */ -}; - -/* - * Request specific data in the easy handle (Curl_easy). Previously, - * these members were on the connectdata struct but since a conn struct may - * now be shared between different Curl_easys, we store connection-specific - * data here. This struct only keeps stuff that's interesting for *this* - * request, as it will be cleared between multiple ones - */ -struct SingleRequest { - curl_off_t size; /* -1 if unknown at this point */ - curl_off_t *bytecountp; /* return number of bytes read or NULL */ - - curl_off_t maxdownload; /* in bytes, the maximum amount of data to fetch, - -1 means unlimited */ - curl_off_t *writebytecountp; /* return number of bytes written or NULL */ - - curl_off_t bytecount; /* total number of bytes read */ - curl_off_t writebytecount; /* number of bytes written */ - - long headerbytecount; /* only count received headers */ - long deductheadercount; /* this amount of bytes doesn't count when we check - if anything has been transferred at the end of a - connection. We use this counter to make only a - 100 reply (without a following second response - code) result in a CURLE_GOT_NOTHING error code */ - - struct timeval start; /* transfer started at this time */ - struct timeval now; /* current time */ - bool header; /* incoming data has HTTP header */ - enum { - HEADER_NORMAL, /* no bad header at all */ - HEADER_PARTHEADER, /* part of the chunk is a bad header, the rest - is normal data */ - HEADER_ALLBAD /* all was believed to be header */ - } badheader; /* the header was deemed bad and will be - written as body */ - int headerline; /* counts header lines to better track the - first one */ - char *hbufp; /* points at *end* of header line */ - size_t hbuflen; - char *str; /* within buf */ - char *str_start; /* within buf */ - char *end_ptr; /* within buf */ - char *p; /* within headerbuff */ - bool content_range; /* set TRUE if Content-Range: was found */ - curl_off_t offset; /* possible resume offset read from the - Content-Range: header */ - int httpcode; /* error code from the 'HTTP/1.? XXX' or - 'RTSP/1.? XXX' line */ - struct timeval start100; /* time stamp to wait for the 100 code from */ - enum expect100 exp100; /* expect 100 continue state */ - enum upgrade101 upgr101; /* 101 upgrade state */ - - int auto_decoding; /* What content encoding. sec 3.5, RFC2616. */ - -#define IDENTITY 0 /* No encoding */ -#define DEFLATE 1 /* zlib deflate [RFC 1950 & 1951] */ -#define GZIP 2 /* gzip algorithm [RFC 1952] */ - -#ifdef HAVE_LIBZ - zlibInitState zlib_init; /* possible zlib init state; - undefined if Content-Encoding header. */ - z_stream z; /* State structure for zlib. */ -#endif - - time_t timeofdoc; - long bodywrites; - - char *buf; - char *uploadbuf; - curl_socket_t maxfd; - - int keepon; - - bool upload_done; /* set to TRUE when doing chunked transfer-encoding upload - and we're uploading the last chunk */ - - bool ignorebody; /* we read a response-body but we ignore it! */ - bool ignorecl; /* This HTTP response has no body so we ignore the Content- - Length: header */ - - char *location; /* This points to an allocated version of the Location: - header data */ - char *newurl; /* Set to the new URL to use when a redirect or a retry is - wanted */ - - /* 'upload_present' is used to keep a byte counter of how much data there is - still left in the buffer, aimed for upload. */ - ssize_t upload_present; - - /* 'upload_fromhere' is used as a read-pointer when we uploaded parts of a - buffer, so the next read should read from where this pointer points to, - and the 'upload_present' contains the number of bytes available at this - position */ - char *upload_fromhere; - - bool chunk; /* if set, this is a chunked transfer-encoding */ - bool upload_chunky; /* set TRUE if we are doing chunked transfer-encoding - on upload */ - bool getheader; /* TRUE if header parsing is wanted */ - - bool forbidchunk; /* used only to explicitly forbid chunk-upload for - specific upload buffers. See readmoredata() in - http.c for details. */ - - void *protop; /* Allocated protocol-specific data. Each protocol - handler makes sure this points to data it needs. */ -}; - -/* - * Specific protocol handler. - */ - -struct Curl_handler { - const char *scheme; /* URL scheme name. */ - - /* Complement to setup_connection_internals(). */ - CURLcode (*setup_connection)(struct connectdata *); - - /* These two functions MUST be set to be protocol dependent */ - CURLcode (*do_it)(struct connectdata *, bool *done); - Curl_done_func done; - - /* If the curl_do() function is better made in two halves, this - * curl_do_more() function will be called afterwards, if set. For example - * for doing the FTP stuff after the PASV/PORT command. - */ - Curl_do_more_func do_more; - - /* This function *MAY* be set to a protocol-dependent function that is run - * after the connect() and everything is done, as a step in the connection. - * The 'done' pointer points to a bool that should be set to TRUE if the - * function completes before return. If it doesn't complete, the caller - * should call the curl_connecting() function until it is. - */ - CURLcode (*connect_it)(struct connectdata *, bool *done); - - /* See above. Currently only used for FTP. */ - CURLcode (*connecting)(struct connectdata *, bool *done); - CURLcode (*doing)(struct connectdata *, bool *done); - - /* Called from the multi interface during the PROTOCONNECT phase, and it - should then return a proper fd set */ - int (*proto_getsock)(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); - - /* Called from the multi interface during the DOING phase, and it should - then return a proper fd set */ - int (*doing_getsock)(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); - - /* Called from the multi interface during the DO_MORE phase, and it should - then return a proper fd set */ - int (*domore_getsock)(struct connectdata *conn, - curl_socket_t *socks, - int numsocks); - - /* Called from the multi interface during the DO_DONE, PERFORM and - WAITPERFORM phases, and it should then return a proper fd set. Not setting - this will make libcurl use the generic default one. */ - int (*perform_getsock)(const struct connectdata *conn, - curl_socket_t *socks, - int numsocks); - - /* This function *MAY* be set to a protocol-dependent function that is run - * by the curl_disconnect(), as a step in the disconnection. If the handler - * is called because the connection has been considered dead, dead_connection - * is set to TRUE. - */ - CURLcode (*disconnect)(struct connectdata *, bool dead_connection); - - /* If used, this function gets called from transfer.c:readwrite_data() to - allow the protocol to do extra reads/writes */ - CURLcode (*readwrite)(struct Curl_easy *data, struct connectdata *conn, - ssize_t *nread, bool *readmore); - - long defport; /* Default port. */ - unsigned int protocol; /* See CURLPROTO_* - this needs to be the single - specific protocol bit */ - unsigned int flags; /* Extra particular characteristics, see PROTOPT_* */ -}; - -#define PROTOPT_NONE 0 /* nothing extra */ -#define PROTOPT_SSL (1<<0) /* uses SSL */ -#define PROTOPT_DUAL (1<<1) /* this protocol uses two connections */ -#define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */ -/* some protocols will have to call the underlying functions without regard to - what exact state the socket signals. IE even if the socket says "readable", - the send function might need to be called while uploading, or vice versa. -*/ -#define PROTOPT_DIRLOCK (1<<3) -#define PROTOPT_NONETWORK (1<<4) /* protocol doesn't use the network! */ -#define PROTOPT_NEEDSPWD (1<<5) /* needs a password, and if none is set it - gets a default */ -#define PROTOPT_NOURLQUERY (1<<6) /* protocol can't handle - url query strings (?foo=bar) ! */ -#define PROTOPT_CREDSPERREQUEST (1<<7) /* requires login credentials per - request instead of per connection */ -#define PROTOPT_ALPN_NPN (1<<8) /* set ALPN and/or NPN for this */ -#define PROTOPT_STREAM (1<<9) /* a protocol with individual logical streams */ -#define PROTOPT_URLOPTIONS (1<<10) /* allow options part in the userinfo field - of the URL */ - -/* return the count of bytes sent, or -1 on error */ -typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */ - int sockindex, /* socketindex */ - const void *buf, /* data to write */ - size_t len, /* max amount to write */ - CURLcode *err); /* error to return */ - -/* return the count of bytes read, or -1 on error */ -typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */ - int sockindex, /* socketindex */ - char *buf, /* store data here */ - size_t len, /* max amount to read */ - CURLcode *err); /* error to return */ - -#ifdef USE_RECV_BEFORE_SEND_WORKAROUND -struct postponed_data { - char *buffer; /* Temporal store for received data during - sending, must be freed */ - size_t allocated_size; /* Size of temporal store */ - size_t recv_size; /* Size of received data during sending */ - size_t recv_processed; /* Size of processed part of postponed data */ -#ifdef DEBUGBUILD - curl_socket_t bindsock;/* Structure must be bound to specific socket, - used only for DEBUGASSERT */ -#endif /* DEBUGBUILD */ -}; -#endif /* USE_RECV_BEFORE_SEND_WORKAROUND */ - -struct proxy_info { - struct hostname host; - long port; - curl_proxytype proxytype; /* what kind of proxy that is in use */ - char *user; /* proxy user name string, allocated */ - char *passwd; /* proxy password string, allocated */ -}; - -/* - * The connectdata struct contains all fields and variables that should be - * unique for an entire connection. - */ -struct connectdata { - /* 'data' is the CURRENT Curl_easy using this connection -- take great - caution that this might very well vary between different times this - connection is used! */ - struct Curl_easy *data; - - /* chunk is for HTTP chunked encoding, but is in the general connectdata - struct only because we can do just about any protocol through a HTTP proxy - and a HTTP proxy may in fact respond using chunked encoding */ - struct Curl_chunker chunk; - - curl_closesocket_callback fclosesocket; /* function closing the socket(s) */ - void *closesocket_client; - - bool inuse; /* This is a marker for the connection cache logic. If this is - TRUE this handle is being used by an easy handle and cannot - be used by any other easy handle without careful - consideration (== only for pipelining). */ - - /**** Fields set when inited and not modified again */ - long connection_id; /* Contains a unique number to make it easier to - track the connections in the log output */ - - /* 'dns_entry' is the particular host we use. This points to an entry in the - DNS cache and it will not get pruned while locked. It gets unlocked in - Curl_done(). This entry will be NULL if the connection is re-used as then - there is no name resolve done. */ - struct Curl_dns_entry *dns_entry; - - /* 'ip_addr' is the particular IP we connected to. It points to a struct - within the DNS cache, so this pointer is only valid as long as the DNS - cache entry remains locked. It gets unlocked in Curl_done() */ - Curl_addrinfo *ip_addr; - Curl_addrinfo *tempaddr[2]; /* for happy eyeballs */ - - /* 'ip_addr_str' is the ip_addr data as a human readable string. - It remains available as long as the connection does, which is longer than - the ip_addr itself. */ - char ip_addr_str[MAX_IPADR_LEN]; - - unsigned int scope_id; /* Scope id for IPv6 */ - - int socktype; /* SOCK_STREAM or SOCK_DGRAM */ - - struct hostname host; - char *secondaryhostname; /* secondary socket host name (ftp) */ - struct hostname conn_to_host; /* the host to connect to. valid only if - bits.conn_to_host is set */ - - struct proxy_info socks_proxy; - struct proxy_info http_proxy; - - long port; /* which port to use locally */ - int remote_port; /* the remote port, not the proxy port! */ - int conn_to_port; /* the remote port to connect to. valid only if - bits.conn_to_port is set */ - unsigned short secondary_port; /* secondary socket remote port to connect to - (ftp) */ - - /* 'primary_ip' and 'primary_port' get filled with peer's numerical - ip address and port number whenever an outgoing connection is - *attempted* from the primary socket to a remote address. When more - than one address is tried for a connection these will hold data - for the last attempt. When the connection is actually established - these are updated with data which comes directly from the socket. */ - - char primary_ip[MAX_IPADR_LEN]; - long primary_port; - - /* 'local_ip' and 'local_port' get filled with local's numerical - ip address and port number whenever an outgoing connection is - **established** from the primary socket to a remote address. */ - - char local_ip[MAX_IPADR_LEN]; - long local_port; - - char *user; /* user name string, allocated */ - char *passwd; /* password string, allocated */ - char *options; /* options string, allocated */ - - char *oauth_bearer; /* bearer token for OAuth 2.0, allocated */ - - int httpversion; /* the HTTP version*10 reported by the server */ - int rtspversion; /* the RTSP version*10 reported by the server */ - - struct timeval now; /* "current" time */ - struct timeval created; /* creation time */ - curl_socket_t sock[2]; /* two sockets, the second is used for the data - transfer when doing FTP */ - curl_socket_t tempsock[2]; /* temporary sockets for happy eyeballs */ - bool sock_accepted[2]; /* TRUE if the socket on this index was created with - accept() */ - Curl_recv *recv[2]; - Curl_send *send[2]; - -#ifdef USE_RECV_BEFORE_SEND_WORKAROUND - struct postponed_data postponed[2]; /* two buffers for two sockets */ -#endif /* USE_RECV_BEFORE_SEND_WORKAROUND */ - struct ssl_connect_data ssl[2]; /* this is for ssl-stuff */ - struct ssl_connect_data proxy_ssl[2]; /* this is for proxy ssl-stuff */ - struct ssl_primary_config ssl_config; - struct ssl_primary_config proxy_ssl_config; - bool tls_upgraded; - - struct ConnectBits bits; /* various state-flags for this connection */ - - /* connecttime: when connect() is called on the current IP address. Used to - be able to track when to move on to try next IP - but only when the multi - interface is used. */ - struct timeval connecttime; - /* The two fields below get set in Curl_connecthost */ - int num_addr; /* number of addresses to try to connect to */ - time_t timeoutms_per_addr; /* how long time in milliseconds to spend on - trying to connect to each IP address */ - - const struct Curl_handler *handler; /* Connection's protocol handler */ - const struct Curl_handler *given; /* The protocol first given */ - - long ip_version; /* copied from the Curl_easy at creation time */ - - /**** curl_get() phase fields */ - - curl_socket_t sockfd; /* socket to read from or CURL_SOCKET_BAD */ - curl_socket_t writesockfd; /* socket to write to, it may very - well be the same we read from. - CURL_SOCKET_BAD disables */ - - /** Dynamicly allocated strings, MUST be freed before this **/ - /** struct is killed. **/ - struct dynamically_allocated_data { - char *proxyuserpwd; - char *uagent; - char *accept_encoding; - char *userpwd; - char *rangeline; - char *ref; - char *host; - char *cookiehost; - char *rtsp_transport; - char *te; /* TE: request header */ - } allocptr; - -#ifdef HAVE_GSSAPI - int sec_complete; /* if Kerberos is enabled for this connection */ - enum protection_level command_prot; - enum protection_level data_prot; - enum protection_level request_data_prot; - size_t buffer_size; - struct krb5buffer in_buffer; - void *app_data; - const struct Curl_sec_client_mech *mech; - struct sockaddr_in local_addr; -#endif - -#if defined(USE_KERBEROS5) /* Consider moving some of the above GSS-API */ - struct kerberos5data krb5; /* variables into the structure definition, */ -#endif /* however, some of them are ftp specific. */ - - /* the two following *_inuse fields are only flags, not counters in any way. - If TRUE it means the channel is in use, and if FALSE it means the channel - is up for grabs by one. */ - - bool readchannel_inuse; /* whether the read channel is in use by an easy - handle */ - bool writechannel_inuse; /* whether the write channel is in use by an easy - handle */ - struct curl_llist *send_pipe; /* List of handles waiting to - send on this pipeline */ - struct curl_llist *recv_pipe; /* List of handles waiting to read - their responses on this pipeline */ - char *master_buffer; /* The master buffer allocated on-demand; - used for pipelining. */ - size_t read_pos; /* Current read position in the master buffer */ - size_t buf_len; /* Length of the buffer?? */ - - - curl_seek_callback seek_func; /* function that seeks the input */ - void *seek_client; /* pointer to pass to the seek() above */ - - /*************** Request - specific items ************/ - -#if defined(USE_NTLM) - struct ntlmdata ntlm; /* NTLM differs from other authentication schemes - because it authenticates connections, not - single requests! */ - struct ntlmdata proxyntlm; /* NTLM data for proxy */ - -#if defined(NTLM_WB_ENABLED) - /* used for communication with Samba's winbind daemon helper ntlm_auth */ - curl_socket_t ntlm_auth_hlpr_socket; - pid_t ntlm_auth_hlpr_pid; - char *challenge_header; - char *response_header; -#endif -#endif - - char syserr_buf [256]; /* buffer for Curl_strerror() */ - -#ifdef CURLRES_ASYNCH - /* data used for the asynch name resolve callback */ - struct Curl_async async; -#endif - - /* These three are used for chunked-encoding trailer support */ - char *trailer; /* allocated buffer to store trailer in */ - int trlMax; /* allocated buffer size */ - int trlPos; /* index of where to store data */ - - union { - struct ftp_conn ftpc; - struct http_conn httpc; - struct ssh_conn sshc; - struct tftp_state_data *tftpc; - struct imap_conn imapc; - struct pop3_conn pop3c; - struct smtp_conn smtpc; - struct rtsp_conn rtspc; - struct smb_conn smbc; - void *generic; /* RTMP and LDAP use this */ - } proto; - - int cselect_bits; /* bitmask of socket events */ - int waitfor; /* current READ/WRITE bits to wait for */ - -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - int socks5_gssapi_enctype; -#endif - - /* When this connection is created, store the conditions for the local end - bind. This is stored before the actual bind and before any connection is - made and will serve the purpose of being used for comparison reasons so - that subsequent bound-requested connections aren't accidentally re-using - wrong connections. */ - char *localdev; - unsigned short localport; - int localportrange; - - /* tunnel as in tunnel through a HTTP proxy with CONNECT */ - enum { - TUNNEL_INIT, /* init/default/no tunnel state */ - TUNNEL_CONNECT, /* CONNECT has been sent off */ - TUNNEL_COMPLETE /* CONNECT response received completely */ - } tunnel_state[2]; /* two separate ones to allow FTP */ - struct connectbundle *bundle; /* The bundle we are member of */ - - int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */ - -#ifdef USE_UNIX_SOCKETS - char *unix_domain_socket; - bool abstract_unix_socket; -#endif -}; - -/* The end of connectdata. */ - -/* - * Struct to keep statistical and informational data. - * All variables in this struct must be initialized/reset in Curl_initinfo(). - */ -struct PureInfo { - int httpcode; /* Recent HTTP, FTP, RTSP or SMTP response code */ - int httpproxycode; /* response code from proxy when received separate */ - int httpversion; /* the http version number X.Y = X*10+Y */ - long filetime; /* If requested, this is might get set. Set to -1 if the time - was unretrievable. We cannot have this of type time_t, - since time_t is unsigned on several platforms such as - OpenVMS. */ - bool timecond; /* set to TRUE if the time condition didn't match, which - thus made the document NOT get fetched */ - long header_size; /* size of read header(s) in bytes */ - long request_size; /* the amount of bytes sent in the request(s) */ - unsigned long proxyauthavail; /* what proxy auth types were announced */ - unsigned long httpauthavail; /* what host auth types were announced */ - long numconnects; /* how many new connection did libcurl created */ - char *contenttype; /* the content type of the object */ - char *wouldredirect; /* URL this would've been redirected to if asked to */ - - /* PureInfo members 'conn_primary_ip', 'conn_primary_port', 'conn_local_ip' - and, 'conn_local_port' are copied over from the connectdata struct in - order to allow curl_easy_getinfo() to return this information even when - the session handle is no longer associated with a connection, and also - allow curl_easy_reset() to clear this information from the session handle - without disturbing information which is still alive, and that might be - reused, in the connection cache. */ - - char conn_primary_ip[MAX_IPADR_LEN]; - long conn_primary_port; - - char conn_local_ip[MAX_IPADR_LEN]; - long conn_local_port; - - const char *conn_scheme; - unsigned int conn_protocol; - - struct curl_certinfo certs; /* info about the certs, only populated in - OpenSSL builds. Asked for with - CURLOPT_CERTINFO / CURLINFO_CERTINFO */ -}; - - -struct Progress { - time_t lastshow; /* time() of the last displayed progress meter or NULL to - force redraw at next call */ - curl_off_t size_dl; /* total expected size */ - curl_off_t size_ul; /* total expected size */ - curl_off_t downloaded; /* transferred so far */ - curl_off_t uploaded; /* transferred so far */ - - curl_off_t current_speed; /* uses the currently fastest transfer */ - - bool callback; /* set when progress callback is used */ - int width; /* screen width at download start */ - int flags; /* see progress.h */ - - double timespent; - - curl_off_t dlspeed; - curl_off_t ulspeed; - - double t_nslookup; - double t_connect; - double t_appconnect; - double t_pretransfer; - double t_starttransfer; - double t_redirect; - - struct timeval start; - struct timeval t_startsingle; - struct timeval t_startop; - struct timeval t_acceptdata; - - /* upload speed limit */ - struct timeval ul_limit_start; - curl_off_t ul_limit_size; - /* download speed limit */ - struct timeval dl_limit_start; - curl_off_t dl_limit_size; - -#define CURR_TIME (5+1) /* 6 entries for 5 seconds */ - - curl_off_t speeder[ CURR_TIME ]; - struct timeval speeder_time[ CURR_TIME ]; - int speeder_c; -}; - -typedef enum { - HTTPREQ_NONE, /* first in list */ - HTTPREQ_GET, - HTTPREQ_POST, - HTTPREQ_POST_FORM, /* we make a difference internally */ - HTTPREQ_PUT, - HTTPREQ_HEAD, - HTTPREQ_CUSTOM, - HTTPREQ_LAST /* last in list */ -} Curl_HttpReq; - -typedef enum { - RTSPREQ_NONE, /* first in list */ - RTSPREQ_OPTIONS, - RTSPREQ_DESCRIBE, - RTSPREQ_ANNOUNCE, - RTSPREQ_SETUP, - RTSPREQ_PLAY, - RTSPREQ_PAUSE, - RTSPREQ_TEARDOWN, - RTSPREQ_GET_PARAMETER, - RTSPREQ_SET_PARAMETER, - RTSPREQ_RECORD, - RTSPREQ_RECEIVE, - RTSPREQ_LAST /* last in list */ -} Curl_RtspReq; - -/* - * Values that are generated, temporary or calculated internally for a - * "session handle" must be defined within the 'struct UrlState'. This struct - * will be used within the Curl_easy struct. When the 'Curl_easy' - * struct is cloned, this data MUST NOT be copied. - * - * Remember that any "state" information goes globally for the curl handle. - * Session-data MUST be put in the connectdata struct and here. */ -#define MAX_CURL_USER_LENGTH 256 -#define MAX_CURL_PASSWORD_LENGTH 256 - -struct auth { - unsigned long want; /* Bitmask set to the authentication methods wanted by - app (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */ - unsigned long picked; - unsigned long avail; /* Bitmask for what the server reports to support for - this resource */ - bool done; /* TRUE when the auth phase is done and ready to do the *actual* - request */ - bool multi; /* TRUE if this is not yet authenticated but within the auth - multipass negotiation */ - bool iestyle; /* TRUE if digest should be done IE-style or FALSE if it should - be RFC compliant */ -}; - -struct Curl_http2_dep { - struct Curl_http2_dep *next; - struct Curl_easy *data; -}; - -struct UrlState { - - /* Points to the connection cache */ - struct conncache *conn_cache; - - /* when curl_easy_perform() is called, the multi handle is "owned" by - the easy handle so curl_easy_cleanup() on such an easy handle will - also close the multi handle! */ - bool multi_owned_by_easy; - - /* buffers to store authentication data in, as parsed from input options */ - struct timeval keeps_speed; /* for the progress meter really */ - - struct connectdata *lastconnect; /* The last connection, NULL if undefined */ - - char *headerbuff; /* allocated buffer to store headers in */ - size_t headersize; /* size of the allocation */ - - char *buffer; /* download buffer */ - char uploadbuffer[BUFSIZE+1]; /* upload buffer */ - curl_off_t current_speed; /* the ProgressShow() funcion sets this, - bytes / second */ - bool this_is_a_follow; /* this is a followed Location: request */ - - char *first_host; /* host name of the first (not followed) request. - if set, this should be the host name that we will - sent authorization to, no else. Used to make Location: - following not keep sending user+password... This is - strdup() data. - */ - int first_remote_port; /* remote port of the first (not followed) request */ - struct curl_ssl_session *session; /* array of 'max_ssl_sessions' size */ - long sessionage; /* number of the most recent session */ - char *tempwrite; /* allocated buffer to keep data in when a write - callback returns to make the connection paused */ - size_t tempwritesize; /* size of the 'tempwrite' allocated buffer */ - int tempwritetype; /* type of the 'tempwrite' buffer as a bitmask that is - used with Curl_client_write() */ - char *scratch; /* huge buffer[BUFSIZE*2] when doing upload CRLF replacing */ - bool errorbuf; /* Set to TRUE if the error buffer is already filled in. - This must be set to FALSE every time _easy_perform() is - called. */ - int os_errno; /* filled in with errno whenever an error occurs */ -#ifdef HAVE_SIGNAL - /* storage for the previous bag^H^H^HSIGPIPE signal handler :-) */ - void (*prev_signal)(int sig); -#endif - bool allow_port; /* Is set.use_port allowed to take effect or not. This - is always set TRUE when curl_easy_perform() is called. */ - struct digestdata digest; /* state data for host Digest auth */ - struct digestdata proxydigest; /* state data for proxy Digest auth */ - -#ifdef USE_SPNEGO - struct negotiatedata negotiate; /* state data for host Negotiate auth */ - struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */ -#endif - - struct auth authhost; /* auth details for host */ - struct auth authproxy; /* auth details for proxy */ - - bool authproblem; /* TRUE if there's some problem authenticating */ - - void *resolver; /* resolver state, if it is used in the URL state - - ares_channel f.e. */ - -#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H) - ENGINE *engine; -#endif /* USE_OPENSSL */ - struct timeval expiretime; /* set this with Curl_expire() only */ - struct Curl_tree timenode; /* for the splay stuff */ - struct curl_llist *timeoutlist; /* list of pending timeouts */ - - /* a place to store the most recently set FTP entrypath */ - char *most_recent_ftp_entrypath; - - /* set after initial USER failure, to prevent an authentication loop */ - bool ftp_trying_alternative; - - int httpversion; /* the lowest HTTP version*10 reported by any server - involved in this request */ - bool expect100header; /* TRUE if we added Expect: 100-continue */ - - bool pipe_broke; /* TRUE if the connection we were pipelined on broke - and we need to restart from the beginning */ - -#if !defined(WIN32) && !defined(MSDOS) && !defined(__EMX__) && \ - !defined(__SYMBIAN32__) -/* do FTP line-end conversions on most platforms */ -#define CURL_DO_LINEEND_CONV - /* for FTP downloads: track CRLF sequences that span blocks */ - bool prev_block_had_trailing_cr; - /* for FTP downloads: how many CRLFs did we converted to LFs? */ - curl_off_t crlf_conversions; -#endif - char *pathbuffer;/* allocated buffer to store the URL's path part in */ - char *path; /* path to use, points to somewhere within the pathbuffer - area */ - bool slash_removed; /* set TRUE if the 'path' points to a path where the - initial URL slash separator has been taken off */ - bool use_range; - bool rangestringalloc; /* the range string is malloc()'ed */ - - char *range; /* range, if used. See README for detailed specification on - this syntax. */ - curl_off_t resume_from; /* continue [ftp] transfer from here */ - - /* This RTSP state information survives requests and connections */ - long rtsp_next_client_CSeq; /* the session's next client CSeq */ - long rtsp_next_server_CSeq; /* the session's next server CSeq */ - long rtsp_CSeq_recv; /* most recent CSeq received */ - - curl_off_t infilesize; /* size of file to upload, -1 means unknown. - Copied from set.filesize at start of operation */ - - size_t drain; /* Increased when this stream has data to read, even if its - socket is not necessarily is readable. Decreased when - checked. */ - bool done; /* set to FALSE when Curl_init_do() is called and set to TRUE - when multi_done() is called, to prevent multi_done() to get - invoked twice when the multi interface is used. */ - - curl_read_callback fread_func; /* read callback/function */ - void *in; /* CURLOPT_READDATA */ - - struct Curl_easy *stream_depends_on; - bool stream_depends_e; /* set or don't set the Exclusive bit */ - int stream_weight; -}; - - -/* - * This 'DynamicStatic' struct defines dynamic states that actually change - * values in the 'UserDefined' area, which MUST be taken into consideration - * if the UserDefined struct is cloned or similar. You can probably just - * copy these, but each one indicate a special action on other data. - */ - -struct DynamicStatic { - char *url; /* work URL, copied from UserDefined */ - bool url_alloc; /* URL string is malloc()'ed */ - char *referer; /* referer string */ - bool referer_alloc; /* referer sting is malloc()ed */ - struct curl_slist *cookielist; /* list of cookie files set by - curl_easy_setopt(COOKIEFILE) calls */ - struct curl_slist *resolve; /* set to point to the set.resolve list when - this should be dealt with in pretransfer */ -}; - -/* - * This 'UserDefined' struct must only contain data that is set once to go - * for many (perhaps) independent connections. Values that are generated or - * calculated internally for the "session handle" MUST be defined within the - * 'struct UrlState' instead. The only exceptions MUST note the changes in - * the 'DynamicStatic' struct. - * Character pointer fields point to dynamic storage, unless otherwise stated. - */ - -struct Curl_multi; /* declared and used only in multi.c */ - -enum dupstring { - STRING_CERT_ORIG, /* client certificate file name */ - STRING_CERT_PROXY, /* client certificate file name */ - STRING_CERT_TYPE_ORIG, /* format for certificate (default: PEM)*/ - STRING_CERT_TYPE_PROXY, /* format for certificate (default: PEM)*/ - STRING_COOKIE, /* HTTP cookie string to send */ - STRING_COOKIEJAR, /* dump all cookies to this file */ - STRING_CUSTOMREQUEST, /* HTTP/FTP/RTSP request/method to use */ - STRING_DEFAULT_PROTOCOL, /* Protocol to use when the URL doesn't specify */ - STRING_DEVICE, /* local network interface/address to use */ - STRING_ENCODING, /* Accept-Encoding string */ - STRING_FTP_ACCOUNT, /* ftp account data */ - STRING_FTP_ALTERNATIVE_TO_USER, /* command to send if USER/PASS fails */ - STRING_FTPPORT, /* port to send with the FTP PORT command */ - STRING_KEY_ORIG, /* private key file name */ - STRING_KEY_PROXY, /* private key file name */ - STRING_KEY_PASSWD_ORIG, /* plain text private key password */ - STRING_KEY_PASSWD_PROXY, /* plain text private key password */ - STRING_KEY_TYPE_ORIG, /* format for private key (default: PEM) */ - STRING_KEY_TYPE_PROXY, /* format for private key (default: PEM) */ - STRING_KRB_LEVEL, /* krb security level */ - STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find - $HOME/.netrc */ - STRING_PROXY, /* proxy to use */ - STRING_PRE_PROXY, /* pre socks proxy to use */ - STRING_SET_RANGE, /* range, if used */ - STRING_SET_REFERER, /* custom string for the HTTP referer field */ - STRING_SET_URL, /* what original URL to work on */ - STRING_SSL_CAPATH_ORIG, /* CA directory name (doesn't work on windows) */ - STRING_SSL_CAPATH_PROXY, /* CA directory name (doesn't work on windows) */ - STRING_SSL_CAFILE_ORIG, /* certificate file to verify peer against */ - STRING_SSL_CAFILE_PROXY, /* certificate file to verify peer against */ - STRING_SSL_PINNEDPUBLICKEY_ORIG, /* public key file to verify peer against */ - STRING_SSL_PINNEDPUBLICKEY_PROXY, /* public key file to verify proxy */ - STRING_SSL_CIPHER_LIST_ORIG, /* list of ciphers to use */ - STRING_SSL_CIPHER_LIST_PROXY, /* list of ciphers to use */ - STRING_SSL_EGDSOCKET, /* path to file containing the EGD daemon socket */ - STRING_SSL_RANDOM_FILE, /* path to file containing "random" data */ - STRING_USERAGENT, /* User-Agent string */ - STRING_SSL_CRLFILE_ORIG, /* crl file to check certificate */ - STRING_SSL_CRLFILE_PROXY, /* crl file to check certificate */ - STRING_SSL_ISSUERCERT_ORIG, /* issuer cert file to check certificate */ - STRING_SSL_ISSUERCERT_PROXY, /* issuer cert file to check certificate */ - STRING_USERNAME, /* , if used */ - STRING_PASSWORD, /* , if used */ - STRING_OPTIONS, /* , if used */ - STRING_PROXYUSERNAME, /* Proxy , if used */ - STRING_PROXYPASSWORD, /* Proxy , if used */ - STRING_NOPROXY, /* List of hosts which should not use the proxy, if - used */ - STRING_RTSP_SESSION_ID, /* Session ID to use */ - STRING_RTSP_STREAM_URI, /* Stream URI for this request */ - STRING_RTSP_TRANSPORT, /* Transport for this session */ -#ifdef USE_LIBSSH2 - STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */ - STRING_SSH_PUBLIC_KEY, /* path to the public key file for auth */ - STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */ - STRING_SSH_KNOWNHOSTS, /* file name of knownhosts file */ -#endif -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - STRING_PROXY_SERVICE_NAME, /* Proxy service name */ -#endif -#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ - defined(USE_SPNEGO) - STRING_SERVICE_NAME, /* Service name */ -#endif - STRING_MAIL_FROM, - STRING_MAIL_AUTH, - -#ifdef USE_TLS_SRP - STRING_TLSAUTH_USERNAME_ORIG, /* TLS auth */ - STRING_TLSAUTH_USERNAME_PROXY, /* TLS auth */ - STRING_TLSAUTH_PASSWORD_ORIG, /* TLS auth */ - STRING_TLSAUTH_PASSWORD_PROXY, /* TLS auth */ -#endif - STRING_BEARER, /* , if used */ -#ifdef USE_UNIX_SOCKETS - STRING_UNIX_SOCKET_PATH, /* path to Unix socket, if used */ -#endif - - /* -- end of zero-terminated strings -- */ - - STRING_LASTZEROTERMINATED, - - /* -- below this are pointers to binary data that cannot be strdup'ed. - Each such pointer must be added manually to Curl_dupset() --- */ - - STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */ - - STRING_LAST /* not used, just an end-of-list marker */ -}; - -struct UserDefined { - FILE *err; /* the stderr user data goes here */ - void *debugdata; /* the data that will be passed to fdebug */ - char *errorbuffer; /* (Static) store failure messages in here */ - long proxyport; /* If non-zero, use this port number by default. If the - proxy string features a ":[port]" that one will override - this. */ - void *out; /* CURLOPT_WRITEDATA */ - void *in_set; /* CURLOPT_READDATA */ - void *writeheader; /* write the header to this if non-NULL */ - void *rtp_out; /* write RTP to this if non-NULL */ - long use_port; /* which port to use (when not using default) */ - unsigned long httpauth; /* kind of HTTP authentication to use (bitmask) */ - unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */ - long followlocation; /* as in HTTP Location: */ - long maxredirs; /* maximum no. of http(s) redirects to follow, set to -1 - for infinity */ - - int keep_post; /* keep POSTs as POSTs after a 30x request; each - bit represents a request, from 301 to 303 */ - bool free_referer; /* set TRUE if 'referer' points to a string we - allocated */ - void *postfields; /* if POST, set the fields' values here */ - curl_seek_callback seek_func; /* function that seeks the input */ - curl_off_t postfieldsize; /* if POST, this might have a size to use instead - of strlen(), and then the data *may* be binary - (contain zero bytes) */ - unsigned short localport; /* local port number to bind to */ - int localportrange; /* number of additional port numbers to test in case the - 'localport' one can't be bind()ed */ - curl_write_callback fwrite_func; /* function that stores the output */ - curl_write_callback fwrite_header; /* function that stores headers */ - curl_write_callback fwrite_rtp; /* function that stores interleaved RTP */ - curl_read_callback fread_func_set; /* function that reads the input */ - int is_fread_set; /* boolean, has read callback been set to non-NULL? */ - int is_fwrite_set; /* boolean, has write callback been set to non-NULL? */ - curl_progress_callback fprogress; /* OLD and deprecated progress callback */ - curl_xferinfo_callback fxferinfo; /* progress callback */ - curl_debug_callback fdebug; /* function that write informational data */ - curl_ioctl_callback ioctl_func; /* function for I/O control */ - curl_sockopt_callback fsockopt; /* function for setting socket options */ - void *sockopt_client; /* pointer to pass to the socket options callback */ - curl_opensocket_callback fopensocket; /* function for checking/translating - the address and opening the - socket */ - void *opensocket_client; - curl_closesocket_callback fclosesocket; /* function for closing the - socket */ - void *closesocket_client; - - void *seek_client; /* pointer to pass to the seek callback */ - /* the 3 curl_conv_callback functions below are used on non-ASCII hosts */ - /* function to convert from the network encoding: */ - curl_conv_callback convfromnetwork; - /* function to convert to the network encoding: */ - curl_conv_callback convtonetwork; - /* function to convert from UTF-8 encoding: */ - curl_conv_callback convfromutf8; - - void *progress_client; /* pointer to pass to the progress callback */ - void *ioctl_client; /* pointer to pass to the ioctl callback */ - long timeout; /* in milliseconds, 0 means no timeout */ - long connecttimeout; /* in milliseconds, 0 means no timeout */ - long accepttimeout; /* in milliseconds, 0 means no timeout */ - long server_response_timeout; /* in milliseconds, 0 means no timeout */ - long tftp_blksize; /* in bytes, 0 means use default */ - bool tftp_no_options; /* do not send TFTP options requests */ - curl_off_t filesize; /* size of file to upload, -1 means unknown */ - long low_speed_limit; /* bytes/second */ - long low_speed_time; /* number of seconds */ - curl_off_t max_send_speed; /* high speed limit in bytes/second for upload */ - curl_off_t max_recv_speed; /* high speed limit in bytes/second for - download */ - curl_off_t set_resume_from; /* continue [ftp] transfer from here */ - struct curl_slist *headers; /* linked list of extra headers */ - struct curl_slist *proxyheaders; /* linked list of extra CONNECT headers */ - struct curl_httppost *httppost; /* linked list of POST data */ - bool sep_headers; /* handle host and proxy headers separately */ - bool cookiesession; /* new cookie session? */ - bool crlf; /* convert crlf on ftp upload(?) */ - struct curl_slist *quote; /* after connection is established */ - struct curl_slist *postquote; /* after the transfer */ - struct curl_slist *prequote; /* before the transfer, after type */ - struct curl_slist *source_quote; /* 3rd party quote */ - struct curl_slist *source_prequote; /* in 3rd party transfer mode - before - the transfer on source host */ - struct curl_slist *source_postquote; /* in 3rd party transfer mode - after - the transfer on source host */ - struct curl_slist *telnet_options; /* linked list of telnet options */ - struct curl_slist *resolve; /* list of names to add/remove from - DNS cache */ - struct curl_slist *connect_to; /* list of host:port mappings to override - the hostname and port to connect to */ - curl_TimeCond timecondition; /* kind of time/date comparison */ - time_t timevalue; /* what time to compare with */ - Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */ - long httpversion; /* when non-zero, a specific HTTP version requested to - be used in the library's request(s) */ - struct ssl_config_data ssl; /* user defined SSL stuff */ - struct ssl_config_data proxy_ssl; /* user defined SSL stuff for proxy */ - struct ssl_general_config general_ssl; /* general user defined SSL stuff */ - curl_proxytype proxytype; /* what kind of proxy that is in use */ - long dns_cache_timeout; /* DNS cache timeout */ - long buffer_size; /* size of receive buffer to use */ - void *private_data; /* application-private data */ - - struct curl_slist *http200aliases; /* linked list of aliases for http200 */ - - long ipver; /* the CURL_IPRESOLVE_* defines in the public header file - 0 - whatever, 1 - v2, 2 - v6 */ - - curl_off_t max_filesize; /* Maximum file size to download */ - - curl_ftpfile ftp_filemethod; /* how to get to a file when FTP is used */ - - int ftp_create_missing_dirs; /* 1 - create directories that don't exist - 2 - the same but also allow MKD to fail once - */ - - curl_sshkeycallback ssh_keyfunc; /* key matching callback */ - void *ssh_keyfunc_userp; /* custom pointer to callback */ - -/* Here follows boolean settings that define how to behave during - this session. They are STATIC, set by libcurl users or at least initially - and they don't change during operations. */ - - bool printhost; /* printing host name in debug info */ - bool get_filetime; /* get the time and get of the remote file */ - bool tunnel_thru_httpproxy; /* use CONNECT through a HTTP proxy */ - bool prefer_ascii; /* ASCII rather than binary */ - bool ftp_append; /* append, not overwrite, on upload */ - bool ftp_list_only; /* switch FTP command for listing directories */ - bool ftp_use_port; /* use the FTP PORT command */ - bool hide_progress; /* don't use the progress meter */ - bool http_fail_on_error; /* fail on HTTP error codes >= 400 */ - bool http_keep_sending_on_error; /* for HTTP status codes >= 300 */ - bool http_follow_location; /* follow HTTP redirects */ - bool http_transfer_encoding; /* request compressed HTTP transfer-encoding */ - bool http_disable_hostname_check_before_authentication; - bool include_header; /* include received protocol headers in data output */ - bool http_set_referer; /* is a custom referer used */ - bool http_auto_referer; /* set "correct" referer when following location: */ - bool opt_no_body; /* as set with CURLOPT_NOBODY */ - bool upload; /* upload request */ - enum CURL_NETRC_OPTION - use_netrc; /* defined in include/curl.h */ - bool verbose; /* output verbosity */ - bool krb; /* Kerberos connection requested */ - bool reuse_forbid; /* forbidden to be reused, close after use */ - bool reuse_fresh; /* do not re-use an existing connection */ - bool ftp_use_epsv; /* if EPSV is to be attempted or not */ - bool ftp_use_eprt; /* if EPRT is to be attempted or not */ - bool ftp_use_pret; /* if PRET is to be used before PASV or not */ - - curl_usessl use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or - IMAP or POP3 or others! */ - curl_ftpauth ftpsslauth; /* what AUTH XXX to be attempted */ - curl_ftpccc ftp_ccc; /* FTP CCC options */ - bool no_signal; /* do not use any signal/alarm handler */ - bool global_dns_cache; /* subject for future removal */ - bool tcp_nodelay; /* whether to enable TCP_NODELAY or not */ - bool ignorecl; /* ignore content length */ - bool ftp_skip_ip; /* skip the IP address the FTP server passes on to - us */ - bool connect_only; /* make connection, let application use the socket */ - long ssh_auth_types; /* allowed SSH auth types */ - bool http_te_skip; /* pass the raw body data to the user, even when - transfer-encoded (chunked, compressed) */ - bool http_ce_skip; /* pass the raw body data to the user, even when - content-encoded (chunked, compressed) */ - long new_file_perms; /* Permissions to use when creating remote files */ - long new_directory_perms; /* Permissions to use when creating remote dirs */ - bool proxy_transfer_mode; /* set transfer mode (;type=) when doing FTP - via an HTTP proxy */ - char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */ - unsigned int scope_id; /* Scope id for IPv6 */ - long allowed_protocols; - long redir_protocols; -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - bool socks5_gssapi_nec; /* Flag to support NEC SOCKS5 server */ -#endif - struct curl_slist *mail_rcpt; /* linked list of mail recipients */ - bool sasl_ir; /* Enable/disable SASL initial response */ - /* Common RTSP header options */ - Curl_RtspReq rtspreq; /* RTSP request type */ - long rtspversion; /* like httpversion, for RTSP */ - bool wildcardmatch; /* enable wildcard matching */ - curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer - starts */ - curl_chunk_end_callback chunk_end; /* called after part transferring - stopped */ - curl_fnmatch_callback fnmatch; /* callback to decide which file corresponds - to pattern (e.g. if WILDCARDMATCH is on) */ - void *fnmatch_data; - - long gssapi_delegation; /* GSS-API credential delegation, see the - documentation of CURLOPT_GSSAPI_DELEGATION */ - - bool tcp_keepalive; /* use TCP keepalives */ - long tcp_keepidle; /* seconds in idle before sending keepalive probe */ - long tcp_keepintvl; /* seconds between TCP keepalive probes */ - bool tcp_fastopen; /* use TCP Fast Open */ - - size_t maxconnects; /* Max idle connections in the connection cache */ - - bool ssl_enable_npn; /* TLS NPN extension? */ - bool ssl_enable_alpn; /* TLS ALPN extension? */ - bool path_as_is; /* allow dotdots? */ - bool pipewait; /* wait for pipe/multiplex status before starting a - new connection */ - long expect_100_timeout; /* in milliseconds */ - - struct Curl_easy *stream_depends_on; - bool stream_depends_e; /* set or don't set the Exclusive bit */ - int stream_weight; - - struct Curl_http2_dep *stream_dependents; - - bool abstract_unix_socket; -}; - -struct Names { - struct curl_hash *hostcache; - enum { - HCACHE_NONE, /* not pointing to anything */ - HCACHE_GLOBAL, /* points to the (shrug) global one */ - HCACHE_MULTI, /* points to a shared one in the multi handle */ - HCACHE_SHARED /* points to a shared one in a shared object */ - } hostcachetype; -}; - -/* - * The 'connectdata' struct MUST have all the connection oriented stuff as we - * may have several simultaneous connections and connection structs in memory. - * - * The 'struct UserDefined' must only contain data that is set once to go for - * many (perhaps) independent connections. Values that are generated or - * calculated internally for the "session handle" must be defined within the - * 'struct UrlState' instead. - */ - -struct Curl_easy { - /* first, two fields for the linked list of these */ - struct Curl_easy *next; - struct Curl_easy *prev; - - struct connectdata *easy_conn; /* the "unit's" connection */ - - CURLMstate mstate; /* the handle's state */ - CURLcode result; /* previous result */ - - struct Curl_message msg; /* A single posted message. */ - - /* Array with the plain socket numbers this handle takes care of, in no - particular order. Note that all sockets are added to the sockhash, where - the state etc are also kept. This array is mostly used to detect when a - socket is to be removed from the hash. See singlesocket(). */ - curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE]; - int numsocks; - - struct Names dns; - struct Curl_multi *multi; /* if non-NULL, points to the multi handle - struct to which this "belongs" when used by - the multi interface */ - struct Curl_multi *multi_easy; /* if non-NULL, points to the multi handle - struct to which this "belongs" when used - by the easy interface */ - struct Curl_share *share; /* Share, handles global variable mutexing */ - struct SingleRequest req; /* Request-specific data */ - struct UserDefined set; /* values set by the libcurl user */ - struct DynamicStatic change; /* possibly modified userdefined data */ - struct CookieInfo *cookies; /* the cookies, read from files and servers. - NOTE that the 'cookie' field in the - UserDefined struct defines if the "engine" - is to be used or not. */ - struct Progress progress; /* for all the progress meter data */ - struct UrlState state; /* struct for fields used for state info and - other dynamic purposes */ - struct WildcardData wildcard; /* wildcard download state info */ - struct PureInfo info; /* stats, reports and info data */ - struct curl_tlssessioninfo tsi; /* Information about the TLS session, only - valid after a client has asked for it */ -#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV) - iconv_t outbound_cd; /* for translating to the network encoding */ - iconv_t inbound_cd; /* for translating from the network encoding */ - iconv_t utf8_cd; /* for translating to UTF8 */ -#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */ - unsigned int magic; /* set to a CURLEASY_MAGIC_NUMBER */ -}; - -#define LIBCURL_NAME "libcurl" - -#endif /* HEADER_CURL_URLDATA_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/cleartext.c b/build/premake/premake5/contrib/curl/lib/vauth/cleartext.c deleted file mode 100644 index a761ae7846..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/cleartext.c +++ /dev/null @@ -1,165 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC4616 PLAIN authentication - * Draft LOGIN SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "urldata.h" - -#include "vauth/vauth.h" -#include "curl_base64.h" -#include "curl_md5.h" -#include "warnless.h" -#include "strtok.h" -#include "sendf.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_create_plain_message() - * - * This is used to generate an already encoded PLAIN message ready - * for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name. - * passdwp [in] - The user's password. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_plain_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - char **outptr, size_t *outlen) -{ - CURLcode result; - char *plainauth; - size_t ulen; - size_t plen; - size_t plainlen; - - *outlen = 0; - *outptr = NULL; - ulen = strlen(userp); - plen = strlen(passwdp); - - /* Compute binary message length, checking for overflows. */ - plainlen = 2 * ulen; - if(plainlen < ulen) - return CURLE_OUT_OF_MEMORY; - plainlen += plen; - if(plainlen < plen) - return CURLE_OUT_OF_MEMORY; - plainlen += 2; - if(plainlen < 2) - return CURLE_OUT_OF_MEMORY; - - plainauth = malloc(plainlen); - if(!plainauth) - return CURLE_OUT_OF_MEMORY; - - /* Calculate the reply */ - memcpy(plainauth, userp, ulen); - plainauth[ulen] = '\0'; - memcpy(plainauth + ulen + 1, userp, ulen); - plainauth[2 * ulen + 1] = '\0'; - memcpy(plainauth + 2 * ulen + 2, passwdp, plen); - - /* Base64 encode the reply */ - result = Curl_base64_encode(data, plainauth, plainlen, outptr, outlen); - free(plainauth); - - return result; -} - -/* - * Curl_auth_create_login_message() - * - * This is used to generate an already encoded LOGIN message containing the - * user name or password ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * valuep [in] - The user name or user's password. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_login_message(struct Curl_easy *data, - const char *valuep, char **outptr, - size_t *outlen) -{ - size_t vlen = strlen(valuep); - - if(!vlen) { - /* Calculate an empty reply */ - *outptr = strdup("="); - if(*outptr) { - *outlen = (size_t) 1; - return CURLE_OK; - } - - *outlen = 0; - return CURLE_OUT_OF_MEMORY; - } - - /* Base64 encode the value */ - return Curl_base64_encode(data, valuep, vlen, outptr, outlen); -} - -/* - * Curl_auth_create_external_message() - * - * This is used to generate an already encoded EXTERNAL message containing - * the user name ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * user [in] - The user name. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_external_message(struct Curl_easy *data, - const char *user, char **outptr, - size_t *outlen) -{ - /* This is the same formatting as the login message */ - return Curl_auth_create_login_message(data, user, outptr, outlen); -} diff --git a/build/premake/premake5/contrib/curl/lib/vauth/cram.c b/build/premake/premake5/contrib/curl/lib/vauth/cram.c deleted file mode 100644 index 3074a163a1..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/cram.c +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC2195 CRAM-MD5 authentication - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) - -#include -#include "urldata.h" - -#include "vauth/vauth.h" -#include "curl_base64.h" -#include "curl_hmac.h" -#include "curl_md5.h" -#include "warnless.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_decode_cram_md5_message() - * - * This is used to decode an already encoded CRAM-MD5 challenge message. - * - * Parameters: - * - * chlg64 [in] - The base64 encoded challenge message. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_cram_md5_message(const char *chlg64, char **outptr, - size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlg64len = strlen(chlg64); - - *outptr = NULL; - *outlen = 0; - - /* Decode the challenge if necessary */ - if(chlg64len && *chlg64 != '=') - result = Curl_base64_decode(chlg64, (unsigned char **) outptr, outlen); - - return result; -} - -/* - * Curl_auth_create_cram_md5_message() - * - * This is used to generate an already encoded CRAM-MD5 response message ready - * for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg [in] - The challenge. - * userp [in] - The user name. - * passdwp [in] - The user's password. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_cram_md5_message(struct Curl_easy *data, - const char *chlg, - const char *userp, - const char *passwdp, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - HMAC_context *ctxt; - unsigned char digest[MD5_DIGEST_LEN]; - char *response; - - if(chlg) - chlglen = strlen(chlg); - - /* Compute the digest using the password as the key */ - ctxt = Curl_HMAC_init(Curl_HMAC_MD5, - (const unsigned char *) passwdp, - curlx_uztoui(strlen(passwdp))); - if(!ctxt) - return CURLE_OUT_OF_MEMORY; - - /* Update the digest with the given challenge */ - if(chlglen > 0) - Curl_HMAC_update(ctxt, (const unsigned char *) chlg, - curlx_uztoui(chlglen)); - - /* Finalise the digest */ - Curl_HMAC_final(ctxt, digest); - - /* Generate the response */ - response = aprintf( - "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - userp, digest[0], digest[1], digest[2], digest[3], digest[4], - digest[5], digest[6], digest[7], digest[8], digest[9], digest[10], - digest[11], digest[12], digest[13], digest[14], digest[15]); - if(!response) - return CURLE_OUT_OF_MEMORY; - - /* Base64 encode the response */ - result = Curl_base64_encode(data, response, 0, outptr, outlen); - - free(response); - - return result; -} - -#endif /* !CURL_DISABLE_CRYPTO_AUTH */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/digest.c b/build/premake/premake5/contrib/curl/lib/vauth/digest.c deleted file mode 100644 index 7d9200ad06..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/digest.c +++ /dev/null @@ -1,900 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC2831 DIGEST-MD5 authentication - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) - -#include - -#include "vauth/vauth.h" -#include "vauth/digest.h" -#include "urldata.h" -#include "curl_base64.h" -#include "curl_hmac.h" -#include "curl_md5.h" -#include "vtls/vtls.h" -#include "warnless.h" -#include "strtok.h" -#include "strcase.h" -#include "non-ascii.h" /* included for Curl_convert_... prototypes */ -#include "curl_printf.h" -#include "rand.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -#if !defined(USE_WINDOWS_SSPI) -#define DIGEST_QOP_VALUE_AUTH (1 << 0) -#define DIGEST_QOP_VALUE_AUTH_INT (1 << 1) -#define DIGEST_QOP_VALUE_AUTH_CONF (1 << 2) - -#define DIGEST_QOP_VALUE_STRING_AUTH "auth" -#define DIGEST_QOP_VALUE_STRING_AUTH_INT "auth-int" -#define DIGEST_QOP_VALUE_STRING_AUTH_CONF "auth-conf" - -/* The CURL_OUTPUT_DIGEST_CONV macro below is for non-ASCII machines. - It converts digest text to ASCII so the MD5 will be correct for - what ultimately goes over the network. -*/ -#define CURL_OUTPUT_DIGEST_CONV(a, b) \ - result = Curl_convert_to_network(a, (char *)b, strlen((const char *)b)); \ - if(result) { \ - free(b); \ - return result; \ - } -#endif /* !USE_WINDOWS_SSPI */ - -bool Curl_auth_digest_get_pair(const char *str, char *value, char *content, - const char **endptr) -{ - int c; - bool starts_with_quote = FALSE; - bool escape = FALSE; - - for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--);) - *value++ = *str++; - *value = 0; - - if('=' != *str++) - /* eek, no match */ - return FALSE; - - if('\"' == *str) { - /* This starts with a quote so it must end with one as well! */ - str++; - starts_with_quote = TRUE; - } - - for(c = DIGEST_MAX_CONTENT_LENGTH - 1; *str && c--; str++) { - switch(*str) { - case '\\': - if(!escape) { - /* possibly the start of an escaped quote */ - escape = TRUE; - *content++ = '\\'; /* Even though this is an escape character, we still - store it as-is in the target buffer */ - continue; - } - break; - - case ',': - if(!starts_with_quote) { - /* This signals the end of the content if we didn't get a starting - quote and then we do "sloppy" parsing */ - c = 0; /* the end */ - continue; - } - break; - - case '\r': - case '\n': - /* end of string */ - c = 0; - continue; - - case '\"': - if(!escape && starts_with_quote) { - /* end of string */ - c = 0; - continue; - } - break; - } - - escape = FALSE; - *content++ = *str; - } - - *content = 0; - *endptr = str; - - return TRUE; -} - -#if !defined(USE_WINDOWS_SSPI) -/* Convert md5 chunk to RFC2617 (section 3.1.3) -suitable ascii string*/ -static void auth_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */ - unsigned char *dest) /* 33 bytes */ -{ - int i; - for(i = 0; i < 16; i++) - snprintf((char *) &dest[i * 2], 3, "%02x", source[i]); -} - -/* Perform quoted-string escaping as described in RFC2616 and its errata */ -static char *auth_digest_string_quoted(const char *source) -{ - char *dest, *d; - const char *s = source; - size_t n = 1; /* null terminator */ - - /* Calculate size needed */ - while(*s) { - ++n; - if(*s == '"' || *s == '\\') { - ++n; - } - ++s; - } - - dest = malloc(n); - if(dest) { - s = source; - d = dest; - while(*s) { - if(*s == '"' || *s == '\\') { - *d++ = '\\'; - } - *d++ = *s++; - } - *d = 0; - } - - return dest; -} - -/* Retrieves the value for a corresponding key from the challenge string - * returns TRUE if the key could be found, FALSE if it does not exists - */ -static bool auth_digest_get_key_value(const char *chlg, - const char *key, - char *value, - size_t max_val_len, - char end_char) -{ - char *find_pos; - size_t i; - - find_pos = strstr(chlg, key); - if(!find_pos) - return FALSE; - - find_pos += strlen(key); - - for(i = 0; *find_pos && *find_pos != end_char && i < max_val_len - 1; ++i) - value[i] = *find_pos++; - value[i] = '\0'; - - return TRUE; -} - -static CURLcode auth_digest_get_qop_values(const char *options, int *value) -{ - char *tmp; - char *token; - char *tok_buf; - - /* Initialise the output */ - *value = 0; - - /* Tokenise the list of qop values. Use a temporary clone of the buffer since - strtok_r() ruins it. */ - tmp = strdup(options); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - token = strtok_r(tmp, ",", &tok_buf); - while(token != NULL) { - if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH)) - *value |= DIGEST_QOP_VALUE_AUTH; - else if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH_INT)) - *value |= DIGEST_QOP_VALUE_AUTH_INT; - else if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH_CONF)) - *value |= DIGEST_QOP_VALUE_AUTH_CONF; - - token = strtok_r(NULL, ",", &tok_buf); - } - - free(tmp); - - return CURLE_OK; -} - -/* - * auth_decode_digest_md5_message() - * - * This is used internally to decode an already encoded DIGEST-MD5 challenge - * message into the seperate attributes. - * - * Parameters: - * - * chlg64 [in] - The base64 encoded challenge message. - * nonce [in/out] - The buffer where the nonce will be stored. - * nlen [in] - The length of the nonce buffer. - * realm [in/out] - The buffer where the realm will be stored. - * rlen [in] - The length of the realm buffer. - * alg [in/out] - The buffer where the algorithm will be stored. - * alen [in] - The length of the algorithm buffer. - * qop [in/out] - The buffer where the qop-options will be stored. - * qlen [in] - The length of the qop buffer. - * - * Returns CURLE_OK on success. - */ -static CURLcode auth_decode_digest_md5_message(const char *chlg64, - char *nonce, size_t nlen, - char *realm, size_t rlen, - char *alg, size_t alen, - char *qop, size_t qlen) -{ - CURLcode result = CURLE_OK; - unsigned char *chlg = NULL; - size_t chlglen = 0; - size_t chlg64len = strlen(chlg64); - - /* Decode the base-64 encoded challenge message */ - if(chlg64len && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) - return CURLE_BAD_CONTENT_ENCODING; - - /* Retrieve nonce string from the challenge */ - if(!auth_digest_get_key_value((char *) chlg, "nonce=\"", nonce, nlen, - '\"')) { - free(chlg); - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Retrieve realm string from the challenge */ - if(!auth_digest_get_key_value((char *) chlg, "realm=\"", realm, rlen, - '\"')) { - /* Challenge does not have a realm, set empty string [RFC2831] page 6 */ - strcpy(realm, ""); - } - - /* Retrieve algorithm string from the challenge */ - if(!auth_digest_get_key_value((char *) chlg, "algorithm=", alg, alen, ',')) { - free(chlg); - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Retrieve qop-options string from the challenge */ - if(!auth_digest_get_key_value((char *) chlg, "qop=\"", qop, qlen, '\"')) { - free(chlg); - return CURLE_BAD_CONTENT_ENCODING; - } - - free(chlg); - - return CURLE_OK; -} - -/* - * Curl_auth_is_digest_supported() - * - * This is used to evaluate if DIGEST is supported. - * - * Parameters: None - * - * Returns TRUE as DIGEST as handled by libcurl. - */ -bool Curl_auth_is_digest_supported(void) -{ - return TRUE; -} - -/* - * Curl_auth_create_digest_md5_message() - * - * This is used to generate an already encoded DIGEST-MD5 response message - * ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg64 [in] - The base64 encoded challenge message. - * userp [in] - The user name. - * passdwp [in] - The user's password. - * service [in] - The service type such as http, smtp, pop or imap. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, - const char *chlg64, - const char *userp, - const char *passwdp, - const char *service, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t i; - MD5_context *ctxt; - char *response = NULL; - unsigned char digest[MD5_DIGEST_LEN]; - char HA1_hex[2 * MD5_DIGEST_LEN + 1]; - char HA2_hex[2 * MD5_DIGEST_LEN + 1]; - char resp_hash_hex[2 * MD5_DIGEST_LEN + 1]; - char nonce[64]; - char realm[128]; - char algorithm[64]; - char qop_options[64]; - int qop_values; - char cnonce[33]; - unsigned int entropy[4]; - char nonceCount[] = "00000001"; - char method[] = "AUTHENTICATE"; - char qop[] = DIGEST_QOP_VALUE_STRING_AUTH; - char *spn = NULL; - - /* Decode the challange message */ - result = auth_decode_digest_md5_message(chlg64, nonce, sizeof(nonce), - realm, sizeof(realm), - algorithm, sizeof(algorithm), - qop_options, sizeof(qop_options)); - if(result) - return result; - - /* We only support md5 sessions */ - if(strcmp(algorithm, "md5-sess") != 0) - return CURLE_BAD_CONTENT_ENCODING; - - /* Get the qop-values from the qop-options */ - result = auth_digest_get_qop_values(qop_options, &qop_values); - if(result) - return result; - - /* We only support auth quality-of-protection */ - if(!(qop_values & DIGEST_QOP_VALUE_AUTH)) - return CURLE_BAD_CONTENT_ENCODING; - - /* Generate 16 bytes of random data */ - result = Curl_rand(data, &entropy[0], 4); - if(result) - return result; - - /* Convert the random data into a 32 byte hex string */ - snprintf(cnonce, sizeof(cnonce), "%08x%08x%08x%08x", - entropy[0], entropy[1], entropy[2], entropy[3]); - - /* So far so good, now calculate A1 and H(A1) according to RFC 2831 */ - ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) - return CURLE_OUT_OF_MEMORY; - - Curl_MD5_update(ctxt, (const unsigned char *) userp, - curlx_uztoui(strlen(userp))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) realm, - curlx_uztoui(strlen(realm))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) passwdp, - curlx_uztoui(strlen(passwdp))); - Curl_MD5_final(ctxt, digest); - - ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) - return CURLE_OUT_OF_MEMORY; - - Curl_MD5_update(ctxt, (const unsigned char *) digest, MD5_DIGEST_LEN); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) nonce, - curlx_uztoui(strlen(nonce))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) cnonce, - curlx_uztoui(strlen(cnonce))); - Curl_MD5_final(ctxt, digest); - - /* Convert calculated 16 octet hex into 32 bytes string */ - for(i = 0; i < MD5_DIGEST_LEN; i++) - snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]); - - /* Generate our SPN */ - spn = Curl_auth_build_spn(service, realm, NULL); - if(!spn) - return CURLE_OUT_OF_MEMORY; - - /* Calculate H(A2) */ - ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) { - free(spn); - - return CURLE_OUT_OF_MEMORY; - } - - Curl_MD5_update(ctxt, (const unsigned char *) method, - curlx_uztoui(strlen(method))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) spn, - curlx_uztoui(strlen(spn))); - Curl_MD5_final(ctxt, digest); - - for(i = 0; i < MD5_DIGEST_LEN; i++) - snprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]); - - /* Now calculate the response hash */ - ctxt = Curl_MD5_init(Curl_DIGEST_MD5); - if(!ctxt) { - free(spn); - - return CURLE_OUT_OF_MEMORY; - } - - Curl_MD5_update(ctxt, (const unsigned char *) HA1_hex, 2 * MD5_DIGEST_LEN); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) nonce, - curlx_uztoui(strlen(nonce))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - - Curl_MD5_update(ctxt, (const unsigned char *) nonceCount, - curlx_uztoui(strlen(nonceCount))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) cnonce, - curlx_uztoui(strlen(cnonce))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - Curl_MD5_update(ctxt, (const unsigned char *) qop, - curlx_uztoui(strlen(qop))); - Curl_MD5_update(ctxt, (const unsigned char *) ":", 1); - - Curl_MD5_update(ctxt, (const unsigned char *) HA2_hex, 2 * MD5_DIGEST_LEN); - Curl_MD5_final(ctxt, digest); - - for(i = 0; i < MD5_DIGEST_LEN; i++) - snprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]); - - /* Generate the response */ - response = aprintf("username=\"%s\",realm=\"%s\",nonce=\"%s\"," - "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\",response=%s," - "qop=%s", - userp, realm, nonce, - cnonce, nonceCount, spn, resp_hash_hex, qop); - free(spn); - if(!response) - return CURLE_OUT_OF_MEMORY; - - /* Base64 encode the response */ - result = Curl_base64_encode(data, response, 0, outptr, outlen); - - free(response); - - return result; -} - -/* - * Curl_auth_decode_digest_http_message() - * - * This is used to decode a HTTP DIGEST challenge message into the seperate - * attributes. - * - * Parameters: - * - * chlg [in] - The challenge message. - * digest [in/out] - The digest data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_digest_http_message(const char *chlg, - struct digestdata *digest) -{ - bool before = FALSE; /* got a nonce before */ - bool foundAuth = FALSE; - bool foundAuthInt = FALSE; - char *token = NULL; - char *tmp = NULL; - - /* If we already have received a nonce, keep that in mind */ - if(digest->nonce) - before = TRUE; - - /* Clean up any former leftovers and initialise to defaults */ - Curl_auth_digest_cleanup(digest); - - for(;;) { - char value[DIGEST_MAX_VALUE_LENGTH]; - char content[DIGEST_MAX_CONTENT_LENGTH]; - - /* Pass all additional spaces here */ - while(*chlg && ISSPACE(*chlg)) - chlg++; - - /* Extract a value=content pair */ - if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) { - if(strcasecompare(value, "nonce")) { - free(digest->nonce); - digest->nonce = strdup(content); - if(!digest->nonce) - return CURLE_OUT_OF_MEMORY; - } - else if(strcasecompare(value, "stale")) { - if(strcasecompare(content, "true")) { - digest->stale = TRUE; - digest->nc = 1; /* we make a new nonce now */ - } - } - else if(strcasecompare(value, "realm")) { - free(digest->realm); - digest->realm = strdup(content); - if(!digest->realm) - return CURLE_OUT_OF_MEMORY; - } - else if(strcasecompare(value, "opaque")) { - free(digest->opaque); - digest->opaque = strdup(content); - if(!digest->opaque) - return CURLE_OUT_OF_MEMORY; - } - else if(strcasecompare(value, "qop")) { - char *tok_buf; - /* Tokenize the list and choose auth if possible, use a temporary - clone of the buffer since strtok_r() ruins it */ - tmp = strdup(content); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - token = strtok_r(tmp, ",", &tok_buf); - while(token != NULL) { - if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH)) { - foundAuth = TRUE; - } - else if(strcasecompare(token, DIGEST_QOP_VALUE_STRING_AUTH_INT)) { - foundAuthInt = TRUE; - } - token = strtok_r(NULL, ",", &tok_buf); - } - - free(tmp); - - /* Select only auth or auth-int. Otherwise, ignore */ - if(foundAuth) { - free(digest->qop); - digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH); - if(!digest->qop) - return CURLE_OUT_OF_MEMORY; - } - else if(foundAuthInt) { - free(digest->qop); - digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH_INT); - if(!digest->qop) - return CURLE_OUT_OF_MEMORY; - } - } - else if(strcasecompare(value, "algorithm")) { - free(digest->algorithm); - digest->algorithm = strdup(content); - if(!digest->algorithm) - return CURLE_OUT_OF_MEMORY; - - if(strcasecompare(content, "MD5-sess")) - digest->algo = CURLDIGESTALGO_MD5SESS; - else if(strcasecompare(content, "MD5")) - digest->algo = CURLDIGESTALGO_MD5; - else - return CURLE_BAD_CONTENT_ENCODING; - } - else { - /* Unknown specifier, ignore it! */ - } - } - else - break; /* We're done here */ - - /* Pass all additional spaces here */ - while(*chlg && ISSPACE(*chlg)) - chlg++; - - /* Allow the list to be comma-separated */ - if(',' == *chlg) - chlg++; - } - - /* We had a nonce since before, and we got another one now without - 'stale=true'. This means we provided bad credentials in the previous - request */ - if(before && !digest->stale) - return CURLE_BAD_CONTENT_ENCODING; - - /* We got this header without a nonce, that's a bad Digest line! */ - if(!digest->nonce) - return CURLE_BAD_CONTENT_ENCODING; - - return CURLE_OK; -} - -/* - * Curl_auth_create_digest_http_message() - * - * This is used to generate a HTTP DIGEST response message ready for sending - * to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name. - * passdwp [in] - The user's password. - * request [in] - The HTTP request. - * uripath [in] - The path of the HTTP uri. - * digest [in/out] - The digest data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uripath, - struct digestdata *digest, - char **outptr, size_t *outlen) -{ - CURLcode result; - unsigned char md5buf[16]; /* 16 bytes/128 bits */ - unsigned char request_digest[33]; - unsigned char *md5this; - unsigned char ha1[33]; /* 32 digits and 1 zero byte */ - unsigned char ha2[33]; /* 32 digits and 1 zero byte */ - char cnoncebuf[33]; - char *cnonce = NULL; - size_t cnonce_sz = 0; - char *userp_quoted; - char *response = NULL; - char *tmp = NULL; - - if(!digest->nc) - digest->nc = 1; - - if(!digest->cnonce) { - unsigned int rnd[4]; - result = Curl_rand(data, &rnd[0], 4); - if(result) - return result; - snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", - rnd[0], rnd[1], rnd[2], rnd[3]); - - result = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), - &cnonce, &cnonce_sz); - if(result) - return result; - - digest->cnonce = cnonce; - } - - /* - If the algorithm is "MD5" or unspecified (which then defaults to MD5): - - A1 = unq(username-value) ":" unq(realm-value) ":" passwd - - If the algorithm is "MD5-sess" then: - - A1 = H(unq(username-value) ":" unq(realm-value) ":" passwd) ":" - unq(nonce-value) ":" unq(cnonce-value) - */ - - md5this = (unsigned char *) - aprintf("%s:%s:%s", userp, digest->realm, passwdp); - if(!md5this) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - free(md5this); - auth_digest_md5_to_ascii(md5buf, ha1); - - if(digest->algo == CURLDIGESTALGO_MD5SESS) { - /* nonce and cnonce are OUTSIDE the hash */ - tmp = aprintf("%s:%s:%s", ha1, digest->nonce, digest->cnonce); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, tmp); /* Convert on non-ASCII machines */ - Curl_md5it(md5buf, (unsigned char *) tmp); - free(tmp); - auth_digest_md5_to_ascii(md5buf, ha1); - } - - /* - If the "qop" directive's value is "auth" or is unspecified, then A2 is: - - A2 = Method ":" digest-uri-value - - If the "qop" value is "auth-int", then A2 is: - - A2 = Method ":" digest-uri-value ":" H(entity-body) - - (The "Method" value is the HTTP request method as specified in section - 5.1.1 of RFC 2616) - */ - - md5this = (unsigned char *) aprintf("%s:%s", request, uripath); - - if(digest->qop && strcasecompare(digest->qop, "auth-int")) { - /* We don't support auth-int for PUT or POST at the moment. - TODO: replace md5 of empty string with entity-body for PUT/POST */ - unsigned char *md5this2 = (unsigned char *) - aprintf("%s:%s", md5this, "d41d8cd98f00b204e9800998ecf8427e"); - free(md5this); - md5this = md5this2; - } - - if(!md5this) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - free(md5this); - auth_digest_md5_to_ascii(md5buf, ha2); - - if(digest->qop) { - md5this = (unsigned char *) aprintf("%s:%s:%08x:%s:%s:%s", - ha1, - digest->nonce, - digest->nc, - digest->cnonce, - digest->qop, - ha2); - } - else { - md5this = (unsigned char *) aprintf("%s:%s:%s", - ha1, - digest->nonce, - ha2); - } - - if(!md5this) - return CURLE_OUT_OF_MEMORY; - - CURL_OUTPUT_DIGEST_CONV(data, md5this); /* convert on non-ASCII machines */ - Curl_md5it(md5buf, md5this); - free(md5this); - auth_digest_md5_to_ascii(md5buf, request_digest); - - /* For test case 64 (snooped from a Mozilla 1.3a request) - - Authorization: Digest username="testuser", realm="testrealm", \ - nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca" - - Digest parameters are all quoted strings. Username which is provided by - the user will need double quotes and backslashes within it escaped. For - the other fields, this shouldn't be an issue. realm, nonce, and opaque - are copied as is from the server, escapes and all. cnonce is generated - with web-safe characters. uri is already percent encoded. nc is 8 hex - characters. algorithm and qop with standard values only contain web-safe - characters. - */ - userp_quoted = auth_digest_string_quoted(userp); - if(!userp_quoted) - return CURLE_OUT_OF_MEMORY; - - if(digest->qop) { - response = aprintf("username=\"%s\", " - "realm=\"%s\", " - "nonce=\"%s\", " - "uri=\"%s\", " - "cnonce=\"%s\", " - "nc=%08x, " - "qop=%s, " - "response=\"%s\"", - userp_quoted, - digest->realm, - digest->nonce, - uripath, - digest->cnonce, - digest->nc, - digest->qop, - request_digest); - - if(strcasecompare(digest->qop, "auth")) - digest->nc++; /* The nc (from RFC) has to be a 8 hex digit number 0 - padded which tells to the server how many times you are - using the same nonce in the qop=auth mode */ - } - else { - response = aprintf("username=\"%s\", " - "realm=\"%s\", " - "nonce=\"%s\", " - "uri=\"%s\", " - "response=\"%s\"", - userp_quoted, - digest->realm, - digest->nonce, - uripath, - request_digest); - } - free(userp_quoted); - if(!response) - return CURLE_OUT_OF_MEMORY; - - /* Add the optional fields */ - if(digest->opaque) { - /* Append the opaque */ - tmp = aprintf("%s, opaque=\"%s\"", response, digest->opaque); - free(response); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - response = tmp; - } - - if(digest->algorithm) { - /* Append the algorithm */ - tmp = aprintf("%s, algorithm=\"%s\"", response, digest->algorithm); - free(response); - if(!tmp) - return CURLE_OUT_OF_MEMORY; - - response = tmp; - } - - /* Return the output */ - *outptr = response; - *outlen = strlen(response); - - return CURLE_OK; -} - -/* - * Curl_auth_digest_cleanup() - * - * This is used to clean up the digest specific data. - * - * Parameters: - * - * digest [in/out] - The digest data struct being cleaned up. - * - */ -void Curl_auth_digest_cleanup(struct digestdata *digest) -{ - Curl_safefree(digest->nonce); - Curl_safefree(digest->cnonce); - Curl_safefree(digest->realm); - Curl_safefree(digest->opaque); - Curl_safefree(digest->qop); - Curl_safefree(digest->algorithm); - - digest->nc = 0; - digest->algo = CURLDIGESTALGO_MD5; /* default algorithm */ - digest->stale = FALSE; /* default means normal, not stale */ -} -#endif /* !USE_WINDOWS_SSPI */ - -#endif /* CURL_DISABLE_CRYPTO_AUTH */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/digest.h b/build/premake/premake5/contrib/curl/lib/vauth/digest.h deleted file mode 100644 index 5722dceced..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/digest.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef HEADER_CURL_DIGEST_H -#define HEADER_CURL_DIGEST_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) - -#define DIGEST_MAX_VALUE_LENGTH 256 -#define DIGEST_MAX_CONTENT_LENGTH 1024 - -enum { - CURLDIGESTALGO_MD5, - CURLDIGESTALGO_MD5SESS -}; - -/* This is used to extract the realm from a challenge message */ -bool Curl_auth_digest_get_pair(const char *str, char *value, char *content, - const char **endptr); - -#endif - -#endif /* HEADER_CURL_DIGEST_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/digest_sspi.c b/build/premake/premake5/contrib/curl/lib/vauth/digest_sspi.c deleted file mode 100644 index 15f3d8c14b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/digest_sspi.c +++ /dev/null @@ -1,628 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014 - 2016, Steve Holme, . - * Copyright (C) 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC2831 DIGEST-MD5 authentication - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_CRYPTO_AUTH) - -#include - -#include "vauth/vauth.h" -#include "vauth/digest.h" -#include "urldata.h" -#include "curl_base64.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" -#include "strdup.h" -#include "strcase.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* -* Curl_auth_is_digest_supported() -* -* This is used to evaluate if DIGEST is supported. -* -* Parameters: None -* -* Returns TRUE if DIGEST is supported by Windows SSPI. -*/ -bool Curl_auth_is_digest_supported(void) -{ - PSecPkgInfo SecurityPackage; - SECURITY_STATUS status; - - /* Query the security package for Digest */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST), - &SecurityPackage); - - return (status == SEC_E_OK ? TRUE : FALSE); -} - -/* - * Curl_auth_create_digest_md5_message() - * - * This is used to generate an already encoded DIGEST-MD5 response message - * ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg64 [in] - The base64 encoded challenge message. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * service [in] - The service type such as http, smtp, pop or imap. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, - const char *chlg64, - const char *userp, - const char *passwdp, - const char *service, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - TCHAR *spn = NULL; - size_t chlglen = 0; - size_t token_max = 0; - unsigned char *input_token = NULL; - unsigned char *output_token = NULL; - CredHandle credentials; - CtxtHandle context; - PSecPkgInfo SecurityPackage; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - SecBuffer chlg_buf; - SecBuffer resp_buf; - SecBufferDesc chlg_desc; - SecBufferDesc resp_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - /* Decode the base-64 encoded challenge message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &input_token, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!input_token) { - infof(data, "DIGEST-MD5 handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Query the security package for DigestSSP */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST), - &SecurityPackage); - if(status != SEC_E_OK) { - free(input_token); - - return CURLE_NOT_BUILT_IN; - } - - token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our response buffer */ - output_token = malloc(token_max); - if(!output_token) { - free(input_token); - - return CURLE_OUT_OF_MEMORY; - } - - /* Generate our SPN */ - spn = Curl_auth_build_spn(service, data->easy_conn->host.name, NULL); - if(!spn) { - free(output_token); - free(input_token); - - return CURLE_OUT_OF_MEMORY; - } - - if(userp && *userp) { - /* Populate our identity structure */ - result = Curl_create_sspi_identity(userp, passwdp, &identity); - if(result) { - free(spn); - free(output_token); - free(input_token); - - return result; - } - - /* Allow proper cleanup of the identity structure */ - p_identity = &identity; - } - else - /* Use the current Windows user */ - p_identity = NULL; - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_DIGEST), - SECPKG_CRED_OUTBOUND, NULL, - p_identity, NULL, NULL, - &credentials, &expiry); - - if(status != SEC_E_OK) { - Curl_sspi_free_identity(p_identity); - free(spn); - free(output_token); - free(input_token); - - return CURLE_LOGIN_DENIED; - } - - /* Setup the challenge "input" security buffer */ - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 1; - chlg_desc.pBuffers = &chlg_buf; - chlg_buf.BufferType = SECBUFFER_TOKEN; - chlg_buf.pvBuffer = input_token; - chlg_buf.cbBuffer = curlx_uztoul(chlglen); - - /* Setup the response "output" security buffer */ - resp_desc.ulVersion = SECBUFFER_VERSION; - resp_desc.cBuffers = 1; - resp_desc.pBuffers = &resp_buf; - resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = output_token; - resp_buf.cbBuffer = curlx_uztoul(token_max); - - /* Generate our response message */ - status = s_pSecFn->InitializeSecurityContext(&credentials, NULL, spn, - 0, 0, 0, &chlg_desc, 0, - &context, &resp_desc, &attrs, - &expiry); - - if(status == SEC_I_COMPLETE_NEEDED || - status == SEC_I_COMPLETE_AND_CONTINUE) - s_pSecFn->CompleteAuthToken(&credentials, &resp_desc); - else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { - s_pSecFn->FreeCredentialsHandle(&credentials); - Curl_sspi_free_identity(p_identity); - free(spn); - free(output_token); - free(input_token); - - return CURLE_RECV_ERROR; - } - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) output_token, resp_buf.cbBuffer, - outptr, outlen); - - /* Free our handles */ - s_pSecFn->DeleteSecurityContext(&context); - s_pSecFn->FreeCredentialsHandle(&credentials); - - /* Free the identity structure */ - Curl_sspi_free_identity(p_identity); - - /* Free the SPN */ - free(spn); - - /* Free the response buffer */ - free(output_token); - - /* Free the decoded challenge message */ - free(input_token); - - return result; -} - -/* - * Curl_override_sspi_http_realm() - * - * This is used to populate the domain in a SSPI identity structure - * The realm is extracted from the challenge message and used as the - * domain if it is not already explicitly set. - * - * Parameters: - * - * chlg [in] - The challenge message. - * identity [in/out] - The identity structure. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_override_sspi_http_realm(const char *chlg, - SEC_WINNT_AUTH_IDENTITY *identity) -{ - xcharp_u domain, dup_domain; - - /* If domain is blank or unset, check challenge message for realm */ - if(!identity->Domain || !identity->DomainLength) { - for(;;) { - char value[DIGEST_MAX_VALUE_LENGTH]; - char content[DIGEST_MAX_CONTENT_LENGTH]; - - /* Pass all additional spaces here */ - while(*chlg && ISSPACE(*chlg)) - chlg++; - - /* Extract a value=content pair */ - if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) { - if(strcasecompare(value, "realm")) { - - /* Setup identity's domain and length */ - domain.tchar_ptr = Curl_convert_UTF8_to_tchar((char *) content); - if(!domain.tchar_ptr) - return CURLE_OUT_OF_MEMORY; - - dup_domain.tchar_ptr = _tcsdup(domain.tchar_ptr); - if(!dup_domain.tchar_ptr) { - Curl_unicodefree(domain.tchar_ptr); - return CURLE_OUT_OF_MEMORY; - } - - free(identity->Domain); - identity->Domain = dup_domain.tbyte_ptr; - identity->DomainLength = curlx_uztoul(_tcslen(dup_domain.tchar_ptr)); - dup_domain.tchar_ptr = NULL; - - Curl_unicodefree(domain.tchar_ptr); - } - else { - /* Unknown specifier, ignore it! */ - } - } - else - break; /* We're done here */ - - /* Pass all additional spaces here */ - while(*chlg && ISSPACE(*chlg)) - chlg++; - - /* Allow the list to be comma-separated */ - if(',' == *chlg) - chlg++; - } - } - - return CURLE_OK; -} - -/* - * Curl_auth_decode_digest_http_message() - * - * This is used to decode a HTTP DIGEST challenge message into the seperate - * attributes. - * - * Parameters: - * - * chlg [in] - The challenge message. - * digest [in/out] - The digest data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_digest_http_message(const char *chlg, - struct digestdata *digest) -{ - size_t chlglen = strlen(chlg); - - /* We had an input token before so if there's another one now that means we - provided bad credentials in the previous request or it's stale. */ - if(digest->input_token) { - bool stale = false; - const char *p = chlg; - - /* Check for the 'stale' directive */ - for(;;) { - char value[DIGEST_MAX_VALUE_LENGTH]; - char content[DIGEST_MAX_CONTENT_LENGTH]; - - while(*p && ISSPACE(*p)) - p++; - - if(!Curl_auth_digest_get_pair(p, value, content, &p)) - break; - - if(Curl_strcasecompare(value, "stale") - && Curl_strcasecompare(content, "true")) { - stale = true; - break; - } - - while(*p && ISSPACE(*p)) - p++; - - if(',' == *p) - p++; - } - - if(stale) - Curl_auth_digest_cleanup(digest); - else - return CURLE_LOGIN_DENIED; - } - - /* Store the challenge for use later */ - digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen + 1); - if(!digest->input_token) - return CURLE_OUT_OF_MEMORY; - - digest->input_token_len = chlglen; - - return CURLE_OK; -} - -/* - * Curl_auth_create_digest_http_message() - * - * This is used to generate a HTTP DIGEST response message ready for sending - * to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * request [in] - The HTTP request. - * uripath [in] - The path of the HTTP uri. - * digest [in/out] - The digest data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uripath, - struct digestdata *digest, - char **outptr, size_t *outlen) -{ - size_t token_max; - char *resp; - BYTE *output_token; - size_t output_token_len; - PSecPkgInfo SecurityPackage; - SecBuffer chlg_buf[5]; - SecBufferDesc chlg_desc; - SECURITY_STATUS status; - - (void) data; - - /* Query the security package for DigestSSP */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST), - &SecurityPackage); - if(status != SEC_E_OK) - return CURLE_NOT_BUILT_IN; - - token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate the output buffer according to the max token size as indicated - by the security package */ - output_token = malloc(token_max); - if(!output_token) { - return CURLE_OUT_OF_MEMORY; - } - - if(digest->http_context) { - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 5; - chlg_desc.pBuffers = chlg_buf; - chlg_buf[0].BufferType = SECBUFFER_TOKEN; - chlg_buf[0].pvBuffer = NULL; - chlg_buf[0].cbBuffer = 0; - chlg_buf[1].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[1].pvBuffer = (void *) request; - chlg_buf[1].cbBuffer = curlx_uztoul(strlen((const char *) request)); - chlg_buf[2].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[2].pvBuffer = (void *) uripath; - chlg_buf[2].cbBuffer = curlx_uztoul(strlen((const char *) uripath)); - chlg_buf[3].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[3].pvBuffer = NULL; - chlg_buf[3].cbBuffer = 0; - chlg_buf[4].BufferType = SECBUFFER_PADDING; - chlg_buf[4].pvBuffer = output_token; - chlg_buf[4].cbBuffer = curlx_uztoul(token_max); - - status = s_pSecFn->MakeSignature(digest->http_context, 0, &chlg_desc, 0); - if(status == SEC_E_OK) - output_token_len = chlg_buf[4].cbBuffer; - else { /* delete the context so a new one can be made */ - infof(data, "digest_sspi: MakeSignature failed, error 0x%08lx\n", - (long)status); - s_pSecFn->DeleteSecurityContext(digest->http_context); - Curl_safefree(digest->http_context); - } - } - - if(!digest->http_context) { - CredHandle credentials; - SEC_WINNT_AUTH_IDENTITY identity; - SEC_WINNT_AUTH_IDENTITY *p_identity; - SecBuffer resp_buf; - SecBufferDesc resp_desc; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - TCHAR *spn; - - if(userp && *userp) { - /* Populate our identity structure */ - if(Curl_create_sspi_identity(userp, passwdp, &identity)) { - free(output_token); - return CURLE_OUT_OF_MEMORY; - } - - /* Populate our identity domain */ - if(Curl_override_sspi_http_realm((const char *) digest->input_token, - &identity)) { - free(output_token); - return CURLE_OUT_OF_MEMORY; - } - - /* Allow proper cleanup of the identity structure */ - p_identity = &identity; - } - else - /* Use the current Windows user */ - p_identity = NULL; - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_DIGEST), - SECPKG_CRED_OUTBOUND, NULL, - p_identity, NULL, NULL, - &credentials, &expiry); - if(status != SEC_E_OK) { - Curl_sspi_free_identity(p_identity); - free(output_token); - - return CURLE_LOGIN_DENIED; - } - - /* Setup the challenge "input" security buffer if present */ - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 3; - chlg_desc.pBuffers = chlg_buf; - chlg_buf[0].BufferType = SECBUFFER_TOKEN; - chlg_buf[0].pvBuffer = digest->input_token; - chlg_buf[0].cbBuffer = curlx_uztoul(digest->input_token_len); - chlg_buf[1].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[1].pvBuffer = (void *) request; - chlg_buf[1].cbBuffer = curlx_uztoul(strlen((const char *) request)); - chlg_buf[2].BufferType = SECBUFFER_PKG_PARAMS; - chlg_buf[2].pvBuffer = NULL; - chlg_buf[2].cbBuffer = 0; - - /* Setup the response "output" security buffer */ - resp_desc.ulVersion = SECBUFFER_VERSION; - resp_desc.cBuffers = 1; - resp_desc.pBuffers = &resp_buf; - resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = output_token; - resp_buf.cbBuffer = curlx_uztoul(token_max); - - spn = Curl_convert_UTF8_to_tchar((char *) uripath); - if(!spn) { - s_pSecFn->FreeCredentialsHandle(&credentials); - - Curl_sspi_free_identity(p_identity); - free(output_token); - - return CURLE_OUT_OF_MEMORY; - } - - /* Allocate our new context handle */ - digest->http_context = calloc(1, sizeof(CtxtHandle)); - if(!digest->http_context) - return CURLE_OUT_OF_MEMORY; - - /* Generate our reponse message */ - status = s_pSecFn->InitializeSecurityContext(&credentials, NULL, - spn, - ISC_REQ_USE_HTTP_STYLE, 0, 0, - &chlg_desc, 0, - digest->http_context, - &resp_desc, &attrs, &expiry); - Curl_unicodefree(spn); - - if(status == SEC_I_COMPLETE_NEEDED || - status == SEC_I_COMPLETE_AND_CONTINUE) - s_pSecFn->CompleteAuthToken(&credentials, &resp_desc); - else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { - s_pSecFn->FreeCredentialsHandle(&credentials); - - Curl_sspi_free_identity(p_identity); - free(output_token); - - Curl_safefree(digest->http_context); - - return CURLE_OUT_OF_MEMORY; - } - - output_token_len = resp_buf.cbBuffer; - - s_pSecFn->FreeCredentialsHandle(&credentials); - Curl_sspi_free_identity(p_identity); - } - - resp = malloc(output_token_len + 1); - if(!resp) { - free(output_token); - - return CURLE_OUT_OF_MEMORY; - } - - /* Copy the generated reponse */ - memcpy(resp, output_token, output_token_len); - resp[output_token_len] = 0; - - /* Return the response */ - *outptr = resp; - *outlen = output_token_len; - - /* Free the response buffer */ - free(output_token); - - return CURLE_OK; -} - -/* - * Curl_auth_digest_cleanup() - * - * This is used to clean up the digest specific data. - * - * Parameters: - * - * digest [in/out] - The digest data struct being cleaned up. - * - */ -void Curl_auth_digest_cleanup(struct digestdata *digest) -{ - /* Free the input token */ - Curl_safefree(digest->input_token); - - /* Reset any variables */ - digest->input_token_len = 0; - - /* Delete security context */ - if(digest->http_context) { - s_pSecFn->DeleteSecurityContext(digest->http_context); - Curl_safefree(digest->http_context); - } -} - -#endif /* USE_WINDOWS_SSPI && !CURL_DISABLE_CRYPTO_AUTH */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/krb5_gssapi.c b/build/premake/premake5/contrib/curl/lib/vauth/krb5_gssapi.c deleted file mode 100644 index c754fae452..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/krb5_gssapi.c +++ /dev/null @@ -1,401 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014 - 2016, Steve Holme, . - * Copyright (C) 2015, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(HAVE_GSSAPI) && defined(USE_KERBEROS5) - -#include - -#include "vauth/vauth.h" -#include "curl_sasl.h" -#include "urldata.h" -#include "curl_base64.h" -#include "curl_gssapi.h" -#include "sendf.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_is_gssapi_supported() - * - * This is used to evaluate if GSSAPI (Kerberos V5) is supported. - * - * Parameters: None - * - * Returns TRUE if Kerberos V5 is supported by the GSS-API library. - */ -bool Curl_auth_is_gssapi_supported(void) -{ - return TRUE; -} - -/* - * Curl_auth_create_gssapi_user_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) user token - * message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name. - * passdwp [in] - The user's password. - * service [in] - The service type such as http, smtp, pop or imap. - * host [in[ - The host name. - * mutual_auth [in] - Flag specifing whether or not mutual authentication - * is enabled. - * chlg64 [in] - Pointer to the optional base64 encoded challenge - * message. - * krb5 [in/out] - The Kerberos 5 data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const char *service, - const char *host, - const bool mutual_auth, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - unsigned char *chlg = NULL; - OM_uint32 major_status; - OM_uint32 minor_status; - OM_uint32 unused_status; - gss_buffer_desc spn_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - - (void) userp; - (void) passwdp; - - if(!krb5->spn) { - /* Generate our SPN */ - char *spn = Curl_auth_build_spn(service, NULL, host); - if(!spn) - return CURLE_OUT_OF_MEMORY; - - /* Populate the SPN structure */ - spn_token.value = spn; - spn_token.length = strlen(spn); - - /* Import the SPN */ - major_status = gss_import_name(&minor_status, &spn_token, - GSS_C_NT_HOSTBASED_SERVICE, &krb5->spn); - if(GSS_ERROR(major_status)) { - Curl_gss_log_error(data, "gss_import_name() failed: ", - major_status, minor_status); - - free(spn); - - return CURLE_OUT_OF_MEMORY; - } - - free(spn); - } - - if(chlg64 && *chlg64) { - /* Decode the base-64 encoded challenge message */ - if(*chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Setup the challenge "input" security buffer */ - input_token.value = chlg; - input_token.length = chlglen; - } - - major_status = Curl_gss_init_sec_context(data, - &minor_status, - &krb5->context, - krb5->spn, - &Curl_krb5_mech_oid, - GSS_C_NO_CHANNEL_BINDINGS, - &input_token, - &output_token, - mutual_auth, - NULL); - - /* Free the decoded challenge as it is not required anymore */ - free(input_token.value); - - if(GSS_ERROR(major_status)) { - if(output_token.value) - gss_release_buffer(&unused_status, &output_token); - - Curl_gss_log_error(data, "gss_init_sec_context() failed: ", - major_status, minor_status); - - return CURLE_RECV_ERROR; - } - - if(output_token.value && output_token.length) { - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) output_token.value, - output_token.length, outptr, outlen); - - gss_release_buffer(&unused_status, &output_token); - } - else if(mutual_auth) { - *outptr = strdup(""); - if(!*outptr) - result = CURLE_OUT_OF_MEMORY; - } - - return result; -} - -/* - * Curl_auth_create_gssapi_security_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) security - * token message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg64 [in] - Pointer to the optional base64 encoded challenge message. - * krb5 [in/out] - The Kerberos 5 data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, - size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - size_t messagelen = 0; - unsigned char *chlg = NULL; - unsigned char *message = NULL; - OM_uint32 major_status; - OM_uint32 minor_status; - OM_uint32 unused_status; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - unsigned int indata = 0; - unsigned int outdata = 0; - gss_qop_t qop = GSS_C_QOP_DEFAULT; - unsigned int sec_layer = 0; - unsigned int max_size = 0; - gss_name_t username = GSS_C_NO_NAME; - gss_buffer_desc username_token; - - /* Decode the base-64 encoded input message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty security message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Get the fully qualified username back from the context */ - major_status = gss_inquire_context(&minor_status, krb5->context, - &username, NULL, NULL, NULL, NULL, - NULL, NULL); - if(GSS_ERROR(major_status)) { - Curl_gss_log_error(data, "gss_inquire_context() failed: ", - major_status, minor_status); - - free(chlg); - - return CURLE_OUT_OF_MEMORY; - } - - /* Convert the username from internal format to a displayable token */ - major_status = gss_display_name(&minor_status, username, - &username_token, NULL); - if(GSS_ERROR(major_status)) { - Curl_gss_log_error(data, "gss_display_name() failed: ", - major_status, minor_status); - - free(chlg); - - return CURLE_OUT_OF_MEMORY; - } - - /* Setup the challenge "input" security buffer */ - input_token.value = chlg; - input_token.length = chlglen; - - /* Decrypt the inbound challenge and obtain the qop */ - major_status = gss_unwrap(&minor_status, krb5->context, &input_token, - &output_token, NULL, &qop); - if(GSS_ERROR(major_status)) { - Curl_gss_log_error(data, "gss_unwrap() failed: ", - major_status, minor_status); - - gss_release_buffer(&unused_status, &username_token); - free(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Not 4 octets long so fail as per RFC4752 Section 3.1 */ - if(output_token.length != 4) { - infof(data, "GSSAPI handshake failure (invalid security data)\n"); - - gss_release_buffer(&unused_status, &username_token); - free(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Copy the data out and free the challenge as it is not required anymore */ - memcpy(&indata, output_token.value, 4); - gss_release_buffer(&unused_status, &output_token); - free(chlg); - - /* Extract the security layer */ - sec_layer = indata & 0x000000FF; - if(!(sec_layer & GSSAUTH_P_NONE)) { - infof(data, "GSSAPI handshake failure (invalid security layer)\n"); - - gss_release_buffer(&unused_status, &username_token); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Extract the maximum message size the server can receive */ - max_size = ntohl(indata & 0xFFFFFF00); - if(max_size > 0) { - /* The server has told us it supports a maximum receive buffer, however, as - we don't require one unless we are encrypting data, we tell the server - our receive buffer is zero. */ - max_size = 0; - } - - /* Allocate our message */ - messagelen = sizeof(outdata) + username_token.length + 1; - message = malloc(messagelen); - if(!message) { - gss_release_buffer(&unused_status, &username_token); - - return CURLE_OUT_OF_MEMORY; - } - - /* Populate the message with the security layer, client supported receive - message size and authorization identity including the 0x00 based - terminator. Note: Despite RFC4752 Section 3.1 stating "The authorization - identity is not terminated with the zero-valued (%x00) octet." it seems - necessary to include it. */ - outdata = htonl(max_size) | sec_layer; - memcpy(message, &outdata, sizeof(outdata)); - memcpy(message + sizeof(outdata), username_token.value, - username_token.length); - message[messagelen - 1] = '\0'; - - /* Free the username token as it is not required anymore */ - gss_release_buffer(&unused_status, &username_token); - - /* Setup the "authentication data" security buffer */ - input_token.value = message; - input_token.length = messagelen; - - /* Encrypt the data */ - major_status = gss_wrap(&minor_status, krb5->context, 0, - GSS_C_QOP_DEFAULT, &input_token, NULL, - &output_token); - if(GSS_ERROR(major_status)) { - Curl_gss_log_error(data, "gss_wrap() failed: ", - major_status, minor_status); - - free(message); - - return CURLE_OUT_OF_MEMORY; - } - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) output_token.value, - output_token.length, outptr, outlen); - - /* Free the output buffer */ - gss_release_buffer(&unused_status, &output_token); - - /* Free the message buffer */ - free(message); - - return result; -} - -/* - * Curl_auth_gssapi_cleanup() - * - * This is used to clean up the GSSAPI (Kerberos V5) specific data. - * - * Parameters: - * - * krb5 [in/out] - The Kerberos 5 data struct being cleaned up. - * - */ -void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5) -{ - OM_uint32 minor_status; - - /* Free our security context */ - if(krb5->context != GSS_C_NO_CONTEXT) { - gss_delete_sec_context(&minor_status, &krb5->context, GSS_C_NO_BUFFER); - krb5->context = GSS_C_NO_CONTEXT; - } - - /* Free the SPN */ - if(krb5->spn != GSS_C_NO_NAME) { - gss_release_name(&minor_status, &krb5->spn); - krb5->spn = GSS_C_NO_NAME; - } -} - -#endif /* HAVE_GSSAPI && USE_KERBEROS5 */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/krb5_sspi.c b/build/premake/premake5/contrib/curl/lib/vauth/krb5_sspi.c deleted file mode 100644 index 151794e619..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/krb5_sspi.c +++ /dev/null @@ -1,518 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014 - 2016, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_WINDOWS_SSPI) && defined(USE_KERBEROS5) - -#include - -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_base64.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_is_gssapi_supported() - * - * This is used to evaluate if GSSAPI (Kerberos V5) is supported. - * - * Parameters: None - * - * Returns TRUE if Kerberos V5 is supported by Windows SSPI. - */ -bool Curl_auth_is_gssapi_supported(void) -{ - PSecPkgInfo SecurityPackage; - SECURITY_STATUS status; - - /* Query the security package for Kerberos */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) - TEXT(SP_NAME_KERBEROS), - &SecurityPackage); - - return (status == SEC_E_OK ? TRUE : FALSE); -} - -/* - * Curl_auth_create_gssapi_user_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) user token - * message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * service [in] - The service type such as http, smtp, pop or imap. - * host [in] - The host name. - * mutual_auth [in] - Flag specifing whether or not mutual authentication - * is enabled. - * chlg64 [in] - The optional base64 encoded challenge message. - * krb5 [in/out] - The Kerberos 5 data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const char *service, - const char *host, - const bool mutual_auth, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - unsigned char *chlg = NULL; - CtxtHandle context; - PSecPkgInfo SecurityPackage; - SecBuffer chlg_buf; - SecBuffer resp_buf; - SecBufferDesc chlg_desc; - SecBufferDesc resp_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - if(!krb5->spn) { - /* Generate our SPN */ - krb5->spn = Curl_auth_build_spn(service, host, NULL); - if(!krb5->spn) - return CURLE_OUT_OF_MEMORY; - } - - if(!krb5->output_token) { - /* Query the security package for Kerberos */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) - TEXT(SP_NAME_KERBEROS), - &SecurityPackage); - if(status != SEC_E_OK) { - return CURLE_NOT_BUILT_IN; - } - - krb5->token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our response buffer */ - krb5->output_token = malloc(krb5->token_max); - if(!krb5->output_token) - return CURLE_OUT_OF_MEMORY; - } - - if(!krb5->credentials) { - /* Do we have credientials to use or are we using single sign-on? */ - if(userp && *userp) { - /* Populate our identity structure */ - result = Curl_create_sspi_identity(userp, passwdp, &krb5->identity); - if(result) - return result; - - /* Allow proper cleanup of the identity structure */ - krb5->p_identity = &krb5->identity; - } - else - /* Use the current Windows user */ - krb5->p_identity = NULL; - - /* Allocate our credentials handle */ - krb5->credentials = malloc(sizeof(CredHandle)); - if(!krb5->credentials) - return CURLE_OUT_OF_MEMORY; - - memset(krb5->credentials, 0, sizeof(CredHandle)); - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) - TEXT(SP_NAME_KERBEROS), - SECPKG_CRED_OUTBOUND, NULL, - krb5->p_identity, NULL, NULL, - krb5->credentials, &expiry); - if(status != SEC_E_OK) - return CURLE_LOGIN_DENIED; - - /* Allocate our new context handle */ - krb5->context = malloc(sizeof(CtxtHandle)); - if(!krb5->context) - return CURLE_OUT_OF_MEMORY; - - memset(krb5->context, 0, sizeof(CtxtHandle)); - } - - if(chlg64 && *chlg64) { - /* Decode the base-64 encoded challenge message */ - if(*chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Setup the challenge "input" security buffer */ - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 1; - chlg_desc.pBuffers = &chlg_buf; - chlg_buf.BufferType = SECBUFFER_TOKEN; - chlg_buf.pvBuffer = chlg; - chlg_buf.cbBuffer = curlx_uztoul(chlglen); - } - - /* Setup the response "output" security buffer */ - resp_desc.ulVersion = SECBUFFER_VERSION; - resp_desc.cBuffers = 1; - resp_desc.pBuffers = &resp_buf; - resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = krb5->output_token; - resp_buf.cbBuffer = curlx_uztoul(krb5->token_max); - - /* Generate our challenge-response message */ - status = s_pSecFn->InitializeSecurityContext(krb5->credentials, - chlg ? krb5->context : NULL, - krb5->spn, - (mutual_auth ? - ISC_REQ_MUTUAL_AUTH : 0), - 0, SECURITY_NATIVE_DREP, - chlg ? &chlg_desc : NULL, 0, - &context, - &resp_desc, &attrs, - &expiry); - - /* Free the decoded challenge as it is not required anymore */ - free(chlg); - - if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) { - return CURLE_RECV_ERROR; - } - - if(memcmp(&context, krb5->context, sizeof(context))) { - s_pSecFn->DeleteSecurityContext(krb5->context); - - memcpy(krb5->context, &context, sizeof(context)); - } - - if(resp_buf.cbBuffer) { - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) resp_buf.pvBuffer, - resp_buf.cbBuffer, outptr, outlen); - } - else if(mutual_auth) { - *outptr = strdup(""); - if(!*outptr) - result = CURLE_OUT_OF_MEMORY; - } - - return result; -} - -/* - * Curl_auth_create_gssapi_security_message() - * - * This is used to generate an already encoded GSSAPI (Kerberos V5) security - * token message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * chlg64 [in] - The optional base64 encoded challenge message. - * krb5 [in/out] - The Kerberos 5 data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, - size_t *outlen) -{ - CURLcode result = CURLE_OK; - size_t offset = 0; - size_t chlglen = 0; - size_t messagelen = 0; - size_t appdatalen = 0; - unsigned char *chlg = NULL; - unsigned char *trailer = NULL; - unsigned char *message = NULL; - unsigned char *padding = NULL; - unsigned char *appdata = NULL; - SecBuffer input_buf[2]; - SecBuffer wrap_buf[3]; - SecBufferDesc input_desc; - SecBufferDesc wrap_desc; - unsigned long indata = 0; - unsigned long outdata = 0; - unsigned long qop = 0; - unsigned long sec_layer = 0; - unsigned long max_size = 0; - SecPkgContext_Sizes sizes; - SecPkgCredentials_Names names; - SECURITY_STATUS status; - char *user_name; - - /* Decode the base-64 encoded input message */ - if(strlen(chlg64) && *chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "GSSAPI handshake failure (empty security message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Get our response size information */ - status = s_pSecFn->QueryContextAttributes(krb5->context, - SECPKG_ATTR_SIZES, - &sizes); - if(status != SEC_E_OK) { - free(chlg); - - return CURLE_OUT_OF_MEMORY; - } - - /* Get the fully qualified username back from the context */ - status = s_pSecFn->QueryCredentialsAttributes(krb5->credentials, - SECPKG_CRED_ATTR_NAMES, - &names); - if(status != SEC_E_OK) { - free(chlg); - - return CURLE_RECV_ERROR; - } - - /* Setup the "input" security buffer */ - input_desc.ulVersion = SECBUFFER_VERSION; - input_desc.cBuffers = 2; - input_desc.pBuffers = input_buf; - input_buf[0].BufferType = SECBUFFER_STREAM; - input_buf[0].pvBuffer = chlg; - input_buf[0].cbBuffer = curlx_uztoul(chlglen); - input_buf[1].BufferType = SECBUFFER_DATA; - input_buf[1].pvBuffer = NULL; - input_buf[1].cbBuffer = 0; - - /* Decrypt the inbound challenge and obtain the qop */ - status = s_pSecFn->DecryptMessage(krb5->context, &input_desc, 0, &qop); - if(status != SEC_E_OK) { - infof(data, "GSSAPI handshake failure (empty security message)\n"); - - free(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Not 4 octets long so fail as per RFC4752 Section 3.1 */ - if(input_buf[1].cbBuffer != 4) { - infof(data, "GSSAPI handshake failure (invalid security data)\n"); - - free(chlg); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Copy the data out and free the challenge as it is not required anymore */ - memcpy(&indata, input_buf[1].pvBuffer, 4); - s_pSecFn->FreeContextBuffer(input_buf[1].pvBuffer); - free(chlg); - - /* Extract the security layer */ - sec_layer = indata & 0x000000FF; - if(!(sec_layer & KERB_WRAP_NO_ENCRYPT)) { - infof(data, "GSSAPI handshake failure (invalid security layer)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Extract the maximum message size the server can receive */ - max_size = ntohl(indata & 0xFFFFFF00); - if(max_size > 0) { - /* The server has told us it supports a maximum receive buffer, however, as - we don't require one unless we are encrypting data, we tell the server - our receive buffer is zero. */ - max_size = 0; - } - - /* Allocate the trailer */ - trailer = malloc(sizes.cbSecurityTrailer); - if(!trailer) - return CURLE_OUT_OF_MEMORY; - - /* Convert the user name to UTF8 when operating with Unicode */ - user_name = Curl_convert_tchar_to_UTF8(names.sUserName); - if(!user_name) { - free(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Allocate our message */ - messagelen = sizeof(outdata) + strlen(user_name) + 1; - message = malloc(messagelen); - if(!message) { - free(trailer); - Curl_unicodefree(user_name); - - return CURLE_OUT_OF_MEMORY; - } - - /* Populate the message with the security layer, client supported receive - message size and authorization identity including the 0x00 based - terminator. Note: Despite RFC4752 Section 3.1 stating "The authorization - identity is not terminated with the zero-valued (%x00) octet." it seems - necessary to include it. */ - outdata = htonl(max_size) | sec_layer; - memcpy(message, &outdata, sizeof(outdata)); - strcpy((char *) message + sizeof(outdata), user_name); - Curl_unicodefree(user_name); - - /* Allocate the padding */ - padding = malloc(sizes.cbBlockSize); - if(!padding) { - free(message); - free(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Setup the "authentication data" security buffer */ - wrap_desc.ulVersion = SECBUFFER_VERSION; - wrap_desc.cBuffers = 3; - wrap_desc.pBuffers = wrap_buf; - wrap_buf[0].BufferType = SECBUFFER_TOKEN; - wrap_buf[0].pvBuffer = trailer; - wrap_buf[0].cbBuffer = sizes.cbSecurityTrailer; - wrap_buf[1].BufferType = SECBUFFER_DATA; - wrap_buf[1].pvBuffer = message; - wrap_buf[1].cbBuffer = curlx_uztoul(messagelen); - wrap_buf[2].BufferType = SECBUFFER_PADDING; - wrap_buf[2].pvBuffer = padding; - wrap_buf[2].cbBuffer = sizes.cbBlockSize; - - /* Encrypt the data */ - status = s_pSecFn->EncryptMessage(krb5->context, KERB_WRAP_NO_ENCRYPT, - &wrap_desc, 0); - if(status != SEC_E_OK) { - free(padding); - free(message); - free(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Allocate the encryption (wrap) buffer */ - appdatalen = wrap_buf[0].cbBuffer + wrap_buf[1].cbBuffer + - wrap_buf[2].cbBuffer; - appdata = malloc(appdatalen); - if(!appdata) { - free(padding); - free(message); - free(trailer); - - return CURLE_OUT_OF_MEMORY; - } - - /* Populate the encryption buffer */ - memcpy(appdata, wrap_buf[0].pvBuffer, wrap_buf[0].cbBuffer); - offset += wrap_buf[0].cbBuffer; - memcpy(appdata + offset, wrap_buf[1].pvBuffer, wrap_buf[1].cbBuffer); - offset += wrap_buf[1].cbBuffer; - memcpy(appdata + offset, wrap_buf[2].pvBuffer, wrap_buf[2].cbBuffer); - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) appdata, appdatalen, outptr, - outlen); - - /* Free all of our local buffers */ - free(appdata); - free(padding); - free(message); - free(trailer); - - return result; -} - -/* - * Curl_auth_gssapi_cleanup() - * - * This is used to clean up the GSSAPI (Kerberos V5) specific data. - * - * Parameters: - * - * krb5 [in/out] - The Kerberos 5 data struct being cleaned up. - * - */ -void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5) -{ - /* Free our security context */ - if(krb5->context) { - s_pSecFn->DeleteSecurityContext(krb5->context); - free(krb5->context); - krb5->context = NULL; - } - - /* Free our credentials handle */ - if(krb5->credentials) { - s_pSecFn->FreeCredentialsHandle(krb5->credentials); - free(krb5->credentials); - krb5->credentials = NULL; - } - - /* Free our identity */ - Curl_sspi_free_identity(krb5->p_identity); - krb5->p_identity = NULL; - - /* Free the SPN and output token */ - Curl_safefree(krb5->spn); - Curl_safefree(krb5->output_token); - - /* Reset any variables */ - krb5->token_max = 0; -} - -#endif /* USE_WINDOWS_SSPI && USE_KERBEROS5*/ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/ntlm.c b/build/premake/premake5/contrib/curl/lib/vauth/ntlm.c deleted file mode 100644 index 96861c9358..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/ntlm.c +++ /dev/null @@ -1,858 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI) - -/* - * NTLM details: - * - * https://davenport.sourceforge.io/ntlm.html - * https://www.innovation.ch/java/ntlm.html - */ - -#define DEBUG_ME 0 - -#include "urldata.h" -#include "non-ascii.h" -#include "sendf.h" -#include "curl_base64.h" -#include "curl_ntlm_core.h" -#include "curl_gethostname.h" -#include "curl_multibyte.h" -#include "warnless.h" -#include "rand.h" -#include "vtls/vtls.h" - -#ifdef USE_NSS -#include "vtls/nssg.h" /* for Curl_nss_force_init() */ -#endif - -#define BUILDING_CURL_NTLM_MSGS_C -#include "vauth/vauth.h" -#include "vauth/ntlm.h" -#include "curl_endian.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* "NTLMSSP" signature is always in ASCII regardless of the platform */ -#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50" - -#define SHORTPAIR(x) ((x) & 0xff), (((x) >> 8) & 0xff) -#define LONGQUARTET(x) ((x) & 0xff), (((x) >> 8) & 0xff), \ - (((x) >> 16) & 0xff), (((x) >> 24) & 0xff) - -#if DEBUG_ME -# define DEBUG_OUT(x) x -static void ntlm_print_flags(FILE *handle, unsigned long flags) -{ - if(flags & NTLMFLAG_NEGOTIATE_UNICODE) - fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE "); - if(flags & NTLMFLAG_NEGOTIATE_OEM) - fprintf(handle, "NTLMFLAG_NEGOTIATE_OEM "); - if(flags & NTLMFLAG_REQUEST_TARGET) - fprintf(handle, "NTLMFLAG_REQUEST_TARGET "); - if(flags & (1<<3)) - fprintf(handle, "NTLMFLAG_UNKNOWN_3 "); - if(flags & NTLMFLAG_NEGOTIATE_SIGN) - fprintf(handle, "NTLMFLAG_NEGOTIATE_SIGN "); - if(flags & NTLMFLAG_NEGOTIATE_SEAL) - fprintf(handle, "NTLMFLAG_NEGOTIATE_SEAL "); - if(flags & NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE) - fprintf(handle, "NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE "); - if(flags & NTLMFLAG_NEGOTIATE_LM_KEY) - fprintf(handle, "NTLMFLAG_NEGOTIATE_LM_KEY "); - if(flags & NTLMFLAG_NEGOTIATE_NETWARE) - fprintf(handle, "NTLMFLAG_NEGOTIATE_NETWARE "); - if(flags & NTLMFLAG_NEGOTIATE_NTLM_KEY) - fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM_KEY "); - if(flags & (1<<10)) - fprintf(handle, "NTLMFLAG_UNKNOWN_10 "); - if(flags & NTLMFLAG_NEGOTIATE_ANONYMOUS) - fprintf(handle, "NTLMFLAG_NEGOTIATE_ANONYMOUS "); - if(flags & NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED) - fprintf(handle, "NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED "); - if(flags & NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED) - fprintf(handle, "NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED "); - if(flags & NTLMFLAG_NEGOTIATE_LOCAL_CALL) - fprintf(handle, "NTLMFLAG_NEGOTIATE_LOCAL_CALL "); - if(flags & NTLMFLAG_NEGOTIATE_ALWAYS_SIGN) - fprintf(handle, "NTLMFLAG_NEGOTIATE_ALWAYS_SIGN "); - if(flags & NTLMFLAG_TARGET_TYPE_DOMAIN) - fprintf(handle, "NTLMFLAG_TARGET_TYPE_DOMAIN "); - if(flags & NTLMFLAG_TARGET_TYPE_SERVER) - fprintf(handle, "NTLMFLAG_TARGET_TYPE_SERVER "); - if(flags & NTLMFLAG_TARGET_TYPE_SHARE) - fprintf(handle, "NTLMFLAG_TARGET_TYPE_SHARE "); - if(flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) - fprintf(handle, "NTLMFLAG_NEGOTIATE_NTLM2_KEY "); - if(flags & NTLMFLAG_REQUEST_INIT_RESPONSE) - fprintf(handle, "NTLMFLAG_REQUEST_INIT_RESPONSE "); - if(flags & NTLMFLAG_REQUEST_ACCEPT_RESPONSE) - fprintf(handle, "NTLMFLAG_REQUEST_ACCEPT_RESPONSE "); - if(flags & NTLMFLAG_REQUEST_NONNT_SESSION_KEY) - fprintf(handle, "NTLMFLAG_REQUEST_NONNT_SESSION_KEY "); - if(flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) - fprintf(handle, "NTLMFLAG_NEGOTIATE_TARGET_INFO "); - if(flags & (1<<24)) - fprintf(handle, "NTLMFLAG_UNKNOWN_24 "); - if(flags & (1<<25)) - fprintf(handle, "NTLMFLAG_UNKNOWN_25 "); - if(flags & (1<<26)) - fprintf(handle, "NTLMFLAG_UNKNOWN_26 "); - if(flags & (1<<27)) - fprintf(handle, "NTLMFLAG_UNKNOWN_27 "); - if(flags & (1<<28)) - fprintf(handle, "NTLMFLAG_UNKNOWN_28 "); - if(flags & NTLMFLAG_NEGOTIATE_128) - fprintf(handle, "NTLMFLAG_NEGOTIATE_128 "); - if(flags & NTLMFLAG_NEGOTIATE_KEY_EXCHANGE) - fprintf(handle, "NTLMFLAG_NEGOTIATE_KEY_EXCHANGE "); - if(flags & NTLMFLAG_NEGOTIATE_56) - fprintf(handle, "NTLMFLAG_NEGOTIATE_56 "); -} - -static void ntlm_print_hex(FILE *handle, const char *buf, size_t len) -{ - const char *p = buf; - - (void) handle; - - fprintf(stderr, "0x"); - while(len-- > 0) - fprintf(stderr, "%02.2x", (unsigned int)*p++); -} -#else -# define DEBUG_OUT(x) Curl_nop_stmt -#endif - -/* - * ntlm_decode_type2_target() - * - * This is used to decode the "target info" in the NTLM type-2 message - * received. - * - * Parameters: - * - * data [in] - The session handle. - * buffer [in] - The decoded type-2 message. - * size [in] - The input buffer size, at least 32 bytes. - * ntlm [in/out] - The NTLM data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -static CURLcode ntlm_decode_type2_target(struct Curl_easy *data, - unsigned char *buffer, - size_t size, - struct ntlmdata *ntlm) -{ - unsigned short target_info_len = 0; - unsigned int target_info_offset = 0; - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) data; -#endif - - if(size >= 48) { - target_info_len = Curl_read16_le(&buffer[40]); - target_info_offset = Curl_read32_le(&buffer[44]); - if(target_info_len > 0) { - if(((target_info_offset + target_info_len) > size) || - (target_info_offset < 48)) { - infof(data, "NTLM handshake failure (bad type-2 message). " - "Target Info Offset Len is set incorrect by the peer\n"); - return CURLE_BAD_CONTENT_ENCODING; - } - - ntlm->target_info = malloc(target_info_len); - if(!ntlm->target_info) - return CURLE_OUT_OF_MEMORY; - - memcpy(ntlm->target_info, &buffer[target_info_offset], target_info_len); - } - } - - ntlm->target_info_len = target_info_len; - - return CURLE_OK; -} - -/* - NTLM message structure notes: - - A 'short' is a 'network short', a little-endian 16-bit unsigned value. - - A 'long' is a 'network long', a little-endian, 32-bit unsigned value. - - A 'security buffer' represents a triplet used to point to a buffer, - consisting of two shorts and one long: - - 1. A 'short' containing the length of the buffer content in bytes. - 2. A 'short' containing the allocated space for the buffer in bytes. - 3. A 'long' containing the offset to the start of the buffer in bytes, - from the beginning of the NTLM message. -*/ - -/* - * Curl_auth_is_ntlm_supported() - * - * This is used to evaluate if NTLM is supported. - * - * Parameters: None - * - * Returns TRUE as NTLM as handled by libcurl. - */ -bool Curl_auth_is_ntlm_supported(void) -{ - return TRUE; -} - -/* - * Curl_auth_decode_ntlm_type2_message() - * - * This is used to decode an already encoded NTLM type-2 message. The message - * is first decoded from a base64 string into a raw NTLM message and checked - * for validity before the appropriate data for creating a type-3 message is - * written to the given NTLM data structure. - * - * Parameters: - * - * data [in] - The session handle. - * type2msg [in] - The base64 encoded type-2 message. - * ntlm [in/out] - The NTLM data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, - const char *type2msg, - struct ntlmdata *ntlm) -{ - static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 }; - - /* NTLM type-2 message structure: - - Index Description Content - 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP" - (0x4e544c4d53535000) - 8 NTLM Message Type long (0x02000000) - 12 Target Name security buffer - 20 Flags long - 24 Challenge 8 bytes - (32) Context 8 bytes (two consecutive longs) (*) - (40) Target Information security buffer (*) - (48) OS Version Structure 8 bytes (*) - 32 (48) (56) Start of data block (*) - (*) -> Optional - */ - - CURLcode result = CURLE_OK; - unsigned char *type2 = NULL; - size_t type2_len = 0; - -#if defined(USE_NSS) - /* Make sure the crypto backend is initialized */ - result = Curl_nss_force_init(data); - if(result) - return result; -#elif defined(CURL_DISABLE_VERBOSE_STRINGS) - (void)data; -#endif - - /* Decode the base-64 encoded type-2 message */ - if(strlen(type2msg) && *type2msg != '=') { - result = Curl_base64_decode(type2msg, &type2, &type2_len); - if(result) - return result; - } - - /* Ensure we have a valid type-2 message */ - if(!type2) { - infof(data, "NTLM handshake failure (empty type-2 message)\n"); - return CURLE_BAD_CONTENT_ENCODING; - } - - ntlm->flags = 0; - - if((type2_len < 32) || - (memcmp(type2, NTLMSSP_SIGNATURE, 8) != 0) || - (memcmp(type2 + 8, type2_marker, sizeof(type2_marker)) != 0)) { - /* This was not a good enough type-2 message */ - free(type2); - infof(data, "NTLM handshake failure (bad type-2 message)\n"); - return CURLE_BAD_CONTENT_ENCODING; - } - - ntlm->flags = Curl_read32_le(&type2[20]); - memcpy(ntlm->nonce, &type2[24], 8); - - if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) { - result = ntlm_decode_type2_target(data, type2, type2_len, ntlm); - if(result) { - free(type2); - infof(data, "NTLM handshake failure (bad type-2 message)\n"); - return result; - } - } - - DEBUG_OUT({ - fprintf(stderr, "**** TYPE2 header flags=0x%08.8lx ", ntlm->flags); - ntlm_print_flags(stderr, ntlm->flags); - fprintf(stderr, "\n nonce="); - ntlm_print_hex(stderr, (char *)ntlm->nonce, 8); - fprintf(stderr, "\n****\n"); - fprintf(stderr, "**** Header %s\n ", header); - }); - - free(type2); - - return result; -} - -/* copy the source to the destination and fill in zeroes in every - other destination byte! */ -static void unicodecpy(unsigned char *dest, const char *src, size_t length) -{ - size_t i; - for(i = 0; i < length; i++) { - dest[2 * i] = (unsigned char)src[i]; - dest[2 * i + 1] = '\0'; - } -} - -/* - * Curl_auth_create_ntlm_type1_message() - * - * This is used to generate an already encoded NTLM type-1 message ready for - * sending to the recipient using the appropriate compile time crypto API. - * - * Parameters: - * - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * ntlm [in/out] - The NTLM data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) -{ - /* NTLM type-1 message structure: - - Index Description Content - 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP" - (0x4e544c4d53535000) - 8 NTLM Message Type long (0x01000000) - 12 Flags long - (16) Supplied Domain security buffer (*) - (24) Supplied Workstation security buffer (*) - (32) OS Version Structure 8 bytes (*) - (32) (40) Start of data block (*) - (*) -> Optional - */ - - size_t size; - - unsigned char ntlmbuf[NTLM_BUFSIZE]; - const char *host = ""; /* empty */ - const char *domain = ""; /* empty */ - size_t hostlen = 0; - size_t domlen = 0; - size_t hostoff = 0; - size_t domoff = hostoff + hostlen; /* This is 0: remember that host and - domain are empty */ - (void)userp; - (void)passwdp; - - /* Clean up any former leftovers and initialise to defaults */ - Curl_auth_ntlm_cleanup(ntlm); - -#if USE_NTRESPONSES && USE_NTLM2SESSION -#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY -#else -#define NTLM2FLAG 0 -#endif - snprintf((char *)ntlmbuf, NTLM_BUFSIZE, - NTLMSSP_SIGNATURE "%c" - "\x01%c%c%c" /* 32-bit type = 1 */ - "%c%c%c%c" /* 32-bit NTLM flag field */ - "%c%c" /* domain length */ - "%c%c" /* domain allocated space */ - "%c%c" /* domain name offset */ - "%c%c" /* 2 zeroes */ - "%c%c" /* host length */ - "%c%c" /* host allocated space */ - "%c%c" /* host name offset */ - "%c%c" /* 2 zeroes */ - "%s" /* host name */ - "%s", /* domain string */ - 0, /* trailing zero */ - 0, 0, 0, /* part of type-1 long */ - - LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM | - NTLMFLAG_REQUEST_TARGET | - NTLMFLAG_NEGOTIATE_NTLM_KEY | - NTLM2FLAG | - NTLMFLAG_NEGOTIATE_ALWAYS_SIGN), - SHORTPAIR(domlen), - SHORTPAIR(domlen), - SHORTPAIR(domoff), - 0, 0, - SHORTPAIR(hostlen), - SHORTPAIR(hostlen), - SHORTPAIR(hostoff), - 0, 0, - host, /* this is empty */ - domain /* this is empty */); - - /* Initial packet length */ - size = 32 + hostlen + domlen; - - DEBUG_OUT({ - fprintf(stderr, "* TYPE1 header flags=0x%02.2x%02.2x%02.2x%02.2x " - "0x%08.8x ", - LONGQUARTET(NTLMFLAG_NEGOTIATE_OEM | - NTLMFLAG_REQUEST_TARGET | - NTLMFLAG_NEGOTIATE_NTLM_KEY | - NTLM2FLAG | - NTLMFLAG_NEGOTIATE_ALWAYS_SIGN), - NTLMFLAG_NEGOTIATE_OEM | - NTLMFLAG_REQUEST_TARGET | - NTLMFLAG_NEGOTIATE_NTLM_KEY | - NTLM2FLAG | - NTLMFLAG_NEGOTIATE_ALWAYS_SIGN); - ntlm_print_flags(stderr, - NTLMFLAG_NEGOTIATE_OEM | - NTLMFLAG_REQUEST_TARGET | - NTLMFLAG_NEGOTIATE_NTLM_KEY | - NTLM2FLAG | - NTLMFLAG_NEGOTIATE_ALWAYS_SIGN); - fprintf(stderr, "\n****\n"); - }); - - /* Return with binary blob encoded into base64 */ - return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); -} - -/* - * Curl_auth_create_ntlm_type3_message() - * - * This is used to generate an already encoded NTLM type-3 message ready for - * sending to the recipient using the appropriate compile time crypto API. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * ntlm [in/out] - The NTLM data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) - -{ - /* NTLM type-3 message structure: - - Index Description Content - 0 NTLMSSP Signature Null-terminated ASCII "NTLMSSP" - (0x4e544c4d53535000) - 8 NTLM Message Type long (0x03000000) - 12 LM/LMv2 Response security buffer - 20 NTLM/NTLMv2 Response security buffer - 28 Target Name security buffer - 36 User Name security buffer - 44 Workstation Name security buffer - (52) Session Key security buffer (*) - (60) Flags long (*) - (64) OS Version Structure 8 bytes (*) - 52 (64) (72) Start of data block - (*) -> Optional - */ - - CURLcode result = CURLE_OK; - size_t size; - unsigned char ntlmbuf[NTLM_BUFSIZE]; - int lmrespoff; - unsigned char lmresp[24]; /* fixed-size */ -#if USE_NTRESPONSES - int ntrespoff; - unsigned int ntresplen = 24; - unsigned char ntresp[24]; /* fixed-size */ - unsigned char *ptr_ntresp = &ntresp[0]; - unsigned char *ntlmv2resp = NULL; -#endif - bool unicode = (ntlm->flags & NTLMFLAG_NEGOTIATE_UNICODE) ? TRUE : FALSE; - char host[HOSTNAME_MAX + 1] = ""; - const char *user; - const char *domain = ""; - size_t hostoff = 0; - size_t useroff = 0; - size_t domoff = 0; - size_t hostlen = 0; - size_t userlen = 0; - size_t domlen = 0; - - user = strchr(userp, '\\'); - if(!user) - user = strchr(userp, '/'); - - if(user) { - domain = userp; - domlen = (user - domain); - user++; - } - else - user = userp; - - if(user) - userlen = strlen(user); - - /* Get the machine's un-qualified host name as NTLM doesn't like the fully - qualified domain name */ - if(Curl_gethostname(host, sizeof(host))) { - infof(data, "gethostname() failed, continuing without!\n"); - hostlen = 0; - } - else { - hostlen = strlen(host); - } - -#if USE_NTRESPONSES && USE_NTLM_V2 - if(ntlm->target_info_len) { - unsigned char ntbuffer[0x18]; - unsigned int entropy[2]; - unsigned char ntlmv2hash[0x18]; - - result = Curl_rand(data, &entropy[0], 2); - if(result) - return result; - - result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); - if(result) - return result; - - result = Curl_ntlm_core_mk_ntlmv2_hash(user, userlen, domain, domlen, - ntbuffer, ntlmv2hash); - if(result) - return result; - - /* LMv2 response */ - result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], - &ntlm->nonce[0], lmresp); - if(result) - return result; - - /* NTLMv2 response */ - result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], - ntlm, &ntlmv2resp, &ntresplen); - if(result) - return result; - - ptr_ntresp = ntlmv2resp; - } - else -#endif - -#if USE_NTRESPONSES && USE_NTLM2SESSION - /* We don't support NTLM2 if we don't have USE_NTRESPONSES */ - if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) { - unsigned char ntbuffer[0x18]; - unsigned char tmp[0x18]; - unsigned char md5sum[MD5_DIGEST_LENGTH]; - unsigned int entropy[2]; - - /* Need to create 8 bytes random data */ - result = Curl_rand(data, &entropy[0], 2); - if(result) - return result; - - /* 8 bytes random data as challenge in lmresp */ - memcpy(lmresp, entropy, 8); - - /* Pad with zeros */ - memset(lmresp + 8, 0, 0x10); - - /* Fill tmp with challenge(nonce?) + entropy */ - memcpy(tmp, &ntlm->nonce[0], 8); - memcpy(tmp + 8, entropy, 8); - - result = Curl_ssl_md5sum(tmp, 16, md5sum, MD5_DIGEST_LENGTH); - if(!result) - /* We shall only use the first 8 bytes of md5sum, but the des code in - Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */ - result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); - if(result) - return result; - - Curl_ntlm_core_lm_resp(ntbuffer, md5sum, ntresp); - - /* End of NTLM2 Session code */ - - } - else -#endif - { - -#if USE_NTRESPONSES - unsigned char ntbuffer[0x18]; -#endif - unsigned char lmbuffer[0x18]; - -#if USE_NTRESPONSES - result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); - if(result) - return result; - - Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], ntresp); -#endif - - result = Curl_ntlm_core_mk_lm_hash(data, passwdp, lmbuffer); - if(result) - return result; - - Curl_ntlm_core_lm_resp(lmbuffer, &ntlm->nonce[0], lmresp); - - /* A safer but less compatible alternative is: - * Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], lmresp); - * See https://davenport.sourceforge.io/ntlm.html#ntlmVersion2 */ - } - - if(unicode) { - domlen = domlen * 2; - userlen = userlen * 2; - hostlen = hostlen * 2; - } - - lmrespoff = 64; /* size of the message header */ -#if USE_NTRESPONSES - ntrespoff = lmrespoff + 0x18; - domoff = ntrespoff + ntresplen; -#else - domoff = lmrespoff + 0x18; -#endif - useroff = domoff + domlen; - hostoff = useroff + userlen; - - /* Create the big type-3 message binary blob */ - size = snprintf((char *)ntlmbuf, NTLM_BUFSIZE, - NTLMSSP_SIGNATURE "%c" - "\x03%c%c%c" /* 32-bit type = 3 */ - - "%c%c" /* LanManager length */ - "%c%c" /* LanManager allocated space */ - "%c%c" /* LanManager offset */ - "%c%c" /* 2 zeroes */ - - "%c%c" /* NT-response length */ - "%c%c" /* NT-response allocated space */ - "%c%c" /* NT-response offset */ - "%c%c" /* 2 zeroes */ - - "%c%c" /* domain length */ - "%c%c" /* domain allocated space */ - "%c%c" /* domain name offset */ - "%c%c" /* 2 zeroes */ - - "%c%c" /* user length */ - "%c%c" /* user allocated space */ - "%c%c" /* user offset */ - "%c%c" /* 2 zeroes */ - - "%c%c" /* host length */ - "%c%c" /* host allocated space */ - "%c%c" /* host offset */ - "%c%c" /* 2 zeroes */ - - "%c%c" /* session key length (unknown purpose) */ - "%c%c" /* session key allocated space (unknown purpose) */ - "%c%c" /* session key offset (unknown purpose) */ - "%c%c" /* 2 zeroes */ - - "%c%c%c%c", /* flags */ - - /* domain string */ - /* user string */ - /* host string */ - /* LanManager response */ - /* NT response */ - - 0, /* zero termination */ - 0, 0, 0, /* type-3 long, the 24 upper bits */ - - SHORTPAIR(0x18), /* LanManager response length, twice */ - SHORTPAIR(0x18), - SHORTPAIR(lmrespoff), - 0x0, 0x0, - -#if USE_NTRESPONSES - SHORTPAIR(ntresplen), /* NT-response length, twice */ - SHORTPAIR(ntresplen), - SHORTPAIR(ntrespoff), - 0x0, 0x0, -#else - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, -#endif - SHORTPAIR(domlen), - SHORTPAIR(domlen), - SHORTPAIR(domoff), - 0x0, 0x0, - - SHORTPAIR(userlen), - SHORTPAIR(userlen), - SHORTPAIR(useroff), - 0x0, 0x0, - - SHORTPAIR(hostlen), - SHORTPAIR(hostlen), - SHORTPAIR(hostoff), - 0x0, 0x0, - - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - 0x0, 0x0, - - LONGQUARTET(ntlm->flags)); - - DEBUGASSERT(size == 64); - DEBUGASSERT(size == (size_t)lmrespoff); - - /* We append the binary hashes */ - if(size < (NTLM_BUFSIZE - 0x18)) { - memcpy(&ntlmbuf[size], lmresp, 0x18); - size += 0x18; - } - - DEBUG_OUT({ - fprintf(stderr, "**** TYPE3 header lmresp="); - ntlm_print_hex(stderr, (char *)&ntlmbuf[lmrespoff], 0x18); - }); - -#if USE_NTRESPONSES - if(size < (NTLM_BUFSIZE - ntresplen)) { - DEBUGASSERT(size == (size_t)ntrespoff); - memcpy(&ntlmbuf[size], ptr_ntresp, ntresplen); - size += ntresplen; - } - - DEBUG_OUT({ - fprintf(stderr, "\n ntresp="); - ntlm_print_hex(stderr, (char *)&ntlmbuf[ntrespoff], ntresplen); - }); - - free(ntlmv2resp);/* Free the dynamic buffer allocated for NTLMv2 */ - -#endif - - DEBUG_OUT({ - fprintf(stderr, "\n flags=0x%02.2x%02.2x%02.2x%02.2x 0x%08.8x ", - LONGQUARTET(ntlm->flags), ntlm->flags); - ntlm_print_flags(stderr, ntlm->flags); - fprintf(stderr, "\n****\n"); - }); - - /* Make sure that the domain, user and host strings fit in the - buffer before we copy them there. */ - if(size + userlen + domlen + hostlen >= NTLM_BUFSIZE) { - failf(data, "user + domain + host name too big"); - return CURLE_OUT_OF_MEMORY; - } - - DEBUGASSERT(size == domoff); - if(unicode) - unicodecpy(&ntlmbuf[size], domain, domlen / 2); - else - memcpy(&ntlmbuf[size], domain, domlen); - - size += domlen; - - DEBUGASSERT(size == useroff); - if(unicode) - unicodecpy(&ntlmbuf[size], user, userlen / 2); - else - memcpy(&ntlmbuf[size], user, userlen); - - size += userlen; - - DEBUGASSERT(size == hostoff); - if(unicode) - unicodecpy(&ntlmbuf[size], host, hostlen / 2); - else - memcpy(&ntlmbuf[size], host, hostlen); - - size += hostlen; - - /* Convert domain, user, and host to ASCII but leave the rest as-is */ - result = Curl_convert_to_network(data, (char *)&ntlmbuf[domoff], - size - domoff); - if(result) - return CURLE_CONV_FAILED; - - /* Return with binary blob encoded into base64 */ - result = Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); - - Curl_auth_ntlm_cleanup(ntlm); - - return result; -} - -/* -* Curl_auth_ntlm_cleanup() -* -* This is used to clean up the NTLM specific data. -* -* Parameters: -* -* ntlm [in/out] - The NTLM data struct being cleaned up. -* -*/ -void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm) -{ - /* Free the target info */ - Curl_safefree(ntlm->target_info); - - /* Reset any variables */ - ntlm->target_info_len = 0; -} - -#endif /* USE_NTLM && !USE_WINDOWS_SSPI */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/ntlm.h b/build/premake/premake5/contrib/curl/lib/vauth/ntlm.h deleted file mode 100644 index f906a3c7a7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/ntlm.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef HEADER_CURL_NTLM_H -#define HEADER_CURL_NTLM_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_NTLM - -/* NTLM buffer fixed size, large enough for long user + host + domain */ -#define NTLM_BUFSIZE 1024 - -/* Stuff only required for curl_ntlm_msgs.c */ -#ifdef BUILDING_CURL_NTLM_MSGS_C - -/* Flag bits definitions based on https://davenport.sourceforge.io/ntlm.html */ - -#define NTLMFLAG_NEGOTIATE_UNICODE (1<<0) -/* Indicates that Unicode strings are supported for use in security buffer - data. */ - -#define NTLMFLAG_NEGOTIATE_OEM (1<<1) -/* Indicates that OEM strings are supported for use in security buffer data. */ - -#define NTLMFLAG_REQUEST_TARGET (1<<2) -/* Requests that the server's authentication realm be included in the Type 2 - message. */ - -/* unknown (1<<3) */ -#define NTLMFLAG_NEGOTIATE_SIGN (1<<4) -/* Specifies that authenticated communication between the client and server - should carry a digital signature (message integrity). */ - -#define NTLMFLAG_NEGOTIATE_SEAL (1<<5) -/* Specifies that authenticated communication between the client and server - should be encrypted (message confidentiality). */ - -#define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE (1<<6) -/* Indicates that datagram authentication is being used. */ - -#define NTLMFLAG_NEGOTIATE_LM_KEY (1<<7) -/* Indicates that the LAN Manager session key should be used for signing and - sealing authenticated communications. */ - -#define NTLMFLAG_NEGOTIATE_NETWARE (1<<8) -/* unknown purpose */ - -#define NTLMFLAG_NEGOTIATE_NTLM_KEY (1<<9) -/* Indicates that NTLM authentication is being used. */ - -/* unknown (1<<10) */ - -#define NTLMFLAG_NEGOTIATE_ANONYMOUS (1<<11) -/* Sent by the client in the Type 3 message to indicate that an anonymous - context has been established. This also affects the response fields. */ - -#define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED (1<<12) -/* Sent by the client in the Type 1 message to indicate that a desired - authentication realm is included in the message. */ - -#define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED (1<<13) -/* Sent by the client in the Type 1 message to indicate that the client - workstation's name is included in the message. */ - -#define NTLMFLAG_NEGOTIATE_LOCAL_CALL (1<<14) -/* Sent by the server to indicate that the server and client are on the same - machine. Implies that the client may use a pre-established local security - context rather than responding to the challenge. */ - -#define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN (1<<15) -/* Indicates that authenticated communication between the client and server - should be signed with a "dummy" signature. */ - -#define NTLMFLAG_TARGET_TYPE_DOMAIN (1<<16) -/* Sent by the server in the Type 2 message to indicate that the target - authentication realm is a domain. */ - -#define NTLMFLAG_TARGET_TYPE_SERVER (1<<17) -/* Sent by the server in the Type 2 message to indicate that the target - authentication realm is a server. */ - -#define NTLMFLAG_TARGET_TYPE_SHARE (1<<18) -/* Sent by the server in the Type 2 message to indicate that the target - authentication realm is a share. Presumably, this is for share-level - authentication. Usage is unclear. */ - -#define NTLMFLAG_NEGOTIATE_NTLM2_KEY (1<<19) -/* Indicates that the NTLM2 signing and sealing scheme should be used for - protecting authenticated communications. */ - -#define NTLMFLAG_REQUEST_INIT_RESPONSE (1<<20) -/* unknown purpose */ - -#define NTLMFLAG_REQUEST_ACCEPT_RESPONSE (1<<21) -/* unknown purpose */ - -#define NTLMFLAG_REQUEST_NONNT_SESSION_KEY (1<<22) -/* unknown purpose */ - -#define NTLMFLAG_NEGOTIATE_TARGET_INFO (1<<23) -/* Sent by the server in the Type 2 message to indicate that it is including a - Target Information block in the message. */ - -/* unknown (1<24) */ -/* unknown (1<25) */ -/* unknown (1<26) */ -/* unknown (1<27) */ -/* unknown (1<28) */ - -#define NTLMFLAG_NEGOTIATE_128 (1<<29) -/* Indicates that 128-bit encryption is supported. */ - -#define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE (1<<30) -/* Indicates that the client will provide an encrypted master key in - the "Session Key" field of the Type 3 message. */ - -#define NTLMFLAG_NEGOTIATE_56 (1<<31) -/* Indicates that 56-bit encryption is supported. */ - -#endif /* BUILDING_CURL_NTLM_MSGS_C */ - -#endif /* USE_NTLM */ - -#endif /* HEADER_CURL_NTLM_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/ntlm_sspi.c b/build/premake/premake5/contrib/curl/lib/vauth/ntlm_sspi.c deleted file mode 100644 index c3305176d8..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/ntlm_sspi.c +++ /dev/null @@ -1,335 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_WINDOWS_SSPI) && defined(USE_NTLM) - -#include - -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_base64.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_is_ntlm_supported() - * - * This is used to evaluate if NTLM is supported. - * - * Parameters: None - * - * Returns TRUE if NTLM is supported by Windows SSPI. - */ -bool Curl_auth_is_ntlm_supported(void) -{ - PSecPkgInfo SecurityPackage; - SECURITY_STATUS status; - - /* Query the security package for NTLM */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM), - &SecurityPackage); - - return (status == SEC_E_OK ? TRUE : FALSE); -} - -/* - * Curl_auth_create_ntlm_type1_message() - * - * This is used to generate an already encoded NTLM type-1 message ready for - * sending to the recipient. - * - * Parameters: - * - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * ntlm [in/out] - The NTLM data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) -{ - PSecPkgInfo SecurityPackage; - SecBuffer type_1_buf; - SecBufferDesc type_1_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - /* Clean up any former leftovers and initialise to defaults */ - Curl_auth_ntlm_cleanup(ntlm); - - /* Query the security package for NTLM */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_NTLM), - &SecurityPackage); - if(status != SEC_E_OK) - return CURLE_NOT_BUILT_IN; - - ntlm->token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our output buffer */ - ntlm->output_token = malloc(ntlm->token_max); - if(!ntlm->output_token) - return CURLE_OUT_OF_MEMORY; - - if(userp && *userp) { - CURLcode result; - - /* Populate our identity structure */ - result = Curl_create_sspi_identity(userp, passwdp, &ntlm->identity); - if(result) - return result; - - /* Allow proper cleanup of the identity structure */ - ntlm->p_identity = &ntlm->identity; - } - else - /* Use the current Windows user */ - ntlm->p_identity = NULL; - - /* Allocate our credentials handle */ - ntlm->credentials = malloc(sizeof(CredHandle)); - if(!ntlm->credentials) - return CURLE_OUT_OF_MEMORY; - - memset(ntlm->credentials, 0, sizeof(CredHandle)); - - /* Acquire our credentials handle */ - status = s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *) TEXT(SP_NAME_NTLM), - SECPKG_CRED_OUTBOUND, NULL, - ntlm->p_identity, NULL, NULL, - ntlm->credentials, &expiry); - if(status != SEC_E_OK) - return CURLE_LOGIN_DENIED; - - /* Allocate our new context handle */ - ntlm->context = malloc(sizeof(CtxtHandle)); - if(!ntlm->context) - return CURLE_OUT_OF_MEMORY; - - memset(ntlm->context, 0, sizeof(CtxtHandle)); - - /* Setup the type-1 "output" security buffer */ - type_1_desc.ulVersion = SECBUFFER_VERSION; - type_1_desc.cBuffers = 1; - type_1_desc.pBuffers = &type_1_buf; - type_1_buf.BufferType = SECBUFFER_TOKEN; - type_1_buf.pvBuffer = ntlm->output_token; - type_1_buf.cbBuffer = curlx_uztoul(ntlm->token_max); - - /* Generate our type-1 message */ - status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL, - (TCHAR *) TEXT(""), - 0, 0, SECURITY_NETWORK_DREP, - NULL, 0, - ntlm->context, &type_1_desc, - &attrs, &expiry); - if(status == SEC_I_COMPLETE_NEEDED || - status == SEC_I_COMPLETE_AND_CONTINUE) - s_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc); - else if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) - return CURLE_RECV_ERROR; - - /* Base64 encode the response */ - return Curl_base64_encode(NULL, (char *) ntlm->output_token, - type_1_buf.cbBuffer, outptr, outlen); -} - -/* - * Curl_auth_decode_ntlm_type2_message() - * - * This is used to decode an already encoded NTLM type-2 message. - * - * Parameters: - * - * data [in] - The session handle. - * type2msg [in] - The base64 encoded type-2 message. - * ntlm [in/out] - The NTLM data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, - const char *type2msg, - struct ntlmdata *ntlm) -{ - CURLcode result = CURLE_OK; - unsigned char *type2 = NULL; - size_t type2_len = 0; - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) data; -#endif - - /* Decode the base-64 encoded type-2 message */ - if(strlen(type2msg) && *type2msg != '=') { - result = Curl_base64_decode(type2msg, &type2, &type2_len); - if(result) - return result; - } - - /* Ensure we have a valid type-2 message */ - if(!type2) { - infof(data, "NTLM handshake failure (empty type-2 message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Simply store the challenge for use later */ - ntlm->input_token = type2; - ntlm->input_token_len = type2_len; - - return result; -} - -/* -* Curl_auth_create_ntlm_type3_message() - * Curl_auth_create_ntlm_type3_message() - * - * This is used to generate an already encoded NTLM type-3 message ready for - * sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * ntlm [in/out] - The NTLM data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - SecBuffer type_2_buf; - SecBuffer type_3_buf; - SecBufferDesc type_2_desc; - SecBufferDesc type_3_desc; - SECURITY_STATUS status; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - - (void) passwdp; - (void) userp; - - /* Setup the type-2 "input" security buffer */ - type_2_desc.ulVersion = SECBUFFER_VERSION; - type_2_desc.cBuffers = 1; - type_2_desc.pBuffers = &type_2_buf; - type_2_buf.BufferType = SECBUFFER_TOKEN; - type_2_buf.pvBuffer = ntlm->input_token; - type_2_buf.cbBuffer = curlx_uztoul(ntlm->input_token_len); - - /* Setup the type-3 "output" security buffer */ - type_3_desc.ulVersion = SECBUFFER_VERSION; - type_3_desc.cBuffers = 1; - type_3_desc.pBuffers = &type_3_buf; - type_3_buf.BufferType = SECBUFFER_TOKEN; - type_3_buf.pvBuffer = ntlm->output_token; - type_3_buf.cbBuffer = curlx_uztoul(ntlm->token_max); - - /* Generate our type-3 message */ - status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, - ntlm->context, - (TCHAR *) TEXT(""), - 0, 0, SECURITY_NETWORK_DREP, - &type_2_desc, - 0, ntlm->context, - &type_3_desc, - &attrs, &expiry); - if(status != SEC_E_OK) { - infof(data, "NTLM handshake failure (type-3 message): Status=%x\n", - status); - - return CURLE_RECV_ERROR; - } - - /* Base64 encode the response */ - result = Curl_base64_encode(data, (char *) ntlm->output_token, - type_3_buf.cbBuffer, outptr, outlen); - - Curl_auth_ntlm_cleanup(ntlm); - - return result; -} - -/* - * Curl_auth_ntlm_cleanup() - * - * This is used to clean up the NTLM specific data. - * - * Parameters: - * - * ntlm [in/out] - The NTLM data struct being cleaned up. - * - */ -void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm) -{ - /* Free our security context */ - if(ntlm->context) { - s_pSecFn->DeleteSecurityContext(ntlm->context); - free(ntlm->context); - ntlm->context = NULL; - } - - /* Free our credentials handle */ - if(ntlm->credentials) { - s_pSecFn->FreeCredentialsHandle(ntlm->credentials); - free(ntlm->credentials); - ntlm->credentials = NULL; - } - - /* Free our identity */ - Curl_sspi_free_identity(ntlm->p_identity); - ntlm->p_identity = NULL; - - /* Free the input and output tokens */ - Curl_safefree(ntlm->input_token); - Curl_safefree(ntlm->output_token); - - /* Reset any variables */ - ntlm->token_max = 0; -} - -#endif /* USE_WINDOWS_SSPI && USE_NTLM */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/oauth2.c b/build/premake/premake5/contrib/curl/lib/vauth/oauth2.c deleted file mode 100644 index 6288f89a38..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/oauth2.c +++ /dev/null @@ -1,86 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC6749 OAuth 2.0 Authorization Framework - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "urldata.h" - -#include "vauth/vauth.h" -#include "curl_base64.h" -#include "warnless.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_create_oauth_bearer_message() - * - * This is used to generate an already encoded OAuth 2.0 message ready for - * sending to the recipient. - * - * Parameters: - * - * data[in] - The session handle. - * user[in] - The user name. - * host[in] - The host name(for OAUTHBEARER). - * port[in] - The port(for OAUTHBEARER when not Port 80). - * bearer[in] - The bearer token. - * outptr[in / out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen[out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_oauth_bearer_message(struct Curl_easy *data, - const char *user, - const char *host, - const long port, - const char *bearer, - char **outptr, size_t *outlen) -{ - CURLcode result = CURLE_OK; - char *oauth = NULL; - - /* Generate the message */ - if(host == NULL && (port == 0 || port == 80)) - oauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer); - else if(port == 0 || port == 80) - oauth = aprintf("user=%s\1host=%s\1auth=Bearer %s\1\1", user, host, - bearer); - else - oauth = aprintf("user=%s\1host=%s\1port=%ld\1auth=Bearer %s\1\1", user, - host, port, bearer); - if(!oauth) - return CURLE_OUT_OF_MEMORY; - - /* Base64 encode the reply */ - result = Curl_base64_encode(data, oauth, strlen(oauth), outptr, outlen); - - free(oauth); - - return result; -} diff --git a/build/premake/premake5/contrib/curl/lib/vauth/spnego_gssapi.c b/build/premake/premake5/contrib/curl/lib/vauth/spnego_gssapi.c deleted file mode 100644 index 8840db8fda..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/spnego_gssapi.c +++ /dev/null @@ -1,274 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC4178 Simple and Protected GSS-API Negotiation Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(HAVE_GSSAPI) && defined(USE_SPNEGO) - -#include - -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_base64.h" -#include "curl_gssapi.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_is_spnego_supported() - * - * This is used to evaluate if SPNEGO (Negotiate) is supported. - * - * Parameters: None - * - * Returns TRUE if Negotiate supported by the GSS-API library. - */ -bool Curl_auth_is_spnego_supported(void) -{ - return TRUE; -} - -/* - * Curl_auth_decode_spnego_message() - * - * This is used to decode an already encoded SPNEGO (Negotiate) challenge - * message. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * service [in] - The service type such as http, smtp, pop or imap. - * host [in] - The host name. - * chlg64 [in] - The optional base64 encoded challenge message. - * nego [in/out] - The Negotiate data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data, - const char *user, - const char *password, - const char *service, - const char *host, - const char *chlg64, - struct negotiatedata *nego) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - unsigned char *chlg = NULL; - OM_uint32 major_status; - OM_uint32 minor_status; - OM_uint32 unused_status; - gss_buffer_desc spn_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER; - - (void) user; - (void) password; - - if(nego->context && nego->status == GSS_S_COMPLETE) { - /* We finished successfully our part of authentication, but server - * rejected it (since we're again here). Exit with an error since we - * can't invent anything better */ - Curl_auth_spnego_cleanup(nego); - return CURLE_LOGIN_DENIED; - } - - if(!nego->spn) { - /* Generate our SPN */ - char *spn = Curl_auth_build_spn(service, NULL, host); - if(!spn) - return CURLE_OUT_OF_MEMORY; - - /* Populate the SPN structure */ - spn_token.value = spn; - spn_token.length = strlen(spn); - - /* Import the SPN */ - major_status = gss_import_name(&minor_status, &spn_token, - GSS_C_NT_HOSTBASED_SERVICE, - &nego->spn); - if(GSS_ERROR(major_status)) { - Curl_gss_log_error(data, "gss_import_name() failed: ", - major_status, minor_status); - - free(spn); - - return CURLE_OUT_OF_MEMORY; - } - - free(spn); - } - - if(chlg64 && *chlg64) { - /* Decode the base-64 encoded challenge message */ - if(*chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "SPNEGO handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Setup the challenge "input" security buffer */ - input_token.value = chlg; - input_token.length = chlglen; - } - - /* Generate our challenge-response message */ - major_status = Curl_gss_init_sec_context(data, - &minor_status, - &nego->context, - nego->spn, - &Curl_spnego_mech_oid, - GSS_C_NO_CHANNEL_BINDINGS, - &input_token, - &output_token, - TRUE, - NULL); - - /* Free the decoded challenge as it is not required anymore */ - Curl_safefree(input_token.value); - - nego->status = major_status; - if(GSS_ERROR(major_status)) { - if(output_token.value) - gss_release_buffer(&unused_status, &output_token); - - Curl_gss_log_error(data, "gss_init_sec_context() failed: ", - major_status, minor_status); - - return CURLE_OUT_OF_MEMORY; - } - - if(!output_token.value || !output_token.length) { - if(output_token.value) - gss_release_buffer(&unused_status, &output_token); - - return CURLE_OUT_OF_MEMORY; - } - - nego->output_token = output_token; - - return CURLE_OK; -} - -/* - * Curl_auth_create_spnego_message() - * - * This is used to generate an already encoded SPNEGO (Negotiate) response - * message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * nego [in/out] - The Negotiate data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_spnego_message(struct Curl_easy *data, - struct negotiatedata *nego, - char **outptr, size_t *outlen) -{ - CURLcode result; - OM_uint32 minor_status; - - /* Base64 encode the already generated response */ - result = Curl_base64_encode(data, - nego->output_token.value, - nego->output_token.length, - outptr, outlen); - - if(result) { - gss_release_buffer(&minor_status, &nego->output_token); - nego->output_token.value = NULL; - nego->output_token.length = 0; - - return result; - } - - if(!*outptr || !*outlen) { - gss_release_buffer(&minor_status, &nego->output_token); - nego->output_token.value = NULL; - nego->output_token.length = 0; - - return CURLE_REMOTE_ACCESS_DENIED; - } - - return CURLE_OK; -} - -/* - * Curl_auth_spnego_cleanup() - * - * This is used to clean up the SPNEGO (Negotiate) specific data. - * - * Parameters: - * - * nego [in/out] - The Negotiate data struct being cleaned up. - * - */ -void Curl_auth_spnego_cleanup(struct negotiatedata *nego) -{ - OM_uint32 minor_status; - - /* Free our security context */ - if(nego->context != GSS_C_NO_CONTEXT) { - gss_delete_sec_context(&minor_status, &nego->context, GSS_C_NO_BUFFER); - nego->context = GSS_C_NO_CONTEXT; - } - - /* Free the output token */ - if(nego->output_token.value) { - gss_release_buffer(&minor_status, &nego->output_token); - nego->output_token.value = NULL; - nego->output_token.length = 0; - - } - - /* Free the SPN */ - if(nego->spn != GSS_C_NO_NAME) { - gss_release_name(&minor_status, &nego->spn); - nego->spn = GSS_C_NO_NAME; - } - - /* Reset any variables */ - nego->status = 0; -} - -#endif /* HAVE_GSSAPI && USE_SPNEGO */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/spnego_sspi.c b/build/premake/premake5/contrib/curl/lib/vauth/spnego_sspi.c deleted file mode 100644 index 5fa95e2ebd..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/spnego_sspi.c +++ /dev/null @@ -1,321 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * RFC4178 Simple and Protected GSS-API Negotiation Mechanism - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_WINDOWS_SSPI) && defined(USE_SPNEGO) - -#include - -#include "vauth/vauth.h" -#include "urldata.h" -#include "curl_base64.h" -#include "warnless.h" -#include "curl_multibyte.h" -#include "sendf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_is_spnego_supported() - * - * This is used to evaluate if SPNEGO (Negotiate) is supported. - * - * Parameters: None - * - * Returns TRUE if Negotiate is supported by Windows SSPI. - */ -bool Curl_auth_is_spnego_supported(void) -{ - PSecPkgInfo SecurityPackage; - SECURITY_STATUS status; - - /* Query the security package for Negotiate */ - status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) - TEXT(SP_NAME_NEGOTIATE), - &SecurityPackage); - - return (status == SEC_E_OK ? TRUE : FALSE); -} - -/* - * Curl_auth_decode_spnego_message() - * - * This is used to decode an already encoded SPNEGO (Negotiate) challenge - * message. - * - * Parameters: - * - * data [in] - The session handle. - * userp [in] - The user name in the format User or Domain\User. - * passdwp [in] - The user's password. - * service [in] - The service type such as http, smtp, pop or imap. - * host [in] - The host name. - * chlg64 [in] - The optional base64 encoded challenge message. - * nego [in/out] - The Negotiate data struct being used and modified. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data, - const char *user, - const char *password, - const char *service, - const char *host, - const char *chlg64, - struct negotiatedata *nego) -{ - CURLcode result = CURLE_OK; - size_t chlglen = 0; - unsigned char *chlg = NULL; - PSecPkgInfo SecurityPackage; - SecBuffer chlg_buf; - SecBuffer resp_buf; - SecBufferDesc chlg_desc; - SecBufferDesc resp_desc; - unsigned long attrs; - TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ - -#if defined(CURL_DISABLE_VERBOSE_STRINGS) - (void) data; -#endif - - if(nego->context && nego->status == SEC_E_OK) { - /* We finished successfully our part of authentication, but server - * rejected it (since we're again here). Exit with an error since we - * can't invent anything better */ - Curl_auth_spnego_cleanup(nego); - return CURLE_LOGIN_DENIED; - } - - if(!nego->spn) { - /* Generate our SPN */ - nego->spn = Curl_auth_build_spn(service, host, NULL); - if(!nego->spn) - return CURLE_OUT_OF_MEMORY; - } - - if(!nego->output_token) { - /* Query the security package for Negotiate */ - nego->status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) - TEXT(SP_NAME_NEGOTIATE), - &SecurityPackage); - if(nego->status != SEC_E_OK) - return CURLE_NOT_BUILT_IN; - - nego->token_max = SecurityPackage->cbMaxToken; - - /* Release the package buffer as it is not required anymore */ - s_pSecFn->FreeContextBuffer(SecurityPackage); - - /* Allocate our output buffer */ - nego->output_token = malloc(nego->token_max); - if(!nego->output_token) - return CURLE_OUT_OF_MEMORY; - } - - if(!nego->credentials) { - /* Do we have credientials to use or are we using single sign-on? */ - if(user && *user) { - /* Populate our identity structure */ - result = Curl_create_sspi_identity(user, password, &nego->identity); - if(result) - return result; - - /* Allow proper cleanup of the identity structure */ - nego->p_identity = &nego->identity; - } - else - /* Use the current Windows user */ - nego->p_identity = NULL; - - /* Allocate our credentials handle */ - nego->credentials = malloc(sizeof(CredHandle)); - if(!nego->credentials) - return CURLE_OUT_OF_MEMORY; - - memset(nego->credentials, 0, sizeof(CredHandle)); - - /* Acquire our credentials handle */ - nego->status = - s_pSecFn->AcquireCredentialsHandle(NULL, - (TCHAR *)TEXT(SP_NAME_NEGOTIATE), - SECPKG_CRED_OUTBOUND, NULL, - nego->p_identity, NULL, NULL, - nego->credentials, &expiry); - if(nego->status != SEC_E_OK) - return CURLE_LOGIN_DENIED; - - /* Allocate our new context handle */ - nego->context = malloc(sizeof(CtxtHandle)); - if(!nego->context) - return CURLE_OUT_OF_MEMORY; - - memset(nego->context, 0, sizeof(CtxtHandle)); - } - - if(chlg64 && *chlg64) { - /* Decode the base-64 encoded challenge message */ - if(*chlg64 != '=') { - result = Curl_base64_decode(chlg64, &chlg, &chlglen); - if(result) - return result; - } - - /* Ensure we have a valid challenge message */ - if(!chlg) { - infof(data, "SPNEGO handshake failure (empty challenge message)\n"); - - return CURLE_BAD_CONTENT_ENCODING; - } - - /* Setup the challenge "input" security buffer */ - chlg_desc.ulVersion = SECBUFFER_VERSION; - chlg_desc.cBuffers = 1; - chlg_desc.pBuffers = &chlg_buf; - chlg_buf.BufferType = SECBUFFER_TOKEN; - chlg_buf.pvBuffer = chlg; - chlg_buf.cbBuffer = curlx_uztoul(chlglen); - } - - /* Setup the response "output" security buffer */ - resp_desc.ulVersion = SECBUFFER_VERSION; - resp_desc.cBuffers = 1; - resp_desc.pBuffers = &resp_buf; - resp_buf.BufferType = SECBUFFER_TOKEN; - resp_buf.pvBuffer = nego->output_token; - resp_buf.cbBuffer = curlx_uztoul(nego->token_max); - - /* Generate our challenge-response message */ - nego->status = s_pSecFn->InitializeSecurityContext(nego->credentials, - chlg ? nego->context : - NULL, - nego->spn, - ISC_REQ_CONFIDENTIALITY, - 0, SECURITY_NATIVE_DREP, - chlg ? &chlg_desc : NULL, - 0, nego->context, - &resp_desc, &attrs, - &expiry); - - /* Free the decoded challenge as it is not required anymore */ - free(chlg); - - if(GSS_ERROR(nego->status)) { - return CURLE_OUT_OF_MEMORY; - } - - if(nego->status == SEC_I_COMPLETE_NEEDED || - nego->status == SEC_I_COMPLETE_AND_CONTINUE) { - nego->status = s_pSecFn->CompleteAuthToken(nego->context, &resp_desc); - if(GSS_ERROR(nego->status)) { - return CURLE_RECV_ERROR; - } - } - - nego->output_token_length = resp_buf.cbBuffer; - - return result; -} - -/* - * Curl_auth_create_spnego_message() - * - * This is used to generate an already encoded SPNEGO (Negotiate) response - * message ready for sending to the recipient. - * - * Parameters: - * - * data [in] - The session handle. - * nego [in/out] - The Negotiate data struct being used and modified. - * outptr [in/out] - The address where a pointer to newly allocated memory - * holding the result will be stored upon completion. - * outlen [out] - The length of the output message. - * - * Returns CURLE_OK on success. - */ -CURLcode Curl_auth_create_spnego_message(struct Curl_easy *data, - struct negotiatedata *nego, - char **outptr, size_t *outlen) -{ - CURLcode result; - - /* Base64 encode the already generated response */ - result = Curl_base64_encode(data, - (const char *) nego->output_token, - nego->output_token_length, - outptr, outlen); - - if(result) - return result; - - if(!*outptr || !*outlen) { - free(*outptr); - return CURLE_REMOTE_ACCESS_DENIED; - } - - return CURLE_OK; -} - -/* - * Curl_auth_spnego_cleanup() - * - * This is used to clean up the SPNEGO (Negotiate) specific data. - * - * Parameters: - * - * nego [in/out] - The Negotiate data struct being cleaned up. - * - */ -void Curl_auth_spnego_cleanup(struct negotiatedata *nego) -{ - /* Free our security context */ - if(nego->context) { - s_pSecFn->DeleteSecurityContext(nego->context); - free(nego->context); - nego->context = NULL; - } - - /* Free our credentials handle */ - if(nego->credentials) { - s_pSecFn->FreeCredentialsHandle(nego->credentials); - free(nego->credentials); - nego->credentials = NULL; - } - - /* Free our identity */ - Curl_sspi_free_identity(nego->p_identity); - nego->p_identity = NULL; - - /* Free the SPN and output token */ - Curl_safefree(nego->spn); - Curl_safefree(nego->output_token); - - /* Reset any variables */ - nego->status = 0; - nego->token_max = 0; -} - -#endif /* USE_WINDOWS_SSPI && USE_SPNEGO */ diff --git a/build/premake/premake5/contrib/curl/lib/vauth/vauth.c b/build/premake/premake5/contrib/curl/lib/vauth/vauth.c deleted file mode 100644 index b995f34e27..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/vauth.c +++ /dev/null @@ -1,147 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014 - 2016, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include - -#include "vauth.h" -#include "curl_multibyte.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* - * Curl_auth_build_spn() - * - * This is used to build a SPN string in the following formats: - * - * service/host@realm (Not currently used) - * service/host (Not used by GSS-API) - * service@realm (Not used by Windows SSPI) - * - * Parameters: - * - * service [in] - The service type such as http, smtp, pop or imap. - * host [in] - The host name. - * realm [in] - The realm. - * - * Returns a pointer to the newly allocated SPN. - */ -#if !defined(USE_WINDOWS_SSPI) -char *Curl_auth_build_spn(const char *service, const char *host, - const char *realm) -{ - char *spn = NULL; - - /* Generate our SPN */ - if(host && realm) - spn = aprintf("%s/%s@%s", service, host, realm); - else if(host) - spn = aprintf("%s/%s", service, host); - else if(realm) - spn = aprintf("%s@%s", service, realm); - - /* Return our newly allocated SPN */ - return spn; -} -#else -TCHAR *Curl_auth_build_spn(const char *service, const char *host, - const char *realm) -{ - char *utf8_spn = NULL; - TCHAR *tchar_spn = NULL; - - (void) realm; - - /* Note: We could use DsMakeSPN() or DsClientMakeSpnForTargetServer() rather - than doing this ourselves but the first is only available in Windows XP - and Windows Server 2003 and the latter is only available in Windows 2000 - but not Windows95/98/ME or Windows NT4.0 unless the Active Directory - Client Extensions are installed. As such it is far simpler for us to - formulate the SPN instead. */ - - /* Generate our UTF8 based SPN */ - utf8_spn = aprintf("%s/%s", service, host); - if(!utf8_spn) { - return NULL; - } - - /* Allocate our TCHAR based SPN */ - tchar_spn = Curl_convert_UTF8_to_tchar(utf8_spn); - if(!tchar_spn) { - free(utf8_spn); - - return NULL; - } - - /* Release the UTF8 variant when operating with Unicode */ - Curl_unicodefree(utf8_spn); - - /* Return our newly allocated SPN */ - return tchar_spn; -} -#endif /* USE_WINDOWS_SSPI */ - -/* -* Curl_auth_user_contains_domain() -* -* This is used to test if the specified user contains a Windows domain name as -* follows: -* -* User\Domain (Down-level Logon Name) -* User/Domain (curl Down-level format - for compatibility with existing code) -* User@Domain (User Principal Name) -* -* Note: The user name may be empty when using a GSS-API library or Windows SSPI -* as the user and domain are either obtained from the credientals cache when -* using GSS-API or via the currently logged in user's credientals when using -* Windows SSPI. -* -* Parameters: -* -* user [in] - The user name. -* -* Returns TRUE on success; otherwise FALSE. -*/ -bool Curl_auth_user_contains_domain(const char *user) -{ - bool valid = FALSE; - - if(user && *user) { - /* Check we have a domain name or UPN present */ - char *p = strpbrk(user, "\\/@"); - - valid = (p != NULL && p > user && p < user + strlen(user) - 1 ? TRUE : - FALSE); - } -#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) - else - /* User and domain are obtained from the GSS-API credientials cache or the - currently logged in user from Windows */ - valid = TRUE; -#endif - - return valid; -} diff --git a/build/premake/premake5/contrib/curl/lib/vauth/vauth.h b/build/premake/premake5/contrib/curl/lib/vauth/vauth.h deleted file mode 100644 index 9d61228c3b..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vauth/vauth.h +++ /dev/null @@ -1,204 +0,0 @@ -#ifndef HEADER_CURL_VAUTH_H -#define HEADER_CURL_VAUTH_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014 - 2016, Steve Holme, . - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -struct Curl_easy; - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) -struct digestdata; -#endif - -#if defined(USE_NTLM) -struct ntlmdata; -#endif - -#if defined(USE_KERBEROS5) -struct kerberos5data; -#endif - -#if (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) && defined(USE_SPNEGO) -struct negotiatedata; -#endif - -#if defined(USE_WINDOWS_SSPI) -#define GSS_ERROR(status) (status & 0x80000000) -#endif - -/* This is used to build a SPN string */ -#if !defined(USE_WINDOWS_SSPI) -char *Curl_auth_build_spn(const char *service, const char *host, - const char *realm); -#else -TCHAR *Curl_auth_build_spn(const char *service, const char *host, - const char *realm); -#endif - -/* This is used to test if the user contains a Windows domain name */ -bool Curl_auth_user_contains_domain(const char *user); - -/* This is used to generate a base64 encoded PLAIN cleartext message */ -CURLcode Curl_auth_create_plain_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - char **outptr, size_t *outlen); - -/* This is used to generate a base64 encoded LOGIN cleartext message */ -CURLcode Curl_auth_create_login_message(struct Curl_easy *data, - const char *valuep, char **outptr, - size_t *outlen); - -/* This is used to generate a base64 encoded EXTERNAL cleartext message */ -CURLcode Curl_auth_create_external_message(struct Curl_easy *data, - const char *user, char **outptr, - size_t *outlen); - -#if !defined(CURL_DISABLE_CRYPTO_AUTH) -/* This is used to decode a CRAM-MD5 challenge message */ -CURLcode Curl_auth_decode_cram_md5_message(const char *chlg64, char **outptr, - size_t *outlen); - -/* This is used to generate a CRAM-MD5 response message */ -CURLcode Curl_auth_create_cram_md5_message(struct Curl_easy *data, - const char *chlg, - const char *userp, - const char *passwdp, - char **outptr, size_t *outlen); - -/* This is used to evaluate if DIGEST is supported */ -bool Curl_auth_is_digest_supported(void); - -/* This is used to generate a base64 encoded DIGEST-MD5 response message */ -CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, - const char *chlg64, - const char *userp, - const char *passwdp, - const char *service, - char **outptr, size_t *outlen); - -/* This is used to decode a HTTP DIGEST challenge message */ -CURLcode Curl_auth_decode_digest_http_message(const char *chlg, - struct digestdata *digest); - -/* This is used to generate a HTTP DIGEST response message */ -CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const unsigned char *request, - const unsigned char *uri, - struct digestdata *digest, - char **outptr, size_t *outlen); - -/* This is used to clean up the digest specific data */ -void Curl_auth_digest_cleanup(struct digestdata *digest); -#endif /* !CURL_DISABLE_CRYPTO_AUTH */ - -#if defined(USE_NTLM) -/* This is used to evaluate if NTLM is supported */ -bool Curl_auth_is_ntlm_supported(void); - -/* This is used to generate a base64 encoded NTLM type-1 message */ -CURLcode Curl_auth_create_ntlm_type1_message(const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, - size_t *outlen); - -/* This is used to decode a base64 encoded NTLM type-2 message */ -CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data, - const char *type2msg, - struct ntlmdata *ntlm); - -/* This is used to generate a base64 encoded NTLM type-3 message */ -CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - struct ntlmdata *ntlm, - char **outptr, size_t *outlen); - -/* This is used to clean up the NTLM specific data */ -void Curl_auth_ntlm_cleanup(struct ntlmdata *ntlm); -#endif /* USE_NTLM */ - -/* This is used to generate a base64 encoded OAuth 2.0 message */ -CURLcode Curl_auth_create_oauth_bearer_message(struct Curl_easy *data, - const char *user, - const char *host, - const long port, - const char *bearer, - char **outptr, size_t *outlen); -#if defined(USE_KERBEROS5) -/* This is used to evaluate if GSSAPI (Kerberos V5) is supported */ -bool Curl_auth_is_gssapi_supported(void); - -/* This is used to generate a base64 encoded GSSAPI (Kerberos V5) user token - message */ -CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data, - const char *userp, - const char *passwdp, - const char *service, - const char *host, - const bool mutual, - const char *chlg64, - struct kerberos5data *krb5, - char **outptr, size_t *outlen); - -/* This is used to generate a base64 encoded GSSAPI (Kerberos V5) security - token message */ -CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data, - const char *input, - struct kerberos5data *krb5, - char **outptr, - size_t *outlen); - -/* This is used to clean up the GSSAPI specific data */ -void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5); -#endif /* USE_KERBEROS5 */ - -#if defined(USE_SPNEGO) -/* This is used to evaluate if SPNEGO (Negotiate) is supported */ -bool Curl_auth_is_spnego_supported(void); - -/* This is used to decode a base64 encoded SPNEGO (Negotiate) challenge - message */ -CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data, - const char *user, - const char *passwood, - const char *service, - const char *host, - const char *chlg64, - struct negotiatedata *nego); - -/* This is used to generate a base64 encoded SPNEGO (Negotiate) response - message */ -CURLcode Curl_auth_create_spnego_message(struct Curl_easy *data, - struct negotiatedata *nego, - char **outptr, size_t *outlen); - -/* This is used to clean up the SPNEGO specifiec data */ -void Curl_auth_spnego_cleanup(struct negotiatedata *nego); - -#endif /* USE_SPNEGO */ - -#endif /* HEADER_CURL_VAUTH_H */ diff --git a/build/premake/premake5/contrib/curl/lib/version.c b/build/premake/premake5/contrib/curl/lib/version.c deleted file mode 100644 index 3d17768131..0000000000 --- a/build/premake/premake5/contrib/curl/lib/version.c +++ /dev/null @@ -1,399 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include -#include "urldata.h" -#include "vtls/vtls.h" -#include "http2.h" -#include "curl_printf.h" - -#ifdef USE_ARES -# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \ - (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) -# define CARES_STATICLIB -# endif -# include -#endif - -#ifdef USE_LIBIDN2 -#include -#endif - -#ifdef USE_LIBPSL -#include -#endif - -#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS) -#include -#endif - -#ifdef USE_LIBRTMP -#include -#endif - -#ifdef USE_LIBSSH2 -#include -#endif - -#ifdef HAVE_LIBSSH2_VERSION -/* get it run-time if possible */ -#define CURL_LIBSSH2_VERSION libssh2_version(0) -#else -/* use build-time if run-time not possible */ -#define CURL_LIBSSH2_VERSION LIBSSH2_VERSION -#endif - -void Curl_version_init(void); - -/* For thread safety purposes this function is called by global_init so that - the static data in both version functions is initialized. */ -void Curl_version_init(void) -{ - curl_version(); - curl_version_info(CURLVERSION_NOW); -} - -char *curl_version(void) -{ - static bool initialized; - static char version[200]; - char *ptr = version; - size_t len; - size_t left = sizeof(version); - - if(initialized) - return version; - - strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION); - len = strlen(ptr); - left -= len; - ptr += len; - - if(left > 1) { - len = Curl_ssl_version(ptr + 1, left - 1); - - if(len > 0) { - *ptr = ' '; - left -= ++len; - ptr += len; - } - } - -#ifdef HAVE_LIBZ - len = snprintf(ptr, left, " zlib/%s", zlibVersion()); - left -= len; - ptr += len; -#endif -#ifdef USE_ARES - /* this function is only present in c-ares, not in the original ares */ - len = snprintf(ptr, left, " c-ares/%s", ares_version(NULL)); - left -= len; - ptr += len; -#endif -#ifdef USE_LIBIDN2 - if(idn2_check_version(IDN2_VERSION)) { - len = snprintf(ptr, left, " libidn2/%s", idn2_check_version(NULL)); - left -= len; - ptr += len; - } -#endif -#ifdef USE_LIBPSL - len = snprintf(ptr, left, " libpsl/%s", psl_get_version()); - left -= len; - ptr += len; -#endif -#ifdef USE_WIN32_IDN - len = snprintf(ptr, left, " WinIDN"); - left -= len; - ptr += len; -#endif -#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS) -#ifdef _LIBICONV_VERSION - len = snprintf(ptr, left, " iconv/%d.%d", - _LIBICONV_VERSION >> 8, _LIBICONV_VERSION & 255); -#else - /* version unknown */ - len = snprintf(ptr, left, " iconv"); -#endif /* _LIBICONV_VERSION */ - left -= len; - ptr += len; -#endif -#ifdef USE_LIBSSH2 - len = snprintf(ptr, left, " libssh2/%s", CURL_LIBSSH2_VERSION); - left -= len; - ptr += len; -#endif -#ifdef USE_NGHTTP2 - len = Curl_http2_ver(ptr, left); - left -= len; - ptr += len; -#endif -#ifdef USE_LIBRTMP - { - char suff[2]; - if(RTMP_LIB_VERSION & 0xff) { - suff[0] = (RTMP_LIB_VERSION & 0xff) + 'a' - 1; - suff[1] = '\0'; - } - else - suff[0] = '\0'; - - snprintf(ptr, left, " librtmp/%d.%d%s", - RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, - suff); -/* - If another lib version is added below this one, this code would - also have to do: - - len = what snprintf() returned - - left -= len; - ptr += len; -*/ - } -#endif - - initialized = true; - return version; -} - -/* data for curl_version_info - - Keep the list sorted alphabetically. It is also written so that each - protocol line has its own #if line to make things easier on the eye. - */ - -static const char * const protocols[] = { -#ifndef CURL_DISABLE_DICT - "dict", -#endif -#ifndef CURL_DISABLE_FILE - "file", -#endif -#ifndef CURL_DISABLE_FTP - "ftp", -#endif -#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP) - "ftps", -#endif -#ifndef CURL_DISABLE_GOPHER - "gopher", -#endif -#ifndef CURL_DISABLE_HTTP - "http", -#endif -#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP) - "https", -#endif -#ifndef CURL_DISABLE_IMAP - "imap", -#endif -#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP) - "imaps", -#endif -#ifndef CURL_DISABLE_LDAP - "ldap", -#if !defined(CURL_DISABLE_LDAPS) && \ - ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \ - (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))) - "ldaps", -#endif -#endif -#ifndef CURL_DISABLE_POP3 - "pop3", -#endif -#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3) - "pop3s", -#endif -#ifdef USE_LIBRTMP - "rtmp", -#endif -#ifndef CURL_DISABLE_RTSP - "rtsp", -#endif -#ifdef USE_LIBSSH2 - "scp", -#endif -#ifdef USE_LIBSSH2 - "sftp", -#endif -#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \ - (CURL_SIZEOF_CURL_OFF_T > 4) && \ - (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)) - "smb", -# ifdef USE_SSL - "smbs", -# endif -#endif -#ifndef CURL_DISABLE_SMTP - "smtp", -#endif -#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP) - "smtps", -#endif -#ifndef CURL_DISABLE_TELNET - "telnet", -#endif -#ifndef CURL_DISABLE_TFTP - "tftp", -#endif - - NULL -}; - -static curl_version_info_data version_info = { - CURLVERSION_NOW, - LIBCURL_VERSION, - LIBCURL_VERSION_NUM, - OS, /* as found by configure or set by hand at build-time */ - 0 /* features is 0 by default */ -#ifdef ENABLE_IPV6 - | CURL_VERSION_IPV6 -#endif -#ifdef USE_SSL - | CURL_VERSION_SSL -#endif -#ifdef USE_NTLM - | CURL_VERSION_NTLM -#endif -#if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM) && \ - defined(NTLM_WB_ENABLED) - | CURL_VERSION_NTLM_WB -#endif -#ifdef USE_SPNEGO - | CURL_VERSION_SPNEGO -#endif -#ifdef USE_KERBEROS5 - | CURL_VERSION_KERBEROS5 -#endif -#ifdef HAVE_GSSAPI - | CURL_VERSION_GSSAPI -#endif -#ifdef USE_WINDOWS_SSPI - | CURL_VERSION_SSPI -#endif -#ifdef HAVE_LIBZ - | CURL_VERSION_LIBZ -#endif -#ifdef DEBUGBUILD - | CURL_VERSION_DEBUG -#endif -#ifdef CURLDEBUG - | CURL_VERSION_CURLDEBUG -#endif -#ifdef CURLRES_ASYNCH - | CURL_VERSION_ASYNCHDNS -#endif -#if (CURL_SIZEOF_CURL_OFF_T > 4) && \ - ( (SIZEOF_OFF_T > 4) || defined(USE_WIN32_LARGE_FILES) ) - | CURL_VERSION_LARGEFILE -#endif -#if defined(CURL_DOES_CONVERSIONS) - | CURL_VERSION_CONV -#endif -#if defined(USE_TLS_SRP) - | CURL_VERSION_TLSAUTH_SRP -#endif -#if defined(USE_NGHTTP2) - | CURL_VERSION_HTTP2 -#endif -#if defined(USE_UNIX_SOCKETS) - | CURL_VERSION_UNIX_SOCKETS -#endif -#if defined(USE_LIBPSL) - | CURL_VERSION_PSL -#endif -#if defined(HTTPS_PROXY_SUPPORT) - | CURL_VERSION_HTTPS_PROXY -#endif - , - NULL, /* ssl_version */ - 0, /* ssl_version_num, this is kept at zero */ - NULL, /* zlib_version */ - protocols, - NULL, /* c-ares version */ - 0, /* c-ares version numerical */ - NULL, /* libidn version */ - 0, /* iconv version */ - NULL, /* ssh lib version */ -}; - -curl_version_info_data *curl_version_info(CURLversion stamp) -{ - static bool initialized; -#ifdef USE_LIBSSH2 - static char ssh_buffer[80]; -#endif -#ifdef USE_SSL - static char ssl_buffer[80]; -#endif - - if(initialized) - return &version_info; - -#ifdef USE_SSL - Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer)); - version_info.ssl_version = ssl_buffer; -#endif - -#ifdef HAVE_LIBZ - version_info.libz_version = zlibVersion(); - /* libz left NULL if non-existing */ -#endif -#ifdef USE_ARES - { - int aresnum; - version_info.ares = ares_version(&aresnum); - version_info.ares_num = aresnum; - } -#endif -#ifdef USE_LIBIDN2 - /* This returns a version string if we use the given version or later, - otherwise it returns NULL */ - version_info.libidn = idn2_check_version(IDN2_VERSION); - if(version_info.libidn) - version_info.features |= CURL_VERSION_IDN; -#elif defined(USE_WIN32_IDN) - version_info.features |= CURL_VERSION_IDN; -#endif - -#if defined(HAVE_ICONV) && defined(CURL_DOES_CONVERSIONS) -#ifdef _LIBICONV_VERSION - version_info.iconv_ver_num = _LIBICONV_VERSION; -#else - /* version unknown */ - version_info.iconv_ver_num = -1; -#endif /* _LIBICONV_VERSION */ -#endif - -#ifdef USE_LIBSSH2 - snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh2/%s", LIBSSH2_VERSION); - version_info.libssh_version = ssh_buffer; -#endif - - (void)stamp; /* avoid compiler warnings, we don't use this */ - - initialized = true; - return &version_info; -} diff --git a/build/premake/premake5/contrib/curl/lib/vtls/axtls.c b/build/premake/premake5/contrib/curl/lib/vtls/axtls.c deleted file mode 100644 index 1de758b0c2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/axtls.c +++ /dev/null @@ -1,700 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010, DirecTV, Contact: Eric Hu, . - * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all axTLS-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - */ - -#include "curl_setup.h" - -#ifdef USE_AXTLS -#include -#include -#include "axtls.h" - -#include "sendf.h" -#include "inet_pton.h" -#include "vtls.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "curl_printf.h" -#include "hostcheck.h" -#include - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - - -/* Global axTLS init, called from Curl_ssl_init() */ -int Curl_axtls_init(void) -{ -/* axTLS has no global init. Everything is done through SSL and SSL_CTX - * structs stored in connectdata structure. Perhaps can move to axtls.h. - */ - return 1; -} - -int Curl_axtls_cleanup(void) -{ - /* axTLS has no global cleanup. Perhaps can move this to axtls.h. */ - return 1; -} - -static CURLcode map_error_to_curl(int axtls_err) -{ - switch(axtls_err) { - case SSL_ERROR_NOT_SUPPORTED: - case SSL_ERROR_INVALID_VERSION: - case -70: /* protocol version alert from server */ - return CURLE_UNSUPPORTED_PROTOCOL; - break; - case SSL_ERROR_NO_CIPHER: - return CURLE_SSL_CIPHER; - break; - case SSL_ERROR_BAD_CERTIFICATE: /* this may be bad server cert too */ - case SSL_ERROR_NO_CERT_DEFINED: - case -42: /* bad certificate alert from server */ - case -43: /* unsupported cert alert from server */ - case -44: /* cert revoked alert from server */ - case -45: /* cert expired alert from server */ - case -46: /* cert unknown alert from server */ - return CURLE_SSL_CERTPROBLEM; - break; - case SSL_X509_ERROR(X509_NOT_OK): - case SSL_X509_ERROR(X509_VFY_ERROR_NO_TRUSTED_CERT): - case SSL_X509_ERROR(X509_VFY_ERROR_BAD_SIGNATURE): - case SSL_X509_ERROR(X509_VFY_ERROR_NOT_YET_VALID): - case SSL_X509_ERROR(X509_VFY_ERROR_EXPIRED): - case SSL_X509_ERROR(X509_VFY_ERROR_SELF_SIGNED): - case SSL_X509_ERROR(X509_VFY_ERROR_INVALID_CHAIN): - case SSL_X509_ERROR(X509_VFY_ERROR_UNSUPPORTED_DIGEST): - case SSL_X509_ERROR(X509_INVALID_PRIV_KEY): - return CURLE_PEER_FAILED_VERIFICATION; - break; - case -48: /* unknown ca alert from server */ - return CURLE_SSL_CACERT; - break; - case -49: /* access denied alert from server */ - return CURLE_REMOTE_ACCESS_DENIED; - break; - case SSL_ERROR_CONN_LOST: - case SSL_ERROR_SOCK_SETUP_FAILURE: - case SSL_ERROR_INVALID_HANDSHAKE: - case SSL_ERROR_INVALID_PROT_MSG: - case SSL_ERROR_INVALID_HMAC: - case SSL_ERROR_INVALID_SESSION: - case SSL_ERROR_INVALID_KEY: /* it's too bad this doesn't map better */ - case SSL_ERROR_FINISHED_INVALID: - case SSL_ERROR_NO_CLIENT_RENOG: - default: - return CURLE_SSL_CONNECT_ERROR; - break; - } -} - -static Curl_recv axtls_recv; -static Curl_send axtls_send; - -static void free_ssl_structs(struct ssl_connect_data *connssl) -{ - if(connssl->ssl) { - ssl_free(connssl->ssl); - connssl->ssl = NULL; - } - if(connssl->ssl_ctx) { - ssl_ctx_free(connssl->ssl_ctx); - connssl->ssl_ctx = NULL; - } -} - -/* - * For both blocking and non-blocking connects, this function sets up the - * ssl context and state. This function is called after the TCP connect - * has completed. - */ -static CURLcode connect_prep(struct connectdata *conn, int sockindex) -{ - struct Curl_easy *data = conn->data; - SSL_CTX *ssl_ctx; - SSL *ssl = NULL; - int cert_types[] = {SSL_OBJ_X509_CERT, SSL_OBJ_PKCS12, 0}; - int key_types[] = {SSL_OBJ_RSA_KEY, SSL_OBJ_PKCS8, SSL_OBJ_PKCS12, 0}; - int i, ssl_fcn_return; - - /* Assuming users will not compile in custom key/cert to axTLS. - * Also, even for blocking connects, use axTLS non-blocking feature. - */ - uint32_t client_option = SSL_NO_DEFAULT_KEY | - SSL_SERVER_VERIFY_LATER | - SSL_CONNECT_IN_PARTS; - - if(conn->ssl[sockindex].state == ssl_connection_complete) - /* to make us tolerant against being called more than once for the - same connection */ - return CURLE_OK; - - /* axTLS only supports TLSv1 */ - /* check to see if we've been told to use an explicit SSL/TLS version */ - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - break; - default: - failf(data, "axTLS only supports TLS 1.0 and 1.1, " - "and it cannot be specified which one to use"); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef AXTLSDEBUG - client_option |= SSL_DISPLAY_STATES | SSL_DISPLAY_RSA | SSL_DISPLAY_CERTS; -#endif /* AXTLSDEBUG */ - - /* Allocate an SSL_CTX struct */ - ssl_ctx = ssl_ctx_new(client_option, SSL_DEFAULT_CLNT_SESS); - if(ssl_ctx == NULL) { - failf(data, "unable to create client SSL context"); - return CURLE_SSL_CONNECT_ERROR; - } - - conn->ssl[sockindex].ssl_ctx = ssl_ctx; - conn->ssl[sockindex].ssl = NULL; - - /* Load the trusted CA cert bundle file */ - if(SSL_CONN_CONFIG(CAfile)) { - if(ssl_obj_load(ssl_ctx, SSL_OBJ_X509_CACERT, - SSL_CONN_CONFIG(CAfile), NULL) != SSL_OK) { - infof(data, "error reading ca cert file %s \n", - SSL_CONN_CONFIG(CAfile)); - if(SSL_CONN_CONFIG(verifypeer)) { - return CURLE_SSL_CACERT_BADFILE; - } - } - else - infof(data, "found certificates in %s\n", SSL_CONN_CONFIG(CAfile)); - } - - /* gtls.c tasks we're skipping for now: - * 1) certificate revocation list checking - * 2) dns name assignment to host - * 3) set protocol priority. axTLS is TLSv1 only, so can probably ignore - * 4) set certificate priority. axTLS ignores type and sends certs in - * order added. can probably ignore this. - */ - - /* Load client certificate */ - if(SSL_SET_OPTION(cert)) { - i=0; - /* Instead of trying to analyze cert type here, let axTLS try them all. */ - while(cert_types[i] != 0) { - ssl_fcn_return = ssl_obj_load(ssl_ctx, cert_types[i], - SSL_SET_OPTION(cert), NULL); - if(ssl_fcn_return == SSL_OK) { - infof(data, "successfully read cert file %s \n", - SSL_SET_OPTION(cert)); - break; - } - i++; - } - /* Tried all cert types, none worked. */ - if(cert_types[i] == 0) { - failf(data, "%s is not x509 or pkcs12 format", - SSL_SET_OPTION(cert)); - return CURLE_SSL_CERTPROBLEM; - } - } - - /* Load client key. - If a pkcs12 file successfully loaded a cert, then there's nothing to do - because the key has already been loaded. */ - if(SSL_SET_OPTION(key) && cert_types[i] != SSL_OBJ_PKCS12) { - i=0; - /* Instead of trying to analyze key type here, let axTLS try them all. */ - while(key_types[i] != 0) { - ssl_fcn_return = ssl_obj_load(ssl_ctx, key_types[i], - SSL_SET_OPTION(key), NULL); - if(ssl_fcn_return == SSL_OK) { - infof(data, "successfully read key file %s \n", - SSL_SET_OPTION(key)); - break; - } - i++; - } - /* Tried all key types, none worked. */ - if(key_types[i] == 0) { - failf(data, "Failure: %s is not a supported key file", - SSL_SET_OPTION(key)); - return CURLE_SSL_CONNECT_ERROR; - } - } - - /* gtls.c does more here that is being left out for now - * 1) set session credentials. can probably ignore since axtls puts this - * info in the ssl_ctx struct - * 2) setting up callbacks. these seem gnutls specific - */ - - if(data->set.general_ssl.sessionid) { - const uint8_t *ssl_sessionid; - size_t ssl_idsize; - - /* In axTLS, handshaking happens inside ssl_client_new. */ - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, (void **) &ssl_sessionid, &ssl_idsize, - sockindex)) { - /* we got a session id, use it! */ - infof(data, "SSL re-using session ID\n"); - ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex], - ssl_sessionid, (uint8_t)ssl_idsize, NULL); - } - Curl_ssl_sessionid_unlock(conn); - } - - if(!ssl) - ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex], NULL, 0, NULL); - - conn->ssl[sockindex].ssl = ssl; - return CURLE_OK; -} - -/* - * For both blocking and non-blocking connects, this function finalizes the - * SSL connection. - */ -static CURLcode connect_finish(struct connectdata *conn, int sockindex) -{ - struct Curl_easy *data = conn->data; - SSL *ssl = conn->ssl[sockindex].ssl; - const char *peer_CN; - uint32_t dns_altname_index; - const char *dns_altname; - int8_t found_subject_alt_names = 0; - int8_t found_subject_alt_name_matching_conn = 0; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const char * const dispname = SSL_IS_PROXY() ? - conn->http_proxy.host.dispname : conn->host.dispname; - - /* Here, gtls.c gets the peer certificates and fails out depending on - * settings in "data." axTLS api doesn't have get cert chain fcn, so omit? - */ - - /* Verify server's certificate */ - if(SSL_CONN_CONFIG(verifypeer)) { - if(ssl_verify_cert(ssl) != SSL_OK) { - Curl_axtls_close(conn, sockindex); - failf(data, "server cert verify failed"); - return CURLE_PEER_FAILED_VERIFICATION; - } - } - else - infof(data, "\t server certificate verification SKIPPED\n"); - - /* Here, gtls.c does issuer verification. axTLS has no straightforward - * equivalent, so omitting for now.*/ - - /* Here, gtls.c does the following - * 1) x509 hostname checking per RFC2818. axTLS doesn't support this, but - * it seems useful. This is now implemented, by Oscar Koeroo - * 2) checks cert validity based on time. axTLS does this in ssl_verify_cert - * 3) displays a bunch of cert information. axTLS doesn't support most of - * this, but a couple fields are available. - */ - - /* There is no (DNS) Altnames count in the version 1.4.8 API. There is a - risk of an inifite loop */ - for(dns_altname_index = 0; ; dns_altname_index++) { - dns_altname = ssl_get_cert_subject_alt_dnsname(ssl, dns_altname_index); - if(dns_altname == NULL) { - break; - } - found_subject_alt_names = 1; - - infof(data, "\tComparing subject alt name DNS with hostname: %s <-> %s\n", - dns_altname, hostname); - if(Curl_cert_hostcheck(dns_altname, hostname)) { - found_subject_alt_name_matching_conn = 1; - break; - } - } - - /* RFC2818 checks */ - if(found_subject_alt_names && !found_subject_alt_name_matching_conn) { - if(SSL_CONN_CONFIG(verifyhost)) { - /* Break connection ! */ - Curl_axtls_close(conn, sockindex); - failf(data, "\tsubjectAltName(s) do not match %s\n", dispname); - return CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "\tsubjectAltName(s) do not match %s\n", dispname); - } - else if(found_subject_alt_names == 0) { - /* Per RFC2818, when no Subject Alt Names were available, examine the peer - CN as a legacy fallback */ - peer_CN = ssl_get_cert_dn(ssl, SSL_X509_CERT_COMMON_NAME); - if(peer_CN == NULL) { - if(SSL_CONN_CONFIG(verifyhost)) { - Curl_axtls_close(conn, sockindex); - failf(data, "unable to obtain common name from peer certificate"); - return CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "unable to obtain common name from peer certificate"); - } - else { - if(!Curl_cert_hostcheck((const char *)peer_CN, hostname)) { - if(SSL_CONN_CONFIG(verifyhost)) { - /* Break connection ! */ - Curl_axtls_close(conn, sockindex); - failf(data, "\tcommon name \"%s\" does not match \"%s\"\n", - peer_CN, dispname); - return CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "\tcommon name \"%s\" does not match \"%s\"\n", - peer_CN, dispname); - } - } - } - - /* General housekeeping */ - conn->ssl[sockindex].state = ssl_connection_complete; - conn->recv[sockindex] = axtls_recv; - conn->send[sockindex] = axtls_send; - - /* Put our freshly minted SSL session in cache */ - if(data->set.general_ssl.sessionid) { - const uint8_t *ssl_sessionid = ssl_get_session_id(ssl); - size_t ssl_idsize = ssl_get_session_id_size(ssl); - Curl_ssl_sessionid_lock(conn); - if(Curl_ssl_addsessionid(conn, (void *) ssl_sessionid, ssl_idsize, - sockindex) != CURLE_OK) - infof(data, "failed to add session to cache\n"); - Curl_ssl_sessionid_unlock(conn); - } - - return CURLE_OK; -} - -/* - * Use axTLS's non-blocking connection feature to open an SSL connection. - * This is called after a TCP connection is already established. - */ -CURLcode Curl_axtls_connect_nonblocking( - struct connectdata *conn, - int sockindex, - bool *done) -{ - CURLcode conn_step; - int ssl_fcn_return; - int i; - - *done = FALSE; - /* connectdata is calloc'd and connecting_state is only changed in this - function, so this is safe, as the state is effectively initialized. */ - if(conn->ssl[sockindex].connecting_state == ssl_connect_1) { - conn_step = connect_prep(conn, sockindex); - if(conn_step != CURLE_OK) { - Curl_axtls_close(conn, sockindex); - return conn_step; - } - conn->ssl[sockindex].connecting_state = ssl_connect_2; - } - - if(conn->ssl[sockindex].connecting_state == ssl_connect_2) { - /* Check to make sure handshake was ok. */ - if(ssl_handshake_status(conn->ssl[sockindex].ssl) != SSL_OK) { - /* Loop to perform more work in between sleeps. This is work around the - fact that axtls does not expose any knowledge about when work needs - to be performed. This can save ~25% of time on SSL handshakes. */ - for(i=0; i<5; i++) { - ssl_fcn_return = ssl_read(conn->ssl[sockindex].ssl, NULL); - if(ssl_fcn_return < 0) { - Curl_axtls_close(conn, sockindex); - ssl_display_error(ssl_fcn_return); /* goes to stdout. */ - return map_error_to_curl(ssl_fcn_return); - } - return CURLE_OK; - } - } - infof(conn->data, "handshake completed successfully\n"); - conn->ssl[sockindex].connecting_state = ssl_connect_3; - } - - if(conn->ssl[sockindex].connecting_state == ssl_connect_3) { - conn_step = connect_finish(conn, sockindex); - if(conn_step != CURLE_OK) { - Curl_axtls_close(conn, sockindex); - return conn_step; - } - - /* Reset connect state */ - conn->ssl[sockindex].connecting_state = ssl_connect_1; - - *done = TRUE; - return CURLE_OK; - } - - /* Unrecognized state. Things are very bad. */ - conn->ssl[sockindex].state = ssl_connection_none; - conn->ssl[sockindex].connecting_state = ssl_connect_1; - /* Return value perhaps not strictly correct, but distinguishes the issue.*/ - return CURLE_BAD_FUNCTION_ARGUMENT; -} - - -/* - * This function is called after the TCP connect has completed. Setup the TLS - * layer and do all necessary magic for a blocking connect. - */ -CURLcode -Curl_axtls_connect(struct connectdata *conn, - int sockindex) - -{ - struct Curl_easy *data = conn->data; - CURLcode conn_step = connect_prep(conn, sockindex); - int ssl_fcn_return; - SSL *ssl = conn->ssl[sockindex].ssl; - long timeout_ms; - - if(conn_step != CURLE_OK) { - Curl_axtls_close(conn, sockindex); - return conn_step; - } - - /* Check to make sure handshake was ok. */ - while(ssl_handshake_status(ssl) != SSL_OK) { - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - ssl_fcn_return = ssl_read(ssl, NULL); - if(ssl_fcn_return < 0) { - Curl_axtls_close(conn, sockindex); - ssl_display_error(ssl_fcn_return); /* goes to stdout. */ - return map_error_to_curl(ssl_fcn_return); - } - /* TODO: avoid polling */ - Curl_wait_ms(10); - } - infof(conn->data, "handshake completed successfully\n"); - - conn_step = connect_finish(conn, sockindex); - if(conn_step != CURLE_OK) { - Curl_axtls_close(conn, sockindex); - return conn_step; - } - - return CURLE_OK; -} - -/* return number of sent (non-SSL) bytes */ -static ssize_t axtls_send(struct connectdata *conn, - int sockindex, - const void *mem, - size_t len, - CURLcode *err) -{ - /* ssl_write() returns 'int' while write() and send() returns 'size_t' */ - int rc = ssl_write(conn->ssl[sockindex].ssl, mem, (int)len); - - infof(conn->data, " axtls_send\n"); - - if(rc < 0) { - *err = map_error_to_curl(rc); - rc = -1; /* generic error code for send failure */ - } - - *err = CURLE_OK; - return rc; -} - -void Curl_axtls_close(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - infof(conn->data, " Curl_axtls_close\n"); - - /* line from openssl.c: (void)SSL_shutdown(connssl->ssl); - axTLS compat layer does nothing for SSL_shutdown */ - - /* The following line is from openssl.c. There seems to be no axTLS - equivalent. ssl_free and ssl_ctx_free close things. - SSL_set_connect_state(connssl->handle); */ - - free_ssl_structs(connssl); -} - -/* - * This function is called to shut down the SSL layer but keep the - * socket open (CCC - Clear Command Channel) - */ -int Curl_axtls_shutdown(struct connectdata *conn, int sockindex) -{ - /* Outline taken from openssl.c since functions are in axTLS compat layer. - axTLS's error set is much smaller, so a lot of error-handling was removed. - */ - int retval = 0; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - uint8_t *buf; - ssize_t nread; - - infof(conn->data, " Curl_axtls_shutdown\n"); - - /* This has only been tested on the proftpd server, and the mod_tls code - sends a close notify alert without waiting for a close notify alert in - response. Thus we wait for a close notify alert from the server, but - we do not send one. Let's hope other servers do the same... */ - - /* axTLS compat layer does nothing for SSL_shutdown, so we do nothing too - if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE) - (void)SSL_shutdown(connssl->ssl); - */ - - if(connssl->ssl) { - int what = SOCKET_READABLE(conn->sock[sockindex], SSL_SHUTDOWN_TIMEOUT); - if(what > 0) { - /* Something to read, let's do it and hope that it is the close - notify alert from the server. buf is managed internally by - axTLS and will be released upon calling ssl_free via - free_ssl_structs. */ - nread = (ssize_t)ssl_read(connssl->ssl, &buf); - - if(nread < SSL_OK) { - failf(data, "close notify alert not received during shutdown"); - retval = -1; - } - } - else if(0 == what) { - /* timeout */ - failf(data, "SSL shutdown timeout"); - } - else { - /* anything that gets here is fatally bad */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - retval = -1; - } - - free_ssl_structs(connssl); - } - return retval; -} - -static ssize_t axtls_recv(struct connectdata *conn, /* connection data */ - int num, /* socketindex */ - char *buf, /* store read data here */ - size_t buffersize, /* max amount to read */ - CURLcode *err) -{ - struct ssl_connect_data *connssl = &conn->ssl[num]; - ssize_t ret = 0; - uint8_t *read_buf; - - infof(conn->data, " axtls_recv\n"); - - *err = CURLE_OK; - if(connssl) { - ret = ssl_read(connssl->ssl, &read_buf); - if(ret > SSL_OK) { - /* ssl_read returns SSL_OK if there is more data to read, so if it is - larger, then all data has been read already. */ - memcpy(buf, read_buf, - (size_t)ret > buffersize ? buffersize : (size_t)ret); - } - else if(ret == SSL_OK) { - /* more data to be read, signal caller to call again */ - *err = CURLE_AGAIN; - ret = -1; - } - else if(ret == -3) { - /* With patched axTLS, SSL_CLOSE_NOTIFY=-3. Hard-coding until axTLS - team approves proposed fix. */ - Curl_axtls_close(conn, num); - } - else { - failf(conn->data, "axTLS recv error (%d)", ret); - *err = map_error_to_curl((int) ret); - ret = -1; - } - } - - return ret; -} - -/* - * Return codes: - * 1 means the connection is still in place - * 0 means the connection has been closed - * -1 means the connection status is unknown - */ -int Curl_axtls_check_cxn(struct connectdata *conn) -{ - /* openssl.c line: rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1); - axTLS compat layer always returns the last argument, so connection is - always alive? */ - - infof(conn->data, " Curl_axtls_check_cxn\n"); - return 1; /* connection still in place */ -} - -void Curl_axtls_session_free(void *ptr) -{ - (void)ptr; - /* free the ID */ - /* both openssl.c and gtls.c do something here, but axTLS's OpenSSL - compatibility layer does nothing, so we do nothing too. */ -} - -size_t Curl_axtls_version(char *buffer, size_t size) -{ - return snprintf(buffer, size, "axTLS/%s", ssl_version()); -} - -CURLcode Curl_axtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) -{ - static bool ssl_seeded = FALSE; - (void)data; - if(!ssl_seeded) { - ssl_seeded = TRUE; - /* Initialize the seed if not already done. This call is not exactly thread - * safe (and neither is the ssl_seeded check), but the worst effect of a - * race condition is that some global resources will leak. */ - RNG_initialize(); - } - get_random((int)length, entropy); - return CURLE_OK; -} - -#endif /* USE_AXTLS */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/axtls.h b/build/premake/premake5/contrib/curl/lib/vtls/axtls.h deleted file mode 100644 index 53797eadbb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/axtls.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef HEADER_CURL_AXTLS_H -#define HEADER_CURL_AXTLS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010, DirecTV, Contact: Eric Hu - * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifdef USE_AXTLS -#include "curl/curl.h" -#include "urldata.h" - -int Curl_axtls_init(void); -int Curl_axtls_cleanup(void); -CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_axtls_connect_nonblocking( - struct connectdata *conn, - int sockindex, - bool *done); - - /* close a SSL connection */ -void Curl_axtls_close(struct connectdata *conn, int sockindex); - -void Curl_axtls_session_free(void *ptr); -size_t Curl_axtls_version(char *buffer, size_t size); -int Curl_axtls_shutdown(struct connectdata *conn, int sockindex); -int Curl_axtls_check_cxn(struct connectdata *conn); -CURLcode Curl_axtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); - -/* Set the API backend definition to axTLS */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS - -/* API setup for axTLS */ -#define curlssl_init Curl_axtls_init -#define curlssl_cleanup Curl_axtls_cleanup -#define curlssl_connect Curl_axtls_connect -#define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking -#define curlssl_session_free(x) Curl_axtls_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_axtls_close -#define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_axtls_version -#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) -#define curlssl_random(x,y,z) Curl_axtls_random(x,y,z) - -#endif /* USE_AXTLS */ -#endif /* HEADER_CURL_AXTLS_H */ - diff --git a/build/premake/premake5/contrib/curl/lib/vtls/cyassl.c b/build/premake/premake5/contrib/curl/lib/vtls/cyassl.c deleted file mode 100644 index 5e5947ce0d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/cyassl.c +++ /dev/null @@ -1,947 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all CyaSSL-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - * - */ - -#include "curl_setup.h" - -#ifdef USE_CYASSL - -#define WOLFSSL_OPTIONS_IGNORE_SYS -/* CyaSSL's version.h, which should contain only the version, should come -before all other CyaSSL includes and be immediately followed by build config -aka options.h. https://curl.haxx.se/mail/lib-2015-04/0069.html */ -#include -#if defined(HAVE_CYASSL_OPTIONS_H) && (LIBCYASSL_VERSION_HEX > 0x03004008) -#if defined(CYASSL_API) || defined(WOLFSSL_API) -/* Safety measure. If either is defined some API include was already included -and that's a problem since options.h hasn't been included yet. */ -#error "CyaSSL API was included before the CyaSSL build options." -#endif -#include -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" -#include "vtls.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "strcase.h" -#include "x509asn1.h" -#include "curl_printf.h" - -#include -#ifdef HAVE_CYASSL_ERROR_SSL_H -#include -#else -#include -#endif -#include -#include - -#include "cyassl.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -#if LIBCYASSL_VERSION_HEX < 0x02007002 /* < 2.7.2 */ -#define CYASSL_MAX_ERROR_SZ 80 -#endif - -/* To determine what functions are available we rely on one or both of: - - the user's options.h generated by CyaSSL/wolfSSL - - the symbols detected by curl's configure - Since they are markedly different from one another, and one or the other may - not be available, we do some checking below to bring things in sync. */ - -/* HAVE_ALPN is wolfSSL's build time symbol for enabling ALPN in options.h. */ -#ifndef HAVE_ALPN -#ifdef HAVE_WOLFSSL_USEALPN -#define HAVE_ALPN -#endif -#endif - -/* WOLFSSL_ALLOW_SSLV3 is wolfSSL's build time symbol for enabling SSLv3 in - options.h, but is only seen in >= 3.6.6 since that's when they started - disabling SSLv3 by default. */ -#ifndef WOLFSSL_ALLOW_SSLV3 -#if (LIBCYASSL_VERSION_HEX < 0x03006006) || \ - defined(HAVE_WOLFSSLV3_CLIENT_METHOD) -#define WOLFSSL_ALLOW_SSLV3 -#endif -#endif - -/* HAVE_SUPPORTED_CURVES is wolfSSL's build time symbol for enabling the ECC - supported curve extension in options.h. Note ECC is enabled separately. */ -#ifndef HAVE_SUPPORTED_CURVES -#if defined(HAVE_CYASSL_CTX_USESUPPORTEDCURVE) || \ - defined(HAVE_WOLFSSL_CTX_USESUPPORTEDCURVE) -#define HAVE_SUPPORTED_CURVES -#endif -#endif - -static Curl_recv cyassl_recv; -static Curl_send cyassl_send; - - -static int do_file_type(const char *type) -{ - if(!type || !type[0]) - return SSL_FILETYPE_PEM; - if(strcasecompare(type, "PEM")) - return SSL_FILETYPE_PEM; - if(strcasecompare(type, "DER")) - return SSL_FILETYPE_ASN1; - return -1; -} - -/* - * This function loads all the client/CA certificates and CRLs. Setup the TLS - * layer and do all necessary magic. - */ -static CURLcode -cyassl_connect_step1(struct connectdata *conn, - int sockindex) -{ - char error_buffer[CYASSL_MAX_ERROR_SZ]; - char *ciphers; - struct Curl_easy *data = conn->data; - struct ssl_connect_data* conssl = &conn->ssl[sockindex]; - SSL_METHOD* req_method = NULL; - curl_socket_t sockfd = conn->sock[sockindex]; -#ifdef HAVE_SNI - bool sni = FALSE; -#define use_sni(x) sni = (x) -#else -#define use_sni(x) Curl_nop_stmt -#endif - - if(conssl->state == ssl_connection_complete) - return CURLE_OK; - - /* check to see if we've been told to use an explicit SSL/TLS version */ - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: -#if LIBCYASSL_VERSION_HEX >= 0x03003000 /* >= 3.3.0 */ - /* minimum protocol version is set later after the CTX object is created */ - req_method = SSLv23_client_method(); -#else - infof(data, "CyaSSL <3.3.0 cannot be configured to use TLS 1.0-1.2, " - "TLS 1.0 is used exclusively\n"); - req_method = TLSv1_client_method(); -#endif - use_sni(TRUE); - break; - case CURL_SSLVERSION_TLSv1_0: - req_method = TLSv1_client_method(); - use_sni(TRUE); - break; - case CURL_SSLVERSION_TLSv1_1: - req_method = TLSv1_1_client_method(); - use_sni(TRUE); - break; - case CURL_SSLVERSION_TLSv1_2: - req_method = TLSv1_2_client_method(); - use_sni(TRUE); - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "CyaSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv3: -#ifdef WOLFSSL_ALLOW_SSLV3 - req_method = SSLv3_client_method(); - use_sni(FALSE); -#else - failf(data, "CyaSSL does not support SSLv3"); - return CURLE_NOT_BUILT_IN; -#endif - break; - case CURL_SSLVERSION_SSLv2: - failf(data, "CyaSSL does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - if(!req_method) { - failf(data, "SSL: couldn't create a method!"); - return CURLE_OUT_OF_MEMORY; - } - - if(conssl->ctx) - SSL_CTX_free(conssl->ctx); - conssl->ctx = SSL_CTX_new(req_method); - - if(!conssl->ctx) { - failf(data, "SSL: couldn't create a context!"); - return CURLE_OUT_OF_MEMORY; - } - - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: -#if LIBCYASSL_VERSION_HEX > 0x03004006 /* > 3.4.6 */ - /* Versions 3.3.0 to 3.4.6 we know the minimum protocol version is whatever - minimum version of TLS was built in and at least TLS 1.0. For later library - versions that could change (eg TLS 1.0 built in but defaults to TLS 1.1) so - we have this short circuit evaluation to find the minimum supported TLS - version. We use wolfSSL_CTX_SetMinVersion and not CyaSSL_SetMinVersion - because only the former will work before the user's CTX callback is called. - */ - if((wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1) != 1) && - (wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1_1) != 1) && - (wolfSSL_CTX_SetMinVersion(conssl->ctx, WOLFSSL_TLSV1_2) != 1)) { - failf(data, "SSL: couldn't set the minimum protocol version"); - return CURLE_SSL_CONNECT_ERROR; - } -#endif - break; - } - - ciphers = SSL_CONN_CONFIG(cipher_list); - if(ciphers) { - if(!SSL_CTX_set_cipher_list(conssl->ctx, ciphers)) { - failf(data, "failed setting cipher list: %s", ciphers); - return CURLE_SSL_CIPHER; - } - infof(data, "Cipher selection: %s\n", ciphers); - } - -#ifndef NO_FILESYSTEM - /* load trusted cacert */ - if(SSL_CONN_CONFIG(CAfile)) { - if(1 != SSL_CTX_load_verify_locations(conssl->ctx, - SSL_CONN_CONFIG(CAfile), - SSL_CONN_CONFIG(CApath))) { - if(SSL_CONN_CONFIG(verifypeer)) { - /* Fail if we insist on successfully verifying the server. */ - failf(data, "error setting certificate verify locations:\n" - " CAfile: %s\n CApath: %s", - SSL_CONN_CONFIG(CAfile)? - SSL_CONN_CONFIG(CAfile): "none", - SSL_CONN_CONFIG(CApath)? - SSL_CONN_CONFIG(CApath) : "none"); - return CURLE_SSL_CACERT_BADFILE; - } - else { - /* Just continue with a warning if no strict certificate - verification is required. */ - infof(data, "error setting certificate verify locations," - " continuing anyway:\n"); - } - } - else { - /* Everything is fine. */ - infof(data, "successfully set certificate verify locations:\n"); - } - infof(data, - " CAfile: %s\n" - " CApath: %s\n", - SSL_CONN_CONFIG(CAfile) ? SSL_CONN_CONFIG(CAfile): - "none", - SSL_CONN_CONFIG(CApath) ? SSL_CONN_CONFIG(CApath): - "none"); - } - - /* Load the client certificate, and private key */ - if(SSL_SET_OPTION(cert) && SSL_SET_OPTION(key)) { - int file_type = do_file_type(SSL_SET_OPTION(cert_type)); - - if(SSL_CTX_use_certificate_file(conssl->ctx, SSL_SET_OPTION(cert), - file_type) != 1) { - failf(data, "unable to use client certificate (no key or wrong pass" - " phrase?)"); - return CURLE_SSL_CONNECT_ERROR; - } - - file_type = do_file_type(SSL_SET_OPTION(key_type)); - if(SSL_CTX_use_PrivateKey_file(conssl->ctx, SSL_SET_OPTION(key), - file_type) != 1) { - failf(data, "unable to set private key"); - return CURLE_SSL_CONNECT_ERROR; - } - } -#endif /* !NO_FILESYSTEM */ - - /* SSL always tries to verify the peer, this only says whether it should - * fail to connect if the verification fails, or if it should continue - * anyway. In the latter case the result of the verification is checked with - * SSL_get_verify_result() below. */ - SSL_CTX_set_verify(conssl->ctx, - SSL_CONN_CONFIG(verifypeer)?SSL_VERIFY_PEER: - SSL_VERIFY_NONE, - NULL); - -#ifdef HAVE_SNI - if(sni) { - struct in_addr addr4; -#ifdef ENABLE_IPV6 - struct in6_addr addr6; -#endif - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - size_t hostname_len = strlen(hostname); - if((hostname_len < USHRT_MAX) && - (0 == Curl_inet_pton(AF_INET, hostname, &addr4)) && -#ifdef ENABLE_IPV6 - (0 == Curl_inet_pton(AF_INET6, hostname, &addr6)) && -#endif - (CyaSSL_CTX_UseSNI(conssl->ctx, CYASSL_SNI_HOST_NAME, hostname, - (unsigned short)hostname_len) != 1)) { - infof(data, "WARNING: failed to configure server name indication (SNI) " - "TLS extension\n"); - } - } -#endif - -#ifdef HAVE_SUPPORTED_CURVES - /* CyaSSL/wolfSSL does not send the supported ECC curves ext automatically: - https://github.com/wolfSSL/wolfssl/issues/366 - The supported curves below are those also supported by OpenSSL 1.0.2 and - in the same order. */ - CyaSSL_CTX_UseSupportedCurve(conssl->ctx, 0x17); /* secp256r1 */ - CyaSSL_CTX_UseSupportedCurve(conssl->ctx, 0x19); /* secp521r1 */ - CyaSSL_CTX_UseSupportedCurve(conssl->ctx, 0x18); /* secp384r1 */ -#endif - - /* give application a chance to interfere with SSL set up. */ - if(data->set.ssl.fsslctx) { - CURLcode result = CURLE_OK; - result = (*data->set.ssl.fsslctx)(data, conssl->ctx, - data->set.ssl.fsslctxp); - if(result) { - failf(data, "error signaled by ssl ctx callback"); - return result; - } - } -#ifdef NO_FILESYSTEM - else if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "SSL: Certificates couldn't be loaded because CyaSSL was built" - " with \"no filesystem\". Either disable peer verification" - " (insecure) or if you are building an application with libcurl you" - " can load certificates via CURLOPT_SSL_CTX_FUNCTION."); - return CURLE_SSL_CONNECT_ERROR; - } -#endif - - /* Let's make an SSL structure */ - if(conssl->handle) - SSL_free(conssl->handle); - conssl->handle = SSL_new(conssl->ctx); - if(!conssl->handle) { - failf(data, "SSL: couldn't create a context (handle)!"); - return CURLE_OUT_OF_MEMORY; - } - -#ifdef HAVE_ALPN - if(conn->bits.tls_enable_alpn) { - char protocols[128]; - *protocols = '\0'; - - /* wolfSSL's ALPN protocol name list format is a comma separated string of - protocols in descending order of preference, eg: "h2,http/1.1" */ - -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { - strcpy(protocols + strlen(protocols), NGHTTP2_PROTO_VERSION_ID ","); - infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID); - } -#endif - - strcpy(protocols + strlen(protocols), ALPN_HTTP_1_1); - infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1); - - if(wolfSSL_UseALPN(conssl->handle, protocols, - (unsigned)strlen(protocols), - WOLFSSL_ALPN_CONTINUE_ON_MISMATCH) != SSL_SUCCESS) { - failf(data, "SSL: failed setting ALPN protocols"); - return CURLE_SSL_CONNECT_ERROR; - } - } -#endif /* HAVE_ALPN */ - - /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { - void *ssl_sessionid = NULL; - - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) { - /* we got a session id, use it! */ - if(!SSL_set_session(conssl->handle, ssl_sessionid)) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "SSL: SSL_set_session failed: %s", - ERR_error_string(SSL_get_error(conssl->handle, 0), - error_buffer)); - return CURLE_SSL_CONNECT_ERROR; - } - /* Informational message */ - infof(data, "SSL re-using session ID\n"); - } - Curl_ssl_sessionid_unlock(conn); - } - - /* pass the raw socket into the SSL layer */ - if(!SSL_set_fd(conssl->handle, (int)sockfd)) { - failf(data, "SSL: SSL_set_fd failed"); - return CURLE_SSL_CONNECT_ERROR; - } - - conssl->connecting_state = ssl_connect_2; - return CURLE_OK; -} - - -static CURLcode -cyassl_connect_step2(struct connectdata *conn, - int sockindex) -{ - int ret = -1; - struct Curl_easy *data = conn->data; - struct ssl_connect_data* conssl = &conn->ssl[sockindex]; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const char * const dispname = SSL_IS_PROXY() ? - conn->http_proxy.host.dispname : conn->host.dispname; - const char * const pinnedpubkey = SSL_IS_PROXY() ? - data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - - conn->recv[sockindex] = cyassl_recv; - conn->send[sockindex] = cyassl_send; - - /* Enable RFC2818 checks */ - if(SSL_CONN_CONFIG(verifyhost)) { - ret = CyaSSL_check_domain_name(conssl->handle, hostname); - if(ret == SSL_FAILURE) - return CURLE_OUT_OF_MEMORY; - } - - ret = SSL_connect(conssl->handle); - if(ret != 1) { - char error_buffer[CYASSL_MAX_ERROR_SZ]; - int detail = SSL_get_error(conssl->handle, ret); - - if(SSL_ERROR_WANT_READ == detail) { - conssl->connecting_state = ssl_connect_2_reading; - return CURLE_OK; - } - else if(SSL_ERROR_WANT_WRITE == detail) { - conssl->connecting_state = ssl_connect_2_writing; - return CURLE_OK; - } - /* There is no easy way to override only the CN matching. - * This will enable the override of both mismatching SubjectAltNames - * as also mismatching CN fields */ - else if(DOMAIN_NAME_MISMATCH == detail) { -#if 1 - failf(data, "\tsubject alt name(s) or common name do not match \"%s\"\n", - dispname); - return CURLE_PEER_FAILED_VERIFICATION; -#else - /* When the CyaSSL_check_domain_name() is used and you desire to continue - * on a DOMAIN_NAME_MISMATCH, i.e. 'conn->ssl_config.verifyhost == 0', - * CyaSSL version 2.4.0 will fail with an INCOMPLETE_DATA error. The only - * way to do this is currently to switch the CyaSSL_check_domain_name() - * in and out based on the 'conn->ssl_config.verifyhost' value. */ - if(SSL_CONN_CONFIG(verifyhost)) { - failf(data, - "\tsubject alt name(s) or common name do not match \"%s\"\n", - dispname); - return CURLE_PEER_FAILED_VERIFICATION; - } - else { - infof(data, - "\tsubject alt name(s) and/or common name do not match \"%s\"\n", - dispname); - return CURLE_OK; - } -#endif - } -#if LIBCYASSL_VERSION_HEX >= 0x02007000 /* 2.7.0 */ - else if(ASN_NO_SIGNER_E == detail) { - if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "\tCA signer not available for verification\n"); - return CURLE_SSL_CACERT_BADFILE; - } - else { - /* Just continue with a warning if no strict certificate - verification is required. */ - infof(data, "CA signer not available for verification, " - "continuing anyway\n"); - } - } -#endif - else { - failf(data, "SSL_connect failed with error %d: %s", detail, - ERR_error_string(detail, error_buffer)); - return CURLE_SSL_CONNECT_ERROR; - } - } - - if(pinnedpubkey) { -#ifdef KEEP_PEER_CERT - X509 *x509; - const char *x509_der; - int x509_der_len; - curl_X509certificate x509_parsed; - curl_asn1Element *pubkey; - CURLcode result; - - x509 = SSL_get_peer_certificate(conssl->handle); - if(!x509) { - failf(data, "SSL: failed retrieving server certificate"); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - x509_der = (const char *)CyaSSL_X509_get_der(x509, &x509_der_len); - if(!x509_der) { - failf(data, "SSL: failed retrieving ASN.1 server certificate"); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - memset(&x509_parsed, 0, sizeof x509_parsed); - if(Curl_parseX509(&x509_parsed, x509_der, x509_der + x509_der_len)) - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - - pubkey = &x509_parsed.subjectPublicKeyInfo; - if(!pubkey->header || pubkey->end <= pubkey->header) { - failf(data, "SSL: failed retrieving public key from server certificate"); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - result = Curl_pin_peer_pubkey(data, - pinnedpubkey, - (const unsigned char *)pubkey->header, - (size_t)(pubkey->end - pubkey->header)); - if(result) { - failf(data, "SSL: public key does not match pinned public key!"); - return result; - } -#else - failf(data, "Library lacks pinning support built-in"); - return CURLE_NOT_BUILT_IN; -#endif - } - -#ifdef HAVE_ALPN - if(conn->bits.tls_enable_alpn) { - int rc; - char *protocol = NULL; - unsigned short protocol_len = 0; - - rc = wolfSSL_ALPN_GetProtocol(conssl->handle, &protocol, &protocol_len); - - if(rc == SSL_SUCCESS) { - infof(data, "ALPN, server accepted to use %.*s\n", protocol_len, - protocol); - - if(protocol_len == ALPN_HTTP_1_1_LENGTH && - !memcmp(protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) - conn->negnpn = CURL_HTTP_VERSION_1_1; -#ifdef USE_NGHTTP2 - else if(data->set.httpversion >= CURL_HTTP_VERSION_2 && - protocol_len == NGHTTP2_PROTO_VERSION_ID_LEN && - !memcmp(protocol, NGHTTP2_PROTO_VERSION_ID, - NGHTTP2_PROTO_VERSION_ID_LEN)) - conn->negnpn = CURL_HTTP_VERSION_2; -#endif - else - infof(data, "ALPN, unrecognized protocol %.*s\n", protocol_len, - protocol); - } - else if(rc == SSL_ALPN_NOT_FOUND) - infof(data, "ALPN, server did not agree to a protocol\n"); - else { - failf(data, "ALPN, failure getting protocol, error %d", rc); - return CURLE_SSL_CONNECT_ERROR; - } - } -#endif /* HAVE_ALPN */ - - conssl->connecting_state = ssl_connect_3; -#if (LIBCYASSL_VERSION_HEX >= 0x03009010) - infof(data, "SSL connection using %s / %s\n", - wolfSSL_get_version(conssl->handle), - wolfSSL_get_cipher_name(conssl->handle)); -#else - infof(data, "SSL connected\n"); -#endif - - return CURLE_OK; -} - - -static CURLcode -cyassl_connect_step3(struct connectdata *conn, - int sockindex) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - - if(data->set.general_ssl.sessionid) { - bool incache; - SSL_SESSION *our_ssl_sessionid; - void *old_ssl_sessionid = NULL; - - our_ssl_sessionid = SSL_get_session(connssl->handle); - - Curl_ssl_sessionid_lock(conn); - incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, - sockindex)); - if(incache) { - if(old_ssl_sessionid != our_ssl_sessionid) { - infof(data, "old SSL session ID is stale, removing\n"); - Curl_ssl_delsessionid(conn, old_ssl_sessionid); - incache = FALSE; - } - } - - if(!incache) { - result = Curl_ssl_addsessionid(conn, our_ssl_sessionid, - 0 /* unknown size */, sockindex); - if(result) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "failed to store ssl session"); - return result; - } - } - Curl_ssl_sessionid_unlock(conn); - } - - connssl->connecting_state = ssl_connect_done; - - return result; -} - - -static ssize_t cyassl_send(struct connectdata *conn, - int sockindex, - const void *mem, - size_t len, - CURLcode *curlcode) -{ - char error_buffer[CYASSL_MAX_ERROR_SZ]; - int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len; - int rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen); - - if(rc < 0) { - int err = SSL_get_error(conn->ssl[sockindex].handle, rc); - - switch(err) { - case SSL_ERROR_WANT_READ: - case SSL_ERROR_WANT_WRITE: - /* there's data pending, re-invoke SSL_write() */ - *curlcode = CURLE_AGAIN; - return -1; - default: - failf(conn->data, "SSL write: %s, errno %d", - ERR_error_string(err, error_buffer), - SOCKERRNO); - *curlcode = CURLE_SEND_ERROR; - return -1; - } - } - return rc; -} - -void Curl_cyassl_close(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *conssl = &conn->ssl[sockindex]; - - if(conssl->handle) { - (void)SSL_shutdown(conssl->handle); - SSL_free(conssl->handle); - conssl->handle = NULL; - } - if(conssl->ctx) { - SSL_CTX_free(conssl->ctx); - conssl->ctx = NULL; - } -} - -static ssize_t cyassl_recv(struct connectdata *conn, - int num, - char *buf, - size_t buffersize, - CURLcode *curlcode) -{ - char error_buffer[CYASSL_MAX_ERROR_SZ]; - int buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize; - int nread = SSL_read(conn->ssl[num].handle, buf, buffsize); - - if(nread < 0) { - int err = SSL_get_error(conn->ssl[num].handle, nread); - - switch(err) { - case SSL_ERROR_ZERO_RETURN: /* no more data */ - break; - case SSL_ERROR_WANT_READ: - case SSL_ERROR_WANT_WRITE: - /* there's data pending, re-invoke SSL_read() */ - *curlcode = CURLE_AGAIN; - return -1; - default: - failf(conn->data, "SSL read: %s, errno %d", - ERR_error_string(err, error_buffer), - SOCKERRNO); - *curlcode = CURLE_RECV_ERROR; - return -1; - } - } - return nread; -} - - -void Curl_cyassl_session_free(void *ptr) -{ - (void)ptr; - /* CyaSSL reuses sessions on own, no free */ -} - - -size_t Curl_cyassl_version(char *buffer, size_t size) -{ -#ifdef WOLFSSL_VERSION - return snprintf(buffer, size, "wolfSSL/%s", WOLFSSL_VERSION); -#elif defined(CYASSL_VERSION) - return snprintf(buffer, size, "CyaSSL/%s", CYASSL_VERSION); -#else - return snprintf(buffer, size, "CyaSSL/%s", "<1.8.8"); -#endif -} - - -int Curl_cyassl_init(void) -{ - return (CyaSSL_Init() == SSL_SUCCESS); -} - - -bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex) -{ - if(conn->ssl[connindex].handle) /* SSL is in use */ - return (0 != SSL_pending(conn->ssl[connindex].handle)) ? TRUE : FALSE; - else - return FALSE; -} - - -/* - * This function is called to shut down the SSL layer but keep the - * socket open (CCC - Clear Command Channel) - */ -int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex) -{ - int retval = 0; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - if(connssl->handle) { - SSL_free(connssl->handle); - connssl->handle = NULL; - } - return retval; -} - - -static CURLcode -cyassl_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - curl_socket_t sockfd = conn->sock[sockindex]; - time_t timeout_ms; - int what; - - /* check if the connection has already been established */ - if(ssl_connection_complete == connssl->state) { - *done = TRUE; - return CURLE_OK; - } - - if(ssl_connect_1==connssl->connecting_state) { - /* Find out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - result = cyassl_connect_step1(conn, sockindex); - if(result) - return result; - } - - while(ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state) { - - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading - || connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking?0:timeout_ms); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) { - *done = FALSE; - return CURLE_OK; - } - else { - /* timeout */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - /* Run transaction, and return to the caller if it failed or if - * this connection is part of a multi handle and this loop would - * execute again. This permits the owner of a multi handle to - * abort a connection attempt before step2 has completed while - * ensuring that a client using select() or epoll() will always - * have a valid fdset to wait on. - */ - result = cyassl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; - } /* repeat step2 until all transactions are done. */ - - if(ssl_connect_3 == connssl->connecting_state) { - result = cyassl_connect_step3(conn, sockindex); - if(result) - return result; - } - - if(ssl_connect_done == connssl->connecting_state) { - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = cyassl_recv; - conn->send[sockindex] = cyassl_send; - *done = TRUE; - } - else - *done = FALSE; - - /* Reset our connect state machine */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - - -CURLcode -Curl_cyassl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - return cyassl_connect_common(conn, sockindex, TRUE, done); -} - - -CURLcode -Curl_cyassl_connect(struct connectdata *conn, - int sockindex) -{ - CURLcode result; - bool done = FALSE; - - result = cyassl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -CURLcode Curl_cyassl_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) -{ - RNG rng; - (void)data; - if(InitRng(&rng)) - return CURLE_FAILED_INIT; - if(length > UINT_MAX) - return CURLE_FAILED_INIT; - if(RNG_GenerateBlock(&rng, entropy, (unsigned)length)) - return CURLE_FAILED_INIT; - return CURLE_OK; -} - -void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum /* output */, - size_t unused) -{ - Sha256 SHA256pw; - (void)unused; - InitSha256(&SHA256pw); - Sha256Update(&SHA256pw, tmp, (word32)tmplen); - Sha256Final(&SHA256pw, sha256sum); -} - -#endif diff --git a/build/premake/premake5/contrib/curl/lib/vtls/cyassl.h b/build/premake/premake5/contrib/curl/lib/vtls/cyassl.h deleted file mode 100644 index f47719e4e7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/cyassl.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef HEADER_CURL_CYASSL_H -#define HEADER_CURL_CYASSL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef USE_CYASSL - -/* KEEP_PEER_CERT is a product of the presence of build time symbol - OPENSSL_EXTRA without NO_CERTS, depending on the version. KEEP_PEER_CERT is - in wolfSSL's settings.h, and the latter two are build time symbols in - options.h. */ -#ifndef KEEP_PEER_CERT -#if defined(HAVE_CYASSL_GET_PEER_CERTIFICATE) || \ - defined(HAVE_WOLFSSL_GET_PEER_CERTIFICATE) || \ - (defined(OPENSSL_EXTRA) && !defined(NO_CERTS)) -#define KEEP_PEER_CERT -#endif -#endif - -CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex); -bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex); -int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex); - - /* close a SSL connection */ -void Curl_cyassl_close(struct connectdata *conn, int sockindex); - -void Curl_cyassl_session_free(void *ptr); -size_t Curl_cyassl_version(char *buffer, size_t size); -int Curl_cyassl_shutdown(struct connectdata *conn, int sockindex); -int Curl_cyassl_init(void); -CURLcode Curl_cyassl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -CURLcode Curl_cyassl_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); -void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t unused); - -/* Set the API backend definition to CyaSSL */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL - -/* this backend supports CURLOPT_SSL_CTX_* */ -#define have_curlssl_ssl_ctx 1 - -#ifdef KEEP_PEER_CERT -/* this backend supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 -#endif - -/* API setup for CyaSSL */ -#define curlssl_init Curl_cyassl_init -#define curlssl_cleanup() Curl_nop_stmt -#define curlssl_connect Curl_cyassl_connect -#define curlssl_connect_nonblocking Curl_cyassl_connect_nonblocking -#define curlssl_session_free(x) Curl_cyassl_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_cyassl_close -#define curlssl_shutdown(x,y) Curl_cyassl_shutdown(x,y) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_cyassl_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) Curl_cyassl_data_pending(x,y) -#define curlssl_random(x,y,z) Curl_cyassl_random(x,y,z) -#define curlssl_sha256sum(a,b,c,d) Curl_cyassl_sha256sum(a,b,c,d) - -#endif /* USE_CYASSL */ -#endif /* HEADER_CURL_CYASSL_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/darwinssl.c b/build/premake/premake5/contrib/curl/lib/vtls/darwinssl.c deleted file mode 100644 index 050bf960b5..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/darwinssl.c +++ /dev/null @@ -1,2593 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2014, Nick Zitzmann, . - * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all iOS and Mac OS X SecureTransport-specific code for the - * TLS/SSL layer. No code but vtls.c should ever call or use these functions. - */ - -#include "curl_setup.h" - -#include "urldata.h" /* for the Curl_easy definition */ -#include "curl_base64.h" -#include "strtok.h" - -#ifdef USE_DARWINSSL - -#ifdef HAVE_LIMITS_H -#include -#endif - -#include -#include -#include -#include - -/* The Security framework has changed greatly between iOS and different OS X - versions, and we will try to support as many of them as we can (back to - Leopard and iOS 5) by using macros and weak-linking. - - IMPORTANT: If TLS 1.1 and 1.2 support are important for you on OS X, then - you must build this project against the 10.8 SDK or later. */ -#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) - -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 -#error "The darwinssl back-end requires Leopard or later." -#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1050 */ - -#define CURL_BUILD_IOS 0 -#define CURL_BUILD_IOS_7 0 -#define CURL_BUILD_MAC 1 -/* This is the maximum API level we are allowed to use when building: */ -#define CURL_BUILD_MAC_10_5 MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 -#define CURL_BUILD_MAC_10_6 MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 -#define CURL_BUILD_MAC_10_7 MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 -#define CURL_BUILD_MAC_10_8 MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 -#define CURL_BUILD_MAC_10_9 MAC_OS_X_VERSION_MAX_ALLOWED >= 1090 -/* These macros mean "the following code is present to allow runtime backward - compatibility with at least this cat or earlier": - (You set this at build-time by setting the MACOSX_DEPLOYMENT_TARGET - environmental variable.) */ -#define CURL_SUPPORT_MAC_10_5 MAC_OS_X_VERSION_MIN_REQUIRED <= 1050 -#define CURL_SUPPORT_MAC_10_6 MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 -#define CURL_SUPPORT_MAC_10_7 MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 -#define CURL_SUPPORT_MAC_10_8 MAC_OS_X_VERSION_MIN_REQUIRED <= 1080 -#define CURL_SUPPORT_MAC_10_9 MAC_OS_X_VERSION_MIN_REQUIRED <= 1090 - -#elif TARGET_OS_EMBEDDED || TARGET_OS_IPHONE -#define CURL_BUILD_IOS 1 -#define CURL_BUILD_IOS_7 __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 -#define CURL_BUILD_MAC 0 -#define CURL_BUILD_MAC_10_5 0 -#define CURL_BUILD_MAC_10_6 0 -#define CURL_BUILD_MAC_10_7 0 -#define CURL_BUILD_MAC_10_8 0 -#define CURL_SUPPORT_MAC_10_5 0 -#define CURL_SUPPORT_MAC_10_6 0 -#define CURL_SUPPORT_MAC_10_7 0 -#define CURL_SUPPORT_MAC_10_8 0 -#define CURL_SUPPORT_MAC_10_9 0 - -#else -#error "The darwinssl back-end requires iOS or OS X." -#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */ - -#if CURL_BUILD_MAC -#include -#endif /* CURL_BUILD_MAC */ - -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" -#include "connect.h" -#include "select.h" -#include "vtls.h" -#include "darwinssl.h" -#include "curl_printf.h" - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* From MacTypes.h (which we can't include because it isn't present in iOS: */ -#define ioErr -36 -#define paramErr -50 - -/* The following two functions were ripped from Apple sample code, - * with some modifications: */ -static OSStatus SocketRead(SSLConnectionRef connection, - void *data, /* owned by - * caller, data - * RETURNED */ - size_t *dataLength) /* IN/OUT */ -{ - size_t bytesToGo = *dataLength; - size_t initLen = bytesToGo; - UInt8 *currData = (UInt8 *)data; - /*int sock = *(int *)connection;*/ - struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection; - int sock = connssl->ssl_sockfd; - OSStatus rtn = noErr; - size_t bytesRead; - ssize_t rrtn; - int theErr; - - *dataLength = 0; - - for(;;) { - bytesRead = 0; - rrtn = read(sock, currData, bytesToGo); - if(rrtn <= 0) { - /* this is guesswork... */ - theErr = errno; - if(rrtn == 0) { /* EOF = server hung up */ - /* the framework will turn this into errSSLClosedNoNotify */ - rtn = errSSLClosedGraceful; - } - else /* do the switch */ - switch(theErr) { - case ENOENT: - /* connection closed */ - rtn = errSSLClosedGraceful; - break; - case ECONNRESET: - rtn = errSSLClosedAbort; - break; - case EAGAIN: - rtn = errSSLWouldBlock; - connssl->ssl_direction = false; - break; - default: - rtn = ioErr; - break; - } - break; - } - else { - bytesRead = rrtn; - } - bytesToGo -= bytesRead; - currData += bytesRead; - - if(bytesToGo == 0) { - /* filled buffer with incoming data, done */ - break; - } - } - *dataLength = initLen - bytesToGo; - - return rtn; -} - -static OSStatus SocketWrite(SSLConnectionRef connection, - const void *data, - size_t *dataLength) /* IN/OUT */ -{ - size_t bytesSent = 0; - /*int sock = *(int *)connection;*/ - struct ssl_connect_data *connssl = (struct ssl_connect_data *)connection; - int sock = connssl->ssl_sockfd; - ssize_t length; - size_t dataLen = *dataLength; - const UInt8 *dataPtr = (UInt8 *)data; - OSStatus ortn; - int theErr; - - *dataLength = 0; - - do { - length = write(sock, - (char *)dataPtr + bytesSent, - dataLen - bytesSent); - } while((length > 0) && - ( (bytesSent += length) < dataLen) ); - - if(length <= 0) { - theErr = errno; - if(theErr == EAGAIN) { - ortn = errSSLWouldBlock; - connssl->ssl_direction = true; - } - else { - ortn = ioErr; - } - } - else { - ortn = noErr; - } - *dataLength = bytesSent; - return ortn; -} - -#ifndef CURL_DISABLE_VERBOSE_STRINGS -CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher) -{ - switch(cipher) { - /* SSL version 3.0 */ - case SSL_RSA_WITH_NULL_MD5: - return "SSL_RSA_WITH_NULL_MD5"; - break; - case SSL_RSA_WITH_NULL_SHA: - return "SSL_RSA_WITH_NULL_SHA"; - break; - case SSL_RSA_EXPORT_WITH_RC4_40_MD5: - return "SSL_RSA_EXPORT_WITH_RC4_40_MD5"; - break; - case SSL_RSA_WITH_RC4_128_MD5: - return "SSL_RSA_WITH_RC4_128_MD5"; - break; - case SSL_RSA_WITH_RC4_128_SHA: - return "SSL_RSA_WITH_RC4_128_SHA"; - break; - case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5: - return "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5"; - break; - case SSL_RSA_WITH_IDEA_CBC_SHA: - return "SSL_RSA_WITH_IDEA_CBC_SHA"; - break; - case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA: - return "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA"; - break; - case SSL_RSA_WITH_DES_CBC_SHA: - return "SSL_RSA_WITH_DES_CBC_SHA"; - break; - case SSL_RSA_WITH_3DES_EDE_CBC_SHA: - return "SSL_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA: - return "SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA"; - break; - case SSL_DH_DSS_WITH_DES_CBC_SHA: - return "SSL_DH_DSS_WITH_DES_CBC_SHA"; - break; - case SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA: - return "SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA: - return "SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA"; - break; - case SSL_DH_RSA_WITH_DES_CBC_SHA: - return "SSL_DH_RSA_WITH_DES_CBC_SHA"; - break; - case SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA: - return "SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA: - return "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"; - break; - case SSL_DHE_DSS_WITH_DES_CBC_SHA: - return "SSL_DHE_DSS_WITH_DES_CBC_SHA"; - break; - case SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA: - return "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA: - return "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA"; - break; - case SSL_DHE_RSA_WITH_DES_CBC_SHA: - return "SSL_DHE_RSA_WITH_DES_CBC_SHA"; - break; - case SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA: - return "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5: - return "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5"; - break; - case SSL_DH_anon_WITH_RC4_128_MD5: - return "SSL_DH_anon_WITH_RC4_128_MD5"; - break; - case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA: - return "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"; - break; - case SSL_DH_anon_WITH_DES_CBC_SHA: - return "SSL_DH_anon_WITH_DES_CBC_SHA"; - break; - case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA: - return "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_FORTEZZA_DMS_WITH_NULL_SHA: - return "SSL_FORTEZZA_DMS_WITH_NULL_SHA"; - break; - case SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA: - return "SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA"; - break; - /* TLS 1.0 with AES (RFC 3268) - (Apparently these are used in SSLv3 implementations as well.) */ - case TLS_RSA_WITH_AES_128_CBC_SHA: - return "TLS_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_DH_DSS_WITH_AES_128_CBC_SHA: - return "TLS_DH_DSS_WITH_AES_128_CBC_SHA"; - break; - case TLS_DH_RSA_WITH_AES_128_CBC_SHA: - return "TLS_DH_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_DHE_DSS_WITH_AES_128_CBC_SHA: - return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"; - break; - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA: - return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_DH_anon_WITH_AES_128_CBC_SHA: - return "TLS_DH_anon_WITH_AES_128_CBC_SHA"; - break; - case TLS_RSA_WITH_AES_256_CBC_SHA: - return "TLS_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_DH_DSS_WITH_AES_256_CBC_SHA: - return "TLS_DH_DSS_WITH_AES_256_CBC_SHA"; - break; - case TLS_DH_RSA_WITH_AES_256_CBC_SHA: - return "TLS_DH_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_DHE_DSS_WITH_AES_256_CBC_SHA: - return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"; - break; - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA: - return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_DH_anon_WITH_AES_256_CBC_SHA: - return "TLS_DH_anon_WITH_AES_256_CBC_SHA"; - break; - /* SSL version 2.0 */ - case SSL_RSA_WITH_RC2_CBC_MD5: - return "SSL_RSA_WITH_RC2_CBC_MD5"; - break; - case SSL_RSA_WITH_IDEA_CBC_MD5: - return "SSL_RSA_WITH_IDEA_CBC_MD5"; - break; - case SSL_RSA_WITH_DES_CBC_MD5: - return "SSL_RSA_WITH_DES_CBC_MD5"; - break; - case SSL_RSA_WITH_3DES_EDE_CBC_MD5: - return "SSL_RSA_WITH_3DES_EDE_CBC_MD5"; - break; - } - return "SSL_NULL_WITH_NULL_NULL"; -} - -CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher) -{ - switch(cipher) { - /* TLS 1.0 with AES (RFC 3268) */ - case TLS_RSA_WITH_AES_128_CBC_SHA: - return "TLS_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_DH_DSS_WITH_AES_128_CBC_SHA: - return "TLS_DH_DSS_WITH_AES_128_CBC_SHA"; - break; - case TLS_DH_RSA_WITH_AES_128_CBC_SHA: - return "TLS_DH_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_DHE_DSS_WITH_AES_128_CBC_SHA: - return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"; - break; - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA: - return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_DH_anon_WITH_AES_128_CBC_SHA: - return "TLS_DH_anon_WITH_AES_128_CBC_SHA"; - break; - case TLS_RSA_WITH_AES_256_CBC_SHA: - return "TLS_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_DH_DSS_WITH_AES_256_CBC_SHA: - return "TLS_DH_DSS_WITH_AES_256_CBC_SHA"; - break; - case TLS_DH_RSA_WITH_AES_256_CBC_SHA: - return "TLS_DH_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_DHE_DSS_WITH_AES_256_CBC_SHA: - return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"; - break; - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA: - return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_DH_anon_WITH_AES_256_CBC_SHA: - return "TLS_DH_anon_WITH_AES_256_CBC_SHA"; - break; -#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS - /* TLS 1.0 with ECDSA (RFC 4492) */ - case TLS_ECDH_ECDSA_WITH_NULL_SHA: - return "TLS_ECDH_ECDSA_WITH_NULL_SHA"; - break; - case TLS_ECDH_ECDSA_WITH_RC4_128_SHA: - return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA"; - break; - case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: - return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA: - return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_ECDHE_ECDSA_WITH_NULL_SHA: - return "TLS_ECDHE_ECDSA_WITH_NULL_SHA"; - break; - case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: - return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"; - break; - case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: - return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: - return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_ECDH_RSA_WITH_NULL_SHA: - return "TLS_ECDH_RSA_WITH_NULL_SHA"; - break; - case TLS_ECDH_RSA_WITH_RC4_128_SHA: - return "TLS_ECDH_RSA_WITH_RC4_128_SHA"; - break; - case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: - return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA: - return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_ECDHE_RSA_WITH_NULL_SHA: - return "TLS_ECDHE_RSA_WITH_NULL_SHA"; - break; - case TLS_ECDHE_RSA_WITH_RC4_128_SHA: - return "TLS_ECDHE_RSA_WITH_RC4_128_SHA"; - break; - case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: - return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"; - break; - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: - return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"; - break; - case TLS_ECDH_anon_WITH_NULL_SHA: - return "TLS_ECDH_anon_WITH_NULL_SHA"; - break; - case TLS_ECDH_anon_WITH_RC4_128_SHA: - return "TLS_ECDH_anon_WITH_RC4_128_SHA"; - break; - case TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA: - return "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_ECDH_anon_WITH_AES_128_CBC_SHA: - return "TLS_ECDH_anon_WITH_AES_128_CBC_SHA"; - break; - case TLS_ECDH_anon_WITH_AES_256_CBC_SHA: - return "TLS_ECDH_anon_WITH_AES_256_CBC_SHA"; - break; -#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */ -#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS - /* TLS 1.2 (RFC 5246) */ - case TLS_RSA_WITH_NULL_MD5: - return "TLS_RSA_WITH_NULL_MD5"; - break; - case TLS_RSA_WITH_NULL_SHA: - return "TLS_RSA_WITH_NULL_SHA"; - break; - case TLS_RSA_WITH_RC4_128_MD5: - return "TLS_RSA_WITH_RC4_128_MD5"; - break; - case TLS_RSA_WITH_RC4_128_SHA: - return "TLS_RSA_WITH_RC4_128_SHA"; - break; - case TLS_RSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_RSA_WITH_NULL_SHA256: - return "TLS_RSA_WITH_NULL_SHA256"; - break; - case TLS_RSA_WITH_AES_128_CBC_SHA256: - return "TLS_RSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_RSA_WITH_AES_256_CBC_SHA256: - return "TLS_RSA_WITH_AES_256_CBC_SHA256"; - break; - case TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA: - return "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA: - return "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_DH_DSS_WITH_AES_128_CBC_SHA256: - return "TLS_DH_DSS_WITH_AES_128_CBC_SHA256"; - break; - case TLS_DH_RSA_WITH_AES_128_CBC_SHA256: - return "TLS_DH_RSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256: - return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"; - break; - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256: - return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_DH_DSS_WITH_AES_256_CBC_SHA256: - return "TLS_DH_DSS_WITH_AES_256_CBC_SHA256"; - break; - case TLS_DH_RSA_WITH_AES_256_CBC_SHA256: - return "TLS_DH_RSA_WITH_AES_256_CBC_SHA256"; - break; - case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256: - return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"; - break; - case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256: - return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"; - break; - case TLS_DH_anon_WITH_RC4_128_MD5: - return "TLS_DH_anon_WITH_RC4_128_MD5"; - break; - case TLS_DH_anon_WITH_3DES_EDE_CBC_SHA: - return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_DH_anon_WITH_AES_128_CBC_SHA256: - return "TLS_DH_anon_WITH_AES_128_CBC_SHA256"; - break; - case TLS_DH_anon_WITH_AES_256_CBC_SHA256: - return "TLS_DH_anon_WITH_AES_256_CBC_SHA256"; - break; - /* TLS 1.2 with AES GCM (RFC 5288) */ - case TLS_RSA_WITH_AES_128_GCM_SHA256: - return "TLS_RSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_RSA_WITH_AES_256_GCM_SHA384: - return "TLS_RSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: - return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384: - return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_DH_RSA_WITH_AES_128_GCM_SHA256: - return "TLS_DH_RSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_DH_RSA_WITH_AES_256_GCM_SHA384: - return "TLS_DH_RSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256: - return "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256"; - break; - case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384: - return "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384"; - break; - case TLS_DH_DSS_WITH_AES_128_GCM_SHA256: - return "TLS_DH_DSS_WITH_AES_128_GCM_SHA256"; - break; - case TLS_DH_DSS_WITH_AES_256_GCM_SHA384: - return "TLS_DH_DSS_WITH_AES_256_GCM_SHA384"; - break; - case TLS_DH_anon_WITH_AES_128_GCM_SHA256: - return "TLS_DH_anon_WITH_AES_128_GCM_SHA256"; - break; - case TLS_DH_anon_WITH_AES_256_GCM_SHA384: - return "TLS_DH_anon_WITH_AES_256_GCM_SHA384"; - break; - /* TLS 1.2 with elliptic curve ciphers (RFC 5289) */ - case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: - return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384: - return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"; - break; - case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256: - return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384: - return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384"; - break; - case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: - return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: - return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"; - break; - case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256: - return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256"; - break; - case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384: - return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384"; - break; - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: - return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: - return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256: - return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384: - return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: - return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: - return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256: - return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256"; - break; - case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384: - return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384"; - break; - case TLS_EMPTY_RENEGOTIATION_INFO_SCSV: - return "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"; - break; -#else - case SSL_RSA_WITH_NULL_MD5: - return "TLS_RSA_WITH_NULL_MD5"; - break; - case SSL_RSA_WITH_NULL_SHA: - return "TLS_RSA_WITH_NULL_SHA"; - break; - case SSL_RSA_WITH_RC4_128_MD5: - return "TLS_RSA_WITH_RC4_128_MD5"; - break; - case SSL_RSA_WITH_RC4_128_SHA: - return "TLS_RSA_WITH_RC4_128_SHA"; - break; - case SSL_RSA_WITH_3DES_EDE_CBC_SHA: - return "TLS_RSA_WITH_3DES_EDE_CBC_SHA"; - break; - case SSL_DH_anon_WITH_RC4_128_MD5: - return "TLS_DH_anon_WITH_RC4_128_MD5"; - break; - case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA: - return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA"; - break; -#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ -#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 - /* TLS PSK (RFC 4279): */ - case TLS_PSK_WITH_RC4_128_SHA: - return "TLS_PSK_WITH_RC4_128_SHA"; - break; - case TLS_PSK_WITH_3DES_EDE_CBC_SHA: - return "TLS_PSK_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_PSK_WITH_AES_128_CBC_SHA: - return "TLS_PSK_WITH_AES_128_CBC_SHA"; - break; - case TLS_PSK_WITH_AES_256_CBC_SHA: - return "TLS_PSK_WITH_AES_256_CBC_SHA"; - break; - case TLS_DHE_PSK_WITH_RC4_128_SHA: - return "TLS_DHE_PSK_WITH_RC4_128_SHA"; - break; - case TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA: - return "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_DHE_PSK_WITH_AES_128_CBC_SHA: - return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA"; - break; - case TLS_DHE_PSK_WITH_AES_256_CBC_SHA: - return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA"; - break; - case TLS_RSA_PSK_WITH_RC4_128_SHA: - return "TLS_RSA_PSK_WITH_RC4_128_SHA"; - break; - case TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA: - return "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA"; - break; - case TLS_RSA_PSK_WITH_AES_128_CBC_SHA: - return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA"; - break; - case TLS_RSA_PSK_WITH_AES_256_CBC_SHA: - return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA"; - break; - /* More TLS PSK (RFC 4785): */ - case TLS_PSK_WITH_NULL_SHA: - return "TLS_PSK_WITH_NULL_SHA"; - break; - case TLS_DHE_PSK_WITH_NULL_SHA: - return "TLS_DHE_PSK_WITH_NULL_SHA"; - break; - case TLS_RSA_PSK_WITH_NULL_SHA: - return "TLS_RSA_PSK_WITH_NULL_SHA"; - break; - /* Even more TLS PSK (RFC 5487): */ - case TLS_PSK_WITH_AES_128_GCM_SHA256: - return "TLS_PSK_WITH_AES_128_GCM_SHA256"; - break; - case TLS_PSK_WITH_AES_256_GCM_SHA384: - return "TLS_PSK_WITH_AES_256_GCM_SHA384"; - break; - case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256: - return "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256"; - break; - case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384: - return "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384"; - break; - case TLS_RSA_PSK_WITH_AES_128_GCM_SHA256: - return "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256"; - break; - case TLS_RSA_PSK_WITH_AES_256_GCM_SHA384: - return "TLS_PSK_WITH_AES_256_GCM_SHA384"; - break; - case TLS_PSK_WITH_AES_128_CBC_SHA256: - return "TLS_PSK_WITH_AES_128_CBC_SHA256"; - break; - case TLS_PSK_WITH_AES_256_CBC_SHA384: - return "TLS_PSK_WITH_AES_256_CBC_SHA384"; - break; - case TLS_PSK_WITH_NULL_SHA256: - return "TLS_PSK_WITH_NULL_SHA256"; - break; - case TLS_PSK_WITH_NULL_SHA384: - return "TLS_PSK_WITH_NULL_SHA384"; - break; - case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256: - return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256"; - break; - case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384: - return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384"; - break; - case TLS_DHE_PSK_WITH_NULL_SHA256: - return "TLS_DHE_PSK_WITH_NULL_SHA256"; - break; - case TLS_DHE_PSK_WITH_NULL_SHA384: - return "TLS_RSA_PSK_WITH_NULL_SHA384"; - break; - case TLS_RSA_PSK_WITH_AES_128_CBC_SHA256: - return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256"; - break; - case TLS_RSA_PSK_WITH_AES_256_CBC_SHA384: - return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384"; - break; - case TLS_RSA_PSK_WITH_NULL_SHA256: - return "TLS_RSA_PSK_WITH_NULL_SHA256"; - break; - case TLS_RSA_PSK_WITH_NULL_SHA384: - return "TLS_RSA_PSK_WITH_NULL_SHA384"; - break; -#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */ - } - return "TLS_NULL_WITH_NULL_NULL"; -} -#endif /* !CURL_DISABLE_VERBOSE_STRINGS */ - -#if CURL_BUILD_MAC -CF_INLINE void GetDarwinVersionNumber(int *major, int *minor) -{ - int mib[2]; - char *os_version; - size_t os_version_len; - char *os_version_major, *os_version_minor; - char *tok_buf; - - /* Get the Darwin kernel version from the kernel using sysctl(): */ - mib[0] = CTL_KERN; - mib[1] = KERN_OSRELEASE; - if(sysctl(mib, 2, NULL, &os_version_len, NULL, 0) == -1) - return; - os_version = malloc(os_version_len*sizeof(char)); - if(!os_version) - return; - if(sysctl(mib, 2, os_version, &os_version_len, NULL, 0) == -1) { - free(os_version); - return; - } - - /* Parse the version: */ - os_version_major = strtok_r(os_version, ".", &tok_buf); - os_version_minor = strtok_r(NULL, ".", &tok_buf); - *major = atoi(os_version_major); - *minor = atoi(os_version_minor); - free(os_version); -} -#endif /* CURL_BUILD_MAC */ - -/* Apple provides a myriad of ways of getting information about a certificate - into a string. Some aren't available under iOS or newer cats. So here's - a unified function for getting a string describing the certificate that - ought to work in all cats starting with Leopard. */ -CF_INLINE CFStringRef CopyCertSubject(SecCertificateRef cert) -{ - CFStringRef server_cert_summary = CFSTR("(null)"); - -#if CURL_BUILD_IOS - /* iOS: There's only one way to do this. */ - server_cert_summary = SecCertificateCopySubjectSummary(cert); -#else -#if CURL_BUILD_MAC_10_7 - /* Lion & later: Get the long description if we can. */ - if(SecCertificateCopyLongDescription != NULL) - server_cert_summary = - SecCertificateCopyLongDescription(NULL, cert, NULL); - else -#endif /* CURL_BUILD_MAC_10_7 */ -#if CURL_BUILD_MAC_10_6 - /* Snow Leopard: Get the certificate summary. */ - if(SecCertificateCopySubjectSummary != NULL) - server_cert_summary = SecCertificateCopySubjectSummary(cert); - else -#endif /* CURL_BUILD_MAC_10_6 */ - /* Leopard is as far back as we go... */ - (void)SecCertificateCopyCommonName(cert, &server_cert_summary); -#endif /* CURL_BUILD_IOS */ - return server_cert_summary; -} - -#if CURL_SUPPORT_MAC_10_6 -/* The SecKeychainSearch API was deprecated in Lion, and using it will raise - deprecation warnings, so let's not compile this unless it's necessary: */ -static OSStatus CopyIdentityWithLabelOldSchool(char *label, - SecIdentityRef *out_c_a_k) -{ - OSStatus status = errSecItemNotFound; - SecKeychainAttributeList attr_list; - SecKeychainAttribute attr; - SecKeychainSearchRef search = NULL; - SecCertificateRef cert = NULL; - - /* Set up the attribute list: */ - attr_list.count = 1L; - attr_list.attr = &attr; - - /* Set up our lone search criterion: */ - attr.tag = kSecLabelItemAttr; - attr.data = label; - attr.length = (UInt32)strlen(label); - - /* Start searching: */ - status = SecKeychainSearchCreateFromAttributes(NULL, - kSecCertificateItemClass, - &attr_list, - &search); - if(status == noErr) { - status = SecKeychainSearchCopyNext(search, - (SecKeychainItemRef *)&cert); - if(status == noErr && cert) { - /* If we found a certificate, does it have a private key? */ - status = SecIdentityCreateWithCertificate(NULL, cert, out_c_a_k); - CFRelease(cert); - } - } - - if(search) - CFRelease(search); - return status; -} -#endif /* CURL_SUPPORT_MAC_10_6 */ - -static OSStatus CopyIdentityWithLabel(char *label, - SecIdentityRef *out_cert_and_key) -{ - OSStatus status = errSecItemNotFound; - -#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS - CFArrayRef keys_list; - CFIndex keys_list_count; - CFIndex i; - CFStringRef common_name; - - /* SecItemCopyMatching() was introduced in iOS and Snow Leopard. - kSecClassIdentity was introduced in Lion. If both exist, let's use them - to find the certificate. */ - if(SecItemCopyMatching != NULL && kSecClassIdentity != NULL) { - CFTypeRef keys[5]; - CFTypeRef values[5]; - CFDictionaryRef query_dict; - CFStringRef label_cf = CFStringCreateWithCString(NULL, label, - kCFStringEncodingUTF8); - - /* Set up our search criteria and expected results: */ - values[0] = kSecClassIdentity; /* we want a certificate and a key */ - keys[0] = kSecClass; - values[1] = kCFBooleanTrue; /* we want a reference */ - keys[1] = kSecReturnRef; - values[2] = kSecMatchLimitAll; /* kSecMatchLimitOne would be better if the - * label matching below worked correctly */ - keys[2] = kSecMatchLimit; - /* identity searches need a SecPolicyRef in order to work */ - values[3] = SecPolicyCreateSSL(false, NULL); - keys[3] = kSecMatchPolicy; - /* match the name of the certificate (doesn't work in macOS 10.12.1) */ - values[4] = label_cf; - keys[4] = kSecAttrLabel; - query_dict = CFDictionaryCreate(NULL, (const void **)keys, - (const void **)values, 5L, - &kCFCopyStringDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - CFRelease(values[3]); - - /* Do we have a match? */ - status = SecItemCopyMatching(query_dict, (CFTypeRef *) &keys_list); - - /* Because kSecAttrLabel matching doesn't work with kSecClassIdentity, - * we need to find the correct identity ourselves */ - if(status == noErr) { - keys_list_count = CFArrayGetCount(keys_list); - *out_cert_and_key = NULL; - status = 1; - for(i=0; idata; - curl_socket_t sockfd = conn->sock[sockindex]; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile); - const bool verifypeer = SSL_CONN_CONFIG(verifypeer); - char * const ssl_cert = SSL_SET_OPTION(cert); - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; -#ifdef ENABLE_IPV6 - struct in6_addr addr; -#else - struct in_addr addr; -#endif /* ENABLE_IPV6 */ - size_t all_ciphers_count = 0UL, allowed_ciphers_count = 0UL, i; - SSLCipherSuite *all_ciphers = NULL, *allowed_ciphers = NULL; - OSStatus err = noErr; -#if CURL_BUILD_MAC - int darwinver_maj = 0, darwinver_min = 0; - - GetDarwinVersionNumber(&darwinver_maj, &darwinver_min); -#endif /* CURL_BUILD_MAC */ - -#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS - if(SSLCreateContext != NULL) { /* use the newer API if avaialble */ - if(connssl->ssl_ctx) - CFRelease(connssl->ssl_ctx); - connssl->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType); - if(!connssl->ssl_ctx) { - failf(data, "SSL: couldn't create a context!"); - return CURLE_OUT_OF_MEMORY; - } - } - else { - /* The old ST API does not exist under iOS, so don't compile it: */ -#if CURL_SUPPORT_MAC_10_8 - if(connssl->ssl_ctx) - (void)SSLDisposeContext(connssl->ssl_ctx); - err = SSLNewContext(false, &(connssl->ssl_ctx)); - if(err != noErr) { - failf(data, "SSL: couldn't create a context: OSStatus %d", err); - return CURLE_OUT_OF_MEMORY; - } -#endif /* CURL_SUPPORT_MAC_10_8 */ - } -#else - if(connssl->ssl_ctx) - (void)SSLDisposeContext(connssl->ssl_ctx); - err = SSLNewContext(false, &(connssl->ssl_ctx)); - if(err != noErr) { - failf(data, "SSL: couldn't create a context: OSStatus %d", err); - return CURLE_OUT_OF_MEMORY; - } -#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ - connssl->ssl_write_buffered_length = 0UL; /* reset buffered write length */ - - /* check to see if we've been told to use an explicit SSL/TLS version */ -#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS - if(SSLSetProtocolVersionMax != NULL) { - switch(conn->ssl_config.version) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); - break; - case CURL_SSLVERSION_TLSv1_0: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol1); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol1); - break; - case CURL_SSLVERSION_TLSv1_1: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol11); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol11); - break; - case CURL_SSLVERSION_TLSv1_2: - (void)SSLSetProtocolVersionMin(connssl->ssl_ctx, kTLSProtocol12); - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kTLSProtocol12); - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "DarwinSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol3); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv3"); - return CURLE_SSL_CONNECT_ERROR; - } - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol3); - break; - case CURL_SSLVERSION_SSLv2: - err = SSLSetProtocolVersionMin(connssl->ssl_ctx, kSSLProtocol2); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - } - (void)SSLSetProtocolVersionMax(connssl->ssl_ctx, kSSLProtocol2); - break; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - } - else { -#if CURL_SUPPORT_MAC_10_8 - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kSSLProtocolAll, - false); - switch(conn->ssl_config.version) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol1, - true); - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol11, - true); - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol12, - true); - break; - case CURL_SSLVERSION_TLSv1_0: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol1, - true); - break; - case CURL_SSLVERSION_TLSv1_1: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol11, - true); - break; - case CURL_SSLVERSION_TLSv1_2: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol12, - true); - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "DarwinSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kSSLProtocol3, - true); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv3"); - return CURLE_SSL_CONNECT_ERROR; - } - break; - case CURL_SSLVERSION_SSLv2: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kSSLProtocol2, - true); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - } - break; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } -#endif /* CURL_SUPPORT_MAC_10_8 */ - } -#else - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocolAll, false); - switch(conn->ssl_config.version) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - case CURL_SSLVERSION_TLSv1_0: - (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kTLSProtocol1, - true); - break; - case CURL_SSLVERSION_TLSv1_1: - failf(data, "Your version of the OS does not support TLSv1.1"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_TLSv1_2: - failf(data, "Your version of the OS does not support TLSv1.2"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "Your version of the OS does not support TLSv1.3"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv2: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kSSLProtocol2, - true); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - } - break; - case CURL_SSLVERSION_SSLv3: - err = SSLSetProtocolVersionEnabled(connssl->ssl_ctx, - kSSLProtocol3, - true); - if(err != noErr) { - failf(data, "Your version of the OS does not support SSLv3"); - return CURLE_SSL_CONNECT_ERROR; - } - break; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } -#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ - - if(SSL_SET_OPTION(key)) { - infof(data, "WARNING: SSL: CURLOPT_SSLKEY is ignored by Secure " - "Transport. The private key must be in the Keychain.\n"); - } - - if(ssl_cert) { - SecIdentityRef cert_and_key = NULL; - bool is_cert_file = is_file(ssl_cert); - - /* User wants to authenticate with a client cert. Look for it: - If we detect that this is a file on disk, then let's load it. - Otherwise, assume that the user wants to use an identity loaded - from the Keychain. */ - if(is_cert_file) { - if(!SSL_SET_OPTION(cert_type)) - infof(data, "WARNING: SSL: Certificate type not set, assuming " - "PKCS#12 format.\n"); - else if(strncmp(SSL_SET_OPTION(cert_type), "P12", - strlen(SSL_SET_OPTION(cert_type))) != 0) - infof(data, "WARNING: SSL: The Security framework only supports " - "loading identities that are in PKCS#12 format.\n"); - - err = CopyIdentityFromPKCS12File(ssl_cert, - SSL_SET_OPTION(key_passwd), &cert_and_key); - } - else - err = CopyIdentityWithLabel(ssl_cert, &cert_and_key); - - if(err == noErr) { - SecCertificateRef cert = NULL; - CFTypeRef certs_c[1]; - CFArrayRef certs; - - /* If we found one, print it out: */ - err = SecIdentityCopyCertificate(cert_and_key, &cert); - if(err == noErr) { - CFStringRef cert_summary = CopyCertSubject(cert); - char cert_summary_c[128]; - - if(cert_summary) { - memset(cert_summary_c, 0, 128); - if(CFStringGetCString(cert_summary, - cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Client certificate: %s\n", cert_summary_c); - } - CFRelease(cert_summary); - CFRelease(cert); - } - } - certs_c[0] = cert_and_key; - certs = CFArrayCreate(NULL, (const void **)certs_c, 1L, - &kCFTypeArrayCallBacks); - err = SSLSetCertificate(connssl->ssl_ctx, certs); - if(certs) - CFRelease(certs); - if(err != noErr) { - failf(data, "SSL: SSLSetCertificate() failed: OSStatus %d", err); - return CURLE_SSL_CERTPROBLEM; - } - CFRelease(cert_and_key); - } - else { - switch(err) { - case errSecAuthFailed: case -25264: /* errSecPkcs12VerifyFailure */ - failf(data, "SSL: Incorrect password for the certificate \"%s\" " - "and its private key.", ssl_cert); - break; - case -26275: /* errSecDecode */ case -25257: /* errSecUnknownFormat */ - failf(data, "SSL: Couldn't make sense of the data in the " - "certificate \"%s\" and its private key.", - ssl_cert); - break; - case -25260: /* errSecPassphraseRequired */ - failf(data, "SSL The certificate \"%s\" requires a password.", - ssl_cert); - break; - case errSecItemNotFound: - failf(data, "SSL: Can't find the certificate \"%s\" and its private " - "key in the Keychain.", ssl_cert); - break; - default: - failf(data, "SSL: Can't load the certificate \"%s\" and its private " - "key: OSStatus %d", ssl_cert, err); - break; - } - return CURLE_SSL_CERTPROBLEM; - } - } - - /* SSL always tries to verify the peer, this only says whether it should - * fail to connect if the verification fails, or if it should continue - * anyway. In the latter case the result of the verification is checked with - * SSL_get_verify_result() below. */ -#if CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS - /* Snow Leopard introduced the SSLSetSessionOption() function, but due to - a library bug with the way the kSSLSessionOptionBreakOnServerAuth flag - works, it doesn't work as expected under Snow Leopard, Lion or - Mountain Lion. - So we need to call SSLSetEnableCertVerify() on those older cats in order - to disable certificate validation if the user turned that off. - (SecureTransport will always validate the certificate chain by - default.) - Note: - Darwin 11.x.x is Lion (10.7) - Darwin 12.x.x is Mountain Lion (10.8) - Darwin 13.x.x is Mavericks (10.9) - Darwin 14.x.x is Yosemite (10.10) - Darwin 15.x.x is El Capitan (10.11) - */ -#if CURL_BUILD_MAC - if(SSLSetSessionOption != NULL && darwinver_maj >= 13) { -#else - if(SSLSetSessionOption != NULL) { -#endif /* CURL_BUILD_MAC */ - bool break_on_auth = !conn->ssl_config.verifypeer || ssl_cafile; - err = SSLSetSessionOption(connssl->ssl_ctx, - kSSLSessionOptionBreakOnServerAuth, - break_on_auth); - if(err != noErr) { - failf(data, "SSL: SSLSetSessionOption() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } - } - else { -#if CURL_SUPPORT_MAC_10_8 - err = SSLSetEnableCertVerify(connssl->ssl_ctx, - conn->ssl_config.verifypeer?true:false); - if(err != noErr) { - failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } -#endif /* CURL_SUPPORT_MAC_10_8 */ - } -#else - err = SSLSetEnableCertVerify(connssl->ssl_ctx, - conn->ssl_config.verifypeer?true:false); - if(err != noErr) { - failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } -#endif /* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */ - - if(ssl_cafile && verifypeer) { - bool is_cert_file = is_file(ssl_cafile); - - if(!is_cert_file) { - failf(data, "SSL: can't load CA certificate file %s", ssl_cafile); - return CURLE_SSL_CACERT_BADFILE; - } - } - - /* Configure hostname check. SNI is used if available. - * Both hostname check and SNI require SSLSetPeerDomainName(). - * Also: the verifyhost setting influences SNI usage */ - if(conn->ssl_config.verifyhost) { - err = SSLSetPeerDomainName(connssl->ssl_ctx, hostname, - strlen(hostname)); - - if(err != noErr) { - infof(data, "WARNING: SSL: SSLSetPeerDomainName() failed: OSStatus %d\n", - err); - } - - if((Curl_inet_pton(AF_INET, hostname, &addr)) - #ifdef ENABLE_IPV6 - || (Curl_inet_pton(AF_INET6, hostname, &addr)) - #endif - ) { - infof(data, "WARNING: using IP address, SNI is being disabled by " - "the OS.\n"); - } - } - - /* Disable cipher suites that ST supports but are not safe. These ciphers - are unlikely to be used in any case since ST gives other ciphers a much - higher priority, but it's probably better that we not connect at all than - to give the user a false sense of security if the server only supports - insecure ciphers. (Note: We don't care about SSLv2-only ciphers.) */ - (void)SSLGetNumberSupportedCiphers(connssl->ssl_ctx, &all_ciphers_count); - all_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite)); - allowed_ciphers = malloc(all_ciphers_count*sizeof(SSLCipherSuite)); - if(all_ciphers && allowed_ciphers && - SSLGetSupportedCiphers(connssl->ssl_ctx, all_ciphers, - &all_ciphers_count) == noErr) { - for(i = 0UL ; i < all_ciphers_count ; i++) { -#if CURL_BUILD_MAC - /* There's a known bug in early versions of Mountain Lion where ST's ECC - ciphers (cipher suite 0xC001 through 0xC032) simply do not work. - Work around the problem here by disabling those ciphers if we are - running in an affected version of OS X. */ - if(darwinver_maj == 12 && darwinver_min <= 3 && - all_ciphers[i] >= 0xC001 && all_ciphers[i] <= 0xC032) { - continue; - } -#endif /* CURL_BUILD_MAC */ - switch(all_ciphers[i]) { - /* Disable NULL ciphersuites: */ - case SSL_NULL_WITH_NULL_NULL: - case SSL_RSA_WITH_NULL_MD5: - case SSL_RSA_WITH_NULL_SHA: - case 0x003B: /* TLS_RSA_WITH_NULL_SHA256 */ - case SSL_FORTEZZA_DMS_WITH_NULL_SHA: - case 0xC001: /* TLS_ECDH_ECDSA_WITH_NULL_SHA */ - case 0xC006: /* TLS_ECDHE_ECDSA_WITH_NULL_SHA */ - case 0xC00B: /* TLS_ECDH_RSA_WITH_NULL_SHA */ - case 0xC010: /* TLS_ECDHE_RSA_WITH_NULL_SHA */ - case 0x002C: /* TLS_PSK_WITH_NULL_SHA */ - case 0x002D: /* TLS_DHE_PSK_WITH_NULL_SHA */ - case 0x002E: /* TLS_RSA_PSK_WITH_NULL_SHA */ - case 0x00B0: /* TLS_PSK_WITH_NULL_SHA256 */ - case 0x00B1: /* TLS_PSK_WITH_NULL_SHA384 */ - case 0x00B4: /* TLS_DHE_PSK_WITH_NULL_SHA256 */ - case 0x00B5: /* TLS_DHE_PSK_WITH_NULL_SHA384 */ - case 0x00B8: /* TLS_RSA_PSK_WITH_NULL_SHA256 */ - case 0x00B9: /* TLS_RSA_PSK_WITH_NULL_SHA384 */ - /* Disable anonymous ciphersuites: */ - case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5: - case SSL_DH_anon_WITH_RC4_128_MD5: - case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA: - case SSL_DH_anon_WITH_DES_CBC_SHA: - case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA: - case TLS_DH_anon_WITH_AES_128_CBC_SHA: - case TLS_DH_anon_WITH_AES_256_CBC_SHA: - case 0xC015: /* TLS_ECDH_anon_WITH_NULL_SHA */ - case 0xC016: /* TLS_ECDH_anon_WITH_RC4_128_SHA */ - case 0xC017: /* TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA */ - case 0xC018: /* TLS_ECDH_anon_WITH_AES_128_CBC_SHA */ - case 0xC019: /* TLS_ECDH_anon_WITH_AES_256_CBC_SHA */ - case 0x006C: /* TLS_DH_anon_WITH_AES_128_CBC_SHA256 */ - case 0x006D: /* TLS_DH_anon_WITH_AES_256_CBC_SHA256 */ - case 0x00A6: /* TLS_DH_anon_WITH_AES_128_GCM_SHA256 */ - case 0x00A7: /* TLS_DH_anon_WITH_AES_256_GCM_SHA384 */ - /* Disable weak key ciphersuites: */ - case SSL_RSA_EXPORT_WITH_RC4_40_MD5: - case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5: - case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA: - case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA: - case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA: - case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA: - case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA: - case SSL_RSA_WITH_DES_CBC_SHA: - case SSL_DH_DSS_WITH_DES_CBC_SHA: - case SSL_DH_RSA_WITH_DES_CBC_SHA: - case SSL_DHE_DSS_WITH_DES_CBC_SHA: - case SSL_DHE_RSA_WITH_DES_CBC_SHA: - /* Disable IDEA: */ - case SSL_RSA_WITH_IDEA_CBC_SHA: - case SSL_RSA_WITH_IDEA_CBC_MD5: - /* Disable RC4: */ - case SSL_RSA_WITH_RC4_128_MD5: - case SSL_RSA_WITH_RC4_128_SHA: - case 0xC002: /* TLS_ECDH_ECDSA_WITH_RC4_128_SHA */ - case 0xC007: /* TLS_ECDHE_ECDSA_WITH_RC4_128_SHA*/ - case 0xC00C: /* TLS_ECDH_RSA_WITH_RC4_128_SHA */ - case 0xC011: /* TLS_ECDHE_RSA_WITH_RC4_128_SHA */ - case 0x008A: /* TLS_PSK_WITH_RC4_128_SHA */ - case 0x008E: /* TLS_DHE_PSK_WITH_RC4_128_SHA */ - case 0x0092: /* TLS_RSA_PSK_WITH_RC4_128_SHA */ - break; - default: /* enable everything else */ - allowed_ciphers[allowed_ciphers_count++] = all_ciphers[i]; - break; - } - } - err = SSLSetEnabledCiphers(connssl->ssl_ctx, allowed_ciphers, - allowed_ciphers_count); - if(err != noErr) { - failf(data, "SSL: SSLSetEnabledCiphers() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } - } - else { - Curl_safefree(all_ciphers); - Curl_safefree(allowed_ciphers); - failf(data, "SSL: Failed to allocate memory for allowed ciphers"); - return CURLE_OUT_OF_MEMORY; - } - Curl_safefree(all_ciphers); - Curl_safefree(allowed_ciphers); - -#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 - /* We want to enable 1/n-1 when using a CBC cipher unless the user - specifically doesn't want us doing that: */ - if(SSLSetSessionOption != NULL) { - /* TODO s/data->set.ssl.enable_beast/SSL_SET_OPTION(enable_beast)/g */ - SSLSetSessionOption(connssl->ssl_ctx, kSSLSessionOptionSendOneByteRecord, - !data->set.ssl.enable_beast); - SSLSetSessionOption(connssl->ssl_ctx, kSSLSessionOptionFalseStart, - data->set.ssl.falsestart); /* false start support */ - } -#endif /* CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 */ - - /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { - char *ssl_sessionid; - size_t ssl_sessionid_len; - - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, (void **)&ssl_sessionid, - &ssl_sessionid_len, sockindex)) { - /* we got a session id, use it! */ - err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len); - Curl_ssl_sessionid_unlock(conn); - if(err != noErr) { - failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } - /* Informational message */ - infof(data, "SSL re-using session ID\n"); - } - /* If there isn't one, then let's make one up! This has to be done prior - to starting the handshake. */ - else { - CURLcode result; - ssl_sessionid = - aprintf("%s:%d:%d:%s:%hu", ssl_cafile, - verifypeer, SSL_CONN_CONFIG(verifyhost), hostname, port); - ssl_sessionid_len = strlen(ssl_sessionid); - - err = SSLSetPeerID(connssl->ssl_ctx, ssl_sessionid, ssl_sessionid_len); - if(err != noErr) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "SSL: SSLSetPeerID() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } - - result = Curl_ssl_addsessionid(conn, ssl_sessionid, ssl_sessionid_len, - sockindex); - Curl_ssl_sessionid_unlock(conn); - if(result) { - failf(data, "failed to store ssl session"); - return result; - } - } - } - - err = SSLSetIOFuncs(connssl->ssl_ctx, SocketRead, SocketWrite); - if(err != noErr) { - failf(data, "SSL: SSLSetIOFuncs() failed: OSStatus %d", err); - return CURLE_SSL_CONNECT_ERROR; - } - - /* pass the raw socket into the SSL layers */ - /* We need to store the FD in a constant memory address, because - * SSLSetConnection() will not copy that address. I've found that - * conn->sock[sockindex] may change on its own. */ - connssl->ssl_sockfd = sockfd; - err = SSLSetConnection(connssl->ssl_ctx, connssl); - if(err != noErr) { - failf(data, "SSL: SSLSetConnection() failed: %d", err); - return CURLE_SSL_CONNECT_ERROR; - } - - connssl->connecting_state = ssl_connect_2; - return CURLE_OK; -} - -static long pem_to_der(const char *in, unsigned char **out, size_t *outlen) -{ - char *sep_start, *sep_end, *cert_start, *cert_end; - size_t i, j, err; - size_t len; - unsigned char *b64; - - /* Jump through the separators at the beginning of the certificate. */ - sep_start = strstr(in, "-----"); - if(sep_start == NULL) - return 0; - cert_start = strstr(sep_start + 1, "-----"); - if(cert_start == NULL) - return -1; - - cert_start += 5; - - /* Find separator after the end of the certificate. */ - cert_end = strstr(cert_start, "-----"); - if(cert_end == NULL) - return -1; - - sep_end = strstr(cert_end + 1, "-----"); - if(sep_end == NULL) - return -1; - sep_end += 5; - - len = cert_end - cert_start; - b64 = malloc(len + 1); - if(!b64) - return -1; - - /* Create base64 string without linefeeds. */ - for(i = 0, j = 0; i < len; i++) { - if(cert_start[i] != '\r' && cert_start[i] != '\n') - b64[j++] = cert_start[i]; - } - b64[j] = '\0'; - - err = Curl_base64_decode((const char *)b64, out, outlen); - free(b64); - if(err) { - free(*out); - return -1; - } - - return sep_end - in; -} - -static int read_cert(const char *file, unsigned char **out, size_t *outlen) -{ - int fd; - ssize_t n, len = 0, cap = 512; - unsigned char buf[cap], *data; - - fd = open(file, 0); - if(fd < 0) - return -1; - - data = malloc(cap); - if(!data) { - close(fd); - return -1; - } - - for(;;) { - n = read(fd, buf, sizeof(buf)); - if(n < 0) { - close(fd); - free(data); - return -1; - } - else if(n == 0) { - close(fd); - break; - } - - if(len + n >= cap) { - cap *= 2; - data = realloc(data, cap); - if(!data) { - close(fd); - return -1; - } - } - - memcpy(data + len, buf, n); - len += n; - } - data[len] = '\0'; - - *out = data; - *outlen = len; - - return 0; -} - -static int sslerr_to_curlerr(struct Curl_easy *data, int err) -{ - switch(err) { - case errSSLXCertChainInvalid: - failf(data, "SSL certificate problem: Invalid certificate chain"); - return CURLE_SSL_CACERT; - case errSSLUnknownRootCert: - failf(data, "SSL certificate problem: Untrusted root certificate"); - return CURLE_SSL_CACERT; - case errSSLNoRootCert: - failf(data, "SSL certificate problem: No root certificate"); - return CURLE_SSL_CACERT; - case errSSLCertExpired: - failf(data, "SSL certificate problem: Certificate chain had an " - "expired certificate"); - return CURLE_SSL_CACERT; - case errSSLBadCert: - failf(data, "SSL certificate problem: Couldn't understand the server " - "certificate format"); - return CURLE_SSL_CONNECT_ERROR; - case errSSLHostNameMismatch: - failf(data, "SSL certificate peer hostname mismatch"); - return CURLE_PEER_FAILED_VERIFICATION; - default: - failf(data, "SSL unexpected certificate error %d", err); - return CURLE_SSL_CACERT; - } -} - -static int append_cert_to_array(struct Curl_easy *data, - unsigned char *buf, size_t buflen, - CFMutableArrayRef array) -{ - CFDataRef certdata = CFDataCreate(kCFAllocatorDefault, buf, buflen); - if(!certdata) { - failf(data, "SSL: failed to allocate array for CA certificate"); - return CURLE_OUT_OF_MEMORY; - } - - SecCertificateRef cacert = - SecCertificateCreateWithData(kCFAllocatorDefault, certdata); - CFRelease(certdata); - if(!cacert) { - failf(data, "SSL: failed to create SecCertificate from CA certificate"); - return CURLE_SSL_CACERT; - } - - /* Check if cacert is valid. */ - CFStringRef subject = CopyCertSubject(cacert); - if(subject) { - char subject_cbuf[128]; - memset(subject_cbuf, 0, 128); - if(!CFStringGetCString(subject, - subject_cbuf, - 128, - kCFStringEncodingUTF8)) { - CFRelease(cacert); - failf(data, "SSL: invalid CA certificate subject"); - return CURLE_SSL_CACERT; - } - CFRelease(subject); - } - else { - CFRelease(cacert); - failf(data, "SSL: invalid CA certificate"); - return CURLE_SSL_CACERT; - } - - CFArrayAppendValue(array, cacert); - CFRelease(cacert); - - return CURLE_OK; -} - -static int verify_cert(const char *cafile, struct Curl_easy *data, - SSLContextRef ctx) -{ - int n = 0, rc; - long res; - unsigned char *certbuf, *der; - size_t buflen, derlen, offset = 0; - - if(read_cert(cafile, &certbuf, &buflen) < 0) { - failf(data, "SSL: failed to read or invalid CA certificate"); - return CURLE_SSL_CACERT; - } - - /* - * Certbuf now contains the contents of the certificate file, which can be - * - a single DER certificate, - * - a single PEM certificate or - * - a bunch of PEM certificates (certificate bundle). - * - * Go through certbuf, and convert any PEM certificate in it into DER - * format. - */ - CFMutableArrayRef array = CFArrayCreateMutable(kCFAllocatorDefault, 0, - &kCFTypeArrayCallBacks); - if(array == NULL) { - free(certbuf); - failf(data, "SSL: out of memory creating CA certificate array"); - return CURLE_OUT_OF_MEMORY; - } - - while(offset < buflen) { - n++; - - /* - * Check if the certificate is in PEM format, and convert it to DER. If - * this fails, we assume the certificate is in DER format. - */ - res = pem_to_der((const char *)certbuf + offset, &der, &derlen); - if(res < 0) { - free(certbuf); - CFRelease(array); - failf(data, "SSL: invalid CA certificate #%d (offset %d) in bundle", - n, offset); - return CURLE_SSL_CACERT; - } - offset += res; - - if(res == 0 && offset == 0) { - /* This is not a PEM file, probably a certificate in DER format. */ - rc = append_cert_to_array(data, certbuf, buflen, array); - free(certbuf); - if(rc != CURLE_OK) { - CFRelease(array); - return rc; - } - break; - } - else if(res == 0) { - /* No more certificates in the bundle. */ - free(certbuf); - break; - } - - rc = append_cert_to_array(data, der, derlen, array); - free(der); - if(rc != CURLE_OK) { - free(certbuf); - CFRelease(array); - return rc; - } - } - - SecTrustRef trust; - OSStatus ret = SSLCopyPeerTrust(ctx, &trust); - if(trust == NULL) { - failf(data, "SSL: error getting certificate chain"); - CFRelease(array); - return CURLE_OUT_OF_MEMORY; - } - else if(ret != noErr) { - CFRelease(array); - return sslerr_to_curlerr(data, ret); - } - - ret = SecTrustSetAnchorCertificates(trust, array); - if(ret != noErr) { - CFRelease(trust); - return sslerr_to_curlerr(data, ret); - } - ret = SecTrustSetAnchorCertificatesOnly(trust, true); - if(ret != noErr) { - CFRelease(trust); - return sslerr_to_curlerr(data, ret); - } - - SecTrustResultType trust_eval = 0; - ret = SecTrustEvaluate(trust, &trust_eval); - CFRelease(array); - CFRelease(trust); - if(ret != noErr) { - return sslerr_to_curlerr(data, ret); - } - - switch(trust_eval) { - case kSecTrustResultUnspecified: - case kSecTrustResultProceed: - return CURLE_OK; - - case kSecTrustResultRecoverableTrustFailure: - case kSecTrustResultDeny: - default: - failf(data, "SSL: certificate verification failed (result: %d)", - trust_eval); - return CURLE_PEER_FAILED_VERIFICATION; - } -} - -static CURLcode -darwinssl_connect_step2(struct connectdata *conn, int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - OSStatus err; - SSLCipherSuite cipher; - SSLProtocol protocol = 0; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - DEBUGASSERT(ssl_connect_2 == connssl->connecting_state - || ssl_connect_2_reading == connssl->connecting_state - || ssl_connect_2_writing == connssl->connecting_state); - - /* Here goes nothing: */ - err = SSLHandshake(connssl->ssl_ctx); - - if(err != noErr) { - switch(err) { - case errSSLWouldBlock: /* they're not done with us yet */ - connssl->connecting_state = connssl->ssl_direction ? - ssl_connect_2_writing : ssl_connect_2_reading; - return CURLE_OK; - - /* The below is errSSLServerAuthCompleted; it's not defined in - Leopard's headers */ - case -9841: - if(SSL_CONN_CONFIG(CAfile) && SSL_CONN_CONFIG(verifypeer)) { - int res = verify_cert(SSL_CONN_CONFIG(CAfile), data, - connssl->ssl_ctx); - if(res != CURLE_OK) - return res; - } - /* the documentation says we need to call SSLHandshake() again */ - return darwinssl_connect_step2(conn, sockindex); - - /* These are all certificate problems with the server: */ - case errSSLXCertChainInvalid: - failf(data, "SSL certificate problem: Invalid certificate chain"); - return CURLE_SSL_CACERT; - case errSSLUnknownRootCert: - failf(data, "SSL certificate problem: Untrusted root certificate"); - return CURLE_SSL_CACERT; - case errSSLNoRootCert: - failf(data, "SSL certificate problem: No root certificate"); - return CURLE_SSL_CACERT; - case errSSLCertExpired: - failf(data, "SSL certificate problem: Certificate chain had an " - "expired certificate"); - return CURLE_SSL_CACERT; - case errSSLBadCert: - failf(data, "SSL certificate problem: Couldn't understand the server " - "certificate format"); - return CURLE_SSL_CONNECT_ERROR; - - /* These are all certificate problems with the client: */ - case errSecAuthFailed: - failf(data, "SSL authentication failed"); - return CURLE_SSL_CONNECT_ERROR; - case errSSLPeerHandshakeFail: - failf(data, "SSL peer handshake failed, the server most likely " - "requires a client certificate to connect"); - return CURLE_SSL_CONNECT_ERROR; - case errSSLPeerUnknownCA: - failf(data, "SSL server rejected the client certificate due to " - "the certificate being signed by an unknown certificate " - "authority"); - return CURLE_SSL_CONNECT_ERROR; - - /* This error is raised if the server's cert didn't match the server's - host name: */ - case errSSLHostNameMismatch: - failf(data, "SSL certificate peer verification failed, the " - "certificate did not match \"%s\"\n", conn->host.dispname); - return CURLE_PEER_FAILED_VERIFICATION; - - /* Generic handshake errors: */ - case errSSLConnectionRefused: - failf(data, "Server dropped the connection during the SSL handshake"); - return CURLE_SSL_CONNECT_ERROR; - case errSSLClosedAbort: - failf(data, "Server aborted the SSL handshake"); - return CURLE_SSL_CONNECT_ERROR; - case errSSLNegotiation: - failf(data, "Could not negotiate an SSL cipher suite with the server"); - return CURLE_SSL_CONNECT_ERROR; - /* Sometimes paramErr happens with buggy ciphers: */ - case paramErr: case errSSLInternal: - failf(data, "Internal SSL engine error encountered during the " - "SSL handshake"); - return CURLE_SSL_CONNECT_ERROR; - case errSSLFatalAlert: - failf(data, "Fatal SSL engine error encountered during the SSL " - "handshake"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unknown SSL protocol error in connection to %s:%d", - hostname, err); - return CURLE_SSL_CONNECT_ERROR; - } - } - else { - /* we have been connected fine, we're not waiting for anything else. */ - connssl->connecting_state = ssl_connect_3; - - /* Informational message */ - (void)SSLGetNegotiatedCipher(connssl->ssl_ctx, &cipher); - (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol); - switch(protocol) { - case kSSLProtocol2: - infof(data, "SSL 2.0 connection using %s\n", - SSLCipherNameForNumber(cipher)); - break; - case kSSLProtocol3: - infof(data, "SSL 3.0 connection using %s\n", - SSLCipherNameForNumber(cipher)); - break; - case kTLSProtocol1: - infof(data, "TLS 1.0 connection using %s\n", - TLSCipherNameForNumber(cipher)); - break; -#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS - case kTLSProtocol11: - infof(data, "TLS 1.1 connection using %s\n", - TLSCipherNameForNumber(cipher)); - break; - case kTLSProtocol12: - infof(data, "TLS 1.2 connection using %s\n", - TLSCipherNameForNumber(cipher)); - break; -#endif - default: - infof(data, "Unknown protocol connection\n"); - break; - } - - return CURLE_OK; - } -} - -#ifndef CURL_DISABLE_VERBOSE_STRINGS -/* This should be called during step3 of the connection at the earliest */ -static void -show_verbose_server_cert(struct connectdata *conn, - int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - CFStringRef server_cert_summary; - char server_cert_summary_c[128]; - CFArrayRef server_certs = NULL; - SecCertificateRef server_cert; - OSStatus err; - CFIndex i, count; - SecTrustRef trust = NULL; - - if(!connssl->ssl_ctx) - return; - -#if CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS -#if CURL_BUILD_IOS -#pragma unused(server_certs) - err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust); - /* For some reason, SSLCopyPeerTrust() can return noErr and yet return - a null trust, so be on guard for that: */ - if(err == noErr && trust) { - count = SecTrustGetCertificateCount(trust); - for(i = 0L ; i < count ; i++) { - server_cert = SecTrustGetCertificateAtIndex(trust, i); - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); - } - CFRelease(server_cert_summary); - } - CFRelease(trust); - } -#else - /* SSLCopyPeerCertificates() is deprecated as of Mountain Lion. - The function SecTrustGetCertificateAtIndex() is officially present - in Lion, but it is unfortunately also present in Snow Leopard as - private API and doesn't work as expected. So we have to look for - a different symbol to make sure this code is only executed under - Lion or later. */ - if(SecTrustEvaluateAsync != NULL) { -#pragma unused(server_certs) - err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust); - /* For some reason, SSLCopyPeerTrust() can return noErr and yet return - a null trust, so be on guard for that: */ - if(err == noErr && trust) { - count = SecTrustGetCertificateCount(trust); - for(i = 0L ; i < count ; i++) { - server_cert = SecTrustGetCertificateAtIndex(trust, i); - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); - } - CFRelease(server_cert_summary); - } - CFRelease(trust); - } - } - else { -#if CURL_SUPPORT_MAC_10_8 - err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs); - /* Just in case SSLCopyPeerCertificates() returns null too... */ - if(err == noErr && server_certs) { - count = CFArrayGetCount(server_certs); - for(i = 0L ; i < count ; i++) { - server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, - i); - - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); - } - CFRelease(server_cert_summary); - } - CFRelease(server_certs); - } -#endif /* CURL_SUPPORT_MAC_10_8 */ - } -#endif /* CURL_BUILD_IOS */ -#else -#pragma unused(trust) - err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs); - if(err == noErr) { - count = CFArrayGetCount(server_certs); - for(i = 0L ; i < count ; i++) { - server_cert = (SecCertificateRef)CFArrayGetValueAtIndex(server_certs, i); - server_cert_summary = CopyCertSubject(server_cert); - memset(server_cert_summary_c, 0, 128); - if(CFStringGetCString(server_cert_summary, - server_cert_summary_c, - 128, - kCFStringEncodingUTF8)) { - infof(data, "Server certificate: %s\n", server_cert_summary_c); - } - CFRelease(server_cert_summary); - } - CFRelease(server_certs); - } -#endif /* CURL_BUILD_MAC_10_7 || CURL_BUILD_IOS */ -} -#endif /* !CURL_DISABLE_VERBOSE_STRINGS */ - -static CURLcode -darwinssl_connect_step3(struct connectdata *conn, - int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - /* There is no step 3! - * Well, okay, if verbose mode is on, let's print the details of the - * server certificates. */ -#ifndef CURL_DISABLE_VERBOSE_STRINGS - if(data->set.verbose) - show_verbose_server_cert(conn, sockindex); -#endif - - connssl->connecting_state = ssl_connect_done; - return CURLE_OK; -} - -static Curl_recv darwinssl_recv; -static Curl_send darwinssl_send; - -static CURLcode -darwinssl_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - curl_socket_t sockfd = conn->sock[sockindex]; - long timeout_ms; - int what; - - /* check if the connection has already been established */ - if(ssl_connection_complete == connssl->state) { - *done = TRUE; - return CURLE_OK; - } - - if(ssl_connect_1==connssl->connecting_state) { - /* Find out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - result = darwinssl_connect_step1(conn, sockindex); - if(result) - return result; - } - - while(ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state) { - - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading || - connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing == - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading == - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking?0:timeout_ms); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) { - *done = FALSE; - return CURLE_OK; - } - else { - /* timeout */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - /* Run transaction, and return to the caller if it failed or if this - * connection is done nonblocking and this loop would execute again. This - * permits the owner of a multi handle to abort a connection attempt - * before step2 has completed while ensuring that a client using select() - * or epoll() will always have a valid fdset to wait on. - */ - result = darwinssl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; - - } /* repeat step2 until all transactions are done. */ - - - if(ssl_connect_3 == connssl->connecting_state) { - result = darwinssl_connect_step3(conn, sockindex); - if(result) - return result; - } - - if(ssl_connect_done == connssl->connecting_state) { - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = darwinssl_recv; - conn->send[sockindex] = darwinssl_send; - *done = TRUE; - } - else - *done = FALSE; - - /* Reset our connect state machine */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - -CURLcode -Curl_darwinssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - return darwinssl_connect_common(conn, sockindex, TRUE, done); -} - -CURLcode -Curl_darwinssl_connect(struct connectdata *conn, - int sockindex) -{ - CURLcode result; - bool done = FALSE; - - result = darwinssl_connect_common(conn, sockindex, FALSE, &done); - - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -void Curl_darwinssl_close(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - if(connssl->ssl_ctx) { - (void)SSLClose(connssl->ssl_ctx); -#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS - if(SSLCreateContext != NULL) - CFRelease(connssl->ssl_ctx); -#if CURL_SUPPORT_MAC_10_8 - else - (void)SSLDisposeContext(connssl->ssl_ctx); -#endif /* CURL_SUPPORT_MAC_10_8 */ -#else - (void)SSLDisposeContext(connssl->ssl_ctx); -#endif /* CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS */ - connssl->ssl_ctx = NULL; - } - connssl->ssl_sockfd = 0; -} - -int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - ssize_t nread; - int what; - int rc; - char buf[120]; - - if(!connssl->ssl_ctx) - return 0; - - if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE) - return 0; - - Curl_darwinssl_close(conn, sockindex); - - rc = 0; - - what = SOCKET_READABLE(conn->sock[sockindex], SSL_SHUTDOWN_TIMEOUT); - - for(;;) { - if(what < 0) { - /* anything that gets here is fatally bad */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - rc = -1; - break; - } - - if(!what) { /* timeout */ - failf(data, "SSL shutdown timeout"); - break; - } - - /* Something to read, let's do it and hope that it is the close - notify alert from the server. No way to SSL_Read now, so use read(). */ - - nread = read(conn->sock[sockindex], buf, sizeof(buf)); - - if(nread < 0) { - failf(data, "read: %s", strerror(errno)); - rc = -1; - } - - if(nread <= 0) - break; - - what = SOCKET_READABLE(conn->sock[sockindex], 0); - } - - return rc; -} - -void Curl_darwinssl_session_free(void *ptr) -{ - /* ST, as of iOS 5 and Mountain Lion, has no public method of deleting a - cached session ID inside the Security framework. There is a private - function that does this, but I don't want to have to explain to you why I - got your application rejected from the App Store due to the use of a - private API, so the best we can do is free up our own char array that we - created way back in darwinssl_connect_step1... */ - Curl_safefree(ptr); -} - -size_t Curl_darwinssl_version(char *buffer, size_t size) -{ - return snprintf(buffer, size, "SecureTransport"); -} - -/* - * This function uses SSLGetSessionState to determine connection status. - * - * Return codes: - * 1 means the connection is still in place - * 0 means the connection has been closed - * -1 means the connection status is unknown - */ -int Curl_darwinssl_check_cxn(struct connectdata *conn) -{ - struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET]; - OSStatus err; - SSLSessionState state; - - if(connssl->ssl_ctx) { - err = SSLGetSessionState(connssl->ssl_ctx, &state); - if(err == noErr) - return state == kSSLConnected || state == kSSLHandshake; - return -1; - } - return 0; -} - -bool Curl_darwinssl_data_pending(const struct connectdata *conn, - int connindex) -{ - const struct ssl_connect_data *connssl = &conn->ssl[connindex]; - OSStatus err; - size_t buffer; - - if(connssl->ssl_ctx) { /* SSL is in use */ - err = SSLGetBufferedReadSize(connssl->ssl_ctx, &buffer); - if(err == noErr) - return buffer > 0UL; - return false; - } - else - return false; -} - -CURLcode Curl_darwinssl_random(unsigned char *entropy, - size_t length) -{ - /* arc4random_buf() isn't available on cats older than Lion, so let's - do this manually for the benefit of the older cats. */ - size_t i; - u_int32_t random_number = 0; - - for(i = 0 ; i < length ; i++) { - if(i % sizeof(u_int32_t) == 0) - random_number = arc4random(); - entropy[i] = random_number & 0xFF; - random_number >>= 8; - } - i = random_number = 0; - return CURLE_OK; -} - -void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) -{ - (void)md5len; - (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum); -} - -bool Curl_darwinssl_false_start(void) -{ -#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 - if(SSLSetSessionOption != NULL) - return TRUE; -#endif - return FALSE; -} - -static ssize_t darwinssl_send(struct connectdata *conn, - int sockindex, - const void *mem, - size_t len, - CURLcode *curlcode) -{ - /*struct Curl_easy *data = conn->data;*/ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - size_t processed = 0UL; - OSStatus err; - - /* The SSLWrite() function works a little differently than expected. The - fourth argument (processed) is currently documented in Apple's - documentation as: "On return, the length, in bytes, of the data actually - written." - - Now, one could interpret that as "written to the socket," but actually, - it returns the amount of data that was written to a buffer internal to - the SSLContextRef instead. So it's possible for SSLWrite() to return - errSSLWouldBlock and a number of bytes "written" because those bytes were - encrypted and written to a buffer, not to the socket. - - So if this happens, then we need to keep calling SSLWrite() over and - over again with no new data until it quits returning errSSLWouldBlock. */ - - /* Do we have buffered data to write from the last time we were called? */ - if(connssl->ssl_write_buffered_length) { - /* Write the buffered data: */ - err = SSLWrite(connssl->ssl_ctx, NULL, 0UL, &processed); - switch(err) { - case noErr: - /* processed is always going to be 0 because we didn't write to - the buffer, so return how much was written to the socket */ - processed = connssl->ssl_write_buffered_length; - connssl->ssl_write_buffered_length = 0UL; - break; - case errSSLWouldBlock: /* argh, try again */ - *curlcode = CURLE_AGAIN; - return -1L; - default: - failf(conn->data, "SSLWrite() returned error %d", err); - *curlcode = CURLE_SEND_ERROR; - return -1L; - } - } - else { - /* We've got new data to write: */ - err = SSLWrite(connssl->ssl_ctx, mem, len, &processed); - if(err != noErr) { - switch(err) { - case errSSLWouldBlock: - /* Data was buffered but not sent, we have to tell the caller - to try sending again, and remember how much was buffered */ - connssl->ssl_write_buffered_length = len; - *curlcode = CURLE_AGAIN; - return -1L; - default: - failf(conn->data, "SSLWrite() returned error %d", err); - *curlcode = CURLE_SEND_ERROR; - return -1L; - } - } - } - return (ssize_t)processed; -} - -static ssize_t darwinssl_recv(struct connectdata *conn, - int num, - char *buf, - size_t buffersize, - CURLcode *curlcode) -{ - /*struct Curl_easy *data = conn->data;*/ - struct ssl_connect_data *connssl = &conn->ssl[num]; - size_t processed = 0UL; - OSStatus err = SSLRead(connssl->ssl_ctx, buf, buffersize, &processed); - - if(err != noErr) { - switch(err) { - case errSSLWouldBlock: /* return how much we read (if anything) */ - if(processed) - return (ssize_t)processed; - *curlcode = CURLE_AGAIN; - return -1L; - break; - - /* errSSLClosedGraceful - server gracefully shut down the SSL session - errSSLClosedNoNotify - server hung up on us instead of sending a - closure alert notice, read() is returning 0 - Either way, inform the caller that the server disconnected. */ - case errSSLClosedGraceful: - case errSSLClosedNoNotify: - *curlcode = CURLE_OK; - return -1L; - break; - - default: - failf(conn->data, "SSLRead() return error %d", err); - *curlcode = CURLE_RECV_ERROR; - return -1L; - break; - } - } - return (ssize_t)processed; -} - -#endif /* USE_DARWINSSL */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/darwinssl.h b/build/premake/premake5/contrib/curl/lib/vtls/darwinssl.h deleted file mode 100644 index 4bd41ca470..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/darwinssl.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef HEADER_CURL_DARWINSSL_H -#define HEADER_CURL_DARWINSSL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2014, Nick Zitzmann, . - * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef USE_DARWINSSL - -CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -/* close a SSL connection */ -void Curl_darwinssl_close(struct connectdata *conn, int sockindex); - -void Curl_darwinssl_session_free(void *ptr); -size_t Curl_darwinssl_version(char *buffer, size_t size); -int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex); -int Curl_darwinssl_check_cxn(struct connectdata *conn); -bool Curl_darwinssl_data_pending(const struct connectdata *conn, - int connindex); - -CURLcode Curl_darwinssl_random(unsigned char *entropy, - size_t length); -void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); -bool Curl_darwinssl_false_start(void); - -/* Set the API backend definition to SecureTransport */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL - -/* API setup for SecureTransport */ -#define curlssl_init() (1) -#define curlssl_cleanup() Curl_nop_stmt -#define curlssl_connect Curl_darwinssl_connect -#define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking -#define curlssl_session_free(x) Curl_darwinssl_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_darwinssl_close -#define curlssl_shutdown(x,y) 0 -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_darwinssl_version -#define curlssl_check_cxn Curl_darwinssl_check_cxn -#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y) -#define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z)) -#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d) -#define curlssl_false_start() Curl_darwinssl_false_start() - -#endif /* USE_DARWINSSL */ -#endif /* HEADER_CURL_DARWINSSL_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/gskit.c b/build/premake/premake5/contrib/curl/lib/vtls/gskit.c deleted file mode 100644 index a0d462b70a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/gskit.c +++ /dev/null @@ -1,1307 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_GSKIT - -#include -#include - -/* Some symbols are undefined/unsupported on OS400 versions < V7R1. */ -#ifndef GSK_SSL_EXTN_SERVERNAME_REQUEST -#define GSK_SSL_EXTN_SERVERNAME_REQUEST 230 -#endif - -#ifndef GSK_TLSV10_CIPHER_SPECS -#define GSK_TLSV10_CIPHER_SPECS 236 -#endif - -#ifndef GSK_TLSV11_CIPHER_SPECS -#define GSK_TLSV11_CIPHER_SPECS 237 -#endif - -#ifndef GSK_TLSV12_CIPHER_SPECS -#define GSK_TLSV12_CIPHER_SPECS 238 -#endif - -#ifndef GSK_PROTOCOL_TLSV11 -#define GSK_PROTOCOL_TLSV11 437 -#endif - -#ifndef GSK_PROTOCOL_TLSV12 -#define GSK_PROTOCOL_TLSV12 438 -#endif - -#ifndef GSK_FALSE -#define GSK_FALSE 0 -#endif - -#ifndef GSK_TRUE -#define GSK_TRUE 1 -#endif - - -#ifdef HAVE_LIMITS_H -# include -#endif - -#include -#include "urldata.h" -#include "sendf.h" -#include "gskit.h" -#include "vtls.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "strcase.h" -#include "x509asn1.h" -#include "curl_printf.h" - -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - - -/* Directions. */ -#define SOS_READ 0x01 -#define SOS_WRITE 0x02 - -/* SSL version flags. */ -#define CURL_GSKPROTO_SSLV2 0 -#define CURL_GSKPROTO_SSLV2_MASK (1 << CURL_GSKPROTO_SSLV2) -#define CURL_GSKPROTO_SSLV3 1 -#define CURL_GSKPROTO_SSLV3_MASK (1 << CURL_GSKPROTO_SSLV3) -#define CURL_GSKPROTO_TLSV10 2 -#define CURL_GSKPROTO_TLSV10_MASK (1 << CURL_GSKPROTO_TLSV10) -#define CURL_GSKPROTO_TLSV11 3 -#define CURL_GSKPROTO_TLSV11_MASK (1 << CURL_GSKPROTO_TLSV11) -#define CURL_GSKPROTO_TLSV12 4 -#define CURL_GSKPROTO_TLSV12_MASK (1 << CURL_GSKPROTO_TLSV12) -#define CURL_GSKPROTO_LAST 5 - - -/* Supported ciphers. */ -typedef struct { - const char *name; /* Cipher name. */ - const char *gsktoken; /* Corresponding token for GSKit String. */ - unsigned int versions; /* SSL version flags. */ -} gskit_cipher; - -static const gskit_cipher ciphertable[] = { - { "null-md5", "01", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK }, - { "null-sha", "02", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK }, - { "exp-rc4-md5", "03", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK }, - { "rc4-md5", "04", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK }, - { "rc4-sha", "05", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK }, - { "exp-rc2-cbc-md5", "06", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK }, - { "exp-des-cbc-sha", "09", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK }, - { "des-cbc3-sha", "0A", - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK }, - { "aes128-sha", "2F", - CURL_GSKPROTO_TLSV10_MASK | CURL_GSKPROTO_TLSV11_MASK | - CURL_GSKPROTO_TLSV12_MASK }, - { "aes256-sha", "35", - CURL_GSKPROTO_TLSV10_MASK | CURL_GSKPROTO_TLSV11_MASK | - CURL_GSKPROTO_TLSV12_MASK }, - { "null-sha256", "3B", CURL_GSKPROTO_TLSV12_MASK }, - { "aes128-sha256", "3C", CURL_GSKPROTO_TLSV12_MASK }, - { "aes256-sha256", "3D", CURL_GSKPROTO_TLSV12_MASK }, - { "aes128-gcm-sha256", - "9C", CURL_GSKPROTO_TLSV12_MASK }, - { "aes256-gcm-sha384", - "9D", CURL_GSKPROTO_TLSV12_MASK }, - { "rc4-md5", "1", CURL_GSKPROTO_SSLV2_MASK }, - { "exp-rc4-md5", "2", CURL_GSKPROTO_SSLV2_MASK }, - { "rc2-md5", "3", CURL_GSKPROTO_SSLV2_MASK }, - { "exp-rc2-md5", "4", CURL_GSKPROTO_SSLV2_MASK }, - { "des-cbc-md5", "6", CURL_GSKPROTO_SSLV2_MASK }, - { "des-cbc3-md5", "7", CURL_GSKPROTO_SSLV2_MASK }, - { (const char *) NULL, (const char *) NULL, 0 } -}; - - -static bool is_separator(char c) -{ - /* Return whether character is a cipher list separator. */ - switch(c) { - case ' ': - case '\t': - case ':': - case ',': - case ';': - return true; - } - return false; -} - - -static CURLcode gskit_status(struct Curl_easy *data, int rc, - const char *procname, CURLcode defcode) -{ - /* Process GSKit status and map it to a CURLcode. */ - switch(rc) { - case GSK_OK: - case GSK_OS400_ASYNCHRONOUS_SOC_INIT: - return CURLE_OK; - case GSK_KEYRING_OPEN_ERROR: - case GSK_OS400_ERROR_NO_ACCESS: - return CURLE_SSL_CACERT_BADFILE; - case GSK_INSUFFICIENT_STORAGE: - return CURLE_OUT_OF_MEMORY; - case GSK_ERROR_BAD_V2_CIPHER: - case GSK_ERROR_BAD_V3_CIPHER: - case GSK_ERROR_NO_CIPHERS: - return CURLE_SSL_CIPHER; - case GSK_OS400_ERROR_NOT_TRUSTED_ROOT: - case GSK_ERROR_CERT_VALIDATION: - return CURLE_PEER_FAILED_VERIFICATION; - case GSK_OS400_ERROR_TIMED_OUT: - return CURLE_OPERATION_TIMEDOUT; - case GSK_WOULD_BLOCK: - return CURLE_AGAIN; - case GSK_OS400_ERROR_NOT_REGISTERED: - break; - case GSK_ERROR_IO: - switch(errno) { - case ENOMEM: - return CURLE_OUT_OF_MEMORY; - default: - failf(data, "%s I/O error: %s", procname, strerror(errno)); - break; - } - break; - default: - failf(data, "%s: %s", procname, gsk_strerror(rc)); - break; - } - return defcode; -} - - -static CURLcode set_enum(struct Curl_easy *data, gsk_handle h, - GSK_ENUM_ID id, GSK_ENUM_VALUE value, bool unsupported_ok) -{ - int rc = gsk_attribute_set_enum(h, id, value); - - switch(rc) { - case GSK_OK: - return CURLE_OK; - case GSK_ERROR_IO: - failf(data, "gsk_attribute_set_enum() I/O error: %s", strerror(errno)); - break; - case GSK_ATTRIBUTE_INVALID_ID: - if(unsupported_ok) - return CURLE_UNSUPPORTED_PROTOCOL; - default: - failf(data, "gsk_attribute_set_enum(): %s", gsk_strerror(rc)); - break; - } - return CURLE_SSL_CONNECT_ERROR; -} - - -static CURLcode set_buffer(struct Curl_easy *data, gsk_handle h, - GSK_BUF_ID id, const char *buffer, bool unsupported_ok) -{ - int rc = gsk_attribute_set_buffer(h, id, buffer, 0); - - switch(rc) { - case GSK_OK: - return CURLE_OK; - case GSK_ERROR_IO: - failf(data, "gsk_attribute_set_buffer() I/O error: %s", strerror(errno)); - break; - case GSK_ATTRIBUTE_INVALID_ID: - if(unsupported_ok) - return CURLE_UNSUPPORTED_PROTOCOL; - default: - failf(data, "gsk_attribute_set_buffer(): %s", gsk_strerror(rc)); - break; - } - return CURLE_SSL_CONNECT_ERROR; -} - - -static CURLcode set_numeric(struct Curl_easy *data, - gsk_handle h, GSK_NUM_ID id, int value) -{ - int rc = gsk_attribute_set_numeric_value(h, id, value); - - switch(rc) { - case GSK_OK: - return CURLE_OK; - case GSK_ERROR_IO: - failf(data, "gsk_attribute_set_numeric_value() I/O error: %s", - strerror(errno)); - break; - default: - failf(data, "gsk_attribute_set_numeric_value(): %s", gsk_strerror(rc)); - break; - } - return CURLE_SSL_CONNECT_ERROR; -} - - -static CURLcode set_callback(struct Curl_easy *data, - gsk_handle h, GSK_CALLBACK_ID id, void *info) -{ - int rc = gsk_attribute_set_callback(h, id, info); - - switch(rc) { - case GSK_OK: - return CURLE_OK; - case GSK_ERROR_IO: - failf(data, "gsk_attribute_set_callback() I/O error: %s", strerror(errno)); - break; - default: - failf(data, "gsk_attribute_set_callback(): %s", gsk_strerror(rc)); - break; - } - return CURLE_SSL_CONNECT_ERROR; -} - - -static CURLcode set_ciphers(struct connectdata *conn, - gsk_handle h, unsigned int *protoflags) -{ - struct Curl_easy *data = conn->data; - const char *cipherlist = SSL_CONN_CONFIG(cipher_list); - const char *clp; - const gskit_cipher *ctp; - int i; - int l; - bool unsupported; - CURLcode result; - struct { - char *buf; - char *ptr; - } ciphers[CURL_GSKPROTO_LAST]; - - /* Compile cipher list into GSKit-compatible cipher lists. */ - - if(!cipherlist) - return CURLE_OK; - while(is_separator(*cipherlist)) /* Skip initial separators. */ - cipherlist++; - if(!*cipherlist) - return CURLE_OK; - - /* We allocate GSKit buffers of the same size as the input string: since - GSKit tokens are always shorter than their cipher names, allocated buffers - will always be large enough to accomodate the result. */ - l = strlen(cipherlist) + 1; - memset((char *) ciphers, 0, sizeof ciphers); - for(i = 0; i < CURL_GSKPROTO_LAST; i++) { - ciphers[i].buf = malloc(l); - if(!ciphers[i].buf) { - while(i--) - free(ciphers[i].buf); - return CURLE_OUT_OF_MEMORY; - } - ciphers[i].ptr = ciphers[i].buf; - *ciphers[i].ptr = '\0'; - } - - /* Process each cipher in input string. */ - unsupported = FALSE; - result = CURLE_OK; - for(;;) { - for(clp = cipherlist; *cipherlist && !is_separator(*cipherlist);) - cipherlist++; - l = cipherlist - clp; - if(!l) - break; - /* Search the cipher in our table. */ - for(ctp = ciphertable; ctp->name; ctp++) - if(strncasecompare(ctp->name, clp, l) && !ctp->name[l]) - break; - if(!ctp->name) { - failf(data, "Unknown cipher %.*s", l, clp); - result = CURLE_SSL_CIPHER; - } - else { - unsupported |= !(ctp->versions & (CURL_GSKPROTO_SSLV2_MASK | - CURL_GSKPROTO_SSLV3_MASK | CURL_GSKPROTO_TLSV10_MASK)); - for(i = 0; i < CURL_GSKPROTO_LAST; i++) { - if(ctp->versions & (1 << i)) { - strcpy(ciphers[i].ptr, ctp->gsktoken); - ciphers[i].ptr += strlen(ctp->gsktoken); - } - } - } - - /* Advance to next cipher name or end of string. */ - while(is_separator(*cipherlist)) - cipherlist++; - } - - /* Disable protocols with empty cipher lists. */ - for(i = 0; i < CURL_GSKPROTO_LAST; i++) { - if(!(*protoflags & (1 << i)) || !ciphers[i].buf[0]) { - *protoflags &= ~(1 << i); - ciphers[i].buf[0] = '\0'; - } - } - - /* Try to set-up TLSv1.1 and TLSv2.1 ciphers. */ - if(*protoflags & CURL_GSKPROTO_TLSV11_MASK) { - result = set_buffer(data, h, GSK_TLSV11_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_TLSV11].buf, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; - if(unsupported) { - failf(data, "TLSv1.1-only ciphers are not yet supported"); - result = CURLE_SSL_CIPHER; - } - } - } - if(!result && (*protoflags & CURL_GSKPROTO_TLSV12_MASK)) { - result = set_buffer(data, h, GSK_TLSV12_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_TLSV12].buf, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; - if(unsupported) { - failf(data, "TLSv1.2-only ciphers are not yet supported"); - result = CURLE_SSL_CIPHER; - } - } - } - - /* Try to set-up TLSv1.0 ciphers. If not successful, concatenate them to - the SSLv3 ciphers. OS/400 prior to version 7.1 will understand it. */ - if(!result && (*protoflags & CURL_GSKPROTO_TLSV10_MASK)) { - result = set_buffer(data, h, GSK_TLSV10_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_TLSV10].buf, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; - strcpy(ciphers[CURL_GSKPROTO_SSLV3].ptr, - ciphers[CURL_GSKPROTO_TLSV10].ptr); - } - } - - /* Set-up other ciphers. */ - if(!result && (*protoflags & CURL_GSKPROTO_SSLV3_MASK)) - result = set_buffer(data, h, GSK_V3_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_SSLV3].buf, FALSE); - if(!result && (*protoflags & CURL_GSKPROTO_SSLV2_MASK)) - result = set_buffer(data, h, GSK_V2_CIPHER_SPECS, - ciphers[CURL_GSKPROTO_SSLV2].buf, FALSE); - - /* Clean-up. */ - for(i = 0; i < CURL_GSKPROTO_LAST; i++) - free(ciphers[i].buf); - - return result; -} - - -int Curl_gskit_init(void) -{ - /* No initialisation needed. */ - - return 1; -} - - -void Curl_gskit_cleanup(void) -{ - /* Nothing to do. */ -} - - -static CURLcode init_environment(struct Curl_easy *data, - gsk_handle *envir, const char *appid, - const char *file, const char *label, - const char *password) -{ - int rc; - CURLcode result; - gsk_handle h; - - /* Creates the GSKit environment. */ - - rc = gsk_environment_open(&h); - switch(rc) { - case GSK_OK: - break; - case GSK_INSUFFICIENT_STORAGE: - return CURLE_OUT_OF_MEMORY; - default: - failf(data, "gsk_environment_open(): %s", gsk_strerror(rc)); - return CURLE_SSL_CONNECT_ERROR; - } - - result = set_enum(data, h, GSK_SESSION_TYPE, GSK_CLIENT_SESSION, FALSE); - if(!result && appid) - result = set_buffer(data, h, GSK_OS400_APPLICATION_ID, appid, FALSE); - if(!result && file) - result = set_buffer(data, h, GSK_KEYRING_FILE, file, FALSE); - if(!result && label) - result = set_buffer(data, h, GSK_KEYRING_LABEL, label, FALSE); - if(!result && password) - result = set_buffer(data, h, GSK_KEYRING_PW, password, FALSE); - - if(!result) { - /* Locate CAs, Client certificate and key according to our settings. - Note: this call may be blocking for some tenths of seconds. */ - result = gskit_status(data, gsk_environment_init(h), - "gsk_environment_init()", CURLE_SSL_CERTPROBLEM); - if(!result) { - *envir = h; - return result; - } - } - /* Error: rollback. */ - gsk_environment_close(&h); - return result; -} - - -static void cancel_async_handshake(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - Qso_OverlappedIO_t cstat; - - if(QsoCancelOperation(conn->sock[sockindex], 0) > 0) - QsoWaitForIOCompletion(connssl->iocport, &cstat, (struct timeval *) NULL); -} - - -static void close_async_handshake(struct ssl_connect_data *connssl) -{ - QsoDestroyIOCompletionPort(connssl->iocport); - connssl->iocport = -1; -} - -/* SSL over SSL - * Problems: - * 1) GSKit can only perform SSL on an AF_INET or AF_INET6 stream socket. To - * pipe an SSL stream into another, it is therefore needed to have a pair - * of such communicating sockets and handle the pipelining explicitly. - * 2) OS/400 socketpair() is only implemented for domain AF_UNIX, thus cannot - * be used to produce the pipeline. - * The solution is to simulate socketpair() for AF_INET with low-level API - * listen(), bind() and connect(). - */ - -static int -inetsocketpair(int sv[2]) -{ - int lfd; /* Listening socket. */ - int sfd; /* Server socket. */ - int cfd; /* Client socket. */ - int len; - struct sockaddr_in addr1; - struct sockaddr_in addr2; - - /* Create listening socket on a local dynamic port. */ - lfd = socket(AF_INET, SOCK_STREAM, 0); - if(lfd < 0) - return -1; - memset((char *) &addr1, 0, sizeof addr1); - addr1.sin_family = AF_INET; - addr1.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - addr1.sin_port = 0; - if(bind(lfd, (struct sockaddr *) &addr1, sizeof addr1) || - listen(lfd, 2) < 0) { - close(lfd); - return -1; - } - - /* Get the allocated port. */ - len = sizeof addr1; - if(getsockname(lfd, (struct sockaddr *) &addr1, &len) < 0) { - close(lfd); - return -1; - } - - /* Create the client socket. */ - cfd = socket(AF_INET, SOCK_STREAM, 0); - if(cfd < 0) { - close(lfd); - return -1; - } - - /* Request unblocking connection to the listening socket. */ - curlx_nonblock(cfd, TRUE); - if(connect(cfd, (struct sockaddr *) &addr1, sizeof addr1) < 0 && - errno != EINPROGRESS) { - close(lfd); - close(cfd); - return -1; - } - - /* Get the client dynamic port for intrusion check below. */ - len = sizeof addr2; - if(getsockname(cfd, (struct sockaddr *) &addr2, &len) < 0) { - close(lfd); - close(cfd); - return -1; - } - - /* Accept the incoming connection and get the server socket. */ - curlx_nonblock(lfd, TRUE); - for(;;) { - len = sizeof addr1; - sfd = accept(lfd, (struct sockaddr *) &addr1, &len); - if(sfd < 0) { - close(lfd); - close(cfd); - return -1; - } - - /* Check for possible intrusion from an external process. */ - if(addr1.sin_addr.s_addr == addr2.sin_addr.s_addr && - addr1.sin_port == addr2.sin_port) - break; - - /* Intrusion: reject incoming connection. */ - close(sfd); - } - - /* Done, return sockets and succeed. */ - close(lfd); - curlx_nonblock(cfd, FALSE); - sv[0] = cfd; - sv[1] = sfd; - return 0; -} - -static int pipe_ssloverssl(struct connectdata *conn, int sockindex, - int directions) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct ssl_connect_data *connproxyssl = &conn->proxy_ssl[sockindex]; - fd_set fds_read; - fd_set fds_write; - int n; - int m; - int i; - int ret = 0; - struct timeval tv = {0, 0}; - char buf[CURL_MAX_WRITE_SIZE]; - - if(!connssl->use || !connproxyssl->use) - return 0; /* No SSL over SSL: OK. */ - - FD_ZERO(&fds_read); - FD_ZERO(&fds_write); - n = -1; - if(directions & SOS_READ) { - FD_SET(connssl->remotefd, &fds_write); - n = connssl->remotefd; - } - if(directions & SOS_WRITE) { - FD_SET(connssl->remotefd, &fds_read); - n = connssl->remotefd; - FD_SET(conn->sock[sockindex], &fds_write); - if(n < conn->sock[sockindex]) - n = conn->sock[sockindex]; - } - i = select(n + 1, &fds_read, &fds_write, NULL, &tv); - if(i < 0) - return -1; /* Select error. */ - - if(FD_ISSET(connssl->remotefd, &fds_write)) { - /* Try getting data from HTTPS proxy and pipe it upstream. */ - n = 0; - i = gsk_secure_soc_read(connproxyssl->handle, buf, sizeof buf, &n); - switch(i) { - case GSK_OK: - if(n) { - i = write(connssl->remotefd, buf, n); - if(i < 0) - return -1; - ret = 1; - } - break; - case GSK_OS400_ERROR_TIMED_OUT: - case GSK_WOULD_BLOCK: - break; - default: - return -1; - } - } - - if(FD_ISSET(connssl->remotefd, &fds_read) && - FD_ISSET(conn->sock[sockindex], &fds_write)) { - /* Pipe data to HTTPS proxy. */ - n = read(connssl->remotefd, buf, sizeof buf); - if(n < 0) - return -1; - if(n) { - i = gsk_secure_soc_write(connproxyssl->handle, buf, n, &m); - if(i != GSK_OK || n != m) - return -1; - ret = 1; - } - } - - return ret; /* OK */ -} - - -static void close_one(struct ssl_connect_data *connssl, - struct connectdata *conn, int sockindex) -{ - if(connssl->handle) { - gskit_status(conn->data, gsk_secure_soc_close(&connssl->handle), - "gsk_secure_soc_close()", 0); - /* Last chance to drain output. */ - while(pipe_ssloverssl(conn, sockindex, SOS_WRITE) > 0) - ; - connssl->handle = (gsk_handle) NULL; - if(connssl->localfd >= 0) { - close(connssl->localfd); - connssl->localfd = -1; - } - if(connssl->remotefd >= 0) { - close(connssl->remotefd); - connssl->remotefd = -1; - } - } - if(connssl->iocport >= 0) - close_async_handshake(connssl); -} - - -static ssize_t gskit_send(struct connectdata *conn, int sockindex, - const void *mem, size_t len, CURLcode *curlcode) -{ - struct Curl_easy *data = conn->data; - CURLcode cc = CURLE_SEND_ERROR; - int written; - - if(pipe_ssloverssl(conn, sockindex, SOS_WRITE) >= 0) { - cc = gskit_status(data, - gsk_secure_soc_write(conn->ssl[sockindex].handle, - (char *) mem, (int) len, &written), - "gsk_secure_soc_write()", CURLE_SEND_ERROR); - if(cc == CURLE_OK) - if(pipe_ssloverssl(conn, sockindex, SOS_WRITE) < 0) - cc = CURLE_SEND_ERROR; - } - if(cc != CURLE_OK) { - *curlcode = cc; - written = -1; - } - return (ssize_t) written; /* number of bytes */ -} - - -static ssize_t gskit_recv(struct connectdata *conn, int num, char *buf, - size_t buffersize, CURLcode *curlcode) -{ - struct Curl_easy *data = conn->data; - int buffsize; - int nread; - CURLcode cc = CURLE_RECV_ERROR; - - if(pipe_ssloverssl(conn, num, SOS_READ) >= 0) { - buffsize = buffersize > (size_t) INT_MAX? INT_MAX: (int) buffersize; - cc = gskit_status(data, gsk_secure_soc_read(conn->ssl[num].handle, - buf, buffsize, &nread), - "gsk_secure_soc_read()", CURLE_RECV_ERROR); - } - switch(cc) { - case CURLE_OK: - break; - case CURLE_OPERATION_TIMEDOUT: - cc = CURLE_AGAIN; - default: - *curlcode = cc; - nread = -1; - break; - } - return (ssize_t) nread; -} - - -static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - gsk_handle envir; - CURLcode result; - int rc; - const char * const keyringfile = SSL_CONN_CONFIG(CAfile); - const char * const keyringpwd = SSL_SET_OPTION(key_passwd); - const char * const keyringlabel = SSL_SET_OPTION(cert); - const long int ssl_version = SSL_CONN_CONFIG(version); - const bool verifypeer = SSL_CONN_CONFIG(verifypeer); - const char * const hostname = SSL_IS_PROXY()? conn->http_proxy.host.name: - conn->host.name; - const char *sni; - unsigned int protoflags; - long timeout; - Qso_OverlappedIO_t commarea; - int sockpair[2]; - static const int sobufsize = CURL_MAX_WRITE_SIZE; - - /* Create SSL environment, start (preferably asynchronous) handshake. */ - - connssl->handle = (gsk_handle) NULL; - connssl->iocport = -1; - connssl->localfd = -1; - connssl->remotefd = -1; - - /* GSKit supports two ways of specifying an SSL context: either by - * application identifier (that should have been defined at the system - * level) or by keyring file, password and certificate label. - * Local certificate name (CURLOPT_SSLCERT) is used to hold either the - * application identifier of the certificate label. - * Key password (CURLOPT_KEYPASSWD) holds the keyring password. - * It is not possible to have different keyrings for the CAs and the - * local certificate. We thus use the CA file (CURLOPT_CAINFO) to identify - * the keyring file. - * If no key password is given and the keyring is the system keyring, - * application identifier mode is tried first, as recommended in IBM doc. - */ - - envir = (gsk_handle) NULL; - - if(keyringlabel && *keyringlabel && !keyringpwd && - !strcmp(keyringfile, CURL_CA_BUNDLE)) { - /* Try application identifier mode. */ - init_environment(data, &envir, keyringlabel, (const char *) NULL, - (const char *) NULL, (const char *) NULL); - } - - if(!envir) { - /* Use keyring mode. */ - result = init_environment(data, &envir, (const char *) NULL, - keyringfile, keyringlabel, keyringpwd); - if(result) - return result; - } - - /* Create secure session. */ - result = gskit_status(data, gsk_secure_soc_open(envir, &connssl->handle), - "gsk_secure_soc_open()", CURLE_SSL_CONNECT_ERROR); - gsk_environment_close(&envir); - if(result) - return result; - - /* Establish a pipelining socket pair for SSL over SSL. */ - if(conn->proxy_ssl[sockindex].use) { - if(inetsocketpair(sockpair)) - return CURLE_SSL_CONNECT_ERROR; - connssl->localfd = sockpair[0]; - connssl->remotefd = sockpair[1]; - setsockopt(connssl->localfd, SOL_SOCKET, SO_RCVBUF, - (void *) sobufsize, sizeof sobufsize); - setsockopt(connssl->remotefd, SOL_SOCKET, SO_RCVBUF, - (void *) sobufsize, sizeof sobufsize); - setsockopt(connssl->localfd, SOL_SOCKET, SO_SNDBUF, - (void *) sobufsize, sizeof sobufsize); - setsockopt(connssl->remotefd, SOL_SOCKET, SO_SNDBUF, - (void *) sobufsize, sizeof sobufsize); - curlx_nonblock(connssl->localfd, TRUE); - curlx_nonblock(connssl->remotefd, TRUE); - } - - /* Determine which SSL/TLS version should be enabled. */ - sni = hostname; - switch(ssl_version) { - case CURL_SSLVERSION_SSLv2: - protoflags = CURL_GSKPROTO_SSLV2_MASK; - sni = NULL; - break; - case CURL_SSLVERSION_SSLv3: - protoflags = CURL_GSKPROTO_SSLV3_MASK; - sni = NULL; - break; - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - protoflags = CURL_GSKPROTO_TLSV10_MASK | - CURL_GSKPROTO_TLSV11_MASK | CURL_GSKPROTO_TLSV12_MASK; - break; - case CURL_SSLVERSION_TLSv1_0: - protoflags = CURL_GSKPROTO_TLSV10_MASK; - break; - case CURL_SSLVERSION_TLSv1_1: - protoflags = CURL_GSKPROTO_TLSV11_MASK; - break; - case CURL_SSLVERSION_TLSv1_2: - protoflags = CURL_GSKPROTO_TLSV12_MASK; - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "GSKit: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - /* Process SNI. Ignore if not supported (on OS400 < V7R1). */ - if(sni) { - result = set_buffer(data, connssl->handle, - GSK_SSL_EXTN_SERVERNAME_REQUEST, sni, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) - result = CURLE_OK; - } - - /* Set session parameters. */ - if(!result) { - /* Compute the handshake timeout. Since GSKit granularity is 1 second, - we round up the required value. */ - timeout = Curl_timeleft(data, NULL, TRUE); - if(timeout < 0) - result = CURLE_OPERATION_TIMEDOUT; - else - result = set_numeric(data, connssl->handle, GSK_HANDSHAKE_TIMEOUT, - (timeout + 999) / 1000); - } - if(!result) - result = set_numeric(data, connssl->handle, GSK_OS400_READ_TIMEOUT, 1); - if(!result) - result = set_numeric(data, connssl->handle, GSK_FD, connssl->localfd >= 0? - connssl->localfd: conn->sock[sockindex]); - if(!result) - result = set_ciphers(conn, connssl->handle, &protoflags); - if(!protoflags) { - failf(data, "No SSL protocol/cipher combination enabled"); - result = CURLE_SSL_CIPHER; - } - if(!result) - result = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV2, - (protoflags & CURL_GSKPROTO_SSLV2_MASK)? - GSK_PROTOCOL_SSLV2_ON: GSK_PROTOCOL_SSLV2_OFF, FALSE); - if(!result) - result = set_enum(data, connssl->handle, GSK_PROTOCOL_SSLV3, - (protoflags & CURL_GSKPROTO_SSLV3_MASK)? - GSK_PROTOCOL_SSLV3_ON: GSK_PROTOCOL_SSLV3_OFF, FALSE); - if(!result) - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV1, - (protoflags & CURL_GSKPROTO_TLSV10_MASK)? - GSK_PROTOCOL_TLSV1_ON: GSK_PROTOCOL_TLSV1_OFF, FALSE); - if(!result) { - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV11, - (protoflags & CURL_GSKPROTO_TLSV11_MASK)? - GSK_TRUE: GSK_FALSE, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; - if(protoflags == CURL_GSKPROTO_TLSV11_MASK) { - failf(data, "TLS 1.1 not yet supported"); - result = CURLE_SSL_CIPHER; - } - } - } - if(!result) { - result = set_enum(data, connssl->handle, GSK_PROTOCOL_TLSV12, - (protoflags & CURL_GSKPROTO_TLSV12_MASK)? - GSK_TRUE: GSK_FALSE, TRUE); - if(result == CURLE_UNSUPPORTED_PROTOCOL) { - result = CURLE_OK; - if(protoflags == CURL_GSKPROTO_TLSV12_MASK) { - failf(data, "TLS 1.2 not yet supported"); - result = CURLE_SSL_CIPHER; - } - } - } - if(!result) - result = set_enum(data, connssl->handle, GSK_SERVER_AUTH_TYPE, - verifypeer? GSK_SERVER_AUTH_FULL: - GSK_SERVER_AUTH_PASSTHRU, FALSE); - - if(!result) { - /* Start handshake. Try asynchronous first. */ - memset(&commarea, 0, sizeof commarea); - connssl->iocport = QsoCreateIOCompletionPort(); - if(connssl->iocport != -1) { - result = gskit_status(data, - gsk_secure_soc_startInit(connssl->handle, - connssl->iocport, - &commarea), - "gsk_secure_soc_startInit()", - CURLE_SSL_CONNECT_ERROR); - if(!result) { - connssl->connecting_state = ssl_connect_2; - return CURLE_OK; - } - else - close_async_handshake(connssl); - } - else if(errno != ENOBUFS) - result = gskit_status(data, GSK_ERROR_IO, - "QsoCreateIOCompletionPort()", 0); - else if(conn->proxy_ssl[sockindex].use) { - /* Cannot pipeline while handshaking synchronously. */ - result = CURLE_SSL_CONNECT_ERROR; - } - else { - /* No more completion port available. Use synchronous IO. */ - result = gskit_status(data, gsk_secure_soc_init(connssl->handle), - "gsk_secure_soc_init()", CURLE_SSL_CONNECT_ERROR); - if(!result) { - connssl->connecting_state = ssl_connect_3; - return CURLE_OK; - } - } - } - - /* Error: rollback. */ - close_one(connssl, conn, sockindex); - return result; -} - - -static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex, - bool nonblocking) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - Qso_OverlappedIO_t cstat; - long timeout_ms; - struct timeval stmv; - CURLcode result; - - /* Poll or wait for end of SSL asynchronous handshake. */ - - for(;;) { - timeout_ms = nonblocking? 0: Curl_timeleft(data, NULL, TRUE); - if(timeout_ms < 0) - timeout_ms = 0; - stmv.tv_sec = timeout_ms / 1000; - stmv.tv_usec = (timeout_ms - stmv.tv_sec * 1000) * 1000; - switch(QsoWaitForIOCompletion(connssl->iocport, &cstat, &stmv)) { - case 1: /* Operation complete. */ - break; - case -1: /* An error occurred: handshake still in progress. */ - if(errno == EINTR) { - if(nonblocking) - return CURLE_OK; - continue; /* Retry. */ - } - if(errno != ETIME) { - failf(data, "QsoWaitForIOCompletion() I/O error: %s", strerror(errno)); - cancel_async_handshake(conn, sockindex); - close_async_handshake(connssl); - return CURLE_SSL_CONNECT_ERROR; - } - /* FALL INTO... */ - case 0: /* Handshake in progress, timeout occurred. */ - if(nonblocking) - return CURLE_OK; - cancel_async_handshake(conn, sockindex); - close_async_handshake(connssl); - return CURLE_OPERATION_TIMEDOUT; - } - break; - } - result = gskit_status(data, cstat.returnValue, "SSL handshake", - CURLE_SSL_CONNECT_ERROR); - if(!result) - connssl->connecting_state = ssl_connect_3; - close_async_handshake(connssl); - return result; -} - - -static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - const gsk_cert_data_elem *cdev; - int cdec; - const gsk_cert_data_elem *p; - const char *cert = (const char *) NULL; - const char *certend; - const char *ptr; - int i; - CURLcode result; - - /* SSL handshake done: gather certificate info and verify host. */ - - if(gskit_status(data, gsk_attribute_get_cert_info(connssl->handle, - GSK_PARTNER_CERT_INFO, - &cdev, &cdec), - "gsk_attribute_get_cert_info()", CURLE_SSL_CONNECT_ERROR) == - CURLE_OK) { - infof(data, "Server certificate:\n"); - p = cdev; - for(i = 0; i++ < cdec; p++) - switch(p->cert_data_id) { - case CERT_BODY_DER: - cert = p->cert_data_p; - certend = cert + cdev->cert_data_l; - break; - case CERT_DN_PRINTABLE: - infof(data, "\t subject: %.*s\n", p->cert_data_l, p->cert_data_p); - break; - case CERT_ISSUER_DN_PRINTABLE: - infof(data, "\t issuer: %.*s\n", p->cert_data_l, p->cert_data_p); - break; - case CERT_VALID_FROM: - infof(data, "\t start date: %.*s\n", p->cert_data_l, p->cert_data_p); - break; - case CERT_VALID_TO: - infof(data, "\t expire date: %.*s\n", p->cert_data_l, p->cert_data_p); - break; - } - } - - /* Verify host. */ - result = Curl_verifyhost(conn, cert, certend); - if(result) - return result; - - /* The only place GSKit can get the whole CA chain is a validation - callback where no user data pointer is available. Therefore it's not - possible to copy this chain into our structures for CAINFO. - However the server certificate may be available, thus we can return - info about it. */ - if(data->set.ssl.certinfo) { - result = Curl_ssl_init_certinfo(data, 1); - if(result) - return result; - - if(cert) { - result = Curl_extract_certinfo(conn, 0, cert, certend); - if(result) - return result; - } - } - - /* Check pinned public key. */ - ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - if(!result && ptr) { - curl_X509certificate x509; - curl_asn1Element *p; - - if(Curl_parseX509(&x509, cert, certend)) - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - p = &x509.subjectPublicKeyInfo; - result = Curl_pin_peer_pubkey(data, ptr, p->header, p->end - p->header); - if(result) { - failf(data, "SSL: public key does not match pinned public key!"); - return result; - } - } - - connssl->connecting_state = ssl_connect_done; - return CURLE_OK; -} - - -static CURLcode gskit_connect_common(struct connectdata *conn, int sockindex, - bool nonblocking, bool *done) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - long timeout_ms; - Qso_OverlappedIO_t cstat; - CURLcode result = CURLE_OK; - - *done = connssl->state == ssl_connection_complete; - if(*done) - return CURLE_OK; - - /* Step 1: create session, start handshake. */ - if(connssl->connecting_state == ssl_connect_1) { - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - result = CURLE_OPERATION_TIMEDOUT; - } - else - result = gskit_connect_step1(conn, sockindex); - } - - /* Handle handshake pipelining. */ - if(!result) - if(pipe_ssloverssl(conn, sockindex, SOS_READ | SOS_WRITE) < 0) - result = CURLE_SSL_CONNECT_ERROR; - - /* Step 2: check if handshake is over. */ - if(!result && connssl->connecting_state == ssl_connect_2) { - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - result = CURLE_OPERATION_TIMEDOUT; - } - else - result = gskit_connect_step2(conn, sockindex, nonblocking); - } - - /* Handle handshake pipelining. */ - if(!result) - if(pipe_ssloverssl(conn, sockindex, SOS_READ | SOS_WRITE) < 0) - result = CURLE_SSL_CONNECT_ERROR; - - /* Step 3: gather certificate info, verify host. */ - if(!result && connssl->connecting_state == ssl_connect_3) - result = gskit_connect_step3(conn, sockindex); - - if(result) - close_one(connssl, conn, sockindex); - else if(connssl->connecting_state == ssl_connect_done) { - connssl->state = ssl_connection_complete; - connssl->connecting_state = ssl_connect_1; - conn->recv[sockindex] = gskit_recv; - conn->send[sockindex] = gskit_send; - *done = TRUE; - } - - return result; -} - - -CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - CURLcode result; - - result = gskit_connect_common(conn, sockindex, TRUE, done); - if(*done || result) - conn->ssl[sockindex].connecting_state = ssl_connect_1; - return result; -} - - -CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex) -{ - CURLcode result; - bool done; - - conn->ssl[sockindex].connecting_state = ssl_connect_1; - result = gskit_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - - -void Curl_gskit_close(struct connectdata *conn, int sockindex) -{ - close_one(&conn->ssl[sockindex], conn, sockindex); - close_one(&conn->proxy_ssl[sockindex], conn, sockindex); -} - - -int Curl_gskit_shutdown(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - ssize_t nread; - int what; - int rc; - char buf[120]; - - if(!connssl->handle) - return 0; - - if(data->set.ftp_ccc != CURLFTPSSL_CCC_ACTIVE) - return 0; - - close_one(connssl, conn, sockindex); - rc = 0; - what = SOCKET_READABLE(conn->sock[sockindex], - SSL_SHUTDOWN_TIMEOUT); - - for(;;) { - if(what < 0) { - /* anything that gets here is fatally bad */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - rc = -1; - break; - } - - if(!what) { /* timeout */ - failf(data, "SSL shutdown timeout"); - break; - } - - /* Something to read, let's do it and hope that it is the close - notify alert from the server. No way to gsk_secure_soc_read() now, so - use read(). */ - - nread = read(conn->sock[sockindex], buf, sizeof(buf)); - - if(nread < 0) { - failf(data, "read: %s", strerror(errno)); - rc = -1; - } - - if(nread <= 0) - break; - - what = SOCKET_READABLE(conn->sock[sockindex], 0); - } - - return rc; -} - - -size_t Curl_gskit_version(char *buffer, size_t size) -{ - strncpy(buffer, "GSKit", size); - return strlen(buffer); -} - - -int Curl_gskit_check_cxn(struct connectdata *cxn) -{ - int err; - int errlen; - - /* The only thing that can be tested here is at the socket level. */ - - if(!cxn->ssl[FIRSTSOCKET].handle) - return 0; /* connection has been closed */ - - err = 0; - errlen = sizeof err; - - if(getsockopt(cxn->sock[FIRSTSOCKET], SOL_SOCKET, SO_ERROR, - (unsigned char *) &err, &errlen) || - errlen != sizeof err || err) - return 0; /* connection has been closed */ - - return -1; /* connection status unknown */ -} - -#endif /* USE_GSKIT */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/gskit.h b/build/premake/premake5/contrib/curl/lib/vtls/gskit.h deleted file mode 100644 index 229759217a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/gskit.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef HEADER_CURL_GSKIT_H -#define HEADER_CURL_GSKIT_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -/* - * This header should only be needed to get included by vtls.c and gskit.c - */ - -#include "urldata.h" - -#ifdef USE_GSKIT -int Curl_gskit_init(void); -void Curl_gskit_cleanup(void); -CURLcode Curl_gskit_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_gskit_connect_nonblocking(struct connectdata *conn, - int sockindex, bool *done); -void Curl_gskit_close(struct connectdata *conn, int sockindex); -int Curl_gskit_shutdown(struct connectdata *conn, int sockindex); - -size_t Curl_gskit_version(char *buffer, size_t size); -int Curl_gskit_check_cxn(struct connectdata *cxn); - -/* Support HTTPS-proxy */ -/* TODO: add '#define HTTPS_PROXY_SUPPORT 1' and fix test #1014 (if need) */ - -/* Set the API backend definition to GSKit */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* API setup for GSKit */ -#define curlssl_init Curl_gskit_init -#define curlssl_cleanup Curl_gskit_cleanup -#define curlssl_connect Curl_gskit_connect -#define curlssl_connect_nonblocking Curl_gskit_connect_nonblocking - -/* No session handling for GSKit */ -#define curlssl_session_free(x) Curl_nop_stmt -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_gskit_close -#define curlssl_shutdown(x,y) Curl_gskit_shutdown(x,y) -#define curlssl_set_engine(x,y) CURLE_NOT_BUILT_IN -#define curlssl_set_engine_default(x) CURLE_NOT_BUILT_IN -#define curlssl_engines_list(x) NULL -#define curlssl_version Curl_gskit_version -#define curlssl_check_cxn(x) Curl_gskit_check_cxn(x) -#define curlssl_data_pending(x,y) 0 -#define curlssl_random(x,y,z) (x=x, y=y, z=z, CURLE_NOT_BUILT_IN) - -#endif /* USE_GSKIT */ - -#endif /* HEADER_CURL_GSKIT_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/gtls.c b/build/premake/premake5/contrib/curl/lib/vtls/gtls.c deleted file mode 100644 index faa70aca2a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/gtls.c +++ /dev/null @@ -1,1700 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all GnuTLS-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - * - * Note: don't use the GnuTLS' *_t variable type names in this source code, - * since they were not present in 1.0.X. - */ - -#include "curl_setup.h" - -#ifdef USE_GNUTLS - -#include -#include -#include - -#ifdef USE_GNUTLS_NETTLE -#include -#include -#include -#else -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" -#include "gtls.h" -#include "vtls.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "strcase.h" -#include "warnless.h" -#include "x509asn1.h" -#include "curl_printf.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* - Some hackish cast macros based on: - https://developer.gnome.org/glib/unstable/glib-Type-Conversion-Macros.html -*/ -#ifndef GNUTLS_POINTER_TO_INT_CAST -#define GNUTLS_POINTER_TO_INT_CAST(p) ((int) (long) (p)) -#endif -#ifndef GNUTLS_INT_TO_POINTER_CAST -#define GNUTLS_INT_TO_POINTER_CAST(i) ((void *) (long) (i)) -#endif - -/* Enable GnuTLS debugging by defining GTLSDEBUG */ -/*#define GTLSDEBUG */ - -#ifdef GTLSDEBUG -static void tls_log_func(int level, const char *str) -{ - fprintf(stderr, "|<%d>| %s", level, str); -} -#endif -static bool gtls_inited = FALSE; - -#if defined(GNUTLS_VERSION_NUMBER) -# if (GNUTLS_VERSION_NUMBER >= 0x020c00) -# undef gnutls_transport_set_lowat -# define gnutls_transport_set_lowat(A,B) Curl_nop_stmt -# define USE_GNUTLS_PRIORITY_SET_DIRECT 1 -# endif -# if (GNUTLS_VERSION_NUMBER >= 0x020c03) -# define GNUTLS_MAPS_WINSOCK_ERRORS 1 -# endif - -# if HAVE_GNUTLS_ALPN_SET_PROTOCOLS -# define HAS_ALPN -# endif - -# if HAVE_GNUTLS_OCSP_REQ_INIT -# define HAS_OCSP -# endif - -# if (GNUTLS_VERSION_NUMBER >= 0x030306) -# define HAS_CAPATH -# endif -#endif - -#ifdef HAS_OCSP -# include -#endif - -/* - * Custom push and pull callback functions used by GNU TLS to read and write - * to the socket. These functions are simple wrappers to send() and recv() - * (although here using the sread/swrite macros as defined by - * curl_setup_once.h). - * We use custom functions rather than the GNU TLS defaults because it allows - * us to get specific about the fourth "flags" argument, and to use arbitrary - * private data with gnutls_transport_set_ptr if we wish. - * - * When these custom push and pull callbacks fail, GNU TLS checks its own - * session-specific error variable, and when not set also its own global - * errno variable, in order to take appropriate action. GNU TLS does not - * require that the transport is actually a socket. This implies that for - * Windows builds these callbacks should ideally set the session-specific - * error variable using function gnutls_transport_set_errno or as a last - * resort global errno variable using gnutls_transport_set_global_errno, - * with a transport agnostic error value. This implies that some winsock - * error translation must take place in these callbacks. - * - * Paragraph above applies to GNU TLS versions older than 2.12.3, since - * this version GNU TLS does its own internal winsock error translation - * using system_errno() function. - */ - -#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS) -# define gtls_EINTR 4 -# define gtls_EIO 5 -# define gtls_EAGAIN 11 -static int gtls_mapped_sockerrno(void) -{ - switch(SOCKERRNO) { - case WSAEWOULDBLOCK: - return gtls_EAGAIN; - case WSAEINTR: - return gtls_EINTR; - default: - break; - } - return gtls_EIO; -} -#endif - -static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len) -{ - ssize_t ret = swrite(GNUTLS_POINTER_TO_INT_CAST(s), buf, len); -#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS) - if(ret < 0) - gnutls_transport_set_global_errno(gtls_mapped_sockerrno()); -#endif - return ret; -} - -static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len) -{ - ssize_t ret = sread(GNUTLS_POINTER_TO_INT_CAST(s), buf, len); -#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS) - if(ret < 0) - gnutls_transport_set_global_errno(gtls_mapped_sockerrno()); -#endif - return ret; -} - -static ssize_t Curl_gtls_push_ssl(void *s, const void *buf, size_t len) -{ - return gnutls_record_send((gnutls_session_t) s, buf, len); -} - -static ssize_t Curl_gtls_pull_ssl(void *s, void *buf, size_t len) -{ - return gnutls_record_recv((gnutls_session_t) s, buf, len); -} - -/* Curl_gtls_init() - * - * Global GnuTLS init, called from Curl_ssl_init(). This calls functions that - * are not thread-safe and thus this function itself is not thread-safe and - * must only be called from within curl_global_init() to keep the thread - * situation under control! - */ -int Curl_gtls_init(void) -{ - int ret = 1; - if(!gtls_inited) { - ret = gnutls_global_init()?0:1; -#ifdef GTLSDEBUG - gnutls_global_set_log_function(tls_log_func); - gnutls_global_set_log_level(2); -#endif - gtls_inited = TRUE; - } - return ret; -} - -int Curl_gtls_cleanup(void) -{ - if(gtls_inited) { - gnutls_global_deinit(); - gtls_inited = FALSE; - } - return 1; -} - -static void showtime(struct Curl_easy *data, - const char *text, - time_t stamp) -{ - struct tm buffer; - const struct tm *tm = &buffer; - CURLcode result = Curl_gmtime(stamp, &buffer); - if(result) - return; - - snprintf(data->state.buffer, - BUFSIZE, - "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT", - text, - Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], - tm->tm_mday, - Curl_month[tm->tm_mon], - tm->tm_year + 1900, - tm->tm_hour, - tm->tm_min, - tm->tm_sec); - infof(data, "%s\n", data->state.buffer); -} - -static gnutls_datum_t load_file(const char *file) -{ - FILE *f; - gnutls_datum_t loaded_file = { NULL, 0 }; - long filelen; - void *ptr; - - f = fopen(file, "rb"); - if(!f) - return loaded_file; - if(fseek(f, 0, SEEK_END) != 0 - || (filelen = ftell(f)) < 0 - || fseek(f, 0, SEEK_SET) != 0 - || !(ptr = malloc((size_t)filelen))) - goto out; - if(fread(ptr, 1, (size_t)filelen, f) < (size_t)filelen) { - free(ptr); - goto out; - } - - loaded_file.data = ptr; - loaded_file.size = (unsigned int)filelen; -out: - fclose(f); - return loaded_file; -} - -static void unload_file(gnutls_datum_t data) -{ - free(data.data); -} - - -/* this function does a SSL/TLS (re-)handshake */ -static CURLcode handshake(struct connectdata *conn, - int sockindex, - bool duringconnect, - bool nonblocking) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - gnutls_session_t session = conn->ssl[sockindex].session; - curl_socket_t sockfd = conn->sock[sockindex]; - long timeout_ms; - int rc; - int what; - - for(;;) { - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, duringconnect); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading - || connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking?0: - timeout_ms?timeout_ms:1000); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) - return CURLE_OK; - else if(timeout_ms) { - /* timeout */ - failf(data, "SSL connection timeout at %ld", timeout_ms); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - rc = gnutls_handshake(session); - - if((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED)) { - connssl->connecting_state = - gnutls_record_get_direction(session)? - ssl_connect_2_writing:ssl_connect_2_reading; - continue; - } - else if((rc < 0) && !gnutls_error_is_fatal(rc)) { - const char *strerr = NULL; - - if(rc == GNUTLS_E_WARNING_ALERT_RECEIVED) { - int alert = gnutls_alert_get(session); - strerr = gnutls_alert_get_name(alert); - } - - if(strerr == NULL) - strerr = gnutls_strerror(rc); - - infof(data, "gnutls_handshake() warning: %s\n", strerr); - continue; - } - else if(rc < 0) { - const char *strerr = NULL; - - if(rc == GNUTLS_E_FATAL_ALERT_RECEIVED) { - int alert = gnutls_alert_get(session); - strerr = gnutls_alert_get_name(alert); - } - - if(strerr == NULL) - strerr = gnutls_strerror(rc); - - failf(data, "gnutls_handshake() failed: %s", strerr); - return CURLE_SSL_CONNECT_ERROR; - } - - /* Reset our connect state machine */ - connssl->connecting_state = ssl_connect_1; - return CURLE_OK; - } -} - -static gnutls_x509_crt_fmt_t do_file_type(const char *type) -{ - if(!type || !type[0]) - return GNUTLS_X509_FMT_PEM; - if(strcasecompare(type, "PEM")) - return GNUTLS_X509_FMT_PEM; - if(strcasecompare(type, "DER")) - return GNUTLS_X509_FMT_DER; - return -1; -} - -static CURLcode -gtls_connect_step1(struct connectdata *conn, - int sockindex) -{ - struct Curl_easy *data = conn->data; - unsigned int init_flags; - gnutls_session_t session; - int rc; - bool sni = TRUE; /* default is SNI enabled */ - void *transport_ptr = NULL; - gnutls_push_func gnutls_transport_push = NULL; - gnutls_pull_func gnutls_transport_pull = NULL; -#ifdef ENABLE_IPV6 - struct in6_addr addr; -#else - struct in_addr addr; -#endif -#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT - static const int cipher_priority[] = { - /* These two ciphers were added to GnuTLS as late as ver. 3.0.1, - but this code path is only ever used for ver. < 2.12.0. - GNUTLS_CIPHER_AES_128_GCM, - GNUTLS_CIPHER_AES_256_GCM, - */ - GNUTLS_CIPHER_AES_128_CBC, - GNUTLS_CIPHER_AES_256_CBC, - GNUTLS_CIPHER_CAMELLIA_128_CBC, - GNUTLS_CIPHER_CAMELLIA_256_CBC, - GNUTLS_CIPHER_3DES_CBC, - }; - static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 }; - static int protocol_priority[] = { 0, 0, 0, 0 }; -#else -#define GNUTLS_CIPHERS "NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509" -/* If GnuTLS was compiled without support for SRP it will error out if SRP is - requested in the priority string, so treat it specially - */ -#define GNUTLS_SRP "+SRP" - const char *prioritylist; - const char *err = NULL; -#endif - - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - if(conn->ssl[sockindex].state == ssl_connection_complete) - /* to make us tolerant against being called more than once for the - same connection */ - return CURLE_OK; - - if(!gtls_inited) - Curl_gtls_init(); - - if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) { - failf(data, "GnuTLS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - } - else if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv3) - sni = FALSE; /* SSLv3 has no SNI */ - - /* allocate a cred struct */ - rc = gnutls_certificate_allocate_credentials(&conn->ssl[sockindex].cred); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_cert_all_cred() failed: %s", gnutls_strerror(rc)); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef USE_TLS_SRP - if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP) { - infof(data, "Using TLS-SRP username: %s\n", SSL_SET_OPTION(username)); - - rc = gnutls_srp_allocate_client_credentials( - &conn->ssl[sockindex].srp_client_cred); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_srp_allocate_client_cred() failed: %s", - gnutls_strerror(rc)); - return CURLE_OUT_OF_MEMORY; - } - - rc = gnutls_srp_set_client_credentials(conn->ssl[sockindex]. - srp_client_cred, - SSL_SET_OPTION(username), - SSL_SET_OPTION(password)); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_srp_set_client_cred() failed: %s", - gnutls_strerror(rc)); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - } -#endif - - if(SSL_CONN_CONFIG(CAfile)) { - /* set the trusted CA cert bundle file */ - gnutls_certificate_set_verify_flags(conn->ssl[sockindex].cred, - GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT); - - rc = gnutls_certificate_set_x509_trust_file(conn->ssl[sockindex].cred, - SSL_CONN_CONFIG(CAfile), - GNUTLS_X509_FMT_PEM); - if(rc < 0) { - infof(data, "error reading ca cert file %s (%s)\n", - SSL_CONN_CONFIG(CAfile), gnutls_strerror(rc)); - if(SSL_CONN_CONFIG(verifypeer)) - return CURLE_SSL_CACERT_BADFILE; - } - else - infof(data, "found %d certificates in %s\n", rc, - SSL_CONN_CONFIG(CAfile)); - } - -#ifdef HAS_CAPATH - if(SSL_CONN_CONFIG(CApath)) { - /* set the trusted CA cert directory */ - rc = gnutls_certificate_set_x509_trust_dir(conn->ssl[sockindex].cred, - SSL_CONN_CONFIG(CApath), - GNUTLS_X509_FMT_PEM); - if(rc < 0) { - infof(data, "error reading ca cert file %s (%s)\n", - SSL_CONN_CONFIG(CApath), gnutls_strerror(rc)); - if(SSL_CONN_CONFIG(verifypeer)) - return CURLE_SSL_CACERT_BADFILE; - } - else - infof(data, "found %d certificates in %s\n", - rc, SSL_CONN_CONFIG(CApath)); - } -#endif - -#ifdef CURL_CA_FALLBACK - /* use system ca certificate store as fallback */ - if(SSL_CONN_CONFIG(verifypeer) && - !(SSL_CONN_CONFIG(CAfile) || SSL_CONN_CONFIG(CApath))) { - gnutls_certificate_set_x509_system_trust(conn->ssl[sockindex].cred); - } -#endif - - if(SSL_SET_OPTION(CRLfile)) { - /* set the CRL list file */ - rc = gnutls_certificate_set_x509_crl_file(conn->ssl[sockindex].cred, - SSL_SET_OPTION(CRLfile), - GNUTLS_X509_FMT_PEM); - if(rc < 0) { - failf(data, "error reading crl file %s (%s)", - SSL_SET_OPTION(CRLfile), gnutls_strerror(rc)); - return CURLE_SSL_CRL_BADFILE; - } - else - infof(data, "found %d CRL in %s\n", - rc, SSL_SET_OPTION(CRLfile)); - } - - /* Initialize TLS session as a client */ - init_flags = GNUTLS_CLIENT; - -#if defined(GNUTLS_NO_TICKETS) - /* Disable TLS session tickets */ - init_flags |= GNUTLS_NO_TICKETS; -#endif - - rc = gnutls_init(&conn->ssl[sockindex].session, init_flags); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_init() failed: %d", rc); - return CURLE_SSL_CONNECT_ERROR; - } - - /* convenient assign */ - session = conn->ssl[sockindex].session; - - if((0 == Curl_inet_pton(AF_INET, hostname, &addr)) && -#ifdef ENABLE_IPV6 - (0 == Curl_inet_pton(AF_INET6, hostname, &addr)) && -#endif - sni && - (gnutls_server_name_set(session, GNUTLS_NAME_DNS, hostname, - strlen(hostname)) < 0)) - infof(data, "WARNING: failed to configure server name indication (SNI) " - "TLS extension\n"); - - /* Use default priorities */ - rc = gnutls_set_default_priority(session); - if(rc != GNUTLS_E_SUCCESS) - return CURLE_SSL_CONNECT_ERROR; - -#ifndef USE_GNUTLS_PRIORITY_SET_DIRECT - rc = gnutls_cipher_set_priority(session, cipher_priority); - if(rc != GNUTLS_E_SUCCESS) - return CURLE_SSL_CONNECT_ERROR; - - /* Sets the priority on the certificate types supported by gnutls. Priority - is higher for types specified before others. After specifying the types - you want, you must append a 0. */ - rc = gnutls_certificate_type_set_priority(session, cert_type_priority); - if(rc != GNUTLS_E_SUCCESS) - return CURLE_SSL_CONNECT_ERROR; - - if(SSL_CONN_CONFIG(cipher_list) != NULL) { - failf(data, "can't pass a custom cipher list to older GnuTLS" - " versions"); - return CURLE_SSL_CONNECT_ERROR; - } - - switch(SSL_CONN_CONFIG(version) { - case CURL_SSLVERSION_SSLv3: - protocol_priority[0] = GNUTLS_SSL3; - break; - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - protocol_priority[0] = GNUTLS_TLS1_0; - protocol_priority[1] = GNUTLS_TLS1_1; - protocol_priority[2] = GNUTLS_TLS1_2; - break; - case CURL_SSLVERSION_TLSv1_0: - protocol_priority[0] = GNUTLS_TLS1_0; - break; - case CURL_SSLVERSION_TLSv1_1: - protocol_priority[0] = GNUTLS_TLS1_1; - break; - case CURL_SSLVERSION_TLSv1_2: - protocol_priority[0] = GNUTLS_TLS1_2; - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "GnuTLS: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv2: - failf(data, "GnuTLS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - rc = gnutls_protocol_set_priority(session, protocol_priority); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "Did you pass a valid GnuTLS cipher list?"); - return CURLE_SSL_CONNECT_ERROR; - } - -#else - /* Ensure +SRP comes at the *end* of all relevant strings so that it can be - * removed if a run-time error indicates that SRP is not supported by this - * GnuTLS version */ - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_SSLv3: - prioritylist = GNUTLS_CIPHERS ":-VERS-TLS-ALL:+VERS-SSL3.0"; - sni = false; - break; - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:" GNUTLS_SRP; - break; - case CURL_SSLVERSION_TLSv1_0: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" - "+VERS-TLS1.0:" GNUTLS_SRP; - break; - case CURL_SSLVERSION_TLSv1_1: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" - "+VERS-TLS1.1:" GNUTLS_SRP; - break; - case CURL_SSLVERSION_TLSv1_2: - prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:" - "+VERS-TLS1.2:" GNUTLS_SRP; - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "GnuTLS: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv2: - failf(data, "GnuTLS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - rc = gnutls_priority_set_direct(session, prioritylist, &err); - if((rc == GNUTLS_E_INVALID_REQUEST) && err) { - if(!strcmp(err, GNUTLS_SRP)) { - /* This GnuTLS was probably compiled without support for SRP. - * Note that fact and try again without it. */ - int validprioritylen = curlx_uztosi(err - prioritylist); - char *prioritycopy = strdup(prioritylist); - if(!prioritycopy) - return CURLE_OUT_OF_MEMORY; - - infof(data, "This GnuTLS does not support SRP\n"); - if(validprioritylen) - /* Remove the :+SRP */ - prioritycopy[validprioritylen - 1] = 0; - rc = gnutls_priority_set_direct(session, prioritycopy, &err); - free(prioritycopy); - } - } - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "Error %d setting GnuTLS cipher list starting with %s", - rc, err); - return CURLE_SSL_CONNECT_ERROR; - } -#endif - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - int cur = 0; - gnutls_datum_t protocols[2]; - -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { - protocols[cur].data = (unsigned char *)NGHTTP2_PROTO_VERSION_ID; - protocols[cur].size = NGHTTP2_PROTO_VERSION_ID_LEN; - cur++; - infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID); - } -#endif - - protocols[cur].data = (unsigned char *)ALPN_HTTP_1_1; - protocols[cur].size = ALPN_HTTP_1_1_LENGTH; - cur++; - infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1); - - gnutls_alpn_set_protocols(session, protocols, cur, 0); - } -#endif - - if(SSL_SET_OPTION(cert)) { - if(SSL_SET_OPTION(key_passwd)) { -#if HAVE_GNUTLS_CERTIFICATE_SET_X509_KEY_FILE2 - const unsigned int supported_key_encryption_algorithms = - GNUTLS_PKCS_USE_PKCS12_3DES | GNUTLS_PKCS_USE_PKCS12_ARCFOUR | - GNUTLS_PKCS_USE_PKCS12_RC2_40 | GNUTLS_PKCS_USE_PBES2_3DES | - GNUTLS_PKCS_USE_PBES2_AES_128 | GNUTLS_PKCS_USE_PBES2_AES_192 | - GNUTLS_PKCS_USE_PBES2_AES_256; - rc = gnutls_certificate_set_x509_key_file2( - conn->ssl[sockindex].cred, - SSL_SET_OPTION(cert), - SSL_SET_OPTION(key) ? - SSL_SET_OPTION(key) : SSL_SET_OPTION(cert), - do_file_type(SSL_SET_OPTION(cert_type)), - SSL_SET_OPTION(key_passwd), - supported_key_encryption_algorithms); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, - "error reading X.509 potentially-encrypted key file: %s", - gnutls_strerror(rc)); - return CURLE_SSL_CONNECT_ERROR; - } -#else - failf(data, "gnutls lacks support for encrypted key files"); - return CURLE_SSL_CONNECT_ERROR; -#endif - } - else { - if(gnutls_certificate_set_x509_key_file( - conn->ssl[sockindex].cred, - SSL_SET_OPTION(cert), - SSL_SET_OPTION(key) ? - SSL_SET_OPTION(key) : SSL_SET_OPTION(cert), - do_file_type(SSL_SET_OPTION(cert_type)) ) != - GNUTLS_E_SUCCESS) { - failf(data, "error reading X.509 key or certificate file"); - return CURLE_SSL_CONNECT_ERROR; - } - } - } - -#ifdef USE_TLS_SRP - /* put the credentials to the current session */ - if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP) { - rc = gnutls_credentials_set(session, GNUTLS_CRD_SRP, - conn->ssl[sockindex].srp_client_cred); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc)); - return CURLE_SSL_CONNECT_ERROR; - } - } - else -#endif - { - rc = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, - conn->ssl[sockindex].cred); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_credentials_set() failed: %s", gnutls_strerror(rc)); - return CURLE_SSL_CONNECT_ERROR; - } - } - - if(conn->proxy_ssl[sockindex].use) { - transport_ptr = conn->proxy_ssl[sockindex].session; - gnutls_transport_push = Curl_gtls_push_ssl; - gnutls_transport_pull = Curl_gtls_pull_ssl; - } - else { - /* file descriptor for the socket */ - transport_ptr = GNUTLS_INT_TO_POINTER_CAST(conn->sock[sockindex]); - gnutls_transport_push = Curl_gtls_push; - gnutls_transport_pull = Curl_gtls_pull; - } - - /* set the connection handle */ - gnutls_transport_set_ptr(session, transport_ptr); - - /* register callback functions to send and receive data. */ - gnutls_transport_set_push_function(session, gnutls_transport_push); - gnutls_transport_set_pull_function(session, gnutls_transport_pull); - - /* lowat must be set to zero when using custom push and pull functions. */ - gnutls_transport_set_lowat(session, 0); - -#ifdef HAS_OCSP - if(SSL_CONN_CONFIG(verifystatus)) { - rc = gnutls_ocsp_status_request_enable_client(session, NULL, 0, NULL); - if(rc != GNUTLS_E_SUCCESS) { - failf(data, "gnutls_ocsp_status_request_enable_client() failed: %d", rc); - return CURLE_SSL_CONNECT_ERROR; - } - } -#endif - - /* This might be a reconnect, so we check for a session ID in the cache - to speed up things */ - if(data->set.general_ssl.sessionid) { - void *ssl_sessionid; - size_t ssl_idsize; - - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, &ssl_idsize, sockindex)) { - /* we got a session id, use it! */ - gnutls_session_set_data(session, ssl_sessionid, ssl_idsize); - - /* Informational message */ - infof(data, "SSL re-using session ID\n"); - } - Curl_ssl_sessionid_unlock(conn); - } - - return CURLE_OK; -} - -static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data, - gnutls_x509_crt_t cert, - const char *pinnedpubkey) -{ - /* Scratch */ - size_t len1 = 0, len2 = 0; - unsigned char *buff1 = NULL; - - gnutls_pubkey_t key = NULL; - - /* Result is returned to caller */ - int ret = 0; - CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; - - /* if a path wasn't specified, don't pin */ - if(NULL == pinnedpubkey) - return CURLE_OK; - - if(NULL == cert) - return result; - - do { - /* Begin Gyrations to get the public key */ - gnutls_pubkey_init(&key); - - ret = gnutls_pubkey_import_x509(key, cert, 0); - if(ret < 0) - break; /* failed */ - - ret = gnutls_pubkey_export(key, GNUTLS_X509_FMT_DER, NULL, &len1); - if(ret != GNUTLS_E_SHORT_MEMORY_BUFFER || len1 == 0) - break; /* failed */ - - buff1 = malloc(len1); - if(NULL == buff1) - break; /* failed */ - - len2 = len1; - - ret = gnutls_pubkey_export(key, GNUTLS_X509_FMT_DER, buff1, &len2); - if(ret < 0 || len1 != len2) - break; /* failed */ - - /* End Gyrations */ - - /* The one good exit point */ - result = Curl_pin_peer_pubkey(data, pinnedpubkey, buff1, len1); - } while(0); - - if(NULL != key) - gnutls_pubkey_deinit(key); - - Curl_safefree(buff1); - - return result; -} - -static Curl_recv gtls_recv; -static Curl_send gtls_send; - -static CURLcode -gtls_connect_step3(struct connectdata *conn, - int sockindex) -{ - unsigned int cert_list_size; - const gnutls_datum_t *chainp; - unsigned int verify_status = 0; - gnutls_x509_crt_t x509_cert, x509_issuer; - gnutls_datum_t issuerp; - char certbuf[256] = ""; /* big enough? */ - size_t size; - unsigned int algo; - unsigned int bits; - time_t certclock; - const char *ptr; - struct Curl_easy *data = conn->data; - gnutls_session_t session = conn->ssl[sockindex].session; - int rc; -#ifdef HAS_ALPN - gnutls_datum_t proto; -#endif - CURLcode result = CURLE_OK; - gnutls_protocol_t version = gnutls_protocol_get_version(session); - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - /* the name of the cipher suite used, e.g. ECDHE_RSA_AES_256_GCM_SHA384. */ - ptr = gnutls_cipher_suite_get_name(gnutls_kx_get(session), - gnutls_cipher_get(session), - gnutls_mac_get(session)); - - infof(data, "SSL connection using %s / %s\n", - gnutls_protocol_get_name(version), ptr); - - /* This function will return the peer's raw certificate (chain) as sent by - the peer. These certificates are in raw format (DER encoded for - X.509). In case of a X.509 then a certificate list may be present. The - first certificate in the list is the peer's certificate, following the - issuer's certificate, then the issuer's issuer etc. */ - - chainp = gnutls_certificate_get_peers(session, &cert_list_size); - if(!chainp) { - if(SSL_CONN_CONFIG(verifypeer) || - SSL_CONN_CONFIG(verifyhost) || - SSL_SET_OPTION(issuercert)) { -#ifdef USE_TLS_SRP - if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP - && SSL_SET_OPTION(username) != NULL - && !SSL_CONN_CONFIG(verifypeer) - && gnutls_cipher_get(session)) { - /* no peer cert, but auth is ok if we have SRP user and cipher and no - peer verify */ - } - else { -#endif - failf(data, "failed to get server cert"); - return CURLE_PEER_FAILED_VERIFICATION; -#ifdef USE_TLS_SRP - } -#endif - } - infof(data, "\t common name: WARNING couldn't obtain\n"); - } - - if(data->set.ssl.certinfo && chainp) { - unsigned int i; - - result = Curl_ssl_init_certinfo(data, cert_list_size); - if(result) - return result; - - for(i = 0; i < cert_list_size; i++) { - const char *beg = (const char *) chainp[i].data; - const char *end = beg + chainp[i].size; - - result = Curl_extract_certinfo(conn, i, beg, end); - if(result) - return result; - } - } - - if(SSL_CONN_CONFIG(verifypeer)) { - /* This function will try to verify the peer's certificate and return its - status (trusted, invalid etc.). The value of status should be one or - more of the gnutls_certificate_status_t enumerated elements bitwise - or'd. To avoid denial of service attacks some default upper limits - regarding the certificate key size and chain size are set. To override - them use gnutls_certificate_set_verify_limits(). */ - - rc = gnutls_certificate_verify_peers2(session, &verify_status); - if(rc < 0) { - failf(data, "server cert verify failed: %d", rc); - return CURLE_SSL_CONNECT_ERROR; - } - - /* verify_status is a bitmask of gnutls_certificate_status bits */ - if(verify_status & GNUTLS_CERT_INVALID) { - if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "server certificate verification failed. CAfile: %s " - "CRLfile: %s", SSL_CONN_CONFIG(CAfile) ? SSL_CONN_CONFIG(CAfile): - "none", - SSL_SET_OPTION(CRLfile)?SSL_SET_OPTION(CRLfile):"none"); - return CURLE_SSL_CACERT; - } - else - infof(data, "\t server certificate verification FAILED\n"); - } - else - infof(data, "\t server certificate verification OK\n"); - } - else - infof(data, "\t server certificate verification SKIPPED\n"); - -#ifdef HAS_OCSP - if(SSL_CONN_CONFIG(verifystatus)) { - if(gnutls_ocsp_status_request_is_checked(session, 0) == 0) { - gnutls_datum_t status_request; - gnutls_ocsp_resp_t ocsp_resp; - - gnutls_ocsp_cert_status_t status; - gnutls_x509_crl_reason_t reason; - - rc = gnutls_ocsp_status_request_get(session, &status_request); - - infof(data, "\t server certificate status verification FAILED\n"); - - if(rc == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { - failf(data, "No OCSP response received"); - return CURLE_SSL_INVALIDCERTSTATUS; - } - - if(rc < 0) { - failf(data, "Invalid OCSP response received"); - return CURLE_SSL_INVALIDCERTSTATUS; - } - - gnutls_ocsp_resp_init(&ocsp_resp); - - rc = gnutls_ocsp_resp_import(ocsp_resp, &status_request); - if(rc < 0) { - failf(data, "Invalid OCSP response received"); - return CURLE_SSL_INVALIDCERTSTATUS; - } - - rc = gnutls_ocsp_resp_get_single(ocsp_resp, 0, NULL, NULL, NULL, NULL, - &status, NULL, NULL, NULL, &reason); - - switch(status) { - case GNUTLS_OCSP_CERT_GOOD: - break; - - case GNUTLS_OCSP_CERT_REVOKED: { - const char *crl_reason; - - switch(reason) { - default: - case GNUTLS_X509_CRLREASON_UNSPECIFIED: - crl_reason = "unspecified reason"; - break; - - case GNUTLS_X509_CRLREASON_KEYCOMPROMISE: - crl_reason = "private key compromised"; - break; - - case GNUTLS_X509_CRLREASON_CACOMPROMISE: - crl_reason = "CA compromised"; - break; - - case GNUTLS_X509_CRLREASON_AFFILIATIONCHANGED: - crl_reason = "affiliation has changed"; - break; - - case GNUTLS_X509_CRLREASON_SUPERSEDED: - crl_reason = "certificate superseded"; - break; - - case GNUTLS_X509_CRLREASON_CESSATIONOFOPERATION: - crl_reason = "operation has ceased"; - break; - - case GNUTLS_X509_CRLREASON_CERTIFICATEHOLD: - crl_reason = "certificate is on hold"; - break; - - case GNUTLS_X509_CRLREASON_REMOVEFROMCRL: - crl_reason = "will be removed from delta CRL"; - break; - - case GNUTLS_X509_CRLREASON_PRIVILEGEWITHDRAWN: - crl_reason = "privilege withdrawn"; - break; - - case GNUTLS_X509_CRLREASON_AACOMPROMISE: - crl_reason = "AA compromised"; - break; - } - - failf(data, "Server certificate was revoked: %s", crl_reason); - break; - } - - default: - case GNUTLS_OCSP_CERT_UNKNOWN: - failf(data, "Server certificate status is unknown"); - break; - } - - gnutls_ocsp_resp_deinit(ocsp_resp); - - return CURLE_SSL_INVALIDCERTSTATUS; - } - else - infof(data, "\t server certificate status verification OK\n"); - } - else - infof(data, "\t server certificate status verification SKIPPED\n"); -#endif - - /* initialize an X.509 certificate structure. */ - gnutls_x509_crt_init(&x509_cert); - - if(chainp) - /* convert the given DER or PEM encoded Certificate to the native - gnutls_x509_crt_t format */ - gnutls_x509_crt_import(x509_cert, chainp, GNUTLS_X509_FMT_DER); - - if(SSL_SET_OPTION(issuercert)) { - gnutls_x509_crt_init(&x509_issuer); - issuerp = load_file(SSL_SET_OPTION(issuercert)); - gnutls_x509_crt_import(x509_issuer, &issuerp, GNUTLS_X509_FMT_PEM); - rc = gnutls_x509_crt_check_issuer(x509_cert, x509_issuer); - gnutls_x509_crt_deinit(x509_issuer); - unload_file(issuerp); - if(rc <= 0) { - failf(data, "server certificate issuer check failed (IssuerCert: %s)", - SSL_SET_OPTION(issuercert)?SSL_SET_OPTION(issuercert):"none"); - gnutls_x509_crt_deinit(x509_cert); - return CURLE_SSL_ISSUER_ERROR; - } - infof(data, "\t server certificate issuer check OK (Issuer Cert: %s)\n", - SSL_SET_OPTION(issuercert)?SSL_SET_OPTION(issuercert):"none"); - } - - size=sizeof(certbuf); - rc = gnutls_x509_crt_get_dn_by_oid(x509_cert, GNUTLS_OID_X520_COMMON_NAME, - 0, /* the first and only one */ - FALSE, - certbuf, - &size); - if(rc) { - infof(data, "error fetching CN from cert:%s\n", - gnutls_strerror(rc)); - } - - /* This function will check if the given certificate's subject matches the - given hostname. This is a basic implementation of the matching described - in RFC2818 (HTTPS), which takes into account wildcards, and the subject - alternative name PKIX extension. Returns non zero on success, and zero on - failure. */ - rc = gnutls_x509_crt_check_hostname(x509_cert, hostname); -#if GNUTLS_VERSION_NUMBER < 0x030306 - /* Before 3.3.6, gnutls_x509_crt_check_hostname() didn't check IP - addresses. */ - if(!rc) { -#ifdef ENABLE_IPV6 - #define use_addr in6_addr -#else - #define use_addr in_addr -#endif - unsigned char addrbuf[sizeof(struct use_addr)]; - unsigned char certaddr[sizeof(struct use_addr)]; - size_t addrlen = 0, certaddrlen; - int i; - int ret = 0; - - if(Curl_inet_pton(AF_INET, hostname, addrbuf) > 0) - addrlen = 4; -#ifdef ENABLE_IPV6 - else if(Curl_inet_pton(AF_INET6, hostname, addrbuf) > 0) - addrlen = 16; -#endif - - if(addrlen) { - for(i=0; ; i++) { - certaddrlen = sizeof(certaddr); - ret = gnutls_x509_crt_get_subject_alt_name(x509_cert, i, certaddr, - &certaddrlen, NULL); - /* If this happens, it wasn't an IP address. */ - if(ret == GNUTLS_E_SHORT_MEMORY_BUFFER) - continue; - if(ret < 0) - break; - if(ret != GNUTLS_SAN_IPADDRESS) - continue; - if(certaddrlen == addrlen && !memcmp(addrbuf, certaddr, addrlen)) { - rc = 1; - break; - } - } - } - } -#endif - if(!rc) { - const char * const dispname = SSL_IS_PROXY() ? - conn->http_proxy.host.dispname : conn->host.dispname; - - if(SSL_CONN_CONFIG(verifyhost)) { - failf(data, "SSL: certificate subject name (%s) does not match " - "target host name '%s'", certbuf, dispname); - gnutls_x509_crt_deinit(x509_cert); - return CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "\t common name: %s (does not match '%s')\n", - certbuf, dispname); - } - else - infof(data, "\t common name: %s (matched)\n", certbuf); - - /* Check for time-based validity */ - certclock = gnutls_x509_crt_get_expiration_time(x509_cert); - - if(certclock == (time_t)-1) { - if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "server cert expiration date verify failed"); - gnutls_x509_crt_deinit(x509_cert); - return CURLE_SSL_CONNECT_ERROR; - } - else - infof(data, "\t server certificate expiration date verify FAILED\n"); - } - else { - if(certclock < time(NULL)) { - if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "server certificate expiration date has passed."); - gnutls_x509_crt_deinit(x509_cert); - return CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "\t server certificate expiration date FAILED\n"); - } - else - infof(data, "\t server certificate expiration date OK\n"); - } - - certclock = gnutls_x509_crt_get_activation_time(x509_cert); - - if(certclock == (time_t)-1) { - if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "server cert activation date verify failed"); - gnutls_x509_crt_deinit(x509_cert); - return CURLE_SSL_CONNECT_ERROR; - } - else - infof(data, "\t server certificate activation date verify FAILED\n"); - } - else { - if(certclock > time(NULL)) { - if(SSL_CONN_CONFIG(verifypeer)) { - failf(data, "server certificate not activated yet."); - gnutls_x509_crt_deinit(x509_cert); - return CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "\t server certificate activation date FAILED\n"); - } - else - infof(data, "\t server certificate activation date OK\n"); - } - - ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - if(ptr) { - result = pkp_pin_peer_pubkey(data, x509_cert, ptr); - if(result != CURLE_OK) { - failf(data, "SSL: public key does not match pinned public key!"); - gnutls_x509_crt_deinit(x509_cert); - return result; - } - } - - /* Show: - - - subject - - start date - - expire date - - common name - - issuer - - */ - - /* public key algorithm's parameters */ - algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits); - infof(data, "\t certificate public key: %s\n", - gnutls_pk_algorithm_get_name(algo)); - - /* version of the X.509 certificate. */ - infof(data, "\t certificate version: #%d\n", - gnutls_x509_crt_get_version(x509_cert)); - - - size = sizeof(certbuf); - gnutls_x509_crt_get_dn(x509_cert, certbuf, &size); - infof(data, "\t subject: %s\n", certbuf); - - certclock = gnutls_x509_crt_get_activation_time(x509_cert); - showtime(data, "start date", certclock); - - certclock = gnutls_x509_crt_get_expiration_time(x509_cert); - showtime(data, "expire date", certclock); - - size = sizeof(certbuf); - gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size); - infof(data, "\t issuer: %s\n", certbuf); - - gnutls_x509_crt_deinit(x509_cert); - - /* compression algorithm (if any) */ - ptr = gnutls_compression_get_name(gnutls_compression_get(session)); - /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */ - infof(data, "\t compression: %s\n", ptr); - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - rc = gnutls_alpn_get_selected_protocol(session, &proto); - if(rc == 0) { - infof(data, "ALPN, server accepted to use %.*s\n", proto.size, - proto.data); - -#ifdef USE_NGHTTP2 - if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN && - !memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data, - NGHTTP2_PROTO_VERSION_ID_LEN)) { - conn->negnpn = CURL_HTTP_VERSION_2; - } - else -#endif - if(proto.size == ALPN_HTTP_1_1_LENGTH && - !memcmp(ALPN_HTTP_1_1, proto.data, ALPN_HTTP_1_1_LENGTH)) { - conn->negnpn = CURL_HTTP_VERSION_1_1; - } - } - else - infof(data, "ALPN, server did not agree to a protocol\n"); - } -#endif - - conn->ssl[sockindex].state = ssl_connection_complete; - conn->recv[sockindex] = gtls_recv; - conn->send[sockindex] = gtls_send; - - if(data->set.general_ssl.sessionid) { - /* we always unconditionally get the session id here, as even if we - already got it from the cache and asked to use it in the connection, it - might've been rejected and then a new one is in use now and we need to - detect that. */ - bool incache; - void *ssl_sessionid; - void *connect_sessionid; - size_t connect_idsize = 0; - - /* get the session ID data size */ - gnutls_session_get_data(session, NULL, &connect_idsize); - connect_sessionid = malloc(connect_idsize); /* get a buffer for it */ - - if(connect_sessionid) { - /* extract session ID to the allocated buffer */ - gnutls_session_get_data(session, connect_sessionid, &connect_idsize); - - Curl_ssl_sessionid_lock(conn); - incache = !(Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, - sockindex)); - if(incache) { - /* there was one before in the cache, so instead of risking that the - previous one was rejected, we just kill that and store the new */ - Curl_ssl_delsessionid(conn, ssl_sessionid); - } - - /* store this session id */ - result = Curl_ssl_addsessionid(conn, connect_sessionid, connect_idsize, - sockindex); - Curl_ssl_sessionid_unlock(conn); - if(result) { - free(connect_sessionid); - result = CURLE_OUT_OF_MEMORY; - } - } - else - result = CURLE_OUT_OF_MEMORY; - } - - return result; -} - - -/* - * This function is called after the TCP connect has completed. Setup the TLS - * layer and do all necessary magic. - */ -/* We use connssl->connecting_state to keep track of the connection status; - there are three states: 'ssl_connect_1' (not started yet or complete), - 'ssl_connect_2_reading' (waiting for data from server), and - 'ssl_connect_2_writing' (waiting to be able to write). - */ -static CURLcode -gtls_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) -{ - int rc; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - /* Initiate the connection, if not already done */ - if(ssl_connect_1==connssl->connecting_state) { - rc = gtls_connect_step1(conn, sockindex); - if(rc) - return rc; - } - - rc = handshake(conn, sockindex, TRUE, nonblocking); - if(rc) - /* handshake() sets its own error message with failf() */ - return rc; - - /* Finish connecting once the handshake is done */ - if(ssl_connect_1==connssl->connecting_state) { - rc = gtls_connect_step3(conn, sockindex); - if(rc) - return rc; - } - - *done = ssl_connect_1==connssl->connecting_state; - - return CURLE_OK; -} - -CURLcode -Curl_gtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - return gtls_connect_common(conn, sockindex, TRUE, done); -} - -CURLcode -Curl_gtls_connect(struct connectdata *conn, - int sockindex) - -{ - CURLcode result; - bool done = FALSE; - - result = gtls_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -bool Curl_gtls_data_pending(const struct connectdata *conn, int connindex) -{ - bool res = FALSE; - if(conn->ssl[connindex].session && - 0 != gnutls_record_check_pending(conn->ssl[connindex].session)) - res = TRUE; - - if(conn->proxy_ssl[connindex].session && - 0 != gnutls_record_check_pending(conn->proxy_ssl[connindex].session)) - res = TRUE; - - return res; -} - -static ssize_t gtls_send(struct connectdata *conn, - int sockindex, - const void *mem, - size_t len, - CURLcode *curlcode) -{ - ssize_t rc = gnutls_record_send(conn->ssl[sockindex].session, mem, len); - - if(rc < 0) { - *curlcode = (rc == GNUTLS_E_AGAIN) - ? CURLE_AGAIN - : CURLE_SEND_ERROR; - - rc = -1; - } - - return rc; -} - -static void close_one(struct ssl_connect_data *ssl) -{ - if(ssl->session) { - gnutls_bye(ssl->session, GNUTLS_SHUT_RDWR); - gnutls_deinit(ssl->session); - ssl->session = NULL; - } - if(ssl->cred) { - gnutls_certificate_free_credentials(ssl->cred); - ssl->cred = NULL; - } -#ifdef USE_TLS_SRP - if(ssl->srp_client_cred) { - gnutls_srp_free_client_credentials(ssl->srp_client_cred); - ssl->srp_client_cred = NULL; - } -#endif -} - -void Curl_gtls_close(struct connectdata *conn, int sockindex) -{ - close_one(&conn->ssl[sockindex]); - close_one(&conn->proxy_ssl[sockindex]); -} - -/* - * This function is called to shut down the SSL layer but keep the - * socket open (CCC - Clear Command Channel) - */ -int Curl_gtls_shutdown(struct connectdata *conn, int sockindex) -{ - ssize_t result; - int retval = 0; - struct Curl_easy *data = conn->data; - int done = 0; - char buf[120]; - - /* This has only been tested on the proftpd server, and the mod_tls code - sends a close notify alert without waiting for a close notify alert in - response. Thus we wait for a close notify alert from the server, but - we do not send one. Let's hope other servers do the same... */ - - if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE) - gnutls_bye(conn->ssl[sockindex].session, GNUTLS_SHUT_WR); - - if(conn->ssl[sockindex].session) { - while(!done) { - int what = SOCKET_READABLE(conn->sock[sockindex], - SSL_SHUTDOWN_TIMEOUT); - if(what > 0) { - /* Something to read, let's do it and hope that it is the close - notify alert from the server */ - result = gnutls_record_recv(conn->ssl[sockindex].session, - buf, sizeof(buf)); - switch(result) { - case 0: - /* This is the expected response. There was no data but only - the close notify alert */ - done = 1; - break; - case GNUTLS_E_AGAIN: - case GNUTLS_E_INTERRUPTED: - infof(data, "GNUTLS_E_AGAIN || GNUTLS_E_INTERRUPTED\n"); - break; - default: - retval = -1; - done = 1; - break; - } - } - else if(0 == what) { - /* timeout */ - failf(data, "SSL shutdown timeout"); - done = 1; - break; - } - else { - /* anything that gets here is fatally bad */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - retval = -1; - done = 1; - } - } - gnutls_deinit(conn->ssl[sockindex].session); - } - gnutls_certificate_free_credentials(conn->ssl[sockindex].cred); - -#ifdef USE_TLS_SRP - if(SSL_SET_OPTION(authtype) == CURL_TLSAUTH_SRP - && SSL_SET_OPTION(username) != NULL) - gnutls_srp_free_client_credentials(conn->ssl[sockindex].srp_client_cred); -#endif - - conn->ssl[sockindex].cred = NULL; - conn->ssl[sockindex].session = NULL; - - return retval; -} - -static ssize_t gtls_recv(struct connectdata *conn, /* connection data */ - int num, /* socketindex */ - char *buf, /* store read data here */ - size_t buffersize, /* max amount to read */ - CURLcode *curlcode) -{ - ssize_t ret; - - ret = gnutls_record_recv(conn->ssl[num].session, buf, buffersize); - if((ret == GNUTLS_E_AGAIN) || (ret == GNUTLS_E_INTERRUPTED)) { - *curlcode = CURLE_AGAIN; - return -1; - } - - if(ret == GNUTLS_E_REHANDSHAKE) { - /* BLOCKING call, this is bad but a work-around for now. Fixing this "the - proper way" takes a whole lot of work. */ - CURLcode result = handshake(conn, num, FALSE, FALSE); - if(result) - /* handshake() writes error message on its own */ - *curlcode = result; - else - *curlcode = CURLE_AGAIN; /* then return as if this was a wouldblock */ - return -1; - } - - if(ret < 0) { - failf(conn->data, "GnuTLS recv error (%d): %s", - (int)ret, gnutls_strerror((int)ret)); - *curlcode = CURLE_RECV_ERROR; - return -1; - } - - return ret; -} - -void Curl_gtls_session_free(void *ptr) -{ - free(ptr); -} - -size_t Curl_gtls_version(char *buffer, size_t size) -{ - return snprintf(buffer, size, "GnuTLS/%s", gnutls_check_version(NULL)); -} - -#ifndef USE_GNUTLS_NETTLE -static int Curl_gtls_seed(struct Curl_easy *data) -{ - /* we have the "SSL is seeded" boolean static to prevent multiple - time-consuming seedings in vain */ - static bool ssl_seeded = FALSE; - - /* Quickly add a bit of entropy */ - gcry_fast_random_poll(); - - if(!ssl_seeded || data->set.str[STRING_SSL_RANDOM_FILE] || - data->set.str[STRING_SSL_EGDSOCKET]) { - - /* TODO: to a good job seeding the RNG - This may involve the gcry_control function and these options: - GCRYCTL_SET_RANDOM_SEED_FILE - GCRYCTL_SET_RNDEGD_SOCKET - */ - ssl_seeded = TRUE; - } - return 0; -} -#endif - -/* data might be NULL! */ -CURLcode Curl_gtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) -{ -#if defined(USE_GNUTLS_NETTLE) - int rc; - (void)data; - rc = gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length); - return rc?CURLE_FAILED_INIT:CURLE_OK; -#elif defined(USE_GNUTLS) - if(data) - Curl_gtls_seed(data); /* Initiate the seed if not already done */ - gcry_randomize(entropy, length, GCRY_STRONG_RANDOM); -#endif - return CURLE_OK; -} - -void Curl_gtls_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) -{ -#if defined(USE_GNUTLS_NETTLE) - struct md5_ctx MD5pw; - md5_init(&MD5pw); - md5_update(&MD5pw, (unsigned int)tmplen, tmp); - md5_digest(&MD5pw, (unsigned int)md5len, md5sum); -#elif defined(USE_GNUTLS) - gcry_md_hd_t MD5pw; - gcry_md_open(&MD5pw, GCRY_MD_MD5, 0); - gcry_md_write(MD5pw, tmp, tmplen); - memcpy(md5sum, gcry_md_read(MD5pw, 0), md5len); - gcry_md_close(MD5pw); -#endif -} - -void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len) -{ -#if defined(USE_GNUTLS_NETTLE) - struct sha256_ctx SHA256pw; - sha256_init(&SHA256pw); - sha256_update(&SHA256pw, (unsigned int)tmplen, tmp); - sha256_digest(&SHA256pw, (unsigned int)sha256len, sha256sum); -#elif defined(USE_GNUTLS) - gcry_md_hd_t SHA256pw; - gcry_md_open(&SHA256pw, GCRY_MD_SHA256, 0); - gcry_md_write(SHA256pw, tmp, tmplen); - memcpy(sha256sum, gcry_md_read(SHA256pw, 0), sha256len); - gcry_md_close(SHA256pw); -#endif -} - -bool Curl_gtls_cert_status_request(void) -{ -#ifdef HAS_OCSP - return TRUE; -#else - return FALSE; -#endif -} - -#endif /* USE_GNUTLS */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/gtls.h b/build/premake/premake5/contrib/curl/lib/vtls/gtls.h deleted file mode 100644 index 462c04853e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/gtls.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef HEADER_CURL_GTLS_H -#define HEADER_CURL_GTLS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_GNUTLS - -#include "urldata.h" - -int Curl_gtls_init(void); -int Curl_gtls_cleanup(void); -CURLcode Curl_gtls_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -bool Curl_gtls_data_pending(const struct connectdata *conn, - int connindex); - - /* close a SSL connection */ -void Curl_gtls_close(struct connectdata *conn, int sockindex); - -void Curl_gtls_session_free(void *ptr); -size_t Curl_gtls_version(char *buffer, size_t size); -int Curl_gtls_shutdown(struct connectdata *conn, int sockindex); -CURLcode Curl_gtls_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); -void Curl_gtls_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); -void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len); - -bool Curl_gtls_cert_status_request(void); - -/* Support HTTPS-proxy */ -#define HTTPS_PROXY_SUPPORT 1 - -/* Set the API backend definition to GnuTLS */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backend supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for GnuTLS */ -#define curlssl_init Curl_gtls_init -#define curlssl_cleanup Curl_gtls_cleanup -#define curlssl_connect Curl_gtls_connect -#define curlssl_connect_nonblocking Curl_gtls_connect_nonblocking -#define curlssl_session_free(x) Curl_gtls_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_gtls_close -#define curlssl_shutdown(x,y) Curl_gtls_shutdown(x,y) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_gtls_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) Curl_gtls_data_pending(x,y) -#define curlssl_random(x,y,z) Curl_gtls_random(x,y,z) -#define curlssl_md5sum(a,b,c,d) Curl_gtls_md5sum(a,b,c,d) -#define curlssl_sha256sum(a,b,c,d) Curl_gtls_sha256sum(a,b,c,d) -#define curlssl_cert_status_request() Curl_gtls_cert_status_request() - -#endif /* USE_GNUTLS */ -#endif /* HEADER_CURL_GTLS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/mbedtls.c b/build/premake/premake5/contrib/curl/lib/vtls/mbedtls.c deleted file mode 100644 index 07239bf266..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/mbedtls.c +++ /dev/null @@ -1,943 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010 - 2011, Hoi-Ho Chan, - * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all mbedTLS-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - * - */ - -#include "curl_setup.h" - -#ifdef USE_MBEDTLS - -#include -#if MBEDTLS_VERSION_NUMBER >= 0x02040000 -#include -#else -#include -#endif -#include -#include -#include - -#include -#include -#include -#include - -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" -#include "mbedtls.h" -#include "vtls.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "polarssl_threadlock.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* apply threading? */ -#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) -#define THREADING_SUPPORT -#endif - -#if defined(THREADING_SUPPORT) -static mbedtls_entropy_context entropy; - -static int entropy_init_initialized = 0; - -/* start of entropy_init_mutex() */ -static void entropy_init_mutex(mbedtls_entropy_context *ctx) -{ - /* lock 0 = entropy_init_mutex() */ - Curl_polarsslthreadlock_lock_function(0); - if(entropy_init_initialized == 0) { - mbedtls_entropy_init(ctx); - entropy_init_initialized = 1; - } - Curl_polarsslthreadlock_unlock_function(0); -} -/* end of entropy_init_mutex() */ - -/* start of entropy_func_mutex() */ -static int entropy_func_mutex(void *data, unsigned char *output, size_t len) -{ - int ret; - /* lock 1 = entropy_func_mutex() */ - Curl_polarsslthreadlock_lock_function(1); - ret = mbedtls_entropy_func(data, output, len); - Curl_polarsslthreadlock_unlock_function(1); - - return ret; -} -/* end of entropy_func_mutex() */ - -#endif /* THREADING_SUPPORT */ - -/* Define this to enable lots of debugging for mbedTLS */ -#undef MBEDTLS_DEBUG - -#ifdef MBEDTLS_DEBUG -static void mbed_debug(void *context, int level, const char *f_name, - int line_nb, const char *line) -{ - struct Curl_easy *data = NULL; - - if(!context) - return; - - data = (struct Curl_easy *)context; - - infof(data, "%s", line); - (void) level; -} -#else -#endif - -/* ALPN for http2? */ -#ifdef USE_NGHTTP2 -# undef HAS_ALPN -# ifdef MBEDTLS_SSL_ALPN -# define HAS_ALPN -# endif -#endif - - -/* - * profile - */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = -{ - /* Hashes from SHA-1 and above */ - MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA1) | - MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_RIPEMD160) | - MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA224) | - MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA256) | - MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA384) | - MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA512), - 0xFFFFFFF, /* Any PK alg */ - 0xFFFFFFF, /* Any curve */ - 1024, /* RSA min key len */ -}; - -/* See https://tls.mbed.org/discussions/generic/ - howto-determine-exact-buffer-len-for-mbedtls_pk_write_pubkey_der -*/ -#define RSA_PUB_DER_MAX_BYTES (38 + 2 * MBEDTLS_MPI_MAX_SIZE) -#define ECP_PUB_DER_MAX_BYTES (30 + 2 * MBEDTLS_ECP_MAX_BYTES) - -#define PUB_DER_MAX_BYTES (RSA_PUB_DER_MAX_BYTES > ECP_PUB_DER_MAX_BYTES ? \ - RSA_PUB_DER_MAX_BYTES : ECP_PUB_DER_MAX_BYTES) - -static Curl_recv mbed_recv; -static Curl_send mbed_send; - -static CURLcode -mbed_connect_step1(struct connectdata *conn, - int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data* connssl = &conn->ssl[sockindex]; - const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile); - const bool verifypeer = SSL_CONN_CONFIG(verifypeer); - const char * const ssl_capath = SSL_CONN_CONFIG(CApath); - char * const ssl_cert = SSL_SET_OPTION(cert); - const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile); - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; - int ret = -1; - char errorbuf[128]; - errorbuf[0]=0; - - /* mbedTLS only supports SSLv3 and TLSv1 */ - if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) { - failf(data, "mbedTLS does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef THREADING_SUPPORT - entropy_init_mutex(&entropy); - mbedtls_ctr_drbg_init(&connssl->ctr_drbg); - - ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, entropy_func_mutex, - &entropy, NULL, 0); - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n", - -ret, errorbuf); - } -#else - mbedtls_entropy_init(&connssl->entropy); - mbedtls_ctr_drbg_init(&connssl->ctr_drbg); - - ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, mbedtls_entropy_func, - &connssl->entropy, NULL, 0); - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n", - -ret, errorbuf); - } -#endif /* THREADING_SUPPORT */ - - /* Load the trusted CA */ - mbedtls_x509_crt_init(&connssl->cacert); - - if(ssl_cafile) { - ret = mbedtls_x509_crt_parse_file(&connssl->cacert, ssl_cafile); - - if(ret<0) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Error reading ca cert file %s - mbedTLS: (-0x%04X) %s", - ssl_cafile, -ret, errorbuf); - - if(verifypeer) - return CURLE_SSL_CACERT_BADFILE; - } - } - - if(ssl_capath) { - ret = mbedtls_x509_crt_parse_path(&connssl->cacert, ssl_capath); - - if(ret<0) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Error reading ca cert path %s - mbedTLS: (-0x%04X) %s", - ssl_capath, -ret, errorbuf); - - if(verifypeer) - return CURLE_SSL_CACERT_BADFILE; - } - } - - /* Load the client certificate */ - mbedtls_x509_crt_init(&connssl->clicert); - - if(ssl_cert) { - ret = mbedtls_x509_crt_parse_file(&connssl->clicert, ssl_cert); - - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Error reading client cert file %s - mbedTLS: (-0x%04X) %s", - ssl_cert, -ret, errorbuf); - - return CURLE_SSL_CERTPROBLEM; - } - } - - /* Load the client private key */ - mbedtls_pk_init(&connssl->pk); - - if(SSL_SET_OPTION(key)) { - ret = mbedtls_pk_parse_keyfile(&connssl->pk, SSL_SET_OPTION(key), - SSL_SET_OPTION(key_passwd)); - if(ret == 0 && !mbedtls_pk_can_do(&connssl->pk, MBEDTLS_PK_RSA)) - ret = MBEDTLS_ERR_PK_TYPE_MISMATCH; - - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Error reading private key %s - mbedTLS: (-0x%04X) %s", - SSL_SET_OPTION(key), -ret, errorbuf); - - return CURLE_SSL_CERTPROBLEM; - } - } - - /* Load the CRL */ - mbedtls_x509_crl_init(&connssl->crl); - - if(ssl_crlfile) { - ret = mbedtls_x509_crl_parse_file(&connssl->crl, ssl_crlfile); - - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Error reading CRL file %s - mbedTLS: (-0x%04X) %s", - ssl_crlfile, -ret, errorbuf); - - return CURLE_SSL_CRL_BADFILE; - } - } - - infof(data, "mbedTLS: Connecting to %s:%d\n", hostname, port); - - mbedtls_ssl_config_init(&connssl->config); - - mbedtls_ssl_init(&connssl->ssl); - if(mbedtls_ssl_setup(&connssl->ssl, &connssl->config)) { - failf(data, "mbedTLS: ssl_init failed"); - return CURLE_SSL_CONNECT_ERROR; - } - ret = mbedtls_ssl_config_defaults(&connssl->config, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT); - if(ret) { - failf(data, "mbedTLS: ssl_config failed"); - return CURLE_SSL_CONNECT_ERROR; - } - - /* new profile with RSA min key len = 1024 ... */ - mbedtls_ssl_conf_cert_profile(&connssl->config, - &mbedtls_x509_crt_profile_fr); - - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_1); - infof(data, "mbedTLS: Set min SSL version to TLS 1.0\n"); - break; - case CURL_SSLVERSION_SSLv3: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_0); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_0); - infof(data, "mbedTLS: Set SSL version to SSLv3\n"); - break; - case CURL_SSLVERSION_TLSv1_0: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_1); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_1); - infof(data, "mbedTLS: Set SSL version to TLS 1.0\n"); - break; - case CURL_SSLVERSION_TLSv1_1: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_2); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_2); - infof(data, "mbedTLS: Set SSL version to TLS 1.1\n"); - break; - case CURL_SSLVERSION_TLSv1_2: - mbedtls_ssl_conf_min_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_3); - mbedtls_ssl_conf_max_version(&connssl->config, MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_3); - infof(data, "mbedTLS: Set SSL version to TLS 1.2\n"); - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "mbedTLS: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - mbedtls_ssl_conf_authmode(&connssl->config, MBEDTLS_SSL_VERIFY_OPTIONAL); - - mbedtls_ssl_conf_rng(&connssl->config, mbedtls_ctr_drbg_random, - &connssl->ctr_drbg); - mbedtls_ssl_set_bio(&connssl->ssl, &conn->sock[sockindex], - mbedtls_net_send, - mbedtls_net_recv, - NULL /* rev_timeout() */); - - mbedtls_ssl_conf_ciphersuites(&connssl->config, - mbedtls_ssl_list_ciphersuites()); - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - mbedtls_ssl_conf_session_tickets(&connssl->config, - MBEDTLS_SSL_SESSION_TICKETS_DISABLED); -#endif - - /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { - void *old_session = NULL; - - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &old_session, NULL, sockindex)) { - ret = mbedtls_ssl_set_session(&connssl->ssl, old_session); - if(ret) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "mbedtls_ssl_set_session returned -0x%x", -ret); - return CURLE_SSL_CONNECT_ERROR; - } - infof(data, "mbedTLS re-using session\n"); - } - Curl_ssl_sessionid_unlock(conn); - } - - mbedtls_ssl_conf_ca_chain(&connssl->config, - &connssl->cacert, - &connssl->crl); - - if(SSL_SET_OPTION(key)) { - mbedtls_ssl_conf_own_cert(&connssl->config, - &connssl->clicert, &connssl->pk); - } - if(mbedtls_ssl_set_hostname(&connssl->ssl, hostname)) { - /* mbedtls_ssl_set_hostname() sets the name to use in CN/SAN checks *and* - the name to set in the SNI extension. So even if curl connects to a - host specified as an IP address, this function must be used. */ - failf(data, "couldn't set hostname in mbedTLS"); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - const char **p = &connssl->protocols[0]; -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) - *p++ = NGHTTP2_PROTO_VERSION_ID; -#endif - *p++ = ALPN_HTTP_1_1; - *p = NULL; - /* this function doesn't clone the protocols array, which is why we need - to keep it around */ - if(mbedtls_ssl_conf_alpn_protocols(&connssl->config, - &connssl->protocols[0])) { - failf(data, "Failed setting ALPN protocols"); - return CURLE_SSL_CONNECT_ERROR; - } - for(p = &connssl->protocols[0]; *p; ++p) - infof(data, "ALPN, offering %s\n", *p); - } -#endif - -#ifdef MBEDTLS_DEBUG - /* In order to make that work in mbedtls MBEDTLS_DEBUG_C must be defined. */ - mbedtls_ssl_conf_dbg(&connssl->config, mbed_debug, data); - /* - 0 No debug - * - 1 Error - * - 2 State change - * - 3 Informational - * - 4 Verbose - */ - mbedtls_debug_set_threshold(4); -#endif - - connssl->connecting_state = ssl_connect_2; - - return CURLE_OK; -} - -static CURLcode -mbed_connect_step2(struct connectdata *conn, - int sockindex) -{ - int ret; - struct Curl_easy *data = conn->data; - struct ssl_connect_data* connssl = &conn->ssl[sockindex]; - const mbedtls_x509_crt *peercert; - const char * const pinnedpubkey = SSL_IS_PROXY() ? - data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - -#ifdef HAS_ALPN - const char *next_protocol; -#endif - - char errorbuf[128]; - errorbuf[0] = 0; - - conn->recv[sockindex] = mbed_recv; - conn->send[sockindex] = mbed_send; - - ret = mbedtls_ssl_handshake(&connssl->ssl); - - if(ret == MBEDTLS_ERR_SSL_WANT_READ) { - connssl->connecting_state = ssl_connect_2_reading; - return CURLE_OK; - } - else if(ret == MBEDTLS_ERR_SSL_WANT_WRITE) { - connssl->connecting_state = ssl_connect_2_writing; - return CURLE_OK; - } - else if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "ssl_handshake returned - mbedTLS: (-0x%04X) %s", - -ret, errorbuf); - return CURLE_SSL_CONNECT_ERROR; - } - - infof(data, "mbedTLS: Handshake complete, cipher is %s\n", - mbedtls_ssl_get_ciphersuite(&conn->ssl[sockindex].ssl) - ); - - ret = mbedtls_ssl_get_verify_result(&conn->ssl[sockindex].ssl); - - if(ret && SSL_CONN_CONFIG(verifypeer)) { - if(ret & MBEDTLS_X509_BADCERT_EXPIRED) - failf(data, "Cert verify failed: BADCERT_EXPIRED"); - - if(ret & MBEDTLS_X509_BADCERT_REVOKED) { - failf(data, "Cert verify failed: BADCERT_REVOKED"); - return CURLE_SSL_CACERT; - } - - if(ret & MBEDTLS_X509_BADCERT_CN_MISMATCH) - failf(data, "Cert verify failed: BADCERT_CN_MISMATCH"); - - if(ret & MBEDTLS_X509_BADCERT_NOT_TRUSTED) - failf(data, "Cert verify failed: BADCERT_NOT_TRUSTED"); - - return CURLE_PEER_FAILED_VERIFICATION; - } - - peercert = mbedtls_ssl_get_peer_cert(&connssl->ssl); - - if(peercert && data->set.verbose) { - const size_t bufsize = 16384; - char *buffer = malloc(bufsize); - - if(!buffer) - return CURLE_OUT_OF_MEMORY; - - if(mbedtls_x509_crt_info(buffer, bufsize, "* ", peercert) > 0) - infof(data, "Dumping cert info:\n%s\n", buffer); - else - infof(data, "Unable to dump certificate information.\n"); - - free(buffer); - } - - if(pinnedpubkey) { - int size; - CURLcode result; - mbedtls_x509_crt *p; - unsigned char pubkey[PUB_DER_MAX_BYTES]; - - if(!peercert || !peercert->raw.p || !peercert->raw.len) { - failf(data, "Failed due to missing peer certificate"); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - p = calloc(1, sizeof(*p)); - - if(!p) - return CURLE_OUT_OF_MEMORY; - - mbedtls_x509_crt_init(p); - - /* Make a copy of our const peercert because mbedtls_pk_write_pubkey_der - needs a non-const key, for now. - https://github.com/ARMmbed/mbedtls/issues/396 */ - if(mbedtls_x509_crt_parse_der(p, peercert->raw.p, peercert->raw.len)) { - failf(data, "Failed copying peer certificate"); - mbedtls_x509_crt_free(p); - free(p); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - size = mbedtls_pk_write_pubkey_der(&p->pk, pubkey, PUB_DER_MAX_BYTES); - - if(size <= 0) { - failf(data, "Failed copying public key from peer certificate"); - mbedtls_x509_crt_free(p); - free(p); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - /* mbedtls_pk_write_pubkey_der writes data at the end of the buffer. */ - result = Curl_pin_peer_pubkey(data, - pinnedpubkey, - &pubkey[PUB_DER_MAX_BYTES - size], size); - if(result) { - mbedtls_x509_crt_free(p); - free(p); - return result; - } - - mbedtls_x509_crt_free(p); - free(p); - } - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - next_protocol = mbedtls_ssl_get_alpn_protocol(&connssl->ssl); - - if(next_protocol) { - infof(data, "ALPN, server accepted to use %s\n", next_protocol); -#ifdef USE_NGHTTP2 - if(!strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID, - NGHTTP2_PROTO_VERSION_ID_LEN) && - !next_protocol[NGHTTP2_PROTO_VERSION_ID_LEN]) { - conn->negnpn = CURL_HTTP_VERSION_2; - } - else -#endif - if(!strncmp(next_protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH) && - !next_protocol[ALPN_HTTP_1_1_LENGTH]) { - conn->negnpn = CURL_HTTP_VERSION_1_1; - } - } - else { - infof(data, "ALPN, server did not agree to a protocol\n"); - } - } -#endif - - connssl->connecting_state = ssl_connect_3; - infof(data, "SSL connected\n"); - - return CURLE_OK; -} - -static CURLcode -mbed_connect_step3(struct connectdata *conn, - int sockindex) -{ - CURLcode retcode = CURLE_OK; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - - DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - - if(data->set.general_ssl.sessionid) { - int ret; - mbedtls_ssl_session *our_ssl_sessionid; - void *old_ssl_sessionid = NULL; - - our_ssl_sessionid = malloc(sizeof(mbedtls_ssl_session)); - if(!our_ssl_sessionid) - return CURLE_OUT_OF_MEMORY; - - mbedtls_ssl_session_init(our_ssl_sessionid); - - ret = mbedtls_ssl_get_session(&connssl->ssl, our_ssl_sessionid); - if(ret) { - failf(data, "mbedtls_ssl_get_session returned -0x%x", -ret); - return CURLE_SSL_CONNECT_ERROR; - } - - /* If there's already a matching session in the cache, delete it */ - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, sockindex)) - Curl_ssl_delsessionid(conn, old_ssl_sessionid); - - retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid, 0, sockindex); - Curl_ssl_sessionid_unlock(conn); - if(retcode) { - free(our_ssl_sessionid); - failf(data, "failed to store ssl session"); - return retcode; - } - } - - connssl->connecting_state = ssl_connect_done; - - return CURLE_OK; -} - -static ssize_t mbed_send(struct connectdata *conn, int sockindex, - const void *mem, size_t len, - CURLcode *curlcode) -{ - int ret = -1; - - ret = mbedtls_ssl_write(&conn->ssl[sockindex].ssl, - (unsigned char *)mem, len); - - if(ret < 0) { - *curlcode = (ret == MBEDTLS_ERR_SSL_WANT_WRITE) ? - CURLE_AGAIN : CURLE_SEND_ERROR; - ret = -1; - } - - return ret; -} - -void Curl_mbedtls_close_all(struct Curl_easy *data) -{ - (void)data; -} - -void Curl_mbedtls_close(struct connectdata *conn, int sockindex) -{ - mbedtls_pk_free(&conn->ssl[sockindex].pk); - mbedtls_x509_crt_free(&conn->ssl[sockindex].clicert); - mbedtls_x509_crt_free(&conn->ssl[sockindex].cacert); - mbedtls_x509_crl_free(&conn->ssl[sockindex].crl); - mbedtls_ssl_config_free(&conn->ssl[sockindex].config); - mbedtls_ssl_free(&conn->ssl[sockindex].ssl); - mbedtls_ctr_drbg_free(&conn->ssl[sockindex].ctr_drbg); -#ifndef THREADING_SUPPORT - mbedtls_entropy_free(&conn->ssl[sockindex].entropy); -#endif /* THREADING_SUPPORT */ -} - -static ssize_t mbed_recv(struct connectdata *conn, int num, - char *buf, size_t buffersize, - CURLcode *curlcode) -{ - int ret = -1; - ssize_t len = -1; - - memset(buf, 0, buffersize); - ret = mbedtls_ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, - buffersize); - - if(ret <= 0) { - if(ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) - return 0; - - *curlcode = (ret == MBEDTLS_ERR_SSL_WANT_READ) ? - CURLE_AGAIN : CURLE_RECV_ERROR; - return -1; - } - - len = ret; - - return len; -} - -void Curl_mbedtls_session_free(void *ptr) -{ - mbedtls_ssl_session_free(ptr); - free(ptr); -} - -size_t Curl_mbedtls_version(char *buffer, size_t size) -{ - unsigned int version = mbedtls_version_get_number(); - return snprintf(buffer, size, "mbedTLS/%d.%d.%d", version>>24, - (version>>16)&0xff, (version>>8)&0xff); -} - -CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy, - size_t length) -{ -#if defined(MBEDTLS_CTR_DRBG_C) - int ret = -1; - char errorbuf[128]; - mbedtls_entropy_context ctr_entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_entropy_init(&ctr_entropy); - mbedtls_ctr_drbg_init(&ctr_drbg); - errorbuf[0]=0; - - ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, - &ctr_entropy, NULL, 0); - - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "Failed - mbedTLS: ctr_drbg_seed returned (-0x%04X) %s\n", - -ret, errorbuf); - } - else { - ret = mbedtls_ctr_drbg_random(&ctr_drbg, entropy, length); - - if(ret) { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); -#endif /* MBEDTLS_ERROR_C */ - failf(data, "mbedTLS: ctr_drbg_init returned (-0x%04X) %s\n", - -ret, errorbuf); - } - } - - mbedtls_ctr_drbg_free(&ctr_drbg); - mbedtls_entropy_free(&ctr_entropy); - - return ret == 0 ? CURLE_OK : CURLE_FAILED_INIT; -#elif defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_state hs; - mbedtls_havege_init(&hs); - mbedtls_havege_random(&hs, entropy, length); - mbedtls_havege_free(&hs); - return CURLE_OK; -#else - return CURLE_NOT_BUILT_IN; -#endif -} - -static CURLcode -mbed_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) -{ - CURLcode retcode; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - curl_socket_t sockfd = conn->sock[sockindex]; - long timeout_ms; - int what; - - /* check if the connection has already been established */ - if(ssl_connection_complete == connssl->state) { - *done = TRUE; - return CURLE_OK; - } - - if(ssl_connect_1==connssl->connecting_state) { - /* Find out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - retcode = mbed_connect_step1(conn, sockindex); - if(retcode) - return retcode; - } - - while(ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state) { - - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading - || connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking ? 0 : timeout_ms); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) { - *done = FALSE; - return CURLE_OK; - } - else { - /* timeout */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - /* Run transaction, and return to the caller if it failed or if - * this connection is part of a multi handle and this loop would - * execute again. This permits the owner of a multi handle to - * abort a connection attempt before step2 has completed while - * ensuring that a client using select() or epoll() will always - * have a valid fdset to wait on. - */ - retcode = mbed_connect_step2(conn, sockindex); - if(retcode || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return retcode; - - } /* repeat step2 until all transactions are done. */ - - if(ssl_connect_3==connssl->connecting_state) { - retcode = mbed_connect_step3(conn, sockindex); - if(retcode) - return retcode; - } - - if(ssl_connect_done==connssl->connecting_state) { - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = mbed_recv; - conn->send[sockindex] = mbed_send; - *done = TRUE; - } - else - *done = FALSE; - - /* Reset our connect state machine */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - -CURLcode -Curl_mbedtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - return mbed_connect_common(conn, sockindex, TRUE, done); -} - - -CURLcode -Curl_mbedtls_connect(struct connectdata *conn, - int sockindex) -{ - CURLcode retcode; - bool done = FALSE; - - retcode = mbed_connect_common(conn, sockindex, FALSE, &done); - if(retcode) - return retcode; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -/* - * return 0 error initializing SSL - * return 1 SSL initialized successfully - */ -int Curl_mbedtls_init(void) -{ - return Curl_polarsslthreadlock_thread_setup(); -} - -void Curl_mbedtls_cleanup(void) -{ - (void)Curl_polarsslthreadlock_thread_cleanup(); -} - -int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex) -{ - return mbedtls_ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0; -} - -#endif /* USE_MBEDTLS */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/mbedtls.h b/build/premake/premake5/contrib/curl/lib/vtls/mbedtls.h deleted file mode 100644 index 5b0bcf6d77..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/mbedtls.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef HEADER_CURL_MBEDTLS_H -#define HEADER_CURL_MBEDTLS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * Copyright (C) 2010, Hoi-Ho Chan, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef USE_MBEDTLS - -#include - -/* Called on first use mbedTLS, setup threading if supported */ -int Curl_mbedtls_init(void); -void Curl_mbedtls_cleanup(void); -int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex); - -CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_mbedtls_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -/* tell mbedTLS to close down all open information regarding connections (and - thus session ID caching etc) */ -void Curl_mbedtls_close_all(struct Curl_easy *data); - - /* close a SSL connection */ -void Curl_mbedtls_close(struct connectdata *conn, int sockindex); - -void Curl_mbedtls_session_free(void *ptr); -size_t Curl_mbedtls_version(char *buffer, size_t size); -int Curl_mbedtls_shutdown(struct connectdata *conn, int sockindex); - -CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy, - size_t length); - -/* this backends supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for mbedTLS */ -#define curlssl_init() Curl_mbedtls_init() -#define curlssl_cleanup() Curl_mbedtls_cleanup() -#define curlssl_connect Curl_mbedtls_connect -#define curlssl_connect_nonblocking Curl_mbedtls_connect_nonblocking -#define curlssl_session_free(x) Curl_mbedtls_session_free(x) -#define curlssl_close_all Curl_mbedtls_close_all -#define curlssl_close Curl_mbedtls_close -#define curlssl_shutdown(x,y) 0 -#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL) -#define curlssl_version Curl_mbedtls_version -#define curlssl_check_cxn(x) (x=x, -1) -#define curlssl_data_pending(x,y) Curl_mbedtls_data_pending(x, y) -#define CURL_SSL_BACKEND CURLSSLBACKEND_MBEDTLS -#define curlssl_sha256sum(a,b,c,d) mbedtls_sha256(a,b,c,0) -#define curlssl_random(x,y,z) Curl_mbedtls_random(x, y, z) - -#endif /* USE_MBEDTLS */ -#endif /* HEADER_CURL_MBEDTLS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/nss.c b/build/premake/premake5/contrib/curl/lib/vtls/nss.c deleted file mode 100644 index d5158aceff..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/nss.c +++ /dev/null @@ -1,2197 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all NSS-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - */ - -#include "curl_setup.h" - -#ifdef USE_NSS - -#include "urldata.h" -#include "sendf.h" -#include "formdata.h" /* for the boundary function */ -#include "url.h" /* for the ssl config check function */ -#include "connect.h" -#include "strcase.h" -#include "select.h" -#include "vtls.h" -#include "llist.h" -#include "curl_printf.h" -#include "nssg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* for SECKEY_DestroyPublicKey() */ - -#define NSSVERNUM ((NSS_VMAJOR<<16)|(NSS_VMINOR<<8)|NSS_VPATCH) - -#if NSSVERNUM >= 0x030f00 /* 3.15.0 */ -#include -#endif - -#include "strcase.h" -#include "warnless.h" -#include "x509asn1.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -#define SSL_DIR "/etc/pki/nssdb" - -/* enough to fit the string "PEM Token #[0|1]" */ -#define SLOTSIZE 13 - -PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd); -static PRLock *nss_initlock = NULL; -static PRLock *nss_crllock = NULL; -static PRLock *nss_findslot_lock = NULL; -static struct curl_llist *nss_crl_list = NULL; -static NSSInitContext *nss_context = NULL; -static volatile int initialized = 0; - -typedef struct { - const char *name; - int num; -} cipher_s; - -#define PK11_SETATTRS(_attr, _idx, _type, _val, _len) do { \ - CK_ATTRIBUTE *ptr = (_attr) + ((_idx)++); \ - ptr->type = (_type); \ - ptr->pValue = (_val); \ - ptr->ulValueLen = (_len); \ -} WHILE_FALSE - -#define CERT_NewTempCertificate __CERT_NewTempCertificate - -#define NUM_OF_CIPHERS sizeof(cipherlist)/sizeof(cipherlist[0]) -static const cipher_s cipherlist[] = { - /* SSL2 cipher suites */ - {"rc4", SSL_EN_RC4_128_WITH_MD5}, - {"rc4-md5", SSL_EN_RC4_128_WITH_MD5}, - {"rc4export", SSL_EN_RC4_128_EXPORT40_WITH_MD5}, - {"rc2", SSL_EN_RC2_128_CBC_WITH_MD5}, - {"rc2export", SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5}, - {"des", SSL_EN_DES_64_CBC_WITH_MD5}, - {"desede3", SSL_EN_DES_192_EDE3_CBC_WITH_MD5}, - /* SSL3/TLS cipher suites */ - {"rsa_rc4_128_md5", SSL_RSA_WITH_RC4_128_MD5}, - {"rsa_rc4_128_sha", SSL_RSA_WITH_RC4_128_SHA}, - {"rsa_3des_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA}, - {"rsa_des_sha", SSL_RSA_WITH_DES_CBC_SHA}, - {"rsa_rc4_40_md5", SSL_RSA_EXPORT_WITH_RC4_40_MD5}, - {"rsa_rc2_40_md5", SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5}, - {"rsa_null_md5", SSL_RSA_WITH_NULL_MD5}, - {"rsa_null_sha", SSL_RSA_WITH_NULL_SHA}, - {"fips_3des_sha", SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA}, - {"fips_des_sha", SSL_RSA_FIPS_WITH_DES_CBC_SHA}, - {"fortezza", SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA}, - {"fortezza_rc4_128_sha", SSL_FORTEZZA_DMS_WITH_RC4_128_SHA}, - {"fortezza_null", SSL_FORTEZZA_DMS_WITH_NULL_SHA}, - /* TLS 1.0: Exportable 56-bit Cipher Suites. */ - {"rsa_des_56_sha", TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA}, - {"rsa_rc4_56_sha", TLS_RSA_EXPORT1024_WITH_RC4_56_SHA}, - /* AES ciphers. */ - {"dhe_dss_aes_128_cbc_sha", TLS_DHE_DSS_WITH_AES_128_CBC_SHA}, - {"dhe_dss_aes_256_cbc_sha", TLS_DHE_DSS_WITH_AES_256_CBC_SHA}, - {"dhe_rsa_aes_128_cbc_sha", TLS_DHE_RSA_WITH_AES_128_CBC_SHA}, - {"dhe_rsa_aes_256_cbc_sha", TLS_DHE_RSA_WITH_AES_256_CBC_SHA}, - {"rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA}, - {"rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA}, - /* ECC ciphers. */ - {"ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA}, - {"ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA}, - {"ecdh_ecdsa_3des_sha", TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA}, - {"ecdh_ecdsa_aes_128_sha", TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA}, - {"ecdh_ecdsa_aes_256_sha", TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA}, - {"ecdhe_ecdsa_null_sha", TLS_ECDHE_ECDSA_WITH_NULL_SHA}, - {"ecdhe_ecdsa_rc4_128_sha", TLS_ECDHE_ECDSA_WITH_RC4_128_SHA}, - {"ecdhe_ecdsa_3des_sha", TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA}, - {"ecdhe_ecdsa_aes_128_sha", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA}, - {"ecdhe_ecdsa_aes_256_sha", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA}, - {"ecdh_rsa_null_sha", TLS_ECDH_RSA_WITH_NULL_SHA}, - {"ecdh_rsa_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA}, - {"ecdh_rsa_3des_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA}, - {"ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA}, - {"ecdh_rsa_aes_256_sha", TLS_ECDH_RSA_WITH_AES_256_CBC_SHA}, - {"ecdhe_rsa_null", TLS_ECDHE_RSA_WITH_NULL_SHA}, - {"ecdhe_rsa_rc4_128_sha", TLS_ECDHE_RSA_WITH_RC4_128_SHA}, - {"ecdhe_rsa_3des_sha", TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA}, - {"ecdhe_rsa_aes_128_sha", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA}, - {"ecdhe_rsa_aes_256_sha", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA}, - {"ecdh_anon_null_sha", TLS_ECDH_anon_WITH_NULL_SHA}, - {"ecdh_anon_rc4_128sha", TLS_ECDH_anon_WITH_RC4_128_SHA}, - {"ecdh_anon_3des_sha", TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA}, - {"ecdh_anon_aes_128_sha", TLS_ECDH_anon_WITH_AES_128_CBC_SHA}, - {"ecdh_anon_aes_256_sha", TLS_ECDH_anon_WITH_AES_256_CBC_SHA}, -#ifdef TLS_RSA_WITH_NULL_SHA256 - /* new HMAC-SHA256 cipher suites specified in RFC */ - {"rsa_null_sha_256", TLS_RSA_WITH_NULL_SHA256}, - {"rsa_aes_128_cbc_sha_256", TLS_RSA_WITH_AES_128_CBC_SHA256}, - {"rsa_aes_256_cbc_sha_256", TLS_RSA_WITH_AES_256_CBC_SHA256}, - {"dhe_rsa_aes_128_cbc_sha_256", TLS_DHE_RSA_WITH_AES_128_CBC_SHA256}, - {"dhe_rsa_aes_256_cbc_sha_256", TLS_DHE_RSA_WITH_AES_256_CBC_SHA256}, - {"ecdhe_ecdsa_aes_128_cbc_sha_256", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256}, - {"ecdhe_rsa_aes_128_cbc_sha_256", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256}, -#endif -#ifdef TLS_RSA_WITH_AES_128_GCM_SHA256 - /* AES GCM cipher suites in RFC 5288 and RFC 5289 */ - {"rsa_aes_128_gcm_sha_256", TLS_RSA_WITH_AES_128_GCM_SHA256}, - {"dhe_rsa_aes_128_gcm_sha_256", TLS_DHE_RSA_WITH_AES_128_GCM_SHA256}, - {"dhe_dss_aes_128_gcm_sha_256", TLS_DHE_DSS_WITH_AES_128_GCM_SHA256}, - {"ecdhe_ecdsa_aes_128_gcm_sha_256", TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256}, - {"ecdh_ecdsa_aes_128_gcm_sha_256", TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256}, - {"ecdhe_rsa_aes_128_gcm_sha_256", TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, - {"ecdh_rsa_aes_128_gcm_sha_256", TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256}, -#endif -#ifdef TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - /* cipher suites using SHA384 */ - {"rsa_aes_256_gcm_sha_384", TLS_RSA_WITH_AES_256_GCM_SHA384}, - {"dhe_rsa_aes_256_gcm_sha_384", TLS_DHE_RSA_WITH_AES_256_GCM_SHA384}, - {"dhe_dss_aes_256_gcm_sha_384", TLS_DHE_DSS_WITH_AES_256_GCM_SHA384}, - {"ecdhe_ecdsa_aes_256_sha_384", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384}, - {"ecdhe_rsa_aes_256_sha_384", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384}, - {"ecdhe_ecdsa_aes_256_gcm_sha_384", TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384}, - {"ecdhe_rsa_aes_256_gcm_sha_384", TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384}, -#endif -#ifdef TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 - /* chacha20-poly1305 cipher suites */ - {"ecdhe_rsa_chacha20_poly1305_sha_256", - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256}, - {"ecdhe_ecdsa_chacha20_poly1305_sha_256", - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256}, - {"dhe_rsa_chacha20_poly1305_sha_256", - TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256}, -#endif -}; - -static const char *pem_library = "libnsspem.so"; -static SECMODModule *mod = NULL; - -/* NSPR I/O layer we use to detect blocking direction during SSL handshake */ -static PRDescIdentity nspr_io_identity = PR_INVALID_IO_LAYER; -static PRIOMethods nspr_io_methods; - -static const char *nss_error_to_name(PRErrorCode code) -{ - const char *name = PR_ErrorToName(code); - if(name) - return name; - - return "unknown error"; -} - -static void nss_print_error_message(struct Curl_easy *data, PRUint32 err) -{ - failf(data, "%s", PR_ErrorToString(err, PR_LANGUAGE_I_DEFAULT)); -} - -static SECStatus set_ciphers(struct Curl_easy *data, PRFileDesc * model, - char *cipher_list) -{ - unsigned int i; - PRBool cipher_state[NUM_OF_CIPHERS]; - PRBool found; - char *cipher; - - /* use accessors to avoid dynamic linking issues after an update of NSS */ - const PRUint16 num_implemented_ciphers = SSL_GetNumImplementedCiphers(); - const PRUint16 *implemented_ciphers = SSL_GetImplementedCiphers(); - if(!implemented_ciphers) - return SECFailure; - - /* First disable all ciphers. This uses a different max value in case - * NSS adds more ciphers later we don't want them available by - * accident - */ - for(i = 0; i < num_implemented_ciphers; i++) { - SSL_CipherPrefSet(model, implemented_ciphers[i], PR_FALSE); - } - - /* Set every entry in our list to false */ - for(i = 0; i < NUM_OF_CIPHERS; i++) { - cipher_state[i] = PR_FALSE; - } - - cipher = cipher_list; - - while(cipher_list && (cipher_list[0])) { - while((*cipher) && (ISSPACE(*cipher))) - ++cipher; - - cipher_list = strchr(cipher, ','); - if(cipher_list) { - *cipher_list++ = '\0'; - } - - found = PR_FALSE; - - for(i=0; i. - */ -static PK11SlotInfo* nss_find_slot_by_name(const char *slot_name) -{ - PK11SlotInfo *slot; - PR_Lock(nss_findslot_lock); - slot = PK11_FindSlotByName(slot_name); - PR_Unlock(nss_findslot_lock); - return slot; -} - -/* Call PK11_CreateGenericObject() with the given obj_class and filename. If - * the call succeeds, append the object handle to the list of objects so that - * the object can be destroyed in Curl_nss_close(). */ -static CURLcode nss_create_object(struct ssl_connect_data *ssl, - CK_OBJECT_CLASS obj_class, - const char *filename, bool cacert) -{ - PK11SlotInfo *slot; - PK11GenericObject *obj; - CK_BBOOL cktrue = CK_TRUE; - CK_BBOOL ckfalse = CK_FALSE; - CK_ATTRIBUTE attrs[/* max count of attributes */ 4]; - int attr_cnt = 0; - CURLcode result = (cacert) - ? CURLE_SSL_CACERT_BADFILE - : CURLE_SSL_CERTPROBLEM; - - const int slot_id = (cacert) ? 0 : 1; - char *slot_name = aprintf("PEM Token #%d", slot_id); - if(!slot_name) - return CURLE_OUT_OF_MEMORY; - - slot = nss_find_slot_by_name(slot_name); - free(slot_name); - if(!slot) - return result; - - PK11_SETATTRS(attrs, attr_cnt, CKA_CLASS, &obj_class, sizeof(obj_class)); - PK11_SETATTRS(attrs, attr_cnt, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL)); - PK11_SETATTRS(attrs, attr_cnt, CKA_LABEL, (unsigned char *)filename, - strlen(filename) + 1); - - if(CKO_CERTIFICATE == obj_class) { - CK_BBOOL *pval = (cacert) ? (&cktrue) : (&ckfalse); - PK11_SETATTRS(attrs, attr_cnt, CKA_TRUST, pval, sizeof(*pval)); - } - - obj = PK11_CreateGenericObject(slot, attrs, attr_cnt, PR_FALSE); - PK11_FreeSlot(slot); - if(!obj) - return result; - - if(!Curl_llist_insert_next(ssl->obj_list, ssl->obj_list->tail, obj)) { - PK11_DestroyGenericObject(obj); - return CURLE_OUT_OF_MEMORY; - } - - if(!cacert && CKO_CERTIFICATE == obj_class) - /* store reference to a client certificate */ - ssl->obj_clicert = obj; - - return CURLE_OK; -} - -/* Destroy the NSS object whose handle is given by ptr. This function is - * a callback of Curl_llist_alloc() used by Curl_llist_destroy() to destroy - * NSS objects in Curl_nss_close() */ -static void nss_destroy_object(void *user, void *ptr) -{ - PK11GenericObject *obj = (PK11GenericObject *)ptr; - (void) user; - PK11_DestroyGenericObject(obj); -} - -/* same as nss_destroy_object() but for CRL items */ -static void nss_destroy_crl_item(void *user, void *ptr) -{ - SECItem *crl_der = (SECItem *)ptr; - (void) user; - SECITEM_FreeItem(crl_der, PR_TRUE); -} - -static CURLcode nss_load_cert(struct ssl_connect_data *ssl, - const char *filename, PRBool cacert) -{ - CURLcode result = (cacert) - ? CURLE_SSL_CACERT_BADFILE - : CURLE_SSL_CERTPROBLEM; - - /* libnsspem.so leaks memory if the requested file does not exist. For more - * details, go to . */ - if(is_file(filename)) - result = nss_create_object(ssl, CKO_CERTIFICATE, filename, cacert); - - if(!result && !cacert) { - /* we have successfully loaded a client certificate */ - CERTCertificate *cert; - char *nickname = NULL; - char *n = strrchr(filename, '/'); - if(n) - n++; - - /* The following undocumented magic helps to avoid a SIGSEGV on call - * of PK11_ReadRawAttribute() from SelectClientCert() when using an - * immature version of libnsspem.so. For more details, go to - * . */ - nickname = aprintf("PEM Token #1:%s", n); - if(nickname) { - cert = PK11_FindCertFromNickname(nickname, NULL); - if(cert) - CERT_DestroyCertificate(cert); - - free(nickname); - } - } - - return result; -} - -/* add given CRL to cache if it is not already there */ -static CURLcode nss_cache_crl(SECItem *crl_der) -{ - CERTCertDBHandle *db = CERT_GetDefaultCertDB(); - CERTSignedCrl *crl = SEC_FindCrlByDERCert(db, crl_der, 0); - if(crl) { - /* CRL already cached */ - SEC_DestroyCrl(crl); - SECITEM_FreeItem(crl_der, PR_TRUE); - return CURLE_OK; - } - - /* acquire lock before call of CERT_CacheCRL() and accessing nss_crl_list */ - PR_Lock(nss_crllock); - - /* store the CRL item so that we can free it in Curl_nss_cleanup() */ - if(!Curl_llist_insert_next(nss_crl_list, nss_crl_list->tail, crl_der)) { - SECITEM_FreeItem(crl_der, PR_TRUE); - PR_Unlock(nss_crllock); - return CURLE_OUT_OF_MEMORY; - } - - if(SECSuccess != CERT_CacheCRL(db, crl_der)) { - /* unable to cache CRL */ - PR_Unlock(nss_crllock); - return CURLE_SSL_CRL_BADFILE; - } - - /* we need to clear session cache, so that the CRL could take effect */ - SSL_ClearSessionCache(); - PR_Unlock(nss_crllock); - return CURLE_OK; -} - -static CURLcode nss_load_crl(const char *crlfilename) -{ - PRFileDesc *infile; - PRFileInfo info; - SECItem filedata = { 0, NULL, 0 }; - SECItem *crl_der = NULL; - char *body; - - infile = PR_Open(crlfilename, PR_RDONLY, 0); - if(!infile) - return CURLE_SSL_CRL_BADFILE; - - if(PR_SUCCESS != PR_GetOpenFileInfo(infile, &info)) - goto fail; - - if(!SECITEM_AllocItem(NULL, &filedata, info.size + /* zero ended */ 1)) - goto fail; - - if(info.size != PR_Read(infile, filedata.data, info.size)) - goto fail; - - crl_der = SECITEM_AllocItem(NULL, NULL, 0U); - if(!crl_der) - goto fail; - - /* place a trailing zero right after the visible data */ - body = (char *)filedata.data; - body[--filedata.len] = '\0'; - - body = strstr(body, "-----BEGIN"); - if(body) { - /* assume ASCII */ - char *trailer; - char *begin = PORT_Strchr(body, '\n'); - if(!begin) - begin = PORT_Strchr(body, '\r'); - if(!begin) - goto fail; - - trailer = strstr(++begin, "-----END"); - if(!trailer) - goto fail; - - /* retrieve DER from ASCII */ - *trailer = '\0'; - if(ATOB_ConvertAsciiToItem(crl_der, begin)) - goto fail; - - SECITEM_FreeItem(&filedata, PR_FALSE); - } - else - /* assume DER */ - *crl_der = filedata; - - PR_Close(infile); - return nss_cache_crl(crl_der); - -fail: - PR_Close(infile); - SECITEM_FreeItem(crl_der, PR_TRUE); - SECITEM_FreeItem(&filedata, PR_FALSE); - return CURLE_SSL_CRL_BADFILE; -} - -static CURLcode nss_load_key(struct connectdata *conn, int sockindex, - char *key_file) -{ - PK11SlotInfo *slot; - SECStatus status; - CURLcode result; - struct ssl_connect_data *ssl = conn->ssl; - struct Curl_easy *data = conn->data; - - (void)sockindex; /* unused */ - - result = nss_create_object(ssl, CKO_PRIVATE_KEY, key_file, FALSE); - if(result) { - PR_SetError(SEC_ERROR_BAD_KEY, 0); - return result; - } - - slot = nss_find_slot_by_name("PEM Token #1"); - if(!slot) - return CURLE_SSL_CERTPROBLEM; - - /* This will force the token to be seen as re-inserted */ - SECMOD_WaitForAnyTokenEvent(mod, 0, 0); - PK11_IsPresent(slot); - - status = PK11_Authenticate(slot, PR_TRUE, SSL_SET_OPTION(key_passwd)); - PK11_FreeSlot(slot); - - return (SECSuccess == status) ? CURLE_OK : CURLE_SSL_CERTPROBLEM; -} - -static int display_error(struct connectdata *conn, PRInt32 err, - const char *filename) -{ - switch(err) { - case SEC_ERROR_BAD_PASSWORD: - failf(conn->data, "Unable to load client key: Incorrect password"); - return 1; - case SEC_ERROR_UNKNOWN_CERT: - failf(conn->data, "Unable to load certificate %s", filename); - return 1; - default: - break; - } - return 0; /* The caller will print a generic error */ -} - -static CURLcode cert_stuff(struct connectdata *conn, int sockindex, - char *cert_file, char *key_file) -{ - struct Curl_easy *data = conn->data; - CURLcode result; - - if(cert_file) { - result = nss_load_cert(&conn->ssl[sockindex], cert_file, PR_FALSE); - if(result) { - const PRErrorCode err = PR_GetError(); - if(!display_error(conn, err, cert_file)) { - const char *err_name = nss_error_to_name(err); - failf(data, "unable to load client cert: %d (%s)", err, err_name); - } - - return result; - } - } - - if(key_file || (is_file(cert_file))) { - if(key_file) - result = nss_load_key(conn, sockindex, key_file); - else - /* In case the cert file also has the key */ - result = nss_load_key(conn, sockindex, cert_file); - if(result) { - const PRErrorCode err = PR_GetError(); - if(!display_error(conn, err, key_file)) { - const char *err_name = nss_error_to_name(err); - failf(data, "unable to load client key: %d (%s)", err, err_name); - } - - return result; - } - } - - return CURLE_OK; -} - -static char *nss_get_password(PK11SlotInfo *slot, PRBool retry, void *arg) -{ - (void)slot; /* unused */ - - if(retry || NULL == arg) - return NULL; - else - return (char *)PORT_Strdup((char *)arg); -} - -/* bypass the default SSL_AuthCertificate() hook in case we do not want to - * verify peer */ -static SECStatus nss_auth_cert_hook(void *arg, PRFileDesc *fd, PRBool checksig, - PRBool isServer) -{ - struct connectdata *conn = (struct connectdata *)arg; - -#ifdef SSL_ENABLE_OCSP_STAPLING - if(SSL_CONN_CONFIG(verifystatus)) { - SECStatus cacheResult; - - const SECItemArray *csa = SSL_PeerStapledOCSPResponses(fd); - if(!csa) { - failf(conn->data, "Invalid OCSP response"); - return SECFailure; - } - - if(csa->len == 0) { - failf(conn->data, "No OCSP response received"); - return SECFailure; - } - - cacheResult = CERT_CacheOCSPResponseFromSideChannel( - CERT_GetDefaultCertDB(), SSL_PeerCertificate(fd), - PR_Now(), &csa->items[0], arg - ); - - if(cacheResult != SECSuccess) { - failf(conn->data, "Invalid OCSP response"); - return cacheResult; - } - } -#endif - - if(!SSL_CONN_CONFIG(verifypeer)) { - infof(conn->data, "skipping SSL peer certificate verification\n"); - return SECSuccess; - } - - return SSL_AuthCertificate(CERT_GetDefaultCertDB(), fd, checksig, isServer); -} - -/** - * Inform the application that the handshake is complete. - */ -static void HandshakeCallback(PRFileDesc *sock, void *arg) -{ - struct connectdata *conn = (struct connectdata*) arg; - unsigned int buflenmax = 50; - unsigned char buf[50]; - unsigned int buflen; - SSLNextProtoState state; - - if(!conn->bits.tls_enable_npn && !conn->bits.tls_enable_alpn) { - return; - } - - if(SSL_GetNextProto(sock, &state, buf, &buflen, buflenmax) == SECSuccess) { - - switch(state) { -#if NSSVERNUM >= 0x031a00 /* 3.26.0 */ - /* used by NSS internally to implement 0-RTT */ - case SSL_NEXT_PROTO_EARLY_VALUE: - /* fall through! */ -#endif - case SSL_NEXT_PROTO_NO_SUPPORT: - case SSL_NEXT_PROTO_NO_OVERLAP: - infof(conn->data, "ALPN/NPN, server did not agree to a protocol\n"); - return; -#ifdef SSL_ENABLE_ALPN - case SSL_NEXT_PROTO_SELECTED: - infof(conn->data, "ALPN, server accepted to use %.*s\n", buflen, buf); - break; -#endif - case SSL_NEXT_PROTO_NEGOTIATED: - infof(conn->data, "NPN, server accepted to use %.*s\n", buflen, buf); - break; - } - -#ifdef USE_NGHTTP2 - if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN && - !memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)) { - conn->negnpn = CURL_HTTP_VERSION_2; - } - else -#endif - if(buflen == ALPN_HTTP_1_1_LENGTH && - !memcmp(ALPN_HTTP_1_1, buf, ALPN_HTTP_1_1_LENGTH)) { - conn->negnpn = CURL_HTTP_VERSION_1_1; - } - } -} - -#if NSSVERNUM >= 0x030f04 /* 3.15.4 */ -static SECStatus CanFalseStartCallback(PRFileDesc *sock, void *client_data, - PRBool *canFalseStart) -{ - struct connectdata *conn = client_data; - struct Curl_easy *data = conn->data; - - SSLChannelInfo channelInfo; - SSLCipherSuiteInfo cipherInfo; - - SECStatus rv; - PRBool negotiatedExtension; - - *canFalseStart = PR_FALSE; - - if(SSL_GetChannelInfo(sock, &channelInfo, sizeof(channelInfo)) != SECSuccess) - return SECFailure; - - if(SSL_GetCipherSuiteInfo(channelInfo.cipherSuite, &cipherInfo, - sizeof(cipherInfo)) != SECSuccess) - return SECFailure; - - /* Prevent version downgrade attacks from TLS 1.2, and avoid False Start for - * TLS 1.3 and later. See https://bugzilla.mozilla.org/show_bug.cgi?id=861310 - */ - if(channelInfo.protocolVersion != SSL_LIBRARY_VERSION_TLS_1_2) - goto end; - - /* Only allow ECDHE key exchange algorithm. - * See https://bugzilla.mozilla.org/show_bug.cgi?id=952863 */ - if(cipherInfo.keaType != ssl_kea_ecdh) - goto end; - - /* Prevent downgrade attacks on the symmetric cipher. We do not allow CBC - * mode due to BEAST, POODLE, and other attacks on the MAC-then-Encrypt - * design. See https://bugzilla.mozilla.org/show_bug.cgi?id=1109766 */ - if(cipherInfo.symCipher != ssl_calg_aes_gcm) - goto end; - - /* Enforce ALPN or NPN to do False Start, as an indicator of server - * compatibility. */ - rv = SSL_HandshakeNegotiatedExtension(sock, ssl_app_layer_protocol_xtn, - &negotiatedExtension); - if(rv != SECSuccess || !negotiatedExtension) { - rv = SSL_HandshakeNegotiatedExtension(sock, ssl_next_proto_nego_xtn, - &negotiatedExtension); - } - - if(rv != SECSuccess || !negotiatedExtension) - goto end; - - *canFalseStart = PR_TRUE; - - infof(data, "Trying TLS False Start\n"); - -end: - return SECSuccess; -} -#endif - -static void display_cert_info(struct Curl_easy *data, - CERTCertificate *cert) -{ - char *subject, *issuer, *common_name; - PRExplodedTime printableTime; - char timeString[256]; - PRTime notBefore, notAfter; - - subject = CERT_NameToAscii(&cert->subject); - issuer = CERT_NameToAscii(&cert->issuer); - common_name = CERT_GetCommonName(&cert->subject); - infof(data, "\tsubject: %s\n", subject); - - CERT_GetCertTimes(cert, ¬Before, ¬After); - PR_ExplodeTime(notBefore, PR_GMTParameters, &printableTime); - PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime); - infof(data, "\tstart date: %s\n", timeString); - PR_ExplodeTime(notAfter, PR_GMTParameters, &printableTime); - PR_FormatTime(timeString, 256, "%b %d %H:%M:%S %Y GMT", &printableTime); - infof(data, "\texpire date: %s\n", timeString); - infof(data, "\tcommon name: %s\n", common_name); - infof(data, "\tissuer: %s\n", issuer); - - PR_Free(subject); - PR_Free(issuer); - PR_Free(common_name); -} - -static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock) -{ - CURLcode result = CURLE_OK; - SSLChannelInfo channel; - SSLCipherSuiteInfo suite; - CERTCertificate *cert; - CERTCertificate *cert2; - CERTCertificate *cert3; - PRTime now; - int i; - - if(SSL_GetChannelInfo(sock, &channel, sizeof channel) == - SECSuccess && channel.length == sizeof channel && - channel.cipherSuite) { - if(SSL_GetCipherSuiteInfo(channel.cipherSuite, - &suite, sizeof suite) == SECSuccess) { - infof(conn->data, "SSL connection using %s\n", suite.cipherSuiteName); - } - } - - cert = SSL_PeerCertificate(sock); - if(cert) { - infof(conn->data, "Server certificate:\n"); - - if(!conn->data->set.ssl.certinfo) { - display_cert_info(conn->data, cert); - CERT_DestroyCertificate(cert); - } - else { - /* Count certificates in chain. */ - now = PR_Now(); - i = 1; - if(!cert->isRoot) { - cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA); - while(cert2) { - i++; - if(cert2->isRoot) { - CERT_DestroyCertificate(cert2); - break; - } - cert3 = CERT_FindCertIssuer(cert2, now, certUsageSSLCA); - CERT_DestroyCertificate(cert2); - cert2 = cert3; - } - } - - result = Curl_ssl_init_certinfo(conn->data, i); - if(!result) { - for(i = 0; cert; cert = cert2) { - result = Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data, - (char *)cert->derCert.data + - cert->derCert.len); - if(result) - break; - - if(cert->isRoot) { - CERT_DestroyCertificate(cert); - break; - } - - cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA); - CERT_DestroyCertificate(cert); - } - } - } - } - - return result; -} - -static SECStatus BadCertHandler(void *arg, PRFileDesc *sock) -{ - struct connectdata *conn = (struct connectdata *)arg; - struct Curl_easy *data = conn->data; - PRErrorCode err = PR_GetError(); - CERTCertificate *cert; - - /* remember the cert verification result */ - if(SSL_IS_PROXY()) - data->set.proxy_ssl.certverifyresult = err; - else - data->set.ssl.certverifyresult = err; - - if(err == SSL_ERROR_BAD_CERT_DOMAIN && !SSL_CONN_CONFIG(verifyhost)) - /* we are asked not to verify the host name */ - return SECSuccess; - - /* print only info about the cert, the error is printed off the callback */ - cert = SSL_PeerCertificate(sock); - if(cert) { - infof(data, "Server certificate:\n"); - display_cert_info(data, cert); - CERT_DestroyCertificate(cert); - } - - return SECFailure; -} - -/** - * - * Check that the Peer certificate's issuer certificate matches the one found - * by issuer_nickname. This is not exactly the way OpenSSL and GNU TLS do the - * issuer check, so we provide comments that mimic the OpenSSL - * X509_check_issued function (in x509v3/v3_purp.c) - */ -static SECStatus check_issuer_cert(PRFileDesc *sock, - char *issuer_nickname) -{ - CERTCertificate *cert, *cert_issuer, *issuer; - SECStatus res=SECSuccess; - void *proto_win = NULL; - - cert = SSL_PeerCertificate(sock); - cert_issuer = CERT_FindCertIssuer(cert, PR_Now(), certUsageObjectSigner); - - proto_win = SSL_RevealPinArg(sock); - issuer = PK11_FindCertFromNickname(issuer_nickname, proto_win); - - if((!cert_issuer) || (!issuer)) - res = SECFailure; - else if(SECITEM_CompareItem(&cert_issuer->derCert, - &issuer->derCert)!=SECEqual) - res = SECFailure; - - CERT_DestroyCertificate(cert); - CERT_DestroyCertificate(issuer); - CERT_DestroyCertificate(cert_issuer); - return res; -} - -static CURLcode cmp_peer_pubkey(struct ssl_connect_data *connssl, - const char *pinnedpubkey) -{ - CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; - struct Curl_easy *data = connssl->data; - CERTCertificate *cert; - - if(!pinnedpubkey) - /* no pinned public key specified */ - return CURLE_OK; - - /* get peer certificate */ - cert = SSL_PeerCertificate(connssl->handle); - if(cert) { - /* extract public key from peer certificate */ - SECKEYPublicKey *pubkey = CERT_ExtractPublicKey(cert); - if(pubkey) { - /* encode the public key as DER */ - SECItem *cert_der = PK11_DEREncodePublicKey(pubkey); - if(cert_der) { - /* compare the public key with the pinned public key */ - result = Curl_pin_peer_pubkey(data, pinnedpubkey, cert_der->data, - cert_der->len); - SECITEM_FreeItem(cert_der, PR_TRUE); - } - SECKEY_DestroyPublicKey(pubkey); - } - CERT_DestroyCertificate(cert); - } - - /* report the resulting status */ - switch(result) { - case CURLE_OK: - infof(data, "pinned public key verified successfully!\n"); - break; - case CURLE_SSL_PINNEDPUBKEYNOTMATCH: - failf(data, "failed to verify pinned public key"); - break; - default: - /* OOM, etc. */ - break; - } - - return result; -} - -/** - * - * Callback to pick the SSL client certificate. - */ -static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, - struct CERTDistNamesStr *caNames, - struct CERTCertificateStr **pRetCert, - struct SECKEYPrivateKeyStr **pRetKey) -{ - struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg; - struct Curl_easy *data = connssl->data; - const char *nickname = connssl->client_nickname; - static const char pem_slotname[] = "PEM Token #1"; - - if(connssl->obj_clicert) { - /* use the cert/key provided by PEM reader */ - SECItem cert_der = { 0, NULL, 0 }; - void *proto_win = SSL_RevealPinArg(sock); - struct CERTCertificateStr *cert; - struct SECKEYPrivateKeyStr *key; - - PK11SlotInfo *slot = nss_find_slot_by_name(pem_slotname); - if(NULL == slot) { - failf(data, "NSS: PK11 slot not found: %s", pem_slotname); - return SECFailure; - } - - if(PK11_ReadRawAttribute(PK11_TypeGeneric, connssl->obj_clicert, CKA_VALUE, - &cert_der) != SECSuccess) { - failf(data, "NSS: CKA_VALUE not found in PK11 generic object"); - PK11_FreeSlot(slot); - return SECFailure; - } - - cert = PK11_FindCertFromDERCertItem(slot, &cert_der, proto_win); - SECITEM_FreeItem(&cert_der, PR_FALSE); - if(NULL == cert) { - failf(data, "NSS: client certificate from file not found"); - PK11_FreeSlot(slot); - return SECFailure; - } - - key = PK11_FindPrivateKeyFromCert(slot, cert, NULL); - PK11_FreeSlot(slot); - if(NULL == key) { - failf(data, "NSS: private key from file not found"); - CERT_DestroyCertificate(cert); - return SECFailure; - } - - infof(data, "NSS: client certificate from file\n"); - display_cert_info(data, cert); - - *pRetCert = cert; - *pRetKey = key; - return SECSuccess; - } - - /* use the default NSS hook */ - if(SECSuccess != NSS_GetClientAuthData((void *)nickname, sock, caNames, - pRetCert, pRetKey) - || NULL == *pRetCert) { - - if(NULL == nickname) - failf(data, "NSS: client certificate not found (nickname not " - "specified)"); - else - failf(data, "NSS: client certificate not found: %s", nickname); - - return SECFailure; - } - - /* get certificate nickname if any */ - nickname = (*pRetCert)->nickname; - if(NULL == nickname) - nickname = "[unknown]"; - - if(!strncmp(nickname, pem_slotname, sizeof(pem_slotname) - 1U)) { - failf(data, "NSS: refusing previously loaded certificate from file: %s", - nickname); - return SECFailure; - } - - if(NULL == *pRetKey) { - failf(data, "NSS: private key not found for certificate: %s", nickname); - return SECFailure; - } - - infof(data, "NSS: using client certificate: %s\n", nickname); - display_cert_info(data, *pRetCert); - return SECSuccess; -} - -/* update blocking direction in case of PR_WOULD_BLOCK_ERROR */ -static void nss_update_connecting_state(ssl_connect_state state, void *secret) -{ - struct ssl_connect_data *connssl = (struct ssl_connect_data *)secret; - if(PR_GetError() != PR_WOULD_BLOCK_ERROR) - /* an unrelated error is passing by */ - return; - - switch(connssl->connecting_state) { - case ssl_connect_2: - case ssl_connect_2_reading: - case ssl_connect_2_writing: - break; - default: - /* we are not called from an SSL handshake */ - return; - } - - /* update the state accordingly */ - connssl->connecting_state = state; -} - -/* recv() wrapper we use to detect blocking direction during SSL handshake */ -static PRInt32 nspr_io_recv(PRFileDesc *fd, void *buf, PRInt32 amount, - PRIntn flags, PRIntervalTime timeout) -{ - const PRRecvFN recv_fn = fd->lower->methods->recv; - const PRInt32 rv = recv_fn(fd->lower, buf, amount, flags, timeout); - if(rv < 0) - /* check for PR_WOULD_BLOCK_ERROR and update blocking direction */ - nss_update_connecting_state(ssl_connect_2_reading, fd->secret); - return rv; -} - -/* send() wrapper we use to detect blocking direction during SSL handshake */ -static PRInt32 nspr_io_send(PRFileDesc *fd, const void *buf, PRInt32 amount, - PRIntn flags, PRIntervalTime timeout) -{ - const PRSendFN send_fn = fd->lower->methods->send; - const PRInt32 rv = send_fn(fd->lower, buf, amount, flags, timeout); - if(rv < 0) - /* check for PR_WOULD_BLOCK_ERROR and update blocking direction */ - nss_update_connecting_state(ssl_connect_2_writing, fd->secret); - return rv; -} - -/* close() wrapper to avoid assertion failure due to fd->secret != NULL */ -static PRStatus nspr_io_close(PRFileDesc *fd) -{ - const PRCloseFN close_fn = PR_GetDefaultIOMethods()->close; - fd->secret = NULL; - return close_fn(fd); -} - -/* data might be NULL */ -static CURLcode nss_init_core(struct Curl_easy *data, const char *cert_dir) -{ - NSSInitParameters initparams; - - if(nss_context != NULL) - return CURLE_OK; - - memset((void *) &initparams, '\0', sizeof(initparams)); - initparams.length = sizeof(initparams); - - if(cert_dir) { - char *certpath = aprintf("sql:%s", cert_dir); - if(!certpath) - return CURLE_OUT_OF_MEMORY; - - infof(data, "Initializing NSS with certpath: %s\n", certpath); - nss_context = NSS_InitContext(certpath, "", "", "", &initparams, - NSS_INIT_READONLY | NSS_INIT_PK11RELOAD); - free(certpath); - - if(nss_context != NULL) - return CURLE_OK; - - infof(data, "Unable to initialize NSS database\n"); - } - - infof(data, "Initializing NSS with certpath: none\n"); - nss_context = NSS_InitContext("", "", "", "", &initparams, NSS_INIT_READONLY - | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB | NSS_INIT_FORCEOPEN - | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD); - if(nss_context != NULL) - return CURLE_OK; - - infof(data, "Unable to initialize NSS\n"); - return CURLE_SSL_CACERT_BADFILE; -} - -/* data might be NULL */ -static CURLcode nss_init(struct Curl_easy *data) -{ - char *cert_dir; - struct_stat st; - CURLcode result; - - if(initialized) - return CURLE_OK; - - /* list of all CRL items we need to destroy in Curl_nss_cleanup() */ - nss_crl_list = Curl_llist_alloc(nss_destroy_crl_item); - if(!nss_crl_list) - return CURLE_OUT_OF_MEMORY; - - /* First we check if $SSL_DIR points to a valid dir */ - cert_dir = getenv("SSL_DIR"); - if(cert_dir) { - if((stat(cert_dir, &st) != 0) || - (!S_ISDIR(st.st_mode))) { - cert_dir = NULL; - } - } - - /* Now we check if the default location is a valid dir */ - if(!cert_dir) { - if((stat(SSL_DIR, &st) == 0) && - (S_ISDIR(st.st_mode))) { - cert_dir = (char *)SSL_DIR; - } - } - - if(nspr_io_identity == PR_INVALID_IO_LAYER) { - /* allocate an identity for our own NSPR I/O layer */ - nspr_io_identity = PR_GetUniqueIdentity("libcurl"); - if(nspr_io_identity == PR_INVALID_IO_LAYER) - return CURLE_OUT_OF_MEMORY; - - /* the default methods just call down to the lower I/O layer */ - memcpy(&nspr_io_methods, PR_GetDefaultIOMethods(), sizeof nspr_io_methods); - - /* override certain methods in the table by our wrappers */ - nspr_io_methods.recv = nspr_io_recv; - nspr_io_methods.send = nspr_io_send; - nspr_io_methods.close = nspr_io_close; - } - - result = nss_init_core(data, cert_dir); - if(result) - return result; - - if(!any_cipher_enabled()) - NSS_SetDomesticPolicy(); - - initialized = 1; - - return CURLE_OK; -} - -/** - * Global SSL init - * - * @retval 0 error initializing SSL - * @retval 1 SSL initialized successfully - */ -int Curl_nss_init(void) -{ - /* curl_global_init() is not thread-safe so this test is ok */ - if(nss_initlock == NULL) { - PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256); - nss_initlock = PR_NewLock(); - nss_crllock = PR_NewLock(); - nss_findslot_lock = PR_NewLock(); - } - - /* We will actually initialize NSS later */ - - return 1; -} - -/* data might be NULL */ -CURLcode Curl_nss_force_init(struct Curl_easy *data) -{ - CURLcode result; - if(!nss_initlock) { - if(data) - failf(data, "unable to initialize NSS, curl_global_init() should have " - "been called with CURL_GLOBAL_SSL or CURL_GLOBAL_ALL"); - return CURLE_FAILED_INIT; - } - - PR_Lock(nss_initlock); - result = nss_init(data); - PR_Unlock(nss_initlock); - - return result; -} - -/* Global cleanup */ -void Curl_nss_cleanup(void) -{ - /* This function isn't required to be threadsafe and this is only done - * as a safety feature. - */ - PR_Lock(nss_initlock); - if(initialized) { - /* Free references to client certificates held in the SSL session cache. - * Omitting this hampers destruction of the security module owning - * the certificates. */ - SSL_ClearSessionCache(); - - if(mod && SECSuccess == SECMOD_UnloadUserModule(mod)) { - SECMOD_DestroyModule(mod); - mod = NULL; - } - NSS_ShutdownContext(nss_context); - nss_context = NULL; - } - - /* destroy all CRL items */ - Curl_llist_destroy(nss_crl_list, NULL); - nss_crl_list = NULL; - - PR_Unlock(nss_initlock); - - PR_DestroyLock(nss_initlock); - PR_DestroyLock(nss_crllock); - PR_DestroyLock(nss_findslot_lock); - nss_initlock = NULL; - - initialized = 0; -} - -/* - * This function uses SSL_peek to determine connection status. - * - * Return codes: - * 1 means the connection is still in place - * 0 means the connection has been closed - * -1 means the connection status is unknown - */ -int -Curl_nss_check_cxn(struct connectdata *conn) -{ - int rc; - char buf; - - rc = - PR_Recv(conn->ssl[FIRSTSOCKET].handle, (void *)&buf, 1, PR_MSG_PEEK, - PR_SecondsToInterval(1)); - if(rc > 0) - return 1; /* connection still in place */ - - if(rc == 0) - return 0; /* connection has been closed */ - - return -1; /* connection status unknown */ -} - -static void nss_close(struct ssl_connect_data *connssl) -{ - /* before the cleanup, check whether we are using a client certificate */ - const bool client_cert = (connssl->client_nickname != NULL) - || (connssl->obj_clicert != NULL); - - free(connssl->client_nickname); - connssl->client_nickname = NULL; - - /* destroy all NSS objects in order to avoid failure of NSS shutdown */ - Curl_llist_destroy(connssl->obj_list, NULL); - connssl->obj_list = NULL; - connssl->obj_clicert = NULL; - - if(connssl->handle) { - if(client_cert) - /* A server might require different authentication based on the - * particular path being requested by the client. To support this - * scenario, we must ensure that a connection will never reuse the - * authentication data from a previous connection. */ - SSL_InvalidateSession(connssl->handle); - - PR_Close(connssl->handle); - connssl->handle = NULL; - } -} - -/* - * This function is called when an SSL connection is closed. - */ -void Curl_nss_close(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct ssl_connect_data *connssl_proxy = &conn->proxy_ssl[sockindex]; - - if(connssl->handle || connssl_proxy->handle) { - /* NSS closes the socket we previously handed to it, so we must mark it - as closed to avoid double close */ - fake_sclose(conn->sock[sockindex]); - conn->sock[sockindex] = CURL_SOCKET_BAD; - } - - if(connssl->handle) - /* nss_close(connssl) will transitively close also connssl_proxy->handle - if both are used. Clear it to avoid a double close leading to crash. */ - connssl_proxy->handle = NULL; - - nss_close(connssl); - nss_close(connssl_proxy); -} - -/* return true if NSS can provide error code (and possibly msg) for the - error */ -static bool is_nss_error(CURLcode err) -{ - switch(err) { - case CURLE_PEER_FAILED_VERIFICATION: - case CURLE_SSL_CACERT: - case CURLE_SSL_CERTPROBLEM: - case CURLE_SSL_CONNECT_ERROR: - case CURLE_SSL_ISSUER_ERROR: - return true; - - default: - return false; - } -} - -/* return true if the given error code is related to a client certificate */ -static bool is_cc_error(PRInt32 err) -{ - switch(err) { - case SSL_ERROR_BAD_CERT_ALERT: - case SSL_ERROR_EXPIRED_CERT_ALERT: - case SSL_ERROR_REVOKED_CERT_ALERT: - return true; - - default: - return false; - } -} - -static Curl_recv nss_recv; -static Curl_send nss_send; - -static CURLcode nss_load_ca_certificates(struct connectdata *conn, - int sockindex) -{ - struct Curl_easy *data = conn->data; - const char *cafile = SSL_CONN_CONFIG(CAfile); - const char *capath = SSL_CONN_CONFIG(CApath); - - if(cafile) { - CURLcode result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); - if(result) - return result; - } - - if(capath) { - struct_stat st; - if(stat(capath, &st) == -1) - return CURLE_SSL_CACERT_BADFILE; - - if(S_ISDIR(st.st_mode)) { - PRDirEntry *entry; - PRDir *dir = PR_OpenDir(capath); - if(!dir) - return CURLE_SSL_CACERT_BADFILE; - - while((entry = PR_ReadDir(dir, PR_SKIP_BOTH | PR_SKIP_HIDDEN))) { - char *fullpath = aprintf("%s/%s", capath, entry->name); - if(!fullpath) { - PR_CloseDir(dir); - return CURLE_OUT_OF_MEMORY; - } - - if(CURLE_OK != nss_load_cert(&conn->ssl[sockindex], fullpath, PR_TRUE)) - /* This is purposefully tolerant of errors so non-PEM files can - * be in the same directory */ - infof(data, "failed to load '%s' from CURLOPT_CAPATH\n", fullpath); - - free(fullpath); - } - - PR_CloseDir(dir); - } - else - infof(data, "warning: CURLOPT_CAPATH not a directory (%s)\n", capath); - } - - infof(data, " CAfile: %s\n CApath: %s\n", - cafile ? cafile : "none", - capath ? capath : "none"); - - return CURLE_OK; -} - -static CURLcode nss_init_sslver(SSLVersionRange *sslver, - struct Curl_easy *data, - struct connectdata *conn) -{ - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - /* map CURL_SSLVERSION_DEFAULT to NSS default */ - if(SSL_VersionRangeGetDefault(ssl_variant_stream, sslver) != SECSuccess) - return CURLE_SSL_CONNECT_ERROR; - /* ... but make sure we use at least TLSv1.0 according to libcurl API */ - if(sslver->min < SSL_LIBRARY_VERSION_TLS_1_0) - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; - return CURLE_OK; - - case CURL_SSLVERSION_TLSv1: - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; - /* TODO: set sslver->max to SSL_LIBRARY_VERSION_TLS_1_3 once stable */ -#ifdef SSL_LIBRARY_VERSION_TLS_1_2 - sslver->max = SSL_LIBRARY_VERSION_TLS_1_2; -#elif defined SSL_LIBRARY_VERSION_TLS_1_1 - sslver->max = SSL_LIBRARY_VERSION_TLS_1_1; -#else - sslver->max = SSL_LIBRARY_VERSION_TLS_1_0; -#endif - return CURLE_OK; - - case CURL_SSLVERSION_SSLv2: - sslver->min = SSL_LIBRARY_VERSION_2; - sslver->max = SSL_LIBRARY_VERSION_2; - return CURLE_OK; - - case CURL_SSLVERSION_SSLv3: - sslver->min = SSL_LIBRARY_VERSION_3_0; - sslver->max = SSL_LIBRARY_VERSION_3_0; - return CURLE_OK; - - case CURL_SSLVERSION_TLSv1_0: - sslver->min = SSL_LIBRARY_VERSION_TLS_1_0; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_0; - return CURLE_OK; - - case CURL_SSLVERSION_TLSv1_1: -#ifdef SSL_LIBRARY_VERSION_TLS_1_1 - sslver->min = SSL_LIBRARY_VERSION_TLS_1_1; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_1; - return CURLE_OK; -#endif - break; - - case CURL_SSLVERSION_TLSv1_2: -#ifdef SSL_LIBRARY_VERSION_TLS_1_2 - sslver->min = SSL_LIBRARY_VERSION_TLS_1_2; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_2; - return CURLE_OK; -#endif - break; - - case CURL_SSLVERSION_TLSv1_3: -#ifdef SSL_LIBRARY_VERSION_TLS_1_3 - sslver->min = SSL_LIBRARY_VERSION_TLS_1_3; - sslver->max = SSL_LIBRARY_VERSION_TLS_1_3; - return CURLE_OK; -#endif - break; - - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - failf(data, "TLS minor version cannot be set"); - return CURLE_SSL_CONNECT_ERROR; -} - -static CURLcode nss_fail_connect(struct ssl_connect_data *connssl, - struct Curl_easy *data, - CURLcode curlerr) -{ - PRErrorCode err = 0; - - if(is_nss_error(curlerr)) { - /* read NSPR error code */ - err = PR_GetError(); - if(is_cc_error(err)) - curlerr = CURLE_SSL_CERTPROBLEM; - - /* print the error number and error string */ - infof(data, "NSS error %d (%s)\n", err, nss_error_to_name(err)); - - /* print a human-readable message describing the error if available */ - nss_print_error_message(data, err); - } - - /* cleanup on connection failure */ - Curl_llist_destroy(connssl->obj_list, NULL); - connssl->obj_list = NULL; - - return curlerr; -} - -/* Switch the SSL socket into blocking or non-blocking mode. */ -static CURLcode nss_set_blocking(struct ssl_connect_data *connssl, - struct Curl_easy *data, - bool blocking) -{ - static PRSocketOptionData sock_opt; - sock_opt.option = PR_SockOpt_Nonblocking; - sock_opt.value.non_blocking = !blocking; - - if(PR_SetSocketOption(connssl->handle, &sock_opt) != PR_SUCCESS) - return nss_fail_connect(connssl, data, CURLE_SSL_CONNECT_ERROR); - - return CURLE_OK; -} - -static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) -{ - PRFileDesc *model = NULL; - PRFileDesc *nspr_io = NULL; - PRFileDesc *nspr_io_stub = NULL; - PRBool ssl_no_cache; - PRBool ssl_cbc_random_iv; - struct Curl_easy *data = conn->data; - curl_socket_t sockfd = conn->sock[sockindex]; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - CURLcode result; - bool second_layer = FALSE; - - SSLVersionRange sslver = { - SSL_LIBRARY_VERSION_TLS_1_0, /* min */ - SSL_LIBRARY_VERSION_TLS_1_0 /* max */ - }; - - connssl->data = data; - - /* list of all NSS objects we need to destroy in Curl_nss_close() */ - connssl->obj_list = Curl_llist_alloc(nss_destroy_object); - if(!connssl->obj_list) - return CURLE_OUT_OF_MEMORY; - - /* FIXME. NSS doesn't support multiple databases open at the same time. */ - PR_Lock(nss_initlock); - result = nss_init(conn->data); - if(result) { - PR_Unlock(nss_initlock); - goto error; - } - - result = CURLE_SSL_CONNECT_ERROR; - - if(!mod) { - char *configstring = aprintf("library=%s name=PEM", pem_library); - if(!configstring) { - PR_Unlock(nss_initlock); - goto error; - } - mod = SECMOD_LoadUserModule(configstring, NULL, PR_FALSE); - free(configstring); - - if(!mod || !mod->loaded) { - if(mod) { - SECMOD_DestroyModule(mod); - mod = NULL; - } - infof(data, "WARNING: failed to load NSS PEM library %s. Using " - "OpenSSL PEM certificates will not work.\n", pem_library); - } - } - - PK11_SetPasswordFunc(nss_get_password); - PR_Unlock(nss_initlock); - - model = PR_NewTCPSocket(); - if(!model) - goto error; - model = SSL_ImportFD(NULL, model); - - if(SSL_OptionSet(model, SSL_SECURITY, PR_TRUE) != SECSuccess) - goto error; - if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_SERVER, PR_FALSE) != SECSuccess) - goto error; - if(SSL_OptionSet(model, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE) != SECSuccess) - goto error; - - /* do not use SSL cache if disabled or we are not going to verify peer */ - ssl_no_cache = (data->set.general_ssl.sessionid - && SSL_CONN_CONFIG(verifypeer)) ? PR_FALSE : PR_TRUE; - if(SSL_OptionSet(model, SSL_NO_CACHE, ssl_no_cache) != SECSuccess) - goto error; - - /* enable/disable the requested SSL version(s) */ - if(nss_init_sslver(&sslver, data, conn) != CURLE_OK) - goto error; - if(SSL_VersionRangeSet(model, &sslver) != SECSuccess) - goto error; - - ssl_cbc_random_iv = !SSL_SET_OPTION(enable_beast); -#ifdef SSL_CBC_RANDOM_IV - /* unless the user explicitly asks to allow the protocol vulnerability, we - use the work-around */ - if(SSL_OptionSet(model, SSL_CBC_RANDOM_IV, ssl_cbc_random_iv) != SECSuccess) - infof(data, "warning: failed to set SSL_CBC_RANDOM_IV = %d\n", - ssl_cbc_random_iv); -#else - if(ssl_cbc_random_iv) - infof(data, "warning: support for SSL_CBC_RANDOM_IV not compiled in\n"); -#endif - - if(SSL_CONN_CONFIG(cipher_list)) { - if(set_ciphers(data, model, SSL_CONN_CONFIG(cipher_list)) != SECSuccess) { - result = CURLE_SSL_CIPHER; - goto error; - } - } - - if(!SSL_CONN_CONFIG(verifypeer) && SSL_CONN_CONFIG(verifyhost)) - infof(data, "warning: ignoring value of ssl.verifyhost\n"); - - /* bypass the default SSL_AuthCertificate() hook in case we do not want to - * verify peer */ - if(SSL_AuthCertificateHook(model, nss_auth_cert_hook, conn) != SECSuccess) - goto error; - - /* not checked yet */ - if(SSL_IS_PROXY()) - data->set.proxy_ssl.certverifyresult = 0; - else - data->set.ssl.certverifyresult = 0; - - if(SSL_BadCertHook(model, BadCertHandler, conn) != SECSuccess) - goto error; - - if(SSL_HandshakeCallback(model, HandshakeCallback, conn) != SECSuccess) - goto error; - - if(SSL_CONN_CONFIG(verifypeer)) { - const CURLcode rv = nss_load_ca_certificates(conn, sockindex); - if(rv) { - result = rv; - goto error; - } - } - - if(SSL_SET_OPTION(CRLfile)) { - const CURLcode rv = nss_load_crl(SSL_SET_OPTION(CRLfile)); - if(rv) { - result = rv; - goto error; - } - infof(data, " CRLfile: %s\n", SSL_SET_OPTION(CRLfile)); - } - - if(SSL_SET_OPTION(cert)) { - char *nickname = dup_nickname(data, SSL_SET_OPTION(cert)); - if(nickname) { - /* we are not going to use libnsspem.so to read the client cert */ - connssl->obj_clicert = NULL; - } - else { - CURLcode rv = cert_stuff(conn, sockindex, SSL_SET_OPTION(cert), - SSL_SET_OPTION(key)); - if(rv) { - /* failf() is already done in cert_stuff() */ - result = rv; - goto error; - } - } - - /* store the nickname for SelectClientCert() called during handshake */ - connssl->client_nickname = nickname; - } - else - connssl->client_nickname = NULL; - - if(SSL_GetClientAuthDataHook(model, SelectClientCert, - (void *)connssl) != SECSuccess) { - result = CURLE_SSL_CERTPROBLEM; - goto error; - } - - if(conn->proxy_ssl[sockindex].use) { - DEBUGASSERT(ssl_connection_complete == conn->proxy_ssl[sockindex].state); - DEBUGASSERT(conn->proxy_ssl[sockindex].handle != NULL); - nspr_io = conn->proxy_ssl[sockindex].handle; - second_layer = TRUE; - } - else { - /* wrap OS file descriptor by NSPR's file descriptor abstraction */ - nspr_io = PR_ImportTCPSocket(sockfd); - if(!nspr_io) - goto error; - } - - /* create our own NSPR I/O layer */ - nspr_io_stub = PR_CreateIOLayerStub(nspr_io_identity, &nspr_io_methods); - if(!nspr_io_stub) { - if(!second_layer) - PR_Close(nspr_io); - goto error; - } - - /* make the per-connection data accessible from NSPR I/O callbacks */ - nspr_io_stub->secret = (void *)connssl; - - /* push our new layer to the NSPR I/O stack */ - if(PR_PushIOLayer(nspr_io, PR_TOP_IO_LAYER, nspr_io_stub) != PR_SUCCESS) { - if(!second_layer) - PR_Close(nspr_io); - PR_Close(nspr_io_stub); - goto error; - } - - /* import our model socket onto the current I/O stack */ - connssl->handle = SSL_ImportFD(model, nspr_io); - if(!connssl->handle) { - if(!second_layer) - PR_Close(nspr_io); - goto error; - } - - PR_Close(model); /* We don't need this any more */ - model = NULL; - - /* This is the password associated with the cert that we're using */ - if(SSL_SET_OPTION(key_passwd)) { - SSL_SetPKCS11PinArg(connssl->handle, SSL_SET_OPTION(key_passwd)); - } - -#ifdef SSL_ENABLE_OCSP_STAPLING - if(SSL_CONN_CONFIG(verifystatus)) { - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_OCSP_STAPLING, PR_TRUE) - != SECSuccess) - goto error; - } -#endif - -#ifdef SSL_ENABLE_NPN - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_NPN, conn->bits.tls_enable_npn - ? PR_TRUE : PR_FALSE) != SECSuccess) - goto error; -#endif - -#ifdef SSL_ENABLE_ALPN - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_ALPN, conn->bits.tls_enable_alpn - ? PR_TRUE : PR_FALSE) != SECSuccess) - goto error; -#endif - -#if NSSVERNUM >= 0x030f04 /* 3.15.4 */ - if(data->set.ssl.falsestart) { - if(SSL_OptionSet(connssl->handle, SSL_ENABLE_FALSE_START, PR_TRUE) - != SECSuccess) - goto error; - - if(SSL_SetCanFalseStartCallback(connssl->handle, CanFalseStartCallback, - conn) != SECSuccess) - goto error; - } -#endif - -#if defined(SSL_ENABLE_NPN) || defined(SSL_ENABLE_ALPN) - if(conn->bits.tls_enable_npn || conn->bits.tls_enable_alpn) { - int cur = 0; - unsigned char protocols[128]; - -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { - protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN; - memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID, - NGHTTP2_PROTO_VERSION_ID_LEN); - cur += NGHTTP2_PROTO_VERSION_ID_LEN; - } -#endif - protocols[cur++] = ALPN_HTTP_1_1_LENGTH; - memcpy(&protocols[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH); - cur += ALPN_HTTP_1_1_LENGTH; - - if(SSL_SetNextProtoNego(connssl->handle, protocols, cur) != SECSuccess) - goto error; - } -#endif - - - /* Force handshake on next I/O */ - if(SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE) - != SECSuccess) - goto error; - - /* propagate hostname to the TLS layer */ - if(SSL_SetURL(connssl->handle, SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name) != SECSuccess) - goto error; - - /* prevent NSS from re-using the session for a different hostname */ - if(SSL_SetSockPeerID(connssl->handle, SSL_IS_PROXY() ? - conn->http_proxy.host.name : conn->host.name) - != SECSuccess) - goto error; - - return CURLE_OK; - -error: - if(model) - PR_Close(model); - - return nss_fail_connect(connssl, data, result); -} - -static CURLcode nss_do_connect(struct connectdata *conn, int sockindex) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - CURLcode result = CURLE_SSL_CONNECT_ERROR; - PRUint32 timeout; - long * const certverifyresult = SSL_IS_PROXY() ? - &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult; - const char * const pinnedpubkey = SSL_IS_PROXY() ? - data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - - - /* check timeout situation */ - const long time_left = Curl_timeleft(data, NULL, TRUE); - if(time_left < 0L) { - failf(data, "timed out before SSL handshake"); - result = CURLE_OPERATION_TIMEDOUT; - goto error; - } - - /* Force the handshake now */ - timeout = PR_MillisecondsToInterval((PRUint32) time_left); - if(SSL_ForceHandshakeWithTimeout(connssl->handle, timeout) != SECSuccess) { - if(PR_GetError() == PR_WOULD_BLOCK_ERROR) - /* blocking direction is updated by nss_update_connecting_state() */ - return CURLE_AGAIN; - else if(*certverifyresult == SSL_ERROR_BAD_CERT_DOMAIN) - result = CURLE_PEER_FAILED_VERIFICATION; - else if(*certverifyresult != 0) - result = CURLE_SSL_CACERT; - goto error; - } - - result = display_conn_info(conn, connssl->handle); - if(result) - goto error; - - if(SSL_SET_OPTION(issuercert)) { - SECStatus ret = SECFailure; - char *nickname = dup_nickname(data, SSL_SET_OPTION(issuercert)); - if(nickname) { - /* we support only nicknames in case of issuercert for now */ - ret = check_issuer_cert(connssl->handle, nickname); - free(nickname); - } - - if(SECFailure == ret) { - infof(data, "SSL certificate issuer check failed\n"); - result = CURLE_SSL_ISSUER_ERROR; - goto error; - } - else { - infof(data, "SSL certificate issuer check ok\n"); - } - } - - result = cmp_peer_pubkey(connssl, pinnedpubkey); - if(result) - /* status already printed */ - goto error; - - return CURLE_OK; - -error: - return nss_fail_connect(connssl, data, result); -} - -static CURLcode nss_connect_common(struct connectdata *conn, int sockindex, - bool *done) -{ - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - const bool blocking = (done == NULL); - CURLcode result; - - if(connssl->state == ssl_connection_complete) { - if(!blocking) - *done = TRUE; - return CURLE_OK; - } - - if(connssl->connecting_state == ssl_connect_1) { - result = nss_setup_connect(conn, sockindex); - if(result) - /* we do not expect CURLE_AGAIN from nss_setup_connect() */ - return result; - - connssl->connecting_state = ssl_connect_2; - } - - /* enable/disable blocking mode before handshake */ - result = nss_set_blocking(connssl, data, blocking); - if(result) - return result; - - result = nss_do_connect(conn, sockindex); - switch(result) { - case CURLE_OK: - break; - case CURLE_AGAIN: - if(!blocking) - /* CURLE_AGAIN in non-blocking mode is not an error */ - return CURLE_OK; - /* fall through */ - default: - return result; - } - - if(blocking) { - /* in blocking mode, set NSS non-blocking mode _after_ SSL handshake */ - result = nss_set_blocking(connssl, data, /* blocking */ FALSE); - if(result) - return result; - } - else - /* signal completed SSL handshake */ - *done = TRUE; - - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = nss_recv; - conn->send[sockindex] = nss_send; - - /* ssl_connect_done is never used outside, go back to the initial state */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - -CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) -{ - return nss_connect_common(conn, sockindex, /* blocking */ NULL); -} - -CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn, - int sockindex, bool *done) -{ - return nss_connect_common(conn, sockindex, done); -} - -static ssize_t nss_send(struct connectdata *conn, /* connection data */ - int sockindex, /* socketindex */ - const void *mem, /* send this data */ - size_t len, /* amount to write */ - CURLcode *curlcode) -{ - ssize_t rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0, - PR_INTERVAL_NO_WAIT); - if(rc < 0) { - PRInt32 err = PR_GetError(); - if(err == PR_WOULD_BLOCK_ERROR) - *curlcode = CURLE_AGAIN; - else { - /* print the error number and error string */ - const char *err_name = nss_error_to_name(err); - infof(conn->data, "SSL write: error %d (%s)\n", err, err_name); - - /* print a human-readable message describing the error if available */ - nss_print_error_message(conn->data, err); - - *curlcode = (is_cc_error(err)) - ? CURLE_SSL_CERTPROBLEM - : CURLE_SEND_ERROR; - } - - return -1; - } - - return rc; /* number of bytes */ -} - -static ssize_t nss_recv(struct connectdata * conn, /* connection data */ - int num, /* socketindex */ - char *buf, /* store read data here */ - size_t buffersize, /* max amount to read */ - CURLcode *curlcode) -{ - ssize_t nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0, - PR_INTERVAL_NO_WAIT); - if(nread < 0) { - /* failed SSL read */ - PRInt32 err = PR_GetError(); - - if(err == PR_WOULD_BLOCK_ERROR) - *curlcode = CURLE_AGAIN; - else { - /* print the error number and error string */ - const char *err_name = nss_error_to_name(err); - infof(conn->data, "SSL read: errno %d (%s)\n", err, err_name); - - /* print a human-readable message describing the error if available */ - nss_print_error_message(conn->data, err); - - *curlcode = (is_cc_error(err)) - ? CURLE_SSL_CERTPROBLEM - : CURLE_RECV_ERROR; - } - - return -1; - } - - return nread; -} - -size_t Curl_nss_version(char *buffer, size_t size) -{ - return snprintf(buffer, size, "NSS/%s", NSS_VERSION); -} - -/* data might be NULL */ -int Curl_nss_seed(struct Curl_easy *data) -{ - /* make sure that NSS is initialized */ - return !!Curl_nss_force_init(data); -} - -/* data might be NULL */ -CURLcode Curl_nss_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) -{ - Curl_nss_seed(data); /* Initiate the seed if not already done */ - - if(SECSuccess != PK11_GenerateRandom(entropy, curlx_uztosi(length))) - /* signal a failure */ - return CURLE_FAILED_INIT; - - return CURLE_OK; -} - -void Curl_nss_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) -{ - PK11Context *MD5pw = PK11_CreateDigestContext(SEC_OID_MD5); - unsigned int MD5out; - - PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen)); - PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len)); - PK11_DestroyContext(MD5pw, PR_TRUE); -} - -void Curl_nss_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len) -{ - PK11Context *SHA256pw = PK11_CreateDigestContext(SEC_OID_SHA256); - unsigned int SHA256out; - - PK11_DigestOp(SHA256pw, tmp, curlx_uztoui(tmplen)); - PK11_DigestFinal(SHA256pw, sha256sum, &SHA256out, curlx_uztoui(sha256len)); - PK11_DestroyContext(SHA256pw, PR_TRUE); -} - -bool Curl_nss_cert_status_request(void) -{ -#ifdef SSL_ENABLE_OCSP_STAPLING - return TRUE; -#else - return FALSE; -#endif -} - -bool Curl_nss_false_start(void) -{ -#if NSSVERNUM >= 0x030f04 /* 3.15.4 */ - return TRUE; -#else - return FALSE; -#endif -} - -#endif /* USE_NSS */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/nssg.h b/build/premake/premake5/contrib/curl/lib/vtls/nssg.h deleted file mode 100644 index 8c46929ff2..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/nssg.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef HEADER_CURL_NSSG_H -#define HEADER_CURL_NSSG_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef USE_NSS -/* - * This header should only be needed to get included by vtls.c and nss.c - */ - -#include "urldata.h" - -CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -/* close a SSL connection */ -void Curl_nss_close(struct connectdata *conn, int sockindex); - -int Curl_nss_init(void); -void Curl_nss_cleanup(void); - -size_t Curl_nss_version(char *buffer, size_t size); -int Curl_nss_check_cxn(struct connectdata *cxn); -int Curl_nss_seed(struct Curl_easy *data); - -/* initialize NSS library if not already */ -CURLcode Curl_nss_force_init(struct Curl_easy *data); - -CURLcode Curl_nss_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length); - -void Curl_nss_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); - -void Curl_nss_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum, /* output */ - size_t sha256len); - -bool Curl_nss_cert_status_request(void); - -bool Curl_nss_false_start(void); - -/* Support HTTPS-proxy */ -#define HTTPS_PROXY_SUPPORT 1 - -/* Set the API backend definition to NSS */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_NSS - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backends supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for NSS */ -#define curlssl_init Curl_nss_init -#define curlssl_cleanup Curl_nss_cleanup -#define curlssl_connect Curl_nss_connect -#define curlssl_connect_nonblocking Curl_nss_connect_nonblocking - -/* NSS has its own session ID cache */ -#define curlssl_session_free(x) Curl_nop_stmt -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_nss_close -/* NSS has no shutdown function provided and thus always fail */ -#define curlssl_shutdown(x,y) ((void)x, (void)y, 1) -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_nss_version -#define curlssl_check_cxn(x) Curl_nss_check_cxn(x) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) -#define curlssl_random(x,y,z) Curl_nss_random(x,y,z) -#define curlssl_md5sum(a,b,c,d) Curl_nss_md5sum(a,b,c,d) -#define curlssl_sha256sum(a,b,c,d) Curl_nss_sha256sum(a,b,c,d) -#define curlssl_cert_status_request() Curl_nss_cert_status_request() -#define curlssl_false_start() Curl_nss_false_start() - -#endif /* USE_NSS */ -#endif /* HEADER_CURL_NSSG_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/openssl.c b/build/premake/premake5/contrib/curl/lib/vtls/openssl.c deleted file mode 100644 index eb625fe93d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/openssl.c +++ /dev/null @@ -1,3325 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all OpenSSL-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - */ - -/* - * The original SSLeay-using code for curl was written by Linas Vepstas and - * Sampo Kellomaki 1998. - */ - -#include "curl_setup.h" - -#ifdef USE_OPENSSL - -#ifdef HAVE_LIMITS_H -#include -#endif - -#include "urldata.h" -#include "sendf.h" -#include "formdata.h" /* for the boundary function */ -#include "url.h" /* for the ssl config check function */ -#include "inet_pton.h" -#include "openssl.h" -#include "connect.h" -#include "slist.h" -#include "select.h" -#include "vtls.h" -#include "strcase.h" -#include "hostcheck.h" -#include "curl_printf.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_OPENSSL_PKCS12_H -#include -#endif - -#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_OCSP) -#include -#endif - -#include "warnless.h" -#include "non-ascii.h" /* for Curl_convert_from_utf8 prototype */ - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -#ifndef OPENSSL_VERSION_NUMBER -#error "OPENSSL_VERSION_NUMBER not defined" -#endif - -#if defined(HAVE_OPENSSL_ENGINE_H) -#include -#endif - -#if OPENSSL_VERSION_NUMBER >= 0x00909000L -#define SSL_METHOD_QUAL const -#else -#define SSL_METHOD_QUAL -#endif - -#if (OPENSSL_VERSION_NUMBER >= 0x10000000L) -#define HAVE_ERR_REMOVE_THREAD_STATE 1 -#endif - -#if !defined(HAVE_SSLV2_CLIENT_METHOD) || \ - OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no SSLv2 */ -#undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */ -#define OPENSSL_NO_SSL2 -#endif - -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && /* OpenSSL 1.1.0+ */ \ - !defined(LIBRESSL_VERSION_NUMBER) -#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER -#define HAVE_X509_GET0_EXTENSIONS 1 /* added in 1.1.0 -pre1 */ -#define HAVE_OPAQUE_EVP_PKEY 1 /* since 1.1.0 -pre3 */ -#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */ -#define CONST_EXTS const -#define CONST_ASN1_BIT_STRING const -#define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1 -#else -/* For OpenSSL before 1.1.0 */ -#define ASN1_STRING_get0_data(x) ASN1_STRING_data(x) -#define X509_get0_notBefore(x) X509_get_notBefore(x) -#define X509_get0_notAfter(x) X509_get_notAfter(x) -#define CONST_EXTS /* nope */ -#define CONST_ASN1_BIT_STRING /* nope */ -#ifdef LIBRESSL_VERSION_NUMBER -static unsigned long OpenSSL_version_num(void) -{ - return LIBRESSL_VERSION_NUMBER; -} -#else -#define OpenSSL_version_num() SSLeay() -#endif -#endif - -#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \ - !defined(LIBRESSL_VERSION_NUMBER) -#define HAVE_X509_GET0_SIGNATURE 1 -#endif - -#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \ - OPENSSL_VERSION_NUMBER <= 0x10002FFFL && \ - !defined(OPENSSL_NO_COMP) -#define HAVE_SSL_COMP_FREE_COMPRESSION_METHODS 1 -#endif - -#if (OPENSSL_VERSION_NUMBER < 0x0090808fL) -/* not present in older OpenSSL */ -#define OPENSSL_load_builtin_modules(x) -#endif - -#if defined(LIBRESSL_VERSION_NUMBER) -#define OSSL_PACKAGE "LibreSSL" -#elif defined(OPENSSL_IS_BORINGSSL) -#define OSSL_PACKAGE "BoringSSL" -#else -#define OSSL_PACKAGE "OpenSSL" -#endif - -/* - * Number of bytes to read from the random number seed file. This must be - * a finite value (because some entropy "files" like /dev/urandom have - * an infinite length), but must be large enough to provide enough - * entopy to properly seed OpenSSL's PRNG. - */ -#define RAND_LOAD_LENGTH 1024 - -static int passwd_callback(char *buf, int num, int encrypting, - void *global_passwd) -{ - DEBUGASSERT(0 == encrypting); - - if(!encrypting) { - int klen = curlx_uztosi(strlen((char *)global_passwd)); - if(num > klen) { - memcpy(buf, global_passwd, klen+1); - return klen; - } - } - return 0; -} - -/* - * rand_enough() returns TRUE if we have seeded the random engine properly. - */ -static bool rand_enough(void) -{ - return (0 != RAND_status()) ? TRUE : FALSE; -} - -static CURLcode Curl_ossl_seed(struct Curl_easy *data) -{ - /* we have the "SSL is seeded" boolean static to prevent multiple - time-consuming seedings in vain */ - static bool ssl_seeded = FALSE; - char *buf = data->state.buffer; /* point to the big buffer */ - int nread=0; - - if(ssl_seeded) - return CURLE_OK; - - if(rand_enough()) { - /* OpenSSL 1.1.0+ will return here */ - ssl_seeded = TRUE; - return CURLE_OK; - } - -#ifndef RANDOM_FILE - /* if RANDOM_FILE isn't defined, we only perform this if an option tells - us to! */ - if(data->set.str[STRING_SSL_RANDOM_FILE]) -#define RANDOM_FILE "" /* doesn't matter won't be used */ -#endif - { - /* let the option override the define */ - nread += RAND_load_file((data->set.str[STRING_SSL_RANDOM_FILE]? - data->set.str[STRING_SSL_RANDOM_FILE]: - RANDOM_FILE), - RAND_LOAD_LENGTH); - if(rand_enough()) - return nread; - } - -#if defined(HAVE_RAND_EGD) - /* only available in OpenSSL 0.9.5 and later */ - /* EGD_SOCKET is set at configure time or not at all */ -#ifndef EGD_SOCKET - /* If we don't have the define set, we only do this if the egd-option - is set */ - if(data->set.str[STRING_SSL_EGDSOCKET]) -#define EGD_SOCKET "" /* doesn't matter won't be used */ -#endif - { - /* If there's an option and a define, the option overrides the - define */ - int ret = RAND_egd(data->set.str[STRING_SSL_EGDSOCKET]? - data->set.str[STRING_SSL_EGDSOCKET]:EGD_SOCKET); - if(-1 != ret) { - nread += ret; - if(rand_enough()) - return nread; - } - } -#endif - - /* If we get here, it means we need to seed the PRNG using a "silly" - approach! */ - do { - unsigned char randb[64]; - int len = sizeof(randb); - if(!RAND_bytes(randb, len)) - break; - RAND_add(randb, len, (len >> 1)); - } while(!rand_enough()); - - /* generates a default path for the random seed file */ - buf[0]=0; /* blank it first */ - RAND_file_name(buf, BUFSIZE); - if(buf[0]) { - /* we got a file name to try */ - nread += RAND_load_file(buf, RAND_LOAD_LENGTH); - if(rand_enough()) - return nread; - } - - infof(data, "libcurl is now using a weak random seed!\n"); - return CURLE_SSL_CONNECT_ERROR; /* confusing error code */ -} - -#ifndef SSL_FILETYPE_ENGINE -#define SSL_FILETYPE_ENGINE 42 -#endif -#ifndef SSL_FILETYPE_PKCS12 -#define SSL_FILETYPE_PKCS12 43 -#endif -static int do_file_type(const char *type) -{ - if(!type || !type[0]) - return SSL_FILETYPE_PEM; - if(strcasecompare(type, "PEM")) - return SSL_FILETYPE_PEM; - if(strcasecompare(type, "DER")) - return SSL_FILETYPE_ASN1; - if(strcasecompare(type, "ENG")) - return SSL_FILETYPE_ENGINE; - if(strcasecompare(type, "P12")) - return SSL_FILETYPE_PKCS12; - return -1; -} - -#if defined(HAVE_OPENSSL_ENGINE_H) -/* - * Supply default password to the engine user interface conversation. - * The password is passed by OpenSSL engine from ENGINE_load_private_key() - * last argument to the ui and can be obtained by UI_get0_user_data(ui) here. - */ -static int ssl_ui_reader(UI *ui, UI_STRING *uis) -{ - const char *password; - switch(UI_get_string_type(uis)) { - case UIT_PROMPT: - case UIT_VERIFY: - password = (const char *)UI_get0_user_data(ui); - if(password && (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD)) { - UI_set_result(ui, uis, password); - return 1; - } - default: - break; - } - return (UI_method_get_reader(UI_OpenSSL()))(ui, uis); -} - -/* - * Suppress interactive request for a default password if available. - */ -static int ssl_ui_writer(UI *ui, UI_STRING *uis) -{ - switch(UI_get_string_type(uis)) { - case UIT_PROMPT: - case UIT_VERIFY: - if(UI_get0_user_data(ui) && - (UI_get_input_flags(uis) & UI_INPUT_FLAG_DEFAULT_PWD)) { - return 1; - } - default: - break; - } - return (UI_method_get_writer(UI_OpenSSL()))(ui, uis); -} -#endif - -static -int cert_stuff(struct connectdata *conn, - SSL_CTX* ctx, - char *cert_file, - const char *cert_type, - char *key_file, - const char *key_type, - char *key_passwd) -{ - struct Curl_easy *data = conn->data; - - int file_type = do_file_type(cert_type); - - if(cert_file || (file_type == SSL_FILETYPE_ENGINE)) { - SSL *ssl; - X509 *x509; - int cert_done = 0; - - if(key_passwd) { - /* set the password in the callback userdata */ - SSL_CTX_set_default_passwd_cb_userdata(ctx, key_passwd); - /* Set passwd callback: */ - SSL_CTX_set_default_passwd_cb(ctx, passwd_callback); - } - - - switch(file_type) { - case SSL_FILETYPE_PEM: - /* SSL_CTX_use_certificate_chain_file() only works on PEM files */ - if(SSL_CTX_use_certificate_chain_file(ctx, - cert_file) != 1) { - failf(data, - "could not load PEM client certificate, " OSSL_PACKAGE - " error %s, " - "(no key found, wrong pass phrase, or wrong file format?)", - ERR_error_string(ERR_get_error(), NULL) ); - return 0; - } - break; - - case SSL_FILETYPE_ASN1: - /* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but - we use the case above for PEM so this can only be performed with - ASN1 files. */ - if(SSL_CTX_use_certificate_file(ctx, - cert_file, - file_type) != 1) { - failf(data, - "could not load ASN1 client certificate, " OSSL_PACKAGE - " error %s, " - "(no key found, wrong pass phrase, or wrong file format?)", - ERR_error_string(ERR_get_error(), NULL) ); - return 0; - } - break; - case SSL_FILETYPE_ENGINE: -#if defined(HAVE_OPENSSL_ENGINE_H) && defined(ENGINE_CTRL_GET_CMD_FROM_NAME) - { - if(data->state.engine) { - const char *cmd_name = "LOAD_CERT_CTRL"; - struct { - const char *cert_id; - X509 *cert; - } params; - - params.cert_id = cert_file; - params.cert = NULL; - - /* Does the engine supports LOAD_CERT_CTRL ? */ - if(!ENGINE_ctrl(data->state.engine, ENGINE_CTRL_GET_CMD_FROM_NAME, - 0, (void *)cmd_name, NULL)) { - failf(data, "ssl engine does not support loading certificates"); - return 0; - } - - /* Load the certificate from the engine */ - if(!ENGINE_ctrl_cmd(data->state.engine, cmd_name, - 0, ¶ms, NULL, 1)) { - failf(data, "ssl engine cannot load client cert with id" - " '%s' [%s]", cert_file, - ERR_error_string(ERR_get_error(), NULL)); - return 0; - } - - if(!params.cert) { - failf(data, "ssl engine didn't initialized the certificate " - "properly."); - return 0; - } - - if(SSL_CTX_use_certificate(ctx, params.cert) != 1) { - failf(data, "unable to set client certificate"); - X509_free(params.cert); - return 0; - } - X509_free(params.cert); /* we don't need the handle any more... */ - } - else { - failf(data, "crypto engine not set, can't load certificate"); - return 0; - } - } - break; -#else - failf(data, "file type ENG for certificate not implemented"); - return 0; -#endif - - case SSL_FILETYPE_PKCS12: - { -#ifdef HAVE_OPENSSL_PKCS12_H - FILE *f; - PKCS12 *p12; - EVP_PKEY *pri; - STACK_OF(X509) *ca = NULL; - - f = fopen(cert_file, "rb"); - if(!f) { - failf(data, "could not open PKCS12 file '%s'", cert_file); - return 0; - } - p12 = d2i_PKCS12_fp(f, NULL); - fclose(f); - - if(!p12) { - failf(data, "error reading PKCS12 file '%s'", cert_file); - return 0; - } - - PKCS12_PBE_add(); - - if(!PKCS12_parse(p12, key_passwd, &pri, &x509, - &ca)) { - failf(data, - "could not parse PKCS12 file, check password, " OSSL_PACKAGE - " error %s", - ERR_error_string(ERR_get_error(), NULL) ); - PKCS12_free(p12); - return 0; - } - - PKCS12_free(p12); - - if(SSL_CTX_use_certificate(ctx, x509) != 1) { - failf(data, - "could not load PKCS12 client certificate, " OSSL_PACKAGE - " error %s", - ERR_error_string(ERR_get_error(), NULL) ); - goto fail; - } - - if(SSL_CTX_use_PrivateKey(ctx, pri) != 1) { - failf(data, "unable to use private key from PKCS12 file '%s'", - cert_file); - goto fail; - } - - if(!SSL_CTX_check_private_key (ctx)) { - failf(data, "private key from PKCS12 file '%s' " - "does not match certificate in same file", cert_file); - goto fail; - } - /* Set Certificate Verification chain */ - if(ca) { - while(sk_X509_num(ca)) { - /* - * Note that sk_X509_pop() is used below to make sure the cert is - * removed from the stack properly before getting passed to - * SSL_CTX_add_extra_chain_cert(), which takes ownership. Previously - * we used sk_X509_value() instead, but then we'd clean it in the - * subsequent sk_X509_pop_free() call. - */ - X509 *x = sk_X509_pop(ca); - if(!SSL_CTX_add_client_CA(ctx, x)) { - X509_free(x); - failf(data, "cannot add certificate to client CA list"); - goto fail; - } - if(!SSL_CTX_add_extra_chain_cert(ctx, x)) { - X509_free(x); - failf(data, "cannot add certificate to certificate chain"); - goto fail; - } - } - } - - cert_done = 1; - fail: - EVP_PKEY_free(pri); - X509_free(x509); - sk_X509_pop_free(ca, X509_free); - - if(!cert_done) - return 0; /* failure! */ - break; -#else - failf(data, "file type P12 for certificate not supported"); - return 0; -#endif - } - default: - failf(data, "not supported file type '%s' for certificate", cert_type); - return 0; - } - - file_type = do_file_type(key_type); - - switch(file_type) { - case SSL_FILETYPE_PEM: - if(cert_done) - break; - if(!key_file) - /* cert & key can only be in PEM case in the same file */ - key_file=cert_file; - case SSL_FILETYPE_ASN1: - if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) { - failf(data, "unable to set private key file: '%s' type %s", - key_file, key_type?key_type:"PEM"); - return 0; - } - break; - case SSL_FILETYPE_ENGINE: -#ifdef HAVE_OPENSSL_ENGINE_H - { /* XXXX still needs some work */ - EVP_PKEY *priv_key = NULL; - if(data->state.engine) { - UI_METHOD *ui_method = - UI_create_method((char *)"curl user interface"); - if(!ui_method) { - failf(data, "unable do create " OSSL_PACKAGE - " user-interface method"); - return 0; - } - UI_method_set_opener(ui_method, UI_method_get_opener(UI_OpenSSL())); - UI_method_set_closer(ui_method, UI_method_get_closer(UI_OpenSSL())); - UI_method_set_reader(ui_method, ssl_ui_reader); - UI_method_set_writer(ui_method, ssl_ui_writer); - /* the typecast below was added to please mingw32 */ - priv_key = (EVP_PKEY *) - ENGINE_load_private_key(data->state.engine, key_file, - ui_method, - key_passwd); - UI_destroy_method(ui_method); - if(!priv_key) { - failf(data, "failed to load private key from crypto engine"); - return 0; - } - if(SSL_CTX_use_PrivateKey(ctx, priv_key) != 1) { - failf(data, "unable to set private key"); - EVP_PKEY_free(priv_key); - return 0; - } - EVP_PKEY_free(priv_key); /* we don't need the handle any more... */ - } - else { - failf(data, "crypto engine not set, can't load private key"); - return 0; - } - } - break; -#else - failf(data, "file type ENG for private key not supported"); - return 0; -#endif - case SSL_FILETYPE_PKCS12: - if(!cert_done) { - failf(data, "file type P12 for private key not supported"); - return 0; - } - break; - default: - failf(data, "not supported file type for private key"); - return 0; - } - - ssl=SSL_new(ctx); - if(!ssl) { - failf(data, "unable to create an SSL structure"); - return 0; - } - - x509=SSL_get_certificate(ssl); - - /* This version was provided by Evan Jordan and is supposed to not - leak memory as the previous version: */ - if(x509) { - EVP_PKEY *pktmp = X509_get_pubkey(x509); - EVP_PKEY_copy_parameters(pktmp, SSL_get_privatekey(ssl)); - EVP_PKEY_free(pktmp); - } - - SSL_free(ssl); - - /* If we are using DSA, we can copy the parameters from - * the private key */ - - - /* Now we know that a key and cert have been set against - * the SSL context */ - if(!SSL_CTX_check_private_key(ctx)) { - failf(data, "Private key does not match the certificate public key"); - return 0; - } - } - return 1; -} - -/* returns non-zero on failure */ -static int x509_name_oneline(X509_NAME *a, char *buf, size_t size) -{ -#if 0 - return X509_NAME_oneline(a, buf, size); -#else - BIO *bio_out = BIO_new(BIO_s_mem()); - BUF_MEM *biomem; - int rc; - - if(!bio_out) - return 1; /* alloc failed! */ - - rc = X509_NAME_print_ex(bio_out, a, 0, XN_FLAG_SEP_SPLUS_SPC); - BIO_get_mem_ptr(bio_out, &biomem); - - if((size_t)biomem->length < size) - size = biomem->length; - else - size--; /* don't overwrite the buffer end */ - - memcpy(buf, biomem->data, size); - buf[size]=0; - - BIO_free(bio_out); - - return !rc; -#endif -} - -/* Return error string for last OpenSSL error - */ -static char *ossl_strerror(unsigned long error, char *buf, size_t size) -{ - /* OpenSSL 0.9.6 and later has a function named - ERR_error_string_n() that takes the size of the buffer as a - third argument */ - ERR_error_string_n(error, buf, size); - return buf; -} - -/** - * Global SSL init - * - * @retval 0 error initializing SSL - * @retval 1 SSL initialized successfully - */ -int Curl_ossl_init(void) -{ - OPENSSL_load_builtin_modules(); - -#ifdef HAVE_ENGINE_LOAD_BUILTIN_ENGINES - ENGINE_load_builtin_engines(); -#endif - - /* OPENSSL_config(NULL); is "strongly recommended" to use but unfortunately - that function makes an exit() call on wrongly formatted config files - which makes it hard to use in some situations. OPENSSL_config() itself - calls CONF_modules_load_file() and we use that instead and we ignore - its return code! */ - - /* CONF_MFLAGS_DEFAULT_SECTION introduced some time between 0.9.8b and - 0.9.8e */ -#ifndef CONF_MFLAGS_DEFAULT_SECTION -#define CONF_MFLAGS_DEFAULT_SECTION 0x0 -#endif - - CONF_modules_load_file(NULL, NULL, - CONF_MFLAGS_DEFAULT_SECTION| - CONF_MFLAGS_IGNORE_MISSING_FILE); - -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \ - !defined(LIBRESSL_VERSION_NUMBER) - /* OpenSSL 1.1.0+ takes care of initialization itself */ -#else - /* Lets get nice error messages */ - SSL_load_error_strings(); - - /* Init the global ciphers and digests */ - if(!SSLeay_add_ssl_algorithms()) - return 0; - - OpenSSL_add_all_algorithms(); -#endif - - return 1; -} - -/* Global cleanup */ -void Curl_ossl_cleanup(void) -{ -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \ - !defined(LIBRESSL_VERSION_NUMBER) - /* OpenSSL 1.1 deprecates all these cleanup functions and - turns them into no-ops in OpenSSL 1.0 compatibility mode */ -#else - /* Free ciphers and digests lists */ - EVP_cleanup(); - -#ifdef HAVE_ENGINE_CLEANUP - /* Free engine list */ - ENGINE_cleanup(); -#endif - - /* Free OpenSSL error strings */ - ERR_free_strings(); - - /* Free thread local error state, destroying hash upon zero refcount */ -#ifdef HAVE_ERR_REMOVE_THREAD_STATE - ERR_remove_thread_state(NULL); -#else - ERR_remove_state(0); -#endif - - /* Free all memory allocated by all configuration modules */ - CONF_modules_free(); - -#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS - SSL_COMP_free_compression_methods(); -#endif -#endif -} - -/* - * This function is used to determine connection status. - * - * Return codes: - * 1 means the connection is still in place - * 0 means the connection has been closed - * -1 means the connection status is unknown - */ -int Curl_ossl_check_cxn(struct connectdata *conn) -{ - /* SSL_peek takes data out of the raw recv buffer without peeking so we use - recv MSG_PEEK instead. Bug #795 */ -#ifdef MSG_PEEK - char buf; - ssize_t nread; - nread = recv((RECV_TYPE_ARG1)conn->sock[FIRSTSOCKET], (RECV_TYPE_ARG2)&buf, - (RECV_TYPE_ARG3)1, (RECV_TYPE_ARG4)MSG_PEEK); - if(nread == 0) - return 0; /* connection has been closed */ - else if(nread == 1) - return 1; /* connection still in place */ - else if(nread == -1) { - int err = SOCKERRNO; - if(err == EINPROGRESS || -#if defined(EAGAIN) && (EAGAIN != EWOULDBLOCK) - err == EAGAIN || -#endif - err == EWOULDBLOCK) - return 1; /* connection still in place */ - if(err == ECONNRESET || -#ifdef ECONNABORTED - err == ECONNABORTED || -#endif -#ifdef ENETDOWN - err == ENETDOWN || -#endif -#ifdef ENETRESET - err == ENETRESET || -#endif -#ifdef ESHUTDOWN - err == ESHUTDOWN || -#endif -#ifdef ETIMEDOUT - err == ETIMEDOUT || -#endif - err == ENOTCONN) - return 0; /* connection has been closed */ - } -#endif - return -1; /* connection status unknown */ -} - -/* Selects an OpenSSL crypto engine - */ -CURLcode Curl_ossl_set_engine(struct Curl_easy *data, const char *engine) -{ -#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H) - ENGINE *e; - -#if OPENSSL_VERSION_NUMBER >= 0x00909000L - e = ENGINE_by_id(engine); -#else - /* avoid memory leak */ - for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) { - const char *e_id = ENGINE_get_id(e); - if(!strcmp(engine, e_id)) - break; - } -#endif - - if(!e) { - failf(data, "SSL Engine '%s' not found", engine); - return CURLE_SSL_ENGINE_NOTFOUND; - } - - if(data->state.engine) { - ENGINE_finish(data->state.engine); - ENGINE_free(data->state.engine); - data->state.engine = NULL; - } - if(!ENGINE_init(e)) { - char buf[256]; - - ENGINE_free(e); - failf(data, "Failed to initialise SSL Engine '%s':\n%s", - engine, ossl_strerror(ERR_get_error(), buf, sizeof(buf))); - return CURLE_SSL_ENGINE_INITFAILED; - } - data->state.engine = e; - return CURLE_OK; -#else - (void)engine; - failf(data, "SSL Engine not supported"); - return CURLE_SSL_ENGINE_NOTFOUND; -#endif -} - -/* Sets engine as default for all SSL operations - */ -CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data) -{ -#ifdef HAVE_OPENSSL_ENGINE_H - if(data->state.engine) { - if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) { - infof(data, "set default crypto engine '%s'\n", - ENGINE_get_id(data->state.engine)); - } - else { - failf(data, "set default crypto engine '%s' failed", - ENGINE_get_id(data->state.engine)); - return CURLE_SSL_ENGINE_SETFAILED; - } - } -#else - (void) data; -#endif - return CURLE_OK; -} - -/* Return list of OpenSSL crypto engine names. - */ -struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data) -{ - struct curl_slist *list = NULL; -#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H) - struct curl_slist *beg; - ENGINE *e; - - for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)) { - beg = curl_slist_append(list, ENGINE_get_id(e)); - if(!beg) { - curl_slist_free_all(list); - return NULL; - } - list = beg; - } -#endif - (void) data; - return list; -} - - -static void ossl_close(struct ssl_connect_data *connssl) -{ - if(connssl->handle) { - (void)SSL_shutdown(connssl->handle); - SSL_set_connect_state(connssl->handle); - - SSL_free(connssl->handle); - connssl->handle = NULL; - } - if(connssl->ctx) { - SSL_CTX_free(connssl->ctx); - connssl->ctx = NULL; - } -} - -/* - * This function is called when an SSL connection is closed. - */ -void Curl_ossl_close(struct connectdata *conn, int sockindex) -{ - ossl_close(&conn->ssl[sockindex]); - ossl_close(&conn->proxy_ssl[sockindex]); -} - -/* - * This function is called to shut down the SSL layer but keep the - * socket open (CCC - Clear Command Channel) - */ -int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) -{ - int retval = 0; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - char buf[256]; /* We will use this for the OpenSSL error buffer, so it has - to be at least 256 bytes long. */ - unsigned long sslerror; - ssize_t nread; - int buffsize; - int err; - int done = 0; - - /* This has only been tested on the proftpd server, and the mod_tls code - sends a close notify alert without waiting for a close notify alert in - response. Thus we wait for a close notify alert from the server, but - we do not send one. Let's hope other servers do the same... */ - - if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE) - (void)SSL_shutdown(connssl->handle); - - if(connssl->handle) { - buffsize = (int)sizeof(buf); - while(!done) { - int what = SOCKET_READABLE(conn->sock[sockindex], - SSL_SHUTDOWN_TIMEOUT); - if(what > 0) { - ERR_clear_error(); - - /* Something to read, let's do it and hope that it is the close - notify alert from the server */ - nread = (ssize_t)SSL_read(conn->ssl[sockindex].handle, buf, - buffsize); - err = SSL_get_error(conn->ssl[sockindex].handle, (int)nread); - - switch(err) { - case SSL_ERROR_NONE: /* this is not an error */ - case SSL_ERROR_ZERO_RETURN: /* no more data */ - /* This is the expected response. There was no data but only - the close notify alert */ - done = 1; - break; - case SSL_ERROR_WANT_READ: - /* there's data pending, re-invoke SSL_read() */ - infof(data, "SSL_ERROR_WANT_READ\n"); - break; - case SSL_ERROR_WANT_WRITE: - /* SSL wants a write. Really odd. Let's bail out. */ - infof(data, "SSL_ERROR_WANT_WRITE\n"); - done = 1; - break; - default: - /* openssl/ssl.h says "look at error stack/return value/errno" */ - sslerror = ERR_get_error(); - failf(conn->data, OSSL_PACKAGE " SSL read: %s, errno %d", - ossl_strerror(sslerror, buf, sizeof(buf)), - SOCKERRNO); - done = 1; - break; - } - } - else if(0 == what) { - /* timeout */ - failf(data, "SSL shutdown timeout"); - done = 1; - } - else { - /* anything that gets here is fatally bad */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - retval = -1; - done = 1; - } - } /* while()-loop for the select() */ - - if(data->set.verbose) { -#ifdef HAVE_SSL_GET_SHUTDOWN - switch(SSL_get_shutdown(connssl->handle)) { - case SSL_SENT_SHUTDOWN: - infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN\n"); - break; - case SSL_RECEIVED_SHUTDOWN: - infof(data, "SSL_get_shutdown() returned SSL_RECEIVED_SHUTDOWN\n"); - break; - case SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN: - infof(data, "SSL_get_shutdown() returned SSL_SENT_SHUTDOWN|" - "SSL_RECEIVED__SHUTDOWN\n"); - break; - } -#endif - } - - SSL_free(connssl->handle); - connssl->handle = NULL; - } - return retval; -} - -void Curl_ossl_session_free(void *ptr) -{ - /* free the ID */ - SSL_SESSION_free(ptr); -} - -/* - * This function is called when the 'data' struct is going away. Close - * down everything and free all resources! - */ -void Curl_ossl_close_all(struct Curl_easy *data) -{ -#ifdef HAVE_OPENSSL_ENGINE_H - if(data->state.engine) { - ENGINE_finish(data->state.engine); - ENGINE_free(data->state.engine); - data->state.engine = NULL; - } -#else - (void)data; -#endif -#if !defined(HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED) && \ - defined(HAVE_ERR_REMOVE_THREAD_STATE) - /* OpenSSL 1.0.1 and 1.0.2 build an error queue that is stored per-thread - so we need to clean it here in case the thread will be killed. All OpenSSL - code should extract the error in association with the error so clearing - this queue here should be harmless at worst. */ - ERR_remove_thread_state(NULL); -#endif -} - -/* ====================================================== */ - - -/* Quote from RFC2818 section 3.1 "Server Identity" - - If a subjectAltName extension of type dNSName is present, that MUST - be used as the identity. Otherwise, the (most specific) Common Name - field in the Subject field of the certificate MUST be used. Although - the use of the Common Name is existing practice, it is deprecated and - Certification Authorities are encouraged to use the dNSName instead. - - Matching is performed using the matching rules specified by - [RFC2459]. If more than one identity of a given type is present in - the certificate (e.g., more than one dNSName name, a match in any one - of the set is considered acceptable.) Names may contain the wildcard - character * which is considered to match any single domain name - component or component fragment. E.g., *.a.com matches foo.a.com but - not bar.foo.a.com. f*.com matches foo.com but not bar.com. - - In some cases, the URI is specified as an IP address rather than a - hostname. In this case, the iPAddress subjectAltName must be present - in the certificate and must exactly match the IP in the URI. - -*/ -static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert) -{ - bool matched = FALSE; - int target = GEN_DNS; /* target type, GEN_DNS or GEN_IPADD */ - size_t addrlen = 0; - struct Curl_easy *data = conn->data; - STACK_OF(GENERAL_NAME) *altnames; -#ifdef ENABLE_IPV6 - struct in6_addr addr; -#else - struct in_addr addr; -#endif - CURLcode result = CURLE_OK; - bool dNSName = FALSE; /* if a dNSName field exists in the cert */ - bool iPAddress = FALSE; /* if a iPAddress field exists in the cert */ - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const char * const dispname = SSL_IS_PROXY() ? - conn->http_proxy.host.dispname : conn->host.dispname; - -#ifdef ENABLE_IPV6 - if(conn->bits.ipv6_ip && - Curl_inet_pton(AF_INET6, hostname, &addr)) { - target = GEN_IPADD; - addrlen = sizeof(struct in6_addr); - } - else -#endif - if(Curl_inet_pton(AF_INET, hostname, &addr)) { - target = GEN_IPADD; - addrlen = sizeof(struct in_addr); - } - - /* get a "list" of alternative names */ - altnames = X509_get_ext_d2i(server_cert, NID_subject_alt_name, NULL, NULL); - - if(altnames) { - int numalts; - int i; - bool dnsmatched = FALSE; - bool ipmatched = FALSE; - - /* get amount of alternatives, RFC2459 claims there MUST be at least - one, but we don't depend on it... */ - numalts = sk_GENERAL_NAME_num(altnames); - - /* loop through all alternatives - until a dnsmatch */ - for(i=0; (i < numalts) && !dnsmatched; i++) { - /* get a handle to alternative name number i */ - const GENERAL_NAME *check = sk_GENERAL_NAME_value(altnames, i); - - if(check->type == GEN_DNS) - dNSName = TRUE; - else if(check->type == GEN_IPADD) - iPAddress = TRUE; - - /* only check alternatives of the same type the target is */ - if(check->type == target) { - /* get data and length */ - const char *altptr = (char *)ASN1_STRING_get0_data(check->d.ia5); - size_t altlen = (size_t) ASN1_STRING_length(check->d.ia5); - - switch(target) { - case GEN_DNS: /* name/pattern comparison */ - /* The OpenSSL man page explicitly says: "In general it cannot be - assumed that the data returned by ASN1_STRING_data() is null - terminated or does not contain embedded nulls." But also that - "The actual format of the data will depend on the actual string - type itself: for example for and IA5String the data will be ASCII" - - Gisle researched the OpenSSL sources: - "I checked the 0.9.6 and 0.9.8 sources before my patch and - it always 0-terminates an IA5String." - */ - if((altlen == strlen(altptr)) && - /* if this isn't true, there was an embedded zero in the name - string and we cannot match it. */ - Curl_cert_hostcheck(altptr, hostname)) { - dnsmatched = TRUE; - infof(data, - " subjectAltName: host \"%s\" matched cert's \"%s\"\n", - dispname, altptr); - } - break; - - case GEN_IPADD: /* IP address comparison */ - /* compare alternative IP address if the data chunk is the same size - our server IP address is */ - if((altlen == addrlen) && !memcmp(altptr, &addr, altlen)) { - ipmatched = TRUE; - infof(data, - " subjectAltName: host \"%s\" matched cert's IP address!\n", - dispname); - } - break; - } - } - } - GENERAL_NAMES_free(altnames); - - if(dnsmatched || ipmatched) - matched = TRUE; - } - - if(matched) - /* an alternative name matched */ - ; - else if(dNSName || iPAddress) { - infof(data, " subjectAltName does not match %s\n", dispname); - failf(data, "SSL: no alternative certificate subject name matches " - "target host name '%s'", dispname); - result = CURLE_PEER_FAILED_VERIFICATION; - } - else { - /* we have to look to the last occurrence of a commonName in the - distinguished one to get the most significant one. */ - int j, i=-1; - - /* The following is done because of a bug in 0.9.6b */ - - unsigned char *nulstr = (unsigned char *)""; - unsigned char *peer_CN = nulstr; - - X509_NAME *name = X509_get_subject_name(server_cert); - if(name) - while((j = X509_NAME_get_index_by_NID(name, NID_commonName, i))>=0) - i=j; - - /* we have the name entry and we will now convert this to a string - that we can use for comparison. Doing this we support BMPstring, - UTF8 etc. */ - - if(i>=0) { - ASN1_STRING *tmp = - X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i)); - - /* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input - is already UTF-8 encoded. We check for this case and copy the raw - string manually to avoid the problem. This code can be made - conditional in the future when OpenSSL has been fixed. Work-around - brought by Alexis S. L. Carvalho. */ - if(tmp) { - if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) { - j = ASN1_STRING_length(tmp); - if(j >= 0) { - peer_CN = OPENSSL_malloc(j+1); - if(peer_CN) { - memcpy(peer_CN, ASN1_STRING_get0_data(tmp), j); - peer_CN[j] = '\0'; - } - } - } - else /* not a UTF8 name */ - j = ASN1_STRING_to_UTF8(&peer_CN, tmp); - - if(peer_CN && (curlx_uztosi(strlen((char *)peer_CN)) != j)) { - /* there was a terminating zero before the end of string, this - cannot match and we return failure! */ - failf(data, "SSL: illegal cert name field"); - result = CURLE_PEER_FAILED_VERIFICATION; - } - } - } - - if(peer_CN == nulstr) - peer_CN = NULL; - else { - /* convert peer_CN from UTF8 */ - CURLcode rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN)); - /* Curl_convert_from_utf8 calls failf if unsuccessful */ - if(rc) { - OPENSSL_free(peer_CN); - return rc; - } - } - - if(result) - /* error already detected, pass through */ - ; - else if(!peer_CN) { - failf(data, - "SSL: unable to obtain common name from peer certificate"); - result = CURLE_PEER_FAILED_VERIFICATION; - } - else if(!Curl_cert_hostcheck((const char *)peer_CN, hostname)) { - failf(data, "SSL: certificate subject name '%s' does not match " - "target host name '%s'", peer_CN, dispname); - result = CURLE_PEER_FAILED_VERIFICATION; - } - else { - infof(data, " common name: %s (matched)\n", peer_CN); - } - if(peer_CN) - OPENSSL_free(peer_CN); - } - - return result; -} - -#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \ - !defined(OPENSSL_NO_OCSP) -static CURLcode verifystatus(struct connectdata *conn, - struct ssl_connect_data *connssl) -{ - int i, ocsp_status; - const unsigned char *p; - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - - OCSP_RESPONSE *rsp = NULL; - OCSP_BASICRESP *br = NULL; - X509_STORE *st = NULL; - STACK_OF(X509) *ch = NULL; - - long len = SSL_get_tlsext_status_ocsp_resp(connssl->handle, &p); - - if(!p) { - failf(data, "No OCSP response received"); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - - rsp = d2i_OCSP_RESPONSE(NULL, &p, len); - if(!rsp) { - failf(data, "Invalid OCSP response"); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - - ocsp_status = OCSP_response_status(rsp); - if(ocsp_status != OCSP_RESPONSE_STATUS_SUCCESSFUL) { - failf(data, "Invalid OCSP response status: %s (%d)", - OCSP_response_status_str(ocsp_status), ocsp_status); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - - br = OCSP_response_get1_basic(rsp); - if(!br) { - failf(data, "Invalid OCSP response"); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - - ch = SSL_get_peer_cert_chain(connssl->handle); - st = SSL_CTX_get_cert_store(connssl->ctx); - -#if ((OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */ || \ - defined(LIBRESSL_VERSION_NUMBER)) - /* The authorized responder cert in the OCSP response MUST be signed by the - peer cert's issuer (see RFC6960 section 4.2.2.2). If that's a root cert, - no problem, but if it's an intermediate cert OpenSSL has a bug where it - expects this issuer to be present in the chain embedded in the OCSP - response. So we add it if necessary. */ - - /* First make sure the peer cert chain includes both a peer and an issuer, - and the OCSP response contains a responder cert. */ - if(sk_X509_num(ch) >= 2 && sk_X509_num(br->certs) >= 1) { - X509 *responder = sk_X509_value(br->certs, sk_X509_num(br->certs) - 1); - - /* Find issuer of responder cert and add it to the OCSP response chain */ - for(i = 0; i < sk_X509_num(ch); i++) { - X509 *issuer = sk_X509_value(ch, i); - if(X509_check_issued(issuer, responder) == X509_V_OK) { - if(!OCSP_basic_add1_cert(br, issuer)) { - failf(data, "Could not add issuer cert to OCSP response"); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - } - } - } -#endif - - if(OCSP_basic_verify(br, ch, st, 0) <= 0) { - failf(data, "OCSP response verification failed"); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - - for(i = 0; i < OCSP_resp_count(br); i++) { - int cert_status, crl_reason; - OCSP_SINGLERESP *single = NULL; - - ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd; - - single = OCSP_resp_get0(br, i); - if(!single) - continue; - - cert_status = OCSP_single_get0_status(single, &crl_reason, &rev, - &thisupd, &nextupd); - - if(!OCSP_check_validity(thisupd, nextupd, 300L, -1L)) { - failf(data, "OCSP response has expired"); - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - - infof(data, "SSL certificate status: %s (%d)\n", - OCSP_cert_status_str(cert_status), cert_status); - - switch(cert_status) { - case V_OCSP_CERTSTATUS_GOOD: - break; - - case V_OCSP_CERTSTATUS_REVOKED: - result = CURLE_SSL_INVALIDCERTSTATUS; - - failf(data, "SSL certificate revocation reason: %s (%d)", - OCSP_crl_reason_str(crl_reason), crl_reason); - goto end; - - case V_OCSP_CERTSTATUS_UNKNOWN: - result = CURLE_SSL_INVALIDCERTSTATUS; - goto end; - } - } - -end: - if(br) OCSP_BASICRESP_free(br); - OCSP_RESPONSE_free(rsp); - - return result; -} -#endif - -#endif /* USE_OPENSSL */ - -/* The SSL_CTRL_SET_MSG_CALLBACK doesn't exist in ancient OpenSSL versions - and thus this cannot be done there. */ -#ifdef SSL_CTRL_SET_MSG_CALLBACK - -static const char *ssl_msg_type(int ssl_ver, int msg) -{ -#ifdef SSL2_VERSION_MAJOR - if(ssl_ver == SSL2_VERSION_MAJOR) { - switch(msg) { - case SSL2_MT_ERROR: - return "Error"; - case SSL2_MT_CLIENT_HELLO: - return "Client hello"; - case SSL2_MT_CLIENT_MASTER_KEY: - return "Client key"; - case SSL2_MT_CLIENT_FINISHED: - return "Client finished"; - case SSL2_MT_SERVER_HELLO: - return "Server hello"; - case SSL2_MT_SERVER_VERIFY: - return "Server verify"; - case SSL2_MT_SERVER_FINISHED: - return "Server finished"; - case SSL2_MT_REQUEST_CERTIFICATE: - return "Request CERT"; - case SSL2_MT_CLIENT_CERTIFICATE: - return "Client CERT"; - } - } - else -#endif - if(ssl_ver == SSL3_VERSION_MAJOR) { - switch(msg) { - case SSL3_MT_HELLO_REQUEST: - return "Hello request"; - case SSL3_MT_CLIENT_HELLO: - return "Client hello"; - case SSL3_MT_SERVER_HELLO: - return "Server hello"; -#ifdef SSL3_MT_NEWSESSION_TICKET - case SSL3_MT_NEWSESSION_TICKET: - return "Newsession Ticket"; -#endif - case SSL3_MT_CERTIFICATE: - return "Certificate"; - case SSL3_MT_SERVER_KEY_EXCHANGE: - return "Server key exchange"; - case SSL3_MT_CLIENT_KEY_EXCHANGE: - return "Client key exchange"; - case SSL3_MT_CERTIFICATE_REQUEST: - return "Request CERT"; - case SSL3_MT_SERVER_DONE: - return "Server finished"; - case SSL3_MT_CERTIFICATE_VERIFY: - return "CERT verify"; - case SSL3_MT_FINISHED: - return "Finished"; -#ifdef SSL3_MT_CERTIFICATE_STATUS - case SSL3_MT_CERTIFICATE_STATUS: - return "Certificate Status"; -#endif - } - } - return "Unknown"; -} - -static const char *tls_rt_type(int type) -{ - switch(type) { -#ifdef SSL3_RT_HEADER - case SSL3_RT_HEADER: - return "TLS header"; -#endif - case SSL3_RT_CHANGE_CIPHER_SPEC: - return "TLS change cipher"; - case SSL3_RT_ALERT: - return "TLS alert"; - case SSL3_RT_HANDSHAKE: - return "TLS handshake"; - case SSL3_RT_APPLICATION_DATA: - return "TLS app data"; - default: - return "TLS Unknown"; - } -} - - -/* - * Our callback from the SSL/TLS layers. - */ -static void ssl_tls_trace(int direction, int ssl_ver, int content_type, - const void *buf, size_t len, SSL *ssl, - void *userp) -{ - struct Curl_easy *data; - const char *msg_name, *tls_rt_name; - char ssl_buf[1024]; - char unknown[32]; - int msg_type, txt_len; - const char *verstr = NULL; - struct connectdata *conn = userp; - - if(!conn || !conn->data || !conn->data->set.fdebug || - (direction != 0 && direction != 1)) - return; - - data = conn->data; - - switch(ssl_ver) { -#ifdef SSL2_VERSION /* removed in recent versions */ - case SSL2_VERSION: - verstr = "SSLv2"; - break; -#endif -#ifdef SSL3_VERSION - case SSL3_VERSION: - verstr = "SSLv3"; - break; -#endif - case TLS1_VERSION: - verstr = "TLSv1.0"; - break; -#ifdef TLS1_1_VERSION - case TLS1_1_VERSION: - verstr = "TLSv1.1"; - break; -#endif -#ifdef TLS1_2_VERSION - case TLS1_2_VERSION: - verstr = "TLSv1.2"; - break; -#endif -#ifdef TLS1_3_VERSION - case TLS1_3_VERSION: - verstr = "TLSv1.3"; - break; -#endif - case 0: - break; - default: - snprintf(unknown, sizeof(unknown), "(%x)", ssl_ver); - verstr = unknown; - break; - } - - if(ssl_ver) { - /* the info given when the version is zero is not that useful for us */ - - ssl_ver >>= 8; /* check the upper 8 bits only below */ - - /* SSLv2 doesn't seem to have TLS record-type headers, so OpenSSL - * always pass-up content-type as 0. But the interesting message-type - * is at 'buf[0]'. - */ - if(ssl_ver == SSL3_VERSION_MAJOR && content_type) - tls_rt_name = tls_rt_type(content_type); - else - tls_rt_name = ""; - - msg_type = *(char *)buf; - msg_name = ssl_msg_type(ssl_ver, msg_type); - - txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "%s (%s), %s, %s (%d):\n", - verstr, direction?"OUT":"IN", - tls_rt_name, msg_name, msg_type); - Curl_debug(data, CURLINFO_TEXT, ssl_buf, (size_t)txt_len, NULL); - } - - Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT : - CURLINFO_SSL_DATA_IN, (char *)buf, len, NULL); - (void) ssl; -} -#endif - -#ifdef USE_OPENSSL -/* ====================================================== */ - -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME -# define use_sni(x) sni = (x) -#else -# define use_sni(x) Curl_nop_stmt -#endif - -/* Check for OpenSSL 1.0.2 which has ALPN support. */ -#undef HAS_ALPN -#if OPENSSL_VERSION_NUMBER >= 0x10002000L \ - && !defined(OPENSSL_NO_TLSEXT) -# define HAS_ALPN 1 -#endif - -/* Check for OpenSSL 1.0.1 which has NPN support. */ -#undef HAS_NPN -#if OPENSSL_VERSION_NUMBER >= 0x10001000L \ - && !defined(OPENSSL_NO_TLSEXT) \ - && !defined(OPENSSL_NO_NEXTPROTONEG) -# define HAS_NPN 1 -#endif - -#ifdef HAS_NPN - -/* - * in is a list of lenght prefixed strings. this function has to select - * the protocol we want to use from the list and write its string into out. - */ - -static int -select_next_protocol(unsigned char **out, unsigned char *outlen, - const unsigned char *in, unsigned int inlen, - const char *key, unsigned int keylen) -{ - unsigned int i; - for(i = 0; i + keylen <= inlen; i += in[i] + 1) { - if(memcmp(&in[i + 1], key, keylen) == 0) { - *out = (unsigned char *) &in[i + 1]; - *outlen = in[i]; - return 0; - } - } - return -1; -} - -static int -select_next_proto_cb(SSL *ssl, - unsigned char **out, unsigned char *outlen, - const unsigned char *in, unsigned int inlen, - void *arg) -{ - struct connectdata *conn = (struct connectdata*) arg; - - (void)ssl; - -#ifdef USE_NGHTTP2 - if(conn->data->set.httpversion >= CURL_HTTP_VERSION_2 && - !select_next_protocol(out, outlen, in, inlen, NGHTTP2_PROTO_VERSION_ID, - NGHTTP2_PROTO_VERSION_ID_LEN)) { - infof(conn->data, "NPN, negotiated HTTP2 (%s)\n", - NGHTTP2_PROTO_VERSION_ID); - conn->negnpn = CURL_HTTP_VERSION_2; - return SSL_TLSEXT_ERR_OK; - } -#endif - - if(!select_next_protocol(out, outlen, in, inlen, ALPN_HTTP_1_1, - ALPN_HTTP_1_1_LENGTH)) { - infof(conn->data, "NPN, negotiated HTTP1.1\n"); - conn->negnpn = CURL_HTTP_VERSION_1_1; - return SSL_TLSEXT_ERR_OK; - } - - infof(conn->data, "NPN, no overlap, use HTTP1.1\n"); - *out = (unsigned char *)ALPN_HTTP_1_1; - *outlen = ALPN_HTTP_1_1_LENGTH; - conn->negnpn = CURL_HTTP_VERSION_1_1; - - return SSL_TLSEXT_ERR_OK; -} -#endif /* HAS_NPN */ - -static const char * -get_ssl_version_txt(SSL *ssl) -{ - if(!ssl) - return ""; - - switch(SSL_version(ssl)) { -#ifdef TLS1_3_VERSION - case TLS1_3_VERSION: - return "TLSv1.3"; -#endif -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - case TLS1_2_VERSION: - return "TLSv1.2"; - case TLS1_1_VERSION: - return "TLSv1.1"; -#endif - case TLS1_VERSION: - return "TLSv1.0"; - case SSL3_VERSION: - return "SSLv3"; - case SSL2_VERSION: - return "SSLv2"; - } - return "unknown"; -} - -static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex) -{ - CURLcode result = CURLE_OK; - char *ciphers; - struct Curl_easy *data = conn->data; - SSL_METHOD_QUAL SSL_METHOD *req_method = NULL; - X509_LOOKUP *lookup = NULL; - curl_socket_t sockfd = conn->sock[sockindex]; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - long ctx_options; -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME - bool sni; -#ifdef ENABLE_IPV6 - struct in6_addr addr; -#else - struct in_addr addr; -#endif -#endif - long * const certverifyresult = SSL_IS_PROXY() ? - &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult; - const long int ssl_version = SSL_CONN_CONFIG(version); -#ifdef USE_TLS_SRP - const enum CURL_TLSAUTH ssl_authtype = SSL_SET_OPTION(authtype); -#endif - char * const ssl_cert = SSL_SET_OPTION(cert); - const char * const ssl_cert_type = SSL_SET_OPTION(cert_type); - const char * const ssl_cafile = SSL_CONN_CONFIG(CAfile); - const char * const ssl_capath = SSL_CONN_CONFIG(CApath); - const bool verifypeer = SSL_CONN_CONFIG(verifypeer); - const char * const ssl_crlfile = SSL_SET_OPTION(CRLfile); - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - DEBUGASSERT(ssl_connect_1 == connssl->connecting_state); - - /* Make funny stuff to get random input */ - result = Curl_ossl_seed(data); - if(result) - return result; - - *certverifyresult = !X509_V_OK; - - /* check to see if we've been told to use an explicit SSL/TLS version */ - - switch(ssl_version) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - case CURL_SSLVERSION_TLSv1_0: - case CURL_SSLVERSION_TLSv1_1: - case CURL_SSLVERSION_TLSv1_2: - case CURL_SSLVERSION_TLSv1_3: - /* it will be handled later with the context options */ -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \ - !defined(LIBRESSL_VERSION_NUMBER) - req_method = TLS_client_method(); -#else - req_method = SSLv23_client_method(); -#endif - use_sni(TRUE); - break; - case CURL_SSLVERSION_SSLv2: -#ifdef OPENSSL_NO_SSL2 - failf(data, OSSL_PACKAGE " was built without SSLv2 support"); - return CURLE_NOT_BUILT_IN; -#else -#ifdef USE_TLS_SRP - if(ssl_authtype == CURL_TLSAUTH_SRP) - return CURLE_SSL_CONNECT_ERROR; -#endif - req_method = SSLv2_client_method(); - use_sni(FALSE); - break; -#endif - case CURL_SSLVERSION_SSLv3: -#ifdef OPENSSL_NO_SSL3_METHOD - failf(data, OSSL_PACKAGE " was built without SSLv3 support"); - return CURLE_NOT_BUILT_IN; -#else -#ifdef USE_TLS_SRP - if(ssl_authtype == CURL_TLSAUTH_SRP) - return CURLE_SSL_CONNECT_ERROR; -#endif - req_method = SSLv3_client_method(); - use_sni(FALSE); - break; -#endif - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - if(connssl->ctx) - SSL_CTX_free(connssl->ctx); - connssl->ctx = SSL_CTX_new(req_method); - - if(!connssl->ctx) { - failf(data, "SSL: couldn't create a context: %s", - ERR_error_string(ERR_peek_error(), NULL)); - return CURLE_OUT_OF_MEMORY; - } - -#ifdef SSL_MODE_RELEASE_BUFFERS - SSL_CTX_set_mode(connssl->ctx, SSL_MODE_RELEASE_BUFFERS); -#endif - -#ifdef SSL_CTRL_SET_MSG_CALLBACK - if(data->set.fdebug && data->set.verbose) { - /* the SSL trace callback is only used for verbose logging */ - SSL_CTX_set_msg_callback(connssl->ctx, ssl_tls_trace); - SSL_CTX_set_msg_callback_arg(connssl->ctx, conn); - } -#endif - - /* OpenSSL contains code to work-around lots of bugs and flaws in various - SSL-implementations. SSL_CTX_set_options() is used to enabled those - work-arounds. The man page for this option states that SSL_OP_ALL enables - all the work-arounds and that "It is usually safe to use SSL_OP_ALL to - enable the bug workaround options if compatibility with somewhat broken - implementations is desired." - - The "-no_ticket" option was introduced in Openssl0.9.8j. It's a flag to - disable "rfc4507bis session ticket support". rfc4507bis was later turned - into the proper RFC5077 it seems: https://tools.ietf.org/html/rfc5077 - - The enabled extension concerns the session management. I wonder how often - libcurl stops a connection and then resumes a TLS session. also, sending - the session data is some overhead. .I suggest that you just use your - proposed patch (which explicitly disables TICKET). - - If someone writes an application with libcurl and openssl who wants to - enable the feature, one can do this in the SSL callback. - - SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper - interoperability with web server Netscape Enterprise Server 2.0.1 which - was released back in 1996. - - Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has - become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate - CVE-2010-4180 when using previous OpenSSL versions we no longer enable - this option regardless of OpenSSL version and SSL_OP_ALL definition. - - OpenSSL added a work-around for a SSL 3.0/TLS 1.0 CBC vulnerability - (https://www.openssl.org/~bodo/tls-cbc.txt). In 0.9.6e they added a bit to - SSL_OP_ALL that _disables_ that work-around despite the fact that - SSL_OP_ALL is documented to do "rather harmless" workarounds. In order to - keep the secure work-around, the SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit - must not be set. - */ - - ctx_options = SSL_OP_ALL; - -#ifdef SSL_OP_NO_TICKET - ctx_options |= SSL_OP_NO_TICKET; -#endif - -#ifdef SSL_OP_NO_COMPRESSION - ctx_options |= SSL_OP_NO_COMPRESSION; -#endif - -#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG - /* mitigate CVE-2010-4180 */ - ctx_options &= ~SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG; -#endif - -#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS - /* unless the user explicitly ask to allow the protocol vulnerability we - use the work-around */ - if(!SSL_SET_OPTION(enable_beast)) - ctx_options &= ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS; -#endif - - switch(ssl_version) { - case CURL_SSLVERSION_SSLv3: -#ifdef USE_TLS_SRP - if(ssl_authtype == CURL_TLSAUTH_SRP) { - infof(data, "Set version TLSv1.x for SRP authorisation\n"); - } -#endif - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_TLSv1; -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_TLSv1_1; - ctx_options |= SSL_OP_NO_TLSv1_2; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif -#endif - break; - - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - break; - - case CURL_SSLVERSION_TLSv1_0: - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_TLSv1_1; - ctx_options |= SSL_OP_NO_TLSv1_2; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif -#endif - break; - - case CURL_SSLVERSION_TLSv1_1: -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; - ctx_options |= SSL_OP_NO_TLSv1_2; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif - break; -#else - failf(data, OSSL_PACKAGE " was built without TLS 1.1 support"); - return CURLE_NOT_BUILT_IN; -#endif - - case CURL_SSLVERSION_TLSv1_2: -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; - ctx_options |= SSL_OP_NO_TLSv1_1; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif - break; -#else - failf(data, OSSL_PACKAGE " was built without TLS 1.2 support"); - return CURLE_NOT_BUILT_IN; -#endif - - case CURL_SSLVERSION_TLSv1_3: -#ifdef TLS1_3_VERSION - SSL_CTX_set_max_proto_version(connssl->ctx, TLS1_3_VERSION); - ctx_options |= SSL_OP_NO_SSLv2; - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; - ctx_options |= SSL_OP_NO_TLSv1_1; - ctx_options |= SSL_OP_NO_TLSv1_2; - break; -#else - failf(data, OSSL_PACKAGE " was built without TLS 1.3 support"); - return CURLE_NOT_BUILT_IN; -#endif - - case CURL_SSLVERSION_SSLv2: -#ifndef OPENSSL_NO_SSL2 - ctx_options |= SSL_OP_NO_SSLv3; - ctx_options |= SSL_OP_NO_TLSv1; -#if OPENSSL_VERSION_NUMBER >= 0x1000100FL - ctx_options |= SSL_OP_NO_TLSv1_1; - ctx_options |= SSL_OP_NO_TLSv1_2; -#ifdef TLS1_3_VERSION - ctx_options |= SSL_OP_NO_TLSv1_3; -#endif -#endif - break; -#else - failf(data, OSSL_PACKAGE " was built without SSLv2 support"); - return CURLE_NOT_BUILT_IN; -#endif - - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - SSL_CTX_set_options(connssl->ctx, ctx_options); - -#ifdef HAS_NPN - if(conn->bits.tls_enable_npn) - SSL_CTX_set_next_proto_select_cb(connssl->ctx, select_next_proto_cb, conn); -#endif - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - int cur = 0; - unsigned char protocols[128]; - -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { - protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN; - - memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID, - NGHTTP2_PROTO_VERSION_ID_LEN); - cur += NGHTTP2_PROTO_VERSION_ID_LEN; - infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID); - } -#endif - - protocols[cur++] = ALPN_HTTP_1_1_LENGTH; - memcpy(&protocols[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH); - cur += ALPN_HTTP_1_1_LENGTH; - infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1); - - /* expects length prefixed preference ordered list of protocols in wire - * format - */ - SSL_CTX_set_alpn_protos(connssl->ctx, protocols, cur); - } -#endif - - if(ssl_cert || ssl_cert_type) { - if(!cert_stuff(conn, connssl->ctx, ssl_cert, ssl_cert_type, - SSL_SET_OPTION(key), SSL_SET_OPTION(key_type), - SSL_SET_OPTION(key_passwd))) { - /* failf() is already done in cert_stuff() */ - return CURLE_SSL_CERTPROBLEM; - } - } - - ciphers = SSL_CONN_CONFIG(cipher_list); - if(!ciphers) - ciphers = (char *)DEFAULT_CIPHER_SELECTION; - if(!SSL_CTX_set_cipher_list(connssl->ctx, ciphers)) { - failf(data, "failed setting cipher list: %s", ciphers); - return CURLE_SSL_CIPHER; - } - infof(data, "Cipher selection: %s\n", ciphers); - -#ifdef USE_TLS_SRP - if(ssl_authtype == CURL_TLSAUTH_SRP) { - char * const ssl_username = SSL_SET_OPTION(username); - - infof(data, "Using TLS-SRP username: %s\n", ssl_username); - - if(!SSL_CTX_set_srp_username(connssl->ctx, ssl_username)) { - failf(data, "Unable to set SRP user name"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - if(!SSL_CTX_set_srp_password(connssl->ctx, SSL_SET_OPTION(password))) { - failf(data, "failed setting SRP password"); - return CURLE_BAD_FUNCTION_ARGUMENT; - } - if(!SSL_CONN_CONFIG(cipher_list)) { - infof(data, "Setting cipher list SRP\n"); - - if(!SSL_CTX_set_cipher_list(connssl->ctx, "SRP")) { - failf(data, "failed setting SRP cipher list"); - return CURLE_SSL_CIPHER; - } - } - } -#endif - - if(ssl_cafile || ssl_capath) { - /* tell SSL where to find CA certificates that are used to verify - the servers certificate. */ - if(!SSL_CTX_load_verify_locations(connssl->ctx, ssl_cafile, ssl_capath)) { - if(verifypeer) { - /* Fail if we insist on successfully verifying the server. */ - failf(data, "error setting certificate verify locations:\n" - " CAfile: %s\n CApath: %s", - ssl_cafile ? ssl_cafile : "none", - ssl_capath ? ssl_capath : "none"); - return CURLE_SSL_CACERT_BADFILE; - } - else { - /* Just continue with a warning if no strict certificate verification - is required. */ - infof(data, "error setting certificate verify locations," - " continuing anyway:\n"); - } - } - else { - /* Everything is fine. */ - infof(data, "successfully set certificate verify locations:\n"); - } - infof(data, - " CAfile: %s\n" - " CApath: %s\n", - ssl_cafile ? ssl_cafile : "none", - ssl_capath ? ssl_capath : "none"); - } -#ifdef CURL_CA_FALLBACK - else if(verifypeer) { - /* verfying the peer without any CA certificates won't - work so use openssl's built in default as fallback */ - SSL_CTX_set_default_verify_paths(connssl->ctx); - } -#endif - - if(ssl_crlfile) { - /* tell SSL where to find CRL file that is used to check certificate - * revocation */ - lookup=X509_STORE_add_lookup(SSL_CTX_get_cert_store(connssl->ctx), - X509_LOOKUP_file()); - if(!lookup || - (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM)) ) { - failf(data, "error loading CRL file: %s", ssl_crlfile); - return CURLE_SSL_CRL_BADFILE; - } - else { - /* Everything is fine. */ - infof(data, "successfully load CRL file:\n"); - X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx), - X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL); - } - infof(data, " CRLfile: %s\n", ssl_crlfile); - } - - /* Try building a chain using issuers in the trusted store first to avoid - problems with server-sent legacy intermediates. - Newer versions of OpenSSL do alternate chain checking by default which - gives us the same fix without as much of a performance hit (slight), so we - prefer that if available. - https://rt.openssl.org/Ticket/Display.html?id=3621&user=guest&pass=guest - */ -#if defined(X509_V_FLAG_TRUSTED_FIRST) && !defined(X509_V_FLAG_NO_ALT_CHAINS) - if(verifypeer) { - X509_STORE_set_flags(SSL_CTX_get_cert_store(connssl->ctx), - X509_V_FLAG_TRUSTED_FIRST); - } -#endif - - /* SSL always tries to verify the peer, this only says whether it should - * fail to connect if the verification fails, or if it should continue - * anyway. In the latter case the result of the verification is checked with - * SSL_get_verify_result() below. */ - SSL_CTX_set_verify(connssl->ctx, - verifypeer ? SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL); - - /* give application a chance to interfere with SSL set up. */ - if(data->set.ssl.fsslctx) { - result = (*data->set.ssl.fsslctx)(data, connssl->ctx, - data->set.ssl.fsslctxp); - if(result) { - failf(data, "error signaled by ssl ctx callback"); - return result; - } - } - - /* Lets make an SSL structure */ - if(connssl->handle) - SSL_free(connssl->handle); - connssl->handle = SSL_new(connssl->ctx); - if(!connssl->handle) { - failf(data, "SSL: couldn't create a context (handle)!"); - return CURLE_OUT_OF_MEMORY; - } - -#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \ - !defined(OPENSSL_NO_OCSP) - if(SSL_CONN_CONFIG(verifystatus)) - SSL_set_tlsext_status_type(connssl->handle, TLSEXT_STATUSTYPE_ocsp); -#endif - - SSL_set_connect_state(connssl->handle); - - connssl->server_cert = 0x0; -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME - if((0 == Curl_inet_pton(AF_INET, hostname, &addr)) && -#ifdef ENABLE_IPV6 - (0 == Curl_inet_pton(AF_INET6, hostname, &addr)) && -#endif - sni && - !SSL_set_tlsext_host_name(connssl->handle, hostname)) - infof(data, "WARNING: failed to configure server name indication (SNI) " - "TLS extension\n"); -#endif - - /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { - void *ssl_sessionid = NULL; - - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &ssl_sessionid, NULL, sockindex)) { - /* we got a session id, use it! */ - if(!SSL_set_session(connssl->handle, ssl_sessionid)) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "SSL: SSL_set_session failed: %s", - ERR_error_string(ERR_get_error(), NULL)); - return CURLE_SSL_CONNECT_ERROR; - } - /* Informational message */ - infof(data, "SSL re-using session ID\n"); - } - Curl_ssl_sessionid_unlock(conn); - } - - if(conn->proxy_ssl[sockindex].use) { - BIO *const bio = BIO_new(BIO_f_ssl()); - DEBUGASSERT(ssl_connection_complete == conn->proxy_ssl[sockindex].state); - DEBUGASSERT(conn->proxy_ssl[sockindex].handle != NULL); - DEBUGASSERT(bio != NULL); - BIO_set_ssl(bio, conn->proxy_ssl[sockindex].handle, FALSE); - SSL_set_bio(connssl->handle, bio, bio); - } - else if(!SSL_set_fd(connssl->handle, (int)sockfd)) { - /* pass the raw socket into the SSL layers */ - failf(data, "SSL: SSL_set_fd failed: %s", - ERR_error_string(ERR_get_error(), NULL)); - return CURLE_SSL_CONNECT_ERROR; - } - - connssl->connecting_state = ssl_connect_2; - - return CURLE_OK; -} - -static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex) -{ - struct Curl_easy *data = conn->data; - int err; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - long * const certverifyresult = SSL_IS_PROXY() ? - &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult; - DEBUGASSERT(ssl_connect_2 == connssl->connecting_state - || ssl_connect_2_reading == connssl->connecting_state - || ssl_connect_2_writing == connssl->connecting_state); - - ERR_clear_error(); - - err = SSL_connect(connssl->handle); - - /* 1 is fine - 0 is "not successful but was shut down controlled" - <0 is "handshake was not successful, because a fatal error occurred" */ - if(1 != err) { - int detail = SSL_get_error(connssl->handle, err); - - if(SSL_ERROR_WANT_READ == detail) { - connssl->connecting_state = ssl_connect_2_reading; - return CURLE_OK; - } - else if(SSL_ERROR_WANT_WRITE == detail) { - connssl->connecting_state = ssl_connect_2_writing; - return CURLE_OK; - } - else { - /* untreated error */ - unsigned long errdetail; - char error_buffer[256]=""; /* OpenSSL documents that this must be at - least 256 bytes long. */ - CURLcode result; - long lerr; - int lib; - int reason; - - /* the connection failed, we're not waiting for anything else. */ - connssl->connecting_state = ssl_connect_2; - - /* Get the earliest error code from the thread's error queue and removes - the entry. */ - errdetail = ERR_get_error(); - - /* Extract which lib and reason */ - lib = ERR_GET_LIB(errdetail); - reason = ERR_GET_REASON(errdetail); - - if((lib == ERR_LIB_SSL) && - (reason == SSL_R_CERTIFICATE_VERIFY_FAILED)) { - result = CURLE_SSL_CACERT; - - lerr = SSL_get_verify_result(connssl->handle); - if(lerr != X509_V_OK) { - *certverifyresult = lerr; - snprintf(error_buffer, sizeof(error_buffer), - "SSL certificate problem: %s", - X509_verify_cert_error_string(lerr)); - } - else - /* strcpy() is fine here as long as the string fits within - error_buffer */ - strcpy(error_buffer, "SSL certificate verification failed"); - } - else { - result = CURLE_SSL_CONNECT_ERROR; - ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)); - } - - /* detail is already set to the SSL error above */ - - /* If we e.g. use SSLv2 request-method and the server doesn't like us - * (RST connection etc.), OpenSSL gives no explanation whatsoever and - * the SO_ERROR is also lost. - */ - if(CURLE_SSL_CONNECT_ERROR == result && errdetail == 0) { - const char * const hostname = SSL_IS_PROXY() ? - conn->http_proxy.host.name : conn->host.name; - const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; - failf(data, "Unknown SSL protocol error in connection to %s:%ld ", - hostname, port); - return result; - } - - /* Could be a CERT problem */ - failf(data, "%s", error_buffer); - - return result; - } - } - else { - /* we have been connected fine, we're not waiting for anything else. */ - connssl->connecting_state = ssl_connect_3; - - /* Informational message */ - infof(data, "SSL connection using %s / %s\n", - get_ssl_version_txt(connssl->handle), - SSL_get_cipher(connssl->handle)); - -#ifdef HAS_ALPN - /* Sets data and len to negotiated protocol, len is 0 if no protocol was - * negotiated - */ - if(conn->bits.tls_enable_alpn) { - const unsigned char *neg_protocol; - unsigned int len; - SSL_get0_alpn_selected(connssl->handle, &neg_protocol, &len); - if(len != 0) { - infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol); - -#ifdef USE_NGHTTP2 - if(len == NGHTTP2_PROTO_VERSION_ID_LEN && - !memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len)) { - conn->negnpn = CURL_HTTP_VERSION_2; - } - else -#endif - if(len == ALPN_HTTP_1_1_LENGTH && - !memcmp(ALPN_HTTP_1_1, neg_protocol, ALPN_HTTP_1_1_LENGTH)) { - conn->negnpn = CURL_HTTP_VERSION_1_1; - } - } - else - infof(data, "ALPN, server did not agree to a protocol\n"); - } -#endif - - return CURLE_OK; - } -} - -static int asn1_object_dump(ASN1_OBJECT *a, char *buf, size_t len) -{ - int i, ilen; - - ilen = (int)len; - if(ilen < 0) - return 1; /* buffer too big */ - - i = i2t_ASN1_OBJECT(buf, ilen, a); - - if(i >= ilen) - return 1; /* buffer too small */ - - return 0; -} - -#define push_certinfo(_label, _num) \ -do { \ - long info_len = BIO_get_mem_data(mem, &ptr); \ - Curl_ssl_push_certinfo_len(data, _num, _label, ptr, info_len); \ - if(1!=BIO_reset(mem)) \ - break; \ -} WHILE_FALSE - -static void pubkey_show(struct Curl_easy *data, - BIO *mem, - int num, - const char *type, - const char *name, -#ifdef HAVE_OPAQUE_RSA_DSA_DH - const -#endif - BIGNUM *bn) -{ - char *ptr; - char namebuf[32]; - - snprintf(namebuf, sizeof(namebuf), "%s(%s)", type, name); - - if(bn) - BN_print(mem, bn); - push_certinfo(namebuf, num); -} - -#ifdef HAVE_OPAQUE_RSA_DSA_DH -#define print_pubkey_BN(_type, _name, _num) \ - pubkey_show(data, mem, _num, #_type, #_name, _name) - -#else -#define print_pubkey_BN(_type, _name, _num) \ -do { \ - if(_type->_name) { \ - pubkey_show(data, mem, _num, #_type, #_name, _type->_name); \ - } \ -} WHILE_FALSE -#endif - -static int X509V3_ext(struct Curl_easy *data, - int certnum, - CONST_EXTS STACK_OF(X509_EXTENSION) *exts) -{ - int i; - size_t j; - - if((int)sk_X509_EXTENSION_num(exts) <= 0) - /* no extensions, bail out */ - return 1; - - for(i=0; i < (int)sk_X509_EXTENSION_num(exts); i++) { - ASN1_OBJECT *obj; - X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i); - BUF_MEM *biomem; - char buf[512]; - char *ptr=buf; - char namebuf[128]; - BIO *bio_out = BIO_new(BIO_s_mem()); - - if(!bio_out) - return 1; - - obj = X509_EXTENSION_get_object(ext); - - asn1_object_dump(obj, namebuf, sizeof(namebuf)); - - if(!X509V3_EXT_print(bio_out, ext, 0, 0)) - ASN1_STRING_print(bio_out, (ASN1_STRING *)X509_EXTENSION_get_data(ext)); - - BIO_get_mem_ptr(bio_out, &biomem); - - for(j = 0; j < (size_t)biomem->length; j++) { - const char *sep=""; - if(biomem->data[j] == '\n') { - sep=", "; - j++; /* skip the newline */ - }; - while((j<(size_t)biomem->length) && (biomem->data[j] == ' ')) - j++; - if(j<(size_t)biomem->length) - ptr+=snprintf(ptr, sizeof(buf)-(ptr-buf), "%s%c", sep, - biomem->data[j]); - } - - Curl_ssl_push_certinfo(data, certnum, namebuf, buf); - - BIO_free(bio_out); - - } - return 0; /* all is fine */ -} - -static CURLcode get_cert_chain(struct connectdata *conn, - struct ssl_connect_data *connssl) - -{ - CURLcode result; - STACK_OF(X509) *sk; - int i; - struct Curl_easy *data = conn->data; - int numcerts; - BIO *mem; - - sk = SSL_get_peer_cert_chain(connssl->handle); - if(!sk) { - return CURLE_OUT_OF_MEMORY; - } - - numcerts = sk_X509_num(sk); - - result = Curl_ssl_init_certinfo(data, numcerts); - if(result) { - return result; - } - - mem = BIO_new(BIO_s_mem()); - - for(i = 0; i < numcerts; i++) { - ASN1_INTEGER *num; - X509 *x = sk_X509_value(sk, i); - EVP_PKEY *pubkey=NULL; - int j; - char *ptr; - CONST_ASN1_BIT_STRING ASN1_BIT_STRING *psig = NULL; - - X509_NAME_print_ex(mem, X509_get_subject_name(x), 0, XN_FLAG_ONELINE); - push_certinfo("Subject", i); - - X509_NAME_print_ex(mem, X509_get_issuer_name(x), 0, XN_FLAG_ONELINE); - push_certinfo("Issuer", i); - - BIO_printf(mem, "%lx", X509_get_version(x)); - push_certinfo("Version", i); - - num = X509_get_serialNumber(x); - if(num->type == V_ASN1_NEG_INTEGER) - BIO_puts(mem, "-"); - for(j = 0; j < num->length; j++) - BIO_printf(mem, "%02x", num->data[j]); - push_certinfo("Serial Number", i); - -#if defined(HAVE_X509_GET0_SIGNATURE) && defined(HAVE_X509_GET0_EXTENSIONS) - { - const X509_ALGOR *palg = NULL; - ASN1_STRING *a = ASN1_STRING_new(); - if(a) { - X509_get0_signature(&psig, &palg, x); - X509_signature_print(mem, palg, a); - ASN1_STRING_free(a); - - if(palg) { - i2a_ASN1_OBJECT(mem, palg->algorithm); - push_certinfo("Public Key Algorithm", i); - } - } - X509V3_ext(data, i, X509_get0_extensions(x)); - } -#else - { - /* before OpenSSL 1.0.2 */ - X509_CINF *cinf = x->cert_info; - - i2a_ASN1_OBJECT(mem, cinf->signature->algorithm); - push_certinfo("Signature Algorithm", i); - - i2a_ASN1_OBJECT(mem, cinf->key->algor->algorithm); - push_certinfo("Public Key Algorithm", i); - - X509V3_ext(data, i, cinf->extensions); - - psig = x->signature; - } -#endif - - ASN1_TIME_print(mem, X509_get0_notBefore(x)); - push_certinfo("Start date", i); - - ASN1_TIME_print(mem, X509_get0_notAfter(x)); - push_certinfo("Expire date", i); - - pubkey = X509_get_pubkey(x); - if(!pubkey) - infof(data, " Unable to load public key\n"); - else { - int pktype; -#ifdef HAVE_OPAQUE_EVP_PKEY - pktype = EVP_PKEY_id(pubkey); -#else - pktype = pubkey->type; -#endif - switch(pktype) { - case EVP_PKEY_RSA: - { - RSA *rsa; -#ifdef HAVE_OPAQUE_EVP_PKEY - rsa = EVP_PKEY_get0_RSA(pubkey); -#else - rsa = pubkey->pkey.rsa; -#endif - -#ifdef HAVE_OPAQUE_RSA_DSA_DH - { - const BIGNUM *n; - const BIGNUM *e; - const BIGNUM *d; - const BIGNUM *p; - const BIGNUM *q; - const BIGNUM *dmp1; - const BIGNUM *dmq1; - const BIGNUM *iqmp; - - RSA_get0_key(rsa, &n, &e, &d); - RSA_get0_factors(rsa, &p, &q); - RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); - BN_print(mem, n); - push_certinfo("RSA Public Key", i); - print_pubkey_BN(rsa, n, i); - print_pubkey_BN(rsa, e, i); - print_pubkey_BN(rsa, d, i); - print_pubkey_BN(rsa, p, i); - print_pubkey_BN(rsa, q, i); - print_pubkey_BN(rsa, dmp1, i); - print_pubkey_BN(rsa, dmq1, i); - print_pubkey_BN(rsa, iqmp, i); - } -#else - BIO_printf(mem, "%d", BN_num_bits(rsa->n)); - push_certinfo("RSA Public Key", i); - print_pubkey_BN(rsa, n, i); - print_pubkey_BN(rsa, e, i); - print_pubkey_BN(rsa, d, i); - print_pubkey_BN(rsa, p, i); - print_pubkey_BN(rsa, q, i); - print_pubkey_BN(rsa, dmp1, i); - print_pubkey_BN(rsa, dmq1, i); - print_pubkey_BN(rsa, iqmp, i); -#endif - - break; - } - case EVP_PKEY_DSA: - { - DSA *dsa; -#ifdef HAVE_OPAQUE_EVP_PKEY - dsa = EVP_PKEY_get0_DSA(pubkey); -#else - dsa = pubkey->pkey.dsa; -#endif -#ifdef HAVE_OPAQUE_RSA_DSA_DH - { - const BIGNUM *p; - const BIGNUM *q; - const BIGNUM *g; - const BIGNUM *priv_key; - const BIGNUM *pub_key; - - DSA_get0_pqg(dsa, &p, &q, &g); - DSA_get0_key(dsa, &pub_key, &priv_key); - - print_pubkey_BN(dsa, p, i); - print_pubkey_BN(dsa, q, i); - print_pubkey_BN(dsa, g, i); - print_pubkey_BN(dsa, priv_key, i); - print_pubkey_BN(dsa, pub_key, i); - } -#else - print_pubkey_BN(dsa, p, i); - print_pubkey_BN(dsa, q, i); - print_pubkey_BN(dsa, g, i); - print_pubkey_BN(dsa, priv_key, i); - print_pubkey_BN(dsa, pub_key, i); -#endif - break; - } - case EVP_PKEY_DH: - { - DH *dh; -#ifdef HAVE_OPAQUE_EVP_PKEY - dh = EVP_PKEY_get0_DH(pubkey); -#else - dh = pubkey->pkey.dh; -#endif -#ifdef HAVE_OPAQUE_RSA_DSA_DH - { - const BIGNUM *p; - const BIGNUM *q; - const BIGNUM *g; - const BIGNUM *priv_key; - const BIGNUM *pub_key; - DH_get0_pqg(dh, &p, &q, &g); - DH_get0_key(dh, &pub_key, &priv_key); - print_pubkey_BN(dh, p, i); - print_pubkey_BN(dh, q, i); - print_pubkey_BN(dh, g, i); - print_pubkey_BN(dh, priv_key, i); - print_pubkey_BN(dh, pub_key, i); - } -#else - print_pubkey_BN(dh, p, i); - print_pubkey_BN(dh, g, i); - print_pubkey_BN(dh, priv_key, i); - print_pubkey_BN(dh, pub_key, i); -#endif - break; - } -#if 0 - case EVP_PKEY_EC: /* symbol not present in OpenSSL 0.9.6 */ - /* left TODO */ - break; -#endif - } - EVP_PKEY_free(pubkey); - } - - if(psig) { - for(j = 0; j < psig->length; j++) - BIO_printf(mem, "%02x:", psig->data[j]); - push_certinfo("Signature", i); - } - - PEM_write_bio_X509(mem, x); - push_certinfo("Cert", i); - } - - BIO_free(mem); - - return CURLE_OK; -} - -/* - * Heavily modified from: - * https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning#OpenSSL - */ -static CURLcode pkp_pin_peer_pubkey(struct Curl_easy *data, X509* cert, - const char *pinnedpubkey) -{ - /* Scratch */ - int len1 = 0, len2 = 0; - unsigned char *buff1 = NULL, *temp = NULL; - - /* Result is returned to caller */ - CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; - - /* if a path wasn't specified, don't pin */ - if(!pinnedpubkey) - return CURLE_OK; - - if(!cert) - return result; - - do { - /* Begin Gyrations to get the subjectPublicKeyInfo */ - /* Thanks to Viktor Dukhovni on the OpenSSL mailing list */ - - /* https://groups.google.com/group/mailing.openssl.users/browse_thread - /thread/d61858dae102c6c7 */ - len1 = i2d_X509_PUBKEY(X509_get_X509_PUBKEY(cert), NULL); - if(len1 < 1) - break; /* failed */ - - /* https://www.openssl.org/docs/crypto/buffer.html */ - buff1 = temp = malloc(len1); - if(!buff1) - break; /* failed */ - - /* https://www.openssl.org/docs/crypto/d2i_X509.html */ - len2 = i2d_X509_PUBKEY(X509_get_X509_PUBKEY(cert), &temp); - - /* - * These checks are verifying we got back the same values as when we - * sized the buffer. It's pretty weak since they should always be the - * same. But it gives us something to test. - */ - if((len1 != len2) || !temp || ((temp - buff1) != len1)) - break; /* failed */ - - /* End Gyrations */ - - /* The one good exit point */ - result = Curl_pin_peer_pubkey(data, pinnedpubkey, buff1, len1); - } while(0); - - /* https://www.openssl.org/docs/crypto/buffer.html */ - if(buff1) - free(buff1); - - return result; -} - -/* - * Get the server cert, verify it and show it etc, only call failf() if the - * 'strict' argument is TRUE as otherwise all this is for informational - * purposes only! - * - * We check certificates to authenticate the server; otherwise we risk - * man-in-the-middle attack. - */ -static CURLcode servercert(struct connectdata *conn, - struct ssl_connect_data *connssl, - bool strict) -{ - CURLcode result = CURLE_OK; - int rc; - long lerr, len; - struct Curl_easy *data = conn->data; - X509 *issuer; - FILE *fp; - char *buffer = data->state.buffer; - const char *ptr; - long * const certverifyresult = SSL_IS_PROXY() ? - &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult; - BIO *mem = BIO_new(BIO_s_mem()); - - if(data->set.ssl.certinfo) - /* we've been asked to gather certificate info! */ - (void)get_cert_chain(conn, connssl); - - connssl->server_cert = SSL_get_peer_certificate(connssl->handle); - if(!connssl->server_cert) { - if(!strict) - return CURLE_OK; - - failf(data, "SSL: couldn't get peer certificate!"); - return CURLE_PEER_FAILED_VERIFICATION; - } - - infof(data, "%s certificate:\n", SSL_IS_PROXY() ? "Proxy" : "Server"); - - rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert), - buffer, BUFSIZE); - infof(data, " subject: %s\n", rc?"[NONE]":buffer); - - ASN1_TIME_print(mem, X509_get0_notBefore(connssl->server_cert)); - len = BIO_get_mem_data(mem, (char **) &ptr); - infof(data, " start date: %.*s\n", len, ptr); - rc = BIO_reset(mem); - - ASN1_TIME_print(mem, X509_get0_notAfter(connssl->server_cert)); - len = BIO_get_mem_data(mem, (char **) &ptr); - infof(data, " expire date: %.*s\n", len, ptr); - rc = BIO_reset(mem); - - BIO_free(mem); - - if(SSL_CONN_CONFIG(verifyhost)) { - result = verifyhost(conn, connssl->server_cert); - if(result) { - X509_free(connssl->server_cert); - connssl->server_cert = NULL; - return result; - } - } - - rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert), - buffer, BUFSIZE); - if(rc) { - if(strict) - failf(data, "SSL: couldn't get X509-issuer name!"); - result = CURLE_SSL_CONNECT_ERROR; - } - else { - infof(data, " issuer: %s\n", buffer); - - /* We could do all sorts of certificate verification stuff here before - deallocating the certificate. */ - - /* e.g. match issuer name with provided issuer certificate */ - if(SSL_SET_OPTION(issuercert)) { - fp = fopen(SSL_SET_OPTION(issuercert), FOPEN_READTEXT); - if(!fp) { - if(strict) - failf(data, "SSL: Unable to open issuer cert (%s)", - SSL_SET_OPTION(issuercert)); - X509_free(connssl->server_cert); - connssl->server_cert = NULL; - return CURLE_SSL_ISSUER_ERROR; - } - - issuer = PEM_read_X509(fp, NULL, ZERO_NULL, NULL); - if(!issuer) { - if(strict) - failf(data, "SSL: Unable to read issuer cert (%s)", - SSL_SET_OPTION(issuercert)); - X509_free(connssl->server_cert); - X509_free(issuer); - fclose(fp); - return CURLE_SSL_ISSUER_ERROR; - } - - fclose(fp); - - if(X509_check_issued(issuer, connssl->server_cert) != X509_V_OK) { - if(strict) - failf(data, "SSL: Certificate issuer check failed (%s)", - SSL_SET_OPTION(issuercert)); - X509_free(connssl->server_cert); - X509_free(issuer); - connssl->server_cert = NULL; - return CURLE_SSL_ISSUER_ERROR; - } - - infof(data, " SSL certificate issuer check ok (%s)\n", - SSL_SET_OPTION(issuercert)); - X509_free(issuer); - } - - lerr = *certverifyresult = SSL_get_verify_result(connssl->handle); - - if(*certverifyresult != X509_V_OK) { - if(SSL_CONN_CONFIG(verifypeer)) { - /* We probably never reach this, because SSL_connect() will fail - and we return earlier if verifypeer is set? */ - if(strict) - failf(data, "SSL certificate verify result: %s (%ld)", - X509_verify_cert_error_string(lerr), lerr); - result = CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, " SSL certificate verify result: %s (%ld)," - " continuing anyway.\n", - X509_verify_cert_error_string(lerr), lerr); - } - else - infof(data, " SSL certificate verify ok.\n"); - } - -#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \ - !defined(OPENSSL_NO_OCSP) - if(SSL_CONN_CONFIG(verifystatus)) { - result = verifystatus(conn, connssl); - if(result) { - X509_free(connssl->server_cert); - connssl->server_cert = NULL; - return result; - } - } -#endif - - if(!strict) - /* when not strict, we don't bother about the verify cert problems */ - result = CURLE_OK; - - ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - if(!result && ptr) { - result = pkp_pin_peer_pubkey(data, connssl->server_cert, ptr); - if(result) - failf(data, "SSL: public key does not match pinned public key!"); - } - - X509_free(connssl->server_cert); - connssl->server_cert = NULL; - connssl->connecting_state = ssl_connect_done; - - return result; -} - -static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - - if(data->set.general_ssl.sessionid) { - bool incache; - SSL_SESSION *our_ssl_sessionid; - void *old_ssl_sessionid = NULL; - - our_ssl_sessionid = SSL_get1_session(connssl->handle); - - /* SSL_get1_session() will increment the reference count and the session - will stay in memory until explicitly freed with SSL_SESSION_free(3), - regardless of its state. */ - - Curl_ssl_sessionid_lock(conn); - incache = !(Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, - sockindex)); - if(incache) { - if(old_ssl_sessionid != our_ssl_sessionid) { - infof(data, "old SSL session ID is stale, removing\n"); - Curl_ssl_delsessionid(conn, old_ssl_sessionid); - incache = FALSE; - } - } - - if(!incache) { - result = Curl_ssl_addsessionid(conn, our_ssl_sessionid, - 0 /* unknown size */, sockindex); - if(result) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "failed to store ssl session"); - return result; - } - } - else { - /* Session was incache, so refcount already incremented earlier. - * Avoid further increments with each SSL_get1_session() call. - * This does not free the session as refcount remains > 0 - */ - SSL_SESSION_free(our_ssl_sessionid); - } - Curl_ssl_sessionid_unlock(conn); - } - - /* - * We check certificates to authenticate the server; otherwise we risk - * man-in-the-middle attack; NEVERTHELESS, if we're told explicitly not to - * verify the peer ignore faults and failures from the server cert - * operations. - */ - - result = servercert(conn, connssl, (SSL_CONN_CONFIG(verifypeer) || - SSL_CONN_CONFIG(verifyhost))); - - if(!result) - connssl->connecting_state = ssl_connect_done; - - return result; -} - -static Curl_recv ossl_recv; -static Curl_send ossl_send; - -static CURLcode ossl_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - curl_socket_t sockfd = conn->sock[sockindex]; - time_t timeout_ms; - int what; - - /* check if the connection has already been established */ - if(ssl_connection_complete == connssl->state) { - *done = TRUE; - return CURLE_OK; - } - - if(ssl_connect_1 == connssl->connecting_state) { - /* Find out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - result = ossl_connect_step1(conn, sockindex); - if(result) - return result; - } - - while(ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state) { - - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading || - connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking?0:timeout_ms); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) { - *done = FALSE; - return CURLE_OK; - } - else { - /* timeout */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - /* Run transaction, and return to the caller if it failed or if this - * connection is done nonblocking and this loop would execute again. This - * permits the owner of a multi handle to abort a connection attempt - * before step2 has completed while ensuring that a client using select() - * or epoll() will always have a valid fdset to wait on. - */ - result = ossl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; - - } /* repeat step2 until all transactions are done. */ - - if(ssl_connect_3 == connssl->connecting_state) { - result = ossl_connect_step3(conn, sockindex); - if(result) - return result; - } - - if(ssl_connect_done == connssl->connecting_state) { - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = ossl_recv; - conn->send[sockindex] = ossl_send; - *done = TRUE; - } - else - *done = FALSE; - - /* Reset our connect state machine */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - -CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - return ossl_connect_common(conn, sockindex, TRUE, done); -} - -CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex) -{ - CURLcode result; - bool done = FALSE; - - result = ossl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -bool Curl_ossl_data_pending(const struct connectdata *conn, int connindex) -{ - if(conn->ssl[connindex].handle) - /* SSL is in use */ - return (0 != SSL_pending(conn->ssl[connindex].handle) || - (conn->proxy_ssl[connindex].handle && - 0 != SSL_pending(conn->proxy_ssl[connindex].handle))) ? - TRUE : FALSE; - else - return FALSE; -} - -static ssize_t ossl_send(struct connectdata *conn, - int sockindex, - const void *mem, - size_t len, - CURLcode *curlcode) -{ - /* SSL_write() is said to return 'int' while write() and send() returns - 'size_t' */ - int err; - char error_buffer[256]; /* OpenSSL documents that this must be at least 256 - bytes long. */ - unsigned long sslerror; - int memlen; - int rc; - - ERR_clear_error(); - - memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len; - rc = SSL_write(conn->ssl[sockindex].handle, mem, memlen); - - if(rc <= 0) { - err = SSL_get_error(conn->ssl[sockindex].handle, rc); - - switch(err) { - case SSL_ERROR_WANT_READ: - case SSL_ERROR_WANT_WRITE: - /* The operation did not complete; the same TLS/SSL I/O function - should be called again later. This is basically an EWOULDBLOCK - equivalent. */ - *curlcode = CURLE_AGAIN; - return -1; - case SSL_ERROR_SYSCALL: - failf(conn->data, "SSL_write() returned SYSCALL, errno = %d", - SOCKERRNO); - *curlcode = CURLE_SEND_ERROR; - return -1; - case SSL_ERROR_SSL: - /* A failure in the SSL library occurred, usually a protocol error. - The OpenSSL error queue contains more information on the error. */ - sslerror = ERR_get_error(); - if(ERR_GET_LIB(sslerror) == ERR_LIB_SSL && - ERR_GET_REASON(sslerror) == SSL_R_BIO_NOT_SET && - conn->ssl[sockindex].state == ssl_connection_complete && - conn->proxy_ssl[sockindex].state == ssl_connection_complete) { - char ver[120]; - Curl_ossl_version(ver, 120); - failf(conn->data, "Error: %s does not support double SSL tunneling.", - ver); - } - else - failf(conn->data, "SSL_write() error: %s", - ossl_strerror(sslerror, error_buffer, sizeof(error_buffer))); - *curlcode = CURLE_SEND_ERROR; - return -1; - } - /* a true error */ - failf(conn->data, "SSL_write() return error %d", err); - *curlcode = CURLE_SEND_ERROR; - return -1; - } - *curlcode = CURLE_OK; - return (ssize_t)rc; /* number of bytes */ -} - -static ssize_t ossl_recv(struct connectdata *conn, /* connection data */ - int num, /* socketindex */ - char *buf, /* store read data here */ - size_t buffersize, /* max amount to read */ - CURLcode *curlcode) -{ - char error_buffer[256]; /* OpenSSL documents that this must be at - least 256 bytes long. */ - unsigned long sslerror; - ssize_t nread; - int buffsize; - - ERR_clear_error(); - - buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize; - nread = (ssize_t)SSL_read(conn->ssl[num].handle, buf, buffsize); - if(nread <= 0) { - /* failed SSL_read */ - int err = SSL_get_error(conn->ssl[num].handle, (int)nread); - - switch(err) { - case SSL_ERROR_NONE: /* this is not an error */ - case SSL_ERROR_ZERO_RETURN: /* no more data */ - break; - case SSL_ERROR_WANT_READ: - case SSL_ERROR_WANT_WRITE: - /* there's data pending, re-invoke SSL_read() */ - *curlcode = CURLE_AGAIN; - return -1; - default: - /* openssl/ssl.h for SSL_ERROR_SYSCALL says "look at error stack/return - value/errno" */ - /* https://www.openssl.org/docs/crypto/ERR_get_error.html */ - sslerror = ERR_get_error(); - if((nread < 0) || sslerror) { - /* If the return code was negative or there actually is an error in the - queue */ - failf(conn->data, "SSL read: %s, errno %d", - ossl_strerror(sslerror, error_buffer, sizeof(error_buffer)), - SOCKERRNO); - *curlcode = CURLE_RECV_ERROR; - return -1; - } - } - } - return nread; -} - -size_t Curl_ossl_version(char *buffer, size_t size) -{ -#ifdef OPENSSL_IS_BORINGSSL - return snprintf(buffer, size, OSSL_PACKAGE); -#else /* OPENSSL_IS_BORINGSSL */ - char sub[3]; - unsigned long ssleay_value; - sub[2]='\0'; - sub[1]='\0'; - ssleay_value=OpenSSL_version_num(); - if(ssleay_value < 0x906000) { - ssleay_value=SSLEAY_VERSION_NUMBER; - sub[0]='\0'; - } - else { - if(ssleay_value&0xff0) { - int minor_ver = (ssleay_value >> 4) & 0xff; - if(minor_ver > 26) { - /* handle extended version introduced for 0.9.8za */ - sub[1] = (char) ((minor_ver - 1) % 26 + 'a' + 1); - sub[0] = 'z'; - } - else { - sub[0] = (char) (minor_ver + 'a' - 1); - } - } - else - sub[0]='\0'; - } - - return snprintf(buffer, size, "%s/%lx.%lx.%lx%s", - OSSL_PACKAGE, - (ssleay_value>>28)&0xf, - (ssleay_value>>20)&0xff, - (ssleay_value>>12)&0xff, - sub); -#endif /* OPENSSL_IS_BORINGSSL */ -} - -/* can be called with data == NULL */ -CURLcode Curl_ossl_random(struct Curl_easy *data, unsigned char *entropy, - size_t length) -{ - int rc; - if(data) { - if(Curl_ossl_seed(data)) /* Initiate the seed if not already done */ - return CURLE_FAILED_INIT; /* couldn't seed for some reason */ - } - else { - if(!rand_enough()) - return CURLE_FAILED_INIT; - } - /* RAND_bytes() returns 1 on success, 0 otherwise. */ - rc = RAND_bytes(entropy, curlx_uztosi(length)); - return (rc == 1 ? CURLE_OK : CURLE_FAILED_INIT); -} - -void Curl_ossl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum /* output */, - size_t unused) -{ - MD5_CTX MD5pw; - (void)unused; - MD5_Init(&MD5pw); - MD5_Update(&MD5pw, tmp, tmplen); - MD5_Final(md5sum, &MD5pw); -} - -#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) -void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum /* output */, - size_t unused) -{ - SHA256_CTX SHA256pw; - (void)unused; - SHA256_Init(&SHA256pw); - SHA256_Update(&SHA256pw, tmp, tmplen); - SHA256_Final(sha256sum, &SHA256pw); -} -#endif - -bool Curl_ossl_cert_status_request(void) -{ -#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \ - !defined(OPENSSL_NO_OCSP) - return TRUE; -#else - return FALSE; -#endif -} -#endif /* USE_OPENSSL */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/openssl.h b/build/premake/premake5/contrib/curl/lib/vtls/openssl.h deleted file mode 100644 index b9648d5147..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/openssl.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef HEADER_CURL_SSLUSE_H -#define HEADER_CURL_SSLUSE_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#ifdef USE_OPENSSL -/* - * This header should only be needed to get included by vtls.c and openssl.c - */ - -#include "urldata.h" - -CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -/* close a SSL connection */ -void Curl_ossl_close(struct connectdata *conn, int sockindex); - -/* tell OpenSSL to close down all open information regarding connections (and - thus session ID caching etc) */ -void Curl_ossl_close_all(struct Curl_easy *data); - -/* Sets an OpenSSL engine */ -CURLcode Curl_ossl_set_engine(struct Curl_easy *data, const char *engine); - -/* function provided for the generic SSL-layer, called when a session id - should be freed */ -void Curl_ossl_session_free(void *ptr); - -/* Sets engine as default for all SSL operations */ -CURLcode Curl_ossl_set_engine_default(struct Curl_easy *data); - -/* Build list of OpenSSL engines */ -struct curl_slist *Curl_ossl_engines_list(struct Curl_easy *data); - -int Curl_ossl_init(void); -void Curl_ossl_cleanup(void); - -size_t Curl_ossl_version(char *buffer, size_t size); -int Curl_ossl_check_cxn(struct connectdata *cxn); -int Curl_ossl_shutdown(struct connectdata *conn, int sockindex); -bool Curl_ossl_data_pending(const struct connectdata *conn, - int connindex); - -/* return 0 if a find random is filled in */ -CURLcode Curl_ossl_random(struct Curl_easy *data, unsigned char *entropy, - size_t length); -void Curl_ossl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum /* output */, - size_t unused); -void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *sha256sum /* output */, - size_t unused); - -bool Curl_ossl_cert_status_request(void); - -/* Support HTTPS-proxy */ -#define HTTPS_PROXY_SUPPORT 1 - -/* Set the API backend definition to OpenSSL */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* this backend supports CURLOPT_SSL_CTX_* */ -#define have_curlssl_ssl_ctx 1 - -/* this backend supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for OpenSSL */ -#define curlssl_init Curl_ossl_init -#define curlssl_cleanup Curl_ossl_cleanup -#define curlssl_connect Curl_ossl_connect -#define curlssl_connect_nonblocking Curl_ossl_connect_nonblocking -#define curlssl_session_free(x) Curl_ossl_session_free(x) -#define curlssl_close_all Curl_ossl_close_all -#define curlssl_close Curl_ossl_close -#define curlssl_shutdown(x,y) Curl_ossl_shutdown(x,y) -#define curlssl_set_engine(x,y) Curl_ossl_set_engine(x,y) -#define curlssl_set_engine_default(x) Curl_ossl_set_engine_default(x) -#define curlssl_engines_list(x) Curl_ossl_engines_list(x) -#define curlssl_version Curl_ossl_version -#define curlssl_check_cxn Curl_ossl_check_cxn -#define curlssl_data_pending(x,y) Curl_ossl_data_pending(x,y) -#define curlssl_random(x,y,z) Curl_ossl_random(x,y,z) -#define curlssl_md5sum(a,b,c,d) Curl_ossl_md5sum(a,b,c,d) -#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) -#define curlssl_sha256sum(a,b,c,d) Curl_ossl_sha256sum(a,b,c,d) -#endif -#define curlssl_cert_status_request() Curl_ossl_cert_status_request() - -#define DEFAULT_CIPHER_SELECTION \ - "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH" - -#endif /* USE_OPENSSL */ -#endif /* HEADER_CURL_SSLUSE_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/polarssl.c b/build/premake/premake5/contrib/curl/lib/vtls/polarssl.c deleted file mode 100644 index e5346ce3dc..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/polarssl.c +++ /dev/null @@ -1,825 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * Copyright (C) 2010 - 2011, Hoi-Ho Chan, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all PolarSSL-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - * - */ - -#include "curl_setup.h" - -#ifdef USE_POLARSSL - -#include -#include -#include -#include -#include -#include - -#if POLARSSL_VERSION_NUMBER < 0x01030000 -#error too old PolarSSL -#endif - -#include -#include -#include - -#include "urldata.h" -#include "sendf.h" -#include "inet_pton.h" -#include "polarssl.h" -#include "vtls.h" -#include "parsedate.h" -#include "connect.h" /* for the connect timeout */ -#include "select.h" -#include "strcase.h" -#include "polarssl_threadlock.h" -#include "curl_printf.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* See https://tls.mbed.org/discussions/generic/ - howto-determine-exact-buffer-len-for-mbedtls_pk_write_pubkey_der -*/ -#define RSA_PUB_DER_MAX_BYTES (38 + 2 * POLARSSL_MPI_MAX_SIZE) -#define ECP_PUB_DER_MAX_BYTES (30 + 2 * POLARSSL_ECP_MAX_BYTES) - -#define PUB_DER_MAX_BYTES (RSA_PUB_DER_MAX_BYTES > ECP_PUB_DER_MAX_BYTES ? \ - RSA_PUB_DER_MAX_BYTES : ECP_PUB_DER_MAX_BYTES) - -/* apply threading? */ -#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) -#define THREADING_SUPPORT -#endif - -#ifndef POLARSSL_ERROR_C -#define error_strerror(x,y,z) -#endif /* POLARSSL_ERROR_C */ - - -#if defined(THREADING_SUPPORT) -static entropy_context entropy; - -static int entropy_init_initialized = 0; - -/* start of entropy_init_mutex() */ -static void entropy_init_mutex(entropy_context *ctx) -{ - /* lock 0 = entropy_init_mutex() */ - Curl_polarsslthreadlock_lock_function(0); - if(entropy_init_initialized == 0) { - entropy_init(ctx); - entropy_init_initialized = 1; - } - Curl_polarsslthreadlock_unlock_function(0); -} -/* end of entropy_init_mutex() */ - -/* start of entropy_func_mutex() */ -static int entropy_func_mutex(void *data, unsigned char *output, size_t len) -{ - int ret; - /* lock 1 = entropy_func_mutex() */ - Curl_polarsslthreadlock_lock_function(1); - ret = entropy_func(data, output, len); - Curl_polarsslthreadlock_unlock_function(1); - - return ret; -} -/* end of entropy_func_mutex() */ - -#endif /* THREADING_SUPPORT */ - -/* Define this to enable lots of debugging for PolarSSL */ -#undef POLARSSL_DEBUG - -#ifdef POLARSSL_DEBUG -static void polarssl_debug(void *context, int level, const char *line) -{ - struct Curl_easy *data = NULL; - - if(!context) - return; - - data = (struct Curl_easy *)context; - - infof(data, "%s", line); - (void) level; -} -#else -#endif - -/* ALPN for http2? */ -#ifdef POLARSSL_SSL_ALPN -# define HAS_ALPN -#endif - -static Curl_recv polarssl_recv; -static Curl_send polarssl_send; - - -static CURLcode -polarssl_connect_step1(struct connectdata *conn, - int sockindex) -{ - struct Curl_easy *data = conn->data; - struct ssl_connect_data* connssl = &conn->ssl[sockindex]; - const char *capath = SSL_CONN_CONFIG(CApath); - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; - int ret = -1; - char errorbuf[128]; - errorbuf[0]=0; - - /* PolarSSL only supports SSLv3 and TLSv1 */ - if(SSL_CONN_CONFIG(version) == CURL_SSLVERSION_SSLv2) { - failf(data, "PolarSSL does not support SSLv2"); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef THREADING_SUPPORT - entropy_init_mutex(&entropy); - - if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func_mutex, &entropy, - NULL, 0)) != 0) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n", - -ret, errorbuf); - } -#else - entropy_init(&connssl->entropy); - - if((ret = ctr_drbg_init(&connssl->ctr_drbg, entropy_func, &connssl->entropy, - NULL, 0)) != 0) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Failed - PolarSSL: ctr_drbg_init returned (-0x%04X) %s\n", - -ret, errorbuf); - } -#endif /* THREADING_SUPPORT */ - - /* Load the trusted CA */ - memset(&connssl->cacert, 0, sizeof(x509_crt)); - - if(SSL_CONN_CONFIG(CAfile)) { - ret = x509_crt_parse_file(&connssl->cacert, - SSL_CONN_CONFIG(CAfile)); - - if(ret<0) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Error reading ca cert file %s - PolarSSL: (-0x%04X) %s", - SSL_CONN_CONFIG(CAfile), -ret, errorbuf); - - if(SSL_CONN_CONFIG(verifypeer)) - return CURLE_SSL_CACERT_BADFILE; - } - } - - if(capath) { - ret = x509_crt_parse_path(&connssl->cacert, capath); - - if(ret<0) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Error reading ca cert path %s - PolarSSL: (-0x%04X) %s", - capath, -ret, errorbuf); - - if(SSL_CONN_CONFIG(verifypeer)) - return CURLE_SSL_CACERT_BADFILE; - } - } - - /* Load the client certificate */ - memset(&connssl->clicert, 0, sizeof(x509_crt)); - - if(SSL_SET_OPTION(cert)) { - ret = x509_crt_parse_file(&connssl->clicert, - SSL_SET_OPTION(cert)); - - if(ret) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Error reading client cert file %s - PolarSSL: (-0x%04X) %s", - SSL_SET_OPTION(cert), -ret, errorbuf); - - return CURLE_SSL_CERTPROBLEM; - } - } - - /* Load the client private key */ - if(SSL_SET_OPTION(key)) { - pk_context pk; - pk_init(&pk); - ret = pk_parse_keyfile(&pk, SSL_SET_OPTION(key), - SSL_SET_OPTION(key_passwd)); - if(ret == 0 && !pk_can_do(&pk, POLARSSL_PK_RSA)) - ret = POLARSSL_ERR_PK_TYPE_MISMATCH; - if(ret == 0) - rsa_copy(&connssl->rsa, pk_rsa(pk)); - else - rsa_free(&connssl->rsa); - pk_free(&pk); - - if(ret) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Error reading private key %s - PolarSSL: (-0x%04X) %s", - SSL_SET_OPTION(key), -ret, errorbuf); - - return CURLE_SSL_CERTPROBLEM; - } - } - - /* Load the CRL */ - memset(&connssl->crl, 0, sizeof(x509_crl)); - - if(SSL_SET_OPTION(CRLfile)) { - ret = x509_crl_parse_file(&connssl->crl, - SSL_SET_OPTION(CRLfile)); - - if(ret) { - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "Error reading CRL file %s - PolarSSL: (-0x%04X) %s", - SSL_SET_OPTION(CRLfile), -ret, errorbuf); - - return CURLE_SSL_CRL_BADFILE; - } - } - - infof(data, "PolarSSL: Connecting to %s:%d\n", hostname, port); - - if(ssl_init(&connssl->ssl)) { - failf(data, "PolarSSL: ssl_init failed"); - return CURLE_SSL_CONNECT_ERROR; - } - - switch(SSL_CONN_CONFIG(version)) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_1); - break; - case CURL_SSLVERSION_SSLv3: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_0); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_0); - infof(data, "PolarSSL: Forced min. SSL Version to be SSLv3\n"); - break; - case CURL_SSLVERSION_TLSv1_0: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_1); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_1); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.0\n"); - break; - case CURL_SSLVERSION_TLSv1_1: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_2); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_2); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.1\n"); - break; - case CURL_SSLVERSION_TLSv1_2: - ssl_set_min_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_3); - ssl_set_max_version(&connssl->ssl, SSL_MAJOR_VERSION_3, - SSL_MINOR_VERSION_3); - infof(data, "PolarSSL: Forced min. SSL Version to be TLS 1.2\n"); - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "PolarSSL: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - ssl_set_endpoint(&connssl->ssl, SSL_IS_CLIENT); - ssl_set_authmode(&connssl->ssl, SSL_VERIFY_OPTIONAL); - - ssl_set_rng(&connssl->ssl, ctr_drbg_random, - &connssl->ctr_drbg); - ssl_set_bio(&connssl->ssl, - net_recv, &conn->sock[sockindex], - net_send, &conn->sock[sockindex]); - - ssl_set_ciphersuites(&connssl->ssl, ssl_list_ciphersuites()); - - /* Check if there's a cached ID we can/should use here! */ - if(data->set.general_ssl.sessionid) { - void *old_session = NULL; - - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &old_session, NULL, sockindex)) { - ret = ssl_set_session(&connssl->ssl, old_session); - if(ret) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "ssl_set_session returned -0x%x", -ret); - return CURLE_SSL_CONNECT_ERROR; - } - infof(data, "PolarSSL re-using session\n"); - } - Curl_ssl_sessionid_unlock(conn); - } - - ssl_set_ca_chain(&connssl->ssl, - &connssl->cacert, - &connssl->crl, - hostname); - - ssl_set_own_cert_rsa(&connssl->ssl, - &connssl->clicert, &connssl->rsa); - - if(ssl_set_hostname(&connssl->ssl, hostname)) { - /* ssl_set_hostname() sets the name to use in CN/SAN checks *and* the name - to set in the SNI extension. So even if curl connects to a host - specified as an IP address, this function must be used. */ - failf(data, "couldn't set hostname in PolarSSL"); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - static const char *protocols[3]; - int cur = 0; - -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { - protocols[cur++] = NGHTTP2_PROTO_VERSION_ID; - infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID); - } -#endif - - protocols[cur++] = ALPN_HTTP_1_1; - infof(data, "ALPN, offering %s\n", ALPN_HTTP_1_1); - - protocols[cur] = NULL; - - ssl_set_alpn_protocols(&connssl->ssl, protocols); - } -#endif - -#ifdef POLARSSL_DEBUG - ssl_set_dbg(&connssl->ssl, polarssl_debug, data); -#endif - - connssl->connecting_state = ssl_connect_2; - - return CURLE_OK; -} - -static CURLcode -polarssl_connect_step2(struct connectdata *conn, - int sockindex) -{ - int ret; - struct Curl_easy *data = conn->data; - struct ssl_connect_data* connssl = &conn->ssl[sockindex]; - char buffer[1024]; - const char * const pinnedpubkey = SSL_IS_PROXY() ? - data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] : - data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]; - - - char errorbuf[128]; - errorbuf[0] = 0; - - conn->recv[sockindex] = polarssl_recv; - conn->send[sockindex] = polarssl_send; - - ret = ssl_handshake(&connssl->ssl); - - switch(ret) { - case 0: - break; - - case POLARSSL_ERR_NET_WANT_READ: - connssl->connecting_state = ssl_connect_2_reading; - return CURLE_OK; - - case POLARSSL_ERR_NET_WANT_WRITE: - connssl->connecting_state = ssl_connect_2_writing; - return CURLE_OK; - - default: - error_strerror(ret, errorbuf, sizeof(errorbuf)); - failf(data, "ssl_handshake returned - PolarSSL: (-0x%04X) %s", - -ret, errorbuf); - return CURLE_SSL_CONNECT_ERROR; - } - - infof(data, "PolarSSL: Handshake complete, cipher is %s\n", - ssl_get_ciphersuite(&conn->ssl[sockindex].ssl) ); - - ret = ssl_get_verify_result(&conn->ssl[sockindex].ssl); - - if(ret && SSL_CONN_CONFIG(verifypeer)) { - if(ret & BADCERT_EXPIRED) - failf(data, "Cert verify failed: BADCERT_EXPIRED"); - - if(ret & BADCERT_REVOKED) { - failf(data, "Cert verify failed: BADCERT_REVOKED"); - return CURLE_SSL_CACERT; - } - - if(ret & BADCERT_CN_MISMATCH) - failf(data, "Cert verify failed: BADCERT_CN_MISMATCH"); - - if(ret & BADCERT_NOT_TRUSTED) - failf(data, "Cert verify failed: BADCERT_NOT_TRUSTED"); - - return CURLE_PEER_FAILED_VERIFICATION; - } - - if(ssl_get_peer_cert(&(connssl->ssl))) { - /* If the session was resumed, there will be no peer certs */ - memset(buffer, 0, sizeof(buffer)); - - if(x509_crt_info(buffer, sizeof(buffer), (char *)"* ", - ssl_get_peer_cert(&(connssl->ssl))) != -1) - infof(data, "Dumping cert info:\n%s\n", buffer); - } - - /* adapted from mbedtls.c */ - if(pinnedpubkey) { - int size; - CURLcode result; - x509_crt *p; - unsigned char pubkey[PUB_DER_MAX_BYTES]; - const x509_crt *peercert; - - peercert = ssl_get_peer_cert(&connssl->ssl); - - if(!peercert || !peercert->raw.p || !peercert->raw.len) { - failf(data, "Failed due to missing peer certificate"); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - p = calloc(1, sizeof(*p)); - - if(!p) - return CURLE_OUT_OF_MEMORY; - - x509_crt_init(p); - - /* Make a copy of our const peercert because pk_write_pubkey_der - needs a non-const key, for now. - https://github.com/ARMmbed/mbedtls/issues/396 */ - if(x509_crt_parse_der(p, peercert->raw.p, peercert->raw.len)) { - failf(data, "Failed copying peer certificate"); - x509_crt_free(p); - free(p); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - size = pk_write_pubkey_der(&p->pk, pubkey, PUB_DER_MAX_BYTES); - - if(size <= 0) { - failf(data, "Failed copying public key from peer certificate"); - x509_crt_free(p); - free(p); - return CURLE_SSL_PINNEDPUBKEYNOTMATCH; - } - - /* pk_write_pubkey_der writes data at the end of the buffer. */ - result = Curl_pin_peer_pubkey(data, - pinnedpubkey, - &pubkey[PUB_DER_MAX_BYTES - size], size); - if(result) { - x509_crt_free(p); - free(p); - return result; - } - - x509_crt_free(p); - free(p); - } - -#ifdef HAS_ALPN - if(conn->bits.tls_enable_alpn) { - const char *next_protocol = ssl_get_alpn_protocol(&connssl->ssl); - - if(next_protocol != NULL) { - infof(data, "ALPN, server accepted to use %s\n", next_protocol); - -#ifdef USE_NGHTTP2 - if(!strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID, - NGHTTP2_PROTO_VERSION_ID_LEN)) { - conn->negnpn = CURL_HTTP_VERSION_2; - } - else -#endif - if(!strncmp(next_protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) { - conn->negnpn = CURL_HTTP_VERSION_1_1; - } - } - else - infof(data, "ALPN, server did not agree to a protocol\n"); - } -#endif - - connssl->connecting_state = ssl_connect_3; - infof(data, "SSL connected\n"); - - return CURLE_OK; -} - -static CURLcode -polarssl_connect_step3(struct connectdata *conn, - int sockindex) -{ - CURLcode retcode = CURLE_OK; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - struct Curl_easy *data = conn->data; - - DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - - if(data->set.general_ssl.sessionid) { - int ret; - ssl_session *our_ssl_sessionid; - void *old_ssl_sessionid = NULL; - - our_ssl_sessionid = malloc(sizeof(ssl_session)); - if(!our_ssl_sessionid) - return CURLE_OUT_OF_MEMORY; - - ssl_session_init(our_ssl_sessionid); - - ret = ssl_get_session(&connssl->ssl, our_ssl_sessionid); - if(ret) { - failf(data, "ssl_get_session returned -0x%x", -ret); - return CURLE_SSL_CONNECT_ERROR; - } - - /* If there's already a matching session in the cache, delete it */ - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, &old_ssl_sessionid, NULL, sockindex)) - Curl_ssl_delsessionid(conn, old_ssl_sessionid); - - retcode = Curl_ssl_addsessionid(conn, our_ssl_sessionid, 0, sockindex); - Curl_ssl_sessionid_unlock(conn); - if(retcode) { - free(our_ssl_sessionid); - failf(data, "failed to store ssl session"); - return retcode; - } - } - - connssl->connecting_state = ssl_connect_done; - - return CURLE_OK; -} - -static ssize_t polarssl_send(struct connectdata *conn, - int sockindex, - const void *mem, - size_t len, - CURLcode *curlcode) -{ - int ret = -1; - - ret = ssl_write(&conn->ssl[sockindex].ssl, - (unsigned char *)mem, len); - - if(ret < 0) { - *curlcode = (ret == POLARSSL_ERR_NET_WANT_WRITE) ? - CURLE_AGAIN : CURLE_SEND_ERROR; - ret = -1; - } - - return ret; -} - -void Curl_polarssl_close(struct connectdata *conn, int sockindex) -{ - rsa_free(&conn->ssl[sockindex].rsa); - x509_crt_free(&conn->ssl[sockindex].clicert); - x509_crt_free(&conn->ssl[sockindex].cacert); - x509_crl_free(&conn->ssl[sockindex].crl); - ssl_free(&conn->ssl[sockindex].ssl); -} - -static ssize_t polarssl_recv(struct connectdata *conn, - int num, - char *buf, - size_t buffersize, - CURLcode *curlcode) -{ - int ret = -1; - ssize_t len = -1; - - memset(buf, 0, buffersize); - ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize); - - if(ret <= 0) { - if(ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY) - return 0; - - *curlcode = (ret == POLARSSL_ERR_NET_WANT_READ) ? - CURLE_AGAIN : CURLE_RECV_ERROR; - return -1; - } - - len = ret; - - return len; -} - -void Curl_polarssl_session_free(void *ptr) -{ - ssl_session_free(ptr); - free(ptr); -} - -/* 1.3.10 was the first rebranded version. All new releases (in 1.3 branch and - higher) will be mbed TLS branded.. */ - -size_t Curl_polarssl_version(char *buffer, size_t size) -{ - unsigned int version = version_get_number(); - return snprintf(buffer, size, "%s/%d.%d.%d", - version >= 0x01030A00?"mbedTLS":"PolarSSL", - version>>24, (version>>16)&0xff, (version>>8)&0xff); -} - -static CURLcode -polarssl_connect_common(struct connectdata *conn, - int sockindex, - bool nonblocking, - bool *done) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - curl_socket_t sockfd = conn->sock[sockindex]; - long timeout_ms; - int what; - - /* check if the connection has already been established */ - if(ssl_connection_complete == connssl->state) { - *done = TRUE; - return CURLE_OK; - } - - if(ssl_connect_1 == connssl->connecting_state) { - /* Find out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - result = polarssl_connect_step1(conn, sockindex); - if(result) - return result; - } - - while(ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state) { - - /* check allowed time left */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading || - connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading== - connssl->connecting_state?sockfd:CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking?0:timeout_ms); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) { - *done = FALSE; - return CURLE_OK; - } - else { - /* timeout */ - failf(data, "SSL connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - /* Run transaction, and return to the caller if it failed or if - * this connection is part of a multi handle and this loop would - * execute again. This permits the owner of a multi handle to - * abort a connection attempt before step2 has completed while - * ensuring that a client using select() or epoll() will always - * have a valid fdset to wait on. - */ - result = polarssl_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; - - } /* repeat step2 until all transactions are done. */ - - if(ssl_connect_3 == connssl->connecting_state) { - result = polarssl_connect_step3(conn, sockindex); - if(result) - return result; - } - - if(ssl_connect_done == connssl->connecting_state) { - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = polarssl_recv; - conn->send[sockindex] = polarssl_send; - *done = TRUE; - } - else - *done = FALSE; - - /* Reset our connect state machine */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - -CURLcode -Curl_polarssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done) -{ - return polarssl_connect_common(conn, sockindex, TRUE, done); -} - - -CURLcode -Curl_polarssl_connect(struct connectdata *conn, - int sockindex) -{ - CURLcode result; - bool done = FALSE; - - result = polarssl_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -/* - * return 0 error initializing SSL - * return 1 SSL initialized successfully - */ -int Curl_polarssl_init(void) -{ - return Curl_polarsslthreadlock_thread_setup(); -} - -void Curl_polarssl_cleanup(void) -{ - (void)Curl_polarsslthreadlock_thread_cleanup(); -} - - -int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex) -{ - return ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0; -} - -#endif /* USE_POLARSSL */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/polarssl.h b/build/premake/premake5/contrib/curl/lib/vtls/polarssl.h deleted file mode 100644 index 47af7b4173..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/polarssl.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef HEADER_CURL_POLARSSL_H -#define HEADER_CURL_POLARSSL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. - * Copyright (C) 2010, Hoi-Ho Chan, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef USE_POLARSSL - -#include - -/* Called on first use PolarSSL, setup threading if supported */ -int Curl_polarssl_init(void); -void Curl_polarssl_cleanup(void); -int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex); - - -CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - - /* close a SSL connection */ -void Curl_polarssl_close(struct connectdata *conn, int sockindex); - -void Curl_polarssl_session_free(void *ptr); -size_t Curl_polarssl_version(char *buffer, size_t size); -int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex); - -/* Set the API backend definition to PolarSSL */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL - -/* this backend supports the CAPATH option */ -#define have_curlssl_ca_path 1 - -/* this backends supports CURLOPT_PINNEDPUBLICKEY */ -#define have_curlssl_pinnedpubkey 1 - -/* API setup for PolarSSL */ -#define curlssl_init() Curl_polarssl_init() -#define curlssl_cleanup() Curl_polarssl_cleanup() -#define curlssl_connect Curl_polarssl_connect -#define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking -#define curlssl_session_free(x) Curl_polarssl_session_free(x) -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_polarssl_close -#define curlssl_shutdown(x,y) 0 -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_polarssl_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) Curl_polarssl_data_pending(x, y) -#define curlssl_sha256sum(a,b,c,d) sha256(a,b,c,0) - -/* This might cause libcurl to use a weeker random! - TODO: implement proper use of Polarssl's CTR-DRBG or HMAC-DRBG and use that -*/ -#define curlssl_random(x,y,z) ((void)x, (void)y, (void)z, CURLE_NOT_BUILT_IN) - -#endif /* USE_POLARSSL */ -#endif /* HEADER_CURL_POLARSSL_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.c b/build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.c deleted file mode 100644 index b1eb7b746a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.c +++ /dev/null @@ -1,153 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2013-2016, Daniel Stenberg, , et al. - * Copyright (C) 2010, 2011, Hoi-Ho Chan, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#if (defined(USE_POLARSSL) || defined(USE_MBEDTLS)) && \ - (defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)) - -#if defined(USE_THREADS_POSIX) -# ifdef HAVE_PTHREAD_H -# include -# endif -#elif defined(USE_THREADS_WIN32) -# ifdef HAVE_PROCESS_H -# include -# endif -#endif - -#include "polarssl_threadlock.h" -#include "curl_printf.h" -#include "curl_memory.h" -/* The last #include file should be: */ -#include "memdebug.h" - -/* number of thread locks */ -#define NUMT 2 - -/* This array will store all of the mutexes available to PolarSSL. */ -static POLARSSL_MUTEX_T *mutex_buf = NULL; - -int Curl_polarsslthreadlock_thread_setup(void) -{ - int i; - int ret; - - mutex_buf = calloc(NUMT * sizeof(POLARSSL_MUTEX_T), 1); - if(!mutex_buf) - return 0; /* error, no number of threads defined */ - -#ifdef HAVE_PTHREAD_H - for(i = 0; i < NUMT; i++) { - ret = pthread_mutex_init(&mutex_buf[i], NULL); - if(ret) - return 0; /* pthread_mutex_init failed */ - } -#elif defined(HAVE_PROCESS_H) - for(i = 0; i < NUMT; i++) { - mutex_buf[i] = CreateMutex(0, FALSE, 0); - if(mutex_buf[i] == 0) - return 0; /* CreateMutex failed */ - } -#endif /* HAVE_PTHREAD_H */ - - return 1; /* OK */ -} - -int Curl_polarsslthreadlock_thread_cleanup(void) -{ - int i; - int ret; - - if(!mutex_buf) - return 0; /* error, no threads locks defined */ - -#ifdef HAVE_PTHREAD_H - for(i = 0; i < NUMT; i++) { - ret = pthread_mutex_destroy(&mutex_buf[i]); - if(ret) - return 0; /* pthread_mutex_destroy failed */ - } -#elif defined(HAVE_PROCESS_H) - for(i = 0; i < NUMT; i++) { - ret = CloseHandle(mutex_buf[i]); - if(!ret) - return 0; /* CloseHandle failed */ - } -#endif /* HAVE_PTHREAD_H */ - free(mutex_buf); - mutex_buf = NULL; - - return 1; /* OK */ -} - -int Curl_polarsslthreadlock_lock_function(int n) -{ - int ret; -#ifdef HAVE_PTHREAD_H - if(n < NUMT) { - ret = pthread_mutex_lock(&mutex_buf[n]); - if(ret) { - DEBUGF(fprintf(stderr, - "Error: polarsslthreadlock_lock_function failed\n")); - return 0; /* pthread_mutex_lock failed */ - } - } -#elif defined(HAVE_PROCESS_H) - if(n < NUMT) { - ret = (WaitForSingleObject(mutex_buf[n], INFINITE)==WAIT_FAILED?1:0); - if(ret) { - DEBUGF(fprintf(stderr, - "Error: polarsslthreadlock_lock_function failed\n")); - return 0; /* pthread_mutex_lock failed */ - } - } -#endif /* HAVE_PTHREAD_H */ - return 1; /* OK */ -} - -int Curl_polarsslthreadlock_unlock_function(int n) -{ - int ret; -#ifdef HAVE_PTHREAD_H - if(n < NUMT) { - ret = pthread_mutex_unlock(&mutex_buf[n]); - if(ret) { - DEBUGF(fprintf(stderr, - "Error: polarsslthreadlock_unlock_function failed\n")); - return 0; /* pthread_mutex_unlock failed */ - } - } -#elif defined(HAVE_PROCESS_H) - if(n < NUMT) { - ret = ReleaseMutex(mutex_buf[n]); - if(!ret) { - DEBUGF(fprintf(stderr, - "Error: polarsslthreadlock_unlock_function failed\n")); - return 0; /* pthread_mutex_lock failed */ - } - } -#endif /* HAVE_PTHREAD_H */ - return 1; /* OK */ -} - -#endif /* USE_POLARSSL || USE_MBEDTLS */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.h b/build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.h deleted file mode 100644 index dda5359b81..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/polarssl_threadlock.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef HEADER_CURL_POLARSSL_THREADLOCK_H -#define HEADER_CURL_POLARSSL_THREADLOCK_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2013-2015, Daniel Stenberg, , et al. - * Copyright (C) 2010, Hoi-Ho Chan, - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#if (defined USE_POLARSSL) || (defined USE_MBEDTLS) - -#if defined(USE_THREADS_POSIX) -# define POLARSSL_MUTEX_T pthread_mutex_t -#elif defined(USE_THREADS_WIN32) -# define POLARSSL_MUTEX_T HANDLE -#endif - -#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) - -int Curl_polarsslthreadlock_thread_setup(void); -int Curl_polarsslthreadlock_thread_cleanup(void); -int Curl_polarsslthreadlock_lock_function(int n); -int Curl_polarsslthreadlock_unlock_function(int n); - -#else - -#define Curl_polarsslthreadlock_thread_setup() 1 -#define Curl_polarsslthreadlock_thread_cleanup() 1 -#define Curl_polarsslthreadlock_lock_function(x) 1 -#define Curl_polarsslthreadlock_unlock_function(x) 1 - -#endif /* USE_THREADS_POSIX || USE_THREADS_WIN32 */ - -#endif /* USE_POLARSSL */ - -#endif /* HEADER_CURL_POLARSSL_THREADLOCK_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/schannel.c b/build/premake/premake5/contrib/curl/lib/vtls/schannel.c deleted file mode 100644 index bd92399563..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/schannel.c +++ /dev/null @@ -1,1684 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012 - 2016, Marc Hoersken, - * Copyright (C) 2012, Mark Salisbury, - * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* - * Source file for all SChannel-specific code for the TLS/SSL layer. No code - * but vtls.c should ever call or use these functions. - * - */ - -/* - * Based upon the PolarSSL implementation in polarssl.c and polarssl.h: - * Copyright (C) 2010, 2011, Hoi-Ho Chan, - * - * Based upon the CyaSSL implementation in cyassl.c and cyassl.h: - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. - * - * Thanks for code and inspiration! - */ - -#include "curl_setup.h" - -#ifdef USE_SCHANNEL - -#ifndef USE_WINDOWS_SSPI -# error "Can't compile SCHANNEL support without SSPI." -#endif - -#include "curl_sspi.h" -#include "schannel.h" -#include "vtls.h" -#include "sendf.h" -#include "connect.h" /* for the connect timeout */ -#include "strerror.h" -#include "select.h" /* for the socket readyness */ -#include "inet_pton.h" /* for IP addr SNI check */ -#include "curl_multibyte.h" -#include "warnless.h" -#include "x509asn1.h" -#include "curl_printf.h" -#include "system_win32.h" -#include "hostcheck.h" - - /* The last #include file should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* ALPN requires version 8.1 of the Windows SDK, which was - shipped with Visual Studio 2013, aka _MSC_VER 1800: - - https://technet.microsoft.com/en-us/library/hh831771%28v=ws.11%29.aspx -*/ -#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(_USING_V110_SDK71_) -# define HAS_ALPN 1 -#endif - -/* Uncomment to force verbose output - * #define infof(x, y, ...) printf(y, __VA_ARGS__) - * #define failf(x, y, ...) printf(y, __VA_ARGS__) - */ - -static Curl_recv schannel_recv; -static Curl_send schannel_send; - -#ifdef _WIN32_WCE -static CURLcode verify_certificate(struct connectdata *conn, int sockindex); -#endif - -static void InitSecBuffer(SecBuffer *buffer, unsigned long BufType, - void *BufDataPtr, unsigned long BufByteSize) -{ - buffer->cbBuffer = BufByteSize; - buffer->BufferType = BufType; - buffer->pvBuffer = BufDataPtr; -} - -static void InitSecBufferDesc(SecBufferDesc *desc, SecBuffer *BufArr, - unsigned long NumArrElem) -{ - desc->ulVersion = SECBUFFER_VERSION; - desc->pBuffers = BufArr; - desc->cBuffers = NumArrElem; -} - -static CURLcode -schannel_connect_step1(struct connectdata *conn, int sockindex) -{ - ssize_t written = -1; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - SecBuffer outbuf; - SecBufferDesc outbuf_desc; - SecBuffer inbuf; - SecBufferDesc inbuf_desc; -#ifdef HAS_ALPN - unsigned char alpn_buffer[128]; -#endif - SCHANNEL_CRED schannel_cred; - SECURITY_STATUS sspi_status = SEC_E_OK; - struct curl_schannel_cred *old_cred = NULL; - struct in_addr addr; -#ifdef ENABLE_IPV6 - struct in6_addr addr6; -#endif - TCHAR *host_name; - CURLcode result; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n", - hostname, conn->remote_port); - - if(Curl_verify_windows_version(5, 1, PLATFORM_WINNT, - VERSION_LESS_THAN_EQUAL)) { - /* SChannel in Windows XP (OS version 5.1) uses legacy handshakes and - algorithms that may not be supported by all servers. */ - infof(data, "schannel: WinSSL version is old and may not be able to " - "connect to some servers due to lack of SNI, algorithms, etc.\n"); - } - -#ifdef HAS_ALPN - /* ALPN is only supported on Windows 8.1 / Server 2012 R2 and above. - Also it doesn't seem to be supported for Wine, see curl bug #983. */ - connssl->use_alpn = conn->bits.tls_enable_alpn && - !GetProcAddress(GetModuleHandleA("ntdll"), - "wine_get_version") && - Curl_verify_windows_version(6, 3, PLATFORM_WINNT, - VERSION_GREATER_THAN_EQUAL); -#else - connssl->use_alpn = false; -#endif - - connssl->cred = NULL; - - /* check for an existing re-usable credential handle */ - if(data->set.general_ssl.sessionid) { - Curl_ssl_sessionid_lock(conn); - if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) { - connssl->cred = old_cred; - infof(data, "schannel: re-using existing credential handle\n"); - - /* increment the reference counter of the credential/session handle */ - connssl->cred->refcount++; - infof(data, "schannel: incremented credential handle refcount = %d\n", - connssl->cred->refcount); - } - Curl_ssl_sessionid_unlock(conn); - } - - if(!connssl->cred) { - /* setup Schannel API options */ - memset(&schannel_cred, 0, sizeof(schannel_cred)); - schannel_cred.dwVersion = SCHANNEL_CRED_VERSION; - - if(conn->ssl_config.verifypeer) { -#ifdef _WIN32_WCE - /* certificate validation on CE doesn't seem to work right; we'll - do it following a more manual process. */ - schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION | - SCH_CRED_IGNORE_NO_REVOCATION_CHECK | - SCH_CRED_IGNORE_REVOCATION_OFFLINE; -#else - schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION; - /* TODO s/data->set.ssl.no_revoke/SSL_SET_OPTION(no_revoke)/g */ - if(data->set.ssl.no_revoke) - schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK | - SCH_CRED_IGNORE_REVOCATION_OFFLINE; - else - schannel_cred.dwFlags |= SCH_CRED_REVOCATION_CHECK_CHAIN; -#endif - if(data->set.ssl.no_revoke) - infof(data, "schannel: disabled server certificate revocation " - "checks\n"); - else - infof(data, "schannel: checking server certificate revocation\n"); - } - else { - schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION | - SCH_CRED_IGNORE_NO_REVOCATION_CHECK | - SCH_CRED_IGNORE_REVOCATION_OFFLINE; - infof(data, "schannel: disabled server certificate revocation checks\n"); - } - - if(!conn->ssl_config.verifyhost) { - schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK; - infof(data, "schannel: verifyhost setting prevents Schannel from " - "comparing the supplied target name with the subject " - "names in server certificates.\n"); - } - - switch(conn->ssl_config.version) { - case CURL_SSLVERSION_DEFAULT: - case CURL_SSLVERSION_TLSv1: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT | - SP_PROT_TLS1_1_CLIENT | - SP_PROT_TLS1_2_CLIENT; - break; - case CURL_SSLVERSION_TLSv1_0: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT; - break; - case CURL_SSLVERSION_TLSv1_1: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_1_CLIENT; - break; - case CURL_SSLVERSION_TLSv1_2: - schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT; - break; - case CURL_SSLVERSION_TLSv1_3: - failf(data, "Schannel: TLS 1.3 is not yet supported"); - return CURLE_SSL_CONNECT_ERROR; - case CURL_SSLVERSION_SSLv3: - schannel_cred.grbitEnabledProtocols = SP_PROT_SSL3_CLIENT; - break; - case CURL_SSLVERSION_SSLv2: - schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT; - break; - default: - failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION"); - return CURLE_SSL_CONNECT_ERROR; - } - - /* allocate memory for the re-usable credential handle */ - connssl->cred = (struct curl_schannel_cred *) - malloc(sizeof(struct curl_schannel_cred)); - if(!connssl->cred) { - failf(data, "schannel: unable to allocate memory"); - return CURLE_OUT_OF_MEMORY; - } - memset(connssl->cred, 0, sizeof(struct curl_schannel_cred)); - connssl->cred->refcount = 1; - - /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx - */ - sspi_status = - s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME, - SECPKG_CRED_OUTBOUND, NULL, - &schannel_cred, NULL, NULL, - &connssl->cred->cred_handle, - &connssl->cred->time_stamp); - - if(sspi_status != SEC_E_OK) { - if(sspi_status == SEC_E_WRONG_PRINCIPAL) - failf(data, "schannel: SNI or certificate check failed: %s", - Curl_sspi_strerror(conn, sspi_status)); - else - failf(data, "schannel: AcquireCredentialsHandle failed: %s", - Curl_sspi_strerror(conn, sspi_status)); - Curl_safefree(connssl->cred); - return CURLE_SSL_CONNECT_ERROR; - } - } - - /* Warn if SNI is disabled due to use of an IP address */ - if(Curl_inet_pton(AF_INET, hostname, &addr) -#ifdef ENABLE_IPV6 - || Curl_inet_pton(AF_INET6, hostname, &addr6) -#endif - ) { - infof(data, "schannel: using IP address, SNI is not supported by OS.\n"); - } - -#ifdef HAS_ALPN - if(connssl->use_alpn) { - int cur = 0; - int list_start_index = 0; - unsigned int *extension_len = NULL; - unsigned short* list_len = NULL; - - /* The first four bytes will be an unsigned int indicating number - of bytes of data in the rest of the the buffer. */ - extension_len = (unsigned int *)(&alpn_buffer[cur]); - cur += sizeof(unsigned int); - - /* The next four bytes are an indicator that this buffer will contain - ALPN data, as opposed to NPN, for example. */ - *(unsigned int *)&alpn_buffer[cur] = - SecApplicationProtocolNegotiationExt_ALPN; - cur += sizeof(unsigned int); - - /* The next two bytes will be an unsigned short indicating the number - of bytes used to list the preferred protocols. */ - list_len = (unsigned short*)(&alpn_buffer[cur]); - cur += sizeof(unsigned short); - - list_start_index = cur; - -#ifdef USE_NGHTTP2 - if(data->set.httpversion >= CURL_HTTP_VERSION_2) { - memcpy(&alpn_buffer[cur], NGHTTP2_PROTO_ALPN, NGHTTP2_PROTO_ALPN_LEN); - cur += NGHTTP2_PROTO_ALPN_LEN; - infof(data, "schannel: ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID); - } -#endif - - alpn_buffer[cur++] = ALPN_HTTP_1_1_LENGTH; - memcpy(&alpn_buffer[cur], ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH); - cur += ALPN_HTTP_1_1_LENGTH; - infof(data, "schannel: ALPN, offering %s\n", ALPN_HTTP_1_1); - - *list_len = curlx_uitous(cur - list_start_index); - *extension_len = *list_len + sizeof(unsigned int) + sizeof(unsigned short); - - InitSecBuffer(&inbuf, SECBUFFER_APPLICATION_PROTOCOLS, alpn_buffer, cur); - InitSecBufferDesc(&inbuf_desc, &inbuf, 1); - } - else - { - InitSecBuffer(&inbuf, SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&inbuf_desc, &inbuf, 1); - } -#else /* HAS_ALPN */ - InitSecBuffer(&inbuf, SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&inbuf_desc, &inbuf, 1); -#endif - - /* setup output buffer */ - InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&outbuf_desc, &outbuf, 1); - - /* setup request flags */ - connssl->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT | - ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY | - ISC_REQ_STREAM; - - /* allocate memory for the security context handle */ - connssl->ctxt = (struct curl_schannel_ctxt *) - malloc(sizeof(struct curl_schannel_ctxt)); - if(!connssl->ctxt) { - failf(data, "schannel: unable to allocate memory"); - return CURLE_OUT_OF_MEMORY; - } - memset(connssl->ctxt, 0, sizeof(struct curl_schannel_ctxt)); - - host_name = Curl_convert_UTF8_to_tchar(hostname); - if(!host_name) - return CURLE_OUT_OF_MEMORY; - - /* Schannel InitializeSecurityContext: - https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx - - At the moment we don't pass inbuf unless we're using ALPN since we only - use it for that, and Wine (for which we currently disable ALPN) is giving - us problems with inbuf regardless. https://github.com/curl/curl/issues/983 - */ - sspi_status = s_pSecFn->InitializeSecurityContext( - &connssl->cred->cred_handle, NULL, host_name, connssl->req_flags, 0, 0, - (connssl->use_alpn ? &inbuf_desc : NULL), - 0, &connssl->ctxt->ctxt_handle, - &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp); - - Curl_unicodefree(host_name); - - if(sspi_status != SEC_I_CONTINUE_NEEDED) { - if(sspi_status == SEC_E_WRONG_PRINCIPAL) - failf(data, "schannel: SNI or certificate check failed: %s", - Curl_sspi_strerror(conn, sspi_status)); - else - failf(data, "schannel: initial InitializeSecurityContext failed: %s", - Curl_sspi_strerror(conn, sspi_status)); - Curl_safefree(connssl->ctxt); - return CURLE_SSL_CONNECT_ERROR; - } - - infof(data, "schannel: sending initial handshake data: " - "sending %lu bytes...\n", outbuf.cbBuffer); - - /* send initial handshake data which is now stored in output buffer */ - result = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer, - outbuf.cbBuffer, &written); - s_pSecFn->FreeContextBuffer(outbuf.pvBuffer); - if((result != CURLE_OK) || (outbuf.cbBuffer != (size_t) written)) { - failf(data, "schannel: failed to send initial handshake data: " - "sent %zd of %lu bytes", written, outbuf.cbBuffer); - return CURLE_SSL_CONNECT_ERROR; - } - - infof(data, "schannel: sent initial handshake data: " - "sent %zd bytes\n", written); - - connssl->recv_unrecoverable_err = CURLE_OK; - connssl->recv_sspi_close_notify = false; - connssl->recv_connection_closed = false; - - /* continue to second handshake step */ - connssl->connecting_state = ssl_connect_2; - - return CURLE_OK; -} - -static CURLcode -schannel_connect_step2(struct connectdata *conn, int sockindex) -{ - int i; - ssize_t nread = -1, written = -1; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - unsigned char *reallocated_buffer; - size_t reallocated_length; - SecBuffer outbuf[3]; - SecBufferDesc outbuf_desc; - SecBuffer inbuf[2]; - SecBufferDesc inbuf_desc; - SECURITY_STATUS sspi_status = SEC_E_OK; - TCHAR *host_name; - CURLcode result; - bool doread; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - doread = (connssl->connecting_state != ssl_connect_2_writing) ? TRUE : FALSE; - - infof(data, "schannel: SSL/TLS connection with %s port %hu (step 2/3)\n", - hostname, conn->remote_port); - - if(!connssl->cred || !connssl->ctxt) - return CURLE_SSL_CONNECT_ERROR; - - /* buffer to store previously received and decrypted data */ - if(connssl->decdata_buffer == NULL) { - connssl->decdata_offset = 0; - connssl->decdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; - connssl->decdata_buffer = malloc(connssl->decdata_length); - if(connssl->decdata_buffer == NULL) { - failf(data, "schannel: unable to allocate memory"); - return CURLE_OUT_OF_MEMORY; - } - } - - /* buffer to store previously received and encrypted data */ - if(connssl->encdata_buffer == NULL) { - connssl->encdata_offset = 0; - connssl->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; - connssl->encdata_buffer = malloc(connssl->encdata_length); - if(connssl->encdata_buffer == NULL) { - failf(data, "schannel: unable to allocate memory"); - return CURLE_OUT_OF_MEMORY; - } - } - - /* if we need a bigger buffer to read a full message, increase buffer now */ - if(connssl->encdata_length - connssl->encdata_offset < - CURL_SCHANNEL_BUFFER_FREE_SIZE) { - /* increase internal encrypted data buffer */ - reallocated_length = connssl->encdata_offset + - CURL_SCHANNEL_BUFFER_FREE_SIZE; - reallocated_buffer = realloc(connssl->encdata_buffer, - reallocated_length); - - if(reallocated_buffer == NULL) { - failf(data, "schannel: unable to re-allocate memory"); - return CURLE_OUT_OF_MEMORY; - } - else { - connssl->encdata_buffer = reallocated_buffer; - connssl->encdata_length = reallocated_length; - } - } - - for(;;) { - if(doread) { - /* read encrypted handshake data from socket */ - result = Curl_read_plain(conn->sock[sockindex], - (char *) (connssl->encdata_buffer + - connssl->encdata_offset), - connssl->encdata_length - - connssl->encdata_offset, - &nread); - if(result == CURLE_AGAIN) { - if(connssl->connecting_state != ssl_connect_2_writing) - connssl->connecting_state = ssl_connect_2_reading; - infof(data, "schannel: failed to receive handshake, " - "need more data\n"); - return CURLE_OK; - } - else if((result != CURLE_OK) || (nread == 0)) { - failf(data, "schannel: failed to receive handshake, " - "SSL/TLS connection failed"); - return CURLE_SSL_CONNECT_ERROR; - } - - /* increase encrypted data buffer offset */ - connssl->encdata_offset += nread; - } - - infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); - - /* setup input buffers */ - InitSecBuffer(&inbuf[0], SECBUFFER_TOKEN, malloc(connssl->encdata_offset), - curlx_uztoul(connssl->encdata_offset)); - InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&inbuf_desc, inbuf, 2); - - /* setup output buffers */ - InitSecBuffer(&outbuf[0], SECBUFFER_TOKEN, NULL, 0); - InitSecBuffer(&outbuf[1], SECBUFFER_ALERT, NULL, 0); - InitSecBuffer(&outbuf[2], SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&outbuf_desc, outbuf, 3); - - if(inbuf[0].pvBuffer == NULL) { - failf(data, "schannel: unable to allocate memory"); - return CURLE_OUT_OF_MEMORY; - } - - /* copy received handshake data into input buffer */ - memcpy(inbuf[0].pvBuffer, connssl->encdata_buffer, - connssl->encdata_offset); - - host_name = Curl_convert_UTF8_to_tchar(hostname); - if(!host_name) - return CURLE_OUT_OF_MEMORY; - - /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx - */ - sspi_status = s_pSecFn->InitializeSecurityContext( - &connssl->cred->cred_handle, &connssl->ctxt->ctxt_handle, - host_name, connssl->req_flags, 0, 0, &inbuf_desc, 0, NULL, - &outbuf_desc, &connssl->ret_flags, &connssl->ctxt->time_stamp); - - Curl_unicodefree(host_name); - - /* free buffer for received handshake data */ - Curl_safefree(inbuf[0].pvBuffer); - - /* check if the handshake was incomplete */ - if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) { - connssl->connecting_state = ssl_connect_2_reading; - infof(data, "schannel: received incomplete message, need more data\n"); - return CURLE_OK; - } - - /* If the server has requested a client certificate, attempt to continue - the handshake without one. This will allow connections to servers which - request a client certificate but do not require it. */ - if(sspi_status == SEC_I_INCOMPLETE_CREDENTIALS && - !(connssl->req_flags & ISC_REQ_USE_SUPPLIED_CREDS)) { - connssl->req_flags |= ISC_REQ_USE_SUPPLIED_CREDS; - connssl->connecting_state = ssl_connect_2_writing; - infof(data, "schannel: a client certificate has been requested\n"); - return CURLE_OK; - } - - /* check if the handshake needs to be continued */ - if(sspi_status == SEC_I_CONTINUE_NEEDED || sspi_status == SEC_E_OK) { - for(i = 0; i < 3; i++) { - /* search for handshake tokens that need to be send */ - if(outbuf[i].BufferType == SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) { - infof(data, "schannel: sending next handshake data: " - "sending %lu bytes...\n", outbuf[i].cbBuffer); - - /* send handshake token to server */ - result = Curl_write_plain(conn, conn->sock[sockindex], - outbuf[i].pvBuffer, outbuf[i].cbBuffer, - &written); - if((result != CURLE_OK) || - (outbuf[i].cbBuffer != (size_t) written)) { - failf(data, "schannel: failed to send next handshake data: " - "sent %zd of %lu bytes", written, outbuf[i].cbBuffer); - return CURLE_SSL_CONNECT_ERROR; - } - } - - /* free obsolete buffer */ - if(outbuf[i].pvBuffer != NULL) { - s_pSecFn->FreeContextBuffer(outbuf[i].pvBuffer); - } - } - } - else { - if(sspi_status == SEC_E_WRONG_PRINCIPAL) - failf(data, "schannel: SNI or certificate check failed: %s", - Curl_sspi_strerror(conn, sspi_status)); - else - failf(data, "schannel: next InitializeSecurityContext failed: %s", - Curl_sspi_strerror(conn, sspi_status)); - return CURLE_SSL_CONNECT_ERROR; - } - - /* check if there was additional remaining encrypted data */ - if(inbuf[1].BufferType == SECBUFFER_EXTRA && inbuf[1].cbBuffer > 0) { - infof(data, "schannel: encrypted data length: %lu\n", inbuf[1].cbBuffer); - /* - There are two cases where we could be getting extra data here: - 1) If we're renegotiating a connection and the handshake is already - complete (from the server perspective), it can encrypted app data - (not handshake data) in an extra buffer at this point. - 2) (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a - connection and this extra data is part of the handshake. - We should process the data immediately; waiting for the socket to - be ready may fail since the server is done sending handshake data. - */ - /* check if the remaining data is less than the total amount - and therefore begins after the already processed data */ - if(connssl->encdata_offset > inbuf[1].cbBuffer) { - memmove(connssl->encdata_buffer, - (connssl->encdata_buffer + connssl->encdata_offset) - - inbuf[1].cbBuffer, inbuf[1].cbBuffer); - connssl->encdata_offset = inbuf[1].cbBuffer; - if(sspi_status == SEC_I_CONTINUE_NEEDED) { - doread = FALSE; - continue; - } - } - } - else { - connssl->encdata_offset = 0; - } - break; - } - - /* check if the handshake needs to be continued */ - if(sspi_status == SEC_I_CONTINUE_NEEDED) { - connssl->connecting_state = ssl_connect_2_reading; - return CURLE_OK; - } - - /* check if the handshake is complete */ - if(sspi_status == SEC_E_OK) { - connssl->connecting_state = ssl_connect_3; - infof(data, "schannel: SSL/TLS handshake complete\n"); - } - -#ifdef _WIN32_WCE - /* Windows CE doesn't do any server certificate validation. - We have to do it manually. */ - if(conn->ssl_config.verifypeer) - return verify_certificate(conn, sockindex); -#endif - - return CURLE_OK; -} - -static CURLcode -schannel_connect_step3(struct connectdata *conn, int sockindex) -{ - CURLcode result = CURLE_OK; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - SECURITY_STATUS sspi_status = SEC_E_OK; - CERT_CONTEXT *ccert_context = NULL; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; -#ifdef HAS_ALPN - SecPkgContext_ApplicationProtocol alpn_result; -#endif - - DEBUGASSERT(ssl_connect_3 == connssl->connecting_state); - - infof(data, "schannel: SSL/TLS connection with %s port %hu (step 3/3)\n", - hostname, conn->remote_port); - - if(!connssl->cred) - return CURLE_SSL_CONNECT_ERROR; - - /* check if the required context attributes are met */ - if(connssl->ret_flags != connssl->req_flags) { - if(!(connssl->ret_flags & ISC_RET_SEQUENCE_DETECT)) - failf(data, "schannel: failed to setup sequence detection"); - if(!(connssl->ret_flags & ISC_RET_REPLAY_DETECT)) - failf(data, "schannel: failed to setup replay detection"); - if(!(connssl->ret_flags & ISC_RET_CONFIDENTIALITY)) - failf(data, "schannel: failed to setup confidentiality"); - if(!(connssl->ret_flags & ISC_RET_ALLOCATED_MEMORY)) - failf(data, "schannel: failed to setup memory allocation"); - if(!(connssl->ret_flags & ISC_RET_STREAM)) - failf(data, "schannel: failed to setup stream orientation"); - return CURLE_SSL_CONNECT_ERROR; - } - -#ifdef HAS_ALPN - if(connssl->use_alpn) { - sspi_status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle, - SECPKG_ATTR_APPLICATION_PROTOCOL, &alpn_result); - - if(sspi_status != SEC_E_OK) { - failf(data, "schannel: failed to retrieve ALPN result"); - return CURLE_SSL_CONNECT_ERROR; - } - - if(alpn_result.ProtoNegoStatus == - SecApplicationProtocolNegotiationStatus_Success) { - - infof(data, "schannel: ALPN, server accepted to use %.*s\n", - alpn_result.ProtocolIdSize, alpn_result.ProtocolId); - -#ifdef USE_NGHTTP2 - if(alpn_result.ProtocolIdSize == NGHTTP2_PROTO_VERSION_ID_LEN && - !memcmp(NGHTTP2_PROTO_VERSION_ID, alpn_result.ProtocolId, - NGHTTP2_PROTO_VERSION_ID_LEN)) { - conn->negnpn = CURL_HTTP_VERSION_2; - } - else -#endif - if(alpn_result.ProtocolIdSize == ALPN_HTTP_1_1_LENGTH && - !memcmp(ALPN_HTTP_1_1, alpn_result.ProtocolId, - ALPN_HTTP_1_1_LENGTH)) { - conn->negnpn = CURL_HTTP_VERSION_1_1; - } - } - else - infof(data, "ALPN, server did not agree to a protocol\n"); - } -#endif - - /* save the current session data for possible re-use */ - if(data->set.general_ssl.sessionid) { - bool incache; - struct curl_schannel_cred *old_cred = NULL; - - Curl_ssl_sessionid_lock(conn); - incache = !(Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, - sockindex)); - if(incache) { - if(old_cred != connssl->cred) { - infof(data, "schannel: old credential handle is stale, removing\n"); - /* we're not taking old_cred ownership here, no refcount++ is needed */ - Curl_ssl_delsessionid(conn, (void *)old_cred); - incache = FALSE; - } - } - if(!incache) { - result = Curl_ssl_addsessionid(conn, (void *)connssl->cred, - sizeof(struct curl_schannel_cred), - sockindex); - if(result) { - Curl_ssl_sessionid_unlock(conn); - failf(data, "schannel: failed to store credential handle"); - return result; - } - else { - /* this cred session is now also referenced by sessionid cache */ - connssl->cred->refcount++; - infof(data, "schannel: stored credential handle in session cache\n"); - } - } - Curl_ssl_sessionid_unlock(conn); - } - - if(data->set.ssl.certinfo) { - sspi_status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle, - SECPKG_ATTR_REMOTE_CERT_CONTEXT, &ccert_context); - - if((sspi_status != SEC_E_OK) || (ccert_context == NULL)) { - failf(data, "schannel: failed to retrieve remote cert context"); - return CURLE_SSL_CONNECT_ERROR; - } - - result = Curl_ssl_init_certinfo(data, 1); - if(!result) { - if(((ccert_context->dwCertEncodingType & X509_ASN_ENCODING) != 0) && - (ccert_context->cbCertEncoded > 0)) { - - const char *beg = (const char *) ccert_context->pbCertEncoded; - const char *end = beg + ccert_context->cbCertEncoded; - result = Curl_extract_certinfo(conn, 0, beg, end); - } - } - CertFreeCertificateContext(ccert_context); - if(result) - return result; - } - - connssl->connecting_state = ssl_connect_done; - - return CURLE_OK; -} - -static CURLcode -schannel_connect_common(struct connectdata *conn, int sockindex, - bool nonblocking, bool *done) -{ - CURLcode result; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - curl_socket_t sockfd = conn->sock[sockindex]; - time_t timeout_ms; - int what; - - /* check if the connection has already been established */ - if(ssl_connection_complete == connssl->state) { - *done = TRUE; - return CURLE_OK; - } - - if(ssl_connect_1 == connssl->connecting_state) { - /* check out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL/TLS connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - result = schannel_connect_step1(conn, sockindex); - if(result) - return result; - } - - while(ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state) { - - /* check out how much more time we're allowed */ - timeout_ms = Curl_timeleft(data, NULL, TRUE); - - if(timeout_ms < 0) { - /* no need to continue if time already is up */ - failf(data, "SSL/TLS connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - - /* if ssl is expecting something, check if it's available. */ - if(connssl->connecting_state == ssl_connect_2_reading - || connssl->connecting_state == ssl_connect_2_writing) { - - curl_socket_t writefd = ssl_connect_2_writing == - connssl->connecting_state ? sockfd : CURL_SOCKET_BAD; - curl_socket_t readfd = ssl_connect_2_reading == - connssl->connecting_state ? sockfd : CURL_SOCKET_BAD; - - what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking ? 0 : timeout_ms); - if(what < 0) { - /* fatal error */ - failf(data, "select/poll on SSL/TLS socket, errno: %d", SOCKERRNO); - return CURLE_SSL_CONNECT_ERROR; - } - else if(0 == what) { - if(nonblocking) { - *done = FALSE; - return CURLE_OK; - } - else { - /* timeout */ - failf(data, "SSL/TLS connection timeout"); - return CURLE_OPERATION_TIMEDOUT; - } - } - /* socket is readable or writable */ - } - - /* Run transaction, and return to the caller if it failed or if - * this connection is part of a multi handle and this loop would - * execute again. This permits the owner of a multi handle to - * abort a connection attempt before step2 has completed while - * ensuring that a client using select() or epoll() will always - * have a valid fdset to wait on. - */ - result = schannel_connect_step2(conn, sockindex); - if(result || (nonblocking && - (ssl_connect_2 == connssl->connecting_state || - ssl_connect_2_reading == connssl->connecting_state || - ssl_connect_2_writing == connssl->connecting_state))) - return result; - - } /* repeat step2 until all transactions are done. */ - - if(ssl_connect_3 == connssl->connecting_state) { - result = schannel_connect_step3(conn, sockindex); - if(result) - return result; - } - - if(ssl_connect_done == connssl->connecting_state) { - connssl->state = ssl_connection_complete; - conn->recv[sockindex] = schannel_recv; - conn->send[sockindex] = schannel_send; - *done = TRUE; - } - else - *done = FALSE; - - /* reset our connection state machine */ - connssl->connecting_state = ssl_connect_1; - - return CURLE_OK; -} - -static ssize_t -schannel_send(struct connectdata *conn, int sockindex, - const void *buf, size_t len, CURLcode *err) -{ - ssize_t written = -1; - size_t data_len = 0; - unsigned char *data = NULL; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - SecBuffer outbuf[4]; - SecBufferDesc outbuf_desc; - SECURITY_STATUS sspi_status = SEC_E_OK; - CURLcode result; - - /* check if the maximum stream sizes were queried */ - if(connssl->stream_sizes.cbMaximumMessage == 0) { - sspi_status = s_pSecFn->QueryContextAttributes( - &connssl->ctxt->ctxt_handle, - SECPKG_ATTR_STREAM_SIZES, - &connssl->stream_sizes); - if(sspi_status != SEC_E_OK) { - *err = CURLE_SEND_ERROR; - return -1; - } - } - - /* check if the buffer is longer than the maximum message length */ - if(len > connssl->stream_sizes.cbMaximumMessage) { - *err = CURLE_SEND_ERROR; - return -1; - } - - /* calculate the complete message length and allocate a buffer for it */ - data_len = connssl->stream_sizes.cbHeader + len + - connssl->stream_sizes.cbTrailer; - data = (unsigned char *) malloc(data_len); - if(data == NULL) { - *err = CURLE_OUT_OF_MEMORY; - return -1; - } - - /* setup output buffers (header, data, trailer, empty) */ - InitSecBuffer(&outbuf[0], SECBUFFER_STREAM_HEADER, - data, connssl->stream_sizes.cbHeader); - InitSecBuffer(&outbuf[1], SECBUFFER_DATA, - data + connssl->stream_sizes.cbHeader, curlx_uztoul(len)); - InitSecBuffer(&outbuf[2], SECBUFFER_STREAM_TRAILER, - data + connssl->stream_sizes.cbHeader + len, - connssl->stream_sizes.cbTrailer); - InitSecBuffer(&outbuf[3], SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&outbuf_desc, outbuf, 4); - - /* copy data into output buffer */ - memcpy(outbuf[1].pvBuffer, buf, len); - - /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375390.aspx */ - sspi_status = s_pSecFn->EncryptMessage(&connssl->ctxt->ctxt_handle, 0, - &outbuf_desc, 0); - - /* check if the message was encrypted */ - if(sspi_status == SEC_E_OK) { - written = 0; - - /* send the encrypted message including header, data and trailer */ - len = outbuf[0].cbBuffer + outbuf[1].cbBuffer + outbuf[2].cbBuffer; - - /* - It's important to send the full message which includes the header, - encrypted payload, and trailer. Until the client receives all the - data a coherent message has not been delivered and the client - can't read any of it. - - If we wanted to buffer the unwritten encrypted bytes, we would - tell the client that all data it has requested to be sent has been - sent. The unwritten encrypted bytes would be the first bytes to - send on the next invocation. - Here's the catch with this - if we tell the client that all the - bytes have been sent, will the client call this method again to - send the buffered data? Looking at who calls this function, it - seems the answer is NO. - */ - - /* send entire message or fail */ - while(len > (size_t)written) { - ssize_t this_write; - time_t timeleft; - int what; - - this_write = 0; - - timeleft = Curl_timeleft(conn->data, NULL, FALSE); - if(timeleft < 0) { - /* we already got the timeout */ - failf(conn->data, "schannel: timed out sending data " - "(bytes sent: %zd)", written); - *err = CURLE_OPERATION_TIMEDOUT; - written = -1; - break; - } - - what = SOCKET_WRITABLE(conn->sock[sockindex], timeleft); - if(what < 0) { - /* fatal error */ - failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO); - *err = CURLE_SEND_ERROR; - written = -1; - break; - } - else if(0 == what) { - failf(conn->data, "schannel: timed out sending data " - "(bytes sent: %zd)", written); - *err = CURLE_OPERATION_TIMEDOUT; - written = -1; - break; - } - /* socket is writable */ - - result = Curl_write_plain(conn, conn->sock[sockindex], data + written, - len - written, &this_write); - if(result == CURLE_AGAIN) - continue; - else if(result != CURLE_OK) { - *err = result; - written = -1; - break; - } - - written += this_write; - } - } - else if(sspi_status == SEC_E_INSUFFICIENT_MEMORY) { - *err = CURLE_OUT_OF_MEMORY; - } - else{ - *err = CURLE_SEND_ERROR; - } - - Curl_safefree(data); - - if(len == (size_t)written) - /* Encrypted message including header, data and trailer entirely sent. - The return value is the number of unencrypted bytes that were sent. */ - written = outbuf[1].cbBuffer; - - return written; -} - -static ssize_t -schannel_recv(struct connectdata *conn, int sockindex, - char *buf, size_t len, CURLcode *err) -{ - size_t size = 0; - ssize_t nread = -1; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - unsigned char *reallocated_buffer; - size_t reallocated_length; - bool done = FALSE; - SecBuffer inbuf[4]; - SecBufferDesc inbuf_desc; - SECURITY_STATUS sspi_status = SEC_E_OK; - /* we want the length of the encrypted buffer to be at least large enough - that it can hold all the bytes requested and some TLS record overhead. */ - size_t min_encdata_length = len + CURL_SCHANNEL_BUFFER_FREE_SIZE; - - /**************************************************************************** - * Don't return or set connssl->recv_unrecoverable_err unless in the cleanup. - * The pattern for return error is set *err, optional infof, goto cleanup. - * - * Our priority is to always return as much decrypted data to the caller as - * possible, even if an error occurs. The state of the decrypted buffer must - * always be valid. Transfer of decrypted data to the caller's buffer is - * handled in the cleanup. - */ - - infof(data, "schannel: client wants to read %zu bytes\n", len); - *err = CURLE_OK; - - if(len && len <= connssl->decdata_offset) { - infof(data, "schannel: enough decrypted data is already available\n"); - goto cleanup; - } - else if(connssl->recv_unrecoverable_err) { - *err = connssl->recv_unrecoverable_err; - infof(data, "schannel: an unrecoverable error occurred in a prior call\n"); - goto cleanup; - } - else if(connssl->recv_sspi_close_notify) { - /* once a server has indicated shutdown there is no more encrypted data */ - infof(data, "schannel: server indicated shutdown in a prior call\n"); - goto cleanup; - } - else if(!len) { - /* It's debatable what to return when !len. Regardless we can't return - immediately because there may be data to decrypt (in the case we want to - decrypt all encrypted cached data) so handle !len later in cleanup. - */ - ; /* do nothing */ - } - else if(!connssl->recv_connection_closed) { - /* increase enc buffer in order to fit the requested amount of data */ - size = connssl->encdata_length - connssl->encdata_offset; - if(size < CURL_SCHANNEL_BUFFER_FREE_SIZE || - connssl->encdata_length < min_encdata_length) { - reallocated_length = connssl->encdata_offset + - CURL_SCHANNEL_BUFFER_FREE_SIZE; - if(reallocated_length < min_encdata_length) { - reallocated_length = min_encdata_length; - } - reallocated_buffer = realloc(connssl->encdata_buffer, - reallocated_length); - if(reallocated_buffer == NULL) { - *err = CURLE_OUT_OF_MEMORY; - failf(data, "schannel: unable to re-allocate memory"); - goto cleanup; - } - - connssl->encdata_buffer = reallocated_buffer; - connssl->encdata_length = reallocated_length; - size = connssl->encdata_length - connssl->encdata_offset; - infof(data, "schannel: encdata_buffer resized %zu\n", - connssl->encdata_length); - } - - infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); - - /* read encrypted data from socket */ - *err = Curl_read_plain(conn->sock[sockindex], - (char *)(connssl->encdata_buffer + - connssl->encdata_offset), - size, &nread); - if(*err) { - nread = -1; - if(*err == CURLE_AGAIN) - infof(data, "schannel: Curl_read_plain returned CURLE_AGAIN\n"); - else if(*err == CURLE_RECV_ERROR) - infof(data, "schannel: Curl_read_plain returned CURLE_RECV_ERROR\n"); - else - infof(data, "schannel: Curl_read_plain returned error %d\n", *err); - } - else if(nread == 0) { - connssl->recv_connection_closed = true; - infof(data, "schannel: server closed the connection\n"); - } - else if(nread > 0) { - connssl->encdata_offset += (size_t)nread; - infof(data, "schannel: encrypted data got %zd\n", nread); - } - } - - infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); - - /* decrypt loop */ - while(connssl->encdata_offset > 0 && sspi_status == SEC_E_OK && - (!len || connssl->decdata_offset < len || - connssl->recv_connection_closed)) { - /* prepare data buffer for DecryptMessage call */ - InitSecBuffer(&inbuf[0], SECBUFFER_DATA, connssl->encdata_buffer, - curlx_uztoul(connssl->encdata_offset)); - - /* we need 3 more empty input buffers for possible output */ - InitSecBuffer(&inbuf[1], SECBUFFER_EMPTY, NULL, 0); - InitSecBuffer(&inbuf[2], SECBUFFER_EMPTY, NULL, 0); - InitSecBuffer(&inbuf[3], SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&inbuf_desc, inbuf, 4); - - /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa375348.aspx - */ - sspi_status = s_pSecFn->DecryptMessage(&connssl->ctxt->ctxt_handle, - &inbuf_desc, 0, NULL); - - /* check if everything went fine (server may want to renegotiate - or shutdown the connection context) */ - if(sspi_status == SEC_E_OK || sspi_status == SEC_I_RENEGOTIATE || - sspi_status == SEC_I_CONTEXT_EXPIRED) { - /* check for successfully decrypted data, even before actual - renegotiation or shutdown of the connection context */ - if(inbuf[1].BufferType == SECBUFFER_DATA) { - infof(data, "schannel: decrypted data length: %lu\n", - inbuf[1].cbBuffer); - - /* increase buffer in order to fit the received amount of data */ - size = inbuf[1].cbBuffer > CURL_SCHANNEL_BUFFER_FREE_SIZE ? - inbuf[1].cbBuffer : CURL_SCHANNEL_BUFFER_FREE_SIZE; - if(connssl->decdata_length - connssl->decdata_offset < size || - connssl->decdata_length < len) { - /* increase internal decrypted data buffer */ - reallocated_length = connssl->decdata_offset + size; - /* make sure that the requested amount of data fits */ - if(reallocated_length < len) { - reallocated_length = len; - } - reallocated_buffer = realloc(connssl->decdata_buffer, - reallocated_length); - if(reallocated_buffer == NULL) { - *err = CURLE_OUT_OF_MEMORY; - failf(data, "schannel: unable to re-allocate memory"); - goto cleanup; - } - connssl->decdata_buffer = reallocated_buffer; - connssl->decdata_length = reallocated_length; - } - - /* copy decrypted data to internal buffer */ - size = inbuf[1].cbBuffer; - if(size) { - memcpy(connssl->decdata_buffer + connssl->decdata_offset, - inbuf[1].pvBuffer, size); - connssl->decdata_offset += size; - } - - infof(data, "schannel: decrypted data added: %zu\n", size); - infof(data, "schannel: decrypted data cached: offset %zu length %zu\n", - connssl->decdata_offset, connssl->decdata_length); - } - - /* check for remaining encrypted data */ - if(inbuf[3].BufferType == SECBUFFER_EXTRA && inbuf[3].cbBuffer > 0) { - infof(data, "schannel: encrypted data length: %lu\n", - inbuf[3].cbBuffer); - - /* check if the remaining data is less than the total amount - * and therefore begins after the already processed data - */ - if(connssl->encdata_offset > inbuf[3].cbBuffer) { - /* move remaining encrypted data forward to the beginning of - buffer */ - memmove(connssl->encdata_buffer, - (connssl->encdata_buffer + connssl->encdata_offset) - - inbuf[3].cbBuffer, inbuf[3].cbBuffer); - connssl->encdata_offset = inbuf[3].cbBuffer; - } - - infof(data, "schannel: encrypted data cached: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); - } - else { - /* reset encrypted buffer offset, because there is no data remaining */ - connssl->encdata_offset = 0; - } - - /* check if server wants to renegotiate the connection context */ - if(sspi_status == SEC_I_RENEGOTIATE) { - infof(data, "schannel: remote party requests renegotiation\n"); - if(*err && *err != CURLE_AGAIN) { - infof(data, "schannel: can't renogotiate, an error is pending\n"); - goto cleanup; - } - if(connssl->encdata_offset) { - *err = CURLE_RECV_ERROR; - infof(data, "schannel: can't renogotiate, " - "encrypted data available\n"); - goto cleanup; - } - /* begin renegotiation */ - infof(data, "schannel: renegotiating SSL/TLS connection\n"); - connssl->state = ssl_connection_negotiating; - connssl->connecting_state = ssl_connect_2_writing; - *err = schannel_connect_common(conn, sockindex, FALSE, &done); - if(*err) { - infof(data, "schannel: renegotiation failed\n"); - goto cleanup; - } - /* now retry receiving data */ - sspi_status = SEC_E_OK; - infof(data, "schannel: SSL/TLS connection renegotiated\n"); - continue; - } - /* check if the server closed the connection */ - else if(sspi_status == SEC_I_CONTEXT_EXPIRED) { - /* In Windows 2000 SEC_I_CONTEXT_EXPIRED (close_notify) is not - returned so we have to work around that in cleanup. */ - connssl->recv_sspi_close_notify = true; - if(!connssl->recv_connection_closed) { - connssl->recv_connection_closed = true; - infof(data, "schannel: server closed the connection\n"); - } - goto cleanup; - } - } - else if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) { - if(!*err) - *err = CURLE_AGAIN; - infof(data, "schannel: failed to decrypt data, need more data\n"); - goto cleanup; - } - else { - *err = CURLE_RECV_ERROR; - infof(data, "schannel: failed to read data from server: %s\n", - Curl_sspi_strerror(conn, sspi_status)); - goto cleanup; - } - } - - infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", - connssl->encdata_offset, connssl->encdata_length); - - infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n", - connssl->decdata_offset, connssl->decdata_length); - -cleanup: - /* Warning- there is no guarantee the encdata state is valid at this point */ - infof(data, "schannel: schannel_recv cleanup\n"); - - /* Error if the connection has closed without a close_notify. - Behavior here is a matter of debate. We don't want to be vulnerable to a - truncation attack however there's some browser precedent for ignoring the - close_notify for compatibility reasons. - Additionally, Windows 2000 (v5.0) is a special case since it seems it doesn't - return close_notify. In that case if the connection was closed we assume it - was graceful (close_notify) since there doesn't seem to be a way to tell. - */ - if(len && !connssl->decdata_offset && connssl->recv_connection_closed && - !connssl->recv_sspi_close_notify) { - bool isWin2k = Curl_verify_windows_version(5, 0, PLATFORM_WINNT, - VERSION_EQUAL); - - if(isWin2k && sspi_status == SEC_E_OK) - connssl->recv_sspi_close_notify = true; - else { - *err = CURLE_RECV_ERROR; - infof(data, "schannel: server closed abruptly (missing close_notify)\n"); - } - } - - /* Any error other than CURLE_AGAIN is an unrecoverable error. */ - if(*err && *err != CURLE_AGAIN) - connssl->recv_unrecoverable_err = *err; - - size = len < connssl->decdata_offset ? len : connssl->decdata_offset; - if(size) { - memcpy(buf, connssl->decdata_buffer, size); - memmove(connssl->decdata_buffer, connssl->decdata_buffer + size, - connssl->decdata_offset - size); - connssl->decdata_offset -= size; - - infof(data, "schannel: decrypted data returned %zu\n", size); - infof(data, "schannel: decrypted data buffer: offset %zu length %zu\n", - connssl->decdata_offset, connssl->decdata_length); - *err = CURLE_OK; - return (ssize_t)size; - } - - if(!*err && !connssl->recv_connection_closed) - *err = CURLE_AGAIN; - - /* It's debatable what to return when !len. We could return whatever error we - got from decryption but instead we override here so the return is consistent. - */ - if(!len) - *err = CURLE_OK; - - return *err ? -1 : 0; -} - -CURLcode -Curl_schannel_connect_nonblocking(struct connectdata *conn, int sockindex, - bool *done) -{ - return schannel_connect_common(conn, sockindex, TRUE, done); -} - -CURLcode -Curl_schannel_connect(struct connectdata *conn, int sockindex) -{ - CURLcode result; - bool done = FALSE; - - result = schannel_connect_common(conn, sockindex, FALSE, &done); - if(result) - return result; - - DEBUGASSERT(done); - - return CURLE_OK; -} - -bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex) -{ - const struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - - if(connssl->use) /* SSL/TLS is in use */ - return (connssl->encdata_offset > 0 || - connssl->decdata_offset > 0) ? TRUE : FALSE; - else - return FALSE; -} - -void Curl_schannel_close(struct connectdata *conn, int sockindex) -{ - if(conn->ssl[sockindex].use) - /* if the SSL/TLS channel hasn't been shut down yet, do that now. */ - Curl_ssl_shutdown(conn, sockindex); -} - -int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) -{ - /* See https://msdn.microsoft.com/en-us/library/windows/desktop/aa380138.aspx - * Shutting Down an Schannel Connection - */ - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : - conn->host.name; - - infof(data, "schannel: shutting down SSL/TLS connection with %s port %hu\n", - hostname, conn->remote_port); - - if(connssl->cred && connssl->ctxt) { - SecBufferDesc BuffDesc; - SecBuffer Buffer; - SECURITY_STATUS sspi_status; - SecBuffer outbuf; - SecBufferDesc outbuf_desc; - CURLcode result; - TCHAR *host_name; - DWORD dwshut = SCHANNEL_SHUTDOWN; - - InitSecBuffer(&Buffer, SECBUFFER_TOKEN, &dwshut, sizeof(dwshut)); - InitSecBufferDesc(&BuffDesc, &Buffer, 1); - - sspi_status = s_pSecFn->ApplyControlToken(&connssl->ctxt->ctxt_handle, - &BuffDesc); - - if(sspi_status != SEC_E_OK) - failf(data, "schannel: ApplyControlToken failure: %s", - Curl_sspi_strerror(conn, sspi_status)); - - host_name = Curl_convert_UTF8_to_tchar(hostname); - if(!host_name) - return CURLE_OUT_OF_MEMORY; - - /* setup output buffer */ - InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0); - InitSecBufferDesc(&outbuf_desc, &outbuf, 1); - - sspi_status = s_pSecFn->InitializeSecurityContext( - &connssl->cred->cred_handle, - &connssl->ctxt->ctxt_handle, - host_name, - connssl->req_flags, - 0, - 0, - NULL, - 0, - &connssl->ctxt->ctxt_handle, - &outbuf_desc, - &connssl->ret_flags, - &connssl->ctxt->time_stamp); - - Curl_unicodefree(host_name); - - if((sspi_status == SEC_E_OK) || (sspi_status == SEC_I_CONTEXT_EXPIRED)) { - /* send close message which is in output buffer */ - ssize_t written; - result = Curl_write_plain(conn, conn->sock[sockindex], outbuf.pvBuffer, - outbuf.cbBuffer, &written); - - s_pSecFn->FreeContextBuffer(outbuf.pvBuffer); - if((result != CURLE_OK) || (outbuf.cbBuffer != (size_t) written)) { - infof(data, "schannel: failed to send close msg: %s" - " (bytes written: %zd)\n", curl_easy_strerror(result), written); - } - } - } - - /* free SSPI Schannel API security context handle */ - if(connssl->ctxt) { - infof(data, "schannel: clear security context handle\n"); - s_pSecFn->DeleteSecurityContext(&connssl->ctxt->ctxt_handle); - Curl_safefree(connssl->ctxt); - } - - /* free SSPI Schannel API credential handle */ - if(connssl->cred) { - Curl_ssl_sessionid_lock(conn); - Curl_schannel_session_free(connssl->cred); - Curl_ssl_sessionid_unlock(conn); - connssl->cred = NULL; - } - - /* free internal buffer for received encrypted data */ - if(connssl->encdata_buffer != NULL) { - Curl_safefree(connssl->encdata_buffer); - connssl->encdata_length = 0; - connssl->encdata_offset = 0; - } - - /* free internal buffer for received decrypted data */ - if(connssl->decdata_buffer != NULL) { - Curl_safefree(connssl->decdata_buffer); - connssl->decdata_length = 0; - connssl->decdata_offset = 0; - } - - return CURLE_OK; -} - -void Curl_schannel_session_free(void *ptr) -{ - /* this is expected to be called under sessionid lock */ - struct curl_schannel_cred *cred = ptr; - - cred->refcount--; - if(cred->refcount == 0) { - s_pSecFn->FreeCredentialsHandle(&cred->cred_handle); - Curl_safefree(cred); - } -} - -int Curl_schannel_init(void) -{ - return (Curl_sspi_global_init() == CURLE_OK ? 1 : 0); -} - -void Curl_schannel_cleanup(void) -{ - Curl_sspi_global_cleanup(); -} - -size_t Curl_schannel_version(char *buffer, size_t size) -{ - size = snprintf(buffer, size, "WinSSL"); - - return size; -} - -CURLcode Curl_schannel_random(unsigned char *entropy, size_t length) -{ - HCRYPTPROV hCryptProv = 0; - - if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) - return CURLE_FAILED_INIT; - - if(!CryptGenRandom(hCryptProv, (DWORD)length, entropy)) { - CryptReleaseContext(hCryptProv, 0UL); - return CURLE_FAILED_INIT; - } - - CryptReleaseContext(hCryptProv, 0UL); - return CURLE_OK; -} - -#ifdef _WIN32_WCE -static CURLcode verify_certificate(struct connectdata *conn, int sockindex) -{ - SECURITY_STATUS status; - struct Curl_easy *data = conn->data; - struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - CURLcode result = CURLE_OK; - CERT_CONTEXT *pCertContextServer = NULL; - const CERT_CHAIN_CONTEXT *pChainContext = NULL; - const char * const conn_hostname = SSL_IS_PROXY() ? - conn->http_proxy.host.name : - conn->host.name; - - status = s_pSecFn->QueryContextAttributes(&connssl->ctxt->ctxt_handle, - SECPKG_ATTR_REMOTE_CERT_CONTEXT, - &pCertContextServer); - - if((status != SEC_E_OK) || (pCertContextServer == NULL)) { - failf(data, "schannel: Failed to read remote certificate context: %s", - Curl_sspi_strerror(conn, status)); - result = CURLE_PEER_FAILED_VERIFICATION; - } - - if(result == CURLE_OK) { - CERT_CHAIN_PARA ChainPara; - memset(&ChainPara, 0, sizeof(ChainPara)); - ChainPara.cbSize = sizeof(ChainPara); - - if(!CertGetCertificateChain(NULL, - pCertContextServer, - NULL, - pCertContextServer->hCertStore, - &ChainPara, - (data->set.ssl.no_revoke ? 0 : - CERT_CHAIN_REVOCATION_CHECK_CHAIN), - NULL, - &pChainContext)) { - failf(data, "schannel: CertGetCertificateChain failed: %s", - Curl_sspi_strerror(conn, GetLastError())); - pChainContext = NULL; - result = CURLE_PEER_FAILED_VERIFICATION; - } - - if(result == CURLE_OK) { - CERT_SIMPLE_CHAIN *pSimpleChain = pChainContext->rgpChain[0]; - DWORD dwTrustErrorMask = ~(DWORD)(CERT_TRUST_IS_NOT_TIME_NESTED); - dwTrustErrorMask &= pSimpleChain->TrustStatus.dwErrorStatus; - if(dwTrustErrorMask) { - if(dwTrustErrorMask & CERT_TRUST_IS_REVOKED) - failf(data, "schannel: CertGetCertificateChain trust error" - " CERT_TRUST_IS_REVOKED"); - else if(dwTrustErrorMask & CERT_TRUST_IS_PARTIAL_CHAIN) - failf(data, "schannel: CertGetCertificateChain trust error" - " CERT_TRUST_IS_PARTIAL_CHAIN"); - else if(dwTrustErrorMask & CERT_TRUST_IS_UNTRUSTED_ROOT) - failf(data, "schannel: CertGetCertificateChain trust error" - " CERT_TRUST_IS_UNTRUSTED_ROOT"); - else if(dwTrustErrorMask & CERT_TRUST_IS_NOT_TIME_VALID) - failf(data, "schannel: CertGetCertificateChain trust error" - " CERT_TRUST_IS_NOT_TIME_VALID"); - else - failf(data, "schannel: CertGetCertificateChain error mask: 0x%08x", - dwTrustErrorMask); - result = CURLE_PEER_FAILED_VERIFICATION; - } - } - } - - if(result == CURLE_OK) { - if(conn->ssl_config.verifyhost) { - TCHAR cert_hostname_buff[256]; - DWORD len; - - /* TODO: Fix this for certificates with multiple alternative names. - Right now we're only asking for the first preferred alternative name. - Instead we'd need to do all via CERT_NAME_SEARCH_ALL_NAMES_FLAG - (if WinCE supports that?) and run this section in a loop for each. - https://msdn.microsoft.com/en-us/library/windows/desktop/aa376086.aspx - curl: (51) schannel: CertGetNameString() certificate hostname - (.google.com) did not match connection (google.com) - */ - len = CertGetNameString(pCertContextServer, - CERT_NAME_DNS_TYPE, - CERT_NAME_DISABLE_IE4_UTF8_FLAG, - NULL, - cert_hostname_buff, - 256); - if(len > 0) { - const char *cert_hostname; - - /* Comparing the cert name and the connection hostname encoded as UTF-8 - * is acceptable since both values are assumed to use ASCII - * (or some equivalent) encoding - */ - cert_hostname = Curl_convert_tchar_to_UTF8(cert_hostname_buff); - if(!cert_hostname) { - result = CURLE_OUT_OF_MEMORY; - } - else{ - int match_result; - - match_result = Curl_cert_hostcheck(cert_hostname, conn->host.name); - if(match_result == CURL_HOST_MATCH) { - infof(data, - "schannel: connection hostname (%s) validated " - "against certificate name (%s)\n", - conn->host.name, - cert_hostname); - result = CURLE_OK; - } - else{ - failf(data, - "schannel: connection hostname (%s) " - "does not match certificate name (%s)", - conn->host.name, - cert_hostname); - result = CURLE_PEER_FAILED_VERIFICATION; - } - Curl_unicodefree(cert_hostname); - } - } - else { - failf(data, - "schannel: CertGetNameString did not provide any " - "certificate name information"); - result = CURLE_PEER_FAILED_VERIFICATION; - } - } - } - - if(pChainContext) - CertFreeCertificateChain(pChainContext); - - if(pCertContextServer) - CertFreeCertificateContext(pCertContextServer); - - return result; -} -#endif /* _WIN32_WCE */ - -#endif /* USE_SCHANNEL */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/schannel.h b/build/premake/premake5/contrib/curl/lib/vtls/schannel.h deleted file mode 100644 index 8627c63c9e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/schannel.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef HEADER_CURL_SCHANNEL_H -#define HEADER_CURL_SCHANNEL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2012, Marc Hoersken, , et al. - * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#ifdef USE_SCHANNEL - -#include "urldata.h" - -#ifndef UNISP_NAME_A -#define UNISP_NAME_A "Microsoft Unified Security Protocol Provider" -#endif - -#ifndef UNISP_NAME_W -#define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider" -#endif - -#ifndef UNISP_NAME -#ifdef UNICODE -#define UNISP_NAME UNISP_NAME_W -#else -#define UNISP_NAME UNISP_NAME_A -#endif -#endif - -#ifndef SP_PROT_SSL2_CLIENT -#define SP_PROT_SSL2_CLIENT 0x00000008 -#endif - -#ifndef SP_PROT_SSL3_CLIENT -#define SP_PROT_SSL3_CLIENT 0x00000008 -#endif - -#ifndef SP_PROT_TLS1_CLIENT -#define SP_PROT_TLS1_CLIENT 0x00000080 -#endif - -#ifndef SP_PROT_TLS1_0_CLIENT -#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT -#endif - -#ifndef SP_PROT_TLS1_1_CLIENT -#define SP_PROT_TLS1_1_CLIENT 0x00000200 -#endif - -#ifndef SP_PROT_TLS1_2_CLIENT -#define SP_PROT_TLS1_2_CLIENT 0x00000800 -#endif - -#ifndef SECBUFFER_ALERT -#define SECBUFFER_ALERT 17 -#endif - -/* Both schannel buffer sizes must be > 0 */ -#define CURL_SCHANNEL_BUFFER_INIT_SIZE 4096 -#define CURL_SCHANNEL_BUFFER_FREE_SIZE 1024 - - -CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex); - -CURLcode Curl_schannel_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); - -bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex); -void Curl_schannel_close(struct connectdata *conn, int sockindex); -int Curl_schannel_shutdown(struct connectdata *conn, int sockindex); -void Curl_schannel_session_free(void *ptr); - -int Curl_schannel_init(void); -void Curl_schannel_cleanup(void); -size_t Curl_schannel_version(char *buffer, size_t size); - -CURLcode Curl_schannel_random(unsigned char *entropy, size_t length); - -/* Set the API backend definition to Schannel */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL - -/* this backend supports CURLOPT_CERTINFO */ -#define have_curlssl_certinfo 1 - -/* API setup for Schannel */ -#define curlssl_init Curl_schannel_init -#define curlssl_cleanup Curl_schannel_cleanup -#define curlssl_connect Curl_schannel_connect -#define curlssl_connect_nonblocking Curl_schannel_connect_nonblocking -#define curlssl_session_free Curl_schannel_session_free -#define curlssl_close_all(x) ((void)x) -#define curlssl_close Curl_schannel_close -#define curlssl_shutdown Curl_schannel_shutdown -#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN) -#define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN) -#define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) -#define curlssl_version Curl_schannel_version -#define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending Curl_schannel_data_pending -#define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z)) - -#endif /* USE_SCHANNEL */ -#endif /* HEADER_CURL_SCHANNEL_H */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/vtls.c b/build/premake/premake5/contrib/curl/lib/vtls/vtls.c deleted file mode 100644 index f40a97712e..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/vtls.c +++ /dev/null @@ -1,969 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -/* This file is for implementing all "generic" SSL functions that all libcurl - internals should use. It is then responsible for calling the proper - "backend" function. - - SSL-functions in libcurl should call functions in this source file, and not - to any specific SSL-layer. - - Curl_ssl_ - prefix for generic ones - Curl_ossl_ - prefix for OpenSSL ones - Curl_gtls_ - prefix for GnuTLS ones - Curl_nss_ - prefix for NSS ones - Curl_gskit_ - prefix for GSKit ones - Curl_polarssl_ - prefix for PolarSSL ones - Curl_cyassl_ - prefix for CyaSSL ones - Curl_schannel_ - prefix for Schannel SSPI ones - Curl_darwinssl_ - prefix for SecureTransport (Darwin) ones - - Note that this source code uses curlssl_* functions, and they are all - defines/macros #defined by the lib-specific header files. - - "SSL/TLS Strong Encryption: An Introduction" - https://httpd.apache.org/docs/2.0/ssl/ssl_intro.html -*/ - -#include "curl_setup.h" - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#include "urldata.h" - -#include "vtls.h" /* generic SSL protos etc */ -#include "slist.h" -#include "sendf.h" -#include "strcase.h" -#include "url.h" -#include "progress.h" -#include "share.h" -#include "multiif.h" -#include "timeval.h" -#include "curl_md5.h" -#include "warnless.h" -#include "curl_base64.h" -#include "curl_printf.h" - -/* The last #include files should be: */ -#include "curl_memory.h" -#include "memdebug.h" - -/* convenience macro to check if this handle is using a shared SSL session */ -#define SSLSESSION_SHARED(data) (data->share && \ - (data->share->specifier & \ - (1<var) { \ - dest->var = strdup(source->var); \ - if(!dest->var) \ - return FALSE; \ - } \ - else \ - dest->var = NULL; - -bool -Curl_ssl_config_matches(struct ssl_primary_config* data, - struct ssl_primary_config* needle) -{ - if((data->version == needle->version) && - (data->verifypeer == needle->verifypeer) && - (data->verifyhost == needle->verifyhost) && - Curl_safe_strcasecompare(data->CApath, needle->CApath) && - Curl_safe_strcasecompare(data->CAfile, needle->CAfile) && - Curl_safe_strcasecompare(data->clientcert, needle->clientcert) && - Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list)) - return TRUE; - - return FALSE; -} - -bool -Curl_clone_primary_ssl_config(struct ssl_primary_config *source, - struct ssl_primary_config *dest) -{ - dest->verifyhost = source->verifyhost; - dest->verifypeer = source->verifypeer; - dest->version = source->version; - - CLONE_STRING(CAfile); - CLONE_STRING(CApath); - CLONE_STRING(cipher_list); - CLONE_STRING(egdsocket); - CLONE_STRING(random_file); - CLONE_STRING(clientcert); - return TRUE; -} - -void Curl_free_primary_ssl_config(struct ssl_primary_config* sslc) -{ - Curl_safefree(sslc->CAfile); - Curl_safefree(sslc->CApath); - Curl_safefree(sslc->cipher_list); - Curl_safefree(sslc->egdsocket); - Curl_safefree(sslc->random_file); - Curl_safefree(sslc->clientcert); -} - -int Curl_ssl_backend(void) -{ - return (int)CURL_SSL_BACKEND; -} - -#ifdef USE_SSL - -/* "global" init done? */ -static bool init_ssl=FALSE; - -/** - * Global SSL init - * - * @retval 0 error initializing SSL - * @retval 1 SSL initialized successfully - */ -int Curl_ssl_init(void) -{ - /* make sure this is only done once */ - if(init_ssl) - return 1; - init_ssl = TRUE; /* never again */ - - return curlssl_init(); -} - - -/* Global cleanup */ -void Curl_ssl_cleanup(void) -{ - if(init_ssl) { - /* only cleanup if we did a previous init */ - curlssl_cleanup(); - init_ssl = FALSE; - } -} - -static bool ssl_prefs_check(struct Curl_easy *data) -{ - /* check for CURLOPT_SSLVERSION invalid parameter value */ - if((data->set.ssl.primary.version < 0) - || (data->set.ssl.primary.version >= CURL_SSLVERSION_LAST)) { - failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION"); - return FALSE; - } - return TRUE; -} - -static CURLcode -ssl_connect_init_proxy(struct connectdata *conn, int sockindex) -{ - DEBUGASSERT(conn->bits.proxy_ssl_connected[sockindex]); - if(ssl_connection_complete == conn->ssl[sockindex].state && - !conn->proxy_ssl[sockindex].use) { -#if defined(HTTPS_PROXY_SUPPORT) - conn->proxy_ssl[sockindex] = conn->ssl[sockindex]; - memset(&conn->ssl[sockindex], 0, sizeof(conn->ssl[sockindex])); -#else - return CURLE_NOT_BUILT_IN; -#endif - } - return CURLE_OK; -} - -CURLcode -Curl_ssl_connect(struct connectdata *conn, int sockindex) -{ - CURLcode result; - - if(conn->bits.proxy_ssl_connected[sockindex]) { - result = ssl_connect_init_proxy(conn, sockindex); - if(result) - return result; - } - - if(!ssl_prefs_check(conn->data)) - return CURLE_SSL_CONNECT_ERROR; - - /* mark this is being ssl-enabled from here on. */ - conn->ssl[sockindex].use = TRUE; - conn->ssl[sockindex].state = ssl_connection_negotiating; - - result = curlssl_connect(conn, sockindex); - - if(!result) - Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ - - return result; -} - -CURLcode -Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex, - bool *done) -{ - CURLcode result; - if(conn->bits.proxy_ssl_connected[sockindex]) { - result = ssl_connect_init_proxy(conn, sockindex); - if(result) - return result; - } - - if(!ssl_prefs_check(conn->data)) - return CURLE_SSL_CONNECT_ERROR; - - /* mark this is being ssl requested from here on. */ - conn->ssl[sockindex].use = TRUE; -#ifdef curlssl_connect_nonblocking - result = curlssl_connect_nonblocking(conn, sockindex, done); -#else - *done = TRUE; /* fallback to BLOCKING */ - result = curlssl_connect(conn, sockindex); -#endif /* non-blocking connect support */ - if(!result && *done) - Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ - return result; -} - -/* - * Lock shared SSL session data - */ -void Curl_ssl_sessionid_lock(struct connectdata *conn) -{ - if(SSLSESSION_SHARED(conn->data)) - Curl_share_lock(conn->data, - CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE); -} - -/* - * Unlock shared SSL session data - */ -void Curl_ssl_sessionid_unlock(struct connectdata *conn) -{ - if(SSLSESSION_SHARED(conn->data)) - Curl_share_unlock(conn->data, CURL_LOCK_DATA_SSL_SESSION); -} - -/* - * Check if there's a session ID for the given connection in the cache, and if - * there's one suitable, it is provided. Returns TRUE when no entry matched. - */ -bool Curl_ssl_getsessionid(struct connectdata *conn, - void **ssl_sessionid, - size_t *idsize, /* set 0 if unknown */ - int sockindex) -{ - struct curl_ssl_session *check; - struct Curl_easy *data = conn->data; - size_t i; - long *general_age; - bool no_match = TRUE; - - const bool isProxy = CONNECT_PROXY_SSL(); - struct ssl_primary_config * const ssl_config = isProxy ? - &conn->proxy_ssl_config : - &conn->ssl_config; - const char * const name = isProxy ? conn->http_proxy.host.name : - conn->host.name; - int port = isProxy ? (int)conn->port : conn->remote_port; - *ssl_sessionid = NULL; - - DEBUGASSERT(data->set.general_ssl.sessionid); - - if(!data->set.general_ssl.sessionid) - /* session ID re-use is disabled */ - return TRUE; - - /* Lock if shared */ - if(SSLSESSION_SHARED(data)) - general_age = &data->share->sessionage; - else - general_age = &data->state.sessionage; - - for(i = 0; i < data->set.general_ssl.max_ssl_sessions; i++) { - check = &data->state.session[i]; - if(!check->sessionid) - /* not session ID means blank entry */ - continue; - if(strcasecompare(name, check->name) && - ((!conn->bits.conn_to_host && !check->conn_to_host) || - (conn->bits.conn_to_host && check->conn_to_host && - strcasecompare(conn->conn_to_host.name, check->conn_to_host))) && - ((!conn->bits.conn_to_port && check->conn_to_port == -1) || - (conn->bits.conn_to_port && check->conn_to_port != -1 && - conn->conn_to_port == check->conn_to_port)) && - (port == check->remote_port) && - strcasecompare(conn->handler->scheme, check->scheme) && - Curl_ssl_config_matches(ssl_config, &check->ssl_config)) { - /* yes, we have a session ID! */ - (*general_age)++; /* increase general age */ - check->age = *general_age; /* set this as used in this age */ - *ssl_sessionid = check->sessionid; - if(idsize) - *idsize = check->idsize; - no_match = FALSE; - break; - } - } - - return no_match; -} - -/* - * Kill a single session ID entry in the cache. - */ -void Curl_ssl_kill_session(struct curl_ssl_session *session) -{ - if(session->sessionid) { - /* defensive check */ - - /* free the ID the SSL-layer specific way */ - curlssl_session_free(session->sessionid); - - session->sessionid = NULL; - session->age = 0; /* fresh */ - - Curl_free_primary_ssl_config(&session->ssl_config); - - Curl_safefree(session->name); - Curl_safefree(session->conn_to_host); - } -} - -/* - * Delete the given session ID from the cache. - */ -void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid) -{ - size_t i; - struct Curl_easy *data=conn->data; - - for(i = 0; i < data->set.general_ssl.max_ssl_sessions; i++) { - struct curl_ssl_session *check = &data->state.session[i]; - - if(check->sessionid == ssl_sessionid) { - Curl_ssl_kill_session(check); - break; - } - } -} - -/* - * Store session id in the session cache. The ID passed on to this function - * must already have been extracted and allocated the proper way for the SSL - * layer. Curl_XXXX_session_free() will be called to free/kill the session ID - * later on. - */ -CURLcode Curl_ssl_addsessionid(struct connectdata *conn, - void *ssl_sessionid, - size_t idsize, - int sockindex) -{ - size_t i; - struct Curl_easy *data=conn->data; /* the mother of all structs */ - struct curl_ssl_session *store = &data->state.session[0]; - long oldest_age=data->state.session[0].age; /* zero if unused */ - char *clone_host; - char *clone_conn_to_host; - int conn_to_port; - long *general_age; - const bool isProxy = CONNECT_PROXY_SSL(); - struct ssl_primary_config * const ssl_config = isProxy ? - &conn->proxy_ssl_config : - &conn->ssl_config; - - DEBUGASSERT(data->set.general_ssl.sessionid); - - clone_host = strdup(isProxy ? conn->http_proxy.host.name : conn->host.name); - if(!clone_host) - return CURLE_OUT_OF_MEMORY; /* bail out */ - - if(conn->bits.conn_to_host) { - clone_conn_to_host = strdup(conn->conn_to_host.name); - if(!clone_conn_to_host) { - free(clone_host); - return CURLE_OUT_OF_MEMORY; /* bail out */ - } - } - else - clone_conn_to_host = NULL; - - if(conn->bits.conn_to_port) - conn_to_port = conn->conn_to_port; - else - conn_to_port = -1; - - /* Now we should add the session ID and the host name to the cache, (remove - the oldest if necessary) */ - - /* If using shared SSL session, lock! */ - if(SSLSESSION_SHARED(data)) { - general_age = &data->share->sessionage; - } - else { - general_age = &data->state.sessionage; - } - - /* find an empty slot for us, or find the oldest */ - for(i = 1; (i < data->set.general_ssl.max_ssl_sessions) && - data->state.session[i].sessionid; i++) { - if(data->state.session[i].age < oldest_age) { - oldest_age = data->state.session[i].age; - store = &data->state.session[i]; - } - } - if(i == data->set.general_ssl.max_ssl_sessions) - /* cache is full, we must "kill" the oldest entry! */ - Curl_ssl_kill_session(store); - else - store = &data->state.session[i]; /* use this slot */ - - /* now init the session struct wisely */ - store->sessionid = ssl_sessionid; - store->idsize = idsize; - store->age = *general_age; /* set current age */ - /* free it if there's one already present */ - free(store->name); - free(store->conn_to_host); - store->name = clone_host; /* clone host name */ - store->conn_to_host = clone_conn_to_host; /* clone connect to host name */ - store->conn_to_port = conn_to_port; /* connect to port number */ - /* port number */ - store->remote_port = isProxy ? (int)conn->port : conn->remote_port; - store->scheme = conn->handler->scheme; - - if(!Curl_clone_primary_ssl_config(ssl_config, &store->ssl_config)) { - store->sessionid = NULL; /* let caller free sessionid */ - free(clone_host); - free(clone_conn_to_host); - return CURLE_OUT_OF_MEMORY; - } - - return CURLE_OK; -} - - -void Curl_ssl_close_all(struct Curl_easy *data) -{ - size_t i; - /* kill the session ID cache if not shared */ - if(data->state.session && !SSLSESSION_SHARED(data)) { - for(i = 0; i < data->set.general_ssl.max_ssl_sessions; i++) - /* the single-killer function handles empty table slots */ - Curl_ssl_kill_session(&data->state.session[i]); - - /* free the cache data */ - Curl_safefree(data->state.session); - } - - curlssl_close_all(data); -} - -#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \ - defined(USE_DARWINSSL) || defined(USE_POLARSSL) || defined(USE_NSS) || \ - defined(USE_MBEDTLS) -int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks) -{ - struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET]; - - if(!numsocks) - return GETSOCK_BLANK; - - if(connssl->connecting_state == ssl_connect_2_writing) { - /* write mode */ - socks[0] = conn->sock[FIRSTSOCKET]; - return GETSOCK_WRITESOCK(0); - } - else if(connssl->connecting_state == ssl_connect_2_reading) { - /* read mode */ - socks[0] = conn->sock[FIRSTSOCKET]; - return GETSOCK_READSOCK(0); - } - - return GETSOCK_BLANK; -} -#else -int Curl_ssl_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - (void)conn; - (void)socks; - (void)numsocks; - return GETSOCK_BLANK; -} -/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */ -#endif - -void Curl_ssl_close(struct connectdata *conn, int sockindex) -{ - DEBUGASSERT((sockindex <= 1) && (sockindex >= -1)); - curlssl_close(conn, sockindex); -} - -CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex) -{ - if(curlssl_shutdown(conn, sockindex)) - return CURLE_SSL_SHUTDOWN_FAILED; - - conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */ - conn->ssl[sockindex].state = ssl_connection_none; - - conn->recv[sockindex] = Curl_recv_plain; - conn->send[sockindex] = Curl_send_plain; - - return CURLE_OK; -} - -/* Selects an SSL crypto engine - */ -CURLcode Curl_ssl_set_engine(struct Curl_easy *data, const char *engine) -{ - return curlssl_set_engine(data, engine); -} - -/* Selects the default SSL crypto engine - */ -CURLcode Curl_ssl_set_engine_default(struct Curl_easy *data) -{ - return curlssl_set_engine_default(data); -} - -/* Return list of OpenSSL crypto engine names. */ -struct curl_slist *Curl_ssl_engines_list(struct Curl_easy *data) -{ - return curlssl_engines_list(data); -} - -/* - * This sets up a session ID cache to the specified size. Make sure this code - * is agnostic to what underlying SSL technology we use. - */ -CURLcode Curl_ssl_initsessions(struct Curl_easy *data, size_t amount) -{ - struct curl_ssl_session *session; - - if(data->state.session) - /* this is just a precaution to prevent multiple inits */ - return CURLE_OK; - - session = calloc(amount, sizeof(struct curl_ssl_session)); - if(!session) - return CURLE_OUT_OF_MEMORY; - - /* store the info in the SSL section */ - data->set.general_ssl.max_ssl_sessions = amount; - data->state.session = session; - data->state.sessionage = 1; /* this is brand new */ - return CURLE_OK; -} - -size_t Curl_ssl_version(char *buffer, size_t size) -{ - return curlssl_version(buffer, size); -} - -/* - * This function tries to determine connection status. - * - * Return codes: - * 1 means the connection is still in place - * 0 means the connection has been closed - * -1 means the connection status is unknown - */ -int Curl_ssl_check_cxn(struct connectdata *conn) -{ - return curlssl_check_cxn(conn); -} - -bool Curl_ssl_data_pending(const struct connectdata *conn, - int connindex) -{ - return curlssl_data_pending(conn, connindex); -} - -void Curl_ssl_free_certinfo(struct Curl_easy *data) -{ - int i; - struct curl_certinfo *ci = &data->info.certs; - - if(ci->num_of_certs) { - /* free all individual lists used */ - for(i=0; inum_of_certs; i++) { - curl_slist_free_all(ci->certinfo[i]); - ci->certinfo[i] = NULL; - } - - free(ci->certinfo); /* free the actual array too */ - ci->certinfo = NULL; - ci->num_of_certs = 0; - } -} - -CURLcode Curl_ssl_init_certinfo(struct Curl_easy *data, int num) -{ - struct curl_certinfo *ci = &data->info.certs; - struct curl_slist **table; - - /* Free any previous certificate information structures */ - Curl_ssl_free_certinfo(data); - - /* Allocate the required certificate information structures */ - table = calloc((size_t) num, sizeof(struct curl_slist *)); - if(!table) - return CURLE_OUT_OF_MEMORY; - - ci->num_of_certs = num; - ci->certinfo = table; - - return CURLE_OK; -} - -/* - * 'value' is NOT a zero terminated string - */ -CURLcode Curl_ssl_push_certinfo_len(struct Curl_easy *data, - int certnum, - const char *label, - const char *value, - size_t valuelen) -{ - struct curl_certinfo *ci = &data->info.certs; - char *output; - struct curl_slist *nl; - CURLcode result = CURLE_OK; - size_t labellen = strlen(label); - size_t outlen = labellen + 1 + valuelen + 1; /* label:value\0 */ - - output = malloc(outlen); - if(!output) - return CURLE_OUT_OF_MEMORY; - - /* sprintf the label and colon */ - snprintf(output, outlen, "%s:", label); - - /* memcpy the value (it might not be zero terminated) */ - memcpy(&output[labellen+1], value, valuelen); - - /* zero terminate the output */ - output[labellen + 1 + valuelen] = 0; - - nl = Curl_slist_append_nodup(ci->certinfo[certnum], output); - if(!nl) { - free(output); - curl_slist_free_all(ci->certinfo[certnum]); - result = CURLE_OUT_OF_MEMORY; - } - - ci->certinfo[certnum] = nl; - return result; -} - -/* - * This is a convenience function for push_certinfo_len that takes a zero - * terminated value. - */ -CURLcode Curl_ssl_push_certinfo(struct Curl_easy *data, - int certnum, - const char *label, - const char *value) -{ - size_t valuelen = strlen(value); - - return Curl_ssl_push_certinfo_len(data, certnum, label, value, valuelen); -} - -CURLcode Curl_ssl_random(struct Curl_easy *data, - unsigned char *entropy, - size_t length) -{ - return curlssl_random(data, entropy, length); -} - -/* - * Public key pem to der conversion - */ - -static CURLcode pubkey_pem_to_der(const char *pem, - unsigned char **der, size_t *der_len) -{ - char *stripped_pem, *begin_pos, *end_pos; - size_t pem_count, stripped_pem_count = 0, pem_len; - CURLcode result; - - /* if no pem, exit. */ - if(!pem) - return CURLE_BAD_CONTENT_ENCODING; - - begin_pos = strstr(pem, "-----BEGIN PUBLIC KEY-----"); - if(!begin_pos) - return CURLE_BAD_CONTENT_ENCODING; - - pem_count = begin_pos - pem; - /* Invalid if not at beginning AND not directly following \n */ - if(0 != pem_count && '\n' != pem[pem_count - 1]) - return CURLE_BAD_CONTENT_ENCODING; - - /* 26 is length of "-----BEGIN PUBLIC KEY-----" */ - pem_count += 26; - - /* Invalid if not directly following \n */ - end_pos = strstr(pem + pem_count, "\n-----END PUBLIC KEY-----"); - if(!end_pos) - return CURLE_BAD_CONTENT_ENCODING; - - pem_len = end_pos - pem; - - stripped_pem = malloc(pem_len - pem_count + 1); - if(!stripped_pem) - return CURLE_OUT_OF_MEMORY; - - /* - * Here we loop through the pem array one character at a time between the - * correct indices, and place each character that is not '\n' or '\r' - * into the stripped_pem array, which should represent the raw base64 string - */ - while(pem_count < pem_len) { - if('\n' != pem[pem_count] && '\r' != pem[pem_count]) - stripped_pem[stripped_pem_count++] = pem[pem_count]; - ++pem_count; - } - /* Place the null terminator in the correct place */ - stripped_pem[stripped_pem_count] = '\0'; - - result = Curl_base64_decode(stripped_pem, der, der_len); - - Curl_safefree(stripped_pem); - - return result; -} - -/* - * Generic pinned public key check. - */ - -CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, - const char *pinnedpubkey, - const unsigned char *pubkey, size_t pubkeylen) -{ - FILE *fp; - unsigned char *buf = NULL, *pem_ptr = NULL; - long filesize; - size_t size, pem_len; - CURLcode pem_read; - CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; -#ifdef curlssl_sha256sum - CURLcode encode; - size_t encodedlen, pinkeylen; - char *encoded, *pinkeycopy, *begin_pos, *end_pos; - unsigned char *sha256sumdigest = NULL; -#endif - - /* if a path wasn't specified, don't pin */ - if(!pinnedpubkey) - return CURLE_OK; - if(!pubkey || !pubkeylen) - return result; - - /* only do this if pinnedpubkey starts with "sha256//", length 8 */ - if(strncmp(pinnedpubkey, "sha256//", 8) == 0) { -#ifdef curlssl_sha256sum - /* compute sha256sum of public key */ - sha256sumdigest = malloc(SHA256_DIGEST_LENGTH); - if(!sha256sumdigest) - return CURLE_OUT_OF_MEMORY; - curlssl_sha256sum(pubkey, pubkeylen, - sha256sumdigest, SHA256_DIGEST_LENGTH); - encode = Curl_base64_encode(data, (char *)sha256sumdigest, - SHA256_DIGEST_LENGTH, &encoded, &encodedlen); - Curl_safefree(sha256sumdigest); - - if(encode) - return encode; - - infof(data, "\t public key hash: sha256//%s\n", encoded); - - /* it starts with sha256//, copy so we can modify it */ - pinkeylen = strlen(pinnedpubkey) + 1; - pinkeycopy = malloc(pinkeylen); - if(!pinkeycopy) { - Curl_safefree(encoded); - return CURLE_OUT_OF_MEMORY; - } - memcpy(pinkeycopy, pinnedpubkey, pinkeylen); - /* point begin_pos to the copy, and start extracting keys */ - begin_pos = pinkeycopy; - do { - end_pos = strstr(begin_pos, ";sha256//"); - /* - * if there is an end_pos, null terminate, - * otherwise it'll go to the end of the original string - */ - if(end_pos) - end_pos[0] = '\0'; - - /* compare base64 sha256 digests, 8 is the length of "sha256//" */ - if(encodedlen == strlen(begin_pos + 8) && - !memcmp(encoded, begin_pos + 8, encodedlen)) { - result = CURLE_OK; - break; - } - - /* - * change back the null-terminator we changed earlier, - * and look for next begin - */ - if(end_pos) { - end_pos[0] = ';'; - begin_pos = strstr(end_pos, "sha256//"); - } - } while(end_pos && begin_pos); - Curl_safefree(encoded); - Curl_safefree(pinkeycopy); -#else - /* without sha256 support, this cannot match */ - (void)data; -#endif - return result; - } - - fp = fopen(pinnedpubkey, "rb"); - if(!fp) - return result; - - do { - /* Determine the file's size */ - if(fseek(fp, 0, SEEK_END)) - break; - filesize = ftell(fp); - if(fseek(fp, 0, SEEK_SET)) - break; - if(filesize < 0 || filesize > MAX_PINNED_PUBKEY_SIZE) - break; - - /* - * if the size of our certificate is bigger than the file - * size then it can't match - */ - size = curlx_sotouz((curl_off_t) filesize); - if(pubkeylen > size) - break; - - /* - * Allocate buffer for the pinned key - * With 1 additional byte for null terminator in case of PEM key - */ - buf = malloc(size + 1); - if(!buf) - break; - - /* Returns number of elements read, which should be 1 */ - if((int) fread(buf, size, 1, fp) != 1) - break; - - /* If the sizes are the same, it can't be base64 encoded, must be der */ - if(pubkeylen == size) { - if(!memcmp(pubkey, buf, pubkeylen)) - result = CURLE_OK; - break; - } - - /* - * Otherwise we will assume it's PEM and try to decode it - * after placing null terminator - */ - buf[size] = '\0'; - pem_read = pubkey_pem_to_der((const char *)buf, &pem_ptr, &pem_len); - /* if it wasn't read successfully, exit */ - if(pem_read) - break; - - /* - * if the size of our certificate doesn't match the size of - * the decoded file, they can't be the same, otherwise compare - */ - if(pubkeylen == pem_len && !memcmp(pubkey, pem_ptr, pubkeylen)) - result = CURLE_OK; - } while(0); - - Curl_safefree(buf); - Curl_safefree(pem_ptr); - fclose(fp); - - return result; -} - -#ifndef CURL_DISABLE_CRYPTO_AUTH -CURLcode Curl_ssl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len) -{ -#ifdef curlssl_md5sum - curlssl_md5sum(tmp, tmplen, md5sum, md5len); -#else - MD5_context *MD5pw; - - (void) md5len; - - MD5pw = Curl_MD5_init(Curl_DIGEST_MD5); - if(!MD5pw) - return CURLE_OUT_OF_MEMORY; - Curl_MD5_update(MD5pw, tmp, curlx_uztoui(tmplen)); - Curl_MD5_final(MD5pw, md5sum); -#endif - return CURLE_OK; -} -#endif - -/* - * Check whether the SSL backend supports the status_request extension. - */ -bool Curl_ssl_cert_status_request(void) -{ -#ifdef curlssl_cert_status_request - return curlssl_cert_status_request(); -#else - return FALSE; -#endif -} - -/* - * Check whether the SSL backend supports false start. - */ -bool Curl_ssl_false_start(void) -{ -#ifdef curlssl_false_start - return curlssl_false_start(); -#else - return FALSE; -#endif -} - -#endif /* USE_SSL */ diff --git a/build/premake/premake5/contrib/curl/lib/vtls/vtls.h b/build/premake/premake5/contrib/curl/lib/vtls/vtls.h deleted file mode 100644 index 2aabeda20a..0000000000 --- a/build/premake/premake5/contrib/curl/lib/vtls/vtls.h +++ /dev/null @@ -1,202 +0,0 @@ -#ifndef HEADER_CURL_VTLS_H -#define HEADER_CURL_VTLS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ -#include "curl_setup.h" - -#include "openssl.h" /* OpenSSL versions */ -#include "gtls.h" /* GnuTLS versions */ -#include "nssg.h" /* NSS versions */ -#include "gskit.h" /* Global Secure ToolKit versions */ -#include "polarssl.h" /* PolarSSL versions */ -#include "axtls.h" /* axTLS versions */ -#include "cyassl.h" /* CyaSSL versions */ -#include "schannel.h" /* Schannel SSPI version */ -#include "darwinssl.h" /* SecureTransport (Darwin) version */ -#include "mbedtls.h" /* mbedTLS versions */ - -#ifndef MAX_PINNED_PUBKEY_SIZE -#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */ -#endif - -#ifndef MD5_DIGEST_LENGTH -#define MD5_DIGEST_LENGTH 16 /* fixed size */ -#endif - -#ifndef SHA256_DIGEST_LENGTH -#define SHA256_DIGEST_LENGTH 32 /* fixed size */ -#endif - -/* see https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */ -#define ALPN_HTTP_1_1_LENGTH 8 -#define ALPN_HTTP_1_1 "http/1.1" - -/* set of helper macros for the backends to access the correct fields. For the - proxy or for the remote host - to properly support HTTPS proxy */ - -#define SSL_IS_PROXY() (CURLPROXY_HTTPS == conn->http_proxy.proxytype && \ - ssl_connection_complete != conn->proxy_ssl[conn->sock[SECONDARYSOCKET] == \ - CURL_SOCKET_BAD ? FIRSTSOCKET : SECONDARYSOCKET].state) -#define SSL_SET_OPTION(var) (SSL_IS_PROXY() ? data->set.proxy_ssl.var : \ - data->set.ssl.var) -#define SSL_CONN_CONFIG(var) (SSL_IS_PROXY() ? \ - conn->proxy_ssl_config.var : conn->ssl_config.var) - -bool Curl_ssl_config_matches(struct ssl_primary_config* data, - struct ssl_primary_config* needle); -bool Curl_clone_primary_ssl_config(struct ssl_primary_config *source, - struct ssl_primary_config *dest); -void Curl_free_primary_ssl_config(struct ssl_primary_config* sslc); -int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks, - int numsocks); - -int Curl_ssl_backend(void); - -#ifdef USE_SSL -int Curl_ssl_init(void); -void Curl_ssl_cleanup(void); -CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex); -CURLcode Curl_ssl_connect_nonblocking(struct connectdata *conn, - int sockindex, - bool *done); -/* tell the SSL stuff to close down all open information regarding - connections (and thus session ID caching etc) */ -void Curl_ssl_close_all(struct Curl_easy *data); -void Curl_ssl_close(struct connectdata *conn, int sockindex); -CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex); -CURLcode Curl_ssl_set_engine(struct Curl_easy *data, const char *engine); -/* Sets engine as default for all SSL operations */ -CURLcode Curl_ssl_set_engine_default(struct Curl_easy *data); -struct curl_slist *Curl_ssl_engines_list(struct Curl_easy *data); - -/* init the SSL session ID cache */ -CURLcode Curl_ssl_initsessions(struct Curl_easy *, size_t); -size_t Curl_ssl_version(char *buffer, size_t size); -bool Curl_ssl_data_pending(const struct connectdata *conn, - int connindex); -int Curl_ssl_check_cxn(struct connectdata *conn); - -/* Certificate information list handling. */ - -void Curl_ssl_free_certinfo(struct Curl_easy *data); -CURLcode Curl_ssl_init_certinfo(struct Curl_easy *data, int num); -CURLcode Curl_ssl_push_certinfo_len(struct Curl_easy *data, int certnum, - const char *label, const char *value, - size_t valuelen); -CURLcode Curl_ssl_push_certinfo(struct Curl_easy *data, int certnum, - const char *label, const char *value); - -/* Functions to be used by SSL library adaptation functions */ - -/* Lock session cache mutex. - * Call this before calling other Curl_ssl_*session* functions - * Caller should unlock this mutex as soon as possible, as it may block - * other SSL connection from making progress. - * The purpose of explicitly locking SSL session cache data is to allow - * individual SSL engines to manage session lifetime in their specific way. - */ -void Curl_ssl_sessionid_lock(struct connectdata *conn); - -/* Unlock session cache mutex */ -void Curl_ssl_sessionid_unlock(struct connectdata *conn); - -/* extract a session ID - * Sessionid mutex must be locked (see Curl_ssl_sessionid_lock). - * Caller must make sure that the ownership of returned sessionid object - * is properly taken (e.g. its refcount is incremented - * under sessionid mutex). - */ -bool Curl_ssl_getsessionid(struct connectdata *conn, - void **ssl_sessionid, - size_t *idsize, /* set 0 if unknown */ - int sockindex); -/* add a new session ID - * Sessionid mutex must be locked (see Curl_ssl_sessionid_lock). - * Caller must ensure that it has properly shared ownership of this sessionid - * object with cache (e.g. incrementing refcount on success) - */ -CURLcode Curl_ssl_addsessionid(struct connectdata *conn, - void *ssl_sessionid, - size_t idsize, - int sockindex); -/* Kill a single session ID entry in the cache - * Sessionid mutex must be locked (see Curl_ssl_sessionid_lock). - * This will call engine-specific curlssl_session_free function, which must - * take sessionid object ownership from sessionid cache - * (e.g. decrement refcount). - */ -void Curl_ssl_kill_session(struct curl_ssl_session *session); -/* delete a session from the cache - * Sessionid mutex must be locked (see Curl_ssl_sessionid_lock). - * This will call engine-specific curlssl_session_free function, which must - * take sessionid object ownership from sessionid cache - * (e.g. decrement refcount). - */ -void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid); - -/* get N random bytes into the buffer */ -CURLcode Curl_ssl_random(struct Curl_easy *data, unsigned char *buffer, - size_t length); -CURLcode Curl_ssl_md5sum(unsigned char *tmp, /* input */ - size_t tmplen, - unsigned char *md5sum, /* output */ - size_t md5len); -/* Check pinned public key. */ -CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, - const char *pinnedpubkey, - const unsigned char *pubkey, size_t pubkeylen); - -bool Curl_ssl_cert_status_request(void); - -bool Curl_ssl_false_start(void); - -#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */ - -#else -/* Set the API backend definition to none */ -#define CURL_SSL_BACKEND CURLSSLBACKEND_NONE - -/* When SSL support is not present, just define away these function calls */ -#define Curl_ssl_init() 1 -#define Curl_ssl_cleanup() Curl_nop_stmt -#define Curl_ssl_connect(x,y) CURLE_NOT_BUILT_IN -#define Curl_ssl_close_all(x) Curl_nop_stmt -#define Curl_ssl_close(x,y) Curl_nop_stmt -#define Curl_ssl_shutdown(x,y) CURLE_NOT_BUILT_IN -#define Curl_ssl_set_engine(x,y) CURLE_NOT_BUILT_IN -#define Curl_ssl_set_engine_default(x) CURLE_NOT_BUILT_IN -#define Curl_ssl_engines_list(x) NULL -#define Curl_ssl_send(a,b,c,d,e) -1 -#define Curl_ssl_recv(a,b,c,d,e) -1 -#define Curl_ssl_initsessions(x,y) CURLE_OK -#define Curl_ssl_version(x,y) 0 -#define Curl_ssl_data_pending(x,y) 0 -#define Curl_ssl_check_cxn(x) 0 -#define Curl_ssl_free_certinfo(x) Curl_nop_stmt -#define Curl_ssl_connect_nonblocking(x,y,z) CURLE_NOT_BUILT_IN -#define Curl_ssl_kill_session(x) Curl_nop_stmt -#define Curl_ssl_random(x,y,z) ((void)x, CURLE_NOT_BUILT_IN) -#define Curl_ssl_cert_status_request() FALSE -#define Curl_ssl_false_start() FALSE -#endif - -#endif /* HEADER_CURL_VTLS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/warnless.c b/build/premake/premake5/contrib/curl/lib/warnless.c deleted file mode 100644 index 0c4472e4a9..0000000000 --- a/build/premake/premake5/contrib/curl/lib/warnless.c +++ /dev/null @@ -1,543 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(__INTEL_COMPILER) && defined(__unix__) - -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif - -#endif /* __INTEL_COMPILER && __unix__ */ - -#define BUILDING_WARNLESS_C 1 - -#include "warnless.h" - -#define CURL_MASK_SCHAR 0x7F -#define CURL_MASK_UCHAR 0xFF - -#if (SIZEOF_SHORT == 2) -# define CURL_MASK_SSHORT 0x7FFF -# define CURL_MASK_USHORT 0xFFFF -#elif (SIZEOF_SHORT == 4) -# define CURL_MASK_SSHORT 0x7FFFFFFF -# define CURL_MASK_USHORT 0xFFFFFFFF -#elif (SIZEOF_SHORT == 8) -# define CURL_MASK_SSHORT 0x7FFFFFFFFFFFFFFF -# define CURL_MASK_USHORT 0xFFFFFFFFFFFFFFFF -#else -# error "SIZEOF_SHORT not defined" -#endif - -#if (SIZEOF_INT == 2) -# define CURL_MASK_SINT 0x7FFF -# define CURL_MASK_UINT 0xFFFF -#elif (SIZEOF_INT == 4) -# define CURL_MASK_SINT 0x7FFFFFFF -# define CURL_MASK_UINT 0xFFFFFFFF -#elif (SIZEOF_INT == 8) -# define CURL_MASK_SINT 0x7FFFFFFFFFFFFFFF -# define CURL_MASK_UINT 0xFFFFFFFFFFFFFFFF -#elif (SIZEOF_INT == 16) -# define CURL_MASK_SINT 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -# define CURL_MASK_UINT 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -#else -# error "SIZEOF_INT not defined" -#endif - -#if (CURL_SIZEOF_LONG == 2) -# define CURL_MASK_SLONG 0x7FFFL -# define CURL_MASK_ULONG 0xFFFFUL -#elif (CURL_SIZEOF_LONG == 4) -# define CURL_MASK_SLONG 0x7FFFFFFFL -# define CURL_MASK_ULONG 0xFFFFFFFFUL -#elif (CURL_SIZEOF_LONG == 8) -# define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFL -# define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFUL -#elif (CURL_SIZEOF_LONG == 16) -# define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFL -# define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUL -#else -# error "CURL_SIZEOF_LONG not defined" -#endif - -#if (CURL_SIZEOF_CURL_OFF_T == 2) -# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFF) -# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFF) -#elif (CURL_SIZEOF_CURL_OFF_T == 4) -# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFF) -# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFF) -#elif (CURL_SIZEOF_CURL_OFF_T == 8) -# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) -# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFF) -#elif (CURL_SIZEOF_CURL_OFF_T == 16) -# define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) -# define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) -#else -# error "CURL_SIZEOF_CURL_OFF_T not defined" -#endif - -#if (SIZEOF_SIZE_T == SIZEOF_SHORT) -# define CURL_MASK_SSIZE_T CURL_MASK_SSHORT -# define CURL_MASK_USIZE_T CURL_MASK_USHORT -#elif (SIZEOF_SIZE_T == SIZEOF_INT) -# define CURL_MASK_SSIZE_T CURL_MASK_SINT -# define CURL_MASK_USIZE_T CURL_MASK_UINT -#elif (SIZEOF_SIZE_T == CURL_SIZEOF_LONG) -# define CURL_MASK_SSIZE_T CURL_MASK_SLONG -# define CURL_MASK_USIZE_T CURL_MASK_ULONG -#elif (SIZEOF_SIZE_T == CURL_SIZEOF_CURL_OFF_T) -# define CURL_MASK_SSIZE_T CURL_MASK_SCOFFT -# define CURL_MASK_USIZE_T CURL_MASK_UCOFFT -#else -# error "SIZEOF_SIZE_T not defined" -#endif - -/* -** unsigned long to unsigned short -*/ - -unsigned short curlx_ultous(unsigned long ulnum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_USHORT); - return (unsigned short)(ulnum & (unsigned long) CURL_MASK_USHORT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned long to unsigned char -*/ - -unsigned char curlx_ultouc(unsigned long ulnum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_UCHAR); - return (unsigned char)(ulnum & (unsigned long) CURL_MASK_UCHAR); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned long to signed int -*/ - -int curlx_ultosi(unsigned long ulnum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(ulnum <= (unsigned long) CURL_MASK_SINT); - return (int)(ulnum & (unsigned long) CURL_MASK_SINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned size_t to signed curl_off_t -*/ - -curl_off_t curlx_uztoso(size_t uznum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(uznum <= (size_t) CURL_MASK_SCOFFT); - return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned size_t to signed int -*/ - -int curlx_uztosi(size_t uznum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(uznum <= (size_t) CURL_MASK_SINT); - return (int)(uznum & (size_t) CURL_MASK_SINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned size_t to unsigned long -*/ - -unsigned long curlx_uztoul(size_t uznum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - -#if (CURL_SIZEOF_LONG < SIZEOF_SIZE_T) - DEBUGASSERT(uznum <= (size_t) CURL_MASK_ULONG); -#endif - return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned size_t to unsigned int -*/ - -unsigned int curlx_uztoui(size_t uznum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - -#if (SIZEOF_INT < SIZEOF_SIZE_T) - DEBUGASSERT(uznum <= (size_t) CURL_MASK_UINT); -#endif - return (unsigned int)(uznum & (size_t) CURL_MASK_UINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** signed long to signed int -*/ - -int curlx_sltosi(long slnum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(slnum >= 0); -#if (SIZEOF_INT < CURL_SIZEOF_LONG) - DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_SINT); -#endif - return (int)(slnum & (long) CURL_MASK_SINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** signed long to unsigned int -*/ - -unsigned int curlx_sltoui(long slnum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(slnum >= 0); -#if (SIZEOF_INT < CURL_SIZEOF_LONG) - DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_UINT); -#endif - return (unsigned int)(slnum & (long) CURL_MASK_UINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** signed long to unsigned short -*/ - -unsigned short curlx_sltous(long slnum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(slnum >= 0); - DEBUGASSERT((unsigned long) slnum <= (unsigned long) CURL_MASK_USHORT); - return (unsigned short)(slnum & (long) CURL_MASK_USHORT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned size_t to signed ssize_t -*/ - -ssize_t curlx_uztosz(size_t uznum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(uznum <= (size_t) CURL_MASK_SSIZE_T); - return (ssize_t)(uznum & (size_t) CURL_MASK_SSIZE_T); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** signed curl_off_t to unsigned size_t -*/ - -size_t curlx_sotouz(curl_off_t sonum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(sonum >= 0); - return (size_t)(sonum & (curl_off_t) CURL_MASK_USIZE_T); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** signed ssize_t to signed int -*/ - -int curlx_sztosi(ssize_t sznum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(sznum >= 0); -#if (SIZEOF_INT < SIZEOF_SIZE_T) - DEBUGASSERT((size_t) sznum <= (size_t) CURL_MASK_SINT); -#endif - return (int)(sznum & (ssize_t) CURL_MASK_SINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned int to unsigned short -*/ - -unsigned short curlx_uitous(unsigned int uinum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(uinum <= (unsigned int) CURL_MASK_USHORT); - return (unsigned short) (uinum & (unsigned int) CURL_MASK_USHORT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned int to unsigned char -*/ - -unsigned char curlx_uitouc(unsigned int uinum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(uinum <= (unsigned int) CURL_MASK_UCHAR); - return (unsigned char) (uinum & (unsigned int) CURL_MASK_UCHAR); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** unsigned int to signed int -*/ - -int curlx_uitosi(unsigned int uinum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(uinum <= (unsigned int) CURL_MASK_SINT); - return (int) (uinum & (unsigned int) CURL_MASK_SINT); - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -/* -** signed int to unsigned size_t -*/ - -size_t curlx_sitouz(int sinum) -{ -#ifdef __INTEL_COMPILER -# pragma warning(push) -# pragma warning(disable:810) /* conversion may lose significant bits */ -#endif - - DEBUGASSERT(sinum >= 0); - return (size_t) sinum; - -#ifdef __INTEL_COMPILER -# pragma warning(pop) -#endif -} - -#ifdef USE_WINSOCK - -/* -** curl_socket_t to signed int -*/ - -int curlx_sktosi(curl_socket_t s) -{ - return (int)((ssize_t) s); -} - -/* -** signed int to curl_socket_t -*/ - -curl_socket_t curlx_sitosk(int i) -{ - return (curl_socket_t)((ssize_t) i); -} - -#endif /* USE_WINSOCK */ - -#if defined(WIN32) || defined(_WIN32) - -ssize_t curlx_read(int fd, void *buf, size_t count) -{ - return (ssize_t)read(fd, buf, curlx_uztoui(count)); -} - -ssize_t curlx_write(int fd, const void *buf, size_t count) -{ - return (ssize_t)write(fd, buf, curlx_uztoui(count)); -} - -#endif /* WIN32 || _WIN32 */ - -#if defined(__INTEL_COMPILER) && defined(__unix__) - -int curlx_FD_ISSET(int fd, fd_set *fdset) -{ - #pragma warning(push) - #pragma warning(disable:1469) /* clobber ignored */ - return FD_ISSET(fd, fdset); - #pragma warning(pop) -} - -void curlx_FD_SET(int fd, fd_set *fdset) -{ - #pragma warning(push) - #pragma warning(disable:1469) /* clobber ignored */ - FD_SET(fd, fdset); - #pragma warning(pop) -} - -void curlx_FD_ZERO(fd_set *fdset) -{ - #pragma warning(push) - #pragma warning(disable:593) /* variable was set but never used */ - FD_ZERO(fdset); - #pragma warning(pop) -} - -unsigned short curlx_htons(unsigned short usnum) -{ -#if (__INTEL_COMPILER == 910) && defined(__i386__) - return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF)); -#else - #pragma warning(push) - #pragma warning(disable:810) /* conversion may lose significant bits */ - return htons(usnum); - #pragma warning(pop) -#endif -} - -unsigned short curlx_ntohs(unsigned short usnum) -{ -#if (__INTEL_COMPILER == 910) && defined(__i386__) - return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF)); -#else - #pragma warning(push) - #pragma warning(disable:810) /* conversion may lose significant bits */ - return ntohs(usnum); - #pragma warning(pop) -#endif -} - -#endif /* __INTEL_COMPILER && __unix__ */ diff --git a/build/premake/premake5/contrib/curl/lib/warnless.h b/build/premake/premake5/contrib/curl/lib/warnless.h deleted file mode 100644 index ab6d29998d..0000000000 --- a/build/premake/premake5/contrib/curl/lib/warnless.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef HEADER_CURL_WARNLESS_H -#define HEADER_CURL_WARNLESS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#ifdef USE_WINSOCK -#include /* for curl_socket_t */ -#endif - -unsigned short curlx_ultous(unsigned long ulnum); - -unsigned char curlx_ultouc(unsigned long ulnum); - -int curlx_ultosi(unsigned long ulnum); - -int curlx_uztosi(size_t uznum); - -curl_off_t curlx_uztoso(size_t uznum); - -unsigned long curlx_uztoul(size_t uznum); - -unsigned int curlx_uztoui(size_t uznum); - -int curlx_sltosi(long slnum); - -unsigned int curlx_sltoui(long slnum); - -unsigned short curlx_sltous(long slnum); - -ssize_t curlx_uztosz(size_t uznum); - -size_t curlx_sotouz(curl_off_t sonum); - -int curlx_sztosi(ssize_t sznum); - -unsigned short curlx_uitous(unsigned int uinum); - -unsigned char curlx_uitouc(unsigned int uinum); - -int curlx_uitosi(unsigned int uinum); - -size_t curlx_sitouz(int sinum); - -#ifdef USE_WINSOCK - -int curlx_sktosi(curl_socket_t s); - -curl_socket_t curlx_sitosk(int i); - -#endif /* USE_WINSOCK */ - -#if defined(WIN32) || defined(_WIN32) - -ssize_t curlx_read(int fd, void *buf, size_t count); - -ssize_t curlx_write(int fd, const void *buf, size_t count); - -#ifndef BUILDING_WARNLESS_C -# undef read -# define read(fd, buf, count) curlx_read(fd, buf, count) -# undef write -# define write(fd, buf, count) curlx_write(fd, buf, count) -#endif - -#endif /* WIN32 || _WIN32 */ - -#if defined(__INTEL_COMPILER) && defined(__unix__) - -int curlx_FD_ISSET(int fd, fd_set *fdset); - -void curlx_FD_SET(int fd, fd_set *fdset); - -void curlx_FD_ZERO(fd_set *fdset); - -unsigned short curlx_htons(unsigned short usnum); - -unsigned short curlx_ntohs(unsigned short usnum); - -#ifndef BUILDING_WARNLESS_C -# undef FD_ISSET -# define FD_ISSET(a,b) curlx_FD_ISSET((a),(b)) -# undef FD_SET -# define FD_SET(a,b) curlx_FD_SET((a),(b)) -# undef FD_ZERO -# define FD_ZERO(a) curlx_FD_ZERO((a)) -# undef htons -# define htons(a) curlx_htons((a)) -# undef ntohs -# define ntohs(a) curlx_ntohs((a)) -#endif - -#endif /* __INTEL_COMPILER && __unix__ */ - -#endif /* HEADER_CURL_WARNLESS_H */ diff --git a/build/premake/premake5/contrib/curl/lib/wildcard.c b/build/premake/premake5/contrib/curl/lib/wildcard.c deleted file mode 100644 index dbbe45f6fb..0000000000 --- a/build/premake/premake5/contrib/curl/lib/wildcard.c +++ /dev/null @@ -1,69 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#include "wildcard.h" -#include "llist.h" -#include "fileinfo.h" -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -CURLcode Curl_wildcard_init(struct WildcardData *wc) -{ - DEBUGASSERT(wc->filelist == NULL); - /* now allocate only wc->filelist, everything else - will be allocated if it is needed. */ - wc->filelist = Curl_llist_alloc(Curl_fileinfo_dtor); - if(!wc->filelist) {; - return CURLE_OUT_OF_MEMORY; - } - return CURLE_OK; -} - -void Curl_wildcard_dtor(struct WildcardData *wc) -{ - if(!wc) - return; - - if(wc->tmp_dtor) { - wc->tmp_dtor(wc->tmp); - wc->tmp_dtor = ZERO_NULL; - wc->tmp = NULL; - } - DEBUGASSERT(wc->tmp == NULL); - - if(wc->filelist) { - Curl_llist_destroy(wc->filelist, NULL); - wc->filelist = NULL; - } - - free(wc->path); - wc->path = NULL; - free(wc->pattern); - wc->pattern = NULL; - - wc->customptr = NULL; - wc->state = CURLWC_INIT; -} diff --git a/build/premake/premake5/contrib/curl/lib/wildcard.h b/build/premake/premake5/contrib/curl/lib/wildcard.h deleted file mode 100644 index 7f61cd1732..0000000000 --- a/build/premake/premake5/contrib/curl/lib/wildcard.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef HEADER_CURL_WILDCARD_H -#define HEADER_CURL_WILDCARD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2010 - 2013, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include - -/* list of wildcard process states */ -typedef enum { - CURLWC_INIT = 0, - CURLWC_MATCHING, /* library is trying to get list of addresses for - downloading */ - CURLWC_DOWNLOADING, - CURLWC_CLEAN, /* deallocate resources and reset settings */ - CURLWC_SKIP, /* skip over concrete file */ - CURLWC_ERROR, /* error cases */ - CURLWC_DONE /* if is wildcard->state == CURLWC_DONE wildcard loop - will end */ -} curl_wildcard_states; - -typedef void (*curl_wildcard_tmp_dtor)(void *ptr); - -/* struct keeping information about wildcard download process */ -struct WildcardData { - curl_wildcard_states state; - char *path; /* path to the directory, where we trying wildcard-match */ - char *pattern; /* wildcard pattern */ - struct curl_llist *filelist; /* llist with struct Curl_fileinfo */ - void *tmp; /* pointer to protocol specific temporary data */ - curl_wildcard_tmp_dtor tmp_dtor; - void *customptr; /* for CURLOPT_CHUNK_DATA pointer */ -}; - -CURLcode Curl_wildcard_init(struct WildcardData *wc); -void Curl_wildcard_dtor(struct WildcardData *wc); - -struct Curl_easy; - -#endif /* HEADER_CURL_WILDCARD_H */ diff --git a/build/premake/premake5/contrib/curl/lib/x509asn1.c b/build/premake/premake5/contrib/curl/lib/x509asn1.c deleted file mode 100644 index c4bc7c1fd7..0000000000 --- a/build/premake/premake5/contrib/curl/lib/x509asn1.c +++ /dev/null @@ -1,1199 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_GSKIT) || defined(USE_NSS) || defined(USE_GNUTLS) || \ - defined(USE_CYASSL) || defined(USE_SCHANNEL) - -#include -#include "urldata.h" -#include "strcase.h" -#include "hostcheck.h" -#include "vtls/vtls.h" -#include "sendf.h" -#include "inet_pton.h" -#include "curl_base64.h" -#include "x509asn1.h" - -/* The last 3 #include files should be in this order */ -#include "curl_printf.h" -#include "curl_memory.h" -#include "memdebug.h" - -/* For overflow checks. */ -#define CURL_SIZE_T_MAX ((size_t)-1) - - -/* ASN.1 OIDs. */ -static const char cnOID[] = "2.5.4.3"; /* Common name. */ -static const char sanOID[] = "2.5.29.17"; /* Subject alternative name. */ - -static const curl_OID OIDtable[] = { - { "1.2.840.10040.4.1", "dsa" }, - { "1.2.840.10040.4.3", "dsa-with-sha1" }, - { "1.2.840.10045.2.1", "ecPublicKey" }, - { "1.2.840.10045.3.0.1", "c2pnb163v1" }, - { "1.2.840.10045.4.1", "ecdsa-with-SHA1" }, - { "1.2.840.10046.2.1", "dhpublicnumber" }, - { "1.2.840.113549.1.1.1", "rsaEncryption" }, - { "1.2.840.113549.1.1.2", "md2WithRSAEncryption" }, - { "1.2.840.113549.1.1.4", "md5WithRSAEncryption" }, - { "1.2.840.113549.1.1.5", "sha1WithRSAEncryption" }, - { "1.2.840.113549.1.1.10", "RSASSA-PSS" }, - { "1.2.840.113549.1.1.14", "sha224WithRSAEncryption" }, - { "1.2.840.113549.1.1.11", "sha256WithRSAEncryption" }, - { "1.2.840.113549.1.1.12", "sha384WithRSAEncryption" }, - { "1.2.840.113549.1.1.13", "sha512WithRSAEncryption" }, - { "1.2.840.113549.2.2", "md2" }, - { "1.2.840.113549.2.5", "md5" }, - { "1.3.14.3.2.26", "sha1" }, - { cnOID, "CN" }, - { "2.5.4.4", "SN" }, - { "2.5.4.5", "serialNumber" }, - { "2.5.4.6", "C" }, - { "2.5.4.7", "L" }, - { "2.5.4.8", "ST" }, - { "2.5.4.9", "streetAddress" }, - { "2.5.4.10", "O" }, - { "2.5.4.11", "OU" }, - { "2.5.4.12", "title" }, - { "2.5.4.13", "description" }, - { "2.5.4.17", "postalCode" }, - { "2.5.4.41", "name" }, - { "2.5.4.42", "givenName" }, - { "2.5.4.43", "initials" }, - { "2.5.4.44", "generationQualifier" }, - { "2.5.4.45", "X500UniqueIdentifier" }, - { "2.5.4.46", "dnQualifier" }, - { "2.5.4.65", "pseudonym" }, - { "1.2.840.113549.1.9.1", "emailAddress" }, - { "2.5.4.72", "role" }, - { sanOID, "subjectAltName" }, - { "2.5.29.18", "issuerAltName" }, - { "2.5.29.19", "basicConstraints" }, - { "2.16.840.1.101.3.4.2.4", "sha224" }, - { "2.16.840.1.101.3.4.2.1", "sha256" }, - { "2.16.840.1.101.3.4.2.2", "sha384" }, - { "2.16.840.1.101.3.4.2.3", "sha512" }, - { (const char *) NULL, (const char *) NULL } -}; - -/* - * Lightweight ASN.1 parser. - * In particular, it does not check for syntactic/lexical errors. - * It is intended to support certificate information gathering for SSL backends - * that offer a mean to get certificates as a whole, but do not supply - * entry points to get particular certificate sub-fields. - * Please note there is no pretention here to rewrite a full SSL library. - */ - - -const char *Curl_getASN1Element(curl_asn1Element *elem, - const char *beg, const char *end) -{ - unsigned char b; - unsigned long len; - curl_asn1Element lelem; - - /* Get a single ASN.1 element into `elem', parse ASN.1 string at `beg' - ending at `end'. - Returns a pointer in source string after the parsed element, or NULL - if an error occurs. */ - if(!beg || !end || beg >= end || !*beg || - (size_t)(end - beg) > CURL_ASN1_MAX) - return (const char *) NULL; - - /* Process header byte. */ - elem->header = beg; - b = (unsigned char) *beg++; - elem->constructed = (b & 0x20) != 0; - elem->class = (b >> 6) & 3; - b &= 0x1F; - if(b == 0x1F) - return (const char *) NULL; /* Long tag values not supported here. */ - elem->tag = b; - - /* Process length. */ - if(beg >= end) - return (const char *) NULL; - b = (unsigned char) *beg++; - if(!(b & 0x80)) - len = b; - else if(!(b &= 0x7F)) { - /* Unspecified length. Since we have all the data, we can determine the - effective length by skipping element until an end element is found. */ - if(!elem->constructed) - return (const char *) NULL; - elem->beg = beg; - while(beg < end && *beg) { - beg = Curl_getASN1Element(&lelem, beg, end); - if(!beg) - return (const char *) NULL; - } - if(beg >= end) - return (const char *) NULL; - elem->end = beg; - return beg + 1; - } - else if((unsigned)b > (size_t)(end - beg)) - return (const char *) NULL; /* Does not fit in source. */ - else { - /* Get long length. */ - len = 0; - do { - if(len & 0xFF000000L) - return (const char *) NULL; /* Lengths > 32 bits are not supported. */ - len = (len << 8) | (unsigned char) *beg++; - } while(--b); - } - if(len > (size_t)(end - beg)) - return (const char *) NULL; /* Element data does not fit in source. */ - elem->beg = beg; - elem->end = beg + len; - return elem->end; -} - -static const curl_OID * searchOID(const char *oid) -{ - const curl_OID *op; - - /* Search the null terminated OID or OID identifier in local table. - Return the table entry pointer or NULL if not found. */ - - for(op = OIDtable; op->numoid; op++) - if(!strcmp(op->numoid, oid) || strcasecompare(op->textoid, oid)) - return op; - - return (const curl_OID *) NULL; -} - -static const char *bool2str(const char *beg, const char *end) -{ - /* Convert an ASN.1 Boolean value into its string representation. - Return the dynamically allocated string, or NULL if source is not an - ASN.1 Boolean value. */ - - if(end - beg != 1) - return (const char *) NULL; - return strdup(*beg? "TRUE": "FALSE"); -} - -static const char *octet2str(const char *beg, const char *end) -{ - size_t n = end - beg; - char *buf = NULL; - - /* Convert an ASN.1 octet string to a printable string. - Return the dynamically allocated string, or NULL if an error occurs. */ - - if(n <= (CURL_SIZE_T_MAX - 1) / 3) { - buf = malloc(3 * n + 1); - if(buf) - for(n = 0; beg < end; n += 3) - snprintf(buf + n, 4, "%02x:", *(const unsigned char *) beg++); - } - return buf; -} - -static const char *bit2str(const char *beg, const char *end) -{ - /* Convert an ASN.1 bit string to a printable string. - Return the dynamically allocated string, or NULL if an error occurs. */ - - if(++beg > end) - return (const char *) NULL; - return octet2str(beg, end); -} - -static const char *int2str(const char *beg, const char *end) -{ - long val = 0; - size_t n = end - beg; - - /* Convert an ASN.1 integer value into its string representation. - Return the dynamically allocated string, or NULL if source is not an - ASN.1 integer value. */ - - if(!n) - return (const char *) NULL; - - if(n > 4) - return octet2str(beg, end); - - /* Represent integers <= 32-bit as a single value. */ - if(*beg & 0x80) - val = ~val; - - do - val = (val << 8) | *(const unsigned char *) beg++; - while(beg < end); - return curl_maprintf("%s%lx", (val < 0 || val >= 10)? "0x": "", val); -} - -static ssize_t -utf8asn1str(char **to, int type, const char *from, const char *end) -{ - size_t inlength = end - from; - int size = 1; - size_t outlength; - int charsize; - unsigned int wc; - char *buf; - - /* Perform a lazy conversion from an ASN.1 typed string to UTF8. Allocate the - destination buffer dynamically. The allocation size will normally be too - large: this is to avoid buffer overflows. - Terminate the string with a nul byte and return the converted - string length. */ - - *to = (char *) NULL; - switch(type) { - case CURL_ASN1_BMP_STRING: - size = 2; - break; - case CURL_ASN1_UNIVERSAL_STRING: - size = 4; - break; - case CURL_ASN1_NUMERIC_STRING: - case CURL_ASN1_PRINTABLE_STRING: - case CURL_ASN1_TELETEX_STRING: - case CURL_ASN1_IA5_STRING: - case CURL_ASN1_VISIBLE_STRING: - case CURL_ASN1_UTF8_STRING: - break; - default: - return -1; /* Conversion not supported. */ - } - - if(inlength % size) - return -1; /* Length inconsistent with character size. */ - if(inlength / size > (CURL_SIZE_T_MAX - 1) / 4) - return -1; /* Too big. */ - buf = malloc(4 * (inlength / size) + 1); - if(!buf) - return -1; /* Not enough memory. */ - - if(type == CURL_ASN1_UTF8_STRING) { - /* Just copy. */ - outlength = inlength; - if(outlength) - memcpy(buf, from, outlength); - } - else { - for(outlength = 0; from < end;) { - wc = 0; - switch(size) { - case 4: - wc = (wc << 8) | *(const unsigned char *) from++; - wc = (wc << 8) | *(const unsigned char *) from++; - /* fallthrough */ - case 2: - wc = (wc << 8) | *(const unsigned char *) from++; - /* fallthrough */ - default: /* case 1: */ - wc = (wc << 8) | *(const unsigned char *) from++; - } - charsize = 1; - if(wc >= 0x00000080) { - if(wc >= 0x00000800) { - if(wc >= 0x00010000) { - if(wc >= 0x00200000) { - free(buf); - return -1; /* Invalid char. size for target encoding. */ - } - buf[outlength + 3] = (char) (0x80 | (wc & 0x3F)); - wc = (wc >> 6) | 0x00010000; - charsize++; - } - buf[outlength + 2] = (char) (0x80 | (wc & 0x3F)); - wc = (wc >> 6) | 0x00000800; - charsize++; - } - buf[outlength + 1] = (char) (0x80 | (wc & 0x3F)); - wc = (wc >> 6) | 0x000000C0; - charsize++; - } - buf[outlength] = (char) wc; - outlength += charsize; - } - } - buf[outlength] = '\0'; - *to = buf; - return outlength; -} - -static const char *string2str(int type, const char *beg, const char *end) -{ - char *buf; - - /* Convert an ASN.1 String into its UTF-8 string representation. - Return the dynamically allocated string, or NULL if an error occurs. */ - - if(utf8asn1str(&buf, type, beg, end) < 0) - return (const char *) NULL; - return buf; -} - -static int encodeUint(char *buf, int n, unsigned int x) -{ - int i = 0; - unsigned int y = x / 10; - - /* Decimal ASCII encode unsigned integer `x' in the `n'-byte buffer at `buf'. - Return the total number of encoded digits, even if larger than `n'. */ - - if(y) { - i += encodeUint(buf, n, y); - x -= y * 10; - } - if(i < n) - buf[i] = (char) ('0' + x); - i++; - if(i < n) - buf[i] = '\0'; /* Store a terminator if possible. */ - return i; -} - -static int encodeOID(char *buf, int n, const char *beg, const char *end) -{ - int i = 0; - unsigned int x; - unsigned int y; - - /* Convert an ASN.1 OID into its dotted string representation. - Store the result in th `n'-byte buffer at `buf'. - Return the converted string length, or -1 if an error occurs. */ - - /* Process the first two numbers. */ - y = *(const unsigned char *) beg++; - x = y / 40; - y -= x * 40; - i += encodeUint(buf + i, n - i, x); - if(i < n) - buf[i] = '.'; - i++; - i += encodeUint(buf + i, n - i, y); - - /* Process the trailing numbers. */ - while(beg < end) { - if(i < n) - buf[i] = '.'; - i++; - x = 0; - do { - if(x & 0xFF000000) - return -1; - y = *(const unsigned char *) beg++; - x = (x << 7) | (y & 0x7F); - } while(y & 0x80); - i += encodeUint(buf + i, n - i, x); - } - if(i < n) - buf[i] = '\0'; - return i; -} - -static const char *OID2str(const char *beg, const char *end, bool symbolic) -{ - char *buf = (char *) NULL; - const curl_OID * op; - int n; - - /* Convert an ASN.1 OID into its dotted or symbolic string representation. - Return the dynamically allocated string, or NULL if an error occurs. */ - - if(beg < end) { - n = encodeOID((char *) NULL, -1, beg, end); - if(n >= 0) { - buf = malloc(n + 1); - if(buf) { - encodeOID(buf, n, beg, end); - buf[n] = '\0'; - - if(symbolic) { - op = searchOID(buf); - if(op) { - free(buf); - buf = strdup(op->textoid); - } - } - } - } - } - return buf; -} - -static const char *GTime2str(const char *beg, const char *end) -{ - const char *tzp; - const char *fracp; - char sec1, sec2; - size_t fracl; - size_t tzl; - const char *sep = ""; - - /* Convert an ASN.1 Generalized time to a printable string. - Return the dynamically allocated string, or NULL if an error occurs. */ - - for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++) - ; - - /* Get seconds digits. */ - sec1 = '0'; - switch(fracp - beg - 12) { - case 0: - sec2 = '0'; - break; - case 2: - sec1 = fracp[-2]; - case 1: - sec2 = fracp[-1]; - break; - default: - return (const char *) NULL; - } - - /* Scan for timezone, measure fractional seconds. */ - tzp = fracp; - fracl = 0; - if(fracp < end && (*fracp == '.' || *fracp == ',')) { - fracp++; - do - tzp++; - while(tzp < end && *tzp >= '0' && *tzp <= '9'); - /* Strip leading zeroes in fractional seconds. */ - for(fracl = tzp - fracp - 1; fracl && fracp[fracl - 1] == '0'; fracl--) - ; - } - - /* Process timezone. */ - if(tzp >= end) - ; /* Nothing to do. */ - else if(*tzp == 'Z') { - tzp = " GMT"; - end = tzp + 4; - } - else { - sep = " "; - tzp++; - } - - tzl = end - tzp; - return curl_maprintf("%.4s-%.2s-%.2s %.2s:%.2s:%c%c%s%.*s%s%.*s", - beg, beg + 4, beg + 6, - beg + 8, beg + 10, sec1, sec2, - fracl? ".": "", fracl, fracp, - sep, tzl, tzp); -} - -static const char *UTime2str(const char *beg, const char *end) -{ - const char *tzp; - size_t tzl; - const char *sec; - - /* Convert an ASN.1 UTC time to a printable string. - Return the dynamically allocated string, or NULL if an error occurs. */ - - for(tzp = beg; tzp < end && *tzp >= '0' && *tzp <= '9'; tzp++) - ; - /* Get the seconds. */ - sec = beg + 10; - switch(tzp - sec) { - case 0: - sec = "00"; - case 2: - break; - default: - return (const char *) NULL; - } - - /* Process timezone. */ - if(tzp >= end) - return (const char *) NULL; - if(*tzp == 'Z') { - tzp = "GMT"; - end = tzp + 3; - } - else - tzp++; - - tzl = end - tzp; - return curl_maprintf("%u%.2s-%.2s-%.2s %.2s:%.2s:%.2s %.*s", - 20 - (*beg >= '5'), beg, beg + 2, beg + 4, - beg + 6, beg + 8, sec, - tzl, tzp); -} - -const char *Curl_ASN1tostr(curl_asn1Element *elem, int type) -{ - /* Convert an ASN.1 element to a printable string. - Return the dynamically allocated string, or NULL if an error occurs. */ - - if(elem->constructed) - return (const char *) NULL; /* No conversion of structured elements. */ - - if(!type) - type = elem->tag; /* Type not forced: use element tag as type. */ - - switch(type) { - case CURL_ASN1_BOOLEAN: - return bool2str(elem->beg, elem->end); - case CURL_ASN1_INTEGER: - case CURL_ASN1_ENUMERATED: - return int2str(elem->beg, elem->end); - case CURL_ASN1_BIT_STRING: - return bit2str(elem->beg, elem->end); - case CURL_ASN1_OCTET_STRING: - return octet2str(elem->beg, elem->end); - case CURL_ASN1_NULL: - return strdup(""); - case CURL_ASN1_OBJECT_IDENTIFIER: - return OID2str(elem->beg, elem->end, TRUE); - case CURL_ASN1_UTC_TIME: - return UTime2str(elem->beg, elem->end); - case CURL_ASN1_GENERALIZED_TIME: - return GTime2str(elem->beg, elem->end); - case CURL_ASN1_UTF8_STRING: - case CURL_ASN1_NUMERIC_STRING: - case CURL_ASN1_PRINTABLE_STRING: - case CURL_ASN1_TELETEX_STRING: - case CURL_ASN1_IA5_STRING: - case CURL_ASN1_VISIBLE_STRING: - case CURL_ASN1_UNIVERSAL_STRING: - case CURL_ASN1_BMP_STRING: - return string2str(type, elem->beg, elem->end); - } - - return (const char *) NULL; /* Unsupported. */ -} - -static ssize_t encodeDN(char *buf, size_t n, curl_asn1Element *dn) -{ - curl_asn1Element rdn; - curl_asn1Element atv; - curl_asn1Element oid; - curl_asn1Element value; - size_t l = 0; - const char *p1; - const char *p2; - const char *p3; - const char *str; - - /* ASCII encode distinguished name at `dn' into the `n'-byte buffer at `buf'. - Return the total string length, even if larger than `n'. */ - - for(p1 = dn->beg; p1 < dn->end;) { - p1 = Curl_getASN1Element(&rdn, p1, dn->end); - for(p2 = rdn.beg; p2 < rdn.end;) { - p2 = Curl_getASN1Element(&atv, p2, rdn.end); - p3 = Curl_getASN1Element(&oid, atv.beg, atv.end); - Curl_getASN1Element(&value, p3, atv.end); - str = Curl_ASN1tostr(&oid, 0); - if(!str) - return -1; - - /* Encode delimiter. - If attribute has a short uppercase name, delimiter is ", ". */ - if(l) { - for(p3 = str; isupper(*p3); p3++) - ; - for(p3 = (*p3 || p3 - str > 2)? "/": ", "; *p3; p3++) { - if(l < n) - buf[l] = *p3; - l++; - } - } - - /* Encode attribute name. */ - for(p3 = str; *p3; p3++) { - if(l < n) - buf[l] = *p3; - l++; - } - free((char *) str); - - /* Generate equal sign. */ - if(l < n) - buf[l] = '='; - l++; - - /* Generate value. */ - str = Curl_ASN1tostr(&value, 0); - if(!str) - return -1; - for(p3 = str; *p3; p3++) { - if(l < n) - buf[l] = *p3; - l++; - } - free((char *) str); - } - } - - return l; -} - -const char *Curl_DNtostr(curl_asn1Element *dn) -{ - char *buf = (char *) NULL; - ssize_t n = encodeDN(buf, 0, dn); - - /* Convert an ASN.1 distinguished name into a printable string. - Return the dynamically allocated string, or NULL if an error occurs. */ - - if(n >= 0) { - buf = malloc(n + 1); - if(buf) { - encodeDN(buf, n + 1, dn); - buf[n] = '\0'; - } - } - return (const char *) buf; -} - -/* - * X509 parser. - */ - -int Curl_parseX509(curl_X509certificate *cert, - const char *beg, const char *end) -{ - curl_asn1Element elem; - curl_asn1Element tbsCertificate; - const char *ccp; - static const char defaultVersion = 0; /* v1. */ - - /* ASN.1 parse an X509 certificate into structure subfields. - Syntax is assumed to have already been checked by the SSL backend. - See RFC 5280. */ - - cert->certificate.header = NULL; - cert->certificate.beg = beg; - cert->certificate.end = end; - - /* Get the sequence content. */ - if(!Curl_getASN1Element(&elem, beg, end)) - return -1; /* Invalid bounds/size. */ - beg = elem.beg; - end = elem.end; - - /* Get tbsCertificate. */ - beg = Curl_getASN1Element(&tbsCertificate, beg, end); - /* Skip the signatureAlgorithm. */ - beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end); - /* Get the signatureValue. */ - Curl_getASN1Element(&cert->signature, beg, end); - - /* Parse TBSCertificate. */ - beg = tbsCertificate.beg; - end = tbsCertificate.end; - /* Get optional version, get serialNumber. */ - cert->version.header = NULL; - cert->version.beg = &defaultVersion; - cert->version.end = &defaultVersion + sizeof defaultVersion;; - beg = Curl_getASN1Element(&elem, beg, end); - if(elem.tag == 0) { - Curl_getASN1Element(&cert->version, elem.beg, elem.end); - beg = Curl_getASN1Element(&elem, beg, end); - } - cert->serialNumber = elem; - /* Get signature algorithm. */ - beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end); - /* Get issuer. */ - beg = Curl_getASN1Element(&cert->issuer, beg, end); - /* Get notBefore and notAfter. */ - beg = Curl_getASN1Element(&elem, beg, end); - ccp = Curl_getASN1Element(&cert->notBefore, elem.beg, elem.end); - Curl_getASN1Element(&cert->notAfter, ccp, elem.end); - /* Get subject. */ - beg = Curl_getASN1Element(&cert->subject, beg, end); - /* Get subjectPublicKeyAlgorithm and subjectPublicKey. */ - beg = Curl_getASN1Element(&cert->subjectPublicKeyInfo, beg, end); - ccp = Curl_getASN1Element(&cert->subjectPublicKeyAlgorithm, - cert->subjectPublicKeyInfo.beg, - cert->subjectPublicKeyInfo.end); - Curl_getASN1Element(&cert->subjectPublicKey, ccp, - cert->subjectPublicKeyInfo.end); - /* Get optional issuerUiqueID, subjectUniqueID and extensions. */ - cert->issuerUniqueID.tag = cert->subjectUniqueID.tag = 0; - cert->extensions.tag = elem.tag = 0; - cert->issuerUniqueID.header = cert->subjectUniqueID.header = NULL; - cert->issuerUniqueID.beg = cert->issuerUniqueID.end = ""; - cert->subjectUniqueID.beg = cert->subjectUniqueID.end = ""; - cert->extensions.header = NULL; - cert->extensions.beg = cert->extensions.end = ""; - if(beg < end) - beg = Curl_getASN1Element(&elem, beg, end); - if(elem.tag == 1) { - cert->issuerUniqueID = elem; - if(beg < end) - beg = Curl_getASN1Element(&elem, beg, end); - } - if(elem.tag == 2) { - cert->subjectUniqueID = elem; - if(beg < end) - beg = Curl_getASN1Element(&elem, beg, end); - } - if(elem.tag == 3) - Curl_getASN1Element(&cert->extensions, elem.beg, elem.end); - return 0; -} - -static size_t copySubstring(char *to, const char *from) -{ - size_t i; - - /* Copy at most 64-characters, terminate with a newline and returns the - effective number of stored characters. */ - - for(i = 0; i < 64; i++) { - to[i] = *from; - if(!*from++) - break; - } - - to[i++] = '\n'; - return i; -} - -static const char *dumpAlgo(curl_asn1Element *param, - const char *beg, const char *end) -{ - curl_asn1Element oid; - - /* Get algorithm parameters and return algorithm name. */ - - beg = Curl_getASN1Element(&oid, beg, end); - param->header = NULL; - param->tag = 0; - param->beg = param->end = end; - if(beg < end) - Curl_getASN1Element(param, beg, end); - return OID2str(oid.beg, oid.end, TRUE); -} - -static void do_pubkey_field(struct Curl_easy *data, int certnum, - const char *label, curl_asn1Element *elem) -{ - const char *output; - - /* Generate a certificate information record for the public key. */ - - output = Curl_ASN1tostr(elem, 0); - if(output) { - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, label, output); - if(!certnum) - infof(data, " %s: %s\n", label, output); - free((char *) output); - } -} - -static void do_pubkey(struct Curl_easy *data, int certnum, - const char *algo, curl_asn1Element *param, - curl_asn1Element *pubkey) -{ - curl_asn1Element elem; - curl_asn1Element pk; - const char *p; - const char *q; - unsigned long len; - unsigned int i; - - /* Generate all information records for the public key. */ - - /* Get the public key (single element). */ - Curl_getASN1Element(&pk, pubkey->beg + 1, pubkey->end); - - if(strcasecompare(algo, "rsaEncryption")) { - p = Curl_getASN1Element(&elem, pk.beg, pk.end); - /* Compute key length. */ - for(q = elem.beg; !*q && q < elem.end; q++) - ; - len = (unsigned long)((elem.end - q) * 8); - if(len) - for(i = *(unsigned char *) q; !(i & 0x80); i <<= 1) - len--; - if(len > 32) - elem.beg = q; /* Strip leading zero bytes. */ - if(!certnum) - infof(data, " RSA Public Key (%lu bits)\n", len); - if(data->set.ssl.certinfo) { - q = curl_maprintf("%lu", len); - if(q) { - Curl_ssl_push_certinfo(data, certnum, "RSA Public Key", q); - free((char *) q); - } - } - /* Generate coefficients. */ - do_pubkey_field(data, certnum, "rsa(n)", &elem); - Curl_getASN1Element(&elem, p, pk.end); - do_pubkey_field(data, certnum, "rsa(e)", &elem); - } - else if(strcasecompare(algo, "dsa")) { - p = Curl_getASN1Element(&elem, param->beg, param->end); - do_pubkey_field(data, certnum, "dsa(p)", &elem); - p = Curl_getASN1Element(&elem, p, param->end); - do_pubkey_field(data, certnum, "dsa(q)", &elem); - Curl_getASN1Element(&elem, p, param->end); - do_pubkey_field(data, certnum, "dsa(g)", &elem); - do_pubkey_field(data, certnum, "dsa(pub_key)", &pk); - } - else if(strcasecompare(algo, "dhpublicnumber")) { - p = Curl_getASN1Element(&elem, param->beg, param->end); - do_pubkey_field(data, certnum, "dh(p)", &elem); - Curl_getASN1Element(&elem, param->beg, param->end); - do_pubkey_field(data, certnum, "dh(g)", &elem); - do_pubkey_field(data, certnum, "dh(pub_key)", &pk); - } -#if 0 /* Patent-encumbered. */ - else if(strcasecompare(algo, "ecPublicKey")) { - /* Left TODO. */ - } -#endif -} - -CURLcode Curl_extract_certinfo(struct connectdata *conn, - int certnum, - const char *beg, - const char *end) -{ - curl_X509certificate cert; - struct Curl_easy *data = conn->data; - curl_asn1Element param; - const char *ccp; - char *cp1; - size_t cl1; - char *cp2; - CURLcode result; - unsigned long version; - size_t i; - size_t j; - - if(!data->set.ssl.certinfo) - if(certnum) - return CURLE_OK; - - /* Prepare the certificate information for curl_easy_getinfo(). */ - - /* Extract the certificate ASN.1 elements. */ - if(Curl_parseX509(&cert, beg, end)) - return CURLE_OUT_OF_MEMORY; - - /* Subject. */ - ccp = Curl_DNtostr(&cert.subject); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Subject", ccp); - if(!certnum) - infof(data, "%2d Subject: %s\n", certnum, ccp); - free((char *) ccp); - - /* Issuer. */ - ccp = Curl_DNtostr(&cert.issuer); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Issuer", ccp); - if(!certnum) - infof(data, " Issuer: %s\n", ccp); - free((char *) ccp); - - /* Version (always fits in less than 32 bits). */ - version = 0; - for(ccp = cert.version.beg; ccp < cert.version.end; ccp++) - version = (version << 8) | *(const unsigned char *) ccp; - if(data->set.ssl.certinfo) { - ccp = curl_maprintf("%lx", version); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - Curl_ssl_push_certinfo(data, certnum, "Version", ccp); - free((char *) ccp); - } - if(!certnum) - infof(data, " Version: %lu (0x%lx)\n", version + 1, version); - - /* Serial number. */ - ccp = Curl_ASN1tostr(&cert.serialNumber, 0); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Serial Number", ccp); - if(!certnum) - infof(data, " Serial Number: %s\n", ccp); - free((char *) ccp); - - /* Signature algorithm .*/ - ccp = dumpAlgo(¶m, cert.signatureAlgorithm.beg, - cert.signatureAlgorithm.end); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Signature Algorithm", ccp); - if(!certnum) - infof(data, " Signature Algorithm: %s\n", ccp); - free((char *) ccp); - - /* Start Date. */ - ccp = Curl_ASN1tostr(&cert.notBefore, 0); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Start Date", ccp); - if(!certnum) - infof(data, " Start Date: %s\n", ccp); - free((char *) ccp); - - /* Expire Date. */ - ccp = Curl_ASN1tostr(&cert.notAfter, 0); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Expire Date", ccp); - if(!certnum) - infof(data, " Expire Date: %s\n", ccp); - free((char *) ccp); - - /* Public Key Algorithm. */ - ccp = dumpAlgo(¶m, cert.subjectPublicKeyAlgorithm.beg, - cert.subjectPublicKeyAlgorithm.end); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Public Key Algorithm", ccp); - if(!certnum) - infof(data, " Public Key Algorithm: %s\n", ccp); - do_pubkey(data, certnum, ccp, ¶m, &cert.subjectPublicKey); - free((char *) ccp); - -/* TODO: extensions. */ - - /* Signature. */ - ccp = Curl_ASN1tostr(&cert.signature, 0); - if(!ccp) - return CURLE_OUT_OF_MEMORY; - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Signature", ccp); - if(!certnum) - infof(data, " Signature: %s\n", ccp); - free((char *) ccp); - - /* Generate PEM certificate. */ - result = Curl_base64_encode(data, cert.certificate.beg, - cert.certificate.end - cert.certificate.beg, - &cp1, &cl1); - if(result) - return result; - /* Compute the number of characters in final certificate string. Format is: - -----BEGIN CERTIFICATE-----\n - \n - . - . - . - -----END CERTIFICATE-----\n - */ - i = 28 + cl1 + (cl1 + 64 - 1) / 64 + 26; - cp2 = malloc(i + 1); - if(!cp2) { - free(cp1); - return CURLE_OUT_OF_MEMORY; - } - /* Build the certificate string. */ - i = copySubstring(cp2, "-----BEGIN CERTIFICATE-----"); - for(j = 0; j < cl1; j += 64) - i += copySubstring(cp2 + i, cp1 + j); - i += copySubstring(cp2 + i, "-----END CERTIFICATE-----"); - cp2[i] = '\0'; - free(cp1); - if(data->set.ssl.certinfo) - Curl_ssl_push_certinfo(data, certnum, "Cert", cp2); - if(!certnum) - infof(data, "%s\n", cp2); - free(cp2); - return CURLE_OK; -} - -#endif /* USE_GSKIT or USE_NSS or USE_GNUTLS or USE_CYASSL or USE_SCHANNEL */ - -#if defined(USE_GSKIT) - -static const char *checkOID(const char *beg, const char *end, - const char *oid) -{ - curl_asn1Element e; - const char *ccp; - const char *p; - bool matched; - - /* Check if first ASN.1 element at `beg' is the given OID. - Return a pointer in the source after the OID if found, else NULL. */ - - ccp = Curl_getASN1Element(&e, beg, end); - if(!ccp || e.tag != CURL_ASN1_OBJECT_IDENTIFIER) - return (const char *) NULL; - - p = OID2str(e.beg, e.end, FALSE); - if(!p) - return (const char *) NULL; - - matched = !strcmp(p, oid); - free((char *) p); - return matched? ccp: (const char *) NULL; -} - -CURLcode Curl_verifyhost(struct connectdata *conn, - const char *beg, const char *end) -{ - struct Curl_easy *data = conn->data; - curl_X509certificate cert; - curl_asn1Element dn; - curl_asn1Element elem; - curl_asn1Element ext; - curl_asn1Element name; - const char *p; - const char *q; - char *dnsname; - int matched = -1; - size_t addrlen = (size_t) -1; - ssize_t len; - const char * const hostname = SSL_IS_PROXY()? conn->http_proxy.host.name: - conn->host.name; - const char * const dispname = SSL_IS_PROXY()? - conn->http_proxy.host.dispname: - conn->host.dispname; -#ifdef ENABLE_IPV6 - struct in6_addr addr; -#else - struct in_addr addr; -#endif - - /* Verify that connection server matches info in X509 certificate at - `beg'..`end'. */ - - if(!SSL_CONN_CONFIG(verifyhost)) - return CURLE_OK; - - if(Curl_parseX509(&cert, beg, end)) - return CURLE_PEER_FAILED_VERIFICATION; - - /* Get the server IP address. */ -#ifdef ENABLE_IPV6 - if(conn->bits.ipv6_ip && Curl_inet_pton(AF_INET6, hostname, &addr)) - addrlen = sizeof(struct in6_addr); - else -#endif - if(Curl_inet_pton(AF_INET, hostname, &addr)) - addrlen = sizeof(struct in_addr); - - /* Process extensions. */ - for(p = cert.extensions.beg; p < cert.extensions.end && matched != 1;) { - p = Curl_getASN1Element(&ext, p, cert.extensions.end); - /* Check if extension is a subjectAlternativeName. */ - ext.beg = checkOID(ext.beg, ext.end, sanOID); - if(ext.beg) { - ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end); - /* Skip critical if present. */ - if(elem.tag == CURL_ASN1_BOOLEAN) - ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end); - /* Parse the octet string contents: is a single sequence. */ - Curl_getASN1Element(&elem, elem.beg, elem.end); - /* Check all GeneralNames. */ - for(q = elem.beg; matched != 1 && q < elem.end;) { - q = Curl_getASN1Element(&name, q, elem.end); - switch(name.tag) { - case 2: /* DNS name. */ - len = utf8asn1str(&dnsname, CURL_ASN1_IA5_STRING, - name.beg, name.end); - if(len > 0 && (size_t)len == strlen(dnsname)) - matched = Curl_cert_hostcheck(dnsname, hostname); - else - matched = 0; - free(dnsname); - break; - - case 7: /* IP address. */ - matched = (size_t) (name.end - q) == addrlen && - !memcmp(&addr, q, addrlen); - break; - } - } - } - } - - switch(matched) { - case 1: - /* an alternative name matched the server hostname */ - infof(data, "\t subjectAltName: %s matched\n", dispname); - return CURLE_OK; - case 0: - /* an alternative name field existed, but didn't match and then - we MUST fail */ - infof(data, "\t subjectAltName does not match %s\n", dispname); - return CURLE_PEER_FAILED_VERIFICATION; - } - - /* Process subject. */ - name.header = NULL; - name.beg = name.end = ""; - q = cert.subject.beg; - /* we have to look to the last occurrence of a commonName in the - distinguished one to get the most significant one. */ - while(q < cert.subject.end) { - q = Curl_getASN1Element(&dn, q, cert.subject.end); - for(p = dn.beg; p < dn.end;) { - p = Curl_getASN1Element(&elem, p, dn.end); - /* We have a DN's AttributeTypeAndValue: check it in case it's a CN. */ - elem.beg = checkOID(elem.beg, elem.end, cnOID); - if(elem.beg) - name = elem; /* Latch CN. */ - } - } - - /* Check the CN if found. */ - if(!Curl_getASN1Element(&elem, name.beg, name.end)) - failf(data, "SSL: unable to obtain common name from peer certificate"); - else { - len = utf8asn1str(&dnsname, elem.tag, elem.beg, elem.end); - if(len < 0) { - free(dnsname); - return CURLE_OUT_OF_MEMORY; - } - if(strlen(dnsname) != (size_t) len) /* Nul byte in string ? */ - failf(data, "SSL: illegal cert name field"); - else if(Curl_cert_hostcheck((const char *) dnsname, hostname)) { - infof(data, "\t common name: %s (matched)\n", dnsname); - free(dnsname); - return CURLE_OK; - } - else - failf(data, "SSL: certificate subject name '%s' does not match " - "target host name '%s'", dnsname, dispname); - free(dnsname); - } - - return CURLE_PEER_FAILED_VERIFICATION; -} - -#endif /* USE_GSKIT */ diff --git a/build/premake/premake5/contrib/curl/lib/x509asn1.h b/build/premake/premake5/contrib/curl/lib/x509asn1.h deleted file mode 100644 index ce40297927..0000000000 --- a/build/premake/premake5/contrib/curl/lib/x509asn1.h +++ /dev/null @@ -1,134 +0,0 @@ -#ifndef HEADER_CURL_X509ASN1_H -#define HEADER_CURL_X509ASN1_H - -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at https://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ***************************************************************************/ - -#include "curl_setup.h" - -#if defined(USE_GSKIT) || defined(USE_NSS) || defined(USE_GNUTLS) || \ - defined(USE_CYASSL) || defined(USE_SCHANNEL) - -#include "urldata.h" - -/* - * Constants. - */ - -/* Largest supported ASN.1 structure. */ -#define CURL_ASN1_MAX ((size_t) 0x40000) /* 256K */ - -/* ASN.1 classes. */ -#define CURL_ASN1_UNIVERSAL 0 -#define CURL_ASN1_APPLICATION 1 -#define CURL_ASN1_CONTEXT_SPECIFIC 2 -#define CURL_ASN1_PRIVATE 3 - -/* ASN.1 types. */ -#define CURL_ASN1_BOOLEAN 1 -#define CURL_ASN1_INTEGER 2 -#define CURL_ASN1_BIT_STRING 3 -#define CURL_ASN1_OCTET_STRING 4 -#define CURL_ASN1_NULL 5 -#define CURL_ASN1_OBJECT_IDENTIFIER 6 -#define CURL_ASN1_OBJECT_DESCRIPTOR 7 -#define CURL_ASN1_INSTANCE_OF 8 -#define CURL_ASN1_REAL 9 -#define CURL_ASN1_ENUMERATED 10 -#define CURL_ASN1_EMBEDDED 11 -#define CURL_ASN1_UTF8_STRING 12 -#define CURL_ASN1_RELATIVE_OID 13 -#define CURL_ASN1_SEQUENCE 16 -#define CURL_ASN1_SET 17 -#define CURL_ASN1_NUMERIC_STRING 18 -#define CURL_ASN1_PRINTABLE_STRING 19 -#define CURL_ASN1_TELETEX_STRING 20 -#define CURL_ASN1_VIDEOTEX_STRING 21 -#define CURL_ASN1_IA5_STRING 22 -#define CURL_ASN1_UTC_TIME 23 -#define CURL_ASN1_GENERALIZED_TIME 24 -#define CURL_ASN1_GRAPHIC_STRING 25 -#define CURL_ASN1_VISIBLE_STRING 26 -#define CURL_ASN1_GENERAL_STRING 27 -#define CURL_ASN1_UNIVERSAL_STRING 28 -#define CURL_ASN1_CHARACTER_STRING 29 -#define CURL_ASN1_BMP_STRING 30 - - -/* - * Types. - */ - -/* ASN.1 parsed element. */ -typedef struct { - const char * header; /* Pointer to header byte. */ - const char * beg; /* Pointer to element data. */ - const char * end; /* Pointer to 1st byte after element. */ - unsigned char class; /* ASN.1 element class. */ - unsigned char tag; /* ASN.1 element tag. */ - bool constructed; /* Element is constructed. */ -} curl_asn1Element; - - -/* ASN.1 OID table entry. */ -typedef struct { - const char * numoid; /* Dotted-numeric OID. */ - const char * textoid; /* OID name. */ -} curl_OID; - - -/* X509 certificate: RFC 5280. */ -typedef struct { - curl_asn1Element certificate; - curl_asn1Element version; - curl_asn1Element serialNumber; - curl_asn1Element signatureAlgorithm; - curl_asn1Element signature; - curl_asn1Element issuer; - curl_asn1Element notBefore; - curl_asn1Element notAfter; - curl_asn1Element subject; - curl_asn1Element subjectPublicKeyInfo; - curl_asn1Element subjectPublicKeyAlgorithm; - curl_asn1Element subjectPublicKey; - curl_asn1Element issuerUniqueID; - curl_asn1Element subjectUniqueID; - curl_asn1Element extensions; -} curl_X509certificate; - - -/* - * Prototypes. - */ - -const char *Curl_getASN1Element(curl_asn1Element *elem, - const char *beg, const char *end); -const char *Curl_ASN1tostr(curl_asn1Element *elem, int type); -const char *Curl_DNtostr(curl_asn1Element *dn); -int Curl_parseX509(curl_X509certificate *cert, - const char *beg, const char *end); -CURLcode Curl_extract_certinfo(struct connectdata *conn, int certnum, - const char *beg, const char *end); -CURLcode Curl_verifyhost(struct connectdata *conn, - const char *beg, const char *end); -#endif /* USE_GSKIT or USE_NSS or USE_GNUTLS or USE_CYASSL or USE_SCHANNEL */ -#endif /* HEADER_CURL_X509ASN1_H */ diff --git a/build/premake/premake5/contrib/curl/premake5.lua b/build/premake/premake5/contrib/curl/premake5.lua deleted file mode 100644 index 9f5ff0d271..0000000000 --- a/build/premake/premake5/contrib/curl/premake5.lua +++ /dev/null @@ -1,49 +0,0 @@ -project "curl-lib" - language "C" - kind "StaticLib" - includedirs { "include", "lib", "../mbedtls/include/" } - defines { "BUILDING_LIBCURL", "CURL_STATICLIB", "HTTP_ONLY" } - warnings "off" - - if not _OPTIONS["no-zlib"] then - defines { 'USE_ZLIB' } - includedirs { '../zlib' } - end - - files - { - "**.h", - "**.c" - } - - filter { "system:windows" } - defines { "USE_SCHANNEL", "USE_WINDOWS_SSPI" } - links "crypt32" - - filter { "system:macosx" } - defines { "USE_DARWINSSL" } - - filter { "system:not windows", "system:not macosx" } - defines { "USE_MBEDTLS" } - - filter { "system:linux or bsd or solaris" } - defines { "CURL_HIDDEN_SYMBOLS" } - - -- find the location of the ca bundle - local ca = nil - for _, f in ipairs { - "/etc/ssl/certs/ca-certificates.crt", - "/etc/pki/tls/certs/ca-bundle.crt", - "/usr/share/ssl/certs/ca-bundle.crt", - "/usr/local/share/certs/ca-root.crt", - "/usr/local/share/certs/ca-root-nss.crt", - "/etc/certs/ca-certificates.crt", - "/etc/ssl/cert.pem" } do - if os.isfile(f) then - ca = f - break - end - end - if ca then - defines { 'CURL_CA_BUNDLE="' .. ca .. '"' } - end diff --git a/build/premake/premake5/contrib/libzip/config.h b/build/premake/premake5/contrib/libzip/config.h deleted file mode 100644 index 7a30f3dbd9..0000000000 --- a/build/premake/premake5/contrib/libzip/config.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef HAD_CONFIG_H -#define HAD_CONFIG_H -#ifndef _HAD_ZIPCONF_H -#include "zipconf.h" -#endif -/* BEGIN DEFINES */ -#define HAVE__CLOSE -#define HAVE__DUP -#define HAVE__FDOPEN -#define HAVE__FILENO -#define HAVE__OPEN -#define HAVE__SNPRINTF -#define HAVE__STRDUP -#define HAVE__STRICMP -/* #undef HAVE_FSEEKO */ -/* #undef HAVE_FTELLO */ -#define HAVE_OPEN -/* #undef HAVE_MKSTEMP */ -/* #undef HAVE_SNPRINTF */ -/* #undef HAVE_STRCASECMP */ -#define HAVE_STRDUP -/* #undef HAVE_STRUCT_TM_TM_ZONE */ -#ifdef _WIN32 -#define HAVE_MOVEFILEEXA -#endif -/* #undef HAVE_STRINGS_H */ -/* #undef HAVE_UNISTD_H */ -#define __INT8_LIBZIP 1 -#define INT8_T_LIBZIP 1 -#define UINT8_T_LIBZIP 1 -#define __INT16_LIBZIP 2 -#define INT16_T_LIBZIP 2 -#define UINT16_T_LIBZIP 2 -#define __INT32_LIBZIP 4 -#define INT32_T_LIBZIP 4 -#define UINT32_T_LIBZIP 4 -#define __INT64_LIBZIP 8 -#define INT64_T_LIBZIP 8 -#define UINT64_T_LIBZIP 8 -#define SIZEOF_OFF_T 4 -#define SIZE_T_LIBZIP 8 -/* #undef SSIZE_T_LIBZIP */ -/* END DEFINES */ -#define PACKAGE "libzip" -#define VERSION "0.11.2" - -#ifndef HAVE_SSIZE_T_LIBZIP -# if SIZE_T_LIBZIP == INT_LIBZIP -typedef int ssize_t; -# elif SIZE_T_LIBZIP == LONG_LIBZIP -typedef long ssize_t; -# elif SIZE_T_LIBZIP == LONG_LONG_LIBZIP -typedef long long ssize_t; -# else -#error no suitable type for ssize_t found -# endif -#endif - -#endif /* HAD_CONFIG_H */ diff --git a/build/premake/premake5/contrib/libzip/include/zconf.h b/build/premake/premake5/contrib/libzip/include/zconf.h deleted file mode 100644 index c37d056aa3..0000000000 --- a/build/premake/premake5/contrib/libzip/include/zconf.h +++ /dev/null @@ -1,514 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -/* #undef Z_PREFIX */ -/* #undef Z_HAVE_UNISTD_H */ - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzvprintf z_gzvprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetHeader z_inflateGetHeader -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateSetDictionary z_inflateSetDictionary -# define inflateGetDictionary z_inflateGetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern -(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/build/premake/premake5/contrib/libzip/include/zipconf.h b/build/premake/premake5/contrib/libzip/include/zipconf.h deleted file mode 100644 index ec732dd332..0000000000 --- a/build/premake/premake5/contrib/libzip/include/zipconf.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef _HAD_ZIPCONF_H -#define _HAD_ZIPCONF_H - -/* - zipconf.h -- platform specific include file - - This file was generated automatically by CMake - based on ../cmake-zipconf.h.in. - */ - -/* #undef HAVE_INTTYPES_H_LIBZIP */ -#define HAVE_STDINT_H_LIBZIP -#define HAVE_SYS_TYPES_H_LIBZIP -#define HAVE___INT8_LIBZIP -#define HAVE_INT8_T_LIBZIP -#define HAVE_UINT8_T_LIBZIP -#define HAVE___INT16_LIBZIP -#define HAVE_INT16_T_LIBZIP -#define HAVE_UINT16_T_LIBZIP -#define HAVE___INT32_LIBZIP -#define HAVE_INT32_T_LIBZIP -#define HAVE_UINT32_T_LIBZIP -#define HAVE___INT64_LIBZIP -#define HAVE_INT64_T_LIBZIP -#define HAVE_UINT64_T_LIBZIP -#define SHORT_LIBZIP 2 -#define INT_LIBZIP 4 -#define LONG_LIBZIP 4 -#define LONG_LONG_LIBZIP 8 - -#if defined(HAVE_STDINT_H_LIBZIP) -#include -#elif defined(HAVE_INTTYPES_H_LIBZIP) -#include -#elif defined(HAVE_SYS_TYPES_H_LIBZIP) -#include -#endif - -#if defined(HAVE_INT8_T_LIBZIP) -typedef int8_t zip_int8_t; -#elif defined(HAVE___INT8_LIBZIP) -typedef __int8 zip_int8_t; -#else -typedef signed char zip_int8_t; -#endif -#if defined(HAVE_UINT8_T_LIBZIP) -typedef uint8_t zip_uint8_t; -#elif defined(HAVE___INT8_LIBZIP) -typedef unsigned __int8 zip_uint8_t; -#else -typedef unsigned char zip_uint8_t; -#endif -#if defined(HAVE_INT16_T_LIBZIP) -typedef int16_t zip_int16_t; -#elif defined(HAVE___INT16_LIBZIP) -typedef __int16 zip_int16_t; -#elif defined(SHORT_LIBZIP) && SHORT_LIBZIP == 2 -typedef signed short zip_int16_t; -#endif -#if defined(HAVE_UINT16_T_LIBZIP) -typedef uint16_t zip_uint16_t; -#elif defined(HAVE___INT16_LIBZIP) -typedef unsigned __int16 zip_uint16_t; -#elif defined(SHORT_LIBZIP) && SHORT_LIBZIP == 2 -typedef unsigned short zip_uint16_t; -#endif -#if defined(HAVE_INT32_T_LIBZIP) -typedef int32_t zip_int32_t; -#elif defined(HAVE___INT32_LIBZIP) -typedef __int32 zip_int32_t; -#elif defined(INT_LIBZIP) && INT_LIBZIP == 4 -typedef signed int zip_int32_t; -#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 4 -typedef signed long zip_int32_t; -#endif -#if defined(HAVE_UINT32_T_LIBZIP) -typedef uint32_t zip_uint32_t; -#elif defined(HAVE___INT32_LIBZIP) -typedef unsigned __int32 zip_uint32_t; -#elif defined(INT_LIBZIP) && INT_LIBZIP == 4 -typedef unsigned int zip_uint32_t; -#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 4 -typedef unsigned long zip_uint32_t; -#endif -#if defined(HAVE_INT64_T_LIBZIP) -typedef int64_t zip_int64_t; -#elif defined(HAVE___INT64_LIBZIP) -typedef __int64 zip_int64_t; -#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 8 -typedef signed long zip_int64_t; -#elif defined(LONG_LONG_LIBZIP) && LONG_LONG_LIBZIP == 8 -typedef signed long long zip_int64_t; -#endif -#if defined(HAVE_UINT64_T_LIBZIP) -typedef uint64_t zip_uint64_t; -#elif defined(HAVE___INT64_LIBZIP) -typedef unsigned __int64 zip_uint64_t; -#elif defined(LONG_LIBZIP) && LONG_LONG_LIBZIP == 8 -typedef unsigned long zip_uint64_t; -#elif defined(LONG_LONG_LIBZIP) && LONG_LONG_LIBZIP == 8 -typedef unsigned long long zip_uint64_t; -#endif - -#define ZIP_INT8_MIN -0x80 -#define ZIP_INT8_MAX 0x7f -#define ZIP_UINT8_MAX 0xff - -#define ZIP_INT16_MIN -0x8000 -#define ZIP_INT16_MAX 0x7fff -#define ZIP_UINT16_MAX 0xffff - -#define ZIP_INT32_MIN -0x80000000L -#define ZIP_INT32_MAX 0x7fffffffL -#define ZIP_UINT32_MAX 0xffffffffLU - -#define ZIP_INT64_MIN -0x8000000000000000LL -#define ZIP_INT64_MAX 0x7fffffffffffffffLL -#define ZIP_UINT64_MAX 0xffffffffffffffffULL - -#endif /* zipconf.h */ diff --git a/build/premake/premake5/contrib/libzip/include/zlib.h b/build/premake/premake5/contrib/libzip/include/zlib.h deleted file mode 100644 index 3e0c7672ac..0000000000 --- a/build/premake/premake5/contrib/libzip/include/zlib.h +++ /dev/null @@ -1,1768 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.8, April 28th, 2013 - - Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.8" -#define ZLIB_VERNUM 0x1280 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 8 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip streams in memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use in the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). Some - output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed code - block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the stream - are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least the - value returned by deflateBound (see below). Then deflate is guaranteed to - return Z_STREAM_END. If not enough output space is provided, deflate will - not return Z_STREAM_END, and it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect the - compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the - exact value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit() does not process any header information -- that is deferred - until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing will - resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained, so applications that need that information should - instead use raw inflate, see inflateInit2() below, or inflateBack() and - perform their own processing of the gzip header and trailer. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is desired. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by the - caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. The - stream will keep the same compression level and any other attributes that - may have been set by deflateInit2. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression level is changed, the input available so far is - compressed with the old level (and may be flushed); the new level will take - effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to be - compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if - strm->avail_out was zero. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above or -1 << 16 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the normal - behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed buffer. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or writing. The mode parameter is as - in fopen ("rb" or "wb") but can also include a compression level ("wb9") or - a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only - compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' - for fixed code compression as in "wb9F". (See the description of - deflateInit2 for more information about the strategy parameter.) 'T' will - request transparent writing or appending with no compression and not using - the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen associates a gzFile with the file descriptor fd. File descriptors - are obtained from calls like open, dup, creat, pipe or fileno (if the file - has been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. The - default buffer size is 8192 bytes. This function must be called after - gzopen() or gzdopen(), and before any other calls that read or write the - file. The buffer memory allocation is always deferred to the first read or - write. Two buffers are allocated, either both of the specified size when - writing, or one of the specified size and the other twice that size when - reading. A larger buffer size of, for example, 64K or 128K bytes will - noticeably increase the speed of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or 0 in case of error. The number of - uncompressed bytes written is limited to 8191, or one less than the buffer - size given to gzbuffer(). The caller should assure that this limit is not - exceeded. If it is exceeded, then gzprintf() will return an error (0) with - nothing written. In this case, there may also be a buffer overflow with - unpredictable consequences, which is possible only if zlib was compiled with - the insecure functions sprintf() or vsprintf() because the secure snprintf() - or vsnprintf() functions were not available. This can be determined using - zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or a - newline character is read and transferred to buf, or an end-of-file - condition is encountered. If any characters are read or if len == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, then the buffer is left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter flush - is as in the deflate() function. The return value is the zlib error number - (see function gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatented gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed file. This position represents a number of bytes in the - uncompressed data stream, and is zero when starting, even if appending or - reading a gzip stream from the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Returns the current offset in the file being read or written. This offset - includes the count of bytes that precede the gzip stream, for example when - appending or when using gzdopen() for reading. When reading, the offset - does not include as yet unused buffered input. This information can be used - for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator has been set while reading, - false (0) otherwise. Note that the end-of-file indicator is set only if the - read tried to go past the end of the input, but came up short. Therefore, - just like feof(), gzeof() may return false even if there is no more data to - read, in the event that the last read request was for the exact number of - bytes remaining in the input file. This will happen if the input file size - is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed file. errnum is set to zlib error number. If an error occurred - in the file system and not in the compression library, errnum is set to - Z_ERRNO and the application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is Z_NULL, this function returns the - required initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is Z_NULL, this function returns the required - initial value for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/build/premake/premake5/contrib/libzip/mkstemp.c b/build/premake/premake5/contrib/libzip/mkstemp.c deleted file mode 100644 index 843d5e3613..0000000000 --- a/build/premake/premake5/contrib/libzip/mkstemp.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Adapted from NetBSB libc by Dieter Baron */ - -/* NetBSD: gettemp.c,v 1.13 2003/12/05 00:57:36 uebayasi Exp */ - -/* - * Copyright (c) 1987, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -#include -#include -#include -#include -#ifdef _WIN32 -#include -#endif -#include -#include - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - - - -int -_zip_mkstemp(char *path) -{ -#ifdef _WIN32 - int ret; - ret = _creat(_mktemp(path), _S_IREAD|_S_IWRITE); - if (ret == -1) { - return 0; - } else { - return ret; - } -#else - int fd; - char *start, *trv; - struct stat sbuf; - pid_t pid; - - /* To guarantee multiple calls generate unique names even if - the file is not created. 676 different possibilities with 7 - or more X's, 26 with 6 or less. */ - static char xtra[2] = "aa"; - int xcnt = 0; - - pid = getpid(); - - /* Move to end of path and count trailing X's. */ - for (trv = path; *trv; ++trv) - if (*trv == 'X') - xcnt++; - else - xcnt = 0; - - /* Use at least one from xtra. Use 2 if more than 6 X's. */ - if (*(trv - 1) == 'X') - *--trv = xtra[0]; - if (xcnt > 6 && *(trv - 1) == 'X') - *--trv = xtra[1]; - - /* Set remaining X's to pid digits with 0's to the left. */ - while (*--trv == 'X') { - *trv = (pid % 10) + '0'; - pid /= 10; - } - - /* update xtra for next call. */ - if (xtra[0] != 'z') - xtra[0]++; - else { - xtra[0] = 'a'; - if (xtra[1] != 'z') - xtra[1]++; - else - xtra[1] = 'a'; - } - - /* - * check the target directory; if you have six X's and it - * doesn't exist this runs for a *very* long time. - */ - for (start = trv + 1;; --trv) { - if (trv <= path) - break; - if (*trv == '/') { - *trv = '\0'; - if (stat(path, &sbuf)) - return (0); - if (!S_ISDIR(sbuf.st_mode)) { - errno = ENOTDIR; - return (0); - } - *trv = '/'; - break; - } - } - - for (;;) { - if ((fd=open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0) - return (fd); - if (errno != EEXIST) - return (0); - - /* tricky little algorithm for backward compatibility */ - for (trv = start;;) { - if (!*trv) - return (0); - if (*trv == 'z') - *trv++ = 'a'; - else { - if (isdigit((unsigned char)*trv)) - *trv = 'a'; - else - ++*trv; - break; - } - } - } - /*NOTREACHED*/ -#endif -} diff --git a/build/premake/premake5/contrib/libzip/premake5.lua b/build/premake/premake5/contrib/libzip/premake5.lua deleted file mode 100644 index 1532d5182f..0000000000 --- a/build/premake/premake5/contrib/libzip/premake5.lua +++ /dev/null @@ -1,23 +0,0 @@ -project "zip-lib" - language "C" - kind "StaticLib" - includedirs "include" - defines { "N_FSEEKO" } - warnings "off" - - files - { - "**.h", - "**.c" - } - - filter "system:linux or bsd or solaris or haiku" - defines { "HAVE_SSIZE_T_LIBZIP", "HAVE_CONFIG_H" } - - filter "system:windows" - defines { "_WINDOWS" } - filter { "system:windows", "toolset:mingw" } - defines { "HAVE_SSIZE_T_LIBZIP" } - - filter "system:macosx" - defines { "HAVE_SSIZE_T_LIBZIP" } diff --git a/build/premake/premake5/contrib/libzip/zconf.h b/build/premake/premake5/contrib/libzip/zconf.h deleted file mode 100644 index 9ccbb0a6fb..0000000000 --- a/build/premake/premake5/contrib/libzip/zconf.h +++ /dev/null @@ -1,513 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -/* #undef Z_PREFIX */ -/* #undef Z_HAVE_UNISTD_H */ - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzvprintf z_gzvprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetHeader z_inflateGetHeader -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateSetDictionary z_inflateSetDictionary -# define inflateGetDictionary z_inflateGetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/build/premake/premake5/contrib/libzip/zip.h b/build/premake/premake5/contrib/libzip/zip.h deleted file mode 100644 index 492beaf7e3..0000000000 --- a/build/premake/premake5/contrib/libzip/zip.h +++ /dev/null @@ -1,322 +0,0 @@ -#ifndef _HAD_ZIP_H -#define _HAD_ZIP_H - -/* - zip.h -- exported declarations. - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#ifndef ZIP_EXTERN -#ifdef _WIN32 -#define ZIP_EXTERN -//__declspec(dllimport) -#elif defined(__GNUC__) && __GNUC__ >= 4 -#define ZIP_EXTERN __attribute__ ((visibility ("default"))) -#else -#define ZIP_EXTERN -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include "zipconf.h" - -#include -#include -#include - -/* flags for zip_open */ - -#define ZIP_CREATE 1 -#define ZIP_EXCL 2 -#define ZIP_CHECKCONS 4 -#define ZIP_TRUNCATE 8 - - -/* flags for zip_name_locate, zip_fopen, zip_stat, ... */ - -#define ZIP_FL_NOCASE 1u /* ignore case on name lookup */ -#define ZIP_FL_NODIR 2u /* ignore directory component */ -#define ZIP_FL_COMPRESSED 4u /* read compressed data */ -#define ZIP_FL_UNCHANGED 8u /* use original data, ignoring changes */ -#define ZIP_FL_RECOMPRESS 16u /* force recompression of data */ -#define ZIP_FL_ENCRYPTED 32u /* read encrypted data (implies ZIP_FL_COMPRESSED) */ -#define ZIP_FL_ENC_GUESS 0u /* guess string encoding (is default) */ -#define ZIP_FL_ENC_RAW 64u /* get unmodified string */ -#define ZIP_FL_ENC_STRICT 128u /* follow specification strictly */ -#define ZIP_FL_LOCAL 256u /* in local header */ -#define ZIP_FL_CENTRAL 512u /* in central directory */ -/* 1024u reserved for internal use */ -#define ZIP_FL_ENC_UTF_8 2048u /* string is UTF-8 encoded */ -#define ZIP_FL_ENC_CP437 4096u /* string is CP437 encoded */ -#define ZIP_FL_OVERWRITE 8192u /* zip_file_add: if file with name exists, overwrite (replace) it */ - -/* archive global flags flags */ - -#define ZIP_AFL_TORRENT 1u /* torrent zipped */ -#define ZIP_AFL_RDONLY 2u /* read only -- cannot be cleared */ - - -/* create a new extra field */ - -#define ZIP_EXTRA_FIELD_ALL ZIP_UINT16_MAX -#define ZIP_EXTRA_FIELD_NEW ZIP_UINT16_MAX - -/* flags for compression and encryption sources */ - -#define ZIP_CODEC_DECODE 0 /* decompress/decrypt (encode flag not set) */ -#define ZIP_CODEC_ENCODE 1 /* compress/encrypt */ - - -/* libzip error codes */ - -#define ZIP_ER_OK 0 /* N No error */ -#define ZIP_ER_MULTIDISK 1 /* N Multi-disk zip archives not supported */ -#define ZIP_ER_RENAME 2 /* S Renaming temporary file failed */ -#define ZIP_ER_CLOSE 3 /* S Closing zip archive failed */ -#define ZIP_ER_SEEK 4 /* S Seek error */ -#define ZIP_ER_READ 5 /* S Read error */ -#define ZIP_ER_WRITE 6 /* S Write error */ -#define ZIP_ER_CRC 7 /* N CRC error */ -#define ZIP_ER_ZIPCLOSED 8 /* N Containing zip archive was closed */ -#define ZIP_ER_NOENT 9 /* N No such file */ -#define ZIP_ER_EXISTS 10 /* N File already exists */ -#define ZIP_ER_OPEN 11 /* S Can't open file */ -#define ZIP_ER_TMPOPEN 12 /* S Failure to create temporary file */ -#define ZIP_ER_ZLIB 13 /* Z Zlib error */ -#define ZIP_ER_MEMORY 14 /* N Malloc failure */ -#define ZIP_ER_CHANGED 15 /* N Entry has been changed */ -#define ZIP_ER_COMPNOTSUPP 16 /* N Compression method not supported */ -#define ZIP_ER_EOF 17 /* N Premature EOF */ -#define ZIP_ER_INVAL 18 /* N Invalid argument */ -#define ZIP_ER_NOZIP 19 /* N Not a zip archive */ -#define ZIP_ER_INTERNAL 20 /* N Internal error */ -#define ZIP_ER_INCONS 21 /* N Zip archive inconsistent */ -#define ZIP_ER_REMOVE 22 /* S Can't remove file */ -#define ZIP_ER_DELETED 23 /* N Entry has been deleted */ -#define ZIP_ER_ENCRNOTSUPP 24 /* N Encryption method not supported */ -#define ZIP_ER_RDONLY 25 /* N Read-only archive */ -#define ZIP_ER_NOPASSWD 26 /* N No password provided */ -#define ZIP_ER_WRONGPASSWD 27 /* N Wrong password provided */ - -/* type of system error value */ - -#define ZIP_ET_NONE 0 /* sys_err unused */ -#define ZIP_ET_SYS 1 /* sys_err is errno */ -#define ZIP_ET_ZLIB 2 /* sys_err is zlib error code */ - -/* compression methods */ - -#define ZIP_CM_DEFAULT -1 /* better of deflate or store */ -#define ZIP_CM_STORE 0 /* stored (uncompressed) */ -#define ZIP_CM_SHRINK 1 /* shrunk */ -#define ZIP_CM_REDUCE_1 2 /* reduced with factor 1 */ -#define ZIP_CM_REDUCE_2 3 /* reduced with factor 2 */ -#define ZIP_CM_REDUCE_3 4 /* reduced with factor 3 */ -#define ZIP_CM_REDUCE_4 5 /* reduced with factor 4 */ -#define ZIP_CM_IMPLODE 6 /* imploded */ -/* 7 - Reserved for Tokenizing compression algorithm */ -#define ZIP_CM_DEFLATE 8 /* deflated */ -#define ZIP_CM_DEFLATE64 9 /* deflate64 */ -#define ZIP_CM_PKWARE_IMPLODE 10 /* PKWARE imploding */ -/* 11 - Reserved by PKWARE */ -#define ZIP_CM_BZIP2 12 /* compressed using BZIP2 algorithm */ -/* 13 - Reserved by PKWARE */ -#define ZIP_CM_LZMA 14 /* LZMA (EFS) */ -/* 15-17 - Reserved by PKWARE */ -#define ZIP_CM_TERSE 18 /* compressed using IBM TERSE (new) */ -#define ZIP_CM_LZ77 19 /* IBM LZ77 z Architecture (PFS) */ -#define ZIP_CM_WAVPACK 97 /* WavPack compressed data */ -#define ZIP_CM_PPMD 98 /* PPMd version I, Rev 1 */ - -/* encryption methods */ - -#define ZIP_EM_NONE 0 /* not encrypted */ -#define ZIP_EM_TRAD_PKWARE 1 /* traditional PKWARE encryption */ -#if 0 /* Strong Encryption Header not parsed yet */ -#define ZIP_EM_DES 0x6601 /* strong encryption: DES */ -#define ZIP_EM_RC2_OLD 0x6602 /* strong encryption: RC2, version < 5.2 */ -#define ZIP_EM_3DES_168 0x6603 -#define ZIP_EM_3DES_112 0x6609 -#define ZIP_EM_AES_128 0x660e -#define ZIP_EM_AES_192 0x660f -#define ZIP_EM_AES_256 0x6610 -#define ZIP_EM_RC2 0x6702 /* strong encryption: RC2, version >= 5.2 */ -#define ZIP_EM_RC4 0x6801 -#endif -#define ZIP_EM_UNKNOWN 0xffff /* unknown algorithm */ - -#define ZIP_OPSYS_DOS 0x00u -#define ZIP_OPSYS_AMIGA 0x01u -#define ZIP_OPSYS_OPENVMS 0x02u -#define ZIP_OPSYS_UNIX 0x03u -#define ZIP_OPSYS_VM_CMS 0x04u -#define ZIP_OPSYS_ATARI_ST 0x05u -#define ZIP_OPSYS_OS_2 0x06u -#define ZIP_OPSYS_MACINTOSH 0x07u -#define ZIP_OPSYS_Z_SYSTEM 0x08u -#define ZIP_OPSYS_CPM 0x09u -#define ZIP_OPSYS_WINDOWS_NTFS 0x0au -#define ZIP_OPSYS_MVS 0x0bu -#define ZIP_OPSYS_VSE 0x0cu -#define ZIP_OPSYS_ACORN_RISC 0x0du -#define ZIP_OPSYS_VFAT 0x0eu -#define ZIP_OPSYS_ALTERNATE_MVS 0x0fu -#define ZIP_OPSYS_BEOS 0x10u -#define ZIP_OPSYS_TANDEM 0x11u -#define ZIP_OPSYS_OS_400 0x12u -#define ZIP_OPSYS_OS_X 0x13u - -#define ZIP_OPSYS_DEFAULT ZIP_OPSYS_UNIX - - - -enum zip_source_cmd { - ZIP_SOURCE_OPEN, /* prepare for reading */ - ZIP_SOURCE_READ, /* read data */ - ZIP_SOURCE_CLOSE, /* reading is done */ - ZIP_SOURCE_STAT, /* get meta information */ - ZIP_SOURCE_ERROR, /* get error information */ - ZIP_SOURCE_FREE /* cleanup and free resources */ -}; - -#define ZIP_SOURCE_ERR_LOWER -2 - -#define ZIP_STAT_NAME 0x0001u -#define ZIP_STAT_INDEX 0x0002u -#define ZIP_STAT_SIZE 0x0004u -#define ZIP_STAT_COMP_SIZE 0x0008u -#define ZIP_STAT_MTIME 0x0010u -#define ZIP_STAT_CRC 0x0020u -#define ZIP_STAT_COMP_METHOD 0x0040u -#define ZIP_STAT_ENCRYPTION_METHOD 0x0080u -#define ZIP_STAT_FLAGS 0x0100u - -struct zip_stat { - zip_uint64_t valid; /* which fields have valid values */ - const char *name; /* name of the file */ - zip_uint64_t index; /* index within archive */ - zip_uint64_t size; /* size of file (uncompressed) */ - zip_uint64_t comp_size; /* size of file (compressed) */ - time_t mtime; /* modification time */ - zip_uint32_t crc; /* crc of file data */ - zip_uint16_t comp_method; /* compression method used */ - zip_uint16_t encryption_method; /* encryption method used */ - zip_uint32_t flags; /* reserved for future use */ -}; - -struct zip; -struct zip_file; -struct zip_source; - -typedef zip_uint32_t zip_flags_t; - -typedef zip_int64_t (*zip_source_callback)(void *, void *, zip_uint64_t, - enum zip_source_cmd); - - - -#ifndef ZIP_DISABLE_DEPRECATED -ZIP_EXTERN zip_int64_t zip_add(struct zip *, const char *, struct zip_source *); /* use zip_file_add */ -ZIP_EXTERN zip_int64_t zip_add_dir(struct zip *, const char *); /* use zip_dir_add */ -ZIP_EXTERN const char *zip_get_file_comment(struct zip *, zip_uint64_t, int *, int); /* use zip_file_get_comment */ -ZIP_EXTERN int zip_get_num_files(struct zip *); /* use zip_get_num_entries instead */ -ZIP_EXTERN int zip_rename(struct zip *, zip_uint64_t, const char *); /* use zip_file_rename */ -ZIP_EXTERN int zip_replace(struct zip *, zip_uint64_t, struct zip_source *); /* use zip_file_replace */ -ZIP_EXTERN int zip_set_file_comment(struct zip *, zip_uint64_t, const char *, int); /* use zip_file_set_comment */ -#endif - -ZIP_EXTERN int zip_archive_set_tempdir(struct zip *, const char *); -ZIP_EXTERN int zip_close(struct zip *); -ZIP_EXTERN int zip_delete(struct zip *, zip_uint64_t); -ZIP_EXTERN zip_int64_t zip_dir_add(struct zip *, const char *, zip_flags_t); -ZIP_EXTERN void zip_discard(struct zip *); -ZIP_EXTERN void zip_error_clear(struct zip *); -ZIP_EXTERN void zip_error_get(struct zip *, int *, int *); -ZIP_EXTERN int zip_error_get_sys_type(int); -ZIP_EXTERN int zip_error_to_str(char *, zip_uint64_t, int, int); -ZIP_EXTERN int zip_fclose(struct zip_file *); -ZIP_EXTERN struct zip *zip_fdopen(int, int, int *); -ZIP_EXTERN zip_int64_t zip_file_add(struct zip *, const char *, struct zip_source *, zip_flags_t); -ZIP_EXTERN void zip_file_error_clear(struct zip_file *); -ZIP_EXTERN void zip_file_error_get(struct zip_file *, int *, int *); -ZIP_EXTERN int zip_file_extra_field_delete(struct zip *, zip_uint64_t, zip_uint16_t, zip_flags_t); -ZIP_EXTERN int zip_file_extra_field_delete_by_id(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t, zip_flags_t); -ZIP_EXTERN int zip_file_extra_field_set(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t, const zip_uint8_t *, zip_uint16_t, zip_flags_t); -ZIP_EXTERN zip_int16_t zip_file_extra_fields_count(struct zip *, zip_uint64_t, zip_flags_t); -ZIP_EXTERN zip_int16_t zip_file_extra_fields_count_by_id(struct zip *, zip_uint64_t, zip_uint16_t, zip_flags_t); -ZIP_EXTERN const zip_uint8_t *zip_file_extra_field_get(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t *, zip_uint16_t *, zip_flags_t); -ZIP_EXTERN const zip_uint8_t *zip_file_extra_field_get_by_id(struct zip *, zip_uint64_t, zip_uint16_t, zip_uint16_t, zip_uint16_t *, zip_flags_t); -ZIP_EXTERN const char *zip_file_get_comment(struct zip *, zip_uint64_t, zip_uint32_t *, zip_flags_t); -ZIP_EXTERN int zip_file_get_external_attributes(struct zip *, zip_uint64_t, zip_flags_t, zip_uint8_t *, zip_uint32_t *); -ZIP_EXTERN int zip_file_rename(struct zip *, zip_uint64_t, const char *, zip_flags_t); -ZIP_EXTERN int zip_file_replace(struct zip *, zip_uint64_t, struct zip_source *, zip_flags_t); -ZIP_EXTERN int zip_file_set_comment(struct zip *, zip_uint64_t, const char *, zip_uint16_t, zip_flags_t); -ZIP_EXTERN int zip_file_set_external_attributes(struct zip *, zip_uint64_t, zip_flags_t, zip_uint8_t, zip_uint32_t); -ZIP_EXTERN const char *zip_file_strerror(struct zip_file *); -ZIP_EXTERN struct zip_file *zip_fopen(struct zip *, const char *, zip_flags_t); -ZIP_EXTERN struct zip_file *zip_fopen_encrypted(struct zip *, const char *, zip_flags_t, const char *); -ZIP_EXTERN struct zip_file *zip_fopen_index(struct zip *, zip_uint64_t, zip_flags_t); -ZIP_EXTERN struct zip_file *zip_fopen_index_encrypted(struct zip *, zip_uint64_t, zip_flags_t, const char *); -ZIP_EXTERN zip_int64_t zip_fread(struct zip_file *, void *, zip_uint64_t); -ZIP_EXTERN const char *zip_get_archive_comment(struct zip *, int *, zip_flags_t); -ZIP_EXTERN int zip_get_archive_flag(struct zip *, zip_flags_t, zip_flags_t); -ZIP_EXTERN const char *zip_get_name(struct zip *, zip_uint64_t, zip_flags_t); -ZIP_EXTERN zip_int64_t zip_get_num_entries(struct zip *, zip_flags_t); -ZIP_EXTERN zip_int64_t zip_name_locate(struct zip *, const char *, zip_flags_t); -ZIP_EXTERN struct zip *zip_open(const char *, int, int *); -ZIP_EXTERN int zip_set_archive_comment(struct zip *, const char *, zip_uint16_t); -ZIP_EXTERN int zip_set_archive_flag(struct zip *, zip_flags_t, int); -ZIP_EXTERN int zip_set_default_password(struct zip *, const char *); -ZIP_EXTERN int zip_set_file_compression(struct zip *, zip_uint64_t, zip_int32_t, zip_uint32_t); -ZIP_EXTERN struct zip_source *zip_source_buffer(struct zip *, const void *, zip_uint64_t, int); -ZIP_EXTERN struct zip_source *zip_source_file(struct zip *, const char *, zip_uint64_t, zip_int64_t); -ZIP_EXTERN struct zip_source *zip_source_filep(struct zip *, FILE *, zip_uint64_t, zip_int64_t); -ZIP_EXTERN void zip_source_free(struct zip_source *); -ZIP_EXTERN struct zip_source *zip_source_function(struct zip *, zip_source_callback, void *); -ZIP_EXTERN struct zip_source *zip_source_zip(struct zip *, struct zip *, zip_uint64_t, zip_flags_t, zip_uint64_t, zip_int64_t); -ZIP_EXTERN int zip_stat(struct zip *, const char *, zip_flags_t, struct zip_stat *); -ZIP_EXTERN int zip_stat_index(struct zip *, zip_uint64_t, zip_flags_t, struct zip_stat *); -ZIP_EXTERN void zip_stat_init(struct zip_stat *); -ZIP_EXTERN const char *zip_strerror(struct zip *); -ZIP_EXTERN int zip_unchange(struct zip *, zip_uint64_t); -ZIP_EXTERN int zip_unchange_all(struct zip *); -ZIP_EXTERN int zip_unchange_archive(struct zip *); - -#ifdef __cplusplus -} -#endif - -#endif /* _HAD_ZIP_H */ diff --git a/build/premake/premake5/contrib/libzip/zip_add.c b/build/premake/premake5/contrib/libzip/zip_add.c deleted file mode 100644 index 5b907824b3..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_add.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - zip_add.c -- add file via callback function - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -/* - NOTE: Return type is signed so we can return -1 on error. - The index can not be larger than ZIP_INT64_MAX since the size - of the central directory cannot be larger than - ZIP_UINT64_MAX, and each entry is larger than 2 bytes. -*/ - -ZIP_EXTERN zip_int64_t -zip_add(struct zip *za, const char *name, struct zip_source *source) -{ - return zip_file_add(za, name, source, 0); -} diff --git a/build/premake/premake5/contrib/libzip/zip_add_dir.c b/build/premake/premake5/contrib/libzip/zip_add_dir.c deleted file mode 100644 index 22a28bd856..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_add_dir.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - zip_add_dir.c -- add directory - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */ - -ZIP_EXTERN zip_int64_t -zip_add_dir(struct zip *za, const char *name) -{ - return zip_dir_add(za, name, 0); -} diff --git a/build/premake/premake5/contrib/libzip/zip_add_entry.c b/build/premake/premake5/contrib/libzip/zip_add_entry.c deleted file mode 100644 index 5cbc9574ad..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_add_entry.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - zip_add_entry.c -- create and init struct zip_entry - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */ - -zip_int64_t -_zip_add_entry(struct zip *za) -{ - zip_uint64_t idx; - - if (za->nentry+1 >= za->nentry_alloc) { - struct zip_entry *rentries; - zip_uint64_t nalloc = za->nentry_alloc + 16; - /* TODO check for overflow */ - rentries = (struct zip_entry *)realloc(za->entry, sizeof(struct zip_entry) * (size_t)nalloc); - if (!rentries) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - za->entry = rentries; - za->nentry_alloc = nalloc; - } - - idx = za->nentry++; - - _zip_entry_init(za->entry+idx); - - return (zip_int64_t)idx; -} diff --git a/build/premake/premake5/contrib/libzip/zip_close.c b/build/premake/premake5/contrib/libzip/zip_close.c deleted file mode 100644 index c213d0a42c..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_close.c +++ /dev/null @@ -1,653 +0,0 @@ -/* - zip_close.c -- close zip archive and update changes - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - -#include -#include -#include -#ifdef HAVE_STRINGS_H -#include -#endif -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#ifdef _WIN32 -#include -#include -#endif - - - -/* max deflate size increase: size + ceil(size/16k)*5+6 */ -#define MAX_DEFLATE_SIZE_32 4293656963u - -static int add_data(struct zip *, struct zip_source *, struct zip_dirent *, FILE *); -static int copy_data(FILE *, zip_uint64_t, FILE *, struct zip_error *); -static int copy_source(struct zip *, struct zip_source *, FILE *); -static int write_cdir(struct zip *, const struct zip_filelist *, zip_uint64_t, FILE *); -static char *_zip_create_temp_output(struct zip *, FILE **); -static int _zip_torrentzip_cmp(const void *, const void *); - - - -ZIP_EXTERN int -zip_close(struct zip *za) -{ - zip_uint64_t i, j, survivors; - int error; - char *temp; - FILE *out; -#ifndef _WIN32 - mode_t mask; -#endif - struct zip_filelist *filelist; - int reopen_on_error; - int new_torrentzip; - int changed; - - reopen_on_error = 0; - - if (za == NULL) - return -1; - - changed = _zip_changed(za, &survivors); - - /* don't create zip files with no entries */ - if (survivors == 0) { - if (za->zn && ((za->open_flags & ZIP_TRUNCATE) || (changed && za->zp))) { - if (remove(za->zn) != 0) { - _zip_error_set(&za->error, ZIP_ER_REMOVE, errno); - return -1; - } - } - zip_discard(za); - return 0; - } - - if (!changed) { - zip_discard(za); - return 0; - } - - if (survivors > za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); - return -1; - } - - if ((filelist=(struct zip_filelist *)malloc(sizeof(filelist[0])*(size_t)survivors)) == NULL) - return -1; - - /* archive comment is special for torrentzip */ - if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0)) { - /* TODO: use internal function when zip_set_archive_comment clears TORRENT flag */ - if (zip_set_archive_comment(za, TORRENT_SIG "XXXXXXXX", TORRENT_SIG_LEN + TORRENT_CRC_LEN) < 0) { - free(filelist); - return -1; - } - } - /* TODO: if no longer torrentzip and archive comment not changed by user, delete it */ - - - /* create list of files with index into original archive */ - for (i=j=0; inentry; i++) { - if (za->entry[i].deleted) - continue; - - if (j >= survivors) { - free(filelist); - _zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); - return -1; - } - - filelist[j].idx = i; - filelist[j].name = zip_get_name(za, i, 0); - j++; - } - if (j < survivors) { - free(filelist); - _zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); - return -1; - } - - - if ((temp=_zip_create_temp_output(za, &out)) == NULL) { - free(filelist); - return -1; - } - - - if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0)) - qsort(filelist, (size_t)survivors, sizeof(filelist[0]), - _zip_torrentzip_cmp); - - new_torrentzip = (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0) == 1 - && zip_get_archive_flag(za, ZIP_AFL_TORRENT, - ZIP_FL_UNCHANGED) == 0); - error = 0; - for (j=0; jentry+i; - - new_data = (ZIP_ENTRY_DATA_CHANGED(entry) || new_torrentzip || ZIP_ENTRY_CHANGED(entry, ZIP_DIRENT_COMP_METHOD)); - - /* create new local directory entry */ - if (entry->changes == NULL) { - if ((entry->changes=_zip_dirent_clone(entry->orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - error = 1; - break; - } - } - de = entry->changes; - - if (_zip_read_local_ef(za, i) < 0) { - error = 1; - break; - } - - if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0)) - _zip_dirent_torrent_normalize(entry->changes); - - - de->offset = (zip_uint64_t)ftello(out); /* TODO: check for errors */ - - if (new_data) { - struct zip_source *zs; - - zs = NULL; - if (!ZIP_ENTRY_DATA_CHANGED(entry)) { - if ((zs=_zip_source_zip_new(za, za, i, ZIP_FL_UNCHANGED, 0, 0, NULL)) == NULL) { - error = 1; - break; - } - } - - /* add_data writes dirent */ - if (add_data(za, zs ? zs : entry->source, de, out) < 0) { - error = 1; - if (zs) - zip_source_free(zs); - break; - } - if (zs) - zip_source_free(zs); - } - else { - zip_uint64_t offset; - - /* when copying data, all sizes are known -> no data descriptor needed */ - de->bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR; - if (_zip_dirent_write(de, out, ZIP_FL_LOCAL, &za->error) < 0) { - error = 1; - break; - } - if ((offset=_zip_file_get_offset(za, i, &za->error)) == 0) { - error = 1; - break; - } - if ((fseeko(za->zp, (off_t)offset, SEEK_SET) < 0)) { - _zip_error_set(&za->error, ZIP_ER_SEEK, errno); - error = 1; - break; - } - if (copy_data(za->zp, de->comp_size, out, &za->error) < 0) { - error = 1; - break; - } - } - } - - if (!error) { - if (write_cdir(za, filelist, survivors, out) < 0) - error = 1; - } - - free(filelist); - - if (error) { - fclose(out); - (void)remove(temp); - free(temp); - return -1; - } - - if (fclose(out) != 0) { - _zip_error_set(&za->error, ZIP_ER_CLOSE, errno); - (void)remove(temp); - free(temp); - return -1; - } - - if (za->zp) { - fclose(za->zp); - za->zp = NULL; - reopen_on_error = 1; - } - if (_zip_rename(temp, za->zn) != 0) { - _zip_error_set(&za->error, ZIP_ER_RENAME, errno); - (void)remove(temp); - free(temp); - if (reopen_on_error) { - /* ignore errors, since we're already in an error case */ - za->zp = fopen(za->zn, "rb"); - } - return -1; - } -#ifndef _WIN32 - mask = umask(0); - umask(mask); - chmod(za->zn, 0666&~mask); -#endif - - zip_discard(za); - free(temp); - - return 0; -} - - - -static int -add_data(struct zip *za, struct zip_source *src, struct zip_dirent *de, FILE *ft) -{ - off_t offstart, offdata, offend; - struct zip_stat st; - struct zip_source *s2; - int ret; - int is_zip64; - zip_flags_t flags; - - if (zip_source_stat(src, &st) < 0) { - _zip_error_set_from_source(&za->error, src); - return -1; - } - - if ((st.valid & ZIP_STAT_COMP_METHOD) == 0) { - st.valid |= ZIP_STAT_COMP_METHOD; - st.comp_method = ZIP_CM_STORE; - } - - if (ZIP_CM_IS_DEFAULT(de->comp_method) && st.comp_method != ZIP_CM_STORE) - de->comp_method = st.comp_method; - else if (de->comp_method == ZIP_CM_STORE && (st.valid & ZIP_STAT_SIZE)) { - st.valid |= ZIP_STAT_COMP_SIZE; - st.comp_size = st.size; - } - else { - /* we'll recompress */ - st.valid &= ~ZIP_STAT_COMP_SIZE; - } - - - flags = ZIP_EF_LOCAL; - - if ((st.valid & ZIP_STAT_SIZE) == 0) - flags |= ZIP_FL_FORCE_ZIP64; - else { - de->uncomp_size = st.size; - - if ((st.valid & ZIP_STAT_COMP_SIZE) == 0) { - if (( ((de->comp_method == ZIP_CM_DEFLATE || ZIP_CM_IS_DEFAULT(de->comp_method)) && st.size > MAX_DEFLATE_SIZE_32) - || (de->comp_method != ZIP_CM_STORE && de->comp_method != ZIP_CM_DEFLATE && !ZIP_CM_IS_DEFAULT(de->comp_method)))) - flags |= ZIP_FL_FORCE_ZIP64; - } - else - de->comp_size = st.comp_size; - } - - - offstart = ftello(ft); - - /* as long as we don't support non-seekable output, clear data descriptor bit */ - de->bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR; - if ((is_zip64=_zip_dirent_write(de, ft, flags, &za->error)) < 0) - return -1; - - - if (st.comp_method == ZIP_CM_STORE || (ZIP_CM_IS_DEFAULT(de->comp_method) && st.comp_method != de->comp_method)) { - struct zip_source *s_store, *s_crc; - zip_compression_implementation comp_impl; - - if (st.comp_method != ZIP_CM_STORE) { - if ((comp_impl=_zip_get_compression_implementation(st.comp_method)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_COMPNOTSUPP, 0); - return -1; - } - if ((s_store=comp_impl(za, src, st.comp_method, ZIP_CODEC_DECODE)) == NULL) { - /* error set by comp_impl */ - return -1; - } - } - else - s_store = src; - - if ((s_crc=zip_source_crc(za, s_store, 0)) == NULL) { - if (s_store != src) - zip_source_pop(s_store); - return -1; - } - - /* TODO: deflate 0-byte files for torrentzip? */ - if (de->comp_method != ZIP_CM_STORE && ((st.valid & ZIP_STAT_SIZE) == 0 || st.size != 0)) { - if ((comp_impl=_zip_get_compression_implementation(de->comp_method)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_COMPNOTSUPP, 0); - zip_source_pop(s_crc); - if (s_store != src) - zip_source_pop(s_store); - return -1; - } - if ((s2=comp_impl(za, s_crc, de->comp_method, ZIP_CODEC_ENCODE)) == NULL) { - zip_source_pop(s_crc); - if (s_store != src) - zip_source_pop(s_store); - return -1; - } - } - else - s2 = s_crc; - } - else - s2 = src; - - offdata = ftello(ft); - - ret = copy_source(za, s2, ft); - - if (zip_source_stat(s2, &st) < 0) - ret = -1; - - while (s2 != src) { - if ((s2=zip_source_pop(s2)) == NULL) { - /* TODO: set erorr */ - ret = -1; - break; - } - } - - if (ret < 0) - return -1; - - offend = ftello(ft); - - if (fseeko(ft, offstart, SEEK_SET) < 0) { - _zip_error_set(&za->error, ZIP_ER_SEEK, errno); - return -1; - } - - if ((st.valid & (ZIP_STAT_COMP_METHOD|ZIP_STAT_CRC|ZIP_STAT_SIZE)) != (ZIP_STAT_COMP_METHOD|ZIP_STAT_CRC|ZIP_STAT_SIZE)) { - _zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); - return -1; - } - - if (st.valid & ZIP_STAT_MTIME) - de->last_mod = st.mtime; - else - time(&de->last_mod); - de->comp_method = st.comp_method; - de->crc = st.crc; - de->uncomp_size = st.size; - de->comp_size = (zip_uint64_t)(offend - offdata); - - if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0)) - _zip_dirent_torrent_normalize(de); - - if ((ret=_zip_dirent_write(de, ft, flags, &za->error)) < 0) - return -1; - - if (is_zip64 != ret) { - /* Zip64 mismatch between preliminary file header written before data and final file header written afterwards */ - _zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); - return -1; - } - - - if (fseeko(ft, offend, SEEK_SET) < 0) { - _zip_error_set(&za->error, ZIP_ER_SEEK, errno); - return -1; - } - - return 0; -} - - - -static int -copy_data(FILE *fs, zip_uint64_t len, FILE *ft, struct zip_error *error) -{ - char buf[BUFSIZE]; - size_t n, nn; - - if (len == 0) - return 0; - - while (len > 0) { - nn = len > sizeof(buf) ? sizeof(buf) : len > SIZE_MAX ? SIZE_MAX : (size_t)len; - if ((n=fread(buf, 1, nn, fs)) == 0) { - if (ferror(fs)) { - _zip_error_set(error, ZIP_ER_READ, errno); - return -1; - } - else { - _zip_error_set(error, ZIP_ER_EOF, 0); - return -1; - } - } - - if (fwrite(buf, 1, n, ft) != (size_t)n) { - _zip_error_set(error, ZIP_ER_WRITE, errno); - return -1; - } - - len -= n; - } - - return 0; -} - - - -static int -copy_source(struct zip *za, struct zip_source *src, FILE *ft) -{ - char buf[BUFSIZE]; - zip_int64_t n; - int ret; - - if (zip_source_open(src) < 0) { - _zip_error_set_from_source(&za->error, src); - return -1; - } - - ret = 0; - while ((n=zip_source_read(src, buf, sizeof(buf))) > 0) { - if (fwrite(buf, 1, (size_t)n, ft) != (size_t)n) { - _zip_error_set(&za->error, ZIP_ER_WRITE, errno); - ret = -1; - break; - } - } - - if (n < 0) { - if (ret == 0) - _zip_error_set_from_source(&za->error, src); - ret = -1; - } - - zip_source_close(src); - - return ret; -} - - - -static int -write_cdir(struct zip *za, const struct zip_filelist *filelist, zip_uint64_t survivors, FILE *out) -{ - off_t cd_start, end; - zip_int64_t size; - uLong crc; - char buf[TORRENT_CRC_LEN+1]; - - cd_start = ftello(out); - - if ((size=_zip_cdir_write(za, filelist, survivors, out)) < 0) - return -1; - - end = ftello(out); - - if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0) == 0) - return 0; - - - /* fix up torrentzip comment */ - - if (_zip_filerange_crc(out, cd_start, (off_t)size, &crc, &za->error) < 0) - return -1; - - snprintf(buf, sizeof(buf), "%08lX", (long)crc); - - if (fseeko(out, end-TORRENT_CRC_LEN, SEEK_SET) < 0) { - _zip_error_set(&za->error, ZIP_ER_SEEK, errno); - return -1; - } - - if (fwrite(buf, TORRENT_CRC_LEN, 1, out) != 1) { - _zip_error_set(&za->error, ZIP_ER_WRITE, errno); - return -1; - } - - return 0; -} - - - -int -_zip_changed(const struct zip *za, zip_uint64_t *survivorsp) -{ - int changed; - zip_uint64_t i, survivors; - - changed = 0; - survivors = 0; - - if (za->comment_changed || za->ch_flags != za->flags) - changed = 1; - - for (i=0; inentry; i++) { - if (za->entry[i].deleted || za->entry[i].source || (za->entry[i].changes && za->entry[i].changes->changed != 0)) - changed = 1; - if (!za->entry[i].deleted) - survivors++; - } - - if (survivorsp) - *survivorsp = survivors; - - return changed; -} - - - -static char * -_zip_create_temp_output(struct zip *za, FILE **outp) -{ - char *temp; - int tfd; - FILE *tfp; - - if (za->tempdir) { - if ((temp=(char *)malloc(strlen(za->tempdir)+13)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - sprintf(temp, "%s/.zip.XXXXXX", za->tempdir); - } - else { - if ((temp=(char *)malloc(strlen(za->zn)+8)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - sprintf(temp, "%s.XXXXXX", za->zn); - } - - if ((tfd=mkstemp(temp)) == -1) { - _zip_error_set(&za->error, ZIP_ER_TMPOPEN, errno); - free(temp); - return NULL; - } - - if ((tfp=fdopen(tfd, "r+b")) == NULL) { - _zip_error_set(&za->error, ZIP_ER_TMPOPEN, errno); - close(tfd); - (void)remove(temp); - free(temp); - return NULL; - } - -#ifdef _WIN32 - /* - According to Pierre Joye, Windows in some environments per - default creates text files, so force binary mode. - */ - _setmode(_fileno(tfp), _O_BINARY ); -#endif - - *outp = tfp; - return temp; -} - - - -static int -_zip_torrentzip_cmp(const void *a, const void *b) -{ - const char *aname = ((const struct zip_filelist *)a)->name; - const char *bname = ((const struct zip_filelist *)b)->name; - - if (aname == NULL) - return (bname != NULL) * -1; - else if (bname == NULL) - return 1; - - return strcasecmp(aname, bname); -} diff --git a/build/premake/premake5/contrib/libzip/zip_delete.c b/build/premake/premake5/contrib/libzip/zip_delete.c deleted file mode 100644 index cb769367cc..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_delete.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - zip_delete.c -- delete file from zip archive - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_delete(struct zip *za, zip_uint64_t idx) -{ - if (idx >= za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - /* allow duplicate file names, because the file will - * be removed directly afterwards */ - if (_zip_unchange(za, idx, 1) != 0) - return -1; - - za->entry[idx].deleted = 1; - - return 0; -} - - diff --git a/build/premake/premake5/contrib/libzip/zip_dir_add.c b/build/premake/premake5/contrib/libzip/zip_dir_add.c deleted file mode 100644 index 1a662f4aaf..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_dir_add.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - zip_dir_add.c -- add directory - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - -/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */ - -ZIP_EXTERN zip_int64_t -zip_dir_add(struct zip *za, const char *name, zip_flags_t flags) -{ - size_t len; - zip_int64_t idx; - char *s; - struct zip_source *source; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (name == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - s = NULL; - len = strlen(name); - - if (name[len-1] != '/') { - if ((s=(char *)malloc(len+2)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - strcpy(s, name); - s[len] = '/'; - s[len+1] = '\0'; - } - - if ((source=zip_source_buffer(za, NULL, 0, 0)) == NULL) { - free(s); - return -1; - } - - idx = _zip_file_replace(za, ZIP_UINT64_MAX, s ? s : name, source, flags); - - free(s); - - if (idx < 0) - zip_source_free(source); - else { - if (zip_file_set_external_attributes(za, (zip_uint64_t)idx, 0, ZIP_OPSYS_DEFAULT, ZIP_EXT_ATTRIB_DEFAULT_DIR) < 0) { - zip_delete(za, (zip_uint64_t)idx); - return -1; - } - } - - return idx; -} diff --git a/build/premake/premake5/contrib/libzip/zip_dirent.c b/build/premake/premake5/contrib/libzip/zip_dirent.c deleted file mode 100644 index 5c5792c3e9..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_dirent.c +++ /dev/null @@ -1,1025 +0,0 @@ -/* - zip_dirent.c -- read directory entry (local or central), clean dirent - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include -#include -#include -#include - -#include "zipint.h" - -static time_t _zip_d2u_time(zip_uint16_t, zip_uint16_t); -static struct zip_string *_zip_read_string(const unsigned char **, FILE *, zip_uint16_t, int, struct zip_error *); -static struct zip_string *_zip_dirent_process_ef_utf_8(const struct zip_dirent *, zip_uint16_t, struct zip_string *); -static struct zip_extra_field *_zip_ef_utf8(zip_uint16_t, struct zip_string *, struct zip_error *); - - - -void -_zip_cdir_free(struct zip_cdir *cd) -{ - zip_uint64_t i; - - if (!cd) - return; - - for (i=0; inentry; i++) - _zip_entry_finalize(cd->entry+i); - free(cd->entry); - _zip_string_free(cd->comment); - free(cd); -} - - - -int -_zip_cdir_grow(struct zip_cdir *cd, zip_uint64_t nentry, struct zip_error *error) -{ - struct zip_entry *entry; - zip_uint64_t i; - - if (nentry < cd->nentry_alloc) { - _zip_error_set(error, ZIP_ER_INTERNAL, 0); - return -1; - } - - if (nentry == cd->nentry_alloc) - return 0; - - if ((entry=((struct zip_entry *) - realloc(cd->entry, sizeof(*(cd->entry))*(size_t)nentry))) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return -1; - } - - for (i=cd->nentry_alloc; inentry_alloc = nentry; - cd->entry = entry; - - return 0; -} - - - -struct zip_cdir * -_zip_cdir_new(zip_uint64_t nentry, struct zip_error *error) -{ - struct zip_cdir *cd; - zip_uint64_t i; - - if ((cd=(struct zip_cdir *)malloc(sizeof(*cd))) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return NULL; - } - - if (nentry == 0) - cd->entry = NULL; - else if ((cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - free(cd); - return NULL; - } - - for (i=0; ientry+i); - - cd->nentry = cd->nentry_alloc = nentry; - cd->size = cd->offset = 0; - cd->comment = NULL; - - return cd; -} - - - -zip_int64_t -_zip_cdir_write(struct zip *za, const struct zip_filelist *filelist, zip_uint64_t survivors, FILE *fp) -{ - off_t off; - zip_uint64_t offset, size; - struct zip_string *comment; - zip_uint64_t i; - int is_zip64; - int ret; - - if ((off=ftello(fp)) < 0) { - _zip_error_set(&za->error, ZIP_ER_READ, errno); - return -1; - } - offset = (zip_uint64_t)off; - - is_zip64 = 0; - - for (i=0; ientry+filelist[i].idx; - - if ((ret=_zip_dirent_write(entry->changes ? entry->changes : entry->orig, fp, ZIP_FL_CENTRAL, &za->error)) < 0) - return -1; - if (ret) - is_zip64 = 1; - } - - if ((off=ftello(fp)) < 0) { - _zip_error_set(&za->error, ZIP_ER_READ, errno); - return -1; - } - size = (zip_uint64_t)off - offset; - - if (offset > ZIP_UINT32_MAX || survivors > ZIP_UINT16_MAX) - is_zip64 = 1; - - if (is_zip64) { - fwrite(EOCD64_MAGIC, 1, 4, fp); - _zip_write8(EOCD64LEN-12, fp); - _zip_write2(45, fp); - _zip_write2(45, fp); - _zip_write4(0, fp); - _zip_write4(0, fp); - _zip_write8(survivors, fp); - _zip_write8(survivors, fp); - _zip_write8(size, fp); - _zip_write8(offset, fp); - - fwrite(EOCD64LOC_MAGIC, 1, 4, fp); - _zip_write4(0, fp); - _zip_write8(offset+size, fp); - _zip_write4(1, fp); - - } - - /* clearerr(fp); */ - fwrite(EOCD_MAGIC, 1, 4, fp); - _zip_write4(0, fp); - _zip_write2(survivors >= ZIP_UINT16_MAX ? ZIP_UINT16_MAX : (zip_uint16_t)survivors, fp); - _zip_write2(survivors >= ZIP_UINT16_MAX ? ZIP_UINT16_MAX : (zip_uint16_t)survivors, fp); - _zip_write4(size >= ZIP_UINT32_MAX ? ZIP_UINT32_MAX : (zip_uint32_t)size, fp); - _zip_write4(offset >= ZIP_UINT32_MAX ? ZIP_UINT32_MAX : (zip_uint32_t)offset, fp); - - comment = za->comment_changed ? za->comment_changes : za->comment_orig; - - _zip_write2(comment ? comment->length : 0, fp); - if (comment) - fwrite(comment->raw, 1, comment->length, fp); - - if (ferror(fp)) { - _zip_error_set(&za->error, ZIP_ER_WRITE, errno); - return -1; - } - - return (zip_int64_t)size; -} - - - -struct zip_dirent * -_zip_dirent_clone(const struct zip_dirent *sde) -{ - struct zip_dirent *tde; - - if ((tde=(struct zip_dirent *)malloc(sizeof(*tde))) == NULL) - return NULL; - - if (sde) - memcpy(tde, sde, sizeof(*sde)); - else - _zip_dirent_init(tde); - - tde->changed = 0; - tde->cloned = 1; - - return tde; -} - - - -void -_zip_dirent_finalize(struct zip_dirent *zde) -{ - if (!zde->cloned || zde->changed & ZIP_DIRENT_FILENAME) - _zip_string_free(zde->filename); - if (!zde->cloned || zde->changed & ZIP_DIRENT_EXTRA_FIELD) - _zip_ef_free(zde->extra_fields); - if (!zde->cloned || zde->changed & ZIP_DIRENT_COMMENT) - _zip_string_free(zde->comment); -} - - - -void -_zip_dirent_free(struct zip_dirent *zde) -{ - if (zde == NULL) - return; - - _zip_dirent_finalize(zde); - free(zde); -} - - - -void -_zip_dirent_init(struct zip_dirent *de) -{ - de->changed = 0; - de->local_extra_fields_read = 0; - de->cloned = 0; - - de->version_madeby = 20 | (ZIP_OPSYS_DEFAULT << 8); - de->version_needed = 20; /* 2.0 */ - de->bitflags = 0; - de->comp_method = ZIP_CM_DEFAULT; - de->last_mod = 0; - de->crc = 0; - de->comp_size = 0; - de->uncomp_size = 0; - de->filename = NULL; - de->extra_fields = NULL; - de->comment = NULL; - de->disk_number = 0; - de->int_attrib = 0; - de->ext_attrib = ZIP_EXT_ATTRIB_DEFAULT; - de->offset = 0; -} - - - -int -_zip_dirent_needs_zip64(const struct zip_dirent *de, zip_flags_t flags) -{ - if (de->uncomp_size >= ZIP_UINT32_MAX || de->comp_size >= ZIP_UINT32_MAX - || ((flags & ZIP_FL_CENTRAL) && de->offset >= ZIP_UINT32_MAX)) - return 1; - - return 0; -} - - - -struct zip_dirent * -_zip_dirent_new(void) -{ - struct zip_dirent *de; - - if ((de=(struct zip_dirent *)malloc(sizeof(*de))) == NULL) - return NULL; - - _zip_dirent_init(de); - return de; -} - - - -/* _zip_dirent_read(zde, fp, bufp, left, localp, error): - Fills the zip directory entry zde. - - If bufp is non-NULL, data is taken from there and bufp is advanced - by the amount of data used; otherwise data is read from fp as needed. - - if leftp is non-NULL, no more bytes than specified by it are used, - and *leftp is reduced by the number of bytes used. - - If local != 0, it reads a local header instead of a central - directory entry. - - Returns 0 if successful. On error, error is filled in and -1 is - returned. - - TODO: leftp and file position undefined on error. -*/ - -int -_zip_dirent_read(struct zip_dirent *zde, FILE *fp, - const unsigned char **bufp, zip_uint64_t *leftp, int local, - struct zip_error *error) -{ - unsigned char buf[CDENTRYSIZE]; - const unsigned char *cur; - zip_uint16_t dostime, dosdate; - zip_uint32_t size; - zip_uint16_t filename_len, comment_len, ef_len; - - if (local) - size = LENTRYSIZE; - else - size = CDENTRYSIZE; - - if (leftp && (*leftp < size)) { - _zip_error_set(error, ZIP_ER_NOZIP, 0); - return -1; - } - - if (bufp) { - /* use data from buffer */ - cur = *bufp; - } - else { - /* read entry from disk */ - if ((fread(buf, 1, size, fp)version_madeby = _zip_read2(&cur); - else - zde->version_madeby = 0; - zde->version_needed = _zip_read2(&cur); - zde->bitflags = _zip_read2(&cur); - zde->comp_method = _zip_read2(&cur); - - /* convert to time_t */ - dostime = _zip_read2(&cur); - dosdate = _zip_read2(&cur); - zde->last_mod = _zip_d2u_time(dostime, dosdate); - - zde->crc = _zip_read4(&cur); - zde->comp_size = _zip_read4(&cur); - zde->uncomp_size = _zip_read4(&cur); - - filename_len = _zip_read2(&cur); - ef_len = _zip_read2(&cur); - - if (local) { - comment_len = 0; - zde->disk_number = 0; - zde->int_attrib = 0; - zde->ext_attrib = 0; - zde->offset = 0; - } else { - comment_len = _zip_read2(&cur); - zde->disk_number = _zip_read2(&cur); - zde->int_attrib = _zip_read2(&cur); - zde->ext_attrib = _zip_read4(&cur); - zde->offset = _zip_read4(&cur); - } - - zde->filename = NULL; - zde->extra_fields = NULL; - zde->comment = NULL; - - size += filename_len+ef_len+comment_len; - - if (leftp && (*leftp < size)) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return -1; - } - - if (filename_len) { - zde->filename = _zip_read_string(bufp ? &cur : NULL, fp, filename_len, 1, error); - if (!zde->filename) - return -1; - - if (zde->bitflags & ZIP_GPBF_ENCODING_UTF_8) { - if (_zip_guess_encoding(zde->filename, ZIP_ENCODING_UTF8_KNOWN) == ZIP_ENCODING_ERROR) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return -1; - } - } - } - - if (ef_len) { - zip_uint8_t *ef = _zip_read_data(bufp ? &cur : NULL, fp, ef_len, 0, error); - - if (ef == NULL) - return -1; - if ((zde->extra_fields=_zip_ef_parse(ef, ef_len, local ? ZIP_EF_LOCAL : ZIP_EF_CENTRAL, error)) == NULL) { - free(ef); - return -1; - } - free(ef); - if (local) - zde->local_extra_fields_read = 1; - } - - if (comment_len) { - zde->comment = _zip_read_string(bufp ? &cur : NULL, fp, comment_len, 0, error); - if (!zde->comment) - return -1; - - if (zde->bitflags & ZIP_GPBF_ENCODING_UTF_8) { - if (_zip_guess_encoding(zde->comment, ZIP_ENCODING_UTF8_KNOWN) == ZIP_ENCODING_ERROR) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return -1; - } - } - } - - zde->filename = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_NAME, zde->filename); - zde->comment = _zip_dirent_process_ef_utf_8(zde, ZIP_EF_UTF_8_COMMENT, zde->comment); - - /* Zip64 */ - - if (zde->uncomp_size == ZIP_UINT32_MAX || zde->comp_size == ZIP_UINT32_MAX || zde->offset == ZIP_UINT32_MAX) { - zip_uint16_t got_len, needed_len; - const zip_uint8_t *ef = _zip_ef_get_by_id(zde->extra_fields, &got_len, ZIP_EF_ZIP64, 0, local ? ZIP_EF_LOCAL : ZIP_EF_CENTRAL, error); - /* TODO: if got_len == 0 && !ZIP64_EOCD: no error, 0xffffffff is valid value */ - if (ef == NULL) - return -1; - - - if (local) - needed_len = 16; - else - needed_len = ((zde->uncomp_size == ZIP_UINT32_MAX) + (zde->comp_size == ZIP_UINT32_MAX) + (zde->offset == ZIP_UINT32_MAX)) * 8 - + (zde->disk_number == ZIP_UINT16_MAX) * 4; - - if (got_len != needed_len) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return -1; - } - - if (zde->uncomp_size == ZIP_UINT32_MAX) - zde->uncomp_size = _zip_read8(&ef); - else if (local) - ef += 8; - if (zde->comp_size == ZIP_UINT32_MAX) - zde->comp_size = _zip_read8(&ef); - if (!local) { - if (zde->offset == ZIP_UINT32_MAX) - zde->offset = _zip_read8(&ef); - if (zde->disk_number == ZIP_UINT16_MAX) - zde->disk_number = _zip_read4(&ef); - } - } - - if (!local) { - if (zde->offset > ZIP_OFF_MAX) { - _zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return -1; - } - } - - zde->extra_fields = _zip_ef_remove_internal(zde->extra_fields); - - if (bufp) - *bufp = cur; - if (leftp) - *leftp -= size; - - return 0; -} - - - -static struct zip_string * -_zip_dirent_process_ef_utf_8(const struct zip_dirent *de, zip_uint16_t id, struct zip_string *str) -{ - zip_uint16_t ef_len; - zip_uint32_t ef_crc; - - const zip_uint8_t *ef = _zip_ef_get_by_id(de->extra_fields, &ef_len, id, 0, ZIP_EF_BOTH, NULL); - - if (ef == NULL || ef_len < 5 || ef[0] != 1) - return str; - - ef++; - ef_crc = _zip_read4(&ef); - - if (_zip_string_crc32(str) == ef_crc) { - struct zip_string *ef_str = _zip_string_new(ef, ef_len-5, ZIP_ENCODING_UTF8_KNOWN, NULL); - - if (ef_str != NULL) { - _zip_string_free(str); - str = ef_str; - } - } - - return str; -} - - - -zip_int32_t -_zip_dirent_size(FILE *f, zip_uint16_t flags, struct zip_error *error) -{ - zip_int32_t size; - int local = (flags & ZIP_EF_LOCAL); - int i; - unsigned char b[6]; - const unsigned char *p; - - size = local ? LENTRYSIZE : CDENTRYSIZE; - - if (fseek(f, local ? 26 : 28, SEEK_CUR) < 0) { - _zip_error_set(error, ZIP_ER_SEEK, errno); - return -1; - } - - if (fread(b, (local ? 4 : 6), 1, f) != 1) { - _zip_error_set(error, ZIP_ER_READ, errno); - return -1; - } - - p = b; - for (i=0; i<(local ? 2 : 3); i++) { - size += _zip_read2(&p); - } - - return size; -} - - - -/* _zip_dirent_torrent_normalize(de); - Set values suitable for torrentzip. -*/ - -void -_zip_dirent_torrent_normalize(struct zip_dirent *de) -{ - static struct tm torrenttime; - static time_t last_mod = 0; - - if (last_mod == 0) { -#ifdef HAVE_STRUCT_TM_TM_ZONE - time_t now; - struct tm *l; -#endif - - torrenttime.tm_sec = 0; - torrenttime.tm_min = 32; - torrenttime.tm_hour = 23; - torrenttime.tm_mday = 24; - torrenttime.tm_mon = 11; - torrenttime.tm_year = 96; - torrenttime.tm_wday = 0; - torrenttime.tm_yday = 0; - torrenttime.tm_isdst = 0; - -#ifdef HAVE_STRUCT_TM_TM_ZONE - time(&now); - l = localtime(&now); - torrenttime.tm_gmtoff = l->tm_gmtoff; - torrenttime.tm_zone = l->tm_zone; -#endif - - last_mod = mktime(&torrenttime); - } - - de->version_madeby = 0; - de->version_needed = 20; /* 2.0 */ - de->bitflags = 2; /* maximum compression */ - de->comp_method = ZIP_CM_DEFLATE; - de->last_mod = last_mod; - - de->disk_number = 0; - de->int_attrib = 0; - de->ext_attrib = 0; - - _zip_ef_free(de->extra_fields); - de->extra_fields = NULL; - _zip_string_free(de->comment); - de->comment = NULL; -} - - - -/* _zip_dirent_write(zde, fp, flags, error): - Writes zip directory entry zde to file fp. - - If flags & ZIP_EF_LOCAL, it writes a local header instead of a central - directory entry. If flags & ZIP_EF_FORCE_ZIP64, a ZIP64 extra field is written, even if not needed. - - Returns 0 if successful, 1 if successful and wrote ZIP64 extra field. On error, error is filled in and -1 is - returned. -*/ - -int -_zip_dirent_write(struct zip_dirent *de, FILE *fp, zip_flags_t flags, struct zip_error *error) -{ - unsigned short dostime, dosdate; - enum zip_encoding_type com_enc, name_enc; - struct zip_extra_field *ef; - zip_uint8_t ef_zip64[24], *ef_zip64_p; - int is_zip64; - int is_really_zip64; - - ef = NULL; - - is_zip64 = 0; - - fwrite((flags & ZIP_FL_LOCAL) ? LOCAL_MAGIC : CENTRAL_MAGIC, 1, 4, fp); - - name_enc = _zip_guess_encoding(de->filename, ZIP_ENCODING_UNKNOWN); - com_enc = _zip_guess_encoding(de->comment, ZIP_ENCODING_UNKNOWN); - - if ((name_enc == ZIP_ENCODING_UTF8_KNOWN && com_enc == ZIP_ENCODING_ASCII) || - (name_enc == ZIP_ENCODING_ASCII && com_enc == ZIP_ENCODING_UTF8_KNOWN) || - (name_enc == ZIP_ENCODING_UTF8_KNOWN && com_enc == ZIP_ENCODING_UTF8_KNOWN)) - de->bitflags |= ZIP_GPBF_ENCODING_UTF_8; - else { - de->bitflags &= ~ZIP_GPBF_ENCODING_UTF_8; - if (name_enc == ZIP_ENCODING_UTF8_KNOWN) { - ef = _zip_ef_utf8(ZIP_EF_UTF_8_NAME, de->filename, error); - if (ef == NULL) - return -1; - } - if ((flags & ZIP_FL_LOCAL) == 0 && com_enc == ZIP_ENCODING_UTF8_KNOWN){ - struct zip_extra_field *ef2 = _zip_ef_utf8(ZIP_EF_UTF_8_COMMENT, de->comment, error); - if (ef2 == NULL) { - _zip_ef_free(ef); - return -1; - } - ef2->next = ef; - ef = ef2; - } - } - - ef_zip64_p = ef_zip64; - if (flags & ZIP_FL_LOCAL) { - if ((flags & ZIP_FL_FORCE_ZIP64) || de->comp_size > ZIP_UINT32_MAX || de->uncomp_size > ZIP_UINT32_MAX) { - _zip_poke8(de->uncomp_size, &ef_zip64_p); - _zip_poke8(de->comp_size, &ef_zip64_p); - } - } - else { - if ((flags & ZIP_FL_FORCE_ZIP64) || de->comp_size > ZIP_UINT32_MAX || de->uncomp_size > ZIP_UINT32_MAX || de->offset > ZIP_UINT32_MAX) { - if (de->comp_size >= ZIP_UINT32_MAX) - _zip_poke8(de->comp_size, &ef_zip64_p); - if (de->uncomp_size >= ZIP_UINT32_MAX) - _zip_poke8(de->uncomp_size, &ef_zip64_p); - if (de->offset >= ZIP_UINT32_MAX) - _zip_poke8(de->offset, &ef_zip64_p); - } - } - - if (ef_zip64_p != ef_zip64) { - struct zip_extra_field *ef64 = _zip_ef_new(ZIP_EF_ZIP64, (zip_uint16_t)(ef_zip64_p-ef_zip64), ef_zip64, ZIP_EF_BOTH); - ef64->next = ef; - ef = ef64; - is_zip64 = 1; - } - - if ((flags & (ZIP_FL_LOCAL|ZIP_FL_FORCE_ZIP64)) == (ZIP_FL_LOCAL|ZIP_FL_FORCE_ZIP64)) - is_really_zip64 = _zip_dirent_needs_zip64(de, flags); - else - is_really_zip64 = is_zip64; - - if ((flags & ZIP_FL_LOCAL) == 0) - _zip_write2(is_really_zip64 ? 45 : de->version_madeby, fp); - _zip_write2(is_really_zip64 ? 45 : de->version_needed, fp); - _zip_write2(de->bitflags&0xfff9, fp); /* clear compression method specific flags */ - _zip_write2((zip_uint16_t)de->comp_method, fp); /* TODO: can it be ZIP_CM_DEFAULT? */ - - _zip_u2d_time(de->last_mod, &dostime, &dosdate); - _zip_write2(dostime, fp); - _zip_write2(dosdate, fp); - - _zip_write4(de->crc, fp); - if (de->comp_size < ZIP_UINT32_MAX) - _zip_write4((zip_uint32_t)de->comp_size, fp); - else - _zip_write4(ZIP_UINT32_MAX, fp); - if (de->uncomp_size < ZIP_UINT32_MAX) - _zip_write4((zip_uint32_t)de->uncomp_size, fp); - else - _zip_write4(ZIP_UINT32_MAX, fp); - - _zip_write2(_zip_string_length(de->filename), fp); - _zip_write2(_zip_ef_size(de->extra_fields, flags) + _zip_ef_size(ef, ZIP_EF_BOTH), fp); - - if ((flags & ZIP_FL_LOCAL) == 0) { - _zip_write2(_zip_string_length(de->comment), fp); - _zip_write2((zip_uint16_t)de->disk_number, fp); - _zip_write2(de->int_attrib, fp); - _zip_write4(de->ext_attrib, fp); - if (de->offset < ZIP_UINT32_MAX) - _zip_write4((zip_uint32_t)de->offset, fp); - else - _zip_write4(ZIP_UINT32_MAX, fp); - } - - if (de->filename) - _zip_string_write(de->filename, fp); - - if (ef) - _zip_ef_write(ef, ZIP_EF_BOTH, fp); - if (de->extra_fields) - _zip_ef_write(de->extra_fields, flags, fp); - - if ((flags & ZIP_FL_LOCAL) == 0) { - if (de->comment) - _zip_string_write(de->comment, fp); - } - - _zip_ef_free(ef); - - if (ferror(fp)) { - _zip_error_set(error, ZIP_ER_WRITE, errno); - return -1; - } - - return is_zip64; -} - - - -static time_t -_zip_d2u_time(zip_uint16_t dtime, zip_uint16_t ddate) -{ - struct tm tm; - - memset(&tm, 0, sizeof(tm)); - - /* let mktime decide if DST is in effect */ - tm.tm_isdst = -1; - - tm.tm_year = ((ddate>>9)&127) + 1980 - 1900; - tm.tm_mon = ((ddate>>5)&15) - 1; - tm.tm_mday = ddate&31; - - tm.tm_hour = (dtime>>11)&31; - tm.tm_min = (dtime>>5)&63; - tm.tm_sec = (dtime<<1)&62; - - return mktime(&tm); -} - - - -static struct zip_extra_field * -_zip_ef_utf8(zip_uint16_t id, struct zip_string *str, struct zip_error *error) -{ - const zip_uint8_t *raw; - zip_uint8_t *data, *p; - zip_uint32_t len; - struct zip_extra_field *ef; - - raw = _zip_string_get(str, &len, ZIP_FL_ENC_RAW, NULL); - - if (len+5 > ZIP_UINT16_MAX) { - /* TODO: error */ - } - - if ((data=(zip_uint8_t *)malloc(len+5)) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return NULL; - } - - p = data; - *(p++) = 1; - _zip_poke4(_zip_string_crc32(str), &p); - memcpy(p, raw, len); - p += len; - - ef = _zip_ef_new(id, (zip_uint16_t)(p-data), data, ZIP_EF_BOTH); - free(data); - return ef; -} - - - -struct zip_dirent * -_zip_get_dirent(struct zip *za, zip_uint64_t idx, zip_flags_t flags, struct zip_error *error) -{ - if (error == NULL) - error = &za->error; - - if (idx >= za->nentry) { - _zip_error_set(error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((flags & ZIP_FL_UNCHANGED) || za->entry[idx].changes == NULL) { - if (za->entry[idx].orig == NULL) { - _zip_error_set(error, ZIP_ER_INVAL, 0); - return NULL; - } - if (za->entry[idx].deleted && (flags & ZIP_FL_UNCHANGED) == 0) { - _zip_error_set(error, ZIP_ER_DELETED, 0); - return NULL; - } - return za->entry[idx].orig; - } - else - return za->entry[idx].changes; -} - - - -zip_uint16_t -_zip_read2(const zip_uint8_t **a) -{ - zip_uint16_t ret; - - ret = (zip_uint16_t)((*a)[0]+((*a)[1]<<8)); - *a += 2; - - return ret; -} - - - -zip_uint32_t -_zip_read4(const zip_uint8_t **a) -{ - zip_uint32_t ret; - - ret = ((((((zip_uint32_t)(*a)[3]<<8)+(*a)[2])<<8)+(*a)[1])<<8)+(*a)[0]; - *a += 4; - - return ret; -} - - - -zip_uint64_t -_zip_read8(const zip_uint8_t **a) -{ - zip_uint64_t x, y; - - x = ((((((zip_uint64_t)(*a)[3]<<8)+(*a)[2])<<8)+(*a)[1])<<8)+(*a)[0]; - *a += 4; - y = ((((((zip_uint64_t)(*a)[3]<<8)+(*a)[2])<<8)+(*a)[1])<<8)+(*a)[0]; - *a += 4; - - return x+(y<<32); -} - - - -zip_uint8_t * -_zip_read_data(const zip_uint8_t **buf, FILE *fp, size_t len, int nulp, struct zip_error *error) -{ - zip_uint8_t *r; - - if (len == 0 && nulp == 0) - return NULL; - - r = (zip_uint8_t *)malloc(nulp ? len+1 : len); - if (!r) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return NULL; - } - - if (buf) { - memcpy(r, *buf, len); - *buf += len; - } - else { - if (fread(r, 1, len, fp)>8)&0xff; - *((*p)++) = (i>>16)&0xff; - *((*p)++) = (i>>24)&0xff; -} - - - -void -_zip_poke8(zip_uint64_t i, zip_uint8_t **p) -{ - *((*p)++) = i&0xff; - *((*p)++) = (i>>8)&0xff; - *((*p)++) = (i>>16)&0xff; - *((*p)++) = (i>>24)&0xff; - *((*p)++) = (i>>32)&0xff; - *((*p)++) = (i>>40)&0xff; - *((*p)++) = (i>>48)&0xff; - *((*p)++) = (i>>56)&0xff; -} - - - -void -_zip_write2(zip_uint16_t i, FILE *fp) -{ - putc(i&0xff, fp); - putc((i>>8)&0xff, fp); - - return; -} - - - -void -_zip_write4(zip_uint32_t i, FILE *fp) -{ - putc(i&0xff, fp); - putc((i>>8)&0xff, fp); - putc((i>>16)&0xff, fp); - putc((i>>24)&0xff, fp); - - return; -} - - - -void -_zip_write8(zip_uint64_t i, FILE *fp) -{ - putc(i&0xff, fp); - putc((i>>8)&0xff, fp); - putc((i>>16)&0xff, fp); - putc((i>>24)&0xff, fp); - putc((i>>32)&0xff, fp); - putc((i>>40)&0xff, fp); - putc((i>>48)&0xff, fp); - putc((i>>56)&0xff, fp); - - return; -} - - - -void -_zip_u2d_time(time_t time, zip_uint16_t *dtime, zip_uint16_t *ddate) -{ - struct tm *tm; - - tm = localtime(&time); - *ddate = (zip_uint16_t)(((tm->tm_year+1900-1980)<<9) + ((tm->tm_mon+1)<<5) + tm->tm_mday); - *dtime = (zip_uint16_t)(((tm->tm_hour)<<11) + ((tm->tm_min)<<5) + ((tm->tm_sec)>>1)); - - return; -} diff --git a/build/premake/premake5/contrib/libzip/zip_discard.c b/build/premake/premake5/contrib/libzip/zip_discard.c deleted file mode 100644 index 040b029411..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_discard.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - zip_discard.c -- discard and free struct zip - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -/* zip_discard: - frees the space allocated to a zipfile struct, and closes the - corresponding file. */ - -void -zip_discard(struct zip *za) -{ - zip_uint64_t i; - - if (za == NULL) - return; - - if (za->zn) - free(za->zn); - - if (za->zp) - fclose(za->zp); - - free(za->default_password); - _zip_string_free(za->comment_orig); - _zip_string_free(za->comment_changes); - - if (za->entry) { - for (i=0; inentry; i++) - _zip_entry_finalize(za->entry+i); - free(za->entry); - } - - for (i=0; infile; i++) { - if (za->file[i]->error.zip_err == ZIP_ER_OK) { - _zip_error_set(&za->file[i]->error, ZIP_ER_ZIPCLOSED, 0); - za->file[i]->za = NULL; - } - } - - _zip_error_fini(&za->error); - free(za->file); - - free(za); - - return; -} diff --git a/build/premake/premake5/contrib/libzip/zip_entry.c b/build/premake/premake5/contrib/libzip/zip_entry.c deleted file mode 100644 index 58663e8d0c..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_entry.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - zip_entry.c -- struct zip_entry helper functions - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - -void -_zip_entry_finalize(struct zip_entry *e) -{ - _zip_unchange_data(e); - _zip_dirent_free(e->orig); - _zip_dirent_free(e->changes); -} - - - -void -_zip_entry_init(struct zip_entry *e) -{ - e->orig = NULL; - e->changes = NULL; - e->source = NULL; - e->deleted = 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_err_str.c b/build/premake/premake5/contrib/libzip/zip_err_str.c deleted file mode 100644 index 8fb60036e0..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_err_str.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - This file was generated automatically by ./make_zip_err_str.sh - from ./zip.h; make changes there. - */ - -#include "zipint.h" - - - -const char * const _zip_err_str[] = { - "No error", - "Multi-disk zip archives not supported", - "Renaming temporary file failed", - "Closing zip archive failed", - "Seek error", - "Read error", - "Write error", - "CRC error", - "Containing zip archive was closed", - "No such file", - "File already exists", - "Can't open file", - "Failure to create temporary file", - "Zlib error", - "Malloc failure", - "Entry has been changed", - "Compression method not supported", - "Premature EOF", - "Invalid argument", - "Not a zip archive", - "Internal error", - "Zip archive inconsistent", - "Can't remove file", - "Entry has been deleted", - "Encryption method not supported", - "Read-only archive", - "No password provided", - "Wrong password provided", -}; - -const int _zip_nerr_str = sizeof(_zip_err_str)/sizeof(_zip_err_str[0]); - -#define N ZIP_ET_NONE -#define S ZIP_ET_SYS -#define Z ZIP_ET_ZLIB - -const int _zip_err_type[] = { - N, - N, - S, - S, - S, - S, - S, - N, - N, - N, - N, - S, - S, - Z, - N, - N, - N, - N, - N, - N, - N, - N, - S, - N, - N, - N, - N, - N, -}; diff --git a/build/premake/premake5/contrib/libzip/zip_error.c b/build/premake/premake5/contrib/libzip/zip_error.c deleted file mode 100644 index 4b1f27921a..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_error.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - zip_error.c -- struct zip_error helper functions - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -void -_zip_error_clear(struct zip_error *err) -{ - if (err == NULL) - return; - - err->zip_err = ZIP_ER_OK; - err->sys_err = 0; -} - - - -void -_zip_error_copy(struct zip_error *dst, const struct zip_error *src) -{ - dst->zip_err = src->zip_err; - dst->sys_err = src->sys_err; -} - - - -void -_zip_error_fini(struct zip_error *err) -{ - free(err->str); - err->str = NULL; -} - - - -void -_zip_error_get(const struct zip_error *err, int *zep, int *sep) -{ - if (zep) - *zep = err->zip_err; - if (sep) { - if (zip_error_get_sys_type(err->zip_err) != ZIP_ET_NONE) - *sep = err->sys_err; - else - *sep = 0; - } -} - - - -void -_zip_error_init(struct zip_error *err) -{ - err->zip_err = ZIP_ER_OK; - err->sys_err = 0; - err->str = NULL; -} - - - -void -_zip_error_set(struct zip_error *err, int ze, int se) -{ - if (err) { - err->zip_err = ze; - err->sys_err = se; - } -} - - - -void -_zip_error_set_from_source(struct zip_error *err, struct zip_source *src) -{ - int ze, se; - - zip_source_error(src, &ze, &se); - _zip_error_set(err, ze, se); -} diff --git a/build/premake/premake5/contrib/libzip/zip_error_clear.c b/build/premake/premake5/contrib/libzip/zip_error_clear.c deleted file mode 100644 index b4ff103912..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_error_clear.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - zip_error_clear.c -- clear zip error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN void -zip_error_clear(struct zip *za) -{ - if (za == NULL) - return; - - _zip_error_clear(&za->error); -} diff --git a/build/premake/premake5/contrib/libzip/zip_error_get.c b/build/premake/premake5/contrib/libzip/zip_error_get.c deleted file mode 100644 index 6d1c958c17..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_error_get.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - zip_error_get.c -- get zip error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN void -zip_error_get(struct zip *za, int *zep, int *sep) -{ - _zip_error_get(&za->error, zep, sep); -} diff --git a/build/premake/premake5/contrib/libzip/zip_error_get_sys_type.c b/build/premake/premake5/contrib/libzip/zip_error_get_sys_type.c deleted file mode 100644 index 6c6f380740..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_error_get_sys_type.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - zip_error_get_sys_type.c -- return type of system error code - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_error_get_sys_type(int ze) -{ - if (ze < 0 || ze >= _zip_nerr_str) - return 0; - - return _zip_err_type[ze]; -} diff --git a/build/premake/premake5/contrib/libzip/zip_error_strerror.c b/build/premake/premake5/contrib/libzip/zip_error_strerror.c deleted file mode 100644 index 3d0951cfb1..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_error_strerror.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - zip_error_sterror.c -- get string representation of struct zip_error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include -#include - -#include "zipint.h" - - - -const char * -_zip_error_strerror(struct zip_error *err) -{ - const char *zs, *ss; - char buf[128], *s; - - _zip_error_fini(err); - - if (err->zip_err < 0 || err->zip_err >= _zip_nerr_str) { - sprintf(buf, "Unknown error %d", err->zip_err); - zs = NULL; - ss = buf; - } - else { - zs = _zip_err_str[err->zip_err]; - - switch (_zip_err_type[err->zip_err]) { - case ZIP_ET_SYS: - ss = strerror(err->sys_err); - break; - - case ZIP_ET_ZLIB: - ss = zError(err->sys_err); - break; - - default: - ss = NULL; - } - } - - if (ss == NULL) - return zs; - else { - if ((s=(char *)malloc(strlen(ss) - + (zs ? strlen(zs)+2 : 0) + 1)) == NULL) - return _zip_err_str[ZIP_ER_MEMORY]; - - sprintf(s, "%s%s%s", - (zs ? zs : ""), - (zs ? ": " : ""), - ss); - err->str = s; - - return s; - } -} diff --git a/build/premake/premake5/contrib/libzip/zip_error_to_str.c b/build/premake/premake5/contrib/libzip/zip_error_to_str.c deleted file mode 100644 index fce676d6bd..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_error_to_str.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - zip_error_to_str.c -- get string representation of zip error code - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se) -{ - const char *zs, *ss; - - if (ze < 0 || ze >= _zip_nerr_str) - return snprintf(buf, (size_t)len, "Unknown error %d", ze); - - zs = _zip_err_str[ze]; - - switch (_zip_err_type[ze]) { - case ZIP_ET_SYS: - ss = strerror(se); - break; - - case ZIP_ET_ZLIB: - ss = zError(se); - break; - - default: - ss = NULL; - } - - return snprintf(buf, (size_t)len, "%s%s%s", - zs, (ss ? ": " : ""), (ss ? ss : "")); -} diff --git a/build/premake/premake5/contrib/libzip/zip_extra_field.c b/build/premake/premake5/contrib/libzip/zip_extra_field.c deleted file mode 100644 index 8f1ccaa235..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_extra_field.c +++ /dev/null @@ -1,386 +0,0 @@ -/* - zip_extra_field.c -- manipulate extra fields - Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - -#include -#include -#include - - - -struct zip_extra_field * -_zip_ef_clone(const struct zip_extra_field *ef, struct zip_error *error) -{ - struct zip_extra_field *head, *prev, *def; - - head = prev = NULL; - - while (ef) { - if ((def=_zip_ef_new(ef->id, ef->size, ef->data, ef->flags)) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - _zip_ef_free(head); - return NULL; - } - - if (head == NULL) - head = def; - if (prev) - prev->next = def; - prev = def; - - ef = ef->next; - } - - return head; -} - - -struct zip_extra_field * -_zip_ef_delete_by_id(struct zip_extra_field *ef, zip_uint16_t id, zip_uint16_t id_idx, zip_flags_t flags) -{ - struct zip_extra_field *head, *prev; - int i; - - i = 0; - head = ef; - prev = NULL; - for (; ef; ef=(prev ? prev->next : head)) { - if ((ef->flags & flags & ZIP_EF_BOTH) && ((ef->id == id) || (id == ZIP_EXTRA_FIELD_ALL))) { - if (id_idx == ZIP_EXTRA_FIELD_ALL || i == id_idx) { - ef->flags &= ~(flags & ZIP_EF_BOTH); - if ((ef->flags & ZIP_EF_BOTH) == 0) { - if (prev) - prev->next = ef->next; - else - head = ef->next; - ef->next = NULL; - _zip_ef_free(ef); - - if (id_idx == ZIP_EXTRA_FIELD_ALL) - continue; - } - } - - i++; - if (i > id_idx) - break; - } - prev = ef; - } - - return head; -} - - - - -void -_zip_ef_free(struct zip_extra_field *ef) -{ - struct zip_extra_field *ef2; - - while (ef) { - ef2 = ef->next; - free(ef->data); - free(ef); - ef = ef2; - } -} - - - -const zip_uint8_t * -_zip_ef_get_by_id(const struct zip_extra_field *ef, zip_uint16_t *lenp, zip_uint16_t id, zip_uint16_t id_idx, zip_flags_t flags, struct zip_error *error) -{ - static const zip_uint8_t empty[1] = { '\0' }; - - int i; - - i = 0; - for (; ef; ef=ef->next) { - if (ef->id == id && (ef->flags & flags & ZIP_EF_BOTH)) { - if (i < id_idx) { - i++; - continue; - } - - if (lenp) - *lenp = ef->size; - if (ef->size > 0) - return ef->data; - else - return empty; - } - } - - _zip_error_set(error, ZIP_ER_NOENT, 0); - return NULL; -} - - - -struct zip_extra_field * -_zip_ef_merge(struct zip_extra_field *to, struct zip_extra_field *from) -{ - struct zip_extra_field *ef2, *tt, *tail; - int duplicate; - - if (to == NULL) - return from; - - for (tail=to; tail->next; tail=tail->next) - ; - - for (; from; from=ef2) { - ef2 = from->next; - - duplicate = 0; - for (tt=to; tt; tt=tt->next) { - if (tt->id == from->id && tt->size == from->size && memcmp(tt->data, from->data, tt->size) == 0) { - tt->flags |= (from->flags & ZIP_EF_BOTH); - duplicate = 1; - break; - } - } - - from->next = NULL; - if (duplicate) - _zip_ef_free(from); - else - tail = tail->next = from; - } - - return to; -} - - - -struct zip_extra_field * -_zip_ef_new(zip_uint16_t id, zip_uint16_t size, const zip_uint8_t *data, zip_flags_t flags) -{ - struct zip_extra_field *ef; - - if ((ef=(struct zip_extra_field *)malloc(sizeof(*ef))) == NULL) - return NULL; - - ef->next = NULL; - ef->flags = flags; - ef->id = id; - ef->size = size; - if (size > 0) { - if ((ef->data=(zip_uint8_t *)_zip_memdup(data, size, NULL)) == NULL) { - free(ef); - return NULL; - } - } - else - ef->data = NULL; - - return ef; -} - - - -struct zip_extra_field * -_zip_ef_parse(const zip_uint8_t *data, zip_uint16_t len, zip_flags_t flags, struct zip_error *error) -{ - struct zip_extra_field *ef, *ef2, *ef_head; - const zip_uint8_t *p; - zip_uint16_t fid, flen; - - ef_head = NULL; - for (p=data; p data+len) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - _zip_ef_free(ef_head); - return NULL; - } - - fid = _zip_read2(&p); - flen = _zip_read2(&p); - - if (p+flen > data+len) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - _zip_ef_free(ef_head); - return NULL; - } - - if ((ef2=_zip_ef_new(fid, flen, p, flags)) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - _zip_ef_free(ef_head); - return NULL; - } - - if (ef_head) { - ef->next = ef2; - ef = ef2; - } - else - ef_head = ef = ef2; - } - - return ef_head; -} - - - -struct zip_extra_field * -_zip_ef_remove_internal(struct zip_extra_field *ef) -{ - struct zip_extra_field *ef_head; - struct zip_extra_field *prev, *next; - - ef_head = ef; - prev = NULL; - - while (ef) { - if (ZIP_EF_IS_INTERNAL(ef->id)) { - next = ef->next; - if (ef_head == ef) - ef_head = next; - ef->next = NULL; - _zip_ef_free(ef); - if (prev) - prev->next = next; - ef = next; - } - else { - prev = ef; - ef = ef->next; - } - } - - return ef_head; -} - - -zip_uint16_t -_zip_ef_size(const struct zip_extra_field *ef, zip_flags_t flags) -{ - zip_uint16_t size; - - size = 0; - for (; ef; ef=ef->next) { - if (ef->flags & flags & ZIP_EF_BOTH) - size += 4+ef->size; - } - - return size; -} - - - -void -_zip_ef_write(const struct zip_extra_field *ef, zip_flags_t flags, FILE *f) -{ - for (; ef; ef=ef->next) { - if (ef->flags & flags & ZIP_EF_BOTH) { - _zip_write2(ef->id, f); - _zip_write2(ef->size, f); - if (ef->size > 0) - fwrite(ef->data, ef->size, 1, f); - } - } -} - - - -int -_zip_read_local_ef(struct zip *za, zip_uint64_t idx) -{ - struct zip_entry *e; - unsigned char b[4]; - const unsigned char *p; - zip_uint16_t fname_len, ef_len; - - if (idx >= za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - e = za->entry+idx; - - if (e->orig == NULL || e->orig->local_extra_fields_read) - return 0; - - - if (fseeko(za->zp, (off_t)(e->orig->offset + 26), SEEK_SET) < 0) { - _zip_error_set(&za->error, ZIP_ER_SEEK, errno); - return -1; - } - - if (fread(b, sizeof(b), 1, za->zp) != 1) { - _zip_error_set(&za->error, ZIP_ER_READ, errno); - return -1; - } - - p = b; - fname_len = _zip_read2(&p); - ef_len = _zip_read2(&p); - - if (ef_len > 0) { - struct zip_extra_field *ef; - zip_uint8_t *ef_raw; - - if (fseek(za->zp, fname_len, SEEK_CUR) < 0) { - _zip_error_set(&za->error, ZIP_ER_SEEK, errno); - return -1; - } - - ef_raw = _zip_read_data(NULL, za->zp, ef_len, 0, &za->error); - - if (ef_raw == NULL) - return -1; - - if ((ef=_zip_ef_parse(ef_raw, ef_len, ZIP_EF_LOCAL, &za->error)) == NULL) { - free(ef_raw); - return -1; - } - free(ef_raw); - - ef = _zip_ef_remove_internal(ef); - e->orig->extra_fields = _zip_ef_merge(e->orig->extra_fields, ef); - } - - e->orig->local_extra_fields_read = 1; - - if (e->changes && e->changes->local_extra_fields_read == 0) { - e->changes->extra_fields = e->orig->extra_fields; - e->changes->local_extra_fields_read = 1; - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_extra_field_api.c b/build/premake/premake5/contrib/libzip/zip_extra_field_api.c deleted file mode 100644 index 3e936d2664..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_extra_field_api.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - zip_extra_field_api.c -- public extra fields API functions - Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_file_extra_field_delete(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_idx, zip_flags_t flags) -{ - struct zip_dirent *de; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (((flags & ZIP_EF_BOTH) == ZIP_EF_BOTH) && (ef_idx != ZIP_EXTRA_FIELD_ALL)) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (_zip_get_dirent(za, idx, 0, NULL) == NULL) - return -1; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) - return -1; - - de = za->entry[idx].changes; - - de->extra_fields = _zip_ef_delete_by_id(de->extra_fields, ZIP_EXTRA_FIELD_ALL, ef_idx, flags); - return 0; -} - - - -ZIP_EXTERN int -zip_file_extra_field_delete_by_id(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_idx, zip_flags_t flags) -{ - struct zip_dirent *de; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (((flags & ZIP_EF_BOTH) == ZIP_EF_BOTH) && (ef_idx != ZIP_EXTRA_FIELD_ALL)) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (_zip_get_dirent(za, idx, 0, NULL) == NULL) - return -1; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) - return -1; - - de = za->entry[idx].changes; - - de->extra_fields = _zip_ef_delete_by_id(de->extra_fields, ef_id, ef_idx, flags); - return 0; -} - - - -ZIP_EXTERN const zip_uint8_t * -zip_file_extra_field_get(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_idx, zip_uint16_t *idp, zip_uint16_t *lenp, zip_flags_t flags) -{ - static const zip_uint8_t empty[1] = { '\0' }; - - struct zip_dirent *de; - struct zip_extra_field *ef; - int i; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) - return NULL; - - if (flags & ZIP_FL_LOCAL) - if (_zip_read_local_ef(za, idx) < 0) - return NULL; - - i = 0; - for (ef=de->extra_fields; ef; ef=ef->next) { - if (ef->flags & flags & ZIP_EF_BOTH) { - if (i < ef_idx) { - i++; - continue; - } - - if (idp) - *idp = ef->id; - if (lenp) - *lenp = ef->size; - if (ef->size > 0) - return ef->data; - else - return empty; - } - } - - _zip_error_set(&za->error, ZIP_ER_NOENT, 0); - return NULL; - -} - - - -ZIP_EXTERN const zip_uint8_t * -zip_file_extra_field_get_by_id(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_idx, zip_uint16_t *lenp, zip_flags_t flags) -{ - struct zip_dirent *de; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) - return NULL; - - if (flags & ZIP_FL_LOCAL) - if (_zip_read_local_ef(za, idx) < 0) - return NULL; - - return _zip_ef_get_by_id(de->extra_fields, lenp, ef_id, ef_idx, flags, &za->error); -} - - - -ZIP_EXTERN zip_int16_t -zip_file_extra_fields_count(struct zip *za, zip_uint64_t idx, zip_flags_t flags) -{ - struct zip_dirent *de; - struct zip_extra_field *ef; - zip_uint16_t n; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) - return -1; - - if (flags & ZIP_FL_LOCAL) - if (_zip_read_local_ef(za, idx) < 0) - return -1; - - n = 0; - for (ef=de->extra_fields; ef; ef=ef->next) - if (ef->flags & flags & ZIP_EF_BOTH) - n++; - - return (zip_int16_t)n; -} - - - -ZIP_EXTERN zip_int16_t -zip_file_extra_fields_count_by_id(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_flags_t flags) -{ - struct zip_dirent *de; - struct zip_extra_field *ef; - zip_uint16_t n; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if ((de=_zip_get_dirent(za, idx, flags, &za->error)) == NULL) - return -1; - - if (flags & ZIP_FL_LOCAL) - if (_zip_read_local_ef(za, idx) < 0) - return -1; - - n = 0; - for (ef=de->extra_fields; ef; ef=ef->next) - if (ef->id == ef_id && (ef->flags & flags & ZIP_EF_BOTH)) - n++; - - return (zip_int16_t)n; -} - - - -ZIP_EXTERN int -zip_file_extra_field_set(struct zip *za, zip_uint64_t idx, zip_uint16_t ef_id, zip_uint16_t ef_idx, const zip_uint8_t *data, zip_uint16_t len, zip_flags_t flags) -{ - struct zip_dirent *de; - zip_uint16_t ls, cs; - struct zip_extra_field *ef, *ef_prev, *ef_new; - int i, found, new_len; - - if ((flags & ZIP_EF_BOTH) == 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (_zip_get_dirent(za, idx, 0, NULL) == NULL) - return -1; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (ZIP_EF_IS_INTERNAL(ef_id)) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (_zip_file_extra_field_prepare_for_change(za, idx) < 0) - return -1; - - de = za->entry[idx].changes; - - ef = de->extra_fields; - ef_prev = NULL; - i = 0; - found = 0; - - for (; ef; ef=ef->next) { - if (ef->id == ef_id && (ef->flags & flags & ZIP_EF_BOTH)) { - if (i == ef_idx) { - found = 1; - break; - } - i++; - } - ef_prev = ef; - } - - if (i < ef_idx && ef_idx != ZIP_EXTRA_FIELD_NEW) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (flags & ZIP_EF_LOCAL) - ls = _zip_ef_size(de->extra_fields, ZIP_EF_LOCAL); - else - ls = 0; - if (flags & ZIP_EF_CENTRAL) - cs = _zip_ef_size(de->extra_fields, ZIP_EF_CENTRAL); - else - cs = 0; - - new_len = ls > cs ? ls : cs; - if (found) - new_len -= ef->size + 4; - new_len += len + 4; - - if (new_len > ZIP_UINT16_MAX) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if ((ef_new=_zip_ef_new(ef_id, len, data, flags)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - - if (found) { - if ((ef->flags & ZIP_EF_BOTH) == (flags & ZIP_EF_BOTH)) { - ef_new->next = ef->next; - ef->next = NULL; - _zip_ef_free(ef); - if (ef_prev) - ef_prev->next = ef_new; - else - de->extra_fields = ef_new; - } - else { - ef->flags &= ~(flags & ZIP_EF_BOTH); - ef_new->next = ef->next; - ef->next = ef_new; - } - } - else if (ef_prev) { - ef_new->next = ef_prev->next; - ef_prev->next = ef_new; - } - else - de->extra_fields = ef_new; - - return 0; -} - - - -int -_zip_file_extra_field_prepare_for_change(struct zip *za, zip_uint64_t idx) -{ - struct zip_entry *e; - - if (idx >= za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - e = za->entry+idx; - - if (e->changes && (e->changes->changed & ZIP_DIRENT_EXTRA_FIELD)) - return 0; - - if (e->orig) { - if (_zip_read_local_ef(za, idx) < 0) - return -1; - } - - if (e->changes == NULL) { - if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - } - - if (e->orig && e->orig->extra_fields) { - if ((e->changes->extra_fields=_zip_ef_clone(e->orig->extra_fields, &za->error)) == NULL) - return -1; - } - e->changes->changed |= ZIP_DIRENT_EXTRA_FIELD; - - return 0; -} - diff --git a/build/premake/premake5/contrib/libzip/zip_fclose.c b/build/premake/premake5/contrib/libzip/zip_fclose.c deleted file mode 100644 index c05ec3dd0f..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fclose.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - zip_fclose.c -- close file in zip archive - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_fclose(struct zip_file *zf) -{ - int ret; - unsigned int i; - - if (zf->src) - zip_source_free(zf->src); - - if (zf->za) { - for (i=0; iza->nfile; i++) { - if (zf->za->file[i] == zf) { - zf->za->file[i] = zf->za->file[zf->za->nfile-1]; - zf->za->nfile--; - break; - } - } - } - - ret = 0; - if (zf->error.zip_err) - ret = zf->error.zip_err; - - _zip_error_fini(&zf->error); - free(zf); - return ret; -} diff --git a/build/premake/premake5/contrib/libzip/zip_fdopen.c b/build/premake/premake5/contrib/libzip/zip_fdopen.c deleted file mode 100644 index bda9aabac4..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fdopen.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - zip_fdopen.c -- open read-only archive from file descriptor - Copyright (C) 2009-2010 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN struct zip * -zip_fdopen(int fd_orig, int _flags, int *zep) -{ - int fd; - FILE *fp; - unsigned int flags; - - if (_flags < 0) { - if (zep) - *zep = ZIP_ER_INVAL; - return NULL; - } - flags = (unsigned int)_flags; - - if (flags & ZIP_TRUNCATE) { - *zep = ZIP_ER_INVAL; - return NULL; - } - - /* We dup() here to avoid messing with the passed in fd. - We could not restore it to the original state in case of error. */ - - if ((fd=dup(fd_orig)) < 0) { - *zep = ZIP_ER_OPEN; - return NULL; - } - - if ((fp=fdopen(fd, "rb")) == NULL) { - close(fd); - *zep = ZIP_ER_OPEN; - return NULL; - } - - close(fd_orig); - return _zip_open(NULL, fp, flags, zep); -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_add.c b/build/premake/premake5/contrib/libzip/zip_file_add.c deleted file mode 100644 index 995cb91c1a..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_add.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - zip_file_add.c -- add file via callback function - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - -/* - NOTE: Return type is signed so we can return -1 on error. - The index can not be larger than ZIP_INT64_MAX since the size - of the central directory cannot be larger than - ZIP_UINT64_MAX, and each entry is larger than 2 bytes. -*/ - -ZIP_EXTERN zip_int64_t -zip_file_add(struct zip *za, const char *name, struct zip_source *source, zip_flags_t flags) -{ - if (name == NULL || source == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - return _zip_file_replace(za, ZIP_UINT64_MAX, name, source, flags); -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_error_clear.c b/build/premake/premake5/contrib/libzip/zip_file_error_clear.c deleted file mode 100644 index ce8b6cbd94..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_error_clear.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - zip_file_error_clear.c -- clear zip file error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN void -zip_file_error_clear(struct zip_file *zf) -{ - if (zf == NULL) - return; - - _zip_error_clear(&zf->error); -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_error_get.c b/build/premake/premake5/contrib/libzip/zip_file_error_get.c deleted file mode 100644 index f20e011fc7..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_error_get.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - zip_file_error_get.c -- get zip file error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN void -zip_file_error_get(struct zip_file *zf, int *zep, int *sep) -{ - _zip_error_get(&zf->error, zep, sep); -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_get_comment.c b/build/premake/premake5/contrib/libzip/zip_file_get_comment.c deleted file mode 100644 index 766731ea26..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_get_comment.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - zip_file_get_comment.c -- get file comment - Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - -/* lenp is 32 bit because converted comment can be longer than ZIP_UINT16_MAX */ - -ZIP_EXTERN const char * -zip_file_get_comment(struct zip *za, zip_uint64_t idx, zip_uint32_t *lenp, zip_flags_t flags) -{ - struct zip_dirent *de; - zip_uint32_t len; - const zip_uint8_t *str; - - if ((de=_zip_get_dirent(za, idx, flags, NULL)) == NULL) - return NULL; - - if ((str=_zip_string_get(de->comment, &len, flags, &za->error)) == NULL) - return NULL; - - if (lenp) - *lenp = len; - - return (const char *)str; -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_get_external_attributes.c b/build/premake/premake5/contrib/libzip/zip_file_get_external_attributes.c deleted file mode 100644 index 6d09889af1..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_get_external_attributes.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - zip_file_get_external_attributes.c -- get opsys/external attributes - Copyright (C) 2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "zipint.h" - -int -zip_file_get_external_attributes(struct zip *za, zip_uint64_t idx, zip_flags_t flags, zip_uint8_t *opsys, zip_uint32_t *attributes) -{ - struct zip_dirent *de; - - if ((de=_zip_get_dirent(za, idx, flags, NULL)) == NULL) - return -1; - - if (opsys) - *opsys = (de->version_madeby >> 8) & 0xff; - - if (attributes) - *attributes = de->ext_attrib; - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_get_offset.c b/build/premake/premake5/contrib/libzip/zip_file_get_offset.c deleted file mode 100644 index e8c199fb5b..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_get_offset.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - zip_file_get_offset.c -- get offset of file data in archive. - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include -#include -#include -#include - -#include "zipint.h" - - - -/* _zip_file_get_offset(za, ze): - Returns the offset of the file data for entry ze. - - On error, fills in za->error and returns 0. -*/ - -zip_uint64_t -_zip_file_get_offset(const struct zip *za, zip_uint64_t idx, struct zip_error *error) -{ - zip_uint64_t offset; - zip_int32_t size; - - offset = za->entry[idx].orig->offset; - - if (fseeko(za->zp, (off_t)offset, SEEK_SET) != 0) { - _zip_error_set(error, ZIP_ER_SEEK, errno); - return 0; - } - - /* TODO: cache? */ - if ((size=_zip_dirent_size(za->zp, ZIP_EF_LOCAL, error)) < 0) - return 0; - - if (offset+(zip_uint32_t)size > ZIP_OFF_MAX) { - _zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return 0; - } - - return offset + (zip_uint32_t)size; -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_rename.c b/build/premake/premake5/contrib/libzip/zip_file_rename.c deleted file mode 100644 index 383a52adae..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_rename.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - zip_file_rename.c -- rename file in zip archive - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_file_rename(struct zip *za, zip_uint64_t idx, const char *name, zip_flags_t flags) -{ - const char *old_name; - int old_is_dir, new_is_dir; - - if (idx >= za->nentry || (name != NULL && strlen(name) > ZIP_UINT16_MAX)) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if ((old_name=zip_get_name(za, idx, 0)) == NULL) - return -1; - - new_is_dir = (name != NULL && name[strlen(name)-1] == '/'); - old_is_dir = (old_name[strlen(old_name)-1] == '/'); - - if (new_is_dir != old_is_dir) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - return _zip_set_name(za, idx, name, flags); -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_replace.c b/build/premake/premake5/contrib/libzip/zip_file_replace.c deleted file mode 100644 index 7e7e942168..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_replace.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - zip_file_replace.c -- replace file via callback function - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_file_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source, zip_flags_t flags) -{ - if (idx >= za->nentry || source == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (_zip_file_replace(za, idx, NULL, source, flags) == -1) - return -1; - - return 0; -} - - - - -/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */ - -zip_int64_t -_zip_file_replace(struct zip *za, zip_uint64_t idx, const char *name, struct zip_source *source, zip_flags_t flags) -{ - zip_uint64_t za_nentry_prev; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - za_nentry_prev = za->nentry; - if (idx == ZIP_UINT64_MAX) { - zip_int64_t i = -1; - - if (flags & ZIP_FL_OVERWRITE) - i = _zip_name_locate(za, name, flags, NULL); - - if (i == -1) { - /* create and use new entry, used by zip_add */ - if ((i=_zip_add_entry(za)) < 0) - return -1; - } - idx = (zip_uint64_t)i; - } - - if (name && _zip_set_name(za, idx, name, flags) != 0) { - if (za->nentry != za_nentry_prev) { - _zip_entry_finalize(za->entry+idx); - za->nentry = za_nentry_prev; - } - return -1; - } - - /* does not change any name related data, so we can do it here; - * needed for a double add of the same file name */ - _zip_unchange_data(za->entry+idx); - - if (za->entry[idx].orig != NULL && (za->entry[idx].changes == NULL || (za->entry[idx].changes->changed & ZIP_DIRENT_COMP_METHOD) == 0)) { - if (za->entry[idx].changes == NULL) { - if ((za->entry[idx].changes=_zip_dirent_clone(za->entry[idx].orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - } - - za->entry[idx].changes->comp_method = ZIP_CM_REPLACED_DEFAULT; - za->entry[idx].changes->changed |= ZIP_DIRENT_COMP_METHOD; - } - - za->entry[idx].source = source; - - return (zip_int64_t)idx; -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_set_comment.c b/build/premake/premake5/contrib/libzip/zip_file_set_comment.c deleted file mode 100644 index 722f3d43cc..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_set_comment.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - zip_file_set_comment.c -- set comment for file in archive - Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_file_set_comment(struct zip *za, zip_uint64_t idx, - const char *comment, zip_uint16_t len, zip_flags_t flags) -{ - struct zip_entry *e; - struct zip_string *cstr; - int changed; - - if (_zip_get_dirent(za, idx, 0, NULL) == NULL) - return -1; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (len > 0 && comment == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (len > 0) { - if ((cstr=_zip_string_new((const zip_uint8_t *)comment, len, flags, &za->error)) == NULL) - return -1; - if ((flags & ZIP_FL_ENCODING_ALL) == ZIP_FL_ENC_GUESS && _zip_guess_encoding(cstr, ZIP_ENCODING_UNKNOWN) == ZIP_ENCODING_UTF8_GUESSED) - cstr->encoding = ZIP_ENCODING_UTF8_KNOWN; - } - else - cstr = NULL; - - e = za->entry+idx; - - if (e->changes) { - _zip_string_free(e->changes->comment); - e->changes->comment = NULL; - e->changes->changed &= ~ZIP_DIRENT_COMMENT; - } - - if (e->orig && e->orig->comment) - changed = !_zip_string_equal(e->orig->comment, cstr); - else - changed = (cstr != NULL); - - if (changed) { - if (e->changes == NULL) { - if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - _zip_string_free(cstr); - return -1; - } - } - e->changes->comment = cstr; - e->changes->changed |= ZIP_DIRENT_COMMENT; - } - else { - _zip_string_free(cstr); - if (e->changes && e->changes->changed == 0) { - _zip_dirent_free(e->changes); - e->changes = NULL; - } - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_set_external_attributes.c b/build/premake/premake5/contrib/libzip/zip_file_set_external_attributes.c deleted file mode 100644 index 0820d6f5c8..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_set_external_attributes.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - zip_file_set_external_attributes.c -- set external attributes for entry - Copyright (C) 2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "zipint.h" - -int -zip_file_set_external_attributes(struct zip *za, zip_uint64_t idx, zip_flags_t flags, zip_uint8_t opsys, zip_uint32_t attributes) -{ - struct zip_entry *e; - int changed; - zip_uint8_t unchanged_opsys; - zip_uint32_t unchanged_attributes; - - if (_zip_get_dirent(za, idx, 0, NULL) == NULL) - return -1; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - e = za->entry+idx; - - unchanged_opsys = e->orig ? e->orig->version_madeby>>8 : ZIP_OPSYS_DEFAULT; - unchanged_attributes = e->orig ? e->orig->ext_attrib : ZIP_EXT_ATTRIB_DEFAULT; - - changed = (opsys != unchanged_opsys || attributes != unchanged_attributes); - - if (changed) { - if (e->changes == NULL) { - if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - } - e->changes->version_madeby = (opsys << 8) | (e->changes->version_madeby & 0xff); - e->changes->ext_attrib = attributes; - e->changes->changed |= ZIP_DIRENT_ATTRIBUTES; - } - else if (e->changes) { - e->changes->changed &= ~ZIP_DIRENT_ATTRIBUTES; - if (e->changes->changed == 0) { - _zip_dirent_free(e->changes); - e->changes = NULL; - } - else { - e->changes->version_madeby = (unchanged_opsys << 8) | (e->changes->version_madeby & 0xff); - e->changes->ext_attrib = unchanged_attributes; - } - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_file_strerror.c b/build/premake/premake5/contrib/libzip/zip_file_strerror.c deleted file mode 100644 index 9ba70f14ff..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_file_strerror.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - zip_file_sterror.c -- get string representation of zip file error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN const char * -zip_file_strerror(struct zip_file *zf) -{ - return _zip_error_strerror(&zf->error); -} diff --git a/build/premake/premake5/contrib/libzip/zip_filerange_crc.c b/build/premake/premake5/contrib/libzip/zip_filerange_crc.c deleted file mode 100644 index 3b1c868407..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_filerange_crc.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - zip_filerange_crc.c -- compute CRC32 for a range of a file - Copyright (C) 2008-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - - -int -_zip_filerange_crc(FILE *fp, off_t start, off_t len, uLong *crcp, - struct zip_error *errp) -{ - Bytef buf[BUFSIZE]; - size_t n; - - *crcp = crc32(0L, Z_NULL, 0); - - if (fseeko(fp, start, SEEK_SET) != 0) { - _zip_error_set(errp, ZIP_ER_SEEK, errno); - return -1; - } - - while (len > 0) { - n = len > BUFSIZE ? BUFSIZE : (size_t)len; - if ((n=fread(buf, 1, n, fp)) == 0) { - _zip_error_set(errp, ZIP_ER_READ, errno); - return -1; - } - - *crcp = crc32(*crcp, buf, (uInt)n); - - len-= n; - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_fopen.c b/build/premake/premake5/contrib/libzip/zip_fopen.c deleted file mode 100644 index 331f79ea36..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fopen.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - zip_fopen.c -- open file in zip archive for reading - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN struct zip_file * -zip_fopen(struct zip *za, const char *fname, zip_flags_t flags) -{ - zip_int64_t idx; - - if ((idx=zip_name_locate(za, fname, flags)) < 0) - return NULL; - - return zip_fopen_index_encrypted(za, (zip_uint64_t)idx, flags, za->default_password); -} diff --git a/build/premake/premake5/contrib/libzip/zip_fopen_encrypted.c b/build/premake/premake5/contrib/libzip/zip_fopen_encrypted.c deleted file mode 100644 index 34230f00d7..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fopen_encrypted.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - zip_fopen_encrypted.c -- open file for reading with password - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN struct zip_file * -zip_fopen_encrypted(struct zip *za, const char *fname, zip_flags_t flags, const char *password) -{ - zip_int64_t idx; - - if ((idx=zip_name_locate(za, fname, flags)) < 0) - return NULL; - - return zip_fopen_index_encrypted(za, (zip_uint64_t)idx, flags, password); -} diff --git a/build/premake/premake5/contrib/libzip/zip_fopen_index.c b/build/premake/premake5/contrib/libzip/zip_fopen_index.c deleted file mode 100644 index 30466ffa19..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fopen_index.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - zip_fopen_index.c -- open file in zip archive for reading by index - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include - -#include "zipint.h" - - - -ZIP_EXTERN struct zip_file * -zip_fopen_index(struct zip *za, zip_uint64_t index, zip_flags_t flags) -{ - return zip_fopen_index_encrypted(za, index, flags, za->default_password); -} diff --git a/build/premake/premake5/contrib/libzip/zip_fopen_index_encrypted.c b/build/premake/premake5/contrib/libzip/zip_fopen_index_encrypted.c deleted file mode 100644 index cc81ca7f53..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fopen_index_encrypted.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - zip_fopen_index_encrypted.c -- open file for reading by index w/ password - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include - -#include "zipint.h" - -static struct zip_file *_zip_file_new(struct zip *za); - - - -ZIP_EXTERN struct zip_file * -zip_fopen_index_encrypted(struct zip *za, zip_uint64_t index, zip_flags_t flags, - const char *password) -{ - struct zip_file *zf; - struct zip_source *src; - - if ((src=_zip_source_zip_new(za, za, index, flags, 0, 0, password)) == NULL) - return NULL; - - if (zip_source_open(src) < 0) { - _zip_error_set_from_source(&za->error, src); - zip_source_free(src); - return NULL; - } - - if ((zf=_zip_file_new(za)) == NULL) { - zip_source_free(src); - return NULL; - } - - zf->src = src; - - return zf; -} - - - -static struct zip_file * -_zip_file_new(struct zip *za) -{ - struct zip_file *zf, **file; - - if ((zf=(struct zip_file *)malloc(sizeof(struct zip_file))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - if (za->nfile+1 >= za->nfile_alloc) { - unsigned int n; - n = za->nfile_alloc + 10; - file = (struct zip_file **)realloc(za->file, - n*sizeof(struct zip_file *)); - if (file == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - free(zf); - return NULL; - } - za->nfile_alloc = n; - za->file = file; - } - - za->file[za->nfile++] = zf; - - zf->za = za; - _zip_error_init(&zf->error); - zf->eof = 0; - zf->src = NULL; - - return zf; -} diff --git a/build/premake/premake5/contrib/libzip/zip_fread.c b/build/premake/premake5/contrib/libzip/zip_fread.c deleted file mode 100644 index 8235c6dfac..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_fread.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - zip_fread.c -- read from file - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN zip_int64_t -zip_fread(struct zip_file *zf, void *outbuf, zip_uint64_t toread) -{ - zip_int64_t n; - - if (!zf) - return -1; - - if (zf->error.zip_err != 0) - return -1; - - if (toread > ZIP_INT64_MAX) { - _zip_error_set(&zf->error, ZIP_ER_INVAL, 0); - return -1; - } - - if ((zf->eof) || (toread == 0)) - return 0; - - if ((n=zip_source_read(zf->src, outbuf, toread)) < 0) { - _zip_error_set_from_source(&zf->error, zf->src); - return -1; - } - - return n; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_archive_comment.c b/build/premake/premake5/contrib/libzip/zip_get_archive_comment.c deleted file mode 100644 index 202f761f4e..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_archive_comment.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - zip_get_archive_comment.c -- get archive comment - Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN const char * -zip_get_archive_comment(struct zip *za, int *lenp, zip_flags_t flags) -{ - struct zip_string *comment; - zip_uint32_t len; - const zip_uint8_t *str; - - if ((flags & ZIP_FL_UNCHANGED) || (za->comment_changes == NULL)) - comment = za->comment_orig; - else - comment = za->comment_changes; - - if ((str=_zip_string_get(comment, &len, flags, &za->error)) == NULL) - return NULL; - - if (lenp) - *lenp = (int)len; - - return (const char *)str; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_archive_flag.c b/build/premake/premake5/contrib/libzip/zip_get_archive_flag.c deleted file mode 100644 index 7be5a3f2be..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_archive_flag.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - zip_get_archive_flag.c -- get archive global flag - Copyright (C) 2008 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_get_archive_flag(struct zip *za, zip_flags_t flag, zip_flags_t flags) -{ - unsigned int fl; - - fl = (flags & ZIP_FL_UNCHANGED) ? za->flags : za->ch_flags; - - return (fl & flag) ? 1 : 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_compression_implementation.c b/build/premake/premake5/contrib/libzip/zip_get_compression_implementation.c deleted file mode 100644 index aa4a1605c0..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_compression_implementation.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - zip_get_compression_implementation.c -- get compression implementation - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -zip_compression_implementation -_zip_get_compression_implementation(zip_int32_t cm) -{ - if (cm == ZIP_CM_DEFLATE || ZIP_CM_IS_DEFAULT(cm)) - return zip_source_deflate; - return NULL; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_encryption_implementation.c b/build/premake/premake5/contrib/libzip/zip_get_encryption_implementation.c deleted file mode 100644 index 7dcb99210d..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_encryption_implementation.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - zip_get_encryption_implementation.c -- get encryption implementation - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -zip_encryption_implementation -_zip_get_encryption_implementation(zip_uint16_t em) -{ - if (em == ZIP_EM_TRAD_PKWARE) - return zip_source_pkware; - return NULL; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_file_comment.c b/build/premake/premake5/contrib/libzip/zip_get_file_comment.c deleted file mode 100644 index 3be459d4da..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_file_comment.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - zip_get_file_comment.c -- get file comment - Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -ZIP_EXTERN const char * -zip_get_file_comment(struct zip *za, zip_uint64_t idx, int *lenp, int flags) -{ - zip_uint32_t len; - const char *s; - - if ((s=zip_file_get_comment(za, idx, &len, (zip_flags_t)flags)) != NULL) { - if (lenp) - *lenp = (int)len; - } - - return s; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_name.c b/build/premake/premake5/contrib/libzip/zip_get_name.c deleted file mode 100644 index f67c7caf43..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_name.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - zip_get_name.c -- get filename for a file in zip file - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN const char * -zip_get_name(struct zip *za, zip_uint64_t idx, zip_flags_t flags) -{ - return _zip_get_name(za, idx, flags, &za->error); -} - - - -const char * -_zip_get_name(struct zip *za, zip_uint64_t idx, zip_flags_t flags, struct zip_error *error) -{ - struct zip_dirent *de; - const zip_uint8_t *str; - - if ((de=_zip_get_dirent(za, idx, flags, error)) == NULL) - return NULL; - - if ((str=_zip_string_get(de->filename, NULL, flags, error)) == NULL) - return NULL; - - return (const char *)str; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_num_entries.c b/build/premake/premake5/contrib/libzip/zip_get_num_entries.c deleted file mode 100644 index 26484baff2..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_num_entries.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - zip_get_num_entries.c -- get number of entries in archive - Copyright (C) 1999-2011 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN zip_int64_t -zip_get_num_entries(struct zip *za, zip_flags_t flags) -{ - zip_uint64_t n; - - if (za == NULL) - return -1; - - if (flags & ZIP_FL_UNCHANGED) { - n = za->nentry; - while (n>0 && za->entry[n-1].orig == NULL) - --n; - return (zip_int64_t)n; - } - return (zip_int64_t)za->nentry; -} diff --git a/build/premake/premake5/contrib/libzip/zip_get_num_files.c b/build/premake/premake5/contrib/libzip/zip_get_num_files.c deleted file mode 100644 index d75941d5e1..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_get_num_files.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - zip_get_num_files.c -- get number of files in archive - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -ZIP_EXTERN int -zip_get_num_files(struct zip *za) -{ - if (za == NULL) - return -1; - - /* TODO: check for overflow */ - return (int)za->nentry; -} diff --git a/build/premake/premake5/contrib/libzip/zip_memdup.c b/build/premake/premake5/contrib/libzip/zip_memdup.c deleted file mode 100644 index 06af2dabd3..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_memdup.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - zip_memdup.c -- internal zip function, "strdup" with len - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include - -#include "zipint.h" - - - -void * -_zip_memdup(const void *mem, size_t len, struct zip_error *error) -{ - void *ret; - - if (len == 0) - return NULL; - - ret = malloc(len); - if (!ret) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return NULL; - } - - memcpy(ret, mem, len); - - return ret; -} diff --git a/build/premake/premake5/contrib/libzip/zip_name_locate.c b/build/premake/premake5/contrib/libzip/zip_name_locate.c deleted file mode 100644 index 3cac110543..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_name_locate.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - zip_name_locate.c -- get index by name - Copyright (C) 1999-2011 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#ifdef HAVE_STRINGS_H -#include -#endif - -#include "zipint.h" - - - -ZIP_EXTERN zip_int64_t -zip_name_locate(struct zip *za, const char *fname, zip_flags_t flags) -{ - return _zip_name_locate(za, fname, flags, &za->error); -} - - - -zip_int64_t -_zip_name_locate(struct zip *za, const char *fname, zip_flags_t flags, struct zip_error *error) -{ - int (*cmp)(const char *, const char *); - const char *fn, *p; - zip_uint64_t i; - - if (za == NULL) - return -1; - - if (fname == NULL) { - _zip_error_set(error, ZIP_ER_INVAL, 0); - return -1; - } - - cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp; - - for (i=0; inentry; i++) { - fn = _zip_get_name(za, i, flags, error); - - /* newly added (partially filled) entry or error */ - if (fn == NULL) - continue; - - if (flags & ZIP_FL_NODIR) { - p = strrchr(fn, '/'); - if (p) - fn = p+1; - } - - if (cmp(fname, fn) == 0) { - _zip_error_clear(error); - return (zip_int64_t)i; - } - } - - _zip_error_set(error, ZIP_ER_NOENT, 0); - return -1; -} diff --git a/build/premake/premake5/contrib/libzip/zip_new.c b/build/premake/premake5/contrib/libzip/zip_new.c deleted file mode 100644 index f77634a389..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_new.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - zip_new.c -- create and init struct zip - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -/* _zip_new: - creates a new zipfile struct, and sets the contents to zero; returns - the new struct. */ - -struct zip * -_zip_new(struct zip_error *error) -{ - struct zip *za; - - za = (struct zip *)malloc(sizeof(struct zip)); - if (!za) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return NULL; - } - - za->zn = NULL; - za->zp = NULL; - za->open_flags = 0; - _zip_error_init(&za->error); - za->flags = za->ch_flags = 0; - za->default_password = NULL; - za->comment_orig = za->comment_changes = NULL; - za->comment_changed = 0; - za->nentry = za->nentry_alloc = 0; - za->entry = NULL; - za->nfile = za->nfile_alloc = 0; - za->file = NULL; - za->tempdir = NULL; - - return za; -} diff --git a/build/premake/premake5/contrib/libzip/zip_open.c b/build/premake/premake5/contrib/libzip/zip_open.c deleted file mode 100644 index d91fe469db..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_open.c +++ /dev/null @@ -1,742 +0,0 @@ -/* - zip_open.c -- open zip archive by name - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include -#include -#include -#include - -#include "zipint.h" - -static void set_error(int *, const struct zip_error *, int); -static struct zip *_zip_allocate_new(const char *, unsigned int, int *); -static zip_int64_t _zip_checkcons(FILE *, struct zip_cdir *, struct zip_error *); -static void _zip_check_torrentzip(struct zip *, const struct zip_cdir *); -static struct zip_cdir *_zip_find_central_dir(FILE *, unsigned int, int *, off_t); -static int _zip_file_exists(const char *, unsigned int, int *); -static int _zip_headercomp(const struct zip_dirent *, const struct zip_dirent *); -static unsigned char *_zip_memmem(const unsigned char *, size_t, - const unsigned char *, size_t); -static struct zip_cdir *_zip_readcdir(FILE *, off_t, unsigned char *, const unsigned char *, - size_t, unsigned int, struct zip_error *); -static struct zip_cdir *_zip_read_eocd(const unsigned char *, const unsigned char *, off_t, - size_t, unsigned int, struct zip_error *); -static struct zip_cdir *_zip_read_eocd64(FILE *, const unsigned char *, const unsigned char *, - off_t, size_t, unsigned int, struct zip_error *); - - - -ZIP_EXTERN struct zip * -zip_open(const char *fn, int _flags, int *zep) -{ - FILE *fp; - unsigned int flags; - - if (_flags < 0) { - if (zep) - *zep = ZIP_ER_INVAL; - return NULL; - } - flags = (unsigned int)_flags; - - switch (_zip_file_exists(fn, flags, zep)) { - case -1: - return NULL; - case 0: - return _zip_allocate_new(fn, flags, zep); - default: - if (flags & ZIP_TRUNCATE) { - FILE *f; - - if ((f = fopen(fn, "rb")) == NULL) { - set_error(zep, NULL, ZIP_ER_OPEN); - return NULL; - } - fclose(f); - return _zip_allocate_new(fn, flags, zep); - } - break; - } - - if ((fp=fopen(fn, "rb")) == NULL) { - set_error(zep, NULL, ZIP_ER_OPEN); - return NULL; - } - - return _zip_open(fn, fp, flags, zep); -} - - -ZIP_EXTERN int -zip_archive_set_tempdir(struct zip *za, const char *tempdir) -{ - char *new_tempdir; - - if (tempdir) { - if ((new_tempdir = strdup(tempdir)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, errno); - return -1; - } - } - else - new_tempdir = NULL; - - free(za->tempdir); - za->tempdir = new_tempdir; - - return 0; -} - - -struct zip * -_zip_open(const char *fn, FILE *fp, unsigned int flags, int *zep) -{ - struct zip *za; - struct zip_cdir *cdir; - off_t len; - - if (fseeko(fp, 0, SEEK_END) < 0) { - *zep = ZIP_ER_SEEK; - return NULL; - } - len = ftello(fp); - - /* treat empty files as empty archives */ - if (len == 0) { - if ((za=_zip_allocate_new(fn, flags, zep)) == NULL) - fclose(fp); - else - za->zp = fp; - return za; - } - - cdir = _zip_find_central_dir(fp, flags, zep, len); - if (cdir == NULL) { - fclose(fp); - return NULL; - } - - if ((za=_zip_allocate_new(fn, flags, zep)) == NULL) { - _zip_cdir_free(cdir); - fclose(fp); - return NULL; - } - - za->entry = cdir->entry; - za->nentry = cdir->nentry; - za->nentry_alloc = cdir->nentry_alloc; - za->comment_orig = cdir->comment; - - za->zp = fp; - - _zip_check_torrentzip(za, cdir); - - za->ch_flags = za->flags; - - free(cdir); - - return za; -} - - - -static void -set_error(int *zep, const struct zip_error *err, int ze) -{ - int se; - - if (err) { - _zip_error_get(err, &ze, &se); - if (zip_error_get_sys_type(ze) == ZIP_ET_SYS) - errno = se; - } - - if (zep) - *zep = ze; -} - - - -/* _zip_readcdir: - tries to find a valid end-of-central-directory at the beginning of - buf, and then the corresponding central directory entries. - Returns a struct zip_cdir which contains the central directory - entries, or NULL if unsuccessful. */ - -static struct zip_cdir * -_zip_readcdir(FILE *fp, off_t buf_offset, unsigned char *buf, const unsigned char *eocd, size_t buflen, - unsigned int flags, struct zip_error *error) -{ - struct zip_cdir *cd; - const unsigned char *cdp; - const unsigned char **bufp; - zip_int64_t tail_len, comment_len; - zip_uint64_t i, left; - - tail_len = buf + buflen - eocd - EOCDLEN; - if (tail_len < 0) { - /* not enough bytes left for comment */ - _zip_error_set(error, ZIP_ER_NOZIP, 0); - return NULL; - } - - /* check for end-of-central-dir magic */ - if (memcmp(eocd, EOCD_MAGIC, 4) != 0) { - _zip_error_set(error, ZIP_ER_NOZIP, 0); - return NULL; - } - - if (memcmp(eocd+4, "\0\0\0\0", 4) != 0) { - _zip_error_set(error, ZIP_ER_MULTIDISK, 0); - return NULL; - } - - if (eocd-EOCD64LOCLEN >= buf && memcmp(eocd-EOCD64LOCLEN, EOCD64LOC_MAGIC, 4) == 0) - cd = _zip_read_eocd64(fp, eocd-EOCD64LOCLEN, buf, buf_offset, buflen, flags, error); - else - cd = _zip_read_eocd(eocd, buf, buf_offset, buflen, flags, error); - - if (cd == NULL) - return NULL; - - cdp = eocd + 20; - comment_len = _zip_read2(&cdp); - - if ((zip_uint64_t)cd->offset+(zip_uint64_t)cd->size > (zip_uint64_t)buf_offset + (zip_uint64_t)(eocd-buf)) { - /* cdir spans past EOCD record */ - _zip_error_set(error, ZIP_ER_INCONS, 0); - _zip_cdir_free(cd); - return NULL; - } - - if (tail_len < comment_len || ((flags & ZIP_CHECKCONS) && tail_len != comment_len)) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - _zip_cdir_free(cd); - return NULL; - } - - if (comment_len) { - if ((cd->comment=_zip_string_new(eocd+EOCDLEN, (zip_uint16_t)comment_len, ZIP_FL_ENC_GUESS, error)) == NULL) { - _zip_cdir_free(cd); - return NULL; - } - } - - if (cd->offset >= buf_offset) { - /* if buffer already read in, use it */ - cdp = buf + (cd->offset - buf_offset); - bufp = &cdp; - } - else { - /* go to start of cdir and read it entry by entry */ - bufp = NULL; - clearerr(fp); - fseeko(fp, cd->offset, SEEK_SET); - /* possible consistency check: cd->offset = - len-(cd->size+cd->comment_len+EOCDLEN) ? */ - if (ferror(fp) || (ftello(fp) != cd->offset)) { - /* seek error or offset of cdir wrong */ - if (ferror(fp)) - _zip_error_set(error, ZIP_ER_SEEK, errno); - else - _zip_error_set(error, ZIP_ER_NOZIP, 0); - _zip_cdir_free(cd); - return NULL; - } - } - - left = (zip_uint64_t)cd->size; - i=0; - while (inentry && left > 0) { - if ((cd->entry[i].orig=_zip_dirent_new()) == NULL - || (_zip_dirent_read(cd->entry[i].orig, fp, bufp, &left, 0, error)) < 0) { - _zip_cdir_free(cd); - return NULL; - } - i++; - } - if (i != cd->nentry || ((flags & ZIP_CHECKCONS) && left != 0)) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - _zip_cdir_free(cd); - return NULL; - } - - return cd; -} - - - -/* _zip_checkcons: - Checks the consistency of the central directory by comparing central - directory entries with local headers and checking for plausible - file and header offsets. Returns -1 if not plausible, else the - difference between the lowest and the highest fileposition reached */ - -static zip_int64_t -_zip_checkcons(FILE *fp, struct zip_cdir *cd, struct zip_error *error) -{ - zip_uint64_t i; - zip_uint64_t min, max, j; - struct zip_dirent temp; - - if (cd->nentry) { - max = cd->entry[0].orig->offset; - min = cd->entry[0].orig->offset; - } - else - min = max = 0; - - for (i=0; inentry; i++) { - if (cd->entry[i].orig->offset < min) - min = cd->entry[i].orig->offset; - if (min > (zip_uint64_t)cd->offset) { - _zip_error_set(error, ZIP_ER_NOZIP, 0); - return -1; - } - - j = cd->entry[i].orig->offset + cd->entry[i].orig->comp_size - + _zip_string_length(cd->entry[i].orig->filename) + LENTRYSIZE; - if (j > max) - max = j; - if (max > (zip_uint64_t)cd->offset) { - _zip_error_set(error, ZIP_ER_NOZIP, 0); - return -1; - } - - if (fseeko(fp, (off_t)cd->entry[i].orig->offset, SEEK_SET) != 0) { - _zip_error_set(error, ZIP_ER_SEEK, errno); - return -1; - } - - if (_zip_dirent_read(&temp, fp, NULL, NULL, 1, error) == -1) - return -1; - - if (_zip_headercomp(cd->entry[i].orig, &temp) != 0) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - _zip_dirent_finalize(&temp); - return -1; - } - - cd->entry[i].orig->extra_fields = _zip_ef_merge(cd->entry[i].orig->extra_fields, temp.extra_fields); - cd->entry[i].orig->local_extra_fields_read = 1; - temp.extra_fields = NULL; - - _zip_dirent_finalize(&temp); - } - - return (max-min) < ZIP_INT64_MAX ? (zip_int64_t)(max-min) : ZIP_INT64_MAX; -} - - - -/* _zip_check_torrentzip: - check whether ZA has a valid TORRENTZIP comment, i.e. is torrentzipped */ - -static void -_zip_check_torrentzip(struct zip *za, const struct zip_cdir *cdir) -{ - uLong crc_got, crc_should; - char buf[8+1]; - char *end; - - if (za->zp == NULL || cdir == NULL) - return; - - if (_zip_string_length(cdir->comment) != TORRENT_SIG_LEN+8 - || strncmp((const char *)cdir->comment->raw, TORRENT_SIG, TORRENT_SIG_LEN) != 0) - return; - - memcpy(buf, cdir->comment->raw+TORRENT_SIG_LEN, 8); - buf[8] = '\0'; - errno = 0; - crc_should = strtoul(buf, &end, 16); - if ((crc_should == UINT_MAX && errno != 0) || (end && *end)) - return; - - if (_zip_filerange_crc(za->zp, cdir->offset, cdir->size, &crc_got, NULL) < 0) - return; - - if (crc_got == crc_should) - za->flags |= ZIP_AFL_TORRENT; -} - - - - -/* _zip_headercomp: - compares a central directory entry and a local file header - Return 0 if they are consistent, -1 if not. */ - -static int -_zip_headercomp(const struct zip_dirent *central, const struct zip_dirent *local) -{ - if ((central->version_needed != local->version_needed) -#if 0 - /* some zip-files have different values in local - and global headers for the bitflags */ - || (central->bitflags != local->bitflags) -#endif - || (central->comp_method != local->comp_method) - || (central->last_mod != local->last_mod) - || !_zip_string_equal(central->filename, local->filename)) - return -1; - - - if ((central->crc != local->crc) || (central->comp_size != local->comp_size) - || (central->uncomp_size != local->uncomp_size)) { - /* InfoZip stores valid values in local header even when data descriptor is used. - This is in violation of the appnote. */ - if (((local->bitflags & ZIP_GPBF_DATA_DESCRIPTOR) == 0 - || local->crc != 0 || local->comp_size != 0 || local->uncomp_size != 0)) - return -1; - } - - return 0; -} - - - -static struct zip * -_zip_allocate_new(const char *fn, unsigned int flags, int *zep) -{ - struct zip *za; - struct zip_error error; - - if ((za=_zip_new(&error)) == NULL) { - set_error(zep, &error, 0); - return NULL; - } - - if (fn == NULL) - za->zn = NULL; - else { - za->zn = strdup(fn); - if (!za->zn) { - zip_discard(za); - set_error(zep, NULL, ZIP_ER_MEMORY); - return NULL; - } - } - za->open_flags = flags; - return za; -} - - - -static int -_zip_file_exists(const char *fn, unsigned int flags, int *zep) -{ - struct stat st; - - if (fn == NULL) { - set_error(zep, NULL, ZIP_ER_INVAL); - return -1; - } - - if (stat(fn, &st) != 0) { - if (flags & ZIP_CREATE) - return 0; - else { - set_error(zep, NULL, ZIP_ER_OPEN); - return -1; - } - } - else if ((flags & ZIP_EXCL)) { - set_error(zep, NULL, ZIP_ER_EXISTS); - return -1; - } - /* ZIP_CREATE gets ignored if file exists and not ZIP_EXCL, - just like open() */ - - return 1; -} - - - -static struct zip_cdir * -_zip_find_central_dir(FILE *fp, unsigned int flags, int *zep, off_t len) -{ - struct zip_cdir *cdir, *cdirnew; - unsigned char *buf, *match; - off_t buf_offset; - size_t buflen; - zip_int64_t a, i; - zip_int64_t best; - struct zip_error zerr; - - if (len < (off_t)EOCDLEN) { - set_error(zep, NULL, ZIP_ER_NOZIP); - return NULL; - } - - i = fseeko(fp, -(len < CDBUFSIZE ? len : CDBUFSIZE), SEEK_END); - if (i == -1 && errno != EFBIG) { - /* seek before start of file on my machine */ - set_error(zep, NULL, ZIP_ER_SEEK); - return NULL; - } - buf_offset = ftello(fp); - - /* 64k is too much for stack */ - if ((buf=(unsigned char *)malloc(CDBUFSIZE)) == NULL) { - set_error(zep, NULL, ZIP_ER_MEMORY); - return NULL; - } - - clearerr(fp); - buflen = fread(buf, 1, CDBUFSIZE, fp); - - if (ferror(fp)) { - set_error(zep, NULL, ZIP_ER_READ); - free(buf); - return NULL; - } - - best = -1; - cdir = NULL; - match = buf+ (buflen < CDBUFSIZE ? 0 : EOCD64LOCLEN); - _zip_error_set(&zerr, ZIP_ER_NOZIP, 0); - - while ((match=_zip_memmem(match, buflen-(size_t)(match-buf)-(EOCDLEN-4), - (const unsigned char *)EOCD_MAGIC, 4))!=NULL) { - /* found match -- check, if good */ - /* to avoid finding the same match all over again */ - match++; - if ((cdirnew=_zip_readcdir(fp, buf_offset, buf, match-1, buflen, flags, - &zerr)) == NULL) - continue; - - if (cdir) { - if (best <= 0) - best = _zip_checkcons(fp, cdir, &zerr); - a = _zip_checkcons(fp, cdirnew, &zerr); - if (best < a) { - _zip_cdir_free(cdir); - cdir = cdirnew; - best = a; - } - else - _zip_cdir_free(cdirnew); - } - else { - cdir = cdirnew; - if (flags & ZIP_CHECKCONS) - best = _zip_checkcons(fp, cdir, &zerr); - else - best = 0; - } - cdirnew = NULL; - } - - free(buf); - - if (best < 0) { - set_error(zep, &zerr, 0); - _zip_cdir_free(cdir); - return NULL; - } - - return cdir; -} - - - -static unsigned char * -_zip_memmem(const unsigned char *big, size_t biglen, const unsigned char *little, size_t littlelen) -{ - const unsigned char *p; - - if ((biglen < littlelen) || (littlelen == 0)) - return NULL; - p = big-1; - while ((p=(const unsigned char *) - memchr(p+1, little[0], (size_t)(big-(p+1))+(size_t)(biglen-littlelen)+1)) != NULL) { - if (memcmp(p+1, little+1, littlelen-1)==0) - return (unsigned char *)p; - } - - return NULL; -} - - - -static struct zip_cdir * -_zip_read_eocd(const unsigned char *eocd, const unsigned char *buf, off_t buf_offset, size_t buflen, - unsigned int flags, struct zip_error *error) -{ - struct zip_cdir *cd; - const unsigned char *cdp; - zip_uint64_t i, nentry, size, offset; - - if (eocd+EOCDLEN > buf+buflen) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - - cdp = eocd + 8; - - /* number of cdir-entries on this disk */ - i = _zip_read2(&cdp); - /* number of cdir-entries */ - nentry = _zip_read2(&cdp); - - if (nentry != i) { - _zip_error_set(error, ZIP_ER_NOZIP, 0); - return NULL; - } - - size = _zip_read4(&cdp); - offset = _zip_read4(&cdp); - - if (size > ZIP_OFF_MAX || offset > ZIP_OFF_MAX || offset+size > ZIP_OFF_MAX) { - _zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return NULL; - } - - if (offset+size > (zip_uint64_t)(buf_offset + (eocd-buf))) { - /* cdir spans past EOCD record */ - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - - if ((flags & ZIP_CHECKCONS) && offset+size != (zip_uint64_t)(buf_offset + (eocd-buf))) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - - if ((cd=_zip_cdir_new(nentry, error)) == NULL) - return NULL; - - cd->size = (off_t)size; - cd->offset = (off_t)offset; - - return cd; -} - - - -static struct zip_cdir * -_zip_read_eocd64(FILE *f, const zip_uint8_t *eocd64loc, const zip_uint8_t *buf, - off_t buf_offset, size_t buflen, unsigned int flags, struct zip_error *error) -{ - struct zip_cdir *cd; - zip_uint64_t offset; - const zip_uint8_t *cdp; - zip_uint8_t eocd[EOCD64LEN]; - zip_uint64_t eocd_offset; - zip_uint64_t size, nentry, i; - - cdp = eocd64loc+8; - eocd_offset = _zip_read8(&cdp); - - if (eocd_offset > ZIP_OFF_MAX || eocd_offset + EOCD64LEN > ZIP_OFF_MAX) { - _zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return NULL; - } - - if (eocd64loc < buf || (off_t)eocd_offset+EOCD64LEN > (buf_offset+(eocd64loc-buf))) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - - if ((off_t)eocd_offset >= buf_offset && (off_t)eocd_offset+EOCD64LEN <= buf_offset+(ssize_t)buflen) - cdp = buf+((off_t)eocd_offset-buf_offset); - else { - if (fseeko(f, (off_t)eocd_offset, SEEK_SET) != 0) { - _zip_error_set(error, ZIP_ER_SEEK, errno); - return NULL; - } - - clearerr(f); - if (fread(eocd, 1, EOCD64LEN, f) < EOCD64LEN) { - _zip_error_set(error, ZIP_ER_READ, errno); - return NULL; - } - - if (ferror(f)) { - _zip_error_set(error, ZIP_ER_READ, errno); - return NULL; - } - - cdp = eocd; - } - - if (memcmp(cdp, EOCD64_MAGIC, 4) != 0) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - cdp += 4; - - size = _zip_read8(&cdp); - - if ((flags & ZIP_CHECKCONS) && size+eocd_offset+12 != (zip_uint64_t)(buf_offset+(eocd64loc-buf))) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - - cdp += 4; /* skip version made by/needed */ - cdp += 8; /* skip num disks */ - - nentry = _zip_read8(&cdp); - i = _zip_read8(&cdp); - - if (nentry != i) { - _zip_error_set(error, ZIP_ER_MULTIDISK, 0); - return NULL; - } - - size = _zip_read8(&cdp); - offset = _zip_read8(&cdp); - - if (size > ZIP_OFF_MAX || offset > ZIP_OFF_MAX || offset+size > ZIP_OFF_MAX) { - _zip_error_set(error, ZIP_ER_SEEK, EFBIG); - return NULL; - } - if ((flags & ZIP_CHECKCONS) && offset+size != eocd_offset) { - _zip_error_set(error, ZIP_ER_INCONS, 0); - return NULL; - } - - if ((cd=_zip_cdir_new(nentry, error)) == NULL) - return NULL; - - - cd->size = (off_t)size; - cd->offset = (off_t)offset; - - return cd; -} diff --git a/build/premake/premake5/contrib/libzip/zip_rename.c b/build/premake/premake5/contrib/libzip/zip_rename.c deleted file mode 100644 index 8841caeca9..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_rename.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - zip_rename.c -- rename file in zip archive - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -ZIP_EXTERN int -zip_rename(struct zip *za, zip_uint64_t idx, const char *name) -{ - return zip_file_rename(za, idx, name, 0); -} diff --git a/build/premake/premake5/contrib/libzip/zip_replace.c b/build/premake/premake5/contrib/libzip/zip_replace.c deleted file mode 100644 index de717afec7..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_replace.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - zip_replace.c -- replace file via callback function - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -ZIP_EXTERN int -zip_replace(struct zip *za, zip_uint64_t idx, struct zip_source *source) -{ - return zip_file_replace(za, idx, source, 0); -} diff --git a/build/premake/premake5/contrib/libzip/zip_set_archive_comment.c b/build/premake/premake5/contrib/libzip/zip_set_archive_comment.c deleted file mode 100644 index df1caee06b..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_set_archive_comment.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - zip_set_archive_comment.c -- set archive comment - Copyright (C) 2006-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_set_archive_comment(struct zip *za, const char *comment, zip_uint16_t len) -{ - struct zip_string *cstr; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (len > 0 && comment == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (len > 0) { - if ((cstr=_zip_string_new((const zip_uint8_t *)comment, len, ZIP_FL_ENC_GUESS, &za->error)) == NULL) - return -1; - - if (_zip_guess_encoding(cstr, ZIP_ENCODING_UNKNOWN) == ZIP_ENCODING_CP437) { - _zip_string_free(cstr); - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - } - else - cstr = NULL; - - _zip_string_free(za->comment_changes); - za->comment_changes = NULL; - - if (((za->comment_orig && _zip_string_equal(za->comment_orig, cstr)) - || (za->comment_orig == NULL && cstr == NULL))) { - _zip_string_free(cstr); - za->comment_changed = 0; - } - else { - za->comment_changes = cstr; - za->comment_changed = 1; - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_set_archive_flag.c b/build/premake/premake5/contrib/libzip/zip_set_archive_flag.c deleted file mode 100644 index 68f99b8568..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_set_archive_flag.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - zip_get_archive_flag.c -- set archive global flag - Copyright (C) 2008-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_set_archive_flag(struct zip *za, zip_flags_t flag, int value) -{ - unsigned int new_flags; - - if (value) - new_flags = za->ch_flags | flag; - else - new_flags = za->ch_flags & ~flag; - - if (new_flags == za->ch_flags) - return 0; - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if ((flag & ZIP_AFL_RDONLY) && value - && (za->ch_flags & ZIP_AFL_RDONLY) == 0) { - if (_zip_changed(za, NULL)) { - _zip_error_set(&za->error, ZIP_ER_CHANGED, 0); - return -1; - } - } - - za->ch_flags = new_flags; - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_set_default_password.c b/build/premake/premake5/contrib/libzip/zip_set_default_password.c deleted file mode 100644 index b9aa80acff..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_set_default_password.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - zip_set_default_password.c -- set default password for decryption - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_set_default_password(struct zip *za, const char *passwd) -{ - if (za == NULL) - return -1; - - if (za->default_password) - free(za->default_password); - - if (passwd) { - if ((za->default_password=strdup(passwd)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - } - else - za->default_password = NULL; - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_set_file_comment.c b/build/premake/premake5/contrib/libzip/zip_set_file_comment.c deleted file mode 100644 index 7acd0eb36d..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_set_file_comment.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - zip_set_file_comment.c -- set comment for file in archive - Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#define _ZIP_COMPILING_DEPRECATED -#include "zipint.h" - - - -ZIP_EXTERN int -zip_set_file_comment(struct zip *za, zip_uint64_t idx, const char *comment, int len) -{ - if (len < 0 || len > ZIP_UINT16_MAX) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - return zip_file_set_comment(za, idx, comment, (zip_uint16_t)len, 0); -} diff --git a/build/premake/premake5/contrib/libzip/zip_set_file_compression.c b/build/premake/premake5/contrib/libzip/zip_set_file_compression.c deleted file mode 100644 index 647f69a68f..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_set_file_compression.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - zip_set_file_compression.c -- set compression for file in archive - Copyright (C) 2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_set_file_compression(struct zip *za, zip_uint64_t idx, - zip_int32_t method, zip_uint32_t flags) -{ - struct zip_entry *e; - zip_int32_t old_method; - - if (idx >= za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (method != ZIP_CM_DEFAULT && method != ZIP_CM_STORE && method != ZIP_CM_DEFLATE) { - _zip_error_set(&za->error, ZIP_ER_COMPNOTSUPP, 0); - return -1; - } - - e = za->entry+idx; - - old_method = (e->orig == NULL ? ZIP_CM_DEFAULT : e->orig->comp_method); - - /* TODO: revisit this when flags are supported, since they may require a recompression */ - - if (method == old_method) { - if (e->changes) { - e->changes->changed &= ~ZIP_DIRENT_COMP_METHOD; - if (e->changes->changed == 0) { - _zip_dirent_free(e->changes); - e->changes = NULL; - } - } - } - else { - if (e->changes == NULL) { - if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return -1; - } - } - - e->changes->comp_method = method; - e->changes->changed |= ZIP_DIRENT_COMP_METHOD; - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_set_name.c b/build/premake/premake5/contrib/libzip/zip_set_name.c deleted file mode 100644 index 02fa1272d6..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_set_name.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - zip_set_name.c -- rename helper function - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - -int -_zip_set_name(struct zip *za, zip_uint64_t idx, const char *name, zip_flags_t flags) -{ - struct zip_entry *e; - struct zip_string *str; - int changed; - zip_int64_t i; - - if (idx >= za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (ZIP_IS_RDONLY(za)) { - _zip_error_set(&za->error, ZIP_ER_RDONLY, 0); - return -1; - } - - if (name && strlen(name) > 0) { - /* TODO: check for string too long */ - if ((str=_zip_string_new((const zip_uint8_t *)name, (zip_uint16_t)strlen(name), flags, &za->error)) == NULL) - return -1; - if ((flags & ZIP_FL_ENCODING_ALL) == ZIP_FL_ENC_GUESS && _zip_guess_encoding(str, ZIP_ENCODING_UNKNOWN) == ZIP_ENCODING_UTF8_GUESSED) - str->encoding = ZIP_ENCODING_UTF8_KNOWN; - } - else - str = NULL; - - /* TODO: encoding flags needed for CP437? */ - if ((i=_zip_name_locate(za, name, 0, NULL)) >= 0 && (zip_uint64_t)i != idx) { - _zip_string_free(str); - _zip_error_set(&za->error, ZIP_ER_EXISTS, 0); - return -1; - } - - /* no effective name change */ - if (i>=0 && (zip_uint64_t)i == idx) { - _zip_string_free(str); - return 0; - } - - e = za->entry+idx; - - if (e->changes) { - _zip_string_free(e->changes->filename); - e->changes->filename = NULL; - e->changes->changed &= ~ZIP_DIRENT_FILENAME; - } - - if (e->orig) - changed = !_zip_string_equal(e->orig->filename, str); - else - changed = 1; - - if (changed) { - if (e->changes == NULL) { - if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - _zip_string_free(str); - return -1; - } - } - e->changes->filename = str; - e->changes->changed |= ZIP_DIRENT_FILENAME; - } - else { - _zip_string_free(str); - if (e->changes && e->changes->changed == 0) { - _zip_dirent_free(e->changes); - e->changes = NULL; - } - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_buffer.c b/build/premake/premake5/contrib/libzip/zip_source_buffer.c deleted file mode 100644 index aecde55ed1..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_buffer.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - zip_source_buffer.c -- create zip data source from buffer - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - -struct read_data { - const char *buf, *data, *end; - time_t mtime; - int freep; -}; - -static zip_int64_t read_data(void *, void *, zip_uint64_t, enum zip_source_cmd); - - - -ZIP_EXTERN struct zip_source * -zip_source_buffer(struct zip *za, const void *data, zip_uint64_t len, int freep) -{ - struct read_data *f; - struct zip_source *zs; - - if (za == NULL) - return NULL; - - if (data == NULL && len > 0) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((f=(struct read_data *)malloc(sizeof(*f))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - f->data = (const char *)data; - f->end = ((const char *)data)+len; - f->freep = freep; - f->mtime = time(NULL); - - if ((zs=zip_source_function(za, read_data, f)) == NULL) { - free(f); - return NULL; - } - - return zs; -} - - - -static zip_int64_t -read_data(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct read_data *z; - char *buf; - zip_uint64_t n; - - z = (struct read_data *)state; - buf = (char *)data; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - z->buf = z->data; - return 0; - - case ZIP_SOURCE_READ: - n = (zip_uint64_t)(z->end - z->buf); - if (n > len) - n = len; - - if (n) { - memcpy(buf, z->buf, (size_t)n); - z->buf += n; - } - - return (zip_int64_t)n; - - case ZIP_SOURCE_CLOSE: - return 0; - - case ZIP_SOURCE_STAT: - { - struct zip_stat *st; - - if (len < sizeof(*st)) - return -1; - - st = (struct zip_stat *)data; - - zip_stat_init(st); - st->mtime = z->mtime; - st->size = (zip_uint64_t)(z->end - z->data); - st->comp_size = st->size; - st->comp_method = ZIP_CM_STORE; - st->encryption_method = ZIP_EM_NONE; - st->valid = ZIP_STAT_MTIME|ZIP_STAT_SIZE|ZIP_STAT_COMP_SIZE - |ZIP_STAT_COMP_METHOD|ZIP_STAT_ENCRYPTION_METHOD; - - return sizeof(*st); - } - - case ZIP_SOURCE_ERROR: - { - int *e; - - if (len < sizeof(int)*2) - return -1; - - e = (int *)data; - e[0] = e[1] = 0; - } - return sizeof(int)*2; - - case ZIP_SOURCE_FREE: - if (z->freep) { - free((void *)z->data); - z->data = NULL; - } - free(z); - return 0; - - default: - ; - } - - return -1; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_close.c b/build/premake/premake5/contrib/libzip/zip_source_close.c deleted file mode 100644 index 7b89d5fc15..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_close.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - zip_source_close.c -- close zip_source (stop reading) - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -void -zip_source_close(struct zip_source *src) -{ - if (!src->is_open) - return; - - if (src->src == NULL) - (void)src->cb.f(src->ud, NULL, 0, ZIP_SOURCE_CLOSE); - else { - (void)src->cb.l(src->src, src->ud, NULL, 0, ZIP_SOURCE_CLOSE); - zip_source_close(src->src); - } - - src->is_open = 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_crc.c b/build/premake/premake5/contrib/libzip/zip_source_crc.c deleted file mode 100644 index 7d6df6a385..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_crc.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - zip_source_crc.c -- pass-through source that calculates CRC32 and size - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - -struct crc_context { - int eof; - int validate; - int e[2]; - zip_uint64_t size; - zip_uint32_t crc; -}; - -static zip_int64_t crc_read(struct zip_source *, void *, void * - , zip_uint64_t, enum zip_source_cmd); - - - -struct zip_source * -zip_source_crc(struct zip *za, struct zip_source *src, int validate) -{ - struct crc_context *ctx; - - if (src == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((ctx=(struct crc_context *)malloc(sizeof(*ctx))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - ctx->eof = 0; - ctx->validate = validate; - ctx->e[0] = ctx->e[1] = 0; - ctx->size = 0; - ctx->crc = 0; - - return zip_source_layered(za, src, crc_read, ctx); -} - - - -static zip_int64_t -crc_read(struct zip_source *src, void *_ctx, void *data, - zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct crc_context *ctx; - zip_int64_t n; - - ctx = (struct crc_context *)_ctx; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - ctx->eof = 0; - ctx->crc = (zip_uint32_t)crc32(0, NULL, 0); - ctx->size = 0; - - return 0; - - case ZIP_SOURCE_READ: - if (ctx->eof || len == 0) - return 0; - - if ((n=zip_source_read(src, data, len)) < 0) - return ZIP_SOURCE_ERR_LOWER; - - if (n == 0) { - ctx->eof = 1; - if (ctx->validate) { - struct zip_stat st; - - if (zip_source_stat(src, &st) < 0) - return ZIP_SOURCE_ERR_LOWER; - - if ((st.valid & ZIP_STAT_CRC) && st.crc != ctx->crc) { - ctx->e[0] = ZIP_ER_CRC; - ctx->e[1] = 0; - - return -1; - } - if ((st.valid & ZIP_STAT_SIZE) && st.size != ctx->size) { - ctx->e[0] = ZIP_ER_INCONS; - ctx->e[1] = 0; - - return -1; - } - } - } - else { - ctx->size += (zip_uint64_t)n; - ctx->crc = (zip_uint32_t)crc32(ctx->crc, (const Bytef *)data, (uInt)n); /* TODO: check for overflow, use multiple crc calls if needed */ - } - return n; - - case ZIP_SOURCE_CLOSE: - return 0; - - case ZIP_SOURCE_STAT: - { - struct zip_stat *st; - - st = (struct zip_stat *)data; - - if (ctx->eof) { - /* TODO: Set comp_size, comp_method, encryption_method? - After all, this only works for uncompressed data. */ - st->size = ctx->size; - st->crc = ctx->crc; - st->comp_size = ctx->size; - st->comp_method = ZIP_CM_STORE; - st->encryption_method = ZIP_EM_NONE; - st->valid |= ZIP_STAT_SIZE|ZIP_STAT_CRC|ZIP_STAT_COMP_SIZE|ZIP_STAT_COMP_METHOD|ZIP_STAT_ENCRYPTION_METHOD;; - } - } - return 0; - - case ZIP_SOURCE_ERROR: - memcpy(data, ctx->e, sizeof(ctx->e)); - return 0; - - case ZIP_SOURCE_FREE: - free(ctx); - return 0; - - default: - return -1; - } - -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_deflate.c b/build/premake/premake5/contrib/libzip/zip_source_deflate.c deleted file mode 100644 index 57444d9677..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_deflate.c +++ /dev/null @@ -1,392 +0,0 @@ -/* - zip_source_deflate.c -- deflate (de)compressoin routines - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - -struct deflate { - int e[2]; - - int eof; - int mem_level; - zip_uint64_t size; - char buffer[BUFSIZE]; - z_stream zstr; -}; - -static zip_int64_t compress_read(struct zip_source *, struct deflate *, - void *, zip_uint64_t); -static zip_int64_t decompress_read(struct zip_source *, struct deflate *, - void *, zip_uint64_t); -static zip_int64_t deflate_compress(struct zip_source *, void *, void *, - zip_uint64_t, enum zip_source_cmd); -static zip_int64_t deflate_decompress(struct zip_source *, void *, void *, - zip_uint64_t, enum zip_source_cmd); -static void deflate_free(struct deflate *); - - - -struct zip_source * -zip_source_deflate(struct zip *za, struct zip_source *src, - zip_int32_t cm, int flags) -{ - struct deflate *ctx; - struct zip_source *s2; - - if (src == NULL || (cm != ZIP_CM_DEFLATE && !ZIP_CM_IS_DEFAULT(cm))) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((ctx=(struct deflate *)malloc(sizeof(*ctx))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - ctx->e[0] = ctx->e[1] = 0; - ctx->eof = 0; - if (flags & ZIP_CODEC_ENCODE) { - if (zip_get_archive_flag(za, ZIP_AFL_TORRENT, 0)) - ctx->mem_level = TORRENT_MEM_LEVEL; - else - ctx->mem_level = MAX_MEM_LEVEL; - } - - if ((s2=zip_source_layered(za, src, - ((flags & ZIP_CODEC_ENCODE) - ? deflate_compress : deflate_decompress), - ctx)) == NULL) { - deflate_free(ctx); - return NULL; - } - - return s2; -} - - - -static zip_int64_t -compress_read(struct zip_source *src, struct deflate *ctx, - void *data, zip_uint64_t len) -{ - int end, ret; - zip_int64_t n; - - if (ctx->e[0] != 0) - return -1; - - if (len == 0) - return 0; - - ctx->zstr.next_out = (Bytef *)data; - ctx->zstr.avail_out = (uInt)len; /* TODO: check for overflow */ - - end = 0; - while (!end) { - ret = deflate(&ctx->zstr, ctx->eof ? Z_FINISH : 0); - - switch (ret) { - case Z_OK: - case Z_STREAM_END: - /* all ok */ - - if (ctx->zstr.avail_out == 0 - || (ctx->eof && ctx->zstr.avail_in == 0)) - end = 1; - break; - - case Z_BUF_ERROR: - if (ctx->zstr.avail_in == 0) { - if (ctx->eof) { - end = 1; - break; - } - - if ((n=zip_source_read(src, ctx->buffer, sizeof(ctx->buffer))) < 0) { - zip_source_error(src, ctx->e, ctx->e+1); - end = 1; - break; - } - else if (n == 0) { - ctx->eof = 1; - ctx->size = ctx->zstr.total_in; - /* TODO: check against stat of src? */ - } - else { - ctx->zstr.next_in = (Bytef *)ctx->buffer; - ctx->zstr.avail_in = (uInt)n; - } - continue; - } - /* fallthrough */ - case Z_NEED_DICT: - case Z_DATA_ERROR: - case Z_STREAM_ERROR: - case Z_MEM_ERROR: - ctx->e[0] = ZIP_ER_ZLIB; - ctx->e[1] = ret; - - end = 1; - break; - } - } - - if (ctx->zstr.avail_out < len) - return (zip_int64_t)(len - ctx->zstr.avail_out); - - return (ctx->e[0] == 0) ? 0 : -1; -} - - - -static zip_int64_t -decompress_read(struct zip_source *src, struct deflate *ctx, - void *data, zip_uint64_t len) -{ - int end, ret; - zip_int64_t n; - - if (ctx->e[0] != 0) - return -1; - - if (len == 0) - return 0; - - ctx->zstr.next_out = (Bytef *)data; - ctx->zstr.avail_out = (uInt)len; /* TODO: check for overflow */ - - end = 0; - while (!end && ctx->zstr.avail_out) { - ret = inflate(&ctx->zstr, Z_SYNC_FLUSH); - - switch (ret) { - case Z_OK: - break; - - case Z_STREAM_END: - ctx->eof = 1; - end = 1; - break; - - case Z_BUF_ERROR: - if (ctx->zstr.avail_in == 0) { - if (ctx->eof) { - end = 1; - break; - } - - if ((n=zip_source_read(src, ctx->buffer, sizeof(ctx->buffer))) < 0) { - zip_source_error(src, ctx->e, ctx->e+1); - end = 1; - break; - } - else if (n == 0) - ctx->eof = 1; - else { - ctx->zstr.next_in = (Bytef *)ctx->buffer; - ctx->zstr.avail_in = (uInt)n; - } - continue; - } - /* fallthrough */ - case Z_NEED_DICT: - case Z_DATA_ERROR: - case Z_STREAM_ERROR: - case Z_MEM_ERROR: - ctx->e[0] = ZIP_ER_ZLIB; - ctx->e[1] = ret; - end = 1; - break; - } - } - - if (ctx->zstr.avail_out < len) - return (zip_int64_t)(len - ctx->zstr.avail_out); - - return (ctx->e[0] == 0) ? 0 : -1; -} - - - -static zip_int64_t -deflate_compress(struct zip_source *src, void *ud, void *data, - zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct deflate *ctx; - int ret; - - ctx = (struct deflate *)ud; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - ctx->zstr.zalloc = Z_NULL; - ctx->zstr.zfree = Z_NULL; - ctx->zstr.opaque = NULL; - ctx->zstr.avail_in = 0; - ctx->zstr.next_in = NULL; - ctx->zstr.avail_out = 0; - ctx->zstr.next_out = NULL; - - /* negative value to tell zlib not to write a header */ - if ((ret=deflateInit2(&ctx->zstr, Z_BEST_COMPRESSION, Z_DEFLATED, - -MAX_WBITS, ctx->mem_level, - Z_DEFAULT_STRATEGY)) != Z_OK) { - ctx->e[0] = ZIP_ER_ZLIB; - ctx->e[1] = ret; - return -1; - } - - return 0; - - case ZIP_SOURCE_READ: - return compress_read(src, ctx, data, len); - - case ZIP_SOURCE_CLOSE: - deflateEnd(&ctx->zstr); - return 0; - - case ZIP_SOURCE_STAT: - { - struct zip_stat *st; - - st = (struct zip_stat *)data; - - st->comp_method = ZIP_CM_DEFLATE; - st->valid |= ZIP_STAT_COMP_METHOD; - if (ctx->eof) { - st->comp_size = ctx->size; - st->valid |= ZIP_STAT_COMP_SIZE; - } - else - st->valid &= ~ZIP_STAT_COMP_SIZE; - } - return 0; - - case ZIP_SOURCE_ERROR: - memcpy(data, ctx->e, sizeof(int)*2); - return sizeof(int)*2; - - case ZIP_SOURCE_FREE: - deflate_free(ctx); - return 0; - - default: - ctx->e[0] = ZIP_ER_INVAL; - ctx->e[1] = 0; - return -1; - } -} - - - -static zip_int64_t -deflate_decompress(struct zip_source *src, void *ud, void *data, - zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct deflate *ctx; - zip_int64_t n; - int ret; - - ctx = (struct deflate *)ud; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - if ((n=zip_source_read(src, ctx->buffer, sizeof(ctx->buffer))) < 0) - return ZIP_SOURCE_ERR_LOWER; - - ctx->zstr.zalloc = Z_NULL; - ctx->zstr.zfree = Z_NULL; - ctx->zstr.opaque = NULL; - ctx->zstr.next_in = (Bytef *)ctx->buffer; - ctx->zstr.avail_in = (uInt)n /* TODO: check for overflow */; - - /* negative value to tell zlib that there is no header */ - if ((ret=inflateInit2(&ctx->zstr, -MAX_WBITS)) != Z_OK) { - ctx->e[0] = ZIP_ER_ZLIB; - ctx->e[1] = ret; - - return -1; - } - return 0; - - case ZIP_SOURCE_READ: - return decompress_read(src, ctx, data, len); - - case ZIP_SOURCE_CLOSE: - inflateEnd(&ctx->zstr); - return 0; - - case ZIP_SOURCE_STAT: - { - struct zip_stat *st; - - st = (struct zip_stat *)data; - - st->comp_method = ZIP_CM_STORE; - if (st->comp_size > 0 && st->size > 0) - st->comp_size = st->size; - } - return 0; - - case ZIP_SOURCE_ERROR: - if (len < sizeof(int)*2) - return -1; - - memcpy(data, ctx->e, sizeof(int)*2); - return sizeof(int)*2; - - case ZIP_SOURCE_FREE: - /* TODO: inflateEnd if close was not called */ - free(ctx); - return 0; - - default: - ctx->e[0] = ZIP_ER_INVAL; - ctx->e[1] = 0; - return -1; - } - -} - - - -static void -deflate_free(struct deflate *ctx) -{ - /* TODO: deflateEnd if close was not called */ - free(ctx); -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_error.c b/build/premake/premake5/contrib/libzip/zip_source_error.c deleted file mode 100644 index a1efd551ea..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_error.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - zip_source_error.c -- get last error from zip_source - Copyright (C) 2009-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -void -zip_source_error(struct zip_source *src, int *ze, int *se) -{ - int e[2]; - - if (src->src == NULL) { - if (src->cb.f(src->ud, e, sizeof(e), ZIP_SOURCE_ERROR) < 0) { - e[0] = ZIP_ER_INTERNAL; - e[1] = 0; - } - } - else { - switch (src->error_source) { - case ZIP_LES_NONE: - e[0] = e[1] = 0; - break; - - case ZIP_LES_INVAL: - e[0] = ZIP_ER_INVAL; - e[1] = 0; - break; - - case ZIP_LES_LOWER: - zip_source_error(src->src, ze, se); - return; - - case ZIP_LES_UPPER: - if (src->cb.l(src->src, src->ud, e, sizeof(e), ZIP_SOURCE_ERROR) < 0) { - e[0] = ZIP_ER_INTERNAL; - e[1] = 0; - } - break; - - default: - e[0] = ZIP_ER_INTERNAL; - e[1] = 0; - break; - } - } - - if (ze) - *ze = e[0]; - if (se) - *se = e[1]; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_file.c b/build/premake/premake5/contrib/libzip/zip_source_file.c deleted file mode 100644 index 79c8ee5aca..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_file.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - zip_source_file.c -- create data source from file - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - -ZIP_EXTERN struct zip_source * -zip_source_file(struct zip *za, const char *fname, zip_uint64_t start, - zip_int64_t len) -{ - if (za == NULL) - return NULL; - - if (fname == NULL || len < -1) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - return _zip_source_file_or_p(za, fname, NULL, start, len, 1, NULL); -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_filep.c b/build/premake/premake5/contrib/libzip/zip_source_filep.c deleted file mode 100644 index fcebe73bc6..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_filep.c +++ /dev/null @@ -1,251 +0,0 @@ -/* - zip_source_filep.c -- create data source from FILE * - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include -#include -#include -#include - -#include "zipint.h" - -struct read_file { - char *fname; /* name of file to copy from */ - FILE *f; /* file to copy from */ - int closep; /* close f */ - struct zip_stat st; /* stat information passed in */ - - zip_uint64_t off; /* start offset of */ - zip_int64_t len; /* length of data to copy */ - zip_int64_t remain; /* bytes remaining to be copied */ - int e[2]; /* error codes */ -}; - -static zip_int64_t read_file(void *state, void *data, zip_uint64_t len, - enum zip_source_cmd cmd); - - - -ZIP_EXTERN struct zip_source * -zip_source_filep(struct zip *za, FILE *file, zip_uint64_t start, - zip_int64_t len) -{ - if (za == NULL) - return NULL; - - if (file == NULL || len < -1) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - return _zip_source_file_or_p(za, NULL, file, start, len, 1, NULL); -} - - - -struct zip_source * -_zip_source_file_or_p(struct zip *za, const char *fname, FILE *file, - zip_uint64_t start, zip_int64_t len, int closep, - const struct zip_stat *st) -{ - struct read_file *f; - struct zip_source *zs; - - if (file == NULL && fname == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((f=(struct read_file *)malloc(sizeof(struct read_file))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - f->fname = NULL; - if (fname) { - if ((f->fname=strdup(fname)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - free(f); - return NULL; - } - } - f->f = file; - f->off = start; - f->len = (len ? len : -1); - f->closep = f->fname ? 1 : closep; - if (st) - memcpy(&f->st, st, sizeof(f->st)); - else - zip_stat_init(&f->st); - - if ((zs=zip_source_function(za, read_file, f)) == NULL) { - free(f); - return NULL; - } - - return zs; -} - - - -static zip_int64_t -read_file(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct read_file *z; - char *buf; - zip_uint64_t n; - size_t i; - - z = (struct read_file *)state; - buf = (char *)data; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - if (z->fname) { - if ((z->f=fopen(z->fname, "rb")) == NULL) { - z->e[0] = ZIP_ER_OPEN; - z->e[1] = errno; - return -1; - } - } - - if (z->closep && z->off > 0) { - if (fseeko(z->f, (off_t)z->off, SEEK_SET) < 0) { - z->e[0] = ZIP_ER_SEEK; - z->e[1] = errno; - return -1; - } - } - z->remain = z->len; - return 0; - - case ZIP_SOURCE_READ: - if (z->remain != -1) - n = len > (zip_uint64_t)z->remain ? (zip_uint64_t)z->remain : len; - else - n = len; - - if (n > SIZE_MAX) - n = SIZE_MAX; - - if (!z->closep) { - /* we might share this file with others, so let's be safe */ - if (fseeko(z->f, (off_t)(z->off + (zip_uint64_t)(z->len-z->remain)), SEEK_SET) < 0) { - z->e[0] = ZIP_ER_SEEK; - z->e[1] = errno; - return -1; - } - } - - if ((i=fread(buf, 1, (size_t)n, z->f)) == 0) { - if (ferror(z->f)) { - z->e[0] = ZIP_ER_READ; - z->e[1] = errno; - return -1; - } - } - - if (z->remain != -1) - z->remain -= i; - - return (zip_int64_t)i; - - case ZIP_SOURCE_CLOSE: - if (z->fname) { - fclose(z->f); - z->f = NULL; - } - return 0; - - case ZIP_SOURCE_STAT: - { - if (len < sizeof(z->st)) - return -1; - - if (z->st.valid != 0) - memcpy(data, &z->st, sizeof(z->st)); - else { - struct zip_stat *st; - struct stat fst; - int err; - - if (z->f) - err = fstat(fileno(z->f), &fst); - else - err = stat(z->fname, &fst); - - if (err != 0) { - z->e[0] = ZIP_ER_READ; /* best match */ - z->e[1] = errno; - return -1; - } - - st = (struct zip_stat *)data; - - zip_stat_init(st); - st->mtime = fst.st_mtime; - st->valid |= ZIP_STAT_MTIME; - if (z->len != -1) { - st->size = (zip_uint64_t)z->len; - st->valid |= ZIP_STAT_SIZE; - } - else if ((fst.st_mode&S_IFMT) == S_IFREG) { - st->size = (zip_uint64_t)fst.st_size; - st->valid |= ZIP_STAT_SIZE; - } - } - return sizeof(z->st); - } - - case ZIP_SOURCE_ERROR: - if (len < sizeof(int)*2) - return -1; - - memcpy(data, z->e, sizeof(int)*2); - return sizeof(int)*2; - - case ZIP_SOURCE_FREE: - free(z->fname); - if (z->closep && z->f) - fclose(z->f); - free(z); - return 0; - - default: - ; - } - - return -1; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_free.c b/build/premake/premake5/contrib/libzip/zip_source_free.c deleted file mode 100644 index b1e7840496..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_free.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - zip_source_free.c -- free zip data source - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN void -zip_source_free(struct zip_source *src) -{ - if (src == NULL) - return; - - if (src->is_open) - zip_source_close(src); - - if (src->src == NULL) - (void)src->cb.f(src->ud, NULL, 0, ZIP_SOURCE_FREE); - else { - (void)src->cb.l(src->src, src->ud, NULL, 0, ZIP_SOURCE_FREE); - zip_source_free(src->src); - } - - free(src); -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_function.c b/build/premake/premake5/contrib/libzip/zip_source_function.c deleted file mode 100644 index cb92e339b4..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_function.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - zip_source_function.c -- create zip data source from callback function - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN struct zip_source * -zip_source_function(struct zip *za, zip_source_callback zcb, void *ud) -{ - struct zip_source *zs; - - if (za == NULL) - return NULL; - - if ((zs=_zip_source_new(za)) == NULL) - return NULL; - - zs->cb.f = zcb; - zs->ud = ud; - - return zs; -} - - - -struct zip_source * -_zip_source_new(struct zip *za) -{ - struct zip_source *src; - - if ((src=(struct zip_source *)malloc(sizeof(*src))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - src->src = NULL; - src->cb.f = NULL; - src->ud = NULL; - src->error_source = ZIP_LES_NONE; - src->is_open = 0; - - return src; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_layered.c b/build/premake/premake5/contrib/libzip/zip_source_layered.c deleted file mode 100644 index ad2870333c..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_layered.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - zip_source_layered.c -- create layered source - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -struct zip_source * -zip_source_layered(struct zip *za, struct zip_source *src, - zip_source_layered_callback cb, void *ud) -{ - struct zip_source *zs; - - if (za == NULL) - return NULL; - - if ((zs=_zip_source_new(za)) == NULL) - return NULL; - - zs->src = src; - zs->cb.l = cb; - zs->ud = ud; - - return zs; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_open.c b/build/premake/premake5/contrib/libzip/zip_source_open.c deleted file mode 100644 index a5010393e7..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_open.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - zip_source_open.c -- open zip_source (prepare for reading) - Copyright (C) 2009-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -int -zip_source_open(struct zip_source *src) -{ - zip_int64_t ret; - - if (src->is_open) { - src->error_source = ZIP_LES_INVAL; - return -1; - } - - if (src->src == NULL) { - if (src->cb.f(src->ud, NULL, 0, ZIP_SOURCE_OPEN) < 0) - return -1; - } - else { - if (zip_source_open(src->src) < 0) { - src->error_source = ZIP_LES_LOWER; - return -1; - } - - ret = src->cb.l(src->src, src->ud, NULL, 0, ZIP_SOURCE_OPEN); - - if (ret < 0) { - zip_source_close(src->src); - - if (ret == ZIP_SOURCE_ERR_LOWER) - src->error_source = ZIP_LES_LOWER; - else - src->error_source = ZIP_LES_UPPER; - return -1; - } - } - - src->is_open = 1; - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_pkware.c b/build/premake/premake5/contrib/libzip/zip_source_pkware.c deleted file mode 100644 index f6cbf1d2d5..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_pkware.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - zip_source_pkware.c -- Traditional PKWARE de/encryption routines - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - -struct trad_pkware { - int e[2]; - - zip_uint32_t key[3]; -}; - -#define HEADERLEN 12 -#define KEY0 305419896 -#define KEY1 591751049 -#define KEY2 878082192 - - - -static void decrypt(struct trad_pkware *, zip_uint8_t *, - const zip_uint8_t *, zip_uint64_t, int); -static int decrypt_header(struct zip_source *, struct trad_pkware *); -static zip_int64_t pkware_decrypt(struct zip_source *, void *, void *, - zip_uint64_t, enum zip_source_cmd); -static void pkware_free(struct trad_pkware *); - - - -struct zip_source * -zip_source_pkware(struct zip *za, struct zip_source *src, - zip_uint16_t em, int flags, const char *password) -{ - struct trad_pkware *ctx; - struct zip_source *s2; - - if (password == NULL || src == NULL || em != ZIP_EM_TRAD_PKWARE) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - if (flags & ZIP_CODEC_ENCODE) { - _zip_error_set(&za->error, ZIP_ER_ENCRNOTSUPP, 0); - return NULL; - } - - if ((ctx=(struct trad_pkware *)malloc(sizeof(*ctx))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - ctx->e[0] = ctx->e[1] = 0; - - ctx->key[0] = KEY0; - ctx->key[1] = KEY1; - ctx->key[2] = KEY2; - decrypt(ctx, NULL, (const zip_uint8_t *)password, strlen(password), 1); - - if ((s2=zip_source_layered(za, src, pkware_decrypt, ctx)) == NULL) { - pkware_free(ctx); - return NULL; - } - - return s2; -} - - - -static void -decrypt(struct trad_pkware *ctx, zip_uint8_t *out, const zip_uint8_t *in, - zip_uint64_t len, int update_only) -{ - zip_uint16_t tmp; - zip_uint64_t i; - Bytef b; - - for (i=0; ikey[2] | 2); - tmp = (tmp * (tmp ^ 1)) >> 8; - b ^= tmp; - } - - /* store cleartext */ - if (out) - out[i] = b; - - /* update keys */ - ctx->key[0] = (zip_uint32_t)crc32(ctx->key[0] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; - ctx->key[1] = (ctx->key[1] + (ctx->key[0] & 0xff)) * 134775813 + 1; - b = ctx->key[1] >> 24; - ctx->key[2] = (zip_uint32_t)crc32(ctx->key[2] ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL; - } -} - - - -static int -decrypt_header(struct zip_source *src, struct trad_pkware *ctx) -{ - zip_uint8_t header[HEADERLEN]; - struct zip_stat st; - zip_int64_t n; - unsigned short dostime, dosdate; - - if ((n=zip_source_read(src, header, HEADERLEN)) < 0) { - zip_source_error(src, ctx->e, ctx->e+1); - return -1; - } - - if (n != HEADERLEN) { - ctx->e[0] = ZIP_ER_EOF; - ctx->e[1] = 0; - return -1; - } - - decrypt(ctx, header, header, HEADERLEN, 0); - - if (zip_source_stat(src, &st) < 0) { - /* stat failed, skip password validation */ - return 0; - } - - _zip_u2d_time(st.mtime, &dostime, &dosdate); - - if (header[HEADERLEN-1] != st.crc>>24 - && header[HEADERLEN-1] != dostime>>8) { - ctx->e[0] = ZIP_ER_WRONGPASSWD; - ctx->e[1] = 0; - return -1; - } - - return 0; -} - - - -static zip_int64_t -pkware_decrypt(struct zip_source *src, void *ud, void *data, - zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct trad_pkware *ctx; - zip_int64_t n; - - ctx = (struct trad_pkware *)ud; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - if (decrypt_header(src, ctx) < 0) - return -1; - return 0; - - case ZIP_SOURCE_READ: - if ((n=zip_source_read(src, data, len)) < 0) - return ZIP_SOURCE_ERR_LOWER; - - decrypt((struct trad_pkware *)ud, (zip_uint8_t *)data, (zip_uint8_t *)data, (zip_uint64_t)n, - 0); - return n; - - case ZIP_SOURCE_CLOSE: - return 0; - - case ZIP_SOURCE_STAT: - { - struct zip_stat *st; - - st = (struct zip_stat *)data; - - st->encryption_method = ZIP_EM_NONE; - st->valid |= ZIP_STAT_ENCRYPTION_METHOD; - /* TODO: deduce HEADERLEN from size for uncompressed */ - if (st->valid & ZIP_STAT_COMP_SIZE) - st->comp_size -= HEADERLEN; - } - return 0; - - case ZIP_SOURCE_ERROR: - memcpy(data, ctx->e, sizeof(int)*2); - return sizeof(int)*2; - - case ZIP_SOURCE_FREE: - pkware_free(ctx); - return 0; - - default: - ctx->e[0] = ZIP_ER_INVAL; - ctx->e[1] = 0; - return -1; - } -} - - - -static void -pkware_free(struct trad_pkware *ctx) -{ - free(ctx); -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_pop.c b/build/premake/premake5/contrib/libzip/zip_source_pop.c deleted file mode 100644 index cd9cb529b5..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_pop.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - zip_source_pop.c -- pop top layer from zip data source - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -struct zip_source * -zip_source_pop(struct zip_source *src) -{ - struct zip_source *lower; - - if (src == NULL) - return NULL; - - lower = src->src; - - if (lower == NULL) - zip_source_free(src); - else { - if (src->is_open) - (void)src->cb.l(src, src->ud, NULL, 0, ZIP_SOURCE_CLOSE); - (void)src->cb.l(src, src->ud, NULL, 0, ZIP_SOURCE_FREE); - - free(src); - } - - return lower; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_read.c b/build/premake/premake5/contrib/libzip/zip_source_read.c deleted file mode 100644 index 81b90ba42d..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_read.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - zip_source_read.c -- read data from zip_source - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -zip_int64_t -zip_source_read(struct zip_source *src, void *data, zip_uint64_t len) -{ - zip_int64_t ret; - - if (!src->is_open || len > ZIP_INT64_MAX || (len > 0 && data == NULL)) { - src->error_source = ZIP_LES_INVAL; - return -1; - } - - if (src->src == NULL) - return src->cb.f(src->ud, data, len, ZIP_SOURCE_READ); - - ret = src->cb.l(src->src, src->ud, data, len, ZIP_SOURCE_READ); - - if (ret < 0) { - if (ret == ZIP_SOURCE_ERR_LOWER) - src->error_source = ZIP_LES_LOWER; - else - src->error_source = ZIP_LES_UPPER; - return -1; - } - - return ret; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_stat.c b/build/premake/premake5/contrib/libzip/zip_source_stat.c deleted file mode 100644 index 85ae6a2fd6..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_stat.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - zip_source_stat.c -- get meta information from zip_source - Copyright (C) 2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -int -zip_source_stat(struct zip_source *src, struct zip_stat *st) -{ - zip_int64_t ret; - - if (st == NULL) { - src->error_source = ZIP_LES_INVAL; - return -1; - } - - if (src->src == NULL) { - if (src->cb.f(src->ud, st, sizeof(*st), ZIP_SOURCE_STAT) < 0) - return -1; - return 0; - } - - if (zip_source_stat(src->src, st) < 0) { - src->error_source = ZIP_LES_LOWER; - return -1; - } - - ret = src->cb.l(src->src, src->ud, st, sizeof(*st), ZIP_SOURCE_STAT); - - if (ret < 0) { - if (ret == ZIP_SOURCE_ERR_LOWER) - src->error_source = ZIP_LES_LOWER; - else - src->error_source = ZIP_LES_UPPER; - return -1; - } - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_window.c b/build/premake/premake5/contrib/libzip/zip_source_window.c deleted file mode 100644 index fd202099b5..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_window.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - zip_source_window.c -- return part of lower source - Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - -struct window { - zip_uint64_t skip; - zip_uint64_t len; - zip_uint64_t left; - int e[2]; -}; - -static zip_int64_t window_read(struct zip_source *, void *, void *, - zip_uint64_t, enum zip_source_cmd); - - - -struct zip_source * -zip_source_window(struct zip *za, struct zip_source *src, zip_uint64_t start, zip_uint64_t len) -{ - struct window *ctx; - - if (src == NULL) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((ctx=(struct window *)malloc(sizeof(*ctx))) == NULL) { - _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); - return NULL; - } - - ctx->skip = start; - ctx->len = len; - ctx->left = len; - - return zip_source_layered(za, src, window_read, ctx); -} - - - -static zip_int64_t -window_read(struct zip_source *src, void *_ctx, void *data, - zip_uint64_t len, enum zip_source_cmd cmd) -{ - struct window *ctx; - zip_int64_t ret; - zip_uint64_t n, i; - char b[8192]; - - ctx = (struct window *)_ctx; - - switch (cmd) { - case ZIP_SOURCE_OPEN: - for (n=0; nskip; n+=(zip_uint64_t)ret) { - i = (ctx->skip-n > sizeof(b) ? sizeof(b) : ctx->skip-n); - if ((ret=zip_source_read(src, b, i)) < 0) - return ZIP_SOURCE_ERR_LOWER; - if (ret==0) { - ctx->e[0] = ZIP_ER_EOF; - ctx->e[1] = 0; - return -1; - } - } - return 0; - - case ZIP_SOURCE_READ: - if (len > ctx->left) - len = ctx->left; - - if (len == 0) - return 0; - - if ((ret=zip_source_read(src, data, len)) < 0) - return ZIP_SOURCE_ERR_LOWER; - - ctx->left -= (zip_uint64_t)ret; - - if (ret == 0) { - if (ctx->left > 0) { - ctx->e[0] = ZIP_ER_EOF; - ctx->e[1] = 0; - return -1; - } - } - return ret; - - case ZIP_SOURCE_CLOSE: - return 0; - - case ZIP_SOURCE_STAT: - { - struct zip_stat *st; - - st = (struct zip_stat *)data; - - st->size = ctx->len; - st->valid |= ZIP_STAT_SIZE; - st->valid &= ~(ZIP_STAT_CRC|ZIP_STAT_COMP_SIZE); - } - return 0; - - case ZIP_SOURCE_ERROR: - memcpy(data, ctx->e, sizeof(ctx->e)); - return 0; - - case ZIP_SOURCE_FREE: - free(ctx); - return 0; - - default: - return -1; - } - -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_zip.c b/build/premake/premake5/contrib/libzip/zip_source_zip.c deleted file mode 100644 index e4fc2229f7..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_zip.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - zip_source_zip.c -- create data source from zip file - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - -ZIP_EXTERN struct zip_source * -zip_source_zip(struct zip *za, struct zip *srcza, zip_uint64_t srcidx, - zip_flags_t flags, zip_uint64_t start, zip_int64_t len) -{ - if (len < -1) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if (len == -1) - len = 0; - - if (start == 0 && len == 0) - flags |= ZIP_FL_COMPRESSED; - else - flags &= ~ZIP_FL_COMPRESSED; - - return _zip_source_zip_new(za, srcza, srcidx, flags, start, (zip_uint64_t)len, NULL); -} diff --git a/build/premake/premake5/contrib/libzip/zip_source_zip_new.c b/build/premake/premake5/contrib/libzip/zip_source_zip_new.c deleted file mode 100644 index 353489a653..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_source_zip_new.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - zip_source_zip_new.c -- prepare data structures for zip_fopen/zip_source_zip - Copyright (C) 2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -struct zip_source * -_zip_source_zip_new(struct zip *za, struct zip *srcza, zip_uint64_t srcidx, zip_flags_t flags, - zip_uint64_t start, zip_uint64_t len, const char *password) -{ - zip_compression_implementation comp_impl; - zip_encryption_implementation enc_impl; - struct zip_source *src, *s2; - zip_uint64_t offset; - struct zip_stat st; - - if (za == NULL) - return NULL; - - if (srcza == NULL || srcidx >= srcza->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((flags & ZIP_FL_UNCHANGED) == 0 - && (ZIP_ENTRY_DATA_CHANGED(srcza->entry+srcidx) || srcza->entry[srcidx].deleted)) { - _zip_error_set(&za->error, ZIP_ER_CHANGED, 0); - return NULL; - } - - if (zip_stat_index(srcza, srcidx, flags|ZIP_FL_UNCHANGED, &st) < 0) { - _zip_error_set(&za->error, ZIP_ER_INTERNAL, 0); - return NULL; - } - - if (flags & ZIP_FL_ENCRYPTED) - flags |= ZIP_FL_COMPRESSED; - - if ((start > 0 || len > 0) && (flags & ZIP_FL_COMPRESSED)) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - /* overflow or past end of file */ - if ((start > 0 || len > 0) && (start+len < start || start+len > st.size)) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return NULL; - } - - enc_impl = NULL; - if (((flags & ZIP_FL_ENCRYPTED) == 0) && (st.encryption_method != ZIP_EM_NONE)) { - if (password == NULL) { - _zip_error_set(&za->error, ZIP_ER_NOPASSWD, 0); - return NULL; - } - if ((enc_impl=_zip_get_encryption_implementation(st.encryption_method)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_ENCRNOTSUPP, 0); - return NULL; - } - } - - comp_impl = NULL; - if ((flags & ZIP_FL_COMPRESSED) == 0) { - if (st.comp_method != ZIP_CM_STORE) { - if ((comp_impl=_zip_get_compression_implementation(st.comp_method)) == NULL) { - _zip_error_set(&za->error, ZIP_ER_COMPNOTSUPP, 0); - return NULL; - } - } - } - - if ((offset=_zip_file_get_offset(srcza, srcidx, &za->error)) == 0) - return NULL; - - if (st.comp_size == 0) { - if ((src=zip_source_buffer(za, NULL, 0, 0)) == NULL) - return NULL; - } - else { - if (start+len > 0 && enc_impl == NULL && comp_impl == NULL) { - struct zip_stat st2; - - st2.size = len ? len : st.size-start; - st2.comp_size = st2.size; - st2.comp_method = ZIP_CM_STORE; - st2.mtime = st.mtime; - st2.valid = ZIP_STAT_SIZE|ZIP_STAT_COMP_SIZE|ZIP_STAT_COMP_METHOD|ZIP_STAT_MTIME; - - /* TODO: check for overflow of st2.size */ - if ((src=_zip_source_file_or_p(za, NULL, srcza->zp, offset+start, (zip_int64_t)st2.size, 0, &st2)) == NULL) - return NULL; - } - else { - /* TODO: check for overflow of st.comp_size */ - if ((src=_zip_source_file_or_p(za, NULL, srcza->zp, offset, (zip_int64_t)st.comp_size, 0, &st)) == NULL) - return NULL; - } - - if (enc_impl) { - if ((s2=enc_impl(za, src, st.encryption_method, 0, password)) == NULL) { - zip_source_free(src); - /* TODO: set error (how?) */ - return NULL; - } - src = s2; - } - if (comp_impl) { - if ((s2=comp_impl(za, src, st.comp_method, 0)) == NULL) { - zip_source_free(src); - /* TODO: set error (how?) */ - return NULL; - } - src = s2; - } - if (((flags & ZIP_FL_COMPRESSED) == 0 || st.comp_method == ZIP_CM_STORE) - && (len == 0 || len == st.comp_size)) { - /* when reading the whole file, check for crc errors */ - if ((s2=zip_source_crc(za, src, 1)) == NULL) { - zip_source_free(src); - /* TODO: set error (how?) */ - return NULL; - } - src = s2; - } - - if (start+len > 0 && (comp_impl || enc_impl)) { - if ((s2=zip_source_window(za, src, start, len ? len : st.size-start)) == NULL) { - zip_source_free(src); - /* TODO: set error (how?) (why?) */ - return NULL; - } - src = s2; - } - } - - return src; -} diff --git a/build/premake/premake5/contrib/libzip/zip_stat.c b/build/premake/premake5/contrib/libzip/zip_stat.c deleted file mode 100644 index 8254627d92..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_stat.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - zip_stat.c -- get information about file by name - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_stat(struct zip *za, const char *fname, zip_flags_t flags, struct zip_stat *st) -{ - zip_int64_t idx; - - if ((idx=zip_name_locate(za, fname, flags)) < 0) - return -1; - - return zip_stat_index(za, (zip_uint64_t)idx, flags, st); -} diff --git a/build/premake/premake5/contrib/libzip/zip_stat_index.c b/build/premake/premake5/contrib/libzip/zip_stat_index.c deleted file mode 100644 index 2505c80138..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_stat_index.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - zip_stat_index.c -- get information about file by index - Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_stat_index(struct zip *za, zip_uint64_t index, zip_flags_t flags, - struct zip_stat *st) -{ - const char *name; - struct zip_dirent *de; - - if ((de=_zip_get_dirent(za, index, flags, NULL)) == NULL) - return -1; - - if ((name=zip_get_name(za, index, flags)) == NULL) - return -1; - - - if ((flags & ZIP_FL_UNCHANGED) == 0 - && ZIP_ENTRY_DATA_CHANGED(za->entry+index)) { - if (zip_source_stat(za->entry[index].source, st) < 0) { - _zip_error_set(&za->error, ZIP_ER_CHANGED, 0); - return -1; - } - } - else { - zip_stat_init(st); - - st->crc = de->crc; - st->size = de->uncomp_size; - st->mtime = de->last_mod; - st->comp_size = de->comp_size; - st->comp_method = (zip_uint16_t)de->comp_method; - if (de->bitflags & ZIP_GPBF_ENCRYPTED) { - if (de->bitflags & ZIP_GPBF_STRONG_ENCRYPTION) { - /* TODO */ - st->encryption_method = ZIP_EM_UNKNOWN; - } - else - st->encryption_method = ZIP_EM_TRAD_PKWARE; - } - else - st->encryption_method = ZIP_EM_NONE; - st->valid = ZIP_STAT_CRC|ZIP_STAT_SIZE|ZIP_STAT_MTIME - |ZIP_STAT_COMP_SIZE|ZIP_STAT_COMP_METHOD|ZIP_STAT_ENCRYPTION_METHOD; - } - - st->index = index; - st->name = name; - st->valid |= ZIP_STAT_INDEX|ZIP_STAT_NAME; - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_stat_init.c b/build/premake/premake5/contrib/libzip/zip_stat_init.c deleted file mode 100644 index d17613bf5e..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_stat_init.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - zip_stat_init.c -- initialize struct zip_stat. - Copyright (C) 2006-2009 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN void -zip_stat_init(struct zip_stat *st) -{ - st->valid = 0; - st->name = NULL; - st->index = ZIP_UINT64_MAX; - st->crc = 0; - st->mtime = (time_t)-1; - st->size = 0; - st->comp_size = 0; - st->comp_method = ZIP_CM_STORE; - st->encryption_method = ZIP_EM_NONE; -} diff --git a/build/premake/premake5/contrib/libzip/zip_strerror.c b/build/premake/premake5/contrib/libzip/zip_strerror.c deleted file mode 100644 index 9ebee144f9..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_strerror.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - zip_sterror.c -- get string representation of zip error - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - - - -ZIP_EXTERN const char * -zip_strerror(struct zip *za) -{ - return _zip_error_strerror(&za->error); -} diff --git a/build/premake/premake5/contrib/libzip/zip_string.c b/build/premake/premake5/contrib/libzip/zip_string.c deleted file mode 100644 index 4e8709b5f7..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_string.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - zip_string.c -- string handling (with encoding) - Copyright (C) 2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include -#include - -#include "zipint.h" - - - -zip_uint32_t -_zip_string_crc32(const struct zip_string *s) -{ - zip_uint32_t crc; - - crc = (zip_uint32_t)crc32(0L, Z_NULL, 0); - - if (s != NULL) - crc = (zip_uint32_t)crc32(crc, s->raw, s->length); - - return crc; -} - - - -int -_zip_string_equal(const struct zip_string *a, const struct zip_string *b) -{ - if (a == NULL || b == NULL) - return a == b; - - if (a->length != b->length) - return 0; - - /* TODO: encoding */ - - return (memcmp(a->raw, b->raw, a->length) == 0); -} - - - -void -_zip_string_free(struct zip_string *s) -{ - if (s == NULL) - return; - - free(s->raw); - free(s->converted); - free(s); -} - - - -const zip_uint8_t * -_zip_string_get(struct zip_string *string, zip_uint32_t *lenp, zip_flags_t flags, struct zip_error *error) -{ - static const zip_uint8_t empty[1] = ""; - - if (string == NULL) { - if (lenp) - *lenp = 0; - return empty; - } - - if ((flags & ZIP_FL_ENC_RAW) == 0) { - /* start guessing */ - if (string->encoding == ZIP_ENCODING_UNKNOWN) - _zip_guess_encoding(string, ZIP_ENCODING_UNKNOWN); - - if (((flags & ZIP_FL_ENC_STRICT) - && string->encoding != ZIP_ENCODING_ASCII && string->encoding != ZIP_ENCODING_UTF8_KNOWN) - || (string->encoding == ZIP_ENCODING_CP437)) { - if (string->converted == NULL) { - if ((string->converted=_zip_cp437_to_utf8(string->raw, string->length, - &string->converted_length, error)) == NULL) - return NULL; - } - if (lenp) - *lenp = string->converted_length; - return string->converted; - } - } - - if (lenp) - *lenp = string->length; - return string->raw; -} - - - -zip_uint16_t -_zip_string_length(const struct zip_string *s) -{ - if (s == NULL) - return 0; - - return s->length; -} - - - -struct zip_string * -_zip_string_new(const zip_uint8_t *raw, zip_uint16_t length, zip_flags_t flags, struct zip_error *error) -{ - struct zip_string *s; - enum zip_encoding_type expected_encoding; - - if (length == 0) - return NULL; - - switch (flags & ZIP_FL_ENCODING_ALL) { - case ZIP_FL_ENC_GUESS: - expected_encoding = ZIP_ENCODING_UNKNOWN; - break; - case ZIP_FL_ENC_UTF_8: - expected_encoding = ZIP_ENCODING_UTF8_KNOWN; - break; - case ZIP_FL_ENC_CP437: - expected_encoding = ZIP_ENCODING_CP437; - break; - default: - _zip_error_set(error, ZIP_ER_INVAL, 0); - return NULL; - } - - if ((s=(struct zip_string *)malloc(sizeof(*s))) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - return NULL; - } - - if ((s->raw=(zip_uint8_t *)malloc(length+1)) == NULL) { - free(s); - return NULL; - } - - memcpy(s->raw, raw, length); - s->raw[length] = '\0'; - s->length = length; - s->encoding = ZIP_ENCODING_UNKNOWN; - s->converted = NULL; - s->converted_length = 0; - - if (expected_encoding != ZIP_ENCODING_UNKNOWN) { - if (_zip_guess_encoding(s, expected_encoding) == ZIP_ENCODING_ERROR) { - _zip_string_free(s); - _zip_error_set(error, ZIP_ER_INVAL, 0); - return NULL; - } - } - - return s; -} - - - -void -_zip_string_write(const struct zip_string *s, FILE *f) -{ - if (s == NULL) - return; - - fwrite(s->raw, s->length, 1, f); -} diff --git a/build/premake/premake5/contrib/libzip/zip_unchange.c b/build/premake/premake5/contrib/libzip/zip_unchange.c deleted file mode 100644 index 5f0e753b78..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_unchange.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - zip_unchange.c -- undo changes to file in zip archive - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_unchange(struct zip *za, zip_uint64_t idx) -{ - return _zip_unchange(za, idx, 0); -} - - - -int -_zip_unchange(struct zip *za, zip_uint64_t idx, int allow_duplicates) -{ - zip_int64_t i; - - if (idx >= za->nentry) { - _zip_error_set(&za->error, ZIP_ER_INVAL, 0); - return -1; - } - - if (!allow_duplicates && za->entry[idx].changes && (za->entry[idx].changes->changed & ZIP_DIRENT_FILENAME)) { - i = _zip_name_locate(za, _zip_get_name(za, idx, ZIP_FL_UNCHANGED, NULL), 0, NULL); - if (i >= 0 && (zip_uint64_t)i != idx) { - _zip_error_set(&za->error, ZIP_ER_EXISTS, 0); - return -1; - } - } - - _zip_dirent_free(za->entry[idx].changes); - za->entry[idx].changes = NULL; - - _zip_unchange_data(za->entry+idx); - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_unchange_all.c b/build/premake/premake5/contrib/libzip/zip_unchange_all.c deleted file mode 100644 index bbc2825eb6..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_unchange_all.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - zip_unchange.c -- undo changes to all files in zip archive - Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_unchange_all(struct zip *za) -{ - int ret; - zip_uint64_t i; - - ret = 0; - for (i=0; inentry; i++) - ret |= _zip_unchange(za, i, 1); - - ret |= zip_unchange_archive(za); - - return ret; -} diff --git a/build/premake/premake5/contrib/libzip/zip_unchange_archive.c b/build/premake/premake5/contrib/libzip/zip_unchange_archive.c deleted file mode 100644 index e24ee21727..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_unchange_archive.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - zip_unchange_archive.c -- undo global changes to ZIP archive - Copyright (C) 2006-2008 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include - -#include "zipint.h" - - - -ZIP_EXTERN int -zip_unchange_archive(struct zip *za) -{ - if (za->comment_changed) { - _zip_string_free(za->comment_changes); - za->comment_changes = NULL; - za->comment_changed = 0; - } - - za->ch_flags = za->flags; - - return 0; -} diff --git a/build/premake/premake5/contrib/libzip/zip_unchange_data.c b/build/premake/premake5/contrib/libzip/zip_unchange_data.c deleted file mode 100644 index fa25feb038..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_unchange_data.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - zip_unchange_data.c -- undo helper function - Copyright (C) 1999-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - -void -_zip_unchange_data(struct zip_entry *ze) -{ - if (ze->source) { - zip_source_free(ze->source); - ze->source = NULL; - } - - if (ze->changes != NULL && (ze->changes->changed & ZIP_DIRENT_COMP_METHOD) && ze->changes->comp_method == ZIP_CM_REPLACED_DEFAULT) { - ze->changes->changed &= ~ZIP_DIRENT_COMP_METHOD; - if (ze->changes->changed == 0) { - _zip_dirent_free(ze->changes); - ze->changes = NULL; - } - } - - ze->deleted = 0; -} - diff --git a/build/premake/premake5/contrib/libzip/zip_utf-8.c b/build/premake/premake5/contrib/libzip/zip_utf-8.c deleted file mode 100644 index c36fad13f5..0000000000 --- a/build/premake/premake5/contrib/libzip/zip_utf-8.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - zip_utf-8.c -- UTF-8 support functions for libzip - Copyright (C) 2011-2012 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - - -#include "zipint.h" - -#include - - - -static const zip_uint16_t _cp437_to_unicode[256] = { - /* 0x00 - 0x0F */ - 0x2007, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, - - /* 0x10 - 0x1F */ - 0x25BA, 0x25C4, 0x2195, 0x203C, 0x00B6, 0x00A7, 0x25AC, 0x21A8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221F, 0x2194, 0x25B2, 0x25BC, - - /* 0x20 - 0x2F */ - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, - - /* 0x30 - 0x3F */ - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, - - /* 0x40 - 0x4F */ - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, - - /* 0x50 - 0x5F */ - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F, - - /* 0x60 - 0x6F */ - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, - - /* 0x70 - 0x7F */ - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x2302, - - /* 0x80 - 0x8F */ - 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, - 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, - - /* 0x90 - 0x9F */ - 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, - 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192, - - /* 0xA0 - 0xAF */ - 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, - 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, - - /* 0xB0 - 0xBF */ - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, - - /* 0xC0 - 0xCF */ - 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, - 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, - - /* 0xD0 - 0xDF */ - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, - 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, - - /* 0xE0 - 0xEF */ - 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, - 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, - - /* 0xF0 - 0xFF */ - 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, - 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 -}; - -#define UTF_8_LEN_2_MASK 0xe0 -#define UTF_8_LEN_2_MATCH 0xc0 -#define UTF_8_LEN_3_MASK 0xf0 -#define UTF_8_LEN_3_MATCH 0xe0 -#define UTF_8_LEN_4_MASK 0xf8 -#define UTF_8_LEN_4_MATCH 0xf0 -#define UTF_8_CONTINUE_MASK 0xc0 -#define UTF_8_CONTINUE_MATCH 0x80 - - - -enum zip_encoding_type -_zip_guess_encoding(struct zip_string *str, enum zip_encoding_type expected_encoding) -{ - enum zip_encoding_type enc; - const zip_uint8_t *name; - zip_uint32_t i, j, ulen; - - if (str == NULL) - return ZIP_ENCODING_ASCII; - - name = str->raw; - - if (str->encoding != ZIP_ENCODING_UNKNOWN) - enc = str->encoding; - else { - enc = ZIP_ENCODING_ASCII; - for (i=0; ilength; i++) { - if ((name[i] > 31 && name[i] < 128) || name[i] == '\r' || name[i] == '\n' || name[i] == '\t') - continue; - - enc = ZIP_ENCODING_UTF8_GUESSED; - if ((name[i] & UTF_8_LEN_2_MASK) == UTF_8_LEN_2_MATCH) - ulen = 1; - else if ((name[i] & UTF_8_LEN_3_MASK) == UTF_8_LEN_3_MATCH) - ulen = 2; - else if ((name[i] & UTF_8_LEN_4_MASK) == UTF_8_LEN_4_MATCH) - ulen = 3; - else { - enc = ZIP_ENCODING_CP437; - break; - } - - if (i + ulen >= str->length) { - enc = ZIP_ENCODING_CP437; - break; - } - - for (j=1; j<=ulen; j++) { - if ((name[i+j] & UTF_8_CONTINUE_MASK) != UTF_8_CONTINUE_MATCH) { - enc = ZIP_ENCODING_CP437; - goto done; - } - } - i += ulen; - } - } - -done: - str->encoding = enc; - - if (expected_encoding != ZIP_ENCODING_UNKNOWN) { - if (expected_encoding == ZIP_ENCODING_UTF8_KNOWN && enc == ZIP_ENCODING_UTF8_GUESSED) - str->encoding = enc = ZIP_ENCODING_UTF8_KNOWN; - - if (expected_encoding != enc && enc != ZIP_ENCODING_ASCII) - return ZIP_ENCODING_ERROR; - } - - return enc; -} - - - -static zip_uint32_t -_zip_unicode_to_utf8_len(zip_uint32_t codepoint) -{ - if (codepoint < 0x0080) - return 1; - if (codepoint < 0x0800) - return 2; - if (codepoint < 0x10000) - return 3; - return 4; -} - - - -static zip_uint32_t -_zip_unicode_to_utf8(zip_uint32_t codepoint, zip_uint8_t *buf) -{ - if (codepoint < 0x0080) { - buf[0] = codepoint & 0xff; - return 1; - } - if (codepoint < 0x0800) { - buf[0] = UTF_8_LEN_2_MATCH | ((codepoint >> 6) & 0x1f); - buf[1] = UTF_8_CONTINUE_MATCH | (codepoint & 0x3f); - return 2; - } - if (codepoint < 0x10000) { - buf[0] = UTF_8_LEN_3_MATCH | ((codepoint >> 12) & 0x0f); - buf[1] = UTF_8_CONTINUE_MATCH | ((codepoint >> 6) & 0x3f); - buf[2] = UTF_8_CONTINUE_MATCH | (codepoint & 0x3f); - return 3; - } - buf[0] = UTF_8_LEN_4_MATCH | ((codepoint >> 18) & 0x07); - buf[1] = UTF_8_CONTINUE_MATCH | ((codepoint >> 12) & 0x3f); - buf[2] = UTF_8_CONTINUE_MATCH | ((codepoint >> 6) & 0x3f); - buf[3] = UTF_8_CONTINUE_MATCH | (codepoint & 0x3f); - return 4; -} - - - -zip_uint8_t * -_zip_cp437_to_utf8(const zip_uint8_t * const _cp437buf, zip_uint32_t len, - zip_uint32_t *utf8_lenp, struct zip_error *error) -{ - zip_uint8_t *cp437buf = (zip_uint8_t *)_cp437buf; - zip_uint8_t *utf8buf; - zip_uint32_t buflen, i, offset; - - if (len == 0) { - if (utf8_lenp) - *utf8_lenp = 0; - return NULL; - } - - buflen = 1; - for (i=0; i -#elif defined(HAVE_INTTYPES_H_LIBZIP) -#include -#elif defined(HAVE_SYS_TYPES_H_LIBZIP) -#include -#endif - -#if defined(HAVE_INT8_T_LIBZIP) -typedef int8_t zip_int8_t; -#elif defined(HAVE___INT8_LIBZIP) -typedef __int8 zip_int8_t; -#else -typedef signed char zip_int8_t; -#endif -#if defined(HAVE_UINT8_T_LIBZIP) -typedef uint8_t zip_uint8_t; -#elif defined(HAVE___INT8_LIBZIP) -typedef unsigned __int8 zip_uint8_t; -#else -typedef unsigned char zip_uint8_t; -#endif -#if defined(HAVE_INT16_T_LIBZIP) -typedef int16_t zip_int16_t; -#elif defined(HAVE___INT16_LIBZIP) -typedef __int16 zip_int16_t; -#elif defined(SHORT_LIBZIP) && SHORT_LIBZIP == 2 -typedef signed short zip_int16_t; -#endif -#if defined(HAVE_UINT16_T_LIBZIP) -typedef uint16_t zip_uint16_t; -#elif defined(HAVE___INT16_LIBZIP) -typedef unsigned __int16 zip_uint16_t; -#elif defined(SHORT_LIBZIP) && SHORT_LIBZIP == 2 -typedef unsigned short zip_uint16_t; -#endif -#if defined(HAVE_INT32_T_LIBZIP) -typedef int32_t zip_int32_t; -#elif defined(HAVE___INT32_LIBZIP) -typedef __int32 zip_int32_t; -#elif defined(INT_LIBZIP) && INT_LIBZIP == 4 -typedef signed int zip_int32_t; -#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 4 -typedef signed long zip_int32_t; -#endif -#if defined(HAVE_UINT32_T_LIBZIP) -typedef uint32_t zip_uint32_t; -#elif defined(HAVE___INT32_LIBZIP) -typedef unsigned __int32 zip_uint32_t; -#elif defined(INT_LIBZIP) && INT_LIBZIP == 4 -typedef unsigned int zip_uint32_t; -#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 4 -typedef unsigned long zip_uint32_t; -#endif -#if defined(HAVE_INT64_T_LIBZIP) -typedef int64_t zip_int64_t; -#elif defined(HAVE___INT64_LIBZIP) -typedef __int64 zip_int64_t; -#elif defined(LONG_LIBZIP) && LONG_LIBZIP == 8 -typedef signed long zip_int64_t; -#elif defined(LONG_LONG_LIBZIP) && LONG_LONG_LIBZIP == 8 -typedef signed long long zip_int64_t; -#endif -#if defined(HAVE_UINT64_T_LIBZIP) -typedef uint64_t zip_uint64_t; -#elif defined(HAVE___INT64_LIBZIP) -typedef unsigned __int64 zip_uint64_t; -#elif defined(LONG_LIBZIP) && LONG_LONG_LIBZIP == 8 -typedef unsigned long zip_uint64_t; -#elif defined(LONG_LONG_LIBZIP) && LONG_LONG_LIBZIP == 8 -typedef unsigned long long zip_uint64_t; -#endif - -#define ZIP_INT8_MIN -0x80 -#define ZIP_INT8_MAX 0x7f -#define ZIP_UINT8_MAX 0xff - -#define ZIP_INT16_MIN -0x8000 -#define ZIP_INT16_MAX 0x7fff -#define ZIP_UINT16_MAX 0xffff - -#define ZIP_INT32_MIN -0x80000000L -#define ZIP_INT32_MAX 0x7fffffffL -#define ZIP_UINT32_MAX 0xffffffffLU - -#define ZIP_INT64_MIN -0x8000000000000000LL -#define ZIP_INT64_MAX 0x7fffffffffffffffLL -#define ZIP_UINT64_MAX 0xffffffffffffffffULL - -#endif /* zipconf.h */ diff --git a/build/premake/premake5/contrib/libzip/zipint.h b/build/premake/premake5/contrib/libzip/zipint.h deleted file mode 100644 index 5061ee9c6e..0000000000 --- a/build/premake/premake5/contrib/libzip/zipint.h +++ /dev/null @@ -1,514 +0,0 @@ -#ifndef _HAD_ZIPINT_H -#define _HAD_ZIPINT_H - -/* - zipint.h -- internal declarations. - Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner - - This file is part of libzip, a library to manipulate ZIP archives. - The authors can be contacted at - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS - OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* to have *_MAX definitions for all types when compiling with g++ */ -#define __STDC_LIMIT_MACROS - -#include - -#ifdef _WIN32 -#define ZIP_EXTERN -//__declspec(dllexport) -/* for dup(), close(), etc. */ -#include -#endif - -#ifndef _ZIP_COMPILING_DEPRECATED -#define ZIP_DISABLE_DEPRECATED -#endif - -#include "zip.h" -#include "config.h" - -#ifdef HAVE_MOVEFILEEXA -#include -#define _zip_rename(s, t) (!MoveFileExA((s), (t), MOVEFILE_COPY_ALLOWED|MOVEFILE_REPLACE_EXISTING)) -#else -#define _zip_rename rename -#endif - -#ifdef _WIN32 -#if defined(HAVE__CLOSE) -#define close _close -#endif -#if defined(HAVE__DUP) -#define dup _dup -#endif -/* crashes reported when using fdopen instead of _fdopen on Windows/Visual Studio 10/Win64 */ -#if defined(HAVE__FDOPEN) -#define fdopen _fdopen -#endif -#if defined(HAVE__FILENO) -#define fileno _fileno -#endif -/* Windows' open() doesn't understand Unix permissions */ -#if defined(HAVE__OPEN) -#define open(a, b, c) _open((a), (b)) -#endif -#if defined(HAVE__SNPRINTF) -#define snprintf _snprintf -#endif -#if defined(HAVE__STRDUP) && !defined(HAVE_STRDUP) -#define strdup _strdup -#endif -#endif - -#ifndef HAVE_FSEEKO -#define fseeko(s, o, w) (fseek((s), (long int)(o), (w))) -#endif - -#ifndef HAVE_FTELLO -#define ftello(s) ((long)ftell((s))) -#endif - -#ifndef HAVE_MKSTEMP -int _zip_mkstemp(char *); -#define mkstemp _zip_mkstemp -#endif - -#ifdef _WIN32 -#if !defined(HAVE_STRCASECMP) -#if defined(HAVE__STRICMP) -#define strcasecmp _stricmp -#endif -#endif -#endif - -#if SIZEOF_OFF_T == 8 -#define ZIP_OFF_MAX ZIP_INT64_MAX -#elif SIZEOF_OFF_T == 4 -#define ZIP_OFF_MAX ZIP_INT32_MAX -#elif SIZEOF_OFF_T == 2 -#define ZIP_OFF_MAX ZIP_INT16_MAX -#else -#error unsupported size of off_t -#endif - -#ifndef SIZE_MAX -#if SIZEOF_SIZE_T == 8 -#define SIZE_MAX ZIP_INT64_MAX -#elif SIZEOF_SIZE_T == 4 -#define SIZE_MAX ZIP_INT32_MAX -#elif SIZEOF_SIZE_T == 2 -#define SIZE_MAX ZIP_INT16_MAX -#else -#error unsupported size of size_t -#endif -#endif - -#define CENTRAL_MAGIC "PK\1\2" -#define LOCAL_MAGIC "PK\3\4" -#define EOCD_MAGIC "PK\5\6" -#define DATADES_MAGIC "PK\7\8" -#define EOCD64LOC_MAGIC "PK\6\7" -#define EOCD64_MAGIC "PK\6\6" -#define TORRENT_SIG "TORRENTZIPPED-" -#define TORRENT_SIG_LEN 14 -#define TORRENT_CRC_LEN 8 -#define TORRENT_MEM_LEVEL 8 -#define CDENTRYSIZE 46u -#define LENTRYSIZE 30 -#define MAXCOMLEN 65536 -#define MAXEXTLEN 65536 -#define EOCDLEN 22 -#define EOCD64LOCLEN 20 -#define EOCD64LEN 56 -#define CDBUFSIZE (MAXCOMLEN+EOCDLEN+EOCD64LOCLEN) -#define BUFSIZE 8192 - -#define ZIP_CM_REPLACED_DEFAULT (-2) - -#define ZIP_CM_IS_DEFAULT(x) ((x) == ZIP_CM_DEFAULT || (x) == ZIP_CM_REPLACED_DEFAULT) - -#define ZIP_EF_UTF_8_COMMENT 0x6375 -#define ZIP_EF_UTF_8_NAME 0x7075 -#define ZIP_EF_ZIP64 0x0001 - -#define ZIP_EF_IS_INTERNAL(id) ((id) == ZIP_EF_UTF_8_COMMENT || (id) == ZIP_EF_UTF_8_NAME || (id) == ZIP_EF_ZIP64) - -/* according to unzip-6.0's zipinfo.c, this corresponds to a regular file with rw permissions for everyone */ -#define ZIP_EXT_ATTRIB_DEFAULT (0100666<<16) -/* according to unzip-6.0's zipinfo.c, this corresponds to a directory with rwx permissions for everyone */ -#define ZIP_EXT_ATTRIB_DEFAULT_DIR (0040777<<16) - - -/* This section contains API that won't materialize like this. It's - placed in the internal section, pending cleanup. */ - -typedef struct zip_source *(*zip_compression_implementation)(struct zip *, - struct zip_source *, - zip_int32_t, int); -typedef struct zip_source *(*zip_encryption_implementation)(struct zip *, - struct zip_source *, - zip_uint16_t, int, - const char *); - -zip_compression_implementation _zip_get_compression_implementation(zip_int32_t); -zip_encryption_implementation _zip_get_encryption_implementation(zip_uint16_t); - - - - -/* This API is not final yet, but we need it internally, so it's private for now. */ - -const zip_uint8_t *zip_get_extra_field_by_id(struct zip *, int, int, zip_uint16_t, int, zip_uint16_t *); - -/* This section contains API that is of limited use until support for - user-supplied compression/encryption implementation is finished. - Thus we will keep it private for now. */ - -typedef zip_int64_t (*zip_source_layered_callback)(struct zip_source *, void *, - void *, zip_uint64_t, - enum zip_source_cmd); - -void zip_source_close(struct zip_source *); -struct zip_source *zip_source_crc(struct zip *, struct zip_source *, - int); -struct zip_source *zip_source_deflate(struct zip *, - struct zip_source *, - zip_int32_t, int); -void zip_source_error(struct zip_source *, int *, int *); -struct zip_source *zip_source_layered(struct zip *, - struct zip_source *, - zip_source_layered_callback, - void *); -int zip_source_open(struct zip_source *); -struct zip_source *zip_source_pkware(struct zip *, - struct zip_source *, - zip_uint16_t, int, - const char *); -zip_int64_t zip_source_read(struct zip_source *, void *, - zip_uint64_t); -int zip_source_stat(struct zip_source *, struct zip_stat *); -struct zip_source *zip_source_window(struct zip *, struct zip_source *, - zip_uint64_t, zip_uint64_t); - - -/* This function will probably remain private. It is not needed to - implement compression/encryption routines. (We should probably - rename it to _zip_source_pop.) */ - -struct zip_source *zip_source_pop(struct zip_source *); - - - -/* error source for layered sources */ - -enum zip_les { ZIP_LES_NONE, ZIP_LES_UPPER, ZIP_LES_LOWER, ZIP_LES_INVAL }; - -/* directory entry: general purpose bit flags */ - -#define ZIP_GPBF_ENCRYPTED 0x0001 /* is encrypted */ -#define ZIP_GPBF_DATA_DESCRIPTOR 0x0008 /* crc/size after file data */ -#define ZIP_GPBF_STRONG_ENCRYPTION 0x0040 /* uses strong encryption */ -#define ZIP_GPBF_ENCODING_UTF_8 0x0800 /* file name encoding is UTF-8 */ - - -/* extra fields */ -#define ZIP_EF_LOCAL ZIP_FL_LOCAL /* include in local header */ -#define ZIP_EF_CENTRAL ZIP_FL_CENTRAL /* include in central directory */ -#define ZIP_EF_BOTH (ZIP_EF_LOCAL|ZIP_EF_CENTRAL) /* include in both */ - -#define ZIP_FL_FORCE_ZIP64 1024 /* force zip64 extra field (_zip_dirent_write) */ - -#define ZIP_FL_ENCODING_ALL (ZIP_FL_ENC_GUESS|ZIP_FL_ENC_CP437|ZIP_FL_ENC_UTF_8) - - -/* encoding type */ -enum zip_encoding_type { - ZIP_ENCODING_UNKNOWN, /* not yet analyzed */ - ZIP_ENCODING_ASCII, /* plain ASCII */ - ZIP_ENCODING_UTF8_KNOWN, /* is UTF-8 */ - ZIP_ENCODING_UTF8_GUESSED, /* possibly UTF-8 */ - ZIP_ENCODING_CP437, /* Code Page 437 */ - ZIP_ENCODING_ERROR /* should be UTF-8 but isn't */ -}; - -/* error information */ - -struct zip_error { - int zip_err; /* libzip error code (ZIP_ER_*) */ - int sys_err; /* copy of errno (E*) or zlib error code */ - char *str; /* string representation or NULL */ -}; - -/* zip archive, part of API */ - -struct zip { - char *zn; /* file name */ - FILE *zp; /* file */ - unsigned int open_flags; /* flags passed to zip_open */ - struct zip_error error; /* error information */ - - unsigned int flags; /* archive global flags */ - unsigned int ch_flags; /* changed archive global flags */ - - char *default_password; /* password used when no other supplied */ - - struct zip_string *comment_orig; /* archive comment */ - struct zip_string *comment_changes; /* changed archive comment */ - int comment_changed; /* whether archive comment was changed */ - - zip_uint64_t nentry; /* number of entries */ - zip_uint64_t nentry_alloc; /* number of entries allocated */ - struct zip_entry *entry; /* entries */ - - unsigned int nfile; /* number of opened files within archive */ - unsigned int nfile_alloc; /* number of files allocated */ - struct zip_file **file; /* opened files within archive */ - - char *tempdir; /* custom temp dir (needed e.g. for OS X sandboxing) */ -}; - -/* file in zip archive, part of API */ - -struct zip_file { - struct zip *za; /* zip archive containing this file */ - struct zip_error error; /* error information */ - int eof; - struct zip_source *src; /* data source */ -}; - -/* zip archive directory entry (central or local) */ - -#define ZIP_DIRENT_COMP_METHOD 0x0001u -#define ZIP_DIRENT_FILENAME 0x0002u -#define ZIP_DIRENT_COMMENT 0x0004u -#define ZIP_DIRENT_EXTRA_FIELD 0x0008u -#define ZIP_DIRENT_ATTRIBUTES 0x0010u -#define ZIP_DIRENT_ALL 0xffffu - -struct zip_dirent { - zip_uint32_t changed; - int local_extra_fields_read; /* whether we already read in local header extra fields */ - int cloned; /* whether this instance is cloned, and thus shares non-changed strings */ - - zip_uint16_t version_madeby; /* (c) version of creator */ - zip_uint16_t version_needed; /* (cl) version needed to extract */ - zip_uint16_t bitflags; /* (cl) general purpose bit flag */ - zip_int32_t comp_method; /* (cl) compression method used (uint16 and ZIP_CM_DEFAULT (-1)) */ - time_t last_mod; /* (cl) time of last modification */ - zip_uint32_t crc; /* (cl) CRC-32 of uncompressed data */ - zip_uint64_t comp_size; /* (cl) size of compressed data */ - zip_uint64_t uncomp_size; /* (cl) size of uncompressed data */ - struct zip_string *filename; /* (cl) file name (NUL-terminated) */ - struct zip_extra_field *extra_fields; /* (cl) extra fields, parsed */ - struct zip_string *comment; /* (c) file comment */ - zip_uint32_t disk_number; /* (c) disk number start */ - zip_uint16_t int_attrib; /* (c) internal file attributes */ - zip_uint32_t ext_attrib; /* (c) external file attributes */ - zip_uint64_t offset; /* (c) offset of local header */ -}; - -/* zip archive central directory */ - -struct zip_cdir { - struct zip_entry *entry; /* directory entries */ - zip_uint64_t nentry; /* number of entries */ - zip_uint64_t nentry_alloc; /* number of entries allocated */ - - off_t size; /* size of central directory */ - off_t offset; /* offset of central directory in file */ - struct zip_string *comment; /* zip archive comment */ -}; - -struct zip_extra_field { - struct zip_extra_field *next; - zip_flags_t flags; /* in local/central header */ - zip_uint16_t id; /* header id */ - zip_uint16_t size; /* data size */ - zip_uint8_t *data; -}; - - - -struct zip_source { - struct zip_source *src; - union { - zip_source_callback f; - zip_source_layered_callback l; - } cb; - void *ud; - enum zip_les error_source; - int is_open; -}; - -/* entry in zip archive directory */ - -struct zip_entry { - struct zip_dirent *orig; - struct zip_dirent *changes; - struct zip_source *source; - int deleted; -}; - - - -/* file or archive comment, or filename */ - -struct zip_string { - zip_uint8_t *raw; /* raw string */ - zip_uint16_t length; /* length of raw string */ - enum zip_encoding_type encoding; /* autorecognized encoding */ - zip_uint8_t *converted; /* autoconverted string */ - zip_uint32_t converted_length; /* length of converted */ -}; - - - -/* which files to write, and in which order (name is for torrentzip sorting) */ - -struct zip_filelist { - zip_uint64_t idx; - const char *name; -}; - - - -extern const char * const _zip_err_str[]; -extern const int _zip_nerr_str; -extern const int _zip_err_type[]; - - - -#define ZIP_ENTRY_CHANGED(e, f) ((e)->changes && ((e)->changes->changed & (f))) - -#define ZIP_ENTRY_DATA_CHANGED(x) ((x)->source != NULL) - -#define ZIP_IS_RDONLY(za) ((za)->ch_flags & ZIP_AFL_RDONLY) - - - -zip_int64_t _zip_add_entry(struct zip *); - -int _zip_cdir_compute_crc(struct zip *, uLong *); -void _zip_cdir_free(struct zip_cdir *); -int _zip_cdir_grow(struct zip_cdir *, zip_uint64_t, struct zip_error *); -struct zip_cdir *_zip_cdir_new(zip_uint64_t, struct zip_error *); -zip_int64_t _zip_cdir_write(struct zip *, const struct zip_filelist *, zip_uint64_t, FILE *); - -struct zip_dirent *_zip_dirent_clone(const struct zip_dirent *); -void _zip_dirent_free(struct zip_dirent *); -void _zip_dirent_finalize(struct zip_dirent *); -void _zip_dirent_init(struct zip_dirent *); -int _zip_dirent_needs_zip64(const struct zip_dirent *, zip_flags_t); -struct zip_dirent *_zip_dirent_new(void); -int _zip_dirent_read(struct zip_dirent *, FILE *, const unsigned char **, - zip_uint64_t *, int, struct zip_error *); -zip_int32_t _zip_dirent_size(FILE *, zip_uint16_t, struct zip_error *); -void _zip_dirent_torrent_normalize(struct zip_dirent *); -int _zip_dirent_write(struct zip_dirent *, FILE *, zip_flags_t, struct zip_error *); - -struct zip_extra_field *_zip_ef_clone(const struct zip_extra_field *, struct zip_error *); -struct zip_extra_field *_zip_ef_delete_by_id(struct zip_extra_field *, zip_uint16_t, zip_uint16_t, zip_flags_t); -void _zip_ef_free(struct zip_extra_field *); -const zip_uint8_t *_zip_ef_get_by_id(const struct zip_extra_field *, zip_uint16_t *, zip_uint16_t, zip_uint16_t, zip_flags_t, struct zip_error *); -struct zip_extra_field *_zip_ef_merge(struct zip_extra_field *, struct zip_extra_field *); -struct zip_extra_field *_zip_ef_new(zip_uint16_t, zip_uint16_t, const zip_uint8_t *, zip_flags_t); -struct zip_extra_field *_zip_ef_parse(const zip_uint8_t *, zip_uint16_t, zip_flags_t, struct zip_error *); -struct zip_extra_field *_zip_ef_remove_internal(struct zip_extra_field *); -zip_uint16_t _zip_ef_size(const struct zip_extra_field *, zip_flags_t); -void _zip_ef_write(const struct zip_extra_field *, zip_flags_t, FILE *); - -void _zip_entry_finalize(struct zip_entry *); -void _zip_entry_init(struct zip_entry *); - -void _zip_error_clear(struct zip_error *); -void _zip_error_copy(struct zip_error *, const struct zip_error *); -void _zip_error_fini(struct zip_error *); -void _zip_error_get(const struct zip_error *, int *, int *); -void _zip_error_init(struct zip_error *); -void _zip_error_set(struct zip_error *, int, int); -void _zip_error_set_from_source(struct zip_error *, struct zip_source *); -const char *_zip_error_strerror(struct zip_error *); - -const zip_uint8_t *_zip_extract_extra_field_by_id(struct zip_error *, zip_uint16_t, int, const zip_uint8_t *, zip_uint16_t, zip_uint16_t *); - -int _zip_file_extra_field_prepare_for_change(struct zip *, zip_uint64_t); -int _zip_file_fillbuf(void *, size_t, struct zip_file *); -zip_uint64_t _zip_file_get_offset(const struct zip *, zip_uint64_t, struct zip_error *); - -int _zip_filerange_crc(FILE *, off_t, off_t, uLong *, struct zip_error *); - -struct zip_dirent *_zip_get_dirent(struct zip *, zip_uint64_t, zip_flags_t, struct zip_error *); - -enum zip_encoding_type _zip_guess_encoding(struct zip_string *, enum zip_encoding_type); -zip_uint8_t *_zip_cp437_to_utf8(const zip_uint8_t * const, zip_uint32_t, - zip_uint32_t *, struct zip_error *error); - -struct zip *_zip_open(const char *, FILE *, unsigned int, int *); - -int _zip_read_local_ef(struct zip *, zip_uint64_t); - -struct zip_source *_zip_source_file_or_p(struct zip *, const char *, FILE *, - zip_uint64_t, zip_int64_t, int, - const struct zip_stat *); -struct zip_source *_zip_source_new(struct zip *); -struct zip_source *_zip_source_zip_new(struct zip *, struct zip *, zip_uint64_t, zip_flags_t, - zip_uint64_t, zip_uint64_t, const char *); - -int _zip_string_equal(const struct zip_string *, const struct zip_string *); -void _zip_string_free(struct zip_string *); -zip_uint32_t _zip_string_crc32(const struct zip_string *); -const zip_uint8_t *_zip_string_get(struct zip_string *, zip_uint32_t *, zip_flags_t, struct zip_error *); -zip_uint16_t _zip_string_length(const struct zip_string *); -struct zip_string *_zip_string_new(const zip_uint8_t *, zip_uint16_t, zip_flags_t, struct zip_error *); -void _zip_string_write(const struct zip_string *, FILE *); - -int _zip_changed(const struct zip *, zip_uint64_t *); -const char *_zip_get_name(struct zip *, zip_uint64_t, zip_flags_t, struct zip_error *); -int _zip_local_header_read(struct zip *, int); -void *_zip_memdup(const void *, size_t, struct zip_error *); -zip_int64_t _zip_name_locate(struct zip *, const char *, zip_flags_t, struct zip_error *); -struct zip *_zip_new(struct zip_error *); -zip_uint16_t _zip_read2(const zip_uint8_t **); -zip_uint32_t _zip_read4(const zip_uint8_t **); -zip_uint64_t _zip_read8(const zip_uint8_t **); -zip_uint8_t *_zip_read_data(const zip_uint8_t **, FILE *, size_t, int, struct zip_error *); -zip_int64_t _zip_file_replace(struct zip *, zip_uint64_t, const char *, struct zip_source *, zip_flags_t); -int _zip_set_name(struct zip *, zip_uint64_t, const char *, zip_flags_t); -void _zip_u2d_time(time_t, zip_uint16_t *, zip_uint16_t *); -int _zip_unchange(struct zip *, zip_uint64_t, int); -void _zip_unchange_data(struct zip_entry *); - -void _zip_poke4(zip_uint32_t, zip_uint8_t **); -void _zip_poke8(zip_uint64_t, zip_uint8_t **); -void _zip_write2(zip_uint16_t, FILE *); -void _zip_write4(zip_uint32_t, FILE *); -void _zip_write8(zip_uint64_t, FILE *); - - -#endif /* zipint.h */ diff --git a/build/premake/premake5/contrib/libzip/zlib.h b/build/premake/premake5/contrib/libzip/zlib.h deleted file mode 100644 index 3e0c7672ac..0000000000 --- a/build/premake/premake5/contrib/libzip/zlib.h +++ /dev/null @@ -1,1768 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.8, April 28th, 2013 - - Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.8" -#define ZLIB_VERNUM 0x1280 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 8 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip streams in memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use in the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). Some - output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed code - block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the stream - are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least the - value returned by deflateBound (see below). Then deflate is guaranteed to - return Z_STREAM_END. If not enough output space is provided, deflate will - not return Z_STREAM_END, and it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect the - compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the - exact value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit() does not process any header information -- that is deferred - until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing will - resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained, so applications that need that information should - instead use raw inflate, see inflateInit2() below, or inflateBack() and - perform their own processing of the gzip header and trailer. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is desired. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by the - caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. The - stream will keep the same compression level and any other attributes that - may have been set by deflateInit2. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression level is changed, the input available so far is - compressed with the old level (and may be flushed); the new level will take - effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to be - compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if - strm->avail_out was zero. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above or -1 << 16 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the normal - behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed buffer. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or writing. The mode parameter is as - in fopen ("rb" or "wb") but can also include a compression level ("wb9") or - a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only - compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' - for fixed code compression as in "wb9F". (See the description of - deflateInit2 for more information about the strategy parameter.) 'T' will - request transparent writing or appending with no compression and not using - the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen associates a gzFile with the file descriptor fd. File descriptors - are obtained from calls like open, dup, creat, pipe or fileno (if the file - has been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. The - default buffer size is 8192 bytes. This function must be called after - gzopen() or gzdopen(), and before any other calls that read or write the - file. The buffer memory allocation is always deferred to the first read or - write. Two buffers are allocated, either both of the specified size when - writing, or one of the specified size and the other twice that size when - reading. A larger buffer size of, for example, 64K or 128K bytes will - noticeably increase the speed of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or 0 in case of error. The number of - uncompressed bytes written is limited to 8191, or one less than the buffer - size given to gzbuffer(). The caller should assure that this limit is not - exceeded. If it is exceeded, then gzprintf() will return an error (0) with - nothing written. In this case, there may also be a buffer overflow with - unpredictable consequences, which is possible only if zlib was compiled with - the insecure functions sprintf() or vsprintf() because the secure snprintf() - or vsnprintf() functions were not available. This can be determined using - zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or a - newline character is read and transferred to buf, or an end-of-file - condition is encountered. If any characters are read or if len == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, then the buffer is left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter flush - is as in the deflate() function. The return value is the zlib error number - (see function gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatented gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed file. This position represents a number of bytes in the - uncompressed data stream, and is zero when starting, even if appending or - reading a gzip stream from the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Returns the current offset in the file being read or written. This offset - includes the count of bytes that precede the gzip stream, for example when - appending or when using gzdopen() for reading. When reading, the offset - does not include as yet unused buffered input. This information can be used - for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator has been set while reading, - false (0) otherwise. Note that the end-of-file indicator is set only if the - read tried to go past the end of the input, but came up short. Therefore, - just like feof(), gzeof() may return false even if there is no more data to - read, in the event that the last read request was for the exact number of - bytes remaining in the input file. This will happen if the input file size - is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed file. errnum is set to zlib error number. If an error occurred - in the file system and not in the compression library, errnum is set to - Z_ERRNO and the application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is Z_NULL, this function returns the - required initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is Z_NULL, this function returns the required - initial value for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/build/premake/premake5/contrib/lua/README b/build/premake/premake5/contrib/lua/README deleted file mode 100644 index ed424defe0..0000000000 --- a/build/premake/premake5/contrib/lua/README +++ /dev/null @@ -1,6 +0,0 @@ - -This is Lua 5.3.5, released on 26 Jun 2018. - -For installation instructions, license details, and -further information about Lua, see doc/readme.html. - diff --git a/build/premake/premake5/contrib/lua/doc/contents.html b/build/premake/premake5/contrib/lua/doc/contents.html deleted file mode 100644 index c4eb267790..0000000000 --- a/build/premake/premake5/contrib/lua/doc/contents.html +++ /dev/null @@ -1,619 +0,0 @@ - - - -Lua 5.3 Reference Manual - contents - - - - - - - -

-Lua -Lua 5.3 Reference Manual -

- -

-The reference manual is the official definition of the Lua language. -
-For a complete introduction to Lua programming, see the book -Programming in Lua. - -

- -

- -Copyright © 2015–2018 Lua.org, PUC-Rio. -Freely available under the terms of the -Lua license. - - -

Contents

- - -

Index

- - - - - - - - - - - - - - diff --git a/build/premake/premake5/contrib/lua/doc/index.css b/build/premake/premake5/contrib/lua/doc/index.css deleted file mode 100644 index c961835731..0000000000 --- a/build/premake/premake5/contrib/lua/doc/index.css +++ /dev/null @@ -1,21 +0,0 @@ -ul { - list-style-type: none ; -} - -ul.contents { - padding: 0 ; -} - -table { - border: none ; - border-spacing: 0 ; - border-collapse: collapse ; -} - -td { - vertical-align: top ; - padding: 0 ; - text-align: left ; - line-height: 1.25 ; - width: 15% ; -} diff --git a/build/premake/premake5/contrib/lua/doc/logo.gif b/build/premake/premake5/contrib/lua/doc/logo.gif deleted file mode 100644 index 5c77eacc3b8f397fb2e87d2aaecd89128e53a117..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9893 zcmZ`JAZZ!6FBhF{g-pRY z?mq`C!p1xV^4?ZTR7k~j;V9G1HDS87U+{!}P$o&rgc4zX0NDT~riS`~QEcMXc4?@W z^+STR)$~fm_`ABgqdI|BbFIpHF{r}hP+etgD8-NQs7W75NaJI?Ql(hqjVakK+HRty zUXfx9(Bq-+-?*K3uw9ID@9?*;-eo#?myt-t^)SGPba%#*OB5Fu=j7)HeEWuc=*-K) z!oqjj0S)u!&5gi;Bahobc>^^a9XUOHT z2|mFhODfM>_&5x-TrvTHjN4n=t}cJHz|Oj&#(Ac#A<;QYj?%w(I{6NHetKEy88L^C$rQ3l)#a6 zoT#z!d-$MNnQ|f0h4|+;?CDm7g1UnqCpv3AVbZ0g!y5D)ht6oJG9OD4(C|vg-ir+_ zH4QGgnPSh+=ffel34{g3QbJKkb?GxJXlu)W&M4!QB^7H4b450C&zK>m4Sy@4- z6QwcXU;C4g#1AgjGlY}HQLNi?RV^MlIy=8Y#lo5nG5DcI$LoBU)7F-?yK5#MO(ZKV z4S#la_H=)P#gQKG^HdgSn#J9BwwdVYIM>{c*8F@wEO$d}R+sxjn>$#7D0Sp=?`**6 zSgb455aPSEq?K#BY9czOB~w zbadnT{PaZ|6MyUb3JQ8>r#+FkD@XhNG?}o-!{}_4A*5_Nyi-4?sw$?YhV}1AdjC?B zgUxkSi}=^CG*t3gMjJh01>e6T@3$!ESeZ^i-|I!u zS;Y;*lPMP-5pj1|J68PThiJLljogBy_@_?@umOG-J7a9_muB|%_5%Y0xG`uvyho24 zIB%XLJt0uPbhhSAqhnKw*C!-wew~ll#zHvKqtx}hu;K?rot-)2DP`g3vIG)P#bW#V z#78r@yHnXrnbSui-|;3*m#OEgl|Ar3-?ZbLj*ECy&1Z-(e4BAv822YtIM?~_>A{XCM0gm<2F`yi=~k^Qpkaj;z9R!JMds*m*#io0jdc7= z_32qZaeQ{RyoLtu;NW0GM#|0W?QI53?3wlUfYmFzOS9J|wG7ON3R+r2E3FBfX*p?^~m1 z6V|U~sT|y#!d_|FC~juNn3R-(U?c)K1cYB-XL+RJsusn5sJ+RfCJjfoveJPB2E8VY ze>-6GiZ=08p%V7#QAzD2(fGeZ=h&GUh!qrTD!o3Hx0HW92SHt(m5Rzw1vQg>ESIRL zceqjS=8oh<74zz*;XjH7mM-Q|N>rkd^6&&UHrgsF*A*1*Ny>erU}PL7XDcg0?d{O* z1OHq$wC4kBW@%Z_)RY<-8R=VoJu1hW%$PbbR=GYYPsi<1pLKq2BJ*9&lH*Mr1@h?- zk$H2rr%((U;g63+%JFe|?|D5i*-R){z1;cs_IMilux#weYs=fwFeyZelpm6zO3TXT zYfVu=SRoN`fR)c~#H3%xLrrVG){XLs%W+C*j!X)3XXS=o9L4Y7Y4c4Nn3e6iqIP!B$P!~=+%bVCorwZbea_d%{9_@+x)gMD z!A=L1w$D$>lAk8s9b;tVXJZqwMyRqA-fVf9jLHaCqMT)d%(`(nU#mfn-S)W6#P; z=3~G1aSyeny@xz{sqe(QAtQ%m7HZiLcGoU!#=I^tB;>)$tUp@4#&}2onV7?oPE35i zlo$@3HMJv8Y>)4(2i;^?lJIo!@e!ZH+B3jmXa9^CL-NPx#NG&|6hO2b&vPRZ#5%&5>oeqS2brR1*C$NtWqMvwVDOx5Y@S#^ z&_6%4yRdnC(v!H)L}^Ka+LW}D-Cm1w)+quD5+xy*Ed+psxoShNndF8Bm$M#>koguj z6f7);EM(I_VR11rgmli6^)M>r$(5Du>ykxlf{`JnO5?K)MC~1O8|-vR+p3I8AN~*= zT@6_!CDC>&*w)uvnR50H4tI|iW17v5G!4tni~8OiB$0i{-skaNkDJ7=p?>-!QAtuK zGH&qwyZv(MezW5r9PF&?$r6pDH(b=RG{xXlS@d8_Q?g~x9Zwmx@oP1+_x>s#?yX&A zJ<$i~41SNKh86dSYQui}G5(udqd)BUytgYi|Dx4(X$bQst#fSOqxZjt63ThVELa(< z=wI@Opzy_vOv)kuWxt8eUN7D5>|Apl8>nubM5%c9f7!7;r$k%CGhCKXT2 z-k!qzYR%Czzyy-azx++9a_n;OQf4Lr3KX3NpT!_=3b$18MH`>vz-i^}tMTVUZ z>>6?`x}LOt@qT{D&)`uV`Y3Z+ZZooW)2=6EW~SdY0o?^b4jI6ZC)@y&ZP@Uz`5D7Z zl7dqFba9n&vrI2DRB5j@vG&K0)N-wxvoW8ny|(k~ASD{ZgPGTs%RJA)pGADun)w|a z9dCPO-ENNA_?|AQmW!TZVZ#avB>&ydPA~a9V`hh<#3X&+zS}w3vd~Kp=B*6_p}bcV zUE^_+>f5sHi>P1s`6V5{K_R*fd;9HOnbE7L83#ush~4-^y8hd8)pE5F z;(t~CR|ixR&)!V>9E-Q}W7qM?>PHTG9O>l`kbNR(){jzBZ*ds4KT^iK9nC2MFeUHP z9338RB2IKBlpAx=O+0EmU0UsJqgAF_Yqf}8Q@d%~4+9$z#-MfW^efyWWMSd6uGf_+ zqjn?n8k;pT-XZ&lpw~#O~n_8?Twhc9ed6YFyb#LI=KCJ zvxB&XLT&i`?-Sp}FiYifPlEId6de`PfSdd$>PIn)jd(&d4rO4 z)`gJ$(5q|9mZSEj+U-Jyj68(nd8|~`FqMr8&xOZFD(-ejPhfMcleKc;TX^`F^Q}P@ zH8mx*zim<8h~pUTMM@?2#=mgs!BWd|-=d!OJHi|z39ur+V?Et3D{3|8<={wSG3*04*38Uo_r^=G9s|a2cvz-V z?>h*Y_J3Cw*8EqJ+E0vUf*#IF9rqE@D5hP3xQMXi$A5?SFx~#$VJzA8YVz(7Q})(U6RbGxnUHX$I?6)oBrzO(9Gijguu~Q)mrI3TvYr5V zlecf*E;%n+iHt!C3&ov}`Pd8MvETwj-e6#3A9{!ob!->gJ&Dyi?9fPmit;{cNQQD} zRloJu`6cIqVp~w*ZEHNPfMO=t?uJUuz+PjK>|*NYH$DV0sZDM5xKUD4+E5i?XUAS~ z&ENey8k;>nVL)7Oe!#gxo%g+OLzzHbZ^Q#Hr?fQO-~Uyl_=%{Dwe=v}>VpS~e)Zfd zq6(`zp2q6M3EN{ptaCKVO!w*q^{zTx5U{s93}a&p(^r#9_g$4P^C zhOAD1#@AZmX9yCK(qOMLy4SZxI3t?z`q%(R0dXh+nA(Xct8Ixl9UWcRw{PM_lWt44 zii-UG-&9%8)deq&#<(253+VH6aJtz4m08Z|cR8Fh9?iD7Y$R^gm6wr0OlHzMRz(`> zc#of!mL@4Fxf?IyQ+0dVt(2A~UOH1LC^|9d2W<@XX~FiNC;9vL0sMRjA2{kA)_ivs zeWeS@SXj{VCnOyl*v3ad<_MUZ(*T3SXZzS^K0w(^57NRwPnw6=RAub}_Hv4CRcFz|73xTIY87ZN%Eu-R<#d?Y0Mk9Z}Bv zYr7mCuc_(%=s#ii#emwHHkH8m#t`<|2Vzt7Ll=jtqy z)$u#R!;`EfUY`u5UOo|I+42}XT)zUCA%0A-^7`I=ZfR-o#M>pI(&x#FQO~-wA&6X` z)yeVAwEKme93k?X@U%31d;)%TT8MV@)M27H{Ks-Nz!g>w@Q)m&r)ECy?&D|eyj2WD z5o~z@y`E18lT9aWgGMI%u|qa35ieo1_7QK4-^D*)V(2O9s-SjK2ozF~_xSI1JUn=b zy>CfBmtzObTZ)&fd8j^&zW*o2Cny~%la4)hePrQ&alp>0b+@msxA}OtZYdw5sBHN6 ztY2{B#7A&&qxUPlZbskj8B0%J@YVO!y3g-G)<+CB0VRNfvmr2^%A)G?(XzvKx_J8c@z3|&{Jf#Q6hf-12#XCn z7r*I(05aTlBn=FvRV={-z0+e8P%4{pPQ2F+ylIcnR!zi{>dI$k4-)qKT;6A1muF^S zK@RG@;X6RE3#zLPC5zl$yRohr!qFKRGMCf%c85Adviqy5tKWrm?BiqK zJlr6{$2}y}emwh4R~Zu<+v)!rAvhG56B@nNgK8~TG-+s&BVCBA0)MH6Qz1MY zE!g%GI++q<31}P~DeNho66M2rTY);Fw)_xu*nZscis(d#~c9jyj zlO_C&>f}=Bs;a6})6=1f$k$?UuQo zZj|=1ToL2BBQGZkFdJ#5n4sGI_w=9=6GwLu$gdFr zh@3YGgbkL}(_R~PjdJ9F=gAn_f;2xJN7|XcD)GfrMW1)WQ8+fEHZ(*N2vyEHta{ym zJ9?aozqKTFj7fv5GVqnYQ;U7M9$e-XJy*c9ovSeEAX* z_qjGGA8%scLJA^GI>}8 z0u=`bV!4{EnHef=;?l|Mk|G&AF^v?P#5t_BW^7QU-Bp)8{tk;~`REdzZuECUqksL% z({@#k_d|!*Zz7-EdY61|W+q6R@mAYKgEF4Y!6Z-K>LVxg*3OQyfuyN0BkoWHzR ze@`Hb)#sM}c1JEkE<$Ag03DiREQpYh&<73>=auitEdPKE5Zio;M8>8#N3>mg$0#?fpooPYP3zvz$nr7G*V7M zL14Z_bdBXaYg~N14k9WJj)Z~&Du{QYWN+27M0$-FY3mA?660V3@hEr#80d}w6uBc2 z&xqbW5PdYDPRl#h-K81fsXxHpZz5AyS!#Y)UzBun<3>V4@)GI(`I&(y^V|Nuxg|$> ze-xu$mXxC-bvJjTp)D$GT`3va6usUGXWYHK56@_&k5|l4vR1Rs&x#osT?6V=nbSGf zNgVWviClW^l>IX%D-Hsnz=(>8T~WS@?M&=}0=Gz!$qFHiCcqgvoX^J_MPyEqLP0_T zb4;*2p#vi+Gj-|xXMBA0c)93JEa7Bg!0Ez*S5~L7_vr6)zKF6xBOtNG78De$aK-4l zeXw5Q`YxaS?ekGnkbI$1mB|Q9bQHQsm_-1i4t)GUm|kp&@+NF2q~fM^;guaSW5drtx9X1l{5mNq(_-&+XiTn`hG7xNubGh-OWvXylx2D+uyhNHEuTL`TXFZQESqr z@1Eb*h7^$7wv@4yyalP)=k5 ztp@8qNET4Yfq*ppnVftWU#Mi{zggx?1(g1hR?AF7gL#a<0p2DqkruOp>mR#??h!I0 zR-@x!50K!O9L8=}OuaAjnD3C{Cg-mEz^5}70Z{c=dST~_(OVbQUEHQ(>p!wd^mKqDerqMHD0f3E%r6}(tKvECnk z>(}yvt*>g`NS`kR``z|Sx)B}Knx6mB7#X>$cNmgf9t?h|w!Pd{EG=yrimJ8SROySp zxuRb~X=L@Xny;x`ErtJobBCTDE_E2|(CyLn{pxKWFOZv&h2JqMsGF|GO01kDe+PLy zCZ(8^n>%hm63f2HmqH2?iyi3eCughAUJ3jj;WSJ(drz_eRlI$h2K7!_=*#0RE{Ao- z{*C5-|KIZRazbu<7{D8Zh5h?Y13)cK=N#LbkXY?s#|?c8LrbUScHD&FT@po=jF7=Q zJI5p{jk#{)GgMSu>}TW67Q*eI6dHvD9)d)Qv9+aheE8Q%){c!2T~2dz&_sUSJl^?GmyDOdBCvz1``m^V5AmdwV#F{P!Yxje4v0fRqp zR0c8$iZ^pI5Eo^>9~8zQBpiJV?j}{#S(bKkib!XHvlbwrhY>}irA;d-W^Q^~(ea4e zl0Mr=%l4D*`m}qM3wX^%3z*^8)%&}$Pbt3P> zOI`DB@Oua*(rNKvFMnQaQ+!Zge6uu-jy?DDE9}LNN5%DPX8foO0k5=z0*XJA%Lm9y ztbj*;>5IhMb>xX|4e|g(z<0lEnM5zuuOs!7$(B5nUNdeqKYH|f!C65=1I!#H6_sfR z=11rir@n9RK8cG5s}JUTpuT(eJ6@i#@aGiQ8q^L#V}Pi6={Kru?FEmZD@?f}3`I;l z;N&?eL*5j)-;QP$&9%6V!Icvenn?mi!1w&9^B-mEvpr8HKt003u*hp~LzSO_-gw)I z^7mfb?O_#4x-f(IQQz9d;Oi<$@=)a`&r@G0chPW81!^O{>$xM(O#*HriRwpQA=EX3 z)q(Zueoq!$w_u^GFC6J^H_I;EZhw9?J3(@DrR%MAF1?v>rYjb&#x|B z5wUP^;**nilr?XOC|@QARsjTzb= zPGt)L{w+KLLbZnHC*_LSkkb&sA8R{;dV%7T@fN$QuPe${#(dgB1s@H9#(J0-7`DM} zDJUqIO-BjG&iP#b#ERz|OqZ(89XU4yh4PD;6~_@jyE2xP#6BLHKCs}*EZwjFB`Yc6 z0b|q!M&DE5=u=!zZv>7aH731o3vN^&n@_hdwLfe?ON)8E<$S*%bh7($vo%BGkKhQL zqKmEgPhOFT`v?)e!oXPs(1~bKHy8;T@`2sy6zKR1nfzs$S`zr7AgVnd7He-uT};rh z*gcgFZigXx)L&RrLn9+EOZVsMY`H{Vbge06VuxE>%?2;e0%_=3A)8MB4?w@Z8_rB8 zWPUxSzs?4&-QpUHB5(^FJ`A7AS5mo6Q4Msp|kLZhOt3Y&C` zRp8q$3q{o`2t|wv(n@LB7#R4k-Uic=H^OCSRqXJtrjERL4#q>QE$|z-aHeBf+eZzn zebx;(4rkY}-rUeC>gvF8IvJmt>HD2Xm&$D5ze)ksDA%0K$X@GlgXerA&<#W>E<(ne zlk_pfilr|2pbP*qG}^t<4`$`b_;n7{O>q@5X=rIT0#F1DMDS_WA zWNXXpvh0++8j2!fi*)&6r%G^q{%gO!S#C~FFa{MZ4gHU9eX~BJ{SI>{5~-Ec>eoUu zndqE>Qz{H#Q$Y$hTi6TFm5sXO9vRXn4JRusEHtb8oR`lZ4c~Um3oDF*D)~KzLLEj< zM~46lYXldOAt9MlS=IP^Nl8Fbk{l1u(gSyJAaz)z3I-OI@Rz*c1WX1H^%PVVz|8~O zE^@R+ec87V^{X{*Z#Sdy04dRvD_;?gqaZ{^OCOonX{;6mwFubrnDFzm1Vz;0KkMq; z603#?5Z&5tl9I4TGkN>LmWx!d{JFWgiExTe-vE`N*l06rN#-yV{Z zmKLUr_Y!)v29ArE*lXIvaO0sQ7J!kX5AWK(%xOSp%2Bb-kMMdf%cP8$K%%Yg{&iI8 zLy9H`I|JUt4jRd1@?e$Ew3|<@L!{zB=>UmiV`Ib9W?UW@TQ$46xfxv3ZnX6Sw`T)& z4^$^fkmWiOrT+y}hvP=Q><17rFdzl&!Q-TLwkU?z=Zl6U#8$PM8sw&nF~Opm8uUcz z-aN4gpf)$ni(KFXa2}Cp8usb85tYDcFb-k3J!vSsEeNWgkcO046OYr z{Pf~Ng@%Tv^V4T5C@KmmDxv|ZYGi5}pO(g>pKv_VRTT@F1+IT{xw)>AlK+Gm1vfWP z`h6yCF!&dfr3;12j?%k&zf_MeEc`B3%zxZqV8_JG%74{BrW8l<;yDQkL3MU^ib_bt z$HaUzH>XWaO@%@${PAKDC@6e%a$={Uq4C1a*_lGBI1(#S$y1B5Vy~sbIHg zXlS_TBd{4CAO8qA92mL7LrYe+$|)KmDcpLkj;L`AxUa0Kwp@fju)Rw4ESvsaq4Nva z^FaB+AS7H$$Mjh53i3+nShux3oMWM-qqF151Vs4H#DtK&J!_eIpscPg0R-yyDh@@= zCfjvk8=@y5_kgd#`0twjR-;WEPGdhXX>VISeU@4^LTa0+cn3CNy>}GTa5OS-H0Ck1 zHwGsND>DlR0}Cqy^9L0cW*$~{9#(D!W>y|%X0efPKmV(Nm5tF?6Sx1};6n@t9B2TM M5|b0H5Z3qqKj-ldMF0Q* diff --git a/build/premake/premake5/contrib/lua/doc/lua.1 b/build/premake/premake5/contrib/lua/doc/lua.1 deleted file mode 100644 index d728d0b80c..0000000000 --- a/build/premake/premake5/contrib/lua/doc/lua.1 +++ /dev/null @@ -1,112 +0,0 @@ -.\" $Id: lua.man,v 1.14 2016/10/17 15:43:50 lhf Exp $ -.TH LUA 1 "$Date: 2016/10/17 15:43:50 $" -.SH NAME -lua \- Lua interpreter -.SH SYNOPSIS -.B lua -[ -.I options -] -[ -.I script -[ -.I args -] -] -.SH DESCRIPTION -.B lua -is the standalone Lua interpreter. -It loads and executes Lua programs, -either in textual source form or -in precompiled binary form. -(Precompiled binaries are output by -.BR luac , -the Lua compiler.) -.B lua -can be used as a batch interpreter and also interactively. -.LP -The given -.I options -are handled in order and then -the Lua program in file -.I script -is loaded and executed. -The given -.I args -are available to -.I script -as strings in a global table named -.BR arg . -If no options or arguments are given, -then -.B "\-v \-i" -is assumed when the standard input is a terminal; -otherwise, -.B "\-" -is assumed. -.LP -In interactive mode, -.B lua -prompts the user, -reads lines from the standard input, -and executes them as they are read. -If the line contains an expression or list of expressions, -then the line is evaluated and the results are printed. -If a line does not contain a complete statement, -then a secondary prompt is displayed and -lines are read until a complete statement is formed or -a syntax error is found. -.LP -At the very start, -before even handling the command line, -.B lua -checks the contents of the environment variables -.B LUA_INIT_5_3 -or -.BR LUA_INIT , -in that order. -If the contents is of the form -.RI '@ filename ', -then -.I filename -is executed. -Otherwise, the string is assumed to be a Lua statement and is executed. -.SH OPTIONS -.TP -.BI \-e " stat" -execute statement -.IR stat . -.TP -.B \-i -enter interactive mode after executing -.IR script . -.TP -.BI \-l " name" -execute the equivalent of -.IB name =require(' name ') -before executing -.IR script . -.TP -.B \-v -show version information. -.TP -.B \-E -ignore environment variables. -.TP -.B \-\- -stop handling options. -.TP -.B \- -stop handling options and execute the standard input as a file. -.SH "SEE ALSO" -.BR luac (1) -.br -The documentation at lua.org, -especially section 7 of the reference manual. -.SH DIAGNOSTICS -Error messages should be self explanatory. -.SH AUTHORS -R. Ierusalimschy, -L. H. de Figueiredo, -W. Celes -.\" EOF diff --git a/build/premake/premake5/contrib/lua/doc/lua.css b/build/premake/premake5/contrib/lua/doc/lua.css deleted file mode 100644 index cbd0799d15..0000000000 --- a/build/premake/premake5/contrib/lua/doc/lua.css +++ /dev/null @@ -1,161 +0,0 @@ -html { - background-color: #F8F8F8 ; -} - -body { - background-color: #FFFFFF ; - color: #000000 ; - font-family: Helvetica, Arial, sans-serif ; - text-align: justify ; - line-height: 1.25 ; - margin: 16px auto ; - padding: 32px ; - border: solid #ccc 1px ; - border-radius: 20px ; - max-width: 70em ; - width: 90% ; -} - -h1, h2, h3, h4 { - color: #000080 ; - font-family: Verdana, Geneva, sans-serif ; - font-weight: normal ; - font-style: normal ; - text-align: left ; -} - -h1 { - font-size: 28pt ; -} - -h1 img { - vertical-align: text-bottom ; -} - -h2:before { - content: "\2756" ; - padding-right: 0.5em ; -} - -a { - text-decoration: none ; -} - -a:link { - color: #000080 ; -} - -a:link:hover, a:visited:hover { - background-color: #D0D0FF ; - color: #000080 ; - border-radius: 4px ; -} - -a:link:active, a:visited:active { - color: #FF0000 ; -} - -div.menubar { - padding-bottom: 0.5em ; -} - -p.menubar { - margin-left: 2.5em ; -} - -.menubar a:hover { - margin: -3px -3px -3px -3px ; - padding: 3px 3px 3px 3px ; - border-radius: 4px ; -} - -:target { - background-color: #F0F0F0 ; - margin: -8px ; - padding: 8px ; - border-radius: 8px ; - outline: none ; -} - -hr { - display: none ; -} - -table hr { - background-color: #a0a0a0 ; - color: #a0a0a0 ; - border: 0 ; - height: 1px ; - display: block ; -} - -.footer { - color: gray ; - font-size: x-small ; - text-transform: lowercase ; -} - -input[type=text] { - border: solid #a0a0a0 2px ; - border-radius: 2em ; - background-image: url('images/search.png') ; - background-repeat: no-repeat ; - background-position: 4px center ; - padding-left: 20px ; - height: 2em ; -} - -pre.session { - background-color: #F8F8F8 ; - padding: 1em ; - border-radius: 8px ; -} - -table { - border: none ; - border-spacing: 0 ; - border-collapse: collapse ; -} - -td { - padding: 0 ; - margin: 0 ; -} - -td.gutter { - width: 4% ; -} - -table.columns td { - vertical-align: top ; - padding-bottom: 1em ; - text-align: justify ; - line-height: 1.25 ; -} - -table.book td { - vertical-align: top ; -} - -table.book td.cover { - padding-right: 1em ; -} - -table.book img { - border: solid #000080 1px ; -} - -table.book span { - font-size: small ; - text-align: left ; - display: block ; - margin-top: 0.25em ; -} - -p.logos a:link:hover, p.logos a:visited:hover { - background-color: inherit ; -} - -img { - background-color: white ; -} diff --git a/build/premake/premake5/contrib/lua/doc/luac.1 b/build/premake/premake5/contrib/lua/doc/luac.1 deleted file mode 100644 index 33a4ed00ac..0000000000 --- a/build/premake/premake5/contrib/lua/doc/luac.1 +++ /dev/null @@ -1,118 +0,0 @@ -.\" $Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp $ -.TH LUAC 1 "$Date: 2011/11/16 13:53:40 $" -.SH NAME -luac \- Lua compiler -.SH SYNOPSIS -.B luac -[ -.I options -] [ -.I filenames -] -.SH DESCRIPTION -.B luac -is the Lua compiler. -It translates programs written in the Lua programming language -into binary files containing precompiled chunks -that can be later loaded and executed. -.LP -The main advantages of precompiling chunks are: -faster loading, -protecting source code from accidental user changes, -and -off-line syntax checking. -Precompiling does not imply faster execution -because in Lua chunks are always compiled into bytecodes before being executed. -.B luac -simply allows those bytecodes to be saved in a file for later execution. -Precompiled chunks are not necessarily smaller than the corresponding source. -The main goal in precompiling is faster loading. -.LP -In the command line, -you can mix -text files containing Lua source and -binary files containing precompiled chunks. -.B luac -produces a single output file containing the combined bytecodes -for all files given. -Executing the combined file is equivalent to executing the given files. -By default, -the output file is named -.BR luac.out , -but you can change this with the -.B \-o -option. -.LP -Precompiled chunks are -.I not -portable across different architectures. -Moreover, -the internal format of precompiled chunks -is likely to change when a new version of Lua is released. -Make sure you save the source files of all Lua programs that you precompile. -.LP -.SH OPTIONS -.TP -.B \-l -produce a listing of the compiled bytecode for Lua's virtual machine. -Listing bytecodes is useful to learn about Lua's virtual machine. -If no files are given, then -.B luac -loads -.B luac.out -and lists its contents. -Use -.B \-l \-l -for a full listing. -.TP -.BI \-o " file" -output to -.IR file , -instead of the default -.BR luac.out . -(You can use -.B "'\-'" -for standard output, -but not on platforms that open standard output in text mode.) -The output file may be one of the given files because -all files are loaded before the output file is written. -Be careful not to overwrite precious files. -.TP -.B \-p -load files but do not generate any output file. -Used mainly for syntax checking and for testing precompiled chunks: -corrupted files will probably generate errors when loaded. -If no files are given, then -.B luac -loads -.B luac.out -and tests its contents. -No messages are displayed if the file loads without errors. -.TP -.B \-s -strip debug information before writing the output file. -This saves some space in very large chunks, -but if errors occur when running a stripped chunk, -then the error messages may not contain the full information they usually do. -In particular, -line numbers and names of local variables are lost. -.TP -.B \-v -show version information. -.TP -.B \-\- -stop handling options. -.TP -.B \- -stop handling options and process standard input. -.SH "SEE ALSO" -.BR lua (1) -.br -The documentation at lua.org. -.SH DIAGNOSTICS -Error messages should be self explanatory. -.SH AUTHORS -R. Ierusalimschy, -L. H. de Figueiredo, -W. Celes -.\" EOF diff --git a/build/premake/premake5/contrib/lua/doc/manual.css b/build/premake/premake5/contrib/lua/doc/manual.css deleted file mode 100644 index aa0e677dd5..0000000000 --- a/build/premake/premake5/contrib/lua/doc/manual.css +++ /dev/null @@ -1,21 +0,0 @@ -h3 code { - font-family: inherit ; - font-size: inherit ; -} - -pre, code { - font-size: 12pt ; -} - -span.apii { - color: gray ; - float: right ; - font-family: inherit ; - font-style: normal ; - font-size: small ; -} - -h2:before { - content: "" ; - padding-right: 0em ; -} diff --git a/build/premake/premake5/contrib/lua/doc/manual.html b/build/premake/premake5/contrib/lua/doc/manual.html deleted file mode 100644 index 89a642a45d..0000000000 --- a/build/premake/premake5/contrib/lua/doc/manual.html +++ /dev/null @@ -1,10982 +0,0 @@ - - - -Lua 5.3 Reference Manual - - - - - - - -

-Lua -Lua 5.3 Reference Manual -

- -

-by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes - -

- -Copyright © 2015–2018 Lua.org, PUC-Rio. -Freely available under the terms of the -Lua license. - - -

- - -

- - - - - - -

1 – Introduction

- -

-Lua is a powerful, efficient, lightweight, embeddable scripting language. -It supports procedural programming, -object-oriented programming, functional programming, -data-driven programming, and data description. - - -

-Lua combines simple procedural syntax with powerful data description -constructs based on associative arrays and extensible semantics. -Lua is dynamically typed, -runs by interpreting bytecode with a register-based -virtual machine, -and has automatic memory management with -incremental garbage collection, -making it ideal for configuration, scripting, -and rapid prototyping. - - -

-Lua is implemented as a library, written in clean C, -the common subset of Standard C and C++. -The Lua distribution includes a host program called lua, -which uses the Lua library to offer a complete, -standalone Lua interpreter, -for interactive or batch use. -Lua is intended to be used both as a powerful, lightweight, -embeddable scripting language for any program that needs one, -and as a powerful but lightweight and efficient stand-alone language. - - -

-As an extension language, Lua has no notion of a "main" program: -it works embedded in a host client, -called the embedding program or simply the host. -(Frequently, this host is the stand-alone lua program.) -The host program can invoke functions to execute a piece of Lua code, -can write and read Lua variables, -and can register C functions to be called by Lua code. -Through the use of C functions, Lua can be augmented to cope with -a wide range of different domains, -thus creating customized programming languages sharing a syntactical framework. - - -

-Lua is free software, -and is provided as usual with no guarantees, -as stated in its license. -The implementation described in this manual is available -at Lua's official web site, www.lua.org. - - -

-Like any other reference manual, -this document is dry in places. -For a discussion of the decisions behind the design of Lua, -see the technical papers available at Lua's web site. -For a detailed introduction to programming in Lua, -see Roberto's book, Programming in Lua. - - - -

2 – Basic Concepts

- -

-This section describes the basic concepts of the language. - - - -

2.1 – Values and Types

- -

-Lua is a dynamically typed language. -This means that -variables do not have types; only values do. -There are no type definitions in the language. -All values carry their own type. - - -

-All values in Lua are first-class values. -This means that all values can be stored in variables, -passed as arguments to other functions, and returned as results. - - -

-There are eight basic types in Lua: -nil, boolean, number, -string, function, userdata, -thread, and table. -The type nil has one single value, nil, -whose main property is to be different from any other value; -it usually represents the absence of a useful value. -The type boolean has two values, false and true. -Both nil and false make a condition false; -any other value makes it true. -The type number represents both -integer numbers and real (floating-point) numbers. -The type string represents immutable sequences of bytes. - -Lua is 8-bit clean: -strings can contain any 8-bit value, -including embedded zeros ('\0'). -Lua is also encoding-agnostic; -it makes no assumptions about the contents of a string. - - -

-The type number uses two internal representations, -or two subtypes, -one called integer and the other called float. -Lua has explicit rules about when each representation is used, -but it also converts between them automatically as needed (see §3.4.3). -Therefore, -the programmer may choose to mostly ignore the difference -between integers and floats -or to assume complete control over the representation of each number. -Standard Lua uses 64-bit integers and double-precision (64-bit) floats, -but you can also compile Lua so that it -uses 32-bit integers and/or single-precision (32-bit) floats. -The option with 32 bits for both integers and floats -is particularly attractive -for small machines and embedded systems. -(See macro LUA_32BITS in file luaconf.h.) - - -

-Lua can call (and manipulate) functions written in Lua and -functions written in C (see §3.4.10). -Both are represented by the type function. - - -

-The type userdata is provided to allow arbitrary C data to -be stored in Lua variables. -A userdata value represents a block of raw memory. -There are two kinds of userdata: -full userdata, -which is an object with a block of memory managed by Lua, -and light userdata, -which is simply a C pointer value. -Userdata has no predefined operations in Lua, -except assignment and identity test. -By using metatables, -the programmer can define operations for full userdata values -(see §2.4). -Userdata values cannot be created or modified in Lua, -only through the C API. -This guarantees the integrity of data owned by the host program. - - -

-The type thread represents independent threads of execution -and it is used to implement coroutines (see §2.6). -Lua threads are not related to operating-system threads. -Lua supports coroutines on all systems, -even those that do not support threads natively. - - -

-The type table implements associative arrays, -that is, arrays that can have as indices not only numbers, -but any Lua value except nil and NaN. -(Not a Number is a special value used to represent -undefined or unrepresentable numerical results, such as 0/0.) -Tables can be heterogeneous; -that is, they can contain values of all types (except nil). -Any key with value nil is not considered part of the table. -Conversely, any key that is not part of a table has -an associated value nil. - - -

-Tables are the sole data-structuring mechanism in Lua; -they can be used to represent ordinary arrays, lists, -symbol tables, sets, records, graphs, trees, etc. -To represent records, Lua uses the field name as an index. -The language supports this representation by -providing a.name as syntactic sugar for a["name"]. -There are several convenient ways to create tables in Lua -(see §3.4.9). - - -

-Like indices, -the values of table fields can be of any type. -In particular, -because functions are first-class values, -table fields can contain functions. -Thus tables can also carry methods (see §3.4.11). - - -

-The indexing of tables follows -the definition of raw equality in the language. -The expressions a[i] and a[j] -denote the same table element -if and only if i and j are raw equal -(that is, equal without metamethods). -In particular, floats with integral values -are equal to their respective integers -(e.g., 1.0 == 1). -To avoid ambiguities, -any float with integral value used as a key -is converted to its respective integer. -For instance, if you write a[2.0] = true, -the actual key inserted into the table will be the -integer 2. -(On the other hand, -2 and "2" are different Lua values and therefore -denote different table entries.) - - -

-Tables, functions, threads, and (full) userdata values are objects: -variables do not actually contain these values, -only references to them. -Assignment, parameter passing, and function returns -always manipulate references to such values; -these operations do not imply any kind of copy. - - -

-The library function type returns a string describing the type -of a given value (see §6.1). - - - - - -

2.2 – Environments and the Global Environment

- -

-As will be discussed in §3.2 and §3.3.3, -any reference to a free name -(that is, a name not bound to any declaration) var -is syntactically translated to _ENV.var. -Moreover, every chunk is compiled in the scope of -an external local variable named _ENV (see §3.3.2), -so _ENV itself is never a free name in a chunk. - - -

-Despite the existence of this external _ENV variable and -the translation of free names, -_ENV is a completely regular name. -In particular, -you can define new variables and parameters with that name. -Each reference to a free name uses the _ENV that is -visible at that point in the program, -following the usual visibility rules of Lua (see §3.5). - - -

-Any table used as the value of _ENV is called an environment. - - -

-Lua keeps a distinguished environment called the global environment. -This value is kept at a special index in the C registry (see §4.5). -In Lua, the global variable _G is initialized with this same value. -(_G is never used internally.) - - -

-When Lua loads a chunk, -the default value for its _ENV upvalue -is the global environment (see load). -Therefore, by default, -free names in Lua code refer to entries in the global environment -(and, therefore, they are also called global variables). -Moreover, all standard libraries are loaded in the global environment -and some functions there operate on that environment. -You can use load (or loadfile) -to load a chunk with a different environment. -(In C, you have to load the chunk and then change the value -of its first upvalue.) - - - - - -

2.3 – Error Handling

- -

-Because Lua is an embedded extension language, -all Lua actions start from C code in the host program -calling a function from the Lua library. -(When you use Lua standalone, -the lua application is the host program.) -Whenever an error occurs during -the compilation or execution of a Lua chunk, -control returns to the host, -which can take appropriate measures -(such as printing an error message). - - -

-Lua code can explicitly generate an error by calling the -error function. -If you need to catch errors in Lua, -you can use pcall or xpcall -to call a given function in protected mode. - - -

-Whenever there is an error, -an error object (also called an error message) -is propagated with information about the error. -Lua itself only generates errors whose error object is a string, -but programs may generate errors with -any value as the error object. -It is up to the Lua program or its host to handle such error objects. - - -

-When you use xpcall or lua_pcall, -you may give a message handler -to be called in case of errors. -This function is called with the original error object -and returns a new error object. -It is called before the error unwinds the stack, -so that it can gather more information about the error, -for instance by inspecting the stack and creating a stack traceback. -This message handler is still protected by the protected call; -so, an error inside the message handler -will call the message handler again. -If this loop goes on for too long, -Lua breaks it and returns an appropriate message. -(The message handler is called only for regular runtime errors. -It is not called for memory-allocation errors -nor for errors while running finalizers.) - - - - - -

2.4 – Metatables and Metamethods

- -

-Every value in Lua can have a metatable. -This metatable is an ordinary Lua table -that defines the behavior of the original value -under certain special operations. -You can change several aspects of the behavior -of operations over a value by setting specific fields in its metatable. -For instance, when a non-numeric value is the operand of an addition, -Lua checks for a function in the field "__add" of the value's metatable. -If it finds one, -Lua calls this function to perform the addition. - - -

-The key for each event in a metatable is a string -with the event name prefixed by two underscores; -the corresponding values are called metamethods. -In the previous example, the key is "__add" -and the metamethod is the function that performs the addition. -Unless stated otherwise, -metamethods should be function values. - - -

-You can query the metatable of any value -using the getmetatable function. -Lua queries metamethods in metatables using a raw access (see rawget). -So, to retrieve the metamethod for event ev in object o, -Lua does the equivalent to the following code: - -

-     rawget(getmetatable(o) or {}, "__ev")
-
- -

-You can replace the metatable of tables -using the setmetatable function. -You cannot change the metatable of other types from Lua code -(except by using the debug library (§6.10)); -you should use the C API for that. - - -

-Tables and full userdata have individual metatables -(although multiple tables and userdata can share their metatables). -Values of all other types share one single metatable per type; -that is, there is one single metatable for all numbers, -one for all strings, etc. -By default, a value has no metatable, -but the string library sets a metatable for the string type (see §6.4). - - -

-A metatable controls how an object behaves in -arithmetic operations, bitwise operations, -order comparisons, concatenation, length operation, calls, and indexing. -A metatable also can define a function to be called -when a userdata or a table is garbage collected (§2.5). - - -

-For the unary operators (negation, length, and bitwise NOT), -the metamethod is computed and called with a dummy second operand, -equal to the first one. -This extra operand is only to simplify Lua's internals -(by making these operators behave like a binary operation) -and may be removed in future versions. -(For most uses this extra operand is irrelevant.) - - -

-A detailed list of events controlled by metatables is given next. -Each operation is identified by its corresponding key. - - - -

    - -
  • __add: -the addition (+) operation. -If any operand for an addition is not a number -(nor a string coercible to a number), -Lua will try to call a metamethod. -First, Lua will check the first operand (even if it is valid). -If that operand does not define a metamethod for __add, -then Lua will check the second operand. -If Lua can find a metamethod, -it calls the metamethod with the two operands as arguments, -and the result of the call -(adjusted to one value) -is the result of the operation. -Otherwise, -it raises an error. -
  • - -
  • __sub: -the subtraction (-) operation. -Behavior similar to the addition operation. -
  • - -
  • __mul: -the multiplication (*) operation. -Behavior similar to the addition operation. -
  • - -
  • __div: -the division (/) operation. -Behavior similar to the addition operation. -
  • - -
  • __mod: -the modulo (%) operation. -Behavior similar to the addition operation. -
  • - -
  • __pow: -the exponentiation (^) operation. -Behavior similar to the addition operation. -
  • - -
  • __unm: -the negation (unary -) operation. -Behavior similar to the addition operation. -
  • - -
  • __idiv: -the floor division (//) operation. -Behavior similar to the addition operation. -
  • - -
  • __band: -the bitwise AND (&) operation. -Behavior similar to the addition operation, -except that Lua will try a metamethod -if any operand is neither an integer -nor a value coercible to an integer (see §3.4.3). -
  • - -
  • __bor: -the bitwise OR (|) operation. -Behavior similar to the bitwise AND operation. -
  • - -
  • __bxor: -the bitwise exclusive OR (binary ~) operation. -Behavior similar to the bitwise AND operation. -
  • - -
  • __bnot: -the bitwise NOT (unary ~) operation. -Behavior similar to the bitwise AND operation. -
  • - -
  • __shl: -the bitwise left shift (<<) operation. -Behavior similar to the bitwise AND operation. -
  • - -
  • __shr: -the bitwise right shift (>>) operation. -Behavior similar to the bitwise AND operation. -
  • - -
  • __concat: -the concatenation (..) operation. -Behavior similar to the addition operation, -except that Lua will try a metamethod -if any operand is neither a string nor a number -(which is always coercible to a string). -
  • - -
  • __len: -the length (#) operation. -If the object is not a string, -Lua will try its metamethod. -If there is a metamethod, -Lua calls it with the object as argument, -and the result of the call -(always adjusted to one value) -is the result of the operation. -If there is no metamethod but the object is a table, -then Lua uses the table length operation (see §3.4.7). -Otherwise, Lua raises an error. -
  • - -
  • __eq: -the equal (==) operation. -Behavior similar to the addition operation, -except that Lua will try a metamethod only when the values -being compared are either both tables or both full userdata -and they are not primitively equal. -The result of the call is always converted to a boolean. -
  • - -
  • __lt: -the less than (<) operation. -Behavior similar to the addition operation, -except that Lua will try a metamethod only when the values -being compared are neither both numbers nor both strings. -The result of the call is always converted to a boolean. -
  • - -
  • __le: -the less equal (<=) operation. -Unlike other operations, -the less-equal operation can use two different events. -First, Lua looks for the __le metamethod in both operands, -like in the less than operation. -If it cannot find such a metamethod, -then it will try the __lt metamethod, -assuming that a <= b is equivalent to not (b < a). -As with the other comparison operators, -the result is always a boolean. -(This use of the __lt event can be removed in future versions; -it is also slower than a real __le metamethod.) -
  • - -
  • __index: -The indexing access operation table[key]. -This event happens when table is not a table or -when key is not present in table. -The metamethod is looked up in table. - - -

    -Despite the name, -the metamethod for this event can be either a function or a table. -If it is a function, -it is called with table and key as arguments, -and the result of the call -(adjusted to one value) -is the result of the operation. -If it is a table, -the final result is the result of indexing this table with key. -(This indexing is regular, not raw, -and therefore can trigger another metamethod.) -

  • - -
  • __newindex: -The indexing assignment table[key] = value. -Like the index event, -this event happens when table is not a table or -when key is not present in table. -The metamethod is looked up in table. - - -

    -Like with indexing, -the metamethod for this event can be either a function or a table. -If it is a function, -it is called with table, key, and value as arguments. -If it is a table, -Lua does an indexing assignment to this table with the same key and value. -(This assignment is regular, not raw, -and therefore can trigger another metamethod.) - - -

    -Whenever there is a __newindex metamethod, -Lua does not perform the primitive assignment. -(If necessary, -the metamethod itself can call rawset -to do the assignment.) -

  • - -
  • __call: -The call operation func(args). -This event happens when Lua tries to call a non-function value -(that is, func is not a function). -The metamethod is looked up in func. -If present, -the metamethod is called with func as its first argument, -followed by the arguments of the original call (args). -All results of the call -are the result of the operation. -(This is the only metamethod that allows multiple results.) -
  • - -
- -

-It is a good practice to add all needed metamethods to a table -before setting it as a metatable of some object. -In particular, the __gc metamethod works only when this order -is followed (see §2.5.1). - - -

-Because metatables are regular tables, -they can contain arbitrary fields, -not only the event names defined above. -Some functions in the standard library -(e.g., tostring) -use other fields in metatables for their own purposes. - - - - - -

2.5 – Garbage Collection

- -

-Lua performs automatic memory management. -This means that -you do not have to worry about allocating memory for new objects -or freeing it when the objects are no longer needed. -Lua manages memory automatically by running -a garbage collector to collect all dead objects -(that is, objects that are no longer accessible from Lua). -All memory used by Lua is subject to automatic management: -strings, tables, userdata, functions, threads, internal structures, etc. - - -

-Lua implements an incremental mark-and-sweep collector. -It uses two numbers to control its garbage-collection cycles: -the garbage-collector pause and -the garbage-collector step multiplier. -Both use percentage points as units -(e.g., a value of 100 means an internal value of 1). - - -

-The garbage-collector pause -controls how long the collector waits before starting a new cycle. -Larger values make the collector less aggressive. -Values smaller than 100 mean the collector will not wait to -start a new cycle. -A value of 200 means that the collector waits for the total memory in use -to double before starting a new cycle. - - -

-The garbage-collector step multiplier -controls the relative speed of the collector relative to -memory allocation. -Larger values make the collector more aggressive but also increase -the size of each incremental step. -You should not use values smaller than 100, -because they make the collector too slow and -can result in the collector never finishing a cycle. -The default is 200, -which means that the collector runs at "twice" -the speed of memory allocation. - - -

-If you set the step multiplier to a very large number -(larger than 10% of the maximum number of -bytes that the program may use), -the collector behaves like a stop-the-world collector. -If you then set the pause to 200, -the collector behaves as in old Lua versions, -doing a complete collection every time Lua doubles its -memory usage. - - -

-You can change these numbers by calling lua_gc in C -or collectgarbage in Lua. -You can also use these functions to control -the collector directly (e.g., stop and restart it). - - - -

2.5.1 – Garbage-Collection Metamethods

- -

-You can set garbage-collector metamethods for tables -and, using the C API, -for full userdata (see §2.4). -These metamethods are also called finalizers. -Finalizers allow you to coordinate Lua's garbage collection -with external resource management -(such as closing files, network or database connections, -or freeing your own memory). - - -

-For an object (table or userdata) to be finalized when collected, -you must mark it for finalization. - -You mark an object for finalization when you set its metatable -and the metatable has a field indexed by the string "__gc". -Note that if you set a metatable without a __gc field -and later create that field in the metatable, -the object will not be marked for finalization. - - -

-When a marked object becomes garbage, -it is not collected immediately by the garbage collector. -Instead, Lua puts it in a list. -After the collection, -Lua goes through that list. -For each object in the list, -it checks the object's __gc metamethod: -If it is a function, -Lua calls it with the object as its single argument; -if the metamethod is not a function, -Lua simply ignores it. - - -

-At the end of each garbage-collection cycle, -the finalizers for objects are called in -the reverse order that the objects were marked for finalization, -among those collected in that cycle; -that is, the first finalizer to be called is the one associated -with the object marked last in the program. -The execution of each finalizer may occur at any point during -the execution of the regular code. - - -

-Because the object being collected must still be used by the finalizer, -that object (and other objects accessible only through it) -must be resurrected by Lua. -Usually, this resurrection is transient, -and the object memory is freed in the next garbage-collection cycle. -However, if the finalizer stores the object in some global place -(e.g., a global variable), -then the resurrection is permanent. -Moreover, if the finalizer marks a finalizing object for finalization again, -its finalizer will be called again in the next cycle where the -object is unreachable. -In any case, -the object memory is freed only in a GC cycle where -the object is unreachable and not marked for finalization. - - -

-When you close a state (see lua_close), -Lua calls the finalizers of all objects marked for finalization, -following the reverse order that they were marked. -If any finalizer marks objects for collection during that phase, -these marks have no effect. - - - - - -

2.5.2 – Weak Tables

- -

-A weak table is a table whose elements are -weak references. -A weak reference is ignored by the garbage collector. -In other words, -if the only references to an object are weak references, -then the garbage collector will collect that object. - - -

-A weak table can have weak keys, weak values, or both. -A table with weak values allows the collection of its values, -but prevents the collection of its keys. -A table with both weak keys and weak values allows the collection of -both keys and values. -In any case, if either the key or the value is collected, -the whole pair is removed from the table. -The weakness of a table is controlled by the -__mode field of its metatable. -If the __mode field is a string containing the character 'k', -the keys in the table are weak. -If __mode contains 'v', -the values in the table are weak. - - -

-A table with weak keys and strong values -is also called an ephemeron table. -In an ephemeron table, -a value is considered reachable only if its key is reachable. -In particular, -if the only reference to a key comes through its value, -the pair is removed. - - -

-Any change in the weakness of a table may take effect only -at the next collect cycle. -In particular, if you change the weakness to a stronger mode, -Lua may still collect some items from that table -before the change takes effect. - - -

-Only objects that have an explicit construction -are removed from weak tables. -Values, such as numbers and light C functions, -are not subject to garbage collection, -and therefore are not removed from weak tables -(unless their associated values are collected). -Although strings are subject to garbage collection, -they do not have an explicit construction, -and therefore are not removed from weak tables. - - -

-Resurrected objects -(that is, objects being finalized -and objects accessible only through objects being finalized) -have a special behavior in weak tables. -They are removed from weak values before running their finalizers, -but are removed from weak keys only in the next collection -after running their finalizers, when such objects are actually freed. -This behavior allows the finalizer to access properties -associated with the object through weak tables. - - -

-If a weak table is among the resurrected objects in a collection cycle, -it may not be properly cleared until the next cycle. - - - - - - - -

2.6 – Coroutines

- -

-Lua supports coroutines, -also called collaborative multithreading. -A coroutine in Lua represents an independent thread of execution. -Unlike threads in multithread systems, however, -a coroutine only suspends its execution by explicitly calling -a yield function. - - -

-You create a coroutine by calling coroutine.create. -Its sole argument is a function -that is the main function of the coroutine. -The create function only creates a new coroutine and -returns a handle to it (an object of type thread); -it does not start the coroutine. - - -

-You execute a coroutine by calling coroutine.resume. -When you first call coroutine.resume, -passing as its first argument -a thread returned by coroutine.create, -the coroutine starts its execution by -calling its main function. -Extra arguments passed to coroutine.resume are passed -as arguments to that function. -After the coroutine starts running, -it runs until it terminates or yields. - - -

-A coroutine can terminate its execution in two ways: -normally, when its main function returns -(explicitly or implicitly, after the last instruction); -and abnormally, if there is an unprotected error. -In case of normal termination, -coroutine.resume returns true, -plus any values returned by the coroutine main function. -In case of errors, coroutine.resume returns false -plus an error object. - - -

-A coroutine yields by calling coroutine.yield. -When a coroutine yields, -the corresponding coroutine.resume returns immediately, -even if the yield happens inside nested function calls -(that is, not in the main function, -but in a function directly or indirectly called by the main function). -In the case of a yield, coroutine.resume also returns true, -plus any values passed to coroutine.yield. -The next time you resume the same coroutine, -it continues its execution from the point where it yielded, -with the call to coroutine.yield returning any extra -arguments passed to coroutine.resume. - - -

-Like coroutine.create, -the coroutine.wrap function also creates a coroutine, -but instead of returning the coroutine itself, -it returns a function that, when called, resumes the coroutine. -Any arguments passed to this function -go as extra arguments to coroutine.resume. -coroutine.wrap returns all the values returned by coroutine.resume, -except the first one (the boolean error code). -Unlike coroutine.resume, -coroutine.wrap does not catch errors; -any error is propagated to the caller. - - -

-As an example of how coroutines work, -consider the following code: - -

-     function foo (a)
-       print("foo", a)
-       return coroutine.yield(2*a)
-     end
-     
-     co = coroutine.create(function (a,b)
-           print("co-body", a, b)
-           local r = foo(a+1)
-           print("co-body", r)
-           local r, s = coroutine.yield(a+b, a-b)
-           print("co-body", r, s)
-           return b, "end"
-     end)
-     
-     print("main", coroutine.resume(co, 1, 10))
-     print("main", coroutine.resume(co, "r"))
-     print("main", coroutine.resume(co, "x", "y"))
-     print("main", coroutine.resume(co, "x", "y"))
-

-When you run it, it produces the following output: - -

-     co-body 1       10
-     foo     2
-     main    true    4
-     co-body r
-     main    true    11      -9
-     co-body x       y
-     main    true    10      end
-     main    false   cannot resume dead coroutine
-
- -

-You can also create and manipulate coroutines through the C API: -see functions lua_newthread, lua_resume, -and lua_yield. - - - - - -

3 – The Language

- -

-This section describes the lexis, the syntax, and the semantics of Lua. -In other words, -this section describes -which tokens are valid, -how they can be combined, -and what their combinations mean. - - -

-Language constructs will be explained using the usual extended BNF notation, -in which -{a} means 0 or more a's, and -[a] means an optional a. -Non-terminals are shown like non-terminal, -keywords are shown like kword, -and other terminal symbols are shown like ‘=’. -The complete syntax of Lua can be found in §9 -at the end of this manual. - - - -

3.1 – Lexical Conventions

- -

-Lua is a free-form language. -It ignores spaces (including new lines) and comments -between lexical elements (tokens), -except as delimiters between names and keywords. - - -

-Names -(also called identifiers) -in Lua can be any string of letters, -digits, and underscores, -not beginning with a digit and -not being a reserved word. -Identifiers are used to name variables, table fields, and labels. - - -

-The following keywords are reserved -and cannot be used as names: - - -

-     and       break     do        else      elseif    end
-     false     for       function  goto      if        in
-     local     nil       not       or        repeat    return
-     then      true      until     while
-
- -

-Lua is a case-sensitive language: -and is a reserved word, but And and AND -are two different, valid names. -As a convention, -programs should avoid creating -names that start with an underscore followed by -one or more uppercase letters (such as _VERSION). - - -

-The following strings denote other tokens: - -

-     +     -     *     /     %     ^     #
-     &     ~     |     <<    >>    //
-     ==    ~=    <=    >=    <     >     =
-     (     )     {     }     [     ]     ::
-     ;     :     ,     .     ..    ...
-
- -

-A short literal string -can be delimited by matching single or double quotes, -and can contain the following C-like escape sequences: -'\a' (bell), -'\b' (backspace), -'\f' (form feed), -'\n' (newline), -'\r' (carriage return), -'\t' (horizontal tab), -'\v' (vertical tab), -'\\' (backslash), -'\"' (quotation mark [double quote]), -and '\'' (apostrophe [single quote]). -A backslash followed by a line break -results in a newline in the string. -The escape sequence '\z' skips the following span -of white-space characters, -including line breaks; -it is particularly useful to break and indent a long literal string -into multiple lines without adding the newlines and spaces -into the string contents. -A short literal string cannot contain unescaped line breaks -nor escapes not forming a valid escape sequence. - - -

-We can specify any byte in a short literal string by its numeric value -(including embedded zeros). -This can be done -with the escape sequence \xXX, -where XX is a sequence of exactly two hexadecimal digits, -or with the escape sequence \ddd, -where ddd is a sequence of up to three decimal digits. -(Note that if a decimal escape sequence is to be followed by a digit, -it must be expressed using exactly three digits.) - - -

-The UTF-8 encoding of a Unicode character -can be inserted in a literal string with -the escape sequence \u{XXX} -(note the mandatory enclosing brackets), -where XXX is a sequence of one or more hexadecimal digits -representing the character code point. - - -

-Literal strings can also be defined using a long format -enclosed by long brackets. -We define an opening long bracket of level n as an opening -square bracket followed by n equal signs followed by another -opening square bracket. -So, an opening long bracket of level 0 is written as [[, -an opening long bracket of level 1 is written as [=[, -and so on. -A closing long bracket is defined similarly; -for instance, -a closing long bracket of level 4 is written as ]====]. -A long literal starts with an opening long bracket of any level and -ends at the first closing long bracket of the same level. -It can contain any text except a closing bracket of the same level. -Literals in this bracketed form can run for several lines, -do not interpret any escape sequences, -and ignore long brackets of any other level. -Any kind of end-of-line sequence -(carriage return, newline, carriage return followed by newline, -or newline followed by carriage return) -is converted to a simple newline. - - -

-For convenience, -when the opening long bracket is immediately followed by a newline, -the newline is not included in the string. -As an example, in a system using ASCII -(in which 'a' is coded as 97, -newline is coded as 10, and '1' is coded as 49), -the five literal strings below denote the same string: - -

-     a = 'alo\n123"'
-     a = "alo\n123\""
-     a = '\97lo\10\04923"'
-     a = [[alo
-     123"]]
-     a = [==[
-     alo
-     123"]==]
-
- -

-Any byte in a literal string not -explicitly affected by the previous rules represents itself. -However, Lua opens files for parsing in text mode, -and the system file functions may have problems with -some control characters. -So, it is safer to represent -non-text data as a quoted literal with -explicit escape sequences for the non-text characters. - - -

-A numeric constant (or numeral) -can be written with an optional fractional part -and an optional decimal exponent, -marked by a letter 'e' or 'E'. -Lua also accepts hexadecimal constants, -which start with 0x or 0X. -Hexadecimal constants also accept an optional fractional part -plus an optional binary exponent, -marked by a letter 'p' or 'P'. -A numeric constant with a radix point or an exponent -denotes a float; -otherwise, -if its value fits in an integer, -it denotes an integer. -Examples of valid integer constants are - -

-     3   345   0xff   0xBEBADA
-

-Examples of valid float constants are - -

-     3.0     3.1416     314.16e-2     0.31416E1     34e1
-     0x0.1E  0xA23p-4   0X1.921FB54442D18P+1
-
- -

-A comment starts with a double hyphen (--) -anywhere outside a string. -If the text immediately after -- is not an opening long bracket, -the comment is a short comment, -which runs until the end of the line. -Otherwise, it is a long comment, -which runs until the corresponding closing long bracket. -Long comments are frequently used to disable code temporarily. - - - - - -

3.2 – Variables

- -

-Variables are places that store values. -There are three kinds of variables in Lua: -global variables, local variables, and table fields. - - -

-A single name can denote a global variable or a local variable -(or a function's formal parameter, -which is a particular kind of local variable): - -

-	var ::= Name
-

-Name denotes identifiers, as defined in §3.1. - - -

-Any variable name is assumed to be global unless explicitly declared -as a local (see §3.3.7). -Local variables are lexically scoped: -local variables can be freely accessed by functions -defined inside their scope (see §3.5). - - -

-Before the first assignment to a variable, its value is nil. - - -

-Square brackets are used to index a table: - -

-	var ::= prefixexp ‘[’ exp ‘]’
-

-The meaning of accesses to table fields can be changed via metatables -(see §2.4). - - -

-The syntax var.Name is just syntactic sugar for -var["Name"]: - -

-	var ::= prefixexp ‘.’ Name
-
- -

-An access to a global variable x -is equivalent to _ENV.x. -Due to the way that chunks are compiled, -_ENV is never a global name (see §2.2). - - - - - -

3.3 – Statements

- -

-Lua supports an almost conventional set of statements, -similar to those in Pascal or C. -This set includes -assignments, control structures, function calls, -and variable declarations. - - - -

3.3.1 – Blocks

- -

-A block is a list of statements, -which are executed sequentially: - -

-	block ::= {stat}
-

-Lua has empty statements -that allow you to separate statements with semicolons, -start a block with a semicolon -or write two semicolons in sequence: - -

-	stat ::= ‘;’
-
- -

-Function calls and assignments -can start with an open parenthesis. -This possibility leads to an ambiguity in Lua's grammar. -Consider the following fragment: - -

-     a = b + c
-     (print or io.write)('done')
-

-The grammar could see it in two ways: - -

-     a = b + c(print or io.write)('done')
-     
-     a = b + c; (print or io.write)('done')
-

-The current parser always sees such constructions -in the first way, -interpreting the open parenthesis -as the start of the arguments to a call. -To avoid this ambiguity, -it is a good practice to always precede with a semicolon -statements that start with a parenthesis: - -

-     ;(print or io.write)('done')
-
- -

-A block can be explicitly delimited to produce a single statement: - -

-	stat ::= do block end
-

-Explicit blocks are useful -to control the scope of variable declarations. -Explicit blocks are also sometimes used to -add a return statement in the middle -of another block (see §3.3.4). - - - - - -

3.3.2 – Chunks

- -

-The unit of compilation of Lua is called a chunk. -Syntactically, -a chunk is simply a block: - -

-	chunk ::= block
-
- -

-Lua handles a chunk as the body of an anonymous function -with a variable number of arguments -(see §3.4.11). -As such, chunks can define local variables, -receive arguments, and return values. -Moreover, such anonymous function is compiled as in the -scope of an external local variable called _ENV (see §2.2). -The resulting function always has _ENV as its only upvalue, -even if it does not use that variable. - - -

-A chunk can be stored in a file or in a string inside the host program. -To execute a chunk, -Lua first loads it, -precompiling the chunk's code into instructions for a virtual machine, -and then Lua executes the compiled code -with an interpreter for the virtual machine. - - -

-Chunks can also be precompiled into binary form; -see program luac and function string.dump for details. -Programs in source and compiled forms are interchangeable; -Lua automatically detects the file type and acts accordingly (see load). - - - - - -

3.3.3 – Assignment

- -

-Lua allows multiple assignments. -Therefore, the syntax for assignment -defines a list of variables on the left side -and a list of expressions on the right side. -The elements in both lists are separated by commas: - -

-	stat ::= varlist ‘=’ explist
-	varlist ::= var {‘,’ var}
-	explist ::= exp {‘,’ exp}
-

-Expressions are discussed in §3.4. - - -

-Before the assignment, -the list of values is adjusted to the length of -the list of variables. -If there are more values than needed, -the excess values are thrown away. -If there are fewer values than needed, -the list is extended with as many nil's as needed. -If the list of expressions ends with a function call, -then all values returned by that call enter the list of values, -before the adjustment -(except when the call is enclosed in parentheses; see §3.4). - - -

-The assignment statement first evaluates all its expressions -and only then the assignments are performed. -Thus the code - -

-     i = 3
-     i, a[i] = i+1, 20
-

-sets a[3] to 20, without affecting a[4] -because the i in a[i] is evaluated (to 3) -before it is assigned 4. -Similarly, the line - -

-     x, y = y, x
-

-exchanges the values of x and y, -and - -

-     x, y, z = y, z, x
-

-cyclically permutes the values of x, y, and z. - - -

-An assignment to a global name x = val -is equivalent to the assignment -_ENV.x = val (see §2.2). - - -

-The meaning of assignments to table fields and -global variables (which are actually table fields, too) -can be changed via metatables (see §2.4). - - - - - -

3.3.4 – Control Structures

-The control structures -if, while, and repeat have the usual meaning and -familiar syntax: - - - - -

-	stat ::= while exp do block end
-	stat ::= repeat block until exp
-	stat ::= if exp then block {elseif exp then block} [else block] end
-

-Lua also has a for statement, in two flavors (see §3.3.5). - - -

-The condition expression of a -control structure can return any value. -Both false and nil are considered false. -All values different from nil and false are considered true -(in particular, the number 0 and the empty string are also true). - - -

-In the repeatuntil loop, -the inner block does not end at the until keyword, -but only after the condition. -So, the condition can refer to local variables -declared inside the loop block. - - -

-The goto statement transfers the program control to a label. -For syntactical reasons, -labels in Lua are considered statements too: - - - -

-	stat ::= goto Name
-	stat ::= label
-	label ::= ‘::’ Name ‘::’
-
- -

-A label is visible in the entire block where it is defined, -except -inside nested blocks where a label with the same name is defined and -inside nested functions. -A goto may jump to any visible label as long as it does not -enter into the scope of a local variable. - - -

-Labels and empty statements are called void statements, -as they perform no actions. - - -

-The break statement terminates the execution of a -while, repeat, or for loop, -skipping to the next statement after the loop: - - -

-	stat ::= break
-

-A break ends the innermost enclosing loop. - - -

-The return statement is used to return values -from a function or a chunk -(which is an anonymous function). - -Functions can return more than one value, -so the syntax for the return statement is - -

-	stat ::= return [explist] [‘;’]
-
- -

-The return statement can only be written -as the last statement of a block. -If it is really necessary to return in the middle of a block, -then an explicit inner block can be used, -as in the idiom do return end, -because now return is the last statement in its (inner) block. - - - - - -

3.3.5 – For Statement

- -

- -The for statement has two forms: -one numerical and one generic. - - -

-The numerical for loop repeats a block of code while a -control variable runs through an arithmetic progression. -It has the following syntax: - -

-	stat ::= for Name ‘=’ exp ‘,’ exp [‘,’ exp] do block end
-

-The block is repeated for name starting at the value of -the first exp, until it passes the second exp by steps of the -third exp. -More precisely, a for statement like - -

-     for v = e1, e2, e3 do block end
-

-is equivalent to the code: - -

-     do
-       local var, limit, step = tonumber(e1), tonumber(e2), tonumber(e3)
-       if not (var and limit and step) then error() end
-       var = var - step
-       while true do
-         var = var + step
-         if (step >= 0 and var > limit) or (step < 0 and var < limit) then
-           break
-         end
-         local v = var
-         block
-       end
-     end
-
- -

-Note the following: - -

    - -
  • -All three control expressions are evaluated only once, -before the loop starts. -They must all result in numbers. -
  • - -
  • -var, limit, and step are invisible variables. -The names shown here are for explanatory purposes only. -
  • - -
  • -If the third expression (the step) is absent, -then a step of 1 is used. -
  • - -
  • -You can use break and goto to exit a for loop. -
  • - -
  • -The loop variable v is local to the loop body. -If you need its value after the loop, -assign it to another variable before exiting the loop. -
  • - -
- -

-The generic for statement works over functions, -called iterators. -On each iteration, the iterator function is called to produce a new value, -stopping when this new value is nil. -The generic for loop has the following syntax: - -

-	stat ::= for namelist in explist do block end
-	namelist ::= Name {‘,’ Name}
-

-A for statement like - -

-     for var_1, ···, var_n in explist do block end
-

-is equivalent to the code: - -

-     do
-       local f, s, var = explist
-       while true do
-         local var_1, ···, var_n = f(s, var)
-         if var_1 == nil then break end
-         var = var_1
-         block
-       end
-     end
-

-Note the following: - -

    - -
  • -explist is evaluated only once. -Its results are an iterator function, -a state, -and an initial value for the first iterator variable. -
  • - -
  • -f, s, and var are invisible variables. -The names are here for explanatory purposes only. -
  • - -
  • -You can use break to exit a for loop. -
  • - -
  • -The loop variables var_i are local to the loop; -you cannot use their values after the for ends. -If you need these values, -then assign them to other variables before breaking or exiting the loop. -
  • - -
- - - - -

3.3.6 – Function Calls as Statements

-To allow possible side-effects, -function calls can be executed as statements: - -

-	stat ::= functioncall
-

-In this case, all returned values are thrown away. -Function calls are explained in §3.4.10. - - - - - -

3.3.7 – Local Declarations

-Local variables can be declared anywhere inside a block. -The declaration can include an initial assignment: - -

-	stat ::= local namelist [‘=’ explist]
-

-If present, an initial assignment has the same semantics -of a multiple assignment (see §3.3.3). -Otherwise, all variables are initialized with nil. - - -

-A chunk is also a block (see §3.3.2), -and so local variables can be declared in a chunk outside any explicit block. - - -

-The visibility rules for local variables are explained in §3.5. - - - - - - - -

3.4 – Expressions

- -

-The basic expressions in Lua are the following: - -

-	exp ::= prefixexp
-	exp ::= nil | false | true
-	exp ::= Numeral
-	exp ::= LiteralString
-	exp ::= functiondef
-	exp ::= tableconstructor
-	exp ::= ‘...’
-	exp ::= exp binop exp
-	exp ::= unop exp
-	prefixexp ::= var | functioncall | ‘(’ exp ‘)’
-
- -

-Numerals and literal strings are explained in §3.1; -variables are explained in §3.2; -function definitions are explained in §3.4.11; -function calls are explained in §3.4.10; -table constructors are explained in §3.4.9. -Vararg expressions, -denoted by three dots ('...'), can only be used when -directly inside a vararg function; -they are explained in §3.4.11. - - -

-Binary operators comprise arithmetic operators (see §3.4.1), -bitwise operators (see §3.4.2), -relational operators (see §3.4.4), logical operators (see §3.4.5), -and the concatenation operator (see §3.4.6). -Unary operators comprise the unary minus (see §3.4.1), -the unary bitwise NOT (see §3.4.2), -the unary logical not (see §3.4.5), -and the unary length operator (see §3.4.7). - - -

-Both function calls and vararg expressions can result in multiple values. -If a function call is used as a statement (see §3.3.6), -then its return list is adjusted to zero elements, -thus discarding all returned values. -If an expression is used as the last (or the only) element -of a list of expressions, -then no adjustment is made -(unless the expression is enclosed in parentheses). -In all other contexts, -Lua adjusts the result list to one element, -either discarding all values except the first one -or adding a single nil if there are no values. - - -

-Here are some examples: - -

-     f()                -- adjusted to 0 results
-     g(f(), x)          -- f() is adjusted to 1 result
-     g(x, f())          -- g gets x plus all results from f()
-     a,b,c = f(), x     -- f() is adjusted to 1 result (c gets nil)
-     a,b = ...          -- a gets the first vararg argument, b gets
-                        -- the second (both a and b can get nil if there
-                        -- is no corresponding vararg argument)
-     
-     a,b,c = x, f()     -- f() is adjusted to 2 results
-     a,b,c = f()        -- f() is adjusted to 3 results
-     return f()         -- returns all results from f()
-     return ...         -- returns all received vararg arguments
-     return x,y,f()     -- returns x, y, and all results from f()
-     {f()}              -- creates a list with all results from f()
-     {...}              -- creates a list with all vararg arguments
-     {f(), nil}         -- f() is adjusted to 1 result
-
- -

-Any expression enclosed in parentheses always results in only one value. -Thus, -(f(x,y,z)) is always a single value, -even if f returns several values. -(The value of (f(x,y,z)) is the first value returned by f -or nil if f does not return any values.) - - - -

3.4.1 – Arithmetic Operators

-Lua supports the following arithmetic operators: - -

    -
  • +: addition
  • -
  • -: subtraction
  • -
  • *: multiplication
  • -
  • /: float division
  • -
  • //: floor division
  • -
  • %: modulo
  • -
  • ^: exponentiation
  • -
  • -: unary minus
  • -
- -

-With the exception of exponentiation and float division, -the arithmetic operators work as follows: -If both operands are integers, -the operation is performed over integers and the result is an integer. -Otherwise, if both operands are numbers -or strings that can be converted to -numbers (see §3.4.3), -then they are converted to floats, -the operation is performed following the usual rules -for floating-point arithmetic -(usually the IEEE 754 standard), -and the result is a float. - - -

-Exponentiation and float division (/) -always convert their operands to floats -and the result is always a float. -Exponentiation uses the ISO C function pow, -so that it works for non-integer exponents too. - - -

-Floor division (//) is a division -that rounds the quotient towards minus infinity, -that is, the floor of the division of its operands. - - -

-Modulo is defined as the remainder of a division -that rounds the quotient towards minus infinity (floor division). - - -

-In case of overflows in integer arithmetic, -all operations wrap around, -according to the usual rules of two-complement arithmetic. -(In other words, -they return the unique representable integer -that is equal modulo 264 to the mathematical result.) - - - -

3.4.2 – Bitwise Operators

-Lua supports the following bitwise operators: - -

    -
  • &: bitwise AND
  • -
  • |: bitwise OR
  • -
  • ~: bitwise exclusive OR
  • -
  • >>: right shift
  • -
  • <<: left shift
  • -
  • ~: unary bitwise NOT
  • -
- -

-All bitwise operations convert its operands to integers -(see §3.4.3), -operate on all bits of those integers, -and result in an integer. - - -

-Both right and left shifts fill the vacant bits with zeros. -Negative displacements shift to the other direction; -displacements with absolute values equal to or higher than -the number of bits in an integer -result in zero (as all bits are shifted out). - - - - - -

3.4.3 – Coercions and Conversions

-Lua provides some automatic conversions between some -types and representations at run time. -Bitwise operators always convert float operands to integers. -Exponentiation and float division -always convert integer operands to floats. -All other arithmetic operations applied to mixed numbers -(integers and floats) convert the integer operand to a float; -this is called the usual rule. -The C API also converts both integers to floats and -floats to integers, as needed. -Moreover, string concatenation accepts numbers as arguments, -besides strings. - - -

-Lua also converts strings to numbers, -whenever a number is expected. - - -

-In a conversion from integer to float, -if the integer value has an exact representation as a float, -that is the result. -Otherwise, -the conversion gets the nearest higher or -the nearest lower representable value. -This kind of conversion never fails. - - -

-The conversion from float to integer -checks whether the float has an exact representation as an integer -(that is, the float has an integral value and -it is in the range of integer representation). -If it does, that representation is the result. -Otherwise, the conversion fails. - - -

-The conversion from strings to numbers goes as follows: -First, the string is converted to an integer or a float, -following its syntax and the rules of the Lua lexer. -(The string may have also leading and trailing spaces and a sign.) -Then, the resulting number (float or integer) -is converted to the type (float or integer) required by the context -(e.g., the operation that forced the conversion). - - -

-All conversions from strings to numbers -accept both a dot and the current locale mark -as the radix character. -(The Lua lexer, however, accepts only a dot.) - - -

-The conversion from numbers to strings uses a -non-specified human-readable format. -For complete control over how numbers are converted to strings, -use the format function from the string library -(see string.format). - - - - - -

3.4.4 – Relational Operators

-Lua supports the following relational operators: - -

    -
  • ==: equality
  • -
  • ~=: inequality
  • -
  • <: less than
  • -
  • >: greater than
  • -
  • <=: less or equal
  • -
  • >=: greater or equal
  • -

-These operators always result in false or true. - - -

-Equality (==) first compares the type of its operands. -If the types are different, then the result is false. -Otherwise, the values of the operands are compared. -Strings are compared in the obvious way. -Numbers are equal if they denote the same mathematical value. - - -

-Tables, userdata, and threads -are compared by reference: -two objects are considered equal only if they are the same object. -Every time you create a new object -(a table, userdata, or thread), -this new object is different from any previously existing object. -A closure is always equal to itself. -Closures with any detectable difference -(different behavior, different definition) are always different. -Closures created at different times but with no detectable differences -may be classified as equal or not -(depending on internal caching details). - - -

-You can change the way that Lua compares tables and userdata -by using the "eq" metamethod (see §2.4). - - -

-Equality comparisons do not convert strings to numbers -or vice versa. -Thus, "0"==0 evaluates to false, -and t[0] and t["0"] denote different -entries in a table. - - -

-The operator ~= is exactly the negation of equality (==). - - -

-The order operators work as follows. -If both arguments are numbers, -then they are compared according to their mathematical values -(regardless of their subtypes). -Otherwise, if both arguments are strings, -then their values are compared according to the current locale. -Otherwise, Lua tries to call the "lt" or the "le" -metamethod (see §2.4). -A comparison a > b is translated to b < a -and a >= b is translated to b <= a. - - -

-Following the IEEE 754 standard, -NaN is considered neither smaller than, -nor equal to, nor greater than any value (including itself). - - - - - -

3.4.5 – Logical Operators

-The logical operators in Lua are -and, or, and not. -Like the control structures (see §3.3.4), -all logical operators consider both false and nil as false -and anything else as true. - - -

-The negation operator not always returns false or true. -The conjunction operator and returns its first argument -if this value is false or nil; -otherwise, and returns its second argument. -The disjunction operator or returns its first argument -if this value is different from nil and false; -otherwise, or returns its second argument. -Both and and or use short-circuit evaluation; -that is, -the second operand is evaluated only if necessary. -Here are some examples: - -

-     10 or 20            --> 10
-     10 or error()       --> 10
-     nil or "a"          --> "a"
-     nil and 10          --> nil
-     false and error()   --> false
-     false and nil       --> false
-     false or nil        --> nil
-     10 and 20           --> 20
-

-(In this manual, ---> indicates the result of the preceding expression.) - - - - - -

3.4.6 – Concatenation

-The string concatenation operator in Lua is -denoted by two dots ('..'). -If both operands are strings or numbers, then they are converted to -strings according to the rules described in §3.4.3. -Otherwise, the __concat metamethod is called (see §2.4). - - - - - -

3.4.7 – The Length Operator

- -

-The length operator is denoted by the unary prefix operator #. - - -

-The length of a string is its number of bytes -(that is, the usual meaning of string length when each -character is one byte). - - -

-The length operator applied on a table -returns a border in that table. -A border in a table t is any natural number -that satisfies the following condition: - -

-     (border == 0 or t[border] ~= nil) and t[border + 1] == nil
-

-In words, -a border is any (natural) index in a table -where a non-nil value is followed by a nil value -(or zero, when index 1 is nil). - - -

-A table with exactly one border is called a sequence. -For instance, the table {10, 20, 30, 40, 50} is a sequence, -as it has only one border (5). -The table {10, 20, 30, nil, 50} has two borders (3 and 5), -and therefore it is not a sequence. -The table {nil, 20, 30, nil, nil, 60, nil} -has three borders (0, 3, and 6), -so it is not a sequence, too. -The table {} is a sequence with border 0. -Note that non-natural keys do not interfere -with whether a table is a sequence. - - -

-When t is a sequence, -#t returns its only border, -which corresponds to the intuitive notion of the length of the sequence. -When t is not a sequence, -#t can return any of its borders. -(The exact one depends on details of -the internal representation of the table, -which in turn can depend on how the table was populated and -the memory addresses of its non-numeric keys.) - - -

-The computation of the length of a table -has a guaranteed worst time of O(log n), -where n is the largest natural key in the table. - - -

-A program can modify the behavior of the length operator for -any value but strings through the __len metamethod (see §2.4). - - - - - -

3.4.8 – Precedence

-Operator precedence in Lua follows the table below, -from lower to higher priority: - -

-     or
-     and
-     <     >     <=    >=    ~=    ==
-     |
-     ~
-     &
-     <<    >>
-     ..
-     +     -
-     *     /     //    %
-     unary operators (not   #     -     ~)
-     ^
-

-As usual, -you can use parentheses to change the precedences of an expression. -The concatenation ('..') and exponentiation ('^') -operators are right associative. -All other binary operators are left associative. - - - - - -

3.4.9 – Table Constructors

-Table constructors are expressions that create tables. -Every time a constructor is evaluated, a new table is created. -A constructor can be used to create an empty table -or to create a table and initialize some of its fields. -The general syntax for constructors is - -

-	tableconstructor ::= ‘{’ [fieldlist] ‘}’
-	fieldlist ::= field {fieldsep field} [fieldsep]
-	field ::= ‘[’ exp ‘]’ ‘=’ exp | Name ‘=’ exp | exp
-	fieldsep ::= ‘,’ | ‘;’
-
- -

-Each field of the form [exp1] = exp2 adds to the new table an entry -with key exp1 and value exp2. -A field of the form name = exp is equivalent to -["name"] = exp. -Finally, fields of the form exp are equivalent to -[i] = exp, where i are consecutive integers -starting with 1. -Fields in the other formats do not affect this counting. -For example, - -

-     a = { [f(1)] = g; "x", "y"; x = 1, f(x), [30] = 23; 45 }
-

-is equivalent to - -

-     do
-       local t = {}
-       t[f(1)] = g
-       t[1] = "x"         -- 1st exp
-       t[2] = "y"         -- 2nd exp
-       t.x = 1            -- t["x"] = 1
-       t[3] = f(x)        -- 3rd exp
-       t[30] = 23
-       t[4] = 45          -- 4th exp
-       a = t
-     end
-
- -

-The order of the assignments in a constructor is undefined. -(This order would be relevant only when there are repeated keys.) - - -

-If the last field in the list has the form exp -and the expression is a function call or a vararg expression, -then all values returned by this expression enter the list consecutively -(see §3.4.10). - - -

-The field list can have an optional trailing separator, -as a convenience for machine-generated code. - - - - - -

3.4.10 – Function Calls

-A function call in Lua has the following syntax: - -

-	functioncall ::= prefixexp args
-

-In a function call, -first prefixexp and args are evaluated. -If the value of prefixexp has type function, -then this function is called -with the given arguments. -Otherwise, the prefixexp "call" metamethod is called, -having as first argument the value of prefixexp, -followed by the original call arguments -(see §2.4). - - -

-The form - -

-	functioncall ::= prefixexp ‘:’ Name args
-

-can be used to call "methods". -A call v:name(args) -is syntactic sugar for v.name(v,args), -except that v is evaluated only once. - - -

-Arguments have the following syntax: - -

-	args ::= ‘(’ [explist] ‘)’
-	args ::= tableconstructor
-	args ::= LiteralString
-

-All argument expressions are evaluated before the call. -A call of the form f{fields} is -syntactic sugar for f({fields}); -that is, the argument list is a single new table. -A call of the form f'string' -(or f"string" or f[[string]]) -is syntactic sugar for f('string'); -that is, the argument list is a single literal string. - - -

-A call of the form return functioncall is called -a tail call. -Lua implements proper tail calls -(or proper tail recursion): -in a tail call, -the called function reuses the stack entry of the calling function. -Therefore, there is no limit on the number of nested tail calls that -a program can execute. -However, a tail call erases any debug information about the -calling function. -Note that a tail call only happens with a particular syntax, -where the return has one single function call as argument; -this syntax makes the calling function return exactly -the returns of the called function. -So, none of the following examples are tail calls: - -

-     return (f(x))        -- results adjusted to 1
-     return 2 * f(x)
-     return x, f(x)       -- additional results
-     f(x); return         -- results discarded
-     return x or f(x)     -- results adjusted to 1
-
- - - - -

3.4.11 – Function Definitions

- -

-The syntax for function definition is - -

-	functiondef ::= function funcbody
-	funcbody ::= ‘(’ [parlist] ‘)’ block end
-
- -

-The following syntactic sugar simplifies function definitions: - -

-	stat ::= function funcname funcbody
-	stat ::= local function Name funcbody
-	funcname ::= Name {‘.’ Name} [‘:’ Name]
-

-The statement - -

-     function f () body end
-

-translates to - -

-     f = function () body end
-

-The statement - -

-     function t.a.b.c.f () body end
-

-translates to - -

-     t.a.b.c.f = function () body end
-

-The statement - -

-     local function f () body end
-

-translates to - -

-     local f; f = function () body end
-

-not to - -

-     local f = function () body end
-

-(This only makes a difference when the body of the function -contains references to f.) - - -

-A function definition is an executable expression, -whose value has type function. -When Lua precompiles a chunk, -all its function bodies are precompiled too. -Then, whenever Lua executes the function definition, -the function is instantiated (or closed). -This function instance (or closure) -is the final value of the expression. - - -

-Parameters act as local variables that are -initialized with the argument values: - -

-	parlist ::= namelist [‘,’ ‘...’] | ‘...’
-

-When a function is called, -the list of arguments is adjusted to -the length of the list of parameters, -unless the function is a vararg function, -which is indicated by three dots ('...') -at the end of its parameter list. -A vararg function does not adjust its argument list; -instead, it collects all extra arguments and supplies them -to the function through a vararg expression, -which is also written as three dots. -The value of this expression is a list of all actual extra arguments, -similar to a function with multiple results. -If a vararg expression is used inside another expression -or in the middle of a list of expressions, -then its return list is adjusted to one element. -If the expression is used as the last element of a list of expressions, -then no adjustment is made -(unless that last expression is enclosed in parentheses). - - -

-As an example, consider the following definitions: - -

-     function f(a, b) end
-     function g(a, b, ...) end
-     function r() return 1,2,3 end
-

-Then, we have the following mapping from arguments to parameters and -to the vararg expression: - -

-     CALL            PARAMETERS
-     
-     f(3)             a=3, b=nil
-     f(3, 4)          a=3, b=4
-     f(3, 4, 5)       a=3, b=4
-     f(r(), 10)       a=1, b=10
-     f(r())           a=1, b=2
-     
-     g(3)             a=3, b=nil, ... -->  (nothing)
-     g(3, 4)          a=3, b=4,   ... -->  (nothing)
-     g(3, 4, 5, 8)    a=3, b=4,   ... -->  5  8
-     g(5, r())        a=5, b=1,   ... -->  2  3
-
- -

-Results are returned using the return statement (see §3.3.4). -If control reaches the end of a function -without encountering a return statement, -then the function returns with no results. - - -

- -There is a system-dependent limit on the number of values -that a function may return. -This limit is guaranteed to be larger than 1000. - - -

-The colon syntax -is used for defining methods, -that is, functions that have an implicit extra parameter self. -Thus, the statement - -

-     function t.a.b.c:f (params) body end
-

-is syntactic sugar for - -

-     t.a.b.c.f = function (self, params) body end
-
- - - - - - -

3.5 – Visibility Rules

- -

- -Lua is a lexically scoped language. -The scope of a local variable begins at the first statement after -its declaration and lasts until the last non-void statement -of the innermost block that includes the declaration. -Consider the following example: - -

-     x = 10                -- global variable
-     do                    -- new block
-       local x = x         -- new 'x', with value 10
-       print(x)            --> 10
-       x = x+1
-       do                  -- another block
-         local x = x+1     -- another 'x'
-         print(x)          --> 12
-       end
-       print(x)            --> 11
-     end
-     print(x)              --> 10  (the global one)
-
- -

-Notice that, in a declaration like local x = x, -the new x being declared is not in scope yet, -and so the second x refers to the outside variable. - - -

-Because of the lexical scoping rules, -local variables can be freely accessed by functions -defined inside their scope. -A local variable used by an inner function is called -an upvalue, or external local variable, -inside the inner function. - - -

-Notice that each execution of a local statement -defines new local variables. -Consider the following example: - -

-     a = {}
-     local x = 20
-     for i=1,10 do
-       local y = 0
-       a[i] = function () y=y+1; return x+y end
-     end
-

-The loop creates ten closures -(that is, ten instances of the anonymous function). -Each of these closures uses a different y variable, -while all of them share the same x. - - - - - -

4 – The Application Program Interface

- -

- -This section describes the C API for Lua, that is, -the set of C functions available to the host program to communicate -with Lua. -All API functions and related types and constants -are declared in the header file lua.h. - - -

-Even when we use the term "function", -any facility in the API may be provided as a macro instead. -Except where stated otherwise, -all such macros use each of their arguments exactly once -(except for the first argument, which is always a Lua state), -and so do not generate any hidden side-effects. - - -

-As in most C libraries, -the Lua API functions do not check their arguments for validity or consistency. -However, you can change this behavior by compiling Lua -with the macro LUA_USE_APICHECK defined. - - -

-The Lua library is fully reentrant: -it has no global variables. -It keeps all information it needs in a dynamic structure, -called the Lua state. - - -

-Each Lua state has one or more threads, -which correspond to independent, cooperative lines of execution. -The type lua_State (despite its name) refers to a thread. -(Indirectly, through the thread, it also refers to the -Lua state associated to the thread.) - - -

-A pointer to a thread must be passed as the first argument to -every function in the library, except to lua_newstate, -which creates a Lua state from scratch and returns a pointer -to the main thread in the new state. - - - -

4.1 – The Stack

- -

-Lua uses a virtual stack to pass values to and from C. -Each element in this stack represents a Lua value -(nil, number, string, etc.). -Functions in the API can access this stack through the -Lua state parameter that they receive. - - -

-Whenever Lua calls C, the called function gets a new stack, -which is independent of previous stacks and of stacks of -C functions that are still active. -This stack initially contains any arguments to the C function -and it is where the C function can store temporary -Lua values and must push its results -to be returned to the caller (see lua_CFunction). - - -

-For convenience, -most query operations in the API do not follow a strict stack discipline. -Instead, they can refer to any element in the stack -by using an index: -A positive index represents an absolute stack position -(starting at 1); -a negative index represents an offset relative to the top of the stack. -More specifically, if the stack has n elements, -then index 1 represents the first element -(that is, the element that was pushed onto the stack first) -and -index n represents the last element; -index -1 also represents the last element -(that is, the element at the top) -and index -n represents the first element. - - - - - -

4.2 – Stack Size

- -

-When you interact with the Lua API, -you are responsible for ensuring consistency. -In particular, -you are responsible for controlling stack overflow. -You can use the function lua_checkstack -to ensure that the stack has enough space for pushing new elements. - - -

-Whenever Lua calls C, -it ensures that the stack has space for -at least LUA_MINSTACK extra slots. -LUA_MINSTACK is defined as 20, -so that usually you do not have to worry about stack space -unless your code has loops pushing elements onto the stack. - - -

-When you call a Lua function -without a fixed number of results (see lua_call), -Lua ensures that the stack has enough space for all results, -but it does not ensure any extra space. -So, before pushing anything in the stack after such a call -you should use lua_checkstack. - - - - - -

4.3 – Valid and Acceptable Indices

- -

-Any function in the API that receives stack indices -works only with valid indices or acceptable indices. - - -

-A valid index is an index that refers to a -position that stores a modifiable Lua value. -It comprises stack indices between 1 and the stack top -(1 ≤ abs(index) ≤ top) - -plus pseudo-indices, -which represent some positions that are accessible to C code -but that are not in the stack. -Pseudo-indices are used to access the registry (see §4.5) -and the upvalues of a C function (see §4.4). - - -

-Functions that do not need a specific mutable position, -but only a value (e.g., query functions), -can be called with acceptable indices. -An acceptable index can be any valid index, -but it also can be any positive index after the stack top -within the space allocated for the stack, -that is, indices up to the stack size. -(Note that 0 is never an acceptable index.) -Except when noted otherwise, -functions in the API work with acceptable indices. - - -

-Acceptable indices serve to avoid extra tests -against the stack top when querying the stack. -For instance, a C function can query its third argument -without the need to first check whether there is a third argument, -that is, without the need to check whether 3 is a valid index. - - -

-For functions that can be called with acceptable indices, -any non-valid index is treated as if it -contains a value of a virtual type LUA_TNONE, -which behaves like a nil value. - - - - - -

4.4 – C Closures

- -

-When a C function is created, -it is possible to associate some values with it, -thus creating a C closure -(see lua_pushcclosure); -these values are called upvalues and are -accessible to the function whenever it is called. - - -

-Whenever a C function is called, -its upvalues are located at specific pseudo-indices. -These pseudo-indices are produced by the macro -lua_upvalueindex. -The first upvalue associated with a function is at index -lua_upvalueindex(1), and so on. -Any access to lua_upvalueindex(n), -where n is greater than the number of upvalues of the -current function -(but not greater than 256, -which is one plus the maximum number of upvalues in a closure), -produces an acceptable but invalid index. - - - - - -

4.5 – Registry

- -

-Lua provides a registry, -a predefined table that can be used by any C code to -store whatever Lua values it needs to store. -The registry table is always located at pseudo-index -LUA_REGISTRYINDEX. -Any C library can store data into this table, -but it must take care to choose keys -that are different from those used -by other libraries, to avoid collisions. -Typically, you should use as key a string containing your library name, -or a light userdata with the address of a C object in your code, -or any Lua object created by your code. -As with variable names, -string keys starting with an underscore followed by -uppercase letters are reserved for Lua. - - -

-The integer keys in the registry are used -by the reference mechanism (see luaL_ref) -and by some predefined values. -Therefore, integer keys must not be used for other purposes. - - -

-When you create a new Lua state, -its registry comes with some predefined values. -These predefined values are indexed with integer keys -defined as constants in lua.h. -The following constants are defined: - -

    -
  • LUA_RIDX_MAINTHREAD: At this index the registry has -the main thread of the state. -(The main thread is the one created together with the state.) -
  • - -
  • LUA_RIDX_GLOBALS: At this index the registry has -the global environment. -
  • -
- - - - -

4.6 – Error Handling in C

- -

-Internally, Lua uses the C longjmp facility to handle errors. -(Lua will use exceptions if you compile it as C++; -search for LUAI_THROW in the source code for details.) -When Lua faces any error -(such as a memory allocation error or a type error) -it raises an error; -that is, it does a long jump. -A protected environment uses setjmp -to set a recovery point; -any error jumps to the most recent active recovery point. - - -

-Inside a C function you can raise an error by calling lua_error. - - -

-Most functions in the API can raise an error, -for instance due to a memory allocation error. -The documentation for each function indicates whether -it can raise errors. - - -

-If an error happens outside any protected environment, -Lua calls a panic function (see lua_atpanic) -and then calls abort, -thus exiting the host application. -Your panic function can avoid this exit by -never returning -(e.g., doing a long jump to your own recovery point outside Lua). - - -

-The panic function, -as its name implies, -is a mechanism of last resort. -Programs should avoid it. -As a general rule, -when a C function is called by Lua with a Lua state, -it can do whatever it wants on that Lua state, -as it should be already protected. -However, -when C code operates on other Lua states -(e.g., a Lua argument to the function, -a Lua state stored in the registry, or -the result of lua_newthread), -it should use them only in API calls that cannot raise errors. - - -

-The panic function runs as if it were a message handler (see §2.3); -in particular, the error object is at the top of the stack. -However, there is no guarantee about stack space. -To push anything on the stack, -the panic function must first check the available space (see §4.2). - - - - - -

4.7 – Handling Yields in C

- -

-Internally, Lua uses the C longjmp facility to yield a coroutine. -Therefore, if a C function foo calls an API function -and this API function yields -(directly or indirectly by calling another function that yields), -Lua cannot return to foo any more, -because the longjmp removes its frame from the C stack. - - -

-To avoid this kind of problem, -Lua raises an error whenever it tries to yield across an API call, -except for three functions: -lua_yieldk, lua_callk, and lua_pcallk. -All those functions receive a continuation function -(as a parameter named k) to continue execution after a yield. - - -

-We need to set some terminology to explain continuations. -We have a C function called from Lua which we will call -the original function. -This original function then calls one of those three functions in the C API, -which we will call the callee function, -that then yields the current thread. -(This can happen when the callee function is lua_yieldk, -or when the callee function is either lua_callk or lua_pcallk -and the function called by them yields.) - - -

-Suppose the running thread yields while executing the callee function. -After the thread resumes, -it eventually will finish running the callee function. -However, -the callee function cannot return to the original function, -because its frame in the C stack was destroyed by the yield. -Instead, Lua calls a continuation function, -which was given as an argument to the callee function. -As the name implies, -the continuation function should continue the task -of the original function. - - -

-As an illustration, consider the following function: - -

-     int original_function (lua_State *L) {
-       ...     /* code 1 */
-       status = lua_pcall(L, n, m, h);  /* calls Lua */
-       ...     /* code 2 */
-     }
-

-Now we want to allow -the Lua code being run by lua_pcall to yield. -First, we can rewrite our function like here: - -

-     int k (lua_State *L, int status, lua_KContext ctx) {
-       ...  /* code 2 */
-     }
-     
-     int original_function (lua_State *L) {
-       ...     /* code 1 */
-       return k(L, lua_pcall(L, n, m, h), ctx);
-     }
-

-In the above code, -the new function k is a -continuation function (with type lua_KFunction), -which should do all the work that the original function -was doing after calling lua_pcall. -Now, we must inform Lua that it must call k if the Lua code -being executed by lua_pcall gets interrupted in some way -(errors or yielding), -so we rewrite the code as here, -replacing lua_pcall by lua_pcallk: - -

-     int original_function (lua_State *L) {
-       ...     /* code 1 */
-       return k(L, lua_pcallk(L, n, m, h, ctx2, k), ctx1);
-     }
-

-Note the external, explicit call to the continuation: -Lua will call the continuation only if needed, that is, -in case of errors or resuming after a yield. -If the called function returns normally without ever yielding, -lua_pcallk (and lua_callk) will also return normally. -(Of course, instead of calling the continuation in that case, -you can do the equivalent work directly inside the original function.) - - -

-Besides the Lua state, -the continuation function has two other parameters: -the final status of the call plus the context value (ctx) that -was passed originally to lua_pcallk. -(Lua does not use this context value; -it only passes this value from the original function to the -continuation function.) -For lua_pcallk, -the status is the same value that would be returned by lua_pcallk, -except that it is LUA_YIELD when being executed after a yield -(instead of LUA_OK). -For lua_yieldk and lua_callk, -the status is always LUA_YIELD when Lua calls the continuation. -(For these two functions, -Lua will not call the continuation in case of errors, -because they do not handle errors.) -Similarly, when using lua_callk, -you should call the continuation function -with LUA_OK as the status. -(For lua_yieldk, there is not much point in calling -directly the continuation function, -because lua_yieldk usually does not return.) - - -

-Lua treats the continuation function as if it were the original function. -The continuation function receives the same Lua stack -from the original function, -in the same state it would be if the callee function had returned. -(For instance, -after a lua_callk the function and its arguments are -removed from the stack and replaced by the results from the call.) -It also has the same upvalues. -Whatever it returns is handled by Lua as if it were the return -of the original function. - - - - - -

4.8 – Functions and Types

- -

-Here we list all functions and types from the C API in -alphabetical order. -Each function has an indicator like this: -[-o, +p, x] - - -

-The first field, o, -is how many elements the function pops from the stack. -The second field, p, -is how many elements the function pushes onto the stack. -(Any function always pushes its results after popping its arguments.) -A field in the form x|y means the function can push (or pop) -x or y elements, -depending on the situation; -an interrogation mark '?' means that -we cannot know how many elements the function pops/pushes -by looking only at its arguments -(e.g., they may depend on what is on the stack). -The third field, x, -tells whether the function may raise errors: -'-' means the function never raises any error; -'m' means the function may raise out-of-memory errors -and errors running a __gc metamethod; -'e' means the function may raise any errors -(it can run arbitrary Lua code, -either directly or through metamethods); -'v' means the function may raise an error on purpose. - - - -


lua_absindex

-[-0, +0, –] -

int lua_absindex (lua_State *L, int idx);
- -

-Converts the acceptable index idx -into an equivalent absolute index -(that is, one that does not depend on the stack top). - - - - - -


lua_Alloc

-
typedef void * (*lua_Alloc) (void *ud,
-                             void *ptr,
-                             size_t osize,
-                             size_t nsize);
- -

-The type of the memory-allocation function used by Lua states. -The allocator function must provide a -functionality similar to realloc, -but not exactly the same. -Its arguments are -ud, an opaque pointer passed to lua_newstate; -ptr, a pointer to the block being allocated/reallocated/freed; -osize, the original size of the block or some code about what -is being allocated; -and nsize, the new size of the block. - - -

-When ptr is not NULL, -osize is the size of the block pointed by ptr, -that is, the size given when it was allocated or reallocated. - - -

-When ptr is NULL, -osize encodes the kind of object that Lua is allocating. -osize is any of -LUA_TSTRING, LUA_TTABLE, LUA_TFUNCTION, -LUA_TUSERDATA, or LUA_TTHREAD when (and only when) -Lua is creating a new object of that type. -When osize is some other value, -Lua is allocating memory for something else. - - -

-Lua assumes the following behavior from the allocator function: - - -

-When nsize is zero, -the allocator must behave like free -and return NULL. - - -

-When nsize is not zero, -the allocator must behave like realloc. -The allocator returns NULL -if and only if it cannot fulfill the request. -Lua assumes that the allocator never fails when -osize >= nsize. - - -

-Here is a simple implementation for the allocator function. -It is used in the auxiliary library by luaL_newstate. - -

-     static void *l_alloc (void *ud, void *ptr, size_t osize,
-                                                size_t nsize) {
-       (void)ud;  (void)osize;  /* not used */
-       if (nsize == 0) {
-         free(ptr);
-         return NULL;
-       }
-       else
-         return realloc(ptr, nsize);
-     }
-

-Note that Standard C ensures -that free(NULL) has no effect and that -realloc(NULL,size) is equivalent to malloc(size). -This code assumes that realloc does not fail when shrinking a block. -(Although Standard C does not ensure this behavior, -it seems to be a safe assumption.) - - - - - -


lua_arith

-[-(2|1), +1, e] -

void lua_arith (lua_State *L, int op);
- -

-Performs an arithmetic or bitwise operation over the two values -(or one, in the case of negations) -at the top of the stack, -with the value at the top being the second operand, -pops these values, and pushes the result of the operation. -The function follows the semantics of the corresponding Lua operator -(that is, it may call metamethods). - - -

-The value of op must be one of the following constants: - -

- - - - -

lua_atpanic

-[-0, +0, –] -

lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf);
- -

-Sets a new panic function and returns the old one (see §4.6). - - - - - -


lua_call

-[-(nargs+1), +nresults, e] -

void lua_call (lua_State *L, int nargs, int nresults);
- -

-Calls a function. - - -

-To call a function you must use the following protocol: -first, the function to be called is pushed onto the stack; -then, the arguments to the function are pushed -in direct order; -that is, the first argument is pushed first. -Finally you call lua_call; -nargs is the number of arguments that you pushed onto the stack. -All arguments and the function value are popped from the stack -when the function is called. -The function results are pushed onto the stack when the function returns. -The number of results is adjusted to nresults, -unless nresults is LUA_MULTRET. -In this case, all results from the function are pushed; -Lua takes care that the returned values fit into the stack space, -but it does not ensure any extra space in the stack. -The function results are pushed onto the stack in direct order -(the first result is pushed first), -so that after the call the last result is on the top of the stack. - - -

-Any error inside the called function is propagated upwards -(with a longjmp). - - -

-The following example shows how the host program can do the -equivalent to this Lua code: - -

-     a = f("how", t.x, 14)
-

-Here it is in C: - -

-     lua_getglobal(L, "f");                  /* function to be called */
-     lua_pushliteral(L, "how");                       /* 1st argument */
-     lua_getglobal(L, "t");                    /* table to be indexed */
-     lua_getfield(L, -1, "x");        /* push result of t.x (2nd arg) */
-     lua_remove(L, -2);                  /* remove 't' from the stack */
-     lua_pushinteger(L, 14);                          /* 3rd argument */
-     lua_call(L, 3, 1);     /* call 'f' with 3 arguments and 1 result */
-     lua_setglobal(L, "a");                         /* set global 'a' */
-

-Note that the code above is balanced: -at its end, the stack is back to its original configuration. -This is considered good programming practice. - - - - - -


lua_callk

-[-(nargs + 1), +nresults, e] -

void lua_callk (lua_State *L,
-                int nargs,
-                int nresults,
-                lua_KContext ctx,
-                lua_KFunction k);
- -

-This function behaves exactly like lua_call, -but allows the called function to yield (see §4.7). - - - - - -


lua_CFunction

-
typedef int (*lua_CFunction) (lua_State *L);
- -

-Type for C functions. - - -

-In order to communicate properly with Lua, -a C function must use the following protocol, -which defines the way parameters and results are passed: -a C function receives its arguments from Lua in its stack -in direct order (the first argument is pushed first). -So, when the function starts, -lua_gettop(L) returns the number of arguments received by the function. -The first argument (if any) is at index 1 -and its last argument is at index lua_gettop(L). -To return values to Lua, a C function just pushes them onto the stack, -in direct order (the first result is pushed first), -and returns the number of results. -Any other value in the stack below the results will be properly -discarded by Lua. -Like a Lua function, a C function called by Lua can also return -many results. - - -

-As an example, the following function receives a variable number -of numeric arguments and returns their average and their sum: - -

-     static int foo (lua_State *L) {
-       int n = lua_gettop(L);    /* number of arguments */
-       lua_Number sum = 0.0;
-       int i;
-       for (i = 1; i <= n; i++) {
-         if (!lua_isnumber(L, i)) {
-           lua_pushliteral(L, "incorrect argument");
-           lua_error(L);
-         }
-         sum += lua_tonumber(L, i);
-       }
-       lua_pushnumber(L, sum/n);        /* first result */
-       lua_pushnumber(L, sum);         /* second result */
-       return 2;                   /* number of results */
-     }
-
- - - - -

lua_checkstack

-[-0, +0, –] -

int lua_checkstack (lua_State *L, int n);
- -

-Ensures that the stack has space for at least n extra slots -(that is, that you can safely push up to n values into it). -It returns false if it cannot fulfill the request, -either because it would cause the stack -to be larger than a fixed maximum size -(typically at least several thousand elements) or -because it cannot allocate memory for the extra space. -This function never shrinks the stack; -if the stack already has space for the extra slots, -it is left unchanged. - - - - - -


lua_close

-[-0, +0, –] -

void lua_close (lua_State *L);
- -

-Destroys all objects in the given Lua state -(calling the corresponding garbage-collection metamethods, if any) -and frees all dynamic memory used by this state. -In several platforms, you may not need to call this function, -because all resources are naturally released when the host program ends. -On the other hand, long-running programs that create multiple states, -such as daemons or web servers, -will probably need to close states as soon as they are not needed. - - - - - -


lua_compare

-[-0, +0, e] -

int lua_compare (lua_State *L, int index1, int index2, int op);
- -

-Compares two Lua values. -Returns 1 if the value at index index1 satisfies op -when compared with the value at index index2, -following the semantics of the corresponding Lua operator -(that is, it may call metamethods). -Otherwise returns 0. -Also returns 0 if any of the indices is not valid. - - -

-The value of op must be one of the following constants: - -

    - -
  • LUA_OPEQ: compares for equality (==)
  • -
  • LUA_OPLT: compares for less than (<)
  • -
  • LUA_OPLE: compares for less or equal (<=)
  • - -
- - - - -

lua_concat

-[-n, +1, e] -

void lua_concat (lua_State *L, int n);
- -

-Concatenates the n values at the top of the stack, -pops them, and leaves the result at the top. -If n is 1, the result is the single value on the stack -(that is, the function does nothing); -if n is 0, the result is the empty string. -Concatenation is performed following the usual semantics of Lua -(see §3.4.6). - - - - - -


lua_copy

-[-0, +0, –] -

void lua_copy (lua_State *L, int fromidx, int toidx);
- -

-Copies the element at index fromidx -into the valid index toidx, -replacing the value at that position. -Values at other positions are not affected. - - - - - -


lua_createtable

-[-0, +1, m] -

void lua_createtable (lua_State *L, int narr, int nrec);
- -

-Creates a new empty table and pushes it onto the stack. -Parameter narr is a hint for how many elements the table -will have as a sequence; -parameter nrec is a hint for how many other elements -the table will have. -Lua may use these hints to preallocate memory for the new table. -This preallocation is useful for performance when you know in advance -how many elements the table will have. -Otherwise you can use the function lua_newtable. - - - - - -


lua_dump

-[-0, +0, –] -

int lua_dump (lua_State *L,
-                        lua_Writer writer,
-                        void *data,
-                        int strip);
- -

-Dumps a function as a binary chunk. -Receives a Lua function on the top of the stack -and produces a binary chunk that, -if loaded again, -results in a function equivalent to the one dumped. -As it produces parts of the chunk, -lua_dump calls function writer (see lua_Writer) -with the given data -to write them. - - -

-If strip is true, -the binary representation may not include all debug information -about the function, -to save space. - - -

-The value returned is the error code returned by the last -call to the writer; -0 means no errors. - - -

-This function does not pop the Lua function from the stack. - - - - - -


lua_error

-[-1, +0, v] -

int lua_error (lua_State *L);
- -

-Generates a Lua error, -using the value at the top of the stack as the error object. -This function does a long jump, -and therefore never returns -(see luaL_error). - - - - - -


lua_gc

-[-0, +0, m] -

int lua_gc (lua_State *L, int what, int data);
- -

-Controls the garbage collector. - - -

-This function performs several tasks, -according to the value of the parameter what: - -

    - -
  • LUA_GCSTOP: -stops the garbage collector. -
  • - -
  • LUA_GCRESTART: -restarts the garbage collector. -
  • - -
  • LUA_GCCOLLECT: -performs a full garbage-collection cycle. -
  • - -
  • LUA_GCCOUNT: -returns the current amount of memory (in Kbytes) in use by Lua. -
  • - -
  • LUA_GCCOUNTB: -returns the remainder of dividing the current amount of bytes of -memory in use by Lua by 1024. -
  • - -
  • LUA_GCSTEP: -performs an incremental step of garbage collection. -
  • - -
  • LUA_GCSETPAUSE: -sets data as the new value -for the pause of the collector (see §2.5) -and returns the previous value of the pause. -
  • - -
  • LUA_GCSETSTEPMUL: -sets data as the new value for the step multiplier of -the collector (see §2.5) -and returns the previous value of the step multiplier. -
  • - -
  • LUA_GCISRUNNING: -returns a boolean that tells whether the collector is running -(i.e., not stopped). -
  • - -
- -

-For more details about these options, -see collectgarbage. - - - - - -


lua_getallocf

-[-0, +0, –] -

lua_Alloc lua_getallocf (lua_State *L, void **ud);
- -

-Returns the memory-allocation function of a given state. -If ud is not NULL, Lua stores in *ud the -opaque pointer given when the memory-allocator function was set. - - - - - -


lua_getfield

-[-0, +1, e] -

int lua_getfield (lua_State *L, int index, const char *k);
- -

-Pushes onto the stack the value t[k], -where t is the value at the given index. -As in Lua, this function may trigger a metamethod -for the "index" event (see §2.4). - - -

-Returns the type of the pushed value. - - - - - -


lua_getextraspace

-[-0, +0, –] -

void *lua_getextraspace (lua_State *L);
- -

-Returns a pointer to a raw memory area associated with the -given Lua state. -The application can use this area for any purpose; -Lua does not use it for anything. - - -

-Each new thread has this area initialized with a copy -of the area of the main thread. - - -

-By default, this area has the size of a pointer to void, -but you can recompile Lua with a different size for this area. -(See LUA_EXTRASPACE in luaconf.h.) - - - - - -


lua_getglobal

-[-0, +1, e] -

int lua_getglobal (lua_State *L, const char *name);
- -

-Pushes onto the stack the value of the global name. -Returns the type of that value. - - - - - -


lua_geti

-[-0, +1, e] -

int lua_geti (lua_State *L, int index, lua_Integer i);
- -

-Pushes onto the stack the value t[i], -where t is the value at the given index. -As in Lua, this function may trigger a metamethod -for the "index" event (see §2.4). - - -

-Returns the type of the pushed value. - - - - - -


lua_getmetatable

-[-0, +(0|1), –] -

int lua_getmetatable (lua_State *L, int index);
- -

-If the value at the given index has a metatable, -the function pushes that metatable onto the stack and returns 1. -Otherwise, -the function returns 0 and pushes nothing on the stack. - - - - - -


lua_gettable

-[-1, +1, e] -

int lua_gettable (lua_State *L, int index);
- -

-Pushes onto the stack the value t[k], -where t is the value at the given index -and k is the value at the top of the stack. - - -

-This function pops the key from the stack, -pushing the resulting value in its place. -As in Lua, this function may trigger a metamethod -for the "index" event (see §2.4). - - -

-Returns the type of the pushed value. - - - - - -


lua_gettop

-[-0, +0, –] -

int lua_gettop (lua_State *L);
- -

-Returns the index of the top element in the stack. -Because indices start at 1, -this result is equal to the number of elements in the stack; -in particular, 0 means an empty stack. - - - - - -


lua_getuservalue

-[-0, +1, –] -

int lua_getuservalue (lua_State *L, int index);
- -

-Pushes onto the stack the Lua value associated with the full userdata -at the given index. - - -

-Returns the type of the pushed value. - - - - - -


lua_insert

-[-1, +1, –] -

void lua_insert (lua_State *L, int index);
- -

-Moves the top element into the given valid index, -shifting up the elements above this index to open space. -This function cannot be called with a pseudo-index, -because a pseudo-index is not an actual stack position. - - - - - -


lua_Integer

-
typedef ... lua_Integer;
- -

-The type of integers in Lua. - - -

-By default this type is long long, -(usually a 64-bit two-complement integer), -but that can be changed to long or int -(usually a 32-bit two-complement integer). -(See LUA_INT_TYPE in luaconf.h.) - - -

-Lua also defines the constants -LUA_MININTEGER and LUA_MAXINTEGER, -with the minimum and the maximum values that fit in this type. - - - - - -


lua_isboolean

-[-0, +0, –] -

int lua_isboolean (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a boolean, -and 0 otherwise. - - - - - -


lua_iscfunction

-[-0, +0, –] -

int lua_iscfunction (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a C function, -and 0 otherwise. - - - - - -


lua_isfunction

-[-0, +0, –] -

int lua_isfunction (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a function -(either C or Lua), and 0 otherwise. - - - - - -


lua_isinteger

-[-0, +0, –] -

int lua_isinteger (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is an integer -(that is, the value is a number and is represented as an integer), -and 0 otherwise. - - - - - -


lua_islightuserdata

-[-0, +0, –] -

int lua_islightuserdata (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a light userdata, -and 0 otherwise. - - - - - -


lua_isnil

-[-0, +0, –] -

int lua_isnil (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is nil, -and 0 otherwise. - - - - - -


lua_isnone

-[-0, +0, –] -

int lua_isnone (lua_State *L, int index);
- -

-Returns 1 if the given index is not valid, -and 0 otherwise. - - - - - -


lua_isnoneornil

-[-0, +0, –] -

int lua_isnoneornil (lua_State *L, int index);
- -

-Returns 1 if the given index is not valid -or if the value at this index is nil, -and 0 otherwise. - - - - - -


lua_isnumber

-[-0, +0, –] -

int lua_isnumber (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a number -or a string convertible to a number, -and 0 otherwise. - - - - - -


lua_isstring

-[-0, +0, –] -

int lua_isstring (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a string -or a number (which is always convertible to a string), -and 0 otherwise. - - - - - -


lua_istable

-[-0, +0, –] -

int lua_istable (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a table, -and 0 otherwise. - - - - - -


lua_isthread

-[-0, +0, –] -

int lua_isthread (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a thread, -and 0 otherwise. - - - - - -


lua_isuserdata

-[-0, +0, –] -

int lua_isuserdata (lua_State *L, int index);
- -

-Returns 1 if the value at the given index is a userdata -(either full or light), and 0 otherwise. - - - - - -


lua_isyieldable

-[-0, +0, –] -

int lua_isyieldable (lua_State *L);
- -

-Returns 1 if the given coroutine can yield, -and 0 otherwise. - - - - - -


lua_KContext

-
typedef ... lua_KContext;
- -

-The type for continuation-function contexts. -It must be a numeric type. -This type is defined as intptr_t -when intptr_t is available, -so that it can store pointers too. -Otherwise, it is defined as ptrdiff_t. - - - - - -


lua_KFunction

-
typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx);
- -

-Type for continuation functions (see §4.7). - - - - - -


lua_len

-[-0, +1, e] -

void lua_len (lua_State *L, int index);
- -

-Returns the length of the value at the given index. -It is equivalent to the '#' operator in Lua (see §3.4.7) and -may trigger a metamethod for the "length" event (see §2.4). -The result is pushed on the stack. - - - - - -


lua_load

-[-0, +1, –] -

int lua_load (lua_State *L,
-              lua_Reader reader,
-              void *data,
-              const char *chunkname,
-              const char *mode);
- -

-Loads a Lua chunk without running it. -If there are no errors, -lua_load pushes the compiled chunk as a Lua -function on top of the stack. -Otherwise, it pushes an error message. - - -

-The return values of lua_load are: - -

    - -
  • LUA_OK: no errors;
  • - -
  • LUA_ERRSYNTAX: -syntax error during precompilation;
  • - -
  • LUA_ERRMEM: -memory allocation (out-of-memory) error;
  • - -
  • LUA_ERRGCMM: -error while running a __gc metamethod. -(This error has no relation with the chunk being loaded. -It is generated by the garbage collector.) -
  • - -
- -

-The lua_load function uses a user-supplied reader function -to read the chunk (see lua_Reader). -The data argument is an opaque value passed to the reader function. - - -

-The chunkname argument gives a name to the chunk, -which is used for error messages and in debug information (see §4.9). - - -

-lua_load automatically detects whether the chunk is text or binary -and loads it accordingly (see program luac). -The string mode works as in function load, -with the addition that -a NULL value is equivalent to the string "bt". - - -

-lua_load uses the stack internally, -so the reader function must always leave the stack -unmodified when returning. - - -

-If the resulting function has upvalues, -its first upvalue is set to the value of the global environment -stored at index LUA_RIDX_GLOBALS in the registry (see §4.5). -When loading main chunks, -this upvalue will be the _ENV variable (see §2.2). -Other upvalues are initialized with nil. - - - - - -


lua_newstate

-[-0, +0, –] -

lua_State *lua_newstate (lua_Alloc f, void *ud);
- -

-Creates a new thread running in a new, independent state. -Returns NULL if it cannot create the thread or the state -(due to lack of memory). -The argument f is the allocator function; -Lua does all memory allocation for this state -through this function (see lua_Alloc). -The second argument, ud, is an opaque pointer that Lua -passes to the allocator in every call. - - - - - -


lua_newtable

-[-0, +1, m] -

void lua_newtable (lua_State *L);
- -

-Creates a new empty table and pushes it onto the stack. -It is equivalent to lua_createtable(L, 0, 0). - - - - - -


lua_newthread

-[-0, +1, m] -

lua_State *lua_newthread (lua_State *L);
- -

-Creates a new thread, pushes it on the stack, -and returns a pointer to a lua_State that represents this new thread. -The new thread returned by this function shares with the original thread -its global environment, -but has an independent execution stack. - - -

-There is no explicit function to close or to destroy a thread. -Threads are subject to garbage collection, -like any Lua object. - - - - - -


lua_newuserdata

-[-0, +1, m] -

void *lua_newuserdata (lua_State *L, size_t size);
- -

-This function allocates a new block of memory with the given size, -pushes onto the stack a new full userdata with the block address, -and returns this address. -The host program can freely use this memory. - - - - - -


lua_next

-[-1, +(2|0), e] -

int lua_next (lua_State *L, int index);
- -

-Pops a key from the stack, -and pushes a key–value pair from the table at the given index -(the "next" pair after the given key). -If there are no more elements in the table, -then lua_next returns 0 (and pushes nothing). - - -

-A typical traversal looks like this: - -

-     /* table is in the stack at index 't' */
-     lua_pushnil(L);  /* first key */
-     while (lua_next(L, t) != 0) {
-       /* uses 'key' (at index -2) and 'value' (at index -1) */
-       printf("%s - %s\n",
-              lua_typename(L, lua_type(L, -2)),
-              lua_typename(L, lua_type(L, -1)));
-       /* removes 'value'; keeps 'key' for next iteration */
-       lua_pop(L, 1);
-     }
-
- -

-While traversing a table, -do not call lua_tolstring directly on a key, -unless you know that the key is actually a string. -Recall that lua_tolstring may change -the value at the given index; -this confuses the next call to lua_next. - - -

-See function next for the caveats of modifying -the table during its traversal. - - - - - -


lua_Number

-
typedef ... lua_Number;
- -

-The type of floats in Lua. - - -

-By default this type is double, -but that can be changed to a single float or a long double. -(See LUA_FLOAT_TYPE in luaconf.h.) - - - - - -


lua_numbertointeger

-
int lua_numbertointeger (lua_Number n, lua_Integer *p);
- -

-Converts a Lua float to a Lua integer. -This macro assumes that n has an integral value. -If that value is within the range of Lua integers, -it is converted to an integer and assigned to *p. -The macro results in a boolean indicating whether the -conversion was successful. -(Note that this range test can be tricky to do -correctly without this macro, -due to roundings.) - - -

-This macro may evaluate its arguments more than once. - - - - - -


lua_pcall

-[-(nargs + 1), +(nresults|1), –] -

int lua_pcall (lua_State *L, int nargs, int nresults, int msgh);
- -

-Calls a function in protected mode. - - -

-Both nargs and nresults have the same meaning as -in lua_call. -If there are no errors during the call, -lua_pcall behaves exactly like lua_call. -However, if there is any error, -lua_pcall catches it, -pushes a single value on the stack (the error object), -and returns an error code. -Like lua_call, -lua_pcall always removes the function -and its arguments from the stack. - - -

-If msgh is 0, -then the error object returned on the stack -is exactly the original error object. -Otherwise, msgh is the stack index of a -message handler. -(This index cannot be a pseudo-index.) -In case of runtime errors, -this function will be called with the error object -and its return value will be the object -returned on the stack by lua_pcall. - - -

-Typically, the message handler is used to add more debug -information to the error object, such as a stack traceback. -Such information cannot be gathered after the return of lua_pcall, -since by then the stack has unwound. - - -

-The lua_pcall function returns one of the following constants -(defined in lua.h): - -

    - -
  • LUA_OK (0): -success.
  • - -
  • LUA_ERRRUN: -a runtime error. -
  • - -
  • LUA_ERRMEM: -memory allocation error. -For such errors, Lua does not call the message handler. -
  • - -
  • LUA_ERRERR: -error while running the message handler. -
  • - -
  • LUA_ERRGCMM: -error while running a __gc metamethod. -For such errors, Lua does not call the message handler -(as this kind of error typically has no relation -with the function being called). -
  • - -
- - - - -

lua_pcallk

-[-(nargs + 1), +(nresults|1), –] -

int lua_pcallk (lua_State *L,
-                int nargs,
-                int nresults,
-                int msgh,
-                lua_KContext ctx,
-                lua_KFunction k);
- -

-This function behaves exactly like lua_pcall, -but allows the called function to yield (see §4.7). - - - - - -


lua_pop

-[-n, +0, –] -

void lua_pop (lua_State *L, int n);
- -

-Pops n elements from the stack. - - - - - -


lua_pushboolean

-[-0, +1, –] -

void lua_pushboolean (lua_State *L, int b);
- -

-Pushes a boolean value with value b onto the stack. - - - - - -


lua_pushcclosure

-[-n, +1, m] -

void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
- -

-Pushes a new C closure onto the stack. - - -

-When a C function is created, -it is possible to associate some values with it, -thus creating a C closure (see §4.4); -these values are then accessible to the function whenever it is called. -To associate values with a C function, -first these values must be pushed onto the stack -(when there are multiple values, the first value is pushed first). -Then lua_pushcclosure -is called to create and push the C function onto the stack, -with the argument n telling how many values will be -associated with the function. -lua_pushcclosure also pops these values from the stack. - - -

-The maximum value for n is 255. - - -

-When n is zero, -this function creates a light C function, -which is just a pointer to the C function. -In that case, it never raises a memory error. - - - - - -


lua_pushcfunction

-[-0, +1, –] -

void lua_pushcfunction (lua_State *L, lua_CFunction f);
- -

-Pushes a C function onto the stack. -This function receives a pointer to a C function -and pushes onto the stack a Lua value of type function that, -when called, invokes the corresponding C function. - - -

-Any function to be callable by Lua must -follow the correct protocol to receive its parameters -and return its results (see lua_CFunction). - - - - - -


lua_pushfstring

-[-0, +1, e] -

const char *lua_pushfstring (lua_State *L, const char *fmt, ...);
- -

-Pushes onto the stack a formatted string -and returns a pointer to this string. -It is similar to the ISO C function sprintf, -but has some important differences: - -

    - -
  • -You do not have to allocate space for the result: -the result is a Lua string and Lua takes care of memory allocation -(and deallocation, through garbage collection). -
  • - -
  • -The conversion specifiers are quite restricted. -There are no flags, widths, or precisions. -The conversion specifiers can only be -'%%' (inserts the character '%'), -'%s' (inserts a zero-terminated string, with no size restrictions), -'%f' (inserts a lua_Number), -'%I' (inserts a lua_Integer), -'%p' (inserts a pointer as a hexadecimal numeral), -'%d' (inserts an int), -'%c' (inserts an int as a one-byte character), and -'%U' (inserts a long int as a UTF-8 byte sequence). -
  • - -
- -

-Unlike other push functions, -this function checks for the stack space it needs, -including the slot for its result. - - - - - -


lua_pushglobaltable

-[-0, +1, –] -

void lua_pushglobaltable (lua_State *L);
- -

-Pushes the global environment onto the stack. - - - - - -


lua_pushinteger

-[-0, +1, –] -

void lua_pushinteger (lua_State *L, lua_Integer n);
- -

-Pushes an integer with value n onto the stack. - - - - - -


lua_pushlightuserdata

-[-0, +1, –] -

void lua_pushlightuserdata (lua_State *L, void *p);
- -

-Pushes a light userdata onto the stack. - - -

-Userdata represent C values in Lua. -A light userdata represents a pointer, a void*. -It is a value (like a number): -you do not create it, it has no individual metatable, -and it is not collected (as it was never created). -A light userdata is equal to "any" -light userdata with the same C address. - - - - - -


lua_pushliteral

-[-0, +1, m] -

const char *lua_pushliteral (lua_State *L, const char *s);
- -

-This macro is equivalent to lua_pushstring, -but should be used only when s is a literal string. - - - - - -


lua_pushlstring

-[-0, +1, m] -

const char *lua_pushlstring (lua_State *L, const char *s, size_t len);
- -

-Pushes the string pointed to by s with size len -onto the stack. -Lua makes (or reuses) an internal copy of the given string, -so the memory at s can be freed or reused immediately after -the function returns. -The string can contain any binary data, -including embedded zeros. - - -

-Returns a pointer to the internal copy of the string. - - - - - -


lua_pushnil

-[-0, +1, –] -

void lua_pushnil (lua_State *L);
- -

-Pushes a nil value onto the stack. - - - - - -


lua_pushnumber

-[-0, +1, –] -

void lua_pushnumber (lua_State *L, lua_Number n);
- -

-Pushes a float with value n onto the stack. - - - - - -


lua_pushstring

-[-0, +1, m] -

const char *lua_pushstring (lua_State *L, const char *s);
- -

-Pushes the zero-terminated string pointed to by s -onto the stack. -Lua makes (or reuses) an internal copy of the given string, -so the memory at s can be freed or reused immediately after -the function returns. - - -

-Returns a pointer to the internal copy of the string. - - -

-If s is NULL, pushes nil and returns NULL. - - - - - -


lua_pushthread

-[-0, +1, –] -

int lua_pushthread (lua_State *L);
- -

-Pushes the thread represented by L onto the stack. -Returns 1 if this thread is the main thread of its state. - - - - - -


lua_pushvalue

-[-0, +1, –] -

void lua_pushvalue (lua_State *L, int index);
- -

-Pushes a copy of the element at the given index -onto the stack. - - - - - -


lua_pushvfstring

-[-0, +1, m] -

const char *lua_pushvfstring (lua_State *L,
-                              const char *fmt,
-                              va_list argp);
- -

-Equivalent to lua_pushfstring, except that it receives a va_list -instead of a variable number of arguments. - - - - - -


lua_rawequal

-[-0, +0, –] -

int lua_rawequal (lua_State *L, int index1, int index2);
- -

-Returns 1 if the two values in indices index1 and -index2 are primitively equal -(that is, without calling the __eq metamethod). -Otherwise returns 0. -Also returns 0 if any of the indices are not valid. - - - - - -


lua_rawget

-[-1, +1, –] -

int lua_rawget (lua_State *L, int index);
- -

-Similar to lua_gettable, but does a raw access -(i.e., without metamethods). - - - - - -


lua_rawgeti

-[-0, +1, –] -

int lua_rawgeti (lua_State *L, int index, lua_Integer n);
- -

-Pushes onto the stack the value t[n], -where t is the table at the given index. -The access is raw, -that is, it does not invoke the __index metamethod. - - -

-Returns the type of the pushed value. - - - - - -


lua_rawgetp

-[-0, +1, –] -

int lua_rawgetp (lua_State *L, int index, const void *p);
- -

-Pushes onto the stack the value t[k], -where t is the table at the given index and -k is the pointer p represented as a light userdata. -The access is raw; -that is, it does not invoke the __index metamethod. - - -

-Returns the type of the pushed value. - - - - - -


lua_rawlen

-[-0, +0, –] -

size_t lua_rawlen (lua_State *L, int index);
- -

-Returns the raw "length" of the value at the given index: -for strings, this is the string length; -for tables, this is the result of the length operator ('#') -with no metamethods; -for userdata, this is the size of the block of memory allocated -for the userdata; -for other values, it is 0. - - - - - -


lua_rawset

-[-2, +0, m] -

void lua_rawset (lua_State *L, int index);
- -

-Similar to lua_settable, but does a raw assignment -(i.e., without metamethods). - - - - - -


lua_rawseti

-[-1, +0, m] -

void lua_rawseti (lua_State *L, int index, lua_Integer i);
- -

-Does the equivalent of t[i] = v, -where t is the table at the given index -and v is the value at the top of the stack. - - -

-This function pops the value from the stack. -The assignment is raw, -that is, it does not invoke the __newindex metamethod. - - - - - -


lua_rawsetp

-[-1, +0, m] -

void lua_rawsetp (lua_State *L, int index, const void *p);
- -

-Does the equivalent of t[p] = v, -where t is the table at the given index, -p is encoded as a light userdata, -and v is the value at the top of the stack. - - -

-This function pops the value from the stack. -The assignment is raw, -that is, it does not invoke __newindex metamethod. - - - - - -


lua_Reader

-
typedef const char * (*lua_Reader) (lua_State *L,
-                                    void *data,
-                                    size_t *size);
- -

-The reader function used by lua_load. -Every time it needs another piece of the chunk, -lua_load calls the reader, -passing along its data parameter. -The reader must return a pointer to a block of memory -with a new piece of the chunk -and set size to the block size. -The block must exist until the reader function is called again. -To signal the end of the chunk, -the reader must return NULL or set size to zero. -The reader function may return pieces of any size greater than zero. - - - - - -


lua_register

-[-0, +0, e] -

void lua_register (lua_State *L, const char *name, lua_CFunction f);
- -

-Sets the C function f as the new value of global name. -It is defined as a macro: - -

-     #define lua_register(L,n,f) \
-            (lua_pushcfunction(L, f), lua_setglobal(L, n))
-
- - - - -

lua_remove

-[-1, +0, –] -

void lua_remove (lua_State *L, int index);
- -

-Removes the element at the given valid index, -shifting down the elements above this index to fill the gap. -This function cannot be called with a pseudo-index, -because a pseudo-index is not an actual stack position. - - - - - -


lua_replace

-[-1, +0, –] -

void lua_replace (lua_State *L, int index);
- -

-Moves the top element into the given valid index -without shifting any element -(therefore replacing the value at that given index), -and then pops the top element. - - - - - -


lua_resume

-[-?, +?, –] -

int lua_resume (lua_State *L, lua_State *from, int nargs);
- -

-Starts and resumes a coroutine in the given thread L. - - -

-To start a coroutine, -you push onto the thread stack the main function plus any arguments; -then you call lua_resume, -with nargs being the number of arguments. -This call returns when the coroutine suspends or finishes its execution. -When it returns, the stack contains all values passed to lua_yield, -or all values returned by the body function. -lua_resume returns -LUA_YIELD if the coroutine yields, -LUA_OK if the coroutine finishes its execution -without errors, -or an error code in case of errors (see lua_pcall). - - -

-In case of errors, -the stack is not unwound, -so you can use the debug API over it. -The error object is on the top of the stack. - - -

-To resume a coroutine, -you remove any results from the last lua_yield, -put on its stack only the values to -be passed as results from yield, -and then call lua_resume. - - -

-The parameter from represents the coroutine that is resuming L. -If there is no such coroutine, -this parameter can be NULL. - - - - - -


lua_rotate

-[-0, +0, –] -

void lua_rotate (lua_State *L, int idx, int n);
- -

-Rotates the stack elements between the valid index idx -and the top of the stack. -The elements are rotated n positions in the direction of the top, -for a positive n, -or -n positions in the direction of the bottom, -for a negative n. -The absolute value of n must not be greater than the size -of the slice being rotated. -This function cannot be called with a pseudo-index, -because a pseudo-index is not an actual stack position. - - - - - -


lua_setallocf

-[-0, +0, –] -

void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
- -

-Changes the allocator function of a given state to f -with user data ud. - - - - - -


lua_setfield

-[-1, +0, e] -

void lua_setfield (lua_State *L, int index, const char *k);
- -

-Does the equivalent to t[k] = v, -where t is the value at the given index -and v is the value at the top of the stack. - - -

-This function pops the value from the stack. -As in Lua, this function may trigger a metamethod -for the "newindex" event (see §2.4). - - - - - -


lua_setglobal

-[-1, +0, e] -

void lua_setglobal (lua_State *L, const char *name);
- -

-Pops a value from the stack and -sets it as the new value of global name. - - - - - -


lua_seti

-[-1, +0, e] -

void lua_seti (lua_State *L, int index, lua_Integer n);
- -

-Does the equivalent to t[n] = v, -where t is the value at the given index -and v is the value at the top of the stack. - - -

-This function pops the value from the stack. -As in Lua, this function may trigger a metamethod -for the "newindex" event (see §2.4). - - - - - -


lua_setmetatable

-[-1, +0, –] -

void lua_setmetatable (lua_State *L, int index);
- -

-Pops a table from the stack and -sets it as the new metatable for the value at the given index. - - - - - -


lua_settable

-[-2, +0, e] -

void lua_settable (lua_State *L, int index);
- -

-Does the equivalent to t[k] = v, -where t is the value at the given index, -v is the value at the top of the stack, -and k is the value just below the top. - - -

-This function pops both the key and the value from the stack. -As in Lua, this function may trigger a metamethod -for the "newindex" event (see §2.4). - - - - - -


lua_settop

-[-?, +?, –] -

void lua_settop (lua_State *L, int index);
- -

-Accepts any index, or 0, -and sets the stack top to this index. -If the new top is larger than the old one, -then the new elements are filled with nil. -If index is 0, then all stack elements are removed. - - - - - -


lua_setuservalue

-[-1, +0, –] -

void lua_setuservalue (lua_State *L, int index);
- -

-Pops a value from the stack and sets it as -the new value associated to the full userdata at the given index. - - - - - -


lua_State

-
typedef struct lua_State lua_State;
- -

-An opaque structure that points to a thread and indirectly -(through the thread) to the whole state of a Lua interpreter. -The Lua library is fully reentrant: -it has no global variables. -All information about a state is accessible through this structure. - - -

-A pointer to this structure must be passed as the first argument to -every function in the library, except to lua_newstate, -which creates a Lua state from scratch. - - - - - -


lua_status

-[-0, +0, –] -

int lua_status (lua_State *L);
- -

-Returns the status of the thread L. - - -

-The status can be 0 (LUA_OK) for a normal thread, -an error code if the thread finished the execution -of a lua_resume with an error, -or LUA_YIELD if the thread is suspended. - - -

-You can only call functions in threads with status LUA_OK. -You can resume threads with status LUA_OK -(to start a new coroutine) or LUA_YIELD -(to resume a coroutine). - - - - - -


lua_stringtonumber

-[-0, +1, –] -

size_t lua_stringtonumber (lua_State *L, const char *s);
- -

-Converts the zero-terminated string s to a number, -pushes that number into the stack, -and returns the total size of the string, -that is, its length plus one. -The conversion can result in an integer or a float, -according to the lexical conventions of Lua (see §3.1). -The string may have leading and trailing spaces and a sign. -If the string is not a valid numeral, -returns 0 and pushes nothing. -(Note that the result can be used as a boolean, -true if the conversion succeeds.) - - - - - -


lua_toboolean

-[-0, +0, –] -

int lua_toboolean (lua_State *L, int index);
- -

-Converts the Lua value at the given index to a C boolean -value (0 or 1). -Like all tests in Lua, -lua_toboolean returns true for any Lua value -different from false and nil; -otherwise it returns false. -(If you want to accept only actual boolean values, -use lua_isboolean to test the value's type.) - - - - - -


lua_tocfunction

-[-0, +0, –] -

lua_CFunction lua_tocfunction (lua_State *L, int index);
- -

-Converts a value at the given index to a C function. -That value must be a C function; -otherwise, returns NULL. - - - - - -


lua_tointeger

-[-0, +0, –] -

lua_Integer lua_tointeger (lua_State *L, int index);
- -

-Equivalent to lua_tointegerx with isnum equal to NULL. - - - - - -


lua_tointegerx

-[-0, +0, –] -

lua_Integer lua_tointegerx (lua_State *L, int index, int *isnum);
- -

-Converts the Lua value at the given index -to the signed integral type lua_Integer. -The Lua value must be an integer, -or a number or string convertible to an integer (see §3.4.3); -otherwise, lua_tointegerx returns 0. - - -

-If isnum is not NULL, -its referent is assigned a boolean value that -indicates whether the operation succeeded. - - - - - -


lua_tolstring

-[-0, +0, m] -

const char *lua_tolstring (lua_State *L, int index, size_t *len);
- -

-Converts the Lua value at the given index to a C string. -If len is not NULL, -it sets *len with the string length. -The Lua value must be a string or a number; -otherwise, the function returns NULL. -If the value is a number, -then lua_tolstring also -changes the actual value in the stack to a string. -(This change confuses lua_next -when lua_tolstring is applied to keys during a table traversal.) - - -

-lua_tolstring returns a pointer -to a string inside the Lua state. -This string always has a zero ('\0') -after its last character (as in C), -but can contain other zeros in its body. - - -

-Because Lua has garbage collection, -there is no guarantee that the pointer returned by lua_tolstring -will be valid after the corresponding Lua value is removed from the stack. - - - - - -


lua_tonumber

-[-0, +0, –] -

lua_Number lua_tonumber (lua_State *L, int index);
- -

-Equivalent to lua_tonumberx with isnum equal to NULL. - - - - - -


lua_tonumberx

-[-0, +0, –] -

lua_Number lua_tonumberx (lua_State *L, int index, int *isnum);
- -

-Converts the Lua value at the given index -to the C type lua_Number (see lua_Number). -The Lua value must be a number or a string convertible to a number -(see §3.4.3); -otherwise, lua_tonumberx returns 0. - - -

-If isnum is not NULL, -its referent is assigned a boolean value that -indicates whether the operation succeeded. - - - - - -


lua_topointer

-[-0, +0, –] -

const void *lua_topointer (lua_State *L, int index);
- -

-Converts the value at the given index to a generic -C pointer (void*). -The value can be a userdata, a table, a thread, or a function; -otherwise, lua_topointer returns NULL. -Different objects will give different pointers. -There is no way to convert the pointer back to its original value. - - -

-Typically this function is used only for hashing and debug information. - - - - - -


lua_tostring

-[-0, +0, m] -

const char *lua_tostring (lua_State *L, int index);
- -

-Equivalent to lua_tolstring with len equal to NULL. - - - - - -


lua_tothread

-[-0, +0, –] -

lua_State *lua_tothread (lua_State *L, int index);
- -

-Converts the value at the given index to a Lua thread -(represented as lua_State*). -This value must be a thread; -otherwise, the function returns NULL. - - - - - -


lua_touserdata

-[-0, +0, –] -

void *lua_touserdata (lua_State *L, int index);
- -

-If the value at the given index is a full userdata, -returns its block address. -If the value is a light userdata, -returns its pointer. -Otherwise, returns NULL. - - - - - -


lua_type

-[-0, +0, –] -

int lua_type (lua_State *L, int index);
- -

-Returns the type of the value in the given valid index, -or LUA_TNONE for a non-valid (but acceptable) index. -The types returned by lua_type are coded by the following constants -defined in lua.h: -LUA_TNIL (0), -LUA_TNUMBER, -LUA_TBOOLEAN, -LUA_TSTRING, -LUA_TTABLE, -LUA_TFUNCTION, -LUA_TUSERDATA, -LUA_TTHREAD, -and -LUA_TLIGHTUSERDATA. - - - - - -


lua_typename

-[-0, +0, –] -

const char *lua_typename (lua_State *L, int tp);
- -

-Returns the name of the type encoded by the value tp, -which must be one the values returned by lua_type. - - - - - -


lua_Unsigned

-
typedef ... lua_Unsigned;
- -

-The unsigned version of lua_Integer. - - - - - -


lua_upvalueindex

-[-0, +0, –] -

int lua_upvalueindex (int i);
- -

-Returns the pseudo-index that represents the i-th upvalue of -the running function (see §4.4). - - - - - -


lua_version

-[-0, +0, –] -

const lua_Number *lua_version (lua_State *L);
- -

-Returns the address of the version number -(a C static variable) -stored in the Lua core. -When called with a valid lua_State, -returns the address of the version used to create that state. -When called with NULL, -returns the address of the version running the call. - - - - - -


lua_Writer

-
typedef int (*lua_Writer) (lua_State *L,
-                           const void* p,
-                           size_t sz,
-                           void* ud);
- -

-The type of the writer function used by lua_dump. -Every time it produces another piece of chunk, -lua_dump calls the writer, -passing along the buffer to be written (p), -its size (sz), -and the data parameter supplied to lua_dump. - - -

-The writer returns an error code: -0 means no errors; -any other value means an error and stops lua_dump from -calling the writer again. - - - - - -


lua_xmove

-[-?, +?, –] -

void lua_xmove (lua_State *from, lua_State *to, int n);
- -

-Exchange values between different threads of the same state. - - -

-This function pops n values from the stack from, -and pushes them onto the stack to. - - - - - -


lua_yield

-[-?, +?, e] -

int lua_yield (lua_State *L, int nresults);
- -

-This function is equivalent to lua_yieldk, -but it has no continuation (see §4.7). -Therefore, when the thread resumes, -it continues the function that called -the function calling lua_yield. - - - - - -


lua_yieldk

-[-?, +?, e] -

int lua_yieldk (lua_State *L,
-                int nresults,
-                lua_KContext ctx,
-                lua_KFunction k);
- -

-Yields a coroutine (thread). - - -

-When a C function calls lua_yieldk, -the running coroutine suspends its execution, -and the call to lua_resume that started this coroutine returns. -The parameter nresults is the number of values from the stack -that will be passed as results to lua_resume. - - -

-When the coroutine is resumed again, -Lua calls the given continuation function k to continue -the execution of the C function that yielded (see §4.7). -This continuation function receives the same stack -from the previous function, -with the n results removed and -replaced by the arguments passed to lua_resume. -Moreover, -the continuation function receives the value ctx -that was passed to lua_yieldk. - - -

-Usually, this function does not return; -when the coroutine eventually resumes, -it continues executing the continuation function. -However, there is one special case, -which is when this function is called -from inside a line or a count hook (see §4.9). -In that case, lua_yieldk should be called with no continuation -(probably in the form of lua_yield) and no results, -and the hook should return immediately after the call. -Lua will yield and, -when the coroutine resumes again, -it will continue the normal execution -of the (Lua) function that triggered the hook. - - -

-This function can raise an error if it is called from a thread -with a pending C call with no continuation function, -or it is called from a thread that is not running inside a resume -(e.g., the main thread). - - - - - - - -

4.9 – The Debug Interface

- -

-Lua has no built-in debugging facilities. -Instead, it offers a special interface -by means of functions and hooks. -This interface allows the construction of different -kinds of debuggers, profilers, and other tools -that need "inside information" from the interpreter. - - - -


lua_Debug

-
typedef struct lua_Debug {
-  int event;
-  const char *name;           /* (n) */
-  const char *namewhat;       /* (n) */
-  const char *what;           /* (S) */
-  const char *source;         /* (S) */
-  int currentline;            /* (l) */
-  int linedefined;            /* (S) */
-  int lastlinedefined;        /* (S) */
-  unsigned char nups;         /* (u) number of upvalues */
-  unsigned char nparams;      /* (u) number of parameters */
-  char isvararg;              /* (u) */
-  char istailcall;            /* (t) */
-  char short_src[LUA_IDSIZE]; /* (S) */
-  /* private part */
-  other fields
-} lua_Debug;
- -

-A structure used to carry different pieces of -information about a function or an activation record. -lua_getstack fills only the private part -of this structure, for later use. -To fill the other fields of lua_Debug with useful information, -call lua_getinfo. - - -

-The fields of lua_Debug have the following meaning: - -

    - -
  • source: -the name of the chunk that created the function. -If source starts with a '@', -it means that the function was defined in a file where -the file name follows the '@'. -If source starts with a '=', -the remainder of its contents describe the source in a user-dependent manner. -Otherwise, -the function was defined in a string where -source is that string. -
  • - -
  • short_src: -a "printable" version of source, to be used in error messages. -
  • - -
  • linedefined: -the line number where the definition of the function starts. -
  • - -
  • lastlinedefined: -the line number where the definition of the function ends. -
  • - -
  • what: -the string "Lua" if the function is a Lua function, -"C" if it is a C function, -"main" if it is the main part of a chunk. -
  • - -
  • currentline: -the current line where the given function is executing. -When no line information is available, -currentline is set to -1. -
  • - -
  • name: -a reasonable name for the given function. -Because functions in Lua are first-class values, -they do not have a fixed name: -some functions can be the value of multiple global variables, -while others can be stored only in a table field. -The lua_getinfo function checks how the function was -called to find a suitable name. -If it cannot find a name, -then name is set to NULL. -
  • - -
  • namewhat: -explains the name field. -The value of namewhat can be -"global", "local", "method", -"field", "upvalue", or "" (the empty string), -according to how the function was called. -(Lua uses the empty string when no other option seems to apply.) -
  • - -
  • istailcall: -true if this function invocation was called by a tail call. -In this case, the caller of this level is not in the stack. -
  • - -
  • nups: -the number of upvalues of the function. -
  • - -
  • nparams: -the number of fixed parameters of the function -(always 0 for C functions). -
  • - -
  • isvararg: -true if the function is a vararg function -(always true for C functions). -
  • - -
- - - - -

lua_gethook

-[-0, +0, –] -

lua_Hook lua_gethook (lua_State *L);
- -

-Returns the current hook function. - - - - - -


lua_gethookcount

-[-0, +0, –] -

int lua_gethookcount (lua_State *L);
- -

-Returns the current hook count. - - - - - -


lua_gethookmask

-[-0, +0, –] -

int lua_gethookmask (lua_State *L);
- -

-Returns the current hook mask. - - - - - -


lua_getinfo

-[-(0|1), +(0|1|2), e] -

int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
- -

-Gets information about a specific function or function invocation. - - -

-To get information about a function invocation, -the parameter ar must be a valid activation record that was -filled by a previous call to lua_getstack or -given as argument to a hook (see lua_Hook). - - -

-To get information about a function, you push it onto the stack -and start the what string with the character '>'. -(In that case, -lua_getinfo pops the function from the top of the stack.) -For instance, to know in which line a function f was defined, -you can write the following code: - -

-     lua_Debug ar;
-     lua_getglobal(L, "f");  /* get global 'f' */
-     lua_getinfo(L, ">S", &ar);
-     printf("%d\n", ar.linedefined);
-
- -

-Each character in the string what -selects some fields of the structure ar to be filled or -a value to be pushed on the stack: - -

    - -
  • 'n': fills in the field name and namewhat; -
  • - -
  • 'S': -fills in the fields source, short_src, -linedefined, lastlinedefined, and what; -
  • - -
  • 'l': fills in the field currentline; -
  • - -
  • 't': fills in the field istailcall; -
  • - -
  • 'u': fills in the fields -nups, nparams, and isvararg; -
  • - -
  • 'f': -pushes onto the stack the function that is -running at the given level; -
  • - -
  • 'L': -pushes onto the stack a table whose indices are the -numbers of the lines that are valid on the function. -(A valid line is a line with some associated code, -that is, a line where you can put a break point. -Non-valid lines include empty lines and comments.) - - -

    -If this option is given together with option 'f', -its table is pushed after the function. -

  • - -
- -

-This function returns 0 on error -(for instance, an invalid option in what). - - - - - -


lua_getlocal

-[-0, +(0|1), –] -

const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
- -

-Gets information about a local variable of -a given activation record or a given function. - - -

-In the first case, -the parameter ar must be a valid activation record that was -filled by a previous call to lua_getstack or -given as argument to a hook (see lua_Hook). -The index n selects which local variable to inspect; -see debug.getlocal for details about variable indices -and names. - - -

-lua_getlocal pushes the variable's value onto the stack -and returns its name. - - -

-In the second case, ar must be NULL and the function -to be inspected must be at the top of the stack. -In this case, only parameters of Lua functions are visible -(as there is no information about what variables are active) -and no values are pushed onto the stack. - - -

-Returns NULL (and pushes nothing) -when the index is greater than -the number of active local variables. - - - - - -


lua_getstack

-[-0, +0, –] -

int lua_getstack (lua_State *L, int level, lua_Debug *ar);
- -

-Gets information about the interpreter runtime stack. - - -

-This function fills parts of a lua_Debug structure with -an identification of the activation record -of the function executing at a given level. -Level 0 is the current running function, -whereas level n+1 is the function that has called level n -(except for tail calls, which do not count on the stack). -When there are no errors, lua_getstack returns 1; -when called with a level greater than the stack depth, -it returns 0. - - - - - -


lua_getupvalue

-[-0, +(0|1), –] -

const char *lua_getupvalue (lua_State *L, int funcindex, int n);
- -

-Gets information about the n-th upvalue -of the closure at index funcindex. -It pushes the upvalue's value onto the stack -and returns its name. -Returns NULL (and pushes nothing) -when the index n is greater than the number of upvalues. - - -

-For C functions, this function uses the empty string "" -as a name for all upvalues. -(For Lua functions, -upvalues are the external local variables that the function uses, -and that are consequently included in its closure.) - - -

-Upvalues have no particular order, -as they are active through the whole function. -They are numbered in an arbitrary order. - - - - - -


lua_Hook

-
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
- -

-Type for debugging hook functions. - - -

-Whenever a hook is called, its ar argument has its field -event set to the specific event that triggered the hook. -Lua identifies these events with the following constants: -LUA_HOOKCALL, LUA_HOOKRET, -LUA_HOOKTAILCALL, LUA_HOOKLINE, -and LUA_HOOKCOUNT. -Moreover, for line events, the field currentline is also set. -To get the value of any other field in ar, -the hook must call lua_getinfo. - - -

-For call events, event can be LUA_HOOKCALL, -the normal value, or LUA_HOOKTAILCALL, for a tail call; -in this case, there will be no corresponding return event. - - -

-While Lua is running a hook, it disables other calls to hooks. -Therefore, if a hook calls back Lua to execute a function or a chunk, -this execution occurs without any calls to hooks. - - -

-Hook functions cannot have continuations, -that is, they cannot call lua_yieldk, -lua_pcallk, or lua_callk with a non-null k. - - -

-Hook functions can yield under the following conditions: -Only count and line events can yield; -to yield, a hook function must finish its execution -calling lua_yield with nresults equal to zero -(that is, with no values). - - - - - -


lua_sethook

-[-0, +0, –] -

void lua_sethook (lua_State *L, lua_Hook f, int mask, int count);
- -

-Sets the debugging hook function. - - -

-Argument f is the hook function. -mask specifies on which events the hook will be called: -it is formed by a bitwise OR of the constants -LUA_MASKCALL, -LUA_MASKRET, -LUA_MASKLINE, -and LUA_MASKCOUNT. -The count argument is only meaningful when the mask -includes LUA_MASKCOUNT. -For each event, the hook is called as explained below: - -

    - -
  • The call hook: is called when the interpreter calls a function. -The hook is called just after Lua enters the new function, -before the function gets its arguments. -
  • - -
  • The return hook: is called when the interpreter returns from a function. -The hook is called just before Lua leaves the function. -There is no standard way to access the values -to be returned by the function. -
  • - -
  • The line hook: is called when the interpreter is about to -start the execution of a new line of code, -or when it jumps back in the code (even to the same line). -(This event only happens while Lua is executing a Lua function.) -
  • - -
  • The count hook: is called after the interpreter executes every -count instructions. -(This event only happens while Lua is executing a Lua function.) -
  • - -
- -

-A hook is disabled by setting mask to zero. - - - - - -


lua_setlocal

-[-(0|1), +0, –] -

const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
- -

-Sets the value of a local variable of a given activation record. -It assigns the value at the top of the stack -to the variable and returns its name. -It also pops the value from the stack. - - -

-Returns NULL (and pops nothing) -when the index is greater than -the number of active local variables. - - -

-Parameters ar and n are as in function lua_getlocal. - - - - - -


lua_setupvalue

-[-(0|1), +0, –] -

const char *lua_setupvalue (lua_State *L, int funcindex, int n);
- -

-Sets the value of a closure's upvalue. -It assigns the value at the top of the stack -to the upvalue and returns its name. -It also pops the value from the stack. - - -

-Returns NULL (and pops nothing) -when the index n is greater than the number of upvalues. - - -

-Parameters funcindex and n are as in function lua_getupvalue. - - - - - -


lua_upvalueid

-[-0, +0, –] -

void *lua_upvalueid (lua_State *L, int funcindex, int n);
- -

-Returns a unique identifier for the upvalue numbered n -from the closure at index funcindex. - - -

-These unique identifiers allow a program to check whether different -closures share upvalues. -Lua closures that share an upvalue -(that is, that access a same external local variable) -will return identical ids for those upvalue indices. - - -

-Parameters funcindex and n are as in function lua_getupvalue, -but n cannot be greater than the number of upvalues. - - - - - -


lua_upvaluejoin

-[-0, +0, –] -

void lua_upvaluejoin (lua_State *L, int funcindex1, int n1,
-                                    int funcindex2, int n2);
- -

-Make the n1-th upvalue of the Lua closure at index funcindex1 -refer to the n2-th upvalue of the Lua closure at index funcindex2. - - - - - - - -

5 – The Auxiliary Library

- -

- -The auxiliary library provides several convenient functions -to interface C with Lua. -While the basic API provides the primitive functions for all -interactions between C and Lua, -the auxiliary library provides higher-level functions for some -common tasks. - - -

-All functions and types from the auxiliary library -are defined in header file lauxlib.h and -have a prefix luaL_. - - -

-All functions in the auxiliary library are built on -top of the basic API, -and so they provide nothing that cannot be done with that API. -Nevertheless, the use of the auxiliary library ensures -more consistency to your code. - - -

-Several functions in the auxiliary library use internally some -extra stack slots. -When a function in the auxiliary library uses less than five slots, -it does not check the stack size; -it simply assumes that there are enough slots. - - -

-Several functions in the auxiliary library are used to -check C function arguments. -Because the error message is formatted for arguments -(e.g., "bad argument #1"), -you should not use these functions for other stack values. - - -

-Functions called luaL_check* -always raise an error if the check is not satisfied. - - - -

5.1 – Functions and Types

- -

-Here we list all functions and types from the auxiliary library -in alphabetical order. - - - -


luaL_addchar

-[-?, +?, m] -

void luaL_addchar (luaL_Buffer *B, char c);
- -

-Adds the byte c to the buffer B -(see luaL_Buffer). - - - - - -


luaL_addlstring

-[-?, +?, m] -

void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);
- -

-Adds the string pointed to by s with length l to -the buffer B -(see luaL_Buffer). -The string can contain embedded zeros. - - - - - -


luaL_addsize

-[-?, +?, –] -

void luaL_addsize (luaL_Buffer *B, size_t n);
- -

-Adds to the buffer B (see luaL_Buffer) -a string of length n previously copied to the -buffer area (see luaL_prepbuffer). - - - - - -


luaL_addstring

-[-?, +?, m] -

void luaL_addstring (luaL_Buffer *B, const char *s);
- -

-Adds the zero-terminated string pointed to by s -to the buffer B -(see luaL_Buffer). - - - - - -


luaL_addvalue

-[-1, +?, m] -

void luaL_addvalue (luaL_Buffer *B);
- -

-Adds the value at the top of the stack -to the buffer B -(see luaL_Buffer). -Pops the value. - - -

-This is the only function on string buffers that can (and must) -be called with an extra element on the stack, -which is the value to be added to the buffer. - - - - - -


luaL_argcheck

-[-0, +0, v] -

void luaL_argcheck (lua_State *L,
-                    int cond,
-                    int arg,
-                    const char *extramsg);
- -

-Checks whether cond is true. -If it is not, raises an error with a standard message (see luaL_argerror). - - - - - -


luaL_argerror

-[-0, +0, v] -

int luaL_argerror (lua_State *L, int arg, const char *extramsg);
- -

-Raises an error reporting a problem with argument arg -of the C function that called it, -using a standard message -that includes extramsg as a comment: - -

-     bad argument #arg to 'funcname' (extramsg)
-

-This function never returns. - - - - - -


luaL_Buffer

-
typedef struct luaL_Buffer luaL_Buffer;
- -

-Type for a string buffer. - - -

-A string buffer allows C code to build Lua strings piecemeal. -Its pattern of use is as follows: - -

    - -
  • First declare a variable b of type luaL_Buffer.
  • - -
  • Then initialize it with a call luaL_buffinit(L, &b).
  • - -
  • -Then add string pieces to the buffer calling any of -the luaL_add* functions. -
  • - -
  • -Finish by calling luaL_pushresult(&b). -This call leaves the final string on the top of the stack. -
  • - -
- -

-If you know beforehand the total size of the resulting string, -you can use the buffer like this: - -

    - -
  • First declare a variable b of type luaL_Buffer.
  • - -
  • Then initialize it and preallocate a space of -size sz with a call luaL_buffinitsize(L, &b, sz).
  • - -
  • Then copy the string into that space.
  • - -
  • -Finish by calling luaL_pushresultsize(&b, sz), -where sz is the total size of the resulting string -copied into that space. -
  • - -
- -

-During its normal operation, -a string buffer uses a variable number of stack slots. -So, while using a buffer, you cannot assume that you know where -the top of the stack is. -You can use the stack between successive calls to buffer operations -as long as that use is balanced; -that is, -when you call a buffer operation, -the stack is at the same level -it was immediately after the previous buffer operation. -(The only exception to this rule is luaL_addvalue.) -After calling luaL_pushresult the stack is back to its -level when the buffer was initialized, -plus the final string on its top. - - - - - -


luaL_buffinit

-[-0, +0, –] -

void luaL_buffinit (lua_State *L, luaL_Buffer *B);
- -

-Initializes a buffer B. -This function does not allocate any space; -the buffer must be declared as a variable -(see luaL_Buffer). - - - - - -


luaL_buffinitsize

-[-?, +?, m] -

char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz);
- -

-Equivalent to the sequence -luaL_buffinit, luaL_prepbuffsize. - - - - - -


luaL_callmeta

-[-0, +(0|1), e] -

int luaL_callmeta (lua_State *L, int obj, const char *e);
- -

-Calls a metamethod. - - -

-If the object at index obj has a metatable and this -metatable has a field e, -this function calls this field passing the object as its only argument. -In this case this function returns true and pushes onto the -stack the value returned by the call. -If there is no metatable or no metamethod, -this function returns false (without pushing any value on the stack). - - - - - -


luaL_checkany

-[-0, +0, v] -

void luaL_checkany (lua_State *L, int arg);
- -

-Checks whether the function has an argument -of any type (including nil) at position arg. - - - - - -


luaL_checkinteger

-[-0, +0, v] -

lua_Integer luaL_checkinteger (lua_State *L, int arg);
- -

-Checks whether the function argument arg is an integer -(or can be converted to an integer) -and returns this integer cast to a lua_Integer. - - - - - -


luaL_checklstring

-[-0, +0, v] -

const char *luaL_checklstring (lua_State *L, int arg, size_t *l);
- -

-Checks whether the function argument arg is a string -and returns this string; -if l is not NULL fills *l -with the string's length. - - -

-This function uses lua_tolstring to get its result, -so all conversions and caveats of that function apply here. - - - - - -


luaL_checknumber

-[-0, +0, v] -

lua_Number luaL_checknumber (lua_State *L, int arg);
- -

-Checks whether the function argument arg is a number -and returns this number. - - - - - -


luaL_checkoption

-[-0, +0, v] -

int luaL_checkoption (lua_State *L,
-                      int arg,
-                      const char *def,
-                      const char *const lst[]);
- -

-Checks whether the function argument arg is a string and -searches for this string in the array lst -(which must be NULL-terminated). -Returns the index in the array where the string was found. -Raises an error if the argument is not a string or -if the string cannot be found. - - -

-If def is not NULL, -the function uses def as a default value when -there is no argument arg or when this argument is nil. - - -

-This is a useful function for mapping strings to C enums. -(The usual convention in Lua libraries is -to use strings instead of numbers to select options.) - - - - - -


luaL_checkstack

-[-0, +0, v] -

void luaL_checkstack (lua_State *L, int sz, const char *msg);
- -

-Grows the stack size to top + sz elements, -raising an error if the stack cannot grow to that size. -msg is an additional text to go into the error message -(or NULL for no additional text). - - - - - -


luaL_checkstring

-[-0, +0, v] -

const char *luaL_checkstring (lua_State *L, int arg);
- -

-Checks whether the function argument arg is a string -and returns this string. - - -

-This function uses lua_tolstring to get its result, -so all conversions and caveats of that function apply here. - - - - - -


luaL_checktype

-[-0, +0, v] -

void luaL_checktype (lua_State *L, int arg, int t);
- -

-Checks whether the function argument arg has type t. -See lua_type for the encoding of types for t. - - - - - -


luaL_checkudata

-[-0, +0, v] -

void *luaL_checkudata (lua_State *L, int arg, const char *tname);
- -

-Checks whether the function argument arg is a userdata -of the type tname (see luaL_newmetatable) and -returns the userdata address (see lua_touserdata). - - - - - -


luaL_checkversion

-[-0, +0, v] -

void luaL_checkversion (lua_State *L);
- -

-Checks whether the core running the call, -the core that created the Lua state, -and the code making the call are all using the same version of Lua. -Also checks whether the core running the call -and the core that created the Lua state -are using the same address space. - - - - - -


luaL_dofile

-[-0, +?, e] -

int luaL_dofile (lua_State *L, const char *filename);
- -

-Loads and runs the given file. -It is defined as the following macro: - -

-     (luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))
-

-It returns false if there are no errors -or true in case of errors. - - - - - -


luaL_dostring

-[-0, +?, –] -

int luaL_dostring (lua_State *L, const char *str);
- -

-Loads and runs the given string. -It is defined as the following macro: - -

-     (luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0))
-

-It returns false if there are no errors -or true in case of errors. - - - - - -


luaL_error

-[-0, +0, v] -

int luaL_error (lua_State *L, const char *fmt, ...);
- -

-Raises an error. -The error message format is given by fmt -plus any extra arguments, -following the same rules of lua_pushfstring. -It also adds at the beginning of the message the file name and -the line number where the error occurred, -if this information is available. - - -

-This function never returns, -but it is an idiom to use it in C functions -as return luaL_error(args). - - - - - -


luaL_execresult

-[-0, +3, m] -

int luaL_execresult (lua_State *L, int stat);
- -

-This function produces the return values for -process-related functions in the standard library -(os.execute and io.close). - - - - - -


luaL_fileresult

-[-0, +(1|3), m] -

int luaL_fileresult (lua_State *L, int stat, const char *fname);
- -

-This function produces the return values for -file-related functions in the standard library -(io.open, os.rename, file:seek, etc.). - - - - - -


luaL_getmetafield

-[-0, +(0|1), m] -

int luaL_getmetafield (lua_State *L, int obj, const char *e);
- -

-Pushes onto the stack the field e from the metatable -of the object at index obj and returns the type of the pushed value. -If the object does not have a metatable, -or if the metatable does not have this field, -pushes nothing and returns LUA_TNIL. - - - - - -


luaL_getmetatable

-[-0, +1, m] -

int luaL_getmetatable (lua_State *L, const char *tname);
- -

-Pushes onto the stack the metatable associated with name tname -in the registry (see luaL_newmetatable) -(nil if there is no metatable associated with that name). -Returns the type of the pushed value. - - - - - -


luaL_getsubtable

-[-0, +1, e] -

int luaL_getsubtable (lua_State *L, int idx, const char *fname);
- -

-Ensures that the value t[fname], -where t is the value at index idx, -is a table, -and pushes that table onto the stack. -Returns true if it finds a previous table there -and false if it creates a new table. - - - - - -


luaL_gsub

-[-0, +1, m] -

const char *luaL_gsub (lua_State *L,
-                       const char *s,
-                       const char *p,
-                       const char *r);
- -

-Creates a copy of string s by replacing -any occurrence of the string p -with the string r. -Pushes the resulting string on the stack and returns it. - - - - - -


luaL_len

-[-0, +0, e] -

lua_Integer luaL_len (lua_State *L, int index);
- -

-Returns the "length" of the value at the given index -as a number; -it is equivalent to the '#' operator in Lua (see §3.4.7). -Raises an error if the result of the operation is not an integer. -(This case only can happen through metamethods.) - - - - - -


luaL_loadbuffer

-[-0, +1, –] -

int luaL_loadbuffer (lua_State *L,
-                     const char *buff,
-                     size_t sz,
-                     const char *name);
- -

-Equivalent to luaL_loadbufferx with mode equal to NULL. - - - - - -


luaL_loadbufferx

-[-0, +1, –] -

int luaL_loadbufferx (lua_State *L,
-                      const char *buff,
-                      size_t sz,
-                      const char *name,
-                      const char *mode);
- -

-Loads a buffer as a Lua chunk. -This function uses lua_load to load the chunk in the -buffer pointed to by buff with size sz. - - -

-This function returns the same results as lua_load. -name is the chunk name, -used for debug information and error messages. -The string mode works as in function lua_load. - - - - - -


luaL_loadfile

-[-0, +1, m] -

int luaL_loadfile (lua_State *L, const char *filename);
- -

-Equivalent to luaL_loadfilex with mode equal to NULL. - - - - - -


luaL_loadfilex

-[-0, +1, m] -

int luaL_loadfilex (lua_State *L, const char *filename,
-                                            const char *mode);
- -

-Loads a file as a Lua chunk. -This function uses lua_load to load the chunk in the file -named filename. -If filename is NULL, -then it loads from the standard input. -The first line in the file is ignored if it starts with a #. - - -

-The string mode works as in function lua_load. - - -

-This function returns the same results as lua_load, -but it has an extra error code LUA_ERRFILE -for file-related errors -(e.g., it cannot open or read the file). - - -

-As lua_load, this function only loads the chunk; -it does not run it. - - - - - -


luaL_loadstring

-[-0, +1, –] -

int luaL_loadstring (lua_State *L, const char *s);
- -

-Loads a string as a Lua chunk. -This function uses lua_load to load the chunk in -the zero-terminated string s. - - -

-This function returns the same results as lua_load. - - -

-Also as lua_load, this function only loads the chunk; -it does not run it. - - - - - -


luaL_newlib

-[-0, +1, m] -

void luaL_newlib (lua_State *L, const luaL_Reg l[]);
- -

-Creates a new table and registers there -the functions in list l. - - -

-It is implemented as the following macro: - -

-     (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))
-

-The array l must be the actual array, -not a pointer to it. - - - - - -


luaL_newlibtable

-[-0, +1, m] -

void luaL_newlibtable (lua_State *L, const luaL_Reg l[]);
- -

-Creates a new table with a size optimized -to store all entries in the array l -(but does not actually store them). -It is intended to be used in conjunction with luaL_setfuncs -(see luaL_newlib). - - -

-It is implemented as a macro. -The array l must be the actual array, -not a pointer to it. - - - - - -


luaL_newmetatable

-[-0, +1, m] -

int luaL_newmetatable (lua_State *L, const char *tname);
- -

-If the registry already has the key tname, -returns 0. -Otherwise, -creates a new table to be used as a metatable for userdata, -adds to this new table the pair __name = tname, -adds to the registry the pair [tname] = new table, -and returns 1. -(The entry __name is used by some error-reporting functions.) - - -

-In both cases pushes onto the stack the final value associated -with tname in the registry. - - - - - -


luaL_newstate

-[-0, +0, –] -

lua_State *luaL_newstate (void);
- -

-Creates a new Lua state. -It calls lua_newstate with an -allocator based on the standard C realloc function -and then sets a panic function (see §4.6) that prints -an error message to the standard error output in case of fatal -errors. - - -

-Returns the new state, -or NULL if there is a memory allocation error. - - - - - -


luaL_openlibs

-[-0, +0, e] -

void luaL_openlibs (lua_State *L);
- -

-Opens all standard Lua libraries into the given state. - - - - - -


luaL_opt

-[-0, +0, e] -

T luaL_opt (L, func, arg, dflt);
- -

-This macro is defined as follows: - -

-     (lua_isnoneornil(L,(arg)) ? (dflt) : func(L,(arg)))
-

-In words, if the argument arg is nil or absent, -the macro results in the default dflt. -Otherwise, it results in the result of calling func -with the state L and the argument index arg as -arguments. -Note that it evaluates the expression dflt only if needed. - - - - - -


luaL_optinteger

-[-0, +0, v] -

lua_Integer luaL_optinteger (lua_State *L,
-                             int arg,
-                             lua_Integer d);
- -

-If the function argument arg is an integer -(or convertible to an integer), -returns this integer. -If this argument is absent or is nil, -returns d. -Otherwise, raises an error. - - - - - -


luaL_optlstring

-[-0, +0, v] -

const char *luaL_optlstring (lua_State *L,
-                             int arg,
-                             const char *d,
-                             size_t *l);
- -

-If the function argument arg is a string, -returns this string. -If this argument is absent or is nil, -returns d. -Otherwise, raises an error. - - -

-If l is not NULL, -fills the position *l with the result's length. -If the result is NULL -(only possible when returning d and d == NULL), -its length is considered zero. - - -

-This function uses lua_tolstring to get its result, -so all conversions and caveats of that function apply here. - - - - - -


luaL_optnumber

-[-0, +0, v] -

lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number d);
- -

-If the function argument arg is a number, -returns this number. -If this argument is absent or is nil, -returns d. -Otherwise, raises an error. - - - - - -


luaL_optstring

-[-0, +0, v] -

const char *luaL_optstring (lua_State *L,
-                            int arg,
-                            const char *d);
- -

-If the function argument arg is a string, -returns this string. -If this argument is absent or is nil, -returns d. -Otherwise, raises an error. - - - - - -


luaL_prepbuffer

-[-?, +?, m] -

char *luaL_prepbuffer (luaL_Buffer *B);
- -

-Equivalent to luaL_prepbuffsize -with the predefined size LUAL_BUFFERSIZE. - - - - - -


luaL_prepbuffsize

-[-?, +?, m] -

char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz);
- -

-Returns an address to a space of size sz -where you can copy a string to be added to buffer B -(see luaL_Buffer). -After copying the string into this space you must call -luaL_addsize with the size of the string to actually add -it to the buffer. - - - - - -


luaL_pushresult

-[-?, +1, m] -

void luaL_pushresult (luaL_Buffer *B);
- -

-Finishes the use of buffer B leaving the final string on -the top of the stack. - - - - - -


luaL_pushresultsize

-[-?, +1, m] -

void luaL_pushresultsize (luaL_Buffer *B, size_t sz);
- -

-Equivalent to the sequence luaL_addsize, luaL_pushresult. - - - - - -


luaL_ref

-[-1, +0, m] -

int luaL_ref (lua_State *L, int t);
- -

-Creates and returns a reference, -in the table at index t, -for the object at the top of the stack (and pops the object). - - -

-A reference is a unique integer key. -As long as you do not manually add integer keys into table t, -luaL_ref ensures the uniqueness of the key it returns. -You can retrieve an object referred by reference r -by calling lua_rawgeti(L, t, r). -Function luaL_unref frees a reference and its associated object. - - -

-If the object at the top of the stack is nil, -luaL_ref returns the constant LUA_REFNIL. -The constant LUA_NOREF is guaranteed to be different -from any reference returned by luaL_ref. - - - - - -


luaL_Reg

-
typedef struct luaL_Reg {
-  const char *name;
-  lua_CFunction func;
-} luaL_Reg;
- -

-Type for arrays of functions to be registered by -luaL_setfuncs. -name is the function name and func is a pointer to -the function. -Any array of luaL_Reg must end with a sentinel entry -in which both name and func are NULL. - - - - - -


luaL_requiref

-[-0, +1, e] -

void luaL_requiref (lua_State *L, const char *modname,
-                    lua_CFunction openf, int glb);
- -

-If modname is not already present in package.loaded, -calls function openf with string modname as an argument -and sets the call result in package.loaded[modname], -as if that function has been called through require. - - -

-If glb is true, -also stores the module into global modname. - - -

-Leaves a copy of the module on the stack. - - - - - -


luaL_setfuncs

-[-nup, +0, m] -

void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
- -

-Registers all functions in the array l -(see luaL_Reg) into the table on the top of the stack -(below optional upvalues, see next). - - -

-When nup is not zero, -all functions are created sharing nup upvalues, -which must be previously pushed on the stack -on top of the library table. -These values are popped from the stack after the registration. - - - - - -


luaL_setmetatable

-[-0, +0, –] -

void luaL_setmetatable (lua_State *L, const char *tname);
- -

-Sets the metatable of the object at the top of the stack -as the metatable associated with name tname -in the registry (see luaL_newmetatable). - - - - - -


luaL_Stream

-
typedef struct luaL_Stream {
-  FILE *f;
-  lua_CFunction closef;
-} luaL_Stream;
- -

-The standard representation for file handles, -which is used by the standard I/O library. - - -

-A file handle is implemented as a full userdata, -with a metatable called LUA_FILEHANDLE -(where LUA_FILEHANDLE is a macro with the actual metatable's name). -The metatable is created by the I/O library -(see luaL_newmetatable). - - -

-This userdata must start with the structure luaL_Stream; -it can contain other data after this initial structure. -Field f points to the corresponding C stream -(or it can be NULL to indicate an incompletely created handle). -Field closef points to a Lua function -that will be called to close the stream -when the handle is closed or collected; -this function receives the file handle as its sole argument and -must return either true (in case of success) -or nil plus an error message (in case of error). -Once Lua calls this field, -it changes the field value to NULL -to signal that the handle is closed. - - - - - -


luaL_testudata

-[-0, +0, m] -

void *luaL_testudata (lua_State *L, int arg, const char *tname);
- -

-This function works like luaL_checkudata, -except that, when the test fails, -it returns NULL instead of raising an error. - - - - - -


luaL_tolstring

-[-0, +1, e] -

const char *luaL_tolstring (lua_State *L, int idx, size_t *len);
- -

-Converts any Lua value at the given index to a C string -in a reasonable format. -The resulting string is pushed onto the stack and also -returned by the function. -If len is not NULL, -the function also sets *len with the string length. - - -

-If the value has a metatable with a __tostring field, -then luaL_tolstring calls the corresponding metamethod -with the value as argument, -and uses the result of the call as its result. - - - - - -


luaL_traceback

-[-0, +1, m] -

void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
-                     int level);
- -

-Creates and pushes a traceback of the stack L1. -If msg is not NULL it is appended -at the beginning of the traceback. -The level parameter tells at which level -to start the traceback. - - - - - -


luaL_typename

-[-0, +0, –] -

const char *luaL_typename (lua_State *L, int index);
- -

-Returns the name of the type of the value at the given index. - - - - - -


luaL_unref

-[-0, +0, –] -

void luaL_unref (lua_State *L, int t, int ref);
- -

-Releases reference ref from the table at index t -(see luaL_ref). -The entry is removed from the table, -so that the referred object can be collected. -The reference ref is also freed to be used again. - - -

-If ref is LUA_NOREF or LUA_REFNIL, -luaL_unref does nothing. - - - - - -


luaL_where

-[-0, +1, m] -

void luaL_where (lua_State *L, int lvl);
- -

-Pushes onto the stack a string identifying the current position -of the control at level lvl in the call stack. -Typically this string has the following format: - -

-     chunkname:currentline:
-

-Level 0 is the running function, -level 1 is the function that called the running function, -etc. - - -

-This function is used to build a prefix for error messages. - - - - - - - -

6 – Standard Libraries

- -

-The standard Lua libraries provide useful functions -that are implemented directly through the C API. -Some of these functions provide essential services to the language -(e.g., type and getmetatable); -others provide access to "outside" services (e.g., I/O); -and others could be implemented in Lua itself, -but are quite useful or have critical performance requirements that -deserve an implementation in C (e.g., table.sort). - - -

-All libraries are implemented through the official C API -and are provided as separate C modules. -Currently, Lua has the following standard libraries: - -

    - -
  • basic library (§6.1);
  • - -
  • coroutine library (§6.2);
  • - -
  • package library (§6.3);
  • - -
  • string manipulation (§6.4);
  • - -
  • basic UTF-8 support (§6.5);
  • - -
  • table manipulation (§6.6);
  • - -
  • mathematical functions (§6.7) (sin, log, etc.);
  • - -
  • input and output (§6.8);
  • - -
  • operating system facilities (§6.9);
  • - -
  • debug facilities (§6.10).
  • - -

-Except for the basic and the package libraries, -each library provides all its functions as fields of a global table -or as methods of its objects. - - -

-To have access to these libraries, -the C host program should call the luaL_openlibs function, -which opens all standard libraries. -Alternatively, -the host program can open them individually by using -luaL_requiref to call -luaopen_base (for the basic library), -luaopen_package (for the package library), -luaopen_coroutine (for the coroutine library), -luaopen_string (for the string library), -luaopen_utf8 (for the UTF8 library), -luaopen_table (for the table library), -luaopen_math (for the mathematical library), -luaopen_io (for the I/O library), -luaopen_os (for the operating system library), -and luaopen_debug (for the debug library). -These functions are declared in lualib.h. - - - -

6.1 – Basic Functions

- -

-The basic library provides core functions to Lua. -If you do not include this library in your application, -you should check carefully whether you need to provide -implementations for some of its facilities. - - -

-


assert (v [, message])

- - -

-Calls error if -the value of its argument v is false (i.e., nil or false); -otherwise, returns all its arguments. -In case of error, -message is the error object; -when absent, it defaults to "assertion failed!" - - - - -

-


collectgarbage ([opt [, arg]])

- - -

-This function is a generic interface to the garbage collector. -It performs different functions according to its first argument, opt: - -

    - -
  • "collect": -performs a full garbage-collection cycle. -This is the default option. -
  • - -
  • "stop": -stops automatic execution of the garbage collector. -The collector will run only when explicitly invoked, -until a call to restart it. -
  • - -
  • "restart": -restarts automatic execution of the garbage collector. -
  • - -
  • "count": -returns the total memory in use by Lua in Kbytes. -The value has a fractional part, -so that it multiplied by 1024 -gives the exact number of bytes in use by Lua -(except for overflows). -
  • - -
  • "step": -performs a garbage-collection step. -The step "size" is controlled by arg. -With a zero value, -the collector will perform one basic (indivisible) step. -For non-zero values, -the collector will perform as if that amount of memory -(in KBytes) had been allocated by Lua. -Returns true if the step finished a collection cycle. -
  • - -
  • "setpause": -sets arg as the new value for the pause of -the collector (see §2.5). -Returns the previous value for pause. -
  • - -
  • "setstepmul": -sets arg as the new value for the step multiplier of -the collector (see §2.5). -Returns the previous value for step. -
  • - -
  • "isrunning": -returns a boolean that tells whether the collector is running -(i.e., not stopped). -
  • - -
- - - -

-


dofile ([filename])

-Opens the named file and executes its contents as a Lua chunk. -When called without arguments, -dofile executes the contents of the standard input (stdin). -Returns all values returned by the chunk. -In case of errors, dofile propagates the error -to its caller (that is, dofile does not run in protected mode). - - - - -

-


error (message [, level])

-Terminates the last protected function called -and returns message as the error object. -Function error never returns. - - -

-Usually, error adds some information about the error position -at the beginning of the message, if the message is a string. -The level argument specifies how to get the error position. -With level 1 (the default), the error position is where the -error function was called. -Level 2 points the error to where the function -that called error was called; and so on. -Passing a level 0 avoids the addition of error position information -to the message. - - - - -

-


_G

-A global variable (not a function) that -holds the global environment (see §2.2). -Lua itself does not use this variable; -changing its value does not affect any environment, -nor vice versa. - - - - -

-


getmetatable (object)

- - -

-If object does not have a metatable, returns nil. -Otherwise, -if the object's metatable has a __metatable field, -returns the associated value. -Otherwise, returns the metatable of the given object. - - - - -

-


ipairs (t)

- - -

-Returns three values (an iterator function, the table t, and 0) -so that the construction - -

-     for i,v in ipairs(t) do body end
-

-will iterate over the key–value pairs -(1,t[1]), (2,t[2]), ..., -up to the first nil value. - - - - -

-


load (chunk [, chunkname [, mode [, env]]])

- - -

-Loads a chunk. - - -

-If chunk is a string, the chunk is this string. -If chunk is a function, -load calls it repeatedly to get the chunk pieces. -Each call to chunk must return a string that concatenates -with previous results. -A return of an empty string, nil, or no value signals the end of the chunk. - - -

-If there are no syntactic errors, -returns the compiled chunk as a function; -otherwise, returns nil plus the error message. - - -

-If the resulting function has upvalues, -the first upvalue is set to the value of env, -if that parameter is given, -or to the value of the global environment. -Other upvalues are initialized with nil. -(When you load a main chunk, -the resulting function will always have exactly one upvalue, -the _ENV variable (see §2.2). -However, -when you load a binary chunk created from a function (see string.dump), -the resulting function can have an arbitrary number of upvalues.) -All upvalues are fresh, that is, -they are not shared with any other function. - - -

-chunkname is used as the name of the chunk for error messages -and debug information (see §4.9). -When absent, -it defaults to chunk, if chunk is a string, -or to "=(load)" otherwise. - - -

-The string mode controls whether the chunk can be text or binary -(that is, a precompiled chunk). -It may be the string "b" (only binary chunks), -"t" (only text chunks), -or "bt" (both binary and text). -The default is "bt". - - -

-Lua does not check the consistency of binary chunks. -Maliciously crafted binary chunks can crash -the interpreter. - - - - -

-


loadfile ([filename [, mode [, env]]])

- - -

-Similar to load, -but gets the chunk from file filename -or from the standard input, -if no file name is given. - - - - -

-


next (table [, index])

- - -

-Allows a program to traverse all fields of a table. -Its first argument is a table and its second argument -is an index in this table. -next returns the next index of the table -and its associated value. -When called with nil as its second argument, -next returns an initial index -and its associated value. -When called with the last index, -or with nil in an empty table, -next returns nil. -If the second argument is absent, then it is interpreted as nil. -In particular, -you can use next(t) to check whether a table is empty. - - -

-The order in which the indices are enumerated is not specified, -even for numeric indices. -(To traverse a table in numerical order, -use a numerical for.) - - -

-The behavior of next is undefined if, -during the traversal, -you assign any value to a non-existent field in the table. -You may however modify existing fields. -In particular, you may clear existing fields. - - - - -

-


pairs (t)

- - -

-If t has a metamethod __pairs, -calls it with t as argument and returns the first three -results from the call. - - -

-Otherwise, -returns three values: the next function, the table t, and nil, -so that the construction - -

-     for k,v in pairs(t) do body end
-

-will iterate over all key–value pairs of table t. - - -

-See function next for the caveats of modifying -the table during its traversal. - - - - -

-


pcall (f [, arg1, ···])

- - -

-Calls function f with -the given arguments in protected mode. -This means that any error inside f is not propagated; -instead, pcall catches the error -and returns a status code. -Its first result is the status code (a boolean), -which is true if the call succeeds without errors. -In such case, pcall also returns all results from the call, -after this first result. -In case of any error, pcall returns false plus the error message. - - - - -

-


print (···)

-Receives any number of arguments -and prints their values to stdout, -using the tostring function to convert each argument to a string. -print is not intended for formatted output, -but only as a quick way to show a value, -for instance for debugging. -For complete control over the output, -use string.format and io.write. - - - - -

-


rawequal (v1, v2)

-Checks whether v1 is equal to v2, -without invoking the __eq metamethod. -Returns a boolean. - - - - -

-


rawget (table, index)

-Gets the real value of table[index], -without invoking the __index metamethod. -table must be a table; -index may be any value. - - - - -

-


rawlen (v)

-Returns the length of the object v, -which must be a table or a string, -without invoking the __len metamethod. -Returns an integer. - - - - -

-


rawset (table, index, value)

-Sets the real value of table[index] to value, -without invoking the __newindex metamethod. -table must be a table, -index any value different from nil and NaN, -and value any Lua value. - - -

-This function returns table. - - - - -

-


select (index, ···)

- - -

-If index is a number, -returns all arguments after argument number index; -a negative number indexes from the end (-1 is the last argument). -Otherwise, index must be the string "#", -and select returns the total number of extra arguments it received. - - - - -

-


setmetatable (table, metatable)

- - -

-Sets the metatable for the given table. -(To change the metatable of other types from Lua code, -you must use the debug library (§6.10).) -If metatable is nil, -removes the metatable of the given table. -If the original metatable has a __metatable field, -raises an error. - - -

-This function returns table. - - - - -

-


tonumber (e [, base])

- - -

-When called with no base, -tonumber tries to convert its argument to a number. -If the argument is already a number or -a string convertible to a number, -then tonumber returns this number; -otherwise, it returns nil. - - -

-The conversion of strings can result in integers or floats, -according to the lexical conventions of Lua (see §3.1). -(The string may have leading and trailing spaces and a sign.) - - -

-When called with base, -then e must be a string to be interpreted as -an integer numeral in that base. -The base may be any integer between 2 and 36, inclusive. -In bases above 10, the letter 'A' (in either upper or lower case) -represents 10, 'B' represents 11, and so forth, -with 'Z' representing 35. -If the string e is not a valid numeral in the given base, -the function returns nil. - - - - -

-


tostring (v)

-Receives a value of any type and -converts it to a string in a human-readable format. -(For complete control of how numbers are converted, -use string.format.) - - -

-If the metatable of v has a __tostring field, -then tostring calls the corresponding value -with v as argument, -and uses the result of the call as its result. - - - - -

-


type (v)

-Returns the type of its only argument, coded as a string. -The possible results of this function are -"nil" (a string, not the value nil), -"number", -"string", -"boolean", -"table", -"function", -"thread", -and "userdata". - - - - -

-


_VERSION

- - -

-A global variable (not a function) that -holds a string containing the running Lua version. -The current value of this variable is "Lua 5.3". - - - - -

-


xpcall (f, msgh [, arg1, ···])

- - -

-This function is similar to pcall, -except that it sets a new message handler msgh. - - - - - - - -

6.2 – Coroutine Manipulation

- -

-This library comprises the operations to manipulate coroutines, -which come inside the table coroutine. -See §2.6 for a general description of coroutines. - - -

-


coroutine.create (f)

- - -

-Creates a new coroutine, with body f. -f must be a function. -Returns this new coroutine, -an object with type "thread". - - - - -

-


coroutine.isyieldable ()

- - -

-Returns true when the running coroutine can yield. - - -

-A running coroutine is yieldable if it is not the main thread and -it is not inside a non-yieldable C function. - - - - -

-


coroutine.resume (co [, val1, ···])

- - -

-Starts or continues the execution of coroutine co. -The first time you resume a coroutine, -it starts running its body. -The values val1, ... are passed -as the arguments to the body function. -If the coroutine has yielded, -resume restarts it; -the values val1, ... are passed -as the results from the yield. - - -

-If the coroutine runs without any errors, -resume returns true plus any values passed to yield -(when the coroutine yields) or any values returned by the body function -(when the coroutine terminates). -If there is any error, -resume returns false plus the error message. - - - - -

-


coroutine.running ()

- - -

-Returns the running coroutine plus a boolean, -true when the running coroutine is the main one. - - - - -

-


coroutine.status (co)

- - -

-Returns the status of coroutine co, as a string: -"running", -if the coroutine is running (that is, it called status); -"suspended", if the coroutine is suspended in a call to yield, -or if it has not started running yet; -"normal" if the coroutine is active but not running -(that is, it has resumed another coroutine); -and "dead" if the coroutine has finished its body function, -or if it has stopped with an error. - - - - -

-


coroutine.wrap (f)

- - -

-Creates a new coroutine, with body f. -f must be a function. -Returns a function that resumes the coroutine each time it is called. -Any arguments passed to the function behave as the -extra arguments to resume. -Returns the same values returned by resume, -except the first boolean. -In case of error, propagates the error. - - - - -

-


coroutine.yield (···)

- - -

-Suspends the execution of the calling coroutine. -Any arguments to yield are passed as extra results to resume. - - - - - - - -

6.3 – Modules

- -

-The package library provides basic -facilities for loading modules in Lua. -It exports one function directly in the global environment: -require. -Everything else is exported in a table package. - - -

-


require (modname)

- - -

-Loads the given module. -The function starts by looking into the package.loaded table -to determine whether modname is already loaded. -If it is, then require returns the value stored -at package.loaded[modname]. -Otherwise, it tries to find a loader for the module. - - -

-To find a loader, -require is guided by the package.searchers sequence. -By changing this sequence, -we can change how require looks for a module. -The following explanation is based on the default configuration -for package.searchers. - - -

-First require queries package.preload[modname]. -If it has a value, -this value (which must be a function) is the loader. -Otherwise require searches for a Lua loader using the -path stored in package.path. -If that also fails, it searches for a C loader using the -path stored in package.cpath. -If that also fails, -it tries an all-in-one loader (see package.searchers). - - -

-Once a loader is found, -require calls the loader with two arguments: -modname and an extra value dependent on how it got the loader. -(If the loader came from a file, -this extra value is the file name.) -If the loader returns any non-nil value, -require assigns the returned value to package.loaded[modname]. -If the loader does not return a non-nil value and -has not assigned any value to package.loaded[modname], -then require assigns true to this entry. -In any case, require returns the -final value of package.loaded[modname]. - - -

-If there is any error loading or running the module, -or if it cannot find any loader for the module, -then require raises an error. - - - - -

-


package.config

- - -

-A string describing some compile-time configurations for packages. -This string is a sequence of lines: - -

    - -
  • The first line is the directory separator string. -Default is '\' for Windows and '/' for all other systems.
  • - -
  • The second line is the character that separates templates in a path. -Default is ';'.
  • - -
  • The third line is the string that marks the -substitution points in a template. -Default is '?'.
  • - -
  • The fourth line is a string that, in a path in Windows, -is replaced by the executable's directory. -Default is '!'.
  • - -
  • The fifth line is a mark to ignore all text after it -when building the luaopen_ function name. -Default is '-'.
  • - -
- - - -

-


package.cpath

- - -

-The path used by require to search for a C loader. - - -

-Lua initializes the C path package.cpath in the same way -it initializes the Lua path package.path, -using the environment variable LUA_CPATH_5_3, -or the environment variable LUA_CPATH, -or a default path defined in luaconf.h. - - - - -

-


package.loaded

- - -

-A table used by require to control which -modules are already loaded. -When you require a module modname and -package.loaded[modname] is not false, -require simply returns the value stored there. - - -

-This variable is only a reference to the real table; -assignments to this variable do not change the -table used by require. - - - - -

-


package.loadlib (libname, funcname)

- - -

-Dynamically links the host program with the C library libname. - - -

-If funcname is "*", -then it only links with the library, -making the symbols exported by the library -available to other dynamically linked libraries. -Otherwise, -it looks for a function funcname inside the library -and returns this function as a C function. -So, funcname must follow the lua_CFunction prototype -(see lua_CFunction). - - -

-This is a low-level function. -It completely bypasses the package and module system. -Unlike require, -it does not perform any path searching and -does not automatically adds extensions. -libname must be the complete file name of the C library, -including if necessary a path and an extension. -funcname must be the exact name exported by the C library -(which may depend on the C compiler and linker used). - - -

-This function is not supported by Standard C. -As such, it is only available on some platforms -(Windows, Linux, Mac OS X, Solaris, BSD, -plus other Unix systems that support the dlfcn standard). - - - - -

-


package.path

- - -

-The path used by require to search for a Lua loader. - - -

-At start-up, Lua initializes this variable with -the value of the environment variable LUA_PATH_5_3 or -the environment variable LUA_PATH or -with a default path defined in luaconf.h, -if those environment variables are not defined. -Any ";;" in the value of the environment variable -is replaced by the default path. - - - - -

-


package.preload

- - -

-A table to store loaders for specific modules -(see require). - - -

-This variable is only a reference to the real table; -assignments to this variable do not change the -table used by require. - - - - -

-


package.searchers

- - -

-A table used by require to control how to load modules. - - -

-Each entry in this table is a searcher function. -When looking for a module, -require calls each of these searchers in ascending order, -with the module name (the argument given to require) as its -sole parameter. -The function can return another function (the module loader) -plus an extra value that will be passed to that loader, -or a string explaining why it did not find that module -(or nil if it has nothing to say). - - -

-Lua initializes this table with four searcher functions. - - -

-The first searcher simply looks for a loader in the -package.preload table. - - -

-The second searcher looks for a loader as a Lua library, -using the path stored at package.path. -The search is done as described in function package.searchpath. - - -

-The third searcher looks for a loader as a C library, -using the path given by the variable package.cpath. -Again, -the search is done as described in function package.searchpath. -For instance, -if the C path is the string - -

-     "./?.so;./?.dll;/usr/local/?/init.so"
-

-the searcher for module foo -will try to open the files ./foo.so, ./foo.dll, -and /usr/local/foo/init.so, in that order. -Once it finds a C library, -this searcher first uses a dynamic link facility to link the -application with the library. -Then it tries to find a C function inside the library to -be used as the loader. -The name of this C function is the string "luaopen_" -concatenated with a copy of the module name where each dot -is replaced by an underscore. -Moreover, if the module name has a hyphen, -its suffix after (and including) the first hyphen is removed. -For instance, if the module name is a.b.c-v2.1, -the function name will be luaopen_a_b_c. - - -

-The fourth searcher tries an all-in-one loader. -It searches the C path for a library for -the root name of the given module. -For instance, when requiring a.b.c, -it will search for a C library for a. -If found, it looks into it for an open function for -the submodule; -in our example, that would be luaopen_a_b_c. -With this facility, a package can pack several C submodules -into one single library, -with each submodule keeping its original open function. - - -

-All searchers except the first one (preload) return as the extra value -the file name where the module was found, -as returned by package.searchpath. -The first searcher returns no extra value. - - - - -

-


package.searchpath (name, path [, sep [, rep]])

- - -

-Searches for the given name in the given path. - - -

-A path is a string containing a sequence of -templates separated by semicolons. -For each template, -the function replaces each interrogation mark (if any) -in the template with a copy of name -wherein all occurrences of sep -(a dot, by default) -were replaced by rep -(the system's directory separator, by default), -and then tries to open the resulting file name. - - -

-For instance, if the path is the string - -

-     "./?.lua;./?.lc;/usr/local/?/init.lua"
-

-the search for the name foo.a -will try to open the files -./foo/a.lua, ./foo/a.lc, and -/usr/local/foo/a/init.lua, in that order. - - -

-Returns the resulting name of the first file that it can -open in read mode (after closing the file), -or nil plus an error message if none succeeds. -(This error message lists all file names it tried to open.) - - - - - - - -

6.4 – String Manipulation

- -

-This library provides generic functions for string manipulation, -such as finding and extracting substrings, and pattern matching. -When indexing a string in Lua, the first character is at position 1 -(not at 0, as in C). -Indices are allowed to be negative and are interpreted as indexing backwards, -from the end of the string. -Thus, the last character is at position -1, and so on. - - -

-The string library provides all its functions inside the table -string. -It also sets a metatable for strings -where the __index field points to the string table. -Therefore, you can use the string functions in object-oriented style. -For instance, string.byte(s,i) -can be written as s:byte(i). - - -

-The string library assumes one-byte character encodings. - - -

-


string.byte (s [, i [, j]])

-Returns the internal numeric codes of the characters s[i], -s[i+1], ..., s[j]. -The default value for i is 1; -the default value for j is i. -These indices are corrected -following the same rules of function string.sub. - - -

-Numeric codes are not necessarily portable across platforms. - - - - -

-


string.char (···)

-Receives zero or more integers. -Returns a string with length equal to the number of arguments, -in which each character has the internal numeric code equal -to its corresponding argument. - - -

-Numeric codes are not necessarily portable across platforms. - - - - -

-


string.dump (function [, strip])

- - -

-Returns a string containing a binary representation -(a binary chunk) -of the given function, -so that a later load on this string returns -a copy of the function (but with new upvalues). -If strip is a true value, -the binary representation may not include all debug information -about the function, -to save space. - - -

-Functions with upvalues have only their number of upvalues saved. -When (re)loaded, -those upvalues receive fresh instances containing nil. -(You can use the debug library to serialize -and reload the upvalues of a function -in a way adequate to your needs.) - - - - -

-


string.find (s, pattern [, init [, plain]])

- - -

-Looks for the first match of -pattern (see §6.4.1) in the string s. -If it finds a match, then find returns the indices of s -where this occurrence starts and ends; -otherwise, it returns nil. -A third, optional numeric argument init specifies -where to start the search; -its default value is 1 and can be negative. -A value of true as a fourth, optional argument plain -turns off the pattern matching facilities, -so the function does a plain "find substring" operation, -with no characters in pattern being considered magic. -Note that if plain is given, then init must be given as well. - - -

-If the pattern has captures, -then in a successful match -the captured values are also returned, -after the two indices. - - - - -

-


string.format (formatstring, ···)

- - -

-Returns a formatted version of its variable number of arguments -following the description given in its first argument (which must be a string). -The format string follows the same rules as the ISO C function sprintf. -The only differences are that the options/modifiers -*, h, L, l, n, -and p are not supported -and that there is an extra option, q. - - -

-The q option formats a string between double quotes, -using escape sequences when necessary to ensure that -it can safely be read back by the Lua interpreter. -For instance, the call - -

-     string.format('%q', 'a string with "quotes" and \n new line')
-

-may produce the string: - -

-     "a string with \"quotes\" and \
-      new line"
-
- -

-Options -A, a, E, e, f, -G, and g all expect a number as argument. -Options c, d, -i, o, u, X, and x -expect an integer. -When Lua is compiled with a C89 compiler, -options A and a (hexadecimal floats) -do not support any modifier (flags, width, length). - - -

-Option s expects a string; -if its argument is not a string, -it is converted to one following the same rules of tostring. -If the option has any modifier (flags, width, length), -the string argument should not contain embedded zeros. - - - - -

-


string.gmatch (s, pattern)

-Returns an iterator function that, -each time it is called, -returns the next captures from pattern (see §6.4.1) -over the string s. -If pattern specifies no captures, -then the whole match is produced in each call. - - -

-As an example, the following loop -will iterate over all the words from string s, -printing one per line: - -

-     s = "hello world from Lua"
-     for w in string.gmatch(s, "%a+") do
-       print(w)
-     end
-

-The next example collects all pairs key=value from the -given string into a table: - -

-     t = {}
-     s = "from=world, to=Lua"
-     for k, v in string.gmatch(s, "(%w+)=(%w+)") do
-       t[k] = v
-     end
-
- -

-For this function, a caret '^' at the start of a pattern does not -work as an anchor, as this would prevent the iteration. - - - - -

-


string.gsub (s, pattern, repl [, n])

-Returns a copy of s -in which all (or the first n, if given) -occurrences of the pattern (see §6.4.1) have been -replaced by a replacement string specified by repl, -which can be a string, a table, or a function. -gsub also returns, as its second value, -the total number of matches that occurred. -The name gsub comes from Global SUBstitution. - - -

-If repl is a string, then its value is used for replacement. -The character % works as an escape character: -any sequence in repl of the form %d, -with d between 1 and 9, -stands for the value of the d-th captured substring. -The sequence %0 stands for the whole match. -The sequence %% stands for a single %. - - -

-If repl is a table, then the table is queried for every match, -using the first capture as the key. - - -

-If repl is a function, then this function is called every time a -match occurs, with all captured substrings passed as arguments, -in order. - - -

-In any case, -if the pattern specifies no captures, -then it behaves as if the whole pattern was inside a capture. - - -

-If the value returned by the table query or by the function call -is a string or a number, -then it is used as the replacement string; -otherwise, if it is false or nil, -then there is no replacement -(that is, the original match is kept in the string). - - -

-Here are some examples: - -

-     x = string.gsub("hello world", "(%w+)", "%1 %1")
-     --> x="hello hello world world"
-     
-     x = string.gsub("hello world", "%w+", "%0 %0", 1)
-     --> x="hello hello world"
-     
-     x = string.gsub("hello world from Lua", "(%w+)%s*(%w+)", "%2 %1")
-     --> x="world hello Lua from"
-     
-     x = string.gsub("home = $HOME, user = $USER", "%$(%w+)", os.getenv)
-     --> x="home = /home/roberto, user = roberto"
-     
-     x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)
-           return load(s)()
-         end)
-     --> x="4+5 = 9"
-     
-     local t = {name="lua", version="5.3"}
-     x = string.gsub("$name-$version.tar.gz", "%$(%w+)", t)
-     --> x="lua-5.3.tar.gz"
-
- - - -

-


string.len (s)

-Receives a string and returns its length. -The empty string "" has length 0. -Embedded zeros are counted, -so "a\000bc\000" has length 5. - - - - -

-


string.lower (s)

-Receives a string and returns a copy of this string with all -uppercase letters changed to lowercase. -All other characters are left unchanged. -The definition of what an uppercase letter is depends on the current locale. - - - - -

-


string.match (s, pattern [, init])

-Looks for the first match of -pattern (see §6.4.1) in the string s. -If it finds one, then match returns -the captures from the pattern; -otherwise it returns nil. -If pattern specifies no captures, -then the whole match is returned. -A third, optional numeric argument init specifies -where to start the search; -its default value is 1 and can be negative. - - - - -

-


string.pack (fmt, v1, v2, ···)

- - -

-Returns a binary string containing the values v1, v2, etc. -packed (that is, serialized in binary form) -according to the format string fmt (see §6.4.2). - - - - -

-


string.packsize (fmt)

- - -

-Returns the size of a string resulting from string.pack -with the given format. -The format string cannot have the variable-length options -'s' or 'z' (see §6.4.2). - - - - -

-


string.rep (s, n [, sep])

-Returns a string that is the concatenation of n copies of -the string s separated by the string sep. -The default value for sep is the empty string -(that is, no separator). -Returns the empty string if n is not positive. - - -

-(Note that it is very easy to exhaust the memory of your machine -with a single call to this function.) - - - - -

-


string.reverse (s)

-Returns a string that is the string s reversed. - - - - -

-


string.sub (s, i [, j])

-Returns the substring of s that -starts at i and continues until j; -i and j can be negative. -If j is absent, then it is assumed to be equal to -1 -(which is the same as the string length). -In particular, -the call string.sub(s,1,j) returns a prefix of s -with length j, -and string.sub(s, -i) (for a positive i) -returns a suffix of s -with length i. - - -

-If, after the translation of negative indices, -i is less than 1, -it is corrected to 1. -If j is greater than the string length, -it is corrected to that length. -If, after these corrections, -i is greater than j, -the function returns the empty string. - - - - -

-


string.unpack (fmt, s [, pos])

- - -

-Returns the values packed in string s (see string.pack) -according to the format string fmt (see §6.4.2). -An optional pos marks where -to start reading in s (default is 1). -After the read values, -this function also returns the index of the first unread byte in s. - - - - -

-


string.upper (s)

-Receives a string and returns a copy of this string with all -lowercase letters changed to uppercase. -All other characters are left unchanged. -The definition of what a lowercase letter is depends on the current locale. - - - - - -

6.4.1 – Patterns

- -

-Patterns in Lua are described by regular strings, -which are interpreted as patterns by the pattern-matching functions -string.find, -string.gmatch, -string.gsub, -and string.match. -This section describes the syntax and the meaning -(that is, what they match) of these strings. - - - -

Character Class:

-A character class is used to represent a set of characters. -The following combinations are allowed in describing a character class: - -

    - -
  • x: -(where x is not one of the magic characters -^$()%.[]*+-?) -represents the character x itself. -
  • - -
  • .: (a dot) represents all characters.
  • - -
  • %a: represents all letters.
  • - -
  • %c: represents all control characters.
  • - -
  • %d: represents all digits.
  • - -
  • %g: represents all printable characters except space.
  • - -
  • %l: represents all lowercase letters.
  • - -
  • %p: represents all punctuation characters.
  • - -
  • %s: represents all space characters.
  • - -
  • %u: represents all uppercase letters.
  • - -
  • %w: represents all alphanumeric characters.
  • - -
  • %x: represents all hexadecimal digits.
  • - -
  • %x: (where x is any non-alphanumeric character) -represents the character x. -This is the standard way to escape the magic characters. -Any non-alphanumeric character -(including all punctuation characters, even the non-magical) -can be preceded by a '%' -when used to represent itself in a pattern. -
  • - -
  • [set]: -represents the class which is the union of all -characters in set. -A range of characters can be specified by -separating the end characters of the range, -in ascending order, with a '-'. -All classes %x described above can also be used as -components in set. -All other characters in set represent themselves. -For example, [%w_] (or [_%w]) -represents all alphanumeric characters plus the underscore, -[0-7] represents the octal digits, -and [0-7%l%-] represents the octal digits plus -the lowercase letters plus the '-' character. - - -

    -You can put a closing square bracket in a set -by positioning it as the first character in the set. -You can put a hyphen in a set -by positioning it as the first or the last character in the set. -(You can also use an escape for both cases.) - - -

    -The interaction between ranges and classes is not defined. -Therefore, patterns like [%a-z] or [a-%%] -have no meaning. -

  • - -
  • [^set]: -represents the complement of set, -where set is interpreted as above. -
  • - -

-For all classes represented by single letters (%a, %c, etc.), -the corresponding uppercase letter represents the complement of the class. -For instance, %S represents all non-space characters. - - -

-The definitions of letter, space, and other character groups -depend on the current locale. -In particular, the class [a-z] may not be equivalent to %l. - - - - - -

Pattern Item:

-A pattern item can be - -

    - -
  • -a single character class, -which matches any single character in the class; -
  • - -
  • -a single character class followed by '*', -which matches zero or more repetitions of characters in the class. -These repetition items will always match the longest possible sequence; -
  • - -
  • -a single character class followed by '+', -which matches one or more repetitions of characters in the class. -These repetition items will always match the longest possible sequence; -
  • - -
  • -a single character class followed by '-', -which also matches zero or more repetitions of characters in the class. -Unlike '*', -these repetition items will always match the shortest possible sequence; -
  • - -
  • -a single character class followed by '?', -which matches zero or one occurrence of a character in the class. -It always matches one occurrence if possible; -
  • - -
  • -%n, for n between 1 and 9; -such item matches a substring equal to the n-th captured string -(see below); -
  • - -
  • -%bxy, where x and y are two distinct characters; -such item matches strings that start with x, end with y, -and where the x and y are balanced. -This means that, if one reads the string from left to right, -counting +1 for an x and -1 for a y, -the ending y is the first y where the count reaches 0. -For instance, the item %b() matches expressions with -balanced parentheses. -
  • - -
  • -%f[set], a frontier pattern; -such item matches an empty string at any position such that -the next character belongs to set -and the previous character does not belong to set. -The set set is interpreted as previously described. -The beginning and the end of the subject are handled as if -they were the character '\0'. -
  • - -
- - - - -

Pattern:

-A pattern is a sequence of pattern items. -A caret '^' at the beginning of a pattern anchors the match at the -beginning of the subject string. -A '$' at the end of a pattern anchors the match at the -end of the subject string. -At other positions, -'^' and '$' have no special meaning and represent themselves. - - - - - -

Captures:

-A pattern can contain sub-patterns enclosed in parentheses; -they describe captures. -When a match succeeds, the substrings of the subject string -that match captures are stored (captured) for future use. -Captures are numbered according to their left parentheses. -For instance, in the pattern "(a*(.)%w(%s*))", -the part of the string matching "a*(.)%w(%s*)" is -stored as the first capture (and therefore has number 1); -the character matching "." is captured with number 2, -and the part matching "%s*" has number 3. - - -

-As a special case, the empty capture () captures -the current string position (a number). -For instance, if we apply the pattern "()aa()" on the -string "flaaap", there will be two captures: 3 and 5. - - - - - - - -

6.4.2 – Format Strings for Pack and Unpack

- -

-The first argument to string.pack, -string.packsize, and string.unpack -is a format string, -which describes the layout of the structure being created or read. - - -

-A format string is a sequence of conversion options. -The conversion options are as follows: - -

    -
  • <: sets little endian
  • -
  • >: sets big endian
  • -
  • =: sets native endian
  • -
  • ![n]: sets maximum alignment to n -(default is native alignment)
  • -
  • b: a signed byte (char)
  • -
  • B: an unsigned byte (char)
  • -
  • h: a signed short (native size)
  • -
  • H: an unsigned short (native size)
  • -
  • l: a signed long (native size)
  • -
  • L: an unsigned long (native size)
  • -
  • j: a lua_Integer
  • -
  • J: a lua_Unsigned
  • -
  • T: a size_t (native size)
  • -
  • i[n]: a signed int with n bytes -(default is native size)
  • -
  • I[n]: an unsigned int with n bytes -(default is native size)
  • -
  • f: a float (native size)
  • -
  • d: a double (native size)
  • -
  • n: a lua_Number
  • -
  • cn: a fixed-sized string with n bytes
  • -
  • z: a zero-terminated string
  • -
  • s[n]: a string preceded by its length -coded as an unsigned integer with n bytes -(default is a size_t)
  • -
  • x: one byte of padding
  • -
  • Xop: an empty item that aligns -according to option op -(which is otherwise ignored)
  • -
  • ' ': (empty space) ignored
  • -

-(A "[n]" means an optional integral numeral.) -Except for padding, spaces, and configurations -(options "xX <=>!"), -each option corresponds to an argument (in string.pack) -or a result (in string.unpack). - - -

-For options "!n", "sn", "in", and "In", -n can be any integer between 1 and 16. -All integral options check overflows; -string.pack checks whether the given value fits in the given size; -string.unpack checks whether the read value fits in a Lua integer. - - -

-Any format string starts as if prefixed by "!1=", -that is, -with maximum alignment of 1 (no alignment) -and native endianness. - - -

-Alignment works as follows: -For each option, -the format gets extra padding until the data starts -at an offset that is a multiple of the minimum between the -option size and the maximum alignment; -this minimum must be a power of 2. -Options "c" and "z" are not aligned; -option "s" follows the alignment of its starting integer. - - -

-All padding is filled with zeros by string.pack -(and ignored by string.unpack). - - - - - - - -

6.5 – UTF-8 Support

- -

-This library provides basic support for UTF-8 encoding. -It provides all its functions inside the table utf8. -This library does not provide any support for Unicode other -than the handling of the encoding. -Any operation that needs the meaning of a character, -such as character classification, is outside its scope. - - -

-Unless stated otherwise, -all functions that expect a byte position as a parameter -assume that the given position is either the start of a byte sequence -or one plus the length of the subject string. -As in the string library, -negative indices count from the end of the string. - - -

-


utf8.char (···)

-Receives zero or more integers, -converts each one to its corresponding UTF-8 byte sequence -and returns a string with the concatenation of all these sequences. - - - - -

-


utf8.charpattern

-The pattern (a string, not a function) "[\0-\x7F\xC2-\xF4][\x80-\xBF]*" -(see §6.4.1), -which matches exactly one UTF-8 byte sequence, -assuming that the subject is a valid UTF-8 string. - - - - -

-


utf8.codes (s)

- - -

-Returns values so that the construction - -

-     for p, c in utf8.codes(s) do body end
-

-will iterate over all characters in string s, -with p being the position (in bytes) and c the code point -of each character. -It raises an error if it meets any invalid byte sequence. - - - - -

-


utf8.codepoint (s [, i [, j]])

-Returns the codepoints (as integers) from all characters in s -that start between byte position i and j (both included). -The default for i is 1 and for j is i. -It raises an error if it meets any invalid byte sequence. - - - - -

-


utf8.len (s [, i [, j]])

-Returns the number of UTF-8 characters in string s -that start between positions i and j (both inclusive). -The default for i is 1 and for j is -1. -If it finds any invalid byte sequence, -returns a false value plus the position of the first invalid byte. - - - - -

-


utf8.offset (s, n [, i])

-Returns the position (in bytes) where the encoding of the -n-th character of s -(counting from position i) starts. -A negative n gets characters before position i. -The default for i is 1 when n is non-negative -and #s + 1 otherwise, -so that utf8.offset(s, -n) gets the offset of the -n-th character from the end of the string. -If the specified character is neither in the subject -nor right after its end, -the function returns nil. - - -

-As a special case, -when n is 0 the function returns the start of the encoding -of the character that contains the i-th byte of s. - - -

-This function assumes that s is a valid UTF-8 string. - - - - - - - -

6.6 – Table Manipulation

- -

-This library provides generic functions for table manipulation. -It provides all its functions inside the table table. - - -

-Remember that, whenever an operation needs the length of a table, -all caveats about the length operator apply (see §3.4.7). -All functions ignore non-numeric keys -in the tables given as arguments. - - -

-


table.concat (list [, sep [, i [, j]]])

- - -

-Given a list where all elements are strings or numbers, -returns the string list[i]..sep..list[i+1] ··· sep..list[j]. -The default value for sep is the empty string, -the default for i is 1, -and the default for j is #list. -If i is greater than j, returns the empty string. - - - - -

-


table.insert (list, [pos,] value)

- - -

-Inserts element value at position pos in list, -shifting up the elements -list[pos], list[pos+1], ···, list[#list]. -The default value for pos is #list+1, -so that a call table.insert(t,x) inserts x at the end -of list t. - - - - -

-


table.move (a1, f, e, t [,a2])

- - -

-Moves elements from table a1 to table a2, -performing the equivalent to the following -multiple assignment: -a2[t],··· = a1[f],···,a1[e]. -The default for a2 is a1. -The destination range can overlap with the source range. -The number of elements to be moved must fit in a Lua integer. - - -

-Returns the destination table a2. - - - - -

-


table.pack (···)

- - -

-Returns a new table with all arguments stored into keys 1, 2, etc. -and with a field "n" with the total number of arguments. -Note that the resulting table may not be a sequence. - - - - -

-


table.remove (list [, pos])

- - -

-Removes from list the element at position pos, -returning the value of the removed element. -When pos is an integer between 1 and #list, -it shifts down the elements -list[pos+1], list[pos+2], ···, list[#list] -and erases element list[#list]; -The index pos can also be 0 when #list is 0, -or #list + 1; -in those cases, the function erases the element list[pos]. - - -

-The default value for pos is #list, -so that a call table.remove(l) removes the last element -of list l. - - - - -

-


table.sort (list [, comp])

- - -

-Sorts list elements in a given order, in-place, -from list[1] to list[#list]. -If comp is given, -then it must be a function that receives two list elements -and returns true when the first element must come -before the second in the final order -(so that, after the sort, -i < j implies not comp(list[j],list[i])). -If comp is not given, -then the standard Lua operator < is used instead. - - -

-Note that the comp function must define -a strict partial order over the elements in the list; -that is, it must be asymmetric and transitive. -Otherwise, no valid sort may be possible. - - -

-The sort algorithm is not stable: -elements considered equal by the given order -may have their relative positions changed by the sort. - - - - -

-


table.unpack (list [, i [, j]])

- - -

-Returns the elements from the given list. -This function is equivalent to - -

-     return list[i], list[i+1], ···, list[j]
-

-By default, i is 1 and j is #list. - - - - - - - -

6.7 – Mathematical Functions

- -

-This library provides basic mathematical functions. -It provides all its functions and constants inside the table math. -Functions with the annotation "integer/float" give -integer results for integer arguments -and float results for float (or mixed) arguments. -Rounding functions -(math.ceil, math.floor, and math.modf) -return an integer when the result fits in the range of an integer, -or a float otherwise. - - -

-


math.abs (x)

- - -

-Returns the absolute value of x. (integer/float) - - - - -

-


math.acos (x)

- - -

-Returns the arc cosine of x (in radians). - - - - -

-


math.asin (x)

- - -

-Returns the arc sine of x (in radians). - - - - -

-


math.atan (y [, x])

- - -

- -Returns the arc tangent of y/x (in radians), -but uses the signs of both arguments to find the -quadrant of the result. -(It also handles correctly the case of x being zero.) - - -

-The default value for x is 1, -so that the call math.atan(y) -returns the arc tangent of y. - - - - -

-


math.ceil (x)

- - -

-Returns the smallest integral value larger than or equal to x. - - - - -

-


math.cos (x)

- - -

-Returns the cosine of x (assumed to be in radians). - - - - -

-


math.deg (x)

- - -

-Converts the angle x from radians to degrees. - - - - -

-


math.exp (x)

- - -

-Returns the value ex -(where e is the base of natural logarithms). - - - - -

-


math.floor (x)

- - -

-Returns the largest integral value smaller than or equal to x. - - - - -

-


math.fmod (x, y)

- - -

-Returns the remainder of the division of x by y -that rounds the quotient towards zero. (integer/float) - - - - -

-


math.huge

- - -

-The float value HUGE_VAL, -a value larger than any other numeric value. - - - - -

-


math.log (x [, base])

- - -

-Returns the logarithm of x in the given base. -The default for base is e -(so that the function returns the natural logarithm of x). - - - - -

-


math.max (x, ···)

- - -

-Returns the argument with the maximum value, -according to the Lua operator <. (integer/float) - - - - -

-


math.maxinteger

-An integer with the maximum value for an integer. - - - - -

-


math.min (x, ···)

- - -

-Returns the argument with the minimum value, -according to the Lua operator <. (integer/float) - - - - -

-


math.mininteger

-An integer with the minimum value for an integer. - - - - -

-


math.modf (x)

- - -

-Returns the integral part of x and the fractional part of x. -Its second result is always a float. - - - - -

-


math.pi

- - -

-The value of π. - - - - -

-


math.rad (x)

- - -

-Converts the angle x from degrees to radians. - - - - -

-


math.random ([m [, n]])

- - -

-When called without arguments, -returns a pseudo-random float with uniform distribution -in the range [0,1). -When called with two integers m and n, -math.random returns a pseudo-random integer -with uniform distribution in the range [m, n]. -(The value n-m cannot be negative and must fit in a Lua integer.) -The call math.random(n) is equivalent to math.random(1,n). - - -

-This function is an interface to the underling -pseudo-random generator function provided by C. - - - - -

-


math.randomseed (x)

- - -

-Sets x as the "seed" -for the pseudo-random generator: -equal seeds produce equal sequences of numbers. - - - - -

-


math.sin (x)

- - -

-Returns the sine of x (assumed to be in radians). - - - - -

-


math.sqrt (x)

- - -

-Returns the square root of x. -(You can also use the expression x^0.5 to compute this value.) - - - - -

-


math.tan (x)

- - -

-Returns the tangent of x (assumed to be in radians). - - - - -

-


math.tointeger (x)

- - -

-If the value x is convertible to an integer, -returns that integer. -Otherwise, returns nil. - - - - -

-


math.type (x)

- - -

-Returns "integer" if x is an integer, -"float" if it is a float, -or nil if x is not a number. - - - - -

-


math.ult (m, n)

- - -

-Returns a boolean, -true if and only if integer m is below integer n when -they are compared as unsigned integers. - - - - - - - -

6.8 – Input and Output Facilities

- -

-The I/O library provides two different styles for file manipulation. -The first one uses implicit file handles; -that is, there are operations to set a default input file and a -default output file, -and all input/output operations are over these default files. -The second style uses explicit file handles. - - -

-When using implicit file handles, -all operations are supplied by table io. -When using explicit file handles, -the operation io.open returns a file handle -and then all operations are supplied as methods of the file handle. - - -

-The table io also provides -three predefined file handles with their usual meanings from C: -io.stdin, io.stdout, and io.stderr. -The I/O library never closes these files. - - -

-Unless otherwise stated, -all I/O functions return nil on failure -(plus an error message as a second result and -a system-dependent error code as a third result) -and some value different from nil on success. -In non-POSIX systems, -the computation of the error message and error code -in case of errors -may be not thread safe, -because they rely on the global C variable errno. - - -

-


io.close ([file])

- - -

-Equivalent to file:close(). -Without a file, closes the default output file. - - - - -

-


io.flush ()

- - -

-Equivalent to io.output():flush(). - - - - -

-


io.input ([file])

- - -

-When called with a file name, it opens the named file (in text mode), -and sets its handle as the default input file. -When called with a file handle, -it simply sets this file handle as the default input file. -When called without arguments, -it returns the current default input file. - - -

-In case of errors this function raises the error, -instead of returning an error code. - - - - -

-


io.lines ([filename, ···])

- - -

-Opens the given file name in read mode -and returns an iterator function that -works like file:lines(···) over the opened file. -When the iterator function detects the end of file, -it returns no values (to finish the loop) and automatically closes the file. - - -

-The call io.lines() (with no file name) is equivalent -to io.input():lines("*l"); -that is, it iterates over the lines of the default input file. -In this case, the iterator does not close the file when the loop ends. - - -

-In case of errors this function raises the error, -instead of returning an error code. - - - - -

-


io.open (filename [, mode])

- - -

-This function opens a file, -in the mode specified in the string mode. -In case of success, -it returns a new file handle. - - -

-The mode string can be any of the following: - -

    -
  • "r": read mode (the default);
  • -
  • "w": write mode;
  • -
  • "a": append mode;
  • -
  • "r+": update mode, all previous data is preserved;
  • -
  • "w+": update mode, all previous data is erased;
  • -
  • "a+": append update mode, previous data is preserved, - writing is only allowed at the end of file.
  • -

-The mode string can also have a 'b' at the end, -which is needed in some systems to open the file in binary mode. - - - - -

-


io.output ([file])

- - -

-Similar to io.input, but operates over the default output file. - - - - -

-


io.popen (prog [, mode])

- - -

-This function is system dependent and is not available -on all platforms. - - -

-Starts program prog in a separated process and returns -a file handle that you can use to read data from this program -(if mode is "r", the default) -or to write data to this program -(if mode is "w"). - - - - -

-


io.read (···)

- - -

-Equivalent to io.input():read(···). - - - - -

-


io.tmpfile ()

- - -

-In case of success, -returns a handle for a temporary file. -This file is opened in update mode -and it is automatically removed when the program ends. - - - - -

-


io.type (obj)

- - -

-Checks whether obj is a valid file handle. -Returns the string "file" if obj is an open file handle, -"closed file" if obj is a closed file handle, -or nil if obj is not a file handle. - - - - -

-


io.write (···)

- - -

-Equivalent to io.output():write(···). - - - - -

-


file:close ()

- - -

-Closes file. -Note that files are automatically closed when -their handles are garbage collected, -but that takes an unpredictable amount of time to happen. - - -

-When closing a file handle created with io.popen, -file:close returns the same values -returned by os.execute. - - - - -

-


file:flush ()

- - -

-Saves any written data to file. - - - - -

-


file:lines (···)

- - -

-Returns an iterator function that, -each time it is called, -reads the file according to the given formats. -When no format is given, -uses "l" as a default. -As an example, the construction - -

-     for c in file:lines(1) do body end
-

-will iterate over all characters of the file, -starting at the current position. -Unlike io.lines, this function does not close the file -when the loop ends. - - -

-In case of errors this function raises the error, -instead of returning an error code. - - - - -

-


file:read (···)

- - -

-Reads the file file, -according to the given formats, which specify what to read. -For each format, -the function returns a string or a number with the characters read, -or nil if it cannot read data with the specified format. -(In this latter case, -the function does not read subsequent formats.) -When called without formats, -it uses a default format that reads the next line -(see below). - - -

-The available formats are - -

    - -
  • "n": -reads a numeral and returns it as a float or an integer, -following the lexical conventions of Lua. -(The numeral may have leading spaces and a sign.) -This format always reads the longest input sequence that -is a valid prefix for a numeral; -if that prefix does not form a valid numeral -(e.g., an empty string, "0x", or "3.4e-"), -it is discarded and the function returns nil. -
  • - -
  • "a": -reads the whole file, starting at the current position. -On end of file, it returns the empty string. -
  • - -
  • "l": -reads the next line skipping the end of line, -returning nil on end of file. -This is the default format. -
  • - -
  • "L": -reads the next line keeping the end-of-line character (if present), -returning nil on end of file. -
  • - -
  • number: -reads a string with up to this number of bytes, -returning nil on end of file. -If number is zero, -it reads nothing and returns an empty string, -or nil on end of file. -
  • - -

-The formats "l" and "L" should be used only for text files. - - - - -

-


file:seek ([whence [, offset]])

- - -

-Sets and gets the file position, -measured from the beginning of the file, -to the position given by offset plus a base -specified by the string whence, as follows: - -

    -
  • "set": base is position 0 (beginning of the file);
  • -
  • "cur": base is current position;
  • -
  • "end": base is end of file;
  • -

-In case of success, seek returns the final file position, -measured in bytes from the beginning of the file. -If seek fails, it returns nil, -plus a string describing the error. - - -

-The default value for whence is "cur", -and for offset is 0. -Therefore, the call file:seek() returns the current -file position, without changing it; -the call file:seek("set") sets the position to the -beginning of the file (and returns 0); -and the call file:seek("end") sets the position to the -end of the file, and returns its size. - - - - -

-


file:setvbuf (mode [, size])

- - -

-Sets the buffering mode for an output file. -There are three available modes: - -

    - -
  • "no": -no buffering; the result of any output operation appears immediately. -
  • - -
  • "full": -full buffering; output operation is performed only -when the buffer is full or when -you explicitly flush the file (see io.flush). -
  • - -
  • "line": -line buffering; output is buffered until a newline is output -or there is any input from some special files -(such as a terminal device). -
  • - -

-For the last two cases, size -specifies the size of the buffer, in bytes. -The default is an appropriate size. - - - - -

-


file:write (···)

- - -

-Writes the value of each of its arguments to file. -The arguments must be strings or numbers. - - -

-In case of success, this function returns file. -Otherwise it returns nil plus a string describing the error. - - - - - - - -

6.9 – Operating System Facilities

- -

-This library is implemented through table os. - - -

-


os.clock ()

- - -

-Returns an approximation of the amount in seconds of CPU time -used by the program. - - - - -

-


os.date ([format [, time]])

- - -

-Returns a string or a table containing date and time, -formatted according to the given string format. - - -

-If the time argument is present, -this is the time to be formatted -(see the os.time function for a description of this value). -Otherwise, date formats the current time. - - -

-If format starts with '!', -then the date is formatted in Coordinated Universal Time. -After this optional character, -if format is the string "*t", -then date returns a table with the following fields: -year, month (1–12), day (1–31), -hour (0–23), min (0–59), sec (0–61), -wday (weekday, 1–7, Sunday is 1), -yday (day of the year, 1–366), -and isdst (daylight saving flag, a boolean). -This last field may be absent -if the information is not available. - - -

-If format is not "*t", -then date returns the date as a string, -formatted according to the same rules as the ISO C function strftime. - - -

-When called without arguments, -date returns a reasonable date and time representation that depends on -the host system and on the current locale. -(More specifically, os.date() is equivalent to os.date("%c").) - - -

-In non-POSIX systems, -this function may be not thread safe -because of its reliance on C function gmtime and C function localtime. - - - - -

-


os.difftime (t2, t1)

- - -

-Returns the difference, in seconds, -from time t1 to time t2 -(where the times are values returned by os.time). -In POSIX, Windows, and some other systems, -this value is exactly t2-t1. - - - - -

-


os.execute ([command])

- - -

-This function is equivalent to the ISO C function system. -It passes command to be executed by an operating system shell. -Its first result is true -if the command terminated successfully, -or nil otherwise. -After this first result -the function returns a string plus a number, -as follows: - -

    - -
  • "exit": -the command terminated normally; -the following number is the exit status of the command. -
  • - -
  • "signal": -the command was terminated by a signal; -the following number is the signal that terminated the command. -
  • - -
- -

-When called without a command, -os.execute returns a boolean that is true if a shell is available. - - - - -

-


os.exit ([code [, close]])

- - -

-Calls the ISO C function exit to terminate the host program. -If code is true, -the returned status is EXIT_SUCCESS; -if code is false, -the returned status is EXIT_FAILURE; -if code is a number, -the returned status is this number. -The default value for code is true. - - -

-If the optional second argument close is true, -closes the Lua state before exiting. - - - - -

-


os.getenv (varname)

- - -

-Returns the value of the process environment variable varname, -or nil if the variable is not defined. - - - - -

-


os.remove (filename)

- - -

-Deletes the file (or empty directory, on POSIX systems) -with the given name. -If this function fails, it returns nil, -plus a string describing the error and the error code. -Otherwise, it returns true. - - - - -

-


os.rename (oldname, newname)

- - -

-Renames the file or directory named oldname to newname. -If this function fails, it returns nil, -plus a string describing the error and the error code. -Otherwise, it returns true. - - - - -

-


os.setlocale (locale [, category])

- - -

-Sets the current locale of the program. -locale is a system-dependent string specifying a locale; -category is an optional string describing which category to change: -"all", "collate", "ctype", -"monetary", "numeric", or "time"; -the default category is "all". -The function returns the name of the new locale, -or nil if the request cannot be honored. - - -

-If locale is the empty string, -the current locale is set to an implementation-defined native locale. -If locale is the string "C", -the current locale is set to the standard C locale. - - -

-When called with nil as the first argument, -this function only returns the name of the current locale -for the given category. - - -

-This function may be not thread safe -because of its reliance on C function setlocale. - - - - -

-


os.time ([table])

- - -

-Returns the current time when called without arguments, -or a time representing the local date and time specified by the given table. -This table must have fields year, month, and day, -and may have fields -hour (default is 12), -min (default is 0), -sec (default is 0), -and isdst (default is nil). -Other fields are ignored. -For a description of these fields, see the os.date function. - - -

-The values in these fields do not need to be inside their valid ranges. -For instance, if sec is -10, -it means -10 seconds from the time specified by the other fields; -if hour is 1000, -it means +1000 hours from the time specified by the other fields. - - -

-The returned value is a number, whose meaning depends on your system. -In POSIX, Windows, and some other systems, -this number counts the number -of seconds since some given start time (the "epoch"). -In other systems, the meaning is not specified, -and the number returned by time can be used only as an argument to -os.date and os.difftime. - - - - -

-


os.tmpname ()

- - -

-Returns a string with a file name that can -be used for a temporary file. -The file must be explicitly opened before its use -and explicitly removed when no longer needed. - - -

-In POSIX systems, -this function also creates a file with that name, -to avoid security risks. -(Someone else might create the file with wrong permissions -in the time between getting the name and creating the file.) -You still have to open the file to use it -and to remove it (even if you do not use it). - - -

-When possible, -you may prefer to use io.tmpfile, -which automatically removes the file when the program ends. - - - - - - - -

6.10 – The Debug Library

- -

-This library provides -the functionality of the debug interface (§4.9) to Lua programs. -You should exert care when using this library. -Several of its functions -violate basic assumptions about Lua code -(e.g., that variables local to a function -cannot be accessed from outside; -that userdata metatables cannot be changed by Lua code; -that Lua programs do not crash) -and therefore can compromise otherwise secure code. -Moreover, some functions in this library may be slow. - - -

-All functions in this library are provided -inside the debug table. -All functions that operate over a thread -have an optional first argument which is the -thread to operate over. -The default is always the current thread. - - -

-


debug.debug ()

- - -

-Enters an interactive mode with the user, -running each string that the user enters. -Using simple commands and other debug facilities, -the user can inspect global and local variables, -change their values, evaluate expressions, and so on. -A line containing only the word cont finishes this function, -so that the caller continues its execution. - - -

-Note that commands for debug.debug are not lexically nested -within any function and so have no direct access to local variables. - - - - -

-


debug.gethook ([thread])

- - -

-Returns the current hook settings of the thread, as three values: -the current hook function, the current hook mask, -and the current hook count -(as set by the debug.sethook function). - - - - -

-


debug.getinfo ([thread,] f [, what])

- - -

-Returns a table with information about a function. -You can give the function directly -or you can give a number as the value of f, -which means the function running at level f of the call stack -of the given thread: -level 0 is the current function (getinfo itself); -level 1 is the function that called getinfo -(except for tail calls, which do not count on the stack); -and so on. -If f is a number larger than the number of active functions, -then getinfo returns nil. - - -

-The returned table can contain all the fields returned by lua_getinfo, -with the string what describing which fields to fill in. -The default for what is to get all information available, -except the table of valid lines. -If present, -the option 'f' -adds a field named func with the function itself. -If present, -the option 'L' -adds a field named activelines with the table of -valid lines. - - -

-For instance, the expression debug.getinfo(1,"n").name returns -a name for the current function, -if a reasonable name can be found, -and the expression debug.getinfo(print) -returns a table with all available information -about the print function. - - - - -

-


debug.getlocal ([thread,] f, local)

- - -

-This function returns the name and the value of the local variable -with index local of the function at level f of the stack. -This function accesses not only explicit local variables, -but also parameters, temporaries, etc. - - -

-The first parameter or local variable has index 1, and so on, -following the order that they are declared in the code, -counting only the variables that are active -in the current scope of the function. -Negative indices refer to vararg arguments; --1 is the first vararg argument. -The function returns nil if there is no variable with the given index, -and raises an error when called with a level out of range. -(You can call debug.getinfo to check whether the level is valid.) - - -

-Variable names starting with '(' (open parenthesis) -represent variables with no known names -(internal variables such as loop control variables, -and variables from chunks saved without debug information). - - -

-The parameter f may also be a function. -In that case, getlocal returns only the name of function parameters. - - - - -

-


debug.getmetatable (value)

- - -

-Returns the metatable of the given value -or nil if it does not have a metatable. - - - - -

-


debug.getregistry ()

- - -

-Returns the registry table (see §4.5). - - - - -

-


debug.getupvalue (f, up)

- - -

-This function returns the name and the value of the upvalue -with index up of the function f. -The function returns nil if there is no upvalue with the given index. - - -

-Variable names starting with '(' (open parenthesis) -represent variables with no known names -(variables from chunks saved without debug information). - - - - -

-


debug.getuservalue (u)

- - -

-Returns the Lua value associated to u. -If u is not a full userdata, -returns nil. - - - - -

-


debug.sethook ([thread,] hook, mask [, count])

- - -

-Sets the given function as a hook. -The string mask and the number count describe -when the hook will be called. -The string mask may have any combination of the following characters, -with the given meaning: - -

    -
  • 'c': the hook is called every time Lua calls a function;
  • -
  • 'r': the hook is called every time Lua returns from a function;
  • -
  • 'l': the hook is called every time Lua enters a new line of code.
  • -

-Moreover, -with a count different from zero, -the hook is called also after every count instructions. - - -

-When called without arguments, -debug.sethook turns off the hook. - - -

-When the hook is called, its first argument is a string -describing the event that has triggered its call: -"call" (or "tail call"), -"return", -"line", and "count". -For line events, -the hook also gets the new line number as its second parameter. -Inside a hook, -you can call getinfo with level 2 to get more information about -the running function -(level 0 is the getinfo function, -and level 1 is the hook function). - - - - -

-


debug.setlocal ([thread,] level, local, value)

- - -

-This function assigns the value value to the local variable -with index local of the function at level level of the stack. -The function returns nil if there is no local -variable with the given index, -and raises an error when called with a level out of range. -(You can call getinfo to check whether the level is valid.) -Otherwise, it returns the name of the local variable. - - -

-See debug.getlocal for more information about -variable indices and names. - - - - -

-


debug.setmetatable (value, table)

- - -

-Sets the metatable for the given value to the given table -(which can be nil). -Returns value. - - - - -

-


debug.setupvalue (f, up, value)

- - -

-This function assigns the value value to the upvalue -with index up of the function f. -The function returns nil if there is no upvalue -with the given index. -Otherwise, it returns the name of the upvalue. - - - - -

-


debug.setuservalue (udata, value)

- - -

-Sets the given value as -the Lua value associated to the given udata. -udata must be a full userdata. - - -

-Returns udata. - - - - -

-


debug.traceback ([thread,] [message [, level]])

- - -

-If message is present but is neither a string nor nil, -this function returns message without further processing. -Otherwise, -it returns a string with a traceback of the call stack. -The optional message string is appended -at the beginning of the traceback. -An optional level number tells at which level -to start the traceback -(default is 1, the function calling traceback). - - - - -

-


debug.upvalueid (f, n)

- - -

-Returns a unique identifier (as a light userdata) -for the upvalue numbered n -from the given function. - - -

-These unique identifiers allow a program to check whether different -closures share upvalues. -Lua closures that share an upvalue -(that is, that access a same external local variable) -will return identical ids for those upvalue indices. - - - - -

-


debug.upvaluejoin (f1, n1, f2, n2)

- - -

-Make the n1-th upvalue of the Lua closure f1 -refer to the n2-th upvalue of the Lua closure f2. - - - - - - - -

7 – Lua Standalone

- -

-Although Lua has been designed as an extension language, -to be embedded in a host C program, -it is also frequently used as a standalone language. -An interpreter for Lua as a standalone language, -called simply lua, -is provided with the standard distribution. -The standalone interpreter includes -all standard libraries, including the debug library. -Its usage is: - -

-     lua [options] [script [args]]
-

-The options are: - -

    -
  • -e stat: executes string stat;
  • -
  • -l mod: "requires" mod and assigns the - result to global @mod;
  • -
  • -i: enters interactive mode after running script;
  • -
  • -v: prints version information;
  • -
  • -E: ignores environment variables;
  • -
  • --: stops handling options;
  • -
  • -: executes stdin as a file and stops handling options.
  • -

-After handling its options, lua runs the given script. -When called without arguments, -lua behaves as lua -v -i -when the standard input (stdin) is a terminal, -and as lua - otherwise. - - -

-When called without option -E, -the interpreter checks for an environment variable LUA_INIT_5_3 -(or LUA_INIT if the versioned name is not defined) -before running any argument. -If the variable content has the format @filename, -then lua executes the file. -Otherwise, lua executes the string itself. - - -

-When called with option -E, -besides ignoring LUA_INIT, -Lua also ignores -the values of LUA_PATH and LUA_CPATH, -setting the values of -package.path and package.cpath -with the default paths defined in luaconf.h. - - -

-All options are handled in order, except -i and -E. -For instance, an invocation like - -

-     $ lua -e'a=1' -e 'print(a)' script.lua
-

-will first set a to 1, then print the value of a, -and finally run the file script.lua with no arguments. -(Here $ is the shell prompt. Your prompt may be different.) - - -

-Before running any code, -lua collects all command-line arguments -in a global table called arg. -The script name goes to index 0, -the first argument after the script name goes to index 1, -and so on. -Any arguments before the script name -(that is, the interpreter name plus its options) -go to negative indices. -For instance, in the call - -

-     $ lua -la b.lua t1 t2
-

-the table is like this: - -

-     arg = { [-2] = "lua", [-1] = "-la",
-             [0] = "b.lua",
-             [1] = "t1", [2] = "t2" }
-

-If there is no script in the call, -the interpreter name goes to index 0, -followed by the other arguments. -For instance, the call - -

-     $ lua -e "print(arg[1])"
-

-will print "-e". -If there is a script, -the script is called with arguments -arg[1], ···, arg[#arg]. -(Like all chunks in Lua, -the script is compiled as a vararg function.) - - -

-In interactive mode, -Lua repeatedly prompts and waits for a line. -After reading a line, -Lua first try to interpret the line as an expression. -If it succeeds, it prints its value. -Otherwise, it interprets the line as a statement. -If you write an incomplete statement, -the interpreter waits for its completion -by issuing a different prompt. - - -

-If the global variable _PROMPT contains a string, -then its value is used as the prompt. -Similarly, if the global variable _PROMPT2 contains a string, -its value is used as the secondary prompt -(issued during incomplete statements). - - -

-In case of unprotected errors in the script, -the interpreter reports the error to the standard error stream. -If the error object is not a string but -has a metamethod __tostring, -the interpreter calls this metamethod to produce the final message. -Otherwise, the interpreter converts the error object to a string -and adds a stack traceback to it. - - -

-When finishing normally, -the interpreter closes its main Lua state -(see lua_close). -The script can avoid this step by -calling os.exit to terminate. - - -

-To allow the use of Lua as a -script interpreter in Unix systems, -the standalone interpreter skips -the first line of a chunk if it starts with #. -Therefore, Lua scripts can be made into executable programs -by using chmod +x and the #! form, -as in - -

-     #!/usr/local/bin/lua
-

-(Of course, -the location of the Lua interpreter may be different in your machine. -If lua is in your PATH, -then - -

-     #!/usr/bin/env lua
-

-is a more portable solution.) - - - -

8 – Incompatibilities with the Previous Version

- -

-Here we list the incompatibilities that you may find when moving a program -from Lua 5.2 to Lua 5.3. -You can avoid some incompatibilities by compiling Lua with -appropriate options (see file luaconf.h). -However, -all these compatibility options will be removed in the future. - - -

-Lua versions can always change the C API in ways that -do not imply source-code changes in a program, -such as the numeric values for constants -or the implementation of functions as macros. -Therefore, -you should not assume that binaries are compatible between -different Lua versions. -Always recompile clients of the Lua API when -using a new version. - - -

-Similarly, Lua versions can always change the internal representation -of precompiled chunks; -precompiled chunks are not compatible between different Lua versions. - - -

-The standard paths in the official distribution may -change between versions. - - - -

8.1 – Changes in the Language

-
    - -
  • -The main difference between Lua 5.2 and Lua 5.3 is the -introduction of an integer subtype for numbers. -Although this change should not affect "normal" computations, -some computations -(mainly those that involve some kind of overflow) -can give different results. - - -

    -You can fix these differences by forcing a number to be a float -(in Lua 5.2 all numbers were float), -in particular writing constants with an ending .0 -or using x = x + 0.0 to convert a variable. -(This recommendation is only for a quick fix -for an occasional incompatibility; -it is not a general guideline for good programming. -For good programming, -use floats where you need floats -and integers where you need integers.) -

  • - -
  • -The conversion of a float to a string now adds a .0 suffix -to the result if it looks like an integer. -(For instance, the float 2.0 will be printed as 2.0, -not as 2.) -You should always use an explicit format -when you need a specific format for numbers. - - -

    -(Formally this is not an incompatibility, -because Lua does not specify how numbers are formatted as strings, -but some programs assumed a specific format.) -

  • - -
  • -The generational mode for the garbage collector was removed. -(It was an experimental feature in Lua 5.2.) -
  • - -
- - - - -

8.2 – Changes in the Libraries

-
    - -
  • -The bit32 library has been deprecated. -It is easy to require a compatible external library or, -better yet, to replace its functions with appropriate bitwise operations. -(Keep in mind that bit32 operates on 32-bit integers, -while the bitwise operators in Lua 5.3 operate on Lua integers, -which by default have 64 bits.) -
  • - -
  • -The Table library now respects metamethods -for setting and getting elements. -
  • - -
  • -The ipairs iterator now respects metamethods and -its __ipairs metamethod has been deprecated. -
  • - -
  • -Option names in io.read do not have a starting '*' anymore. -For compatibility, Lua will continue to accept (and ignore) this character. -
  • - -
  • -The following functions were deprecated in the mathematical library: -atan2, cosh, sinh, tanh, pow, -frexp, and ldexp. -You can replace math.pow(x,y) with x^y; -you can replace math.atan2 with math.atan, -which now accepts one or two arguments; -you can replace math.ldexp(x,exp) with x * 2.0^exp. -For the other operations, -you can either use an external library or -implement them in Lua. -
  • - -
  • -The searcher for C loaders used by require -changed the way it handles versioned names. -Now, the version should come after the module name -(as is usual in most other tools). -For compatibility, that searcher still tries the old format -if it cannot find an open function according to the new style. -(Lua 5.2 already worked that way, -but it did not document the change.) -
  • - -
  • -The call collectgarbage("count") now returns only one result. -(You can compute that second result from the fractional part -of the first result.) -
  • - -
- - - - -

8.3 – Changes in the API

- - -
    - -
  • -Continuation functions now receive as arguments what they needed -to get through lua_getctx, -so lua_getctx has been removed. -Adapt your code accordingly. -
  • - -
  • -Function lua_dump has an extra parameter, strip. -Use 0 as the value of this parameter to get the old behavior. -
  • - -
  • -Functions to inject/project unsigned integers -(lua_pushunsigned, lua_tounsigned, lua_tounsignedx, -luaL_checkunsigned, luaL_optunsigned) -were deprecated. -Use their signed equivalents with a type cast. -
  • - -
  • -Macros to project non-default integer types -(luaL_checkint, luaL_optint, luaL_checklong, luaL_optlong) -were deprecated. -Use their equivalent over lua_Integer with a type cast -(or, when possible, use lua_Integer in your code). -
  • - -
- - - - -

9 – The Complete Syntax of Lua

- -

-Here is the complete syntax of Lua in extended BNF. -As usual in extended BNF, -{A} means 0 or more As, -and [A] means an optional A. -(For operator precedences, see §3.4.8; -for a description of the terminals -Name, Numeral, -and LiteralString, see §3.1.) - - - - -

-
-	chunk ::= block
-
-	block ::= {stat} [retstat]
-
-	stat ::=  ‘;’ | 
-		 varlist ‘=’ explist | 
-		 functioncall | 
-		 label | 
-		 break | 
-		 goto Name | 
-		 do block end | 
-		 while exp do block end | 
-		 repeat block until exp | 
-		 if exp then block {elseif exp then block} [else block] end | 
-		 for Name ‘=’ exp ‘,’ exp [‘,’ exp] do block end | 
-		 for namelist in explist do block end | 
-		 function funcname funcbody | 
-		 local function Name funcbody | 
-		 local namelist [‘=’ explist] 
-
-	retstat ::= return [explist] [‘;’]
-
-	label ::= ‘::’ Name ‘::’
-
-	funcname ::= Name {‘.’ Name} [‘:’ Name]
-
-	varlist ::= var {‘,’ var}
-
-	var ::=  Name | prefixexp ‘[’ exp ‘]’ | prefixexp ‘.’ Name 
-
-	namelist ::= Name {‘,’ Name}
-
-	explist ::= exp {‘,’ exp}
-
-	exp ::=  nil | false | true | Numeral | LiteralString | ‘...’ | functiondef | 
-		 prefixexp | tableconstructor | exp binop exp | unop exp 
-
-	prefixexp ::= var | functioncall | ‘(’ exp ‘)’
-
-	functioncall ::=  prefixexp args | prefixexp ‘:’ Name args 
-
-	args ::=  ‘(’ [explist] ‘)’ | tableconstructor | LiteralString 
-
-	functiondef ::= function funcbody
-
-	funcbody ::= ‘(’ [parlist] ‘)’ block end
-
-	parlist ::= namelist [‘,’ ‘...’] | ‘...’
-
-	tableconstructor ::= ‘{’ [fieldlist] ‘}’
-
-	fieldlist ::= field {fieldsep field} [fieldsep]
-
-	field ::= ‘[’ exp ‘]’ ‘=’ exp | Name ‘=’ exp | exp
-
-	fieldsep ::= ‘,’ | ‘;’
-
-	binop ::=  ‘+’ | ‘-’ | ‘*’ | ‘/’ | ‘//’ | ‘^’ | ‘%’ | 
-		 ‘&’ | ‘~’ | ‘|’ | ‘>>’ | ‘<<’ | ‘..’ | 
-		 ‘<’ | ‘<=’ | ‘>’ | ‘>=’ | ‘==’ | ‘~=’ | 
-		 and | or
-
-	unop ::= ‘-’ | not | ‘#’ | ‘~’
-
-
- -

- - - - - - - - -

- - - - diff --git a/build/premake/premake5/contrib/lua/doc/osi-certified-72x60.png b/build/premake/premake5/contrib/lua/doc/osi-certified-72x60.png deleted file mode 100644 index 2e87dde8d1..0000000000 --- a/build/premake/premake5/contrib/lua/doc/osi-certified-72x60.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d6ed62bd2f453c986f1aa1ed9e8920572cc746b944320a9aa0993cea6f55248 -size 3774 diff --git a/build/premake/premake5/contrib/lua/doc/readme.html b/build/premake/premake5/contrib/lua/doc/readme.html deleted file mode 100644 index b118f7b02d..0000000000 --- a/build/premake/premake5/contrib/lua/doc/readme.html +++ /dev/null @@ -1,365 +0,0 @@ - - - -Lua 5.3 readme - - - - - - - -

-Lua -Welcome to Lua 5.3 -

- - - -

About Lua

-

-Lua is a powerful, fast, lightweight, embeddable scripting language -developed by a -team -at -PUC-Rio, -the Pontifical Catholic University of Rio de Janeiro in Brazil. -Lua is -free software -used in many products and projects around the world. - -

-Lua's -official web site -provides complete information -about Lua, -including -an -executive summary -and -updated -documentation, -especially the -reference manual, -which may differ slightly from the -local copy -distributed in this package. - -

Installing Lua

-

-Lua is distributed in -source -form. -You need to build it before using it. -Building Lua should be straightforward -because -Lua is implemented in pure ANSI C and compiles unmodified in all known -platforms that have an ANSI C compiler. -Lua also compiles unmodified as C++. -The instructions given below for building Lua are for Unix-like platforms. -See also -instructions for other systems -and -customization options. - -

-If you don't have the time or the inclination to compile Lua yourself, -get a binary from -LuaBinaries. -Try also -LuaDist, -a multi-platform distribution of Lua that includes batteries. - -

Building Lua

-

-In most Unix-like platforms, simply do "make" with a suitable target. -Here are the details. - -

    -
  1. -Open a terminal window and move to -the top-level directory, which is named lua-5.3.5. -The Makefile there controls both the build process and the installation process. -

    -

  2. - Do "make" and see if your platform is listed. - The platforms currently supported are: -

    -

    - aix bsd c89 freebsd generic linux macosx mingw posix solaris -

    -

    - If your platform is listed, just do "make xxx", where xxx - is your platform name. -

    - If your platform is not listed, try the closest one or posix, generic, - c89, in this order. -

    -

  3. -The compilation takes only a few moments -and produces three files in the src directory: -lua (the interpreter), -luac (the compiler), -and liblua.a (the library). -

    -

  4. - To check that Lua has been built correctly, do "make test" - after building Lua. This will run the interpreter and print its version. -
-

-If you're running Linux and get compilation errors, -make sure you have installed the readline development package -(which is probably named libreadline-dev or readline-devel). -If you get link errors after that, -then try "make linux MYLIBS=-ltermcap". - -

Installing Lua

-

- Once you have built Lua, you may want to install it in an official - place in your system. In this case, do "make install". The official - place and the way to install files are defined in the Makefile. You'll - probably need the right permissions to install files. - -

- To build and install Lua in one step, do "make xxx install", - where xxx is your platform name. - -

- To install Lua locally, do "make local". - This will create a directory install with subdirectories - bin, include, lib, man, share, - and install Lua as listed below. - - To install Lua locally, but in some other directory, do - "make install INSTALL_TOP=xxx", where xxx is your chosen directory. - The installation starts in the src and doc directories, - so take care if INSTALL_TOP is not an absolute path. - -

-
- bin: -
- lua luac -
- include: -
- lua.h luaconf.h lualib.h lauxlib.h lua.hpp -
- lib: -
- liblua.a -
- man/man1: -
- lua.1 luac.1 -
- -

- These are the only directories you need for development. - If you only want to run Lua programs, - you only need the files in bin and man. - The files in include and lib are needed for - embedding Lua in C or C++ programs. - -

Customization

-

- Three kinds of things can be customized by editing a file: -

    -
  • Where and how to install Lua — edit Makefile. -
  • How to build Lua — edit src/Makefile. -
  • Lua features — edit src/luaconf.h. -
- -

- You don't actually need to edit the Makefiles because you may set the - relevant variables in the command line when invoking make. - Nevertheless, it's probably best to edit and save the Makefiles to - record the changes you've made. - -

- On the other hand, if you need to customize some Lua features, you'll need - to edit src/luaconf.h before building and installing Lua. - The edited file will be the one installed, and - it will be used by any Lua clients that you build, to ensure consistency. - Further customization is available to experts by editing the Lua sources. - -

Building Lua on other systems

-

- If you're not using the usual Unix tools, then the instructions for - building Lua depend on the compiler you use. You'll need to create - projects (or whatever your compiler uses) for building the library, - the interpreter, and the compiler, as follows: - -

-
-library: -
-lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c -lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c -ltm.c lundump.c lvm.c lzio.c -lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c -lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c linit.c -
-interpreter: -
- library, lua.c -
-compiler: -
- library, luac.c -
- -

- To use Lua as a library in your own programs you'll need to know how to - create and use libraries with your compiler. Moreover, to dynamically load - C libraries for Lua you'll need to know how to create dynamic libraries - and you'll need to make sure that the Lua API functions are accessible to - those dynamic libraries — but don't link the Lua library - into each dynamic library. For Unix, we recommend that the Lua library - be linked statically into the host program and its symbols exported for - dynamic linking; src/Makefile does this for the Lua interpreter. - For Windows, we recommend that the Lua library be a DLL. - In all cases, the compiler luac should be linked statically. - -

- As mentioned above, you may edit src/luaconf.h to customize - some features before building Lua. - -

Changes since Lua 5.2

-

-Here are the main changes introduced in Lua 5.3. -The -reference manual -lists the -incompatibilities that had to be introduced. - -

Main changes

-
    -
  • integers (64-bit by default) -
  • official support for 32-bit numbers -
  • bitwise operators -
  • basic utf-8 support -
  • functions for packing and unpacking values - -
- -Here are the other changes introduced in Lua 5.3: -

Language

-
    -
  • userdata can have any Lua value as uservalue -
  • floor division -
  • more flexible rules for some metamethods -
- -

Libraries

-
    -
  • ipairs and the table library respect metamethods -
  • strip option in string.dump -
  • table library respects metamethods -
  • new function table.move -
  • new function string.pack -
  • new function string.unpack -
  • new function string.packsize -
- -

C API

-
    -
  • simpler API for continuation functions in C -
  • lua_gettable and similar functions return type of resulted value -
  • strip option in lua_dump -
  • new function: lua_geti -
  • new function: lua_seti -
  • new function: lua_isyieldable -
  • new function: lua_numbertointeger -
  • new function: lua_rotate -
  • new function: lua_stringtonumber -
- -

Lua standalone interpreter

-
    -
  • can be used as calculator; no need to prefix with '=' -
  • arg table available to all code -
- -

License

-

- -[osi certified] - -Lua is free software distributed under the terms of the -MIT license -reproduced below; -it may be used for any purpose, including commercial purposes, -at absolutely no cost without having to ask us. - -The only requirement is that if you do use Lua, -then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation. - -For details, see -this. - -

-Copyright © 1994–2017 Lua.org, PUC-Rio. - -

-Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -

-The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -

-

- -

- - - - diff --git a/build/premake/premake5/contrib/lua/premake5.lua b/build/premake/premake5/contrib/lua/premake5.lua deleted file mode 100644 index 777ae5ee32..0000000000 --- a/build/premake/premake5/contrib/lua/premake5.lua +++ /dev/null @@ -1,28 +0,0 @@ -project "lua-lib" - language "C" - kind "StaticLib" - warnings "off" - - includedirs { "src" } - - files - { - "**.h", - "**.c" - } - - excludes - { - "src/lauxlib.c", - "src/lua.c", - "src/luac.c", - "src/print.c", - "**.lua", - "etc/*.c" - } - - filter "system:linux or bsd or hurd or aix or solaris or haiku" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - - filter "system:macosx" - defines { "LUA_USE_MACOSX" } diff --git a/build/premake/premake5/contrib/lua/src/lapi.c b/build/premake/premake5/contrib/lua/src/lapi.c deleted file mode 100644 index 02b7fab7ea..0000000000 --- a/build/premake/premake5/contrib/lua/src/lapi.c +++ /dev/null @@ -1,1299 +0,0 @@ -/* -** $Id: lapi.c,v 2.259.1.2 2017/12/06 18:35:12 roberto Exp $ -** Lua API -** See Copyright Notice in lua.h -*/ - -#define lapi_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include - -#include "lua.h" - -#include "lapi.h" -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lgc.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" -#include "lundump.h" -#include "lvm.h" - - - -const char lua_ident[] = - "$LuaVersion: " LUA_COPYRIGHT " $" - "$LuaAuthors: " LUA_AUTHORS " $"; - - -/* value at a non-valid index */ -#define NONVALIDVALUE cast(TValue *, luaO_nilobject) - -/* corresponding test */ -#define isvalid(o) ((o) != luaO_nilobject) - -/* test for pseudo index */ -#define ispseudo(i) ((i) <= LUA_REGISTRYINDEX) - -/* test for upvalue */ -#define isupvalue(i) ((i) < LUA_REGISTRYINDEX) - -/* test for valid but not pseudo index */ -#define isstackindex(i, o) (isvalid(o) && !ispseudo(i)) - -#define api_checkvalidindex(l,o) api_check(l, isvalid(o), "invalid index") - -#define api_checkstackindex(l, i, o) \ - api_check(l, isstackindex(i, o), "index not in the stack") - - -static TValue *index2addr (lua_State *L, int idx) { - CallInfo *ci = L->ci; - if (idx > 0) { - TValue *o = ci->func + idx; - api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index"); - if (o >= L->top) return NONVALIDVALUE; - else return o; - } - else if (!ispseudo(idx)) { /* negative index */ - api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index"); - return L->top + idx; - } - else if (idx == LUA_REGISTRYINDEX) - return &G(L)->l_registry; - else { /* upvalues */ - idx = LUA_REGISTRYINDEX - idx; - api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large"); - if (ttislcf(ci->func)) /* light C function? */ - return NONVALIDVALUE; /* it has no upvalues */ - else { - CClosure *func = clCvalue(ci->func); - return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : NONVALIDVALUE; - } - } -} - - -/* -** to be called by 'lua_checkstack' in protected mode, to grow stack -** capturing memory errors -*/ -static void growstack (lua_State *L, void *ud) { - int size = *(int *)ud; - luaD_growstack(L, size); -} - - -LUA_API int lua_checkstack (lua_State *L, int n) { - int res; - CallInfo *ci = L->ci; - lua_lock(L); - api_check(L, n >= 0, "negative 'n'"); - if (L->stack_last - L->top > n) /* stack large enough? */ - res = 1; /* yes; check is OK */ - else { /* no; need to grow stack */ - int inuse = cast_int(L->top - L->stack) + EXTRA_STACK; - if (inuse > LUAI_MAXSTACK - n) /* can grow without overflow? */ - res = 0; /* no */ - else /* try to grow stack */ - res = (luaD_rawrunprotected(L, &growstack, &n) == LUA_OK); - } - if (res && ci->top < L->top + n) - ci->top = L->top + n; /* adjust frame top */ - lua_unlock(L); - return res; -} - - -LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { - int i; - if (from == to) return; - lua_lock(to); - api_checknelems(from, n); - api_check(from, G(from) == G(to), "moving among independent states"); - api_check(from, to->ci->top - to->top >= n, "stack overflow"); - from->top -= n; - for (i = 0; i < n; i++) { - setobj2s(to, to->top, from->top + i); - to->top++; /* stack already checked by previous 'api_check' */ - } - lua_unlock(to); -} - - -LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { - lua_CFunction old; - lua_lock(L); - old = G(L)->panic; - G(L)->panic = panicf; - lua_unlock(L); - return old; -} - - -LUA_API const lua_Number *lua_version (lua_State *L) { - static const lua_Number version = LUA_VERSION_NUM; - if (L == NULL) return &version; - else return G(L)->version; -} - - - -/* -** basic stack manipulation -*/ - - -/* -** convert an acceptable stack index into an absolute index -*/ -LUA_API int lua_absindex (lua_State *L, int idx) { - return (idx > 0 || ispseudo(idx)) - ? idx - : cast_int(L->top - L->ci->func) + idx; -} - - -LUA_API int lua_gettop (lua_State *L) { - return cast_int(L->top - (L->ci->func + 1)); -} - - -LUA_API void lua_settop (lua_State *L, int idx) { - StkId func = L->ci->func; - lua_lock(L); - if (idx >= 0) { - api_check(L, idx <= L->stack_last - (func + 1), "new top too large"); - while (L->top < (func + 1) + idx) - setnilvalue(L->top++); - L->top = (func + 1) + idx; - } - else { - api_check(L, -(idx+1) <= (L->top - (func + 1)), "invalid new top"); - L->top += idx+1; /* 'subtract' index (index is negative) */ - } - lua_unlock(L); -} - - -/* -** Reverse the stack segment from 'from' to 'to' -** (auxiliary to 'lua_rotate') -*/ -static void reverse (lua_State *L, StkId from, StkId to) { - for (; from < to; from++, to--) { - TValue temp; - setobj(L, &temp, from); - setobjs2s(L, from, to); - setobj2s(L, to, &temp); - } -} - - -/* -** Let x = AB, where A is a prefix of length 'n'. Then, -** rotate x n == BA. But BA == (A^r . B^r)^r. -*/ -LUA_API void lua_rotate (lua_State *L, int idx, int n) { - StkId p, t, m; - lua_lock(L); - t = L->top - 1; /* end of stack segment being rotated */ - p = index2addr(L, idx); /* start of segment */ - api_checkstackindex(L, idx, p); - api_check(L, (n >= 0 ? n : -n) <= (t - p + 1), "invalid 'n'"); - m = (n >= 0 ? t - n : p - n - 1); /* end of prefix */ - reverse(L, p, m); /* reverse the prefix with length 'n' */ - reverse(L, m + 1, t); /* reverse the suffix */ - reverse(L, p, t); /* reverse the entire segment */ - lua_unlock(L); -} - - -LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) { - TValue *fr, *to; - lua_lock(L); - fr = index2addr(L, fromidx); - to = index2addr(L, toidx); - api_checkvalidindex(L, to); - setobj(L, to, fr); - if (isupvalue(toidx)) /* function upvalue? */ - luaC_barrier(L, clCvalue(L->ci->func), fr); - /* LUA_REGISTRYINDEX does not need gc barrier - (collector revisits it before finishing collection) */ - lua_unlock(L); -} - - -LUA_API void lua_pushvalue (lua_State *L, int idx) { - lua_lock(L); - setobj2s(L, L->top, index2addr(L, idx)); - api_incr_top(L); - lua_unlock(L); -} - - - -/* -** access functions (stack -> C) -*/ - - -LUA_API int lua_type (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - return (isvalid(o) ? ttnov(o) : LUA_TNONE); -} - - -LUA_API const char *lua_typename (lua_State *L, int t) { - UNUSED(L); - api_check(L, LUA_TNONE <= t && t < LUA_NUMTAGS, "invalid tag"); - return ttypename(t); -} - - -LUA_API int lua_iscfunction (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - return (ttislcf(o) || (ttisCclosure(o))); -} - - -LUA_API int lua_isinteger (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - return ttisinteger(o); -} - - -LUA_API int lua_isnumber (lua_State *L, int idx) { - lua_Number n; - const TValue *o = index2addr(L, idx); - return tonumber(o, &n); -} - - -LUA_API int lua_isstring (lua_State *L, int idx) { - const TValue *o = index2addr(L, idx); - return (ttisstring(o) || cvt2str(o)); -} - - -LUA_API int lua_isuserdata (lua_State *L, int idx) { - const TValue *o = index2addr(L, idx); - return (ttisfulluserdata(o) || ttislightuserdata(o)); -} - - -LUA_API int lua_rawequal (lua_State *L, int index1, int index2) { - StkId o1 = index2addr(L, index1); - StkId o2 = index2addr(L, index2); - return (isvalid(o1) && isvalid(o2)) ? luaV_rawequalobj(o1, o2) : 0; -} - - -LUA_API void lua_arith (lua_State *L, int op) { - lua_lock(L); - if (op != LUA_OPUNM && op != LUA_OPBNOT) - api_checknelems(L, 2); /* all other operations expect two operands */ - else { /* for unary operations, add fake 2nd operand */ - api_checknelems(L, 1); - setobjs2s(L, L->top, L->top - 1); - api_incr_top(L); - } - /* first operand at top - 2, second at top - 1; result go to top - 2 */ - luaO_arith(L, op, L->top - 2, L->top - 1, L->top - 2); - L->top--; /* remove second operand */ - lua_unlock(L); -} - - -LUA_API int lua_compare (lua_State *L, int index1, int index2, int op) { - StkId o1, o2; - int i = 0; - lua_lock(L); /* may call tag method */ - o1 = index2addr(L, index1); - o2 = index2addr(L, index2); - if (isvalid(o1) && isvalid(o2)) { - switch (op) { - case LUA_OPEQ: i = luaV_equalobj(L, o1, o2); break; - case LUA_OPLT: i = luaV_lessthan(L, o1, o2); break; - case LUA_OPLE: i = luaV_lessequal(L, o1, o2); break; - default: api_check(L, 0, "invalid option"); - } - } - lua_unlock(L); - return i; -} - - -LUA_API size_t lua_stringtonumber (lua_State *L, const char *s) { - size_t sz = luaO_str2num(s, L->top); - if (sz != 0) - api_incr_top(L); - return sz; -} - - -LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *pisnum) { - lua_Number n; - const TValue *o = index2addr(L, idx); - int isnum = tonumber(o, &n); - if (!isnum) - n = 0; /* call to 'tonumber' may change 'n' even if it fails */ - if (pisnum) *pisnum = isnum; - return n; -} - - -LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) { - lua_Integer res; - const TValue *o = index2addr(L, idx); - int isnum = tointeger(o, &res); - if (!isnum) - res = 0; /* call to 'tointeger' may change 'n' even if it fails */ - if (pisnum) *pisnum = isnum; - return res; -} - - -LUA_API int lua_toboolean (lua_State *L, int idx) { - const TValue *o = index2addr(L, idx); - return !l_isfalse(o); -} - - -LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) { - StkId o = index2addr(L, idx); - if (!ttisstring(o)) { - if (!cvt2str(o)) { /* not convertible? */ - if (len != NULL) *len = 0; - return NULL; - } - lua_lock(L); /* 'luaO_tostring' may create a new string */ - luaO_tostring(L, o); - luaC_checkGC(L); - o = index2addr(L, idx); /* previous call may reallocate the stack */ - lua_unlock(L); - } - if (len != NULL) - *len = vslen(o); - return svalue(o); -} - - -LUA_API size_t lua_rawlen (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - switch (ttype(o)) { - case LUA_TSHRSTR: return tsvalue(o)->shrlen; - case LUA_TLNGSTR: return tsvalue(o)->u.lnglen; - case LUA_TUSERDATA: return uvalue(o)->len; - case LUA_TTABLE: return luaH_getn(hvalue(o)); - default: return 0; - } -} - - -LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - if (ttislcf(o)) return fvalue(o); - else if (ttisCclosure(o)) - return clCvalue(o)->f; - else return NULL; /* not a C function */ -} - - -LUA_API void *lua_touserdata (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - switch (ttnov(o)) { - case LUA_TUSERDATA: return getudatamem(uvalue(o)); - case LUA_TLIGHTUSERDATA: return pvalue(o); - default: return NULL; - } -} - - -LUA_API lua_State *lua_tothread (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - return (!ttisthread(o)) ? NULL : thvalue(o); -} - - -LUA_API const void *lua_topointer (lua_State *L, int idx) { - StkId o = index2addr(L, idx); - switch (ttype(o)) { - case LUA_TTABLE: return hvalue(o); - case LUA_TLCL: return clLvalue(o); - case LUA_TCCL: return clCvalue(o); - case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o))); - case LUA_TTHREAD: return thvalue(o); - case LUA_TUSERDATA: return getudatamem(uvalue(o)); - case LUA_TLIGHTUSERDATA: return pvalue(o); - default: return NULL; - } -} - - - -/* -** push functions (C -> stack) -*/ - - -LUA_API void lua_pushnil (lua_State *L) { - lua_lock(L); - setnilvalue(L->top); - api_incr_top(L); - lua_unlock(L); -} - - -LUA_API void lua_pushnumber (lua_State *L, lua_Number n) { - lua_lock(L); - setfltvalue(L->top, n); - api_incr_top(L); - lua_unlock(L); -} - - -LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) { - lua_lock(L); - setivalue(L->top, n); - api_incr_top(L); - lua_unlock(L); -} - - -/* -** Pushes on the stack a string with given length. Avoid using 's' when -** 'len' == 0 (as 's' can be NULL in that case), due to later use of -** 'memcmp' and 'memcpy'. -*/ -LUA_API const char *lua_pushlstring (lua_State *L, const char *s, size_t len) { - TString *ts; - lua_lock(L); - ts = (len == 0) ? luaS_new(L, "") : luaS_newlstr(L, s, len); - setsvalue2s(L, L->top, ts); - api_incr_top(L); - luaC_checkGC(L); - lua_unlock(L); - return getstr(ts); -} - - -LUA_API const char *lua_pushstring (lua_State *L, const char *s) { - lua_lock(L); - if (s == NULL) - setnilvalue(L->top); - else { - TString *ts; - ts = luaS_new(L, s); - setsvalue2s(L, L->top, ts); - s = getstr(ts); /* internal copy's address */ - } - api_incr_top(L); - luaC_checkGC(L); - lua_unlock(L); - return s; -} - - -LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, - va_list argp) { - const char *ret; - lua_lock(L); - ret = luaO_pushvfstring(L, fmt, argp); - luaC_checkGC(L); - lua_unlock(L); - return ret; -} - - -LUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...) { - const char *ret; - va_list argp; - lua_lock(L); - va_start(argp, fmt); - ret = luaO_pushvfstring(L, fmt, argp); - va_end(argp); - luaC_checkGC(L); - lua_unlock(L); - return ret; -} - - -LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) { - lua_lock(L); - if (n == 0) { - setfvalue(L->top, fn); - api_incr_top(L); - } - else { - CClosure *cl; - api_checknelems(L, n); - api_check(L, n <= MAXUPVAL, "upvalue index too large"); - cl = luaF_newCclosure(L, n); - cl->f = fn; - L->top -= n; - while (n--) { - setobj2n(L, &cl->upvalue[n], L->top + n); - /* does not need barrier because closure is white */ - } - setclCvalue(L, L->top, cl); - api_incr_top(L); - luaC_checkGC(L); - } - lua_unlock(L); -} - - -LUA_API void lua_pushboolean (lua_State *L, int b) { - lua_lock(L); - setbvalue(L->top, (b != 0)); /* ensure that true is 1 */ - api_incr_top(L); - lua_unlock(L); -} - - -LUA_API void lua_pushlightuserdata (lua_State *L, void *p) { - lua_lock(L); - setpvalue(L->top, p); - api_incr_top(L); - lua_unlock(L); -} - - -LUA_API int lua_pushthread (lua_State *L) { - lua_lock(L); - setthvalue(L, L->top, L); - api_incr_top(L); - lua_unlock(L); - return (G(L)->mainthread == L); -} - - - -/* -** get functions (Lua -> stack) -*/ - - -static int auxgetstr (lua_State *L, const TValue *t, const char *k) { - const TValue *slot; - TString *str = luaS_new(L, k); - if (luaV_fastget(L, t, str, slot, luaH_getstr)) { - setobj2s(L, L->top, slot); - api_incr_top(L); - } - else { - setsvalue2s(L, L->top, str); - api_incr_top(L); - luaV_finishget(L, t, L->top - 1, L->top - 1, slot); - } - lua_unlock(L); - return ttnov(L->top - 1); -} - - -LUA_API int lua_getglobal (lua_State *L, const char *name) { - Table *reg = hvalue(&G(L)->l_registry); - lua_lock(L); - return auxgetstr(L, luaH_getint(reg, LUA_RIDX_GLOBALS), name); -} - - -LUA_API int lua_gettable (lua_State *L, int idx) { - StkId t; - lua_lock(L); - t = index2addr(L, idx); - luaV_gettable(L, t, L->top - 1, L->top - 1); - lua_unlock(L); - return ttnov(L->top - 1); -} - - -LUA_API int lua_getfield (lua_State *L, int idx, const char *k) { - lua_lock(L); - return auxgetstr(L, index2addr(L, idx), k); -} - - -LUA_API int lua_geti (lua_State *L, int idx, lua_Integer n) { - StkId t; - const TValue *slot; - lua_lock(L); - t = index2addr(L, idx); - if (luaV_fastget(L, t, n, slot, luaH_getint)) { - setobj2s(L, L->top, slot); - api_incr_top(L); - } - else { - setivalue(L->top, n); - api_incr_top(L); - luaV_finishget(L, t, L->top - 1, L->top - 1, slot); - } - lua_unlock(L); - return ttnov(L->top - 1); -} - - -LUA_API int lua_rawget (lua_State *L, int idx) { - StkId t; - lua_lock(L); - t = index2addr(L, idx); - api_check(L, ttistable(t), "table expected"); - setobj2s(L, L->top - 1, luaH_get(hvalue(t), L->top - 1)); - lua_unlock(L); - return ttnov(L->top - 1); -} - - -LUA_API int lua_rawgeti (lua_State *L, int idx, lua_Integer n) { - StkId t; - lua_lock(L); - t = index2addr(L, idx); - api_check(L, ttistable(t), "table expected"); - setobj2s(L, L->top, luaH_getint(hvalue(t), n)); - api_incr_top(L); - lua_unlock(L); - return ttnov(L->top - 1); -} - - -LUA_API int lua_rawgetp (lua_State *L, int idx, const void *p) { - StkId t; - TValue k; - lua_lock(L); - t = index2addr(L, idx); - api_check(L, ttistable(t), "table expected"); - setpvalue(&k, cast(void *, p)); - setobj2s(L, L->top, luaH_get(hvalue(t), &k)); - api_incr_top(L); - lua_unlock(L); - return ttnov(L->top - 1); -} - - -LUA_API void lua_createtable (lua_State *L, int narray, int nrec) { - Table *t; - lua_lock(L); - t = luaH_new(L); - sethvalue(L, L->top, t); - api_incr_top(L); - if (narray > 0 || nrec > 0) - luaH_resize(L, t, narray, nrec); - luaC_checkGC(L); - lua_unlock(L); -} - - -LUA_API int lua_getmetatable (lua_State *L, int objindex) { - const TValue *obj; - Table *mt; - int res = 0; - lua_lock(L); - obj = index2addr(L, objindex); - switch (ttnov(obj)) { - case LUA_TTABLE: - mt = hvalue(obj)->metatable; - break; - case LUA_TUSERDATA: - mt = uvalue(obj)->metatable; - break; - default: - mt = G(L)->mt[ttnov(obj)]; - break; - } - if (mt != NULL) { - sethvalue(L, L->top, mt); - api_incr_top(L); - res = 1; - } - lua_unlock(L); - return res; -} - - -LUA_API int lua_getuservalue (lua_State *L, int idx) { - StkId o; - lua_lock(L); - o = index2addr(L, idx); - api_check(L, ttisfulluserdata(o), "full userdata expected"); - getuservalue(L, uvalue(o), L->top); - api_incr_top(L); - lua_unlock(L); - return ttnov(L->top - 1); -} - - -/* -** set functions (stack -> Lua) -*/ - -/* -** t[k] = value at the top of the stack (where 'k' is a string) -*/ -static void auxsetstr (lua_State *L, const TValue *t, const char *k) { - const TValue *slot; - TString *str = luaS_new(L, k); - api_checknelems(L, 1); - if (luaV_fastset(L, t, str, slot, luaH_getstr, L->top - 1)) - L->top--; /* pop value */ - else { - setsvalue2s(L, L->top, str); /* push 'str' (to make it a TValue) */ - api_incr_top(L); - luaV_finishset(L, t, L->top - 1, L->top - 2, slot); - L->top -= 2; /* pop value and key */ - } - lua_unlock(L); /* lock done by caller */ -} - - -LUA_API void lua_setglobal (lua_State *L, const char *name) { - Table *reg = hvalue(&G(L)->l_registry); - lua_lock(L); /* unlock done in 'auxsetstr' */ - auxsetstr(L, luaH_getint(reg, LUA_RIDX_GLOBALS), name); -} - - -LUA_API void lua_settable (lua_State *L, int idx) { - StkId t; - lua_lock(L); - api_checknelems(L, 2); - t = index2addr(L, idx); - luaV_settable(L, t, L->top - 2, L->top - 1); - L->top -= 2; /* pop index and value */ - lua_unlock(L); -} - - -LUA_API void lua_setfield (lua_State *L, int idx, const char *k) { - lua_lock(L); /* unlock done in 'auxsetstr' */ - auxsetstr(L, index2addr(L, idx), k); -} - - -LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) { - StkId t; - const TValue *slot; - lua_lock(L); - api_checknelems(L, 1); - t = index2addr(L, idx); - if (luaV_fastset(L, t, n, slot, luaH_getint, L->top - 1)) - L->top--; /* pop value */ - else { - setivalue(L->top, n); - api_incr_top(L); - luaV_finishset(L, t, L->top - 1, L->top - 2, slot); - L->top -= 2; /* pop value and key */ - } - lua_unlock(L); -} - - -LUA_API void lua_rawset (lua_State *L, int idx) { - StkId o; - TValue *slot; - lua_lock(L); - api_checknelems(L, 2); - o = index2addr(L, idx); - api_check(L, ttistable(o), "table expected"); - slot = luaH_set(L, hvalue(o), L->top - 2); - setobj2t(L, slot, L->top - 1); - invalidateTMcache(hvalue(o)); - luaC_barrierback(L, hvalue(o), L->top-1); - L->top -= 2; - lua_unlock(L); -} - - -LUA_API void lua_rawseti (lua_State *L, int idx, lua_Integer n) { - StkId o; - lua_lock(L); - api_checknelems(L, 1); - o = index2addr(L, idx); - api_check(L, ttistable(o), "table expected"); - luaH_setint(L, hvalue(o), n, L->top - 1); - luaC_barrierback(L, hvalue(o), L->top-1); - L->top--; - lua_unlock(L); -} - - -LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) { - StkId o; - TValue k, *slot; - lua_lock(L); - api_checknelems(L, 1); - o = index2addr(L, idx); - api_check(L, ttistable(o), "table expected"); - setpvalue(&k, cast(void *, p)); - slot = luaH_set(L, hvalue(o), &k); - setobj2t(L, slot, L->top - 1); - luaC_barrierback(L, hvalue(o), L->top - 1); - L->top--; - lua_unlock(L); -} - - -LUA_API int lua_setmetatable (lua_State *L, int objindex) { - TValue *obj; - Table *mt; - lua_lock(L); - api_checknelems(L, 1); - obj = index2addr(L, objindex); - if (ttisnil(L->top - 1)) - mt = NULL; - else { - api_check(L, ttistable(L->top - 1), "table expected"); - mt = hvalue(L->top - 1); - } - switch (ttnov(obj)) { - case LUA_TTABLE: { - hvalue(obj)->metatable = mt; - if (mt) { - luaC_objbarrier(L, gcvalue(obj), mt); - luaC_checkfinalizer(L, gcvalue(obj), mt); - } - break; - } - case LUA_TUSERDATA: { - uvalue(obj)->metatable = mt; - if (mt) { - luaC_objbarrier(L, uvalue(obj), mt); - luaC_checkfinalizer(L, gcvalue(obj), mt); - } - break; - } - default: { - G(L)->mt[ttnov(obj)] = mt; - break; - } - } - L->top--; - lua_unlock(L); - return 1; -} - - -LUA_API void lua_setuservalue (lua_State *L, int idx) { - StkId o; - lua_lock(L); - api_checknelems(L, 1); - o = index2addr(L, idx); - api_check(L, ttisfulluserdata(o), "full userdata expected"); - setuservalue(L, uvalue(o), L->top - 1); - luaC_barrier(L, gcvalue(o), L->top - 1); - L->top--; - lua_unlock(L); -} - - -/* -** 'load' and 'call' functions (run Lua code) -*/ - - -#define checkresults(L,na,nr) \ - api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na)), \ - "results from function overflow current stack size") - - -LUA_API void lua_callk (lua_State *L, int nargs, int nresults, - lua_KContext ctx, lua_KFunction k) { - StkId func; - lua_lock(L); - api_check(L, k == NULL || !isLua(L->ci), - "cannot use continuations inside hooks"); - api_checknelems(L, nargs+1); - api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread"); - checkresults(L, nargs, nresults); - func = L->top - (nargs+1); - if (k != NULL && L->nny == 0) { /* need to prepare continuation? */ - L->ci->u.c.k = k; /* save continuation */ - L->ci->u.c.ctx = ctx; /* save context */ - luaD_call(L, func, nresults); /* do the call */ - } - else /* no continuation or no yieldable */ - luaD_callnoyield(L, func, nresults); /* just do the call */ - adjustresults(L, nresults); - lua_unlock(L); -} - - - -/* -** Execute a protected call. -*/ -struct CallS { /* data to 'f_call' */ - StkId func; - int nresults; -}; - - -static void f_call (lua_State *L, void *ud) { - struct CallS *c = cast(struct CallS *, ud); - luaD_callnoyield(L, c->func, c->nresults); -} - - - -LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, - lua_KContext ctx, lua_KFunction k) { - struct CallS c; - int status; - ptrdiff_t func; - lua_lock(L); - api_check(L, k == NULL || !isLua(L->ci), - "cannot use continuations inside hooks"); - api_checknelems(L, nargs+1); - api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread"); - checkresults(L, nargs, nresults); - if (errfunc == 0) - func = 0; - else { - StkId o = index2addr(L, errfunc); - api_checkstackindex(L, errfunc, o); - func = savestack(L, o); - } - c.func = L->top - (nargs+1); /* function to be called */ - if (k == NULL || L->nny > 0) { /* no continuation or no yieldable? */ - c.nresults = nresults; /* do a 'conventional' protected call */ - status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func); - } - else { /* prepare continuation (call is already protected by 'resume') */ - CallInfo *ci = L->ci; - ci->u.c.k = k; /* save continuation */ - ci->u.c.ctx = ctx; /* save context */ - /* save information for error recovery */ - ci->extra = savestack(L, c.func); - ci->u.c.old_errfunc = L->errfunc; - L->errfunc = func; - setoah(ci->callstatus, L->allowhook); /* save value of 'allowhook' */ - ci->callstatus |= CIST_YPCALL; /* function can do error recovery */ - luaD_call(L, c.func, nresults); /* do the call */ - ci->callstatus &= ~CIST_YPCALL; - L->errfunc = ci->u.c.old_errfunc; - status = LUA_OK; /* if it is here, there were no errors */ - } - adjustresults(L, nresults); - lua_unlock(L); - return status; -} - - -LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, - const char *chunkname, const char *mode) { - ZIO z; - int status; - lua_lock(L); - if (!chunkname) chunkname = "?"; - luaZ_init(L, &z, reader, data); - status = luaD_protectedparser(L, &z, chunkname, mode); - if (status == LUA_OK) { /* no errors? */ - LClosure *f = clLvalue(L->top - 1); /* get newly created function */ - if (f->nupvalues >= 1) { /* does it have an upvalue? */ - /* get global table from registry */ - Table *reg = hvalue(&G(L)->l_registry); - const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS); - /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */ - setobj(L, f->upvals[0]->v, gt); - luaC_upvalbarrier(L, f->upvals[0]); - } - } - lua_unlock(L); - return status; -} - - -LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data, int strip) { - int status; - TValue *o; - lua_lock(L); - api_checknelems(L, 1); - o = L->top - 1; - if (isLfunction(o)) - status = luaU_dump(L, getproto(o), writer, data, strip); - else - status = 1; - lua_unlock(L); - return status; -} - - -LUA_API int lua_status (lua_State *L) { - return L->status; -} - - -/* -** Garbage-collection function -*/ - -LUA_API int lua_gc (lua_State *L, int what, int data) { - int res = 0; - global_State *g; - lua_lock(L); - g = G(L); - switch (what) { - case LUA_GCSTOP: { - g->gcrunning = 0; - break; - } - case LUA_GCRESTART: { - luaE_setdebt(g, 0); - g->gcrunning = 1; - break; - } - case LUA_GCCOLLECT: { - luaC_fullgc(L, 0); - break; - } - case LUA_GCCOUNT: { - /* GC values are expressed in Kbytes: #bytes/2^10 */ - res = cast_int(gettotalbytes(g) >> 10); - break; - } - case LUA_GCCOUNTB: { - res = cast_int(gettotalbytes(g) & 0x3ff); - break; - } - case LUA_GCSTEP: { - l_mem debt = 1; /* =1 to signal that it did an actual step */ - lu_byte oldrunning = g->gcrunning; - g->gcrunning = 1; /* allow GC to run */ - if (data == 0) { - luaE_setdebt(g, -GCSTEPSIZE); /* to do a "small" step */ - luaC_step(L); - } - else { /* add 'data' to total debt */ - debt = cast(l_mem, data) * 1024 + g->GCdebt; - luaE_setdebt(g, debt); - luaC_checkGC(L); - } - g->gcrunning = oldrunning; /* restore previous state */ - if (debt > 0 && g->gcstate == GCSpause) /* end of cycle? */ - res = 1; /* signal it */ - break; - } - case LUA_GCSETPAUSE: { - res = g->gcpause; - g->gcpause = data; - break; - } - case LUA_GCSETSTEPMUL: { - res = g->gcstepmul; - if (data < 40) data = 40; /* avoid ridiculous low values (and 0) */ - g->gcstepmul = data; - break; - } - case LUA_GCISRUNNING: { - res = g->gcrunning; - break; - } - default: res = -1; /* invalid option */ - } - lua_unlock(L); - return res; -} - - - -/* -** miscellaneous functions -*/ - - -LUA_API int lua_error (lua_State *L) { - lua_lock(L); - api_checknelems(L, 1); - luaG_errormsg(L); - /* code unreachable; will unlock when control actually leaves the kernel */ - return 0; /* to avoid warnings */ -} - - -LUA_API int lua_next (lua_State *L, int idx) { - StkId t; - int more; - lua_lock(L); - t = index2addr(L, idx); - api_check(L, ttistable(t), "table expected"); - more = luaH_next(L, hvalue(t), L->top - 1); - if (more) { - api_incr_top(L); - } - else /* no more elements */ - L->top -= 1; /* remove key */ - lua_unlock(L); - return more; -} - - -LUA_API void lua_concat (lua_State *L, int n) { - lua_lock(L); - api_checknelems(L, n); - if (n >= 2) { - luaV_concat(L, n); - } - else if (n == 0) { /* push empty string */ - setsvalue2s(L, L->top, luaS_newlstr(L, "", 0)); - api_incr_top(L); - } - /* else n == 1; nothing to do */ - luaC_checkGC(L); - lua_unlock(L); -} - - -LUA_API void lua_len (lua_State *L, int idx) { - StkId t; - lua_lock(L); - t = index2addr(L, idx); - luaV_objlen(L, L->top, t); - api_incr_top(L); - lua_unlock(L); -} - - -LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { - lua_Alloc f; - lua_lock(L); - if (ud) *ud = G(L)->ud; - f = G(L)->frealloc; - lua_unlock(L); - return f; -} - - -LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud) { - lua_lock(L); - G(L)->ud = ud; - G(L)->frealloc = f; - lua_unlock(L); -} - - -LUA_API void *lua_newuserdata (lua_State *L, size_t size) { - Udata *u; - lua_lock(L); - u = luaS_newudata(L, size); - setuvalue(L, L->top, u); - api_incr_top(L); - luaC_checkGC(L); - lua_unlock(L); - return getudatamem(u); -} - - - -static const char *aux_upvalue (StkId fi, int n, TValue **val, - CClosure **owner, UpVal **uv) { - switch (ttype(fi)) { - case LUA_TCCL: { /* C closure */ - CClosure *f = clCvalue(fi); - if (!(1 <= n && n <= f->nupvalues)) return NULL; - *val = &f->upvalue[n-1]; - if (owner) *owner = f; - return ""; - } - case LUA_TLCL: { /* Lua closure */ - LClosure *f = clLvalue(fi); - TString *name; - Proto *p = f->p; - if (!(1 <= n && n <= p->sizeupvalues)) return NULL; - *val = f->upvals[n-1]->v; - if (uv) *uv = f->upvals[n - 1]; - name = p->upvalues[n-1].name; - return (name == NULL) ? "(*no name)" : getstr(name); - } - default: return NULL; /* not a closure */ - } -} - - -LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) { - const char *name; - TValue *val = NULL; /* to avoid warnings */ - lua_lock(L); - name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL, NULL); - if (name) { - setobj2s(L, L->top, val); - api_incr_top(L); - } - lua_unlock(L); - return name; -} - - -LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { - const char *name; - TValue *val = NULL; /* to avoid warnings */ - CClosure *owner = NULL; - UpVal *uv = NULL; - StkId fi; - lua_lock(L); - fi = index2addr(L, funcindex); - api_checknelems(L, 1); - name = aux_upvalue(fi, n, &val, &owner, &uv); - if (name) { - L->top--; - setobj(L, val, L->top); - if (owner) { luaC_barrier(L, owner, L->top); } - else if (uv) { luaC_upvalbarrier(L, uv); } - } - lua_unlock(L); - return name; -} - - -static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) { - LClosure *f; - StkId fi = index2addr(L, fidx); - api_check(L, ttisLclosure(fi), "Lua function expected"); - f = clLvalue(fi); - api_check(L, (1 <= n && n <= f->p->sizeupvalues), "invalid upvalue index"); - if (pf) *pf = f; - return &f->upvals[n - 1]; /* get its upvalue pointer */ -} - - -LUA_API void *lua_upvalueid (lua_State *L, int fidx, int n) { - StkId fi = index2addr(L, fidx); - switch (ttype(fi)) { - case LUA_TLCL: { /* lua closure */ - return *getupvalref(L, fidx, n, NULL); - } - case LUA_TCCL: { /* C closure */ - CClosure *f = clCvalue(fi); - api_check(L, 1 <= n && n <= f->nupvalues, "invalid upvalue index"); - return &f->upvalue[n - 1]; - } - default: { - api_check(L, 0, "closure expected"); - return NULL; - } - } -} - - -LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1, - int fidx2, int n2) { - LClosure *f1; - UpVal **up1 = getupvalref(L, fidx1, n1, &f1); - UpVal **up2 = getupvalref(L, fidx2, n2, NULL); - luaC_upvdeccount(L, *up1); - *up1 = *up2; - (*up1)->refcount++; - if (upisopen(*up1)) (*up1)->u.open.touched = 1; - luaC_upvalbarrier(L, *up1); -} - - diff --git a/build/premake/premake5/contrib/lua/src/lapi.h b/build/premake/premake5/contrib/lua/src/lapi.h deleted file mode 100644 index 8e16ad53d9..0000000000 --- a/build/premake/premake5/contrib/lua/src/lapi.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -** $Id: lapi.h,v 2.9.1.1 2017/04/19 17:20:42 roberto Exp $ -** Auxiliary functions from Lua API -** See Copyright Notice in lua.h -*/ - -#ifndef lapi_h -#define lapi_h - - -#include "llimits.h" -#include "lstate.h" - -#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ - "stack overflow");} - -#define adjustresults(L,nres) \ - { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } - -#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ - "not enough elements in the stack") - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lauxlib.c b/build/premake/premake5/contrib/lua/src/lauxlib.c deleted file mode 100644 index 9fa7555c99..0000000000 --- a/build/premake/premake5/contrib/lua/src/lauxlib.c +++ /dev/null @@ -1,1043 +0,0 @@ -/* -** $Id: lauxlib.c,v 1.289.1.1 2017/04/19 17:20:42 roberto Exp $ -** Auxiliary functions for building Lua libraries -** See Copyright Notice in lua.h -*/ - -#define lauxlib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include -#include -#include - - -/* -** This file uses only the official API of Lua. -** Any function declared here could be written as an application function. -*/ - -#include "lua.h" - -#include "lauxlib.h" - - -/* -** {====================================================== -** Traceback -** ======================================================= -*/ - - -#define LEVELS1 10 /* size of the first part of the stack */ -#define LEVELS2 11 /* size of the second part of the stack */ - - - -/* -** search for 'objidx' in table at index -1. -** return 1 + string at top if find a good name. -*/ -static int findfield (lua_State *L, int objidx, int level) { - if (level == 0 || !lua_istable(L, -1)) - return 0; /* not found */ - lua_pushnil(L); /* start 'next' loop */ - while (lua_next(L, -2)) { /* for each pair in table */ - if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */ - if (lua_rawequal(L, objidx, -1)) { /* found object? */ - lua_pop(L, 1); /* remove value (but keep name) */ - return 1; - } - else if (findfield(L, objidx, level - 1)) { /* try recursively */ - lua_remove(L, -2); /* remove table (but keep name) */ - lua_pushliteral(L, "."); - lua_insert(L, -2); /* place '.' between the two names */ - lua_concat(L, 3); - return 1; - } - } - lua_pop(L, 1); /* remove value */ - } - return 0; /* not found */ -} - - -/* -** Search for a name for a function in all loaded modules -*/ -static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { - int top = lua_gettop(L); - lua_getinfo(L, "f", ar); /* push function */ - lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); - if (findfield(L, top + 1, 2)) { - const char *name = lua_tostring(L, -1); - if (strncmp(name, "_G.", 3) == 0) { /* name start with '_G.'? */ - lua_pushstring(L, name + 3); /* push name without prefix */ - lua_remove(L, -2); /* remove original name */ - } - lua_copy(L, -1, top + 1); /* move name to proper place */ - lua_pop(L, 2); /* remove pushed values */ - return 1; - } - else { - lua_settop(L, top); /* remove function and global table */ - return 0; - } -} - - -static void pushfuncname (lua_State *L, lua_Debug *ar) { - if (pushglobalfuncname(L, ar)) { /* try first a global name */ - lua_pushfstring(L, "function '%s'", lua_tostring(L, -1)); - lua_remove(L, -2); /* remove name */ - } - else if (*ar->namewhat != '\0') /* is there a name from code? */ - lua_pushfstring(L, "%s '%s'", ar->namewhat, ar->name); /* use it */ - else if (*ar->what == 'm') /* main? */ - lua_pushliteral(L, "main chunk"); - else if (*ar->what != 'C') /* for Lua functions, use */ - lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined); - else /* nothing left... */ - lua_pushliteral(L, "?"); -} - - -static int lastlevel (lua_State *L) { - lua_Debug ar; - int li = 1, le = 1; - /* find an upper bound */ - while (lua_getstack(L, le, &ar)) { li = le; le *= 2; } - /* do a binary search */ - while (li < le) { - int m = (li + le)/2; - if (lua_getstack(L, m, &ar)) li = m + 1; - else le = m; - } - return le - 1; -} - - -LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, - const char *msg, int level) { - lua_Debug ar; - int top = lua_gettop(L); - int last = lastlevel(L1); - int n1 = (last - level > LEVELS1 + LEVELS2) ? LEVELS1 : -1; - if (msg) - lua_pushfstring(L, "%s\n", msg); - luaL_checkstack(L, 10, NULL); - lua_pushliteral(L, "stack traceback:"); - while (lua_getstack(L1, level++, &ar)) { - if (n1-- == 0) { /* too many levels? */ - lua_pushliteral(L, "\n\t..."); /* add a '...' */ - level = last - LEVELS2 + 1; /* and skip to last ones */ - } - else { - lua_getinfo(L1, "Slnt", &ar); - lua_pushfstring(L, "\n\t%s:", ar.short_src); - if (ar.currentline > 0) - lua_pushfstring(L, "%d:", ar.currentline); - lua_pushliteral(L, " in "); - pushfuncname(L, &ar); - if (ar.istailcall) - lua_pushliteral(L, "\n\t(...tail calls...)"); - lua_concat(L, lua_gettop(L) - top); - } - } - lua_concat(L, lua_gettop(L) - top); -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Error-report functions -** ======================================================= -*/ - -LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) { - lua_Debug ar; - if (!lua_getstack(L, 0, &ar)) /* no stack frame? */ - return luaL_error(L, "bad argument #%d (%s)", arg, extramsg); - lua_getinfo(L, "n", &ar); - if (strcmp(ar.namewhat, "method") == 0) { - arg--; /* do not count 'self' */ - if (arg == 0) /* error is in the self argument itself? */ - return luaL_error(L, "calling '%s' on bad self (%s)", - ar.name, extramsg); - } - if (ar.name == NULL) - ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; - return luaL_error(L, "bad argument #%d to '%s' (%s)", - arg, ar.name, extramsg); -} - - -static int typeerror (lua_State *L, int arg, const char *tname) { - const char *msg; - const char *typearg; /* name for the type of the actual argument */ - if (luaL_getmetafield(L, arg, "__name") == LUA_TSTRING) - typearg = lua_tostring(L, -1); /* use the given type name */ - else if (lua_type(L, arg) == LUA_TLIGHTUSERDATA) - typearg = "light userdata"; /* special name for messages */ - else - typearg = luaL_typename(L, arg); /* standard name */ - msg = lua_pushfstring(L, "%s expected, got %s", tname, typearg); - return luaL_argerror(L, arg, msg); -} - - -static void tag_error (lua_State *L, int arg, int tag) { - typeerror(L, arg, lua_typename(L, tag)); -} - - -/* -** The use of 'lua_pushfstring' ensures this function does not -** need reserved stack space when called. -*/ -LUALIB_API void luaL_where (lua_State *L, int level) { - lua_Debug ar; - if (lua_getstack(L, level, &ar)) { /* check function at level */ - lua_getinfo(L, "Sl", &ar); /* get info about it */ - if (ar.currentline > 0) { /* is there info? */ - lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline); - return; - } - } - lua_pushfstring(L, ""); /* else, no information available... */ -} - - -/* -** Again, the use of 'lua_pushvfstring' ensures this function does -** not need reserved stack space when called. (At worst, it generates -** an error with "stack overflow" instead of the given message.) -*/ -LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) { - va_list argp; - va_start(argp, fmt); - luaL_where(L, 1); - lua_pushvfstring(L, fmt, argp); - va_end(argp); - lua_concat(L, 2); - return lua_error(L); -} - - -LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { - int en = errno; /* calls to Lua API may change this value */ - if (stat) { - lua_pushboolean(L, 1); - return 1; - } - else { - lua_pushnil(L); - if (fname) - lua_pushfstring(L, "%s: %s", fname, strerror(en)); - else - lua_pushstring(L, strerror(en)); - lua_pushinteger(L, en); - return 3; - } -} - - -#if !defined(l_inspectstat) /* { */ - -#if defined(LUA_USE_POSIX) - -#include - -/* -** use appropriate macros to interpret 'pclose' return status -*/ -#define l_inspectstat(stat,what) \ - if (WIFEXITED(stat)) { stat = WEXITSTATUS(stat); } \ - else if (WIFSIGNALED(stat)) { stat = WTERMSIG(stat); what = "signal"; } - -#else - -#define l_inspectstat(stat,what) /* no op */ - -#endif - -#endif /* } */ - - -LUALIB_API int luaL_execresult (lua_State *L, int stat) { - const char *what = "exit"; /* type of termination */ - if (stat == -1) /* error? */ - return luaL_fileresult(L, 0, NULL); - else { - l_inspectstat(stat, what); /* interpret result */ - if (*what == 'e' && stat == 0) /* successful termination? */ - lua_pushboolean(L, 1); - else - lua_pushnil(L); - lua_pushstring(L, what); - lua_pushinteger(L, stat); - return 3; /* return true/nil,what,code */ - } -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Userdata's metatable manipulation -** ======================================================= -*/ - -LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) { - if (luaL_getmetatable(L, tname) != LUA_TNIL) /* name already in use? */ - return 0; /* leave previous value on top, but return 0 */ - lua_pop(L, 1); - lua_createtable(L, 0, 2); /* create metatable */ - lua_pushstring(L, tname); - lua_setfield(L, -2, "__name"); /* metatable.__name = tname */ - lua_pushvalue(L, -1); - lua_setfield(L, LUA_REGISTRYINDEX, tname); /* registry.name = metatable */ - return 1; -} - - -LUALIB_API void luaL_setmetatable (lua_State *L, const char *tname) { - luaL_getmetatable(L, tname); - lua_setmetatable(L, -2); -} - - -LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) { - void *p = lua_touserdata(L, ud); - if (p != NULL) { /* value is a userdata? */ - if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ - luaL_getmetatable(L, tname); /* get correct metatable */ - if (!lua_rawequal(L, -1, -2)) /* not the same? */ - p = NULL; /* value is a userdata with wrong metatable */ - lua_pop(L, 2); /* remove both metatables */ - return p; - } - } - return NULL; /* value is not a userdata with a metatable */ -} - - -LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { - void *p = luaL_testudata(L, ud, tname); - if (p == NULL) typeerror(L, ud, tname); - return p; -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Argument check functions -** ======================================================= -*/ - -LUALIB_API int luaL_checkoption (lua_State *L, int arg, const char *def, - const char *const lst[]) { - const char *name = (def) ? luaL_optstring(L, arg, def) : - luaL_checkstring(L, arg); - int i; - for (i=0; lst[i]; i++) - if (strcmp(lst[i], name) == 0) - return i; - return luaL_argerror(L, arg, - lua_pushfstring(L, "invalid option '%s'", name)); -} - - -/* -** Ensures the stack has at least 'space' extra slots, raising an error -** if it cannot fulfill the request. (The error handling needs a few -** extra slots to format the error message. In case of an error without -** this extra space, Lua will generate the same 'stack overflow' error, -** but without 'msg'.) -*/ -LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { - if (!lua_checkstack(L, space)) { - if (msg) - luaL_error(L, "stack overflow (%s)", msg); - else - luaL_error(L, "stack overflow"); - } -} - - -LUALIB_API void luaL_checktype (lua_State *L, int arg, int t) { - if (lua_type(L, arg) != t) - tag_error(L, arg, t); -} - - -LUALIB_API void luaL_checkany (lua_State *L, int arg) { - if (lua_type(L, arg) == LUA_TNONE) - luaL_argerror(L, arg, "value expected"); -} - - -LUALIB_API const char *luaL_checklstring (lua_State *L, int arg, size_t *len) { - const char *s = lua_tolstring(L, arg, len); - if (!s) tag_error(L, arg, LUA_TSTRING); - return s; -} - - -LUALIB_API const char *luaL_optlstring (lua_State *L, int arg, - const char *def, size_t *len) { - if (lua_isnoneornil(L, arg)) { - if (len) - *len = (def ? strlen(def) : 0); - return def; - } - else return luaL_checklstring(L, arg, len); -} - - -LUALIB_API lua_Number luaL_checknumber (lua_State *L, int arg) { - int isnum; - lua_Number d = lua_tonumberx(L, arg, &isnum); - if (!isnum) - tag_error(L, arg, LUA_TNUMBER); - return d; -} - - -LUALIB_API lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number def) { - return luaL_opt(L, luaL_checknumber, arg, def); -} - - -static void interror (lua_State *L, int arg) { - if (lua_isnumber(L, arg)) - luaL_argerror(L, arg, "number has no integer representation"); - else - tag_error(L, arg, LUA_TNUMBER); -} - - -LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int arg) { - int isnum; - lua_Integer d = lua_tointegerx(L, arg, &isnum); - if (!isnum) { - interror(L, arg); - } - return d; -} - - -LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int arg, - lua_Integer def) { - return luaL_opt(L, luaL_checkinteger, arg, def); -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Generic Buffer manipulation -** ======================================================= -*/ - -/* userdata to box arbitrary data */ -typedef struct UBox { - void *box; - size_t bsize; -} UBox; - - -static void *resizebox (lua_State *L, int idx, size_t newsize) { - void *ud; - lua_Alloc allocf = lua_getallocf(L, &ud); - UBox *box = (UBox *)lua_touserdata(L, idx); - void *temp = allocf(ud, box->box, box->bsize, newsize); - if (temp == NULL && newsize > 0) { /* allocation error? */ - resizebox(L, idx, 0); /* free buffer */ - luaL_error(L, "not enough memory for buffer allocation"); - } - box->box = temp; - box->bsize = newsize; - return temp; -} - - -static int boxgc (lua_State *L) { - resizebox(L, 1, 0); - return 0; -} - - -static void *newbox (lua_State *L, size_t newsize) { - UBox *box = (UBox *)lua_newuserdata(L, sizeof(UBox)); - box->box = NULL; - box->bsize = 0; - if (luaL_newmetatable(L, "LUABOX")) { /* creating metatable? */ - lua_pushcfunction(L, boxgc); - lua_setfield(L, -2, "__gc"); /* metatable.__gc = boxgc */ - } - lua_setmetatable(L, -2); - return resizebox(L, -1, newsize); -} - - -/* -** check whether buffer is using a userdata on the stack as a temporary -** buffer -*/ -#define buffonstack(B) ((B)->b != (B)->initb) - - -/* -** returns a pointer to a free area with at least 'sz' bytes -*/ -LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) { - lua_State *L = B->L; - if (B->size - B->n < sz) { /* not enough space? */ - char *newbuff; - size_t newsize = B->size * 2; /* double buffer size */ - if (newsize - B->n < sz) /* not big enough? */ - newsize = B->n + sz; - if (newsize < B->n || newsize - B->n < sz) - luaL_error(L, "buffer too large"); - /* create larger buffer */ - if (buffonstack(B)) - newbuff = (char *)resizebox(L, -1, newsize); - else { /* no buffer yet */ - newbuff = (char *)newbox(L, newsize); - memcpy(newbuff, B->b, B->n * sizeof(char)); /* copy original content */ - } - B->b = newbuff; - B->size = newsize; - } - return &B->b[B->n]; -} - - -LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) { - if (l > 0) { /* avoid 'memcpy' when 's' can be NULL */ - char *b = luaL_prepbuffsize(B, l); - memcpy(b, s, l * sizeof(char)); - luaL_addsize(B, l); - } -} - - -LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s) { - luaL_addlstring(B, s, strlen(s)); -} - - -LUALIB_API void luaL_pushresult (luaL_Buffer *B) { - lua_State *L = B->L; - lua_pushlstring(L, B->b, B->n); - if (buffonstack(B)) { - resizebox(L, -2, 0); /* delete old buffer */ - lua_remove(L, -2); /* remove its header from the stack */ - } -} - - -LUALIB_API void luaL_pushresultsize (luaL_Buffer *B, size_t sz) { - luaL_addsize(B, sz); - luaL_pushresult(B); -} - - -LUALIB_API void luaL_addvalue (luaL_Buffer *B) { - lua_State *L = B->L; - size_t l; - const char *s = lua_tolstring(L, -1, &l); - if (buffonstack(B)) - lua_insert(L, -2); /* put value below buffer */ - luaL_addlstring(B, s, l); - lua_remove(L, (buffonstack(B)) ? -2 : -1); /* remove value */ -} - - -LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { - B->L = L; - B->b = B->initb; - B->n = 0; - B->size = LUAL_BUFFERSIZE; -} - - -LUALIB_API char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz) { - luaL_buffinit(L, B); - return luaL_prepbuffsize(B, sz); -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Reference system -** ======================================================= -*/ - -/* index of free-list header */ -#define freelist 0 - - -LUALIB_API int luaL_ref (lua_State *L, int t) { - int ref; - if (lua_isnil(L, -1)) { - lua_pop(L, 1); /* remove from stack */ - return LUA_REFNIL; /* 'nil' has a unique fixed reference */ - } - t = lua_absindex(L, t); - lua_rawgeti(L, t, freelist); /* get first free element */ - ref = (int)lua_tointeger(L, -1); /* ref = t[freelist] */ - lua_pop(L, 1); /* remove it from stack */ - if (ref != 0) { /* any free element? */ - lua_rawgeti(L, t, ref); /* remove it from list */ - lua_rawseti(L, t, freelist); /* (t[freelist] = t[ref]) */ - } - else /* no free elements */ - ref = (int)lua_rawlen(L, t) + 1; /* get a new reference */ - lua_rawseti(L, t, ref); - return ref; -} - - -LUALIB_API void luaL_unref (lua_State *L, int t, int ref) { - if (ref >= 0) { - t = lua_absindex(L, t); - lua_rawgeti(L, t, freelist); - lua_rawseti(L, t, ref); /* t[ref] = t[freelist] */ - lua_pushinteger(L, ref); - lua_rawseti(L, t, freelist); /* t[freelist] = ref */ - } -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Load functions -** ======================================================= -*/ - -typedef struct LoadF { - int n; /* number of pre-read characters */ - FILE *f; /* file being read */ - char buff[BUFSIZ]; /* area for reading file */ -} LoadF; - - -static const char *getF (lua_State *L, void *ud, size_t *size) { - LoadF *lf = (LoadF *)ud; - (void)L; /* not used */ - if (lf->n > 0) { /* are there pre-read characters to be read? */ - *size = lf->n; /* return them (chars already in buffer) */ - lf->n = 0; /* no more pre-read characters */ - } - else { /* read a block from file */ - /* 'fread' can return > 0 *and* set the EOF flag. If next call to - 'getF' called 'fread', it might still wait for user input. - The next check avoids this problem. */ - if (feof(lf->f)) return NULL; - *size = fread(lf->buff, 1, sizeof(lf->buff), lf->f); /* read block */ - } - return lf->buff; -} - - -static int errfile (lua_State *L, const char *what, int fnameindex) { - const char *serr = strerror(errno); - const char *filename = lua_tostring(L, fnameindex) + 1; - lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); - lua_remove(L, fnameindex); - return LUA_ERRFILE; -} - - -static int skipBOM (LoadF *lf) { - const char *p = "\xEF\xBB\xBF"; /* UTF-8 BOM mark */ - int c; - lf->n = 0; - do { - c = getc(lf->f); - if (c == EOF || c != *(const unsigned char *)p++) return c; - lf->buff[lf->n++] = (char)c; /* to be read by the parser */ - } while (*p != '\0'); - lf->n = 0; /* prefix matched; discard it */ - return getc(lf->f); /* return next character */ -} - - -/* -** reads the first character of file 'f' and skips an optional BOM mark -** in its beginning plus its first line if it starts with '#'. Returns -** true if it skipped the first line. In any case, '*cp' has the -** first "valid" character of the file (after the optional BOM and -** a first-line comment). -*/ -static int skipcomment (LoadF *lf, int *cp) { - int c = *cp = skipBOM(lf); - if (c == '#') { /* first line is a comment (Unix exec. file)? */ - do { /* skip first line */ - c = getc(lf->f); - } while (c != EOF && c != '\n'); - *cp = getc(lf->f); /* skip end-of-line, if present */ - return 1; /* there was a comment */ - } - else return 0; /* no comment */ -} - - -LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename, - const char *mode) { - LoadF lf; - int status, readstatus; - int c; - int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */ - if (filename == NULL) { - lua_pushliteral(L, "=stdin"); - lf.f = stdin; - } - else { - lua_pushfstring(L, "@%s", filename); - lf.f = fopen(filename, "r"); - if (lf.f == NULL) return errfile(L, "open", fnameindex); - } - if (skipcomment(&lf, &c)) /* read initial portion */ - lf.buff[lf.n++] = '\n'; /* add line to correct line numbers */ - if (c == LUA_SIGNATURE[0] && filename) { /* binary file? */ - lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */ - if (lf.f == NULL) return errfile(L, "reopen", fnameindex); - skipcomment(&lf, &c); /* re-read initial portion */ - } - if (c != EOF) - lf.buff[lf.n++] = (char)c; /* 'c' is the first character of the stream */ - status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode); - readstatus = ferror(lf.f); - if (filename) fclose(lf.f); /* close file (even in case of errors) */ - if (readstatus) { - lua_settop(L, fnameindex); /* ignore results from 'lua_load' */ - return errfile(L, "read", fnameindex); - } - lua_remove(L, fnameindex); - return status; -} - - -typedef struct LoadS { - const char *s; - size_t size; -} LoadS; - - -static const char *getS (lua_State *L, void *ud, size_t *size) { - LoadS *ls = (LoadS *)ud; - (void)L; /* not used */ - if (ls->size == 0) return NULL; - *size = ls->size; - ls->size = 0; - return ls->s; -} - - -LUALIB_API int luaL_loadbufferx (lua_State *L, const char *buff, size_t size, - const char *name, const char *mode) { - LoadS ls; - ls.s = buff; - ls.size = size; - return lua_load(L, getS, &ls, name, mode); -} - - -LUALIB_API int luaL_loadstring (lua_State *L, const char *s) { - return luaL_loadbuffer(L, s, strlen(s), s); -} - -/* }====================================================== */ - - - -LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) { - if (!lua_getmetatable(L, obj)) /* no metatable? */ - return LUA_TNIL; - else { - int tt; - lua_pushstring(L, event); - tt = lua_rawget(L, -2); - if (tt == LUA_TNIL) /* is metafield nil? */ - lua_pop(L, 2); /* remove metatable and metafield */ - else - lua_remove(L, -2); /* remove only metatable */ - return tt; /* return metafield type */ - } -} - - -LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) { - obj = lua_absindex(L, obj); - if (luaL_getmetafield(L, obj, event) == LUA_TNIL) /* no metafield? */ - return 0; - lua_pushvalue(L, obj); - lua_call(L, 1, 1); - return 1; -} - - -LUALIB_API lua_Integer luaL_len (lua_State *L, int idx) { - lua_Integer l; - int isnum; - lua_len(L, idx); - l = lua_tointegerx(L, -1, &isnum); - if (!isnum) - luaL_error(L, "object length is not an integer"); - lua_pop(L, 1); /* remove object */ - return l; -} - - -LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { - if (luaL_callmeta(L, idx, "__tostring")) { /* metafield? */ - if (!lua_isstring(L, -1)) - luaL_error(L, "'__tostring' must return a string"); - } - else { - switch (lua_type(L, idx)) { - case LUA_TNUMBER: { - if (lua_isinteger(L, idx)) - lua_pushfstring(L, "%I", (LUAI_UACINT)lua_tointeger(L, idx)); - else - lua_pushfstring(L, "%f", (LUAI_UACNUMBER)lua_tonumber(L, idx)); - break; - } - case LUA_TSTRING: - lua_pushvalue(L, idx); - break; - case LUA_TBOOLEAN: - lua_pushstring(L, (lua_toboolean(L, idx) ? "true" : "false")); - break; - case LUA_TNIL: - lua_pushliteral(L, "nil"); - break; - default: { - int tt = luaL_getmetafield(L, idx, "__name"); /* try name */ - const char *kind = (tt == LUA_TSTRING) ? lua_tostring(L, -1) : - luaL_typename(L, idx); - lua_pushfstring(L, "%s: %p", kind, lua_topointer(L, idx)); - if (tt != LUA_TNIL) - lua_remove(L, -2); /* remove '__name' */ - break; - } - } - } - return lua_tolstring(L, -1, len); -} - - -/* -** {====================================================== -** Compatibility with 5.1 module functions -** ======================================================= -*/ -#if defined(LUA_COMPAT_MODULE) - -static const char *luaL_findtable (lua_State *L, int idx, - const char *fname, int szhint) { - const char *e; - if (idx) lua_pushvalue(L, idx); - do { - e = strchr(fname, '.'); - if (e == NULL) e = fname + strlen(fname); - lua_pushlstring(L, fname, e - fname); - if (lua_rawget(L, -2) == LUA_TNIL) { /* no such field? */ - lua_pop(L, 1); /* remove this nil */ - lua_createtable(L, 0, (*e == '.' ? 1 : szhint)); /* new table for field */ - lua_pushlstring(L, fname, e - fname); - lua_pushvalue(L, -2); - lua_settable(L, -4); /* set new table into field */ - } - else if (!lua_istable(L, -1)) { /* field has a non-table value? */ - lua_pop(L, 2); /* remove table and value */ - return fname; /* return problematic part of the name */ - } - lua_remove(L, -2); /* remove previous table */ - fname = e + 1; - } while (*e == '.'); - return NULL; -} - - -/* -** Count number of elements in a luaL_Reg list. -*/ -static int libsize (const luaL_Reg *l) { - int size = 0; - for (; l && l->name; l++) size++; - return size; -} - - -/* -** Find or create a module table with a given name. The function -** first looks at the LOADED table and, if that fails, try a -** global variable with that name. In any case, leaves on the stack -** the module table. -*/ -LUALIB_API void luaL_pushmodule (lua_State *L, const char *modname, - int sizehint) { - luaL_findtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE, 1); - if (lua_getfield(L, -1, modname) != LUA_TTABLE) { /* no LOADED[modname]? */ - lua_pop(L, 1); /* remove previous result */ - /* try global variable (and create one if it does not exist) */ - lua_pushglobaltable(L); - if (luaL_findtable(L, 0, modname, sizehint) != NULL) - luaL_error(L, "name conflict for module '%s'", modname); - lua_pushvalue(L, -1); - lua_setfield(L, -3, modname); /* LOADED[modname] = new table */ - } - lua_remove(L, -2); /* remove LOADED table */ -} - - -LUALIB_API void luaL_openlib (lua_State *L, const char *libname, - const luaL_Reg *l, int nup) { - luaL_checkversion(L); - if (libname) { - luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ - lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ - } - if (l) - luaL_setfuncs(L, l, nup); - else - lua_pop(L, nup); /* remove upvalues */ -} - -#endif -/* }====================================================== */ - -/* -** set functions from list 'l' into table at top - 'nup'; each -** function gets the 'nup' elements at the top as upvalues. -** Returns with only the table at the stack. -*/ -LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { - luaL_checkstack(L, nup, "too many upvalues"); - for (; l->name != NULL; l++) { /* fill the table with given functions */ - int i; - for (i = 0; i < nup; i++) /* copy upvalues to the top */ - lua_pushvalue(L, -nup); - lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ - lua_setfield(L, -(nup + 2), l->name); - } - lua_pop(L, nup); /* remove upvalues */ -} - - -/* -** ensure that stack[idx][fname] has a table and push that table -** into the stack -*/ -LUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) { - if (lua_getfield(L, idx, fname) == LUA_TTABLE) - return 1; /* table already there */ - else { - lua_pop(L, 1); /* remove previous result */ - idx = lua_absindex(L, idx); - lua_newtable(L); - lua_pushvalue(L, -1); /* copy to be left at top */ - lua_setfield(L, idx, fname); /* assign new table to field */ - return 0; /* false, because did not find table there */ - } -} - - -/* -** Stripped-down 'require': After checking "loaded" table, calls 'openf' -** to open a module, registers the result in 'package.loaded' table and, -** if 'glb' is true, also registers the result in the global table. -** Leaves resulting module on the top. -*/ -LUALIB_API void luaL_requiref (lua_State *L, const char *modname, - lua_CFunction openf, int glb) { - luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); - lua_getfield(L, -1, modname); /* LOADED[modname] */ - if (!lua_toboolean(L, -1)) { /* package not already loaded? */ - lua_pop(L, 1); /* remove field */ - lua_pushcfunction(L, openf); - lua_pushstring(L, modname); /* argument to open function */ - lua_call(L, 1, 1); /* call 'openf' to open module */ - lua_pushvalue(L, -1); /* make copy of module (call result) */ - lua_setfield(L, -3, modname); /* LOADED[modname] = module */ - } - lua_remove(L, -2); /* remove LOADED table */ - if (glb) { - lua_pushvalue(L, -1); /* copy of module */ - lua_setglobal(L, modname); /* _G[modname] = module */ - } -} - - -LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p, - const char *r) { - const char *wild; - size_t l = strlen(p); - luaL_Buffer b; - luaL_buffinit(L, &b); - while ((wild = strstr(s, p)) != NULL) { - luaL_addlstring(&b, s, wild - s); /* push prefix */ - luaL_addstring(&b, r); /* push replacement in place of pattern */ - s = wild + l; /* continue after 'p' */ - } - luaL_addstring(&b, s); /* push last suffix */ - luaL_pushresult(&b); - return lua_tostring(L, -1); -} - - -static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { - (void)ud; (void)osize; /* not used */ - if (nsize == 0) { - free(ptr); - return NULL; - } - else - return realloc(ptr, nsize); -} - - -static int panic (lua_State *L) { - lua_writestringerror("PANIC: unprotected error in call to Lua API (%s)\n", - lua_tostring(L, -1)); - return 0; /* return to Lua to abort */ -} - - -LUALIB_API lua_State *luaL_newstate (void) { - lua_State *L = lua_newstate(l_alloc, NULL); - if (L) lua_atpanic(L, &panic); - return L; -} - - -LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) { - const lua_Number *v = lua_version(L); - if (sz != LUAL_NUMSIZES) /* check numeric types */ - luaL_error(L, "core and library have incompatible numeric types"); - if (v != lua_version(NULL)) - luaL_error(L, "multiple Lua VMs detected"); - else if (*v != ver) - luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", - (LUAI_UACNUMBER)ver, (LUAI_UACNUMBER)*v); -} - diff --git a/build/premake/premake5/contrib/lua/src/lauxlib.h b/build/premake/premake5/contrib/lua/src/lauxlib.h deleted file mode 100644 index 9857d3a835..0000000000 --- a/build/premake/premake5/contrib/lua/src/lauxlib.h +++ /dev/null @@ -1,264 +0,0 @@ -/* -** $Id: lauxlib.h,v 1.131.1.1 2017/04/19 17:20:42 roberto Exp $ -** Auxiliary functions for building Lua libraries -** See Copyright Notice in lua.h -*/ - - -#ifndef lauxlib_h -#define lauxlib_h - - -#include -#include - -#include "lua.h" - - - -/* extra error code for 'luaL_loadfilex' */ -#define LUA_ERRFILE (LUA_ERRERR+1) - - -/* key, in the registry, for table of loaded modules */ -#define LUA_LOADED_TABLE "_LOADED" - - -/* key, in the registry, for table of preloaded loaders */ -#define LUA_PRELOAD_TABLE "_PRELOAD" - - -typedef struct luaL_Reg { - const char *name; - lua_CFunction func; -} luaL_Reg; - - -#define LUAL_NUMSIZES (sizeof(lua_Integer)*16 + sizeof(lua_Number)) - -LUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver, size_t sz); -#define luaL_checkversion(L) \ - luaL_checkversion_(L, LUA_VERSION_NUM, LUAL_NUMSIZES) - -LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); -LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); -LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len); -LUALIB_API int (luaL_argerror) (lua_State *L, int arg, const char *extramsg); -LUALIB_API const char *(luaL_checklstring) (lua_State *L, int arg, - size_t *l); -LUALIB_API const char *(luaL_optlstring) (lua_State *L, int arg, - const char *def, size_t *l); -LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int arg); -LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int arg, lua_Number def); - -LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int arg); -LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int arg, - lua_Integer def); - -LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); -LUALIB_API void (luaL_checktype) (lua_State *L, int arg, int t); -LUALIB_API void (luaL_checkany) (lua_State *L, int arg); - -LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); -LUALIB_API void (luaL_setmetatable) (lua_State *L, const char *tname); -LUALIB_API void *(luaL_testudata) (lua_State *L, int ud, const char *tname); -LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); - -LUALIB_API void (luaL_where) (lua_State *L, int lvl); -LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); - -LUALIB_API int (luaL_checkoption) (lua_State *L, int arg, const char *def, - const char *const lst[]); - -LUALIB_API int (luaL_fileresult) (lua_State *L, int stat, const char *fname); -LUALIB_API int (luaL_execresult) (lua_State *L, int stat); - -/* predefined references */ -#define LUA_NOREF (-2) -#define LUA_REFNIL (-1) - -LUALIB_API int (luaL_ref) (lua_State *L, int t); -LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); - -LUALIB_API int (luaL_loadfilex) (lua_State *L, const char *filename, - const char *mode); - -#define luaL_loadfile(L,f) luaL_loadfilex(L,f,NULL) - -LUALIB_API int (luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, - const char *name, const char *mode); -LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); - -LUALIB_API lua_State *(luaL_newstate) (void); - -LUALIB_API lua_Integer (luaL_len) (lua_State *L, int idx); - -LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, - const char *r); - -LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup); - -LUALIB_API int (luaL_getsubtable) (lua_State *L, int idx, const char *fname); - -LUALIB_API void (luaL_traceback) (lua_State *L, lua_State *L1, - const char *msg, int level); - -LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, - lua_CFunction openf, int glb); - -/* -** =============================================================== -** some useful macros -** =============================================================== -*/ - - -#define luaL_newlibtable(L,l) \ - lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1) - -#define luaL_newlib(L,l) \ - (luaL_checkversion(L), luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) - -#define luaL_argcheck(L, cond,arg,extramsg) \ - ((void)((cond) || luaL_argerror(L, (arg), (extramsg)))) -#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) -#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) - -#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) - -#define luaL_dofile(L, fn) \ - (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) - -#define luaL_dostring(L, s) \ - (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) - -#define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) - -#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) - -#define luaL_loadbuffer(L,s,sz,n) luaL_loadbufferx(L,s,sz,n,NULL) - - -/* -** {====================================================== -** Generic Buffer manipulation -** ======================================================= -*/ - -typedef struct luaL_Buffer { - char *b; /* buffer address */ - size_t size; /* buffer size */ - size_t n; /* number of characters in buffer */ - lua_State *L; - char initb[LUAL_BUFFERSIZE]; /* initial buffer */ -} luaL_Buffer; - - -#define luaL_addchar(B,c) \ - ((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \ - ((B)->b[(B)->n++] = (c))) - -#define luaL_addsize(B,s) ((B)->n += (s)) - -LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); -LUALIB_API char *(luaL_prepbuffsize) (luaL_Buffer *B, size_t sz); -LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); -LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); -LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); -LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); -LUALIB_API void (luaL_pushresultsize) (luaL_Buffer *B, size_t sz); -LUALIB_API char *(luaL_buffinitsize) (lua_State *L, luaL_Buffer *B, size_t sz); - -#define luaL_prepbuffer(B) luaL_prepbuffsize(B, LUAL_BUFFERSIZE) - -/* }====================================================== */ - - - -/* -** {====================================================== -** File handles for IO library -** ======================================================= -*/ - -/* -** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and -** initial structure 'luaL_Stream' (it may contain other fields -** after that initial structure). -*/ - -#define LUA_FILEHANDLE "FILE*" - - -typedef struct luaL_Stream { - FILE *f; /* stream (NULL for incompletely created streams) */ - lua_CFunction closef; /* to close stream (NULL for closed streams) */ -} luaL_Stream; - -/* }====================================================== */ - - - -/* compatibility with old module system */ -#if defined(LUA_COMPAT_MODULE) - -LUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname, - int sizehint); -LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, - const luaL_Reg *l, int nup); - -#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0)) - -#endif - - -/* -** {================================================================== -** "Abstraction Layer" for basic report of messages and errors -** =================================================================== -*/ - -/* print a string */ -#if !defined(lua_writestring) -#define lua_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) -#endif - -/* print a newline and flush the output */ -#if !defined(lua_writeline) -#define lua_writeline() (lua_writestring("\n", 1), fflush(stdout)) -#endif - -/* print an error message */ -#if !defined(lua_writestringerror) -#define lua_writestringerror(s,p) \ - (fprintf(stderr, (s), (p)), fflush(stderr)) -#endif - -/* }================================================================== */ - - -/* -** {============================================================ -** Compatibility with deprecated conversions -** ============================================================= -*/ -#if defined(LUA_COMPAT_APIINTCASTS) - -#define luaL_checkunsigned(L,a) ((lua_Unsigned)luaL_checkinteger(L,a)) -#define luaL_optunsigned(L,a,d) \ - ((lua_Unsigned)luaL_optinteger(L,a,(lua_Integer)(d))) - -#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) -#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) - -#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) -#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) - -#endif -/* }============================================================ */ - - - -#endif - - diff --git a/build/premake/premake5/contrib/lua/src/lbaselib.c b/build/premake/premake5/contrib/lua/src/lbaselib.c deleted file mode 100644 index 6460e4f8d4..0000000000 --- a/build/premake/premake5/contrib/lua/src/lbaselib.c +++ /dev/null @@ -1,498 +0,0 @@ -/* -** $Id: lbaselib.c,v 1.314.1.1 2017/04/19 17:39:34 roberto Exp $ -** Basic library -** See Copyright Notice in lua.h -*/ - -#define lbaselib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -static int luaB_print (lua_State *L) { - int n = lua_gettop(L); /* number of arguments */ - int i; - lua_getglobal(L, "tostring"); - for (i=1; i<=n; i++) { - const char *s; - size_t l; - lua_pushvalue(L, -1); /* function to be called */ - lua_pushvalue(L, i); /* value to print */ - lua_call(L, 1, 1); - s = lua_tolstring(L, -1, &l); /* get result */ - if (s == NULL) - return luaL_error(L, "'tostring' must return a string to 'print'"); - if (i>1) lua_writestring("\t", 1); - lua_writestring(s, l); - lua_pop(L, 1); /* pop result */ - } - lua_writeline(); - return 0; -} - - -#define SPACECHARS " \f\n\r\t\v" - -static const char *b_str2int (const char *s, int base, lua_Integer *pn) { - lua_Unsigned n = 0; - int neg = 0; - s += strspn(s, SPACECHARS); /* skip initial spaces */ - if (*s == '-') { s++; neg = 1; } /* handle signal */ - else if (*s == '+') s++; - if (!isalnum((unsigned char)*s)) /* no digit? */ - return NULL; - do { - int digit = (isdigit((unsigned char)*s)) ? *s - '0' - : (toupper((unsigned char)*s) - 'A') + 10; - if (digit >= base) return NULL; /* invalid numeral */ - n = n * base + digit; - s++; - } while (isalnum((unsigned char)*s)); - s += strspn(s, SPACECHARS); /* skip trailing spaces */ - *pn = (lua_Integer)((neg) ? (0u - n) : n); - return s; -} - - -static int luaB_tonumber (lua_State *L) { - if (lua_isnoneornil(L, 2)) { /* standard conversion? */ - luaL_checkany(L, 1); - if (lua_type(L, 1) == LUA_TNUMBER) { /* already a number? */ - lua_settop(L, 1); /* yes; return it */ - return 1; - } - else { - size_t l; - const char *s = lua_tolstring(L, 1, &l); - if (s != NULL && lua_stringtonumber(L, s) == l + 1) - return 1; /* successful conversion to number */ - /* else not a number */ - } - } - else { - size_t l; - const char *s; - lua_Integer n = 0; /* to avoid warnings */ - lua_Integer base = luaL_checkinteger(L, 2); - luaL_checktype(L, 1, LUA_TSTRING); /* no numbers as strings */ - s = lua_tolstring(L, 1, &l); - luaL_argcheck(L, 2 <= base && base <= 36, 2, "base out of range"); - if (b_str2int(s, (int)base, &n) == s + l) { - lua_pushinteger(L, n); - return 1; - } /* else not a number */ - } /* else not a number */ - lua_pushnil(L); /* not a number */ - return 1; -} - - -static int luaB_error (lua_State *L) { - int level = (int)luaL_optinteger(L, 2, 1); - lua_settop(L, 1); - if (lua_type(L, 1) == LUA_TSTRING && level > 0) { - luaL_where(L, level); /* add extra information */ - lua_pushvalue(L, 1); - lua_concat(L, 2); - } - return lua_error(L); -} - - -static int luaB_getmetatable (lua_State *L) { - luaL_checkany(L, 1); - if (!lua_getmetatable(L, 1)) { - lua_pushnil(L); - return 1; /* no metatable */ - } - luaL_getmetafield(L, 1, "__metatable"); - return 1; /* returns either __metatable field (if present) or metatable */ -} - - -static int luaB_setmetatable (lua_State *L) { - int t = lua_type(L, 2); - luaL_checktype(L, 1, LUA_TTABLE); - luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2, - "nil or table expected"); - if (luaL_getmetafield(L, 1, "__metatable") != LUA_TNIL) - return luaL_error(L, "cannot change a protected metatable"); - lua_settop(L, 2); - lua_setmetatable(L, 1); - return 1; -} - - -static int luaB_rawequal (lua_State *L) { - luaL_checkany(L, 1); - luaL_checkany(L, 2); - lua_pushboolean(L, lua_rawequal(L, 1, 2)); - return 1; -} - - -static int luaB_rawlen (lua_State *L) { - int t = lua_type(L, 1); - luaL_argcheck(L, t == LUA_TTABLE || t == LUA_TSTRING, 1, - "table or string expected"); - lua_pushinteger(L, lua_rawlen(L, 1)); - return 1; -} - - -static int luaB_rawget (lua_State *L) { - luaL_checktype(L, 1, LUA_TTABLE); - luaL_checkany(L, 2); - lua_settop(L, 2); - lua_rawget(L, 1); - return 1; -} - -static int luaB_rawset (lua_State *L) { - luaL_checktype(L, 1, LUA_TTABLE); - luaL_checkany(L, 2); - luaL_checkany(L, 3); - lua_settop(L, 3); - lua_rawset(L, 1); - return 1; -} - - -static int luaB_collectgarbage (lua_State *L) { - static const char *const opts[] = {"stop", "restart", "collect", - "count", "step", "setpause", "setstepmul", - "isrunning", NULL}; - static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, - LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, - LUA_GCISRUNNING}; - int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; - int ex = (int)luaL_optinteger(L, 2, 0); - int res = lua_gc(L, o, ex); - switch (o) { - case LUA_GCCOUNT: { - int b = lua_gc(L, LUA_GCCOUNTB, 0); - lua_pushnumber(L, (lua_Number)res + ((lua_Number)b/1024)); - return 1; - } - case LUA_GCSTEP: case LUA_GCISRUNNING: { - lua_pushboolean(L, res); - return 1; - } - default: { - lua_pushinteger(L, res); - return 1; - } - } -} - - -static int luaB_type (lua_State *L) { - int t = lua_type(L, 1); - luaL_argcheck(L, t != LUA_TNONE, 1, "value expected"); - lua_pushstring(L, lua_typename(L, t)); - return 1; -} - - -static int pairsmeta (lua_State *L, const char *method, int iszero, - lua_CFunction iter) { - luaL_checkany(L, 1); - if (luaL_getmetafield(L, 1, method) == LUA_TNIL) { /* no metamethod? */ - lua_pushcfunction(L, iter); /* will return generator, */ - lua_pushvalue(L, 1); /* state, */ - if (iszero) lua_pushinteger(L, 0); /* and initial value */ - else lua_pushnil(L); - } - else { - lua_pushvalue(L, 1); /* argument 'self' to metamethod */ - lua_call(L, 1, 3); /* get 3 values from metamethod */ - } - return 3; -} - - -static int luaB_next (lua_State *L) { - luaL_checktype(L, 1, LUA_TTABLE); - lua_settop(L, 2); /* create a 2nd argument if there isn't one */ - if (lua_next(L, 1)) - return 2; - else { - lua_pushnil(L); - return 1; - } -} - - -static int luaB_pairs (lua_State *L) { - return pairsmeta(L, "__pairs", 0, luaB_next); -} - - -/* -** Traversal function for 'ipairs' -*/ -static int ipairsaux (lua_State *L) { - lua_Integer i = luaL_checkinteger(L, 2) + 1; - lua_pushinteger(L, i); - return (lua_geti(L, 1, i) == LUA_TNIL) ? 1 : 2; -} - - -/* -** 'ipairs' function. Returns 'ipairsaux', given "table", 0. -** (The given "table" may not be a table.) -*/ -static int luaB_ipairs (lua_State *L) { -#if defined(LUA_COMPAT_IPAIRS) - return pairsmeta(L, "__ipairs", 1, ipairsaux); -#else - luaL_checkany(L, 1); - lua_pushcfunction(L, ipairsaux); /* iteration function */ - lua_pushvalue(L, 1); /* state */ - lua_pushinteger(L, 0); /* initial value */ - return 3; -#endif -} - - -static int load_aux (lua_State *L, int status, int envidx) { - if (status == LUA_OK) { - if (envidx != 0) { /* 'env' parameter? */ - lua_pushvalue(L, envidx); /* environment for loaded function */ - if (!lua_setupvalue(L, -2, 1)) /* set it as 1st upvalue */ - lua_pop(L, 1); /* remove 'env' if not used by previous call */ - } - return 1; - } - else { /* error (message is on top of the stack) */ - lua_pushnil(L); - lua_insert(L, -2); /* put before error message */ - return 2; /* return nil plus error message */ - } -} - - -static int luaB_loadfile (lua_State *L) { - const char *fname = luaL_optstring(L, 1, NULL); - const char *mode = luaL_optstring(L, 2, NULL); - int env = (!lua_isnone(L, 3) ? 3 : 0); /* 'env' index or 0 if no 'env' */ - int status = luaL_loadfilex(L, fname, mode); - return load_aux(L, status, env); -} - - -/* -** {====================================================== -** Generic Read function -** ======================================================= -*/ - - -/* -** reserved slot, above all arguments, to hold a copy of the returned -** string to avoid it being collected while parsed. 'load' has four -** optional arguments (chunk, source name, mode, and environment). -*/ -#define RESERVEDSLOT 5 - - -/* -** Reader for generic 'load' function: 'lua_load' uses the -** stack for internal stuff, so the reader cannot change the -** stack top. Instead, it keeps its resulting string in a -** reserved slot inside the stack. -*/ -static const char *generic_reader (lua_State *L, void *ud, size_t *size) { - (void)(ud); /* not used */ - luaL_checkstack(L, 2, "too many nested functions"); - lua_pushvalue(L, 1); /* get function */ - lua_call(L, 0, 1); /* call it */ - if (lua_isnil(L, -1)) { - lua_pop(L, 1); /* pop result */ - *size = 0; - return NULL; - } - else if (!lua_isstring(L, -1)) - luaL_error(L, "reader function must return a string"); - lua_replace(L, RESERVEDSLOT); /* save string in reserved slot */ - return lua_tolstring(L, RESERVEDSLOT, size); -} - - -static int luaB_load (lua_State *L) { - int status; - size_t l; - const char *s = lua_tolstring(L, 1, &l); - const char *mode = luaL_optstring(L, 3, "bt"); - int env = (!lua_isnone(L, 4) ? 4 : 0); /* 'env' index or 0 if no 'env' */ - if (s != NULL) { /* loading a string? */ - const char *chunkname = luaL_optstring(L, 2, s); - status = luaL_loadbufferx(L, s, l, chunkname, mode); - } - else { /* loading from a reader function */ - const char *chunkname = luaL_optstring(L, 2, "=(load)"); - luaL_checktype(L, 1, LUA_TFUNCTION); - lua_settop(L, RESERVEDSLOT); /* create reserved slot */ - status = lua_load(L, generic_reader, NULL, chunkname, mode); - } - return load_aux(L, status, env); -} - -/* }====================================================== */ - - -static int dofilecont (lua_State *L, int d1, lua_KContext d2) { - (void)d1; (void)d2; /* only to match 'lua_Kfunction' prototype */ - return lua_gettop(L) - 1; -} - - -static int luaB_dofile (lua_State *L) { - const char *fname = luaL_optstring(L, 1, NULL); - lua_settop(L, 1); - if (luaL_loadfile(L, fname) != LUA_OK) - return lua_error(L); - lua_callk(L, 0, LUA_MULTRET, 0, dofilecont); - return dofilecont(L, 0, 0); -} - - -static int luaB_assert (lua_State *L) { - if (lua_toboolean(L, 1)) /* condition is true? */ - return lua_gettop(L); /* return all arguments */ - else { /* error */ - luaL_checkany(L, 1); /* there must be a condition */ - lua_remove(L, 1); /* remove it */ - lua_pushliteral(L, "assertion failed!"); /* default message */ - lua_settop(L, 1); /* leave only message (default if no other one) */ - return luaB_error(L); /* call 'error' */ - } -} - - -static int luaB_select (lua_State *L) { - int n = lua_gettop(L); - if (lua_type(L, 1) == LUA_TSTRING && *lua_tostring(L, 1) == '#') { - lua_pushinteger(L, n-1); - return 1; - } - else { - lua_Integer i = luaL_checkinteger(L, 1); - if (i < 0) i = n + i; - else if (i > n) i = n; - luaL_argcheck(L, 1 <= i, 1, "index out of range"); - return n - (int)i; - } -} - - -/* -** Continuation function for 'pcall' and 'xpcall'. Both functions -** already pushed a 'true' before doing the call, so in case of success -** 'finishpcall' only has to return everything in the stack minus -** 'extra' values (where 'extra' is exactly the number of items to be -** ignored). -*/ -static int finishpcall (lua_State *L, int status, lua_KContext extra) { - if (status != LUA_OK && status != LUA_YIELD) { /* error? */ - lua_pushboolean(L, 0); /* first result (false) */ - lua_pushvalue(L, -2); /* error message */ - return 2; /* return false, msg */ - } - else - return lua_gettop(L) - (int)extra; /* return all results */ -} - - -static int luaB_pcall (lua_State *L) { - int status; - luaL_checkany(L, 1); - lua_pushboolean(L, 1); /* first result if no errors */ - lua_insert(L, 1); /* put it in place */ - status = lua_pcallk(L, lua_gettop(L) - 2, LUA_MULTRET, 0, 0, finishpcall); - return finishpcall(L, status, 0); -} - - -/* -** Do a protected call with error handling. After 'lua_rotate', the -** stack will have ; so, the function passes -** 2 to 'finishpcall' to skip the 2 first values when returning results. -*/ -static int luaB_xpcall (lua_State *L) { - int status; - int n = lua_gettop(L); - luaL_checktype(L, 2, LUA_TFUNCTION); /* check error function */ - lua_pushboolean(L, 1); /* first result */ - lua_pushvalue(L, 1); /* function */ - lua_rotate(L, 3, 2); /* move them below function's arguments */ - status = lua_pcallk(L, n - 2, LUA_MULTRET, 2, 2, finishpcall); - return finishpcall(L, status, 2); -} - - -static int luaB_tostring (lua_State *L) { - luaL_checkany(L, 1); - luaL_tolstring(L, 1, NULL); - return 1; -} - - -static const luaL_Reg base_funcs[] = { - {"assert", luaB_assert}, - {"collectgarbage", luaB_collectgarbage}, - {"dofile", luaB_dofile}, - {"error", luaB_error}, - {"getmetatable", luaB_getmetatable}, - {"ipairs", luaB_ipairs}, - {"loadfile", luaB_loadfile}, - {"load", luaB_load}, -#if defined(LUA_COMPAT_LOADSTRING) - {"loadstring", luaB_load}, -#endif - {"next", luaB_next}, - {"pairs", luaB_pairs}, - {"pcall", luaB_pcall}, - {"print", luaB_print}, - {"rawequal", luaB_rawequal}, - {"rawlen", luaB_rawlen}, - {"rawget", luaB_rawget}, - {"rawset", luaB_rawset}, - {"select", luaB_select}, - {"setmetatable", luaB_setmetatable}, - {"tonumber", luaB_tonumber}, - {"tostring", luaB_tostring}, - {"type", luaB_type}, - {"xpcall", luaB_xpcall}, - /* placeholders */ - {"_G", NULL}, - {"_VERSION", NULL}, - {NULL, NULL} -}; - - -LUAMOD_API int luaopen_base (lua_State *L) { - /* open lib into global table */ - lua_pushglobaltable(L); - luaL_setfuncs(L, base_funcs, 0); - /* set global _G */ - lua_pushvalue(L, -1); - lua_setfield(L, -2, "_G"); - /* set global _VERSION */ - lua_pushliteral(L, LUA_VERSION); - lua_setfield(L, -2, "_VERSION"); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/lbitlib.c b/build/premake/premake5/contrib/lua/src/lbitlib.c deleted file mode 100644 index 4786c0d483..0000000000 --- a/build/premake/premake5/contrib/lua/src/lbitlib.c +++ /dev/null @@ -1,233 +0,0 @@ -/* -** $Id: lbitlib.c,v 1.30.1.1 2017/04/19 17:20:42 roberto Exp $ -** Standard library for bitwise operations -** See Copyright Notice in lua.h -*/ - -#define lbitlib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -#if defined(LUA_COMPAT_BITLIB) /* { */ - - -#define pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n)) -#define checkunsigned(L,i) ((lua_Unsigned)luaL_checkinteger(L,i)) - - -/* number of bits to consider in a number */ -#if !defined(LUA_NBITS) -#define LUA_NBITS 32 -#endif - - -/* -** a lua_Unsigned with its first LUA_NBITS bits equal to 1. (Shift must -** be made in two parts to avoid problems when LUA_NBITS is equal to the -** number of bits in a lua_Unsigned.) -*/ -#define ALLONES (~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1)) - - -/* macro to trim extra bits */ -#define trim(x) ((x) & ALLONES) - - -/* builds a number with 'n' ones (1 <= n <= LUA_NBITS) */ -#define mask(n) (~((ALLONES << 1) << ((n) - 1))) - - - -static lua_Unsigned andaux (lua_State *L) { - int i, n = lua_gettop(L); - lua_Unsigned r = ~(lua_Unsigned)0; - for (i = 1; i <= n; i++) - r &= checkunsigned(L, i); - return trim(r); -} - - -static int b_and (lua_State *L) { - lua_Unsigned r = andaux(L); - pushunsigned(L, r); - return 1; -} - - -static int b_test (lua_State *L) { - lua_Unsigned r = andaux(L); - lua_pushboolean(L, r != 0); - return 1; -} - - -static int b_or (lua_State *L) { - int i, n = lua_gettop(L); - lua_Unsigned r = 0; - for (i = 1; i <= n; i++) - r |= checkunsigned(L, i); - pushunsigned(L, trim(r)); - return 1; -} - - -static int b_xor (lua_State *L) { - int i, n = lua_gettop(L); - lua_Unsigned r = 0; - for (i = 1; i <= n; i++) - r ^= checkunsigned(L, i); - pushunsigned(L, trim(r)); - return 1; -} - - -static int b_not (lua_State *L) { - lua_Unsigned r = ~checkunsigned(L, 1); - pushunsigned(L, trim(r)); - return 1; -} - - -static int b_shift (lua_State *L, lua_Unsigned r, lua_Integer i) { - if (i < 0) { /* shift right? */ - i = -i; - r = trim(r); - if (i >= LUA_NBITS) r = 0; - else r >>= i; - } - else { /* shift left */ - if (i >= LUA_NBITS) r = 0; - else r <<= i; - r = trim(r); - } - pushunsigned(L, r); - return 1; -} - - -static int b_lshift (lua_State *L) { - return b_shift(L, checkunsigned(L, 1), luaL_checkinteger(L, 2)); -} - - -static int b_rshift (lua_State *L) { - return b_shift(L, checkunsigned(L, 1), -luaL_checkinteger(L, 2)); -} - - -static int b_arshift (lua_State *L) { - lua_Unsigned r = checkunsigned(L, 1); - lua_Integer i = luaL_checkinteger(L, 2); - if (i < 0 || !(r & ((lua_Unsigned)1 << (LUA_NBITS - 1)))) - return b_shift(L, r, -i); - else { /* arithmetic shift for 'negative' number */ - if (i >= LUA_NBITS) r = ALLONES; - else - r = trim((r >> i) | ~(trim(~(lua_Unsigned)0) >> i)); /* add signal bit */ - pushunsigned(L, r); - return 1; - } -} - - -static int b_rot (lua_State *L, lua_Integer d) { - lua_Unsigned r = checkunsigned(L, 1); - int i = d & (LUA_NBITS - 1); /* i = d % NBITS */ - r = trim(r); - if (i != 0) /* avoid undefined shift of LUA_NBITS when i == 0 */ - r = (r << i) | (r >> (LUA_NBITS - i)); - pushunsigned(L, trim(r)); - return 1; -} - - -static int b_lrot (lua_State *L) { - return b_rot(L, luaL_checkinteger(L, 2)); -} - - -static int b_rrot (lua_State *L) { - return b_rot(L, -luaL_checkinteger(L, 2)); -} - - -/* -** get field and width arguments for field-manipulation functions, -** checking whether they are valid. -** ('luaL_error' called without 'return' to avoid later warnings about -** 'width' being used uninitialized.) -*/ -static int fieldargs (lua_State *L, int farg, int *width) { - lua_Integer f = luaL_checkinteger(L, farg); - lua_Integer w = luaL_optinteger(L, farg + 1, 1); - luaL_argcheck(L, 0 <= f, farg, "field cannot be negative"); - luaL_argcheck(L, 0 < w, farg + 1, "width must be positive"); - if (f + w > LUA_NBITS) - luaL_error(L, "trying to access non-existent bits"); - *width = (int)w; - return (int)f; -} - - -static int b_extract (lua_State *L) { - int w; - lua_Unsigned r = trim(checkunsigned(L, 1)); - int f = fieldargs(L, 2, &w); - r = (r >> f) & mask(w); - pushunsigned(L, r); - return 1; -} - - -static int b_replace (lua_State *L) { - int w; - lua_Unsigned r = trim(checkunsigned(L, 1)); - lua_Unsigned v = trim(checkunsigned(L, 2)); - int f = fieldargs(L, 3, &w); - lua_Unsigned m = mask(w); - r = (r & ~(m << f)) | ((v & m) << f); - pushunsigned(L, r); - return 1; -} - - -static const luaL_Reg bitlib[] = { - {"arshift", b_arshift}, - {"band", b_and}, - {"bnot", b_not}, - {"bor", b_or}, - {"bxor", b_xor}, - {"btest", b_test}, - {"extract", b_extract}, - {"lrotate", b_lrot}, - {"lshift", b_lshift}, - {"replace", b_replace}, - {"rrotate", b_rrot}, - {"rshift", b_rshift}, - {NULL, NULL} -}; - - - -LUAMOD_API int luaopen_bit32 (lua_State *L) { - luaL_newlib(L, bitlib); - return 1; -} - - -#else /* }{ */ - - -LUAMOD_API int luaopen_bit32 (lua_State *L) { - return luaL_error(L, "library 'bit32' has been deprecated"); -} - -#endif /* } */ diff --git a/build/premake/premake5/contrib/lua/src/lcode.c b/build/premake/premake5/contrib/lua/src/lcode.c deleted file mode 100644 index 12619f54a0..0000000000 --- a/build/premake/premake5/contrib/lua/src/lcode.c +++ /dev/null @@ -1,1203 +0,0 @@ -/* -** $Id: lcode.c,v 2.112.1.1 2017/04/19 17:20:42 roberto Exp $ -** Code generator for Lua -** See Copyright Notice in lua.h -*/ - -#define lcode_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include - -#include "lua.h" - -#include "lcode.h" -#include "ldebug.h" -#include "ldo.h" -#include "lgc.h" -#include "llex.h" -#include "lmem.h" -#include "lobject.h" -#include "lopcodes.h" -#include "lparser.h" -#include "lstring.h" -#include "ltable.h" -#include "lvm.h" - - -/* Maximum number of registers in a Lua function (must fit in 8 bits) */ -#define MAXREGS 255 - - -#define hasjumps(e) ((e)->t != (e)->f) - - -/* -** If expression is a numeric constant, fills 'v' with its value -** and returns 1. Otherwise, returns 0. -*/ -static int tonumeral(const expdesc *e, TValue *v) { - if (hasjumps(e)) - return 0; /* not a numeral */ - switch (e->k) { - case VKINT: - if (v) setivalue(v, e->u.ival); - return 1; - case VKFLT: - if (v) setfltvalue(v, e->u.nval); - return 1; - default: return 0; - } -} - - -/* -** Create a OP_LOADNIL instruction, but try to optimize: if the previous -** instruction is also OP_LOADNIL and ranges are compatible, adjust -** range of previous instruction instead of emitting a new one. (For -** instance, 'local a; local b' will generate a single opcode.) -*/ -void luaK_nil (FuncState *fs, int from, int n) { - Instruction *previous; - int l = from + n - 1; /* last register to set nil */ - if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ - previous = &fs->f->code[fs->pc-1]; - if (GET_OPCODE(*previous) == OP_LOADNIL) { /* previous is LOADNIL? */ - int pfrom = GETARG_A(*previous); /* get previous range */ - int pl = pfrom + GETARG_B(*previous); - if ((pfrom <= from && from <= pl + 1) || - (from <= pfrom && pfrom <= l + 1)) { /* can connect both? */ - if (pfrom < from) from = pfrom; /* from = min(from, pfrom) */ - if (pl > l) l = pl; /* l = max(l, pl) */ - SETARG_A(*previous, from); - SETARG_B(*previous, l - from); - return; - } - } /* else go through */ - } - luaK_codeABC(fs, OP_LOADNIL, from, n - 1, 0); /* else no optimization */ -} - - -/* -** Gets the destination address of a jump instruction. Used to traverse -** a list of jumps. -*/ -static int getjump (FuncState *fs, int pc) { - int offset = GETARG_sBx(fs->f->code[pc]); - if (offset == NO_JUMP) /* point to itself represents end of list */ - return NO_JUMP; /* end of list */ - else - return (pc+1)+offset; /* turn offset into absolute position */ -} - - -/* -** Fix jump instruction at position 'pc' to jump to 'dest'. -** (Jump addresses are relative in Lua) -*/ -static void fixjump (FuncState *fs, int pc, int dest) { - Instruction *jmp = &fs->f->code[pc]; - int offset = dest - (pc + 1); - lua_assert(dest != NO_JUMP); - if (abs(offset) > MAXARG_sBx) - luaX_syntaxerror(fs->ls, "control structure too long"); - SETARG_sBx(*jmp, offset); -} - - -/* -** Concatenate jump-list 'l2' into jump-list 'l1' -*/ -void luaK_concat (FuncState *fs, int *l1, int l2) { - if (l2 == NO_JUMP) return; /* nothing to concatenate? */ - else if (*l1 == NO_JUMP) /* no original list? */ - *l1 = l2; /* 'l1' points to 'l2' */ - else { - int list = *l1; - int next; - while ((next = getjump(fs, list)) != NO_JUMP) /* find last element */ - list = next; - fixjump(fs, list, l2); /* last element links to 'l2' */ - } -} - - -/* -** Create a jump instruction and return its position, so its destination -** can be fixed later (with 'fixjump'). If there are jumps to -** this position (kept in 'jpc'), link them all together so that -** 'patchlistaux' will fix all them directly to the final destination. -*/ -int luaK_jump (FuncState *fs) { - int jpc = fs->jpc; /* save list of jumps to here */ - int j; - fs->jpc = NO_JUMP; /* no more jumps to here */ - j = luaK_codeAsBx(fs, OP_JMP, 0, NO_JUMP); - luaK_concat(fs, &j, jpc); /* keep them on hold */ - return j; -} - - -/* -** Code a 'return' instruction -*/ -void luaK_ret (FuncState *fs, int first, int nret) { - luaK_codeABC(fs, OP_RETURN, first, nret+1, 0); -} - - -/* -** Code a "conditional jump", that is, a test or comparison opcode -** followed by a jump. Return jump position. -*/ -static int condjump (FuncState *fs, OpCode op, int A, int B, int C) { - luaK_codeABC(fs, op, A, B, C); - return luaK_jump(fs); -} - - -/* -** returns current 'pc' and marks it as a jump target (to avoid wrong -** optimizations with consecutive instructions not in the same basic block). -*/ -int luaK_getlabel (FuncState *fs) { - fs->lasttarget = fs->pc; - return fs->pc; -} - - -/* -** Returns the position of the instruction "controlling" a given -** jump (that is, its condition), or the jump itself if it is -** unconditional. -*/ -static Instruction *getjumpcontrol (FuncState *fs, int pc) { - Instruction *pi = &fs->f->code[pc]; - if (pc >= 1 && testTMode(GET_OPCODE(*(pi-1)))) - return pi-1; - else - return pi; -} - - -/* -** Patch destination register for a TESTSET instruction. -** If instruction in position 'node' is not a TESTSET, return 0 ("fails"). -** Otherwise, if 'reg' is not 'NO_REG', set it as the destination -** register. Otherwise, change instruction to a simple 'TEST' (produces -** no register value) -*/ -static int patchtestreg (FuncState *fs, int node, int reg) { - Instruction *i = getjumpcontrol(fs, node); - if (GET_OPCODE(*i) != OP_TESTSET) - return 0; /* cannot patch other instructions */ - if (reg != NO_REG && reg != GETARG_B(*i)) - SETARG_A(*i, reg); - else { - /* no register to put value or register already has the value; - change instruction to simple test */ - *i = CREATE_ABC(OP_TEST, GETARG_B(*i), 0, GETARG_C(*i)); - } - return 1; -} - - -/* -** Traverse a list of tests ensuring no one produces a value -*/ -static void removevalues (FuncState *fs, int list) { - for (; list != NO_JUMP; list = getjump(fs, list)) - patchtestreg(fs, list, NO_REG); -} - - -/* -** Traverse a list of tests, patching their destination address and -** registers: tests producing values jump to 'vtarget' (and put their -** values in 'reg'), other tests jump to 'dtarget'. -*/ -static void patchlistaux (FuncState *fs, int list, int vtarget, int reg, - int dtarget) { - while (list != NO_JUMP) { - int next = getjump(fs, list); - if (patchtestreg(fs, list, reg)) - fixjump(fs, list, vtarget); - else - fixjump(fs, list, dtarget); /* jump to default target */ - list = next; - } -} - - -/* -** Ensure all pending jumps to current position are fixed (jumping -** to current position with no values) and reset list of pending -** jumps -*/ -static void dischargejpc (FuncState *fs) { - patchlistaux(fs, fs->jpc, fs->pc, NO_REG, fs->pc); - fs->jpc = NO_JUMP; -} - - -/* -** Add elements in 'list' to list of pending jumps to "here" -** (current position) -*/ -void luaK_patchtohere (FuncState *fs, int list) { - luaK_getlabel(fs); /* mark "here" as a jump target */ - luaK_concat(fs, &fs->jpc, list); -} - - -/* -** Path all jumps in 'list' to jump to 'target'. -** (The assert means that we cannot fix a jump to a forward address -** because we only know addresses once code is generated.) -*/ -void luaK_patchlist (FuncState *fs, int list, int target) { - if (target == fs->pc) /* 'target' is current position? */ - luaK_patchtohere(fs, list); /* add list to pending jumps */ - else { - lua_assert(target < fs->pc); - patchlistaux(fs, list, target, NO_REG, target); - } -} - - -/* -** Path all jumps in 'list' to close upvalues up to given 'level' -** (The assertion checks that jumps either were closing nothing -** or were closing higher levels, from inner blocks.) -*/ -void luaK_patchclose (FuncState *fs, int list, int level) { - level++; /* argument is +1 to reserve 0 as non-op */ - for (; list != NO_JUMP; list = getjump(fs, list)) { - lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP && - (GETARG_A(fs->f->code[list]) == 0 || - GETARG_A(fs->f->code[list]) >= level)); - SETARG_A(fs->f->code[list], level); - } -} - - -/* -** Emit instruction 'i', checking for array sizes and saving also its -** line information. Return 'i' position. -*/ -static int luaK_code (FuncState *fs, Instruction i) { - Proto *f = fs->f; - dischargejpc(fs); /* 'pc' will change */ - /* put new instruction in code array */ - luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction, - MAX_INT, "opcodes"); - f->code[fs->pc] = i; - /* save corresponding line information */ - luaM_growvector(fs->ls->L, f->lineinfo, fs->pc, f->sizelineinfo, int, - MAX_INT, "opcodes"); - f->lineinfo[fs->pc] = fs->ls->lastline; - return fs->pc++; -} - - -/* -** Format and emit an 'iABC' instruction. (Assertions check consistency -** of parameters versus opcode.) -*/ -int luaK_codeABC (FuncState *fs, OpCode o, int a, int b, int c) { - lua_assert(getOpMode(o) == iABC); - lua_assert(getBMode(o) != OpArgN || b == 0); - lua_assert(getCMode(o) != OpArgN || c == 0); - lua_assert(a <= MAXARG_A && b <= MAXARG_B && c <= MAXARG_C); - return luaK_code(fs, CREATE_ABC(o, a, b, c)); -} - - -/* -** Format and emit an 'iABx' instruction. -*/ -int luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) { - lua_assert(getOpMode(o) == iABx || getOpMode(o) == iAsBx); - lua_assert(getCMode(o) == OpArgN); - lua_assert(a <= MAXARG_A && bc <= MAXARG_Bx); - return luaK_code(fs, CREATE_ABx(o, a, bc)); -} - - -/* -** Emit an "extra argument" instruction (format 'iAx') -*/ -static int codeextraarg (FuncState *fs, int a) { - lua_assert(a <= MAXARG_Ax); - return luaK_code(fs, CREATE_Ax(OP_EXTRAARG, a)); -} - - -/* -** Emit a "load constant" instruction, using either 'OP_LOADK' -** (if constant index 'k' fits in 18 bits) or an 'OP_LOADKX' -** instruction with "extra argument". -*/ -int luaK_codek (FuncState *fs, int reg, int k) { - if (k <= MAXARG_Bx) - return luaK_codeABx(fs, OP_LOADK, reg, k); - else { - int p = luaK_codeABx(fs, OP_LOADKX, reg, 0); - codeextraarg(fs, k); - return p; - } -} - - -/* -** Check register-stack level, keeping track of its maximum size -** in field 'maxstacksize' -*/ -void luaK_checkstack (FuncState *fs, int n) { - int newstack = fs->freereg + n; - if (newstack > fs->f->maxstacksize) { - if (newstack >= MAXREGS) - luaX_syntaxerror(fs->ls, - "function or expression needs too many registers"); - fs->f->maxstacksize = cast_byte(newstack); - } -} - - -/* -** Reserve 'n' registers in register stack -*/ -void luaK_reserveregs (FuncState *fs, int n) { - luaK_checkstack(fs, n); - fs->freereg += n; -} - - -/* -** Free register 'reg', if it is neither a constant index nor -** a local variable. -) -*/ -static void freereg (FuncState *fs, int reg) { - if (!ISK(reg) && reg >= fs->nactvar) { - fs->freereg--; - lua_assert(reg == fs->freereg); - } -} - - -/* -** Free register used by expression 'e' (if any) -*/ -static void freeexp (FuncState *fs, expdesc *e) { - if (e->k == VNONRELOC) - freereg(fs, e->u.info); -} - - -/* -** Free registers used by expressions 'e1' and 'e2' (if any) in proper -** order. -*/ -static void freeexps (FuncState *fs, expdesc *e1, expdesc *e2) { - int r1 = (e1->k == VNONRELOC) ? e1->u.info : -1; - int r2 = (e2->k == VNONRELOC) ? e2->u.info : -1; - if (r1 > r2) { - freereg(fs, r1); - freereg(fs, r2); - } - else { - freereg(fs, r2); - freereg(fs, r1); - } -} - - -/* -** Add constant 'v' to prototype's list of constants (field 'k'). -** Use scanner's table to cache position of constants in constant list -** and try to reuse constants. Because some values should not be used -** as keys (nil cannot be a key, integer keys can collapse with float -** keys), the caller must provide a useful 'key' for indexing the cache. -*/ -static int addk (FuncState *fs, TValue *key, TValue *v) { - lua_State *L = fs->ls->L; - Proto *f = fs->f; - TValue *idx = luaH_set(L, fs->ls->h, key); /* index scanner table */ - int k, oldsize; - if (ttisinteger(idx)) { /* is there an index there? */ - k = cast_int(ivalue(idx)); - /* correct value? (warning: must distinguish floats from integers!) */ - if (k < fs->nk && ttype(&f->k[k]) == ttype(v) && - luaV_rawequalobj(&f->k[k], v)) - return k; /* reuse index */ - } - /* constant not found; create a new entry */ - oldsize = f->sizek; - k = fs->nk; - /* numerical value does not need GC barrier; - table has no metatable, so it does not need to invalidate cache */ - setivalue(idx, k); - luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Ax, "constants"); - while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]); - setobj(L, &f->k[k], v); - fs->nk++; - luaC_barrier(L, f, v); - return k; -} - - -/* -** Add a string to list of constants and return its index. -*/ -int luaK_stringK (FuncState *fs, TString *s) { - TValue o; - setsvalue(fs->ls->L, &o, s); - return addk(fs, &o, &o); /* use string itself as key */ -} - - -/* -** Add an integer to list of constants and return its index. -** Integers use userdata as keys to avoid collision with floats with -** same value; conversion to 'void*' is used only for hashing, so there -** are no "precision" problems. -*/ -int luaK_intK (FuncState *fs, lua_Integer n) { - TValue k, o; - setpvalue(&k, cast(void*, cast(size_t, n))); - setivalue(&o, n); - return addk(fs, &k, &o); -} - -/* -** Add a float to list of constants and return its index. -*/ -static int luaK_numberK (FuncState *fs, lua_Number r) { - TValue o; - setfltvalue(&o, r); - return addk(fs, &o, &o); /* use number itself as key */ -} - - -/* -** Add a boolean to list of constants and return its index. -*/ -static int boolK (FuncState *fs, int b) { - TValue o; - setbvalue(&o, b); - return addk(fs, &o, &o); /* use boolean itself as key */ -} - - -/* -** Add nil to list of constants and return its index. -*/ -static int nilK (FuncState *fs) { - TValue k, v; - setnilvalue(&v); - /* cannot use nil as key; instead use table itself to represent nil */ - sethvalue(fs->ls->L, &k, fs->ls->h); - return addk(fs, &k, &v); -} - - -/* -** Fix an expression to return the number of results 'nresults'. -** Either 'e' is a multi-ret expression (function call or vararg) -** or 'nresults' is LUA_MULTRET (as any expression can satisfy that). -*/ -void luaK_setreturns (FuncState *fs, expdesc *e, int nresults) { - if (e->k == VCALL) { /* expression is an open function call? */ - SETARG_C(getinstruction(fs, e), nresults + 1); - } - else if (e->k == VVARARG) { - Instruction *pc = &getinstruction(fs, e); - SETARG_B(*pc, nresults + 1); - SETARG_A(*pc, fs->freereg); - luaK_reserveregs(fs, 1); - } - else lua_assert(nresults == LUA_MULTRET); -} - - -/* -** Fix an expression to return one result. -** If expression is not a multi-ret expression (function call or -** vararg), it already returns one result, so nothing needs to be done. -** Function calls become VNONRELOC expressions (as its result comes -** fixed in the base register of the call), while vararg expressions -** become VRELOCABLE (as OP_VARARG puts its results where it wants). -** (Calls are created returning one result, so that does not need -** to be fixed.) -*/ -void luaK_setoneret (FuncState *fs, expdesc *e) { - if (e->k == VCALL) { /* expression is an open function call? */ - /* already returns 1 value */ - lua_assert(GETARG_C(getinstruction(fs, e)) == 2); - e->k = VNONRELOC; /* result has fixed position */ - e->u.info = GETARG_A(getinstruction(fs, e)); - } - else if (e->k == VVARARG) { - SETARG_B(getinstruction(fs, e), 2); - e->k = VRELOCABLE; /* can relocate its simple result */ - } -} - - -/* -** Ensure that expression 'e' is not a variable. -*/ -void luaK_dischargevars (FuncState *fs, expdesc *e) { - switch (e->k) { - case VLOCAL: { /* already in a register */ - e->k = VNONRELOC; /* becomes a non-relocatable value */ - break; - } - case VUPVAL: { /* move value to some (pending) register */ - e->u.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.info, 0); - e->k = VRELOCABLE; - break; - } - case VINDEXED: { - OpCode op; - freereg(fs, e->u.ind.idx); - if (e->u.ind.vt == VLOCAL) { /* is 't' in a register? */ - freereg(fs, e->u.ind.t); - op = OP_GETTABLE; - } - else { - lua_assert(e->u.ind.vt == VUPVAL); - op = OP_GETTABUP; /* 't' is in an upvalue */ - } - e->u.info = luaK_codeABC(fs, op, 0, e->u.ind.t, e->u.ind.idx); - e->k = VRELOCABLE; - break; - } - case VVARARG: case VCALL: { - luaK_setoneret(fs, e); - break; - } - default: break; /* there is one value available (somewhere) */ - } -} - - -/* -** Ensures expression value is in register 'reg' (and therefore -** 'e' will become a non-relocatable expression). -*/ -static void discharge2reg (FuncState *fs, expdesc *e, int reg) { - luaK_dischargevars(fs, e); - switch (e->k) { - case VNIL: { - luaK_nil(fs, reg, 1); - break; - } - case VFALSE: case VTRUE: { - luaK_codeABC(fs, OP_LOADBOOL, reg, e->k == VTRUE, 0); - break; - } - case VK: { - luaK_codek(fs, reg, e->u.info); - break; - } - case VKFLT: { - luaK_codek(fs, reg, luaK_numberK(fs, e->u.nval)); - break; - } - case VKINT: { - luaK_codek(fs, reg, luaK_intK(fs, e->u.ival)); - break; - } - case VRELOCABLE: { - Instruction *pc = &getinstruction(fs, e); - SETARG_A(*pc, reg); /* instruction will put result in 'reg' */ - break; - } - case VNONRELOC: { - if (reg != e->u.info) - luaK_codeABC(fs, OP_MOVE, reg, e->u.info, 0); - break; - } - default: { - lua_assert(e->k == VJMP); - return; /* nothing to do... */ - } - } - e->u.info = reg; - e->k = VNONRELOC; -} - - -/* -** Ensures expression value is in any register. -*/ -static void discharge2anyreg (FuncState *fs, expdesc *e) { - if (e->k != VNONRELOC) { /* no fixed register yet? */ - luaK_reserveregs(fs, 1); /* get a register */ - discharge2reg(fs, e, fs->freereg-1); /* put value there */ - } -} - - -static int code_loadbool (FuncState *fs, int A, int b, int jump) { - luaK_getlabel(fs); /* those instructions may be jump targets */ - return luaK_codeABC(fs, OP_LOADBOOL, A, b, jump); -} - - -/* -** check whether list has any jump that do not produce a value -** or produce an inverted value -*/ -static int need_value (FuncState *fs, int list) { - for (; list != NO_JUMP; list = getjump(fs, list)) { - Instruction i = *getjumpcontrol(fs, list); - if (GET_OPCODE(i) != OP_TESTSET) return 1; - } - return 0; /* not found */ -} - - -/* -** Ensures final expression result (including results from its jump -** lists) is in register 'reg'. -** If expression has jumps, need to patch these jumps either to -** its final position or to "load" instructions (for those tests -** that do not produce values). -*/ -static void exp2reg (FuncState *fs, expdesc *e, int reg) { - discharge2reg(fs, e, reg); - if (e->k == VJMP) /* expression itself is a test? */ - luaK_concat(fs, &e->t, e->u.info); /* put this jump in 't' list */ - if (hasjumps(e)) { - int final; /* position after whole expression */ - int p_f = NO_JUMP; /* position of an eventual LOAD false */ - int p_t = NO_JUMP; /* position of an eventual LOAD true */ - if (need_value(fs, e->t) || need_value(fs, e->f)) { - int fj = (e->k == VJMP) ? NO_JUMP : luaK_jump(fs); - p_f = code_loadbool(fs, reg, 0, 1); - p_t = code_loadbool(fs, reg, 1, 0); - luaK_patchtohere(fs, fj); - } - final = luaK_getlabel(fs); - patchlistaux(fs, e->f, final, reg, p_f); - patchlistaux(fs, e->t, final, reg, p_t); - } - e->f = e->t = NO_JUMP; - e->u.info = reg; - e->k = VNONRELOC; -} - - -/* -** Ensures final expression result (including results from its jump -** lists) is in next available register. -*/ -void luaK_exp2nextreg (FuncState *fs, expdesc *e) { - luaK_dischargevars(fs, e); - freeexp(fs, e); - luaK_reserveregs(fs, 1); - exp2reg(fs, e, fs->freereg - 1); -} - - -/* -** Ensures final expression result (including results from its jump -** lists) is in some (any) register and return that register. -*/ -int luaK_exp2anyreg (FuncState *fs, expdesc *e) { - luaK_dischargevars(fs, e); - if (e->k == VNONRELOC) { /* expression already has a register? */ - if (!hasjumps(e)) /* no jumps? */ - return e->u.info; /* result is already in a register */ - if (e->u.info >= fs->nactvar) { /* reg. is not a local? */ - exp2reg(fs, e, e->u.info); /* put final result in it */ - return e->u.info; - } - } - luaK_exp2nextreg(fs, e); /* otherwise, use next available register */ - return e->u.info; -} - - -/* -** Ensures final expression result is either in a register or in an -** upvalue. -*/ -void luaK_exp2anyregup (FuncState *fs, expdesc *e) { - if (e->k != VUPVAL || hasjumps(e)) - luaK_exp2anyreg(fs, e); -} - - -/* -** Ensures final expression result is either in a register or it is -** a constant. -*/ -void luaK_exp2val (FuncState *fs, expdesc *e) { - if (hasjumps(e)) - luaK_exp2anyreg(fs, e); - else - luaK_dischargevars(fs, e); -} - - -/* -** Ensures final expression result is in a valid R/K index -** (that is, it is either in a register or in 'k' with an index -** in the range of R/K indices). -** Returns R/K index. -*/ -int luaK_exp2RK (FuncState *fs, expdesc *e) { - luaK_exp2val(fs, e); - switch (e->k) { /* move constants to 'k' */ - case VTRUE: e->u.info = boolK(fs, 1); goto vk; - case VFALSE: e->u.info = boolK(fs, 0); goto vk; - case VNIL: e->u.info = nilK(fs); goto vk; - case VKINT: e->u.info = luaK_intK(fs, e->u.ival); goto vk; - case VKFLT: e->u.info = luaK_numberK(fs, e->u.nval); goto vk; - case VK: - vk: - e->k = VK; - if (e->u.info <= MAXINDEXRK) /* constant fits in 'argC'? */ - return RKASK(e->u.info); - else break; - default: break; - } - /* not a constant in the right range: put it in a register */ - return luaK_exp2anyreg(fs, e); -} - - -/* -** Generate code to store result of expression 'ex' into variable 'var'. -*/ -void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) { - switch (var->k) { - case VLOCAL: { - freeexp(fs, ex); - exp2reg(fs, ex, var->u.info); /* compute 'ex' into proper place */ - return; - } - case VUPVAL: { - int e = luaK_exp2anyreg(fs, ex); - luaK_codeABC(fs, OP_SETUPVAL, e, var->u.info, 0); - break; - } - case VINDEXED: { - OpCode op = (var->u.ind.vt == VLOCAL) ? OP_SETTABLE : OP_SETTABUP; - int e = luaK_exp2RK(fs, ex); - luaK_codeABC(fs, op, var->u.ind.t, var->u.ind.idx, e); - break; - } - default: lua_assert(0); /* invalid var kind to store */ - } - freeexp(fs, ex); -} - - -/* -** Emit SELF instruction (convert expression 'e' into 'e:key(e,'). -*/ -void luaK_self (FuncState *fs, expdesc *e, expdesc *key) { - int ereg; - luaK_exp2anyreg(fs, e); - ereg = e->u.info; /* register where 'e' was placed */ - freeexp(fs, e); - e->u.info = fs->freereg; /* base register for op_self */ - e->k = VNONRELOC; /* self expression has a fixed register */ - luaK_reserveregs(fs, 2); /* function and 'self' produced by op_self */ - luaK_codeABC(fs, OP_SELF, e->u.info, ereg, luaK_exp2RK(fs, key)); - freeexp(fs, key); -} - - -/* -** Negate condition 'e' (where 'e' is a comparison). -*/ -static void negatecondition (FuncState *fs, expdesc *e) { - Instruction *pc = getjumpcontrol(fs, e->u.info); - lua_assert(testTMode(GET_OPCODE(*pc)) && GET_OPCODE(*pc) != OP_TESTSET && - GET_OPCODE(*pc) != OP_TEST); - SETARG_A(*pc, !(GETARG_A(*pc))); -} - - -/* -** Emit instruction to jump if 'e' is 'cond' (that is, if 'cond' -** is true, code will jump if 'e' is true.) Return jump position. -** Optimize when 'e' is 'not' something, inverting the condition -** and removing the 'not'. -*/ -static int jumponcond (FuncState *fs, expdesc *e, int cond) { - if (e->k == VRELOCABLE) { - Instruction ie = getinstruction(fs, e); - if (GET_OPCODE(ie) == OP_NOT) { - fs->pc--; /* remove previous OP_NOT */ - return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond); - } - /* else go through */ - } - discharge2anyreg(fs, e); - freeexp(fs, e); - return condjump(fs, OP_TESTSET, NO_REG, e->u.info, cond); -} - - -/* -** Emit code to go through if 'e' is true, jump otherwise. -*/ -void luaK_goiftrue (FuncState *fs, expdesc *e) { - int pc; /* pc of new jump */ - luaK_dischargevars(fs, e); - switch (e->k) { - case VJMP: { /* condition? */ - negatecondition(fs, e); /* jump when it is false */ - pc = e->u.info; /* save jump position */ - break; - } - case VK: case VKFLT: case VKINT: case VTRUE: { - pc = NO_JUMP; /* always true; do nothing */ - break; - } - default: { - pc = jumponcond(fs, e, 0); /* jump when false */ - break; - } - } - luaK_concat(fs, &e->f, pc); /* insert new jump in false list */ - luaK_patchtohere(fs, e->t); /* true list jumps to here (to go through) */ - e->t = NO_JUMP; -} - - -/* -** Emit code to go through if 'e' is false, jump otherwise. -*/ -void luaK_goiffalse (FuncState *fs, expdesc *e) { - int pc; /* pc of new jump */ - luaK_dischargevars(fs, e); - switch (e->k) { - case VJMP: { - pc = e->u.info; /* already jump if true */ - break; - } - case VNIL: case VFALSE: { - pc = NO_JUMP; /* always false; do nothing */ - break; - } - default: { - pc = jumponcond(fs, e, 1); /* jump if true */ - break; - } - } - luaK_concat(fs, &e->t, pc); /* insert new jump in 't' list */ - luaK_patchtohere(fs, e->f); /* false list jumps to here (to go through) */ - e->f = NO_JUMP; -} - - -/* -** Code 'not e', doing constant folding. -*/ -static void codenot (FuncState *fs, expdesc *e) { - luaK_dischargevars(fs, e); - switch (e->k) { - case VNIL: case VFALSE: { - e->k = VTRUE; /* true == not nil == not false */ - break; - } - case VK: case VKFLT: case VKINT: case VTRUE: { - e->k = VFALSE; /* false == not "x" == not 0.5 == not 1 == not true */ - break; - } - case VJMP: { - negatecondition(fs, e); - break; - } - case VRELOCABLE: - case VNONRELOC: { - discharge2anyreg(fs, e); - freeexp(fs, e); - e->u.info = luaK_codeABC(fs, OP_NOT, 0, e->u.info, 0); - e->k = VRELOCABLE; - break; - } - default: lua_assert(0); /* cannot happen */ - } - /* interchange true and false lists */ - { int temp = e->f; e->f = e->t; e->t = temp; } - removevalues(fs, e->f); /* values are useless when negated */ - removevalues(fs, e->t); -} - - -/* -** Create expression 't[k]'. 't' must have its final result already in a -** register or upvalue. -*/ -void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { - lua_assert(!hasjumps(t) && (vkisinreg(t->k) || t->k == VUPVAL)); - t->u.ind.t = t->u.info; /* register or upvalue index */ - t->u.ind.idx = luaK_exp2RK(fs, k); /* R/K index for key */ - t->u.ind.vt = (t->k == VUPVAL) ? VUPVAL : VLOCAL; - t->k = VINDEXED; -} - - -/* -** Return false if folding can raise an error. -** Bitwise operations need operands convertible to integers; division -** operations cannot have 0 as divisor. -*/ -static int validop (int op, TValue *v1, TValue *v2) { - switch (op) { - case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR: - case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: { /* conversion errors */ - lua_Integer i; - return (tointeger(v1, &i) && tointeger(v2, &i)); - } - case LUA_OPDIV: case LUA_OPIDIV: case LUA_OPMOD: /* division by 0 */ - return (nvalue(v2) != 0); - default: return 1; /* everything else is valid */ - } -} - - -/* -** Try to "constant-fold" an operation; return 1 iff successful. -** (In this case, 'e1' has the final result.) -*/ -static int constfolding (FuncState *fs, int op, expdesc *e1, - const expdesc *e2) { - TValue v1, v2, res; - if (!tonumeral(e1, &v1) || !tonumeral(e2, &v2) || !validop(op, &v1, &v2)) - return 0; /* non-numeric operands or not safe to fold */ - luaO_arith(fs->ls->L, op, &v1, &v2, &res); /* does operation */ - if (ttisinteger(&res)) { - e1->k = VKINT; - e1->u.ival = ivalue(&res); - } - else { /* folds neither NaN nor 0.0 (to avoid problems with -0.0) */ - lua_Number n = fltvalue(&res); - if (luai_numisnan(n) || n == 0) - return 0; - e1->k = VKFLT; - e1->u.nval = n; - } - return 1; -} - - -/* -** Emit code for unary expressions that "produce values" -** (everything but 'not'). -** Expression to produce final result will be encoded in 'e'. -*/ -static void codeunexpval (FuncState *fs, OpCode op, expdesc *e, int line) { - int r = luaK_exp2anyreg(fs, e); /* opcodes operate only on registers */ - freeexp(fs, e); - e->u.info = luaK_codeABC(fs, op, 0, r, 0); /* generate opcode */ - e->k = VRELOCABLE; /* all those operations are relocatable */ - luaK_fixline(fs, line); -} - - -/* -** Emit code for binary expressions that "produce values" -** (everything but logical operators 'and'/'or' and comparison -** operators). -** Expression to produce final result will be encoded in 'e1'. -** Because 'luaK_exp2RK' can free registers, its calls must be -** in "stack order" (that is, first on 'e2', which may have more -** recent registers to be released). -*/ -static void codebinexpval (FuncState *fs, OpCode op, - expdesc *e1, expdesc *e2, int line) { - int rk2 = luaK_exp2RK(fs, e2); /* both operands are "RK" */ - int rk1 = luaK_exp2RK(fs, e1); - freeexps(fs, e1, e2); - e1->u.info = luaK_codeABC(fs, op, 0, rk1, rk2); /* generate opcode */ - e1->k = VRELOCABLE; /* all those operations are relocatable */ - luaK_fixline(fs, line); -} - - -/* -** Emit code for comparisons. -** 'e1' was already put in R/K form by 'luaK_infix'. -*/ -static void codecomp (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2) { - int rk1 = (e1->k == VK) ? RKASK(e1->u.info) - : check_exp(e1->k == VNONRELOC, e1->u.info); - int rk2 = luaK_exp2RK(fs, e2); - freeexps(fs, e1, e2); - switch (opr) { - case OPR_NE: { /* '(a ~= b)' ==> 'not (a == b)' */ - e1->u.info = condjump(fs, OP_EQ, 0, rk1, rk2); - break; - } - case OPR_GT: case OPR_GE: { - /* '(a > b)' ==> '(b < a)'; '(a >= b)' ==> '(b <= a)' */ - OpCode op = cast(OpCode, (opr - OPR_NE) + OP_EQ); - e1->u.info = condjump(fs, op, 1, rk2, rk1); /* invert operands */ - break; - } - default: { /* '==', '<', '<=' use their own opcodes */ - OpCode op = cast(OpCode, (opr - OPR_EQ) + OP_EQ); - e1->u.info = condjump(fs, op, 1, rk1, rk2); - break; - } - } - e1->k = VJMP; -} - - -/* -** Aplly prefix operation 'op' to expression 'e'. -*/ -void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) { - static const expdesc ef = {VKINT, {0}, NO_JUMP, NO_JUMP}; - switch (op) { - case OPR_MINUS: case OPR_BNOT: /* use 'ef' as fake 2nd operand */ - if (constfolding(fs, op + LUA_OPUNM, e, &ef)) - break; - /* FALLTHROUGH */ - case OPR_LEN: - codeunexpval(fs, cast(OpCode, op + OP_UNM), e, line); - break; - case OPR_NOT: codenot(fs, e); break; - default: lua_assert(0); - } -} - - -/* -** Process 1st operand 'v' of binary operation 'op' before reading -** 2nd operand. -*/ -void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) { - switch (op) { - case OPR_AND: { - luaK_goiftrue(fs, v); /* go ahead only if 'v' is true */ - break; - } - case OPR_OR: { - luaK_goiffalse(fs, v); /* go ahead only if 'v' is false */ - break; - } - case OPR_CONCAT: { - luaK_exp2nextreg(fs, v); /* operand must be on the 'stack' */ - break; - } - case OPR_ADD: case OPR_SUB: - case OPR_MUL: case OPR_DIV: case OPR_IDIV: - case OPR_MOD: case OPR_POW: - case OPR_BAND: case OPR_BOR: case OPR_BXOR: - case OPR_SHL: case OPR_SHR: { - if (!tonumeral(v, NULL)) - luaK_exp2RK(fs, v); - /* else keep numeral, which may be folded with 2nd operand */ - break; - } - default: { - luaK_exp2RK(fs, v); - break; - } - } -} - - -/* -** Finalize code for binary operation, after reading 2nd operand. -** For '(a .. b .. c)' (which is '(a .. (b .. c))', because -** concatenation is right associative), merge second CONCAT into first -** one. -*/ -void luaK_posfix (FuncState *fs, BinOpr op, - expdesc *e1, expdesc *e2, int line) { - switch (op) { - case OPR_AND: { - lua_assert(e1->t == NO_JUMP); /* list closed by 'luK_infix' */ - luaK_dischargevars(fs, e2); - luaK_concat(fs, &e2->f, e1->f); - *e1 = *e2; - break; - } - case OPR_OR: { - lua_assert(e1->f == NO_JUMP); /* list closed by 'luK_infix' */ - luaK_dischargevars(fs, e2); - luaK_concat(fs, &e2->t, e1->t); - *e1 = *e2; - break; - } - case OPR_CONCAT: { - luaK_exp2val(fs, e2); - if (e2->k == VRELOCABLE && - GET_OPCODE(getinstruction(fs, e2)) == OP_CONCAT) { - lua_assert(e1->u.info == GETARG_B(getinstruction(fs, e2))-1); - freeexp(fs, e1); - SETARG_B(getinstruction(fs, e2), e1->u.info); - e1->k = VRELOCABLE; e1->u.info = e2->u.info; - } - else { - luaK_exp2nextreg(fs, e2); /* operand must be on the 'stack' */ - codebinexpval(fs, OP_CONCAT, e1, e2, line); - } - break; - } - case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV: - case OPR_IDIV: case OPR_MOD: case OPR_POW: - case OPR_BAND: case OPR_BOR: case OPR_BXOR: - case OPR_SHL: case OPR_SHR: { - if (!constfolding(fs, op + LUA_OPADD, e1, e2)) - codebinexpval(fs, cast(OpCode, op + OP_ADD), e1, e2, line); - break; - } - case OPR_EQ: case OPR_LT: case OPR_LE: - case OPR_NE: case OPR_GT: case OPR_GE: { - codecomp(fs, op, e1, e2); - break; - } - default: lua_assert(0); - } -} - - -/* -** Change line information associated with current position. -*/ -void luaK_fixline (FuncState *fs, int line) { - fs->f->lineinfo[fs->pc - 1] = line; -} - - -/* -** Emit a SETLIST instruction. -** 'base' is register that keeps table; -** 'nelems' is #table plus those to be stored now; -** 'tostore' is number of values (in registers 'base + 1',...) to add to -** table (or LUA_MULTRET to add up to stack top). -*/ -void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) { - int c = (nelems - 1)/LFIELDS_PER_FLUSH + 1; - int b = (tostore == LUA_MULTRET) ? 0 : tostore; - lua_assert(tostore != 0 && tostore <= LFIELDS_PER_FLUSH); - if (c <= MAXARG_C) - luaK_codeABC(fs, OP_SETLIST, base, b, c); - else if (c <= MAXARG_Ax) { - luaK_codeABC(fs, OP_SETLIST, base, b, 0); - codeextraarg(fs, c); - } - else - luaX_syntaxerror(fs->ls, "constructor too long"); - fs->freereg = base + 1; /* free registers with list values */ -} - diff --git a/build/premake/premake5/contrib/lua/src/lcode.h b/build/premake/premake5/contrib/lua/src/lcode.h deleted file mode 100644 index 882dc9c156..0000000000 --- a/build/premake/premake5/contrib/lua/src/lcode.h +++ /dev/null @@ -1,88 +0,0 @@ -/* -** $Id: lcode.h,v 1.64.1.1 2017/04/19 17:20:42 roberto Exp $ -** Code generator for Lua -** See Copyright Notice in lua.h -*/ - -#ifndef lcode_h -#define lcode_h - -#include "llex.h" -#include "lobject.h" -#include "lopcodes.h" -#include "lparser.h" - - -/* -** Marks the end of a patch list. It is an invalid value both as an absolute -** address, and as a list link (would link an element to itself). -*/ -#define NO_JUMP (-1) - - -/* -** grep "ORDER OPR" if you change these enums (ORDER OP) -*/ -typedef enum BinOpr { - OPR_ADD, OPR_SUB, OPR_MUL, OPR_MOD, OPR_POW, - OPR_DIV, - OPR_IDIV, - OPR_BAND, OPR_BOR, OPR_BXOR, - OPR_SHL, OPR_SHR, - OPR_CONCAT, - OPR_EQ, OPR_LT, OPR_LE, - OPR_NE, OPR_GT, OPR_GE, - OPR_AND, OPR_OR, - OPR_NOBINOPR -} BinOpr; - - -typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; - - -/* get (pointer to) instruction of given 'expdesc' */ -#define getinstruction(fs,e) ((fs)->f->code[(e)->u.info]) - -#define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) - -#define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) - -#define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t) - -LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); -LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); -LUAI_FUNC int luaK_codek (FuncState *fs, int reg, int k); -LUAI_FUNC void luaK_fixline (FuncState *fs, int line); -LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); -LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); -LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); -LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); -LUAI_FUNC int luaK_intK (FuncState *fs, lua_Integer n); -LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); -LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); -LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e); -LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); -LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); -LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); -LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); -LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); -LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); -LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e); -LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); -LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); -LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); -LUAI_FUNC int luaK_jump (FuncState *fs); -LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); -LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); -LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); -LUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level); -LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); -LUAI_FUNC int luaK_getlabel (FuncState *fs); -LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line); -LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); -LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, - expdesc *v2, int line); -LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lcorolib.c b/build/premake/premake5/contrib/lua/src/lcorolib.c deleted file mode 100644 index 0b17af9e34..0000000000 --- a/build/premake/premake5/contrib/lua/src/lcorolib.c +++ /dev/null @@ -1,168 +0,0 @@ -/* -** $Id: lcorolib.c,v 1.10.1.1 2017/04/19 17:20:42 roberto Exp $ -** Coroutine Library -** See Copyright Notice in lua.h -*/ - -#define lcorolib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -static lua_State *getco (lua_State *L) { - lua_State *co = lua_tothread(L, 1); - luaL_argcheck(L, co, 1, "thread expected"); - return co; -} - - -static int auxresume (lua_State *L, lua_State *co, int narg) { - int status; - if (!lua_checkstack(co, narg)) { - lua_pushliteral(L, "too many arguments to resume"); - return -1; /* error flag */ - } - if (lua_status(co) == LUA_OK && lua_gettop(co) == 0) { - lua_pushliteral(L, "cannot resume dead coroutine"); - return -1; /* error flag */ - } - lua_xmove(L, co, narg); - status = lua_resume(co, L, narg); - if (status == LUA_OK || status == LUA_YIELD) { - int nres = lua_gettop(co); - if (!lua_checkstack(L, nres + 1)) { - lua_pop(co, nres); /* remove results anyway */ - lua_pushliteral(L, "too many results to resume"); - return -1; /* error flag */ - } - lua_xmove(co, L, nres); /* move yielded values */ - return nres; - } - else { - lua_xmove(co, L, 1); /* move error message */ - return -1; /* error flag */ - } -} - - -static int luaB_coresume (lua_State *L) { - lua_State *co = getco(L); - int r; - r = auxresume(L, co, lua_gettop(L) - 1); - if (r < 0) { - lua_pushboolean(L, 0); - lua_insert(L, -2); - return 2; /* return false + error message */ - } - else { - lua_pushboolean(L, 1); - lua_insert(L, -(r + 1)); - return r + 1; /* return true + 'resume' returns */ - } -} - - -static int luaB_auxwrap (lua_State *L) { - lua_State *co = lua_tothread(L, lua_upvalueindex(1)); - int r = auxresume(L, co, lua_gettop(L)); - if (r < 0) { - if (lua_type(L, -1) == LUA_TSTRING) { /* error object is a string? */ - luaL_where(L, 1); /* add extra info */ - lua_insert(L, -2); - lua_concat(L, 2); - } - return lua_error(L); /* propagate error */ - } - return r; -} - - -static int luaB_cocreate (lua_State *L) { - lua_State *NL; - luaL_checktype(L, 1, LUA_TFUNCTION); - NL = lua_newthread(L); - lua_pushvalue(L, 1); /* move function to top */ - lua_xmove(L, NL, 1); /* move function from L to NL */ - return 1; -} - - -static int luaB_cowrap (lua_State *L) { - luaB_cocreate(L); - lua_pushcclosure(L, luaB_auxwrap, 1); - return 1; -} - - -static int luaB_yield (lua_State *L) { - return lua_yield(L, lua_gettop(L)); -} - - -static int luaB_costatus (lua_State *L) { - lua_State *co = getco(L); - if (L == co) lua_pushliteral(L, "running"); - else { - switch (lua_status(co)) { - case LUA_YIELD: - lua_pushliteral(L, "suspended"); - break; - case LUA_OK: { - lua_Debug ar; - if (lua_getstack(co, 0, &ar) > 0) /* does it have frames? */ - lua_pushliteral(L, "normal"); /* it is running */ - else if (lua_gettop(co) == 0) - lua_pushliteral(L, "dead"); - else - lua_pushliteral(L, "suspended"); /* initial state */ - break; - } - default: /* some error occurred */ - lua_pushliteral(L, "dead"); - break; - } - } - return 1; -} - - -static int luaB_yieldable (lua_State *L) { - lua_pushboolean(L, lua_isyieldable(L)); - return 1; -} - - -static int luaB_corunning (lua_State *L) { - int ismain = lua_pushthread(L); - lua_pushboolean(L, ismain); - return 2; -} - - -static const luaL_Reg co_funcs[] = { - {"create", luaB_cocreate}, - {"resume", luaB_coresume}, - {"running", luaB_corunning}, - {"status", luaB_costatus}, - {"wrap", luaB_cowrap}, - {"yield", luaB_yield}, - {"isyieldable", luaB_yieldable}, - {NULL, NULL} -}; - - - -LUAMOD_API int luaopen_coroutine (lua_State *L) { - luaL_newlib(L, co_funcs); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/lctype.c b/build/premake/premake5/contrib/lua/src/lctype.c deleted file mode 100644 index f8ad7a2edf..0000000000 --- a/build/premake/premake5/contrib/lua/src/lctype.c +++ /dev/null @@ -1,55 +0,0 @@ -/* -** $Id: lctype.c,v 1.12.1.1 2017/04/19 17:20:42 roberto Exp $ -** 'ctype' functions for Lua -** See Copyright Notice in lua.h -*/ - -#define lctype_c -#define LUA_CORE - -#include "lprefix.h" - - -#include "lctype.h" - -#if !LUA_USE_CTYPE /* { */ - -#include - -LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = { - 0x00, /* EOZ */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */ - 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */ - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */ - 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 4. */ - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 5. */ - 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05, - 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */ - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */ - 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -#endif /* } */ diff --git a/build/premake/premake5/contrib/lua/src/lctype.h b/build/premake/premake5/contrib/lua/src/lctype.h deleted file mode 100644 index b09b21a337..0000000000 --- a/build/premake/premake5/contrib/lua/src/lctype.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -** $Id: lctype.h,v 1.12.1.1 2013/04/12 18:48:47 roberto Exp $ -** 'ctype' functions for Lua -** See Copyright Notice in lua.h -*/ - -#ifndef lctype_h -#define lctype_h - -#include "lua.h" - - -/* -** WARNING: the functions defined here do not necessarily correspond -** to the similar functions in the standard C ctype.h. They are -** optimized for the specific needs of Lua -*/ - -#if !defined(LUA_USE_CTYPE) - -#if 'A' == 65 && '0' == 48 -/* ASCII case: can use its own tables; faster and fixed */ -#define LUA_USE_CTYPE 0 -#else -/* must use standard C ctype */ -#define LUA_USE_CTYPE 1 -#endif - -#endif - - -#if !LUA_USE_CTYPE /* { */ - -#include - -#include "llimits.h" - - -#define ALPHABIT 0 -#define DIGITBIT 1 -#define PRINTBIT 2 -#define SPACEBIT 3 -#define XDIGITBIT 4 - - -#define MASK(B) (1 << (B)) - - -/* -** add 1 to char to allow index -1 (EOZ) -*/ -#define testprop(c,p) (luai_ctype_[(c)+1] & (p)) - -/* -** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_' -*/ -#define lislalpha(c) testprop(c, MASK(ALPHABIT)) -#define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) -#define lisdigit(c) testprop(c, MASK(DIGITBIT)) -#define lisspace(c) testprop(c, MASK(SPACEBIT)) -#define lisprint(c) testprop(c, MASK(PRINTBIT)) -#define lisxdigit(c) testprop(c, MASK(XDIGITBIT)) - -/* -** this 'ltolower' only works for alphabetic characters -*/ -#define ltolower(c) ((c) | ('A' ^ 'a')) - - -/* two more entries for 0 and -1 (EOZ) */ -LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2]; - - -#else /* }{ */ - -/* -** use standard C ctypes -*/ - -#include - - -#define lislalpha(c) (isalpha(c) || (c) == '_') -#define lislalnum(c) (isalnum(c) || (c) == '_') -#define lisdigit(c) (isdigit(c)) -#define lisspace(c) (isspace(c)) -#define lisprint(c) (isprint(c)) -#define lisxdigit(c) (isxdigit(c)) - -#define ltolower(c) (tolower(c)) - -#endif /* } */ - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/ldblib.c b/build/premake/premake5/contrib/lua/src/ldblib.c deleted file mode 100644 index 9d29afb0a8..0000000000 --- a/build/premake/premake5/contrib/lua/src/ldblib.c +++ /dev/null @@ -1,456 +0,0 @@ -/* -** $Id: ldblib.c,v 1.151.1.1 2017/04/19 17:20:42 roberto Exp $ -** Interface from Lua to its debug API -** See Copyright Notice in lua.h -*/ - -#define ldblib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -/* -** The hook table at registry[&HOOKKEY] maps threads to their current -** hook function. (We only need the unique address of 'HOOKKEY'.) -*/ -static const int HOOKKEY = 0; - - -/* -** If L1 != L, L1 can be in any state, and therefore there are no -** guarantees about its stack space; any push in L1 must be -** checked. -*/ -static void checkstack (lua_State *L, lua_State *L1, int n) { - if (L != L1 && !lua_checkstack(L1, n)) - luaL_error(L, "stack overflow"); -} - - -static int db_getregistry (lua_State *L) { - lua_pushvalue(L, LUA_REGISTRYINDEX); - return 1; -} - - -static int db_getmetatable (lua_State *L) { - luaL_checkany(L, 1); - if (!lua_getmetatable(L, 1)) { - lua_pushnil(L); /* no metatable */ - } - return 1; -} - - -static int db_setmetatable (lua_State *L) { - int t = lua_type(L, 2); - luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2, - "nil or table expected"); - lua_settop(L, 2); - lua_setmetatable(L, 1); - return 1; /* return 1st argument */ -} - - -static int db_getuservalue (lua_State *L) { - if (lua_type(L, 1) != LUA_TUSERDATA) - lua_pushnil(L); - else - lua_getuservalue(L, 1); - return 1; -} - - -static int db_setuservalue (lua_State *L) { - luaL_checktype(L, 1, LUA_TUSERDATA); - luaL_checkany(L, 2); - lua_settop(L, 2); - lua_setuservalue(L, 1); - return 1; -} - - -/* -** Auxiliary function used by several library functions: check for -** an optional thread as function's first argument and set 'arg' with -** 1 if this argument is present (so that functions can skip it to -** access their other arguments) -*/ -static lua_State *getthread (lua_State *L, int *arg) { - if (lua_isthread(L, 1)) { - *arg = 1; - return lua_tothread(L, 1); - } - else { - *arg = 0; - return L; /* function will operate over current thread */ - } -} - - -/* -** Variations of 'lua_settable', used by 'db_getinfo' to put results -** from 'lua_getinfo' into result table. Key is always a string; -** value can be a string, an int, or a boolean. -*/ -static void settabss (lua_State *L, const char *k, const char *v) { - lua_pushstring(L, v); - lua_setfield(L, -2, k); -} - -static void settabsi (lua_State *L, const char *k, int v) { - lua_pushinteger(L, v); - lua_setfield(L, -2, k); -} - -static void settabsb (lua_State *L, const char *k, int v) { - lua_pushboolean(L, v); - lua_setfield(L, -2, k); -} - - -/* -** In function 'db_getinfo', the call to 'lua_getinfo' may push -** results on the stack; later it creates the result table to put -** these objects. Function 'treatstackoption' puts the result from -** 'lua_getinfo' on top of the result table so that it can call -** 'lua_setfield'. -*/ -static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) { - if (L == L1) - lua_rotate(L, -2, 1); /* exchange object and table */ - else - lua_xmove(L1, L, 1); /* move object to the "main" stack */ - lua_setfield(L, -2, fname); /* put object into table */ -} - - -/* -** Calls 'lua_getinfo' and collects all results in a new table. -** L1 needs stack space for an optional input (function) plus -** two optional outputs (function and line table) from function -** 'lua_getinfo'. -*/ -static int db_getinfo (lua_State *L) { - lua_Debug ar; - int arg; - lua_State *L1 = getthread(L, &arg); - const char *options = luaL_optstring(L, arg+2, "flnStu"); - checkstack(L, L1, 3); - if (lua_isfunction(L, arg + 1)) { /* info about a function? */ - options = lua_pushfstring(L, ">%s", options); /* add '>' to 'options' */ - lua_pushvalue(L, arg + 1); /* move function to 'L1' stack */ - lua_xmove(L, L1, 1); - } - else { /* stack level */ - if (!lua_getstack(L1, (int)luaL_checkinteger(L, arg + 1), &ar)) { - lua_pushnil(L); /* level out of range */ - return 1; - } - } - if (!lua_getinfo(L1, options, &ar)) - return luaL_argerror(L, arg+2, "invalid option"); - lua_newtable(L); /* table to collect results */ - if (strchr(options, 'S')) { - settabss(L, "source", ar.source); - settabss(L, "short_src", ar.short_src); - settabsi(L, "linedefined", ar.linedefined); - settabsi(L, "lastlinedefined", ar.lastlinedefined); - settabss(L, "what", ar.what); - } - if (strchr(options, 'l')) - settabsi(L, "currentline", ar.currentline); - if (strchr(options, 'u')) { - settabsi(L, "nups", ar.nups); - settabsi(L, "nparams", ar.nparams); - settabsb(L, "isvararg", ar.isvararg); - } - if (strchr(options, 'n')) { - settabss(L, "name", ar.name); - settabss(L, "namewhat", ar.namewhat); - } - if (strchr(options, 't')) - settabsb(L, "istailcall", ar.istailcall); - if (strchr(options, 'L')) - treatstackoption(L, L1, "activelines"); - if (strchr(options, 'f')) - treatstackoption(L, L1, "func"); - return 1; /* return table */ -} - - -static int db_getlocal (lua_State *L) { - int arg; - lua_State *L1 = getthread(L, &arg); - lua_Debug ar; - const char *name; - int nvar = (int)luaL_checkinteger(L, arg + 2); /* local-variable index */ - if (lua_isfunction(L, arg + 1)) { /* function argument? */ - lua_pushvalue(L, arg + 1); /* push function */ - lua_pushstring(L, lua_getlocal(L, NULL, nvar)); /* push local name */ - return 1; /* return only name (there is no value) */ - } - else { /* stack-level argument */ - int level = (int)luaL_checkinteger(L, arg + 1); - if (!lua_getstack(L1, level, &ar)) /* out of range? */ - return luaL_argerror(L, arg+1, "level out of range"); - checkstack(L, L1, 1); - name = lua_getlocal(L1, &ar, nvar); - if (name) { - lua_xmove(L1, L, 1); /* move local value */ - lua_pushstring(L, name); /* push name */ - lua_rotate(L, -2, 1); /* re-order */ - return 2; - } - else { - lua_pushnil(L); /* no name (nor value) */ - return 1; - } - } -} - - -static int db_setlocal (lua_State *L) { - int arg; - const char *name; - lua_State *L1 = getthread(L, &arg); - lua_Debug ar; - int level = (int)luaL_checkinteger(L, arg + 1); - int nvar = (int)luaL_checkinteger(L, arg + 2); - if (!lua_getstack(L1, level, &ar)) /* out of range? */ - return luaL_argerror(L, arg+1, "level out of range"); - luaL_checkany(L, arg+3); - lua_settop(L, arg+3); - checkstack(L, L1, 1); - lua_xmove(L, L1, 1); - name = lua_setlocal(L1, &ar, nvar); - if (name == NULL) - lua_pop(L1, 1); /* pop value (if not popped by 'lua_setlocal') */ - lua_pushstring(L, name); - return 1; -} - - -/* -** get (if 'get' is true) or set an upvalue from a closure -*/ -static int auxupvalue (lua_State *L, int get) { - const char *name; - int n = (int)luaL_checkinteger(L, 2); /* upvalue index */ - luaL_checktype(L, 1, LUA_TFUNCTION); /* closure */ - name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n); - if (name == NULL) return 0; - lua_pushstring(L, name); - lua_insert(L, -(get+1)); /* no-op if get is false */ - return get + 1; -} - - -static int db_getupvalue (lua_State *L) { - return auxupvalue(L, 1); -} - - -static int db_setupvalue (lua_State *L) { - luaL_checkany(L, 3); - return auxupvalue(L, 0); -} - - -/* -** Check whether a given upvalue from a given closure exists and -** returns its index -*/ -static int checkupval (lua_State *L, int argf, int argnup) { - int nup = (int)luaL_checkinteger(L, argnup); /* upvalue index */ - luaL_checktype(L, argf, LUA_TFUNCTION); /* closure */ - luaL_argcheck(L, (lua_getupvalue(L, argf, nup) != NULL), argnup, - "invalid upvalue index"); - return nup; -} - - -static int db_upvalueid (lua_State *L) { - int n = checkupval(L, 1, 2); - lua_pushlightuserdata(L, lua_upvalueid(L, 1, n)); - return 1; -} - - -static int db_upvaluejoin (lua_State *L) { - int n1 = checkupval(L, 1, 2); - int n2 = checkupval(L, 3, 4); - luaL_argcheck(L, !lua_iscfunction(L, 1), 1, "Lua function expected"); - luaL_argcheck(L, !lua_iscfunction(L, 3), 3, "Lua function expected"); - lua_upvaluejoin(L, 1, n1, 3, n2); - return 0; -} - - -/* -** Call hook function registered at hook table for the current -** thread (if there is one) -*/ -static void hookf (lua_State *L, lua_Debug *ar) { - static const char *const hooknames[] = - {"call", "return", "line", "count", "tail call"}; - lua_rawgetp(L, LUA_REGISTRYINDEX, &HOOKKEY); - lua_pushthread(L); - if (lua_rawget(L, -2) == LUA_TFUNCTION) { /* is there a hook function? */ - lua_pushstring(L, hooknames[(int)ar->event]); /* push event name */ - if (ar->currentline >= 0) - lua_pushinteger(L, ar->currentline); /* push current line */ - else lua_pushnil(L); - lua_assert(lua_getinfo(L, "lS", ar)); - lua_call(L, 2, 0); /* call hook function */ - } -} - - -/* -** Convert a string mask (for 'sethook') into a bit mask -*/ -static int makemask (const char *smask, int count) { - int mask = 0; - if (strchr(smask, 'c')) mask |= LUA_MASKCALL; - if (strchr(smask, 'r')) mask |= LUA_MASKRET; - if (strchr(smask, 'l')) mask |= LUA_MASKLINE; - if (count > 0) mask |= LUA_MASKCOUNT; - return mask; -} - - -/* -** Convert a bit mask (for 'gethook') into a string mask -*/ -static char *unmakemask (int mask, char *smask) { - int i = 0; - if (mask & LUA_MASKCALL) smask[i++] = 'c'; - if (mask & LUA_MASKRET) smask[i++] = 'r'; - if (mask & LUA_MASKLINE) smask[i++] = 'l'; - smask[i] = '\0'; - return smask; -} - - -static int db_sethook (lua_State *L) { - int arg, mask, count; - lua_Hook func; - lua_State *L1 = getthread(L, &arg); - if (lua_isnoneornil(L, arg+1)) { /* no hook? */ - lua_settop(L, arg+1); - func = NULL; mask = 0; count = 0; /* turn off hooks */ - } - else { - const char *smask = luaL_checkstring(L, arg+2); - luaL_checktype(L, arg+1, LUA_TFUNCTION); - count = (int)luaL_optinteger(L, arg + 3, 0); - func = hookf; mask = makemask(smask, count); - } - if (lua_rawgetp(L, LUA_REGISTRYINDEX, &HOOKKEY) == LUA_TNIL) { - lua_createtable(L, 0, 2); /* create a hook table */ - lua_pushvalue(L, -1); - lua_rawsetp(L, LUA_REGISTRYINDEX, &HOOKKEY); /* set it in position */ - lua_pushstring(L, "k"); - lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */ - lua_pushvalue(L, -1); - lua_setmetatable(L, -2); /* setmetatable(hooktable) = hooktable */ - } - checkstack(L, L1, 1); - lua_pushthread(L1); lua_xmove(L1, L, 1); /* key (thread) */ - lua_pushvalue(L, arg + 1); /* value (hook function) */ - lua_rawset(L, -3); /* hooktable[L1] = new Lua hook */ - lua_sethook(L1, func, mask, count); - return 0; -} - - -static int db_gethook (lua_State *L) { - int arg; - lua_State *L1 = getthread(L, &arg); - char buff[5]; - int mask = lua_gethookmask(L1); - lua_Hook hook = lua_gethook(L1); - if (hook == NULL) /* no hook? */ - lua_pushnil(L); - else if (hook != hookf) /* external hook? */ - lua_pushliteral(L, "external hook"); - else { /* hook table must exist */ - lua_rawgetp(L, LUA_REGISTRYINDEX, &HOOKKEY); - checkstack(L, L1, 1); - lua_pushthread(L1); lua_xmove(L1, L, 1); - lua_rawget(L, -2); /* 1st result = hooktable[L1] */ - lua_remove(L, -2); /* remove hook table */ - } - lua_pushstring(L, unmakemask(mask, buff)); /* 2nd result = mask */ - lua_pushinteger(L, lua_gethookcount(L1)); /* 3rd result = count */ - return 3; -} - - -static int db_debug (lua_State *L) { - for (;;) { - char buffer[250]; - lua_writestringerror("%s", "lua_debug> "); - if (fgets(buffer, sizeof(buffer), stdin) == 0 || - strcmp(buffer, "cont\n") == 0) - return 0; - if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || - lua_pcall(L, 0, 0, 0)) - lua_writestringerror("%s\n", lua_tostring(L, -1)); - lua_settop(L, 0); /* remove eventual returns */ - } -} - - -static int db_traceback (lua_State *L) { - int arg; - lua_State *L1 = getthread(L, &arg); - const char *msg = lua_tostring(L, arg + 1); - if (msg == NULL && !lua_isnoneornil(L, arg + 1)) /* non-string 'msg'? */ - lua_pushvalue(L, arg + 1); /* return it untouched */ - else { - int level = (int)luaL_optinteger(L, arg + 2, (L == L1) ? 1 : 0); - luaL_traceback(L, L1, msg, level); - } - return 1; -} - - -static const luaL_Reg dblib[] = { - {"debug", db_debug}, - {"getuservalue", db_getuservalue}, - {"gethook", db_gethook}, - {"getinfo", db_getinfo}, - {"getlocal", db_getlocal}, - {"getregistry", db_getregistry}, - {"getmetatable", db_getmetatable}, - {"getupvalue", db_getupvalue}, - {"upvaluejoin", db_upvaluejoin}, - {"upvalueid", db_upvalueid}, - {"setuservalue", db_setuservalue}, - {"sethook", db_sethook}, - {"setlocal", db_setlocal}, - {"setmetatable", db_setmetatable}, - {"setupvalue", db_setupvalue}, - {"traceback", db_traceback}, - {NULL, NULL} -}; - - -LUAMOD_API int luaopen_debug (lua_State *L) { - luaL_newlib(L, dblib); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/ldebug.c b/build/premake/premake5/contrib/lua/src/ldebug.c deleted file mode 100644 index e1389296e9..0000000000 --- a/build/premake/premake5/contrib/lua/src/ldebug.c +++ /dev/null @@ -1,699 +0,0 @@ -/* -** $Id: ldebug.c,v 2.121.1.2 2017/07/10 17:21:50 roberto Exp $ -** Debug Interface -** See Copyright Notice in lua.h -*/ - -#define ldebug_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include -#include - -#include "lua.h" - -#include "lapi.h" -#include "lcode.h" -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lobject.h" -#include "lopcodes.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" -#include "lvm.h" - - - -#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) - - -/* Active Lua function (given call info) */ -#define ci_func(ci) (clLvalue((ci)->func)) - - -static const char *funcnamefromcode (lua_State *L, CallInfo *ci, - const char **name); - - -static int currentpc (CallInfo *ci) { - lua_assert(isLua(ci)); - return pcRel(ci->u.l.savedpc, ci_func(ci)->p); -} - - -static int currentline (CallInfo *ci) { - return getfuncline(ci_func(ci)->p, currentpc(ci)); -} - - -/* -** If function yielded, its 'func' can be in the 'extra' field. The -** next function restores 'func' to its correct value for debugging -** purposes. (It exchanges 'func' and 'extra'; so, when called again, -** after debugging, it also "re-restores" ** 'func' to its altered value. -*/ -static void swapextra (lua_State *L) { - if (L->status == LUA_YIELD) { - CallInfo *ci = L->ci; /* get function that yielded */ - StkId temp = ci->func; /* exchange its 'func' and 'extra' values */ - ci->func = restorestack(L, ci->extra); - ci->extra = savestack(L, temp); - } -} - - -/* -** This function can be called asynchronously (e.g. during a signal). -** Fields 'oldpc', 'basehookcount', and 'hookcount' (set by -** 'resethookcount') are for debug only, and it is no problem if they -** get arbitrary values (causes at most one wrong hook call). 'hookmask' -** is an atomic value. We assume that pointers are atomic too (e.g., gcc -** ensures that for all platforms where it runs). Moreover, 'hook' is -** always checked before being called (see 'luaD_hook'). -*/ -LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) { - if (func == NULL || mask == 0) { /* turn off hooks? */ - mask = 0; - func = NULL; - } - if (isLua(L->ci)) - L->oldpc = L->ci->u.l.savedpc; - L->hook = func; - L->basehookcount = count; - resethookcount(L); - L->hookmask = cast_byte(mask); -} - - -LUA_API lua_Hook lua_gethook (lua_State *L) { - return L->hook; -} - - -LUA_API int lua_gethookmask (lua_State *L) { - return L->hookmask; -} - - -LUA_API int lua_gethookcount (lua_State *L) { - return L->basehookcount; -} - - -LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { - int status; - CallInfo *ci; - if (level < 0) return 0; /* invalid (negative) level */ - lua_lock(L); - for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous) - level--; - if (level == 0 && ci != &L->base_ci) { /* level found? */ - status = 1; - ar->i_ci = ci; - } - else status = 0; /* no such level */ - lua_unlock(L); - return status; -} - - -static const char *upvalname (Proto *p, int uv) { - TString *s = check_exp(uv < p->sizeupvalues, p->upvalues[uv].name); - if (s == NULL) return "?"; - else return getstr(s); -} - - -static const char *findvararg (CallInfo *ci, int n, StkId *pos) { - int nparams = clLvalue(ci->func)->p->numparams; - if (n >= cast_int(ci->u.l.base - ci->func) - nparams) - return NULL; /* no such vararg */ - else { - *pos = ci->func + nparams + n; - return "(*vararg)"; /* generic name for any vararg */ - } -} - - -static const char *findlocal (lua_State *L, CallInfo *ci, int n, - StkId *pos) { - const char *name = NULL; - StkId base; - if (isLua(ci)) { - if (n < 0) /* access to vararg values? */ - return findvararg(ci, -n, pos); - else { - base = ci->u.l.base; - name = luaF_getlocalname(ci_func(ci)->p, n, currentpc(ci)); - } - } - else - base = ci->func + 1; - if (name == NULL) { /* no 'standard' name? */ - StkId limit = (ci == L->ci) ? L->top : ci->next->func; - if (limit - base >= n && n > 0) /* is 'n' inside 'ci' stack? */ - name = "(*temporary)"; /* generic name for any valid slot */ - else - return NULL; /* no name */ - } - *pos = base + (n - 1); - return name; -} - - -LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) { - const char *name; - lua_lock(L); - swapextra(L); - if (ar == NULL) { /* information about non-active function? */ - if (!isLfunction(L->top - 1)) /* not a Lua function? */ - name = NULL; - else /* consider live variables at function start (parameters) */ - name = luaF_getlocalname(clLvalue(L->top - 1)->p, n, 0); - } - else { /* active function; get information through 'ar' */ - StkId pos = NULL; /* to avoid warnings */ - name = findlocal(L, ar->i_ci, n, &pos); - if (name) { - setobj2s(L, L->top, pos); - api_incr_top(L); - } - } - swapextra(L); - lua_unlock(L); - return name; -} - - -LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { - StkId pos = NULL; /* to avoid warnings */ - const char *name; - lua_lock(L); - swapextra(L); - name = findlocal(L, ar->i_ci, n, &pos); - if (name) { - setobjs2s(L, pos, L->top - 1); - L->top--; /* pop value */ - } - swapextra(L); - lua_unlock(L); - return name; -} - - -static void funcinfo (lua_Debug *ar, Closure *cl) { - if (noLuaClosure(cl)) { - ar->source = "=[C]"; - ar->linedefined = -1; - ar->lastlinedefined = -1; - ar->what = "C"; - } - else { - Proto *p = cl->l.p; - ar->source = p->source ? getstr(p->source) : "=?"; - ar->linedefined = p->linedefined; - ar->lastlinedefined = p->lastlinedefined; - ar->what = (ar->linedefined == 0) ? "main" : "Lua"; - } - luaO_chunkid(ar->short_src, ar->source, LUA_IDSIZE); -} - - -static void collectvalidlines (lua_State *L, Closure *f) { - if (noLuaClosure(f)) { - setnilvalue(L->top); - api_incr_top(L); - } - else { - int i; - TValue v; - int *lineinfo = f->l.p->lineinfo; - Table *t = luaH_new(L); /* new table to store active lines */ - sethvalue(L, L->top, t); /* push it on stack */ - api_incr_top(L); - setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */ - for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */ - luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */ - } -} - - -static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) { - if (ci == NULL) /* no 'ci'? */ - return NULL; /* no info */ - else if (ci->callstatus & CIST_FIN) { /* is this a finalizer? */ - *name = "__gc"; - return "metamethod"; /* report it as such */ - } - /* calling function is a known Lua function? */ - else if (!(ci->callstatus & CIST_TAIL) && isLua(ci->previous)) - return funcnamefromcode(L, ci->previous, name); - else return NULL; /* no way to find a name */ -} - - -static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, - Closure *f, CallInfo *ci) { - int status = 1; - for (; *what; what++) { - switch (*what) { - case 'S': { - funcinfo(ar, f); - break; - } - case 'l': { - ar->currentline = (ci && isLua(ci)) ? currentline(ci) : -1; - break; - } - case 'u': { - ar->nups = (f == NULL) ? 0 : f->c.nupvalues; - if (noLuaClosure(f)) { - ar->isvararg = 1; - ar->nparams = 0; - } - else { - ar->isvararg = f->l.p->is_vararg; - ar->nparams = f->l.p->numparams; - } - break; - } - case 't': { - ar->istailcall = (ci) ? ci->callstatus & CIST_TAIL : 0; - break; - } - case 'n': { - ar->namewhat = getfuncname(L, ci, &ar->name); - if (ar->namewhat == NULL) { - ar->namewhat = ""; /* not found */ - ar->name = NULL; - } - break; - } - case 'L': - case 'f': /* handled by lua_getinfo */ - break; - default: status = 0; /* invalid option */ - } - } - return status; -} - - -LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { - int status; - Closure *cl; - CallInfo *ci; - StkId func; - lua_lock(L); - swapextra(L); - if (*what == '>') { - ci = NULL; - func = L->top - 1; - api_check(L, ttisfunction(func), "function expected"); - what++; /* skip the '>' */ - L->top--; /* pop function */ - } - else { - ci = ar->i_ci; - func = ci->func; - lua_assert(ttisfunction(ci->func)); - } - cl = ttisclosure(func) ? clvalue(func) : NULL; - status = auxgetinfo(L, what, ar, cl, ci); - if (strchr(what, 'f')) { - setobjs2s(L, L->top, func); - api_incr_top(L); - } - swapextra(L); /* correct before option 'L', which can raise a mem. error */ - if (strchr(what, 'L')) - collectvalidlines(L, cl); - lua_unlock(L); - return status; -} - - -/* -** {====================================================== -** Symbolic Execution -** ======================================================= -*/ - -static const char *getobjname (Proto *p, int lastpc, int reg, - const char **name); - - -/* -** find a "name" for the RK value 'c' -*/ -static void kname (Proto *p, int pc, int c, const char **name) { - if (ISK(c)) { /* is 'c' a constant? */ - TValue *kvalue = &p->k[INDEXK(c)]; - if (ttisstring(kvalue)) { /* literal constant? */ - *name = svalue(kvalue); /* it is its own name */ - return; - } - /* else no reasonable name found */ - } - else { /* 'c' is a register */ - const char *what = getobjname(p, pc, c, name); /* search for 'c' */ - if (what && *what == 'c') { /* found a constant name? */ - return; /* 'name' already filled */ - } - /* else no reasonable name found */ - } - *name = "?"; /* no reasonable name found */ -} - - -static int filterpc (int pc, int jmptarget) { - if (pc < jmptarget) /* is code conditional (inside a jump)? */ - return -1; /* cannot know who sets that register */ - else return pc; /* current position sets that register */ -} - - -/* -** try to find last instruction before 'lastpc' that modified register 'reg' -*/ -static int findsetreg (Proto *p, int lastpc, int reg) { - int pc; - int setreg = -1; /* keep last instruction that changed 'reg' */ - int jmptarget = 0; /* any code before this address is conditional */ - for (pc = 0; pc < lastpc; pc++) { - Instruction i = p->code[pc]; - OpCode op = GET_OPCODE(i); - int a = GETARG_A(i); - switch (op) { - case OP_LOADNIL: { - int b = GETARG_B(i); - if (a <= reg && reg <= a + b) /* set registers from 'a' to 'a+b' */ - setreg = filterpc(pc, jmptarget); - break; - } - case OP_TFORCALL: { - if (reg >= a + 2) /* affect all regs above its base */ - setreg = filterpc(pc, jmptarget); - break; - } - case OP_CALL: - case OP_TAILCALL: { - if (reg >= a) /* affect all registers above base */ - setreg = filterpc(pc, jmptarget); - break; - } - case OP_JMP: { - int b = GETARG_sBx(i); - int dest = pc + 1 + b; - /* jump is forward and do not skip 'lastpc'? */ - if (pc < dest && dest <= lastpc) { - if (dest > jmptarget) - jmptarget = dest; /* update 'jmptarget' */ - } - break; - } - default: - if (testAMode(op) && reg == a) /* any instruction that set A */ - setreg = filterpc(pc, jmptarget); - break; - } - } - return setreg; -} - - -static const char *getobjname (Proto *p, int lastpc, int reg, - const char **name) { - int pc; - *name = luaF_getlocalname(p, reg + 1, lastpc); - if (*name) /* is a local? */ - return "local"; - /* else try symbolic execution */ - pc = findsetreg(p, lastpc, reg); - if (pc != -1) { /* could find instruction? */ - Instruction i = p->code[pc]; - OpCode op = GET_OPCODE(i); - switch (op) { - case OP_MOVE: { - int b = GETARG_B(i); /* move from 'b' to 'a' */ - if (b < GETARG_A(i)) - return getobjname(p, pc, b, name); /* get name for 'b' */ - break; - } - case OP_GETTABUP: - case OP_GETTABLE: { - int k = GETARG_C(i); /* key index */ - int t = GETARG_B(i); /* table index */ - const char *vn = (op == OP_GETTABLE) /* name of indexed variable */ - ? luaF_getlocalname(p, t + 1, pc) - : upvalname(p, t); - kname(p, pc, k, name); - return (vn && strcmp(vn, LUA_ENV) == 0) ? "global" : "field"; - } - case OP_GETUPVAL: { - *name = upvalname(p, GETARG_B(i)); - return "upvalue"; - } - case OP_LOADK: - case OP_LOADKX: { - int b = (op == OP_LOADK) ? GETARG_Bx(i) - : GETARG_Ax(p->code[pc + 1]); - if (ttisstring(&p->k[b])) { - *name = svalue(&p->k[b]); - return "constant"; - } - break; - } - case OP_SELF: { - int k = GETARG_C(i); /* key index */ - kname(p, pc, k, name); - return "method"; - } - default: break; /* go through to return NULL */ - } - } - return NULL; /* could not find reasonable name */ -} - - -/* -** Try to find a name for a function based on the code that called it. -** (Only works when function was called by a Lua function.) -** Returns what the name is (e.g., "for iterator", "method", -** "metamethod") and sets '*name' to point to the name. -*/ -static const char *funcnamefromcode (lua_State *L, CallInfo *ci, - const char **name) { - TMS tm = (TMS)0; /* (initial value avoids warnings) */ - Proto *p = ci_func(ci)->p; /* calling function */ - int pc = currentpc(ci); /* calling instruction index */ - Instruction i = p->code[pc]; /* calling instruction */ - if (ci->callstatus & CIST_HOOKED) { /* was it called inside a hook? */ - *name = "?"; - return "hook"; - } - switch (GET_OPCODE(i)) { - case OP_CALL: - case OP_TAILCALL: - return getobjname(p, pc, GETARG_A(i), name); /* get function name */ - case OP_TFORCALL: { /* for iterator */ - *name = "for iterator"; - return "for iterator"; - } - /* other instructions can do calls through metamethods */ - case OP_SELF: case OP_GETTABUP: case OP_GETTABLE: - tm = TM_INDEX; - break; - case OP_SETTABUP: case OP_SETTABLE: - tm = TM_NEWINDEX; - break; - case OP_ADD: case OP_SUB: case OP_MUL: case OP_MOD: - case OP_POW: case OP_DIV: case OP_IDIV: case OP_BAND: - case OP_BOR: case OP_BXOR: case OP_SHL: case OP_SHR: { - int offset = cast_int(GET_OPCODE(i)) - cast_int(OP_ADD); /* ORDER OP */ - tm = cast(TMS, offset + cast_int(TM_ADD)); /* ORDER TM */ - break; - } - case OP_UNM: tm = TM_UNM; break; - case OP_BNOT: tm = TM_BNOT; break; - case OP_LEN: tm = TM_LEN; break; - case OP_CONCAT: tm = TM_CONCAT; break; - case OP_EQ: tm = TM_EQ; break; - case OP_LT: tm = TM_LT; break; - case OP_LE: tm = TM_LE; break; - default: - return NULL; /* cannot find a reasonable name */ - } - *name = getstr(G(L)->tmname[tm]); - return "metamethod"; -} - -/* }====================================================== */ - - - -/* -** The subtraction of two potentially unrelated pointers is -** not ISO C, but it should not crash a program; the subsequent -** checks are ISO C and ensure a correct result. -*/ -static int isinstack (CallInfo *ci, const TValue *o) { - ptrdiff_t i = o - ci->u.l.base; - return (0 <= i && i < (ci->top - ci->u.l.base) && ci->u.l.base + i == o); -} - - -/* -** Checks whether value 'o' came from an upvalue. (That can only happen -** with instructions OP_GETTABUP/OP_SETTABUP, which operate directly on -** upvalues.) -*/ -static const char *getupvalname (CallInfo *ci, const TValue *o, - const char **name) { - LClosure *c = ci_func(ci); - int i; - for (i = 0; i < c->nupvalues; i++) { - if (c->upvals[i]->v == o) { - *name = upvalname(c->p, i); - return "upvalue"; - } - } - return NULL; -} - - -static const char *varinfo (lua_State *L, const TValue *o) { - const char *name = NULL; /* to avoid warnings */ - CallInfo *ci = L->ci; - const char *kind = NULL; - if (isLua(ci)) { - kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */ - if (!kind && isinstack(ci, o)) /* no? try a register */ - kind = getobjname(ci_func(ci)->p, currentpc(ci), - cast_int(o - ci->u.l.base), &name); - } - return (kind) ? luaO_pushfstring(L, " (%s '%s')", kind, name) : ""; -} - - -l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) { - const char *t = luaT_objtypename(L, o); - luaG_runerror(L, "attempt to %s a %s value%s", op, t, varinfo(L, o)); -} - - -l_noret luaG_concaterror (lua_State *L, const TValue *p1, const TValue *p2) { - if (ttisstring(p1) || cvt2str(p1)) p1 = p2; - luaG_typeerror(L, p1, "concatenate"); -} - - -l_noret luaG_opinterror (lua_State *L, const TValue *p1, - const TValue *p2, const char *msg) { - lua_Number temp; - if (!tonumber(p1, &temp)) /* first operand is wrong? */ - p2 = p1; /* now second is wrong */ - luaG_typeerror(L, p2, msg); -} - - -/* -** Error when both values are convertible to numbers, but not to integers -*/ -l_noret luaG_tointerror (lua_State *L, const TValue *p1, const TValue *p2) { - lua_Integer temp; - if (!tointeger(p1, &temp)) - p2 = p1; - luaG_runerror(L, "number%s has no integer representation", varinfo(L, p2)); -} - - -l_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) { - const char *t1 = luaT_objtypename(L, p1); - const char *t2 = luaT_objtypename(L, p2); - if (strcmp(t1, t2) == 0) - luaG_runerror(L, "attempt to compare two %s values", t1); - else - luaG_runerror(L, "attempt to compare %s with %s", t1, t2); -} - - -/* add src:line information to 'msg' */ -const char *luaG_addinfo (lua_State *L, const char *msg, TString *src, - int line) { - char buff[LUA_IDSIZE]; - if (src) - luaO_chunkid(buff, getstr(src), LUA_IDSIZE); - else { /* no source available; use "?" instead */ - buff[0] = '?'; buff[1] = '\0'; - } - return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); -} - - -l_noret luaG_errormsg (lua_State *L) { - if (L->errfunc != 0) { /* is there an error handling function? */ - StkId errfunc = restorestack(L, L->errfunc); - setobjs2s(L, L->top, L->top - 1); /* move argument */ - setobjs2s(L, L->top - 1, errfunc); /* push function */ - L->top++; /* assume EXTRA_STACK */ - luaD_callnoyield(L, L->top - 2, 1); /* call it */ - } - luaD_throw(L, LUA_ERRRUN); -} - - -l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { - CallInfo *ci = L->ci; - const char *msg; - va_list argp; - luaC_checkGC(L); /* error message uses memory */ - va_start(argp, fmt); - msg = luaO_pushvfstring(L, fmt, argp); /* format message */ - va_end(argp); - if (isLua(ci)) /* if Lua function, add source:line information */ - luaG_addinfo(L, msg, ci_func(ci)->p->source, currentline(ci)); - luaG_errormsg(L); -} - - -void luaG_traceexec (lua_State *L) { - CallInfo *ci = L->ci; - lu_byte mask = L->hookmask; - int counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT)); - if (counthook) - resethookcount(L); /* reset count */ - else if (!(mask & LUA_MASKLINE)) - return; /* no line hook and count != 0; nothing to be done */ - if (ci->callstatus & CIST_HOOKYIELD) { /* called hook last time? */ - ci->callstatus &= ~CIST_HOOKYIELD; /* erase mark */ - return; /* do not call hook again (VM yielded, so it did not move) */ - } - if (counthook) - luaD_hook(L, LUA_HOOKCOUNT, -1); /* call count hook */ - if (mask & LUA_MASKLINE) { - Proto *p = ci_func(ci)->p; - int npc = pcRel(ci->u.l.savedpc, p); - int newline = getfuncline(p, npc); - if (npc == 0 || /* call linehook when enter a new function, */ - ci->u.l.savedpc <= L->oldpc || /* when jump back (loop), or when */ - newline != getfuncline(p, pcRel(L->oldpc, p))) /* enter a new line */ - luaD_hook(L, LUA_HOOKLINE, newline); /* call line hook */ - } - L->oldpc = ci->u.l.savedpc; - if (L->status == LUA_YIELD) { /* did hook yield? */ - if (counthook) - L->hookcount = 1; /* undo decrement to zero */ - ci->u.l.savedpc--; /* undo increment (resume will increment it again) */ - ci->callstatus |= CIST_HOOKYIELD; /* mark that it yielded */ - ci->func = L->top - 1; /* protect stack below results */ - luaD_throw(L, LUA_YIELD); - } -} - diff --git a/build/premake/premake5/contrib/lua/src/ldebug.h b/build/premake/premake5/contrib/lua/src/ldebug.h deleted file mode 100644 index 8cea0ee0a7..0000000000 --- a/build/premake/premake5/contrib/lua/src/ldebug.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -** $Id: ldebug.h,v 2.14.1.1 2017/04/19 17:20:42 roberto Exp $ -** Auxiliary functions from Debug Interface module -** See Copyright Notice in lua.h -*/ - -#ifndef ldebug_h -#define ldebug_h - - -#include "lstate.h" - - -#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) - -#define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) - -#define resethookcount(L) (L->hookcount = L->basehookcount) - - -LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, - const char *opname); -LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, - const TValue *p2); -LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, - const TValue *p2, - const char *msg); -LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, - const TValue *p2); -LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, - const TValue *p2); -LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); -LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg, - TString *src, int line); -LUAI_FUNC l_noret luaG_errormsg (lua_State *L); -LUAI_FUNC void luaG_traceexec (lua_State *L); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/ldo.c b/build/premake/premake5/contrib/lua/src/ldo.c deleted file mode 100644 index 316e45c8fe..0000000000 --- a/build/premake/premake5/contrib/lua/src/ldo.c +++ /dev/null @@ -1,802 +0,0 @@ -/* -** $Id: ldo.c,v 2.157.1.1 2017/04/19 17:20:42 roberto Exp $ -** Stack and Call structure of Lua -** See Copyright Notice in lua.h -*/ - -#define ldo_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include -#include - -#include "lua.h" - -#include "lapi.h" -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lgc.h" -#include "lmem.h" -#include "lobject.h" -#include "lopcodes.h" -#include "lparser.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" -#include "lundump.h" -#include "lvm.h" -#include "lzio.h" - - - -#define errorstatus(s) ((s) > LUA_YIELD) - - -/* -** {====================================================== -** Error-recovery functions -** ======================================================= -*/ - -/* -** LUAI_THROW/LUAI_TRY define how Lua does exception handling. By -** default, Lua handles errors with exceptions when compiling as -** C++ code, with _longjmp/_setjmp when asked to use them, and with -** longjmp/setjmp otherwise. -*/ -#if !defined(LUAI_THROW) /* { */ - -#if defined(__cplusplus) && !defined(LUA_USE_LONGJMP) /* { */ - -/* C++ exceptions */ -#define LUAI_THROW(L,c) throw(c) -#define LUAI_TRY(L,c,a) \ - try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; } -#define luai_jmpbuf int /* dummy variable */ - -#elif defined(LUA_USE_POSIX) /* }{ */ - -/* in POSIX, try _longjmp/_setjmp (more efficient) */ -#define LUAI_THROW(L,c) _longjmp((c)->b, 1) -#define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } -#define luai_jmpbuf jmp_buf - -#else /* }{ */ - -/* ISO C handling with long jumps */ -#define LUAI_THROW(L,c) longjmp((c)->b, 1) -#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } -#define luai_jmpbuf jmp_buf - -#endif /* } */ - -#endif /* } */ - - - -/* chain list of long jump buffers */ -struct lua_longjmp { - struct lua_longjmp *previous; - luai_jmpbuf b; - volatile int status; /* error code */ -}; - - -static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { - switch (errcode) { - case LUA_ERRMEM: { /* memory error? */ - setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */ - break; - } - case LUA_ERRERR: { - setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling")); - break; - } - default: { - setobjs2s(L, oldtop, L->top - 1); /* error message on current top */ - break; - } - } - L->top = oldtop + 1; -} - - -l_noret luaD_throw (lua_State *L, int errcode) { - if (L->errorJmp) { /* thread has an error handler? */ - L->errorJmp->status = errcode; /* set status */ - LUAI_THROW(L, L->errorJmp); /* jump to it */ - } - else { /* thread has no error handler */ - global_State *g = G(L); - L->status = cast_byte(errcode); /* mark it as dead */ - if (g->mainthread->errorJmp) { /* main thread has a handler? */ - setobjs2s(L, g->mainthread->top++, L->top - 1); /* copy error obj. */ - luaD_throw(g->mainthread, errcode); /* re-throw in main thread */ - } - else { /* no handler at all; abort */ - if (g->panic) { /* panic function? */ - seterrorobj(L, errcode, L->top); /* assume EXTRA_STACK */ - if (L->ci->top < L->top) - L->ci->top = L->top; /* pushing msg. can break this invariant */ - lua_unlock(L); - g->panic(L); /* call panic function (last chance to jump out) */ - } - abort(); - } - } -} - - -int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { - unsigned short oldnCcalls = L->nCcalls; - struct lua_longjmp lj; - lj.status = LUA_OK; - lj.previous = L->errorJmp; /* chain new error handler */ - L->errorJmp = &lj; - LUAI_TRY(L, &lj, - (*f)(L, ud); - ); - L->errorJmp = lj.previous; /* restore old error handler */ - L->nCcalls = oldnCcalls; - return lj.status; -} - -/* }====================================================== */ - - -/* -** {================================================================== -** Stack reallocation -** =================================================================== -*/ -static void correctstack (lua_State *L, TValue *oldstack) { - CallInfo *ci; - UpVal *up; - L->top = (L->top - oldstack) + L->stack; - for (up = L->openupval; up != NULL; up = up->u.open.next) - up->v = (up->v - oldstack) + L->stack; - for (ci = L->ci; ci != NULL; ci = ci->previous) { - ci->top = (ci->top - oldstack) + L->stack; - ci->func = (ci->func - oldstack) + L->stack; - if (isLua(ci)) - ci->u.l.base = (ci->u.l.base - oldstack) + L->stack; - } -} - - -/* some space for error handling */ -#define ERRORSTACKSIZE (LUAI_MAXSTACK + 200) - - -void luaD_reallocstack (lua_State *L, int newsize) { - TValue *oldstack = L->stack; - int lim = L->stacksize; - lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE); - lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK); - luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue); - for (; lim < newsize; lim++) - setnilvalue(L->stack + lim); /* erase new segment */ - L->stacksize = newsize; - L->stack_last = L->stack + newsize - EXTRA_STACK; - correctstack(L, oldstack); -} - - -void luaD_growstack (lua_State *L, int n) { - int size = L->stacksize; - if (size > LUAI_MAXSTACK) /* error after extra size? */ - luaD_throw(L, LUA_ERRERR); - else { - int needed = cast_int(L->top - L->stack) + n + EXTRA_STACK; - int newsize = 2 * size; - if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK; - if (newsize < needed) newsize = needed; - if (newsize > LUAI_MAXSTACK) { /* stack overflow? */ - luaD_reallocstack(L, ERRORSTACKSIZE); - luaG_runerror(L, "stack overflow"); - } - else - luaD_reallocstack(L, newsize); - } -} - - -static int stackinuse (lua_State *L) { - CallInfo *ci; - StkId lim = L->top; - for (ci = L->ci; ci != NULL; ci = ci->previous) { - if (lim < ci->top) lim = ci->top; - } - lua_assert(lim <= L->stack_last); - return cast_int(lim - L->stack) + 1; /* part of stack in use */ -} - - -void luaD_shrinkstack (lua_State *L) { - int inuse = stackinuse(L); - int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK; - if (goodsize > LUAI_MAXSTACK) - goodsize = LUAI_MAXSTACK; /* respect stack limit */ - if (L->stacksize > LUAI_MAXSTACK) /* had been handling stack overflow? */ - luaE_freeCI(L); /* free all CIs (list grew because of an error) */ - else - luaE_shrinkCI(L); /* shrink list */ - /* if thread is currently not handling a stack overflow and its - good size is smaller than current size, shrink its stack */ - if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && - goodsize < L->stacksize) - luaD_reallocstack(L, goodsize); - else /* don't change stack */ - condmovestack(L,{},{}); /* (change only for debugging) */ -} - - -void luaD_inctop (lua_State *L) { - luaD_checkstack(L, 1); - L->top++; -} - -/* }================================================================== */ - - -/* -** Call a hook for the given event. Make sure there is a hook to be -** called. (Both 'L->hook' and 'L->hookmask', which triggers this -** function, can be changed asynchronously by signals.) -*/ -void luaD_hook (lua_State *L, int event, int line) { - lua_Hook hook = L->hook; - if (hook && L->allowhook) { /* make sure there is a hook */ - CallInfo *ci = L->ci; - ptrdiff_t top = savestack(L, L->top); - ptrdiff_t ci_top = savestack(L, ci->top); - lua_Debug ar; - ar.event = event; - ar.currentline = line; - ar.i_ci = ci; - luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ - ci->top = L->top + LUA_MINSTACK; - lua_assert(ci->top <= L->stack_last); - L->allowhook = 0; /* cannot call hooks inside a hook */ - ci->callstatus |= CIST_HOOKED; - lua_unlock(L); - (*hook)(L, &ar); - lua_lock(L); - lua_assert(!L->allowhook); - L->allowhook = 1; - ci->top = restorestack(L, ci_top); - L->top = restorestack(L, top); - ci->callstatus &= ~CIST_HOOKED; - } -} - - -static void callhook (lua_State *L, CallInfo *ci) { - int hook = LUA_HOOKCALL; - ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */ - if (isLua(ci->previous) && - GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) { - ci->callstatus |= CIST_TAIL; - hook = LUA_HOOKTAILCALL; - } - luaD_hook(L, hook, -1); - ci->u.l.savedpc--; /* correct 'pc' */ -} - - -static StkId adjust_varargs (lua_State *L, Proto *p, int actual) { - int i; - int nfixargs = p->numparams; - StkId base, fixed; - /* move fixed parameters to final position */ - fixed = L->top - actual; /* first fixed argument */ - base = L->top; /* final position of first argument */ - for (i = 0; i < nfixargs && i < actual; i++) { - setobjs2s(L, L->top++, fixed + i); - setnilvalue(fixed + i); /* erase original copy (for GC) */ - } - for (; i < nfixargs; i++) - setnilvalue(L->top++); /* complete missing arguments */ - return base; -} - - -/* -** Check whether __call metafield of 'func' is a function. If so, put -** it in stack below original 'func' so that 'luaD_precall' can call -** it. Raise an error if __call metafield is not a function. -*/ -static void tryfuncTM (lua_State *L, StkId func) { - const TValue *tm = luaT_gettmbyobj(L, func, TM_CALL); - StkId p; - if (!ttisfunction(tm)) - luaG_typeerror(L, func, "call"); - /* Open a hole inside the stack at 'func' */ - for (p = L->top; p > func; p--) - setobjs2s(L, p, p-1); - L->top++; /* slot ensured by caller */ - setobj2s(L, func, tm); /* tag method is the new function to be called */ -} - - -/* -** Given 'nres' results at 'firstResult', move 'wanted' of them to 'res'. -** Handle most typical cases (zero results for commands, one result for -** expressions, multiple results for tail calls/single parameters) -** separated. -*/ -static int moveresults (lua_State *L, const TValue *firstResult, StkId res, - int nres, int wanted) { - switch (wanted) { /* handle typical cases separately */ - case 0: break; /* nothing to move */ - case 1: { /* one result needed */ - if (nres == 0) /* no results? */ - firstResult = luaO_nilobject; /* adjust with nil */ - setobjs2s(L, res, firstResult); /* move it to proper place */ - break; - } - case LUA_MULTRET: { - int i; - for (i = 0; i < nres; i++) /* move all results to correct place */ - setobjs2s(L, res + i, firstResult + i); - L->top = res + nres; - return 0; /* wanted == LUA_MULTRET */ - } - default: { - int i; - if (wanted <= nres) { /* enough results? */ - for (i = 0; i < wanted; i++) /* move wanted results to correct place */ - setobjs2s(L, res + i, firstResult + i); - } - else { /* not enough results; use all of them plus nils */ - for (i = 0; i < nres; i++) /* move all results to correct place */ - setobjs2s(L, res + i, firstResult + i); - for (; i < wanted; i++) /* complete wanted number of results */ - setnilvalue(res + i); - } - break; - } - } - L->top = res + wanted; /* top points after the last result */ - return 1; -} - - -/* -** Finishes a function call: calls hook if necessary, removes CallInfo, -** moves current number of results to proper place; returns 0 iff call -** wanted multiple (variable number of) results. -*/ -int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) { - StkId res; - int wanted = ci->nresults; - if (L->hookmask & (LUA_MASKRET | LUA_MASKLINE)) { - if (L->hookmask & LUA_MASKRET) { - ptrdiff_t fr = savestack(L, firstResult); /* hook may change stack */ - luaD_hook(L, LUA_HOOKRET, -1); - firstResult = restorestack(L, fr); - } - L->oldpc = ci->previous->u.l.savedpc; /* 'oldpc' for caller function */ - } - res = ci->func; /* res == final position of 1st result */ - L->ci = ci->previous; /* back to caller */ - /* move results to proper place */ - return moveresults(L, firstResult, res, nres, wanted); -} - - - -#define next_ci(L) (L->ci = (L->ci->next ? L->ci->next : luaE_extendCI(L))) - - -/* macro to check stack size, preserving 'p' */ -#define checkstackp(L,n,p) \ - luaD_checkstackaux(L, n, \ - ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \ - luaC_checkGC(L), /* stack grow uses memory */ \ - p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ - - -/* -** Prepares a function call: checks the stack, creates a new CallInfo -** entry, fills in the relevant information, calls hook if needed. -** If function is a C function, does the call, too. (Otherwise, leave -** the execution ('luaV_execute') to the caller, to allow stackless -** calls.) Returns true iff function has been executed (C function). -*/ -int luaD_precall (lua_State *L, StkId func, int nresults) { - lua_CFunction f; - CallInfo *ci; - switch (ttype(func)) { - case LUA_TCCL: /* C closure */ - f = clCvalue(func)->f; - goto Cfunc; - case LUA_TLCF: /* light C function */ - f = fvalue(func); - Cfunc: { - int n; /* number of returns */ - checkstackp(L, LUA_MINSTACK, func); /* ensure minimum stack size */ - ci = next_ci(L); /* now 'enter' new function */ - ci->nresults = nresults; - ci->func = func; - ci->top = L->top + LUA_MINSTACK; - lua_assert(ci->top <= L->stack_last); - ci->callstatus = 0; - if (L->hookmask & LUA_MASKCALL) - luaD_hook(L, LUA_HOOKCALL, -1); - lua_unlock(L); - n = (*f)(L); /* do the actual call */ - lua_lock(L); - api_checknelems(L, n); - luaD_poscall(L, ci, L->top - n, n); - return 1; - } - case LUA_TLCL: { /* Lua function: prepare its call */ - StkId base; - Proto *p = clLvalue(func)->p; - int n = cast_int(L->top - func) - 1; /* number of real arguments */ - int fsize = p->maxstacksize; /* frame size */ - checkstackp(L, fsize, func); - if (p->is_vararg) - base = adjust_varargs(L, p, n); - else { /* non vararg function */ - for (; n < p->numparams; n++) - setnilvalue(L->top++); /* complete missing arguments */ - base = func + 1; - } - ci = next_ci(L); /* now 'enter' new function */ - ci->nresults = nresults; - ci->func = func; - ci->u.l.base = base; - L->top = ci->top = base + fsize; - lua_assert(ci->top <= L->stack_last); - ci->u.l.savedpc = p->code; /* starting point */ - ci->callstatus = CIST_LUA; - if (L->hookmask & LUA_MASKCALL) - callhook(L, ci); - return 0; - } - default: { /* not a function */ - checkstackp(L, 1, func); /* ensure space for metamethod */ - tryfuncTM(L, func); /* try to get '__call' metamethod */ - return luaD_precall(L, func, nresults); /* now it must be a function */ - } - } -} - - -/* -** Check appropriate error for stack overflow ("regular" overflow or -** overflow while handling stack overflow). If 'nCalls' is larger than -** LUAI_MAXCCALLS (which means it is handling a "regular" overflow) but -** smaller than 9/8 of LUAI_MAXCCALLS, does not report an error (to -** allow overflow handling to work) -*/ -static void stackerror (lua_State *L) { - if (L->nCcalls == LUAI_MAXCCALLS) - luaG_runerror(L, "C stack overflow"); - else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3))) - luaD_throw(L, LUA_ERRERR); /* error while handing stack error */ -} - - -/* -** Call a function (C or Lua). The function to be called is at *func. -** The arguments are on the stack, right after the function. -** When returns, all the results are on the stack, starting at the original -** function position. -*/ -void luaD_call (lua_State *L, StkId func, int nResults) { - if (++L->nCcalls >= LUAI_MAXCCALLS) - stackerror(L); - if (!luaD_precall(L, func, nResults)) /* is a Lua function? */ - luaV_execute(L); /* call it */ - L->nCcalls--; -} - - -/* -** Similar to 'luaD_call', but does not allow yields during the call -*/ -void luaD_callnoyield (lua_State *L, StkId func, int nResults) { - L->nny++; - luaD_call(L, func, nResults); - L->nny--; -} - - -/* -** Completes the execution of an interrupted C function, calling its -** continuation function. -*/ -static void finishCcall (lua_State *L, int status) { - CallInfo *ci = L->ci; - int n; - /* must have a continuation and must be able to call it */ - lua_assert(ci->u.c.k != NULL && L->nny == 0); - /* error status can only happen in a protected call */ - lua_assert((ci->callstatus & CIST_YPCALL) || status == LUA_YIELD); - if (ci->callstatus & CIST_YPCALL) { /* was inside a pcall? */ - ci->callstatus &= ~CIST_YPCALL; /* continuation is also inside it */ - L->errfunc = ci->u.c.old_errfunc; /* with the same error function */ - } - /* finish 'lua_callk'/'lua_pcall'; CIST_YPCALL and 'errfunc' already - handled */ - adjustresults(L, ci->nresults); - lua_unlock(L); - n = (*ci->u.c.k)(L, status, ci->u.c.ctx); /* call continuation function */ - lua_lock(L); - api_checknelems(L, n); - luaD_poscall(L, ci, L->top - n, n); /* finish 'luaD_precall' */ -} - - -/* -** Executes "full continuation" (everything in the stack) of a -** previously interrupted coroutine until the stack is empty (or another -** interruption long-jumps out of the loop). If the coroutine is -** recovering from an error, 'ud' points to the error status, which must -** be passed to the first continuation function (otherwise the default -** status is LUA_YIELD). -*/ -static void unroll (lua_State *L, void *ud) { - if (ud != NULL) /* error status? */ - finishCcall(L, *(int *)ud); /* finish 'lua_pcallk' callee */ - while (L->ci != &L->base_ci) { /* something in the stack */ - if (!isLua(L->ci)) /* C function? */ - finishCcall(L, LUA_YIELD); /* complete its execution */ - else { /* Lua function */ - luaV_finishOp(L); /* finish interrupted instruction */ - luaV_execute(L); /* execute down to higher C 'boundary' */ - } - } -} - - -/* -** Try to find a suspended protected call (a "recover point") for the -** given thread. -*/ -static CallInfo *findpcall (lua_State *L) { - CallInfo *ci; - for (ci = L->ci; ci != NULL; ci = ci->previous) { /* search for a pcall */ - if (ci->callstatus & CIST_YPCALL) - return ci; - } - return NULL; /* no pending pcall */ -} - - -/* -** Recovers from an error in a coroutine. Finds a recover point (if -** there is one) and completes the execution of the interrupted -** 'luaD_pcall'. If there is no recover point, returns zero. -*/ -static int recover (lua_State *L, int status) { - StkId oldtop; - CallInfo *ci = findpcall(L); - if (ci == NULL) return 0; /* no recovery point */ - /* "finish" luaD_pcall */ - oldtop = restorestack(L, ci->extra); - luaF_close(L, oldtop); - seterrorobj(L, status, oldtop); - L->ci = ci; - L->allowhook = getoah(ci->callstatus); /* restore original 'allowhook' */ - L->nny = 0; /* should be zero to be yieldable */ - luaD_shrinkstack(L); - L->errfunc = ci->u.c.old_errfunc; - return 1; /* continue running the coroutine */ -} - - -/* -** Signal an error in the call to 'lua_resume', not in the execution -** of the coroutine itself. (Such errors should not be handled by any -** coroutine error handler and should not kill the coroutine.) -*/ -static int resume_error (lua_State *L, const char *msg, int narg) { - L->top -= narg; /* remove args from the stack */ - setsvalue2s(L, L->top, luaS_new(L, msg)); /* push error message */ - api_incr_top(L); - lua_unlock(L); - return LUA_ERRRUN; -} - - -/* -** Do the work for 'lua_resume' in protected mode. Most of the work -** depends on the status of the coroutine: initial state, suspended -** inside a hook, or regularly suspended (optionally with a continuation -** function), plus erroneous cases: non-suspended coroutine or dead -** coroutine. -*/ -static void resume (lua_State *L, void *ud) { - int n = *(cast(int*, ud)); /* number of arguments */ - StkId firstArg = L->top - n; /* first argument */ - CallInfo *ci = L->ci; - if (L->status == LUA_OK) { /* starting a coroutine? */ - if (!luaD_precall(L, firstArg - 1, LUA_MULTRET)) /* Lua function? */ - luaV_execute(L); /* call it */ - } - else { /* resuming from previous yield */ - lua_assert(L->status == LUA_YIELD); - L->status = LUA_OK; /* mark that it is running (again) */ - ci->func = restorestack(L, ci->extra); - if (isLua(ci)) /* yielded inside a hook? */ - luaV_execute(L); /* just continue running Lua code */ - else { /* 'common' yield */ - if (ci->u.c.k != NULL) { /* does it have a continuation function? */ - lua_unlock(L); - n = (*ci->u.c.k)(L, LUA_YIELD, ci->u.c.ctx); /* call continuation */ - lua_lock(L); - api_checknelems(L, n); - firstArg = L->top - n; /* yield results come from continuation */ - } - luaD_poscall(L, ci, firstArg, n); /* finish 'luaD_precall' */ - } - unroll(L, NULL); /* run continuation */ - } -} - - -LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) { - int status; - unsigned short oldnny = L->nny; /* save "number of non-yieldable" calls */ - lua_lock(L); - if (L->status == LUA_OK) { /* may be starting a coroutine */ - if (L->ci != &L->base_ci) /* not in base level? */ - return resume_error(L, "cannot resume non-suspended coroutine", nargs); - } - else if (L->status != LUA_YIELD) - return resume_error(L, "cannot resume dead coroutine", nargs); - L->nCcalls = (from) ? from->nCcalls + 1 : 1; - if (L->nCcalls >= LUAI_MAXCCALLS) - return resume_error(L, "C stack overflow", nargs); - luai_userstateresume(L, nargs); - L->nny = 0; /* allow yields */ - api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs); - status = luaD_rawrunprotected(L, resume, &nargs); - if (status == -1) /* error calling 'lua_resume'? */ - status = LUA_ERRRUN; - else { /* continue running after recoverable errors */ - while (errorstatus(status) && recover(L, status)) { - /* unroll continuation */ - status = luaD_rawrunprotected(L, unroll, &status); - } - if (errorstatus(status)) { /* unrecoverable error? */ - L->status = cast_byte(status); /* mark thread as 'dead' */ - seterrorobj(L, status, L->top); /* push error message */ - L->ci->top = L->top; - } - else lua_assert(status == L->status); /* normal end or yield */ - } - L->nny = oldnny; /* restore 'nny' */ - L->nCcalls--; - lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0)); - lua_unlock(L); - return status; -} - - -LUA_API int lua_isyieldable (lua_State *L) { - return (L->nny == 0); -} - - -LUA_API int lua_yieldk (lua_State *L, int nresults, lua_KContext ctx, - lua_KFunction k) { - CallInfo *ci = L->ci; - luai_userstateyield(L, nresults); - lua_lock(L); - api_checknelems(L, nresults); - if (L->nny > 0) { - if (L != G(L)->mainthread) - luaG_runerror(L, "attempt to yield across a C-call boundary"); - else - luaG_runerror(L, "attempt to yield from outside a coroutine"); - } - L->status = LUA_YIELD; - ci->extra = savestack(L, ci->func); /* save current 'func' */ - if (isLua(ci)) { /* inside a hook? */ - api_check(L, k == NULL, "hooks cannot continue after yielding"); - } - else { - if ((ci->u.c.k = k) != NULL) /* is there a continuation? */ - ci->u.c.ctx = ctx; /* save context */ - ci->func = L->top - nresults - 1; /* protect stack below results */ - luaD_throw(L, LUA_YIELD); - } - lua_assert(ci->callstatus & CIST_HOOKED); /* must be inside a hook */ - lua_unlock(L); - return 0; /* return to 'luaD_hook' */ -} - - -int luaD_pcall (lua_State *L, Pfunc func, void *u, - ptrdiff_t old_top, ptrdiff_t ef) { - int status; - CallInfo *old_ci = L->ci; - lu_byte old_allowhooks = L->allowhook; - unsigned short old_nny = L->nny; - ptrdiff_t old_errfunc = L->errfunc; - L->errfunc = ef; - status = luaD_rawrunprotected(L, func, u); - if (status != LUA_OK) { /* an error occurred? */ - StkId oldtop = restorestack(L, old_top); - luaF_close(L, oldtop); /* close possible pending closures */ - seterrorobj(L, status, oldtop); - L->ci = old_ci; - L->allowhook = old_allowhooks; - L->nny = old_nny; - luaD_shrinkstack(L); - } - L->errfunc = old_errfunc; - return status; -} - - - -/* -** Execute a protected parser. -*/ -struct SParser { /* data to 'f_parser' */ - ZIO *z; - Mbuffer buff; /* dynamic structure used by the scanner */ - Dyndata dyd; /* dynamic structures used by the parser */ - const char *mode; - const char *name; -}; - - -static void checkmode (lua_State *L, const char *mode, const char *x) { - if (mode && strchr(mode, x[0]) == NULL) { - luaO_pushfstring(L, - "attempt to load a %s chunk (mode is '%s')", x, mode); - luaD_throw(L, LUA_ERRSYNTAX); - } -} - - -static void f_parser (lua_State *L, void *ud) { - LClosure *cl; - struct SParser *p = cast(struct SParser *, ud); - int c = zgetc(p->z); /* read first character */ - if (c == LUA_SIGNATURE[0]) { - checkmode(L, p->mode, "binary"); - cl = luaU_undump(L, p->z, p->name); - } - else { - checkmode(L, p->mode, "text"); - cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c); - } - lua_assert(cl->nupvalues == cl->p->sizeupvalues); - luaF_initupvals(L, cl); -} - - -int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, - const char *mode) { - struct SParser p; - int status; - L->nny++; /* cannot yield during parsing */ - p.z = z; p.name = name; p.mode = mode; - p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0; - p.dyd.gt.arr = NULL; p.dyd.gt.size = 0; - p.dyd.label.arr = NULL; p.dyd.label.size = 0; - luaZ_initbuffer(L, &p.buff); - status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc); - luaZ_freebuffer(L, &p.buff); - luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size); - luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size); - luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size); - L->nny--; - return status; -} - - diff --git a/build/premake/premake5/contrib/lua/src/ldo.h b/build/premake/premake5/contrib/lua/src/ldo.h deleted file mode 100644 index 3b2983a386..0000000000 --- a/build/premake/premake5/contrib/lua/src/ldo.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -** $Id: ldo.h,v 2.29.1.1 2017/04/19 17:20:42 roberto Exp $ -** Stack and Call structure of Lua -** See Copyright Notice in lua.h -*/ - -#ifndef ldo_h -#define ldo_h - - -#include "lobject.h" -#include "lstate.h" -#include "lzio.h" - - -/* -** Macro to check stack size and grow stack if needed. Parameters -** 'pre'/'pos' allow the macro to preserve a pointer into the -** stack across reallocations, doing the work only when needed. -** 'condmovestack' is used in heavy tests to force a stack reallocation -** at every check. -*/ -#define luaD_checkstackaux(L,n,pre,pos) \ - if (L->stack_last - L->top <= (n)) \ - { pre; luaD_growstack(L, n); pos; } else { condmovestack(L,pre,pos); } - -/* In general, 'pre'/'pos' are empty (nothing to save) */ -#define luaD_checkstack(L,n) luaD_checkstackaux(L,n,(void)0,(void)0) - - - -#define savestack(L,p) ((char *)(p) - (char *)L->stack) -#define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) - - -/* type of protected functions, to be ran by 'runprotected' */ -typedef void (*Pfunc) (lua_State *L, void *ud); - -LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, - const char *mode); -LUAI_FUNC void luaD_hook (lua_State *L, int event, int line); -LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); -LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); -LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults); -LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, - ptrdiff_t oldtop, ptrdiff_t ef); -LUAI_FUNC int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, - int nres); -LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); -LUAI_FUNC void luaD_growstack (lua_State *L, int n); -LUAI_FUNC void luaD_shrinkstack (lua_State *L); -LUAI_FUNC void luaD_inctop (lua_State *L); - -LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); -LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/ldump.c b/build/premake/premake5/contrib/lua/src/ldump.c deleted file mode 100644 index f025acac3c..0000000000 --- a/build/premake/premake5/contrib/lua/src/ldump.c +++ /dev/null @@ -1,215 +0,0 @@ -/* -** $Id: ldump.c,v 2.37.1.1 2017/04/19 17:20:42 roberto Exp $ -** save precompiled Lua chunks -** See Copyright Notice in lua.h -*/ - -#define ldump_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "lobject.h" -#include "lstate.h" -#include "lundump.h" - - -typedef struct { - lua_State *L; - lua_Writer writer; - void *data; - int strip; - int status; -} DumpState; - - -/* -** All high-level dumps go through DumpVector; you can change it to -** change the endianness of the result -*/ -#define DumpVector(v,n,D) DumpBlock(v,(n)*sizeof((v)[0]),D) - -#define DumpLiteral(s,D) DumpBlock(s, sizeof(s) - sizeof(char), D) - - -static void DumpBlock (const void *b, size_t size, DumpState *D) { - if (D->status == 0 && size > 0) { - lua_unlock(D->L); - D->status = (*D->writer)(D->L, b, size, D->data); - lua_lock(D->L); - } -} - - -#define DumpVar(x,D) DumpVector(&x,1,D) - - -static void DumpByte (int y, DumpState *D) { - lu_byte x = (lu_byte)y; - DumpVar(x, D); -} - - -static void DumpInt (int x, DumpState *D) { - DumpVar(x, D); -} - - -static void DumpNumber (lua_Number x, DumpState *D) { - DumpVar(x, D); -} - - -static void DumpInteger (lua_Integer x, DumpState *D) { - DumpVar(x, D); -} - - -static void DumpString (const TString *s, DumpState *D) { - if (s == NULL) - DumpByte(0, D); - else { - size_t size = tsslen(s) + 1; /* include trailing '\0' */ - const char *str = getstr(s); - if (size < 0xFF) - DumpByte(cast_int(size), D); - else { - DumpByte(0xFF, D); - DumpVar(size, D); - } - DumpVector(str, size - 1, D); /* no need to save '\0' */ - } -} - - -static void DumpCode (const Proto *f, DumpState *D) { - DumpInt(f->sizecode, D); - DumpVector(f->code, f->sizecode, D); -} - - -static void DumpFunction(const Proto *f, TString *psource, DumpState *D); - -static void DumpConstants (const Proto *f, DumpState *D) { - int i; - int n = f->sizek; - DumpInt(n, D); - for (i = 0; i < n; i++) { - const TValue *o = &f->k[i]; - DumpByte(ttype(o), D); - switch (ttype(o)) { - case LUA_TNIL: - break; - case LUA_TBOOLEAN: - DumpByte(bvalue(o), D); - break; - case LUA_TNUMFLT: - DumpNumber(fltvalue(o), D); - break; - case LUA_TNUMINT: - DumpInteger(ivalue(o), D); - break; - case LUA_TSHRSTR: - case LUA_TLNGSTR: - DumpString(tsvalue(o), D); - break; - default: - lua_assert(0); - } - } -} - - -static void DumpProtos (const Proto *f, DumpState *D) { - int i; - int n = f->sizep; - DumpInt(n, D); - for (i = 0; i < n; i++) - DumpFunction(f->p[i], f->source, D); -} - - -static void DumpUpvalues (const Proto *f, DumpState *D) { - int i, n = f->sizeupvalues; - DumpInt(n, D); - for (i = 0; i < n; i++) { - DumpByte(f->upvalues[i].instack, D); - DumpByte(f->upvalues[i].idx, D); - } -} - - -static void DumpDebug (const Proto *f, DumpState *D) { - int i, n; - n = (D->strip) ? 0 : f->sizelineinfo; - DumpInt(n, D); - DumpVector(f->lineinfo, n, D); - n = (D->strip) ? 0 : f->sizelocvars; - DumpInt(n, D); - for (i = 0; i < n; i++) { - DumpString(f->locvars[i].varname, D); - DumpInt(f->locvars[i].startpc, D); - DumpInt(f->locvars[i].endpc, D); - } - n = (D->strip) ? 0 : f->sizeupvalues; - DumpInt(n, D); - for (i = 0; i < n; i++) - DumpString(f->upvalues[i].name, D); -} - - -static void DumpFunction (const Proto *f, TString *psource, DumpState *D) { - if (D->strip || f->source == psource) - DumpString(NULL, D); /* no debug info or same source as its parent */ - else - DumpString(f->source, D); - DumpInt(f->linedefined, D); - DumpInt(f->lastlinedefined, D); - DumpByte(f->numparams, D); - DumpByte(f->is_vararg, D); - DumpByte(f->maxstacksize, D); - DumpCode(f, D); - DumpConstants(f, D); - DumpUpvalues(f, D); - DumpProtos(f, D); - DumpDebug(f, D); -} - - -static void DumpHeader (DumpState *D) { - DumpLiteral(LUA_SIGNATURE, D); - DumpByte(LUAC_VERSION, D); - DumpByte(LUAC_FORMAT, D); - DumpLiteral(LUAC_DATA, D); - DumpByte(sizeof(int), D); - DumpByte(sizeof(size_t), D); - DumpByte(sizeof(Instruction), D); - DumpByte(sizeof(lua_Integer), D); - DumpByte(sizeof(lua_Number), D); - DumpInteger(LUAC_INT, D); - DumpNumber(LUAC_NUM, D); -} - - -/* -** dump Lua function as precompiled chunk -*/ -int luaU_dump(lua_State *L, const Proto *f, lua_Writer w, void *data, - int strip) { - DumpState D; - D.L = L; - D.writer = w; - D.data = data; - D.strip = strip; - D.status = 0; - DumpHeader(&D); - DumpByte(f->sizeupvalues, &D); - DumpFunction(f, NULL, &D); - return D.status; -} - diff --git a/build/premake/premake5/contrib/lua/src/lfunc.c b/build/premake/premake5/contrib/lua/src/lfunc.c deleted file mode 100644 index ccafbb8ab3..0000000000 --- a/build/premake/premake5/contrib/lua/src/lfunc.c +++ /dev/null @@ -1,151 +0,0 @@ -/* -** $Id: lfunc.c,v 2.45.1.1 2017/04/19 17:39:34 roberto Exp $ -** Auxiliary functions to manipulate prototypes and closures -** See Copyright Notice in lua.h -*/ - -#define lfunc_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "lfunc.h" -#include "lgc.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" - - - -CClosure *luaF_newCclosure (lua_State *L, int n) { - GCObject *o = luaC_newobj(L, LUA_TCCL, sizeCclosure(n)); - CClosure *c = gco2ccl(o); - c->nupvalues = cast_byte(n); - return c; -} - - -LClosure *luaF_newLclosure (lua_State *L, int n) { - GCObject *o = luaC_newobj(L, LUA_TLCL, sizeLclosure(n)); - LClosure *c = gco2lcl(o); - c->p = NULL; - c->nupvalues = cast_byte(n); - while (n--) c->upvals[n] = NULL; - return c; -} - -/* -** fill a closure with new closed upvalues -*/ -void luaF_initupvals (lua_State *L, LClosure *cl) { - int i; - for (i = 0; i < cl->nupvalues; i++) { - UpVal *uv = luaM_new(L, UpVal); - uv->refcount = 1; - uv->v = &uv->u.value; /* make it closed */ - setnilvalue(uv->v); - cl->upvals[i] = uv; - } -} - - -UpVal *luaF_findupval (lua_State *L, StkId level) { - UpVal **pp = &L->openupval; - UpVal *p; - UpVal *uv; - lua_assert(isintwups(L) || L->openupval == NULL); - while (*pp != NULL && (p = *pp)->v >= level) { - lua_assert(upisopen(p)); - if (p->v == level) /* found a corresponding upvalue? */ - return p; /* return it */ - pp = &p->u.open.next; - } - /* not found: create a new upvalue */ - uv = luaM_new(L, UpVal); - uv->refcount = 0; - uv->u.open.next = *pp; /* link it to list of open upvalues */ - uv->u.open.touched = 1; - *pp = uv; - uv->v = level; /* current value lives in the stack */ - if (!isintwups(L)) { /* thread not in list of threads with upvalues? */ - L->twups = G(L)->twups; /* link it to the list */ - G(L)->twups = L; - } - return uv; -} - - -void luaF_close (lua_State *L, StkId level) { - UpVal *uv; - while (L->openupval != NULL && (uv = L->openupval)->v >= level) { - lua_assert(upisopen(uv)); - L->openupval = uv->u.open.next; /* remove from 'open' list */ - if (uv->refcount == 0) /* no references? */ - luaM_free(L, uv); /* free upvalue */ - else { - setobj(L, &uv->u.value, uv->v); /* move value to upvalue slot */ - uv->v = &uv->u.value; /* now current value lives here */ - luaC_upvalbarrier(L, uv); - } - } -} - - -Proto *luaF_newproto (lua_State *L) { - GCObject *o = luaC_newobj(L, LUA_TPROTO, sizeof(Proto)); - Proto *f = gco2p(o); - f->k = NULL; - f->sizek = 0; - f->p = NULL; - f->sizep = 0; - f->code = NULL; - f->cache = NULL; - f->sizecode = 0; - f->lineinfo = NULL; - f->sizelineinfo = 0; - f->upvalues = NULL; - f->sizeupvalues = 0; - f->numparams = 0; - f->is_vararg = 0; - f->maxstacksize = 0; - f->locvars = NULL; - f->sizelocvars = 0; - f->linedefined = 0; - f->lastlinedefined = 0; - f->source = NULL; - return f; -} - - -void luaF_freeproto (lua_State *L, Proto *f) { - luaM_freearray(L, f->code, f->sizecode); - luaM_freearray(L, f->p, f->sizep); - luaM_freearray(L, f->k, f->sizek); - luaM_freearray(L, f->lineinfo, f->sizelineinfo); - luaM_freearray(L, f->locvars, f->sizelocvars); - luaM_freearray(L, f->upvalues, f->sizeupvalues); - luaM_free(L, f); -} - - -/* -** Look for n-th local variable at line 'line' in function 'func'. -** Returns NULL if not found. -*/ -const char *luaF_getlocalname (const Proto *f, int local_number, int pc) { - int i; - for (i = 0; isizelocvars && f->locvars[i].startpc <= pc; i++) { - if (pc < f->locvars[i].endpc) { /* is variable active? */ - local_number--; - if (local_number == 0) - return getstr(f->locvars[i].varname); - } - } - return NULL; /* not found */ -} - diff --git a/build/premake/premake5/contrib/lua/src/lfunc.h b/build/premake/premake5/contrib/lua/src/lfunc.h deleted file mode 100644 index c916e9878a..0000000000 --- a/build/premake/premake5/contrib/lua/src/lfunc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** $Id: lfunc.h,v 2.15.1.1 2017/04/19 17:39:34 roberto Exp $ -** Auxiliary functions to manipulate prototypes and closures -** See Copyright Notice in lua.h -*/ - -#ifndef lfunc_h -#define lfunc_h - - -#include "lobject.h" - - -#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ - cast(int, sizeof(TValue)*((n)-1))) - -#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ - cast(int, sizeof(TValue *)*((n)-1))) - - -/* test whether thread is in 'twups' list */ -#define isintwups(L) (L->twups != L) - - -/* -** maximum number of upvalues in a closure (both C and Lua). (Value -** must fit in a VM register.) -*/ -#define MAXUPVAL 255 - - -/* -** Upvalues for Lua closures -*/ -struct UpVal { - TValue *v; /* points to stack or to its own value */ - lu_mem refcount; /* reference counter */ - union { - struct { /* (when open) */ - UpVal *next; /* linked list */ - int touched; /* mark to avoid cycles with dead threads */ - } open; - TValue value; /* the value (when closed) */ - } u; -}; - -#define upisopen(up) ((up)->v != &(up)->u.value) - - -LUAI_FUNC Proto *luaF_newproto (lua_State *L); -LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); -LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); -LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl); -LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); -LUAI_FUNC void luaF_close (lua_State *L, StkId level); -LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); -LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, - int pc); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lgc.c b/build/premake/premake5/contrib/lua/src/lgc.c deleted file mode 100644 index db4df82922..0000000000 --- a/build/premake/premake5/contrib/lua/src/lgc.c +++ /dev/null @@ -1,1179 +0,0 @@ -/* -** $Id: lgc.c,v 2.215.1.2 2017/08/31 16:15:27 roberto Exp $ -** Garbage Collector -** See Copyright Notice in lua.h -*/ - -#define lgc_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lgc.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" - - -/* -** internal state for collector while inside the atomic phase. The -** collector should never be in this state while running regular code. -*/ -#define GCSinsideatomic (GCSpause + 1) - -/* -** cost of sweeping one element (the size of a small object divided -** by some adjust for the sweep speed) -*/ -#define GCSWEEPCOST ((sizeof(TString) + 4) / 4) - -/* maximum number of elements to sweep in each single step */ -#define GCSWEEPMAX (cast_int((GCSTEPSIZE / GCSWEEPCOST) / 4)) - -/* cost of calling one finalizer */ -#define GCFINALIZECOST GCSWEEPCOST - - -/* -** macro to adjust 'stepmul': 'stepmul' is actually used like -** 'stepmul / STEPMULADJ' (value chosen by tests) -*/ -#define STEPMULADJ 200 - - -/* -** macro to adjust 'pause': 'pause' is actually used like -** 'pause / PAUSEADJ' (value chosen by tests) -*/ -#define PAUSEADJ 100 - - -/* -** 'makewhite' erases all color bits then sets only the current white -** bit -*/ -#define maskcolors (~(bitmask(BLACKBIT) | WHITEBITS)) -#define makewhite(g,x) \ - (x->marked = cast_byte((x->marked & maskcolors) | luaC_white(g))) - -#define white2gray(x) resetbits(x->marked, WHITEBITS) -#define black2gray(x) resetbit(x->marked, BLACKBIT) - - -#define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) - -#define checkdeadkey(n) lua_assert(!ttisdeadkey(gkey(n)) || ttisnil(gval(n))) - - -#define checkconsistency(obj) \ - lua_longassert(!iscollectable(obj) || righttt(obj)) - - -#define markvalue(g,o) { checkconsistency(o); \ - if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); } - -#define markobject(g,t) { if (iswhite(t)) reallymarkobject(g, obj2gco(t)); } - -/* -** mark an object that can be NULL (either because it is really optional, -** or it was stripped as debug info, or inside an uncompleted structure) -*/ -#define markobjectN(g,t) { if (t) markobject(g,t); } - -static void reallymarkobject (global_State *g, GCObject *o); - - -/* -** {====================================================== -** Generic functions -** ======================================================= -*/ - - -/* -** one after last element in a hash array -*/ -#define gnodelast(h) gnode(h, cast(size_t, sizenode(h))) - - -/* -** link collectable object 'o' into list pointed by 'p' -*/ -#define linkgclist(o,p) ((o)->gclist = (p), (p) = obj2gco(o)) - - -/* -** If key is not marked, mark its entry as dead. This allows key to be -** collected, but keeps its entry in the table. A dead node is needed -** when Lua looks up for a key (it may be part of a chain) and when -** traversing a weak table (key might be removed from the table during -** traversal). Other places never manipulate dead keys, because its -** associated nil value is enough to signal that the entry is logically -** empty. -*/ -static void removeentry (Node *n) { - lua_assert(ttisnil(gval(n))); - if (valiswhite(gkey(n))) - setdeadvalue(wgkey(n)); /* unused and unmarked key; remove it */ -} - - -/* -** tells whether a key or value can be cleared from a weak -** table. Non-collectable objects are never removed from weak -** tables. Strings behave as 'values', so are never removed too. for -** other objects: if really collected, cannot keep them; for objects -** being finalized, keep them in keys, but not in values -*/ -static int iscleared (global_State *g, const TValue *o) { - if (!iscollectable(o)) return 0; - else if (ttisstring(o)) { - markobject(g, tsvalue(o)); /* strings are 'values', so are never weak */ - return 0; - } - else return iswhite(gcvalue(o)); -} - - -/* -** barrier that moves collector forward, that is, mark the white object -** being pointed by a black object. (If in sweep phase, clear the black -** object to white [sweep it] to avoid other barrier calls for this -** same object.) -*/ -void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { - global_State *g = G(L); - lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o)); - if (keepinvariant(g)) /* must keep invariant? */ - reallymarkobject(g, v); /* restore invariant */ - else { /* sweep phase */ - lua_assert(issweepphase(g)); - makewhite(g, o); /* mark main obj. as white to avoid other barriers */ - } -} - - -/* -** barrier that moves collector backward, that is, mark the black object -** pointing to a white object as gray again. -*/ -void luaC_barrierback_ (lua_State *L, Table *t) { - global_State *g = G(L); - lua_assert(isblack(t) && !isdead(g, t)); - black2gray(t); /* make table gray (again) */ - linkgclist(t, g->grayagain); -} - - -/* -** barrier for assignments to closed upvalues. Because upvalues are -** shared among closures, it is impossible to know the color of all -** closures pointing to it. So, we assume that the object being assigned -** must be marked. -*/ -void luaC_upvalbarrier_ (lua_State *L, UpVal *uv) { - global_State *g = G(L); - GCObject *o = gcvalue(uv->v); - lua_assert(!upisopen(uv)); /* ensured by macro luaC_upvalbarrier */ - if (keepinvariant(g)) - markobject(g, o); -} - - -void luaC_fix (lua_State *L, GCObject *o) { - global_State *g = G(L); - lua_assert(g->allgc == o); /* object must be 1st in 'allgc' list! */ - white2gray(o); /* they will be gray forever */ - g->allgc = o->next; /* remove object from 'allgc' list */ - o->next = g->fixedgc; /* link it to 'fixedgc' list */ - g->fixedgc = o; -} - - -/* -** create a new collectable object (with given type and size) and link -** it to 'allgc' list. -*/ -GCObject *luaC_newobj (lua_State *L, int tt, size_t sz) { - global_State *g = G(L); - GCObject *o = cast(GCObject *, luaM_newobject(L, novariant(tt), sz)); - o->marked = luaC_white(g); - o->tt = tt; - o->next = g->allgc; - g->allgc = o; - return o; -} - -/* }====================================================== */ - - - -/* -** {====================================================== -** Mark functions -** ======================================================= -*/ - - -/* -** mark an object. Userdata, strings, and closed upvalues are visited -** and turned black here. Other objects are marked gray and added -** to appropriate list to be visited (and turned black) later. (Open -** upvalues are already linked in 'headuv' list.) -*/ -static void reallymarkobject (global_State *g, GCObject *o) { - reentry: - white2gray(o); - switch (o->tt) { - case LUA_TSHRSTR: { - gray2black(o); - g->GCmemtrav += sizelstring(gco2ts(o)->shrlen); - break; - } - case LUA_TLNGSTR: { - gray2black(o); - g->GCmemtrav += sizelstring(gco2ts(o)->u.lnglen); - break; - } - case LUA_TUSERDATA: { - TValue uvalue; - markobjectN(g, gco2u(o)->metatable); /* mark its metatable */ - gray2black(o); - g->GCmemtrav += sizeudata(gco2u(o)); - getuservalue(g->mainthread, gco2u(o), &uvalue); - if (valiswhite(&uvalue)) { /* markvalue(g, &uvalue); */ - o = gcvalue(&uvalue); - goto reentry; - } - break; - } - case LUA_TLCL: { - linkgclist(gco2lcl(o), g->gray); - break; - } - case LUA_TCCL: { - linkgclist(gco2ccl(o), g->gray); - break; - } - case LUA_TTABLE: { - linkgclist(gco2t(o), g->gray); - break; - } - case LUA_TTHREAD: { - linkgclist(gco2th(o), g->gray); - break; - } - case LUA_TPROTO: { - linkgclist(gco2p(o), g->gray); - break; - } - default: lua_assert(0); break; - } -} - - -/* -** mark metamethods for basic types -*/ -static void markmt (global_State *g) { - int i; - for (i=0; i < LUA_NUMTAGS; i++) - markobjectN(g, g->mt[i]); -} - - -/* -** mark all objects in list of being-finalized -*/ -static void markbeingfnz (global_State *g) { - GCObject *o; - for (o = g->tobefnz; o != NULL; o = o->next) - markobject(g, o); -} - - -/* -** Mark all values stored in marked open upvalues from non-marked threads. -** (Values from marked threads were already marked when traversing the -** thread.) Remove from the list threads that no longer have upvalues and -** not-marked threads. -*/ -static void remarkupvals (global_State *g) { - lua_State *thread; - lua_State **p = &g->twups; - while ((thread = *p) != NULL) { - lua_assert(!isblack(thread)); /* threads are never black */ - if (isgray(thread) && thread->openupval != NULL) - p = &thread->twups; /* keep marked thread with upvalues in the list */ - else { /* thread is not marked or without upvalues */ - UpVal *uv; - *p = thread->twups; /* remove thread from the list */ - thread->twups = thread; /* mark that it is out of list */ - for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) { - if (uv->u.open.touched) { - markvalue(g, uv->v); /* remark upvalue's value */ - uv->u.open.touched = 0; - } - } - } - } -} - - -/* -** mark root set and reset all gray lists, to start a new collection -*/ -static void restartcollection (global_State *g) { - g->gray = g->grayagain = NULL; - g->weak = g->allweak = g->ephemeron = NULL; - markobject(g, g->mainthread); - markvalue(g, &g->l_registry); - markmt(g); - markbeingfnz(g); /* mark any finalizing object left from previous cycle */ -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Traverse functions -** ======================================================= -*/ - -/* -** Traverse a table with weak values and link it to proper list. During -** propagate phase, keep it in 'grayagain' list, to be revisited in the -** atomic phase. In the atomic phase, if table has any white value, -** put it in 'weak' list, to be cleared. -*/ -static void traverseweakvalue (global_State *g, Table *h) { - Node *n, *limit = gnodelast(h); - /* if there is array part, assume it may have white values (it is not - worth traversing it now just to check) */ - int hasclears = (h->sizearray > 0); - for (n = gnode(h, 0); n < limit; n++) { /* traverse hash part */ - checkdeadkey(n); - if (ttisnil(gval(n))) /* entry is empty? */ - removeentry(n); /* remove it */ - else { - lua_assert(!ttisnil(gkey(n))); - markvalue(g, gkey(n)); /* mark key */ - if (!hasclears && iscleared(g, gval(n))) /* is there a white value? */ - hasclears = 1; /* table will have to be cleared */ - } - } - if (g->gcstate == GCSpropagate) - linkgclist(h, g->grayagain); /* must retraverse it in atomic phase */ - else if (hasclears) - linkgclist(h, g->weak); /* has to be cleared later */ -} - - -/* -** Traverse an ephemeron table and link it to proper list. Returns true -** iff any object was marked during this traversal (which implies that -** convergence has to continue). During propagation phase, keep table -** in 'grayagain' list, to be visited again in the atomic phase. In -** the atomic phase, if table has any white->white entry, it has to -** be revisited during ephemeron convergence (as that key may turn -** black). Otherwise, if it has any white key, table has to be cleared -** (in the atomic phase). -*/ -static int traverseephemeron (global_State *g, Table *h) { - int marked = 0; /* true if an object is marked in this traversal */ - int hasclears = 0; /* true if table has white keys */ - int hasww = 0; /* true if table has entry "white-key -> white-value" */ - Node *n, *limit = gnodelast(h); - unsigned int i; - /* traverse array part */ - for (i = 0; i < h->sizearray; i++) { - if (valiswhite(&h->array[i])) { - marked = 1; - reallymarkobject(g, gcvalue(&h->array[i])); - } - } - /* traverse hash part */ - for (n = gnode(h, 0); n < limit; n++) { - checkdeadkey(n); - if (ttisnil(gval(n))) /* entry is empty? */ - removeentry(n); /* remove it */ - else if (iscleared(g, gkey(n))) { /* key is not marked (yet)? */ - hasclears = 1; /* table must be cleared */ - if (valiswhite(gval(n))) /* value not marked yet? */ - hasww = 1; /* white-white entry */ - } - else if (valiswhite(gval(n))) { /* value not marked yet? */ - marked = 1; - reallymarkobject(g, gcvalue(gval(n))); /* mark it now */ - } - } - /* link table into proper list */ - if (g->gcstate == GCSpropagate) - linkgclist(h, g->grayagain); /* must retraverse it in atomic phase */ - else if (hasww) /* table has white->white entries? */ - linkgclist(h, g->ephemeron); /* have to propagate again */ - else if (hasclears) /* table has white keys? */ - linkgclist(h, g->allweak); /* may have to clean white keys */ - return marked; -} - - -static void traversestrongtable (global_State *g, Table *h) { - Node *n, *limit = gnodelast(h); - unsigned int i; - for (i = 0; i < h->sizearray; i++) /* traverse array part */ - markvalue(g, &h->array[i]); - for (n = gnode(h, 0); n < limit; n++) { /* traverse hash part */ - checkdeadkey(n); - if (ttisnil(gval(n))) /* entry is empty? */ - removeentry(n); /* remove it */ - else { - lua_assert(!ttisnil(gkey(n))); - markvalue(g, gkey(n)); /* mark key */ - markvalue(g, gval(n)); /* mark value */ - } - } -} - - -static lu_mem traversetable (global_State *g, Table *h) { - const char *weakkey, *weakvalue; - const TValue *mode = gfasttm(g, h->metatable, TM_MODE); - markobjectN(g, h->metatable); - if (mode && ttisstring(mode) && /* is there a weak mode? */ - ((weakkey = strchr(svalue(mode), 'k')), - (weakvalue = strchr(svalue(mode), 'v')), - (weakkey || weakvalue))) { /* is really weak? */ - black2gray(h); /* keep table gray */ - if (!weakkey) /* strong keys? */ - traverseweakvalue(g, h); - else if (!weakvalue) /* strong values? */ - traverseephemeron(g, h); - else /* all weak */ - linkgclist(h, g->allweak); /* nothing to traverse now */ - } - else /* not weak */ - traversestrongtable(g, h); - return sizeof(Table) + sizeof(TValue) * h->sizearray + - sizeof(Node) * cast(size_t, allocsizenode(h)); -} - - -/* -** Traverse a prototype. (While a prototype is being build, its -** arrays can be larger than needed; the extra slots are filled with -** NULL, so the use of 'markobjectN') -*/ -static int traverseproto (global_State *g, Proto *f) { - int i; - if (f->cache && iswhite(f->cache)) - f->cache = NULL; /* allow cache to be collected */ - markobjectN(g, f->source); - for (i = 0; i < f->sizek; i++) /* mark literals */ - markvalue(g, &f->k[i]); - for (i = 0; i < f->sizeupvalues; i++) /* mark upvalue names */ - markobjectN(g, f->upvalues[i].name); - for (i = 0; i < f->sizep; i++) /* mark nested protos */ - markobjectN(g, f->p[i]); - for (i = 0; i < f->sizelocvars; i++) /* mark local-variable names */ - markobjectN(g, f->locvars[i].varname); - return sizeof(Proto) + sizeof(Instruction) * f->sizecode + - sizeof(Proto *) * f->sizep + - sizeof(TValue) * f->sizek + - sizeof(int) * f->sizelineinfo + - sizeof(LocVar) * f->sizelocvars + - sizeof(Upvaldesc) * f->sizeupvalues; -} - - -static lu_mem traverseCclosure (global_State *g, CClosure *cl) { - int i; - for (i = 0; i < cl->nupvalues; i++) /* mark its upvalues */ - markvalue(g, &cl->upvalue[i]); - return sizeCclosure(cl->nupvalues); -} - -/* -** open upvalues point to values in a thread, so those values should -** be marked when the thread is traversed except in the atomic phase -** (because then the value cannot be changed by the thread and the -** thread may not be traversed again) -*/ -static lu_mem traverseLclosure (global_State *g, LClosure *cl) { - int i; - markobjectN(g, cl->p); /* mark its prototype */ - for (i = 0; i < cl->nupvalues; i++) { /* mark its upvalues */ - UpVal *uv = cl->upvals[i]; - if (uv != NULL) { - if (upisopen(uv) && g->gcstate != GCSinsideatomic) - uv->u.open.touched = 1; /* can be marked in 'remarkupvals' */ - else - markvalue(g, uv->v); - } - } - return sizeLclosure(cl->nupvalues); -} - - -static lu_mem traversethread (global_State *g, lua_State *th) { - StkId o = th->stack; - if (o == NULL) - return 1; /* stack not completely built yet */ - lua_assert(g->gcstate == GCSinsideatomic || - th->openupval == NULL || isintwups(th)); - for (; o < th->top; o++) /* mark live elements in the stack */ - markvalue(g, o); - if (g->gcstate == GCSinsideatomic) { /* final traversal? */ - StkId lim = th->stack + th->stacksize; /* real end of stack */ - for (; o < lim; o++) /* clear not-marked stack slice */ - setnilvalue(o); - /* 'remarkupvals' may have removed thread from 'twups' list */ - if (!isintwups(th) && th->openupval != NULL) { - th->twups = g->twups; /* link it back to the list */ - g->twups = th; - } - } - else if (g->gckind != KGC_EMERGENCY) - luaD_shrinkstack(th); /* do not change stack in emergency cycle */ - return (sizeof(lua_State) + sizeof(TValue) * th->stacksize + - sizeof(CallInfo) * th->nci); -} - - -/* -** traverse one gray object, turning it to black (except for threads, -** which are always gray). -*/ -static void propagatemark (global_State *g) { - lu_mem size; - GCObject *o = g->gray; - lua_assert(isgray(o)); - gray2black(o); - switch (o->tt) { - case LUA_TTABLE: { - Table *h = gco2t(o); - g->gray = h->gclist; /* remove from 'gray' list */ - size = traversetable(g, h); - break; - } - case LUA_TLCL: { - LClosure *cl = gco2lcl(o); - g->gray = cl->gclist; /* remove from 'gray' list */ - size = traverseLclosure(g, cl); - break; - } - case LUA_TCCL: { - CClosure *cl = gco2ccl(o); - g->gray = cl->gclist; /* remove from 'gray' list */ - size = traverseCclosure(g, cl); - break; - } - case LUA_TTHREAD: { - lua_State *th = gco2th(o); - g->gray = th->gclist; /* remove from 'gray' list */ - linkgclist(th, g->grayagain); /* insert into 'grayagain' list */ - black2gray(o); - size = traversethread(g, th); - break; - } - case LUA_TPROTO: { - Proto *p = gco2p(o); - g->gray = p->gclist; /* remove from 'gray' list */ - size = traverseproto(g, p); - break; - } - default: lua_assert(0); return; - } - g->GCmemtrav += size; -} - - -static void propagateall (global_State *g) { - while (g->gray) propagatemark(g); -} - - -static void convergeephemerons (global_State *g) { - int changed; - do { - GCObject *w; - GCObject *next = g->ephemeron; /* get ephemeron list */ - g->ephemeron = NULL; /* tables may return to this list when traversed */ - changed = 0; - while ((w = next) != NULL) { - next = gco2t(w)->gclist; - if (traverseephemeron(g, gco2t(w))) { /* traverse marked some value? */ - propagateall(g); /* propagate changes */ - changed = 1; /* will have to revisit all ephemeron tables */ - } - } - } while (changed); -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Sweep Functions -** ======================================================= -*/ - - -/* -** clear entries with unmarked keys from all weaktables in list 'l' up -** to element 'f' -*/ -static void clearkeys (global_State *g, GCObject *l, GCObject *f) { - for (; l != f; l = gco2t(l)->gclist) { - Table *h = gco2t(l); - Node *n, *limit = gnodelast(h); - for (n = gnode(h, 0); n < limit; n++) { - if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { - setnilvalue(gval(n)); /* remove value ... */ - } - if (ttisnil(gval(n))) /* is entry empty? */ - removeentry(n); /* remove entry from table */ - } - } -} - - -/* -** clear entries with unmarked values from all weaktables in list 'l' up -** to element 'f' -*/ -static void clearvalues (global_State *g, GCObject *l, GCObject *f) { - for (; l != f; l = gco2t(l)->gclist) { - Table *h = gco2t(l); - Node *n, *limit = gnodelast(h); - unsigned int i; - for (i = 0; i < h->sizearray; i++) { - TValue *o = &h->array[i]; - if (iscleared(g, o)) /* value was collected? */ - setnilvalue(o); /* remove value */ - } - for (n = gnode(h, 0); n < limit; n++) { - if (!ttisnil(gval(n)) && iscleared(g, gval(n))) { - setnilvalue(gval(n)); /* remove value ... */ - removeentry(n); /* and remove entry from table */ - } - } - } -} - - -void luaC_upvdeccount (lua_State *L, UpVal *uv) { - lua_assert(uv->refcount > 0); - uv->refcount--; - if (uv->refcount == 0 && !upisopen(uv)) - luaM_free(L, uv); -} - - -static void freeLclosure (lua_State *L, LClosure *cl) { - int i; - for (i = 0; i < cl->nupvalues; i++) { - UpVal *uv = cl->upvals[i]; - if (uv) - luaC_upvdeccount(L, uv); - } - luaM_freemem(L, cl, sizeLclosure(cl->nupvalues)); -} - - -static void freeobj (lua_State *L, GCObject *o) { - switch (o->tt) { - case LUA_TPROTO: luaF_freeproto(L, gco2p(o)); break; - case LUA_TLCL: { - freeLclosure(L, gco2lcl(o)); - break; - } - case LUA_TCCL: { - luaM_freemem(L, o, sizeCclosure(gco2ccl(o)->nupvalues)); - break; - } - case LUA_TTABLE: luaH_free(L, gco2t(o)); break; - case LUA_TTHREAD: luaE_freethread(L, gco2th(o)); break; - case LUA_TUSERDATA: luaM_freemem(L, o, sizeudata(gco2u(o))); break; - case LUA_TSHRSTR: - luaS_remove(L, gco2ts(o)); /* remove it from hash table */ - luaM_freemem(L, o, sizelstring(gco2ts(o)->shrlen)); - break; - case LUA_TLNGSTR: { - luaM_freemem(L, o, sizelstring(gco2ts(o)->u.lnglen)); - break; - } - default: lua_assert(0); - } -} - - -#define sweepwholelist(L,p) sweeplist(L,p,MAX_LUMEM) -static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count); - - -/* -** sweep at most 'count' elements from a list of GCObjects erasing dead -** objects, where a dead object is one marked with the old (non current) -** white; change all non-dead objects back to white, preparing for next -** collection cycle. Return where to continue the traversal or NULL if -** list is finished. -*/ -static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) { - global_State *g = G(L); - int ow = otherwhite(g); - int white = luaC_white(g); /* current white */ - while (*p != NULL && count-- > 0) { - GCObject *curr = *p; - int marked = curr->marked; - if (isdeadm(ow, marked)) { /* is 'curr' dead? */ - *p = curr->next; /* remove 'curr' from list */ - freeobj(L, curr); /* erase 'curr' */ - } - else { /* change mark to 'white' */ - curr->marked = cast_byte((marked & maskcolors) | white); - p = &curr->next; /* go to next element */ - } - } - return (*p == NULL) ? NULL : p; -} - - -/* -** sweep a list until a live object (or end of list) -*/ -static GCObject **sweeptolive (lua_State *L, GCObject **p) { - GCObject **old = p; - do { - p = sweeplist(L, p, 1); - } while (p == old); - return p; -} - -/* }====================================================== */ - - -/* -** {====================================================== -** Finalization -** ======================================================= -*/ - -/* -** If possible, shrink string table -*/ -static void checkSizes (lua_State *L, global_State *g) { - if (g->gckind != KGC_EMERGENCY) { - l_mem olddebt = g->GCdebt; - if (g->strt.nuse < g->strt.size / 4) /* string table too big? */ - luaS_resize(L, g->strt.size / 2); /* shrink it a little */ - g->GCestimate += g->GCdebt - olddebt; /* update estimate */ - } -} - - -static GCObject *udata2finalize (global_State *g) { - GCObject *o = g->tobefnz; /* get first element */ - lua_assert(tofinalize(o)); - g->tobefnz = o->next; /* remove it from 'tobefnz' list */ - o->next = g->allgc; /* return it to 'allgc' list */ - g->allgc = o; - resetbit(o->marked, FINALIZEDBIT); /* object is "normal" again */ - if (issweepphase(g)) - makewhite(g, o); /* "sweep" object */ - return o; -} - - -static void dothecall (lua_State *L, void *ud) { - UNUSED(ud); - luaD_callnoyield(L, L->top - 2, 0); -} - - -static void GCTM (lua_State *L, int propagateerrors) { - global_State *g = G(L); - const TValue *tm; - TValue v; - setgcovalue(L, &v, udata2finalize(g)); - tm = luaT_gettmbyobj(L, &v, TM_GC); - if (tm != NULL && ttisfunction(tm)) { /* is there a finalizer? */ - int status; - lu_byte oldah = L->allowhook; - int running = g->gcrunning; - L->allowhook = 0; /* stop debug hooks during GC metamethod */ - g->gcrunning = 0; /* avoid GC steps */ - setobj2s(L, L->top, tm); /* push finalizer... */ - setobj2s(L, L->top + 1, &v); /* ... and its argument */ - L->top += 2; /* and (next line) call the finalizer */ - L->ci->callstatus |= CIST_FIN; /* will run a finalizer */ - status = luaD_pcall(L, dothecall, NULL, savestack(L, L->top - 2), 0); - L->ci->callstatus &= ~CIST_FIN; /* not running a finalizer anymore */ - L->allowhook = oldah; /* restore hooks */ - g->gcrunning = running; /* restore state */ - if (status != LUA_OK && propagateerrors) { /* error while running __gc? */ - if (status == LUA_ERRRUN) { /* is there an error object? */ - const char *msg = (ttisstring(L->top - 1)) - ? svalue(L->top - 1) - : "no message"; - luaO_pushfstring(L, "error in __gc metamethod (%s)", msg); - status = LUA_ERRGCMM; /* error in __gc metamethod */ - } - luaD_throw(L, status); /* re-throw error */ - } - } -} - - -/* -** call a few (up to 'g->gcfinnum') finalizers -*/ -static int runafewfinalizers (lua_State *L) { - global_State *g = G(L); - unsigned int i; - lua_assert(!g->tobefnz || g->gcfinnum > 0); - for (i = 0; g->tobefnz && i < g->gcfinnum; i++) - GCTM(L, 1); /* call one finalizer */ - g->gcfinnum = (!g->tobefnz) ? 0 /* nothing more to finalize? */ - : g->gcfinnum * 2; /* else call a few more next time */ - return i; -} - - -/* -** call all pending finalizers -*/ -static void callallpendingfinalizers (lua_State *L) { - global_State *g = G(L); - while (g->tobefnz) - GCTM(L, 0); -} - - -/* -** find last 'next' field in list 'p' list (to add elements in its end) -*/ -static GCObject **findlast (GCObject **p) { - while (*p != NULL) - p = &(*p)->next; - return p; -} - - -/* -** move all unreachable objects (or 'all' objects) that need -** finalization from list 'finobj' to list 'tobefnz' (to be finalized) -*/ -static void separatetobefnz (global_State *g, int all) { - GCObject *curr; - GCObject **p = &g->finobj; - GCObject **lastnext = findlast(&g->tobefnz); - while ((curr = *p) != NULL) { /* traverse all finalizable objects */ - lua_assert(tofinalize(curr)); - if (!(iswhite(curr) || all)) /* not being collected? */ - p = &curr->next; /* don't bother with it */ - else { - *p = curr->next; /* remove 'curr' from 'finobj' list */ - curr->next = *lastnext; /* link at the end of 'tobefnz' list */ - *lastnext = curr; - lastnext = &curr->next; - } - } -} - - -/* -** if object 'o' has a finalizer, remove it from 'allgc' list (must -** search the list to find it) and link it in 'finobj' list. -*/ -void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) { - global_State *g = G(L); - if (tofinalize(o) || /* obj. is already marked... */ - gfasttm(g, mt, TM_GC) == NULL) /* or has no finalizer? */ - return; /* nothing to be done */ - else { /* move 'o' to 'finobj' list */ - GCObject **p; - if (issweepphase(g)) { - makewhite(g, o); /* "sweep" object 'o' */ - if (g->sweepgc == &o->next) /* should not remove 'sweepgc' object */ - g->sweepgc = sweeptolive(L, g->sweepgc); /* change 'sweepgc' */ - } - /* search for pointer pointing to 'o' */ - for (p = &g->allgc; *p != o; p = &(*p)->next) { /* empty */ } - *p = o->next; /* remove 'o' from 'allgc' list */ - o->next = g->finobj; /* link it in 'finobj' list */ - g->finobj = o; - l_setbit(o->marked, FINALIZEDBIT); /* mark it as such */ - } -} - -/* }====================================================== */ - - - -/* -** {====================================================== -** GC control -** ======================================================= -*/ - - -/* -** Set a reasonable "time" to wait before starting a new GC cycle; cycle -** will start when memory use hits threshold. (Division by 'estimate' -** should be OK: it cannot be zero (because Lua cannot even start with -** less than PAUSEADJ bytes). -*/ -static void setpause (global_State *g) { - l_mem threshold, debt; - l_mem estimate = g->GCestimate / PAUSEADJ; /* adjust 'estimate' */ - lua_assert(estimate > 0); - threshold = (g->gcpause < MAX_LMEM / estimate) /* overflow? */ - ? estimate * g->gcpause /* no overflow */ - : MAX_LMEM; /* overflow; truncate to maximum */ - debt = gettotalbytes(g) - threshold; - luaE_setdebt(g, debt); -} - - -/* -** Enter first sweep phase. -** The call to 'sweeplist' tries to make pointer point to an object -** inside the list (instead of to the header), so that the real sweep do -** not need to skip objects created between "now" and the start of the -** real sweep. -*/ -static void entersweep (lua_State *L) { - global_State *g = G(L); - g->gcstate = GCSswpallgc; - lua_assert(g->sweepgc == NULL); - g->sweepgc = sweeplist(L, &g->allgc, 1); -} - - -void luaC_freeallobjects (lua_State *L) { - global_State *g = G(L); - separatetobefnz(g, 1); /* separate all objects with finalizers */ - lua_assert(g->finobj == NULL); - callallpendingfinalizers(L); - lua_assert(g->tobefnz == NULL); - g->currentwhite = WHITEBITS; /* this "white" makes all objects look dead */ - g->gckind = KGC_NORMAL; - sweepwholelist(L, &g->finobj); - sweepwholelist(L, &g->allgc); - sweepwholelist(L, &g->fixedgc); /* collect fixed objects */ - lua_assert(g->strt.nuse == 0); -} - - -static l_mem atomic (lua_State *L) { - global_State *g = G(L); - l_mem work; - GCObject *origweak, *origall; - GCObject *grayagain = g->grayagain; /* save original list */ - lua_assert(g->ephemeron == NULL && g->weak == NULL); - lua_assert(!iswhite(g->mainthread)); - g->gcstate = GCSinsideatomic; - g->GCmemtrav = 0; /* start counting work */ - markobject(g, L); /* mark running thread */ - /* registry and global metatables may be changed by API */ - markvalue(g, &g->l_registry); - markmt(g); /* mark global metatables */ - /* remark occasional upvalues of (maybe) dead threads */ - remarkupvals(g); - propagateall(g); /* propagate changes */ - work = g->GCmemtrav; /* stop counting (do not recount 'grayagain') */ - g->gray = grayagain; - propagateall(g); /* traverse 'grayagain' list */ - g->GCmemtrav = 0; /* restart counting */ - convergeephemerons(g); - /* at this point, all strongly accessible objects are marked. */ - /* Clear values from weak tables, before checking finalizers */ - clearvalues(g, g->weak, NULL); - clearvalues(g, g->allweak, NULL); - origweak = g->weak; origall = g->allweak; - work += g->GCmemtrav; /* stop counting (objects being finalized) */ - separatetobefnz(g, 0); /* separate objects to be finalized */ - g->gcfinnum = 1; /* there may be objects to be finalized */ - markbeingfnz(g); /* mark objects that will be finalized */ - propagateall(g); /* remark, to propagate 'resurrection' */ - g->GCmemtrav = 0; /* restart counting */ - convergeephemerons(g); - /* at this point, all resurrected objects are marked. */ - /* remove dead objects from weak tables */ - clearkeys(g, g->ephemeron, NULL); /* clear keys from all ephemeron tables */ - clearkeys(g, g->allweak, NULL); /* clear keys from all 'allweak' tables */ - /* clear values from resurrected weak tables */ - clearvalues(g, g->weak, origweak); - clearvalues(g, g->allweak, origall); - luaS_clearcache(g); - g->currentwhite = cast_byte(otherwhite(g)); /* flip current white */ - work += g->GCmemtrav; /* complete counting */ - return work; /* estimate of memory marked by 'atomic' */ -} - - -static lu_mem sweepstep (lua_State *L, global_State *g, - int nextstate, GCObject **nextlist) { - if (g->sweepgc) { - l_mem olddebt = g->GCdebt; - g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX); - g->GCestimate += g->GCdebt - olddebt; /* update estimate */ - if (g->sweepgc) /* is there still something to sweep? */ - return (GCSWEEPMAX * GCSWEEPCOST); - } - /* else enter next state */ - g->gcstate = nextstate; - g->sweepgc = nextlist; - return 0; -} - - -static lu_mem singlestep (lua_State *L) { - global_State *g = G(L); - switch (g->gcstate) { - case GCSpause: { - g->GCmemtrav = g->strt.size * sizeof(GCObject*); - restartcollection(g); - g->gcstate = GCSpropagate; - return g->GCmemtrav; - } - case GCSpropagate: { - g->GCmemtrav = 0; - lua_assert(g->gray); - propagatemark(g); - if (g->gray == NULL) /* no more gray objects? */ - g->gcstate = GCSatomic; /* finish propagate phase */ - return g->GCmemtrav; /* memory traversed in this step */ - } - case GCSatomic: { - lu_mem work; - propagateall(g); /* make sure gray list is empty */ - work = atomic(L); /* work is what was traversed by 'atomic' */ - entersweep(L); - g->GCestimate = gettotalbytes(g); /* first estimate */; - return work; - } - case GCSswpallgc: { /* sweep "regular" objects */ - return sweepstep(L, g, GCSswpfinobj, &g->finobj); - } - case GCSswpfinobj: { /* sweep objects with finalizers */ - return sweepstep(L, g, GCSswptobefnz, &g->tobefnz); - } - case GCSswptobefnz: { /* sweep objects to be finalized */ - return sweepstep(L, g, GCSswpend, NULL); - } - case GCSswpend: { /* finish sweeps */ - makewhite(g, g->mainthread); /* sweep main thread */ - checkSizes(L, g); - g->gcstate = GCScallfin; - return 0; - } - case GCScallfin: { /* call remaining finalizers */ - if (g->tobefnz && g->gckind != KGC_EMERGENCY) { - int n = runafewfinalizers(L); - return (n * GCFINALIZECOST); - } - else { /* emergency mode or no more finalizers */ - g->gcstate = GCSpause; /* finish collection */ - return 0; - } - } - default: lua_assert(0); return 0; - } -} - - -/* -** advances the garbage collector until it reaches a state allowed -** by 'statemask' -*/ -void luaC_runtilstate (lua_State *L, int statesmask) { - global_State *g = G(L); - while (!testbit(statesmask, g->gcstate)) - singlestep(L); -} - - -/* -** get GC debt and convert it from Kb to 'work units' (avoid zero debt -** and overflows) -*/ -static l_mem getdebt (global_State *g) { - l_mem debt = g->GCdebt; - int stepmul = g->gcstepmul; - if (debt <= 0) return 0; /* minimal debt */ - else { - debt = (debt / STEPMULADJ) + 1; - debt = (debt < MAX_LMEM / stepmul) ? debt * stepmul : MAX_LMEM; - return debt; - } -} - -/* -** performs a basic GC step when collector is running -*/ -void luaC_step (lua_State *L) { - global_State *g = G(L); - l_mem debt = getdebt(g); /* GC deficit (be paid now) */ - if (!g->gcrunning) { /* not running? */ - luaE_setdebt(g, -GCSTEPSIZE * 10); /* avoid being called too often */ - return; - } - do { /* repeat until pause or enough "credit" (negative debt) */ - lu_mem work = singlestep(L); /* perform one single step */ - debt -= work; - } while (debt > -GCSTEPSIZE && g->gcstate != GCSpause); - if (g->gcstate == GCSpause) - setpause(g); /* pause until next cycle */ - else { - debt = (debt / g->gcstepmul) * STEPMULADJ; /* convert 'work units' to Kb */ - luaE_setdebt(g, debt); - runafewfinalizers(L); - } -} - - -/* -** Performs a full GC cycle; if 'isemergency', set a flag to avoid -** some operations which could change the interpreter state in some -** unexpected ways (running finalizers and shrinking some structures). -** Before running the collection, check 'keepinvariant'; if it is true, -** there may be some objects marked as black, so the collector has -** to sweep all objects to turn them back to white (as white has not -** changed, nothing will be collected). -*/ -void luaC_fullgc (lua_State *L, int isemergency) { - global_State *g = G(L); - lua_assert(g->gckind == KGC_NORMAL); - if (isemergency) g->gckind = KGC_EMERGENCY; /* set flag */ - if (keepinvariant(g)) { /* black objects? */ - entersweep(L); /* sweep everything to turn them back to white */ - } - /* finish any pending sweep phase to start a new cycle */ - luaC_runtilstate(L, bitmask(GCSpause)); - luaC_runtilstate(L, ~bitmask(GCSpause)); /* start new collection */ - luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */ - /* estimate must be correct after a full GC cycle */ - lua_assert(g->GCestimate == gettotalbytes(g)); - luaC_runtilstate(L, bitmask(GCSpause)); /* finish collection */ - g->gckind = KGC_NORMAL; - setpause(g); -} - -/* }====================================================== */ - - diff --git a/build/premake/premake5/contrib/lua/src/lgc.h b/build/premake/premake5/contrib/lua/src/lgc.h deleted file mode 100644 index 425cd7cef3..0000000000 --- a/build/premake/premake5/contrib/lua/src/lgc.h +++ /dev/null @@ -1,147 +0,0 @@ -/* -** $Id: lgc.h,v 2.91.1.1 2017/04/19 17:39:34 roberto Exp $ -** Garbage Collector -** See Copyright Notice in lua.h -*/ - -#ifndef lgc_h -#define lgc_h - - -#include "lobject.h" -#include "lstate.h" - -/* -** Collectable objects may have one of three colors: white, which -** means the object is not marked; gray, which means the -** object is marked, but its references may be not marked; and -** black, which means that the object and all its references are marked. -** The main invariant of the garbage collector, while marking objects, -** is that a black object can never point to a white one. Moreover, -** any gray object must be in a "gray list" (gray, grayagain, weak, -** allweak, ephemeron) so that it can be visited again before finishing -** the collection cycle. These lists have no meaning when the invariant -** is not being enforced (e.g., sweep phase). -*/ - - - -/* how much to allocate before next GC step */ -#if !defined(GCSTEPSIZE) -/* ~100 small strings */ -#define GCSTEPSIZE (cast_int(100 * sizeof(TString))) -#endif - - -/* -** Possible states of the Garbage Collector -*/ -#define GCSpropagate 0 -#define GCSatomic 1 -#define GCSswpallgc 2 -#define GCSswpfinobj 3 -#define GCSswptobefnz 4 -#define GCSswpend 5 -#define GCScallfin 6 -#define GCSpause 7 - - -#define issweepphase(g) \ - (GCSswpallgc <= (g)->gcstate && (g)->gcstate <= GCSswpend) - - -/* -** macro to tell when main invariant (white objects cannot point to black -** ones) must be kept. During a collection, the sweep -** phase may break the invariant, as objects turned white may point to -** still-black objects. The invariant is restored when sweep ends and -** all objects are white again. -*/ - -#define keepinvariant(g) ((g)->gcstate <= GCSatomic) - - -/* -** some useful bit tricks -*/ -#define resetbits(x,m) ((x) &= cast(lu_byte, ~(m))) -#define setbits(x,m) ((x) |= (m)) -#define testbits(x,m) ((x) & (m)) -#define bitmask(b) (1<<(b)) -#define bit2mask(b1,b2) (bitmask(b1) | bitmask(b2)) -#define l_setbit(x,b) setbits(x, bitmask(b)) -#define resetbit(x,b) resetbits(x, bitmask(b)) -#define testbit(x,b) testbits(x, bitmask(b)) - - -/* Layout for bit use in 'marked' field: */ -#define WHITE0BIT 0 /* object is white (type 0) */ -#define WHITE1BIT 1 /* object is white (type 1) */ -#define BLACKBIT 2 /* object is black */ -#define FINALIZEDBIT 3 /* object has been marked for finalization */ -/* bit 7 is currently used by tests (luaL_checkmemory) */ - -#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) - - -#define iswhite(x) testbits((x)->marked, WHITEBITS) -#define isblack(x) testbit((x)->marked, BLACKBIT) -#define isgray(x) /* neither white nor black */ \ - (!testbits((x)->marked, WHITEBITS | bitmask(BLACKBIT))) - -#define tofinalize(x) testbit((x)->marked, FINALIZEDBIT) - -#define otherwhite(g) ((g)->currentwhite ^ WHITEBITS) -#define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow))) -#define isdead(g,v) isdeadm(otherwhite(g), (v)->marked) - -#define changewhite(x) ((x)->marked ^= WHITEBITS) -#define gray2black(x) l_setbit((x)->marked, BLACKBIT) - -#define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) - - -/* -** Does one step of collection when debt becomes positive. 'pre'/'pos' -** allows some adjustments to be done only when needed. macro -** 'condchangemem' is used only for heavy tests (forcing a full -** GC cycle on every opportunity) -*/ -#define luaC_condGC(L,pre,pos) \ - { if (G(L)->GCdebt > 0) { pre; luaC_step(L); pos;}; \ - condchangemem(L,pre,pos); } - -/* more often than not, 'pre'/'pos' are empty */ -#define luaC_checkGC(L) luaC_condGC(L,(void)0,(void)0) - - -#define luaC_barrier(L,p,v) ( \ - (iscollectable(v) && isblack(p) && iswhite(gcvalue(v))) ? \ - luaC_barrier_(L,obj2gco(p),gcvalue(v)) : cast_void(0)) - -#define luaC_barrierback(L,p,v) ( \ - (iscollectable(v) && isblack(p) && iswhite(gcvalue(v))) ? \ - luaC_barrierback_(L,p) : cast_void(0)) - -#define luaC_objbarrier(L,p,o) ( \ - (isblack(p) && iswhite(o)) ? \ - luaC_barrier_(L,obj2gco(p),obj2gco(o)) : cast_void(0)) - -#define luaC_upvalbarrier(L,uv) ( \ - (iscollectable((uv)->v) && !upisopen(uv)) ? \ - luaC_upvalbarrier_(L,uv) : cast_void(0)) - -LUAI_FUNC void luaC_fix (lua_State *L, GCObject *o); -LUAI_FUNC void luaC_freeallobjects (lua_State *L); -LUAI_FUNC void luaC_step (lua_State *L); -LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); -LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); -LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz); -LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v); -LUAI_FUNC void luaC_barrierback_ (lua_State *L, Table *o); -LUAI_FUNC void luaC_upvalbarrier_ (lua_State *L, UpVal *uv); -LUAI_FUNC void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt); -LUAI_FUNC void luaC_upvdeccount (lua_State *L, UpVal *uv); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/linit.c b/build/premake/premake5/contrib/lua/src/linit.c deleted file mode 100644 index 480da52c7e..0000000000 --- a/build/premake/premake5/contrib/lua/src/linit.c +++ /dev/null @@ -1,68 +0,0 @@ -/* -** $Id: linit.c,v 1.39.1.1 2017/04/19 17:20:42 roberto Exp $ -** Initialization of libraries for lua.c and other clients -** See Copyright Notice in lua.h -*/ - - -#define linit_c -#define LUA_LIB - -/* -** If you embed Lua in your program and need to open the standard -** libraries, call luaL_openlibs in your program. If you need a -** different set of libraries, copy this file to your project and edit -** it to suit your needs. -** -** You can also *preload* libraries, so that a later 'require' can -** open the library, which is already linked to the application. -** For that, do the following code: -** -** luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE); -** lua_pushcfunction(L, luaopen_modname); -** lua_setfield(L, -2, modname); -** lua_pop(L, 1); // remove PRELOAD table -*/ - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "lualib.h" -#include "lauxlib.h" - - -/* -** these libs are loaded by lua.c and are readily available to any Lua -** program -*/ -static const luaL_Reg loadedlibs[] = { - {"_G", luaopen_base}, - {LUA_LOADLIBNAME, luaopen_package}, - {LUA_COLIBNAME, luaopen_coroutine}, - {LUA_TABLIBNAME, luaopen_table}, - {LUA_IOLIBNAME, luaopen_io}, - {LUA_OSLIBNAME, luaopen_os}, - {LUA_STRLIBNAME, luaopen_string}, - {LUA_MATHLIBNAME, luaopen_math}, - {LUA_UTF8LIBNAME, luaopen_utf8}, - {LUA_DBLIBNAME, luaopen_debug}, -#if defined(LUA_COMPAT_BITLIB) - {LUA_BITLIBNAME, luaopen_bit32}, -#endif - {NULL, NULL} -}; - - -LUALIB_API void luaL_openlibs (lua_State *L) { - const luaL_Reg *lib; - /* "require" functions from 'loadedlibs' and set results to global table */ - for (lib = loadedlibs; lib->func; lib++) { - luaL_requiref(L, lib->name, lib->func, 1); - lua_pop(L, 1); /* remove lib */ - } -} - diff --git a/build/premake/premake5/contrib/lua/src/liolib.c b/build/premake/premake5/contrib/lua/src/liolib.c deleted file mode 100644 index e203394092..0000000000 --- a/build/premake/premake5/contrib/lua/src/liolib.c +++ /dev/null @@ -1,805 +0,0 @@ -/* -** $Id: liolib.c,v 2.151.1.1 2017/04/19 17:29:57 roberto Exp $ -** Standard I/O (and system) library -** See Copyright Notice in lua.h -*/ - -#define liolib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - -/* -* PREMAKE change: UTF-8 character support on windows. -*/ -#if defined(LUA_WIN) -#include -#endif - - - -/* -** Change this macro to accept other modes for 'fopen' besides -** the standard ones. -*/ -#if !defined(l_checkmode) - -/* accepted extensions to 'mode' in 'fopen' */ -#if !defined(L_MODEEXT) -#define L_MODEEXT "b" -#endif - -/* Check whether 'mode' matches '[rwa]%+?[L_MODEEXT]*' */ -static int l_checkmode (const char *mode) { - return (*mode != '\0' && strchr("rwa", *(mode++)) != NULL && - (*mode != '+' || (++mode, 1)) && /* skip if char is '+' */ - (strspn(mode, L_MODEEXT) == strlen(mode))); /* check extensions */ -} - -#endif - -/* -** {====================================================== -** l_popen spawns a new process connected to the current -** one through the file streams. -** ======================================================= -*/ - -#if !defined(l_popen) /* { */ - -#if defined(LUA_USE_POSIX) /* { */ - -#define l_popen(L,c,m) (fflush(NULL), popen(c,m)) -#define l_pclose(L,file) (pclose(file)) - -#elif defined(LUA_USE_WINDOWS) /* }{ */ - -#define l_popen(L,c,m) (_popen(c,m)) -#define l_pclose(L,file) (_pclose(file)) - -#else /* }{ */ - -/* ISO C definitions */ -#define l_popen(L,c,m) \ - ((void)((void)c, m), \ - luaL_error(L, "'popen' not supported"), \ - (FILE*)0) -#define l_pclose(L,file) ((void)L, (void)file, -1) - -#endif /* } */ - -#endif /* } */ - -/* }====================================================== */ - - -#if !defined(l_getc) /* { */ - -#if defined(LUA_USE_POSIX) -#define l_getc(f) getc_unlocked(f) -#define l_lockfile(f) flockfile(f) -#define l_unlockfile(f) funlockfile(f) -#else -#define l_getc(f) getc(f) -#define l_lockfile(f) ((void)0) -#define l_unlockfile(f) ((void)0) -#endif - -#endif /* } */ - - -/* -** {====================================================== -** l_fseek: configuration for longer offsets -** ======================================================= -*/ - -#if !defined(l_fseek) /* { */ - -#if defined(LUA_USE_POSIX) /* { */ - -#include - -#define l_fseek(f,o,w) fseeko(f,o,w) -#define l_ftell(f) ftello(f) -#define l_seeknum off_t - -#elif defined(LUA_USE_WINDOWS) && !defined(_CRTIMP_TYPEINFO) \ - && defined(_MSC_VER) && (_MSC_VER >= 1400) /* }{ */ - -/* Windows (but not DDK) and Visual C++ 2005 or higher */ -#define l_fseek(f,o,w) _fseeki64(f,o,w) -#define l_ftell(f) _ftelli64(f) -#define l_seeknum __int64 - -#else /* }{ */ - -/* ISO C definitions */ -#define l_fseek(f,o,w) fseek(f,o,w) -#define l_ftell(f) ftell(f) -#define l_seeknum long - -#endif /* } */ - -#endif /* } */ - -/* }====================================================== */ - - -#define IO_PREFIX "_IO_" -#define IOPREF_LEN (sizeof(IO_PREFIX)/sizeof(char) - 1) -#define IO_INPUT (IO_PREFIX "input") -#define IO_OUTPUT (IO_PREFIX "output") - - -typedef luaL_Stream LStream; - - -#define tolstream(L) ((LStream *)luaL_checkudata(L, 1, LUA_FILEHANDLE)) - -#define isclosed(p) ((p)->closef == NULL) - - -static int io_type (lua_State *L) { - LStream *p; - luaL_checkany(L, 1); - p = (LStream *)luaL_testudata(L, 1, LUA_FILEHANDLE); - if (p == NULL) - lua_pushnil(L); /* not a file */ - else if (isclosed(p)) - lua_pushliteral(L, "closed file"); - else - lua_pushliteral(L, "file"); - return 1; -} - - -static int f_tostring (lua_State *L) { - LStream *p = tolstream(L); - if (isclosed(p)) - lua_pushliteral(L, "file (closed)"); - else - lua_pushfstring(L, "file (%p)", p->f); - return 1; -} - - -static FILE *tofile (lua_State *L) { - LStream *p = tolstream(L); - if (isclosed(p)) - luaL_error(L, "attempt to use a closed file"); - lua_assert(p->f); - return p->f; -} - - -/* -** When creating file handles, always creates a 'closed' file handle -** before opening the actual file; so, if there is a memory error, the -** handle is in a consistent state. -*/ -static LStream *newprefile (lua_State *L) { - LStream *p = (LStream *)lua_newuserdata(L, sizeof(LStream)); - p->closef = NULL; /* mark file handle as 'closed' */ - luaL_setmetatable(L, LUA_FILEHANDLE); - return p; -} - - -/* -** Calls the 'close' function from a file handle. The 'volatile' avoids -** a bug in some versions of the Clang compiler (e.g., clang 3.0 for -** 32 bits). -*/ -static int aux_close (lua_State *L) { - LStream *p = tolstream(L); - volatile lua_CFunction cf = p->closef; - p->closef = NULL; /* mark stream as closed */ - return (*cf)(L); /* close it */ -} - - -static int f_close (lua_State *L) { - tofile(L); /* make sure argument is an open stream */ - return aux_close(L); -} - - -static int io_close (lua_State *L) { - if (lua_isnone(L, 1)) /* no argument? */ - lua_getfield(L, LUA_REGISTRYINDEX, IO_OUTPUT); /* use standard output */ - return f_close(L); -} - - -static int f_gc (lua_State *L) { - LStream *p = tolstream(L); - if (!isclosed(p) && p->f != NULL) - aux_close(L); /* ignore closed and incompletely open files */ - return 0; -} - - -/* -** function to close regular files -*/ -static int io_fclose (lua_State *L) { - LStream *p = tolstream(L); - int res = fclose(p->f); - return luaL_fileresult(L, (res == 0), NULL); -} - - -static LStream *newfile (lua_State *L) { - LStream *p = newprefile(L); - p->f = NULL; - p->closef = &io_fclose; - return p; -} - - -static void opencheck (lua_State *L, const char *fname, const char *mode) { - LStream *p = newfile(L); - p->f = fopen(fname, mode); - if (p->f == NULL) - luaL_error(L, "cannot open file '%s' (%s)", fname, strerror(errno)); -} - - -static int io_open (lua_State *L) { - const char *filename = luaL_checkstring(L, 1); - const char *mode = luaL_optstring(L, 2, "r"); - LStream *p = newfile(L); - const char *md = mode; /* to traverse/check mode */ - luaL_argcheck(L, l_checkmode(md), 2, "invalid mode"); - - /* - * PREMAKE change: UTF-8 character support on windows. - */ -#if defined(LUA_WIN) - wchar_t wide_path[4096]; - if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, wide_path, 4096) == 0) - { - lua_pushstring(L, "unable to encode path"); - return lua_error(L); - } - - wchar_t wide_mode[64]; - if (MultiByteToWideChar(CP_UTF8, 0, mode, -1, wide_mode, 64) == 0) - { - lua_pushstring(L, "unable to encode open mode"); - return lua_error(L); - } - - p->f = _wfopen(wide_path, wide_mode); -#else - p->f = fopen(filename, mode); -#endif - - return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1; -} - - -/* -** function to close 'popen' files -*/ -static int io_pclose (lua_State *L) { - LStream *p = tolstream(L); - return luaL_execresult(L, l_pclose(L, p->f)); -} - - -static int io_popen (lua_State *L) { - const char *filename = luaL_checkstring(L, 1); - const char *mode = luaL_optstring(L, 2, "r"); - LStream *p = newprefile(L); - p->f = l_popen(L, filename, mode); - p->closef = &io_pclose; - return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1; -} - - -static int io_tmpfile (lua_State *L) { - LStream *p = newfile(L); - p->f = tmpfile(); - return (p->f == NULL) ? luaL_fileresult(L, 0, NULL) : 1; -} - - -static FILE *getiofile (lua_State *L, const char *findex) { - LStream *p; - lua_getfield(L, LUA_REGISTRYINDEX, findex); - p = (LStream *)lua_touserdata(L, -1); - if (isclosed(p)) - luaL_error(L, "standard %s file is closed", findex + IOPREF_LEN); - return p->f; -} - - -static int g_iofile (lua_State *L, const char *f, const char *mode) { - if (!lua_isnoneornil(L, 1)) { - const char *filename = lua_tostring(L, 1); - if (filename) - opencheck(L, filename, mode); - else { - tofile(L); /* check that it's a valid file handle */ - lua_pushvalue(L, 1); - } - lua_setfield(L, LUA_REGISTRYINDEX, f); - } - /* return current value */ - lua_getfield(L, LUA_REGISTRYINDEX, f); - return 1; -} - - -static int io_input (lua_State *L) { - return g_iofile(L, IO_INPUT, "r"); -} - - -static int io_output (lua_State *L) { - return g_iofile(L, IO_OUTPUT, "w"); -} - - -static int io_readline (lua_State *L); - - -/* -** maximum number of arguments to 'f:lines'/'io.lines' (it + 3 must fit -** in the limit for upvalues of a closure) -*/ -#define MAXARGLINE 250 - -static void aux_lines (lua_State *L, int toclose) { - int n = lua_gettop(L) - 1; /* number of arguments to read */ - luaL_argcheck(L, n <= MAXARGLINE, MAXARGLINE + 2, "too many arguments"); - lua_pushinteger(L, n); /* number of arguments to read */ - lua_pushboolean(L, toclose); /* close/not close file when finished */ - lua_rotate(L, 2, 2); /* move 'n' and 'toclose' to their positions */ - lua_pushcclosure(L, io_readline, 3 + n); -} - - -static int f_lines (lua_State *L) { - tofile(L); /* check that it's a valid file handle */ - aux_lines(L, 0); - return 1; -} - - -static int io_lines (lua_State *L) { - int toclose; - if (lua_isnone(L, 1)) lua_pushnil(L); /* at least one argument */ - if (lua_isnil(L, 1)) { /* no file name? */ - lua_getfield(L, LUA_REGISTRYINDEX, IO_INPUT); /* get default input */ - lua_replace(L, 1); /* put it at index 1 */ - tofile(L); /* check that it's a valid file handle */ - toclose = 0; /* do not close it after iteration */ - } - else { /* open a new file */ - const char *filename = luaL_checkstring(L, 1); - opencheck(L, filename, "r"); - lua_replace(L, 1); /* put file at index 1 */ - toclose = 1; /* close it after iteration */ - } - aux_lines(L, toclose); - return 1; -} - - -/* -** {====================================================== -** READ -** ======================================================= -*/ - - -/* maximum length of a numeral */ -#if !defined (L_MAXLENNUM) -#define L_MAXLENNUM 200 -#endif - - -/* auxiliary structure used by 'read_number' */ -typedef struct { - FILE *f; /* file being read */ - int c; /* current character (look ahead) */ - int n; /* number of elements in buffer 'buff' */ - char buff[L_MAXLENNUM + 1]; /* +1 for ending '\0' */ -} RN; - - -/* -** Add current char to buffer (if not out of space) and read next one -*/ -static int nextc (RN *rn) { - if (rn->n >= L_MAXLENNUM) { /* buffer overflow? */ - rn->buff[0] = '\0'; /* invalidate result */ - return 0; /* fail */ - } - else { - rn->buff[rn->n++] = rn->c; /* save current char */ - rn->c = l_getc(rn->f); /* read next one */ - return 1; - } -} - - -/* -** Accept current char if it is in 'set' (of size 2) -*/ -static int test2 (RN *rn, const char *set) { - if (rn->c == set[0] || rn->c == set[1]) - return nextc(rn); - else return 0; -} - - -/* -** Read a sequence of (hex)digits -*/ -static int readdigits (RN *rn, int hex) { - int count = 0; - while ((hex ? isxdigit(rn->c) : isdigit(rn->c)) && nextc(rn)) - count++; - return count; -} - - -/* -** Read a number: first reads a valid prefix of a numeral into a buffer. -** Then it calls 'lua_stringtonumber' to check whether the format is -** correct and to convert it to a Lua number -*/ -static int read_number (lua_State *L, FILE *f) { - RN rn; - int count = 0; - int hex = 0; - char decp[2]; - rn.f = f; rn.n = 0; - decp[0] = lua_getlocaledecpoint(); /* get decimal point from locale */ - decp[1] = '.'; /* always accept a dot */ - l_lockfile(rn.f); - do { rn.c = l_getc(rn.f); } while (isspace(rn.c)); /* skip spaces */ - test2(&rn, "-+"); /* optional signal */ - if (test2(&rn, "00")) { - if (test2(&rn, "xX")) hex = 1; /* numeral is hexadecimal */ - else count = 1; /* count initial '0' as a valid digit */ - } - count += readdigits(&rn, hex); /* integral part */ - if (test2(&rn, decp)) /* decimal point? */ - count += readdigits(&rn, hex); /* fractional part */ - if (count > 0 && test2(&rn, (hex ? "pP" : "eE"))) { /* exponent mark? */ - test2(&rn, "-+"); /* exponent signal */ - readdigits(&rn, 0); /* exponent digits */ - } - ungetc(rn.c, rn.f); /* unread look-ahead char */ - l_unlockfile(rn.f); - rn.buff[rn.n] = '\0'; /* finish string */ - if (lua_stringtonumber(L, rn.buff)) /* is this a valid number? */ - return 1; /* ok */ - else { /* invalid format */ - lua_pushnil(L); /* "result" to be removed */ - return 0; /* read fails */ - } -} - - -static int test_eof (lua_State *L, FILE *f) { - int c = getc(f); - ungetc(c, f); /* no-op when c == EOF */ - lua_pushliteral(L, ""); - return (c != EOF); -} - - -static int read_line (lua_State *L, FILE *f, int chop) { - luaL_Buffer b; - int c = '\0'; - luaL_buffinit(L, &b); - while (c != EOF && c != '\n') { /* repeat until end of line */ - char *buff = luaL_prepbuffer(&b); /* preallocate buffer */ - int i = 0; - l_lockfile(f); /* no memory errors can happen inside the lock */ - while (i < LUAL_BUFFERSIZE && (c = l_getc(f)) != EOF && c != '\n') - buff[i++] = c; - l_unlockfile(f); - luaL_addsize(&b, i); - } - if (!chop && c == '\n') /* want a newline and have one? */ - luaL_addchar(&b, c); /* add ending newline to result */ - luaL_pushresult(&b); /* close buffer */ - /* return ok if read something (either a newline or something else) */ - return (c == '\n' || lua_rawlen(L, -1) > 0); -} - - -static void read_all (lua_State *L, FILE *f) { - size_t nr; - luaL_Buffer b; - luaL_buffinit(L, &b); - do { /* read file in chunks of LUAL_BUFFERSIZE bytes */ - char *p = luaL_prepbuffer(&b); - nr = fread(p, sizeof(char), LUAL_BUFFERSIZE, f); - luaL_addsize(&b, nr); - } while (nr == LUAL_BUFFERSIZE); - luaL_pushresult(&b); /* close buffer */ -} - - -static int read_chars (lua_State *L, FILE *f, size_t n) { - size_t nr; /* number of chars actually read */ - char *p; - luaL_Buffer b; - luaL_buffinit(L, &b); - p = luaL_prepbuffsize(&b, n); /* prepare buffer to read whole block */ - nr = fread(p, sizeof(char), n, f); /* try to read 'n' chars */ - luaL_addsize(&b, nr); - luaL_pushresult(&b); /* close buffer */ - return (nr > 0); /* true iff read something */ -} - - -static int g_read (lua_State *L, FILE *f, int first) { - int nargs = lua_gettop(L) - 1; - int success; - int n; - clearerr(f); - if (nargs == 0) { /* no arguments? */ - success = read_line(L, f, 1); - n = first+1; /* to return 1 result */ - } - else { /* ensure stack space for all results and for auxlib's buffer */ - luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments"); - success = 1; - for (n = first; nargs-- && success; n++) { - if (lua_type(L, n) == LUA_TNUMBER) { - size_t l = (size_t)luaL_checkinteger(L, n); - success = (l == 0) ? test_eof(L, f) : read_chars(L, f, l); - } - else { - const char *p = luaL_checkstring(L, n); - if (*p == '*') p++; /* skip optional '*' (for compatibility) */ - switch (*p) { - case 'n': /* number */ - success = read_number(L, f); - break; - case 'l': /* line */ - success = read_line(L, f, 1); - break; - case 'L': /* line with end-of-line */ - success = read_line(L, f, 0); - break; - case 'a': /* file */ - read_all(L, f); /* read entire file */ - success = 1; /* always success */ - break; - default: - return luaL_argerror(L, n, "invalid format"); - } - } - } - } - if (ferror(f)) - return luaL_fileresult(L, 0, NULL); - if (!success) { - lua_pop(L, 1); /* remove last result */ - lua_pushnil(L); /* push nil instead */ - } - return n - first; -} - - -static int io_read (lua_State *L) { - return g_read(L, getiofile(L, IO_INPUT), 1); -} - - -static int f_read (lua_State *L) { - return g_read(L, tofile(L), 2); -} - - -static int io_readline (lua_State *L) { - LStream *p = (LStream *)lua_touserdata(L, lua_upvalueindex(1)); - int i; - int n = (int)lua_tointeger(L, lua_upvalueindex(2)); - if (isclosed(p)) /* file is already closed? */ - return luaL_error(L, "file is already closed"); - lua_settop(L , 1); - luaL_checkstack(L, n, "too many arguments"); - for (i = 1; i <= n; i++) /* push arguments to 'g_read' */ - lua_pushvalue(L, lua_upvalueindex(3 + i)); - n = g_read(L, p->f, 2); /* 'n' is number of results */ - lua_assert(n > 0); /* should return at least a nil */ - if (lua_toboolean(L, -n)) /* read at least one value? */ - return n; /* return them */ - else { /* first result is nil: EOF or error */ - if (n > 1) { /* is there error information? */ - /* 2nd result is error message */ - return luaL_error(L, "%s", lua_tostring(L, -n + 1)); - } - if (lua_toboolean(L, lua_upvalueindex(3))) { /* generator created file? */ - lua_settop(L, 0); - lua_pushvalue(L, lua_upvalueindex(1)); - aux_close(L); /* close it */ - } - return 0; - } -} - -/* }====================================================== */ - - -static int g_write (lua_State *L, FILE *f, int arg) { - int nargs = lua_gettop(L) - arg; - int status = 1; - for (; nargs--; arg++) { - if (lua_type(L, arg) == LUA_TNUMBER) { - /* optimization: could be done exactly as for strings */ - int len = lua_isinteger(L, arg) - ? fprintf(f, LUA_INTEGER_FMT, - (LUAI_UACINT)lua_tointeger(L, arg)) - : fprintf(f, LUA_NUMBER_FMT, - (LUAI_UACNUMBER)lua_tonumber(L, arg)); - status = status && (len > 0); - } - else { - size_t l; - const char *s = luaL_checklstring(L, arg, &l); - status = status && (fwrite(s, sizeof(char), l, f) == l); - } - } - if (status) return 1; /* file handle already on stack top */ - else return luaL_fileresult(L, status, NULL); -} - - -static int io_write (lua_State *L) { - return g_write(L, getiofile(L, IO_OUTPUT), 1); -} - - -static int f_write (lua_State *L) { - FILE *f = tofile(L); - lua_pushvalue(L, 1); /* push file at the stack top (to be returned) */ - return g_write(L, f, 2); -} - - -static int f_seek (lua_State *L) { - static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END}; - static const char *const modenames[] = {"set", "cur", "end", NULL}; - FILE *f = tofile(L); - int op = luaL_checkoption(L, 2, "cur", modenames); - lua_Integer p3 = luaL_optinteger(L, 3, 0); - l_seeknum offset = (l_seeknum)p3; - luaL_argcheck(L, (lua_Integer)offset == p3, 3, - "not an integer in proper range"); - op = l_fseek(f, offset, mode[op]); - if (op) - return luaL_fileresult(L, 0, NULL); /* error */ - else { - lua_pushinteger(L, (lua_Integer)l_ftell(f)); - return 1; - } -} - - -static int f_setvbuf (lua_State *L) { - static const int mode[] = {_IONBF, _IOFBF, _IOLBF}; - static const char *const modenames[] = {"no", "full", "line", NULL}; - FILE *f = tofile(L); - int op = luaL_checkoption(L, 2, NULL, modenames); - lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE); - int res = setvbuf(f, NULL, mode[op], (size_t)sz); - return luaL_fileresult(L, res == 0, NULL); -} - - - -static int io_flush (lua_State *L) { - return luaL_fileresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL); -} - - -static int f_flush (lua_State *L) { - return luaL_fileresult(L, fflush(tofile(L)) == 0, NULL); -} - - -/* -** functions for 'io' library -*/ -static const luaL_Reg iolib[] = { - {"close", io_close}, - {"flush", io_flush}, - {"input", io_input}, - {"lines", io_lines}, - {"open", io_open}, - {"output", io_output}, - {"popen", io_popen}, - {"read", io_read}, - {"tmpfile", io_tmpfile}, - {"type", io_type}, - {"write", io_write}, - {NULL, NULL} -}; - - -/* -** methods for file handles -*/ -static const luaL_Reg flib[] = { - {"close", f_close}, - {"flush", f_flush}, - {"lines", f_lines}, - {"read", f_read}, - {"seek", f_seek}, - {"setvbuf", f_setvbuf}, - {"write", f_write}, - {"__gc", f_gc}, - {"__tostring", f_tostring}, - {NULL, NULL} -}; - - -static void createmeta (lua_State *L) { - luaL_newmetatable(L, LUA_FILEHANDLE); /* create metatable for file handles */ - lua_pushvalue(L, -1); /* push metatable */ - lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */ - luaL_setfuncs(L, flib, 0); /* add file methods to new metatable */ - lua_pop(L, 1); /* pop new metatable */ -} - - -/* -** function to (not) close the standard files stdin, stdout, and stderr -*/ -static int io_noclose (lua_State *L) { - LStream *p = tolstream(L); - p->closef = &io_noclose; /* keep file opened */ - lua_pushnil(L); - lua_pushliteral(L, "cannot close standard file"); - return 2; -} - - -static void createstdfile (lua_State *L, FILE *f, const char *k, - const char *fname) { - LStream *p = newprefile(L); - p->f = f; - p->closef = &io_noclose; - if (k != NULL) { - lua_pushvalue(L, -1); - lua_setfield(L, LUA_REGISTRYINDEX, k); /* add file to registry */ - } - lua_setfield(L, -2, fname); /* add file to module */ -} - - -LUAMOD_API int luaopen_io (lua_State *L) { - luaL_newlib(L, iolib); /* new module */ - createmeta(L); - /* create (and set) default files */ - createstdfile(L, stdin, IO_INPUT, "stdin"); - createstdfile(L, stdout, IO_OUTPUT, "stdout"); - createstdfile(L, stderr, NULL, "stderr"); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/llex.c b/build/premake/premake5/contrib/lua/src/llex.c deleted file mode 100644 index 66fd411ba9..0000000000 --- a/build/premake/premake5/contrib/lua/src/llex.c +++ /dev/null @@ -1,565 +0,0 @@ -/* -** $Id: llex.c,v 2.96.1.1 2017/04/19 17:20:42 roberto Exp $ -** Lexical Analyzer -** See Copyright Notice in lua.h -*/ - -#define llex_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include - -#include "lua.h" - -#include "lctype.h" -#include "ldebug.h" -#include "ldo.h" -#include "lgc.h" -#include "llex.h" -#include "lobject.h" -#include "lparser.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "lzio.h" - - - -#define next(ls) (ls->current = zgetc(ls->z)) - - - -#define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') - - -/* ORDER RESERVED */ -static const char *const luaX_tokens [] = { - "and", "break", "do", "else", "elseif", - "end", "false", "for", "function", "goto", "if", - "in", "local", "nil", "not", "or", "repeat", - "return", "then", "true", "until", "while", - "//", "..", "...", "==", ">=", "<=", "~=", - "<<", ">>", "::", "", - "", "", "", "" -}; - - -#define save_and_next(ls) (save(ls, ls->current), next(ls)) - - -static l_noret lexerror (LexState *ls, const char *msg, int token); - - -static void save (LexState *ls, int c) { - Mbuffer *b = ls->buff; - if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) { - size_t newsize; - if (luaZ_sizebuffer(b) >= MAX_SIZE/2) - lexerror(ls, "lexical element too long", 0); - newsize = luaZ_sizebuffer(b) * 2; - luaZ_resizebuffer(ls->L, b, newsize); - } - b->buffer[luaZ_bufflen(b)++] = cast(char, c); -} - - -void luaX_init (lua_State *L) { - int i; - TString *e = luaS_newliteral(L, LUA_ENV); /* create env name */ - luaC_fix(L, obj2gco(e)); /* never collect this name */ - for (i=0; iextra = cast_byte(i+1); /* reserved word */ - } -} - - -const char *luaX_token2str (LexState *ls, int token) { - if (token < FIRST_RESERVED) { /* single-byte symbols? */ - lua_assert(token == cast_uchar(token)); - return luaO_pushfstring(ls->L, "'%c'", token); - } - else { - const char *s = luaX_tokens[token - FIRST_RESERVED]; - if (token < TK_EOS) /* fixed format (symbols and reserved words)? */ - return luaO_pushfstring(ls->L, "'%s'", s); - else /* names, strings, and numerals */ - return s; - } -} - - -static const char *txtToken (LexState *ls, int token) { - switch (token) { - case TK_NAME: case TK_STRING: - case TK_FLT: case TK_INT: - save(ls, '\0'); - return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff)); - default: - return luaX_token2str(ls, token); - } -} - - -static l_noret lexerror (LexState *ls, const char *msg, int token) { - msg = luaG_addinfo(ls->L, msg, ls->source, ls->linenumber); - if (token) - luaO_pushfstring(ls->L, "%s near %s", msg, txtToken(ls, token)); - luaD_throw(ls->L, LUA_ERRSYNTAX); -} - - -l_noret luaX_syntaxerror (LexState *ls, const char *msg) { - lexerror(ls, msg, ls->t.token); -} - - -/* -** creates a new string and anchors it in scanner's table so that -** it will not be collected until the end of the compilation -** (by that time it should be anchored somewhere) -*/ -TString *luaX_newstring (LexState *ls, const char *str, size_t l) { - lua_State *L = ls->L; - TValue *o; /* entry for 'str' */ - TString *ts = luaS_newlstr(L, str, l); /* create new string */ - setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ - o = luaH_set(L, ls->h, L->top - 1); - if (ttisnil(o)) { /* not in use yet? */ - /* boolean value does not need GC barrier; - table has no metatable, so it does not need to invalidate cache */ - setbvalue(o, 1); /* t[string] = true */ - luaC_checkGC(L); - } - else { /* string already present */ - ts = tsvalue(keyfromval(o)); /* re-use value previously stored */ - } - L->top--; /* remove string from stack */ - return ts; -} - - -/* -** increment line number and skips newline sequence (any of -** \n, \r, \n\r, or \r\n) -*/ -static void inclinenumber (LexState *ls) { - int old = ls->current; - lua_assert(currIsNewline(ls)); - next(ls); /* skip '\n' or '\r' */ - if (currIsNewline(ls) && ls->current != old) - next(ls); /* skip '\n\r' or '\r\n' */ - if (++ls->linenumber >= MAX_INT) - lexerror(ls, "chunk has too many lines", 0); -} - - -void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source, - int firstchar) { - ls->t.token = 0; - ls->L = L; - ls->current = firstchar; - ls->lookahead.token = TK_EOS; /* no look-ahead token */ - ls->z = z; - ls->fs = NULL; - ls->linenumber = 1; - ls->lastline = 1; - ls->source = source; - ls->envn = luaS_newliteral(L, LUA_ENV); /* get env name */ - luaZ_resizebuffer(ls->L, ls->buff, LUA_MINBUFFER); /* initialize buffer */ -} - - - -/* -** ======================================================= -** LEXICAL ANALYZER -** ======================================================= -*/ - - -static int check_next1 (LexState *ls, int c) { - if (ls->current == c) { - next(ls); - return 1; - } - else return 0; -} - - -/* -** Check whether current char is in set 'set' (with two chars) and -** saves it -*/ -static int check_next2 (LexState *ls, const char *set) { - lua_assert(set[2] == '\0'); - if (ls->current == set[0] || ls->current == set[1]) { - save_and_next(ls); - return 1; - } - else return 0; -} - - -/* LUA_NUMBER */ -/* -** this function is quite liberal in what it accepts, as 'luaO_str2num' -** will reject ill-formed numerals. -*/ -static int read_numeral (LexState *ls, SemInfo *seminfo) { - TValue obj; - const char *expo = "Ee"; - int first = ls->current; - lua_assert(lisdigit(ls->current)); - save_and_next(ls); - if (first == '0' && check_next2(ls, "xX")) /* hexadecimal? */ - expo = "Pp"; - for (;;) { - if (check_next2(ls, expo)) /* exponent part? */ - check_next2(ls, "-+"); /* optional exponent sign */ - if (lisxdigit(ls->current)) - save_and_next(ls); - else if (ls->current == '.') - save_and_next(ls); - else break; - } - save(ls, '\0'); - if (luaO_str2num(luaZ_buffer(ls->buff), &obj) == 0) /* format error? */ - lexerror(ls, "malformed number", TK_FLT); - if (ttisinteger(&obj)) { - seminfo->i = ivalue(&obj); - return TK_INT; - } - else { - lua_assert(ttisfloat(&obj)); - seminfo->r = fltvalue(&obj); - return TK_FLT; - } -} - - -/* -** skip a sequence '[=*[' or ']=*]'; if sequence is well formed, return -** its number of '='s; otherwise, return a negative number (-1 iff there -** are no '='s after initial bracket) -*/ -static int skip_sep (LexState *ls) { - int count = 0; - int s = ls->current; - lua_assert(s == '[' || s == ']'); - save_and_next(ls); - while (ls->current == '=') { - save_and_next(ls); - count++; - } - return (ls->current == s) ? count : (-count) - 1; -} - - -static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) { - int line = ls->linenumber; /* initial line (for error message) */ - save_and_next(ls); /* skip 2nd '[' */ - if (currIsNewline(ls)) /* string starts with a newline? */ - inclinenumber(ls); /* skip it */ - for (;;) { - switch (ls->current) { - case EOZ: { /* error */ - const char *what = (seminfo ? "string" : "comment"); - const char *msg = luaO_pushfstring(ls->L, - "unfinished long %s (starting at line %d)", what, line); - lexerror(ls, msg, TK_EOS); - break; /* to avoid warnings */ - } - case ']': { - if (skip_sep(ls) == sep) { - save_and_next(ls); /* skip 2nd ']' */ - goto endloop; - } - break; - } - case '\n': case '\r': { - save(ls, '\n'); - inclinenumber(ls); - if (!seminfo) luaZ_resetbuffer(ls->buff); /* avoid wasting space */ - break; - } - default: { - if (seminfo) save_and_next(ls); - else next(ls); - } - } - } endloop: - if (seminfo) - seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + (2 + sep), - luaZ_bufflen(ls->buff) - 2*(2 + sep)); -} - - -static void esccheck (LexState *ls, int c, const char *msg) { - if (!c) { - if (ls->current != EOZ) - save_and_next(ls); /* add current to buffer for error message */ - lexerror(ls, msg, TK_STRING); - } -} - - -static int gethexa (LexState *ls) { - save_and_next(ls); - esccheck (ls, lisxdigit(ls->current), "hexadecimal digit expected"); - return luaO_hexavalue(ls->current); -} - - -static int readhexaesc (LexState *ls) { - int r = gethexa(ls); - r = (r << 4) + gethexa(ls); - luaZ_buffremove(ls->buff, 2); /* remove saved chars from buffer */ - return r; -} - - -static unsigned long readutf8esc (LexState *ls) { - unsigned long r; - int i = 4; /* chars to be removed: '\', 'u', '{', and first digit */ - save_and_next(ls); /* skip 'u' */ - esccheck(ls, ls->current == '{', "missing '{'"); - r = gethexa(ls); /* must have at least one digit */ - while ((save_and_next(ls), lisxdigit(ls->current))) { - i++; - r = (r << 4) + luaO_hexavalue(ls->current); - esccheck(ls, r <= 0x10FFFF, "UTF-8 value too large"); - } - esccheck(ls, ls->current == '}', "missing '}'"); - next(ls); /* skip '}' */ - luaZ_buffremove(ls->buff, i); /* remove saved chars from buffer */ - return r; -} - - -static void utf8esc (LexState *ls) { - char buff[UTF8BUFFSZ]; - int n = luaO_utf8esc(buff, readutf8esc(ls)); - for (; n > 0; n--) /* add 'buff' to string */ - save(ls, buff[UTF8BUFFSZ - n]); -} - - -static int readdecesc (LexState *ls) { - int i; - int r = 0; /* result accumulator */ - for (i = 0; i < 3 && lisdigit(ls->current); i++) { /* read up to 3 digits */ - r = 10*r + ls->current - '0'; - save_and_next(ls); - } - esccheck(ls, r <= UCHAR_MAX, "decimal escape too large"); - luaZ_buffremove(ls->buff, i); /* remove read digits from buffer */ - return r; -} - - -static void read_string (LexState *ls, int del, SemInfo *seminfo) { - save_and_next(ls); /* keep delimiter (for error messages) */ - while (ls->current != del) { - switch (ls->current) { - case EOZ: - lexerror(ls, "unfinished string", TK_EOS); - break; /* to avoid warnings */ - case '\n': - case '\r': - lexerror(ls, "unfinished string", TK_STRING); - break; /* to avoid warnings */ - case '\\': { /* escape sequences */ - int c; /* final character to be saved */ - save_and_next(ls); /* keep '\\' for error messages */ - switch (ls->current) { - case 'a': c = '\a'; goto read_save; - case 'b': c = '\b'; goto read_save; - case 'f': c = '\f'; goto read_save; - case 'n': c = '\n'; goto read_save; - case 'r': c = '\r'; goto read_save; - case 't': c = '\t'; goto read_save; - case 'v': c = '\v'; goto read_save; - case 'x': c = readhexaesc(ls); goto read_save; - case 'u': utf8esc(ls); goto no_save; - case '\n': case '\r': - inclinenumber(ls); c = '\n'; goto only_save; - case '\\': case '\"': case '\'': - c = ls->current; goto read_save; - case EOZ: goto no_save; /* will raise an error next loop */ - case 'z': { /* zap following span of spaces */ - luaZ_buffremove(ls->buff, 1); /* remove '\\' */ - next(ls); /* skip the 'z' */ - while (lisspace(ls->current)) { - if (currIsNewline(ls)) inclinenumber(ls); - else next(ls); - } - goto no_save; - } - default: { - esccheck(ls, lisdigit(ls->current), "invalid escape sequence"); - c = readdecesc(ls); /* digital escape '\ddd' */ - goto only_save; - } - } - read_save: - next(ls); - /* go through */ - only_save: - luaZ_buffremove(ls->buff, 1); /* remove '\\' */ - save(ls, c); - /* go through */ - no_save: break; - } - default: - save_and_next(ls); - } - } - save_and_next(ls); /* skip delimiter */ - seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + 1, - luaZ_bufflen(ls->buff) - 2); -} - - -static int llex (LexState *ls, SemInfo *seminfo) { - luaZ_resetbuffer(ls->buff); - for (;;) { - switch (ls->current) { - case '\n': case '\r': { /* line breaks */ - inclinenumber(ls); - break; - } - case ' ': case '\f': case '\t': case '\v': { /* spaces */ - next(ls); - break; - } - case '-': { /* '-' or '--' (comment) */ - next(ls); - if (ls->current != '-') return '-'; - /* else is a comment */ - next(ls); - if (ls->current == '[') { /* long comment? */ - int sep = skip_sep(ls); - luaZ_resetbuffer(ls->buff); /* 'skip_sep' may dirty the buffer */ - if (sep >= 0) { - read_long_string(ls, NULL, sep); /* skip long comment */ - luaZ_resetbuffer(ls->buff); /* previous call may dirty the buff. */ - break; - } - } - /* else short comment */ - while (!currIsNewline(ls) && ls->current != EOZ) - next(ls); /* skip until end of line (or end of file) */ - break; - } - case '[': { /* long string or simply '[' */ - int sep = skip_sep(ls); - if (sep >= 0) { - read_long_string(ls, seminfo, sep); - return TK_STRING; - } - else if (sep != -1) /* '[=...' missing second bracket */ - lexerror(ls, "invalid long string delimiter", TK_STRING); - return '['; - } - case '=': { - next(ls); - if (check_next1(ls, '=')) return TK_EQ; - else return '='; - } - case '<': { - next(ls); - if (check_next1(ls, '=')) return TK_LE; - else if (check_next1(ls, '<')) return TK_SHL; - else return '<'; - } - case '>': { - next(ls); - if (check_next1(ls, '=')) return TK_GE; - else if (check_next1(ls, '>')) return TK_SHR; - else return '>'; - } - case '/': { - next(ls); - if (check_next1(ls, '/')) return TK_IDIV; - else return '/'; - } - case '~': { - next(ls); - if (check_next1(ls, '=')) return TK_NE; - else return '~'; - } - case ':': { - next(ls); - if (check_next1(ls, ':')) return TK_DBCOLON; - else return ':'; - } - case '"': case '\'': { /* short literal strings */ - read_string(ls, ls->current, seminfo); - return TK_STRING; - } - case '.': { /* '.', '..', '...', or number */ - save_and_next(ls); - if (check_next1(ls, '.')) { - if (check_next1(ls, '.')) - return TK_DOTS; /* '...' */ - else return TK_CONCAT; /* '..' */ - } - else if (!lisdigit(ls->current)) return '.'; - else return read_numeral(ls, seminfo); - } - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': { - return read_numeral(ls, seminfo); - } - case EOZ: { - return TK_EOS; - } - default: { - if (lislalpha(ls->current)) { /* identifier or reserved word? */ - TString *ts; - do { - save_and_next(ls); - } while (lislalnum(ls->current)); - ts = luaX_newstring(ls, luaZ_buffer(ls->buff), - luaZ_bufflen(ls->buff)); - seminfo->ts = ts; - if (isreserved(ts)) /* reserved word? */ - return ts->extra - 1 + FIRST_RESERVED; - else { - return TK_NAME; - } - } - else { /* single-char tokens (+ - / ...) */ - int c = ls->current; - next(ls); - return c; - } - } - } - } -} - - -void luaX_next (LexState *ls) { - ls->lastline = ls->linenumber; - if (ls->lookahead.token != TK_EOS) { /* is there a look-ahead token? */ - ls->t = ls->lookahead; /* use this one */ - ls->lookahead.token = TK_EOS; /* and discharge it */ - } - else - ls->t.token = llex(ls, &ls->t.seminfo); /* read next token */ -} - - -int luaX_lookahead (LexState *ls) { - lua_assert(ls->lookahead.token == TK_EOS); - ls->lookahead.token = llex(ls, &ls->lookahead.seminfo); - return ls->lookahead.token; -} - diff --git a/build/premake/premake5/contrib/lua/src/llex.h b/build/premake/premake5/contrib/lua/src/llex.h deleted file mode 100644 index 2ed0af66a4..0000000000 --- a/build/premake/premake5/contrib/lua/src/llex.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -** $Id: llex.h,v 1.79.1.1 2017/04/19 17:20:42 roberto Exp $ -** Lexical Analyzer -** See Copyright Notice in lua.h -*/ - -#ifndef llex_h -#define llex_h - -#include "lobject.h" -#include "lzio.h" - - -#define FIRST_RESERVED 257 - - -#if !defined(LUA_ENV) -#define LUA_ENV "_ENV" -#endif - - -/* -* WARNING: if you change the order of this enumeration, -* grep "ORDER RESERVED" -*/ -enum RESERVED { - /* terminal symbols denoted by reserved words */ - TK_AND = FIRST_RESERVED, TK_BREAK, - TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, - TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, - TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, - /* other terminal symbols */ - TK_IDIV, TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, - TK_SHL, TK_SHR, - TK_DBCOLON, TK_EOS, - TK_FLT, TK_INT, TK_NAME, TK_STRING -}; - -/* number of reserved words */ -#define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) - - -typedef union { - lua_Number r; - lua_Integer i; - TString *ts; -} SemInfo; /* semantics information */ - - -typedef struct Token { - int token; - SemInfo seminfo; -} Token; - - -/* state of the lexer plus state of the parser when shared by all - functions */ -typedef struct LexState { - int current; /* current character (charint) */ - int linenumber; /* input line counter */ - int lastline; /* line of last token 'consumed' */ - Token t; /* current token */ - Token lookahead; /* look ahead token */ - struct FuncState *fs; /* current function (parser) */ - struct lua_State *L; - ZIO *z; /* input stream */ - Mbuffer *buff; /* buffer for tokens */ - Table *h; /* to avoid collection/reuse strings */ - struct Dyndata *dyd; /* dynamic structures used by the parser */ - TString *source; /* current source name */ - TString *envn; /* environment variable name */ -} LexState; - - -LUAI_FUNC void luaX_init (lua_State *L); -LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, - TString *source, int firstchar); -LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); -LUAI_FUNC void luaX_next (LexState *ls); -LUAI_FUNC int luaX_lookahead (LexState *ls); -LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s); -LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/llimits.h b/build/premake/premake5/contrib/lua/src/llimits.h deleted file mode 100644 index d1036f6bc8..0000000000 --- a/build/premake/premake5/contrib/lua/src/llimits.h +++ /dev/null @@ -1,323 +0,0 @@ -/* -** $Id: llimits.h,v 1.141.1.1 2017/04/19 17:20:42 roberto Exp $ -** Limits, basic types, and some other 'installation-dependent' definitions -** See Copyright Notice in lua.h -*/ - -#ifndef llimits_h -#define llimits_h - - -#include -#include - - -#include "lua.h" - -/* -** 'lu_mem' and 'l_mem' are unsigned/signed integers big enough to count -** the total memory used by Lua (in bytes). Usually, 'size_t' and -** 'ptrdiff_t' should work, but we use 'long' for 16-bit machines. -*/ -#if defined(LUAI_MEM) /* { external definitions? */ -typedef LUAI_UMEM lu_mem; -typedef LUAI_MEM l_mem; -#elif LUAI_BITSINT >= 32 /* }{ */ -typedef size_t lu_mem; -typedef ptrdiff_t l_mem; -#else /* 16-bit ints */ /* }{ */ -typedef unsigned long lu_mem; -typedef long l_mem; -#endif /* } */ - - -/* chars used as small naturals (so that 'char' is reserved for characters) */ -typedef unsigned char lu_byte; - - -/* maximum value for size_t */ -#define MAX_SIZET ((size_t)(~(size_t)0)) - -/* maximum size visible for Lua (must be representable in a lua_Integer */ -#define MAX_SIZE (sizeof(size_t) < sizeof(lua_Integer) ? MAX_SIZET \ - : (size_t)(LUA_MAXINTEGER)) - - -#define MAX_LUMEM ((lu_mem)(~(lu_mem)0)) - -#define MAX_LMEM ((l_mem)(MAX_LUMEM >> 1)) - - -#define MAX_INT INT_MAX /* maximum value of an int */ - - -/* -** conversion of pointer to unsigned integer: -** this is for hashing only; there is no problem if the integer -** cannot hold the whole pointer value -*/ -#define point2uint(p) ((unsigned int)((size_t)(p) & UINT_MAX)) - - - -/* type to ensure maximum alignment */ -#if defined(LUAI_USER_ALIGNMENT_T) -typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; -#else -typedef union { - lua_Number n; - double u; - void *s; - lua_Integer i; - long l; -} L_Umaxalign; -#endif - - - -/* types of 'usual argument conversions' for lua_Number and lua_Integer */ -typedef LUAI_UACNUMBER l_uacNumber; -typedef LUAI_UACINT l_uacInt; - - -/* internal assertions for in-house debugging */ -#if defined(lua_assert) -#define check_exp(c,e) (lua_assert(c), (e)) -/* to avoid problems with conditions too long */ -#define lua_longassert(c) ((c) ? (void)0 : lua_assert(0)) -#else -#define lua_assert(c) ((void)0) -#define check_exp(c,e) (e) -#define lua_longassert(c) ((void)0) -#endif - -/* -** assertion for checking API calls -*/ -#if !defined(luai_apicheck) -#define luai_apicheck(l,e) lua_assert(e) -#endif - -#define api_check(l,e,msg) luai_apicheck(l,(e) && msg) - - -/* macro to avoid warnings about unused variables */ -#if !defined(UNUSED) -#define UNUSED(x) ((void)(x)) -#endif - - -/* type casts (a macro highlights casts in the code) */ -#define cast(t, exp) ((t)(exp)) - -#define cast_void(i) cast(void, (i)) -#define cast_byte(i) cast(lu_byte, (i)) -#define cast_num(i) cast(lua_Number, (i)) -#define cast_int(i) cast(int, (i)) -#define cast_uchar(i) cast(unsigned char, (i)) - - -/* cast a signed lua_Integer to lua_Unsigned */ -#if !defined(l_castS2U) -#define l_castS2U(i) ((lua_Unsigned)(i)) -#endif - -/* -** cast a lua_Unsigned to a signed lua_Integer; this cast is -** not strict ISO C, but two-complement architectures should -** work fine. -*/ -#if !defined(l_castU2S) -#define l_castU2S(i) ((lua_Integer)(i)) -#endif - - -/* -** non-return type -*/ -#if defined(__GNUC__) -#define l_noret void __attribute__((noreturn)) -#elif defined(_MSC_VER) && _MSC_VER >= 1200 -#define l_noret void __declspec(noreturn) -#else -#define l_noret void -#endif - - - -/* -** maximum depth for nested C calls and syntactical nested non-terminals -** in a program. (Value must fit in an unsigned short int.) -*/ -#if !defined(LUAI_MAXCCALLS) -#define LUAI_MAXCCALLS 200 -#endif - - - -/* -** type for virtual-machine instructions; -** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) -*/ -#if LUAI_BITSINT >= 32 -typedef unsigned int Instruction; -#else -typedef unsigned long Instruction; -#endif - - - -/* -** Maximum length for short strings, that is, strings that are -** internalized. (Cannot be smaller than reserved words or tags for -** metamethods, as these strings must be internalized; -** #("function") = 8, #("__newindex") = 10.) -*/ -#if !defined(LUAI_MAXSHORTLEN) -#define LUAI_MAXSHORTLEN 40 -#endif - - -/* -** Initial size for the string table (must be power of 2). -** The Lua core alone registers ~50 strings (reserved words + -** metaevent keys + a few others). Libraries would typically add -** a few dozens more. -*/ -#if !defined(MINSTRTABSIZE) -#define MINSTRTABSIZE 128 -#endif - - -/* -** Size of cache for strings in the API. 'N' is the number of -** sets (better be a prime) and "M" is the size of each set (M == 1 -** makes a direct cache.) -*/ -#if !defined(STRCACHE_N) -#define STRCACHE_N 53 -#define STRCACHE_M 2 -#endif - - -/* minimum size for string buffer */ -#if !defined(LUA_MINBUFFER) -#define LUA_MINBUFFER 32 -#endif - - -/* -** macros that are executed whenever program enters the Lua core -** ('lua_lock') and leaves the core ('lua_unlock') -*/ -#if !defined(lua_lock) -#define lua_lock(L) ((void) 0) -#define lua_unlock(L) ((void) 0) -#endif - -/* -** macro executed during Lua functions at points where the -** function can yield. -*/ -#if !defined(luai_threadyield) -#define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} -#endif - - -/* -** these macros allow user-specific actions on threads when you defined -** LUAI_EXTRASPACE and need to do something extra when a thread is -** created/deleted/resumed/yielded. -*/ -#if !defined(luai_userstateopen) -#define luai_userstateopen(L) ((void)L) -#endif - -#if !defined(luai_userstateclose) -#define luai_userstateclose(L) ((void)L) -#endif - -#if !defined(luai_userstatethread) -#define luai_userstatethread(L,L1) ((void)L) -#endif - -#if !defined(luai_userstatefree) -#define luai_userstatefree(L,L1) ((void)L) -#endif - -#if !defined(luai_userstateresume) -#define luai_userstateresume(L,n) ((void)L) -#endif - -#if !defined(luai_userstateyield) -#define luai_userstateyield(L,n) ((void)L) -#endif - - - -/* -** The luai_num* macros define the primitive operations over numbers. -*/ - -/* floor division (defined as 'floor(a/b)') */ -#if !defined(luai_numidiv) -#define luai_numidiv(L,a,b) ((void)L, l_floor(luai_numdiv(L,a,b))) -#endif - -/* float division */ -#if !defined(luai_numdiv) -#define luai_numdiv(L,a,b) ((a)/(b)) -#endif - -/* -** modulo: defined as 'a - floor(a/b)*b'; this definition gives NaN when -** 'b' is huge, but the result should be 'a'. 'fmod' gives the result of -** 'a - trunc(a/b)*b', and therefore must be corrected when 'trunc(a/b) -** ~= floor(a/b)'. That happens when the division has a non-integer -** negative result, which is equivalent to the test below. -*/ -#if !defined(luai_nummod) -#define luai_nummod(L,a,b,m) \ - { (m) = l_mathop(fmod)(a,b); if ((m)*(b) < 0) (m) += (b); } -#endif - -/* exponentiation */ -#if !defined(luai_numpow) -#define luai_numpow(L,a,b) ((void)L, l_mathop(pow)(a,b)) -#endif - -/* the others are quite standard operations */ -#if !defined(luai_numadd) -#define luai_numadd(L,a,b) ((a)+(b)) -#define luai_numsub(L,a,b) ((a)-(b)) -#define luai_nummul(L,a,b) ((a)*(b)) -#define luai_numunm(L,a) (-(a)) -#define luai_numeq(a,b) ((a)==(b)) -#define luai_numlt(a,b) ((a)<(b)) -#define luai_numle(a,b) ((a)<=(b)) -#define luai_numisnan(a) (!luai_numeq((a), (a))) -#endif - - - - - -/* -** macro to control inclusion of some hard tests on stack reallocation -*/ -#if !defined(HARDSTACKTESTS) -#define condmovestack(L,pre,pos) ((void)0) -#else -/* realloc stack keeping its size */ -#define condmovestack(L,pre,pos) \ - { int sz_ = (L)->stacksize; pre; luaD_reallocstack((L), sz_); pos; } -#endif - -#if !defined(HARDMEMTESTS) -#define condchangemem(L,pre,pos) ((void)0) -#else -#define condchangemem(L,pre,pos) \ - { if (G(L)->gcrunning) { pre; luaC_fullgc(L, 0); pos; } } -#endif - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lmathlib.c b/build/premake/premake5/contrib/lua/src/lmathlib.c deleted file mode 100644 index 7ef7e593fd..0000000000 --- a/build/premake/premake5/contrib/lua/src/lmathlib.c +++ /dev/null @@ -1,410 +0,0 @@ -/* -** $Id: lmathlib.c,v 1.119.1.1 2017/04/19 17:20:42 roberto Exp $ -** Standard mathematical library -** See Copyright Notice in lua.h -*/ - -#define lmathlib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -#undef PI -#define PI (l_mathop(3.141592653589793238462643383279502884)) - - -#if !defined(l_rand) /* { */ -#if defined(LUA_USE_POSIX) -#define l_rand() random() -#define l_srand(x) srandom(x) -#define L_RANDMAX 2147483647 /* (2^31 - 1), following POSIX */ -#else -#define l_rand() rand() -#define l_srand(x) srand(x) -#define L_RANDMAX RAND_MAX -#endif -#endif /* } */ - - -static int math_abs (lua_State *L) { - if (lua_isinteger(L, 1)) { - lua_Integer n = lua_tointeger(L, 1); - if (n < 0) n = (lua_Integer)(0u - (lua_Unsigned)n); - lua_pushinteger(L, n); - } - else - lua_pushnumber(L, l_mathop(fabs)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_sin (lua_State *L) { - lua_pushnumber(L, l_mathop(sin)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_cos (lua_State *L) { - lua_pushnumber(L, l_mathop(cos)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_tan (lua_State *L) { - lua_pushnumber(L, l_mathop(tan)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_asin (lua_State *L) { - lua_pushnumber(L, l_mathop(asin)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_acos (lua_State *L) { - lua_pushnumber(L, l_mathop(acos)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_atan (lua_State *L) { - lua_Number y = luaL_checknumber(L, 1); - lua_Number x = luaL_optnumber(L, 2, 1); - lua_pushnumber(L, l_mathop(atan2)(y, x)); - return 1; -} - - -static int math_toint (lua_State *L) { - int valid; - lua_Integer n = lua_tointegerx(L, 1, &valid); - if (valid) - lua_pushinteger(L, n); - else { - luaL_checkany(L, 1); - lua_pushnil(L); /* value is not convertible to integer */ - } - return 1; -} - - -static void pushnumint (lua_State *L, lua_Number d) { - lua_Integer n; - if (lua_numbertointeger(d, &n)) /* does 'd' fit in an integer? */ - lua_pushinteger(L, n); /* result is integer */ - else - lua_pushnumber(L, d); /* result is float */ -} - - -static int math_floor (lua_State *L) { - if (lua_isinteger(L, 1)) - lua_settop(L, 1); /* integer is its own floor */ - else { - lua_Number d = l_mathop(floor)(luaL_checknumber(L, 1)); - pushnumint(L, d); - } - return 1; -} - - -static int math_ceil (lua_State *L) { - if (lua_isinteger(L, 1)) - lua_settop(L, 1); /* integer is its own ceil */ - else { - lua_Number d = l_mathop(ceil)(luaL_checknumber(L, 1)); - pushnumint(L, d); - } - return 1; -} - - -static int math_fmod (lua_State *L) { - if (lua_isinteger(L, 1) && lua_isinteger(L, 2)) { - lua_Integer d = lua_tointeger(L, 2); - if ((lua_Unsigned)d + 1u <= 1u) { /* special cases: -1 or 0 */ - luaL_argcheck(L, d != 0, 2, "zero"); - lua_pushinteger(L, 0); /* avoid overflow with 0x80000... / -1 */ - } - else - lua_pushinteger(L, lua_tointeger(L, 1) % d); - } - else - lua_pushnumber(L, l_mathop(fmod)(luaL_checknumber(L, 1), - luaL_checknumber(L, 2))); - return 1; -} - - -/* -** next function does not use 'modf', avoiding problems with 'double*' -** (which is not compatible with 'float*') when lua_Number is not -** 'double'. -*/ -static int math_modf (lua_State *L) { - if (lua_isinteger(L ,1)) { - lua_settop(L, 1); /* number is its own integer part */ - lua_pushnumber(L, 0); /* no fractional part */ - } - else { - lua_Number n = luaL_checknumber(L, 1); - /* integer part (rounds toward zero) */ - lua_Number ip = (n < 0) ? l_mathop(ceil)(n) : l_mathop(floor)(n); - pushnumint(L, ip); - /* fractional part (test needed for inf/-inf) */ - lua_pushnumber(L, (n == ip) ? l_mathop(0.0) : (n - ip)); - } - return 2; -} - - -static int math_sqrt (lua_State *L) { - lua_pushnumber(L, l_mathop(sqrt)(luaL_checknumber(L, 1))); - return 1; -} - - -static int math_ult (lua_State *L) { - lua_Integer a = luaL_checkinteger(L, 1); - lua_Integer b = luaL_checkinteger(L, 2); - lua_pushboolean(L, (lua_Unsigned)a < (lua_Unsigned)b); - return 1; -} - -static int math_log (lua_State *L) { - lua_Number x = luaL_checknumber(L, 1); - lua_Number res; - if (lua_isnoneornil(L, 2)) - res = l_mathop(log)(x); - else { - lua_Number base = luaL_checknumber(L, 2); -#if !defined(LUA_USE_C89) - if (base == l_mathop(2.0)) - res = l_mathop(log2)(x); else -#endif - if (base == l_mathop(10.0)) - res = l_mathop(log10)(x); - else - res = l_mathop(log)(x)/l_mathop(log)(base); - } - lua_pushnumber(L, res); - return 1; -} - -static int math_exp (lua_State *L) { - lua_pushnumber(L, l_mathop(exp)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_deg (lua_State *L) { - lua_pushnumber(L, luaL_checknumber(L, 1) * (l_mathop(180.0) / PI)); - return 1; -} - -static int math_rad (lua_State *L) { - lua_pushnumber(L, luaL_checknumber(L, 1) * (PI / l_mathop(180.0))); - return 1; -} - - -static int math_min (lua_State *L) { - int n = lua_gettop(L); /* number of arguments */ - int imin = 1; /* index of current minimum value */ - int i; - luaL_argcheck(L, n >= 1, 1, "value expected"); - for (i = 2; i <= n; i++) { - if (lua_compare(L, i, imin, LUA_OPLT)) - imin = i; - } - lua_pushvalue(L, imin); - return 1; -} - - -static int math_max (lua_State *L) { - int n = lua_gettop(L); /* number of arguments */ - int imax = 1; /* index of current maximum value */ - int i; - luaL_argcheck(L, n >= 1, 1, "value expected"); - for (i = 2; i <= n; i++) { - if (lua_compare(L, imax, i, LUA_OPLT)) - imax = i; - } - lua_pushvalue(L, imax); - return 1; -} - -/* -** This function uses 'double' (instead of 'lua_Number') to ensure that -** all bits from 'l_rand' can be represented, and that 'RANDMAX + 1.0' -** will keep full precision (ensuring that 'r' is always less than 1.0.) -*/ -static int math_random (lua_State *L) { - lua_Integer low, up; - double r = (double)l_rand() * (1.0 / ((double)L_RANDMAX + 1.0)); - switch (lua_gettop(L)) { /* check number of arguments */ - case 0: { /* no arguments */ - lua_pushnumber(L, (lua_Number)r); /* Number between 0 and 1 */ - return 1; - } - case 1: { /* only upper limit */ - low = 1; - up = luaL_checkinteger(L, 1); - break; - } - case 2: { /* lower and upper limits */ - low = luaL_checkinteger(L, 1); - up = luaL_checkinteger(L, 2); - break; - } - default: return luaL_error(L, "wrong number of arguments"); - } - /* random integer in the interval [low, up] */ - luaL_argcheck(L, low <= up, 1, "interval is empty"); - luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1, - "interval too large"); - r *= (double)(up - low) + 1.0; - lua_pushinteger(L, (lua_Integer)r + low); - return 1; -} - - -static int math_randomseed (lua_State *L) { - l_srand((unsigned int)(lua_Integer)luaL_checknumber(L, 1)); - (void)l_rand(); /* discard first value to avoid undesirable correlations */ - return 0; -} - - -static int math_type (lua_State *L) { - if (lua_type(L, 1) == LUA_TNUMBER) { - if (lua_isinteger(L, 1)) - lua_pushliteral(L, "integer"); - else - lua_pushliteral(L, "float"); - } - else { - luaL_checkany(L, 1); - lua_pushnil(L); - } - return 1; -} - - -/* -** {================================================================== -** Deprecated functions (for compatibility only) -** =================================================================== -*/ -#if defined(LUA_COMPAT_MATHLIB) - -static int math_cosh (lua_State *L) { - lua_pushnumber(L, l_mathop(cosh)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_sinh (lua_State *L) { - lua_pushnumber(L, l_mathop(sinh)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_tanh (lua_State *L) { - lua_pushnumber(L, l_mathop(tanh)(luaL_checknumber(L, 1))); - return 1; -} - -static int math_pow (lua_State *L) { - lua_Number x = luaL_checknumber(L, 1); - lua_Number y = luaL_checknumber(L, 2); - lua_pushnumber(L, l_mathop(pow)(x, y)); - return 1; -} - -static int math_frexp (lua_State *L) { - int e; - lua_pushnumber(L, l_mathop(frexp)(luaL_checknumber(L, 1), &e)); - lua_pushinteger(L, e); - return 2; -} - -static int math_ldexp (lua_State *L) { - lua_Number x = luaL_checknumber(L, 1); - int ep = (int)luaL_checkinteger(L, 2); - lua_pushnumber(L, l_mathop(ldexp)(x, ep)); - return 1; -} - -static int math_log10 (lua_State *L) { - lua_pushnumber(L, l_mathop(log10)(luaL_checknumber(L, 1))); - return 1; -} - -#endif -/* }================================================================== */ - - - -static const luaL_Reg mathlib[] = { - {"abs", math_abs}, - {"acos", math_acos}, - {"asin", math_asin}, - {"atan", math_atan}, - {"ceil", math_ceil}, - {"cos", math_cos}, - {"deg", math_deg}, - {"exp", math_exp}, - {"tointeger", math_toint}, - {"floor", math_floor}, - {"fmod", math_fmod}, - {"ult", math_ult}, - {"log", math_log}, - {"max", math_max}, - {"min", math_min}, - {"modf", math_modf}, - {"rad", math_rad}, - {"random", math_random}, - {"randomseed", math_randomseed}, - {"sin", math_sin}, - {"sqrt", math_sqrt}, - {"tan", math_tan}, - {"type", math_type}, -#if defined(LUA_COMPAT_MATHLIB) - {"atan2", math_atan}, - {"cosh", math_cosh}, - {"sinh", math_sinh}, - {"tanh", math_tanh}, - {"pow", math_pow}, - {"frexp", math_frexp}, - {"ldexp", math_ldexp}, - {"log10", math_log10}, -#endif - /* placeholders */ - {"pi", NULL}, - {"huge", NULL}, - {"maxinteger", NULL}, - {"mininteger", NULL}, - {NULL, NULL} -}; - - -/* -** Open math library -*/ -LUAMOD_API int luaopen_math (lua_State *L) { - luaL_newlib(L, mathlib); - lua_pushnumber(L, PI); - lua_setfield(L, -2, "pi"); - lua_pushnumber(L, (lua_Number)HUGE_VAL); - lua_setfield(L, -2, "huge"); - lua_pushinteger(L, LUA_MAXINTEGER); - lua_setfield(L, -2, "maxinteger"); - lua_pushinteger(L, LUA_MININTEGER); - lua_setfield(L, -2, "mininteger"); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/lmem.c b/build/premake/premake5/contrib/lua/src/lmem.c deleted file mode 100644 index 0241cc3bac..0000000000 --- a/build/premake/premake5/contrib/lua/src/lmem.c +++ /dev/null @@ -1,100 +0,0 @@ -/* -** $Id: lmem.c,v 1.91.1.1 2017/04/19 17:20:42 roberto Exp $ -** Interface to Memory Manager -** See Copyright Notice in lua.h -*/ - -#define lmem_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lgc.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" - - - -/* -** About the realloc function: -** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); -** ('osize' is the old size, 'nsize' is the new size) -** -** * frealloc(ud, NULL, x, s) creates a new block of size 's' (no -** matter 'x'). -** -** * frealloc(ud, p, x, 0) frees the block 'p' -** (in this specific case, frealloc must return NULL); -** particularly, frealloc(ud, NULL, 0, 0) does nothing -** (which is equivalent to free(NULL) in ISO C) -** -** frealloc returns NULL if it cannot create or reallocate the area -** (any reallocation to an equal or smaller size cannot fail!) -*/ - - - -#define MINSIZEARRAY 4 - - -void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, - int limit, const char *what) { - void *newblock; - int newsize; - if (*size >= limit/2) { /* cannot double it? */ - if (*size >= limit) /* cannot grow even a little? */ - luaG_runerror(L, "too many %s (limit is %d)", what, limit); - newsize = limit; /* still have at least one free place */ - } - else { - newsize = (*size)*2; - if (newsize < MINSIZEARRAY) - newsize = MINSIZEARRAY; /* minimum size */ - } - newblock = luaM_reallocv(L, block, *size, newsize, size_elems); - *size = newsize; /* update only when everything else is OK */ - return newblock; -} - - -l_noret luaM_toobig (lua_State *L) { - luaG_runerror(L, "memory allocation error: block too big"); -} - - - -/* -** generic allocation routine. -*/ -void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { - void *newblock; - global_State *g = G(L); - size_t realosize = (block) ? osize : 0; - lua_assert((realosize == 0) == (block == NULL)); -#if defined(HARDMEMTESTS) - if (nsize > realosize && g->gcrunning) - luaC_fullgc(L, 1); /* force a GC whenever possible */ -#endif - newblock = (*g->frealloc)(g->ud, block, osize, nsize); - if (newblock == NULL && nsize > 0) { - lua_assert(nsize > realosize); /* cannot fail when shrinking a block */ - if (g->version) { /* is state fully built? */ - luaC_fullgc(L, 1); /* try to free some memory... */ - newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ - } - if (newblock == NULL) - luaD_throw(L, LUA_ERRMEM); - } - lua_assert((nsize == 0) == (newblock == NULL)); - g->GCdebt = (g->GCdebt + nsize) - realosize; - return newblock; -} - diff --git a/build/premake/premake5/contrib/lua/src/lmem.h b/build/premake/premake5/contrib/lua/src/lmem.h deleted file mode 100644 index 357b1e43e7..0000000000 --- a/build/premake/premake5/contrib/lua/src/lmem.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -** $Id: lmem.h,v 1.43.1.1 2017/04/19 17:20:42 roberto Exp $ -** Interface to Memory Manager -** See Copyright Notice in lua.h -*/ - -#ifndef lmem_h -#define lmem_h - - -#include - -#include "llimits.h" -#include "lua.h" - - -/* -** This macro reallocs a vector 'b' from 'on' to 'n' elements, where -** each element has size 'e'. In case of arithmetic overflow of the -** product 'n'*'e', it raises an error (calling 'luaM_toobig'). Because -** 'e' is always constant, it avoids the runtime division MAX_SIZET/(e). -** -** (The macro is somewhat complex to avoid warnings: The 'sizeof' -** comparison avoids a runtime comparison when overflow cannot occur. -** The compiler should be able to optimize the real test by itself, but -** when it does it, it may give a warning about "comparison is always -** false due to limited range of data type"; the +1 tricks the compiler, -** avoiding this warning but also this optimization.) -*/ -#define luaM_reallocv(L,b,on,n,e) \ - (((sizeof(n) >= sizeof(size_t) && cast(size_t, (n)) + 1 > MAX_SIZET/(e)) \ - ? luaM_toobig(L) : cast_void(0)) , \ - luaM_realloc_(L, (b), (on)*(e), (n)*(e))) - -/* -** Arrays of chars do not need any test -*/ -#define luaM_reallocvchar(L,b,on,n) \ - cast(char *, luaM_realloc_(L, (b), (on)*sizeof(char), (n)*sizeof(char))) - -#define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) -#define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) -#define luaM_freearray(L, b, n) luaM_realloc_(L, (b), (n)*sizeof(*(b)), 0) - -#define luaM_malloc(L,s) luaM_realloc_(L, NULL, 0, (s)) -#define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) -#define luaM_newvector(L,n,t) \ - cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) - -#define luaM_newobject(L,tag,s) luaM_realloc_(L, NULL, tag, (s)) - -#define luaM_growvector(L,v,nelems,size,t,limit,e) \ - if ((nelems)+1 > (size)) \ - ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) - -#define luaM_reallocvector(L, v,oldn,n,t) \ - ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) - -LUAI_FUNC l_noret luaM_toobig (lua_State *L); - -/* not to be called directly */ -LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, - size_t size); -LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, - size_t size_elem, int limit, - const char *what); - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/loadlib.c b/build/premake/premake5/contrib/lua/src/loadlib.c deleted file mode 100644 index 45f44d3225..0000000000 --- a/build/premake/premake5/contrib/lua/src/loadlib.c +++ /dev/null @@ -1,790 +0,0 @@ -/* -** $Id: loadlib.c,v 1.130.1.1 2017/04/19 17:20:42 roberto Exp $ -** Dynamic library loader for Lua -** See Copyright Notice in lua.h -** -** This module contains an implementation of loadlib for Unix systems -** that have dlfcn, an implementation for Windows, and a stub for other -** systems. -*/ - -#define loadlib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -/* -** LUA_IGMARK is a mark to ignore all before it when building the -** luaopen_ function name. -*/ -#if !defined (LUA_IGMARK) -#define LUA_IGMARK "-" -#endif - - -/* -** LUA_CSUBSEP is the character that replaces dots in submodule names -** when searching for a C loader. -** LUA_LSUBSEP is the character that replaces dots in submodule names -** when searching for a Lua loader. -*/ -#if !defined(LUA_CSUBSEP) -#define LUA_CSUBSEP LUA_DIRSEP -#endif - -#if !defined(LUA_LSUBSEP) -#define LUA_LSUBSEP LUA_DIRSEP -#endif - - -/* prefix for open functions in C libraries */ -#define LUA_POF "luaopen_" - -/* separator for open functions in C libraries */ -#define LUA_OFSEP "_" - - -/* -** unique key for table in the registry that keeps handles -** for all loaded C libraries -*/ -static const int CLIBS = 0; - -#define LIB_FAIL "open" - - -#define setprogdir(L) ((void)0) - - -/* -** system-dependent functions -*/ - -/* -** unload library 'lib' -*/ -static void lsys_unloadlib (void *lib); - -/* -** load C library in file 'path'. If 'seeglb', load with all names in -** the library global. -** Returns the library; in case of error, returns NULL plus an -** error string in the stack. -*/ -static void *lsys_load (lua_State *L, const char *path, int seeglb); - -/* -** Try to find a function named 'sym' in library 'lib'. -** Returns the function; in case of error, returns NULL plus an -** error string in the stack. -*/ -static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym); - - - - -#if defined(LUA_USE_DLOPEN) /* { */ -/* -** {======================================================================== -** This is an implementation of loadlib based on the dlfcn interface. -** The dlfcn interface is available in Linux, SunOS, Solaris, IRIX, FreeBSD, -** NetBSD, AIX 4.2, HPUX 11, and probably most other Unix flavors, at least -** as an emulation layer on top of native functions. -** ========================================================================= -*/ - -#include - -/* -** Macro to convert pointer-to-void* to pointer-to-function. This cast -** is undefined according to ISO C, but POSIX assumes that it works. -** (The '__extension__' in gnu compilers is only to avoid warnings.) -*/ -#if defined(__GNUC__) -#define cast_func(p) (__extension__ (lua_CFunction)(p)) -#else -#define cast_func(p) ((lua_CFunction)(p)) -#endif - - -static void lsys_unloadlib (void *lib) { - dlclose(lib); -} - - -static void *lsys_load (lua_State *L, const char *path, int seeglb) { - void *lib = dlopen(path, RTLD_NOW | (seeglb ? RTLD_GLOBAL : RTLD_LOCAL)); - if (lib == NULL) lua_pushstring(L, dlerror()); - return lib; -} - - -static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) { - lua_CFunction f = cast_func(dlsym(lib, sym)); - if (f == NULL) lua_pushstring(L, dlerror()); - return f; -} - -/* }====================================================== */ - - - -#elif defined(LUA_DL_DLL) /* }{ */ -/* -** {====================================================================== -** This is an implementation of loadlib for Windows using native functions. -** ======================================================================= -*/ - -#include - - -/* -** optional flags for LoadLibraryEx -*/ -#if !defined(LUA_LLE_FLAGS) -#define LUA_LLE_FLAGS 0 -#endif - - -#undef setprogdir - - -/* -** Replace in the path (on the top of the stack) any occurrence -** of LUA_EXEC_DIR with the executable's path. -*/ -static void setprogdir (lua_State *L) { - char buff[MAX_PATH + 1]; - char *lb; - DWORD nsize = sizeof(buff)/sizeof(char); - DWORD n = GetModuleFileNameA(NULL, buff, nsize); /* get exec. name */ - if (n == 0 || n == nsize || (lb = strrchr(buff, '\\')) == NULL) - luaL_error(L, "unable to get ModuleFileName"); - else { - *lb = '\0'; /* cut name on the last '\\' to get the path */ - luaL_gsub(L, lua_tostring(L, -1), LUA_EXEC_DIR, buff); - lua_remove(L, -2); /* remove original string */ - } -} - - - - -static void pusherror (lua_State *L) { - int error = GetLastError(); - char buffer[128]; - if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, error, 0, buffer, sizeof(buffer)/sizeof(char), NULL)) - lua_pushstring(L, buffer); - else - lua_pushfstring(L, "system error %d\n", error); -} - -static void lsys_unloadlib (void *lib) { - FreeLibrary((HMODULE)lib); -} - - -static void *lsys_load (lua_State *L, const char *path, int seeglb) { - HMODULE lib = LoadLibraryExA(path, NULL, LUA_LLE_FLAGS); - (void)(seeglb); /* not used: symbols are 'global' by default */ - if (lib == NULL) pusherror(L); - return lib; -} - - -static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) { - lua_CFunction f = (lua_CFunction)GetProcAddress((HMODULE)lib, sym); - if (f == NULL) pusherror(L); - return f; -} - -/* }====================================================== */ - - -#else /* }{ */ -/* -** {====================================================== -** Fallback for other systems -** ======================================================= -*/ - -#undef LIB_FAIL -#define LIB_FAIL "absent" - - -#define DLMSG "dynamic libraries not enabled; check your Lua installation" - - -static void lsys_unloadlib (void *lib) { - (void)(lib); /* not used */ -} - - -static void *lsys_load (lua_State *L, const char *path, int seeglb) { - (void)(path); (void)(seeglb); /* not used */ - lua_pushliteral(L, DLMSG); - return NULL; -} - - -static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) { - (void)(lib); (void)(sym); /* not used */ - lua_pushliteral(L, DLMSG); - return NULL; -} - -/* }====================================================== */ -#endif /* } */ - - -/* -** {================================================================== -** Set Paths -** =================================================================== -*/ - -/* -** LUA_PATH_VAR and LUA_CPATH_VAR are the names of the environment -** variables that Lua check to set its paths. -*/ -#if !defined(LUA_PATH_VAR) -#define LUA_PATH_VAR "LUA_PATH" -#endif - -#if !defined(LUA_CPATH_VAR) -#define LUA_CPATH_VAR "LUA_CPATH" -#endif - - -#define AUXMARK "\1" /* auxiliary mark */ - - -/* -** return registry.LUA_NOENV as a boolean -*/ -static int noenv (lua_State *L) { - int b; - lua_getfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); - b = lua_toboolean(L, -1); - lua_pop(L, 1); /* remove value */ - return b; -} - - -/* -** Set a path -*/ -static void setpath (lua_State *L, const char *fieldname, - const char *envname, - const char *dft) { - const char *nver = lua_pushfstring(L, "%s%s", envname, LUA_VERSUFFIX); - const char *path = getenv(nver); /* use versioned name */ - if (path == NULL) /* no environment variable? */ - path = getenv(envname); /* try unversioned name */ - if (path == NULL || noenv(L)) /* no environment variable? */ - lua_pushstring(L, dft); /* use default */ - else { - /* replace ";;" by ";AUXMARK;" and then AUXMARK by default path */ - path = luaL_gsub(L, path, LUA_PATH_SEP LUA_PATH_SEP, - LUA_PATH_SEP AUXMARK LUA_PATH_SEP); - luaL_gsub(L, path, AUXMARK, dft); - lua_remove(L, -2); /* remove result from 1st 'gsub' */ - } - setprogdir(L); - lua_setfield(L, -3, fieldname); /* package[fieldname] = path value */ - lua_pop(L, 1); /* pop versioned variable name */ -} - -/* }================================================================== */ - - -/* -** return registry.CLIBS[path] -*/ -static void *checkclib (lua_State *L, const char *path) { - void *plib; - lua_rawgetp(L, LUA_REGISTRYINDEX, &CLIBS); - lua_getfield(L, -1, path); - plib = lua_touserdata(L, -1); /* plib = CLIBS[path] */ - lua_pop(L, 2); /* pop CLIBS table and 'plib' */ - return plib; -} - - -/* -** registry.CLIBS[path] = plib -- for queries -** registry.CLIBS[#CLIBS + 1] = plib -- also keep a list of all libraries -*/ -static void addtoclib (lua_State *L, const char *path, void *plib) { - lua_rawgetp(L, LUA_REGISTRYINDEX, &CLIBS); - lua_pushlightuserdata(L, plib); - lua_pushvalue(L, -1); - lua_setfield(L, -3, path); /* CLIBS[path] = plib */ - lua_rawseti(L, -2, luaL_len(L, -2) + 1); /* CLIBS[#CLIBS + 1] = plib */ - lua_pop(L, 1); /* pop CLIBS table */ -} - - -/* -** __gc tag method for CLIBS table: calls 'lsys_unloadlib' for all lib -** handles in list CLIBS -*/ -static int gctm (lua_State *L) { - lua_Integer n = luaL_len(L, 1); - for (; n >= 1; n--) { /* for each handle, in reverse order */ - lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */ - lsys_unloadlib(lua_touserdata(L, -1)); - lua_pop(L, 1); /* pop handle */ - } - return 0; -} - - - -/* error codes for 'lookforfunc' */ -#define ERRLIB 1 -#define ERRFUNC 2 - -/* -** Look for a C function named 'sym' in a dynamically loaded library -** 'path'. -** First, check whether the library is already loaded; if not, try -** to load it. -** Then, if 'sym' is '*', return true (as library has been loaded). -** Otherwise, look for symbol 'sym' in the library and push a -** C function with that symbol. -** Return 0 and 'true' or a function in the stack; in case of -** errors, return an error code and an error message in the stack. -*/ -static int lookforfunc (lua_State *L, const char *path, const char *sym) { - void *reg = checkclib(L, path); /* check loaded C libraries */ - if (reg == NULL) { /* must load library? */ - reg = lsys_load(L, path, *sym == '*'); /* global symbols if 'sym'=='*' */ - if (reg == NULL) return ERRLIB; /* unable to load library */ - addtoclib(L, path, reg); - } - if (*sym == '*') { /* loading only library (no function)? */ - lua_pushboolean(L, 1); /* return 'true' */ - return 0; /* no errors */ - } - else { - lua_CFunction f = lsys_sym(L, reg, sym); - if (f == NULL) - return ERRFUNC; /* unable to find function */ - lua_pushcfunction(L, f); /* else create new function */ - return 0; /* no errors */ - } -} - - -static int ll_loadlib (lua_State *L) { - const char *path = luaL_checkstring(L, 1); - const char *init = luaL_checkstring(L, 2); - int stat = lookforfunc(L, path, init); - if (stat == 0) /* no errors? */ - return 1; /* return the loaded function */ - else { /* error; error message is on stack top */ - lua_pushnil(L); - lua_insert(L, -2); - lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init"); - return 3; /* return nil, error message, and where */ - } -} - - - -/* -** {====================================================== -** 'require' function -** ======================================================= -*/ - - -static int readable (const char *filename) { - FILE *f = fopen(filename, "r"); /* try to open file */ - if (f == NULL) return 0; /* open failed */ - fclose(f); - return 1; -} - - -static const char *pushnexttemplate (lua_State *L, const char *path) { - const char *l; - while (*path == *LUA_PATH_SEP) path++; /* skip separators */ - if (*path == '\0') return NULL; /* no more templates */ - l = strchr(path, *LUA_PATH_SEP); /* find next separator */ - if (l == NULL) l = path + strlen(path); - lua_pushlstring(L, path, l - path); /* template */ - return l; -} - - -static const char *searchpath (lua_State *L, const char *name, - const char *path, - const char *sep, - const char *dirsep) { - luaL_Buffer msg; /* to build error message */ - luaL_buffinit(L, &msg); - if (*sep != '\0') /* non-empty separator? */ - name = luaL_gsub(L, name, sep, dirsep); /* replace it by 'dirsep' */ - while ((path = pushnexttemplate(L, path)) != NULL) { - const char *filename = luaL_gsub(L, lua_tostring(L, -1), - LUA_PATH_MARK, name); - lua_remove(L, -2); /* remove path template */ - if (readable(filename)) /* does file exist and is readable? */ - return filename; /* return that file name */ - lua_pushfstring(L, "\n\tno file '%s'", filename); - lua_remove(L, -2); /* remove file name */ - luaL_addvalue(&msg); /* concatenate error msg. entry */ - } - luaL_pushresult(&msg); /* create error message */ - return NULL; /* not found */ -} - - -static int ll_searchpath (lua_State *L) { - const char *f = searchpath(L, luaL_checkstring(L, 1), - luaL_checkstring(L, 2), - luaL_optstring(L, 3, "."), - luaL_optstring(L, 4, LUA_DIRSEP)); - if (f != NULL) return 1; - else { /* error message is on top of the stack */ - lua_pushnil(L); - lua_insert(L, -2); - return 2; /* return nil + error message */ - } -} - - -static const char *findfile (lua_State *L, const char *name, - const char *pname, - const char *dirsep) { - const char *path; - lua_getfield(L, lua_upvalueindex(1), pname); - path = lua_tostring(L, -1); - if (path == NULL) - luaL_error(L, "'package.%s' must be a string", pname); - return searchpath(L, name, path, ".", dirsep); -} - - -static int checkload (lua_State *L, int stat, const char *filename) { - if (stat) { /* module loaded successfully? */ - lua_pushstring(L, filename); /* will be 2nd argument to module */ - return 2; /* return open function and file name */ - } - else - return luaL_error(L, "error loading module '%s' from file '%s':\n\t%s", - lua_tostring(L, 1), filename, lua_tostring(L, -1)); -} - - -static int searcher_Lua (lua_State *L) { - const char *filename; - const char *name = luaL_checkstring(L, 1); - filename = findfile(L, name, "path", LUA_LSUBSEP); - if (filename == NULL) return 1; /* module not found in this path */ - return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename); -} - - -/* -** Try to find a load function for module 'modname' at file 'filename'. -** First, change '.' to '_' in 'modname'; then, if 'modname' has -** the form X-Y (that is, it has an "ignore mark"), build a function -** name "luaopen_X" and look for it. (For compatibility, if that -** fails, it also tries "luaopen_Y".) If there is no ignore mark, -** look for a function named "luaopen_modname". -*/ -static int loadfunc (lua_State *L, const char *filename, const char *modname) { - const char *openfunc; - const char *mark; - modname = luaL_gsub(L, modname, ".", LUA_OFSEP); - mark = strchr(modname, *LUA_IGMARK); - if (mark) { - int stat; - openfunc = lua_pushlstring(L, modname, mark - modname); - openfunc = lua_pushfstring(L, LUA_POF"%s", openfunc); - stat = lookforfunc(L, filename, openfunc); - if (stat != ERRFUNC) return stat; - modname = mark + 1; /* else go ahead and try old-style name */ - } - openfunc = lua_pushfstring(L, LUA_POF"%s", modname); - return lookforfunc(L, filename, openfunc); -} - - -static int searcher_C (lua_State *L) { - const char *name = luaL_checkstring(L, 1); - const char *filename = findfile(L, name, "cpath", LUA_CSUBSEP); - if (filename == NULL) return 1; /* module not found in this path */ - return checkload(L, (loadfunc(L, filename, name) == 0), filename); -} - - -static int searcher_Croot (lua_State *L) { - const char *filename; - const char *name = luaL_checkstring(L, 1); - const char *p = strchr(name, '.'); - int stat; - if (p == NULL) return 0; /* is root */ - lua_pushlstring(L, name, p - name); - filename = findfile(L, lua_tostring(L, -1), "cpath", LUA_CSUBSEP); - if (filename == NULL) return 1; /* root not found */ - if ((stat = loadfunc(L, filename, name)) != 0) { - if (stat != ERRFUNC) - return checkload(L, 0, filename); /* real error */ - else { /* open function not found */ - lua_pushfstring(L, "\n\tno module '%s' in file '%s'", name, filename); - return 1; - } - } - lua_pushstring(L, filename); /* will be 2nd argument to module */ - return 2; -} - - -static int searcher_preload (lua_State *L) { - const char *name = luaL_checkstring(L, 1); - lua_getfield(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE); - if (lua_getfield(L, -1, name) == LUA_TNIL) /* not found? */ - lua_pushfstring(L, "\n\tno field package.preload['%s']", name); - return 1; -} - - -static void findloader (lua_State *L, const char *name) { - int i; - luaL_Buffer msg; /* to build error message */ - luaL_buffinit(L, &msg); - /* push 'package.searchers' to index 3 in the stack */ - if (lua_getfield(L, lua_upvalueindex(1), "searchers") != LUA_TTABLE) - luaL_error(L, "'package.searchers' must be a table"); - /* iterate over available searchers to find a loader */ - for (i = 1; ; i++) { - if (lua_rawgeti(L, 3, i) == LUA_TNIL) { /* no more searchers? */ - lua_pop(L, 1); /* remove nil */ - luaL_pushresult(&msg); /* create error message */ - luaL_error(L, "module '%s' not found:%s", name, lua_tostring(L, -1)); - } - lua_pushstring(L, name); - lua_call(L, 1, 2); /* call it */ - if (lua_isfunction(L, -2)) /* did it find a loader? */ - return; /* module loader found */ - else if (lua_isstring(L, -2)) { /* searcher returned error message? */ - lua_pop(L, 1); /* remove extra return */ - luaL_addvalue(&msg); /* concatenate error message */ - } - else - lua_pop(L, 2); /* remove both returns */ - } -} - - -static int ll_require (lua_State *L) { - const char *name = luaL_checkstring(L, 1); - lua_settop(L, 1); /* LOADED table will be at index 2 */ - lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); - lua_getfield(L, 2, name); /* LOADED[name] */ - if (lua_toboolean(L, -1)) /* is it there? */ - return 1; /* package is already loaded */ - /* else must load package */ - lua_pop(L, 1); /* remove 'getfield' result */ - findloader(L, name); - lua_pushstring(L, name); /* pass name as argument to module loader */ - lua_insert(L, -2); /* name is 1st argument (before search data) */ - lua_call(L, 2, 1); /* run loader to load module */ - if (!lua_isnil(L, -1)) /* non-nil return? */ - lua_setfield(L, 2, name); /* LOADED[name] = returned value */ - if (lua_getfield(L, 2, name) == LUA_TNIL) { /* module set no value? */ - lua_pushboolean(L, 1); /* use true as result */ - lua_pushvalue(L, -1); /* extra copy to be returned */ - lua_setfield(L, 2, name); /* LOADED[name] = true */ - } - return 1; -} - -/* }====================================================== */ - - - -/* -** {====================================================== -** 'module' function -** ======================================================= -*/ -#if defined(LUA_COMPAT_MODULE) - -/* -** changes the environment variable of calling function -*/ -static void set_env (lua_State *L) { - lua_Debug ar; - if (lua_getstack(L, 1, &ar) == 0 || - lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ - lua_iscfunction(L, -1)) - luaL_error(L, "'module' not called from a Lua function"); - lua_pushvalue(L, -2); /* copy new environment table to top */ - lua_setupvalue(L, -2, 1); - lua_pop(L, 1); /* remove function */ -} - - -static void dooptions (lua_State *L, int n) { - int i; - for (i = 2; i <= n; i++) { - if (lua_isfunction(L, i)) { /* avoid 'calling' extra info. */ - lua_pushvalue(L, i); /* get option (a function) */ - lua_pushvalue(L, -2); /* module */ - lua_call(L, 1, 0); - } - } -} - - -static void modinit (lua_State *L, const char *modname) { - const char *dot; - lua_pushvalue(L, -1); - lua_setfield(L, -2, "_M"); /* module._M = module */ - lua_pushstring(L, modname); - lua_setfield(L, -2, "_NAME"); - dot = strrchr(modname, '.'); /* look for last dot in module name */ - if (dot == NULL) dot = modname; - else dot++; - /* set _PACKAGE as package name (full module name minus last part) */ - lua_pushlstring(L, modname, dot - modname); - lua_setfield(L, -2, "_PACKAGE"); -} - - -static int ll_module (lua_State *L) { - const char *modname = luaL_checkstring(L, 1); - int lastarg = lua_gettop(L); /* last parameter */ - luaL_pushmodule(L, modname, 1); /* get/create module table */ - /* check whether table already has a _NAME field */ - if (lua_getfield(L, -1, "_NAME") != LUA_TNIL) - lua_pop(L, 1); /* table is an initialized module */ - else { /* no; initialize it */ - lua_pop(L, 1); - modinit(L, modname); - } - lua_pushvalue(L, -1); - set_env(L); - dooptions(L, lastarg); - return 1; -} - - -static int ll_seeall (lua_State *L) { - luaL_checktype(L, 1, LUA_TTABLE); - if (!lua_getmetatable(L, 1)) { - lua_createtable(L, 0, 1); /* create new metatable */ - lua_pushvalue(L, -1); - lua_setmetatable(L, 1); - } - lua_pushglobaltable(L); - lua_setfield(L, -2, "__index"); /* mt.__index = _G */ - return 0; -} - -#endif -/* }====================================================== */ - - - -static const luaL_Reg pk_funcs[] = { - {"loadlib", ll_loadlib}, - {"searchpath", ll_searchpath}, -#if defined(LUA_COMPAT_MODULE) - {"seeall", ll_seeall}, -#endif - /* placeholders */ - {"preload", NULL}, - {"cpath", NULL}, - {"path", NULL}, - {"searchers", NULL}, - {"loaded", NULL}, - {NULL, NULL} -}; - - -static const luaL_Reg ll_funcs[] = { -#if defined(LUA_COMPAT_MODULE) - {"module", ll_module}, -#endif - {"require", ll_require}, - {NULL, NULL} -}; - - -static void createsearcherstable (lua_State *L) { - static const lua_CFunction searchers[] = - {searcher_preload, searcher_Lua, searcher_C, searcher_Croot, NULL}; - int i; - /* create 'searchers' table */ - lua_createtable(L, sizeof(searchers)/sizeof(searchers[0]) - 1, 0); - /* fill it with predefined searchers */ - for (i=0; searchers[i] != NULL; i++) { - lua_pushvalue(L, -2); /* set 'package' as upvalue for all searchers */ - lua_pushcclosure(L, searchers[i], 1); - lua_rawseti(L, -2, i+1); - } -#if defined(LUA_COMPAT_LOADERS) - lua_pushvalue(L, -1); /* make a copy of 'searchers' table */ - lua_setfield(L, -3, "loaders"); /* put it in field 'loaders' */ -#endif - lua_setfield(L, -2, "searchers"); /* put it in field 'searchers' */ -} - - -/* -** create table CLIBS to keep track of loaded C libraries, -** setting a finalizer to close all libraries when closing state. -*/ -static void createclibstable (lua_State *L) { - lua_newtable(L); /* create CLIBS table */ - lua_createtable(L, 0, 1); /* create metatable for CLIBS */ - lua_pushcfunction(L, gctm); - lua_setfield(L, -2, "__gc"); /* set finalizer for CLIBS table */ - lua_setmetatable(L, -2); - lua_rawsetp(L, LUA_REGISTRYINDEX, &CLIBS); /* set CLIBS table in registry */ -} - - -LUAMOD_API int luaopen_package (lua_State *L) { - createclibstable(L); - luaL_newlib(L, pk_funcs); /* create 'package' table */ - createsearcherstable(L); - /* set paths */ - setpath(L, "path", LUA_PATH_VAR, LUA_PATH_DEFAULT); - setpath(L, "cpath", LUA_CPATH_VAR, LUA_CPATH_DEFAULT); - /* store config information */ - lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATH_SEP "\n" LUA_PATH_MARK "\n" - LUA_EXEC_DIR "\n" LUA_IGMARK "\n"); - lua_setfield(L, -2, "config"); - /* set field 'loaded' */ - luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); - lua_setfield(L, -2, "loaded"); - /* set field 'preload' */ - luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE); - lua_setfield(L, -2, "preload"); - lua_pushglobaltable(L); - lua_pushvalue(L, -2); /* set 'package' as upvalue for next lib */ - luaL_setfuncs(L, ll_funcs, 1); /* open lib into global table */ - lua_pop(L, 1); /* pop global table */ - return 1; /* return 'package' table */ -} - diff --git a/build/premake/premake5/contrib/lua/src/lobject.c b/build/premake/premake5/contrib/lua/src/lobject.c deleted file mode 100644 index 2218c8cdd7..0000000000 --- a/build/premake/premake5/contrib/lua/src/lobject.c +++ /dev/null @@ -1,522 +0,0 @@ -/* -** $Id: lobject.c,v 2.113.1.1 2017/04/19 17:29:57 roberto Exp $ -** Some generic functions over Lua objects -** See Copyright Notice in lua.h -*/ - -#define lobject_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include -#include -#include -#include -#include - -#include "lua.h" - -#include "lctype.h" -#include "ldebug.h" -#include "ldo.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" -#include "lstring.h" -#include "lvm.h" - - - -LUAI_DDEF const TValue luaO_nilobject_ = {NILCONSTANT}; - - -/* -** converts an integer to a "floating point byte", represented as -** (eeeeexxx), where the real value is (1xxx) * 2^(eeeee - 1) if -** eeeee != 0 and (xxx) otherwise. -*/ -int luaO_int2fb (unsigned int x) { - int e = 0; /* exponent */ - if (x < 8) return x; - while (x >= (8 << 4)) { /* coarse steps */ - x = (x + 0xf) >> 4; /* x = ceil(x / 16) */ - e += 4; - } - while (x >= (8 << 1)) { /* fine steps */ - x = (x + 1) >> 1; /* x = ceil(x / 2) */ - e++; - } - return ((e+1) << 3) | (cast_int(x) - 8); -} - - -/* converts back */ -int luaO_fb2int (int x) { - return (x < 8) ? x : ((x & 7) + 8) << ((x >> 3) - 1); -} - - -/* -** Computes ceil(log2(x)) -*/ -int luaO_ceillog2 (unsigned int x) { - static const lu_byte log_2[256] = { /* log_2[i] = ceil(log2(i - 1)) */ - 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, - 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 - }; - int l = 0; - x--; - while (x >= 256) { l += 8; x >>= 8; } - return l + log_2[x]; -} - - -static lua_Integer intarith (lua_State *L, int op, lua_Integer v1, - lua_Integer v2) { - switch (op) { - case LUA_OPADD: return intop(+, v1, v2); - case LUA_OPSUB:return intop(-, v1, v2); - case LUA_OPMUL:return intop(*, v1, v2); - case LUA_OPMOD: return luaV_mod(L, v1, v2); - case LUA_OPIDIV: return luaV_div(L, v1, v2); - case LUA_OPBAND: return intop(&, v1, v2); - case LUA_OPBOR: return intop(|, v1, v2); - case LUA_OPBXOR: return intop(^, v1, v2); - case LUA_OPSHL: return luaV_shiftl(v1, v2); - case LUA_OPSHR: return luaV_shiftl(v1, -v2); - case LUA_OPUNM: return intop(-, 0, v1); - case LUA_OPBNOT: return intop(^, ~l_castS2U(0), v1); - default: lua_assert(0); return 0; - } -} - - -static lua_Number numarith (lua_State *L, int op, lua_Number v1, - lua_Number v2) { - switch (op) { - case LUA_OPADD: return luai_numadd(L, v1, v2); - case LUA_OPSUB: return luai_numsub(L, v1, v2); - case LUA_OPMUL: return luai_nummul(L, v1, v2); - case LUA_OPDIV: return luai_numdiv(L, v1, v2); - case LUA_OPPOW: return luai_numpow(L, v1, v2); - case LUA_OPIDIV: return luai_numidiv(L, v1, v2); - case LUA_OPUNM: return luai_numunm(L, v1); - case LUA_OPMOD: { - lua_Number m; - luai_nummod(L, v1, v2, m); - return m; - } - default: lua_assert(0); return 0; - } -} - - -void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2, - TValue *res) { - switch (op) { - case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR: - case LUA_OPSHL: case LUA_OPSHR: - case LUA_OPBNOT: { /* operate only on integers */ - lua_Integer i1; lua_Integer i2; - if (tointeger(p1, &i1) && tointeger(p2, &i2)) { - setivalue(res, intarith(L, op, i1, i2)); - return; - } - else break; /* go to the end */ - } - case LUA_OPDIV: case LUA_OPPOW: { /* operate only on floats */ - lua_Number n1; lua_Number n2; - if (tonumber(p1, &n1) && tonumber(p2, &n2)) { - setfltvalue(res, numarith(L, op, n1, n2)); - return; - } - else break; /* go to the end */ - } - default: { /* other operations */ - lua_Number n1; lua_Number n2; - if (ttisinteger(p1) && ttisinteger(p2)) { - setivalue(res, intarith(L, op, ivalue(p1), ivalue(p2))); - return; - } - else if (tonumber(p1, &n1) && tonumber(p2, &n2)) { - setfltvalue(res, numarith(L, op, n1, n2)); - return; - } - else break; /* go to the end */ - } - } - /* could not perform raw operation; try metamethod */ - lua_assert(L != NULL); /* should not fail when folding (compile time) */ - luaT_trybinTM(L, p1, p2, res, cast(TMS, (op - LUA_OPADD) + TM_ADD)); -} - - -int luaO_hexavalue (int c) { - if (lisdigit(c)) return c - '0'; - else return (ltolower(c) - 'a') + 10; -} - - -static int isneg (const char **s) { - if (**s == '-') { (*s)++; return 1; } - else if (**s == '+') (*s)++; - return 0; -} - - - -/* -** {================================================================== -** Lua's implementation for 'lua_strx2number' -** =================================================================== -*/ - -#if !defined(lua_strx2number) - -/* maximum number of significant digits to read (to avoid overflows - even with single floats) */ -#define MAXSIGDIG 30 - -/* -** convert an hexadecimal numeric string to a number, following -** C99 specification for 'strtod' -*/ -static lua_Number lua_strx2number (const char *s, char **endptr) { - int dot = lua_getlocaledecpoint(); - lua_Number r = 0.0; /* result (accumulator) */ - int sigdig = 0; /* number of significant digits */ - int nosigdig = 0; /* number of non-significant digits */ - int e = 0; /* exponent correction */ - int neg; /* 1 if number is negative */ - int hasdot = 0; /* true after seen a dot */ - *endptr = cast(char *, s); /* nothing is valid yet */ - while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */ - neg = isneg(&s); /* check signal */ - if (!(*s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))) /* check '0x' */ - return 0.0; /* invalid format (no '0x') */ - for (s += 2; ; s++) { /* skip '0x' and read numeral */ - if (*s == dot) { - if (hasdot) break; /* second dot? stop loop */ - else hasdot = 1; - } - else if (lisxdigit(cast_uchar(*s))) { - if (sigdig == 0 && *s == '0') /* non-significant digit (zero)? */ - nosigdig++; - else if (++sigdig <= MAXSIGDIG) /* can read it without overflow? */ - r = (r * cast_num(16.0)) + luaO_hexavalue(*s); - else e++; /* too many digits; ignore, but still count for exponent */ - if (hasdot) e--; /* decimal digit? correct exponent */ - } - else break; /* neither a dot nor a digit */ - } - if (nosigdig + sigdig == 0) /* no digits? */ - return 0.0; /* invalid format */ - *endptr = cast(char *, s); /* valid up to here */ - e *= 4; /* each digit multiplies/divides value by 2^4 */ - if (*s == 'p' || *s == 'P') { /* exponent part? */ - int exp1 = 0; /* exponent value */ - int neg1; /* exponent signal */ - s++; /* skip 'p' */ - neg1 = isneg(&s); /* signal */ - if (!lisdigit(cast_uchar(*s))) - return 0.0; /* invalid; must have at least one digit */ - while (lisdigit(cast_uchar(*s))) /* read exponent */ - exp1 = exp1 * 10 + *(s++) - '0'; - if (neg1) exp1 = -exp1; - e += exp1; - *endptr = cast(char *, s); /* valid up to here */ - } - if (neg) r = -r; - return l_mathop(ldexp)(r, e); -} - -#endif -/* }====================================================== */ - - -/* maximum length of a numeral */ -#if !defined (L_MAXLENNUM) -#define L_MAXLENNUM 200 -#endif - -static const char *l_str2dloc (const char *s, lua_Number *result, int mode) { - char *endptr; - *result = (mode == 'x') ? lua_strx2number(s, &endptr) /* try to convert */ - : lua_str2number(s, &endptr); - if (endptr == s) return NULL; /* nothing recognized? */ - while (lisspace(cast_uchar(*endptr))) endptr++; /* skip trailing spaces */ - return (*endptr == '\0') ? endptr : NULL; /* OK if no trailing characters */ -} - - -/* -** Convert string 's' to a Lua number (put in 'result'). Return NULL -** on fail or the address of the ending '\0' on success. -** 'pmode' points to (and 'mode' contains) special things in the string: -** - 'x'/'X' means an hexadecimal numeral -** - 'n'/'N' means 'inf' or 'nan' (which should be rejected) -** - '.' just optimizes the search for the common case (nothing special) -** This function accepts both the current locale or a dot as the radix -** mark. If the convertion fails, it may mean number has a dot but -** locale accepts something else. In that case, the code copies 's' -** to a buffer (because 's' is read-only), changes the dot to the -** current locale radix mark, and tries to convert again. -*/ -static const char *l_str2d (const char *s, lua_Number *result) { - const char *endptr; - const char *pmode = strpbrk(s, ".xXnN"); - int mode = pmode ? ltolower(cast_uchar(*pmode)) : 0; - if (mode == 'n') /* reject 'inf' and 'nan' */ - return NULL; - endptr = l_str2dloc(s, result, mode); /* try to convert */ - if (endptr == NULL) { /* failed? may be a different locale */ - char buff[L_MAXLENNUM + 1]; - const char *pdot = strchr(s, '.'); - if (strlen(s) > L_MAXLENNUM || pdot == NULL) - return NULL; /* string too long or no dot; fail */ - strcpy(buff, s); /* copy string to buffer */ - buff[pdot - s] = lua_getlocaledecpoint(); /* correct decimal point */ - endptr = l_str2dloc(buff, result, mode); /* try again */ - if (endptr != NULL) - endptr = s + (endptr - buff); /* make relative to 's' */ - } - return endptr; -} - - -#define MAXBY10 cast(lua_Unsigned, LUA_MAXINTEGER / 10) -#define MAXLASTD cast_int(LUA_MAXINTEGER % 10) - -static const char *l_str2int (const char *s, lua_Integer *result) { - lua_Unsigned a = 0; - int empty = 1; - int neg; - while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */ - neg = isneg(&s); - if (s[0] == '0' && - (s[1] == 'x' || s[1] == 'X')) { /* hex? */ - s += 2; /* skip '0x' */ - for (; lisxdigit(cast_uchar(*s)); s++) { - a = a * 16 + luaO_hexavalue(*s); - empty = 0; - } - } - else { /* decimal */ - for (; lisdigit(cast_uchar(*s)); s++) { - int d = *s - '0'; - if (a >= MAXBY10 && (a > MAXBY10 || d > MAXLASTD + neg)) /* overflow? */ - return NULL; /* do not accept it (as integer) */ - a = a * 10 + d; - empty = 0; - } - } - while (lisspace(cast_uchar(*s))) s++; /* skip trailing spaces */ - if (empty || *s != '\0') return NULL; /* something wrong in the numeral */ - else { - *result = l_castU2S((neg) ? 0u - a : a); - return s; - } -} - - -size_t luaO_str2num (const char *s, TValue *o) { - lua_Integer i; lua_Number n; - const char *e; - if ((e = l_str2int(s, &i)) != NULL) { /* try as an integer */ - setivalue(o, i); - } - else if ((e = l_str2d(s, &n)) != NULL) { /* else try as a float */ - setfltvalue(o, n); - } - else - return 0; /* conversion failed */ - return (e - s) + 1; /* success; return string size */ -} - - -int luaO_utf8esc (char *buff, unsigned long x) { - int n = 1; /* number of bytes put in buffer (backwards) */ - lua_assert(x <= 0x10FFFF); - if (x < 0x80) /* ascii? */ - buff[UTF8BUFFSZ - 1] = cast(char, x); - else { /* need continuation bytes */ - unsigned int mfb = 0x3f; /* maximum that fits in first byte */ - do { /* add continuation bytes */ - buff[UTF8BUFFSZ - (n++)] = cast(char, 0x80 | (x & 0x3f)); - x >>= 6; /* remove added bits */ - mfb >>= 1; /* now there is one less bit available in first byte */ - } while (x > mfb); /* still needs continuation byte? */ - buff[UTF8BUFFSZ - n] = cast(char, (~mfb << 1) | x); /* add first byte */ - } - return n; -} - - -/* maximum length of the conversion of a number to a string */ -#define MAXNUMBER2STR 50 - - -/* -** Convert a number object to a string -*/ -void luaO_tostring (lua_State *L, StkId obj) { - char buff[MAXNUMBER2STR]; - size_t len; - lua_assert(ttisnumber(obj)); - if (ttisinteger(obj)) - len = lua_integer2str(buff, sizeof(buff), ivalue(obj)); - else { - len = lua_number2str(buff, sizeof(buff), fltvalue(obj)); -#if !defined(LUA_COMPAT_FLOATSTRING) - if (buff[strspn(buff, "-0123456789")] == '\0') { /* looks like an int? */ - buff[len++] = lua_getlocaledecpoint(); - buff[len++] = '0'; /* adds '.0' to result */ - } -#endif - } - setsvalue2s(L, obj, luaS_newlstr(L, buff, len)); -} - - -static void pushstr (lua_State *L, const char *str, size_t l) { - setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); - luaD_inctop(L); -} - - -/* -** this function handles only '%d', '%c', '%f', '%p', and '%s' - conventional formats, plus Lua-specific '%I' and '%U' -*/ -const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { - int n = 0; - for (;;) { - const char *e = strchr(fmt, '%'); - if (e == NULL) break; - pushstr(L, fmt, e - fmt); - switch (*(e+1)) { - case 's': { /* zero-terminated string */ - const char *s = va_arg(argp, char *); - if (s == NULL) s = "(null)"; - pushstr(L, s, strlen(s)); - break; - } - case 'c': { /* an 'int' as a character */ - char buff = cast(char, va_arg(argp, int)); - if (lisprint(cast_uchar(buff))) - pushstr(L, &buff, 1); - else /* non-printable character; print its code */ - luaO_pushfstring(L, "<\\%d>", cast_uchar(buff)); - break; - } - case 'd': { /* an 'int' */ - setivalue(L->top, va_arg(argp, int)); - goto top2str; - } - case 'I': { /* a 'lua_Integer' */ - setivalue(L->top, cast(lua_Integer, va_arg(argp, l_uacInt))); - goto top2str; - } - case 'f': { /* a 'lua_Number' */ - setfltvalue(L->top, cast_num(va_arg(argp, l_uacNumber))); - top2str: /* convert the top element to a string */ - luaD_inctop(L); - luaO_tostring(L, L->top - 1); - break; - } - case 'p': { /* a pointer */ - char buff[4*sizeof(void *) + 8]; /* should be enough space for a '%p' */ - void *p = va_arg(argp, void *); - int l = lua_pointer2str(buff, sizeof(buff), p); - pushstr(L, buff, l); - break; - } - case 'U': { /* an 'int' as a UTF-8 sequence */ - char buff[UTF8BUFFSZ]; - int l = luaO_utf8esc(buff, cast(long, va_arg(argp, long))); - pushstr(L, buff + UTF8BUFFSZ - l, l); - break; - } - case '%': { - pushstr(L, "%", 1); - break; - } - default: { - luaG_runerror(L, "invalid option '%%%c' to 'lua_pushfstring'", - *(e + 1)); - } - } - n += 2; - fmt = e+2; - } - luaD_checkstack(L, 1); - pushstr(L, fmt, strlen(fmt)); - if (n > 0) luaV_concat(L, n + 1); - return svalue(L->top - 1); -} - - -const char *luaO_pushfstring (lua_State *L, const char *fmt, ...) { - const char *msg; - va_list argp; - va_start(argp, fmt); - msg = luaO_pushvfstring(L, fmt, argp); - va_end(argp); - return msg; -} - - -/* number of chars of a literal string without the ending \0 */ -#define LL(x) (sizeof(x)/sizeof(char) - 1) - -#define RETS "..." -#define PRE "[string \"" -#define POS "\"]" - -#define addstr(a,b,l) ( memcpy(a,b,(l) * sizeof(char)), a += (l) ) - -void luaO_chunkid (char *out, const char *source, size_t bufflen) { - size_t l = strlen(source); - if (*source == '=') { /* 'literal' source */ - if (l <= bufflen) /* small enough? */ - memcpy(out, source + 1, l * sizeof(char)); - else { /* truncate it */ - addstr(out, source + 1, bufflen - 1); - *out = '\0'; - } - } - else if (*source == '@') { /* file name */ - if (l <= bufflen) /* small enough? */ - memcpy(out, source + 1, l * sizeof(char)); - else { /* add '...' before rest of name */ - addstr(out, RETS, LL(RETS)); - bufflen -= LL(RETS); - memcpy(out, source + 1 + l - bufflen, bufflen * sizeof(char)); - } - } - else { /* string; format as [string "source"] */ - const char *nl = strchr(source, '\n'); /* find first new line (if any) */ - addstr(out, PRE, LL(PRE)); /* add prefix */ - bufflen -= LL(PRE RETS POS) + 1; /* save space for prefix+suffix+'\0' */ - if (l < bufflen && nl == NULL) { /* small one-line source? */ - addstr(out, source, l); /* keep it */ - } - else { - if (nl != NULL) l = nl - source; /* stop at first newline */ - if (l > bufflen) l = bufflen; - addstr(out, source, l); - addstr(out, RETS, LL(RETS)); - } - memcpy(out, POS, (LL(POS) + 1) * sizeof(char)); - } -} - diff --git a/build/premake/premake5/contrib/lua/src/lobject.h b/build/premake/premake5/contrib/lua/src/lobject.h deleted file mode 100644 index 2408861402..0000000000 --- a/build/premake/premake5/contrib/lua/src/lobject.h +++ /dev/null @@ -1,549 +0,0 @@ -/* -** $Id: lobject.h,v 2.117.1.1 2017/04/19 17:39:34 roberto Exp $ -** Type definitions for Lua objects -** See Copyright Notice in lua.h -*/ - - -#ifndef lobject_h -#define lobject_h - - -#include - - -#include "llimits.h" -#include "lua.h" - - -/* -** Extra tags for non-values -*/ -#define LUA_TPROTO LUA_NUMTAGS /* function prototypes */ -#define LUA_TDEADKEY (LUA_NUMTAGS+1) /* removed keys in tables */ - -/* -** number of all possible tags (including LUA_TNONE but excluding DEADKEY) -*/ -#define LUA_TOTALTAGS (LUA_TPROTO + 2) - - -/* -** tags for Tagged Values have the following use of bits: -** bits 0-3: actual tag (a LUA_T* value) -** bits 4-5: variant bits -** bit 6: whether value is collectable -*/ - - -/* -** LUA_TFUNCTION variants: -** 0 - Lua function -** 1 - light C function -** 2 - regular C function (closure) -*/ - -/* Variant tags for functions */ -#define LUA_TLCL (LUA_TFUNCTION | (0 << 4)) /* Lua closure */ -#define LUA_TLCF (LUA_TFUNCTION | (1 << 4)) /* light C function */ -#define LUA_TCCL (LUA_TFUNCTION | (2 << 4)) /* C closure */ - - -/* Variant tags for strings */ -#define LUA_TSHRSTR (LUA_TSTRING | (0 << 4)) /* short strings */ -#define LUA_TLNGSTR (LUA_TSTRING | (1 << 4)) /* long strings */ - - -/* Variant tags for numbers */ -#define LUA_TNUMFLT (LUA_TNUMBER | (0 << 4)) /* float numbers */ -#define LUA_TNUMINT (LUA_TNUMBER | (1 << 4)) /* integer numbers */ - - -/* Bit mark for collectable types */ -#define BIT_ISCOLLECTABLE (1 << 6) - -/* mark a tag as collectable */ -#define ctb(t) ((t) | BIT_ISCOLLECTABLE) - - -/* -** Common type for all collectable objects -*/ -typedef struct GCObject GCObject; - - -/* -** Common Header for all collectable objects (in macro form, to be -** included in other objects) -*/ -#define CommonHeader GCObject *next; lu_byte tt; lu_byte marked - - -/* -** Common type has only the common header -*/ -struct GCObject { - CommonHeader; -}; - - - - -/* -** Tagged Values. This is the basic representation of values in Lua, -** an actual value plus a tag with its type. -*/ - -/* -** Union of all Lua values -*/ -typedef union Value { - GCObject *gc; /* collectable objects */ - void *p; /* light userdata */ - int b; /* booleans */ - lua_CFunction f; /* light C functions */ - lua_Integer i; /* integer numbers */ - lua_Number n; /* float numbers */ -} Value; - - -#define TValuefields Value value_; int tt_ - - -typedef struct lua_TValue { - TValuefields; -} TValue; - - - -/* macro defining a nil value */ -#define NILCONSTANT {NULL}, LUA_TNIL - - -#define val_(o) ((o)->value_) - - -/* raw type tag of a TValue */ -#define rttype(o) ((o)->tt_) - -/* tag with no variants (bits 0-3) */ -#define novariant(x) ((x) & 0x0F) - -/* type tag of a TValue (bits 0-3 for tags + variant bits 4-5) */ -#define ttype(o) (rttype(o) & 0x3F) - -/* type tag of a TValue with no variants (bits 0-3) */ -#define ttnov(o) (novariant(rttype(o))) - - -/* Macros to test type */ -#define checktag(o,t) (rttype(o) == (t)) -#define checktype(o,t) (ttnov(o) == (t)) -#define ttisnumber(o) checktype((o), LUA_TNUMBER) -#define ttisfloat(o) checktag((o), LUA_TNUMFLT) -#define ttisinteger(o) checktag((o), LUA_TNUMINT) -#define ttisnil(o) checktag((o), LUA_TNIL) -#define ttisboolean(o) checktag((o), LUA_TBOOLEAN) -#define ttislightuserdata(o) checktag((o), LUA_TLIGHTUSERDATA) -#define ttisstring(o) checktype((o), LUA_TSTRING) -#define ttisshrstring(o) checktag((o), ctb(LUA_TSHRSTR)) -#define ttislngstring(o) checktag((o), ctb(LUA_TLNGSTR)) -#define ttistable(o) checktag((o), ctb(LUA_TTABLE)) -#define ttisfunction(o) checktype(o, LUA_TFUNCTION) -#define ttisclosure(o) ((rttype(o) & 0x1F) == LUA_TFUNCTION) -#define ttisCclosure(o) checktag((o), ctb(LUA_TCCL)) -#define ttisLclosure(o) checktag((o), ctb(LUA_TLCL)) -#define ttislcf(o) checktag((o), LUA_TLCF) -#define ttisfulluserdata(o) checktag((o), ctb(LUA_TUSERDATA)) -#define ttisthread(o) checktag((o), ctb(LUA_TTHREAD)) -#define ttisdeadkey(o) checktag((o), LUA_TDEADKEY) - - -/* Macros to access values */ -#define ivalue(o) check_exp(ttisinteger(o), val_(o).i) -#define fltvalue(o) check_exp(ttisfloat(o), val_(o).n) -#define nvalue(o) check_exp(ttisnumber(o), \ - (ttisinteger(o) ? cast_num(ivalue(o)) : fltvalue(o))) -#define gcvalue(o) check_exp(iscollectable(o), val_(o).gc) -#define pvalue(o) check_exp(ttislightuserdata(o), val_(o).p) -#define tsvalue(o) check_exp(ttisstring(o), gco2ts(val_(o).gc)) -#define uvalue(o) check_exp(ttisfulluserdata(o), gco2u(val_(o).gc)) -#define clvalue(o) check_exp(ttisclosure(o), gco2cl(val_(o).gc)) -#define clLvalue(o) check_exp(ttisLclosure(o), gco2lcl(val_(o).gc)) -#define clCvalue(o) check_exp(ttisCclosure(o), gco2ccl(val_(o).gc)) -#define fvalue(o) check_exp(ttislcf(o), val_(o).f) -#define hvalue(o) check_exp(ttistable(o), gco2t(val_(o).gc)) -#define bvalue(o) check_exp(ttisboolean(o), val_(o).b) -#define thvalue(o) check_exp(ttisthread(o), gco2th(val_(o).gc)) -/* a dead value may get the 'gc' field, but cannot access its contents */ -#define deadvalue(o) check_exp(ttisdeadkey(o), cast(void *, val_(o).gc)) - -#define l_isfalse(o) (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0)) - - -#define iscollectable(o) (rttype(o) & BIT_ISCOLLECTABLE) - - -/* Macros for internal tests */ -#define righttt(obj) (ttype(obj) == gcvalue(obj)->tt) - -#define checkliveness(L,obj) \ - lua_longassert(!iscollectable(obj) || \ - (righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj))))) - - -/* Macros to set values */ -#define settt_(o,t) ((o)->tt_=(t)) - -#define setfltvalue(obj,x) \ - { TValue *io=(obj); val_(io).n=(x); settt_(io, LUA_TNUMFLT); } - -#define chgfltvalue(obj,x) \ - { TValue *io=(obj); lua_assert(ttisfloat(io)); val_(io).n=(x); } - -#define setivalue(obj,x) \ - { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_TNUMINT); } - -#define chgivalue(obj,x) \ - { TValue *io=(obj); lua_assert(ttisinteger(io)); val_(io).i=(x); } - -#define setnilvalue(obj) settt_(obj, LUA_TNIL) - -#define setfvalue(obj,x) \ - { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_TLCF); } - -#define setpvalue(obj,x) \ - { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_TLIGHTUSERDATA); } - -#define setbvalue(obj,x) \ - { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); } - -#define setgcovalue(L,obj,x) \ - { TValue *io = (obj); GCObject *i_g=(x); \ - val_(io).gc = i_g; settt_(io, ctb(i_g->tt)); } - -#define setsvalue(L,obj,x) \ - { TValue *io = (obj); TString *x_ = (x); \ - val_(io).gc = obj2gco(x_); settt_(io, ctb(x_->tt)); \ - checkliveness(L,io); } - -#define setuvalue(L,obj,x) \ - { TValue *io = (obj); Udata *x_ = (x); \ - val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TUSERDATA)); \ - checkliveness(L,io); } - -#define setthvalue(L,obj,x) \ - { TValue *io = (obj); lua_State *x_ = (x); \ - val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TTHREAD)); \ - checkliveness(L,io); } - -#define setclLvalue(L,obj,x) \ - { TValue *io = (obj); LClosure *x_ = (x); \ - val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TLCL)); \ - checkliveness(L,io); } - -#define setclCvalue(L,obj,x) \ - { TValue *io = (obj); CClosure *x_ = (x); \ - val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TCCL)); \ - checkliveness(L,io); } - -#define sethvalue(L,obj,x) \ - { TValue *io = (obj); Table *x_ = (x); \ - val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TTABLE)); \ - checkliveness(L,io); } - -#define setdeadvalue(obj) settt_(obj, LUA_TDEADKEY) - - - -#define setobj(L,obj1,obj2) \ - { TValue *io1=(obj1); *io1 = *(obj2); \ - (void)L; checkliveness(L,io1); } - - -/* -** different types of assignments, according to destination -*/ - -/* from stack to (same) stack */ -#define setobjs2s setobj -/* to stack (not from same stack) */ -#define setobj2s setobj -#define setsvalue2s setsvalue -#define sethvalue2s sethvalue -#define setptvalue2s setptvalue -/* from table to same table */ -#define setobjt2t setobj -/* to new object */ -#define setobj2n setobj -#define setsvalue2n setsvalue - -/* to table (define it as an expression to be used in macros) */ -#define setobj2t(L,o1,o2) ((void)L, *(o1)=*(o2), checkliveness(L,(o1))) - - - - -/* -** {====================================================== -** types and prototypes -** ======================================================= -*/ - - -typedef TValue *StkId; /* index to stack elements */ - - - - -/* -** Header for string value; string bytes follow the end of this structure -** (aligned according to 'UTString'; see next). -*/ -typedef struct TString { - CommonHeader; - lu_byte extra; /* reserved words for short strings; "has hash" for longs */ - lu_byte shrlen; /* length for short strings */ - unsigned int hash; - union { - size_t lnglen; /* length for long strings */ - struct TString *hnext; /* linked list for hash table */ - } u; -} TString; - - -/* -** Ensures that address after this type is always fully aligned. -*/ -typedef union UTString { - L_Umaxalign dummy; /* ensures maximum alignment for strings */ - TString tsv; -} UTString; - - -/* -** Get the actual string (array of bytes) from a 'TString'. -** (Access to 'extra' ensures that value is really a 'TString'.) -*/ -#define getstr(ts) \ - check_exp(sizeof((ts)->extra), cast(char *, (ts)) + sizeof(UTString)) - - -/* get the actual string (array of bytes) from a Lua value */ -#define svalue(o) getstr(tsvalue(o)) - -/* get string length from 'TString *s' */ -#define tsslen(s) ((s)->tt == LUA_TSHRSTR ? (s)->shrlen : (s)->u.lnglen) - -/* get string length from 'TValue *o' */ -#define vslen(o) tsslen(tsvalue(o)) - - -/* -** Header for userdata; memory area follows the end of this structure -** (aligned according to 'UUdata'; see next). -*/ -typedef struct Udata { - CommonHeader; - lu_byte ttuv_; /* user value's tag */ - struct Table *metatable; - size_t len; /* number of bytes */ - union Value user_; /* user value */ -} Udata; - - -/* -** Ensures that address after this type is always fully aligned. -*/ -typedef union UUdata { - L_Umaxalign dummy; /* ensures maximum alignment for 'local' udata */ - Udata uv; -} UUdata; - - -/* -** Get the address of memory block inside 'Udata'. -** (Access to 'ttuv_' ensures that value is really a 'Udata'.) -*/ -#define getudatamem(u) \ - check_exp(sizeof((u)->ttuv_), (cast(char*, (u)) + sizeof(UUdata))) - -#define setuservalue(L,u,o) \ - { const TValue *io=(o); Udata *iu = (u); \ - iu->user_ = io->value_; iu->ttuv_ = rttype(io); \ - checkliveness(L,io); } - - -#define getuservalue(L,u,o) \ - { TValue *io=(o); const Udata *iu = (u); \ - io->value_ = iu->user_; settt_(io, iu->ttuv_); \ - checkliveness(L,io); } - - -/* -** Description of an upvalue for function prototypes -*/ -typedef struct Upvaldesc { - TString *name; /* upvalue name (for debug information) */ - lu_byte instack; /* whether it is in stack (register) */ - lu_byte idx; /* index of upvalue (in stack or in outer function's list) */ -} Upvaldesc; - - -/* -** Description of a local variable for function prototypes -** (used for debug information) -*/ -typedef struct LocVar { - TString *varname; - int startpc; /* first point where variable is active */ - int endpc; /* first point where variable is dead */ -} LocVar; - - -/* -** Function Prototypes -*/ -typedef struct Proto { - CommonHeader; - lu_byte numparams; /* number of fixed parameters */ - lu_byte is_vararg; - lu_byte maxstacksize; /* number of registers needed by this function */ - int sizeupvalues; /* size of 'upvalues' */ - int sizek; /* size of 'k' */ - int sizecode; - int sizelineinfo; - int sizep; /* size of 'p' */ - int sizelocvars; - int linedefined; /* debug information */ - int lastlinedefined; /* debug information */ - TValue *k; /* constants used by the function */ - Instruction *code; /* opcodes */ - struct Proto **p; /* functions defined inside the function */ - int *lineinfo; /* map from opcodes to source lines (debug information) */ - LocVar *locvars; /* information about local variables (debug information) */ - Upvaldesc *upvalues; /* upvalue information */ - struct LClosure *cache; /* last-created closure with this prototype */ - TString *source; /* used for debug information */ - GCObject *gclist; -} Proto; - - - -/* -** Lua Upvalues -*/ -typedef struct UpVal UpVal; - - -/* -** Closures -*/ - -#define ClosureHeader \ - CommonHeader; lu_byte nupvalues; GCObject *gclist - -typedef struct CClosure { - ClosureHeader; - lua_CFunction f; - TValue upvalue[1]; /* list of upvalues */ -} CClosure; - - -typedef struct LClosure { - ClosureHeader; - struct Proto *p; - UpVal *upvals[1]; /* list of upvalues */ -} LClosure; - - -typedef union Closure { - CClosure c; - LClosure l; -} Closure; - - -#define isLfunction(o) ttisLclosure(o) - -#define getproto(o) (clLvalue(o)->p) - - -/* -** Tables -*/ - -typedef union TKey { - struct { - TValuefields; - int next; /* for chaining (offset for next node) */ - } nk; - TValue tvk; -} TKey; - - -/* copy a value into a key without messing up field 'next' */ -#define setnodekey(L,key,obj) \ - { TKey *k_=(key); const TValue *io_=(obj); \ - k_->nk.value_ = io_->value_; k_->nk.tt_ = io_->tt_; \ - (void)L; checkliveness(L,io_); } - - -typedef struct Node { - TValue i_val; - TKey i_key; -} Node; - - -typedef struct Table { - CommonHeader; - lu_byte flags; /* 1<

lsizenode)) - - -/* -** (address of) a fixed nil value -*/ -#define luaO_nilobject (&luaO_nilobject_) - - -LUAI_DDEC const TValue luaO_nilobject_; - -/* size of buffer for 'luaO_utf8esc' function */ -#define UTF8BUFFSZ 8 - -LUAI_FUNC int luaO_int2fb (unsigned int x); -LUAI_FUNC int luaO_fb2int (int x); -LUAI_FUNC int luaO_utf8esc (char *buff, unsigned long x); -LUAI_FUNC int luaO_ceillog2 (unsigned int x); -LUAI_FUNC void luaO_arith (lua_State *L, int op, const TValue *p1, - const TValue *p2, TValue *res); -LUAI_FUNC size_t luaO_str2num (const char *s, TValue *o); -LUAI_FUNC int luaO_hexavalue (int c); -LUAI_FUNC void luaO_tostring (lua_State *L, StkId obj); -LUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt, - va_list argp); -LUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...); -LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len); - - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/lopcodes.c b/build/premake/premake5/contrib/lua/src/lopcodes.c deleted file mode 100644 index 5ca3eb261a..0000000000 --- a/build/premake/premake5/contrib/lua/src/lopcodes.c +++ /dev/null @@ -1,124 +0,0 @@ -/* -** $Id: lopcodes.c,v 1.55.1.1 2017/04/19 17:20:42 roberto Exp $ -** Opcodes for Lua virtual machine -** See Copyright Notice in lua.h -*/ - -#define lopcodes_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lopcodes.h" - - -/* ORDER OP */ - -LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { - "MOVE", - "LOADK", - "LOADKX", - "LOADBOOL", - "LOADNIL", - "GETUPVAL", - "GETTABUP", - "GETTABLE", - "SETTABUP", - "SETUPVAL", - "SETTABLE", - "NEWTABLE", - "SELF", - "ADD", - "SUB", - "MUL", - "MOD", - "POW", - "DIV", - "IDIV", - "BAND", - "BOR", - "BXOR", - "SHL", - "SHR", - "UNM", - "BNOT", - "NOT", - "LEN", - "CONCAT", - "JMP", - "EQ", - "LT", - "LE", - "TEST", - "TESTSET", - "CALL", - "TAILCALL", - "RETURN", - "FORLOOP", - "FORPREP", - "TFORCALL", - "TFORLOOP", - "SETLIST", - "CLOSURE", - "VARARG", - "EXTRAARG", - NULL -}; - - -#define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m)) - -LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { -/* T A B C mode opcode */ - opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ - ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */ - ,opmode(0, 1, OpArgN, OpArgN, iABx) /* OP_LOADKX */ - ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_LOADBOOL */ - ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_LOADNIL */ - ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_GETUPVAL */ - ,opmode(0, 1, OpArgU, OpArgK, iABC) /* OP_GETTABUP */ - ,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_GETTABLE */ - ,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABUP */ - ,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_SETUPVAL */ - ,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABLE */ - ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_NEWTABLE */ - ,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_SELF */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_ADD */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_SUB */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MUL */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MOD */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_POW */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_DIV */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_IDIV */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_BAND */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_BOR */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_BXOR */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_SHL */ - ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_SHR */ - ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_UNM */ - ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_BNOT */ - ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_NOT */ - ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LEN */ - ,opmode(0, 1, OpArgR, OpArgR, iABC) /* OP_CONCAT */ - ,opmode(0, 0, OpArgR, OpArgN, iAsBx) /* OP_JMP */ - ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_EQ */ - ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_LT */ - ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_LE */ - ,opmode(1, 0, OpArgN, OpArgU, iABC) /* OP_TEST */ - ,opmode(1, 1, OpArgR, OpArgU, iABC) /* OP_TESTSET */ - ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_CALL */ - ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_TAILCALL */ - ,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_RETURN */ - ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_FORLOOP */ - ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_FORPREP */ - ,opmode(0, 0, OpArgN, OpArgU, iABC) /* OP_TFORCALL */ - ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_TFORLOOP */ - ,opmode(0, 0, OpArgU, OpArgU, iABC) /* OP_SETLIST */ - ,opmode(0, 1, OpArgU, OpArgN, iABx) /* OP_CLOSURE */ - ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_VARARG */ - ,opmode(0, 0, OpArgU, OpArgU, iAx) /* OP_EXTRAARG */ -}; - diff --git a/build/premake/premake5/contrib/lua/src/lopcodes.h b/build/premake/premake5/contrib/lua/src/lopcodes.h deleted file mode 100644 index 6feaa1cd07..0000000000 --- a/build/premake/premake5/contrib/lua/src/lopcodes.h +++ /dev/null @@ -1,297 +0,0 @@ -/* -** $Id: lopcodes.h,v 1.149.1.1 2017/04/19 17:20:42 roberto Exp $ -** Opcodes for Lua virtual machine -** See Copyright Notice in lua.h -*/ - -#ifndef lopcodes_h -#define lopcodes_h - -#include "llimits.h" - - -/*=========================================================================== - We assume that instructions are unsigned numbers. - All instructions have an opcode in the first 6 bits. - Instructions can have the following fields: - 'A' : 8 bits - 'B' : 9 bits - 'C' : 9 bits - 'Ax' : 26 bits ('A', 'B', and 'C' together) - 'Bx' : 18 bits ('B' and 'C' together) - 'sBx' : signed Bx - - A signed argument is represented in excess K; that is, the number - value is the unsigned value minus K. K is exactly the maximum value - for that argument (so that -max is represented by 0, and +max is - represented by 2*max), which is half the maximum for the corresponding - unsigned argument. -===========================================================================*/ - - -enum OpMode {iABC, iABx, iAsBx, iAx}; /* basic instruction format */ - - -/* -** size and position of opcode arguments. -*/ -#define SIZE_C 9 -#define SIZE_B 9 -#define SIZE_Bx (SIZE_C + SIZE_B) -#define SIZE_A 8 -#define SIZE_Ax (SIZE_C + SIZE_B + SIZE_A) - -#define SIZE_OP 6 - -#define POS_OP 0 -#define POS_A (POS_OP + SIZE_OP) -#define POS_C (POS_A + SIZE_A) -#define POS_B (POS_C + SIZE_C) -#define POS_Bx POS_C -#define POS_Ax POS_A - - -/* -** limits for opcode arguments. -** we use (signed) int to manipulate most arguments, -** so they must fit in LUAI_BITSINT-1 bits (-1 for sign) -*/ -#if SIZE_Bx < LUAI_BITSINT-1 -#define MAXARG_Bx ((1<>1) /* 'sBx' is signed */ -#else -#define MAXARG_Bx MAX_INT -#define MAXARG_sBx MAX_INT -#endif - -#if SIZE_Ax < LUAI_BITSINT-1 -#define MAXARG_Ax ((1<>POS_OP) & MASK1(SIZE_OP,0))) -#define SET_OPCODE(i,o) ((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \ - ((cast(Instruction, o)<>pos) & MASK1(size,0))) -#define setarg(i,v,pos,size) ((i) = (((i)&MASK0(size,pos)) | \ - ((cast(Instruction, v)<> RK(C) */ -OP_UNM,/* A B R(A) := -R(B) */ -OP_BNOT,/* A B R(A) := ~R(B) */ -OP_NOT,/* A B R(A) := not R(B) */ -OP_LEN,/* A B R(A) := length of R(B) */ - -OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */ - -OP_JMP,/* A sBx pc+=sBx; if (A) close all upvalues >= R(A - 1) */ -OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */ -OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ -OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ - -OP_TEST,/* A C if not (R(A) <=> C) then pc++ */ -OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ - -OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */ -OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ -OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */ - -OP_FORLOOP,/* A sBx R(A)+=R(A+2); - if R(A) > 4) & 3)) -#define getCMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 2) & 3)) -#define testAMode(m) (luaP_opmodes[m] & (1 << 6)) -#define testTMode(m) (luaP_opmodes[m] & (1 << 7)) - - -LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ - - -/* number of list items to accumulate before a SETLIST instruction */ -#define LFIELDS_PER_FLUSH 50 - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/loslib.c b/build/premake/premake5/contrib/lua/src/loslib.c deleted file mode 100644 index de590c6b71..0000000000 --- a/build/premake/premake5/contrib/lua/src/loslib.c +++ /dev/null @@ -1,409 +0,0 @@ -/* -** $Id: loslib.c,v 1.65.1.1 2017/04/19 17:29:57 roberto Exp $ -** Standard Operating System library -** See Copyright Notice in lua.h -*/ - -#define loslib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -/* -** {================================================================== -** List of valid conversion specifiers for the 'strftime' function; -** options are grouped by length; group of length 2 start with '||'. -** =================================================================== -*/ -#if !defined(LUA_STRFTIMEOPTIONS) /* { */ - -/* options for ANSI C 89 (only 1-char options) */ -#define L_STRFTIMEC89 "aAbBcdHIjmMpSUwWxXyYZ%" - -/* options for ISO C 99 and POSIX */ -#define L_STRFTIMEC99 "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%" \ - "||" "EcECExEXEyEY" "OdOeOHOIOmOMOSOuOUOVOwOWOy" /* two-char options */ - -/* options for Windows */ -#define L_STRFTIMEWIN "aAbBcdHIjmMpSUwWxXyYzZ%" \ - "||" "#c#x#d#H#I#j#m#M#S#U#w#W#y#Y" /* two-char options */ - -#if defined(LUA_USE_WINDOWS) -#define LUA_STRFTIMEOPTIONS L_STRFTIMEWIN -#elif defined(LUA_USE_C89) -#define LUA_STRFTIMEOPTIONS L_STRFTIMEC89 -#else /* C99 specification */ -#define LUA_STRFTIMEOPTIONS L_STRFTIMEC99 -#endif - -#endif /* } */ -/* }================================================================== */ - - -/* -** {================================================================== -** Configuration for time-related stuff -** =================================================================== -*/ - -#if !defined(l_time_t) /* { */ -/* -** type to represent time_t in Lua -*/ -#define l_timet lua_Integer -#define l_pushtime(L,t) lua_pushinteger(L,(lua_Integer)(t)) - -static time_t l_checktime (lua_State *L, int arg) { - lua_Integer t = luaL_checkinteger(L, arg); - luaL_argcheck(L, (time_t)t == t, arg, "time out-of-bounds"); - return (time_t)t; -} - -#endif /* } */ - - -#if !defined(l_gmtime) /* { */ -/* -** By default, Lua uses gmtime/localtime, except when POSIX is available, -** where it uses gmtime_r/localtime_r -*/ - -#if defined(LUA_USE_POSIX) /* { */ - -#define l_gmtime(t,r) gmtime_r(t,r) -#define l_localtime(t,r) localtime_r(t,r) - -#else /* }{ */ - -/* ISO C definitions */ -#define l_gmtime(t,r) ((void)(r)->tm_sec, gmtime(t)) -#define l_localtime(t,r) ((void)(r)->tm_sec, localtime(t)) - -#endif /* } */ - -#endif /* } */ - -/* }================================================================== */ - - -/* -** {================================================================== -** Configuration for 'tmpnam': -** By default, Lua uses tmpnam except when POSIX is available, where -** it uses mkstemp. -** =================================================================== -*/ -#if !defined(lua_tmpnam) /* { */ - -#if defined(LUA_USE_POSIX) /* { */ - -#include - -#define LUA_TMPNAMBUFSIZE 32 - -#if !defined(LUA_TMPNAMTEMPLATE) -#define LUA_TMPNAMTEMPLATE "/tmp/lua_XXXXXX" -#endif - -#define lua_tmpnam(b,e) { \ - strcpy(b, LUA_TMPNAMTEMPLATE); \ - e = mkstemp(b); \ - if (e != -1) close(e); \ - e = (e == -1); } - -#else /* }{ */ - -/* ISO C definitions */ -#define LUA_TMPNAMBUFSIZE L_tmpnam -#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } - -#endif /* } */ - -#endif /* } */ -/* }================================================================== */ - - - - -static int os_execute (lua_State *L) { - const char *cmd = luaL_optstring(L, 1, NULL); - int stat = system(cmd); - if (cmd != NULL) - return luaL_execresult(L, stat); - else { - lua_pushboolean(L, stat); /* true if there is a shell */ - return 1; - } -} - - -static int os_remove (lua_State *L) { - const char *filename = luaL_checkstring(L, 1); - return luaL_fileresult(L, remove(filename) == 0, filename); -} - - -static int os_rename (lua_State *L) { - const char *fromname = luaL_checkstring(L, 1); - const char *toname = luaL_checkstring(L, 2); - return luaL_fileresult(L, rename(fromname, toname) == 0, NULL); -} - - -static int os_tmpname (lua_State *L) { - char buff[LUA_TMPNAMBUFSIZE]; - int err; - lua_tmpnam(buff, err); - if (err) - return luaL_error(L, "unable to generate a unique filename"); - lua_pushstring(L, buff); - return 1; -} - - -static int os_getenv (lua_State *L) { - lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ - return 1; -} - - -static int os_clock (lua_State *L) { - lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC); - return 1; -} - - -/* -** {====================================================== -** Time/Date operations -** { year=%Y, month=%m, day=%d, hour=%H, min=%M, sec=%S, -** wday=%w+1, yday=%j, isdst=? } -** ======================================================= -*/ - -static void setfield (lua_State *L, const char *key, int value) { - lua_pushinteger(L, value); - lua_setfield(L, -2, key); -} - -static void setboolfield (lua_State *L, const char *key, int value) { - if (value < 0) /* undefined? */ - return; /* does not set field */ - lua_pushboolean(L, value); - lua_setfield(L, -2, key); -} - - -/* -** Set all fields from structure 'tm' in the table on top of the stack -*/ -static void setallfields (lua_State *L, struct tm *stm) { - setfield(L, "sec", stm->tm_sec); - setfield(L, "min", stm->tm_min); - setfield(L, "hour", stm->tm_hour); - setfield(L, "day", stm->tm_mday); - setfield(L, "month", stm->tm_mon + 1); - setfield(L, "year", stm->tm_year + 1900); - setfield(L, "wday", stm->tm_wday + 1); - setfield(L, "yday", stm->tm_yday + 1); - setboolfield(L, "isdst", stm->tm_isdst); -} - - -static int getboolfield (lua_State *L, const char *key) { - int res; - res = (lua_getfield(L, -1, key) == LUA_TNIL) ? -1 : lua_toboolean(L, -1); - lua_pop(L, 1); - return res; -} - - -/* maximum value for date fields (to avoid arithmetic overflows with 'int') */ -#if !defined(L_MAXDATEFIELD) -#define L_MAXDATEFIELD (INT_MAX / 2) -#endif - -static int getfield (lua_State *L, const char *key, int d, int delta) { - int isnum; - int t = lua_getfield(L, -1, key); /* get field and its type */ - lua_Integer res = lua_tointegerx(L, -1, &isnum); - if (!isnum) { /* field is not an integer? */ - if (t != LUA_TNIL) /* some other value? */ - return luaL_error(L, "field '%s' is not an integer", key); - else if (d < 0) /* absent field; no default? */ - return luaL_error(L, "field '%s' missing in date table", key); - res = d; - } - else { - if (!(-L_MAXDATEFIELD <= res && res <= L_MAXDATEFIELD)) - return luaL_error(L, "field '%s' is out-of-bound", key); - res -= delta; - } - lua_pop(L, 1); - return (int)res; -} - - -static const char *checkoption (lua_State *L, const char *conv, - ptrdiff_t convlen, char *buff) { - const char *option = LUA_STRFTIMEOPTIONS; - int oplen = 1; /* length of options being checked */ - for (; *option != '\0' && oplen <= convlen; option += oplen) { - if (*option == '|') /* next block? */ - oplen++; /* will check options with next length (+1) */ - else if (memcmp(conv, option, oplen) == 0) { /* match? */ - memcpy(buff, conv, oplen); /* copy valid option to buffer */ - buff[oplen] = '\0'; - return conv + oplen; /* return next item */ - } - } - luaL_argerror(L, 1, - lua_pushfstring(L, "invalid conversion specifier '%%%s'", conv)); - return conv; /* to avoid warnings */ -} - - -/* maximum size for an individual 'strftime' item */ -#define SIZETIMEFMT 250 - - -static int os_date (lua_State *L) { - size_t slen; - const char *s = luaL_optlstring(L, 1, "%c", &slen); - time_t t = luaL_opt(L, l_checktime, 2, time(NULL)); - const char *se = s + slen; /* 's' end */ - struct tm tmr, *stm; - if (*s == '!') { /* UTC? */ - stm = l_gmtime(&t, &tmr); - s++; /* skip '!' */ - } - else - stm = l_localtime(&t, &tmr); - if (stm == NULL) /* invalid date? */ - return luaL_error(L, - "time result cannot be represented in this installation"); - if (strcmp(s, "*t") == 0) { - lua_createtable(L, 0, 9); /* 9 = number of fields */ - setallfields(L, stm); - } - else { - char cc[4]; /* buffer for individual conversion specifiers */ - luaL_Buffer b; - cc[0] = '%'; - luaL_buffinit(L, &b); - while (s < se) { - if (*s != '%') /* not a conversion specifier? */ - luaL_addchar(&b, *s++); - else { - size_t reslen; - char *buff = luaL_prepbuffsize(&b, SIZETIMEFMT); - s++; /* skip '%' */ - s = checkoption(L, s, se - s, cc + 1); /* copy specifier to 'cc' */ - reslen = strftime(buff, SIZETIMEFMT, cc, stm); - luaL_addsize(&b, reslen); - } - } - luaL_pushresult(&b); - } - return 1; -} - - -static int os_time (lua_State *L) { - time_t t; - if (lua_isnoneornil(L, 1)) /* called without args? */ - t = time(NULL); /* get current time */ - else { - struct tm ts; - luaL_checktype(L, 1, LUA_TTABLE); - lua_settop(L, 1); /* make sure table is at the top */ - ts.tm_sec = getfield(L, "sec", 0, 0); - ts.tm_min = getfield(L, "min", 0, 0); - ts.tm_hour = getfield(L, "hour", 12, 0); - ts.tm_mday = getfield(L, "day", -1, 0); - ts.tm_mon = getfield(L, "month", -1, 1); - ts.tm_year = getfield(L, "year", -1, 1900); - ts.tm_isdst = getboolfield(L, "isdst"); - t = mktime(&ts); - setallfields(L, &ts); /* update fields with normalized values */ - } - if (t != (time_t)(l_timet)t || t == (time_t)(-1)) - return luaL_error(L, - "time result cannot be represented in this installation"); - l_pushtime(L, t); - return 1; -} - - -static int os_difftime (lua_State *L) { - time_t t1 = l_checktime(L, 1); - time_t t2 = l_checktime(L, 2); - lua_pushnumber(L, (lua_Number)difftime(t1, t2)); - return 1; -} - -/* }====================================================== */ - - -static int os_setlocale (lua_State *L) { - static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, - LC_NUMERIC, LC_TIME}; - static const char *const catnames[] = {"all", "collate", "ctype", "monetary", - "numeric", "time", NULL}; - const char *l = luaL_optstring(L, 1, NULL); - int op = luaL_checkoption(L, 2, "all", catnames); - lua_pushstring(L, setlocale(cat[op], l)); - return 1; -} - - -static int os_exit (lua_State *L) { - int status; - if (lua_isboolean(L, 1)) - status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE); - else - status = (int)luaL_optinteger(L, 1, EXIT_SUCCESS); - if (lua_toboolean(L, 2)) - lua_close(L); - if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */ - return 0; -} - - -static const luaL_Reg syslib[] = { - {"clock", os_clock}, - {"date", os_date}, - {"difftime", os_difftime}, - {"execute", os_execute}, - {"exit", os_exit}, - {"getenv", os_getenv}, - {"remove", os_remove}, - {"rename", os_rename}, - {"setlocale", os_setlocale}, - {"time", os_time}, - {"tmpname", os_tmpname}, - {NULL, NULL} -}; - -/* }====================================================== */ - - - -LUAMOD_API int luaopen_os (lua_State *L) { - luaL_newlib(L, syslib); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/lparser.c b/build/premake/premake5/contrib/lua/src/lparser.c deleted file mode 100644 index cc54de43c6..0000000000 --- a/build/premake/premake5/contrib/lua/src/lparser.c +++ /dev/null @@ -1,1650 +0,0 @@ -/* -** $Id: lparser.c,v 2.155.1.2 2017/04/29 18:11:40 roberto Exp $ -** Lua Parser -** See Copyright Notice in lua.h -*/ - -#define lparser_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "lcode.h" -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "llex.h" -#include "lmem.h" -#include "lobject.h" -#include "lopcodes.h" -#include "lparser.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" - - - -/* maximum number of local variables per function (must be smaller - than 250, due to the bytecode format) */ -#define MAXVARS 200 - - -#define hasmultret(k) ((k) == VCALL || (k) == VVARARG) - - -/* because all strings are unified by the scanner, the parser - can use pointer equality for string equality */ -#define eqstr(a,b) ((a) == (b)) - - -/* -** nodes for block list (list of active blocks) -*/ -typedef struct BlockCnt { - struct BlockCnt *previous; /* chain */ - int firstlabel; /* index of first label in this block */ - int firstgoto; /* index of first pending goto in this block */ - lu_byte nactvar; /* # active locals outside the block */ - lu_byte upval; /* true if some variable in the block is an upvalue */ - lu_byte isloop; /* true if 'block' is a loop */ -} BlockCnt; - - - -/* -** prototypes for recursive non-terminal functions -*/ -static void statement (LexState *ls); -static void expr (LexState *ls, expdesc *v); - - -/* semantic error */ -static l_noret semerror (LexState *ls, const char *msg) { - ls->t.token = 0; /* remove "near " from final message */ - luaX_syntaxerror(ls, msg); -} - - -static l_noret error_expected (LexState *ls, int token) { - luaX_syntaxerror(ls, - luaO_pushfstring(ls->L, "%s expected", luaX_token2str(ls, token))); -} - - -static l_noret errorlimit (FuncState *fs, int limit, const char *what) { - lua_State *L = fs->ls->L; - const char *msg; - int line = fs->f->linedefined; - const char *where = (line == 0) - ? "main function" - : luaO_pushfstring(L, "function at line %d", line); - msg = luaO_pushfstring(L, "too many %s (limit is %d) in %s", - what, limit, where); - luaX_syntaxerror(fs->ls, msg); -} - - -static void checklimit (FuncState *fs, int v, int l, const char *what) { - if (v > l) errorlimit(fs, l, what); -} - - -static int testnext (LexState *ls, int c) { - if (ls->t.token == c) { - luaX_next(ls); - return 1; - } - else return 0; -} - - -static void check (LexState *ls, int c) { - if (ls->t.token != c) - error_expected(ls, c); -} - - -static void checknext (LexState *ls, int c) { - check(ls, c); - luaX_next(ls); -} - - -#define check_condition(ls,c,msg) { if (!(c)) luaX_syntaxerror(ls, msg); } - - - -static void check_match (LexState *ls, int what, int who, int where) { - if (!testnext(ls, what)) { - if (where == ls->linenumber) - error_expected(ls, what); - else { - luaX_syntaxerror(ls, luaO_pushfstring(ls->L, - "%s expected (to close %s at line %d)", - luaX_token2str(ls, what), luaX_token2str(ls, who), where)); - } - } -} - - -static TString *str_checkname (LexState *ls) { - TString *ts; - check(ls, TK_NAME); - ts = ls->t.seminfo.ts; - luaX_next(ls); - return ts; -} - - -static void init_exp (expdesc *e, expkind k, int i) { - e->f = e->t = NO_JUMP; - e->k = k; - e->u.info = i; -} - - -static void codestring (LexState *ls, expdesc *e, TString *s) { - init_exp(e, VK, luaK_stringK(ls->fs, s)); -} - - -static void checkname (LexState *ls, expdesc *e) { - codestring(ls, e, str_checkname(ls)); -} - - -static int registerlocalvar (LexState *ls, TString *varname) { - FuncState *fs = ls->fs; - Proto *f = fs->f; - int oldsize = f->sizelocvars; - luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars, - LocVar, SHRT_MAX, "local variables"); - while (oldsize < f->sizelocvars) - f->locvars[oldsize++].varname = NULL; - f->locvars[fs->nlocvars].varname = varname; - luaC_objbarrier(ls->L, f, varname); - return fs->nlocvars++; -} - - -static void new_localvar (LexState *ls, TString *name) { - FuncState *fs = ls->fs; - Dyndata *dyd = ls->dyd; - int reg = registerlocalvar(ls, name); - checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal, - MAXVARS, "local variables"); - luaM_growvector(ls->L, dyd->actvar.arr, dyd->actvar.n + 1, - dyd->actvar.size, Vardesc, MAX_INT, "local variables"); - dyd->actvar.arr[dyd->actvar.n++].idx = cast(short, reg); -} - - -static void new_localvarliteral_ (LexState *ls, const char *name, size_t sz) { - new_localvar(ls, luaX_newstring(ls, name, sz)); -} - -#define new_localvarliteral(ls,v) \ - new_localvarliteral_(ls, "" v, (sizeof(v)/sizeof(char))-1) - - -static LocVar *getlocvar (FuncState *fs, int i) { - int idx = fs->ls->dyd->actvar.arr[fs->firstlocal + i].idx; - lua_assert(idx < fs->nlocvars); - return &fs->f->locvars[idx]; -} - - -static void adjustlocalvars (LexState *ls, int nvars) { - FuncState *fs = ls->fs; - fs->nactvar = cast_byte(fs->nactvar + nvars); - for (; nvars; nvars--) { - getlocvar(fs, fs->nactvar - nvars)->startpc = fs->pc; - } -} - - -static void removevars (FuncState *fs, int tolevel) { - fs->ls->dyd->actvar.n -= (fs->nactvar - tolevel); - while (fs->nactvar > tolevel) - getlocvar(fs, --fs->nactvar)->endpc = fs->pc; -} - - -static int searchupvalue (FuncState *fs, TString *name) { - int i; - Upvaldesc *up = fs->f->upvalues; - for (i = 0; i < fs->nups; i++) { - if (eqstr(up[i].name, name)) return i; - } - return -1; /* not found */ -} - - -static int newupvalue (FuncState *fs, TString *name, expdesc *v) { - Proto *f = fs->f; - int oldsize = f->sizeupvalues; - checklimit(fs, fs->nups + 1, MAXUPVAL, "upvalues"); - luaM_growvector(fs->ls->L, f->upvalues, fs->nups, f->sizeupvalues, - Upvaldesc, MAXUPVAL, "upvalues"); - while (oldsize < f->sizeupvalues) - f->upvalues[oldsize++].name = NULL; - f->upvalues[fs->nups].instack = (v->k == VLOCAL); - f->upvalues[fs->nups].idx = cast_byte(v->u.info); - f->upvalues[fs->nups].name = name; - luaC_objbarrier(fs->ls->L, f, name); - return fs->nups++; -} - - -static int searchvar (FuncState *fs, TString *n) { - int i; - for (i = cast_int(fs->nactvar) - 1; i >= 0; i--) { - if (eqstr(n, getlocvar(fs, i)->varname)) - return i; - } - return -1; /* not found */ -} - - -/* - Mark block where variable at given level was defined - (to emit close instructions later). -*/ -static void markupval (FuncState *fs, int level) { - BlockCnt *bl = fs->bl; - while (bl->nactvar > level) - bl = bl->previous; - bl->upval = 1; -} - - -/* - Find variable with given name 'n'. If it is an upvalue, add this - upvalue into all intermediate functions. -*/ -static void singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) { - if (fs == NULL) /* no more levels? */ - init_exp(var, VVOID, 0); /* default is global */ - else { - int v = searchvar(fs, n); /* look up locals at current level */ - if (v >= 0) { /* found? */ - init_exp(var, VLOCAL, v); /* variable is local */ - if (!base) - markupval(fs, v); /* local will be used as an upval */ - } - else { /* not found as local at current level; try upvalues */ - int idx = searchupvalue(fs, n); /* try existing upvalues */ - if (idx < 0) { /* not found? */ - singlevaraux(fs->prev, n, var, 0); /* try upper levels */ - if (var->k == VVOID) /* not found? */ - return; /* it is a global */ - /* else was LOCAL or UPVAL */ - idx = newupvalue(fs, n, var); /* will be a new upvalue */ - } - init_exp(var, VUPVAL, idx); /* new or old upvalue */ - } - } -} - - -static void singlevar (LexState *ls, expdesc *var) { - TString *varname = str_checkname(ls); - FuncState *fs = ls->fs; - singlevaraux(fs, varname, var, 1); - if (var->k == VVOID) { /* global name? */ - expdesc key; - singlevaraux(fs, ls->envn, var, 1); /* get environment variable */ - lua_assert(var->k != VVOID); /* this one must exist */ - codestring(ls, &key, varname); /* key is variable name */ - luaK_indexed(fs, var, &key); /* env[varname] */ - } -} - - -static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) { - FuncState *fs = ls->fs; - int extra = nvars - nexps; - if (hasmultret(e->k)) { - extra++; /* includes call itself */ - if (extra < 0) extra = 0; - luaK_setreturns(fs, e, extra); /* last exp. provides the difference */ - if (extra > 1) luaK_reserveregs(fs, extra-1); - } - else { - if (e->k != VVOID) luaK_exp2nextreg(fs, e); /* close last expression */ - if (extra > 0) { - int reg = fs->freereg; - luaK_reserveregs(fs, extra); - luaK_nil(fs, reg, extra); - } - } - if (nexps > nvars) - ls->fs->freereg -= nexps - nvars; /* remove extra values */ -} - - -static void enterlevel (LexState *ls) { - lua_State *L = ls->L; - ++L->nCcalls; - checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "C levels"); -} - - -#define leavelevel(ls) ((ls)->L->nCcalls--) - - -static void closegoto (LexState *ls, int g, Labeldesc *label) { - int i; - FuncState *fs = ls->fs; - Labellist *gl = &ls->dyd->gt; - Labeldesc *gt = &gl->arr[g]; - lua_assert(eqstr(gt->name, label->name)); - if (gt->nactvar < label->nactvar) { - TString *vname = getlocvar(fs, gt->nactvar)->varname; - const char *msg = luaO_pushfstring(ls->L, - " at line %d jumps into the scope of local '%s'", - getstr(gt->name), gt->line, getstr(vname)); - semerror(ls, msg); - } - luaK_patchlist(fs, gt->pc, label->pc); - /* remove goto from pending list */ - for (i = g; i < gl->n - 1; i++) - gl->arr[i] = gl->arr[i + 1]; - gl->n--; -} - - -/* -** try to close a goto with existing labels; this solves backward jumps -*/ -static int findlabel (LexState *ls, int g) { - int i; - BlockCnt *bl = ls->fs->bl; - Dyndata *dyd = ls->dyd; - Labeldesc *gt = &dyd->gt.arr[g]; - /* check labels in current block for a match */ - for (i = bl->firstlabel; i < dyd->label.n; i++) { - Labeldesc *lb = &dyd->label.arr[i]; - if (eqstr(lb->name, gt->name)) { /* correct label? */ - if (gt->nactvar > lb->nactvar && - (bl->upval || dyd->label.n > bl->firstlabel)) - luaK_patchclose(ls->fs, gt->pc, lb->nactvar); - closegoto(ls, g, lb); /* close it */ - return 1; - } - } - return 0; /* label not found; cannot close goto */ -} - - -static int newlabelentry (LexState *ls, Labellist *l, TString *name, - int line, int pc) { - int n = l->n; - luaM_growvector(ls->L, l->arr, n, l->size, - Labeldesc, SHRT_MAX, "labels/gotos"); - l->arr[n].name = name; - l->arr[n].line = line; - l->arr[n].nactvar = ls->fs->nactvar; - l->arr[n].pc = pc; - l->n = n + 1; - return n; -} - - -/* -** check whether new label 'lb' matches any pending gotos in current -** block; solves forward jumps -*/ -static void findgotos (LexState *ls, Labeldesc *lb) { - Labellist *gl = &ls->dyd->gt; - int i = ls->fs->bl->firstgoto; - while (i < gl->n) { - if (eqstr(gl->arr[i].name, lb->name)) - closegoto(ls, i, lb); - else - i++; - } -} - - -/* -** export pending gotos to outer level, to check them against -** outer labels; if the block being exited has upvalues, and -** the goto exits the scope of any variable (which can be the -** upvalue), close those variables being exited. -*/ -static void movegotosout (FuncState *fs, BlockCnt *bl) { - int i = bl->firstgoto; - Labellist *gl = &fs->ls->dyd->gt; - /* correct pending gotos to current block and try to close it - with visible labels */ - while (i < gl->n) { - Labeldesc *gt = &gl->arr[i]; - if (gt->nactvar > bl->nactvar) { - if (bl->upval) - luaK_patchclose(fs, gt->pc, bl->nactvar); - gt->nactvar = bl->nactvar; - } - if (!findlabel(fs->ls, i)) - i++; /* move to next one */ - } -} - - -static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) { - bl->isloop = isloop; - bl->nactvar = fs->nactvar; - bl->firstlabel = fs->ls->dyd->label.n; - bl->firstgoto = fs->ls->dyd->gt.n; - bl->upval = 0; - bl->previous = fs->bl; - fs->bl = bl; - lua_assert(fs->freereg == fs->nactvar); -} - - -/* -** create a label named 'break' to resolve break statements -*/ -static void breaklabel (LexState *ls) { - TString *n = luaS_new(ls->L, "break"); - int l = newlabelentry(ls, &ls->dyd->label, n, 0, ls->fs->pc); - findgotos(ls, &ls->dyd->label.arr[l]); -} - -/* -** generates an error for an undefined 'goto'; choose appropriate -** message when label name is a reserved word (which can only be 'break') -*/ -static l_noret undefgoto (LexState *ls, Labeldesc *gt) { - const char *msg = isreserved(gt->name) - ? "<%s> at line %d not inside a loop" - : "no visible label '%s' for at line %d"; - msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); - semerror(ls, msg); -} - - -static void leaveblock (FuncState *fs) { - BlockCnt *bl = fs->bl; - LexState *ls = fs->ls; - if (bl->previous && bl->upval) { - /* create a 'jump to here' to close upvalues */ - int j = luaK_jump(fs); - luaK_patchclose(fs, j, bl->nactvar); - luaK_patchtohere(fs, j); - } - if (bl->isloop) - breaklabel(ls); /* close pending breaks */ - fs->bl = bl->previous; - removevars(fs, bl->nactvar); - lua_assert(bl->nactvar == fs->nactvar); - fs->freereg = fs->nactvar; /* free registers */ - ls->dyd->label.n = bl->firstlabel; /* remove local labels */ - if (bl->previous) /* inner block? */ - movegotosout(fs, bl); /* update pending gotos to outer block */ - else if (bl->firstgoto < ls->dyd->gt.n) /* pending gotos in outer block? */ - undefgoto(ls, &ls->dyd->gt.arr[bl->firstgoto]); /* error */ -} - - -/* -** adds a new prototype into list of prototypes -*/ -static Proto *addprototype (LexState *ls) { - Proto *clp; - lua_State *L = ls->L; - FuncState *fs = ls->fs; - Proto *f = fs->f; /* prototype of current function */ - if (fs->np >= f->sizep) { - int oldsize = f->sizep; - luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions"); - while (oldsize < f->sizep) - f->p[oldsize++] = NULL; - } - f->p[fs->np++] = clp = luaF_newproto(L); - luaC_objbarrier(L, f, clp); - return clp; -} - - -/* -** codes instruction to create new closure in parent function. -** The OP_CLOSURE instruction must use the last available register, -** so that, if it invokes the GC, the GC knows which registers -** are in use at that time. -*/ -static void codeclosure (LexState *ls, expdesc *v) { - FuncState *fs = ls->fs->prev; - init_exp(v, VRELOCABLE, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np - 1)); - luaK_exp2nextreg(fs, v); /* fix it at the last register */ -} - - -static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) { - Proto *f; - fs->prev = ls->fs; /* linked list of funcstates */ - fs->ls = ls; - ls->fs = fs; - fs->pc = 0; - fs->lasttarget = 0; - fs->jpc = NO_JUMP; - fs->freereg = 0; - fs->nk = 0; - fs->np = 0; - fs->nups = 0; - fs->nlocvars = 0; - fs->nactvar = 0; - fs->firstlocal = ls->dyd->actvar.n; - fs->bl = NULL; - f = fs->f; - f->source = ls->source; - f->maxstacksize = 2; /* registers 0/1 are always valid */ - enterblock(fs, bl, 0); -} - - -static void close_func (LexState *ls) { - lua_State *L = ls->L; - FuncState *fs = ls->fs; - Proto *f = fs->f; - luaK_ret(fs, 0, 0); /* final return */ - leaveblock(fs); - luaM_reallocvector(L, f->code, f->sizecode, fs->pc, Instruction); - f->sizecode = fs->pc; - luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int); - f->sizelineinfo = fs->pc; - luaM_reallocvector(L, f->k, f->sizek, fs->nk, TValue); - f->sizek = fs->nk; - luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *); - f->sizep = fs->np; - luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar); - f->sizelocvars = fs->nlocvars; - luaM_reallocvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc); - f->sizeupvalues = fs->nups; - lua_assert(fs->bl == NULL); - ls->fs = fs->prev; - luaC_checkGC(L); -} - - - -/*============================================================*/ -/* GRAMMAR RULES */ -/*============================================================*/ - - -/* -** check whether current token is in the follow set of a block. -** 'until' closes syntactical blocks, but do not close scope, -** so it is handled in separate. -*/ -static int block_follow (LexState *ls, int withuntil) { - switch (ls->t.token) { - case TK_ELSE: case TK_ELSEIF: - case TK_END: case TK_EOS: - return 1; - case TK_UNTIL: return withuntil; - default: return 0; - } -} - - -static void statlist (LexState *ls) { - /* statlist -> { stat [';'] } */ - while (!block_follow(ls, 1)) { - if (ls->t.token == TK_RETURN) { - statement(ls); - return; /* 'return' must be last statement */ - } - statement(ls); - } -} - - -static void fieldsel (LexState *ls, expdesc *v) { - /* fieldsel -> ['.' | ':'] NAME */ - FuncState *fs = ls->fs; - expdesc key; - luaK_exp2anyregup(fs, v); - luaX_next(ls); /* skip the dot or colon */ - checkname(ls, &key); - luaK_indexed(fs, v, &key); -} - - -static void yindex (LexState *ls, expdesc *v) { - /* index -> '[' expr ']' */ - luaX_next(ls); /* skip the '[' */ - expr(ls, v); - luaK_exp2val(ls->fs, v); - checknext(ls, ']'); -} - - -/* -** {====================================================================== -** Rules for Constructors -** ======================================================================= -*/ - - -struct ConsControl { - expdesc v; /* last list item read */ - expdesc *t; /* table descriptor */ - int nh; /* total number of 'record' elements */ - int na; /* total number of array elements */ - int tostore; /* number of array elements pending to be stored */ -}; - - -static void recfield (LexState *ls, struct ConsControl *cc) { - /* recfield -> (NAME | '['exp1']') = exp1 */ - FuncState *fs = ls->fs; - int reg = ls->fs->freereg; - expdesc key, val; - int rkkey; - if (ls->t.token == TK_NAME) { - checklimit(fs, cc->nh, MAX_INT, "items in a constructor"); - checkname(ls, &key); - } - else /* ls->t.token == '[' */ - yindex(ls, &key); - cc->nh++; - checknext(ls, '='); - rkkey = luaK_exp2RK(fs, &key); - expr(ls, &val); - luaK_codeABC(fs, OP_SETTABLE, cc->t->u.info, rkkey, luaK_exp2RK(fs, &val)); - fs->freereg = reg; /* free registers */ -} - - -static void closelistfield (FuncState *fs, struct ConsControl *cc) { - if (cc->v.k == VVOID) return; /* there is no list item */ - luaK_exp2nextreg(fs, &cc->v); - cc->v.k = VVOID; - if (cc->tostore == LFIELDS_PER_FLUSH) { - luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore); /* flush */ - cc->tostore = 0; /* no more items pending */ - } -} - - -static void lastlistfield (FuncState *fs, struct ConsControl *cc) { - if (cc->tostore == 0) return; - if (hasmultret(cc->v.k)) { - luaK_setmultret(fs, &cc->v); - luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET); - cc->na--; /* do not count last expression (unknown number of elements) */ - } - else { - if (cc->v.k != VVOID) - luaK_exp2nextreg(fs, &cc->v); - luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore); - } -} - - -static void listfield (LexState *ls, struct ConsControl *cc) { - /* listfield -> exp */ - expr(ls, &cc->v); - checklimit(ls->fs, cc->na, MAX_INT, "items in a constructor"); - cc->na++; - cc->tostore++; -} - - -static void field (LexState *ls, struct ConsControl *cc) { - /* field -> listfield | recfield */ - switch(ls->t.token) { - case TK_NAME: { /* may be 'listfield' or 'recfield' */ - if (luaX_lookahead(ls) != '=') /* expression? */ - listfield(ls, cc); - else - recfield(ls, cc); - break; - } - case '[': { - recfield(ls, cc); - break; - } - default: { - listfield(ls, cc); - break; - } - } -} - - -static void constructor (LexState *ls, expdesc *t) { - /* constructor -> '{' [ field { sep field } [sep] ] '}' - sep -> ',' | ';' */ - FuncState *fs = ls->fs; - int line = ls->linenumber; - int pc = luaK_codeABC(fs, OP_NEWTABLE, 0, 0, 0); - struct ConsControl cc; - cc.na = cc.nh = cc.tostore = 0; - cc.t = t; - init_exp(t, VRELOCABLE, pc); - init_exp(&cc.v, VVOID, 0); /* no value (yet) */ - luaK_exp2nextreg(ls->fs, t); /* fix it at stack top */ - checknext(ls, '{'); - do { - lua_assert(cc.v.k == VVOID || cc.tostore > 0); - if (ls->t.token == '}') break; - closelistfield(fs, &cc); - field(ls, &cc); - } while (testnext(ls, ',') || testnext(ls, ';')); - check_match(ls, '}', '{', line); - lastlistfield(fs, &cc); - SETARG_B(fs->f->code[pc], luaO_int2fb(cc.na)); /* set initial array size */ - SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh)); /* set initial table size */ -} - -/* }====================================================================== */ - - - -static void parlist (LexState *ls) { - /* parlist -> [ param { ',' param } ] */ - FuncState *fs = ls->fs; - Proto *f = fs->f; - int nparams = 0; - f->is_vararg = 0; - if (ls->t.token != ')') { /* is 'parlist' not empty? */ - do { - switch (ls->t.token) { - case TK_NAME: { /* param -> NAME */ - new_localvar(ls, str_checkname(ls)); - nparams++; - break; - } - case TK_DOTS: { /* param -> '...' */ - luaX_next(ls); - f->is_vararg = 1; /* declared vararg */ - break; - } - default: luaX_syntaxerror(ls, " or '...' expected"); - } - } while (!f->is_vararg && testnext(ls, ',')); - } - adjustlocalvars(ls, nparams); - f->numparams = cast_byte(fs->nactvar); - luaK_reserveregs(fs, fs->nactvar); /* reserve register for parameters */ -} - - -static void body (LexState *ls, expdesc *e, int ismethod, int line) { - /* body -> '(' parlist ')' block END */ - FuncState new_fs; - BlockCnt bl; - new_fs.f = addprototype(ls); - new_fs.f->linedefined = line; - open_func(ls, &new_fs, &bl); - checknext(ls, '('); - if (ismethod) { - new_localvarliteral(ls, "self"); /* create 'self' parameter */ - adjustlocalvars(ls, 1); - } - parlist(ls); - checknext(ls, ')'); - statlist(ls); - new_fs.f->lastlinedefined = ls->linenumber; - check_match(ls, TK_END, TK_FUNCTION, line); - codeclosure(ls, e); - close_func(ls); -} - - -static int explist (LexState *ls, expdesc *v) { - /* explist -> expr { ',' expr } */ - int n = 1; /* at least one expression */ - expr(ls, v); - while (testnext(ls, ',')) { - luaK_exp2nextreg(ls->fs, v); - expr(ls, v); - n++; - } - return n; -} - - -static void funcargs (LexState *ls, expdesc *f, int line) { - FuncState *fs = ls->fs; - expdesc args; - int base, nparams; - switch (ls->t.token) { - case '(': { /* funcargs -> '(' [ explist ] ')' */ - luaX_next(ls); - if (ls->t.token == ')') /* arg list is empty? */ - args.k = VVOID; - else { - explist(ls, &args); - luaK_setmultret(fs, &args); - } - check_match(ls, ')', '(', line); - break; - } - case '{': { /* funcargs -> constructor */ - constructor(ls, &args); - break; - } - case TK_STRING: { /* funcargs -> STRING */ - codestring(ls, &args, ls->t.seminfo.ts); - luaX_next(ls); /* must use 'seminfo' before 'next' */ - break; - } - default: { - luaX_syntaxerror(ls, "function arguments expected"); - } - } - lua_assert(f->k == VNONRELOC); - base = f->u.info; /* base register for call */ - if (hasmultret(args.k)) - nparams = LUA_MULTRET; /* open call */ - else { - if (args.k != VVOID) - luaK_exp2nextreg(fs, &args); /* close last argument */ - nparams = fs->freereg - (base+1); - } - init_exp(f, VCALL, luaK_codeABC(fs, OP_CALL, base, nparams+1, 2)); - luaK_fixline(fs, line); - fs->freereg = base+1; /* call remove function and arguments and leaves - (unless changed) one result */ -} - - - - -/* -** {====================================================================== -** Expression parsing -** ======================================================================= -*/ - - -static void primaryexp (LexState *ls, expdesc *v) { - /* primaryexp -> NAME | '(' expr ')' */ - switch (ls->t.token) { - case '(': { - int line = ls->linenumber; - luaX_next(ls); - expr(ls, v); - check_match(ls, ')', '(', line); - luaK_dischargevars(ls->fs, v); - return; - } - case TK_NAME: { - singlevar(ls, v); - return; - } - default: { - luaX_syntaxerror(ls, "unexpected symbol"); - } - } -} - - -static void suffixedexp (LexState *ls, expdesc *v) { - /* suffixedexp -> - primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */ - FuncState *fs = ls->fs; - int line = ls->linenumber; - primaryexp(ls, v); - for (;;) { - switch (ls->t.token) { - case '.': { /* fieldsel */ - fieldsel(ls, v); - break; - } - case '[': { /* '[' exp1 ']' */ - expdesc key; - luaK_exp2anyregup(fs, v); - yindex(ls, &key); - luaK_indexed(fs, v, &key); - break; - } - case ':': { /* ':' NAME funcargs */ - expdesc key; - luaX_next(ls); - checkname(ls, &key); - luaK_self(fs, v, &key); - funcargs(ls, v, line); - break; - } - case '(': case TK_STRING: case '{': { /* funcargs */ - luaK_exp2nextreg(fs, v); - funcargs(ls, v, line); - break; - } - default: return; - } - } -} - - -static void simpleexp (LexState *ls, expdesc *v) { - /* simpleexp -> FLT | INT | STRING | NIL | TRUE | FALSE | ... | - constructor | FUNCTION body | suffixedexp */ - switch (ls->t.token) { - case TK_FLT: { - init_exp(v, VKFLT, 0); - v->u.nval = ls->t.seminfo.r; - break; - } - case TK_INT: { - init_exp(v, VKINT, 0); - v->u.ival = ls->t.seminfo.i; - break; - } - case TK_STRING: { - codestring(ls, v, ls->t.seminfo.ts); - break; - } - case TK_NIL: { - init_exp(v, VNIL, 0); - break; - } - case TK_TRUE: { - init_exp(v, VTRUE, 0); - break; - } - case TK_FALSE: { - init_exp(v, VFALSE, 0); - break; - } - case TK_DOTS: { /* vararg */ - FuncState *fs = ls->fs; - check_condition(ls, fs->f->is_vararg, - "cannot use '...' outside a vararg function"); - init_exp(v, VVARARG, luaK_codeABC(fs, OP_VARARG, 0, 1, 0)); - break; - } - case '{': { /* constructor */ - constructor(ls, v); - return; - } - case TK_FUNCTION: { - luaX_next(ls); - body(ls, v, 0, ls->linenumber); - return; - } - default: { - suffixedexp(ls, v); - return; - } - } - luaX_next(ls); -} - - -static UnOpr getunopr (int op) { - switch (op) { - case TK_NOT: return OPR_NOT; - case '-': return OPR_MINUS; - case '~': return OPR_BNOT; - case '#': return OPR_LEN; - default: return OPR_NOUNOPR; - } -} - - -static BinOpr getbinopr (int op) { - switch (op) { - case '+': return OPR_ADD; - case '-': return OPR_SUB; - case '*': return OPR_MUL; - case '%': return OPR_MOD; - case '^': return OPR_POW; - case '/': return OPR_DIV; - case TK_IDIV: return OPR_IDIV; - case '&': return OPR_BAND; - case '|': return OPR_BOR; - case '~': return OPR_BXOR; - case TK_SHL: return OPR_SHL; - case TK_SHR: return OPR_SHR; - case TK_CONCAT: return OPR_CONCAT; - case TK_NE: return OPR_NE; - case TK_EQ: return OPR_EQ; - case '<': return OPR_LT; - case TK_LE: return OPR_LE; - case '>': return OPR_GT; - case TK_GE: return OPR_GE; - case TK_AND: return OPR_AND; - case TK_OR: return OPR_OR; - default: return OPR_NOBINOPR; - } -} - - -static const struct { - lu_byte left; /* left priority for each binary operator */ - lu_byte right; /* right priority */ -} priority[] = { /* ORDER OPR */ - {10, 10}, {10, 10}, /* '+' '-' */ - {11, 11}, {11, 11}, /* '*' '%' */ - {14, 13}, /* '^' (right associative) */ - {11, 11}, {11, 11}, /* '/' '//' */ - {6, 6}, {4, 4}, {5, 5}, /* '&' '|' '~' */ - {7, 7}, {7, 7}, /* '<<' '>>' */ - {9, 8}, /* '..' (right associative) */ - {3, 3}, {3, 3}, {3, 3}, /* ==, <, <= */ - {3, 3}, {3, 3}, {3, 3}, /* ~=, >, >= */ - {2, 2}, {1, 1} /* and, or */ -}; - -#define UNARY_PRIORITY 12 /* priority for unary operators */ - - -/* -** subexpr -> (simpleexp | unop subexpr) { binop subexpr } -** where 'binop' is any binary operator with a priority higher than 'limit' -*/ -static BinOpr subexpr (LexState *ls, expdesc *v, int limit) { - BinOpr op; - UnOpr uop; - enterlevel(ls); - uop = getunopr(ls->t.token); - if (uop != OPR_NOUNOPR) { - int line = ls->linenumber; - luaX_next(ls); - subexpr(ls, v, UNARY_PRIORITY); - luaK_prefix(ls->fs, uop, v, line); - } - else simpleexp(ls, v); - /* expand while operators have priorities higher than 'limit' */ - op = getbinopr(ls->t.token); - while (op != OPR_NOBINOPR && priority[op].left > limit) { - expdesc v2; - BinOpr nextop; - int line = ls->linenumber; - luaX_next(ls); - luaK_infix(ls->fs, op, v); - /* read sub-expression with higher priority */ - nextop = subexpr(ls, &v2, priority[op].right); - luaK_posfix(ls->fs, op, v, &v2, line); - op = nextop; - } - leavelevel(ls); - return op; /* return first untreated operator */ -} - - -static void expr (LexState *ls, expdesc *v) { - subexpr(ls, v, 0); -} - -/* }==================================================================== */ - - - -/* -** {====================================================================== -** Rules for Statements -** ======================================================================= -*/ - - -static void block (LexState *ls) { - /* block -> statlist */ - FuncState *fs = ls->fs; - BlockCnt bl; - enterblock(fs, &bl, 0); - statlist(ls); - leaveblock(fs); -} - - -/* -** structure to chain all variables in the left-hand side of an -** assignment -*/ -struct LHS_assign { - struct LHS_assign *prev; - expdesc v; /* variable (global, local, upvalue, or indexed) */ -}; - - -/* -** check whether, in an assignment to an upvalue/local variable, the -** upvalue/local variable is begin used in a previous assignment to a -** table. If so, save original upvalue/local value in a safe place and -** use this safe copy in the previous assignment. -*/ -static void check_conflict (LexState *ls, struct LHS_assign *lh, expdesc *v) { - FuncState *fs = ls->fs; - int extra = fs->freereg; /* eventual position to save local variable */ - int conflict = 0; - for (; lh; lh = lh->prev) { /* check all previous assignments */ - if (lh->v.k == VINDEXED) { /* assigning to a table? */ - /* table is the upvalue/local being assigned now? */ - if (lh->v.u.ind.vt == v->k && lh->v.u.ind.t == v->u.info) { - conflict = 1; - lh->v.u.ind.vt = VLOCAL; - lh->v.u.ind.t = extra; /* previous assignment will use safe copy */ - } - /* index is the local being assigned? (index cannot be upvalue) */ - if (v->k == VLOCAL && lh->v.u.ind.idx == v->u.info) { - conflict = 1; - lh->v.u.ind.idx = extra; /* previous assignment will use safe copy */ - } - } - } - if (conflict) { - /* copy upvalue/local value to a temporary (in position 'extra') */ - OpCode op = (v->k == VLOCAL) ? OP_MOVE : OP_GETUPVAL; - luaK_codeABC(fs, op, extra, v->u.info, 0); - luaK_reserveregs(fs, 1); - } -} - - -static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) { - expdesc e; - check_condition(ls, vkisvar(lh->v.k), "syntax error"); - if (testnext(ls, ',')) { /* assignment -> ',' suffixedexp assignment */ - struct LHS_assign nv; - nv.prev = lh; - suffixedexp(ls, &nv.v); - if (nv.v.k != VINDEXED) - check_conflict(ls, lh, &nv.v); - checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS, - "C levels"); - assignment(ls, &nv, nvars+1); - } - else { /* assignment -> '=' explist */ - int nexps; - checknext(ls, '='); - nexps = explist(ls, &e); - if (nexps != nvars) - adjust_assign(ls, nvars, nexps, &e); - else { - luaK_setoneret(ls->fs, &e); /* close last expression */ - luaK_storevar(ls->fs, &lh->v, &e); - return; /* avoid default */ - } - } - init_exp(&e, VNONRELOC, ls->fs->freereg-1); /* default assignment */ - luaK_storevar(ls->fs, &lh->v, &e); -} - - -static int cond (LexState *ls) { - /* cond -> exp */ - expdesc v; - expr(ls, &v); /* read condition */ - if (v.k == VNIL) v.k = VFALSE; /* 'falses' are all equal here */ - luaK_goiftrue(ls->fs, &v); - return v.f; -} - - -static void gotostat (LexState *ls, int pc) { - int line = ls->linenumber; - TString *label; - int g; - if (testnext(ls, TK_GOTO)) - label = str_checkname(ls); - else { - luaX_next(ls); /* skip break */ - label = luaS_new(ls->L, "break"); - } - g = newlabelentry(ls, &ls->dyd->gt, label, line, pc); - findlabel(ls, g); /* close it if label already defined */ -} - - -/* check for repeated labels on the same block */ -static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { - int i; - for (i = fs->bl->firstlabel; i < ll->n; i++) { - if (eqstr(label, ll->arr[i].name)) { - const char *msg = luaO_pushfstring(fs->ls->L, - "label '%s' already defined on line %d", - getstr(label), ll->arr[i].line); - semerror(fs->ls, msg); - } - } -} - - -/* skip no-op statements */ -static void skipnoopstat (LexState *ls) { - while (ls->t.token == ';' || ls->t.token == TK_DBCOLON) - statement(ls); -} - - -static void labelstat (LexState *ls, TString *label, int line) { - /* label -> '::' NAME '::' */ - FuncState *fs = ls->fs; - Labellist *ll = &ls->dyd->label; - int l; /* index of new label being created */ - checkrepeated(fs, ll, label); /* check for repeated labels */ - checknext(ls, TK_DBCOLON); /* skip double colon */ - /* create new entry for this label */ - l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs)); - skipnoopstat(ls); /* skip other no-op statements */ - if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ - /* assume that locals are already out of scope */ - ll->arr[l].nactvar = fs->bl->nactvar; - } - findgotos(ls, &ll->arr[l]); -} - - -static void whilestat (LexState *ls, int line) { - /* whilestat -> WHILE cond DO block END */ - FuncState *fs = ls->fs; - int whileinit; - int condexit; - BlockCnt bl; - luaX_next(ls); /* skip WHILE */ - whileinit = luaK_getlabel(fs); - condexit = cond(ls); - enterblock(fs, &bl, 1); - checknext(ls, TK_DO); - block(ls); - luaK_jumpto(fs, whileinit); - check_match(ls, TK_END, TK_WHILE, line); - leaveblock(fs); - luaK_patchtohere(fs, condexit); /* false conditions finish the loop */ -} - - -static void repeatstat (LexState *ls, int line) { - /* repeatstat -> REPEAT block UNTIL cond */ - int condexit; - FuncState *fs = ls->fs; - int repeat_init = luaK_getlabel(fs); - BlockCnt bl1, bl2; - enterblock(fs, &bl1, 1); /* loop block */ - enterblock(fs, &bl2, 0); /* scope block */ - luaX_next(ls); /* skip REPEAT */ - statlist(ls); - check_match(ls, TK_UNTIL, TK_REPEAT, line); - condexit = cond(ls); /* read condition (inside scope block) */ - if (bl2.upval) /* upvalues? */ - luaK_patchclose(fs, condexit, bl2.nactvar); - leaveblock(fs); /* finish scope */ - luaK_patchlist(fs, condexit, repeat_init); /* close the loop */ - leaveblock(fs); /* finish loop */ -} - - -static int exp1 (LexState *ls) { - expdesc e; - int reg; - expr(ls, &e); - luaK_exp2nextreg(ls->fs, &e); - lua_assert(e.k == VNONRELOC); - reg = e.u.info; - return reg; -} - - -static void forbody (LexState *ls, int base, int line, int nvars, int isnum) { - /* forbody -> DO block */ - BlockCnt bl; - FuncState *fs = ls->fs; - int prep, endfor; - adjustlocalvars(ls, 3); /* control variables */ - checknext(ls, TK_DO); - prep = isnum ? luaK_codeAsBx(fs, OP_FORPREP, base, NO_JUMP) : luaK_jump(fs); - enterblock(fs, &bl, 0); /* scope for declared variables */ - adjustlocalvars(ls, nvars); - luaK_reserveregs(fs, nvars); - block(ls); - leaveblock(fs); /* end of scope for declared variables */ - luaK_patchtohere(fs, prep); - if (isnum) /* numeric for? */ - endfor = luaK_codeAsBx(fs, OP_FORLOOP, base, NO_JUMP); - else { /* generic for */ - luaK_codeABC(fs, OP_TFORCALL, base, 0, nvars); - luaK_fixline(fs, line); - endfor = luaK_codeAsBx(fs, OP_TFORLOOP, base + 2, NO_JUMP); - } - luaK_patchlist(fs, endfor, prep + 1); - luaK_fixline(fs, line); -} - - -static void fornum (LexState *ls, TString *varname, int line) { - /* fornum -> NAME = exp1,exp1[,exp1] forbody */ - FuncState *fs = ls->fs; - int base = fs->freereg; - new_localvarliteral(ls, "(for index)"); - new_localvarliteral(ls, "(for limit)"); - new_localvarliteral(ls, "(for step)"); - new_localvar(ls, varname); - checknext(ls, '='); - exp1(ls); /* initial value */ - checknext(ls, ','); - exp1(ls); /* limit */ - if (testnext(ls, ',')) - exp1(ls); /* optional step */ - else { /* default step = 1 */ - luaK_codek(fs, fs->freereg, luaK_intK(fs, 1)); - luaK_reserveregs(fs, 1); - } - forbody(ls, base, line, 1, 1); -} - - -static void forlist (LexState *ls, TString *indexname) { - /* forlist -> NAME {,NAME} IN explist forbody */ - FuncState *fs = ls->fs; - expdesc e; - int nvars = 4; /* gen, state, control, plus at least one declared var */ - int line; - int base = fs->freereg; - /* create control variables */ - new_localvarliteral(ls, "(for generator)"); - new_localvarliteral(ls, "(for state)"); - new_localvarliteral(ls, "(for control)"); - /* create declared variables */ - new_localvar(ls, indexname); - while (testnext(ls, ',')) { - new_localvar(ls, str_checkname(ls)); - nvars++; - } - checknext(ls, TK_IN); - line = ls->linenumber; - adjust_assign(ls, 3, explist(ls, &e), &e); - luaK_checkstack(fs, 3); /* extra space to call generator */ - forbody(ls, base, line, nvars - 3, 0); -} - - -static void forstat (LexState *ls, int line) { - /* forstat -> FOR (fornum | forlist) END */ - FuncState *fs = ls->fs; - TString *varname; - BlockCnt bl; - enterblock(fs, &bl, 1); /* scope for loop and control variables */ - luaX_next(ls); /* skip 'for' */ - varname = str_checkname(ls); /* first variable name */ - switch (ls->t.token) { - case '=': fornum(ls, varname, line); break; - case ',': case TK_IN: forlist(ls, varname); break; - default: luaX_syntaxerror(ls, "'=' or 'in' expected"); - } - check_match(ls, TK_END, TK_FOR, line); - leaveblock(fs); /* loop scope ('break' jumps to this point) */ -} - - -static void test_then_block (LexState *ls, int *escapelist) { - /* test_then_block -> [IF | ELSEIF] cond THEN block */ - BlockCnt bl; - FuncState *fs = ls->fs; - expdesc v; - int jf; /* instruction to skip 'then' code (if condition is false) */ - luaX_next(ls); /* skip IF or ELSEIF */ - expr(ls, &v); /* read condition */ - checknext(ls, TK_THEN); - if (ls->t.token == TK_GOTO || ls->t.token == TK_BREAK) { - luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */ - enterblock(fs, &bl, 0); /* must enter block before 'goto' */ - gotostat(ls, v.t); /* handle goto/break */ - while (testnext(ls, ';')) {} /* skip colons */ - if (block_follow(ls, 0)) { /* 'goto' is the entire block? */ - leaveblock(fs); - return; /* and that is it */ - } - else /* must skip over 'then' part if condition is false */ - jf = luaK_jump(fs); - } - else { /* regular case (not goto/break) */ - luaK_goiftrue(ls->fs, &v); /* skip over block if condition is false */ - enterblock(fs, &bl, 0); - jf = v.f; - } - statlist(ls); /* 'then' part */ - leaveblock(fs); - if (ls->t.token == TK_ELSE || - ls->t.token == TK_ELSEIF) /* followed by 'else'/'elseif'? */ - luaK_concat(fs, escapelist, luaK_jump(fs)); /* must jump over it */ - luaK_patchtohere(fs, jf); -} - - -static void ifstat (LexState *ls, int line) { - /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */ - FuncState *fs = ls->fs; - int escapelist = NO_JUMP; /* exit list for finished parts */ - test_then_block(ls, &escapelist); /* IF cond THEN block */ - while (ls->t.token == TK_ELSEIF) - test_then_block(ls, &escapelist); /* ELSEIF cond THEN block */ - if (testnext(ls, TK_ELSE)) - block(ls); /* 'else' part */ - check_match(ls, TK_END, TK_IF, line); - luaK_patchtohere(fs, escapelist); /* patch escape list to 'if' end */ -} - - -static void localfunc (LexState *ls) { - expdesc b; - FuncState *fs = ls->fs; - new_localvar(ls, str_checkname(ls)); /* new local variable */ - adjustlocalvars(ls, 1); /* enter its scope */ - body(ls, &b, 0, ls->linenumber); /* function created in next register */ - /* debug information will only see the variable after this point! */ - getlocvar(fs, b.u.info)->startpc = fs->pc; -} - - -static void localstat (LexState *ls) { - /* stat -> LOCAL NAME {',' NAME} ['=' explist] */ - int nvars = 0; - int nexps; - expdesc e; - do { - new_localvar(ls, str_checkname(ls)); - nvars++; - } while (testnext(ls, ',')); - if (testnext(ls, '=')) - nexps = explist(ls, &e); - else { - e.k = VVOID; - nexps = 0; - } - adjust_assign(ls, nvars, nexps, &e); - adjustlocalvars(ls, nvars); -} - - -static int funcname (LexState *ls, expdesc *v) { - /* funcname -> NAME {fieldsel} [':' NAME] */ - int ismethod = 0; - singlevar(ls, v); - while (ls->t.token == '.') - fieldsel(ls, v); - if (ls->t.token == ':') { - ismethod = 1; - fieldsel(ls, v); - } - return ismethod; -} - - -static void funcstat (LexState *ls, int line) { - /* funcstat -> FUNCTION funcname body */ - int ismethod; - expdesc v, b; - luaX_next(ls); /* skip FUNCTION */ - ismethod = funcname(ls, &v); - body(ls, &b, ismethod, line); - luaK_storevar(ls->fs, &v, &b); - luaK_fixline(ls->fs, line); /* definition "happens" in the first line */ -} - - -static void exprstat (LexState *ls) { - /* stat -> func | assignment */ - FuncState *fs = ls->fs; - struct LHS_assign v; - suffixedexp(ls, &v.v); - if (ls->t.token == '=' || ls->t.token == ',') { /* stat -> assignment ? */ - v.prev = NULL; - assignment(ls, &v, 1); - } - else { /* stat -> func */ - check_condition(ls, v.v.k == VCALL, "syntax error"); - SETARG_C(getinstruction(fs, &v.v), 1); /* call statement uses no results */ - } -} - - -static void retstat (LexState *ls) { - /* stat -> RETURN [explist] [';'] */ - FuncState *fs = ls->fs; - expdesc e; - int first, nret; /* registers with returned values */ - if (block_follow(ls, 1) || ls->t.token == ';') - first = nret = 0; /* return no values */ - else { - nret = explist(ls, &e); /* optional return values */ - if (hasmultret(e.k)) { - luaK_setmultret(fs, &e); - if (e.k == VCALL && nret == 1) { /* tail call? */ - SET_OPCODE(getinstruction(fs,&e), OP_TAILCALL); - lua_assert(GETARG_A(getinstruction(fs,&e)) == fs->nactvar); - } - first = fs->nactvar; - nret = LUA_MULTRET; /* return all values */ - } - else { - if (nret == 1) /* only one single value? */ - first = luaK_exp2anyreg(fs, &e); - else { - luaK_exp2nextreg(fs, &e); /* values must go to the stack */ - first = fs->nactvar; /* return all active values */ - lua_assert(nret == fs->freereg - first); - } - } - } - luaK_ret(fs, first, nret); - testnext(ls, ';'); /* skip optional semicolon */ -} - - -static void statement (LexState *ls) { - int line = ls->linenumber; /* may be needed for error messages */ - enterlevel(ls); - switch (ls->t.token) { - case ';': { /* stat -> ';' (empty statement) */ - luaX_next(ls); /* skip ';' */ - break; - } - case TK_IF: { /* stat -> ifstat */ - ifstat(ls, line); - break; - } - case TK_WHILE: { /* stat -> whilestat */ - whilestat(ls, line); - break; - } - case TK_DO: { /* stat -> DO block END */ - luaX_next(ls); /* skip DO */ - block(ls); - check_match(ls, TK_END, TK_DO, line); - break; - } - case TK_FOR: { /* stat -> forstat */ - forstat(ls, line); - break; - } - case TK_REPEAT: { /* stat -> repeatstat */ - repeatstat(ls, line); - break; - } - case TK_FUNCTION: { /* stat -> funcstat */ - funcstat(ls, line); - break; - } - case TK_LOCAL: { /* stat -> localstat */ - luaX_next(ls); /* skip LOCAL */ - if (testnext(ls, TK_FUNCTION)) /* local function? */ - localfunc(ls); - else - localstat(ls); - break; - } - case TK_DBCOLON: { /* stat -> label */ - luaX_next(ls); /* skip double colon */ - labelstat(ls, str_checkname(ls), line); - break; - } - case TK_RETURN: { /* stat -> retstat */ - luaX_next(ls); /* skip RETURN */ - retstat(ls); - break; - } - case TK_BREAK: /* stat -> breakstat */ - case TK_GOTO: { /* stat -> 'goto' NAME */ - gotostat(ls, luaK_jump(ls->fs)); - break; - } - default: { /* stat -> func | assignment */ - exprstat(ls); - break; - } - } - lua_assert(ls->fs->f->maxstacksize >= ls->fs->freereg && - ls->fs->freereg >= ls->fs->nactvar); - ls->fs->freereg = ls->fs->nactvar; /* free registers */ - leavelevel(ls); -} - -/* }====================================================================== */ - - -/* -** compiles the main function, which is a regular vararg function with an -** upvalue named LUA_ENV -*/ -static void mainfunc (LexState *ls, FuncState *fs) { - BlockCnt bl; - expdesc v; - open_func(ls, fs, &bl); - fs->f->is_vararg = 1; /* main function is always declared vararg */ - init_exp(&v, VLOCAL, 0); /* create and... */ - newupvalue(fs, ls->envn, &v); /* ...set environment upvalue */ - luaX_next(ls); /* read first token */ - statlist(ls); /* parse main body */ - check(ls, TK_EOS); - close_func(ls); -} - - -LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, - Dyndata *dyd, const char *name, int firstchar) { - LexState lexstate; - FuncState funcstate; - LClosure *cl = luaF_newLclosure(L, 1); /* create main closure */ - setclLvalue(L, L->top, cl); /* anchor it (to avoid being collected) */ - luaD_inctop(L); - lexstate.h = luaH_new(L); /* create table for scanner */ - sethvalue(L, L->top, lexstate.h); /* anchor it */ - luaD_inctop(L); - funcstate.f = cl->p = luaF_newproto(L); - funcstate.f->source = luaS_new(L, name); /* create and anchor TString */ - lua_assert(iswhite(funcstate.f)); /* do not need barrier here */ - lexstate.buff = buff; - lexstate.dyd = dyd; - dyd->actvar.n = dyd->gt.n = dyd->label.n = 0; - luaX_setinput(L, &lexstate, z, funcstate.f->source, firstchar); - mainfunc(&lexstate, &funcstate); - lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs); - /* all scopes should be correctly finished */ - lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0); - L->top--; /* remove scanner's table */ - return cl; /* closure is on the stack, too */ -} - diff --git a/build/premake/premake5/contrib/lua/src/lparser.h b/build/premake/premake5/contrib/lua/src/lparser.h deleted file mode 100644 index f45b23cba5..0000000000 --- a/build/premake/premake5/contrib/lua/src/lparser.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -** $Id: lparser.h,v 1.76.1.1 2017/04/19 17:20:42 roberto Exp $ -** Lua Parser -** See Copyright Notice in lua.h -*/ - -#ifndef lparser_h -#define lparser_h - -#include "llimits.h" -#include "lobject.h" -#include "lzio.h" - - -/* -** Expression and variable descriptor. -** Code generation for variables and expressions can be delayed to allow -** optimizations; An 'expdesc' structure describes a potentially-delayed -** variable/expression. It has a description of its "main" value plus a -** list of conditional jumps that can also produce its value (generated -** by short-circuit operators 'and'/'or'). -*/ - -/* kinds of variables/expressions */ -typedef enum { - VVOID, /* when 'expdesc' describes the last expression a list, - this kind means an empty list (so, no expression) */ - VNIL, /* constant nil */ - VTRUE, /* constant true */ - VFALSE, /* constant false */ - VK, /* constant in 'k'; info = index of constant in 'k' */ - VKFLT, /* floating constant; nval = numerical float value */ - VKINT, /* integer constant; nval = numerical integer value */ - VNONRELOC, /* expression has its value in a fixed register; - info = result register */ - VLOCAL, /* local variable; info = local register */ - VUPVAL, /* upvalue variable; info = index of upvalue in 'upvalues' */ - VINDEXED, /* indexed variable; - ind.vt = whether 't' is register or upvalue; - ind.t = table register or upvalue; - ind.idx = key's R/K index */ - VJMP, /* expression is a test/comparison; - info = pc of corresponding jump instruction */ - VRELOCABLE, /* expression can put result in any register; - info = instruction pc */ - VCALL, /* expression is a function call; info = instruction pc */ - VVARARG /* vararg expression; info = instruction pc */ -} expkind; - - -#define vkisvar(k) (VLOCAL <= (k) && (k) <= VINDEXED) -#define vkisinreg(k) ((k) == VNONRELOC || (k) == VLOCAL) - -typedef struct expdesc { - expkind k; - union { - lua_Integer ival; /* for VKINT */ - lua_Number nval; /* for VKFLT */ - int info; /* for generic use */ - struct { /* for indexed variables (VINDEXED) */ - short idx; /* index (R/K) */ - lu_byte t; /* table (register or upvalue) */ - lu_byte vt; /* whether 't' is register (VLOCAL) or upvalue (VUPVAL) */ - } ind; - } u; - int t; /* patch list of 'exit when true' */ - int f; /* patch list of 'exit when false' */ -} expdesc; - - -/* description of active local variable */ -typedef struct Vardesc { - short idx; /* variable index in stack */ -} Vardesc; - - -/* description of pending goto statements and label statements */ -typedef struct Labeldesc { - TString *name; /* label identifier */ - int pc; /* position in code */ - int line; /* line where it appeared */ - lu_byte nactvar; /* local level where it appears in current block */ -} Labeldesc; - - -/* list of labels or gotos */ -typedef struct Labellist { - Labeldesc *arr; /* array */ - int n; /* number of entries in use */ - int size; /* array size */ -} Labellist; - - -/* dynamic structures used by the parser */ -typedef struct Dyndata { - struct { /* list of active local variables */ - Vardesc *arr; - int n; - int size; - } actvar; - Labellist gt; /* list of pending gotos */ - Labellist label; /* list of active labels */ -} Dyndata; - - -/* control of blocks */ -struct BlockCnt; /* defined in lparser.c */ - - -/* state needed to generate code for a given function */ -typedef struct FuncState { - Proto *f; /* current function header */ - struct FuncState *prev; /* enclosing function */ - struct LexState *ls; /* lexical state */ - struct BlockCnt *bl; /* chain of current blocks */ - int pc; /* next position to code (equivalent to 'ncode') */ - int lasttarget; /* 'label' of last 'jump label' */ - int jpc; /* list of pending jumps to 'pc' */ - int nk; /* number of elements in 'k' */ - int np; /* number of elements in 'p' */ - int firstlocal; /* index of first local var (in Dyndata array) */ - short nlocvars; /* number of elements in 'f->locvars' */ - lu_byte nactvar; /* number of active local variables */ - lu_byte nups; /* number of upvalues */ - lu_byte freereg; /* first free register */ -} FuncState; - - -LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, - Dyndata *dyd, const char *name, int firstchar); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lprefix.h b/build/premake/premake5/contrib/lua/src/lprefix.h deleted file mode 100644 index 9a749a3f30..0000000000 --- a/build/premake/premake5/contrib/lua/src/lprefix.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -** $Id: lprefix.h,v 1.2.1.1 2017/04/19 17:20:42 roberto Exp $ -** Definitions for Lua code that must come before any other header file -** See Copyright Notice in lua.h -*/ - -#ifndef lprefix_h -#define lprefix_h - - -/* -** Allows POSIX/XSI stuff -*/ -#if !defined(LUA_USE_C89) /* { */ - -#if !defined(_XOPEN_SOURCE) -#define _XOPEN_SOURCE 600 -#elif _XOPEN_SOURCE == 0 -#undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ -#endif - -/* -** Allows manipulation of large files in gcc and some other compilers -*/ -#if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 -#endif - -#endif /* } */ - - -/* -** Windows stuff -*/ -#if defined(_WIN32) /* { */ - -#if !defined(_CRT_SECURE_NO_WARNINGS) -#define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ -#endif - -#endif /* } */ - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/lstate.c b/build/premake/premake5/contrib/lua/src/lstate.c deleted file mode 100644 index c1a76643c3..0000000000 --- a/build/premake/premake5/contrib/lua/src/lstate.c +++ /dev/null @@ -1,347 +0,0 @@ -/* -** $Id: lstate.c,v 2.133.1.1 2017/04/19 17:39:34 roberto Exp $ -** Global State -** See Copyright Notice in lua.h -*/ - -#define lstate_c -#define LUA_CORE - -#include "lprefix.h" - - -#include -#include - -#include "lua.h" - -#include "lapi.h" -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lgc.h" -#include "llex.h" -#include "lmem.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" - - -#if !defined(LUAI_GCPAUSE) -#define LUAI_GCPAUSE 200 /* 200% */ -#endif - -#if !defined(LUAI_GCMUL) -#define LUAI_GCMUL 200 /* GC runs 'twice the speed' of memory allocation */ -#endif - - -/* -** a macro to help the creation of a unique random seed when a state is -** created; the seed is used to randomize hashes. -*/ -#if !defined(luai_makeseed) -#include -#define luai_makeseed() cast(unsigned int, time(NULL)) -#endif - - - -/* -** thread state + extra space -*/ -typedef struct LX { - lu_byte extra_[LUA_EXTRASPACE]; - lua_State l; -} LX; - - -/* -** Main thread combines a thread state and the global state -*/ -typedef struct LG { - LX l; - global_State g; -} LG; - - - -#define fromstate(L) (cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l))) - - -/* -** Compute an initial seed as random as possible. Rely on Address Space -** Layout Randomization (if present) to increase randomness.. -*/ -#define addbuff(b,p,e) \ - { size_t t = cast(size_t, e); \ - memcpy(b + p, &t, sizeof(t)); p += sizeof(t); } - -static unsigned int makeseed (lua_State *L) { - char buff[4 * sizeof(size_t)]; - unsigned int h = luai_makeseed(); - int p = 0; - addbuff(buff, p, L); /* heap variable */ - addbuff(buff, p, &h); /* local variable */ - addbuff(buff, p, luaO_nilobject); /* global variable */ - addbuff(buff, p, &lua_newstate); /* public function */ - lua_assert(p == sizeof(buff)); - return luaS_hash(buff, p, h); -} - - -/* -** set GCdebt to a new value keeping the value (totalbytes + GCdebt) -** invariant (and avoiding underflows in 'totalbytes') -*/ -void luaE_setdebt (global_State *g, l_mem debt) { - l_mem tb = gettotalbytes(g); - lua_assert(tb > 0); - if (debt < tb - MAX_LMEM) - debt = tb - MAX_LMEM; /* will make 'totalbytes == MAX_LMEM' */ - g->totalbytes = tb - debt; - g->GCdebt = debt; -} - - -CallInfo *luaE_extendCI (lua_State *L) { - CallInfo *ci = luaM_new(L, CallInfo); - lua_assert(L->ci->next == NULL); - L->ci->next = ci; - ci->previous = L->ci; - ci->next = NULL; - L->nci++; - return ci; -} - - -/* -** free all CallInfo structures not in use by a thread -*/ -void luaE_freeCI (lua_State *L) { - CallInfo *ci = L->ci; - CallInfo *next = ci->next; - ci->next = NULL; - while ((ci = next) != NULL) { - next = ci->next; - luaM_free(L, ci); - L->nci--; - } -} - - -/* -** free half of the CallInfo structures not in use by a thread -*/ -void luaE_shrinkCI (lua_State *L) { - CallInfo *ci = L->ci; - CallInfo *next2; /* next's next */ - /* while there are two nexts */ - while (ci->next != NULL && (next2 = ci->next->next) != NULL) { - luaM_free(L, ci->next); /* free next */ - L->nci--; - ci->next = next2; /* remove 'next' from the list */ - next2->previous = ci; - ci = next2; /* keep next's next */ - } -} - - -static void stack_init (lua_State *L1, lua_State *L) { - int i; CallInfo *ci; - /* initialize stack array */ - L1->stack = luaM_newvector(L, BASIC_STACK_SIZE, TValue); - L1->stacksize = BASIC_STACK_SIZE; - for (i = 0; i < BASIC_STACK_SIZE; i++) - setnilvalue(L1->stack + i); /* erase new stack */ - L1->top = L1->stack; - L1->stack_last = L1->stack + L1->stacksize - EXTRA_STACK; - /* initialize first ci */ - ci = &L1->base_ci; - ci->next = ci->previous = NULL; - ci->callstatus = 0; - ci->func = L1->top; - setnilvalue(L1->top++); /* 'function' entry for this 'ci' */ - ci->top = L1->top + LUA_MINSTACK; - L1->ci = ci; -} - - -static void freestack (lua_State *L) { - if (L->stack == NULL) - return; /* stack not completely built yet */ - L->ci = &L->base_ci; /* free the entire 'ci' list */ - luaE_freeCI(L); - lua_assert(L->nci == 0); - luaM_freearray(L, L->stack, L->stacksize); /* free stack array */ -} - - -/* -** Create registry table and its predefined values -*/ -static void init_registry (lua_State *L, global_State *g) { - TValue temp; - /* create registry */ - Table *registry = luaH_new(L); - sethvalue(L, &g->l_registry, registry); - luaH_resize(L, registry, LUA_RIDX_LAST, 0); - /* registry[LUA_RIDX_MAINTHREAD] = L */ - setthvalue(L, &temp, L); /* temp = L */ - luaH_setint(L, registry, LUA_RIDX_MAINTHREAD, &temp); - /* registry[LUA_RIDX_GLOBALS] = table of globals */ - sethvalue(L, &temp, luaH_new(L)); /* temp = new table (global table) */ - luaH_setint(L, registry, LUA_RIDX_GLOBALS, &temp); -} - - -/* -** open parts of the state that may cause memory-allocation errors. -** ('g->version' != NULL flags that the state was completely build) -*/ -static void f_luaopen (lua_State *L, void *ud) { - global_State *g = G(L); - UNUSED(ud); - stack_init(L, L); /* init stack */ - init_registry(L, g); - luaS_init(L); - luaT_init(L); - luaX_init(L); - g->gcrunning = 1; /* allow gc */ - g->version = lua_version(NULL); - luai_userstateopen(L); -} - - -/* -** preinitialize a thread with consistent values without allocating -** any memory (to avoid errors) -*/ -static void preinit_thread (lua_State *L, global_State *g) { - G(L) = g; - L->stack = NULL; - L->ci = NULL; - L->nci = 0; - L->stacksize = 0; - L->twups = L; /* thread has no upvalues */ - L->errorJmp = NULL; - L->nCcalls = 0; - L->hook = NULL; - L->hookmask = 0; - L->basehookcount = 0; - L->allowhook = 1; - resethookcount(L); - L->openupval = NULL; - L->nny = 1; - L->status = LUA_OK; - L->errfunc = 0; -} - - -static void close_state (lua_State *L) { - global_State *g = G(L); - luaF_close(L, L->stack); /* close all upvalues for this thread */ - luaC_freeallobjects(L); /* collect all objects */ - if (g->version) /* closing a fully built state? */ - luai_userstateclose(L); - luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size); - freestack(L); - lua_assert(gettotalbytes(g) == sizeof(LG)); - (*g->frealloc)(g->ud, fromstate(L), sizeof(LG), 0); /* free main block */ -} - - -LUA_API lua_State *lua_newthread (lua_State *L) { - global_State *g = G(L); - lua_State *L1; - lua_lock(L); - luaC_checkGC(L); - /* create new thread */ - L1 = &cast(LX *, luaM_newobject(L, LUA_TTHREAD, sizeof(LX)))->l; - L1->marked = luaC_white(g); - L1->tt = LUA_TTHREAD; - /* link it on list 'allgc' */ - L1->next = g->allgc; - g->allgc = obj2gco(L1); - /* anchor it on L stack */ - setthvalue(L, L->top, L1); - api_incr_top(L); - preinit_thread(L1, g); - L1->hookmask = L->hookmask; - L1->basehookcount = L->basehookcount; - L1->hook = L->hook; - resethookcount(L1); - /* initialize L1 extra space */ - memcpy(lua_getextraspace(L1), lua_getextraspace(g->mainthread), - LUA_EXTRASPACE); - luai_userstatethread(L, L1); - stack_init(L1, L); /* init stack */ - lua_unlock(L); - return L1; -} - - -void luaE_freethread (lua_State *L, lua_State *L1) { - LX *l = fromstate(L1); - luaF_close(L1, L1->stack); /* close all upvalues for this thread */ - lua_assert(L1->openupval == NULL); - luai_userstatefree(L, L1); - freestack(L1); - luaM_free(L, l); -} - - -LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { - int i; - lua_State *L; - global_State *g; - LG *l = cast(LG *, (*f)(ud, NULL, LUA_TTHREAD, sizeof(LG))); - if (l == NULL) return NULL; - L = &l->l.l; - g = &l->g; - L->next = NULL; - L->tt = LUA_TTHREAD; - g->currentwhite = bitmask(WHITE0BIT); - L->marked = luaC_white(g); - preinit_thread(L, g); - g->frealloc = f; - g->ud = ud; - g->mainthread = L; - g->seed = makeseed(L); - g->gcrunning = 0; /* no GC while building state */ - g->GCestimate = 0; - g->strt.size = g->strt.nuse = 0; - g->strt.hash = NULL; - setnilvalue(&g->l_registry); - g->panic = NULL; - g->version = NULL; - g->gcstate = GCSpause; - g->gckind = KGC_NORMAL; - g->allgc = g->finobj = g->tobefnz = g->fixedgc = NULL; - g->sweepgc = NULL; - g->gray = g->grayagain = NULL; - g->weak = g->ephemeron = g->allweak = NULL; - g->twups = NULL; - g->totalbytes = sizeof(LG); - g->GCdebt = 0; - g->gcfinnum = 0; - g->gcpause = LUAI_GCPAUSE; - g->gcstepmul = LUAI_GCMUL; - for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; - if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { - /* memory allocation error: free partial state */ - close_state(L); - L = NULL; - } - return L; -} - - -LUA_API void lua_close (lua_State *L) { - L = G(L)->mainthread; /* only the main thread can be closed */ - lua_lock(L); - close_state(L); -} - - diff --git a/build/premake/premake5/contrib/lua/src/lstate.h b/build/premake/premake5/contrib/lua/src/lstate.h deleted file mode 100644 index 56b3741000..0000000000 --- a/build/premake/premake5/contrib/lua/src/lstate.h +++ /dev/null @@ -1,253 +0,0 @@ -/* -** $Id: lstate.h,v 2.133.1.1 2017/04/19 17:39:34 roberto Exp $ -** Global State -** See Copyright Notice in lua.h -*/ - -#ifndef lstate_h -#define lstate_h - -#include "lua.h" - -#include "lobject.h" -#include "ltm.h" -#include "lzio.h" - - -/* - -** Some notes about garbage-collected objects: All objects in Lua must -** be kept somehow accessible until being freed, so all objects always -** belong to one (and only one) of these lists, using field 'next' of -** the 'CommonHeader' for the link: -** -** 'allgc': all objects not marked for finalization; -** 'finobj': all objects marked for finalization; -** 'tobefnz': all objects ready to be finalized; -** 'fixedgc': all objects that are not to be collected (currently -** only small strings, such as reserved words). -** -** Moreover, there is another set of lists that control gray objects. -** These lists are linked by fields 'gclist'. (All objects that -** can become gray have such a field. The field is not the same -** in all objects, but it always has this name.) Any gray object -** must belong to one of these lists, and all objects in these lists -** must be gray: -** -** 'gray': regular gray objects, still waiting to be visited. -** 'grayagain': objects that must be revisited at the atomic phase. -** That includes -** - black objects got in a write barrier; -** - all kinds of weak tables during propagation phase; -** - all threads. -** 'weak': tables with weak values to be cleared; -** 'ephemeron': ephemeron tables with white->white entries; -** 'allweak': tables with weak keys and/or weak values to be cleared. -** The last three lists are used only during the atomic phase. - -*/ - - -struct lua_longjmp; /* defined in ldo.c */ - - -/* -** Atomic type (relative to signals) to better ensure that 'lua_sethook' -** is thread safe -*/ -#if !defined(l_signalT) -#include -#define l_signalT sig_atomic_t -#endif - - -/* extra stack space to handle TM calls and some other extras */ -#define EXTRA_STACK 5 - - -#define BASIC_STACK_SIZE (2*LUA_MINSTACK) - - -/* kinds of Garbage Collection */ -#define KGC_NORMAL 0 -#define KGC_EMERGENCY 1 /* gc was forced by an allocation failure */ - - -typedef struct stringtable { - TString **hash; - int nuse; /* number of elements */ - int size; -} stringtable; - - -/* -** Information about a call. -** When a thread yields, 'func' is adjusted to pretend that the -** top function has only the yielded values in its stack; in that -** case, the actual 'func' value is saved in field 'extra'. -** When a function calls another with a continuation, 'extra' keeps -** the function index so that, in case of errors, the continuation -** function can be called with the correct top. -*/ -typedef struct CallInfo { - StkId func; /* function index in the stack */ - StkId top; /* top for this function */ - struct CallInfo *previous, *next; /* dynamic call link */ - union { - struct { /* only for Lua functions */ - StkId base; /* base for this function */ - const Instruction *savedpc; - } l; - struct { /* only for C functions */ - lua_KFunction k; /* continuation in case of yields */ - ptrdiff_t old_errfunc; - lua_KContext ctx; /* context info. in case of yields */ - } c; - } u; - ptrdiff_t extra; - short nresults; /* expected number of results from this function */ - unsigned short callstatus; -} CallInfo; - - -/* -** Bits in CallInfo status -*/ -#define CIST_OAH (1<<0) /* original value of 'allowhook' */ -#define CIST_LUA (1<<1) /* call is running a Lua function */ -#define CIST_HOOKED (1<<2) /* call is running a debug hook */ -#define CIST_FRESH (1<<3) /* call is running on a fresh invocation - of luaV_execute */ -#define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ -#define CIST_TAIL (1<<5) /* call was tail called */ -#define CIST_HOOKYIELD (1<<6) /* last hook called yielded */ -#define CIST_LEQ (1<<7) /* using __lt for __le */ -#define CIST_FIN (1<<8) /* call is running a finalizer */ - -#define isLua(ci) ((ci)->callstatus & CIST_LUA) - -/* assume that CIST_OAH has offset 0 and that 'v' is strictly 0/1 */ -#define setoah(st,v) ((st) = ((st) & ~CIST_OAH) | (v)) -#define getoah(st) ((st) & CIST_OAH) - - -/* -** 'global state', shared by all threads of this state -*/ -typedef struct global_State { - lua_Alloc frealloc; /* function to reallocate memory */ - void *ud; /* auxiliary data to 'frealloc' */ - l_mem totalbytes; /* number of bytes currently allocated - GCdebt */ - l_mem GCdebt; /* bytes allocated not yet compensated by the collector */ - lu_mem GCmemtrav; /* memory traversed by the GC */ - lu_mem GCestimate; /* an estimate of the non-garbage memory in use */ - stringtable strt; /* hash table for strings */ - TValue l_registry; - unsigned int seed; /* randomized seed for hashes */ - lu_byte currentwhite; - lu_byte gcstate; /* state of garbage collector */ - lu_byte gckind; /* kind of GC running */ - lu_byte gcrunning; /* true if GC is running */ - GCObject *allgc; /* list of all collectable objects */ - GCObject **sweepgc; /* current position of sweep in list */ - GCObject *finobj; /* list of collectable objects with finalizers */ - GCObject *gray; /* list of gray objects */ - GCObject *grayagain; /* list of objects to be traversed atomically */ - GCObject *weak; /* list of tables with weak values */ - GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ - GCObject *allweak; /* list of all-weak tables */ - GCObject *tobefnz; /* list of userdata to be GC */ - GCObject *fixedgc; /* list of objects not to be collected */ - struct lua_State *twups; /* list of threads with open upvalues */ - unsigned int gcfinnum; /* number of finalizers to call in each GC step */ - int gcpause; /* size of pause between successive GCs */ - int gcstepmul; /* GC 'granularity' */ - lua_CFunction panic; /* to be called in unprotected errors */ - struct lua_State *mainthread; - const lua_Number *version; /* pointer to version number */ - TString *memerrmsg; /* memory-error message */ - TString *tmname[TM_N]; /* array with tag-method names */ - struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */ - TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */ -} global_State; - - -/* -** 'per thread' state -*/ -struct lua_State { - CommonHeader; - unsigned short nci; /* number of items in 'ci' list */ - lu_byte status; - StkId top; /* first free slot in the stack */ - global_State *l_G; - CallInfo *ci; /* call info for current function */ - const Instruction *oldpc; /* last pc traced */ - StkId stack_last; /* last free slot in the stack */ - StkId stack; /* stack base */ - UpVal *openupval; /* list of open upvalues in this stack */ - GCObject *gclist; - struct lua_State *twups; /* list of threads with open upvalues */ - struct lua_longjmp *errorJmp; /* current error recover point */ - CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ - volatile lua_Hook hook; - ptrdiff_t errfunc; /* current error handling function (stack index) */ - int stacksize; - int basehookcount; - int hookcount; - unsigned short nny; /* number of non-yieldable calls in stack */ - unsigned short nCcalls; /* number of nested C calls */ - l_signalT hookmask; - lu_byte allowhook; -}; - - -#define G(L) (L->l_G) - - -/* -** Union of all collectable objects (only for conversions) -*/ -union GCUnion { - GCObject gc; /* common header */ - struct TString ts; - struct Udata u; - union Closure cl; - struct Table h; - struct Proto p; - struct lua_State th; /* thread */ -}; - - -#define cast_u(o) cast(union GCUnion *, (o)) - -/* macros to convert a GCObject into a specific value */ -#define gco2ts(o) \ - check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts)) -#define gco2u(o) check_exp((o)->tt == LUA_TUSERDATA, &((cast_u(o))->u)) -#define gco2lcl(o) check_exp((o)->tt == LUA_TLCL, &((cast_u(o))->cl.l)) -#define gco2ccl(o) check_exp((o)->tt == LUA_TCCL, &((cast_u(o))->cl.c)) -#define gco2cl(o) \ - check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl)) -#define gco2t(o) check_exp((o)->tt == LUA_TTABLE, &((cast_u(o))->h)) -#define gco2p(o) check_exp((o)->tt == LUA_TPROTO, &((cast_u(o))->p)) -#define gco2th(o) check_exp((o)->tt == LUA_TTHREAD, &((cast_u(o))->th)) - - -/* macro to convert a Lua object into a GCObject */ -#define obj2gco(v) \ - check_exp(novariant((v)->tt) < LUA_TDEADKEY, (&(cast_u(v)->gc))) - - -/* actual number of total bytes allocated */ -#define gettotalbytes(g) cast(lu_mem, (g)->totalbytes + (g)->GCdebt) - -LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt); -LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); -LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L); -LUAI_FUNC void luaE_freeCI (lua_State *L); -LUAI_FUNC void luaE_shrinkCI (lua_State *L); - - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/lstring.c b/build/premake/premake5/contrib/lua/src/lstring.c deleted file mode 100644 index 6257f211d9..0000000000 --- a/build/premake/premake5/contrib/lua/src/lstring.c +++ /dev/null @@ -1,248 +0,0 @@ -/* -** $Id: lstring.c,v 2.56.1.1 2017/04/19 17:20:42 roberto Exp $ -** String table (keeps all strings handled by Lua) -** See Copyright Notice in lua.h -*/ - -#define lstring_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" -#include "lstring.h" - - -#define MEMERRMSG "not enough memory" - - -/* -** Lua will use at most ~(2^LUAI_HASHLIMIT) bytes from a string to -** compute its hash -*/ -#if !defined(LUAI_HASHLIMIT) -#define LUAI_HASHLIMIT 5 -#endif - - -/* -** equality for long strings -*/ -int luaS_eqlngstr (TString *a, TString *b) { - size_t len = a->u.lnglen; - lua_assert(a->tt == LUA_TLNGSTR && b->tt == LUA_TLNGSTR); - return (a == b) || /* same instance or... */ - ((len == b->u.lnglen) && /* equal length and ... */ - (memcmp(getstr(a), getstr(b), len) == 0)); /* equal contents */ -} - - -unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) { - unsigned int h = seed ^ cast(unsigned int, l); - size_t step = (l >> LUAI_HASHLIMIT) + 1; - for (; l >= step; l -= step) - h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1])); - return h; -} - - -unsigned int luaS_hashlongstr (TString *ts) { - lua_assert(ts->tt == LUA_TLNGSTR); - if (ts->extra == 0) { /* no hash? */ - ts->hash = luaS_hash(getstr(ts), ts->u.lnglen, ts->hash); - ts->extra = 1; /* now it has its hash */ - } - return ts->hash; -} - - -/* -** resizes the string table -*/ -void luaS_resize (lua_State *L, int newsize) { - int i; - stringtable *tb = &G(L)->strt; - if (newsize > tb->size) { /* grow table if needed */ - luaM_reallocvector(L, tb->hash, tb->size, newsize, TString *); - for (i = tb->size; i < newsize; i++) - tb->hash[i] = NULL; - } - for (i = 0; i < tb->size; i++) { /* rehash */ - TString *p = tb->hash[i]; - tb->hash[i] = NULL; - while (p) { /* for each node in the list */ - TString *hnext = p->u.hnext; /* save next */ - unsigned int h = lmod(p->hash, newsize); /* new position */ - p->u.hnext = tb->hash[h]; /* chain it */ - tb->hash[h] = p; - p = hnext; - } - } - if (newsize < tb->size) { /* shrink table if needed */ - /* vanishing slice should be empty */ - lua_assert(tb->hash[newsize] == NULL && tb->hash[tb->size - 1] == NULL); - luaM_reallocvector(L, tb->hash, tb->size, newsize, TString *); - } - tb->size = newsize; -} - - -/* -** Clear API string cache. (Entries cannot be empty, so fill them with -** a non-collectable string.) -*/ -void luaS_clearcache (global_State *g) { - int i, j; - for (i = 0; i < STRCACHE_N; i++) - for (j = 0; j < STRCACHE_M; j++) { - if (iswhite(g->strcache[i][j])) /* will entry be collected? */ - g->strcache[i][j] = g->memerrmsg; /* replace it with something fixed */ - } -} - - -/* -** Initialize the string table and the string cache -*/ -void luaS_init (lua_State *L) { - global_State *g = G(L); - int i, j; - luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */ - /* pre-create memory-error message */ - g->memerrmsg = luaS_newliteral(L, MEMERRMSG); - luaC_fix(L, obj2gco(g->memerrmsg)); /* it should never be collected */ - for (i = 0; i < STRCACHE_N; i++) /* fill cache with valid strings */ - for (j = 0; j < STRCACHE_M; j++) - g->strcache[i][j] = g->memerrmsg; -} - - - -/* -** creates a new string object -*/ -static TString *createstrobj (lua_State *L, size_t l, int tag, unsigned int h) { - TString *ts; - GCObject *o; - size_t totalsize; /* total size of TString object */ - totalsize = sizelstring(l); - o = luaC_newobj(L, tag, totalsize); - ts = gco2ts(o); - ts->hash = h; - ts->extra = 0; - getstr(ts)[l] = '\0'; /* ending 0 */ - return ts; -} - - -TString *luaS_createlngstrobj (lua_State *L, size_t l) { - TString *ts = createstrobj(L, l, LUA_TLNGSTR, G(L)->seed); - ts->u.lnglen = l; - return ts; -} - - -void luaS_remove (lua_State *L, TString *ts) { - stringtable *tb = &G(L)->strt; - TString **p = &tb->hash[lmod(ts->hash, tb->size)]; - while (*p != ts) /* find previous element */ - p = &(*p)->u.hnext; - *p = (*p)->u.hnext; /* remove element from its list */ - tb->nuse--; -} - - -/* -** checks whether short string exists and reuses it or creates a new one -*/ -static TString *internshrstr (lua_State *L, const char *str, size_t l) { - TString *ts; - global_State *g = G(L); - unsigned int h = luaS_hash(str, l, g->seed); - TString **list = &g->strt.hash[lmod(h, g->strt.size)]; - lua_assert(str != NULL); /* otherwise 'memcmp'/'memcpy' are undefined */ - for (ts = *list; ts != NULL; ts = ts->u.hnext) { - if (l == ts->shrlen && - (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) { - /* found! */ - if (isdead(g, ts)) /* dead (but not collected yet)? */ - changewhite(ts); /* resurrect it */ - return ts; - } - } - if (g->strt.nuse >= g->strt.size && g->strt.size <= MAX_INT/2) { - luaS_resize(L, g->strt.size * 2); - list = &g->strt.hash[lmod(h, g->strt.size)]; /* recompute with new size */ - } - ts = createstrobj(L, l, LUA_TSHRSTR, h); - memcpy(getstr(ts), str, l * sizeof(char)); - ts->shrlen = cast_byte(l); - ts->u.hnext = *list; - *list = ts; - g->strt.nuse++; - return ts; -} - - -/* -** new string (with explicit length) -*/ -TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { - if (l <= LUAI_MAXSHORTLEN) /* short string? */ - return internshrstr(L, str, l); - else { - TString *ts; - if (l >= (MAX_SIZE - sizeof(TString))/sizeof(char)) - luaM_toobig(L); - ts = luaS_createlngstrobj(L, l); - memcpy(getstr(ts), str, l * sizeof(char)); - return ts; - } -} - - -/* -** Create or reuse a zero-terminated string, first checking in the -** cache (using the string address as a key). The cache can contain -** only zero-terminated strings, so it is safe to use 'strcmp' to -** check hits. -*/ -TString *luaS_new (lua_State *L, const char *str) { - unsigned int i = point2uint(str) % STRCACHE_N; /* hash */ - int j; - TString **p = G(L)->strcache[i]; - for (j = 0; j < STRCACHE_M; j++) { - if (strcmp(str, getstr(p[j])) == 0) /* hit? */ - return p[j]; /* that is it */ - } - /* normal route */ - for (j = STRCACHE_M - 1; j > 0; j--) - p[j] = p[j - 1]; /* move out last element */ - /* new element is first in the list */ - p[0] = luaS_newlstr(L, str, strlen(str)); - return p[0]; -} - - -Udata *luaS_newudata (lua_State *L, size_t s) { - Udata *u; - GCObject *o; - if (s > MAX_SIZE - sizeof(Udata)) - luaM_toobig(L); - o = luaC_newobj(L, LUA_TUSERDATA, sizeludata(s)); - u = gco2u(o); - u->len = s; - u->metatable = NULL; - setuservalue(L, u, luaO_nilobject); - return u; -} - diff --git a/build/premake/premake5/contrib/lua/src/lstring.h b/build/premake/premake5/contrib/lua/src/lstring.h deleted file mode 100644 index d612abd333..0000000000 --- a/build/premake/premake5/contrib/lua/src/lstring.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -** $Id: lstring.h,v 1.61.1.1 2017/04/19 17:20:42 roberto Exp $ -** String table (keep all strings handled by Lua) -** See Copyright Notice in lua.h -*/ - -#ifndef lstring_h -#define lstring_h - -#include "lgc.h" -#include "lobject.h" -#include "lstate.h" - - -#define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) - -#define sizeludata(l) (sizeof(union UUdata) + (l)) -#define sizeudata(u) sizeludata((u)->len) - -#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ - (sizeof(s)/sizeof(char))-1)) - - -/* -** test whether a string is a reserved word -*/ -#define isreserved(s) ((s)->tt == LUA_TSHRSTR && (s)->extra > 0) - - -/* -** equality for short strings, which are always internalized -*/ -#define eqshrstr(a,b) check_exp((a)->tt == LUA_TSHRSTR, (a) == (b)) - - -LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); -LUAI_FUNC unsigned int luaS_hashlongstr (TString *ts); -LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); -LUAI_FUNC void luaS_resize (lua_State *L, int newsize); -LUAI_FUNC void luaS_clearcache (global_State *g); -LUAI_FUNC void luaS_init (lua_State *L); -LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); -LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); -LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); -LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); -LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lstrlib.c b/build/premake/premake5/contrib/lua/src/lstrlib.c deleted file mode 100644 index b4bed7e93d..0000000000 --- a/build/premake/premake5/contrib/lua/src/lstrlib.c +++ /dev/null @@ -1,1584 +0,0 @@ -/* -** $Id: lstrlib.c,v 1.254.1.1 2017/04/19 17:29:57 roberto Exp $ -** Standard library for string operations and pattern-matching -** See Copyright Notice in lua.h -*/ - -#define lstrlib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -/* -** maximum number of captures that a pattern can do during -** pattern-matching. This limit is arbitrary, but must fit in -** an unsigned char. -*/ -#if !defined(LUA_MAXCAPTURES) -#define LUA_MAXCAPTURES 32 -#endif - - -/* macro to 'unsign' a character */ -#define uchar(c) ((unsigned char)(c)) - - -/* -** Some sizes are better limited to fit in 'int', but must also fit in -** 'size_t'. (We assume that 'lua_Integer' cannot be smaller than 'int'.) -*/ -#define MAX_SIZET ((size_t)(~(size_t)0)) - -#define MAXSIZE \ - (sizeof(size_t) < sizeof(int) ? MAX_SIZET : (size_t)(INT_MAX)) - - - - -static int str_len (lua_State *L) { - size_t l; - luaL_checklstring(L, 1, &l); - lua_pushinteger(L, (lua_Integer)l); - return 1; -} - - -/* translate a relative string position: negative means back from end */ -static lua_Integer posrelat (lua_Integer pos, size_t len) { - if (pos >= 0) return pos; - else if (0u - (size_t)pos > len) return 0; - else return (lua_Integer)len + pos + 1; -} - - -static int str_sub (lua_State *L) { - size_t l; - const char *s = luaL_checklstring(L, 1, &l); - lua_Integer start = posrelat(luaL_checkinteger(L, 2), l); - lua_Integer end = posrelat(luaL_optinteger(L, 3, -1), l); - if (start < 1) start = 1; - if (end > (lua_Integer)l) end = l; - if (start <= end) - lua_pushlstring(L, s + start - 1, (size_t)(end - start) + 1); - else lua_pushliteral(L, ""); - return 1; -} - - -static int str_reverse (lua_State *L) { - size_t l, i; - luaL_Buffer b; - const char *s = luaL_checklstring(L, 1, &l); - char *p = luaL_buffinitsize(L, &b, l); - for (i = 0; i < l; i++) - p[i] = s[l - i - 1]; - luaL_pushresultsize(&b, l); - return 1; -} - - -static int str_lower (lua_State *L) { - size_t l; - size_t i; - luaL_Buffer b; - const char *s = luaL_checklstring(L, 1, &l); - char *p = luaL_buffinitsize(L, &b, l); - for (i=0; i MAXSIZE / n) /* may overflow? */ - return luaL_error(L, "resulting string too large"); - else { - size_t totallen = (size_t)n * l + (size_t)(n - 1) * lsep; - luaL_Buffer b; - char *p = luaL_buffinitsize(L, &b, totallen); - while (n-- > 1) { /* first n-1 copies (followed by separator) */ - memcpy(p, s, l * sizeof(char)); p += l; - if (lsep > 0) { /* empty 'memcpy' is not that cheap */ - memcpy(p, sep, lsep * sizeof(char)); - p += lsep; - } - } - memcpy(p, s, l * sizeof(char)); /* last copy (not followed by separator) */ - luaL_pushresultsize(&b, totallen); - } - return 1; -} - - -static int str_byte (lua_State *L) { - size_t l; - const char *s = luaL_checklstring(L, 1, &l); - lua_Integer posi = posrelat(luaL_optinteger(L, 2, 1), l); - lua_Integer pose = posrelat(luaL_optinteger(L, 3, posi), l); - int n, i; - if (posi < 1) posi = 1; - if (pose > (lua_Integer)l) pose = l; - if (posi > pose) return 0; /* empty interval; return no values */ - if (pose - posi >= INT_MAX) /* arithmetic overflow? */ - return luaL_error(L, "string slice too long"); - n = (int)(pose - posi) + 1; - luaL_checkstack(L, n, "string slice too long"); - for (i=0; i= ms->level || ms->capture[l].len == CAP_UNFINISHED) - return luaL_error(ms->L, "invalid capture index %%%d", l + 1); - return l; -} - - -static int capture_to_close (MatchState *ms) { - int level = ms->level; - for (level--; level>=0; level--) - if (ms->capture[level].len == CAP_UNFINISHED) return level; - return luaL_error(ms->L, "invalid pattern capture"); -} - - -static const char *classend (MatchState *ms, const char *p) { - switch (*p++) { - case L_ESC: { - if (p == ms->p_end) - luaL_error(ms->L, "malformed pattern (ends with '%%')"); - return p+1; - } - case '[': { - if (*p == '^') p++; - do { /* look for a ']' */ - if (p == ms->p_end) - luaL_error(ms->L, "malformed pattern (missing ']')"); - if (*(p++) == L_ESC && p < ms->p_end) - p++; /* skip escapes (e.g. '%]') */ - } while (*p != ']'); - return p+1; - } - default: { - return p; - } - } -} - - -static int match_class (int c, int cl) { - int res; - switch (tolower(cl)) { - case 'a' : res = isalpha(c); break; - case 'c' : res = iscntrl(c); break; - case 'd' : res = isdigit(c); break; - case 'g' : res = isgraph(c); break; - case 'l' : res = islower(c); break; - case 'p' : res = ispunct(c); break; - case 's' : res = isspace(c); break; - case 'u' : res = isupper(c); break; - case 'w' : res = isalnum(c); break; - case 'x' : res = isxdigit(c); break; - case 'z' : res = (c == 0); break; /* deprecated option */ - default: return (cl == c); - } - return (islower(cl) ? res : !res); -} - - -static int matchbracketclass (int c, const char *p, const char *ec) { - int sig = 1; - if (*(p+1) == '^') { - sig = 0; - p++; /* skip the '^' */ - } - while (++p < ec) { - if (*p == L_ESC) { - p++; - if (match_class(c, uchar(*p))) - return sig; - } - else if ((*(p+1) == '-') && (p+2 < ec)) { - p+=2; - if (uchar(*(p-2)) <= c && c <= uchar(*p)) - return sig; - } - else if (uchar(*p) == c) return sig; - } - return !sig; -} - - -static int singlematch (MatchState *ms, const char *s, const char *p, - const char *ep) { - if (s >= ms->src_end) - return 0; - else { - int c = uchar(*s); - switch (*p) { - case '.': return 1; /* matches any char */ - case L_ESC: return match_class(c, uchar(*(p+1))); - case '[': return matchbracketclass(c, p, ep-1); - default: return (uchar(*p) == c); - } - } -} - - -static const char *matchbalance (MatchState *ms, const char *s, - const char *p) { - if (p >= ms->p_end - 1) - luaL_error(ms->L, "malformed pattern (missing arguments to '%%b')"); - if (*s != *p) return NULL; - else { - int b = *p; - int e = *(p+1); - int cont = 1; - while (++s < ms->src_end) { - if (*s == e) { - if (--cont == 0) return s+1; - } - else if (*s == b) cont++; - } - } - return NULL; /* string ends out of balance */ -} - - -static const char *max_expand (MatchState *ms, const char *s, - const char *p, const char *ep) { - ptrdiff_t i = 0; /* counts maximum expand for item */ - while (singlematch(ms, s + i, p, ep)) - i++; - /* keeps trying to match with the maximum repetitions */ - while (i>=0) { - const char *res = match(ms, (s+i), ep+1); - if (res) return res; - i--; /* else didn't match; reduce 1 repetition to try again */ - } - return NULL; -} - - -static const char *min_expand (MatchState *ms, const char *s, - const char *p, const char *ep) { - for (;;) { - const char *res = match(ms, s, ep+1); - if (res != NULL) - return res; - else if (singlematch(ms, s, p, ep)) - s++; /* try with one more repetition */ - else return NULL; - } -} - - -static const char *start_capture (MatchState *ms, const char *s, - const char *p, int what) { - const char *res; - int level = ms->level; - if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures"); - ms->capture[level].init = s; - ms->capture[level].len = what; - ms->level = level+1; - if ((res=match(ms, s, p)) == NULL) /* match failed? */ - ms->level--; /* undo capture */ - return res; -} - - -static const char *end_capture (MatchState *ms, const char *s, - const char *p) { - int l = capture_to_close(ms); - const char *res; - ms->capture[l].len = s - ms->capture[l].init; /* close capture */ - if ((res = match(ms, s, p)) == NULL) /* match failed? */ - ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ - return res; -} - - -static const char *match_capture (MatchState *ms, const char *s, int l) { - size_t len; - l = check_capture(ms, l); - len = ms->capture[l].len; - if ((size_t)(ms->src_end-s) >= len && - memcmp(ms->capture[l].init, s, len) == 0) - return s+len; - else return NULL; -} - - -static const char *match (MatchState *ms, const char *s, const char *p) { - if (ms->matchdepth-- == 0) - luaL_error(ms->L, "pattern too complex"); - init: /* using goto's to optimize tail recursion */ - if (p != ms->p_end) { /* end of pattern? */ - switch (*p) { - case '(': { /* start capture */ - if (*(p + 1) == ')') /* position capture? */ - s = start_capture(ms, s, p + 2, CAP_POSITION); - else - s = start_capture(ms, s, p + 1, CAP_UNFINISHED); - break; - } - case ')': { /* end capture */ - s = end_capture(ms, s, p + 1); - break; - } - case '$': { - if ((p + 1) != ms->p_end) /* is the '$' the last char in pattern? */ - goto dflt; /* no; go to default */ - s = (s == ms->src_end) ? s : NULL; /* check end of string */ - break; - } - case L_ESC: { /* escaped sequences not in the format class[*+?-]? */ - switch (*(p + 1)) { - case 'b': { /* balanced string? */ - s = matchbalance(ms, s, p + 2); - if (s != NULL) { - p += 4; goto init; /* return match(ms, s, p + 4); */ - } /* else fail (s == NULL) */ - break; - } - case 'f': { /* frontier? */ - const char *ep; char previous; - p += 2; - if (*p != '[') - luaL_error(ms->L, "missing '[' after '%%f' in pattern"); - ep = classend(ms, p); /* points to what is next */ - previous = (s == ms->src_init) ? '\0' : *(s - 1); - if (!matchbracketclass(uchar(previous), p, ep - 1) && - matchbracketclass(uchar(*s), p, ep - 1)) { - p = ep; goto init; /* return match(ms, s, ep); */ - } - s = NULL; /* match failed */ - break; - } - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - case '8': case '9': { /* capture results (%0-%9)? */ - s = match_capture(ms, s, uchar(*(p + 1))); - if (s != NULL) { - p += 2; goto init; /* return match(ms, s, p + 2) */ - } - break; - } - default: goto dflt; - } - break; - } - default: dflt: { /* pattern class plus optional suffix */ - const char *ep = classend(ms, p); /* points to optional suffix */ - /* does not match at least once? */ - if (!singlematch(ms, s, p, ep)) { - if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? */ - p = ep + 1; goto init; /* return match(ms, s, ep + 1); */ - } - else /* '+' or no suffix */ - s = NULL; /* fail */ - } - else { /* matched once */ - switch (*ep) { /* handle optional suffix */ - case '?': { /* optional */ - const char *res; - if ((res = match(ms, s + 1, ep + 1)) != NULL) - s = res; - else { - p = ep + 1; goto init; /* else return match(ms, s, ep + 1); */ - } - break; - } - case '+': /* 1 or more repetitions */ - s++; /* 1 match already done */ - /* FALLTHROUGH */ - case '*': /* 0 or more repetitions */ - s = max_expand(ms, s, p, ep); - break; - case '-': /* 0 or more repetitions (minimum) */ - s = min_expand(ms, s, p, ep); - break; - default: /* no suffix */ - s++; p = ep; goto init; /* return match(ms, s + 1, ep); */ - } - } - break; - } - } - } - ms->matchdepth++; - return s; -} - - - -static const char *lmemfind (const char *s1, size_t l1, - const char *s2, size_t l2) { - if (l2 == 0) return s1; /* empty strings are everywhere */ - else if (l2 > l1) return NULL; /* avoids a negative 'l1' */ - else { - const char *init; /* to search for a '*s2' inside 's1' */ - l2--; /* 1st char will be checked by 'memchr' */ - l1 = l1-l2; /* 's2' cannot be found after that */ - while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) { - init++; /* 1st char is already checked */ - if (memcmp(init, s2+1, l2) == 0) - return init-1; - else { /* correct 'l1' and 's1' to try again */ - l1 -= init-s1; - s1 = init; - } - } - return NULL; /* not found */ - } -} - - -static void push_onecapture (MatchState *ms, int i, const char *s, - const char *e) { - if (i >= ms->level) { - if (i == 0) /* ms->level == 0, too */ - lua_pushlstring(ms->L, s, e - s); /* add whole match */ - else - luaL_error(ms->L, "invalid capture index %%%d", i + 1); - } - else { - ptrdiff_t l = ms->capture[i].len; - if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture"); - if (l == CAP_POSITION) - lua_pushinteger(ms->L, (ms->capture[i].init - ms->src_init) + 1); - else - lua_pushlstring(ms->L, ms->capture[i].init, l); - } -} - - -static int push_captures (MatchState *ms, const char *s, const char *e) { - int i; - int nlevels = (ms->level == 0 && s) ? 1 : ms->level; - luaL_checkstack(ms->L, nlevels, "too many captures"); - for (i = 0; i < nlevels; i++) - push_onecapture(ms, i, s, e); - return nlevels; /* number of strings pushed */ -} - - -/* check whether pattern has no special characters */ -static int nospecials (const char *p, size_t l) { - size_t upto = 0; - do { - if (strpbrk(p + upto, SPECIALS)) - return 0; /* pattern has a special character */ - upto += strlen(p + upto) + 1; /* may have more after \0 */ - } while (upto <= l); - return 1; /* no special chars found */ -} - - -static void prepstate (MatchState *ms, lua_State *L, - const char *s, size_t ls, const char *p, size_t lp) { - ms->L = L; - ms->matchdepth = MAXCCALLS; - ms->src_init = s; - ms->src_end = s + ls; - ms->p_end = p + lp; -} - - -static void reprepstate (MatchState *ms) { - ms->level = 0; - lua_assert(ms->matchdepth == MAXCCALLS); -} - - -static int str_find_aux (lua_State *L, int find) { - size_t ls, lp; - const char *s = luaL_checklstring(L, 1, &ls); - const char *p = luaL_checklstring(L, 2, &lp); - lua_Integer init = posrelat(luaL_optinteger(L, 3, 1), ls); - if (init < 1) init = 1; - else if (init > (lua_Integer)ls + 1) { /* start after string's end? */ - lua_pushnil(L); /* cannot find anything */ - return 1; - } - /* explicit request or no special characters? */ - if (find && (lua_toboolean(L, 4) || nospecials(p, lp))) { - /* do a plain search */ - const char *s2 = lmemfind(s + init - 1, ls - (size_t)init + 1, p, lp); - if (s2) { - lua_pushinteger(L, (s2 - s) + 1); - lua_pushinteger(L, (s2 - s) + lp); - return 2; - } - } - else { - MatchState ms; - const char *s1 = s + init - 1; - int anchor = (*p == '^'); - if (anchor) { - p++; lp--; /* skip anchor character */ - } - prepstate(&ms, L, s, ls, p, lp); - do { - const char *res; - reprepstate(&ms); - if ((res=match(&ms, s1, p)) != NULL) { - if (find) { - lua_pushinteger(L, (s1 - s) + 1); /* start */ - lua_pushinteger(L, res - s); /* end */ - return push_captures(&ms, NULL, 0) + 2; - } - else - return push_captures(&ms, s1, res); - } - } while (s1++ < ms.src_end && !anchor); - } - lua_pushnil(L); /* not found */ - return 1; -} - - -static int str_find (lua_State *L) { - return str_find_aux(L, 1); -} - - -static int str_match (lua_State *L) { - return str_find_aux(L, 0); -} - - -/* state for 'gmatch' */ -typedef struct GMatchState { - const char *src; /* current position */ - const char *p; /* pattern */ - const char *lastmatch; /* end of last match */ - MatchState ms; /* match state */ -} GMatchState; - - -static int gmatch_aux (lua_State *L) { - GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3)); - const char *src; - gm->ms.L = L; - for (src = gm->src; src <= gm->ms.src_end; src++) { - const char *e; - reprepstate(&gm->ms); - if ((e = match(&gm->ms, src, gm->p)) != NULL && e != gm->lastmatch) { - gm->src = gm->lastmatch = e; - return push_captures(&gm->ms, src, e); - } - } - return 0; /* not found */ -} - - -static int gmatch (lua_State *L) { - size_t ls, lp; - const char *s = luaL_checklstring(L, 1, &ls); - const char *p = luaL_checklstring(L, 2, &lp); - GMatchState *gm; - lua_settop(L, 2); /* keep them on closure to avoid being collected */ - gm = (GMatchState *)lua_newuserdata(L, sizeof(GMatchState)); - prepstate(&gm->ms, L, s, ls, p, lp); - gm->src = s; gm->p = p; gm->lastmatch = NULL; - lua_pushcclosure(L, gmatch_aux, 3); - return 1; -} - - -static void add_s (MatchState *ms, luaL_Buffer *b, const char *s, - const char *e) { - size_t l, i; - lua_State *L = ms->L; - const char *news = lua_tolstring(L, 3, &l); - for (i = 0; i < l; i++) { - if (news[i] != L_ESC) - luaL_addchar(b, news[i]); - else { - i++; /* skip ESC */ - if (!isdigit(uchar(news[i]))) { - if (news[i] != L_ESC) - luaL_error(L, "invalid use of '%c' in replacement string", L_ESC); - luaL_addchar(b, news[i]); - } - else if (news[i] == '0') - luaL_addlstring(b, s, e - s); - else { - push_onecapture(ms, news[i] - '1', s, e); - luaL_tolstring(L, -1, NULL); /* if number, convert it to string */ - lua_remove(L, -2); /* remove original value */ - luaL_addvalue(b); /* add capture to accumulated result */ - } - } - } -} - - -static void add_value (MatchState *ms, luaL_Buffer *b, const char *s, - const char *e, int tr) { - lua_State *L = ms->L; - switch (tr) { - case LUA_TFUNCTION: { - int n; - lua_pushvalue(L, 3); - n = push_captures(ms, s, e); - lua_call(L, n, 1); - break; - } - case LUA_TTABLE: { - push_onecapture(ms, 0, s, e); - lua_gettable(L, 3); - break; - } - default: { /* LUA_TNUMBER or LUA_TSTRING */ - add_s(ms, b, s, e); - return; - } - } - if (!lua_toboolean(L, -1)) { /* nil or false? */ - lua_pop(L, 1); - lua_pushlstring(L, s, e - s); /* keep original text */ - } - else if (!lua_isstring(L, -1)) - luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); - luaL_addvalue(b); /* add result to accumulator */ -} - - -static int str_gsub (lua_State *L) { - size_t srcl, lp; - const char *src = luaL_checklstring(L, 1, &srcl); /* subject */ - const char *p = luaL_checklstring(L, 2, &lp); /* pattern */ - const char *lastmatch = NULL; /* end of last match */ - int tr = lua_type(L, 3); /* replacement type */ - lua_Integer max_s = luaL_optinteger(L, 4, srcl + 1); /* max replacements */ - int anchor = (*p == '^'); - lua_Integer n = 0; /* replacement count */ - MatchState ms; - luaL_Buffer b; - luaL_argcheck(L, tr == LUA_TNUMBER || tr == LUA_TSTRING || - tr == LUA_TFUNCTION || tr == LUA_TTABLE, 3, - "string/function/table expected"); - luaL_buffinit(L, &b); - if (anchor) { - p++; lp--; /* skip anchor character */ - } - prepstate(&ms, L, src, srcl, p, lp); - while (n < max_s) { - const char *e; - reprepstate(&ms); /* (re)prepare state for new match */ - if ((e = match(&ms, src, p)) != NULL && e != lastmatch) { /* match? */ - n++; - add_value(&ms, &b, src, e, tr); /* add replacement to buffer */ - src = lastmatch = e; - } - else if (src < ms.src_end) /* otherwise, skip one character */ - luaL_addchar(&b, *src++); - else break; /* end of subject */ - if (anchor) break; - } - luaL_addlstring(&b, src, ms.src_end-src); - luaL_pushresult(&b); - lua_pushinteger(L, n); /* number of substitutions */ - return 2; -} - -/* }====================================================== */ - - - -/* -** {====================================================== -** STRING FORMAT -** ======================================================= -*/ - -#if !defined(lua_number2strx) /* { */ - -/* -** Hexadecimal floating-point formatter -*/ - -#include - -#define SIZELENMOD (sizeof(LUA_NUMBER_FRMLEN)/sizeof(char)) - - -/* -** Number of bits that goes into the first digit. It can be any value -** between 1 and 4; the following definition tries to align the number -** to nibble boundaries by making what is left after that first digit a -** multiple of 4. -*/ -#define L_NBFD ((l_mathlim(MANT_DIG) - 1)%4 + 1) - - -/* -** Add integer part of 'x' to buffer and return new 'x' -*/ -static lua_Number adddigit (char *buff, int n, lua_Number x) { - lua_Number dd = l_mathop(floor)(x); /* get integer part from 'x' */ - int d = (int)dd; - buff[n] = (d < 10 ? d + '0' : d - 10 + 'a'); /* add to buffer */ - return x - dd; /* return what is left */ -} - - -static int num2straux (char *buff, int sz, lua_Number x) { - /* if 'inf' or 'NaN', format it like '%g' */ - if (x != x || x == (lua_Number)HUGE_VAL || x == -(lua_Number)HUGE_VAL) - return l_sprintf(buff, sz, LUA_NUMBER_FMT, (LUAI_UACNUMBER)x); - else if (x == 0) { /* can be -0... */ - /* create "0" or "-0" followed by exponent */ - return l_sprintf(buff, sz, LUA_NUMBER_FMT "x0p+0", (LUAI_UACNUMBER)x); - } - else { - int e; - lua_Number m = l_mathop(frexp)(x, &e); /* 'x' fraction and exponent */ - int n = 0; /* character count */ - if (m < 0) { /* is number negative? */ - buff[n++] = '-'; /* add signal */ - m = -m; /* make it positive */ - } - buff[n++] = '0'; buff[n++] = 'x'; /* add "0x" */ - m = adddigit(buff, n++, m * (1 << L_NBFD)); /* add first digit */ - e -= L_NBFD; /* this digit goes before the radix point */ - if (m > 0) { /* more digits? */ - buff[n++] = lua_getlocaledecpoint(); /* add radix point */ - do { /* add as many digits as needed */ - m = adddigit(buff, n++, m * 16); - } while (m > 0); - } - n += l_sprintf(buff + n, sz - n, "p%+d", e); /* add exponent */ - lua_assert(n < sz); - return n; - } -} - - -static int lua_number2strx (lua_State *L, char *buff, int sz, - const char *fmt, lua_Number x) { - int n = num2straux(buff, sz, x); - if (fmt[SIZELENMOD] == 'A') { - int i; - for (i = 0; i < n; i++) - buff[i] = toupper(uchar(buff[i])); - } - else if (fmt[SIZELENMOD] != 'a') - return luaL_error(L, "modifiers for format '%%a'/'%%A' not implemented"); - return n; -} - -#endif /* } */ - - -/* -** Maximum size of each formatted item. This maximum size is produced -** by format('%.99f', -maxfloat), and is equal to 99 + 3 ('-', '.', -** and '\0') + number of decimal digits to represent maxfloat (which -** is maximum exponent + 1). (99+3+1 then rounded to 120 for "extra -** expenses", such as locale-dependent stuff) -*/ -#define MAX_ITEM (120 + l_mathlim(MAX_10_EXP)) - - -/* valid flags in a format specification */ -#define FLAGS "-+ #0" - -/* -** maximum size of each format specification (such as "%-099.99d") -*/ -#define MAX_FORMAT 32 - - -static void addquoted (luaL_Buffer *b, const char *s, size_t len) { - luaL_addchar(b, '"'); - while (len--) { - if (*s == '"' || *s == '\\' || *s == '\n') { - luaL_addchar(b, '\\'); - luaL_addchar(b, *s); - } - else if (iscntrl(uchar(*s))) { - char buff[10]; - if (!isdigit(uchar(*(s+1)))) - l_sprintf(buff, sizeof(buff), "\\%d", (int)uchar(*s)); - else - l_sprintf(buff, sizeof(buff), "\\%03d", (int)uchar(*s)); - luaL_addstring(b, buff); - } - else - luaL_addchar(b, *s); - s++; - } - luaL_addchar(b, '"'); -} - - -/* -** Ensures the 'buff' string uses a dot as the radix character. -*/ -static void checkdp (char *buff, int nb) { - if (memchr(buff, '.', nb) == NULL) { /* no dot? */ - char point = lua_getlocaledecpoint(); /* try locale point */ - char *ppoint = (char *)memchr(buff, point, nb); - if (ppoint) *ppoint = '.'; /* change it to a dot */ - } -} - - -static void addliteral (lua_State *L, luaL_Buffer *b, int arg) { - switch (lua_type(L, arg)) { - case LUA_TSTRING: { - size_t len; - const char *s = lua_tolstring(L, arg, &len); - addquoted(b, s, len); - break; - } - case LUA_TNUMBER: { - char *buff = luaL_prepbuffsize(b, MAX_ITEM); - int nb; - if (!lua_isinteger(L, arg)) { /* float? */ - lua_Number n = lua_tonumber(L, arg); /* write as hexa ('%a') */ - nb = lua_number2strx(L, buff, MAX_ITEM, "%" LUA_NUMBER_FRMLEN "a", n); - checkdp(buff, nb); /* ensure it uses a dot */ - } - else { /* integers */ - lua_Integer n = lua_tointeger(L, arg); - const char *format = (n == LUA_MININTEGER) /* corner case? */ - ? "0x%" LUA_INTEGER_FRMLEN "x" /* use hexa */ - : LUA_INTEGER_FMT; /* else use default format */ - nb = l_sprintf(buff, MAX_ITEM, format, (LUAI_UACINT)n); - } - luaL_addsize(b, nb); - break; - } - case LUA_TNIL: case LUA_TBOOLEAN: { - luaL_tolstring(L, arg, NULL); - luaL_addvalue(b); - break; - } - default: { - luaL_argerror(L, arg, "value has no literal form"); - } - } -} - - -static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { - const char *p = strfrmt; - while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++; /* skip flags */ - if ((size_t)(p - strfrmt) >= sizeof(FLAGS)/sizeof(char)) - luaL_error(L, "invalid format (repeated flags)"); - if (isdigit(uchar(*p))) p++; /* skip width */ - if (isdigit(uchar(*p))) p++; /* (2 digits at most) */ - if (*p == '.') { - p++; - if (isdigit(uchar(*p))) p++; /* skip precision */ - if (isdigit(uchar(*p))) p++; /* (2 digits at most) */ - } - if (isdigit(uchar(*p))) - luaL_error(L, "invalid format (width or precision too long)"); - *(form++) = '%'; - memcpy(form, strfrmt, ((p - strfrmt) + 1) * sizeof(char)); - form += (p - strfrmt) + 1; - *form = '\0'; - return p; -} - - -/* -** add length modifier into formats -*/ -static void addlenmod (char *form, const char *lenmod) { - size_t l = strlen(form); - size_t lm = strlen(lenmod); - char spec = form[l - 1]; - strcpy(form + l - 1, lenmod); - form[l + lm - 1] = spec; - form[l + lm] = '\0'; -} - - -static int str_format (lua_State *L) { - int top = lua_gettop(L); - int arg = 1; - size_t sfl; - const char *strfrmt = luaL_checklstring(L, arg, &sfl); - const char *strfrmt_end = strfrmt+sfl; - luaL_Buffer b; - luaL_buffinit(L, &b); - while (strfrmt < strfrmt_end) { - if (*strfrmt != L_ESC) - luaL_addchar(&b, *strfrmt++); - else if (*++strfrmt == L_ESC) - luaL_addchar(&b, *strfrmt++); /* %% */ - else { /* format item */ - char form[MAX_FORMAT]; /* to store the format ('%...') */ - char *buff = luaL_prepbuffsize(&b, MAX_ITEM); /* to put formatted item */ - int nb = 0; /* number of bytes in added item */ - if (++arg > top) - luaL_argerror(L, arg, "no value"); - strfrmt = scanformat(L, strfrmt, form); - switch (*strfrmt++) { - case 'c': { - nb = l_sprintf(buff, MAX_ITEM, form, (int)luaL_checkinteger(L, arg)); - break; - } - case 'd': case 'i': - case 'o': case 'u': case 'x': case 'X': { - lua_Integer n = luaL_checkinteger(L, arg); - addlenmod(form, LUA_INTEGER_FRMLEN); - nb = l_sprintf(buff, MAX_ITEM, form, (LUAI_UACINT)n); - break; - } - case 'a': case 'A': - addlenmod(form, LUA_NUMBER_FRMLEN); - nb = lua_number2strx(L, buff, MAX_ITEM, form, - luaL_checknumber(L, arg)); - break; - case 'e': case 'E': case 'f': - case 'g': case 'G': { - lua_Number n = luaL_checknumber(L, arg); - addlenmod(form, LUA_NUMBER_FRMLEN); - nb = l_sprintf(buff, MAX_ITEM, form, (LUAI_UACNUMBER)n); - break; - } - case 'q': { - addliteral(L, &b, arg); - break; - } - case 's': { - size_t l; - const char *s = luaL_tolstring(L, arg, &l); - if (form[2] == '\0') /* no modifiers? */ - luaL_addvalue(&b); /* keep entire string */ - else { - luaL_argcheck(L, l == strlen(s), arg, "string contains zeros"); - if (!strchr(form, '.') && l >= 100) { - /* no precision and string is too long to be formatted */ - luaL_addvalue(&b); /* keep entire string */ - } - else { /* format the string into 'buff' */ - nb = l_sprintf(buff, MAX_ITEM, form, s); - lua_pop(L, 1); /* remove result from 'luaL_tolstring' */ - } - } - break; - } - default: { /* also treat cases 'pnLlh' */ - return luaL_error(L, "invalid option '%%%c' to 'format'", - *(strfrmt - 1)); - } - } - lua_assert(nb < MAX_ITEM); - luaL_addsize(&b, nb); - } - } - luaL_pushresult(&b); - return 1; -} - -/* }====================================================== */ - - -/* -** {====================================================== -** PACK/UNPACK -** ======================================================= -*/ - - -/* value used for padding */ -#if !defined(LUAL_PACKPADBYTE) -#define LUAL_PACKPADBYTE 0x00 -#endif - -/* maximum size for the binary representation of an integer */ -#define MAXINTSIZE 16 - -/* number of bits in a character */ -#define NB CHAR_BIT - -/* mask for one character (NB 1's) */ -#define MC ((1 << NB) - 1) - -/* size of a lua_Integer */ -#define SZINT ((int)sizeof(lua_Integer)) - - -/* dummy union to get native endianness */ -static const union { - int dummy; - char little; /* true iff machine is little endian */ -} nativeendian = {1}; - - -/* dummy structure to get native alignment requirements */ -struct cD { - char c; - union { double d; void *p; lua_Integer i; lua_Number n; } u; -}; - -#define MAXALIGN (offsetof(struct cD, u)) - - -/* -** Union for serializing floats -*/ -typedef union Ftypes { - float f; - double d; - lua_Number n; - char buff[5 * sizeof(lua_Number)]; /* enough for any float type */ -} Ftypes; - - -/* -** information to pack/unpack stuff -*/ -typedef struct Header { - lua_State *L; - int islittle; - int maxalign; -} Header; - - -/* -** options for pack/unpack -*/ -typedef enum KOption { - Kint, /* signed integers */ - Kuint, /* unsigned integers */ - Kfloat, /* floating-point numbers */ - Kchar, /* fixed-length strings */ - Kstring, /* strings with prefixed length */ - Kzstr, /* zero-terminated strings */ - Kpadding, /* padding */ - Kpaddalign, /* padding for alignment */ - Knop /* no-op (configuration or spaces) */ -} KOption; - - -/* -** Read an integer numeral from string 'fmt' or return 'df' if -** there is no numeral -*/ -static int digit (int c) { return '0' <= c && c <= '9'; } - -static int getnum (const char **fmt, int df) { - if (!digit(**fmt)) /* no number? */ - return df; /* return default value */ - else { - int a = 0; - do { - a = a*10 + (*((*fmt)++) - '0'); - } while (digit(**fmt) && a <= ((int)MAXSIZE - 9)/10); - return a; - } -} - - -/* -** Read an integer numeral and raises an error if it is larger -** than the maximum size for integers. -*/ -static int getnumlimit (Header *h, const char **fmt, int df) { - int sz = getnum(fmt, df); - if (sz > MAXINTSIZE || sz <= 0) - return luaL_error(h->L, "integral size (%d) out of limits [1,%d]", - sz, MAXINTSIZE); - return sz; -} - - -/* -** Initialize Header -*/ -static void initheader (lua_State *L, Header *h) { - h->L = L; - h->islittle = nativeendian.little; - h->maxalign = 1; -} - - -/* -** Read and classify next option. 'size' is filled with option's size. -*/ -static KOption getoption (Header *h, const char **fmt, int *size) { - int opt = *((*fmt)++); - *size = 0; /* default */ - switch (opt) { - case 'b': *size = sizeof(char); return Kint; - case 'B': *size = sizeof(char); return Kuint; - case 'h': *size = sizeof(short); return Kint; - case 'H': *size = sizeof(short); return Kuint; - case 'l': *size = sizeof(long); return Kint; - case 'L': *size = sizeof(long); return Kuint; - case 'j': *size = sizeof(lua_Integer); return Kint; - case 'J': *size = sizeof(lua_Integer); return Kuint; - case 'T': *size = sizeof(size_t); return Kuint; - case 'f': *size = sizeof(float); return Kfloat; - case 'd': *size = sizeof(double); return Kfloat; - case 'n': *size = sizeof(lua_Number); return Kfloat; - case 'i': *size = getnumlimit(h, fmt, sizeof(int)); return Kint; - case 'I': *size = getnumlimit(h, fmt, sizeof(int)); return Kuint; - case 's': *size = getnumlimit(h, fmt, sizeof(size_t)); return Kstring; - case 'c': - *size = getnum(fmt, -1); - if (*size == -1) - luaL_error(h->L, "missing size for format option 'c'"); - return Kchar; - case 'z': return Kzstr; - case 'x': *size = 1; return Kpadding; - case 'X': return Kpaddalign; - case ' ': break; - case '<': h->islittle = 1; break; - case '>': h->islittle = 0; break; - case '=': h->islittle = nativeendian.little; break; - case '!': h->maxalign = getnumlimit(h, fmt, MAXALIGN); break; - default: luaL_error(h->L, "invalid format option '%c'", opt); - } - return Knop; -} - - -/* -** Read, classify, and fill other details about the next option. -** 'psize' is filled with option's size, 'notoalign' with its -** alignment requirements. -** Local variable 'size' gets the size to be aligned. (Kpadal option -** always gets its full alignment, other options are limited by -** the maximum alignment ('maxalign'). Kchar option needs no alignment -** despite its size. -*/ -static KOption getdetails (Header *h, size_t totalsize, - const char **fmt, int *psize, int *ntoalign) { - KOption opt = getoption(h, fmt, psize); - int align = *psize; /* usually, alignment follows size */ - if (opt == Kpaddalign) { /* 'X' gets alignment from following option */ - if (**fmt == '\0' || getoption(h, fmt, &align) == Kchar || align == 0) - luaL_argerror(h->L, 1, "invalid next option for option 'X'"); - } - if (align <= 1 || opt == Kchar) /* need no alignment? */ - *ntoalign = 0; - else { - if (align > h->maxalign) /* enforce maximum alignment */ - align = h->maxalign; - if ((align & (align - 1)) != 0) /* is 'align' not a power of 2? */ - luaL_argerror(h->L, 1, "format asks for alignment not power of 2"); - *ntoalign = (align - (int)(totalsize & (align - 1))) & (align - 1); - } - return opt; -} - - -/* -** Pack integer 'n' with 'size' bytes and 'islittle' endianness. -** The final 'if' handles the case when 'size' is larger than -** the size of a Lua integer, correcting the extra sign-extension -** bytes if necessary (by default they would be zeros). -*/ -static void packint (luaL_Buffer *b, lua_Unsigned n, - int islittle, int size, int neg) { - char *buff = luaL_prepbuffsize(b, size); - int i; - buff[islittle ? 0 : size - 1] = (char)(n & MC); /* first byte */ - for (i = 1; i < size; i++) { - n >>= NB; - buff[islittle ? i : size - 1 - i] = (char)(n & MC); - } - if (neg && size > SZINT) { /* negative number need sign extension? */ - for (i = SZINT; i < size; i++) /* correct extra bytes */ - buff[islittle ? i : size - 1 - i] = (char)MC; - } - luaL_addsize(b, size); /* add result to buffer */ -} - - -/* -** Copy 'size' bytes from 'src' to 'dest', correcting endianness if -** given 'islittle' is different from native endianness. -*/ -static void copywithendian (volatile char *dest, volatile const char *src, - int size, int islittle) { - if (islittle == nativeendian.little) { - while (size-- != 0) - *(dest++) = *(src++); - } - else { - dest += size - 1; - while (size-- != 0) - *(dest--) = *(src++); - } -} - - -static int str_pack (lua_State *L) { - luaL_Buffer b; - Header h; - const char *fmt = luaL_checkstring(L, 1); /* format string */ - int arg = 1; /* current argument to pack */ - size_t totalsize = 0; /* accumulate total size of result */ - initheader(L, &h); - lua_pushnil(L); /* mark to separate arguments from string buffer */ - luaL_buffinit(L, &b); - while (*fmt != '\0') { - int size, ntoalign; - KOption opt = getdetails(&h, totalsize, &fmt, &size, &ntoalign); - totalsize += ntoalign + size; - while (ntoalign-- > 0) - luaL_addchar(&b, LUAL_PACKPADBYTE); /* fill alignment */ - arg++; - switch (opt) { - case Kint: { /* signed integers */ - lua_Integer n = luaL_checkinteger(L, arg); - if (size < SZINT) { /* need overflow check? */ - lua_Integer lim = (lua_Integer)1 << ((size * NB) - 1); - luaL_argcheck(L, -lim <= n && n < lim, arg, "integer overflow"); - } - packint(&b, (lua_Unsigned)n, h.islittle, size, (n < 0)); - break; - } - case Kuint: { /* unsigned integers */ - lua_Integer n = luaL_checkinteger(L, arg); - if (size < SZINT) /* need overflow check? */ - luaL_argcheck(L, (lua_Unsigned)n < ((lua_Unsigned)1 << (size * NB)), - arg, "unsigned overflow"); - packint(&b, (lua_Unsigned)n, h.islittle, size, 0); - break; - } - case Kfloat: { /* floating-point options */ - volatile Ftypes u; - char *buff = luaL_prepbuffsize(&b, size); - lua_Number n = luaL_checknumber(L, arg); /* get argument */ - if (size == sizeof(u.f)) u.f = (float)n; /* copy it into 'u' */ - else if (size == sizeof(u.d)) u.d = (double)n; - else u.n = n; - /* move 'u' to final result, correcting endianness if needed */ - copywithendian(buff, u.buff, size, h.islittle); - luaL_addsize(&b, size); - break; - } - case Kchar: { /* fixed-size string */ - size_t len; - const char *s = luaL_checklstring(L, arg, &len); - luaL_argcheck(L, len <= (size_t)size, arg, - "string longer than given size"); - luaL_addlstring(&b, s, len); /* add string */ - while (len++ < (size_t)size) /* pad extra space */ - luaL_addchar(&b, LUAL_PACKPADBYTE); - break; - } - case Kstring: { /* strings with length count */ - size_t len; - const char *s = luaL_checklstring(L, arg, &len); - luaL_argcheck(L, size >= (int)sizeof(size_t) || - len < ((size_t)1 << (size * NB)), - arg, "string length does not fit in given size"); - packint(&b, (lua_Unsigned)len, h.islittle, size, 0); /* pack length */ - luaL_addlstring(&b, s, len); - totalsize += len; - break; - } - case Kzstr: { /* zero-terminated string */ - size_t len; - const char *s = luaL_checklstring(L, arg, &len); - luaL_argcheck(L, strlen(s) == len, arg, "string contains zeros"); - luaL_addlstring(&b, s, len); - luaL_addchar(&b, '\0'); /* add zero at the end */ - totalsize += len + 1; - break; - } - case Kpadding: luaL_addchar(&b, LUAL_PACKPADBYTE); /* FALLTHROUGH */ - case Kpaddalign: case Knop: - arg--; /* undo increment */ - break; - } - } - luaL_pushresult(&b); - return 1; -} - - -static int str_packsize (lua_State *L) { - Header h; - const char *fmt = luaL_checkstring(L, 1); /* format string */ - size_t totalsize = 0; /* accumulate total size of result */ - initheader(L, &h); - while (*fmt != '\0') { - int size, ntoalign; - KOption opt = getdetails(&h, totalsize, &fmt, &size, &ntoalign); - size += ntoalign; /* total space used by option */ - luaL_argcheck(L, totalsize <= MAXSIZE - size, 1, - "format result too large"); - totalsize += size; - switch (opt) { - case Kstring: /* strings with length count */ - case Kzstr: /* zero-terminated string */ - luaL_argerror(L, 1, "variable-length format"); - /* call never return, but to avoid warnings: *//* FALLTHROUGH */ - default: break; - } - } - lua_pushinteger(L, (lua_Integer)totalsize); - return 1; -} - - -/* -** Unpack an integer with 'size' bytes and 'islittle' endianness. -** If size is smaller than the size of a Lua integer and integer -** is signed, must do sign extension (propagating the sign to the -** higher bits); if size is larger than the size of a Lua integer, -** it must check the unread bytes to see whether they do not cause an -** overflow. -*/ -static lua_Integer unpackint (lua_State *L, const char *str, - int islittle, int size, int issigned) { - lua_Unsigned res = 0; - int i; - int limit = (size <= SZINT) ? size : SZINT; - for (i = limit - 1; i >= 0; i--) { - res <<= NB; - res |= (lua_Unsigned)(unsigned char)str[islittle ? i : size - 1 - i]; - } - if (size < SZINT) { /* real size smaller than lua_Integer? */ - if (issigned) { /* needs sign extension? */ - lua_Unsigned mask = (lua_Unsigned)1 << (size*NB - 1); - res = ((res ^ mask) - mask); /* do sign extension */ - } - } - else if (size > SZINT) { /* must check unread bytes */ - int mask = (!issigned || (lua_Integer)res >= 0) ? 0 : MC; - for (i = limit; i < size; i++) { - if ((unsigned char)str[islittle ? i : size - 1 - i] != mask) - luaL_error(L, "%d-byte integer does not fit into Lua Integer", size); - } - } - return (lua_Integer)res; -} - - -static int str_unpack (lua_State *L) { - Header h; - const char *fmt = luaL_checkstring(L, 1); - size_t ld; - const char *data = luaL_checklstring(L, 2, &ld); - size_t pos = (size_t)posrelat(luaL_optinteger(L, 3, 1), ld) - 1; - int n = 0; /* number of results */ - luaL_argcheck(L, pos <= ld, 3, "initial position out of string"); - initheader(L, &h); - while (*fmt != '\0') { - int size, ntoalign; - KOption opt = getdetails(&h, pos, &fmt, &size, &ntoalign); - if ((size_t)ntoalign + size > ~pos || pos + ntoalign + size > ld) - luaL_argerror(L, 2, "data string too short"); - pos += ntoalign; /* skip alignment */ - /* stack space for item + next position */ - luaL_checkstack(L, 2, "too many results"); - n++; - switch (opt) { - case Kint: - case Kuint: { - lua_Integer res = unpackint(L, data + pos, h.islittle, size, - (opt == Kint)); - lua_pushinteger(L, res); - break; - } - case Kfloat: { - volatile Ftypes u; - lua_Number num; - copywithendian(u.buff, data + pos, size, h.islittle); - if (size == sizeof(u.f)) num = (lua_Number)u.f; - else if (size == sizeof(u.d)) num = (lua_Number)u.d; - else num = u.n; - lua_pushnumber(L, num); - break; - } - case Kchar: { - lua_pushlstring(L, data + pos, size); - break; - } - case Kstring: { - size_t len = (size_t)unpackint(L, data + pos, h.islittle, size, 0); - luaL_argcheck(L, pos + len + size <= ld, 2, "data string too short"); - lua_pushlstring(L, data + pos + size, len); - pos += len; /* skip string */ - break; - } - case Kzstr: { - size_t len = (int)strlen(data + pos); - lua_pushlstring(L, data + pos, len); - pos += len + 1; /* skip string plus final '\0' */ - break; - } - case Kpaddalign: case Kpadding: case Knop: - n--; /* undo increment */ - break; - } - pos += size; - } - lua_pushinteger(L, pos + 1); /* next position */ - return n + 1; -} - -/* }====================================================== */ - - -static const luaL_Reg strlib[] = { - {"byte", str_byte}, - {"char", str_char}, - {"dump", str_dump}, - {"find", str_find}, - {"format", str_format}, - {"gmatch", gmatch}, - {"gsub", str_gsub}, - {"len", str_len}, - {"lower", str_lower}, - {"match", str_match}, - {"rep", str_rep}, - {"reverse", str_reverse}, - {"sub", str_sub}, - {"upper", str_upper}, - {"pack", str_pack}, - {"packsize", str_packsize}, - {"unpack", str_unpack}, - {NULL, NULL} -}; - - -static void createmetatable (lua_State *L) { - lua_createtable(L, 0, 1); /* table to be metatable for strings */ - lua_pushliteral(L, ""); /* dummy string */ - lua_pushvalue(L, -2); /* copy table */ - lua_setmetatable(L, -2); /* set table as metatable for strings */ - lua_pop(L, 1); /* pop dummy string */ - lua_pushvalue(L, -2); /* get string library */ - lua_setfield(L, -2, "__index"); /* metatable.__index = string */ - lua_pop(L, 1); /* pop metatable */ -} - - -/* -** Open string library -*/ -LUAMOD_API int luaopen_string (lua_State *L) { - luaL_newlib(L, strlib); - createmetatable(L); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/ltable.c b/build/premake/premake5/contrib/lua/src/ltable.c deleted file mode 100644 index ea4fe7fcb3..0000000000 --- a/build/premake/premake5/contrib/lua/src/ltable.c +++ /dev/null @@ -1,688 +0,0 @@ -/* -** $Id: ltable.c,v 2.118.1.4 2018/06/08 16:22:51 roberto Exp $ -** Lua tables (hash) -** See Copyright Notice in lua.h -*/ - -#define ltable_c -#define LUA_CORE - -#include "lprefix.h" - - -/* -** Implementation of tables (aka arrays, objects, or hash tables). -** Tables keep its elements in two parts: an array part and a hash part. -** Non-negative integer keys are all candidates to be kept in the array -** part. The actual size of the array is the largest 'n' such that -** more than half the slots between 1 and n are in use. -** Hash uses a mix of chained scatter table with Brent's variation. -** A main invariant of these tables is that, if an element is not -** in its main position (i.e. the 'original' position that its hash gives -** to it), then the colliding element is in its own main position. -** Hence even when the load factor reaches 100%, performance remains good. -*/ - -#include -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lgc.h" -#include "lmem.h" -#include "lobject.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "lvm.h" - - -/* -** Maximum size of array part (MAXASIZE) is 2^MAXABITS. MAXABITS is -** the largest integer such that MAXASIZE fits in an unsigned int. -*/ -#define MAXABITS cast_int(sizeof(int) * CHAR_BIT - 1) -#define MAXASIZE (1u << MAXABITS) - -/* -** Maximum size of hash part is 2^MAXHBITS. MAXHBITS is the largest -** integer such that 2^MAXHBITS fits in a signed int. (Note that the -** maximum number of elements in a table, 2^MAXABITS + 2^MAXHBITS, still -** fits comfortably in an unsigned int.) -*/ -#define MAXHBITS (MAXABITS - 1) - - -#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) - -#define hashstr(t,str) hashpow2(t, (str)->hash) -#define hashboolean(t,p) hashpow2(t, p) -#define hashint(t,i) hashpow2(t, i) - - -/* -** for some types, it is better to avoid modulus by power of 2, as -** they tend to have many 2 factors. -*/ -#define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) - - -#define hashpointer(t,p) hashmod(t, point2uint(p)) - - -#define dummynode (&dummynode_) - -static const Node dummynode_ = { - {NILCONSTANT}, /* value */ - {{NILCONSTANT, 0}} /* key */ -}; - - -/* -** Hash for floating-point numbers. -** The main computation should be just -** n = frexp(n, &i); return (n * INT_MAX) + i -** but there are some numerical subtleties. -** In a two-complement representation, INT_MAX does not has an exact -** representation as a float, but INT_MIN does; because the absolute -** value of 'frexp' is smaller than 1 (unless 'n' is inf/NaN), the -** absolute value of the product 'frexp * -INT_MIN' is smaller or equal -** to INT_MAX. Next, the use of 'unsigned int' avoids overflows when -** adding 'i'; the use of '~u' (instead of '-u') avoids problems with -** INT_MIN. -*/ -#if !defined(l_hashfloat) -static int l_hashfloat (lua_Number n) { - int i; - lua_Integer ni; - n = l_mathop(frexp)(n, &i) * -cast_num(INT_MIN); - if (!lua_numbertointeger(n, &ni)) { /* is 'n' inf/-inf/NaN? */ - lua_assert(luai_numisnan(n) || l_mathop(fabs)(n) == cast_num(HUGE_VAL)); - return 0; - } - else { /* normal case */ - unsigned int u = cast(unsigned int, i) + cast(unsigned int, ni); - return cast_int(u <= cast(unsigned int, INT_MAX) ? u : ~u); - } -} -#endif - - -/* -** returns the 'main' position of an element in a table (that is, the index -** of its hash value) -*/ -static Node *mainposition (const Table *t, const TValue *key) { - switch (ttype(key)) { - case LUA_TNUMINT: - return hashint(t, ivalue(key)); - case LUA_TNUMFLT: - return hashmod(t, l_hashfloat(fltvalue(key))); - case LUA_TSHRSTR: - return hashstr(t, tsvalue(key)); - case LUA_TLNGSTR: - return hashpow2(t, luaS_hashlongstr(tsvalue(key))); - case LUA_TBOOLEAN: - return hashboolean(t, bvalue(key)); - case LUA_TLIGHTUSERDATA: - return hashpointer(t, pvalue(key)); - case LUA_TLCF: - return hashpointer(t, fvalue(key)); - default: - lua_assert(!ttisdeadkey(key)); - return hashpointer(t, gcvalue(key)); - } -} - - -/* -** returns the index for 'key' if 'key' is an appropriate key to live in -** the array part of the table, 0 otherwise. -*/ -static unsigned int arrayindex (const TValue *key) { - if (ttisinteger(key)) { - lua_Integer k = ivalue(key); - if (0 < k && (lua_Unsigned)k <= MAXASIZE) - return cast(unsigned int, k); /* 'key' is an appropriate array index */ - } - return 0; /* 'key' did not match some condition */ -} - - -/* -** returns the index of a 'key' for table traversals. First goes all -** elements in the array part, then elements in the hash part. The -** beginning of a traversal is signaled by 0. -*/ -static unsigned int findindex (lua_State *L, Table *t, StkId key) { - unsigned int i; - if (ttisnil(key)) return 0; /* first iteration */ - i = arrayindex(key); - if (i != 0 && i <= t->sizearray) /* is 'key' inside array part? */ - return i; /* yes; that's the index */ - else { - int nx; - Node *n = mainposition(t, key); - for (;;) { /* check whether 'key' is somewhere in the chain */ - /* key may be dead already, but it is ok to use it in 'next' */ - if (luaV_rawequalobj(gkey(n), key) || - (ttisdeadkey(gkey(n)) && iscollectable(key) && - deadvalue(gkey(n)) == gcvalue(key))) { - i = cast_int(n - gnode(t, 0)); /* key index in hash table */ - /* hash elements are numbered after array ones */ - return (i + 1) + t->sizearray; - } - nx = gnext(n); - if (nx == 0) - luaG_runerror(L, "invalid key to 'next'"); /* key not found */ - else n += nx; - } - } -} - - -int luaH_next (lua_State *L, Table *t, StkId key) { - unsigned int i = findindex(L, t, key); /* find original element */ - for (; i < t->sizearray; i++) { /* try first array part */ - if (!ttisnil(&t->array[i])) { /* a non-nil value? */ - setivalue(key, i + 1); - setobj2s(L, key+1, &t->array[i]); - return 1; - } - } - for (i -= t->sizearray; cast_int(i) < sizenode(t); i++) { /* hash part */ - if (!ttisnil(gval(gnode(t, i)))) { /* a non-nil value? */ - setobj2s(L, key, gkey(gnode(t, i))); - setobj2s(L, key+1, gval(gnode(t, i))); - return 1; - } - } - return 0; /* no more elements */ -} - - -/* -** {============================================================= -** Rehash -** ============================================================== -*/ - -/* -** Compute the optimal size for the array part of table 't'. 'nums' is a -** "count array" where 'nums[i]' is the number of integers in the table -** between 2^(i - 1) + 1 and 2^i. 'pna' enters with the total number of -** integer keys in the table and leaves with the number of keys that -** will go to the array part; return the optimal size. -*/ -static unsigned int computesizes (unsigned int nums[], unsigned int *pna) { - int i; - unsigned int twotoi; /* 2^i (candidate for optimal size) */ - unsigned int a = 0; /* number of elements smaller than 2^i */ - unsigned int na = 0; /* number of elements to go to array part */ - unsigned int optimal = 0; /* optimal size for array part */ - /* loop while keys can fill more than half of total size */ - for (i = 0, twotoi = 1; - twotoi > 0 && *pna > twotoi / 2; - i++, twotoi *= 2) { - if (nums[i] > 0) { - a += nums[i]; - if (a > twotoi/2) { /* more than half elements present? */ - optimal = twotoi; /* optimal size (till now) */ - na = a; /* all elements up to 'optimal' will go to array part */ - } - } - } - lua_assert((optimal == 0 || optimal / 2 < na) && na <= optimal); - *pna = na; - return optimal; -} - - -static int countint (const TValue *key, unsigned int *nums) { - unsigned int k = arrayindex(key); - if (k != 0) { /* is 'key' an appropriate array index? */ - nums[luaO_ceillog2(k)]++; /* count as such */ - return 1; - } - else - return 0; -} - - -/* -** Count keys in array part of table 't': Fill 'nums[i]' with -** number of keys that will go into corresponding slice and return -** total number of non-nil keys. -*/ -static unsigned int numusearray (const Table *t, unsigned int *nums) { - int lg; - unsigned int ttlg; /* 2^lg */ - unsigned int ause = 0; /* summation of 'nums' */ - unsigned int i = 1; /* count to traverse all array keys */ - /* traverse each slice */ - for (lg = 0, ttlg = 1; lg <= MAXABITS; lg++, ttlg *= 2) { - unsigned int lc = 0; /* counter */ - unsigned int lim = ttlg; - if (lim > t->sizearray) { - lim = t->sizearray; /* adjust upper limit */ - if (i > lim) - break; /* no more elements to count */ - } - /* count elements in range (2^(lg - 1), 2^lg] */ - for (; i <= lim; i++) { - if (!ttisnil(&t->array[i-1])) - lc++; - } - nums[lg] += lc; - ause += lc; - } - return ause; -} - - -static int numusehash (const Table *t, unsigned int *nums, unsigned int *pna) { - int totaluse = 0; /* total number of elements */ - int ause = 0; /* elements added to 'nums' (can go to array part) */ - int i = sizenode(t); - while (i--) { - Node *n = &t->node[i]; - if (!ttisnil(gval(n))) { - ause += countint(gkey(n), nums); - totaluse++; - } - } - *pna += ause; - return totaluse; -} - - -static void setarrayvector (lua_State *L, Table *t, unsigned int size) { - unsigned int i; - luaM_reallocvector(L, t->array, t->sizearray, size, TValue); - for (i=t->sizearray; iarray[i]); - t->sizearray = size; -} - - -static void setnodevector (lua_State *L, Table *t, unsigned int size) { - if (size == 0) { /* no elements to hash part? */ - t->node = cast(Node *, dummynode); /* use common 'dummynode' */ - t->lsizenode = 0; - t->lastfree = NULL; /* signal that it is using dummy node */ - } - else { - int i; - int lsize = luaO_ceillog2(size); - if (lsize > MAXHBITS) - luaG_runerror(L, "table overflow"); - size = twoto(lsize); - t->node = luaM_newvector(L, size, Node); - for (i = 0; i < (int)size; i++) { - Node *n = gnode(t, i); - gnext(n) = 0; - setnilvalue(wgkey(n)); - setnilvalue(gval(n)); - } - t->lsizenode = cast_byte(lsize); - t->lastfree = gnode(t, size); /* all positions are free */ - } -} - - -typedef struct { - Table *t; - unsigned int nhsize; -} AuxsetnodeT; - - -static void auxsetnode (lua_State *L, void *ud) { - AuxsetnodeT *asn = cast(AuxsetnodeT *, ud); - setnodevector(L, asn->t, asn->nhsize); -} - - -void luaH_resize (lua_State *L, Table *t, unsigned int nasize, - unsigned int nhsize) { - unsigned int i; - int j; - AuxsetnodeT asn; - unsigned int oldasize = t->sizearray; - int oldhsize = allocsizenode(t); - Node *nold = t->node; /* save old hash ... */ - if (nasize > oldasize) /* array part must grow? */ - setarrayvector(L, t, nasize); - /* create new hash part with appropriate size */ - asn.t = t; asn.nhsize = nhsize; - if (luaD_rawrunprotected(L, auxsetnode, &asn) != LUA_OK) { /* mem. error? */ - setarrayvector(L, t, oldasize); /* array back to its original size */ - luaD_throw(L, LUA_ERRMEM); /* rethrow memory error */ - } - if (nasize < oldasize) { /* array part must shrink? */ - t->sizearray = nasize; - /* re-insert elements from vanishing slice */ - for (i=nasize; iarray[i])) - luaH_setint(L, t, i + 1, &t->array[i]); - } - /* shrink array */ - luaM_reallocvector(L, t->array, oldasize, nasize, TValue); - } - /* re-insert elements from hash part */ - for (j = oldhsize - 1; j >= 0; j--) { - Node *old = nold + j; - if (!ttisnil(gval(old))) { - /* doesn't need barrier/invalidate cache, as entry was - already present in the table */ - setobjt2t(L, luaH_set(L, t, gkey(old)), gval(old)); - } - } - if (oldhsize > 0) /* not the dummy node? */ - luaM_freearray(L, nold, cast(size_t, oldhsize)); /* free old hash */ -} - - -void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize) { - int nsize = allocsizenode(t); - luaH_resize(L, t, nasize, nsize); -} - -/* -** nums[i] = number of keys 'k' where 2^(i - 1) < k <= 2^i -*/ -static void rehash (lua_State *L, Table *t, const TValue *ek) { - unsigned int asize; /* optimal size for array part */ - unsigned int na; /* number of keys in the array part */ - unsigned int nums[MAXABITS + 1]; - int i; - int totaluse; - for (i = 0; i <= MAXABITS; i++) nums[i] = 0; /* reset counts */ - na = numusearray(t, nums); /* count keys in array part */ - totaluse = na; /* all those keys are integer keys */ - totaluse += numusehash(t, nums, &na); /* count keys in hash part */ - /* count extra key */ - na += countint(ek, nums); - totaluse++; - /* compute new size for array part */ - asize = computesizes(nums, &na); - /* resize the table to new computed sizes */ - luaH_resize(L, t, asize, totaluse - na); -} - - - -/* -** }============================================================= -*/ - - -Table *luaH_new (lua_State *L) { - GCObject *o = luaC_newobj(L, LUA_TTABLE, sizeof(Table)); - Table *t = gco2t(o); - t->metatable = NULL; - t->flags = cast_byte(~0); - t->array = NULL; - t->sizearray = 0; - setnodevector(L, t, 0); - return t; -} - - -void luaH_free (lua_State *L, Table *t) { - if (!isdummy(t)) - luaM_freearray(L, t->node, cast(size_t, sizenode(t))); - luaM_freearray(L, t->array, t->sizearray); - luaM_free(L, t); -} - - -static Node *getfreepos (Table *t) { - if (!isdummy(t)) { - while (t->lastfree > t->node) { - t->lastfree--; - if (ttisnil(gkey(t->lastfree))) - return t->lastfree; - } - } - return NULL; /* could not find a free place */ -} - - - -/* -** inserts a new key into a hash table; first, check whether key's main -** position is free. If not, check whether colliding node is in its main -** position or not: if it is not, move colliding node to an empty place and -** put new key in its main position; otherwise (colliding node is in its main -** position), new key goes to an empty position. -*/ -TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { - Node *mp; - TValue aux; - if (ttisnil(key)) luaG_runerror(L, "table index is nil"); - else if (ttisfloat(key)) { - lua_Integer k; - if (luaV_tointeger(key, &k, 0)) { /* does index fit in an integer? */ - setivalue(&aux, k); - key = &aux; /* insert it as an integer */ - } - else if (luai_numisnan(fltvalue(key))) - luaG_runerror(L, "table index is NaN"); - } - mp = mainposition(t, key); - if (!ttisnil(gval(mp)) || isdummy(t)) { /* main position is taken? */ - Node *othern; - Node *f = getfreepos(t); /* get a free place */ - if (f == NULL) { /* cannot find a free place? */ - rehash(L, t, key); /* grow table */ - /* whatever called 'newkey' takes care of TM cache */ - return luaH_set(L, t, key); /* insert key into grown table */ - } - lua_assert(!isdummy(t)); - othern = mainposition(t, gkey(mp)); - if (othern != mp) { /* is colliding node out of its main position? */ - /* yes; move colliding node into free position */ - while (othern + gnext(othern) != mp) /* find previous */ - othern += gnext(othern); - gnext(othern) = cast_int(f - othern); /* rechain to point to 'f' */ - *f = *mp; /* copy colliding node into free pos. (mp->next also goes) */ - if (gnext(mp) != 0) { - gnext(f) += cast_int(mp - f); /* correct 'next' */ - gnext(mp) = 0; /* now 'mp' is free */ - } - setnilvalue(gval(mp)); - } - else { /* colliding node is in its own main position */ - /* new node will go into free position */ - if (gnext(mp) != 0) - gnext(f) = cast_int((mp + gnext(mp)) - f); /* chain new position */ - else lua_assert(gnext(f) == 0); - gnext(mp) = cast_int(f - mp); - mp = f; - } - } - setnodekey(L, &mp->i_key, key); - luaC_barrierback(L, t, key); - lua_assert(ttisnil(gval(mp))); - return gval(mp); -} - - -/* -** search function for integers -*/ -const TValue *luaH_getint (Table *t, lua_Integer key) { - /* (1 <= key && key <= t->sizearray) */ - if (l_castS2U(key) - 1 < t->sizearray) - return &t->array[key - 1]; - else { - Node *n = hashint(t, key); - for (;;) { /* check whether 'key' is somewhere in the chain */ - if (ttisinteger(gkey(n)) && ivalue(gkey(n)) == key) - return gval(n); /* that's it */ - else { - int nx = gnext(n); - if (nx == 0) break; - n += nx; - } - } - return luaO_nilobject; - } -} - - -/* -** search function for short strings -*/ -const TValue *luaH_getshortstr (Table *t, TString *key) { - Node *n = hashstr(t, key); - lua_assert(key->tt == LUA_TSHRSTR); - for (;;) { /* check whether 'key' is somewhere in the chain */ - const TValue *k = gkey(n); - if (ttisshrstring(k) && eqshrstr(tsvalue(k), key)) - return gval(n); /* that's it */ - else { - int nx = gnext(n); - if (nx == 0) - return luaO_nilobject; /* not found */ - n += nx; - } - } -} - - -/* -** "Generic" get version. (Not that generic: not valid for integers, -** which may be in array part, nor for floats with integral values.) -*/ -static const TValue *getgeneric (Table *t, const TValue *key) { - Node *n = mainposition(t, key); - for (;;) { /* check whether 'key' is somewhere in the chain */ - if (luaV_rawequalobj(gkey(n), key)) - return gval(n); /* that's it */ - else { - int nx = gnext(n); - if (nx == 0) - return luaO_nilobject; /* not found */ - n += nx; - } - } -} - - -const TValue *luaH_getstr (Table *t, TString *key) { - if (key->tt == LUA_TSHRSTR) - return luaH_getshortstr(t, key); - else { /* for long strings, use generic case */ - TValue ko; - setsvalue(cast(lua_State *, NULL), &ko, key); - return getgeneric(t, &ko); - } -} - - -/* -** main search function -*/ -const TValue *luaH_get (Table *t, const TValue *key) { - switch (ttype(key)) { - case LUA_TSHRSTR: return luaH_getshortstr(t, tsvalue(key)); - case LUA_TNUMINT: return luaH_getint(t, ivalue(key)); - case LUA_TNIL: return luaO_nilobject; - case LUA_TNUMFLT: { - lua_Integer k; - if (luaV_tointeger(key, &k, 0)) /* index is int? */ - return luaH_getint(t, k); /* use specialized version */ - /* else... */ - } /* FALLTHROUGH */ - default: - return getgeneric(t, key); - } -} - - -/* -** beware: when using this function you probably need to check a GC -** barrier and invalidate the TM cache. -*/ -TValue *luaH_set (lua_State *L, Table *t, const TValue *key) { - const TValue *p = luaH_get(t, key); - if (p != luaO_nilobject) - return cast(TValue *, p); - else return luaH_newkey(L, t, key); -} - - -void luaH_setint (lua_State *L, Table *t, lua_Integer key, TValue *value) { - const TValue *p = luaH_getint(t, key); - TValue *cell; - if (p != luaO_nilobject) - cell = cast(TValue *, p); - else { - TValue k; - setivalue(&k, key); - cell = luaH_newkey(L, t, &k); - } - setobj2t(L, cell, value); -} - - -static lua_Unsigned unbound_search (Table *t, lua_Unsigned j) { - lua_Unsigned i = j; /* i is zero or a present index */ - j++; - /* find 'i' and 'j' such that i is present and j is not */ - while (!ttisnil(luaH_getint(t, j))) { - i = j; - if (j > l_castS2U(LUA_MAXINTEGER) / 2) { /* overflow? */ - /* table was built with bad purposes: resort to linear search */ - i = 1; - while (!ttisnil(luaH_getint(t, i))) i++; - return i - 1; - } - j *= 2; - } - /* now do a binary search between them */ - while (j - i > 1) { - lua_Unsigned m = (i+j)/2; - if (ttisnil(luaH_getint(t, m))) j = m; - else i = m; - } - return i; -} - - -/* -** Try to find a boundary in table 't'. A 'boundary' is an integer index -** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil). -*/ -lua_Unsigned luaH_getn (Table *t) { - unsigned int j = t->sizearray; - if (j > 0 && ttisnil(&t->array[j - 1])) { - /* there is a boundary in the array part: (binary) search for it */ - unsigned int i = 0; - while (j - i > 1) { - unsigned int m = (i+j)/2; - if (ttisnil(&t->array[m - 1])) j = m; - else i = m; - } - return i; - } - /* else must find a boundary in hash part */ - else if (isdummy(t)) /* hash part is empty? */ - return j; /* that is easy... */ - else return unbound_search(t, j); -} - - - -#if defined(LUA_DEBUG) - -Node *luaH_mainposition (const Table *t, const TValue *key) { - return mainposition(t, key); -} - -int luaH_isdummy (const Table *t) { return isdummy(t); } - -#endif diff --git a/build/premake/premake5/contrib/lua/src/ltable.h b/build/premake/premake5/contrib/lua/src/ltable.h deleted file mode 100644 index 92db0ac7bf..0000000000 --- a/build/premake/premake5/contrib/lua/src/ltable.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -** $Id: ltable.h,v 2.23.1.2 2018/05/24 19:39:05 roberto Exp $ -** Lua tables (hash) -** See Copyright Notice in lua.h -*/ - -#ifndef ltable_h -#define ltable_h - -#include "lobject.h" - - -#define gnode(t,i) (&(t)->node[i]) -#define gval(n) (&(n)->i_val) -#define gnext(n) ((n)->i_key.nk.next) - - -/* 'const' to avoid wrong writings that can mess up field 'next' */ -#define gkey(n) cast(const TValue*, (&(n)->i_key.tvk)) - -/* -** writable version of 'gkey'; allows updates to individual fields, -** but not to the whole (which has incompatible type) -*/ -#define wgkey(n) (&(n)->i_key.nk) - -#define invalidateTMcache(t) ((t)->flags = 0) - - -/* true when 't' is using 'dummynode' as its hash part */ -#define isdummy(t) ((t)->lastfree == NULL) - - -/* allocated size for hash nodes */ -#define allocsizenode(t) (isdummy(t) ? 0 : sizenode(t)) - - -/* returns the key, given the value of a table entry */ -#define keyfromval(v) \ - (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val)))) - - -LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key); -LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key, - TValue *value); -LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key); -LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); -LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); -LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); -LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); -LUAI_FUNC Table *luaH_new (lua_State *L); -LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize, - unsigned int nhsize); -LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize); -LUAI_FUNC void luaH_free (lua_State *L, Table *t); -LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); -LUAI_FUNC lua_Unsigned luaH_getn (Table *t); - - -#if defined(LUA_DEBUG) -LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); -LUAI_FUNC int luaH_isdummy (const Table *t); -#endif - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/ltablib.c b/build/premake/premake5/contrib/lua/src/ltablib.c deleted file mode 100644 index c5349578ec..0000000000 --- a/build/premake/premake5/contrib/lua/src/ltablib.c +++ /dev/null @@ -1,450 +0,0 @@ -/* -** $Id: ltablib.c,v 1.93.1.1 2017/04/19 17:20:42 roberto Exp $ -** Library for Table Manipulation -** See Copyright Notice in lua.h -*/ - -#define ltablib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - -/* -** Operations that an object must define to mimic a table -** (some functions only need some of them) -*/ -#define TAB_R 1 /* read */ -#define TAB_W 2 /* write */ -#define TAB_L 4 /* length */ -#define TAB_RW (TAB_R | TAB_W) /* read/write */ - - -#define aux_getn(L,n,w) (checktab(L, n, (w) | TAB_L), luaL_len(L, n)) - - -static int checkfield (lua_State *L, const char *key, int n) { - lua_pushstring(L, key); - return (lua_rawget(L, -n) != LUA_TNIL); -} - - -/* -** Check that 'arg' either is a table or can behave like one (that is, -** has a metatable with the required metamethods) -*/ -static void checktab (lua_State *L, int arg, int what) { - if (lua_type(L, arg) != LUA_TTABLE) { /* is it not a table? */ - int n = 1; /* number of elements to pop */ - if (lua_getmetatable(L, arg) && /* must have metatable */ - (!(what & TAB_R) || checkfield(L, "__index", ++n)) && - (!(what & TAB_W) || checkfield(L, "__newindex", ++n)) && - (!(what & TAB_L) || checkfield(L, "__len", ++n))) { - lua_pop(L, n); /* pop metatable and tested metamethods */ - } - else - luaL_checktype(L, arg, LUA_TTABLE); /* force an error */ - } -} - - -#if defined(LUA_COMPAT_MAXN) -static int maxn (lua_State *L) { - lua_Number max = 0; - luaL_checktype(L, 1, LUA_TTABLE); - lua_pushnil(L); /* first key */ - while (lua_next(L, 1)) { - lua_pop(L, 1); /* remove value */ - if (lua_type(L, -1) == LUA_TNUMBER) { - lua_Number v = lua_tonumber(L, -1); - if (v > max) max = v; - } - } - lua_pushnumber(L, max); - return 1; -} -#endif - - -static int tinsert (lua_State *L) { - lua_Integer e = aux_getn(L, 1, TAB_RW) + 1; /* first empty element */ - lua_Integer pos; /* where to insert new element */ - switch (lua_gettop(L)) { - case 2: { /* called with only 2 arguments */ - pos = e; /* insert new element at the end */ - break; - } - case 3: { - lua_Integer i; - pos = luaL_checkinteger(L, 2); /* 2nd argument is the position */ - luaL_argcheck(L, 1 <= pos && pos <= e, 2, "position out of bounds"); - for (i = e; i > pos; i--) { /* move up elements */ - lua_geti(L, 1, i - 1); - lua_seti(L, 1, i); /* t[i] = t[i - 1] */ - } - break; - } - default: { - return luaL_error(L, "wrong number of arguments to 'insert'"); - } - } - lua_seti(L, 1, pos); /* t[pos] = v */ - return 0; -} - - -static int tremove (lua_State *L) { - lua_Integer size = aux_getn(L, 1, TAB_RW); - lua_Integer pos = luaL_optinteger(L, 2, size); - if (pos != size) /* validate 'pos' if given */ - luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, "position out of bounds"); - lua_geti(L, 1, pos); /* result = t[pos] */ - for ( ; pos < size; pos++) { - lua_geti(L, 1, pos + 1); - lua_seti(L, 1, pos); /* t[pos] = t[pos + 1] */ - } - lua_pushnil(L); - lua_seti(L, 1, pos); /* t[pos] = nil */ - return 1; -} - - -/* -** Copy elements (1[f], ..., 1[e]) into (tt[t], tt[t+1], ...). Whenever -** possible, copy in increasing order, which is better for rehashing. -** "possible" means destination after original range, or smaller -** than origin, or copying to another table. -*/ -static int tmove (lua_State *L) { - lua_Integer f = luaL_checkinteger(L, 2); - lua_Integer e = luaL_checkinteger(L, 3); - lua_Integer t = luaL_checkinteger(L, 4); - int tt = !lua_isnoneornil(L, 5) ? 5 : 1; /* destination table */ - checktab(L, 1, TAB_R); - checktab(L, tt, TAB_W); - if (e >= f) { /* otherwise, nothing to move */ - lua_Integer n, i; - luaL_argcheck(L, f > 0 || e < LUA_MAXINTEGER + f, 3, - "too many elements to move"); - n = e - f + 1; /* number of elements to move */ - luaL_argcheck(L, t <= LUA_MAXINTEGER - n + 1, 4, - "destination wrap around"); - if (t > e || t <= f || (tt != 1 && !lua_compare(L, 1, tt, LUA_OPEQ))) { - for (i = 0; i < n; i++) { - lua_geti(L, 1, f + i); - lua_seti(L, tt, t + i); - } - } - else { - for (i = n - 1; i >= 0; i--) { - lua_geti(L, 1, f + i); - lua_seti(L, tt, t + i); - } - } - } - lua_pushvalue(L, tt); /* return destination table */ - return 1; -} - - -static void addfield (lua_State *L, luaL_Buffer *b, lua_Integer i) { - lua_geti(L, 1, i); - if (!lua_isstring(L, -1)) - luaL_error(L, "invalid value (%s) at index %d in table for 'concat'", - luaL_typename(L, -1), i); - luaL_addvalue(b); -} - - -static int tconcat (lua_State *L) { - luaL_Buffer b; - lua_Integer last = aux_getn(L, 1, TAB_R); - size_t lsep; - const char *sep = luaL_optlstring(L, 2, "", &lsep); - lua_Integer i = luaL_optinteger(L, 3, 1); - last = luaL_optinteger(L, 4, last); - luaL_buffinit(L, &b); - for (; i < last; i++) { - addfield(L, &b, i); - luaL_addlstring(&b, sep, lsep); - } - if (i == last) /* add last value (if interval was not empty) */ - addfield(L, &b, i); - luaL_pushresult(&b); - return 1; -} - - -/* -** {====================================================== -** Pack/unpack -** ======================================================= -*/ - -static int pack (lua_State *L) { - int i; - int n = lua_gettop(L); /* number of elements to pack */ - lua_createtable(L, n, 1); /* create result table */ - lua_insert(L, 1); /* put it at index 1 */ - for (i = n; i >= 1; i--) /* assign elements */ - lua_seti(L, 1, i); - lua_pushinteger(L, n); - lua_setfield(L, 1, "n"); /* t.n = number of elements */ - return 1; /* return table */ -} - - -static int unpack (lua_State *L) { - lua_Unsigned n; - lua_Integer i = luaL_optinteger(L, 2, 1); - lua_Integer e = luaL_opt(L, luaL_checkinteger, 3, luaL_len(L, 1)); - if (i > e) return 0; /* empty range */ - n = (lua_Unsigned)e - i; /* number of elements minus 1 (avoid overflows) */ - if (n >= (unsigned int)INT_MAX || !lua_checkstack(L, (int)(++n))) - return luaL_error(L, "too many results to unpack"); - for (; i < e; i++) { /* push arg[i..e - 1] (to avoid overflows) */ - lua_geti(L, 1, i); - } - lua_geti(L, 1, e); /* push last element */ - return (int)n; -} - -/* }====================================================== */ - - - -/* -** {====================================================== -** Quicksort -** (based on 'Algorithms in MODULA-3', Robert Sedgewick; -** Addison-Wesley, 1993.) -** ======================================================= -*/ - - -/* type for array indices */ -typedef unsigned int IdxT; - - -/* -** Produce a "random" 'unsigned int' to randomize pivot choice. This -** macro is used only when 'sort' detects a big imbalance in the result -** of a partition. (If you don't want/need this "randomness", ~0 is a -** good choice.) -*/ -#if !defined(l_randomizePivot) /* { */ - -#include - -/* size of 'e' measured in number of 'unsigned int's */ -#define sof(e) (sizeof(e) / sizeof(unsigned int)) - -/* -** Use 'time' and 'clock' as sources of "randomness". Because we don't -** know the types 'clock_t' and 'time_t', we cannot cast them to -** anything without risking overflows. A safe way to use their values -** is to copy them to an array of a known type and use the array values. -*/ -static unsigned int l_randomizePivot (void) { - clock_t c = clock(); - time_t t = time(NULL); - unsigned int buff[sof(c) + sof(t)]; - unsigned int i, rnd = 0; - memcpy(buff, &c, sof(c) * sizeof(unsigned int)); - memcpy(buff + sof(c), &t, sof(t) * sizeof(unsigned int)); - for (i = 0; i < sof(buff); i++) - rnd += buff[i]; - return rnd; -} - -#endif /* } */ - - -/* arrays larger than 'RANLIMIT' may use randomized pivots */ -#define RANLIMIT 100u - - -static void set2 (lua_State *L, IdxT i, IdxT j) { - lua_seti(L, 1, i); - lua_seti(L, 1, j); -} - - -/* -** Return true iff value at stack index 'a' is less than the value at -** index 'b' (according to the order of the sort). -*/ -static int sort_comp (lua_State *L, int a, int b) { - if (lua_isnil(L, 2)) /* no function? */ - return lua_compare(L, a, b, LUA_OPLT); /* a < b */ - else { /* function */ - int res; - lua_pushvalue(L, 2); /* push function */ - lua_pushvalue(L, a-1); /* -1 to compensate function */ - lua_pushvalue(L, b-2); /* -2 to compensate function and 'a' */ - lua_call(L, 2, 1); /* call function */ - res = lua_toboolean(L, -1); /* get result */ - lua_pop(L, 1); /* pop result */ - return res; - } -} - - -/* -** Does the partition: Pivot P is at the top of the stack. -** precondition: a[lo] <= P == a[up-1] <= a[up], -** so it only needs to do the partition from lo + 1 to up - 2. -** Pos-condition: a[lo .. i - 1] <= a[i] == P <= a[i + 1 .. up] -** returns 'i'. -*/ -static IdxT partition (lua_State *L, IdxT lo, IdxT up) { - IdxT i = lo; /* will be incremented before first use */ - IdxT j = up - 1; /* will be decremented before first use */ - /* loop invariant: a[lo .. i] <= P <= a[j .. up] */ - for (;;) { - /* next loop: repeat ++i while a[i] < P */ - while (lua_geti(L, 1, ++i), sort_comp(L, -1, -2)) { - if (i == up - 1) /* a[i] < P but a[up - 1] == P ?? */ - luaL_error(L, "invalid order function for sorting"); - lua_pop(L, 1); /* remove a[i] */ - } - /* after the loop, a[i] >= P and a[lo .. i - 1] < P */ - /* next loop: repeat --j while P < a[j] */ - while (lua_geti(L, 1, --j), sort_comp(L, -3, -1)) { - if (j < i) /* j < i but a[j] > P ?? */ - luaL_error(L, "invalid order function for sorting"); - lua_pop(L, 1); /* remove a[j] */ - } - /* after the loop, a[j] <= P and a[j + 1 .. up] >= P */ - if (j < i) { /* no elements out of place? */ - /* a[lo .. i - 1] <= P <= a[j + 1 .. i .. up] */ - lua_pop(L, 1); /* pop a[j] */ - /* swap pivot (a[up - 1]) with a[i] to satisfy pos-condition */ - set2(L, up - 1, i); - return i; - } - /* otherwise, swap a[i] - a[j] to restore invariant and repeat */ - set2(L, i, j); - } -} - - -/* -** Choose an element in the middle (2nd-3th quarters) of [lo,up] -** "randomized" by 'rnd' -*/ -static IdxT choosePivot (IdxT lo, IdxT up, unsigned int rnd) { - IdxT r4 = (up - lo) / 4; /* range/4 */ - IdxT p = rnd % (r4 * 2) + (lo + r4); - lua_assert(lo + r4 <= p && p <= up - r4); - return p; -} - - -/* -** QuickSort algorithm (recursive function) -*/ -static void auxsort (lua_State *L, IdxT lo, IdxT up, - unsigned int rnd) { - while (lo < up) { /* loop for tail recursion */ - IdxT p; /* Pivot index */ - IdxT n; /* to be used later */ - /* sort elements 'lo', 'p', and 'up' */ - lua_geti(L, 1, lo); - lua_geti(L, 1, up); - if (sort_comp(L, -1, -2)) /* a[up] < a[lo]? */ - set2(L, lo, up); /* swap a[lo] - a[up] */ - else - lua_pop(L, 2); /* remove both values */ - if (up - lo == 1) /* only 2 elements? */ - return; /* already sorted */ - if (up - lo < RANLIMIT || rnd == 0) /* small interval or no randomize? */ - p = (lo + up)/2; /* middle element is a good pivot */ - else /* for larger intervals, it is worth a random pivot */ - p = choosePivot(lo, up, rnd); - lua_geti(L, 1, p); - lua_geti(L, 1, lo); - if (sort_comp(L, -2, -1)) /* a[p] < a[lo]? */ - set2(L, p, lo); /* swap a[p] - a[lo] */ - else { - lua_pop(L, 1); /* remove a[lo] */ - lua_geti(L, 1, up); - if (sort_comp(L, -1, -2)) /* a[up] < a[p]? */ - set2(L, p, up); /* swap a[up] - a[p] */ - else - lua_pop(L, 2); - } - if (up - lo == 2) /* only 3 elements? */ - return; /* already sorted */ - lua_geti(L, 1, p); /* get middle element (Pivot) */ - lua_pushvalue(L, -1); /* push Pivot */ - lua_geti(L, 1, up - 1); /* push a[up - 1] */ - set2(L, p, up - 1); /* swap Pivot (a[p]) with a[up - 1] */ - p = partition(L, lo, up); - /* a[lo .. p - 1] <= a[p] == P <= a[p + 1 .. up] */ - if (p - lo < up - p) { /* lower interval is smaller? */ - auxsort(L, lo, p - 1, rnd); /* call recursively for lower interval */ - n = p - lo; /* size of smaller interval */ - lo = p + 1; /* tail call for [p + 1 .. up] (upper interval) */ - } - else { - auxsort(L, p + 1, up, rnd); /* call recursively for upper interval */ - n = up - p; /* size of smaller interval */ - up = p - 1; /* tail call for [lo .. p - 1] (lower interval) */ - } - if ((up - lo) / 128 > n) /* partition too imbalanced? */ - rnd = l_randomizePivot(); /* try a new randomization */ - } /* tail call auxsort(L, lo, up, rnd) */ -} - - -static int sort (lua_State *L) { - lua_Integer n = aux_getn(L, 1, TAB_RW); - if (n > 1) { /* non-trivial interval? */ - luaL_argcheck(L, n < INT_MAX, 1, "array too big"); - if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */ - luaL_checktype(L, 2, LUA_TFUNCTION); /* must be a function */ - lua_settop(L, 2); /* make sure there are two arguments */ - auxsort(L, 1, (IdxT)n, 0); - } - return 0; -} - -/* }====================================================== */ - - -static const luaL_Reg tab_funcs[] = { - {"concat", tconcat}, -#if defined(LUA_COMPAT_MAXN) - {"maxn", maxn}, -#endif - {"insert", tinsert}, - {"pack", pack}, - {"unpack", unpack}, - {"remove", tremove}, - {"move", tmove}, - {"sort", sort}, - {NULL, NULL} -}; - - -LUAMOD_API int luaopen_table (lua_State *L) { - luaL_newlib(L, tab_funcs); -#if defined(LUA_COMPAT_UNPACK) - /* _G.unpack = table.unpack */ - lua_getfield(L, -1, "unpack"); - lua_setglobal(L, "unpack"); -#endif - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/ltm.c b/build/premake/premake5/contrib/lua/src/ltm.c deleted file mode 100644 index 0e7c713214..0000000000 --- a/build/premake/premake5/contrib/lua/src/ltm.c +++ /dev/null @@ -1,165 +0,0 @@ -/* -** $Id: ltm.c,v 2.38.1.1 2017/04/19 17:39:34 roberto Exp $ -** Tag methods -** See Copyright Notice in lua.h -*/ - -#define ltm_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lobject.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" -#include "lvm.h" - - -static const char udatatypename[] = "userdata"; - -LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = { - "no value", - "nil", "boolean", udatatypename, "number", - "string", "table", "function", udatatypename, "thread", - "proto" /* this last case is used for tests only */ -}; - - -void luaT_init (lua_State *L) { - static const char *const luaT_eventname[] = { /* ORDER TM */ - "__index", "__newindex", - "__gc", "__mode", "__len", "__eq", - "__add", "__sub", "__mul", "__mod", "__pow", - "__div", "__idiv", - "__band", "__bor", "__bxor", "__shl", "__shr", - "__unm", "__bnot", "__lt", "__le", - "__concat", "__call" - }; - int i; - for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); - luaC_fix(L, obj2gco(G(L)->tmname[i])); /* never collect these names */ - } -} - - -/* -** function to be used with macro "fasttm": optimized for absence of -** tag methods -*/ -const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { - const TValue *tm = luaH_getshortstr(events, ename); - lua_assert(event <= TM_EQ); - if (ttisnil(tm)) { /* no tag method? */ - events->flags |= cast_byte(1u<metatable; - break; - case LUA_TUSERDATA: - mt = uvalue(o)->metatable; - break; - default: - mt = G(L)->mt[ttnov(o)]; - } - return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : luaO_nilobject); -} - - -/* -** Return the name of the type of an object. For tables and userdata -** with metatable, use their '__name' metafield, if present. -*/ -const char *luaT_objtypename (lua_State *L, const TValue *o) { - Table *mt; - if ((ttistable(o) && (mt = hvalue(o)->metatable) != NULL) || - (ttisfulluserdata(o) && (mt = uvalue(o)->metatable) != NULL)) { - const TValue *name = luaH_getshortstr(mt, luaS_new(L, "__name")); - if (ttisstring(name)) /* is '__name' a string? */ - return getstr(tsvalue(name)); /* use it as type name */ - } - return ttypename(ttnov(o)); /* else use standard type name */ -} - - -void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, - const TValue *p2, TValue *p3, int hasres) { - ptrdiff_t result = savestack(L, p3); - StkId func = L->top; - setobj2s(L, func, f); /* push function (assume EXTRA_STACK) */ - setobj2s(L, func + 1, p1); /* 1st argument */ - setobj2s(L, func + 2, p2); /* 2nd argument */ - L->top += 3; - if (!hasres) /* no result? 'p3' is third argument */ - setobj2s(L, L->top++, p3); /* 3rd argument */ - /* metamethod may yield only when called from Lua code */ - if (isLua(L->ci)) - luaD_call(L, func, hasres); - else - luaD_callnoyield(L, func, hasres); - if (hasres) { /* if has result, move it to its place */ - p3 = restorestack(L, result); - setobjs2s(L, p3, --L->top); - } -} - - -int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, - StkId res, TMS event) { - const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ - if (ttisnil(tm)) - tm = luaT_gettmbyobj(L, p2, event); /* try second operand */ - if (ttisnil(tm)) return 0; - luaT_callTM(L, tm, p1, p2, res, 1); - return 1; -} - - -void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, - StkId res, TMS event) { - if (!luaT_callbinTM(L, p1, p2, res, event)) { - switch (event) { - case TM_CONCAT: - luaG_concaterror(L, p1, p2); - /* call never returns, but to avoid warnings: *//* FALLTHROUGH */ - case TM_BAND: case TM_BOR: case TM_BXOR: - case TM_SHL: case TM_SHR: case TM_BNOT: { - lua_Number dummy; - if (tonumber(p1, &dummy) && tonumber(p2, &dummy)) - luaG_tointerror(L, p1, p2); - else - luaG_opinterror(L, p1, p2, "perform bitwise operation on"); - } - /* calls never return, but to avoid warnings: *//* FALLTHROUGH */ - default: - luaG_opinterror(L, p1, p2, "perform arithmetic on"); - } - } -} - - -int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, - TMS event) { - if (!luaT_callbinTM(L, p1, p2, L->top, event)) - return -1; /* no metamethod */ - else - return !l_isfalse(L->top); -} - diff --git a/build/premake/premake5/contrib/lua/src/ltm.h b/build/premake/premake5/contrib/lua/src/ltm.h deleted file mode 100644 index 8170688dae..0000000000 --- a/build/premake/premake5/contrib/lua/src/ltm.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -** $Id: ltm.h,v 2.22.1.1 2017/04/19 17:20:42 roberto Exp $ -** Tag methods -** See Copyright Notice in lua.h -*/ - -#ifndef ltm_h -#define ltm_h - - -#include "lobject.h" - - -/* -* WARNING: if you change the order of this enumeration, -* grep "ORDER TM" and "ORDER OP" -*/ -typedef enum { - TM_INDEX, - TM_NEWINDEX, - TM_GC, - TM_MODE, - TM_LEN, - TM_EQ, /* last tag method with fast access */ - TM_ADD, - TM_SUB, - TM_MUL, - TM_MOD, - TM_POW, - TM_DIV, - TM_IDIV, - TM_BAND, - TM_BOR, - TM_BXOR, - TM_SHL, - TM_SHR, - TM_UNM, - TM_BNOT, - TM_LT, - TM_LE, - TM_CONCAT, - TM_CALL, - TM_N /* number of elements in the enum */ -} TMS; - - - -#define gfasttm(g,et,e) ((et) == NULL ? NULL : \ - ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) - -#define fasttm(l,et,e) gfasttm(G(l), et, e) - -#define ttypename(x) luaT_typenames_[(x) + 1] - -LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; - - -LUAI_FUNC const char *luaT_objtypename (lua_State *L, const TValue *o); - -LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); -LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, - TMS event); -LUAI_FUNC void luaT_init (lua_State *L); - -LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, - const TValue *p2, TValue *p3, int hasres); -LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, - StkId res, TMS event); -LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, - StkId res, TMS event); -LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, - const TValue *p2, TMS event); - - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lua.c b/build/premake/premake5/contrib/lua/src/lua.c deleted file mode 100644 index ca5b298523..0000000000 --- a/build/premake/premake5/contrib/lua/src/lua.c +++ /dev/null @@ -1,612 +0,0 @@ -/* -** $Id: lua.c,v 1.230.1.1 2017/04/19 17:29:57 roberto Exp $ -** Lua stand-alone interpreter -** See Copyright Notice in lua.h -*/ - -#define lua_c - -#include "lprefix.h" - - -#include -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - - - -#if !defined(LUA_PROMPT) -#define LUA_PROMPT "> " -#define LUA_PROMPT2 ">> " -#endif - -#if !defined(LUA_PROGNAME) -#define LUA_PROGNAME "lua" -#endif - -#if !defined(LUA_MAXINPUT) -#define LUA_MAXINPUT 512 -#endif - -#if !defined(LUA_INIT_VAR) -#define LUA_INIT_VAR "LUA_INIT" -#endif - -#define LUA_INITVARVERSION LUA_INIT_VAR LUA_VERSUFFIX - - -/* -** lua_stdin_is_tty detects whether the standard input is a 'tty' (that -** is, whether we're running lua interactively). -*/ -#if !defined(lua_stdin_is_tty) /* { */ - -#if defined(LUA_USE_POSIX) /* { */ - -#include -#define lua_stdin_is_tty() isatty(0) - -#elif defined(LUA_USE_WINDOWS) /* }{ */ - -#include -#include - -#define lua_stdin_is_tty() _isatty(_fileno(stdin)) - -#else /* }{ */ - -/* ISO C definition */ -#define lua_stdin_is_tty() 1 /* assume stdin is a tty */ - -#endif /* } */ - -#endif /* } */ - - -/* -** lua_readline defines how to show a prompt and then read a line from -** the standard input. -** lua_saveline defines how to "save" a read line in a "history". -** lua_freeline defines how to free a line read by lua_readline. -*/ -#if !defined(lua_readline) /* { */ - -#if defined(LUA_USE_READLINE) /* { */ - -#include -#include -#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) -#define lua_saveline(L,line) ((void)L, add_history(line)) -#define lua_freeline(L,b) ((void)L, free(b)) - -#else /* }{ */ - -#define lua_readline(L,b,p) \ - ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ - fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ -#define lua_saveline(L,line) { (void)L; (void)line; } -#define lua_freeline(L,b) { (void)L; (void)b; } - -#endif /* } */ - -#endif /* } */ - - - - -static lua_State *globalL = NULL; - -static const char *progname = LUA_PROGNAME; - - -/* -** Hook set by signal function to stop the interpreter. -*/ -static void lstop (lua_State *L, lua_Debug *ar) { - (void)ar; /* unused arg. */ - lua_sethook(L, NULL, 0, 0); /* reset hook */ - luaL_error(L, "interrupted!"); -} - - -/* -** Function to be called at a C signal. Because a C signal cannot -** just change a Lua state (as there is no proper synchronization), -** this function only sets a hook that, when called, will stop the -** interpreter. -*/ -static void laction (int i) { - signal(i, SIG_DFL); /* if another SIGINT happens, terminate process */ - lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); -} - - -static void print_usage (const char *badoption) { - lua_writestringerror("%s: ", progname); - if (badoption[1] == 'e' || badoption[1] == 'l') - lua_writestringerror("'%s' needs argument\n", badoption); - else - lua_writestringerror("unrecognized option '%s'\n", badoption); - lua_writestringerror( - "usage: %s [options] [script [args]]\n" - "Available options are:\n" - " -e stat execute string 'stat'\n" - " -i enter interactive mode after executing 'script'\n" - " -l name require library 'name' into global 'name'\n" - " -v show version information\n" - " -E ignore environment variables\n" - " -- stop handling options\n" - " - stop handling options and execute stdin\n" - , - progname); -} - - -/* -** Prints an error message, adding the program name in front of it -** (if present) -*/ -static void l_message (const char *pname, const char *msg) { - if (pname) lua_writestringerror("%s: ", pname); - lua_writestringerror("%s\n", msg); -} - - -/* -** Check whether 'status' is not OK and, if so, prints the error -** message on the top of the stack. It assumes that the error object -** is a string, as it was either generated by Lua or by 'msghandler'. -*/ -static int report (lua_State *L, int status) { - if (status != LUA_OK) { - const char *msg = lua_tostring(L, -1); - l_message(progname, msg); - lua_pop(L, 1); /* remove message */ - } - return status; -} - - -/* -** Message handler used to run all chunks -*/ -static int msghandler (lua_State *L) { - const char *msg = lua_tostring(L, 1); - if (msg == NULL) { /* is error object not a string? */ - if (luaL_callmeta(L, 1, "__tostring") && /* does it have a metamethod */ - lua_type(L, -1) == LUA_TSTRING) /* that produces a string? */ - return 1; /* that is the message */ - else - msg = lua_pushfstring(L, "(error object is a %s value)", - luaL_typename(L, 1)); - } - luaL_traceback(L, L, msg, 1); /* append a standard traceback */ - return 1; /* return the traceback */ -} - - -/* -** Interface to 'lua_pcall', which sets appropriate message function -** and C-signal handler. Used to run all chunks. -*/ -static int docall (lua_State *L, int narg, int nres) { - int status; - int base = lua_gettop(L) - narg; /* function index */ - lua_pushcfunction(L, msghandler); /* push message handler */ - lua_insert(L, base); /* put it under function and args */ - globalL = L; /* to be available to 'laction' */ - signal(SIGINT, laction); /* set C-signal handler */ - status = lua_pcall(L, narg, nres, base); - signal(SIGINT, SIG_DFL); /* reset C-signal handler */ - lua_remove(L, base); /* remove message handler from the stack */ - return status; -} - - -static void print_version (void) { - lua_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT)); - lua_writeline(); -} - - -/* -** Create the 'arg' table, which stores all arguments from the -** command line ('argv'). It should be aligned so that, at index 0, -** it has 'argv[script]', which is the script name. The arguments -** to the script (everything after 'script') go to positive indices; -** other arguments (before the script name) go to negative indices. -** If there is no script name, assume interpreter's name as base. -*/ -static void createargtable (lua_State *L, char **argv, int argc, int script) { - int i, narg; - if (script == argc) script = 0; /* no script name? */ - narg = argc - (script + 1); /* number of positive indices */ - lua_createtable(L, narg, script + 1); - for (i = 0; i < argc; i++) { - lua_pushstring(L, argv[i]); - lua_rawseti(L, -2, i - script); - } - lua_setglobal(L, "arg"); -} - - -static int dochunk (lua_State *L, int status) { - if (status == LUA_OK) status = docall(L, 0, 0); - return report(L, status); -} - - -static int dofile (lua_State *L, const char *name) { - return dochunk(L, luaL_loadfile(L, name)); -} - - -static int dostring (lua_State *L, const char *s, const char *name) { - return dochunk(L, luaL_loadbuffer(L, s, strlen(s), name)); -} - - -/* -** Calls 'require(name)' and stores the result in a global variable -** with the given name. -*/ -static int dolibrary (lua_State *L, const char *name) { - int status; - lua_getglobal(L, "require"); - lua_pushstring(L, name); - status = docall(L, 1, 1); /* call 'require(name)' */ - if (status == LUA_OK) - lua_setglobal(L, name); /* global[name] = require return */ - return report(L, status); -} - - -/* -** Returns the string to be used as a prompt by the interpreter. -*/ -static const char *get_prompt (lua_State *L, int firstline) { - const char *p; - lua_getglobal(L, firstline ? "_PROMPT" : "_PROMPT2"); - p = lua_tostring(L, -1); - if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); - return p; -} - -/* mark in error messages for incomplete statements */ -#define EOFMARK "" -#define marklen (sizeof(EOFMARK)/sizeof(char) - 1) - - -/* -** Check whether 'status' signals a syntax error and the error -** message at the top of the stack ends with the above mark for -** incomplete statements. -*/ -static int incomplete (lua_State *L, int status) { - if (status == LUA_ERRSYNTAX) { - size_t lmsg; - const char *msg = lua_tolstring(L, -1, &lmsg); - if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { - lua_pop(L, 1); - return 1; - } - } - return 0; /* else... */ -} - - -/* -** Prompt the user, read a line, and push it into the Lua stack. -*/ -static int pushline (lua_State *L, int firstline) { - char buffer[LUA_MAXINPUT]; - char *b = buffer; - size_t l; - const char *prmt = get_prompt(L, firstline); - int readstatus = lua_readline(L, b, prmt); - if (readstatus == 0) - return 0; /* no input (prompt will be popped by caller) */ - lua_pop(L, 1); /* remove prompt */ - l = strlen(b); - if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ - b[--l] = '\0'; /* remove it */ - if (firstline && b[0] == '=') /* for compatibility with 5.2, ... */ - lua_pushfstring(L, "return %s", b + 1); /* change '=' to 'return' */ - else - lua_pushlstring(L, b, l); - lua_freeline(L, b); - return 1; -} - - -/* -** Try to compile line on the stack as 'return ;'; on return, stack -** has either compiled chunk or original line (if compilation failed). -*/ -static int addreturn (lua_State *L) { - const char *line = lua_tostring(L, -1); /* original line */ - const char *retline = lua_pushfstring(L, "return %s;", line); - int status = luaL_loadbuffer(L, retline, strlen(retline), "=stdin"); - if (status == LUA_OK) { - lua_remove(L, -2); /* remove modified line */ - if (line[0] != '\0') /* non empty? */ - lua_saveline(L, line); /* keep history */ - } - else - lua_pop(L, 2); /* pop result from 'luaL_loadbuffer' and modified line */ - return status; -} - - -/* -** Read multiple lines until a complete Lua statement -*/ -static int multiline (lua_State *L) { - for (;;) { /* repeat until gets a complete statement */ - size_t len; - const char *line = lua_tolstring(L, 1, &len); /* get what it has */ - int status = luaL_loadbuffer(L, line, len, "=stdin"); /* try it */ - if (!incomplete(L, status) || !pushline(L, 0)) { - lua_saveline(L, line); /* keep history */ - return status; /* cannot or should not try to add continuation line */ - } - lua_pushliteral(L, "\n"); /* add newline... */ - lua_insert(L, -2); /* ...between the two lines */ - lua_concat(L, 3); /* join them */ - } -} - - -/* -** Read a line and try to load (compile) it first as an expression (by -** adding "return " in front of it) and second as a statement. Return -** the final status of load/call with the resulting function (if any) -** in the top of the stack. -*/ -static int loadline (lua_State *L) { - int status; - lua_settop(L, 0); - if (!pushline(L, 1)) - return -1; /* no input */ - if ((status = addreturn(L)) != LUA_OK) /* 'return ...' did not work? */ - status = multiline(L); /* try as command, maybe with continuation lines */ - lua_remove(L, 1); /* remove line from the stack */ - lua_assert(lua_gettop(L) == 1); - return status; -} - - -/* -** Prints (calling the Lua 'print' function) any values on the stack -*/ -static void l_print (lua_State *L) { - int n = lua_gettop(L); - if (n > 0) { /* any result to be printed? */ - luaL_checkstack(L, LUA_MINSTACK, "too many results to print"); - lua_getglobal(L, "print"); - lua_insert(L, 1); - if (lua_pcall(L, n, 0, 0) != LUA_OK) - l_message(progname, lua_pushfstring(L, "error calling 'print' (%s)", - lua_tostring(L, -1))); - } -} - - -/* -** Do the REPL: repeatedly read (load) a line, evaluate (call) it, and -** print any results. -*/ -static void doREPL (lua_State *L) { - int status; - const char *oldprogname = progname; - progname = NULL; /* no 'progname' on errors in interactive mode */ - while ((status = loadline(L)) != -1) { - if (status == LUA_OK) - status = docall(L, 0, LUA_MULTRET); - if (status == LUA_OK) l_print(L); - else report(L, status); - } - lua_settop(L, 0); /* clear stack */ - lua_writeline(); - progname = oldprogname; -} - - -/* -** Push on the stack the contents of table 'arg' from 1 to #arg -*/ -static int pushargs (lua_State *L) { - int i, n; - if (lua_getglobal(L, "arg") != LUA_TTABLE) - luaL_error(L, "'arg' is not a table"); - n = (int)luaL_len(L, -1); - luaL_checkstack(L, n + 3, "too many arguments to script"); - for (i = 1; i <= n; i++) - lua_rawgeti(L, -i, i); - lua_remove(L, -i); /* remove table from the stack */ - return n; -} - - -static int handle_script (lua_State *L, char **argv) { - int status; - const char *fname = argv[0]; - if (strcmp(fname, "-") == 0 && strcmp(argv[-1], "--") != 0) - fname = NULL; /* stdin */ - status = luaL_loadfile(L, fname); - if (status == LUA_OK) { - int n = pushargs(L); /* push arguments to script */ - status = docall(L, n, LUA_MULTRET); - } - return report(L, status); -} - - - -/* bits of various argument indicators in 'args' */ -#define has_error 1 /* bad option */ -#define has_i 2 /* -i */ -#define has_v 4 /* -v */ -#define has_e 8 /* -e */ -#define has_E 16 /* -E */ - -/* -** Traverses all arguments from 'argv', returning a mask with those -** needed before running any Lua code (or an error code if it finds -** any invalid argument). 'first' returns the first not-handled argument -** (either the script name or a bad argument in case of error). -*/ -static int collectargs (char **argv, int *first) { - int args = 0; - int i; - for (i = 1; argv[i] != NULL; i++) { - *first = i; - if (argv[i][0] != '-') /* not an option? */ - return args; /* stop handling options */ - switch (argv[i][1]) { /* else check option */ - case '-': /* '--' */ - if (argv[i][2] != '\0') /* extra characters after '--'? */ - return has_error; /* invalid option */ - *first = i + 1; - return args; - case '\0': /* '-' */ - return args; /* script "name" is '-' */ - case 'E': - if (argv[i][2] != '\0') /* extra characters after 1st? */ - return has_error; /* invalid option */ - args |= has_E; - break; - case 'i': - args |= has_i; /* (-i implies -v) *//* FALLTHROUGH */ - case 'v': - if (argv[i][2] != '\0') /* extra characters after 1st? */ - return has_error; /* invalid option */ - args |= has_v; - break; - case 'e': - args |= has_e; /* FALLTHROUGH */ - case 'l': /* both options need an argument */ - if (argv[i][2] == '\0') { /* no concatenated argument? */ - i++; /* try next 'argv' */ - if (argv[i] == NULL || argv[i][0] == '-') - return has_error; /* no next argument or it is another option */ - } - break; - default: /* invalid option */ - return has_error; - } - } - *first = i; /* no script name */ - return args; -} - - -/* -** Processes options 'e' and 'l', which involve running Lua code. -** Returns 0 if some code raises an error. -*/ -static int runargs (lua_State *L, char **argv, int n) { - int i; - for (i = 1; i < n; i++) { - int option = argv[i][1]; - lua_assert(argv[i][0] == '-'); /* already checked */ - if (option == 'e' || option == 'l') { - int status; - const char *extra = argv[i] + 2; /* both options need an argument */ - if (*extra == '\0') extra = argv[++i]; - lua_assert(extra != NULL); - status = (option == 'e') - ? dostring(L, extra, "=(command line)") - : dolibrary(L, extra); - if (status != LUA_OK) return 0; - } - } - return 1; -} - - - -static int handle_luainit (lua_State *L) { - const char *name = "=" LUA_INITVARVERSION; - const char *init = getenv(name + 1); - if (init == NULL) { - name = "=" LUA_INIT_VAR; - init = getenv(name + 1); /* try alternative name */ - } - if (init == NULL) return LUA_OK; - else if (init[0] == '@') - return dofile(L, init+1); - else - return dostring(L, init, name); -} - - -/* -** Main body of stand-alone interpreter (to be called in protected mode). -** Reads the options and handles them all. -*/ -static int pmain (lua_State *L) { - int argc = (int)lua_tointeger(L, 1); - char **argv = (char **)lua_touserdata(L, 2); - int script; - int args = collectargs(argv, &script); - luaL_checkversion(L); /* check that interpreter has correct version */ - if (argv[0] && argv[0][0]) progname = argv[0]; - if (args == has_error) { /* bad arg? */ - print_usage(argv[script]); /* 'script' has index of bad arg. */ - return 0; - } - if (args & has_v) /* option '-v'? */ - print_version(); - if (args & has_E) { /* option '-E'? */ - lua_pushboolean(L, 1); /* signal for libraries to ignore env. vars. */ - lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); - } - luaL_openlibs(L); /* open standard libraries */ - createargtable(L, argv, argc, script); /* create table 'arg' */ - if (!(args & has_E)) { /* no option '-E'? */ - if (handle_luainit(L) != LUA_OK) /* run LUA_INIT */ - return 0; /* error running LUA_INIT */ - } - if (!runargs(L, argv, script)) /* execute arguments -e and -l */ - return 0; /* something failed */ - if (script < argc && /* execute main script (if there is one) */ - handle_script(L, argv + script) != LUA_OK) - return 0; - if (args & has_i) /* -i option? */ - doREPL(L); /* do read-eval-print loop */ - else if (script == argc && !(args & (has_e | has_v))) { /* no arguments? */ - if (lua_stdin_is_tty()) { /* running in interactive mode? */ - print_version(); - doREPL(L); /* do read-eval-print loop */ - } - else dofile(L, NULL); /* executes stdin as a file */ - } - lua_pushboolean(L, 1); /* signal no errors */ - return 1; -} - - -int main (int argc, char **argv) { - int status, result; - lua_State *L = luaL_newstate(); /* create state */ - if (L == NULL) { - l_message(argv[0], "cannot create state: not enough memory"); - return EXIT_FAILURE; - } - lua_pushcfunction(L, &pmain); /* to call 'pmain' in protected mode */ - lua_pushinteger(L, argc); /* 1st argument */ - lua_pushlightuserdata(L, argv); /* 2nd argument */ - status = lua_pcall(L, 2, 1, 0); /* do the call */ - result = lua_toboolean(L, -1); /* get result */ - report(L, status); - lua_close(L); - return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE; -} - diff --git a/build/premake/premake5/contrib/lua/src/lua.h b/build/premake/premake5/contrib/lua/src/lua.h deleted file mode 100644 index c236e36095..0000000000 --- a/build/premake/premake5/contrib/lua/src/lua.h +++ /dev/null @@ -1,486 +0,0 @@ -/* -** $Id: lua.h,v 1.332.1.2 2018/06/13 16:58:17 roberto Exp $ -** Lua - A Scripting Language -** Lua.org, PUC-Rio, Brazil (http://www.lua.org) -** See Copyright Notice at the end of this file -*/ - - -#ifndef lua_h -#define lua_h - -#include -#include - - -#include "luaconf.h" - - -#define LUA_VERSION_MAJOR "5" -#define LUA_VERSION_MINOR "3" -#define LUA_VERSION_NUM 503 -#define LUA_VERSION_RELEASE "5" - -#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR -#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE -#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2018 Lua.org, PUC-Rio" -#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" - - -/* mark for precompiled code ('Lua') */ -#define LUA_SIGNATURE "\x1bLua" - -/* option for multiple returns in 'lua_pcall' and 'lua_call' */ -#define LUA_MULTRET (-1) - - -/* -** Pseudo-indices -** (-LUAI_MAXSTACK is the minimum valid index; we keep some free empty -** space after that to help overflow detection) -*/ -#define LUA_REGISTRYINDEX (-LUAI_MAXSTACK - 1000) -#define lua_upvalueindex(i) (LUA_REGISTRYINDEX - (i)) - - -/* thread status */ -#define LUA_OK 0 -#define LUA_YIELD 1 -#define LUA_ERRRUN 2 -#define LUA_ERRSYNTAX 3 -#define LUA_ERRMEM 4 -#define LUA_ERRGCMM 5 -#define LUA_ERRERR 6 - - -typedef struct lua_State lua_State; - - -/* -** basic types -*/ -#define LUA_TNONE (-1) - -#define LUA_TNIL 0 -#define LUA_TBOOLEAN 1 -#define LUA_TLIGHTUSERDATA 2 -#define LUA_TNUMBER 3 -#define LUA_TSTRING 4 -#define LUA_TTABLE 5 -#define LUA_TFUNCTION 6 -#define LUA_TUSERDATA 7 -#define LUA_TTHREAD 8 - -#define LUA_NUMTAGS 9 - - - -/* minimum Lua stack available to a C function */ -#define LUA_MINSTACK 20 - - -/* predefined values in the registry */ -#define LUA_RIDX_MAINTHREAD 1 -#define LUA_RIDX_GLOBALS 2 -#define LUA_RIDX_LAST LUA_RIDX_GLOBALS - - -/* type of numbers in Lua */ -typedef LUA_NUMBER lua_Number; - - -/* type for integer functions */ -typedef LUA_INTEGER lua_Integer; - -/* unsigned integer type */ -typedef LUA_UNSIGNED lua_Unsigned; - -/* type for continuation-function contexts */ -typedef LUA_KCONTEXT lua_KContext; - - -/* -** Type for C functions registered with Lua -*/ -typedef int (*lua_CFunction) (lua_State *L); - -/* -** Type for continuation functions -*/ -typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx); - - -/* -** Type for functions that read/write blocks when loading/dumping Lua chunks -*/ -typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); - -typedef int (*lua_Writer) (lua_State *L, const void *p, size_t sz, void *ud); - - -/* -** Type for memory-allocation functions -*/ -typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); - - - -/* -** generic extra include file -*/ -#if defined(LUA_USER_H) -#include LUA_USER_H -#endif - - -/* -** RCS ident string -*/ -extern const char lua_ident[]; - - -/* -** state manipulation -*/ -LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); -LUA_API void (lua_close) (lua_State *L); -LUA_API lua_State *(lua_newthread) (lua_State *L); - -LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); - - -LUA_API const lua_Number *(lua_version) (lua_State *L); - - -/* -** basic stack manipulation -*/ -LUA_API int (lua_absindex) (lua_State *L, int idx); -LUA_API int (lua_gettop) (lua_State *L); -LUA_API void (lua_settop) (lua_State *L, int idx); -LUA_API void (lua_pushvalue) (lua_State *L, int idx); -LUA_API void (lua_rotate) (lua_State *L, int idx, int n); -LUA_API void (lua_copy) (lua_State *L, int fromidx, int toidx); -LUA_API int (lua_checkstack) (lua_State *L, int n); - -LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); - - -/* -** access functions (stack -> C) -*/ - -LUA_API int (lua_isnumber) (lua_State *L, int idx); -LUA_API int (lua_isstring) (lua_State *L, int idx); -LUA_API int (lua_iscfunction) (lua_State *L, int idx); -LUA_API int (lua_isinteger) (lua_State *L, int idx); -LUA_API int (lua_isuserdata) (lua_State *L, int idx); -LUA_API int (lua_type) (lua_State *L, int idx); -LUA_API const char *(lua_typename) (lua_State *L, int tp); - -LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); -LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); -LUA_API int (lua_toboolean) (lua_State *L, int idx); -LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); -LUA_API size_t (lua_rawlen) (lua_State *L, int idx); -LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); -LUA_API void *(lua_touserdata) (lua_State *L, int idx); -LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); -LUA_API const void *(lua_topointer) (lua_State *L, int idx); - - -/* -** Comparison and arithmetic functions -*/ - -#define LUA_OPADD 0 /* ORDER TM, ORDER OP */ -#define LUA_OPSUB 1 -#define LUA_OPMUL 2 -#define LUA_OPMOD 3 -#define LUA_OPPOW 4 -#define LUA_OPDIV 5 -#define LUA_OPIDIV 6 -#define LUA_OPBAND 7 -#define LUA_OPBOR 8 -#define LUA_OPBXOR 9 -#define LUA_OPSHL 10 -#define LUA_OPSHR 11 -#define LUA_OPUNM 12 -#define LUA_OPBNOT 13 - -LUA_API void (lua_arith) (lua_State *L, int op); - -#define LUA_OPEQ 0 -#define LUA_OPLT 1 -#define LUA_OPLE 2 - -LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); -LUA_API int (lua_compare) (lua_State *L, int idx1, int idx2, int op); - - -/* -** push functions (C -> stack) -*/ -LUA_API void (lua_pushnil) (lua_State *L); -LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); -LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); -LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t len); -LUA_API const char *(lua_pushstring) (lua_State *L, const char *s); -LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, - va_list argp); -LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); -LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); -LUA_API void (lua_pushboolean) (lua_State *L, int b); -LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); -LUA_API int (lua_pushthread) (lua_State *L); - - -/* -** get functions (Lua -> stack) -*/ -LUA_API int (lua_getglobal) (lua_State *L, const char *name); -LUA_API int (lua_gettable) (lua_State *L, int idx); -LUA_API int (lua_getfield) (lua_State *L, int idx, const char *k); -LUA_API int (lua_geti) (lua_State *L, int idx, lua_Integer n); -LUA_API int (lua_rawget) (lua_State *L, int idx); -LUA_API int (lua_rawgeti) (lua_State *L, int idx, lua_Integer n); -LUA_API int (lua_rawgetp) (lua_State *L, int idx, const void *p); - -LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); -LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); -LUA_API int (lua_getmetatable) (lua_State *L, int objindex); -LUA_API int (lua_getuservalue) (lua_State *L, int idx); - - -/* -** set functions (stack -> Lua) -*/ -LUA_API void (lua_setglobal) (lua_State *L, const char *name); -LUA_API void (lua_settable) (lua_State *L, int idx); -LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); -LUA_API void (lua_seti) (lua_State *L, int idx, lua_Integer n); -LUA_API void (lua_rawset) (lua_State *L, int idx); -LUA_API void (lua_rawseti) (lua_State *L, int idx, lua_Integer n); -LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p); -LUA_API int (lua_setmetatable) (lua_State *L, int objindex); -LUA_API void (lua_setuservalue) (lua_State *L, int idx); - - -/* -** 'load' and 'call' functions (load and run Lua code) -*/ -LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, - lua_KContext ctx, lua_KFunction k); -#define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL) - -LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc, - lua_KContext ctx, lua_KFunction k); -#define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL) - -LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, - const char *chunkname, const char *mode); - -LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data, int strip); - - -/* -** coroutine functions -*/ -LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_KContext ctx, - lua_KFunction k); -LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg); -LUA_API int (lua_status) (lua_State *L); -LUA_API int (lua_isyieldable) (lua_State *L); - -#define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) - - -/* -** garbage-collection function and options -*/ - -#define LUA_GCSTOP 0 -#define LUA_GCRESTART 1 -#define LUA_GCCOLLECT 2 -#define LUA_GCCOUNT 3 -#define LUA_GCCOUNTB 4 -#define LUA_GCSTEP 5 -#define LUA_GCSETPAUSE 6 -#define LUA_GCSETSTEPMUL 7 -#define LUA_GCISRUNNING 9 - -LUA_API int (lua_gc) (lua_State *L, int what, int data); - - -/* -** miscellaneous functions -*/ - -LUA_API int (lua_error) (lua_State *L); - -LUA_API int (lua_next) (lua_State *L, int idx); - -LUA_API void (lua_concat) (lua_State *L, int n); -LUA_API void (lua_len) (lua_State *L, int idx); - -LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s); - -LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); -LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); - - - -/* -** {============================================================== -** some useful macros -** =============================================================== -*/ - -#define lua_getextraspace(L) ((void *)((char *)(L) - LUA_EXTRASPACE)) - -#define lua_tonumber(L,i) lua_tonumberx(L,(i),NULL) -#define lua_tointeger(L,i) lua_tointegerx(L,(i),NULL) - -#define lua_pop(L,n) lua_settop(L, -(n)-1) - -#define lua_newtable(L) lua_createtable(L, 0, 0) - -#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) - -#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) - -#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) -#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) -#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) -#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) -#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) -#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) -#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) -#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) - -#define lua_pushliteral(L, s) lua_pushstring(L, "" s) - -#define lua_pushglobaltable(L) \ - ((void)lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS)) - -#define lua_tostring(L,i) lua_tolstring(L, (i), NULL) - - -#define lua_insert(L,idx) lua_rotate(L, (idx), 1) - -#define lua_remove(L,idx) (lua_rotate(L, (idx), -1), lua_pop(L, 1)) - -#define lua_replace(L,idx) (lua_copy(L, -1, (idx)), lua_pop(L, 1)) - -/* }============================================================== */ - - -/* -** {============================================================== -** compatibility macros for unsigned conversions -** =============================================================== -*/ -#if defined(LUA_COMPAT_APIINTCASTS) - -#define lua_pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n)) -#define lua_tounsignedx(L,i,is) ((lua_Unsigned)lua_tointegerx(L,i,is)) -#define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL) - -#endif -/* }============================================================== */ - -/* -** {====================================================================== -** Debug API -** ======================================================================= -*/ - - -/* -** Event codes -*/ -#define LUA_HOOKCALL 0 -#define LUA_HOOKRET 1 -#define LUA_HOOKLINE 2 -#define LUA_HOOKCOUNT 3 -#define LUA_HOOKTAILCALL 4 - - -/* -** Event masks -*/ -#define LUA_MASKCALL (1 << LUA_HOOKCALL) -#define LUA_MASKRET (1 << LUA_HOOKRET) -#define LUA_MASKLINE (1 << LUA_HOOKLINE) -#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) - -typedef struct lua_Debug lua_Debug; /* activation record */ - - -/* Functions to be called by the debugger in specific events */ -typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); - - -LUA_API int (lua_getstack) (lua_State *L, int level, lua_Debug *ar); -LUA_API int (lua_getinfo) (lua_State *L, const char *what, lua_Debug *ar); -LUA_API const char *(lua_getlocal) (lua_State *L, const lua_Debug *ar, int n); -LUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n); -LUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n); -LUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n); - -LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n); -LUA_API void (lua_upvaluejoin) (lua_State *L, int fidx1, int n1, - int fidx2, int n2); - -LUA_API void (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count); -LUA_API lua_Hook (lua_gethook) (lua_State *L); -LUA_API int (lua_gethookmask) (lua_State *L); -LUA_API int (lua_gethookcount) (lua_State *L); - - -struct lua_Debug { - int event; - const char *name; /* (n) */ - const char *namewhat; /* (n) 'global', 'local', 'field', 'method' */ - const char *what; /* (S) 'Lua', 'C', 'main', 'tail' */ - const char *source; /* (S) */ - int currentline; /* (l) */ - int linedefined; /* (S) */ - int lastlinedefined; /* (S) */ - unsigned char nups; /* (u) number of upvalues */ - unsigned char nparams;/* (u) number of parameters */ - char isvararg; /* (u) */ - char istailcall; /* (t) */ - char short_src[LUA_IDSIZE]; /* (S) */ - /* private part */ - struct CallInfo *i_ci; /* active function */ -}; - -/* }====================================================================== */ - - -/****************************************************************************** -* Copyright (C) 1994-2018 Lua.org, PUC-Rio. -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files (the -* "Software"), to deal in the Software without restriction, including -* without limitation the rights to use, copy, modify, merge, publish, -* distribute, sublicense, and/or sell copies of the Software, and to -* permit persons to whom the Software is furnished to do so, subject to -* the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lua.hpp b/build/premake/premake5/contrib/lua/src/lua.hpp deleted file mode 100644 index ec417f5946..0000000000 --- a/build/premake/premake5/contrib/lua/src/lua.hpp +++ /dev/null @@ -1,9 +0,0 @@ -// lua.hpp -// Lua header files for C++ -// <> not supplied automatically because Lua also compiles as C++ - -extern "C" { -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" -} diff --git a/build/premake/premake5/contrib/lua/src/luac.c b/build/premake/premake5/contrib/lua/src/luac.c deleted file mode 100644 index 549ad39500..0000000000 --- a/build/premake/premake5/contrib/lua/src/luac.c +++ /dev/null @@ -1,450 +0,0 @@ -/* -** $Id: luac.c,v 1.76 2018/06/19 01:32:02 lhf Exp $ -** Lua compiler (saves bytecodes to files; also lists bytecodes) -** See Copyright Notice in lua.h -*/ - -#define luac_c -#define LUA_CORE - -#include "lprefix.h" - -#include -#include -#include -#include -#include - -#include "lua.h" -#include "lauxlib.h" - -#include "lobject.h" -#include "lstate.h" -#include "lundump.h" - -static void PrintFunction(const Proto* f, int full); -#define luaU_print PrintFunction - -#define PROGNAME "luac" /* default program name */ -#define OUTPUT PROGNAME ".out" /* default output file */ - -static int listing=0; /* list bytecodes? */ -static int dumping=1; /* dump bytecodes? */ -static int stripping=0; /* strip debug information? */ -static char Output[]={ OUTPUT }; /* default output file name */ -static const char* output=Output; /* actual output file name */ -static const char* progname=PROGNAME; /* actual program name */ - -static void fatal(const char* message) -{ - fprintf(stderr,"%s: %s\n",progname,message); - exit(EXIT_FAILURE); -} - -static void cannot(const char* what) -{ - fprintf(stderr,"%s: cannot %s %s: %s\n",progname,what,output,strerror(errno)); - exit(EXIT_FAILURE); -} - -static void usage(const char* message) -{ - if (*message=='-') - fprintf(stderr,"%s: unrecognized option '%s'\n",progname,message); - else - fprintf(stderr,"%s: %s\n",progname,message); - fprintf(stderr, - "usage: %s [options] [filenames]\n" - "Available options are:\n" - " -l list (use -l -l for full listing)\n" - " -o name output to file 'name' (default is \"%s\")\n" - " -p parse only\n" - " -s strip debug information\n" - " -v show version information\n" - " -- stop handling options\n" - " - stop handling options and process stdin\n" - ,progname,Output); - exit(EXIT_FAILURE); -} - -#define IS(s) (strcmp(argv[i],s)==0) - -static int doargs(int argc, char* argv[]) -{ - int i; - int version=0; - if (argv[0]!=NULL && *argv[0]!=0) progname=argv[0]; - for (i=1; itop+(i)) - -static const Proto* combine(lua_State* L, int n) -{ - if (n==1) - return toproto(L,-1); - else - { - Proto* f; - int i=n; - if (lua_load(L,reader,&i,"=(" PROGNAME ")",NULL)!=LUA_OK) fatal(lua_tostring(L,-1)); - f=toproto(L,-1); - for (i=0; ip[i]=toproto(L,i-n-1); - if (f->p[i]->sizeupvalues>0) f->p[i]->upvalues[0].instack=0; - } - f->sizelineinfo=0; - return f; - } -} - -static int writer(lua_State* L, const void* p, size_t size, void* u) -{ - UNUSED(L); - return (fwrite(p,size,1,(FILE*)u)!=1) && (size!=0); -} - -static int pmain(lua_State* L) -{ - int argc=(int)lua_tointeger(L,1); - char** argv=(char**)lua_touserdata(L,2); - const Proto* f; - int i; - if (!lua_checkstack(L,argc)) fatal("too many input files"); - for (i=0; i1); - if (dumping) - { - FILE* D= (output==NULL) ? stdout : fopen(output,"wb"); - if (D==NULL) cannot("open"); - lua_lock(L); - luaU_dump(L,f,writer,D,stripping); - lua_unlock(L); - if (ferror(D)) cannot("write"); - if (fclose(D)) cannot("close"); - } - return 0; -} - -int main(int argc, char* argv[]) -{ - lua_State* L; - int i=doargs(argc,argv); - argc-=i; argv+=i; - if (argc<=0) usage("no input files given"); - L=luaL_newstate(); - if (L==NULL) fatal("cannot create state: not enough memory"); - lua_pushcfunction(L,&pmain); - lua_pushinteger(L,argc); - lua_pushlightuserdata(L,argv); - if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1)); - lua_close(L); - return EXIT_SUCCESS; -} - -/* -** $Id: luac.c,v 1.76 2018/06/19 01:32:02 lhf Exp $ -** print bytecodes -** See Copyright Notice in lua.h -*/ - -#include -#include - -#define luac_c -#define LUA_CORE - -#include "ldebug.h" -#include "lobject.h" -#include "lopcodes.h" - -#define VOID(p) ((const void*)(p)) - -static void PrintString(const TString* ts) -{ - const char* s=getstr(ts); - size_t i,n=tsslen(ts); - printf("%c",'"'); - for (i=0; ik[i]; - switch (ttype(o)) - { - case LUA_TNIL: - printf("nil"); - break; - case LUA_TBOOLEAN: - printf(bvalue(o) ? "true" : "false"); - break; - case LUA_TNUMFLT: - { - char buff[100]; - sprintf(buff,LUA_NUMBER_FMT,fltvalue(o)); - printf("%s",buff); - if (buff[strspn(buff,"-0123456789")]=='\0') printf(".0"); - break; - } - case LUA_TNUMINT: - printf(LUA_INTEGER_FMT,ivalue(o)); - break; - case LUA_TSHRSTR: case LUA_TLNGSTR: - PrintString(tsvalue(o)); - break; - default: /* cannot happen */ - printf("? type=%d",ttype(o)); - break; - } -} - -#define UPVALNAME(x) ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : "-") -#define MYK(x) (-1-(x)) - -static void PrintCode(const Proto* f) -{ - const Instruction* code=f->code; - int pc,n=f->sizecode; - for (pc=0; pc0) printf("[%d]\t",line); else printf("[-]\t"); - printf("%-9s\t",luaP_opnames[o]); - switch (getOpMode(o)) - { - case iABC: - printf("%d",a); - if (getBMode(o)!=OpArgN) printf(" %d",ISK(b) ? (MYK(INDEXK(b))) : b); - if (getCMode(o)!=OpArgN) printf(" %d",ISK(c) ? (MYK(INDEXK(c))) : c); - break; - case iABx: - printf("%d",a); - if (getBMode(o)==OpArgK) printf(" %d",MYK(bx)); - if (getBMode(o)==OpArgU) printf(" %d",bx); - break; - case iAsBx: - printf("%d %d",a,sbx); - break; - case iAx: - printf("%d",MYK(ax)); - break; - } - switch (o) - { - case OP_LOADK: - printf("\t; "); PrintConstant(f,bx); - break; - case OP_GETUPVAL: - case OP_SETUPVAL: - printf("\t; %s",UPVALNAME(b)); - break; - case OP_GETTABUP: - printf("\t; %s",UPVALNAME(b)); - if (ISK(c)) { printf(" "); PrintConstant(f,INDEXK(c)); } - break; - case OP_SETTABUP: - printf("\t; %s",UPVALNAME(a)); - if (ISK(b)) { printf(" "); PrintConstant(f,INDEXK(b)); } - if (ISK(c)) { printf(" "); PrintConstant(f,INDEXK(c)); } - break; - case OP_GETTABLE: - case OP_SELF: - if (ISK(c)) { printf("\t; "); PrintConstant(f,INDEXK(c)); } - break; - case OP_SETTABLE: - case OP_ADD: - case OP_SUB: - case OP_MUL: - case OP_MOD: - case OP_POW: - case OP_DIV: - case OP_IDIV: - case OP_BAND: - case OP_BOR: - case OP_BXOR: - case OP_SHL: - case OP_SHR: - case OP_EQ: - case OP_LT: - case OP_LE: - if (ISK(b) || ISK(c)) - { - printf("\t; "); - if (ISK(b)) PrintConstant(f,INDEXK(b)); else printf("-"); - printf(" "); - if (ISK(c)) PrintConstant(f,INDEXK(c)); else printf("-"); - } - break; - case OP_JMP: - case OP_FORLOOP: - case OP_FORPREP: - case OP_TFORLOOP: - printf("\t; to %d",sbx+pc+2); - break; - case OP_CLOSURE: - printf("\t; %p",VOID(f->p[bx])); - break; - case OP_SETLIST: - if (c==0) printf("\t; %d",(int)code[++pc]); else printf("\t; %d",c); - break; - case OP_EXTRAARG: - printf("\t; "); PrintConstant(f,ax); - break; - default: - break; - } - printf("\n"); - } -} - -#define SS(x) ((x==1)?"":"s") -#define S(x) (int)(x),SS(x) - -static void PrintHeader(const Proto* f) -{ - const char* s=f->source ? getstr(f->source) : "=?"; - if (*s=='@' || *s=='=') - s++; - else if (*s==LUA_SIGNATURE[0]) - s="(bstring)"; - else - s="(string)"; - printf("\n%s <%s:%d,%d> (%d instruction%s at %p)\n", - (f->linedefined==0)?"main":"function",s, - f->linedefined,f->lastlinedefined, - S(f->sizecode),VOID(f)); - printf("%d%s param%s, %d slot%s, %d upvalue%s, ", - (int)(f->numparams),f->is_vararg?"+":"",SS(f->numparams), - S(f->maxstacksize),S(f->sizeupvalues)); - printf("%d local%s, %d constant%s, %d function%s\n", - S(f->sizelocvars),S(f->sizek),S(f->sizep)); -} - -static void PrintDebug(const Proto* f) -{ - int i,n; - n=f->sizek; - printf("constants (%d) for %p:\n",n,VOID(f)); - for (i=0; isizelocvars; - printf("locals (%d) for %p:\n",n,VOID(f)); - for (i=0; ilocvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1); - } - n=f->sizeupvalues; - printf("upvalues (%d) for %p:\n",n,VOID(f)); - for (i=0; iupvalues[i].instack,f->upvalues[i].idx); - } -} - -static void PrintFunction(const Proto* f, int full) -{ - int i,n=f->sizep; - PrintHeader(f); - PrintCode(f); - if (full) PrintDebug(f); - for (i=0; ip[i],full); -} diff --git a/build/premake/premake5/contrib/lua/src/luaconf.h b/build/premake/premake5/contrib/lua/src/luaconf.h deleted file mode 100644 index 9eeeea69e2..0000000000 --- a/build/premake/premake5/contrib/lua/src/luaconf.h +++ /dev/null @@ -1,790 +0,0 @@ -/* -** $Id: luaconf.h,v 1.259.1.1 2017/04/19 17:29:57 roberto Exp $ -** Configuration file for Lua -** See Copyright Notice in lua.h -*/ - - -#ifndef luaconf_h -#define luaconf_h - -#include -#include - - -/* -** =================================================================== -** Search for "@@" to find all configurable definitions. -** =================================================================== -*/ - - -/* -** {==================================================================== -** System Configuration: macros to adapt (if needed) Lua to some -** particular platform, for instance compiling it with 32-bit numbers or -** restricting it to C89. -** ===================================================================== -*/ - -/* -@@ LUA_32BITS enables Lua with 32-bit integers and 32-bit floats. You -** can also define LUA_32BITS in the make file, but changing here you -** ensure that all software connected to Lua will be compiled with the -** same configuration. -*/ -/* #define LUA_32BITS */ - - -/* -@@ LUA_USE_C89 controls the use of non-ISO-C89 features. -** Define it if you want Lua to avoid the use of a few C99 features -** or Windows-specific features on Windows. -*/ -/* #define LUA_USE_C89 */ - - -/* -** By default, Lua on Windows use (some) specific Windows features -*/ -#if !defined(LUA_USE_C89) && defined(_WIN32) && !defined(_WIN32_WCE) -#define LUA_USE_WINDOWS /* enable goodies for regular Windows */ -#endif - - -#if defined(LUA_USE_WINDOWS) -#define LUA_DL_DLL /* enable support for DLL */ -#define LUA_USE_C89 /* broadly, Windows is C89 */ -#endif - - -#if defined(LUA_USE_LINUX) -#define LUA_USE_POSIX -#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ -#define LUA_USE_READLINE /* needs some extra libraries */ -#endif - - -#if defined(LUA_USE_MACOSX) -#define LUA_USE_POSIX -#define LUA_USE_DLOPEN /* MacOS does not need -ldl */ -#define LUA_USE_READLINE /* needs an extra library: -lreadline */ -#endif - - -/* -@@ LUA_C89_NUMBERS ensures that Lua uses the largest types available for -** C89 ('long' and 'double'); Windows always has '__int64', so it does -** not need to use this case. -*/ -#if defined(LUA_USE_C89) && !defined(LUA_USE_WINDOWS) -#define LUA_C89_NUMBERS -#endif - - - -/* -@@ LUAI_BITSINT defines the (minimum) number of bits in an 'int'. -*/ -/* avoid undefined shifts */ -#if ((INT_MAX >> 15) >> 15) >= 1 -#define LUAI_BITSINT 32 -#else -/* 'int' always must have at least 16 bits */ -#define LUAI_BITSINT 16 -#endif - - -/* -@@ LUA_INT_TYPE defines the type for Lua integers. -@@ LUA_FLOAT_TYPE defines the type for Lua floats. -** Lua should work fine with any mix of these options (if supported -** by your C compiler). The usual configurations are 64-bit integers -** and 'double' (the default), 32-bit integers and 'float' (for -** restricted platforms), and 'long'/'double' (for C compilers not -** compliant with C99, which may not have support for 'long long'). -*/ - -/* predefined options for LUA_INT_TYPE */ -#define LUA_INT_INT 1 -#define LUA_INT_LONG 2 -#define LUA_INT_LONGLONG 3 - -/* predefined options for LUA_FLOAT_TYPE */ -#define LUA_FLOAT_FLOAT 1 -#define LUA_FLOAT_DOUBLE 2 -#define LUA_FLOAT_LONGDOUBLE 3 - -#if defined(LUA_32BITS) /* { */ -/* -** 32-bit integers and 'float' -*/ -#if LUAI_BITSINT >= 32 /* use 'int' if big enough */ -#define LUA_INT_TYPE LUA_INT_INT -#else /* otherwise use 'long' */ -#define LUA_INT_TYPE LUA_INT_LONG -#endif -#define LUA_FLOAT_TYPE LUA_FLOAT_FLOAT - -#elif defined(LUA_C89_NUMBERS) /* }{ */ -/* -** largest types available for C89 ('long' and 'double') -*/ -#define LUA_INT_TYPE LUA_INT_LONG -#define LUA_FLOAT_TYPE LUA_FLOAT_DOUBLE - -#endif /* } */ - - -/* -** default configuration for 64-bit Lua ('long long' and 'double') -*/ -#if !defined(LUA_INT_TYPE) -#define LUA_INT_TYPE LUA_INT_LONGLONG -#endif - -#if !defined(LUA_FLOAT_TYPE) -#define LUA_FLOAT_TYPE LUA_FLOAT_DOUBLE -#endif - -/* }================================================================== */ - - - - -/* -** {================================================================== -** Configuration for Paths. -** =================================================================== -*/ - -/* -** LUA_PATH_SEP is the character that separates templates in a path. -** LUA_PATH_MARK is the string that marks the substitution points in a -** template. -** LUA_EXEC_DIR in a Windows path is replaced by the executable's -** directory. -*/ -#define LUA_PATH_SEP ";" -#define LUA_PATH_MARK "?" -#define LUA_EXEC_DIR "!" - - -/* -@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for -** Lua libraries. -@@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for -** C libraries. -** CHANGE them if your machine has a non-conventional directory -** hierarchy or if you want to install your libraries in -** non-conventional directories. -*/ -#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR -#if defined(_WIN32) /* { */ -/* -** In Windows, any exclamation mark ('!') in the path is replaced by the -** path of the directory of the executable file of the current process. -*/ -#define LUA_LDIR "!\\lua\\" -#define LUA_CDIR "!\\" -#define LUA_SHRDIR "!\\..\\share\\lua\\" LUA_VDIR "\\" -#define LUA_PATH_DEFAULT \ - LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua;" \ - LUA_SHRDIR"?.lua;" LUA_SHRDIR"?\\init.lua;" \ - ".\\?.lua;" ".\\?\\init.lua" -#define LUA_CPATH_DEFAULT \ - LUA_CDIR"?.dll;" \ - LUA_CDIR"..\\lib\\lua\\" LUA_VDIR "\\?.dll;" \ - LUA_CDIR"loadall.dll;" ".\\?.dll" - -#else /* }{ */ - -#define LUA_ROOT "/usr/local/" -#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" -#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" -#define LUA_PATH_DEFAULT \ - LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ - "./?.lua;" "./?/init.lua" -#define LUA_CPATH_DEFAULT \ - LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" -#endif /* } */ - - -/* -@@ LUA_DIRSEP is the directory separator (for submodules). -** CHANGE it if your machine does not use "/" as the directory separator -** and is not Windows. (On Windows Lua automatically uses "\".) -*/ -#if defined(_WIN32) -#define LUA_DIRSEP "\\" -#else -#define LUA_DIRSEP "/" -#endif - -/* }================================================================== */ - - -/* -** {================================================================== -** Marks for exported symbols in the C code -** =================================================================== -*/ - -/* -@@ LUA_API is a mark for all core API functions. -@@ LUALIB_API is a mark for all auxiliary library functions. -@@ LUAMOD_API is a mark for all standard library opening functions. -** CHANGE them if you need to define those functions in some special way. -** For instance, if you want to create one Windows DLL with the core and -** the libraries, you may want to use the following definition (define -** LUA_BUILD_AS_DLL to get it). -*/ -#if defined(LUA_BUILD_AS_DLL) /* { */ - -#if defined(LUA_CORE) || defined(LUA_LIB) /* { */ -#define LUA_API __declspec(dllexport) -#else /* }{ */ -#define LUA_API __declspec(dllimport) -#endif /* } */ - -#else /* }{ */ - -#define LUA_API extern - -#endif /* } */ - - -/* more often than not the libs go together with the core */ -#define LUALIB_API LUA_API -#define LUAMOD_API LUALIB_API - - -/* -@@ LUAI_FUNC is a mark for all extern functions that are not to be -** exported to outside modules. -@@ LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables -** that are not to be exported to outside modules (LUAI_DDEF for -** definitions and LUAI_DDEC for declarations). -** CHANGE them if you need to mark them in some special way. Elf/gcc -** (versions 3.2 and later) mark them as "hidden" to optimize access -** when Lua is compiled as a shared library. Not all elf targets support -** this attribute. Unfortunately, gcc does not offer a way to check -** whether the target offers that support, and those without support -** give a warning about it. To avoid these warnings, change to the -** default definition. -*/ -#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ - defined(__ELF__) /* { */ -#define LUAI_FUNC __attribute__((visibility("hidden"))) extern -#else /* }{ */ -#define LUAI_FUNC extern -#endif /* } */ - -#define LUAI_DDEC LUAI_FUNC -#define LUAI_DDEF /* empty */ - -/* }================================================================== */ - - -/* -** {================================================================== -** Compatibility with previous versions -** =================================================================== -*/ - -/* -@@ LUA_COMPAT_5_2 controls other macros for compatibility with Lua 5.2. -@@ LUA_COMPAT_5_1 controls other macros for compatibility with Lua 5.1. -** You can define it to get all options, or change specific options -** to fit your specific needs. -*/ -#if defined(LUA_COMPAT_5_2) /* { */ - -/* -@@ LUA_COMPAT_MATHLIB controls the presence of several deprecated -** functions in the mathematical library. -*/ -#define LUA_COMPAT_MATHLIB - -/* -@@ LUA_COMPAT_BITLIB controls the presence of library 'bit32'. -*/ -#define LUA_COMPAT_BITLIB - -/* -@@ LUA_COMPAT_IPAIRS controls the effectiveness of the __ipairs metamethod. -*/ -#define LUA_COMPAT_IPAIRS - -/* -@@ LUA_COMPAT_APIINTCASTS controls the presence of macros for -** manipulating other integer types (lua_pushunsigned, lua_tounsigned, -** luaL_checkint, luaL_checklong, etc.) -*/ -#define LUA_COMPAT_APIINTCASTS - -#endif /* } */ - - -#if defined(LUA_COMPAT_5_1) /* { */ - -/* Incompatibilities from 5.2 -> 5.3 */ -#define LUA_COMPAT_MATHLIB -#define LUA_COMPAT_APIINTCASTS - -/* -@@ LUA_COMPAT_UNPACK controls the presence of global 'unpack'. -** You can replace it with 'table.unpack'. -*/ -#define LUA_COMPAT_UNPACK - -/* -@@ LUA_COMPAT_LOADERS controls the presence of table 'package.loaders'. -** You can replace it with 'package.searchers'. -*/ -#define LUA_COMPAT_LOADERS - -/* -@@ macro 'lua_cpcall' emulates deprecated function lua_cpcall. -** You can call your C function directly (with light C functions). -*/ -#define lua_cpcall(L,f,u) \ - (lua_pushcfunction(L, (f)), \ - lua_pushlightuserdata(L,(u)), \ - lua_pcall(L,1,0,0)) - - -/* -@@ LUA_COMPAT_LOG10 defines the function 'log10' in the math library. -** You can rewrite 'log10(x)' as 'log(x, 10)'. -*/ -#define LUA_COMPAT_LOG10 - -/* -@@ LUA_COMPAT_LOADSTRING defines the function 'loadstring' in the base -** library. You can rewrite 'loadstring(s)' as 'load(s)'. -*/ -#define LUA_COMPAT_LOADSTRING - -/* -@@ LUA_COMPAT_MAXN defines the function 'maxn' in the table library. -*/ -#define LUA_COMPAT_MAXN - -/* -@@ The following macros supply trivial compatibility for some -** changes in the API. The macros themselves document how to -** change your code to avoid using them. -*/ -#define lua_strlen(L,i) lua_rawlen(L, (i)) - -#define lua_objlen(L,i) lua_rawlen(L, (i)) - -#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) -#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) - -/* -@@ LUA_COMPAT_MODULE controls compatibility with previous -** module functions 'module' (Lua) and 'luaL_register' (C). -*/ -#define LUA_COMPAT_MODULE - -#endif /* } */ - - -/* -@@ LUA_COMPAT_FLOATSTRING makes Lua format integral floats without a -@@ a float mark ('.0'). -** This macro is not on by default even in compatibility mode, -** because this is not really an incompatibility. -*/ -/* #define LUA_COMPAT_FLOATSTRING */ - -/* }================================================================== */ - - - -/* -** {================================================================== -** Configuration for Numbers. -** Change these definitions if no predefined LUA_FLOAT_* / LUA_INT_* -** satisfy your needs. -** =================================================================== -*/ - -/* -@@ LUA_NUMBER is the floating-point type used by Lua. -@@ LUAI_UACNUMBER is the result of a 'default argument promotion' -@@ over a floating number. -@@ l_mathlim(x) corrects limit name 'x' to the proper float type -** by prefixing it with one of FLT/DBL/LDBL. -@@ LUA_NUMBER_FRMLEN is the length modifier for writing floats. -@@ LUA_NUMBER_FMT is the format for writing floats. -@@ lua_number2str converts a float to a string. -@@ l_mathop allows the addition of an 'l' or 'f' to all math operations. -@@ l_floor takes the floor of a float. -@@ lua_str2number converts a decimal numeric string to a number. -*/ - - -/* The following definitions are good for most cases here */ - -#define l_floor(x) (l_mathop(floor)(x)) - -#define lua_number2str(s,sz,n) \ - l_sprintf((s), sz, LUA_NUMBER_FMT, (LUAI_UACNUMBER)(n)) - -/* -@@ lua_numbertointeger converts a float number to an integer, or -** returns 0 if float is not within the range of a lua_Integer. -** (The range comparisons are tricky because of rounding. The tests -** here assume a two-complement representation, where MININTEGER always -** has an exact representation as a float; MAXINTEGER may not have one, -** and therefore its conversion to float may have an ill-defined value.) -*/ -#define lua_numbertointeger(n,p) \ - ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ - (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ - (*(p) = (LUA_INTEGER)(n), 1)) - - -/* now the variable definitions */ - -#if LUA_FLOAT_TYPE == LUA_FLOAT_FLOAT /* { single float */ - -#define LUA_NUMBER float - -#define l_mathlim(n) (FLT_##n) - -#define LUAI_UACNUMBER double - -#define LUA_NUMBER_FRMLEN "" -#define LUA_NUMBER_FMT "%.7g" - -#define l_mathop(op) op##f - -#define lua_str2number(s,p) strtof((s), (p)) - - -#elif LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE /* }{ long double */ - -#define LUA_NUMBER long double - -#define l_mathlim(n) (LDBL_##n) - -#define LUAI_UACNUMBER long double - -#define LUA_NUMBER_FRMLEN "L" -#define LUA_NUMBER_FMT "%.19Lg" - -#define l_mathop(op) op##l - -#define lua_str2number(s,p) strtold((s), (p)) - -#elif LUA_FLOAT_TYPE == LUA_FLOAT_DOUBLE /* }{ double */ - -#define LUA_NUMBER double - -#define l_mathlim(n) (DBL_##n) - -#define LUAI_UACNUMBER double - -#define LUA_NUMBER_FRMLEN "" -#define LUA_NUMBER_FMT "%.14g" - -#define l_mathop(op) op - -#define lua_str2number(s,p) strtod((s), (p)) - -#else /* }{ */ - -#error "numeric float type not defined" - -#endif /* } */ - - - -/* -@@ LUA_INTEGER is the integer type used by Lua. -** -@@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER. -** -@@ LUAI_UACINT is the result of a 'default argument promotion' -@@ over a lUA_INTEGER. -@@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers. -@@ LUA_INTEGER_FMT is the format for writing integers. -@@ LUA_MAXINTEGER is the maximum value for a LUA_INTEGER. -@@ LUA_MININTEGER is the minimum value for a LUA_INTEGER. -@@ lua_integer2str converts an integer to a string. -*/ - - -/* The following definitions are good for most cases here */ - -#define LUA_INTEGER_FMT "%" LUA_INTEGER_FRMLEN "d" - -#define LUAI_UACINT LUA_INTEGER - -#define lua_integer2str(s,sz,n) \ - l_sprintf((s), sz, LUA_INTEGER_FMT, (LUAI_UACINT)(n)) - -/* -** use LUAI_UACINT here to avoid problems with promotions (which -** can turn a comparison between unsigneds into a signed comparison) -*/ -#define LUA_UNSIGNED unsigned LUAI_UACINT - - -/* now the variable definitions */ - -#if LUA_INT_TYPE == LUA_INT_INT /* { int */ - -#define LUA_INTEGER int -#define LUA_INTEGER_FRMLEN "" - -#define LUA_MAXINTEGER INT_MAX -#define LUA_MININTEGER INT_MIN - -#elif LUA_INT_TYPE == LUA_INT_LONG /* }{ long */ - -#define LUA_INTEGER long -#define LUA_INTEGER_FRMLEN "l" - -#define LUA_MAXINTEGER LONG_MAX -#define LUA_MININTEGER LONG_MIN - -#elif LUA_INT_TYPE == LUA_INT_LONGLONG /* }{ long long */ - -/* use presence of macro LLONG_MAX as proxy for C99 compliance */ -#if defined(LLONG_MAX) /* { */ -/* use ISO C99 stuff */ - -#define LUA_INTEGER long long -#define LUA_INTEGER_FRMLEN "ll" - -#define LUA_MAXINTEGER LLONG_MAX -#define LUA_MININTEGER LLONG_MIN - -#elif defined(LUA_USE_WINDOWS) /* }{ */ -/* in Windows, can use specific Windows types */ - -#define LUA_INTEGER __int64 -#define LUA_INTEGER_FRMLEN "I64" - -#define LUA_MAXINTEGER _I64_MAX -#define LUA_MININTEGER _I64_MIN - -#else /* }{ */ - -#error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' \ - or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)" - -#endif /* } */ - -#else /* }{ */ - -#error "numeric integer type not defined" - -#endif /* } */ - -/* }================================================================== */ - - -/* -** {================================================================== -** Dependencies with C99 and other C details -** =================================================================== -*/ - -/* -@@ l_sprintf is equivalent to 'snprintf' or 'sprintf' in C89. -** (All uses in Lua have only one format item.) -*/ -#if !defined(LUA_USE_C89) -#define l_sprintf(s,sz,f,i) snprintf(s,sz,f,i) -#else -#define l_sprintf(s,sz,f,i) ((void)(sz), sprintf(s,f,i)) -#endif - - -/* -@@ lua_strx2number converts an hexadecimal numeric string to a number. -** In C99, 'strtod' does that conversion. Otherwise, you can -** leave 'lua_strx2number' undefined and Lua will provide its own -** implementation. -*/ -#if !defined(LUA_USE_C89) -#define lua_strx2number(s,p) lua_str2number(s,p) -#endif - - -/* -@@ lua_pointer2str converts a pointer to a readable string in a -** non-specified way. -*/ -#define lua_pointer2str(buff,sz,p) l_sprintf(buff,sz,"%p",p) - - -/* -@@ lua_number2strx converts a float to an hexadecimal numeric string. -** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that. -** Otherwise, you can leave 'lua_number2strx' undefined and Lua will -** provide its own implementation. -*/ -#if !defined(LUA_USE_C89) -#define lua_number2strx(L,b,sz,f,n) \ - ((void)L, l_sprintf(b,sz,f,(LUAI_UACNUMBER)(n))) -#endif - - -/* -** 'strtof' and 'opf' variants for math functions are not valid in -** C89. Otherwise, the macro 'HUGE_VALF' is a good proxy for testing the -** availability of these variants. ('math.h' is already included in -** all files that use these macros.) -*/ -#if defined(LUA_USE_C89) || (defined(HUGE_VAL) && !defined(HUGE_VALF)) -#undef l_mathop /* variants not available */ -#undef lua_str2number -#define l_mathop(op) (lua_Number)op /* no variant */ -#define lua_str2number(s,p) ((lua_Number)strtod((s), (p))) -#endif - - -/* -@@ LUA_KCONTEXT is the type of the context ('ctx') for continuation -** functions. It must be a numerical type; Lua will use 'intptr_t' if -** available, otherwise it will use 'ptrdiff_t' (the nearest thing to -** 'intptr_t' in C89) -*/ -#define LUA_KCONTEXT ptrdiff_t - -#if !defined(LUA_USE_C89) && defined(__STDC_VERSION__) && \ - __STDC_VERSION__ >= 199901L -#include -#if defined(INTPTR_MAX) /* even in C99 this type is optional */ -#undef LUA_KCONTEXT -#define LUA_KCONTEXT intptr_t -#endif -#endif - - -/* -@@ lua_getlocaledecpoint gets the locale "radix character" (decimal point). -** Change that if you do not want to use C locales. (Code using this -** macro must include header 'locale.h'.) -*/ -#if !defined(lua_getlocaledecpoint) -#define lua_getlocaledecpoint() (localeconv()->decimal_point[0]) -#endif - -/* }================================================================== */ - - -/* -** {================================================================== -** Language Variations -** ===================================================================== -*/ - -/* -@@ LUA_NOCVTN2S/LUA_NOCVTS2N control how Lua performs some -** coercions. Define LUA_NOCVTN2S to turn off automatic coercion from -** numbers to strings. Define LUA_NOCVTS2N to turn off automatic -** coercion from strings to numbers. -*/ -/* #define LUA_NOCVTN2S */ -/* #define LUA_NOCVTS2N */ - - -/* -@@ LUA_USE_APICHECK turns on several consistency checks on the C API. -** Define it as a help when debugging C code. -*/ -#if defined(LUA_USE_APICHECK) -#include -#define luai_apicheck(l,e) assert(e) -#endif - -/* }================================================================== */ - - -/* -** {================================================================== -** Macros that affect the API and must be stable (that is, must be the -** same when you compile Lua and when you compile code that links to -** Lua). You probably do not want/need to change them. -** ===================================================================== -*/ - -/* -@@ LUAI_MAXSTACK limits the size of the Lua stack. -** CHANGE it if you need a different limit. This limit is arbitrary; -** its only purpose is to stop Lua from consuming unlimited stack -** space (and to reserve some numbers for pseudo-indices). -*/ -#if LUAI_BITSINT >= 32 -#define LUAI_MAXSTACK 1000000 -#else -#define LUAI_MAXSTACK 15000 -#endif - - -/* -@@ LUA_EXTRASPACE defines the size of a raw memory area associated with -** a Lua state with very fast access. -** CHANGE it if you need a different size. -*/ -#define LUA_EXTRASPACE (sizeof(void *)) - - -/* -@@ LUA_IDSIZE gives the maximum size for the description of the source -@@ of a function in debug information. -** CHANGE it if you want a different size. -*/ -#define LUA_IDSIZE 60 - - -/* -@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. -** CHANGE it if it uses too much C-stack space. (For long double, -** 'string.format("%.99f", -1e4932)' needs 5034 bytes, so a -** smaller buffer would force a memory allocation for each call to -** 'string.format'.) -*/ -#if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE -#define LUAL_BUFFERSIZE 8192 -#else -#define LUAL_BUFFERSIZE ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer))) -#endif - -/* }================================================================== */ - - -/* -@@ LUA_QL describes how error messages quote program elements. -** Lua does not use these macros anymore; they are here for -** compatibility only. -*/ -#define LUA_QL(x) "'" x "'" -#define LUA_QS LUA_QL("%s") - - - - -/* =================================================================== */ - -/* -** Local configuration. You can use this space to add your redefinitions -** without modifying the main part of the file. -*/ - - - - - -#endif - diff --git a/build/premake/premake5/contrib/lua/src/lualib.h b/build/premake/premake5/contrib/lua/src/lualib.h deleted file mode 100644 index f5304aa0dd..0000000000 --- a/build/premake/premake5/contrib/lua/src/lualib.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** $Id: lualib.h,v 1.45.1.1 2017/04/19 17:20:42 roberto Exp $ -** Lua standard libraries -** See Copyright Notice in lua.h -*/ - - -#ifndef lualib_h -#define lualib_h - -#include "lua.h" - - -/* version suffix for environment variable names */ -#define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR - - -LUAMOD_API int (luaopen_base) (lua_State *L); - -#define LUA_COLIBNAME "coroutine" -LUAMOD_API int (luaopen_coroutine) (lua_State *L); - -#define LUA_TABLIBNAME "table" -LUAMOD_API int (luaopen_table) (lua_State *L); - -#define LUA_IOLIBNAME "io" -LUAMOD_API int (luaopen_io) (lua_State *L); - -#define LUA_OSLIBNAME "os" -LUAMOD_API int (luaopen_os) (lua_State *L); - -#define LUA_STRLIBNAME "string" -LUAMOD_API int (luaopen_string) (lua_State *L); - -#define LUA_UTF8LIBNAME "utf8" -LUAMOD_API int (luaopen_utf8) (lua_State *L); - -#define LUA_BITLIBNAME "bit32" -LUAMOD_API int (luaopen_bit32) (lua_State *L); - -#define LUA_MATHLIBNAME "math" -LUAMOD_API int (luaopen_math) (lua_State *L); - -#define LUA_DBLIBNAME "debug" -LUAMOD_API int (luaopen_debug) (lua_State *L); - -#define LUA_LOADLIBNAME "package" -LUAMOD_API int (luaopen_package) (lua_State *L); - - -/* open all previous libraries */ -LUALIB_API void (luaL_openlibs) (lua_State *L); - - - -#if !defined(lua_assert) -#define lua_assert(x) ((void)0) -#endif - - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lundump.c b/build/premake/premake5/contrib/lua/src/lundump.c deleted file mode 100644 index 7a67d75aaa..0000000000 --- a/build/premake/premake5/contrib/lua/src/lundump.c +++ /dev/null @@ -1,279 +0,0 @@ -/* -** $Id: lundump.c,v 2.44.1.1 2017/04/19 17:20:42 roberto Exp $ -** load precompiled Lua chunks -** See Copyright Notice in lua.h -*/ - -#define lundump_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lmem.h" -#include "lobject.h" -#include "lstring.h" -#include "lundump.h" -#include "lzio.h" - - -#if !defined(luai_verifycode) -#define luai_verifycode(L,b,f) /* empty */ -#endif - - -typedef struct { - lua_State *L; - ZIO *Z; - const char *name; -} LoadState; - - -static l_noret error(LoadState *S, const char *why) { - luaO_pushfstring(S->L, "%s: %s precompiled chunk", S->name, why); - luaD_throw(S->L, LUA_ERRSYNTAX); -} - - -/* -** All high-level loads go through LoadVector; you can change it to -** adapt to the endianness of the input -*/ -#define LoadVector(S,b,n) LoadBlock(S,b,(n)*sizeof((b)[0])) - -static void LoadBlock (LoadState *S, void *b, size_t size) { - if (luaZ_read(S->Z, b, size) != 0) - error(S, "truncated"); -} - - -#define LoadVar(S,x) LoadVector(S,&x,1) - - -static lu_byte LoadByte (LoadState *S) { - lu_byte x; - LoadVar(S, x); - return x; -} - - -static int LoadInt (LoadState *S) { - int x; - LoadVar(S, x); - return x; -} - - -static lua_Number LoadNumber (LoadState *S) { - lua_Number x; - LoadVar(S, x); - return x; -} - - -static lua_Integer LoadInteger (LoadState *S) { - lua_Integer x; - LoadVar(S, x); - return x; -} - - -static TString *LoadString (LoadState *S) { - size_t size = LoadByte(S); - if (size == 0xFF) - LoadVar(S, size); - if (size == 0) - return NULL; - else if (--size <= LUAI_MAXSHORTLEN) { /* short string? */ - char buff[LUAI_MAXSHORTLEN]; - LoadVector(S, buff, size); - return luaS_newlstr(S->L, buff, size); - } - else { /* long string */ - TString *ts = luaS_createlngstrobj(S->L, size); - LoadVector(S, getstr(ts), size); /* load directly in final place */ - return ts; - } -} - - -static void LoadCode (LoadState *S, Proto *f) { - int n = LoadInt(S); - f->code = luaM_newvector(S->L, n, Instruction); - f->sizecode = n; - LoadVector(S, f->code, n); -} - - -static void LoadFunction(LoadState *S, Proto *f, TString *psource); - - -static void LoadConstants (LoadState *S, Proto *f) { - int i; - int n = LoadInt(S); - f->k = luaM_newvector(S->L, n, TValue); - f->sizek = n; - for (i = 0; i < n; i++) - setnilvalue(&f->k[i]); - for (i = 0; i < n; i++) { - TValue *o = &f->k[i]; - int t = LoadByte(S); - switch (t) { - case LUA_TNIL: - setnilvalue(o); - break; - case LUA_TBOOLEAN: - setbvalue(o, LoadByte(S)); - break; - case LUA_TNUMFLT: - setfltvalue(o, LoadNumber(S)); - break; - case LUA_TNUMINT: - setivalue(o, LoadInteger(S)); - break; - case LUA_TSHRSTR: - case LUA_TLNGSTR: - setsvalue2n(S->L, o, LoadString(S)); - break; - default: - lua_assert(0); - } - } -} - - -static void LoadProtos (LoadState *S, Proto *f) { - int i; - int n = LoadInt(S); - f->p = luaM_newvector(S->L, n, Proto *); - f->sizep = n; - for (i = 0; i < n; i++) - f->p[i] = NULL; - for (i = 0; i < n; i++) { - f->p[i] = luaF_newproto(S->L); - LoadFunction(S, f->p[i], f->source); - } -} - - -static void LoadUpvalues (LoadState *S, Proto *f) { - int i, n; - n = LoadInt(S); - f->upvalues = luaM_newvector(S->L, n, Upvaldesc); - f->sizeupvalues = n; - for (i = 0; i < n; i++) - f->upvalues[i].name = NULL; - for (i = 0; i < n; i++) { - f->upvalues[i].instack = LoadByte(S); - f->upvalues[i].idx = LoadByte(S); - } -} - - -static void LoadDebug (LoadState *S, Proto *f) { - int i, n; - n = LoadInt(S); - f->lineinfo = luaM_newvector(S->L, n, int); - f->sizelineinfo = n; - LoadVector(S, f->lineinfo, n); - n = LoadInt(S); - f->locvars = luaM_newvector(S->L, n, LocVar); - f->sizelocvars = n; - for (i = 0; i < n; i++) - f->locvars[i].varname = NULL; - for (i = 0; i < n; i++) { - f->locvars[i].varname = LoadString(S); - f->locvars[i].startpc = LoadInt(S); - f->locvars[i].endpc = LoadInt(S); - } - n = LoadInt(S); - for (i = 0; i < n; i++) - f->upvalues[i].name = LoadString(S); -} - - -static void LoadFunction (LoadState *S, Proto *f, TString *psource) { - f->source = LoadString(S); - if (f->source == NULL) /* no source in dump? */ - f->source = psource; /* reuse parent's source */ - f->linedefined = LoadInt(S); - f->lastlinedefined = LoadInt(S); - f->numparams = LoadByte(S); - f->is_vararg = LoadByte(S); - f->maxstacksize = LoadByte(S); - LoadCode(S, f); - LoadConstants(S, f); - LoadUpvalues(S, f); - LoadProtos(S, f); - LoadDebug(S, f); -} - - -static void checkliteral (LoadState *S, const char *s, const char *msg) { - char buff[sizeof(LUA_SIGNATURE) + sizeof(LUAC_DATA)]; /* larger than both */ - size_t len = strlen(s); - LoadVector(S, buff, len); - if (memcmp(s, buff, len) != 0) - error(S, msg); -} - - -static void fchecksize (LoadState *S, size_t size, const char *tname) { - if (LoadByte(S) != size) - error(S, luaO_pushfstring(S->L, "%s size mismatch in", tname)); -} - - -#define checksize(S,t) fchecksize(S,sizeof(t),#t) - -static void checkHeader (LoadState *S) { - checkliteral(S, LUA_SIGNATURE + 1, "not a"); /* 1st char already checked */ - if (LoadByte(S) != LUAC_VERSION) - error(S, "version mismatch in"); - if (LoadByte(S) != LUAC_FORMAT) - error(S, "format mismatch in"); - checkliteral(S, LUAC_DATA, "corrupted"); - checksize(S, int); - checksize(S, size_t); - checksize(S, Instruction); - checksize(S, lua_Integer); - checksize(S, lua_Number); - if (LoadInteger(S) != LUAC_INT) - error(S, "endianness mismatch in"); - if (LoadNumber(S) != LUAC_NUM) - error(S, "float format mismatch in"); -} - - -/* -** load precompiled chunk -*/ -LClosure *luaU_undump(lua_State *L, ZIO *Z, const char *name) { - LoadState S; - LClosure *cl; - if (*name == '@' || *name == '=') - S.name = name + 1; - else if (*name == LUA_SIGNATURE[0]) - S.name = "binary string"; - else - S.name = name; - S.L = L; - S.Z = Z; - checkHeader(&S); - cl = luaF_newLclosure(L, LoadByte(&S)); - setclLvalue(L, L->top, cl); - luaD_inctop(L); - cl->p = luaF_newproto(L); - LoadFunction(&S, cl->p, NULL); - lua_assert(cl->nupvalues == cl->p->sizeupvalues); - luai_verifycode(L, buff, cl->p); - return cl; -} - diff --git a/build/premake/premake5/contrib/lua/src/lundump.h b/build/premake/premake5/contrib/lua/src/lundump.h deleted file mode 100644 index ce492d689c..0000000000 --- a/build/premake/premake5/contrib/lua/src/lundump.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -** $Id: lundump.h,v 1.45.1.1 2017/04/19 17:20:42 roberto Exp $ -** load precompiled Lua chunks -** See Copyright Notice in lua.h -*/ - -#ifndef lundump_h -#define lundump_h - -#include "llimits.h" -#include "lobject.h" -#include "lzio.h" - - -/* data to catch conversion errors */ -#define LUAC_DATA "\x19\x93\r\n\x1a\n" - -#define LUAC_INT 0x5678 -#define LUAC_NUM cast_num(370.5) - -#define MYINT(s) (s[0]-'0') -#define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) -#define LUAC_FORMAT 0 /* this is the official format */ - -/* load one chunk; from lundump.c */ -LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); - -/* dump one chunk; from ldump.c */ -LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, - void* data, int strip); - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lutf8lib.c b/build/premake/premake5/contrib/lua/src/lutf8lib.c deleted file mode 100644 index 10bd238a71..0000000000 --- a/build/premake/premake5/contrib/lua/src/lutf8lib.c +++ /dev/null @@ -1,256 +0,0 @@ -/* -** $Id: lutf8lib.c,v 1.16.1.1 2017/04/19 17:29:57 roberto Exp $ -** Standard library for UTF-8 manipulation -** See Copyright Notice in lua.h -*/ - -#define lutf8lib_c -#define LUA_LIB - -#include "lprefix.h" - - -#include -#include -#include -#include - -#include "lua.h" - -#include "lauxlib.h" -#include "lualib.h" - -#define MAXUNICODE 0x10FFFF - -#define iscont(p) ((*(p) & 0xC0) == 0x80) - - -/* from strlib */ -/* translate a relative string position: negative means back from end */ -static lua_Integer u_posrelat (lua_Integer pos, size_t len) { - if (pos >= 0) return pos; - else if (0u - (size_t)pos > len) return 0; - else return (lua_Integer)len + pos + 1; -} - - -/* -** Decode one UTF-8 sequence, returning NULL if byte sequence is invalid. -*/ -static const char *utf8_decode (const char *o, int *val) { - static const unsigned int limits[] = {0xFF, 0x7F, 0x7FF, 0xFFFF}; - const unsigned char *s = (const unsigned char *)o; - unsigned int c = s[0]; - unsigned int res = 0; /* final result */ - if (c < 0x80) /* ascii? */ - res = c; - else { - int count = 0; /* to count number of continuation bytes */ - while (c & 0x40) { /* still have continuation bytes? */ - int cc = s[++count]; /* read next byte */ - if ((cc & 0xC0) != 0x80) /* not a continuation byte? */ - return NULL; /* invalid byte sequence */ - res = (res << 6) | (cc & 0x3F); /* add lower 6 bits from cont. byte */ - c <<= 1; /* to test next bit */ - } - res |= ((c & 0x7F) << (count * 5)); /* add first byte */ - if (count > 3 || res > MAXUNICODE || res <= limits[count]) - return NULL; /* invalid byte sequence */ - s += count; /* skip continuation bytes read */ - } - if (val) *val = res; - return (const char *)s + 1; /* +1 to include first byte */ -} - - -/* -** utf8len(s [, i [, j]]) --> number of characters that start in the -** range [i,j], or nil + current position if 's' is not well formed in -** that interval -*/ -static int utflen (lua_State *L) { - int n = 0; - size_t len; - const char *s = luaL_checklstring(L, 1, &len); - lua_Integer posi = u_posrelat(luaL_optinteger(L, 2, 1), len); - lua_Integer posj = u_posrelat(luaL_optinteger(L, 3, -1), len); - luaL_argcheck(L, 1 <= posi && --posi <= (lua_Integer)len, 2, - "initial position out of string"); - luaL_argcheck(L, --posj < (lua_Integer)len, 3, - "final position out of string"); - while (posi <= posj) { - const char *s1 = utf8_decode(s + posi, NULL); - if (s1 == NULL) { /* conversion error? */ - lua_pushnil(L); /* return nil ... */ - lua_pushinteger(L, posi + 1); /* ... and current position */ - return 2; - } - posi = s1 - s; - n++; - } - lua_pushinteger(L, n); - return 1; -} - - -/* -** codepoint(s, [i, [j]]) -> returns codepoints for all characters -** that start in the range [i,j] -*/ -static int codepoint (lua_State *L) { - size_t len; - const char *s = luaL_checklstring(L, 1, &len); - lua_Integer posi = u_posrelat(luaL_optinteger(L, 2, 1), len); - lua_Integer pose = u_posrelat(luaL_optinteger(L, 3, posi), len); - int n; - const char *se; - luaL_argcheck(L, posi >= 1, 2, "out of range"); - luaL_argcheck(L, pose <= (lua_Integer)len, 3, "out of range"); - if (posi > pose) return 0; /* empty interval; return no values */ - if (pose - posi >= INT_MAX) /* (lua_Integer -> int) overflow? */ - return luaL_error(L, "string slice too long"); - n = (int)(pose - posi) + 1; - luaL_checkstack(L, n, "string slice too long"); - n = 0; - se = s + pose; - for (s += posi - 1; s < se;) { - int code; - s = utf8_decode(s, &code); - if (s == NULL) - return luaL_error(L, "invalid UTF-8 code"); - lua_pushinteger(L, code); - n++; - } - return n; -} - - -static void pushutfchar (lua_State *L, int arg) { - lua_Integer code = luaL_checkinteger(L, arg); - luaL_argcheck(L, 0 <= code && code <= MAXUNICODE, arg, "value out of range"); - lua_pushfstring(L, "%U", (long)code); -} - - -/* -** utfchar(n1, n2, ...) -> char(n1)..char(n2)... -*/ -static int utfchar (lua_State *L) { - int n = lua_gettop(L); /* number of arguments */ - if (n == 1) /* optimize common case of single char */ - pushutfchar(L, 1); - else { - int i; - luaL_Buffer b; - luaL_buffinit(L, &b); - for (i = 1; i <= n; i++) { - pushutfchar(L, i); - luaL_addvalue(&b); - } - luaL_pushresult(&b); - } - return 1; -} - - -/* -** offset(s, n, [i]) -> index where n-th character counting from -** position 'i' starts; 0 means character at 'i'. -*/ -static int byteoffset (lua_State *L) { - size_t len; - const char *s = luaL_checklstring(L, 1, &len); - lua_Integer n = luaL_checkinteger(L, 2); - lua_Integer posi = (n >= 0) ? 1 : len + 1; - posi = u_posrelat(luaL_optinteger(L, 3, posi), len); - luaL_argcheck(L, 1 <= posi && --posi <= (lua_Integer)len, 3, - "position out of range"); - if (n == 0) { - /* find beginning of current byte sequence */ - while (posi > 0 && iscont(s + posi)) posi--; - } - else { - if (iscont(s + posi)) - return luaL_error(L, "initial position is a continuation byte"); - if (n < 0) { - while (n < 0 && posi > 0) { /* move back */ - do { /* find beginning of previous character */ - posi--; - } while (posi > 0 && iscont(s + posi)); - n++; - } - } - else { - n--; /* do not move for 1st character */ - while (n > 0 && posi < (lua_Integer)len) { - do { /* find beginning of next character */ - posi++; - } while (iscont(s + posi)); /* (cannot pass final '\0') */ - n--; - } - } - } - if (n == 0) /* did it find given character? */ - lua_pushinteger(L, posi + 1); - else /* no such character */ - lua_pushnil(L); - return 1; -} - - -static int iter_aux (lua_State *L) { - size_t len; - const char *s = luaL_checklstring(L, 1, &len); - lua_Integer n = lua_tointeger(L, 2) - 1; - if (n < 0) /* first iteration? */ - n = 0; /* start from here */ - else if (n < (lua_Integer)len) { - n++; /* skip current byte */ - while (iscont(s + n)) n++; /* and its continuations */ - } - if (n >= (lua_Integer)len) - return 0; /* no more codepoints */ - else { - int code; - const char *next = utf8_decode(s + n, &code); - if (next == NULL || iscont(next)) - return luaL_error(L, "invalid UTF-8 code"); - lua_pushinteger(L, n + 1); - lua_pushinteger(L, code); - return 2; - } -} - - -static int iter_codes (lua_State *L) { - luaL_checkstring(L, 1); - lua_pushcfunction(L, iter_aux); - lua_pushvalue(L, 1); - lua_pushinteger(L, 0); - return 3; -} - - -/* pattern to match a single UTF-8 character */ -#define UTF8PATT "[\0-\x7F\xC2-\xF4][\x80-\xBF]*" - - -static const luaL_Reg funcs[] = { - {"offset", byteoffset}, - {"codepoint", codepoint}, - {"char", utfchar}, - {"len", utflen}, - {"codes", iter_codes}, - /* placeholders */ - {"charpattern", NULL}, - {NULL, NULL} -}; - - -LUAMOD_API int luaopen_utf8 (lua_State *L) { - luaL_newlib(L, funcs); - lua_pushlstring(L, UTF8PATT, sizeof(UTF8PATT)/sizeof(char) - 1); - lua_setfield(L, -2, "charpattern"); - return 1; -} - diff --git a/build/premake/premake5/contrib/lua/src/lvm.c b/build/premake/premake5/contrib/lua/src/lvm.c deleted file mode 100644 index cc43d8714d..0000000000 --- a/build/premake/premake5/contrib/lua/src/lvm.c +++ /dev/null @@ -1,1322 +0,0 @@ -/* -** $Id: lvm.c,v 2.268.1.1 2017/04/19 17:39:34 roberto Exp $ -** Lua virtual machine -** See Copyright Notice in lua.h -*/ - -#define lvm_c -#define LUA_CORE - -#include "lprefix.h" - -#include -#include -#include -#include -#include -#include - -#include "lua.h" - -#include "ldebug.h" -#include "ldo.h" -#include "lfunc.h" -#include "lgc.h" -#include "lobject.h" -#include "lopcodes.h" -#include "lstate.h" -#include "lstring.h" -#include "ltable.h" -#include "ltm.h" -#include "lvm.h" - - -/* limit for table tag-method chains (to avoid loops) */ -#define MAXTAGLOOP 2000 - - - -/* -** 'l_intfitsf' checks whether a given integer can be converted to a -** float without rounding. Used in comparisons. Left undefined if -** all integers fit in a float precisely. -*/ -#if !defined(l_intfitsf) - -/* number of bits in the mantissa of a float */ -#define NBM (l_mathlim(MANT_DIG)) - -/* -** Check whether some integers may not fit in a float, that is, whether -** (maxinteger >> NBM) > 0 (that implies (1 << NBM) <= maxinteger). -** (The shifts are done in parts to avoid shifting by more than the size -** of an integer. In a worst case, NBM == 113 for long double and -** sizeof(integer) == 32.) -*/ -#if ((((LUA_MAXINTEGER >> (NBM / 4)) >> (NBM / 4)) >> (NBM / 4)) \ - >> (NBM - (3 * (NBM / 4)))) > 0 - -#define l_intfitsf(i) \ - (-((lua_Integer)1 << NBM) <= (i) && (i) <= ((lua_Integer)1 << NBM)) - -#endif - -#endif - - - -/* -** Try to convert a value to a float. The float case is already handled -** by the macro 'tonumber'. -*/ -int luaV_tonumber_ (const TValue *obj, lua_Number *n) { - TValue v; - if (ttisinteger(obj)) { - *n = cast_num(ivalue(obj)); - return 1; - } - else if (cvt2num(obj) && /* string convertible to number? */ - luaO_str2num(svalue(obj), &v) == vslen(obj) + 1) { - *n = nvalue(&v); /* convert result of 'luaO_str2num' to a float */ - return 1; - } - else - return 0; /* conversion failed */ -} - - -/* -** try to convert a value to an integer, rounding according to 'mode': -** mode == 0: accepts only integral values -** mode == 1: takes the floor of the number -** mode == 2: takes the ceil of the number -*/ -int luaV_tointeger (const TValue *obj, lua_Integer *p, int mode) { - TValue v; - again: - if (ttisfloat(obj)) { - lua_Number n = fltvalue(obj); - lua_Number f = l_floor(n); - if (n != f) { /* not an integral value? */ - if (mode == 0) return 0; /* fails if mode demands integral value */ - else if (mode > 1) /* needs ceil? */ - f += 1; /* convert floor to ceil (remember: n != f) */ - } - return lua_numbertointeger(f, p); - } - else if (ttisinteger(obj)) { - *p = ivalue(obj); - return 1; - } - else if (cvt2num(obj) && - luaO_str2num(svalue(obj), &v) == vslen(obj) + 1) { - obj = &v; - goto again; /* convert result from 'luaO_str2num' to an integer */ - } - return 0; /* conversion failed */ -} - - -/* -** Try to convert a 'for' limit to an integer, preserving the -** semantics of the loop. -** (The following explanation assumes a non-negative step; it is valid -** for negative steps mutatis mutandis.) -** If the limit can be converted to an integer, rounding down, that is -** it. -** Otherwise, check whether the limit can be converted to a number. If -** the number is too large, it is OK to set the limit as LUA_MAXINTEGER, -** which means no limit. If the number is too negative, the loop -** should not run, because any initial integer value is larger than the -** limit. So, it sets the limit to LUA_MININTEGER. 'stopnow' corrects -** the extreme case when the initial value is LUA_MININTEGER, in which -** case the LUA_MININTEGER limit would still run the loop once. -*/ -static int forlimit (const TValue *obj, lua_Integer *p, lua_Integer step, - int *stopnow) { - *stopnow = 0; /* usually, let loops run */ - if (!luaV_tointeger(obj, p, (step < 0 ? 2 : 1))) { /* not fit in integer? */ - lua_Number n; /* try to convert to float */ - if (!tonumber(obj, &n)) /* cannot convert to float? */ - return 0; /* not a number */ - if (luai_numlt(0, n)) { /* if true, float is larger than max integer */ - *p = LUA_MAXINTEGER; - if (step < 0) *stopnow = 1; - } - else { /* float is smaller than min integer */ - *p = LUA_MININTEGER; - if (step >= 0) *stopnow = 1; - } - } - return 1; -} - - -/* -** Finish the table access 'val = t[key]'. -** if 'slot' is NULL, 't' is not a table; otherwise, 'slot' points to -** t[k] entry (which must be nil). -*/ -void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val, - const TValue *slot) { - int loop; /* counter to avoid infinite loops */ - const TValue *tm; /* metamethod */ - for (loop = 0; loop < MAXTAGLOOP; loop++) { - if (slot == NULL) { /* 't' is not a table? */ - lua_assert(!ttistable(t)); - tm = luaT_gettmbyobj(L, t, TM_INDEX); - if (ttisnil(tm)) - luaG_typeerror(L, t, "index"); /* no metamethod */ - /* else will try the metamethod */ - } - else { /* 't' is a table */ - lua_assert(ttisnil(slot)); - tm = fasttm(L, hvalue(t)->metatable, TM_INDEX); /* table's metamethod */ - if (tm == NULL) { /* no metamethod? */ - setnilvalue(val); /* result is nil */ - return; - } - /* else will try the metamethod */ - } - if (ttisfunction(tm)) { /* is metamethod a function? */ - luaT_callTM(L, tm, t, key, val, 1); /* call it */ - return; - } - t = tm; /* else try to access 'tm[key]' */ - if (luaV_fastget(L,t,key,slot,luaH_get)) { /* fast track? */ - setobj2s(L, val, slot); /* done */ - return; - } - /* else repeat (tail call 'luaV_finishget') */ - } - luaG_runerror(L, "'__index' chain too long; possible loop"); -} - - -/* -** Finish a table assignment 't[key] = val'. -** If 'slot' is NULL, 't' is not a table. Otherwise, 'slot' points -** to the entry 't[key]', or to 'luaO_nilobject' if there is no such -** entry. (The value at 'slot' must be nil, otherwise 'luaV_fastset' -** would have done the job.) -*/ -void luaV_finishset (lua_State *L, const TValue *t, TValue *key, - StkId val, const TValue *slot) { - int loop; /* counter to avoid infinite loops */ - for (loop = 0; loop < MAXTAGLOOP; loop++) { - const TValue *tm; /* '__newindex' metamethod */ - if (slot != NULL) { /* is 't' a table? */ - Table *h = hvalue(t); /* save 't' table */ - lua_assert(ttisnil(slot)); /* old value must be nil */ - tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */ - if (tm == NULL) { /* no metamethod? */ - if (slot == luaO_nilobject) /* no previous entry? */ - slot = luaH_newkey(L, h, key); /* create one */ - /* no metamethod and (now) there is an entry with given key */ - setobj2t(L, cast(TValue *, slot), val); /* set its new value */ - invalidateTMcache(h); - luaC_barrierback(L, h, val); - return; - } - /* else will try the metamethod */ - } - else { /* not a table; check metamethod */ - if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX))) - luaG_typeerror(L, t, "index"); - } - /* try the metamethod */ - if (ttisfunction(tm)) { - luaT_callTM(L, tm, t, key, val, 0); - return; - } - t = tm; /* else repeat assignment over 'tm' */ - if (luaV_fastset(L, t, key, slot, luaH_get, val)) - return; /* done */ - /* else loop */ - } - luaG_runerror(L, "'__newindex' chain too long; possible loop"); -} - - -/* -** Compare two strings 'ls' x 'rs', returning an integer smaller-equal- -** -larger than zero if 'ls' is smaller-equal-larger than 'rs'. -** The code is a little tricky because it allows '\0' in the strings -** and it uses 'strcoll' (to respect locales) for each segments -** of the strings. -*/ -static int l_strcmp (const TString *ls, const TString *rs) { - const char *l = getstr(ls); - size_t ll = tsslen(ls); - const char *r = getstr(rs); - size_t lr = tsslen(rs); - for (;;) { /* for each segment */ - int temp = strcoll(l, r); - if (temp != 0) /* not equal? */ - return temp; /* done */ - else { /* strings are equal up to a '\0' */ - size_t len = strlen(l); /* index of first '\0' in both strings */ - if (len == lr) /* 'rs' is finished? */ - return (len == ll) ? 0 : 1; /* check 'ls' */ - else if (len == ll) /* 'ls' is finished? */ - return -1; /* 'ls' is smaller than 'rs' ('rs' is not finished) */ - /* both strings longer than 'len'; go on comparing after the '\0' */ - len++; - l += len; ll -= len; r += len; lr -= len; - } - } -} - - -/* -** Check whether integer 'i' is less than float 'f'. If 'i' has an -** exact representation as a float ('l_intfitsf'), compare numbers as -** floats. Otherwise, if 'f' is outside the range for integers, result -** is trivial. Otherwise, compare them as integers. (When 'i' has no -** float representation, either 'f' is "far away" from 'i' or 'f' has -** no precision left for a fractional part; either way, how 'f' is -** truncated is irrelevant.) When 'f' is NaN, comparisons must result -** in false. -*/ -static int LTintfloat (lua_Integer i, lua_Number f) { -#if defined(l_intfitsf) - if (!l_intfitsf(i)) { - if (f >= -cast_num(LUA_MININTEGER)) /* -minint == maxint + 1 */ - return 1; /* f >= maxint + 1 > i */ - else if (f > cast_num(LUA_MININTEGER)) /* minint < f <= maxint ? */ - return (i < cast(lua_Integer, f)); /* compare them as integers */ - else /* f <= minint <= i (or 'f' is NaN) --> not(i < f) */ - return 0; - } -#endif - return luai_numlt(cast_num(i), f); /* compare them as floats */ -} - - -/* -** Check whether integer 'i' is less than or equal to float 'f'. -** See comments on previous function. -*/ -static int LEintfloat (lua_Integer i, lua_Number f) { -#if defined(l_intfitsf) - if (!l_intfitsf(i)) { - if (f >= -cast_num(LUA_MININTEGER)) /* -minint == maxint + 1 */ - return 1; /* f >= maxint + 1 > i */ - else if (f >= cast_num(LUA_MININTEGER)) /* minint <= f <= maxint ? */ - return (i <= cast(lua_Integer, f)); /* compare them as integers */ - else /* f < minint <= i (or 'f' is NaN) --> not(i <= f) */ - return 0; - } -#endif - return luai_numle(cast_num(i), f); /* compare them as floats */ -} - - -/* -** Return 'l < r', for numbers. -*/ -static int LTnum (const TValue *l, const TValue *r) { - if (ttisinteger(l)) { - lua_Integer li = ivalue(l); - if (ttisinteger(r)) - return li < ivalue(r); /* both are integers */ - else /* 'l' is int and 'r' is float */ - return LTintfloat(li, fltvalue(r)); /* l < r ? */ - } - else { - lua_Number lf = fltvalue(l); /* 'l' must be float */ - if (ttisfloat(r)) - return luai_numlt(lf, fltvalue(r)); /* both are float */ - else if (luai_numisnan(lf)) /* 'r' is int and 'l' is float */ - return 0; /* NaN < i is always false */ - else /* without NaN, (l < r) <--> not(r <= l) */ - return !LEintfloat(ivalue(r), lf); /* not (r <= l) ? */ - } -} - - -/* -** Return 'l <= r', for numbers. -*/ -static int LEnum (const TValue *l, const TValue *r) { - if (ttisinteger(l)) { - lua_Integer li = ivalue(l); - if (ttisinteger(r)) - return li <= ivalue(r); /* both are integers */ - else /* 'l' is int and 'r' is float */ - return LEintfloat(li, fltvalue(r)); /* l <= r ? */ - } - else { - lua_Number lf = fltvalue(l); /* 'l' must be float */ - if (ttisfloat(r)) - return luai_numle(lf, fltvalue(r)); /* both are float */ - else if (luai_numisnan(lf)) /* 'r' is int and 'l' is float */ - return 0; /* NaN <= i is always false */ - else /* without NaN, (l <= r) <--> not(r < l) */ - return !LTintfloat(ivalue(r), lf); /* not (r < l) ? */ - } -} - - -/* -** Main operation less than; return 'l < r'. -*/ -int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) { - int res; - if (ttisnumber(l) && ttisnumber(r)) /* both operands are numbers? */ - return LTnum(l, r); - else if (ttisstring(l) && ttisstring(r)) /* both are strings? */ - return l_strcmp(tsvalue(l), tsvalue(r)) < 0; - else if ((res = luaT_callorderTM(L, l, r, TM_LT)) < 0) /* no metamethod? */ - luaG_ordererror(L, l, r); /* error */ - return res; -} - - -/* -** Main operation less than or equal to; return 'l <= r'. If it needs -** a metamethod and there is no '__le', try '__lt', based on -** l <= r iff !(r < l) (assuming a total order). If the metamethod -** yields during this substitution, the continuation has to know -** about it (to negate the result of r= 0) /* try 'le' */ - return res; - else { /* try 'lt': */ - L->ci->callstatus |= CIST_LEQ; /* mark it is doing 'lt' for 'le' */ - res = luaT_callorderTM(L, r, l, TM_LT); - L->ci->callstatus ^= CIST_LEQ; /* clear mark */ - if (res < 0) - luaG_ordererror(L, l, r); - return !res; /* result is negated */ - } -} - - -/* -** Main operation for equality of Lua values; return 't1 == t2'. -** L == NULL means raw equality (no metamethods) -*/ -int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2) { - const TValue *tm; - if (ttype(t1) != ttype(t2)) { /* not the same variant? */ - if (ttnov(t1) != ttnov(t2) || ttnov(t1) != LUA_TNUMBER) - return 0; /* only numbers can be equal with different variants */ - else { /* two numbers with different variants */ - lua_Integer i1, i2; /* compare them as integers */ - return (tointeger(t1, &i1) && tointeger(t2, &i2) && i1 == i2); - } - } - /* values have same type and same variant */ - switch (ttype(t1)) { - case LUA_TNIL: return 1; - case LUA_TNUMINT: return (ivalue(t1) == ivalue(t2)); - case LUA_TNUMFLT: return luai_numeq(fltvalue(t1), fltvalue(t2)); - case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* true must be 1 !! */ - case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2); - case LUA_TLCF: return fvalue(t1) == fvalue(t2); - case LUA_TSHRSTR: return eqshrstr(tsvalue(t1), tsvalue(t2)); - case LUA_TLNGSTR: return luaS_eqlngstr(tsvalue(t1), tsvalue(t2)); - case LUA_TUSERDATA: { - if (uvalue(t1) == uvalue(t2)) return 1; - else if (L == NULL) return 0; - tm = fasttm(L, uvalue(t1)->metatable, TM_EQ); - if (tm == NULL) - tm = fasttm(L, uvalue(t2)->metatable, TM_EQ); - break; /* will try TM */ - } - case LUA_TTABLE: { - if (hvalue(t1) == hvalue(t2)) return 1; - else if (L == NULL) return 0; - tm = fasttm(L, hvalue(t1)->metatable, TM_EQ); - if (tm == NULL) - tm = fasttm(L, hvalue(t2)->metatable, TM_EQ); - break; /* will try TM */ - } - default: - return gcvalue(t1) == gcvalue(t2); - } - if (tm == NULL) /* no TM? */ - return 0; /* objects are different */ - luaT_callTM(L, tm, t1, t2, L->top, 1); /* call TM */ - return !l_isfalse(L->top); -} - - -/* macro used by 'luaV_concat' to ensure that element at 'o' is a string */ -#define tostring(L,o) \ - (ttisstring(o) || (cvt2str(o) && (luaO_tostring(L, o), 1))) - -#define isemptystr(o) (ttisshrstring(o) && tsvalue(o)->shrlen == 0) - -/* copy strings in stack from top - n up to top - 1 to buffer */ -static void copy2buff (StkId top, int n, char *buff) { - size_t tl = 0; /* size already copied */ - do { - size_t l = vslen(top - n); /* length of string being copied */ - memcpy(buff + tl, svalue(top - n), l * sizeof(char)); - tl += l; - } while (--n > 0); -} - - -/* -** Main operation for concatenation: concat 'total' values in the stack, -** from 'L->top - total' up to 'L->top - 1'. -*/ -void luaV_concat (lua_State *L, int total) { - lua_assert(total >= 2); - do { - StkId top = L->top; - int n = 2; /* number of elements handled in this pass (at least 2) */ - if (!(ttisstring(top-2) || cvt2str(top-2)) || !tostring(L, top-1)) - luaT_trybinTM(L, top-2, top-1, top-2, TM_CONCAT); - else if (isemptystr(top - 1)) /* second operand is empty? */ - cast_void(tostring(L, top - 2)); /* result is first operand */ - else if (isemptystr(top - 2)) { /* first operand is an empty string? */ - setobjs2s(L, top - 2, top - 1); /* result is second op. */ - } - else { - /* at least two non-empty string values; get as many as possible */ - size_t tl = vslen(top - 1); - TString *ts; - /* collect total length and number of strings */ - for (n = 1; n < total && tostring(L, top - n - 1); n++) { - size_t l = vslen(top - n - 1); - if (l >= (MAX_SIZE/sizeof(char)) - tl) - luaG_runerror(L, "string length overflow"); - tl += l; - } - if (tl <= LUAI_MAXSHORTLEN) { /* is result a short string? */ - char buff[LUAI_MAXSHORTLEN]; - copy2buff(top, n, buff); /* copy strings to buffer */ - ts = luaS_newlstr(L, buff, tl); - } - else { /* long string; copy strings directly to final result */ - ts = luaS_createlngstrobj(L, tl); - copy2buff(top, n, getstr(ts)); - } - setsvalue2s(L, top - n, ts); /* create result */ - } - total -= n-1; /* got 'n' strings to create 1 new */ - L->top -= n-1; /* popped 'n' strings and pushed one */ - } while (total > 1); /* repeat until only 1 result left */ -} - - -/* -** Main operation 'ra' = #rb'. -*/ -void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) { - const TValue *tm; - switch (ttype(rb)) { - case LUA_TTABLE: { - Table *h = hvalue(rb); - tm = fasttm(L, h->metatable, TM_LEN); - if (tm) break; /* metamethod? break switch to call it */ - setivalue(ra, luaH_getn(h)); /* else primitive len */ - return; - } - case LUA_TSHRSTR: { - setivalue(ra, tsvalue(rb)->shrlen); - return; - } - case LUA_TLNGSTR: { - setivalue(ra, tsvalue(rb)->u.lnglen); - return; - } - default: { /* try metamethod */ - tm = luaT_gettmbyobj(L, rb, TM_LEN); - if (ttisnil(tm)) /* no metamethod? */ - luaG_typeerror(L, rb, "get length of"); - break; - } - } - luaT_callTM(L, tm, rb, rb, ra, 1); -} - - -/* -** Integer division; return 'm // n', that is, floor(m/n). -** C division truncates its result (rounds towards zero). -** 'floor(q) == trunc(q)' when 'q >= 0' or when 'q' is integer, -** otherwise 'floor(q) == trunc(q) - 1'. -*/ -lua_Integer luaV_div (lua_State *L, lua_Integer m, lua_Integer n) { - if (l_castS2U(n) + 1u <= 1u) { /* special cases: -1 or 0 */ - if (n == 0) - luaG_runerror(L, "attempt to divide by zero"); - return intop(-, 0, m); /* n==-1; avoid overflow with 0x80000...//-1 */ - } - else { - lua_Integer q = m / n; /* perform C division */ - if ((m ^ n) < 0 && m % n != 0) /* 'm/n' would be negative non-integer? */ - q -= 1; /* correct result for different rounding */ - return q; - } -} - - -/* -** Integer modulus; return 'm % n'. (Assume that C '%' with -** negative operands follows C99 behavior. See previous comment -** about luaV_div.) -*/ -lua_Integer luaV_mod (lua_State *L, lua_Integer m, lua_Integer n) { - if (l_castS2U(n) + 1u <= 1u) { /* special cases: -1 or 0 */ - if (n == 0) - luaG_runerror(L, "attempt to perform 'n%%0'"); - return 0; /* m % -1 == 0; avoid overflow with 0x80000...%-1 */ - } - else { - lua_Integer r = m % n; - if (r != 0 && (m ^ n) < 0) /* 'm/n' would be non-integer negative? */ - r += n; /* correct result for different rounding */ - return r; - } -} - - -/* number of bits in an integer */ -#define NBITS cast_int(sizeof(lua_Integer) * CHAR_BIT) - -/* -** Shift left operation. (Shift right just negates 'y'.) -*/ -lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) { - if (y < 0) { /* shift right? */ - if (y <= -NBITS) return 0; - else return intop(>>, x, -y); - } - else { /* shift left */ - if (y >= NBITS) return 0; - else return intop(<<, x, y); - } -} - - -/* -** check whether cached closure in prototype 'p' may be reused, that is, -** whether there is a cached closure with the same upvalues needed by -** new closure to be created. -*/ -static LClosure *getcached (Proto *p, UpVal **encup, StkId base) { - LClosure *c = p->cache; - if (c != NULL) { /* is there a cached closure? */ - int nup = p->sizeupvalues; - Upvaldesc *uv = p->upvalues; - int i; - for (i = 0; i < nup; i++) { /* check whether it has right upvalues */ - TValue *v = uv[i].instack ? base + uv[i].idx : encup[uv[i].idx]->v; - if (c->upvals[i]->v != v) - return NULL; /* wrong upvalue; cannot reuse closure */ - } - } - return c; /* return cached closure (or NULL if no cached closure) */ -} - - -/* -** create a new Lua closure, push it in the stack, and initialize -** its upvalues. Note that the closure is not cached if prototype is -** already black (which means that 'cache' was already cleared by the -** GC). -*/ -static void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base, - StkId ra) { - int nup = p->sizeupvalues; - Upvaldesc *uv = p->upvalues; - int i; - LClosure *ncl = luaF_newLclosure(L, nup); - ncl->p = p; - setclLvalue(L, ra, ncl); /* anchor new closure in stack */ - for (i = 0; i < nup; i++) { /* fill in its upvalues */ - if (uv[i].instack) /* upvalue refers to local variable? */ - ncl->upvals[i] = luaF_findupval(L, base + uv[i].idx); - else /* get upvalue from enclosing function */ - ncl->upvals[i] = encup[uv[i].idx]; - ncl->upvals[i]->refcount++; - /* new closure is white, so we do not need a barrier here */ - } - if (!isblack(p)) /* cache will not break GC invariant? */ - p->cache = ncl; /* save it on cache for reuse */ -} - - -/* -** finish execution of an opcode interrupted by an yield -*/ -void luaV_finishOp (lua_State *L) { - CallInfo *ci = L->ci; - StkId base = ci->u.l.base; - Instruction inst = *(ci->u.l.savedpc - 1); /* interrupted instruction */ - OpCode op = GET_OPCODE(inst); - switch (op) { /* finish its execution */ - case OP_ADD: case OP_SUB: case OP_MUL: case OP_DIV: case OP_IDIV: - case OP_BAND: case OP_BOR: case OP_BXOR: case OP_SHL: case OP_SHR: - case OP_MOD: case OP_POW: - case OP_UNM: case OP_BNOT: case OP_LEN: - case OP_GETTABUP: case OP_GETTABLE: case OP_SELF: { - setobjs2s(L, base + GETARG_A(inst), --L->top); - break; - } - case OP_LE: case OP_LT: case OP_EQ: { - int res = !l_isfalse(L->top - 1); - L->top--; - if (ci->callstatus & CIST_LEQ) { /* "<=" using "<" instead? */ - lua_assert(op == OP_LE); - ci->callstatus ^= CIST_LEQ; /* clear mark */ - res = !res; /* negate result */ - } - lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_JMP); - if (res != GETARG_A(inst)) /* condition failed? */ - ci->u.l.savedpc++; /* skip jump instruction */ - break; - } - case OP_CONCAT: { - StkId top = L->top - 1; /* top when 'luaT_trybinTM' was called */ - int b = GETARG_B(inst); /* first element to concatenate */ - int total = cast_int(top - 1 - (base + b)); /* yet to concatenate */ - setobj2s(L, top - 2, top); /* put TM result in proper position */ - if (total > 1) { /* are there elements to concat? */ - L->top = top - 1; /* top is one after last element (at top-2) */ - luaV_concat(L, total); /* concat them (may yield again) */ - } - /* move final result to final position */ - setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1); - L->top = ci->top; /* restore top */ - break; - } - case OP_TFORCALL: { - lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_TFORLOOP); - L->top = ci->top; /* correct top */ - break; - } - case OP_CALL: { - if (GETARG_C(inst) - 1 >= 0) /* nresults >= 0? */ - L->top = ci->top; /* adjust results */ - break; - } - case OP_TAILCALL: case OP_SETTABUP: case OP_SETTABLE: - break; - default: lua_assert(0); - } -} - - - - -/* -** {================================================================== -** Function 'luaV_execute': main interpreter loop -** =================================================================== -*/ - - -/* -** some macros for common tasks in 'luaV_execute' -*/ - - -#define RA(i) (base+GETARG_A(i)) -#define RB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i)) -#define RC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i)) -#define RKB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgK, \ - ISK(GETARG_B(i)) ? k+INDEXK(GETARG_B(i)) : base+GETARG_B(i)) -#define RKC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgK, \ - ISK(GETARG_C(i)) ? k+INDEXK(GETARG_C(i)) : base+GETARG_C(i)) - - -/* execute a jump instruction */ -#define dojump(ci,i,e) \ - { int a = GETARG_A(i); \ - if (a != 0) luaF_close(L, ci->u.l.base + a - 1); \ - ci->u.l.savedpc += GETARG_sBx(i) + e; } - -/* for test instructions, execute the jump instruction that follows it */ -#define donextjump(ci) { i = *ci->u.l.savedpc; dojump(ci, i, 1); } - - -#define Protect(x) { {x;}; base = ci->u.l.base; } - -#define checkGC(L,c) \ - { luaC_condGC(L, L->top = (c), /* limit of live values */ \ - Protect(L->top = ci->top)); /* restore top */ \ - luai_threadyield(L); } - - -/* fetch an instruction and prepare its execution */ -#define vmfetch() { \ - i = *(ci->u.l.savedpc++); \ - if (L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) \ - Protect(luaG_traceexec(L)); \ - ra = RA(i); /* WARNING: any stack reallocation invalidates 'ra' */ \ - lua_assert(base == ci->u.l.base); \ - lua_assert(base <= L->top && L->top < L->stack + L->stacksize); \ -} - -#define vmdispatch(o) switch(o) -#define vmcase(l) case l: -#define vmbreak break - - -/* -** copy of 'luaV_gettable', but protecting the call to potential -** metamethod (which can reallocate the stack) -*/ -#define gettableProtected(L,t,k,v) { const TValue *slot; \ - if (luaV_fastget(L,t,k,slot,luaH_get)) { setobj2s(L, v, slot); } \ - else Protect(luaV_finishget(L,t,k,v,slot)); } - - -/* same for 'luaV_settable' */ -#define settableProtected(L,t,k,v) { const TValue *slot; \ - if (!luaV_fastset(L,t,k,slot,luaH_get,v)) \ - Protect(luaV_finishset(L,t,k,v,slot)); } - - - -void luaV_execute (lua_State *L) { - CallInfo *ci = L->ci; - LClosure *cl; - TValue *k; - StkId base; - ci->callstatus |= CIST_FRESH; /* fresh invocation of 'luaV_execute" */ - newframe: /* reentry point when frame changes (call/return) */ - lua_assert(ci == L->ci); - cl = clLvalue(ci->func); /* local reference to function's closure */ - k = cl->p->k; /* local reference to function's constant table */ - base = ci->u.l.base; /* local copy of function's base */ - /* main loop of interpreter */ - for (;;) { - Instruction i; - StkId ra; - vmfetch(); - vmdispatch (GET_OPCODE(i)) { - vmcase(OP_MOVE) { - setobjs2s(L, ra, RB(i)); - vmbreak; - } - vmcase(OP_LOADK) { - TValue *rb = k + GETARG_Bx(i); - setobj2s(L, ra, rb); - vmbreak; - } - vmcase(OP_LOADKX) { - TValue *rb; - lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_EXTRAARG); - rb = k + GETARG_Ax(*ci->u.l.savedpc++); - setobj2s(L, ra, rb); - vmbreak; - } - vmcase(OP_LOADBOOL) { - setbvalue(ra, GETARG_B(i)); - if (GETARG_C(i)) ci->u.l.savedpc++; /* skip next instruction (if C) */ - vmbreak; - } - vmcase(OP_LOADNIL) { - int b = GETARG_B(i); - do { - setnilvalue(ra++); - } while (b--); - vmbreak; - } - vmcase(OP_GETUPVAL) { - int b = GETARG_B(i); - setobj2s(L, ra, cl->upvals[b]->v); - vmbreak; - } - vmcase(OP_GETTABUP) { - TValue *upval = cl->upvals[GETARG_B(i)]->v; - TValue *rc = RKC(i); - gettableProtected(L, upval, rc, ra); - vmbreak; - } - vmcase(OP_GETTABLE) { - StkId rb = RB(i); - TValue *rc = RKC(i); - gettableProtected(L, rb, rc, ra); - vmbreak; - } - vmcase(OP_SETTABUP) { - TValue *upval = cl->upvals[GETARG_A(i)]->v; - TValue *rb = RKB(i); - TValue *rc = RKC(i); - settableProtected(L, upval, rb, rc); - vmbreak; - } - vmcase(OP_SETUPVAL) { - UpVal *uv = cl->upvals[GETARG_B(i)]; - setobj(L, uv->v, ra); - luaC_upvalbarrier(L, uv); - vmbreak; - } - vmcase(OP_SETTABLE) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - settableProtected(L, ra, rb, rc); - vmbreak; - } - vmcase(OP_NEWTABLE) { - int b = GETARG_B(i); - int c = GETARG_C(i); - Table *t = luaH_new(L); - sethvalue(L, ra, t); - if (b != 0 || c != 0) - luaH_resize(L, t, luaO_fb2int(b), luaO_fb2int(c)); - checkGC(L, ra + 1); - vmbreak; - } - vmcase(OP_SELF) { - const TValue *aux; - StkId rb = RB(i); - TValue *rc = RKC(i); - TString *key = tsvalue(rc); /* key must be a string */ - setobjs2s(L, ra + 1, rb); - if (luaV_fastget(L, rb, key, aux, luaH_getstr)) { - setobj2s(L, ra, aux); - } - else Protect(luaV_finishget(L, rb, rc, ra, aux)); - vmbreak; - } - vmcase(OP_ADD) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (ttisinteger(rb) && ttisinteger(rc)) { - lua_Integer ib = ivalue(rb); lua_Integer ic = ivalue(rc); - setivalue(ra, intop(+, ib, ic)); - } - else if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - setfltvalue(ra, luai_numadd(L, nb, nc)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_ADD)); } - vmbreak; - } - vmcase(OP_SUB) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (ttisinteger(rb) && ttisinteger(rc)) { - lua_Integer ib = ivalue(rb); lua_Integer ic = ivalue(rc); - setivalue(ra, intop(-, ib, ic)); - } - else if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - setfltvalue(ra, luai_numsub(L, nb, nc)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_SUB)); } - vmbreak; - } - vmcase(OP_MUL) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (ttisinteger(rb) && ttisinteger(rc)) { - lua_Integer ib = ivalue(rb); lua_Integer ic = ivalue(rc); - setivalue(ra, intop(*, ib, ic)); - } - else if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - setfltvalue(ra, luai_nummul(L, nb, nc)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_MUL)); } - vmbreak; - } - vmcase(OP_DIV) { /* float division (always with floats) */ - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - setfltvalue(ra, luai_numdiv(L, nb, nc)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_DIV)); } - vmbreak; - } - vmcase(OP_BAND) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Integer ib; lua_Integer ic; - if (tointeger(rb, &ib) && tointeger(rc, &ic)) { - setivalue(ra, intop(&, ib, ic)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_BAND)); } - vmbreak; - } - vmcase(OP_BOR) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Integer ib; lua_Integer ic; - if (tointeger(rb, &ib) && tointeger(rc, &ic)) { - setivalue(ra, intop(|, ib, ic)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_BOR)); } - vmbreak; - } - vmcase(OP_BXOR) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Integer ib; lua_Integer ic; - if (tointeger(rb, &ib) && tointeger(rc, &ic)) { - setivalue(ra, intop(^, ib, ic)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_BXOR)); } - vmbreak; - } - vmcase(OP_SHL) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Integer ib; lua_Integer ic; - if (tointeger(rb, &ib) && tointeger(rc, &ic)) { - setivalue(ra, luaV_shiftl(ib, ic)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_SHL)); } - vmbreak; - } - vmcase(OP_SHR) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Integer ib; lua_Integer ic; - if (tointeger(rb, &ib) && tointeger(rc, &ic)) { - setivalue(ra, luaV_shiftl(ib, -ic)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_SHR)); } - vmbreak; - } - vmcase(OP_MOD) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (ttisinteger(rb) && ttisinteger(rc)) { - lua_Integer ib = ivalue(rb); lua_Integer ic = ivalue(rc); - setivalue(ra, luaV_mod(L, ib, ic)); - } - else if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - lua_Number m; - luai_nummod(L, nb, nc, m); - setfltvalue(ra, m); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_MOD)); } - vmbreak; - } - vmcase(OP_IDIV) { /* floor division */ - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (ttisinteger(rb) && ttisinteger(rc)) { - lua_Integer ib = ivalue(rb); lua_Integer ic = ivalue(rc); - setivalue(ra, luaV_div(L, ib, ic)); - } - else if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - setfltvalue(ra, luai_numidiv(L, nb, nc)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_IDIV)); } - vmbreak; - } - vmcase(OP_POW) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - lua_Number nb; lua_Number nc; - if (tonumber(rb, &nb) && tonumber(rc, &nc)) { - setfltvalue(ra, luai_numpow(L, nb, nc)); - } - else { Protect(luaT_trybinTM(L, rb, rc, ra, TM_POW)); } - vmbreak; - } - vmcase(OP_UNM) { - TValue *rb = RB(i); - lua_Number nb; - if (ttisinteger(rb)) { - lua_Integer ib = ivalue(rb); - setivalue(ra, intop(-, 0, ib)); - } - else if (tonumber(rb, &nb)) { - setfltvalue(ra, luai_numunm(L, nb)); - } - else { - Protect(luaT_trybinTM(L, rb, rb, ra, TM_UNM)); - } - vmbreak; - } - vmcase(OP_BNOT) { - TValue *rb = RB(i); - lua_Integer ib; - if (tointeger(rb, &ib)) { - setivalue(ra, intop(^, ~l_castS2U(0), ib)); - } - else { - Protect(luaT_trybinTM(L, rb, rb, ra, TM_BNOT)); - } - vmbreak; - } - vmcase(OP_NOT) { - TValue *rb = RB(i); - int res = l_isfalse(rb); /* next assignment may change this value */ - setbvalue(ra, res); - vmbreak; - } - vmcase(OP_LEN) { - Protect(luaV_objlen(L, ra, RB(i))); - vmbreak; - } - vmcase(OP_CONCAT) { - int b = GETARG_B(i); - int c = GETARG_C(i); - StkId rb; - L->top = base + c + 1; /* mark the end of concat operands */ - Protect(luaV_concat(L, c - b + 1)); - ra = RA(i); /* 'luaV_concat' may invoke TMs and move the stack */ - rb = base + b; - setobjs2s(L, ra, rb); - checkGC(L, (ra >= rb ? ra + 1 : rb)); - L->top = ci->top; /* restore top */ - vmbreak; - } - vmcase(OP_JMP) { - dojump(ci, i, 0); - vmbreak; - } - vmcase(OP_EQ) { - TValue *rb = RKB(i); - TValue *rc = RKC(i); - Protect( - if (luaV_equalobj(L, rb, rc) != GETARG_A(i)) - ci->u.l.savedpc++; - else - donextjump(ci); - ) - vmbreak; - } - vmcase(OP_LT) { - Protect( - if (luaV_lessthan(L, RKB(i), RKC(i)) != GETARG_A(i)) - ci->u.l.savedpc++; - else - donextjump(ci); - ) - vmbreak; - } - vmcase(OP_LE) { - Protect( - if (luaV_lessequal(L, RKB(i), RKC(i)) != GETARG_A(i)) - ci->u.l.savedpc++; - else - donextjump(ci); - ) - vmbreak; - } - vmcase(OP_TEST) { - if (GETARG_C(i) ? l_isfalse(ra) : !l_isfalse(ra)) - ci->u.l.savedpc++; - else - donextjump(ci); - vmbreak; - } - vmcase(OP_TESTSET) { - TValue *rb = RB(i); - if (GETARG_C(i) ? l_isfalse(rb) : !l_isfalse(rb)) - ci->u.l.savedpc++; - else { - setobjs2s(L, ra, rb); - donextjump(ci); - } - vmbreak; - } - vmcase(OP_CALL) { - int b = GETARG_B(i); - int nresults = GETARG_C(i) - 1; - if (b != 0) L->top = ra+b; /* else previous instruction set top */ - if (luaD_precall(L, ra, nresults)) { /* C function? */ - if (nresults >= 0) - L->top = ci->top; /* adjust results */ - Protect((void)0); /* update 'base' */ - } - else { /* Lua function */ - ci = L->ci; - goto newframe; /* restart luaV_execute over new Lua function */ - } - vmbreak; - } - vmcase(OP_TAILCALL) { - int b = GETARG_B(i); - if (b != 0) L->top = ra+b; /* else previous instruction set top */ - lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); - if (luaD_precall(L, ra, LUA_MULTRET)) { /* C function? */ - Protect((void)0); /* update 'base' */ - } - else { - /* tail call: put called frame (n) in place of caller one (o) */ - CallInfo *nci = L->ci; /* called frame */ - CallInfo *oci = nci->previous; /* caller frame */ - StkId nfunc = nci->func; /* called function */ - StkId ofunc = oci->func; /* caller function */ - /* last stack slot filled by 'precall' */ - StkId lim = nci->u.l.base + getproto(nfunc)->numparams; - int aux; - /* close all upvalues from previous call */ - if (cl->p->sizep > 0) luaF_close(L, oci->u.l.base); - /* move new frame into old one */ - for (aux = 0; nfunc + aux < lim; aux++) - setobjs2s(L, ofunc + aux, nfunc + aux); - oci->u.l.base = ofunc + (nci->u.l.base - nfunc); /* correct base */ - oci->top = L->top = ofunc + (L->top - nfunc); /* correct top */ - oci->u.l.savedpc = nci->u.l.savedpc; - oci->callstatus |= CIST_TAIL; /* function was tail called */ - ci = L->ci = oci; /* remove new frame */ - lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize); - goto newframe; /* restart luaV_execute over new Lua function */ - } - vmbreak; - } - vmcase(OP_RETURN) { - int b = GETARG_B(i); - if (cl->p->sizep > 0) luaF_close(L, base); - b = luaD_poscall(L, ci, ra, (b != 0 ? b - 1 : cast_int(L->top - ra))); - if (ci->callstatus & CIST_FRESH) /* local 'ci' still from callee */ - return; /* external invocation: return */ - else { /* invocation via reentry: continue execution */ - ci = L->ci; - if (b) L->top = ci->top; - lua_assert(isLua(ci)); - lua_assert(GET_OPCODE(*((ci)->u.l.savedpc - 1)) == OP_CALL); - goto newframe; /* restart luaV_execute over new Lua function */ - } - } - vmcase(OP_FORLOOP) { - if (ttisinteger(ra)) { /* integer loop? */ - lua_Integer step = ivalue(ra + 2); - lua_Integer idx = intop(+, ivalue(ra), step); /* increment index */ - lua_Integer limit = ivalue(ra + 1); - if ((0 < step) ? (idx <= limit) : (limit <= idx)) { - ci->u.l.savedpc += GETARG_sBx(i); /* jump back */ - chgivalue(ra, idx); /* update internal index... */ - setivalue(ra + 3, idx); /* ...and external index */ - } - } - else { /* floating loop */ - lua_Number step = fltvalue(ra + 2); - lua_Number idx = luai_numadd(L, fltvalue(ra), step); /* inc. index */ - lua_Number limit = fltvalue(ra + 1); - if (luai_numlt(0, step) ? luai_numle(idx, limit) - : luai_numle(limit, idx)) { - ci->u.l.savedpc += GETARG_sBx(i); /* jump back */ - chgfltvalue(ra, idx); /* update internal index... */ - setfltvalue(ra + 3, idx); /* ...and external index */ - } - } - vmbreak; - } - vmcase(OP_FORPREP) { - TValue *init = ra; - TValue *plimit = ra + 1; - TValue *pstep = ra + 2; - lua_Integer ilimit; - int stopnow; - if (ttisinteger(init) && ttisinteger(pstep) && - forlimit(plimit, &ilimit, ivalue(pstep), &stopnow)) { - /* all values are integer */ - lua_Integer initv = (stopnow ? 0 : ivalue(init)); - setivalue(plimit, ilimit); - setivalue(init, intop(-, initv, ivalue(pstep))); - } - else { /* try making all values floats */ - lua_Number ninit; lua_Number nlimit; lua_Number nstep; - if (!tonumber(plimit, &nlimit)) - luaG_runerror(L, "'for' limit must be a number"); - setfltvalue(plimit, nlimit); - if (!tonumber(pstep, &nstep)) - luaG_runerror(L, "'for' step must be a number"); - setfltvalue(pstep, nstep); - if (!tonumber(init, &ninit)) - luaG_runerror(L, "'for' initial value must be a number"); - setfltvalue(init, luai_numsub(L, ninit, nstep)); - } - ci->u.l.savedpc += GETARG_sBx(i); - vmbreak; - } - vmcase(OP_TFORCALL) { - StkId cb = ra + 3; /* call base */ - setobjs2s(L, cb+2, ra+2); - setobjs2s(L, cb+1, ra+1); - setobjs2s(L, cb, ra); - L->top = cb + 3; /* func. + 2 args (state and index) */ - Protect(luaD_call(L, cb, GETARG_C(i))); - L->top = ci->top; - i = *(ci->u.l.savedpc++); /* go to next instruction */ - ra = RA(i); - lua_assert(GET_OPCODE(i) == OP_TFORLOOP); - goto l_tforloop; - } - vmcase(OP_TFORLOOP) { - l_tforloop: - if (!ttisnil(ra + 1)) { /* continue loop? */ - setobjs2s(L, ra, ra + 1); /* save control variable */ - ci->u.l.savedpc += GETARG_sBx(i); /* jump back */ - } - vmbreak; - } - vmcase(OP_SETLIST) { - int n = GETARG_B(i); - int c = GETARG_C(i); - unsigned int last; - Table *h; - if (n == 0) n = cast_int(L->top - ra) - 1; - if (c == 0) { - lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_EXTRAARG); - c = GETARG_Ax(*ci->u.l.savedpc++); - } - h = hvalue(ra); - last = ((c-1)*LFIELDS_PER_FLUSH) + n; - if (last > h->sizearray) /* needs more space? */ - luaH_resizearray(L, h, last); /* preallocate it at once */ - for (; n > 0; n--) { - TValue *val = ra+n; - luaH_setint(L, h, last--, val); - luaC_barrierback(L, h, val); - } - L->top = ci->top; /* correct top (in case of previous open call) */ - vmbreak; - } - vmcase(OP_CLOSURE) { - Proto *p = cl->p->p[GETARG_Bx(i)]; - LClosure *ncl = getcached(p, cl->upvals, base); /* cached closure */ - if (ncl == NULL) /* no match? */ - pushclosure(L, p, cl->upvals, base, ra); /* create a new one */ - else - setclLvalue(L, ra, ncl); /* push cashed closure */ - checkGC(L, ra + 1); - vmbreak; - } - vmcase(OP_VARARG) { - int b = GETARG_B(i) - 1; /* required results */ - int j; - int n = cast_int(base - ci->func) - cl->p->numparams - 1; - if (n < 0) /* less arguments than parameters? */ - n = 0; /* no vararg arguments */ - if (b < 0) { /* B == 0? */ - b = n; /* get all var. arguments */ - Protect(luaD_checkstack(L, n)); - ra = RA(i); /* previous call may change the stack */ - L->top = ra + n; - } - for (j = 0; j < b && j < n; j++) - setobjs2s(L, ra + j, base - n + j); - for (; j < b; j++) /* complete required results with nil */ - setnilvalue(ra + j); - vmbreak; - } - vmcase(OP_EXTRAARG) { - lua_assert(0); - vmbreak; - } - } - } -} - -/* }================================================================== */ - diff --git a/build/premake/premake5/contrib/lua/src/lvm.h b/build/premake/premake5/contrib/lua/src/lvm.h deleted file mode 100644 index a8f954f04c..0000000000 --- a/build/premake/premake5/contrib/lua/src/lvm.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -** $Id: lvm.h,v 2.41.1.1 2017/04/19 17:20:42 roberto Exp $ -** Lua virtual machine -** See Copyright Notice in lua.h -*/ - -#ifndef lvm_h -#define lvm_h - - -#include "ldo.h" -#include "lobject.h" -#include "ltm.h" - - -#if !defined(LUA_NOCVTN2S) -#define cvt2str(o) ttisnumber(o) -#else -#define cvt2str(o) 0 /* no conversion from numbers to strings */ -#endif - - -#if !defined(LUA_NOCVTS2N) -#define cvt2num(o) ttisstring(o) -#else -#define cvt2num(o) 0 /* no conversion from strings to numbers */ -#endif - - -/* -** You can define LUA_FLOORN2I if you want to convert floats to integers -** by flooring them (instead of raising an error if they are not -** integral values) -*/ -#if !defined(LUA_FLOORN2I) -#define LUA_FLOORN2I 0 -#endif - - -#define tonumber(o,n) \ - (ttisfloat(o) ? (*(n) = fltvalue(o), 1) : luaV_tonumber_(o,n)) - -#define tointeger(o,i) \ - (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger(o,i,LUA_FLOORN2I)) - -#define intop(op,v1,v2) l_castU2S(l_castS2U(v1) op l_castS2U(v2)) - -#define luaV_rawequalobj(t1,t2) luaV_equalobj(NULL,t1,t2) - - -/* -** fast track for 'gettable': if 't' is a table and 't[k]' is not nil, -** return 1 with 'slot' pointing to 't[k]' (final result). Otherwise, -** return 0 (meaning it will have to check metamethod) with 'slot' -** pointing to a nil 't[k]' (if 't' is a table) or NULL (otherwise). -** 'f' is the raw get function to use. -*/ -#define luaV_fastget(L,t,k,slot,f) \ - (!ttistable(t) \ - ? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \ - : (slot = f(hvalue(t), k), /* else, do raw access */ \ - !ttisnil(slot))) /* result not nil? */ - -/* -** standard implementation for 'gettable' -*/ -#define luaV_gettable(L,t,k,v) { const TValue *slot; \ - if (luaV_fastget(L,t,k,slot,luaH_get)) { setobj2s(L, v, slot); } \ - else luaV_finishget(L,t,k,v,slot); } - - -/* -** Fast track for set table. If 't' is a table and 't[k]' is not nil, -** call GC barrier, do a raw 't[k]=v', and return true; otherwise, -** return false with 'slot' equal to NULL (if 't' is not a table) or -** 'nil'. (This is needed by 'luaV_finishget'.) Note that, if the macro -** returns true, there is no need to 'invalidateTMcache', because the -** call is not creating a new entry. -*/ -#define luaV_fastset(L,t,k,slot,f,v) \ - (!ttistable(t) \ - ? (slot = NULL, 0) \ - : (slot = f(hvalue(t), k), \ - ttisnil(slot) ? 0 \ - : (luaC_barrierback(L, hvalue(t), v), \ - setobj2t(L, cast(TValue *,slot), v), \ - 1))) - - -#define luaV_settable(L,t,k,v) { const TValue *slot; \ - if (!luaV_fastset(L,t,k,slot,luaH_get,v)) \ - luaV_finishset(L,t,k,v,slot); } - - - -LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2); -LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); -LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); -LUAI_FUNC int luaV_tonumber_ (const TValue *obj, lua_Number *n); -LUAI_FUNC int luaV_tointeger (const TValue *obj, lua_Integer *p, int mode); -LUAI_FUNC void luaV_finishget (lua_State *L, const TValue *t, TValue *key, - StkId val, const TValue *slot); -LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key, - StkId val, const TValue *slot); -LUAI_FUNC void luaV_finishOp (lua_State *L); -LUAI_FUNC void luaV_execute (lua_State *L); -LUAI_FUNC void luaV_concat (lua_State *L, int total); -LUAI_FUNC lua_Integer luaV_div (lua_State *L, lua_Integer x, lua_Integer y); -LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y); -LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y); -LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb); - -#endif diff --git a/build/premake/premake5/contrib/lua/src/lzio.c b/build/premake/premake5/contrib/lua/src/lzio.c deleted file mode 100644 index 6f79094410..0000000000 --- a/build/premake/premake5/contrib/lua/src/lzio.c +++ /dev/null @@ -1,68 +0,0 @@ -/* -** $Id: lzio.c,v 1.37.1.1 2017/04/19 17:20:42 roberto Exp $ -** Buffered streams -** See Copyright Notice in lua.h -*/ - -#define lzio_c -#define LUA_CORE - -#include "lprefix.h" - - -#include - -#include "lua.h" - -#include "llimits.h" -#include "lmem.h" -#include "lstate.h" -#include "lzio.h" - - -int luaZ_fill (ZIO *z) { - size_t size; - lua_State *L = z->L; - const char *buff; - lua_unlock(L); - buff = z->reader(L, z->data, &size); - lua_lock(L); - if (buff == NULL || size == 0) - return EOZ; - z->n = size - 1; /* discount char being returned */ - z->p = buff; - return cast_uchar(*(z->p++)); -} - - -void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { - z->L = L; - z->reader = reader; - z->data = data; - z->n = 0; - z->p = NULL; -} - - -/* --------------------------------------------------------------- read --- */ -size_t luaZ_read (ZIO *z, void *b, size_t n) { - while (n) { - size_t m; - if (z->n == 0) { /* no bytes in buffer? */ - if (luaZ_fill(z) == EOZ) /* try to read more */ - return n; /* no more input; return number of missing bytes */ - else { - z->n++; /* luaZ_fill consumed first byte; put it back */ - z->p--; - } - } - m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ - memcpy(b, z->p, m); - z->n -= m; - z->p += m; - b = (char *)b + m; - n -= m; - } - return 0; -} - diff --git a/build/premake/premake5/contrib/lua/src/lzio.h b/build/premake/premake5/contrib/lua/src/lzio.h deleted file mode 100644 index d897870815..0000000000 --- a/build/premake/premake5/contrib/lua/src/lzio.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -** $Id: lzio.h,v 1.31.1.1 2017/04/19 17:20:42 roberto Exp $ -** Buffered streams -** See Copyright Notice in lua.h -*/ - - -#ifndef lzio_h -#define lzio_h - -#include "lua.h" - -#include "lmem.h" - - -#define EOZ (-1) /* end of stream */ - -typedef struct Zio ZIO; - -#define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) - - -typedef struct Mbuffer { - char *buffer; - size_t n; - size_t buffsize; -} Mbuffer; - -#define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) - -#define luaZ_buffer(buff) ((buff)->buffer) -#define luaZ_sizebuffer(buff) ((buff)->buffsize) -#define luaZ_bufflen(buff) ((buff)->n) - -#define luaZ_buffremove(buff,i) ((buff)->n -= (i)) -#define luaZ_resetbuffer(buff) ((buff)->n = 0) - - -#define luaZ_resizebuffer(L, buff, size) \ - ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \ - (buff)->buffsize, size), \ - (buff)->buffsize = size) - -#define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) - - -LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, - void *data); -LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */ - - - -/* --------- Private Part ------------------ */ - -struct Zio { - size_t n; /* bytes still unread */ - const char *p; /* current position in buffer */ - lua_Reader reader; /* reader function */ - void *data; /* additional data */ - lua_State *L; /* Lua state (for reader) */ -}; - - -LUAI_FUNC int luaZ_fill (ZIO *z); - -#endif diff --git a/build/premake/premake5/contrib/luashim/lua.txt b/build/premake/premake5/contrib/luashim/lua.txt deleted file mode 100644 index 30dfa0b28b..0000000000 --- a/build/premake/premake5/contrib/luashim/lua.txt +++ /dev/null @@ -1,134 +0,0 @@ -lua_State* (lua_newstate) (lua_Alloc f, void* ud); -void (lua_close) (lua_State* L); -lua_State* (lua_newthread) (lua_State* L); -lua_CFunction (lua_atpanic) (lua_State* L, lua_CFunction panicf); -const lua_Number* (lua_version) (lua_State* L); -int (lua_absindex) (lua_State* L, int idx); -int (lua_gettop) (lua_State* L); -void (lua_settop) (lua_State* L, int idx); -void (lua_pushvalue) (lua_State* L, int idx); -void (lua_rotate) (lua_State* L, int idx, int n); -void (lua_copy) (lua_State* L, int fromidx, int toidx); -int (lua_checkstack) (lua_State* L, int n); -void (lua_xmove) (lua_State* from, lua_State* to, int n); -int (lua_isnumber) (lua_State* L, int idx); -int (lua_isstring) (lua_State* L, int idx); -int (lua_iscfunction) (lua_State* L, int idx); -int (lua_isinteger) (lua_State* L, int idx); -int (lua_isuserdata) (lua_State* L, int idx); -int (lua_type) (lua_State* L, int idx); -const char* (lua_typename) (lua_State* L, int tp); -lua_Number (lua_tonumberx) (lua_State* L, int idx, int* isnum); -lua_Integer (lua_tointegerx) (lua_State* L, int idx, int* isnum); -int (lua_toboolean) (lua_State* L, int idx); -const char* (lua_tolstring) (lua_State* L, int idx, size_t* len); -size_t (lua_rawlen) (lua_State* L, int idx); -lua_CFunction (lua_tocfunction) (lua_State* L, int idx); -void* (lua_touserdata) (lua_State* L, int idx); -lua_State* (lua_tothread) (lua_State* L, int idx); -const void* (lua_topointer) (lua_State* L, int idx); -void (lua_arith) (lua_State* L, int op); -int (lua_rawequal) (lua_State* L, int idx1, int idx2); -int (lua_compare) (lua_State* L, int idx1, int idx2, int op); -void (lua_pushnil) (lua_State* L); -void (lua_pushnumber) (lua_State* L, lua_Number n); -void (lua_pushinteger) (lua_State* L, lua_Integer n); -const char* (lua_pushlstring) (lua_State* L, const char* s, size_t len); -const char* (lua_pushstring) (lua_State* L, const char* s); -const char* (lua_pushvfstring) (lua_State* L, const char* fmt, va_list argp); -const char* (lua_pushfstring) (lua_State* L, const char* fmt, ...); -void (lua_pushcclosure) (lua_State* L, lua_CFunction fn, int n); -void (lua_pushboolean) (lua_State* L, int b); -void (lua_pushlightuserdata) (lua_State* L, void* p); -int (lua_pushthread) (lua_State* L); -int (lua_getglobal) (lua_State* L, const char* name); -int (lua_gettable) (lua_State* L, int idx); -int (lua_getfield) (lua_State* L, int idx, const char* k); -int (lua_geti) (lua_State* L, int idx, lua_Integer n); -int (lua_rawget) (lua_State* L, int idx); -int (lua_rawgeti) (lua_State* L, int idx, lua_Integer n); -int (lua_rawgetp) (lua_State* L, int idx, const void* p); -void (lua_createtable) (lua_State* L, int narr, int nrec); -void* (lua_newuserdata) (lua_State* L, size_t sz); -int (lua_getmetatable) (lua_State* L, int objindex); -int (lua_getuservalue) (lua_State* L, int idx); -void (lua_setglobal) (lua_State* L, const char* name); -void (lua_settable) (lua_State* L, int idx); -void (lua_setfield) (lua_State* L, int idx, const char* k); -void (lua_seti) (lua_State* L, int idx, lua_Integer n); -void (lua_rawset) (lua_State* L, int idx); -void (lua_rawseti) (lua_State* L, int idx, lua_Integer n); -void (lua_rawsetp) (lua_State* L, int idx, const void* p); -int (lua_setmetatable) (lua_State* L, int objindex); -void (lua_setuservalue) (lua_State* L, int idx); -void (lua_callk) (lua_State* L, int nargs, int nresults,lua_KContext ctx, lua_KFunction k); -int (lua_pcallk) (lua_State* L, int nargs, int nresults, int errfunc,lua_KContext ctx, lua_KFunction k); -int (lua_load) (lua_State* L, lua_Reader reader, void* dt,const char* chunkname, const char* mode); -int (lua_dump) (lua_State* L, lua_Writer writer, void* data, int strip); -int (lua_yieldk) (lua_State* L, int nresults, lua_KContext ctx,lua_KFunction k); -int (lua_resume) (lua_State* L, lua_State* from, int narg); -int (lua_status) (lua_State* L); -int (lua_isyieldable) (lua_State* L); -int (lua_gc) (lua_State* L, int what, int data); -int (lua_error) (lua_State* L); -int (lua_next) (lua_State* L, int idx); -void (lua_concat) (lua_State* L, int n); -void (lua_len) (lua_State* L, int idx); -size_t (lua_stringtonumber) (lua_State* L, const char* s); -lua_Alloc (lua_getallocf) (lua_State* L, void** ud); -void (lua_setallocf) (lua_State* L, lua_Alloc f, void* ud); -int (lua_getstack) (lua_State* L, int level, lua_Debug* ar); -int (lua_getinfo) (lua_State* L, const char* what, lua_Debug* ar); -const char* (lua_getlocal) (lua_State* L, const lua_Debug* ar, int n); -const char* (lua_setlocal) (lua_State* L, const lua_Debug* ar, int n); -const char* (lua_getupvalue) (lua_State* L, int funcindex, int n); -const char* (lua_setupvalue) (lua_State* L, int funcindex, int n); -void* (lua_upvalueid) (lua_State* L, int fidx, int n); -void (lua_upvaluejoin) (lua_State* L, int fidx1, int n1,int fidx2, int n2); -void (lua_sethook) (lua_State* L, lua_Hook func, int mask, int count); -lua_Hook (lua_gethook) (lua_State* L); -int (lua_gethookmask) (lua_State* L); -int (lua_gethookcount) (lua_State* L); -void (luaL_checkversion_) (lua_State* L, lua_Number ver, size_t sz); -int (luaL_getmetafield) (lua_State* L, int obj, const char* e); -int (luaL_callmeta) (lua_State* L, int obj, const char* e); -const char* (luaL_tolstring) (lua_State* L, int idx, size_t* len); -int (luaL_argerror) (lua_State* L, int arg, const char* extramsg); -const char* (luaL_checklstring) (lua_State* L, int arg,size_t* l); -const char* (luaL_optlstring) (lua_State* L, int arg,const char* def, size_t* l); -lua_Number (luaL_checknumber) (lua_State* L, int arg); -lua_Number (luaL_optnumber) (lua_State* L, int arg, lua_Number def); -lua_Integer (luaL_checkinteger) (lua_State* L, int arg); -lua_Integer (luaL_optinteger) (lua_State* L, int arg,lua_Integer def); -void (luaL_checkstack) (lua_State* L, int sz, const char* msg); -void (luaL_checktype) (lua_State* L, int arg, int t); -void (luaL_checkany) (lua_State* L, int arg); -int (luaL_newmetatable) (lua_State* L, const char* tname); -void (luaL_setmetatable) (lua_State* L, const char* tname); -void* (luaL_testudata) (lua_State* L, int ud, const char* tname); -void* (luaL_checkudata) (lua_State* L, int ud, const char* tname); -void (luaL_where) (lua_State* L, int lvl); -int (luaL_error) (lua_State* L, const char* fmt, ...); -int (luaL_checkoption) (lua_State* L, int arg, const char* def,const char* const lst[]); -int (luaL_fileresult) (lua_State* L, int stat, const char* fname); -int (luaL_execresult) (lua_State* L, int stat); -int (luaL_ref) (lua_State* L, int t); -void (luaL_unref) (lua_State* L, int t, int ref); -int (luaL_loadfilex) (lua_State* L, const char* filename,const char* mode); -int (luaL_loadbufferx) (lua_State* L, const char* buff, size_t sz,const char* name, const char* mode); -int (luaL_loadstring) (lua_State* L, const char* s); -lua_State* (luaL_newstate) (); -lua_Integer (luaL_len) (lua_State* L, int idx); -const char* (luaL_gsub) (lua_State* L, const char* s, const char* p,const char* r); -void (luaL_setfuncs) (lua_State* L, const luaL_Reg* l, int nup); -int (luaL_getsubtable) (lua_State* L, int idx, const char* fname); -void (luaL_traceback) (lua_State* L, lua_State* L1,const char* msg, int level); -void (luaL_requiref) (lua_State* L, const char* modname,lua_CFunction openf, int glb); -void (luaL_buffinit) (lua_State* L, luaL_Buffer* B); -char* (luaL_prepbuffsize) (luaL_Buffer* B, size_t sz); -void (luaL_addlstring) (luaL_Buffer* B, const char* s, size_t l); -void (luaL_addstring) (luaL_Buffer* B, const char* s); -void (luaL_addvalue) (luaL_Buffer* B); -void (luaL_pushresult) (luaL_Buffer* B); -void (luaL_pushresultsize) (luaL_Buffer* B, size_t sz); -char* (luaL_buffinitsize) (lua_State* L, luaL_Buffer* B, size_t sz); diff --git a/build/premake/premake5/contrib/luashim/luashim.c b/build/premake/premake5/contrib/luashim/luashim.c deleted file mode 100644 index 9aeeae222a..0000000000 --- a/build/premake/premake5/contrib/luashim/luashim.c +++ /dev/null @@ -1,861 +0,0 @@ -/** -* \file luashim.c -* \brief Lua shim for premake binary modules. -* \author Copyright (c) 2017 Tom van Dijck and the Premake project -*/ -#include "luashim.h" -#include -#include "lstate.h" - -static const LuaFunctionTable_t* g_shimTable; - -void luaL_register(lua_State *L, const char *libname, const luaL_Reg *l) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_register(L, libname, l); -} - -lua_State* lua_newstate(lua_Alloc f, void* ud) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_newstate(f, ud); -} - -void lua_close(lua_State* L) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_close(L); -} - -lua_State* lua_newthread(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_newthread(L); -} - -lua_CFunction lua_atpanic(lua_State* L, lua_CFunction panicf) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_atpanic(L, panicf); -} - -const lua_Number* lua_version(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_version(L); -} - -int lua_absindex(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_absindex(L, idx); -} - -int lua_gettop(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_gettop(L); -} - -void lua_settop(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_settop(L, idx); -} - -void lua_pushvalue(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushvalue(L, idx); -} - -void lua_rotate(lua_State* L, int idx, int n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_rotate(L, idx, n); -} - -void lua_copy(lua_State* L, int fromidx, int toidx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_copy(L, fromidx, toidx); -} - -int lua_checkstack(lua_State* L, int n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_checkstack(L, n); -} - -void lua_xmove(lua_State* from, lua_State* to, int n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_xmove(from, to, n); -} - -int lua_isnumber(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_isnumber(L, idx); -} - -int lua_isstring(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_isstring(L, idx); -} - -int lua_iscfunction(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_iscfunction(L, idx); -} - -int lua_isinteger(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_isinteger(L, idx); -} - -int lua_isuserdata(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_isuserdata(L, idx); -} - -int lua_type(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_type(L, idx); -} - -const char* lua_typename(lua_State* L, int tp) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_typename(L, tp); -} - -lua_Number lua_tonumberx(lua_State* L, int idx, int* isnum) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_tonumberx(L, idx, isnum); -} - -lua_Integer lua_tointegerx(lua_State* L, int idx, int* isnum) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_tointegerx(L, idx, isnum); -} - -int lua_toboolean(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_toboolean(L, idx); -} - -const char* lua_tolstring(lua_State* L, int idx, size_t* len) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_tolstring(L, idx, len); -} - -size_t lua_rawlen(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_rawlen(L, idx); -} - -lua_CFunction lua_tocfunction(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_tocfunction(L, idx); -} - -void* lua_touserdata(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_touserdata(L, idx); -} - -lua_State* lua_tothread(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_tothread(L, idx); -} - -const void* lua_topointer(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_topointer(L, idx); -} - -void lua_arith(lua_State* L, int op) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_arith(L, op); -} - -int lua_rawequal(lua_State* L, int idx1, int idx2) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_rawequal(L, idx1, idx2); -} - -int lua_compare(lua_State* L, int idx1, int idx2, int op) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_compare(L, idx1, idx2, op); -} - -void lua_pushnil(lua_State* L) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushnil(L); -} - -void lua_pushnumber(lua_State* L, lua_Number n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushnumber(L, n); -} - -void lua_pushinteger(lua_State* L, lua_Integer n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushinteger(L, n); -} - -const char* lua_pushlstring(lua_State* L, const char* s, size_t len) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_pushlstring(L, s, len); -} - -const char* lua_pushstring(lua_State* L, const char* s) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_pushstring(L, s); -} - -const char* lua_pushvfstring(lua_State* L, const char* fmt, va_list argp) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_pushvfstring(L, fmt, argp); -} - -const char* lua_pushfstring(lua_State* L, const char* fmt, ...) -{ - const char* ret; - va_list argp; - va_start(argp, fmt); - ret = lua_pushvfstring(L, fmt, argp); - va_end(argp); - return ret; -} - -void lua_pushcclosure(lua_State* L, lua_CFunction fn, int n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushcclosure(L, fn, n); -} - -void lua_pushboolean(lua_State* L, int b) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushboolean(L, b); -} - -void lua_pushlightuserdata(lua_State* L, void* p) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_pushlightuserdata(L, p); -} - -int lua_pushthread(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_pushthread(L); -} - -int lua_getglobal(lua_State* L, const char* name) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getglobal(L, name); -} - -int lua_gettable(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_gettable(L, idx); -} - -int lua_getfield(lua_State* L, int idx, const char* k) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getfield(L, idx, k); -} - -int lua_geti(lua_State* L, int idx, lua_Integer n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_geti(L, idx, n); -} - -int lua_rawget(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_rawget(L, idx); -} - -int lua_rawgeti(lua_State* L, int idx, lua_Integer n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_rawgeti(L, idx, n); -} - -int lua_rawgetp(lua_State* L, int idx, const void* p) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_rawgetp(L, idx, p); -} - -void lua_createtable(lua_State* L, int narr, int nrec) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_createtable(L, narr, nrec); -} - -void* lua_newuserdata(lua_State* L, size_t sz) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_newuserdata(L, sz); -} - -int lua_getmetatable(lua_State* L, int objindex) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getmetatable(L, objindex); -} - -int lua_getuservalue(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getuservalue(L, idx); -} - -void lua_setglobal(lua_State* L, const char* name) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_setglobal(L, name); -} - -void lua_settable(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_settable(L, idx); -} - -void lua_setfield(lua_State* L, int idx, const char* k) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_setfield(L, idx, k); -} - -void lua_seti(lua_State* L, int idx, lua_Integer n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_seti(L, idx, n); -} - -void lua_rawset(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_rawset(L, idx); -} - -void lua_rawseti(lua_State* L, int idx, lua_Integer n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_rawseti(L, idx, n); -} - -void lua_rawsetp(lua_State* L, int idx, const void* p) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_rawsetp(L, idx, p); -} - -int lua_setmetatable(lua_State* L, int objindex) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_setmetatable(L, objindex); -} - -void lua_setuservalue(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_setuservalue(L, idx); -} - -void lua_callk(lua_State* L, int nargs, int nresults, lua_KContext ctx, lua_KFunction k) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_callk(L, nargs, nresults, ctx, k); -} - -int lua_pcallk(lua_State* L, int nargs, int nresults, int errfunc, lua_KContext ctx, lua_KFunction k) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_pcallk(L, nargs, nresults, errfunc, ctx, k); -} - -int lua_load(lua_State* L, lua_Reader reader, void* dt, const char* chunkname, const char* mode) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_load(L, reader, dt, chunkname, mode); -} - -int lua_dump(lua_State* L, lua_Writer writer, void* data, int strip) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_dump(L, writer, data, strip); -} - -int lua_yieldk(lua_State* L, int nresults, lua_KContext ctx, lua_KFunction k) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_yieldk(L, nresults, ctx, k); -} - -int lua_resume(lua_State* L, lua_State* from, int narg) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_resume(L, from, narg); -} - -int lua_status(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_status(L); -} - -int lua_isyieldable(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_isyieldable(L); -} - -int lua_gc(lua_State* L, int what, int data) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_gc(L, what, data); -} - -int lua_error(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_error(L); -} - -int lua_next(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_next(L, idx); -} - -void lua_concat(lua_State* L, int n) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_concat(L, n); -} - -void lua_len(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_len(L, idx); -} - -size_t lua_stringtonumber(lua_State* L, const char* s) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_stringtonumber(L, s); -} - -lua_Alloc lua_getallocf(lua_State* L, void** ud) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getallocf(L, ud); -} - -void lua_setallocf(lua_State* L, lua_Alloc f, void* ud) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_setallocf(L, f, ud); -} - -int lua_getstack(lua_State* L, int level, lua_Debug* ar) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getstack(L, level, ar); -} - -int lua_getinfo(lua_State* L, const char* what, lua_Debug* ar) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getinfo(L, what, ar); -} - -const char* lua_getlocal(lua_State* L, const lua_Debug* ar, int n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getlocal(L, ar, n); -} - -const char* lua_setlocal(lua_State* L, const lua_Debug* ar, int n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_setlocal(L, ar, n); -} - -const char* lua_getupvalue(lua_State* L, int funcindex, int n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_getupvalue(L, funcindex, n); -} - -const char* lua_setupvalue(lua_State* L, int funcindex, int n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_setupvalue(L, funcindex, n); -} - -void* lua_upvalueid(lua_State* L, int fidx, int n) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_upvalueid(L, fidx, n); -} - -void lua_upvaluejoin(lua_State* L, int fidx1, int n1, int fidx2, int n2) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_upvaluejoin(L, fidx1, n1, fidx2, n2); -} - -void lua_sethook(lua_State* L, lua_Hook func, int mask, int count) -{ - assert(g_shimTable != NULL); - g_shimTable->shim_sethook(L, func, mask, count); -} - -lua_Hook lua_gethook(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_gethook(L); -} - -int lua_gethookmask(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_gethookmask(L); -} - -int lua_gethookcount(lua_State* L) -{ - assert(g_shimTable != NULL); - return g_shimTable->shim_gethookcount(L); -} - -void luaL_checkversion_(lua_State* L, lua_Number ver, size_t sz) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_checkversion_(L, ver, sz); -} - -int luaL_getmetafield(lua_State* L, int obj, const char* e) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_getmetafield(L, obj, e); -} - -int luaL_callmeta(lua_State* L, int obj, const char* e) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_callmeta(L, obj, e); -} - -const char* luaL_tolstring(lua_State* L, int idx, size_t* len) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_tolstring(L, idx, len); -} - -int luaL_argerror(lua_State* L, int arg, const char* extramsg) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_argerror(L, arg, extramsg); -} - -const char* luaL_checklstring(lua_State* L, int arg, size_t* l) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_checklstring(L, arg, l); -} - -const char* luaL_optlstring(lua_State* L, int arg, const char* def, size_t* l) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_optlstring(L, arg, def, l); -} - -lua_Number luaL_checknumber(lua_State* L, int arg) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_checknumber(L, arg); -} - -lua_Number luaL_optnumber(lua_State* L, int arg, lua_Number def) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_optnumber(L, arg, def); -} - -lua_Integer luaL_checkinteger(lua_State* L, int arg) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_checkinteger(L, arg); -} - -lua_Integer luaL_optinteger(lua_State* L, int arg, lua_Integer def) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_optinteger(L, arg, def); -} - -void luaL_checkstack(lua_State* L, int sz, const char* msg) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_checkstack(L, sz, msg); -} - -void luaL_checktype(lua_State* L, int arg, int t) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_checktype(L, arg, t); -} - -void luaL_checkany(lua_State* L, int arg) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_checkany(L, arg); -} - -int luaL_newmetatable(lua_State* L, const char* tname) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_newmetatable(L, tname); -} - -void luaL_setmetatable(lua_State* L, const char* tname) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_setmetatable(L, tname); -} - -void* luaL_testudata(lua_State* L, int ud, const char* tname) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_testudata(L, ud, tname); -} - -void* luaL_checkudata(lua_State* L, int ud, const char* tname) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_checkudata(L, ud, tname); -} - -void luaL_where(lua_State* L, int lvl) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_where(L, lvl); -} - -int luaL_error(lua_State* L, const char* fmt, ...) -{ - va_list argp; - va_start(argp, fmt); - luaL_where(L, 1); - lua_pushvfstring(L, fmt, argp); - va_end(argp); - lua_concat(L, 2); - return lua_error(L); -} - -int luaL_checkoption(lua_State* L, int arg, const char* def, const char* const lst[]) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_checkoption(L, arg, def, lst); -} - -int luaL_fileresult(lua_State* L, int stat, const char* fname) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_fileresult(L, stat, fname); -} - -int luaL_execresult(lua_State* L, int stat) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_execresult(L, stat); -} - -int luaL_ref(lua_State* L, int t) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_ref(L, t); -} - -void luaL_unref(lua_State* L, int t, int ref) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_unref(L, t, ref); -} - -int luaL_loadfilex(lua_State* L, const char* filename, const char* mode) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_loadfilex(L, filename, mode); -} - -int luaL_loadbufferx(lua_State* L, const char* buff, size_t sz, const char* name, const char* mode) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_loadbufferx(L, buff, sz, name, mode); -} - -int luaL_loadstring(lua_State* L, const char* s) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_loadstring(L, s); -} - -lua_State* luaL_newstate() -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_newstate(); -} - -lua_Integer luaL_len(lua_State* L, int idx) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_len(L, idx); -} - -const char* luaL_gsub(lua_State* L, const char* s, const char* p, const char* r) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_gsub(L, s, p, r); -} - -void luaL_setfuncs(lua_State* L, const luaL_Reg* l, int nup) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_setfuncs(L, l, nup); -} - -int luaL_getsubtable(lua_State* L, int idx, const char* fname) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_getsubtable(L, idx, fname); -} - -void luaL_traceback(lua_State* L, lua_State* L1, const char* msg, int level) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_traceback(L, L1, msg, level); -} - -void luaL_requiref(lua_State* L, const char* modname, lua_CFunction openf, int glb) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_requiref(L, modname, openf, glb); -} - -void luaL_buffinit(lua_State* L, luaL_Buffer* B) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_buffinit(L, B); -} - -char* luaL_prepbuffsize(luaL_Buffer* B, size_t sz) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_prepbuffsize(B, sz); -} - -void luaL_addlstring(luaL_Buffer* B, const char* s, size_t l) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_addlstring(B, s, l); -} - -void luaL_addstring(luaL_Buffer* B, const char* s) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_addstring(B, s); -} - -void luaL_addvalue(luaL_Buffer* B) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_addvalue(B); -} - -void luaL_pushresult(luaL_Buffer* B) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_pushresult(B); -} - -void luaL_pushresultsize(luaL_Buffer* B, size_t sz) -{ - assert(g_shimTable != NULL); - g_shimTable->shimL_pushresultsize(B, sz); -} - -char* luaL_buffinitsize(lua_State* L, luaL_Buffer* B, size_t sz) -{ - assert(g_shimTable != NULL); - return g_shimTable->shimL_buffinitsize(L, B, sz); -} - -static const Node* hashpow2(const Table* t, int n) { - int i = lmod(n, sizenode(t)); - return &t->node[i]; -} - -static const Node* findNode(const Table* t, int key) { - const Node* n = hashpow2(t, key); - while (n->i_key.tvk.value_.i != key) - { - int nx = n->i_key.nk.next; - if (nx == 0) - return NULL; - n += nx; - } - return n; -} - -void shimInitialize(lua_State* L) -{ - lua_lock(L); - - // Find the 'SHIM' entry in the registry. - const Table* reg = hvalue(&G(L)->l_registry); - const Node* n = findNode(reg, 0x5348494D); // equal to 'SHIM' - assert(n != NULL); - - g_shimTable = (const LuaFunctionTable_t*)n->i_val.value_.p; - assert(g_shimTable != NULL); - - lua_unlock(L); -} diff --git a/build/premake/premake5/contrib/luashim/luashim.h b/build/premake/premake5/contrib/luashim/luashim.h deleted file mode 100644 index 18bda58624..0000000000 --- a/build/premake/premake5/contrib/luashim/luashim.h +++ /dev/null @@ -1,152 +0,0 @@ -/** -* \file luashim.h -* \brief Lua shim for premake binary modules. -* \author Copyright (c) 2017 Tom van Dijck and the Premake project -*/ -#ifndef HEADER_luashim_H -#define HEADER_luashim_H - -#include "lua.h" -#include "lauxlib.h" - -// premake specific helper methods. -void luaL_register(lua_State *L, const char *libname, const luaL_Reg *l); -void shimInitialize(lua_State* L); - -typedef struct { - void (*shimL_register)(lua_State *L, const char *libname, const luaL_Reg *l); - lua_State* (*shim_newstate)(lua_Alloc f, void* ud); - void (*shim_close)(lua_State* L); - lua_State* (*shim_newthread)(lua_State* L); - lua_CFunction (*shim_atpanic)(lua_State* L, lua_CFunction panicf); - const lua_Number* (*shim_version)(lua_State* L); - int (*shim_absindex)(lua_State* L, int idx); - int (*shim_gettop)(lua_State* L); - void (*shim_settop)(lua_State* L, int idx); - void (*shim_pushvalue)(lua_State* L, int idx); - void (*shim_rotate)(lua_State* L, int idx, int n); - void (*shim_copy)(lua_State* L, int fromidx, int toidx); - int (*shim_checkstack)(lua_State* L, int n); - void (*shim_xmove)(lua_State* from, lua_State* to, int n); - int (*shim_isnumber)(lua_State* L, int idx); - int (*shim_isstring)(lua_State* L, int idx); - int (*shim_iscfunction)(lua_State* L, int idx); - int (*shim_isinteger)(lua_State* L, int idx); - int (*shim_isuserdata)(lua_State* L, int idx); - int (*shim_type)(lua_State* L, int idx); - const char* (*shim_typename)(lua_State* L, int tp); - lua_Number (*shim_tonumberx)(lua_State* L, int idx, int* isnum); - lua_Integer (*shim_tointegerx)(lua_State* L, int idx, int* isnum); - int (*shim_toboolean)(lua_State* L, int idx); - const char* (*shim_tolstring)(lua_State* L, int idx, size_t* len); - size_t (*shim_rawlen)(lua_State* L, int idx); - lua_CFunction (*shim_tocfunction)(lua_State* L, int idx); - void* (*shim_touserdata)(lua_State* L, int idx); - lua_State* (*shim_tothread)(lua_State* L, int idx); - const void* (*shim_topointer)(lua_State* L, int idx); - void (*shim_arith)(lua_State* L, int op); - int (*shim_rawequal)(lua_State* L, int idx1, int idx2); - int (*shim_compare)(lua_State* L, int idx1, int idx2, int op); - void (*shim_pushnil)(lua_State* L); - void (*shim_pushnumber)(lua_State* L, lua_Number n); - void (*shim_pushinteger)(lua_State* L, lua_Integer n); - const char* (*shim_pushlstring)(lua_State* L, const char* s, size_t len); - const char* (*shim_pushstring)(lua_State* L, const char* s); - const char* (*shim_pushvfstring)(lua_State* L, const char* fmt, va_list argp); - void (*shim_pushcclosure)(lua_State* L, lua_CFunction fn, int n); - void (*shim_pushboolean)(lua_State* L, int b); - void (*shim_pushlightuserdata)(lua_State* L, void* p); - int (*shim_pushthread)(lua_State* L); - int (*shim_getglobal)(lua_State* L, const char* name); - int (*shim_gettable)(lua_State* L, int idx); - int (*shim_getfield)(lua_State* L, int idx, const char* k); - int (*shim_geti)(lua_State* L, int idx, lua_Integer n); - int (*shim_rawget)(lua_State* L, int idx); - int (*shim_rawgeti)(lua_State* L, int idx, lua_Integer n); - int (*shim_rawgetp)(lua_State* L, int idx, const void* p); - void (*shim_createtable)(lua_State* L, int narr, int nrec); - void* (*shim_newuserdata)(lua_State* L, size_t sz); - int (*shim_getmetatable)(lua_State* L, int objindex); - int (*shim_getuservalue)(lua_State* L, int idx); - void (*shim_setglobal)(lua_State* L, const char* name); - void (*shim_settable)(lua_State* L, int idx); - void (*shim_setfield)(lua_State* L, int idx, const char* k); - void (*shim_seti)(lua_State* L, int idx, lua_Integer n); - void (*shim_rawset)(lua_State* L, int idx); - void (*shim_rawseti)(lua_State* L, int idx, lua_Integer n); - void (*shim_rawsetp)(lua_State* L, int idx, const void* p); - int (*shim_setmetatable)(lua_State* L, int objindex); - void (*shim_setuservalue)(lua_State* L, int idx); - void (*shim_callk)(lua_State* L, int nargs, int nresults, lua_KContext ctx, lua_KFunction k); - int (*shim_pcallk)(lua_State* L, int nargs, int nresults, int errfunc, lua_KContext ctx, lua_KFunction k); - int (*shim_load)(lua_State* L, lua_Reader reader, void* dt, const char* chunkname, const char* mode); - int (*shim_dump)(lua_State* L, lua_Writer writer, void* data, int strip); - int (*shim_yieldk)(lua_State* L, int nresults, lua_KContext ctx, lua_KFunction k); - int (*shim_resume)(lua_State* L, lua_State* from, int narg); - int (*shim_status)(lua_State* L); - int (*shim_isyieldable)(lua_State* L); - int (*shim_gc)(lua_State* L, int what, int data); - int (*shim_error)(lua_State* L); - int (*shim_next)(lua_State* L, int idx); - void (*shim_concat)(lua_State* L, int n); - void (*shim_len)(lua_State* L, int idx); - size_t (*shim_stringtonumber)(lua_State* L, const char* s); - lua_Alloc (*shim_getallocf)(lua_State* L, void** ud); - void (*shim_setallocf)(lua_State* L, lua_Alloc f, void* ud); - int (*shim_getstack)(lua_State* L, int level, lua_Debug* ar); - int (*shim_getinfo)(lua_State* L, const char* what, lua_Debug* ar); - const char* (*shim_getlocal)(lua_State* L, const lua_Debug* ar, int n); - const char* (*shim_setlocal)(lua_State* L, const lua_Debug* ar, int n); - const char* (*shim_getupvalue)(lua_State* L, int funcindex, int n); - const char* (*shim_setupvalue)(lua_State* L, int funcindex, int n); - void* (*shim_upvalueid)(lua_State* L, int fidx, int n); - void (*shim_upvaluejoin)(lua_State* L, int fidx1, int n1, int fidx2, int n2); - void (*shim_sethook)(lua_State* L, lua_Hook func, int mask, int count); - lua_Hook (*shim_gethook)(lua_State* L); - int (*shim_gethookmask)(lua_State* L); - int (*shim_gethookcount)(lua_State* L); - void (*shimL_checkversion_)(lua_State* L, lua_Number ver, size_t sz); - int (*shimL_getmetafield)(lua_State* L, int obj, const char* e); - int (*shimL_callmeta)(lua_State* L, int obj, const char* e); - const char* (*shimL_tolstring)(lua_State* L, int idx, size_t* len); - int (*shimL_argerror)(lua_State* L, int arg, const char* extramsg); - const char* (*shimL_checklstring)(lua_State* L, int arg, size_t* l); - const char* (*shimL_optlstring)(lua_State* L, int arg, const char* def, size_t* l); - lua_Number (*shimL_checknumber)(lua_State* L, int arg); - lua_Number (*shimL_optnumber)(lua_State* L, int arg, lua_Number def); - lua_Integer (*shimL_checkinteger)(lua_State* L, int arg); - lua_Integer (*shimL_optinteger)(lua_State* L, int arg, lua_Integer def); - void (*shimL_checkstack)(lua_State* L, int sz, const char* msg); - void (*shimL_checktype)(lua_State* L, int arg, int t); - void (*shimL_checkany)(lua_State* L, int arg); - int (*shimL_newmetatable)(lua_State* L, const char* tname); - void (*shimL_setmetatable)(lua_State* L, const char* tname); - void* (*shimL_testudata)(lua_State* L, int ud, const char* tname); - void* (*shimL_checkudata)(lua_State* L, int ud, const char* tname); - void (*shimL_where)(lua_State* L, int lvl); - int (*shimL_checkoption)(lua_State* L, int arg, const char* def, const char* const lst[]); - int (*shimL_fileresult)(lua_State* L, int stat, const char* fname); - int (*shimL_execresult)(lua_State* L, int stat); - int (*shimL_ref)(lua_State* L, int t); - void (*shimL_unref)(lua_State* L, int t, int ref); - int (*shimL_loadfilex)(lua_State* L, const char* filename, const char* mode); - int (*shimL_loadbufferx)(lua_State* L, const char* buff, size_t sz, const char* name, const char* mode); - int (*shimL_loadstring)(lua_State* L, const char* s); - lua_State* (*shimL_newstate)(); - lua_Integer (*shimL_len)(lua_State* L, int idx); - const char* (*shimL_gsub)(lua_State* L, const char* s, const char* p, const char* r); - void (*shimL_setfuncs)(lua_State* L, const luaL_Reg* l, int nup); - int (*shimL_getsubtable)(lua_State* L, int idx, const char* fname); - void (*shimL_traceback)(lua_State* L, lua_State* L1, const char* msg, int level); - void (*shimL_requiref)(lua_State* L, const char* modname, lua_CFunction openf, int glb); - void (*shimL_buffinit)(lua_State* L, luaL_Buffer* B); - char* (*shimL_prepbuffsize)(luaL_Buffer* B, size_t sz); - void (*shimL_addlstring)(luaL_Buffer* B, const char* s, size_t l); - void (*shimL_addstring)(luaL_Buffer* B, const char* s); - void (*shimL_addvalue)(luaL_Buffer* B); - void (*shimL_pushresult)(luaL_Buffer* B); - void (*shimL_pushresultsize)(luaL_Buffer* B, size_t sz); - char* (*shimL_buffinitsize)(lua_State* L, luaL_Buffer* B, size_t sz); -} LuaFunctionTable_t; - -#endif diff --git a/build/premake/premake5/contrib/luashim/premake5.lua b/build/premake/premake5/contrib/luashim/premake5.lua deleted file mode 100644 index 20db153c00..0000000000 --- a/build/premake/premake5/contrib/luashim/premake5.lua +++ /dev/null @@ -1,20 +0,0 @@ -project "luashim-lib" - language "C" - kind "StaticLib" - warnings "extra" - pic "on" - - includedirs { "../lua/src" } - - files - { - "*.c", - "*.h", - "*.lua" - } - - filter "system:linux or bsd or hurd or aix or haiku" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - - filter "system:macosx" - defines { "LUA_USE_MACOSX" } diff --git a/build/premake/premake5/contrib/mbedtls/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/CMakeLists.txt deleted file mode 100644 index 8905218530..0000000000 --- a/build/premake/premake5/contrib/mbedtls/CMakeLists.txt +++ /dev/null @@ -1,137 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project("mbed TLS" C) - -option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) -option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) - -option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) - - -# the test suites currently have compile errors with MSVC -if(MSVC) - option(ENABLE_TESTING "Build mbed TLS tests." OFF) -else() - option(ENABLE_TESTING "Build mbed TLS tests." ON) -endif() - -set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} - CACHE STRING "Choose the type of build: None Debug Release Coverage ASan ASanDbg MemSan MemSanDbg Check CheckFull" - FORCE) - -string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}") - -if(CMAKE_COMPILER_IS_GNUCC) - # some warnings we want are not available with old GCC versions - # note: starting with CMake 2.8 we could use CMAKE_C_COMPILER_VERSION - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion - OUTPUT_VARIABLE GCC_VERSION) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings") - if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlogical-op") - endif() - if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow") - endif() - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") - set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") - set(CMAKE_C_FLAGS_ASAN "-Werror -fsanitize=address -fno-common -O3") - set(CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls ") - set(CMAKE_C_FLAGS_CHECK "-Werror -Os") - set(CMAKE_C_FLAGS_CHECKFULL "${CMAKE_C_FLAGS_CHECK} -Wcast-qual") -endif(CMAKE_COMPILER_IS_GNUCC) - -if(CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow") - set(CMAKE_C_FLAGS_RELEASE "-O2") - set(CMAKE_C_FLAGS_DEBUG "-O0 -g3") - set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage") - set(CMAKE_C_FLAGS_ASAN "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover -O3") - set(CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls ") - set(CMAKE_C_FLAGS_MEMSAN "-Werror -fsanitize=memory -O3") - set(CMAKE_C_FLAGS_MEMSANDBG "-Werror -fsanitize=memory -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2") - set(CMAKE_C_FLAGS_CHECK "-Werror -Os") -endif(CMAKE_COMPILER_IS_CLANG) - -if(MSVC) - set(CMAKE_C_FLAGS_CHECK "/WX") -endif(MSVC) - -if(CMAKE_BUILD_TYPE STREQUAL "Coverage") - if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - set(CMAKE_SHARED_LINKER_FLAGS "--coverage") - endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) -endif(CMAKE_BUILD_TYPE STREQUAL "Coverage") - -if(LIB_INSTALL_DIR) -else() - set(LIB_INSTALL_DIR lib) -endif() - -include_directories(include/) - -if(ENABLE_ZLIB_SUPPORT) - find_package(ZLIB) - - if(ZLIB_FOUND) - include_directories(${ZLIB_INCLUDE_DIR}) - endif(ZLIB_FOUND) -endif(ENABLE_ZLIB_SUPPORT) - -add_subdirectory(library) -add_subdirectory(include) - -if(ENABLE_PROGRAMS) - add_subdirectory(programs) -endif() - -# targets for doxygen only work on Unix -if(UNIX) - ADD_CUSTOM_TARGET(apidoc - COMMAND mkdir -p apidoc - COMMAND cp include/mbedtls/config.h include/mbedtls/config.h.bak - COMMAND scripts/config.pl realfull - COMMAND doxygen doxygen/mbedtls.doxyfile - COMMAND mv include/mbedtls/config.h.bak include/mbedtls/config.h - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - - ADD_CUSTOM_TARGET(apidoc_clean - COMMAND rm -rf apidoc - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -endif(UNIX) - -if(ENABLE_TESTING) - enable_testing() - - add_subdirectory(tests) - - # additional convenience targets for Unix only - if(UNIX) - - ADD_CUSTOM_TARGET(covtest - COMMAND make test - COMMAND programs/test/selftest - COMMAND tests/compat.sh - COMMAND tests/ssl-opt.sh - ) - - ADD_CUSTOM_TARGET(lcov - COMMAND rm -rf Coverage - COMMAND lcov --capture --initial --directory library/CMakeFiles/mbedtls.dir -o files.info - COMMAND lcov --capture --directory library/CMakeFiles/mbedtls.dir -o tests.info - COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info - COMMAND lcov --remove all.info -o final.info '*.h' - COMMAND gendesc tests/Descriptions.txt -o descriptions - COMMAND genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info - COMMAND rm -f files.info tests.info all.info final.info descriptions - ) - - ADD_CUSTOM_TARGET(memcheck - COMMAND sed -i.bak s+/usr/bin/valgrind+`which valgrind`+ DartConfiguration.tcl - COMMAND ctest -O memcheck.log -D ExperimentalMemCheck - COMMAND tail -n1 memcheck.log | grep 'Memory checking results:' > /dev/null - COMMAND rm -f memcheck.log - COMMAND mv DartConfiguration.tcl.bak DartConfiguration.tcl - ) - endif(UNIX) -endif() diff --git a/build/premake/premake5/contrib/mbedtls/ChangeLog b/build/premake/premake5/contrib/mbedtls/ChangeLog deleted file mode 100644 index e21187fff4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/ChangeLog +++ /dev/null @@ -1,1943 +0,0 @@ -mbed TLS ChangeLog (Sorted per branch, date) - -= mbed TLS 2.2.1 released 2016-01-05 - -Security - * Fix potential double free when mbedtls_asn1_store_named_data() fails to - allocate memory. Only used for certificate generation, not triggerable - remotely in SSL/TLS. Found by Rafał Przywara. #367 - * Disable MD5 handshake signatures in TLS 1.2 by default - -Bugfix - * Fix over-restrictive length limit in GCM. Found by Andreas-N. #362 - * Fix bug in certificate validation that caused valid chains to be rejected - when the first intermediate certificate has pathLenConstraint=0. Found by - Nicholas Wilson. Introduced in mbed TLS 2.2.0. #280 - * Removed potential leak in mbedtls_rsa_rsassa_pkcs1_v15_sign(), found by - JayaraghavendranK. #372 - * Fix suboptimal handling of unexpected records that caused interop issues - with some peers over unreliable links. Avoid dropping an entire DTLS - datagram if a single record in a datagram is unexpected, instead only - drop the record and look at subsequent records (if any are present) in - the same datagram. Found by jeannotlapin. #345 - -= mbed TLS 2.2.0 released 2015-11-04 - -Security - * Fix potential double free if mbedtls_ssl_conf_psk() is called more than - once and some allocation fails. Cannot be forced remotely. Found by Guido - Vranken, Intelworks. - * Fix potential heap corruption on Windows when - mbedtls_x509_crt_parse_path() is passed a path longer than 2GB. Cannot be - triggered remotely. Found by Guido Vranken, Intelworks. - * Fix potential buffer overflow in some asn1_write_xxx() functions. - Cannot be triggered remotely unless you create X.509 certificates based - on untrusted input or write keys of untrusted origin. Found by Guido - Vranken, Intelworks. - * The X509 max_pathlen constraint was not enforced on intermediate - certificates. Found by Nicholas Wilson, fix and tests provided by - Janos Follath. #280 and #319 - -Features - * Experimental support for EC J-PAKE as defined in Thread 1.0.0. - Disabled by default as the specification might still change. - * Added a key extraction callback to accees the master secret and key - block. (Potential uses include EAP-TLS and Thread.) - -Bugfix - * Self-signed certificates were not excluded from pathlen counting, - resulting in some valid X.509 being incorrectly rejected. Found and fix - provided by Janos Follath. #319 - * Fix build error with configurations where ECDHE-PSK is the only key - exchange. Found and fix provided by Chris Hammond. #270 - * Fix build error with configurations where RSA, RSA-PSK, ECDH-RSA or - ECHD-ECDSA if the only key exchange. Multiple reports. #310 - * Fixed a bug causing some handshakes to fail due to some non-fatal alerts - not being properly ignored. Found by mancha and Kasom Koht-arsa, #308 - * mbedtls_x509_crt_verify(_with_profile)() now also checks the key type and - size/curve against the profile. Before that, there was no way to set a - minimum key size for end-entity certificates with RSA keys. Found by - Matthew Page of Scannex Electronics Ltd. - * Fix failures in MPI on Sparc(64) due to use of bad assembly code. - Found by Kurt Danielson. #292 - * Fix typo in name of the extKeyUsage OID. Found by inestlerode, #314 - * Fix bug in ASN.1 encoding of booleans that caused generated CA - certificates to be rejected by some applications, including OS X - Keychain. Found and fixed by Jonathan Leroy, Inikup. - -Changes - * Improved performance of mbedtls_ecp_muladd() when one of the scalars is 1 - or -1. - -= mbed TLS 2.1.2 released 2015-10-06 - -Security - * Added fix for CVE-2015-5291 to prevent heap corruption due to buffer - overflow of the hostname or session ticket. Found by Guido Vranken, - Intelworks. - * Fix potential double-free if mbedtls_ssl_set_hs_psk() is called more than - once in the same handhake and mbedtls_ssl_conf_psk() was used. - Found and patch provided by Guido Vranken, Intelworks. Cannot be forced - remotely. - * Fix stack buffer overflow in pkcs12 decryption (used by - mbedtls_pk_parse_key(file)() when the password is > 129 bytes. - Found by Guido Vranken, Intelworks. Not triggerable remotely. - * Fix potential buffer overflow in mbedtls_mpi_read_string(). - Found by Guido Vranken, Intelworks. Not exploitable remotely in the context - of TLS, but might be in other uses. On 32 bit machines, requires reading a - string of close to or larger than 1GB to exploit; on 64 bit machines, would - require reading a string of close to or larger than 2^62 bytes. - * Fix potential random memory allocation in mbedtls_pem_read_buffer() - on crafted PEM input data. Found and fix provided by Guido Vranken, - Intelworks. Not triggerable remotely in TLS. Triggerable remotely if you - accept PEM data from an untrusted source. - * Fix possible heap buffer overflow in base64_encoded() when the input - buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken, - Intelworks. Not trigerrable remotely in TLS. - * Fix potential double-free if mbedtls_conf_psk() is called repeatedly on - the same mbedtls_ssl_config object and memory allocation fails. Found by - Guido Vranken, Intelworks. Cannot be forced remotely. - * Fix potential heap buffer overflow in servers that perform client - authentication against a crafted CA cert. Cannot be triggered remotely - unless you allow third parties to pick trust CAs for client auth. - Found by Guido Vranken, Intelworks. - -Bugfix - * Fix compile error in net.c with musl libc. Found and patch provided by - zhasha (#278). - * Fix macroization of 'inline' keyword when building as C++. (#279) - -Changes - * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure - domain names are compliant with RFC 1035. - * Fixed paths for check_config.h in example config files. (Found by bachp) - (#291) - -= mbed TLS 2.1.1 released 2015-09-17 - -Security - * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5 - signatures. (Found by Florian Weimer, Red Hat.) - https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/ - * Fix possible client-side NULL pointer dereference (read) when the client - tries to continue the handshake after it failed (a misuse of the API). - (Found and patch provided by Fabian Foerg, Gotham Digital Science using - afl-fuzz.) - -Bugfix - * Fix warning when using a 64bit platform. (found by embedthis) (#275) - * Fix off-by-one error in parsing Supported Point Format extension that - caused some handshakes to fail. - -Changes - * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow - use of mbedtls_x509_crt_profile_next. (found by NWilson) - * When a client initiates a reconnect from the same port as a live - connection, if cookie verification is available - (MBEDTLS_SSL_DTLS_HELLO_VERIFY defined in config.h, and usable cookie - callbacks set with mbedtls_ssl_conf_dtls_cookies()), this will be - detected and mbedtls_ssl_read() will return - MBEDTLS_ERR_SSL_CLIENT_RECONNECT - it is then possible to start a new - handshake with the same context. (See RFC 6347 section 4.2.8.) - -= mbed TLS 2.1.0 released 2015-09-04 - -Features - * Added support for yotta as a build system. - * Primary open source license changed to Apache 2.0 license. - -Bugfix - * Fix segfault in the benchmark program when benchmarking DHM. - * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo - Leisink). - * Fix bug when parsing a ServerHello without extensions (found by David - Sears). - * Fix bug in CMake lists that caused libmbedcrypto.a not to be installed - (found by Benoit Lecocq). - * Fix bug in Makefile that caused libmbedcrypto and libmbedx509 not to be - installed (found by Rawi666). - * Fix compile error with armcc 5 with --gnu option. - * Fix bug in Makefile that caused programs not to be installed correctly - (found by robotanarchy) (#232). - * Fix bug in Makefile that prevented from installing without building the - tests (found by robotanarchy) (#232). - * Fix missing -static-libgcc when building shared libraries for Windows - with make. - * Fix link error when building shared libraries for Windows with make. - * Fix error when loading libmbedtls.so. - * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to - be always used (found by dcb314) (#235) - * Fix bug in mbedtls_rsa_public() and mbedtls_rsa_private() that could - result trying to unlock an unlocked mutex on invalid input (found by - Fredrik Axelsson) (#257) - * Fix -Wshadow warnings (found by hnrkp) (#240) - * Fix memory corruption on client with overlong PSK identity, around - SSL_MAX_CONTENT_LEN or higher - not triggerrable remotely (found by - Aleksandrs Saveljevs) (#238) - * Fix unused function warning when using MBEDTLS_MDx_ALT or - MBEDTLS_SHAxxx_ALT (found by Henrik) (#239) - * Fix memory corruption in pkey programs (found by yankuncheng) (#210) - -Changes - * The PEM parser now accepts a trailing space at end of lines (#226). - * It is now possible to #include a user-provided configuration file at the - end of the default config.h by defining MBEDTLS_USER_CONFIG_FILE on the - compiler's command line. - * When verifying a certificate chain, if an intermediate certificate is - trusted, no later cert is checked. (suggested by hannes-landeholm) - (#220). - * Prepend a "thread identifier" to debug messages (issue pointed out by - Hugo Leisink) (#210). - * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment - length. - -= mbed TLS 2.0.0 released 2015-07-13 - -Features - * Support for DTLS 1.0 and 1.2 (RFC 6347). - * Ability to override core functions from MDx, SHAx, AES and DES modules - with custom implementation (eg hardware accelerated), complementing the - ability to override the whole module. - * New server-side implementation of session tickets that rotate keys to - preserve forward secrecy, and allows sharing across multiple contexts. - * Added a concept of X.509 cerificate verification profile that controls - which algorithms and key sizes (curves for ECDSA) are acceptable. - * Expanded configurability of security parameters in the SSL module with - mbedtls_ssl_conf_dhm_min_bitlen() and mbedtls_ssl_conf_sig_hashes(). - * Introduced a concept of presets for SSL security-relevant configuration - parameters. - -API Changes - * The library has been split into libmbedcrypto, libmbedx509, libmbedtls. - You now need to link to all of them if you use TLS for example. - * All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace. - Some names have been further changed to make them more consistent. - Migration helpers scripts/rename.pl and include/mbedlts/compat-1.3.h are - provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt - * Renamings of fields inside structures, not covered by the previous list: - mbedtls_cipher_info_t.key_length -> key_bitlen - mbedtls_cipher_context_t.key_length -> key_bitlen - mbedtls_ecp_curve_info.size -> bit_size - * Headers are now found in the 'mbedtls' directory (previously 'polarssl'). - * The following _init() functions that could return errors have - been split into an _init() that returns void and another function that - should generally be the first function called on this context after init: - mbedtls_ssl_init() -> mbedtls_ssl_setup() - mbedtls_ccm_init() -> mbedtls_ccm_setkey() - mbedtls_gcm_init() -> mbedtls_gcm_setkey() - mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_seed(_buf)() - mbedtls_ctr_drbg_init() -> mbedtls_ctr_drbg_seed() - Note that for mbedtls_ssl_setup(), you need to be done setting up the - ssl_config structure before calling it. - * Most ssl_set_xxx() functions (all except ssl_set_bio(), ssl_set_hostname(), - ssl_set_session() and ssl_set_client_transport_id(), plus - ssl_legacy_renegotiation()) have been renamed to mbedtls_ssl_conf_xxx() - (see rename.pl and compat-1.3.h above) and their first argument's type - changed from ssl_context to ssl_config. - * ssl_set_bio() changed signature (contexts merged, order switched, one - additional callback for read-with-timeout). - * The following functions have been introduced and must be used in callback - implementations (SNI, PSK) instead of their *conf counterparts: - mbedtls_ssl_set_hs_own_cert() - mbedtls_ssl_set_hs_ca_chain() - mbedtls_ssl_set_hs_psk() - * mbedtls_ssl_conf_ca_chain() lost its last argument (peer_cn), now set - using mbedtls_ssl_set_hostname(). - * mbedtls_ssl_conf_session_cache() changed prototype (only one context - pointer, parameters reordered). - * On server, mbedtls_ssl_conf_session_tickets_cb() must now be used in - place of mbedtls_ssl_conf_session_tickets() to enable session tickets. - * The SSL debug callback gained two new arguments (file name, line number). - * Debug modes were removed. - * mbedtls_ssl_conf_truncated_hmac() now returns void. - * mbedtls_memory_buffer_alloc_init() now returns void. - * X.509 verification flags are now an uint32_t. Affect the signature of: - mbedtls_ssl_get_verify_result() - mbedtls_x509_ctr_verify_info() - mbedtls_x509_crt_verify() (flags, f_vrfy -> needs to be updated) - mbedtls_ssl_conf_verify() (f_vrfy -> needs to be updated) - * The following functions changed prototype to avoid an in-out length - parameter: - mbedtls_base64_encode() - mbedtls_base64_decode() - mbedtls_mpi_write_string() - mbedtls_dhm_calc_secret() - * In the NET module, all "int" and "int *" arguments for file descriptors - changed type to "mbedtls_net_context *". - * net_accept() gained new arguments for the size of the client_ip buffer. - * In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now - return void. - * ecdsa_write_signature() gained an addtional md_alg argument and - ecdsa_write_signature_det() was deprecated. - * pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA. - * Last argument of x509_crt_check_key_usage() and - mbedtls_x509write_crt_set_key_usage() changed from int to unsigned. - * test_ca_list (from certs.h) is renamed to test_cas_pem and is only - available if POLARSSL_PEM_PARSE_C is defined (it never worked without). - * Test certificates in certs.c are no longer guaranteed to be nul-terminated - strings; use the new *_len variables instead of strlen(). - * Functions mbedtls_x509_xxx_parse(), mbedtls_pk_parse_key(), - mbedtls_pk_parse_public_key() and mbedtls_dhm_parse_dhm() now expect the - length parameter to include the terminating null byte for PEM input. - * Signature of mpi_mul_mpi() changed to make the last argument unsigned - * calloc() is now used instead of malloc() everywhere. API of platform - layer and the memory_buffer_alloc module changed accordingly. - (Thanks to Mansour Moufid for helping with the replacement.) - * Change SSL_DISABLE_RENEGOTIATION config.h flag to SSL_RENEGOTIATION - (support for renegotiation now needs explicit enabling in config.h). - * Split MBEDTLS_HAVE_TIME into MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE - in config.h - * net_connect() and net_bind() have a new 'proto' argument to choose - between TCP and UDP, using the macros NET_PROTO_TCP or NET_PROTO_UDP. - Their 'port' argument type is changed to a string. - * Some constness fixes - -Removals - * Removed mbedtls_ecp_group_read_string(). Only named groups are supported. - * Removed mbedtls_ecp_sub() and mbedtls_ecp_add(), use - mbedtls_ecp_muladd(). - * Removed individual mdX_hmac, shaX_hmac, mdX_file and shaX_file functions - (use generic functions from md.h) - * Removed mbedtls_timing_msleep(). Use mbedtls_net_usleep() or a custom - waiting function. - * Removed test DHM parameters from the test certs module. - * Removed the PBKDF2 module (use PKCS5). - * Removed POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()). - * Removed compat-1.2.h (helper for migrating from 1.2 to 1.3). - * Removed openssl.h (very partial OpenSSL compatibility layer). - * Configuration options POLARSSL_HAVE_LONGLONG was removed (now always on). - * Configuration options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 have - been removed (compiler is required to support 32-bit operations). - * Configuration option POLARSSL_HAVE_IPV6 was removed (always enabled). - * Removed test program o_p_test, the script compat.sh does more. - * Removed test program ssl_test, superseded by ssl-opt.sh. - * Removed helper script active-config.pl - -New deprecations - * md_init_ctx() is deprecated in favour of md_setup(), that adds a third - argument (allowing memory savings if HMAC is not used) - -Semi-API changes (technically public, morally private) - * Renamed a few headers to include _internal in the name. Those headers are - not supposed to be included by users. - * Changed md_info_t into an opaque structure (use md_get_xxx() accessors). - * Changed pk_info_t into an opaque structure. - * Changed cipher_base_t into an opaque structure. - * Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl. - * x509_crt.key_usage changed from unsigned char to unsigned int. - * Removed r and s from ecdsa_context - * Removed mode from des_context and des3_context - -Default behavior changes - * The default minimum TLS version is now TLS 1.0. - * RC4 is now blacklisted by default in the SSL/TLS layer, and excluded from the - default ciphersuite list returned by ssl_list_ciphersuites() - * Support for receiving SSLv2 ClientHello is now disabled by default at - compile time. - * The default authmode for SSL/TLS clients is now REQUIRED. - * Support for RSA_ALT contexts in the PK layer is now optional. Since is is - enabled in the default configuration, this is only noticeable if using a - custom config.h - * Default DHM parameters server-side upgraded from 1024 to 2048 bits. - * A minimum RSA key size of 2048 bits is now enforced during ceritificate - chain verification. - * Negotiation of truncated HMAC is now disabled by default on server too. - * The following functions are now case-sensitive: - mbedtls_cipher_info_from_string() - mbedtls_ecp_curve_info_from_name() - mbedtls_md_info_from_string() - mbedtls_ssl_ciphersuite_from_string() - mbedtls_version_check_feature() - -Requirement changes - * The minimum MSVC version required is now 2010 (better C99 support). - * The NET layer now unconditionnaly relies on getaddrinfo() and select(). - * Compiler is required to support C99 types such as long long and uint32_t. - -API changes from the 1.4 preview branch - * ssl_set_bio_timeout() was removed, split into mbedtls_ssl_set_bio() with - new prototype, and mbedtls_ssl_set_read_timeout(). - * The following functions now return void: - mbedtls_ssl_conf_transport() - mbedtls_ssl_conf_max_version() - mbedtls_ssl_conf_min_version() - * DTLS no longer hard-depends on TIMING_C, but uses a callback interface - instead, see mbedtls_ssl_set_timer_cb(), with the Timing module providing - an example implementation, see mbedtls_timing_delay_context and - mbedtls_timing_set/get_delay(). - * With UDP sockets, it is no longer necessary to call net_bind() again - after a successful net_accept(). - -Changes - * mbedtls_ctr_drbg_random() and mbedtls_hmac_drbg_random() are now - thread-safe if MBEDTLS_THREADING_C is enabled. - * Reduced ROM fooprint of SHA-256 and added an option to reduce it even - more (at the expense of performance) MBEDTLS_SHA256_SMALLER. - -= mbed TLS 1.3 branch - -Security - * With authmode set to SSL_VERIFY_OPTIONAL, verification of keyUsage and - extendedKeyUsage on the leaf certificate was lost (results not accessible - via ssl_get_verify_results()). - * Add countermeasure against "Lucky 13 strikes back" cache-based attack, - https://dl.acm.org/citation.cfm?id=2714625 - -Features - * Improve ECC performance by using more efficient doubling formulas - (contributed by Peter Dettman). - * Add x509_crt_verify_info() to display certificate verification results. - * Add support for reading DH parameters with privateValueLength included - (contributed by Daniel Kahn Gillmor). - * Add support for bit strings in X.509 names (request by Fredrik Axelsson). - * Add support for id-at-uniqueIdentifier in X.509 names. - * Add support for overriding snprintf() (except on Windows) and exit() in - the platform layer. - * Add an option to use macros instead of function pointers in the platform - layer (helps get rid of unwanted references). - * Improved Makefiles for Windows targets by fixing library targets and making - cross-compilation easier (thanks to Alon Bar-Lev). - * The benchmark program also prints heap usage for public-key primitives - if POLARSSL_MEMORY_BUFFER_ALLOC_C and POLARSSL_MEMORY_DEBUG are defined. - * New script ecc-heap.sh helps measuring the impact of ECC parameters on - speed and RAM (heap only for now) usage. - * New script memory.sh helps measuring the ROM and RAM requirements of two - reduced configurations (PSK-CCM and NSA suite B). - * Add config flag POLARSSL_DEPRECATED_WARNING (off by default) to produce - warnings on use of deprecated functions (with GCC and Clang only). - * Add config flag POLARSSL_DEPRECATED_REMOVED (off by default) to produce - errors on use of deprecated functions. - -Bugfix - * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS. - * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara). - * Fix bug in entropy.c when THREADING_C is also enabled that caused - entropy_free() to crash (thanks to Rafał Przywara). - * Fix memory leak when gcm_setkey() and ccm_setkey() are used more than - once on the same context. - * Fix bug in ssl_mail_client when password is longer that username (found - by Bruno Pape). - * Fix undefined behaviour (memcmp( NULL, NULL, 0 );) in X.509 modules - (detected by Clang's 3.6 UBSan). - * mpi_size() and mpi_msb() would segfault when called on an mpi that is - initialized but not set (found by pravic). - * Fix detection of support for getrandom() on Linux (reported by syzzer) by - doing it at runtime (using uname) rather that compile time. - * Fix handling of symlinks by "make install" (found by Gaël PORTAY). - * Fix potential NULL pointer dereference (not trigerrable remotely) when - ssl_write() is called before the handshake is finished (introduced in - 1.3.10) (first reported by Martin Blumenstingl). - * Fix bug in pk_parse_key() that caused some valid private EC keys to be - rejected. - * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). - * Fix thread safety bug in RSA operations (found by Fredrik Axelsson). - * Fix hardclock() (only used in the benchmarking program) with some - versions of mingw64 (found by kxjhlele). - * Fix warnings from mingw64 in timing.c (found by kxjklele). - * Fix potential unintended sign extension in asn1_get_len() on 64-bit - platforms. - * Fix potential memory leak in ssl_set_psk() (found by Mansour Moufid). - * Fix compile error when POLARSSL_SSL_DISABLE_RENEGOTATION and - POLARSSL_SSL_SSESSION_TICKETS where both enabled in config.h (introduced - in 1.3.10). - * Add missing extern "C" guard in aesni.h (reported by amir zamani). - * Add missing dependency on SHA-256 in some x509 programs (reported by - Gergely Budai). - * Fix bug related to ssl_set_curves(): the client didn't check that the - curve picked by the server was actually allowed. - -Changes - * Remove bias in mpi_gen_prime (contributed by Pascal Junod). - * Remove potential sources of timing variations (some contributed by Pascal - Junod). - * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated. - * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated. - * compat-1.2.h and openssl.h are deprecated. - * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now - more flexible (warning: OFLAGS is not used any more) (see the README) - (contributed by Alon Bar-Lev). - * ssl_set_own_cert() no longer calls pk_check_pair() since the - performance impact was bad for some users (this was introduced in 1.3.10). - * Move from SHA-1 to SHA-256 in example programs using signatures - (suggested by Thorsten Mühlfelder). - * Remove some unneeded inclusions of header files from the standard library - "minimize" others (eg use stddef.h if only size_t is needed). - * Change #include lines in test files to use double quotes instead of angle - brackets for uniformity with the rest of the code. - * Remove dependency on sscanf() in X.509 parsing modules. - -= mbed TLS 1.3.10 released 2015-02-09 -Security - * NULL pointer dereference in the buffer-based allocator when the buffer is - full and polarssl_free() is called (found by Mark Hasemeyer) - (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is - not by default). - * Fix remotely-triggerable uninitialised pointer dereference caused by - crafted X.509 certificate (TLS server is not affected if it doesn't ask for a - client certificate) (found using Codenomicon Defensics). - * Fix remotely-triggerable memory leak caused by crafted X.509 certificates - (TLS server is not affected if it doesn't ask for a client certificate) - (found using Codenomicon Defensics). - * Fix potential stack overflow while parsing crafted X.509 certificates - (TLS server is not affected if it doesn't ask for a client certificate) - (found using Codenomicon Defensics). - * Fix timing difference that could theoretically lead to a - Bleichenbacher-style attack in the RSA and RSA-PSK key exchanges - (reported by Sebastian Schinzel). - -Features - * Add support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv). - * Add support for Extended Master Secret (draft-ietf-tls-session-hash). - * Add support for Encrypt-then-MAC (RFC 7366). - * Add function pk_check_pair() to test if public and private keys match. - * Add x509_crl_parse_der(). - * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the - length of an X.509 verification chain. - * Support for renegotiation can now be disabled at compile-time - * Support for 1/n-1 record splitting, a countermeasure against BEAST. - * Certificate selection based on signature hash, preferring SHA-1 over SHA-2 - for pre-1.2 clients when multiple certificates are available. - * Add support for getrandom() syscall on recent Linux kernels with Glibc or - a compatible enough libc (eg uClibc). - * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime - while using the default ciphersuite list. - * Added new error codes and debug messages about selection of - ciphersuite/certificate. - -Bugfix - * Stack buffer overflow if ctr_drbg_update() is called with too large - add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). - * Possible buffer overflow of length at most POLARSSL_MEMORY_ALIGN_MULTIPLE - if memory_buffer_alloc_init() was called with buf not aligned and len not - a multiple of POLARSSL_MEMORY_ALIGN_MULTIPLE (not triggerable remotely). - * User set CFLAGS were ignored by Cmake with gcc (introduced in 1.3.9, found - by Julian Ospald). - * Fix potential undefined behaviour in Camellia. - * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a - multiple of 8 (found by Gergely Budai). - * Fix unchecked return code in x509_crt_parse_path() on Windows (found by - Peter Vaskovic). - * Fix assembly selection for MIPS64 (thanks to James Cowgill). - * ssl_get_verify_result() now works even if the handshake was aborted due - to a failed verification (found by Fredrik Axelsson). - * Skip writing and parsing signature_algorithm extension if none of the - key exchanges enabled needs certificates. This fixes a possible interop - issue with some servers when a zero-length extension was sent. (Reported - by Peter Dettman.) - * On a 0-length input, base64_encode() did not correctly set output length - (found by Hendrik van den Boogaard). - -Changes - * Use deterministic nonces for AEAD ciphers in TLS by default (possible to - switch back to random with POLARSSL_SSL_AEAD_RANDOM_IV in config.h). - * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. - * ssl_set_own_cert() now returns an error on key-certificate mismatch. - * Forbid repeated extensions in X.509 certificates. - * debug_print_buf() now prints a text view in addition to hexadecimal. - * A specific error is now returned when there are ciphersuites in common - but none of them is usable due to external factors such as no certificate - with a suitable (extended)KeyUsage or curve or no PSK set. - * It is now possible to disable negotiation of truncated HMAC server-side - at runtime with ssl_set_truncated_hmac(). - * Example programs for SSL client and server now disable SSLv3 by default. - * Example programs for SSL client and server now disable RC4 by default. - * Use platform.h in all test suites and programs. - -= PolarSSL 1.3.9 released 2014-10-20 -Security - * Lowest common hash was selected from signature_algorithms extension in - TLS 1.2 (found by Darren Bane) (introduced in 1.3.8). - * Remotely-triggerable memory leak when parsing some X.509 certificates - (server is not affected if it doesn't ask for a client certificate) - (found using Codenomicon Defensics). - * Remotely-triggerable memory leak when parsing crafted ClientHello - (not affected if ECC support was compiled out) (found using Codenomicon - Defensics). - -Bugfix - * Support escaping of commas in x509_string_to_names() - * Fix compile error in ssl_pthread_server (found by Julian Ospald). - * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). - * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). - * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). - * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST - are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito). - * Remove non-existent file from VS projects (found by Peter Vaskovic). - * ssl_read() could return non-application data records on server while - renegotation was pending, and on client when a HelloRequest was received. - * Server-initiated renegotiation would fail with non-blocking I/O if the - write callback returned WANT_WRITE when requesting renegotiation. - * ssl_close_notify() could send more than one message in some circumstances - with non-blocking I/O. - * Fix compiler warnings on iOS (found by Sander Niemeijer). - * x509_crt_parse() did not increase total_failed on PEM error - * Fix compile error with armcc in mpi_is_prime() - * Fix potential bad read in parsing ServerHello (found by Adrien - Vialletelle). - -Changes - * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no - standard defining how to use SHA-2 with SSL 3.0). - * Ciphersuites using RSA-PSK key exchange new require TLS 1.x (the spec is - ambiguous on how to encode some packets with SSL 3.0). - * Made buffer size in pk_write_(pub)key_pem() more dynamic, eg smaller if - RSA is disabled, larger if POLARSSL_MPI_MAX_SIZE is larger. - * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than - POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. - * POLARSSL_MPI_MAX_SIZE now defaults to 1024 in order to allow 8192 bits - RSA keys. - * Accept spaces at end of line or end of buffer in base64_decode(). - * X.509 certificates with more than one AttributeTypeAndValue per - RelativeDistinguishedName are not accepted any more. - -= PolarSSL 1.3.8 released 2014-07-11 -Security - * Fix length checking for AEAD ciphersuites (found by Codenomicon). - It was possible to crash the server (and client) using crafted messages - when a GCM suite was chosen. - -Features - * Add CCM module and cipher mode to Cipher Layer - * Support for CCM and CCM_8 ciphersuites - * Support for parsing and verifying RSASSA-PSS signatures in the X.509 - modules (certificates, CRLs and CSRs). - * Blowfish in the cipher layer now supports variable length keys. - * Add example config.h for PSK with CCM, optimized for low RAM usage. - * Optimize for RAM usage in example config.h for NSA Suite B profile. - * Add POLARSSL_REMOVE_ARC4_CIPHERSUITES to allow removing RC4 ciphersuites - from the default list (inactive by default). - * Add server-side enforcement of sent renegotiation requests - (ssl_set_renegotiation_enforced()) - * Add SSL_CIPHERSUITES config.h flag to allow specifying a list of - ciphersuites to use and save some memory if the list is small. - -Changes - * Add LINK_WITH_PTHREAD option in CMake for explicit linking that is - required on some platforms (e.g. OpenBSD) - * Migrate zeroizing of data to polarssl_zeroize() instead of memset() - against unwanted compiler optimizations - * md_list() now returns hashes strongest first - * Selection of hash for signing ServerKeyExchange in TLS 1.2 now picks - strongest offered by client. - * All public contexts have _init() and _free() functions now for simpler - usage pattern - -Bugfix - * Fix in debug_print_msg() - * Enforce alignment in the buffer allocator even if buffer is not aligned - * Remove less-than-zero checks on unsigned numbers - * Stricter check on SSL ClientHello internal sizes compared to actual packet - size (found by TrustInSoft) - * Fix WSAStartup() return value check (found by Peter Vaskovic) - * Other minor issues (found by Peter Vaskovic) - * Fix symlink command for cross compiling with CMake (found by Andre - Heinecke) - * Fix DER output of gen_key app (found by Gergely Budai) - * Very small records were incorrectly rejected when truncated HMAC was in - use with some ciphersuites and versions (RC4 in all versions, CBC with - versions < TLS 1.1). - * Very large records using more than 224 bytes of padding were incorrectly - rejected with CBC-based ciphersuites and TLS >= 1.1 - * Very large records using less padding could cause a buffer overread of up - to 32 bytes with CBC-based ciphersuites and TLS >= 1.1 - * Restore ability to use a v1 cert as a CA if trusted locally. (This had - been removed in 1.3.6.) - * Restore ability to locally trust a self-signed cert that is not a proper - CA for use as an end entity certificate. (This had been removed in - 1.3.6.) - * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). - * Use \n\t rather than semicolons for bn_mul asm, since some assemblers - interpret semicolons as comment delimiters (found by Barry K. Nathan). - * Fix off-by-one error in parsing Supported Point Format extension that - caused some handshakes to fail. - * Fix possible miscomputation of the premaster secret with DHE-PSK key - exchange that caused some handshakes to fail with other implementations. - (Failure rate <= 1/255 with common DHM moduli.) - * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). - * Fix base64_decode() to return and check length correctly (in case of - tight buffers) - * Fix mpi_write_string() to write "00" as hex output for empty MPI (found - by Hui Dong) - -= PolarSSL 1.3.7 released on 2014-05-02 -Features - * debug_set_log_mode() added to determine raw or full logging - * debug_set_threshold() added to ignore messages over threshold level - * version_check_feature() added to check for compile-time options at - run-time - -Changes - * POLARSSL_CONFIG_OPTIONS has been removed. All values are individually - checked and filled in the relevant module headers - * Debug module only outputs full lines instead of parts - * Better support for the different Attribute Types from IETF PKIX (RFC 5280) - * AES-NI now compiles with "old" assemblers too - * Ciphersuites based on RC4 now have the lowest priority by default - -Bugfix - * Only iterate over actual certificates in ssl_write_certificate_request() - (found by Matthew Page) - * Typos in platform.c and pkcs11.c (found by Daniel Phillips and Steffan - Karger) - * cert_write app should use subject of issuer certificate as issuer of cert - * Fix false reject in padding check in ssl_decrypt_buf() for CBC - ciphersuites, for full SSL frames of data. - * Improve interoperability by not writing extension length in ClientHello / - ServerHello when no extensions are present (found by Matthew Page) - * rsa_check_pubkey() now allows an E up to N - * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings - * mpi_fill_random() was creating numbers larger than requested on - big-endian platform when size was not an integer number of limbs - * Fix dependencies issues in X.509 test suite. - * Some parts of ssl_tls.c were compiled even when the module was disabled. - * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) - * Fix detection of Clang on some Apple platforms with CMake - (found by Barry K. Nathan) - -= PolarSSL 1.3.6 released on 2014-04-11 - -Features - * Support for the ALPN SSL extension - * Add option 'use_dev_random' to gen_key application - * Enable verification of the keyUsage extension for CA and leaf - certificates (POLARSSL_X509_CHECK_KEY_USAGE) - * Enable verification of the extendedKeyUsage extension - (POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE) - -Changes - * x509_crt_info() now prints information about parsed extensions as well - * pk_verify() now returns a specific error code when the signature is valid - but shorter than the supplied length. - * Use UTC time to check certificate validity. - * Reject certificates with times not in UTC, per RFC 5280. - -Security - * Avoid potential timing leak in ecdsa_sign() by blinding modular division. - (Found by Watson Ladd.) - * The notAfter date of some certificates was no longer checked since 1.3.5. - This affects certificates in the user-supplied chain except the top - certificate. If the user-supplied chain contains only one certificates, - it is not affected (ie, its notAfter date is properly checked). - * Prevent potential NULL pointer dereference in ssl_read_record() (found by - TrustInSoft) - -Bugfix - * The length of various ClientKeyExchange messages was not properly checked. - * Some example server programs were not sending the close_notify alert. - * Potential memory leak in mpi_exp_mod() when error occurs during - calculation of RR. - * Fixed malloc/free default #define in platform.c (found by Gergely Budai). - * Fixed type which made POLARSSL_ENTROPY_FORCE_SHA256 uneffective (found by - Gergely Budai). - * Fix #include path in ecdsa.h which wasn't accepted by some compilers. - (found by Gergely Budai) - * Fix compile errors when POLARSSL_ERROR_STRERROR_BC is undefined (found by - Shuo Chen). - * oid_get_numeric_string() used to truncate the output without returning an - error if the output buffer was just 1 byte too small. - * dhm_parse_dhm() (hence dhm_parse_dhmfile()) did not set dhm->len. - * Calling pk_debug() on an RSA-alt key would segfault. - * pk_get_size() and pk_get_len() were off by a factor 8 for RSA-alt keys. - * Potential buffer overwrite in pem_write_buffer() because of low length - indication (found by Thijs Alkemade) - * EC curves constants, which should be only in ROM since 1.3.3, were also - stored in RAM due to missing 'const's (found by Gergely Budai). - -= PolarSSL 1.3.5 released on 2014-03-26 -Features - * HMAC-DRBG as a separate module - * Option to set the Curve preference order (disabled by default) - * Single Platform compatilibity layer (for memory / printf / fprintf) - * Ability to provide alternate timing implementation - * Ability to force the entropy module to use SHA-256 as its basis - (POLARSSL_ENTROPY_FORCE_SHA256) - * Testing script ssl-opt.sh added for testing 'live' ssl option - interoperability against OpenSSL and PolarSSL - * Support for reading EC keys that use SpecifiedECDomain in some cases. - * Entropy module now supports seed writing and reading - -Changes - * Deprecated the Memory layer - * entropy_add_source(), entropy_update_manual() and entropy_gather() - now thread-safe if POLARSSL_THREADING_C defined - * Improvements to the CMake build system, contributed by Julian Ospald. - * Work around a bug of the version of Clang shipped by Apple with Mavericks - that prevented bignum.c from compiling. (Reported by Rafael Baptista.) - * Revamped the compat.sh interoperatibility script to include support for - testing against GnuTLS - * Deprecated ssl_set_own_cert_rsa() and ssl_set_own_cert_rsa_alt() - * Improvements to tests/Makefile, contributed by Oden Eriksson. - -Security - * Forbid change of server certificate during renegotiation to prevent - "triple handshake" attack when authentication mode is 'optional' (the - attack was already impossible when authentication is required). - * Check notBefore timestamp of certificates and CRLs from the future. - * Forbid sequence number wrapping - * Fixed possible buffer overflow with overlong PSK - * Possible remotely-triggered out-of-bounds memory access fixed (found by - TrustInSoft) - -Bugfix - * ecp_gen_keypair() does more tries to prevent failure because of - statistics - * Fixed bug in RSA PKCS#1 v1.5 "reversed" operations - * Fixed testing with out-of-source builds using cmake - * Fixed version-major intolerance in server - * Fixed CMake symlinking on out-of-source builds - * Fixed dependency issues in test suite - * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0 - * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by - Alex Wilson.) - * ssl_cache was creating entries when max_entries=0 if TIMING_C was enabled. - * m_sleep() was sleeping twice too long on most Unix platforms. - * Fixed bug with session tickets and non-blocking I/O in the unlikely case - send() would return an EAGAIN error when sending the ticket. - * ssl_cache was leaking memory when reusing a timed out entry containing a - client certificate. - * ssl_srv was leaking memory when client presented a timed out ticket - containing a client certificate - * ssl_init() was leaving a dirty pointer in ssl_context if malloc of - out_ctr failed - * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc - of one of them failed - * Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts - * x509_get_current_time() uses localtime_r() to prevent thread issues - -= PolarSSL 1.3.4 released on 2014-01-27 -Features - * Support for the Koblitz curves: secp192k1, secp224k1, secp256k1 - * Support for RIPEMD-160 - * Support for AES CFB8 mode - * Support for deterministic ECDSA (RFC 6979) - -Bugfix - * Potential memory leak in bignum_selftest() - * Replaced expired test certificate - * ssl_mail_client now terminates lines with CRLF, instead of LF - * net module handles timeouts on blocking sockets better (found by Tilman - Sauerbeck) - * Assembly format fixes in bn_mul.h - -Security - * Missing MPI_CHK calls added around unguarded mpi calls (found by - TrustInSoft) - -= PolarSSL 1.3.3 released on 2013-12-31 -Features - * EC key generation support in gen_key app - * Support for adhering to client ciphersuite order preference - (POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE) - * Support for Curve25519 - * Support for ECDH-RSA and ECDH-ECDSA key exchanges and ciphersuites - * Support for IPv6 in the NET module - * AES-NI support for AES, AES-GCM and AES key scheduling - * SSL Pthread-based server example added (ssl_pthread_server) - -Changes - * gen_prime() speedup - * Speedup of ECP multiplication operation - * Relaxed some SHA2 ciphersuite's version requirements - * Dropped use of readdir_r() instead of readdir() with threading support - * More constant-time checks in the RSA module - * Split off curves from ecp.c into ecp_curves.c - * Curves are now stored fully in ROM - * Memory usage optimizations in ECP module - * Removed POLARSSL_THREADING_DUMMY - -Bugfix - * Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int - * Fixed X.509 hostname comparison (with non-regular characters) - * SSL now gracefully handles missing RNG - * Missing defines / cases for RSA_PSK key exchange - * crypt_and_hash app checks MAC before final decryption - * Potential memory leak in ssl_ticket_keys_init() - * Memory leak in benchmark application - * Fixed x509_crt_parse_path() bug on Windows platforms - * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by - TrustInSoft) - * Fixed potential overflow in certificate size verification in - ssl_write_certificate() (found by TrustInSoft) - -Security - * Possible remotely-triggered out-of-bounds memory access fixed (found by - TrustInSoft) - -= PolarSSL 1.3.2 released on 2013-11-04 -Features - * PK tests added to test framework - * Added optional optimization for NIST MODP curves (POLARSSL_ECP_NIST_OPTIM) - * Support for Camellia-GCM mode and ciphersuites - -Changes - * Padding checks in cipher layer are now constant-time - * Value comparisons in SSL layer are now constant-time - * Support for serialNumber, postalAddress and postalCode in X509 names - * SSL Renegotiation was refactored - -Bugfix - * More stringent checks in cipher layer - * Server does not send out extensions not advertised by client - * Prevent possible alignment warnings on casting from char * to 'aligned *' - * Misc fixes and additions to dependency checks - * Const correctness - * cert_write with selfsign should use issuer_name as subject_name - * Fix ECDSA corner case: missing reduction mod N (found by DualTachyon) - * Defines to handle UEFI environment under MSVC - * Server-side initiated renegotiations send HelloRequest - -= PolarSSL 1.3.1 released on 2013-10-15 -Features - * Support for Brainpool curves and TLS ciphersuites (RFC 7027) - * Support for ECDHE-PSK key-exchange and ciphersuites - * Support for RSA-PSK key-exchange and ciphersuites - -Changes - * RSA blinding locks for a smaller amount of time - * TLS compression only allocates working buffer once - * Introduced POLARSSL_HAVE_READDIR_R for systems without it - * config.h is more script-friendly - -Bugfix - * Missing MSVC defines added - * Compile errors with POLARSSL_RSA_NO_CRT - * Header files with 'polarssl/' - * Const correctness - * Possible naming collision in dhm_context - * Better support for MSVC - * threading_set_alt() name - * Added missing x509write_crt_set_version() - -= PolarSSL 1.3.0 released on 2013-10-01 -Features - * Elliptic Curve Cryptography module added - * Elliptic Curve Diffie Hellman module added - * Ephemeral Elliptic Curve Diffie Hellman support for SSL/TLS - (ECDHE-based ciphersuites) - * Ephemeral Elliptic Curve Digital Signature Algorithm support for SSL/TLS - (ECDSA-based ciphersuites) - * Ability to specify allowed ciphersuites based on the protocol version. - * PSK and DHE-PSK based ciphersuites added - * Memory allocation abstraction layer added - * Buffer-based memory allocator added (no malloc() / free() / HEAP usage) - * Threading abstraction layer added (dummy / pthread / alternate) - * Public Key abstraction layer added - * Parsing Elliptic Curve keys - * Parsing Elliptic Curve certificates - * Support for max_fragment_length extension (RFC 6066) - * Support for truncated_hmac extension (RFC 6066) - * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros - (ISO/IEC 7816-4) padding and zero padding in the cipher layer - * Support for session tickets (RFC 5077) - * Certificate Request (CSR) generation with extensions (key_usage, - ns_cert_type) - * X509 Certificate writing with extensions (basic_constraints, - issuer_key_identifier, etc) - * Optional blinding for RSA, DHM and EC - * Support for multiple active certificate / key pairs in SSL servers for - the same host (Not to be confused with SNI!) - -Changes - * Ability to enable / disable SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2 - individually - * Introduced separate SSL Ciphersuites module that is based on - Cipher and MD information - * Internals for SSL module adapted to have separate IV pointer that is - dynamically set (Better support for hardware acceleration) - * Moved all OID functionality to a separate module. RSA function - prototypes for the RSA sign and verify functions changed as a result - * Split up the GCM module into a starts/update/finish cycle - * Client and server now filter sent and accepted ciphersuites on minimum - and maximum protocol version - * Ability to disable server_name extension (RFC 6066) - * Renamed error_strerror() to the less conflicting polarssl_strerror() - (Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC) - * SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly - * All RSA operations require a random generator for blinding purposes - * X509 core refactored - * x509_crt_verify() now case insensitive for cn (RFC 6125 6.4) - * Also compiles / runs without time-based functions (!POLARSSL_HAVE_TIME) - * Support faulty X509 v1 certificates with extensions - (POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3) - -Bugfix - * Fixed parse error in ssl_parse_certificate_request() - * zlib compression/decompression skipped on empty blocks - * Support for AIX header locations in net.c module - * Fixed file descriptor leaks - -Security - * RSA blinding on CRT operations to counter timing attacks - (found by Cyril Arnaud and Pierre-Alain Fouque) - - -= Version 1.2.14 released 2015-05-?? - -Security - * Fix potential invalid memory read in the server, that allows a client to - crash it remotely (found by Caj Larsson). - * Fix potential invalid memory read in certificate parsing, that allows a - client to crash the server remotely if client authentication is enabled - (found using Codenomicon Defensics). - * Add countermeasure against "Lucky 13 strikes back" cache-based attack, - https://dl.acm.org/citation.cfm?id=2714625 - -Bugfix - * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos). - * Fix hardclock() (only used in the benchmarking program) with some - versions of mingw64 (found by kxjhlele). - * Fix warnings from mingw64 in timing.c (found by kxjklele). - * Fix potential unintended sign extension in asn1_get_len() on 64-bit - platforms (found with Coverity Scan). - -= Version 1.2.13 released 2015-02-16 -Note: Although PolarSSL has been renamed to mbed TLS, no changes reflecting - this will be made in the 1.2 branch at this point. - -Security - * Fix remotely-triggerable uninitialised pointer dereference caused by - crafted X.509 certificate (TLS server is not affected if it doesn't ask - for a client certificate) (found using Codenomicon Defensics). - * Fix remotely-triggerable memory leak caused by crafted X.509 certificates - (TLS server is not affected if it doesn't ask for a client certificate) - (found using Codenomicon Defensics). - * Fix potential stack overflow while parsing crafted X.509 certificates - (TLS server is not affected if it doesn't ask for a client certificate) - found using Codenomicon Defensics). - * Fix buffer overread of size 1 when parsing crafted X.509 certificates - (TLS server is not affected if it doesn't ask for a client certificate). - -Bugfix - * Fix potential undefined behaviour in Camellia. - * Fix memory leaks in PKCS#5 and PKCS#12. - * Stack buffer overflow if ctr_drbg_update() is called with too large - add_len (found by Jean-Philippe Aumasson) (not triggerable remotely). - * Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced - in 1.2.12). - * Fix unchecked return code in x509_crt_parse_path() on Windows (found by - Peter Vaskovic). - * Fix assembly selection for MIPS64 (thanks to James Cowgill). - * ssl_get_verify_result() now works even if the handshake was aborted due - to a failed verification (found by Fredrik Axelsson). - * Skip writing and parsing signature_algorithm extension if none of the - key exchanges enabled needs certificates. This fixes a possible interop - issue with some servers when a zero-length extension was sent. (Reported - by Peter Dettman.) - * On a 0-length input, base64_encode() did not correctly set output length - (found by Hendrik van den Boogaard). - -Changes - * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined. - * Forbid repeated extensions in X.509 certificates. - * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the - length of an X.509 verification chain (default = 8). -= Version 1.2.12 released 2014-10-24 - -Security - * Remotely-triggerable memory leak when parsing some X.509 certificates - (server is not affected if it doesn't ask for a client certificate). - (Found using Codenomicon Defensics.) - -Bugfix - * Fix potential bad read in parsing ServerHello (found by Adrien - Vialletelle). - * ssl_close_notify() could send more than one message in some circumstances - with non-blocking I/O. - * x509_crt_parse() did not increase total_failed on PEM error - * Fix compiler warnings on iOS (found by Sander Niemeijer). - * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). - * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). - * ssl_read() could return non-application data records on server while - renegotation was pending, and on client when a HelloRequest was received. - * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). - -Changes - * X.509 certificates with more than one AttributeTypeAndValue per - RelativeDistinguishedName are not accepted any more. - * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than - POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts. - * Accept spaces at end of line or end of buffer in base64_decode(). - -= Version 1.2.11 released 2014-07-11 -Features - * Entropy module now supports seed writing and reading - -Changes - * Introduced POLARSSL_HAVE_READDIR_R for systems without it - * Improvements to the CMake build system, contributed by Julian Ospald. - * Work around a bug of the version of Clang shipped by Apple with Mavericks - that prevented bignum.c from compiling. (Reported by Rafael Baptista.) - * Improvements to tests/Makefile, contributed by Oden Eriksson. - * Use UTC time to check certificate validity. - * Reject certificates with times not in UTC, per RFC 5280. - * Migrate zeroizing of data to polarssl_zeroize() instead of memset() - against unwanted compiler optimizations - -Security - * Forbid change of server certificate during renegotiation to prevent - "triple handshake" attack when authentication mode is optional (the - attack was already impossible when authentication is required). - * Check notBefore timestamp of certificates and CRLs from the future. - * Forbid sequence number wrapping - * Prevent potential NULL pointer dereference in ssl_read_record() (found by - TrustInSoft) - * Fix length checking for AEAD ciphersuites (found by Codenomicon). - It was possible to crash the server (and client) using crafted messages - when a GCM suite was chosen. - -Bugfix - * Fixed X.509 hostname comparison (with non-regular characters) - * SSL now gracefully handles missing RNG - * crypt_and_hash app checks MAC before final decryption - * Fixed x509_crt_parse_path() bug on Windows platforms - * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by - TrustInSoft) - * Fixed potential overflow in certificate size verification in - ssl_write_certificate() (found by TrustInSoft) - * Fix ASM format in bn_mul.h - * Potential memory leak in bignum_selftest() - * Replaced expired test certificate - * ssl_mail_client now terminates lines with CRLF, instead of LF - * Fix bug in RSA PKCS#1 v1.5 "reversed" operations - * Fixed testing with out-of-source builds using cmake - * Fixed version-major intolerance in server - * Fixed CMake symlinking on out-of-source builds - * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by - Alex Wilson.) - * ssl_init() was leaving a dirty pointer in ssl_context if malloc of - out_ctr failed - * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc - of one of them failed - * x509_get_current_time() uses localtime_r() to prevent thread issues - * Some example server programs were not sending the close_notify alert. - * Potential memory leak in mpi_exp_mod() when error occurs during - calculation of RR. - * Improve interoperability by not writing extension length in ClientHello - when no extensions are present (found by Matthew Page) - * rsa_check_pubkey() now allows an E up to N - * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings - * mpi_fill_random() was creating numbers larger than requested on - big-endian platform when size was not an integer number of limbs - * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer) - * Stricter check on SSL ClientHello internal sizes compared to actual packet - size (found by TrustInSoft) - * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan). - * Use \n\t rather than semicolons for bn_mul asm, since some assemblers - interpret semicolons as comment delimiters (found by Barry K. Nathan). - * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). - * Fix base64_decode() to return and check length correctly (in case of - tight buffers) - -= Version 1.2.10 released 2013-10-07 -Changes - * Changed RSA blinding to a slower but thread-safe version - -Bugfix - * Fixed memory leak in RSA as a result of introduction of blinding - * Fixed ssl_pkcs11_decrypt() prototype - * Fixed MSVC project files - -= Version 1.2.9 released 2013-10-01 -Changes - * x509_verify() now case insensitive for cn (RFC 6125 6.4) - -Bugfix - * Fixed potential memory leak when failing to resume a session - * Fixed potential file descriptor leaks (found by Remi Gacogne) - * Minor fixes - -Security - * Fixed potential heap buffer overflow on large hostname setting - * Fixed potential negative value misinterpretation in load_file() - * RSA blinding on CRT operations to counter timing attacks - (found by Cyril Arnaud and Pierre-Alain Fouque) - -= Version 1.2.8 released 2013-06-19 -Features - * Parsing of PKCS#8 encrypted private key files - * PKCS#12 PBE and derivation functions - * Centralized module option values in config.h to allow user-defined - settings without editing header files by using POLARSSL_CONFIG_OPTIONS - -Changes - * HAVEGE random generator disabled by default - * Internally split up x509parse_key() into a (PEM) handler function - and specific DER parser functions for the PKCS#1 and unencrypted - PKCS#8 private key formats - * Added mechanism to provide alternative implementations for all - symmetric cipher and hash algorithms (e.g. POLARSSL_AES_ALT in - config.h) - * PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated - old PBKDF2 module - -Bugfix - * Secure renegotiation extension should only be sent in case client - supports secure renegotiation - * Fixed offset for cert_type list in ssl_parse_certificate_request() - * Fixed const correctness issues that have no impact on the ABI - * x509parse_crt() now better handles PEM error situations - * ssl_parse_certificate() now calls x509parse_crt_der() directly - instead of the x509parse_crt() wrapper that can also parse PEM - certificates - * x509parse_crtpath() is now reentrant and uses more portable stat() - * Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler - * Fixed values for 2-key Triple DES in cipher layer - * ssl_write_certificate_request() can handle empty ca_chain - -Security - * A possible DoS during the SSL Handshake, due to faulty parsing of - PEM-encoded certificates has been fixed (found by Jack Lloyd) - -= Version 1.2.7 released 2013-04-13 -Features - * Ability to specify allowed ciphersuites based on the protocol version. - -Changes - * Default Blowfish keysize is now 128-bits - * Test suites made smaller to accommodate Raspberry Pi - -Bugfix - * Fix for MPI assembly for ARM - * GCM adapted to support sizes > 2^29 - -= Version 1.2.6 released 2013-03-11 -Bugfix - * Fixed memory leak in ssl_free() and ssl_reset() for active session - * Corrected GCM counter incrementation to use only 32-bits instead of - 128-bits (found by Yawning Angel) - * Fixes for 64-bit compilation with MS Visual Studio - * Fixed net_bind() for specified IP addresses on little endian systems - * Fixed assembly code for ARM (Thumb and regular) for some compilers - -Changes - * Internally split up rsa_pkcs1_encrypt(), rsa_pkcs1_decrypt(), - rsa_pkcs1_sign() and rsa_pkcs1_verify() to separate PKCS#1 v1.5 and - PKCS#1 v2.1 functions - * Added support for custom labels when using rsa_rsaes_oaep_encrypt() - or rsa_rsaes_oaep_decrypt() - * Re-added handling for SSLv2 Client Hello when the define - POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO is set - * The SSL session cache module (ssl_cache) now also retains peer_cert - information (not the entire chain) - -Security - * Removed further timing differences during SSL message decryption in - ssl_decrypt_buf() - * Removed timing differences due to bad padding from - rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 - operations - -= Version 1.2.5 released 2013-02-02 -Changes - * Allow enabling of dummy error_strerror() to support some use-cases - * Debug messages about padding errors during SSL message decryption are - disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL - * Sending of security-relevant alert messages that do not break - interoperability can be switched on/off with the flag - POLARSSL_SSL_ALL_ALERT_MESSAGES - -Security - * Removed timing differences during SSL message decryption in - ssl_decrypt_buf() due to badly formatted padding - -= Version 1.2.4 released 2013-01-25 -Changes - * More advanced SSL ciphersuite representation and moved to more dynamic - SSL core - * Added ssl_handshake_step() to allow single stepping the handshake process - -Bugfix - * Memory leak when using RSA_PKCS_V21 operations fixed - * Handle future version properly in ssl_write_certificate_request() - * Correctly handle CertificateRequest message in client for <= TLS 1.1 - without DN list - -= Version 1.2.3 released 2012-11-26 -Bugfix - * Server not always sending correct CertificateRequest message - -= Version 1.2.2 released 2012-11-24 -Changes - * Added p_hw_data to ssl_context for context specific hardware acceleration - data - * During verify trust-CA is only checked for expiration and CRL presence - -Bugfixes - * Fixed client authentication compatibility - * Fixed dependency on POLARSSL_SHA4_C in SSL modules - -= Version 1.2.1 released 2012-11-20 -Changes - * Depth that the certificate verify callback receives is now numbered - bottom-up (Peer cert depth is 0) - -Bugfixes - * Fixes for MSVC6 - * Moved mpi_inv_mod() outside POLARSSL_GENPRIME - * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel - Pégourié-Gonnard) - * Fixed possible segfault in mpi_shift_r() (found by Manuel - Pégourié-Gonnard) - * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 - -= Version 1.2.0 released 2012-10-31 -Features - * Added support for NULL cipher (POLARSSL_CIPHER_NULL_CIPHER) and weak - ciphersuites (POLARSSL_ENABLE_WEAK_CIPHERSUITES). They are disabled by - default! - * Added support for wildcard certificates - * Added support for multi-domain certificates through the X509 Subject - Alternative Name extension - * Added preliminary ASN.1 buffer writing support - * Added preliminary X509 Certificate Request writing support - * Added key_app_writer example application - * Added cert_req example application - * Added base Galois Counter Mode (GCM) for AES - * Added TLS 1.2 support (RFC 5246) - * Added GCM suites to TLS 1.2 (RFC 5288) - * Added commandline error code convertor (util/strerror) - * Added support for Hardware Acceleration hooking in SSL/TLS - * Added OpenSSL / PolarSSL compatibility script (tests/compat.sh) and - example application (programs/ssl/o_p_test) (requires OpenSSL) - * Added X509 CA Path support - * Added Thumb assembly optimizations - * Added DEFLATE compression support as per RFC3749 (requires zlib) - * Added blowfish algorithm (Generic and cipher layer) - * Added PKCS#5 PBKDF2 key derivation function - * Added Secure Renegotiation (RFC 5746) - * Added predefined DHM groups from RFC 5114 - * Added simple SSL session cache implementation - * Added ServerName extension parsing (SNI) at server side - * Added option to add minimum accepted SSL/TLS protocol version - -Changes - * Removed redundant POLARSSL_DEBUG_MSG define - * AES code only check for Padlock once - * Fixed const-correctness mpi_get_bit() - * Documentation for mpi_lsb() and mpi_msb() - * Moved out_msg to out_hdr + 32 to support hardware acceleration - * Changed certificate verify behaviour to comply with RFC 6125 section 6.3 - to not match CN if subjectAltName extension is present (Closes ticket #56) - * Cipher layer cipher_mode_t POLARSSL_MODE_CFB128 is renamed to - POLARSSL_MODE_CFB, to also handle different block size CFB modes. - * Removed handling for SSLv2 Client Hello (as per RFC 5246 recommendation) - * Revamped session resumption handling - * Generalized external private key implementation handling (like PKCS#11) - in SSL/TLS - * Revamped x509_verify() and the SSL f_vrfy callback implementations - * Moved from unsigned long to fixed width uint32_t types throughout code - * Renamed ciphersuites naming scheme to IANA reserved names - -Bugfix - * Fixed handling error in mpi_cmp_mpi() on longer B values (found by - Hui Dong) - * Fixed potential heap corruption in x509_name allocation - * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) - * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket - #52) - * Handle encryption with private key and decryption with public key as per - RFC 2313 - * Handle empty certificate subject names - * Prevent reading over buffer boundaries on X509 certificate parsing - * mpi_add_abs() now correctly handles adding short numbers to long numbers - with carry rollover (found by Ruslan Yushchenko) - * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob - * Fixed MPI assembly for SPARC64 platform - -Security - * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi - Vanderbeken) - -= Version 1.1.8 released on 2013-10-01 -Bugfix - * Fixed potential memory leak when failing to resume a session - * Fixed potential file descriptor leaks - -Security - * Potential buffer-overflow for ssl_read_record() (independently found by - both TrustInSoft and Paul Brodeur of Leviathan Security Group) - * Potential negative value misinterpretation in load_file() - * Potential heap buffer overflow on large hostname setting - -= Version 1.1.7 released on 2013-06-19 -Changes - * HAVEGE random generator disabled by default - -Bugfix - * x509parse_crt() now better handles PEM error situations - * ssl_parse_certificate() now calls x509parse_crt_der() directly - instead of the x509parse_crt() wrapper that can also parse PEM - certificates - * Fixed values for 2-key Triple DES in cipher layer - * ssl_write_certificate_request() can handle empty ca_chain - -Security - * A possible DoS during the SSL Handshake, due to faulty parsing of - PEM-encoded certificates has been fixed (found by Jack Lloyd) - -= Version 1.1.6 released on 2013-03-11 -Bugfix - * Fixed net_bind() for specified IP addresses on little endian systems - -Changes - * Allow enabling of dummy error_strerror() to support some use-cases - * Debug messages about padding errors during SSL message decryption are - disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL - -Security - * Removed timing differences during SSL message decryption in - ssl_decrypt_buf() - * Removed timing differences due to bad padding from - rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5 - operations - -= Version 1.1.5 released on 2013-01-16 -Bugfix - * Fixed MPI assembly for SPARC64 platform - * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob - * mpi_add_abs() now correctly handles adding short numbers to long numbers - with carry rollover - * Moved mpi_inv_mod() outside POLARSSL_GENPRIME - * Prevent reading over buffer boundaries on X509 certificate parsing - * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket - #52) - * Fixed possible segfault in mpi_shift_r() (found by Manuel - Pégourié-Gonnard) - * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel - Pégourié-Gonnard) - * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1 - * Memory leak when using RSA_PKCS_V21 operations fixed - * Handle encryption with private key and decryption with public key as per - RFC 2313 - * Fixes for MSVC6 - -Security - * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi - Vanderbeken) - -= Version 1.1.4 released on 2012-05-31 -Bugfix - * Correctly handle empty SSL/TLS packets (Found by James Yonan) - * Fixed potential heap corruption in x509_name allocation - * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54) - -= Version 1.1.3 released on 2012-04-29 -Bugfix - * Fixed random MPI generation to not generate more size than requested. - -= Version 1.1.2 released on 2012-04-26 -Bugfix - * Fixed handling error in mpi_cmp_mpi() on longer B values (found by - Hui Dong) - -Security - * Fixed potential memory corruption on miscrafted client messages (found by - Frama-C team at CEA LIST) - * Fixed generation of DHM parameters to correct length (found by Ruslan - Yushchenko) - -= Version 1.1.1 released on 2012-01-23 -Bugfix - * Check for failed malloc() in ssl_set_hostname() and x509_get_entries() - (Closes ticket #47, found by Hugo Leisink) - * Fixed issues with Intel compiler on 64-bit systems (Closes ticket #50) - * Fixed multiple compiler warnings for VS6 and armcc - * Fixed bug in CTR_CRBG selftest - -= Version 1.1.0 released on 2011-12-22 -Features - * Added ssl_session_reset() to allow better multi-connection pools of - SSL contexts without needing to set all non-connection-specific - data and pointers again. Adapted ssl_server to use this functionality. - * Added ssl_set_max_version() to allow clients to offer a lower maximum - supported version to a server to help buggy server implementations. - (Closes ticket #36) - * Added cipher_get_cipher_mode() and cipher_get_cipher_operation() - introspection functions (Closes ticket #40) - * Added CTR_DRBG based on AES-256-CTR (NIST SP 800-90) random generator - * Added a generic entropy accumulator that provides support for adding - custom entropy sources and added some generic and platform dependent - entropy sources - -Changes - * Documentation for AES and Camellia in modes CTR and CFB128 clarified. - * Fixed rsa_encrypt and rsa_decrypt examples to use public key for - encryption and private key for decryption. (Closes ticket #34) - * Inceased maximum size of ASN1 length reads to 32-bits. - * Added an EXPLICIT tag number parameter to x509_get_ext() - * Added a separate CRL entry extension parsing function - * Separated the ASN.1 parsing code from the X.509 specific parsing code. - So now there is a module that is controlled with POLARSSL_ASN1_PARSE_C. - * Changed the defined key-length of DES ciphers in cipher.h to include the - parity bits, to prevent mistakes in copying data. (Closes ticket #33) - * Loads of minimal changes to better support WINCE as a build target - (Credits go to Marco Lizza) - * Added POLARSSL_MPI_WINDOW_SIZE definition to allow easier time to memory - trade-off - * Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size - management (Closes ticket #44) - * Changed the used random function pointer to more flexible format. Renamed - havege_rand() to havege_random() to prevent mistakes. Lots of changes as - a consequence in library code and programs - * Moved all examples programs to use the new entropy and CTR_DRBG - * Added permissive certificate parsing to x509parse_crt() and - x509parse_crtfile(). With permissive parsing the parsing does not stop on - encountering a parse-error. Beware that the meaning of return values has - changed! - * All error codes are now negative. Even on mermory failures and IO errors. - -Bugfix - * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes - ticket #37) - * Fixed a bug where the CRL parser expected an EXPLICIT ASN.1 tag - before version numbers - * Allowed X509 key usage parsing to accept 4 byte values instead of the - standard 1 byte version sometimes used by Microsoft. (Closes ticket #38) - * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length - smaller than the hash length. (Closes ticket #41) - * If certificate serial is longer than 32 octets, serial number is now - appended with '....' after first 28 octets - * Improved build support for s390x and sparc64 in bignum.h - * Fixed MS Visual C++ name clash with int64 in sha4.h - * Corrected removal of leading "00:" in printing serial numbers in - certificates and CRLs - -= Version 1.0.0 released on 2011-07-27 -Features - * Expanded cipher layer with support for CFB128 and CTR mode - * Added rsa_encrypt and rsa_decrypt simple example programs. - -Changes - * The generic cipher and message digest layer now have normal error - codes instead of integers - -Bugfix - * Undid faulty bug fix in ssl_write() when flushing old data (Ticket - #18) - -= Version 0.99-pre5 released on 2011-05-26 -Features - * Added additional Cipher Block Modes to symmetric ciphers - (AES CTR, Camellia CTR, XTEA CBC) including the option to - enable and disable individual modes when needed - * Functions requiring File System functions can now be disabled - by undefining POLARSSL_FS_IO - * A error_strerror function() has been added to translate between - error codes and their description. - * Added mpi_get_bit() and mpi_set_bit() individual bit setter/getter - functions. - * Added ssl_mail_client and ssl_fork_server as example programs. - -Changes - * Major argument / variable rewrite. Introduced use of size_t - instead of int for buffer lengths and loop variables for - better unsigned / signed use. Renamed internal bigint types - t_int and t_dbl to t_uint and t_udbl in the process - * mpi_init() and mpi_free() now only accept a single MPI - argument and do not accept variable argument lists anymore. - * The error codes have been remapped and combining error codes - is now done with a PLUS instead of an OR as error codes - used are negative. - * Changed behaviour of net_read(), ssl_fetch_input() and ssl_recv(). - net_recv() now returns 0 on EOF instead of - POLARSSL_ERR_NET_CONN_RESET. ssl_fetch_input() returns - POLARSSL_ERR_SSL_CONN_EOF on an EOF from its f_recv() function. - ssl_read() returns 0 if a POLARSSL_ERR_SSL_CONN_EOF is received - after the handshake. - * Network functions now return POLARSSL_ERR_NET_WANT_READ or - POLARSSL_ERR_NET_WANT_WRITE instead of the ambiguous - POLARSSL_ERR_NET_TRY_AGAIN - -= Version 0.99-pre4 released on 2011-04-01 -Features - * Added support for PKCS#1 v2.1 encoding and thus support - for the RSAES-OAEP and RSASSA-PSS operations. - * Reading of Public Key files incorporated into default x509 - functionality as well. - * Added mpi_fill_random() for centralized filling of big numbers - with random data (Fixed ticket #10) - -Changes - * Debug print of MPI now removes leading zero octets and - displays actual bit size of the value. - * x509parse_key() (and as a consequence x509parse_keyfile()) - does not zeroize memory in advance anymore. Use rsa_init() - before parsing a key or keyfile! - -Bugfix - * Debug output of MPI's now the same independent of underlying - platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads - Kiilerich and Mihai Militaru) - * Fixed bug in ssl_write() when flushing old data (Fixed ticket - #18, found by Nikolay Epifanov) - * Fixed proper handling of RSASSA-PSS verification with variable - length salt lengths - -= Version 0.99-pre3 released on 2011-02-28 -This release replaces version 0.99-pre2 which had possible copyright issues. -Features - * Parsing PEM private keys encrypted with DES and AES - are now supported as well (Fixes ticket #5) - * Added crl_app program to allow easy reading and - printing of X509 CRLs from file - -Changes - * Parsing of PEM files moved to separate module (Fixes - ticket #13). Also possible to remove PEM support for - systems only using DER encoding - -Bugfixes - * Corrected parsing of UTCTime dates before 1990 and - after 1950 - * Support more exotic OID's when parsing certificates - (found by Mads Kiilerich) - * Support more exotic name representations when parsing - certificates (found by Mads Kiilerich) - * Replaced the expired test certificates - * Do not bail out if no client certificate specified. Try - to negotiate anonymous connection (Fixes ticket #12, - found by Boris Krasnovskiy) - -Security fixes - * Fixed a possible Man-in-the-Middle attack on the - Diffie Hellman key exchange (thanks to Larry Highsmith, - Subreption LLC) - -= Version 0.99-pre1 released on 2011-01-30 -Features -Note: Most of these features have been donated by Fox-IT - * Added Doxygen source code documentation parts - * Added reading of DHM context from memory and file - * Improved X509 certificate parsing to include extended - certificate fields, including Key Usage - * Improved certificate verification and verification - against the available CRLs - * Detection for DES weak keys and parity bits added - * Improvements to support integration in other - applications: - + Added generic message digest and cipher wrapper - + Improved information about current capabilities, - status, objects and configuration - + Added verification callback on certificate chain - verification to allow external blacklisting - + Additional example programs to show usage - * Added support for PKCS#11 through the use of the - libpkcs11-helper library - -Changes - * x509parse_time_expired() checks time in addition to - the existing date check - * The ciphers member of ssl_context and the cipher member - of ssl_session have been renamed to ciphersuites and - ciphersuite respectively. This clarifies the difference - with the generic cipher layer and is better naming - altogether - -= Version 0.14.0 released on 2010-08-16 -Features - * Added support for SSL_EDH_RSA_AES_128_SHA and - SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites - * Added compile-time and run-time version information - * Expanded ssl_client2 arguments for more flexibility - * Added support for TLS v1.1 - -Changes - * Made Makefile cleaner - * Removed dependency on rand() in rsa_pkcs1_encrypt(). - Now using random fuction provided to function and - changed the prototype of rsa_pkcs1_encrypt(), - rsa_init() and rsa_gen_key(). - * Some SSL defines were renamed in order to avoid - future confusion - -Bug fixes - * Fixed CMake out of source build for tests (found by - kkert) - * rsa_check_private() now supports PKCS1v2 keys as well - * Fixed deadlock in rsa_pkcs1_encrypt() on failing random - generator - -= Version 0.13.1 released on 2010-03-24 -Bug fixes - * Fixed Makefile in library that was mistakenly merged - * Added missing const string fixes - -= Version 0.13.0 released on 2010-03-21 -Features - * Added option parsing for host and port selection to - ssl_client2 - * Added support for GeneralizedTime in X509 parsing - * Added cert_app program to allow easy reading and - printing of X509 certificates from file or SSL - connection. - -Changes - * Added const correctness for main code base - * X509 signature algorithm determination is now - in a function to allow easy future expansion - * Changed symmetric cipher functions to - identical interface (returning int result values) - * Changed ARC4 to use separate input/output buffer - * Added reset function for HMAC context as speed-up - for specific use-cases - -Bug fixes - * Fixed bug resulting in failure to send the last - certificate in the chain in ssl_write_certificate() and - ssl_write_certificate_request() (found by fatbob) - * Added small fixes for compiler warnings on a Mac - (found by Frank de Brabander) - * Fixed algorithmic bug in mpi_is_prime() (found by - Smbat Tonoyan) - -= Version 0.12.1 released on 2009-10-04 -Changes - * Coverage test definitions now support 'depends_on' - tagging system. - * Tests requiring specific hashing algorithms now honor - the defines. - -Bug fixes - * Changed typo in #ifdef in x509parse.c (found - by Eduardo) - -= Version 0.12.0 released on 2009-07-28 -Features - * Added CMake makefiles as alternative to regular Makefiles. - * Added preliminary Code Coverage tests for AES, ARC4, - Base64, MPI, SHA-family, MD-family, HMAC-SHA-family, - Camellia, DES, 3-DES, RSA PKCS#1, XTEA, Diffie-Hellman - and X509parse. - -Changes - * Error codes are not (necessarily) negative. Keep - this is mind when checking for errors. - * RSA_RAW renamed to SIG_RSA_RAW for consistency. - * Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE. - * Changed interface for AES and Camellia setkey functions - to indicate invalid key lengths. - -Bug fixes - * Fixed include location of endian.h on FreeBSD (found by - Gabriel) - * Fixed include location of endian.h and name clash on - Apples (found by Martin van Hensbergen) - * Fixed HMAC-MD2 by modifying md2_starts(), so that the - required HMAC ipad and opad variables are not cleared. - (found by code coverage tests) - * Prevented use of long long in bignum if - POLARSSL_HAVE_LONGLONG not defined (found by Giles - Bathgate). - * Fixed incorrect handling of negative strings in - mpi_read_string() (found by code coverage tests). - * Fixed segfault on handling empty rsa_context in - rsa_check_pubkey() and rsa_check_privkey() (found by - code coverage tests). - * Fixed incorrect handling of one single negative input - value in mpi_add_abs() (found by code coverage tests). - * Fixed incorrect handling of negative first input - value in mpi_sub_abs() (found by code coverage tests). - * Fixed incorrect handling of negative first input - value in mpi_mod_mpi() and mpi_mod_int(). Resulting - change also affects mpi_write_string() (found by code - coverage tests). - * Corrected is_prime() results for 0, 1 and 2 (found by - code coverage tests). - * Fixed Camellia and XTEA for 64-bit Windows systems. - -= Version 0.11.1 released on 2009-05-17 - * Fixed missing functionality for SHA-224, SHA-256, SHA384, - SHA-512 in rsa_pkcs1_sign() - -= Version 0.11.0 released on 2009-05-03 - * Fixed a bug in mpi_gcd() so that it also works when both - input numbers are even and added testcases to check - (found by Pierre Habouzit). - * Added support for SHA-224, SHA-256, SHA-384 and SHA-512 - one way hash functions with the PKCS#1 v1.5 signing and - verification. - * Fixed minor bug regarding mpi_gcd located within the - POLARSSL_GENPRIME block. - * Fixed minor memory leak in x509parse_crt() and added better - handling of 'full' certificate chains (found by Mathias - Olsson). - * Centralized file opening and reading for x509 files into - load_file() - * Made definition of net_htons() endian-clean for big endian - systems (Found by Gernot). - * Undefining POLARSSL_HAVE_ASM now also handles prevents asm in - padlock and timing code. - * Fixed an off-by-one buffer allocation in ssl_set_hostname() - responsible for crashes and unwanted behaviour. - * Added support for Certificate Revocation List (CRL) parsing. - * Added support for CRL revocation to x509parse_verify() and - SSL/TLS code. - * Fixed compatibility of XTEA and Camellia on a 64-bit system - (found by Felix von Leitner). - -= Version 0.10.0 released on 2009-01-12 - * Migrated XySSL to PolarSSL - * Added XTEA symmetric cipher - * Added Camellia symmetric cipher - * Added support for ciphersuites: SSL_RSA_CAMELLIA_128_SHA, - SSL_RSA_CAMELLIA_256_SHA and SSL_EDH_RSA_CAMELLIA_256_SHA - * Fixed dangerous bug that can cause a heap overflow in - rsa_pkcs1_decrypt (found by Christophe Devine) - -================================================================ -XySSL ChangeLog - -= Version 0.9 released on 2008-03-16 - - * Added support for ciphersuite: SSL_RSA_AES_128_SHA - * Enabled support for large files by default in aescrypt2.c - * Preliminary openssl wrapper contributed by David Barrett - * Fixed a bug in ssl_write() that caused the same payload to - be sent twice in non-blocking mode when send returns EAGAIN - * Fixed ssl_parse_client_hello(): session id and challenge must - not be swapped in the SSLv2 ClientHello (found by Greg Robson) - * Added user-defined callback debug function (Krystian Kolodziej) - * Before freeing a certificate, properly zero out all cert. data - * Fixed the "mode" parameter so that encryption/decryption are - not swapped on PadLock; also fixed compilation on older versions - of gcc (bug reported by David Barrett) - * Correctly handle the case in padlock_xcryptcbc() when input or - ouput data is non-aligned by falling back to the software - implementation, as VIA Nehemiah cannot handle non-aligned buffers - * Fixed a memory leak in x509parse_crt() which was reported by Greg - Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to - Matthew Page who reported several bugs - * Fixed x509_get_ext() to accept some rare certificates which have - an INTEGER instead of a BOOLEAN for BasicConstraints::cA. - * Added support on the client side for the TLS "hostname" extension - (patch contributed by David Patino) - * Make x509parse_verify() return BADCERT_CN_MISMATCH when an empty - string is passed as the CN (bug reported by spoofy) - * Added an option to enable/disable the BN assembly code - * Updated rsa_check_privkey() to verify that (D*E) = 1 % (P-1)*(Q-1) - * Disabled obsolete hash functions by default (MD2, MD4); updated - selftest and benchmark to not test ciphers that have been disabled - * Updated x509parse_cert_info() to correctly display byte 0 of the - serial number, setup correct server port in the ssl client example - * Fixed a critical denial-of-service with X.509 cert. verification: - peer may cause xyssl to loop indefinitely by sending a certificate - for which the RSA signature check fails (bug reported by Benoit) - * Added test vectors for: AES-CBC, AES-CFB, DES-CBC and 3DES-CBC, - HMAC-MD5, HMAC-SHA1, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 - * Fixed HMAC-SHA-384 and HMAC-SHA-512 (thanks to Josh Sinykin) - * Modified ssl_parse_client_key_exchange() to protect against - Daniel Bleichenbacher attack on PKCS#1 v1.5 padding, as well - as the Klima-Pokorny-Rosa extension of Bleichenbacher's attack - * Updated rsa_gen_key() so that ctx->N is always nbits in size - * Fixed assembly PPC compilation errors on Mac OS X, thanks to - David Barrett and Dusan Semen - -= Version 0.8 released on 2007-10-20 - - * Modified the HMAC functions to handle keys larger - than 64 bytes, thanks to Stephane Desneux and gary ng - * Fixed ssl_read_record() to properly update the handshake - message digests, which fixes IE6/IE7 client authentication - * Cleaned up the XYSSL* #defines, suggested by Azriel Fasten - * Fixed net_recv(), thanks to Lorenz Schori and Egon Kocjan - * Added user-defined callbacks for handling I/O and sessions - * Added lots of debugging output in the SSL/TLS functions - * Added preliminary X.509 cert. writing by Pascal Vizeli - * Added preliminary support for the VIA PadLock routines - * Added AES-CFB mode of operation, contributed by chmike - * Added an SSL/TLS stress testing program (ssl_test.c) - * Updated the RSA PKCS#1 code to allow choosing between - RSA_PUBLIC and RSA_PRIVATE, as suggested by David Barrett - * Updated ssl_read() to skip 0-length records from OpenSSL - * Fixed the make install target to comply with *BSD make - * Fixed a bug in mpi_read_binary() on 64-bit platforms - * mpi_is_prime() speedups, thanks to Kevin McLaughlin - * Fixed a long standing memory leak in mpi_is_prime() - * Replaced realloc with malloc in mpi_grow(), and set - the sign of zero as positive in mpi_init() (reported - by Jonathan M. McCune) - -= Version 0.7 released on 2007-07-07 - - * Added support for the MicroBlaze soft-core processor - * Fixed a bug in ssl_tls.c which sometimes prevented SSL - connections from being established with non-blocking I/O - * Fixed a couple bugs in the VS6 and UNIX Makefiles - * Fixed the "PIC register ebx clobbered in asm" bug - * Added HMAC starts/update/finish support functions - * Added the SHA-224, SHA-384 and SHA-512 hash functions - * Fixed the net_set_*block routines, thanks to Andreas - * Added a few demonstration programs: md5sum, sha1sum, - dh_client, dh_server, rsa_genkey, rsa_sign, rsa_verify - * Added new bignum import and export helper functions - * Rewrote README.txt in program/ssl/ca to better explain - how to create a test PKI - -= Version 0.6 released on 2007-04-01 - - * Ciphers used in SSL/TLS can now be disabled at compile - time, to reduce the memory footprint on embedded systems - * Added multiply assembly code for the TriCore and modified - havege_struct for this processor, thanks to David Patiño - * Added multiply assembly code for 64-bit PowerPCs, - thanks to Peking University and the OSU Open Source Lab - * Added experimental support of Quantum Cryptography - * Added support for autoconf, contributed by Arnaud Cornet - * Fixed "long long" compilation issues on IA-64 and PPC64 - * Fixed a bug introduced in xyssl-0.5/timing.c: hardclock - was not being correctly defined on ARM and MIPS - -= Version 0.5 released on 2007-03-01 - - * Added multiply assembly code for SPARC and Alpha - * Added (beta) support for non-blocking I/O operations - * Implemented session resuming and client authentication - * Fixed some portability issues on WinCE, MINIX 3, Plan9 - (thanks to Benjamin Newman), HP-UX, FreeBSD and Solaris - * Improved the performance of the EDH key exchange - * Fixed a bug that caused valid packets with a payload - size of 16384 bytes to be rejected - -= Version 0.4 released on 2007-02-01 - - * Added support for Ephemeral Diffie-Hellman key exchange - * Added multiply asm code for SSE2, ARM, PPC, MIPS and M68K - * Various improvement to the modular exponentiation code - * Rewrote the headers to generate the API docs with doxygen - * Fixed a bug in ssl_encrypt_buf (incorrect padding was - generated) and in ssl_parse_client_hello (max. client - version was not properly set), thanks to Didier Rebeix - * Fixed another bug in ssl_parse_client_hello: clients with - cipherlists larger than 96 bytes were incorrectly rejected - * Fixed a couple memory leak in x509_read.c - -= Version 0.3 released on 2007-01-01 - - * Added server-side SSLv3 and TLSv1.0 support - * Multiple fixes to enhance the compatibility with g++, - thanks to Xosé Antón Otero Ferreira - * Fixed a bug in the CBC code, thanks to dowst; also, - the bignum code is no longer dependent on long long - * Updated rsa_pkcs1_sign to handle arbitrary large inputs - * Updated timing.c for improved compatibility with i386 - and 486 processors, thanks to Arnaud Cornet - -= Version 0.2 released on 2006-12-01 - - * Updated timing.c to support ARM and MIPS arch - * Updated the MPI code to support 8086 on MSVC 1.5 - * Added the copyright notice at the top of havege.h - * Fixed a bug in sha2_hmac, thanks to newsoft/Wenfang Zhang - * Fixed a bug reported by Adrian Rüegsegger in x509_read_key - * Fixed a bug reported by Torsten Lauter in ssl_read_record - * Fixed a bug in rsa_check_privkey that would wrongly cause - valid RSA keys to be dismissed (thanks to oldwolf) - * Fixed a bug in mpi_is_prime that caused some primes to fail - the Miller-Rabin primality test - - I'd also like to thank Younès Hafri for the CRUX linux port, - Khalil Petit who added XySSL into pkgsrc and Arnaud Cornet - who maintains the Debian package :-) - -= Version 0.1 released on 2006-11-01 - diff --git a/build/premake/premake5/contrib/mbedtls/DartConfiguration.tcl b/build/premake/premake5/contrib/mbedtls/DartConfiguration.tcl deleted file mode 100644 index dfa0f07181..0000000000 --- a/build/premake/premake5/contrib/mbedtls/DartConfiguration.tcl +++ /dev/null @@ -1,4 +0,0 @@ -Site: localhost -BuildName: mbed TLS-test -CoverageCommand: /usr/bin/gcov -MemoryCheckCommand: /usr/bin/valgrind diff --git a/build/premake/premake5/contrib/mbedtls/LICENSE b/build/premake/premake5/contrib/mbedtls/LICENSE deleted file mode 100644 index 546a8e631f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/LICENSE +++ /dev/null @@ -1,2 +0,0 @@ -Unless specifically indicated otherwise in a file, files are licensed -under the Apache 2.0 license, as can be found in: apache-2.0.txt diff --git a/build/premake/premake5/contrib/mbedtls/README.md b/build/premake/premake5/contrib/mbedtls/README.md deleted file mode 100644 index 08c6289d7c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/README.md +++ /dev/null @@ -1,173 +0,0 @@ -README for mbed TLS -=================== - -Configuration -------------- - -mbed TLS should build out of the box on most systems. Some platform specific options are available in the fully-documented configuration file `include/mbedtls/config.h`, which is also the place where features can be selected. This file can be edited manually, or in a more programmatic way using the Perl script `scripts/config.pl` (use `--help` for usage instructions). - -Compiler options can be set using standard variables such as `CC` and `CFLAGS` when using the Make and CMake build system (see below). - -Compiling ---------- - -There are currently four active build systems within the mbed TLS releases: - -- yotta -- Make -- CMake -- Microsoft Visual Studio (Visual Studio 6 and Visual Studio 2010) - -The main systems used for development are CMake and yotta. Those systems are always complete and up-to-date. The others should reflect all changes present in the CMake and yotta build system, but some features are not ported there by default. - -Please note that the yotta option is slightly different from the other build systems: - -- a more minimalistic configuration file is used by default -- depending on the yotta target, features of mbed OS will be used in examples and tests - -The Make and CMake build systems create three libraries: libmbedcrypto, libmbedx509, and libmbedtls. Note that libmbedtls depends on libmbedx509 and libmbedcrypto, and libmbedx509 depends on libmbedcrypto. As a result, some linkers will expect flags to be in a specific order, for example the GNU linker wants `-lmbedtls -lmbedx509 -lmbedcrypto`. Also, when loading shared libraries using dlopen(), you'll need to load libmbedcrypto first, then libmbedx509, before you can load libmbedtls. - -### Yotta - -[yotta](http://yottabuild.org) is a package manager and build system developed by mbed; it is the build system of mbed OS. To install it on your platform, please follow the yotta [installation instructions](http://docs.yottabuild.org/#installing). - -Once yotta is installed, you can use it to download the latest version of mbed TLS form the yotta registry with: - - yotta install mbedtls - -and build it with: - - yotta build - -If, on the other hand, you already have a copy of mbed TLS from a source other than the yotta registry, for example from cloning our GitHub repository, or from downloading a tarball of the standalone edition, then you'll need first need to generate the yotta module by running: - - yotta/create-module.sh - -from the mbed TLS root directory. This will create the yotta module in the `yotta/module` directory. You can then change to that directory and build as usual: - - cd yotta/module - yotta build - -In any case, you'll probably want to set the yotta target before building unless it's already set globally; for more information on using yotta, please consult the [yotta documentation](http://docs.yottabuild.org/). - -For more details on the yotta/mbed OS edition of mbed TLS, including example programs, please consult the [Readme at the root of the yotta module](https://github.com/ARMmbed/mbedtls/blob/development/yotta/data/README.md). - -### Make - -We intentionally only use the absolute minimum of `Make` functionality, as a lot of `Make` features are not supported on all different implementations of Make on different platforms. As such, the Makefiles sometimes require some handwork or export statements in order to work for your platform. - -In order to build the source using Make, just enter at the command line: - - make - -In order to run the tests, enter: - - make check - -The tests need Perl to be built and run. If you don't have Perl installed, you can skip building the tests with: - - make no_test - -You'll still be able to run a much smaller set of tests with: - - programs/test/selftest - -In order to build for a Windows platform, you should use `WINDOWS_BUILD=1` if the target is Windows but the build environment is Unix-like (for instance when cross-compiling, or compiling from an MSYS shell), and `WINDOWS=1` if the build environment is a Windows shell (for instance using mingw32-make) (in that case some targets will not be available). - -Setting the variable `SHARED` in your environment will build shared libraries in addition to the static libraries. Setting `DEBUG` gives you a debug build. You can override `CFLAGS` and `LDFLAGS` by setting them in your environment or on the make command line; if you do so, essential parts such as `-I` will still be preserved. Warning options may be overridden separately using `WARNING_CFLAGS`. - -Depending on your platform, you might run into some issues. Please check the Makefiles in `library/`, `programs/` and `tests/` for options to manually add or remove for specific platforms. You can also check [the mbed TLS Knowledge Base](https://tls.mbed.org/kb) for articles on your platform or issue. - -In case you find that you need to do something else as well, please let us know what, so we can add it to the KB. - -### CMake - -In order to build the source using CMake, just enter at the command line: - - cmake . - make - -In order to run the tests, enter: - - make test - -The test suites need Perl to be built. If you don't have Perl installed, you'll want to disable the test suites with: - - cmake -DENABLE_TESTING=Off . - -If you disabled the test suites, but kept the programs enabled, you can still run a much smaller set of tests with: - - programs/test/selftest - -To configure CMake for building shared libraries, use: - - cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On . - -There are many different build modes available within the CMake buildsystem. Most of them are available for gcc and clang, though some are compiler-specific: - -- Release. This generates the default code without any unnecessary information in the binary files. -- Debug. This generates debug information and disables optimization of the code. -- Coverage. This generates code coverage information in addition to debug information. -- ASan. This instruments the code with AddressSanitizer to check for memory errors. (This includes LeakSanitizer, with recent version of gcc and clang.) (With recent version of clang, this mode also instruments the code with UndefinedSanitizer to check for undefined behaviour.) -- ASanDbg. Same as ASan but slower, with debug information and better stack traces. -- MemSan. This instruments the code with MemorySanitizer to check for uninitialised memory reads. Experimental, needs recent clang on Linux/x86\_64. -- MemSanDbg. Same as MemSan but slower, with debug information, better stack traces and origin tracking. -- Check. This activates the compiler warnings that depend on optimization and treats all warnings as errors. - -Switching build modes in CMake is simple. For debug mode, enter at the command line: - - cmake -D CMAKE_BUILD_TYPE=Debug . - -To list other available CMake options, use: - - cmake -LH - -Note that, with CMake, if you want to change the compiler or its options after you already ran CMake, you need to clear its cache first, e.g. (using GNU find): - - find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} + - CC=gcc CFLAGS='-fstack-protector-strong -Wa,--noexecstack' cmake . - -### Microsoft Visual Studio - -The build files for Microsoft Visual Studio are generated for Visual Studio 2010. - -The solution file `mbedTLS.sln` contains all the basic projects needed to build the library and all the programs. The files in tests are not generated and compiled, as these need a perl environment as well. However, the selftest program in `programs/test/` is still available. - -Example programs ----------------- - -We've included example programs for a lot of different features and uses in `programs/`. Most programs only focus on a single feature or usage scenario, so keep that in mind when copying parts of the code. - -Tests ------ - -mbed TLS includes an elaborate test suite in `tests/` that initially requires Perl to generate the tests files (e.g. `test\_suite\_mpi.c`). These files are generated from a `function file` (e.g. `suites/test\_suite\_mpi.function`) and a `data file` (e.g. `suites/test\_suite\_mpi.data`). The `function file` contains the test functions. The `data file` contains the test cases, specified as parameters that will be passed to the test function. - -For machines with a Unix shell and OpenSSL (and optionally GnuTLS) installed, additional test scripts are available: - -- `tests/ssl-opt.sh` runs integration tests for various TLS options (renegotiation, resumption, etc.) and tests interoperability of these options with other implementations. -- `tests/compat.sh` tests interoperability of every ciphersuite with other implementations. -- `tests/scripts/test-ref-configs.pl` test builds in various reduced configurations. -- `tests/scripts/key-exchanges.pl` test builds in configurations with a single key exchange enabled -- `tests/scripts/all.sh` runs a combination of the above tests, plus some more, with various build options (such as ASan, full `config.h`, etc). - -Configurations --------------- - -We provide some non-standard configurations focused on specific use cases in the `configs/` directory. You can read more about those in `configs/README.txt` - -Contributing ------------- - -We gratefully accept bug reports and contributions from the community. There are some requirements we need to fulfill in order to be able to integrate contributions: - -- Simple bug fixes to existing code do not contain copyright themselves and we can integrate without issue. The same is true of trivial contributions. -- For larger contributions, such as a new feature, the code can possibly fall under copyright law. We then need your consent to share in the ownership of the copyright. We have a form for this, which we will send to you in case you submit a contribution or pull request that we deem this necessary for. - -### Process - -1. [Check for open issues](https://github.com/ARMmbed/mbedtls/issues) or [start a discussion](https://tls.mbed.org/discussions) around a feature idea or a bug. -2. Fork the [mbed TLS repository on GitHub](https://github.com/ARMmbed/mbedtls) to start making your changes. As a general rule, you should use the "development" branch as a basis. -3. Write a test which shows that the bug was fixed or that the feature works as expected. -4. Send a pull request and bug us until it gets merged and published. We will include your name in the ChangeLog :) - diff --git a/build/premake/premake5/contrib/mbedtls/apache-2.0.txt b/build/premake/premake5/contrib/mbedtls/apache-2.0.txt deleted file mode 100644 index d645695673..0000000000 --- a/build/premake/premake5/contrib/mbedtls/apache-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/build/premake/premake5/contrib/mbedtls/configs/README.txt b/build/premake/premake5/contrib/mbedtls/configs/README.txt deleted file mode 100644 index e9867bc150..0000000000 --- a/build/premake/premake5/contrib/mbedtls/configs/README.txt +++ /dev/null @@ -1,26 +0,0 @@ -This directory contains example configuration files. - -The examples are generally focused on a particular usage case (eg, support for -a restricted number of ciphersuites) and aim at minimizing resource usage for -this target. They can be used as a basis for custom configurations. - -These files are complete replacements for the default config.h. To use one of -them, you can pick one of the following methods: - -1. Replace the default file include/mbedtls/config.h with the chosen one. - (Depending on your compiler, you may need to ajust the line with - #include "mbedtls/check_config.h" then.) - -2. Define MBEDTLS_CONFIG_FILE and adjust the include path accordingly. - For example, using make: - - CFLAGS="-I$PWD/configs -DMBEDTLS_CONFIG_FILE=''" make - - Or, using cmake: - - find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} + - CFLAGS="-I$PWD/configs -DMBEDTLS_CONFIG_FILE=''" cmake . - make - -Note that the second method also works if you want to keep your custom -configuration file outside the mbed TLS tree. diff --git a/build/premake/premake5/contrib/mbedtls/configs/config-ccm-psk-tls1_2.h b/build/premake/premake5/contrib/mbedtls/configs/config-ccm-psk-tls1_2.h deleted file mode 100644 index aee10b86fe..0000000000 --- a/build/premake/premake5/contrib/mbedtls/configs/config-ccm-psk-tls1_2.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites - * Distinguishing features: - * - no bignum, no PK, no X509 - * - fully modern and secure (provided the pre-shared keys have high entropy) - * - very low record overhead with CCM-8 - * - optimized for low RAM usage - * - * See README.txt for usage instructions. - */ -#ifndef MBEDTLS_CONFIG_H -#define MBEDTLS_CONFIG_H - -/* System support */ -//#define MBEDTLS_HAVE_TIME /* Optionally used in Hello messages */ -/* Other MBEDTLS_HAVE_XXX flags irrelevant for this configuration */ - -/* mbed TLS feature support */ -#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED -#define MBEDTLS_SSL_PROTO_TLS1_2 - -/* mbed TLS modules */ -#define MBEDTLS_AES_C -#define MBEDTLS_CCM_C -#define MBEDTLS_CIPHER_C -#define MBEDTLS_CTR_DRBG_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_MD_C -#define MBEDTLS_NET_C -#define MBEDTLS_SHA256_C -#define MBEDTLS_SSL_CLI_C -#define MBEDTLS_SSL_SRV_C -#define MBEDTLS_SSL_TLS_C - -/* Save RAM at the expense of ROM */ -#define MBEDTLS_AES_ROM_TABLES - -/* Save some RAM by adjusting to your exact needs */ -#define MBEDTLS_PSK_MAX_LEN 16 /* 128-bits keys are generally enough */ - -/* - * You should adjust this to the exact number of sources you're using: default - * is the "platform_entropy_poll" source, but you may want to add other ones - * Minimum is 2 for the entropy test suite. - */ -#define MBEDTLS_ENTROPY_MAX_SOURCES 2 - -/* - * Use only CCM_8 ciphersuites, and - * save ROM and a few bytes of RAM by specifying our own ciphersuite list - */ -#define MBEDTLS_SSL_CIPHERSUITES \ - MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, \ - MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8 - -/* - * Save RAM at the expense of interoperability: do this only if you control - * both ends of the connection! (See comments in "mbedtls/ssl.h".) - * The optimal size here depends on the typical size of records. - */ -#define MBEDTLS_SSL_MAX_CONTENT_LEN 512 - -#include "mbedtls/check_config.h" - -#endif /* MBEDTLS_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/configs/config-mini-tls1_1.h b/build/premake/premake5/contrib/mbedtls/configs/config-mini-tls1_1.h deleted file mode 100644 index e22363d1a3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/configs/config-mini-tls1_1.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Minimal configuration for TLS 1.1 (RFC 4346) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * Minimal configuration for TLS 1.1 (RFC 4346), implementing only the - * required ciphersuite: MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA - * - * See README.txt for usage instructions. - */ - -#ifndef MBEDTLS_CONFIG_H -#define MBEDTLS_CONFIG_H - -/* System support */ -#define MBEDTLS_HAVE_ASM -#define MBEDTLS_HAVE_TIME - -/* mbed TLS feature support */ -#define MBEDTLS_CIPHER_MODE_CBC -#define MBEDTLS_PKCS1_V15 -#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -#define MBEDTLS_SSL_PROTO_TLS1_1 - -/* mbed TLS modules */ -#define MBEDTLS_AES_C -#define MBEDTLS_ASN1_PARSE_C -#define MBEDTLS_ASN1_WRITE_C -#define MBEDTLS_BIGNUM_C -#define MBEDTLS_CIPHER_C -#define MBEDTLS_CTR_DRBG_C -#define MBEDTLS_DES_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_MD_C -#define MBEDTLS_MD5_C -#define MBEDTLS_NET_C -#define MBEDTLS_OID_C -#define MBEDTLS_PK_C -#define MBEDTLS_PK_PARSE_C -#define MBEDTLS_RSA_C -#define MBEDTLS_SHA1_C -#define MBEDTLS_SHA256_C -#define MBEDTLS_SSL_CLI_C -#define MBEDTLS_SSL_SRV_C -#define MBEDTLS_SSL_TLS_C -#define MBEDTLS_X509_CRT_PARSE_C -#define MBEDTLS_X509_USE_C - -/* For test certificates */ -#define MBEDTLS_BASE64_C -#define MBEDTLS_CERTS_C -#define MBEDTLS_PEM_PARSE_C - -/* For testing with compat.sh */ -#define MBEDTLS_FS_IO - -#include "mbedtls/check_config.h" - -#endif /* MBEDTLS_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/configs/config-picocoin.h b/build/premake/premake5/contrib/mbedtls/configs/config-picocoin.h deleted file mode 100644 index 26b24a9e2a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/configs/config-picocoin.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Reduced configuration used by Picocoin. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * Reduced configuration used by Picocoin. - * - * See README.txt for usage instructions. - * - * Distinguishing features: - * - no SSL/TLS; - * - no X.509; - * - ECDSA/PK and some other chosen crypto bits. - */ - -#ifndef MBEDTLS_CONFIG_H -#define MBEDTLS_CONFIG_H - -/* System support */ -#define MBEDTLS_HAVE_ASM -#define MBEDTLS_HAVE_TIME - -/* mbed TLS feature support */ -#define MBEDTLS_CIPHER_MODE_CBC -#define MBEDTLS_CIPHER_PADDING_PKCS7 -#define MBEDTLS_ECP_DP_SECP256K1_ENABLED -#define MBEDTLS_ECDSA_DETERMINISTIC -#define MBEDTLS_PK_PARSE_EC_EXTENDED -#define MBEDTLS_ERROR_STRERROR_DUMMY -#define MBEDTLS_FS_IO - -/* mbed TLS modules */ -#define MBEDTLS_AESNI_C -#define MBEDTLS_AES_C -#define MBEDTLS_ASN1_PARSE_C -#define MBEDTLS_ASN1_WRITE_C -#define MBEDTLS_BASE64_C -#define MBEDTLS_BIGNUM_C -#define MBEDTLS_ECDSA_C -#define MBEDTLS_ECP_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_HMAC_DRBG_C -#define MBEDTLS_MD_C -#define MBEDTLS_OID_C -#define MBEDTLS_PADLOCK_C -#define MBEDTLS_PK_C -#define MBEDTLS_PK_PARSE_C -#define MBEDTLS_PK_WRITE_C -#define MBEDTLS_RIPEMD160_C -#define MBEDTLS_SHA1_C -#define MBEDTLS_SHA256_C - -#include "mbedtls/check_config.h" - -#endif /* MBEDTLS_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/configs/config-suite-b.h b/build/premake/premake5/contrib/mbedtls/configs/config-suite-b.h deleted file mode 100644 index 3c4804c79d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/configs/config-suite-b.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Minimal configuration for TLS NSA Suite B Profile (RFC 6460) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * Minimal configuration for TLS NSA Suite B Profile (RFC 6460) - * - * Distinguishing features: - * - no RSA or classic DH, fully based on ECC - * - optimized for low RAM usage - * - * Possible improvements: - * - if 128-bit security is enough, disable secp384r1 and SHA-512 - * - use embedded certs in DER format and disable PEM_PARSE_C and BASE64_C - * - * See README.txt for usage instructions. - */ - -#ifndef MBEDTLS_CONFIG_H -#define MBEDTLS_CONFIG_H - -/* System support */ -#define MBEDTLS_HAVE_ASM -#define MBEDTLS_HAVE_TIME - -/* mbed TLS feature support */ -#define MBEDTLS_ECP_DP_SECP256R1_ENABLED -#define MBEDTLS_ECP_DP_SECP384R1_ENABLED -#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -#define MBEDTLS_SSL_PROTO_TLS1_2 - -/* mbed TLS modules */ -#define MBEDTLS_AES_C -#define MBEDTLS_ASN1_PARSE_C -#define MBEDTLS_ASN1_WRITE_C -#define MBEDTLS_BIGNUM_C -#define MBEDTLS_CIPHER_C -#define MBEDTLS_CTR_DRBG_C -#define MBEDTLS_ECDH_C -#define MBEDTLS_ECDSA_C -#define MBEDTLS_ECP_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_GCM_C -#define MBEDTLS_MD_C -#define MBEDTLS_NET_C -#define MBEDTLS_OID_C -#define MBEDTLS_PK_C -#define MBEDTLS_PK_PARSE_C -#define MBEDTLS_SHA256_C -#define MBEDTLS_SHA512_C -#define MBEDTLS_SSL_CLI_C -#define MBEDTLS_SSL_SRV_C -#define MBEDTLS_SSL_TLS_C -#define MBEDTLS_X509_CRT_PARSE_C -#define MBEDTLS_X509_USE_C - -/* For test certificates */ -#define MBEDTLS_BASE64_C -#define MBEDTLS_CERTS_C -#define MBEDTLS_PEM_PARSE_C - -/* Save RAM at the expense of ROM */ -#define MBEDTLS_AES_ROM_TABLES - -/* Save RAM by adjusting to our exact needs */ -#define MBEDTLS_ECP_MAX_BITS 384 -#define MBEDTLS_MPI_MAX_SIZE 48 // 384 bits is 48 bytes - -/* Save RAM at the expense of speed, see ecp.h */ -#define MBEDTLS_ECP_WINDOW_SIZE 2 -#define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 - -/* Significant speed benefit at the expense of some ROM */ -#define MBEDTLS_ECP_NIST_OPTIM - -/* - * You should adjust this to the exact number of sources you're using: default - * is the "mbedtls_platform_entropy_poll" source, but you may want to add other ones. - * Minimum is 2 for the entropy test suite. - */ -#define MBEDTLS_ENTROPY_MAX_SOURCES 2 - -/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ -#define MBEDTLS_SSL_CIPHERSUITES \ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - -/* - * Save RAM at the expense of interoperability: do this only if you control - * both ends of the connection! (See coments in "mbedtls/ssl.h".) - * The minimum size here depends on the certificate chain used as well as the - * typical size of records. - */ -#define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 - -#include "mbedtls/check_config.h" - -#endif /* MBEDTLS_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/configs/config-thread.h b/build/premake/premake5/contrib/mbedtls/configs/config-thread.h deleted file mode 100644 index 453b17f0a0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/configs/config-thread.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Minimal configuration for using TLS as part of Thread - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * Minimal configuration for using TLS a part of Thread - * http://threadgroup.org/ - * - * Distinguishing features: - * - no RSA or classic DH, fully based on ECC - * - no X.509 - * - support for experimental EC J-PAKE key exchange - * - * See README.txt for usage instructions. - */ - -#ifndef MBEDTLS_CONFIG_H -#define MBEDTLS_CONFIG_H - -/* System support */ -#define MBEDTLS_HAVE_ASM - -/* mbed TLS feature support */ -#define MBEDTLS_AES_ROM_TABLES -#define MBEDTLS_ECP_DP_SECP256R1_ENABLED -#define MBEDTLS_ECP_NIST_OPTIM -#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH -#define MBEDTLS_SSL_PROTO_TLS1_2 -#define MBEDTLS_SSL_PROTO_DTLS -#define MBEDTLS_SSL_DTLS_ANTI_REPLAY -#define MBEDTLS_SSL_DTLS_HELLO_VERIFY -#define MBEDTLS_SSL_EXPORT_KEYS - -/* mbed TLS modules */ -#define MBEDTLS_AES_C -#define MBEDTLS_ASN1_PARSE_C -#define MBEDTLS_ASN1_WRITE_C -#define MBEDTLS_BIGNUM_C -#define MBEDTLS_CCM_C -#define MBEDTLS_CIPHER_C -#define MBEDTLS_CTR_DRBG_C -#define MBEDTLS_ECJPAKE_C -#define MBEDTLS_ECP_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_HMAC_DRBG_C -#define MBEDTLS_MD_C -#define MBEDTLS_OID_C -#define MBEDTLS_PK_C -#define MBEDTLS_PK_PARSE_C -#define MBEDTLS_SHA256_C -#define MBEDTLS_SSL_COOKIE_C -#define MBEDTLS_SSL_CLI_C -#define MBEDTLS_SSL_SRV_C -#define MBEDTLS_SSL_TLS_C - -/* For tests using ssl-opt.sh */ -#define MBEDTLS_NET_C -#define MBEDTLS_TIMING_C - -/* Save RAM at the expense of ROM */ -#define MBEDTLS_AES_ROM_TABLES - -/* Save RAM by adjusting to our exact needs */ -#define MBEDTLS_ECP_MAX_BITS 256 -#define MBEDTLS_MPI_MAX_SIZE 32 // 256 bits is 32 bytes - -/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ -#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 - -#if defined(TARGET_LIKE_MBED) -#include "mbedtls/target_config.h" -#endif - -#include "mbedtls/check_config.h" - -#endif /* MBEDTLS_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_encdec.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_encdec.h deleted file mode 100644 index 9538ed28ee..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_encdec.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @file - * Encryption/decryption module documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @addtogroup encdec_module Encryption/decryption module - * - * The Encryption/decryption module provides encryption/decryption functions. - * One can differentiate between symmetric and asymmetric algorithms; the - * symmetric ones are mostly used for message confidentiality and the asymmetric - * ones for key exchange and message integrity. - * Some symmetric algorithms provide different block cipher modes, mainly - * Electronic Code Book (ECB) which is used for short (64-bit) messages and - * Cipher Block Chaining (CBC) which provides the structure needed for longer - * messages. In addition the Cipher Feedback Mode (CFB-128) stream cipher mode, - * Counter mode (CTR) and Galois Counter Mode (GCM) are implemented for - * specific algorithms. - * - * All symmetric encryption algorithms are accessible via the generic cipher layer - * (see \c mbedtls_cipher_setup()). - * - * The asymmetric encryptrion algorithms are accessible via the generic public - * key layer (see \c mbedtls_pk_init()). - * - * The following algorithms are provided: - * - Symmetric: - * - AES (see \c mbedtls_aes_crypt_ecb(), \c mbedtls_aes_crypt_cbc(), \c mbedtls_aes_crypt_cfb128() and - * \c mbedtls_aes_crypt_ctr()). - * - ARCFOUR (see \c mbedtls_arc4_crypt()). - * - Blowfish / BF (see \c mbedtls_blowfish_crypt_ecb(), \c mbedtls_blowfish_crypt_cbc(), - * \c mbedtls_blowfish_crypt_cfb64() and \c mbedtls_blowfish_crypt_ctr()) - * - Camellia (see \c mbedtls_camellia_crypt_ecb(), \c mbedtls_camellia_crypt_cbc(), - * \c mbedtls_camellia_crypt_cfb128() and \c mbedtls_camellia_crypt_ctr()). - * - DES/3DES (see \c mbedtls_des_crypt_ecb(), \c mbedtls_des_crypt_cbc(), \c mbedtls_des3_crypt_ecb() - * and \c mbedtls_des3_crypt_cbc()). - * - GCM (AES-GCM and CAMELLIA-GCM) (see \c mbedtls_gcm_init()) - * - XTEA (see \c mbedtls_xtea_crypt_ecb()). - * - Asymmetric: - * - Diffie-Hellman-Merkle (see \c mbedtls_dhm_read_public(), \c mbedtls_dhm_make_public() - * and \c mbedtls_dhm_calc_secret()). - * - RSA (see \c mbedtls_rsa_public() and \c mbedtls_rsa_private()). - * - Elliptic Curves over GF(p) (see \c mbedtls_ecp_point_init()). - * - Elliptic Curve Digital Signature Algorithm (ECDSA) (see \c mbedtls_ecdsa_init()). - * - Elliptic Curve Diffie Hellman (ECDH) (see \c mbedtls_ecdh_init()). - * - * This module provides encryption/decryption which can be used to provide - * secrecy. - * - * It also provides asymmetric key functions which can be used for - * confidentiality, integrity, authentication and non-repudiation. - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_hashing.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_hashing.h deleted file mode 100644 index de82050742..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_hashing.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file - * Hashing module documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @addtogroup hashing_module Hashing module - * - * The Hashing module provides one-way hashing functions. Such functions can be - * used for creating a hash message authentication code (HMAC) when sending a - * message. Such a HMAC can be used in combination with a private key - * for authentication, which is a message integrity control. - * - * All hash algorithms can be accessed via the generic MD layer (see - * \c md_setup()) - * - * The following hashing-algorithms are provided: - * - MD2, MD4, MD5 128-bit one-way hash functions by Ron Rivest. - * - SHA-1, SHA-256, SHA-384/512 160-bit or more one-way hash functions by - * NIST and NSA. - * - * This module provides one-way hashing which can be used for authentication. - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_mainpage.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_mainpage.h deleted file mode 100644 index 9643a6fb36..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_mainpage.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @file - * Main page documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @mainpage mbed TLS v2.2.1 source code documentation - * - * This documentation describes the internal structure of mbed TLS. It was - * automatically generated from specially formatted comment blocks in - * mbed TLS's source code using Doxygen. (See - * http://www.stack.nl/~dimitri/doxygen/ for more information on Doxygen) - * - * mbed TLS has a simple setup: it provides the ingredients for an SSL/TLS - * implementation. These ingredients are listed as modules in the - * \ref mainpage_modules "Modules section". This "Modules section" introduces - * the high-level module concepts used throughout this documentation.\n - * Some examples of mbed TLS usage can be found in the \ref mainpage_examples - * "Examples section". - * - * @section mainpage_modules Modules - * - * mbed TLS supports SSLv3 up to TLSv1.2 communication by providing the - * following: - * - TCP/IP communication functions: listen, connect, accept, read/write. - * - SSL/TLS communication functions: init, handshake, read/write. - * - X.509 functions: CRT, CRL and key handling - * - Random number generation - * - Hashing - * - Encryption/decryption - * - * Above functions are split up neatly into logical interfaces. These can be - * used separately to provide any of the above functions or to mix-and-match - * into an SSL server/client solution that utilises a X.509 PKI. Examples of - * such implementations are amply provided with the source code. - * - * Note that mbed TLS does not provide a control channel or (multiple) session - * handling without additional work from the developer. - * - * @section mainpage_examples Examples - * - * Example server setup: - * - * \b Prerequisites: - * - X.509 certificate and private key - * - session handling functions - * - * \b Setup: - * - Load your certificate and your private RSA key (X.509 interface) - * - Setup the listening TCP socket (TCP/IP interface) - * - Accept incoming client connection (TCP/IP interface) - * - Initialise as an SSL-server (SSL/TLS interface) - * - Set parameters, e.g. authentication, ciphers, CA-chain, key exchange - * - Set callback functions RNG, IO, session handling - * - Perform an SSL-handshake (SSL/TLS interface) - * - Read/write data (SSL/TLS interface) - * - Close and cleanup (all interfaces) - * - * Example client setup: - * - * \b Prerequisites: - * - X.509 certificate and private key - * - X.509 trusted CA certificates - * - * \b Setup: - * - Load the trusted CA certificates (X.509 interface) - * - Load your certificate and your private RSA key (X.509 interface) - * - Setup a TCP/IP connection (TCP/IP interface) - * - Initialise as an SSL-client (SSL/TLS interface) - * - Set parameters, e.g. authentication mode, ciphers, CA-chain, session - * - Set callback functions RNG, IO - * - Perform an SSL-handshake (SSL/TLS interface) - * - Verify the server certificate (SSL/TLS interface) - * - Write/read data (SSL/TLS interface) - * - Close and cleanup (all interfaces) - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_rng.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_rng.h deleted file mode 100644 index 0159ef357d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_rng.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @file - * Random number generator (RNG) module documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @addtogroup rng_module Random number generator (RNG) module - * - * The Random number generator (RNG) module provides random number - * generation, see \c mbedtls_ctr_drbg_random(). - * - * The block-cipher counter-mode based deterministic random - * bit generator (CTR_DBRG) as specified in NIST SP800-90. It needs an external - * source of entropy. For these purposes \c mbedtls_entropy_func() can be used. - * This is an implementation based on a simple entropy accumulator design. - * - * The other number generator that is included is less strong and uses the - * HAVEGE (HArdware Volatile Entropy Gathering and Expansion) software heuristic - * which considered unsafe for primary usage, but provides additional random - * to the entropy pool if enables. - * - * Meaning that there seems to be no practical algorithm that can guess - * the next bit with a probability larger than 1/2 in an output sequence. - * - * This module can be used to generate random numbers. - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_ssltls.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_ssltls.h deleted file mode 100644 index 7f104bd4d8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_ssltls.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file - * SSL/TLS communication module documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @addtogroup ssltls_communication_module SSL/TLS communication module - * - * The SSL/TLS communication module provides the means to create an SSL/TLS - * communication channel. - * - * The basic provisions are: - * - initialise an SSL/TLS context (see \c mbedtls_ssl_init()). - * - perform an SSL/TLS handshake (see \c mbedtls_ssl_handshake()). - * - read/write (see \c mbedtls_ssl_read() and \c mbedtls_ssl_write()). - * - notify a peer that connection is being closed (see \c mbedtls_ssl_close_notify()). - * - * Many aspects of such a channel are set through parameters and callback - * functions: - * - the endpoint role: client or server. - * - the authentication mode. Should verification take place. - * - the Host-to-host communication channel. A TCP/IP module is provided. - * - the random number generator (RNG). - * - the ciphers to use for encryption/decryption. - * - session control functions. - * - X.509 parameters for certificate-handling and key exchange. - * - * This module can be used to create an SSL/TLS server and client and to provide a basic - * framework to setup and communicate through an SSL/TLS communication channel.\n - * Note that you need to provide for several aspects yourself as mentioned above. - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_tcpip.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_tcpip.h deleted file mode 100644 index 34d3ca1b52..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_tcpip.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @file - * TCP/IP communication module documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @addtogroup tcpip_communication_module TCP/IP communication module - * - * The TCP/IP communication module provides for a channel of - * communication for the \link ssltls_communication_module SSL/TLS communication - * module\endlink to use. - * In the TCP/IP-model it provides for communication up to the Transport - * (or Host-to-host) layer. - * SSL/TLS resides on top of that, in the Application layer, and makes use of - * its basic provisions: - * - listening on a port (see \c mbedtls_net_bind()). - * - accepting a connection (through \c mbedtls_net_accept()). - * - read/write (through \c mbedtls_net_recv()/\c mbedtls_net_send()). - * - close a connection (through \c mbedtls_net_close()). - * - * This way you have the means to, for example, implement and use an UDP or - * IPSec communication solution as a basis. - * - * This module can be used at server- and clientside to provide a basic - * means of communication over the internet. - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_x509.h b/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_x509.h deleted file mode 100644 index 315f0e3ce9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/input/doc_x509.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file - * X.509 module documentation file. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/** - * @addtogroup x509_module X.509 module - * - * The X.509 module provides X.509 support for reading, writing and verification - * of certificates. - * In summary: - * - X.509 certificate (CRT) reading (see \c mbedtls_x509_crt_parse(), - * \c mbedtls_x509_crt_parse_der(), \c mbedtls_x509_crt_parse_file()). - * - X.509 certificate revocation list (CRL) reading (see - * \c mbedtls_x509_crl_parse(), \c mbedtls_x509_crl_parse_der(), - * and \c mbedtls_x509_crl_parse_file()). - * - X.509 certificate signature verification (see \c - * mbedtls_x509_crt_verify() and \c mbedtls_x509_crt_verify_with_profile(). - * - X.509 certificate writing and certificate request writing (see - * \c mbedtls_x509write_crt_der() and \c mbedtls_x509write_csr_der()). - * - * This module can be used to build a certificate authority (CA) chain and - * verify its signature. It is also used to generate Certificate Signing - * Requests and X.509 certificates just as a CA would do. - */ diff --git a/build/premake/premake5/contrib/mbedtls/doxygen/mbedtls.doxyfile b/build/premake/premake5/contrib/mbedtls/doxygen/mbedtls.doxyfile deleted file mode 100644 index 6a00f47573..0000000000 --- a/build/premake/premake5/contrib/mbedtls/doxygen/mbedtls.doxyfile +++ /dev/null @@ -1,1911 +0,0 @@ -# Doxyfile 1.8.4 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed -# in front of the TAG it is preceding . -# All text after a hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or sequence of words) that should -# identify the project. Note that if you do not use Doxywizard you need -# to put quotes around the project name if it contains spaces. - -PROJECT_NAME = "mbed TLS v2.2.1" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = apidoc/ - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, -# Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, -# Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. Note that you specify absolute paths here, but also -# relative paths, which will be relative from the directory where doxygen is -# started. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding -# "class=itcl::class" will allow you to use the command class in the -# itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, -# and language is one of the parsers supported by doxygen: IDL, Java, -# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, -# C++. For instance to make doxygen treat .inc files as Fortran files (default -# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note -# that for custom extensions you also need to set FILE_PATTERNS otherwise the -# files are not read by doxygen. - -EXTENSION_MAPPING = - -# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all -# comments according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you -# can mix doxygen, HTML, and XML commands with Markdown formatting. -# Disable only in case of backward compatibilities issues. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES (the -# default) will make doxygen replace the get and set methods by a property in -# the documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data fields or simple typedef fields will be shown -# inline in the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO (the default), structs, classes, and unions are shown on a separate -# page (for HTML and Man pages) or section (for LaTeX and RTF). - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can -# be an expensive process and often the same symbol appear multiple times in -# the code, doxygen keeps a cache of pre-resolved symbols. If the cache is too -# small doxygen will become slower. If the cache is too large, memory is wasted. -# The cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid -# range is 0..9, the default is 0, corresponding to a cache size of 2^16 = 65536 -# symbols. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = YES - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. - -EXTRACT_ANON_NSPACES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if section-label ... \endif -# and \cond section-label ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files -# containing the references data. This must be a list of .bib files. The -# .bib extension is automatically appended if omitted. Using this command -# requires the bibtex tool to be installed. See also -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style -# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. Do not use -# file names with spaces, bibtex cannot handle them. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = . - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = configs - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be ignored. -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C, C++ and Fortran comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = . - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is advised to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when -# changing the value of configuration settings such as GENERATE_TREEVIEW! - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If left blank doxygen will -# generate a default style sheet. Note that it is recommended to use -# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this -# tag will in the future become obsolete. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional -# user-defined cascading style sheet that is included after the standard -# style sheets created by doxygen. Using this option one can overrule -# certain style aspects. This is preferred over using HTML_STYLESHEET -# since it does not replace the standard style sheet and is therefor more -# robust against future updates. Doxygen will copy the style sheet file to -# the output directory. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the style sheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of -# entries shown in the various tree structured indices initially; the user -# can expand and collapse entries dynamically later on. Doxygen will expand -# the tree to such a level that at most the specified number of entries are -# visible (unless a fully collapsed tree already exceeds this amount). -# So setting the number of entries 1 will produce a full collapsed tree by -# default. 0 is a special value representing an infinite number of entries -# and will result in a full expanded tree by default. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely -# identify the documentation publisher. This should be a reverse domain-name -# style string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) -# at top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. Since the tabs have the same information as the -# navigation tree you can set this option to NO if you already set -# GENERATE_TREEVIEW to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. -# Since the tree basically has the same information as the tab index you -# could consider to set DISABLE_INDEX to NO when enabling this option. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you may also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and -# SVG. The default value is HTML-CSS, which is slower, but has the best -# compatibility. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to -# the MathJax Content Delivery Network so you can quickly see the result without -# installing MathJax. -# However, it is strongly recommended to install a local -# copy of MathJax from http://www.mathjax.org before deployment. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension -# names that should be enabled during MathJax rendering. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript -# pieces of code that will be used on startup of the MathJax code. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = NO - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. -# There are two flavours of web server based search depending on the -# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for -# searching and an index file used by the script. When EXTERNAL_SEARCH is -# enabled the indexing and searching needs to be provided by external tools. -# See the manual for details. - -SERVER_BASED_SEARCH = NO - -# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP -# script for searching. Instead the search results are written to an XML file -# which needs to be processed by an external indexer. Doxygen will invoke an -# external search engine pointed to by the SEARCHENGINE_URL option to obtain -# the search results. Doxygen ships with an example indexer (doxyindexer) and -# search engine (doxysearch.cgi) which are based on the open source search -# engine library Xapian. See the manual for configuration details. - -EXTERNAL_SEARCH = NO - -# The SEARCHENGINE_URL should point to a search engine hosted by a web server -# which will returned the search results when EXTERNAL_SEARCH is enabled. -# Doxygen ships with an example search engine (doxysearch) which is based on -# the open source search engine library Xapian. See the manual for configuration -# details. - -SEARCHENGINE_URL = - -# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed -# search data is written to a file for indexing by an external tool. With the -# SEARCHDATA_FILE tag the name of this file can be specified. - -SEARCHDATA_FILE = searchdata.xml - -# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the -# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is -# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple -# projects and redirect the results back to the right project. - -EXTERNAL_SEARCH_ID = - -# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen -# projects other than the one defined by this configuration file, but that are -# all added to the same external search index. Each project needs to have a -# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id -# of to a relative location where the documentation can be found. -# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... - -EXTRA_SEARCH_MAPPINGS = - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = YES - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, letter, legal and -# executive. If left blank a4 will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for -# the generated latex document. The footer should contain everything after -# the last chapter. If it is left blank doxygen will generate a -# standard footer. Notice: only use this tag if you know what you are doing! - -LATEX_FOOTER = - -# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images -# or other source files which should be copied to the LaTeX output directory. -# Note that the files will be copied as-is; there are no commands or markers -# available. - -LATEX_EXTRA_FILES = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -# The LATEX_BIB_STYLE tag can be used to specify the style to use for the -# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See -# http://en.wikipedia.org/wiki/BibTeX for more info. - -LATEX_BIB_STYLE = plain - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load style sheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options related to the DOCBOOK output -#--------------------------------------------------------------------------- - -# If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files -# that can be used to generate PDF. - -GENERATE_DOCBOOK = NO - -# The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in -# front of it. If left blank docbook will be used as the default path. - -DOCBOOK_OUTPUT = docbook - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# pointed to by INCLUDE_PATH will be searched when a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = WIN32 \ - NTLM \ - USE_LZO \ - ENABLE_FRAGMENT \ - P2MP \ - P2MP_SERVER \ - USE_CRYPTO \ - USE_SSL \ - ENABLE_PLUGIN \ - ENABLE_MANAGEMENT \ - ENABLE_OCC \ - HAVE_GETTIMEOFDAY - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition that -# overrules the definition found in the source code. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all references to function-like macros -# that are alone on a line, have an all uppercase name, and do not end with a -# semicolon, because these will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. For each -# tag file the location of the external documentation should be added. The -# format of a tag file without this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths -# or URLs. Note that each tag file must have a unique name (where the name does -# NOT include the path). If a tag file is not located in the directory in which -# doxygen is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed -# in the related pages index. If set to NO, only the current project's -# pages will be listed. - -EXTERNAL_PAGES = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option also works with HAVE_DOT disabled, but it is recommended to -# install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = NO - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will use the Helvetica font for all dot files that -# doxygen generates. When you want a differently looking font you can specify -# the font name using DOT_FONTNAME. You need to make sure dot is able to find -# the font, which can be done by putting it in a standard location or by setting -# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the -# directory containing the font. - -DOT_FONTNAME = Helvetica - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the Helvetica font. -# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to -# set the path where dot can find it. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If the UML_LOOK tag is enabled, the fields and methods are shown inside -# the class node. If there are many fields or methods and many nodes the -# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS -# threshold limits the number of items for each type to make the size more -# manageable. Set this to 0 for no limit. Note that the threshold may be -# exceeded by 50% before the limit is enforced. - -UML_LIMIT_NUM_FIELDS = 10 - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will generate a graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are svg, png, jpg, or gif. -# If left blank png will be used. If you choose svg you need to set -# HTML_FILE_EXTENSION to xhtml in order to make the SVG files -# visible in IE 9+ (other browsers do not have this requirement). - -DOT_IMAGE_FORMAT = png - -# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to -# enable generation of interactive SVG images that allow zooming and panning. -# Note that this requires a modern browser other than Internet Explorer. -# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you -# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files -# visible. Older versions of IE do not have SVG support. - -INTERACTIVE_SVG = NO - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MSCFILE_DIRS tag can be used to specify one or more directories that -# contain msc files that are included in the documentation (see the -# \mscfile command). - -MSCFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 200 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 1000 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = YES - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/build/premake/premake5/contrib/mbedtls/include/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/include/CMakeLists.txt deleted file mode 100644 index 985a3530b9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) - -if(INSTALL_MBEDTLS_HEADERS) - - file(GLOB headers "mbedtls/*.h") - - install(FILES ${headers} - DESTINATION include/mbedtls - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) - -endif(INSTALL_MBEDTLS_HEADERS) diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/aes.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/aes.h deleted file mode 100644 index a36e825a2e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/aes.h +++ /dev/null @@ -1,297 +0,0 @@ -/** - * \file aes.h - * - * \brief AES block cipher - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_AES_H -#define MBEDTLS_AES_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -/* padlock.c and aesni.c rely on these values! */ -#define MBEDTLS_AES_ENCRYPT 1 -#define MBEDTLS_AES_DECRYPT 0 - -#define MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -0x0020 /**< Invalid key length. */ -#define MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH -0x0022 /**< Invalid data input length. */ - -#if !defined(MBEDTLS_AES_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief AES context structure - * - * \note buf is able to hold 32 extra bytes, which can be used: - * - for alignment purposes if VIA padlock is used, and/or - * - to simplify key expansion in the 256-bit case by - * generating an extra round key - */ -typedef struct -{ - int nr; /*!< number of rounds */ - uint32_t *rk; /*!< AES round keys */ - uint32_t buf[68]; /*!< unaligned data */ -} -mbedtls_aes_context; - -/** - * \brief Initialize AES context - * - * \param ctx AES context to be initialized - */ -void mbedtls_aes_init( mbedtls_aes_context *ctx ); - -/** - * \brief Clear AES context - * - * \param ctx AES context to be cleared - */ -void mbedtls_aes_free( mbedtls_aes_context *ctx ); - -/** - * \brief AES key schedule (encryption) - * - * \param ctx AES context to be initialized - * \param key encryption key - * \param keybits must be 128, 192 or 256 - * - * \return 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH - */ -int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key, - unsigned int keybits ); - -/** - * \brief AES key schedule (decryption) - * - * \param ctx AES context to be initialized - * \param key decryption key - * \param keybits must be 128, 192 or 256 - * - * \return 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH - */ -int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key, - unsigned int keybits ); - -/** - * \brief AES-ECB block encryption/decryption - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param input 16-byte input block - * \param output 16-byte output block - * - * \return 0 if successful - */ -int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/** - * \brief AES-CBC buffer encryption/decryption - * Length should be a multiple of the block - * size (16 bytes) - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful, or MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH - */ -int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/** - * \brief AES-CFB128 buffer encryption/decryption. - * - * Note: Due to the nature of CFB you should use the same key schedule for - * both encryption and decryption. So a context initialized with - * mbedtls_aes_setkey_enc() for both MBEDTLS_AES_ENCRYPT and MBEDTLS_AES_DECRYPT. - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param length length of the input data - * \param iv_off offset in IV (updated after use) - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful - */ -int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx, - int mode, - size_t length, - size_t *iv_off, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ); - -/** - * \brief AES-CFB8 buffer encryption/decryption. - * - * Note: Due to the nature of CFB you should use the same key schedule for - * both encryption and decryption. So a context initialized with - * mbedtls_aes_setkey_enc() for both MBEDTLS_AES_ENCRYPT and MBEDTLS_AES_DECRYPT. - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful - */ -int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ); -#endif /*MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/** - * \brief AES-CTR buffer encryption/decryption - * - * Warning: You have to keep the maximum use of your counter in mind! - * - * Note: Due to the nature of CTR you should use the same key schedule for - * both encryption and decryption. So a context initialized with - * mbedtls_aes_setkey_enc() for both MBEDTLS_AES_ENCRYPT and MBEDTLS_AES_DECRYPT. - * - * \param ctx AES context - * \param length The length of the data - * \param nc_off The offset in the current stream_block (for resuming - * within current cipher stream). The offset pointer to - * should be 0 at the start of a stream. - * \param nonce_counter The 128-bit nonce and counter. - * \param stream_block The saved stream-block for resuming. Is overwritten - * by the function. - * \param input The input data stream - * \param output The output data stream - * - * \return 0 if successful - */ -int mbedtls_aes_crypt_ctr( mbedtls_aes_context *ctx, - size_t length, - size_t *nc_off, - unsigned char nonce_counter[16], - unsigned char stream_block[16], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -/** - * \brief Internal AES block encryption function - * (Only exposed to allow overriding it, - * see MBEDTLS_AES_ENCRYPT_ALT) - * - * \param ctx AES context - * \param input Plaintext block - * \param output Output (ciphertext) block - */ -void mbedtls_aes_encrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ); - -/** - * \brief Internal AES block decryption function - * (Only exposed to allow overriding it, - * see MBEDTLS_AES_DECRYPT_ALT) - * - * \param ctx AES context - * \param input Ciphertext block - * \param output Output (plaintext) block - */ -void mbedtls_aes_decrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_AES_ALT */ -#include "aes_alt.h" -#endif /* MBEDTLS_AES_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_aes_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* aes.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/aesni.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/aesni.h deleted file mode 100644 index b1b7f1cdec..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/aesni.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * \file aesni.h - * - * \brief AES-NI for hardware AES acceleration on some Intel processors - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_AESNI_H -#define MBEDTLS_AESNI_H - -#include "aes.h" - -#define MBEDTLS_AESNI_AES 0x02000000u -#define MBEDTLS_AESNI_CLMUL 0x00000002u - -#if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && \ - ( defined(__amd64__) || defined(__x86_64__) ) && \ - ! defined(MBEDTLS_HAVE_X86_64) -#define MBEDTLS_HAVE_X86_64 -#endif - -#if defined(MBEDTLS_HAVE_X86_64) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief AES-NI features detection routine - * - * \param what The feature to detect - * (MBEDTLS_AESNI_AES or MBEDTLS_AESNI_CLMUL) - * - * \return 1 if CPU has support for the feature, 0 otherwise - */ -int mbedtls_aesni_has_support( unsigned int what ); - -/** - * \brief AES-NI AES-ECB block en(de)cryption - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param input 16-byte input block - * \param output 16-byte output block - * - * \return 0 on success (cannot fail) - */ -int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ); - -/** - * \brief GCM multiplication: c = a * b in GF(2^128) - * - * \param c Result - * \param a First operand - * \param b Second operand - * - * \note Both operands and result are bit strings interpreted as - * elements of GF(2^128) as per the GCM spec. - */ -void mbedtls_aesni_gcm_mult( unsigned char c[16], - const unsigned char a[16], - const unsigned char b[16] ); - -/** - * \brief Compute decryption round keys from encryption round keys - * - * \param invkey Round keys for the equivalent inverse cipher - * \param fwdkey Original round keys (for encryption) - * \param nr Number of rounds (that is, number of round keys minus one) - */ -void mbedtls_aesni_inverse_key( unsigned char *invkey, - const unsigned char *fwdkey, int nr ); - -/** - * \brief Perform key expansion (for encryption) - * - * \param rk Destination buffer where the round keys are written - * \param key Encryption key - * \param bits Key size in bits (must be 128, 192 or 256) - * - * \return 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH - */ -int mbedtls_aesni_setkey_enc( unsigned char *rk, - const unsigned char *key, - size_t bits ); - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_HAVE_X86_64 */ - -#endif /* MBEDTLS_AESNI_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/arc4.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/arc4.h deleted file mode 100644 index 5fc5395a8c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/arc4.h +++ /dev/null @@ -1,113 +0,0 @@ -/** - * \file arc4.h - * - * \brief The ARCFOUR stream cipher - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ARC4_H -#define MBEDTLS_ARC4_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#if !defined(MBEDTLS_ARC4_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief ARC4 context structure - */ -typedef struct -{ - int x; /*!< permutation index */ - int y; /*!< permutation index */ - unsigned char m[256]; /*!< permutation table */ -} -mbedtls_arc4_context; - -/** - * \brief Initialize ARC4 context - * - * \param ctx ARC4 context to be initialized - */ -void mbedtls_arc4_init( mbedtls_arc4_context *ctx ); - -/** - * \brief Clear ARC4 context - * - * \param ctx ARC4 context to be cleared - */ -void mbedtls_arc4_free( mbedtls_arc4_context *ctx ); - -/** - * \brief ARC4 key schedule - * - * \param ctx ARC4 context to be setup - * \param key the secret key - * \param keylen length of the key, in bytes - */ -void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key, - unsigned int keylen ); - -/** - * \brief ARC4 cipher function - * - * \param ctx ARC4 context - * \param length length of the input data - * \param input buffer holding the input data - * \param output buffer for the output data - * - * \return 0 if successful - */ -int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, - unsigned char *output ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_ARC4_ALT */ -#include "arc4_alt.h" -#endif /* MBEDTLS_ARC4_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_arc4_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* arc4.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1.h deleted file mode 100644 index 082832c87f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1.h +++ /dev/null @@ -1,342 +0,0 @@ -/** - * \file asn1.h - * - * \brief Generic ASN.1 parsing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ASN1_H -#define MBEDTLS_ASN1_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#if defined(MBEDTLS_BIGNUM_C) -#include "bignum.h" -#endif - -/** - * \addtogroup asn1_module - * \{ - */ - -/** - * \name ASN1 Error codes - * These error codes are OR'ed to X509 error codes for - * higher error granularity. - * ASN1 is a standard to specify data structures. - * \{ - */ -#define MBEDTLS_ERR_ASN1_OUT_OF_DATA -0x0060 /**< Out of data when parsing an ASN1 data structure. */ -#define MBEDTLS_ERR_ASN1_UNEXPECTED_TAG -0x0062 /**< ASN1 tag was of an unexpected value. */ -#define MBEDTLS_ERR_ASN1_INVALID_LENGTH -0x0064 /**< Error when trying to determine the length or invalid length. */ -#define MBEDTLS_ERR_ASN1_LENGTH_MISMATCH -0x0066 /**< Actual length differs from expected length. */ -#define MBEDTLS_ERR_ASN1_INVALID_DATA -0x0068 /**< Data is invalid. (not used) */ -#define MBEDTLS_ERR_ASN1_ALLOC_FAILED -0x006A /**< Memory allocation failed */ -#define MBEDTLS_ERR_ASN1_BUF_TOO_SMALL -0x006C /**< Buffer too small when writing ASN.1 data structure. */ - -/* \} name */ - -/** - * \name DER constants - * These constants comply with DER encoded the ANS1 type tags. - * DER encoding uses hexadecimal representation. - * An example DER sequence is:\n - * - 0x02 -- tag indicating INTEGER - * - 0x01 -- length in octets - * - 0x05 -- value - * Such sequences are typically read into \c ::mbedtls_x509_buf. - * \{ - */ -#define MBEDTLS_ASN1_BOOLEAN 0x01 -#define MBEDTLS_ASN1_INTEGER 0x02 -#define MBEDTLS_ASN1_BIT_STRING 0x03 -#define MBEDTLS_ASN1_OCTET_STRING 0x04 -#define MBEDTLS_ASN1_NULL 0x05 -#define MBEDTLS_ASN1_OID 0x06 -#define MBEDTLS_ASN1_UTF8_STRING 0x0C -#define MBEDTLS_ASN1_SEQUENCE 0x10 -#define MBEDTLS_ASN1_SET 0x11 -#define MBEDTLS_ASN1_PRINTABLE_STRING 0x13 -#define MBEDTLS_ASN1_T61_STRING 0x14 -#define MBEDTLS_ASN1_IA5_STRING 0x16 -#define MBEDTLS_ASN1_UTC_TIME 0x17 -#define MBEDTLS_ASN1_GENERALIZED_TIME 0x18 -#define MBEDTLS_ASN1_UNIVERSAL_STRING 0x1C -#define MBEDTLS_ASN1_BMP_STRING 0x1E -#define MBEDTLS_ASN1_PRIMITIVE 0x00 -#define MBEDTLS_ASN1_CONSTRUCTED 0x20 -#define MBEDTLS_ASN1_CONTEXT_SPECIFIC 0x80 -/* \} name */ -/* \} addtogroup asn1_module */ - -/** Returns the size of the binary string, without the trailing \\0 */ -#define MBEDTLS_OID_SIZE(x) (sizeof(x) - 1) - -/** - * Compares an mbedtls_asn1_buf structure to a reference OID. - * - * Only works for 'defined' oid_str values (MBEDTLS_OID_HMAC_SHA1), you cannot use a - * 'unsigned char *oid' here! - */ -#define MBEDTLS_OID_CMP(oid_str, oid_buf) \ - ( ( MBEDTLS_OID_SIZE(oid_str) != (oid_buf)->len ) || \ - memcmp( (oid_str), (oid_buf)->p, (oid_buf)->len) != 0 ) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name Functions to parse ASN.1 data structures - * \{ - */ - -/** - * Type-length-value structure that allows for ASN1 using DER. - */ -typedef struct mbedtls_asn1_buf -{ - int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ - size_t len; /**< ASN1 length, in octets. */ - unsigned char *p; /**< ASN1 data, e.g. in ASCII. */ -} -mbedtls_asn1_buf; - -/** - * Container for ASN1 bit strings. - */ -typedef struct mbedtls_asn1_bitstring -{ - size_t len; /**< ASN1 length, in octets. */ - unsigned char unused_bits; /**< Number of unused bits at the end of the string */ - unsigned char *p; /**< Raw ASN1 data for the bit string */ -} -mbedtls_asn1_bitstring; - -/** - * Container for a sequence of ASN.1 items - */ -typedef struct mbedtls_asn1_sequence -{ - mbedtls_asn1_buf buf; /**< Buffer containing the given ASN.1 item. */ - struct mbedtls_asn1_sequence *next; /**< The next entry in the sequence. */ -} -mbedtls_asn1_sequence; - -/** - * Container for a sequence or list of 'named' ASN.1 data items - */ -typedef struct mbedtls_asn1_named_data -{ - mbedtls_asn1_buf oid; /**< The object identifier. */ - mbedtls_asn1_buf val; /**< The named value. */ - struct mbedtls_asn1_named_data *next; /**< The next entry in the sequence. */ - unsigned char next_merged; /**< Merge next item into the current one? */ -} -mbedtls_asn1_named_data; - -/** - * \brief Get the length of an ASN.1 element. - * Updates the pointer to immediately behind the length. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param len The variable that will receive the value - * - * \return 0 if successful, MBEDTLS_ERR_ASN1_OUT_OF_DATA on reaching - * end of data, MBEDTLS_ERR_ASN1_INVALID_LENGTH if length is - * unparseable. - */ -int mbedtls_asn1_get_len( unsigned char **p, - const unsigned char *end, - size_t *len ); - -/** - * \brief Get the tag and length of the tag. Check for the requested tag. - * Updates the pointer to immediately behind the tag and length. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param len The variable that will receive the length - * \param tag The expected tag - * - * \return 0 if successful, MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if tag did - * not match requested tag, or another specific ASN.1 error code. - */ -int mbedtls_asn1_get_tag( unsigned char **p, - const unsigned char *end, - size_t *len, int tag ); - -/** - * \brief Retrieve a boolean ASN.1 tag and its value. - * Updates the pointer to immediately behind the full tag. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param val The variable that will receive the value - * - * \return 0 if successful or a specific ASN.1 error code. - */ -int mbedtls_asn1_get_bool( unsigned char **p, - const unsigned char *end, - int *val ); - -/** - * \brief Retrieve an integer ASN.1 tag and its value. - * Updates the pointer to immediately behind the full tag. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param val The variable that will receive the value - * - * \return 0 if successful or a specific ASN.1 error code. - */ -int mbedtls_asn1_get_int( unsigned char **p, - const unsigned char *end, - int *val ); - -/** - * \brief Retrieve a bitstring ASN.1 tag and its value. - * Updates the pointer to immediately behind the full tag. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param bs The variable that will receive the value - * - * \return 0 if successful or a specific ASN.1 error code. - */ -int mbedtls_asn1_get_bitstring( unsigned char **p, const unsigned char *end, - mbedtls_asn1_bitstring *bs); - -/** - * \brief Retrieve a bitstring ASN.1 tag without unused bits and its - * value. - * Updates the pointer to the beginning of the bit/octet string. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param len Length of the actual bit/octect string in bytes - * - * \return 0 if successful or a specific ASN.1 error code. - */ -int mbedtls_asn1_get_bitstring_null( unsigned char **p, const unsigned char *end, - size_t *len ); - -/** - * \brief Parses and splits an ASN.1 "SEQUENCE OF " - * Updated the pointer to immediately behind the full sequence tag. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param cur First variable in the chain to fill - * \param tag Type of sequence - * - * \return 0 if successful or a specific ASN.1 error code. - */ -int mbedtls_asn1_get_sequence_of( unsigned char **p, - const unsigned char *end, - mbedtls_asn1_sequence *cur, - int tag); - -#if defined(MBEDTLS_BIGNUM_C) -/** - * \brief Retrieve a MPI value from an integer ASN.1 tag. - * Updates the pointer to immediately behind the full tag. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param X The MPI that will receive the value - * - * \return 0 if successful or a specific ASN.1 or MPI error code. - */ -int mbedtls_asn1_get_mpi( unsigned char **p, - const unsigned char *end, - mbedtls_mpi *X ); -#endif /* MBEDTLS_BIGNUM_C */ - -/** - * \brief Retrieve an AlgorithmIdentifier ASN.1 sequence. - * Updates the pointer to immediately behind the full - * AlgorithmIdentifier. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param alg The buffer to receive the OID - * \param params The buffer to receive the params (if any) - * - * \return 0 if successful or a specific ASN.1 or MPI error code. - */ -int mbedtls_asn1_get_alg( unsigned char **p, - const unsigned char *end, - mbedtls_asn1_buf *alg, mbedtls_asn1_buf *params ); - -/** - * \brief Retrieve an AlgorithmIdentifier ASN.1 sequence with NULL or no - * params. - * Updates the pointer to immediately behind the full - * AlgorithmIdentifier. - * - * \param p The position in the ASN.1 data - * \param end End of data - * \param alg The buffer to receive the OID - * - * \return 0 if successful or a specific ASN.1 or MPI error code. - */ -int mbedtls_asn1_get_alg_null( unsigned char **p, - const unsigned char *end, - mbedtls_asn1_buf *alg ); - -/** - * \brief Find a specific named_data entry in a sequence or list based on - * the OID. - * - * \param list The list to seek through - * \param oid The OID to look for - * \param len Size of the OID - * - * \return NULL if not found, or a pointer to the existing entry. - */ -mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list, - const char *oid, size_t len ); - -/** - * \brief Free a mbedtls_asn1_named_data entry - * - * \param entry The named data entry to free - */ -void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *entry ); - -/** - * \brief Free all entries in a mbedtls_asn1_named_data list - * Head will be set to NULL - * - * \param head Pointer to the head of the list of named data entries to free - */ -void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head ); - -#ifdef __cplusplus -} -#endif - -#endif /* asn1.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1write.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1write.h deleted file mode 100644 index 73ff32b669..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/asn1write.h +++ /dev/null @@ -1,239 +0,0 @@ -/** - * \file asn1write.h - * - * \brief ASN.1 buffer writing functionality - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ASN1_WRITE_H -#define MBEDTLS_ASN1_WRITE_H - -#include "asn1.h" - -#define MBEDTLS_ASN1_CHK_ADD(g, f) do { if( ( ret = f ) < 0 ) return( ret ); else \ - g += ret; } while( 0 ) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Write a length field in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param len the length to write - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len ); - -/** - * \brief Write a ASN.1 tag in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param tag the tag to write - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_tag( unsigned char **p, unsigned char *start, - unsigned char tag ); - -/** - * \brief Write raw buffer data - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param buf data buffer to write - * \param size length of the data buffer - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, - const unsigned char *buf, size_t size ); - -#if defined(MBEDTLS_BIGNUM_C) -/** - * \brief Write a big number (MBEDTLS_ASN1_INTEGER) in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param X the MPI to write - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_mpi( unsigned char **p, unsigned char *start, const mbedtls_mpi *X ); -#endif /* MBEDTLS_BIGNUM_C */ - -/** - * \brief Write a NULL tag (MBEDTLS_ASN1_NULL) with zero data in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_null( unsigned char **p, unsigned char *start ); - -/** - * \brief Write an OID tag (MBEDTLS_ASN1_OID) and data in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param oid the OID to write - * \param oid_len length of the OID - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_oid( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len ); - -/** - * \brief Write an AlgorithmIdentifier sequence in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param oid the OID of the algorithm - * \param oid_len length of the OID - * \param par_len length of parameters, which must be already written. - * If 0, NULL parameters are added - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len, - size_t par_len ); - -/** - * \brief Write a boolean tag (MBEDTLS_ASN1_BOOLEAN) and value in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param boolean 0 or 1 - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_bool( unsigned char **p, unsigned char *start, int boolean ); - -/** - * \brief Write an int tag (MBEDTLS_ASN1_INTEGER) and value in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param val the integer value - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_int( unsigned char **p, unsigned char *start, int val ); - -/** - * \brief Write a printable string tag (MBEDTLS_ASN1_PRINTABLE_STRING) and - * value in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param text the text to write - * \param text_len length of the text - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_printable_string( unsigned char **p, unsigned char *start, - const char *text, size_t text_len ); - -/** - * \brief Write an IA5 string tag (MBEDTLS_ASN1_IA5_STRING) and - * value in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param text the text to write - * \param text_len length of the text - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_ia5_string( unsigned char **p, unsigned char *start, - const char *text, size_t text_len ); - -/** - * \brief Write a bitstring tag (MBEDTLS_ASN1_BIT_STRING) and - * value in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param buf the bitstring - * \param bits the total number of bits in the bitstring - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_bitstring( unsigned char **p, unsigned char *start, - const unsigned char *buf, size_t bits ); - -/** - * \brief Write an octet string tag (MBEDTLS_ASN1_OCTET_STRING) and - * value in ASN.1 format - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param buf data buffer to write - * \param size length of the data buffer - * - * \return the length written or a negative error code - */ -int mbedtls_asn1_write_octet_string( unsigned char **p, unsigned char *start, - const unsigned char *buf, size_t size ); - -/** - * \brief Create or find a specific named_data entry for writing in a - * sequence or list based on the OID. If not already in there, - * a new entry is added to the head of the list. - * Warning: Destructive behaviour for the val data! - * - * \param list Pointer to the location of the head of the list to seek - * through (will be updated in case of a new entry) - * \param oid The OID to look for - * \param oid_len Size of the OID - * \param val Data to store (can be NULL if you want to fill it by hand) - * \param val_len Minimum length of the data buffer needed - * - * \return NULL if if there was a memory allocation error, or a pointer - * to the new / existing entry. - */ -mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data **list, - const char *oid, size_t oid_len, - const unsigned char *val, - size_t val_len ); - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_ASN1_WRITE_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/base64.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/base64.h deleted file mode 100644 index 352c652db9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/base64.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * \file base64.h - * - * \brief RFC 1521 base64 encoding/decoding - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_BASE64_H -#define MBEDTLS_BASE64_H - -#include - -#define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */ -#define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Encode a buffer into base64 format - * - * \param dst destination buffer - * \param dlen size of the destination buffer - * \param olen number of bytes written - * \param src source buffer - * \param slen amount of data to be encoded - * - * \return 0 if successful, or MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL. - * *olen is always updated to reflect the amount - * of data that has (or would have) been written. - * If that length cannot be represented, then no data is - * written to the buffer and *olen is set to the maximum - * length representable as a size_t. - * - * \note Call this function with dlen = 0 to obtain the - * required buffer size in *olen - */ -int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, - const unsigned char *src, size_t slen ); - -/** - * \brief Decode a base64-formatted buffer - * - * \param dst destination buffer (can be NULL for checking size) - * \param dlen size of the destination buffer - * \param olen number of bytes written - * \param src source buffer - * \param slen amount of data to be decoded - * - * \return 0 if successful, MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL, or - * MBEDTLS_ERR_BASE64_INVALID_CHARACTER if the input data is - * not correct. *olen is always updated to reflect the amount - * of data that has (or would have) been written. - * - * \note Call this function with *dst = NULL or dlen = 0 to obtain - * the required buffer size in *olen - */ -int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, - const unsigned char *src, size_t slen ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_base64_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* base64.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/bignum.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/bignum.h deleted file mode 100644 index ebcc21487d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/bignum.h +++ /dev/null @@ -1,722 +0,0 @@ -/** - * \file bignum.h - * - * \brief Multi-precision integer library - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_BIGNUM_H -#define MBEDTLS_BIGNUM_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if defined(MBEDTLS_FS_IO) -#include -#endif - -#define MBEDTLS_ERR_MPI_FILE_IO_ERROR -0x0002 /**< An error occurred while reading from or writing to a file. */ -#define MBEDTLS_ERR_MPI_BAD_INPUT_DATA -0x0004 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_MPI_INVALID_CHARACTER -0x0006 /**< There is an invalid character in the digit string. */ -#define MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -0x0008 /**< The buffer is too small to write to. */ -#define MBEDTLS_ERR_MPI_NEGATIVE_VALUE -0x000A /**< The input arguments are negative or result in illegal output. */ -#define MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -0x000C /**< The input argument for division is zero, which is not allowed. */ -#define MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -0x000E /**< The input arguments are not acceptable. */ -#define MBEDTLS_ERR_MPI_ALLOC_FAILED -0x0010 /**< Memory allocation failed. */ - -#define MBEDTLS_MPI_CHK(f) do { if( ( ret = f ) != 0 ) goto cleanup; } while( 0 ) - -/* - * Maximum size MPIs are allowed to grow to in number of limbs. - */ -#define MBEDTLS_MPI_MAX_LIMBS 10000 - -#if !defined(MBEDTLS_MPI_WINDOW_SIZE) -/* - * Maximum window size used for modular exponentiation. Default: 6 - * Minimum value: 1. Maximum value: 6. - * - * Result is an array of ( 2 << MBEDTLS_MPI_WINDOW_SIZE ) MPIs used - * for the sliding window calculation. (So 64 by default) - * - * Reduction in size, reduces speed. - */ -#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ -#endif /* !MBEDTLS_MPI_WINDOW_SIZE */ - -#if !defined(MBEDTLS_MPI_MAX_SIZE) -/* - * Maximum size of MPIs allowed in bits and bytes for user-MPIs. - * ( Default: 512 bytes => 4096 bits, Maximum tested: 2048 bytes => 16384 bits ) - * - * Note: Calculations can results temporarily in larger MPIs. So the number - * of limbs required (MBEDTLS_MPI_MAX_LIMBS) is higher. - */ -#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */ -#endif /* !MBEDTLS_MPI_MAX_SIZE */ - -#define MBEDTLS_MPI_MAX_BITS ( 8 * MBEDTLS_MPI_MAX_SIZE ) /**< Maximum number of bits for usable MPIs. */ - -/* - * When reading from files with mbedtls_mpi_read_file() and writing to files with - * mbedtls_mpi_write_file() the buffer should have space - * for a (short) label, the MPI (in the provided radix), the newline - * characters and the '\0'. - * - * By default we assume at least a 10 char label, a minimum radix of 10 - * (decimal) and a maximum of 4096 bit numbers (1234 decimal chars). - * Autosized at compile time for at least a 10 char label, a minimum radix - * of 10 (decimal) for a number of MBEDTLS_MPI_MAX_BITS size. - * - * This used to be statically sized to 1250 for a maximum of 4096 bit - * numbers (1234 decimal chars). - * - * Calculate using the formula: - * MBEDTLS_MPI_RW_BUFFER_SIZE = ceil(MBEDTLS_MPI_MAX_BITS / ln(10) * ln(2)) + - * LabelSize + 6 - */ -#define MBEDTLS_MPI_MAX_BITS_SCALE100 ( 100 * MBEDTLS_MPI_MAX_BITS ) -#define MBEDTLS_LN_2_DIV_LN_10_SCALE100 332 -#define MBEDTLS_MPI_RW_BUFFER_SIZE ( ((MBEDTLS_MPI_MAX_BITS_SCALE100 + MBEDTLS_LN_2_DIV_LN_10_SCALE100 - 1) / MBEDTLS_LN_2_DIV_LN_10_SCALE100) + 10 + 6 ) - -/* - * Define the base integer type, architecture-wise. - * - * 32-bit integers can be forced on 64-bit arches (eg. for testing purposes) - * by defining MBEDTLS_HAVE_INT32 and undefining MBEDTLS_HAVE_ASM - */ -#if ( ! defined(MBEDTLS_HAVE_INT32) && \ - defined(_MSC_VER) && defined(_M_AMD64) ) - #define MBEDTLS_HAVE_INT64 - typedef int64_t mbedtls_mpi_sint; - typedef uint64_t mbedtls_mpi_uint; -#else - #if ( ! defined(MBEDTLS_HAVE_INT32) && \ - defined(__GNUC__) && ( \ - defined(__amd64__) || defined(__x86_64__) || \ - defined(__ppc64__) || defined(__powerpc64__) || \ - defined(__ia64__) || defined(__alpha__) || \ - (defined(__sparc__) && defined(__arch64__)) || \ - defined(__s390x__) || defined(__mips64) ) ) - #define MBEDTLS_HAVE_INT64 - typedef int64_t mbedtls_mpi_sint; - typedef uint64_t mbedtls_mpi_uint; - /* mbedtls_t_udbl defined as 128-bit unsigned int */ - typedef unsigned int mbedtls_t_udbl __attribute__((mode(TI))); - - #if (! defined(__clang__) && ! defined(__APPLE__)) - #define MBEDTLS_HAVE_UDBL - #endif - #else - #define MBEDTLS_HAVE_INT32 - typedef int32_t mbedtls_mpi_sint; - typedef uint32_t mbedtls_mpi_uint; - typedef uint64_t mbedtls_t_udbl; - #if (! defined(__clang__) && ! defined(__APPLE__)) - #define MBEDTLS_HAVE_UDBL - #endif - #endif /* !MBEDTLS_HAVE_INT32 && __GNUC__ && 64-bit platform */ -#endif /* !MBEDTLS_HAVE_INT32 && _MSC_VER && _M_AMD64 */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief MPI structure - */ -typedef struct -{ - int s; /*!< integer sign */ - size_t n; /*!< total # of limbs */ - mbedtls_mpi_uint *p; /*!< pointer to limbs */ -} -mbedtls_mpi; - -/** - * \brief Initialize one MPI (make internal references valid) - * This just makes it ready to be set or freed, - * but does not define a value for the MPI. - * - * \param X One MPI to initialize. - */ -void mbedtls_mpi_init( mbedtls_mpi *X ); - -/** - * \brief Unallocate one MPI - * - * \param X One MPI to unallocate. - */ -void mbedtls_mpi_free( mbedtls_mpi *X ); - -/** - * \brief Enlarge to the specified number of limbs - * - * \param X MPI to grow - * \param nblimbs The target number of limbs - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ); - -/** - * \brief Resize down, keeping at least the specified number of limbs - * - * \param X MPI to shrink - * \param nblimbs The minimum number of limbs to keep - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ); - -/** - * \brief Copy the contents of Y into X - * - * \param X Destination MPI - * \param Y Source MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ); - -/** - * \brief Swap the contents of X and Y - * - * \param X First MPI value - * \param Y Second MPI value - */ -void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); - -/** - * \brief Safe conditional assignement X = Y if assign is 1 - * - * \param X MPI to conditionally assign to - * \param Y Value to be assigned - * \param assign 1: perform the assignment, 0: keep X's original value - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * - * \note This function is equivalent to - * if( assign ) mbedtls_mpi_copy( X, Y ); - * except that it avoids leaking any information about whether - * the assignment was done or not (the above code may leak - * information through branch prediction and/or memory access - * patterns analysis). - */ -int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign ); - -/** - * \brief Safe conditional swap X <-> Y if swap is 1 - * - * \param X First mbedtls_mpi value - * \param Y Second mbedtls_mpi value - * \param assign 1: perform the swap, 0: keep X and Y's original values - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * - * \note This function is equivalent to - * if( assign ) mbedtls_mpi_swap( X, Y ); - * except that it avoids leaking any information about whether - * the assignment was done or not (the above code may leak - * information through branch prediction and/or memory access - * patterns analysis). - */ -int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign ); - -/** - * \brief Set value from integer - * - * \param X MPI to set - * \param z Value to use - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z ); - -/** - * \brief Get a specific bit from X - * - * \param X MPI to use - * \param pos Zero-based index of the bit in X - * - * \return Either a 0 or a 1 - */ -int mbedtls_mpi_get_bit( const mbedtls_mpi *X, size_t pos ); - -/** - * \brief Set a bit of X to a specific value of 0 or 1 - * - * \note Will grow X if necessary to set a bit to 1 in a not yet - * existing limb. Will not grow if bit should be set to 0 - * - * \param X MPI to use - * \param pos Zero-based index of the bit in X - * \param val The value to set the bit to (0 or 1) - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if val is not 0 or 1 - */ -int mbedtls_mpi_set_bit( mbedtls_mpi *X, size_t pos, unsigned char val ); - -/** - * \brief Return the number of zero-bits before the least significant - * '1' bit - * - * Note: Thus also the zero-based index of the least significant '1' bit - * - * \param X MPI to use - */ -size_t mbedtls_mpi_lsb( const mbedtls_mpi *X ); - -/** - * \brief Return the number of bits up to and including the most - * significant '1' bit' - * - * Note: Thus also the one-based index of the most significant '1' bit - * - * \param X MPI to use - */ -size_t mbedtls_mpi_bitlen( const mbedtls_mpi *X ); - -/** - * \brief Return the total size in bytes - * - * \param X MPI to use - */ -size_t mbedtls_mpi_size( const mbedtls_mpi *X ); - -/** - * \brief Import from an ASCII string - * - * \param X Destination MPI - * \param radix Input numeric base - * \param s Null-terminated string buffer - * - * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code - */ -int mbedtls_mpi_read_string( mbedtls_mpi *X, int radix, const char *s ); - -/** - * \brief Export into an ASCII string - * - * \param X Source MPI - * \param radix Output numeric base - * \param buf Buffer to write the string to - * \param buflen Length of buf - * \param olen Length of the string written, including final NUL byte - * - * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code. - * *olen is always updated to reflect the amount - * of data that has (or would have) been written. - * - * \note Call this function with buflen = 0 to obtain the - * minimum required buffer size in *olen. - */ -int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix, - char *buf, size_t buflen, size_t *olen ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Read X from an opened file - * - * \param X Destination MPI - * \param radix Input numeric base - * \param fin Input file handle - * - * \return 0 if successful, MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if - * the file read buffer is too small or a - * MBEDTLS_ERR_MPI_XXX error code - */ -int mbedtls_mpi_read_file( mbedtls_mpi *X, int radix, FILE *fin ); - -/** - * \brief Write X into an opened file, or stdout if fout is NULL - * - * \param p Prefix, can be NULL - * \param X Source MPI - * \param radix Output numeric base - * \param fout Output file handle (can be NULL) - * - * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code - * - * \note Set fout == NULL to print X on the console. - */ -int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X, int radix, FILE *fout ); -#endif /* MBEDTLS_FS_IO */ - -/** - * \brief Import X from unsigned binary data, big endian - * - * \param X Destination MPI - * \param buf Input buffer - * \param buflen Input buffer size - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen ); - -/** - * \brief Export X into unsigned binary data, big endian. - * Always fills the whole buffer, which will start with zeros - * if the number is smaller. - * - * \param X Source MPI - * \param buf Output buffer - * \param buflen Output buffer size - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if buf isn't large enough - */ -int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf, size_t buflen ); - -/** - * \brief Left-shift: X <<= count - * - * \param X MPI to shift - * \param count Amount to shift - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_shift_l( mbedtls_mpi *X, size_t count ); - -/** - * \brief Right-shift: X >>= count - * - * \param X MPI to shift - * \param count Amount to shift - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count ); - -/** - * \brief Compare unsigned values - * - * \param X Left-hand MPI - * \param Y Right-hand MPI - * - * \return 1 if |X| is greater than |Y|, - * -1 if |X| is lesser than |Y| or - * 0 if |X| is equal to |Y| - */ -int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y ); - -/** - * \brief Compare signed values - * - * \param X Left-hand MPI - * \param Y Right-hand MPI - * - * \return 1 if X is greater than Y, - * -1 if X is lesser than Y or - * 0 if X is equal to Y - */ -int mbedtls_mpi_cmp_mpi( const mbedtls_mpi *X, const mbedtls_mpi *Y ); - -/** - * \brief Compare signed values - * - * \param X Left-hand MPI - * \param z The integer value to compare to - * - * \return 1 if X is greater than z, - * -1 if X is lesser than z or - * 0 if X is equal to z - */ -int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z ); - -/** - * \brief Unsigned addition: X = |A| + |B| - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Unsigned subtraction: X = |A| - |B| - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_NEGATIVE_VALUE if B is greater than A - */ -int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Signed addition: X = A + B - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Signed subtraction: X = A - B - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Signed addition: X = A + b - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param b The integer value to add - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b ); - -/** - * \brief Signed subtraction: X = A - b - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param b The integer value to subtract - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b ); - -/** - * \brief Baseline multiplication: X = A * B - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Baseline multiplication: X = A * b - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param b The unsigned integer value to multiply with - * - * \note b is unsigned - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b ); - -/** - * \brief Division by mbedtls_mpi: A = Q * B + R - * - * \param Q Destination MPI for the quotient - * \param R Destination MPI for the rest value - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if B == 0 - * - * \note Either Q or R can be NULL. - */ -int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Division by int: A = Q * b + R - * - * \param Q Destination MPI for the quotient - * \param R Destination MPI for the rest value - * \param A Left-hand MPI - * \param b Integer to divide by - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if b == 0 - * - * \note Either Q or R can be NULL. - */ -int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, mbedtls_mpi_sint b ); - -/** - * \brief Modulo: R = A mod B - * - * \param R Destination MPI for the rest value - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if B == 0, - * MBEDTLS_ERR_MPI_NEGATIVE_VALUE if B < 0 - */ -int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Modulo: r = A mod b - * - * \param r Destination mbedtls_mpi_uint - * \param A Left-hand MPI - * \param b Integer to divide by - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if b == 0, - * MBEDTLS_ERR_MPI_NEGATIVE_VALUE if b < 0 - */ -int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b ); - -/** - * \brief Sliding-window exponentiation: X = A^E mod N - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param E Exponent MPI - * \param N Modular MPI - * \param _RR Speed-up MPI used for recalculations - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if N is negative or even or - * if E is negative - * - * \note _RR is used to avoid re-computing R*R mod N across - * multiple calls, which speeds up things a bit. It can - * be set to NULL if the extra performance is unneeded. - */ -int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR ); - -/** - * \brief Fill an MPI X with size bytes of random - * - * \param X Destination MPI - * \param size Size in bytes - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Greatest common divisor: G = gcd(A, B) - * - * \param G Destination MPI - * \param A Left-hand MPI - * \param B Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B ); - -/** - * \brief Modular inverse: X = A^-1 mod N - * - * \param X Destination MPI - * \param A Left-hand MPI - * \param N Right-hand MPI - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if N is negative or nil - MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if A has no inverse mod N - */ -int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *N ); - -/** - * \brief Miller-Rabin primality test - * - * \param X MPI to check - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful (probably prime), - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if X is not prime - */ -int mbedtls_mpi_is_prime( const mbedtls_mpi *X, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Prime number generation - * - * \param X Destination MPI - * \param nbits Required size of X in bits - * ( 3 <= nbits <= MBEDTLS_MPI_MAX_BITS ) - * \param dh_flag If 1, then (X-1)/2 will be prime too - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful (probably prime), - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_MPI_BAD_INPUT_DATA if nbits is < 3 - */ -int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_mpi_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* bignum.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/blowfish.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/blowfish.h deleted file mode 100644 index 34626eef48..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/blowfish.h +++ /dev/null @@ -1,203 +0,0 @@ -/** - * \file blowfish.h - * - * \brief Blowfish block cipher - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_BLOWFISH_H -#define MBEDTLS_BLOWFISH_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#define MBEDTLS_BLOWFISH_ENCRYPT 1 -#define MBEDTLS_BLOWFISH_DECRYPT 0 -#define MBEDTLS_BLOWFISH_MAX_KEY_BITS 448 -#define MBEDTLS_BLOWFISH_MIN_KEY_BITS 32 -#define MBEDTLS_BLOWFISH_ROUNDS 16 /**< Rounds to use. When increasing this value, make sure to extend the initialisation vectors */ -#define MBEDTLS_BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */ - -#define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH -0x0016 /**< Invalid key length. */ -#define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 /**< Invalid data input length. */ - -#if !defined(MBEDTLS_BLOWFISH_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Blowfish context structure - */ -typedef struct -{ - uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2]; /*!< Blowfish round keys */ - uint32_t S[4][256]; /*!< key dependent S-boxes */ -} -mbedtls_blowfish_context; - -/** - * \brief Initialize Blowfish context - * - * \param ctx Blowfish context to be initialized - */ -void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx ); - -/** - * \brief Clear Blowfish context - * - * \param ctx Blowfish context to be cleared - */ -void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx ); - -/** - * \brief Blowfish key schedule - * - * \param ctx Blowfish context to be initialized - * \param key encryption key - * \param keybits must be between 32 and 448 bits - * - * \return 0 if successful, or MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH - */ -int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char *key, - unsigned int keybits ); - -/** - * \brief Blowfish-ECB block encryption/decryption - * - * \param ctx Blowfish context - * \param mode MBEDTLS_BLOWFISH_ENCRYPT or MBEDTLS_BLOWFISH_DECRYPT - * \param input 8-byte input block - * \param output 8-byte output block - * - * \return 0 if successful - */ -int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx, - int mode, - const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE], - unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE] ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/** - * \brief Blowfish-CBC buffer encryption/decryption - * Length should be a multiple of the block - * size (8 bytes) - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx Blowfish context - * \param mode MBEDTLS_BLOWFISH_ENCRYPT or MBEDTLS_BLOWFISH_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful, or - * MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH - */ -int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx, - int mode, - size_t length, - unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/** - * \brief Blowfish CFB buffer encryption/decryption. - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx Blowfish context - * \param mode MBEDTLS_BLOWFISH_ENCRYPT or MBEDTLS_BLOWFISH_DECRYPT - * \param length length of the input data - * \param iv_off offset in IV (updated after use) - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful - */ -int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx, - int mode, - size_t length, - size_t *iv_off, - unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], - const unsigned char *input, - unsigned char *output ); -#endif /*MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/** - * \brief Blowfish-CTR buffer encryption/decryption - * - * Warning: You have to keep the maximum use of your counter in mind! - * - * \param ctx Blowfish context - * \param length The length of the data - * \param nc_off The offset in the current stream_block (for resuming - * within current cipher stream). The offset pointer to - * should be 0 at the start of a stream. - * \param nonce_counter The 64-bit nonce and counter. - * \param stream_block The saved stream-block for resuming. Is overwritten - * by the function. - * \param input The input data stream - * \param output The output data stream - * - * \return 0 if successful - */ -int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx, - size_t length, - size_t *nc_off, - unsigned char nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE], - unsigned char stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_BLOWFISH_ALT */ -#include "blowfish_alt.h" -#endif /* MBEDTLS_BLOWFISH_ALT */ - -#endif /* blowfish.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/bn_mul.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/bn_mul.h deleted file mode 100644 index 5408d4146b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/bn_mul.h +++ /dev/null @@ -1,876 +0,0 @@ -/** - * \file bn_mul.h - * - * \brief Multi-precision integer library - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * Multiply source vector [s] with b, add result - * to destination vector [d] and set carry c. - * - * Currently supports: - * - * . IA-32 (386+) . AMD64 / EM64T - * . IA-32 (SSE2) . Motorola 68000 - * . PowerPC, 32-bit . MicroBlaze - * . PowerPC, 64-bit . TriCore - * . SPARC v8 . ARM v3+ - * . Alpha . MIPS32 - * . C, longlong . C, generic - */ -#ifndef MBEDTLS_BN_MUL_H -#define MBEDTLS_BN_MUL_H - -#include "bignum.h" - -#if defined(MBEDTLS_HAVE_ASM) - -#ifndef asm -#define asm __asm -#endif - -/* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ -#if defined(__GNUC__) && \ - ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) -#if defined(__i386__) - -#define MULADDC_INIT \ - asm( \ - "movl %%ebx, %0 \n\t" \ - "movl %5, %%esi \n\t" \ - "movl %6, %%edi \n\t" \ - "movl %7, %%ecx \n\t" \ - "movl %8, %%ebx \n\t" - -#define MULADDC_CORE \ - "lodsl \n\t" \ - "mull %%ebx \n\t" \ - "addl %%ecx, %%eax \n\t" \ - "adcl $0, %%edx \n\t" \ - "addl (%%edi), %%eax \n\t" \ - "adcl $0, %%edx \n\t" \ - "movl %%edx, %%ecx \n\t" \ - "stosl \n\t" - -#if defined(MBEDTLS_HAVE_SSE2) - -#define MULADDC_HUIT \ - "movd %%ecx, %%mm1 \n\t" \ - "movd %%ebx, %%mm0 \n\t" \ - "movd (%%edi), %%mm3 \n\t" \ - "paddq %%mm3, %%mm1 \n\t" \ - "movd (%%esi), %%mm2 \n\t" \ - "pmuludq %%mm0, %%mm2 \n\t" \ - "movd 4(%%esi), %%mm4 \n\t" \ - "pmuludq %%mm0, %%mm4 \n\t" \ - "movd 8(%%esi), %%mm6 \n\t" \ - "pmuludq %%mm0, %%mm6 \n\t" \ - "movd 12(%%esi), %%mm7 \n\t" \ - "pmuludq %%mm0, %%mm7 \n\t" \ - "paddq %%mm2, %%mm1 \n\t" \ - "movd 4(%%edi), %%mm3 \n\t" \ - "paddq %%mm4, %%mm3 \n\t" \ - "movd 8(%%edi), %%mm5 \n\t" \ - "paddq %%mm6, %%mm5 \n\t" \ - "movd 12(%%edi), %%mm4 \n\t" \ - "paddq %%mm4, %%mm7 \n\t" \ - "movd %%mm1, (%%edi) \n\t" \ - "movd 16(%%esi), %%mm2 \n\t" \ - "pmuludq %%mm0, %%mm2 \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "movd 20(%%esi), %%mm4 \n\t" \ - "pmuludq %%mm0, %%mm4 \n\t" \ - "paddq %%mm3, %%mm1 \n\t" \ - "movd 24(%%esi), %%mm6 \n\t" \ - "pmuludq %%mm0, %%mm6 \n\t" \ - "movd %%mm1, 4(%%edi) \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "movd 28(%%esi), %%mm3 \n\t" \ - "pmuludq %%mm0, %%mm3 \n\t" \ - "paddq %%mm5, %%mm1 \n\t" \ - "movd 16(%%edi), %%mm5 \n\t" \ - "paddq %%mm5, %%mm2 \n\t" \ - "movd %%mm1, 8(%%edi) \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "paddq %%mm7, %%mm1 \n\t" \ - "movd 20(%%edi), %%mm5 \n\t" \ - "paddq %%mm5, %%mm4 \n\t" \ - "movd %%mm1, 12(%%edi) \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "paddq %%mm2, %%mm1 \n\t" \ - "movd 24(%%edi), %%mm5 \n\t" \ - "paddq %%mm5, %%mm6 \n\t" \ - "movd %%mm1, 16(%%edi) \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "paddq %%mm4, %%mm1 \n\t" \ - "movd 28(%%edi), %%mm5 \n\t" \ - "paddq %%mm5, %%mm3 \n\t" \ - "movd %%mm1, 20(%%edi) \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "paddq %%mm6, %%mm1 \n\t" \ - "movd %%mm1, 24(%%edi) \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "paddq %%mm3, %%mm1 \n\t" \ - "movd %%mm1, 28(%%edi) \n\t" \ - "addl $32, %%edi \n\t" \ - "addl $32, %%esi \n\t" \ - "psrlq $32, %%mm1 \n\t" \ - "movd %%mm1, %%ecx \n\t" - -#define MULADDC_STOP \ - "emms \n\t" \ - "movl %4, %%ebx \n\t" \ - "movl %%ecx, %1 \n\t" \ - "movl %%edi, %2 \n\t" \ - "movl %%esi, %3 \n\t" \ - : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ - : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ - : "eax", "ecx", "edx", "esi", "edi" \ - ); - -#else - -#define MULADDC_STOP \ - "movl %4, %%ebx \n\t" \ - "movl %%ecx, %1 \n\t" \ - "movl %%edi, %2 \n\t" \ - "movl %%esi, %3 \n\t" \ - : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ - : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ - : "eax", "ecx", "edx", "esi", "edi" \ - ); -#endif /* SSE2 */ -#endif /* i386 */ - -#if defined(__amd64__) || defined (__x86_64__) - -#define MULADDC_INIT \ - asm( \ - "movq %3, %%rsi \n\t" \ - "movq %4, %%rdi \n\t" \ - "movq %5, %%rcx \n\t" \ - "movq %6, %%rbx \n\t" \ - "xorq %%r8, %%r8 \n\t" - -#define MULADDC_CORE \ - "movq (%%rsi), %%rax \n\t" \ - "mulq %%rbx \n\t" \ - "addq $8, %%rsi \n\t" \ - "addq %%rcx, %%rax \n\t" \ - "movq %%r8, %%rcx \n\t" \ - "adcq $0, %%rdx \n\t" \ - "nop \n\t" \ - "addq %%rax, (%%rdi) \n\t" \ - "adcq %%rdx, %%rcx \n\t" \ - "addq $8, %%rdi \n\t" - -#define MULADDC_STOP \ - "movq %%rcx, %0 \n\t" \ - "movq %%rdi, %1 \n\t" \ - "movq %%rsi, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "rax", "rcx", "rdx", "rbx", "rsi", "rdi", "r8" \ - ); - -#endif /* AMD64 */ - -#if defined(__mc68020__) || defined(__mcpu32__) - -#define MULADDC_INIT \ - asm( \ - "movl %3, %%a2 \n\t" \ - "movl %4, %%a3 \n\t" \ - "movl %5, %%d3 \n\t" \ - "movl %6, %%d2 \n\t" \ - "moveq #0, %%d0 \n\t" - -#define MULADDC_CORE \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d4:%%d1 \n\t" \ - "addl %%d3, %%d1 \n\t" \ - "addxl %%d0, %%d4 \n\t" \ - "moveq #0, %%d3 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "addxl %%d4, %%d3 \n\t" - -#define MULADDC_STOP \ - "movl %%d3, %0 \n\t" \ - "movl %%a3, %1 \n\t" \ - "movl %%a2, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "d0", "d1", "d2", "d3", "d4", "a2", "a3" \ - ); - -#define MULADDC_HUIT \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d4:%%d1 \n\t" \ - "addxl %%d3, %%d1 \n\t" \ - "addxl %%d0, %%d4 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d3:%%d1 \n\t" \ - "addxl %%d4, %%d1 \n\t" \ - "addxl %%d0, %%d3 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d4:%%d1 \n\t" \ - "addxl %%d3, %%d1 \n\t" \ - "addxl %%d0, %%d4 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d3:%%d1 \n\t" \ - "addxl %%d4, %%d1 \n\t" \ - "addxl %%d0, %%d3 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d4:%%d1 \n\t" \ - "addxl %%d3, %%d1 \n\t" \ - "addxl %%d0, %%d4 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d3:%%d1 \n\t" \ - "addxl %%d4, %%d1 \n\t" \ - "addxl %%d0, %%d3 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d4:%%d1 \n\t" \ - "addxl %%d3, %%d1 \n\t" \ - "addxl %%d0, %%d4 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "movel %%a2@+, %%d1 \n\t" \ - "mulul %%d2, %%d3:%%d1 \n\t" \ - "addxl %%d4, %%d1 \n\t" \ - "addxl %%d0, %%d3 \n\t" \ - "addl %%d1, %%a3@+ \n\t" \ - "addxl %%d0, %%d3 \n\t" - -#endif /* MC68000 */ - -#if defined(__powerpc64__) || defined(__ppc64__) - -#if defined(__MACH__) && defined(__APPLE__) - -#define MULADDC_INIT \ - asm( \ - "ld r3, %3 \n\t" \ - "ld r4, %4 \n\t" \ - "ld r5, %5 \n\t" \ - "ld r6, %6 \n\t" \ - "addi r3, r3, -8 \n\t" \ - "addi r4, r4, -8 \n\t" \ - "addic r5, r5, 0 \n\t" - -#define MULADDC_CORE \ - "ldu r7, 8(r3) \n\t" \ - "mulld r8, r7, r6 \n\t" \ - "mulhdu r9, r7, r6 \n\t" \ - "adde r8, r8, r5 \n\t" \ - "ld r7, 8(r4) \n\t" \ - "addze r5, r9 \n\t" \ - "addc r8, r8, r7 \n\t" \ - "stdu r8, 8(r4) \n\t" - -#define MULADDC_STOP \ - "addze r5, r5 \n\t" \ - "addi r4, r4, 8 \n\t" \ - "addi r3, r3, 8 \n\t" \ - "std r5, %0 \n\t" \ - "std r4, %1 \n\t" \ - "std r3, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ - ); - - -#else /* __MACH__ && __APPLE__ */ - -#define MULADDC_INIT \ - asm( \ - "ld %%r3, %3 \n\t" \ - "ld %%r4, %4 \n\t" \ - "ld %%r5, %5 \n\t" \ - "ld %%r6, %6 \n\t" \ - "addi %%r3, %%r3, -8 \n\t" \ - "addi %%r4, %%r4, -8 \n\t" \ - "addic %%r5, %%r5, 0 \n\t" - -#define MULADDC_CORE \ - "ldu %%r7, 8(%%r3) \n\t" \ - "mulld %%r8, %%r7, %%r6 \n\t" \ - "mulhdu %%r9, %%r7, %%r6 \n\t" \ - "adde %%r8, %%r8, %%r5 \n\t" \ - "ld %%r7, 8(%%r4) \n\t" \ - "addze %%r5, %%r9 \n\t" \ - "addc %%r8, %%r8, %%r7 \n\t" \ - "stdu %%r8, 8(%%r4) \n\t" - -#define MULADDC_STOP \ - "addze %%r5, %%r5 \n\t" \ - "addi %%r4, %%r4, 8 \n\t" \ - "addi %%r3, %%r3, 8 \n\t" \ - "std %%r5, %0 \n\t" \ - "std %%r4, %1 \n\t" \ - "std %%r3, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ - ); - -#endif /* __MACH__ && __APPLE__ */ - -#elif defined(__powerpc__) || defined(__ppc__) /* end PPC64/begin PPC32 */ - -#if defined(__MACH__) && defined(__APPLE__) - -#define MULADDC_INIT \ - asm( \ - "lwz r3, %3 \n\t" \ - "lwz r4, %4 \n\t" \ - "lwz r5, %5 \n\t" \ - "lwz r6, %6 \n\t" \ - "addi r3, r3, -4 \n\t" \ - "addi r4, r4, -4 \n\t" \ - "addic r5, r5, 0 \n\t" - -#define MULADDC_CORE \ - "lwzu r7, 4(r3) \n\t" \ - "mullw r8, r7, r6 \n\t" \ - "mulhwu r9, r7, r6 \n\t" \ - "adde r8, r8, r5 \n\t" \ - "lwz r7, 4(r4) \n\t" \ - "addze r5, r9 \n\t" \ - "addc r8, r8, r7 \n\t" \ - "stwu r8, 4(r4) \n\t" - -#define MULADDC_STOP \ - "addze r5, r5 \n\t" \ - "addi r4, r4, 4 \n\t" \ - "addi r3, r3, 4 \n\t" \ - "stw r5, %0 \n\t" \ - "stw r4, %1 \n\t" \ - "stw r3, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ - ); - -#else /* __MACH__ && __APPLE__ */ - -#define MULADDC_INIT \ - asm( \ - "lwz %%r3, %3 \n\t" \ - "lwz %%r4, %4 \n\t" \ - "lwz %%r5, %5 \n\t" \ - "lwz %%r6, %6 \n\t" \ - "addi %%r3, %%r3, -4 \n\t" \ - "addi %%r4, %%r4, -4 \n\t" \ - "addic %%r5, %%r5, 0 \n\t" - -#define MULADDC_CORE \ - "lwzu %%r7, 4(%%r3) \n\t" \ - "mullw %%r8, %%r7, %%r6 \n\t" \ - "mulhwu %%r9, %%r7, %%r6 \n\t" \ - "adde %%r8, %%r8, %%r5 \n\t" \ - "lwz %%r7, 4(%%r4) \n\t" \ - "addze %%r5, %%r9 \n\t" \ - "addc %%r8, %%r8, %%r7 \n\t" \ - "stwu %%r8, 4(%%r4) \n\t" - -#define MULADDC_STOP \ - "addze %%r5, %%r5 \n\t" \ - "addi %%r4, %%r4, 4 \n\t" \ - "addi %%r3, %%r3, 4 \n\t" \ - "stw %%r5, %0 \n\t" \ - "stw %%r4, %1 \n\t" \ - "stw %%r3, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ - ); - -#endif /* __MACH__ && __APPLE__ */ - -#endif /* PPC32 */ - -/* - * The Sparc(64) assembly is reported to be broken. - * Disable it for now, until we're able to fix it. - */ -#if 0 && defined(__sparc__) -#if defined(__sparc64__) - -#define MULADDC_INIT \ - asm( \ - "ldx %3, %%o0 \n\t" \ - "ldx %4, %%o1 \n\t" \ - "ld %5, %%o2 \n\t" \ - "ld %6, %%o3 \n\t" - -#define MULADDC_CORE \ - "ld [%%o0], %%o4 \n\t" \ - "inc 4, %%o0 \n\t" \ - "ld [%%o1], %%o5 \n\t" \ - "umul %%o3, %%o4, %%o4 \n\t" \ - "addcc %%o4, %%o2, %%o4 \n\t" \ - "rd %%y, %%g1 \n\t" \ - "addx %%g1, 0, %%g1 \n\t" \ - "addcc %%o4, %%o5, %%o4 \n\t" \ - "st %%o4, [%%o1] \n\t" \ - "addx %%g1, 0, %%o2 \n\t" \ - "inc 4, %%o1 \n\t" - - #define MULADDC_STOP \ - "st %%o2, %0 \n\t" \ - "stx %%o1, %1 \n\t" \ - "stx %%o0, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "g1", "o0", "o1", "o2", "o3", "o4", \ - "o5" \ - ); - -#else /* __sparc64__ */ - -#define MULADDC_INIT \ - asm( \ - "ld %3, %%o0 \n\t" \ - "ld %4, %%o1 \n\t" \ - "ld %5, %%o2 \n\t" \ - "ld %6, %%o3 \n\t" - -#define MULADDC_CORE \ - "ld [%%o0], %%o4 \n\t" \ - "inc 4, %%o0 \n\t" \ - "ld [%%o1], %%o5 \n\t" \ - "umul %%o3, %%o4, %%o4 \n\t" \ - "addcc %%o4, %%o2, %%o4 \n\t" \ - "rd %%y, %%g1 \n\t" \ - "addx %%g1, 0, %%g1 \n\t" \ - "addcc %%o4, %%o5, %%o4 \n\t" \ - "st %%o4, [%%o1] \n\t" \ - "addx %%g1, 0, %%o2 \n\t" \ - "inc 4, %%o1 \n\t" - -#define MULADDC_STOP \ - "st %%o2, %0 \n\t" \ - "st %%o1, %1 \n\t" \ - "st %%o0, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "g1", "o0", "o1", "o2", "o3", "o4", \ - "o5" \ - ); - -#endif /* __sparc64__ */ -#endif /* __sparc__ */ - -#if defined(__microblaze__) || defined(microblaze) - -#define MULADDC_INIT \ - asm( \ - "lwi r3, %3 \n\t" \ - "lwi r4, %4 \n\t" \ - "lwi r5, %5 \n\t" \ - "lwi r6, %6 \n\t" \ - "andi r7, r6, 0xffff \n\t" \ - "bsrli r6, r6, 16 \n\t" - -#define MULADDC_CORE \ - "lhui r8, r3, 0 \n\t" \ - "addi r3, r3, 2 \n\t" \ - "lhui r9, r3, 0 \n\t" \ - "addi r3, r3, 2 \n\t" \ - "mul r10, r9, r6 \n\t" \ - "mul r11, r8, r7 \n\t" \ - "mul r12, r9, r7 \n\t" \ - "mul r13, r8, r6 \n\t" \ - "bsrli r8, r10, 16 \n\t" \ - "bsrli r9, r11, 16 \n\t" \ - "add r13, r13, r8 \n\t" \ - "add r13, r13, r9 \n\t" \ - "bslli r10, r10, 16 \n\t" \ - "bslli r11, r11, 16 \n\t" \ - "add r12, r12, r10 \n\t" \ - "addc r13, r13, r0 \n\t" \ - "add r12, r12, r11 \n\t" \ - "addc r13, r13, r0 \n\t" \ - "lwi r10, r4, 0 \n\t" \ - "add r12, r12, r10 \n\t" \ - "addc r13, r13, r0 \n\t" \ - "add r12, r12, r5 \n\t" \ - "addc r5, r13, r0 \n\t" \ - "swi r12, r4, 0 \n\t" \ - "addi r4, r4, 4 \n\t" - -#define MULADDC_STOP \ - "swi r5, %0 \n\t" \ - "swi r4, %1 \n\t" \ - "swi r3, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r3", "r4" "r5", "r6", "r7", "r8", \ - "r9", "r10", "r11", "r12", "r13" \ - ); - -#endif /* MicroBlaze */ - -#if defined(__tricore__) - -#define MULADDC_INIT \ - asm( \ - "ld.a %%a2, %3 \n\t" \ - "ld.a %%a3, %4 \n\t" \ - "ld.w %%d4, %5 \n\t" \ - "ld.w %%d1, %6 \n\t" \ - "xor %%d5, %%d5 \n\t" - -#define MULADDC_CORE \ - "ld.w %%d0, [%%a2+] \n\t" \ - "madd.u %%e2, %%e4, %%d0, %%d1 \n\t" \ - "ld.w %%d0, [%%a3] \n\t" \ - "addx %%d2, %%d2, %%d0 \n\t" \ - "addc %%d3, %%d3, 0 \n\t" \ - "mov %%d4, %%d3 \n\t" \ - "st.w [%%a3+], %%d2 \n\t" - -#define MULADDC_STOP \ - "st.w %0, %%d4 \n\t" \ - "st.a %1, %%a3 \n\t" \ - "st.a %2, %%a2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "d0", "d1", "e2", "d4", "a2", "a3" \ - ); - -#endif /* TriCore */ - -#if defined(__arm__) - -#if defined(__thumb__) && !defined(__thumb2__) - -#define MULADDC_INIT \ - asm( \ - "ldr r0, %3 \n\t" \ - "ldr r1, %4 \n\t" \ - "ldr r2, %5 \n\t" \ - "ldr r3, %6 \n\t" \ - "lsr r7, r3, #16 \n\t" \ - "mov r9, r7 \n\t" \ - "lsl r7, r3, #16 \n\t" \ - "lsr r7, r7, #16 \n\t" \ - "mov r8, r7 \n\t" - -#define MULADDC_CORE \ - "ldmia r0!, {r6} \n\t" \ - "lsr r7, r6, #16 \n\t" \ - "lsl r6, r6, #16 \n\t" \ - "lsr r6, r6, #16 \n\t" \ - "mov r4, r8 \n\t" \ - "mul r4, r6 \n\t" \ - "mov r3, r9 \n\t" \ - "mul r6, r3 \n\t" \ - "mov r5, r9 \n\t" \ - "mul r5, r7 \n\t" \ - "mov r3, r8 \n\t" \ - "mul r7, r3 \n\t" \ - "lsr r3, r6, #16 \n\t" \ - "add r5, r5, r3 \n\t" \ - "lsr r3, r7, #16 \n\t" \ - "add r5, r5, r3 \n\t" \ - "add r4, r4, r2 \n\t" \ - "mov r2, #0 \n\t" \ - "adc r5, r2 \n\t" \ - "lsl r3, r6, #16 \n\t" \ - "add r4, r4, r3 \n\t" \ - "adc r5, r2 \n\t" \ - "lsl r3, r7, #16 \n\t" \ - "add r4, r4, r3 \n\t" \ - "adc r5, r2 \n\t" \ - "ldr r3, [r1] \n\t" \ - "add r4, r4, r3 \n\t" \ - "adc r2, r5 \n\t" \ - "stmia r1!, {r4} \n\t" - -#define MULADDC_STOP \ - "str r2, %0 \n\t" \ - "str r1, %1 \n\t" \ - "str r0, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r0", "r1", "r2", "r3", "r4", "r5", \ - "r6", "r7", "r8", "r9", "cc" \ - ); - -#else - -#define MULADDC_INIT \ - asm( \ - "ldr r0, %3 \n\t" \ - "ldr r1, %4 \n\t" \ - "ldr r2, %5 \n\t" \ - "ldr r3, %6 \n\t" - -#define MULADDC_CORE \ - "ldr r4, [r0], #4 \n\t" \ - "mov r5, #0 \n\t" \ - "ldr r6, [r1] \n\t" \ - "umlal r2, r5, r3, r4 \n\t" \ - "adds r7, r6, r2 \n\t" \ - "adc r2, r5, #0 \n\t" \ - "str r7, [r1], #4 \n\t" - -#define MULADDC_STOP \ - "str r2, %0 \n\t" \ - "str r1, %1 \n\t" \ - "str r0, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "r0", "r1", "r2", "r3", "r4", "r5", \ - "r6", "r7", "cc" \ - ); - -#endif /* Thumb */ - -#endif /* ARMv3 */ - -#if defined(__alpha__) - -#define MULADDC_INIT \ - asm( \ - "ldq $1, %3 \n\t" \ - "ldq $2, %4 \n\t" \ - "ldq $3, %5 \n\t" \ - "ldq $4, %6 \n\t" - -#define MULADDC_CORE \ - "ldq $6, 0($1) \n\t" \ - "addq $1, 8, $1 \n\t" \ - "mulq $6, $4, $7 \n\t" \ - "umulh $6, $4, $6 \n\t" \ - "addq $7, $3, $7 \n\t" \ - "cmpult $7, $3, $3 \n\t" \ - "ldq $5, 0($2) \n\t" \ - "addq $7, $5, $7 \n\t" \ - "cmpult $7, $5, $5 \n\t" \ - "stq $7, 0($2) \n\t" \ - "addq $2, 8, $2 \n\t" \ - "addq $6, $3, $3 \n\t" \ - "addq $5, $3, $3 \n\t" - -#define MULADDC_STOP \ - "stq $3, %0 \n\t" \ - "stq $2, %1 \n\t" \ - "stq $1, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "$1", "$2", "$3", "$4", "$5", "$6", "$7" \ - ); -#endif /* Alpha */ - -#if defined(__mips__) && !defined(__mips64) - -#define MULADDC_INIT \ - asm( \ - "lw $10, %3 \n\t" \ - "lw $11, %4 \n\t" \ - "lw $12, %5 \n\t" \ - "lw $13, %6 \n\t" - -#define MULADDC_CORE \ - "lw $14, 0($10) \n\t" \ - "multu $13, $14 \n\t" \ - "addi $10, $10, 4 \n\t" \ - "mflo $14 \n\t" \ - "mfhi $9 \n\t" \ - "addu $14, $12, $14 \n\t" \ - "lw $15, 0($11) \n\t" \ - "sltu $12, $14, $12 \n\t" \ - "addu $15, $14, $15 \n\t" \ - "sltu $14, $15, $14 \n\t" \ - "addu $12, $12, $9 \n\t" \ - "sw $15, 0($11) \n\t" \ - "addu $12, $12, $14 \n\t" \ - "addi $11, $11, 4 \n\t" - -#define MULADDC_STOP \ - "sw $12, %0 \n\t" \ - "sw $11, %1 \n\t" \ - "sw $10, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "$9", "$10", "$11", "$12", "$13", "$14", "$15" \ - ); - -#endif /* MIPS */ -#endif /* GNUC */ - -#if (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__) - -#define MULADDC_INIT \ - __asm mov esi, s \ - __asm mov edi, d \ - __asm mov ecx, c \ - __asm mov ebx, b - -#define MULADDC_CORE \ - __asm lodsd \ - __asm mul ebx \ - __asm add eax, ecx \ - __asm adc edx, 0 \ - __asm add eax, [edi] \ - __asm adc edx, 0 \ - __asm mov ecx, edx \ - __asm stosd - -#if defined(MBEDTLS_HAVE_SSE2) - -#define EMIT __asm _emit - -#define MULADDC_HUIT \ - EMIT 0x0F EMIT 0x6E EMIT 0xC9 \ - EMIT 0x0F EMIT 0x6E EMIT 0xC3 \ - EMIT 0x0F EMIT 0x6E EMIT 0x1F \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCB \ - EMIT 0x0F EMIT 0x6E EMIT 0x16 \ - EMIT 0x0F EMIT 0xF4 EMIT 0xD0 \ - EMIT 0x0F EMIT 0x6E EMIT 0x66 EMIT 0x04 \ - EMIT 0x0F EMIT 0xF4 EMIT 0xE0 \ - EMIT 0x0F EMIT 0x6E EMIT 0x76 EMIT 0x08 \ - EMIT 0x0F EMIT 0xF4 EMIT 0xF0 \ - EMIT 0x0F EMIT 0x6E EMIT 0x7E EMIT 0x0C \ - EMIT 0x0F EMIT 0xF4 EMIT 0xF8 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCA \ - EMIT 0x0F EMIT 0x6E EMIT 0x5F EMIT 0x04 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xDC \ - EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x08 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xEE \ - EMIT 0x0F EMIT 0x6E EMIT 0x67 EMIT 0x0C \ - EMIT 0x0F EMIT 0xD4 EMIT 0xFC \ - EMIT 0x0F EMIT 0x7E EMIT 0x0F \ - EMIT 0x0F EMIT 0x6E EMIT 0x56 EMIT 0x10 \ - EMIT 0x0F EMIT 0xF4 EMIT 0xD0 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0x6E EMIT 0x66 EMIT 0x14 \ - EMIT 0x0F EMIT 0xF4 EMIT 0xE0 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCB \ - EMIT 0x0F EMIT 0x6E EMIT 0x76 EMIT 0x18 \ - EMIT 0x0F EMIT 0xF4 EMIT 0xF0 \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x04 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0x6E EMIT 0x5E EMIT 0x1C \ - EMIT 0x0F EMIT 0xF4 EMIT 0xD8 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCD \ - EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x10 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xD5 \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x08 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCF \ - EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x14 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xE5 \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x0C \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCA \ - EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x18 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xF5 \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x10 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCC \ - EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x1C \ - EMIT 0x0F EMIT 0xD4 EMIT 0xDD \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x14 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCE \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x18 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0xD4 EMIT 0xCB \ - EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x1C \ - EMIT 0x83 EMIT 0xC7 EMIT 0x20 \ - EMIT 0x83 EMIT 0xC6 EMIT 0x20 \ - EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ - EMIT 0x0F EMIT 0x7E EMIT 0xC9 - -#define MULADDC_STOP \ - EMIT 0x0F EMIT 0x77 \ - __asm mov c, ecx \ - __asm mov d, edi \ - __asm mov s, esi \ - -#else - -#define MULADDC_STOP \ - __asm mov c, ecx \ - __asm mov d, edi \ - __asm mov s, esi \ - -#endif /* SSE2 */ -#endif /* MSVC */ - -#endif /* MBEDTLS_HAVE_ASM */ - -#if !defined(MULADDC_CORE) -#if defined(MBEDTLS_HAVE_UDBL) - -#define MULADDC_INIT \ -{ \ - mbedtls_t_udbl r; \ - mbedtls_mpi_uint r0, r1; - -#define MULADDC_CORE \ - r = *(s++) * (mbedtls_t_udbl) b; \ - r0 = (mbedtls_mpi_uint) r; \ - r1 = (mbedtls_mpi_uint)( r >> biL ); \ - r0 += c; r1 += (r0 < c); \ - r0 += *d; r1 += (r0 < *d); \ - c = r1; *(d++) = r0; - -#define MULADDC_STOP \ -} - -#else -#define MULADDC_INIT \ -{ \ - mbedtls_mpi_uint s0, s1, b0, b1; \ - mbedtls_mpi_uint r0, r1, rx, ry; \ - b0 = ( b << biH ) >> biH; \ - b1 = ( b >> biH ); - -#define MULADDC_CORE \ - s0 = ( *s << biH ) >> biH; \ - s1 = ( *s >> biH ); s++; \ - rx = s0 * b1; r0 = s0 * b0; \ - ry = s1 * b0; r1 = s1 * b1; \ - r1 += ( rx >> biH ); \ - r1 += ( ry >> biH ); \ - rx <<= biH; ry <<= biH; \ - r0 += rx; r1 += (r0 < rx); \ - r0 += ry; r1 += (r0 < ry); \ - r0 += c; r1 += (r0 < c); \ - r0 += *d; r1 += (r0 < *d); \ - c = r1; *(d++) = r0; - -#define MULADDC_STOP \ -} - -#endif /* C (generic) */ -#endif /* C (longlong) */ - -#endif /* bn_mul.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/camellia.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/camellia.h deleted file mode 100644 index 0424d623fb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/camellia.h +++ /dev/null @@ -1,235 +0,0 @@ -/** - * \file camellia.h - * - * \brief Camellia block cipher - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_CAMELLIA_H -#define MBEDTLS_CAMELLIA_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#define MBEDTLS_CAMELLIA_ENCRYPT 1 -#define MBEDTLS_CAMELLIA_DECRYPT 0 - -#define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024 /**< Invalid key length. */ -#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 /**< Invalid data input length. */ - -#if !defined(MBEDTLS_CAMELLIA_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief CAMELLIA context structure - */ -typedef struct -{ - int nr; /*!< number of rounds */ - uint32_t rk[68]; /*!< CAMELLIA round keys */ -} -mbedtls_camellia_context; - -/** - * \brief Initialize CAMELLIA context - * - * \param ctx CAMELLIA context to be initialized - */ -void mbedtls_camellia_init( mbedtls_camellia_context *ctx ); - -/** - * \brief Clear CAMELLIA context - * - * \param ctx CAMELLIA context to be cleared - */ -void mbedtls_camellia_free( mbedtls_camellia_context *ctx ); - -/** - * \brief CAMELLIA key schedule (encryption) - * - * \param ctx CAMELLIA context to be initialized - * \param key encryption key - * \param keybits must be 128, 192 or 256 - * - * \return 0 if successful, or MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH - */ -int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned char *key, - unsigned int keybits ); - -/** - * \brief CAMELLIA key schedule (decryption) - * - * \param ctx CAMELLIA context to be initialized - * \param key decryption key - * \param keybits must be 128, 192 or 256 - * - * \return 0 if successful, or MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH - */ -int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx, const unsigned char *key, - unsigned int keybits ); - -/** - * \brief CAMELLIA-ECB block encryption/decryption - * - * \param ctx CAMELLIA context - * \param mode MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT - * \param input 16-byte input block - * \param output 16-byte output block - * - * \return 0 if successful - */ -int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/** - * \brief CAMELLIA-CBC buffer encryption/decryption - * Length should be a multiple of the block - * size (16 bytes) - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx CAMELLIA context - * \param mode MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful, or - * MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH - */ -int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/** - * \brief CAMELLIA-CFB128 buffer encryption/decryption - * - * Note: Due to the nature of CFB you should use the same key schedule for - * both encryption and decryption. So a context initialized with - * mbedtls_camellia_setkey_enc() for both MBEDTLS_CAMELLIA_ENCRYPT and CAMELLIE_DECRYPT. - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx CAMELLIA context - * \param mode MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT - * \param length length of the input data - * \param iv_off offset in IV (updated after use) - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful, or - * MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH - */ -int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx, - int mode, - size_t length, - size_t *iv_off, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/** - * \brief CAMELLIA-CTR buffer encryption/decryption - * - * Warning: You have to keep the maximum use of your counter in mind! - * - * Note: Due to the nature of CTR you should use the same key schedule for - * both encryption and decryption. So a context initialized with - * mbedtls_camellia_setkey_enc() for both MBEDTLS_CAMELLIA_ENCRYPT and MBEDTLS_CAMELLIA_DECRYPT. - * - * \param ctx CAMELLIA context - * \param length The length of the data - * \param nc_off The offset in the current stream_block (for resuming - * within current cipher stream). The offset pointer to - * should be 0 at the start of a stream. - * \param nonce_counter The 128-bit nonce and counter. - * \param stream_block The saved stream-block for resuming. Is overwritten - * by the function. - * \param input The input data stream - * \param output The output data stream - * - * \return 0 if successful - */ -int mbedtls_camellia_crypt_ctr( mbedtls_camellia_context *ctx, - size_t length, - size_t *nc_off, - unsigned char nonce_counter[16], - unsigned char stream_block[16], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_CAMELLIA_ALT */ -#include "camellia_alt.h" -#endif /* MBEDTLS_CAMELLIA_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_camellia_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* camellia.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ccm.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ccm.h deleted file mode 100644 index ef75839baa..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ccm.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * \file ccm.h - * - * \brief Counter with CBC-MAC (CCM) for 128-bit block ciphers - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_CCM_H -#define MBEDTLS_CCM_H - -#include "cipher.h" - -#define MBEDTLS_ERR_CCM_BAD_INPUT -0x000D /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_CCM_AUTH_FAILED -0x000F /**< Authenticated decryption failed. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief CCM context structure - */ -typedef struct { - mbedtls_cipher_context_t cipher_ctx; /*!< cipher context used */ -} -mbedtls_ccm_context; - -/** - * \brief Initialize CCM context (just makes references valid) - * Makes the context ready for mbedtls_ccm_setkey() or - * mbedtls_ccm_free(). - * - * \param ctx CCM context to initialize - */ -void mbedtls_ccm_init( mbedtls_ccm_context *ctx ); - -/** - * \brief CCM initialization (encryption and decryption) - * - * \param ctx CCM context to be initialized - * \param cipher cipher to use (a 128-bit block cipher) - * \param key encryption key - * \param keybits key size in bits (must be acceptable by the cipher) - * - * \return 0 if successful, or a cipher specific error code - */ -int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx, - mbedtls_cipher_id_t cipher, - const unsigned char *key, - unsigned int keybits ); - -/** - * \brief Free a CCM context and underlying cipher sub-context - * - * \param ctx CCM context to free - */ -void mbedtls_ccm_free( mbedtls_ccm_context *ctx ); - -/** - * \brief CCM buffer encryption - * - * \param ctx CCM context - * \param length length of the input data in bytes - * \param iv nonce (initialization vector) - * \param iv_len length of IV in bytes - * must be 2, 3, 4, 5, 6, 7 or 8 - * \param add additional data - * \param add_len length of additional data in bytes - * must be less than 2^16 - 2^8 - * \param input buffer holding the input data - * \param output buffer for holding the output data - * must be at least 'length' bytes wide - * \param tag buffer for holding the tag - * \param tag_len length of the tag to generate in bytes - * must be 4, 6, 8, 10, 14 or 16 - * - * \note The tag is written to a separate buffer. To get the tag - * concatenated with the output as in the CCM spec, use - * tag = output + length and make sure the output buffer is - * at least length + tag_len wide. - * - * \return 0 if successful - */ -int mbedtls_ccm_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length, - const unsigned char *iv, size_t iv_len, - const unsigned char *add, size_t add_len, - const unsigned char *input, unsigned char *output, - unsigned char *tag, size_t tag_len ); - -/** - * \brief CCM buffer authenticated decryption - * - * \param ctx CCM context - * \param length length of the input data - * \param iv initialization vector - * \param iv_len length of IV - * \param add additional data - * \param add_len length of additional data - * \param input buffer holding the input data - * \param output buffer for holding the output data - * \param tag buffer holding the tag - * \param tag_len length of the tag - * - * \return 0 if successful and authenticated, - * MBEDTLS_ERR_CCM_AUTH_FAILED if tag does not match - */ -int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length, - const unsigned char *iv, size_t iv_len, - const unsigned char *add, size_t add_len, - const unsigned char *input, unsigned char *output, - const unsigned char *tag, size_t tag_len ); - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_ccm_self_test( int verbose ); -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_CCM_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/certs.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/certs.h deleted file mode 100644 index ca49086e4f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/certs.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * \file certs.h - * - * \brief Sample certificates and DHM parameters for testing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_CERTS_H -#define MBEDTLS_CERTS_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(MBEDTLS_PEM_PARSE_C) -/* Concatenation of all CA certificates in PEM format if available */ -extern const char mbedtls_test_cas_pem[]; -extern const size_t mbedtls_test_cas_pem_len; -#endif - -/* List of all CA certificates, terminated by NULL */ -extern const char * mbedtls_test_cas[]; -extern const size_t mbedtls_test_cas_len[]; - -/* - * Convenience for users who just want a certificate: - * RSA by default, or ECDSA if RSA is not available - */ -extern const char * mbedtls_test_ca_crt; -extern const size_t mbedtls_test_ca_crt_len; -extern const char * mbedtls_test_ca_key; -extern const size_t mbedtls_test_ca_key_len; -extern const char * mbedtls_test_ca_pwd; -extern const size_t mbedtls_test_ca_pwd_len; -extern const char * mbedtls_test_srv_crt; -extern const size_t mbedtls_test_srv_crt_len; -extern const char * mbedtls_test_srv_key; -extern const size_t mbedtls_test_srv_key_len; -extern const char * mbedtls_test_cli_crt; -extern const size_t mbedtls_test_cli_crt_len; -extern const char * mbedtls_test_cli_key; -extern const size_t mbedtls_test_cli_key_len; - -#if defined(MBEDTLS_ECDSA_C) -extern const char mbedtls_test_ca_crt_ec[]; -extern const size_t mbedtls_test_ca_crt_ec_len; -extern const char mbedtls_test_ca_key_ec[]; -extern const size_t mbedtls_test_ca_key_ec_len; -extern const char mbedtls_test_ca_pwd_ec[]; -extern const size_t mbedtls_test_ca_pwd_ec_len; -extern const char mbedtls_test_srv_crt_ec[]; -extern const size_t mbedtls_test_srv_crt_ec_len; -extern const char mbedtls_test_srv_key_ec[]; -extern const size_t mbedtls_test_srv_key_ec_len; -extern const char mbedtls_test_cli_crt_ec[]; -extern const size_t mbedtls_test_cli_crt_ec_len; -extern const char mbedtls_test_cli_key_ec[]; -extern const size_t mbedtls_test_cli_key_ec_len; -#endif - -#if defined(MBEDTLS_RSA_C) -extern const char mbedtls_test_ca_crt_rsa[]; -extern const size_t mbedtls_test_ca_crt_rsa_len; -extern const char mbedtls_test_ca_key_rsa[]; -extern const size_t mbedtls_test_ca_key_rsa_len; -extern const char mbedtls_test_ca_pwd_rsa[]; -extern const size_t mbedtls_test_ca_pwd_rsa_len; -extern const char mbedtls_test_srv_crt_rsa[]; -extern const size_t mbedtls_test_srv_crt_rsa_len; -extern const char mbedtls_test_srv_key_rsa[]; -extern const size_t mbedtls_test_srv_key_rsa_len; -extern const char mbedtls_test_cli_crt_rsa[]; -extern const size_t mbedtls_test_cli_crt_rsa_len; -extern const char mbedtls_test_cli_key_rsa[]; -extern const size_t mbedtls_test_cli_key_rsa_len; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* certs.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/check_config.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/check_config.h deleted file mode 100644 index b6448ecef9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/check_config.h +++ /dev/null @@ -1,540 +0,0 @@ -/** - * \file check_config.h - * - * \brief Consistency checks for configuration options - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * It is recommended to include this file from your config.h - * in order to catch dependency issues early. - */ - -#ifndef MBEDTLS_CHECK_CONFIG_H -#define MBEDTLS_CHECK_CONFIG_H - -/* - * We assume CHAR_BIT is 8 in many places. In practice, this is true on our - * target platforms, so not an issue, but let's just be extra sure. - */ -#include -#if CHAR_BIT != 8 -#error "mbed TLS requires a platform with 8-bit chars" -#endif - -#if defined(_WIN32) -#if !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_C is required on Windows" -#endif - -/* Fix the config here. Not convenient to put an #ifdef _WIN32 in config.h as - * it would confuse config.pl. */ -#if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \ - !defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) -#define MBEDTLS_PLATFORM_SNPRINTF_ALT -#endif -#endif /* _WIN32 */ - -#if defined(TARGET_LIKE_MBED) && \ - ( defined(MBEDTLS_NET_C) || defined(MBEDTLS_TIMING_C) ) -#error "The NET and TIMING modules are not available for mbed OS - please use the network and timing functions provided by mbed OS" -#endif - -#if defined(MBEDTLS_DEPRECATED_WARNING) && \ - !defined(__GNUC__) && !defined(__clang__) -#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang" -#endif - -#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME) -#error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense" -#endif - -#if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM) -#error "MBEDTLS_AESNI_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C) -#error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_DHM_C) && !defined(MBEDTLS_BIGNUM_C) -#error "MBEDTLS_DHM_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ECDH_C) && !defined(MBEDTLS_ECP_C) -#error "MBEDTLS_ECDH_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ECDSA_C) && \ - ( !defined(MBEDTLS_ECP_C) || \ - !defined(MBEDTLS_ASN1_PARSE_C) || \ - !defined(MBEDTLS_ASN1_WRITE_C) ) -#error "MBEDTLS_ECDSA_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ECJPAKE_C) && \ - ( !defined(MBEDTLS_ECP_C) || !defined(MBEDTLS_MD_C) ) -#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C) -#error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ECP_C) && ( !defined(MBEDTLS_BIGNUM_C) || ( \ - !defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) && \ - !defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) ) -#error "MBEDTLS_ECP_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ENTROPY_C) && (!defined(MBEDTLS_SHA512_C) && \ - !defined(MBEDTLS_SHA256_C)) -#error "MBEDTLS_ENTROPY_C defined, but not all prerequisites" -#endif -#if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_SHA512_C) && \ - defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 64) -#error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high" -#endif -#if defined(MBEDTLS_ENTROPY_C) && \ - ( !defined(MBEDTLS_SHA512_C) || defined(MBEDTLS_ENTROPY_FORCE_SHA256) ) \ - && defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 32) -#error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high" -#endif -#if defined(MBEDTLS_ENTROPY_C) && \ - defined(MBEDTLS_ENTROPY_FORCE_SHA256) && !defined(MBEDTLS_SHA256_C) -#error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_GCM_C) && ( \ - !defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) ) -#error "MBEDTLS_GCM_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_HAVEGE_C) && !defined(MBEDTLS_TIMING_C) -#error "MBEDTLS_HAVEGE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) && !defined(MBEDTLS_MD_C) -#error "MBEDTLS_HMAC_DRBG_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \ - ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) ) -#error "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \ - ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) ) -#error "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(MBEDTLS_DHM_C) -#error "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \ - !defined(MBEDTLS_ECDH_C) -#error "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ - ( !defined(MBEDTLS_DHM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_PKCS1_V15) ) -#error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ - ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_PKCS1_V15) ) -#error "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \ - ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_ECDSA_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) ) -#error "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ - ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \ - !defined(MBEDTLS_PKCS1_V15) ) -#error "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ - ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \ - !defined(MBEDTLS_PKCS1_V15) ) -#error "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \ - ( !defined(MBEDTLS_ECJPAKE_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) ) -#error "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) -#error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM) -#error "MBEDTLS_PADLOCK_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PEM_PARSE_C) && !defined(MBEDTLS_BASE64_C) -#error "MBEDTLS_PEM_PARSE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PEM_WRITE_C) && !defined(MBEDTLS_BASE64_C) -#error "MBEDTLS_PEM_WRITE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PK_C) && \ - ( !defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_ECP_C) ) -#error "MBEDTLS_PK_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_PK_C) -#error "MBEDTLS_PK_PARSE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PK_WRITE_C) && !defined(MBEDTLS_PK_C) -#error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PKCS11_C) && !defined(MBEDTLS_PK_C) -#error "MBEDTLS_PKCS11_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_EXIT_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_EXIT_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_EXIT) ||\ - defined(MBEDTLS_PLATFORM_EXIT_ALT) ) -#error "MBEDTLS_PLATFORM_EXIT_MACRO and MBEDTLS_PLATFORM_STD_EXIT/MBEDTLS_PLATFORM_EXIT_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_FPRINTF_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_FPRINTF) ||\ - defined(MBEDTLS_PLATFORM_FPRINTF_ALT) ) -#error "MBEDTLS_PLATFORM_FPRINTF_MACRO and MBEDTLS_PLATFORM_STD_FPRINTF/MBEDTLS_PLATFORM_FPRINTF_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) -#error "MBEDTLS_PLATFORM_FREE_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\ - defined(MBEDTLS_PLATFORM_STD_FREE) -#error "MBEDTLS_PLATFORM_FREE_MACRO and MBEDTLS_PLATFORM_STD_FREE cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) && !defined(MBEDTLS_PLATFORM_CALLOC_MACRO) -#error "MBEDTLS_PLATFORM_CALLOC_MACRO must be defined if MBEDTLS_PLATFORM_FREE_MACRO is" -#endif - -#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) -#error "MBEDTLS_PLATFORM_CALLOC_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\ - defined(MBEDTLS_PLATFORM_STD_CALLOC) -#error "MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_STD_CALLOC cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) && !defined(MBEDTLS_PLATFORM_FREE_MACRO) -#error "MBEDTLS_PLATFORM_FREE_MACRO must be defined if MBEDTLS_PLATFORM_CALLOC_MACRO is" -#endif - -#if defined(MBEDTLS_PLATFORM_MEMORY) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_MEMORY defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_PRINTF_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_PRINTF_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_PRINTF) ||\ - defined(MBEDTLS_PLATFORM_PRINTF_ALT) ) -#error "MBEDTLS_PLATFORM_PRINTF_MACRO and MBEDTLS_PLATFORM_STD_PRINTF/MBEDTLS_PLATFORM_PRINTF_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_SNPRINTF) ||\ - defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) ) -#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ - !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) -#error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY) -#error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY) -#error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_FREE) && !defined(MBEDTLS_PLATFORM_MEMORY) -#error "MBEDTLS_PLATFORM_STD_FREE defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_EXIT) &&\ - !defined(MBEDTLS_PLATFORM_EXIT_ALT) -#error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_FPRINTF) &&\ - !defined(MBEDTLS_PLATFORM_FPRINTF_ALT) -#error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_PRINTF) &&\ - !defined(MBEDTLS_PLATFORM_PRINTF_ALT) -#error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_SNPRINTF) &&\ - !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) -#error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ - !defined(MBEDTLS_OID_C) ) -#error "MBEDTLS_RSA_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) && \ - ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_PKCS1_V21) ) -#error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_PROTO_SSL3) && ( !defined(MBEDTLS_MD5_C) || \ - !defined(MBEDTLS_SHA1_C) ) -#error "MBEDTLS_SSL_PROTO_SSL3 defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1) && ( !defined(MBEDTLS_MD5_C) || \ - !defined(MBEDTLS_SHA1_C) ) -#error "MBEDTLS_SSL_PROTO_TLS1 defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) && ( !defined(MBEDTLS_MD5_C) || \ - !defined(MBEDTLS_SHA1_C) ) -#error "MBEDTLS_SSL_PROTO_TLS1_1 defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && ( !defined(MBEDTLS_SHA1_C) && \ - !defined(MBEDTLS_SHA256_C) && !defined(MBEDTLS_SHA512_C) ) -#error "MBEDTLS_SSL_PROTO_TLS1_2 defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_PROTO_DTLS) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_2) -#error "MBEDTLS_SSL_PROTO_DTLS defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_CLI_C) && !defined(MBEDTLS_SSL_TLS_C) -#error "MBEDTLS_SSL_CLI_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) && ( !defined(MBEDTLS_CIPHER_C) || \ - !defined(MBEDTLS_MD_C) ) -#error "MBEDTLS_SSL_TLS_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_TLS_C) -#error "MBEDTLS_SSL_SRV_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) && (!defined(MBEDTLS_SSL_PROTO_SSL3) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1) && !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_2)) -#error "MBEDTLS_SSL_TLS_C defined, but no protocols are active" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_SSL3) && \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) && !defined(MBEDTLS_SSL_PROTO_TLS1)) -#error "Illegal protocol selection" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_TLS1) && \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) && !defined(MBEDTLS_SSL_PROTO_TLS1_1)) -#error "Illegal protocol selection" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_SSL3) && \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) && (!defined(MBEDTLS_SSL_PROTO_TLS1) || \ - !defined(MBEDTLS_SSL_PROTO_TLS1_1))) -#error "Illegal protocol selection" -#endif - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && !defined(MBEDTLS_SSL_PROTO_DTLS) -#error "MBEDTLS_SSL_DTLS_HELLO_VERIFY defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && \ - !defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) -#error "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) && \ - ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) ) -#error "MBEDTLS_SSL_DTLS_ANTI_REPLAY defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) && \ - ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) ) -#error "MBEDTLS_SSL_DTLS_BADMAC_LIMIT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_2) -#error "MBEDTLS_SSL_ENCRYPT_THEN_MAC defined, but not all prerequsites" -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ - !defined(MBEDTLS_SSL_PROTO_TLS1_2) -#error "MBEDTLS_SSL_EXTENDED_MASTER_SECRET defined, but not all prerequsites" -#endif - -#if defined(MBEDTLS_SSL_TICKET_C) && !defined(MBEDTLS_CIPHER_C) -#error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \ - !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1) -#error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) && \ - !defined(MBEDTLS_X509_CRT_PARSE_C) -#error "MBEDTLS_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_THREADING_PTHREAD) -#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL) -#error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites" -#endif -#define MBEDTLS_THREADING_IMPL -#endif - -#if defined(MBEDTLS_THREADING_ALT) -#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL) -#error "MBEDTLS_THREADING_ALT defined, but not all prerequisites" -#endif -#define MBEDTLS_THREADING_IMPL -#endif - -#if defined(MBEDTLS_THREADING_C) && !defined(MBEDTLS_THREADING_IMPL) -#error "MBEDTLS_THREADING_C defined, single threading implementation required" -#endif -#undef MBEDTLS_THREADING_IMPL - -#if defined(MBEDTLS_VERSION_FEATURES) && !defined(MBEDTLS_VERSION_C) -#error "MBEDTLS_VERSION_FEATURES defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_USE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ - !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_PARSE_C) || \ - !defined(MBEDTLS_PK_PARSE_C) ) -#error "MBEDTLS_X509_USE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_CREATE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ - !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_WRITE_C) || \ - !defined(MBEDTLS_PK_WRITE_C) ) -#error "MBEDTLS_X509_CREATE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) ) -#error "MBEDTLS_X509_CRT_PARSE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_CRL_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) ) -#error "MBEDTLS_X509_CRL_PARSE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_CSR_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) ) -#error "MBEDTLS_X509_CSR_PARSE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_CRT_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) ) -#error "MBEDTLS_X509_CRT_WRITE_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_X509_CSR_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) ) -#error "MBEDTLS_X509_CSR_WRITE_C defined, but not all prerequisites" -#endif - -/* - * Avoid warning from -pedantic. This is a convenient place for this - * workaround since this is included by every single file before the - * #if defined(MBEDTLS_xxx_C) that results in emtpy translation units. - */ -typedef int mbedtls_iso_c_forbids_empty_translation_units; - -#endif /* MBEDTLS_CHECK_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher.h deleted file mode 100644 index 70000f5e61..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher.h +++ /dev/null @@ -1,698 +0,0 @@ -/** - * \file cipher.h - * - * \brief Generic cipher wrapper. - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#ifndef MBEDTLS_CIPHER_H -#define MBEDTLS_CIPHER_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) -#define MBEDTLS_CIPHER_MODE_AEAD -#endif - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#define MBEDTLS_CIPHER_MODE_WITH_PADDING -#endif - -#if defined(MBEDTLS_ARC4_C) -#define MBEDTLS_CIPHER_MODE_STREAM -#endif - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -#define MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE -0x6080 /**< The selected feature is not available. */ -#define MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA -0x6100 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_CIPHER_ALLOC_FAILED -0x6180 /**< Failed to allocate memory. */ -#define MBEDTLS_ERR_CIPHER_INVALID_PADDING -0x6200 /**< Input data contains invalid padding and is rejected. */ -#define MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED -0x6280 /**< Decryption of block requires a full block. */ -#define MBEDTLS_ERR_CIPHER_AUTH_FAILED -0x6300 /**< Authentication failed (for AEAD modes). */ - -#define MBEDTLS_CIPHER_VARIABLE_IV_LEN 0x01 /**< Cipher accepts IVs of variable length */ -#define MBEDTLS_CIPHER_VARIABLE_KEY_LEN 0x02 /**< Cipher accepts keys of variable length */ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - MBEDTLS_CIPHER_ID_NONE = 0, - MBEDTLS_CIPHER_ID_NULL, - MBEDTLS_CIPHER_ID_AES, - MBEDTLS_CIPHER_ID_DES, - MBEDTLS_CIPHER_ID_3DES, - MBEDTLS_CIPHER_ID_CAMELLIA, - MBEDTLS_CIPHER_ID_BLOWFISH, - MBEDTLS_CIPHER_ID_ARC4, -} mbedtls_cipher_id_t; - -typedef enum { - MBEDTLS_CIPHER_NONE = 0, - MBEDTLS_CIPHER_NULL, - MBEDTLS_CIPHER_AES_128_ECB, - MBEDTLS_CIPHER_AES_192_ECB, - MBEDTLS_CIPHER_AES_256_ECB, - MBEDTLS_CIPHER_AES_128_CBC, - MBEDTLS_CIPHER_AES_192_CBC, - MBEDTLS_CIPHER_AES_256_CBC, - MBEDTLS_CIPHER_AES_128_CFB128, - MBEDTLS_CIPHER_AES_192_CFB128, - MBEDTLS_CIPHER_AES_256_CFB128, - MBEDTLS_CIPHER_AES_128_CTR, - MBEDTLS_CIPHER_AES_192_CTR, - MBEDTLS_CIPHER_AES_256_CTR, - MBEDTLS_CIPHER_AES_128_GCM, - MBEDTLS_CIPHER_AES_192_GCM, - MBEDTLS_CIPHER_AES_256_GCM, - MBEDTLS_CIPHER_CAMELLIA_128_ECB, - MBEDTLS_CIPHER_CAMELLIA_192_ECB, - MBEDTLS_CIPHER_CAMELLIA_256_ECB, - MBEDTLS_CIPHER_CAMELLIA_128_CBC, - MBEDTLS_CIPHER_CAMELLIA_192_CBC, - MBEDTLS_CIPHER_CAMELLIA_256_CBC, - MBEDTLS_CIPHER_CAMELLIA_128_CFB128, - MBEDTLS_CIPHER_CAMELLIA_192_CFB128, - MBEDTLS_CIPHER_CAMELLIA_256_CFB128, - MBEDTLS_CIPHER_CAMELLIA_128_CTR, - MBEDTLS_CIPHER_CAMELLIA_192_CTR, - MBEDTLS_CIPHER_CAMELLIA_256_CTR, - MBEDTLS_CIPHER_CAMELLIA_128_GCM, - MBEDTLS_CIPHER_CAMELLIA_192_GCM, - MBEDTLS_CIPHER_CAMELLIA_256_GCM, - MBEDTLS_CIPHER_DES_ECB, - MBEDTLS_CIPHER_DES_CBC, - MBEDTLS_CIPHER_DES_EDE_ECB, - MBEDTLS_CIPHER_DES_EDE_CBC, - MBEDTLS_CIPHER_DES_EDE3_ECB, - MBEDTLS_CIPHER_DES_EDE3_CBC, - MBEDTLS_CIPHER_BLOWFISH_ECB, - MBEDTLS_CIPHER_BLOWFISH_CBC, - MBEDTLS_CIPHER_BLOWFISH_CFB64, - MBEDTLS_CIPHER_BLOWFISH_CTR, - MBEDTLS_CIPHER_ARC4_128, - MBEDTLS_CIPHER_AES_128_CCM, - MBEDTLS_CIPHER_AES_192_CCM, - MBEDTLS_CIPHER_AES_256_CCM, - MBEDTLS_CIPHER_CAMELLIA_128_CCM, - MBEDTLS_CIPHER_CAMELLIA_192_CCM, - MBEDTLS_CIPHER_CAMELLIA_256_CCM, -} mbedtls_cipher_type_t; - -typedef enum { - MBEDTLS_MODE_NONE = 0, - MBEDTLS_MODE_ECB, - MBEDTLS_MODE_CBC, - MBEDTLS_MODE_CFB, - MBEDTLS_MODE_OFB, /* Unused! */ - MBEDTLS_MODE_CTR, - MBEDTLS_MODE_GCM, - MBEDTLS_MODE_STREAM, - MBEDTLS_MODE_CCM, -} mbedtls_cipher_mode_t; - -typedef enum { - MBEDTLS_PADDING_PKCS7 = 0, /**< PKCS7 padding (default) */ - MBEDTLS_PADDING_ONE_AND_ZEROS, /**< ISO/IEC 7816-4 padding */ - MBEDTLS_PADDING_ZEROS_AND_LEN, /**< ANSI X.923 padding */ - MBEDTLS_PADDING_ZEROS, /**< zero padding (not reversible!) */ - MBEDTLS_PADDING_NONE, /**< never pad (full blocks only) */ -} mbedtls_cipher_padding_t; - -typedef enum { - MBEDTLS_OPERATION_NONE = -1, - MBEDTLS_DECRYPT = 0, - MBEDTLS_ENCRYPT, -} mbedtls_operation_t; - -enum { - /** Undefined key length */ - MBEDTLS_KEY_LENGTH_NONE = 0, - /** Key length, in bits (including parity), for DES keys */ - MBEDTLS_KEY_LENGTH_DES = 64, - /** Key length, in bits (including parity), for DES in two key EDE */ - MBEDTLS_KEY_LENGTH_DES_EDE = 128, - /** Key length, in bits (including parity), for DES in three-key EDE */ - MBEDTLS_KEY_LENGTH_DES_EDE3 = 192, -}; - -/** Maximum length of any IV, in bytes */ -#define MBEDTLS_MAX_IV_LENGTH 16 -/** Maximum block size of any cipher, in bytes */ -#define MBEDTLS_MAX_BLOCK_LENGTH 16 - -/** - * Base cipher information (opaque struct). - */ -typedef struct mbedtls_cipher_base_t mbedtls_cipher_base_t; - -/** - * Cipher information. Allows cipher functions to be called in a generic way. - */ -typedef struct { - /** Full cipher identifier (e.g. MBEDTLS_CIPHER_AES_256_CBC) */ - mbedtls_cipher_type_t type; - - /** Cipher mode (e.g. MBEDTLS_MODE_CBC) */ - mbedtls_cipher_mode_t mode; - - /** Cipher key length, in bits (default length for variable sized ciphers) - * (Includes parity bits for ciphers like DES) */ - unsigned int key_bitlen; - - /** Name of the cipher */ - const char * name; - - /** IV/NONCE size, in bytes. - * For cipher that accept many sizes: recommended size */ - unsigned int iv_size; - - /** Flags for variable IV size, variable key size, etc. */ - int flags; - - /** block size, in bytes */ - unsigned int block_size; - - /** Base cipher information and functions */ - const mbedtls_cipher_base_t *base; - -} mbedtls_cipher_info_t; - -/** - * Generic cipher context. - */ -typedef struct { - /** Information about the associated cipher */ - const mbedtls_cipher_info_t *cipher_info; - - /** Key length to use */ - int key_bitlen; - - /** Operation that the context's key has been initialised for */ - mbedtls_operation_t operation; - -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) - /** Padding functions to use, if relevant for cipher mode */ - void (*add_padding)( unsigned char *output, size_t olen, size_t data_len ); - int (*get_padding)( unsigned char *input, size_t ilen, size_t *data_len ); -#endif - - /** Buffer for data that hasn't been encrypted yet */ - unsigned char unprocessed_data[MBEDTLS_MAX_BLOCK_LENGTH]; - - /** Number of bytes that still need processing */ - size_t unprocessed_len; - - /** Current IV or NONCE_COUNTER for CTR-mode */ - unsigned char iv[MBEDTLS_MAX_IV_LENGTH]; - - /** IV size in bytes (for ciphers with variable-length IVs) */ - size_t iv_size; - - /** Cipher-specific context */ - void *cipher_ctx; -} mbedtls_cipher_context_t; - -/** - * \brief Returns the list of ciphers supported by the generic cipher module. - * - * \return a statically allocated array of ciphers, the last entry - * is 0. - */ -const int *mbedtls_cipher_list( void ); - -/** - * \brief Returns the cipher information structure associated - * with the given cipher name. - * - * \param cipher_name Name of the cipher to search for. - * - * \return the cipher information structure associated with the - * given cipher_name, or NULL if not found. - */ -const mbedtls_cipher_info_t *mbedtls_cipher_info_from_string( const char *cipher_name ); - -/** - * \brief Returns the cipher information structure associated - * with the given cipher type. - * - * \param cipher_type Type of the cipher to search for. - * - * \return the cipher information structure associated with the - * given cipher_type, or NULL if not found. - */ -const mbedtls_cipher_info_t *mbedtls_cipher_info_from_type( const mbedtls_cipher_type_t cipher_type ); - -/** - * \brief Returns the cipher information structure associated - * with the given cipher id, key size and mode. - * - * \param cipher_id Id of the cipher to search for - * (e.g. MBEDTLS_CIPHER_ID_AES) - * \param key_bitlen Length of the key in bits - * \param mode Cipher mode (e.g. MBEDTLS_MODE_CBC) - * - * \return the cipher information structure associated with the - * given cipher_type, or NULL if not found. - */ -const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values( const mbedtls_cipher_id_t cipher_id, - int key_bitlen, - const mbedtls_cipher_mode_t mode ); - -/** - * \brief Initialize a cipher_context (as NONE) - */ -void mbedtls_cipher_init( mbedtls_cipher_context_t *ctx ); - -/** - * \brief Free and clear the cipher-specific context of ctx. - * Freeing ctx itself remains the responsibility of the - * caller. - */ -void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx ); - -/** - * \brief Initialises and fills the cipher context structure with - * the appropriate values. - * - * \note Currently also clears structure. In future versions you - * will be required to call mbedtls_cipher_init() on the structure - * first. - * - * \param ctx context to initialise. May not be NULL. - * \param cipher_info cipher to use. - * - * \return 0 on success, - * MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on parameter failure, - * MBEDTLS_ERR_CIPHER_ALLOC_FAILED if allocation of the - * cipher-specific context failed. - */ -int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx, const mbedtls_cipher_info_t *cipher_info ); - -/** - * \brief Returns the block size of the given cipher. - * - * \param ctx cipher's context. Must have been initialised. - * - * \return size of the cipher's blocks, or 0 if ctx has not been - * initialised. - */ -static inline unsigned int mbedtls_cipher_get_block_size( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return 0; - - return ctx->cipher_info->block_size; -} - -/** - * \brief Returns the mode of operation for the cipher. - * (e.g. MBEDTLS_MODE_CBC) - * - * \param ctx cipher's context. Must have been initialised. - * - * \return mode of operation, or MBEDTLS_MODE_NONE if ctx - * has not been initialised. - */ -static inline mbedtls_cipher_mode_t mbedtls_cipher_get_cipher_mode( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return MBEDTLS_MODE_NONE; - - return ctx->cipher_info->mode; -} - -/** - * \brief Returns the size of the cipher's IV/NONCE in bytes. - * - * \param ctx cipher's context. Must have been initialised. - * - * \return If IV has not been set yet: (recommended) IV size - * (0 for ciphers not using IV/NONCE). - * If IV has already been set: actual size. - */ -static inline int mbedtls_cipher_get_iv_size( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return 0; - - if( ctx->iv_size != 0 ) - return (int) ctx->iv_size; - - return (int) ctx->cipher_info->iv_size; -} - -/** - * \brief Returns the type of the given cipher. - * - * \param ctx cipher's context. Must have been initialised. - * - * \return type of the cipher, or MBEDTLS_CIPHER_NONE if ctx has - * not been initialised. - */ -static inline mbedtls_cipher_type_t mbedtls_cipher_get_type( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return MBEDTLS_CIPHER_NONE; - - return ctx->cipher_info->type; -} - -/** - * \brief Returns the name of the given cipher, as a string. - * - * \param ctx cipher's context. Must have been initialised. - * - * \return name of the cipher, or NULL if ctx was not initialised. - */ -static inline const char *mbedtls_cipher_get_name( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return 0; - - return ctx->cipher_info->name; -} - -/** - * \brief Returns the key length of the cipher. - * - * \param ctx cipher's context. Must have been initialised. - * - * \return cipher's key length, in bits, or - * MBEDTLS_KEY_LENGTH_NONE if ctx has not been - * initialised. - */ -static inline int mbedtls_cipher_get_key_bitlen( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return MBEDTLS_KEY_LENGTH_NONE; - - return (int) ctx->cipher_info->key_bitlen; -} - -/** - * \brief Returns the operation of the given cipher. - * - * \param ctx cipher's context. Must have been initialised. - * - * \return operation (MBEDTLS_ENCRYPT or MBEDTLS_DECRYPT), - * or MBEDTLS_OPERATION_NONE if ctx has not been - * initialised. - */ -static inline mbedtls_operation_t mbedtls_cipher_get_operation( const mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return MBEDTLS_OPERATION_NONE; - - return ctx->operation; -} - -/** - * \brief Set the key to use with the given context. - * - * \param ctx generic cipher context. May not be NULL. Must have been - * initialised using cipher_context_from_type or - * cipher_context_from_string. - * \param key The key to use. - * \param key_bitlen key length to use, in bits. - * \param operation Operation that the key will be used for, either - * MBEDTLS_ENCRYPT or MBEDTLS_DECRYPT. - * - * \returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if - * parameter verification fails or a cipher specific - * error code. - */ -int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *key, - int key_bitlen, const mbedtls_operation_t operation ); - -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) -/** - * \brief Set padding mode, for cipher modes that use padding. - * (Default: PKCS7 padding.) - * - * \param ctx generic cipher context - * \param mode padding mode - * - * \returns 0 on success, MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE - * if selected padding mode is not supported, or - * MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if the cipher mode - * does not support padding. - */ -int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_cipher_padding_t mode ); -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - -/** - * \brief Set the initialization vector (IV) or nonce - * - * \param ctx generic cipher context - * \param iv IV to use (or NONCE_COUNTER for CTR-mode ciphers) - * \param iv_len IV length for ciphers with variable-size IV; - * discarded by ciphers with fixed-size IV. - * - * \returns 0 on success, or MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - * - * \note Some ciphers don't use IVs nor NONCE. For these - * ciphers, this function has no effect. - */ -int mbedtls_cipher_set_iv( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len ); - -/** - * \brief Finish preparation of the given context - * - * \param ctx generic cipher context - * - * \returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - * if parameter verification fails. - */ -int mbedtls_cipher_reset( mbedtls_cipher_context_t *ctx ); - -#if defined(MBEDTLS_GCM_C) -/** - * \brief Add additional data (for AEAD ciphers). - * Currently only supported with GCM. - * Must be called exactly once, after mbedtls_cipher_reset(). - * - * \param ctx generic cipher context - * \param ad Additional data to use. - * \param ad_len Length of ad. - * - * \return 0 on success, or a specific error code. - */ -int mbedtls_cipher_update_ad( mbedtls_cipher_context_t *ctx, - const unsigned char *ad, size_t ad_len ); -#endif /* MBEDTLS_GCM_C */ - -/** - * \brief Generic cipher update function. Encrypts/decrypts - * using the given cipher context. Writes as many block - * size'd blocks of data as possible to output. Any data - * that cannot be written immediately will either be added - * to the next block, or flushed when cipher_final is - * called. - * Exception: for MBEDTLS_MODE_ECB, expects single block - * in size (e.g. 16 bytes for AES) - * - * \param ctx generic cipher context - * \param input buffer holding the input data - * \param ilen length of the input data - * \param output buffer for the output data. Should be able to hold at - * least ilen + block_size. Cannot be the same buffer as - * input! - * \param olen length of the output data, will be filled with the - * actual number of bytes written. - * - * \returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if - * parameter verification fails, - * MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE on an - * unsupported mode for a cipher or a cipher specific - * error code. - * - * \note If the underlying cipher is GCM, all calls to this - * function, except the last one before mbedtls_cipher_finish(), - * must have ilen a multiple of the block size. - */ -int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *input, - size_t ilen, unsigned char *output, size_t *olen ); - -/** - * \brief Generic cipher finalisation function. If data still - * needs to be flushed from an incomplete block, data - * contained within it will be padded with the size of - * the last block, and written to the output buffer. - * - * \param ctx Generic cipher context - * \param output buffer to write data to. Needs block_size available. - * \param olen length of the data written to the output buffer. - * - * \returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if - * parameter verification fails, - * MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED if decryption - * expected a full block but was not provided one, - * MBEDTLS_ERR_CIPHER_INVALID_PADDING on invalid padding - * while decrypting or a cipher specific error code. - */ -int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx, - unsigned char *output, size_t *olen ); - -#if defined(MBEDTLS_GCM_C) -/** - * \brief Write tag for AEAD ciphers. - * Currently only supported with GCM. - * Must be called after mbedtls_cipher_finish(). - * - * \param ctx Generic cipher context - * \param tag buffer to write the tag - * \param tag_len Length of the tag to write - * - * \return 0 on success, or a specific error code. - */ -int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx, - unsigned char *tag, size_t tag_len ); - -/** - * \brief Check tag for AEAD ciphers. - * Currently only supported with GCM. - * Must be called after mbedtls_cipher_finish(). - * - * \param ctx Generic cipher context - * \param tag Buffer holding the tag - * \param tag_len Length of the tag to check - * - * \return 0 on success, or a specific error code. - */ -int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx, - const unsigned char *tag, size_t tag_len ); -#endif /* MBEDTLS_GCM_C */ - -/** - * \brief Generic all-in-one encryption/decryption - * (for all ciphers except AEAD constructs). - * - * \param ctx generic cipher context - * \param iv IV to use (or NONCE_COUNTER for CTR-mode ciphers) - * \param iv_len IV length for ciphers with variable-size IV; - * discarded by ciphers with fixed-size IV. - * \param input buffer holding the input data - * \param ilen length of the input data - * \param output buffer for the output data. Should be able to hold at - * least ilen + block_size. Cannot be the same buffer as - * input! - * \param olen length of the output data, will be filled with the - * actual number of bytes written. - * - * \note Some ciphers don't use IVs nor NONCE. For these - * ciphers, use iv = NULL and iv_len = 0. - * - * \returns 0 on success, or - * MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA, or - * MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED if decryption - * expected a full block but was not provided one, or - * MBEDTLS_ERR_CIPHER_INVALID_PADDING on invalid padding - * while decrypting, or - * a cipher specific error code. - */ -int mbedtls_cipher_crypt( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen ); - -#if defined(MBEDTLS_CIPHER_MODE_AEAD) -/** - * \brief Generic autenticated encryption (AEAD ciphers). - * - * \param ctx generic cipher context - * \param iv IV to use (or NONCE_COUNTER for CTR-mode ciphers) - * \param iv_len IV length for ciphers with variable-size IV; - * discarded by ciphers with fixed-size IV. - * \param ad Additional data to authenticate. - * \param ad_len Length of ad. - * \param input buffer holding the input data - * \param ilen length of the input data - * \param output buffer for the output data. - * Should be able to hold at least ilen. - * \param olen length of the output data, will be filled with the - * actual number of bytes written. - * \param tag buffer for the authentication tag - * \param tag_len desired tag length - * - * \returns 0 on success, or - * MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA, or - * a cipher specific error code. - */ -int mbedtls_cipher_auth_encrypt( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len, - const unsigned char *ad, size_t ad_len, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, - unsigned char *tag, size_t tag_len ); - -/** - * \brief Generic autenticated decryption (AEAD ciphers). - * - * \param ctx generic cipher context - * \param iv IV to use (or NONCE_COUNTER for CTR-mode ciphers) - * \param iv_len IV length for ciphers with variable-size IV; - * discarded by ciphers with fixed-size IV. - * \param ad Additional data to be authenticated. - * \param ad_len Length of ad. - * \param input buffer holding the input data - * \param ilen length of the input data - * \param output buffer for the output data. - * Should be able to hold at least ilen. - * \param olen length of the output data, will be filled with the - * actual number of bytes written. - * \param tag buffer holding the authentication tag - * \param tag_len length of the authentication tag - * - * \returns 0 on success, or - * MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA, or - * MBEDTLS_ERR_CIPHER_AUTH_FAILED if data isn't authentic, - * or a cipher specific error code. - * - * \note If the data is not authentic, then the output buffer - * is zeroed out to prevent the unauthentic plaintext to - * be used by mistake, making this interface safer. - */ -int mbedtls_cipher_auth_decrypt( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len, - const unsigned char *ad, size_t ad_len, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, - const unsigned char *tag, size_t tag_len ); -#endif /* MBEDTLS_CIPHER_MODE_AEAD */ - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_CIPHER_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher_internal.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher_internal.h deleted file mode 100644 index 6c58bcc525..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/cipher_internal.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - * \file cipher_internal.h - * - * \brief Cipher wrappers. - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_CIPHER_WRAP_H -#define MBEDTLS_CIPHER_WRAP_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "cipher.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Base cipher information. The non-mode specific functions and values. - */ -struct mbedtls_cipher_base_t -{ - /** Base Cipher type (e.g. MBEDTLS_CIPHER_ID_AES) */ - mbedtls_cipher_id_t cipher; - - /** Encrypt using ECB */ - int (*ecb_func)( void *ctx, mbedtls_operation_t mode, - const unsigned char *input, unsigned char *output ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /** Encrypt using CBC */ - int (*cbc_func)( void *ctx, mbedtls_operation_t mode, size_t length, - unsigned char *iv, const unsigned char *input, - unsigned char *output ); -#endif - -#if defined(MBEDTLS_CIPHER_MODE_CFB) - /** Encrypt using CFB (Full length) */ - int (*cfb_func)( void *ctx, mbedtls_operation_t mode, size_t length, size_t *iv_off, - unsigned char *iv, const unsigned char *input, - unsigned char *output ); -#endif - -#if defined(MBEDTLS_CIPHER_MODE_CTR) - /** Encrypt using CTR */ - int (*ctr_func)( void *ctx, size_t length, size_t *nc_off, - unsigned char *nonce_counter, unsigned char *stream_block, - const unsigned char *input, unsigned char *output ); -#endif - -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - /** Encrypt using STREAM */ - int (*stream_func)( void *ctx, size_t length, - const unsigned char *input, unsigned char *output ); -#endif - - /** Set key for encryption purposes */ - int (*setkey_enc_func)( void *ctx, const unsigned char *key, - unsigned int key_bitlen ); - - /** Set key for decryption purposes */ - int (*setkey_dec_func)( void *ctx, const unsigned char *key, - unsigned int key_bitlen); - - /** Allocate a new context */ - void * (*ctx_alloc_func)( void ); - - /** Free the given context */ - void (*ctx_free_func)( void *ctx ); - -}; - -typedef struct -{ - mbedtls_cipher_type_t type; - const mbedtls_cipher_info_t *info; -} mbedtls_cipher_definition_t; - -extern const mbedtls_cipher_definition_t mbedtls_cipher_definitions[]; - -extern int mbedtls_cipher_supported[]; - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_CIPHER_WRAP_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/compat-1.3.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/compat-1.3.h deleted file mode 100644 index 27abbd9720..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/compat-1.3.h +++ /dev/null @@ -1,2634 +0,0 @@ -/** - * \file compat-1.3.h - * - * \brief Compatibility definitions for using mbed TLS with client code written - * for the PolarSSL naming conventions. - * - * \deprecated Use the new names directly instead - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) - -#if defined(MBEDTLS_DEPRECATED_WARNING) -#warning "Including compat-1.3.h is deprecated" -#endif - -#ifndef MBEDTLS_COMPAT13_H -#define MBEDTLS_COMPAT13_H - -/* - * config.h options - */ -#if defined MBEDTLS_AESNI_C -#define POLARSSL_AESNI_C MBEDTLS_AESNI_C -#endif -#if defined MBEDTLS_AES_ALT -#define POLARSSL_AES_ALT MBEDTLS_AES_ALT -#endif -#if defined MBEDTLS_AES_C -#define POLARSSL_AES_C MBEDTLS_AES_C -#endif -#if defined MBEDTLS_AES_ROM_TABLES -#define POLARSSL_AES_ROM_TABLES MBEDTLS_AES_ROM_TABLES -#endif -#if defined MBEDTLS_ARC4_ALT -#define POLARSSL_ARC4_ALT MBEDTLS_ARC4_ALT -#endif -#if defined MBEDTLS_ARC4_C -#define POLARSSL_ARC4_C MBEDTLS_ARC4_C -#endif -#if defined MBEDTLS_ASN1_PARSE_C -#define POLARSSL_ASN1_PARSE_C MBEDTLS_ASN1_PARSE_C -#endif -#if defined MBEDTLS_ASN1_WRITE_C -#define POLARSSL_ASN1_WRITE_C MBEDTLS_ASN1_WRITE_C -#endif -#if defined MBEDTLS_BASE64_C -#define POLARSSL_BASE64_C MBEDTLS_BASE64_C -#endif -#if defined MBEDTLS_BIGNUM_C -#define POLARSSL_BIGNUM_C MBEDTLS_BIGNUM_C -#endif -#if defined MBEDTLS_BLOWFISH_ALT -#define POLARSSL_BLOWFISH_ALT MBEDTLS_BLOWFISH_ALT -#endif -#if defined MBEDTLS_BLOWFISH_C -#define POLARSSL_BLOWFISH_C MBEDTLS_BLOWFISH_C -#endif -#if defined MBEDTLS_CAMELLIA_ALT -#define POLARSSL_CAMELLIA_ALT MBEDTLS_CAMELLIA_ALT -#endif -#if defined MBEDTLS_CAMELLIA_C -#define POLARSSL_CAMELLIA_C MBEDTLS_CAMELLIA_C -#endif -#if defined MBEDTLS_CAMELLIA_SMALL_MEMORY -#define POLARSSL_CAMELLIA_SMALL_MEMORY MBEDTLS_CAMELLIA_SMALL_MEMORY -#endif -#if defined MBEDTLS_CCM_C -#define POLARSSL_CCM_C MBEDTLS_CCM_C -#endif -#if defined MBEDTLS_CERTS_C -#define POLARSSL_CERTS_C MBEDTLS_CERTS_C -#endif -#if defined MBEDTLS_CIPHER_C -#define POLARSSL_CIPHER_C MBEDTLS_CIPHER_C -#endif -#if defined MBEDTLS_CIPHER_MODE_CBC -#define POLARSSL_CIPHER_MODE_CBC MBEDTLS_CIPHER_MODE_CBC -#endif -#if defined MBEDTLS_CIPHER_MODE_CFB -#define POLARSSL_CIPHER_MODE_CFB MBEDTLS_CIPHER_MODE_CFB -#endif -#if defined MBEDTLS_CIPHER_MODE_CTR -#define POLARSSL_CIPHER_MODE_CTR MBEDTLS_CIPHER_MODE_CTR -#endif -#if defined MBEDTLS_CIPHER_NULL_CIPHER -#define POLARSSL_CIPHER_NULL_CIPHER MBEDTLS_CIPHER_NULL_CIPHER -#endif -#if defined MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -#endif -#if defined MBEDTLS_CIPHER_PADDING_PKCS7 -#define POLARSSL_CIPHER_PADDING_PKCS7 MBEDTLS_CIPHER_PADDING_PKCS7 -#endif -#if defined MBEDTLS_CIPHER_PADDING_ZEROS -#define POLARSSL_CIPHER_PADDING_ZEROS MBEDTLS_CIPHER_PADDING_ZEROS -#endif -#if defined MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -#endif -#if defined MBEDTLS_CTR_DRBG_C -#define POLARSSL_CTR_DRBG_C MBEDTLS_CTR_DRBG_C -#endif -#if defined MBEDTLS_DEBUG_C -#define POLARSSL_DEBUG_C MBEDTLS_DEBUG_C -#endif -#if defined MBEDTLS_DEPRECATED_REMOVED -#define POLARSSL_DEPRECATED_REMOVED MBEDTLS_DEPRECATED_REMOVED -#endif -#if defined MBEDTLS_DEPRECATED_WARNING -#define POLARSSL_DEPRECATED_WARNING MBEDTLS_DEPRECATED_WARNING -#endif -#if defined MBEDTLS_DES_ALT -#define POLARSSL_DES_ALT MBEDTLS_DES_ALT -#endif -#if defined MBEDTLS_DES_C -#define POLARSSL_DES_C MBEDTLS_DES_C -#endif -#if defined MBEDTLS_DHM_C -#define POLARSSL_DHM_C MBEDTLS_DHM_C -#endif -#if defined MBEDTLS_ECDH_C -#define POLARSSL_ECDH_C MBEDTLS_ECDH_C -#endif -#if defined MBEDTLS_ECDSA_C -#define POLARSSL_ECDSA_C MBEDTLS_ECDSA_C -#endif -#if defined MBEDTLS_ECDSA_DETERMINISTIC -#define POLARSSL_ECDSA_DETERMINISTIC MBEDTLS_ECDSA_DETERMINISTIC -#endif -#if defined MBEDTLS_ECP_C -#define POLARSSL_ECP_C MBEDTLS_ECP_C -#endif -#if defined MBEDTLS_ECP_DP_BP256R1_ENABLED -#define POLARSSL_ECP_DP_BP256R1_ENABLED MBEDTLS_ECP_DP_BP256R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_BP384R1_ENABLED -#define POLARSSL_ECP_DP_BP384R1_ENABLED MBEDTLS_ECP_DP_BP384R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_BP512R1_ENABLED -#define POLARSSL_ECP_DP_BP512R1_ENABLED MBEDTLS_ECP_DP_BP512R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_CURVE25519_ENABLED -#define POLARSSL_ECP_DP_M255_ENABLED MBEDTLS_ECP_DP_CURVE25519_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP192K1_ENABLED -#define POLARSSL_ECP_DP_SECP192K1_ENABLED MBEDTLS_ECP_DP_SECP192K1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP192R1_ENABLED -#define POLARSSL_ECP_DP_SECP192R1_ENABLED MBEDTLS_ECP_DP_SECP192R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP224K1_ENABLED -#define POLARSSL_ECP_DP_SECP224K1_ENABLED MBEDTLS_ECP_DP_SECP224K1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP224R1_ENABLED -#define POLARSSL_ECP_DP_SECP224R1_ENABLED MBEDTLS_ECP_DP_SECP224R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP256K1_ENABLED -#define POLARSSL_ECP_DP_SECP256K1_ENABLED MBEDTLS_ECP_DP_SECP256K1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP256R1_ENABLED -#define POLARSSL_ECP_DP_SECP256R1_ENABLED MBEDTLS_ECP_DP_SECP256R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP384R1_ENABLED -#define POLARSSL_ECP_DP_SECP384R1_ENABLED MBEDTLS_ECP_DP_SECP384R1_ENABLED -#endif -#if defined MBEDTLS_ECP_DP_SECP521R1_ENABLED -#define POLARSSL_ECP_DP_SECP521R1_ENABLED MBEDTLS_ECP_DP_SECP521R1_ENABLED -#endif -#if defined MBEDTLS_ECP_FIXED_POINT_OPTIM -#define POLARSSL_ECP_FIXED_POINT_OPTIM MBEDTLS_ECP_FIXED_POINT_OPTIM -#endif -#if defined MBEDTLS_ECP_MAX_BITS -#define POLARSSL_ECP_MAX_BITS MBEDTLS_ECP_MAX_BITS -#endif -#if defined MBEDTLS_ECP_NIST_OPTIM -#define POLARSSL_ECP_NIST_OPTIM MBEDTLS_ECP_NIST_OPTIM -#endif -#if defined MBEDTLS_ECP_WINDOW_SIZE -#define POLARSSL_ECP_WINDOW_SIZE MBEDTLS_ECP_WINDOW_SIZE -#endif -#if defined MBEDTLS_ENABLE_WEAK_CIPHERSUITES -#define POLARSSL_ENABLE_WEAK_CIPHERSUITES MBEDTLS_ENABLE_WEAK_CIPHERSUITES -#endif -#if defined MBEDTLS_ENTROPY_C -#define POLARSSL_ENTROPY_C MBEDTLS_ENTROPY_C -#endif -#if defined MBEDTLS_ENTROPY_FORCE_SHA256 -#define POLARSSL_ENTROPY_FORCE_SHA256 MBEDTLS_ENTROPY_FORCE_SHA256 -#endif -#if defined MBEDTLS_ERROR_C -#define POLARSSL_ERROR_C MBEDTLS_ERROR_C -#endif -#if defined MBEDTLS_ERROR_STRERROR_BC -#define POLARSSL_ERROR_STRERROR_BC MBEDTLS_ERROR_STRERROR_BC -#endif -#if defined MBEDTLS_ERROR_STRERROR_DUMMY -#define POLARSSL_ERROR_STRERROR_DUMMY MBEDTLS_ERROR_STRERROR_DUMMY -#endif -#if defined MBEDTLS_FS_IO -#define POLARSSL_FS_IO MBEDTLS_FS_IO -#endif -#if defined MBEDTLS_GCM_C -#define POLARSSL_GCM_C MBEDTLS_GCM_C -#endif -#if defined MBEDTLS_GENPRIME -#define POLARSSL_GENPRIME MBEDTLS_GENPRIME -#endif -#if defined MBEDTLS_HAVEGE_C -#define POLARSSL_HAVEGE_C MBEDTLS_HAVEGE_C -#endif -#if defined MBEDTLS_HAVE_ASM -#define POLARSSL_HAVE_ASM MBEDTLS_HAVE_ASM -#endif -#if defined MBEDTLS_HAVE_SSE2 -#define POLARSSL_HAVE_SSE2 MBEDTLS_HAVE_SSE2 -#endif -#if defined MBEDTLS_HAVE_TIME -#define POLARSSL_HAVE_TIME MBEDTLS_HAVE_TIME -#endif -#if defined MBEDTLS_HMAC_DRBG_C -#define POLARSSL_HMAC_DRBG_C MBEDTLS_HMAC_DRBG_C -#endif -#if defined MBEDTLS_HMAC_DRBG_MAX_INPUT -#define POLARSSL_HMAC_DRBG_MAX_INPUT MBEDTLS_HMAC_DRBG_MAX_INPUT -#endif -#if defined MBEDTLS_HMAC_DRBG_MAX_REQUEST -#define POLARSSL_HMAC_DRBG_MAX_REQUEST MBEDTLS_HMAC_DRBG_MAX_REQUEST -#endif -#if defined MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT -#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT -#endif -#if defined MBEDTLS_HMAC_DRBG_RESEED_INTERVAL -#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL MBEDTLS_HMAC_DRBG_RESEED_INTERVAL -#endif -#if defined MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED -#define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED -#define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED -#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -#define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_PSK_ENABLED -#define POLARSSL_KEY_EXCHANGE_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_PSK_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -#define POLARSSL_KEY_EXCHANGE_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -#endif -#if defined MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -#define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -#endif -#if defined MBEDTLS_MD2_ALT -#define POLARSSL_MD2_ALT MBEDTLS_MD2_ALT -#endif -#if defined MBEDTLS_MD2_C -#define POLARSSL_MD2_C MBEDTLS_MD2_C -#endif -#if defined MBEDTLS_MD2_PROCESS_ALT -#define POLARSSL_MD2_PROCESS_ALT MBEDTLS_MD2_PROCESS_ALT -#endif -#if defined MBEDTLS_MD4_ALT -#define POLARSSL_MD4_ALT MBEDTLS_MD4_ALT -#endif -#if defined MBEDTLS_MD4_C -#define POLARSSL_MD4_C MBEDTLS_MD4_C -#endif -#if defined MBEDTLS_MD4_PROCESS_ALT -#define POLARSSL_MD4_PROCESS_ALT MBEDTLS_MD4_PROCESS_ALT -#endif -#if defined MBEDTLS_MD5_ALT -#define POLARSSL_MD5_ALT MBEDTLS_MD5_ALT -#endif -#if defined MBEDTLS_MD5_C -#define POLARSSL_MD5_C MBEDTLS_MD5_C -#endif -#if defined MBEDTLS_MD5_PROCESS_ALT -#define POLARSSL_MD5_PROCESS_ALT MBEDTLS_MD5_PROCESS_ALT -#endif -#if defined MBEDTLS_MD_C -#define POLARSSL_MD_C MBEDTLS_MD_C -#endif -#if defined MBEDTLS_MEMORY_ALIGN_MULTIPLE -#define POLARSSL_MEMORY_ALIGN_MULTIPLE MBEDTLS_MEMORY_ALIGN_MULTIPLE -#endif -#if defined MBEDTLS_MEMORY_BACKTRACE -#define POLARSSL_MEMORY_BACKTRACE MBEDTLS_MEMORY_BACKTRACE -#endif -#if defined MBEDTLS_MEMORY_BUFFER_ALLOC_C -#define POLARSSL_MEMORY_BUFFER_ALLOC_C MBEDTLS_MEMORY_BUFFER_ALLOC_C -#endif -#if defined MBEDTLS_MEMORY_C -#define POLARSSL_MEMORY_C MBEDTLS_MEMORY_C -#endif -#if defined MBEDTLS_MEMORY_DEBUG -#define POLARSSL_MEMORY_DEBUG MBEDTLS_MEMORY_DEBUG -#endif -#if defined MBEDTLS_MPI_MAX_SIZE -#define POLARSSL_MPI_MAX_SIZE MBEDTLS_MPI_MAX_SIZE -#endif -#if defined MBEDTLS_MPI_WINDOW_SIZE -#define POLARSSL_MPI_WINDOW_SIZE MBEDTLS_MPI_WINDOW_SIZE -#endif -#if defined MBEDTLS_NET_C -#define POLARSSL_NET_C MBEDTLS_NET_C -#endif -#if defined MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -#endif -#if defined MBEDTLS_NO_PLATFORM_ENTROPY -#define POLARSSL_NO_PLATFORM_ENTROPY MBEDTLS_NO_PLATFORM_ENTROPY -#endif -#if defined MBEDTLS_OID_C -#define POLARSSL_OID_C MBEDTLS_OID_C -#endif -#if defined MBEDTLS_PADLOCK_C -#define POLARSSL_PADLOCK_C MBEDTLS_PADLOCK_C -#endif -#if defined MBEDTLS_PBKDF2_C -#define POLARSSL_PBKDF2_C MBEDTLS_PBKDF2_C -#endif -#if defined MBEDTLS_PEM_PARSE_C -#define POLARSSL_PEM_PARSE_C MBEDTLS_PEM_PARSE_C -#endif -#if defined MBEDTLS_PEM_WRITE_C -#define POLARSSL_PEM_WRITE_C MBEDTLS_PEM_WRITE_C -#endif -#if defined MBEDTLS_PKCS11_C -#define POLARSSL_PKCS11_C MBEDTLS_PKCS11_C -#endif -#if defined MBEDTLS_PKCS12_C -#define POLARSSL_PKCS12_C MBEDTLS_PKCS12_C -#endif -#if defined MBEDTLS_PKCS1_V15 -#define POLARSSL_PKCS1_V15 MBEDTLS_PKCS1_V15 -#endif -#if defined MBEDTLS_PKCS1_V21 -#define POLARSSL_PKCS1_V21 MBEDTLS_PKCS1_V21 -#endif -#if defined MBEDTLS_PKCS5_C -#define POLARSSL_PKCS5_C MBEDTLS_PKCS5_C -#endif -#if defined MBEDTLS_PK_C -#define POLARSSL_PK_C MBEDTLS_PK_C -#endif -#if defined MBEDTLS_PK_PARSE_C -#define POLARSSL_PK_PARSE_C MBEDTLS_PK_PARSE_C -#endif -#if defined MBEDTLS_PK_PARSE_EC_EXTENDED -#define POLARSSL_PK_PARSE_EC_EXTENDED MBEDTLS_PK_PARSE_EC_EXTENDED -#endif -#if defined MBEDTLS_PK_RSA_ALT_SUPPORT -#define POLARSSL_PK_RSA_ALT_SUPPORT MBEDTLS_PK_RSA_ALT_SUPPORT -#endif -#if defined MBEDTLS_PK_WRITE_C -#define POLARSSL_PK_WRITE_C MBEDTLS_PK_WRITE_C -#endif -#if defined MBEDTLS_PLATFORM_C -#define POLARSSL_PLATFORM_C MBEDTLS_PLATFORM_C -#endif -#if defined MBEDTLS_PLATFORM_EXIT_ALT -#define POLARSSL_PLATFORM_EXIT_ALT MBEDTLS_PLATFORM_EXIT_ALT -#endif -#if defined MBEDTLS_PLATFORM_EXIT_MACRO -#define POLARSSL_PLATFORM_EXIT_MACRO MBEDTLS_PLATFORM_EXIT_MACRO -#endif -#if defined MBEDTLS_PLATFORM_FPRINTF_ALT -#define POLARSSL_PLATFORM_FPRINTF_ALT MBEDTLS_PLATFORM_FPRINTF_ALT -#endif -#if defined MBEDTLS_PLATFORM_FPRINTF_MACRO -#define POLARSSL_PLATFORM_FPRINTF_MACRO MBEDTLS_PLATFORM_FPRINTF_MACRO -#endif -#if defined MBEDTLS_PLATFORM_FREE_MACRO -#define POLARSSL_PLATFORM_FREE_MACRO MBEDTLS_PLATFORM_FREE_MACRO -#endif -#if defined MBEDTLS_PLATFORM_MEMORY -#define POLARSSL_PLATFORM_MEMORY MBEDTLS_PLATFORM_MEMORY -#endif -#if defined MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -#endif -#if defined MBEDTLS_PLATFORM_PRINTF_ALT -#define POLARSSL_PLATFORM_PRINTF_ALT MBEDTLS_PLATFORM_PRINTF_ALT -#endif -#if defined MBEDTLS_PLATFORM_PRINTF_MACRO -#define POLARSSL_PLATFORM_PRINTF_MACRO MBEDTLS_PLATFORM_PRINTF_MACRO -#endif -#if defined MBEDTLS_PLATFORM_SNPRINTF_ALT -#define POLARSSL_PLATFORM_SNPRINTF_ALT MBEDTLS_PLATFORM_SNPRINTF_ALT -#endif -#if defined MBEDTLS_PLATFORM_SNPRINTF_MACRO -#define POLARSSL_PLATFORM_SNPRINTF_MACRO MBEDTLS_PLATFORM_SNPRINTF_MACRO -#endif -#if defined MBEDTLS_PLATFORM_STD_EXIT -#define POLARSSL_PLATFORM_STD_EXIT MBEDTLS_PLATFORM_STD_EXIT -#endif -#if defined MBEDTLS_PLATFORM_STD_FPRINTF -#define POLARSSL_PLATFORM_STD_FPRINTF MBEDTLS_PLATFORM_STD_FPRINTF -#endif -#if defined MBEDTLS_PLATFORM_STD_FREE -#define POLARSSL_PLATFORM_STD_FREE MBEDTLS_PLATFORM_STD_FREE -#endif -#if defined MBEDTLS_PLATFORM_STD_MALLOC -#define POLARSSL_PLATFORM_STD_MALLOC MBEDTLS_PLATFORM_STD_MALLOC -#endif -#if defined MBEDTLS_PLATFORM_STD_MEM_HDR -#define POLARSSL_PLATFORM_STD_MEM_HDR MBEDTLS_PLATFORM_STD_MEM_HDR -#endif -#if defined MBEDTLS_PLATFORM_STD_PRINTF -#define POLARSSL_PLATFORM_STD_PRINTF MBEDTLS_PLATFORM_STD_PRINTF -#endif -#if defined MBEDTLS_PLATFORM_STD_SNPRINTF -#define POLARSSL_PLATFORM_STD_SNPRINTF MBEDTLS_PLATFORM_STD_SNPRINTF -#endif -#if defined MBEDTLS_PSK_MAX_LEN -#define POLARSSL_PSK_MAX_LEN MBEDTLS_PSK_MAX_LEN -#endif -#if defined MBEDTLS_REMOVE_ARC4_CIPHERSUITES -#define POLARSSL_REMOVE_ARC4_CIPHERSUITES MBEDTLS_REMOVE_ARC4_CIPHERSUITES -#endif -#if defined MBEDTLS_RIPEMD160_ALT -#define POLARSSL_RIPEMD160_ALT MBEDTLS_RIPEMD160_ALT -#endif -#if defined MBEDTLS_RIPEMD160_C -#define POLARSSL_RIPEMD160_C MBEDTLS_RIPEMD160_C -#endif -#if defined MBEDTLS_RIPEMD160_PROCESS_ALT -#define POLARSSL_RIPEMD160_PROCESS_ALT MBEDTLS_RIPEMD160_PROCESS_ALT -#endif -#if defined MBEDTLS_RSA_C -#define POLARSSL_RSA_C MBEDTLS_RSA_C -#endif -#if defined MBEDTLS_RSA_NO_CRT -#define POLARSSL_RSA_NO_CRT MBEDTLS_RSA_NO_CRT -#endif -#if defined MBEDTLS_SELF_TEST -#define POLARSSL_SELF_TEST MBEDTLS_SELF_TEST -#endif -#if defined MBEDTLS_SHA1_ALT -#define POLARSSL_SHA1_ALT MBEDTLS_SHA1_ALT -#endif -#if defined MBEDTLS_SHA1_C -#define POLARSSL_SHA1_C MBEDTLS_SHA1_C -#endif -#if defined MBEDTLS_SHA1_PROCESS_ALT -#define POLARSSL_SHA1_PROCESS_ALT MBEDTLS_SHA1_PROCESS_ALT -#endif -#if defined MBEDTLS_SHA256_ALT -#define POLARSSL_SHA256_ALT MBEDTLS_SHA256_ALT -#endif -#if defined MBEDTLS_SHA256_C -#define POLARSSL_SHA256_C MBEDTLS_SHA256_C -#endif -#if defined MBEDTLS_SHA256_PROCESS_ALT -#define POLARSSL_SHA256_PROCESS_ALT MBEDTLS_SHA256_PROCESS_ALT -#endif -#if defined MBEDTLS_SHA512_ALT -#define POLARSSL_SHA512_ALT MBEDTLS_SHA512_ALT -#endif -#if defined MBEDTLS_SHA512_C -#define POLARSSL_SHA512_C MBEDTLS_SHA512_C -#endif -#if defined MBEDTLS_SHA512_PROCESS_ALT -#define POLARSSL_SHA512_PROCESS_ALT MBEDTLS_SHA512_PROCESS_ALT -#endif -#if defined MBEDTLS_SSL_AEAD_RANDOM_IV -#define POLARSSL_SSL_AEAD_RANDOM_IV MBEDTLS_SSL_AEAD_RANDOM_IV -#endif -#if defined MBEDTLS_SSL_ALERT_MESSAGES -#define POLARSSL_SSL_ALERT_MESSAGES MBEDTLS_SSL_ALERT_MESSAGES -#endif -#if defined MBEDTLS_SSL_ALL_ALERT_MESSAGES -#define POLARSSL_SSL_ALL_ALERT_MESSAGES MBEDTLS_SSL_ALL_ALERT_MESSAGES -#endif -#if defined MBEDTLS_SSL_ALPN -#define POLARSSL_SSL_ALPN MBEDTLS_SSL_ALPN -#endif -#if defined MBEDTLS_SSL_CACHE_C -#define POLARSSL_SSL_CACHE_C MBEDTLS_SSL_CACHE_C -#endif -#if defined MBEDTLS_SSL_CBC_RECORD_SPLITTING -#define POLARSSL_SSL_CBC_RECORD_SPLITTING MBEDTLS_SSL_CBC_RECORD_SPLITTING -#endif -#if defined MBEDTLS_SSL_CLI_C -#define POLARSSL_SSL_CLI_C MBEDTLS_SSL_CLI_C -#endif -#if defined MBEDTLS_SSL_COOKIE_C -#define POLARSSL_SSL_COOKIE_C MBEDTLS_SSL_COOKIE_C -#endif -#if defined MBEDTLS_SSL_COOKIE_TIMEOUT -#define POLARSSL_SSL_COOKIE_TIMEOUT MBEDTLS_SSL_COOKIE_TIMEOUT -#endif -#if defined MBEDTLS_SSL_DEBUG_ALL -#define POLARSSL_SSL_DEBUG_ALL MBEDTLS_SSL_DEBUG_ALL -#endif -#if defined MBEDTLS_SSL_DISABLE_RENEGOTIATION -#define POLARSSL_SSL_DISABLE_RENEGOTIATION MBEDTLS_SSL_DISABLE_RENEGOTIATION -#endif -#if defined MBEDTLS_SSL_DTLS_ANTI_REPLAY -#define POLARSSL_SSL_DTLS_ANTI_REPLAY MBEDTLS_SSL_DTLS_ANTI_REPLAY -#endif -#if defined MBEDTLS_SSL_DTLS_BADMAC_LIMIT -#define POLARSSL_SSL_DTLS_BADMAC_LIMIT MBEDTLS_SSL_DTLS_BADMAC_LIMIT -#endif -#if defined MBEDTLS_SSL_DTLS_HELLO_VERIFY -#define POLARSSL_SSL_DTLS_HELLO_VERIFY MBEDTLS_SSL_DTLS_HELLO_VERIFY -#endif -#if defined MBEDTLS_SSL_ENCRYPT_THEN_MAC -#define POLARSSL_SSL_ENCRYPT_THEN_MAC MBEDTLS_SSL_ENCRYPT_THEN_MAC -#endif -#if defined MBEDTLS_SSL_EXTENDED_MASTER_SECRET -#define POLARSSL_SSL_EXTENDED_MASTER_SECRET MBEDTLS_SSL_EXTENDED_MASTER_SECRET -#endif -#if defined MBEDTLS_SSL_FALLBACK_SCSV -#define POLARSSL_SSL_FALLBACK_SCSV MBEDTLS_SSL_FALLBACK_SCSV -#endif -#if defined MBEDTLS_SSL_HW_RECORD_ACCEL -#define POLARSSL_SSL_HW_RECORD_ACCEL MBEDTLS_SSL_HW_RECORD_ACCEL -#endif -#if defined MBEDTLS_SSL_MAX_FRAGMENT_LENGTH -#define POLARSSL_SSL_MAX_FRAGMENT_LENGTH MBEDTLS_SSL_MAX_FRAGMENT_LENGTH -#endif -#if defined MBEDTLS_SSL_PROTO_DTLS -#define POLARSSL_SSL_PROTO_DTLS MBEDTLS_SSL_PROTO_DTLS -#endif -#if defined MBEDTLS_SSL_PROTO_SSL3 -#define POLARSSL_SSL_PROTO_SSL3 MBEDTLS_SSL_PROTO_SSL3 -#endif -#if defined MBEDTLS_SSL_PROTO_TLS1 -#define POLARSSL_SSL_PROTO_TLS1 MBEDTLS_SSL_PROTO_TLS1 -#endif -#if defined MBEDTLS_SSL_PROTO_TLS1_1 -#define POLARSSL_SSL_PROTO_TLS1_1 MBEDTLS_SSL_PROTO_TLS1_1 -#endif -#if defined MBEDTLS_SSL_PROTO_TLS1_2 -#define POLARSSL_SSL_PROTO_TLS1_2 MBEDTLS_SSL_PROTO_TLS1_2 -#endif -#if defined MBEDTLS_SSL_RENEGOTIATION -#define POLARSSL_SSL_RENEGOTIATION MBEDTLS_SSL_RENEGOTIATION -#endif -#if defined MBEDTLS_SSL_SERVER_NAME_INDICATION -#define POLARSSL_SSL_SERVER_NAME_INDICATION MBEDTLS_SSL_SERVER_NAME_INDICATION -#endif -#if defined MBEDTLS_SSL_SESSION_TICKETS -#define POLARSSL_SSL_SESSION_TICKETS MBEDTLS_SSL_SESSION_TICKETS -#endif -#if defined MBEDTLS_SSL_SRV_C -#define POLARSSL_SSL_SRV_C MBEDTLS_SSL_SRV_C -#endif -#if defined MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE -#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE -#endif -#if defined MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -#define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -#endif -#if defined MBEDTLS_SSL_TLS_C -#define POLARSSL_SSL_TLS_C MBEDTLS_SSL_TLS_C -#endif -#if defined MBEDTLS_SSL_TRUNCATED_HMAC -#define POLARSSL_SSL_TRUNCATED_HMAC MBEDTLS_SSL_TRUNCATED_HMAC -#endif -#if defined MBEDTLS_THREADING_ALT -#define POLARSSL_THREADING_ALT MBEDTLS_THREADING_ALT -#endif -#if defined MBEDTLS_THREADING_C -#define POLARSSL_THREADING_C MBEDTLS_THREADING_C -#endif -#if defined MBEDTLS_THREADING_PTHREAD -#define POLARSSL_THREADING_PTHREAD MBEDTLS_THREADING_PTHREAD -#endif -#if defined MBEDTLS_TIMING_ALT -#define POLARSSL_TIMING_ALT MBEDTLS_TIMING_ALT -#endif -#if defined MBEDTLS_TIMING_C -#define POLARSSL_TIMING_C MBEDTLS_TIMING_C -#endif -#if defined MBEDTLS_VERSION_C -#define POLARSSL_VERSION_C MBEDTLS_VERSION_C -#endif -#if defined MBEDTLS_VERSION_FEATURES -#define POLARSSL_VERSION_FEATURES MBEDTLS_VERSION_FEATURES -#endif -#if defined MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -#endif -#if defined MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION -#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION -#endif -#if defined MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE -#define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE -#endif -#if defined MBEDTLS_X509_CHECK_KEY_USAGE -#define POLARSSL_X509_CHECK_KEY_USAGE MBEDTLS_X509_CHECK_KEY_USAGE -#endif -#if defined MBEDTLS_X509_CREATE_C -#define POLARSSL_X509_CREATE_C MBEDTLS_X509_CREATE_C -#endif -#if defined MBEDTLS_X509_CRL_PARSE_C -#define POLARSSL_X509_CRL_PARSE_C MBEDTLS_X509_CRL_PARSE_C -#endif -#if defined MBEDTLS_X509_CRT_PARSE_C -#define POLARSSL_X509_CRT_PARSE_C MBEDTLS_X509_CRT_PARSE_C -#endif -#if defined MBEDTLS_X509_CRT_WRITE_C -#define POLARSSL_X509_CRT_WRITE_C MBEDTLS_X509_CRT_WRITE_C -#endif -#if defined MBEDTLS_X509_CSR_PARSE_C -#define POLARSSL_X509_CSR_PARSE_C MBEDTLS_X509_CSR_PARSE_C -#endif -#if defined MBEDTLS_X509_CSR_WRITE_C -#define POLARSSL_X509_CSR_WRITE_C MBEDTLS_X509_CSR_WRITE_C -#endif -#if defined MBEDTLS_X509_MAX_INTERMEDIATE_CA -#define POLARSSL_X509_MAX_INTERMEDIATE_CA MBEDTLS_X509_MAX_INTERMEDIATE_CA -#endif -#if defined MBEDTLS_X509_RSASSA_PSS_SUPPORT -#define POLARSSL_X509_RSASSA_PSS_SUPPORT MBEDTLS_X509_RSASSA_PSS_SUPPORT -#endif -#if defined MBEDTLS_X509_USE_C -#define POLARSSL_X509_USE_C MBEDTLS_X509_USE_C -#endif -#if defined MBEDTLS_XTEA_ALT -#define POLARSSL_XTEA_ALT MBEDTLS_XTEA_ALT -#endif -#if defined MBEDTLS_XTEA_C -#define POLARSSL_XTEA_C MBEDTLS_XTEA_C -#endif -#if defined MBEDTLS_ZLIB_SUPPORT -#define POLARSSL_ZLIB_SUPPORT MBEDTLS_ZLIB_SUPPORT -#endif - -/* - * Misc names (macros, types, functions, enum constants...) - */ -#define AES_DECRYPT MBEDTLS_AES_DECRYPT -#define AES_ENCRYPT MBEDTLS_AES_ENCRYPT -#define ASN1_BIT_STRING MBEDTLS_ASN1_BIT_STRING -#define ASN1_BMP_STRING MBEDTLS_ASN1_BMP_STRING -#define ASN1_BOOLEAN MBEDTLS_ASN1_BOOLEAN -#define ASN1_CHK_ADD MBEDTLS_ASN1_CHK_ADD -#define ASN1_CONSTRUCTED MBEDTLS_ASN1_CONSTRUCTED -#define ASN1_CONTEXT_SPECIFIC MBEDTLS_ASN1_CONTEXT_SPECIFIC -#define ASN1_GENERALIZED_TIME MBEDTLS_ASN1_GENERALIZED_TIME -#define ASN1_IA5_STRING MBEDTLS_ASN1_IA5_STRING -#define ASN1_INTEGER MBEDTLS_ASN1_INTEGER -#define ASN1_NULL MBEDTLS_ASN1_NULL -#define ASN1_OCTET_STRING MBEDTLS_ASN1_OCTET_STRING -#define ASN1_OID MBEDTLS_ASN1_OID -#define ASN1_PRIMITIVE MBEDTLS_ASN1_PRIMITIVE -#define ASN1_PRINTABLE_STRING MBEDTLS_ASN1_PRINTABLE_STRING -#define ASN1_SEQUENCE MBEDTLS_ASN1_SEQUENCE -#define ASN1_SET MBEDTLS_ASN1_SET -#define ASN1_T61_STRING MBEDTLS_ASN1_T61_STRING -#define ASN1_UNIVERSAL_STRING MBEDTLS_ASN1_UNIVERSAL_STRING -#define ASN1_UTC_TIME MBEDTLS_ASN1_UTC_TIME -#define ASN1_UTF8_STRING MBEDTLS_ASN1_UTF8_STRING -#define BADCERT_CN_MISMATCH MBEDTLS_X509_BADCERT_CN_MISMATCH -#define BADCERT_EXPIRED MBEDTLS_X509_BADCERT_EXPIRED -#define BADCERT_FUTURE MBEDTLS_X509_BADCERT_FUTURE -#define BADCERT_MISSING MBEDTLS_X509_BADCERT_MISSING -#define BADCERT_NOT_TRUSTED MBEDTLS_X509_BADCERT_NOT_TRUSTED -#define BADCERT_OTHER MBEDTLS_X509_BADCERT_OTHER -#define BADCERT_REVOKED MBEDTLS_X509_BADCERT_REVOKED -#define BADCERT_SKIP_VERIFY MBEDTLS_X509_BADCERT_SKIP_VERIFY -#define BADCRL_EXPIRED MBEDTLS_X509_BADCRL_EXPIRED -#define BADCRL_FUTURE MBEDTLS_X509_BADCRL_FUTURE -#define BADCRL_NOT_TRUSTED MBEDTLS_X509_BADCRL_NOT_TRUSTED -#define BLOWFISH_BLOCKSIZE MBEDTLS_BLOWFISH_BLOCKSIZE -#define BLOWFISH_DECRYPT MBEDTLS_BLOWFISH_DECRYPT -#define BLOWFISH_ENCRYPT MBEDTLS_BLOWFISH_ENCRYPT -#define BLOWFISH_MAX_KEY MBEDTLS_BLOWFISH_MAX_KEY_BITS -#define BLOWFISH_MIN_KEY MBEDTLS_BLOWFISH_MIN_KEY_BITS -#define BLOWFISH_ROUNDS MBEDTLS_BLOWFISH_ROUNDS -#define CAMELLIA_DECRYPT MBEDTLS_CAMELLIA_DECRYPT -#define CAMELLIA_ENCRYPT MBEDTLS_CAMELLIA_ENCRYPT -#define COLLECT_SIZE MBEDTLS_HAVEGE_COLLECT_SIZE -#define CTR_DRBG_BLOCKSIZE MBEDTLS_CTR_DRBG_BLOCKSIZE -#define CTR_DRBG_ENTROPY_LEN MBEDTLS_CTR_DRBG_ENTROPY_LEN -#define CTR_DRBG_KEYBITS MBEDTLS_CTR_DRBG_KEYBITS -#define CTR_DRBG_KEYSIZE MBEDTLS_CTR_DRBG_KEYSIZE -#define CTR_DRBG_MAX_INPUT MBEDTLS_CTR_DRBG_MAX_INPUT -#define CTR_DRBG_MAX_REQUEST MBEDTLS_CTR_DRBG_MAX_REQUEST -#define CTR_DRBG_MAX_SEED_INPUT MBEDTLS_CTR_DRBG_MAX_SEED_INPUT -#define CTR_DRBG_PR_OFF MBEDTLS_CTR_DRBG_PR_OFF -#define CTR_DRBG_PR_ON MBEDTLS_CTR_DRBG_PR_ON -#define CTR_DRBG_RESEED_INTERVAL MBEDTLS_CTR_DRBG_RESEED_INTERVAL -#define CTR_DRBG_SEEDLEN MBEDTLS_CTR_DRBG_SEEDLEN -#define DEPRECATED MBEDTLS_DEPRECATED -#define DES_DECRYPT MBEDTLS_DES_DECRYPT -#define DES_ENCRYPT MBEDTLS_DES_ENCRYPT -#define DES_KEY_SIZE MBEDTLS_DES_KEY_SIZE -#define ENTROPY_BLOCK_SIZE MBEDTLS_ENTROPY_BLOCK_SIZE -#define ENTROPY_MAX_GATHER MBEDTLS_ENTROPY_MAX_GATHER -#define ENTROPY_MAX_SEED_SIZE MBEDTLS_ENTROPY_MAX_SEED_SIZE -#define ENTROPY_MAX_SOURCES MBEDTLS_ENTROPY_MAX_SOURCES -#define ENTROPY_MIN_HARDCLOCK MBEDTLS_ENTROPY_MIN_HARDCLOCK -#define ENTROPY_MIN_HAVEGE MBEDTLS_ENTROPY_MIN_HAVEGE -#define ENTROPY_MIN_PLATFORM MBEDTLS_ENTROPY_MIN_PLATFORM -#define ENTROPY_SOURCE_MANUAL MBEDTLS_ENTROPY_SOURCE_MANUAL -#define EXT_AUTHORITY_KEY_IDENTIFIER MBEDTLS_X509_EXT_AUTHORITY_KEY_IDENTIFIER -#define EXT_BASIC_CONSTRAINTS MBEDTLS_X509_EXT_BASIC_CONSTRAINTS -#define EXT_CERTIFICATE_POLICIES MBEDTLS_X509_EXT_CERTIFICATE_POLICIES -#define EXT_CRL_DISTRIBUTION_POINTS MBEDTLS_X509_EXT_CRL_DISTRIBUTION_POINTS -#define EXT_EXTENDED_KEY_USAGE MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE -#define EXT_FRESHEST_CRL MBEDTLS_X509_EXT_FRESHEST_CRL -#define EXT_INIHIBIT_ANYPOLICY MBEDTLS_X509_EXT_INIHIBIT_ANYPOLICY -#define EXT_ISSUER_ALT_NAME MBEDTLS_X509_EXT_ISSUER_ALT_NAME -#define EXT_KEY_USAGE MBEDTLS_X509_EXT_KEY_USAGE -#define EXT_NAME_CONSTRAINTS MBEDTLS_X509_EXT_NAME_CONSTRAINTS -#define EXT_NS_CERT_TYPE MBEDTLS_X509_EXT_NS_CERT_TYPE -#define EXT_POLICY_CONSTRAINTS MBEDTLS_X509_EXT_POLICY_CONSTRAINTS -#define EXT_POLICY_MAPPINGS MBEDTLS_X509_EXT_POLICY_MAPPINGS -#define EXT_SUBJECT_ALT_NAME MBEDTLS_X509_EXT_SUBJECT_ALT_NAME -#define EXT_SUBJECT_DIRECTORY_ATTRS MBEDTLS_X509_EXT_SUBJECT_DIRECTORY_ATTRS -#define EXT_SUBJECT_KEY_IDENTIFIER MBEDTLS_X509_EXT_SUBJECT_KEY_IDENTIFIER -#define GCM_DECRYPT MBEDTLS_GCM_DECRYPT -#define GCM_ENCRYPT MBEDTLS_GCM_ENCRYPT -#define KU_CRL_SIGN MBEDTLS_X509_KU_CRL_SIGN -#define KU_DATA_ENCIPHERMENT MBEDTLS_X509_KU_DATA_ENCIPHERMENT -#define KU_DIGITAL_SIGNATURE MBEDTLS_X509_KU_DIGITAL_SIGNATURE -#define KU_KEY_AGREEMENT MBEDTLS_X509_KU_KEY_AGREEMENT -#define KU_KEY_CERT_SIGN MBEDTLS_X509_KU_KEY_CERT_SIGN -#define KU_KEY_ENCIPHERMENT MBEDTLS_X509_KU_KEY_ENCIPHERMENT -#define KU_NON_REPUDIATION MBEDTLS_X509_KU_NON_REPUDIATION -#define LN_2_DIV_LN_10_SCALE100 MBEDTLS_LN_2_DIV_LN_10_SCALE100 -#define MD_CONTEXT_T_INIT MBEDTLS_MD_CONTEXT_T_INIT -#define MEMORY_VERIFY_ALLOC MBEDTLS_MEMORY_VERIFY_ALLOC -#define MEMORY_VERIFY_ALWAYS MBEDTLS_MEMORY_VERIFY_ALWAYS -#define MEMORY_VERIFY_FREE MBEDTLS_MEMORY_VERIFY_FREE -#define MEMORY_VERIFY_NONE MBEDTLS_MEMORY_VERIFY_NONE -#define MPI_CHK MBEDTLS_MPI_CHK -#define NET_PROTO_TCP MBEDTLS_NET_PROTO_TCP -#define NET_PROTO_UDP MBEDTLS_NET_PROTO_UDP -#define NS_CERT_TYPE_EMAIL MBEDTLS_X509_NS_CERT_TYPE_EMAIL -#define NS_CERT_TYPE_EMAIL_CA MBEDTLS_X509_NS_CERT_TYPE_EMAIL_CA -#define NS_CERT_TYPE_OBJECT_SIGNING MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING -#define NS_CERT_TYPE_OBJECT_SIGNING_CA MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA -#define NS_CERT_TYPE_RESERVED MBEDTLS_X509_NS_CERT_TYPE_RESERVED -#define NS_CERT_TYPE_SSL_CA MBEDTLS_X509_NS_CERT_TYPE_SSL_CA -#define NS_CERT_TYPE_SSL_CLIENT MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT -#define NS_CERT_TYPE_SSL_SERVER MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER -#define OID_ANSI_X9_62 MBEDTLS_OID_ANSI_X9_62 -#define OID_ANSI_X9_62_FIELD_TYPE MBEDTLS_OID_ANSI_X9_62_FIELD_TYPE -#define OID_ANSI_X9_62_PRIME_FIELD MBEDTLS_OID_ANSI_X9_62_PRIME_FIELD -#define OID_ANSI_X9_62_SIG MBEDTLS_OID_ANSI_X9_62_SIG -#define OID_ANSI_X9_62_SIG_SHA2 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 -#define OID_ANY_EXTENDED_KEY_USAGE MBEDTLS_OID_ANY_EXTENDED_KEY_USAGE -#define OID_AT MBEDTLS_OID_AT -#define OID_AT_CN MBEDTLS_OID_AT_CN -#define OID_AT_COUNTRY MBEDTLS_OID_AT_COUNTRY -#define OID_AT_DN_QUALIFIER MBEDTLS_OID_AT_DN_QUALIFIER -#define OID_AT_GENERATION_QUALIFIER MBEDTLS_OID_AT_GENERATION_QUALIFIER -#define OID_AT_GIVEN_NAME MBEDTLS_OID_AT_GIVEN_NAME -#define OID_AT_INITIALS MBEDTLS_OID_AT_INITIALS -#define OID_AT_LOCALITY MBEDTLS_OID_AT_LOCALITY -#define OID_AT_ORGANIZATION MBEDTLS_OID_AT_ORGANIZATION -#define OID_AT_ORG_UNIT MBEDTLS_OID_AT_ORG_UNIT -#define OID_AT_POSTAL_ADDRESS MBEDTLS_OID_AT_POSTAL_ADDRESS -#define OID_AT_POSTAL_CODE MBEDTLS_OID_AT_POSTAL_CODE -#define OID_AT_PSEUDONYM MBEDTLS_OID_AT_PSEUDONYM -#define OID_AT_SERIAL_NUMBER MBEDTLS_OID_AT_SERIAL_NUMBER -#define OID_AT_STATE MBEDTLS_OID_AT_STATE -#define OID_AT_SUR_NAME MBEDTLS_OID_AT_SUR_NAME -#define OID_AT_TITLE MBEDTLS_OID_AT_TITLE -#define OID_AT_UNIQUE_IDENTIFIER MBEDTLS_OID_AT_UNIQUE_IDENTIFIER -#define OID_AUTHORITY_KEY_IDENTIFIER MBEDTLS_OID_AUTHORITY_KEY_IDENTIFIER -#define OID_BASIC_CONSTRAINTS MBEDTLS_OID_BASIC_CONSTRAINTS -#define OID_CERTICOM MBEDTLS_OID_CERTICOM -#define OID_CERTIFICATE_POLICIES MBEDTLS_OID_CERTIFICATE_POLICIES -#define OID_CLIENT_AUTH MBEDTLS_OID_CLIENT_AUTH -#define OID_CMP MBEDTLS_OID_CMP -#define OID_CODE_SIGNING MBEDTLS_OID_CODE_SIGNING -#define OID_COUNTRY_US MBEDTLS_OID_COUNTRY_US -#define OID_CRL_DISTRIBUTION_POINTS MBEDTLS_OID_CRL_DISTRIBUTION_POINTS -#define OID_CRL_NUMBER MBEDTLS_OID_CRL_NUMBER -#define OID_DES_CBC MBEDTLS_OID_DES_CBC -#define OID_DES_EDE3_CBC MBEDTLS_OID_DES_EDE3_CBC -#define OID_DIGEST_ALG_MD2 MBEDTLS_OID_DIGEST_ALG_MD2 -#define OID_DIGEST_ALG_MD4 MBEDTLS_OID_DIGEST_ALG_MD4 -#define OID_DIGEST_ALG_MD5 MBEDTLS_OID_DIGEST_ALG_MD5 -#define OID_DIGEST_ALG_SHA1 MBEDTLS_OID_DIGEST_ALG_SHA1 -#define OID_DIGEST_ALG_SHA224 MBEDTLS_OID_DIGEST_ALG_SHA224 -#define OID_DIGEST_ALG_SHA256 MBEDTLS_OID_DIGEST_ALG_SHA256 -#define OID_DIGEST_ALG_SHA384 MBEDTLS_OID_DIGEST_ALG_SHA384 -#define OID_DIGEST_ALG_SHA512 MBEDTLS_OID_DIGEST_ALG_SHA512 -#define OID_DOMAIN_COMPONENT MBEDTLS_OID_DOMAIN_COMPONENT -#define OID_ECDSA_SHA1 MBEDTLS_OID_ECDSA_SHA1 -#define OID_ECDSA_SHA224 MBEDTLS_OID_ECDSA_SHA224 -#define OID_ECDSA_SHA256 MBEDTLS_OID_ECDSA_SHA256 -#define OID_ECDSA_SHA384 MBEDTLS_OID_ECDSA_SHA384 -#define OID_ECDSA_SHA512 MBEDTLS_OID_ECDSA_SHA512 -#define OID_EC_ALG_ECDH MBEDTLS_OID_EC_ALG_ECDH -#define OID_EC_ALG_UNRESTRICTED MBEDTLS_OID_EC_ALG_UNRESTRICTED -#define OID_EC_BRAINPOOL_V1 MBEDTLS_OID_EC_BRAINPOOL_V1 -#define OID_EC_GRP_BP256R1 MBEDTLS_OID_EC_GRP_BP256R1 -#define OID_EC_GRP_BP384R1 MBEDTLS_OID_EC_GRP_BP384R1 -#define OID_EC_GRP_BP512R1 MBEDTLS_OID_EC_GRP_BP512R1 -#define OID_EC_GRP_SECP192K1 MBEDTLS_OID_EC_GRP_SECP192K1 -#define OID_EC_GRP_SECP192R1 MBEDTLS_OID_EC_GRP_SECP192R1 -#define OID_EC_GRP_SECP224K1 MBEDTLS_OID_EC_GRP_SECP224K1 -#define OID_EC_GRP_SECP224R1 MBEDTLS_OID_EC_GRP_SECP224R1 -#define OID_EC_GRP_SECP256K1 MBEDTLS_OID_EC_GRP_SECP256K1 -#define OID_EC_GRP_SECP256R1 MBEDTLS_OID_EC_GRP_SECP256R1 -#define OID_EC_GRP_SECP384R1 MBEDTLS_OID_EC_GRP_SECP384R1 -#define OID_EC_GRP_SECP521R1 MBEDTLS_OID_EC_GRP_SECP521R1 -#define OID_EMAIL_PROTECTION MBEDTLS_OID_EMAIL_PROTECTION -#define OID_EXTENDED_KEY_USAGE MBEDTLS_OID_EXTENDED_KEY_USAGE -#define OID_FRESHEST_CRL MBEDTLS_OID_FRESHEST_CRL -#define OID_GOV MBEDTLS_OID_GOV -#define OID_HMAC_SHA1 MBEDTLS_OID_HMAC_SHA1 -#define OID_ID_CE MBEDTLS_OID_ID_CE -#define OID_INIHIBIT_ANYPOLICY MBEDTLS_OID_INIHIBIT_ANYPOLICY -#define OID_ISO_CCITT_DS MBEDTLS_OID_ISO_CCITT_DS -#define OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ISO_IDENTIFIED_ORG -#define OID_ISO_ITU_COUNTRY MBEDTLS_OID_ISO_ITU_COUNTRY -#define OID_ISO_ITU_US_ORG MBEDTLS_OID_ISO_ITU_US_ORG -#define OID_ISO_MEMBER_BODIES MBEDTLS_OID_ISO_MEMBER_BODIES -#define OID_ISSUER_ALT_NAME MBEDTLS_OID_ISSUER_ALT_NAME -#define OID_KEY_USAGE MBEDTLS_OID_KEY_USAGE -#define OID_KP MBEDTLS_OID_KP -#define OID_MGF1 MBEDTLS_OID_MGF1 -#define OID_NAME_CONSTRAINTS MBEDTLS_OID_NAME_CONSTRAINTS -#define OID_NETSCAPE MBEDTLS_OID_NETSCAPE -#define OID_NS_BASE_URL MBEDTLS_OID_NS_BASE_URL -#define OID_NS_CA_POLICY_URL MBEDTLS_OID_NS_CA_POLICY_URL -#define OID_NS_CA_REVOCATION_URL MBEDTLS_OID_NS_CA_REVOCATION_URL -#define OID_NS_CERT MBEDTLS_OID_NS_CERT -#define OID_NS_CERT_SEQUENCE MBEDTLS_OID_NS_CERT_SEQUENCE -#define OID_NS_CERT_TYPE MBEDTLS_OID_NS_CERT_TYPE -#define OID_NS_COMMENT MBEDTLS_OID_NS_COMMENT -#define OID_NS_DATA_TYPE MBEDTLS_OID_NS_DATA_TYPE -#define OID_NS_RENEWAL_URL MBEDTLS_OID_NS_RENEWAL_URL -#define OID_NS_REVOCATION_URL MBEDTLS_OID_NS_REVOCATION_URL -#define OID_NS_SSL_SERVER_NAME MBEDTLS_OID_NS_SSL_SERVER_NAME -#define OID_OCSP_SIGNING MBEDTLS_OID_OCSP_SIGNING -#define OID_OIW_SECSIG MBEDTLS_OID_OIW_SECSIG -#define OID_OIW_SECSIG_ALG MBEDTLS_OID_OIW_SECSIG_ALG -#define OID_OIW_SECSIG_SHA1 MBEDTLS_OID_OIW_SECSIG_SHA1 -#define OID_ORGANIZATION MBEDTLS_OID_ORGANIZATION -#define OID_ORG_ANSI_X9_62 MBEDTLS_OID_ORG_ANSI_X9_62 -#define OID_ORG_CERTICOM MBEDTLS_OID_ORG_CERTICOM -#define OID_ORG_DOD MBEDTLS_OID_ORG_DOD -#define OID_ORG_GOV MBEDTLS_OID_ORG_GOV -#define OID_ORG_NETSCAPE MBEDTLS_OID_ORG_NETSCAPE -#define OID_ORG_OIW MBEDTLS_OID_ORG_OIW -#define OID_ORG_RSA_DATA_SECURITY MBEDTLS_OID_ORG_RSA_DATA_SECURITY -#define OID_ORG_TELETRUST MBEDTLS_OID_ORG_TELETRUST -#define OID_PKCS MBEDTLS_OID_PKCS -#define OID_PKCS1 MBEDTLS_OID_PKCS1 -#define OID_PKCS12 MBEDTLS_OID_PKCS12 -#define OID_PKCS12_PBE MBEDTLS_OID_PKCS12_PBE -#define OID_PKCS12_PBE_SHA1_DES2_EDE_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_DES2_EDE_CBC -#define OID_PKCS12_PBE_SHA1_DES3_EDE_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_DES3_EDE_CBC -#define OID_PKCS12_PBE_SHA1_RC2_128_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_RC2_128_CBC -#define OID_PKCS12_PBE_SHA1_RC2_40_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_RC2_40_CBC -#define OID_PKCS12_PBE_SHA1_RC4_128 MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_128 -#define OID_PKCS12_PBE_SHA1_RC4_40 MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_40 -#define OID_PKCS1_MD2 MBEDTLS_OID_PKCS1_MD2 -#define OID_PKCS1_MD4 MBEDTLS_OID_PKCS1_MD4 -#define OID_PKCS1_MD5 MBEDTLS_OID_PKCS1_MD5 -#define OID_PKCS1_RSA MBEDTLS_OID_PKCS1_RSA -#define OID_PKCS1_SHA1 MBEDTLS_OID_PKCS1_SHA1 -#define OID_PKCS1_SHA224 MBEDTLS_OID_PKCS1_SHA224 -#define OID_PKCS1_SHA256 MBEDTLS_OID_PKCS1_SHA256 -#define OID_PKCS1_SHA384 MBEDTLS_OID_PKCS1_SHA384 -#define OID_PKCS1_SHA512 MBEDTLS_OID_PKCS1_SHA512 -#define OID_PKCS5 MBEDTLS_OID_PKCS5 -#define OID_PKCS5_PBES2 MBEDTLS_OID_PKCS5_PBES2 -#define OID_PKCS5_PBE_MD2_DES_CBC MBEDTLS_OID_PKCS5_PBE_MD2_DES_CBC -#define OID_PKCS5_PBE_MD2_RC2_CBC MBEDTLS_OID_PKCS5_PBE_MD2_RC2_CBC -#define OID_PKCS5_PBE_MD5_DES_CBC MBEDTLS_OID_PKCS5_PBE_MD5_DES_CBC -#define OID_PKCS5_PBE_MD5_RC2_CBC MBEDTLS_OID_PKCS5_PBE_MD5_RC2_CBC -#define OID_PKCS5_PBE_SHA1_DES_CBC MBEDTLS_OID_PKCS5_PBE_SHA1_DES_CBC -#define OID_PKCS5_PBE_SHA1_RC2_CBC MBEDTLS_OID_PKCS5_PBE_SHA1_RC2_CBC -#define OID_PKCS5_PBKDF2 MBEDTLS_OID_PKCS5_PBKDF2 -#define OID_PKCS5_PBMAC1 MBEDTLS_OID_PKCS5_PBMAC1 -#define OID_PKCS9 MBEDTLS_OID_PKCS9 -#define OID_PKCS9_CSR_EXT_REQ MBEDTLS_OID_PKCS9_CSR_EXT_REQ -#define OID_PKCS9_EMAIL MBEDTLS_OID_PKCS9_EMAIL -#define OID_PKIX MBEDTLS_OID_PKIX -#define OID_POLICY_CONSTRAINTS MBEDTLS_OID_POLICY_CONSTRAINTS -#define OID_POLICY_MAPPINGS MBEDTLS_OID_POLICY_MAPPINGS -#define OID_PRIVATE_KEY_USAGE_PERIOD MBEDTLS_OID_PRIVATE_KEY_USAGE_PERIOD -#define OID_RSASSA_PSS MBEDTLS_OID_RSASSA_PSS -#define OID_RSA_COMPANY MBEDTLS_OID_RSA_COMPANY -#define OID_RSA_SHA_OBS MBEDTLS_OID_RSA_SHA_OBS -#define OID_SERVER_AUTH MBEDTLS_OID_SERVER_AUTH -#define OID_SIZE MBEDTLS_OID_SIZE -#define OID_SUBJECT_ALT_NAME MBEDTLS_OID_SUBJECT_ALT_NAME -#define OID_SUBJECT_DIRECTORY_ATTRS MBEDTLS_OID_SUBJECT_DIRECTORY_ATTRS -#define OID_SUBJECT_KEY_IDENTIFIER MBEDTLS_OID_SUBJECT_KEY_IDENTIFIER -#define OID_TELETRUST MBEDTLS_OID_TELETRUST -#define OID_TIME_STAMPING MBEDTLS_OID_TIME_STAMPING -#define PADLOCK_ACE MBEDTLS_PADLOCK_ACE -#define PADLOCK_ALIGN16 MBEDTLS_PADLOCK_ALIGN16 -#define PADLOCK_PHE MBEDTLS_PADLOCK_PHE -#define PADLOCK_PMM MBEDTLS_PADLOCK_PMM -#define PADLOCK_RNG MBEDTLS_PADLOCK_RNG -#define PKCS12_DERIVE_IV MBEDTLS_PKCS12_DERIVE_IV -#define PKCS12_DERIVE_KEY MBEDTLS_PKCS12_DERIVE_KEY -#define PKCS12_DERIVE_MAC_KEY MBEDTLS_PKCS12_DERIVE_MAC_KEY -#define PKCS12_PBE_DECRYPT MBEDTLS_PKCS12_PBE_DECRYPT -#define PKCS12_PBE_ENCRYPT MBEDTLS_PKCS12_PBE_ENCRYPT -#define PKCS5_DECRYPT MBEDTLS_PKCS5_DECRYPT -#define PKCS5_ENCRYPT MBEDTLS_PKCS5_ENCRYPT -#define POLARSSL_AESNI_AES MBEDTLS_AESNI_AES -#define POLARSSL_AESNI_CLMUL MBEDTLS_AESNI_CLMUL -#define POLARSSL_AESNI_H MBEDTLS_AESNI_H -#define POLARSSL_AES_H MBEDTLS_AES_H -#define POLARSSL_ARC4_H MBEDTLS_ARC4_H -#define POLARSSL_ASN1_H MBEDTLS_ASN1_H -#define POLARSSL_ASN1_WRITE_H MBEDTLS_ASN1_WRITE_H -#define POLARSSL_BASE64_H MBEDTLS_BASE64_H -#define POLARSSL_BIGNUM_H MBEDTLS_BIGNUM_H -#define POLARSSL_BLOWFISH_H MBEDTLS_BLOWFISH_H -#define POLARSSL_BN_MUL_H MBEDTLS_BN_MUL_H -#define POLARSSL_CAMELLIA_H MBEDTLS_CAMELLIA_H -#define POLARSSL_CCM_H MBEDTLS_CCM_H -#define POLARSSL_CERTS_H MBEDTLS_CERTS_H -#define POLARSSL_CHECK_CONFIG_H MBEDTLS_CHECK_CONFIG_H -#define POLARSSL_CIPHERSUITE_NODTLS MBEDTLS_CIPHERSUITE_NODTLS -#define POLARSSL_CIPHERSUITE_SHORT_TAG MBEDTLS_CIPHERSUITE_SHORT_TAG -#define POLARSSL_CIPHERSUITE_WEAK MBEDTLS_CIPHERSUITE_WEAK -#define POLARSSL_CIPHER_AES_128_CBC MBEDTLS_CIPHER_AES_128_CBC -#define POLARSSL_CIPHER_AES_128_CCM MBEDTLS_CIPHER_AES_128_CCM -#define POLARSSL_CIPHER_AES_128_CFB128 MBEDTLS_CIPHER_AES_128_CFB128 -#define POLARSSL_CIPHER_AES_128_CTR MBEDTLS_CIPHER_AES_128_CTR -#define POLARSSL_CIPHER_AES_128_ECB MBEDTLS_CIPHER_AES_128_ECB -#define POLARSSL_CIPHER_AES_128_GCM MBEDTLS_CIPHER_AES_128_GCM -#define POLARSSL_CIPHER_AES_192_CBC MBEDTLS_CIPHER_AES_192_CBC -#define POLARSSL_CIPHER_AES_192_CCM MBEDTLS_CIPHER_AES_192_CCM -#define POLARSSL_CIPHER_AES_192_CFB128 MBEDTLS_CIPHER_AES_192_CFB128 -#define POLARSSL_CIPHER_AES_192_CTR MBEDTLS_CIPHER_AES_192_CTR -#define POLARSSL_CIPHER_AES_192_ECB MBEDTLS_CIPHER_AES_192_ECB -#define POLARSSL_CIPHER_AES_192_GCM MBEDTLS_CIPHER_AES_192_GCM -#define POLARSSL_CIPHER_AES_256_CBC MBEDTLS_CIPHER_AES_256_CBC -#define POLARSSL_CIPHER_AES_256_CCM MBEDTLS_CIPHER_AES_256_CCM -#define POLARSSL_CIPHER_AES_256_CFB128 MBEDTLS_CIPHER_AES_256_CFB128 -#define POLARSSL_CIPHER_AES_256_CTR MBEDTLS_CIPHER_AES_256_CTR -#define POLARSSL_CIPHER_AES_256_ECB MBEDTLS_CIPHER_AES_256_ECB -#define POLARSSL_CIPHER_AES_256_GCM MBEDTLS_CIPHER_AES_256_GCM -#define POLARSSL_CIPHER_ARC4_128 MBEDTLS_CIPHER_ARC4_128 -#define POLARSSL_CIPHER_BLOWFISH_CBC MBEDTLS_CIPHER_BLOWFISH_CBC -#define POLARSSL_CIPHER_BLOWFISH_CFB64 MBEDTLS_CIPHER_BLOWFISH_CFB64 -#define POLARSSL_CIPHER_BLOWFISH_CTR MBEDTLS_CIPHER_BLOWFISH_CTR -#define POLARSSL_CIPHER_BLOWFISH_ECB MBEDTLS_CIPHER_BLOWFISH_ECB -#define POLARSSL_CIPHER_CAMELLIA_128_CBC MBEDTLS_CIPHER_CAMELLIA_128_CBC -#define POLARSSL_CIPHER_CAMELLIA_128_CCM MBEDTLS_CIPHER_CAMELLIA_128_CCM -#define POLARSSL_CIPHER_CAMELLIA_128_CFB128 MBEDTLS_CIPHER_CAMELLIA_128_CFB128 -#define POLARSSL_CIPHER_CAMELLIA_128_CTR MBEDTLS_CIPHER_CAMELLIA_128_CTR -#define POLARSSL_CIPHER_CAMELLIA_128_ECB MBEDTLS_CIPHER_CAMELLIA_128_ECB -#define POLARSSL_CIPHER_CAMELLIA_128_GCM MBEDTLS_CIPHER_CAMELLIA_128_GCM -#define POLARSSL_CIPHER_CAMELLIA_192_CBC MBEDTLS_CIPHER_CAMELLIA_192_CBC -#define POLARSSL_CIPHER_CAMELLIA_192_CCM MBEDTLS_CIPHER_CAMELLIA_192_CCM -#define POLARSSL_CIPHER_CAMELLIA_192_CFB128 MBEDTLS_CIPHER_CAMELLIA_192_CFB128 -#define POLARSSL_CIPHER_CAMELLIA_192_CTR MBEDTLS_CIPHER_CAMELLIA_192_CTR -#define POLARSSL_CIPHER_CAMELLIA_192_ECB MBEDTLS_CIPHER_CAMELLIA_192_ECB -#define POLARSSL_CIPHER_CAMELLIA_192_GCM MBEDTLS_CIPHER_CAMELLIA_192_GCM -#define POLARSSL_CIPHER_CAMELLIA_256_CBC MBEDTLS_CIPHER_CAMELLIA_256_CBC -#define POLARSSL_CIPHER_CAMELLIA_256_CCM MBEDTLS_CIPHER_CAMELLIA_256_CCM -#define POLARSSL_CIPHER_CAMELLIA_256_CFB128 MBEDTLS_CIPHER_CAMELLIA_256_CFB128 -#define POLARSSL_CIPHER_CAMELLIA_256_CTR MBEDTLS_CIPHER_CAMELLIA_256_CTR -#define POLARSSL_CIPHER_CAMELLIA_256_ECB MBEDTLS_CIPHER_CAMELLIA_256_ECB -#define POLARSSL_CIPHER_CAMELLIA_256_GCM MBEDTLS_CIPHER_CAMELLIA_256_GCM -#define POLARSSL_CIPHER_DES_CBC MBEDTLS_CIPHER_DES_CBC -#define POLARSSL_CIPHER_DES_ECB MBEDTLS_CIPHER_DES_ECB -#define POLARSSL_CIPHER_DES_EDE3_CBC MBEDTLS_CIPHER_DES_EDE3_CBC -#define POLARSSL_CIPHER_DES_EDE3_ECB MBEDTLS_CIPHER_DES_EDE3_ECB -#define POLARSSL_CIPHER_DES_EDE_CBC MBEDTLS_CIPHER_DES_EDE_CBC -#define POLARSSL_CIPHER_DES_EDE_ECB MBEDTLS_CIPHER_DES_EDE_ECB -#define POLARSSL_CIPHER_H MBEDTLS_CIPHER_H -#define POLARSSL_CIPHER_ID_3DES MBEDTLS_CIPHER_ID_3DES -#define POLARSSL_CIPHER_ID_AES MBEDTLS_CIPHER_ID_AES -#define POLARSSL_CIPHER_ID_ARC4 MBEDTLS_CIPHER_ID_ARC4 -#define POLARSSL_CIPHER_ID_BLOWFISH MBEDTLS_CIPHER_ID_BLOWFISH -#define POLARSSL_CIPHER_ID_CAMELLIA MBEDTLS_CIPHER_ID_CAMELLIA -#define POLARSSL_CIPHER_ID_DES MBEDTLS_CIPHER_ID_DES -#define POLARSSL_CIPHER_ID_NONE MBEDTLS_CIPHER_ID_NONE -#define POLARSSL_CIPHER_ID_NULL MBEDTLS_CIPHER_ID_NULL -#define POLARSSL_CIPHER_MODE_AEAD MBEDTLS_CIPHER_MODE_AEAD -#define POLARSSL_CIPHER_MODE_STREAM MBEDTLS_CIPHER_MODE_STREAM -#define POLARSSL_CIPHER_MODE_WITH_PADDING MBEDTLS_CIPHER_MODE_WITH_PADDING -#define POLARSSL_CIPHER_NONE MBEDTLS_CIPHER_NONE -#define POLARSSL_CIPHER_NULL MBEDTLS_CIPHER_NULL -#define POLARSSL_CIPHER_VARIABLE_IV_LEN MBEDTLS_CIPHER_VARIABLE_IV_LEN -#define POLARSSL_CIPHER_VARIABLE_KEY_LEN MBEDTLS_CIPHER_VARIABLE_KEY_LEN -#define POLARSSL_CIPHER_WRAP_H MBEDTLS_CIPHER_WRAP_H -#define POLARSSL_CONFIG_H MBEDTLS_CONFIG_H -#define POLARSSL_CTR_DRBG_H MBEDTLS_CTR_DRBG_H -#define POLARSSL_DEBUG_H MBEDTLS_DEBUG_H -#define POLARSSL_DEBUG_LOG_FULL MBEDTLS_DEBUG_LOG_FULL -#define POLARSSL_DEBUG_LOG_RAW MBEDTLS_DEBUG_LOG_RAW -#define POLARSSL_DECRYPT MBEDTLS_DECRYPT -#define POLARSSL_DES_H MBEDTLS_DES_H -#define POLARSSL_DHM_H MBEDTLS_DHM_H -#define POLARSSL_DHM_RFC2409_MODP_1024_G MBEDTLS_DHM_RFC2409_MODP_1024_G -#define POLARSSL_DHM_RFC2409_MODP_1024_P MBEDTLS_DHM_RFC2409_MODP_1024_P -#define POLARSSL_DHM_RFC3526_MODP_2048_G MBEDTLS_DHM_RFC3526_MODP_2048_G -#define POLARSSL_DHM_RFC3526_MODP_2048_P MBEDTLS_DHM_RFC3526_MODP_2048_P -#define POLARSSL_DHM_RFC3526_MODP_3072_G MBEDTLS_DHM_RFC3526_MODP_3072_G -#define POLARSSL_DHM_RFC3526_MODP_3072_P MBEDTLS_DHM_RFC3526_MODP_3072_P -#define POLARSSL_DHM_RFC5114_MODP_1024_G MBEDTLS_DHM_RFC5114_MODP_1024_G -#define POLARSSL_DHM_RFC5114_MODP_1024_P MBEDTLS_DHM_RFC5114_MODP_1024_P -#define POLARSSL_DHM_RFC5114_MODP_2048_G MBEDTLS_DHM_RFC5114_MODP_2048_G -#define POLARSSL_DHM_RFC5114_MODP_2048_P MBEDTLS_DHM_RFC5114_MODP_2048_P -#define POLARSSL_ECDH_H MBEDTLS_ECDH_H -#define POLARSSL_ECDH_OURS MBEDTLS_ECDH_OURS -#define POLARSSL_ECDH_THEIRS MBEDTLS_ECDH_THEIRS -#define POLARSSL_ECDSA_H MBEDTLS_ECDSA_H -#define POLARSSL_ECP_DP_BP256R1 MBEDTLS_ECP_DP_BP256R1 -#define POLARSSL_ECP_DP_BP384R1 MBEDTLS_ECP_DP_BP384R1 -#define POLARSSL_ECP_DP_BP512R1 MBEDTLS_ECP_DP_BP512R1 -#define POLARSSL_ECP_DP_M255 MBEDTLS_ECP_DP_CURVE25519 -#define POLARSSL_ECP_DP_MAX MBEDTLS_ECP_DP_MAX -#define POLARSSL_ECP_DP_NONE MBEDTLS_ECP_DP_NONE -#define POLARSSL_ECP_DP_SECP192K1 MBEDTLS_ECP_DP_SECP192K1 -#define POLARSSL_ECP_DP_SECP192R1 MBEDTLS_ECP_DP_SECP192R1 -#define POLARSSL_ECP_DP_SECP224K1 MBEDTLS_ECP_DP_SECP224K1 -#define POLARSSL_ECP_DP_SECP224R1 MBEDTLS_ECP_DP_SECP224R1 -#define POLARSSL_ECP_DP_SECP256K1 MBEDTLS_ECP_DP_SECP256K1 -#define POLARSSL_ECP_DP_SECP256R1 MBEDTLS_ECP_DP_SECP256R1 -#define POLARSSL_ECP_DP_SECP384R1 MBEDTLS_ECP_DP_SECP384R1 -#define POLARSSL_ECP_DP_SECP521R1 MBEDTLS_ECP_DP_SECP521R1 -#define POLARSSL_ECP_H MBEDTLS_ECP_H -#define POLARSSL_ECP_MAX_BYTES MBEDTLS_ECP_MAX_BYTES -#define POLARSSL_ECP_MAX_PT_LEN MBEDTLS_ECP_MAX_PT_LEN -#define POLARSSL_ECP_PF_COMPRESSED MBEDTLS_ECP_PF_COMPRESSED -#define POLARSSL_ECP_PF_UNCOMPRESSED MBEDTLS_ECP_PF_UNCOMPRESSED -#define POLARSSL_ECP_TLS_NAMED_CURVE MBEDTLS_ECP_TLS_NAMED_CURVE -#define POLARSSL_ENCRYPT MBEDTLS_ENCRYPT -#define POLARSSL_ENTROPY_H MBEDTLS_ENTROPY_H -#define POLARSSL_ENTROPY_POLL_H MBEDTLS_ENTROPY_POLL_H -#define POLARSSL_ENTROPY_SHA256_ACCUMULATOR MBEDTLS_ENTROPY_SHA256_ACCUMULATOR -#define POLARSSL_ENTROPY_SHA512_ACCUMULATOR MBEDTLS_ENTROPY_SHA512_ACCUMULATOR -#define POLARSSL_ERROR_H MBEDTLS_ERROR_H -#define POLARSSL_ERR_AES_INVALID_INPUT_LENGTH MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH -#define POLARSSL_ERR_AES_INVALID_KEY_LENGTH MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -#define POLARSSL_ERR_ASN1_BUF_TOO_SMALL MBEDTLS_ERR_ASN1_BUF_TOO_SMALL -#define POLARSSL_ERR_ASN1_INVALID_DATA MBEDTLS_ERR_ASN1_INVALID_DATA -#define POLARSSL_ERR_ASN1_INVALID_LENGTH MBEDTLS_ERR_ASN1_INVALID_LENGTH -#define POLARSSL_ERR_ASN1_LENGTH_MISMATCH MBEDTLS_ERR_ASN1_LENGTH_MISMATCH -#define POLARSSL_ERR_ASN1_MALLOC_FAILED MBEDTLS_ERR_ASN1_ALLOC_FAILED -#define POLARSSL_ERR_ASN1_OUT_OF_DATA MBEDTLS_ERR_ASN1_OUT_OF_DATA -#define POLARSSL_ERR_ASN1_UNEXPECTED_TAG MBEDTLS_ERR_ASN1_UNEXPECTED_TAG -#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -#define POLARSSL_ERR_BASE64_INVALID_CHARACTER MBEDTLS_ERR_BASE64_INVALID_CHARACTER -#define POLARSSL_ERR_BLOWFISH_INVALID_INPUT_LENGTH MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -#define POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH -#define POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -#define POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -#define POLARSSL_ERR_CCM_AUTH_FAILED MBEDTLS_ERR_CCM_AUTH_FAILED -#define POLARSSL_ERR_CCM_BAD_INPUT MBEDTLS_ERR_CCM_BAD_INPUT -#define POLARSSL_ERR_CIPHER_ALLOC_FAILED MBEDTLS_ERR_CIPHER_ALLOC_FAILED -#define POLARSSL_ERR_CIPHER_AUTH_FAILED MBEDTLS_ERR_CIPHER_AUTH_FAILED -#define POLARSSL_ERR_CIPHER_BAD_INPUT_DATA MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA -#define POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED -#define POLARSSL_ERR_CIPHER_INVALID_PADDING MBEDTLS_ERR_CIPHER_INVALID_PADDING -#define POLARSSL_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -#define POLARSSL_ERR_CTR_DRBG_FILE_IO_ERROR MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR -#define POLARSSL_ERR_CTR_DRBG_INPUT_TOO_BIG MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG -#define POLARSSL_ERR_CTR_DRBG_REQUEST_TOO_BIG MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG -#define POLARSSL_ERR_DES_INVALID_INPUT_LENGTH MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH -#define POLARSSL_ERR_DHM_BAD_INPUT_DATA MBEDTLS_ERR_DHM_BAD_INPUT_DATA -#define POLARSSL_ERR_DHM_CALC_SECRET_FAILED MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -#define POLARSSL_ERR_DHM_FILE_IO_ERROR MBEDTLS_ERR_DHM_FILE_IO_ERROR -#define POLARSSL_ERR_DHM_INVALID_FORMAT MBEDTLS_ERR_DHM_INVALID_FORMAT -#define POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -#define POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -#define POLARSSL_ERR_DHM_MALLOC_FAILED MBEDTLS_ERR_DHM_ALLOC_FAILED -#define POLARSSL_ERR_DHM_READ_PARAMS_FAILED MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -#define POLARSSL_ERR_DHM_READ_PUBLIC_FAILED MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -#define POLARSSL_ERR_ECP_BAD_INPUT_DATA MBEDTLS_ERR_ECP_BAD_INPUT_DATA -#define POLARSSL_ERR_ECP_BUFFER_TOO_SMALL MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL -#define POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_ECP_INVALID_KEY MBEDTLS_ERR_ECP_INVALID_KEY -#define POLARSSL_ERR_ECP_MALLOC_FAILED MBEDTLS_ERR_ECP_ALLOC_FAILED -#define POLARSSL_ERR_ECP_RANDOM_FAILED MBEDTLS_ERR_ECP_RANDOM_FAILED -#define POLARSSL_ERR_ECP_SIG_LEN_MISMATCH MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -#define POLARSSL_ERR_ECP_VERIFY_FAILED MBEDTLS_ERR_ECP_VERIFY_FAILED -#define POLARSSL_ERR_ENTROPY_FILE_IO_ERROR MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR -#define POLARSSL_ERR_ENTROPY_MAX_SOURCES MBEDTLS_ERR_ENTROPY_MAX_SOURCES -#define POLARSSL_ERR_ENTROPY_NO_SOURCES_DEFINED MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED -#define POLARSSL_ERR_ENTROPY_SOURCE_FAILED MBEDTLS_ERR_ENTROPY_SOURCE_FAILED -#define POLARSSL_ERR_GCM_AUTH_FAILED MBEDTLS_ERR_GCM_AUTH_FAILED -#define POLARSSL_ERR_GCM_BAD_INPUT MBEDTLS_ERR_GCM_BAD_INPUT -#define POLARSSL_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED -#define POLARSSL_ERR_HMAC_DRBG_FILE_IO_ERROR MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR -#define POLARSSL_ERR_HMAC_DRBG_INPUT_TOO_BIG MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG -#define POLARSSL_ERR_HMAC_DRBG_REQUEST_TOO_BIG MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG -#define POLARSSL_ERR_MD2_FILE_IO_ERROR MBEDTLS_ERR_MD2_FILE_IO_ERROR -#define POLARSSL_ERR_MD4_FILE_IO_ERROR MBEDTLS_ERR_MD4_FILE_IO_ERROR -#define POLARSSL_ERR_MD5_FILE_IO_ERROR MBEDTLS_ERR_MD5_FILE_IO_ERROR -#define POLARSSL_ERR_MD_ALLOC_FAILED MBEDTLS_ERR_MD_ALLOC_FAILED -#define POLARSSL_ERR_MD_BAD_INPUT_DATA MBEDTLS_ERR_MD_BAD_INPUT_DATA -#define POLARSSL_ERR_MD_FEATURE_UNAVAILABLE MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_MD_FILE_IO_ERROR MBEDTLS_ERR_MD_FILE_IO_ERROR -#define POLARSSL_ERR_MPI_BAD_INPUT_DATA MBEDTLS_ERR_MPI_BAD_INPUT_DATA -#define POLARSSL_ERR_MPI_BUFFER_TOO_SMALL MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -#define POLARSSL_ERR_MPI_DIVISION_BY_ZERO MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -#define POLARSSL_ERR_MPI_FILE_IO_ERROR MBEDTLS_ERR_MPI_FILE_IO_ERROR -#define POLARSSL_ERR_MPI_INVALID_CHARACTER MBEDTLS_ERR_MPI_INVALID_CHARACTER -#define POLARSSL_ERR_MPI_MALLOC_FAILED MBEDTLS_ERR_MPI_ALLOC_FAILED -#define POLARSSL_ERR_MPI_NEGATIVE_VALUE MBEDTLS_ERR_MPI_NEGATIVE_VALUE -#define POLARSSL_ERR_MPI_NOT_ACCEPTABLE MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -#define POLARSSL_ERR_NET_ACCEPT_FAILED MBEDTLS_ERR_NET_ACCEPT_FAILED -#define POLARSSL_ERR_NET_BIND_FAILED MBEDTLS_ERR_NET_BIND_FAILED -#define POLARSSL_ERR_NET_CONNECT_FAILED MBEDTLS_ERR_NET_CONNECT_FAILED -#define POLARSSL_ERR_NET_CONN_RESET MBEDTLS_ERR_NET_CONN_RESET -#define POLARSSL_ERR_NET_LISTEN_FAILED MBEDTLS_ERR_NET_LISTEN_FAILED -#define POLARSSL_ERR_NET_RECV_FAILED MBEDTLS_ERR_NET_RECV_FAILED -#define POLARSSL_ERR_NET_SEND_FAILED MBEDTLS_ERR_NET_SEND_FAILED -#define POLARSSL_ERR_NET_SOCKET_FAILED MBEDTLS_ERR_NET_SOCKET_FAILED -#define POLARSSL_ERR_NET_TIMEOUT MBEDTLS_ERR_SSL_TIMEOUT -#define POLARSSL_ERR_NET_UNKNOWN_HOST MBEDTLS_ERR_NET_UNKNOWN_HOST -#define POLARSSL_ERR_NET_WANT_READ MBEDTLS_ERR_SSL_WANT_READ -#define POLARSSL_ERR_NET_WANT_WRITE MBEDTLS_ERR_SSL_WANT_WRITE -#define POLARSSL_ERR_OID_BUF_TOO_SMALL MBEDTLS_ERR_OID_BUF_TOO_SMALL -#define POLARSSL_ERR_OID_NOT_FOUND MBEDTLS_ERR_OID_NOT_FOUND -#define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED -#define POLARSSL_ERR_PBKDF2_BAD_INPUT_DATA MBEDTLS_ERR_PBKDF2_BAD_INPUT_DATA -#define POLARSSL_ERR_PEM_BAD_INPUT_DATA MBEDTLS_ERR_PEM_BAD_INPUT_DATA -#define POLARSSL_ERR_PEM_FEATURE_UNAVAILABLE MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_PEM_INVALID_DATA MBEDTLS_ERR_PEM_INVALID_DATA -#define POLARSSL_ERR_PEM_INVALID_ENC_IV MBEDTLS_ERR_PEM_INVALID_ENC_IV -#define POLARSSL_ERR_PEM_MALLOC_FAILED MBEDTLS_ERR_PEM_ALLOC_FAILED -#define POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT -#define POLARSSL_ERR_PEM_PASSWORD_MISMATCH MBEDTLS_ERR_PEM_PASSWORD_MISMATCH -#define POLARSSL_ERR_PEM_PASSWORD_REQUIRED MBEDTLS_ERR_PEM_PASSWORD_REQUIRED -#define POLARSSL_ERR_PEM_UNKNOWN_ENC_ALG MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG -#define POLARSSL_ERR_PKCS12_BAD_INPUT_DATA MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA -#define POLARSSL_ERR_PKCS12_FEATURE_UNAVAILABLE MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_PKCS12_PASSWORD_MISMATCH MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH -#define POLARSSL_ERR_PKCS12_PBE_INVALID_FORMAT MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT -#define POLARSSL_ERR_PKCS5_BAD_INPUT_DATA MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -#define POLARSSL_ERR_PKCS5_FEATURE_UNAVAILABLE MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_PKCS5_INVALID_FORMAT MBEDTLS_ERR_PKCS5_INVALID_FORMAT -#define POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -#define POLARSSL_ERR_PK_BAD_INPUT_DATA MBEDTLS_ERR_PK_BAD_INPUT_DATA -#define POLARSSL_ERR_PK_FEATURE_UNAVAILABLE MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_PK_FILE_IO_ERROR MBEDTLS_ERR_PK_FILE_IO_ERROR -#define POLARSSL_ERR_PK_INVALID_ALG MBEDTLS_ERR_PK_INVALID_ALG -#define POLARSSL_ERR_PK_INVALID_PUBKEY MBEDTLS_ERR_PK_INVALID_PUBKEY -#define POLARSSL_ERR_PK_KEY_INVALID_FORMAT MBEDTLS_ERR_PK_KEY_INVALID_FORMAT -#define POLARSSL_ERR_PK_KEY_INVALID_VERSION MBEDTLS_ERR_PK_KEY_INVALID_VERSION -#define POLARSSL_ERR_PK_MALLOC_FAILED MBEDTLS_ERR_PK_ALLOC_FAILED -#define POLARSSL_ERR_PK_PASSWORD_MISMATCH MBEDTLS_ERR_PK_PASSWORD_MISMATCH -#define POLARSSL_ERR_PK_PASSWORD_REQUIRED MBEDTLS_ERR_PK_PASSWORD_REQUIRED -#define POLARSSL_ERR_PK_SIG_LEN_MISMATCH MBEDTLS_ERR_PK_SIG_LEN_MISMATCH -#define POLARSSL_ERR_PK_TYPE_MISMATCH MBEDTLS_ERR_PK_TYPE_MISMATCH -#define POLARSSL_ERR_PK_UNKNOWN_NAMED_CURVE MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -#define POLARSSL_ERR_PK_UNKNOWN_PK_ALG MBEDTLS_ERR_PK_UNKNOWN_PK_ALG -#define POLARSSL_ERR_RIPEMD160_FILE_IO_ERROR MBEDTLS_ERR_RIPEMD160_FILE_IO_ERROR -#define POLARSSL_ERR_RSA_BAD_INPUT_DATA MBEDTLS_ERR_RSA_BAD_INPUT_DATA -#define POLARSSL_ERR_RSA_INVALID_PADDING MBEDTLS_ERR_RSA_INVALID_PADDING -#define POLARSSL_ERR_RSA_KEY_CHECK_FAILED MBEDTLS_ERR_RSA_KEY_CHECK_FAILED -#define POLARSSL_ERR_RSA_KEY_GEN_FAILED MBEDTLS_ERR_RSA_KEY_GEN_FAILED -#define POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE -#define POLARSSL_ERR_RSA_PRIVATE_FAILED MBEDTLS_ERR_RSA_PRIVATE_FAILED -#define POLARSSL_ERR_RSA_PUBLIC_FAILED MBEDTLS_ERR_RSA_PUBLIC_FAILED -#define POLARSSL_ERR_RSA_RNG_FAILED MBEDTLS_ERR_RSA_RNG_FAILED -#define POLARSSL_ERR_RSA_VERIFY_FAILED MBEDTLS_ERR_RSA_VERIFY_FAILED -#define POLARSSL_ERR_SHA1_FILE_IO_ERROR MBEDTLS_ERR_SHA1_FILE_IO_ERROR -#define POLARSSL_ERR_SHA256_FILE_IO_ERROR MBEDTLS_ERR_SHA256_FILE_IO_ERROR -#define POLARSSL_ERR_SHA512_FILE_IO_ERROR MBEDTLS_ERR_SHA512_FILE_IO_ERROR -#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE -#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST -#define POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY -#define POLARSSL_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC -#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO -#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE -#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS -#define POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP -#define POLARSSL_ERR_SSL_BAD_HS_FINISHED MBEDTLS_ERR_SSL_BAD_HS_FINISHED -#define POLARSSL_ERR_SSL_BAD_HS_NEW_SESSION_TICKET MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET -#define POLARSSL_ERR_SSL_BAD_HS_PROTOCOL_VERSION MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION -#define POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO -#define POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO_DONE MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO_DONE -#define POLARSSL_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE -#define POLARSSL_ERR_SSL_BAD_INPUT_DATA MBEDTLS_ERR_SSL_BAD_INPUT_DATA -#define POLARSSL_ERR_SSL_BUFFER_TOO_SMALL MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL -#define POLARSSL_ERR_SSL_CA_CHAIN_REQUIRED MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED -#define POLARSSL_ERR_SSL_CERTIFICATE_REQUIRED MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED -#define POLARSSL_ERR_SSL_CERTIFICATE_TOO_LARGE MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE -#define POLARSSL_ERR_SSL_COMPRESSION_FAILED MBEDTLS_ERR_SSL_COMPRESSION_FAILED -#define POLARSSL_ERR_SSL_CONN_EOF MBEDTLS_ERR_SSL_CONN_EOF -#define POLARSSL_ERR_SSL_COUNTER_WRAPPING MBEDTLS_ERR_SSL_COUNTER_WRAPPING -#define POLARSSL_ERR_SSL_FATAL_ALERT_MESSAGE MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE -#define POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_SSL_HELLO_VERIFY_REQUIRED MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED -#define POLARSSL_ERR_SSL_HW_ACCEL_FAILED MBEDTLS_ERR_SSL_HW_ACCEL_FAILED -#define POLARSSL_ERR_SSL_HW_ACCEL_FALLTHROUGH MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH -#define POLARSSL_ERR_SSL_INTERNAL_ERROR MBEDTLS_ERR_SSL_INTERNAL_ERROR -#define POLARSSL_ERR_SSL_INVALID_MAC MBEDTLS_ERR_SSL_INVALID_MAC -#define POLARSSL_ERR_SSL_INVALID_RECORD MBEDTLS_ERR_SSL_INVALID_RECORD -#define POLARSSL_ERR_SSL_MALLOC_FAILED MBEDTLS_ERR_SSL_ALLOC_FAILED -#define POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN -#define POLARSSL_ERR_SSL_NO_CLIENT_CERTIFICATE MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE -#define POLARSSL_ERR_SSL_NO_RNG MBEDTLS_ERR_SSL_NO_RNG -#define POLARSSL_ERR_SSL_NO_USABLE_CIPHERSUITE MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE -#define POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY -#define POLARSSL_ERR_SSL_PEER_VERIFY_FAILED MBEDTLS_ERR_SSL_PEER_VERIFY_FAILED -#define POLARSSL_ERR_SSL_PK_TYPE_MISMATCH MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH -#define POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED -#define POLARSSL_ERR_SSL_SESSION_TICKET_EXPIRED MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED -#define POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE -#define POLARSSL_ERR_SSL_UNKNOWN_CIPHER MBEDTLS_ERR_SSL_UNKNOWN_CIPHER -#define POLARSSL_ERR_SSL_UNKNOWN_IDENTITY MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY -#define POLARSSL_ERR_SSL_WAITING_SERVER_HELLO_RENEGO MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO -#define POLARSSL_ERR_THREADING_BAD_INPUT_DATA MBEDTLS_ERR_THREADING_BAD_INPUT_DATA -#define POLARSSL_ERR_THREADING_FEATURE_UNAVAILABLE MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_THREADING_MUTEX_ERROR MBEDTLS_ERR_THREADING_MUTEX_ERROR -#define POLARSSL_ERR_X509_BAD_INPUT_DATA MBEDTLS_ERR_X509_BAD_INPUT_DATA -#define POLARSSL_ERR_X509_CERT_UNKNOWN_FORMAT MBEDTLS_ERR_X509_CERT_UNKNOWN_FORMAT -#define POLARSSL_ERR_X509_CERT_VERIFY_FAILED MBEDTLS_ERR_X509_CERT_VERIFY_FAILED -#define POLARSSL_ERR_X509_FEATURE_UNAVAILABLE MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE -#define POLARSSL_ERR_X509_FILE_IO_ERROR MBEDTLS_ERR_X509_FILE_IO_ERROR -#define POLARSSL_ERR_X509_INVALID_ALG MBEDTLS_ERR_X509_INVALID_ALG -#define POLARSSL_ERR_X509_INVALID_DATE MBEDTLS_ERR_X509_INVALID_DATE -#define POLARSSL_ERR_X509_INVALID_EXTENSIONS MBEDTLS_ERR_X509_INVALID_EXTENSIONS -#define POLARSSL_ERR_X509_INVALID_FORMAT MBEDTLS_ERR_X509_INVALID_FORMAT -#define POLARSSL_ERR_X509_INVALID_NAME MBEDTLS_ERR_X509_INVALID_NAME -#define POLARSSL_ERR_X509_INVALID_SERIAL MBEDTLS_ERR_X509_INVALID_SERIAL -#define POLARSSL_ERR_X509_INVALID_SIGNATURE MBEDTLS_ERR_X509_INVALID_SIGNATURE -#define POLARSSL_ERR_X509_INVALID_VERSION MBEDTLS_ERR_X509_INVALID_VERSION -#define POLARSSL_ERR_X509_MALLOC_FAILED MBEDTLS_ERR_X509_ALLOC_FAILED -#define POLARSSL_ERR_X509_SIG_MISMATCH MBEDTLS_ERR_X509_SIG_MISMATCH -#define POLARSSL_ERR_X509_UNKNOWN_OID MBEDTLS_ERR_X509_UNKNOWN_OID -#define POLARSSL_ERR_X509_UNKNOWN_SIG_ALG MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG -#define POLARSSL_ERR_X509_UNKNOWN_VERSION MBEDTLS_ERR_X509_UNKNOWN_VERSION -#define POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH -#define POLARSSL_GCM_H MBEDTLS_GCM_H -#define POLARSSL_HAVEGE_H MBEDTLS_HAVEGE_H -#define POLARSSL_HAVE_INT32 MBEDTLS_HAVE_INT32 -#define POLARSSL_HAVE_INT64 MBEDTLS_HAVE_INT64 -#define POLARSSL_HAVE_UDBL MBEDTLS_HAVE_UDBL -#define POLARSSL_HAVE_X86 MBEDTLS_HAVE_X86 -#define POLARSSL_HAVE_X86_64 MBEDTLS_HAVE_X86_64 -#define POLARSSL_HMAC_DRBG_H MBEDTLS_HMAC_DRBG_H -#define POLARSSL_HMAC_DRBG_PR_OFF MBEDTLS_HMAC_DRBG_PR_OFF -#define POLARSSL_HMAC_DRBG_PR_ON MBEDTLS_HMAC_DRBG_PR_ON -#define POLARSSL_KEY_EXCHANGE_DHE_PSK MBEDTLS_KEY_EXCHANGE_DHE_PSK -#define POLARSSL_KEY_EXCHANGE_DHE_RSA MBEDTLS_KEY_EXCHANGE_DHE_RSA -#define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA -#define POLARSSL_KEY_EXCHANGE_ECDHE_PSK MBEDTLS_KEY_EXCHANGE_ECDHE_PSK -#define POLARSSL_KEY_EXCHANGE_ECDHE_RSA MBEDTLS_KEY_EXCHANGE_ECDHE_RSA -#define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA -#define POLARSSL_KEY_EXCHANGE_ECDH_RSA MBEDTLS_KEY_EXCHANGE_ECDH_RSA -#define POLARSSL_KEY_EXCHANGE_NONE MBEDTLS_KEY_EXCHANGE_NONE -#define POLARSSL_KEY_EXCHANGE_PSK MBEDTLS_KEY_EXCHANGE_PSK -#define POLARSSL_KEY_EXCHANGE_RSA MBEDTLS_KEY_EXCHANGE_RSA -#define POLARSSL_KEY_EXCHANGE_RSA_PSK MBEDTLS_KEY_EXCHANGE_RSA_PSK -#define POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED -#define POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED -#define POLARSSL_KEY_EXCHANGE__WITH_CERT__ENABLED MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED -#define POLARSSL_KEY_LENGTH_DES MBEDTLS_KEY_LENGTH_DES -#define POLARSSL_KEY_LENGTH_DES_EDE MBEDTLS_KEY_LENGTH_DES_EDE -#define POLARSSL_KEY_LENGTH_DES_EDE3 MBEDTLS_KEY_LENGTH_DES_EDE3 -#define POLARSSL_KEY_LENGTH_NONE MBEDTLS_KEY_LENGTH_NONE -#define POLARSSL_MAX_BLOCK_LENGTH MBEDTLS_MAX_BLOCK_LENGTH -#define POLARSSL_MAX_IV_LENGTH MBEDTLS_MAX_IV_LENGTH -#define POLARSSL_MD2_H MBEDTLS_MD2_H -#define POLARSSL_MD4_H MBEDTLS_MD4_H -#define POLARSSL_MD5_H MBEDTLS_MD5_H -#define POLARSSL_MD_H MBEDTLS_MD_H -#define POLARSSL_MD_MAX_SIZE MBEDTLS_MD_MAX_SIZE -#define POLARSSL_MD_MD2 MBEDTLS_MD_MD2 -#define POLARSSL_MD_MD4 MBEDTLS_MD_MD4 -#define POLARSSL_MD_MD5 MBEDTLS_MD_MD5 -#define POLARSSL_MD_NONE MBEDTLS_MD_NONE -#define POLARSSL_MD_RIPEMD160 MBEDTLS_MD_RIPEMD160 -#define POLARSSL_MD_SHA1 MBEDTLS_MD_SHA1 -#define POLARSSL_MD_SHA224 MBEDTLS_MD_SHA224 -#define POLARSSL_MD_SHA256 MBEDTLS_MD_SHA256 -#define POLARSSL_MD_SHA384 MBEDTLS_MD_SHA384 -#define POLARSSL_MD_SHA512 MBEDTLS_MD_SHA512 -#define POLARSSL_MD_WRAP_H MBEDTLS_MD_WRAP_H -#define POLARSSL_MEMORY_BUFFER_ALLOC_H MBEDTLS_MEMORY_BUFFER_ALLOC_H -#define POLARSSL_MEMORY_H MBEDTLS_MEMORY_H -#define POLARSSL_MODE_CBC MBEDTLS_MODE_CBC -#define POLARSSL_MODE_CCM MBEDTLS_MODE_CCM -#define POLARSSL_MODE_CFB MBEDTLS_MODE_CFB -#define POLARSSL_MODE_CTR MBEDTLS_MODE_CTR -#define POLARSSL_MODE_ECB MBEDTLS_MODE_ECB -#define POLARSSL_MODE_GCM MBEDTLS_MODE_GCM -#define POLARSSL_MODE_NONE MBEDTLS_MODE_NONE -#define POLARSSL_MODE_OFB MBEDTLS_MODE_OFB -#define POLARSSL_MODE_STREAM MBEDTLS_MODE_STREAM -#define POLARSSL_MPI_MAX_BITS MBEDTLS_MPI_MAX_BITS -#define POLARSSL_MPI_MAX_BITS_SCALE100 MBEDTLS_MPI_MAX_BITS_SCALE100 -#define POLARSSL_MPI_MAX_LIMBS MBEDTLS_MPI_MAX_LIMBS -#define POLARSSL_MPI_RW_BUFFER_SIZE MBEDTLS_MPI_RW_BUFFER_SIZE -#define POLARSSL_NET_H MBEDTLS_NET_H -#define POLARSSL_NET_LISTEN_BACKLOG MBEDTLS_NET_LISTEN_BACKLOG -#define POLARSSL_OID_H MBEDTLS_OID_H -#define POLARSSL_OPERATION_NONE MBEDTLS_OPERATION_NONE -#define POLARSSL_PADDING_NONE MBEDTLS_PADDING_NONE -#define POLARSSL_PADDING_ONE_AND_ZEROS MBEDTLS_PADDING_ONE_AND_ZEROS -#define POLARSSL_PADDING_PKCS7 MBEDTLS_PADDING_PKCS7 -#define POLARSSL_PADDING_ZEROS MBEDTLS_PADDING_ZEROS -#define POLARSSL_PADDING_ZEROS_AND_LEN MBEDTLS_PADDING_ZEROS_AND_LEN -#define POLARSSL_PADLOCK_H MBEDTLS_PADLOCK_H -#define POLARSSL_PBKDF2_H MBEDTLS_PBKDF2_H -#define POLARSSL_PEM_H MBEDTLS_PEM_H -#define POLARSSL_PKCS11_H MBEDTLS_PKCS11_H -#define POLARSSL_PKCS12_H MBEDTLS_PKCS12_H -#define POLARSSL_PKCS5_H MBEDTLS_PKCS5_H -#define POLARSSL_PK_DEBUG_ECP MBEDTLS_PK_DEBUG_ECP -#define POLARSSL_PK_DEBUG_MAX_ITEMS MBEDTLS_PK_DEBUG_MAX_ITEMS -#define POLARSSL_PK_DEBUG_MPI MBEDTLS_PK_DEBUG_MPI -#define POLARSSL_PK_DEBUG_NONE MBEDTLS_PK_DEBUG_NONE -#define POLARSSL_PK_ECDSA MBEDTLS_PK_ECDSA -#define POLARSSL_PK_ECKEY MBEDTLS_PK_ECKEY -#define POLARSSL_PK_ECKEY_DH MBEDTLS_PK_ECKEY_DH -#define POLARSSL_PK_H MBEDTLS_PK_H -#define POLARSSL_PK_NONE MBEDTLS_PK_NONE -#define POLARSSL_PK_RSA MBEDTLS_PK_RSA -#define POLARSSL_PK_RSASSA_PSS MBEDTLS_PK_RSASSA_PSS -#define POLARSSL_PK_RSA_ALT MBEDTLS_PK_RSA_ALT -#define POLARSSL_PK_WRAP_H MBEDTLS_PK_WRAP_H -#define POLARSSL_PLATFORM_H MBEDTLS_PLATFORM_H -#define POLARSSL_PREMASTER_SIZE MBEDTLS_PREMASTER_SIZE -#define POLARSSL_RIPEMD160_H MBEDTLS_RIPEMD160_H -#define POLARSSL_RSA_H MBEDTLS_RSA_H -#define POLARSSL_SHA1_H MBEDTLS_SHA1_H -#define POLARSSL_SHA256_H MBEDTLS_SHA256_H -#define POLARSSL_SHA512_H MBEDTLS_SHA512_H -#define POLARSSL_SSL_CACHE_H MBEDTLS_SSL_CACHE_H -#define POLARSSL_SSL_CIPHERSUITES_H MBEDTLS_SSL_CIPHERSUITES_H -#define POLARSSL_SSL_COOKIE_H MBEDTLS_SSL_COOKIE_H -#define POLARSSL_SSL_H MBEDTLS_SSL_H -#define POLARSSL_THREADING_H MBEDTLS_THREADING_H -#define POLARSSL_THREADING_IMPL MBEDTLS_THREADING_IMPL -#define POLARSSL_TIMING_H MBEDTLS_TIMING_H -#define POLARSSL_VERSION_H MBEDTLS_VERSION_H -#define POLARSSL_VERSION_MAJOR MBEDTLS_VERSION_MAJOR -#define POLARSSL_VERSION_MINOR MBEDTLS_VERSION_MINOR -#define POLARSSL_VERSION_NUMBER MBEDTLS_VERSION_NUMBER -#define POLARSSL_VERSION_PATCH MBEDTLS_VERSION_PATCH -#define POLARSSL_VERSION_STRING MBEDTLS_VERSION_STRING -#define POLARSSL_VERSION_STRING_FULL MBEDTLS_VERSION_STRING_FULL -#define POLARSSL_X509_CRL_H MBEDTLS_X509_CRL_H -#define POLARSSL_X509_CRT_H MBEDTLS_X509_CRT_H -#define POLARSSL_X509_CSR_H MBEDTLS_X509_CSR_H -#define POLARSSL_X509_H MBEDTLS_X509_H -#define POLARSSL_XTEA_H MBEDTLS_XTEA_H -#define RSA_CRYPT MBEDTLS_RSA_CRYPT -#define RSA_PKCS_V15 MBEDTLS_RSA_PKCS_V15 -#define RSA_PKCS_V21 MBEDTLS_RSA_PKCS_V21 -#define RSA_PRIVATE MBEDTLS_RSA_PRIVATE -#define RSA_PUBLIC MBEDTLS_RSA_PUBLIC -#define RSA_SALT_LEN_ANY MBEDTLS_RSA_SALT_LEN_ANY -#define RSA_SIGN MBEDTLS_RSA_SIGN -#define SSL_ALERT_LEVEL_FATAL MBEDTLS_SSL_ALERT_LEVEL_FATAL -#define SSL_ALERT_LEVEL_WARNING MBEDTLS_SSL_ALERT_LEVEL_WARNING -#define SSL_ALERT_MSG_ACCESS_DENIED MBEDTLS_SSL_ALERT_MSG_ACCESS_DENIED -#define SSL_ALERT_MSG_BAD_CERT MBEDTLS_SSL_ALERT_MSG_BAD_CERT -#define SSL_ALERT_MSG_BAD_RECORD_MAC MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC -#define SSL_ALERT_MSG_CERT_EXPIRED MBEDTLS_SSL_ALERT_MSG_CERT_EXPIRED -#define SSL_ALERT_MSG_CERT_REVOKED MBEDTLS_SSL_ALERT_MSG_CERT_REVOKED -#define SSL_ALERT_MSG_CERT_UNKNOWN MBEDTLS_SSL_ALERT_MSG_CERT_UNKNOWN -#define SSL_ALERT_MSG_CLOSE_NOTIFY MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY -#define SSL_ALERT_MSG_DECODE_ERROR MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR -#define SSL_ALERT_MSG_DECOMPRESSION_FAILURE MBEDTLS_SSL_ALERT_MSG_DECOMPRESSION_FAILURE -#define SSL_ALERT_MSG_DECRYPTION_FAILED MBEDTLS_SSL_ALERT_MSG_DECRYPTION_FAILED -#define SSL_ALERT_MSG_DECRYPT_ERROR MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR -#define SSL_ALERT_MSG_EXPORT_RESTRICTION MBEDTLS_SSL_ALERT_MSG_EXPORT_RESTRICTION -#define SSL_ALERT_MSG_HANDSHAKE_FAILURE MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE -#define SSL_ALERT_MSG_ILLEGAL_PARAMETER MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER -#define SSL_ALERT_MSG_INAPROPRIATE_FALLBACK MBEDTLS_SSL_ALERT_MSG_INAPROPRIATE_FALLBACK -#define SSL_ALERT_MSG_INSUFFICIENT_SECURITY MBEDTLS_SSL_ALERT_MSG_INSUFFICIENT_SECURITY -#define SSL_ALERT_MSG_INTERNAL_ERROR MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR -#define SSL_ALERT_MSG_NO_APPLICATION_PROTOCOL MBEDTLS_SSL_ALERT_MSG_NO_APPLICATION_PROTOCOL -#define SSL_ALERT_MSG_NO_CERT MBEDTLS_SSL_ALERT_MSG_NO_CERT -#define SSL_ALERT_MSG_NO_RENEGOTIATION MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION -#define SSL_ALERT_MSG_PROTOCOL_VERSION MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION -#define SSL_ALERT_MSG_RECORD_OVERFLOW MBEDTLS_SSL_ALERT_MSG_RECORD_OVERFLOW -#define SSL_ALERT_MSG_UNEXPECTED_MESSAGE MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE -#define SSL_ALERT_MSG_UNKNOWN_CA MBEDTLS_SSL_ALERT_MSG_UNKNOWN_CA -#define SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY -#define SSL_ALERT_MSG_UNRECOGNIZED_NAME MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME -#define SSL_ALERT_MSG_UNSUPPORTED_CERT MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_CERT -#define SSL_ALERT_MSG_UNSUPPORTED_EXT MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_EXT -#define SSL_ALERT_MSG_USER_CANCELED MBEDTLS_SSL_ALERT_MSG_USER_CANCELED -#define SSL_ANTI_REPLAY_DISABLED MBEDTLS_SSL_ANTI_REPLAY_DISABLED -#define SSL_ANTI_REPLAY_ENABLED MBEDTLS_SSL_ANTI_REPLAY_ENABLED -#define SSL_ARC4_DISABLED MBEDTLS_SSL_ARC4_DISABLED -#define SSL_ARC4_ENABLED MBEDTLS_SSL_ARC4_ENABLED -#define SSL_BUFFER_LEN MBEDTLS_SSL_BUFFER_LEN -#define SSL_CACHE_DEFAULT_MAX_ENTRIES MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES -#define SSL_CACHE_DEFAULT_TIMEOUT MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT -#define SSL_CBC_RECORD_SPLITTING_DISABLED MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED -#define SSL_CBC_RECORD_SPLITTING_ENABLED MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED -#define SSL_CERTIFICATE_REQUEST MBEDTLS_SSL_CERTIFICATE_REQUEST -#define SSL_CERTIFICATE_VERIFY MBEDTLS_SSL_CERTIFICATE_VERIFY -#define SSL_CERT_TYPE_ECDSA_SIGN MBEDTLS_SSL_CERT_TYPE_ECDSA_SIGN -#define SSL_CERT_TYPE_RSA_SIGN MBEDTLS_SSL_CERT_TYPE_RSA_SIGN -#define SSL_CHANNEL_INBOUND MBEDTLS_SSL_CHANNEL_INBOUND -#define SSL_CHANNEL_OUTBOUND MBEDTLS_SSL_CHANNEL_OUTBOUND -#define SSL_CIPHERSUITES MBEDTLS_SSL_CIPHERSUITES -#define SSL_CLIENT_CERTIFICATE MBEDTLS_SSL_CLIENT_CERTIFICATE -#define SSL_CLIENT_CHANGE_CIPHER_SPEC MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC -#define SSL_CLIENT_FINISHED MBEDTLS_SSL_CLIENT_FINISHED -#define SSL_CLIENT_HELLO MBEDTLS_SSL_CLIENT_HELLO -#define SSL_CLIENT_KEY_EXCHANGE MBEDTLS_SSL_CLIENT_KEY_EXCHANGE -#define SSL_COMPRESSION_ADD MBEDTLS_SSL_COMPRESSION_ADD -#define SSL_COMPRESS_DEFLATE MBEDTLS_SSL_COMPRESS_DEFLATE -#define SSL_COMPRESS_NULL MBEDTLS_SSL_COMPRESS_NULL -#define SSL_DEBUG_BUF MBEDTLS_SSL_DEBUG_BUF -#define SSL_DEBUG_CRT MBEDTLS_SSL_DEBUG_CRT -#define SSL_DEBUG_ECP MBEDTLS_SSL_DEBUG_ECP -#define SSL_DEBUG_MPI MBEDTLS_SSL_DEBUG_MPI -#define SSL_DEBUG_MSG MBEDTLS_SSL_DEBUG_MSG -#define SSL_DEBUG_RET MBEDTLS_SSL_DEBUG_RET -#define SSL_DEFAULT_TICKET_LIFETIME MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME -#define SSL_DTLS_TIMEOUT_DFL_MAX MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MAX -#define SSL_DTLS_TIMEOUT_DFL_MIN MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MIN -#define SSL_EMPTY_RENEGOTIATION_INFO MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO -#define SSL_ETM_DISABLED MBEDTLS_SSL_ETM_DISABLED -#define SSL_ETM_ENABLED MBEDTLS_SSL_ETM_ENABLED -#define SSL_EXTENDED_MS_DISABLED MBEDTLS_SSL_EXTENDED_MS_DISABLED -#define SSL_EXTENDED_MS_ENABLED MBEDTLS_SSL_EXTENDED_MS_ENABLED -#define SSL_FALLBACK_SCSV MBEDTLS_SSL_FALLBACK_SCSV -#define SSL_FLUSH_BUFFERS MBEDTLS_SSL_FLUSH_BUFFERS -#define SSL_HANDSHAKE_OVER MBEDTLS_SSL_HANDSHAKE_OVER -#define SSL_HANDSHAKE_WRAPUP MBEDTLS_SSL_HANDSHAKE_WRAPUP -#define SSL_HASH_MD5 MBEDTLS_SSL_HASH_MD5 -#define SSL_HASH_NONE MBEDTLS_SSL_HASH_NONE -#define SSL_HASH_SHA1 MBEDTLS_SSL_HASH_SHA1 -#define SSL_HASH_SHA224 MBEDTLS_SSL_HASH_SHA224 -#define SSL_HASH_SHA256 MBEDTLS_SSL_HASH_SHA256 -#define SSL_HASH_SHA384 MBEDTLS_SSL_HASH_SHA384 -#define SSL_HASH_SHA512 MBEDTLS_SSL_HASH_SHA512 -#define SSL_HELLO_REQUEST MBEDTLS_SSL_HELLO_REQUEST -#define SSL_HS_CERTIFICATE MBEDTLS_SSL_HS_CERTIFICATE -#define SSL_HS_CERTIFICATE_REQUEST MBEDTLS_SSL_HS_CERTIFICATE_REQUEST -#define SSL_HS_CERTIFICATE_VERIFY MBEDTLS_SSL_HS_CERTIFICATE_VERIFY -#define SSL_HS_CLIENT_HELLO MBEDTLS_SSL_HS_CLIENT_HELLO -#define SSL_HS_CLIENT_KEY_EXCHANGE MBEDTLS_SSL_HS_CLIENT_KEY_EXCHANGE -#define SSL_HS_FINISHED MBEDTLS_SSL_HS_FINISHED -#define SSL_HS_HELLO_REQUEST MBEDTLS_SSL_HS_HELLO_REQUEST -#define SSL_HS_HELLO_VERIFY_REQUEST MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST -#define SSL_HS_NEW_SESSION_TICKET MBEDTLS_SSL_HS_NEW_SESSION_TICKET -#define SSL_HS_SERVER_HELLO MBEDTLS_SSL_HS_SERVER_HELLO -#define SSL_HS_SERVER_HELLO_DONE MBEDTLS_SSL_HS_SERVER_HELLO_DONE -#define SSL_HS_SERVER_KEY_EXCHANGE MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE -#define SSL_INITIAL_HANDSHAKE MBEDTLS_SSL_INITIAL_HANDSHAKE -#define SSL_IS_CLIENT MBEDTLS_SSL_IS_CLIENT -#define SSL_IS_FALLBACK MBEDTLS_SSL_IS_FALLBACK -#define SSL_IS_NOT_FALLBACK MBEDTLS_SSL_IS_NOT_FALLBACK -#define SSL_IS_SERVER MBEDTLS_SSL_IS_SERVER -#define SSL_LEGACY_ALLOW_RENEGOTIATION MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION -#define SSL_LEGACY_BREAK_HANDSHAKE MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE -#define SSL_LEGACY_NO_RENEGOTIATION MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION -#define SSL_LEGACY_RENEGOTIATION MBEDTLS_SSL_LEGACY_RENEGOTIATION -#define SSL_MAC_ADD MBEDTLS_SSL_MAC_ADD -#define SSL_MAJOR_VERSION_3 MBEDTLS_SSL_MAJOR_VERSION_3 -#define SSL_MAX_CONTENT_LEN MBEDTLS_SSL_MAX_CONTENT_LEN -#define SSL_MAX_FRAG_LEN_1024 MBEDTLS_SSL_MAX_FRAG_LEN_1024 -#define SSL_MAX_FRAG_LEN_2048 MBEDTLS_SSL_MAX_FRAG_LEN_2048 -#define SSL_MAX_FRAG_LEN_4096 MBEDTLS_SSL_MAX_FRAG_LEN_4096 -#define SSL_MAX_FRAG_LEN_512 MBEDTLS_SSL_MAX_FRAG_LEN_512 -#define SSL_MAX_FRAG_LEN_INVALID MBEDTLS_SSL_MAX_FRAG_LEN_INVALID -#define SSL_MAX_FRAG_LEN_NONE MBEDTLS_SSL_MAX_FRAG_LEN_NONE -#define SSL_MAX_MAJOR_VERSION MBEDTLS_SSL_MAX_MAJOR_VERSION -#define SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MAX_MINOR_VERSION -#define SSL_MINOR_VERSION_0 MBEDTLS_SSL_MINOR_VERSION_0 -#define SSL_MINOR_VERSION_1 MBEDTLS_SSL_MINOR_VERSION_1 -#define SSL_MINOR_VERSION_2 MBEDTLS_SSL_MINOR_VERSION_2 -#define SSL_MINOR_VERSION_3 MBEDTLS_SSL_MINOR_VERSION_3 -#define SSL_MIN_MAJOR_VERSION MBEDTLS_SSL_MIN_MAJOR_VERSION -#define SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MIN_MINOR_VERSION -#define SSL_MSG_ALERT MBEDTLS_SSL_MSG_ALERT -#define SSL_MSG_APPLICATION_DATA MBEDTLS_SSL_MSG_APPLICATION_DATA -#define SSL_MSG_CHANGE_CIPHER_SPEC MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC -#define SSL_MSG_HANDSHAKE MBEDTLS_SSL_MSG_HANDSHAKE -#define SSL_PADDING_ADD MBEDTLS_SSL_PADDING_ADD -#define SSL_RENEGOTIATION MBEDTLS_SSL_RENEGOTIATION -#define SSL_RENEGOTIATION_DISABLED MBEDTLS_SSL_RENEGOTIATION_DISABLED -#define SSL_RENEGOTIATION_DONE MBEDTLS_SSL_RENEGOTIATION_DONE -#define SSL_RENEGOTIATION_ENABLED MBEDTLS_SSL_RENEGOTIATION_ENABLED -#define SSL_RENEGOTIATION_NOT_ENFORCED MBEDTLS_SSL_RENEGOTIATION_NOT_ENFORCED -#define SSL_RENEGOTIATION_PENDING MBEDTLS_SSL_RENEGOTIATION_PENDING -#define SSL_RENEGO_MAX_RECORDS_DEFAULT MBEDTLS_SSL_RENEGO_MAX_RECORDS_DEFAULT -#define SSL_RETRANS_FINISHED MBEDTLS_SSL_RETRANS_FINISHED -#define SSL_RETRANS_PREPARING MBEDTLS_SSL_RETRANS_PREPARING -#define SSL_RETRANS_SENDING MBEDTLS_SSL_RETRANS_SENDING -#define SSL_RETRANS_WAITING MBEDTLS_SSL_RETRANS_WAITING -#define SSL_SECURE_RENEGOTIATION MBEDTLS_SSL_SECURE_RENEGOTIATION -#define SSL_SERVER_CERTIFICATE MBEDTLS_SSL_SERVER_CERTIFICATE -#define SSL_SERVER_CHANGE_CIPHER_SPEC MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC -#define SSL_SERVER_FINISHED MBEDTLS_SSL_SERVER_FINISHED -#define SSL_SERVER_HELLO MBEDTLS_SSL_SERVER_HELLO -#define SSL_SERVER_HELLO_DONE MBEDTLS_SSL_SERVER_HELLO_DONE -#define SSL_SERVER_HELLO_VERIFY_REQUEST_SENT MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT -#define SSL_SERVER_KEY_EXCHANGE MBEDTLS_SSL_SERVER_KEY_EXCHANGE -#define SSL_SERVER_NEW_SESSION_TICKET MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET -#define SSL_SESSION_TICKETS_DISABLED MBEDTLS_SSL_SESSION_TICKETS_DISABLED -#define SSL_SESSION_TICKETS_ENABLED MBEDTLS_SSL_SESSION_TICKETS_ENABLED -#define SSL_SIG_ANON MBEDTLS_SSL_SIG_ANON -#define SSL_SIG_ECDSA MBEDTLS_SSL_SIG_ECDSA -#define SSL_SIG_RSA MBEDTLS_SSL_SIG_RSA -#define SSL_TRANSPORT_DATAGRAM MBEDTLS_SSL_TRANSPORT_DATAGRAM -#define SSL_TRANSPORT_STREAM MBEDTLS_SSL_TRANSPORT_STREAM -#define SSL_TRUNCATED_HMAC_LEN MBEDTLS_SSL_TRUNCATED_HMAC_LEN -#define SSL_TRUNC_HMAC_DISABLED MBEDTLS_SSL_TRUNC_HMAC_DISABLED -#define SSL_TRUNC_HMAC_ENABLED MBEDTLS_SSL_TRUNC_HMAC_ENABLED -#define SSL_VERIFY_DATA_MAX_LEN MBEDTLS_SSL_VERIFY_DATA_MAX_LEN -#define SSL_VERIFY_NONE MBEDTLS_SSL_VERIFY_NONE -#define SSL_VERIFY_OPTIONAL MBEDTLS_SSL_VERIFY_OPTIONAL -#define SSL_VERIFY_REQUIRED MBEDTLS_SSL_VERIFY_REQUIRED -#define TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA -#define TLS_DHE_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA -#define TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 -#define TLS_DHE_PSK_WITH_AES_128_CCM MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM -#define TLS_DHE_PSK_WITH_AES_128_CCM_8 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8 -#define TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 -#define TLS_DHE_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA -#define TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 -#define TLS_DHE_PSK_WITH_AES_256_CCM MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM -#define TLS_DHE_PSK_WITH_AES_256_CCM_8 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8 -#define TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 -#define TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_DHE_PSK_WITH_NULL_SHA MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA -#define TLS_DHE_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256 -#define TLS_DHE_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384 -#define TLS_DHE_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA -#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA -#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA -#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 -#define TLS_DHE_RSA_WITH_AES_128_CCM MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM -#define TLS_DHE_RSA_WITH_AES_128_CCM_8 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8 -#define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 -#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA -#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 -#define TLS_DHE_RSA_WITH_AES_256_CCM MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM -#define TLS_DHE_RSA_WITH_AES_256_CCM_8 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8 -#define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 -#define TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA -#define TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA -#define TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 -#define TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_DHE_RSA_WITH_DES_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA -#define TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA -#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA -#define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 -#define TLS_ECDHE_ECDSA_WITH_AES_128_CCM MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM -#define TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 -#define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 -#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA -#define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 -#define TLS_ECDHE_ECDSA_WITH_AES_256_CCM MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM -#define TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 -#define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 -#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_ECDHE_ECDSA_WITH_NULL_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA -#define TLS_ECDHE_ECDSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA -#define TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA -#define TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA -#define TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 -#define TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA -#define TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 -#define TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_ECDHE_PSK_WITH_NULL_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA -#define TLS_ECDHE_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256 -#define TLS_ECDHE_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384 -#define TLS_ECDHE_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA -#define TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA -#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA -#define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 -#define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 -#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA -#define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 -#define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 -#define TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_ECDHE_RSA_WITH_NULL_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA -#define TLS_ECDHE_RSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA -#define TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA -#define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA -#define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 -#define TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 -#define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA -#define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 -#define TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 -#define TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_ECDH_ECDSA_WITH_NULL_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA -#define TLS_ECDH_ECDSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA -#define TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA -#define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA -#define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 -#define TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 -#define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA -#define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 -#define TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 -#define TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_ECDH_RSA_WITH_NULL_SHA MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA -#define TLS_ECDH_RSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA -#define TLS_EXT_ALPN MBEDTLS_TLS_EXT_ALPN -#define TLS_EXT_ENCRYPT_THEN_MAC MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC -#define TLS_EXT_EXTENDED_MASTER_SECRET MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET -#define TLS_EXT_MAX_FRAGMENT_LENGTH MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH -#define TLS_EXT_RENEGOTIATION_INFO MBEDTLS_TLS_EXT_RENEGOTIATION_INFO -#define TLS_EXT_SERVERNAME MBEDTLS_TLS_EXT_SERVERNAME -#define TLS_EXT_SERVERNAME_HOSTNAME MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME -#define TLS_EXT_SESSION_TICKET MBEDTLS_TLS_EXT_SESSION_TICKET -#define TLS_EXT_SIG_ALG MBEDTLS_TLS_EXT_SIG_ALG -#define TLS_EXT_SUPPORTED_ELLIPTIC_CURVES MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES -#define TLS_EXT_SUPPORTED_POINT_FORMATS MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS -#define TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT -#define TLS_EXT_TRUNCATED_HMAC MBEDTLS_TLS_EXT_TRUNCATED_HMAC -#define TLS_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA -#define TLS_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA -#define TLS_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 -#define TLS_PSK_WITH_AES_128_CCM MBEDTLS_TLS_PSK_WITH_AES_128_CCM -#define TLS_PSK_WITH_AES_128_CCM_8 MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8 -#define TLS_PSK_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 -#define TLS_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA -#define TLS_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 -#define TLS_PSK_WITH_AES_256_CCM MBEDTLS_TLS_PSK_WITH_AES_256_CCM -#define TLS_PSK_WITH_AES_256_CCM_8 MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8 -#define TLS_PSK_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 -#define TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_PSK_WITH_NULL_SHA MBEDTLS_TLS_PSK_WITH_NULL_SHA -#define TLS_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_PSK_WITH_NULL_SHA256 -#define TLS_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_PSK_WITH_NULL_SHA384 -#define TLS_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_PSK_WITH_RC4_128_SHA -#define TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA -#define TLS_RSA_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA -#define TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 -#define TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 -#define TLS_RSA_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA -#define TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 -#define TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 -#define TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 -#define TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_RSA_PSK_WITH_NULL_SHA MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA -#define TLS_RSA_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256 -#define TLS_RSA_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384 -#define TLS_RSA_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA -#define TLS_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA -#define TLS_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA -#define TLS_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 -#define TLS_RSA_WITH_AES_128_CCM MBEDTLS_TLS_RSA_WITH_AES_128_CCM -#define TLS_RSA_WITH_AES_128_CCM_8 MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8 -#define TLS_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 -#define TLS_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA -#define TLS_RSA_WITH_AES_256_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 -#define TLS_RSA_WITH_AES_256_CCM MBEDTLS_TLS_RSA_WITH_AES_256_CCM -#define TLS_RSA_WITH_AES_256_CCM_8 MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8 -#define TLS_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 -#define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA -#define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 -#define TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 -#define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA -#define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 -#define TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 -#define TLS_RSA_WITH_DES_CBC_SHA MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA -#define TLS_RSA_WITH_NULL_MD5 MBEDTLS_TLS_RSA_WITH_NULL_MD5 -#define TLS_RSA_WITH_NULL_SHA MBEDTLS_TLS_RSA_WITH_NULL_SHA -#define TLS_RSA_WITH_NULL_SHA256 MBEDTLS_TLS_RSA_WITH_NULL_SHA256 -#define TLS_RSA_WITH_RC4_128_MD5 MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 -#define TLS_RSA_WITH_RC4_128_SHA MBEDTLS_TLS_RSA_WITH_RC4_128_SHA -#define UL64 MBEDTLS_UL64 -#define X509_CRT_VERSION_1 MBEDTLS_X509_CRT_VERSION_1 -#define X509_CRT_VERSION_2 MBEDTLS_X509_CRT_VERSION_2 -#define X509_CRT_VERSION_3 MBEDTLS_X509_CRT_VERSION_3 -#define X509_FORMAT_DER MBEDTLS_X509_FORMAT_DER -#define X509_FORMAT_PEM MBEDTLS_X509_FORMAT_PEM -#define X509_MAX_DN_NAME_SIZE MBEDTLS_X509_MAX_DN_NAME_SIZE -#define X509_RFC5280_MAX_SERIAL_LEN MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN -#define X509_RFC5280_UTC_TIME_LEN MBEDTLS_X509_RFC5280_UTC_TIME_LEN -#define XTEA_DECRYPT MBEDTLS_XTEA_DECRYPT -#define XTEA_ENCRYPT MBEDTLS_XTEA_ENCRYPT -#define _asn1_bitstring mbedtls_asn1_bitstring -#define _asn1_buf mbedtls_asn1_buf -#define _asn1_named_data mbedtls_asn1_named_data -#define _asn1_sequence mbedtls_asn1_sequence -#define _ssl_cache_context mbedtls_ssl_cache_context -#define _ssl_cache_entry mbedtls_ssl_cache_entry -#define _ssl_ciphersuite_t mbedtls_ssl_ciphersuite_t -#define _ssl_context mbedtls_ssl_context -#define _ssl_flight_item mbedtls_ssl_flight_item -#define _ssl_handshake_params mbedtls_ssl_handshake_params -#define _ssl_key_cert mbedtls_ssl_key_cert -#define _ssl_premaster_secret mbedtls_ssl_premaster_secret -#define _ssl_session mbedtls_ssl_session -#define _ssl_ticket_keys mbedtls_ssl_ticket_keys -#define _ssl_transform mbedtls_ssl_transform -#define _x509_crl mbedtls_x509_crl -#define _x509_crl_entry mbedtls_x509_crl_entry -#define _x509_crt mbedtls_x509_crt -#define _x509_csr mbedtls_x509_csr -#define _x509_time mbedtls_x509_time -#define _x509write_cert mbedtls_x509write_cert -#define _x509write_csr mbedtls_x509write_csr -#define aes_context mbedtls_aes_context -#define aes_crypt_cbc mbedtls_aes_crypt_cbc -#define aes_crypt_cfb128 mbedtls_aes_crypt_cfb128 -#define aes_crypt_cfb8 mbedtls_aes_crypt_cfb8 -#define aes_crypt_ctr mbedtls_aes_crypt_ctr -#define aes_crypt_ecb mbedtls_aes_crypt_ecb -#define aes_free mbedtls_aes_free -#define aes_init mbedtls_aes_init -#define aes_self_test mbedtls_aes_self_test -#define aes_setkey_dec mbedtls_aes_setkey_dec -#define aes_setkey_enc mbedtls_aes_setkey_enc -#define aesni_crypt_ecb mbedtls_aesni_crypt_ecb -#define aesni_gcm_mult mbedtls_aesni_gcm_mult -#define aesni_inverse_key mbedtls_aesni_inverse_key -#define aesni_setkey_enc mbedtls_aesni_setkey_enc -#define aesni_supports mbedtls_aesni_has_support -#define alarmed mbedtls_timing_alarmed -#define arc4_context mbedtls_arc4_context -#define arc4_crypt mbedtls_arc4_crypt -#define arc4_free mbedtls_arc4_free -#define arc4_init mbedtls_arc4_init -#define arc4_self_test mbedtls_arc4_self_test -#define arc4_setup mbedtls_arc4_setup -#define asn1_bitstring mbedtls_asn1_bitstring -#define asn1_buf mbedtls_asn1_buf -#define asn1_find_named_data mbedtls_asn1_find_named_data -#define asn1_free_named_data mbedtls_asn1_free_named_data -#define asn1_free_named_data_list mbedtls_asn1_free_named_data_list -#define asn1_get_alg mbedtls_asn1_get_alg -#define asn1_get_alg_null mbedtls_asn1_get_alg_null -#define asn1_get_bitstring mbedtls_asn1_get_bitstring -#define asn1_get_bitstring_null mbedtls_asn1_get_bitstring_null -#define asn1_get_bool mbedtls_asn1_get_bool -#define asn1_get_int mbedtls_asn1_get_int -#define asn1_get_len mbedtls_asn1_get_len -#define asn1_get_mpi mbedtls_asn1_get_mpi -#define asn1_get_sequence_of mbedtls_asn1_get_sequence_of -#define asn1_get_tag mbedtls_asn1_get_tag -#define asn1_named_data mbedtls_asn1_named_data -#define asn1_sequence mbedtls_asn1_sequence -#define asn1_store_named_data mbedtls_asn1_store_named_data -#define asn1_write_algorithm_identifier mbedtls_asn1_write_algorithm_identifier -#define asn1_write_bitstring mbedtls_asn1_write_bitstring -#define asn1_write_bool mbedtls_asn1_write_bool -#define asn1_write_ia5_string mbedtls_asn1_write_ia5_string -#define asn1_write_int mbedtls_asn1_write_int -#define asn1_write_len mbedtls_asn1_write_len -#define asn1_write_mpi mbedtls_asn1_write_mpi -#define asn1_write_null mbedtls_asn1_write_null -#define asn1_write_octet_string mbedtls_asn1_write_octet_string -#define asn1_write_oid mbedtls_asn1_write_oid -#define asn1_write_printable_string mbedtls_asn1_write_printable_string -#define asn1_write_raw_buffer mbedtls_asn1_write_raw_buffer -#define asn1_write_tag mbedtls_asn1_write_tag -#define base64_decode mbedtls_base64_decode -#define base64_encode mbedtls_base64_encode -#define base64_self_test mbedtls_base64_self_test -#define blowfish_context mbedtls_blowfish_context -#define blowfish_crypt_cbc mbedtls_blowfish_crypt_cbc -#define blowfish_crypt_cfb64 mbedtls_blowfish_crypt_cfb64 -#define blowfish_crypt_ctr mbedtls_blowfish_crypt_ctr -#define blowfish_crypt_ecb mbedtls_blowfish_crypt_ecb -#define blowfish_free mbedtls_blowfish_free -#define blowfish_init mbedtls_blowfish_init -#define blowfish_setkey mbedtls_blowfish_setkey -#define camellia_context mbedtls_camellia_context -#define camellia_crypt_cbc mbedtls_camellia_crypt_cbc -#define camellia_crypt_cfb128 mbedtls_camellia_crypt_cfb128 -#define camellia_crypt_ctr mbedtls_camellia_crypt_ctr -#define camellia_crypt_ecb mbedtls_camellia_crypt_ecb -#define camellia_free mbedtls_camellia_free -#define camellia_init mbedtls_camellia_init -#define camellia_self_test mbedtls_camellia_self_test -#define camellia_setkey_dec mbedtls_camellia_setkey_dec -#define camellia_setkey_enc mbedtls_camellia_setkey_enc -#define ccm_auth_decrypt mbedtls_ccm_auth_decrypt -#define ccm_context mbedtls_ccm_context -#define ccm_encrypt_and_tag mbedtls_ccm_encrypt_and_tag -#define ccm_free mbedtls_ccm_free -#define ccm_init mbedtls_ccm_init -#define ccm_self_test mbedtls_ccm_self_test -#define cipher_auth_decrypt mbedtls_cipher_auth_decrypt -#define cipher_auth_encrypt mbedtls_cipher_auth_encrypt -#define cipher_base_t mbedtls_cipher_base_t -#define cipher_check_tag mbedtls_cipher_check_tag -#define cipher_context_t mbedtls_cipher_context_t -#define cipher_crypt mbedtls_cipher_crypt -#define cipher_definition_t mbedtls_cipher_definition_t -#define cipher_definitions mbedtls_cipher_definitions -#define cipher_finish mbedtls_cipher_finish -#define cipher_free mbedtls_cipher_free -#define cipher_free_ctx mbedtls_cipher_free_ctx -#define cipher_get_block_size mbedtls_cipher_get_block_size -#define cipher_get_cipher_mode mbedtls_cipher_get_cipher_mode -#define cipher_get_iv_size mbedtls_cipher_get_iv_size -#define cipher_get_key_size mbedtls_cipher_get_key_bitlen -#define cipher_get_name mbedtls_cipher_get_name -#define cipher_get_operation mbedtls_cipher_get_operation -#define cipher_get_type mbedtls_cipher_get_type -#define cipher_id_t mbedtls_cipher_id_t -#define cipher_info_from_string mbedtls_cipher_info_from_string -#define cipher_info_from_type mbedtls_cipher_info_from_type -#define cipher_info_from_values mbedtls_cipher_info_from_values -#define cipher_info_t mbedtls_cipher_info_t -#define cipher_init mbedtls_cipher_init -#define cipher_init_ctx mbedtls_cipher_setup -#define cipher_list mbedtls_cipher_list -#define cipher_mode_t mbedtls_cipher_mode_t -#define cipher_padding_t mbedtls_cipher_padding_t -#define cipher_reset mbedtls_cipher_reset -#define cipher_self_test mbedtls_cipher_self_test -#define cipher_set_iv mbedtls_cipher_set_iv -#define cipher_set_padding_mode mbedtls_cipher_set_padding_mode -#define cipher_setkey mbedtls_cipher_setkey -#define cipher_type_t mbedtls_cipher_type_t -#define cipher_update mbedtls_cipher_update -#define cipher_update_ad mbedtls_cipher_update_ad -#define cipher_write_tag mbedtls_cipher_write_tag -#define ctr_drbg_context mbedtls_ctr_drbg_context -#define ctr_drbg_free mbedtls_ctr_drbg_free -#define ctr_drbg_init mbedtls_ctr_drbg_init -#define ctr_drbg_init_entropy_len mbedtls_ctr_drbg_init_entropy_len -#define ctr_drbg_random mbedtls_ctr_drbg_random -#define ctr_drbg_random_with_add mbedtls_ctr_drbg_random_with_add -#define ctr_drbg_reseed mbedtls_ctr_drbg_reseed -#define ctr_drbg_self_test mbedtls_ctr_drbg_self_test -#define ctr_drbg_set_entropy_len mbedtls_ctr_drbg_set_entropy_len -#define ctr_drbg_set_prediction_resistance mbedtls_ctr_drbg_set_prediction_resistance -#define ctr_drbg_set_reseed_interval mbedtls_ctr_drbg_set_reseed_interval -#define ctr_drbg_update mbedtls_ctr_drbg_update -#define ctr_drbg_update_seed_file mbedtls_ctr_drbg_update_seed_file -#define ctr_drbg_write_seed_file mbedtls_ctr_drbg_write_seed_file -#define debug_fmt mbedtls_debug_fmt -#define debug_print_buf mbedtls_debug_print_buf -#define debug_print_crt mbedtls_debug_print_crt -#define debug_print_ecp mbedtls_debug_print_ecp -#define debug_print_mpi mbedtls_debug_print_mpi -#define debug_print_msg mbedtls_debug_print_msg -#define debug_print_ret mbedtls_debug_print_ret -#define debug_set_log_mode mbedtls_debug_set_log_mode -#define debug_set_threshold mbedtls_debug_set_threshold -#define des3_context mbedtls_des3_context -#define des3_crypt_cbc mbedtls_des3_crypt_cbc -#define des3_crypt_ecb mbedtls_des3_crypt_ecb -#define des3_free mbedtls_des3_free -#define des3_init mbedtls_des3_init -#define des3_set2key_dec mbedtls_des3_set2key_dec -#define des3_set2key_enc mbedtls_des3_set2key_enc -#define des3_set3key_dec mbedtls_des3_set3key_dec -#define des3_set3key_enc mbedtls_des3_set3key_enc -#define des_context mbedtls_des_context -#define des_crypt_cbc mbedtls_des_crypt_cbc -#define des_crypt_ecb mbedtls_des_crypt_ecb -#define des_free mbedtls_des_free -#define des_init mbedtls_des_init -#define des_key_check_key_parity mbedtls_des_key_check_key_parity -#define des_key_check_weak mbedtls_des_key_check_weak -#define des_key_set_parity mbedtls_des_key_set_parity -#define des_self_test mbedtls_des_self_test -#define des_setkey_dec mbedtls_des_setkey_dec -#define des_setkey_enc mbedtls_des_setkey_enc -#define dhm_calc_secret mbedtls_dhm_calc_secret -#define dhm_context mbedtls_dhm_context -#define dhm_free mbedtls_dhm_free -#define dhm_init mbedtls_dhm_init -#define dhm_make_params mbedtls_dhm_make_params -#define dhm_make_public mbedtls_dhm_make_public -#define dhm_parse_dhm mbedtls_dhm_parse_dhm -#define dhm_parse_dhmfile mbedtls_dhm_parse_dhmfile -#define dhm_read_params mbedtls_dhm_read_params -#define dhm_read_public mbedtls_dhm_read_public -#define dhm_self_test mbedtls_dhm_self_test -#define ecdh_calc_secret mbedtls_ecdh_calc_secret -#define ecdh_compute_shared mbedtls_ecdh_compute_shared -#define ecdh_context mbedtls_ecdh_context -#define ecdh_free mbedtls_ecdh_free -#define ecdh_gen_public mbedtls_ecdh_gen_public -#define ecdh_get_params mbedtls_ecdh_get_params -#define ecdh_init mbedtls_ecdh_init -#define ecdh_make_params mbedtls_ecdh_make_params -#define ecdh_make_public mbedtls_ecdh_make_public -#define ecdh_read_params mbedtls_ecdh_read_params -#define ecdh_read_public mbedtls_ecdh_read_public -#define ecdh_self_test mbedtls_ecdh_self_test -#define ecdh_side mbedtls_ecdh_side -#define ecdsa_context mbedtls_ecdsa_context -#define ecdsa_free mbedtls_ecdsa_free -#define ecdsa_from_keypair mbedtls_ecdsa_from_keypair -#define ecdsa_genkey mbedtls_ecdsa_genkey -#define ecdsa_info mbedtls_ecdsa_info -#define ecdsa_init mbedtls_ecdsa_init -#define ecdsa_read_signature mbedtls_ecdsa_read_signature -#define ecdsa_self_test mbedtls_ecdsa_self_test -#define ecdsa_sign mbedtls_ecdsa_sign -#define ecdsa_sign_det mbedtls_ecdsa_sign_det -#define ecdsa_verify mbedtls_ecdsa_verify -#define ecdsa_write_signature mbedtls_ecdsa_write_signature -#define ecdsa_write_signature_det mbedtls_ecdsa_write_signature_det -#define eckey_info mbedtls_eckey_info -#define eckeydh_info mbedtls_eckeydh_info -#define ecp_add mbedtls_ecp_add -#define ecp_check_privkey mbedtls_ecp_check_privkey -#define ecp_check_pub_priv mbedtls_ecp_check_pub_priv -#define ecp_check_pubkey mbedtls_ecp_check_pubkey -#define ecp_copy mbedtls_ecp_copy -#define ecp_curve_info mbedtls_ecp_curve_info -#define ecp_curve_info_from_grp_id mbedtls_ecp_curve_info_from_grp_id -#define ecp_curve_info_from_name mbedtls_ecp_curve_info_from_name -#define ecp_curve_info_from_tls_id mbedtls_ecp_curve_info_from_tls_id -#define ecp_curve_list mbedtls_ecp_curve_list -#define ecp_gen_key mbedtls_ecp_gen_key -#define ecp_gen_keypair mbedtls_ecp_gen_keypair -#define ecp_group mbedtls_ecp_group -#define ecp_group_copy mbedtls_ecp_group_copy -#define ecp_group_free mbedtls_ecp_group_free -#define ecp_group_id mbedtls_ecp_group_id -#define ecp_group_init mbedtls_ecp_group_init -#define ecp_group_read_string mbedtls_ecp_group_read_string -#define ecp_grp_id_list mbedtls_ecp_grp_id_list -#define ecp_is_zero mbedtls_ecp_is_zero -#define ecp_keypair mbedtls_ecp_keypair -#define ecp_keypair_free mbedtls_ecp_keypair_free -#define ecp_keypair_init mbedtls_ecp_keypair_init -#define ecp_mul mbedtls_ecp_mul -#define ecp_point mbedtls_ecp_point -#define ecp_point_free mbedtls_ecp_point_free -#define ecp_point_init mbedtls_ecp_point_init -#define ecp_point_read_binary mbedtls_ecp_point_read_binary -#define ecp_point_read_string mbedtls_ecp_point_read_string -#define ecp_point_write_binary mbedtls_ecp_point_write_binary -#define ecp_self_test mbedtls_ecp_self_test -#define ecp_set_zero mbedtls_ecp_set_zero -#define ecp_sub mbedtls_ecp_sub -#define ecp_tls_read_group mbedtls_ecp_tls_read_group -#define ecp_tls_read_point mbedtls_ecp_tls_read_point -#define ecp_tls_write_group mbedtls_ecp_tls_write_group -#define ecp_tls_write_point mbedtls_ecp_tls_write_point -#define ecp_use_known_dp mbedtls_ecp_group_load -#define entropy_add_source mbedtls_entropy_add_source -#define entropy_context mbedtls_entropy_context -#define entropy_free mbedtls_entropy_free -#define entropy_func mbedtls_entropy_func -#define entropy_gather mbedtls_entropy_gather -#define entropy_init mbedtls_entropy_init -#define entropy_self_test mbedtls_entropy_self_test -#define entropy_update_manual mbedtls_entropy_update_manual -#define entropy_update_seed_file mbedtls_entropy_update_seed_file -#define entropy_write_seed_file mbedtls_entropy_write_seed_file -#define error_strerror mbedtls_strerror -#define f_source_ptr mbedtls_entropy_f_source_ptr -#define gcm_auth_decrypt mbedtls_gcm_auth_decrypt -#define gcm_context mbedtls_gcm_context -#define gcm_crypt_and_tag mbedtls_gcm_crypt_and_tag -#define gcm_finish mbedtls_gcm_finish -#define gcm_free mbedtls_gcm_free -#define gcm_init mbedtls_gcm_init -#define gcm_self_test mbedtls_gcm_self_test -#define gcm_starts mbedtls_gcm_starts -#define gcm_update mbedtls_gcm_update -#define get_timer mbedtls_timing_get_timer -#define hardclock mbedtls_timing_hardclock -#define hardclock_poll mbedtls_hardclock_poll -#define havege_free mbedtls_havege_free -#define havege_init mbedtls_havege_init -#define havege_poll mbedtls_havege_poll -#define havege_random mbedtls_havege_random -#define havege_state mbedtls_havege_state -#define hmac_drbg_context mbedtls_hmac_drbg_context -#define hmac_drbg_free mbedtls_hmac_drbg_free -#define hmac_drbg_init mbedtls_hmac_drbg_init -#define hmac_drbg_init_buf mbedtls_hmac_drbg_init_buf -#define hmac_drbg_random mbedtls_hmac_drbg_random -#define hmac_drbg_random_with_add mbedtls_hmac_drbg_random_with_add -#define hmac_drbg_reseed mbedtls_hmac_drbg_reseed -#define hmac_drbg_self_test mbedtls_hmac_drbg_self_test -#define hmac_drbg_set_entropy_len mbedtls_hmac_drbg_set_entropy_len -#define hmac_drbg_set_prediction_resistance mbedtls_hmac_drbg_set_prediction_resistance -#define hmac_drbg_set_reseed_interval mbedtls_hmac_drbg_set_reseed_interval -#define hmac_drbg_update mbedtls_hmac_drbg_update -#define hmac_drbg_update_seed_file mbedtls_hmac_drbg_update_seed_file -#define hmac_drbg_write_seed_file mbedtls_hmac_drbg_write_seed_file -#define hr_time mbedtls_timing_hr_time -#define key_exchange_type_t mbedtls_key_exchange_type_t -#define md mbedtls_md -#define md2 mbedtls_md2 -#define md2_context mbedtls_md2_context -#define md2_file mbedtls_md2_file -#define md2_finish mbedtls_md2_finish -#define md2_free mbedtls_md2_free -#define md2_hmac mbedtls_md2_hmac -#define md2_hmac_finish mbedtls_md2_hmac_finish -#define md2_hmac_reset mbedtls_md2_hmac_reset -#define md2_hmac_starts mbedtls_md2_hmac_starts -#define md2_hmac_update mbedtls_md2_hmac_update -#define md2_info mbedtls_md2_info -#define md2_init mbedtls_md2_init -#define md2_process mbedtls_md2_process -#define md2_self_test mbedtls_md2_self_test -#define md2_starts mbedtls_md2_starts -#define md2_update mbedtls_md2_update -#define md4 mbedtls_md4 -#define md4_context mbedtls_md4_context -#define md4_file mbedtls_md4_file -#define md4_finish mbedtls_md4_finish -#define md4_free mbedtls_md4_free -#define md4_hmac mbedtls_md4_hmac -#define md4_hmac_finish mbedtls_md4_hmac_finish -#define md4_hmac_reset mbedtls_md4_hmac_reset -#define md4_hmac_starts mbedtls_md4_hmac_starts -#define md4_hmac_update mbedtls_md4_hmac_update -#define md4_info mbedtls_md4_info -#define md4_init mbedtls_md4_init -#define md4_process mbedtls_md4_process -#define md4_self_test mbedtls_md4_self_test -#define md4_starts mbedtls_md4_starts -#define md4_update mbedtls_md4_update -#define md5 mbedtls_md5 -#define md5_context mbedtls_md5_context -#define md5_file mbedtls_md5_file -#define md5_finish mbedtls_md5_finish -#define md5_free mbedtls_md5_free -#define md5_hmac mbedtls_md5_hmac -#define md5_hmac_finish mbedtls_md5_hmac_finish -#define md5_hmac_reset mbedtls_md5_hmac_reset -#define md5_hmac_starts mbedtls_md5_hmac_starts -#define md5_hmac_update mbedtls_md5_hmac_update -#define md5_info mbedtls_md5_info -#define md5_init mbedtls_md5_init -#define md5_process mbedtls_md5_process -#define md5_self_test mbedtls_md5_self_test -#define md5_starts mbedtls_md5_starts -#define md5_update mbedtls_md5_update -#define md_context_t mbedtls_md_context_t -#define md_file mbedtls_md_file -#define md_finish mbedtls_md_finish -#define md_free mbedtls_md_free -#define md_free_ctx mbedtls_md_free_ctx -#define md_get_name mbedtls_md_get_name -#define md_get_size mbedtls_md_get_size -#define md_get_type mbedtls_md_get_type -#define md_hmac mbedtls_md_hmac -#define md_hmac_finish mbedtls_md_hmac_finish -#define md_hmac_reset mbedtls_md_hmac_reset -#define md_hmac_starts mbedtls_md_hmac_starts -#define md_hmac_update mbedtls_md_hmac_update -#define md_info_from_string mbedtls_md_info_from_string -#define md_info_from_type mbedtls_md_info_from_type -#define md_info_t mbedtls_md_info_t -#define md_init mbedtls_md_init -#define md_init_ctx mbedtls_md_init_ctx -#define md_list mbedtls_md_list -#define md_process mbedtls_md_process -#define md_starts mbedtls_md_starts -#define md_type_t mbedtls_md_type_t -#define md_update mbedtls_md_update -#define memory_buffer_alloc_cur_get mbedtls_memory_buffer_alloc_cur_get -#define memory_buffer_alloc_free mbedtls_memory_buffer_alloc_free -#define memory_buffer_alloc_init mbedtls_memory_buffer_alloc_init -#define memory_buffer_alloc_max_get mbedtls_memory_buffer_alloc_max_get -#define memory_buffer_alloc_max_reset mbedtls_memory_buffer_alloc_max_reset -#define memory_buffer_alloc_self_test mbedtls_memory_buffer_alloc_self_test -#define memory_buffer_alloc_status mbedtls_memory_buffer_alloc_status -#define memory_buffer_alloc_verify mbedtls_memory_buffer_alloc_verify -#define memory_buffer_set_verify mbedtls_memory_buffer_set_verify -#define memory_set_own mbedtls_memory_set_own -#define mpi mbedtls_mpi -#define mpi_add_abs mbedtls_mpi_add_abs -#define mpi_add_int mbedtls_mpi_add_int -#define mpi_add_mpi mbedtls_mpi_add_mpi -#define mpi_cmp_abs mbedtls_mpi_cmp_abs -#define mpi_cmp_int mbedtls_mpi_cmp_int -#define mpi_cmp_mpi mbedtls_mpi_cmp_mpi -#define mpi_copy mbedtls_mpi_copy -#define mpi_div_int mbedtls_mpi_div_int -#define mpi_div_mpi mbedtls_mpi_div_mpi -#define mpi_exp_mod mbedtls_mpi_exp_mod -#define mpi_fill_random mbedtls_mpi_fill_random -#define mpi_free mbedtls_mpi_free -#define mpi_gcd mbedtls_mpi_gcd -#define mpi_gen_prime mbedtls_mpi_gen_prime -#define mpi_get_bit mbedtls_mpi_get_bit -#define mpi_grow mbedtls_mpi_grow -#define mpi_init mbedtls_mpi_init -#define mpi_inv_mod mbedtls_mpi_inv_mod -#define mpi_is_prime mbedtls_mpi_is_prime -#define mpi_lsb mbedtls_mpi_lsb -#define mpi_lset mbedtls_mpi_lset -#define mpi_mod_int mbedtls_mpi_mod_int -#define mpi_mod_mpi mbedtls_mpi_mod_mpi -#define mpi_msb mbedtls_mpi_bitlen -#define mpi_mul_int mbedtls_mpi_mul_int -#define mpi_mul_mpi mbedtls_mpi_mul_mpi -#define mpi_read_binary mbedtls_mpi_read_binary -#define mpi_read_file mbedtls_mpi_read_file -#define mpi_read_string mbedtls_mpi_read_string -#define mpi_safe_cond_assign mbedtls_mpi_safe_cond_assign -#define mpi_safe_cond_swap mbedtls_mpi_safe_cond_swap -#define mpi_self_test mbedtls_mpi_self_test -#define mpi_set_bit mbedtls_mpi_set_bit -#define mpi_shift_l mbedtls_mpi_shift_l -#define mpi_shift_r mbedtls_mpi_shift_r -#define mpi_shrink mbedtls_mpi_shrink -#define mpi_size mbedtls_mpi_size -#define mpi_sub_abs mbedtls_mpi_sub_abs -#define mpi_sub_int mbedtls_mpi_sub_int -#define mpi_sub_mpi mbedtls_mpi_sub_mpi -#define mpi_swap mbedtls_mpi_swap -#define mpi_write_binary mbedtls_mpi_write_binary -#define mpi_write_file mbedtls_mpi_write_file -#define mpi_write_string mbedtls_mpi_write_string -#define net_accept mbedtls_net_accept -#define net_bind mbedtls_net_bind -#define net_close mbedtls_net_free -#define net_connect mbedtls_net_connect -#define net_recv mbedtls_net_recv -#define net_recv_timeout mbedtls_net_recv_timeout -#define net_send mbedtls_net_send -#define net_set_block mbedtls_net_set_block -#define net_set_nonblock mbedtls_net_set_nonblock -#define net_usleep mbedtls_net_usleep -#define oid_descriptor_t mbedtls_oid_descriptor_t -#define oid_get_attr_short_name mbedtls_oid_get_attr_short_name -#define oid_get_cipher_alg mbedtls_oid_get_cipher_alg -#define oid_get_ec_grp mbedtls_oid_get_ec_grp -#define oid_get_extended_key_usage mbedtls_oid_get_extended_key_usage -#define oid_get_md_alg mbedtls_oid_get_md_alg -#define oid_get_numeric_string mbedtls_oid_get_numeric_string -#define oid_get_oid_by_ec_grp mbedtls_oid_get_oid_by_ec_grp -#define oid_get_oid_by_md mbedtls_oid_get_oid_by_md -#define oid_get_oid_by_pk_alg mbedtls_oid_get_oid_by_pk_alg -#define oid_get_oid_by_sig_alg mbedtls_oid_get_oid_by_sig_alg -#define oid_get_pk_alg mbedtls_oid_get_pk_alg -#define oid_get_pkcs12_pbe_alg mbedtls_oid_get_pkcs12_pbe_alg -#define oid_get_sig_alg mbedtls_oid_get_sig_alg -#define oid_get_sig_alg_desc mbedtls_oid_get_sig_alg_desc -#define oid_get_x509_ext_type mbedtls_oid_get_x509_ext_type -#define operation_t mbedtls_operation_t -#define padlock_supports mbedtls_padlock_has_support -#define padlock_xcryptcbc mbedtls_padlock_xcryptcbc -#define padlock_xcryptecb mbedtls_padlock_xcryptecb -#define pbkdf2_hmac mbedtls_pbkdf2_hmac -#define pbkdf2_self_test mbedtls_pbkdf2_self_test -#define pem_context mbedtls_pem_context -#define pem_free mbedtls_pem_free -#define pem_init mbedtls_pem_init -#define pem_read_buffer mbedtls_pem_read_buffer -#define pem_write_buffer mbedtls_pem_write_buffer -#define pk_can_do mbedtls_pk_can_do -#define pk_check_pair mbedtls_pk_check_pair -#define pk_context mbedtls_pk_context -#define pk_debug mbedtls_pk_debug -#define pk_debug_item mbedtls_pk_debug_item -#define pk_debug_type mbedtls_pk_debug_type -#define pk_decrypt mbedtls_pk_decrypt -#define pk_ec mbedtls_pk_ec -#define pk_encrypt mbedtls_pk_encrypt -#define pk_free mbedtls_pk_free -#define pk_get_len mbedtls_pk_get_len -#define pk_get_name mbedtls_pk_get_name -#define pk_get_size mbedtls_pk_get_bitlen -#define pk_get_type mbedtls_pk_get_type -#define pk_info_from_type mbedtls_pk_info_from_type -#define pk_info_t mbedtls_pk_info_t -#define pk_init mbedtls_pk_init -#define pk_init_ctx mbedtls_pk_setup -#define pk_init_ctx_rsa_alt mbedtls_pk_setup_rsa_alt -#define pk_load_file mbedtls_pk_load_file -#define pk_parse_key mbedtls_pk_parse_key -#define pk_parse_keyfile mbedtls_pk_parse_keyfile -#define pk_parse_public_key mbedtls_pk_parse_public_key -#define pk_parse_public_keyfile mbedtls_pk_parse_public_keyfile -#define pk_parse_subpubkey mbedtls_pk_parse_subpubkey -#define pk_rsa mbedtls_pk_rsa -#define pk_rsa_alt_decrypt_func mbedtls_pk_rsa_alt_decrypt_func -#define pk_rsa_alt_key_len_func mbedtls_pk_rsa_alt_key_len_func -#define pk_rsa_alt_sign_func mbedtls_pk_rsa_alt_sign_func -#define pk_rsassa_pss_options mbedtls_pk_rsassa_pss_options -#define pk_sign mbedtls_pk_sign -#define pk_type_t mbedtls_pk_type_t -#define pk_verify mbedtls_pk_verify -#define pk_verify_ext mbedtls_pk_verify_ext -#define pk_write_key_der mbedtls_pk_write_key_der -#define pk_write_key_pem mbedtls_pk_write_key_pem -#define pk_write_pubkey mbedtls_pk_write_pubkey -#define pk_write_pubkey_der mbedtls_pk_write_pubkey_der -#define pk_write_pubkey_pem mbedtls_pk_write_pubkey_pem -#define pkcs11_context mbedtls_pkcs11_context -#define pkcs11_decrypt mbedtls_pkcs11_decrypt -#define pkcs11_priv_key_free mbedtls_pkcs11_priv_key_free -#define pkcs11_priv_key_init mbedtls_pkcs11_priv_key_bind -#define pkcs11_sign mbedtls_pkcs11_sign -#define pkcs11_x509_cert_init mbedtls_pkcs11_x509_cert_bind -#define pkcs12_derivation mbedtls_pkcs12_derivation -#define pkcs12_pbe mbedtls_pkcs12_pbe -#define pkcs12_pbe_sha1_rc4_128 mbedtls_pkcs12_pbe_sha1_rc4_128 -#define pkcs5_pbes2 mbedtls_pkcs5_pbes2 -#define pkcs5_pbkdf2_hmac mbedtls_pkcs5_pbkdf2_hmac -#define pkcs5_self_test mbedtls_pkcs5_self_test -#define platform_entropy_poll mbedtls_platform_entropy_poll -#define platform_set_exit mbedtls_platform_set_exit -#define platform_set_fprintf mbedtls_platform_set_fprintf -#define platform_set_malloc_free mbedtls_platform_set_malloc_free -#define platform_set_printf mbedtls_platform_set_printf -#define platform_set_snprintf mbedtls_platform_set_snprintf -#define polarssl_exit mbedtls_exit -#define polarssl_fprintf mbedtls_fprintf -#define polarssl_free mbedtls_free -#define polarssl_malloc mbedtls_malloc -#define polarssl_mutex_free mbedtls_mutex_free -#define polarssl_mutex_init mbedtls_mutex_init -#define polarssl_mutex_lock mbedtls_mutex_lock -#define polarssl_mutex_unlock mbedtls_mutex_unlock -#define polarssl_printf mbedtls_printf -#define polarssl_snprintf mbedtls_snprintf -#define polarssl_strerror mbedtls_strerror -#define ripemd160 mbedtls_ripemd160 -#define ripemd160_context mbedtls_ripemd160_context -#define ripemd160_file mbedtls_ripemd160_file -#define ripemd160_finish mbedtls_ripemd160_finish -#define ripemd160_free mbedtls_ripemd160_free -#define ripemd160_hmac mbedtls_ripemd160_hmac -#define ripemd160_hmac_finish mbedtls_ripemd160_hmac_finish -#define ripemd160_hmac_reset mbedtls_ripemd160_hmac_reset -#define ripemd160_hmac_starts mbedtls_ripemd160_hmac_starts -#define ripemd160_hmac_update mbedtls_ripemd160_hmac_update -#define ripemd160_info mbedtls_ripemd160_info -#define ripemd160_init mbedtls_ripemd160_init -#define ripemd160_process mbedtls_ripemd160_process -#define ripemd160_self_test mbedtls_ripemd160_self_test -#define ripemd160_starts mbedtls_ripemd160_starts -#define ripemd160_update mbedtls_ripemd160_update -#define rsa_alt_context mbedtls_rsa_alt_context -#define rsa_alt_info mbedtls_rsa_alt_info -#define rsa_check_privkey mbedtls_rsa_check_privkey -#define rsa_check_pub_priv mbedtls_rsa_check_pub_priv -#define rsa_check_pubkey mbedtls_rsa_check_pubkey -#define rsa_context mbedtls_rsa_context -#define rsa_copy mbedtls_rsa_copy -#define rsa_decrypt_func mbedtls_rsa_decrypt_func -#define rsa_free mbedtls_rsa_free -#define rsa_gen_key mbedtls_rsa_gen_key -#define rsa_info mbedtls_rsa_info -#define rsa_init mbedtls_rsa_init -#define rsa_key_len_func mbedtls_rsa_key_len_func -#define rsa_pkcs1_decrypt mbedtls_rsa_pkcs1_decrypt -#define rsa_pkcs1_encrypt mbedtls_rsa_pkcs1_encrypt -#define rsa_pkcs1_sign mbedtls_rsa_pkcs1_sign -#define rsa_pkcs1_verify mbedtls_rsa_pkcs1_verify -#define rsa_private mbedtls_rsa_private -#define rsa_public mbedtls_rsa_public -#define rsa_rsaes_oaep_decrypt mbedtls_rsa_rsaes_oaep_decrypt -#define rsa_rsaes_oaep_encrypt mbedtls_rsa_rsaes_oaep_encrypt -#define rsa_rsaes_pkcs1_v15_decrypt mbedtls_rsa_rsaes_pkcs1_v15_decrypt -#define rsa_rsaes_pkcs1_v15_encrypt mbedtls_rsa_rsaes_pkcs1_v15_encrypt -#define rsa_rsassa_pkcs1_v15_sign mbedtls_rsa_rsassa_pkcs1_v15_sign -#define rsa_rsassa_pkcs1_v15_verify mbedtls_rsa_rsassa_pkcs1_v15_verify -#define rsa_rsassa_pss_sign mbedtls_rsa_rsassa_pss_sign -#define rsa_rsassa_pss_verify mbedtls_rsa_rsassa_pss_verify -#define rsa_rsassa_pss_verify_ext mbedtls_rsa_rsassa_pss_verify_ext -#define rsa_self_test mbedtls_rsa_self_test -#define rsa_set_padding mbedtls_rsa_set_padding -#define rsa_sign_func mbedtls_rsa_sign_func -#define safer_memcmp mbedtls_ssl_safer_memcmp -#define set_alarm mbedtls_set_alarm -#define sha1 mbedtls_sha1 -#define sha1_context mbedtls_sha1_context -#define sha1_file mbedtls_sha1_file -#define sha1_finish mbedtls_sha1_finish -#define sha1_free mbedtls_sha1_free -#define sha1_hmac mbedtls_sha1_hmac -#define sha1_hmac_finish mbedtls_sha1_hmac_finish -#define sha1_hmac_reset mbedtls_sha1_hmac_reset -#define sha1_hmac_starts mbedtls_sha1_hmac_starts -#define sha1_hmac_update mbedtls_sha1_hmac_update -#define sha1_info mbedtls_sha1_info -#define sha1_init mbedtls_sha1_init -#define sha1_process mbedtls_sha1_process -#define sha1_self_test mbedtls_sha1_self_test -#define sha1_starts mbedtls_sha1_starts -#define sha1_update mbedtls_sha1_update -#define sha224_info mbedtls_sha224_info -#define sha256 mbedtls_sha256 -#define sha256_context mbedtls_sha256_context -#define sha256_file mbedtls_sha256_file -#define sha256_finish mbedtls_sha256_finish -#define sha256_free mbedtls_sha256_free -#define sha256_hmac mbedtls_sha256_hmac -#define sha256_hmac_finish mbedtls_sha256_hmac_finish -#define sha256_hmac_reset mbedtls_sha256_hmac_reset -#define sha256_hmac_starts mbedtls_sha256_hmac_starts -#define sha256_hmac_update mbedtls_sha256_hmac_update -#define sha256_info mbedtls_sha256_info -#define sha256_init mbedtls_sha256_init -#define sha256_process mbedtls_sha256_process -#define sha256_self_test mbedtls_sha256_self_test -#define sha256_starts mbedtls_sha256_starts -#define sha256_update mbedtls_sha256_update -#define sha384_info mbedtls_sha384_info -#define sha512 mbedtls_sha512 -#define sha512_context mbedtls_sha512_context -#define sha512_file mbedtls_sha512_file -#define sha512_finish mbedtls_sha512_finish -#define sha512_free mbedtls_sha512_free -#define sha512_hmac mbedtls_sha512_hmac -#define sha512_hmac_finish mbedtls_sha512_hmac_finish -#define sha512_hmac_reset mbedtls_sha512_hmac_reset -#define sha512_hmac_starts mbedtls_sha512_hmac_starts -#define sha512_hmac_update mbedtls_sha512_hmac_update -#define sha512_info mbedtls_sha512_info -#define sha512_init mbedtls_sha512_init -#define sha512_process mbedtls_sha512_process -#define sha512_self_test mbedtls_sha512_self_test -#define sha512_starts mbedtls_sha512_starts -#define sha512_update mbedtls_sha512_update -#define source_state mbedtls_entropy_source_state -#define ssl_cache_context mbedtls_ssl_cache_context -#define ssl_cache_entry mbedtls_ssl_cache_entry -#define ssl_cache_free mbedtls_ssl_cache_free -#define ssl_cache_get mbedtls_ssl_cache_get -#define ssl_cache_init mbedtls_ssl_cache_init -#define ssl_cache_set mbedtls_ssl_cache_set -#define ssl_cache_set_max_entries mbedtls_ssl_cache_set_max_entries -#define ssl_cache_set_timeout mbedtls_ssl_cache_set_timeout -#define ssl_check_cert_usage mbedtls_ssl_check_cert_usage -#define ssl_ciphersuite_from_id mbedtls_ssl_ciphersuite_from_id -#define ssl_ciphersuite_from_string mbedtls_ssl_ciphersuite_from_string -#define ssl_ciphersuite_t mbedtls_ssl_ciphersuite_t -#define ssl_ciphersuite_uses_ec mbedtls_ssl_ciphersuite_uses_ec -#define ssl_ciphersuite_uses_psk mbedtls_ssl_ciphersuite_uses_psk -#define ssl_close_notify mbedtls_ssl_close_notify -#define ssl_context mbedtls_ssl_context -#define ssl_cookie_check mbedtls_ssl_cookie_check -#define ssl_cookie_check_t mbedtls_ssl_cookie_check_t -#define ssl_cookie_ctx mbedtls_ssl_cookie_ctx -#define ssl_cookie_free mbedtls_ssl_cookie_free -#define ssl_cookie_init mbedtls_ssl_cookie_init -#define ssl_cookie_set_timeout mbedtls_ssl_cookie_set_timeout -#define ssl_cookie_setup mbedtls_ssl_cookie_setup -#define ssl_cookie_write mbedtls_ssl_cookie_write -#define ssl_cookie_write_t mbedtls_ssl_cookie_write_t -#define ssl_curve_is_acceptable mbedtls_ssl_curve_is_acceptable -#define ssl_derive_keys mbedtls_ssl_derive_keys -#define ssl_dtls_replay_check mbedtls_ssl_dtls_replay_check -#define ssl_dtls_replay_update mbedtls_ssl_dtls_replay_update -#define ssl_fetch_input mbedtls_ssl_fetch_input -#define ssl_flight_item mbedtls_ssl_flight_item -#define ssl_flush_output mbedtls_ssl_flush_output -#define ssl_free mbedtls_ssl_free -#define ssl_get_alpn_protocol mbedtls_ssl_get_alpn_protocol -#define ssl_get_bytes_avail mbedtls_ssl_get_bytes_avail -#define ssl_get_ciphersuite mbedtls_ssl_get_ciphersuite -#define ssl_get_ciphersuite_id mbedtls_ssl_get_ciphersuite_id -#define ssl_get_ciphersuite_name mbedtls_ssl_get_ciphersuite_name -#define ssl_get_ciphersuite_sig_pk_alg mbedtls_ssl_get_ciphersuite_sig_pk_alg -#define ssl_get_peer_cert mbedtls_ssl_get_peer_cert -#define ssl_get_record_expansion mbedtls_ssl_get_record_expansion -#define ssl_get_session mbedtls_ssl_get_session -#define ssl_get_verify_result mbedtls_ssl_get_verify_result -#define ssl_get_version mbedtls_ssl_get_version -#define ssl_handshake mbedtls_ssl_handshake -#define ssl_handshake_client_step mbedtls_ssl_handshake_client_step -#define ssl_handshake_free mbedtls_ssl_handshake_free -#define ssl_handshake_params mbedtls_ssl_handshake_params -#define ssl_handshake_server_step mbedtls_ssl_handshake_server_step -#define ssl_handshake_step mbedtls_ssl_handshake_step -#define ssl_handshake_wrapup mbedtls_ssl_handshake_wrapup -#define ssl_hdr_len mbedtls_ssl_hdr_len -#define ssl_hs_hdr_len mbedtls_ssl_hs_hdr_len -#define ssl_hw_record_activate mbedtls_ssl_hw_record_activate -#define ssl_hw_record_finish mbedtls_ssl_hw_record_finish -#define ssl_hw_record_init mbedtls_ssl_hw_record_init -#define ssl_hw_record_read mbedtls_ssl_hw_record_read -#define ssl_hw_record_reset mbedtls_ssl_hw_record_reset -#define ssl_hw_record_write mbedtls_ssl_hw_record_write -#define ssl_init mbedtls_ssl_init -#define ssl_key_cert mbedtls_ssl_key_cert -#define ssl_legacy_renegotiation mbedtls_ssl_conf_legacy_renegotiation -#define ssl_list_ciphersuites mbedtls_ssl_list_ciphersuites -#define ssl_md_alg_from_hash mbedtls_ssl_md_alg_from_hash -#define ssl_optimize_checksum mbedtls_ssl_optimize_checksum -#define ssl_own_cert mbedtls_ssl_own_cert -#define ssl_own_key mbedtls_ssl_own_key -#define ssl_parse_certificate mbedtls_ssl_parse_certificate -#define ssl_parse_change_cipher_spec mbedtls_ssl_parse_change_cipher_spec -#define ssl_parse_finished mbedtls_ssl_parse_finished -#define ssl_pk_alg_from_sig mbedtls_ssl_pk_alg_from_sig -#define ssl_pkcs11_decrypt mbedtls_ssl_pkcs11_decrypt -#define ssl_pkcs11_key_len mbedtls_ssl_pkcs11_key_len -#define ssl_pkcs11_sign mbedtls_ssl_pkcs11_sign -#define ssl_psk_derive_premaster mbedtls_ssl_psk_derive_premaster -#define ssl_read mbedtls_ssl_read -#define ssl_read_record mbedtls_ssl_read_record -#define ssl_read_version mbedtls_ssl_read_version -#define ssl_recv_flight_completed mbedtls_ssl_recv_flight_completed -#define ssl_renegotiate mbedtls_ssl_renegotiate -#define ssl_resend mbedtls_ssl_resend -#define ssl_reset_checksum mbedtls_ssl_reset_checksum -#define ssl_send_alert_message mbedtls_ssl_send_alert_message -#define ssl_send_fatal_handshake_failure mbedtls_ssl_send_fatal_handshake_failure -#define ssl_send_flight_completed mbedtls_ssl_send_flight_completed -#define ssl_session mbedtls_ssl_session -#define ssl_session_free mbedtls_ssl_session_free -#define ssl_session_init mbedtls_ssl_session_init -#define ssl_session_reset mbedtls_ssl_session_reset -#define ssl_set_alpn_protocols mbedtls_ssl_conf_alpn_protocols -#define ssl_set_arc4_support mbedtls_ssl_conf_arc4_support -#define ssl_set_authmode mbedtls_ssl_conf_authmode -#define ssl_set_bio mbedtls_ssl_set_bio -#define ssl_set_bio mbedtls_ssl_set_bio_timeout -#define ssl_set_ca_chain mbedtls_ssl_conf_ca_chain -#define ssl_set_cbc_record_splitting mbedtls_ssl_conf_cbc_record_splitting -#define ssl_set_ciphersuites mbedtls_ssl_conf_ciphersuites -#define ssl_set_ciphersuites_for_version mbedtls_ssl_conf_ciphersuites_for_version -#define ssl_set_client_transport_id mbedtls_ssl_set_client_transport_id -#define ssl_set_curves mbedtls_ssl_conf_curves -#define ssl_set_dbg mbedtls_ssl_conf_dbg -#define ssl_set_dh_param mbedtls_ssl_conf_dh_param -#define ssl_set_dh_param_ctx mbedtls_ssl_conf_dh_param_ctx -#define ssl_set_dtls_anti_replay mbedtls_ssl_conf_dtls_anti_replay -#define ssl_set_dtls_badmac_limit mbedtls_ssl_conf_dtls_badmac_limit -#define ssl_set_dtls_cookies mbedtls_ssl_conf_dtls_cookies -#define ssl_set_encrypt_then_mac mbedtls_ssl_conf_encrypt_then_mac -#define ssl_set_endpoint mbedtls_ssl_conf_endpoint -#define ssl_set_extended_master_secret mbedtls_ssl_conf_extended_master_secret -#define ssl_set_fallback mbedtls_ssl_conf_fallback -#define ssl_set_handshake_timeout mbedtls_ssl_conf_handshake_timeout -#define ssl_set_hostname mbedtls_ssl_set_hostname -#define ssl_set_max_frag_len mbedtls_ssl_conf_max_frag_len -#define ssl_set_max_version mbedtls_ssl_conf_max_version -#define ssl_set_min_version mbedtls_ssl_conf_min_version -#define ssl_set_own_cert mbedtls_ssl_conf_own_cert -#define ssl_set_own_cert_alt mbedtls_ssl_set_own_cert_alt -#define ssl_set_own_cert_rsa mbedtls_ssl_set_own_cert_rsa -#define ssl_set_psk mbedtls_ssl_conf_psk -#define ssl_set_psk_cb mbedtls_ssl_conf_psk_cb -#define ssl_set_renegotiation mbedtls_ssl_conf_renegotiation -#define ssl_set_renegotiation_enforced mbedtls_ssl_conf_renegotiation_enforced -#define ssl_set_renegotiation_period mbedtls_ssl_conf_renegotiation_period -#define ssl_set_rng mbedtls_ssl_conf_rng -#define ssl_set_session mbedtls_ssl_set_session -#define ssl_set_session_cache mbedtls_ssl_conf_session_cache -#define ssl_set_session_ticket_lifetime mbedtls_ssl_conf_session_ticket_lifetime -#define ssl_set_session_tickets mbedtls_ssl_conf_session_tickets -#define ssl_set_sni mbedtls_ssl_conf_sni -#define ssl_set_transport mbedtls_ssl_conf_transport -#define ssl_set_truncated_hmac mbedtls_ssl_conf_truncated_hmac -#define ssl_set_verify mbedtls_ssl_conf_verify -#define ssl_sig_from_pk mbedtls_ssl_sig_from_pk -#define ssl_states mbedtls_ssl_states -#define ssl_ticket_keys mbedtls_ssl_ticket_keys -#define ssl_transform mbedtls_ssl_transform -#define ssl_transform_free mbedtls_ssl_transform_free -#define ssl_write mbedtls_ssl_write -#define ssl_write_certificate mbedtls_ssl_write_certificate -#define ssl_write_change_cipher_spec mbedtls_ssl_write_change_cipher_spec -#define ssl_write_finished mbedtls_ssl_write_finished -#define ssl_write_record mbedtls_ssl_write_record -#define ssl_write_version mbedtls_ssl_write_version -#define supported_ciphers mbedtls_cipher_supported -#define t_sint mbedtls_mpi_sint -#define t_udbl mbedtls_t_udbl -#define t_uint mbedtls_mpi_uint -#define test_ca_crt mbedtls_test_ca_crt -#define test_ca_crt_ec mbedtls_test_ca_crt_ec -#define test_ca_crt_rsa mbedtls_test_ca_crt_rsa -#define test_ca_key mbedtls_test_ca_key -#define test_ca_key_ec mbedtls_test_ca_key_ec -#define test_ca_key_rsa mbedtls_test_ca_key_rsa -#define test_ca_list mbedtls_test_cas_pem -#define test_ca_pwd mbedtls_test_ca_pwd -#define test_ca_pwd_ec mbedtls_test_ca_pwd_ec -#define test_ca_pwd_rsa mbedtls_test_ca_pwd_rsa -#define test_cli_crt mbedtls_test_cli_crt -#define test_cli_crt_ec mbedtls_test_cli_crt_ec -#define test_cli_crt_rsa mbedtls_test_cli_crt_rsa -#define test_cli_key mbedtls_test_cli_key -#define test_cli_key_ec mbedtls_test_cli_key_ec -#define test_cli_key_rsa mbedtls_test_cli_key_rsa -#define test_dhm_params mbedtls_test_dhm_params -#define test_srv_crt mbedtls_test_srv_crt -#define test_srv_crt_ec mbedtls_test_srv_crt_ec -#define test_srv_crt_rsa mbedtls_test_srv_crt_rsa -#define test_srv_key mbedtls_test_srv_key -#define test_srv_key_ec mbedtls_test_srv_key_ec -#define test_srv_key_rsa mbedtls_test_srv_key_rsa -#define threading_mutex_t mbedtls_threading_mutex_t -#define threading_set_alt mbedtls_threading_set_alt -#define timing_self_test mbedtls_timing_self_test -#define version_check_feature mbedtls_version_check_feature -#define version_get_number mbedtls_version_get_number -#define version_get_string mbedtls_version_get_string -#define version_get_string_full mbedtls_version_get_string_full -#define x509_bitstring mbedtls_x509_bitstring -#define x509_buf mbedtls_x509_buf -#define x509_crl mbedtls_x509_crl -#define x509_crl_entry mbedtls_x509_crl_entry -#define x509_crl_free mbedtls_x509_crl_free -#define x509_crl_info mbedtls_x509_crl_info -#define x509_crl_init mbedtls_x509_crl_init -#define x509_crl_parse mbedtls_x509_crl_parse -#define x509_crl_parse_der mbedtls_x509_crl_parse_der -#define x509_crl_parse_file mbedtls_x509_crl_parse_file -#define x509_crt mbedtls_x509_crt -#define x509_crt_check_extended_key_usage mbedtls_x509_crt_check_extended_key_usage -#define x509_crt_check_key_usage mbedtls_x509_crt_check_key_usage -#define x509_crt_free mbedtls_x509_crt_free -#define x509_crt_info mbedtls_x509_crt_info -#define x509_crt_init mbedtls_x509_crt_init -#define x509_crt_parse mbedtls_x509_crt_parse -#define x509_crt_parse_der mbedtls_x509_crt_parse_der -#define x509_crt_parse_file mbedtls_x509_crt_parse_file -#define x509_crt_parse_path mbedtls_x509_crt_parse_path -#define x509_crt_revoked mbedtls_x509_crt_is_revoked -#define x509_crt_verify mbedtls_x509_crt_verify -#define x509_csr mbedtls_x509_csr -#define x509_csr_free mbedtls_x509_csr_free -#define x509_csr_info mbedtls_x509_csr_info -#define x509_csr_init mbedtls_x509_csr_init -#define x509_csr_parse mbedtls_x509_csr_parse -#define x509_csr_parse_der mbedtls_x509_csr_parse_der -#define x509_csr_parse_file mbedtls_x509_csr_parse_file -#define x509_dn_gets mbedtls_x509_dn_gets -#define x509_get_alg mbedtls_x509_get_alg -#define x509_get_alg_null mbedtls_x509_get_alg_null -#define x509_get_ext mbedtls_x509_get_ext -#define x509_get_name mbedtls_x509_get_name -#define x509_get_rsassa_pss_params mbedtls_x509_get_rsassa_pss_params -#define x509_get_serial mbedtls_x509_get_serial -#define x509_get_sig mbedtls_x509_get_sig -#define x509_get_sig_alg mbedtls_x509_get_sig_alg -#define x509_get_time mbedtls_x509_get_time -#define x509_key_size_helper mbedtls_x509_key_size_helper -#define x509_name mbedtls_x509_name -#define x509_oid_get_description mbedtls_x509_oid_get_description -#define x509_oid_get_numeric_string mbedtls_x509_oid_get_numeric_string -#define x509_self_test mbedtls_x509_self_test -#define x509_sequence mbedtls_x509_sequence -#define x509_serial_gets mbedtls_x509_serial_gets -#define x509_set_extension mbedtls_x509_set_extension -#define x509_sig_alg_gets mbedtls_x509_sig_alg_gets -#define x509_string_to_names mbedtls_x509_string_to_names -#define x509_time mbedtls_x509_time -#define x509_time_expired mbedtls_x509_time_is_past -#define x509_time_future mbedtls_x509_time_is_future -#define x509_write_extensions mbedtls_x509_write_extensions -#define x509_write_names mbedtls_x509_write_names -#define x509_write_sig mbedtls_x509_write_sig -#define x509write_cert mbedtls_x509write_cert -#define x509write_crt_der mbedtls_x509write_crt_der -#define x509write_crt_free mbedtls_x509write_crt_free -#define x509write_crt_init mbedtls_x509write_crt_init -#define x509write_crt_pem mbedtls_x509write_crt_pem -#define x509write_crt_set_authority_key_identifier mbedtls_x509write_crt_set_authority_key_identifier -#define x509write_crt_set_basic_constraints mbedtls_x509write_crt_set_basic_constraints -#define x509write_crt_set_extension mbedtls_x509write_crt_set_extension -#define x509write_crt_set_issuer_key mbedtls_x509write_crt_set_issuer_key -#define x509write_crt_set_issuer_name mbedtls_x509write_crt_set_issuer_name -#define x509write_crt_set_key_usage mbedtls_x509write_crt_set_key_usage -#define x509write_crt_set_md_alg mbedtls_x509write_crt_set_md_alg -#define x509write_crt_set_ns_cert_type mbedtls_x509write_crt_set_ns_cert_type -#define x509write_crt_set_serial mbedtls_x509write_crt_set_serial -#define x509write_crt_set_subject_key mbedtls_x509write_crt_set_subject_key -#define x509write_crt_set_subject_key_identifier mbedtls_x509write_crt_set_subject_key_identifier -#define x509write_crt_set_subject_name mbedtls_x509write_crt_set_subject_name -#define x509write_crt_set_validity mbedtls_x509write_crt_set_validity -#define x509write_crt_set_version mbedtls_x509write_crt_set_version -#define x509write_csr mbedtls_x509write_csr -#define x509write_csr_der mbedtls_x509write_csr_der -#define x509write_csr_free mbedtls_x509write_csr_free -#define x509write_csr_init mbedtls_x509write_csr_init -#define x509write_csr_pem mbedtls_x509write_csr_pem -#define x509write_csr_set_extension mbedtls_x509write_csr_set_extension -#define x509write_csr_set_key mbedtls_x509write_csr_set_key -#define x509write_csr_set_key_usage mbedtls_x509write_csr_set_key_usage -#define x509write_csr_set_md_alg mbedtls_x509write_csr_set_md_alg -#define x509write_csr_set_ns_cert_type mbedtls_x509write_csr_set_ns_cert_type -#define x509write_csr_set_subject_name mbedtls_x509write_csr_set_subject_name -#define xtea_context mbedtls_xtea_context -#define xtea_crypt_cbc mbedtls_xtea_crypt_cbc -#define xtea_crypt_ecb mbedtls_xtea_crypt_ecb -#define xtea_free mbedtls_xtea_free -#define xtea_init mbedtls_xtea_init -#define xtea_self_test mbedtls_xtea_self_test -#define xtea_setup mbedtls_xtea_setup - -#endif /* compat-1.3.h */ -#endif /* MBEDTLS_DEPRECATED_REMOVED */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/config.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/config.h deleted file mode 100644 index d1db0d825a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/config.h +++ /dev/null @@ -1,2511 +0,0 @@ -/** - * \file config.h - * - * \brief Configuration options (set of defines) - * - * This set of compile-time options may be used to enable - * or disable features selectively, and reduce the global - * memory footprint. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#ifndef MBEDTLS_CONFIG_H -#define MBEDTLS_CONFIG_H - -#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif - -/** - * \name SECTION: System support - * - * This section sets system specific settings. - * \{ - */ - -/** - * \def MBEDTLS_HAVE_ASM - * - * The compiler has support for asm(). - * - * Requires support for asm() in compiler. - * - * Used in: - * library/timing.c - * library/padlock.c - * include/mbedtls/bn_mul.h - * - * Comment to disable the use of assembly code. - */ -#define MBEDTLS_HAVE_ASM - -/** - * \def MBEDTLS_HAVE_SSE2 - * - * CPU supports SSE2 instruction set. - * - * Uncomment if the CPU supports SSE2 (IA-32 specific). - */ -//#define MBEDTLS_HAVE_SSE2 - -/** - * \def MBEDTLS_HAVE_TIME - * - * System has time.h and time(). - * The time does not need to be correct, only time differences are used, - * by contrast with MBEDTLS_HAVE_TIME_DATE - * - * Comment if your system does not support time functions - */ -#define MBEDTLS_HAVE_TIME - -/** - * \def MBEDTLS_HAVE_TIME_DATE - * - * System has time.h and time(), gmtime() and the clock is correct. - * The time needs to be correct (not necesarily very accurate, but at least - * the date should be correct). This is used to verify the validity period of - * X.509 certificates. - * - * Comment if your system does not have a correct clock. - */ -#define MBEDTLS_HAVE_TIME_DATE - -/** - * \def MBEDTLS_PLATFORM_MEMORY - * - * Enable the memory allocation layer. - * - * By default mbed TLS uses the system-provided calloc() and free(). - * This allows different allocators (self-implemented or provided) to be - * provided to the platform abstraction layer. - * - * Enabling MBEDTLS_PLATFORM_MEMORY without the - * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide - * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and - * free() function pointer at runtime. - * - * Enabling MBEDTLS_PLATFORM_MEMORY and specifying - * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the - * alternate function at compile time. - * - * Requires: MBEDTLS_PLATFORM_C - * - * Enable this layer to allow use of alternative memory allocators. - */ -//#define MBEDTLS_PLATFORM_MEMORY - -/** - * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS - * - * Do not assign standard functions in the platform layer (e.g. calloc() to - * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF) - * - * This makes sure there are no linking errors on platforms that do not support - * these functions. You will HAVE to provide alternatives, either at runtime - * via the platform_set_xxx() functions or at compile time by setting - * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a - * MBEDTLS_PLATFORM_XXX_MACRO. - * - * Requires: MBEDTLS_PLATFORM_C - * - * Uncomment to prevent default assignment of standard functions in the - * platform layer. - */ -//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS - -/** - * \def MBEDTLS_PLATFORM_EXIT_ALT - * - * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the - * function in the platform abstraction layer. - * - * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will - * provide a function "mbedtls_platform_set_printf()" that allows you to set an - * alternative printf function pointer. - * - * All these define require MBEDTLS_PLATFORM_C to be defined! - * - * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows; - * it will be enabled automatically by check_config.h - * - * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as - * MBEDTLS_PLATFORM_XXX_MACRO! - * - * Uncomment a macro to enable alternate implementation of specific base - * platform function - */ -//#define MBEDTLS_PLATFORM_EXIT_ALT -//#define MBEDTLS_PLATFORM_FPRINTF_ALT -//#define MBEDTLS_PLATFORM_PRINTF_ALT -//#define MBEDTLS_PLATFORM_SNPRINTF_ALT - -/** - * \def MBEDTLS_DEPRECATED_WARNING - * - * Mark deprecated functions so that they generate a warning if used. - * Functions deprecated in one version will usually be removed in the next - * version. You can enable this to help you prepare the transition to a new - * major version by making sure your code is not using these functions. - * - * This only works with GCC and Clang. With other compilers, you may want to - * use MBEDTLS_DEPRECATED_REMOVED - * - * Uncomment to get warnings on using deprecated functions. - */ -//#define MBEDTLS_DEPRECATED_WARNING - -/** - * \def MBEDTLS_DEPRECATED_REMOVED - * - * Remove deprecated functions so that they generate an error if used. - * Functions deprecated in one version will usually be removed in the next - * version. You can enable this to help you prepare the transition to a new - * major version by making sure your code is not using these functions. - * - * Uncomment to get errors on using deprecated functions. - */ -//#define MBEDTLS_DEPRECATED_REMOVED - -/* \} name SECTION: System support */ - -/** - * \name SECTION: mbed TLS feature support - * - * This section sets support for features that are or are not needed - * within the modules that are enabled. - * \{ - */ - -/** - * \def MBEDTLS_TIMING_ALT - * - * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(), - * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay() - * - * Only works if you have MBEDTLS_TIMING_C enabled. - * - * You will need to provide a header "timing_alt.h" and an implementation at - * compile time. - */ -//#define MBEDTLS_TIMING_ALT - -/** - * \def MBEDTLS_AES_ALT - * - * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your - * alternate core implementation of a symmetric crypto or hash module (e.g. - * platform specific assembly optimized implementations). Keep in mind that - * the function prototypes should remain the same. - * - * This replaces the whole module. If you only want to replace one of the - * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags. - * - * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer - * provide the "struct mbedtls_aes_context" definition and omit the base function - * declarations and implementations. "aes_alt.h" will be included from - * "aes.h" to include the new function definitions. - * - * Uncomment a macro to enable alternate implementation of the corresponding - * module. - */ -//#define MBEDTLS_AES_ALT -//#define MBEDTLS_ARC4_ALT -//#define MBEDTLS_BLOWFISH_ALT -//#define MBEDTLS_CAMELLIA_ALT -//#define MBEDTLS_DES_ALT -//#define MBEDTLS_XTEA_ALT -//#define MBEDTLS_MD2_ALT -//#define MBEDTLS_MD4_ALT -//#define MBEDTLS_MD5_ALT -//#define MBEDTLS_RIPEMD160_ALT -//#define MBEDTLS_SHA1_ALT -//#define MBEDTLS_SHA256_ALT -//#define MBEDTLS_SHA512_ALT - -/** - * \def MBEDTLS_MD2_PROCESS_ALT - * - * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you - * alternate core implementation of symmetric crypto or hash function. Keep in - * mind that function prototypes should remain the same. - * - * This replaces only one function. The header file from mbed TLS is still - * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags. - * - * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will - * no longer provide the mbedtls_sha1_process() function, but it will still provide - * the other function (using your mbedtls_sha1_process() function) and the definition - * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible - * with this definition. - * - * Note: if you use the AES_xxx_ALT macros, then is is recommended to also set - * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES - * tables. - * - * Uncomment a macro to enable alternate implementation of the corresponding - * function. - */ -//#define MBEDTLS_MD2_PROCESS_ALT -//#define MBEDTLS_MD4_PROCESS_ALT -//#define MBEDTLS_MD5_PROCESS_ALT -//#define MBEDTLS_RIPEMD160_PROCESS_ALT -//#define MBEDTLS_SHA1_PROCESS_ALT -//#define MBEDTLS_SHA256_PROCESS_ALT -//#define MBEDTLS_SHA512_PROCESS_ALT -//#define MBEDTLS_DES_SETKEY_ALT -//#define MBEDTLS_DES_CRYPT_ECB_ALT -//#define MBEDTLS_DES3_CRYPT_ECB_ALT -//#define MBEDTLS_AES_SETKEY_ENC_ALT -//#define MBEDTLS_AES_SETKEY_DEC_ALT -//#define MBEDTLS_AES_ENCRYPT_ALT -//#define MBEDTLS_AES_DECRYPT_ALT - -/** - * \def MBEDTLS_ENTROPY_HARDWARE_ALT - * - * Uncomment this macro to let mbed TLS use your own implementation of a - * hardware entropy collector. - * - * Your function must be called \c mbedtls_hardware_poll(), have the same - * prototype as declared in entropy_poll.h, and accept NULL as first argument. - * - * Uncomment to use your own hardware entropy collector. - */ -//#define MBEDTLS_ENTROPY_HARDWARE_ALT - -/** - * \def MBEDTLS_AES_ROM_TABLES - * - * Store the AES tables in ROM. - * - * Uncomment this macro to store the AES tables in ROM. - */ -//#define MBEDTLS_AES_ROM_TABLES - -/** - * \def MBEDTLS_CAMELLIA_SMALL_MEMORY - * - * Use less ROM for the Camellia implementation (saves about 768 bytes). - * - * Uncomment this macro to use less memory for Camellia. - */ -//#define MBEDTLS_CAMELLIA_SMALL_MEMORY - -/** - * \def MBEDTLS_CIPHER_MODE_CBC - * - * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers. - */ -#define MBEDTLS_CIPHER_MODE_CBC - -/** - * \def MBEDTLS_CIPHER_MODE_CFB - * - * Enable Cipher Feedback mode (CFB) for symmetric ciphers. - */ -#define MBEDTLS_CIPHER_MODE_CFB - -/** - * \def MBEDTLS_CIPHER_MODE_CTR - * - * Enable Counter Block Cipher mode (CTR) for symmetric ciphers. - */ -#define MBEDTLS_CIPHER_MODE_CTR - -/** - * \def MBEDTLS_CIPHER_NULL_CIPHER - * - * Enable NULL cipher. - * Warning: Only do so when you know what you are doing. This allows for - * encryption or channels without any security! - * - * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable - * the following ciphersuites: - * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384 - * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256 - * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA - * MBEDTLS_TLS_RSA_WITH_NULL_SHA256 - * MBEDTLS_TLS_RSA_WITH_NULL_SHA - * MBEDTLS_TLS_RSA_WITH_NULL_MD5 - * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA - * MBEDTLS_TLS_PSK_WITH_NULL_SHA384 - * MBEDTLS_TLS_PSK_WITH_NULL_SHA256 - * MBEDTLS_TLS_PSK_WITH_NULL_SHA - * - * Uncomment this macro to enable the NULL cipher and ciphersuites - */ -//#define MBEDTLS_CIPHER_NULL_CIPHER - -/** - * \def MBEDTLS_CIPHER_PADDING_PKCS7 - * - * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for - * specific padding modes in the cipher layer with cipher modes that support - * padding (e.g. CBC) - * - * If you disable all padding modes, only full blocks can be used with CBC. - * - * Enable padding modes in the cipher layer. - */ -#define MBEDTLS_CIPHER_PADDING_PKCS7 -#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -#define MBEDTLS_CIPHER_PADDING_ZEROS - -/** - * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES - * - * Enable weak ciphersuites in SSL / TLS. - * Warning: Only do so when you know what you are doing. This allows for - * channels with virtually no security at all! - * - * This enables the following ciphersuites: - * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA - * - * Uncomment this macro to enable weak ciphersuites - */ -//#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES - -/** - * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES - * - * Remove RC4 ciphersuites by default in SSL / TLS. - * This flag removes the ciphersuites based on RC4 from the default list as - * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to - * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them - * explicitly. - * - * Uncomment this macro to remove RC4 ciphersuites by default. - */ -#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES - -/** - * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED - * - * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve - * module. By default all supported curves are enabled. - * - * Comment macros to disable the curve and functions for it - */ -#define MBEDTLS_ECP_DP_SECP192R1_ENABLED -#define MBEDTLS_ECP_DP_SECP224R1_ENABLED -#define MBEDTLS_ECP_DP_SECP256R1_ENABLED -#define MBEDTLS_ECP_DP_SECP384R1_ENABLED -#define MBEDTLS_ECP_DP_SECP521R1_ENABLED -#define MBEDTLS_ECP_DP_SECP192K1_ENABLED -#define MBEDTLS_ECP_DP_SECP224K1_ENABLED -#define MBEDTLS_ECP_DP_SECP256K1_ENABLED -#define MBEDTLS_ECP_DP_BP256R1_ENABLED -#define MBEDTLS_ECP_DP_BP384R1_ENABLED -#define MBEDTLS_ECP_DP_BP512R1_ENABLED -#define MBEDTLS_ECP_DP_CURVE25519_ENABLED - -/** - * \def MBEDTLS_ECP_NIST_OPTIM - * - * Enable specific 'modulo p' routines for each NIST prime. - * Depending on the prime and architecture, makes operations 4 to 8 times - * faster on the corresponding curve. - * - * Comment this macro to disable NIST curves optimisation. - */ -#define MBEDTLS_ECP_NIST_OPTIM - -/** - * \def MBEDTLS_ECDSA_DETERMINISTIC - * - * Enable deterministic ECDSA (RFC 6979). - * Standard ECDSA is "fragile" in the sense that lack of entropy when signing - * may result in a compromise of the long-term signing key. This is avoided by - * the deterministic variant. - * - * Requires: MBEDTLS_HMAC_DRBG_C - * - * Comment this macro to disable deterministic ECDSA. - */ -#define MBEDTLS_ECDSA_DETERMINISTIC - -/** - * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED - * - * Enable the PSK based ciphersuite modes in SSL / TLS. - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED - * - * Enable the DHE-PSK based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_DHM_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED - * - * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_ECDH_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED - * - * Enable the RSA-PSK based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, - * MBEDTLS_X509_CRT_PARSE_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED - * - * Enable the RSA-only based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, - * MBEDTLS_X509_CRT_PARSE_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 - */ -#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED - * - * Enable the DHE-RSA based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, - * MBEDTLS_X509_CRT_PARSE_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED - * - * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, - * MBEDTLS_X509_CRT_PARSE_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED - * - * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C, - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - */ -#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED - * - * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 - */ -#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED - * - * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS. - * - * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 - */ -#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED - -/** - * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED - * - * Enable the ECJPAKE based ciphersuite modes in SSL / TLS. - * - * \warning This is currently experimental. EC J-PAKE support is based on the - * Thread v1.0.0 specification; incompatible changes to the specification - * might still happen. For this reason, this is disabled by default. - * - * Requires: MBEDTLS_ECJPAKE_C - * MBEDTLS_SHA256_C - * MBEDTLS_ECP_DP_SECP256R1_ENABLED - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 - */ -//#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED - -/** - * \def MBEDTLS_PK_PARSE_EC_EXTENDED - * - * Enhance support for reading EC keys using variants of SEC1 not allowed by - * RFC 5915 and RFC 5480. - * - * Currently this means parsing the SpecifiedECDomain choice of EC - * parameters (only known groups are supported, not arbitrary domains, to - * avoid validation issues). - * - * Disable if you only need to support RFC 5915 + 5480 key formats. - */ -#define MBEDTLS_PK_PARSE_EC_EXTENDED - -/** - * \def MBEDTLS_ERROR_STRERROR_DUMMY - * - * Enable a dummy error function to make use of mbedtls_strerror() in - * third party libraries easier when MBEDTLS_ERROR_C is disabled - * (no effect when MBEDTLS_ERROR_C is enabled). - * - * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're - * not using mbedtls_strerror() or error_strerror() in your application. - * - * Disable if you run into name conflicts and want to really remove the - * mbedtls_strerror() - */ -#define MBEDTLS_ERROR_STRERROR_DUMMY - -/** - * \def MBEDTLS_GENPRIME - * - * Enable the prime-number generation code. - * - * Requires: MBEDTLS_BIGNUM_C - */ -#define MBEDTLS_GENPRIME - -/** - * \def MBEDTLS_FS_IO - * - * Enable functions that use the filesystem. - */ -#define MBEDTLS_FS_IO - -/** - * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES - * - * Do not add default entropy sources. These are the platform specific, - * mbedtls_timing_hardclock and HAVEGE based poll functions. - * - * This is useful to have more control over the added entropy sources in an - * application. - * - * Uncomment this macro to prevent loading of default entropy functions. - */ -//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES - -/** - * \def MBEDTLS_NO_PLATFORM_ENTROPY - * - * Do not use built-in platform entropy functions. - * This is useful if your platform does not support - * standards like the /dev/urandom or Windows CryptoAPI. - * - * Uncomment this macro to disable the built-in platform entropy functions. - */ -//#define MBEDTLS_NO_PLATFORM_ENTROPY - -/** - * \def MBEDTLS_ENTROPY_FORCE_SHA256 - * - * Force the entropy accumulator to use a SHA-256 accumulator instead of the - * default SHA-512 based one (if both are available). - * - * Requires: MBEDTLS_SHA256_C - * - * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option - * if you have performance concerns. - * - * This option is only useful if both MBEDTLS_SHA256_C and - * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. - */ -//#define MBEDTLS_ENTROPY_FORCE_SHA256 - -/** - * \def MBEDTLS_MEMORY_DEBUG - * - * Enable debugging of buffer allocator memory issues. Automatically prints - * (to stderr) all (fatal) messages on memory allocation issues. Enables - * function for 'debug output' of allocated memory. - * - * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * - * Uncomment this macro to let the buffer allocator print out error messages. - */ -//#define MBEDTLS_MEMORY_DEBUG - -/** - * \def MBEDTLS_MEMORY_BACKTRACE - * - * Include backtrace information with each allocated block. - * - * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * GLIBC-compatible backtrace() an backtrace_symbols() support - * - * Uncomment this macro to include backtrace information - */ -//#define MBEDTLS_MEMORY_BACKTRACE - -/** - * \def MBEDTLS_PK_RSA_ALT_SUPPORT - * - * Support external private RSA keys (eg from a HSM) in the PK layer. - * - * Comment this macro to disable support for external private RSA keys. - */ -#define MBEDTLS_PK_RSA_ALT_SUPPORT - -/** - * \def MBEDTLS_PKCS1_V15 - * - * Enable support for PKCS#1 v1.5 encoding. - * - * Requires: MBEDTLS_RSA_C - * - * This enables support for PKCS#1 v1.5 operations. - */ -#define MBEDTLS_PKCS1_V15 - -/** - * \def MBEDTLS_PKCS1_V21 - * - * Enable support for PKCS#1 v2.1 encoding. - * - * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C - * - * This enables support for RSAES-OAEP and RSASSA-PSS operations. - */ -#define MBEDTLS_PKCS1_V21 - -/** - * \def MBEDTLS_RSA_NO_CRT - * - * Do not use the Chinese Remainder Theorem for the RSA private operation. - * - * Uncomment this macro to disable the use of CRT in RSA. - * - */ -//#define MBEDTLS_RSA_NO_CRT - -/** - * \def MBEDTLS_SELF_TEST - * - * Enable the checkup functions (*_self_test). - */ -#define MBEDTLS_SELF_TEST - -/** - * \def MBEDTLS_SHA256_SMALLER - * - * Enable an implementation of SHA-256 that has lower ROM footprint but also - * lower performance. - * - * The default implementation is meant to be a reasonnable compromise between - * performance and size. This version optimizes more aggressively for size at - * the expense of performance. Eg on Cortex-M4 it reduces the size of - * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about - * 30%. - * - * Uncomment to enable the smaller implementation of SHA256. - */ -//#define MBEDTLS_SHA256_SMALLER - -/** - * \def MBEDTLS_SSL_AEAD_RANDOM_IV - * - * Generate a random IV rather than using the record sequence number as a - * nonce for ciphersuites using and AEAD algorithm (GCM or CCM). - * - * Using the sequence number is generally recommended. - * - * Uncomment this macro to always use random IVs with AEAD ciphersuites. - */ -//#define MBEDTLS_SSL_AEAD_RANDOM_IV - -/** - * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES - * - * Enable sending of alert messages in case of encountered errors as per RFC. - * If you choose not to send the alert messages, mbed TLS can still communicate - * with other servers, only debugging of failures is harder. - * - * The advantage of not sending alert messages, is that no information is given - * about reasons for failures thus preventing adversaries of gaining intel. - * - * Enable sending of all alert messages - */ -#define MBEDTLS_SSL_ALL_ALERT_MESSAGES - -/** - * \def MBEDTLS_SSL_DEBUG_ALL - * - * Enable the debug messages in SSL module for all issues. - * Debug messages have been disabled in some places to prevent timing - * attacks due to (unbalanced) debugging function calls. - * - * If you need all error reporting you should enable this during debugging, - * but remove this for production servers that should log as well. - * - * Uncomment this macro to report all debug messages on errors introducing - * a timing side-channel. - * - */ -//#define MBEDTLS_SSL_DEBUG_ALL - -/** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC - * - * Enable support for Encrypt-then-MAC, RFC 7366. - * - * This allows peers that both support it to use a more robust protection for - * ciphersuites using CBC, providing deep resistance against timing attacks - * on the padding or underlying cipher. - * - * This only affects CBC ciphersuites, and is useless if none is defined. - * - * Requires: MBEDTLS_SSL_PROTO_TLS1 or - * MBEDTLS_SSL_PROTO_TLS1_1 or - * MBEDTLS_SSL_PROTO_TLS1_2 - * - * Comment this macro to disable support for Encrypt-then-MAC - */ -#define MBEDTLS_SSL_ENCRYPT_THEN_MAC - -/** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET - * - * Enable support for Extended Master Secret, aka Session Hash - * (draft-ietf-tls-session-hash-02). - * - * This was introduced as "the proper fix" to the Triple Handshake familiy of - * attacks, but it is recommended to always use it (even if you disable - * renegotiation), since it actually fixes a more fundamental issue in the - * original SSL/TLS design, and has implications beyond Triple Handshake. - * - * Requires: MBEDTLS_SSL_PROTO_TLS1 or - * MBEDTLS_SSL_PROTO_TLS1_1 or - * MBEDTLS_SSL_PROTO_TLS1_2 - * - * Comment this macro to disable support for Extended Master Secret. - */ -#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET - -/** - * \def MBEDTLS_SSL_FALLBACK_SCSV - * - * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00). - * - * For servers, it is recommended to always enable this, unless you support - * only one version of TLS, or know for sure that none of your clients - * implements a fallback strategy. - * - * For clients, you only need this if you're using a fallback strategy, which - * is not recommended in the first place, unless you absolutely need it to - * interoperate with buggy (version-intolerant) servers. - * - * Comment this macro to disable support for FALLBACK_SCSV - */ -#define MBEDTLS_SSL_FALLBACK_SCSV - -/** - * \def MBEDTLS_SSL_HW_RECORD_ACCEL - * - * Enable hooking functions in SSL module for hardware acceleration of - * individual records. - * - * Uncomment this macro to enable hooking functions. - */ -//#define MBEDTLS_SSL_HW_RECORD_ACCEL - -/** - * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING - * - * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0. - * - * This is a countermeasure to the BEAST attack, which also minimizes the risk - * of interoperability issues compared to sending 0-length records. - * - * Comment this macro to disable 1/n-1 record splitting. - */ -#define MBEDTLS_SSL_CBC_RECORD_SPLITTING - -/** - * \def MBEDTLS_SSL_RENEGOTIATION - * - * Disable support for TLS renegotiation. - * - * The two main uses of renegotiation are (1) refresh keys on long-lived - * connections and (2) client authentication after the initial handshake. - * If you don't need renegotiation, it's probably better to disable it, since - * it has been associated with security issues in the past and is easy to - * misuse/misunderstand. - * - * Comment this to disable support for renegotiation. - */ -#define MBEDTLS_SSL_RENEGOTIATION - -/** - * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO - * - * Enable support for receiving and parsing SSLv2 Client Hello messages for the - * SSL Server module (MBEDTLS_SSL_SRV_C). - * - * Uncomment this macro to enable support for SSLv2 Client Hello messages. - */ -//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO - -/** - * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE - * - * Pick the ciphersuite according to the client's preferences rather than ours - * in the SSL Server module (MBEDTLS_SSL_SRV_C). - * - * Uncomment this macro to respect client's ciphersuite order - */ -//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE - -/** - * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH - * - * Enable support for RFC 6066 max_fragment_length extension in SSL. - * - * Comment this macro to disable support for the max_fragment_length extension - */ -#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH - -/** - * \def MBEDTLS_SSL_PROTO_SSL3 - * - * Enable support for SSL 3.0. - * - * Requires: MBEDTLS_MD5_C - * MBEDTLS_SHA1_C - * - * Comment this macro to disable support for SSL 3.0 - */ -#define MBEDTLS_SSL_PROTO_SSL3 - -/** - * \def MBEDTLS_SSL_PROTO_TLS1 - * - * Enable support for TLS 1.0. - * - * Requires: MBEDTLS_MD5_C - * MBEDTLS_SHA1_C - * - * Comment this macro to disable support for TLS 1.0 - */ -#define MBEDTLS_SSL_PROTO_TLS1 - -/** - * \def MBEDTLS_SSL_PROTO_TLS1_1 - * - * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled). - * - * Requires: MBEDTLS_MD5_C - * MBEDTLS_SHA1_C - * - * Comment this macro to disable support for TLS 1.1 / DTLS 1.0 - */ -#define MBEDTLS_SSL_PROTO_TLS1_1 - -/** - * \def MBEDTLS_SSL_PROTO_TLS1_2 - * - * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled). - * - * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C - * (Depends on ciphersuites) - * - * Comment this macro to disable support for TLS 1.2 / DTLS 1.2 - */ -#define MBEDTLS_SSL_PROTO_TLS1_2 - -/** - * \def MBEDTLS_SSL_PROTO_DTLS - * - * Enable support for DTLS (all available versions). - * - * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0, - * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2. - * - * Requires: MBEDTLS_SSL_PROTO_TLS1_1 - * or MBEDTLS_SSL_PROTO_TLS1_2 - * - * Comment this macro to disable support for DTLS - */ -#define MBEDTLS_SSL_PROTO_DTLS - -/** - * \def MBEDTLS_SSL_ALPN - * - * Enable support for RFC 7301 Application Layer Protocol Negotiation. - * - * Comment this macro to disable support for ALPN. - */ -#define MBEDTLS_SSL_ALPN - -/** - * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY - * - * Enable support for the anti-replay mechanism in DTLS. - * - * Requires: MBEDTLS_SSL_TLS_C - * MBEDTLS_SSL_PROTO_DTLS - * - * \warning Disabling this is often a security risk! - * See mbedtls_ssl_conf_dtls_anti_replay() for details. - * - * Comment this to disable anti-replay in DTLS. - */ -#define MBEDTLS_SSL_DTLS_ANTI_REPLAY - -/** - * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY - * - * Enable support for HelloVerifyRequest on DTLS servers. - * - * This feature is highly recommended to prevent DTLS servers being used as - * amplifiers in DoS attacks against other hosts. It should always be enabled - * unless you know for sure amplification cannot be a problem in the - * environment in which your server operates. - * - * \warning Disabling this can ba a security risk! (see above) - * - * Requires: MBEDTLS_SSL_PROTO_DTLS - * - * Comment this to disable support for HelloVerifyRequest. - */ -#define MBEDTLS_SSL_DTLS_HELLO_VERIFY - -/** - * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE - * - * Enable server-side support for clients that reconnect from the same port. - * - * Some clients unexpectedly close the connection and try to reconnect using the - * same source port. This needs special support from the server to handle the - * new connection securely, as described in section 4.2.8 of RFC 6347. This - * flag enables that support. - * - * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY - * - * Comment this to disable support for clients reusing the source port. - */ -#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE - -/** - * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT - * - * Enable support for a limit of records with bad MAC. - * - * See mbedtls_ssl_conf_dtls_badmac_limit(). - * - * Requires: MBEDTLS_SSL_PROTO_DTLS - */ -#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT - -/** - * \def MBEDTLS_SSL_SESSION_TICKETS - * - * Enable support for RFC 5077 session tickets in SSL. - * Client-side, provides full support for session tickets (maintainance of a - * session store remains the responsibility of the application, though). - * Server-side, you also need to provide callbacks for writing and parsing - * tickets, including authenticated encryption and key management. Example - * callbacks are provided by MBEDTLS_SSL_TICKET_C. - * - * Comment this macro to disable support for SSL session tickets - */ -#define MBEDTLS_SSL_SESSION_TICKETS - -/** - * \def MBEDTLS_SSL_EXPORT_KEYS - * - * Enable support for exporting key block and master secret. - * This is required for certain users of TLS, e.g. EAP-TLS. - * - * Comment this macro to disable support for key export - */ -#define MBEDTLS_SSL_EXPORT_KEYS - -/** - * \def MBEDTLS_SSL_SERVER_NAME_INDICATION - * - * Enable support for RFC 6066 server name indication (SNI) in SSL. - * - * Requires: MBEDTLS_X509_CRT_PARSE_C - * - * Comment this macro to disable support for server name indication in SSL - */ -#define MBEDTLS_SSL_SERVER_NAME_INDICATION - -/** - * \def MBEDTLS_SSL_TRUNCATED_HMAC - * - * Enable support for RFC 6066 truncated HMAC in SSL. - * - * Comment this macro to disable support for truncated HMAC in SSL - */ -#define MBEDTLS_SSL_TRUNCATED_HMAC - -/** - * \def MBEDTLS_THREADING_ALT - * - * Provide your own alternate threading implementation. - * - * Requires: MBEDTLS_THREADING_C - * - * Uncomment this to allow your own alternate threading implementation. - */ -//#define MBEDTLS_THREADING_ALT - -/** - * \def MBEDTLS_THREADING_PTHREAD - * - * Enable the pthread wrapper layer for the threading layer. - * - * Requires: MBEDTLS_THREADING_C - * - * Uncomment this to enable pthread mutexes. - */ -//#define MBEDTLS_THREADING_PTHREAD - -/** - * \def MBEDTLS_VERSION_FEATURES - * - * Allow run-time checking of compile-time enabled features. Thus allowing users - * to check at run-time if the library is for instance compiled with threading - * support via mbedtls_version_check_feature(). - * - * Requires: MBEDTLS_VERSION_C - * - * Comment this to disable run-time checking and save ROM space - */ -#define MBEDTLS_VERSION_FEATURES - -/** - * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 - * - * If set, the X509 parser will not break-off when parsing an X509 certificate - * and encountering an extension in a v1 or v2 certificate. - * - * Uncomment to prevent an error. - */ -//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 - -/** - * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION - * - * If set, the X509 parser will not break-off when parsing an X509 certificate - * and encountering an unknown critical extension. - * - * \warning Depending on your PKI use, enabling this can be a security risk! - * - * Uncomment to prevent an error. - */ -//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION - -/** - * \def MBEDTLS_X509_CHECK_KEY_USAGE - * - * Enable verification of the keyUsage extension (CA and leaf certificates). - * - * Disabling this avoids problems with mis-issued and/or misused - * (intermediate) CA and leaf certificates. - * - * \warning Depending on your PKI use, disabling this can be a security risk! - * - * Comment to skip keyUsage checking for both CA and leaf certificates. - */ -#define MBEDTLS_X509_CHECK_KEY_USAGE - -/** - * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE - * - * Enable verification of the extendedKeyUsage extension (leaf certificates). - * - * Disabling this avoids problems with mis-issued and/or misused certificates. - * - * \warning Depending on your PKI use, disabling this can be a security risk! - * - * Comment to skip extendedKeyUsage checking for certificates. - */ -#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE - -/** - * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT - * - * Enable parsing and verification of X.509 certificates, CRLs and CSRS - * signed with RSASSA-PSS (aka PKCS#1 v2.1). - * - * Comment this macro to disallow using RSASSA-PSS in certificates. - */ -#define MBEDTLS_X509_RSASSA_PSS_SUPPORT - -/** - * \def MBEDTLS_ZLIB_SUPPORT - * - * If set, the SSL/TLS module uses ZLIB to support compression and - * decompression of packet data. - * - * \warning TLS-level compression MAY REDUCE SECURITY! See for example the - * CRIME attack. Before enabling this option, you should examine with care if - * CRIME or similar exploits may be a applicable to your use case. - * - * \note Currently compression can't be used with DTLS. - * - * Used in: library/ssl_tls.c - * library/ssl_cli.c - * library/ssl_srv.c - * - * This feature requires zlib library and headers to be present. - * - * Uncomment to enable use of ZLIB - */ -//#define MBEDTLS_ZLIB_SUPPORT -/* \} name SECTION: mbed TLS feature support */ - -/** - * \name SECTION: mbed TLS modules - * - * This section enables or disables entire modules in mbed TLS - * \{ - */ - -/** - * \def MBEDTLS_AESNI_C - * - * Enable AES-NI support on x86-64. - * - * Module: library/aesni.c - * Caller: library/aes.c - * - * Requires: MBEDTLS_HAVE_ASM - * - * This modules adds support for the AES-NI instructions on x86-64 - */ -#define MBEDTLS_AESNI_C - -/** - * \def MBEDTLS_AES_C - * - * Enable the AES block cipher. - * - * Module: library/aes.c - * Caller: library/ssl_tls.c - * library/pem.c - * library/ctr_drbg.c - * - * This module enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA - * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 - * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 - * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA - * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 - * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 - * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA - * - * PEM_PARSE uses AES for decrypting encrypted keys. - */ -#define MBEDTLS_AES_C - -/** - * \def MBEDTLS_ARC4_C - * - * Enable the ARCFOUR stream cipher. - * - * Module: library/arc4.c - * Caller: library/ssl_tls.c - * - * This module enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA - * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA - * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 - * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA - * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA - */ -#define MBEDTLS_ARC4_C - -/** - * \def MBEDTLS_ASN1_PARSE_C - * - * Enable the generic ASN1 parser. - * - * Module: library/asn1.c - * Caller: library/x509.c - * library/dhm.c - * library/pkcs12.c - * library/pkcs5.c - * library/pkparse.c - */ -#define MBEDTLS_ASN1_PARSE_C - -/** - * \def MBEDTLS_ASN1_WRITE_C - * - * Enable the generic ASN1 writer. - * - * Module: library/asn1write.c - * Caller: library/ecdsa.c - * library/pkwrite.c - * library/x509_create.c - * library/x509write_crt.c - * library/mbedtls_x509write_csr.c - */ -#define MBEDTLS_ASN1_WRITE_C - -/** - * \def MBEDTLS_BASE64_C - * - * Enable the Base64 module. - * - * Module: library/base64.c - * Caller: library/pem.c - * - * This module is required for PEM support (required by X.509). - */ -#define MBEDTLS_BASE64_C - -/** - * \def MBEDTLS_BIGNUM_C - * - * Enable the multi-precision integer library. - * - * Module: library/bignum.c - * Caller: library/dhm.c - * library/ecp.c - * library/ecdsa.c - * library/rsa.c - * library/ssl_tls.c - * - * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support. - */ -#define MBEDTLS_BIGNUM_C - -/** - * \def MBEDTLS_BLOWFISH_C - * - * Enable the Blowfish block cipher. - * - * Module: library/blowfish.c - */ -#define MBEDTLS_BLOWFISH_C - -/** - * \def MBEDTLS_CAMELLIA_C - * - * Enable the Camellia block cipher. - * - * Module: library/camellia.c - * Caller: library/ssl_tls.c - * - * This module enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 - */ -#define MBEDTLS_CAMELLIA_C - -/** - * \def MBEDTLS_CCM_C - * - * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher. - * - * Module: library/ccm.c - * - * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C - * - * This module enables the AES-CCM ciphersuites, if other requisites are - * enabled as well. - */ -#define MBEDTLS_CCM_C - -/** - * \def MBEDTLS_CERTS_C - * - * Enable the test certificates. - * - * Module: library/certs.c - * Caller: - * - * This module is used for testing (ssl_client/server). - */ -#define MBEDTLS_CERTS_C - -/** - * \def MBEDTLS_CIPHER_C - * - * Enable the generic cipher layer. - * - * Module: library/cipher.c - * Caller: library/ssl_tls.c - * - * Uncomment to enable generic cipher wrappers. - */ -#define MBEDTLS_CIPHER_C - -/** - * \def MBEDTLS_CTR_DRBG_C - * - * Enable the CTR_DRBG AES-256-based random generator. - * - * Module: library/ctr_drbg.c - * Caller: - * - * Requires: MBEDTLS_AES_C - * - * This module provides the CTR_DRBG AES-256 random number generator. - */ -#define MBEDTLS_CTR_DRBG_C - -/** - * \def MBEDTLS_DEBUG_C - * - * Enable the debug functions. - * - * Module: library/debug.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * library/ssl_tls.c - * - * This module provides debugging functions. - */ -#define MBEDTLS_DEBUG_C - -/** - * \def MBEDTLS_DES_C - * - * Enable the DES block cipher. - * - * Module: library/des.c - * Caller: library/pem.c - * library/ssl_tls.c - * - * This module enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA - * - * PEM_PARSE uses DES/3DES for decrypting encrypted keys. - */ -#define MBEDTLS_DES_C - -/** - * \def MBEDTLS_DHM_C - * - * Enable the Diffie-Hellman-Merkle module. - * - * Module: library/dhm.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * - * This module is used by the following key exchanges: - * DHE-RSA, DHE-PSK - */ -#define MBEDTLS_DHM_C - -/** - * \def MBEDTLS_ECDH_C - * - * Enable the elliptic curve Diffie-Hellman library. - * - * Module: library/ecdh.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * - * This module is used by the following key exchanges: - * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK - * - * Requires: MBEDTLS_ECP_C - */ -#define MBEDTLS_ECDH_C - -/** - * \def MBEDTLS_ECDSA_C - * - * Enable the elliptic curve DSA library. - * - * Module: library/ecdsa.c - * Caller: - * - * This module is used by the following key exchanges: - * ECDHE-ECDSA - * - * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C - */ -#define MBEDTLS_ECDSA_C - -/** - * \def MBEDTLS_ECJPAKE_C - * - * Enable the elliptic curve J-PAKE library. - * - * \warning This is currently experimental. EC J-PAKE support is based on the - * Thread v1.0.0 specification; incompatible changes to the specification - * might still happen. For this reason, this is disabled by default. - * - * Module: library/ecjpake.c - * Caller: - * - * This module is used by the following key exchanges: - * ECJPAKE - * - * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C - */ -//#define MBEDTLS_ECJPAKE_C - -/** - * \def MBEDTLS_ECP_C - * - * Enable the elliptic curve over GF(p) library. - * - * Module: library/ecp.c - * Caller: library/ecdh.c - * library/ecdsa.c - * library/ecjpake.c - * - * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED - */ -#define MBEDTLS_ECP_C - -/** - * \def MBEDTLS_ENTROPY_C - * - * Enable the platform-specific entropy code. - * - * Module: library/entropy.c - * Caller: - * - * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C - * - * This module provides a generic entropy pool - */ -#define MBEDTLS_ENTROPY_C - -/** - * \def MBEDTLS_ERROR_C - * - * Enable error code to error string conversion. - * - * Module: library/error.c - * Caller: - * - * This module enables mbedtls_strerror(). - */ -#define MBEDTLS_ERROR_C - -/** - * \def MBEDTLS_GCM_C - * - * Enable the Galois/Counter Mode (GCM) for AES. - * - * Module: library/gcm.c - * - * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C - * - * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other - * requisites are enabled as well. - */ -#define MBEDTLS_GCM_C - -/** - * \def MBEDTLS_HAVEGE_C - * - * Enable the HAVEGE random generator. - * - * Warning: the HAVEGE random generator is not suitable for virtualized - * environments - * - * Warning: the HAVEGE random generator is dependent on timing and specific - * processor traits. It is therefore not advised to use HAVEGE as - * your applications primary random generator or primary entropy pool - * input. As a secondary input to your entropy pool, it IS able add - * the (limited) extra entropy it provides. - * - * Module: library/havege.c - * Caller: - * - * Requires: MBEDTLS_TIMING_C - * - * Uncomment to enable the HAVEGE random generator. - */ -//#define MBEDTLS_HAVEGE_C - -/** - * \def MBEDTLS_HMAC_DRBG_C - * - * Enable the HMAC_DRBG random generator. - * - * Module: library/hmac_drbg.c - * Caller: - * - * Requires: MBEDTLS_MD_C - * - * Uncomment to enable the HMAC_DRBG random number geerator. - */ -#define MBEDTLS_HMAC_DRBG_C - -/** - * \def MBEDTLS_MD_C - * - * Enable the generic message digest layer. - * - * Module: library/mbedtls_md.c - * Caller: - * - * Uncomment to enable generic message digest wrappers. - */ -#define MBEDTLS_MD_C - -/** - * \def MBEDTLS_MD2_C - * - * Enable the MD2 hash algorithm. - * - * Module: library/mbedtls_md2.c - * Caller: - * - * Uncomment to enable support for (rare) MD2-signed X.509 certs. - */ -//#define MBEDTLS_MD2_C - -/** - * \def MBEDTLS_MD4_C - * - * Enable the MD4 hash algorithm. - * - * Module: library/mbedtls_md4.c - * Caller: - * - * Uncomment to enable support for (rare) MD4-signed X.509 certs. - */ -//#define MBEDTLS_MD4_C - -/** - * \def MBEDTLS_MD5_C - * - * Enable the MD5 hash algorithm. - * - * Module: library/mbedtls_md5.c - * Caller: library/mbedtls_md.c - * library/pem.c - * library/ssl_tls.c - * - * This module is required for SSL/TLS and X.509. - * PEM_PARSE uses MD5 for decrypting encrypted keys. - */ -#define MBEDTLS_MD5_C - -/** - * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C - * - * Enable the buffer allocator implementation that makes use of a (stack) - * based buffer to 'allocate' dynamic memory. (replaces calloc() and free() - * calls) - * - * Module: library/memory_buffer_alloc.c - * - * Requires: MBEDTLS_PLATFORM_C - * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS) - * - * Enable this module to enable the buffer memory allocator. - */ -//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C - -/** - * \def MBEDTLS_NET_C - * - * Enable the TCP/IP networking routines. - * - * Module: library/net.c - * - * This module provides TCP/IP networking routines. - */ -#define MBEDTLS_NET_C - -/** - * \def MBEDTLS_OID_C - * - * Enable the OID database. - * - * Module: library/oid.c - * Caller: library/asn1write.c - * library/pkcs5.c - * library/pkparse.c - * library/pkwrite.c - * library/rsa.c - * library/x509.c - * library/x509_create.c - * library/mbedtls_x509_crl.c - * library/mbedtls_x509_crt.c - * library/mbedtls_x509_csr.c - * library/x509write_crt.c - * library/mbedtls_x509write_csr.c - * - * This modules translates between OIDs and internal values. - */ -#define MBEDTLS_OID_C - -/** - * \def MBEDTLS_PADLOCK_C - * - * Enable VIA Padlock support on x86. - * - * Module: library/padlock.c - * Caller: library/aes.c - * - * Requires: MBEDTLS_HAVE_ASM - * - * This modules adds support for the VIA PadLock on x86. - */ -#define MBEDTLS_PADLOCK_C - -/** - * \def MBEDTLS_PEM_PARSE_C - * - * Enable PEM decoding / parsing. - * - * Module: library/pem.c - * Caller: library/dhm.c - * library/pkparse.c - * library/mbedtls_x509_crl.c - * library/mbedtls_x509_crt.c - * library/mbedtls_x509_csr.c - * - * Requires: MBEDTLS_BASE64_C - * - * This modules adds support for decoding / parsing PEM files. - */ -#define MBEDTLS_PEM_PARSE_C - -/** - * \def MBEDTLS_PEM_WRITE_C - * - * Enable PEM encoding / writing. - * - * Module: library/pem.c - * Caller: library/pkwrite.c - * library/x509write_crt.c - * library/mbedtls_x509write_csr.c - * - * Requires: MBEDTLS_BASE64_C - * - * This modules adds support for encoding / writing PEM files. - */ -#define MBEDTLS_PEM_WRITE_C - -/** - * \def MBEDTLS_PK_C - * - * Enable the generic public (asymetric) key layer. - * - * Module: library/pk.c - * Caller: library/ssl_tls.c - * library/ssl_cli.c - * library/ssl_srv.c - * - * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C - * - * Uncomment to enable generic public key wrappers. - */ -#define MBEDTLS_PK_C - -/** - * \def MBEDTLS_PK_PARSE_C - * - * Enable the generic public (asymetric) key parser. - * - * Module: library/pkparse.c - * Caller: library/mbedtls_x509_crt.c - * library/mbedtls_x509_csr.c - * - * Requires: MBEDTLS_PK_C - * - * Uncomment to enable generic public key parse functions. - */ -#define MBEDTLS_PK_PARSE_C - -/** - * \def MBEDTLS_PK_WRITE_C - * - * Enable the generic public (asymetric) key writer. - * - * Module: library/pkwrite.c - * Caller: library/x509write.c - * - * Requires: MBEDTLS_PK_C - * - * Uncomment to enable generic public key write functions. - */ -#define MBEDTLS_PK_WRITE_C - -/** - * \def MBEDTLS_PKCS5_C - * - * Enable PKCS#5 functions. - * - * Module: library/pkcs5.c - * - * Requires: MBEDTLS_MD_C - * - * This module adds support for the PKCS#5 functions. - */ -#define MBEDTLS_PKCS5_C - -/** - * \def MBEDTLS_PKCS11_C - * - * Enable wrapper for PKCS#11 smartcard support. - * - * Module: library/pkcs11.c - * Caller: library/pk.c - * - * Requires: MBEDTLS_PK_C - * - * This module enables SSL/TLS PKCS #11 smartcard support. - * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) - */ -//#define MBEDTLS_PKCS11_C - -/** - * \def MBEDTLS_PKCS12_C - * - * Enable PKCS#12 PBE functions. - * Adds algorithms for parsing PKCS#8 encrypted private keys - * - * Module: library/pkcs12.c - * Caller: library/pkparse.c - * - * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C - * Can use: MBEDTLS_ARC4_C - * - * This module enables PKCS#12 functions. - */ -#define MBEDTLS_PKCS12_C - -/** - * \def MBEDTLS_PLATFORM_C - * - * Enable the platform abstraction layer that allows you to re-assign - * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit(). - * - * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT - * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned - * above to be specified at runtime or compile time respectively. - * - * \note This abstraction layer must be enabled on Windows (including MSYS2) - * as other module rely on it for a fixed snprintf implementation. - * - * Module: library/platform.c - * Caller: Most other .c files - * - * This module enables abstraction of common (libc) functions. - */ -#define MBEDTLS_PLATFORM_C - -/** - * \def MBEDTLS_RIPEMD160_C - * - * Enable the RIPEMD-160 hash algorithm. - * - * Module: library/mbedtls_ripemd160.c - * Caller: library/mbedtls_md.c - * - */ -#define MBEDTLS_RIPEMD160_C - -/** - * \def MBEDTLS_RSA_C - * - * Enable the RSA public-key cryptosystem. - * - * Module: library/rsa.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * library/ssl_tls.c - * library/x509.c - * - * This module is used by the following key exchanges: - * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK - * - * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C - */ -#define MBEDTLS_RSA_C - -/** - * \def MBEDTLS_SHA1_C - * - * Enable the SHA1 cryptographic hash algorithm. - * - * Module: library/mbedtls_sha1.c - * Caller: library/mbedtls_md.c - * library/ssl_cli.c - * library/ssl_srv.c - * library/ssl_tls.c - * library/x509write_crt.c - * - * This module is required for SSL/TLS and SHA1-signed certificates. - */ -#define MBEDTLS_SHA1_C - -/** - * \def MBEDTLS_SHA256_C - * - * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. - * - * Module: library/mbedtls_sha256.c - * Caller: library/entropy.c - * library/mbedtls_md.c - * library/ssl_cli.c - * library/ssl_srv.c - * library/ssl_tls.c - * - * This module adds support for SHA-224 and SHA-256. - * This module is required for the SSL/TLS 1.2 PRF function. - */ -#define MBEDTLS_SHA256_C - -/** - * \def MBEDTLS_SHA512_C - * - * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. - * - * Module: library/mbedtls_sha512.c - * Caller: library/entropy.c - * library/mbedtls_md.c - * library/ssl_cli.c - * library/ssl_srv.c - * - * This module adds support for SHA-384 and SHA-512. - */ -#define MBEDTLS_SHA512_C - -/** - * \def MBEDTLS_SSL_CACHE_C - * - * Enable simple SSL cache implementation. - * - * Module: library/ssl_cache.c - * Caller: - * - * Requires: MBEDTLS_SSL_CACHE_C - */ -#define MBEDTLS_SSL_CACHE_C - -/** - * \def MBEDTLS_SSL_COOKIE_C - * - * Enable basic implementation of DTLS cookies for hello verification. - * - * Module: library/ssl_cookie.c - * Caller: - */ -#define MBEDTLS_SSL_COOKIE_C - -/** - * \def MBEDTLS_SSL_TICKET_C - * - * Enable an implementation of TLS server-side callbacks for session tickets. - * - * Module: library/ssl_ticket.c - * Caller: - * - * Requires: MBEDTLS_CIPHER_C - */ -#define MBEDTLS_SSL_TICKET_C - -/** - * \def MBEDTLS_SSL_CLI_C - * - * Enable the SSL/TLS client code. - * - * Module: library/ssl_cli.c - * Caller: - * - * Requires: MBEDTLS_SSL_TLS_C - * - * This module is required for SSL/TLS client support. - */ -#define MBEDTLS_SSL_CLI_C - -/** - * \def MBEDTLS_SSL_SRV_C - * - * Enable the SSL/TLS server code. - * - * Module: library/ssl_srv.c - * Caller: - * - * Requires: MBEDTLS_SSL_TLS_C - * - * This module is required for SSL/TLS server support. - */ -#define MBEDTLS_SSL_SRV_C - -/** - * \def MBEDTLS_SSL_TLS_C - * - * Enable the generic SSL/TLS code. - * - * Module: library/ssl_tls.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * - * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C - * and at least one of the MBEDTLS_SSL_PROTO_XXX defines - * - * This module is required for SSL/TLS. - */ -#define MBEDTLS_SSL_TLS_C - -/** - * \def MBEDTLS_THREADING_C - * - * Enable the threading abstraction layer. - * By default mbed TLS assumes it is used in a non-threaded environment or that - * contexts are not shared between threads. If you do intend to use contexts - * between threads, you will need to enable this layer to prevent race - * conditions. - * - * Module: library/threading.c - * - * This allows different threading implementations (self-implemented or - * provided). - * - * You will have to enable either MBEDTLS_THREADING_ALT or - * MBEDTLS_THREADING_PTHREAD. - * - * Enable this layer to allow use of mutexes within mbed TLS - */ -//#define MBEDTLS_THREADING_C - -/** - * \def MBEDTLS_TIMING_C - * - * Enable the portable timing interface. - * - * Module: library/timing.c - * Caller: library/havege.c - * - * This module is used by the HAVEGE random number generator. - */ -#define MBEDTLS_TIMING_C - -/** - * \def MBEDTLS_VERSION_C - * - * Enable run-time version information. - * - * Module: library/version.c - * - * This module provides run-time version information. - */ -#define MBEDTLS_VERSION_C - -/** - * \def MBEDTLS_X509_USE_C - * - * Enable X.509 core for using certificates. - * - * Module: library/x509.c - * Caller: library/mbedtls_x509_crl.c - * library/mbedtls_x509_crt.c - * library/mbedtls_x509_csr.c - * - * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, - * MBEDTLS_PK_PARSE_C - * - * This module is required for the X.509 parsing modules. - */ -#define MBEDTLS_X509_USE_C - -/** - * \def MBEDTLS_X509_CRT_PARSE_C - * - * Enable X.509 certificate parsing. - * - * Module: library/mbedtls_x509_crt.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * library/ssl_tls.c - * - * Requires: MBEDTLS_X509_USE_C - * - * This module is required for X.509 certificate parsing. - */ -#define MBEDTLS_X509_CRT_PARSE_C - -/** - * \def MBEDTLS_X509_CRL_PARSE_C - * - * Enable X.509 CRL parsing. - * - * Module: library/mbedtls_x509_crl.c - * Caller: library/mbedtls_x509_crt.c - * - * Requires: MBEDTLS_X509_USE_C - * - * This module is required for X.509 CRL parsing. - */ -#define MBEDTLS_X509_CRL_PARSE_C - -/** - * \def MBEDTLS_X509_CSR_PARSE_C - * - * Enable X.509 Certificate Signing Request (CSR) parsing. - * - * Module: library/mbedtls_x509_csr.c - * Caller: library/x509_crt_write.c - * - * Requires: MBEDTLS_X509_USE_C - * - * This module is used for reading X.509 certificate request. - */ -#define MBEDTLS_X509_CSR_PARSE_C - -/** - * \def MBEDTLS_X509_CREATE_C - * - * Enable X.509 core for creating certificates. - * - * Module: library/x509_create.c - * - * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C - * - * This module is the basis for creating X.509 certificates and CSRs. - */ -#define MBEDTLS_X509_CREATE_C - -/** - * \def MBEDTLS_X509_CRT_WRITE_C - * - * Enable creating X.509 certificates. - * - * Module: library/x509_crt_write.c - * - * Requires: MBEDTLS_X509_CREATE_C - * - * This module is required for X.509 certificate creation. - */ -#define MBEDTLS_X509_CRT_WRITE_C - -/** - * \def MBEDTLS_X509_CSR_WRITE_C - * - * Enable creating X.509 Certificate Signing Requests (CSR). - * - * Module: library/x509_csr_write.c - * - * Requires: MBEDTLS_X509_CREATE_C - * - * This module is required for X.509 certificate request writing. - */ -#define MBEDTLS_X509_CSR_WRITE_C - -/** - * \def MBEDTLS_XTEA_C - * - * Enable the XTEA block cipher. - * - * Module: library/xtea.c - * Caller: - */ -#define MBEDTLS_XTEA_C - -/* \} name SECTION: mbed TLS modules */ - -/** - * \name SECTION: Module configuration options - * - * This section allows for the setting of module specific sizes and - * configuration options. The default values are already present in the - * relevant header files and should suffice for the regular use cases. - * - * Our advice is to enable options and change their values here - * only if you have a good reason and know the consequences. - * - * Please check the respective header file for documentation on these - * parameters (to prevent duplicate documentation). - * \{ - */ - -/* MPI / BIGNUM options */ -//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ -//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */ - -/* CTR_DRBG options */ -//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ -//#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ -//#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ -//#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ -//#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ - -/* HMAC_DRBG options */ -//#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ -//#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ -//#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ -//#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ - -/* ECP options */ -//#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */ -//#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ -//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ - -/* Entropy options */ -//#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ -//#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ - -/* Memory buffer allocator options */ -//#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ - -/* Platform options */ -//#define MBEDTLS_PLATFORM_STD_MEM_HDR /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ -//#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */ -//#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ -//#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */ -//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ -//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ -/* Note: your snprintf must correclty zero-terminate the buffer! */ -//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */ - -/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */ -/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */ -//#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */ -//#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */ -//#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */ -//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ -//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ -/* Note: your snprintf must correclty zero-terminate the buffer! */ -//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */ - -/* SSL Cache options */ -//#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ -//#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ - -/* SSL options */ -//#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */ -//#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ -//#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */ -//#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ - -/** - * Complete list of ciphersuites to use, in order of preference. - * - * \warning No dependency checking is done on that field! This option can only - * be used to restrict the set of available ciphersuites. It is your - * responsibility to make sure the needed modules are active. - * - * Use this to save a few hundred bytes of ROM (default ordering of all - * available ciphersuites) and a few to a few hundred bytes of RAM. - * - * The value below is only an example, not the default. - */ -//#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - -/* X509 options */ -//#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */ - -/* \} name SECTION: Module configuration options */ - -#if defined(TARGET_LIKE_MBED) -#include "mbedtls/target_config.h" -#endif - -/* - * Allow user to override any previous default. - * - * Use two macro names for that, as: - * - with yotta the prefix YOTTA_CFG_ is forced - * - without yotta is looks weird to have a YOTTA prefix. - */ -#if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE) -#include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE -#elif defined(MBEDTLS_USER_CONFIG_FILE) -#include MBEDTLS_USER_CONFIG_FILE -#endif - -#include "check_config.h" - -#endif /* MBEDTLS_CONFIG_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ctr_drbg.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ctr_drbg.h deleted file mode 100644 index 059d3c5c9a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ctr_drbg.h +++ /dev/null @@ -1,290 +0,0 @@ -/** - * \file ctr_drbg.h - * - * \brief CTR_DRBG based on AES-256 (NIST SP 800-90) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_CTR_DRBG_H -#define MBEDTLS_CTR_DRBG_H - -#include "aes.h" - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -#define MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */ -#define MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG -0x0036 /**< Too many random requested in single call. */ -#define MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG -0x0038 /**< Input too large (Entropy + additional). */ -#define MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR -0x003A /**< Read/write error in file. */ - -#define MBEDTLS_CTR_DRBG_BLOCKSIZE 16 /**< Block size used by the cipher */ -#define MBEDTLS_CTR_DRBG_KEYSIZE 32 /**< Key size used by the cipher */ -#define MBEDTLS_CTR_DRBG_KEYBITS ( MBEDTLS_CTR_DRBG_KEYSIZE * 8 ) -#define MBEDTLS_CTR_DRBG_SEEDLEN ( MBEDTLS_CTR_DRBG_KEYSIZE + MBEDTLS_CTR_DRBG_BLOCKSIZE ) - /**< The seed length (counter + AES key) */ - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) -#if defined(MBEDTLS_SHA512_C) && !defined(MBEDTLS_ENTROPY_FORCE_SHA256) -#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ -#else -#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 32 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ -#endif -#endif - -#if !defined(MBEDTLS_CTR_DRBG_RESEED_INTERVAL) -#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ -#endif - -#if !defined(MBEDTLS_CTR_DRBG_MAX_INPUT) -#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ -#endif - -#if !defined(MBEDTLS_CTR_DRBG_MAX_REQUEST) -#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ -#endif - -#if !defined(MBEDTLS_CTR_DRBG_MAX_SEED_INPUT) -#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ -#endif - -/* \} name SECTION: Module settings */ - -#define MBEDTLS_CTR_DRBG_PR_OFF 0 /**< No prediction resistance */ -#define MBEDTLS_CTR_DRBG_PR_ON 1 /**< Prediction resistance enabled */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief CTR_DRBG context structure - */ -typedef struct -{ - unsigned char counter[16]; /*!< counter (V) */ - int reseed_counter; /*!< reseed counter */ - int prediction_resistance; /*!< enable prediction resistance (Automatic - reseed before every random generation) */ - size_t entropy_len; /*!< amount of entropy grabbed on each - (re)seed */ - int reseed_interval; /*!< reseed interval */ - - mbedtls_aes_context aes_ctx; /*!< AES context */ - - /* - * Callbacks (Entropy) - */ - int (*f_entropy)(void *, unsigned char *, size_t); - - void *p_entropy; /*!< context for the entropy function */ - -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; -#endif -} -mbedtls_ctr_drbg_context; - -/** - * \brief CTR_DRBG context initialization - * Makes the context ready for mbedtls_ctr_drbg_seed() or - * mbedtls_ctr_drbg_free(). - * - * \param ctx CTR_DRBG context to be initialized - */ -void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx ); - -/** - * \brief CTR_DRBG initial seeding - * Seed and setup entropy source for future reseeds. - * - * Note: Personalization data can be provided in addition to the more generic - * entropy source to make this instantiation as unique as possible. - * - * \param ctx CTR_DRBG context to be seeded - * \param f_entropy Entropy callback (p_entropy, buffer to fill, buffer - * length) - * \param p_entropy Entropy context - * \param custom Personalization data (Device specific identifiers) - * (Can be NULL) - * \param len Length of personalization data - * - * \return 0 if successful, or - * MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED - */ -int mbedtls_ctr_drbg_seed( mbedtls_ctr_drbg_context *ctx, - int (*f_entropy)(void *, unsigned char *, size_t), - void *p_entropy, - const unsigned char *custom, - size_t len ); - -/** - * \brief Clear CTR_CRBG context data - * - * \param ctx CTR_DRBG context to clear - */ -void mbedtls_ctr_drbg_free( mbedtls_ctr_drbg_context *ctx ); - -/** - * \brief Enable / disable prediction resistance (Default: Off) - * - * Note: If enabled, entropy is used for ctx->entropy_len before each call! - * Only use this if you have ample supply of good entropy! - * - * \param ctx CTR_DRBG context - * \param resistance MBEDTLS_CTR_DRBG_PR_ON or MBEDTLS_CTR_DRBG_PR_OFF - */ -void mbedtls_ctr_drbg_set_prediction_resistance( mbedtls_ctr_drbg_context *ctx, - int resistance ); - -/** - * \brief Set the amount of entropy grabbed on each (re)seed - * (Default: MBEDTLS_CTR_DRBG_ENTROPY_LEN) - * - * \param ctx CTR_DRBG context - * \param len Amount of entropy to grab - */ -void mbedtls_ctr_drbg_set_entropy_len( mbedtls_ctr_drbg_context *ctx, - size_t len ); - -/** - * \brief Set the reseed interval - * (Default: MBEDTLS_CTR_DRBG_RESEED_INTERVAL) - * - * \param ctx CTR_DRBG context - * \param interval Reseed interval - */ -void mbedtls_ctr_drbg_set_reseed_interval( mbedtls_ctr_drbg_context *ctx, - int interval ); - -/** - * \brief CTR_DRBG reseeding (extracts data from entropy source) - * - * \param ctx CTR_DRBG context - * \param additional Additional data to add to state (Can be NULL) - * \param len Length of additional data - * - * \return 0 if successful, or - * MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED - */ -int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx, - const unsigned char *additional, size_t len ); - -/** - * \brief CTR_DRBG update state - * - * \param ctx CTR_DRBG context - * \param additional Additional data to update state with - * \param add_len Length of additional data - * - * \note If add_len is greater than MBEDTLS_CTR_DRBG_MAX_SEED_INPUT, - * only the first MBEDTLS_CTR_DRBG_MAX_SEED_INPUT bytes are used, - * the remaining ones are silently discarded. - */ -void mbedtls_ctr_drbg_update( mbedtls_ctr_drbg_context *ctx, - const unsigned char *additional, size_t add_len ); - -/** - * \brief CTR_DRBG generate random with additional update input - * - * Note: Automatically reseeds if reseed_counter is reached. - * - * \param p_rng CTR_DRBG context - * \param output Buffer to fill - * \param output_len Length of the buffer - * \param additional Additional data to update with (Can be NULL) - * \param add_len Length of additional data - * - * \return 0 if successful, or - * MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED, or - * MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG - */ -int mbedtls_ctr_drbg_random_with_add( void *p_rng, - unsigned char *output, size_t output_len, - const unsigned char *additional, size_t add_len ); - -/** - * \brief CTR_DRBG generate random - * - * Note: Automatically reseeds if reseed_counter is reached. - * - * \param p_rng CTR_DRBG context - * \param output Buffer to fill - * \param output_len Length of the buffer - * - * \return 0 if successful, or - * MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED, or - * MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG - */ -int mbedtls_ctr_drbg_random( void *p_rng, - unsigned char *output, size_t output_len ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Write a seed file - * - * \param ctx CTR_DRBG context - * \param path Name of the file - * - * \return 0 if successful, - * MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR on file error, or - * MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED - */ -int mbedtls_ctr_drbg_write_seed_file( mbedtls_ctr_drbg_context *ctx, const char *path ); - -/** - * \brief Read and update a seed file. Seed is added to this - * instance - * - * \param ctx CTR_DRBG context - * \param path Name of the file - * - * \return 0 if successful, - * MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR on file error, - * MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED or - * MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG - */ -int mbedtls_ctr_drbg_update_seed_file( mbedtls_ctr_drbg_context *ctx, const char *path ); -#endif /* MBEDTLS_FS_IO */ - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_ctr_drbg_self_test( int verbose ); - -/* Internal functions (do not call directly) */ -int mbedtls_ctr_drbg_seed_entropy_len( mbedtls_ctr_drbg_context *, - int (*)(void *, unsigned char *, size_t), void *, - const unsigned char *, size_t, size_t ); - -#ifdef __cplusplus -} -#endif - -#endif /* ctr_drbg.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/debug.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/debug.h deleted file mode 100644 index d859dd5f6d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/debug.h +++ /dev/null @@ -1,125 +0,0 @@ -/** - * \file debug.h - * - * \brief Debug functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_DEBUG_H -#define MBEDTLS_DEBUG_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "ssl.h" - -#if defined(MBEDTLS_ECP_C) -#include "ecp.h" -#endif - -#if defined(MBEDTLS_DEBUG_C) - -#define MBEDTLS_DEBUG_STRIP_PARENS( ... ) __VA_ARGS__ - -#define MBEDTLS_SSL_DEBUG_MSG( level, args ) \ - mbedtls_debug_print_msg( ssl, level, __FILE__, __LINE__, \ - MBEDTLS_DEBUG_STRIP_PARENS args ) - -#define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) \ - mbedtls_debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret ) - -#define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) \ - mbedtls_debug_print_buf( ssl, level, __FILE__, __LINE__, text, buf, len ) - -#if defined(MBEDTLS_BIGNUM_C) -#define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) \ - mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X ) -#endif - -#if defined(MBEDTLS_ECP_C) -#define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) \ - mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X ) -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -#define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) \ - mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt ) -#endif - -#else /* MBEDTLS_DEBUG_C */ - -#define MBEDTLS_SSL_DEBUG_MSG( level, args ) do { } while( 0 ) -#define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) do { } while( 0 ) -#define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) do { } while( 0 ) -#define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) do { } while( 0 ) -#define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 ) -#define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 ) - -#endif /* MBEDTLS_DEBUG_C */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Set the level threshold to handle globally. Messages that have a - * level over the threshold value are ignored. - * (Default value: 0 (No debug)) - * - * \param threshold maximum level of messages to pass on - */ -void mbedtls_debug_set_threshold( int threshold ); - -void mbedtls_debug_print_msg( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *format, ... ); - -void mbedtls_debug_print_ret( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, int ret ); - -void mbedtls_debug_print_buf( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, const char *text, - const unsigned char *buf, size_t len ); - -#if defined(MBEDTLS_BIGNUM_C) -void mbedtls_debug_print_mpi( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_mpi *X ); -#endif - -#if defined(MBEDTLS_ECP_C) -void mbedtls_debug_print_ecp( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_ecp_point *X ); -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -void mbedtls_debug_print_crt( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_x509_crt *crt ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* debug.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/des.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/des.h deleted file mode 100644 index 5ca2ecf2e0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/des.h +++ /dev/null @@ -1,306 +0,0 @@ -/** - * \file des.h - * - * \brief DES block cipher - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_DES_H -#define MBEDTLS_DES_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#define MBEDTLS_DES_ENCRYPT 1 -#define MBEDTLS_DES_DECRYPT 0 - -#define MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH -0x0032 /**< The data input has an invalid length. */ - -#define MBEDTLS_DES_KEY_SIZE 8 - -#if !defined(MBEDTLS_DES_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief DES context structure - */ -typedef struct -{ - uint32_t sk[32]; /*!< DES subkeys */ -} -mbedtls_des_context; - -/** - * \brief Triple-DES context structure - */ -typedef struct -{ - uint32_t sk[96]; /*!< 3DES subkeys */ -} -mbedtls_des3_context; - -/** - * \brief Initialize DES context - * - * \param ctx DES context to be initialized - */ -void mbedtls_des_init( mbedtls_des_context *ctx ); - -/** - * \brief Clear DES context - * - * \param ctx DES context to be cleared - */ -void mbedtls_des_free( mbedtls_des_context *ctx ); - -/** - * \brief Initialize Triple-DES context - * - * \param ctx DES3 context to be initialized - */ -void mbedtls_des3_init( mbedtls_des3_context *ctx ); - -/** - * \brief Clear Triple-DES context - * - * \param ctx DES3 context to be cleared - */ -void mbedtls_des3_free( mbedtls_des3_context *ctx ); - -/** - * \brief Set key parity on the given key to odd. - * - * DES keys are 56 bits long, but each byte is padded with - * a parity bit to allow verification. - * - * \param key 8-byte secret key - */ -void mbedtls_des_key_set_parity( unsigned char key[MBEDTLS_DES_KEY_SIZE] ); - -/** - * \brief Check that key parity on the given key is odd. - * - * DES keys are 56 bits long, but each byte is padded with - * a parity bit to allow verification. - * - * \param key 8-byte secret key - * - * \return 0 is parity was ok, 1 if parity was not correct. - */ -int mbedtls_des_key_check_key_parity( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); - -/** - * \brief Check that key is not a weak or semi-weak DES key - * - * \param key 8-byte secret key - * - * \return 0 if no weak key was found, 1 if a weak key was identified. - */ -int mbedtls_des_key_check_weak( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); - -/** - * \brief DES key schedule (56-bit, encryption) - * - * \param ctx DES context to be initialized - * \param key 8-byte secret key - * - * \return 0 - */ -int mbedtls_des_setkey_enc( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); - -/** - * \brief DES key schedule (56-bit, decryption) - * - * \param ctx DES context to be initialized - * \param key 8-byte secret key - * - * \return 0 - */ -int mbedtls_des_setkey_dec( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); - -/** - * \brief Triple-DES key schedule (112-bit, encryption) - * - * \param ctx 3DES context to be initialized - * \param key 16-byte secret key - * - * \return 0 - */ -int mbedtls_des3_set2key_enc( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ); - -/** - * \brief Triple-DES key schedule (112-bit, decryption) - * - * \param ctx 3DES context to be initialized - * \param key 16-byte secret key - * - * \return 0 - */ -int mbedtls_des3_set2key_dec( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ); - -/** - * \brief Triple-DES key schedule (168-bit, encryption) - * - * \param ctx 3DES context to be initialized - * \param key 24-byte secret key - * - * \return 0 - */ -int mbedtls_des3_set3key_enc( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ); - -/** - * \brief Triple-DES key schedule (168-bit, decryption) - * - * \param ctx 3DES context to be initialized - * \param key 24-byte secret key - * - * \return 0 - */ -int mbedtls_des3_set3key_dec( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ); - -/** - * \brief DES-ECB block encryption/decryption - * - * \param ctx DES context - * \param input 64-bit input block - * \param output 64-bit output block - * - * \return 0 if successful - */ -int mbedtls_des_crypt_ecb( mbedtls_des_context *ctx, - const unsigned char input[8], - unsigned char output[8] ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/** - * \brief DES-CBC buffer encryption/decryption - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx DES context - * \param mode MBEDTLS_DES_ENCRYPT or MBEDTLS_DES_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - */ -int mbedtls_des_crypt_cbc( mbedtls_des_context *ctx, - int mode, - size_t length, - unsigned char iv[8], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -/** - * \brief 3DES-ECB block encryption/decryption - * - * \param ctx 3DES context - * \param input 64-bit input block - * \param output 64-bit output block - * - * \return 0 if successful - */ -int mbedtls_des3_crypt_ecb( mbedtls_des3_context *ctx, - const unsigned char input[8], - unsigned char output[8] ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/** - * \brief 3DES-CBC buffer encryption/decryption - * - * \note Upon exit, the content of the IV is updated so that you can - * call the function same function again on the following - * block(s) of data and get the same result as if it was - * encrypted in one call. This allows a "streaming" usage. - * If on the other hand you need to retain the contents of the - * IV, you should either save it manually or use the cipher - * module instead. - * - * \param ctx 3DES context - * \param mode MBEDTLS_DES_ENCRYPT or MBEDTLS_DES_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if successful, or MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH - */ -int mbedtls_des3_crypt_cbc( mbedtls_des3_context *ctx, - int mode, - size_t length, - unsigned char iv[8], - const unsigned char *input, - unsigned char *output ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -/** - * \brief Internal function for key expansion. - * (Only exposed to allow overriding it, - * see MBEDTLS_DES_SETKEY_ALT) - * - * \param SK Round keys - * \param key Base key - */ -void mbedtls_des_setkey( uint32_t SK[32], - const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_DES_ALT */ -#include "des_alt.h" -#endif /* MBEDTLS_DES_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_des_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* des.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/dhm.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/dhm.h deleted file mode 100644 index cd056d1b4e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/dhm.h +++ /dev/null @@ -1,305 +0,0 @@ -/** - * \file dhm.h - * - * \brief Diffie-Hellman-Merkle key exchange - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_DHM_H -#define MBEDTLS_DHM_H - -#include "bignum.h" - -/* - * DHM Error codes - */ -#define MBEDTLS_ERR_DHM_BAD_INPUT_DATA -0x3080 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -0x3100 /**< Reading of the DHM parameters failed. */ -#define MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -0x3180 /**< Making of the DHM parameters failed. */ -#define MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -0x3200 /**< Reading of the public values failed. */ -#define MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Making of the public value failed. */ -#define MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -0x3300 /**< Calculation of the DHM secret failed. */ -#define MBEDTLS_ERR_DHM_INVALID_FORMAT -0x3380 /**< The ASN.1 data is not formatted correctly. */ -#define MBEDTLS_ERR_DHM_ALLOC_FAILED -0x3400 /**< Allocation of memory failed. */ -#define MBEDTLS_ERR_DHM_FILE_IO_ERROR -0x3480 /**< Read/write of file failed. */ - -/** - * RFC 3526 defines a number of standardized Diffie-Hellman groups - * for IKE. - * RFC 5114 defines a number of standardized Diffie-Hellman groups - * that can be used. - * - * Some are included here for convenience. - * - * Included are: - * RFC 3526 3. 2048-bit MODP Group - * RFC 3526 4. 3072-bit MODP Group - * RFC 3526 5. 4096-bit MODP Group - * RFC 5114 2.2. 2048-bit MODP Group with 224-bit Prime Order Subgroup - */ -#define MBEDTLS_DHM_RFC3526_MODP_2048_P \ - "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ - "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ - "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ - "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ - "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ - "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ - "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ - "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ - "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ - "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ - "15728E5A8AACAA68FFFFFFFFFFFFFFFF" - -#define MBEDTLS_DHM_RFC3526_MODP_2048_G "02" - -#define MBEDTLS_DHM_RFC3526_MODP_3072_P \ - "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ - "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ - "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ - "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ - "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ - "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ - "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ - "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ - "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ - "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ - "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \ - "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \ - "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \ - "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \ - "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \ - "43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF" - -#define MBEDTLS_DHM_RFC3526_MODP_3072_G "02" - -#define MBEDTLS_DHM_RFC3526_MODP_4096_P \ - "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1" \ - "29024E088A67CC74020BBEA63B139B22514A08798E3404DD" \ - "EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245" \ - "E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED" \ - "EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D" \ - "C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F" \ - "83655D23DCA3AD961C62F356208552BB9ED529077096966D" \ - "670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B" \ - "E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9" \ - "DE2BCBF6955817183995497CEA956AE515D2261898FA0510" \ - "15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64" \ - "ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7" \ - "ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B" \ - "F12FFA06D98A0864D87602733EC86A64521F2B18177B200C" \ - "BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31" \ - "43DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D7" \ - "88719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA" \ - "2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6" \ - "287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED" \ - "1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9" \ - "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199" \ - "FFFFFFFFFFFFFFFF" - -#define MBEDTLS_DHM_RFC3526_MODP_4096_G "02" - -#define MBEDTLS_DHM_RFC5114_MODP_2048_P \ - "AD107E1E9123A9D0D660FAA79559C51FA20D64E5683B9FD1" \ - "B54B1597B61D0A75E6FA141DF95A56DBAF9A3C407BA1DF15" \ - "EB3D688A309C180E1DE6B85A1274A0A66D3F8152AD6AC212" \ - "9037C9EDEFDA4DF8D91E8FEF55B7394B7AD5B7D0B6C12207" \ - "C9F98D11ED34DBF6C6BA0B2C8BBC27BE6A00E0A0B9C49708" \ - "B3BF8A317091883681286130BC8985DB1602E714415D9330" \ - "278273C7DE31EFDC7310F7121FD5A07415987D9ADC0A486D" \ - "CDF93ACC44328387315D75E198C641A480CD86A1B9E587E8" \ - "BE60E69CC928B2B9C52172E413042E9B23F10B0E16E79763" \ - "C9B53DCF4BA80A29E3FB73C16B8E75B97EF363E2FFA31F71" \ - "CF9DE5384E71B81C0AC4DFFE0C10E64F" - -#define MBEDTLS_DHM_RFC5114_MODP_2048_G \ - "AC4032EF4F2D9AE39DF30B5C8FFDAC506CDEBE7B89998CAF"\ - "74866A08CFE4FFE3A6824A4E10B9A6F0DD921F01A70C4AFA"\ - "AB739D7700C29F52C57DB17C620A8652BE5E9001A8D66AD7"\ - "C17669101999024AF4D027275AC1348BB8A762D0521BC98A"\ - "E247150422EA1ED409939D54DA7460CDB5F6C6B250717CBE"\ - "F180EB34118E98D119529A45D6F834566E3025E316A330EF"\ - "BB77A86F0C1AB15B051AE3D428C8F8ACB70A8137150B8EEB"\ - "10E183EDD19963DDD9E263E4770589EF6AA21E7F5F2FF381"\ - "B539CCE3409D13CD566AFBB48D6C019181E1BCFE94B30269"\ - "EDFE72FE9B6AA4BD7B5A0F1C71CFFF4C19C418E1F6EC0179"\ - "81BC087F2A7065B384B890D3191F2BFA" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief DHM context structure - */ -typedef struct -{ - size_t len; /*!< size(P) in chars */ - mbedtls_mpi P; /*!< prime modulus */ - mbedtls_mpi G; /*!< generator */ - mbedtls_mpi X; /*!< secret value */ - mbedtls_mpi GX; /*!< self = G^X mod P */ - mbedtls_mpi GY; /*!< peer = G^Y mod P */ - mbedtls_mpi K; /*!< key = GY^X mod P */ - mbedtls_mpi RP; /*!< cached R^2 mod P */ - mbedtls_mpi Vi; /*!< blinding value */ - mbedtls_mpi Vf; /*!< un-blinding value */ - mbedtls_mpi pX; /*!< previous X */ -} -mbedtls_dhm_context; - -/** - * \brief Initialize DHM context - * - * \param ctx DHM context to be initialized - */ -void mbedtls_dhm_init( mbedtls_dhm_context *ctx ); - -/** - * \brief Parse the ServerKeyExchange parameters - * - * \param ctx DHM context - * \param p &(start of input buffer) - * \param end end of buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_DHM_XXX error code - */ -int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx, - unsigned char **p, - const unsigned char *end ); - -/** - * \brief Setup and write the ServerKeyExchange parameters - * - * \param ctx DHM context - * \param x_size private value size in bytes - * \param output destination buffer - * \param olen number of chars written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \note This function assumes that ctx->P and ctx->G - * have already been properly set (for example - * using mbedtls_mpi_read_string or mbedtls_mpi_read_binary). - * - * \return 0 if successful, or an MBEDTLS_ERR_DHM_XXX error code - */ -int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size, - unsigned char *output, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Import the peer's public value G^Y - * - * \param ctx DHM context - * \param input input buffer - * \param ilen size of buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_DHM_XXX error code - */ -int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx, - const unsigned char *input, size_t ilen ); - -/** - * \brief Create own private value X and export G^X - * - * \param ctx DHM context - * \param x_size private value size in bytes - * \param output destination buffer - * \param olen must be equal to ctx->P.len - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, or an MBEDTLS_ERR_DHM_XXX error code - */ -int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size, - unsigned char *output, size_t olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Derive and export the shared secret (G^Y)^X mod P - * - * \param ctx DHM context - * \param output destination buffer - * \param output_size size of the destination buffer - * \param olen on exit, holds the actual number of bytes written - * \param f_rng RNG function, for blinding purposes - * \param p_rng RNG parameter - * - * \return 0 if successful, or an MBEDTLS_ERR_DHM_XXX error code - * - * \note If non-NULL, f_rng is used to blind the input as - * countermeasure against timing attacks. Blinding is - * automatically used if and only if our secret value X is - * re-used and costs nothing otherwise, so it is recommended - * to always pass a non-NULL f_rng argument. - */ -int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx, - unsigned char *output, size_t output_size, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Free and clear the components of a DHM key - * - * \param ctx DHM context to free and clear - */ -void mbedtls_dhm_free( mbedtls_dhm_context *ctx ); - -#if defined(MBEDTLS_ASN1_PARSE_C) -/** \ingroup x509_module */ -/** - * \brief Parse DHM parameters in PEM or DER format - * - * \param dhm DHM context to be initialized - * \param dhmin input buffer - * \param dhminlen size of the buffer - * (including the terminating null byte for PEM data) - * - * \return 0 if successful, or a specific DHM or PEM error code - */ -int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin, - size_t dhminlen ); - -#if defined(MBEDTLS_FS_IO) -/** \ingroup x509_module */ -/** - * \brief Load and parse DHM parameters - * - * \param dhm DHM context to be initialized - * \param path filename to read the DHM Parameters from - * - * \return 0 if successful, or a specific DHM or PEM error code - */ -int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path ); -#endif /* MBEDTLS_FS_IO */ -#endif /* MBEDTLS_ASN1_PARSE_C */ - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_dhm_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* dhm.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdh.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdh.h deleted file mode 100644 index 625a281923..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdh.h +++ /dev/null @@ -1,214 +0,0 @@ -/** - * \file ecdh.h - * - * \brief Elliptic curve Diffie-Hellman - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ECDH_H -#define MBEDTLS_ECDH_H - -#include "ecp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * When importing from an EC key, select if it is our key or the peer's key - */ -typedef enum -{ - MBEDTLS_ECDH_OURS, - MBEDTLS_ECDH_THEIRS, -} mbedtls_ecdh_side; - -/** - * \brief ECDH context structure - */ -typedef struct -{ - mbedtls_ecp_group grp; /*!< elliptic curve used */ - mbedtls_mpi d; /*!< our secret value (private key) */ - mbedtls_ecp_point Q; /*!< our public value (public key) */ - mbedtls_ecp_point Qp; /*!< peer's public value (public key) */ - mbedtls_mpi z; /*!< shared secret */ - int point_format; /*!< format for point export in TLS messages */ - mbedtls_ecp_point Vi; /*!< blinding value (for later) */ - mbedtls_ecp_point Vf; /*!< un-blinding value (for later) */ - mbedtls_mpi _d; /*!< previous d (for later) */ -} -mbedtls_ecdh_context; - -/** - * \brief Generate a public key. - * Raw function that only does the core computation. - * - * \param grp ECP group - * \param d Destination MPI (secret exponent, aka private key) - * \param Q Destination point (public key) - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - */ -int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Compute shared secret - * Raw function that only does the core computation. - * - * \param grp ECP group - * \param z Destination MPI (shared secret) - * \param Q Public key from other party - * \param d Our secret exponent (private key) - * \param f_rng RNG function (see notes) - * \param p_rng RNG parameter - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - * - * \note If f_rng is not NULL, it is used to implement - * countermeasures against potential elaborate timing - * attacks, see \c mbedtls_ecp_mul() for details. - */ -int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, - const mbedtls_ecp_point *Q, const mbedtls_mpi *d, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Initialize context - * - * \param ctx Context to initialize - */ -void mbedtls_ecdh_init( mbedtls_ecdh_context *ctx ); - -/** - * \brief Free context - * - * \param ctx Context to free - */ -void mbedtls_ecdh_free( mbedtls_ecdh_context *ctx ); - -/** - * \brief Generate a public key and a TLS ServerKeyExchange payload. - * (First function used by a TLS server for ECDHE.) - * - * \param ctx ECDH context - * \param olen number of chars written - * \param buf destination buffer - * \param blen length of buffer - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \note This function assumes that ctx->grp has already been - * properly set (for example using mbedtls_ecp_group_load). - * - * \return 0 if successful, or an MBEDTLS_ERR_ECP_XXX error code - */ -int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen, - unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Parse and procress a TLS ServerKeyExhange payload. - * (First function used by a TLS client for ECDHE.) - * - * \param ctx ECDH context - * \param buf pointer to start of input buffer - * \param end one past end of buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_ECP_XXX error code - */ -int mbedtls_ecdh_read_params( mbedtls_ecdh_context *ctx, - const unsigned char **buf, const unsigned char *end ); - -/** - * \brief Setup an ECDH context from an EC key. - * (Used by clients and servers in place of the - * ServerKeyEchange for static ECDH: import ECDH parameters - * from a certificate's EC key information.) - * - * \param ctx ECDH constext to set - * \param key EC key to use - * \param side Is it our key (1) or the peer's key (0) ? - * - * \return 0 if successful, or an MBEDTLS_ERR_ECP_XXX error code - */ -int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx, const mbedtls_ecp_keypair *key, - mbedtls_ecdh_side side ); - -/** - * \brief Generate a public key and a TLS ClientKeyExchange payload. - * (Second function used by a TLS client for ECDH(E).) - * - * \param ctx ECDH context - * \param olen number of bytes actually written - * \param buf destination buffer - * \param blen size of destination buffer - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, or an MBEDTLS_ERR_ECP_XXX error code - */ -int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen, - unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Parse and process a TLS ClientKeyExchange payload. - * (Second function used by a TLS server for ECDH(E).) - * - * \param ctx ECDH context - * \param buf start of input buffer - * \param blen length of input buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_ECP_XXX error code - */ -int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx, - const unsigned char *buf, size_t blen ); - -/** - * \brief Derive and export the shared secret. - * (Last function used by both TLS client en servers.) - * - * \param ctx ECDH context - * \param olen number of bytes written - * \param buf destination buffer - * \param blen buffer length - * \param f_rng RNG function, see notes for \c mbedtls_ecdh_compute_shared() - * \param p_rng RNG parameter - * - * \return 0 if successful, or an MBEDTLS_ERR_ECP_XXX error code - */ -int mbedtls_ecdh_calc_secret( mbedtls_ecdh_context *ctx, size_t *olen, - unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -#ifdef __cplusplus -} -#endif - -#endif /* ecdh.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdsa.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdsa.h deleted file mode 100644 index 52827d8d1a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecdsa.h +++ /dev/null @@ -1,248 +0,0 @@ -/** - * \file ecdsa.h - * - * \brief Elliptic curve DSA - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ECDSA_H -#define MBEDTLS_ECDSA_H - -#include "ecp.h" -#include "md.h" - -/* - * RFC 4492 page 20: - * - * Ecdsa-Sig-Value ::= SEQUENCE { - * r INTEGER, - * s INTEGER - * } - * - * Size is at most - * 1 (tag) + 1 (len) + 1 (initial 0) + ECP_MAX_BYTES for each of r and s, - * twice that + 1 (tag) + 2 (len) for the sequence - * (assuming ECP_MAX_BYTES is less than 126 for r and s, - * and less than 124 (total len <= 255) for the sequence) - */ -#if MBEDTLS_ECP_MAX_BYTES > 124 -#error "MBEDTLS_ECP_MAX_BYTES bigger than expected, please fix MBEDTLS_ECDSA_MAX_LEN" -#endif -/** Maximum size of an ECDSA signature in bytes */ -#define MBEDTLS_ECDSA_MAX_LEN ( 3 + 2 * ( 3 + MBEDTLS_ECP_MAX_BYTES ) ) - -/** - * \brief ECDSA context structure - */ -typedef mbedtls_ecp_keypair mbedtls_ecdsa_context; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Compute ECDSA signature of a previously hashed message - * - * \note The deterministic version is usually prefered. - * - * \param grp ECP group - * \param r First output integer - * \param s Second output integer - * \param d Private signing key - * \param buf Message hash - * \param blen Length of buf - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - */ -int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, - const mbedtls_mpi *d, const unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) -/** - * \brief Compute ECDSA signature of a previously hashed message, - * deterministic version (RFC 6979). - * - * \param grp ECP group - * \param r First output integer - * \param s Second output integer - * \param d Private signing key - * \param buf Message hash - * \param blen Length of buf - * \param md_alg MD algorithm used to hash the message - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - */ -int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, - const mbedtls_mpi *d, const unsigned char *buf, size_t blen, - mbedtls_md_type_t md_alg ); -#endif /* MBEDTLS_ECDSA_DETERMINISTIC */ - -/** - * \brief Verify ECDSA signature of a previously hashed message - * - * \param grp ECP group - * \param buf Message hash - * \param blen Length of buf - * \param Q Public key to use for verification - * \param r First integer of the signature - * \param s Second integer of the signature - * - * \return 0 if successful, - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if signature is invalid - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - */ -int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp, - const unsigned char *buf, size_t blen, - const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s); - -/** - * \brief Compute ECDSA signature and write it to buffer, - * serialized as defined in RFC 4492 page 20. - * (Not thread-safe to use same context in multiple threads) - * - * \note The deterministice version (RFC 6979) is used if - * MBEDTLS_ECDSA_DETERMINISTIC is defined. - * - * \param ctx ECDSA context - * \param md_alg Algorithm that was used to hash the message - * \param hash Message hash - * \param hlen Length of hash - * \param sig Buffer that will hold the signature - * \param slen Length of the signature written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \note The "sig" buffer must be at least as large as twice the - * size of the curve used, plus 9 (eg. 73 bytes if a 256-bit - * curve is used). MBEDTLS_ECDSA_MAX_LEN is always safe. - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX, MBEDTLS_ERR_MPI_XXX or - * MBEDTLS_ERR_ASN1_XXX error code - */ -int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hlen, - unsigned char *sig, size_t *slen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) -#if defined(MBEDTLS_DEPRECATED_WARNING) -#define MBEDTLS_DEPRECATED __attribute__((deprecated)) -#else -#define MBEDTLS_DEPRECATED -#endif -/** - * \brief Compute ECDSA signature and write it to buffer, - * serialized as defined in RFC 4492 page 20. - * Deterministic version, RFC 6979. - * (Not thread-safe to use same context in multiple threads) - * - * \deprecated Superseded by mbedtls_ecdsa_write_signature() in 2.0.0 - * - * \param ctx ECDSA context - * \param hash Message hash - * \param hlen Length of hash - * \param sig Buffer that will hold the signature - * \param slen Length of the signature written - * \param md_alg MD algorithm used to hash the message - * - * \note The "sig" buffer must be at least as large as twice the - * size of the curve used, plus 9 (eg. 73 bytes if a 256-bit - * curve is used). MBEDTLS_ECDSA_MAX_LEN is always safe. - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX, MBEDTLS_ERR_MPI_XXX or - * MBEDTLS_ERR_ASN1_XXX error code - */ -int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx, - const unsigned char *hash, size_t hlen, - unsigned char *sig, size_t *slen, - mbedtls_md_type_t md_alg ) MBEDTLS_DEPRECATED; -#undef MBEDTLS_DEPRECATED -#endif /* MBEDTLS_DEPRECATED_REMOVED */ -#endif /* MBEDTLS_ECDSA_DETERMINISTIC */ - -/** - * \brief Read and verify an ECDSA signature - * - * \param ctx ECDSA context - * \param hash Message hash - * \param hlen Size of hash - * \param sig Signature to read and verify - * \param slen Size of sig - * - * \return 0 if successful, - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if signature is invalid, - * MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH if the signature is - * valid but its actual length is less than siglen, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_ERR_MPI_XXX error code - */ -int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx, - const unsigned char *hash, size_t hlen, - const unsigned char *sig, size_t slen ); - -/** - * \brief Generate an ECDSA keypair on the given curve - * - * \param ctx ECDSA context in which the keypair should be stored - * \param gid Group (elliptic curve) to use. One of the various - * MBEDTLS_ECP_DP_XXX macros depending on configuration. - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 on success, or a MBEDTLS_ERR_ECP_XXX code. - */ -int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -/** - * \brief Set an ECDSA context from an EC key pair - * - * \param ctx ECDSA context to set - * \param key EC key to use - * - * \return 0 on success, or a MBEDTLS_ERR_ECP_XXX code. - */ -int mbedtls_ecdsa_from_keypair( mbedtls_ecdsa_context *ctx, const mbedtls_ecp_keypair *key ); - -/** - * \brief Initialize context - * - * \param ctx Context to initialize - */ -void mbedtls_ecdsa_init( mbedtls_ecdsa_context *ctx ); - -/** - * \brief Free context - * - * \param ctx Context to free - */ -void mbedtls_ecdsa_free( mbedtls_ecdsa_context *ctx ); - -#ifdef __cplusplus -} -#endif - -#endif /* ecdsa.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecjpake.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecjpake.h deleted file mode 100644 index b7b61604d0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecjpake.h +++ /dev/null @@ -1,238 +0,0 @@ -/** - * \file ecjpake.h - * - * \brief Elliptic curve J-PAKE - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ECJPAKE_H -#define MBEDTLS_ECJPAKE_H - -/* - * J-PAKE is a password-authenticated key exchange that allows deriving a - * strong shared secret from a (potentially low entropy) pre-shared - * passphrase, with forward secrecy and mutual authentication. - * https://en.wikipedia.org/wiki/Password_Authenticated_Key_Exchange_by_Juggling - * - * This file implements the Elliptic Curve variant of J-PAKE, - * as defined in Chapter 7.4 of the Thread v1.0 Specification, - * available to members of the Thread Group http://threadgroup.org/ - * - * As the J-PAKE algorithm is inherently symmetric, so is our API. - * Each party needs to send its first round message, in any order, to the - * other party, then each sends its second round message, in any order. - * The payloads are serialized in a way suitable for use in TLS, but could - * also be use outside TLS. - */ - -#include "ecp.h" -#include "md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Roles in the EC J-PAKE exchange - */ -typedef enum { - MBEDTLS_ECJPAKE_CLIENT = 0, /**< Client */ - MBEDTLS_ECJPAKE_SERVER, /**< Server */ -} mbedtls_ecjpake_role; - -/** - * EC J-PAKE context structure. - * - * J-PAKE is a symmetric protocol, except for the identifiers used in - * Zero-Knowledge Proofs, and the serialization of the second message - * (KeyExchange) as defined by the Thread spec. - * - * In order to benefit from this symmetry, we choose a different naming - * convetion from the Thread v1.0 spec. Correspondance is indicated in the - * description as a pair C: client name, S: server name - */ -typedef struct -{ - const mbedtls_md_info_t *md_info; /**< Hash to use */ - mbedtls_ecp_group grp; /**< Elliptic curve */ - mbedtls_ecjpake_role role; /**< Are we client or server? */ - int point_format; /**< Format for point export */ - - mbedtls_ecp_point Xm1; /**< My public key 1 C: X1, S: X3 */ - mbedtls_ecp_point Xm2; /**< My public key 2 C: X2, S: X4 */ - mbedtls_ecp_point Xp1; /**< Peer public key 1 C: X3, S: X1 */ - mbedtls_ecp_point Xp2; /**< Peer public key 2 C: X4, S: X2 */ - mbedtls_ecp_point Xp; /**< Peer public key C: Xs, S: Xc */ - - mbedtls_mpi xm1; /**< My private key 1 C: x1, S: x3 */ - mbedtls_mpi xm2; /**< My private key 2 C: x2, S: x4 */ - - mbedtls_mpi s; /**< Pre-shared secret (passphrase) */ -} mbedtls_ecjpake_context; - -/** - * \brief Initialize a context - * (just makes it ready for setup() or free()). - * - * \param ctx context to initialize - */ -void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx ); - -/** - * \brief Set up a context for use - * - * \note Currently the only values for hash/curve allowed by the - * standard are MBEDTLS_MD_SHA256/MBEDTLS_ECP_DP_SECP256R1. - * - * \param ctx context to set up - * \param role Our role: client or server - * \param hash hash function to use (MBEDTLS_MD_XXX) - * \param curve elliptic curve identifier (MBEDTLS_ECP_DP_XXX) - * \param secret pre-shared secret (passphrase) - * \param len length of the shared secret - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx, - mbedtls_ecjpake_role role, - mbedtls_md_type_t hash, - mbedtls_ecp_group_id curve, - const unsigned char *secret, - size_t len ); - -/* - * \brief Check if a context is ready for use - * - * \param ctx Context to check - * - * \return 0 if the context is ready for use, - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA otherwise - */ -int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx ); - -/** - * \brief Generate and write the first round message - * (TLS: contents of the Client/ServerHello extension, - * excluding extension type and length bytes) - * - * \param ctx Context to use - * \param buf Buffer to write the contents to - * \param len Buffer size - * \param olen Will be updated with the number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Read and process the first round message - * (TLS: contents of the Client/ServerHello extension, - * excluding extension type and length bytes) - * - * \param ctx Context to use - * \param buf Pointer to extension contents - * \param len Extension length - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ); - -/** - * \brief Generate and write the second round message - * (TLS: contents of the Client/ServerKeyExchange) - * - * \param ctx Context to use - * \param buf Buffer to write the contents to - * \param len Buffer size - * \param olen Will be updated with the number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Read and process the second round message - * (TLS: contents of the Client/ServerKeyExchange) - * - * \param ctx Context to use - * \param buf Pointer to the message - * \param len Message length - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ); - -/** - * \brief Derive the shared secret - * (TLS: Pre-Master Secret) - * - * \param ctx Context to use - * \param buf Buffer to write the contents to - * \param len Buffer size - * \param olen Will be updated with the number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Free a context's content - * - * \param ctx context to free - */ -void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx ); - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_ecjpake_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ecjpake.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecp.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecp.h deleted file mode 100644 index 5246c789d3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ecp.h +++ /dev/null @@ -1,669 +0,0 @@ -/** - * \file ecp.h - * - * \brief Elliptic curves over GF(p) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ECP_H -#define MBEDTLS_ECP_H - -#include "bignum.h" - -/* - * ECP error codes - */ -#define MBEDTLS_ERR_ECP_BAD_INPUT_DATA -0x4F80 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL -0x4F00 /**< The buffer is too small to write to. */ -#define MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE -0x4E80 /**< Requested curve not available. */ -#define MBEDTLS_ERR_ECP_VERIFY_FAILED -0x4E00 /**< The signature is not valid. */ -#define MBEDTLS_ERR_ECP_ALLOC_FAILED -0x4D80 /**< Memory allocation failed. */ -#define MBEDTLS_ERR_ECP_RANDOM_FAILED -0x4D00 /**< Generation of random value, such as (ephemeral) key, failed. */ -#define MBEDTLS_ERR_ECP_INVALID_KEY -0x4C80 /**< Invalid private or public key. */ -#define MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -0x4C00 /**< Signature is valid but shorter than the user-supplied length. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Domain parameters (curve, subgroup and generator) identifiers. - * - * Only curves over prime fields are supported. - * - * \warning This library does not support validation of arbitrary domain - * parameters. Therefore, only well-known domain parameters from trusted - * sources should be used. See mbedtls_ecp_group_load(). - */ -typedef enum -{ - MBEDTLS_ECP_DP_NONE = 0, - MBEDTLS_ECP_DP_SECP192R1, /*!< 192-bits NIST curve */ - MBEDTLS_ECP_DP_SECP224R1, /*!< 224-bits NIST curve */ - MBEDTLS_ECP_DP_SECP256R1, /*!< 256-bits NIST curve */ - MBEDTLS_ECP_DP_SECP384R1, /*!< 384-bits NIST curve */ - MBEDTLS_ECP_DP_SECP521R1, /*!< 521-bits NIST curve */ - MBEDTLS_ECP_DP_BP256R1, /*!< 256-bits Brainpool curve */ - MBEDTLS_ECP_DP_BP384R1, /*!< 384-bits Brainpool curve */ - MBEDTLS_ECP_DP_BP512R1, /*!< 512-bits Brainpool curve */ - MBEDTLS_ECP_DP_CURVE25519, /*!< Curve25519 */ - MBEDTLS_ECP_DP_SECP192K1, /*!< 192-bits "Koblitz" curve */ - MBEDTLS_ECP_DP_SECP224K1, /*!< 224-bits "Koblitz" curve */ - MBEDTLS_ECP_DP_SECP256K1, /*!< 256-bits "Koblitz" curve */ -} mbedtls_ecp_group_id; - -/** - * Number of supported curves (plus one for NONE). - * - * (Montgomery curves excluded for now.) - */ -#define MBEDTLS_ECP_DP_MAX 12 - -/** - * Curve information for use by other modules - */ -typedef struct -{ - mbedtls_ecp_group_id grp_id; /*!< Internal identifier */ - uint16_t tls_id; /*!< TLS NamedCurve identifier */ - uint16_t bit_size; /*!< Curve size in bits */ - const char *name; /*!< Human-friendly name */ -} mbedtls_ecp_curve_info; - -/** - * \brief ECP point structure (jacobian coordinates) - * - * \note All functions expect and return points satisfying - * the following condition: Z == 0 or Z == 1. (Other - * values of Z are used by internal functions only.) - * The point is zero, or "at infinity", if Z == 0. - * Otherwise, X and Y are its standard (affine) coordinates. - */ -typedef struct -{ - mbedtls_mpi X; /*!< the point's X coordinate */ - mbedtls_mpi Y; /*!< the point's Y coordinate */ - mbedtls_mpi Z; /*!< the point's Z coordinate */ -} -mbedtls_ecp_point; - -/** - * \brief ECP group structure - * - * We consider two types of curves equations: - * 1. Short Weierstrass y^2 = x^3 + A x + B mod P (SEC1 + RFC 4492) - * 2. Montgomery, y^2 = x^3 + A x^2 + x mod P (Curve25519 + draft) - * In both cases, a generator G for a prime-order subgroup is fixed. In the - * short weierstrass, this subgroup is actually the whole curve, and its - * cardinal is denoted by N. - * - * In the case of Short Weierstrass curves, our code requires that N is an odd - * prime. (Use odd in mbedtls_ecp_mul() and prime in mbedtls_ecdsa_sign() for blinding.) - * - * In the case of Montgomery curves, we don't store A but (A + 2) / 4 which is - * the quantity actually used in the formulas. Also, nbits is not the size of N - * but the required size for private keys. - * - * If modp is NULL, reduction modulo P is done using a generic algorithm. - * Otherwise, it must point to a function that takes an mbedtls_mpi in the range - * 0..2^(2*pbits)-1 and transforms it in-place in an integer of little more - * than pbits, so that the integer may be efficiently brought in the 0..P-1 - * range by a few additions or substractions. It must return 0 on success and - * non-zero on failure. - */ -typedef struct -{ - mbedtls_ecp_group_id id; /*!< internal group identifier */ - mbedtls_mpi P; /*!< prime modulus of the base field */ - mbedtls_mpi A; /*!< 1. A in the equation, or 2. (A + 2) / 4 */ - mbedtls_mpi B; /*!< 1. B in the equation, or 2. unused */ - mbedtls_ecp_point G; /*!< generator of the (sub)group used */ - mbedtls_mpi N; /*!< 1. the order of G, or 2. unused */ - size_t pbits; /*!< number of bits in P */ - size_t nbits; /*!< number of bits in 1. P, or 2. private keys */ - unsigned int h; /*!< internal: 1 if the constants are static */ - int (*modp)(mbedtls_mpi *); /*!< function for fast reduction mod P */ - int (*t_pre)(mbedtls_ecp_point *, void *); /*!< unused */ - int (*t_post)(mbedtls_ecp_point *, void *); /*!< unused */ - void *t_data; /*!< unused */ - mbedtls_ecp_point *T; /*!< pre-computed points for ecp_mul_comb() */ - size_t T_size; /*!< number for pre-computed points */ -} -mbedtls_ecp_group; - -/** - * \brief ECP key pair structure - * - * A generic key pair that could be used for ECDSA, fixed ECDH, etc. - * - * \note Members purposefully in the same order as struc mbedtls_ecdsa_context. - */ -typedef struct -{ - mbedtls_ecp_group grp; /*!< Elliptic curve and base point */ - mbedtls_mpi d; /*!< our secret value */ - mbedtls_ecp_point Q; /*!< our public value */ -} -mbedtls_ecp_keypair; - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_ECP_MAX_BITS) -/** - * Maximum size of the groups (that is, of N and P) - */ -#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */ -#endif - -#define MBEDTLS_ECP_MAX_BYTES ( ( MBEDTLS_ECP_MAX_BITS + 7 ) / 8 ) -#define MBEDTLS_ECP_MAX_PT_LEN ( 2 * MBEDTLS_ECP_MAX_BYTES + 1 ) - -#if !defined(MBEDTLS_ECP_WINDOW_SIZE) -/* - * Maximum "window" size used for point multiplication. - * Default: 6. - * Minimum value: 2. Maximum value: 7. - * - * Result is an array of at most ( 1 << ( MBEDTLS_ECP_WINDOW_SIZE - 1 ) ) - * points used for point multiplication. This value is directly tied to EC - * peak memory usage, so decreasing it by one should roughly cut memory usage - * by two (if large curves are in use). - * - * Reduction in size may reduce speed, but larger curves are impacted first. - * Sample performances (in ECDHE handshakes/s, with FIXED_POINT_OPTIM = 1): - * w-size: 6 5 4 3 2 - * 521 145 141 135 120 97 - * 384 214 209 198 177 146 - * 256 320 320 303 262 226 - - * 224 475 475 453 398 342 - * 192 640 640 633 587 476 - */ -#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ -#endif /* MBEDTLS_ECP_WINDOW_SIZE */ - -#if !defined(MBEDTLS_ECP_FIXED_POINT_OPTIM) -/* - * Trade memory for speed on fixed-point multiplication. - * - * This speeds up repeated multiplication of the generator (that is, the - * multiplication in ECDSA signatures, and half of the multiplications in - * ECDSA verification and ECDHE) by a factor roughly 3 to 4. - * - * The cost is increasing EC peak memory usage by a factor roughly 2. - * - * Change this value to 0 to reduce peak memory usage. - */ -#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ -#endif /* MBEDTLS_ECP_FIXED_POINT_OPTIM */ - -/* \} name SECTION: Module settings */ - -/* - * Point formats, from RFC 4492's enum ECPointFormat - */ -#define MBEDTLS_ECP_PF_UNCOMPRESSED 0 /**< Uncompressed point format */ -#define MBEDTLS_ECP_PF_COMPRESSED 1 /**< Compressed point format */ - -/* - * Some other constants from RFC 4492 - */ -#define MBEDTLS_ECP_TLS_NAMED_CURVE 3 /**< ECCurveType's named_curve */ - -/** - * \brief Get the list of supported curves in order of preferrence - * (full information) - * - * \return A statically allocated array, the last entry is 0. - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_list( void ); - -/** - * \brief Get the list of supported curves in order of preferrence - * (grp_id only) - * - * \return A statically allocated array, - * terminated with MBEDTLS_ECP_DP_NONE. - */ -const mbedtls_ecp_group_id *mbedtls_ecp_grp_id_list( void ); - -/** - * \brief Get curve information from an internal group identifier - * - * \param grp_id A MBEDTLS_ECP_DP_XXX value - * - * \return The associated curve information or NULL - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_grp_id( mbedtls_ecp_group_id grp_id ); - -/** - * \brief Get curve information from a TLS NamedCurve value - * - * \param tls_id A MBEDTLS_ECP_DP_XXX value - * - * \return The associated curve information or NULL - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_tls_id( uint16_t tls_id ); - -/** - * \brief Get curve information from a human-readable name - * - * \param name The name - * - * \return The associated curve information or NULL - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_name( const char *name ); - -/** - * \brief Initialize a point (as zero) - */ -void mbedtls_ecp_point_init( mbedtls_ecp_point *pt ); - -/** - * \brief Initialize a group (to something meaningless) - */ -void mbedtls_ecp_group_init( mbedtls_ecp_group *grp ); - -/** - * \brief Initialize a key pair (as an invalid one) - */ -void mbedtls_ecp_keypair_init( mbedtls_ecp_keypair *key ); - -/** - * \brief Free the components of a point - */ -void mbedtls_ecp_point_free( mbedtls_ecp_point *pt ); - -/** - * \brief Free the components of an ECP group - */ -void mbedtls_ecp_group_free( mbedtls_ecp_group *grp ); - -/** - * \brief Free the components of a key pair - */ -void mbedtls_ecp_keypair_free( mbedtls_ecp_keypair *key ); - -/** - * \brief Copy the contents of point Q into P - * - * \param P Destination point - * \param Q Source point - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q ); - -/** - * \brief Copy the contents of a group object - * - * \param dst Destination group - * \param src Source group - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_ecp_group_copy( mbedtls_ecp_group *dst, const mbedtls_ecp_group *src ); - -/** - * \brief Set a point to zero - * - * \param pt Destination point - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_ecp_set_zero( mbedtls_ecp_point *pt ); - -/** - * \brief Tell if a point is zero - * - * \param pt Point to test - * - * \return 1 if point is zero, 0 otherwise - */ -int mbedtls_ecp_is_zero( mbedtls_ecp_point *pt ); - -/** - * \brief Compare two points - * - * \note This assumes the points are normalized. Otherwise, - * they may compare as "not equal" even if they are. - * - * \param P First point to compare - * \param Q Second point to compare - * - * \return 0 if the points are equal, - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA otherwise - */ -int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P, - const mbedtls_ecp_point *Q ); - -/** - * \brief Import a non-zero point from two ASCII strings - * - * \param P Destination point - * \param radix Input numeric base - * \param x First affine coordinate as a null-terminated string - * \param y Second affine coordinate as a null-terminated string - * - * \return 0 if successful, or a MBEDTLS_ERR_MPI_XXX error code - */ -int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix, - const char *x, const char *y ); - -/** - * \brief Export a point into unsigned binary data - * - * \param grp Group to which the point should belong - * \param P Point to export - * \param format Point format, should be a MBEDTLS_ECP_PF_XXX macro - * \param olen Length of the actual output - * \param buf Output buffer - * \param buflen Length of the output buffer - * - * \return 0 if successful, - * or MBEDTLS_ERR_ECP_BAD_INPUT_DATA - * or MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - */ -int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *P, - int format, size_t *olen, - unsigned char *buf, size_t buflen ); - -/** - * \brief Import a point from unsigned binary data - * - * \param grp Group to which the point should belong - * \param P Point to import - * \param buf Input buffer - * \param ilen Actual length of input - * - * \return 0 if successful, - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if the point format - * is not implemented. - * - * \note This function does NOT check that the point actually - * belongs to the given group, see mbedtls_ecp_check_pubkey() for - * that. - */ -int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P, - const unsigned char *buf, size_t ilen ); - -/** - * \brief Import a point from a TLS ECPoint record - * - * \param grp ECP group used - * \param pt Destination point - * \param buf $(Start of input buffer) - * \param len Buffer length - * - * \note buf is updated to point right after the ECPoint on exit - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_XXX if initialization failed - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid - */ -int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt, - const unsigned char **buf, size_t len ); - -/** - * \brief Export a point as a TLS ECPoint record - * - * \param grp ECP group used - * \param pt Point to export - * \param format Export format - * \param olen length of data written - * \param buf Buffer to write to - * \param blen Buffer length - * - * \return 0 if successful, - * or MBEDTLS_ERR_ECP_BAD_INPUT_DATA - * or MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - */ -int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt, - int format, size_t *olen, - unsigned char *buf, size_t blen ); - -/** - * \brief Set a group using well-known domain parameters - * - * \param grp Destination group - * \param index Index in the list of well-known domain parameters - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_XXX if initialization failed - * MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE for unkownn groups - * - * \note Index should be a value of RFC 4492's enum NamedCurve, - * usually in the form of a MBEDTLS_ECP_DP_XXX macro. - */ -int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id index ); - -/** - * \brief Set a group from a TLS ECParameters record - * - * \param grp Destination group - * \param buf &(Start of input buffer) - * \param len Buffer length - * - * \note buf is updated to point right after ECParameters on exit - * - * \return 0 if successful, - * MBEDTLS_ERR_MPI_XXX if initialization failed - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA if input is invalid - */ -int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, const unsigned char **buf, size_t len ); - -/** - * \brief Write the TLS ECParameters record for a group - * - * \param grp ECP group used - * \param olen Number of bytes actually written - * \param buf Buffer to write to - * \param blen Buffer length - * - * \return 0 if successful, - * or MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - */ -int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp, size_t *olen, - unsigned char *buf, size_t blen ); - -/** - * \brief Multiplication by an integer: R = m * P - * (Not thread-safe to use same group in multiple threads) - * - * \note In order to prevent timing attacks, this function - * executes the exact same sequence of (base field) - * operations for any valid m. It avoids any if-branch or - * array index depending on the value of m. - * - * \note If f_rng is not NULL, it is used to randomize intermediate - * results in order to prevent potential timing attacks - * targeting these results. It is recommended to always - * provide a non-NULL f_rng (the overhead is negligible). - * - * \param grp ECP group - * \param R Destination point - * \param m Integer by which to multiply - * \param P Point to multiply - * \param f_rng RNG function (see notes) - * \param p_rng RNG parameter - * - * \return 0 if successful, - * MBEDTLS_ERR_ECP_INVALID_KEY if m is not a valid privkey - * or P is not a valid pubkey, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_mpi *m, const mbedtls_ecp_point *P, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -/** - * \brief Multiplication and addition of two points by integers: - * R = m * P + n * Q - * (Not thread-safe to use same group in multiple threads) - * - * \note In contrast to mbedtls_ecp_mul(), this function does not guarantee - * a constant execution flow and timing. - * - * \param grp ECP group - * \param R Destination point - * \param m Integer by which to multiply P - * \param P Point to multiply by m - * \param n Integer by which to multiply Q - * \param Q Point to be multiplied by n - * - * \return 0 if successful, - * MBEDTLS_ERR_ECP_INVALID_KEY if m or n is not a valid privkey - * or P or Q is not a valid pubkey, - * MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed - */ -int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_mpi *m, const mbedtls_ecp_point *P, - const mbedtls_mpi *n, const mbedtls_ecp_point *Q ); - -/** - * \brief Check that a point is a valid public key on this curve - * - * \param grp Curve/group the point should belong to - * \param pt Point to check - * - * \return 0 if point is a valid public key, - * MBEDTLS_ERR_ECP_INVALID_KEY otherwise. - * - * \note This function only checks the point is non-zero, has valid - * coordinates and lies on the curve, but not that it is - * indeed a multiple of G. This is additional check is more - * expensive, isn't required by standards, and shouldn't be - * necessary if the group used has a small cofactor. In - * particular, it is useless for the NIST groups which all - * have a cofactor of 1. - * - * \note Uses bare components rather than an mbedtls_ecp_keypair structure - * in order to ease use with other structures such as - * mbedtls_ecdh_context of mbedtls_ecdsa_context. - */ -int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt ); - -/** - * \brief Check that an mbedtls_mpi is a valid private key for this curve - * - * \param grp Group used - * \param d Integer to check - * - * \return 0 if point is a valid private key, - * MBEDTLS_ERR_ECP_INVALID_KEY otherwise. - * - * \note Uses bare components rather than an mbedtls_ecp_keypair structure - * in order to ease use with other structures such as - * mbedtls_ecdh_context of mbedtls_ecdsa_context. - */ -int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *d ); - -/** - * \brief Generate a keypair with configurable base point - * - * \param grp ECP group - * \param G Chosen base point - * \param d Destination MPI (secret part) - * \param Q Destination point (public part) - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - * - * \note Uses bare components rather than an mbedtls_ecp_keypair structure - * in order to ease use with other structures such as - * mbedtls_ecdh_context of mbedtls_ecdsa_context. - */ -int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp, - const mbedtls_ecp_point *G, - mbedtls_mpi *d, mbedtls_ecp_point *Q, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Generate a keypair - * - * \param grp ECP group - * \param d Destination MPI (secret part) - * \param Q Destination point (public part) - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - * - * \note Uses bare components rather than an mbedtls_ecp_keypair structure - * in order to ease use with other structures such as - * mbedtls_ecdh_context of mbedtls_ecdsa_context. - */ -int mbedtls_ecp_gen_keypair( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Generate a keypair - * - * \param grp_id ECP group identifier - * \param key Destination keypair - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX or MBEDTLS_MPI_XXX error code - */ -int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -/** - * \brief Check a public-private key pair - * - * \param pub Keypair structure holding a public key - * \param prv Keypair structure holding a private (plus public) key - * - * \return 0 if successful (keys are valid and match), or - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA, or - * a MBEDTLS_ERR_ECP_XXX or MBEDTLS_ERR_MPI_XXX code. - */ -int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv ); - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_ecp_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ecp.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy.h deleted file mode 100644 index 00de9a6e5e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy.h +++ /dev/null @@ -1,252 +0,0 @@ -/** - * \file entropy.h - * - * \brief Entropy accumulator implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ENTROPY_H -#define MBEDTLS_ENTROPY_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#if defined(MBEDTLS_SHA512_C) && !defined(MBEDTLS_ENTROPY_FORCE_SHA256) -#include "sha512.h" -#define MBEDTLS_ENTROPY_SHA512_ACCUMULATOR -#else -#if defined(MBEDTLS_SHA256_C) -#define MBEDTLS_ENTROPY_SHA256_ACCUMULATOR -#include "sha256.h" -#endif -#endif - -#if defined(MBEDTLS_THREADING_C) -#include "threading.h" -#endif - -#if defined(MBEDTLS_HAVEGE_C) -#include "havege.h" -#endif - -#define MBEDTLS_ERR_ENTROPY_SOURCE_FAILED -0x003C /**< Critical entropy source failure. */ -#define MBEDTLS_ERR_ENTROPY_MAX_SOURCES -0x003E /**< No more sources can be added. */ -#define MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED -0x0040 /**< No sources have been added to poll. */ -#define MBEDTLS_ERR_ENTROPY_NO_STRONG_SOURCE -0x003D /**< No strong sources have been added to poll. */ -#define MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR -0x003F /**< Read/write error in file. */ - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_ENTROPY_MAX_SOURCES) -#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ -#endif - -#if !defined(MBEDTLS_ENTROPY_MAX_GATHER) -#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ -#endif - -/* \} name SECTION: Module settings */ - -#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) -#define MBEDTLS_ENTROPY_BLOCK_SIZE 64 /**< Block size of entropy accumulator (SHA-512) */ -#else -#define MBEDTLS_ENTROPY_BLOCK_SIZE 32 /**< Block size of entropy accumulator (SHA-256) */ -#endif - -#define MBEDTLS_ENTROPY_MAX_SEED_SIZE 1024 /**< Maximum size of seed we read from seed file */ -#define MBEDTLS_ENTROPY_SOURCE_MANUAL MBEDTLS_ENTROPY_MAX_SOURCES - -#define MBEDTLS_ENTROPY_SOURCE_STRONG 1 /**< Entropy source is strong */ -#define MBEDTLS_ENTROPY_SOURCE_WEAK 0 /**< Entropy source is weak */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Entropy poll callback pointer - * - * \param data Callback-specific data pointer - * \param output Data to fill - * \param len Maximum size to provide - * \param olen The actual amount of bytes put into the buffer (Can be 0) - * - * \return 0 if no critical failures occurred, - * MBEDTLS_ERR_ENTROPY_SOURCE_FAILED otherwise - */ -typedef int (*mbedtls_entropy_f_source_ptr)(void *data, unsigned char *output, size_t len, - size_t *olen); - -/** - * \brief Entropy source state - */ -typedef struct -{ - mbedtls_entropy_f_source_ptr f_source; /**< The entropy source callback */ - void * p_source; /**< The callback data pointer */ - size_t size; /**< Amount received in bytes */ - size_t threshold; /**< Minimum bytes required before release */ - int strong; /**< Is the source strong? */ -} -mbedtls_entropy_source_state; - -/** - * \brief Entropy context structure - */ -typedef struct -{ -#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) - mbedtls_sha512_context accumulator; -#else - mbedtls_sha256_context accumulator; -#endif - int source_count; - mbedtls_entropy_source_state source[MBEDTLS_ENTROPY_MAX_SOURCES]; -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_state havege_data; -#endif -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; /*!< mutex */ -#endif -} -mbedtls_entropy_context; - -/** - * \brief Initialize the context - * - * \param ctx Entropy context to initialize - */ -void mbedtls_entropy_init( mbedtls_entropy_context *ctx ); - -/** - * \brief Free the data in the context - * - * \param ctx Entropy context to free - */ -void mbedtls_entropy_free( mbedtls_entropy_context *ctx ); - -/** - * \brief Adds an entropy source to poll - * (Thread-safe if MBEDTLS_THREADING_C is enabled) - * - * \param ctx Entropy context - * \param f_source Entropy function - * \param p_source Function data - * \param threshold Minimum required from source before entropy is released - * ( with mbedtls_entropy_func() ) (in bytes) - * \param strong MBEDTLS_ENTROPY_SOURCE_STRONG or - * MBEDTSL_ENTROPY_SOURCE_WEAK. - * At least one strong source needs to be added. - * Weaker sources (such as the cycle counter) can be used as - * a complement. - * - * \return 0 if successful or MBEDTLS_ERR_ENTROPY_MAX_SOURCES - */ -int mbedtls_entropy_add_source( mbedtls_entropy_context *ctx, - mbedtls_entropy_f_source_ptr f_source, void *p_source, - size_t threshold, int strong ); - -/** - * \brief Trigger an extra gather poll for the accumulator - * (Thread-safe if MBEDTLS_THREADING_C is enabled) - * - * \param ctx Entropy context - * - * \return 0 if successful, or MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - */ -int mbedtls_entropy_gather( mbedtls_entropy_context *ctx ); - -/** - * \brief Retrieve entropy from the accumulator - * (Maximum length: MBEDTLS_ENTROPY_BLOCK_SIZE) - * (Thread-safe if MBEDTLS_THREADING_C is enabled) - * - * \param data Entropy context - * \param output Buffer to fill - * \param len Number of bytes desired, must be at most MBEDTLS_ENTROPY_BLOCK_SIZE - * - * \return 0 if successful, or MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - */ -int mbedtls_entropy_func( void *data, unsigned char *output, size_t len ); - -/** - * \brief Add data to the accumulator manually - * (Thread-safe if MBEDTLS_THREADING_C is enabled) - * - * \param ctx Entropy context - * \param data Data to add - * \param len Length of data - * - * \return 0 if successful - */ -int mbedtls_entropy_update_manual( mbedtls_entropy_context *ctx, - const unsigned char *data, size_t len ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Write a seed file - * - * \param ctx Entropy context - * \param path Name of the file - * - * \return 0 if successful, - * MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR on file error, or - * MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - */ -int mbedtls_entropy_write_seed_file( mbedtls_entropy_context *ctx, const char *path ); - -/** - * \brief Read and update a seed file. Seed is added to this - * instance. No more than MBEDTLS_ENTROPY_MAX_SEED_SIZE bytes are - * read from the seed file. The rest is ignored. - * - * \param ctx Entropy context - * \param path Name of the file - * - * \return 0 if successful, - * MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR on file error, - * MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - */ -int mbedtls_entropy_update_seed_file( mbedtls_entropy_context *ctx, const char *path ); -#endif /* MBEDTLS_FS_IO */ - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_entropy_self_test( int verbose ); -#endif /* MBEDTLS_SELF_TEST */ - -#ifdef __cplusplus -} -#endif - -#endif /* entropy.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy_poll.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy_poll.h deleted file mode 100644 index dc11911341..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/entropy_poll.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * \file entropy_poll.h - * - * \brief Platform-specific and custom entropy polling functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ENTROPY_POLL_H -#define MBEDTLS_ENTROPY_POLL_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Default thresholds for built-in sources, in bytes - */ -#define MBEDTLS_ENTROPY_MIN_PLATFORM 32 /**< Minimum for platform source */ -#define MBEDTLS_ENTROPY_MIN_HAVEGE 32 /**< Minimum for HAVEGE */ -#define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4 /**< Minimum for mbedtls_timing_hardclock() */ -#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Minimum for the hardware source */ - -#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) -/** - * \brief Platform-specific entropy poll callback - */ -int mbedtls_platform_entropy_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif - -#if defined(MBEDTLS_HAVEGE_C) -/** - * \brief HAVEGE based entropy poll callback - * - * Requires an HAVEGE state as its data pointer. - */ -int mbedtls_havege_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif - -#if defined(MBEDTLS_TIMING_C) -/** - * \brief mbedtls_timing_hardclock-based entropy poll callback - */ -int mbedtls_hardclock_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif - -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) -/** - * \brief Entropy poll callback for a hardware source - * - * \warning This is not provided by mbed TLS! - * See \c MBEDTLS_ENTROPY_HARDWARE_ALT in config.h. - * - * \note This must accept NULL as its first argument. - */ -int mbedtls_hardware_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* entropy_poll.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/error.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/error.h deleted file mode 100644 index 5e549f6b6a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/error.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * \file error.h - * - * \brief Error to string translation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ERROR_H -#define MBEDTLS_ERROR_H - -#include - -/** - * Error code layout. - * - * Currently we try to keep all error codes within the negative space of 16 - * bits signed integers to support all platforms (-0x0001 - -0x7FFF). In - * addition we'd like to give two layers of information on the error if - * possible. - * - * For that purpose the error codes are segmented in the following manner: - * - * 16 bit error code bit-segmentation - * - * 1 bit - Unused (sign bit) - * 3 bits - High level module ID - * 5 bits - Module-dependent error code - * 7 bits - Low level module errors - * - * For historical reasons, low-level error codes are divided in even and odd, - * even codes were assigned first, and -1 is reserved for other errors. - * - * Low-level module errors (0x0002-0x007E, 0x0003-0x007F) - * - * Module Nr Codes assigned - * MPI 7 0x0002-0x0010 - * GCM 2 0x0012-0x0014 - * BLOWFISH 2 0x0016-0x0018 - * THREADING 3 0x001A-0x001E - * AES 2 0x0020-0x0022 - * CAMELLIA 2 0x0024-0x0026 - * XTEA 1 0x0028-0x0028 - * BASE64 2 0x002A-0x002C - * OID 1 0x002E-0x002E 0x000B-0x000B - * PADLOCK 1 0x0030-0x0030 - * DES 1 0x0032-0x0032 - * CTR_DBRG 4 0x0034-0x003A - * ENTROPY 3 0x003C-0x0040 0x003D-0x003F - * NET 11 0x0042-0x0052 0x0043-0x0045 - * ASN1 7 0x0060-0x006C - * PBKDF2 1 0x007C-0x007C - * HMAC_DRBG 4 0x0003-0x0009 - * CCM 2 0x000D-0x000F - * - * High-level module nr (3 bits - 0x0...-0x7...) - * Name ID Nr of Errors - * PEM 1 9 - * PKCS#12 1 4 (Started from top) - * X509 2 19 - * PKCS5 2 4 (Started from top) - * DHM 3 9 - * PK 3 14 (Started from top) - * RSA 4 9 - * ECP 4 8 (Started from top) - * MD 5 4 - * CIPHER 6 6 - * SSL 6 17 (Started from top) - * SSL 7 31 - * - * Module dependent error code (5 bits 0x.00.-0x.F8.) - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Translate a mbed TLS error code into a string representation, - * Result is truncated if necessary and always includes a terminating - * null byte. - * - * \param errnum error code - * \param buffer buffer to place representation in - * \param buflen length of the buffer - */ -void mbedtls_strerror( int errnum, char *buffer, size_t buflen ); - -#ifdef __cplusplus -} -#endif - -#endif /* error.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/gcm.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/gcm.h deleted file mode 100644 index 6743ac9a5f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/gcm.h +++ /dev/null @@ -1,220 +0,0 @@ -/** - * \file gcm.h - * - * \brief Galois/Counter mode for 128-bit block ciphers - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_GCM_H -#define MBEDTLS_GCM_H - -#include "cipher.h" - -#include - -#define MBEDTLS_GCM_ENCRYPT 1 -#define MBEDTLS_GCM_DECRYPT 0 - -#define MBEDTLS_ERR_GCM_AUTH_FAILED -0x0012 /**< Authenticated decryption failed. */ -#define MBEDTLS_ERR_GCM_BAD_INPUT -0x0014 /**< Bad input parameters to function. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief GCM context structure - */ -typedef struct { - mbedtls_cipher_context_t cipher_ctx;/*!< cipher context used */ - uint64_t HL[16]; /*!< Precalculated HTable */ - uint64_t HH[16]; /*!< Precalculated HTable */ - uint64_t len; /*!< Total data length */ - uint64_t add_len; /*!< Total add length */ - unsigned char base_ectr[16];/*!< First ECTR for tag */ - unsigned char y[16]; /*!< Y working value */ - unsigned char buf[16]; /*!< buf working value */ - int mode; /*!< Encrypt or Decrypt */ -} -mbedtls_gcm_context; - -/** - * \brief Initialize GCM context (just makes references valid) - * Makes the context ready for mbedtls_gcm_setkey() or - * mbedtls_gcm_free(). - * - * \param ctx GCM context to initialize - */ -void mbedtls_gcm_init( mbedtls_gcm_context *ctx ); - -/** - * \brief GCM initialization (encryption) - * - * \param ctx GCM context to be initialized - * \param cipher cipher to use (a 128-bit block cipher) - * \param key encryption key - * \param keybits must be 128, 192 or 256 - * - * \return 0 if successful, or a cipher specific error code - */ -int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx, - mbedtls_cipher_id_t cipher, - const unsigned char *key, - unsigned int keybits ); - -/** - * \brief GCM buffer encryption/decryption using a block cipher - * - * \note On encryption, the output buffer can be the same as the input buffer. - * On decryption, the output buffer cannot be the same as input buffer. - * If buffers overlap, the output buffer must trail at least 8 bytes - * behind the input buffer. - * - * \param ctx GCM context - * \param mode MBEDTLS_GCM_ENCRYPT or MBEDTLS_GCM_DECRYPT - * \param length length of the input data - * \param iv initialization vector - * \param iv_len length of IV - * \param add additional data - * \param add_len length of additional data - * \param input buffer holding the input data - * \param output buffer for holding the output data - * \param tag_len length of the tag to generate - * \param tag buffer for holding the tag - * - * \return 0 if successful - */ -int mbedtls_gcm_crypt_and_tag( mbedtls_gcm_context *ctx, - int mode, - size_t length, - const unsigned char *iv, - size_t iv_len, - const unsigned char *add, - size_t add_len, - const unsigned char *input, - unsigned char *output, - size_t tag_len, - unsigned char *tag ); - -/** - * \brief GCM buffer authenticated decryption using a block cipher - * - * \note On decryption, the output buffer cannot be the same as input buffer. - * If buffers overlap, the output buffer must trail at least 8 bytes - * behind the input buffer. - * - * \param ctx GCM context - * \param length length of the input data - * \param iv initialization vector - * \param iv_len length of IV - * \param add additional data - * \param add_len length of additional data - * \param tag buffer holding the tag - * \param tag_len length of the tag - * \param input buffer holding the input data - * \param output buffer for holding the output data - * - * \return 0 if successful and authenticated, - * MBEDTLS_ERR_GCM_AUTH_FAILED if tag does not match - */ -int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx, - size_t length, - const unsigned char *iv, - size_t iv_len, - const unsigned char *add, - size_t add_len, - const unsigned char *tag, - size_t tag_len, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Generic GCM stream start function - * - * \param ctx GCM context - * \param mode MBEDTLS_GCM_ENCRYPT or MBEDTLS_GCM_DECRYPT - * \param iv initialization vector - * \param iv_len length of IV - * \param add additional data (or NULL if length is 0) - * \param add_len length of additional data - * - * \return 0 if successful - */ -int mbedtls_gcm_starts( mbedtls_gcm_context *ctx, - int mode, - const unsigned char *iv, - size_t iv_len, - const unsigned char *add, - size_t add_len ); - -/** - * \brief Generic GCM update function. Encrypts/decrypts using the - * given GCM context. Expects input to be a multiple of 16 - * bytes! Only the last call before mbedtls_gcm_finish() can be less - * than 16 bytes! - * - * \note On decryption, the output buffer cannot be the same as input buffer. - * If buffers overlap, the output buffer must trail at least 8 bytes - * behind the input buffer. - * - * \param ctx GCM context - * \param length length of the input data - * \param input buffer holding the input data - * \param output buffer for holding the output data - * - * \return 0 if successful or MBEDTLS_ERR_GCM_BAD_INPUT - */ -int mbedtls_gcm_update( mbedtls_gcm_context *ctx, - size_t length, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Generic GCM finalisation function. Wraps up the GCM stream - * and generates the tag. The tag can have a maximum length of - * 16 bytes. - * - * \param ctx GCM context - * \param tag buffer for holding the tag (may be NULL if tag_len is 0) - * \param tag_len length of the tag to generate - * - * \return 0 if successful or MBEDTLS_ERR_GCM_BAD_INPUT - */ -int mbedtls_gcm_finish( mbedtls_gcm_context *ctx, - unsigned char *tag, - size_t tag_len ); - -/** - * \brief Free a GCM context and underlying cipher sub-context - * - * \param ctx GCM context to free - */ -void mbedtls_gcm_free( mbedtls_gcm_context *ctx ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_gcm_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* gcm.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/havege.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/havege.h deleted file mode 100644 index dac5d31138..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/havege.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * \file havege.h - * - * \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_HAVEGE_H -#define MBEDTLS_HAVEGE_H - -#include - -#define MBEDTLS_HAVEGE_COLLECT_SIZE 1024 - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief HAVEGE state structure - */ -typedef struct -{ - int PT1, PT2, offset[2]; - int pool[MBEDTLS_HAVEGE_COLLECT_SIZE]; - int WALK[8192]; -} -mbedtls_havege_state; - -/** - * \brief HAVEGE initialization - * - * \param hs HAVEGE state to be initialized - */ -void mbedtls_havege_init( mbedtls_havege_state *hs ); - -/** - * \brief Clear HAVEGE state - * - * \param hs HAVEGE state to be cleared - */ -void mbedtls_havege_free( mbedtls_havege_state *hs ); - -/** - * \brief HAVEGE rand function - * - * \param p_rng A HAVEGE state - * \param output Buffer to fill - * \param len Length of buffer - * - * \return 0 - */ -int mbedtls_havege_random( void *p_rng, unsigned char *output, size_t len ); - -#ifdef __cplusplus -} -#endif - -#endif /* havege.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/hmac_drbg.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/hmac_drbg.h deleted file mode 100644 index e010558028..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/hmac_drbg.h +++ /dev/null @@ -1,299 +0,0 @@ -/** - * \file hmac_drbg.h - * - * \brief HMAC_DRBG (NIST SP 800-90A) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_HMAC_DRBG_H -#define MBEDTLS_HMAC_DRBG_H - -#include "md.h" - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -/* - * Error codes - */ -#define MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG -0x0003 /**< Too many random requested in single call. */ -#define MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG -0x0005 /**< Input too large (Entropy + additional). */ -#define MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR -0x0007 /**< Read/write error in file. */ -#define MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED -0x0009 /**< The entropy source failed. */ - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_HMAC_DRBG_RESEED_INTERVAL) -#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ -#endif - -#if !defined(MBEDTLS_HMAC_DRBG_MAX_INPUT) -#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ -#endif - -#if !defined(MBEDTLS_HMAC_DRBG_MAX_REQUEST) -#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ -#endif - -#if !defined(MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT) -#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ -#endif - -/* \} name SECTION: Module settings */ - -#define MBEDTLS_HMAC_DRBG_PR_OFF 0 /**< No prediction resistance */ -#define MBEDTLS_HMAC_DRBG_PR_ON 1 /**< Prediction resistance enabled */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * HMAC_DRBG context. - */ -typedef struct -{ - /* Working state: the key K is not stored explicitely, - * but is implied by the HMAC context */ - mbedtls_md_context_t md_ctx; /*!< HMAC context (inc. K) */ - unsigned char V[MBEDTLS_MD_MAX_SIZE]; /*!< V in the spec */ - int reseed_counter; /*!< reseed counter */ - - /* Administrative state */ - size_t entropy_len; /*!< entropy bytes grabbed on each (re)seed */ - int prediction_resistance; /*!< enable prediction resistance (Automatic - reseed before every random generation) */ - int reseed_interval; /*!< reseed interval */ - - /* Callbacks */ - int (*f_entropy)(void *, unsigned char *, size_t); /*!< entropy function */ - void *p_entropy; /*!< context for the entropy function */ - -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; -#endif -} mbedtls_hmac_drbg_context; - -/** - * \brief HMAC_DRBG context initialization - * Makes the context ready for mbedtls_hmac_drbg_seed(), - * mbedtls_hmac_drbg_seed_buf() or - * mbedtls_hmac_drbg_free(). - * - * \param ctx HMAC_DRBG context to be initialized - */ -void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx ); - -/** - * \brief HMAC_DRBG initial seeding - * Seed and setup entropy source for future reseeds. - * - * \param ctx HMAC_DRBG context to be seeded - * \param md_info MD algorithm to use for HMAC_DRBG - * \param f_entropy Entropy callback (p_entropy, buffer to fill, buffer - * length) - * \param p_entropy Entropy context - * \param custom Personalization data (Device specific identifiers) - * (Can be NULL) - * \param len Length of personalization data - * - * \note The "security strength" as defined by NIST is set to: - * 128 bits if md_alg is SHA-1, - * 192 bits if md_alg is SHA-224, - * 256 bits if md_alg is SHA-256 or higher. - * Note that SHA-256 is just as efficient as SHA-224. - * - * \return 0 if successful, or - * MBEDTLS_ERR_MD_BAD_INPUT_DATA, or - * MBEDTLS_ERR_MD_ALLOC_FAILED, or - * MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED. - */ -int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx, - const mbedtls_md_info_t * md_info, - int (*f_entropy)(void *, unsigned char *, size_t), - void *p_entropy, - const unsigned char *custom, - size_t len ); - -/** - * \brief Initilisation of simpified HMAC_DRBG (never reseeds). - * (For use with deterministic ECDSA.) - * - * \param ctx HMAC_DRBG context to be initialised - * \param md_info MD algorithm to use for HMAC_DRBG - * \param data Concatenation of entropy string and additional data - * \param data_len Length of data in bytes - * - * \return 0 if successful, or - * MBEDTLS_ERR_MD_BAD_INPUT_DATA, or - * MBEDTLS_ERR_MD_ALLOC_FAILED. - */ -int mbedtls_hmac_drbg_seed_buf( mbedtls_hmac_drbg_context *ctx, - const mbedtls_md_info_t * md_info, - const unsigned char *data, size_t data_len ); - -/** - * \brief Enable / disable prediction resistance (Default: Off) - * - * Note: If enabled, entropy is used for ctx->entropy_len before each call! - * Only use this if you have ample supply of good entropy! - * - * \param ctx HMAC_DRBG context - * \param resistance MBEDTLS_HMAC_DRBG_PR_ON or MBEDTLS_HMAC_DRBG_PR_OFF - */ -void mbedtls_hmac_drbg_set_prediction_resistance( mbedtls_hmac_drbg_context *ctx, - int resistance ); - -/** - * \brief Set the amount of entropy grabbed on each reseed - * (Default: given by the security strength, which - * depends on the hash used, see \c mbedtls_hmac_drbg_init() ) - * - * \param ctx HMAC_DRBG context - * \param len Amount of entropy to grab, in bytes - */ -void mbedtls_hmac_drbg_set_entropy_len( mbedtls_hmac_drbg_context *ctx, - size_t len ); - -/** - * \brief Set the reseed interval - * (Default: MBEDTLS_HMAC_DRBG_RESEED_INTERVAL) - * - * \param ctx HMAC_DRBG context - * \param interval Reseed interval - */ -void mbedtls_hmac_drbg_set_reseed_interval( mbedtls_hmac_drbg_context *ctx, - int interval ); - -/** - * \brief HMAC_DRBG update state - * - * \param ctx HMAC_DRBG context - * \param additional Additional data to update state with, or NULL - * \param add_len Length of additional data, or 0 - * - * \note Additional data is optional, pass NULL and 0 as second - * third argument if no additional data is being used. - */ -void mbedtls_hmac_drbg_update( mbedtls_hmac_drbg_context *ctx, - const unsigned char *additional, size_t add_len ); - -/** - * \brief HMAC_DRBG reseeding (extracts data from entropy source) - * - * \param ctx HMAC_DRBG context - * \param additional Additional data to add to state (Can be NULL) - * \param len Length of additional data - * - * \return 0 if successful, or - * MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED - */ -int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx, - const unsigned char *additional, size_t len ); - -/** - * \brief HMAC_DRBG generate random with additional update input - * - * Note: Automatically reseeds if reseed_counter is reached or PR is enabled. - * - * \param p_rng HMAC_DRBG context - * \param output Buffer to fill - * \param output_len Length of the buffer - * \param additional Additional data to update with (can be NULL) - * \param add_len Length of additional data (can be 0) - * - * \return 0 if successful, or - * MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED, or - * MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG, or - * MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG. - */ -int mbedtls_hmac_drbg_random_with_add( void *p_rng, - unsigned char *output, size_t output_len, - const unsigned char *additional, - size_t add_len ); - -/** - * \brief HMAC_DRBG generate random - * - * Note: Automatically reseeds if reseed_counter is reached or PR is enabled. - * - * \param p_rng HMAC_DRBG context - * \param output Buffer to fill - * \param out_len Length of the buffer - * - * \return 0 if successful, or - * MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED, or - * MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG - */ -int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len ); - -/** - * \brief Free an HMAC_DRBG context - * - * \param ctx HMAC_DRBG context to free. - */ -void mbedtls_hmac_drbg_free( mbedtls_hmac_drbg_context *ctx ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Write a seed file - * - * \param ctx HMAC_DRBG context - * \param path Name of the file - * - * \return 0 if successful, 1 on file error, or - * MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED - */ -int mbedtls_hmac_drbg_write_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path ); - -/** - * \brief Read and update a seed file. Seed is added to this - * instance - * - * \param ctx HMAC_DRBG context - * \param path Name of the file - * - * \return 0 if successful, 1 on file error, - * MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED or - * MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG - */ -int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path ); -#endif /* MBEDTLS_FS_IO */ - - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_hmac_drbg_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* hmac_drbg.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/md.h deleted file mode 100644 index b90235533d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md.h +++ /dev/null @@ -1,353 +0,0 @@ -/** - * \file md.h - * - * \brief Generic message digest wrapper - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MD_H -#define MBEDTLS_MD_H - -#include - -#define MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE -0x5080 /**< The selected feature is not available. */ -#define MBEDTLS_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_MD_ALLOC_FAILED -0x5180 /**< Failed to allocate memory. */ -#define MBEDTLS_ERR_MD_FILE_IO_ERROR -0x5200 /**< Opening or reading of file failed. */ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - MBEDTLS_MD_NONE=0, - MBEDTLS_MD_MD2, - MBEDTLS_MD_MD4, - MBEDTLS_MD_MD5, - MBEDTLS_MD_SHA1, - MBEDTLS_MD_SHA224, - MBEDTLS_MD_SHA256, - MBEDTLS_MD_SHA384, - MBEDTLS_MD_SHA512, - MBEDTLS_MD_RIPEMD160, -} mbedtls_md_type_t; - -#if defined(MBEDTLS_SHA512_C) -#define MBEDTLS_MD_MAX_SIZE 64 /* longest known is SHA512 */ -#else -#define MBEDTLS_MD_MAX_SIZE 32 /* longest known is SHA256 or less */ -#endif - -/** - * Opaque struct defined in md_internal.h - */ -typedef struct mbedtls_md_info_t mbedtls_md_info_t; - -/** - * Generic message digest context. - */ -typedef struct { - /** Information about the associated message digest */ - const mbedtls_md_info_t *md_info; - - /** Digest-specific context */ - void *md_ctx; - - /** HMAC part of the context */ - void *hmac_ctx; -} mbedtls_md_context_t; - -/** - * \brief Returns the list of digests supported by the generic digest module. - * - * \return a statically allocated array of digests, the last entry - * is 0. - */ -const int *mbedtls_md_list( void ); - -/** - * \brief Returns the message digest information associated with the - * given digest name. - * - * \param md_name Name of the digest to search for. - * - * \return The message digest information associated with md_name or - * NULL if not found. - */ -const mbedtls_md_info_t *mbedtls_md_info_from_string( const char *md_name ); - -/** - * \brief Returns the message digest information associated with the - * given digest type. - * - * \param md_type type of digest to search for. - * - * \return The message digest information associated with md_type or - * NULL if not found. - */ -const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type ); - -/** - * \brief Initialize a md_context (as NONE) - * This should always be called first. - * Prepares the context for mbedtls_md_setup() or mbedtls_md_free(). - */ -void mbedtls_md_init( mbedtls_md_context_t *ctx ); - -/** - * \brief Free and clear the internal structures of ctx. - * Can be called at any time after mbedtls_md_init(). - * Mandatory once mbedtls_md_setup() has been called. - */ -void mbedtls_md_free( mbedtls_md_context_t *ctx ); - -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) -#if defined(MBEDTLS_DEPRECATED_WARNING) -#define MBEDTLS_DEPRECATED __attribute__((deprecated)) -#else -#define MBEDTLS_DEPRECATED -#endif -/** - * \brief Select MD to use and allocate internal structures. - * Should be called after mbedtls_md_init() or mbedtls_md_free(). - * Makes it necessary to call mbedtls_md_free() later. - * - * \deprecated Superseded by mbedtls_md_setup() in 2.0.0 - * - * \param ctx Context to set up. - * \param md_info Message digest to use. - * - * \returns \c 0 on success, - * \c MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter failure, - * \c MBEDTLS_ERR_MD_ALLOC_FAILED memory allocation failure. - */ -int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) MBEDTLS_DEPRECATED; -#undef MBEDTLS_DEPRECATED -#endif /* MBEDTLS_DEPRECATED_REMOVED */ - -/** - * \brief Select MD to use and allocate internal structures. - * Should be called after mbedtls_md_init() or mbedtls_md_free(). - * Makes it necessary to call mbedtls_md_free() later. - * - * \param ctx Context to set up. - * \param md_info Message digest to use. - * \param hmac 0 to save some memory if HMAC will not be used, - * non-zero is HMAC is going to be used with this context. - * - * \returns \c 0 on success, - * \c MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter failure, - * \c MBEDTLS_ERR_MD_ALLOC_FAILED memory allocation failure. - */ -int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ); - -/** - * \brief Clone the state of an MD context - * - * \note The two contexts must have been setup to the same type - * (cloning from SHA-256 to SHA-512 make no sense). - * - * \warning Only clones the MD state, not the HMAC state! (for now) - * - * \param dst The destination context - * \param src The context to be cloned - * - * \return \c 0 on success, - * \c MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter failure. - */ -int mbedtls_md_clone( mbedtls_md_context_t *dst, - const mbedtls_md_context_t *src ); - -/** - * \brief Returns the size of the message digest output. - * - * \param md_info message digest info - * - * \return size of the message digest output in bytes. - */ -unsigned char mbedtls_md_get_size( const mbedtls_md_info_t *md_info ); - -/** - * \brief Returns the type of the message digest output. - * - * \param md_info message digest info - * - * \return type of the message digest output. - */ -mbedtls_md_type_t mbedtls_md_get_type( const mbedtls_md_info_t *md_info ); - -/** - * \brief Returns the name of the message digest output. - * - * \param md_info message digest info - * - * \return name of the message digest output. - */ -const char *mbedtls_md_get_name( const mbedtls_md_info_t *md_info ); - -/** - * \brief Prepare the context to digest a new message. - * Generally called after mbedtls_md_setup() or mbedtls_md_finish(). - * Followed by mbedtls_md_update(). - * - * \param ctx generic message digest context. - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_starts( mbedtls_md_context_t *ctx ); - -/** - * \brief Generic message digest process buffer - * Called between mbedtls_md_starts() and mbedtls_md_finish(). - * May be called repeatedly. - * - * \param ctx Generic message digest context - * \param input buffer holding the datal - * \param ilen length of the input data - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_update( mbedtls_md_context_t *ctx, const unsigned char *input, size_t ilen ); - -/** - * \brief Generic message digest final digest - * Called after mbedtls_md_update(). - * Usually followed by mbedtls_md_free() or mbedtls_md_starts(). - * - * \param ctx Generic message digest context - * \param output Generic message digest checksum result - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_finish( mbedtls_md_context_t *ctx, unsigned char *output ); - -/** - * \brief Output = message_digest( input buffer ) - * - * \param md_info message digest info - * \param input buffer holding the data - * \param ilen length of the input data - * \param output Generic message digest checksum result - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md( const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen, - unsigned char *output ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Output = message_digest( file contents ) - * - * \param md_info message digest info - * \param path input file name - * \param output generic message digest checksum result - * - * \return 0 if successful, - * MBEDTLS_ERR_MD_FILE_IO_ERROR if file input failed, - * MBEDTLS_ERR_MD_BAD_INPUT_DATA if md_info was NULL. - */ -int mbedtls_md_file( const mbedtls_md_info_t *md_info, const char *path, - unsigned char *output ); -#endif /* MBEDTLS_FS_IO */ - -/** - * \brief Set HMAC key and prepare to authenticate a new message. - * Usually called after mbedtls_md_setup() or mbedtls_md_hmac_finish(). - * - * \param ctx HMAC context - * \param key HMAC secret key - * \param keylen length of the HMAC key in bytes - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_hmac_starts( mbedtls_md_context_t *ctx, const unsigned char *key, - size_t keylen ); - -/** - * \brief Generic HMAC process buffer. - * Called between mbedtls_md_hmac_starts() or mbedtls_md_hmac_reset() - * and mbedtls_md_hmac_finish(). - * May be called repeatedly. - * - * \param ctx HMAC context - * \param input buffer holding the data - * \param ilen length of the input data - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_hmac_update( mbedtls_md_context_t *ctx, const unsigned char *input, - size_t ilen ); - -/** - * \brief Output HMAC. - * Called after mbedtls_md_hmac_update(). - * Usually followed my mbedtls_md_hmac_reset(), mbedtls_md_hmac_starts(), - * or mbedtls_md_free(). - * - * \param ctx HMAC context - * \param output Generic HMAC checksum result - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_hmac_finish( mbedtls_md_context_t *ctx, unsigned char *output); - -/** - * \brief Prepare to authenticate a new message with the same key. - * Called after mbedtls_md_hmac_finish() and before mbedtls_md_hmac_update(). - * - * \param ctx HMAC context to be reset - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_hmac_reset( mbedtls_md_context_t *ctx ); - -/** - * \brief Output = Generic_HMAC( hmac key, input buffer ) - * - * \param md_info message digest info - * \param key HMAC secret key - * \param keylen length of the HMAC key in bytes - * \param input buffer holding the data - * \param ilen length of the input data - * \param output Generic HMAC-result - * - * \returns 0 on success, MBEDTLS_ERR_MD_BAD_INPUT_DATA if parameter - * verification fails. - */ -int mbedtls_md_hmac( const mbedtls_md_info_t *md_info, const unsigned char *key, size_t keylen, - const unsigned char *input, size_t ilen, - unsigned char *output ); - -/* Internal use */ -int mbedtls_md_process( mbedtls_md_context_t *ctx, const unsigned char *data ); - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_MD_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md2.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/md2.h deleted file mode 100644 index 0f93fbf427..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md2.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * \file md2.h - * - * \brief MD2 message digest algorithm (hash function) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MD2_H -#define MBEDTLS_MD2_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#if !defined(MBEDTLS_MD2_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief MD2 context structure - */ -typedef struct -{ - unsigned char cksum[16]; /*!< checksum of the data block */ - unsigned char state[48]; /*!< intermediate digest state */ - unsigned char buffer[16]; /*!< data block being processed */ - size_t left; /*!< amount of data in buffer */ -} -mbedtls_md2_context; - -/** - * \brief Initialize MD2 context - * - * \param ctx MD2 context to be initialized - */ -void mbedtls_md2_init( mbedtls_md2_context *ctx ); - -/** - * \brief Clear MD2 context - * - * \param ctx MD2 context to be cleared - */ -void mbedtls_md2_free( mbedtls_md2_context *ctx ); - -/** - * \brief Clone (the state of) an MD2 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_md2_clone( mbedtls_md2_context *dst, - const mbedtls_md2_context *src ); - -/** - * \brief MD2 context setup - * - * \param ctx context to be initialized - */ -void mbedtls_md2_starts( mbedtls_md2_context *ctx ); - -/** - * \brief MD2 process buffer - * - * \param ctx MD2 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_md2_update( mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen ); - -/** - * \brief MD2 final digest - * - * \param ctx MD2 context - * \param output MD2 checksum result - */ -void mbedtls_md2_finish( mbedtls_md2_context *ctx, unsigned char output[16] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_MD2_ALT */ -#include "md2_alt.h" -#endif /* MBEDTLS_MD2_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = MD2( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output MD2 checksum result - */ -void mbedtls_md2( const unsigned char *input, size_t ilen, unsigned char output[16] ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_md2_self_test( int verbose ); - -/* Internal use */ -void mbedtls_md2_process( mbedtls_md2_context *ctx ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_md2.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md4.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/md4.h deleted file mode 100644 index 45214d41d9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md4.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * \file md4.h - * - * \brief MD4 message digest algorithm (hash function) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MD4_H -#define MBEDTLS_MD4_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if !defined(MBEDTLS_MD4_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief MD4 context structure - */ -typedef struct -{ - uint32_t total[2]; /*!< number of bytes processed */ - uint32_t state[4]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ -} -mbedtls_md4_context; - -/** - * \brief Initialize MD4 context - * - * \param ctx MD4 context to be initialized - */ -void mbedtls_md4_init( mbedtls_md4_context *ctx ); - -/** - * \brief Clear MD4 context - * - * \param ctx MD4 context to be cleared - */ -void mbedtls_md4_free( mbedtls_md4_context *ctx ); - -/** - * \brief Clone (the state of) an MD4 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_md4_clone( mbedtls_md4_context *dst, - const mbedtls_md4_context *src ); - -/** - * \brief MD4 context setup - * - * \param ctx context to be initialized - */ -void mbedtls_md4_starts( mbedtls_md4_context *ctx ); - -/** - * \brief MD4 process buffer - * - * \param ctx MD4 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_md4_update( mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen ); - -/** - * \brief MD4 final digest - * - * \param ctx MD4 context - * \param output MD4 checksum result - */ -void mbedtls_md4_finish( mbedtls_md4_context *ctx, unsigned char output[16] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_MD4_ALT */ -#include "md4_alt.h" -#endif /* MBEDTLS_MD4_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = MD4( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output MD4 checksum result - */ -void mbedtls_md4( const unsigned char *input, size_t ilen, unsigned char output[16] ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_md4_self_test( int verbose ); - -/* Internal use */ -void mbedtls_md4_process( mbedtls_md4_context *ctx, const unsigned char data[64] ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_md4.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md5.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/md5.h deleted file mode 100644 index 5a64061aa0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md5.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * \file md5.h - * - * \brief MD5 message digest algorithm (hash function) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MD5_H -#define MBEDTLS_MD5_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if !defined(MBEDTLS_MD5_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief MD5 context structure - */ -typedef struct -{ - uint32_t total[2]; /*!< number of bytes processed */ - uint32_t state[4]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ -} -mbedtls_md5_context; - -/** - * \brief Initialize MD5 context - * - * \param ctx MD5 context to be initialized - */ -void mbedtls_md5_init( mbedtls_md5_context *ctx ); - -/** - * \brief Clear MD5 context - * - * \param ctx MD5 context to be cleared - */ -void mbedtls_md5_free( mbedtls_md5_context *ctx ); - -/** - * \brief Clone (the state of) an MD5 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_md5_clone( mbedtls_md5_context *dst, - const mbedtls_md5_context *src ); - -/** - * \brief MD5 context setup - * - * \param ctx context to be initialized - */ -void mbedtls_md5_starts( mbedtls_md5_context *ctx ); - -/** - * \brief MD5 process buffer - * - * \param ctx MD5 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen ); - -/** - * \brief MD5 final digest - * - * \param ctx MD5 context - * \param output MD5 checksum result - */ -void mbedtls_md5_finish( mbedtls_md5_context *ctx, unsigned char output[16] ); - -/* Internal use */ -void mbedtls_md5_process( mbedtls_md5_context *ctx, const unsigned char data[64] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_MD5_ALT */ -#include "md5_alt.h" -#endif /* MBEDTLS_MD5_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = MD5( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output MD5 checksum result - */ -void mbedtls_md5( const unsigned char *input, size_t ilen, unsigned char output[16] ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_md5_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_md5.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md_internal.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/md_internal.h deleted file mode 100644 index e2441bbc49..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/md_internal.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * \file md_internal.h - * - * \brief Message digest wrappers. - * - * \warning This in an internal header. Do not include directly. - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MD_WRAP_H -#define MBEDTLS_MD_WRAP_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Message digest information. - * Allows message digest functions to be called in a generic way. - */ -struct mbedtls_md_info_t -{ - /** Digest identifier */ - mbedtls_md_type_t type; - - /** Name of the message digest */ - const char * name; - - /** Output length of the digest function in bytes */ - int size; - - /** Block length of the digest function in bytes */ - int block_size; - - /** Digest initialisation function */ - void (*starts_func)( void *ctx ); - - /** Digest update function */ - void (*update_func)( void *ctx, const unsigned char *input, size_t ilen ); - - /** Digest finalisation function */ - void (*finish_func)( void *ctx, unsigned char *output ); - - /** Generic digest function */ - void (*digest_func)( const unsigned char *input, size_t ilen, - unsigned char *output ); - - /** Allocate a new context */ - void * (*ctx_alloc_func)( void ); - - /** Free the given context */ - void (*ctx_free_func)( void *ctx ); - - /** Clone state from a context */ - void (*clone_func)( void *dst, const void *src ); - - /** Internal use only */ - void (*process_func)( void *ctx, const unsigned char *input ); -}; - -#if defined(MBEDTLS_MD2_C) -extern const mbedtls_md_info_t mbedtls_md2_info; -#endif -#if defined(MBEDTLS_MD4_C) -extern const mbedtls_md_info_t mbedtls_md4_info; -#endif -#if defined(MBEDTLS_MD5_C) -extern const mbedtls_md_info_t mbedtls_md5_info; -#endif -#if defined(MBEDTLS_RIPEMD160_C) -extern const mbedtls_md_info_t mbedtls_ripemd160_info; -#endif -#if defined(MBEDTLS_SHA1_C) -extern const mbedtls_md_info_t mbedtls_sha1_info; -#endif -#if defined(MBEDTLS_SHA256_C) -extern const mbedtls_md_info_t mbedtls_sha224_info; -extern const mbedtls_md_info_t mbedtls_sha256_info; -#endif -#if defined(MBEDTLS_SHA512_C) -extern const mbedtls_md_info_t mbedtls_sha384_info; -extern const mbedtls_md_info_t mbedtls_sha512_info; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_MD_WRAP_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/memory_buffer_alloc.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/memory_buffer_alloc.h deleted file mode 100644 index 661bc08dcc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/memory_buffer_alloc.h +++ /dev/null @@ -1,146 +0,0 @@ -/** - * \file memory_buffer_alloc.h - * - * \brief Buffer-based memory allocator - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MEMORY_BUFFER_ALLOC_H -#define MBEDTLS_MEMORY_BUFFER_ALLOC_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_MEMORY_ALIGN_MULTIPLE) -#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ -#endif - -/* \} name SECTION: Module settings */ - -#define MBEDTLS_MEMORY_VERIFY_NONE 0 -#define MBEDTLS_MEMORY_VERIFY_ALLOC (1 << 0) -#define MBEDTLS_MEMORY_VERIFY_FREE (1 << 1) -#define MBEDTLS_MEMORY_VERIFY_ALWAYS (MBEDTLS_MEMORY_VERIFY_ALLOC | MBEDTLS_MEMORY_VERIFY_FREE) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Initialize use of stack-based memory allocator. - * The stack-based allocator does memory management inside the - * presented buffer and does not call calloc() and free(). - * It sets the global mbedtls_calloc() and mbedtls_free() pointers - * to its own functions. - * (Provided mbedtls_calloc() and mbedtls_free() are thread-safe if - * MBEDTLS_THREADING_C is defined) - * - * \note This code is not optimized and provides a straight-forward - * implementation of a stack-based memory allocator. - * - * \param buf buffer to use as heap - * \param len size of the buffer - */ -void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len ); - -/** - * \brief Free the mutex for thread-safety and clear remaining memory - */ -void mbedtls_memory_buffer_alloc_free( void ); - -/** - * \brief Determine when the allocator should automatically verify the state - * of the entire chain of headers / meta-data. - * (Default: MBEDTLS_MEMORY_VERIFY_NONE) - * - * \param verify One of MBEDTLS_MEMORY_VERIFY_NONE, MBEDTLS_MEMORY_VERIFY_ALLOC, - * MBEDTLS_MEMORY_VERIFY_FREE or MBEDTLS_MEMORY_VERIFY_ALWAYS - */ -void mbedtls_memory_buffer_set_verify( int verify ); - -#if defined(MBEDTLS_MEMORY_DEBUG) -/** - * \brief Print out the status of the allocated memory (primarily for use - * after a program should have de-allocated all memory) - * Prints out a list of 'still allocated' blocks and their stack - * trace if MBEDTLS_MEMORY_BACKTRACE is defined. - */ -void mbedtls_memory_buffer_alloc_status( void ); - -/** - * \brief Get the peak heap usage so far - * - * \param max_used Peak number of bytes reauested by the application - * \param max_blocks Peak number of blocks reauested by the application - */ -void mbedtls_memory_buffer_alloc_max_get( size_t *max_used, size_t *max_blocks ); - -/** - * \brief Reset peak statistics - */ -void mbedtls_memory_buffer_alloc_max_reset( void ); - -/** - * \brief Get the current heap usage - * - * \param cur_used Number of bytes reauested by the application - * \param cur_blocks Number of blocks reauested by the application - */ -void mbedtls_memory_buffer_alloc_cur_get( size_t *cur_used, size_t *cur_blocks ); -#endif /* MBEDTLS_MEMORY_DEBUG */ - -/** - * \brief Verifies that all headers in the memory buffer are correct - * and contain sane values. Helps debug buffer-overflow errors. - * - * Prints out first failure if MBEDTLS_MEMORY_DEBUG is defined. - * Prints out full header information if MBEDTLS_MEMORY_DEBUG - * is defined. (Includes stack trace information for each block if - * MBEDTLS_MEMORY_BACKTRACE is defined as well). - * - * \return 0 if verified, 1 otherwise - */ -int mbedtls_memory_buffer_alloc_verify( void ); - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_memory_buffer_alloc_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* memory_buffer_alloc.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/net.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/net.h deleted file mode 100644 index 8c6534cfb8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/net.h +++ /dev/null @@ -1,225 +0,0 @@ -/** - * \file net.h - * - * \brief Network communication functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_NET_H -#define MBEDTLS_NET_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "ssl.h" - -#include -#include - -#define MBEDTLS_ERR_NET_SOCKET_FAILED -0x0042 /**< Failed to open a socket. */ -#define MBEDTLS_ERR_NET_CONNECT_FAILED -0x0044 /**< The connection to the given server / port failed. */ -#define MBEDTLS_ERR_NET_BIND_FAILED -0x0046 /**< Binding of the socket failed. */ -#define MBEDTLS_ERR_NET_LISTEN_FAILED -0x0048 /**< Could not listen on the socket. */ -#define MBEDTLS_ERR_NET_ACCEPT_FAILED -0x004A /**< Could not accept the incoming connection. */ -#define MBEDTLS_ERR_NET_RECV_FAILED -0x004C /**< Reading information from the socket failed. */ -#define MBEDTLS_ERR_NET_SEND_FAILED -0x004E /**< Sending information through the socket failed. */ -#define MBEDTLS_ERR_NET_CONN_RESET -0x0050 /**< Connection was reset by peer. */ -#define MBEDTLS_ERR_NET_UNKNOWN_HOST -0x0052 /**< Failed to get an IP address for the given hostname. */ -#define MBEDTLS_ERR_NET_BUFFER_TOO_SMALL -0x0043 /**< Buffer is too small to hold the data. */ -#define MBEDTLS_ERR_NET_INVALID_CONTEXT -0x0045 /**< The context is invalid, eg because it was free()ed. */ - -#define MBEDTLS_NET_LISTEN_BACKLOG 10 /**< The backlog that listen() should use. */ - -#define MBEDTLS_NET_PROTO_TCP 0 /**< The TCP transport protocol */ -#define MBEDTLS_NET_PROTO_UDP 1 /**< The UDP transport protocol */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Wrapper type for sockets. - * - * Currently backed by just a file descriptor, but might be more in the future - * (eg two file descriptors for combined IPv4 + IPv6 support, or additional - * structures for hand-made UDP demultiplexing). - */ -typedef struct -{ - int fd; /**< The underlying file descriptor */ -} -mbedtls_net_context; - -/** - * \brief Initialize a context - * Just makes the context ready to be used or freed safely. - * - * \param ctx Context to initialize - */ -void mbedtls_net_init( mbedtls_net_context *ctx ); - -/** - * \brief Initiate a connection with host:port in the given protocol - * - * \param ctx Socket to use - * \param host Host to connect to - * \param port Port to connect to - * \param proto Protocol: MBEDTLS_NET_PROTO_TCP or MBEDTLS_NET_PROTO_UDP - * - * \return 0 if successful, or one of: - * MBEDTLS_ERR_NET_SOCKET_FAILED, - * MBEDTLS_ERR_NET_UNKNOWN_HOST, - * MBEDTLS_ERR_NET_CONNECT_FAILED - * - * \note Sets the socket in connected mode even with UDP. - */ -int mbedtls_net_connect( mbedtls_net_context *ctx, const char *host, const char *port, int proto ); - -/** - * \brief Create a receiving socket on bind_ip:port in the chosen - * protocol. If bind_ip == NULL, all interfaces are bound. - * - * \param ctx Socket to use - * \param bind_ip IP to bind to, can be NULL - * \param port Port number to use - * \param proto Protocol: MBEDTLS_NET_PROTO_TCP or MBEDTLS_NET_PROTO_UDP - * - * \return 0 if successful, or one of: - * MBEDTLS_ERR_NET_SOCKET_FAILED, - * MBEDTLS_ERR_NET_BIND_FAILED, - * MBEDTLS_ERR_NET_LISTEN_FAILED - * - * \note Regardless of the protocol, opens the sockets and binds it. - * In addition, make the socket listening if protocol is TCP. - */ -int mbedtls_net_bind( mbedtls_net_context *ctx, const char *bind_ip, const char *port, int proto ); - -/** - * \brief Accept a connection from a remote client - * - * \param bind_ctx Relevant socket - * \param client_ctx Will contain the connected client socket - * \param client_ip Will contain the client IP address - * \param buf_size Size of the client_ip buffer - * \param ip_len Will receive the size of the client IP written - * - * \return 0 if successful, or - * MBEDTLS_ERR_NET_ACCEPT_FAILED, or - * MBEDTLS_ERR_NET_BUFFER_TOO_SMALL if buf_size is too small, - * MBEDTLS_ERR_SSL_WANT_READ if bind_fd was set to - * non-blocking and accept() would block. - */ -int mbedtls_net_accept( mbedtls_net_context *bind_ctx, - mbedtls_net_context *client_ctx, - void *client_ip, size_t buf_size, size_t *ip_len ); - -/** - * \brief Set the socket blocking - * - * \param ctx Socket to set - * - * \return 0 if successful, or a non-zero error code - */ -int mbedtls_net_set_block( mbedtls_net_context *ctx ); - -/** - * \brief Set the socket non-blocking - * - * \param ctx Socket to set - * - * \return 0 if successful, or a non-zero error code - */ -int mbedtls_net_set_nonblock( mbedtls_net_context *ctx ); - -/** - * \brief Portable usleep helper - * - * \param usec Amount of microseconds to sleep - * - * \note Real amount of time slept will not be less than - * select()'s timeout granularity (typically, 10ms). - */ -void mbedtls_net_usleep( unsigned long usec ); - -/** - * \brief Read at most 'len' characters. If no error occurs, - * the actual amount read is returned. - * - * \param ctx Socket - * \param buf The buffer to write to - * \param len Maximum length of the buffer - * - * \return the number of bytes received, - * or a non-zero error code; with a non-blocking socket, - * MBEDTLS_ERR_SSL_WANT_READ indicates read() would block. - */ -int mbedtls_net_recv( void *ctx, unsigned char *buf, size_t len ); - -/** - * \brief Write at most 'len' characters. If no error occurs, - * the actual amount read is returned. - * - * \param ctx Socket - * \param buf The buffer to read from - * \param len The length of the buffer - * - * \return the number of bytes sent, - * or a non-zero error code; with a non-blocking socket, - * MBEDTLS_ERR_SSL_WANT_WRITE indicates write() would block. - */ -int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len ); - -/** - * \brief Read at most 'len' characters, blocking for at most - * 'timeout' seconds. If no error occurs, the actual amount - * read is returned. - * - * \param ctx Socket - * \param buf The buffer to write to - * \param len Maximum length of the buffer - * \param timeout Maximum number of milliseconds to wait for data - * 0 means no timeout (wait forever) - * - * \return the number of bytes received, - * or a non-zero error code: - * MBEDTLS_ERR_SSL_TIMEOUT if the operation timed out, - * MBEDTLS_ERR_SSL_WANT_READ if interrupted by a signal. - * - * \note This function will block (until data becomes available or - * timeout is reached) even if the socket is set to - * non-blocking. Handling timeouts with non-blocking reads - * requires a different strategy. - */ -int mbedtls_net_recv_timeout( void *ctx, unsigned char *buf, size_t len, - uint32_t timeout ); - -/** - * \brief Gracefully shutdown the connection and free associated data - * - * \param ctx The context to free - */ -void mbedtls_net_free( mbedtls_net_context *ctx ); - -#ifdef __cplusplus -} -#endif - -#endif /* net.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/oid.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/oid.h deleted file mode 100644 index fcecdafdca..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/oid.h +++ /dev/null @@ -1,570 +0,0 @@ -/** - * \file oid.h - * - * \brief Object Identifier (OID) database - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_OID_H -#define MBEDTLS_OID_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "asn1.h" -#include "pk.h" - -#include - -#if defined(MBEDTLS_CIPHER_C) -#include "cipher.h" -#endif - -#if defined(MBEDTLS_MD_C) -#include "md.h" -#endif - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -#include "x509.h" -#endif - -#define MBEDTLS_ERR_OID_NOT_FOUND -0x002E /**< OID is not found. */ -#define MBEDTLS_ERR_OID_BUF_TOO_SMALL -0x000B /**< output buffer is too small */ - -/* - * Top level OID tuples - */ -#define MBEDTLS_OID_ISO_MEMBER_BODIES "\x2a" /* {iso(1) member-body(2)} */ -#define MBEDTLS_OID_ISO_IDENTIFIED_ORG "\x2b" /* {iso(1) identified-organization(3)} */ -#define MBEDTLS_OID_ISO_CCITT_DS "\x55" /* {joint-iso-ccitt(2) ds(5)} */ -#define MBEDTLS_OID_ISO_ITU_COUNTRY "\x60" /* {joint-iso-itu-t(2) country(16)} */ - -/* - * ISO Member bodies OID parts - */ -#define MBEDTLS_OID_COUNTRY_US "\x86\x48" /* {us(840)} */ -#define MBEDTLS_OID_ORG_RSA_DATA_SECURITY "\x86\xf7\x0d" /* {rsadsi(113549)} */ -#define MBEDTLS_OID_RSA_COMPANY MBEDTLS_OID_ISO_MEMBER_BODIES MBEDTLS_OID_COUNTRY_US \ - MBEDTLS_OID_ORG_RSA_DATA_SECURITY /* {iso(1) member-body(2) us(840) rsadsi(113549)} */ -#define MBEDTLS_OID_ORG_ANSI_X9_62 "\xce\x3d" /* ansi-X9-62(10045) */ -#define MBEDTLS_OID_ANSI_X9_62 MBEDTLS_OID_ISO_MEMBER_BODIES MBEDTLS_OID_COUNTRY_US \ - MBEDTLS_OID_ORG_ANSI_X9_62 - -/* - * ISO Identified organization OID parts - */ -#define MBEDTLS_OID_ORG_DOD "\x06" /* {dod(6)} */ -#define MBEDTLS_OID_ORG_OIW "\x0e" -#define MBEDTLS_OID_OIW_SECSIG MBEDTLS_OID_ORG_OIW "\x03" -#define MBEDTLS_OID_OIW_SECSIG_ALG MBEDTLS_OID_OIW_SECSIG "\x02" -#define MBEDTLS_OID_OIW_SECSIG_SHA1 MBEDTLS_OID_OIW_SECSIG_ALG "\x1a" -#define MBEDTLS_OID_ORG_CERTICOM "\x81\x04" /* certicom(132) */ -#define MBEDTLS_OID_CERTICOM MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_CERTICOM -#define MBEDTLS_OID_ORG_TELETRUST "\x24" /* teletrust(36) */ -#define MBEDTLS_OID_TELETRUST MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_TELETRUST - -/* - * ISO ITU OID parts - */ -#define MBEDTLS_OID_ORGANIZATION "\x01" /* {organization(1)} */ -#define MBEDTLS_OID_ISO_ITU_US_ORG MBEDTLS_OID_ISO_ITU_COUNTRY MBEDTLS_OID_COUNTRY_US MBEDTLS_OID_ORGANIZATION /* {joint-iso-itu-t(2) country(16) us(840) organization(1)} */ - -#define MBEDTLS_OID_ORG_GOV "\x65" /* {gov(101)} */ -#define MBEDTLS_OID_GOV MBEDTLS_OID_ISO_ITU_US_ORG MBEDTLS_OID_ORG_GOV /* {joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101)} */ - -#define MBEDTLS_OID_ORG_NETSCAPE "\x86\xF8\x42" /* {netscape(113730)} */ -#define MBEDTLS_OID_NETSCAPE MBEDTLS_OID_ISO_ITU_US_ORG MBEDTLS_OID_ORG_NETSCAPE /* Netscape OID {joint-iso-itu-t(2) country(16) us(840) organization(1) netscape(113730)} */ - -/* ISO arc for standard certificate and CRL extensions */ -#define MBEDTLS_OID_ID_CE MBEDTLS_OID_ISO_CCITT_DS "\x1D" /**< id-ce OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 29} */ - -/** - * Private Internet Extensions - * { iso(1) identified-organization(3) dod(6) internet(1) - * security(5) mechanisms(5) pkix(7) } - */ -#define MBEDTLS_OID_PKIX MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ORG_DOD "\x01\x05\x05\x07" - -/* - * Arc for standard naming attributes - */ -#define MBEDTLS_OID_AT MBEDTLS_OID_ISO_CCITT_DS "\x04" /**< id-at OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) ds(5) 4} */ -#define MBEDTLS_OID_AT_CN MBEDTLS_OID_AT "\x03" /**< id-at-commonName AttributeType:= {id-at 3} */ -#define MBEDTLS_OID_AT_SUR_NAME MBEDTLS_OID_AT "\x04" /**< id-at-surName AttributeType:= {id-at 4} */ -#define MBEDTLS_OID_AT_SERIAL_NUMBER MBEDTLS_OID_AT "\x05" /**< id-at-serialNumber AttributeType:= {id-at 5} */ -#define MBEDTLS_OID_AT_COUNTRY MBEDTLS_OID_AT "\x06" /**< id-at-countryName AttributeType:= {id-at 6} */ -#define MBEDTLS_OID_AT_LOCALITY MBEDTLS_OID_AT "\x07" /**< id-at-locality AttributeType:= {id-at 7} */ -#define MBEDTLS_OID_AT_STATE MBEDTLS_OID_AT "\x08" /**< id-at-state AttributeType:= {id-at 8} */ -#define MBEDTLS_OID_AT_ORGANIZATION MBEDTLS_OID_AT "\x0A" /**< id-at-organizationName AttributeType:= {id-at 10} */ -#define MBEDTLS_OID_AT_ORG_UNIT MBEDTLS_OID_AT "\x0B" /**< id-at-organizationalUnitName AttributeType:= {id-at 11} */ -#define MBEDTLS_OID_AT_TITLE MBEDTLS_OID_AT "\x0C" /**< id-at-title AttributeType:= {id-at 12} */ -#define MBEDTLS_OID_AT_POSTAL_ADDRESS MBEDTLS_OID_AT "\x10" /**< id-at-postalAddress AttributeType:= {id-at 16} */ -#define MBEDTLS_OID_AT_POSTAL_CODE MBEDTLS_OID_AT "\x11" /**< id-at-postalCode AttributeType:= {id-at 17} */ -#define MBEDTLS_OID_AT_GIVEN_NAME MBEDTLS_OID_AT "\x2A" /**< id-at-givenName AttributeType:= {id-at 42} */ -#define MBEDTLS_OID_AT_INITIALS MBEDTLS_OID_AT "\x2B" /**< id-at-initials AttributeType:= {id-at 43} */ -#define MBEDTLS_OID_AT_GENERATION_QUALIFIER MBEDTLS_OID_AT "\x2C" /**< id-at-generationQualifier AttributeType:= {id-at 44} */ -#define MBEDTLS_OID_AT_UNIQUE_IDENTIFIER MBEDTLS_OID_AT "\x2D" /**< id-at-uniqueIdentifier AttributType:= {id-at 45} */ -#define MBEDTLS_OID_AT_DN_QUALIFIER MBEDTLS_OID_AT "\x2E" /**< id-at-dnQualifier AttributeType:= {id-at 46} */ -#define MBEDTLS_OID_AT_PSEUDONYM MBEDTLS_OID_AT "\x41" /**< id-at-pseudonym AttributeType:= {id-at 65} */ - -#define MBEDTLS_OID_DOMAIN_COMPONENT "\x09\x92\x26\x89\x93\xF2\x2C\x64\x01\x19" /** id-domainComponent AttributeType:= {itu-t(0) data(9) pss(2342) ucl(19200300) pilot(100) pilotAttributeType(1) domainComponent(25)} */ - -/* - * OIDs for standard certificate extensions - */ -#define MBEDTLS_OID_AUTHORITY_KEY_IDENTIFIER MBEDTLS_OID_ID_CE "\x23" /**< id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 } */ -#define MBEDTLS_OID_SUBJECT_KEY_IDENTIFIER MBEDTLS_OID_ID_CE "\x0E" /**< id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 14 } */ -#define MBEDTLS_OID_KEY_USAGE MBEDTLS_OID_ID_CE "\x0F" /**< id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 } */ -#define MBEDTLS_OID_CERTIFICATE_POLICIES MBEDTLS_OID_ID_CE "\x20" /**< id-ce-certificatePolicies OBJECT IDENTIFIER ::= { id-ce 32 } */ -#define MBEDTLS_OID_POLICY_MAPPINGS MBEDTLS_OID_ID_CE "\x21" /**< id-ce-policyMappings OBJECT IDENTIFIER ::= { id-ce 33 } */ -#define MBEDTLS_OID_SUBJECT_ALT_NAME MBEDTLS_OID_ID_CE "\x11" /**< id-ce-subjectAltName OBJECT IDENTIFIER ::= { id-ce 17 } */ -#define MBEDTLS_OID_ISSUER_ALT_NAME MBEDTLS_OID_ID_CE "\x12" /**< id-ce-issuerAltName OBJECT IDENTIFIER ::= { id-ce 18 } */ -#define MBEDTLS_OID_SUBJECT_DIRECTORY_ATTRS MBEDTLS_OID_ID_CE "\x09" /**< id-ce-subjectDirectoryAttributes OBJECT IDENTIFIER ::= { id-ce 9 } */ -#define MBEDTLS_OID_BASIC_CONSTRAINTS MBEDTLS_OID_ID_CE "\x13" /**< id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 } */ -#define MBEDTLS_OID_NAME_CONSTRAINTS MBEDTLS_OID_ID_CE "\x1E" /**< id-ce-nameConstraints OBJECT IDENTIFIER ::= { id-ce 30 } */ -#define MBEDTLS_OID_POLICY_CONSTRAINTS MBEDTLS_OID_ID_CE "\x24" /**< id-ce-policyConstraints OBJECT IDENTIFIER ::= { id-ce 36 } */ -#define MBEDTLS_OID_EXTENDED_KEY_USAGE MBEDTLS_OID_ID_CE "\x25" /**< id-ce-extKeyUsage OBJECT IDENTIFIER ::= { id-ce 37 } */ -#define MBEDTLS_OID_CRL_DISTRIBUTION_POINTS MBEDTLS_OID_ID_CE "\x1F" /**< id-ce-cRLDistributionPoints OBJECT IDENTIFIER ::= { id-ce 31 } */ -#define MBEDTLS_OID_INIHIBIT_ANYPOLICY MBEDTLS_OID_ID_CE "\x36" /**< id-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::= { id-ce 54 } */ -#define MBEDTLS_OID_FRESHEST_CRL MBEDTLS_OID_ID_CE "\x2E" /**< id-ce-freshestCRL OBJECT IDENTIFIER ::= { id-ce 46 } */ - -/* - * Netscape certificate extensions - */ -#define MBEDTLS_OID_NS_CERT MBEDTLS_OID_NETSCAPE "\x01" -#define MBEDTLS_OID_NS_CERT_TYPE MBEDTLS_OID_NS_CERT "\x01" -#define MBEDTLS_OID_NS_BASE_URL MBEDTLS_OID_NS_CERT "\x02" -#define MBEDTLS_OID_NS_REVOCATION_URL MBEDTLS_OID_NS_CERT "\x03" -#define MBEDTLS_OID_NS_CA_REVOCATION_URL MBEDTLS_OID_NS_CERT "\x04" -#define MBEDTLS_OID_NS_RENEWAL_URL MBEDTLS_OID_NS_CERT "\x07" -#define MBEDTLS_OID_NS_CA_POLICY_URL MBEDTLS_OID_NS_CERT "\x08" -#define MBEDTLS_OID_NS_SSL_SERVER_NAME MBEDTLS_OID_NS_CERT "\x0C" -#define MBEDTLS_OID_NS_COMMENT MBEDTLS_OID_NS_CERT "\x0D" -#define MBEDTLS_OID_NS_DATA_TYPE MBEDTLS_OID_NETSCAPE "\x02" -#define MBEDTLS_OID_NS_CERT_SEQUENCE MBEDTLS_OID_NS_DATA_TYPE "\x05" - -/* - * OIDs for CRL extensions - */ -#define MBEDTLS_OID_PRIVATE_KEY_USAGE_PERIOD MBEDTLS_OID_ID_CE "\x10" -#define MBEDTLS_OID_CRL_NUMBER MBEDTLS_OID_ID_CE "\x14" /**< id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 } */ - -/* - * X.509 v3 Extended key usage OIDs - */ -#define MBEDTLS_OID_ANY_EXTENDED_KEY_USAGE MBEDTLS_OID_EXTENDED_KEY_USAGE "\x00" /**< anyExtendedKeyUsage OBJECT IDENTIFIER ::= { id-ce-extKeyUsage 0 } */ - -#define MBEDTLS_OID_KP MBEDTLS_OID_PKIX "\x03" /**< id-kp OBJECT IDENTIFIER ::= { id-pkix 3 } */ -#define MBEDTLS_OID_SERVER_AUTH MBEDTLS_OID_KP "\x01" /**< id-kp-serverAuth OBJECT IDENTIFIER ::= { id-kp 1 } */ -#define MBEDTLS_OID_CLIENT_AUTH MBEDTLS_OID_KP "\x02" /**< id-kp-clientAuth OBJECT IDENTIFIER ::= { id-kp 2 } */ -#define MBEDTLS_OID_CODE_SIGNING MBEDTLS_OID_KP "\x03" /**< id-kp-codeSigning OBJECT IDENTIFIER ::= { id-kp 3 } */ -#define MBEDTLS_OID_EMAIL_PROTECTION MBEDTLS_OID_KP "\x04" /**< id-kp-emailProtection OBJECT IDENTIFIER ::= { id-kp 4 } */ -#define MBEDTLS_OID_TIME_STAMPING MBEDTLS_OID_KP "\x08" /**< id-kp-timeStamping OBJECT IDENTIFIER ::= { id-kp 8 } */ -#define MBEDTLS_OID_OCSP_SIGNING MBEDTLS_OID_KP "\x09" /**< id-kp-OCSPSigning OBJECT IDENTIFIER ::= { id-kp 9 } */ - -/* - * PKCS definition OIDs - */ - -#define MBEDTLS_OID_PKCS MBEDTLS_OID_RSA_COMPANY "\x01" /**< pkcs OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) 1 } */ -#define MBEDTLS_OID_PKCS1 MBEDTLS_OID_PKCS "\x01" /**< pkcs-1 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 } */ -#define MBEDTLS_OID_PKCS5 MBEDTLS_OID_PKCS "\x05" /**< pkcs-5 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 } */ -#define MBEDTLS_OID_PKCS9 MBEDTLS_OID_PKCS "\x09" /**< pkcs-9 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 } */ -#define MBEDTLS_OID_PKCS12 MBEDTLS_OID_PKCS "\x0c" /**< pkcs-12 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 12 } */ - -/* - * PKCS#1 OIDs - */ -#define MBEDTLS_OID_PKCS1_RSA MBEDTLS_OID_PKCS1 "\x01" /**< rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } */ -#define MBEDTLS_OID_PKCS1_MD2 MBEDTLS_OID_PKCS1 "\x02" /**< md2WithRSAEncryption ::= { pkcs-1 2 } */ -#define MBEDTLS_OID_PKCS1_MD4 MBEDTLS_OID_PKCS1 "\x03" /**< md4WithRSAEncryption ::= { pkcs-1 3 } */ -#define MBEDTLS_OID_PKCS1_MD5 MBEDTLS_OID_PKCS1 "\x04" /**< md5WithRSAEncryption ::= { pkcs-1 4 } */ -#define MBEDTLS_OID_PKCS1_SHA1 MBEDTLS_OID_PKCS1 "\x05" /**< sha1WithRSAEncryption ::= { pkcs-1 5 } */ -#define MBEDTLS_OID_PKCS1_SHA224 MBEDTLS_OID_PKCS1 "\x0e" /**< sha224WithRSAEncryption ::= { pkcs-1 14 } */ -#define MBEDTLS_OID_PKCS1_SHA256 MBEDTLS_OID_PKCS1 "\x0b" /**< sha256WithRSAEncryption ::= { pkcs-1 11 } */ -#define MBEDTLS_OID_PKCS1_SHA384 MBEDTLS_OID_PKCS1 "\x0c" /**< sha384WithRSAEncryption ::= { pkcs-1 12 } */ -#define MBEDTLS_OID_PKCS1_SHA512 MBEDTLS_OID_PKCS1 "\x0d" /**< sha512WithRSAEncryption ::= { pkcs-1 13 } */ - -#define MBEDTLS_OID_RSA_SHA_OBS "\x2B\x0E\x03\x02\x1D" - -#define MBEDTLS_OID_PKCS9_EMAIL MBEDTLS_OID_PKCS9 "\x01" /**< emailAddress AttributeType ::= { pkcs-9 1 } */ - -/* RFC 4055 */ -#define MBEDTLS_OID_RSASSA_PSS MBEDTLS_OID_PKCS1 "\x0a" /**< id-RSASSA-PSS ::= { pkcs-1 10 } */ -#define MBEDTLS_OID_MGF1 MBEDTLS_OID_PKCS1 "\x08" /**< id-mgf1 ::= { pkcs-1 8 } */ - -/* - * Digest algorithms - */ -#define MBEDTLS_OID_DIGEST_ALG_MD2 MBEDTLS_OID_RSA_COMPANY "\x02\x02" /**< id-mbedtls_md2 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } */ -#define MBEDTLS_OID_DIGEST_ALG_MD4 MBEDTLS_OID_RSA_COMPANY "\x02\x04" /**< id-mbedtls_md4 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 4 } */ -#define MBEDTLS_OID_DIGEST_ALG_MD5 MBEDTLS_OID_RSA_COMPANY "\x02\x05" /**< id-mbedtls_md5 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } */ -#define MBEDTLS_OID_DIGEST_ALG_SHA1 MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_OIW_SECSIG_SHA1 /**< id-mbedtls_sha1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 26 } */ -#define MBEDTLS_OID_DIGEST_ALG_SHA224 MBEDTLS_OID_GOV "\x03\x04\x02\x04" /**< id-sha224 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 4 } */ -#define MBEDTLS_OID_DIGEST_ALG_SHA256 MBEDTLS_OID_GOV "\x03\x04\x02\x01" /**< id-mbedtls_sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 1 } */ - -#define MBEDTLS_OID_DIGEST_ALG_SHA384 MBEDTLS_OID_GOV "\x03\x04\x02\x02" /**< id-sha384 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 2 } */ - -#define MBEDTLS_OID_DIGEST_ALG_SHA512 MBEDTLS_OID_GOV "\x03\x04\x02\x03" /**< id-mbedtls_sha512 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) nistalgorithm(4) hashalgs(2) 3 } */ - -#define MBEDTLS_OID_HMAC_SHA1 MBEDTLS_OID_RSA_COMPANY "\x02\x07" /**< id-hmacWithSHA1 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 7 } */ - -/* - * Encryption algorithms - */ -#define MBEDTLS_OID_DES_CBC MBEDTLS_OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_OIW_SECSIG_ALG "\x07" /**< desCBC OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 7 } */ -#define MBEDTLS_OID_DES_EDE3_CBC MBEDTLS_OID_RSA_COMPANY "\x03\x07" /**< des-ede3-cbc OBJECT IDENTIFIER ::= { iso(1) member-body(2) -- us(840) rsadsi(113549) encryptionAlgorithm(3) 7 } */ - -/* - * PKCS#5 OIDs - */ -#define MBEDTLS_OID_PKCS5_PBKDF2 MBEDTLS_OID_PKCS5 "\x0c" /**< id-PBKDF2 OBJECT IDENTIFIER ::= {pkcs-5 12} */ -#define MBEDTLS_OID_PKCS5_PBES2 MBEDTLS_OID_PKCS5 "\x0d" /**< id-PBES2 OBJECT IDENTIFIER ::= {pkcs-5 13} */ -#define MBEDTLS_OID_PKCS5_PBMAC1 MBEDTLS_OID_PKCS5 "\x0e" /**< id-PBMAC1 OBJECT IDENTIFIER ::= {pkcs-5 14} */ - -/* - * PKCS#5 PBES1 algorithms - */ -#define MBEDTLS_OID_PKCS5_PBE_MD2_DES_CBC MBEDTLS_OID_PKCS5 "\x01" /**< pbeWithMD2AndDES-CBC OBJECT IDENTIFIER ::= {pkcs-5 1} */ -#define MBEDTLS_OID_PKCS5_PBE_MD2_RC2_CBC MBEDTLS_OID_PKCS5 "\x04" /**< pbeWithMD2AndRC2-CBC OBJECT IDENTIFIER ::= {pkcs-5 4} */ -#define MBEDTLS_OID_PKCS5_PBE_MD5_DES_CBC MBEDTLS_OID_PKCS5 "\x03" /**< pbeWithMD5AndDES-CBC OBJECT IDENTIFIER ::= {pkcs-5 3} */ -#define MBEDTLS_OID_PKCS5_PBE_MD5_RC2_CBC MBEDTLS_OID_PKCS5 "\x06" /**< pbeWithMD5AndRC2-CBC OBJECT IDENTIFIER ::= {pkcs-5 6} */ -#define MBEDTLS_OID_PKCS5_PBE_SHA1_DES_CBC MBEDTLS_OID_PKCS5 "\x0a" /**< pbeWithSHA1AndDES-CBC OBJECT IDENTIFIER ::= {pkcs-5 10} */ -#define MBEDTLS_OID_PKCS5_PBE_SHA1_RC2_CBC MBEDTLS_OID_PKCS5 "\x0b" /**< pbeWithSHA1AndRC2-CBC OBJECT IDENTIFIER ::= {pkcs-5 11} */ - -/* - * PKCS#8 OIDs - */ -#define MBEDTLS_OID_PKCS9_CSR_EXT_REQ MBEDTLS_OID_PKCS9 "\x0e" /**< extensionRequest OBJECT IDENTIFIER ::= {pkcs-9 14} */ - -/* - * PKCS#12 PBE OIDs - */ -#define MBEDTLS_OID_PKCS12_PBE MBEDTLS_OID_PKCS12 "\x01" /**< pkcs-12PbeIds OBJECT IDENTIFIER ::= {pkcs-12 1} */ - -#define MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_128 MBEDTLS_OID_PKCS12_PBE "\x01" /**< pbeWithSHAAnd128BitRC4 OBJECT IDENTIFIER ::= {pkcs-12PbeIds 1} */ -#define MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_40 MBEDTLS_OID_PKCS12_PBE "\x02" /**< pbeWithSHAAnd40BitRC4 OBJECT IDENTIFIER ::= {pkcs-12PbeIds 2} */ -#define MBEDTLS_OID_PKCS12_PBE_SHA1_DES3_EDE_CBC MBEDTLS_OID_PKCS12_PBE "\x03" /**< pbeWithSHAAnd3-KeyTripleDES-CBC OBJECT IDENTIFIER ::= {pkcs-12PbeIds 3} */ -#define MBEDTLS_OID_PKCS12_PBE_SHA1_DES2_EDE_CBC MBEDTLS_OID_PKCS12_PBE "\x04" /**< pbeWithSHAAnd2-KeyTripleDES-CBC OBJECT IDENTIFIER ::= {pkcs-12PbeIds 4} */ -#define MBEDTLS_OID_PKCS12_PBE_SHA1_RC2_128_CBC MBEDTLS_OID_PKCS12_PBE "\x05" /**< pbeWithSHAAnd128BitRC2-CBC OBJECT IDENTIFIER ::= {pkcs-12PbeIds 5} */ -#define MBEDTLS_OID_PKCS12_PBE_SHA1_RC2_40_CBC MBEDTLS_OID_PKCS12_PBE "\x06" /**< pbeWithSHAAnd40BitRC2-CBC OBJECT IDENTIFIER ::= {pkcs-12PbeIds 6} */ - -/* - * EC key algorithms from RFC 5480 - */ - -/* id-ecPublicKey OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 } */ -#define MBEDTLS_OID_EC_ALG_UNRESTRICTED MBEDTLS_OID_ANSI_X9_62 "\x02\01" - -/* id-ecDH OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) - * schemes(1) ecdh(12) } */ -#define MBEDTLS_OID_EC_ALG_ECDH MBEDTLS_OID_CERTICOM "\x01\x0c" - -/* - * ECParameters namedCurve identifiers, from RFC 5480, RFC 5639, and SEC2 - */ - -/* secp192r1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3) prime(1) 1 } */ -#define MBEDTLS_OID_EC_GRP_SECP192R1 MBEDTLS_OID_ANSI_X9_62 "\x03\x01\x01" - -/* secp224r1 OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) curve(0) 33 } */ -#define MBEDTLS_OID_EC_GRP_SECP224R1 MBEDTLS_OID_CERTICOM "\x00\x21" - -/* secp256r1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3) prime(1) 7 } */ -#define MBEDTLS_OID_EC_GRP_SECP256R1 MBEDTLS_OID_ANSI_X9_62 "\x03\x01\x07" - -/* secp384r1 OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) curve(0) 34 } */ -#define MBEDTLS_OID_EC_GRP_SECP384R1 MBEDTLS_OID_CERTICOM "\x00\x22" - -/* secp521r1 OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) curve(0) 35 } */ -#define MBEDTLS_OID_EC_GRP_SECP521R1 MBEDTLS_OID_CERTICOM "\x00\x23" - -/* secp192k1 OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) curve(0) 31 } */ -#define MBEDTLS_OID_EC_GRP_SECP192K1 MBEDTLS_OID_CERTICOM "\x00\x1f" - -/* secp224k1 OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) curve(0) 32 } */ -#define MBEDTLS_OID_EC_GRP_SECP224K1 MBEDTLS_OID_CERTICOM "\x00\x20" - -/* secp256k1 OBJECT IDENTIFIER ::= { - * iso(1) identified-organization(3) certicom(132) curve(0) 10 } */ -#define MBEDTLS_OID_EC_GRP_SECP256K1 MBEDTLS_OID_CERTICOM "\x00\x0a" - -/* RFC 5639 4.1 - * ecStdCurvesAndGeneration OBJECT IDENTIFIER::= {iso(1) - * identified-organization(3) teletrust(36) algorithm(3) signature- - * algorithm(3) ecSign(2) 8} - * ellipticCurve OBJECT IDENTIFIER ::= {ecStdCurvesAndGeneration 1} - * versionOne OBJECT IDENTIFIER ::= {ellipticCurve 1} */ -#define MBEDTLS_OID_EC_BRAINPOOL_V1 MBEDTLS_OID_TELETRUST "\x03\x03\x02\x08\x01\x01" - -/* brainpoolP256r1 OBJECT IDENTIFIER ::= {versionOne 7} */ -#define MBEDTLS_OID_EC_GRP_BP256R1 MBEDTLS_OID_EC_BRAINPOOL_V1 "\x07" - -/* brainpoolP384r1 OBJECT IDENTIFIER ::= {versionOne 11} */ -#define MBEDTLS_OID_EC_GRP_BP384R1 MBEDTLS_OID_EC_BRAINPOOL_V1 "\x0B" - -/* brainpoolP512r1 OBJECT IDENTIFIER ::= {versionOne 13} */ -#define MBEDTLS_OID_EC_GRP_BP512R1 MBEDTLS_OID_EC_BRAINPOOL_V1 "\x0D" - -/* - * SEC1 C.1 - * - * prime-field OBJECT IDENTIFIER ::= { id-fieldType 1 } - * id-fieldType OBJECT IDENTIFIER ::= { ansi-X9-62 fieldType(1)} - */ -#define MBEDTLS_OID_ANSI_X9_62_FIELD_TYPE MBEDTLS_OID_ANSI_X9_62 "\x01" -#define MBEDTLS_OID_ANSI_X9_62_PRIME_FIELD MBEDTLS_OID_ANSI_X9_62_FIELD_TYPE "\x01" - -/* - * ECDSA signature identifiers, from RFC 5480 - */ -#define MBEDTLS_OID_ANSI_X9_62_SIG MBEDTLS_OID_ANSI_X9_62 "\x04" /* signatures(4) */ -#define MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 MBEDTLS_OID_ANSI_X9_62_SIG "\x03" /* ecdsa-with-SHA2(3) */ - -/* ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) 1 } */ -#define MBEDTLS_OID_ECDSA_SHA1 MBEDTLS_OID_ANSI_X9_62_SIG "\x01" - -/* ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) - * ecdsa-with-SHA2(3) 1 } */ -#define MBEDTLS_OID_ECDSA_SHA224 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 "\x01" - -/* ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) - * ecdsa-with-SHA2(3) 2 } */ -#define MBEDTLS_OID_ECDSA_SHA256 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 "\x02" - -/* ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) - * ecdsa-with-SHA2(3) 3 } */ -#define MBEDTLS_OID_ECDSA_SHA384 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 "\x03" - -/* ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { - * iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) - * ecdsa-with-SHA2(3) 4 } */ -#define MBEDTLS_OID_ECDSA_SHA512 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 "\x04" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Base OID descriptor structure - */ -typedef struct { - const char *asn1; /*!< OID ASN.1 representation */ - size_t asn1_len; /*!< length of asn1 */ - const char *name; /*!< official name (e.g. from RFC) */ - const char *description; /*!< human friendly description */ -} mbedtls_oid_descriptor_t; - -/** - * \brief Translate an ASN.1 OID into its numeric representation - * (e.g. "\x2A\x86\x48\x86\xF7\x0D" into "1.2.840.113549") - * - * \param buf buffer to put representation in - * \param size size of the buffer - * \param oid OID to translate - * - * \return Length of the string written (excluding final NULL) or - * MBEDTLS_ERR_OID_BUF_TOO_SMALL in case of error - */ -int mbedtls_oid_get_numeric_string( char *buf, size_t size, const mbedtls_asn1_buf *oid ); - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -/** - * \brief Translate an X.509 extension OID into local values - * - * \param oid OID to use - * \param ext_type place to store the extension type - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_x509_ext_type( const mbedtls_asn1_buf *oid, int *ext_type ); -#endif - -/** - * \brief Translate an X.509 attribute type OID into the short name - * (e.g. the OID for an X520 Common Name into "CN") - * - * \param oid OID to use - * \param short_name place to store the string pointer - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_attr_short_name( const mbedtls_asn1_buf *oid, const char **short_name ); - -/** - * \brief Translate PublicKeyAlgorithm OID into pk_type - * - * \param oid OID to use - * \param pk_alg place to store public key algorithm - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_pk_alg( const mbedtls_asn1_buf *oid, mbedtls_pk_type_t *pk_alg ); - -/** - * \brief Translate pk_type into PublicKeyAlgorithm OID - * - * \param pk_alg Public key type to look for - * \param oid place to store ASN.1 OID string pointer - * \param olen length of the OID - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_oid_by_pk_alg( mbedtls_pk_type_t pk_alg, - const char **oid, size_t *olen ); - -#if defined(MBEDTLS_ECP_C) -/** - * \brief Translate NamedCurve OID into an EC group identifier - * - * \param oid OID to use - * \param grp_id place to store group id - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_ec_grp( const mbedtls_asn1_buf *oid, mbedtls_ecp_group_id *grp_id ); - -/** - * \brief Translate EC group identifier into NamedCurve OID - * - * \param grp_id EC group identifier - * \param oid place to store ASN.1 OID string pointer - * \param olen length of the OID - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_oid_by_ec_grp( mbedtls_ecp_group_id grp_id, - const char **oid, size_t *olen ); -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_MD_C) -/** - * \brief Translate SignatureAlgorithm OID into md_type and pk_type - * - * \param oid OID to use - * \param md_alg place to store message digest algorithm - * \param pk_alg place to store public key algorithm - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_sig_alg( const mbedtls_asn1_buf *oid, - mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg ); - -/** - * \brief Translate SignatureAlgorithm OID into description - * - * \param oid OID to use - * \param desc place to store string pointer - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_sig_alg_desc( const mbedtls_asn1_buf *oid, const char **desc ); - -/** - * \brief Translate md_type and pk_type into SignatureAlgorithm OID - * - * \param md_alg message digest algorithm - * \param pk_alg public key algorithm - * \param oid place to store ASN.1 OID string pointer - * \param olen length of the OID - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_oid_by_sig_alg( mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, - const char **oid, size_t *olen ); - -/** - * \brief Translate hash algorithm OID into md_type - * - * \param oid OID to use - * \param md_alg place to store message digest algorithm - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_md_alg( const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg ); -#endif /* MBEDTLS_MD_C */ - -/** - * \brief Translate Extended Key Usage OID into description - * - * \param oid OID to use - * \param desc place to store string pointer - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_extended_key_usage( const mbedtls_asn1_buf *oid, const char **desc ); - -/** - * \brief Translate md_type into hash algorithm OID - * - * \param md_alg message digest algorithm - * \param oid place to store ASN.1 OID string pointer - * \param olen length of the OID - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_oid_by_md( mbedtls_md_type_t md_alg, const char **oid, size_t *olen ); - -#if defined(MBEDTLS_CIPHER_C) -/** - * \brief Translate encryption algorithm OID into cipher_type - * - * \param oid OID to use - * \param cipher_alg place to store cipher algorithm - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_cipher_alg( const mbedtls_asn1_buf *oid, mbedtls_cipher_type_t *cipher_alg ); -#endif /* MBEDTLS_CIPHER_C */ - -#if defined(MBEDTLS_PKCS12_C) -/** - * \brief Translate PKCS#12 PBE algorithm OID into md_type and - * cipher_type - * - * \param oid OID to use - * \param md_alg place to store message digest algorithm - * \param cipher_alg place to store cipher algorithm - * - * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND - */ -int mbedtls_oid_get_pkcs12_pbe_alg( const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg, - mbedtls_cipher_type_t *cipher_alg ); -#endif /* MBEDTLS_PKCS12_C */ - -#ifdef __cplusplus -} -#endif - -#endif /* oid.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/padlock.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/padlock.h deleted file mode 100644 index 2045a5ab64..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/padlock.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * \file padlock.h - * - * \brief VIA PadLock ACE for HW encryption/decryption supported by some - * processors - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PADLOCK_H -#define MBEDTLS_PADLOCK_H - -#include "aes.h" - -#define MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED -0x0030 /**< Input data should be aligned. */ - -#if defined(__has_feature) -#if __has_feature(address_sanitizer) -#define MBEDTLS_HAVE_ASAN -#endif -#endif - -/* Some versions of ASan result in errors about not enough registers */ -#if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && defined(__i386__) && \ - !defined(MBEDTLS_HAVE_ASAN) - -#ifndef MBEDTLS_HAVE_X86 -#define MBEDTLS_HAVE_X86 -#endif - -#include - -#define MBEDTLS_PADLOCK_RNG 0x000C -#define MBEDTLS_PADLOCK_ACE 0x00C0 -#define MBEDTLS_PADLOCK_PHE 0x0C00 -#define MBEDTLS_PADLOCK_PMM 0x3000 - -#define MBEDTLS_PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15)) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief PadLock detection routine - * - * \param feature The feature to detect - * - * \return 1 if CPU has support for the feature, 0 otherwise - */ -int mbedtls_padlock_has_support( int feature ); - -/** - * \brief PadLock AES-ECB block en(de)cryption - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param input 16-byte input block - * \param output 16-byte output block - * - * \return 0 if success, 1 if operation failed - */ -int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ); - -/** - * \brief PadLock AES-CBC buffer en(de)cryption - * - * \param ctx AES context - * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT - * \param length length of the input data - * \param iv initialization vector (updated after use) - * \param input buffer holding the input data - * \param output buffer holding the output data - * - * \return 0 if success, 1 if operation failed - */ -int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ); - -#ifdef __cplusplus -} -#endif - -#endif /* HAVE_X86 */ - -#endif /* padlock.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pem.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/pem.h deleted file mode 100644 index 54dc02d7cd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pem.h +++ /dev/null @@ -1,129 +0,0 @@ -/** - * \file pem.h - * - * \brief Privacy Enhanced Mail (PEM) decoding - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PEM_H -#define MBEDTLS_PEM_H - -#include - -/** - * \name PEM Error codes - * These error codes are returned in case of errors reading the - * PEM data. - * \{ - */ -#define MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT -0x1080 /**< No PEM header or footer found. */ -#define MBEDTLS_ERR_PEM_INVALID_DATA -0x1100 /**< PEM string is not as expected. */ -#define MBEDTLS_ERR_PEM_ALLOC_FAILED -0x1180 /**< Failed to allocate memory. */ -#define MBEDTLS_ERR_PEM_INVALID_ENC_IV -0x1200 /**< RSA IV is not in hex-format. */ -#define MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG -0x1280 /**< Unsupported key encryption algorithm. */ -#define MBEDTLS_ERR_PEM_PASSWORD_REQUIRED -0x1300 /**< Private key password can't be empty. */ -#define MBEDTLS_ERR_PEM_PASSWORD_MISMATCH -0x1380 /**< Given private key password does not allow for correct decryption. */ -#define MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE -0x1400 /**< Unavailable feature, e.g. hashing/encryption combination. */ -#define MBEDTLS_ERR_PEM_BAD_INPUT_DATA -0x1480 /**< Bad input parameters to function. */ -/* \} name */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(MBEDTLS_PEM_PARSE_C) -/** - * \brief PEM context structure - */ -typedef struct -{ - unsigned char *buf; /*!< buffer for decoded data */ - size_t buflen; /*!< length of the buffer */ - unsigned char *info; /*!< buffer for extra header information */ -} -mbedtls_pem_context; - -/** - * \brief PEM context setup - * - * \param ctx context to be initialized - */ -void mbedtls_pem_init( mbedtls_pem_context *ctx ); - -/** - * \brief Read a buffer for PEM information and store the resulting - * data into the specified context buffers. - * - * \param ctx context to use - * \param header header string to seek and expect - * \param footer footer string to seek and expect - * \param data source data to look in (must be nul-terminated) - * \param pwd password for decryption (can be NULL) - * \param pwdlen length of password - * \param use_len destination for total length used (set after header is - * correctly read, so unless you get - * MBEDTLS_ERR_PEM_BAD_INPUT_DATA or - * MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT, use_len is - * the length to skip) - * - * \note Attempts to check password correctness by verifying if - * the decrypted text starts with an ASN.1 sequence of - * appropriate length - * - * \return 0 on success, or a specific PEM error code - */ -int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const char *footer, - const unsigned char *data, - const unsigned char *pwd, - size_t pwdlen, size_t *use_len ); - -/** - * \brief PEM context memory freeing - * - * \param ctx context to be freed - */ -void mbedtls_pem_free( mbedtls_pem_context *ctx ); -#endif /* MBEDTLS_PEM_PARSE_C */ - -#if defined(MBEDTLS_PEM_WRITE_C) -/** - * \brief Write a buffer of PEM information from a DER encoded - * buffer. - * - * \param header header string to write - * \param footer footer string to write - * \param der_data DER data to write - * \param der_len length of the DER data - * \param buf buffer to write to - * \param buf_len length of output buffer - * \param olen total length written / required (if buf_len is not enough) - * - * \return 0 on success, or a specific PEM or BASE64 error code. On - * MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL olen is the required - * size. - */ -int mbedtls_pem_write_buffer( const char *header, const char *footer, - const unsigned char *der_data, size_t der_len, - unsigned char *buf, size_t buf_len, size_t *olen ); -#endif /* MBEDTLS_PEM_WRITE_C */ - -#ifdef __cplusplus -} -#endif - -#endif /* pem.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pk.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/pk.h deleted file mode 100644 index 458bb512a9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pk.h +++ /dev/null @@ -1,615 +0,0 @@ -/** - * \file pk.h - * - * \brief Public Key abstraction layer - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#ifndef MBEDTLS_PK_H -#define MBEDTLS_PK_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "md.h" - -#if defined(MBEDTLS_RSA_C) -#include "rsa.h" -#endif - -#if defined(MBEDTLS_ECP_C) -#include "ecp.h" -#endif - -#if defined(MBEDTLS_ECDSA_C) -#include "ecdsa.h" -#endif - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -#define MBEDTLS_ERR_PK_ALLOC_FAILED -0x3F80 /**< Memory allocation failed. */ -#define MBEDTLS_ERR_PK_TYPE_MISMATCH -0x3F00 /**< Type mismatch, eg attempt to encrypt with an ECDSA key */ -#define MBEDTLS_ERR_PK_BAD_INPUT_DATA -0x3E80 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_PK_FILE_IO_ERROR -0x3E00 /**< Read/write of file failed. */ -#define MBEDTLS_ERR_PK_KEY_INVALID_VERSION -0x3D80 /**< Unsupported key version */ -#define MBEDTLS_ERR_PK_KEY_INVALID_FORMAT -0x3D00 /**< Invalid key tag or value. */ -#define MBEDTLS_ERR_PK_UNKNOWN_PK_ALG -0x3C80 /**< Key algorithm is unsupported (only RSA and EC are supported). */ -#define MBEDTLS_ERR_PK_PASSWORD_REQUIRED -0x3C00 /**< Private key password can't be empty. */ -#define MBEDTLS_ERR_PK_PASSWORD_MISMATCH -0x3B80 /**< Given private key password does not allow for correct decryption. */ -#define MBEDTLS_ERR_PK_INVALID_PUBKEY -0x3B00 /**< The pubkey tag or value is invalid (only RSA and EC are supported). */ -#define MBEDTLS_ERR_PK_INVALID_ALG -0x3A80 /**< The algorithm tag or value is invalid. */ -#define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -0x3A00 /**< Elliptic curve is unsupported (only NIST curves are supported). */ -#define MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -0x3980 /**< Unavailable feature, e.g. RSA disabled for RSA key. */ -#define MBEDTLS_ERR_PK_SIG_LEN_MISMATCH -0x3900 /**< The signature is valid but its length is less than expected. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Public key types - */ -typedef enum { - MBEDTLS_PK_NONE=0, - MBEDTLS_PK_RSA, - MBEDTLS_PK_ECKEY, - MBEDTLS_PK_ECKEY_DH, - MBEDTLS_PK_ECDSA, - MBEDTLS_PK_RSA_ALT, - MBEDTLS_PK_RSASSA_PSS, -} mbedtls_pk_type_t; - -/** - * \brief Options for RSASSA-PSS signature verification. - * See \c mbedtls_rsa_rsassa_pss_verify_ext() - */ -typedef struct -{ - mbedtls_md_type_t mgf1_hash_id; - int expected_salt_len; - -} mbedtls_pk_rsassa_pss_options; - -/** - * \brief Types for interfacing with the debug module - */ -typedef enum -{ - MBEDTLS_PK_DEBUG_NONE = 0, - MBEDTLS_PK_DEBUG_MPI, - MBEDTLS_PK_DEBUG_ECP, -} mbedtls_pk_debug_type; - -/** - * \brief Item to send to the debug module - */ -typedef struct -{ - mbedtls_pk_debug_type type; - const char *name; - void *value; -} mbedtls_pk_debug_item; - -/** Maximum number of item send for debugging, plus 1 */ -#define MBEDTLS_PK_DEBUG_MAX_ITEMS 3 - -/** - * \brief Public key information and operations - */ -typedef struct mbedtls_pk_info_t mbedtls_pk_info_t; - -/** - * \brief Public key container - */ -typedef struct -{ - const mbedtls_pk_info_t * pk_info; /**< Public key informations */ - void * pk_ctx; /**< Underlying public key context */ -} mbedtls_pk_context; - -#if defined(MBEDTLS_RSA_C) -/** - * Quick access to an RSA context inside a PK context. - * - * \warning You must make sure the PK context actually holds an RSA context - * before using this function! - */ -static inline mbedtls_rsa_context *mbedtls_pk_rsa( const mbedtls_pk_context pk ) -{ - return( (mbedtls_rsa_context *) (pk).pk_ctx ); -} -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) -/** - * Quick access to an EC context inside a PK context. - * - * \warning You must make sure the PK context actually holds an EC context - * before using this function! - */ -static inline mbedtls_ecp_keypair *mbedtls_pk_ec( const mbedtls_pk_context pk ) -{ - return( (mbedtls_ecp_keypair *) (pk).pk_ctx ); -} -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -/** - * \brief Types for RSA-alt abstraction - */ -typedef int (*mbedtls_pk_rsa_alt_decrypt_func)( void *ctx, int mode, size_t *olen, - const unsigned char *input, unsigned char *output, - size_t output_max_len ); -typedef int (*mbedtls_pk_rsa_alt_sign_func)( void *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, - int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, - const unsigned char *hash, unsigned char *sig ); -typedef size_t (*mbedtls_pk_rsa_alt_key_len_func)( void *ctx ); -#endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ - -/** - * \brief Return information associated with the given PK type - * - * \param pk_type PK type to search for. - * - * \return The PK info associated with the type or NULL if not found. - */ -const mbedtls_pk_info_t *mbedtls_pk_info_from_type( mbedtls_pk_type_t pk_type ); - -/** - * \brief Initialize a mbedtls_pk_context (as NONE) - */ -void mbedtls_pk_init( mbedtls_pk_context *ctx ); - -/** - * \brief Free a mbedtls_pk_context - */ -void mbedtls_pk_free( mbedtls_pk_context *ctx ); - -/** - * \brief Initialize a PK context with the information given - * and allocates the type-specific PK subcontext. - * - * \param ctx Context to initialize. Must be empty (type NONE). - * \param info Information to use - * - * \return 0 on success, - * MBEDTLS_ERR_PK_BAD_INPUT_DATA on invalid input, - * MBEDTLS_ERR_PK_ALLOC_FAILED on allocation failure. - * - * \note For contexts holding an RSA-alt key, use - * \c mbedtls_pk_setup_rsa_alt() instead. - */ -int mbedtls_pk_setup( mbedtls_pk_context *ctx, const mbedtls_pk_info_t *info ); - -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -/** - * \brief Initialize an RSA-alt context - * - * \param ctx Context to initialize. Must be empty (type NONE). - * \param key RSA key pointer - * \param decrypt_func Decryption function - * \param sign_func Signing function - * \param key_len_func Function returning key length in bytes - * - * \return 0 on success, or MBEDTLS_ERR_PK_BAD_INPUT_DATA if the - * context wasn't already initialized as RSA_ALT. - * - * \note This function replaces \c mbedtls_pk_setup() for RSA-alt. - */ -int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key, - mbedtls_pk_rsa_alt_decrypt_func decrypt_func, - mbedtls_pk_rsa_alt_sign_func sign_func, - mbedtls_pk_rsa_alt_key_len_func key_len_func ); -#endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ - -/** - * \brief Get the size in bits of the underlying key - * - * \param ctx Context to use - * - * \return Key size in bits, or 0 on error - */ -size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx ); - -/** - * \brief Get the length in bytes of the underlying key - * \param ctx Context to use - * - * \return Key length in bytes, or 0 on error - */ -static inline size_t mbedtls_pk_get_len( const mbedtls_pk_context *ctx ) -{ - return( ( mbedtls_pk_get_bitlen( ctx ) + 7 ) / 8 ); -} - -/** - * \brief Tell if a context can do the operation given by type - * - * \param ctx Context to test - * \param type Target type - * - * \return 0 if context can't do the operations, - * 1 otherwise. - */ -int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type ); - -/** - * \brief Verify signature (including padding if relevant). - * - * \param ctx PK context to use - * \param md_alg Hash algorithm used (see notes) - * \param hash Hash of the message to sign - * \param hash_len Hash length or 0 (see notes) - * \param sig Signature to verify - * \param sig_len Signature length - * - * \return 0 on success (signature is valid), - * MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if the signature is - * valid but its actual length is less than sig_len, - * or a specific error code. - * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * Use \c mbedtls_pk_verify_ext( MBEDTLS_PK_RSASSA_PSS, ... ) - * to verify RSASSA_PSS signatures. - * - * \note If hash_len is 0, then the length associated with md_alg - * is used instead, or an error returned if it is invalid. - * - * \note md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0 - */ -int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ); - -/** - * \brief Verify signature, with options. - * (Includes verification of the padding depending on type.) - * - * \param type Signature type (inc. possible padding type) to verify - * \param options Pointer to type-specific options, or NULL - * \param ctx PK context to use - * \param md_alg Hash algorithm used (see notes) - * \param hash Hash of the message to sign - * \param hash_len Hash length or 0 (see notes) - * \param sig Signature to verify - * \param sig_len Signature length - * - * \return 0 on success (signature is valid), - * MBEDTLS_ERR_PK_TYPE_MISMATCH if the PK context can't be - * used for this type of signatures, - * MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if the signature is - * valid but its actual length is less than sig_len, - * or a specific error code. - * - * \note If hash_len is 0, then the length associated with md_alg - * is used instead, or an error returned if it is invalid. - * - * \note md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0 - * - * \note If type is MBEDTLS_PK_RSASSA_PSS, then options must point - * to a mbedtls_pk_rsassa_pss_options structure, - * otherwise it must be NULL. - */ -int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options, - mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ); - -/** - * \brief Make signature, including padding if relevant. - * - * \param ctx PK context to use - must hold a private key - * \param md_alg Hash algorithm used (see notes) - * \param hash Hash of the message to sign - * \param hash_len Hash length or 0 (see notes) - * \param sig Place to write the signature - * \param sig_len Number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 on success, or a specific error code. - * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * There is no interface in the PK module to make RSASSA-PSS - * signatures yet. - * - * \note If hash_len is 0, then the length associated with md_alg - * is used instead, or an error returned if it is invalid. - * - * \note For RSA, md_alg may be MBEDTLS_MD_NONE if hash_len != 0. - * For ECDSA, md_alg may never be MBEDTLS_MD_NONE. - */ -int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -/** - * \brief Decrypt message (including padding if relevant). - * - * \param ctx PK context to use - must hold a private key - * \param input Input to decrypt - * \param ilen Input size - * \param output Decrypted output - * \param olen Decrypted message length - * \param osize Size of the output buffer - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * - * \return 0 on success, or a specific error code. - */ -int mbedtls_pk_decrypt( mbedtls_pk_context *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -/** - * \brief Encrypt message (including padding if relevant). - * - * \param ctx PK context to use - * \param input Message to encrypt - * \param ilen Message size - * \param output Encrypted output - * \param olen Encrypted output length - * \param osize Size of the output buffer - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \note For RSA keys, the default padding type is PKCS#1 v1.5. - * - * \return 0 on success, or a specific error code. - */ -int mbedtls_pk_encrypt( mbedtls_pk_context *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -/** - * \brief Check if a public-private pair of keys matches. - * - * \param pub Context holding a public key. - * \param prv Context holding a private (and public) key. - * - * \return 0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA - */ -int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_context *prv ); - -/** - * \brief Export debug information - * - * \param ctx Context to use - * \param items Place to write debug items - * - * \return 0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA - */ -int mbedtls_pk_debug( const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *items ); - -/** - * \brief Access the type name - * - * \param ctx Context to use - * - * \return Type name on success, or "invalid PK" - */ -const char * mbedtls_pk_get_name( const mbedtls_pk_context *ctx ); - -/** - * \brief Get the key type - * - * \param ctx Context to use - * - * \return Type on success, or MBEDTLS_PK_NONE - */ -mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx ); - -#if defined(MBEDTLS_PK_PARSE_C) -/** \ingroup pk_module */ -/** - * \brief Parse a private key in PEM or DER format - * - * \param ctx key to be initialized - * \param key input buffer - * \param keylen size of the buffer - * (including the terminating null byte for PEM data) - * \param pwd password for decryption (optional) - * \param pwdlen size of the password - * - * \note On entry, ctx must be empty, either freshly initialised - * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a - * specific key type, check the result with mbedtls_pk_can_do(). - * - * \note The key is also checked for correctness. - * - * \return 0 if successful, or a specific PK or PEM error code - */ -int mbedtls_pk_parse_key( mbedtls_pk_context *ctx, - const unsigned char *key, size_t keylen, - const unsigned char *pwd, size_t pwdlen ); - -/** \ingroup pk_module */ -/** - * \brief Parse a public key in PEM or DER format - * - * \param ctx key to be initialized - * \param key input buffer - * \param keylen size of the buffer - * (including the terminating null byte for PEM data) - * - * \note On entry, ctx must be empty, either freshly initialised - * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a - * specific key type, check the result with mbedtls_pk_can_do(). - * - * \note The key is also checked for correctness. - * - * \return 0 if successful, or a specific PK or PEM error code - */ -int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx, - const unsigned char *key, size_t keylen ); - -#if defined(MBEDTLS_FS_IO) -/** \ingroup pk_module */ -/** - * \brief Load and parse a private key - * - * \param ctx key to be initialized - * \param path filename to read the private key from - * \param password password to decrypt the file (can be NULL) - * - * \note On entry, ctx must be empty, either freshly initialised - * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a - * specific key type, check the result with mbedtls_pk_can_do(). - * - * \note The key is also checked for correctness. - * - * \return 0 if successful, or a specific PK or PEM error code - */ -int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx, - const char *path, const char *password ); - -/** \ingroup pk_module */ -/** - * \brief Load and parse a public key - * - * \param ctx key to be initialized - * \param path filename to read the private key from - * - * \note On entry, ctx must be empty, either freshly initialised - * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a - * specific key type, check the result with mbedtls_pk_can_do(). - * - * \note The key is also checked for correctness. - * - * \return 0 if successful, or a specific PK or PEM error code - */ -int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path ); -#endif /* MBEDTLS_FS_IO */ -#endif /* MBEDTLS_PK_PARSE_C */ - -#if defined(MBEDTLS_PK_WRITE_C) -/** - * \brief Write a private key to a PKCS#1 or SEC1 DER structure - * Note: data is written at the end of the buffer! Use the - * return value to determine where you should start - * using the buffer - * - * \param ctx private to write away - * \param buf buffer to write to - * \param size size of the buffer - * - * \return length of data written if successful, or a specific - * error code - */ -int mbedtls_pk_write_key_der( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); - -/** - * \brief Write a public key to a SubjectPublicKeyInfo DER structure - * Note: data is written at the end of the buffer! Use the - * return value to determine where you should start - * using the buffer - * - * \param ctx public key to write away - * \param buf buffer to write to - * \param size size of the buffer - * - * \return length of data written if successful, or a specific - * error code - */ -int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); - -#if defined(MBEDTLS_PEM_WRITE_C) -/** - * \brief Write a public key to a PEM string - * - * \param ctx public key to write away - * \param buf buffer to write to - * \param size size of the buffer - * - * \return 0 if successful, or a specific error code - */ -int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); - -/** - * \brief Write a private key to a PKCS#1 or SEC1 PEM string - * - * \param ctx private to write away - * \param buf buffer to write to - * \param size size of the buffer - * - * \return 0 if successful, or a specific error code - */ -int mbedtls_pk_write_key_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); -#endif /* MBEDTLS_PEM_WRITE_C */ -#endif /* MBEDTLS_PK_WRITE_C */ - -/* - * WARNING: Low-level functions. You probably do not want to use these unless - * you are certain you do ;) - */ - -#if defined(MBEDTLS_PK_PARSE_C) -/** - * \brief Parse a SubjectPublicKeyInfo DER structure - * - * \param p the position in the ASN.1 data - * \param end end of the buffer - * \param pk the key to fill - * - * \return 0 if successful, or a specific PK error code - */ -int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end, - mbedtls_pk_context *pk ); -#endif /* MBEDTLS_PK_PARSE_C */ - -#if defined(MBEDTLS_PK_WRITE_C) -/** - * \brief Write a subjectPublicKey to ASN.1 data - * Note: function works backwards in data buffer - * - * \param p reference to current position pointer - * \param start start of the buffer (for bounds-checking) - * \param key public key to write away - * - * \return the length written or a negative error code - */ -int mbedtls_pk_write_pubkey( unsigned char **p, unsigned char *start, - const mbedtls_pk_context *key ); -#endif /* MBEDTLS_PK_WRITE_C */ - -/* - * Internal module functions. You probably do not want to use these unless you - * know you do. - */ -#if defined(MBEDTLS_FS_IO) -int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_PK_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pk_internal.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/pk_internal.h deleted file mode 100644 index 01d0f214bc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pk_internal.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * \file pk.h - * - * \brief Public Key abstraction layer: wrapper functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#ifndef MBEDTLS_PK_WRAP_H -#define MBEDTLS_PK_WRAP_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "pk.h" - -struct mbedtls_pk_info_t -{ - /** Public key type */ - mbedtls_pk_type_t type; - - /** Type name */ - const char *name; - - /** Get key size in bits */ - size_t (*get_bitlen)( const void * ); - - /** Tell if the context implements this type (e.g. ECKEY can do ECDSA) */ - int (*can_do)( mbedtls_pk_type_t type ); - - /** Verify signature */ - int (*verify_func)( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ); - - /** Make signature */ - int (*sign_func)( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - - /** Decrypt message */ - int (*decrypt_func)( void *ctx, const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - - /** Encrypt message */ - int (*encrypt_func)( void *ctx, const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - - /** Check public-private key pair */ - int (*check_pair_func)( const void *pub, const void *prv ); - - /** Allocate a new context */ - void * (*ctx_alloc_func)( void ); - - /** Free the given context */ - void (*ctx_free_func)( void *ctx ); - - /** Interface with the debug module */ - void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items ); - -}; -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -/* Container for RSA-alt */ -typedef struct -{ - void *key; - mbedtls_pk_rsa_alt_decrypt_func decrypt_func; - mbedtls_pk_rsa_alt_sign_func sign_func; - mbedtls_pk_rsa_alt_key_len_func key_len_func; -} mbedtls_rsa_alt_context; -#endif - -#if defined(MBEDTLS_RSA_C) -extern const mbedtls_pk_info_t mbedtls_rsa_info; -#endif - -#if defined(MBEDTLS_ECP_C) -extern const mbedtls_pk_info_t mbedtls_eckey_info; -extern const mbedtls_pk_info_t mbedtls_eckeydh_info; -#endif - -#if defined(MBEDTLS_ECDSA_C) -extern const mbedtls_pk_info_t mbedtls_ecdsa_info; -#endif - -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -extern const mbedtls_pk_info_t mbedtls_rsa_alt_info; -#endif - -#endif /* MBEDTLS_PK_WRAP_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs11.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs11.h deleted file mode 100644 index 2e88928137..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs11.h +++ /dev/null @@ -1,173 +0,0 @@ -/** - * \file pkcs11.h - * - * \brief Wrapper for PKCS#11 library libpkcs11-helper - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PKCS11_H -#define MBEDTLS_PKCS11_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PKCS11_C) - -#include "x509_crt.h" - -#include - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Context for PKCS #11 private keys. - */ -typedef struct { - pkcs11h_certificate_t pkcs11h_cert; - int len; -} mbedtls_pkcs11_context; - -/** - * Initialize a mbedtls_pkcs11_context. - * (Just making memory references valid.) - */ -void mbedtls_pkcs11_init( mbedtls_pkcs11_context *ctx ); - -/** - * Fill in a mbed TLS certificate, based on the given PKCS11 helper certificate. - * - * \param cert X.509 certificate to fill - * \param pkcs11h_cert PKCS #11 helper certificate - * - * \return 0 on success. - */ -int mbedtls_pkcs11_x509_cert_bind( mbedtls_x509_crt *cert, pkcs11h_certificate_t pkcs11h_cert ); - -/** - * Set up a mbedtls_pkcs11_context storing the given certificate. Note that the - * mbedtls_pkcs11_context will take over control of the certificate, freeing it when - * done. - * - * \param priv_key Private key structure to fill. - * \param pkcs11_cert PKCS #11 helper certificate - * - * \return 0 on success - */ -int mbedtls_pkcs11_priv_key_bind( mbedtls_pkcs11_context *priv_key, - pkcs11h_certificate_t pkcs11_cert ); - -/** - * Free the contents of the given private key context. Note that the structure - * itself is not freed. - * - * \param priv_key Private key structure to cleanup - */ -void mbedtls_pkcs11_priv_key_free( mbedtls_pkcs11_context *priv_key ); - -/** - * \brief Do an RSA private key decrypt, then remove the message - * padding - * - * \param ctx PKCS #11 context - * \param mode must be MBEDTLS_RSA_PRIVATE, for compatibility with rsa.c's signature - * \param input buffer holding the encrypted data - * \param output buffer that will hold the plaintext - * \param olen will contain the plaintext length - * \param output_max_len maximum length of the output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used) otherwise - * an error is thrown. - */ -int mbedtls_pkcs11_decrypt( mbedtls_pkcs11_context *ctx, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ); - -/** - * \brief Do a private RSA to sign a message digest - * - * \param ctx PKCS #11 context - * \param mode must be MBEDTLS_RSA_PRIVATE, for compatibility with rsa.c's signature - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer that will hold the ciphertext - * - * \return 0 if the signing operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_pkcs11_sign( mbedtls_pkcs11_context *ctx, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ); - -/** - * SSL/TLS wrappers for PKCS#11 functions - */ -static inline int mbedtls_ssl_pkcs11_decrypt( void *ctx, int mode, size_t *olen, - const unsigned char *input, unsigned char *output, - size_t output_max_len ) -{ - return mbedtls_pkcs11_decrypt( (mbedtls_pkcs11_context *) ctx, mode, olen, input, output, - output_max_len ); -} - -static inline int mbedtls_ssl_pkcs11_sign( void *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, - int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, - const unsigned char *hash, unsigned char *sig ) -{ - ((void) f_rng); - ((void) p_rng); - return mbedtls_pkcs11_sign( (mbedtls_pkcs11_context *) ctx, mode, md_alg, - hashlen, hash, sig ); -} - -static inline size_t mbedtls_ssl_pkcs11_key_len( void *ctx ) -{ - return ( (mbedtls_pkcs11_context *) ctx )->len; -} - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_PKCS11_C */ - -#endif /* MBEDTLS_PKCS11_H */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs12.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs12.h deleted file mode 100644 index 9b2d904591..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs12.h +++ /dev/null @@ -1,119 +0,0 @@ -/** - * \file pkcs12.h - * - * \brief PKCS#12 Personal Information Exchange Syntax - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PKCS12_H -#define MBEDTLS_PKCS12_H - -#include "md.h" -#include "cipher.h" -#include "asn1.h" - -#include - -#define MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA -0x1F80 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE -0x1F00 /**< Feature not available, e.g. unsupported encryption scheme. */ -#define MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT -0x1E80 /**< PBE ASN.1 data not as expected. */ -#define MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH -0x1E00 /**< Given private key password does not allow for correct decryption. */ - -#define MBEDTLS_PKCS12_DERIVE_KEY 1 /**< encryption/decryption key */ -#define MBEDTLS_PKCS12_DERIVE_IV 2 /**< initialization vector */ -#define MBEDTLS_PKCS12_DERIVE_MAC_KEY 3 /**< integrity / MAC key */ - -#define MBEDTLS_PKCS12_PBE_DECRYPT 0 -#define MBEDTLS_PKCS12_PBE_ENCRYPT 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief PKCS12 Password Based function (encryption / decryption) - * for pbeWithSHAAnd128BitRC4 - * - * \param pbe_params an ASN1 buffer containing the pkcs-12PbeParams structure - * \param mode either MBEDTLS_PKCS12_PBE_ENCRYPT or MBEDTLS_PKCS12_PBE_DECRYPT - * \param pwd the password used (may be NULL if no password is used) - * \param pwdlen length of the password (may be 0) - * \param input the input data - * \param len data length - * \param output the output buffer - * - * \return 0 if successful, or a MBEDTLS_ERR_XXX code - */ -int mbedtls_pkcs12_pbe_sha1_rc4_128( mbedtls_asn1_buf *pbe_params, int mode, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *input, size_t len, - unsigned char *output ); - -/** - * \brief PKCS12 Password Based function (encryption / decryption) - * for cipher-based and mbedtls_md-based PBE's - * - * \param pbe_params an ASN1 buffer containing the pkcs-12PbeParams structure - * \param mode either MBEDTLS_PKCS12_PBE_ENCRYPT or MBEDTLS_PKCS12_PBE_DECRYPT - * \param cipher_type the cipher used - * \param md_type the mbedtls_md used - * \param pwd the password used (may be NULL if no password is used) - * \param pwdlen length of the password (may be 0) - * \param input the input data - * \param len data length - * \param output the output buffer - * - * \return 0 if successful, or a MBEDTLS_ERR_XXX code - */ -int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode, - mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *input, size_t len, - unsigned char *output ); - -/** - * \brief The PKCS#12 derivation function uses a password and a salt - * to produce pseudo-random bits for a particular "purpose". - * - * Depending on the given id, this function can produce an - * encryption/decryption key, an nitialization vector or an - * integrity key. - * - * \param data buffer to store the derived data in - * \param datalen length to fill - * \param pwd password to use (may be NULL if no password is used) - * \param pwdlen length of the password (may be 0) - * \param salt salt buffer to use - * \param saltlen length of the salt - * \param mbedtls_md mbedtls_md type to use during the derivation - * \param id id that describes the purpose (can be MBEDTLS_PKCS12_DERIVE_KEY, - * MBEDTLS_PKCS12_DERIVE_IV or MBEDTLS_PKCS12_DERIVE_MAC_KEY) - * \param iterations number of iterations - * - * \return 0 if successful, or a MD, BIGNUM type error. - */ -int mbedtls_pkcs12_derivation( unsigned char *data, size_t datalen, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *salt, size_t saltlen, - mbedtls_md_type_t mbedtls_md, int id, int iterations ); - -#ifdef __cplusplus -} -#endif - -#endif /* pkcs12.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs5.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs5.h deleted file mode 100644 index ec5cb9e744..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/pkcs5.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * \file pkcs5.h - * - * \brief PKCS#5 functions - * - * \author Mathias Olsson - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PKCS5_H -#define MBEDTLS_PKCS5_H - -#include "asn1.h" -#include "md.h" - -#include -#include - -#define MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -0x2f80 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_PKCS5_INVALID_FORMAT -0x2f00 /**< Unexpected ASN.1 data. */ -#define MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -0x2e80 /**< Requested encryption or digest alg not available. */ -#define MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -0x2e00 /**< Given private key password does not allow for correct decryption. */ - -#define MBEDTLS_PKCS5_DECRYPT 0 -#define MBEDTLS_PKCS5_ENCRYPT 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief PKCS#5 PBES2 function - * - * \param pbe_params the ASN.1 algorithm parameters - * \param mode either MBEDTLS_PKCS5_DECRYPT or MBEDTLS_PKCS5_ENCRYPT - * \param pwd password to use when generating key - * \param pwdlen length of password - * \param data data to process - * \param datalen length of data - * \param output output buffer - * - * \returns 0 on success, or a MBEDTLS_ERR_XXX code if verification fails. - */ -int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *data, size_t datalen, - unsigned char *output ); - -/** - * \brief PKCS#5 PBKDF2 using HMAC - * - * \param ctx Generic HMAC context - * \param password Password to use when generating key - * \param plen Length of password - * \param salt Salt to use when generating key - * \param slen Length of salt - * \param iteration_count Iteration count - * \param key_length Length of generated key in bytes - * \param output Generated key. Must be at least as big as key_length - * - * \returns 0 on success, or a MBEDTLS_ERR_XXX code if verification fails. - */ -int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *password, - size_t plen, const unsigned char *salt, size_t slen, - unsigned int iteration_count, - uint32_t key_length, unsigned char *output ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_pkcs5_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* pkcs5.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/platform.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/platform.h deleted file mode 100644 index f71f1b6494..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/platform.h +++ /dev/null @@ -1,214 +0,0 @@ -/** - * \file platform.h - * - * \brief mbed TLS Platform abstraction layer - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PLATFORM_H -#define MBEDTLS_PLATFORM_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) -#include -#include -#if !defined(MBEDTLS_PLATFORM_STD_SNPRINTF) -#if defined(_WIN32) -#define MBEDTLS_PLATFORM_STD_SNPRINTF mbedtls_platform_win32_snprintf /**< Default snprintf to use */ -#else -#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use */ -#endif -#endif -#if !defined(MBEDTLS_PLATFORM_STD_PRINTF) -#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use */ -#endif -#if !defined(MBEDTLS_PLATFORM_STD_FPRINTF) -#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use */ -#endif -#if !defined(MBEDTLS_PLATFORM_STD_CALLOC) -#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use */ -#endif -#if !defined(MBEDTLS_PLATFORM_STD_FREE) -#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use */ -#endif -#if !defined(MBEDTLS_PLATFORM_STD_EXIT) -#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default free to use */ -#endif -#else /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ -#if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) -#include MBEDTLS_PLATFORM_STD_MEM_HDR -#endif -#endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ - -/* \} name SECTION: Module settings */ - -/* - * The function pointers for calloc and free - */ -#if defined(MBEDTLS_PLATFORM_MEMORY) -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) && \ - defined(MBEDTLS_PLATFORM_CALLOC_MACRO) -#define mbedtls_free MBEDTLS_PLATFORM_FREE_MACRO -#define mbedtls_calloc MBEDTLS_PLATFORM_CALLOC_MACRO -#else -/* For size_t */ -#include -extern void * (*mbedtls_calloc)( size_t n, size_t size ); -extern void (*mbedtls_free)( void *ptr ); - -/** - * \brief Set your own memory implementation function pointers - * - * \param calloc_func the calloc function implementation - * \param free_func the free function implementation - * - * \return 0 if successful - */ -int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ), - void (*free_func)( void * ) ); -#endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */ -#else /* !MBEDTLS_PLATFORM_MEMORY */ -#define mbedtls_free free -#define mbedtls_calloc calloc -#endif /* MBEDTLS_PLATFORM_MEMORY && !MBEDTLS_PLATFORM_{FREE,CALLOC}_MACRO */ - -/* - * The function pointers for fprintf - */ -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) -/* We need FILE * */ -#include -extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... ); - -/** - * \brief Set your own fprintf function pointer - * - * \param fprintf_func the fprintf function implementation - * - * \return 0 - */ -int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *stream, const char *, - ... ) ); -#else -#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) -#define mbedtls_fprintf MBEDTLS_PLATFORM_FPRINTF_MACRO -#else -#define mbedtls_fprintf fprintf -#endif /* MBEDTLS_PLATFORM_FPRINTF_MACRO */ -#endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ - -/* - * The function pointers for printf - */ -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) -extern int (*mbedtls_printf)( const char *format, ... ); - -/** - * \brief Set your own printf function pointer - * - * \param printf_func the printf function implementation - * - * \return 0 - */ -int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) ); -#else /* !MBEDTLS_PLATFORM_PRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) -#define mbedtls_printf MBEDTLS_PLATFORM_PRINTF_MACRO -#else -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_PRINTF_MACRO */ -#endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ - -/* - * The function pointers for snprintf - * - * The snprintf implementation should conform to C99: - * - it *must* always correctly zero-terminate the buffer - * (except when n == 0, then it must leave the buffer untouched) - * - however it is acceptable to return -1 instead of the required length when - * the destination buffer is too short. - */ -#if defined(_WIN32) -/* For Windows (inc. MSYS2), we provide our own fixed implementation */ -int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... ); -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) -extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... ); - -/** - * \brief Set your own snprintf function pointer - * - * \param snprintf_func the snprintf function implementation - * - * \return 0 - */ -int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, - const char * format, ... ) ); -#else /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) -#define mbedtls_snprintf MBEDTLS_PLATFORM_SNPRINTF_MACRO -#else -#define mbedtls_snprintf snprintf -#endif /* MBEDTLS_PLATFORM_SNPRINTF_MACRO */ -#endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ - -/* - * The function pointers for exit - */ -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) -extern void (*mbedtls_exit)( int status ); - -/** - * \brief Set your own exit function pointer - * - * \param exit_func the exit function implementation - * - * \return 0 - */ -int mbedtls_platform_set_exit( void (*exit_func)( int status ) ); -#else -#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) -#define mbedtls_exit MBEDTLS_PLATFORM_EXIT_MACRO -#else -#define mbedtls_exit exit -#endif /* MBEDTLS_PLATFORM_EXIT_MACRO */ -#endif /* MBEDTLS_PLATFORM_EXIT_ALT */ - -#ifdef __cplusplus -} -#endif - -#endif /* platform.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ripemd160.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ripemd160.h deleted file mode 100644 index 7083fc8599..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ripemd160.h +++ /dev/null @@ -1,138 +0,0 @@ -/** - * \file ripemd160.h - * - * \brief RIPE MD-160 message digest - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_RIPEMD160_H -#define MBEDTLS_RIPEMD160_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if !defined(MBEDTLS_RIPEMD160_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief RIPEMD-160 context structure - */ -typedef struct -{ - uint32_t total[2]; /*!< number of bytes processed */ - uint32_t state[5]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ -} -mbedtls_ripemd160_context; - -/** - * \brief Initialize RIPEMD-160 context - * - * \param ctx RIPEMD-160 context to be initialized - */ -void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx ); - -/** - * \brief Clear RIPEMD-160 context - * - * \param ctx RIPEMD-160 context to be cleared - */ -void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx ); - -/** - * \brief Clone (the state of) an RIPEMD-160 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_ripemd160_clone( mbedtls_ripemd160_context *dst, - const mbedtls_ripemd160_context *src ); - -/** - * \brief RIPEMD-160 context setup - * - * \param ctx context to be initialized - */ -void mbedtls_ripemd160_starts( mbedtls_ripemd160_context *ctx ); - -/** - * \brief RIPEMD-160 process buffer - * - * \param ctx RIPEMD-160 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_ripemd160_update( mbedtls_ripemd160_context *ctx, - const unsigned char *input, size_t ilen ); - -/** - * \brief RIPEMD-160 final digest - * - * \param ctx RIPEMD-160 context - * \param output RIPEMD-160 checksum result - */ -void mbedtls_ripemd160_finish( mbedtls_ripemd160_context *ctx, unsigned char output[20] ); - -/* Internal use */ -void mbedtls_ripemd160_process( mbedtls_ripemd160_context *ctx, const unsigned char data[64] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_RIPEMD160_ALT */ -#include "ripemd160.h" -#endif /* MBEDTLS_RIPEMD160_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = RIPEMD-160( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output RIPEMD-160 checksum result - */ -void mbedtls_ripemd160( const unsigned char *input, size_t ilen, - unsigned char output[20] ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_ripemd160_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_ripemd160.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/rsa.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/rsa.h deleted file mode 100644 index 9c8645df69..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/rsa.h +++ /dev/null @@ -1,652 +0,0 @@ -/** - * \file rsa.h - * - * \brief The RSA public-key cryptosystem - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_RSA_H -#define MBEDTLS_RSA_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "bignum.h" -#include "md.h" - -#if defined(MBEDTLS_THREADING_C) -#include "threading.h" -#endif - -/* - * RSA Error codes - */ -#define MBEDTLS_ERR_RSA_BAD_INPUT_DATA -0x4080 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_RSA_INVALID_PADDING -0x4100 /**< Input data contains invalid padding and is rejected. */ -#define MBEDTLS_ERR_RSA_KEY_GEN_FAILED -0x4180 /**< Something failed during generation of a key. */ -#define MBEDTLS_ERR_RSA_KEY_CHECK_FAILED -0x4200 /**< Key failed to pass the library's validity check. */ -#define MBEDTLS_ERR_RSA_PUBLIC_FAILED -0x4280 /**< The public key operation failed. */ -#define MBEDTLS_ERR_RSA_PRIVATE_FAILED -0x4300 /**< The private key operation failed. */ -#define MBEDTLS_ERR_RSA_VERIFY_FAILED -0x4380 /**< The PKCS#1 verification failed. */ -#define MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE -0x4400 /**< The output buffer for decryption is not large enough. */ -#define MBEDTLS_ERR_RSA_RNG_FAILED -0x4480 /**< The random generator failed to generate non-zeros. */ - -/* - * RSA constants - */ -#define MBEDTLS_RSA_PUBLIC 0 -#define MBEDTLS_RSA_PRIVATE 1 - -#define MBEDTLS_RSA_PKCS_V15 0 -#define MBEDTLS_RSA_PKCS_V21 1 - -#define MBEDTLS_RSA_SIGN 1 -#define MBEDTLS_RSA_CRYPT 2 - -#define MBEDTLS_RSA_SALT_LEN_ANY -1 - -/* - * The above constants may be used even if the RSA module is compile out, - * eg for alternative (PKCS#11) RSA implemenations in the PK layers. - */ -#if defined(MBEDTLS_RSA_C) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief RSA context structure - */ -typedef struct -{ - int ver; /*!< always 0 */ - size_t len; /*!< size(N) in chars */ - - mbedtls_mpi N; /*!< public modulus */ - mbedtls_mpi E; /*!< public exponent */ - - mbedtls_mpi D; /*!< private exponent */ - mbedtls_mpi P; /*!< 1st prime factor */ - mbedtls_mpi Q; /*!< 2nd prime factor */ - mbedtls_mpi DP; /*!< D % (P - 1) */ - mbedtls_mpi DQ; /*!< D % (Q - 1) */ - mbedtls_mpi QP; /*!< 1 / (Q % P) */ - - mbedtls_mpi RN; /*!< cached R^2 mod N */ - mbedtls_mpi RP; /*!< cached R^2 mod P */ - mbedtls_mpi RQ; /*!< cached R^2 mod Q */ - - mbedtls_mpi Vi; /*!< cached blinding value */ - mbedtls_mpi Vf; /*!< cached un-blinding value */ - - int padding; /*!< MBEDTLS_RSA_PKCS_V15 for 1.5 padding and - RSA_PKCS_v21 for OAEP/PSS */ - int hash_id; /*!< Hash identifier of mbedtls_md_type_t as - specified in the mbedtls_md.h header file - for the EME-OAEP and EMSA-PSS - encoding */ -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; /*!< Thread-safety mutex */ -#endif -} -mbedtls_rsa_context; - -/** - * \brief Initialize an RSA context - * - * Note: Set padding to MBEDTLS_RSA_PKCS_V21 for the RSAES-OAEP - * encryption scheme and the RSASSA-PSS signature scheme. - * - * \param ctx RSA context to be initialized - * \param padding MBEDTLS_RSA_PKCS_V15 or MBEDTLS_RSA_PKCS_V21 - * \param hash_id MBEDTLS_RSA_PKCS_V21 hash identifier - * - * \note The hash_id parameter is actually ignored - * when using MBEDTLS_RSA_PKCS_V15 padding. - * - * \note Choice of padding mode is strictly enforced for private key - * operations, since there might be security concerns in - * mixing padding modes. For public key operations it's merely - * a default value, which can be overriden by calling specific - * rsa_rsaes_xxx or rsa_rsassa_xxx functions. - * - * \note The chosen hash is always used for OEAP encryption. - * For PSS signatures, it's always used for making signatures, - * but can be overriden (and always is, if set to - * MBEDTLS_MD_NONE) for verifying them. - */ -void mbedtls_rsa_init( mbedtls_rsa_context *ctx, - int padding, - int hash_id); - -/** - * \brief Set padding for an already initialized RSA context - * See \c mbedtls_rsa_init() for details. - * - * \param ctx RSA context to be set - * \param padding MBEDTLS_RSA_PKCS_V15 or MBEDTLS_RSA_PKCS_V21 - * \param hash_id MBEDTLS_RSA_PKCS_V21 hash identifier - */ -void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding, int hash_id); - -/** - * \brief Generate an RSA keypair - * - * \param ctx RSA context that will hold the key - * \param f_rng RNG function - * \param p_rng RNG parameter - * \param nbits size of the public key in bits - * \param exponent public exponent (e.g., 65537) - * - * \note mbedtls_rsa_init() must be called beforehand to setup - * the RSA context. - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - */ -int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - unsigned int nbits, int exponent ); - -/** - * \brief Check a public RSA key - * - * \param ctx RSA context to be checked - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - */ -int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx ); - -/** - * \brief Check a private RSA key - * - * \param ctx RSA context to be checked - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - */ -int mbedtls_rsa_check_privkey( const mbedtls_rsa_context *ctx ); - -/** - * \brief Check a public-private RSA key pair. - * Check each of the contexts, and make sure they match. - * - * \param pub RSA context holding the public key - * \param prv RSA context holding the private key - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - */ -int mbedtls_rsa_check_pub_priv( const mbedtls_rsa_context *pub, const mbedtls_rsa_context *prv ); - -/** - * \brief Do an RSA public key operation - * - * \param ctx RSA context - * \param input input buffer - * \param output output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note This function does NOT take care of message - * padding. Also, be sure to set input[0] = 0 or assure that - * input is smaller than N. - * - * \note The input and output buffers must be large - * enough (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_public( mbedtls_rsa_context *ctx, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Do an RSA private key operation - * - * \param ctx RSA context - * \param f_rng RNG function (Needed for blinding) - * \param p_rng RNG parameter - * \param input input buffer - * \param output output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The input and output buffers must be large - * enough (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_private( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Generic wrapper to perform a PKCS#1 encryption using the - * mode from the context. Add the message padding, then do an - * RSA operation. - * - * \param ctx RSA context - * \param f_rng RNG function (Needed for padding and PKCS#1 v2.1 encoding - * and MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param ilen contains the plaintext length - * \param input buffer holding the data to be encrypted - * \param output buffer that will hold the ciphertext - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_pkcs1_encrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t ilen, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Perform a PKCS#1 v1.5 encryption (RSAES-PKCS1-v1_5-ENCRYPT) - * - * \param ctx RSA context - * \param f_rng RNG function (Needed for padding and MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param ilen contains the plaintext length - * \param input buffer holding the data to be encrypted - * \param output buffer that will hold the ciphertext - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t ilen, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Perform a PKCS#1 v2.1 OAEP encryption (RSAES-OAEP-ENCRYPT) - * - * \param ctx RSA context - * \param f_rng RNG function (Needed for padding and PKCS#1 v2.1 encoding - * and MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param label buffer holding the custom label to use - * \param label_len contains the label length - * \param ilen contains the plaintext length - * \param input buffer holding the data to be encrypted - * \param output buffer that will hold the ciphertext - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - const unsigned char *label, size_t label_len, - size_t ilen, - const unsigned char *input, - unsigned char *output ); - -/** - * \brief Generic wrapper to perform a PKCS#1 decryption using the - * mode from the context. Do an RSA operation, then remove - * the message padding - * - * \param ctx RSA context - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param olen will contain the plaintext length - * \param input buffer holding the encrypted data - * \param output buffer that will hold the plaintext - * \param output_max_len maximum length of the output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used) otherwise - * an error is thrown. - */ -int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ); - -/** - * \brief Perform a PKCS#1 v1.5 decryption (RSAES-PKCS1-v1_5-DECRYPT) - * - * \param ctx RSA context - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param olen will contain the plaintext length - * \param input buffer holding the encrypted data - * \param output buffer that will hold the plaintext - * \param output_max_len maximum length of the output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used) otherwise - * an error is thrown. - */ -int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ); - -/** - * \brief Perform a PKCS#1 v2.1 OAEP decryption (RSAES-OAEP-DECRYPT) - * - * \param ctx RSA context - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param label buffer holding the custom label to use - * \param label_len contains the label length - * \param olen will contain the plaintext length - * \param input buffer holding the encrypted data - * \param output buffer that will hold the plaintext - * \param output_max_len maximum length of the output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used) otherwise - * an error is thrown. - */ -int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - const unsigned char *label, size_t label_len, - size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ); - -/** - * \brief Generic wrapper to perform a PKCS#1 signature using the - * mode from the context. Do a private RSA operation to sign - * a message digest - * - * \param ctx RSA context - * \param f_rng RNG function (Needed for PKCS#1 v2.1 encoding and for - * MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer that will hold the ciphertext - * - * \return 0 if the signing operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - * - * \note In case of PKCS#1 v2.1 encoding, see comments on - * \note \c mbedtls_rsa_rsassa_pss_sign() for details on md_alg and hash_id. - */ -int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ); - -/** - * \brief Perform a PKCS#1 v1.5 signature (RSASSA-PKCS1-v1_5-SIGN) - * - * \param ctx RSA context - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer that will hold the ciphertext - * - * \return 0 if the signing operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ); - -/** - * \brief Perform a PKCS#1 v2.1 PSS signature (RSASSA-PSS-SIGN) - * - * \param ctx RSA context - * \param f_rng RNG function (Needed for PKCS#1 v2.1 encoding and for - * MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer that will hold the ciphertext - * - * \return 0 if the signing operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - * - * \note The hash_id in the RSA context is the one used for the - * encoding. md_alg in the function call is the type of hash - * that is encoded. According to RFC 3447 it is advised to - * keep both hashes the same. - */ -int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ); - -/** - * \brief Generic wrapper to perform a PKCS#1 verification using the - * mode from the context. Do a public RSA operation and check - * the message digest - * - * \param ctx points to an RSA public key - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer holding the ciphertext - * - * \return 0 if the verify operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - * - * \note In case of PKCS#1 v2.1 encoding, see comments on - * \c mbedtls_rsa_rsassa_pss_verify() about md_alg and hash_id. - */ -int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - const unsigned char *sig ); - -/** - * \brief Perform a PKCS#1 v1.5 verification (RSASSA-PKCS1-v1_5-VERIFY) - * - * \param ctx points to an RSA public key - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer holding the ciphertext - * - * \return 0 if the verify operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - const unsigned char *sig ); - -/** - * \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY) - * (This is the "simple" version.) - * - * \param ctx points to an RSA public key - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer holding the ciphertext - * - * \return 0 if the verify operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - * - * \note The hash_id in the RSA context is the one used for the - * verification. md_alg in the function call is the type of - * hash that is verified. According to RFC 3447 it is advised to - * keep both hashes the same. If hash_id in the RSA context is - * unset, the md_alg from the function call is used. - */ -int mbedtls_rsa_rsassa_pss_verify( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - const unsigned char *sig ); - -/** - * \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY) - * (This is the version with "full" options.) - * - * \param ctx points to an RSA public key - * \param f_rng RNG function (Only needed for MBEDTLS_RSA_PRIVATE) - * \param p_rng RNG parameter - * \param mode MBEDTLS_RSA_PUBLIC or MBEDTLS_RSA_PRIVATE - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param mgf1_hash_id message digest used for mask generation - * \param expected_salt_len Length of the salt used in padding, use - * MBEDTLS_RSA_SALT_LEN_ANY to accept any salt length - * \param sig buffer holding the ciphertext - * - * \return 0 if the verify operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - * - * \note The hash_id in the RSA context is ignored. - */ -int mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - mbedtls_md_type_t mgf1_hash_id, - int expected_salt_len, - const unsigned char *sig ); - -/** - * \brief Copy the components of an RSA context - * - * \param dst Destination context - * \param src Source context - * - * \return 0 on success, - * MBEDTLS_ERR_MPI_ALLOC_FAILED on memory allocation failure - */ -int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src ); - -/** - * \brief Free the components of an RSA key - * - * \param ctx RSA Context to free - */ -void mbedtls_rsa_free( mbedtls_rsa_context *ctx ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_rsa_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_RSA_C */ - -#endif /* rsa.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha1.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha1.h deleted file mode 100644 index 7a67c6c1fb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha1.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * \file sha1.h - * - * \brief SHA-1 cryptographic hash function - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SHA1_H -#define MBEDTLS_SHA1_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if !defined(MBEDTLS_SHA1_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief SHA-1 context structure - */ -typedef struct -{ - uint32_t total[2]; /*!< number of bytes processed */ - uint32_t state[5]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ -} -mbedtls_sha1_context; - -/** - * \brief Initialize SHA-1 context - * - * \param ctx SHA-1 context to be initialized - */ -void mbedtls_sha1_init( mbedtls_sha1_context *ctx ); - -/** - * \brief Clear SHA-1 context - * - * \param ctx SHA-1 context to be cleared - */ -void mbedtls_sha1_free( mbedtls_sha1_context *ctx ); - -/** - * \brief Clone (the state of) a SHA-1 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_sha1_clone( mbedtls_sha1_context *dst, - const mbedtls_sha1_context *src ); - -/** - * \brief SHA-1 context setup - * - * \param ctx context to be initialized - */ -void mbedtls_sha1_starts( mbedtls_sha1_context *ctx ); - -/** - * \brief SHA-1 process buffer - * - * \param ctx SHA-1 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen ); - -/** - * \brief SHA-1 final digest - * - * \param ctx SHA-1 context - * \param output SHA-1 checksum result - */ -void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] ); - -/* Internal use */ -void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_SHA1_ALT */ -#include "sha1_alt.h" -#endif /* MBEDTLS_SHA1_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = SHA-1( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output SHA-1 checksum result - */ -void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output[20] ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_sha1_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_sha1.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha256.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha256.h deleted file mode 100644 index f8041adf08..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha256.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * \file sha256.h - * - * \brief SHA-224 and SHA-256 cryptographic hash function - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SHA256_H -#define MBEDTLS_SHA256_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if !defined(MBEDTLS_SHA256_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief SHA-256 context structure - */ -typedef struct -{ - uint32_t total[2]; /*!< number of bytes processed */ - uint32_t state[8]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ - int is224; /*!< 0 => SHA-256, else SHA-224 */ -} -mbedtls_sha256_context; - -/** - * \brief Initialize SHA-256 context - * - * \param ctx SHA-256 context to be initialized - */ -void mbedtls_sha256_init( mbedtls_sha256_context *ctx ); - -/** - * \brief Clear SHA-256 context - * - * \param ctx SHA-256 context to be cleared - */ -void mbedtls_sha256_free( mbedtls_sha256_context *ctx ); - -/** - * \brief Clone (the state of) a SHA-256 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_sha256_clone( mbedtls_sha256_context *dst, - const mbedtls_sha256_context *src ); - -/** - * \brief SHA-256 context setup - * - * \param ctx context to be initialized - * \param is224 0 = use SHA256, 1 = use SHA224 - */ -void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ); - -/** - * \brief SHA-256 process buffer - * - * \param ctx SHA-256 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *input, - size_t ilen ); - -/** - * \brief SHA-256 final digest - * - * \param ctx SHA-256 context - * \param output SHA-224/256 checksum result - */ -void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32] ); - -/* Internal use */ -void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_SHA256_ALT */ -#include "sha256_alt.h" -#endif /* MBEDTLS_SHA256_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = SHA-256( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output SHA-224/256 checksum result - * \param is224 0 = use SHA256, 1 = use SHA224 - */ -void mbedtls_sha256( const unsigned char *input, size_t ilen, - unsigned char output[32], int is224 ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_sha256_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_sha256.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha512.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha512.h deleted file mode 100644 index 627694f425..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/sha512.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * \file sha512.h - * - * \brief SHA-384 and SHA-512 cryptographic hash function - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SHA512_H -#define MBEDTLS_SHA512_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#if !defined(MBEDTLS_SHA512_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief SHA-512 context structure - */ -typedef struct -{ - uint64_t total[2]; /*!< number of bytes processed */ - uint64_t state[8]; /*!< intermediate digest state */ - unsigned char buffer[128]; /*!< data block being processed */ - int is384; /*!< 0 => SHA-512, else SHA-384 */ -} -mbedtls_sha512_context; - -/** - * \brief Initialize SHA-512 context - * - * \param ctx SHA-512 context to be initialized - */ -void mbedtls_sha512_init( mbedtls_sha512_context *ctx ); - -/** - * \brief Clear SHA-512 context - * - * \param ctx SHA-512 context to be cleared - */ -void mbedtls_sha512_free( mbedtls_sha512_context *ctx ); - -/** - * \brief Clone (the state of) a SHA-512 context - * - * \param dst The destination context - * \param src The context to be cloned - */ -void mbedtls_sha512_clone( mbedtls_sha512_context *dst, - const mbedtls_sha512_context *src ); - -/** - * \brief SHA-512 context setup - * - * \param ctx context to be initialized - * \param is384 0 = use SHA512, 1 = use SHA384 - */ -void mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 ); - -/** - * \brief SHA-512 process buffer - * - * \param ctx SHA-512 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *input, - size_t ilen ); - -/** - * \brief SHA-512 final digest - * - * \param ctx SHA-512 context - * \param output SHA-384/512 checksum result - */ -void mbedtls_sha512_finish( mbedtls_sha512_context *ctx, unsigned char output[64] ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_SHA512_ALT */ -#include "sha512_alt.h" -#endif /* MBEDTLS_SHA512_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Output = SHA-512( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output SHA-384/512 checksum result - * \param is384 0 = use SHA512, 1 = use SHA384 - */ -void mbedtls_sha512( const unsigned char *input, size_t ilen, - unsigned char output[64], int is384 ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_sha512_self_test( int verbose ); - -/* Internal use */ -void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char data[128] ); - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_sha512.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl.h deleted file mode 100644 index ff5f3897fb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl.h +++ /dev/null @@ -1,2393 +0,0 @@ -/** - * \file ssl.h - * - * \brief SSL/TLS functions. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SSL_H -#define MBEDTLS_SSL_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "bignum.h" -#include "ecp.h" - -#include "ssl_ciphersuites.h" - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -#include "x509_crt.h" -#include "x509_crl.h" -#endif - -#if defined(MBEDTLS_DHM_C) -#include "dhm.h" -#endif - -#if defined(MBEDTLS_ECDH_C) -#include "ecdh.h" -#endif - -#if defined(MBEDTLS_ZLIB_SUPPORT) -#include "zlib.h" -#endif - -#if defined(MBEDTLS_HAVE_TIME) -#include -#endif - -/* - * SSL Error codes - */ -#define MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE -0x7080 /**< The requested feature is not available. */ -#define MBEDTLS_ERR_SSL_BAD_INPUT_DATA -0x7100 /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_SSL_INVALID_MAC -0x7180 /**< Verification of the message MAC failed. */ -#define MBEDTLS_ERR_SSL_INVALID_RECORD -0x7200 /**< An invalid SSL record was received. */ -#define MBEDTLS_ERR_SSL_CONN_EOF -0x7280 /**< The connection indicated an EOF. */ -#define MBEDTLS_ERR_SSL_UNKNOWN_CIPHER -0x7300 /**< An unknown cipher was received. */ -#define MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN -0x7380 /**< The server has no ciphersuites in common with the client. */ -#define MBEDTLS_ERR_SSL_NO_RNG -0x7400 /**< No RNG was provided to the SSL module. */ -#define MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE -0x7480 /**< No client certification received from the client, but required by the authentication mode. */ -#define MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE -0x7500 /**< Our own certificate(s) is/are too large to send in an SSL message. */ -#define MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED -0x7580 /**< The own certificate is not set, but needed by the server. */ -#define MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED -0x7600 /**< The own private key or pre-shared key is not set, but needed. */ -#define MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED -0x7680 /**< No CA Chain is set, but required to operate. */ -#define MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE -0x7700 /**< An unexpected message was received from our peer. */ -#define MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE -0x7780 /**< A fatal alert message was received from our peer. */ -#define MBEDTLS_ERR_SSL_PEER_VERIFY_FAILED -0x7800 /**< Verification of our peer failed. */ -#define MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY -0x7880 /**< The peer notified us that the connection is going to be closed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO -0x7900 /**< Processing of the ClientHello handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO -0x7980 /**< Processing of the ServerHello handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE -0x7A00 /**< Processing of the Certificate handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST -0x7A80 /**< Processing of the CertificateRequest handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE -0x7B00 /**< Processing of the ServerKeyExchange handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO_DONE -0x7B80 /**< Processing of the ServerHelloDone handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE -0x7C00 /**< Processing of the ClientKeyExchange handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP -0x7C80 /**< Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Read Public. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS -0x7D00 /**< Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Calculate Secret. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY -0x7D80 /**< Processing of the CertificateVerify handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC -0x7E00 /**< Processing of the ChangeCipherSpec handshake message failed. */ -#define MBEDTLS_ERR_SSL_BAD_HS_FINISHED -0x7E80 /**< Processing of the Finished handshake message failed. */ -#define MBEDTLS_ERR_SSL_ALLOC_FAILED -0x7F00 /**< Memory allocation failed */ -#define MBEDTLS_ERR_SSL_HW_ACCEL_FAILED -0x7F80 /**< Hardware acceleration function returned with error */ -#define MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH -0x6F80 /**< Hardware acceleration function skipped / left alone data */ -#define MBEDTLS_ERR_SSL_COMPRESSION_FAILED -0x6F00 /**< Processing of the compression / decompression failed */ -#define MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION -0x6E80 /**< Handshake protocol not within min/max boundaries */ -#define MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET -0x6E00 /**< Processing of the NewSessionTicket handshake message failed. */ -#define MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED -0x6D80 /**< Session ticket has expired. */ -#define MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH -0x6D00 /**< Public key type mismatch (eg, asked for RSA key exchange and presented EC key) */ -#define MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY -0x6C80 /**< Unknown identity received (eg, PSK identity) */ -#define MBEDTLS_ERR_SSL_INTERNAL_ERROR -0x6C00 /**< Internal error (eg, unexpected failure in lower-level module) */ -#define MBEDTLS_ERR_SSL_COUNTER_WRAPPING -0x6B80 /**< A counter would wrap (eg, too many messages exchanged). */ -#define MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO -0x6B00 /**< Unexpected message at ServerHello in renegotiation. */ -#define MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED -0x6A80 /**< DTLS client must retry for hello verification */ -#define MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL -0x6A00 /**< A buffer is too small to receive or write a message */ -#define MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE -0x6980 /**< None of the common ciphersuites is usable (eg, no suitable certificate, see debug messages). */ -#define MBEDTLS_ERR_SSL_WANT_READ -0x6900 /**< Connection requires a read call. */ -#define MBEDTLS_ERR_SSL_WANT_WRITE -0x6880 /**< Connection requires a write call. */ -#define MBEDTLS_ERR_SSL_TIMEOUT -0x6800 /**< The operation timed out. */ -#define MBEDTLS_ERR_SSL_CLIENT_RECONNECT -0x6780 /**< The client initiated a reconnect from the same port. */ -#define MBEDTLS_ERR_SSL_UNEXPECTED_RECORD -0x6700 /**< Record header looks valid but is not expected. */ - -/* - * Various constants - */ -#define MBEDTLS_SSL_MAJOR_VERSION_3 3 -#define MBEDTLS_SSL_MINOR_VERSION_0 0 /*!< SSL v3.0 */ -#define MBEDTLS_SSL_MINOR_VERSION_1 1 /*!< TLS v1.0 */ -#define MBEDTLS_SSL_MINOR_VERSION_2 2 /*!< TLS v1.1 */ -#define MBEDTLS_SSL_MINOR_VERSION_3 3 /*!< TLS v1.2 */ - -#define MBEDTLS_SSL_TRANSPORT_STREAM 0 /*!< TLS */ -#define MBEDTLS_SSL_TRANSPORT_DATAGRAM 1 /*!< DTLS */ - -#define MBEDTLS_SSL_MAX_HOST_NAME_LEN 255 /*!< Maximum host name defined in RFC 1035 */ - -/* RFC 6066 section 4, see also mfl_code_to_length in ssl_tls.c - * NONE must be zero so that memset()ing structure to zero works */ -#define MBEDTLS_SSL_MAX_FRAG_LEN_NONE 0 /*!< don't use this extension */ -#define MBEDTLS_SSL_MAX_FRAG_LEN_512 1 /*!< MaxFragmentLength 2^9 */ -#define MBEDTLS_SSL_MAX_FRAG_LEN_1024 2 /*!< MaxFragmentLength 2^10 */ -#define MBEDTLS_SSL_MAX_FRAG_LEN_2048 3 /*!< MaxFragmentLength 2^11 */ -#define MBEDTLS_SSL_MAX_FRAG_LEN_4096 4 /*!< MaxFragmentLength 2^12 */ -#define MBEDTLS_SSL_MAX_FRAG_LEN_INVALID 5 /*!< first invalid value */ - -#define MBEDTLS_SSL_IS_CLIENT 0 -#define MBEDTLS_SSL_IS_SERVER 1 - -#define MBEDTLS_SSL_IS_NOT_FALLBACK 0 -#define MBEDTLS_SSL_IS_FALLBACK 1 - -#define MBEDTLS_SSL_EXTENDED_MS_DISABLED 0 -#define MBEDTLS_SSL_EXTENDED_MS_ENABLED 1 - -#define MBEDTLS_SSL_ETM_DISABLED 0 -#define MBEDTLS_SSL_ETM_ENABLED 1 - -#define MBEDTLS_SSL_COMPRESS_NULL 0 -#define MBEDTLS_SSL_COMPRESS_DEFLATE 1 - -#define MBEDTLS_SSL_VERIFY_NONE 0 -#define MBEDTLS_SSL_VERIFY_OPTIONAL 1 -#define MBEDTLS_SSL_VERIFY_REQUIRED 2 -#define MBEDTLS_SSL_VERIFY_UNSET 3 /* Used only for sni_authmode */ - -#define MBEDTLS_SSL_LEGACY_RENEGOTIATION 0 -#define MBEDTLS_SSL_SECURE_RENEGOTIATION 1 - -#define MBEDTLS_SSL_RENEGOTIATION_DISABLED 0 -#define MBEDTLS_SSL_RENEGOTIATION_ENABLED 1 - -#define MBEDTLS_SSL_ANTI_REPLAY_DISABLED 0 -#define MBEDTLS_SSL_ANTI_REPLAY_ENABLED 1 - -#define MBEDTLS_SSL_RENEGOTIATION_NOT_ENFORCED -1 -#define MBEDTLS_SSL_RENEGO_MAX_RECORDS_DEFAULT 16 - -#define MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION 0 -#define MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION 1 -#define MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE 2 - -#define MBEDTLS_SSL_TRUNC_HMAC_DISABLED 0 -#define MBEDTLS_SSL_TRUNC_HMAC_ENABLED 1 -#define MBEDTLS_SSL_TRUNCATED_HMAC_LEN 10 /* 80 bits, rfc 6066 section 7 */ - -#define MBEDTLS_SSL_SESSION_TICKETS_DISABLED 0 -#define MBEDTLS_SSL_SESSION_TICKETS_ENABLED 1 - -#define MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED 0 -#define MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED 1 - -#define MBEDTLS_SSL_ARC4_ENABLED 0 -#define MBEDTLS_SSL_ARC4_DISABLED 1 - -#define MBEDTLS_SSL_PRESET_DEFAULT 0 -#define MBEDTLS_SSL_PRESET_SUITEB 2 - -/* - * Default range for DTLS retransmission timer value, in milliseconds. - * RFC 6347 4.2.4.1 says from 1 second to 60 seconds. - */ -#define MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MIN 1000 -#define MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MAX 60000 - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME) -#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ -#endif - -/* - * Maxium fragment length in bytes, - * determines the size of each of the two internal I/O buffers. - * - * Note: the RFC defines the default size of SSL / TLS messages. If you - * change the value here, other clients / servers may not be able to - * communicate with you anymore. Only change this value if you control - * both sides of the connection and have it reduced at both sides, or - * if you're using the Max Fragment Length extension and you know all your - * peers are using it too! - */ -#if !defined(MBEDTLS_SSL_MAX_CONTENT_LEN) -#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */ -#endif - -/* \} name SECTION: Module settings */ - -/* - * Length of the verify data for secure renegotiation - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) -#define MBEDTLS_SSL_VERIFY_DATA_MAX_LEN 36 -#else -#define MBEDTLS_SSL_VERIFY_DATA_MAX_LEN 12 -#endif - -/* - * Signaling ciphersuite values (SCSV) - */ -#define MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO 0xFF /**< renegotiation info ext */ -#define MBEDTLS_SSL_FALLBACK_SCSV_VALUE 0x5600 /**< draft-ietf-tls-downgrade-scsv-00 */ - -/* - * Supported Signature and Hash algorithms (For TLS 1.2) - * RFC 5246 section 7.4.1.4.1 - */ -#define MBEDTLS_SSL_HASH_NONE 0 -#define MBEDTLS_SSL_HASH_MD5 1 -#define MBEDTLS_SSL_HASH_SHA1 2 -#define MBEDTLS_SSL_HASH_SHA224 3 -#define MBEDTLS_SSL_HASH_SHA256 4 -#define MBEDTLS_SSL_HASH_SHA384 5 -#define MBEDTLS_SSL_HASH_SHA512 6 - -#define MBEDTLS_SSL_SIG_ANON 0 -#define MBEDTLS_SSL_SIG_RSA 1 -#define MBEDTLS_SSL_SIG_ECDSA 3 - -/* - * Client Certificate Types - * RFC 5246 section 7.4.4 plus RFC 4492 section 5.5 - */ -#define MBEDTLS_SSL_CERT_TYPE_RSA_SIGN 1 -#define MBEDTLS_SSL_CERT_TYPE_ECDSA_SIGN 64 - -/* - * Message, alert and handshake types - */ -#define MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC 20 -#define MBEDTLS_SSL_MSG_ALERT 21 -#define MBEDTLS_SSL_MSG_HANDSHAKE 22 -#define MBEDTLS_SSL_MSG_APPLICATION_DATA 23 - -#define MBEDTLS_SSL_ALERT_LEVEL_WARNING 1 -#define MBEDTLS_SSL_ALERT_LEVEL_FATAL 2 - -#define MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY 0 /* 0x00 */ -#define MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE 10 /* 0x0A */ -#define MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC 20 /* 0x14 */ -#define MBEDTLS_SSL_ALERT_MSG_DECRYPTION_FAILED 21 /* 0x15 */ -#define MBEDTLS_SSL_ALERT_MSG_RECORD_OVERFLOW 22 /* 0x16 */ -#define MBEDTLS_SSL_ALERT_MSG_DECOMPRESSION_FAILURE 30 /* 0x1E */ -#define MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE 40 /* 0x28 */ -#define MBEDTLS_SSL_ALERT_MSG_NO_CERT 41 /* 0x29 */ -#define MBEDTLS_SSL_ALERT_MSG_BAD_CERT 42 /* 0x2A */ -#define MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_CERT 43 /* 0x2B */ -#define MBEDTLS_SSL_ALERT_MSG_CERT_REVOKED 44 /* 0x2C */ -#define MBEDTLS_SSL_ALERT_MSG_CERT_EXPIRED 45 /* 0x2D */ -#define MBEDTLS_SSL_ALERT_MSG_CERT_UNKNOWN 46 /* 0x2E */ -#define MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER 47 /* 0x2F */ -#define MBEDTLS_SSL_ALERT_MSG_UNKNOWN_CA 48 /* 0x30 */ -#define MBEDTLS_SSL_ALERT_MSG_ACCESS_DENIED 49 /* 0x31 */ -#define MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR 50 /* 0x32 */ -#define MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR 51 /* 0x33 */ -#define MBEDTLS_SSL_ALERT_MSG_EXPORT_RESTRICTION 60 /* 0x3C */ -#define MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION 70 /* 0x46 */ -#define MBEDTLS_SSL_ALERT_MSG_INSUFFICIENT_SECURITY 71 /* 0x47 */ -#define MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR 80 /* 0x50 */ -#define MBEDTLS_SSL_ALERT_MSG_INAPROPRIATE_FALLBACK 86 /* 0x56 */ -#define MBEDTLS_SSL_ALERT_MSG_USER_CANCELED 90 /* 0x5A */ -#define MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION 100 /* 0x64 */ -#define MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_EXT 110 /* 0x6E */ -#define MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME 112 /* 0x70 */ -#define MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY 115 /* 0x73 */ -#define MBEDTLS_SSL_ALERT_MSG_NO_APPLICATION_PROTOCOL 120 /* 0x78 */ - -#define MBEDTLS_SSL_HS_HELLO_REQUEST 0 -#define MBEDTLS_SSL_HS_CLIENT_HELLO 1 -#define MBEDTLS_SSL_HS_SERVER_HELLO 2 -#define MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST 3 -#define MBEDTLS_SSL_HS_NEW_SESSION_TICKET 4 -#define MBEDTLS_SSL_HS_CERTIFICATE 11 -#define MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE 12 -#define MBEDTLS_SSL_HS_CERTIFICATE_REQUEST 13 -#define MBEDTLS_SSL_HS_SERVER_HELLO_DONE 14 -#define MBEDTLS_SSL_HS_CERTIFICATE_VERIFY 15 -#define MBEDTLS_SSL_HS_CLIENT_KEY_EXCHANGE 16 -#define MBEDTLS_SSL_HS_FINISHED 20 - -/* - * TLS extensions - */ -#define MBEDTLS_TLS_EXT_SERVERNAME 0 -#define MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME 0 - -#define MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH 1 - -#define MBEDTLS_TLS_EXT_TRUNCATED_HMAC 4 - -#define MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES 10 -#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS 11 - -#define MBEDTLS_TLS_EXT_SIG_ALG 13 - -#define MBEDTLS_TLS_EXT_ALPN 16 - -#define MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC 22 /* 0x16 */ -#define MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET 0x0017 /* 23 */ - -#define MBEDTLS_TLS_EXT_SESSION_TICKET 35 - -#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP 256 /* experimental */ - -#define MBEDTLS_TLS_EXT_RENEGOTIATION_INFO 0xFF01 - -/* - * Size defines - */ -#if !defined(MBEDTLS_PSK_MAX_LEN) -#define MBEDTLS_PSK_MAX_LEN 32 /* 256 bits */ -#endif - -/* Dummy type used only for its size */ -union mbedtls_ssl_premaster_secret -{ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) - unsigned char _pms_rsa[48]; /* RFC 5246 8.1.1 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) - unsigned char _pms_dhm[MBEDTLS_MPI_MAX_SIZE]; /* RFC 5246 8.1.2 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - unsigned char _pms_ecdh[MBEDTLS_ECP_MAX_BYTES]; /* RFC 4492 5.10 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) - unsigned char _pms_psk[4 + 2 * MBEDTLS_PSK_MAX_LEN]; /* RFC 4279 2 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - unsigned char _pms_dhe_psk[4 + MBEDTLS_MPI_MAX_SIZE - + MBEDTLS_PSK_MAX_LEN]; /* RFC 4279 3 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - unsigned char _pms_rsa_psk[52 + MBEDTLS_PSK_MAX_LEN]; /* RFC 4279 4 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - unsigned char _pms_ecdhe_psk[4 + MBEDTLS_ECP_MAX_BYTES - + MBEDTLS_PSK_MAX_LEN]; /* RFC 5489 2 */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - unsigned char _pms_ecjpake[32]; /* Thread spec: SHA-256 output */ -#endif -}; - -#define MBEDTLS_PREMASTER_SIZE sizeof( union mbedtls_ssl_premaster_secret ) - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * SSL state machine - */ -typedef enum -{ - MBEDTLS_SSL_HELLO_REQUEST, - MBEDTLS_SSL_CLIENT_HELLO, - MBEDTLS_SSL_SERVER_HELLO, - MBEDTLS_SSL_SERVER_CERTIFICATE, - MBEDTLS_SSL_SERVER_KEY_EXCHANGE, - MBEDTLS_SSL_CERTIFICATE_REQUEST, - MBEDTLS_SSL_SERVER_HELLO_DONE, - MBEDTLS_SSL_CLIENT_CERTIFICATE, - MBEDTLS_SSL_CLIENT_KEY_EXCHANGE, - MBEDTLS_SSL_CERTIFICATE_VERIFY, - MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC, - MBEDTLS_SSL_CLIENT_FINISHED, - MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC, - MBEDTLS_SSL_SERVER_FINISHED, - MBEDTLS_SSL_FLUSH_BUFFERS, - MBEDTLS_SSL_HANDSHAKE_WRAPUP, - MBEDTLS_SSL_HANDSHAKE_OVER, - MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET, - MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT, -} -mbedtls_ssl_states; - -/* Defined below */ -typedef struct mbedtls_ssl_session mbedtls_ssl_session; -typedef struct mbedtls_ssl_context mbedtls_ssl_context; -typedef struct mbedtls_ssl_config mbedtls_ssl_config; - -/* Defined in ssl_internal.h */ -typedef struct mbedtls_ssl_transform mbedtls_ssl_transform; -typedef struct mbedtls_ssl_handshake_params mbedtls_ssl_handshake_params; -#if defined(MBEDTLS_X509_CRT_PARSE_C) -typedef struct mbedtls_ssl_key_cert mbedtls_ssl_key_cert; -#endif -#if defined(MBEDTLS_SSL_PROTO_DTLS) -typedef struct mbedtls_ssl_flight_item mbedtls_ssl_flight_item; -#endif - -/* - * This structure is used for storing current session data. - */ -struct mbedtls_ssl_session -{ -#if defined(MBEDTLS_HAVE_TIME) - time_t start; /*!< starting time */ -#endif - int ciphersuite; /*!< chosen ciphersuite */ - int compression; /*!< chosen compression */ - size_t id_len; /*!< session id length */ - unsigned char id[32]; /*!< session identifier */ - unsigned char master[48]; /*!< the master secret */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt *peer_cert; /*!< peer X.509 cert chain */ -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - uint32_t verify_result; /*!< verification result */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) - unsigned char *ticket; /*!< RFC 5077 session ticket */ - size_t ticket_len; /*!< session ticket length */ - uint32_t ticket_lifetime; /*!< ticket lifetime hint */ -#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_CLI_C */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - unsigned char mfl_code; /*!< MaxFragmentLength negotiated by peer */ -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - int trunc_hmac; /*!< flag for truncated hmac activation */ -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - int encrypt_then_mac; /*!< flag for EtM activation */ -#endif -}; - -/** - * SSL/TLS configuration to be shared between mbedtls_ssl_context structures. - */ -struct mbedtls_ssl_config -{ - /* Group items by size (largest first) to minimize padding overhead */ - - /* - * Pointers - */ - - const int *ciphersuite_list[4]; /*!< allowed ciphersuites per version */ - - /** Callback for printing debug output */ - void (*f_dbg)(void *, int, const char *, int, const char *); - void *p_dbg; /*!< context for the debug function */ - - /** Callback for getting (pseudo-)random numbers */ - int (*f_rng)(void *, unsigned char *, size_t); - void *p_rng; /*!< context for the RNG function */ - - /** Callback to retrieve a session from the cache */ - int (*f_get_cache)(void *, mbedtls_ssl_session *); - /** Callback to store a session into the cache */ - int (*f_set_cache)(void *, const mbedtls_ssl_session *); - void *p_cache; /*!< context for cache callbacks */ - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - /** Callback for setting cert according to SNI extension */ - int (*f_sni)(void *, mbedtls_ssl_context *, const unsigned char *, size_t); - void *p_sni; /*!< context for SNI callback */ -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /** Callback to customize X.509 certificate chain verification */ - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *); - void *p_vrfy; /*!< context for X.509 verify calllback */ -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - /** Callback to retrieve PSK key from identity */ - int (*f_psk)(void *, mbedtls_ssl_context *, const unsigned char *, size_t); - void *p_psk; /*!< context for PSK callback */ -#endif - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) - /** Callback to create & write a cookie for ClientHello veirifcation */ - int (*f_cookie_write)( void *, unsigned char **, unsigned char *, - const unsigned char *, size_t ); - /** Callback to verify validity of a ClientHello cookie */ - int (*f_cookie_check)( void *, const unsigned char *, size_t, - const unsigned char *, size_t ); - void *p_cookie; /*!< context for the cookie callbacks */ -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_SRV_C) - /** Callback to create & write a session ticket */ - int (*f_ticket_write)( void *, const mbedtls_ssl_session *, - unsigned char *, const unsigned char *, size_t *, uint32_t * ); - /** Callback to parse a session ticket into a session structure */ - int (*f_ticket_parse)( void *, mbedtls_ssl_session *, unsigned char *, size_t); - void *p_ticket; /*!< context for the ticket callbacks */ -#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_SSL_EXPORT_KEYS) - /** Callback to export key block and master secret */ - int (*f_export_keys)( void *, const unsigned char *, - const unsigned char *, size_t, size_t, size_t ); - void *p_export_keys; /*!< context for key export callback */ -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - const mbedtls_x509_crt_profile *cert_profile; /*!< verification profile */ - mbedtls_ssl_key_cert *key_cert; /*!< own certificate/key pair(s) */ - mbedtls_x509_crt *ca_chain; /*!< trusted CAs */ - mbedtls_x509_crl *ca_crl; /*!< trusted CAs CRLs */ -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) - const int *sig_hashes; /*!< allowed signature hashes */ -#endif - -#if defined(MBEDTLS_ECP_C) - const mbedtls_ecp_group_id *curve_list; /*!< allowed curves */ -#endif - -#if defined(MBEDTLS_DHM_C) - mbedtls_mpi dhm_P; /*!< prime modulus for DHM */ - mbedtls_mpi dhm_G; /*!< generator for DHM */ -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - unsigned char *psk; /*!< pre-shared key */ - size_t psk_len; /*!< length of the pre-shared key */ - unsigned char *psk_identity; /*!< identity for PSK negotiation */ - size_t psk_identity_len;/*!< length of identity */ -#endif - -#if defined(MBEDTLS_SSL_ALPN) - const char **alpn_list; /*!< ordered list of protocols */ -#endif - - /* - * Numerical settings (int then char) - */ - - uint32_t read_timeout; /*!< timeout for mbedtls_ssl_read (ms) */ - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - uint32_t hs_timeout_min; /*!< initial value of the handshake - retransmission timeout (ms) */ - uint32_t hs_timeout_max; /*!< maximum value of the handshake - retransmission timeout (ms) */ -#endif - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - int renego_max_records; /*!< grace period for renegotiation */ - unsigned char renego_period[8]; /*!< value of the record counters - that triggers renegotiation */ -#endif - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) - unsigned int badmac_limit; /*!< limit of records with a bad MAC */ -#endif - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_CLI_C) - unsigned int dhm_min_bitlen; /*!< min. bit length of the DHM prime */ -#endif - - unsigned char max_major_ver; /*!< max. major version used */ - unsigned char max_minor_ver; /*!< max. minor version used */ - unsigned char min_major_ver; /*!< min. major version used */ - unsigned char min_minor_ver; /*!< min. minor version used */ - - /* - * Flags (bitfields) - */ - - unsigned int endpoint : 1; /*!< 0: client, 1: server */ - unsigned int transport : 1; /*!< stream (TLS) or datagram (DTLS) */ - unsigned int authmode : 2; /*!< MBEDTLS_SSL_VERIFY_XXX */ - /* needed even with renego disabled for LEGACY_BREAK_HANDSHAKE */ - unsigned int allow_legacy_renegotiation : 2 ; /*!< MBEDTLS_LEGACY_XXX */ -#if defined(MBEDTLS_ARC4_C) - unsigned int arc4_disabled : 1; /*!< blacklist RC4 ciphersuites? */ -#endif -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - unsigned int mfl_code : 3; /*!< desired fragment length */ -#endif -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - unsigned int encrypt_then_mac : 1 ; /*!< negotiate encrypt-then-mac? */ -#endif -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - unsigned int extended_ms : 1; /*!< negotiate extended master secret? */ -#endif -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - unsigned int anti_replay : 1; /*!< detect and prevent replay? */ -#endif -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - unsigned int cbc_record_splitting : 1; /*!< do cbc record splitting */ -#endif -#if defined(MBEDTLS_SSL_RENEGOTIATION) - unsigned int disable_renegotiation : 1; /*!< disable renegotiation? */ -#endif -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - unsigned int trunc_hmac : 1; /*!< negotiate truncated hmac? */ -#endif -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - unsigned int session_tickets : 1; /*!< use session tickets? */ -#endif -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) && defined(MBEDTLS_SSL_CLI_C) - unsigned int fallback : 1; /*!< is this a fallback? */ -#endif -}; - - -struct mbedtls_ssl_context -{ - const mbedtls_ssl_config *conf; /*!< configuration information */ - - /* - * Miscellaneous - */ - int state; /*!< SSL handshake: current state */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - int renego_status; /*!< Initial, in progress, pending? */ - int renego_records_seen; /*!< Records since renego request, or with DTLS, - number of retransmissions of request if - renego_max_records is < 0 */ -#endif - - int major_ver; /*!< equal to MBEDTLS_SSL_MAJOR_VERSION_3 */ - int minor_ver; /*!< either 0 (SSL3) or 1 (TLS1.0) */ - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) - unsigned badmac_seen; /*!< records with a bad MAC received */ -#endif - - /* - * Callbacks - */ - int (*f_send)(void *, const unsigned char *, size_t); - int (*f_recv)(void *, unsigned char *, size_t); - int (*f_recv_timeout)(void *, unsigned char *, size_t, uint32_t); - void *p_bio; /*!< context for I/O operations */ - - /* - * Session layer - */ - mbedtls_ssl_session *session_in; /*!< current session data (in) */ - mbedtls_ssl_session *session_out; /*!< current session data (out) */ - mbedtls_ssl_session *session; /*!< negotiated session data */ - mbedtls_ssl_session *session_negotiate; /*!< session data in negotiation */ - - mbedtls_ssl_handshake_params *handshake; /*!< params required only during - the handshake process */ - - /* - * Record layer transformations - */ - mbedtls_ssl_transform *transform_in; /*!< current transform params (in) */ - mbedtls_ssl_transform *transform_out; /*!< current transform params (in) */ - mbedtls_ssl_transform *transform; /*!< negotiated transform params */ - mbedtls_ssl_transform *transform_negotiate; /*!< transform params in negotiation */ - - /* - * Timers - */ - void *p_timer; /*!< context for the timer callbacks */ - void (*f_set_timer)(void *, uint32_t, uint32_t); /*!< set timer callback */ - int (*f_get_timer)(void *); /*!< get timer callback */ - - /* - * Record layer (incoming data) - */ - unsigned char *in_buf; /*!< input buffer */ - unsigned char *in_ctr; /*!< 64-bit incoming message counter - TLS: maintained by us - DTLS: read from peer */ - unsigned char *in_hdr; /*!< start of record header */ - unsigned char *in_len; /*!< two-bytes message length field */ - unsigned char *in_iv; /*!< ivlen-byte IV */ - unsigned char *in_msg; /*!< message contents (in_iv+ivlen) */ - unsigned char *in_offt; /*!< read offset in application data */ - - int in_msgtype; /*!< record header: message type */ - size_t in_msglen; /*!< record header: message length */ - size_t in_left; /*!< amount of data read so far */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - uint16_t in_epoch; /*!< DTLS epoch for incoming records */ - size_t next_record_offset; /*!< offset of the next record in datagram - (equal to in_left if none) */ -#endif -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - uint64_t in_window_top; /*!< last validated record seq_num */ - uint64_t in_window; /*!< bitmask for replay detection */ -#endif - - size_t in_hslen; /*!< current handshake message length, - including the handshake header */ - int nb_zero; /*!< # of 0-length encrypted messages */ - int record_read; /*!< record is already present */ - - /* - * Record layer (outgoing data) - */ - unsigned char *out_buf; /*!< output buffer */ - unsigned char *out_ctr; /*!< 64-bit outgoing message counter */ - unsigned char *out_hdr; /*!< start of record header */ - unsigned char *out_len; /*!< two-bytes message length field */ - unsigned char *out_iv; /*!< ivlen-byte IV */ - unsigned char *out_msg; /*!< message contents (out_iv+ivlen) */ - - int out_msgtype; /*!< record header: message type */ - size_t out_msglen; /*!< record header: message length */ - size_t out_left; /*!< amount of data not yet written */ - -#if defined(MBEDTLS_ZLIB_SUPPORT) - unsigned char *compress_buf; /*!< zlib data buffer */ -#endif -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - signed char split_done; /*!< current record already splitted? */ -#endif - - /* - * PKI layer - */ - int client_auth; /*!< flag for client auth. */ - - /* - * User settings - */ -#if defined(MBEDTLS_X509_CRT_PARSE_C) - char *hostname; /*!< expected peer CN for verification - (and SNI if available) */ -#endif - -#if defined(MBEDTLS_SSL_ALPN) - const char *alpn_chosen; /*!< negotiated protocol */ -#endif - - /* - * Information for DTLS hello verify - */ -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) - unsigned char *cli_id; /*!< transport-level ID of the client */ - size_t cli_id_len; /*!< length of cli_id */ -#endif - - /* - * Secure renegotiation - */ - /* needed to know when to send extension on server */ - int secure_renegotiation; /*!< does peer support legacy or - secure renegotiation */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - size_t verify_data_len; /*!< length of verify data stored */ - char own_verify_data[MBEDTLS_SSL_VERIFY_DATA_MAX_LEN]; /*!< previous handshake verify data */ - char peer_verify_data[MBEDTLS_SSL_VERIFY_DATA_MAX_LEN]; /*!< previous handshake verify data */ -#endif -}; - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - -#define MBEDTLS_SSL_CHANNEL_OUTBOUND 0 -#define MBEDTLS_SSL_CHANNEL_INBOUND 1 - -extern int (*mbedtls_ssl_hw_record_init)(mbedtls_ssl_context *ssl, - const unsigned char *key_enc, const unsigned char *key_dec, - size_t keylen, - const unsigned char *iv_enc, const unsigned char *iv_dec, - size_t ivlen, - const unsigned char *mac_enc, const unsigned char *mac_dec, - size_t maclen); -extern int (*mbedtls_ssl_hw_record_activate)(mbedtls_ssl_context *ssl, int direction); -extern int (*mbedtls_ssl_hw_record_reset)(mbedtls_ssl_context *ssl); -extern int (*mbedtls_ssl_hw_record_write)(mbedtls_ssl_context *ssl); -extern int (*mbedtls_ssl_hw_record_read)(mbedtls_ssl_context *ssl); -extern int (*mbedtls_ssl_hw_record_finish)(mbedtls_ssl_context *ssl); -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ - -/** - * \brief Returns the list of ciphersuites supported by the SSL/TLS module. - * - * \return a statically allocated array of ciphersuites, the last - * entry is 0. - */ -const int *mbedtls_ssl_list_ciphersuites( void ); - -/** - * \brief Return the name of the ciphersuite associated with the - * given ID - * - * \param ciphersuite_id SSL ciphersuite ID - * - * \return a string containing the ciphersuite name - */ -const char *mbedtls_ssl_get_ciphersuite_name( const int ciphersuite_id ); - -/** - * \brief Return the ID of the ciphersuite associated with the - * given name - * - * \param ciphersuite_name SSL ciphersuite name - * - * \return the ID with the ciphersuite or 0 if not found - */ -int mbedtls_ssl_get_ciphersuite_id( const char *ciphersuite_name ); - -/** - * \brief Initialize an SSL context - * Just makes the context ready for mbedtls_ssl_setup() or - * mbedtls_ssl_free() - * - * \param ssl SSL context - */ -void mbedtls_ssl_init( mbedtls_ssl_context *ssl ); - -/** - * \brief Set up an SSL context for use - * - * \note No copy of the configuration context is made, it can be - * shared by many mbedtls_ssl_context structures. - * - * \warning Modifying the conf structure after is has been used in this - * function is unsupported! - * - * \param ssl SSL context - * \param conf SSL configuration to use - * - * \return 0 if successful, or MBEDTLS_ERR_SSL_ALLOC_FAILED if - * memory allocation failed - */ -int mbedtls_ssl_setup( mbedtls_ssl_context *ssl, - const mbedtls_ssl_config *conf ); - -/** - * \brief Reset an already initialized SSL context for re-use - * while retaining application-set variables, function - * pointers and data. - * - * \param ssl SSL context - * \return 0 if successful, or POLASSL_ERR_SSL_MALLOC_FAILED, - MBEDTLS_ERR_SSL_HW_ACCEL_FAILED or - * MBEDTLS_ERR_SSL_COMPRESSION_FAILED - */ -int mbedtls_ssl_session_reset( mbedtls_ssl_context *ssl ); - -/** - * \brief Set the current endpoint type - * - * \param conf SSL configuration - * \param endpoint must be MBEDTLS_SSL_IS_CLIENT or MBEDTLS_SSL_IS_SERVER - */ -void mbedtls_ssl_conf_endpoint( mbedtls_ssl_config *conf, int endpoint ); - -/** - * \brief Set the transport type (TLS or DTLS). - * Default: TLS - * - * \note For DTLS, you must either provide a recv callback that - * doesn't block, or one that handles timeouts, see - * \c mbedtls_ssl_set_bio(). You also need to provide timer - * callbacks with \c mbedtls_ssl_set_timer_cb(). - * - * \param conf SSL configuration - * \param transport transport type: - * MBEDTLS_SSL_TRANSPORT_STREAM for TLS, - * MBEDTLS_SSL_TRANSPORT_DATAGRAM for DTLS. - */ -void mbedtls_ssl_conf_transport( mbedtls_ssl_config *conf, int transport ); - -/** - * \brief Set the certificate verification mode - * Default: NONE on server, REQUIRED on client - * - * \param conf SSL configuration - * \param authmode can be: - * - * MBEDTLS_SSL_VERIFY_NONE: peer certificate is not checked - * (default on server) - * (insecure on client) - * - * MBEDTLS_SSL_VERIFY_OPTIONAL: peer certificate is checked, however the - * handshake continues even if verification failed; - * mbedtls_ssl_get_verify_result() can be called after the - * handshake is complete. - * - * MBEDTLS_SSL_VERIFY_REQUIRED: peer *must* present a valid certificate, - * handshake is aborted if verification failed. - * - * \note On client, MBEDTLS_SSL_VERIFY_REQUIRED is the recommended mode. - * With MBEDTLS_SSL_VERIFY_OPTIONAL, the user needs to call mbedtls_ssl_get_verify_result() at - * the right time(s), which may not be obvious, while REQUIRED always perform - * the verification as soon as possible. For example, REQUIRED was protecting - * against the "triple handshake" attack even before it was found. - */ -void mbedtls_ssl_conf_authmode( mbedtls_ssl_config *conf, int authmode ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/** - * \brief Set the verification callback (Optional). - * - * If set, the verify callback is called for each - * certificate in the chain. For implementation - * information, please see \c x509parse_verify() - * - * \param conf SSL configuration - * \param f_vrfy verification function - * \param p_vrfy verification parameter - */ -void mbedtls_ssl_conf_verify( mbedtls_ssl_config *conf, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -/** - * \brief Set the random number generator callback - * - * \param conf SSL configuration - * \param f_rng RNG function - * \param p_rng RNG parameter - */ -void mbedtls_ssl_conf_rng( mbedtls_ssl_config *conf, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Set the debug callback - * - * The callback has the following argument: - * void * opaque context for the callback - * int debug level - * const char * file name - * int line number - * const char * message - * - * \param conf SSL configuration - * \param f_dbg debug function - * \param p_dbg debug parameter - */ -void mbedtls_ssl_conf_dbg( mbedtls_ssl_config *conf, - void (*f_dbg)(void *, int, const char *, int, const char *), - void *p_dbg ); - -/** - * \brief Set the underlying BIO callbacks for write, read and - * read-with-timeout. - * - * \param ssl SSL context - * \param p_bio parameter (context) shared by BIO callbacks - * \param f_send write callback - * \param f_recv read callback - * \param f_recv_timeout blocking read callback with timeout. - * The last argument is the timeout in milliseconds, - * 0 means no timeout (block forever until a message comes) - * - * \note One of f_recv or f_recv_timeout can be NULL, in which case - * the other is used. If both are non-NULL, f_recv_timeout is - * used and f_recv is ignored (as if it were NULL). - * - * \note The two most common use cases are: - * - non-blocking I/O, f_recv != NULL, f_recv_timeout == NULL - * - blocking I/O, f_recv == NULL, f_recv_timout != NULL - * - * \note For DTLS, you need to provide either a non-NULL - * f_recv_timeout callback, or a f_recv that doesn't block. - */ -void mbedtls_ssl_set_bio( mbedtls_ssl_context *ssl, - void *p_bio, - int (*f_send)(void *, const unsigned char *, size_t), - int (*f_recv)(void *, unsigned char *, size_t), - int (*f_recv_timeout)(void *, unsigned char *, size_t, uint32_t) ); - -/** - * \brief Set the timeout period for mbedtls_ssl_read() - * (Default: no timeout.) - * - * \param conf SSL configuration context - * \param timeout Timeout value in milliseconds. - * Use 0 for no timeout (default). - * - * \note With blocking I/O, this will only work if a non-NULL - * \c f_recv_timeout was set with \c mbedtls_ssl_set_bio(). - * With non-blocking I/O, this will only work if timer - * callbacks were set with \c mbedtls_ssl_set_timer_cb(). - * - * \note With non-blocking I/O, you may also skip this function - * altogether and handle timeouts at the application layer. - */ -void mbedtls_ssl_conf_read_timeout( mbedtls_ssl_config *conf, uint32_t timeout ); - -/** - * \brief Set the timer callbacks - * (Mandatory for DTLS.) - * - * \param ssl SSL context - * \param p_timer parameter (context) shared by timer callback - * \param f_set_timer set timer callback - * Accepts an intermediate and a final delay in milliseconcs - * If the final delay is 0, cancels the running timer. - * \param f_get_timer get timer callback. Must return: - * -1 if cancelled - * 0 if none of the delays is expired - * 1 if the intermediate delay only is expired - * 2 if the final delay is expired - */ -void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, - void *p_timer, - void (*f_set_timer)(void *, uint32_t int_ms, uint32_t fin_ms), - int (*f_get_timer)(void *) ); - -/** - * \brief Callback type: generate and write session ticket - * - * \note This describes what a callback implementation should do. - * This callback should generate and encrypted and - * authenticated ticket for the session and write it to the - * output buffer. Here, ticket means the opaque ticket part - * of the NewSessionTicket structure of RFC 5077. - * - * \param p_ticket Context for the callback - * \param session SSL session to bo written in the ticket - * \param start Start of the outpur buffer - * \param end End of the output buffer - * \param tlen On exit, holds the length written - * \param lifetime On exit, holds the lifetime of the ticket in seconds - * - * \return 0 if successful, or - * a specific MBEDTLS_ERR_XXX code. - */ -typedef int mbedtls_ssl_ticket_write_t( void *p_ticket, - const mbedtls_ssl_session *session, - unsigned char *start, - const unsigned char *end, - size_t *tlen, - uint32_t *lifetime ); - -#if defined(MBEDTLS_SSL_EXPORT_KEYS) -/** - * \brief Callback type: Export key block and master secret - * - * \note This is required for certain uses of TLS, e.g. EAP-TLS - * (RFC 5216) and Thread. The key pointers are ephemeral and - * therefore must not be stored. The master secret and keys - * should not be used directly except as an input to a key - * derivation function. - * - * \param p_expkey Context for the callback - * \param ms Pointer to master secret (fixed length: 48 bytes) - * \param kb Pointer to key block, see RFC 5246 section 6.3 - * (variable length: 2 * maclen + 2 * keylen + 2 * ivlen). - * \param maclen MAC length - * \param keylen Key length - * \param ivlen IV length - * - * \return 0 if successful, or - * a specific MBEDTLS_ERR_XXX code. - */ -typedef int mbedtls_ssl_export_keys_t( void *p_expkey, - const unsigned char *ms, - const unsigned char *kb, - size_t maclen, - size_t keylen, - size_t ivlen ); -#endif /* MBEDTLS_SSL_EXPORT_KEYS */ - -/** - * \brief Callback type: parse and load session ticket - * - * \note This describes what a callback implementation should do. - * This callback should parse a session ticket as generated - * by the corresponding mbedtls_ssl_ticket_write_t function, - * and, if the ticket is authentic and valid, load the - * session. - * - * \note The implementation is allowed to modify the first len - * bytes of the input buffer, eg to use it as a temporary - * area for the decrypted ticket contents. - * - * \param p_ticket Context for the callback - * \param session SSL session to be loaded - * \param buf Start of the buffer containing the ticket - * \param len Length of the ticket. - * - * \return 0 if successful, or - * MBEDTLS_ERR_SSL_INVALID_MAC if not authentic, or - * MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED if expired, or - * any other non-zero code for other failures. - */ -typedef int mbedtls_ssl_ticket_parse_t( void *p_ticket, - mbedtls_ssl_session *session, - unsigned char *buf, - size_t len ); - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_SRV_C) -/** - * \brief Configure SSL session ticket callbacks (server only). - * (Default: none.) - * - * \note On server, session tickets are enabled by providing - * non-NULL callbacks. - * - * \note On client, use \c mbedtls_ssl_conf_session_tickets(). - * - * \param conf SSL configuration context - * \param f_ticket_write Callback for writing a ticket - * \param f_ticket_parse Callback for parsing a ticket - * \param p_ticket Context shared by the two callbacks - */ -void mbedtls_ssl_conf_session_tickets_cb( mbedtls_ssl_config *conf, - mbedtls_ssl_ticket_write_t *f_ticket_write, - mbedtls_ssl_ticket_parse_t *f_ticket_parse, - void *p_ticket ); -#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_SSL_EXPORT_KEYS) -/** - * \brief Configure key export callback. - * (Default: none.) - * - * \note See \c mbedtls_ssl_export_keys_t. - * - * \param conf SSL configuration context - * \param f_export_keys Callback for exporting keys - * \param p_export_keys Context for the callback - */ -void mbedtls_ssl_conf_export_keys_cb( mbedtls_ssl_config *conf, - mbedtls_ssl_export_keys_t *f_export_keys, - void *p_export_keys ); -#endif /* MBEDTLS_SSL_EXPORT_KEYS */ - -/** - * \brief Callback type: generate a cookie - * - * \param ctx Context for the callback - * \param p Buffer to write to, - * must be updated to point right after the cookie - * \param end Pointer to one past the end of the output buffer - * \param info Client ID info that was passed to - * \c mbedtls_ssl_set_client_transport_id() - * \param ilen Length of info in bytes - * - * \return The callback must return 0 on success, - * or a negative error code. - */ -typedef int mbedtls_ssl_cookie_write_t( void *ctx, - unsigned char **p, unsigned char *end, - const unsigned char *info, size_t ilen ); - -/** - * \brief Callback type: verify a cookie - * - * \param ctx Context for the callback - * \param cookie Cookie to verify - * \param clen Length of cookie - * \param info Client ID info that was passed to - * \c mbedtls_ssl_set_client_transport_id() - * \param ilen Length of info in bytes - * - * \return The callback must return 0 if cookie is valid, - * or a negative error code. - */ -typedef int mbedtls_ssl_cookie_check_t( void *ctx, - const unsigned char *cookie, size_t clen, - const unsigned char *info, size_t ilen ); - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) -/** - * \brief Register callbacks for DTLS cookies - * (Server only. DTLS only.) - * - * Default: dummy callbacks that fail, in order to force you to - * register working callbacks (and initialize their context). - * - * To disable HelloVerifyRequest, register NULL callbacks. - * - * \warning Disabling hello verification allows your server to be used - * for amplification in DoS attacks against other hosts. - * Only disable if you known this can't happen in your - * particular environment. - * - * \note See comments on \c mbedtls_ssl_handshake() about handling - * the MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED that is expected - * on the first handshake attempt when this is enabled. - * - * \note This is also necessary to handle client reconnection from - * the same port as described in RFC 6347 section 4.2.8 (only - * the variant with cookies is supported currently). See - * comments on \c mbedtls_ssl_read() for details. - * - * \param conf SSL configuration - * \param f_cookie_write Cookie write callback - * \param f_cookie_check Cookie check callback - * \param p_cookie Context for both callbacks - */ -void mbedtls_ssl_conf_dtls_cookies( mbedtls_ssl_config *conf, - mbedtls_ssl_cookie_write_t *f_cookie_write, - mbedtls_ssl_cookie_check_t *f_cookie_check, - void *p_cookie ); - -/** - * \brief Set client's transport-level identification info. - * (Server only. DTLS only.) - * - * This is usually the IP address (and port), but could be - * anything identify the client depending on the underlying - * network stack. Used for HelloVerifyRequest with DTLS. - * This is *not* used to route the actual packets. - * - * \param ssl SSL context - * \param info Transport-level info identifying the client (eg IP + port) - * \param ilen Length of info in bytes - * - * \note An internal copy is made, so the info buffer can be reused. - * - * \return 0 on success, - * MBEDTLS_ERR_SSL_BAD_INPUT_DATA if used on client, - * MBEDTLS_ERR_SSL_ALLOC_FAILED if out of memory. - */ -int mbedtls_ssl_set_client_transport_id( mbedtls_ssl_context *ssl, - const unsigned char *info, - size_t ilen ); - -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY && MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -/** - * \brief Enable or disable anti-replay protection for DTLS. - * (DTLS only, no effect on TLS.) - * Default: enabled. - * - * \param conf SSL configuration - * \param mode MBEDTLS_SSL_ANTI_REPLAY_ENABLED or MBEDTLS_SSL_ANTI_REPLAY_DISABLED. - * - * \warning Disabling this is a security risk unless the application - * protocol handles duplicated packets in a safe way. You - * should not disable this without careful consideration. - * However, if your application already detects duplicated - * packets and needs information about them to adjust its - * transmission strategy, then you'll want to disable this. - */ -void mbedtls_ssl_conf_dtls_anti_replay( mbedtls_ssl_config *conf, char mode ); -#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */ - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) -/** - * \brief Set a limit on the number of records with a bad MAC - * before terminating the connection. - * (DTLS only, no effect on TLS.) - * Default: 0 (disabled). - * - * \param conf SSL configuration - * \param limit Limit, or 0 to disable. - * - * \note If the limit is N, then the connection is terminated when - * the Nth non-authentic record is seen. - * - * \note Records with an invalid header are not counted, only the - * ones going through the authentication-decryption phase. - * - * \note This is a security trade-off related to the fact that it's - * often relatively easy for an active attacker ot inject UDP - * datagrams. On one hand, setting a low limit here makes it - * easier for such an attacker to forcibly terminated a - * connection. On the other hand, a high limit or no limit - * might make us waste resources checking authentication on - * many bogus packets. - */ -void mbedtls_ssl_conf_dtls_badmac_limit( mbedtls_ssl_config *conf, unsigned limit ); -#endif /* MBEDTLS_SSL_DTLS_BADMAC_LIMIT */ - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -/** - * \brief Set retransmit timeout values for the DTLS handshale. - * (DTLS only, no effect on TLS.) - * - * \param conf SSL configuration - * \param min Initial timeout value in milliseconds. - * Default: 1000 (1 second). - * \param max Maximum timeout value in milliseconds. - * Default: 60000 (60 seconds). - * - * \note Default values are from RFC 6347 section 4.2.4.1. - * - * \note Higher values for initial timeout may increase average - * handshake latency. Lower values may increase the risk of - * network congestion by causing more retransmissions. - */ -void mbedtls_ssl_conf_handshake_timeout( mbedtls_ssl_config *conf, uint32_t min, uint32_t max ); -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -#if defined(MBEDTLS_SSL_SRV_C) -/** - * \brief Set the session cache callbacks (server-side only) - * If not set, no session resuming is done (except if session - * tickets are enabled too). - * - * The session cache has the responsibility to check for stale - * entries based on timeout. See RFC 5246 for recommendations. - * - * Warning: session.peer_cert is cleared by the SSL/TLS layer on - * connection shutdown, so do not cache the pointer! Either set - * it to NULL or make a full copy of the certificate. - * - * The get callback is called once during the initial handshake - * to enable session resuming. The get function has the - * following parameters: (void *parameter, mbedtls_ssl_session *session) - * If a valid entry is found, it should fill the master of - * the session object with the cached values and return 0, - * return 1 otherwise. Optionally peer_cert can be set as well - * if it is properly present in cache entry. - * - * The set callback is called once during the initial handshake - * to enable session resuming after the entire handshake has - * been finished. The set function has the following parameters: - * (void *parameter, const mbedtls_ssl_session *session). The function - * should create a cache entry for future retrieval based on - * the data in the session structure and should keep in mind - * that the mbedtls_ssl_session object presented (and all its referenced - * data) is cleared by the SSL/TLS layer when the connection is - * terminated. It is recommended to add metadata to determine if - * an entry is still valid in the future. Return 0 if - * successfully cached, return 1 otherwise. - * - * \param conf SSL configuration - * \param p_cache parmater (context) for both callbacks - * \param f_get_cache session get callback - * \param f_set_cache session set callback - */ -void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf, - void *p_cache, - int (*f_get_cache)(void *, mbedtls_ssl_session *), - int (*f_set_cache)(void *, const mbedtls_ssl_session *) ); -#endif /* MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_SSL_CLI_C) -/** - * \brief Request resumption of session (client-side only) - * Session data is copied from presented session structure. - * - * \param ssl SSL context - * \param session session context - * - * \return 0 if successful, - * MBEDTLS_ERR_SSL_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_SSL_BAD_INPUT_DATA if used server-side or - * arguments are otherwise invalid - * - * \sa mbedtls_ssl_get_session() - */ -int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session ); -#endif /* MBEDTLS_SSL_CLI_C */ - -/** - * \brief Set the list of allowed ciphersuites and the preference - * order. First in the list has the highest preference. - * (Overrides all version specific lists) - * - * The ciphersuites array is not copied, and must remain - * valid for the lifetime of the ssl_config. - * - * Note: The server uses its own preferences - * over the preference of the client unless - * MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE is defined! - * - * \param conf SSL configuration - * \param ciphersuites 0-terminated list of allowed ciphersuites - */ -void mbedtls_ssl_conf_ciphersuites( mbedtls_ssl_config *conf, - const int *ciphersuites ); - -/** - * \brief Set the list of allowed ciphersuites and the - * preference order for a specific version of the protocol. - * (Only useful on the server side) - * - * The ciphersuites array is not copied, and must remain - * valid for the lifetime of the ssl_config. - * - * \param conf SSL configuration - * \param ciphersuites 0-terminated list of allowed ciphersuites - * \param major Major version number (only MBEDTLS_SSL_MAJOR_VERSION_3 - * supported) - * \param minor Minor version number (MBEDTLS_SSL_MINOR_VERSION_0, - * MBEDTLS_SSL_MINOR_VERSION_1 and MBEDTLS_SSL_MINOR_VERSION_2, - * MBEDTLS_SSL_MINOR_VERSION_3 supported) - * - * \note With DTLS, use MBEDTLS_SSL_MINOR_VERSION_2 for DTLS 1.0 - * and MBEDTLS_SSL_MINOR_VERSION_3 for DTLS 1.2 - */ -void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf, - const int *ciphersuites, - int major, int minor ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/** - * \brief Set the X.509 security profile used for verification - * - * \note The restrictions are enforced for all certificates in the - * chain. However, signatures in the handshake are not covered - * by this setting but by \b mbedtls_ssl_conf_sig_hashes(). - * - * \param conf SSL configuration - * \param profile Profile to use - */ -void mbedtls_ssl_conf_cert_profile( mbedtls_ssl_config *conf, - const mbedtls_x509_crt_profile *profile ); - -/** - * \brief Set the data required to verify peer certificate - * - * \param conf SSL configuration - * \param ca_chain trusted CA chain (meaning all fully trusted top-level CAs) - * \param ca_crl trusted CA CRLs - */ -void mbedtls_ssl_conf_ca_chain( mbedtls_ssl_config *conf, - mbedtls_x509_crt *ca_chain, - mbedtls_x509_crl *ca_crl ); - -/** - * \brief Set own certificate chain and private key - * - * \note own_cert should contain in order from the bottom up your - * certificate chain. The top certificate (self-signed) - * can be omitted. - * - * \note On server, this function can be called multiple times to - * provision more than one cert/key pair (eg one ECDSA, one - * RSA with SHA-256, one RSA with SHA-1). An adequate - * certificate will be selected according to the client's - * advertised capabilities. In case mutliple certificates are - * adequate, preference is given to the one set by the first - * call to this function, then second, etc. - * - * \note On client, only the first call has any effect. - * - * \param conf SSL configuration - * \param own_cert own public certificate chain - * \param pk_key own private key - * - * \return 0 on success or MBEDTLS_ERR_SSL_ALLOC_FAILED - */ -int mbedtls_ssl_conf_own_cert( mbedtls_ssl_config *conf, - mbedtls_x509_crt *own_cert, - mbedtls_pk_context *pk_key ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -/** - * \brief Set the Pre Shared Key (PSK) and the expected identity name - * - * \note This is mainly useful for clients. Servers will usually - * want to use \c mbedtls_ssl_conf_psk_cb() instead. - * - * \param conf SSL configuration - * \param psk pointer to the pre-shared key - * \param psk_len pre-shared key length - * \param psk_identity pointer to the pre-shared key identity - * \param psk_identity_len identity key length - * - * \return 0 if successful or MBEDTLS_ERR_SSL_ALLOC_FAILED - */ -int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf, - const unsigned char *psk, size_t psk_len, - const unsigned char *psk_identity, size_t psk_identity_len ); - - -/** - * \brief Set the Pre Shared Key (PSK) for the current handshake - * - * \note This should only be called inside the PSK callback, - * ie the function passed to \c mbedtls_ssl_conf_psk_cb(). - * - * \param ssl SSL context - * \param psk pointer to the pre-shared key - * \param psk_len pre-shared key length - * - * \return 0 if successful or MBEDTLS_ERR_SSL_ALLOC_FAILED - */ -int mbedtls_ssl_set_hs_psk( mbedtls_ssl_context *ssl, - const unsigned char *psk, size_t psk_len ); - -/** - * \brief Set the PSK callback (server-side only). - * - * If set, the PSK callback is called for each - * handshake where a PSK ciphersuite was negotiated. - * The caller provides the identity received and wants to - * receive the actual PSK data and length. - * - * The callback has the following parameters: (void *parameter, - * mbedtls_ssl_context *ssl, const unsigned char *psk_identity, - * size_t identity_len) - * If a valid PSK identity is found, the callback should use - * \c mbedtls_ssl_set_hs_psk() on the ssl context to set the - * correct PSK and return 0. - * Any other return value will result in a denied PSK identity. - * - * \note If you set a PSK callback using this function, then you - * don't need to set a PSK key and identity using - * \c mbedtls_ssl_conf_psk(). - * - * \param conf SSL configuration - * \param f_psk PSK identity function - * \param p_psk PSK identity parameter - */ -void mbedtls_ssl_conf_psk_cb( mbedtls_ssl_config *conf, - int (*f_psk)(void *, mbedtls_ssl_context *, const unsigned char *, - size_t), - void *p_psk ); -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_SRV_C) -/** - * \brief Set the Diffie-Hellman public P and G values, - * read as hexadecimal strings (server-side only) - * (Default: MBEDTLS_DHM_RFC5114_MODP_2048_[PG]) - * - * \param conf SSL configuration - * \param dhm_P Diffie-Hellman-Merkle modulus - * \param dhm_G Diffie-Hellman-Merkle generator - * - * \return 0 if successful - */ -int mbedtls_ssl_conf_dh_param( mbedtls_ssl_config *conf, const char *dhm_P, const char *dhm_G ); - -/** - * \brief Set the Diffie-Hellman public P and G values, - * read from existing context (server-side only) - * - * \param conf SSL configuration - * \param dhm_ctx Diffie-Hellman-Merkle context - * - * \return 0 if successful - */ -int mbedtls_ssl_conf_dh_param_ctx( mbedtls_ssl_config *conf, mbedtls_dhm_context *dhm_ctx ); -#endif /* MBEDTLS_DHM_C && defined(MBEDTLS_SSL_SRV_C) */ - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_CLI_C) -/** - * \brief Set the minimum length for Diffie-Hellman parameters. - * (Client-side only.) - * (Default: 1024 bits.) - * - * \param conf SSL configuration - * \param bitlen Minimum bit length of the DHM prime - */ -void mbedtls_ssl_conf_dhm_min_bitlen( mbedtls_ssl_config *conf, - unsigned int bitlen ); -#endif /* MBEDTLS_DHM_C && MBEDTLS_SSL_CLI_C */ - -#if defined(MBEDTLS_ECP_C) -/** - * \brief Set the allowed curves in order of preference. - * (Default: all defined curves.) - * - * On server: this only affects selection of the ECDHE curve; - * the curves used for ECDH and ECDSA are determined by the - * list of available certificates instead. - * - * On client: this affects the list of curves offered for any - * use. The server can override our preference order. - * - * Both sides: limits the set of curves accepted for use in - * ECDHE and in the peer's end-entity certificate. - * - * \note This has no influence on which curves are allowed inside the - * certificate chains, see \c mbedtls_ssl_conf_cert_profile() - * for that. For the end-entity certificate however, the key - * will be accepted only if it is allowed both by this list - * and by the cert profile. - * - * \note This list should be ordered by decreasing preference - * (preferred curve first). - * - * \param conf SSL configuration - * \param curves Ordered list of allowed curves, - * terminated by MBEDTLS_ECP_DP_NONE. - */ -void mbedtls_ssl_conf_curves( mbedtls_ssl_config *conf, - const mbedtls_ecp_group_id *curves ); -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -/** - * \brief Set the allowed hashes for signatures during the handshake. - * (Default: all available hashes except MD5.) - * - * \note This only affects which hashes are offered and can be used - * for signatures during the handshake. Hashes for message - * authentication and the TLS PRF are controlled by the - * ciphersuite, see \c mbedtls_ssl_conf_ciphersuites(). Hashes - * used for certificate signature are controlled by the - * verification profile, see \c mbedtls_ssl_conf_cert_profile(). - * - * \note This list should be ordered by decreasing preference - * (preferred hash first). - * - * \param conf SSL configuration - * \param hashes Ordered list of allowed signature hashes, - * terminated by \c MBEDTLS_MD_NONE. - */ -void mbedtls_ssl_conf_sig_hashes( mbedtls_ssl_config *conf, - const int *hashes ); -#endif /* MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/** - * \brief Set hostname for ServerName TLS extension - * (client-side only) - * - * - * \param ssl SSL context - * \param hostname the server hostname - * - * \return 0 if successful or MBEDTLS_ERR_SSL_ALLOC_FAILED - */ -int mbedtls_ssl_set_hostname( mbedtls_ssl_context *ssl, const char *hostname ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) -/** - * \brief Set own certificate and key for the current handshake - * - * \note Same as \c mbedtls_ssl_conf_own_cert() but for use within - * the SNI callback. - * - * \param ssl SSL context - * \param own_cert own public certificate chain - * \param pk_key own private key - * - * \return 0 on success or MBEDTLS_ERR_SSL_ALLOC_FAILED - */ -int mbedtls_ssl_set_hs_own_cert( mbedtls_ssl_context *ssl, - mbedtls_x509_crt *own_cert, - mbedtls_pk_context *pk_key ); - -/** - * \brief Set the data required to verify peer certificate for the - * current handshake - * - * \note Same as \c mbedtls_ssl_conf_ca_chain() but for use within - * the SNI callback. - * - * \param ssl SSL context - * \param ca_chain trusted CA chain (meaning all fully trusted top-level CAs) - * \param ca_crl trusted CA CRLs - */ -void mbedtls_ssl_set_hs_ca_chain( mbedtls_ssl_context *ssl, - mbedtls_x509_crt *ca_chain, - mbedtls_x509_crl *ca_crl ); - -/** - * \brief Set authmode for the current handshake. - * - * \note Same as \c mbedtls_ssl_conf_authmode() but for use within - * the SNI callback. - * - * \param ssl SSL context - * \param authmode MBEDTLS_SSL_VERIFY_NONE, MBEDTLS_SSL_VERIFY_OPTIONAL or - * MBEDTLS_SSL_VERIFY_REQUIRED - */ -void mbedtls_ssl_set_hs_authmode( mbedtls_ssl_context *ssl, - int authmode ); - -/** - * \brief Set server side ServerName TLS extension callback - * (optional, server-side only). - * - * If set, the ServerName callback is called whenever the - * server receives a ServerName TLS extension from the client - * during a handshake. The ServerName callback has the - * following parameters: (void *parameter, mbedtls_ssl_context *ssl, - * const unsigned char *hostname, size_t len). If a suitable - * certificate is found, the callback must set the - * certificate(s) and key(s) to use with \c - * mbedtls_ssl_set_hs_own_cert() (can be called repeatedly), - * and may optionally adjust the CA and associated CRL with \c - * mbedtls_ssl_set_hs_ca_chain() as well as the client - * authentication mode with \c mbedtls_ssl_set_hs_authmode(), - * then must return 0. If no matching name is found, the - * callback must either set a default cert, or - * return non-zero to abort the handshake at this point. - * - * \param conf SSL configuration - * \param f_sni verification function - * \param p_sni verification parameter - */ -void mbedtls_ssl_conf_sni( mbedtls_ssl_config *conf, - int (*f_sni)(void *, mbedtls_ssl_context *, const unsigned char *, - size_t), - void *p_sni ); -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -/** - * \brief Set the EC J-PAKE password for current handshake. - * - * \note An internal copy is made, and destroyed as soon as the - * handshake is completed, or when the SSL context is reset or - * freed. - * - * \note The SSL context needs to be already set up. The right place - * to call this function is between \c mbedtls_ssl_setup() or - * \c mbedtls_ssl_reset() and \c mbedtls_ssl_handshake(). - * - * \param ssl SSL context - * \param pw EC J-PAKE password (pre-shared secret) - * \param pw_len length of pw in bytes - * - * \return 0 on success, or a negative error code. - */ -int mbedtls_ssl_set_hs_ecjpake_password( mbedtls_ssl_context *ssl, - const unsigned char *pw, - size_t pw_len ); -#endif /*MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_ALPN) -/** - * \brief Set the supported Application Layer Protocols. - * - * \param conf SSL configuration - * \param protos NULL-terminated list of supported protocols, - * in decreasing preference order. - * - * \return 0 on success, or MBEDTLS_ERR_SSL_BAD_INPUT_DATA. - */ -int mbedtls_ssl_conf_alpn_protocols( mbedtls_ssl_config *conf, const char **protos ); - -/** - * \brief Get the name of the negotiated Application Layer Protocol. - * This function should be called after the handshake is - * completed. - * - * \param ssl SSL context - * - * \return Protcol name, or NULL if no protocol was negotiated. - */ -const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl ); -#endif /* MBEDTLS_SSL_ALPN */ - -/** - * \brief Set the maximum supported version sent from the client side - * and/or accepted at the server side - * (Default: MBEDTLS_SSL_MAX_MAJOR_VERSION, MBEDTLS_SSL_MAX_MINOR_VERSION) - * - * \note This ignores ciphersuites from higher versions. - * - * \note With DTLS, use MBEDTLS_SSL_MINOR_VERSION_2 for DTLS 1.0 and - * MBEDTLS_SSL_MINOR_VERSION_3 for DTLS 1.2 - * - * \param conf SSL configuration - * \param major Major version number (only MBEDTLS_SSL_MAJOR_VERSION_3 supported) - * \param minor Minor version number (MBEDTLS_SSL_MINOR_VERSION_0, - * MBEDTLS_SSL_MINOR_VERSION_1 and MBEDTLS_SSL_MINOR_VERSION_2, - * MBEDTLS_SSL_MINOR_VERSION_3 supported) - */ -void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int minor ); - -/** - * \brief Set the minimum accepted SSL/TLS protocol version - * (Default: TLS 1.0) - * - * \note Input outside of the SSL_MAX_XXXXX_VERSION and - * SSL_MIN_XXXXX_VERSION range is ignored. - * - * \note MBEDTLS_SSL_MINOR_VERSION_0 (SSL v3) should be avoided. - * - * \note With DTLS, use MBEDTLS_SSL_MINOR_VERSION_2 for DTLS 1.0 and - * MBEDTLS_SSL_MINOR_VERSION_3 for DTLS 1.2 - * - * \param conf SSL configuration - * \param major Major version number (only MBEDTLS_SSL_MAJOR_VERSION_3 supported) - * \param minor Minor version number (MBEDTLS_SSL_MINOR_VERSION_0, - * MBEDTLS_SSL_MINOR_VERSION_1 and MBEDTLS_SSL_MINOR_VERSION_2, - * MBEDTLS_SSL_MINOR_VERSION_3 supported) - */ -void mbedtls_ssl_conf_min_version( mbedtls_ssl_config *conf, int major, int minor ); - -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) && defined(MBEDTLS_SSL_CLI_C) -/** - * \brief Set the fallback flag (client-side only). - * (Default: MBEDTLS_SSL_IS_NOT_FALLBACK). - * - * \note Set to MBEDTLS_SSL_IS_FALLBACK when preparing a fallback - * connection, that is a connection with max_version set to a - * lower value than the value you're willing to use. Such - * fallback connections are not recommended but are sometimes - * necessary to interoperate with buggy (version-intolerant) - * servers. - * - * \warning You should NOT set this to MBEDTLS_SSL_IS_FALLBACK for - * non-fallback connections! This would appear to work for a - * while, then cause failures when the server is upgraded to - * support a newer TLS version. - * - * \param conf SSL configuration - * \param fallback MBEDTLS_SSL_IS_NOT_FALLBACK or MBEDTLS_SSL_IS_FALLBACK - */ -void mbedtls_ssl_conf_fallback( mbedtls_ssl_config *conf, char fallback ); -#endif /* MBEDTLS_SSL_FALLBACK_SCSV && MBEDTLS_SSL_CLI_C */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -/** - * \brief Enable or disable Encrypt-then-MAC - * (Default: MBEDTLS_SSL_ETM_ENABLED) - * - * \note This should always be enabled, it is a security - * improvement, and should not cause any interoperability - * issue (used only if the peer supports it too). - * - * \param conf SSL configuration - * \param etm MBEDTLS_SSL_ETM_ENABLED or MBEDTLS_SSL_ETM_DISABLED - */ -void mbedtls_ssl_conf_encrypt_then_mac( mbedtls_ssl_config *conf, char etm ); -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -/** - * \brief Enable or disable Extended Master Secret negotiation. - * (Default: MBEDTLS_SSL_EXTENDED_MS_ENABLED) - * - * \note This should always be enabled, it is a security fix to the - * protocol, and should not cause any interoperability issue - * (used only if the peer supports it too). - * - * \param conf SSL configuration - * \param ems MBEDTLS_SSL_EXTENDED_MS_ENABLED or MBEDTLS_SSL_EXTENDED_MS_DISABLED - */ -void mbedtls_ssl_conf_extended_master_secret( mbedtls_ssl_config *conf, char ems ); -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_ARC4_C) -/** - * \brief Disable or enable support for RC4 - * (Default: MBEDTLS_SSL_ARC4_DISABLED) - * - * \warning Use of RC4 in (D)TLS has been prohibited by RFC ???? - * for security reasons. Use at your own risks. - * - * \note This function will likely be removed in future versions as - * RC4 will then be disabled by default at compile time. - * - * \param conf SSL configuration - * \param arc4 MBEDTLS_SSL_ARC4_ENABLED or MBEDTLS_SSL_ARC4_DISABLED - */ -void mbedtls_ssl_conf_arc4_support( mbedtls_ssl_config *conf, char arc4 ); -#endif /* MBEDTLS_ARC4_C */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -/** - * \brief Set the maximum fragment length to emit and/or negotiate - * (Default: MBEDTLS_SSL_MAX_CONTENT_LEN, usually 2^14 bytes) - * (Server: set maximum fragment length to emit, - * usually negotiated by the client during handshake - * (Client: set maximum fragment length to emit *and* - * negotiate with the server during handshake) - * - * \param conf SSL configuration - * \param mfl_code Code for maximum fragment length (allowed values: - * MBEDTLS_SSL_MAX_FRAG_LEN_512, MBEDTLS_SSL_MAX_FRAG_LEN_1024, - * MBEDTLS_SSL_MAX_FRAG_LEN_2048, MBEDTLS_SSL_MAX_FRAG_LEN_4096) - * - * \return 0 if successful or MBEDTLS_ERR_SSL_BAD_INPUT_DATA - */ -int mbedtls_ssl_conf_max_frag_len( mbedtls_ssl_config *conf, unsigned char mfl_code ); -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -/** - * \brief Activate negotiation of truncated HMAC - * (Default: MBEDTLS_SSL_TRUNC_HMAC_DISABLED) - * - * \param conf SSL configuration - * \param truncate Enable or disable (MBEDTLS_SSL_TRUNC_HMAC_ENABLED or - * MBEDTLS_SSL_TRUNC_HMAC_DISABLED) - */ -void mbedtls_ssl_conf_truncated_hmac( mbedtls_ssl_config *conf, int truncate ); -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) -/** - * \brief Enable / Disable 1/n-1 record splitting - * (Default: MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED) - * - * \note Only affects SSLv3 and TLS 1.0, not higher versions. - * Does not affect non-CBC ciphersuites in any version. - * - * \param conf SSL configuration - * \param split MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED or - * MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED - */ -void mbedtls_ssl_conf_cbc_record_splitting( mbedtls_ssl_config *conf, char split ); -#endif /* MBEDTLS_SSL_CBC_RECORD_SPLITTING */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) -/** - * \brief Enable / Disable session tickets (client only). - * (Default: MBEDTLS_SSL_SESSION_TICKETS_ENABLED.) - * - * \note On server, use \c mbedtls_ssl_conf_session_tickets_cb(). - * - * \param conf SSL configuration - * \param use_tickets Enable or disable (MBEDTLS_SSL_SESSION_TICKETS_ENABLED or - * MBEDTLS_SSL_SESSION_TICKETS_DISABLED) - */ -void mbedtls_ssl_conf_session_tickets( mbedtls_ssl_config *conf, int use_tickets ); -#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_CLI_C */ - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -/** - * \brief Enable / Disable renegotiation support for connection when - * initiated by peer - * (Default: MBEDTLS_SSL_RENEGOTIATION_DISABLED) - * - * \warning It is recommended to always disable renegotation unless you - * know you need it and you know what you're doing. In the - * past, there has been several issues associated with - * renegotiation or a poor understanding of its properties. - * - * \note Server-side, enabling renegotiation also makes the server - * susceptible to a resource DoS by a malicious client. - * - * \param conf SSL configuration - * \param renegotiation Enable or disable (MBEDTLS_SSL_RENEGOTIATION_ENABLED or - * MBEDTLS_SSL_RENEGOTIATION_DISABLED) - */ -void mbedtls_ssl_conf_renegotiation( mbedtls_ssl_config *conf, int renegotiation ); -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - -/** - * \brief Prevent or allow legacy renegotiation. - * (Default: MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION) - * - * MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION allows connections to - * be established even if the peer does not support - * secure renegotiation, but does not allow renegotiation - * to take place if not secure. - * (Interoperable and secure option) - * - * MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION allows renegotiations - * with non-upgraded peers. Allowing legacy renegotiation - * makes the connection vulnerable to specific man in the - * middle attacks. (See RFC 5746) - * (Most interoperable and least secure option) - * - * MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE breaks off connections - * if peer does not support secure renegotiation. Results - * in interoperability issues with non-upgraded peers - * that do not support renegotiation altogether. - * (Most secure option, interoperability issues) - * - * \param conf SSL configuration - * \param allow_legacy Prevent or allow (SSL_NO_LEGACY_RENEGOTIATION, - * SSL_ALLOW_LEGACY_RENEGOTIATION or - * MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE) - */ -void mbedtls_ssl_conf_legacy_renegotiation( mbedtls_ssl_config *conf, int allow_legacy ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -/** - * \brief Enforce renegotiation requests. - * (Default: enforced, max_records = 16) - * - * When we request a renegotiation, the peer can comply or - * ignore the request. This function allows us to decide - * whether to enforce our renegotiation requests by closing - * the connection if the peer doesn't comply. - * - * However, records could already be in transit from the peer - * when the request is emitted. In order to increase - * reliability, we can accept a number of records before the - * expected handshake records. - * - * The optimal value is highly dependent on the specific usage - * scenario. - * - * \note With DTLS and server-initiated renegotiation, the - * HelloRequest is retransmited every time mbedtls_ssl_read() times - * out or receives Application Data, until: - * - max_records records have beens seen, if it is >= 0, or - * - the number of retransmits that would happen during an - * actual handshake has been reached. - * Please remember the request might be lost a few times - * if you consider setting max_records to a really low value. - * - * \warning On client, the grace period can only happen during - * mbedtls_ssl_read(), as opposed to mbedtls_ssl_write() and mbedtls_ssl_renegotiate() - * which always behave as if max_record was 0. The reason is, - * if we receive application data from the server, we need a - * place to write it, which only happens during mbedtls_ssl_read(). - * - * \param conf SSL configuration - * \param max_records Use MBEDTLS_SSL_RENEGOTIATION_NOT_ENFORCED if you don't want to - * enforce renegotiation, or a non-negative value to enforce - * it but allow for a grace period of max_records records. - */ -void mbedtls_ssl_conf_renegotiation_enforced( mbedtls_ssl_config *conf, int max_records ); - -/** - * \brief Set record counter threshold for periodic renegotiation. - * (Default: 2^64 - 256.) - * - * Renegotiation is automatically triggered when a record - * counter (outgoing or ingoing) crosses the defined - * threshold. The default value is meant to prevent the - * connection from being closed when the counter is about to - * reached its maximal value (it is not allowed to wrap). - * - * Lower values can be used to enforce policies such as "keys - * must be refreshed every N packets with cipher X". - * - * \param conf SSL configuration - * \param period The threshold value: a big-endian 64-bit number. - * Set to 2^64 - 1 to disable periodic renegotiation - */ -void mbedtls_ssl_conf_renegotiation_period( mbedtls_ssl_config *conf, - const unsigned char period[8] ); -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - -/** - * \brief Return the number of data bytes available to read - * - * \param ssl SSL context - * - * \return how many bytes are available in the read buffer - */ -size_t mbedtls_ssl_get_bytes_avail( const mbedtls_ssl_context *ssl ); - -/** - * \brief Return the result of the certificate verification - * - * \param ssl SSL context - * - * \return 0 if successful, - * -1 if result is not available (eg because the handshake was - * aborted too early), or - * a combination of BADCERT_xxx and BADCRL_xxx flags, see - * x509.h - */ -uint32_t mbedtls_ssl_get_verify_result( const mbedtls_ssl_context *ssl ); - -/** - * \brief Return the name of the current ciphersuite - * - * \param ssl SSL context - * - * \return a string containing the ciphersuite name - */ -const char *mbedtls_ssl_get_ciphersuite( const mbedtls_ssl_context *ssl ); - -/** - * \brief Return the current SSL version (SSLv3/TLSv1/etc) - * - * \param ssl SSL context - * - * \return a string containing the SSL version - */ -const char *mbedtls_ssl_get_version( const mbedtls_ssl_context *ssl ); - -/** - * \brief Return the (maximum) number of bytes added by the record - * layer: header + encryption/MAC overhead (inc. padding) - * - * \param ssl SSL context - * - * \return Current maximum record expansion in bytes, or - * MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE if compression is - * enabled, which makes expansion much less predictable - */ -int mbedtls_ssl_get_record_expansion( const mbedtls_ssl_context *ssl ); - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -/** - * \brief Return the maximum fragment length (payload, in bytes). - * This is the value negotiated with peer if any, - * or the locally configured value. - * - * \note With DTLS, \c mbedtls_ssl_write() will return an error if - * called with a larger length value. - * With TLS, \c mbedtls_ssl_write() will fragment the input if - * necessary and return the number of bytes written; it is up - * to the caller to call \c mbedtls_ssl_write() again in - * order to send the remaining bytes if any. - * - * \param ssl SSL context - * - * \return Current maximum fragment length. - */ -size_t mbedtls_ssl_get_max_frag_len( const mbedtls_ssl_context *ssl ); -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/** - * \brief Return the peer certificate from the current connection - * - * Note: Can be NULL in case no certificate was sent during - * the handshake. Different calls for the same connection can - * return the same or different pointers for the same - * certificate and even a different certificate altogether. - * The peer cert CAN change in a single connection if - * renegotiation is performed. - * - * \param ssl SSL context - * - * \return the current peer certificate - */ -const mbedtls_x509_crt *mbedtls_ssl_get_peer_cert( const mbedtls_ssl_context *ssl ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_CLI_C) -/** - * \brief Save session in order to resume it later (client-side only) - * Session data is copied to presented session structure. - * - * \warning Currently, peer certificate is lost in the operation. - * - * \param ssl SSL context - * \param session session context - * - * \return 0 if successful, - * MBEDTLS_ERR_SSL_ALLOC_FAILED if memory allocation failed, - * MBEDTLS_ERR_SSL_BAD_INPUT_DATA if used server-side or - * arguments are otherwise invalid - * - * \sa mbedtls_ssl_set_session() - */ -int mbedtls_ssl_get_session( const mbedtls_ssl_context *ssl, mbedtls_ssl_session *session ); -#endif /* MBEDTLS_SSL_CLI_C */ - -/** - * \brief Perform the SSL handshake - * - * \param ssl SSL context - * - * \return 0 if successful, or - * MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE, or - * MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED (see below), or - * a specific SSL error code. - * - * \note If this function returns something other than 0 or - * MBEDTLS_ERR_SSL_WANT_READ/WRITE, then the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - * - * \note If DTLS is in use, then you may choose to handle - * MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED specially for logging - * purposes, as it is an expected return value rather than an - * actual error, but you still need to reset/free the context. - */ -int mbedtls_ssl_handshake( mbedtls_ssl_context *ssl ); - -/** - * \brief Perform a single step of the SSL handshake - * - * \note The state of the context (ssl->state) will be at - * the following state after execution of this function. - * Do not call this function if state is MBEDTLS_SSL_HANDSHAKE_OVER. - * - * \note If this function returns something other than 0 or - * MBEDTLS_ERR_SSL_WANT_READ/WRITE, then the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - * - * \param ssl SSL context - * - * \return 0 if successful, or - * MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE, or - * a specific SSL error code. - */ -int mbedtls_ssl_handshake_step( mbedtls_ssl_context *ssl ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -/** - * \brief Initiate an SSL renegotiation on the running connection. - * Client: perform the renegotiation right now. - * Server: request renegotiation, which will be performed - * during the next call to mbedtls_ssl_read() if honored by client. - * - * \param ssl SSL context - * - * \return 0 if successful, or any mbedtls_ssl_handshake() return value. - * - * \note If this function returns something other than 0 or - * MBEDTLS_ERR_SSL_WANT_READ/WRITE, then the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - */ -int mbedtls_ssl_renegotiate( mbedtls_ssl_context *ssl ); -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - -/** - * \brief Read at most 'len' application data bytes - * - * \param ssl SSL context - * \param buf buffer that will hold the data - * \param len maximum number of bytes to read - * - * \return the number of bytes read, or - * 0 for EOF, or - * MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE, or - * MBEDTLS_ERR_SSL_CLIENT_RECONNECT (see below), or - * another negative error code. - * - * \note If this function returns something other than a positive - * value or MBEDTLS_ERR_SSL_WANT_READ/WRITE or - * MBEDTLS_ERR_SSL_CLIENT_RECONNECT, then the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - * - * \note When this function return MBEDTLS_ERR_SSL_CLIENT_RECONNECT - * (which can only happen server-side), it means that a client - * is initiating a new connection using the same source port. - * You can either treat that as a connection close and wait - * for the client to resend a ClientHello, or directly - * continue with \c mbedtls_ssl_handshake() with the same - * context (as it has beeen reset internally). Either way, you - * should make sure this is seen by the application as a new - * connection: application state, if any, should be reset, and - * most importantly the identity of the client must be checked - * again. WARNING: not validating the identity of the client - * again, or not transmitting the new identity to the - * application layer, would allow authentication bypass! - */ -int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len ); - -/** - * \brief Try to write exactly 'len' application data bytes - * - * \warning This function will do partial writes in some cases. If the - * return value is non-negative but less than length, the - * function must be called again with updated arguments: - * buf + ret, len - ret (if ret is the return value) until - * it returns a value equal to the last 'len' argument. - * - * \param ssl SSL context - * \param buf buffer holding the data - * \param len how many bytes must be written - * - * \return the number of bytes actually written (may be less than len), - * or MBEDTLS_ERR_SSL_WANT_WRITE of MBEDTLS_ERR_SSL_WANT_READ, - * or another negative error code. - * - * \note If this function returns something other than a positive - * value or MBEDTLS_ERR_SSL_WANT_READ/WRITE, the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - * - * \note When this function returns MBEDTLS_ERR_SSL_WANT_WRITE/READ, - * it must be called later with the *same* arguments, - * until it returns a positive value. - * - * \note If the requested length is greater than the maximum - * fragment length (either the built-in limit or the one set - * or negotiated with the peer), then: - * - with TLS, less bytes than requested are written. - * - with DTLS, MBEDTLS_ERR_SSL_BAD_INPUT_DATA is returned. - * \c mbedtls_ssl_get_max_frag_len() may be used to query the - * active maximum fragment length. - */ -int mbedtls_ssl_write( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ); - -/** - * \brief Send an alert message - * - * \param ssl SSL context - * \param level The alert level of the message - * (MBEDTLS_SSL_ALERT_LEVEL_WARNING or MBEDTLS_SSL_ALERT_LEVEL_FATAL) - * \param message The alert message (SSL_ALERT_MSG_*) - * - * \return 0 if successful, or a specific SSL error code. - * - * \note If this function returns something other than 0 or - * MBEDTLS_ERR_SSL_WANT_READ/WRITE, then the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - */ -int mbedtls_ssl_send_alert_message( mbedtls_ssl_context *ssl, - unsigned char level, - unsigned char message ); -/** - * \brief Notify the peer that the connection is being closed - * - * \param ssl SSL context - * - * \return 0 if successful, or a specific SSL error code. - * - * \note If this function returns something other than 0 or - * MBEDTLS_ERR_SSL_WANT_READ/WRITE, then the ssl context - * becomes unusable, and you should either free it or call - * \c mbedtls_ssl_session_reset() on it before re-using it for - * a new connection; the current connection must be closed. - */ -int mbedtls_ssl_close_notify( mbedtls_ssl_context *ssl ); - -/** - * \brief Free referenced items in an SSL context and clear memory - * - * \param ssl SSL context - */ -void mbedtls_ssl_free( mbedtls_ssl_context *ssl ); - -/** - * \brief Initialize an SSL configuration context - * Just makes the context ready for - * mbedtls_ssl_config_defaults() or mbedtls_ssl_config_free(). - * - * \note You need to call mbedtls_ssl_config_defaults() unless you - * manually set all of the relevent fields yourself. - * - * \param conf SSL configuration context - */ -void mbedtls_ssl_config_init( mbedtls_ssl_config *conf ); - -/** - * \brief Load reasonnable default SSL configuration values. - * (You need to call mbedtls_ssl_config_init() first.) - * - * \param conf SSL configuration context - * \param endpoint MBEDTLS_SSL_IS_CLIENT or MBEDTLS_SSL_IS_SERVER - * \param transport MBEDTLS_SSL_TRANSPORT_STREAM for TLS, or - * MBEDTLS_SSL_TRANSPORT_DATAGRAM for DTLS - * \param preset a MBEDTLS_SSL_PRESET_XXX value - * (currently unused). - * - * \note See \c mbedtls_ssl_conf_transport() for notes on DTLS. - * - * \return 0 if successful, or - * MBEDTLS_ERR_XXX_ALLOC_FAILED on memory allocation error. - */ -int mbedtls_ssl_config_defaults( mbedtls_ssl_config *conf, - int endpoint, int transport, int preset ); - -/** - * \brief Free an SSL configuration context - * - * \param conf SSL configuration context - */ -void mbedtls_ssl_config_free( mbedtls_ssl_config *conf ); - -/** - * \brief Initialize SSL session structure - * - * \param session SSL session - */ -void mbedtls_ssl_session_init( mbedtls_ssl_session *session ); - -/** - * \brief Free referenced items in an SSL session including the - * peer certificate and clear memory - * - * \param session SSL session - */ -void mbedtls_ssl_session_free( mbedtls_ssl_session *session ); - -#ifdef __cplusplus -} -#endif - -#endif /* ssl.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cache.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cache.h deleted file mode 100644 index 1155924a92..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cache.h +++ /dev/null @@ -1,143 +0,0 @@ -/** - * \file ssl_cache.h - * - * \brief SSL session cache implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SSL_CACHE_H -#define MBEDTLS_SSL_CACHE_H - -#include "ssl.h" - -#if defined(MBEDTLS_THREADING_C) -#include "threading.h" -#endif - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT) -#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /*!< 1 day */ -#endif - -#if !defined(MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES) -#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /*!< Maximum entries in cache */ -#endif - -/* \} name SECTION: Module settings */ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct mbedtls_ssl_cache_context mbedtls_ssl_cache_context; -typedef struct mbedtls_ssl_cache_entry mbedtls_ssl_cache_entry; - -/** - * \brief This structure is used for storing cache entries - */ -struct mbedtls_ssl_cache_entry -{ -#if defined(MBEDTLS_HAVE_TIME) - time_t timestamp; /*!< entry timestamp */ -#endif - mbedtls_ssl_session session; /*!< entry session */ -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_buf peer_cert; /*!< entry peer_cert */ -#endif - mbedtls_ssl_cache_entry *next; /*!< chain pointer */ -}; - -/** - * \brief Cache context - */ -struct mbedtls_ssl_cache_context -{ - mbedtls_ssl_cache_entry *chain; /*!< start of the chain */ - int timeout; /*!< cache entry timeout */ - int max_entries; /*!< maximum entries */ -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; /*!< mutex */ -#endif -}; - -/** - * \brief Initialize an SSL cache context - * - * \param cache SSL cache context - */ -void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache ); - -/** - * \brief Cache get callback implementation - * (Thread-safe if MBEDTLS_THREADING_C is enabled) - * - * \param data SSL cache context - * \param session session to retrieve entry for - */ -int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ); - -/** - * \brief Cache set callback implementation - * (Thread-safe if MBEDTLS_THREADING_C is enabled) - * - * \param data SSL cache context - * \param session session to store entry for - */ -int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ); - -#if defined(MBEDTLS_HAVE_TIME) -/** - * \brief Set the cache timeout - * (Default: MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT (1 day)) - * - * A timeout of 0 indicates no timeout. - * - * \param cache SSL cache context - * \param timeout cache entry timeout in seconds - */ -void mbedtls_ssl_cache_set_timeout( mbedtls_ssl_cache_context *cache, int timeout ); -#endif /* MBEDTLS_HAVE_TIME */ - -/** - * \brief Set the maximum number of cache entries - * (Default: MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES (50)) - * - * \param cache SSL cache context - * \param max cache entry maximum - */ -void mbedtls_ssl_cache_set_max_entries( mbedtls_ssl_cache_context *cache, int max ); - -/** - * \brief Free referenced items in a cache context and clear memory - * - * \param cache SSL cache context - */ -void mbedtls_ssl_cache_free( mbedtls_ssl_cache_context *cache ); - -#ifdef __cplusplus -} -#endif - -#endif /* ssl_cache.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ciphersuites.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ciphersuites.h deleted file mode 100644 index deaaa37515..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ciphersuites.h +++ /dev/null @@ -1,321 +0,0 @@ -/** - * \file ssl_ciphersuites.h - * - * \brief SSL Ciphersuites for mbed TLS - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SSL_CIPHERSUITES_H -#define MBEDTLS_SSL_CIPHERSUITES_H - -#include "pk.h" -#include "cipher.h" -#include "md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Supported ciphersuites (Official IANA names) - */ -#define MBEDTLS_TLS_RSA_WITH_NULL_MD5 0x01 /**< Weak! */ -#define MBEDTLS_TLS_RSA_WITH_NULL_SHA 0x02 /**< Weak! */ - -#define MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 0x04 -#define MBEDTLS_TLS_RSA_WITH_RC4_128_SHA 0x05 -#define MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA 0x09 /**< Weak! Not in TLS 1.2 */ - -#define MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA 0x0A - -#define MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA 0x15 /**< Weak! Not in TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 0x16 - -#define MBEDTLS_TLS_PSK_WITH_NULL_SHA 0x2C /**< Weak! */ -#define MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA 0x2D /**< Weak! */ -#define MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA 0x2E /**< Weak! */ -#define MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA 0x2F - -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x33 -#define MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA 0x35 -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x39 - -#define MBEDTLS_TLS_RSA_WITH_NULL_SHA256 0x3B /**< Weak! */ -#define MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 0x3C /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 0x3D /**< TLS 1.2 */ - -#define MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 0x41 -#define MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x45 - -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x67 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x6B /**< TLS 1.2 */ - -#define MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 0x84 -#define MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x88 - -#define MBEDTLS_TLS_PSK_WITH_RC4_128_SHA 0x8A -#define MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA 0x8B -#define MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA 0x8C -#define MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA 0x8D - -#define MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA 0x8E -#define MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x8F -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA 0x90 -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA 0x91 - -#define MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA 0x92 -#define MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x93 -#define MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA 0x94 -#define MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA 0x95 - -#define MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 0x9C /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 0x9D /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x9E /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x9F /**< TLS 1.2 */ - -#define MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 0xA8 /**< TLS 1.2 */ -#define MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 0xA9 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 0xAA /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 0xAB /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 0xAC /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 0xAD /**< TLS 1.2 */ - -#define MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 0xAE -#define MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 0xAF -#define MBEDTLS_TLS_PSK_WITH_NULL_SHA256 0xB0 /**< Weak! */ -#define MBEDTLS_TLS_PSK_WITH_NULL_SHA384 0xB1 /**< Weak! */ - -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 0xB2 -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 0xB3 -#define MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256 0xB4 /**< Weak! */ -#define MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384 0xB5 /**< Weak! */ - -#define MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 0xB6 -#define MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 0xB7 -#define MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256 0xB8 /**< Weak! */ -#define MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384 0xB9 /**< Weak! */ - -#define MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xBA /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xBE /**< TLS 1.2 */ - -#define MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 0xC0 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0xC4 /**< TLS 1.2 */ - -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA 0xC001 /**< Weak! */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA 0xC002 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC003 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0xC004 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0xC005 /**< Not in SSL3! */ - -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA 0xC006 /**< Weak! */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 0xC007 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC008 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xC009 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xC00A /**< Not in SSL3! */ - -#define MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA 0xC00B /**< Weak! */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA 0xC00C /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 0xC00D /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 0xC00E /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 0xC00F /**< Not in SSL3! */ - -#define MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA 0xC010 /**< Weak! */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA 0xC011 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 0xC012 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xC013 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xC014 /**< Not in SSL3! */ - -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xC023 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xC024 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 0xC025 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 0xC026 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xC027 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xC028 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 0xC029 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 0xC02A /**< TLS 1.2 */ - -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0xC02D /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0xC02E /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xC030 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xC031 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 0xC032 /**< TLS 1.2 */ - -#define MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA 0xC033 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0xC034 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA 0xC035 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA 0xC036 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0xC037 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0xC038 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA 0xC039 /**< Weak! No SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256 0xC03A /**< Weak! No SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384 0xC03B /**< Weak! No SSL3! */ - -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0xC072 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0xC073 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0xC074 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0xC075 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xC076 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0xC077 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xC078 /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0xC079 /**< Not in SSL3! */ - -#define MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07A /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07B /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07C /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07D /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 0xC086 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 0xC087 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 0xC088 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 0xC089 /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC08A /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC08B /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC08C /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC08D /**< TLS 1.2 */ - -#define MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC08E /**< TLS 1.2 */ -#define MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC08F /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC090 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC091 /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC092 /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC093 /**< TLS 1.2 */ - -#define MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC094 -#define MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC095 -#define MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC096 -#define MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC097 -#define MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC098 -#define MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC099 -#define MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC09A /**< Not in SSL3! */ -#define MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC09B /**< Not in SSL3! */ - -#define MBEDTLS_TLS_RSA_WITH_AES_128_CCM 0xC09C /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_WITH_AES_256_CCM 0xC09D /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM 0xC09E /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM 0xC09F /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8 0xC0A0 /**< TLS 1.2 */ -#define MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8 0xC0A1 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8 0xC0A2 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8 0xC0A3 /**< TLS 1.2 */ -#define MBEDTLS_TLS_PSK_WITH_AES_128_CCM 0xC0A4 /**< TLS 1.2 */ -#define MBEDTLS_TLS_PSK_WITH_AES_256_CCM 0xC0A5 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM 0xC0A6 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM 0xC0A7 /**< TLS 1.2 */ -#define MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8 0xC0A8 /**< TLS 1.2 */ -#define MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8 0xC0A9 /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8 0xC0AA /**< TLS 1.2 */ -#define MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8 0xC0AB /**< TLS 1.2 */ -/* The last two are named with PSK_DHE in the RFC, which looks like a typo */ - -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM 0xC0AC /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM 0xC0AD /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 0xC0AE /**< TLS 1.2 */ -#define MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 0xC0AF /**< TLS 1.2 */ - -#define MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 0xC0FF /**< experimental */ - -/* Reminder: update mbedtls_ssl_premaster_secret when adding a new key exchange. - * Reminder: update MBEDTLS_KEY_EXCHANGE__xxx below - */ -typedef enum { - MBEDTLS_KEY_EXCHANGE_NONE = 0, - MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_KEY_EXCHANGE_ECJPAKE, -} mbedtls_key_exchange_type_t; - -/* Key exchanges using a certificate */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) -#define MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED -#endif - -/* Key exchanges using a PSK */ -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) -#define MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED -#endif - -/* Key exchanges using a ECDHE */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) -#define MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED -#endif - -typedef struct mbedtls_ssl_ciphersuite_t mbedtls_ssl_ciphersuite_t; - -#define MBEDTLS_CIPHERSUITE_WEAK 0x01 /**< Weak ciphersuite flag */ -#define MBEDTLS_CIPHERSUITE_SHORT_TAG 0x02 /**< Short authentication tag, - eg for CCM_8 */ -#define MBEDTLS_CIPHERSUITE_NODTLS 0x04 /**< Can't be used with DTLS */ - -/** - * \brief This structure is used for storing ciphersuite information - */ -struct mbedtls_ssl_ciphersuite_t -{ - int id; - const char * name; - - mbedtls_cipher_type_t cipher; - mbedtls_md_type_t mac; - mbedtls_key_exchange_type_t key_exchange; - - int min_major_ver; - int min_minor_ver; - int max_major_ver; - int max_minor_ver; - - unsigned char flags; -}; - -const int *mbedtls_ssl_list_ciphersuites( void ); - -const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string( const char *ciphersuite_name ); -const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id( int ciphersuite_id ); - -#if defined(MBEDTLS_PK_C) -mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg( const mbedtls_ssl_ciphersuite_t *info ); -#endif - -int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info ); -int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info ); - -#ifdef __cplusplus -} -#endif - -#endif /* ssl_ciphersuites.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cookie.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cookie.h deleted file mode 100644 index 037e1c3112..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_cookie.h +++ /dev/null @@ -1,108 +0,0 @@ -/** - * \file ssl_cookie.h - * - * \brief DTLS cookie callbacks implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SSL_COOKIE_H -#define MBEDTLS_SSL_COOKIE_H - -#include "ssl.h" - -#if defined(MBEDTLS_THREADING_C) -#include "threading.h" -#endif - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ -#ifndef MBEDTLS_SSL_COOKIE_TIMEOUT -#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ -#endif - -/* \} name SECTION: Module settings */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Context for the default cookie functions. - */ -typedef struct -{ - mbedtls_md_context_t hmac_ctx; /*!< context for the HMAC portion */ -#if !defined(MBEDTLS_HAVE_TIME) - unsigned long serial; /*!< serial number for expiration */ -#endif - unsigned long timeout; /*!< timeout delay, in seconds if HAVE_TIME, - or in number of tickets issued */ - -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; -#endif -} mbedtls_ssl_cookie_ctx; - -/** - * \brief Initialize cookie context - */ -void mbedtls_ssl_cookie_init( mbedtls_ssl_cookie_ctx *ctx ); - -/** - * \brief Setup cookie context (generate keys) - */ -int mbedtls_ssl_cookie_setup( mbedtls_ssl_cookie_ctx *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Set expiration delay for cookies - * (Default MBEDTLS_SSL_COOKIE_TIMEOUT) - * - * \param ctx Cookie contex - * \param delay Delay, in seconds if HAVE_TIME, or in number of cookies - * issued in the meantime. - * 0 to disable expiration (NOT recommended) - */ -void mbedtls_ssl_cookie_set_timeout( mbedtls_ssl_cookie_ctx *ctx, unsigned long delay ); - -/** - * \brief Free cookie context - */ -void mbedtls_ssl_cookie_free( mbedtls_ssl_cookie_ctx *ctx ); - -/** - * \brief Generate cookie, see \c mbedtls_ssl_cookie_write_t - */ -mbedtls_ssl_cookie_write_t mbedtls_ssl_cookie_write; - -/** - * \brief Verify cookie, see \c mbedtls_ssl_cookie_write_t - */ -mbedtls_ssl_cookie_check_t mbedtls_ssl_cookie_check; - -#ifdef __cplusplus -} -#endif - -#endif /* ssl_cookie.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_internal.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_internal.h deleted file mode 100644 index 3af059f89e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_internal.h +++ /dev/null @@ -1,495 +0,0 @@ -/** - * \file ssl_ticket.h - * - * \brief Internal functions shared by the SSL modules - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SSL_INTERNAL_H -#define MBEDTLS_SSL_INTERNAL_H - -#include "ssl.h" - -#if defined(MBEDTLS_MD5_C) -#include "md5.h" -#endif - -#if defined(MBEDTLS_SHA1_C) -#include "sha1.h" -#endif - -#if defined(MBEDTLS_SHA256_C) -#include "sha256.h" -#endif - -#if defined(MBEDTLS_SHA512_C) -#include "sha512.h" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -#include "ecjpake.h" -#endif - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -/* Determine minimum supported version */ -#define MBEDTLS_SSL_MIN_MAJOR_VERSION MBEDTLS_SSL_MAJOR_VERSION_3 - -#if defined(MBEDTLS_SSL_PROTO_SSL3) -#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_0 -#else -#if defined(MBEDTLS_SSL_PROTO_TLS1) -#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_1 -#else -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) -#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_2 -#else -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_3 -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_1 */ -#endif /* MBEDTLS_SSL_PROTO_TLS1 */ -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - -/* Determine maximum supported version */ -#define MBEDTLS_SSL_MAX_MAJOR_VERSION MBEDTLS_SSL_MAJOR_VERSION_3 - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_3 -#else -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) -#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_2 -#else -#if defined(MBEDTLS_SSL_PROTO_TLS1) -#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_1 -#else -#if defined(MBEDTLS_SSL_PROTO_SSL3) -#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_0 -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#endif /* MBEDTLS_SSL_PROTO_TLS1 */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_1 */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -#define MBEDTLS_SSL_INITIAL_HANDSHAKE 0 -#define MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS 1 /* In progress */ -#define MBEDTLS_SSL_RENEGOTIATION_DONE 2 /* Done or aborted */ -#define MBEDTLS_SSL_RENEGOTIATION_PENDING 3 /* Requested (server only) */ - -/* - * DTLS retransmission states, see RFC 6347 4.2.4 - * - * The SENDING state is merged in PREPARING for initial sends, - * but is distinct for resends. - * - * Note: initial state is wrong for server, but is not used anyway. - */ -#define MBEDTLS_SSL_RETRANS_PREPARING 0 -#define MBEDTLS_SSL_RETRANS_SENDING 1 -#define MBEDTLS_SSL_RETRANS_WAITING 2 -#define MBEDTLS_SSL_RETRANS_FINISHED 3 - -/* - * Allow extra bytes for record, authentication and encryption overhead: - * counter (8) + header (5) + IV(16) + MAC (16-48) + padding (0-256) - * and allow for a maximum of 1024 of compression expansion if - * enabled. - */ -#if defined(MBEDTLS_ZLIB_SUPPORT) -#define MBEDTLS_SSL_COMPRESSION_ADD 1024 -#else -#define MBEDTLS_SSL_COMPRESSION_ADD 0 -#endif - -#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_MODE_CBC) -/* Ciphersuites using HMAC */ -#if defined(MBEDTLS_SHA512_C) -#define MBEDTLS_SSL_MAC_ADD 48 /* SHA-384 used for HMAC */ -#elif defined(MBEDTLS_SHA256_C) -#define MBEDTLS_SSL_MAC_ADD 32 /* SHA-256 used for HMAC */ -#else -#define MBEDTLS_SSL_MAC_ADD 20 /* SHA-1 used for HMAC */ -#endif -#else -/* AEAD ciphersuites: GCM and CCM use a 128 bits tag */ -#define MBEDTLS_SSL_MAC_ADD 16 -#endif - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#define MBEDTLS_SSL_PADDING_ADD 256 -#else -#define MBEDTLS_SSL_PADDING_ADD 0 -#endif - -#define MBEDTLS_SSL_BUFFER_LEN ( MBEDTLS_SSL_MAX_CONTENT_LEN \ - + MBEDTLS_SSL_COMPRESSION_ADD \ - + 29 /* counter + header + IV */ \ - + MBEDTLS_SSL_MAC_ADD \ - + MBEDTLS_SSL_PADDING_ADD \ - ) - -/* - * TLS extension flags (for extensions with outgoing ServerHello content - * that need it (e.g. for RENEGOTIATION_INFO the server already knows because - * of state of the renegotiation flag, so no indicator is required) - */ -#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT (1 << 0) -#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK (1 << 1) - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This structure contains the parameters only needed during handshake. - */ -struct mbedtls_ssl_handshake_params -{ - /* - * Handshake specific crypto variables - */ - int sig_alg; /*!< Hash algorithm for signature */ - int cert_type; /*!< Requested cert type */ - int verify_sig_alg; /*!< Signature algorithm for verify */ -#if defined(MBEDTLS_DHM_C) - mbedtls_dhm_context dhm_ctx; /*!< DHM key exchange */ -#endif -#if defined(MBEDTLS_ECDH_C) - mbedtls_ecdh_context ecdh_ctx; /*!< ECDH key exchange */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - mbedtls_ecjpake_context ecjpake_ctx; /*!< EC J-PAKE key exchange */ -#if defined(MBEDTLS_SSL_CLI_C) - unsigned char *ecjpake_cache; /*!< Cache for ClientHello ext */ - size_t ecjpake_cache_len; /*!< Length of cached data */ -#endif -#endif -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - const mbedtls_ecp_curve_info **curves; /*!< Supported elliptic curves */ -#endif -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - unsigned char *psk; /*!< PSK from the callback */ - size_t psk_len; /*!< Length of PSK from callback */ -#endif -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_ssl_key_cert *key_cert; /*!< chosen key/cert pair (server) */ -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - int sni_authmode; /*!< authmode from SNI callback */ - mbedtls_ssl_key_cert *sni_key_cert; /*!< key/cert list from SNI */ - mbedtls_x509_crt *sni_ca_chain; /*!< trusted CAs from SNI callback */ - mbedtls_x509_crl *sni_ca_crl; /*!< trusted CAs CRLs from SNI */ -#endif -#endif /* MBEDTLS_X509_CRT_PARSE_C */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - unsigned int out_msg_seq; /*!< Outgoing handshake sequence number */ - unsigned int in_msg_seq; /*!< Incoming handshake sequence number */ - - unsigned char *verify_cookie; /*!< Cli: HelloVerifyRequest cookie - Srv: unused */ - unsigned char verify_cookie_len; /*!< Cli: cookie length - Srv: flag for sending a cookie */ - - unsigned char *hs_msg; /*!< Reassembled handshake message */ - - uint32_t retransmit_timeout; /*!< Current value of timeout */ - unsigned char retransmit_state; /*!< Retransmission state */ - mbedtls_ssl_flight_item *flight; /*!< Current outgoing flight */ - mbedtls_ssl_flight_item *cur_msg; /*!< Current message in flight */ - unsigned int in_flight_start_seq; /*!< Minimum message sequence in the - flight being received */ - mbedtls_ssl_transform *alt_transform_out; /*!< Alternative transform for - resending messages */ - unsigned char alt_out_ctr[8]; /*!< Alternative record epoch/counter - for resending messages */ -#endif - - /* - * Checksum contexts - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - mbedtls_md5_context fin_md5; - mbedtls_sha1_context fin_sha1; -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) - mbedtls_sha256_context fin_sha256; -#endif -#if defined(MBEDTLS_SHA512_C) - mbedtls_sha512_context fin_sha512; -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - - void (*update_checksum)(mbedtls_ssl_context *, const unsigned char *, size_t); - void (*calc_verify)(mbedtls_ssl_context *, unsigned char *); - void (*calc_finished)(mbedtls_ssl_context *, unsigned char *, int); - int (*tls_prf)(const unsigned char *, size_t, const char *, - const unsigned char *, size_t, - unsigned char *, size_t); - - size_t pmslen; /*!< premaster length */ - - unsigned char randbytes[64]; /*!< random bytes */ - unsigned char premaster[MBEDTLS_PREMASTER_SIZE]; - /*!< premaster secret */ - - int resume; /*!< session resume indicator*/ - int max_major_ver; /*!< max. major version client*/ - int max_minor_ver; /*!< max. minor version client*/ - int cli_exts; /*!< client extension presence*/ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - int new_session_ticket; /*!< use NewSessionTicket? */ -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - int extended_ms; /*!< use Extended Master Secret? */ -#endif -}; - -/* - * This structure contains a full set of runtime transform parameters - * either in negotiation or active. - */ -struct mbedtls_ssl_transform -{ - /* - * Session specific crypto layer - */ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - /*!< Chosen cipersuite_info */ - unsigned int keylen; /*!< symmetric key length (bytes) */ - size_t minlen; /*!< min. ciphertext length */ - size_t ivlen; /*!< IV length */ - size_t fixed_ivlen; /*!< Fixed part of IV (AEAD) */ - size_t maclen; /*!< MAC length */ - - unsigned char iv_enc[16]; /*!< IV (encryption) */ - unsigned char iv_dec[16]; /*!< IV (decryption) */ - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - /* Needed only for SSL v3.0 secret */ - unsigned char mac_enc[20]; /*!< SSL v3.0 secret (enc) */ - unsigned char mac_dec[20]; /*!< SSL v3.0 secret (dec) */ -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - - mbedtls_md_context_t md_ctx_enc; /*!< MAC (encryption) */ - mbedtls_md_context_t md_ctx_dec; /*!< MAC (decryption) */ - - mbedtls_cipher_context_t cipher_ctx_enc; /*!< encryption context */ - mbedtls_cipher_context_t cipher_ctx_dec; /*!< decryption context */ - - /* - * Session specific compression layer - */ -#if defined(MBEDTLS_ZLIB_SUPPORT) - z_stream ctx_deflate; /*!< compression context */ - z_stream ctx_inflate; /*!< decompression context */ -#endif -}; - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/* - * List of certificate + private key pairs - */ -struct mbedtls_ssl_key_cert -{ - mbedtls_x509_crt *cert; /*!< cert */ - mbedtls_pk_context *key; /*!< private key */ - mbedtls_ssl_key_cert *next; /*!< next key/cert pair */ -}; -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -/* - * List of handshake messages kept around for resending - */ -struct mbedtls_ssl_flight_item -{ - unsigned char *p; /*!< message, including handshake headers */ - size_t len; /*!< length of p */ - unsigned char type; /*!< type of the message: handshake or CCS */ - mbedtls_ssl_flight_item *next; /*!< next handshake message(s) */ -}; -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - -/** - * \brief Free referenced items in an SSL transform context and clear - * memory - * - * \param transform SSL transform context - */ -void mbedtls_ssl_transform_free( mbedtls_ssl_transform *transform ); - -/** - * \brief Free referenced items in an SSL handshake context and clear - * memory - * - * \param handshake SSL handshake context - */ -void mbedtls_ssl_handshake_free( mbedtls_ssl_handshake_params *handshake ); - -int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_handshake_server_step( mbedtls_ssl_context *ssl ); -void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl ); - -int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl ); - -void mbedtls_ssl_reset_checksum( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl ); - -int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want ); - -int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl ); - -int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_write_certificate( mbedtls_ssl_context *ssl ); - -int mbedtls_ssl_parse_change_cipher_spec( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_write_change_cipher_spec( mbedtls_ssl_context *ssl ); - -int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl ); - -void mbedtls_ssl_optimize_checksum( mbedtls_ssl_context *ssl, - const mbedtls_ssl_ciphersuite_t *ciphersuite_info ); - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -int mbedtls_ssl_psk_derive_premaster( mbedtls_ssl_context *ssl, mbedtls_key_exchange_type_t key_ex ); -#endif - -#if defined(MBEDTLS_PK_C) -unsigned char mbedtls_ssl_sig_from_pk( mbedtls_pk_context *pk ); -mbedtls_pk_type_t mbedtls_ssl_pk_alg_from_sig( unsigned char sig ); -#endif - -mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash( unsigned char hash ); -unsigned char mbedtls_ssl_hash_from_md_alg( int md ); - -#if defined(MBEDTLS_ECP_C) -int mbedtls_ssl_check_curve( const mbedtls_ssl_context *ssl, mbedtls_ecp_group_id grp_id ); -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -int mbedtls_ssl_check_sig_hash( const mbedtls_ssl_context *ssl, - mbedtls_md_type_t md ); -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -static inline mbedtls_pk_context *mbedtls_ssl_own_key( mbedtls_ssl_context *ssl ) -{ - mbedtls_ssl_key_cert *key_cert; - - if( ssl->handshake != NULL && ssl->handshake->key_cert != NULL ) - key_cert = ssl->handshake->key_cert; - else - key_cert = ssl->conf->key_cert; - - return( key_cert == NULL ? NULL : key_cert->key ); -} - -static inline mbedtls_x509_crt *mbedtls_ssl_own_cert( mbedtls_ssl_context *ssl ) -{ - mbedtls_ssl_key_cert *key_cert; - - if( ssl->handshake != NULL && ssl->handshake->key_cert != NULL ) - key_cert = ssl->handshake->key_cert; - else - key_cert = ssl->conf->key_cert; - - return( key_cert == NULL ? NULL : key_cert->cert ); -} - -/* - * Check usage of a certificate wrt extensions: - * keyUsage, extendedKeyUsage (later), and nSCertType (later). - * - * Warning: cert_endpoint is the endpoint of the cert (ie, of our peer when we - * check a cert we received from them)! - * - * Return 0 if everything is OK, -1 if not. - */ -int mbedtls_ssl_check_cert_usage( const mbedtls_x509_crt *cert, - const mbedtls_ssl_ciphersuite_t *ciphersuite, - int cert_endpoint, - uint32_t *flags ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -void mbedtls_ssl_write_version( int major, int minor, int transport, - unsigned char ver[2] ); -void mbedtls_ssl_read_version( int *major, int *minor, int transport, - const unsigned char ver[2] ); - -static inline size_t mbedtls_ssl_hdr_len( const mbedtls_ssl_context *ssl ) -{ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - return( 13 ); -#else - ((void) ssl); -#endif - return( 5 ); -} - -static inline size_t mbedtls_ssl_hs_hdr_len( const mbedtls_ssl_context *ssl ) -{ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - return( 12 ); -#else - ((void) ssl); -#endif - return( 4 ); -} - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -void mbedtls_ssl_send_flight_completed( mbedtls_ssl_context *ssl ); -void mbedtls_ssl_recv_flight_completed( mbedtls_ssl_context *ssl ); -int mbedtls_ssl_resend( mbedtls_ssl_context *ssl ); -#endif - -/* Visible for testing purposes only */ -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -int mbedtls_ssl_dtls_replay_check( mbedtls_ssl_context *ssl ); -void mbedtls_ssl_dtls_replay_update( mbedtls_ssl_context *ssl ); -#endif - -/* constant-time buffer comparison */ -static inline int mbedtls_ssl_safer_memcmp( const void *a, const void *b, size_t n ) -{ - size_t i; - const unsigned char *A = (const unsigned char *) a; - const unsigned char *B = (const unsigned char *) b; - unsigned char diff = 0; - - for( i = 0; i < n; i++ ) - diff |= A[i] ^ B[i]; - - return( diff ); -} - -#ifdef __cplusplus -} -#endif - -#endif /* ssl_internal.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ticket.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ticket.h deleted file mode 100644 index 7c6bc61bfb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/ssl_ticket.h +++ /dev/null @@ -1,135 +0,0 @@ -/** - * \file ssl_ticket.h - * - * \brief TLS server ticket callbacks implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_SSL_TICKET_H -#define MBEDTLS_SSL_TICKET_H - -/* - * This implementation of the session ticket callbacks includes key - * management, rotating the keys periodically in order to preserve forward - * secrecy, when MBEDTLS_HAVE_TIME is defined. - */ - -#include "ssl.h" -#include "cipher.h" - -#if defined(MBEDTLS_THREADING_C) -#include "threading.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Information for session ticket protection - */ -typedef struct -{ - unsigned char name[4]; /*!< random key identifier */ - uint32_t generation_time; /*!< key generation timestamp (seconds) */ - mbedtls_cipher_context_t ctx; /*!< context for auth enc/decryption */ -} -mbedtls_ssl_ticket_key; - -/** - * \brief Context for session ticket handling functions - */ -typedef struct -{ - mbedtls_ssl_ticket_key keys[2]; /*!< ticket protection keys */ - unsigned char active; /*!< index of the currently active key */ - - uint32_t ticket_lifetime; /*!< lifetime of tickets in seconds */ - - /** Callback for getting (pseudo-)random numbers */ - int (*f_rng)(void *, unsigned char *, size_t); - void *p_rng; /*!< context for the RNG function */ - -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; -#endif -} -mbedtls_ssl_ticket_context; - -/** - * \brief Initialize a ticket context. - * (Just make it ready for mbedtls_ssl_ticket_setup() - * or mbedtls_ssl_ticket_free().) - * - * \param ctx Context to be initialized - */ -void mbedtls_ssl_ticket_init( mbedtls_ssl_ticket_context *ctx ); - -/** - * \brief Prepare context to be actually used - * - * \param ctx Context to be set up - * \param f_rng RNG callback function - * \param p_rng RNG callback context - * \param cipher AEAD cipher to use for ticket protection. - * Recommended value: MBEDTLS_CIPHER_AES_256_GCM. - * \param lifetime Tickets lifetime in seconds - * Recommended value: 86400 (one day). - * - * \note It is highly recommended to select a cipher that is at - * least as strong as the the strongest ciphersuite - * supported. Usually that means a 256-bit key. - * - * \note The lifetime of the keys is twice the lifetime of tickets. - * It is recommended to pick a reasonnable lifetime so as not - * to negate the benefits of forward secrecy. - * - * \return 0 if successful, - * or a specific MBEDTLS_ERR_XXX error code - */ -int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, - mbedtls_cipher_type_t cipher, - uint32_t lifetime ); - -/** - * \brief Implementation of the ticket write callback - * - * \note See \c mbedlts_ssl_ticket_write_t for description - */ -mbedtls_ssl_ticket_write_t mbedtls_ssl_ticket_write; - -/** - * \brief Implementation of the ticket parse callback - * - * \note See \c mbedlts_ssl_ticket_parse_t for description - */ -mbedtls_ssl_ticket_parse_t mbedtls_ssl_ticket_parse; - -/** - * \brief Free a context's content and zeroize it. - * - * \param ctx Context to be cleaned up - */ -void mbedtls_ssl_ticket_free( mbedtls_ssl_ticket_context *ctx ); - -#ifdef __cplusplus -} -#endif - -#endif /* ssl_ticket.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/threading.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/threading.h deleted file mode 100644 index c39cbf24d7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/threading.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * \file threading.h - * - * \brief Threading abstraction layer - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_THREADING_H -#define MBEDTLS_THREADING_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE -0x001A /**< The selected feature is not available. */ -#define MBEDTLS_ERR_THREADING_BAD_INPUT_DATA -0x001C /**< Bad input parameters to function. */ -#define MBEDTLS_ERR_THREADING_MUTEX_ERROR -0x001E /**< Locking / unlocking / free failed with error code. */ - -#if defined(MBEDTLS_THREADING_PTHREAD) -#include -typedef struct -{ - pthread_mutex_t mutex; - char is_valid; -} mbedtls_threading_mutex_t; -#endif - -#if defined(MBEDTLS_THREADING_ALT) -/* You should define the mbedtls_threading_mutex_t type in your header */ -#include "threading_alt.h" - -/** - * \brief Set your alternate threading implementation function - * pointers and initialize global mutexes. If used, this - * function must be called once in the main thread before any - * other mbed TLS function is called, and - * mbedtls_threading_free_alt() must be called once in the main - * thread after all other mbed TLS functions. - * - * \note mutex_init() and mutex_free() don't return a status code. - * If mutex_init() fails, it should leave its argument (the - * mutex) in a state such that mutex_lock() will fail when - * called with this argument. - * - * \param mutex_init the init function implementation - * \param mutex_free the free function implementation - * \param mutex_lock the lock function implementation - * \param mutex_unlock the unlock function implementation - */ -void mbedtls_threading_set_alt( void (*mutex_init)( mbedtls_threading_mutex_t * ), - void (*mutex_free)( mbedtls_threading_mutex_t * ), - int (*mutex_lock)( mbedtls_threading_mutex_t * ), - int (*mutex_unlock)( mbedtls_threading_mutex_t * ) ); - -/** - * \brief Free global mutexes. - */ -void mbedtls_threading_free_alt( void ); -#endif /* MBEDTLS_THREADING_ALT */ - -/* - * The function pointers for mutex_init, mutex_free, mutex_ and mutex_unlock - * - * All these functions are expected to work or the result will be undefined. - */ -extern void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t *mutex ); -extern void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t *mutex ); -extern int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t *mutex ); -extern int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t *mutex ); - -/* - * Global mutexes - */ -extern mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex; -extern mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex; - -#ifdef __cplusplus -} -#endif - -#endif /* threading.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/timing.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/timing.h deleted file mode 100644 index ae7a713e7a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/timing.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * \file timing.h - * - * \brief Portable interface to the CPU cycle counter - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_TIMING_H -#define MBEDTLS_TIMING_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if !defined(MBEDTLS_TIMING_ALT) -// Regular implementation -// - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief timer structure - */ -struct mbedtls_timing_hr_time -{ - unsigned char opaque[32]; -}; - -/** - * \brief Context for mbedtls_timing_set/get_delay() - */ -typedef struct -{ - struct mbedtls_timing_hr_time timer; - uint32_t int_ms; - uint32_t fin_ms; -} mbedtls_timing_delay_context; - -extern volatile int mbedtls_timing_alarmed; - -/** - * \brief Return the CPU cycle counter value - * - * \warning This is only a best effort! Do not rely on this! - * In particular, it is known to be unreliable on virtual - * machines. - */ -unsigned long mbedtls_timing_hardclock( void ); - -/** - * \brief Return the elapsed time in milliseconds - * - * \param val points to a timer structure - * \param reset if set to 1, the timer is restarted - */ -unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset ); - -/** - * \brief Setup an alarm clock - * - * \param seconds delay before the "mbedtls_timing_alarmed" flag is set - * - * \warning Only one alarm at a time is supported. In a threaded - * context, this means one for the whole process, not one per - * thread. - */ -void mbedtls_set_alarm( int seconds ); - -/** - * \brief Set a pair of delays to watch - * (See \c mbedtls_timing_get_delay().) - * - * \param data Pointer to timing data - * Must point to a valid \c mbedtls_timing_delay_context struct. - * \param int_ms First (intermediate) delay in milliseconds. - * \param fin_ms Second (final) delay in milliseconds. - * Pass 0 to cancel the current delay. - */ -void mbedtls_timing_set_delay( void *data, uint32_t int_ms, uint32_t fin_ms ); - -/** - * \brief Get the status of delays - * (Memory helper: number of delays passed.) - * - * \param data Pointer to timing data - * Must point to a valid \c mbedtls_timing_delay_context struct. - * - * \return -1 if cancelled (fin_ms = 0) - * 0 if none of the delays are passed, - * 1 if only the intermediate delay is passed, - * 2 if the final delay is passed. - */ -int mbedtls_timing_get_delay( void *data ); - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_TIMING_ALT */ -#include "timing_alt.h" -#endif /* MBEDTLS_TIMING_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_timing_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* timing.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/version.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/version.h deleted file mode 100644 index ea2966e8ac..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/version.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * \file version.h - * - * \brief Run-time version information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * This set of compile-time defines and run-time variables can be used to - * determine the version number of the mbed TLS library used. - */ -#ifndef MBEDTLS_VERSION_H -#define MBEDTLS_VERSION_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -/** - * The version number x.y.z is split into three parts. - * Major, Minor, Patchlevel - */ -#define MBEDTLS_VERSION_MAJOR 2 -#define MBEDTLS_VERSION_MINOR 2 -#define MBEDTLS_VERSION_PATCH 1 - -/** - * The single version number has the following structure: - * MMNNPP00 - * Major version | Minor version | Patch version - */ -#define MBEDTLS_VERSION_NUMBER 0x02020100 -#define MBEDTLS_VERSION_STRING "2.2.1" -#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.2.1" - -#if defined(MBEDTLS_VERSION_C) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Get the version number. - * - * \return The constructed version number in the format - * MMNNPP00 (Major, Minor, Patch). - */ -unsigned int mbedtls_version_get_number( void ); - -/** - * Get the version string ("x.y.z"). - * - * \param string The string that will receive the value. - * (Should be at least 9 bytes in size) - */ -void mbedtls_version_get_string( char *string ); - -/** - * Get the full version string ("mbed TLS x.y.z"). - * - * \param string The string that will receive the value. The mbed TLS version - * string will use 18 bytes AT MOST including a terminating - * null byte. - * (So the buffer should be at least 18 bytes to receive this - * version string). - */ -void mbedtls_version_get_string_full( char *string ); - -/** - * \brief Check if support for a feature was compiled into this - * mbed TLS binary. This allows you to see at runtime if the - * library was for instance compiled with or without - * Multi-threading support. - * - * \note only checks against defines in the sections "System - * support", "mbed TLS modules" and "mbed TLS feature - * support" in config.h - * - * \param feature The string for the define to check (e.g. "MBEDTLS_AES_C") - * - * \return 0 if the feature is present, - * -1 if the feature is not present and - * -2 if support for feature checking as a whole was not - * compiled in. - */ -int mbedtls_version_check_feature( const char *feature ); - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_VERSION_C */ - -#endif /* version.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509.h deleted file mode 100644 index 54dac166b4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509.h +++ /dev/null @@ -1,331 +0,0 @@ -/** - * \file x509.h - * - * \brief X.509 generic defines and structures - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_X509_H -#define MBEDTLS_X509_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "asn1.h" -#include "pk.h" - -#if defined(MBEDTLS_RSA_C) -#include "rsa.h" -#endif - -/** - * \addtogroup x509_module - * \{ - */ - -#if !defined(MBEDTLS_X509_MAX_INTERMEDIATE_CA) -/** - * Maximum number of intermediate CAs in a verification chain. - * That is, maximum length of the chain, excluding the end-entity certificate - * and the trusted root certificate. - * - * Set this to a low value to prevent an adversary from making you waste - * resources verifying an overlong certificate chain. - */ -#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 -#endif - -/** - * \name X509 Error codes - * \{ - */ -#define MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE -0x2080 /**< Unavailable feature, e.g. RSA hashing/encryption combination. */ -#define MBEDTLS_ERR_X509_UNKNOWN_OID -0x2100 /**< Requested OID is unknown. */ -#define MBEDTLS_ERR_X509_INVALID_FORMAT -0x2180 /**< The CRT/CRL/CSR format is invalid, e.g. different type expected. */ -#define MBEDTLS_ERR_X509_INVALID_VERSION -0x2200 /**< The CRT/CRL/CSR version element is invalid. */ -#define MBEDTLS_ERR_X509_INVALID_SERIAL -0x2280 /**< The serial tag or value is invalid. */ -#define MBEDTLS_ERR_X509_INVALID_ALG -0x2300 /**< The algorithm tag or value is invalid. */ -#define MBEDTLS_ERR_X509_INVALID_NAME -0x2380 /**< The name tag or value is invalid. */ -#define MBEDTLS_ERR_X509_INVALID_DATE -0x2400 /**< The date tag or value is invalid. */ -#define MBEDTLS_ERR_X509_INVALID_SIGNATURE -0x2480 /**< The signature tag or value invalid. */ -#define MBEDTLS_ERR_X509_INVALID_EXTENSIONS -0x2500 /**< The extension tag or value is invalid. */ -#define MBEDTLS_ERR_X509_UNKNOWN_VERSION -0x2580 /**< CRT/CRL/CSR has an unsupported version number. */ -#define MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG -0x2600 /**< Signature algorithm (oid) is unsupported. */ -#define MBEDTLS_ERR_X509_SIG_MISMATCH -0x2680 /**< Signature algorithms do not match. (see \c ::mbedtls_x509_crt sig_oid) */ -#define MBEDTLS_ERR_X509_CERT_VERIFY_FAILED -0x2700 /**< Certificate verification failed, e.g. CRL, CA or signature check failed. */ -#define MBEDTLS_ERR_X509_CERT_UNKNOWN_FORMAT -0x2780 /**< Format not recognized as DER or PEM. */ -#define MBEDTLS_ERR_X509_BAD_INPUT_DATA -0x2800 /**< Input invalid. */ -#define MBEDTLS_ERR_X509_ALLOC_FAILED -0x2880 /**< Allocation of memory failed. */ -#define MBEDTLS_ERR_X509_FILE_IO_ERROR -0x2900 /**< Read/write of file failed. */ -#define MBEDTLS_ERR_X509_BUFFER_TOO_SMALL -0x2980 /**< Destination buffer is too small. */ -/* \} name */ - -/** - * \name X509 Verify codes - * \{ - */ -/* Reminder: update x509_crt_verify_strings[] in library/x509_crt.c */ -#define MBEDTLS_X509_BADCERT_EXPIRED 0x01 /**< The certificate validity has expired. */ -#define MBEDTLS_X509_BADCERT_REVOKED 0x02 /**< The certificate has been revoked (is on a CRL). */ -#define MBEDTLS_X509_BADCERT_CN_MISMATCH 0x04 /**< The certificate Common Name (CN) does not match with the expected CN. */ -#define MBEDTLS_X509_BADCERT_NOT_TRUSTED 0x08 /**< The certificate is not correctly signed by the trusted CA. */ -#define MBEDTLS_X509_BADCRL_NOT_TRUSTED 0x10 /**< The CRL is not correctly signed by the trusted CA. */ -#define MBEDTLS_X509_BADCRL_EXPIRED 0x20 /**< The CRL is expired. */ -#define MBEDTLS_X509_BADCERT_MISSING 0x40 /**< Certificate was missing. */ -#define MBEDTLS_X509_BADCERT_SKIP_VERIFY 0x80 /**< Certificate verification was skipped. */ -#define MBEDTLS_X509_BADCERT_OTHER 0x0100 /**< Other reason (can be used by verify callback) */ -#define MBEDTLS_X509_BADCERT_FUTURE 0x0200 /**< The certificate validity starts in the future. */ -#define MBEDTLS_X509_BADCRL_FUTURE 0x0400 /**< The CRL is from the future */ -#define MBEDTLS_X509_BADCERT_KEY_USAGE 0x0800 /**< Usage does not match the keyUsage extension. */ -#define MBEDTLS_X509_BADCERT_EXT_KEY_USAGE 0x1000 /**< Usage does not match the extendedKeyUsage extension. */ -#define MBEDTLS_X509_BADCERT_NS_CERT_TYPE 0x2000 /**< Usage does not match the nsCertType extension. */ -#define MBEDTLS_X509_BADCERT_BAD_MD 0x4000 /**< The certificate is signed with an unacceptable hash. */ -#define MBEDTLS_X509_BADCERT_BAD_PK 0x8000 /**< The certificate is signed with an unacceptable PK alg (eg RSA vs ECDSA). */ -#define MBEDTLS_X509_BADCERT_BAD_KEY 0x010000 /**< The certificate is signed with an unacceptable key (eg bad curve, RSA too short). */ -#define MBEDTLS_X509_BADCRL_BAD_MD 0x020000 /**< The CRL is signed with an unacceptable hash. */ -#define MBEDTLS_X509_BADCRL_BAD_PK 0x040000 /**< The CRL is signed with an unacceptable PK alg (eg RSA vs ECDSA). */ -#define MBEDTLS_X509_BADCRL_BAD_KEY 0x080000 /**< The CRL is signed with an unacceptable key (eg bad curve, RSA too short). */ - -/* \} name */ -/* \} addtogroup x509_module */ - -/* - * X.509 v3 Key Usage Extension flags - * Reminder: update x509_info_key_usage() when adding new flags. - */ -#define MBEDTLS_X509_KU_DIGITAL_SIGNATURE (0x80) /* bit 0 */ -#define MBEDTLS_X509_KU_NON_REPUDIATION (0x40) /* bit 1 */ -#define MBEDTLS_X509_KU_KEY_ENCIPHERMENT (0x20) /* bit 2 */ -#define MBEDTLS_X509_KU_DATA_ENCIPHERMENT (0x10) /* bit 3 */ -#define MBEDTLS_X509_KU_KEY_AGREEMENT (0x08) /* bit 4 */ -#define MBEDTLS_X509_KU_KEY_CERT_SIGN (0x04) /* bit 5 */ -#define MBEDTLS_X509_KU_CRL_SIGN (0x02) /* bit 6 */ -#define MBEDTLS_X509_KU_ENCIPHER_ONLY (0x01) /* bit 7 */ -#define MBEDTLS_X509_KU_DECIPHER_ONLY (0x8000) /* bit 8 */ - -/* - * Netscape certificate types - * (http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn3.html) - */ - -#define MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT (0x80) /* bit 0 */ -#define MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER (0x40) /* bit 1 */ -#define MBEDTLS_X509_NS_CERT_TYPE_EMAIL (0x20) /* bit 2 */ -#define MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING (0x10) /* bit 3 */ -#define MBEDTLS_X509_NS_CERT_TYPE_RESERVED (0x08) /* bit 4 */ -#define MBEDTLS_X509_NS_CERT_TYPE_SSL_CA (0x04) /* bit 5 */ -#define MBEDTLS_X509_NS_CERT_TYPE_EMAIL_CA (0x02) /* bit 6 */ -#define MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA (0x01) /* bit 7 */ - -/* - * X.509 extension types - * - * Comments refer to the status for using certificates. Status can be - * different for writing certificates or reading CRLs or CSRs. - */ -#define MBEDTLS_X509_EXT_AUTHORITY_KEY_IDENTIFIER (1 << 0) -#define MBEDTLS_X509_EXT_SUBJECT_KEY_IDENTIFIER (1 << 1) -#define MBEDTLS_X509_EXT_KEY_USAGE (1 << 2) -#define MBEDTLS_X509_EXT_CERTIFICATE_POLICIES (1 << 3) -#define MBEDTLS_X509_EXT_POLICY_MAPPINGS (1 << 4) -#define MBEDTLS_X509_EXT_SUBJECT_ALT_NAME (1 << 5) /* Supported (DNS) */ -#define MBEDTLS_X509_EXT_ISSUER_ALT_NAME (1 << 6) -#define MBEDTLS_X509_EXT_SUBJECT_DIRECTORY_ATTRS (1 << 7) -#define MBEDTLS_X509_EXT_BASIC_CONSTRAINTS (1 << 8) /* Supported */ -#define MBEDTLS_X509_EXT_NAME_CONSTRAINTS (1 << 9) -#define MBEDTLS_X509_EXT_POLICY_CONSTRAINTS (1 << 10) -#define MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE (1 << 11) -#define MBEDTLS_X509_EXT_CRL_DISTRIBUTION_POINTS (1 << 12) -#define MBEDTLS_X509_EXT_INIHIBIT_ANYPOLICY (1 << 13) -#define MBEDTLS_X509_EXT_FRESHEST_CRL (1 << 14) - -#define MBEDTLS_X509_EXT_NS_CERT_TYPE (1 << 16) /* Parsed (and then ?) */ - -/* - * Storage format identifiers - * Recognized formats: PEM and DER - */ -#define MBEDTLS_X509_FORMAT_DER 1 -#define MBEDTLS_X509_FORMAT_PEM 2 - -#define MBEDTLS_X509_MAX_DN_NAME_SIZE 256 /**< Maximum value size of a DN entry */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \addtogroup x509_module - * \{ */ - -/** - * \name Structures for parsing X.509 certificates, CRLs and CSRs - * \{ - */ - -/** - * Type-length-value structure that allows for ASN1 using DER. - */ -typedef mbedtls_asn1_buf mbedtls_x509_buf; - -/** - * Container for ASN1 bit strings. - */ -typedef mbedtls_asn1_bitstring mbedtls_x509_bitstring; - -/** - * Container for ASN1 named information objects. - * It allows for Relative Distinguished Names (e.g. cn=localhost,ou=code,etc.). - */ -typedef mbedtls_asn1_named_data mbedtls_x509_name; - -/** - * Container for a sequence of ASN.1 items - */ -typedef mbedtls_asn1_sequence mbedtls_x509_sequence; - -/** Container for date and time (precision in seconds). */ -typedef struct mbedtls_x509_time -{ - int year, mon, day; /**< Date. */ - int hour, min, sec; /**< Time. */ -} -mbedtls_x509_time; - -/** \} name Structures for parsing X.509 certificates, CRLs and CSRs */ -/** \} addtogroup x509_module */ - -/** - * \brief Store the certificate DN in printable form into buf; - * no more than size characters will be written. - * - * \param buf Buffer to write to - * \param size Maximum size of buffer - * \param dn The X509 name to represent - * - * \return The length of the string written (not including the - * terminated nul byte), or a negative error code. - */ -int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn ); - -/** - * \brief Store the certificate serial in printable form into buf; - * no more than size characters will be written. - * - * \param buf Buffer to write to - * \param size Maximum size of buffer - * \param serial The X509 serial to represent - * - * \return The length of the string written (not including the - * terminated nul byte), or a negative error code. - */ -int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *serial ); - -/** - * \brief Check a given mbedtls_x509_time against the system time - * and tell if it's in the past. - * - * \note Intended usage is "if( is_past( valid_to ) ) ERROR". - * Hence the return value of 1 if on internal errors. - * - * \param time mbedtls_x509_time to check - * - * \return 1 if the given time is in the past or an error occured, - * 0 otherwise. - */ -int mbedtls_x509_time_is_past( const mbedtls_x509_time *time ); - -/** - * \brief Check a given mbedtls_x509_time against the system time - * and tell if it's in the future. - * - * \note Intended usage is "if( is_future( valid_from ) ) ERROR". - * Hence the return value of 1 if on internal errors. - * - * \param time mbedtls_x509_time to check - * - * \return 1 if the given time is in the future or an error occured, - * 0 otherwise. - */ -int mbedtls_x509_time_is_future( const mbedtls_x509_time *time ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_x509_self_test( int verbose ); - -/* - * Internal module functions. You probably do not want to use these unless you - * know you do. - */ -int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end, - mbedtls_x509_name *cur ); -int mbedtls_x509_get_alg_null( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *alg ); -int mbedtls_x509_get_alg( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *alg, mbedtls_x509_buf *params ); -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) -int mbedtls_x509_get_rsassa_pss_params( const mbedtls_x509_buf *params, - mbedtls_md_type_t *md_alg, mbedtls_md_type_t *mgf_md, - int *salt_len ); -#endif -int mbedtls_x509_get_sig( unsigned char **p, const unsigned char *end, mbedtls_x509_buf *sig ); -int mbedtls_x509_get_sig_alg( const mbedtls_x509_buf *sig_oid, const mbedtls_x509_buf *sig_params, - mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg, - void **sig_opts ); -int mbedtls_x509_get_time( unsigned char **p, const unsigned char *end, - mbedtls_x509_time *time ); -int mbedtls_x509_get_serial( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *serial ); -int mbedtls_x509_get_ext( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *ext, int tag ); -int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *sig_oid, - mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, - const void *sig_opts ); -int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name ); -int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *name ); -int mbedtls_x509_set_extension( mbedtls_asn1_named_data **head, const char *oid, size_t oid_len, - int critical, const unsigned char *val, - size_t val_len ); -int mbedtls_x509_write_extensions( unsigned char **p, unsigned char *start, - mbedtls_asn1_named_data *first ); -int mbedtls_x509_write_names( unsigned char **p, unsigned char *start, - mbedtls_asn1_named_data *first ); -int mbedtls_x509_write_sig( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len, - unsigned char *sig, size_t size ); - -#define MBEDTLS_X509_SAFE_SNPRINTF \ - do { \ - if( ret < 0 || (size_t) ret >= n ) \ - return( MBEDTLS_ERR_X509_BUFFER_TOO_SMALL ); \ - \ - n -= (size_t) ret; \ - p += (size_t) ret; \ - } while( 0 ) - -#ifdef __cplusplus -} -#endif - -#endif /* x509.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crl.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crl.h deleted file mode 100644 index 7988439900..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crl.h +++ /dev/null @@ -1,173 +0,0 @@ -/** - * \file x509_crl.h - * - * \brief X.509 certificate revocation list parsing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_X509_CRL_H -#define MBEDTLS_X509_CRL_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "x509.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \addtogroup x509_module - * \{ */ - -/** - * \name Structures and functions for parsing CRLs - * \{ - */ - -/** - * Certificate revocation list entry. - * Contains the CA-specific serial numbers and revocation dates. - */ -typedef struct mbedtls_x509_crl_entry -{ - mbedtls_x509_buf raw; - - mbedtls_x509_buf serial; - - mbedtls_x509_time revocation_date; - - mbedtls_x509_buf entry_ext; - - struct mbedtls_x509_crl_entry *next; -} -mbedtls_x509_crl_entry; - -/** - * Certificate revocation list structure. - * Every CRL may have multiple entries. - */ -typedef struct mbedtls_x509_crl -{ - mbedtls_x509_buf raw; /**< The raw certificate data (DER). */ - mbedtls_x509_buf tbs; /**< The raw certificate body (DER). The part that is To Be Signed. */ - - int version; /**< CRL version (1=v1, 2=v2) */ - mbedtls_x509_buf sig_oid; /**< CRL signature type identifier */ - - mbedtls_x509_buf issuer_raw; /**< The raw issuer data (DER). */ - - mbedtls_x509_name issuer; /**< The parsed issuer data (named information object). */ - - mbedtls_x509_time this_update; - mbedtls_x509_time next_update; - - mbedtls_x509_crl_entry entry; /**< The CRL entries containing the certificate revocation times for this CA. */ - - mbedtls_x509_buf crl_ext; - - mbedtls_x509_buf sig_oid2; - mbedtls_x509_buf sig; - mbedtls_md_type_t sig_md; /**< Internal representation of the MD algorithm of the signature algorithm, e.g. MBEDTLS_MD_SHA256 */ - mbedtls_pk_type_t sig_pk; /**< Internal representation of the Public Key algorithm of the signature algorithm, e.g. MBEDTLS_PK_RSA */ - void *sig_opts; /**< Signature options to be passed to mbedtls_pk_verify_ext(), e.g. for RSASSA-PSS */ - - struct mbedtls_x509_crl *next; -} -mbedtls_x509_crl; - -/** - * \brief Parse a DER-encoded CRL and append it to the chained list - * - * \param chain points to the start of the chain - * \param buf buffer holding the CRL data in DER format - * \param buflen size of the buffer - * (including the terminating null byte for PEM data) - * - * \return 0 if successful, or a specific X509 or PEM error code - */ -int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain, - const unsigned char *buf, size_t buflen ); -/** - * \brief Parse one or more CRLs and append them to the chained list - * - * \note Mutliple CRLs are accepted only if using PEM format - * - * \param chain points to the start of the chain - * \param buf buffer holding the CRL data in PEM or DER format - * \param buflen size of the buffer - * (including the terminating null byte for PEM data) - * - * \return 0 if successful, or a specific X509 or PEM error code - */ -int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Load one or more CRLs and append them to the chained list - * - * \note Mutliple CRLs are accepted only if using PEM format - * - * \param chain points to the start of the chain - * \param path filename to read the CRLs from (in PEM or DER encoding) - * - * \return 0 if successful, or a specific X509 or PEM error code - */ -int mbedtls_x509_crl_parse_file( mbedtls_x509_crl *chain, const char *path ); -#endif /* MBEDTLS_FS_IO */ - -/** - * \brief Returns an informational string about the CRL. - * - * \param buf Buffer to write to - * \param size Maximum size of buffer - * \param prefix A line prefix - * \param crl The X509 CRL to represent - * - * \return The length of the string written (not including the - * terminated nul byte), or a negative error code. - */ -int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix, - const mbedtls_x509_crl *crl ); - -/** - * \brief Initialize a CRL (chain) - * - * \param crl CRL chain to initialize - */ -void mbedtls_x509_crl_init( mbedtls_x509_crl *crl ); - -/** - * \brief Unallocate all CRL data - * - * \param crl CRL chain to free - */ -void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ); - -/* \} name */ -/* \} addtogroup x509_module */ - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_x509_crl.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crt.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crt.h deleted file mode 100644 index fe821d1cfb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_crt.h +++ /dev/null @@ -1,645 +0,0 @@ -/** - * \file x509_crt.h - * - * \brief X.509 certificate parsing and writing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_X509_CRT_H -#define MBEDTLS_X509_CRT_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "x509.h" -#include "x509_crl.h" - -/** - * \addtogroup x509_module - * \{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name Structures and functions for parsing and writing X.509 certificates - * \{ - */ - -/** - * Container for an X.509 certificate. The certificate may be chained. - */ -typedef struct mbedtls_x509_crt -{ - mbedtls_x509_buf raw; /**< The raw certificate data (DER). */ - mbedtls_x509_buf tbs; /**< The raw certificate body (DER). The part that is To Be Signed. */ - - int version; /**< The X.509 version. (1=v1, 2=v2, 3=v3) */ - mbedtls_x509_buf serial; /**< Unique id for certificate issued by a specific CA. */ - mbedtls_x509_buf sig_oid; /**< Signature algorithm, e.g. sha1RSA */ - - mbedtls_x509_buf issuer_raw; /**< The raw issuer data (DER). Used for quick comparison. */ - mbedtls_x509_buf subject_raw; /**< The raw subject data (DER). Used for quick comparison. */ - - mbedtls_x509_name issuer; /**< The parsed issuer data (named information object). */ - mbedtls_x509_name subject; /**< The parsed subject data (named information object). */ - - mbedtls_x509_time valid_from; /**< Start time of certificate validity. */ - mbedtls_x509_time valid_to; /**< End time of certificate validity. */ - - mbedtls_pk_context pk; /**< Container for the public key context. */ - - mbedtls_x509_buf issuer_id; /**< Optional X.509 v2/v3 issuer unique identifier. */ - mbedtls_x509_buf subject_id; /**< Optional X.509 v2/v3 subject unique identifier. */ - mbedtls_x509_buf v3_ext; /**< Optional X.509 v3 extensions. */ - mbedtls_x509_sequence subject_alt_names; /**< Optional list of Subject Alternative Names (Only dNSName supported). */ - - int ext_types; /**< Bit string containing detected and parsed extensions */ - int ca_istrue; /**< Optional Basic Constraint extension value: 1 if this certificate belongs to a CA, 0 otherwise. */ - int max_pathlen; /**< Optional Basic Constraint extension value: The maximum path length to the root certificate. Path length is 1 higher than RFC 5280 'meaning', so 1+ */ - - unsigned int key_usage; /**< Optional key usage extension value: See the values in x509.h */ - - mbedtls_x509_sequence ext_key_usage; /**< Optional list of extended key usage OIDs. */ - - unsigned char ns_cert_type; /**< Optional Netscape certificate type extension value: See the values in x509.h */ - - mbedtls_x509_buf sig; /**< Signature: hash of the tbs part signed with the private key. */ - mbedtls_md_type_t sig_md; /**< Internal representation of the MD algorithm of the signature algorithm, e.g. MBEDTLS_MD_SHA256 */ - mbedtls_pk_type_t sig_pk; /**< Internal representation of the Public Key algorithm of the signature algorithm, e.g. MBEDTLS_PK_RSA */ - void *sig_opts; /**< Signature options to be passed to mbedtls_pk_verify_ext(), e.g. for RSASSA-PSS */ - - struct mbedtls_x509_crt *next; /**< Next certificate in the CA-chain. */ -} -mbedtls_x509_crt; - -/** - * Build flag from an algorithm/curve identifier (pk, md, ecp) - * Since 0 is always XXX_NONE, ignore it. - */ -#define MBEDTLS_X509_ID_FLAG( id ) ( 1 << ( id - 1 ) ) - -/** - * Security profile for certificate verification. - * - * All lists are bitfields, built by ORing flags from MBEDTLS_X509_ID_FLAG(). - */ -typedef struct -{ - uint32_t allowed_mds; /**< MDs for signatures */ - uint32_t allowed_pks; /**< PK algs for signatures */ - uint32_t allowed_curves; /**< Elliptic curves for ECDSA */ - uint32_t rsa_min_bitlen; /**< Minimum size for RSA keys */ -} -mbedtls_x509_crt_profile; - -#define MBEDTLS_X509_CRT_VERSION_1 0 -#define MBEDTLS_X509_CRT_VERSION_2 1 -#define MBEDTLS_X509_CRT_VERSION_3 2 - -#define MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN 32 -#define MBEDTLS_X509_RFC5280_UTC_TIME_LEN 15 - -/** - * Container for writing a certificate (CRT) - */ -typedef struct mbedtls_x509write_cert -{ - int version; - mbedtls_mpi serial; - mbedtls_pk_context *subject_key; - mbedtls_pk_context *issuer_key; - mbedtls_asn1_named_data *subject; - mbedtls_asn1_named_data *issuer; - mbedtls_md_type_t md_alg; - char not_before[MBEDTLS_X509_RFC5280_UTC_TIME_LEN + 1]; - char not_after[MBEDTLS_X509_RFC5280_UTC_TIME_LEN + 1]; - mbedtls_asn1_named_data *extensions; -} -mbedtls_x509write_cert; - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/** - * Default security profile. Should provide a good balance between security - * and compatibility with current deployments. - */ -extern const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default; - -/** - * Expected next default profile. Recommended for new deployments. - * Currently targets a 128-bit security level, except for RSA-2048. - */ -extern const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next; - -/** - * NSA Suite B profile. - */ -extern const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb; - -/** - * \brief Parse a single DER formatted certificate and add it - * to the chained list. - * - * \param chain points to the start of the chain - * \param buf buffer holding the certificate DER data - * \param buflen size of the buffer - * - * \return 0 if successful, or a specific X509 or PEM error code - */ -int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain, const unsigned char *buf, - size_t buflen ); - -/** - * \brief Parse one or more certificates and add them - * to the chained list. Parses permissively. If some - * certificates can be parsed, the result is the number - * of failed certificates it encountered. If none complete - * correctly, the first error is returned. - * - * \param chain points to the start of the chain - * \param buf buffer holding the certificate data in PEM or DER format - * \param buflen size of the buffer - * (including the terminating null byte for PEM data) - * - * \return 0 if all certificates parsed successfully, a positive number - * if partly successful or a specific X509 or PEM error code - */ -int mbedtls_x509_crt_parse( mbedtls_x509_crt *chain, const unsigned char *buf, size_t buflen ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Load one or more certificates and add them - * to the chained list. Parses permissively. If some - * certificates can be parsed, the result is the number - * of failed certificates it encountered. If none complete - * correctly, the first error is returned. - * - * \param chain points to the start of the chain - * \param path filename to read the certificates from - * - * \return 0 if all certificates parsed successfully, a positive number - * if partly successful or a specific X509 or PEM error code - */ -int mbedtls_x509_crt_parse_file( mbedtls_x509_crt *chain, const char *path ); - -/** - * \brief Load one or more certificate files from a path and add them - * to the chained list. Parses permissively. If some - * certificates can be parsed, the result is the number - * of failed certificates it encountered. If none complete - * correctly, the first error is returned. - * - * \param chain points to the start of the chain - * \param path directory / folder to read the certificate files from - * - * \return 0 if all certificates parsed successfully, a positive number - * if partly successful or a specific X509 or PEM error code - */ -int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path ); -#endif /* MBEDTLS_FS_IO */ - -/** - * \brief Returns an informational string about the - * certificate. - * - * \param buf Buffer to write to - * \param size Maximum size of buffer - * \param prefix A line prefix - * \param crt The X509 certificate to represent - * - * \return The length of the string written (not including the - * terminated nul byte), or a negative error code. - */ -int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, - const mbedtls_x509_crt *crt ); - -/** - * \brief Returns an informational string about the - * verification status of a certificate. - * - * \param buf Buffer to write to - * \param size Maximum size of buffer - * \param prefix A line prefix - * \param flags Verification flags created by mbedtls_x509_crt_verify() - * - * \return The length of the string written (not including the - * terminated nul byte), or a negative error code. - */ -int mbedtls_x509_crt_verify_info( char *buf, size_t size, const char *prefix, - uint32_t flags ); - -/** - * \brief Verify the certificate signature - * - * The verify callback is a user-supplied callback that - * can clear / modify / add flags for a certificate. If set, - * the verification callback is called for each - * certificate in the chain (from the trust-ca down to the - * presented crt). The parameters for the callback are: - * (void *parameter, mbedtls_x509_crt *crt, int certificate_depth, - * int *flags). With the flags representing current flags for - * that specific certificate and the certificate depth from - * the bottom (Peer cert depth = 0). - * - * All flags left after returning from the callback - * are also returned to the application. The function should - * return 0 for anything but a fatal error. - * - * \note In case verification failed, the results can be displayed - * using \c mbedtls_x509_crt_verify_info() - * - * \note Same as \c mbedtls_x509_crt_verify_with_profile() with the - * default security profile. - * - * \param crt a certificate to be verified - * \param trust_ca the trusted CA chain - * \param ca_crl the CRL chain for trusted CA's - * \param cn expected Common Name (can be set to - * NULL if the CN must not be verified) - * \param flags result of the verification - * \param f_vrfy verification function - * \param p_vrfy verification parameter - * - * \return 0 if successful or MBEDTLS_ERR_X509_CERT_VERIFY_FAILED - * in which case *flags will have one or more - * MBEDTLS_X509_BADCERT_XXX or MBEDTLS_X509_BADCRL_XXX flags - * set, - * or another error in case of a fatal error encountered - * during the verification process. - */ -int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt, - mbedtls_x509_crt *trust_ca, - mbedtls_x509_crl *ca_crl, - const char *cn, uint32_t *flags, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ); - -/** - * \brief Verify the certificate signature according to profile - * - * \note Same as \c mbedtls_x509_crt_verify(), but with explicit - * security profile. - * - * \note The restrictions on keys (RSA minimum size, allowed curves - * for ECDSA) apply to all certificates: trusted root, - * intermediate CAs if any, and end entity certificate. - * - * \param crt a certificate to be verified - * \param trust_ca the trusted CA chain - * \param ca_crl the CRL chain for trusted CA's - * \param profile security profile for verification - * \param cn expected Common Name (can be set to - * NULL if the CN must not be verified) - * \param flags result of the verification - * \param f_vrfy verification function - * \param p_vrfy verification parameter - * - * \return 0 if successful or MBEDTLS_ERR_X509_CERT_VERIFY_FAILED - * in which case *flags will have one or more - * MBEDTLS_X509_BADCERT_XXX or MBEDTLS_X509_BADCRL_XXX flags - * set, - * or another error in case of a fatal error encountered - * during the verification process. - */ -int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt, - mbedtls_x509_crt *trust_ca, - mbedtls_x509_crl *ca_crl, - const mbedtls_x509_crt_profile *profile, - const char *cn, uint32_t *flags, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ); - -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) -/** - * \brief Check usage of certificate against keyUsage extension. - * - * \param crt Leaf certificate used. - * \param usage Intended usage(s) (eg MBEDTLS_X509_KU_KEY_ENCIPHERMENT - * before using the certificate to perform an RSA key - * exchange). - * - * \note Except for decipherOnly and encipherOnly, a bit set in the - * usage argument means this bit MUST be set in the - * certificate. For decipherOnly and encipherOnly, it means - * that bit MAY be set. - * - * \return 0 is these uses of the certificate are allowed, - * MBEDTLS_ERR_X509_BAD_INPUT_DATA if the keyUsage extension - * is present but does not match the usage argument. - * - * \note You should only call this function on leaf certificates, on - * (intermediate) CAs the keyUsage extension is automatically - * checked by \c mbedtls_x509_crt_verify(). - */ -int mbedtls_x509_crt_check_key_usage( const mbedtls_x509_crt *crt, - unsigned int usage ); -#endif /* MBEDTLS_X509_CHECK_KEY_USAGE) */ - -#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) -/** - * \brief Check usage of certificate against extentedJeyUsage. - * - * \param crt Leaf certificate used. - * \param usage_oid Intended usage (eg MBEDTLS_OID_SERVER_AUTH or MBEDTLS_OID_CLIENT_AUTH). - * \param usage_len Length of usage_oid (eg given by MBEDTLS_OID_SIZE()). - * - * \return 0 if this use of the certificate is allowed, - * MBEDTLS_ERR_X509_BAD_INPUT_DATA if not. - * - * \note Usually only makes sense on leaf certificates. - */ -int mbedtls_x509_crt_check_extended_key_usage( const mbedtls_x509_crt *crt, - const char *usage_oid, - size_t usage_len ); -#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) */ - -#if defined(MBEDTLS_X509_CRL_PARSE_C) -/** - * \brief Verify the certificate revocation status - * - * \param crt a certificate to be verified - * \param crl the CRL to verify against - * - * \return 1 if the certificate is revoked, 0 otherwise - * - */ -int mbedtls_x509_crt_is_revoked( const mbedtls_x509_crt *crt, const mbedtls_x509_crl *crl ); -#endif /* MBEDTLS_X509_CRL_PARSE_C */ - -/** - * \brief Initialize a certificate (chain) - * - * \param crt Certificate chain to initialize - */ -void mbedtls_x509_crt_init( mbedtls_x509_crt *crt ); - -/** - * \brief Unallocate all certificate data - * - * \param crt Certificate chain to free - */ -void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -/* \} name */ -/* \} addtogroup x509_module */ - -#if defined(MBEDTLS_X509_CRT_WRITE_C) -/** - * \brief Initialize a CRT writing context - * - * \param ctx CRT context to initialize - */ -void mbedtls_x509write_crt_init( mbedtls_x509write_cert *ctx ); - -/** - * \brief Set the verion for a Certificate - * Default: MBEDTLS_X509_CRT_VERSION_3 - * - * \param ctx CRT context to use - * \param version version to set (MBEDTLS_X509_CRT_VERSION_1, MBEDTLS_X509_CRT_VERSION_2 or - * MBEDTLS_X509_CRT_VERSION_3) - */ -void mbedtls_x509write_crt_set_version( mbedtls_x509write_cert *ctx, int version ); - -/** - * \brief Set the serial number for a Certificate. - * - * \param ctx CRT context to use - * \param serial serial number to set - * - * \return 0 if successful - */ -int mbedtls_x509write_crt_set_serial( mbedtls_x509write_cert *ctx, const mbedtls_mpi *serial ); - -/** - * \brief Set the validity period for a Certificate - * Timestamps should be in string format for UTC timezone - * i.e. "YYYYMMDDhhmmss" - * e.g. "20131231235959" for December 31st 2013 - * at 23:59:59 - * - * \param ctx CRT context to use - * \param not_before not_before timestamp - * \param not_after not_after timestamp - * - * \return 0 if timestamp was parsed successfully, or - * a specific error code - */ -int mbedtls_x509write_crt_set_validity( mbedtls_x509write_cert *ctx, const char *not_before, - const char *not_after ); - -/** - * \brief Set the issuer name for a Certificate - * Issuer names should contain a comma-separated list - * of OID types and values: - * e.g. "C=UK,O=ARM,CN=mbed TLS CA" - * - * \param ctx CRT context to use - * \param issuer_name issuer name to set - * - * \return 0 if issuer name was parsed successfully, or - * a specific error code - */ -int mbedtls_x509write_crt_set_issuer_name( mbedtls_x509write_cert *ctx, - const char *issuer_name ); - -/** - * \brief Set the subject name for a Certificate - * Subject names should contain a comma-separated list - * of OID types and values: - * e.g. "C=UK,O=ARM,CN=mbed TLS Server 1" - * - * \param ctx CRT context to use - * \param subject_name subject name to set - * - * \return 0 if subject name was parsed successfully, or - * a specific error code - */ -int mbedtls_x509write_crt_set_subject_name( mbedtls_x509write_cert *ctx, - const char *subject_name ); - -/** - * \brief Set the subject public key for the certificate - * - * \param ctx CRT context to use - * \param key public key to include - */ -void mbedtls_x509write_crt_set_subject_key( mbedtls_x509write_cert *ctx, mbedtls_pk_context *key ); - -/** - * \brief Set the issuer key used for signing the certificate - * - * \param ctx CRT context to use - * \param key private key to sign with - */ -void mbedtls_x509write_crt_set_issuer_key( mbedtls_x509write_cert *ctx, mbedtls_pk_context *key ); - -/** - * \brief Set the MD algorithm to use for the signature - * (e.g. MBEDTLS_MD_SHA1) - * - * \param ctx CRT context to use - * \param md_alg MD algorithm to use - */ -void mbedtls_x509write_crt_set_md_alg( mbedtls_x509write_cert *ctx, mbedtls_md_type_t md_alg ); - -/** - * \brief Generic function to add to or replace an extension in the - * CRT - * - * \param ctx CRT context to use - * \param oid OID of the extension - * \param oid_len length of the OID - * \param critical if the extension is critical (per the RFC's definition) - * \param val value of the extension OCTET STRING - * \param val_len length of the value data - * - * \return 0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_crt_set_extension( mbedtls_x509write_cert *ctx, - const char *oid, size_t oid_len, - int critical, - const unsigned char *val, size_t val_len ); - -/** - * \brief Set the basicConstraints extension for a CRT - * - * \param ctx CRT context to use - * \param is_ca is this a CA certificate - * \param max_pathlen maximum length of certificate chains below this - * certificate (only for CA certificates, -1 is - * inlimited) - * - * \return 0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_crt_set_basic_constraints( mbedtls_x509write_cert *ctx, - int is_ca, int max_pathlen ); - -#if defined(MBEDTLS_SHA1_C) -/** - * \brief Set the subjectKeyIdentifier extension for a CRT - * Requires that mbedtls_x509write_crt_set_subject_key() has been - * called before - * - * \param ctx CRT context to use - * - * \return 0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_crt_set_subject_key_identifier( mbedtls_x509write_cert *ctx ); - -/** - * \brief Set the authorityKeyIdentifier extension for a CRT - * Requires that mbedtls_x509write_crt_set_issuer_key() has been - * called before - * - * \param ctx CRT context to use - * - * \return 0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_crt_set_authority_key_identifier( mbedtls_x509write_cert *ctx ); -#endif /* MBEDTLS_SHA1_C */ - -/** - * \brief Set the Key Usage Extension flags - * (e.g. MBEDTLS_X509_KU_DIGITAL_SIGNATURE | MBEDTLS_X509_KU_KEY_CERT_SIGN) - * - * \param ctx CRT context to use - * \param key_usage key usage flags to set - * - * \return 0 if successful, or MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_crt_set_key_usage( mbedtls_x509write_cert *ctx, - unsigned int key_usage ); - -/** - * \brief Set the Netscape Cert Type flags - * (e.g. MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT | MBEDTLS_X509_NS_CERT_TYPE_EMAIL) - * - * \param ctx CRT context to use - * \param ns_cert_type Netscape Cert Type flags to set - * - * \return 0 if successful, or MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_crt_set_ns_cert_type( mbedtls_x509write_cert *ctx, - unsigned char ns_cert_type ); - -/** - * \brief Free the contents of a CRT write context - * - * \param ctx CRT context to free - */ -void mbedtls_x509write_crt_free( mbedtls_x509write_cert *ctx ); - -/** - * \brief Write a built up certificate to a X509 DER structure - * Note: data is written at the end of the buffer! Use the - * return value to determine where you should start - * using the buffer - * - * \param ctx certificate to write away - * \param buf buffer to write to - * \param size size of the buffer - * \param f_rng RNG function (for signature, see note) - * \param p_rng RNG parameter - * - * \return length of data written if successful, or a specific - * error code - * - * \note f_rng may be NULL if RSA is used for signature and the - * signature is made offline (otherwise f_rng is desirable - * for countermeasures against timing attacks). - * ECDSA signatures always require a non-NULL f_rng. - */ -int mbedtls_x509write_crt_der( mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -#if defined(MBEDTLS_PEM_WRITE_C) -/** - * \brief Write a built up certificate to a X509 PEM string - * - * \param ctx certificate to write away - * \param buf buffer to write to - * \param size size of the buffer - * \param f_rng RNG function (for signature, see note) - * \param p_rng RNG parameter - * - * \return 0 if successful, or a specific error code - * - * \note f_rng may be NULL if RSA is used for signature and the - * signature is made offline (otherwise f_rng is desirable - * for countermeasures against timing attacks). - * ECDSA signatures always require a non-NULL f_rng. - */ -int mbedtls_x509write_crt_pem( mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); -#endif /* MBEDTLS_PEM_WRITE_C */ -#endif /* MBEDTLS_X509_CRT_WRITE_C */ - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_x509_crt.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_csr.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_csr.h deleted file mode 100644 index 34998a3a59..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/x509_csr.h +++ /dev/null @@ -1,292 +0,0 @@ -/** - * \file x509_csr.h - * - * \brief X.509 certificate signing request parsing and writing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_X509_CSR_H -#define MBEDTLS_X509_CSR_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "x509.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \addtogroup x509_module - * \{ */ - -/** - * \name Structures and functions for X.509 Certificate Signing Requests (CSR) - * \{ - */ - -/** - * Certificate Signing Request (CSR) structure. - */ -typedef struct mbedtls_x509_csr -{ - mbedtls_x509_buf raw; /**< The raw CSR data (DER). */ - mbedtls_x509_buf cri; /**< The raw CertificateRequestInfo body (DER). */ - - int version; /**< CSR version (1=v1). */ - - mbedtls_x509_buf subject_raw; /**< The raw subject data (DER). */ - mbedtls_x509_name subject; /**< The parsed subject data (named information object). */ - - mbedtls_pk_context pk; /**< Container for the public key context. */ - - mbedtls_x509_buf sig_oid; - mbedtls_x509_buf sig; - mbedtls_md_type_t sig_md; /**< Internal representation of the MD algorithm of the signature algorithm, e.g. MBEDTLS_MD_SHA256 */ - mbedtls_pk_type_t sig_pk; /**< Internal representation of the Public Key algorithm of the signature algorithm, e.g. MBEDTLS_PK_RSA */ - void *sig_opts; /**< Signature options to be passed to mbedtls_pk_verify_ext(), e.g. for RSASSA-PSS */ -} -mbedtls_x509_csr; - -/** - * Container for writing a CSR - */ -typedef struct mbedtls_x509write_csr -{ - mbedtls_pk_context *key; - mbedtls_asn1_named_data *subject; - mbedtls_md_type_t md_alg; - mbedtls_asn1_named_data *extensions; -} -mbedtls_x509write_csr; - -#if defined(MBEDTLS_X509_CSR_PARSE_C) -/** - * \brief Load a Certificate Signing Request (CSR) in DER format - * - * \param csr CSR context to fill - * \param buf buffer holding the CRL data - * \param buflen size of the buffer - * - * \return 0 if successful, or a specific X509 error code - */ -int mbedtls_x509_csr_parse_der( mbedtls_x509_csr *csr, - const unsigned char *buf, size_t buflen ); - -/** - * \brief Load a Certificate Signing Request (CSR), DER or PEM format - * - * \param csr CSR context to fill - * \param buf buffer holding the CRL data - * \param buflen size of the buffer - * (including the terminating null byte for PEM data) - * - * \return 0 if successful, or a specific X509 or PEM error code - */ -int mbedtls_x509_csr_parse( mbedtls_x509_csr *csr, const unsigned char *buf, size_t buflen ); - -#if defined(MBEDTLS_FS_IO) -/** - * \brief Load a Certificate Signing Request (CSR) - * - * \param csr CSR context to fill - * \param path filename to read the CSR from - * - * \return 0 if successful, or a specific X509 or PEM error code - */ -int mbedtls_x509_csr_parse_file( mbedtls_x509_csr *csr, const char *path ); -#endif /* MBEDTLS_FS_IO */ - -/** - * \brief Returns an informational string about the - * CSR. - * - * \param buf Buffer to write to - * \param size Maximum size of buffer - * \param prefix A line prefix - * \param csr The X509 CSR to represent - * - * \return The length of the string written (not including the - * terminated nul byte), or a negative error code. - */ -int mbedtls_x509_csr_info( char *buf, size_t size, const char *prefix, - const mbedtls_x509_csr *csr ); - -/** - * \brief Initialize a CSR - * - * \param csr CSR to initialize - */ -void mbedtls_x509_csr_init( mbedtls_x509_csr *csr ); - -/** - * \brief Unallocate all CSR data - * - * \param csr CSR to free - */ -void mbedtls_x509_csr_free( mbedtls_x509_csr *csr ); -#endif /* MBEDTLS_X509_CSR_PARSE_C */ - -/* \} name */ -/* \} addtogroup x509_module */ - -#if defined(MBEDTLS_X509_CSR_WRITE_C) -/** - * \brief Initialize a CSR context - * - * \param ctx CSR context to initialize - */ -void mbedtls_x509write_csr_init( mbedtls_x509write_csr *ctx ); - -/** - * \brief Set the subject name for a CSR - * Subject names should contain a comma-separated list - * of OID types and values: - * e.g. "C=UK,O=ARM,CN=mbed TLS Server 1" - * - * \param ctx CSR context to use - * \param subject_name subject name to set - * - * \return 0 if subject name was parsed successfully, or - * a specific error code - */ -int mbedtls_x509write_csr_set_subject_name( mbedtls_x509write_csr *ctx, - const char *subject_name ); - -/** - * \brief Set the key for a CSR (public key will be included, - * private key used to sign the CSR when writing it) - * - * \param ctx CSR context to use - * \param key Asymetric key to include - */ -void mbedtls_x509write_csr_set_key( mbedtls_x509write_csr *ctx, mbedtls_pk_context *key ); - -/** - * \brief Set the MD algorithm to use for the signature - * (e.g. MBEDTLS_MD_SHA1) - * - * \param ctx CSR context to use - * \param md_alg MD algorithm to use - */ -void mbedtls_x509write_csr_set_md_alg( mbedtls_x509write_csr *ctx, mbedtls_md_type_t md_alg ); - -/** - * \brief Set the Key Usage Extension flags - * (e.g. MBEDTLS_X509_KU_DIGITAL_SIGNATURE | MBEDTLS_X509_KU_KEY_CERT_SIGN) - * - * \param ctx CSR context to use - * \param key_usage key usage flags to set - * - * \return 0 if successful, or MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_csr_set_key_usage( mbedtls_x509write_csr *ctx, unsigned char key_usage ); - -/** - * \brief Set the Netscape Cert Type flags - * (e.g. MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT | MBEDTLS_X509_NS_CERT_TYPE_EMAIL) - * - * \param ctx CSR context to use - * \param ns_cert_type Netscape Cert Type flags to set - * - * \return 0 if successful, or MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_csr_set_ns_cert_type( mbedtls_x509write_csr *ctx, - unsigned char ns_cert_type ); - -/** - * \brief Generic function to add to or replace an extension in the - * CSR - * - * \param ctx CSR context to use - * \param oid OID of the extension - * \param oid_len length of the OID - * \param val value of the extension OCTET STRING - * \param val_len length of the value data - * - * \return 0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED - */ -int mbedtls_x509write_csr_set_extension( mbedtls_x509write_csr *ctx, - const char *oid, size_t oid_len, - const unsigned char *val, size_t val_len ); - -/** - * \brief Free the contents of a CSR context - * - * \param ctx CSR context to free - */ -void mbedtls_x509write_csr_free( mbedtls_x509write_csr *ctx ); - -/** - * \brief Write a CSR (Certificate Signing Request) to a - * DER structure - * Note: data is written at the end of the buffer! Use the - * return value to determine where you should start - * using the buffer - * - * \param ctx CSR to write away - * \param buf buffer to write to - * \param size size of the buffer - * \param f_rng RNG function (for signature, see note) - * \param p_rng RNG parameter - * - * \return length of data written if successful, or a specific - * error code - * - * \note f_rng may be NULL if RSA is used for signature and the - * signature is made offline (otherwise f_rng is desirable - * for countermeasures against timing attacks). - * ECDSA signatures always require a non-NULL f_rng. - */ -int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -#if defined(MBEDTLS_PEM_WRITE_C) -/** - * \brief Write a CSR (Certificate Signing Request) to a - * PEM string - * - * \param ctx CSR to write away - * \param buf buffer to write to - * \param size size of the buffer - * \param f_rng RNG function (for signature, see note) - * \param p_rng RNG parameter - * - * \return 0 if successful, or a specific error code - * - * \note f_rng may be NULL if RSA is used for signature and the - * signature is made offline (otherwise f_rng is desirable - * for couermeasures against timing attacks). - * ECDSA signatures always require a non-NULL f_rng. - */ -int mbedtls_x509write_csr_pem( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); -#endif /* MBEDTLS_PEM_WRITE_C */ -#endif /* MBEDTLS_X509_CSR_WRITE_C */ - -#ifdef __cplusplus -} -#endif - -#endif /* mbedtls_x509_csr.h */ diff --git a/build/premake/premake5/contrib/mbedtls/include/mbedtls/xtea.h b/build/premake/premake5/contrib/mbedtls/include/mbedtls/xtea.h deleted file mode 100644 index b073f84efa..0000000000 --- a/build/premake/premake5/contrib/mbedtls/include/mbedtls/xtea.h +++ /dev/null @@ -1,139 +0,0 @@ -/** - * \file xtea.h - * - * \brief XTEA block cipher (32-bit) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_XTEA_H -#define MBEDTLS_XTEA_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include -#include - -#define MBEDTLS_XTEA_ENCRYPT 1 -#define MBEDTLS_XTEA_DECRYPT 0 - -#define MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH -0x0028 /**< The data input has an invalid length. */ - -#if !defined(MBEDTLS_XTEA_ALT) -// Regular implementation -// - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief XTEA context structure - */ -typedef struct -{ - uint32_t k[4]; /*!< key */ -} -mbedtls_xtea_context; - -/** - * \brief Initialize XTEA context - * - * \param ctx XTEA context to be initialized - */ -void mbedtls_xtea_init( mbedtls_xtea_context *ctx ); - -/** - * \brief Clear XTEA context - * - * \param ctx XTEA context to be cleared - */ -void mbedtls_xtea_free( mbedtls_xtea_context *ctx ); - -/** - * \brief XTEA key schedule - * - * \param ctx XTEA context to be initialized - * \param key the secret key - */ -void mbedtls_xtea_setup( mbedtls_xtea_context *ctx, const unsigned char key[16] ); - -/** - * \brief XTEA cipher function - * - * \param ctx XTEA context - * \param mode MBEDTLS_XTEA_ENCRYPT or MBEDTLS_XTEA_DECRYPT - * \param input 8-byte input block - * \param output 8-byte output block - * - * \return 0 if successful - */ -int mbedtls_xtea_crypt_ecb( mbedtls_xtea_context *ctx, - int mode, - const unsigned char input[8], - unsigned char output[8] ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/** - * \brief XTEA CBC cipher function - * - * \param ctx XTEA context - * \param mode MBEDTLS_XTEA_ENCRYPT or MBEDTLS_XTEA_DECRYPT - * \param length the length of input, multiple of 8 - * \param iv initialization vector for CBC mode - * \param input input block - * \param output output block - * - * \return 0 if successful, - * MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH if the length % 8 != 0 - */ -int mbedtls_xtea_crypt_cbc( mbedtls_xtea_context *ctx, - int mode, - size_t length, - unsigned char iv[8], - const unsigned char *input, - unsigned char *output); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#ifdef __cplusplus -} -#endif - -#else /* MBEDTLS_XTEA_ALT */ -#include "xtea_alt.h" -#endif /* MBEDTLS_XTEA_ALT */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_xtea_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif - -#endif /* xtea.h */ diff --git a/build/premake/premake5/contrib/mbedtls/library/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/library/CMakeLists.txt deleted file mode 100644 index 71d54857cc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/CMakeLists.txt +++ /dev/null @@ -1,161 +0,0 @@ -option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON) -option(USE_SHARED_MBEDTLS_LIBRARY "Build mbed TLS shared library." OFF) -option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) - -set(src_crypto - aes.c - aesni.c - arc4.c - asn1parse.c - asn1write.c - base64.c - bignum.c - blowfish.c - camellia.c - ccm.c - cipher.c - cipher_wrap.c - ctr_drbg.c - des.c - dhm.c - ecdh.c - ecdsa.c - ecjpake.c - ecp.c - ecp_curves.c - entropy.c - entropy_poll.c - error.c - gcm.c - havege.c - hmac_drbg.c - md.c - md2.c - md4.c - md5.c - md_wrap.c - memory_buffer_alloc.c - oid.c - padlock.c - pem.c - pk.c - pk_wrap.c - pkcs12.c - pkcs5.c - pkparse.c - pkwrite.c - platform.c - ripemd160.c - rsa.c - sha1.c - sha256.c - sha512.c - threading.c - timing.c - version.c - version_features.c - xtea.c -) - -set(src_x509 - certs.c - pkcs11.c - x509.c - x509_create.c - x509_crl.c - x509_crt.c - x509_csr.c - x509write_crt.c - x509write_csr.c -) - -set(src_tls - debug.c - net.c - ssl_cache.c - ssl_ciphersuites.c - ssl_cli.c - ssl_cookie.c - ssl_srv.c - ssl_ticket.c - ssl_tls.c -) - -if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes") -endif(CMAKE_COMPILER_IS_GNUCC) - -if(CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes -Wdocumentation -Wno-documentation-deprecated-sync -Wunreachable-code") -endif(CMAKE_COMPILER_IS_CLANG) - -if(WIN32) - set(libs ${libs} ws2_32) -endif(WIN32) - -if(USE_PKCS11_HELPER_LIBRARY) - set(libs ${libs} pkcs11-helper) -endif(USE_PKCS11_HELPER_LIBRARY) - -if(ENABLE_ZLIB_SUPPORT) - set(libs ${libs} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB_SUPPORT) - -if(LINK_WITH_PTHREAD) - set(libs ${libs} pthread) -endif() - -if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) - message(FATAL_ERROR "Need to choose static or shared mbedtls build!") -endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) - -if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) - set(mbedtls_static_target "mbedtls_static") - set(mbedx509_static_target "mbedx509_static") - set(mbedcrypto_static_target "mbedcrypto_static") -elseif(USE_STATIC_MBEDTLS_LIBRARY) - set(mbedtls_static_target "mbedtls") - set(mbedx509_static_target "mbedx509") - set(mbedcrypto_static_target "mbedcrypto") -endif() - -if(USE_STATIC_MBEDTLS_LIBRARY) - add_library(${mbedcrypto_static_target} STATIC ${src_crypto}) - set_target_properties(${mbedcrypto_static_target} PROPERTIES OUTPUT_NAME mbedcrypto) - target_link_libraries(${mbedcrypto_static_target} ${libs}) - - add_library(${mbedx509_static_target} STATIC ${src_x509}) - set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509) - target_link_libraries(${mbedx509_static_target} ${libs} ${mbedcrypto_static_target}) - - add_library(${mbedtls_static_target} STATIC ${src_tls}) - set_target_properties(${mbedtls_static_target} PROPERTIES OUTPUT_NAME mbedtls) - target_link_libraries(${mbedtls_static_target} ${libs} ${mbedx509_static_target}) - - install(TARGETS ${mbedtls_static_target} ${mbedx509_static_target} ${mbedcrypto_static_target} - DESTINATION ${LIB_INSTALL_DIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -endif(USE_STATIC_MBEDTLS_LIBRARY) - -if(USE_SHARED_MBEDTLS_LIBRARY) - add_library(mbedcrypto SHARED ${src_crypto}) - set_target_properties(mbedcrypto PROPERTIES VERSION 2.2.1 SOVERSION 0) - target_link_libraries(mbedcrypto ${libs}) - - add_library(mbedx509 SHARED ${src_x509}) - set_target_properties(mbedx509 PROPERTIES VERSION 2.2.1 SOVERSION 0) - target_link_libraries(mbedx509 ${libs} mbedcrypto) - - add_library(mbedtls SHARED ${src_tls}) - set_target_properties(mbedtls PROPERTIES VERSION 2.2.1 SOVERSION 10) - target_link_libraries(mbedtls ${libs} mbedx509) - - install(TARGETS mbedtls mbedx509 mbedcrypto - DESTINATION ${LIB_INSTALL_DIR} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -endif(USE_SHARED_MBEDTLS_LIBRARY) - -add_custom_target(lib DEPENDS mbedcrypto mbedx509 mbedtls) -if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) - add_dependencies(lib mbedcrypto_static mbedx509_static mbedtls_static) -endif() diff --git a/build/premake/premake5/contrib/mbedtls/library/aes.c b/build/premake/premake5/contrib/mbedtls/library/aes.c deleted file mode 100644 index ec9313de33..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/aes.c +++ /dev/null @@ -1,1490 +0,0 @@ -/* - * FIPS-197 compliant AES implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The AES block cipher was designed by Vincent Rijmen and Joan Daemen. - * - * http://csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf - * http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_AES_C) - -#include - -#include "mbedtls/aes.h" -#if defined(MBEDTLS_PADLOCK_C) -#include "mbedtls/padlock.h" -#endif -#if defined(MBEDTLS_AESNI_C) -#include "mbedtls/aesni.h" -#endif - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_AES_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (little endian) - */ -#ifndef GET_UINT32_LE -#define GET_UINT32_LE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] ) \ - | ( (uint32_t) (b)[(i) + 1] << 8 ) \ - | ( (uint32_t) (b)[(i) + 2] << 16 ) \ - | ( (uint32_t) (b)[(i) + 3] << 24 ); \ -} -#endif - -#ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ - (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ - (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ - (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ -} -#endif - -#if defined(MBEDTLS_PADLOCK_C) && \ - ( defined(MBEDTLS_HAVE_X86) || defined(MBEDTLS_PADLOCK_ALIGN16) ) -static int aes_padlock_ace = -1; -#endif - -#if defined(MBEDTLS_AES_ROM_TABLES) -/* - * Forward S-box - */ -static const unsigned char FSb[256] = -{ - 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, - 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, - 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, - 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, - 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, - 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15, - 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, - 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75, - 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, - 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84, - 0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, - 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF, - 0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, - 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8, - 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, - 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2, - 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, - 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73, - 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, - 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB, - 0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, - 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79, - 0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, - 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08, - 0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, - 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A, - 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, - 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E, - 0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, - 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF, - 0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, - 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16 -}; - -/* - * Forward tables - */ -#define FT \ -\ - V(A5,63,63,C6), V(84,7C,7C,F8), V(99,77,77,EE), V(8D,7B,7B,F6), \ - V(0D,F2,F2,FF), V(BD,6B,6B,D6), V(B1,6F,6F,DE), V(54,C5,C5,91), \ - V(50,30,30,60), V(03,01,01,02), V(A9,67,67,CE), V(7D,2B,2B,56), \ - V(19,FE,FE,E7), V(62,D7,D7,B5), V(E6,AB,AB,4D), V(9A,76,76,EC), \ - V(45,CA,CA,8F), V(9D,82,82,1F), V(40,C9,C9,89), V(87,7D,7D,FA), \ - V(15,FA,FA,EF), V(EB,59,59,B2), V(C9,47,47,8E), V(0B,F0,F0,FB), \ - V(EC,AD,AD,41), V(67,D4,D4,B3), V(FD,A2,A2,5F), V(EA,AF,AF,45), \ - V(BF,9C,9C,23), V(F7,A4,A4,53), V(96,72,72,E4), V(5B,C0,C0,9B), \ - V(C2,B7,B7,75), V(1C,FD,FD,E1), V(AE,93,93,3D), V(6A,26,26,4C), \ - V(5A,36,36,6C), V(41,3F,3F,7E), V(02,F7,F7,F5), V(4F,CC,CC,83), \ - V(5C,34,34,68), V(F4,A5,A5,51), V(34,E5,E5,D1), V(08,F1,F1,F9), \ - V(93,71,71,E2), V(73,D8,D8,AB), V(53,31,31,62), V(3F,15,15,2A), \ - V(0C,04,04,08), V(52,C7,C7,95), V(65,23,23,46), V(5E,C3,C3,9D), \ - V(28,18,18,30), V(A1,96,96,37), V(0F,05,05,0A), V(B5,9A,9A,2F), \ - V(09,07,07,0E), V(36,12,12,24), V(9B,80,80,1B), V(3D,E2,E2,DF), \ - V(26,EB,EB,CD), V(69,27,27,4E), V(CD,B2,B2,7F), V(9F,75,75,EA), \ - V(1B,09,09,12), V(9E,83,83,1D), V(74,2C,2C,58), V(2E,1A,1A,34), \ - V(2D,1B,1B,36), V(B2,6E,6E,DC), V(EE,5A,5A,B4), V(FB,A0,A0,5B), \ - V(F6,52,52,A4), V(4D,3B,3B,76), V(61,D6,D6,B7), V(CE,B3,B3,7D), \ - V(7B,29,29,52), V(3E,E3,E3,DD), V(71,2F,2F,5E), V(97,84,84,13), \ - V(F5,53,53,A6), V(68,D1,D1,B9), V(00,00,00,00), V(2C,ED,ED,C1), \ - V(60,20,20,40), V(1F,FC,FC,E3), V(C8,B1,B1,79), V(ED,5B,5B,B6), \ - V(BE,6A,6A,D4), V(46,CB,CB,8D), V(D9,BE,BE,67), V(4B,39,39,72), \ - V(DE,4A,4A,94), V(D4,4C,4C,98), V(E8,58,58,B0), V(4A,CF,CF,85), \ - V(6B,D0,D0,BB), V(2A,EF,EF,C5), V(E5,AA,AA,4F), V(16,FB,FB,ED), \ - V(C5,43,43,86), V(D7,4D,4D,9A), V(55,33,33,66), V(94,85,85,11), \ - V(CF,45,45,8A), V(10,F9,F9,E9), V(06,02,02,04), V(81,7F,7F,FE), \ - V(F0,50,50,A0), V(44,3C,3C,78), V(BA,9F,9F,25), V(E3,A8,A8,4B), \ - V(F3,51,51,A2), V(FE,A3,A3,5D), V(C0,40,40,80), V(8A,8F,8F,05), \ - V(AD,92,92,3F), V(BC,9D,9D,21), V(48,38,38,70), V(04,F5,F5,F1), \ - V(DF,BC,BC,63), V(C1,B6,B6,77), V(75,DA,DA,AF), V(63,21,21,42), \ - V(30,10,10,20), V(1A,FF,FF,E5), V(0E,F3,F3,FD), V(6D,D2,D2,BF), \ - V(4C,CD,CD,81), V(14,0C,0C,18), V(35,13,13,26), V(2F,EC,EC,C3), \ - V(E1,5F,5F,BE), V(A2,97,97,35), V(CC,44,44,88), V(39,17,17,2E), \ - V(57,C4,C4,93), V(F2,A7,A7,55), V(82,7E,7E,FC), V(47,3D,3D,7A), \ - V(AC,64,64,C8), V(E7,5D,5D,BA), V(2B,19,19,32), V(95,73,73,E6), \ - V(A0,60,60,C0), V(98,81,81,19), V(D1,4F,4F,9E), V(7F,DC,DC,A3), \ - V(66,22,22,44), V(7E,2A,2A,54), V(AB,90,90,3B), V(83,88,88,0B), \ - V(CA,46,46,8C), V(29,EE,EE,C7), V(D3,B8,B8,6B), V(3C,14,14,28), \ - V(79,DE,DE,A7), V(E2,5E,5E,BC), V(1D,0B,0B,16), V(76,DB,DB,AD), \ - V(3B,E0,E0,DB), V(56,32,32,64), V(4E,3A,3A,74), V(1E,0A,0A,14), \ - V(DB,49,49,92), V(0A,06,06,0C), V(6C,24,24,48), V(E4,5C,5C,B8), \ - V(5D,C2,C2,9F), V(6E,D3,D3,BD), V(EF,AC,AC,43), V(A6,62,62,C4), \ - V(A8,91,91,39), V(A4,95,95,31), V(37,E4,E4,D3), V(8B,79,79,F2), \ - V(32,E7,E7,D5), V(43,C8,C8,8B), V(59,37,37,6E), V(B7,6D,6D,DA), \ - V(8C,8D,8D,01), V(64,D5,D5,B1), V(D2,4E,4E,9C), V(E0,A9,A9,49), \ - V(B4,6C,6C,D8), V(FA,56,56,AC), V(07,F4,F4,F3), V(25,EA,EA,CF), \ - V(AF,65,65,CA), V(8E,7A,7A,F4), V(E9,AE,AE,47), V(18,08,08,10), \ - V(D5,BA,BA,6F), V(88,78,78,F0), V(6F,25,25,4A), V(72,2E,2E,5C), \ - V(24,1C,1C,38), V(F1,A6,A6,57), V(C7,B4,B4,73), V(51,C6,C6,97), \ - V(23,E8,E8,CB), V(7C,DD,DD,A1), V(9C,74,74,E8), V(21,1F,1F,3E), \ - V(DD,4B,4B,96), V(DC,BD,BD,61), V(86,8B,8B,0D), V(85,8A,8A,0F), \ - V(90,70,70,E0), V(42,3E,3E,7C), V(C4,B5,B5,71), V(AA,66,66,CC), \ - V(D8,48,48,90), V(05,03,03,06), V(01,F6,F6,F7), V(12,0E,0E,1C), \ - V(A3,61,61,C2), V(5F,35,35,6A), V(F9,57,57,AE), V(D0,B9,B9,69), \ - V(91,86,86,17), V(58,C1,C1,99), V(27,1D,1D,3A), V(B9,9E,9E,27), \ - V(38,E1,E1,D9), V(13,F8,F8,EB), V(B3,98,98,2B), V(33,11,11,22), \ - V(BB,69,69,D2), V(70,D9,D9,A9), V(89,8E,8E,07), V(A7,94,94,33), \ - V(B6,9B,9B,2D), V(22,1E,1E,3C), V(92,87,87,15), V(20,E9,E9,C9), \ - V(49,CE,CE,87), V(FF,55,55,AA), V(78,28,28,50), V(7A,DF,DF,A5), \ - V(8F,8C,8C,03), V(F8,A1,A1,59), V(80,89,89,09), V(17,0D,0D,1A), \ - V(DA,BF,BF,65), V(31,E6,E6,D7), V(C6,42,42,84), V(B8,68,68,D0), \ - V(C3,41,41,82), V(B0,99,99,29), V(77,2D,2D,5A), V(11,0F,0F,1E), \ - V(CB,B0,B0,7B), V(FC,54,54,A8), V(D6,BB,BB,6D), V(3A,16,16,2C) - -#define V(a,b,c,d) 0x##a##b##c##d -static const uint32_t FT0[256] = { FT }; -#undef V - -#define V(a,b,c,d) 0x##b##c##d##a -static const uint32_t FT1[256] = { FT }; -#undef V - -#define V(a,b,c,d) 0x##c##d##a##b -static const uint32_t FT2[256] = { FT }; -#undef V - -#define V(a,b,c,d) 0x##d##a##b##c -static const uint32_t FT3[256] = { FT }; -#undef V - -#undef FT - -/* - * Reverse S-box - */ -static const unsigned char RSb[256] = -{ - 0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, - 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB, - 0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, - 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB, - 0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, - 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E, - 0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, - 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25, - 0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, - 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92, - 0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, - 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84, - 0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, - 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06, - 0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, - 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B, - 0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, - 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73, - 0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, - 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E, - 0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, - 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B, - 0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, - 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4, - 0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, - 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F, - 0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, - 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF, - 0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, - 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61, - 0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, - 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D -}; - -/* - * Reverse tables - */ -#define RT \ -\ - V(50,A7,F4,51), V(53,65,41,7E), V(C3,A4,17,1A), V(96,5E,27,3A), \ - V(CB,6B,AB,3B), V(F1,45,9D,1F), V(AB,58,FA,AC), V(93,03,E3,4B), \ - V(55,FA,30,20), V(F6,6D,76,AD), V(91,76,CC,88), V(25,4C,02,F5), \ - V(FC,D7,E5,4F), V(D7,CB,2A,C5), V(80,44,35,26), V(8F,A3,62,B5), \ - V(49,5A,B1,DE), V(67,1B,BA,25), V(98,0E,EA,45), V(E1,C0,FE,5D), \ - V(02,75,2F,C3), V(12,F0,4C,81), V(A3,97,46,8D), V(C6,F9,D3,6B), \ - V(E7,5F,8F,03), V(95,9C,92,15), V(EB,7A,6D,BF), V(DA,59,52,95), \ - V(2D,83,BE,D4), V(D3,21,74,58), V(29,69,E0,49), V(44,C8,C9,8E), \ - V(6A,89,C2,75), V(78,79,8E,F4), V(6B,3E,58,99), V(DD,71,B9,27), \ - V(B6,4F,E1,BE), V(17,AD,88,F0), V(66,AC,20,C9), V(B4,3A,CE,7D), \ - V(18,4A,DF,63), V(82,31,1A,E5), V(60,33,51,97), V(45,7F,53,62), \ - V(E0,77,64,B1), V(84,AE,6B,BB), V(1C,A0,81,FE), V(94,2B,08,F9), \ - V(58,68,48,70), V(19,FD,45,8F), V(87,6C,DE,94), V(B7,F8,7B,52), \ - V(23,D3,73,AB), V(E2,02,4B,72), V(57,8F,1F,E3), V(2A,AB,55,66), \ - V(07,28,EB,B2), V(03,C2,B5,2F), V(9A,7B,C5,86), V(A5,08,37,D3), \ - V(F2,87,28,30), V(B2,A5,BF,23), V(BA,6A,03,02), V(5C,82,16,ED), \ - V(2B,1C,CF,8A), V(92,B4,79,A7), V(F0,F2,07,F3), V(A1,E2,69,4E), \ - V(CD,F4,DA,65), V(D5,BE,05,06), V(1F,62,34,D1), V(8A,FE,A6,C4), \ - V(9D,53,2E,34), V(A0,55,F3,A2), V(32,E1,8A,05), V(75,EB,F6,A4), \ - V(39,EC,83,0B), V(AA,EF,60,40), V(06,9F,71,5E), V(51,10,6E,BD), \ - V(F9,8A,21,3E), V(3D,06,DD,96), V(AE,05,3E,DD), V(46,BD,E6,4D), \ - V(B5,8D,54,91), V(05,5D,C4,71), V(6F,D4,06,04), V(FF,15,50,60), \ - V(24,FB,98,19), V(97,E9,BD,D6), V(CC,43,40,89), V(77,9E,D9,67), \ - V(BD,42,E8,B0), V(88,8B,89,07), V(38,5B,19,E7), V(DB,EE,C8,79), \ - V(47,0A,7C,A1), V(E9,0F,42,7C), V(C9,1E,84,F8), V(00,00,00,00), \ - V(83,86,80,09), V(48,ED,2B,32), V(AC,70,11,1E), V(4E,72,5A,6C), \ - V(FB,FF,0E,FD), V(56,38,85,0F), V(1E,D5,AE,3D), V(27,39,2D,36), \ - V(64,D9,0F,0A), V(21,A6,5C,68), V(D1,54,5B,9B), V(3A,2E,36,24), \ - V(B1,67,0A,0C), V(0F,E7,57,93), V(D2,96,EE,B4), V(9E,91,9B,1B), \ - V(4F,C5,C0,80), V(A2,20,DC,61), V(69,4B,77,5A), V(16,1A,12,1C), \ - V(0A,BA,93,E2), V(E5,2A,A0,C0), V(43,E0,22,3C), V(1D,17,1B,12), \ - V(0B,0D,09,0E), V(AD,C7,8B,F2), V(B9,A8,B6,2D), V(C8,A9,1E,14), \ - V(85,19,F1,57), V(4C,07,75,AF), V(BB,DD,99,EE), V(FD,60,7F,A3), \ - V(9F,26,01,F7), V(BC,F5,72,5C), V(C5,3B,66,44), V(34,7E,FB,5B), \ - V(76,29,43,8B), V(DC,C6,23,CB), V(68,FC,ED,B6), V(63,F1,E4,B8), \ - V(CA,DC,31,D7), V(10,85,63,42), V(40,22,97,13), V(20,11,C6,84), \ - V(7D,24,4A,85), V(F8,3D,BB,D2), V(11,32,F9,AE), V(6D,A1,29,C7), \ - V(4B,2F,9E,1D), V(F3,30,B2,DC), V(EC,52,86,0D), V(D0,E3,C1,77), \ - V(6C,16,B3,2B), V(99,B9,70,A9), V(FA,48,94,11), V(22,64,E9,47), \ - V(C4,8C,FC,A8), V(1A,3F,F0,A0), V(D8,2C,7D,56), V(EF,90,33,22), \ - V(C7,4E,49,87), V(C1,D1,38,D9), V(FE,A2,CA,8C), V(36,0B,D4,98), \ - V(CF,81,F5,A6), V(28,DE,7A,A5), V(26,8E,B7,DA), V(A4,BF,AD,3F), \ - V(E4,9D,3A,2C), V(0D,92,78,50), V(9B,CC,5F,6A), V(62,46,7E,54), \ - V(C2,13,8D,F6), V(E8,B8,D8,90), V(5E,F7,39,2E), V(F5,AF,C3,82), \ - V(BE,80,5D,9F), V(7C,93,D0,69), V(A9,2D,D5,6F), V(B3,12,25,CF), \ - V(3B,99,AC,C8), V(A7,7D,18,10), V(6E,63,9C,E8), V(7B,BB,3B,DB), \ - V(09,78,26,CD), V(F4,18,59,6E), V(01,B7,9A,EC), V(A8,9A,4F,83), \ - V(65,6E,95,E6), V(7E,E6,FF,AA), V(08,CF,BC,21), V(E6,E8,15,EF), \ - V(D9,9B,E7,BA), V(CE,36,6F,4A), V(D4,09,9F,EA), V(D6,7C,B0,29), \ - V(AF,B2,A4,31), V(31,23,3F,2A), V(30,94,A5,C6), V(C0,66,A2,35), \ - V(37,BC,4E,74), V(A6,CA,82,FC), V(B0,D0,90,E0), V(15,D8,A7,33), \ - V(4A,98,04,F1), V(F7,DA,EC,41), V(0E,50,CD,7F), V(2F,F6,91,17), \ - V(8D,D6,4D,76), V(4D,B0,EF,43), V(54,4D,AA,CC), V(DF,04,96,E4), \ - V(E3,B5,D1,9E), V(1B,88,6A,4C), V(B8,1F,2C,C1), V(7F,51,65,46), \ - V(04,EA,5E,9D), V(5D,35,8C,01), V(73,74,87,FA), V(2E,41,0B,FB), \ - V(5A,1D,67,B3), V(52,D2,DB,92), V(33,56,10,E9), V(13,47,D6,6D), \ - V(8C,61,D7,9A), V(7A,0C,A1,37), V(8E,14,F8,59), V(89,3C,13,EB), \ - V(EE,27,A9,CE), V(35,C9,61,B7), V(ED,E5,1C,E1), V(3C,B1,47,7A), \ - V(59,DF,D2,9C), V(3F,73,F2,55), V(79,CE,14,18), V(BF,37,C7,73), \ - V(EA,CD,F7,53), V(5B,AA,FD,5F), V(14,6F,3D,DF), V(86,DB,44,78), \ - V(81,F3,AF,CA), V(3E,C4,68,B9), V(2C,34,24,38), V(5F,40,A3,C2), \ - V(72,C3,1D,16), V(0C,25,E2,BC), V(8B,49,3C,28), V(41,95,0D,FF), \ - V(71,01,A8,39), V(DE,B3,0C,08), V(9C,E4,B4,D8), V(90,C1,56,64), \ - V(61,84,CB,7B), V(70,B6,32,D5), V(74,5C,6C,48), V(42,57,B8,D0) - -#define V(a,b,c,d) 0x##a##b##c##d -static const uint32_t RT0[256] = { RT }; -#undef V - -#define V(a,b,c,d) 0x##b##c##d##a -static const uint32_t RT1[256] = { RT }; -#undef V - -#define V(a,b,c,d) 0x##c##d##a##b -static const uint32_t RT2[256] = { RT }; -#undef V - -#define V(a,b,c,d) 0x##d##a##b##c -static const uint32_t RT3[256] = { RT }; -#undef V - -#undef RT - -/* - * Round constants - */ -static const uint32_t RCON[10] = -{ - 0x00000001, 0x00000002, 0x00000004, 0x00000008, - 0x00000010, 0x00000020, 0x00000040, 0x00000080, - 0x0000001B, 0x00000036 -}; - -#else /* MBEDTLS_AES_ROM_TABLES */ - -/* - * Forward S-box & tables - */ -static unsigned char FSb[256]; -static uint32_t FT0[256]; -static uint32_t FT1[256]; -static uint32_t FT2[256]; -static uint32_t FT3[256]; - -/* - * Reverse S-box & tables - */ -static unsigned char RSb[256]; -static uint32_t RT0[256]; -static uint32_t RT1[256]; -static uint32_t RT2[256]; -static uint32_t RT3[256]; - -/* - * Round constants - */ -static uint32_t RCON[10]; - -/* - * Tables generation code - */ -#define ROTL8(x) ( ( x << 8 ) & 0xFFFFFFFF ) | ( x >> 24 ) -#define XTIME(x) ( ( x << 1 ) ^ ( ( x & 0x80 ) ? 0x1B : 0x00 ) ) -#define MUL(x,y) ( ( x && y ) ? pow[(log[x]+log[y]) % 255] : 0 ) - -static int aes_init_done = 0; - -static void aes_gen_tables( void ) -{ - int i, x, y, z; - int pow[256]; - int log[256]; - - /* - * compute pow and log tables over GF(2^8) - */ - for( i = 0, x = 1; i < 256; i++ ) - { - pow[i] = x; - log[x] = i; - x = ( x ^ XTIME( x ) ) & 0xFF; - } - - /* - * calculate the round constants - */ - for( i = 0, x = 1; i < 10; i++ ) - { - RCON[i] = (uint32_t) x; - x = XTIME( x ) & 0xFF; - } - - /* - * generate the forward and reverse S-boxes - */ - FSb[0x00] = 0x63; - RSb[0x63] = 0x00; - - for( i = 1; i < 256; i++ ) - { - x = pow[255 - log[i]]; - - y = x; y = ( ( y << 1 ) | ( y >> 7 ) ) & 0xFF; - x ^= y; y = ( ( y << 1 ) | ( y >> 7 ) ) & 0xFF; - x ^= y; y = ( ( y << 1 ) | ( y >> 7 ) ) & 0xFF; - x ^= y; y = ( ( y << 1 ) | ( y >> 7 ) ) & 0xFF; - x ^= y ^ 0x63; - - FSb[i] = (unsigned char) x; - RSb[x] = (unsigned char) i; - } - - /* - * generate the forward and reverse tables - */ - for( i = 0; i < 256; i++ ) - { - x = FSb[i]; - y = XTIME( x ) & 0xFF; - z = ( y ^ x ) & 0xFF; - - FT0[i] = ( (uint32_t) y ) ^ - ( (uint32_t) x << 8 ) ^ - ( (uint32_t) x << 16 ) ^ - ( (uint32_t) z << 24 ); - - FT1[i] = ROTL8( FT0[i] ); - FT2[i] = ROTL8( FT1[i] ); - FT3[i] = ROTL8( FT2[i] ); - - x = RSb[i]; - - RT0[i] = ( (uint32_t) MUL( 0x0E, x ) ) ^ - ( (uint32_t) MUL( 0x09, x ) << 8 ) ^ - ( (uint32_t) MUL( 0x0D, x ) << 16 ) ^ - ( (uint32_t) MUL( 0x0B, x ) << 24 ); - - RT1[i] = ROTL8( RT0[i] ); - RT2[i] = ROTL8( RT1[i] ); - RT3[i] = ROTL8( RT2[i] ); - } -} - -#endif /* MBEDTLS_AES_ROM_TABLES */ - -void mbedtls_aes_init( mbedtls_aes_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_aes_context ) ); -} - -void mbedtls_aes_free( mbedtls_aes_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_aes_context ) ); -} - -/* - * AES key schedule (encryption) - */ -#if !defined(MBEDTLS_AES_SETKEY_ENC_ALT) -int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key, - unsigned int keybits ) -{ - unsigned int i; - uint32_t *RK; - -#if !defined(MBEDTLS_AES_ROM_TABLES) - if( aes_init_done == 0 ) - { - aes_gen_tables(); - aes_init_done = 1; - - } -#endif - - switch( keybits ) - { - case 128: ctx->nr = 10; break; - case 192: ctx->nr = 12; break; - case 256: ctx->nr = 14; break; - default : return( MBEDTLS_ERR_AES_INVALID_KEY_LENGTH ); - } - -#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16) - if( aes_padlock_ace == -1 ) - aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE ); - - if( aes_padlock_ace ) - ctx->rk = RK = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ); - else -#endif - ctx->rk = RK = ctx->buf; - -#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64) - if( mbedtls_aesni_has_support( MBEDTLS_AESNI_AES ) ) - return( mbedtls_aesni_setkey_enc( (unsigned char *) ctx->rk, key, keybits ) ); -#endif - - for( i = 0; i < ( keybits >> 5 ); i++ ) - { - GET_UINT32_LE( RK[i], key, i << 2 ); - } - - switch( ctx->nr ) - { - case 10: - - for( i = 0; i < 10; i++, RK += 4 ) - { - RK[4] = RK[0] ^ RCON[i] ^ - ( (uint32_t) FSb[ ( RK[3] >> 8 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( RK[3] >> 16 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( RK[3] >> 24 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( RK[3] ) & 0xFF ] << 24 ); - - RK[5] = RK[1] ^ RK[4]; - RK[6] = RK[2] ^ RK[5]; - RK[7] = RK[3] ^ RK[6]; - } - break; - - case 12: - - for( i = 0; i < 8; i++, RK += 6 ) - { - RK[6] = RK[0] ^ RCON[i] ^ - ( (uint32_t) FSb[ ( RK[5] >> 8 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( RK[5] >> 16 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( RK[5] >> 24 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( RK[5] ) & 0xFF ] << 24 ); - - RK[7] = RK[1] ^ RK[6]; - RK[8] = RK[2] ^ RK[7]; - RK[9] = RK[3] ^ RK[8]; - RK[10] = RK[4] ^ RK[9]; - RK[11] = RK[5] ^ RK[10]; - } - break; - - case 14: - - for( i = 0; i < 7; i++, RK += 8 ) - { - RK[8] = RK[0] ^ RCON[i] ^ - ( (uint32_t) FSb[ ( RK[7] >> 8 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( RK[7] >> 16 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( RK[7] >> 24 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( RK[7] ) & 0xFF ] << 24 ); - - RK[9] = RK[1] ^ RK[8]; - RK[10] = RK[2] ^ RK[9]; - RK[11] = RK[3] ^ RK[10]; - - RK[12] = RK[4] ^ - ( (uint32_t) FSb[ ( RK[11] ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( RK[11] >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( RK[11] >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( RK[11] >> 24 ) & 0xFF ] << 24 ); - - RK[13] = RK[5] ^ RK[12]; - RK[14] = RK[6] ^ RK[13]; - RK[15] = RK[7] ^ RK[14]; - } - break; - } - - return( 0 ); -} -#endif /* !MBEDTLS_AES_SETKEY_ENC_ALT */ - -/* - * AES key schedule (decryption) - */ -#if !defined(MBEDTLS_AES_SETKEY_DEC_ALT) -int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key, - unsigned int keybits ) -{ - int i, j, ret; - mbedtls_aes_context cty; - uint32_t *RK; - uint32_t *SK; - - mbedtls_aes_init( &cty ); - -#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16) - if( aes_padlock_ace == -1 ) - aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE ); - - if( aes_padlock_ace ) - ctx->rk = RK = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ); - else -#endif - ctx->rk = RK = ctx->buf; - - /* Also checks keybits */ - if( ( ret = mbedtls_aes_setkey_enc( &cty, key, keybits ) ) != 0 ) - goto exit; - - ctx->nr = cty.nr; - -#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64) - if( mbedtls_aesni_has_support( MBEDTLS_AESNI_AES ) ) - { - mbedtls_aesni_inverse_key( (unsigned char *) ctx->rk, - (const unsigned char *) cty.rk, ctx->nr ); - goto exit; - } -#endif - - SK = cty.rk + cty.nr * 4; - - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - - for( i = ctx->nr - 1, SK -= 8; i > 0; i--, SK -= 8 ) - { - for( j = 0; j < 4; j++, SK++ ) - { - *RK++ = RT0[ FSb[ ( *SK ) & 0xFF ] ] ^ - RT1[ FSb[ ( *SK >> 8 ) & 0xFF ] ] ^ - RT2[ FSb[ ( *SK >> 16 ) & 0xFF ] ] ^ - RT3[ FSb[ ( *SK >> 24 ) & 0xFF ] ]; - } - } - - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - -exit: - mbedtls_aes_free( &cty ); - - return( ret ); -} -#endif /* !MBEDTLS_AES_SETKEY_DEC_ALT */ - -#define AES_FROUND(X0,X1,X2,X3,Y0,Y1,Y2,Y3) \ -{ \ - X0 = *RK++ ^ FT0[ ( Y0 ) & 0xFF ] ^ \ - FT1[ ( Y1 >> 8 ) & 0xFF ] ^ \ - FT2[ ( Y2 >> 16 ) & 0xFF ] ^ \ - FT3[ ( Y3 >> 24 ) & 0xFF ]; \ - \ - X1 = *RK++ ^ FT0[ ( Y1 ) & 0xFF ] ^ \ - FT1[ ( Y2 >> 8 ) & 0xFF ] ^ \ - FT2[ ( Y3 >> 16 ) & 0xFF ] ^ \ - FT3[ ( Y0 >> 24 ) & 0xFF ]; \ - \ - X2 = *RK++ ^ FT0[ ( Y2 ) & 0xFF ] ^ \ - FT1[ ( Y3 >> 8 ) & 0xFF ] ^ \ - FT2[ ( Y0 >> 16 ) & 0xFF ] ^ \ - FT3[ ( Y1 >> 24 ) & 0xFF ]; \ - \ - X3 = *RK++ ^ FT0[ ( Y3 ) & 0xFF ] ^ \ - FT1[ ( Y0 >> 8 ) & 0xFF ] ^ \ - FT2[ ( Y1 >> 16 ) & 0xFF ] ^ \ - FT3[ ( Y2 >> 24 ) & 0xFF ]; \ -} - -#define AES_RROUND(X0,X1,X2,X3,Y0,Y1,Y2,Y3) \ -{ \ - X0 = *RK++ ^ RT0[ ( Y0 ) & 0xFF ] ^ \ - RT1[ ( Y3 >> 8 ) & 0xFF ] ^ \ - RT2[ ( Y2 >> 16 ) & 0xFF ] ^ \ - RT3[ ( Y1 >> 24 ) & 0xFF ]; \ - \ - X1 = *RK++ ^ RT0[ ( Y1 ) & 0xFF ] ^ \ - RT1[ ( Y0 >> 8 ) & 0xFF ] ^ \ - RT2[ ( Y3 >> 16 ) & 0xFF ] ^ \ - RT3[ ( Y2 >> 24 ) & 0xFF ]; \ - \ - X2 = *RK++ ^ RT0[ ( Y2 ) & 0xFF ] ^ \ - RT1[ ( Y1 >> 8 ) & 0xFF ] ^ \ - RT2[ ( Y0 >> 16 ) & 0xFF ] ^ \ - RT3[ ( Y3 >> 24 ) & 0xFF ]; \ - \ - X3 = *RK++ ^ RT0[ ( Y3 ) & 0xFF ] ^ \ - RT1[ ( Y2 >> 8 ) & 0xFF ] ^ \ - RT2[ ( Y1 >> 16 ) & 0xFF ] ^ \ - RT3[ ( Y0 >> 24 ) & 0xFF ]; \ -} - -/* - * AES-ECB block encryption - */ -#if !defined(MBEDTLS_AES_ENCRYPT_ALT) -void mbedtls_aes_encrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ) -{ - int i; - uint32_t *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; - - RK = ctx->rk; - - GET_UINT32_LE( X0, input, 0 ); X0 ^= *RK++; - GET_UINT32_LE( X1, input, 4 ); X1 ^= *RK++; - GET_UINT32_LE( X2, input, 8 ); X2 ^= *RK++; - GET_UINT32_LE( X3, input, 12 ); X3 ^= *RK++; - - for( i = ( ctx->nr >> 1 ) - 1; i > 0; i-- ) - { - AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); - AES_FROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 ); - } - - AES_FROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); - - X0 = *RK++ ^ \ - ( (uint32_t) FSb[ ( Y0 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( Y1 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( Y2 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( Y3 >> 24 ) & 0xFF ] << 24 ); - - X1 = *RK++ ^ \ - ( (uint32_t) FSb[ ( Y1 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( Y2 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( Y3 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( Y0 >> 24 ) & 0xFF ] << 24 ); - - X2 = *RK++ ^ \ - ( (uint32_t) FSb[ ( Y2 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( Y3 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( Y0 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( Y1 >> 24 ) & 0xFF ] << 24 ); - - X3 = *RK++ ^ \ - ( (uint32_t) FSb[ ( Y3 ) & 0xFF ] ) ^ - ( (uint32_t) FSb[ ( Y0 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) FSb[ ( Y1 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) FSb[ ( Y2 >> 24 ) & 0xFF ] << 24 ); - - PUT_UINT32_LE( X0, output, 0 ); - PUT_UINT32_LE( X1, output, 4 ); - PUT_UINT32_LE( X2, output, 8 ); - PUT_UINT32_LE( X3, output, 12 ); -} -#endif /* !MBEDTLS_AES_ENCRYPT_ALT */ - -/* - * AES-ECB block decryption - */ -#if !defined(MBEDTLS_AES_DECRYPT_ALT) -void mbedtls_aes_decrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ) -{ - int i; - uint32_t *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; - - RK = ctx->rk; - - GET_UINT32_LE( X0, input, 0 ); X0 ^= *RK++; - GET_UINT32_LE( X1, input, 4 ); X1 ^= *RK++; - GET_UINT32_LE( X2, input, 8 ); X2 ^= *RK++; - GET_UINT32_LE( X3, input, 12 ); X3 ^= *RK++; - - for( i = ( ctx->nr >> 1 ) - 1; i > 0; i-- ) - { - AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); - AES_RROUND( X0, X1, X2, X3, Y0, Y1, Y2, Y3 ); - } - - AES_RROUND( Y0, Y1, Y2, Y3, X0, X1, X2, X3 ); - - X0 = *RK++ ^ \ - ( (uint32_t) RSb[ ( Y0 ) & 0xFF ] ) ^ - ( (uint32_t) RSb[ ( Y3 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) RSb[ ( Y2 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) RSb[ ( Y1 >> 24 ) & 0xFF ] << 24 ); - - X1 = *RK++ ^ \ - ( (uint32_t) RSb[ ( Y1 ) & 0xFF ] ) ^ - ( (uint32_t) RSb[ ( Y0 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) RSb[ ( Y3 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) RSb[ ( Y2 >> 24 ) & 0xFF ] << 24 ); - - X2 = *RK++ ^ \ - ( (uint32_t) RSb[ ( Y2 ) & 0xFF ] ) ^ - ( (uint32_t) RSb[ ( Y1 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) RSb[ ( Y0 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) RSb[ ( Y3 >> 24 ) & 0xFF ] << 24 ); - - X3 = *RK++ ^ \ - ( (uint32_t) RSb[ ( Y3 ) & 0xFF ] ) ^ - ( (uint32_t) RSb[ ( Y2 >> 8 ) & 0xFF ] << 8 ) ^ - ( (uint32_t) RSb[ ( Y1 >> 16 ) & 0xFF ] << 16 ) ^ - ( (uint32_t) RSb[ ( Y0 >> 24 ) & 0xFF ] << 24 ); - - PUT_UINT32_LE( X0, output, 0 ); - PUT_UINT32_LE( X1, output, 4 ); - PUT_UINT32_LE( X2, output, 8 ); - PUT_UINT32_LE( X3, output, 12 ); -} -#endif /* !MBEDTLS_AES_DECRYPT_ALT */ - -/* - * AES-ECB block encryption/decryption - */ -int mbedtls_aes_crypt_ecb( mbedtls_aes_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ) -{ -#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64) - if( mbedtls_aesni_has_support( MBEDTLS_AESNI_AES ) ) - return( mbedtls_aesni_crypt_ecb( ctx, mode, input, output ) ); -#endif - -#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86) - if( aes_padlock_ace ) - { - if( mbedtls_padlock_xcryptecb( ctx, mode, input, output ) == 0 ) - return( 0 ); - - // If padlock data misaligned, we just fall back to - // unaccelerated mode - // - } -#endif - - if( mode == MBEDTLS_AES_ENCRYPT ) - mbedtls_aes_encrypt( ctx, input, output ); - else - mbedtls_aes_decrypt( ctx, input, output ); - - return( 0 ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * AES-CBC buffer encryption/decryption - */ -int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ) -{ - int i; - unsigned char temp[16]; - - if( length % 16 ) - return( MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH ); - -#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86) - if( aes_padlock_ace ) - { - if( mbedtls_padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 ) - return( 0 ); - - // If padlock data misaligned, we just fall back to - // unaccelerated mode - // - } -#endif - - if( mode == MBEDTLS_AES_DECRYPT ) - { - while( length > 0 ) - { - memcpy( temp, input, 16 ); - mbedtls_aes_crypt_ecb( ctx, mode, input, output ); - - for( i = 0; i < 16; i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); - - memcpy( iv, temp, 16 ); - - input += 16; - output += 16; - length -= 16; - } - } - else - { - while( length > 0 ) - { - for( i = 0; i < 16; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); - - mbedtls_aes_crypt_ecb( ctx, mode, output, output ); - memcpy( iv, output, 16 ); - - input += 16; - output += 16; - length -= 16; - } - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/* - * AES-CFB128 buffer encryption/decryption - */ -int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx, - int mode, - size_t length, - size_t *iv_off, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ) -{ - int c; - size_t n = *iv_off; - - if( mode == MBEDTLS_AES_DECRYPT ) - { - while( length-- ) - { - if( n == 0 ) - mbedtls_aes_crypt_ecb( ctx, MBEDTLS_AES_ENCRYPT, iv, iv ); - - c = *input++; - *output++ = (unsigned char)( c ^ iv[n] ); - iv[n] = (unsigned char) c; - - n = ( n + 1 ) & 0x0F; - } - } - else - { - while( length-- ) - { - if( n == 0 ) - mbedtls_aes_crypt_ecb( ctx, MBEDTLS_AES_ENCRYPT, iv, iv ); - - iv[n] = *output++ = (unsigned char)( iv[n] ^ *input++ ); - - n = ( n + 1 ) & 0x0F; - } - } - - *iv_off = n; - - return( 0 ); -} - -/* - * AES-CFB8 buffer encryption/decryption - */ -int mbedtls_aes_crypt_cfb8( mbedtls_aes_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ) -{ - unsigned char c; - unsigned char ov[17]; - - while( length-- ) - { - memcpy( ov, iv, 16 ); - mbedtls_aes_crypt_ecb( ctx, MBEDTLS_AES_ENCRYPT, iv, iv ); - - if( mode == MBEDTLS_AES_DECRYPT ) - ov[16] = *input; - - c = *output++ = (unsigned char)( iv[0] ^ *input++ ); - - if( mode == MBEDTLS_AES_ENCRYPT ) - ov[16] = c; - - memcpy( iv, ov + 1, 16 ); - } - - return( 0 ); -} -#endif /*MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * AES-CTR buffer encryption/decryption - */ -int mbedtls_aes_crypt_ctr( mbedtls_aes_context *ctx, - size_t length, - size_t *nc_off, - unsigned char nonce_counter[16], - unsigned char stream_block[16], - const unsigned char *input, - unsigned char *output ) -{ - int c, i; - size_t n = *nc_off; - - while( length-- ) - { - if( n == 0 ) { - mbedtls_aes_crypt_ecb( ctx, MBEDTLS_AES_ENCRYPT, nonce_counter, stream_block ); - - for( i = 16; i > 0; i-- ) - if( ++nonce_counter[i - 1] != 0 ) - break; - } - c = *input++; - *output++ = (unsigned char)( c ^ stream_block[n] ); - - n = ( n + 1 ) & 0x0F; - } - - *nc_off = n; - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#endif /* !MBEDTLS_AES_ALT */ - -#if defined(MBEDTLS_SELF_TEST) -/* - * AES test vectors from: - * - * http://csrc.nist.gov/archive/aes/rijndael/rijndael-vals.zip - */ -static const unsigned char aes_test_ecb_dec[3][16] = -{ - { 0x44, 0x41, 0x6A, 0xC2, 0xD1, 0xF5, 0x3C, 0x58, - 0x33, 0x03, 0x91, 0x7E, 0x6B, 0xE9, 0xEB, 0xE0 }, - { 0x48, 0xE3, 0x1E, 0x9E, 0x25, 0x67, 0x18, 0xF2, - 0x92, 0x29, 0x31, 0x9C, 0x19, 0xF1, 0x5B, 0xA4 }, - { 0x05, 0x8C, 0xCF, 0xFD, 0xBB, 0xCB, 0x38, 0x2D, - 0x1F, 0x6F, 0x56, 0x58, 0x5D, 0x8A, 0x4A, 0xDE } -}; - -static const unsigned char aes_test_ecb_enc[3][16] = -{ - { 0xC3, 0x4C, 0x05, 0x2C, 0xC0, 0xDA, 0x8D, 0x73, - 0x45, 0x1A, 0xFE, 0x5F, 0x03, 0xBE, 0x29, 0x7F }, - { 0xF3, 0xF6, 0x75, 0x2A, 0xE8, 0xD7, 0x83, 0x11, - 0x38, 0xF0, 0x41, 0x56, 0x06, 0x31, 0xB1, 0x14 }, - { 0x8B, 0x79, 0xEE, 0xCC, 0x93, 0xA0, 0xEE, 0x5D, - 0xFF, 0x30, 0xB4, 0xEA, 0x21, 0x63, 0x6D, 0xA4 } -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const unsigned char aes_test_cbc_dec[3][16] = -{ - { 0xFA, 0xCA, 0x37, 0xE0, 0xB0, 0xC8, 0x53, 0x73, - 0xDF, 0x70, 0x6E, 0x73, 0xF7, 0xC9, 0xAF, 0x86 }, - { 0x5D, 0xF6, 0x78, 0xDD, 0x17, 0xBA, 0x4E, 0x75, - 0xB6, 0x17, 0x68, 0xC6, 0xAD, 0xEF, 0x7C, 0x7B }, - { 0x48, 0x04, 0xE1, 0x81, 0x8F, 0xE6, 0x29, 0x75, - 0x19, 0xA3, 0xE8, 0x8C, 0x57, 0x31, 0x04, 0x13 } -}; - -static const unsigned char aes_test_cbc_enc[3][16] = -{ - { 0x8A, 0x05, 0xFC, 0x5E, 0x09, 0x5A, 0xF4, 0x84, - 0x8A, 0x08, 0xD3, 0x28, 0xD3, 0x68, 0x8E, 0x3D }, - { 0x7B, 0xD9, 0x66, 0xD5, 0x3A, 0xD8, 0xC1, 0xBB, - 0x85, 0xD2, 0xAD, 0xFA, 0xE8, 0x7B, 0xB1, 0x04 }, - { 0xFE, 0x3C, 0x53, 0x65, 0x3E, 0x2F, 0x45, 0xB5, - 0x6F, 0xCD, 0x88, 0xB2, 0xCC, 0x89, 0x8F, 0xF0 } -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/* - * AES-CFB128 test vectors from: - * - * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf - */ -static const unsigned char aes_test_cfb128_key[3][32] = -{ - { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, - 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }, - { 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, - 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, - 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B }, - { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, - 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, - 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, - 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 } -}; - -static const unsigned char aes_test_cfb128_iv[16] = -{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F -}; - -static const unsigned char aes_test_cfb128_pt[64] = -{ - 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, - 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A, - 0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C, - 0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51, - 0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11, - 0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF, - 0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, 0x17, - 0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10 -}; - -static const unsigned char aes_test_cfb128_ct[3][64] = -{ - { 0x3B, 0x3F, 0xD9, 0x2E, 0xB7, 0x2D, 0xAD, 0x20, - 0x33, 0x34, 0x49, 0xF8, 0xE8, 0x3C, 0xFB, 0x4A, - 0xC8, 0xA6, 0x45, 0x37, 0xA0, 0xB3, 0xA9, 0x3F, - 0xCD, 0xE3, 0xCD, 0xAD, 0x9F, 0x1C, 0xE5, 0x8B, - 0x26, 0x75, 0x1F, 0x67, 0xA3, 0xCB, 0xB1, 0x40, - 0xB1, 0x80, 0x8C, 0xF1, 0x87, 0xA4, 0xF4, 0xDF, - 0xC0, 0x4B, 0x05, 0x35, 0x7C, 0x5D, 0x1C, 0x0E, - 0xEA, 0xC4, 0xC6, 0x6F, 0x9F, 0xF7, 0xF2, 0xE6 }, - { 0xCD, 0xC8, 0x0D, 0x6F, 0xDD, 0xF1, 0x8C, 0xAB, - 0x34, 0xC2, 0x59, 0x09, 0xC9, 0x9A, 0x41, 0x74, - 0x67, 0xCE, 0x7F, 0x7F, 0x81, 0x17, 0x36, 0x21, - 0x96, 0x1A, 0x2B, 0x70, 0x17, 0x1D, 0x3D, 0x7A, - 0x2E, 0x1E, 0x8A, 0x1D, 0xD5, 0x9B, 0x88, 0xB1, - 0xC8, 0xE6, 0x0F, 0xED, 0x1E, 0xFA, 0xC4, 0xC9, - 0xC0, 0x5F, 0x9F, 0x9C, 0xA9, 0x83, 0x4F, 0xA0, - 0x42, 0xAE, 0x8F, 0xBA, 0x58, 0x4B, 0x09, 0xFF }, - { 0xDC, 0x7E, 0x84, 0xBF, 0xDA, 0x79, 0x16, 0x4B, - 0x7E, 0xCD, 0x84, 0x86, 0x98, 0x5D, 0x38, 0x60, - 0x39, 0xFF, 0xED, 0x14, 0x3B, 0x28, 0xB1, 0xC8, - 0x32, 0x11, 0x3C, 0x63, 0x31, 0xE5, 0x40, 0x7B, - 0xDF, 0x10, 0x13, 0x24, 0x15, 0xE5, 0x4B, 0x92, - 0xA1, 0x3E, 0xD0, 0xA8, 0x26, 0x7A, 0xE2, 0xF9, - 0x75, 0xA3, 0x85, 0x74, 0x1A, 0xB9, 0xCE, 0xF8, - 0x20, 0x31, 0x62, 0x3D, 0x55, 0xB1, 0xE4, 0x71 } -}; -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * AES-CTR test vectors from: - * - * http://www.faqs.org/rfcs/rfc3686.html - */ - -static const unsigned char aes_test_ctr_key[3][16] = -{ - { 0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC, - 0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E }, - { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7, - 0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63 }, - { 0x76, 0x91, 0xBE, 0x03, 0x5E, 0x50, 0x20, 0xA8, - 0xAC, 0x6E, 0x61, 0x85, 0x29, 0xF9, 0xA0, 0xDC } -}; - -static const unsigned char aes_test_ctr_nonce_counter[3][16] = -{ - { 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0x6C, 0xB6, 0xDB, 0xC0, 0x54, 0x3B, 0x59, - 0xDA, 0x48, 0xD9, 0x0B, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0xE0, 0x01, 0x7B, 0x27, 0x77, 0x7F, 0x3F, - 0x4A, 0x17, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x01 } -}; - -static const unsigned char aes_test_ctr_pt[3][48] = -{ - { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62, - 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, - 0x20, 0x21, 0x22, 0x23 } -}; - -static const unsigned char aes_test_ctr_ct[3][48] = -{ - { 0xE4, 0x09, 0x5D, 0x4F, 0xB7, 0xA7, 0xB3, 0x79, - 0x2D, 0x61, 0x75, 0xA3, 0x26, 0x13, 0x11, 0xB8 }, - { 0x51, 0x04, 0xA1, 0x06, 0x16, 0x8A, 0x72, 0xD9, - 0x79, 0x0D, 0x41, 0xEE, 0x8E, 0xDA, 0xD3, 0x88, - 0xEB, 0x2E, 0x1E, 0xFC, 0x46, 0xDA, 0x57, 0xC8, - 0xFC, 0xE6, 0x30, 0xDF, 0x91, 0x41, 0xBE, 0x28 }, - { 0xC1, 0xCF, 0x48, 0xA8, 0x9F, 0x2F, 0xFD, 0xD9, - 0xCF, 0x46, 0x52, 0xE9, 0xEF, 0xDB, 0x72, 0xD7, - 0x45, 0x40, 0xA4, 0x2B, 0xDE, 0x6D, 0x78, 0x36, - 0xD5, 0x9A, 0x5C, 0xEA, 0xAE, 0xF3, 0x10, 0x53, - 0x25, 0xB2, 0x07, 0x2F } -}; - -static const int aes_test_ctr_len[3] = - { 16, 32, 36 }; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -/* - * Checkup routine - */ -int mbedtls_aes_self_test( int verbose ) -{ - int ret = 0, i, j, u, v; - unsigned char key[32]; - unsigned char buf[64]; - unsigned char iv[16]; -#if defined(MBEDTLS_CIPHER_MODE_CBC) - unsigned char prv[16]; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) || defined(MBEDTLS_CIPHER_MODE_CFB) - size_t offset; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - int len; - unsigned char nonce_counter[16]; - unsigned char stream_block[16]; -#endif - mbedtls_aes_context ctx; - - memset( key, 0, 32 ); - mbedtls_aes_init( &ctx ); - - /* - * ECB mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-ECB-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memset( buf, 0, 16 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - mbedtls_aes_setkey_dec( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - mbedtls_aes_crypt_ecb( &ctx, v, buf, buf ); - - if( memcmp( buf, aes_test_ecb_dec[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - mbedtls_aes_setkey_enc( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - mbedtls_aes_crypt_ecb( &ctx, v, buf, buf ); - - if( memcmp( buf, aes_test_ecb_enc[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /* - * CBC mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-CBC-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memset( iv , 0, 16 ); - memset( prv, 0, 16 ); - memset( buf, 0, 16 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - mbedtls_aes_setkey_dec( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - mbedtls_aes_crypt_cbc( &ctx, v, 16, iv, buf, buf ); - - if( memcmp( buf, aes_test_cbc_dec[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - mbedtls_aes_setkey_enc( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - { - unsigned char tmp[16]; - - mbedtls_aes_crypt_cbc( &ctx, v, 16, iv, buf, buf ); - - memcpy( tmp, prv, 16 ); - memcpy( prv, buf, 16 ); - memcpy( buf, tmp, 16 ); - } - - if( memcmp( prv, aes_test_cbc_enc[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) - /* - * CFB128 mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-CFB128-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( iv, aes_test_cfb128_iv, 16 ); - memcpy( key, aes_test_cfb128_key[u], 16 + u * 8 ); - - offset = 0; - mbedtls_aes_setkey_enc( &ctx, key, 128 + u * 64 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - memcpy( buf, aes_test_cfb128_ct[u], 64 ); - mbedtls_aes_crypt_cfb128( &ctx, v, 64, &offset, iv, buf, buf ); - - if( memcmp( buf, aes_test_cfb128_pt, 64 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - memcpy( buf, aes_test_cfb128_pt, 64 ); - mbedtls_aes_crypt_cfb128( &ctx, v, 64, &offset, iv, buf, buf ); - - if( memcmp( buf, aes_test_cfb128_ct[u], 64 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) - /* - * CTR mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-CTR-128 (%s): ", - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( nonce_counter, aes_test_ctr_nonce_counter[u], 16 ); - memcpy( key, aes_test_ctr_key[u], 16 ); - - offset = 0; - mbedtls_aes_setkey_enc( &ctx, key, 128 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - len = aes_test_ctr_len[u]; - memcpy( buf, aes_test_ctr_ct[u], len ); - - mbedtls_aes_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, aes_test_ctr_pt[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - len = aes_test_ctr_len[u]; - memcpy( buf, aes_test_ctr_pt[u], len ); - - mbedtls_aes_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, aes_test_ctr_ct[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - - ret = 0; - -exit: - mbedtls_aes_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_AES_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/aesni.c b/build/premake/premake5/contrib/mbedtls/library/aesni.c deleted file mode 100644 index 83a5868bd7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/aesni.c +++ /dev/null @@ -1,464 +0,0 @@ -/* - * AES-NI support functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * [AES-WP] http://software.intel.com/en-us/articles/intel-advanced-encryption-standard-aes-instructions-set - * [CLMUL-WP] http://software.intel.com/en-us/articles/intel-carry-less-multiplication-instruction-and-its-usage-for-computing-the-gcm-mode/ - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_AESNI_C) - -#include "mbedtls/aesni.h" - -#include - -#ifndef asm -#define asm __asm -#endif - -#if defined(MBEDTLS_HAVE_X86_64) - -/* - * AES-NI support detection routine - */ -int mbedtls_aesni_has_support( unsigned int what ) -{ - static int done = 0; - static unsigned int c = 0; - - if( ! done ) - { - asm( "movl $1, %%eax \n\t" - "cpuid \n\t" - : "=c" (c) - : - : "eax", "ebx", "edx" ); - done = 1; - } - - return( ( c & what ) != 0 ); -} - -/* - * Binutils needs to be at least 2.19 to support AES-NI instructions. - * Unfortunately, a lot of users have a lower version now (2014-04). - * Emit bytecode directly in order to support "old" version of gas. - * - * Opcodes from the Intel architecture reference manual, vol. 3. - * We always use registers, so we don't need prefixes for memory operands. - * Operand macros are in gas order (src, dst) as opposed to Intel order - * (dst, src) in order to blend better into the surrounding assembly code. - */ -#define AESDEC ".byte 0x66,0x0F,0x38,0xDE," -#define AESDECLAST ".byte 0x66,0x0F,0x38,0xDF," -#define AESENC ".byte 0x66,0x0F,0x38,0xDC," -#define AESENCLAST ".byte 0x66,0x0F,0x38,0xDD," -#define AESIMC ".byte 0x66,0x0F,0x38,0xDB," -#define AESKEYGENA ".byte 0x66,0x0F,0x3A,0xDF," -#define PCLMULQDQ ".byte 0x66,0x0F,0x3A,0x44," - -#define xmm0_xmm0 "0xC0" -#define xmm0_xmm1 "0xC8" -#define xmm0_xmm2 "0xD0" -#define xmm0_xmm3 "0xD8" -#define xmm0_xmm4 "0xE0" -#define xmm1_xmm0 "0xC1" -#define xmm1_xmm2 "0xD1" - -/* - * AES-NI AES-ECB block en(de)cryption - */ -int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ) -{ - asm( "movdqu (%3), %%xmm0 \n\t" // load input - "movdqu (%1), %%xmm1 \n\t" // load round key 0 - "pxor %%xmm1, %%xmm0 \n\t" // round 0 - "addq $16, %1 \n\t" // point to next round key - "subl $1, %0 \n\t" // normal rounds = nr - 1 - "test %2, %2 \n\t" // mode? - "jz 2f \n\t" // 0 = decrypt - - "1: \n\t" // encryption loop - "movdqu (%1), %%xmm1 \n\t" // load round key - AESENC xmm1_xmm0 "\n\t" // do round - "addq $16, %1 \n\t" // point to next round key - "subl $1, %0 \n\t" // loop - "jnz 1b \n\t" - "movdqu (%1), %%xmm1 \n\t" // load round key - AESENCLAST xmm1_xmm0 "\n\t" // last round - "jmp 3f \n\t" - - "2: \n\t" // decryption loop - "movdqu (%1), %%xmm1 \n\t" - AESDEC xmm1_xmm0 "\n\t" // do round - "addq $16, %1 \n\t" - "subl $1, %0 \n\t" - "jnz 2b \n\t" - "movdqu (%1), %%xmm1 \n\t" // load round key - AESDECLAST xmm1_xmm0 "\n\t" // last round - - "3: \n\t" - "movdqu %%xmm0, (%4) \n\t" // export output - : - : "r" (ctx->nr), "r" (ctx->rk), "r" (mode), "r" (input), "r" (output) - : "memory", "cc", "xmm0", "xmm1" ); - - - return( 0 ); -} - -/* - * GCM multiplication: c = a times b in GF(2^128) - * Based on [CLMUL-WP] algorithms 1 (with equation 27) and 5. - */ -void mbedtls_aesni_gcm_mult( unsigned char c[16], - const unsigned char a[16], - const unsigned char b[16] ) -{ - unsigned char aa[16], bb[16], cc[16]; - size_t i; - - /* The inputs are in big-endian order, so byte-reverse them */ - for( i = 0; i < 16; i++ ) - { - aa[i] = a[15 - i]; - bb[i] = b[15 - i]; - } - - asm( "movdqu (%0), %%xmm0 \n\t" // a1:a0 - "movdqu (%1), %%xmm1 \n\t" // b1:b0 - - /* - * Caryless multiplication xmm2:xmm1 = xmm0 * xmm1 - * using [CLMUL-WP] algorithm 1 (p. 13). - */ - "movdqa %%xmm1, %%xmm2 \n\t" // copy of b1:b0 - "movdqa %%xmm1, %%xmm3 \n\t" // same - "movdqa %%xmm1, %%xmm4 \n\t" // same - PCLMULQDQ xmm0_xmm1 ",0x00 \n\t" // a0*b0 = c1:c0 - PCLMULQDQ xmm0_xmm2 ",0x11 \n\t" // a1*b1 = d1:d0 - PCLMULQDQ xmm0_xmm3 ",0x10 \n\t" // a0*b1 = e1:e0 - PCLMULQDQ xmm0_xmm4 ",0x01 \n\t" // a1*b0 = f1:f0 - "pxor %%xmm3, %%xmm4 \n\t" // e1+f1:e0+f0 - "movdqa %%xmm4, %%xmm3 \n\t" // same - "psrldq $8, %%xmm4 \n\t" // 0:e1+f1 - "pslldq $8, %%xmm3 \n\t" // e0+f0:0 - "pxor %%xmm4, %%xmm2 \n\t" // d1:d0+e1+f1 - "pxor %%xmm3, %%xmm1 \n\t" // c1+e0+f1:c0 - - /* - * Now shift the result one bit to the left, - * taking advantage of [CLMUL-WP] eq 27 (p. 20) - */ - "movdqa %%xmm1, %%xmm3 \n\t" // r1:r0 - "movdqa %%xmm2, %%xmm4 \n\t" // r3:r2 - "psllq $1, %%xmm1 \n\t" // r1<<1:r0<<1 - "psllq $1, %%xmm2 \n\t" // r3<<1:r2<<1 - "psrlq $63, %%xmm3 \n\t" // r1>>63:r0>>63 - "psrlq $63, %%xmm4 \n\t" // r3>>63:r2>>63 - "movdqa %%xmm3, %%xmm5 \n\t" // r1>>63:r0>>63 - "pslldq $8, %%xmm3 \n\t" // r0>>63:0 - "pslldq $8, %%xmm4 \n\t" // r2>>63:0 - "psrldq $8, %%xmm5 \n\t" // 0:r1>>63 - "por %%xmm3, %%xmm1 \n\t" // r1<<1|r0>>63:r0<<1 - "por %%xmm4, %%xmm2 \n\t" // r3<<1|r2>>62:r2<<1 - "por %%xmm5, %%xmm2 \n\t" // r3<<1|r2>>62:r2<<1|r1>>63 - - /* - * Now reduce modulo the GCM polynomial x^128 + x^7 + x^2 + x + 1 - * using [CLMUL-WP] algorithm 5 (p. 20). - * Currently xmm2:xmm1 holds x3:x2:x1:x0 (already shifted). - */ - /* Step 2 (1) */ - "movdqa %%xmm1, %%xmm3 \n\t" // x1:x0 - "movdqa %%xmm1, %%xmm4 \n\t" // same - "movdqa %%xmm1, %%xmm5 \n\t" // same - "psllq $63, %%xmm3 \n\t" // x1<<63:x0<<63 = stuff:a - "psllq $62, %%xmm4 \n\t" // x1<<62:x0<<62 = stuff:b - "psllq $57, %%xmm5 \n\t" // x1<<57:x0<<57 = stuff:c - - /* Step 2 (2) */ - "pxor %%xmm4, %%xmm3 \n\t" // stuff:a+b - "pxor %%xmm5, %%xmm3 \n\t" // stuff:a+b+c - "pslldq $8, %%xmm3 \n\t" // a+b+c:0 - "pxor %%xmm3, %%xmm1 \n\t" // x1+a+b+c:x0 = d:x0 - - /* Steps 3 and 4 */ - "movdqa %%xmm1,%%xmm0 \n\t" // d:x0 - "movdqa %%xmm1,%%xmm4 \n\t" // same - "movdqa %%xmm1,%%xmm5 \n\t" // same - "psrlq $1, %%xmm0 \n\t" // e1:x0>>1 = e1:e0' - "psrlq $2, %%xmm4 \n\t" // f1:x0>>2 = f1:f0' - "psrlq $7, %%xmm5 \n\t" // g1:x0>>7 = g1:g0' - "pxor %%xmm4, %%xmm0 \n\t" // e1+f1:e0'+f0' - "pxor %%xmm5, %%xmm0 \n\t" // e1+f1+g1:e0'+f0'+g0' - // e0'+f0'+g0' is almost e0+f0+g0, ex\tcept for some missing - // bits carried from d. Now get those\t bits back in. - "movdqa %%xmm1,%%xmm3 \n\t" // d:x0 - "movdqa %%xmm1,%%xmm4 \n\t" // same - "movdqa %%xmm1,%%xmm5 \n\t" // same - "psllq $63, %%xmm3 \n\t" // d<<63:stuff - "psllq $62, %%xmm4 \n\t" // d<<62:stuff - "psllq $57, %%xmm5 \n\t" // d<<57:stuff - "pxor %%xmm4, %%xmm3 \n\t" // d<<63+d<<62:stuff - "pxor %%xmm5, %%xmm3 \n\t" // missing bits of d:stuff - "psrldq $8, %%xmm3 \n\t" // 0:missing bits of d - "pxor %%xmm3, %%xmm0 \n\t" // e1+f1+g1:e0+f0+g0 - "pxor %%xmm1, %%xmm0 \n\t" // h1:h0 - "pxor %%xmm2, %%xmm0 \n\t" // x3+h1:x2+h0 - - "movdqu %%xmm0, (%2) \n\t" // done - : - : "r" (aa), "r" (bb), "r" (cc) - : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ); - - /* Now byte-reverse the outputs */ - for( i = 0; i < 16; i++ ) - c[i] = cc[15 - i]; - - return; -} - -/* - * Compute decryption round keys from encryption round keys - */ -void mbedtls_aesni_inverse_key( unsigned char *invkey, - const unsigned char *fwdkey, int nr ) -{ - unsigned char *ik = invkey; - const unsigned char *fk = fwdkey + 16 * nr; - - memcpy( ik, fk, 16 ); - - for( fk -= 16, ik += 16; fk > fwdkey; fk -= 16, ik += 16 ) - asm( "movdqu (%0), %%xmm0 \n\t" - AESIMC xmm0_xmm0 "\n\t" - "movdqu %%xmm0, (%1) \n\t" - : - : "r" (fk), "r" (ik) - : "memory", "xmm0" ); - - memcpy( ik, fk, 16 ); -} - -/* - * Key expansion, 128-bit case - */ -static void aesni_setkey_enc_128( unsigned char *rk, - const unsigned char *key ) -{ - asm( "movdqu (%1), %%xmm0 \n\t" // copy the original key - "movdqu %%xmm0, (%0) \n\t" // as round key 0 - "jmp 2f \n\t" // skip auxiliary routine - - /* - * Finish generating the next round key. - * - * On entry xmm0 is r3:r2:r1:r0 and xmm1 is X:stuff:stuff:stuff - * with X = rot( sub( r3 ) ) ^ RCON. - * - * On exit, xmm0 is r7:r6:r5:r4 - * with r4 = X + r0, r5 = r4 + r1, r6 = r5 + r2, r7 = r6 + r3 - * and those are written to the round key buffer. - */ - "1: \n\t" - "pshufd $0xff, %%xmm1, %%xmm1 \n\t" // X:X:X:X - "pxor %%xmm0, %%xmm1 \n\t" // X+r3:X+r2:X+r1:r4 - "pslldq $4, %%xmm0 \n\t" // r2:r1:r0:0 - "pxor %%xmm0, %%xmm1 \n\t" // X+r3+r2:X+r2+r1:r5:r4 - "pslldq $4, %%xmm0 \n\t" // etc - "pxor %%xmm0, %%xmm1 \n\t" - "pslldq $4, %%xmm0 \n\t" - "pxor %%xmm1, %%xmm0 \n\t" // update xmm0 for next time! - "add $16, %0 \n\t" // point to next round key - "movdqu %%xmm0, (%0) \n\t" // write it - "ret \n\t" - - /* Main "loop" */ - "2: \n\t" - AESKEYGENA xmm0_xmm1 ",0x01 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x02 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x04 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x08 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x10 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x20 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x40 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x80 \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x1B \n\tcall 1b \n\t" - AESKEYGENA xmm0_xmm1 ",0x36 \n\tcall 1b \n\t" - : - : "r" (rk), "r" (key) - : "memory", "cc", "0" ); -} - -/* - * Key expansion, 192-bit case - */ -static void aesni_setkey_enc_192( unsigned char *rk, - const unsigned char *key ) -{ - asm( "movdqu (%1), %%xmm0 \n\t" // copy original round key - "movdqu %%xmm0, (%0) \n\t" - "add $16, %0 \n\t" - "movq 16(%1), %%xmm1 \n\t" - "movq %%xmm1, (%0) \n\t" - "add $8, %0 \n\t" - "jmp 2f \n\t" // skip auxiliary routine - - /* - * Finish generating the next 6 quarter-keys. - * - * On entry xmm0 is r3:r2:r1:r0, xmm1 is stuff:stuff:r5:r4 - * and xmm2 is stuff:stuff:X:stuff with X = rot( sub( r3 ) ) ^ RCON. - * - * On exit, xmm0 is r9:r8:r7:r6 and xmm1 is stuff:stuff:r11:r10 - * and those are written to the round key buffer. - */ - "1: \n\t" - "pshufd $0x55, %%xmm2, %%xmm2 \n\t" // X:X:X:X - "pxor %%xmm0, %%xmm2 \n\t" // X+r3:X+r2:X+r1:r4 - "pslldq $4, %%xmm0 \n\t" // etc - "pxor %%xmm0, %%xmm2 \n\t" - "pslldq $4, %%xmm0 \n\t" - "pxor %%xmm0, %%xmm2 \n\t" - "pslldq $4, %%xmm0 \n\t" - "pxor %%xmm2, %%xmm0 \n\t" // update xmm0 = r9:r8:r7:r6 - "movdqu %%xmm0, (%0) \n\t" - "add $16, %0 \n\t" - "pshufd $0xff, %%xmm0, %%xmm2 \n\t" // r9:r9:r9:r9 - "pxor %%xmm1, %%xmm2 \n\t" // stuff:stuff:r9+r5:r10 - "pslldq $4, %%xmm1 \n\t" // r2:r1:r0:0 - "pxor %%xmm2, %%xmm1 \n\t" // xmm1 = stuff:stuff:r11:r10 - "movq %%xmm1, (%0) \n\t" - "add $8, %0 \n\t" - "ret \n\t" - - "2: \n\t" - AESKEYGENA xmm1_xmm2 ",0x01 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x02 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x04 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x08 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x10 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x20 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x40 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x80 \n\tcall 1b \n\t" - - : - : "r" (rk), "r" (key) - : "memory", "cc", "0" ); -} - -/* - * Key expansion, 256-bit case - */ -static void aesni_setkey_enc_256( unsigned char *rk, - const unsigned char *key ) -{ - asm( "movdqu (%1), %%xmm0 \n\t" - "movdqu %%xmm0, (%0) \n\t" - "add $16, %0 \n\t" - "movdqu 16(%1), %%xmm1 \n\t" - "movdqu %%xmm1, (%0) \n\t" - "jmp 2f \n\t" // skip auxiliary routine - - /* - * Finish generating the next two round keys. - * - * On entry xmm0 is r3:r2:r1:r0, xmm1 is r7:r6:r5:r4 and - * xmm2 is X:stuff:stuff:stuff with X = rot( sub( r7 )) ^ RCON - * - * On exit, xmm0 is r11:r10:r9:r8 and xmm1 is r15:r14:r13:r12 - * and those have been written to the output buffer. - */ - "1: \n\t" - "pshufd $0xff, %%xmm2, %%xmm2 \n\t" - "pxor %%xmm0, %%xmm2 \n\t" - "pslldq $4, %%xmm0 \n\t" - "pxor %%xmm0, %%xmm2 \n\t" - "pslldq $4, %%xmm0 \n\t" - "pxor %%xmm0, %%xmm2 \n\t" - "pslldq $4, %%xmm0 \n\t" - "pxor %%xmm2, %%xmm0 \n\t" - "add $16, %0 \n\t" - "movdqu %%xmm0, (%0) \n\t" - - /* Set xmm2 to stuff:Y:stuff:stuff with Y = subword( r11 ) - * and proceed to generate next round key from there */ - AESKEYGENA xmm0_xmm2 ",0x00 \n\t" - "pshufd $0xaa, %%xmm2, %%xmm2 \n\t" - "pxor %%xmm1, %%xmm2 \n\t" - "pslldq $4, %%xmm1 \n\t" - "pxor %%xmm1, %%xmm2 \n\t" - "pslldq $4, %%xmm1 \n\t" - "pxor %%xmm1, %%xmm2 \n\t" - "pslldq $4, %%xmm1 \n\t" - "pxor %%xmm2, %%xmm1 \n\t" - "add $16, %0 \n\t" - "movdqu %%xmm1, (%0) \n\t" - "ret \n\t" - - /* - * Main "loop" - Generating one more key than necessary, - * see definition of mbedtls_aes_context.buf - */ - "2: \n\t" - AESKEYGENA xmm1_xmm2 ",0x01 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x02 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x04 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x08 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x10 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x20 \n\tcall 1b \n\t" - AESKEYGENA xmm1_xmm2 ",0x40 \n\tcall 1b \n\t" - : - : "r" (rk), "r" (key) - : "memory", "cc", "0" ); -} - -/* - * Key expansion, wrapper - */ -int mbedtls_aesni_setkey_enc( unsigned char *rk, - const unsigned char *key, - size_t bits ) -{ - switch( bits ) - { - case 128: aesni_setkey_enc_128( rk, key ); break; - case 192: aesni_setkey_enc_192( rk, key ); break; - case 256: aesni_setkey_enc_256( rk, key ); break; - default : return( MBEDTLS_ERR_AES_INVALID_KEY_LENGTH ); - } - - return( 0 ); -} - -#endif /* MBEDTLS_HAVE_X86_64 */ - -#endif /* MBEDTLS_AESNI_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/arc4.c b/build/premake/premake5/contrib/mbedtls/library/arc4.c deleted file mode 100644 index ff0e993e7f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/arc4.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * An implementation of the ARCFOUR algorithm - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The ARCFOUR algorithm was publicly disclosed on 94/09. - * - * http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0 - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ARC4_C) - -#include "mbedtls/arc4.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_ARC4_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -void mbedtls_arc4_init( mbedtls_arc4_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_arc4_context ) ); -} - -void mbedtls_arc4_free( mbedtls_arc4_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_arc4_context ) ); -} - -/* - * ARC4 key schedule - */ -void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key, - unsigned int keylen ) -{ - int i, j, a; - unsigned int k; - unsigned char *m; - - ctx->x = 0; - ctx->y = 0; - m = ctx->m; - - for( i = 0; i < 256; i++ ) - m[i] = (unsigned char) i; - - j = k = 0; - - for( i = 0; i < 256; i++, k++ ) - { - if( k >= keylen ) k = 0; - - a = m[i]; - j = ( j + a + key[k] ) & 0xFF; - m[i] = m[j]; - m[j] = (unsigned char) a; - } -} - -/* - * ARC4 cipher function - */ -int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, - unsigned char *output ) -{ - int x, y, a, b; - size_t i; - unsigned char *m; - - x = ctx->x; - y = ctx->y; - m = ctx->m; - - for( i = 0; i < length; i++ ) - { - x = ( x + 1 ) & 0xFF; a = m[x]; - y = ( y + a ) & 0xFF; b = m[y]; - - m[x] = (unsigned char) b; - m[y] = (unsigned char) a; - - output[i] = (unsigned char) - ( input[i] ^ m[(unsigned char)( a + b )] ); - } - - ctx->x = x; - ctx->y = y; - - return( 0 ); -} - -#endif /* !MBEDTLS_ARC4_ALT */ - -#if defined(MBEDTLS_SELF_TEST) -/* - * ARC4 tests vectors as posted by Eric Rescorla in sep. 1994: - * - * http://groups.google.com/group/comp.security.misc/msg/10a300c9d21afca0 - */ -static const unsigned char arc4_test_key[3][8] = -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char arc4_test_pt[3][8] = -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char arc4_test_ct[3][8] = -{ - { 0x75, 0xB7, 0x87, 0x80, 0x99, 0xE0, 0xC5, 0x96 }, - { 0x74, 0x94, 0xC2, 0xE7, 0x10, 0x4B, 0x08, 0x79 }, - { 0xDE, 0x18, 0x89, 0x41, 0xA3, 0x37, 0x5D, 0x3A } -}; - -/* - * Checkup routine - */ -int mbedtls_arc4_self_test( int verbose ) -{ - int i, ret = 0; - unsigned char ibuf[8]; - unsigned char obuf[8]; - mbedtls_arc4_context ctx; - - mbedtls_arc4_init( &ctx ); - - for( i = 0; i < 3; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " ARC4 test #%d: ", i + 1 ); - - memcpy( ibuf, arc4_test_pt[i], 8 ); - - mbedtls_arc4_setup( &ctx, arc4_test_key[i], 8 ); - mbedtls_arc4_crypt( &ctx, 8, ibuf, obuf ); - - if( memcmp( obuf, arc4_test_ct[i], 8 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_arc4_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_ARC4_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/asn1parse.c b/build/premake/premake5/contrib/mbedtls/library/asn1parse.c deleted file mode 100644 index b37523def0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/asn1parse.c +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Generic ASN.1 parsing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ASN1_PARSE_C) - -#include "mbedtls/asn1.h" - -#include - -#if defined(MBEDTLS_BIGNUM_C) -#include "mbedtls/bignum.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * ASN.1 DER decoding routines - */ -int mbedtls_asn1_get_len( unsigned char **p, - const unsigned char *end, - size_t *len ) -{ - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - if( ( **p & 0x80 ) == 0 ) - *len = *(*p)++; - else - { - switch( **p & 0x7F ) - { - case 1: - if( ( end - *p ) < 2 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - *len = (*p)[1]; - (*p) += 2; - break; - - case 2: - if( ( end - *p ) < 3 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - *len = ( (size_t)(*p)[1] << 8 ) | (*p)[2]; - (*p) += 3; - break; - - case 3: - if( ( end - *p ) < 4 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - *len = ( (size_t)(*p)[1] << 16 ) | - ( (size_t)(*p)[2] << 8 ) | (*p)[3]; - (*p) += 4; - break; - - case 4: - if( ( end - *p ) < 5 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - *len = ( (size_t)(*p)[1] << 24 ) | ( (size_t)(*p)[2] << 16 ) | - ( (size_t)(*p)[3] << 8 ) | (*p)[4]; - (*p) += 5; - break; - - default: - return( MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - } - } - - if( *len > (size_t) ( end - *p ) ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - return( 0 ); -} - -int mbedtls_asn1_get_tag( unsigned char **p, - const unsigned char *end, - size_t *len, int tag ) -{ - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - if( **p != tag ) - return( MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - (*p)++; - - return( mbedtls_asn1_get_len( p, end, len ) ); -} - -int mbedtls_asn1_get_bool( unsigned char **p, - const unsigned char *end, - int *val ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, MBEDTLS_ASN1_BOOLEAN ) ) != 0 ) - return( ret ); - - if( len != 1 ) - return( MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - - *val = ( **p != 0 ) ? 1 : 0; - (*p)++; - - return( 0 ); -} - -int mbedtls_asn1_get_int( unsigned char **p, - const unsigned char *end, - int *val ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, MBEDTLS_ASN1_INTEGER ) ) != 0 ) - return( ret ); - - if( len > sizeof( int ) || ( **p & 0x80 ) != 0 ) - return( MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - - *val = 0; - - while( len-- > 0 ) - { - *val = ( *val << 8 ) | **p; - (*p)++; - } - - return( 0 ); -} - -#if defined(MBEDTLS_BIGNUM_C) -int mbedtls_asn1_get_mpi( unsigned char **p, - const unsigned char *end, - mbedtls_mpi *X ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, MBEDTLS_ASN1_INTEGER ) ) != 0 ) - return( ret ); - - ret = mbedtls_mpi_read_binary( X, *p, len ); - - *p += len; - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C */ - -int mbedtls_asn1_get_bitstring( unsigned char **p, const unsigned char *end, - mbedtls_asn1_bitstring *bs) -{ - int ret; - - /* Certificate type is a single byte bitstring */ - if( ( ret = mbedtls_asn1_get_tag( p, end, &bs->len, MBEDTLS_ASN1_BIT_STRING ) ) != 0 ) - return( ret ); - - /* Check length, subtract one for actual bit string length */ - if( bs->len < 1 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - bs->len -= 1; - - /* Get number of unused bits, ensure unused bits <= 7 */ - bs->unused_bits = **p; - if( bs->unused_bits > 7 ) - return( MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - (*p)++; - - /* Get actual bitstring */ - bs->p = *p; - *p += bs->len; - - if( *p != end ) - return( MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * Get a bit string without unused bits - */ -int mbedtls_asn1_get_bitstring_null( unsigned char **p, const unsigned char *end, - size_t *len ) -{ - int ret; - - if( ( ret = mbedtls_asn1_get_tag( p, end, len, MBEDTLS_ASN1_BIT_STRING ) ) != 0 ) - return( ret ); - - if( (*len)-- < 2 || *(*p)++ != 0 ) - return( MBEDTLS_ERR_ASN1_INVALID_DATA ); - - return( 0 ); -} - - - -/* - * Parses and splits an ASN.1 "SEQUENCE OF " - */ -int mbedtls_asn1_get_sequence_of( unsigned char **p, - const unsigned char *end, - mbedtls_asn1_sequence *cur, - int tag) -{ - int ret; - size_t len; - mbedtls_asn1_buf *buf; - - /* Get main sequence tag */ - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( ret ); - - if( *p + len != end ) - return( MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - while( *p < end ) - { - buf = &(cur->buf); - buf->tag = **p; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &buf->len, tag ) ) != 0 ) - return( ret ); - - buf->p = *p; - *p += buf->len; - - /* Allocate and assign next pointer */ - if( *p < end ) - { - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_asn1_sequence ) ); - - if( cur->next == NULL ) - return( MBEDTLS_ERR_ASN1_ALLOC_FAILED ); - - cur = cur->next; - } - } - - /* Set final sequence entry's next pointer to NULL */ - cur->next = NULL; - - if( *p != end ) - return( MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -int mbedtls_asn1_get_alg( unsigned char **p, - const unsigned char *end, - mbedtls_asn1_buf *alg, mbedtls_asn1_buf *params ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( ret ); - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - alg->tag = **p; - end = *p + len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &alg->len, MBEDTLS_ASN1_OID ) ) != 0 ) - return( ret ); - - alg->p = *p; - *p += alg->len; - - if( *p == end ) - { - mbedtls_zeroize( params, sizeof(mbedtls_asn1_buf) ); - return( 0 ); - } - - params->tag = **p; - (*p)++; - - if( ( ret = mbedtls_asn1_get_len( p, end, ¶ms->len ) ) != 0 ) - return( ret ); - - params->p = *p; - *p += params->len; - - if( *p != end ) - return( MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -int mbedtls_asn1_get_alg_null( unsigned char **p, - const unsigned char *end, - mbedtls_asn1_buf *alg ) -{ - int ret; - mbedtls_asn1_buf params; - - memset( ¶ms, 0, sizeof(mbedtls_asn1_buf) ); - - if( ( ret = mbedtls_asn1_get_alg( p, end, alg, ¶ms ) ) != 0 ) - return( ret ); - - if( ( params.tag != MBEDTLS_ASN1_NULL && params.tag != 0 ) || params.len != 0 ) - return( MBEDTLS_ERR_ASN1_INVALID_DATA ); - - return( 0 ); -} - -void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *cur ) -{ - if( cur == NULL ) - return; - - mbedtls_free( cur->oid.p ); - mbedtls_free( cur->val.p ); - - mbedtls_zeroize( cur, sizeof( mbedtls_asn1_named_data ) ); -} - -void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head ) -{ - mbedtls_asn1_named_data *cur; - - while( ( cur = *head ) != NULL ) - { - *head = cur->next; - mbedtls_asn1_free_named_data( cur ); - mbedtls_free( cur ); - } -} - -mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list, - const char *oid, size_t len ) -{ - while( list != NULL ) - { - if( list->oid.len == len && - memcmp( list->oid.p, oid, len ) == 0 ) - { - break; - } - - list = list->next; - } - - return( list ); -} - -#endif /* MBEDTLS_ASN1_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/asn1write.c b/build/premake/premake5/contrib/mbedtls/library/asn1write.c deleted file mode 100644 index 00ed73c114..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/asn1write.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * ASN.1 buffer writing functionality - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ASN1_WRITE_C) - -#include "mbedtls/asn1write.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len ) -{ - if( len < 0x80 ) - { - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = (unsigned char) len; - return( 1 ); - } - - if( len <= 0xFF ) - { - if( *p - start < 2 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = (unsigned char) len; - *--(*p) = 0x81; - return( 2 ); - } - - if( *p - start < 3 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - // We assume we never have lengths larger than 65535 bytes - // - *--(*p) = len % 256; - *--(*p) = ( len / 256 ) % 256; - *--(*p) = 0x82; - - return( 3 ); -} - -int mbedtls_asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag ) -{ - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = tag; - - return( 1 ); -} - -int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, - const unsigned char *buf, size_t size ) -{ - size_t len = 0; - - if( *p < start || (size_t)( *p - start ) < size ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - len = size; - (*p) -= len; - memcpy( *p, buf, len ); - - return( (int) len ); -} - -#if defined(MBEDTLS_BIGNUM_C) -int mbedtls_asn1_write_mpi( unsigned char **p, unsigned char *start, const mbedtls_mpi *X ) -{ - int ret; - size_t len = 0; - - // Write the MPI - // - len = mbedtls_mpi_size( X ); - - if( *p < start || (size_t)( *p - start ) < len ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - (*p) -= len; - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, *p, len ) ); - - // DER format assumes 2s complement for numbers, so the leftmost bit - // should be 0 for positive numbers and 1 for negative numbers. - // - if( X->s ==1 && **p & 0x80 ) - { - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = 0x00; - len += 1; - } - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_INTEGER ) ); - - ret = (int) len; - -cleanup: - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C */ - -int mbedtls_asn1_write_null( unsigned char **p, unsigned char *start ) -{ - int ret; - size_t len = 0; - - // Write NULL - // - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, 0) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_NULL ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_oid( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len ) -{ - int ret; - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, - (const unsigned char *) oid, oid_len ) ); - MBEDTLS_ASN1_CHK_ADD( len , mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len , mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OID ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len, - size_t par_len ) -{ - int ret; - size_t len = 0; - - if( par_len == 0 ) - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_null( p, start ) ); - else - len += par_len; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid, oid_len ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_bool( unsigned char **p, unsigned char *start, int boolean ) -{ - int ret; - size_t len = 0; - - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = (boolean) ? 255 : 0; - len++; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_BOOLEAN ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_int( unsigned char **p, unsigned char *start, int val ) -{ - int ret; - size_t len = 0; - - // TODO negative values and values larger than 128 - // DER format assumes 2s complement for numbers, so the leftmost bit - // should be 0 for positive numbers and 1 for negative numbers. - // - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - len += 1; - *--(*p) = val; - - if( val > 0 && **p & 0x80 ) - { - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = 0x00; - len += 1; - } - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_INTEGER ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_printable_string( unsigned char **p, unsigned char *start, - const char *text, size_t text_len ) -{ - int ret; - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, - (const unsigned char *) text, text_len ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_PRINTABLE_STRING ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_ia5_string( unsigned char **p, unsigned char *start, - const char *text, size_t text_len ) -{ - int ret; - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, - (const unsigned char *) text, text_len ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_IA5_STRING ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_bitstring( unsigned char **p, unsigned char *start, - const unsigned char *buf, size_t bits ) -{ - int ret; - size_t len = 0, size; - - size = ( bits / 8 ) + ( ( bits % 8 ) ? 1 : 0 ); - - // Calculate byte length - // - if( *p < start || (size_t)( *p - start ) < size + 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - len = size + 1; - (*p) -= size; - memcpy( *p, buf, size ); - - // Write unused bits - // - *--(*p) = (unsigned char) (size * 8 - bits); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_BIT_STRING ) ); - - return( (int) len ); -} - -int mbedtls_asn1_write_octet_string( unsigned char **p, unsigned char *start, - const unsigned char *buf, size_t size ) -{ - int ret; - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, buf, size ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OCTET_STRING ) ); - - return( (int) len ); -} - -mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data **head, - const char *oid, size_t oid_len, - const unsigned char *val, - size_t val_len ) -{ - mbedtls_asn1_named_data *cur; - - if( ( cur = mbedtls_asn1_find_named_data( *head, oid, oid_len ) ) == NULL ) - { - // Add new entry if not present yet based on OID - // - if( ( cur = mbedtls_calloc( 1, sizeof(mbedtls_asn1_named_data) ) ) == NULL ) - return( NULL ); - - cur->oid.len = oid_len; - cur->oid.p = mbedtls_calloc( 1, oid_len ); - if( cur->oid.p == NULL ) - { - mbedtls_free( cur ); - return( NULL ); - } - - memcpy( cur->oid.p, oid, oid_len ); - - cur->val.len = val_len; - cur->val.p = mbedtls_calloc( 1, val_len ); - if( cur->val.p == NULL ) - { - mbedtls_free( cur->oid.p ); - mbedtls_free( cur ); - return( NULL ); - } - - cur->next = *head; - *head = cur; - } - else if( cur->val.len < val_len ) - { - /* - * Enlarge existing value buffer if needed - * Preserve old data until the allocation succeeded, to leave list in - * a consistent state in case allocation fails. - */ - void *p = mbedtls_calloc( 1, val_len ); - if( p == NULL ) - return( NULL ); - - mbedtls_free( cur->val.p ); - cur->val.p = p; - cur->val.len = val_len; - } - - if( val != NULL ) - memcpy( cur->val.p, val, val_len ); - - return( cur ); -} -#endif /* MBEDTLS_ASN1_WRITE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/base64.c b/build/premake/premake5/contrib/mbedtls/library/base64.c deleted file mode 100644 index 3432e5fcd7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/base64.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * RFC 1521 base64 encoding/decoding - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_BASE64_C) - -#include "mbedtls/base64.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#include -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -static const unsigned char base64_enc_map[64] = -{ - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', - 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', '+', '/' -}; - -static const unsigned char base64_dec_map[128] = -{ - 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 62, 127, 127, 127, 63, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 127, 127, - 127, 64, 127, 127, 127, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 127, 127, 127, 127, 127, 127, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 127, 127, 127, 127, 127 -}; - -#define BASE64_SIZE_T_MAX ( (size_t) -1 ) /* SIZE_T_MAX is not standard */ - -/* - * Encode a buffer into base64 format - */ -int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, - const unsigned char *src, size_t slen ) -{ - size_t i, n; - int C1, C2, C3; - unsigned char *p; - - if( slen == 0 ) - { - *olen = 0; - return( 0 ); - } - - n = slen / 3 + ( slen % 3 != 0 ); - - if( n > ( BASE64_SIZE_T_MAX - 1 ) / 4 ) - { - *olen = BASE64_SIZE_T_MAX; - return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); - } - - n *= 4; - - if( dlen < n + 1 ) - { - *olen = n + 1; - return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); - } - - n = ( slen / 3 ) * 3; - - for( i = 0, p = dst; i < n; i += 3 ) - { - C1 = *src++; - C2 = *src++; - C3 = *src++; - - *p++ = base64_enc_map[(C1 >> 2) & 0x3F]; - *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F]; - *p++ = base64_enc_map[(((C2 & 15) << 2) + (C3 >> 6)) & 0x3F]; - *p++ = base64_enc_map[C3 & 0x3F]; - } - - if( i < slen ) - { - C1 = *src++; - C2 = ( ( i + 1 ) < slen ) ? *src++ : 0; - - *p++ = base64_enc_map[(C1 >> 2) & 0x3F]; - *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F]; - - if( ( i + 1 ) < slen ) - *p++ = base64_enc_map[((C2 & 15) << 2) & 0x3F]; - else *p++ = '='; - - *p++ = '='; - } - - *olen = p - dst; - *p = 0; - - return( 0 ); -} - -/* - * Decode a base64-formatted buffer - */ -int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, - const unsigned char *src, size_t slen ) -{ - size_t i, n; - uint32_t j, x; - unsigned char *p; - - /* First pass: check for validity and get output length */ - for( i = n = j = 0; i < slen; i++ ) - { - /* Skip spaces before checking for EOL */ - x = 0; - while( i < slen && src[i] == ' ' ) - { - ++i; - ++x; - } - - /* Spaces at end of buffer are OK */ - if( i == slen ) - break; - - if( ( slen - i ) >= 2 && - src[i] == '\r' && src[i + 1] == '\n' ) - continue; - - if( src[i] == '\n' ) - continue; - - /* Space inside a line is an error */ - if( x != 0 ) - return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); - - if( src[i] == '=' && ++j > 2 ) - return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); - - if( src[i] > 127 || base64_dec_map[src[i]] == 127 ) - return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); - - if( base64_dec_map[src[i]] < 64 && j != 0 ) - return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); - - n++; - } - - if( n == 0 ) - { - *olen = 0; - return( 0 ); - } - - n = ( ( n * 6 ) + 7 ) >> 3; - n -= j; - - if( dst == NULL || dlen < n ) - { - *olen = n; - return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); - } - - for( j = 3, n = x = 0, p = dst; i > 0; i--, src++ ) - { - if( *src == '\r' || *src == '\n' || *src == ' ' ) - continue; - - j -= ( base64_dec_map[*src] == 64 ); - x = ( x << 6 ) | ( base64_dec_map[*src] & 0x3F ); - - if( ++n == 4 ) - { - n = 0; - if( j > 0 ) *p++ = (unsigned char)( x >> 16 ); - if( j > 1 ) *p++ = (unsigned char)( x >> 8 ); - if( j > 2 ) *p++ = (unsigned char)( x ); - } - } - - *olen = p - dst; - - return( 0 ); -} - -#if defined(MBEDTLS_SELF_TEST) - -static const unsigned char base64_test_dec[64] = -{ - 0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD, - 0xBF, 0x17, 0xD9, 0xA2, 0xC4, 0x17, 0x1A, 0x01, - 0x94, 0xED, 0x8F, 0x1E, 0x11, 0xB3, 0xD7, 0x09, - 0x0C, 0xB6, 0xE9, 0x10, 0x6F, 0x22, 0xEE, 0x13, - 0xCA, 0xB3, 0x07, 0x05, 0x76, 0xC9, 0xFA, 0x31, - 0x6C, 0x08, 0x34, 0xFF, 0x8D, 0xC2, 0x6C, 0x38, - 0x00, 0x43, 0xE9, 0x54, 0x97, 0xAF, 0x50, 0x4B, - 0xD1, 0x41, 0xBA, 0x95, 0x31, 0x5A, 0x0B, 0x97 -}; - -static const unsigned char base64_test_enc[] = - "JEhuVodiWr2/F9mixBcaAZTtjx4Rs9cJDLbpEG8i7hPK" - "swcFdsn6MWwINP+Nwmw4AEPpVJevUEvRQbqVMVoLlw=="; - -/* - * Checkup routine - */ -int mbedtls_base64_self_test( int verbose ) -{ - size_t len; - const unsigned char *src; - unsigned char buffer[128]; - - if( verbose != 0 ) - mbedtls_printf( " Base64 encoding test: " ); - - src = base64_test_dec; - - if( mbedtls_base64_encode( buffer, sizeof( buffer ), &len, src, 64 ) != 0 || - memcmp( base64_test_enc, buffer, 88 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n Base64 decoding test: " ); - - src = base64_test_enc; - - if( mbedtls_base64_decode( buffer, sizeof( buffer ), &len, src, 88 ) != 0 || - memcmp( base64_test_dec, buffer, 64 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_BASE64_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/bignum.c b/build/premake/premake5/contrib/mbedtls/library/bignum.c deleted file mode 100644 index 0e587f15ed..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/bignum.c +++ /dev/null @@ -1,2433 +0,0 @@ -/* - * Multi-precision integer library - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * The following sources were referenced in the design of this Multi-precision - * Integer library: - * - * [1] Handbook of Applied Cryptography - 1997 - * Menezes, van Oorschot and Vanstone - * - * [2] Multi-Precision Math - * Tom St Denis - * https://github.com/libtom/libtommath/blob/develop/tommath.pdf - * - * [3] GNU Multi-Precision Arithmetic Library - * https://gmplib.org/manual/index.html - * - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_BIGNUM_C) - -#include "mbedtls/bignum.h" -#include "mbedtls/bn_mul.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -#define ciL (sizeof(mbedtls_mpi_uint)) /* chars in limb */ -#define biL (ciL << 3) /* bits in limb */ -#define biH (ciL << 2) /* half limb size */ - -#define MPI_SIZE_T_MAX ( (size_t) -1 ) /* SIZE_T_MAX is not standard */ - -/* - * Convert between bits/chars and number of limbs - * Divide first in order to avoid potential overflows - */ -#define BITS_TO_LIMBS(i) ( (i) / biL + ( (i) % biL != 0 ) ) -#define CHARS_TO_LIMBS(i) ( (i) / ciL + ( (i) % ciL != 0 ) ) - -/* - * Initialize one MPI - */ -void mbedtls_mpi_init( mbedtls_mpi *X ) -{ - if( X == NULL ) - return; - - X->s = 1; - X->n = 0; - X->p = NULL; -} - -/* - * Unallocate one MPI - */ -void mbedtls_mpi_free( mbedtls_mpi *X ) -{ - if( X == NULL ) - return; - - if( X->p != NULL ) - { - mbedtls_zeroize( X->p, X->n * ciL ); - mbedtls_free( X->p ); - } - - X->s = 1; - X->n = 0; - X->p = NULL; -} - -/* - * Enlarge to the specified number of limbs - */ -int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ) -{ - mbedtls_mpi_uint *p; - - if( nblimbs > MBEDTLS_MPI_MAX_LIMBS ) - return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); - - if( X->n < nblimbs ) - { - if( ( p = mbedtls_calloc( nblimbs, ciL ) ) == NULL ) - return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); - - if( X->p != NULL ) - { - memcpy( p, X->p, X->n * ciL ); - mbedtls_zeroize( X->p, X->n * ciL ); - mbedtls_free( X->p ); - } - - X->n = nblimbs; - X->p = p; - } - - return( 0 ); -} - -/* - * Resize down as much as possible, - * while keeping at least the specified number of limbs - */ -int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ) -{ - mbedtls_mpi_uint *p; - size_t i; - - /* Actually resize up in this case */ - if( X->n <= nblimbs ) - return( mbedtls_mpi_grow( X, nblimbs ) ); - - for( i = X->n - 1; i > 0; i-- ) - if( X->p[i] != 0 ) - break; - i++; - - if( i < nblimbs ) - i = nblimbs; - - if( ( p = mbedtls_calloc( i, ciL ) ) == NULL ) - return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); - - if( X->p != NULL ) - { - memcpy( p, X->p, i * ciL ); - mbedtls_zeroize( X->p, X->n * ciL ); - mbedtls_free( X->p ); - } - - X->n = i; - X->p = p; - - return( 0 ); -} - -/* - * Copy the contents of Y into X - */ -int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ) -{ - int ret; - size_t i; - - if( X == Y ) - return( 0 ); - - if( Y->p == NULL ) - { - mbedtls_mpi_free( X ); - return( 0 ); - } - - for( i = Y->n - 1; i > 0; i-- ) - if( Y->p[i] != 0 ) - break; - i++; - - X->s = Y->s; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i ) ); - - memset( X->p, 0, X->n * ciL ); - memcpy( X->p, Y->p, i * ciL ); - -cleanup: - - return( ret ); -} - -/* - * Swap the contents of X and Y - */ -void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ) -{ - mbedtls_mpi T; - - memcpy( &T, X, sizeof( mbedtls_mpi ) ); - memcpy( X, Y, sizeof( mbedtls_mpi ) ); - memcpy( Y, &T, sizeof( mbedtls_mpi ) ); -} - -/* - * Conditionally assign X = Y, without leaking information - * about whether the assignment was made or not. - * (Leaking information about the respective sizes of X and Y is ok however.) - */ -int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign ) -{ - int ret = 0; - size_t i; - - /* make sure assign is 0 or 1 in a time-constant manner */ - assign = (assign | (unsigned char)-assign) >> 7; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); - - X->s = X->s * ( 1 - assign ) + Y->s * assign; - - for( i = 0; i < Y->n; i++ ) - X->p[i] = X->p[i] * ( 1 - assign ) + Y->p[i] * assign; - - for( ; i < X->n; i++ ) - X->p[i] *= ( 1 - assign ); - -cleanup: - return( ret ); -} - -/* - * Conditionally swap X and Y, without leaking information - * about whether the swap was made or not. - * Here it is not ok to simply swap the pointers, which whould lead to - * different memory access patterns when X and Y are used afterwards. - */ -int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char swap ) -{ - int ret, s; - size_t i; - mbedtls_mpi_uint tmp; - - if( X == Y ) - return( 0 ); - - /* make sure swap is 0 or 1 in a time-constant manner */ - swap = (swap | (unsigned char)-swap) >> 7; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( Y, X->n ) ); - - s = X->s; - X->s = X->s * ( 1 - swap ) + Y->s * swap; - Y->s = Y->s * ( 1 - swap ) + s * swap; - - - for( i = 0; i < X->n; i++ ) - { - tmp = X->p[i]; - X->p[i] = X->p[i] * ( 1 - swap ) + Y->p[i] * swap; - Y->p[i] = Y->p[i] * ( 1 - swap ) + tmp * swap; - } - -cleanup: - return( ret ); -} - -/* - * Set value from integer - */ -int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, 1 ) ); - memset( X->p, 0, X->n * ciL ); - - X->p[0] = ( z < 0 ) ? -z : z; - X->s = ( z < 0 ) ? -1 : 1; - -cleanup: - - return( ret ); -} - -/* - * Get a specific bit - */ -int mbedtls_mpi_get_bit( const mbedtls_mpi *X, size_t pos ) -{ - if( X->n * biL <= pos ) - return( 0 ); - - return( ( X->p[pos / biL] >> ( pos % biL ) ) & 0x01 ); -} - -/* - * Set a bit to a specific value of 0 or 1 - */ -int mbedtls_mpi_set_bit( mbedtls_mpi *X, size_t pos, unsigned char val ) -{ - int ret = 0; - size_t off = pos / biL; - size_t idx = pos % biL; - - if( val != 0 && val != 1 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - if( X->n * biL <= pos ) - { - if( val == 0 ) - return( 0 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, off + 1 ) ); - } - - X->p[off] &= ~( (mbedtls_mpi_uint) 0x01 << idx ); - X->p[off] |= (mbedtls_mpi_uint) val << idx; - -cleanup: - - return( ret ); -} - -/* - * Return the number of less significant zero-bits - */ -size_t mbedtls_mpi_lsb( const mbedtls_mpi *X ) -{ - size_t i, j, count = 0; - - for( i = 0; i < X->n; i++ ) - for( j = 0; j < biL; j++, count++ ) - if( ( ( X->p[i] >> j ) & 1 ) != 0 ) - return( count ); - - return( 0 ); -} - -/* - * Count leading zero bits in a given integer - */ -static size_t mbedtls_clz( const mbedtls_mpi_uint x ) -{ - size_t j; - mbedtls_mpi_uint mask = (mbedtls_mpi_uint) 1 << (biL - 1); - - for( j = 0; j < biL; j++ ) - { - if( x & mask ) break; - - mask >>= 1; - } - - return j; -} - -/* - * Return the number of bits - */ -size_t mbedtls_mpi_bitlen( const mbedtls_mpi *X ) -{ - size_t i, j; - - if( X->n == 0 ) - return( 0 ); - - for( i = X->n - 1; i > 0; i-- ) - if( X->p[i] != 0 ) - break; - - j = biL - mbedtls_clz( X->p[i] ); - - return( ( i * biL ) + j ); -} - -/* - * Return the total size in bytes - */ -size_t mbedtls_mpi_size( const mbedtls_mpi *X ) -{ - return( ( mbedtls_mpi_bitlen( X ) + 7 ) >> 3 ); -} - -/* - * Convert an ASCII character to digit value - */ -static int mpi_get_digit( mbedtls_mpi_uint *d, int radix, char c ) -{ - *d = 255; - - if( c >= 0x30 && c <= 0x39 ) *d = c - 0x30; - if( c >= 0x41 && c <= 0x46 ) *d = c - 0x37; - if( c >= 0x61 && c <= 0x66 ) *d = c - 0x57; - - if( *d >= (mbedtls_mpi_uint) radix ) - return( MBEDTLS_ERR_MPI_INVALID_CHARACTER ); - - return( 0 ); -} - -/* - * Import from an ASCII string - */ -int mbedtls_mpi_read_string( mbedtls_mpi *X, int radix, const char *s ) -{ - int ret; - size_t i, j, slen, n; - mbedtls_mpi_uint d; - mbedtls_mpi T; - - if( radix < 2 || radix > 16 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &T ); - - slen = strlen( s ); - - if( radix == 16 ) - { - if( slen > MPI_SIZE_T_MAX >> 2 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - n = BITS_TO_LIMBS( slen << 2 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, n ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); - - for( i = slen, j = 0; i > 0; i--, j++ ) - { - if( i == 1 && s[i - 1] == '-' ) - { - X->s = -1; - break; - } - - MBEDTLS_MPI_CHK( mpi_get_digit( &d, radix, s[i - 1] ) ); - X->p[j / ( 2 * ciL )] |= d << ( ( j % ( 2 * ciL ) ) << 2 ); - } - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); - - for( i = 0; i < slen; i++ ) - { - if( i == 0 && s[i] == '-' ) - { - X->s = -1; - continue; - } - - MBEDTLS_MPI_CHK( mpi_get_digit( &d, radix, s[i] ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &T, X, radix ) ); - - if( X->s == 1 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( X, &T, d ) ); - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( X, &T, d ) ); - } - } - } - -cleanup: - - mbedtls_mpi_free( &T ); - - return( ret ); -} - -/* - * Helper to write the digits high-order first - */ -static int mpi_write_hlp( mbedtls_mpi *X, int radix, char **p ) -{ - int ret; - mbedtls_mpi_uint r; - - if( radix < 2 || radix > 16 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_int( &r, X, radix ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_div_int( X, NULL, X, radix ) ); - - if( mbedtls_mpi_cmp_int( X, 0 ) != 0 ) - MBEDTLS_MPI_CHK( mpi_write_hlp( X, radix, p ) ); - - if( r < 10 ) - *(*p)++ = (char)( r + 0x30 ); - else - *(*p)++ = (char)( r + 0x37 ); - -cleanup: - - return( ret ); -} - -/* - * Export into an ASCII string - */ -int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix, - char *buf, size_t buflen, size_t *olen ) -{ - int ret = 0; - size_t n; - char *p; - mbedtls_mpi T; - - if( radix < 2 || radix > 16 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - n = mbedtls_mpi_bitlen( X ); - if( radix >= 4 ) n >>= 1; - if( radix >= 16 ) n >>= 1; - n += 3; - - if( buflen < n ) - { - *olen = n; - return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL ); - } - - p = buf; - mbedtls_mpi_init( &T ); - - if( X->s == -1 ) - *p++ = '-'; - - if( radix == 16 ) - { - int c; - size_t i, j, k; - - for( i = X->n, k = 0; i > 0; i-- ) - { - for( j = ciL; j > 0; j-- ) - { - c = ( X->p[i - 1] >> ( ( j - 1 ) << 3) ) & 0xFF; - - if( c == 0 && k == 0 && ( i + j ) != 2 ) - continue; - - *(p++) = "0123456789ABCDEF" [c / 16]; - *(p++) = "0123456789ABCDEF" [c % 16]; - k = 1; - } - } - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &T, X ) ); - - if( T.s == -1 ) - T.s = 1; - - MBEDTLS_MPI_CHK( mpi_write_hlp( &T, radix, &p ) ); - } - - *p++ = '\0'; - *olen = p - buf; - -cleanup: - - mbedtls_mpi_free( &T ); - - return( ret ); -} - -#if defined(MBEDTLS_FS_IO) -/* - * Read X from an opened file - */ -int mbedtls_mpi_read_file( mbedtls_mpi *X, int radix, FILE *fin ) -{ - mbedtls_mpi_uint d; - size_t slen; - char *p; - /* - * Buffer should have space for (short) label and decimal formatted MPI, - * newline characters and '\0' - */ - char s[ MBEDTLS_MPI_RW_BUFFER_SIZE ]; - - memset( s, 0, sizeof( s ) ); - if( fgets( s, sizeof( s ) - 1, fin ) == NULL ) - return( MBEDTLS_ERR_MPI_FILE_IO_ERROR ); - - slen = strlen( s ); - if( slen == sizeof( s ) - 2 ) - return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL ); - - if( s[slen - 1] == '\n' ) { slen--; s[slen] = '\0'; } - if( s[slen - 1] == '\r' ) { slen--; s[slen] = '\0'; } - - p = s + slen; - while( --p >= s ) - if( mpi_get_digit( &d, radix, *p ) != 0 ) - break; - - return( mbedtls_mpi_read_string( X, radix, p + 1 ) ); -} - -/* - * Write X into an opened file (or stdout if fout == NULL) - */ -int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X, int radix, FILE *fout ) -{ - int ret; - size_t n, slen, plen; - /* - * Buffer should have space for (short) label and decimal formatted MPI, - * newline characters and '\0' - */ - char s[ MBEDTLS_MPI_RW_BUFFER_SIZE ]; - - memset( s, 0, sizeof( s ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_write_string( X, radix, s, sizeof( s ) - 2, &n ) ); - - if( p == NULL ) p = ""; - - plen = strlen( p ); - slen = strlen( s ); - s[slen++] = '\r'; - s[slen++] = '\n'; - - if( fout != NULL ) - { - if( fwrite( p, 1, plen, fout ) != plen || - fwrite( s, 1, slen, fout ) != slen ) - return( MBEDTLS_ERR_MPI_FILE_IO_ERROR ); - } - else - mbedtls_printf( "%s%s", p, s ); - -cleanup: - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ - -/* - * Import X from unsigned binary data, big endian - */ -int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen ) -{ - int ret; - size_t i, j, n; - - for( n = 0; n < buflen; n++ ) - if( buf[n] != 0 ) - break; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, CHARS_TO_LIMBS( buflen - n ) ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); - - for( i = buflen, j = 0; i > n; i--, j++ ) - X->p[j / ciL] |= ((mbedtls_mpi_uint) buf[i - 1]) << ((j % ciL) << 3); - -cleanup: - - return( ret ); -} - -/* - * Export X into unsigned binary data, big endian - */ -int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf, size_t buflen ) -{ - size_t i, j, n; - - n = mbedtls_mpi_size( X ); - - if( buflen < n ) - return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL ); - - memset( buf, 0, buflen ); - - for( i = buflen - 1, j = 0; n > 0; i--, j++, n-- ) - buf[i] = (unsigned char)( X->p[j / ciL] >> ((j % ciL) << 3) ); - - return( 0 ); -} - -/* - * Left-shift: X <<= count - */ -int mbedtls_mpi_shift_l( mbedtls_mpi *X, size_t count ) -{ - int ret; - size_t i, v0, t1; - mbedtls_mpi_uint r0 = 0, r1; - - v0 = count / (biL ); - t1 = count & (biL - 1); - - i = mbedtls_mpi_bitlen( X ) + count; - - if( X->n * biL < i ) - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, BITS_TO_LIMBS( i ) ) ); - - ret = 0; - - /* - * shift by count / limb_size - */ - if( v0 > 0 ) - { - for( i = X->n; i > v0; i-- ) - X->p[i - 1] = X->p[i - v0 - 1]; - - for( ; i > 0; i-- ) - X->p[i - 1] = 0; - } - - /* - * shift by count % limb_size - */ - if( t1 > 0 ) - { - for( i = v0; i < X->n; i++ ) - { - r1 = X->p[i] >> (biL - t1); - X->p[i] <<= t1; - X->p[i] |= r0; - r0 = r1; - } - } - -cleanup: - - return( ret ); -} - -/* - * Right-shift: X >>= count - */ -int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count ) -{ - size_t i, v0, v1; - mbedtls_mpi_uint r0 = 0, r1; - - v0 = count / biL; - v1 = count & (biL - 1); - - if( v0 > X->n || ( v0 == X->n && v1 > 0 ) ) - return mbedtls_mpi_lset( X, 0 ); - - /* - * shift by count / limb_size - */ - if( v0 > 0 ) - { - for( i = 0; i < X->n - v0; i++ ) - X->p[i] = X->p[i + v0]; - - for( ; i < X->n; i++ ) - X->p[i] = 0; - } - - /* - * shift by count % limb_size - */ - if( v1 > 0 ) - { - for( i = X->n; i > 0; i-- ) - { - r1 = X->p[i - 1] << (biL - v1); - X->p[i - 1] >>= v1; - X->p[i - 1] |= r0; - r0 = r1; - } - } - - return( 0 ); -} - -/* - * Compare unsigned values - */ -int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y ) -{ - size_t i, j; - - for( i = X->n; i > 0; i-- ) - if( X->p[i - 1] != 0 ) - break; - - for( j = Y->n; j > 0; j-- ) - if( Y->p[j - 1] != 0 ) - break; - - if( i == 0 && j == 0 ) - return( 0 ); - - if( i > j ) return( 1 ); - if( j > i ) return( -1 ); - - for( ; i > 0; i-- ) - { - if( X->p[i - 1] > Y->p[i - 1] ) return( 1 ); - if( X->p[i - 1] < Y->p[i - 1] ) return( -1 ); - } - - return( 0 ); -} - -/* - * Compare signed values - */ -int mbedtls_mpi_cmp_mpi( const mbedtls_mpi *X, const mbedtls_mpi *Y ) -{ - size_t i, j; - - for( i = X->n; i > 0; i-- ) - if( X->p[i - 1] != 0 ) - break; - - for( j = Y->n; j > 0; j-- ) - if( Y->p[j - 1] != 0 ) - break; - - if( i == 0 && j == 0 ) - return( 0 ); - - if( i > j ) return( X->s ); - if( j > i ) return( -Y->s ); - - if( X->s > 0 && Y->s < 0 ) return( 1 ); - if( Y->s > 0 && X->s < 0 ) return( -1 ); - - for( ; i > 0; i-- ) - { - if( X->p[i - 1] > Y->p[i - 1] ) return( X->s ); - if( X->p[i - 1] < Y->p[i - 1] ) return( -X->s ); - } - - return( 0 ); -} - -/* - * Compare signed values - */ -int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z ) -{ - mbedtls_mpi Y; - mbedtls_mpi_uint p[1]; - - *p = ( z < 0 ) ? -z : z; - Y.s = ( z < 0 ) ? -1 : 1; - Y.n = 1; - Y.p = p; - - return( mbedtls_mpi_cmp_mpi( X, &Y ) ); -} - -/* - * Unsigned addition: X = |A| + |B| (HAC 14.7) - */ -int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret; - size_t i, j; - mbedtls_mpi_uint *o, *p, c; - - if( X == B ) - { - const mbedtls_mpi *T = A; A = X; B = T; - } - - if( X != A ) - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( X, A ) ); - - /* - * X should always be positive as a result of unsigned additions. - */ - X->s = 1; - - for( j = B->n; j > 0; j-- ) - if( B->p[j - 1] != 0 ) - break; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, j ) ); - - o = B->p; p = X->p; c = 0; - - for( i = 0; i < j; i++, o++, p++ ) - { - *p += c; c = ( *p < c ); - *p += *o; c += ( *p < *o ); - } - - while( c != 0 ) - { - if( i >= X->n ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i + 1 ) ); - p = X->p + i; - } - - *p += c; c = ( *p < c ); i++; p++; - } - -cleanup: - - return( ret ); -} - -/* - * Helper for mbedtls_mpi subtraction - */ -static void mpi_sub_hlp( size_t n, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d ) -{ - size_t i; - mbedtls_mpi_uint c, z; - - for( i = c = 0; i < n; i++, s++, d++ ) - { - z = ( *d < c ); *d -= c; - c = ( *d < *s ) + z; *d -= *s; - } - - while( c != 0 ) - { - z = ( *d < c ); *d -= c; - c = z; i++; d++; - } -} - -/* - * Unsigned subtraction: X = |A| - |B| (HAC 14.9) - */ -int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - mbedtls_mpi TB; - int ret; - size_t n; - - if( mbedtls_mpi_cmp_abs( A, B ) < 0 ) - return( MBEDTLS_ERR_MPI_NEGATIVE_VALUE ); - - mbedtls_mpi_init( &TB ); - - if( X == B ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TB, B ) ); - B = &TB; - } - - if( X != A ) - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( X, A ) ); - - /* - * X should always be positive as a result of unsigned subtractions. - */ - X->s = 1; - - ret = 0; - - for( n = B->n; n > 0; n-- ) - if( B->p[n - 1] != 0 ) - break; - - mpi_sub_hlp( n, B->p, X->p ); - -cleanup: - - mbedtls_mpi_free( &TB ); - - return( ret ); -} - -/* - * Signed addition: X = A + B - */ -int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret, s = A->s; - - if( A->s * B->s < 0 ) - { - if( mbedtls_mpi_cmp_abs( A, B ) >= 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( X, A, B ) ); - X->s = s; - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( X, B, A ) ); - X->s = -s; - } - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( X, A, B ) ); - X->s = s; - } - -cleanup: - - return( ret ); -} - -/* - * Signed subtraction: X = A - B - */ -int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret, s = A->s; - - if( A->s * B->s > 0 ) - { - if( mbedtls_mpi_cmp_abs( A, B ) >= 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( X, A, B ) ); - X->s = s; - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( X, B, A ) ); - X->s = -s; - } - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( X, A, B ) ); - X->s = s; - } - -cleanup: - - return( ret ); -} - -/* - * Signed addition: X = A + b - */ -int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b ) -{ - mbedtls_mpi _B; - mbedtls_mpi_uint p[1]; - - p[0] = ( b < 0 ) ? -b : b; - _B.s = ( b < 0 ) ? -1 : 1; - _B.n = 1; - _B.p = p; - - return( mbedtls_mpi_add_mpi( X, A, &_B ) ); -} - -/* - * Signed subtraction: X = A - b - */ -int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b ) -{ - mbedtls_mpi _B; - mbedtls_mpi_uint p[1]; - - p[0] = ( b < 0 ) ? -b : b; - _B.s = ( b < 0 ) ? -1 : 1; - _B.n = 1; - _B.p = p; - - return( mbedtls_mpi_sub_mpi( X, A, &_B ) ); -} - -/* - * Helper for mbedtls_mpi multiplication - */ -static -#if defined(__APPLE__) && defined(__arm__) -/* - * Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn) - * appears to need this to prevent bad ARM code generation at -O3. - */ -__attribute__ ((noinline)) -#endif -void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b ) -{ - mbedtls_mpi_uint c = 0, t = 0; - -#if defined(MULADDC_HUIT) - for( ; i >= 8; i -= 8 ) - { - MULADDC_INIT - MULADDC_HUIT - MULADDC_STOP - } - - for( ; i > 0; i-- ) - { - MULADDC_INIT - MULADDC_CORE - MULADDC_STOP - } -#else /* MULADDC_HUIT */ - for( ; i >= 16; i -= 16 ) - { - MULADDC_INIT - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - MULADDC_STOP - } - - for( ; i >= 8; i -= 8 ) - { - MULADDC_INIT - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - - MULADDC_CORE MULADDC_CORE - MULADDC_CORE MULADDC_CORE - MULADDC_STOP - } - - for( ; i > 0; i-- ) - { - MULADDC_INIT - MULADDC_CORE - MULADDC_STOP - } -#endif /* MULADDC_HUIT */ - - t++; - - do { - *d += c; c = ( *d < c ); d++; - } - while( c != 0 ); -} - -/* - * Baseline multiplication: X = A * B (HAC 14.12) - */ -int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret; - size_t i, j; - mbedtls_mpi TA, TB; - - mbedtls_mpi_init( &TA ); mbedtls_mpi_init( &TB ); - - if( X == A ) { MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TA, A ) ); A = &TA; } - if( X == B ) { MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TB, B ) ); B = &TB; } - - for( i = A->n; i > 0; i-- ) - if( A->p[i - 1] != 0 ) - break; - - for( j = B->n; j > 0; j-- ) - if( B->p[j - 1] != 0 ) - break; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i + j ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); - - for( i++; j > 0; j-- ) - mpi_mul_hlp( i - 1, A->p, X->p + j - 1, B->p[j - 1] ); - - X->s = A->s * B->s; - -cleanup: - - mbedtls_mpi_free( &TB ); mbedtls_mpi_free( &TA ); - - return( ret ); -} - -/* - * Baseline multiplication: X = A * b - */ -int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b ) -{ - mbedtls_mpi _B; - mbedtls_mpi_uint p[1]; - - _B.s = 1; - _B.n = 1; - _B.p = p; - p[0] = b; - - return( mbedtls_mpi_mul_mpi( X, A, &_B ) ); -} - -/* - * Unsigned integer divide - double mbedtls_mpi_uint dividend, u1/u0, and - * mbedtls_mpi_uint divisor, d - */ -static mbedtls_mpi_uint mbedtls_int_div_int( mbedtls_mpi_uint u1, - mbedtls_mpi_uint u0, mbedtls_mpi_uint d, mbedtls_mpi_uint *r ) -{ -#if defined(MBEDTLS_HAVE_UDBL) - mbedtls_t_udbl dividend, quotient; -#else - const mbedtls_mpi_uint radix = (mbedtls_mpi_uint) 1 << biH; - const mbedtls_mpi_uint uint_halfword_mask = ( (mbedtls_mpi_uint) 1 << biH ) - 1; - mbedtls_mpi_uint d0, d1, q0, q1, rAX, r0, quotient; - mbedtls_mpi_uint u0_msw, u0_lsw; - size_t s; -#endif - - /* - * Check for overflow - */ - if( 0 == d || u1 >= d ) - { - if (r != NULL) *r = ~0; - - return ( ~0 ); - } - -#if defined(MBEDTLS_HAVE_UDBL) - dividend = (mbedtls_t_udbl) u1 << biL; - dividend |= (mbedtls_t_udbl) u0; - quotient = dividend / d; - if( quotient > ( (mbedtls_t_udbl) 1 << biL ) - 1 ) - quotient = ( (mbedtls_t_udbl) 1 << biL ) - 1; - - if( r != NULL ) - *r = (mbedtls_mpi_uint)( dividend - (quotient * d ) ); - - return (mbedtls_mpi_uint) quotient; -#else - - /* - * Algorithm D, Section 4.3.1 - The Art of Computer Programming - * Vol. 2 - Seminumerical Algorithms, Knuth - */ - - /* - * Normalize the divisor, d, and dividend, u0, u1 - */ - s = mbedtls_clz( d ); - d = d << s; - - u1 = u1 << s; - u1 |= ( u0 >> ( biL - s ) ) & ( -(mbedtls_mpi_sint)s >> ( biL - 1 ) ); - u0 = u0 << s; - - d1 = d >> biH; - d0 = d & uint_halfword_mask; - - u0_msw = u0 >> biH; - u0_lsw = u0 & uint_halfword_mask; - - /* - * Find the first quotient and remainder - */ - q1 = u1 / d1; - r0 = u1 - d1 * q1; - - while( q1 >= radix || ( q1 * d0 > radix * r0 + u0_msw ) ) - { - q1 -= 1; - r0 += d1; - - if ( r0 >= radix ) break; - } - - rAX = ( u1 * radix ) + ( u0_msw - q1 * d ); - q0 = rAX / d1; - r0 = rAX - q0 * d1; - - while( q0 >= radix || ( q0 * d0 > radix * r0 + u0_lsw ) ) - { - q0 -= 1; - r0 += d1; - - if ( r0 >= radix ) break; - } - - if (r != NULL) - *r = ( rAX * radix + u0_lsw - q0 * d ) >> s; - - quotient = q1 * radix + q0; - - return quotient; -#endif -} - -/* - * Division by mbedtls_mpi: A = Q * B + R (HAC 14.20) - */ -int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret; - size_t i, n, t, k; - mbedtls_mpi X, Y, Z, T1, T2; - - if( mbedtls_mpi_cmp_int( B, 0 ) == 0 ) - return( MBEDTLS_ERR_MPI_DIVISION_BY_ZERO ); - - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); - mbedtls_mpi_init( &T1 ); mbedtls_mpi_init( &T2 ); - - if( mbedtls_mpi_cmp_abs( A, B ) < 0 ) - { - if( Q != NULL ) MBEDTLS_MPI_CHK( mbedtls_mpi_lset( Q, 0 ) ); - if( R != NULL ) MBEDTLS_MPI_CHK( mbedtls_mpi_copy( R, A ) ); - return( 0 ); - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &X, A ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &Y, B ) ); - X.s = Y.s = 1; - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &Z, A->n + 2 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &Z, 0 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &T1, 2 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &T2, 3 ) ); - - k = mbedtls_mpi_bitlen( &Y ) % biL; - if( k < biL - 1 ) - { - k = biL - 1 - k; - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &X, k ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &Y, k ) ); - } - else k = 0; - - n = X.n - 1; - t = Y.n - 1; - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &Y, biL * ( n - t ) ) ); - - while( mbedtls_mpi_cmp_mpi( &X, &Y ) >= 0 ) - { - Z.p[n - t]++; - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &X, &X, &Y ) ); - } - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &Y, biL * ( n - t ) ) ); - - for( i = n; i > t ; i-- ) - { - if( X.p[i] >= Y.p[t] ) - Z.p[i - t - 1] = ~0; - else - { - Z.p[i - t - 1] = mbedtls_int_div_int( X.p[i], X.p[i - 1], - Y.p[t], NULL); - } - - Z.p[i - t - 1]++; - do - { - Z.p[i - t - 1]--; - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &T1, 0 ) ); - T1.p[0] = ( t < 1 ) ? 0 : Y.p[t - 1]; - T1.p[1] = Y.p[t]; - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &T1, &T1, Z.p[i - t - 1] ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &T2, 0 ) ); - T2.p[0] = ( i < 2 ) ? 0 : X.p[i - 2]; - T2.p[1] = ( i < 1 ) ? 0 : X.p[i - 1]; - T2.p[2] = X.p[i]; - } - while( mbedtls_mpi_cmp_mpi( &T1, &T2 ) > 0 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &T1, &Y, Z.p[i - t - 1] ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &T1, biL * ( i - t - 1 ) ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &X, &X, &T1 ) ); - - if( mbedtls_mpi_cmp_int( &X, 0 ) < 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &T1, &Y ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &T1, biL * ( i - t - 1 ) ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &X, &X, &T1 ) ); - Z.p[i - t - 1]--; - } - } - - if( Q != NULL ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( Q, &Z ) ); - Q->s = A->s * B->s; - } - - if( R != NULL ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &X, k ) ); - X.s = A->s; - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( R, &X ) ); - - if( mbedtls_mpi_cmp_int( R, 0 ) == 0 ) - R->s = 1; - } - -cleanup: - - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); - mbedtls_mpi_free( &T1 ); mbedtls_mpi_free( &T2 ); - - return( ret ); -} - -/* - * Division by int: A = Q * b + R - */ -int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, mbedtls_mpi_sint b ) -{ - mbedtls_mpi _B; - mbedtls_mpi_uint p[1]; - - p[0] = ( b < 0 ) ? -b : b; - _B.s = ( b < 0 ) ? -1 : 1; - _B.n = 1; - _B.p = p; - - return( mbedtls_mpi_div_mpi( Q, R, A, &_B ) ); -} - -/* - * Modulo: R = A mod B - */ -int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret; - - if( mbedtls_mpi_cmp_int( B, 0 ) < 0 ) - return( MBEDTLS_ERR_MPI_NEGATIVE_VALUE ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( NULL, R, A, B ) ); - - while( mbedtls_mpi_cmp_int( R, 0 ) < 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( R, R, B ) ); - - while( mbedtls_mpi_cmp_mpi( R, B ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( R, R, B ) ); - -cleanup: - - return( ret ); -} - -/* - * Modulo: r = A mod b - */ -int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b ) -{ - size_t i; - mbedtls_mpi_uint x, y, z; - - if( b == 0 ) - return( MBEDTLS_ERR_MPI_DIVISION_BY_ZERO ); - - if( b < 0 ) - return( MBEDTLS_ERR_MPI_NEGATIVE_VALUE ); - - /* - * handle trivial cases - */ - if( b == 1 ) - { - *r = 0; - return( 0 ); - } - - if( b == 2 ) - { - *r = A->p[0] & 1; - return( 0 ); - } - - /* - * general case - */ - for( i = A->n, y = 0; i > 0; i-- ) - { - x = A->p[i - 1]; - y = ( y << biH ) | ( x >> biH ); - z = y / b; - y -= z * b; - - x <<= biH; - y = ( y << biH ) | ( x >> biH ); - z = y / b; - y -= z * b; - } - - /* - * If A is negative, then the current y represents a negative value. - * Flipping it to the positive side. - */ - if( A->s < 0 && y != 0 ) - y = b - y; - - *r = y; - - return( 0 ); -} - -/* - * Fast Montgomery initialization (thanks to Tom St Denis) - */ -static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N ) -{ - mbedtls_mpi_uint x, m0 = N->p[0]; - unsigned int i; - - x = m0; - x += ( ( m0 + 2 ) & 4 ) << 1; - - for( i = biL; i >= 8; i /= 2 ) - x *= ( 2 - ( m0 * x ) ); - - *mm = ~x + 1; -} - -/* - * Montgomery multiplication: A = A * B * R^-1 mod N (HAC 14.36) - */ -static void mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_uint mm, - const mbedtls_mpi *T ) -{ - size_t i, n, m; - mbedtls_mpi_uint u0, u1, *d; - - memset( T->p, 0, T->n * ciL ); - - d = T->p; - n = N->n; - m = ( B->n < n ) ? B->n : n; - - for( i = 0; i < n; i++ ) - { - /* - * T = (T + u0*B + u1*N) / 2^biL - */ - u0 = A->p[i]; - u1 = ( d[0] + u0 * B->p[0] ) * mm; - - mpi_mul_hlp( m, B->p, d, u0 ); - mpi_mul_hlp( n, N->p, d, u1 ); - - *d++ = u0; d[n + 1] = 0; - } - - memcpy( A->p, d, ( n + 1 ) * ciL ); - - if( mbedtls_mpi_cmp_abs( A, N ) >= 0 ) - mpi_sub_hlp( n, N->p, A->p ); - else - /* prevent timing attacks */ - mpi_sub_hlp( n, A->p, T->p ); -} - -/* - * Montgomery reduction: A = A * R^-1 mod N - */ -static void mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint mm, const mbedtls_mpi *T ) -{ - mbedtls_mpi_uint z = 1; - mbedtls_mpi U; - - U.n = U.s = (int) z; - U.p = &z; - - mpi_montmul( A, &U, N, mm, T ); -} - -/* - * Sliding-window exponentiation: X = A^E mod N (HAC 14.85) - */ -int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR ) -{ - int ret; - size_t wbits, wsize, one = 1; - size_t i, j, nblimbs; - size_t bufsize, nbits; - mbedtls_mpi_uint ei, mm, state; - mbedtls_mpi RR, T, W[ 2 << MBEDTLS_MPI_WINDOW_SIZE ], Apos; - int neg; - - if( mbedtls_mpi_cmp_int( N, 0 ) < 0 || ( N->p[0] & 1 ) == 0 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - if( mbedtls_mpi_cmp_int( E, 0 ) < 0 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - /* - * Init temps and window size - */ - mpi_montg_init( &mm, N ); - mbedtls_mpi_init( &RR ); mbedtls_mpi_init( &T ); - mbedtls_mpi_init( &Apos ); - memset( W, 0, sizeof( W ) ); - - i = mbedtls_mpi_bitlen( E ); - - wsize = ( i > 671 ) ? 6 : ( i > 239 ) ? 5 : - ( i > 79 ) ? 4 : ( i > 23 ) ? 3 : 1; - - if( wsize > MBEDTLS_MPI_WINDOW_SIZE ) - wsize = MBEDTLS_MPI_WINDOW_SIZE; - - j = N->n + 1; - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, j ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], j ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &T, j * 2 ) ); - - /* - * Compensate for negative A (and correct at the end) - */ - neg = ( A->s == -1 ); - if( neg ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &Apos, A ) ); - Apos.s = 1; - A = &Apos; - } - - /* - * If 1st call, pre-compute R^2 mod N - */ - if( _RR == NULL || _RR->p == NULL ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &RR, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &RR, N->n * 2 * biL ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &RR, &RR, N ) ); - - if( _RR != NULL ) - memcpy( _RR, &RR, sizeof( mbedtls_mpi ) ); - } - else - memcpy( &RR, _RR, sizeof( mbedtls_mpi ) ); - - /* - * W[1] = A * R^2 * R^-1 mod N = A * R mod N - */ - if( mbedtls_mpi_cmp_mpi( A, N ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &W[1], A, N ) ); - else - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[1], A ) ); - - mpi_montmul( &W[1], &RR, N, mm, &T ); - - /* - * X = R^2 * R^-1 mod N = R mod N - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( X, &RR ) ); - mpi_montred( X, N, mm, &T ); - - if( wsize > 1 ) - { - /* - * W[1 << (wsize - 1)] = W[1] ^ (wsize - 1) - */ - j = one << ( wsize - 1 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[j], N->n + 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[j], &W[1] ) ); - - for( i = 0; i < wsize - 1; i++ ) - mpi_montmul( &W[j], &W[j], N, mm, &T ); - - /* - * W[i] = W[i - 1] * W[1] - */ - for( i = j + 1; i < ( one << wsize ); i++ ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[i], N->n + 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[i], &W[i - 1] ) ); - - mpi_montmul( &W[i], &W[1], N, mm, &T ); - } - } - - nblimbs = E->n; - bufsize = 0; - nbits = 0; - wbits = 0; - state = 0; - - while( 1 ) - { - if( bufsize == 0 ) - { - if( nblimbs == 0 ) - break; - - nblimbs--; - - bufsize = sizeof( mbedtls_mpi_uint ) << 3; - } - - bufsize--; - - ei = (E->p[nblimbs] >> bufsize) & 1; - - /* - * skip leading 0s - */ - if( ei == 0 && state == 0 ) - continue; - - if( ei == 0 && state == 1 ) - { - /* - * out of window, square X - */ - mpi_montmul( X, X, N, mm, &T ); - continue; - } - - /* - * add ei to current window - */ - state = 2; - - nbits++; - wbits |= ( ei << ( wsize - nbits ) ); - - if( nbits == wsize ) - { - /* - * X = X^wsize R^-1 mod N - */ - for( i = 0; i < wsize; i++ ) - mpi_montmul( X, X, N, mm, &T ); - - /* - * X = X * W[wbits] R^-1 mod N - */ - mpi_montmul( X, &W[wbits], N, mm, &T ); - - state--; - nbits = 0; - wbits = 0; - } - } - - /* - * process the remaining bits - */ - for( i = 0; i < nbits; i++ ) - { - mpi_montmul( X, X, N, mm, &T ); - - wbits <<= 1; - - if( ( wbits & ( one << wsize ) ) != 0 ) - mpi_montmul( X, &W[1], N, mm, &T ); - } - - /* - * X = A^E * R * R^-1 mod N = A^E mod N - */ - mpi_montred( X, N, mm, &T ); - - if( neg ) - { - X->s = -1; - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( X, N, X ) ); - } - -cleanup: - - for( i = ( one << ( wsize - 1 ) ); i < ( one << wsize ); i++ ) - mbedtls_mpi_free( &W[i] ); - - mbedtls_mpi_free( &W[1] ); mbedtls_mpi_free( &T ); mbedtls_mpi_free( &Apos ); - - if( _RR == NULL || _RR->p == NULL ) - mbedtls_mpi_free( &RR ); - - return( ret ); -} - -/* - * Greatest common divisor: G = gcd(A, B) (HAC 14.54) - */ -int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B ) -{ - int ret; - size_t lz, lzt; - mbedtls_mpi TG, TA, TB; - - mbedtls_mpi_init( &TG ); mbedtls_mpi_init( &TA ); mbedtls_mpi_init( &TB ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TA, A ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TB, B ) ); - - lz = mbedtls_mpi_lsb( &TA ); - lzt = mbedtls_mpi_lsb( &TB ); - - if( lzt < lz ) - lz = lzt; - - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TA, lz ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TB, lz ) ); - - TA.s = TB.s = 1; - - while( mbedtls_mpi_cmp_int( &TA, 0 ) != 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TA, mbedtls_mpi_lsb( &TA ) ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TB, mbedtls_mpi_lsb( &TB ) ) ); - - if( mbedtls_mpi_cmp_mpi( &TA, &TB ) >= 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( &TA, &TA, &TB ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TA, 1 ) ); - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( &TB, &TB, &TA ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TB, 1 ) ); - } - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &TB, lz ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( G, &TB ) ); - -cleanup: - - mbedtls_mpi_free( &TG ); mbedtls_mpi_free( &TA ); mbedtls_mpi_free( &TB ); - - return( ret ); -} - -/* - * Fill X with size bytes of random. - * - * Use a temporary bytes representation to make sure the result is the same - * regardless of the platform endianness (useful when f_rng is actually - * deterministic, eg for tests). - */ -int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - - if( size > MBEDTLS_MPI_MAX_SIZE ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - MBEDTLS_MPI_CHK( f_rng( p_rng, buf, size ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( X, buf, size ) ); - -cleanup: - return( ret ); -} - -/* - * Modular inverse: X = A^-1 mod N (HAC 14.61 / 14.64) - */ -int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *N ) -{ - int ret; - mbedtls_mpi G, TA, TU, U1, U2, TB, TV, V1, V2; - - if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &TA ); mbedtls_mpi_init( &TU ); mbedtls_mpi_init( &U1 ); mbedtls_mpi_init( &U2 ); - mbedtls_mpi_init( &G ); mbedtls_mpi_init( &TB ); mbedtls_mpi_init( &TV ); - mbedtls_mpi_init( &V1 ); mbedtls_mpi_init( &V2 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &G, A, N ) ); - - if( mbedtls_mpi_cmp_int( &G, 1 ) != 0 ) - { - ret = MBEDTLS_ERR_MPI_NOT_ACCEPTABLE; - goto cleanup; - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &TA, A, N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TU, &TA ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TB, N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &TV, N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &U1, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &U2, 0 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &V1, 0 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &V2, 1 ) ); - - do - { - while( ( TU.p[0] & 1 ) == 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TU, 1 ) ); - - if( ( U1.p[0] & 1 ) != 0 || ( U2.p[0] & 1 ) != 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &U1, &U1, &TB ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &U2, &U2, &TA ) ); - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &U1, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &U2, 1 ) ); - } - - while( ( TV.p[0] & 1 ) == 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &TV, 1 ) ); - - if( ( V1.p[0] & 1 ) != 0 || ( V2.p[0] & 1 ) != 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &V1, &V1, &TB ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &V2, &V2, &TA ) ); - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &V1, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &V2, 1 ) ); - } - - if( mbedtls_mpi_cmp_mpi( &TU, &TV ) >= 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &TU, &TU, &TV ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &U1, &U1, &V1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &U2, &U2, &V2 ) ); - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &TV, &TV, &TU ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &V1, &V1, &U1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &V2, &V2, &U2 ) ); - } - } - while( mbedtls_mpi_cmp_int( &TU, 0 ) != 0 ); - - while( mbedtls_mpi_cmp_int( &V1, 0 ) < 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &V1, &V1, N ) ); - - while( mbedtls_mpi_cmp_mpi( &V1, N ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &V1, &V1, N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( X, &V1 ) ); - -cleanup: - - mbedtls_mpi_free( &TA ); mbedtls_mpi_free( &TU ); mbedtls_mpi_free( &U1 ); mbedtls_mpi_free( &U2 ); - mbedtls_mpi_free( &G ); mbedtls_mpi_free( &TB ); mbedtls_mpi_free( &TV ); - mbedtls_mpi_free( &V1 ); mbedtls_mpi_free( &V2 ); - - return( ret ); -} - -#if defined(MBEDTLS_GENPRIME) - -static const int small_prime[] = -{ - 3, 5, 7, 11, 13, 17, 19, 23, - 29, 31, 37, 41, 43, 47, 53, 59, - 61, 67, 71, 73, 79, 83, 89, 97, - 101, 103, 107, 109, 113, 127, 131, 137, - 139, 149, 151, 157, 163, 167, 173, 179, - 181, 191, 193, 197, 199, 211, 223, 227, - 229, 233, 239, 241, 251, 257, 263, 269, - 271, 277, 281, 283, 293, 307, 311, 313, - 317, 331, 337, 347, 349, 353, 359, 367, - 373, 379, 383, 389, 397, 401, 409, 419, - 421, 431, 433, 439, 443, 449, 457, 461, - 463, 467, 479, 487, 491, 499, 503, 509, - 521, 523, 541, 547, 557, 563, 569, 571, - 577, 587, 593, 599, 601, 607, 613, 617, - 619, 631, 641, 643, 647, 653, 659, 661, - 673, 677, 683, 691, 701, 709, 719, 727, - 733, 739, 743, 751, 757, 761, 769, 773, - 787, 797, 809, 811, 821, 823, 827, 829, - 839, 853, 857, 859, 863, 877, 881, 883, - 887, 907, 911, 919, 929, 937, 941, 947, - 953, 967, 971, 977, 983, 991, 997, -103 -}; - -/* - * Small divisors test (X must be positive) - * - * Return values: - * 0: no small factor (possible prime, more tests needed) - * 1: certain prime - * MBEDTLS_ERR_MPI_NOT_ACCEPTABLE: certain non-prime - * other negative: error - */ -static int mpi_check_small_factors( const mbedtls_mpi *X ) -{ - int ret = 0; - size_t i; - mbedtls_mpi_uint r; - - if( ( X->p[0] & 1 ) == 0 ) - return( MBEDTLS_ERR_MPI_NOT_ACCEPTABLE ); - - for( i = 0; small_prime[i] > 0; i++ ) - { - if( mbedtls_mpi_cmp_int( X, small_prime[i] ) <= 0 ) - return( 1 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_int( &r, X, small_prime[i] ) ); - - if( r == 0 ) - return( MBEDTLS_ERR_MPI_NOT_ACCEPTABLE ); - } - -cleanup: - return( ret ); -} - -/* - * Miller-Rabin pseudo-primality test (HAC 4.24) - */ -static int mpi_miller_rabin( const mbedtls_mpi *X, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret, count; - size_t i, j, k, n, s; - mbedtls_mpi W, R, T, A, RR; - - mbedtls_mpi_init( &W ); mbedtls_mpi_init( &R ); mbedtls_mpi_init( &T ); mbedtls_mpi_init( &A ); - mbedtls_mpi_init( &RR ); - - /* - * W = |X| - 1 - * R = W >> lsb( W ) - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &W, X, 1 ) ); - s = mbedtls_mpi_lsb( &W ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R, &W ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &R, s ) ); - - i = mbedtls_mpi_bitlen( X ); - /* - * HAC, table 4.4 - */ - n = ( ( i >= 1300 ) ? 2 : ( i >= 850 ) ? 3 : - ( i >= 650 ) ? 4 : ( i >= 350 ) ? 8 : - ( i >= 250 ) ? 12 : ( i >= 150 ) ? 18 : 27 ); - - for( i = 0; i < n; i++ ) - { - /* - * pick a random A, 1 < A < |X| - 1 - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) ); - - if( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 ) - { - j = mbedtls_mpi_bitlen( &A ) - mbedtls_mpi_bitlen( &W ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &A, j + 1 ) ); - } - A.p[0] |= 3; - - count = 0; - do { - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) ); - - j = mbedtls_mpi_bitlen( &A ); - k = mbedtls_mpi_bitlen( &W ); - if (j > k) { - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &A, j - k ) ); - } - - if (count++ > 30) { - return MBEDTLS_ERR_MPI_NOT_ACCEPTABLE; - } - - } while ( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 || - mbedtls_mpi_cmp_int( &A, 1 ) <= 0 ); - - /* - * A = A^R mod |X| - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &A, &A, &R, X, &RR ) ); - - if( mbedtls_mpi_cmp_mpi( &A, &W ) == 0 || - mbedtls_mpi_cmp_int( &A, 1 ) == 0 ) - continue; - - j = 1; - while( j < s && mbedtls_mpi_cmp_mpi( &A, &W ) != 0 ) - { - /* - * A = A * A mod |X| - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, &A, &A ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &A, &T, X ) ); - - if( mbedtls_mpi_cmp_int( &A, 1 ) == 0 ) - break; - - j++; - } - - /* - * not prime if A != |X| - 1 or A == 1 - */ - if( mbedtls_mpi_cmp_mpi( &A, &W ) != 0 || - mbedtls_mpi_cmp_int( &A, 1 ) == 0 ) - { - ret = MBEDTLS_ERR_MPI_NOT_ACCEPTABLE; - break; - } - } - -cleanup: - mbedtls_mpi_free( &W ); mbedtls_mpi_free( &R ); mbedtls_mpi_free( &T ); mbedtls_mpi_free( &A ); - mbedtls_mpi_free( &RR ); - - return( ret ); -} - -/* - * Pseudo-primality test: small factors, then Miller-Rabin - */ -int mbedtls_mpi_is_prime( const mbedtls_mpi *X, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_mpi XX; - - XX.s = 1; - XX.n = X->n; - XX.p = X->p; - - if( mbedtls_mpi_cmp_int( &XX, 0 ) == 0 || - mbedtls_mpi_cmp_int( &XX, 1 ) == 0 ) - return( MBEDTLS_ERR_MPI_NOT_ACCEPTABLE ); - - if( mbedtls_mpi_cmp_int( &XX, 2 ) == 0 ) - return( 0 ); - - if( ( ret = mpi_check_small_factors( &XX ) ) != 0 ) - { - if( ret == 1 ) - return( 0 ); - - return( ret ); - } - - return( mpi_miller_rabin( &XX, f_rng, p_rng ) ); -} - -/* - * Prime number generation - */ -int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - size_t k, n; - mbedtls_mpi_uint r; - mbedtls_mpi Y; - - if( nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS ) - return( MBEDTLS_ERR_MPI_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &Y ); - - n = BITS_TO_LIMBS( nbits ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( X, n * ciL, f_rng, p_rng ) ); - - k = mbedtls_mpi_bitlen( X ); - if( k > nbits ) MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( X, k - nbits + 1 ) ); - - mbedtls_mpi_set_bit( X, nbits-1, 1 ); - - X->p[0] |= 1; - - if( dh_flag == 0 ) - { - while( ( ret = mbedtls_mpi_is_prime( X, f_rng, p_rng ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_MPI_NOT_ACCEPTABLE ) - goto cleanup; - - MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( X, X, 2 ) ); - } - } - else - { - /* - * An necessary condition for Y and X = 2Y + 1 to be prime - * is X = 2 mod 3 (which is equivalent to Y = 2 mod 3). - * Make sure it is satisfied, while keeping X = 3 mod 4 - */ - - X->p[0] |= 2; - - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_int( &r, X, 3 ) ); - if( r == 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( X, X, 8 ) ); - else if( r == 1 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( X, X, 4 ) ); - - /* Set Y = (X-1) / 2, which is X / 2 because X is odd */ - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &Y, X ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &Y, 1 ) ); - - while( 1 ) - { - /* - * First, check small factors for X and Y - * before doing Miller-Rabin on any of them - */ - if( ( ret = mpi_check_small_factors( X ) ) == 0 && - ( ret = mpi_check_small_factors( &Y ) ) == 0 && - ( ret = mpi_miller_rabin( X, f_rng, p_rng ) ) == 0 && - ( ret = mpi_miller_rabin( &Y, f_rng, p_rng ) ) == 0 ) - { - break; - } - - if( ret != MBEDTLS_ERR_MPI_NOT_ACCEPTABLE ) - goto cleanup; - - /* - * Next candidates. We want to preserve Y = (X-1) / 2 and - * Y = 1 mod 2 and Y = 2 mod 3 (eq X = 3 mod 4 and X = 2 mod 3) - * so up Y by 6 and X by 12. - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( X, X, 12 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( &Y, &Y, 6 ) ); - } - } - -cleanup: - - mbedtls_mpi_free( &Y ); - - return( ret ); -} - -#endif /* MBEDTLS_GENPRIME */ - -#if defined(MBEDTLS_SELF_TEST) - -#define GCD_PAIR_COUNT 3 - -static const int gcd_pairs[GCD_PAIR_COUNT][3] = -{ - { 693, 609, 21 }, - { 1764, 868, 28 }, - { 768454923, 542167814, 1 } -}; - -/* - * Checkup routine - */ -int mbedtls_mpi_self_test( int verbose ) -{ - int ret, i; - mbedtls_mpi A, E, N, X, Y, U, V; - - mbedtls_mpi_init( &A ); mbedtls_mpi_init( &E ); mbedtls_mpi_init( &N ); mbedtls_mpi_init( &X ); - mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &U ); mbedtls_mpi_init( &V ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &A, 16, - "EFE021C2645FD1DC586E69184AF4A31E" \ - "D5F53E93B5F123FA41680867BA110131" \ - "944FE7952E2517337780CB0DB80E61AA" \ - "E7C8DDC6C5C6AADEB34EB38A2F40D5E6" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &E, 16, - "B2E7EFD37075B9F03FF989C7C5051C20" \ - "34D2A323810251127E7BF8625A4F49A5" \ - "F3E27F4DA8BD59C47D6DAABA4C8127BD" \ - "5B5C25763222FEFCCFC38B832366C29E" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &N, 16, - "0066A198186C18C10B2F5ED9B522752A" \ - "9830B69916E535C8F047518A889A43A5" \ - "94B6BED27A168D31D4A52F88925AA8F5" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &X, &A, &N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "602AB7ECA597A3D6B56FF9829A5E8B85" \ - "9E857EA95A03512E2BAE7391688D264A" \ - "A5663B0341DB9CCFD2C4C5F421FEC814" \ - "8001B72E848A38CAE1C65F78E56ABDEF" \ - "E12D3C039B8A02D6BE593F0BBBDA56F1" \ - "ECF677152EF804370C1A305CAF3B5BF1" \ - "30879B56C61DE584A0F53A2447A51E" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #1 (mul_mpi): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( &X, &Y, &A, &N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "256567336059E52CAE22925474705F39A94" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &V, 16, - "6613F26162223DF488E9CD48CC132C7A" \ - "0AC93C701B001B092E4E5B9F73BCD27B" \ - "9EE50D0657C77F374E903CDFA4C642" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #2 (div_mpi): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 || - mbedtls_mpi_cmp_mpi( &Y, &V ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &X, &A, &E, &N, NULL ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "36E139AEA55215609D2816998ED020BB" \ - "BD96C37890F65171D948E9BC7CBAA4D9" \ - "325D24D6A3C12710F10A09FA08AB87" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #3 (exp_mod): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &X, &A, &N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "003A0AAEDD7E784FC07D8F9EC6E3BFD5" \ - "C3DBA76456363A10869622EAC2DD84EC" \ - "C5B8A74DAC4D09E03B5E0BE779F2DF61" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #4 (inv_mod): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #5 (simple gcd): " ); - - for( i = 0; i < GCD_PAIR_COUNT; i++ ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &X, gcd_pairs[i][0] ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &Y, gcd_pairs[i][1] ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &A, &X, &Y ) ); - - if( mbedtls_mpi_cmp_int( &A, gcd_pairs[i][2] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed at %d\n", i ); - - ret = 1; - goto cleanup; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - - if( ret != 0 && verbose != 0 ) - mbedtls_printf( "Unexpected error, return code = %08X\n", ret ); - - mbedtls_mpi_free( &A ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &N ); mbedtls_mpi_free( &X ); - mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &U ); mbedtls_mpi_free( &V ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_BIGNUM_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/blowfish.c b/build/premake/premake5/contrib/mbedtls/library/blowfish.c deleted file mode 100644 index 89be4d122a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/blowfish.c +++ /dev/null @@ -1,656 +0,0 @@ -/* - * Blowfish implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The Blowfish block cipher was designed by Bruce Schneier in 1993. - * http://www.schneier.com/blowfish.html - * http://en.wikipedia.org/wiki/Blowfish_%28cipher%29 - * - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_BLOWFISH_C) - -#include "mbedtls/blowfish.h" - -#include - -#if !defined(MBEDTLS_BLOWFISH_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -static const uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2] = { - 0x243F6A88L, 0x85A308D3L, 0x13198A2EL, 0x03707344L, - 0xA4093822L, 0x299F31D0L, 0x082EFA98L, 0xEC4E6C89L, - 0x452821E6L, 0x38D01377L, 0xBE5466CFL, 0x34E90C6CL, - 0xC0AC29B7L, 0xC97C50DDL, 0x3F84D5B5L, 0xB5470917L, - 0x9216D5D9L, 0x8979FB1BL -}; - -/* declarations of data at the end of this file */ -static const uint32_t S[4][256]; - -static uint32_t F( mbedtls_blowfish_context *ctx, uint32_t x ) -{ - unsigned short a, b, c, d; - uint32_t y; - - d = (unsigned short)(x & 0xFF); - x >>= 8; - c = (unsigned short)(x & 0xFF); - x >>= 8; - b = (unsigned short)(x & 0xFF); - x >>= 8; - a = (unsigned short)(x & 0xFF); - y = ctx->S[0][a] + ctx->S[1][b]; - y = y ^ ctx->S[2][c]; - y = y + ctx->S[3][d]; - - return( y ); -} - -static void blowfish_enc( mbedtls_blowfish_context *ctx, uint32_t *xl, uint32_t *xr ) -{ - uint32_t Xl, Xr, temp; - short i; - - Xl = *xl; - Xr = *xr; - - for( i = 0; i < MBEDTLS_BLOWFISH_ROUNDS; ++i ) - { - Xl = Xl ^ ctx->P[i]; - Xr = F( ctx, Xl ) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx->P[MBEDTLS_BLOWFISH_ROUNDS]; - Xl = Xl ^ ctx->P[MBEDTLS_BLOWFISH_ROUNDS + 1]; - - *xl = Xl; - *xr = Xr; -} - -static void blowfish_dec( mbedtls_blowfish_context *ctx, uint32_t *xl, uint32_t *xr ) -{ - uint32_t Xl, Xr, temp; - short i; - - Xl = *xl; - Xr = *xr; - - for( i = MBEDTLS_BLOWFISH_ROUNDS + 1; i > 1; --i ) - { - Xl = Xl ^ ctx->P[i]; - Xr = F( ctx, Xl ) ^ Xr; - - temp = Xl; - Xl = Xr; - Xr = temp; - } - - temp = Xl; - Xl = Xr; - Xr = temp; - - Xr = Xr ^ ctx->P[1]; - Xl = Xl ^ ctx->P[0]; - - *xl = Xl; - *xr = Xr; -} - -void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_blowfish_context ) ); -} - -void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_blowfish_context ) ); -} - -/* - * Blowfish key schedule - */ -int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char *key, - unsigned int keybits ) -{ - unsigned int i, j, k; - uint32_t data, datal, datar; - - if( keybits < MBEDTLS_BLOWFISH_MIN_KEY_BITS || keybits > MBEDTLS_BLOWFISH_MAX_KEY_BITS || - ( keybits % 8 ) ) - { - return( MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH ); - } - - keybits >>= 3; - - for( i = 0; i < 4; i++ ) - { - for( j = 0; j < 256; j++ ) - ctx->S[i][j] = S[i][j]; - } - - j = 0; - for( i = 0; i < MBEDTLS_BLOWFISH_ROUNDS + 2; ++i ) - { - data = 0x00000000; - for( k = 0; k < 4; ++k ) - { - data = ( data << 8 ) | key[j++]; - if( j >= keybits ) - j = 0; - } - ctx->P[i] = P[i] ^ data; - } - - datal = 0x00000000; - datar = 0x00000000; - - for( i = 0; i < MBEDTLS_BLOWFISH_ROUNDS + 2; i += 2 ) - { - blowfish_enc( ctx, &datal, &datar ); - ctx->P[i] = datal; - ctx->P[i + 1] = datar; - } - - for( i = 0; i < 4; i++ ) - { - for( j = 0; j < 256; j += 2 ) - { - blowfish_enc( ctx, &datal, &datar ); - ctx->S[i][j] = datal; - ctx->S[i][j + 1] = datar; - } - } - return( 0 ); -} - -/* - * Blowfish-ECB block encryption/decryption - */ -int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx, - int mode, - const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE], - unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE] ) -{ - uint32_t X0, X1; - - GET_UINT32_BE( X0, input, 0 ); - GET_UINT32_BE( X1, input, 4 ); - - if( mode == MBEDTLS_BLOWFISH_DECRYPT ) - { - blowfish_dec( ctx, &X0, &X1 ); - } - else /* MBEDTLS_BLOWFISH_ENCRYPT */ - { - blowfish_enc( ctx, &X0, &X1 ); - } - - PUT_UINT32_BE( X0, output, 0 ); - PUT_UINT32_BE( X1, output, 4 ); - - return( 0 ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * Blowfish-CBC buffer encryption/decryption - */ -int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx, - int mode, - size_t length, - unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], - const unsigned char *input, - unsigned char *output ) -{ - int i; - unsigned char temp[MBEDTLS_BLOWFISH_BLOCKSIZE]; - - if( length % MBEDTLS_BLOWFISH_BLOCKSIZE ) - return( MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH ); - - if( mode == MBEDTLS_BLOWFISH_DECRYPT ) - { - while( length > 0 ) - { - memcpy( temp, input, MBEDTLS_BLOWFISH_BLOCKSIZE ); - mbedtls_blowfish_crypt_ecb( ctx, mode, input, output ); - - for( i = 0; i < MBEDTLS_BLOWFISH_BLOCKSIZE;i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); - - memcpy( iv, temp, MBEDTLS_BLOWFISH_BLOCKSIZE ); - - input += MBEDTLS_BLOWFISH_BLOCKSIZE; - output += MBEDTLS_BLOWFISH_BLOCKSIZE; - length -= MBEDTLS_BLOWFISH_BLOCKSIZE; - } - } - else - { - while( length > 0 ) - { - for( i = 0; i < MBEDTLS_BLOWFISH_BLOCKSIZE; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); - - mbedtls_blowfish_crypt_ecb( ctx, mode, output, output ); - memcpy( iv, output, MBEDTLS_BLOWFISH_BLOCKSIZE ); - - input += MBEDTLS_BLOWFISH_BLOCKSIZE; - output += MBEDTLS_BLOWFISH_BLOCKSIZE; - length -= MBEDTLS_BLOWFISH_BLOCKSIZE; - } - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/* - * Blowfish CFB buffer encryption/decryption - */ -int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx, - int mode, - size_t length, - size_t *iv_off, - unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], - const unsigned char *input, - unsigned char *output ) -{ - int c; - size_t n = *iv_off; - - if( mode == MBEDTLS_BLOWFISH_DECRYPT ) - { - while( length-- ) - { - if( n == 0 ) - mbedtls_blowfish_crypt_ecb( ctx, MBEDTLS_BLOWFISH_ENCRYPT, iv, iv ); - - c = *input++; - *output++ = (unsigned char)( c ^ iv[n] ); - iv[n] = (unsigned char) c; - - n = ( n + 1 ) % MBEDTLS_BLOWFISH_BLOCKSIZE; - } - } - else - { - while( length-- ) - { - if( n == 0 ) - mbedtls_blowfish_crypt_ecb( ctx, MBEDTLS_BLOWFISH_ENCRYPT, iv, iv ); - - iv[n] = *output++ = (unsigned char)( iv[n] ^ *input++ ); - - n = ( n + 1 ) % MBEDTLS_BLOWFISH_BLOCKSIZE; - } - } - - *iv_off = n; - - return( 0 ); -} -#endif /*MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * Blowfish CTR buffer encryption/decryption - */ -int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx, - size_t length, - size_t *nc_off, - unsigned char nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE], - unsigned char stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE], - const unsigned char *input, - unsigned char *output ) -{ - int c, i; - size_t n = *nc_off; - - while( length-- ) - { - if( n == 0 ) { - mbedtls_blowfish_crypt_ecb( ctx, MBEDTLS_BLOWFISH_ENCRYPT, nonce_counter, - stream_block ); - - for( i = MBEDTLS_BLOWFISH_BLOCKSIZE; i > 0; i-- ) - if( ++nonce_counter[i - 1] != 0 ) - break; - } - c = *input++; - *output++ = (unsigned char)( c ^ stream_block[n] ); - - n = ( n + 1 ) % MBEDTLS_BLOWFISH_BLOCKSIZE; - } - - *nc_off = n; - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -static const uint32_t S[4][256] = { - { 0xD1310BA6L, 0x98DFB5ACL, 0x2FFD72DBL, 0xD01ADFB7L, - 0xB8E1AFEDL, 0x6A267E96L, 0xBA7C9045L, 0xF12C7F99L, - 0x24A19947L, 0xB3916CF7L, 0x0801F2E2L, 0x858EFC16L, - 0x636920D8L, 0x71574E69L, 0xA458FEA3L, 0xF4933D7EL, - 0x0D95748FL, 0x728EB658L, 0x718BCD58L, 0x82154AEEL, - 0x7B54A41DL, 0xC25A59B5L, 0x9C30D539L, 0x2AF26013L, - 0xC5D1B023L, 0x286085F0L, 0xCA417918L, 0xB8DB38EFL, - 0x8E79DCB0L, 0x603A180EL, 0x6C9E0E8BL, 0xB01E8A3EL, - 0xD71577C1L, 0xBD314B27L, 0x78AF2FDAL, 0x55605C60L, - 0xE65525F3L, 0xAA55AB94L, 0x57489862L, 0x63E81440L, - 0x55CA396AL, 0x2AAB10B6L, 0xB4CC5C34L, 0x1141E8CEL, - 0xA15486AFL, 0x7C72E993L, 0xB3EE1411L, 0x636FBC2AL, - 0x2BA9C55DL, 0x741831F6L, 0xCE5C3E16L, 0x9B87931EL, - 0xAFD6BA33L, 0x6C24CF5CL, 0x7A325381L, 0x28958677L, - 0x3B8F4898L, 0x6B4BB9AFL, 0xC4BFE81BL, 0x66282193L, - 0x61D809CCL, 0xFB21A991L, 0x487CAC60L, 0x5DEC8032L, - 0xEF845D5DL, 0xE98575B1L, 0xDC262302L, 0xEB651B88L, - 0x23893E81L, 0xD396ACC5L, 0x0F6D6FF3L, 0x83F44239L, - 0x2E0B4482L, 0xA4842004L, 0x69C8F04AL, 0x9E1F9B5EL, - 0x21C66842L, 0xF6E96C9AL, 0x670C9C61L, 0xABD388F0L, - 0x6A51A0D2L, 0xD8542F68L, 0x960FA728L, 0xAB5133A3L, - 0x6EEF0B6CL, 0x137A3BE4L, 0xBA3BF050L, 0x7EFB2A98L, - 0xA1F1651DL, 0x39AF0176L, 0x66CA593EL, 0x82430E88L, - 0x8CEE8619L, 0x456F9FB4L, 0x7D84A5C3L, 0x3B8B5EBEL, - 0xE06F75D8L, 0x85C12073L, 0x401A449FL, 0x56C16AA6L, - 0x4ED3AA62L, 0x363F7706L, 0x1BFEDF72L, 0x429B023DL, - 0x37D0D724L, 0xD00A1248L, 0xDB0FEAD3L, 0x49F1C09BL, - 0x075372C9L, 0x80991B7BL, 0x25D479D8L, 0xF6E8DEF7L, - 0xE3FE501AL, 0xB6794C3BL, 0x976CE0BDL, 0x04C006BAL, - 0xC1A94FB6L, 0x409F60C4L, 0x5E5C9EC2L, 0x196A2463L, - 0x68FB6FAFL, 0x3E6C53B5L, 0x1339B2EBL, 0x3B52EC6FL, - 0x6DFC511FL, 0x9B30952CL, 0xCC814544L, 0xAF5EBD09L, - 0xBEE3D004L, 0xDE334AFDL, 0x660F2807L, 0x192E4BB3L, - 0xC0CBA857L, 0x45C8740FL, 0xD20B5F39L, 0xB9D3FBDBL, - 0x5579C0BDL, 0x1A60320AL, 0xD6A100C6L, 0x402C7279L, - 0x679F25FEL, 0xFB1FA3CCL, 0x8EA5E9F8L, 0xDB3222F8L, - 0x3C7516DFL, 0xFD616B15L, 0x2F501EC8L, 0xAD0552ABL, - 0x323DB5FAL, 0xFD238760L, 0x53317B48L, 0x3E00DF82L, - 0x9E5C57BBL, 0xCA6F8CA0L, 0x1A87562EL, 0xDF1769DBL, - 0xD542A8F6L, 0x287EFFC3L, 0xAC6732C6L, 0x8C4F5573L, - 0x695B27B0L, 0xBBCA58C8L, 0xE1FFA35DL, 0xB8F011A0L, - 0x10FA3D98L, 0xFD2183B8L, 0x4AFCB56CL, 0x2DD1D35BL, - 0x9A53E479L, 0xB6F84565L, 0xD28E49BCL, 0x4BFB9790L, - 0xE1DDF2DAL, 0xA4CB7E33L, 0x62FB1341L, 0xCEE4C6E8L, - 0xEF20CADAL, 0x36774C01L, 0xD07E9EFEL, 0x2BF11FB4L, - 0x95DBDA4DL, 0xAE909198L, 0xEAAD8E71L, 0x6B93D5A0L, - 0xD08ED1D0L, 0xAFC725E0L, 0x8E3C5B2FL, 0x8E7594B7L, - 0x8FF6E2FBL, 0xF2122B64L, 0x8888B812L, 0x900DF01CL, - 0x4FAD5EA0L, 0x688FC31CL, 0xD1CFF191L, 0xB3A8C1ADL, - 0x2F2F2218L, 0xBE0E1777L, 0xEA752DFEL, 0x8B021FA1L, - 0xE5A0CC0FL, 0xB56F74E8L, 0x18ACF3D6L, 0xCE89E299L, - 0xB4A84FE0L, 0xFD13E0B7L, 0x7CC43B81L, 0xD2ADA8D9L, - 0x165FA266L, 0x80957705L, 0x93CC7314L, 0x211A1477L, - 0xE6AD2065L, 0x77B5FA86L, 0xC75442F5L, 0xFB9D35CFL, - 0xEBCDAF0CL, 0x7B3E89A0L, 0xD6411BD3L, 0xAE1E7E49L, - 0x00250E2DL, 0x2071B35EL, 0x226800BBL, 0x57B8E0AFL, - 0x2464369BL, 0xF009B91EL, 0x5563911DL, 0x59DFA6AAL, - 0x78C14389L, 0xD95A537FL, 0x207D5BA2L, 0x02E5B9C5L, - 0x83260376L, 0x6295CFA9L, 0x11C81968L, 0x4E734A41L, - 0xB3472DCAL, 0x7B14A94AL, 0x1B510052L, 0x9A532915L, - 0xD60F573FL, 0xBC9BC6E4L, 0x2B60A476L, 0x81E67400L, - 0x08BA6FB5L, 0x571BE91FL, 0xF296EC6BL, 0x2A0DD915L, - 0xB6636521L, 0xE7B9F9B6L, 0xFF34052EL, 0xC5855664L, - 0x53B02D5DL, 0xA99F8FA1L, 0x08BA4799L, 0x6E85076AL }, - { 0x4B7A70E9L, 0xB5B32944L, 0xDB75092EL, 0xC4192623L, - 0xAD6EA6B0L, 0x49A7DF7DL, 0x9CEE60B8L, 0x8FEDB266L, - 0xECAA8C71L, 0x699A17FFL, 0x5664526CL, 0xC2B19EE1L, - 0x193602A5L, 0x75094C29L, 0xA0591340L, 0xE4183A3EL, - 0x3F54989AL, 0x5B429D65L, 0x6B8FE4D6L, 0x99F73FD6L, - 0xA1D29C07L, 0xEFE830F5L, 0x4D2D38E6L, 0xF0255DC1L, - 0x4CDD2086L, 0x8470EB26L, 0x6382E9C6L, 0x021ECC5EL, - 0x09686B3FL, 0x3EBAEFC9L, 0x3C971814L, 0x6B6A70A1L, - 0x687F3584L, 0x52A0E286L, 0xB79C5305L, 0xAA500737L, - 0x3E07841CL, 0x7FDEAE5CL, 0x8E7D44ECL, 0x5716F2B8L, - 0xB03ADA37L, 0xF0500C0DL, 0xF01C1F04L, 0x0200B3FFL, - 0xAE0CF51AL, 0x3CB574B2L, 0x25837A58L, 0xDC0921BDL, - 0xD19113F9L, 0x7CA92FF6L, 0x94324773L, 0x22F54701L, - 0x3AE5E581L, 0x37C2DADCL, 0xC8B57634L, 0x9AF3DDA7L, - 0xA9446146L, 0x0FD0030EL, 0xECC8C73EL, 0xA4751E41L, - 0xE238CD99L, 0x3BEA0E2FL, 0x3280BBA1L, 0x183EB331L, - 0x4E548B38L, 0x4F6DB908L, 0x6F420D03L, 0xF60A04BFL, - 0x2CB81290L, 0x24977C79L, 0x5679B072L, 0xBCAF89AFL, - 0xDE9A771FL, 0xD9930810L, 0xB38BAE12L, 0xDCCF3F2EL, - 0x5512721FL, 0x2E6B7124L, 0x501ADDE6L, 0x9F84CD87L, - 0x7A584718L, 0x7408DA17L, 0xBC9F9ABCL, 0xE94B7D8CL, - 0xEC7AEC3AL, 0xDB851DFAL, 0x63094366L, 0xC464C3D2L, - 0xEF1C1847L, 0x3215D908L, 0xDD433B37L, 0x24C2BA16L, - 0x12A14D43L, 0x2A65C451L, 0x50940002L, 0x133AE4DDL, - 0x71DFF89EL, 0x10314E55L, 0x81AC77D6L, 0x5F11199BL, - 0x043556F1L, 0xD7A3C76BL, 0x3C11183BL, 0x5924A509L, - 0xF28FE6EDL, 0x97F1FBFAL, 0x9EBABF2CL, 0x1E153C6EL, - 0x86E34570L, 0xEAE96FB1L, 0x860E5E0AL, 0x5A3E2AB3L, - 0x771FE71CL, 0x4E3D06FAL, 0x2965DCB9L, 0x99E71D0FL, - 0x803E89D6L, 0x5266C825L, 0x2E4CC978L, 0x9C10B36AL, - 0xC6150EBAL, 0x94E2EA78L, 0xA5FC3C53L, 0x1E0A2DF4L, - 0xF2F74EA7L, 0x361D2B3DL, 0x1939260FL, 0x19C27960L, - 0x5223A708L, 0xF71312B6L, 0xEBADFE6EL, 0xEAC31F66L, - 0xE3BC4595L, 0xA67BC883L, 0xB17F37D1L, 0x018CFF28L, - 0xC332DDEFL, 0xBE6C5AA5L, 0x65582185L, 0x68AB9802L, - 0xEECEA50FL, 0xDB2F953BL, 0x2AEF7DADL, 0x5B6E2F84L, - 0x1521B628L, 0x29076170L, 0xECDD4775L, 0x619F1510L, - 0x13CCA830L, 0xEB61BD96L, 0x0334FE1EL, 0xAA0363CFL, - 0xB5735C90L, 0x4C70A239L, 0xD59E9E0BL, 0xCBAADE14L, - 0xEECC86BCL, 0x60622CA7L, 0x9CAB5CABL, 0xB2F3846EL, - 0x648B1EAFL, 0x19BDF0CAL, 0xA02369B9L, 0x655ABB50L, - 0x40685A32L, 0x3C2AB4B3L, 0x319EE9D5L, 0xC021B8F7L, - 0x9B540B19L, 0x875FA099L, 0x95F7997EL, 0x623D7DA8L, - 0xF837889AL, 0x97E32D77L, 0x11ED935FL, 0x16681281L, - 0x0E358829L, 0xC7E61FD6L, 0x96DEDFA1L, 0x7858BA99L, - 0x57F584A5L, 0x1B227263L, 0x9B83C3FFL, 0x1AC24696L, - 0xCDB30AEBL, 0x532E3054L, 0x8FD948E4L, 0x6DBC3128L, - 0x58EBF2EFL, 0x34C6FFEAL, 0xFE28ED61L, 0xEE7C3C73L, - 0x5D4A14D9L, 0xE864B7E3L, 0x42105D14L, 0x203E13E0L, - 0x45EEE2B6L, 0xA3AAABEAL, 0xDB6C4F15L, 0xFACB4FD0L, - 0xC742F442L, 0xEF6ABBB5L, 0x654F3B1DL, 0x41CD2105L, - 0xD81E799EL, 0x86854DC7L, 0xE44B476AL, 0x3D816250L, - 0xCF62A1F2L, 0x5B8D2646L, 0xFC8883A0L, 0xC1C7B6A3L, - 0x7F1524C3L, 0x69CB7492L, 0x47848A0BL, 0x5692B285L, - 0x095BBF00L, 0xAD19489DL, 0x1462B174L, 0x23820E00L, - 0x58428D2AL, 0x0C55F5EAL, 0x1DADF43EL, 0x233F7061L, - 0x3372F092L, 0x8D937E41L, 0xD65FECF1L, 0x6C223BDBL, - 0x7CDE3759L, 0xCBEE7460L, 0x4085F2A7L, 0xCE77326EL, - 0xA6078084L, 0x19F8509EL, 0xE8EFD855L, 0x61D99735L, - 0xA969A7AAL, 0xC50C06C2L, 0x5A04ABFCL, 0x800BCADCL, - 0x9E447A2EL, 0xC3453484L, 0xFDD56705L, 0x0E1E9EC9L, - 0xDB73DBD3L, 0x105588CDL, 0x675FDA79L, 0xE3674340L, - 0xC5C43465L, 0x713E38D8L, 0x3D28F89EL, 0xF16DFF20L, - 0x153E21E7L, 0x8FB03D4AL, 0xE6E39F2BL, 0xDB83ADF7L }, - { 0xE93D5A68L, 0x948140F7L, 0xF64C261CL, 0x94692934L, - 0x411520F7L, 0x7602D4F7L, 0xBCF46B2EL, 0xD4A20068L, - 0xD4082471L, 0x3320F46AL, 0x43B7D4B7L, 0x500061AFL, - 0x1E39F62EL, 0x97244546L, 0x14214F74L, 0xBF8B8840L, - 0x4D95FC1DL, 0x96B591AFL, 0x70F4DDD3L, 0x66A02F45L, - 0xBFBC09ECL, 0x03BD9785L, 0x7FAC6DD0L, 0x31CB8504L, - 0x96EB27B3L, 0x55FD3941L, 0xDA2547E6L, 0xABCA0A9AL, - 0x28507825L, 0x530429F4L, 0x0A2C86DAL, 0xE9B66DFBL, - 0x68DC1462L, 0xD7486900L, 0x680EC0A4L, 0x27A18DEEL, - 0x4F3FFEA2L, 0xE887AD8CL, 0xB58CE006L, 0x7AF4D6B6L, - 0xAACE1E7CL, 0xD3375FECL, 0xCE78A399L, 0x406B2A42L, - 0x20FE9E35L, 0xD9F385B9L, 0xEE39D7ABL, 0x3B124E8BL, - 0x1DC9FAF7L, 0x4B6D1856L, 0x26A36631L, 0xEAE397B2L, - 0x3A6EFA74L, 0xDD5B4332L, 0x6841E7F7L, 0xCA7820FBL, - 0xFB0AF54EL, 0xD8FEB397L, 0x454056ACL, 0xBA489527L, - 0x55533A3AL, 0x20838D87L, 0xFE6BA9B7L, 0xD096954BL, - 0x55A867BCL, 0xA1159A58L, 0xCCA92963L, 0x99E1DB33L, - 0xA62A4A56L, 0x3F3125F9L, 0x5EF47E1CL, 0x9029317CL, - 0xFDF8E802L, 0x04272F70L, 0x80BB155CL, 0x05282CE3L, - 0x95C11548L, 0xE4C66D22L, 0x48C1133FL, 0xC70F86DCL, - 0x07F9C9EEL, 0x41041F0FL, 0x404779A4L, 0x5D886E17L, - 0x325F51EBL, 0xD59BC0D1L, 0xF2BCC18FL, 0x41113564L, - 0x257B7834L, 0x602A9C60L, 0xDFF8E8A3L, 0x1F636C1BL, - 0x0E12B4C2L, 0x02E1329EL, 0xAF664FD1L, 0xCAD18115L, - 0x6B2395E0L, 0x333E92E1L, 0x3B240B62L, 0xEEBEB922L, - 0x85B2A20EL, 0xE6BA0D99L, 0xDE720C8CL, 0x2DA2F728L, - 0xD0127845L, 0x95B794FDL, 0x647D0862L, 0xE7CCF5F0L, - 0x5449A36FL, 0x877D48FAL, 0xC39DFD27L, 0xF33E8D1EL, - 0x0A476341L, 0x992EFF74L, 0x3A6F6EABL, 0xF4F8FD37L, - 0xA812DC60L, 0xA1EBDDF8L, 0x991BE14CL, 0xDB6E6B0DL, - 0xC67B5510L, 0x6D672C37L, 0x2765D43BL, 0xDCD0E804L, - 0xF1290DC7L, 0xCC00FFA3L, 0xB5390F92L, 0x690FED0BL, - 0x667B9FFBL, 0xCEDB7D9CL, 0xA091CF0BL, 0xD9155EA3L, - 0xBB132F88L, 0x515BAD24L, 0x7B9479BFL, 0x763BD6EBL, - 0x37392EB3L, 0xCC115979L, 0x8026E297L, 0xF42E312DL, - 0x6842ADA7L, 0xC66A2B3BL, 0x12754CCCL, 0x782EF11CL, - 0x6A124237L, 0xB79251E7L, 0x06A1BBE6L, 0x4BFB6350L, - 0x1A6B1018L, 0x11CAEDFAL, 0x3D25BDD8L, 0xE2E1C3C9L, - 0x44421659L, 0x0A121386L, 0xD90CEC6EL, 0xD5ABEA2AL, - 0x64AF674EL, 0xDA86A85FL, 0xBEBFE988L, 0x64E4C3FEL, - 0x9DBC8057L, 0xF0F7C086L, 0x60787BF8L, 0x6003604DL, - 0xD1FD8346L, 0xF6381FB0L, 0x7745AE04L, 0xD736FCCCL, - 0x83426B33L, 0xF01EAB71L, 0xB0804187L, 0x3C005E5FL, - 0x77A057BEL, 0xBDE8AE24L, 0x55464299L, 0xBF582E61L, - 0x4E58F48FL, 0xF2DDFDA2L, 0xF474EF38L, 0x8789BDC2L, - 0x5366F9C3L, 0xC8B38E74L, 0xB475F255L, 0x46FCD9B9L, - 0x7AEB2661L, 0x8B1DDF84L, 0x846A0E79L, 0x915F95E2L, - 0x466E598EL, 0x20B45770L, 0x8CD55591L, 0xC902DE4CL, - 0xB90BACE1L, 0xBB8205D0L, 0x11A86248L, 0x7574A99EL, - 0xB77F19B6L, 0xE0A9DC09L, 0x662D09A1L, 0xC4324633L, - 0xE85A1F02L, 0x09F0BE8CL, 0x4A99A025L, 0x1D6EFE10L, - 0x1AB93D1DL, 0x0BA5A4DFL, 0xA186F20FL, 0x2868F169L, - 0xDCB7DA83L, 0x573906FEL, 0xA1E2CE9BL, 0x4FCD7F52L, - 0x50115E01L, 0xA70683FAL, 0xA002B5C4L, 0x0DE6D027L, - 0x9AF88C27L, 0x773F8641L, 0xC3604C06L, 0x61A806B5L, - 0xF0177A28L, 0xC0F586E0L, 0x006058AAL, 0x30DC7D62L, - 0x11E69ED7L, 0x2338EA63L, 0x53C2DD94L, 0xC2C21634L, - 0xBBCBEE56L, 0x90BCB6DEL, 0xEBFC7DA1L, 0xCE591D76L, - 0x6F05E409L, 0x4B7C0188L, 0x39720A3DL, 0x7C927C24L, - 0x86E3725FL, 0x724D9DB9L, 0x1AC15BB4L, 0xD39EB8FCL, - 0xED545578L, 0x08FCA5B5L, 0xD83D7CD3L, 0x4DAD0FC4L, - 0x1E50EF5EL, 0xB161E6F8L, 0xA28514D9L, 0x6C51133CL, - 0x6FD5C7E7L, 0x56E14EC4L, 0x362ABFCEL, 0xDDC6C837L, - 0xD79A3234L, 0x92638212L, 0x670EFA8EL, 0x406000E0L }, - { 0x3A39CE37L, 0xD3FAF5CFL, 0xABC27737L, 0x5AC52D1BL, - 0x5CB0679EL, 0x4FA33742L, 0xD3822740L, 0x99BC9BBEL, - 0xD5118E9DL, 0xBF0F7315L, 0xD62D1C7EL, 0xC700C47BL, - 0xB78C1B6BL, 0x21A19045L, 0xB26EB1BEL, 0x6A366EB4L, - 0x5748AB2FL, 0xBC946E79L, 0xC6A376D2L, 0x6549C2C8L, - 0x530FF8EEL, 0x468DDE7DL, 0xD5730A1DL, 0x4CD04DC6L, - 0x2939BBDBL, 0xA9BA4650L, 0xAC9526E8L, 0xBE5EE304L, - 0xA1FAD5F0L, 0x6A2D519AL, 0x63EF8CE2L, 0x9A86EE22L, - 0xC089C2B8L, 0x43242EF6L, 0xA51E03AAL, 0x9CF2D0A4L, - 0x83C061BAL, 0x9BE96A4DL, 0x8FE51550L, 0xBA645BD6L, - 0x2826A2F9L, 0xA73A3AE1L, 0x4BA99586L, 0xEF5562E9L, - 0xC72FEFD3L, 0xF752F7DAL, 0x3F046F69L, 0x77FA0A59L, - 0x80E4A915L, 0x87B08601L, 0x9B09E6ADL, 0x3B3EE593L, - 0xE990FD5AL, 0x9E34D797L, 0x2CF0B7D9L, 0x022B8B51L, - 0x96D5AC3AL, 0x017DA67DL, 0xD1CF3ED6L, 0x7C7D2D28L, - 0x1F9F25CFL, 0xADF2B89BL, 0x5AD6B472L, 0x5A88F54CL, - 0xE029AC71L, 0xE019A5E6L, 0x47B0ACFDL, 0xED93FA9BL, - 0xE8D3C48DL, 0x283B57CCL, 0xF8D56629L, 0x79132E28L, - 0x785F0191L, 0xED756055L, 0xF7960E44L, 0xE3D35E8CL, - 0x15056DD4L, 0x88F46DBAL, 0x03A16125L, 0x0564F0BDL, - 0xC3EB9E15L, 0x3C9057A2L, 0x97271AECL, 0xA93A072AL, - 0x1B3F6D9BL, 0x1E6321F5L, 0xF59C66FBL, 0x26DCF319L, - 0x7533D928L, 0xB155FDF5L, 0x03563482L, 0x8ABA3CBBL, - 0x28517711L, 0xC20AD9F8L, 0xABCC5167L, 0xCCAD925FL, - 0x4DE81751L, 0x3830DC8EL, 0x379D5862L, 0x9320F991L, - 0xEA7A90C2L, 0xFB3E7BCEL, 0x5121CE64L, 0x774FBE32L, - 0xA8B6E37EL, 0xC3293D46L, 0x48DE5369L, 0x6413E680L, - 0xA2AE0810L, 0xDD6DB224L, 0x69852DFDL, 0x09072166L, - 0xB39A460AL, 0x6445C0DDL, 0x586CDECFL, 0x1C20C8AEL, - 0x5BBEF7DDL, 0x1B588D40L, 0xCCD2017FL, 0x6BB4E3BBL, - 0xDDA26A7EL, 0x3A59FF45L, 0x3E350A44L, 0xBCB4CDD5L, - 0x72EACEA8L, 0xFA6484BBL, 0x8D6612AEL, 0xBF3C6F47L, - 0xD29BE463L, 0x542F5D9EL, 0xAEC2771BL, 0xF64E6370L, - 0x740E0D8DL, 0xE75B1357L, 0xF8721671L, 0xAF537D5DL, - 0x4040CB08L, 0x4EB4E2CCL, 0x34D2466AL, 0x0115AF84L, - 0xE1B00428L, 0x95983A1DL, 0x06B89FB4L, 0xCE6EA048L, - 0x6F3F3B82L, 0x3520AB82L, 0x011A1D4BL, 0x277227F8L, - 0x611560B1L, 0xE7933FDCL, 0xBB3A792BL, 0x344525BDL, - 0xA08839E1L, 0x51CE794BL, 0x2F32C9B7L, 0xA01FBAC9L, - 0xE01CC87EL, 0xBCC7D1F6L, 0xCF0111C3L, 0xA1E8AAC7L, - 0x1A908749L, 0xD44FBD9AL, 0xD0DADECBL, 0xD50ADA38L, - 0x0339C32AL, 0xC6913667L, 0x8DF9317CL, 0xE0B12B4FL, - 0xF79E59B7L, 0x43F5BB3AL, 0xF2D519FFL, 0x27D9459CL, - 0xBF97222CL, 0x15E6FC2AL, 0x0F91FC71L, 0x9B941525L, - 0xFAE59361L, 0xCEB69CEBL, 0xC2A86459L, 0x12BAA8D1L, - 0xB6C1075EL, 0xE3056A0CL, 0x10D25065L, 0xCB03A442L, - 0xE0EC6E0EL, 0x1698DB3BL, 0x4C98A0BEL, 0x3278E964L, - 0x9F1F9532L, 0xE0D392DFL, 0xD3A0342BL, 0x8971F21EL, - 0x1B0A7441L, 0x4BA3348CL, 0xC5BE7120L, 0xC37632D8L, - 0xDF359F8DL, 0x9B992F2EL, 0xE60B6F47L, 0x0FE3F11DL, - 0xE54CDA54L, 0x1EDAD891L, 0xCE6279CFL, 0xCD3E7E6FL, - 0x1618B166L, 0xFD2C1D05L, 0x848FD2C5L, 0xF6FB2299L, - 0xF523F357L, 0xA6327623L, 0x93A83531L, 0x56CCCD02L, - 0xACF08162L, 0x5A75EBB5L, 0x6E163697L, 0x88D273CCL, - 0xDE966292L, 0x81B949D0L, 0x4C50901BL, 0x71C65614L, - 0xE6C6C7BDL, 0x327A140AL, 0x45E1D006L, 0xC3F27B9AL, - 0xC9AA53FDL, 0x62A80F00L, 0xBB25BFE2L, 0x35BDD2F6L, - 0x71126905L, 0xB2040222L, 0xB6CBCF7CL, 0xCD769C2BL, - 0x53113EC0L, 0x1640E3D3L, 0x38ABBD60L, 0x2547ADF0L, - 0xBA38209CL, 0xF746CE76L, 0x77AFA1C5L, 0x20756060L, - 0x85CBFE4EL, 0x8AE88DD8L, 0x7AAAF9B0L, 0x4CF9AA7EL, - 0x1948C25CL, 0x02FB8A8CL, 0x01C36AE4L, 0xD6EBE1F9L, - 0x90D4F869L, 0xA65CDEA0L, 0x3F09252DL, 0xC208E69FL, - 0xB74E6132L, 0xCE77E25BL, 0x578FDFE3L, 0x3AC372E6L } -}; - -#endif /* !MBEDTLS_BLOWFISH_ALT */ -#endif /* MBEDTLS_BLOWFISH_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/camellia.c b/build/premake/premake5/contrib/mbedtls/library/camellia.c deleted file mode 100644 index e015ca24bd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/camellia.c +++ /dev/null @@ -1,1072 +0,0 @@ -/* - * Camellia implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The Camellia block cipher was designed by NTT and Mitsubishi Electric - * Corporation. - * - * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_CAMELLIA_C) - -#include "mbedtls/camellia.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_CAMELLIA_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -static const unsigned char SIGMA_CHARS[6][8] = -{ - { 0xa0, 0x9e, 0x66, 0x7f, 0x3b, 0xcc, 0x90, 0x8b }, - { 0xb6, 0x7a, 0xe8, 0x58, 0x4c, 0xaa, 0x73, 0xb2 }, - { 0xc6, 0xef, 0x37, 0x2f, 0xe9, 0x4f, 0x82, 0xbe }, - { 0x54, 0xff, 0x53, 0xa5, 0xf1, 0xd3, 0x6f, 0x1c }, - { 0x10, 0xe5, 0x27, 0xfa, 0xde, 0x68, 0x2d, 0x1d }, - { 0xb0, 0x56, 0x88, 0xc2, 0xb3, 0xe6, 0xc1, 0xfd } -}; - -#if defined(MBEDTLS_CAMELLIA_SMALL_MEMORY) - -static const unsigned char FSb[256] = -{ - 112,130, 44,236,179, 39,192,229,228,133, 87, 53,234, 12,174, 65, - 35,239,107,147, 69, 25,165, 33,237, 14, 79, 78, 29,101,146,189, - 134,184,175,143,124,235, 31,206, 62, 48,220, 95, 94,197, 11, 26, - 166,225, 57,202,213, 71, 93, 61,217, 1, 90,214, 81, 86,108, 77, - 139, 13,154,102,251,204,176, 45,116, 18, 43, 32,240,177,132,153, - 223, 76,203,194, 52,126,118, 5,109,183,169, 49,209, 23, 4,215, - 20, 88, 58, 97,222, 27, 17, 28, 50, 15,156, 22, 83, 24,242, 34, - 254, 68,207,178,195,181,122,145, 36, 8,232,168, 96,252,105, 80, - 170,208,160,125,161,137, 98,151, 84, 91, 30,149,224,255,100,210, - 16,196, 0, 72,163,247,117,219,138, 3,230,218, 9, 63,221,148, - 135, 92,131, 2,205, 74,144, 51,115,103,246,243,157,127,191,226, - 82,155,216, 38,200, 55,198, 59,129,150,111, 75, 19,190, 99, 46, - 233,121,167,140,159,110,188,142, 41,245,249,182, 47,253,180, 89, - 120,152, 6,106,231, 70,113,186,212, 37,171, 66,136,162,141,250, - 114, 7,185, 85,248,238,172, 10, 54, 73, 42,104, 60, 56,241,164, - 64, 40,211,123,187,201, 67,193, 21,227,173,244,119,199,128,158 -}; - -#define SBOX1(n) FSb[(n)] -#define SBOX2(n) (unsigned char)((FSb[(n)] >> 7 ^ FSb[(n)] << 1) & 0xff) -#define SBOX3(n) (unsigned char)((FSb[(n)] >> 1 ^ FSb[(n)] << 7) & 0xff) -#define SBOX4(n) FSb[((n) << 1 ^ (n) >> 7) &0xff] - -#else /* MBEDTLS_CAMELLIA_SMALL_MEMORY */ - -static const unsigned char FSb[256] = -{ - 112, 130, 44, 236, 179, 39, 192, 229, 228, 133, 87, 53, 234, 12, 174, 65, - 35, 239, 107, 147, 69, 25, 165, 33, 237, 14, 79, 78, 29, 101, 146, 189, - 134, 184, 175, 143, 124, 235, 31, 206, 62, 48, 220, 95, 94, 197, 11, 26, - 166, 225, 57, 202, 213, 71, 93, 61, 217, 1, 90, 214, 81, 86, 108, 77, - 139, 13, 154, 102, 251, 204, 176, 45, 116, 18, 43, 32, 240, 177, 132, 153, - 223, 76, 203, 194, 52, 126, 118, 5, 109, 183, 169, 49, 209, 23, 4, 215, - 20, 88, 58, 97, 222, 27, 17, 28, 50, 15, 156, 22, 83, 24, 242, 34, - 254, 68, 207, 178, 195, 181, 122, 145, 36, 8, 232, 168, 96, 252, 105, 80, - 170, 208, 160, 125, 161, 137, 98, 151, 84, 91, 30, 149, 224, 255, 100, 210, - 16, 196, 0, 72, 163, 247, 117, 219, 138, 3, 230, 218, 9, 63, 221, 148, - 135, 92, 131, 2, 205, 74, 144, 51, 115, 103, 246, 243, 157, 127, 191, 226, - 82, 155, 216, 38, 200, 55, 198, 59, 129, 150, 111, 75, 19, 190, 99, 46, - 233, 121, 167, 140, 159, 110, 188, 142, 41, 245, 249, 182, 47, 253, 180, 89, - 120, 152, 6, 106, 231, 70, 113, 186, 212, 37, 171, 66, 136, 162, 141, 250, - 114, 7, 185, 85, 248, 238, 172, 10, 54, 73, 42, 104, 60, 56, 241, 164, - 64, 40, 211, 123, 187, 201, 67, 193, 21, 227, 173, 244, 119, 199, 128, 158 -}; - -static const unsigned char FSb2[256] = -{ - 224, 5, 88, 217, 103, 78, 129, 203, 201, 11, 174, 106, 213, 24, 93, 130, - 70, 223, 214, 39, 138, 50, 75, 66, 219, 28, 158, 156, 58, 202, 37, 123, - 13, 113, 95, 31, 248, 215, 62, 157, 124, 96, 185, 190, 188, 139, 22, 52, - 77, 195, 114, 149, 171, 142, 186, 122, 179, 2, 180, 173, 162, 172, 216, 154, - 23, 26, 53, 204, 247, 153, 97, 90, 232, 36, 86, 64, 225, 99, 9, 51, - 191, 152, 151, 133, 104, 252, 236, 10, 218, 111, 83, 98, 163, 46, 8, 175, - 40, 176, 116, 194, 189, 54, 34, 56, 100, 30, 57, 44, 166, 48, 229, 68, - 253, 136, 159, 101, 135, 107, 244, 35, 72, 16, 209, 81, 192, 249, 210, 160, - 85, 161, 65, 250, 67, 19, 196, 47, 168, 182, 60, 43, 193, 255, 200, 165, - 32, 137, 0, 144, 71, 239, 234, 183, 21, 6, 205, 181, 18, 126, 187, 41, - 15, 184, 7, 4, 155, 148, 33, 102, 230, 206, 237, 231, 59, 254, 127, 197, - 164, 55, 177, 76, 145, 110, 141, 118, 3, 45, 222, 150, 38, 125, 198, 92, - 211, 242, 79, 25, 63, 220, 121, 29, 82, 235, 243, 109, 94, 251, 105, 178, - 240, 49, 12, 212, 207, 140, 226, 117, 169, 74, 87, 132, 17, 69, 27, 245, - 228, 14, 115, 170, 241, 221, 89, 20, 108, 146, 84, 208, 120, 112, 227, 73, - 128, 80, 167, 246, 119, 147, 134, 131, 42, 199, 91, 233, 238, 143, 1, 61 -}; - -static const unsigned char FSb3[256] = -{ - 56, 65, 22, 118, 217, 147, 96, 242, 114, 194, 171, 154, 117, 6, 87, 160, - 145, 247, 181, 201, 162, 140, 210, 144, 246, 7, 167, 39, 142, 178, 73, 222, - 67, 92, 215, 199, 62, 245, 143, 103, 31, 24, 110, 175, 47, 226, 133, 13, - 83, 240, 156, 101, 234, 163, 174, 158, 236, 128, 45, 107, 168, 43, 54, 166, - 197, 134, 77, 51, 253, 102, 88, 150, 58, 9, 149, 16, 120, 216, 66, 204, - 239, 38, 229, 97, 26, 63, 59, 130, 182, 219, 212, 152, 232, 139, 2, 235, - 10, 44, 29, 176, 111, 141, 136, 14, 25, 135, 78, 11, 169, 12, 121, 17, - 127, 34, 231, 89, 225, 218, 61, 200, 18, 4, 116, 84, 48, 126, 180, 40, - 85, 104, 80, 190, 208, 196, 49, 203, 42, 173, 15, 202, 112, 255, 50, 105, - 8, 98, 0, 36, 209, 251, 186, 237, 69, 129, 115, 109, 132, 159, 238, 74, - 195, 46, 193, 1, 230, 37, 72, 153, 185, 179, 123, 249, 206, 191, 223, 113, - 41, 205, 108, 19, 100, 155, 99, 157, 192, 75, 183, 165, 137, 95, 177, 23, - 244, 188, 211, 70, 207, 55, 94, 71, 148, 250, 252, 91, 151, 254, 90, 172, - 60, 76, 3, 53, 243, 35, 184, 93, 106, 146, 213, 33, 68, 81, 198, 125, - 57, 131, 220, 170, 124, 119, 86, 5, 27, 164, 21, 52, 30, 28, 248, 82, - 32, 20, 233, 189, 221, 228, 161, 224, 138, 241, 214, 122, 187, 227, 64, 79 -}; - -static const unsigned char FSb4[256] = -{ - 112, 44, 179, 192, 228, 87, 234, 174, 35, 107, 69, 165, 237, 79, 29, 146, - 134, 175, 124, 31, 62, 220, 94, 11, 166, 57, 213, 93, 217, 90, 81, 108, - 139, 154, 251, 176, 116, 43, 240, 132, 223, 203, 52, 118, 109, 169, 209, 4, - 20, 58, 222, 17, 50, 156, 83, 242, 254, 207, 195, 122, 36, 232, 96, 105, - 170, 160, 161, 98, 84, 30, 224, 100, 16, 0, 163, 117, 138, 230, 9, 221, - 135, 131, 205, 144, 115, 246, 157, 191, 82, 216, 200, 198, 129, 111, 19, 99, - 233, 167, 159, 188, 41, 249, 47, 180, 120, 6, 231, 113, 212, 171, 136, 141, - 114, 185, 248, 172, 54, 42, 60, 241, 64, 211, 187, 67, 21, 173, 119, 128, - 130, 236, 39, 229, 133, 53, 12, 65, 239, 147, 25, 33, 14, 78, 101, 189, - 184, 143, 235, 206, 48, 95, 197, 26, 225, 202, 71, 61, 1, 214, 86, 77, - 13, 102, 204, 45, 18, 32, 177, 153, 76, 194, 126, 5, 183, 49, 23, 215, - 88, 97, 27, 28, 15, 22, 24, 34, 68, 178, 181, 145, 8, 168, 252, 80, - 208, 125, 137, 151, 91, 149, 255, 210, 196, 72, 247, 219, 3, 218, 63, 148, - 92, 2, 74, 51, 103, 243, 127, 226, 155, 38, 55, 59, 150, 75, 190, 46, - 121, 140, 110, 142, 245, 182, 253, 89, 152, 106, 70, 186, 37, 66, 162, 250, - 7, 85, 238, 10, 73, 104, 56, 164, 40, 123, 201, 193, 227, 244, 199, 158 -}; - -#define SBOX1(n) FSb[(n)] -#define SBOX2(n) FSb2[(n)] -#define SBOX3(n) FSb3[(n)] -#define SBOX4(n) FSb4[(n)] - -#endif /* MBEDTLS_CAMELLIA_SMALL_MEMORY */ - -static const unsigned char shifts[2][4][4] = -{ - { - { 1, 1, 1, 1 }, /* KL */ - { 0, 0, 0, 0 }, /* KR */ - { 1, 1, 1, 1 }, /* KA */ - { 0, 0, 0, 0 } /* KB */ - }, - { - { 1, 0, 1, 1 }, /* KL */ - { 1, 1, 0, 1 }, /* KR */ - { 1, 1, 1, 0 }, /* KA */ - { 1, 1, 0, 1 } /* KB */ - } -}; - -static const signed char indexes[2][4][20] = -{ - { - { 0, 1, 2, 3, 8, 9, 10, 11, 38, 39, - 36, 37, 23, 20, 21, 22, 27, -1, -1, 26 }, /* KL -> RK */ - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, /* KR -> RK */ - { 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, - 18, 19, -1, 24, 25, -1, 31, 28, 29, 30 }, /* KA -> RK */ - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } /* KB -> RK */ - }, - { - { 0, 1, 2, 3, 61, 62, 63, 60, -1, -1, - -1, -1, 27, 24, 25, 26, 35, 32, 33, 34 }, /* KL -> RK */ - { -1, -1, -1, -1, 8, 9, 10, 11, 16, 17, - 18, 19, -1, -1, -1, -1, 39, 36, 37, 38 }, /* KR -> RK */ - { -1, -1, -1, -1, 12, 13, 14, 15, 58, 59, - 56, 57, 31, 28, 29, 30, -1, -1, -1, -1 }, /* KA -> RK */ - { 4, 5, 6, 7, 65, 66, 67, 64, 20, 21, - 22, 23, -1, -1, -1, -1, 43, 40, 41, 42 } /* KB -> RK */ - } -}; - -static const signed char transposes[2][20] = -{ - { - 21, 22, 23, 20, - -1, -1, -1, -1, - 18, 19, 16, 17, - 11, 8, 9, 10, - 15, 12, 13, 14 - }, - { - 25, 26, 27, 24, - 29, 30, 31, 28, - 18, 19, 16, 17, - -1, -1, -1, -1, - -1, -1, -1, -1 - } -}; - -/* Shift macro for 128 bit strings with rotation smaller than 32 bits (!) */ -#define ROTL(DEST, SRC, SHIFT) \ -{ \ - (DEST)[0] = (SRC)[0] << (SHIFT) ^ (SRC)[1] >> (32 - (SHIFT)); \ - (DEST)[1] = (SRC)[1] << (SHIFT) ^ (SRC)[2] >> (32 - (SHIFT)); \ - (DEST)[2] = (SRC)[2] << (SHIFT) ^ (SRC)[3] >> (32 - (SHIFT)); \ - (DEST)[3] = (SRC)[3] << (SHIFT) ^ (SRC)[0] >> (32 - (SHIFT)); \ -} - -#define FL(XL, XR, KL, KR) \ -{ \ - (XR) = ((((XL) & (KL)) << 1) | (((XL) & (KL)) >> 31)) ^ (XR); \ - (XL) = ((XR) | (KR)) ^ (XL); \ -} - -#define FLInv(YL, YR, KL, KR) \ -{ \ - (YL) = ((YR) | (KR)) ^ (YL); \ - (YR) = ((((YL) & (KL)) << 1) | (((YL) & (KL)) >> 31)) ^ (YR); \ -} - -#define SHIFT_AND_PLACE(INDEX, OFFSET) \ -{ \ - TK[0] = KC[(OFFSET) * 4 + 0]; \ - TK[1] = KC[(OFFSET) * 4 + 1]; \ - TK[2] = KC[(OFFSET) * 4 + 2]; \ - TK[3] = KC[(OFFSET) * 4 + 3]; \ - \ - for( i = 1; i <= 4; i++ ) \ - if( shifts[(INDEX)][(OFFSET)][i -1] ) \ - ROTL(TK + i * 4, TK, ( 15 * i ) % 32); \ - \ - for( i = 0; i < 20; i++ ) \ - if( indexes[(INDEX)][(OFFSET)][i] != -1 ) { \ - RK[indexes[(INDEX)][(OFFSET)][i]] = TK[ i ]; \ - } \ -} - -static void camellia_feistel( const uint32_t x[2], const uint32_t k[2], - uint32_t z[2]) -{ - uint32_t I0, I1; - I0 = x[0] ^ k[0]; - I1 = x[1] ^ k[1]; - - I0 = ((uint32_t) SBOX1((I0 >> 24) & 0xFF) << 24) | - ((uint32_t) SBOX2((I0 >> 16) & 0xFF) << 16) | - ((uint32_t) SBOX3((I0 >> 8) & 0xFF) << 8) | - ((uint32_t) SBOX4((I0 ) & 0xFF) ); - I1 = ((uint32_t) SBOX2((I1 >> 24) & 0xFF) << 24) | - ((uint32_t) SBOX3((I1 >> 16) & 0xFF) << 16) | - ((uint32_t) SBOX4((I1 >> 8) & 0xFF) << 8) | - ((uint32_t) SBOX1((I1 ) & 0xFF) ); - - I0 ^= (I1 << 8) | (I1 >> 24); - I1 ^= (I0 << 16) | (I0 >> 16); - I0 ^= (I1 >> 8) | (I1 << 24); - I1 ^= (I0 >> 8) | (I0 << 24); - - z[0] ^= I1; - z[1] ^= I0; -} - -void mbedtls_camellia_init( mbedtls_camellia_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_camellia_context ) ); -} - -void mbedtls_camellia_free( mbedtls_camellia_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_camellia_context ) ); -} - -/* - * Camellia key schedule (encryption) - */ -int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned char *key, - unsigned int keybits ) -{ - int idx; - size_t i; - uint32_t *RK; - unsigned char t[64]; - uint32_t SIGMA[6][2]; - uint32_t KC[16]; - uint32_t TK[20]; - - RK = ctx->rk; - - memset( t, 0, 64 ); - memset( RK, 0, sizeof(ctx->rk) ); - - switch( keybits ) - { - case 128: ctx->nr = 3; idx = 0; break; - case 192: - case 256: ctx->nr = 4; idx = 1; break; - default : return( MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH ); - } - - for( i = 0; i < keybits / 8; ++i ) - t[i] = key[i]; - - if( keybits == 192 ) { - for( i = 0; i < 8; i++ ) - t[24 + i] = ~t[16 + i]; - } - - /* - * Prepare SIGMA values - */ - for( i = 0; i < 6; i++ ) { - GET_UINT32_BE( SIGMA[i][0], SIGMA_CHARS[i], 0 ); - GET_UINT32_BE( SIGMA[i][1], SIGMA_CHARS[i], 4 ); - } - - /* - * Key storage in KC - * Order: KL, KR, KA, KB - */ - memset( KC, 0, sizeof(KC) ); - - /* Store KL, KR */ - for( i = 0; i < 8; i++ ) - GET_UINT32_BE( KC[i], t, i * 4 ); - - /* Generate KA */ - for( i = 0; i < 4; ++i ) - KC[8 + i] = KC[i] ^ KC[4 + i]; - - camellia_feistel( KC + 8, SIGMA[0], KC + 10 ); - camellia_feistel( KC + 10, SIGMA[1], KC + 8 ); - - for( i = 0; i < 4; ++i ) - KC[8 + i] ^= KC[i]; - - camellia_feistel( KC + 8, SIGMA[2], KC + 10 ); - camellia_feistel( KC + 10, SIGMA[3], KC + 8 ); - - if( keybits > 128 ) { - /* Generate KB */ - for( i = 0; i < 4; ++i ) - KC[12 + i] = KC[4 + i] ^ KC[8 + i]; - - camellia_feistel( KC + 12, SIGMA[4], KC + 14 ); - camellia_feistel( KC + 14, SIGMA[5], KC + 12 ); - } - - /* - * Generating subkeys - */ - - /* Manipulating KL */ - SHIFT_AND_PLACE( idx, 0 ); - - /* Manipulating KR */ - if( keybits > 128 ) { - SHIFT_AND_PLACE( idx, 1 ); - } - - /* Manipulating KA */ - SHIFT_AND_PLACE( idx, 2 ); - - /* Manipulating KB */ - if( keybits > 128 ) { - SHIFT_AND_PLACE( idx, 3 ); - } - - /* Do transpositions */ - for( i = 0; i < 20; i++ ) { - if( transposes[idx][i] != -1 ) { - RK[32 + 12 * idx + i] = RK[transposes[idx][i]]; - } - } - - return( 0 ); -} - -/* - * Camellia key schedule (decryption) - */ -int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx, const unsigned char *key, - unsigned int keybits ) -{ - int idx, ret; - size_t i; - mbedtls_camellia_context cty; - uint32_t *RK; - uint32_t *SK; - - mbedtls_camellia_init( &cty ); - - /* Also checks keybits */ - if( ( ret = mbedtls_camellia_setkey_enc( &cty, key, keybits ) ) != 0 ) - goto exit; - - ctx->nr = cty.nr; - idx = ( ctx->nr == 4 ); - - RK = ctx->rk; - SK = cty.rk + 24 * 2 + 8 * idx * 2; - - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - - for( i = 22 + 8 * idx, SK -= 6; i > 0; i--, SK -= 4 ) - { - *RK++ = *SK++; - *RK++ = *SK++; - } - - SK -= 2; - - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - *RK++ = *SK++; - -exit: - mbedtls_camellia_free( &cty ); - - return( ret ); -} - -/* - * Camellia-ECB block encryption/decryption - */ -int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ) -{ - int NR; - uint32_t *RK, X[4]; - - ( (void) mode ); - - NR = ctx->nr; - RK = ctx->rk; - - GET_UINT32_BE( X[0], input, 0 ); - GET_UINT32_BE( X[1], input, 4 ); - GET_UINT32_BE( X[2], input, 8 ); - GET_UINT32_BE( X[3], input, 12 ); - - X[0] ^= *RK++; - X[1] ^= *RK++; - X[2] ^= *RK++; - X[3] ^= *RK++; - - while( NR ) { - --NR; - camellia_feistel( X, RK, X + 2 ); - RK += 2; - camellia_feistel( X + 2, RK, X ); - RK += 2; - camellia_feistel( X, RK, X + 2 ); - RK += 2; - camellia_feistel( X + 2, RK, X ); - RK += 2; - camellia_feistel( X, RK, X + 2 ); - RK += 2; - camellia_feistel( X + 2, RK, X ); - RK += 2; - - if( NR ) { - FL(X[0], X[1], RK[0], RK[1]); - RK += 2; - FLInv(X[2], X[3], RK[0], RK[1]); - RK += 2; - } - } - - X[2] ^= *RK++; - X[3] ^= *RK++; - X[0] ^= *RK++; - X[1] ^= *RK++; - - PUT_UINT32_BE( X[2], output, 0 ); - PUT_UINT32_BE( X[3], output, 4 ); - PUT_UINT32_BE( X[0], output, 8 ); - PUT_UINT32_BE( X[1], output, 12 ); - - return( 0 ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * Camellia-CBC buffer encryption/decryption - */ -int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ) -{ - int i; - unsigned char temp[16]; - - if( length % 16 ) - return( MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH ); - - if( mode == MBEDTLS_CAMELLIA_DECRYPT ) - { - while( length > 0 ) - { - memcpy( temp, input, 16 ); - mbedtls_camellia_crypt_ecb( ctx, mode, input, output ); - - for( i = 0; i < 16; i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); - - memcpy( iv, temp, 16 ); - - input += 16; - output += 16; - length -= 16; - } - } - else - { - while( length > 0 ) - { - for( i = 0; i < 16; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); - - mbedtls_camellia_crypt_ecb( ctx, mode, output, output ); - memcpy( iv, output, 16 ); - - input += 16; - output += 16; - length -= 16; - } - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/* - * Camellia-CFB128 buffer encryption/decryption - */ -int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx, - int mode, - size_t length, - size_t *iv_off, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ) -{ - int c; - size_t n = *iv_off; - - if( mode == MBEDTLS_CAMELLIA_DECRYPT ) - { - while( length-- ) - { - if( n == 0 ) - mbedtls_camellia_crypt_ecb( ctx, MBEDTLS_CAMELLIA_ENCRYPT, iv, iv ); - - c = *input++; - *output++ = (unsigned char)( c ^ iv[n] ); - iv[n] = (unsigned char) c; - - n = ( n + 1 ) & 0x0F; - } - } - else - { - while( length-- ) - { - if( n == 0 ) - mbedtls_camellia_crypt_ecb( ctx, MBEDTLS_CAMELLIA_ENCRYPT, iv, iv ); - - iv[n] = *output++ = (unsigned char)( iv[n] ^ *input++ ); - - n = ( n + 1 ) & 0x0F; - } - } - - *iv_off = n; - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * Camellia-CTR buffer encryption/decryption - */ -int mbedtls_camellia_crypt_ctr( mbedtls_camellia_context *ctx, - size_t length, - size_t *nc_off, - unsigned char nonce_counter[16], - unsigned char stream_block[16], - const unsigned char *input, - unsigned char *output ) -{ - int c, i; - size_t n = *nc_off; - - while( length-- ) - { - if( n == 0 ) { - mbedtls_camellia_crypt_ecb( ctx, MBEDTLS_CAMELLIA_ENCRYPT, nonce_counter, - stream_block ); - - for( i = 16; i > 0; i-- ) - if( ++nonce_counter[i - 1] != 0 ) - break; - } - c = *input++; - *output++ = (unsigned char)( c ^ stream_block[n] ); - - n = ( n + 1 ) & 0x0F; - } - - *nc_off = n; - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CTR */ -#endif /* !MBEDTLS_CAMELLIA_ALT */ - -#if defined(MBEDTLS_SELF_TEST) - -/* - * Camellia test vectors from: - * - * http://info.isl.ntt.co.jp/crypt/eng/camellia/technology.html: - * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/cryptrec/intermediate.txt - * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/cryptrec/t_camellia.txt - * (For each bitlength: Key 0, Nr 39) - */ -#define CAMELLIA_TESTS_ECB 2 - -static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] = -{ - { - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, -}; - -static const unsigned char camellia_test_ecb_plain[CAMELLIA_TESTS_ECB][16] = -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, - { 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char camellia_test_ecb_cipher[3][CAMELLIA_TESTS_ECB][16] = -{ - { - { 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, - 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 }, - { 0x38, 0x3C, 0x6C, 0x2A, 0xAB, 0xEF, 0x7F, 0xDE, - 0x25, 0xCD, 0x47, 0x0B, 0xF7, 0x74, 0xA3, 0x31 } - }, - { - { 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, - 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 }, - { 0xD1, 0x76, 0x3F, 0xC0, 0x19, 0xD7, 0x7C, 0xC9, - 0x30, 0xBF, 0xF2, 0xA5, 0x6F, 0x7C, 0x93, 0x64 } - }, - { - { 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, - 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 }, - { 0x05, 0x03, 0xFB, 0x10, 0xAB, 0x24, 0x1E, 0x7C, - 0xF4, 0x5D, 0x8C, 0xDE, 0xEE, 0x47, 0x43, 0x35 } - } -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#define CAMELLIA_TESTS_CBC 3 - -static const unsigned char camellia_test_cbc_key[3][32] = -{ - { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, - 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } - , - { 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, - 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, - 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B } - , - { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, - 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, - 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, - 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 } -}; - -static const unsigned char camellia_test_cbc_iv[16] = - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } -; - -static const unsigned char camellia_test_cbc_plain[CAMELLIA_TESTS_CBC][16] = -{ - { 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, - 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A }, - { 0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C, - 0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51 }, - { 0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11, - 0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF } - -}; - -static const unsigned char camellia_test_cbc_cipher[3][CAMELLIA_TESTS_CBC][16] = -{ - { - { 0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0, - 0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB }, - { 0xA2, 0xF2, 0xCF, 0x67, 0x16, 0x29, 0xEF, 0x78, - 0x40, 0xC5, 0xA5, 0xDF, 0xB5, 0x07, 0x48, 0x87 }, - { 0x0F, 0x06, 0x16, 0x50, 0x08, 0xCF, 0x8B, 0x8B, - 0x5A, 0x63, 0x58, 0x63, 0x62, 0x54, 0x3E, 0x54 } - }, - { - { 0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2, - 0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 }, - { 0x5D, 0x5A, 0x86, 0x9B, 0xD1, 0x4C, 0xE5, 0x42, - 0x64, 0xF8, 0x92, 0xA6, 0xDD, 0x2E, 0xC3, 0xD5 }, - { 0x37, 0xD3, 0x59, 0xC3, 0x34, 0x98, 0x36, 0xD8, - 0x84, 0xE3, 0x10, 0xAD, 0xDF, 0x68, 0xC4, 0x49 } - }, - { - { 0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A, - 0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA }, - { 0x36, 0xCB, 0xEB, 0x73, 0xBD, 0x50, 0x4B, 0x40, - 0x70, 0xB1, 0xB7, 0xDE, 0x2B, 0x21, 0xEB, 0x50 }, - { 0xE3, 0x1A, 0x60, 0x55, 0x29, 0x7D, 0x96, 0xCA, - 0x33, 0x30, 0xCD, 0xF1, 0xB1, 0x86, 0x0A, 0x83 } - } -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * Camellia-CTR test vectors from: - * - * http://www.faqs.org/rfcs/rfc5528.html - */ - -static const unsigned char camellia_test_ctr_key[3][16] = -{ - { 0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC, - 0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E }, - { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7, - 0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63 }, - { 0x76, 0x91, 0xBE, 0x03, 0x5E, 0x50, 0x20, 0xA8, - 0xAC, 0x6E, 0x61, 0x85, 0x29, 0xF9, 0xA0, 0xDC } -}; - -static const unsigned char camellia_test_ctr_nonce_counter[3][16] = -{ - { 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0x6C, 0xB6, 0xDB, 0xC0, 0x54, 0x3B, 0x59, - 0xDA, 0x48, 0xD9, 0x0B, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0xE0, 0x01, 0x7B, 0x27, 0x77, 0x7F, 0x3F, - 0x4A, 0x17, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x01 } -}; - -static const unsigned char camellia_test_ctr_pt[3][48] = -{ - { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62, - 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, - 0x20, 0x21, 0x22, 0x23 } -}; - -static const unsigned char camellia_test_ctr_ct[3][48] = -{ - { 0xD0, 0x9D, 0xC2, 0x9A, 0x82, 0x14, 0x61, 0x9A, - 0x20, 0x87, 0x7C, 0x76, 0xDB, 0x1F, 0x0B, 0x3F }, - { 0xDB, 0xF3, 0xC7, 0x8D, 0xC0, 0x83, 0x96, 0xD4, - 0xDA, 0x7C, 0x90, 0x77, 0x65, 0xBB, 0xCB, 0x44, - 0x2B, 0x8E, 0x8E, 0x0F, 0x31, 0xF0, 0xDC, 0xA7, - 0x2C, 0x74, 0x17, 0xE3, 0x53, 0x60, 0xE0, 0x48 }, - { 0xB1, 0x9D, 0x1F, 0xCD, 0xCB, 0x75, 0xEB, 0x88, - 0x2F, 0x84, 0x9C, 0xE2, 0x4D, 0x85, 0xCF, 0x73, - 0x9C, 0xE6, 0x4B, 0x2B, 0x5C, 0x9D, 0x73, 0xF1, - 0x4F, 0x2D, 0x5D, 0x9D, 0xCE, 0x98, 0x89, 0xCD, - 0xDF, 0x50, 0x86, 0x96 } -}; - -static const int camellia_test_ctr_len[3] = - { 16, 32, 36 }; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -/* - * Checkup routine - */ -int mbedtls_camellia_self_test( int verbose ) -{ - int i, j, u, v; - unsigned char key[32]; - unsigned char buf[64]; - unsigned char src[16]; - unsigned char dst[16]; -#if defined(MBEDTLS_CIPHER_MODE_CBC) - unsigned char iv[16]; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - size_t offset, len; - unsigned char nonce_counter[16]; - unsigned char stream_block[16]; -#endif - - mbedtls_camellia_context ctx; - - memset( key, 0, 32 ); - - for( j = 0; j < 6; j++ ) { - u = j >> 1; - v = j & 1; - - if( verbose != 0 ) - mbedtls_printf( " CAMELLIA-ECB-%3d (%s): ", 128 + u * 64, - (v == MBEDTLS_CAMELLIA_DECRYPT) ? "dec" : "enc"); - - for( i = 0; i < CAMELLIA_TESTS_ECB; i++ ) { - memcpy( key, camellia_test_ecb_key[u][i], 16 + 8 * u ); - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) { - mbedtls_camellia_setkey_dec( &ctx, key, 128 + u * 64 ); - memcpy( src, camellia_test_ecb_cipher[u][i], 16 ); - memcpy( dst, camellia_test_ecb_plain[i], 16 ); - } else { /* MBEDTLS_CAMELLIA_ENCRYPT */ - mbedtls_camellia_setkey_enc( &ctx, key, 128 + u * 64 ); - memcpy( src, camellia_test_ecb_plain[i], 16 ); - memcpy( dst, camellia_test_ecb_cipher[u][i], 16 ); - } - - mbedtls_camellia_crypt_ecb( &ctx, v, src, buf ); - - if( memcmp( buf, dst, 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /* - * CBC mode - */ - for( j = 0; j < 6; j++ ) - { - u = j >> 1; - v = j & 1; - - if( verbose != 0 ) - mbedtls_printf( " CAMELLIA-CBC-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_CAMELLIA_DECRYPT ) ? "dec" : "enc" ); - - memcpy( src, camellia_test_cbc_iv, 16 ); - memcpy( dst, camellia_test_cbc_iv, 16 ); - memcpy( key, camellia_test_cbc_key[u], 16 + 8 * u ); - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) { - mbedtls_camellia_setkey_dec( &ctx, key, 128 + u * 64 ); - } else { - mbedtls_camellia_setkey_enc( &ctx, key, 128 + u * 64 ); - } - - for( i = 0; i < CAMELLIA_TESTS_CBC; i++ ) { - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) { - memcpy( iv , src, 16 ); - memcpy( src, camellia_test_cbc_cipher[u][i], 16 ); - memcpy( dst, camellia_test_cbc_plain[i], 16 ); - } else { /* MBEDTLS_CAMELLIA_ENCRYPT */ - memcpy( iv , dst, 16 ); - memcpy( src, camellia_test_cbc_plain[i], 16 ); - memcpy( dst, camellia_test_cbc_cipher[u][i], 16 ); - } - - mbedtls_camellia_crypt_cbc( &ctx, v, 16, iv, src, buf ); - - if( memcmp( buf, dst, 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CTR) - /* - * CTR mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " CAMELLIA-CTR-128 (%s): ", - ( v == MBEDTLS_CAMELLIA_DECRYPT ) ? "dec" : "enc" ); - - memcpy( nonce_counter, camellia_test_ctr_nonce_counter[u], 16 ); - memcpy( key, camellia_test_ctr_key[u], 16 ); - - offset = 0; - mbedtls_camellia_setkey_enc( &ctx, key, 128 ); - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) - { - len = camellia_test_ctr_len[u]; - memcpy( buf, camellia_test_ctr_ct[u], len ); - - mbedtls_camellia_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, camellia_test_ctr_pt[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - else - { - len = camellia_test_ctr_len[u]; - memcpy( buf, camellia_test_ctr_pt[u], len ); - - mbedtls_camellia_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, camellia_test_ctr_ct[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_CAMELLIA_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ccm.c b/build/premake/premake5/contrib/mbedtls/library/ccm.c deleted file mode 100644 index 3463a0b320..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ccm.c +++ /dev/null @@ -1,464 +0,0 @@ -/* - * NIST SP800-38C compliant CCM implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * Definition of CCM: - * http://csrc.nist.gov/publications/nistpubs/800-38C/SP800-38C_updated-July20_2007.pdf - * RFC 3610 "Counter with CBC-MAC (CCM)" - * - * Related: - * RFC 5116 "An Interface and Algorithms for Authenticated Encryption" - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_CCM_C) - -#include "mbedtls/ccm.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -#define CCM_ENCRYPT 0 -#define CCM_DECRYPT 1 - -/* - * Initialize context - */ -void mbedtls_ccm_init( mbedtls_ccm_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_ccm_context ) ); -} - -int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx, - mbedtls_cipher_id_t cipher, - const unsigned char *key, - unsigned int keybits ) -{ - int ret; - const mbedtls_cipher_info_t *cipher_info; - - cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, MBEDTLS_MODE_ECB ); - if( cipher_info == NULL ) - return( MBEDTLS_ERR_CCM_BAD_INPUT ); - - if( cipher_info->block_size != 16 ) - return( MBEDTLS_ERR_CCM_BAD_INPUT ); - - mbedtls_cipher_free( &ctx->cipher_ctx ); - - if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, - MBEDTLS_ENCRYPT ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} - -/* - * Free context - */ -void mbedtls_ccm_free( mbedtls_ccm_context *ctx ) -{ - mbedtls_cipher_free( &ctx->cipher_ctx ); - mbedtls_zeroize( ctx, sizeof( mbedtls_ccm_context ) ); -} - -/* - * Macros for common operations. - * Results in smaller compiled code than static inline functions. - */ - -/* - * Update the CBC-MAC state in y using a block in b - * (Always using b as the source helps the compiler optimise a bit better.) - */ -#define UPDATE_CBC_MAC \ - for( i = 0; i < 16; i++ ) \ - y[i] ^= b[i]; \ - \ - if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, y, 16, y, &olen ) ) != 0 ) \ - return( ret ); - -/* - * Encrypt or decrypt a partial block with CTR - * Warning: using b for temporary storage! src and dst must not be b! - * This avoids allocating one more 16 bytes buffer while allowing src == dst. - */ -#define CTR_CRYPT( dst, src, len ) \ - if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctr, 16, b, &olen ) ) != 0 ) \ - return( ret ); \ - \ - for( i = 0; i < len; i++ ) \ - dst[i] = src[i] ^ b[i]; - -/* - * Authenticated encryption or decryption - */ -static int ccm_auth_crypt( mbedtls_ccm_context *ctx, int mode, size_t length, - const unsigned char *iv, size_t iv_len, - const unsigned char *add, size_t add_len, - const unsigned char *input, unsigned char *output, - unsigned char *tag, size_t tag_len ) -{ - int ret; - unsigned char i; - unsigned char q; - size_t len_left, olen; - unsigned char b[16]; - unsigned char y[16]; - unsigned char ctr[16]; - const unsigned char *src; - unsigned char *dst; - - /* - * Check length requirements: SP800-38C A.1 - * Additional requirement: a < 2^16 - 2^8 to simplify the code. - * 'length' checked later (when writing it to the first block) - */ - if( tag_len < 4 || tag_len > 16 || tag_len % 2 != 0 ) - return( MBEDTLS_ERR_CCM_BAD_INPUT ); - - /* Also implies q is within bounds */ - if( iv_len < 7 || iv_len > 13 ) - return( MBEDTLS_ERR_CCM_BAD_INPUT ); - - if( add_len > 0xFF00 ) - return( MBEDTLS_ERR_CCM_BAD_INPUT ); - - q = 16 - 1 - (unsigned char) iv_len; - - /* - * First block B_0: - * 0 .. 0 flags - * 1 .. iv_len nonce (aka iv) - * iv_len+1 .. 15 length - * - * With flags as (bits): - * 7 0 - * 6 add present? - * 5 .. 3 (t - 2) / 2 - * 2 .. 0 q - 1 - */ - b[0] = 0; - b[0] |= ( add_len > 0 ) << 6; - b[0] |= ( ( tag_len - 2 ) / 2 ) << 3; - b[0] |= q - 1; - - memcpy( b + 1, iv, iv_len ); - - for( i = 0, len_left = length; i < q; i++, len_left >>= 8 ) - b[15-i] = (unsigned char)( len_left & 0xFF ); - - if( len_left > 0 ) - return( MBEDTLS_ERR_CCM_BAD_INPUT ); - - - /* Start CBC-MAC with first block */ - memset( y, 0, 16 ); - UPDATE_CBC_MAC; - - /* - * If there is additional data, update CBC-MAC with - * add_len, add, 0 (padding to a block boundary) - */ - if( add_len > 0 ) - { - size_t use_len; - len_left = add_len; - src = add; - - memset( b, 0, 16 ); - b[0] = (unsigned char)( ( add_len >> 8 ) & 0xFF ); - b[1] = (unsigned char)( ( add_len ) & 0xFF ); - - use_len = len_left < 16 - 2 ? len_left : 16 - 2; - memcpy( b + 2, src, use_len ); - len_left -= use_len; - src += use_len; - - UPDATE_CBC_MAC; - - while( len_left > 0 ) - { - use_len = len_left > 16 ? 16 : len_left; - - memset( b, 0, 16 ); - memcpy( b, src, use_len ); - UPDATE_CBC_MAC; - - len_left -= use_len; - src += use_len; - } - } - - /* - * Prepare counter block for encryption: - * 0 .. 0 flags - * 1 .. iv_len nonce (aka iv) - * iv_len+1 .. 15 counter (initially 1) - * - * With flags as (bits): - * 7 .. 3 0 - * 2 .. 0 q - 1 - */ - ctr[0] = q - 1; - memcpy( ctr + 1, iv, iv_len ); - memset( ctr + 1 + iv_len, 0, q ); - ctr[15] = 1; - - /* - * Authenticate and {en,de}crypt the message. - * - * The only difference between encryption and decryption is - * the respective order of authentication and {en,de}cryption. - */ - len_left = length; - src = input; - dst = output; - - while( len_left > 0 ) - { - size_t use_len = len_left > 16 ? 16 : len_left; - - if( mode == CCM_ENCRYPT ) - { - memset( b, 0, 16 ); - memcpy( b, src, use_len ); - UPDATE_CBC_MAC; - } - - CTR_CRYPT( dst, src, use_len ); - - if( mode == CCM_DECRYPT ) - { - memset( b, 0, 16 ); - memcpy( b, dst, use_len ); - UPDATE_CBC_MAC; - } - - dst += use_len; - src += use_len; - len_left -= use_len; - - /* - * Increment counter. - * No need to check for overflow thanks to the length check above. - */ - for( i = 0; i < q; i++ ) - if( ++ctr[15-i] != 0 ) - break; - } - - /* - * Authentication: reset counter and crypt/mask internal tag - */ - for( i = 0; i < q; i++ ) - ctr[15-i] = 0; - - CTR_CRYPT( y, y, 16 ); - memcpy( tag, y, tag_len ); - - return( 0 ); -} - -/* - * Authenticated encryption - */ -int mbedtls_ccm_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length, - const unsigned char *iv, size_t iv_len, - const unsigned char *add, size_t add_len, - const unsigned char *input, unsigned char *output, - unsigned char *tag, size_t tag_len ) -{ - return( ccm_auth_crypt( ctx, CCM_ENCRYPT, length, iv, iv_len, - add, add_len, input, output, tag, tag_len ) ); -} - -/* - * Authenticated decryption - */ -int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length, - const unsigned char *iv, size_t iv_len, - const unsigned char *add, size_t add_len, - const unsigned char *input, unsigned char *output, - const unsigned char *tag, size_t tag_len ) -{ - int ret; - unsigned char check_tag[16]; - unsigned char i; - int diff; - - if( ( ret = ccm_auth_crypt( ctx, CCM_DECRYPT, length, - iv, iv_len, add, add_len, - input, output, check_tag, tag_len ) ) != 0 ) - { - return( ret ); - } - - /* Check tag in "constant-time" */ - for( diff = 0, i = 0; i < tag_len; i++ ) - diff |= tag[i] ^ check_tag[i]; - - if( diff != 0 ) - { - mbedtls_zeroize( output, length ); - return( MBEDTLS_ERR_CCM_AUTH_FAILED ); - } - - return( 0 ); -} - - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -/* - * Examples 1 to 3 from SP800-38C Appendix C - */ - -#define NB_TESTS 3 - -/* - * The data is the same for all tests, only the used length changes - */ -static const unsigned char key[] = { - 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f -}; - -static const unsigned char iv[] = { - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b -}; - -static const unsigned char ad[] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13 -}; - -static const unsigned char msg[] = { - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, -}; - -static const size_t iv_len [NB_TESTS] = { 7, 8, 12 }; -static const size_t add_len[NB_TESTS] = { 8, 16, 20 }; -static const size_t msg_len[NB_TESTS] = { 4, 16, 24 }; -static const size_t tag_len[NB_TESTS] = { 4, 6, 8 }; - -static const unsigned char res[NB_TESTS][32] = { - { 0x71, 0x62, 0x01, 0x5b, 0x4d, 0xac, 0x25, 0x5d }, - { 0xd2, 0xa1, 0xf0, 0xe0, 0x51, 0xea, 0x5f, 0x62, - 0x08, 0x1a, 0x77, 0x92, 0x07, 0x3d, 0x59, 0x3d, - 0x1f, 0xc6, 0x4f, 0xbf, 0xac, 0xcd }, - { 0xe3, 0xb2, 0x01, 0xa9, 0xf5, 0xb7, 0x1a, 0x7a, - 0x9b, 0x1c, 0xea, 0xec, 0xcd, 0x97, 0xe7, 0x0b, - 0x61, 0x76, 0xaa, 0xd9, 0xa4, 0x42, 0x8a, 0xa5, - 0x48, 0x43, 0x92, 0xfb, 0xc1, 0xb0, 0x99, 0x51 } -}; - -int mbedtls_ccm_self_test( int verbose ) -{ - mbedtls_ccm_context ctx; - unsigned char out[32]; - size_t i; - int ret; - - mbedtls_ccm_init( &ctx ); - - if( mbedtls_ccm_setkey( &ctx, MBEDTLS_CIPHER_ID_AES, key, 8 * sizeof key ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( " CCM: setup failed" ); - - return( 1 ); - } - - for( i = 0; i < NB_TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " CCM-AES #%u: ", (unsigned int) i + 1 ); - - ret = mbedtls_ccm_encrypt_and_tag( &ctx, msg_len[i], - iv, iv_len[i], ad, add_len[i], - msg, out, - out + msg_len[i], tag_len[i] ); - - if( ret != 0 || - memcmp( out, res[i], msg_len[i] + tag_len[i] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len[i], - iv, iv_len[i], ad, add_len[i], - res[i], out, - res[i] + msg_len[i], tag_len[i] ); - - if( ret != 0 || - memcmp( out, msg, msg_len[i] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - mbedtls_ccm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - -#endif /* MBEDTLS_CCM_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/certs.c b/build/premake/premake5/contrib/mbedtls/library/certs.c deleted file mode 100644 index ffe6bc981c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/certs.c +++ /dev/null @@ -1,351 +0,0 @@ -/* - * X.509 test certificates - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "mbedtls/certs.h" - -#if defined(MBEDTLS_CERTS_C) - -#if defined(MBEDTLS_ECDSA_C) -#define TEST_CA_CRT_EC \ -"-----BEGIN CERTIFICATE-----\r\n" \ -"MIICUjCCAdegAwIBAgIJAMFD4n5iQ8zoMAoGCCqGSM49BAMCMD4xCzAJBgNVBAYT\r\n" \ -"Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF\r\n" \ -"QyBDQTAeFw0xMzA5MjQxNTQ5NDhaFw0yMzA5MjIxNTQ5NDhaMD4xCzAJBgNVBAYT\r\n" \ -"Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF\r\n" \ -"QyBDQTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMPaKzRBN1gvh1b+/Im6KUNLTuBu\r\n" \ -"ww5XUzM5WNRStJGVOQsj318XJGJI/BqVKc4sLYfCiFKAr9ZqqyHduNMcbli4yuiy\r\n" \ -"aY7zQa0pw7RfdadHb9UZKVVpmlM7ILRmFmAzHqOBoDCBnTAdBgNVHQ4EFgQUnW0g\r\n" \ -"JEkBPyvLeLUZvH4kydv7NnwwbgYDVR0jBGcwZYAUnW0gJEkBPyvLeLUZvH4kydv7\r\n" \ -"NnyhQqRAMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UE\r\n" \ -"AxMTUG9sYXJzc2wgVGVzdCBFQyBDQYIJAMFD4n5iQ8zoMAwGA1UdEwQFMAMBAf8w\r\n" \ -"CgYIKoZIzj0EAwIDaQAwZgIxAMO0YnNWKJUAfXgSJtJxexn4ipg+kv4znuR50v56\r\n" \ -"t4d0PCu412mUC6Nnd7izvtE2MgIxAP1nnJQjZ8BWukszFQDG48wxCCyci9qpdSMv\r\n" \ -"uCjn8pwUOkABXK8Mss90fzCfCEOtIA==\r\n" \ -"-----END CERTIFICATE-----\r\n" -const char mbedtls_test_ca_crt_ec[] = TEST_CA_CRT_EC; - -const char mbedtls_test_ca_key_ec[] = -"-----BEGIN EC PRIVATE KEY-----\r\n" -"Proc-Type: 4,ENCRYPTED\r\n" -"DEK-Info: DES-EDE3-CBC,307EAB469933D64E\r\n" -"\r\n" -"IxbrRmKcAzctJqPdTQLA4SWyBYYGYJVkYEna+F7Pa5t5Yg/gKADrFKcm6B72e7DG\r\n" -"ihExtZI648s0zdYw6qSJ74vrPSuWDe5qm93BqsfVH9svtCzWHW0pm1p0KTBCFfUq\r\n" -"UsuWTITwJImcnlAs1gaRZ3sAWm7cOUidL0fo2G0fYUFNcYoCSLffCFTEHBuPnagb\r\n" -"a77x/sY1Bvii8S9/XhDTb6pTMx06wzrm\r\n" -"-----END EC PRIVATE KEY-----\r\n"; - -const char mbedtls_test_ca_pwd_ec[] = "PolarSSLTest"; - -const char mbedtls_test_srv_crt_ec[] = -"-----BEGIN CERTIFICATE-----\r\n" -"MIICHzCCAaWgAwIBAgIBCTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8G\r\n" -"A1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EwHhcN\r\n" -"MTMwOTI0MTU1MjA0WhcNMjMwOTIyMTU1MjA0WjA0MQswCQYDVQQGEwJOTDERMA8G\r\n" -"A1UEChMIUG9sYXJTU0wxEjAQBgNVBAMTCWxvY2FsaG9zdDBZMBMGByqGSM49AgEG\r\n" -"CCqGSM49AwEHA0IABDfMVtl2CR5acj7HWS3/IG7ufPkGkXTQrRS192giWWKSTuUA\r\n" -"2CMR/+ov0jRdXRa9iojCa3cNVc2KKg76Aci07f+jgZ0wgZowCQYDVR0TBAIwADAd\r\n" -"BgNVHQ4EFgQUUGGlj9QH2deCAQzlZX+MY0anE74wbgYDVR0jBGcwZYAUnW0gJEkB\r\n" -"PyvLeLUZvH4kydv7NnyhQqRAMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xh\r\n" -"clNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBFQyBDQYIJAMFD4n5iQ8zoMAoG\r\n" -"CCqGSM49BAMCA2gAMGUCMQCaLFzXptui5WQN8LlO3ddh1hMxx6tzgLvT03MTVK2S\r\n" -"C12r0Lz3ri/moSEpNZWqPjkCMCE2f53GXcYLqyfyJR078c/xNSUU5+Xxl7VZ414V\r\n" -"fGa5kHvHARBPc8YAIVIqDvHH1Q==\r\n" -"-----END CERTIFICATE-----\r\n"; - -const char mbedtls_test_srv_key_ec[] = -"-----BEGIN EC PRIVATE KEY-----\r\n" -"MHcCAQEEIPEqEyB2AnCoPL/9U/YDHvdqXYbIogTywwyp6/UfDw6noAoGCCqGSM49\r\n" -"AwEHoUQDQgAEN8xW2XYJHlpyPsdZLf8gbu58+QaRdNCtFLX3aCJZYpJO5QDYIxH/\r\n" -"6i/SNF1dFr2KiMJrdw1VzYoqDvoByLTt/w==\r\n" -"-----END EC PRIVATE KEY-----\r\n"; - -const char mbedtls_test_cli_crt_ec[] = -"-----BEGIN CERTIFICATE-----\r\n" -"MIICLDCCAbKgAwIBAgIBDTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8G\r\n" -"A1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EwHhcN\r\n" -"MTMwOTI0MTU1MjA0WhcNMjMwOTIyMTU1MjA0WjBBMQswCQYDVQQGEwJOTDERMA8G\r\n" -"A1UEChMIUG9sYXJTU0wxHzAdBgNVBAMTFlBvbGFyU1NMIFRlc3QgQ2xpZW50IDIw\r\n" -"WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARX5a6xc9/TrLuTuIH/Eq7u5lOszlVT\r\n" -"9jQOzC7jYyUL35ji81xgNpbA1RgUcOV/n9VLRRjlsGzVXPiWj4dwo+THo4GdMIGa\r\n" -"MAkGA1UdEwQCMAAwHQYDVR0OBBYEFHoAX4Zk/OBd5REQO7LmO8QmP8/iMG4GA1Ud\r\n" -"IwRnMGWAFJ1tICRJAT8ry3i1Gbx+JMnb+zZ8oUKkQDA+MQswCQYDVQQGEwJOTDER\r\n" -"MA8GA1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0GC\r\n" -"CQDBQ+J+YkPM6DAKBggqhkjOPQQDAgNoADBlAjBKZQ17IIOimbmoD/yN7o89u3BM\r\n" -"lgOsjnhw3fIOoLIWy2WOGsk/LGF++DzvrRzuNiACMQCd8iem1XS4JK7haj8xocpU\r\n" -"LwjQje5PDGHfd3h9tP38Qknu5bJqws0md2KOKHyeV0U=\r\n" -"-----END CERTIFICATE-----\r\n"; - -const char mbedtls_test_cli_key_ec[] = -"-----BEGIN EC PRIVATE KEY-----\r\n" -"MHcCAQEEIPb3hmTxZ3/mZI3vyk7p3U3wBf+WIop6hDhkFzJhmLcqoAoGCCqGSM49\r\n" -"AwEHoUQDQgAEV+WusXPf06y7k7iB/xKu7uZTrM5VU/Y0Dswu42MlC9+Y4vNcYDaW\r\n" -"wNUYFHDlf5/VS0UY5bBs1Vz4lo+HcKPkxw==\r\n" -"-----END EC PRIVATE KEY-----\r\n"; - -const size_t mbedtls_test_ca_crt_ec_len = sizeof( mbedtls_test_ca_crt_ec ); -const size_t mbedtls_test_ca_key_ec_len = sizeof( mbedtls_test_ca_key_ec ); -const size_t mbedtls_test_ca_pwd_ec_len = sizeof( mbedtls_test_ca_pwd_ec ) - 1; -const size_t mbedtls_test_srv_crt_ec_len = sizeof( mbedtls_test_srv_crt_ec ); -const size_t mbedtls_test_srv_key_ec_len = sizeof( mbedtls_test_srv_key_ec ); -const size_t mbedtls_test_cli_crt_ec_len = sizeof( mbedtls_test_cli_crt_ec ); -const size_t mbedtls_test_cli_key_ec_len = sizeof( mbedtls_test_cli_key_ec ); -#else -#define TEST_CA_CRT_EC -#endif /* MBEDTLS_ECDSA_C */ - -#if defined(MBEDTLS_RSA_C) -#define TEST_CA_CRT_RSA \ -"-----BEGIN CERTIFICATE-----\r\n" \ -"MIIDhzCCAm+gAwIBAgIBADANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER\r\n" \ -"MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n" \ -"MTEwMjEyMTQ0NDAwWhcNMjEwMjEyMTQ0NDAwWjA7MQswCQYDVQQGEwJOTDERMA8G\r\n" \ -"A1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwggEiMA0G\r\n" \ -"CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA3zf8F7vglp0/ht6WMn1EpRagzSHx\r\n" \ -"mdTs6st8GFgIlKXsm8WL3xoemTiZhx57wI053zhdcHgH057Zk+i5clHFzqMwUqny\r\n" \ -"50BwFMtEonILwuVA+T7lpg6z+exKY8C4KQB0nFc7qKUEkHHxvYPZP9al4jwqj+8n\r\n" \ -"YMPGn8u67GB9t+aEMr5P+1gmIgNb1LTV+/Xjli5wwOQuvfwu7uJBVcA0Ln0kcmnL\r\n" \ -"R7EUQIN9Z/SG9jGr8XmksrUuEvmEF/Bibyc+E1ixVA0hmnM3oTDPb5Lc9un8rNsu\r\n" \ -"KNF+AksjoBXyOGVkCeoMbo4bF6BxyLObyavpw/LPh5aPgAIynplYb6LVAgMBAAGj\r\n" \ -"gZUwgZIwDAYDVR0TBAUwAwEB/zAdBgNVHQ4EFgQUtFrkpbPe0lL2udWmlQ/rPrzH\r\n" \ -"/f8wYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/rPrzH/f+hP6Q9MDsxCzAJBgNV\r\n" \ -"BAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVz\r\n" \ -"dCBDQYIBADANBgkqhkiG9w0BAQUFAAOCAQEAuP1U2ABUkIslsCfdlc2i94QHHYeJ\r\n" \ -"SsR4EdgHtdciUI5I62J6Mom+Y0dT/7a+8S6MVMCZP6C5NyNyXw1GWY/YR82XTJ8H\r\n" \ -"DBJiCTok5DbZ6SzaONBzdWHXwWwmi5vg1dxn7YxrM9d0IjxM27WNKs4sDQhZBQkF\r\n" \ -"pjmfs2cb4oPl4Y9T9meTx/lvdkRYEug61Jfn6cA+qHpyPYdTH+UshITnmp5/Ztkf\r\n" \ -"m/UTSLBNFNHesiTZeH31NcxYGdHSme9Nc/gfidRa0FLOCfWxRlFqAI47zG9jAQCZ\r\n" \ -"7Z2mCGDNMhjQc+BYcdnl0lPXjdDK6V0qCg1dVewhUBcW5gZKzV7e9+DpVA==\r\n" \ -"-----END CERTIFICATE-----\r\n" -const char mbedtls_test_ca_crt_rsa[] = TEST_CA_CRT_RSA; - -const char mbedtls_test_ca_key_rsa[] = -"-----BEGIN RSA PRIVATE KEY-----\r\n" -"Proc-Type: 4,ENCRYPTED\r\n" -"DEK-Info: DES-EDE3-CBC,A8A95B05D5B7206B\r\n" -"\r\n" -"9Qd9GeArejl1GDVh2lLV1bHt0cPtfbh5h/5zVpAVaFpqtSPMrElp50Rntn9et+JA\r\n" -"7VOyboR+Iy2t/HU4WvA687k3Bppe9GwKHjHhtl//8xFKwZr3Xb5yO5JUP8AUctQq\r\n" -"Nb8CLlZyuUC+52REAAthdWgsX+7dJO4yabzUcQ22Tp9JSD0hiL43BlkWYUNK3dAo\r\n" -"PZlmiptjnzVTjg1MxsBSydZinWOLBV8/JQgxSPo2yD4uEfig28qbvQ2wNIn0pnAb\r\n" -"GxnSAOazkongEGfvcjIIs+LZN9gXFhxcOh6kc4Q/c99B7QWETwLLkYgZ+z1a9VY9\r\n" -"gEU7CwCxYCD+h9hY6FPmsK0/lC4O7aeRKpYq00rPPxs6i7phiexg6ax6yTMmArQq\r\n" -"QmK3TAsJm8V/J5AWpLEV6jAFgRGymGGHnof0DXzVWZidrcZJWTNuGEX90nB3ee2w\r\n" -"PXJEFWKoD3K3aFcSLdHYr3mLGxP7H9ThQai9VsycxZKS5kwvBKQ//YMrmFfwPk8x\r\n" -"vTeY4KZMaUrveEel5tWZC94RSMKgxR6cyE1nBXyTQnDOGbfpNNgBKxyKbINWoOJU\r\n" -"WJZAwlsQn+QzCDwpri7+sV1mS3gBE6UY7aQmnmiiaC2V3Hbphxct/en5QsfDOt1X\r\n" -"JczSfpRWLlbPznZg8OQh/VgCMA58N5DjOzTIK7sJJ5r+94ZBTCpgAMbF588f0NTR\r\n" -"KCe4yrxGJR7X02M4nvD4IwOlpsQ8xQxZtOSgXv4LkxvdU9XJJKWZ/XNKJeWztxSe\r\n" -"Z1vdTc2YfsDBA2SEv33vxHx2g1vqtw8SjDRT2RaQSS0QuSaMJimdOX6mTOCBKk1J\r\n" -"9Q5mXTrER+/LnK0jEmXsBXWA5bqqVZIyahXSx4VYZ7l7w/PHiUDtDgyRhMMKi4n2\r\n" -"iQvQcWSQTjrpnlJbca1/DkpRt3YwrvJwdqb8asZU2VrNETh5x0QVefDRLFiVpif/\r\n" -"tUaeAe/P1F8OkS7OIZDs1SUbv/sD2vMbhNkUoCms3/PvNtdnvgL4F0zhaDpKCmlT\r\n" -"P8vx49E7v5CyRNmED9zZg4o3wmMqrQO93PtTug3Eu9oVx1zPQM1NVMyBa2+f29DL\r\n" -"1nuTCeXdo9+ni45xx+jAI4DCwrRdhJ9uzZyC6962H37H6D+5naNvClFR1s6li1Gb\r\n" -"nqPoiy/OBsEx9CaDGcqQBp5Wme/3XW+6z1ISOx+igwNTVCT14mHdBMbya0eIKft5\r\n" -"X+GnwtgEMyCYyyWuUct8g4RzErcY9+yW9Om5Hzpx4zOuW4NPZgPDTgK+t2RSL/Yq\r\n" -"rE1njrgeGYcVeG3f+OftH4s6fPbq7t1A5ZgUscbLMBqr9tK+OqygR4EgKBPsH6Cz\r\n" -"L6zlv/2RV0qAHvVuDJcIDIgwY5rJtINEm32rhOeFNJwZS5MNIC1czXZx5//ugX7l\r\n" -"I4sy5nbVhwSjtAk8Xg5dZbdTZ6mIrb7xqH+fdakZor1khG7bC2uIwibD3cSl2XkR\r\n" -"wN48lslbHnqqagr6Xm1nNOSVl8C/6kbJEsMpLhAezfRtGwvOucoaE+WbeUNolGde\r\n" -"P/eQiddSf0brnpiLJRh7qZrl9XuqYdpUqnoEdMAfotDOID8OtV7gt8a48ad8VPW2\r\n" -"-----END RSA PRIVATE KEY-----\r\n"; - -const char mbedtls_test_ca_pwd_rsa[] = "PolarSSLTest"; - -const char mbedtls_test_srv_crt_rsa[] = -"-----BEGIN CERTIFICATE-----\r\n" -"MIIDNzCCAh+gAwIBAgIBAjANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER\r\n" -"MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n" -"MTEwMjEyMTQ0NDA2WhcNMjEwMjEyMTQ0NDA2WjA0MQswCQYDVQQGEwJOTDERMA8G\r\n" -"A1UEChMIUG9sYXJTU0wxEjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcN\r\n" -"AQEBBQADggEPADCCAQoCggEBAMFNo93nzR3RBNdJcriZrA545Do8Ss86ExbQWuTN\r\n" -"owCIp+4ea5anUrSQ7y1yej4kmvy2NKwk9XfgJmSMnLAofaHa6ozmyRyWvP7BBFKz\r\n" -"NtSj+uGxdtiQwWG0ZlI2oiZTqqt0Xgd9GYLbKtgfoNkNHC1JZvdbJXNG6AuKT2kM\r\n" -"tQCQ4dqCEGZ9rlQri2V5kaHiYcPNQEkI7mgM8YuG0ka/0LiqEQMef1aoGh5EGA8P\r\n" -"hYvai0Re4hjGYi/HZo36Xdh98yeJKQHFkA4/J/EwyEoO79bex8cna8cFPXrEAjya\r\n" -"HT4P6DSYW8tzS1KW2BGiLICIaTla0w+w3lkvEcf36hIBMJcCAwEAAaNNMEswCQYD\r\n" -"VR0TBAIwADAdBgNVHQ4EFgQUpQXoZLjc32APUBJNYKhkr02LQ5MwHwYDVR0jBBgw\r\n" -"FoAUtFrkpbPe0lL2udWmlQ/rPrzH/f8wDQYJKoZIhvcNAQEFBQADggEBAJxnXClY\r\n" -"oHkbp70cqBrsGXLybA74czbO5RdLEgFs7rHVS9r+c293luS/KdliLScZqAzYVylw\r\n" -"UfRWvKMoWhHYKp3dEIS4xTXk6/5zXxhv9Rw8SGc8qn6vITHk1S1mPevtekgasY5Y\r\n" -"iWQuM3h4YVlRH3HHEMAD1TnAexfXHHDFQGe+Bd1iAbz1/sH9H8l4StwX6egvTK3M\r\n" -"wXRwkKkvjKaEDA9ATbZx0mI8LGsxSuCqe9r9dyjmttd47J1p1Rulz3CLzaRcVIuS\r\n" -"RRQfaD8neM9c1S/iJ/amTVqJxA1KOdOS5780WhPfSArA+g4qAmSjelc3p4wWpha8\r\n" -"zhuYwjVuX6JHG0c=\r\n" -"-----END CERTIFICATE-----\r\n"; - -const char mbedtls_test_srv_key_rsa[] = -"-----BEGIN RSA PRIVATE KEY-----\r\n" -"MIIEpAIBAAKCAQEAwU2j3efNHdEE10lyuJmsDnjkOjxKzzoTFtBa5M2jAIin7h5r\r\n" -"lqdStJDvLXJ6PiSa/LY0rCT1d+AmZIycsCh9odrqjObJHJa8/sEEUrM21KP64bF2\r\n" -"2JDBYbRmUjaiJlOqq3ReB30Zgtsq2B+g2Q0cLUlm91slc0boC4pPaQy1AJDh2oIQ\r\n" -"Zn2uVCuLZXmRoeJhw81ASQjuaAzxi4bSRr/QuKoRAx5/VqgaHkQYDw+Fi9qLRF7i\r\n" -"GMZiL8dmjfpd2H3zJ4kpAcWQDj8n8TDISg7v1t7HxydrxwU9esQCPJodPg/oNJhb\r\n" -"y3NLUpbYEaIsgIhpOVrTD7DeWS8Rx/fqEgEwlwIDAQABAoIBAQCXR0S8EIHFGORZ\r\n" -"++AtOg6eENxD+xVs0f1IeGz57Tjo3QnXX7VBZNdj+p1ECvhCE/G7XnkgU5hLZX+G\r\n" -"Z0jkz/tqJOI0vRSdLBbipHnWouyBQ4e/A1yIJdlBtqXxJ1KE/ituHRbNc4j4kL8Z\r\n" -"/r6pvwnTI0PSx2Eqs048YdS92LT6qAv4flbNDxMn2uY7s4ycS4Q8w1JXnCeaAnYm\r\n" -"WYI5wxO+bvRELR2Mcz5DmVnL8jRyml6l6582bSv5oufReFIbyPZbQWlXgYnpu6He\r\n" -"GTc7E1zKYQGG/9+DQUl/1vQuCPqQwny0tQoX2w5tdYpdMdVm+zkLtbajzdTviJJa\r\n" -"TWzL6lt5AoGBAN86+SVeJDcmQJcv4Eq6UhtRr4QGMiQMz0Sod6ettYxYzMgxtw28\r\n" -"CIrgpozCc+UaZJLo7UxvC6an85r1b2nKPCLQFaggJ0H4Q0J/sZOhBIXaoBzWxveK\r\n" -"nupceKdVxGsFi8CDy86DBfiyFivfBj+47BbaQzPBj7C4rK7UlLjab2rDAoGBAN2u\r\n" -"AM2gchoFiu4v1HFL8D7lweEpi6ZnMJjnEu/dEgGQJFjwdpLnPbsj4c75odQ4Gz8g\r\n" -"sw9lao9VVzbusoRE/JGI4aTdO0pATXyG7eG1Qu+5Yc1YGXcCrliA2xM9xx+d7f+s\r\n" -"mPzN+WIEg5GJDYZDjAzHG5BNvi/FfM1C9dOtjv2dAoGAF0t5KmwbjWHBhcVqO4Ic\r\n" -"BVvN3BIlc1ue2YRXEDlxY5b0r8N4XceMgKmW18OHApZxfl8uPDauWZLXOgl4uepv\r\n" -"whZC3EuWrSyyICNhLY21Ah7hbIEBPF3L3ZsOwC+UErL+dXWLdB56Jgy3gZaBeW7b\r\n" -"vDrEnocJbqCm7IukhXHOBK8CgYEAwqdHB0hqyNSzIOGY7v9abzB6pUdA3BZiQvEs\r\n" -"3LjHVd4HPJ2x0N8CgrBIWOE0q8+0hSMmeE96WW/7jD3fPWwCR5zlXknxBQsfv0gP\r\n" -"3BC5PR0Qdypz+d+9zfMf625kyit4T/hzwhDveZUzHnk1Cf+IG7Q+TOEnLnWAWBED\r\n" -"ISOWmrUCgYAFEmRxgwAc/u+D6t0syCwAYh6POtscq9Y0i9GyWk89NzgC4NdwwbBH\r\n" -"4AgahOxIxXx2gxJnq3yfkJfIjwf0s2DyP0kY2y6Ua1OeomPeY9mrIS4tCuDQ6LrE\r\n" -"TB6l9VGoxJL4fyHnZb8L5gGvnB1bbD8cL6YPaDiOhcRseC9vBiEuVg==\r\n" -"-----END RSA PRIVATE KEY-----\r\n"; - -const char mbedtls_test_cli_crt_rsa[] = -"-----BEGIN CERTIFICATE-----\r\n" -"MIIDPzCCAiegAwIBAgIBBDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER\r\n" -"MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN\r\n" -"MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA8MQswCQYDVQQGEwJOTDERMA8G\r\n" -"A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENsaWVudCAyMIIBIjAN\r\n" -"BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyHTEzLn5tXnpRdkUYLB9u5Pyax6f\r\n" -"M60Nj4o8VmXl3ETZzGaFB9X4J7BKNdBjngpuG7fa8H6r7gwQk4ZJGDTzqCrSV/Uu\r\n" -"1C93KYRhTYJQj6eVSHD1bk2y1RPD0hrt5kPqQhTrdOrA7R/UV06p86jt0uDBMHEw\r\n" -"MjDV0/YI0FZPRo7yX/k9Z5GIMC5Cst99++UMd//sMcB4j7/Cf8qtbCHWjdmLao5v\r\n" -"4Jv4EFbMs44TFeY0BGbH7vk2DmqV9gmaBmf0ZXH4yqSxJeD+PIs1BGe64E92hfx/\r\n" -"/DZrtenNLQNiTrM9AM+vdqBpVoNq0qjU51Bx5rU2BXcFbXvI5MT9TNUhXwIDAQAB\r\n" -"o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBRxoQBzckAvVHZeM/xSj7zx3WtGITAf\r\n" -"BgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQUFAAOC\r\n" -"AQEAAn86isAM8X+mVwJqeItt6E9slhEQbAofyk+diH1Lh8Y9iLlWQSKbw/UXYjx5\r\n" -"LLPZcniovxIcARC/BjyZR9g3UwTHNGNm+rwrqa15viuNOFBchykX/Orsk02EH7NR\r\n" -"Alw5WLPorYjED6cdVQgBl9ot93HdJogRiXCxErM7NC8/eP511mjq+uLDjLKH8ZPQ\r\n" -"8I4ekHJnroLsDkIwXKGIsvIBHQy2ac/NwHLCQOK6mfum1pRx52V4Utu5dLLjD5bM\r\n" -"xOBC7KU4xZKuMXXZM6/93Yb51K/J4ahf1TxJlTWXtnzDr9saEYdNy2SKY/6ZiDNH\r\n" -"D+stpAKiQLAWaAusIWKYEyw9MQ==\r\n" -"-----END CERTIFICATE-----\r\n"; - -const char mbedtls_test_cli_key_rsa[] = -"-----BEGIN RSA PRIVATE KEY-----\r\n" -"MIIEpAIBAAKCAQEAyHTEzLn5tXnpRdkUYLB9u5Pyax6fM60Nj4o8VmXl3ETZzGaF\r\n" -"B9X4J7BKNdBjngpuG7fa8H6r7gwQk4ZJGDTzqCrSV/Uu1C93KYRhTYJQj6eVSHD1\r\n" -"bk2y1RPD0hrt5kPqQhTrdOrA7R/UV06p86jt0uDBMHEwMjDV0/YI0FZPRo7yX/k9\r\n" -"Z5GIMC5Cst99++UMd//sMcB4j7/Cf8qtbCHWjdmLao5v4Jv4EFbMs44TFeY0BGbH\r\n" -"7vk2DmqV9gmaBmf0ZXH4yqSxJeD+PIs1BGe64E92hfx//DZrtenNLQNiTrM9AM+v\r\n" -"dqBpVoNq0qjU51Bx5rU2BXcFbXvI5MT9TNUhXwIDAQABAoIBAGdNtfYDiap6bzst\r\n" -"yhCiI8m9TtrhZw4MisaEaN/ll3XSjaOG2dvV6xMZCMV+5TeXDHOAZnY18Yi18vzz\r\n" -"4Ut2TnNFzizCECYNaA2fST3WgInnxUkV3YXAyP6CNxJaCmv2aA0yFr2kFVSeaKGt\r\n" -"ymvljNp2NVkvm7Th8fBQBO7I7AXhz43k0mR7XmPgewe8ApZOG3hstkOaMvbWAvWA\r\n" -"zCZupdDjZYjOJqlA4eEA4H8/w7F83r5CugeBE8LgEREjLPiyejrU5H1fubEY+h0d\r\n" -"l5HZBJ68ybTXfQ5U9o/QKA3dd0toBEhhdRUDGzWtjvwkEQfqF1reGWj/tod/gCpf\r\n" -"DFi6X0ECgYEA4wOv/pjSC3ty6TuOvKX2rOUiBrLXXv2JSxZnMoMiWI5ipLQt+RYT\r\n" -"VPafL/m7Dn6MbwjayOkcZhBwk5CNz5A6Q4lJ64Mq/lqHznRCQQ2Mc1G8eyDF/fYL\r\n" -"Ze2pLvwP9VD5jTc2miDfw+MnvJhywRRLcemDFP8k4hQVtm8PMp3ZmNECgYEA4gz7\r\n" -"wzObR4gn8ibe617uQPZjWzUj9dUHYd+in1gwBCIrtNnaRn9I9U/Q6tegRYpii4ys\r\n" -"c176NmU+umy6XmuSKV5qD9bSpZWG2nLFnslrN15Lm3fhZxoeMNhBaEDTnLT26yoi\r\n" -"33gp0mSSWy94ZEqipms+ULF6sY1ZtFW6tpGFoy8CgYAQHhnnvJflIs2ky4q10B60\r\n" -"ZcxFp3rtDpkp0JxhFLhiizFrujMtZSjYNm5U7KkgPVHhLELEUvCmOnKTt4ap/vZ0\r\n" -"BxJNe1GZH3pW6SAvGDQpl9sG7uu/vTFP+lCxukmzxB0DrrDcvorEkKMom7ZCCRvW\r\n" -"KZsZ6YeH2Z81BauRj218kQKBgQCUV/DgKP2985xDTT79N08jUo3hTP5MVYCCuj/+\r\n" -"UeEw1TvZcx3LJby7P6Xad6a1/BqveaGyFKIfEFIaBUBItk801sDDpDaYc4gL00Xc\r\n" -"7lFuBHOZkxJYlss5QrGpuOEl9ZwUt5IrFLBdYaKqNHzNVC1pCPfb/JyH6Dr2HUxq\r\n" -"gxUwAQKBgQCcU6G2L8AG9d9c0UpOyL1tMvFe5Ttw0KjlQVdsh1MP6yigYo9DYuwu\r\n" -"bHFVW2r0dBTqegP2/KTOxKzaHfC1qf0RGDsUoJCNJrd1cwoCLG8P2EF4w3OBrKqv\r\n" -"8u4ytY0F+Vlanj5lm3TaoHSVF1+NWPyOTiwevIECGKwSxvlki4fDAA==\r\n" -"-----END RSA PRIVATE KEY-----\r\n"; - -const size_t mbedtls_test_ca_crt_rsa_len = sizeof( mbedtls_test_ca_crt_rsa ); -const size_t mbedtls_test_ca_key_rsa_len = sizeof( mbedtls_test_ca_key_rsa ); -const size_t mbedtls_test_ca_pwd_rsa_len = sizeof( mbedtls_test_ca_pwd_rsa ) - 1; -const size_t mbedtls_test_srv_crt_rsa_len = sizeof( mbedtls_test_srv_crt_rsa ); -const size_t mbedtls_test_srv_key_rsa_len = sizeof( mbedtls_test_srv_key_rsa ); -const size_t mbedtls_test_cli_crt_rsa_len = sizeof( mbedtls_test_cli_crt_rsa ); -const size_t mbedtls_test_cli_key_rsa_len = sizeof( mbedtls_test_cli_key_rsa ); -#else -#define TEST_CA_CRT_RSA -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_PEM_PARSE_C) -/* Concatenation of all available CA certificates */ -const char mbedtls_test_cas_pem[] = TEST_CA_CRT_RSA TEST_CA_CRT_EC; -const size_t mbedtls_test_cas_pem_len = sizeof( mbedtls_test_cas_pem ); -#endif - -/* List of all available CA certificates */ -const char * mbedtls_test_cas[] = { -#if defined(MBEDTLS_RSA_C) - mbedtls_test_ca_crt_rsa, -#endif -#if defined(MBEDTLS_ECDSA_C) - mbedtls_test_ca_crt_ec, -#endif - NULL -}; -const size_t mbedtls_test_cas_len[] = { -#if defined(MBEDTLS_RSA_C) - sizeof( mbedtls_test_ca_crt_rsa ), -#endif -#if defined(MBEDTLS_ECDSA_C) - sizeof( mbedtls_test_ca_crt_ec ), -#endif - 0 -}; - -#if defined(MBEDTLS_RSA_C) -const char *mbedtls_test_ca_crt = mbedtls_test_ca_crt_rsa; -const char *mbedtls_test_ca_key = mbedtls_test_ca_key_rsa; -const char *mbedtls_test_ca_pwd = mbedtls_test_ca_pwd_rsa; -const char *mbedtls_test_srv_crt = mbedtls_test_srv_crt_rsa; -const char *mbedtls_test_srv_key = mbedtls_test_srv_key_rsa; -const char *mbedtls_test_cli_crt = mbedtls_test_cli_crt_rsa; -const char *mbedtls_test_cli_key = mbedtls_test_cli_key_rsa; -const size_t mbedtls_test_ca_crt_len = sizeof( mbedtls_test_ca_crt_rsa ); -const size_t mbedtls_test_ca_key_len = sizeof( mbedtls_test_ca_key_rsa ); -const size_t mbedtls_test_ca_pwd_len = sizeof( mbedtls_test_ca_pwd_rsa ) - 1; -const size_t mbedtls_test_srv_crt_len = sizeof( mbedtls_test_srv_crt_rsa ); -const size_t mbedtls_test_srv_key_len = sizeof( mbedtls_test_srv_key_rsa ); -const size_t mbedtls_test_cli_crt_len = sizeof( mbedtls_test_cli_crt_rsa ); -const size_t mbedtls_test_cli_key_len = sizeof( mbedtls_test_cli_key_rsa ); -#else /* ! MBEDTLS_RSA_C, so MBEDTLS_ECDSA_C */ -const char *mbedtls_test_ca_crt = mbedtls_test_ca_crt_ec; -const char *mbedtls_test_ca_key = mbedtls_test_ca_key_ec; -const char *mbedtls_test_ca_pwd = mbedtls_test_ca_pwd_ec; -const char *mbedtls_test_srv_crt = mbedtls_test_srv_crt_ec; -const char *mbedtls_test_srv_key = mbedtls_test_srv_key_ec; -const char *mbedtls_test_cli_crt = mbedtls_test_cli_crt_ec; -const char *mbedtls_test_cli_key = mbedtls_test_cli_key_ec; -const size_t mbedtls_test_ca_crt_len = sizeof( mbedtls_test_ca_crt_ec ); -const size_t mbedtls_test_ca_key_len = sizeof( mbedtls_test_ca_key_ec ); -const size_t mbedtls_test_ca_pwd_len = sizeof( mbedtls_test_ca_pwd_ec ) - 1; -const size_t mbedtls_test_srv_crt_len = sizeof( mbedtls_test_srv_crt_ec ); -const size_t mbedtls_test_srv_key_len = sizeof( mbedtls_test_srv_key_ec ); -const size_t mbedtls_test_cli_crt_len = sizeof( mbedtls_test_cli_crt_ec ); -const size_t mbedtls_test_cli_key_len = sizeof( mbedtls_test_cli_key_ec ); -#endif /* MBEDTLS_RSA_C */ - -#endif /* MBEDTLS_CERTS_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/cipher.c b/build/premake/premake5/contrib/mbedtls/library/cipher.c deleted file mode 100644 index ccc0685036..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/cipher.c +++ /dev/null @@ -1,886 +0,0 @@ -/** - * \file cipher.c - * - * \brief Generic cipher wrapper for mbed TLS - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_CIPHER_C) - -#include "mbedtls/cipher.h" -#include "mbedtls/cipher_internal.h" - -#include -#include - -#if defined(MBEDTLS_GCM_C) -#include "mbedtls/gcm.h" -#endif - -#if defined(MBEDTLS_CCM_C) -#include "mbedtls/ccm.h" -#endif - -#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) -#define MBEDTLS_CIPHER_MODE_STREAM -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -static int supported_init = 0; - -const int *mbedtls_cipher_list( void ) -{ - const mbedtls_cipher_definition_t *def; - int *type; - - if( ! supported_init ) - { - def = mbedtls_cipher_definitions; - type = mbedtls_cipher_supported; - - while( def->type != 0 ) - *type++ = (*def++).type; - - *type = 0; - - supported_init = 1; - } - - return( mbedtls_cipher_supported ); -} - -const mbedtls_cipher_info_t *mbedtls_cipher_info_from_type( const mbedtls_cipher_type_t cipher_type ) -{ - const mbedtls_cipher_definition_t *def; - - for( def = mbedtls_cipher_definitions; def->info != NULL; def++ ) - if( def->type == cipher_type ) - return( def->info ); - - return( NULL ); -} - -const mbedtls_cipher_info_t *mbedtls_cipher_info_from_string( const char *cipher_name ) -{ - const mbedtls_cipher_definition_t *def; - - if( NULL == cipher_name ) - return( NULL ); - - for( def = mbedtls_cipher_definitions; def->info != NULL; def++ ) - if( ! strcmp( def->info->name, cipher_name ) ) - return( def->info ); - - return( NULL ); -} - -const mbedtls_cipher_info_t *mbedtls_cipher_info_from_values( const mbedtls_cipher_id_t cipher_id, - int key_bitlen, - const mbedtls_cipher_mode_t mode ) -{ - const mbedtls_cipher_definition_t *def; - - for( def = mbedtls_cipher_definitions; def->info != NULL; def++ ) - if( def->info->base->cipher == cipher_id && - def->info->key_bitlen == (unsigned) key_bitlen && - def->info->mode == mode ) - return( def->info ); - - return( NULL ); -} - -void mbedtls_cipher_init( mbedtls_cipher_context_t *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_cipher_context_t ) ); -} - -void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx ) -{ - if( ctx == NULL ) - return; - - if( ctx->cipher_ctx ) - ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); - - mbedtls_zeroize( ctx, sizeof(mbedtls_cipher_context_t) ); -} - -int mbedtls_cipher_setup( mbedtls_cipher_context_t *ctx, const mbedtls_cipher_info_t *cipher_info ) -{ - if( NULL == cipher_info || NULL == ctx ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - memset( ctx, 0, sizeof( mbedtls_cipher_context_t ) ); - - if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) - return( MBEDTLS_ERR_CIPHER_ALLOC_FAILED ); - - ctx->cipher_info = cipher_info; - -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) - /* - * Ignore possible errors caused by a cipher mode that doesn't use padding - */ -#if defined(MBEDTLS_CIPHER_PADDING_PKCS7) - (void) mbedtls_cipher_set_padding_mode( ctx, MBEDTLS_PADDING_PKCS7 ); -#else - (void) mbedtls_cipher_set_padding_mode( ctx, MBEDTLS_PADDING_NONE ); -#endif -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - - return( 0 ); -} - -int mbedtls_cipher_setkey( mbedtls_cipher_context_t *ctx, const unsigned char *key, - int key_bitlen, const mbedtls_operation_t operation ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - if( ( ctx->cipher_info->flags & MBEDTLS_CIPHER_VARIABLE_KEY_LEN ) == 0 && - (int) ctx->cipher_info->key_bitlen != key_bitlen ) - { - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - ctx->key_bitlen = key_bitlen; - ctx->operation = operation; - - /* - * For CFB and CTR mode always use the encryption key schedule - */ - if( MBEDTLS_ENCRYPT == operation || - MBEDTLS_MODE_CFB == ctx->cipher_info->mode || - MBEDTLS_MODE_CTR == ctx->cipher_info->mode ) - { - return ctx->cipher_info->base->setkey_enc_func( ctx->cipher_ctx, key, - ctx->key_bitlen ); - } - - if( MBEDTLS_DECRYPT == operation ) - return ctx->cipher_info->base->setkey_dec_func( ctx->cipher_ctx, key, - ctx->key_bitlen ); - - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); -} - -int mbedtls_cipher_set_iv( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len ) -{ - size_t actual_iv_size; - - if( NULL == ctx || NULL == ctx->cipher_info || NULL == iv ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - /* avoid buffer overflow in ctx->iv */ - if( iv_len > MBEDTLS_MAX_IV_LENGTH ) - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); - - if( ( ctx->cipher_info->flags & MBEDTLS_CIPHER_VARIABLE_IV_LEN ) != 0 ) - actual_iv_size = iv_len; - else - { - actual_iv_size = ctx->cipher_info->iv_size; - - /* avoid reading past the end of input buffer */ - if( actual_iv_size > iv_len ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - memcpy( ctx->iv, iv, actual_iv_size ); - ctx->iv_size = actual_iv_size; - - return( 0 ); -} - -int mbedtls_cipher_reset( mbedtls_cipher_context_t *ctx ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - ctx->unprocessed_len = 0; - - return( 0 ); -} - -#if defined(MBEDTLS_GCM_C) -int mbedtls_cipher_update_ad( mbedtls_cipher_context_t *ctx, - const unsigned char *ad, size_t ad_len ) -{ - if( NULL == ctx || NULL == ctx->cipher_info ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) - { - return mbedtls_gcm_starts( (mbedtls_gcm_context *) ctx->cipher_ctx, ctx->operation, - ctx->iv, ctx->iv_size, ad, ad_len ); - } - - return( 0 ); -} -#endif /* MBEDTLS_GCM_C */ - -int mbedtls_cipher_update( mbedtls_cipher_context_t *ctx, const unsigned char *input, - size_t ilen, unsigned char *output, size_t *olen ) -{ - int ret; - - if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen ) - { - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - *olen = 0; - - if( ctx->cipher_info->mode == MBEDTLS_MODE_ECB ) - { - if( ilen != mbedtls_cipher_get_block_size( ctx ) ) - return( MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED ); - - *olen = ilen; - - if( 0 != ( ret = ctx->cipher_info->base->ecb_func( ctx->cipher_ctx, - ctx->operation, input, output ) ) ) - { - return( ret ); - } - - return( 0 ); - } - -#if defined(MBEDTLS_GCM_C) - if( ctx->cipher_info->mode == MBEDTLS_MODE_GCM ) - { - *olen = ilen; - return mbedtls_gcm_update( (mbedtls_gcm_context *) ctx->cipher_ctx, ilen, input, - output ); - } -#endif - - if( input == output && - ( ctx->unprocessed_len != 0 || ilen % mbedtls_cipher_get_block_size( ctx ) ) ) - { - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - if( ctx->cipher_info->mode == MBEDTLS_MODE_CBC ) - { - size_t copy_len = 0; - - /* - * If there is not enough data for a full block, cache it. - */ - if( ( ctx->operation == MBEDTLS_DECRYPT && - ilen + ctx->unprocessed_len <= mbedtls_cipher_get_block_size( ctx ) ) || - ( ctx->operation == MBEDTLS_ENCRYPT && - ilen + ctx->unprocessed_len < mbedtls_cipher_get_block_size( ctx ) ) ) - { - memcpy( &( ctx->unprocessed_data[ctx->unprocessed_len] ), input, - ilen ); - - ctx->unprocessed_len += ilen; - return( 0 ); - } - - /* - * Process cached data first - */ - if( ctx->unprocessed_len != 0 ) - { - copy_len = mbedtls_cipher_get_block_size( ctx ) - ctx->unprocessed_len; - - memcpy( &( ctx->unprocessed_data[ctx->unprocessed_len] ), input, - copy_len ); - - if( 0 != ( ret = ctx->cipher_info->base->cbc_func( ctx->cipher_ctx, - ctx->operation, mbedtls_cipher_get_block_size( ctx ), ctx->iv, - ctx->unprocessed_data, output ) ) ) - { - return( ret ); - } - - *olen += mbedtls_cipher_get_block_size( ctx ); - output += mbedtls_cipher_get_block_size( ctx ); - ctx->unprocessed_len = 0; - - input += copy_len; - ilen -= copy_len; - } - - /* - * Cache final, incomplete block - */ - if( 0 != ilen ) - { - copy_len = ilen % mbedtls_cipher_get_block_size( ctx ); - if( copy_len == 0 && ctx->operation == MBEDTLS_DECRYPT ) - copy_len = mbedtls_cipher_get_block_size( ctx ); - - memcpy( ctx->unprocessed_data, &( input[ilen - copy_len] ), - copy_len ); - - ctx->unprocessed_len += copy_len; - ilen -= copy_len; - } - - /* - * Process remaining full blocks - */ - if( ilen ) - { - if( 0 != ( ret = ctx->cipher_info->base->cbc_func( ctx->cipher_ctx, - ctx->operation, ilen, ctx->iv, input, output ) ) ) - { - return( ret ); - } - - *olen += ilen; - } - - return( 0 ); - } -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) - if( ctx->cipher_info->mode == MBEDTLS_MODE_CFB ) - { - if( 0 != ( ret = ctx->cipher_info->base->cfb_func( ctx->cipher_ctx, - ctx->operation, ilen, &ctx->unprocessed_len, ctx->iv, - input, output ) ) ) - { - return( ret ); - } - - *olen = ilen; - - return( 0 ); - } -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) - if( ctx->cipher_info->mode == MBEDTLS_MODE_CTR ) - { - if( 0 != ( ret = ctx->cipher_info->base->ctr_func( ctx->cipher_ctx, - ilen, &ctx->unprocessed_len, ctx->iv, - ctx->unprocessed_data, input, output ) ) ) - { - return( ret ); - } - - *olen = ilen; - - return( 0 ); - } -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - if( ctx->cipher_info->mode == MBEDTLS_MODE_STREAM ) - { - if( 0 != ( ret = ctx->cipher_info->base->stream_func( ctx->cipher_ctx, - ilen, input, output ) ) ) - { - return( ret ); - } - - *olen = ilen; - - return( 0 ); - } -#endif /* MBEDTLS_CIPHER_MODE_STREAM */ - - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); -} - -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) -#if defined(MBEDTLS_CIPHER_PADDING_PKCS7) -/* - * PKCS7 (and PKCS5) padding: fill with ll bytes, with ll = padding_len - */ -static void add_pkcs_padding( unsigned char *output, size_t output_len, - size_t data_len ) -{ - size_t padding_len = output_len - data_len; - unsigned char i; - - for( i = 0; i < padding_len; i++ ) - output[data_len + i] = (unsigned char) padding_len; -} - -static int get_pkcs_padding( unsigned char *input, size_t input_len, - size_t *data_len ) -{ - size_t i, pad_idx; - unsigned char padding_len, bad = 0; - - if( NULL == input || NULL == data_len ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - padding_len = input[input_len - 1]; - *data_len = input_len - padding_len; - - /* Avoid logical || since it results in a branch */ - bad |= padding_len > input_len; - bad |= padding_len == 0; - - /* The number of bytes checked must be independent of padding_len, - * so pick input_len, which is usually 8 or 16 (one block) */ - pad_idx = input_len - padding_len; - for( i = 0; i < input_len; i++ ) - bad |= ( input[i] ^ padding_len ) * ( i >= pad_idx ); - - return( MBEDTLS_ERR_CIPHER_INVALID_PADDING * ( bad != 0 ) ); -} -#endif /* MBEDTLS_CIPHER_PADDING_PKCS7 */ - -#if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS) -/* - * One and zeros padding: fill with 80 00 ... 00 - */ -static void add_one_and_zeros_padding( unsigned char *output, - size_t output_len, size_t data_len ) -{ - size_t padding_len = output_len - data_len; - unsigned char i = 0; - - output[data_len] = 0x80; - for( i = 1; i < padding_len; i++ ) - output[data_len + i] = 0x00; -} - -static int get_one_and_zeros_padding( unsigned char *input, size_t input_len, - size_t *data_len ) -{ - size_t i; - unsigned char done = 0, prev_done, bad; - - if( NULL == input || NULL == data_len ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - bad = 0xFF; - *data_len = 0; - for( i = input_len; i > 0; i-- ) - { - prev_done = done; - done |= ( input[i-1] != 0 ); - *data_len |= ( i - 1 ) * ( done != prev_done ); - bad &= ( input[i-1] ^ 0x80 ) | ( done == prev_done ); - } - - return( MBEDTLS_ERR_CIPHER_INVALID_PADDING * ( bad != 0 ) ); - -} -#endif /* MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS */ - -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN) -/* - * Zeros and len padding: fill with 00 ... 00 ll, where ll is padding length - */ -static void add_zeros_and_len_padding( unsigned char *output, - size_t output_len, size_t data_len ) -{ - size_t padding_len = output_len - data_len; - unsigned char i = 0; - - for( i = 1; i < padding_len; i++ ) - output[data_len + i - 1] = 0x00; - output[output_len - 1] = (unsigned char) padding_len; -} - -static int get_zeros_and_len_padding( unsigned char *input, size_t input_len, - size_t *data_len ) -{ - size_t i, pad_idx; - unsigned char padding_len, bad = 0; - - if( NULL == input || NULL == data_len ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - padding_len = input[input_len - 1]; - *data_len = input_len - padding_len; - - /* Avoid logical || since it results in a branch */ - bad |= padding_len > input_len; - bad |= padding_len == 0; - - /* The number of bytes checked must be independent of padding_len */ - pad_idx = input_len - padding_len; - for( i = 0; i < input_len - 1; i++ ) - bad |= input[i] * ( i >= pad_idx ); - - return( MBEDTLS_ERR_CIPHER_INVALID_PADDING * ( bad != 0 ) ); -} -#endif /* MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN */ - -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS) -/* - * Zero padding: fill with 00 ... 00 - */ -static void add_zeros_padding( unsigned char *output, - size_t output_len, size_t data_len ) -{ - size_t i; - - for( i = data_len; i < output_len; i++ ) - output[i] = 0x00; -} - -static int get_zeros_padding( unsigned char *input, size_t input_len, - size_t *data_len ) -{ - size_t i; - unsigned char done = 0, prev_done; - - if( NULL == input || NULL == data_len ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - *data_len = 0; - for( i = input_len; i > 0; i-- ) - { - prev_done = done; - done |= ( input[i-1] != 0 ); - *data_len |= i * ( done != prev_done ); - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_PADDING_ZEROS */ - -/* - * No padding: don't pad :) - * - * There is no add_padding function (check for NULL in mbedtls_cipher_finish) - * but a trivial get_padding function - */ -static int get_no_padding( unsigned char *input, size_t input_len, - size_t *data_len ) -{ - if( NULL == input || NULL == data_len ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - *data_len = input_len; - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - -int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx, - unsigned char *output, size_t *olen ) -{ - if( NULL == ctx || NULL == ctx->cipher_info || NULL == olen ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - *olen = 0; - - if( MBEDTLS_MODE_CFB == ctx->cipher_info->mode || - MBEDTLS_MODE_CTR == ctx->cipher_info->mode || - MBEDTLS_MODE_GCM == ctx->cipher_info->mode || - MBEDTLS_MODE_STREAM == ctx->cipher_info->mode ) - { - return( 0 ); - } - - if( MBEDTLS_MODE_ECB == ctx->cipher_info->mode ) - { - if( ctx->unprocessed_len != 0 ) - return( MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED ); - - return( 0 ); - } - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - if( MBEDTLS_MODE_CBC == ctx->cipher_info->mode ) - { - int ret = 0; - - if( MBEDTLS_ENCRYPT == ctx->operation ) - { - /* check for 'no padding' mode */ - if( NULL == ctx->add_padding ) - { - if( 0 != ctx->unprocessed_len ) - return( MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED ); - - return( 0 ); - } - - ctx->add_padding( ctx->unprocessed_data, mbedtls_cipher_get_iv_size( ctx ), - ctx->unprocessed_len ); - } - else if( mbedtls_cipher_get_block_size( ctx ) != ctx->unprocessed_len ) - { - /* - * For decrypt operations, expect a full block, - * or an empty block if no padding - */ - if( NULL == ctx->add_padding && 0 == ctx->unprocessed_len ) - return( 0 ); - - return( MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED ); - } - - /* cipher block */ - if( 0 != ( ret = ctx->cipher_info->base->cbc_func( ctx->cipher_ctx, - ctx->operation, mbedtls_cipher_get_block_size( ctx ), ctx->iv, - ctx->unprocessed_data, output ) ) ) - { - return( ret ); - } - - /* Set output size for decryption */ - if( MBEDTLS_DECRYPT == ctx->operation ) - return ctx->get_padding( output, mbedtls_cipher_get_block_size( ctx ), - olen ); - - /* Set output size for encryption */ - *olen = mbedtls_cipher_get_block_size( ctx ); - return( 0 ); - } -#else - ((void) output); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); -} - -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) -int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx, mbedtls_cipher_padding_t mode ) -{ - if( NULL == ctx || - MBEDTLS_MODE_CBC != ctx->cipher_info->mode ) - { - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - switch( mode ) - { -#if defined(MBEDTLS_CIPHER_PADDING_PKCS7) - case MBEDTLS_PADDING_PKCS7: - ctx->add_padding = add_pkcs_padding; - ctx->get_padding = get_pkcs_padding; - break; -#endif -#if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS) - case MBEDTLS_PADDING_ONE_AND_ZEROS: - ctx->add_padding = add_one_and_zeros_padding; - ctx->get_padding = get_one_and_zeros_padding; - break; -#endif -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN) - case MBEDTLS_PADDING_ZEROS_AND_LEN: - ctx->add_padding = add_zeros_and_len_padding; - ctx->get_padding = get_zeros_and_len_padding; - break; -#endif -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS) - case MBEDTLS_PADDING_ZEROS: - ctx->add_padding = add_zeros_padding; - ctx->get_padding = get_zeros_padding; - break; -#endif - case MBEDTLS_PADDING_NONE: - ctx->add_padding = NULL; - ctx->get_padding = get_no_padding; - break; - - default: - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - -#if defined(MBEDTLS_GCM_C) -int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx, - unsigned char *tag, size_t tag_len ) -{ - if( NULL == ctx || NULL == ctx->cipher_info || NULL == tag ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - if( MBEDTLS_ENCRYPT != ctx->operation ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) - return mbedtls_gcm_finish( (mbedtls_gcm_context *) ctx->cipher_ctx, tag, tag_len ); - - return( 0 ); -} - -int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx, - const unsigned char *tag, size_t tag_len ) -{ - int ret; - - if( NULL == ctx || NULL == ctx->cipher_info || - MBEDTLS_DECRYPT != ctx->operation ) - { - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) - { - unsigned char check_tag[16]; - size_t i; - int diff; - - if( tag_len > sizeof( check_tag ) ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - if( 0 != ( ret = mbedtls_gcm_finish( (mbedtls_gcm_context *) ctx->cipher_ctx, - check_tag, tag_len ) ) ) - { - return( ret ); - } - - /* Check the tag in "constant-time" */ - for( diff = 0, i = 0; i < tag_len; i++ ) - diff |= tag[i] ^ check_tag[i]; - - if( diff != 0 ) - return( MBEDTLS_ERR_CIPHER_AUTH_FAILED ); - - return( 0 ); - } - - return( 0 ); -} -#endif /* MBEDTLS_GCM_C */ - -/* - * Packet-oriented wrapper for non-AEAD modes - */ -int mbedtls_cipher_crypt( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen ) -{ - int ret; - size_t finish_olen; - - if( ( ret = mbedtls_cipher_set_iv( ctx, iv, iv_len ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_cipher_reset( ctx ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_cipher_update( ctx, input, ilen, output, olen ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_cipher_finish( ctx, output + *olen, &finish_olen ) ) != 0 ) - return( ret ); - - *olen += finish_olen; - - return( 0 ); -} - -#if defined(MBEDTLS_CIPHER_MODE_AEAD) -/* - * Packet-oriented encryption for AEAD modes - */ -int mbedtls_cipher_auth_encrypt( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len, - const unsigned char *ad, size_t ad_len, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, - unsigned char *tag, size_t tag_len ) -{ -#if defined(MBEDTLS_GCM_C) - if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) - { - *olen = ilen; - return( mbedtls_gcm_crypt_and_tag( ctx->cipher_ctx, MBEDTLS_GCM_ENCRYPT, ilen, - iv, iv_len, ad, ad_len, input, output, - tag_len, tag ) ); - } -#endif /* MBEDTLS_GCM_C */ -#if defined(MBEDTLS_CCM_C) - if( MBEDTLS_MODE_CCM == ctx->cipher_info->mode ) - { - *olen = ilen; - return( mbedtls_ccm_encrypt_and_tag( ctx->cipher_ctx, ilen, - iv, iv_len, ad, ad_len, input, output, - tag, tag_len ) ); - } -#endif /* MBEDTLS_CCM_C */ - - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); -} - -/* - * Packet-oriented decryption for AEAD modes - */ -int mbedtls_cipher_auth_decrypt( mbedtls_cipher_context_t *ctx, - const unsigned char *iv, size_t iv_len, - const unsigned char *ad, size_t ad_len, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, - const unsigned char *tag, size_t tag_len ) -{ -#if defined(MBEDTLS_GCM_C) - if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) - { - int ret; - - *olen = ilen; - ret = mbedtls_gcm_auth_decrypt( ctx->cipher_ctx, ilen, - iv, iv_len, ad, ad_len, - tag, tag_len, input, output ); - - if( ret == MBEDTLS_ERR_GCM_AUTH_FAILED ) - ret = MBEDTLS_ERR_CIPHER_AUTH_FAILED; - - return( ret ); - } -#endif /* MBEDTLS_GCM_C */ -#if defined(MBEDTLS_CCM_C) - if( MBEDTLS_MODE_CCM == ctx->cipher_info->mode ) - { - int ret; - - *olen = ilen; - ret = mbedtls_ccm_auth_decrypt( ctx->cipher_ctx, ilen, - iv, iv_len, ad, ad_len, - input, output, tag, tag_len ); - - if( ret == MBEDTLS_ERR_CCM_AUTH_FAILED ) - ret = MBEDTLS_ERR_CIPHER_AUTH_FAILED; - - return( ret ); - } -#endif /* MBEDTLS_CCM_C */ - - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); -} -#endif /* MBEDTLS_CIPHER_MODE_AEAD */ - -#endif /* MBEDTLS_CIPHER_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/cipher_wrap.c b/build/premake/premake5/contrib/mbedtls/library/cipher_wrap.c deleted file mode 100644 index dc76af8ff4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/cipher_wrap.c +++ /dev/null @@ -1,1451 +0,0 @@ -/** - * \file cipher_wrap.c - * - * \brief Generic cipher wrapper for mbed TLS - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_CIPHER_C) - -#include "mbedtls/cipher_internal.h" - -#if defined(MBEDTLS_AES_C) -#include "mbedtls/aes.h" -#endif - -#if defined(MBEDTLS_ARC4_C) -#include "mbedtls/arc4.h" -#endif - -#if defined(MBEDTLS_CAMELLIA_C) -#include "mbedtls/camellia.h" -#endif - -#if defined(MBEDTLS_DES_C) -#include "mbedtls/des.h" -#endif - -#if defined(MBEDTLS_BLOWFISH_C) -#include "mbedtls/blowfish.h" -#endif - -#if defined(MBEDTLS_GCM_C) -#include "mbedtls/gcm.h" -#endif - -#if defined(MBEDTLS_CCM_C) -#include "mbedtls/ccm.h" -#endif - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_GCM_C) -/* shared by all GCM ciphers */ -static void *gcm_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_gcm_context ) ); - - if( ctx != NULL ) - mbedtls_gcm_init( (mbedtls_gcm_context *) ctx ); - - return( ctx ); -} - -static void gcm_ctx_free( void *ctx ) -{ - mbedtls_gcm_free( ctx ); - mbedtls_free( ctx ); -} -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CCM_C) -/* shared by all CCM ciphers */ -static void *ccm_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ccm_context ) ); - - if( ctx != NULL ) - mbedtls_ccm_init( (mbedtls_ccm_context *) ctx ); - - return( ctx ); -} - -static void ccm_ctx_free( void *ctx ) -{ - mbedtls_ccm_free( ctx ); - mbedtls_free( ctx ); -} -#endif /* MBEDTLS_CCM_C */ - -#if defined(MBEDTLS_AES_C) - -static int aes_crypt_ecb_wrap( void *ctx, mbedtls_operation_t operation, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_aes_crypt_ecb( (mbedtls_aes_context *) ctx, operation, input, output ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static int aes_crypt_cbc_wrap( void *ctx, mbedtls_operation_t operation, size_t length, - unsigned char *iv, const unsigned char *input, unsigned char *output ) -{ - return mbedtls_aes_crypt_cbc( (mbedtls_aes_context *) ctx, operation, length, iv, input, - output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -static int aes_crypt_cfb128_wrap( void *ctx, mbedtls_operation_t operation, - size_t length, size_t *iv_off, unsigned char *iv, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_aes_crypt_cfb128( (mbedtls_aes_context *) ctx, operation, length, iv_off, iv, - input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -static int aes_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off, - unsigned char *nonce_counter, unsigned char *stream_block, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_aes_crypt_ctr( (mbedtls_aes_context *) ctx, length, nc_off, nonce_counter, - stream_block, input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -static int aes_setkey_dec_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_aes_setkey_dec( (mbedtls_aes_context *) ctx, key, key_bitlen ); -} - -static int aes_setkey_enc_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_aes_setkey_enc( (mbedtls_aes_context *) ctx, key, key_bitlen ); -} - -static void * aes_ctx_alloc( void ) -{ - mbedtls_aes_context *aes = mbedtls_calloc( 1, sizeof( mbedtls_aes_context ) ); - - if( aes == NULL ) - return( NULL ); - - mbedtls_aes_init( aes ); - - return( aes ); -} - -static void aes_ctx_free( void *ctx ) -{ - mbedtls_aes_free( (mbedtls_aes_context *) ctx ); - mbedtls_free( ctx ); -} - -static const mbedtls_cipher_base_t aes_info = { - MBEDTLS_CIPHER_ID_AES, - aes_crypt_ecb_wrap, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - aes_crypt_cbc_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - aes_crypt_cfb128_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - aes_crypt_ctr_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - aes_setkey_enc_wrap, - aes_setkey_dec_wrap, - aes_ctx_alloc, - aes_ctx_free -}; - -static const mbedtls_cipher_info_t aes_128_ecb_info = { - MBEDTLS_CIPHER_AES_128_ECB, - MBEDTLS_MODE_ECB, - 128, - "AES-128-ECB", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_192_ecb_info = { - MBEDTLS_CIPHER_AES_192_ECB, - MBEDTLS_MODE_ECB, - 192, - "AES-192-ECB", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_256_ecb_info = { - MBEDTLS_CIPHER_AES_256_ECB, - MBEDTLS_MODE_ECB, - 256, - "AES-256-ECB", - 16, - 0, - 16, - &aes_info -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t aes_128_cbc_info = { - MBEDTLS_CIPHER_AES_128_CBC, - MBEDTLS_MODE_CBC, - 128, - "AES-128-CBC", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_192_cbc_info = { - MBEDTLS_CIPHER_AES_192_CBC, - MBEDTLS_MODE_CBC, - 192, - "AES-192-CBC", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_256_cbc_info = { - MBEDTLS_CIPHER_AES_256_CBC, - MBEDTLS_MODE_CBC, - 256, - "AES-256-CBC", - 16, - 0, - 16, - &aes_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -static const mbedtls_cipher_info_t aes_128_cfb128_info = { - MBEDTLS_CIPHER_AES_128_CFB128, - MBEDTLS_MODE_CFB, - 128, - "AES-128-CFB128", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_192_cfb128_info = { - MBEDTLS_CIPHER_AES_192_CFB128, - MBEDTLS_MODE_CFB, - 192, - "AES-192-CFB128", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_256_cfb128_info = { - MBEDTLS_CIPHER_AES_256_CFB128, - MBEDTLS_MODE_CFB, - 256, - "AES-256-CFB128", - 16, - 0, - 16, - &aes_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -static const mbedtls_cipher_info_t aes_128_ctr_info = { - MBEDTLS_CIPHER_AES_128_CTR, - MBEDTLS_MODE_CTR, - 128, - "AES-128-CTR", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_192_ctr_info = { - MBEDTLS_CIPHER_AES_192_CTR, - MBEDTLS_MODE_CTR, - 192, - "AES-192-CTR", - 16, - 0, - 16, - &aes_info -}; - -static const mbedtls_cipher_info_t aes_256_ctr_info = { - MBEDTLS_CIPHER_AES_256_CTR, - MBEDTLS_MODE_CTR, - 256, - "AES-256-CTR", - 16, - 0, - 16, - &aes_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#if defined(MBEDTLS_GCM_C) -static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_gcm_setkey( (mbedtls_gcm_context *) ctx, MBEDTLS_CIPHER_ID_AES, - key, key_bitlen ); -} - -static const mbedtls_cipher_base_t gcm_aes_info = { - MBEDTLS_CIPHER_ID_AES, - NULL, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - gcm_aes_setkey_wrap, - gcm_aes_setkey_wrap, - gcm_ctx_alloc, - gcm_ctx_free, -}; - -static const mbedtls_cipher_info_t aes_128_gcm_info = { - MBEDTLS_CIPHER_AES_128_GCM, - MBEDTLS_MODE_GCM, - 128, - "AES-128-GCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &gcm_aes_info -}; - -static const mbedtls_cipher_info_t aes_192_gcm_info = { - MBEDTLS_CIPHER_AES_192_GCM, - MBEDTLS_MODE_GCM, - 192, - "AES-192-GCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &gcm_aes_info -}; - -static const mbedtls_cipher_info_t aes_256_gcm_info = { - MBEDTLS_CIPHER_AES_256_GCM, - MBEDTLS_MODE_GCM, - 256, - "AES-256-GCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &gcm_aes_info -}; -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CCM_C) -static int ccm_aes_setkey_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_ccm_setkey( (mbedtls_ccm_context *) ctx, MBEDTLS_CIPHER_ID_AES, - key, key_bitlen ); -} - -static const mbedtls_cipher_base_t ccm_aes_info = { - MBEDTLS_CIPHER_ID_AES, - NULL, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - ccm_aes_setkey_wrap, - ccm_aes_setkey_wrap, - ccm_ctx_alloc, - ccm_ctx_free, -}; - -static const mbedtls_cipher_info_t aes_128_ccm_info = { - MBEDTLS_CIPHER_AES_128_CCM, - MBEDTLS_MODE_CCM, - 128, - "AES-128-CCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &ccm_aes_info -}; - -static const mbedtls_cipher_info_t aes_192_ccm_info = { - MBEDTLS_CIPHER_AES_192_CCM, - MBEDTLS_MODE_CCM, - 192, - "AES-192-CCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &ccm_aes_info -}; - -static const mbedtls_cipher_info_t aes_256_ccm_info = { - MBEDTLS_CIPHER_AES_256_CCM, - MBEDTLS_MODE_CCM, - 256, - "AES-256-CCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &ccm_aes_info -}; -#endif /* MBEDTLS_CCM_C */ - -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) - -static int camellia_crypt_ecb_wrap( void *ctx, mbedtls_operation_t operation, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_camellia_crypt_ecb( (mbedtls_camellia_context *) ctx, operation, input, - output ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static int camellia_crypt_cbc_wrap( void *ctx, mbedtls_operation_t operation, - size_t length, unsigned char *iv, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_camellia_crypt_cbc( (mbedtls_camellia_context *) ctx, operation, length, iv, - input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -static int camellia_crypt_cfb128_wrap( void *ctx, mbedtls_operation_t operation, - size_t length, size_t *iv_off, unsigned char *iv, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_camellia_crypt_cfb128( (mbedtls_camellia_context *) ctx, operation, length, - iv_off, iv, input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -static int camellia_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off, - unsigned char *nonce_counter, unsigned char *stream_block, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_camellia_crypt_ctr( (mbedtls_camellia_context *) ctx, length, nc_off, - nonce_counter, stream_block, input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -static int camellia_setkey_dec_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_camellia_setkey_dec( (mbedtls_camellia_context *) ctx, key, key_bitlen ); -} - -static int camellia_setkey_enc_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_camellia_setkey_enc( (mbedtls_camellia_context *) ctx, key, key_bitlen ); -} - -static void * camellia_ctx_alloc( void ) -{ - mbedtls_camellia_context *ctx; - ctx = mbedtls_calloc( 1, sizeof( mbedtls_camellia_context ) ); - - if( ctx == NULL ) - return( NULL ); - - mbedtls_camellia_init( ctx ); - - return( ctx ); -} - -static void camellia_ctx_free( void *ctx ) -{ - mbedtls_camellia_free( (mbedtls_camellia_context *) ctx ); - mbedtls_free( ctx ); -} - -static const mbedtls_cipher_base_t camellia_info = { - MBEDTLS_CIPHER_ID_CAMELLIA, - camellia_crypt_ecb_wrap, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - camellia_crypt_cbc_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - camellia_crypt_cfb128_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - camellia_crypt_ctr_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - camellia_setkey_enc_wrap, - camellia_setkey_dec_wrap, - camellia_ctx_alloc, - camellia_ctx_free -}; - -static const mbedtls_cipher_info_t camellia_128_ecb_info = { - MBEDTLS_CIPHER_CAMELLIA_128_ECB, - MBEDTLS_MODE_ECB, - 128, - "CAMELLIA-128-ECB", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_192_ecb_info = { - MBEDTLS_CIPHER_CAMELLIA_192_ECB, - MBEDTLS_MODE_ECB, - 192, - "CAMELLIA-192-ECB", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_256_ecb_info = { - MBEDTLS_CIPHER_CAMELLIA_256_ECB, - MBEDTLS_MODE_ECB, - 256, - "CAMELLIA-256-ECB", - 16, - 0, - 16, - &camellia_info -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t camellia_128_cbc_info = { - MBEDTLS_CIPHER_CAMELLIA_128_CBC, - MBEDTLS_MODE_CBC, - 128, - "CAMELLIA-128-CBC", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_192_cbc_info = { - MBEDTLS_CIPHER_CAMELLIA_192_CBC, - MBEDTLS_MODE_CBC, - 192, - "CAMELLIA-192-CBC", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_256_cbc_info = { - MBEDTLS_CIPHER_CAMELLIA_256_CBC, - MBEDTLS_MODE_CBC, - 256, - "CAMELLIA-256-CBC", - 16, - 0, - 16, - &camellia_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -static const mbedtls_cipher_info_t camellia_128_cfb128_info = { - MBEDTLS_CIPHER_CAMELLIA_128_CFB128, - MBEDTLS_MODE_CFB, - 128, - "CAMELLIA-128-CFB128", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_192_cfb128_info = { - MBEDTLS_CIPHER_CAMELLIA_192_CFB128, - MBEDTLS_MODE_CFB, - 192, - "CAMELLIA-192-CFB128", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_256_cfb128_info = { - MBEDTLS_CIPHER_CAMELLIA_256_CFB128, - MBEDTLS_MODE_CFB, - 256, - "CAMELLIA-256-CFB128", - 16, - 0, - 16, - &camellia_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -static const mbedtls_cipher_info_t camellia_128_ctr_info = { - MBEDTLS_CIPHER_CAMELLIA_128_CTR, - MBEDTLS_MODE_CTR, - 128, - "CAMELLIA-128-CTR", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_192_ctr_info = { - MBEDTLS_CIPHER_CAMELLIA_192_CTR, - MBEDTLS_MODE_CTR, - 192, - "CAMELLIA-192-CTR", - 16, - 0, - 16, - &camellia_info -}; - -static const mbedtls_cipher_info_t camellia_256_ctr_info = { - MBEDTLS_CIPHER_CAMELLIA_256_CTR, - MBEDTLS_MODE_CTR, - 256, - "CAMELLIA-256-CTR", - 16, - 0, - 16, - &camellia_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -#if defined(MBEDTLS_GCM_C) -static int gcm_camellia_setkey_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_gcm_setkey( (mbedtls_gcm_context *) ctx, MBEDTLS_CIPHER_ID_CAMELLIA, - key, key_bitlen ); -} - -static const mbedtls_cipher_base_t gcm_camellia_info = { - MBEDTLS_CIPHER_ID_CAMELLIA, - NULL, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - gcm_camellia_setkey_wrap, - gcm_camellia_setkey_wrap, - gcm_ctx_alloc, - gcm_ctx_free, -}; - -static const mbedtls_cipher_info_t camellia_128_gcm_info = { - MBEDTLS_CIPHER_CAMELLIA_128_GCM, - MBEDTLS_MODE_GCM, - 128, - "CAMELLIA-128-GCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &gcm_camellia_info -}; - -static const mbedtls_cipher_info_t camellia_192_gcm_info = { - MBEDTLS_CIPHER_CAMELLIA_192_GCM, - MBEDTLS_MODE_GCM, - 192, - "CAMELLIA-192-GCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &gcm_camellia_info -}; - -static const mbedtls_cipher_info_t camellia_256_gcm_info = { - MBEDTLS_CIPHER_CAMELLIA_256_GCM, - MBEDTLS_MODE_GCM, - 256, - "CAMELLIA-256-GCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &gcm_camellia_info -}; -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CCM_C) -static int ccm_camellia_setkey_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_ccm_setkey( (mbedtls_ccm_context *) ctx, MBEDTLS_CIPHER_ID_CAMELLIA, - key, key_bitlen ); -} - -static const mbedtls_cipher_base_t ccm_camellia_info = { - MBEDTLS_CIPHER_ID_CAMELLIA, - NULL, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - ccm_camellia_setkey_wrap, - ccm_camellia_setkey_wrap, - ccm_ctx_alloc, - ccm_ctx_free, -}; - -static const mbedtls_cipher_info_t camellia_128_ccm_info = { - MBEDTLS_CIPHER_CAMELLIA_128_CCM, - MBEDTLS_MODE_CCM, - 128, - "CAMELLIA-128-CCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &ccm_camellia_info -}; - -static const mbedtls_cipher_info_t camellia_192_ccm_info = { - MBEDTLS_CIPHER_CAMELLIA_192_CCM, - MBEDTLS_MODE_CCM, - 192, - "CAMELLIA-192-CCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &ccm_camellia_info -}; - -static const mbedtls_cipher_info_t camellia_256_ccm_info = { - MBEDTLS_CIPHER_CAMELLIA_256_CCM, - MBEDTLS_MODE_CCM, - 256, - "CAMELLIA-256-CCM", - 12, - MBEDTLS_CIPHER_VARIABLE_IV_LEN, - 16, - &ccm_camellia_info -}; -#endif /* MBEDTLS_CCM_C */ - -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) - -static int des_crypt_ecb_wrap( void *ctx, mbedtls_operation_t operation, - const unsigned char *input, unsigned char *output ) -{ - ((void) operation); - return mbedtls_des_crypt_ecb( (mbedtls_des_context *) ctx, input, output ); -} - -static int des3_crypt_ecb_wrap( void *ctx, mbedtls_operation_t operation, - const unsigned char *input, unsigned char *output ) -{ - ((void) operation); - return mbedtls_des3_crypt_ecb( (mbedtls_des3_context *) ctx, input, output ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static int des_crypt_cbc_wrap( void *ctx, mbedtls_operation_t operation, size_t length, - unsigned char *iv, const unsigned char *input, unsigned char *output ) -{ - return mbedtls_des_crypt_cbc( (mbedtls_des_context *) ctx, operation, length, iv, input, - output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static int des3_crypt_cbc_wrap( void *ctx, mbedtls_operation_t operation, size_t length, - unsigned char *iv, const unsigned char *input, unsigned char *output ) -{ - return mbedtls_des3_crypt_cbc( (mbedtls_des3_context *) ctx, operation, length, iv, input, - output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -static int des_setkey_dec_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) key_bitlen); - - return mbedtls_des_setkey_dec( (mbedtls_des_context *) ctx, key ); -} - -static int des_setkey_enc_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) key_bitlen); - - return mbedtls_des_setkey_enc( (mbedtls_des_context *) ctx, key ); -} - -static int des3_set2key_dec_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) key_bitlen); - - return mbedtls_des3_set2key_dec( (mbedtls_des3_context *) ctx, key ); -} - -static int des3_set2key_enc_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) key_bitlen); - - return mbedtls_des3_set2key_enc( (mbedtls_des3_context *) ctx, key ); -} - -static int des3_set3key_dec_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) key_bitlen); - - return mbedtls_des3_set3key_dec( (mbedtls_des3_context *) ctx, key ); -} - -static int des3_set3key_enc_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) key_bitlen); - - return mbedtls_des3_set3key_enc( (mbedtls_des3_context *) ctx, key ); -} - -static void * des_ctx_alloc( void ) -{ - mbedtls_des_context *des = mbedtls_calloc( 1, sizeof( mbedtls_des_context ) ); - - if( des == NULL ) - return( NULL ); - - mbedtls_des_init( des ); - - return( des ); -} - -static void des_ctx_free( void *ctx ) -{ - mbedtls_des_free( (mbedtls_des_context *) ctx ); - mbedtls_free( ctx ); -} - -static void * des3_ctx_alloc( void ) -{ - mbedtls_des3_context *des3; - des3 = mbedtls_calloc( 1, sizeof( mbedtls_des3_context ) ); - - if( des3 == NULL ) - return( NULL ); - - mbedtls_des3_init( des3 ); - - return( des3 ); -} - -static void des3_ctx_free( void *ctx ) -{ - mbedtls_des3_free( (mbedtls_des3_context *) ctx ); - mbedtls_free( ctx ); -} - -static const mbedtls_cipher_base_t des_info = { - MBEDTLS_CIPHER_ID_DES, - des_crypt_ecb_wrap, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - des_crypt_cbc_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - des_setkey_enc_wrap, - des_setkey_dec_wrap, - des_ctx_alloc, - des_ctx_free -}; - -static const mbedtls_cipher_info_t des_ecb_info = { - MBEDTLS_CIPHER_DES_ECB, - MBEDTLS_MODE_ECB, - MBEDTLS_KEY_LENGTH_DES, - "DES-ECB", - 8, - 0, - 8, - &des_info -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t des_cbc_info = { - MBEDTLS_CIPHER_DES_CBC, - MBEDTLS_MODE_CBC, - MBEDTLS_KEY_LENGTH_DES, - "DES-CBC", - 8, - 0, - 8, - &des_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -static const mbedtls_cipher_base_t des_ede_info = { - MBEDTLS_CIPHER_ID_DES, - des3_crypt_ecb_wrap, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - des3_crypt_cbc_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - des3_set2key_enc_wrap, - des3_set2key_dec_wrap, - des3_ctx_alloc, - des3_ctx_free -}; - -static const mbedtls_cipher_info_t des_ede_ecb_info = { - MBEDTLS_CIPHER_DES_EDE_ECB, - MBEDTLS_MODE_ECB, - MBEDTLS_KEY_LENGTH_DES_EDE, - "DES-EDE-ECB", - 8, - 0, - 8, - &des_ede_info -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t des_ede_cbc_info = { - MBEDTLS_CIPHER_DES_EDE_CBC, - MBEDTLS_MODE_CBC, - MBEDTLS_KEY_LENGTH_DES_EDE, - "DES-EDE-CBC", - 8, - 0, - 8, - &des_ede_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -static const mbedtls_cipher_base_t des_ede3_info = { - MBEDTLS_CIPHER_ID_3DES, - des3_crypt_ecb_wrap, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - des3_crypt_cbc_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - des3_set3key_enc_wrap, - des3_set3key_dec_wrap, - des3_ctx_alloc, - des3_ctx_free -}; - -static const mbedtls_cipher_info_t des_ede3_ecb_info = { - MBEDTLS_CIPHER_DES_EDE3_ECB, - MBEDTLS_MODE_ECB, - MBEDTLS_KEY_LENGTH_DES_EDE3, - "DES-EDE3-ECB", - 8, - 0, - 8, - &des_ede3_info -}; -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t des_ede3_cbc_info = { - MBEDTLS_CIPHER_DES_EDE3_CBC, - MBEDTLS_MODE_CBC, - MBEDTLS_KEY_LENGTH_DES_EDE3, - "DES-EDE3-CBC", - 8, - 0, - 8, - &des_ede3_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_BLOWFISH_C) - -static int blowfish_crypt_ecb_wrap( void *ctx, mbedtls_operation_t operation, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_blowfish_crypt_ecb( (mbedtls_blowfish_context *) ctx, operation, input, - output ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static int blowfish_crypt_cbc_wrap( void *ctx, mbedtls_operation_t operation, - size_t length, unsigned char *iv, const unsigned char *input, - unsigned char *output ) -{ - return mbedtls_blowfish_crypt_cbc( (mbedtls_blowfish_context *) ctx, operation, length, iv, - input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -static int blowfish_crypt_cfb64_wrap( void *ctx, mbedtls_operation_t operation, - size_t length, size_t *iv_off, unsigned char *iv, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_blowfish_crypt_cfb64( (mbedtls_blowfish_context *) ctx, operation, length, - iv_off, iv, input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -static int blowfish_crypt_ctr_wrap( void *ctx, size_t length, size_t *nc_off, - unsigned char *nonce_counter, unsigned char *stream_block, - const unsigned char *input, unsigned char *output ) -{ - return mbedtls_blowfish_crypt_ctr( (mbedtls_blowfish_context *) ctx, length, nc_off, - nonce_counter, stream_block, input, output ); -} -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -static int blowfish_setkey_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - return mbedtls_blowfish_setkey( (mbedtls_blowfish_context *) ctx, key, key_bitlen ); -} - -static void * blowfish_ctx_alloc( void ) -{ - mbedtls_blowfish_context *ctx; - ctx = mbedtls_calloc( 1, sizeof( mbedtls_blowfish_context ) ); - - if( ctx == NULL ) - return( NULL ); - - mbedtls_blowfish_init( ctx ); - - return( ctx ); -} - -static void blowfish_ctx_free( void *ctx ) -{ - mbedtls_blowfish_free( (mbedtls_blowfish_context *) ctx ); - mbedtls_free( ctx ); -} - -static const mbedtls_cipher_base_t blowfish_info = { - MBEDTLS_CIPHER_ID_BLOWFISH, - blowfish_crypt_ecb_wrap, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - blowfish_crypt_cbc_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - blowfish_crypt_cfb64_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - blowfish_crypt_ctr_wrap, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - NULL, -#endif - blowfish_setkey_wrap, - blowfish_setkey_wrap, - blowfish_ctx_alloc, - blowfish_ctx_free -}; - -static const mbedtls_cipher_info_t blowfish_ecb_info = { - MBEDTLS_CIPHER_BLOWFISH_ECB, - MBEDTLS_MODE_ECB, - 128, - "BLOWFISH-ECB", - 8, - MBEDTLS_CIPHER_VARIABLE_KEY_LEN, - 8, - &blowfish_info -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t blowfish_cbc_info = { - MBEDTLS_CIPHER_BLOWFISH_CBC, - MBEDTLS_MODE_CBC, - 128, - "BLOWFISH-CBC", - 8, - MBEDTLS_CIPHER_VARIABLE_KEY_LEN, - 8, - &blowfish_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -static const mbedtls_cipher_info_t blowfish_cfb64_info = { - MBEDTLS_CIPHER_BLOWFISH_CFB64, - MBEDTLS_MODE_CFB, - 128, - "BLOWFISH-CFB64", - 8, - MBEDTLS_CIPHER_VARIABLE_KEY_LEN, - 8, - &blowfish_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -static const mbedtls_cipher_info_t blowfish_ctr_info = { - MBEDTLS_CIPHER_BLOWFISH_CTR, - MBEDTLS_MODE_CTR, - 128, - "BLOWFISH-CTR", - 8, - MBEDTLS_CIPHER_VARIABLE_KEY_LEN, - 8, - &blowfish_info -}; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ -#endif /* MBEDTLS_BLOWFISH_C */ - -#if defined(MBEDTLS_ARC4_C) -static int arc4_crypt_stream_wrap( void *ctx, size_t length, - const unsigned char *input, - unsigned char *output ) -{ - return( mbedtls_arc4_crypt( (mbedtls_arc4_context *) ctx, length, input, output ) ); -} - -static int arc4_setkey_wrap( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - /* we get key_bitlen in bits, arc4 expects it in bytes */ - if( key_bitlen % 8 != 0 ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - mbedtls_arc4_setup( (mbedtls_arc4_context *) ctx, key, key_bitlen / 8 ); - return( 0 ); -} - -static void * arc4_ctx_alloc( void ) -{ - mbedtls_arc4_context *ctx; - ctx = mbedtls_calloc( 1, sizeof( mbedtls_arc4_context ) ); - - if( ctx == NULL ) - return( NULL ); - - mbedtls_arc4_init( ctx ); - - return( ctx ); -} - -static void arc4_ctx_free( void *ctx ) -{ - mbedtls_arc4_free( (mbedtls_arc4_context *) ctx ); - mbedtls_free( ctx ); -} - -static const mbedtls_cipher_base_t arc4_base_info = { - MBEDTLS_CIPHER_ID_ARC4, - NULL, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - arc4_crypt_stream_wrap, -#endif - arc4_setkey_wrap, - arc4_setkey_wrap, - arc4_ctx_alloc, - arc4_ctx_free -}; - -static const mbedtls_cipher_info_t arc4_128_info = { - MBEDTLS_CIPHER_ARC4_128, - MBEDTLS_MODE_STREAM, - 128, - "ARC4-128", - 0, - 0, - 1, - &arc4_base_info -}; -#endif /* MBEDTLS_ARC4_C */ - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -static int null_crypt_stream( void *ctx, size_t length, - const unsigned char *input, - unsigned char *output ) -{ - ((void) ctx); - memmove( output, input, length ); - return( 0 ); -} - -static int null_setkey( void *ctx, const unsigned char *key, - unsigned int key_bitlen ) -{ - ((void) ctx); - ((void) key); - ((void) key_bitlen); - - return( 0 ); -} - -static void * null_ctx_alloc( void ) -{ - return( (void *) 1 ); -} - -static void null_ctx_free( void *ctx ) -{ - ((void) ctx); -} - -static const mbedtls_cipher_base_t null_base_info = { - MBEDTLS_CIPHER_ID_NULL, - NULL, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - NULL, -#endif -#if defined(MBEDTLS_CIPHER_MODE_STREAM) - null_crypt_stream, -#endif - null_setkey, - null_setkey, - null_ctx_alloc, - null_ctx_free -}; - -static const mbedtls_cipher_info_t null_cipher_info = { - MBEDTLS_CIPHER_NULL, - MBEDTLS_MODE_STREAM, - 0, - "NULL", - 0, - 0, - 1, - &null_base_info -}; -#endif /* defined(MBEDTLS_CIPHER_NULL_CIPHER) */ - -const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] = -{ -#if defined(MBEDTLS_AES_C) - { MBEDTLS_CIPHER_AES_128_ECB, &aes_128_ecb_info }, - { MBEDTLS_CIPHER_AES_192_ECB, &aes_192_ecb_info }, - { MBEDTLS_CIPHER_AES_256_ECB, &aes_256_ecb_info }, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_CIPHER_AES_128_CBC, &aes_128_cbc_info }, - { MBEDTLS_CIPHER_AES_192_CBC, &aes_192_cbc_info }, - { MBEDTLS_CIPHER_AES_256_CBC, &aes_256_cbc_info }, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - { MBEDTLS_CIPHER_AES_128_CFB128, &aes_128_cfb128_info }, - { MBEDTLS_CIPHER_AES_192_CFB128, &aes_192_cfb128_info }, - { MBEDTLS_CIPHER_AES_256_CFB128, &aes_256_cfb128_info }, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - { MBEDTLS_CIPHER_AES_128_CTR, &aes_128_ctr_info }, - { MBEDTLS_CIPHER_AES_192_CTR, &aes_192_ctr_info }, - { MBEDTLS_CIPHER_AES_256_CTR, &aes_256_ctr_info }, -#endif -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_CIPHER_AES_128_GCM, &aes_128_gcm_info }, - { MBEDTLS_CIPHER_AES_192_GCM, &aes_192_gcm_info }, - { MBEDTLS_CIPHER_AES_256_GCM, &aes_256_gcm_info }, -#endif -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_CIPHER_AES_128_CCM, &aes_128_ccm_info }, - { MBEDTLS_CIPHER_AES_192_CCM, &aes_192_ccm_info }, - { MBEDTLS_CIPHER_AES_256_CCM, &aes_256_ccm_info }, -#endif -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_ARC4_C) - { MBEDTLS_CIPHER_ARC4_128, &arc4_128_info }, -#endif - -#if defined(MBEDTLS_BLOWFISH_C) - { MBEDTLS_CIPHER_BLOWFISH_ECB, &blowfish_ecb_info }, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_CIPHER_BLOWFISH_CBC, &blowfish_cbc_info }, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - { MBEDTLS_CIPHER_BLOWFISH_CFB64, &blowfish_cfb64_info }, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - { MBEDTLS_CIPHER_BLOWFISH_CTR, &blowfish_ctr_info }, -#endif -#endif /* MBEDTLS_BLOWFISH_C */ - -#if defined(MBEDTLS_CAMELLIA_C) - { MBEDTLS_CIPHER_CAMELLIA_128_ECB, &camellia_128_ecb_info }, - { MBEDTLS_CIPHER_CAMELLIA_192_ECB, &camellia_192_ecb_info }, - { MBEDTLS_CIPHER_CAMELLIA_256_ECB, &camellia_256_ecb_info }, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_CIPHER_CAMELLIA_128_CBC, &camellia_128_cbc_info }, - { MBEDTLS_CIPHER_CAMELLIA_192_CBC, &camellia_192_cbc_info }, - { MBEDTLS_CIPHER_CAMELLIA_256_CBC, &camellia_256_cbc_info }, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CFB) - { MBEDTLS_CIPHER_CAMELLIA_128_CFB128, &camellia_128_cfb128_info }, - { MBEDTLS_CIPHER_CAMELLIA_192_CFB128, &camellia_192_cfb128_info }, - { MBEDTLS_CIPHER_CAMELLIA_256_CFB128, &camellia_256_cfb128_info }, -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - { MBEDTLS_CIPHER_CAMELLIA_128_CTR, &camellia_128_ctr_info }, - { MBEDTLS_CIPHER_CAMELLIA_192_CTR, &camellia_192_ctr_info }, - { MBEDTLS_CIPHER_CAMELLIA_256_CTR, &camellia_256_ctr_info }, -#endif -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_CIPHER_CAMELLIA_128_GCM, &camellia_128_gcm_info }, - { MBEDTLS_CIPHER_CAMELLIA_192_GCM, &camellia_192_gcm_info }, - { MBEDTLS_CIPHER_CAMELLIA_256_GCM, &camellia_256_gcm_info }, -#endif -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_CIPHER_CAMELLIA_128_CCM, &camellia_128_ccm_info }, - { MBEDTLS_CIPHER_CAMELLIA_192_CCM, &camellia_192_ccm_info }, - { MBEDTLS_CIPHER_CAMELLIA_256_CCM, &camellia_256_ccm_info }, -#endif -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) - { MBEDTLS_CIPHER_DES_ECB, &des_ecb_info }, - { MBEDTLS_CIPHER_DES_EDE_ECB, &des_ede_ecb_info }, - { MBEDTLS_CIPHER_DES_EDE3_ECB, &des_ede3_ecb_info }, -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_CIPHER_DES_CBC, &des_cbc_info }, - { MBEDTLS_CIPHER_DES_EDE_CBC, &des_ede_cbc_info }, - { MBEDTLS_CIPHER_DES_EDE3_CBC, &des_ede3_cbc_info }, -#endif -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) - { MBEDTLS_CIPHER_NULL, &null_cipher_info }, -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ - - { MBEDTLS_CIPHER_NONE, NULL } -}; - -#define NUM_CIPHERS sizeof mbedtls_cipher_definitions / sizeof mbedtls_cipher_definitions[0] -int mbedtls_cipher_supported[NUM_CIPHERS]; - -#endif /* MBEDTLS_CIPHER_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ctr_drbg.c b/build/premake/premake5/contrib/mbedtls/library/ctr_drbg.c deleted file mode 100644 index aefddfa1d9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ctr_drbg.c +++ /dev/null @@ -1,593 +0,0 @@ -/* - * CTR_DRBG implementation based on AES-256 (NIST SP 800-90) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The NIST SP 800-90 DRBGs are described in the following publucation. - * - * http://csrc.nist.gov/publications/nistpubs/800-90/SP800-90revised_March2007.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) - -#include "mbedtls/ctr_drbg.h" - -#include - -#if defined(MBEDTLS_FS_IO) -#include -#endif - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * CTR_DRBG context initialization - */ -void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_ctr_drbg_context ) ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif -} - -/* - * Non-public function wrapped by ctr_crbg_init(). Necessary to allow NIST - * tests to succeed (which require known length fixed entropy) - */ -int mbedtls_ctr_drbg_seed_entropy_len( - mbedtls_ctr_drbg_context *ctx, - int (*f_entropy)(void *, unsigned char *, size_t), - void *p_entropy, - const unsigned char *custom, - size_t len, - size_t entropy_len ) -{ - int ret; - unsigned char key[MBEDTLS_CTR_DRBG_KEYSIZE]; - - memset( key, 0, MBEDTLS_CTR_DRBG_KEYSIZE ); - - mbedtls_aes_init( &ctx->aes_ctx ); - - ctx->f_entropy = f_entropy; - ctx->p_entropy = p_entropy; - - ctx->entropy_len = entropy_len; - ctx->reseed_interval = MBEDTLS_CTR_DRBG_RESEED_INTERVAL; - - /* - * Initialize with an empty key - */ - mbedtls_aes_setkey_enc( &ctx->aes_ctx, key, MBEDTLS_CTR_DRBG_KEYBITS ); - - if( ( ret = mbedtls_ctr_drbg_reseed( ctx, custom, len ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -int mbedtls_ctr_drbg_seed( mbedtls_ctr_drbg_context *ctx, - int (*f_entropy)(void *, unsigned char *, size_t), - void *p_entropy, - const unsigned char *custom, - size_t len ) -{ - return( mbedtls_ctr_drbg_seed_entropy_len( ctx, f_entropy, p_entropy, custom, len, - MBEDTLS_CTR_DRBG_ENTROPY_LEN ) ); -} - -void mbedtls_ctr_drbg_free( mbedtls_ctr_drbg_context *ctx ) -{ - if( ctx == NULL ) - return; - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &ctx->mutex ); -#endif - mbedtls_aes_free( &ctx->aes_ctx ); - mbedtls_zeroize( ctx, sizeof( mbedtls_ctr_drbg_context ) ); -} - -void mbedtls_ctr_drbg_set_prediction_resistance( mbedtls_ctr_drbg_context *ctx, int resistance ) -{ - ctx->prediction_resistance = resistance; -} - -void mbedtls_ctr_drbg_set_entropy_len( mbedtls_ctr_drbg_context *ctx, size_t len ) -{ - ctx->entropy_len = len; -} - -void mbedtls_ctr_drbg_set_reseed_interval( mbedtls_ctr_drbg_context *ctx, int interval ) -{ - ctx->reseed_interval = interval; -} - -static int block_cipher_df( unsigned char *output, - const unsigned char *data, size_t data_len ) -{ - unsigned char buf[MBEDTLS_CTR_DRBG_MAX_SEED_INPUT + MBEDTLS_CTR_DRBG_BLOCKSIZE + 16]; - unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN]; - unsigned char key[MBEDTLS_CTR_DRBG_KEYSIZE]; - unsigned char chain[MBEDTLS_CTR_DRBG_BLOCKSIZE]; - unsigned char *p, *iv; - mbedtls_aes_context aes_ctx; - - int i, j; - size_t buf_len, use_len; - - if( data_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ) - return( MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG ); - - memset( buf, 0, MBEDTLS_CTR_DRBG_MAX_SEED_INPUT + MBEDTLS_CTR_DRBG_BLOCKSIZE + 16 ); - mbedtls_aes_init( &aes_ctx ); - - /* - * Construct IV (16 bytes) and S in buffer - * IV = Counter (in 32-bits) padded to 16 with zeroes - * S = Length input string (in 32-bits) || Length of output (in 32-bits) || - * data || 0x80 - * (Total is padded to a multiple of 16-bytes with zeroes) - */ - p = buf + MBEDTLS_CTR_DRBG_BLOCKSIZE; - *p++ = ( data_len >> 24 ) & 0xff; - *p++ = ( data_len >> 16 ) & 0xff; - *p++ = ( data_len >> 8 ) & 0xff; - *p++ = ( data_len ) & 0xff; - p += 3; - *p++ = MBEDTLS_CTR_DRBG_SEEDLEN; - memcpy( p, data, data_len ); - p[data_len] = 0x80; - - buf_len = MBEDTLS_CTR_DRBG_BLOCKSIZE + 8 + data_len + 1; - - for( i = 0; i < MBEDTLS_CTR_DRBG_KEYSIZE; i++ ) - key[i] = i; - - mbedtls_aes_setkey_enc( &aes_ctx, key, MBEDTLS_CTR_DRBG_KEYBITS ); - - /* - * Reduce data to MBEDTLS_CTR_DRBG_SEEDLEN bytes of data - */ - for( j = 0; j < MBEDTLS_CTR_DRBG_SEEDLEN; j += MBEDTLS_CTR_DRBG_BLOCKSIZE ) - { - p = buf; - memset( chain, 0, MBEDTLS_CTR_DRBG_BLOCKSIZE ); - use_len = buf_len; - - while( use_len > 0 ) - { - for( i = 0; i < MBEDTLS_CTR_DRBG_BLOCKSIZE; i++ ) - chain[i] ^= p[i]; - p += MBEDTLS_CTR_DRBG_BLOCKSIZE; - use_len -= ( use_len >= MBEDTLS_CTR_DRBG_BLOCKSIZE ) ? - MBEDTLS_CTR_DRBG_BLOCKSIZE : use_len; - - mbedtls_aes_crypt_ecb( &aes_ctx, MBEDTLS_AES_ENCRYPT, chain, chain ); - } - - memcpy( tmp + j, chain, MBEDTLS_CTR_DRBG_BLOCKSIZE ); - - /* - * Update IV - */ - buf[3]++; - } - - /* - * Do final encryption with reduced data - */ - mbedtls_aes_setkey_enc( &aes_ctx, tmp, MBEDTLS_CTR_DRBG_KEYBITS ); - iv = tmp + MBEDTLS_CTR_DRBG_KEYSIZE; - p = output; - - for( j = 0; j < MBEDTLS_CTR_DRBG_SEEDLEN; j += MBEDTLS_CTR_DRBG_BLOCKSIZE ) - { - mbedtls_aes_crypt_ecb( &aes_ctx, MBEDTLS_AES_ENCRYPT, iv, iv ); - memcpy( p, iv, MBEDTLS_CTR_DRBG_BLOCKSIZE ); - p += MBEDTLS_CTR_DRBG_BLOCKSIZE; - } - - mbedtls_aes_free( &aes_ctx ); - - return( 0 ); -} - -static int ctr_drbg_update_internal( mbedtls_ctr_drbg_context *ctx, - const unsigned char data[MBEDTLS_CTR_DRBG_SEEDLEN] ) -{ - unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN]; - unsigned char *p = tmp; - int i, j; - - memset( tmp, 0, MBEDTLS_CTR_DRBG_SEEDLEN ); - - for( j = 0; j < MBEDTLS_CTR_DRBG_SEEDLEN; j += MBEDTLS_CTR_DRBG_BLOCKSIZE ) - { - /* - * Increase counter - */ - for( i = MBEDTLS_CTR_DRBG_BLOCKSIZE; i > 0; i-- ) - if( ++ctx->counter[i - 1] != 0 ) - break; - - /* - * Crypt counter block - */ - mbedtls_aes_crypt_ecb( &ctx->aes_ctx, MBEDTLS_AES_ENCRYPT, ctx->counter, p ); - - p += MBEDTLS_CTR_DRBG_BLOCKSIZE; - } - - for( i = 0; i < MBEDTLS_CTR_DRBG_SEEDLEN; i++ ) - tmp[i] ^= data[i]; - - /* - * Update key and counter - */ - mbedtls_aes_setkey_enc( &ctx->aes_ctx, tmp, MBEDTLS_CTR_DRBG_KEYBITS ); - memcpy( ctx->counter, tmp + MBEDTLS_CTR_DRBG_KEYSIZE, MBEDTLS_CTR_DRBG_BLOCKSIZE ); - - return( 0 ); -} - -void mbedtls_ctr_drbg_update( mbedtls_ctr_drbg_context *ctx, - const unsigned char *additional, size_t add_len ) -{ - unsigned char add_input[MBEDTLS_CTR_DRBG_SEEDLEN]; - - if( add_len > 0 ) - { - /* MAX_INPUT would be more logical here, but we have to match - * block_cipher_df()'s limits since we can't propagate errors */ - if( add_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ) - add_len = MBEDTLS_CTR_DRBG_MAX_SEED_INPUT; - - block_cipher_df( add_input, additional, add_len ); - ctr_drbg_update_internal( ctx, add_input ); - } -} - -int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx, - const unsigned char *additional, size_t len ) -{ - unsigned char seed[MBEDTLS_CTR_DRBG_MAX_SEED_INPUT]; - size_t seedlen = 0; - - if( ctx->entropy_len + len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ) - return( MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG ); - - memset( seed, 0, MBEDTLS_CTR_DRBG_MAX_SEED_INPUT ); - - /* - * Gather entropy_len bytes of entropy to seed state - */ - if( 0 != ctx->f_entropy( ctx->p_entropy, seed, - ctx->entropy_len ) ) - { - return( MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED ); - } - - seedlen += ctx->entropy_len; - - /* - * Add additional data - */ - if( additional && len ) - { - memcpy( seed + seedlen, additional, len ); - seedlen += len; - } - - /* - * Reduce to 384 bits - */ - block_cipher_df( seed, seed, seedlen ); - - /* - * Update state - */ - ctr_drbg_update_internal( ctx, seed ); - ctx->reseed_counter = 1; - - return( 0 ); -} - -int mbedtls_ctr_drbg_random_with_add( void *p_rng, - unsigned char *output, size_t output_len, - const unsigned char *additional, size_t add_len ) -{ - int ret = 0; - mbedtls_ctr_drbg_context *ctx = (mbedtls_ctr_drbg_context *) p_rng; - unsigned char add_input[MBEDTLS_CTR_DRBG_SEEDLEN]; - unsigned char *p = output; - unsigned char tmp[MBEDTLS_CTR_DRBG_BLOCKSIZE]; - int i; - size_t use_len; - - if( output_len > MBEDTLS_CTR_DRBG_MAX_REQUEST ) - return( MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG ); - - if( add_len > MBEDTLS_CTR_DRBG_MAX_INPUT ) - return( MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG ); - - memset( add_input, 0, MBEDTLS_CTR_DRBG_SEEDLEN ); - - if( ctx->reseed_counter > ctx->reseed_interval || - ctx->prediction_resistance ) - { - if( ( ret = mbedtls_ctr_drbg_reseed( ctx, additional, add_len ) ) != 0 ) - return( ret ); - - add_len = 0; - } - - if( add_len > 0 ) - { - block_cipher_df( add_input, additional, add_len ); - ctr_drbg_update_internal( ctx, add_input ); - } - - while( output_len > 0 ) - { - /* - * Increase counter - */ - for( i = MBEDTLS_CTR_DRBG_BLOCKSIZE; i > 0; i-- ) - if( ++ctx->counter[i - 1] != 0 ) - break; - - /* - * Crypt counter block - */ - mbedtls_aes_crypt_ecb( &ctx->aes_ctx, MBEDTLS_AES_ENCRYPT, ctx->counter, tmp ); - - use_len = ( output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE ) ? MBEDTLS_CTR_DRBG_BLOCKSIZE : - output_len; - /* - * Copy random block to destination - */ - memcpy( p, tmp, use_len ); - p += use_len; - output_len -= use_len; - } - - ctr_drbg_update_internal( ctx, add_input ); - - ctx->reseed_counter++; - - return( 0 ); -} - -int mbedtls_ctr_drbg_random( void *p_rng, unsigned char *output, size_t output_len ) -{ - int ret; - mbedtls_ctr_drbg_context *ctx = (mbedtls_ctr_drbg_context *) p_rng; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - ret = mbedtls_ctr_drbg_random_with_add( ctx, output, output_len, NULL, 0 ); - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -#if defined(MBEDTLS_FS_IO) -int mbedtls_ctr_drbg_write_seed_file( mbedtls_ctr_drbg_context *ctx, const char *path ) -{ - int ret = MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR; - FILE *f; - unsigned char buf[ MBEDTLS_CTR_DRBG_MAX_INPUT ]; - - if( ( f = fopen( path, "wb" ) ) == NULL ) - return( MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR ); - - if( ( ret = mbedtls_ctr_drbg_random( ctx, buf, MBEDTLS_CTR_DRBG_MAX_INPUT ) ) != 0 ) - goto exit; - - if( fwrite( buf, 1, MBEDTLS_CTR_DRBG_MAX_INPUT, f ) != MBEDTLS_CTR_DRBG_MAX_INPUT ) - { - ret = MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR; - goto exit; - } - - ret = 0; - -exit: - fclose( f ); - return( ret ); -} - -int mbedtls_ctr_drbg_update_seed_file( mbedtls_ctr_drbg_context *ctx, const char *path ) -{ - FILE *f; - size_t n; - unsigned char buf[ MBEDTLS_CTR_DRBG_MAX_INPUT ]; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR ); - - fseek( f, 0, SEEK_END ); - n = (size_t) ftell( f ); - fseek( f, 0, SEEK_SET ); - - if( n > MBEDTLS_CTR_DRBG_MAX_INPUT ) - { - fclose( f ); - return( MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG ); - } - - if( fread( buf, 1, n, f ) != n ) - { - fclose( f ); - return( MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR ); - } - - fclose( f ); - - mbedtls_ctr_drbg_update( ctx, buf, n ); - - return( mbedtls_ctr_drbg_write_seed_file( ctx, path ) ); -} -#endif /* MBEDTLS_FS_IO */ - -#if defined(MBEDTLS_SELF_TEST) - -static const unsigned char entropy_source_pr[96] = - { 0xc1, 0x80, 0x81, 0xa6, 0x5d, 0x44, 0x02, 0x16, - 0x19, 0xb3, 0xf1, 0x80, 0xb1, 0xc9, 0x20, 0x02, - 0x6a, 0x54, 0x6f, 0x0c, 0x70, 0x81, 0x49, 0x8b, - 0x6e, 0xa6, 0x62, 0x52, 0x6d, 0x51, 0xb1, 0xcb, - 0x58, 0x3b, 0xfa, 0xd5, 0x37, 0x5f, 0xfb, 0xc9, - 0xff, 0x46, 0xd2, 0x19, 0xc7, 0x22, 0x3e, 0x95, - 0x45, 0x9d, 0x82, 0xe1, 0xe7, 0x22, 0x9f, 0x63, - 0x31, 0x69, 0xd2, 0x6b, 0x57, 0x47, 0x4f, 0xa3, - 0x37, 0xc9, 0x98, 0x1c, 0x0b, 0xfb, 0x91, 0x31, - 0x4d, 0x55, 0xb9, 0xe9, 0x1c, 0x5a, 0x5e, 0xe4, - 0x93, 0x92, 0xcf, 0xc5, 0x23, 0x12, 0xd5, 0x56, - 0x2c, 0x4a, 0x6e, 0xff, 0xdc, 0x10, 0xd0, 0x68 }; - -static const unsigned char entropy_source_nopr[64] = - { 0x5a, 0x19, 0x4d, 0x5e, 0x2b, 0x31, 0x58, 0x14, - 0x54, 0xde, 0xf6, 0x75, 0xfb, 0x79, 0x58, 0xfe, - 0xc7, 0xdb, 0x87, 0x3e, 0x56, 0x89, 0xfc, 0x9d, - 0x03, 0x21, 0x7c, 0x68, 0xd8, 0x03, 0x38, 0x20, - 0xf9, 0xe6, 0x5e, 0x04, 0xd8, 0x56, 0xf3, 0xa9, - 0xc4, 0x4a, 0x4c, 0xbd, 0xc1, 0xd0, 0x08, 0x46, - 0xf5, 0x98, 0x3d, 0x77, 0x1c, 0x1b, 0x13, 0x7e, - 0x4e, 0x0f, 0x9d, 0x8e, 0xf4, 0x09, 0xf9, 0x2e }; - -static const unsigned char nonce_pers_pr[16] = - { 0xd2, 0x54, 0xfc, 0xff, 0x02, 0x1e, 0x69, 0xd2, - 0x29, 0xc9, 0xcf, 0xad, 0x85, 0xfa, 0x48, 0x6c }; - -static const unsigned char nonce_pers_nopr[16] = - { 0x1b, 0x54, 0xb8, 0xff, 0x06, 0x42, 0xbf, 0xf5, - 0x21, 0xf1, 0x5c, 0x1c, 0x0b, 0x66, 0x5f, 0x3f }; - -static const unsigned char result_pr[16] = - { 0x34, 0x01, 0x16, 0x56, 0xb4, 0x29, 0x00, 0x8f, - 0x35, 0x63, 0xec, 0xb5, 0xf2, 0x59, 0x07, 0x23 }; - -static const unsigned char result_nopr[16] = - { 0xa0, 0x54, 0x30, 0x3d, 0x8a, 0x7e, 0xa9, 0x88, - 0x9d, 0x90, 0x3e, 0x07, 0x7c, 0x6f, 0x21, 0x8f }; - -static size_t test_offset; -static int ctr_drbg_self_test_entropy( void *data, unsigned char *buf, - size_t len ) -{ - const unsigned char *p = data; - memcpy( buf, p + test_offset, len ); - test_offset += len; - return( 0 ); -} - -#define CHK( c ) if( (c) != 0 ) \ - { \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - return( 1 ); \ - } - -/* - * Checkup routine - */ -int mbedtls_ctr_drbg_self_test( int verbose ) -{ - mbedtls_ctr_drbg_context ctx; - unsigned char buf[16]; - - mbedtls_ctr_drbg_init( &ctx ); - - /* - * Based on a NIST CTR_DRBG test vector (PR = True) - */ - if( verbose != 0 ) - mbedtls_printf( " CTR_DRBG (PR = TRUE) : " ); - - test_offset = 0; - CHK( mbedtls_ctr_drbg_seed_entropy_len( &ctx, ctr_drbg_self_test_entropy, - (void *) entropy_source_pr, nonce_pers_pr, 16, 32 ) ); - mbedtls_ctr_drbg_set_prediction_resistance( &ctx, MBEDTLS_CTR_DRBG_PR_ON ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, MBEDTLS_CTR_DRBG_BLOCKSIZE ) ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, MBEDTLS_CTR_DRBG_BLOCKSIZE ) ); - CHK( memcmp( buf, result_pr, MBEDTLS_CTR_DRBG_BLOCKSIZE ) ); - - mbedtls_ctr_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - /* - * Based on a NIST CTR_DRBG test vector (PR = FALSE) - */ - if( verbose != 0 ) - mbedtls_printf( " CTR_DRBG (PR = FALSE): " ); - - mbedtls_ctr_drbg_init( &ctx ); - - test_offset = 0; - CHK( mbedtls_ctr_drbg_seed_entropy_len( &ctx, ctr_drbg_self_test_entropy, - (void *) entropy_source_nopr, nonce_pers_nopr, 16, 32 ) ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, 16 ) ); - CHK( mbedtls_ctr_drbg_reseed( &ctx, NULL, 0 ) ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, 16 ) ); - CHK( memcmp( buf, result_nopr, 16 ) ); - - mbedtls_ctr_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/debug.c b/build/premake/premake5/contrib/mbedtls/library/debug.c deleted file mode 100644 index 4752ab1a39..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/debug.c +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Debugging routines - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_DEBUG_C) - -#include "mbedtls/debug.h" - -#include -#include -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#define mbedtls_snprintf snprintf -#endif - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -#define DEBUG_BUF_SIZE 512 - -static int debug_threshold = 0; - -void mbedtls_debug_set_threshold( int threshold ) -{ - debug_threshold = threshold; -} - -/* - * All calls to f_dbg must be made via this function - */ -static inline void debug_send_line( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *str ) -{ - /* - * If in a threaded environment, we need a thread identifier. - * Since there is no portable way to get one, use the address of the ssl - * context instead, as it shouldn't be shared between threads. - */ -#if defined(MBEDTLS_THREADING_C) - char idstr[20 + DEBUG_BUF_SIZE]; /* 0x + 16 nibbles + ': ' */ - mbedtls_snprintf( idstr, sizeof( idstr ), "%p: %s", ssl, str ); - ssl->conf->f_dbg( ssl->conf->p_dbg, level, file, line, idstr ); -#else - ssl->conf->f_dbg( ssl->conf->p_dbg, level, file, line, str ); -#endif -} - -void mbedtls_debug_print_msg( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *format, ... ) -{ - va_list argp; - char str[DEBUG_BUF_SIZE]; - int ret; - - if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold ) - return; - - va_start( argp, format ); -#if defined(_WIN32) -#if defined(_TRUNCATE) - ret = _vsnprintf_s( str, DEBUG_BUF_SIZE, _TRUNCATE, format, argp ); -#else - ret = _vsnprintf( str, DEBUG_BUF_SIZE, format, argp ); - if( ret < 0 || (size_t) ret == DEBUG_BUF_SIZE ) - { - str[DEBUG_BUF_SIZE-1] = '\0'; - ret = -1; - } -#endif -#else - ret = vsnprintf( str, DEBUG_BUF_SIZE, format, argp ); -#endif - va_end( argp ); - - if( ret >= 0 && ret < DEBUG_BUF_SIZE - 1 ) - { - str[ret] = '\n'; - str[ret + 1] = '\0'; - } - - debug_send_line( ssl, level, file, line, str ); -} - -void mbedtls_debug_print_ret( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, int ret ) -{ - char str[DEBUG_BUF_SIZE]; - - if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold ) - return; - - /* - * With non-blocking I/O and examples that just retry immediately, - * the logs would be quickly flooded with WANT_READ, so ignore that. - * Don't ignore WANT_WRITE however, since is is usually rare. - */ - if( ret == MBEDTLS_ERR_SSL_WANT_READ ) - return; - - mbedtls_snprintf( str, sizeof( str ), "%s() returned %d (-0x%04x)\n", - text, ret, -ret ); - - debug_send_line( ssl, level, file, line, str ); -} - -void mbedtls_debug_print_buf( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, const char *text, - const unsigned char *buf, size_t len ) -{ - char str[DEBUG_BUF_SIZE]; - char txt[17]; - size_t i, idx = 0; - - if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold ) - return; - - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "dumping '%s' (%u bytes)\n", - text, (unsigned int) len ); - - debug_send_line( ssl, level, file, line, str ); - - idx = 0; - memset( txt, 0, sizeof( txt ) ); - for( i = 0; i < len; i++ ) - { - if( i >= 4096 ) - break; - - if( i % 16 == 0 ) - { - if( i > 0 ) - { - mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); - debug_send_line( ssl, level, file, line, str ); - - idx = 0; - memset( txt, 0, sizeof( txt ) ); - } - - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, "%04x: ", - (unsigned int) i ); - - } - - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %02x", - (unsigned int) buf[i] ); - txt[i % 16] = ( buf[i] > 31 && buf[i] < 127 ) ? buf[i] : '.' ; - } - - if( len > 0 ) - { - for( /* i = i */; i % 16 != 0; i++ ) - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " " ); - - mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); - debug_send_line( ssl, level, file, line, str ); - } -} - -#if defined(MBEDTLS_ECP_C) -void mbedtls_debug_print_ecp( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_ecp_point *X ) -{ - char str[DEBUG_BUF_SIZE]; - - if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold ) - return; - - mbedtls_snprintf( str, sizeof( str ), "%s(X)", text ); - mbedtls_debug_print_mpi( ssl, level, file, line, str, &X->X ); - - mbedtls_snprintf( str, sizeof( str ), "%s(Y)", text ); - mbedtls_debug_print_mpi( ssl, level, file, line, str, &X->Y ); -} -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_BIGNUM_C) -void mbedtls_debug_print_mpi( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_mpi *X ) -{ - char str[DEBUG_BUF_SIZE]; - int j, k, zeros = 1; - size_t i, n, idx = 0; - - if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || X == NULL || level > debug_threshold ) - return; - - for( n = X->n - 1; n > 0; n-- ) - if( X->p[n] != 0 ) - break; - - for( j = ( sizeof(mbedtls_mpi_uint) << 3 ) - 1; j >= 0; j-- ) - if( ( ( X->p[n] >> j ) & 1 ) != 0 ) - break; - - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "value of '%s' (%d bits) is:\n", - text, (int) ( ( n * ( sizeof(mbedtls_mpi_uint) << 3 ) ) + j + 1 ) ); - - debug_send_line( ssl, level, file, line, str ); - - idx = 0; - for( i = n + 1, j = 0; i > 0; i-- ) - { - if( zeros && X->p[i - 1] == 0 ) - continue; - - for( k = sizeof( mbedtls_mpi_uint ) - 1; k >= 0; k-- ) - { - if( zeros && ( ( X->p[i - 1] >> ( k << 3 ) ) & 0xFF ) == 0 ) - continue; - else - zeros = 0; - - if( j % 16 == 0 ) - { - if( j > 0 ) - { - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "\n" ); - debug_send_line( ssl, level, file, line, str ); - idx = 0; - } - } - - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %02x", (unsigned int) - ( X->p[i - 1] >> ( k << 3 ) ) & 0xFF ); - - j++; - } - - } - - if( zeros == 1 ) - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " 00" ); - - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "\n" ); - debug_send_line( ssl, level, file, line, str ); -} -#endif /* MBEDTLS_BIGNUM_C */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -static void debug_print_pk( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_pk_context *pk ) -{ - size_t i; - mbedtls_pk_debug_item items[MBEDTLS_PK_DEBUG_MAX_ITEMS]; - char name[16]; - - memset( items, 0, sizeof( items ) ); - - if( mbedtls_pk_debug( pk, items ) != 0 ) - { - debug_send_line( ssl, level, file, line, - "invalid PK context\n" ); - return; - } - - for( i = 0; i < MBEDTLS_PK_DEBUG_MAX_ITEMS; i++ ) - { - if( items[i].type == MBEDTLS_PK_DEBUG_NONE ) - return; - - mbedtls_snprintf( name, sizeof( name ), "%s%s", text, items[i].name ); - name[sizeof( name ) - 1] = '\0'; - - if( items[i].type == MBEDTLS_PK_DEBUG_MPI ) - mbedtls_debug_print_mpi( ssl, level, file, line, name, items[i].value ); - else -#if defined(MBEDTLS_ECP_C) - if( items[i].type == MBEDTLS_PK_DEBUG_ECP ) - mbedtls_debug_print_ecp( ssl, level, file, line, name, items[i].value ); - else -#endif - debug_send_line( ssl, level, file, line, - "should not happen\n" ); - } -} - -static void debug_print_line_by_line( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, const char *text ) -{ - char str[DEBUG_BUF_SIZE]; - const char *start, *cur; - - start = text; - for( cur = text; *cur != '\0'; cur++ ) - { - if( *cur == '\n' ) - { - size_t len = cur - start + 1; - if( len > DEBUG_BUF_SIZE - 1 ) - len = DEBUG_BUF_SIZE - 1; - - memcpy( str, start, len ); - str[len] = '\0'; - - debug_send_line( ssl, level, file, line, str ); - - start = cur + 1; - } - } -} - -void mbedtls_debug_print_crt( const mbedtls_ssl_context *ssl, int level, - const char *file, int line, - const char *text, const mbedtls_x509_crt *crt ) -{ - char str[DEBUG_BUF_SIZE]; - int i = 0; - - if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || crt == NULL || level > debug_threshold ) - return; - - while( crt != NULL ) - { - char buf[1024]; - - mbedtls_snprintf( str, sizeof( str ), "%s #%d:\n", text, ++i ); - debug_send_line( ssl, level, file, line, str ); - - mbedtls_x509_crt_info( buf, sizeof( buf ) - 1, "", crt ); - debug_print_line_by_line( ssl, level, file, line, buf ); - - debug_print_pk( ssl, level, file, line, "crt->", &crt->pk ); - - crt = crt->next; - } -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#endif /* MBEDTLS_DEBUG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/des.c b/build/premake/premake5/contrib/mbedtls/library/des.c deleted file mode 100644 index 61f214af31..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/des.c +++ /dev/null @@ -1,1061 +0,0 @@ -/* - * FIPS-46-3 compliant Triple-DES implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * DES, on which TDES is based, was originally designed by Horst Feistel - * at IBM in 1974, and was adopted as a standard by NIST (formerly NBS). - * - * http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_DES_C) - -#include "mbedtls/des.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_DES_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -/* - * Expanded DES S-boxes - */ -static const uint32_t SB1[64] = -{ - 0x01010400, 0x00000000, 0x00010000, 0x01010404, - 0x01010004, 0x00010404, 0x00000004, 0x00010000, - 0x00000400, 0x01010400, 0x01010404, 0x00000400, - 0x01000404, 0x01010004, 0x01000000, 0x00000004, - 0x00000404, 0x01000400, 0x01000400, 0x00010400, - 0x00010400, 0x01010000, 0x01010000, 0x01000404, - 0x00010004, 0x01000004, 0x01000004, 0x00010004, - 0x00000000, 0x00000404, 0x00010404, 0x01000000, - 0x00010000, 0x01010404, 0x00000004, 0x01010000, - 0x01010400, 0x01000000, 0x01000000, 0x00000400, - 0x01010004, 0x00010000, 0x00010400, 0x01000004, - 0x00000400, 0x00000004, 0x01000404, 0x00010404, - 0x01010404, 0x00010004, 0x01010000, 0x01000404, - 0x01000004, 0x00000404, 0x00010404, 0x01010400, - 0x00000404, 0x01000400, 0x01000400, 0x00000000, - 0x00010004, 0x00010400, 0x00000000, 0x01010004 -}; - -static const uint32_t SB2[64] = -{ - 0x80108020, 0x80008000, 0x00008000, 0x00108020, - 0x00100000, 0x00000020, 0x80100020, 0x80008020, - 0x80000020, 0x80108020, 0x80108000, 0x80000000, - 0x80008000, 0x00100000, 0x00000020, 0x80100020, - 0x00108000, 0x00100020, 0x80008020, 0x00000000, - 0x80000000, 0x00008000, 0x00108020, 0x80100000, - 0x00100020, 0x80000020, 0x00000000, 0x00108000, - 0x00008020, 0x80108000, 0x80100000, 0x00008020, - 0x00000000, 0x00108020, 0x80100020, 0x00100000, - 0x80008020, 0x80100000, 0x80108000, 0x00008000, - 0x80100000, 0x80008000, 0x00000020, 0x80108020, - 0x00108020, 0x00000020, 0x00008000, 0x80000000, - 0x00008020, 0x80108000, 0x00100000, 0x80000020, - 0x00100020, 0x80008020, 0x80000020, 0x00100020, - 0x00108000, 0x00000000, 0x80008000, 0x00008020, - 0x80000000, 0x80100020, 0x80108020, 0x00108000 -}; - -static const uint32_t SB3[64] = -{ - 0x00000208, 0x08020200, 0x00000000, 0x08020008, - 0x08000200, 0x00000000, 0x00020208, 0x08000200, - 0x00020008, 0x08000008, 0x08000008, 0x00020000, - 0x08020208, 0x00020008, 0x08020000, 0x00000208, - 0x08000000, 0x00000008, 0x08020200, 0x00000200, - 0x00020200, 0x08020000, 0x08020008, 0x00020208, - 0x08000208, 0x00020200, 0x00020000, 0x08000208, - 0x00000008, 0x08020208, 0x00000200, 0x08000000, - 0x08020200, 0x08000000, 0x00020008, 0x00000208, - 0x00020000, 0x08020200, 0x08000200, 0x00000000, - 0x00000200, 0x00020008, 0x08020208, 0x08000200, - 0x08000008, 0x00000200, 0x00000000, 0x08020008, - 0x08000208, 0x00020000, 0x08000000, 0x08020208, - 0x00000008, 0x00020208, 0x00020200, 0x08000008, - 0x08020000, 0x08000208, 0x00000208, 0x08020000, - 0x00020208, 0x00000008, 0x08020008, 0x00020200 -}; - -static const uint32_t SB4[64] = -{ - 0x00802001, 0x00002081, 0x00002081, 0x00000080, - 0x00802080, 0x00800081, 0x00800001, 0x00002001, - 0x00000000, 0x00802000, 0x00802000, 0x00802081, - 0x00000081, 0x00000000, 0x00800080, 0x00800001, - 0x00000001, 0x00002000, 0x00800000, 0x00802001, - 0x00000080, 0x00800000, 0x00002001, 0x00002080, - 0x00800081, 0x00000001, 0x00002080, 0x00800080, - 0x00002000, 0x00802080, 0x00802081, 0x00000081, - 0x00800080, 0x00800001, 0x00802000, 0x00802081, - 0x00000081, 0x00000000, 0x00000000, 0x00802000, - 0x00002080, 0x00800080, 0x00800081, 0x00000001, - 0x00802001, 0x00002081, 0x00002081, 0x00000080, - 0x00802081, 0x00000081, 0x00000001, 0x00002000, - 0x00800001, 0x00002001, 0x00802080, 0x00800081, - 0x00002001, 0x00002080, 0x00800000, 0x00802001, - 0x00000080, 0x00800000, 0x00002000, 0x00802080 -}; - -static const uint32_t SB5[64] = -{ - 0x00000100, 0x02080100, 0x02080000, 0x42000100, - 0x00080000, 0x00000100, 0x40000000, 0x02080000, - 0x40080100, 0x00080000, 0x02000100, 0x40080100, - 0x42000100, 0x42080000, 0x00080100, 0x40000000, - 0x02000000, 0x40080000, 0x40080000, 0x00000000, - 0x40000100, 0x42080100, 0x42080100, 0x02000100, - 0x42080000, 0x40000100, 0x00000000, 0x42000000, - 0x02080100, 0x02000000, 0x42000000, 0x00080100, - 0x00080000, 0x42000100, 0x00000100, 0x02000000, - 0x40000000, 0x02080000, 0x42000100, 0x40080100, - 0x02000100, 0x40000000, 0x42080000, 0x02080100, - 0x40080100, 0x00000100, 0x02000000, 0x42080000, - 0x42080100, 0x00080100, 0x42000000, 0x42080100, - 0x02080000, 0x00000000, 0x40080000, 0x42000000, - 0x00080100, 0x02000100, 0x40000100, 0x00080000, - 0x00000000, 0x40080000, 0x02080100, 0x40000100 -}; - -static const uint32_t SB6[64] = -{ - 0x20000010, 0x20400000, 0x00004000, 0x20404010, - 0x20400000, 0x00000010, 0x20404010, 0x00400000, - 0x20004000, 0x00404010, 0x00400000, 0x20000010, - 0x00400010, 0x20004000, 0x20000000, 0x00004010, - 0x00000000, 0x00400010, 0x20004010, 0x00004000, - 0x00404000, 0x20004010, 0x00000010, 0x20400010, - 0x20400010, 0x00000000, 0x00404010, 0x20404000, - 0x00004010, 0x00404000, 0x20404000, 0x20000000, - 0x20004000, 0x00000010, 0x20400010, 0x00404000, - 0x20404010, 0x00400000, 0x00004010, 0x20000010, - 0x00400000, 0x20004000, 0x20000000, 0x00004010, - 0x20000010, 0x20404010, 0x00404000, 0x20400000, - 0x00404010, 0x20404000, 0x00000000, 0x20400010, - 0x00000010, 0x00004000, 0x20400000, 0x00404010, - 0x00004000, 0x00400010, 0x20004010, 0x00000000, - 0x20404000, 0x20000000, 0x00400010, 0x20004010 -}; - -static const uint32_t SB7[64] = -{ - 0x00200000, 0x04200002, 0x04000802, 0x00000000, - 0x00000800, 0x04000802, 0x00200802, 0x04200800, - 0x04200802, 0x00200000, 0x00000000, 0x04000002, - 0x00000002, 0x04000000, 0x04200002, 0x00000802, - 0x04000800, 0x00200802, 0x00200002, 0x04000800, - 0x04000002, 0x04200000, 0x04200800, 0x00200002, - 0x04200000, 0x00000800, 0x00000802, 0x04200802, - 0x00200800, 0x00000002, 0x04000000, 0x00200800, - 0x04000000, 0x00200800, 0x00200000, 0x04000802, - 0x04000802, 0x04200002, 0x04200002, 0x00000002, - 0x00200002, 0x04000000, 0x04000800, 0x00200000, - 0x04200800, 0x00000802, 0x00200802, 0x04200800, - 0x00000802, 0x04000002, 0x04200802, 0x04200000, - 0x00200800, 0x00000000, 0x00000002, 0x04200802, - 0x00000000, 0x00200802, 0x04200000, 0x00000800, - 0x04000002, 0x04000800, 0x00000800, 0x00200002 -}; - -static const uint32_t SB8[64] = -{ - 0x10001040, 0x00001000, 0x00040000, 0x10041040, - 0x10000000, 0x10001040, 0x00000040, 0x10000000, - 0x00040040, 0x10040000, 0x10041040, 0x00041000, - 0x10041000, 0x00041040, 0x00001000, 0x00000040, - 0x10040000, 0x10000040, 0x10001000, 0x00001040, - 0x00041000, 0x00040040, 0x10040040, 0x10041000, - 0x00001040, 0x00000000, 0x00000000, 0x10040040, - 0x10000040, 0x10001000, 0x00041040, 0x00040000, - 0x00041040, 0x00040000, 0x10041000, 0x00001000, - 0x00000040, 0x10040040, 0x00001000, 0x00041040, - 0x10001000, 0x00000040, 0x10000040, 0x10040000, - 0x10040040, 0x10000000, 0x00040000, 0x10001040, - 0x00000000, 0x10041040, 0x00040040, 0x10000040, - 0x10040000, 0x10001000, 0x10001040, 0x00000000, - 0x10041040, 0x00041000, 0x00041000, 0x00001040, - 0x00001040, 0x00040040, 0x10000000, 0x10041000 -}; - -/* - * PC1: left and right halves bit-swap - */ -static const uint32_t LHs[16] = -{ - 0x00000000, 0x00000001, 0x00000100, 0x00000101, - 0x00010000, 0x00010001, 0x00010100, 0x00010101, - 0x01000000, 0x01000001, 0x01000100, 0x01000101, - 0x01010000, 0x01010001, 0x01010100, 0x01010101 -}; - -static const uint32_t RHs[16] = -{ - 0x00000000, 0x01000000, 0x00010000, 0x01010000, - 0x00000100, 0x01000100, 0x00010100, 0x01010100, - 0x00000001, 0x01000001, 0x00010001, 0x01010001, - 0x00000101, 0x01000101, 0x00010101, 0x01010101, -}; - -/* - * Initial Permutation macro - */ -#define DES_IP(X,Y) \ -{ \ - T = ((X >> 4) ^ Y) & 0x0F0F0F0F; Y ^= T; X ^= (T << 4); \ - T = ((X >> 16) ^ Y) & 0x0000FFFF; Y ^= T; X ^= (T << 16); \ - T = ((Y >> 2) ^ X) & 0x33333333; X ^= T; Y ^= (T << 2); \ - T = ((Y >> 8) ^ X) & 0x00FF00FF; X ^= T; Y ^= (T << 8); \ - Y = ((Y << 1) | (Y >> 31)) & 0xFFFFFFFF; \ - T = (X ^ Y) & 0xAAAAAAAA; Y ^= T; X ^= T; \ - X = ((X << 1) | (X >> 31)) & 0xFFFFFFFF; \ -} - -/* - * Final Permutation macro - */ -#define DES_FP(X,Y) \ -{ \ - X = ((X << 31) | (X >> 1)) & 0xFFFFFFFF; \ - T = (X ^ Y) & 0xAAAAAAAA; X ^= T; Y ^= T; \ - Y = ((Y << 31) | (Y >> 1)) & 0xFFFFFFFF; \ - T = ((Y >> 8) ^ X) & 0x00FF00FF; X ^= T; Y ^= (T << 8); \ - T = ((Y >> 2) ^ X) & 0x33333333; X ^= T; Y ^= (T << 2); \ - T = ((X >> 16) ^ Y) & 0x0000FFFF; Y ^= T; X ^= (T << 16); \ - T = ((X >> 4) ^ Y) & 0x0F0F0F0F; Y ^= T; X ^= (T << 4); \ -} - -/* - * DES round macro - */ -#define DES_ROUND(X,Y) \ -{ \ - T = *SK++ ^ X; \ - Y ^= SB8[ (T ) & 0x3F ] ^ \ - SB6[ (T >> 8) & 0x3F ] ^ \ - SB4[ (T >> 16) & 0x3F ] ^ \ - SB2[ (T >> 24) & 0x3F ]; \ - \ - T = *SK++ ^ ((X << 28) | (X >> 4)); \ - Y ^= SB7[ (T ) & 0x3F ] ^ \ - SB5[ (T >> 8) & 0x3F ] ^ \ - SB3[ (T >> 16) & 0x3F ] ^ \ - SB1[ (T >> 24) & 0x3F ]; \ -} - -#define SWAP(a,b) { uint32_t t = a; a = b; b = t; t = 0; } - -void mbedtls_des_init( mbedtls_des_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_des_context ) ); -} - -void mbedtls_des_free( mbedtls_des_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_des_context ) ); -} - -void mbedtls_des3_init( mbedtls_des3_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_des3_context ) ); -} - -void mbedtls_des3_free( mbedtls_des3_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_des3_context ) ); -} - -static const unsigned char odd_parity_table[128] = { 1, 2, 4, 7, 8, - 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 31, 32, 35, 37, 38, 41, 42, 44, - 47, 49, 50, 52, 55, 56, 59, 61, 62, 64, 67, 69, 70, 73, 74, 76, 79, 81, - 82, 84, 87, 88, 91, 93, 94, 97, 98, 100, 103, 104, 107, 109, 110, 112, - 115, 117, 118, 121, 122, 124, 127, 128, 131, 133, 134, 137, 138, 140, - 143, 145, 146, 148, 151, 152, 155, 157, 158, 161, 162, 164, 167, 168, - 171, 173, 174, 176, 179, 181, 182, 185, 186, 188, 191, 193, 194, 196, - 199, 200, 203, 205, 206, 208, 211, 213, 214, 217, 218, 220, 223, 224, - 227, 229, 230, 233, 234, 236, 239, 241, 242, 244, 247, 248, 251, 253, - 254 }; - -void mbedtls_des_key_set_parity( unsigned char key[MBEDTLS_DES_KEY_SIZE] ) -{ - int i; - - for( i = 0; i < MBEDTLS_DES_KEY_SIZE; i++ ) - key[i] = odd_parity_table[key[i] / 2]; -} - -/* - * Check the given key's parity, returns 1 on failure, 0 on SUCCESS - */ -int mbedtls_des_key_check_key_parity( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) -{ - int i; - - for( i = 0; i < MBEDTLS_DES_KEY_SIZE; i++ ) - if( key[i] != odd_parity_table[key[i] / 2] ) - return( 1 ); - - return( 0 ); -} - -/* - * Table of weak and semi-weak keys - * - * Source: http://en.wikipedia.org/wiki/Weak_key - * - * Weak: - * Alternating ones + zeros (0x0101010101010101) - * Alternating 'F' + 'E' (0xFEFEFEFEFEFEFEFE) - * '0xE0E0E0E0F1F1F1F1' - * '0x1F1F1F1F0E0E0E0E' - * - * Semi-weak: - * 0x011F011F010E010E and 0x1F011F010E010E01 - * 0x01E001E001F101F1 and 0xE001E001F101F101 - * 0x01FE01FE01FE01FE and 0xFE01FE01FE01FE01 - * 0x1FE01FE00EF10EF1 and 0xE01FE01FF10EF10E - * 0x1FFE1FFE0EFE0EFE and 0xFE1FFE1FFE0EFE0E - * 0xE0FEE0FEF1FEF1FE and 0xFEE0FEE0FEF1FEF1 - * - */ - -#define WEAK_KEY_COUNT 16 - -static const unsigned char weak_key_table[WEAK_KEY_COUNT][MBEDTLS_DES_KEY_SIZE] = -{ - { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }, - { 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE }, - { 0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E }, - { 0xE0, 0xE0, 0xE0, 0xE0, 0xF1, 0xF1, 0xF1, 0xF1 }, - - { 0x01, 0x1F, 0x01, 0x1F, 0x01, 0x0E, 0x01, 0x0E }, - { 0x1F, 0x01, 0x1F, 0x01, 0x0E, 0x01, 0x0E, 0x01 }, - { 0x01, 0xE0, 0x01, 0xE0, 0x01, 0xF1, 0x01, 0xF1 }, - { 0xE0, 0x01, 0xE0, 0x01, 0xF1, 0x01, 0xF1, 0x01 }, - { 0x01, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0xFE }, - { 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01, 0xFE, 0x01 }, - { 0x1F, 0xE0, 0x1F, 0xE0, 0x0E, 0xF1, 0x0E, 0xF1 }, - { 0xE0, 0x1F, 0xE0, 0x1F, 0xF1, 0x0E, 0xF1, 0x0E }, - { 0x1F, 0xFE, 0x1F, 0xFE, 0x0E, 0xFE, 0x0E, 0xFE }, - { 0xFE, 0x1F, 0xFE, 0x1F, 0xFE, 0x0E, 0xFE, 0x0E }, - { 0xE0, 0xFE, 0xE0, 0xFE, 0xF1, 0xFE, 0xF1, 0xFE }, - { 0xFE, 0xE0, 0xFE, 0xE0, 0xFE, 0xF1, 0xFE, 0xF1 } -}; - -int mbedtls_des_key_check_weak( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) -{ - int i; - - for( i = 0; i < WEAK_KEY_COUNT; i++ ) - if( memcmp( weak_key_table[i], key, MBEDTLS_DES_KEY_SIZE) == 0 ) - return( 1 ); - - return( 0 ); -} - -#if !defined(MBEDTLS_DES_SETKEY_ALT) -void mbedtls_des_setkey( uint32_t SK[32], const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) -{ - int i; - uint32_t X, Y, T; - - GET_UINT32_BE( X, key, 0 ); - GET_UINT32_BE( Y, key, 4 ); - - /* - * Permuted Choice 1 - */ - T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4); - T = ((Y ) ^ X) & 0x10101010; X ^= T; Y ^= (T ); - - X = (LHs[ (X ) & 0xF] << 3) | (LHs[ (X >> 8) & 0xF ] << 2) - | (LHs[ (X >> 16) & 0xF] << 1) | (LHs[ (X >> 24) & 0xF ] ) - | (LHs[ (X >> 5) & 0xF] << 7) | (LHs[ (X >> 13) & 0xF ] << 6) - | (LHs[ (X >> 21) & 0xF] << 5) | (LHs[ (X >> 29) & 0xF ] << 4); - - Y = (RHs[ (Y >> 1) & 0xF] << 3) | (RHs[ (Y >> 9) & 0xF ] << 2) - | (RHs[ (Y >> 17) & 0xF] << 1) | (RHs[ (Y >> 25) & 0xF ] ) - | (RHs[ (Y >> 4) & 0xF] << 7) | (RHs[ (Y >> 12) & 0xF ] << 6) - | (RHs[ (Y >> 20) & 0xF] << 5) | (RHs[ (Y >> 28) & 0xF ] << 4); - - X &= 0x0FFFFFFF; - Y &= 0x0FFFFFFF; - - /* - * calculate subkeys - */ - for( i = 0; i < 16; i++ ) - { - if( i < 2 || i == 8 || i == 15 ) - { - X = ((X << 1) | (X >> 27)) & 0x0FFFFFFF; - Y = ((Y << 1) | (Y >> 27)) & 0x0FFFFFFF; - } - else - { - X = ((X << 2) | (X >> 26)) & 0x0FFFFFFF; - Y = ((Y << 2) | (Y >> 26)) & 0x0FFFFFFF; - } - - *SK++ = ((X << 4) & 0x24000000) | ((X << 28) & 0x10000000) - | ((X << 14) & 0x08000000) | ((X << 18) & 0x02080000) - | ((X << 6) & 0x01000000) | ((X << 9) & 0x00200000) - | ((X >> 1) & 0x00100000) | ((X << 10) & 0x00040000) - | ((X << 2) & 0x00020000) | ((X >> 10) & 0x00010000) - | ((Y >> 13) & 0x00002000) | ((Y >> 4) & 0x00001000) - | ((Y << 6) & 0x00000800) | ((Y >> 1) & 0x00000400) - | ((Y >> 14) & 0x00000200) | ((Y ) & 0x00000100) - | ((Y >> 5) & 0x00000020) | ((Y >> 10) & 0x00000010) - | ((Y >> 3) & 0x00000008) | ((Y >> 18) & 0x00000004) - | ((Y >> 26) & 0x00000002) | ((Y >> 24) & 0x00000001); - - *SK++ = ((X << 15) & 0x20000000) | ((X << 17) & 0x10000000) - | ((X << 10) & 0x08000000) | ((X << 22) & 0x04000000) - | ((X >> 2) & 0x02000000) | ((X << 1) & 0x01000000) - | ((X << 16) & 0x00200000) | ((X << 11) & 0x00100000) - | ((X << 3) & 0x00080000) | ((X >> 6) & 0x00040000) - | ((X << 15) & 0x00020000) | ((X >> 4) & 0x00010000) - | ((Y >> 2) & 0x00002000) | ((Y << 8) & 0x00001000) - | ((Y >> 14) & 0x00000808) | ((Y >> 9) & 0x00000400) - | ((Y ) & 0x00000200) | ((Y << 7) & 0x00000100) - | ((Y >> 7) & 0x00000020) | ((Y >> 3) & 0x00000011) - | ((Y << 2) & 0x00000004) | ((Y >> 21) & 0x00000002); - } -} -#endif /* !MBEDTLS_DES_SETKEY_ALT */ - -/* - * DES key schedule (56-bit, encryption) - */ -int mbedtls_des_setkey_enc( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) -{ - mbedtls_des_setkey( ctx->sk, key ); - - return( 0 ); -} - -/* - * DES key schedule (56-bit, decryption) - */ -int mbedtls_des_setkey_dec( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) -{ - int i; - - mbedtls_des_setkey( ctx->sk, key ); - - for( i = 0; i < 16; i += 2 ) - { - SWAP( ctx->sk[i ], ctx->sk[30 - i] ); - SWAP( ctx->sk[i + 1], ctx->sk[31 - i] ); - } - - return( 0 ); -} - -static void des3_set2key( uint32_t esk[96], - uint32_t dsk[96], - const unsigned char key[MBEDTLS_DES_KEY_SIZE*2] ) -{ - int i; - - mbedtls_des_setkey( esk, key ); - mbedtls_des_setkey( dsk + 32, key + 8 ); - - for( i = 0; i < 32; i += 2 ) - { - dsk[i ] = esk[30 - i]; - dsk[i + 1] = esk[31 - i]; - - esk[i + 32] = dsk[62 - i]; - esk[i + 33] = dsk[63 - i]; - - esk[i + 64] = esk[i ]; - esk[i + 65] = esk[i + 1]; - - dsk[i + 64] = dsk[i ]; - dsk[i + 65] = dsk[i + 1]; - } -} - -/* - * Triple-DES key schedule (112-bit, encryption) - */ -int mbedtls_des3_set2key_enc( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ) -{ - uint32_t sk[96]; - - des3_set2key( ctx->sk, sk, key ); - mbedtls_zeroize( sk, sizeof( sk ) ); - - return( 0 ); -} - -/* - * Triple-DES key schedule (112-bit, decryption) - */ -int mbedtls_des3_set2key_dec( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ) -{ - uint32_t sk[96]; - - des3_set2key( sk, ctx->sk, key ); - mbedtls_zeroize( sk, sizeof( sk ) ); - - return( 0 ); -} - -static void des3_set3key( uint32_t esk[96], - uint32_t dsk[96], - const unsigned char key[24] ) -{ - int i; - - mbedtls_des_setkey( esk, key ); - mbedtls_des_setkey( dsk + 32, key + 8 ); - mbedtls_des_setkey( esk + 64, key + 16 ); - - for( i = 0; i < 32; i += 2 ) - { - dsk[i ] = esk[94 - i]; - dsk[i + 1] = esk[95 - i]; - - esk[i + 32] = dsk[62 - i]; - esk[i + 33] = dsk[63 - i]; - - dsk[i + 64] = esk[30 - i]; - dsk[i + 65] = esk[31 - i]; - } -} - -/* - * Triple-DES key schedule (168-bit, encryption) - */ -int mbedtls_des3_set3key_enc( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ) -{ - uint32_t sk[96]; - - des3_set3key( ctx->sk, sk, key ); - mbedtls_zeroize( sk, sizeof( sk ) ); - - return( 0 ); -} - -/* - * Triple-DES key schedule (168-bit, decryption) - */ -int mbedtls_des3_set3key_dec( mbedtls_des3_context *ctx, - const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ) -{ - uint32_t sk[96]; - - des3_set3key( sk, ctx->sk, key ); - mbedtls_zeroize( sk, sizeof( sk ) ); - - return( 0 ); -} - -/* - * DES-ECB block encryption/decryption - */ -#if !defined(MBEDTLS_DES_CRYPT_ECB_ALT) -int mbedtls_des_crypt_ecb( mbedtls_des_context *ctx, - const unsigned char input[8], - unsigned char output[8] ) -{ - int i; - uint32_t X, Y, T, *SK; - - SK = ctx->sk; - - GET_UINT32_BE( X, input, 0 ); - GET_UINT32_BE( Y, input, 4 ); - - DES_IP( X, Y ); - - for( i = 0; i < 8; i++ ) - { - DES_ROUND( Y, X ); - DES_ROUND( X, Y ); - } - - DES_FP( Y, X ); - - PUT_UINT32_BE( Y, output, 0 ); - PUT_UINT32_BE( X, output, 4 ); - - return( 0 ); -} -#endif /* !MBEDTLS_DES_CRYPT_ECB_ALT */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * DES-CBC buffer encryption/decryption - */ -int mbedtls_des_crypt_cbc( mbedtls_des_context *ctx, - int mode, - size_t length, - unsigned char iv[8], - const unsigned char *input, - unsigned char *output ) -{ - int i; - unsigned char temp[8]; - - if( length % 8 ) - return( MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH ); - - if( mode == MBEDTLS_DES_ENCRYPT ) - { - while( length > 0 ) - { - for( i = 0; i < 8; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); - - mbedtls_des_crypt_ecb( ctx, output, output ); - memcpy( iv, output, 8 ); - - input += 8; - output += 8; - length -= 8; - } - } - else /* MBEDTLS_DES_DECRYPT */ - { - while( length > 0 ) - { - memcpy( temp, input, 8 ); - mbedtls_des_crypt_ecb( ctx, input, output ); - - for( i = 0; i < 8; i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); - - memcpy( iv, temp, 8 ); - - input += 8; - output += 8; - length -= 8; - } - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -/* - * 3DES-ECB block encryption/decryption - */ -#if !defined(MBEDTLS_DES3_CRYPT_ECB_ALT) -int mbedtls_des3_crypt_ecb( mbedtls_des3_context *ctx, - const unsigned char input[8], - unsigned char output[8] ) -{ - int i; - uint32_t X, Y, T, *SK; - - SK = ctx->sk; - - GET_UINT32_BE( X, input, 0 ); - GET_UINT32_BE( Y, input, 4 ); - - DES_IP( X, Y ); - - for( i = 0; i < 8; i++ ) - { - DES_ROUND( Y, X ); - DES_ROUND( X, Y ); - } - - for( i = 0; i < 8; i++ ) - { - DES_ROUND( X, Y ); - DES_ROUND( Y, X ); - } - - for( i = 0; i < 8; i++ ) - { - DES_ROUND( Y, X ); - DES_ROUND( X, Y ); - } - - DES_FP( Y, X ); - - PUT_UINT32_BE( Y, output, 0 ); - PUT_UINT32_BE( X, output, 4 ); - - return( 0 ); -} -#endif /* !MBEDTLS_DES3_CRYPT_ECB_ALT */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * 3DES-CBC buffer encryption/decryption - */ -int mbedtls_des3_crypt_cbc( mbedtls_des3_context *ctx, - int mode, - size_t length, - unsigned char iv[8], - const unsigned char *input, - unsigned char *output ) -{ - int i; - unsigned char temp[8]; - - if( length % 8 ) - return( MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH ); - - if( mode == MBEDTLS_DES_ENCRYPT ) - { - while( length > 0 ) - { - for( i = 0; i < 8; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); - - mbedtls_des3_crypt_ecb( ctx, output, output ); - memcpy( iv, output, 8 ); - - input += 8; - output += 8; - length -= 8; - } - } - else /* MBEDTLS_DES_DECRYPT */ - { - while( length > 0 ) - { - memcpy( temp, input, 8 ); - mbedtls_des3_crypt_ecb( ctx, input, output ); - - for( i = 0; i < 8; i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); - - memcpy( iv, temp, 8 ); - - input += 8; - output += 8; - length -= 8; - } - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#endif /* !MBEDTLS_DES_ALT */ - -#if defined(MBEDTLS_SELF_TEST) -/* - * DES and 3DES test vectors from: - * - * http://csrc.nist.gov/groups/STM/cavp/documents/des/tripledes-vectors.zip - */ -static const unsigned char des3_test_keys[24] = -{ - 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, - 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, - 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23 -}; - -static const unsigned char des3_test_buf[8] = -{ - 0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 -}; - -static const unsigned char des3_test_ecb_dec[3][8] = -{ - { 0xCD, 0xD6, 0x4F, 0x2F, 0x94, 0x27, 0xC1, 0x5D }, - { 0x69, 0x96, 0xC8, 0xFA, 0x47, 0xA2, 0xAB, 0xEB }, - { 0x83, 0x25, 0x39, 0x76, 0x44, 0x09, 0x1A, 0x0A } -}; - -static const unsigned char des3_test_ecb_enc[3][8] = -{ - { 0x6A, 0x2A, 0x19, 0xF4, 0x1E, 0xCA, 0x85, 0x4B }, - { 0x03, 0xE6, 0x9F, 0x5B, 0xFA, 0x58, 0xEB, 0x42 }, - { 0xDD, 0x17, 0xE8, 0xB8, 0xB4, 0x37, 0xD2, 0x32 } -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const unsigned char des3_test_iv[8] = -{ - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, -}; - -static const unsigned char des3_test_cbc_dec[3][8] = -{ - { 0x12, 0x9F, 0x40, 0xB9, 0xD2, 0x00, 0x56, 0xB3 }, - { 0x47, 0x0E, 0xFC, 0x9A, 0x6B, 0x8E, 0xE3, 0x93 }, - { 0xC5, 0xCE, 0xCF, 0x63, 0xEC, 0xEC, 0x51, 0x4C } -}; - -static const unsigned char des3_test_cbc_enc[3][8] = -{ - { 0x54, 0xF1, 0x5A, 0xF6, 0xEB, 0xE3, 0xA4, 0xB4 }, - { 0x35, 0x76, 0x11, 0x56, 0x5F, 0xA1, 0x8E, 0x4D }, - { 0xCB, 0x19, 0x1F, 0x85, 0xD1, 0xED, 0x84, 0x39 } -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -/* - * Checkup routine - */ -int mbedtls_des_self_test( int verbose ) -{ - int i, j, u, v, ret = 0; - mbedtls_des_context ctx; - mbedtls_des3_context ctx3; - unsigned char buf[8]; -#if defined(MBEDTLS_CIPHER_MODE_CBC) - unsigned char prv[8]; - unsigned char iv[8]; -#endif - - mbedtls_des_init( &ctx ); - mbedtls_des3_init( &ctx3 ); - /* - * ECB mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " DES%c-ECB-%3d (%s): ", - ( u == 0 ) ? ' ' : '3', 56 + u * 56, - ( v == MBEDTLS_DES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( buf, des3_test_buf, 8 ); - - switch( i ) - { - case 0: - mbedtls_des_setkey_dec( &ctx, des3_test_keys ); - break; - - case 1: - mbedtls_des_setkey_enc( &ctx, des3_test_keys ); - break; - - case 2: - mbedtls_des3_set2key_dec( &ctx3, des3_test_keys ); - break; - - case 3: - mbedtls_des3_set2key_enc( &ctx3, des3_test_keys ); - break; - - case 4: - mbedtls_des3_set3key_dec( &ctx3, des3_test_keys ); - break; - - case 5: - mbedtls_des3_set3key_enc( &ctx3, des3_test_keys ); - break; - - default: - return( 1 ); - } - - for( j = 0; j < 10000; j++ ) - { - if( u == 0 ) - mbedtls_des_crypt_ecb( &ctx, buf, buf ); - else - mbedtls_des3_crypt_ecb( &ctx3, buf, buf ); - } - - if( ( v == MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_ecb_dec[u], 8 ) != 0 ) || - ( v != MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_ecb_enc[u], 8 ) != 0 ) ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /* - * CBC mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " DES%c-CBC-%3d (%s): ", - ( u == 0 ) ? ' ' : '3', 56 + u * 56, - ( v == MBEDTLS_DES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( iv, des3_test_iv, 8 ); - memcpy( prv, des3_test_iv, 8 ); - memcpy( buf, des3_test_buf, 8 ); - - switch( i ) - { - case 0: - mbedtls_des_setkey_dec( &ctx, des3_test_keys ); - break; - - case 1: - mbedtls_des_setkey_enc( &ctx, des3_test_keys ); - break; - - case 2: - mbedtls_des3_set2key_dec( &ctx3, des3_test_keys ); - break; - - case 3: - mbedtls_des3_set2key_enc( &ctx3, des3_test_keys ); - break; - - case 4: - mbedtls_des3_set3key_dec( &ctx3, des3_test_keys ); - break; - - case 5: - mbedtls_des3_set3key_enc( &ctx3, des3_test_keys ); - break; - - default: - return( 1 ); - } - - if( v == MBEDTLS_DES_DECRYPT ) - { - for( j = 0; j < 10000; j++ ) - { - if( u == 0 ) - mbedtls_des_crypt_cbc( &ctx, v, 8, iv, buf, buf ); - else - mbedtls_des3_crypt_cbc( &ctx3, v, 8, iv, buf, buf ); - } - } - else - { - for( j = 0; j < 10000; j++ ) - { - unsigned char tmp[8]; - - if( u == 0 ) - mbedtls_des_crypt_cbc( &ctx, v, 8, iv, buf, buf ); - else - mbedtls_des3_crypt_cbc( &ctx3, v, 8, iv, buf, buf ); - - memcpy( tmp, prv, 8 ); - memcpy( prv, buf, 8 ); - memcpy( buf, tmp, 8 ); - } - - memcpy( buf, prv, 8 ); - } - - if( ( v == MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_cbc_dec[u], 8 ) != 0 ) || - ( v != MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_cbc_enc[u], 8 ) != 0 ) ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_des_free( &ctx ); - mbedtls_des3_free( &ctx3 ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_DES_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/dhm.c b/build/premake/premake5/contrib/mbedtls/library/dhm.c deleted file mode 100644 index 0f4d316432..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/dhm.c +++ /dev/null @@ -1,624 +0,0 @@ -/* - * Diffie-Hellman-Merkle key exchange - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * Reference: - * - * http://www.cacr.math.uwaterloo.ca/hac/ (chapter 12) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_DHM_C) - -#include "mbedtls/dhm.h" - -#include - -#if defined(MBEDTLS_PEM_PARSE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_ASN1_PARSE_C) -#include "mbedtls/asn1.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * helper to validate the mbedtls_mpi size and import it - */ -static int dhm_read_bignum( mbedtls_mpi *X, - unsigned char **p, - const unsigned char *end ) -{ - int ret, n; - - if( end - *p < 2 ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - n = ( (*p)[0] << 8 ) | (*p)[1]; - (*p) += 2; - - if( (int)( end - *p ) < n ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_mpi_read_binary( X, *p, n ) ) != 0 ) - return( MBEDTLS_ERR_DHM_READ_PARAMS_FAILED + ret ); - - (*p) += n; - - return( 0 ); -} - -/* - * Verify sanity of parameter with regards to P - * - * Parameter should be: 2 <= public_param <= P - 2 - * - * For more information on the attack, see: - * http://www.cl.cam.ac.uk/~rja14/Papers/psandqs.pdf - * http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-2643 - */ -static int dhm_check_range( const mbedtls_mpi *param, const mbedtls_mpi *P ) -{ - mbedtls_mpi L, U; - int ret = MBEDTLS_ERR_DHM_BAD_INPUT_DATA; - - mbedtls_mpi_init( &L ); mbedtls_mpi_init( &U ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &L, 2 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &U, P, 2 ) ); - - if( mbedtls_mpi_cmp_mpi( param, &L ) >= 0 && - mbedtls_mpi_cmp_mpi( param, &U ) <= 0 ) - { - ret = 0; - } - -cleanup: - mbedtls_mpi_free( &L ); mbedtls_mpi_free( &U ); - return( ret ); -} - -void mbedtls_dhm_init( mbedtls_dhm_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_dhm_context ) ); -} - -/* - * Parse the ServerKeyExchange parameters - */ -int mbedtls_dhm_read_params( mbedtls_dhm_context *ctx, - unsigned char **p, - const unsigned char *end ) -{ - int ret; - - if( ( ret = dhm_read_bignum( &ctx->P, p, end ) ) != 0 || - ( ret = dhm_read_bignum( &ctx->G, p, end ) ) != 0 || - ( ret = dhm_read_bignum( &ctx->GY, p, end ) ) != 0 ) - return( ret ); - - if( ( ret = dhm_check_range( &ctx->GY, &ctx->P ) ) != 0 ) - return( ret ); - - ctx->len = mbedtls_mpi_size( &ctx->P ); - - return( 0 ); -} - -/* - * Setup and write the ServerKeyExchange parameters - */ -int mbedtls_dhm_make_params( mbedtls_dhm_context *ctx, int x_size, - unsigned char *output, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret, count = 0; - size_t n1, n2, n3; - unsigned char *p; - - if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - /* - * Generate X as large as possible ( < P ) - */ - do - { - mbedtls_mpi_fill_random( &ctx->X, x_size, f_rng, p_rng ); - - while( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->X, 1 ) ); - - if( count++ > 10 ) - return( MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED ); - } - while( dhm_check_range( &ctx->X, &ctx->P ) != 0 ); - - /* - * Calculate GX = G^X mod P - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, - &ctx->P , &ctx->RP ) ); - - if( ( ret = dhm_check_range( &ctx->GX, &ctx->P ) ) != 0 ) - return( ret ); - - /* - * export P, G, GX - */ -#define DHM_MPI_EXPORT(X,n) \ - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, p + 2, n ) ); \ - *p++ = (unsigned char)( n >> 8 ); \ - *p++ = (unsigned char)( n ); p += n; - - n1 = mbedtls_mpi_size( &ctx->P ); - n2 = mbedtls_mpi_size( &ctx->G ); - n3 = mbedtls_mpi_size( &ctx->GX ); - - p = output; - DHM_MPI_EXPORT( &ctx->P , n1 ); - DHM_MPI_EXPORT( &ctx->G , n2 ); - DHM_MPI_EXPORT( &ctx->GX, n3 ); - - *olen = p - output; - - ctx->len = n1; - -cleanup: - - if( ret != 0 ) - return( MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED + ret ); - - return( 0 ); -} - -/* - * Import the peer's public value G^Y - */ -int mbedtls_dhm_read_public( mbedtls_dhm_context *ctx, - const unsigned char *input, size_t ilen ) -{ - int ret; - - if( ctx == NULL || ilen < 1 || ilen > ctx->len ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_mpi_read_binary( &ctx->GY, input, ilen ) ) != 0 ) - return( MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED + ret ); - - return( 0 ); -} - -/* - * Create own private value X and export G^X - */ -int mbedtls_dhm_make_public( mbedtls_dhm_context *ctx, int x_size, - unsigned char *output, size_t olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret, count = 0; - - if( ctx == NULL || olen < 1 || olen > ctx->len ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - /* - * generate X and calculate GX = G^X mod P - */ - do - { - mbedtls_mpi_fill_random( &ctx->X, x_size, f_rng, p_rng ); - - while( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->X, 1 ) ); - - if( count++ > 10 ) - return( MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED ); - } - while( dhm_check_range( &ctx->X, &ctx->P ) != 0 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, - &ctx->P , &ctx->RP ) ); - - if( ( ret = dhm_check_range( &ctx->GX, &ctx->P ) ) != 0 ) - return( ret ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &ctx->GX, output, olen ) ); - -cleanup: - - if( ret != 0 ) - return( MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED + ret ); - - return( 0 ); -} - -/* - * Use the blinding method and optimisation suggested in section 10 of: - * KOCHER, Paul C. Timing attacks on implementations of Diffie-Hellman, RSA, - * DSS, and other systems. In : Advances in Cryptology-CRYPTO'96. Springer - * Berlin Heidelberg, 1996. p. 104-113. - */ -static int dhm_update_blinding( mbedtls_dhm_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret, count; - - /* - * Don't use any blinding the first time a particular X is used, - * but remember it to use blinding next time. - */ - if( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->pX ) != 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &ctx->pX, &ctx->X ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vi, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vf, 1 ) ); - - return( 0 ); - } - - /* - * Ok, we need blinding. Can we re-use existing values? - * If yes, just update them by squaring them. - */ - if( mbedtls_mpi_cmp_int( &ctx->Vi, 1 ) != 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->Vi, &ctx->Vi, &ctx->Vi ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->Vi, &ctx->Vi, &ctx->P ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->Vf, &ctx->Vf, &ctx->Vf ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->Vf, &ctx->Vf, &ctx->P ) ); - - return( 0 ); - } - - /* - * We need to generate blinding values from scratch - */ - - /* Vi = random( 2, P-1 ) */ - count = 0; - do - { - mbedtls_mpi_fill_random( &ctx->Vi, mbedtls_mpi_size( &ctx->P ), f_rng, p_rng ); - - while( mbedtls_mpi_cmp_mpi( &ctx->Vi, &ctx->P ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->Vi, 1 ) ); - - if( count++ > 10 ) - return( MBEDTLS_ERR_MPI_NOT_ACCEPTABLE ); - } - while( mbedtls_mpi_cmp_int( &ctx->Vi, 1 ) <= 0 ); - - /* Vf = Vi^-X mod P */ - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->Vf, &ctx->Vi, &ctx->P ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->Vf, &ctx->Vf, &ctx->X, &ctx->P, &ctx->RP ) ); - -cleanup: - return( ret ); -} - -/* - * Derive and export the shared secret (G^Y)^X mod P - */ -int mbedtls_dhm_calc_secret( mbedtls_dhm_context *ctx, - unsigned char *output, size_t output_size, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_mpi GYb; - - if( ctx == NULL || output_size < ctx->len ) - return( MBEDTLS_ERR_DHM_BAD_INPUT_DATA ); - - if( ( ret = dhm_check_range( &ctx->GY, &ctx->P ) ) != 0 ) - return( ret ); - - mbedtls_mpi_init( &GYb ); - - /* Blind peer's value */ - if( f_rng != NULL ) - { - MBEDTLS_MPI_CHK( dhm_update_blinding( ctx, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &GYb, &ctx->GY, &ctx->Vi ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &GYb, &GYb, &ctx->P ) ); - } - else - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &GYb, &ctx->GY ) ); - - /* Do modular exponentiation */ - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->K, &GYb, &ctx->X, - &ctx->P, &ctx->RP ) ); - - /* Unblind secret value */ - if( f_rng != NULL ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->K, &ctx->K, &ctx->Vf ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->K, &ctx->K, &ctx->P ) ); - } - - *olen = mbedtls_mpi_size( &ctx->K ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &ctx->K, output, *olen ) ); - -cleanup: - mbedtls_mpi_free( &GYb ); - - if( ret != 0 ) - return( MBEDTLS_ERR_DHM_CALC_SECRET_FAILED + ret ); - - return( 0 ); -} - -/* - * Free the components of a DHM key - */ -void mbedtls_dhm_free( mbedtls_dhm_context *ctx ) -{ - mbedtls_mpi_free( &ctx->pX); mbedtls_mpi_free( &ctx->Vf ); mbedtls_mpi_free( &ctx->Vi ); - mbedtls_mpi_free( &ctx->RP ); mbedtls_mpi_free( &ctx->K ); mbedtls_mpi_free( &ctx->GY ); - mbedtls_mpi_free( &ctx->GX ); mbedtls_mpi_free( &ctx->X ); mbedtls_mpi_free( &ctx->G ); - mbedtls_mpi_free( &ctx->P ); - - mbedtls_zeroize( ctx, sizeof( mbedtls_dhm_context ) ); -} - -#if defined(MBEDTLS_ASN1_PARSE_C) -/* - * Parse DHM parameters - */ -int mbedtls_dhm_parse_dhm( mbedtls_dhm_context *dhm, const unsigned char *dhmin, - size_t dhminlen ) -{ - int ret; - size_t len; - unsigned char *p, *end; -#if defined(MBEDTLS_PEM_PARSE_C) - mbedtls_pem_context pem; - - mbedtls_pem_init( &pem ); - - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( dhminlen == 0 || dhmin[dhminlen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN DH PARAMETERS-----", - "-----END DH PARAMETERS-----", - dhmin, NULL, 0, &dhminlen ); - - if( ret == 0 ) - { - /* - * Was PEM encoded - */ - dhminlen = pem.buflen; - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - goto exit; - - p = ( ret == 0 ) ? pem.buf : (unsigned char *) dhmin; -#else - p = (unsigned char *) dhmin; -#endif /* MBEDTLS_PEM_PARSE_C */ - end = p + dhminlen; - - /* - * DHParams ::= SEQUENCE { - * prime INTEGER, -- P - * generator INTEGER, -- g - * privateValueLength INTEGER OPTIONAL - * } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - ret = MBEDTLS_ERR_DHM_INVALID_FORMAT + ret; - goto exit; - } - - end = p + len; - - if( ( ret = mbedtls_asn1_get_mpi( &p, end, &dhm->P ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &dhm->G ) ) != 0 ) - { - ret = MBEDTLS_ERR_DHM_INVALID_FORMAT + ret; - goto exit; - } - - if( p != end ) - { - /* This might be the optional privateValueLength. - * If so, we can cleanly discard it */ - mbedtls_mpi rec; - mbedtls_mpi_init( &rec ); - ret = mbedtls_asn1_get_mpi( &p, end, &rec ); - mbedtls_mpi_free( &rec ); - if ( ret != 0 ) - { - ret = MBEDTLS_ERR_DHM_INVALID_FORMAT + ret; - goto exit; - } - if ( p != end ) - { - ret = MBEDTLS_ERR_DHM_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH; - goto exit; - } - } - - ret = 0; - - dhm->len = mbedtls_mpi_size( &dhm->P ); - -exit: -#if defined(MBEDTLS_PEM_PARSE_C) - mbedtls_pem_free( &pem ); -#endif - if( ret != 0 ) - mbedtls_dhm_free( dhm ); - - return( ret ); -} - -#if defined(MBEDTLS_FS_IO) -/* - * Load all data from a file into a given buffer. - * - * The file is expected to contain either PEM or DER encoded data. - * A terminating null byte is always appended. It is included in the announced - * length only if the data looks like it is PEM encoded. - */ -static int load_file( const char *path, unsigned char **buf, size_t *n ) -{ - FILE *f; - long size; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( MBEDTLS_ERR_DHM_FILE_IO_ERROR ); - - fseek( f, 0, SEEK_END ); - if( ( size = ftell( f ) ) == -1 ) - { - fclose( f ); - return( MBEDTLS_ERR_DHM_FILE_IO_ERROR ); - } - fseek( f, 0, SEEK_SET ); - - *n = (size_t) size; - - if( *n + 1 == 0 || - ( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL ) - { - fclose( f ); - return( MBEDTLS_ERR_DHM_ALLOC_FAILED ); - } - - if( fread( *buf, 1, *n, f ) != *n ) - { - fclose( f ); - mbedtls_free( *buf ); - return( MBEDTLS_ERR_DHM_FILE_IO_ERROR ); - } - - fclose( f ); - - (*buf)[*n] = '\0'; - - if( strstr( (const char *) *buf, "-----BEGIN " ) != NULL ) - ++*n; - - return( 0 ); -} - -/* - * Load and parse DHM parameters - */ -int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path ) -{ - int ret; - size_t n; - unsigned char *buf; - - if( ( ret = load_file( path, &buf, &n ) ) != 0 ) - return( ret ); - - ret = mbedtls_dhm_parse_dhm( dhm, buf, n ); - - mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ -#endif /* MBEDTLS_ASN1_PARSE_C */ - -#if defined(MBEDTLS_SELF_TEST) - -static const char mbedtls_test_dhm_params[] = -"-----BEGIN DH PARAMETERS-----\r\n" -"MIGHAoGBAJ419DBEOgmQTzo5qXl5fQcN9TN455wkOL7052HzxxRVMyhYmwQcgJvh\r\n" -"1sa18fyfR9OiVEMYglOpkqVoGLN7qd5aQNNi5W7/C+VBdHTBJcGZJyyP5B3qcz32\r\n" -"9mLJKudlVudV0Qxk5qUJaPZ/xupz0NyoVpviuiBOI1gNi8ovSXWzAgEC\r\n" -"-----END DH PARAMETERS-----\r\n"; - -static const size_t mbedtls_test_dhm_params_len = sizeof( mbedtls_test_dhm_params ); - -/* - * Checkup routine - */ -int mbedtls_dhm_self_test( int verbose ) -{ - int ret; - mbedtls_dhm_context dhm; - - mbedtls_dhm_init( &dhm ); - - if( verbose != 0 ) - mbedtls_printf( " DHM parameter load: " ); - - if( ( ret = mbedtls_dhm_parse_dhm( &dhm, - (const unsigned char *) mbedtls_test_dhm_params, - mbedtls_test_dhm_params_len ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n\n" ); - -exit: - mbedtls_dhm_free( &dhm ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_DHM_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ecdh.c b/build/premake/premake5/contrib/mbedtls/library/ecdh.c deleted file mode 100644 index c0a8147312..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ecdh.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Elliptic curve Diffie-Hellman - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * References: - * - * SEC1 http://www.secg.org/index.php?action=secg,docs_secg - * RFC 4492 - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ECDH_C) - -#include "mbedtls/ecdh.h" - -#include - -/* - * Generate public key: simple wrapper around mbedtls_ecp_gen_keypair - */ -int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - return mbedtls_ecp_gen_keypair( grp, d, Q, f_rng, p_rng ); -} - -/* - * Compute shared secret (SEC1 3.3.1) - */ -int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, - const mbedtls_ecp_point *Q, const mbedtls_mpi *d, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point P; - - mbedtls_ecp_point_init( &P ); - - /* - * Make sure Q is a valid pubkey before using it - */ - MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, &P, d, Q, f_rng, p_rng ) ); - - if( mbedtls_ecp_is_zero( &P ) ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( z, &P.X ) ); - -cleanup: - mbedtls_ecp_point_free( &P ); - - return( ret ); -} - -/* - * Initialize context - */ -void mbedtls_ecdh_init( mbedtls_ecdh_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_ecdh_context ) ); -} - -/* - * Free context - */ -void mbedtls_ecdh_free( mbedtls_ecdh_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_ecp_group_free( &ctx->grp ); - mbedtls_ecp_point_free( &ctx->Q ); - mbedtls_ecp_point_free( &ctx->Qp ); - mbedtls_ecp_point_free( &ctx->Vi ); - mbedtls_ecp_point_free( &ctx->Vf ); - mbedtls_mpi_free( &ctx->d ); - mbedtls_mpi_free( &ctx->z ); - mbedtls_mpi_free( &ctx->_d ); -} - -/* - * Setup and write the ServerKeyExhange parameters (RFC 4492) - * struct { - * ECParameters curve_params; - * ECPoint public; - * } ServerECDHParams; - */ -int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen, - unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - size_t grp_len, pt_len; - - if( ctx == NULL || ctx->grp.pbits == 0 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ) - != 0 ) - return( ret ); - - if( ( ret = mbedtls_ecp_tls_write_group( &ctx->grp, &grp_len, buf, blen ) ) - != 0 ) - return( ret ); - - buf += grp_len; - blen -= grp_len; - - if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format, - &pt_len, buf, blen ) ) != 0 ) - return( ret ); - - *olen = grp_len + pt_len; - return( 0 ); -} - -/* - * Read the ServerKeyExhange parameters (RFC 4492) - * struct { - * ECParameters curve_params; - * ECPoint public; - * } ServerECDHParams; - */ -int mbedtls_ecdh_read_params( mbedtls_ecdh_context *ctx, - const unsigned char **buf, const unsigned char *end ) -{ - int ret; - - if( ( ret = mbedtls_ecp_tls_read_group( &ctx->grp, buf, end - *buf ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, buf, end - *buf ) ) - != 0 ) - return( ret ); - - return( 0 ); -} - -/* - * Get parameters from a keypair - */ -int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx, const mbedtls_ecp_keypair *key, - mbedtls_ecdh_side side ) -{ - int ret; - - if( ( ret = mbedtls_ecp_group_copy( &ctx->grp, &key->grp ) ) != 0 ) - return( ret ); - - /* If it's not our key, just import the public part as Qp */ - if( side == MBEDTLS_ECDH_THEIRS ) - return( mbedtls_ecp_copy( &ctx->Qp, &key->Q ) ); - - /* Our key: import public (as Q) and private parts */ - if( side != MBEDTLS_ECDH_OURS ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecp_copy( &ctx->Q, &key->Q ) ) != 0 || - ( ret = mbedtls_mpi_copy( &ctx->d, &key->d ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -/* - * Setup and export the client public value - */ -int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen, - unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - - if( ctx == NULL || ctx->grp.pbits == 0 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ) - != 0 ) - return( ret ); - - return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format, - olen, buf, blen ); -} - -/* - * Parse and import the client's public value - */ -int mbedtls_ecdh_read_public( mbedtls_ecdh_context *ctx, - const unsigned char *buf, size_t blen ) -{ - int ret; - const unsigned char *p = buf; - - if( ctx == NULL ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, &p, blen ) ) != 0 ) - return( ret ); - - if( (size_t)( p - buf ) != blen ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - return( 0 ); -} - -/* - * Derive and export the shared secret - */ -int mbedtls_ecdh_calc_secret( mbedtls_ecdh_context *ctx, size_t *olen, - unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - - if( ctx == NULL ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecdh_compute_shared( &ctx->grp, &ctx->z, &ctx->Qp, &ctx->d, - f_rng, p_rng ) ) != 0 ) - { - return( ret ); - } - - if( mbedtls_mpi_size( &ctx->z ) > blen ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - *olen = ctx->grp.pbits / 8 + ( ( ctx->grp.pbits % 8 ) != 0 ); - return mbedtls_mpi_write_binary( &ctx->z, buf, *olen ); -} - -#endif /* MBEDTLS_ECDH_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ecdsa.c b/build/premake/premake5/contrib/mbedtls/library/ecdsa.c deleted file mode 100644 index 4156f3c3c4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ecdsa.c +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Elliptic curve DSA - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * References: - * - * SEC1 http://www.secg.org/index.php?action=secg,docs_secg - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ECDSA_C) - -#include "mbedtls/ecdsa.h" -#include "mbedtls/asn1write.h" - -#include - -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) -#include "mbedtls/hmac_drbg.h" -#endif - -/* - * Derive a suitable integer for group grp from a buffer of length len - * SEC1 4.1.3 step 5 aka SEC1 4.1.4 step 3 - */ -static int derive_mpi( const mbedtls_ecp_group *grp, mbedtls_mpi *x, - const unsigned char *buf, size_t blen ) -{ - int ret; - size_t n_size = ( grp->nbits + 7 ) / 8; - size_t use_size = blen > n_size ? n_size : blen; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( x, buf, use_size ) ); - if( use_size * 8 > grp->nbits ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( x, use_size * 8 - grp->nbits ) ); - - /* While at it, reduce modulo N */ - if( mbedtls_mpi_cmp_mpi( x, &grp->N ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( x, x, &grp->N ) ); - -cleanup: - return( ret ); -} - -/* - * Compute ECDSA signature of a hashed message (SEC1 4.1.3) - * Obviously, compared to SEC1 4.1.3, we skip step 4 (hash message) - */ -int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, - const mbedtls_mpi *d, const unsigned char *buf, size_t blen, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret, key_tries, sign_tries, blind_tries; - mbedtls_ecp_point R; - mbedtls_mpi k, e, t; - - /* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */ - if( grp->N.p == NULL ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - mbedtls_ecp_point_init( &R ); - mbedtls_mpi_init( &k ); mbedtls_mpi_init( &e ); mbedtls_mpi_init( &t ); - - sign_tries = 0; - do - { - /* - * Steps 1-3: generate a suitable ephemeral keypair - * and set r = xR mod n - */ - key_tries = 0; - do - { - MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair( grp, &k, &R, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( r, &R.X, &grp->N ) ); - - if( key_tries++ > 10 ) - { - ret = MBEDTLS_ERR_ECP_RANDOM_FAILED; - goto cleanup; - } - } - while( mbedtls_mpi_cmp_int( r, 0 ) == 0 ); - - /* - * Step 5: derive MPI from hashed message - */ - MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); - - /* - * Generate a random value to blind inv_mod in next step, - * avoiding a potential timing leak. - */ - blind_tries = 0; - do - { - size_t n_size = ( grp->nbits + 7 ) / 8; - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &t, n_size, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &t, 8 * n_size - grp->nbits ) ); - - /* See mbedtls_ecp_gen_keypair() */ - if( ++blind_tries > 30 ) - return( MBEDTLS_ERR_ECP_RANDOM_FAILED ); - } - while( mbedtls_mpi_cmp_int( &t, 1 ) < 0 || - mbedtls_mpi_cmp_mpi( &t, &grp->N ) >= 0 ); - - /* - * Step 6: compute s = (e + r * d) / k = t (e + rd) / (kt) mod n - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, r, d ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &e, &e, &t ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &k, &k, &t ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( s, &k, &grp->N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, s, &e ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( s, s, &grp->N ) ); - - if( sign_tries++ > 10 ) - { - ret = MBEDTLS_ERR_ECP_RANDOM_FAILED; - goto cleanup; - } - } - while( mbedtls_mpi_cmp_int( s, 0 ) == 0 ); - -cleanup: - mbedtls_ecp_point_free( &R ); - mbedtls_mpi_free( &k ); mbedtls_mpi_free( &e ); mbedtls_mpi_free( &t ); - - return( ret ); -} - -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) -/* - * Deterministic signature wrapper - */ -int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, - const mbedtls_mpi *d, const unsigned char *buf, size_t blen, - mbedtls_md_type_t md_alg ) -{ - int ret; - mbedtls_hmac_drbg_context rng_ctx; - unsigned char data[2 * MBEDTLS_ECP_MAX_BYTES]; - size_t grp_len = ( grp->nbits + 7 ) / 8; - const mbedtls_md_info_t *md_info; - mbedtls_mpi h; - - if( ( md_info = mbedtls_md_info_from_type( md_alg ) ) == NULL ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &h ); - mbedtls_hmac_drbg_init( &rng_ctx ); - - /* Use private key and message hash (reduced) to initialize HMAC_DRBG */ - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( d, data, grp_len ) ); - MBEDTLS_MPI_CHK( derive_mpi( grp, &h, buf, blen ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &h, data + grp_len, grp_len ) ); - mbedtls_hmac_drbg_seed_buf( &rng_ctx, md_info, data, 2 * grp_len ); - - ret = mbedtls_ecdsa_sign( grp, r, s, d, buf, blen, - mbedtls_hmac_drbg_random, &rng_ctx ); - -cleanup: - mbedtls_hmac_drbg_free( &rng_ctx ); - mbedtls_mpi_free( &h ); - - return( ret ); -} -#endif /* MBEDTLS_ECDSA_DETERMINISTIC */ - -/* - * Verify ECDSA signature of hashed message (SEC1 4.1.4) - * Obviously, compared to SEC1 4.1.3, we skip step 2 (hash message) - */ -int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp, - const unsigned char *buf, size_t blen, - const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s) -{ - int ret; - mbedtls_mpi e, s_inv, u1, u2; - mbedtls_ecp_point R; - - mbedtls_ecp_point_init( &R ); - mbedtls_mpi_init( &e ); mbedtls_mpi_init( &s_inv ); mbedtls_mpi_init( &u1 ); mbedtls_mpi_init( &u2 ); - - /* Fail cleanly on curves such as Curve25519 that can't be used for ECDSA */ - if( grp->N.p == NULL ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * Step 1: make sure r and s are in range 1..n-1 - */ - if( mbedtls_mpi_cmp_int( r, 1 ) < 0 || mbedtls_mpi_cmp_mpi( r, &grp->N ) >= 0 || - mbedtls_mpi_cmp_int( s, 1 ) < 0 || mbedtls_mpi_cmp_mpi( s, &grp->N ) >= 0 ) - { - ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; - goto cleanup; - } - - /* - * Additional precaution: make sure Q is valid - */ - MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) ); - - /* - * Step 3: derive MPI from hashed message - */ - MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); - - /* - * Step 4: u1 = e / s mod n, u2 = r / s mod n - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &s_inv, s, &grp->N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &u1, &e, &s_inv ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &u1, &u1, &grp->N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &u2, r, &s_inv ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &u2, &u2, &grp->N ) ); - - /* - * Step 5: R = u1 G + u2 Q - * - * Since we're not using any secret data, no need to pass a RNG to - * mbedtls_ecp_mul() for countermesures. - */ - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, &R, &u1, &grp->G, &u2, Q ) ); - - if( mbedtls_ecp_is_zero( &R ) ) - { - ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; - goto cleanup; - } - - /* - * Step 6: convert xR to an integer (no-op) - * Step 7: reduce xR mod n (gives v) - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &R.X, &R.X, &grp->N ) ); - - /* - * Step 8: check if v (that is, R.X) is equal to r - */ - if( mbedtls_mpi_cmp_mpi( &R.X, r ) != 0 ) - { - ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; - goto cleanup; - } - -cleanup: - mbedtls_ecp_point_free( &R ); - mbedtls_mpi_free( &e ); mbedtls_mpi_free( &s_inv ); mbedtls_mpi_free( &u1 ); mbedtls_mpi_free( &u2 ); - - return( ret ); -} - -/* - * Convert a signature (given by context) to ASN.1 - */ -static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s, - unsigned char *sig, size_t *slen ) -{ - int ret; - unsigned char buf[MBEDTLS_ECDSA_MAX_LEN]; - unsigned char *p = buf + sizeof( buf ); - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &p, buf, s ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &p, buf, r ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &p, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &p, buf, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ); - - memcpy( sig, p, len ); - *slen = len; - - return( 0 ); -} - -/* - * Compute and write signature - */ -int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hlen, - unsigned char *sig, size_t *slen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_mpi r, s; - - mbedtls_mpi_init( &r ); - mbedtls_mpi_init( &s ); - -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) - (void) f_rng; - (void) p_rng; - - MBEDTLS_MPI_CHK( mbedtls_ecdsa_sign_det( &ctx->grp, &r, &s, &ctx->d, - hash, hlen, md_alg ) ); -#else - (void) md_alg; - - MBEDTLS_MPI_CHK( mbedtls_ecdsa_sign( &ctx->grp, &r, &s, &ctx->d, - hash, hlen, f_rng, p_rng ) ); -#endif - - MBEDTLS_MPI_CHK( ecdsa_signature_to_asn1( &r, &s, sig, slen ) ); - -cleanup: - mbedtls_mpi_free( &r ); - mbedtls_mpi_free( &s ); - - return( ret ); -} - -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) && \ - defined(MBEDTLS_ECDSA_DETERMINISTIC) -int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx, - const unsigned char *hash, size_t hlen, - unsigned char *sig, size_t *slen, - mbedtls_md_type_t md_alg ) -{ - return( mbedtls_ecdsa_write_signature( ctx, md_alg, hash, hlen, sig, slen, - NULL, NULL ) ); -} -#endif - -/* - * Read and check signature - */ -int mbedtls_ecdsa_read_signature( mbedtls_ecdsa_context *ctx, - const unsigned char *hash, size_t hlen, - const unsigned char *sig, size_t slen ) -{ - int ret; - unsigned char *p = (unsigned char *) sig; - const unsigned char *end = sig + slen; - size_t len; - mbedtls_mpi r, s; - - mbedtls_mpi_init( &r ); - mbedtls_mpi_init( &s ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - ret += MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - if( p + len != end ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH; - goto cleanup; - } - - if( ( ret = mbedtls_asn1_get_mpi( &p, end, &r ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &s ) ) != 0 ) - { - ret += MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - if( ( ret = mbedtls_ecdsa_verify( &ctx->grp, hash, hlen, - &ctx->Q, &r, &s ) ) != 0 ) - goto cleanup; - - if( p != end ) - ret = MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH; - -cleanup: - mbedtls_mpi_free( &r ); - mbedtls_mpi_free( &s ); - - return( ret ); -} - -/* - * Generate key pair - */ -int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - return( mbedtls_ecp_group_load( &ctx->grp, gid ) || - mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ); -} - -/* - * Set context from an mbedtls_ecp_keypair - */ -int mbedtls_ecdsa_from_keypair( mbedtls_ecdsa_context *ctx, const mbedtls_ecp_keypair *key ) -{ - int ret; - - if( ( ret = mbedtls_ecp_group_copy( &ctx->grp, &key->grp ) ) != 0 || - ( ret = mbedtls_mpi_copy( &ctx->d, &key->d ) ) != 0 || - ( ret = mbedtls_ecp_copy( &ctx->Q, &key->Q ) ) != 0 ) - { - mbedtls_ecdsa_free( ctx ); - } - - return( ret ); -} - -/* - * Initialize context - */ -void mbedtls_ecdsa_init( mbedtls_ecdsa_context *ctx ) -{ - mbedtls_ecp_keypair_init( ctx ); -} - -/* - * Free context - */ -void mbedtls_ecdsa_free( mbedtls_ecdsa_context *ctx ) -{ - mbedtls_ecp_keypair_free( ctx ); -} - -#endif /* MBEDTLS_ECDSA_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ecjpake.c b/build/premake/premake5/contrib/mbedtls/library/ecjpake.c deleted file mode 100644 index 1fa1c2d801..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ecjpake.c +++ /dev/null @@ -1,1103 +0,0 @@ -/* - * Elliptic curve J-PAKE - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * References in the code are to the Thread v1.0 Specification, - * available to members of the Thread Group http://threadgroup.org/ - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ECJPAKE_C) - -#include "mbedtls/ecjpake.h" - -#include - -/* - * Convert a mbedtls_ecjpake_role to identifier string - */ -static const char * const ecjpake_id[] = { - "client", - "server" -}; - -#define ID_MINE ( ecjpake_id[ ctx->role ] ) -#define ID_PEER ( ecjpake_id[ 1 - ctx->role ] ) - -/* - * Initialize context - */ -void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx ) -{ - if( ctx == NULL ) - return; - - ctx->md_info = NULL; - mbedtls_ecp_group_init( &ctx->grp ); - ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED; - - mbedtls_ecp_point_init( &ctx->Xm1 ); - mbedtls_ecp_point_init( &ctx->Xm2 ); - mbedtls_ecp_point_init( &ctx->Xp1 ); - mbedtls_ecp_point_init( &ctx->Xp2 ); - mbedtls_ecp_point_init( &ctx->Xp ); - - mbedtls_mpi_init( &ctx->xm1 ); - mbedtls_mpi_init( &ctx->xm2 ); - mbedtls_mpi_init( &ctx->s ); -} - -/* - * Free context - */ -void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx ) -{ - if( ctx == NULL ) - return; - - ctx->md_info = NULL; - mbedtls_ecp_group_free( &ctx->grp ); - - mbedtls_ecp_point_free( &ctx->Xm1 ); - mbedtls_ecp_point_free( &ctx->Xm2 ); - mbedtls_ecp_point_free( &ctx->Xp1 ); - mbedtls_ecp_point_free( &ctx->Xp2 ); - mbedtls_ecp_point_free( &ctx->Xp ); - - mbedtls_mpi_free( &ctx->xm1 ); - mbedtls_mpi_free( &ctx->xm2 ); - mbedtls_mpi_free( &ctx->s ); -} - -/* - * Setup context - */ -int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx, - mbedtls_ecjpake_role role, - mbedtls_md_type_t hash, - mbedtls_ecp_group_id curve, - const unsigned char *secret, - size_t len ) -{ - int ret; - - ctx->role = role; - - if( ( ctx->md_info = mbedtls_md_info_from_type( hash ) ) == NULL ) - return( MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->s, secret, len ) ); - -cleanup: - if( ret != 0 ) - mbedtls_ecjpake_free( ctx ); - - return( ret ); -} - -/* - * Check if context is ready for use - */ -int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx ) -{ - if( ctx->md_info == NULL || - ctx->grp.id == MBEDTLS_ECP_DP_NONE || - ctx->s.p == NULL ) - { - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - } - - return( 0 ); -} - -/* - * Write a point plus its length to a buffer - */ -static int ecjpake_write_len_point( unsigned char **p, - const unsigned char *end, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *P ) -{ - int ret; - size_t len; - - /* Need at least 4 for length plus 1 for point */ - if( end < *p || end - *p < 5 ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - ret = mbedtls_ecp_point_write_binary( grp, P, pf, - &len, *p + 4, end - ( *p + 4 ) ); - if( ret != 0 ) - return( ret ); - - (*p)[0] = (unsigned char)( ( len >> 24 ) & 0xFF ); - (*p)[1] = (unsigned char)( ( len >> 16 ) & 0xFF ); - (*p)[2] = (unsigned char)( ( len >> 8 ) & 0xFF ); - (*p)[3] = (unsigned char)( ( len ) & 0xFF ); - - *p += 4 + len; - - return( 0 ); -} - -/* - * Size of the temporary buffer for ecjpake_hash: - * 3 EC points plus their length, plus ID and its length (4 + 6 bytes) - */ -#define ECJPAKE_HASH_BUF_LEN ( 3 * ( 4 + MBEDTLS_ECP_MAX_PT_LEN ) + 4 + 6 ) - -/* - * Compute hash for ZKP (7.4.2.2.2.1) - */ -static int ecjpake_hash( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - const mbedtls_ecp_point *V, - const mbedtls_ecp_point *X, - const char *id, - mbedtls_mpi *h ) -{ - int ret; - unsigned char buf[ECJPAKE_HASH_BUF_LEN]; - unsigned char *p = buf; - const unsigned char *end = buf + sizeof( buf ); - const size_t id_len = strlen( id ); - unsigned char hash[MBEDTLS_MD_MAX_SIZE]; - - /* Write things to temporary buffer */ - MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); - MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); - MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); - - if( end - p < 4 ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - *p++ = (unsigned char)( ( id_len >> 24 ) & 0xFF ); - *p++ = (unsigned char)( ( id_len >> 16 ) & 0xFF ); - *p++ = (unsigned char)( ( id_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( id_len ) & 0xFF ); - - if( end < p || (size_t)( end - p ) < id_len ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - memcpy( p, id, id_len ); - p += id_len; - - /* Compute hash */ - mbedtls_md( md_info, buf, p - buf, hash ); - - /* Turn it into an integer mod n */ - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( h, hash, - mbedtls_md_get_size( md_info ) ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); - -cleanup: - return( ret ); -} - -/* - * Parse a ECShnorrZKP (7.4.2.2.2) and verify it (7.4.2.3.3) - */ -static int ecjpake_zkp_read( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - const mbedtls_ecp_point *X, - const char *id, - const unsigned char **p, - const unsigned char *end ) -{ - int ret; - mbedtls_ecp_point V, VV; - mbedtls_mpi r, h; - size_t r_len; - - mbedtls_ecp_point_init( &V ); - mbedtls_ecp_point_init( &VV ); - mbedtls_mpi_init( &r ); - mbedtls_mpi_init( &h ); - - /* - * struct { - * ECPoint V; - * opaque r<1..2^8-1>; - * } ECSchnorrZKP; - */ - if( end < *p ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, &V, p, end - *p ) ); - - if( end < *p || (size_t)( end - *p ) < 1 ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - r_len = *(*p)++; - - if( end < *p || (size_t)( end - *p ) < r_len ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &r, *p, r_len ) ); - *p += r_len; - - /* - * Verification - */ - MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( (mbedtls_ecp_group *) grp, - &VV, &h, X, &r, G ) ); - - if( mbedtls_ecp_point_cmp( &VV, &V ) != 0 ) - { - ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; - goto cleanup; - } - -cleanup: - mbedtls_ecp_point_free( &V ); - mbedtls_ecp_point_free( &VV ); - mbedtls_mpi_free( &r ); - mbedtls_mpi_free( &h ); - - return( ret ); -} - -/* - * Generate ZKP (7.4.2.3.2) and write it as ECSchnorrZKP (7.4.2.2.2) - */ -static int ecjpake_zkp_write( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - const mbedtls_mpi *x, - const mbedtls_ecp_point *X, - const char *id, - unsigned char **p, - const unsigned char *end, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point V; - mbedtls_mpi v; - mbedtls_mpi h; /* later recycled to hold r */ - size_t len; - - if( end < *p ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - mbedtls_ecp_point_init( &V ); - mbedtls_mpi_init( &v ); - mbedtls_mpi_init( &h ); - - /* Compute signature */ - MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, - G, &v, &V, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &h, &h, x ) ); /* x*h */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &h, &v, &h ) ); /* v - x*h */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &h, &h, &grp->N ) ); /* r */ - - /* Write it out */ - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, &V, - pf, &len, *p, end - *p ) ); - *p += len; - - len = mbedtls_mpi_size( &h ); /* actually r */ - if( end < *p || (size_t)( end - *p ) < 1 + len || len > 255 ) - { - ret = MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL; - goto cleanup; - } - - *(*p)++ = (unsigned char)( len & 0xFF ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &h, *p, len ) ); /* r */ - *p += len; - -cleanup: - mbedtls_ecp_point_free( &V ); - mbedtls_mpi_free( &v ); - mbedtls_mpi_free( &h ); - - return( ret ); -} - -/* - * Parse a ECJPAKEKeyKP (7.4.2.2.1) and check proof - * Output: verified public key X - */ -static int ecjpake_kkp_read( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_ecp_point *X, - const char *id, - const unsigned char **p, - const unsigned char *end ) -{ - int ret; - - if( end < *p ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * struct { - * ECPoint X; - * ECSchnorrZKP zkp; - * } ECJPAKEKeyKP; - */ - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, X, p, end - *p ) ); - if( mbedtls_ecp_is_zero( X ) ) - { - ret = MBEDTLS_ERR_ECP_INVALID_KEY; - goto cleanup; - } - - MBEDTLS_MPI_CHK( ecjpake_zkp_read( md_info, grp, pf, G, X, id, p, end ) ); - -cleanup: - return( ret ); -} - -/* - * Generate an ECJPAKEKeyKP - * Output: the serialized structure, plus private/public key pair - */ -static int ecjpake_kkp_write( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_mpi *x, - mbedtls_ecp_point *X, - const char *id, - unsigned char **p, - const unsigned char *end, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - size_t len; - - if( end < *p ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - /* Generate key (7.4.2.3.1) and write it out */ - MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, G, x, X, - f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, X, - pf, &len, *p, end - *p ) ); - *p += len; - - /* Generate and write proof */ - MBEDTLS_MPI_CHK( ecjpake_zkp_write( md_info, grp, pf, G, x, X, id, - p, end, f_rng, p_rng ) ); - -cleanup: - return( ret ); -} - -/* - * Read a ECJPAKEKeyKPPairList (7.4.2.3) and check proofs - * Ouputs: verified peer public keys Xa, Xb - */ -static int ecjpake_kkpp_read( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_ecp_point *Xa, - mbedtls_ecp_point *Xb, - const char *id, - const unsigned char *buf, - size_t len ) -{ - int ret; - const unsigned char *p = buf; - const unsigned char *end = buf + len; - - /* - * struct { - * ECJPAKEKeyKP ecjpake_key_kp_pair_list[2]; - * } ECJPAKEKeyKPPairList; - */ - MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xa, id, &p, end ) ); - MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xb, id, &p, end ) ); - - if( p != end ) - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - -cleanup: - return( ret ); -} - -/* - * Generate a ECJPAKEKeyKPPairList - * Outputs: the serialized structure, plus two private/public key pairs - */ -static int ecjpake_kkpp_write( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_mpi *xm1, - mbedtls_ecp_point *Xa, - mbedtls_mpi *xm2, - mbedtls_ecp_point *Xb, - const char *id, - unsigned char *buf, - size_t len, - size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char *p = buf; - const unsigned char *end = buf + len; - - MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm1, Xa, id, - &p, end, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm2, Xb, id, - &p, end, f_rng, p_rng ) ); - - *olen = p - buf; - -cleanup: - return( ret ); -} - -/* - * Read and process the first round message - */ -int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ) -{ - return( ecjpake_kkpp_read( ctx->md_info, &ctx->grp, ctx->point_format, - &ctx->grp.G, - &ctx->Xp1, &ctx->Xp2, ID_PEER, - buf, len ) ); -} - -/* - * Generate and write the first round message - */ -int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - return( ecjpake_kkpp_write( ctx->md_info, &ctx->grp, ctx->point_format, - &ctx->grp.G, - &ctx->xm1, &ctx->Xm1, &ctx->xm2, &ctx->Xm2, - ID_MINE, buf, len, olen, f_rng, p_rng ) ); -} - -/* - * Compute the sum of three points R = A + B + C - */ -static int ecjpake_ecp_add3( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_ecp_point *A, - const mbedtls_ecp_point *B, - const mbedtls_ecp_point *C ) -{ - int ret; - mbedtls_mpi one; - - mbedtls_mpi_init( &one ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, A, &one, B ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, R, &one, C ) ); - -cleanup: - mbedtls_mpi_free( &one ); - - return( ret ); -} - -/* - * Read and process second round message (C: 7.4.2.5, S: 7.4.2.6) - */ -int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ) -{ - int ret; - const unsigned char *p = buf; - const unsigned char *end = buf + len; - mbedtls_ecp_group grp; - mbedtls_ecp_point G; /* C: GB, S: GA */ - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &G ); - - /* - * Server: GA = X3 + X4 + X1 (7.4.2.6.1) - * Client: GB = X1 + X2 + X3 (7.4.2.5.1) - * Unified: G = Xm1 + Xm2 + Xp1 - * We need that before parsing in order to check Xp as we read it - */ - MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, - &ctx->Xm1, &ctx->Xm2, &ctx->Xp1 ) ); - - /* - * struct { - * ECParameters curve_params; // only client reading server msg - * ECJPAKEKeyKP ecjpake_key_kp; - * } Client/ServerECJPAKEParams; - */ - if( ctx->role == MBEDTLS_ECJPAKE_CLIENT ) - { - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_group( &grp, &p, len ) ); - if( grp.id != ctx->grp.id ) - { - ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; - goto cleanup; - } - } - - MBEDTLS_MPI_CHK( ecjpake_kkp_read( ctx->md_info, &ctx->grp, - ctx->point_format, - &G, &ctx->Xp, ID_PEER, &p, end ) ); - - if( p != end ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - -cleanup: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &G ); - - return( ret ); -} - -/* - * Compute R = +/- X * S mod N, taking care not to leak S - */ -static int ecjpake_mul_secret( mbedtls_mpi *R, int sign, - const mbedtls_mpi *X, - const mbedtls_mpi *S, - const mbedtls_mpi *N, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_mpi b; /* Blinding value, then s + N * blinding */ - - mbedtls_mpi_init( &b ); - - /* b = s + rnd-128-bit * N */ - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &b, 16, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &b, &b, N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &b, &b, S ) ); - - /* R = sign * X * b mod N */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( R, X, &b ) ); - R->s *= sign; - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( R, R, N ) ); - -cleanup: - mbedtls_mpi_free( &b ); - - return( ret ); -} - -/* - * Generate and write the second round message (S: 7.4.2.5, C: 7.4.2.6) - */ -int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point G; /* C: GA, S: GB */ - mbedtls_ecp_point Xm; /* C: Xc, S: Xs */ - mbedtls_mpi xm; /* C: xc, S: xs */ - unsigned char *p = buf; - const unsigned char *end = buf + len; - size_t ec_len; - - mbedtls_ecp_point_init( &G ); - mbedtls_ecp_point_init( &Xm ); - mbedtls_mpi_init( &xm ); - - /* - * First generate private/public key pair (S: 7.4.2.5.1, C: 7.4.2.6.1) - * - * Client: GA = X1 + X3 + X4 | xs = x2 * s | Xc = xc * GA - * Server: GB = X3 + X1 + X2 | xs = x4 * s | Xs = xs * GB - * Unified: G = Xm1 + Xp1 + Xp2 | xm = xm2 * s | Xm = xm * G - */ - MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, - &ctx->Xp1, &ctx->Xp2, &ctx->Xm1 ) ); - MBEDTLS_MPI_CHK( ecjpake_mul_secret( &xm, 1, &ctx->xm2, &ctx->s, - &ctx->grp.N, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &Xm, &xm, &G, f_rng, p_rng ) ); - - /* - * Now write things out - * - * struct { - * ECParameters curve_params; // only server writing its message - * ECJPAKEKeyKP ecjpake_key_kp; - * } Client/ServerECJPAKEParams; - */ - if( ctx->role == MBEDTLS_ECJPAKE_SERVER ) - { - if( end < p ) - { - ret = MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL; - goto cleanup; - } - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_group( &ctx->grp, &ec_len, - p, end - p ) ); - p += ec_len; - } - - if( end < p ) - { - ret = MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL; - goto cleanup; - } - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( &ctx->grp, &Xm, - ctx->point_format, &ec_len, p, end - p ) ); - p += ec_len; - - MBEDTLS_MPI_CHK( ecjpake_zkp_write( ctx->md_info, &ctx->grp, - ctx->point_format, - &G, &xm, &Xm, ID_MINE, - &p, end, f_rng, p_rng ) ); - - *olen = p - buf; - -cleanup: - mbedtls_ecp_point_free( &G ); - mbedtls_ecp_point_free( &Xm ); - mbedtls_mpi_free( &xm ); - - return( ret ); -} - -/* - * Derive PMS (7.4.2.7 / 7.4.2.8) - */ -int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point K; - mbedtls_mpi m_xm2_s, one; - unsigned char kx[MBEDTLS_ECP_MAX_BYTES]; - size_t x_bytes; - - *olen = mbedtls_md_get_size( ctx->md_info ); - if( len < *olen ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - mbedtls_ecp_point_init( &K ); - mbedtls_mpi_init( &m_xm2_s ); - mbedtls_mpi_init( &one ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); - - /* - * Client: K = ( Xs - X4 * x2 * s ) * x2 - * Server: K = ( Xc - X2 * x4 * s ) * x4 - * Unified: K = ( Xp - Xp2 * xm2 * s ) * xm2 - */ - MBEDTLS_MPI_CHK( ecjpake_mul_secret( &m_xm2_s, -1, &ctx->xm2, &ctx->s, - &ctx->grp.N, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( &ctx->grp, &K, - &one, &ctx->Xp, - &m_xm2_s, &ctx->Xp2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &K, &ctx->xm2, &K, - f_rng, p_rng ) ); - - /* PMS = SHA-256( K.X ) */ - x_bytes = ( ctx->grp.pbits + 7 ) / 8; - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &K.X, kx, x_bytes ) ); - MBEDTLS_MPI_CHK( mbedtls_md( ctx->md_info, kx, x_bytes, buf ) ); - -cleanup: - mbedtls_ecp_point_free( &K ); - mbedtls_mpi_free( &m_xm2_s ); - mbedtls_mpi_free( &one ); - - return( ret ); -} - -#undef ID_MINE -#undef ID_PEER - - -#if defined(MBEDTLS_SELF_TEST) - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \ - !defined(MBEDTLS_SHA256_C) -int mbedtls_ecjpake_self_test( int verbose ) -{ - (void) verbose; - return( 0 ); -} -#else - -static const unsigned char ecjpake_test_password[] = { - 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x6a, 0x70, 0x61, 0x6b, 0x65, 0x74, - 0x65, 0x73, 0x74 -}; - -static const unsigned char ecjpake_test_x1[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, - 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x21 -}; - -static const unsigned char ecjpake_test_x2[] = { - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x81 -}; - -static const unsigned char ecjpake_test_x3[] = { - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x81 -}; - -static const unsigned char ecjpake_test_x4[] = { - 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, - 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, - 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe1 -}; - -static const unsigned char ecjpake_test_cli_one[] = { - 0x41, 0x04, 0xac, 0xcf, 0x01, 0x06, 0xef, 0x85, 0x8f, 0xa2, 0xd9, 0x19, - 0x33, 0x13, 0x46, 0x80, 0x5a, 0x78, 0xb5, 0x8b, 0xba, 0xd0, 0xb8, 0x44, - 0xe5, 0xc7, 0x89, 0x28, 0x79, 0x14, 0x61, 0x87, 0xdd, 0x26, 0x66, 0xad, - 0xa7, 0x81, 0xbb, 0x7f, 0x11, 0x13, 0x72, 0x25, 0x1a, 0x89, 0x10, 0x62, - 0x1f, 0x63, 0x4d, 0xf1, 0x28, 0xac, 0x48, 0xe3, 0x81, 0xfd, 0x6e, 0xf9, - 0x06, 0x07, 0x31, 0xf6, 0x94, 0xa4, 0x41, 0x04, 0x1d, 0xd0, 0xbd, 0x5d, - 0x45, 0x66, 0xc9, 0xbe, 0xd9, 0xce, 0x7d, 0xe7, 0x01, 0xb5, 0xe8, 0x2e, - 0x08, 0xe8, 0x4b, 0x73, 0x04, 0x66, 0x01, 0x8a, 0xb9, 0x03, 0xc7, 0x9e, - 0xb9, 0x82, 0x17, 0x22, 0x36, 0xc0, 0xc1, 0x72, 0x8a, 0xe4, 0xbf, 0x73, - 0x61, 0x0d, 0x34, 0xde, 0x44, 0x24, 0x6e, 0xf3, 0xd9, 0xc0, 0x5a, 0x22, - 0x36, 0xfb, 0x66, 0xa6, 0x58, 0x3d, 0x74, 0x49, 0x30, 0x8b, 0xab, 0xce, - 0x20, 0x72, 0xfe, 0x16, 0x66, 0x29, 0x92, 0xe9, 0x23, 0x5c, 0x25, 0x00, - 0x2f, 0x11, 0xb1, 0x50, 0x87, 0xb8, 0x27, 0x38, 0xe0, 0x3c, 0x94, 0x5b, - 0xf7, 0xa2, 0x99, 0x5d, 0xda, 0x1e, 0x98, 0x34, 0x58, 0x41, 0x04, 0x7e, - 0xa6, 0xe3, 0xa4, 0x48, 0x70, 0x37, 0xa9, 0xe0, 0xdb, 0xd7, 0x92, 0x62, - 0xb2, 0xcc, 0x27, 0x3e, 0x77, 0x99, 0x30, 0xfc, 0x18, 0x40, 0x9a, 0xc5, - 0x36, 0x1c, 0x5f, 0xe6, 0x69, 0xd7, 0x02, 0xe1, 0x47, 0x79, 0x0a, 0xeb, - 0x4c, 0xe7, 0xfd, 0x65, 0x75, 0xab, 0x0f, 0x6c, 0x7f, 0xd1, 0xc3, 0x35, - 0x93, 0x9a, 0xa8, 0x63, 0xba, 0x37, 0xec, 0x91, 0xb7, 0xe3, 0x2b, 0xb0, - 0x13, 0xbb, 0x2b, 0x41, 0x04, 0xa4, 0x95, 0x58, 0xd3, 0x2e, 0xd1, 0xeb, - 0xfc, 0x18, 0x16, 0xaf, 0x4f, 0xf0, 0x9b, 0x55, 0xfc, 0xb4, 0xca, 0x47, - 0xb2, 0xa0, 0x2d, 0x1e, 0x7c, 0xaf, 0x11, 0x79, 0xea, 0x3f, 0xe1, 0x39, - 0x5b, 0x22, 0xb8, 0x61, 0x96, 0x40, 0x16, 0xfa, 0xba, 0xf7, 0x2c, 0x97, - 0x56, 0x95, 0xd9, 0x3d, 0x4d, 0xf0, 0xe5, 0x19, 0x7f, 0xe9, 0xf0, 0x40, - 0x63, 0x4e, 0xd5, 0x97, 0x64, 0x93, 0x77, 0x87, 0xbe, 0x20, 0xbc, 0x4d, - 0xee, 0xbb, 0xf9, 0xb8, 0xd6, 0x0a, 0x33, 0x5f, 0x04, 0x6c, 0xa3, 0xaa, - 0x94, 0x1e, 0x45, 0x86, 0x4c, 0x7c, 0xad, 0xef, 0x9c, 0xf7, 0x5b, 0x3d, - 0x8b, 0x01, 0x0e, 0x44, 0x3e, 0xf0 -}; - -static const unsigned char ecjpake_test_srv_one[] = { - 0x41, 0x04, 0x7e, 0xa6, 0xe3, 0xa4, 0x48, 0x70, 0x37, 0xa9, 0xe0, 0xdb, - 0xd7, 0x92, 0x62, 0xb2, 0xcc, 0x27, 0x3e, 0x77, 0x99, 0x30, 0xfc, 0x18, - 0x40, 0x9a, 0xc5, 0x36, 0x1c, 0x5f, 0xe6, 0x69, 0xd7, 0x02, 0xe1, 0x47, - 0x79, 0x0a, 0xeb, 0x4c, 0xe7, 0xfd, 0x65, 0x75, 0xab, 0x0f, 0x6c, 0x7f, - 0xd1, 0xc3, 0x35, 0x93, 0x9a, 0xa8, 0x63, 0xba, 0x37, 0xec, 0x91, 0xb7, - 0xe3, 0x2b, 0xb0, 0x13, 0xbb, 0x2b, 0x41, 0x04, 0x09, 0xf8, 0x5b, 0x3d, - 0x20, 0xeb, 0xd7, 0x88, 0x5c, 0xe4, 0x64, 0xc0, 0x8d, 0x05, 0x6d, 0x64, - 0x28, 0xfe, 0x4d, 0xd9, 0x28, 0x7a, 0xa3, 0x65, 0xf1, 0x31, 0xf4, 0x36, - 0x0f, 0xf3, 0x86, 0xd8, 0x46, 0x89, 0x8b, 0xc4, 0xb4, 0x15, 0x83, 0xc2, - 0xa5, 0x19, 0x7f, 0x65, 0xd7, 0x87, 0x42, 0x74, 0x6c, 0x12, 0xa5, 0xec, - 0x0a, 0x4f, 0xfe, 0x2f, 0x27, 0x0a, 0x75, 0x0a, 0x1d, 0x8f, 0xb5, 0x16, - 0x20, 0x93, 0x4d, 0x74, 0xeb, 0x43, 0xe5, 0x4d, 0xf4, 0x24, 0xfd, 0x96, - 0x30, 0x6c, 0x01, 0x17, 0xbf, 0x13, 0x1a, 0xfa, 0xbf, 0x90, 0xa9, 0xd3, - 0x3d, 0x11, 0x98, 0xd9, 0x05, 0x19, 0x37, 0x35, 0x14, 0x41, 0x04, 0x19, - 0x0a, 0x07, 0x70, 0x0f, 0xfa, 0x4b, 0xe6, 0xae, 0x1d, 0x79, 0xee, 0x0f, - 0x06, 0xae, 0xb5, 0x44, 0xcd, 0x5a, 0xdd, 0xaa, 0xbe, 0xdf, 0x70, 0xf8, - 0x62, 0x33, 0x21, 0x33, 0x2c, 0x54, 0xf3, 0x55, 0xf0, 0xfb, 0xfe, 0xc7, - 0x83, 0xed, 0x35, 0x9e, 0x5d, 0x0b, 0xf7, 0x37, 0x7a, 0x0f, 0xc4, 0xea, - 0x7a, 0xce, 0x47, 0x3c, 0x9c, 0x11, 0x2b, 0x41, 0xcc, 0xd4, 0x1a, 0xc5, - 0x6a, 0x56, 0x12, 0x41, 0x04, 0x36, 0x0a, 0x1c, 0xea, 0x33, 0xfc, 0xe6, - 0x41, 0x15, 0x64, 0x58, 0xe0, 0xa4, 0xea, 0xc2, 0x19, 0xe9, 0x68, 0x31, - 0xe6, 0xae, 0xbc, 0x88, 0xb3, 0xf3, 0x75, 0x2f, 0x93, 0xa0, 0x28, 0x1d, - 0x1b, 0xf1, 0xfb, 0x10, 0x60, 0x51, 0xdb, 0x96, 0x94, 0xa8, 0xd6, 0xe8, - 0x62, 0xa5, 0xef, 0x13, 0x24, 0xa3, 0xd9, 0xe2, 0x78, 0x94, 0xf1, 0xee, - 0x4f, 0x7c, 0x59, 0x19, 0x99, 0x65, 0xa8, 0xdd, 0x4a, 0x20, 0x91, 0x84, - 0x7d, 0x2d, 0x22, 0xdf, 0x3e, 0xe5, 0x5f, 0xaa, 0x2a, 0x3f, 0xb3, 0x3f, - 0xd2, 0xd1, 0xe0, 0x55, 0xa0, 0x7a, 0x7c, 0x61, 0xec, 0xfb, 0x8d, 0x80, - 0xec, 0x00, 0xc2, 0xc9, 0xeb, 0x12 -}; - -static const unsigned char ecjpake_test_srv_two[] = { - 0x03, 0x00, 0x17, 0x41, 0x04, 0x0f, 0xb2, 0x2b, 0x1d, 0x5d, 0x11, 0x23, - 0xe0, 0xef, 0x9f, 0xeb, 0x9d, 0x8a, 0x2e, 0x59, 0x0a, 0x1f, 0x4d, 0x7c, - 0xed, 0x2c, 0x2b, 0x06, 0x58, 0x6e, 0x8f, 0x2a, 0x16, 0xd4, 0xeb, 0x2f, - 0xda, 0x43, 0x28, 0xa2, 0x0b, 0x07, 0xd8, 0xfd, 0x66, 0x76, 0x54, 0xca, - 0x18, 0xc5, 0x4e, 0x32, 0xa3, 0x33, 0xa0, 0x84, 0x54, 0x51, 0xe9, 0x26, - 0xee, 0x88, 0x04, 0xfd, 0x7a, 0xf0, 0xaa, 0xa7, 0xa6, 0x41, 0x04, 0x55, - 0x16, 0xea, 0x3e, 0x54, 0xa0, 0xd5, 0xd8, 0xb2, 0xce, 0x78, 0x6b, 0x38, - 0xd3, 0x83, 0x37, 0x00, 0x29, 0xa5, 0xdb, 0xe4, 0x45, 0x9c, 0x9d, 0xd6, - 0x01, 0xb4, 0x08, 0xa2, 0x4a, 0xe6, 0x46, 0x5c, 0x8a, 0xc9, 0x05, 0xb9, - 0xeb, 0x03, 0xb5, 0xd3, 0x69, 0x1c, 0x13, 0x9e, 0xf8, 0x3f, 0x1c, 0xd4, - 0x20, 0x0f, 0x6c, 0x9c, 0xd4, 0xec, 0x39, 0x22, 0x18, 0xa5, 0x9e, 0xd2, - 0x43, 0xd3, 0xc8, 0x20, 0xff, 0x72, 0x4a, 0x9a, 0x70, 0xb8, 0x8c, 0xb8, - 0x6f, 0x20, 0xb4, 0x34, 0xc6, 0x86, 0x5a, 0xa1, 0xcd, 0x79, 0x06, 0xdd, - 0x7c, 0x9b, 0xce, 0x35, 0x25, 0xf5, 0x08, 0x27, 0x6f, 0x26, 0x83, 0x6c -}; - -static const unsigned char ecjpake_test_cli_two[] = { - 0x41, 0x04, 0x69, 0xd5, 0x4e, 0xe8, 0x5e, 0x90, 0xce, 0x3f, 0x12, 0x46, - 0x74, 0x2d, 0xe5, 0x07, 0xe9, 0x39, 0xe8, 0x1d, 0x1d, 0xc1, 0xc5, 0xcb, - 0x98, 0x8b, 0x58, 0xc3, 0x10, 0xc9, 0xfd, 0xd9, 0x52, 0x4d, 0x93, 0x72, - 0x0b, 0x45, 0x54, 0x1c, 0x83, 0xee, 0x88, 0x41, 0x19, 0x1d, 0xa7, 0xce, - 0xd8, 0x6e, 0x33, 0x12, 0xd4, 0x36, 0x23, 0xc1, 0xd6, 0x3e, 0x74, 0x98, - 0x9a, 0xba, 0x4a, 0xff, 0xd1, 0xee, 0x41, 0x04, 0x07, 0x7e, 0x8c, 0x31, - 0xe2, 0x0e, 0x6b, 0xed, 0xb7, 0x60, 0xc1, 0x35, 0x93, 0xe6, 0x9f, 0x15, - 0xbe, 0x85, 0xc2, 0x7d, 0x68, 0xcd, 0x09, 0xcc, 0xb8, 0xc4, 0x18, 0x36, - 0x08, 0x91, 0x7c, 0x5c, 0x3d, 0x40, 0x9f, 0xac, 0x39, 0xfe, 0xfe, 0xe8, - 0x2f, 0x72, 0x92, 0xd3, 0x6f, 0x0d, 0x23, 0xe0, 0x55, 0x91, 0x3f, 0x45, - 0xa5, 0x2b, 0x85, 0xdd, 0x8a, 0x20, 0x52, 0xe9, 0xe1, 0x29, 0xbb, 0x4d, - 0x20, 0x0f, 0x01, 0x1f, 0x19, 0x48, 0x35, 0x35, 0xa6, 0xe8, 0x9a, 0x58, - 0x0c, 0x9b, 0x00, 0x03, 0xba, 0xf2, 0x14, 0x62, 0xec, 0xe9, 0x1a, 0x82, - 0xcc, 0x38, 0xdb, 0xdc, 0xae, 0x60, 0xd9, 0xc5, 0x4c -}; - -static const unsigned char ecjpake_test_pms[] = { - 0xf3, 0xd4, 0x7f, 0x59, 0x98, 0x44, 0xdb, 0x92, 0xa5, 0x69, 0xbb, 0xe7, - 0x98, 0x1e, 0x39, 0xd9, 0x31, 0xfd, 0x74, 0x3b, 0xf2, 0x2e, 0x98, 0xf9, - 0xb4, 0x38, 0xf7, 0x19, 0xd3, 0xc4, 0xf3, 0x51 -}; - -/* Load my private keys and generate the correponding public keys */ -static int ecjpake_test_load( mbedtls_ecjpake_context *ctx, - const unsigned char *xm1, size_t len1, - const unsigned char *xm2, size_t len2 ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm1, xm1, len1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm2, xm2, len2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm1, &ctx->xm1, - &ctx->grp.G, NULL, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm2, &ctx->xm2, - &ctx->grp.G, NULL, NULL ) ); - -cleanup: - return( ret ); -} - -/* For tests we don't need a secure RNG; - * use the LGC from Numerical Recipes for simplicity */ -static int ecjpake_lgc( void *p, unsigned char *out, size_t len ) -{ - static uint32_t x = 42; - (void) p; - - while( len > 0 ) - { - size_t use_len = len > 4 ? 4 : len; - x = 1664525 * x + 1013904223; - memcpy( out, &x, use_len ); - out += use_len; - len -= use_len; - } - - return( 0 ); -} - -#define TEST_ASSERT( x ) \ - do { \ - if( x ) \ - ret = 0; \ - else \ - { \ - ret = 1; \ - goto cleanup; \ - } \ - } while( 0 ) - -/* - * Checkup routine - */ -int mbedtls_ecjpake_self_test( int verbose ) -{ - int ret; - mbedtls_ecjpake_context cli; - mbedtls_ecjpake_context srv; - unsigned char buf[512], pms[32]; - size_t len, pmslen; - - mbedtls_ecjpake_init( &cli ); - mbedtls_ecjpake_init( &srv ); - - if( verbose != 0 ) - mbedtls_printf( " ECJPAKE test #0 (setup): " ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &cli, MBEDTLS_ECJPAKE_CLIENT, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, - ecjpake_test_password, - sizeof( ecjpake_test_password ) ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &srv, MBEDTLS_ECJPAKE_SERVER, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, - ecjpake_test_password, - sizeof( ecjpake_test_password ) ) == 0 ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " ECJPAKE test #1 (random handshake): " ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_one( &cli, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &srv, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_one( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &cli, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_two( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &cli, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &cli, - pms, sizeof( pms ), &pmslen, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_two( &cli, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &srv, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( len == pmslen ); - TEST_ASSERT( memcmp( buf, pms, len ) == 0 ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " ECJPAKE test #2 (reference handshake): " ); - - /* Simulate generation of round one */ - MBEDTLS_MPI_CHK( ecjpake_test_load( &cli, - ecjpake_test_x1, sizeof( ecjpake_test_x1 ), - ecjpake_test_x2, sizeof( ecjpake_test_x2 ) ) ); - - MBEDTLS_MPI_CHK( ecjpake_test_load( &srv, - ecjpake_test_x3, sizeof( ecjpake_test_x3 ), - ecjpake_test_x4, sizeof( ecjpake_test_x4 ) ) ); - - /* Read round one */ - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &srv, - ecjpake_test_cli_one, - sizeof( ecjpake_test_cli_one ) ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &cli, - ecjpake_test_srv_one, - sizeof( ecjpake_test_srv_one ) ) == 0 ); - - /* Skip generation of round two, read round two */ - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &cli, - ecjpake_test_srv_two, - sizeof( ecjpake_test_srv_two ) ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &srv, - ecjpake_test_cli_two, - sizeof( ecjpake_test_cli_two ) ) == 0 ); - - /* Server derives PMS */ - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( len == sizeof( ecjpake_test_pms ) ); - TEST_ASSERT( memcmp( buf, ecjpake_test_pms, len ) == 0 ); - - memset( buf, 0, len ); /* Avoid interferences with next step */ - - /* Client derives PMS */ - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &cli, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( len == sizeof( ecjpake_test_pms ) ); - TEST_ASSERT( memcmp( buf, ecjpake_test_pms, len ) == 0 ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - mbedtls_ecjpake_free( &cli ); - mbedtls_ecjpake_free( &srv ); - - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( ret ); -} - -#undef TEST_ASSERT - -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED && MBEDTLS_SHA256_C */ - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_ECJPAKE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ecp.c b/build/premake/premake5/contrib/mbedtls/library/ecp.c deleted file mode 100644 index 19bb4882e7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ecp.c +++ /dev/null @@ -1,2090 +0,0 @@ -/* - * Elliptic curves over GF(p): generic functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * References: - * - * SEC1 http://www.secg.org/index.php?action=secg,docs_secg - * GECC = Guide to Elliptic Curve Cryptography - Hankerson, Menezes, Vanstone - * FIPS 186-3 http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf - * RFC 4492 for the related TLS structures and constants - * - * [Curve25519] http://cr.yp.to/ecdh/curve25519-20060209.pdf - * - * [2] CORON, Jean-S'ebastien. Resistance against differential power analysis - * for elliptic curve cryptosystems. In : Cryptographic Hardware and - * Embedded Systems. Springer Berlin Heidelberg, 1999. p. 292-302. - * - * - * [3] HEDABOU, Mustapha, PINEL, Pierre, et B'EN'ETEAU, Lucien. A comb method to - * render ECC resistant against Side Channel Attacks. IACR Cryptology - * ePrint Archive, 2004, vol. 2004, p. 342. - * - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ECP_C) - -#include "mbedtls/ecp.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -#if defined(MBEDTLS_SELF_TEST) -/* - * Counts of point addition and doubling, and field multiplications. - * Used to test resistance of point multiplication to simple timing attacks. - */ -static unsigned long add_count, dbl_count, mul_count; -#endif - -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) -#define ECP_SHORTWEIERSTRASS -#endif - -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) -#define ECP_MONTGOMERY -#endif - -/* - * Curve types: internal for now, might be exposed later - */ -typedef enum -{ - ECP_TYPE_NONE = 0, - ECP_TYPE_SHORT_WEIERSTRASS, /* y^2 = x^3 + a x + b */ - ECP_TYPE_MONTGOMERY, /* y^2 = x^3 + a x^2 + x */ -} ecp_curve_type; - -/* - * List of supported curves: - * - internal ID - * - TLS NamedCurve ID (RFC 4492 sec. 5.1.1, RFC 7071 sec. 2) - * - size in bits - * - readable name - * - * Curves are listed in order: largest curves first, and for a given size, - * fastest curves first. This provides the default order for the SSL module. - * - * Reminder: update profiles in x509_crt.c when adding a new curves! - */ -static const mbedtls_ecp_curve_info ecp_supported_curves[] = -{ -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) - { MBEDTLS_ECP_DP_SECP521R1, 25, 521, "secp521r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) - { MBEDTLS_ECP_DP_BP512R1, 28, 512, "brainpoolP512r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) - { MBEDTLS_ECP_DP_SECP384R1, 24, 384, "secp384r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) - { MBEDTLS_ECP_DP_BP384R1, 27, 384, "brainpoolP384r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) - { MBEDTLS_ECP_DP_SECP256R1, 23, 256, "secp256r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) - { MBEDTLS_ECP_DP_SECP256K1, 22, 256, "secp256k1" }, -#endif -#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) - { MBEDTLS_ECP_DP_BP256R1, 26, 256, "brainpoolP256r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) - { MBEDTLS_ECP_DP_SECP224R1, 21, 224, "secp224r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) - { MBEDTLS_ECP_DP_SECP224K1, 20, 224, "secp224k1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) - { MBEDTLS_ECP_DP_SECP192R1, 19, 192, "secp192r1" }, -#endif -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) - { MBEDTLS_ECP_DP_SECP192K1, 18, 192, "secp192k1" }, -#endif - { MBEDTLS_ECP_DP_NONE, 0, 0, NULL }, -}; - -#define ECP_NB_CURVES sizeof( ecp_supported_curves ) / \ - sizeof( ecp_supported_curves[0] ) - -static mbedtls_ecp_group_id ecp_supported_grp_id[ECP_NB_CURVES]; - -/* - * List of supported curves and associated info - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_list( void ) -{ - return( ecp_supported_curves ); -} - -/* - * List of supported curves, group ID only - */ -const mbedtls_ecp_group_id *mbedtls_ecp_grp_id_list( void ) -{ - static int init_done = 0; - - if( ! init_done ) - { - size_t i = 0; - const mbedtls_ecp_curve_info *curve_info; - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - ecp_supported_grp_id[i++] = curve_info->grp_id; - } - ecp_supported_grp_id[i] = MBEDTLS_ECP_DP_NONE; - - init_done = 1; - } - - return( ecp_supported_grp_id ); -} - -/* - * Get the curve info for the internal identifier - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_grp_id( mbedtls_ecp_group_id grp_id ) -{ - const mbedtls_ecp_curve_info *curve_info; - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - if( curve_info->grp_id == grp_id ) - return( curve_info ); - } - - return( NULL ); -} - -/* - * Get the curve info from the TLS identifier - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_tls_id( uint16_t tls_id ) -{ - const mbedtls_ecp_curve_info *curve_info; - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - if( curve_info->tls_id == tls_id ) - return( curve_info ); - } - - return( NULL ); -} - -/* - * Get the curve info from the name - */ -const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_name( const char *name ) -{ - const mbedtls_ecp_curve_info *curve_info; - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - if( strcmp( curve_info->name, name ) == 0 ) - return( curve_info ); - } - - return( NULL ); -} - -/* - * Get the type of a curve - */ -static inline ecp_curve_type ecp_get_type( const mbedtls_ecp_group *grp ) -{ - if( grp->G.X.p == NULL ) - return( ECP_TYPE_NONE ); - - if( grp->G.Y.p == NULL ) - return( ECP_TYPE_MONTGOMERY ); - else - return( ECP_TYPE_SHORT_WEIERSTRASS ); -} - -/* - * Initialize (the components of) a point - */ -void mbedtls_ecp_point_init( mbedtls_ecp_point *pt ) -{ - if( pt == NULL ) - return; - - mbedtls_mpi_init( &pt->X ); - mbedtls_mpi_init( &pt->Y ); - mbedtls_mpi_init( &pt->Z ); -} - -/* - * Initialize (the components of) a group - */ -void mbedtls_ecp_group_init( mbedtls_ecp_group *grp ) -{ - if( grp == NULL ) - return; - - memset( grp, 0, sizeof( mbedtls_ecp_group ) ); -} - -/* - * Initialize (the components of) a key pair - */ -void mbedtls_ecp_keypair_init( mbedtls_ecp_keypair *key ) -{ - if( key == NULL ) - return; - - mbedtls_ecp_group_init( &key->grp ); - mbedtls_mpi_init( &key->d ); - mbedtls_ecp_point_init( &key->Q ); -} - -/* - * Unallocate (the components of) a point - */ -void mbedtls_ecp_point_free( mbedtls_ecp_point *pt ) -{ - if( pt == NULL ) - return; - - mbedtls_mpi_free( &( pt->X ) ); - mbedtls_mpi_free( &( pt->Y ) ); - mbedtls_mpi_free( &( pt->Z ) ); -} - -/* - * Unallocate (the components of) a group - */ -void mbedtls_ecp_group_free( mbedtls_ecp_group *grp ) -{ - size_t i; - - if( grp == NULL ) - return; - - if( grp->h != 1 ) - { - mbedtls_mpi_free( &grp->P ); - mbedtls_mpi_free( &grp->A ); - mbedtls_mpi_free( &grp->B ); - mbedtls_ecp_point_free( &grp->G ); - mbedtls_mpi_free( &grp->N ); - } - - if( grp->T != NULL ) - { - for( i = 0; i < grp->T_size; i++ ) - mbedtls_ecp_point_free( &grp->T[i] ); - mbedtls_free( grp->T ); - } - - mbedtls_zeroize( grp, sizeof( mbedtls_ecp_group ) ); -} - -/* - * Unallocate (the components of) a key pair - */ -void mbedtls_ecp_keypair_free( mbedtls_ecp_keypair *key ) -{ - if( key == NULL ) - return; - - mbedtls_ecp_group_free( &key->grp ); - mbedtls_mpi_free( &key->d ); - mbedtls_ecp_point_free( &key->Q ); -} - -/* - * Copy the contents of a point - */ -int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Y, &Q->Y ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Z, &Q->Z ) ); - -cleanup: - return( ret ); -} - -/* - * Copy the contents of a group object - */ -int mbedtls_ecp_group_copy( mbedtls_ecp_group *dst, const mbedtls_ecp_group *src ) -{ - return mbedtls_ecp_group_load( dst, src->id ); -} - -/* - * Set point to zero - */ -int mbedtls_ecp_set_zero( mbedtls_ecp_point *pt ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->X , 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Y , 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z , 0 ) ); - -cleanup: - return( ret ); -} - -/* - * Tell if a point is zero - */ -int mbedtls_ecp_is_zero( mbedtls_ecp_point *pt ) -{ - return( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 ); -} - -/* - * Compare two points lazyly - */ -int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P, - const mbedtls_ecp_point *Q ) -{ - if( mbedtls_mpi_cmp_mpi( &P->X, &Q->X ) == 0 && - mbedtls_mpi_cmp_mpi( &P->Y, &Q->Y ) == 0 && - mbedtls_mpi_cmp_mpi( &P->Z, &Q->Z ) == 0 ) - { - return( 0 ); - } - - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); -} - -/* - * Import a non-zero point from ASCII strings - */ -int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix, - const char *x, const char *y ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->X, radix, x ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->Y, radix, y ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); - -cleanup: - return( ret ); -} - -/* - * Export a point into unsigned binary data (SEC1 2.3.3) - */ -int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *P, - int format, size_t *olen, - unsigned char *buf, size_t buflen ) -{ - int ret = 0; - size_t plen; - - if( format != MBEDTLS_ECP_PF_UNCOMPRESSED && - format != MBEDTLS_ECP_PF_COMPRESSED ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * Common case: P == 0 - */ - if( mbedtls_mpi_cmp_int( &P->Z, 0 ) == 0 ) - { - if( buflen < 1 ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - buf[0] = 0x00; - *olen = 1; - - return( 0 ); - } - - plen = mbedtls_mpi_size( &grp->P ); - - if( format == MBEDTLS_ECP_PF_UNCOMPRESSED ) - { - *olen = 2 * plen + 1; - - if( buflen < *olen ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - buf[0] = 0x04; - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &P->X, buf + 1, plen ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &P->Y, buf + 1 + plen, plen ) ); - } - else if( format == MBEDTLS_ECP_PF_COMPRESSED ) - { - *olen = plen + 1; - - if( buflen < *olen ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - buf[0] = 0x02 + mbedtls_mpi_get_bit( &P->Y, 0 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &P->X, buf + 1, plen ) ); - } - -cleanup: - return( ret ); -} - -/* - * Import a point from unsigned binary data (SEC1 2.3.4) - */ -int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt, - const unsigned char *buf, size_t ilen ) -{ - int ret; - size_t plen; - - if( ilen < 1 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( buf[0] == 0x00 ) - { - if( ilen == 1 ) - return( mbedtls_ecp_set_zero( pt ) ); - else - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - } - - plen = mbedtls_mpi_size( &grp->P ); - - if( buf[0] != 0x04 ) - return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ); - - if( ilen != 2 * plen + 1 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &pt->X, buf + 1, plen ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &pt->Y, buf + 1 + plen, plen ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z, 1 ) ); - -cleanup: - return( ret ); -} - -/* - * Import a point from a TLS ECPoint record (RFC 4492) - * struct { - * opaque point <1..2^8-1>; - * } ECPoint; - */ -int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt, - const unsigned char **buf, size_t buf_len ) -{ - unsigned char data_len; - const unsigned char *buf_start; - - /* - * We must have at least two bytes (1 for length, at least one for data) - */ - if( buf_len < 2 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - data_len = *(*buf)++; - if( data_len < 1 || data_len > buf_len - 1 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * Save buffer start for read_binary and update buf - */ - buf_start = *buf; - *buf += data_len; - - return mbedtls_ecp_point_read_binary( grp, pt, buf_start, data_len ); -} - -/* - * Export a point as a TLS ECPoint record (RFC 4492) - * struct { - * opaque point <1..2^8-1>; - * } ECPoint; - */ -int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt, - int format, size_t *olen, - unsigned char *buf, size_t blen ) -{ - int ret; - - /* - * buffer length must be at least one, for our length byte - */ - if( blen < 1 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecp_point_write_binary( grp, pt, format, - olen, buf + 1, blen - 1) ) != 0 ) - return( ret ); - - /* - * write length to the first byte and update total length - */ - buf[0] = (unsigned char) *olen; - ++*olen; - - return( 0 ); -} - -/* - * Set a group from an ECParameters record (RFC 4492) - */ -int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, const unsigned char **buf, size_t len ) -{ - uint16_t tls_id; - const mbedtls_ecp_curve_info *curve_info; - - /* - * We expect at least three bytes (see below) - */ - if( len < 3 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * First byte is curve_type; only named_curve is handled - */ - if( *(*buf)++ != MBEDTLS_ECP_TLS_NAMED_CURVE ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * Next two bytes are the namedcurve value - */ - tls_id = *(*buf)++; - tls_id <<= 8; - tls_id |= *(*buf)++; - - if( ( curve_info = mbedtls_ecp_curve_info_from_tls_id( tls_id ) ) == NULL ) - return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ); - - return mbedtls_ecp_group_load( grp, curve_info->grp_id ); -} - -/* - * Write the ECParameters record corresponding to a group (RFC 4492) - */ -int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp, size_t *olen, - unsigned char *buf, size_t blen ) -{ - const mbedtls_ecp_curve_info *curve_info; - - if( ( curve_info = mbedtls_ecp_curve_info_from_grp_id( grp->id ) ) == NULL ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * We are going to write 3 bytes (see below) - */ - *olen = 3; - if( blen < *olen ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - /* - * First byte is curve_type, always named_curve - */ - *buf++ = MBEDTLS_ECP_TLS_NAMED_CURVE; - - /* - * Next two bytes are the namedcurve value - */ - buf[0] = curve_info->tls_id >> 8; - buf[1] = curve_info->tls_id & 0xFF; - - return( 0 ); -} - -/* - * Wrapper around fast quasi-modp functions, with fall-back to mbedtls_mpi_mod_mpi. - * See the documentation of struct mbedtls_ecp_group. - * - * This function is in the critial loop for mbedtls_ecp_mul, so pay attention to perf. - */ -static int ecp_modp( mbedtls_mpi *N, const mbedtls_ecp_group *grp ) -{ - int ret; - - if( grp->modp == NULL ) - return( mbedtls_mpi_mod_mpi( N, N, &grp->P ) ); - - /* N->s < 0 is a much faster test, which fails only if N is 0 */ - if( ( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) || - mbedtls_mpi_bitlen( N ) > 2 * grp->pbits ) - { - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - } - - MBEDTLS_MPI_CHK( grp->modp( N ) ); - - /* N->s < 0 is a much faster test, which fails only if N is 0 */ - while( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &grp->P ) ); - - while( mbedtls_mpi_cmp_mpi( N, &grp->P ) >= 0 ) - /* we known P, N and the result are positive */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( N, N, &grp->P ) ); - -cleanup: - return( ret ); -} - -/* - * Fast mod-p functions expect their argument to be in the 0..p^2 range. - * - * In order to guarantee that, we need to ensure that operands of - * mbedtls_mpi_mul_mpi are in the 0..p range. So, after each operation we will - * bring the result back to this range. - * - * The following macros are shortcuts for doing that. - */ - -/* - * Reduce a mbedtls_mpi mod p in-place, general case, to use after mbedtls_mpi_mul_mpi - */ -#if defined(MBEDTLS_SELF_TEST) -#define INC_MUL_COUNT mul_count++; -#else -#define INC_MUL_COUNT -#endif - -#define MOD_MUL( N ) do { MBEDTLS_MPI_CHK( ecp_modp( &N, grp ) ); INC_MUL_COUNT } \ - while( 0 ) - -/* - * Reduce a mbedtls_mpi mod p in-place, to use after mbedtls_mpi_sub_mpi - * N->s < 0 is a very fast test, which fails only if N is 0 - */ -#define MOD_SUB( N ) \ - while( N.s < 0 && mbedtls_mpi_cmp_int( &N, 0 ) != 0 ) \ - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &N, &N, &grp->P ) ) - -/* - * Reduce a mbedtls_mpi mod p in-place, to use after mbedtls_mpi_add_mpi and mbedtls_mpi_mul_int. - * We known P, N and the result are positive, so sub_abs is correct, and - * a bit faster. - */ -#define MOD_ADD( N ) \ - while( mbedtls_mpi_cmp_mpi( &N, &grp->P ) >= 0 ) \ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( &N, &N, &grp->P ) ) - -#if defined(ECP_SHORTWEIERSTRASS) -/* - * For curves in short Weierstrass form, we do all the internal operations in - * Jacobian coordinates. - * - * For multiplication, we'll use a comb method with coutermeasueres against - * SPA, hence timing attacks. - */ - -/* - * Normalize jacobian coordinates so that Z == 0 || Z == 1 (GECC 3.2.1) - * Cost: 1N := 1I + 3M + 1S - */ -static int ecp_normalize_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt ) -{ - int ret; - mbedtls_mpi Zi, ZZi; - - if( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 ) - return( 0 ); - - mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi ); - - /* - * X = X / Z^2 mod p - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &Zi, &pt->Z, &grp->P ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ZZi, &Zi, &Zi ) ); MOD_MUL( ZZi ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &pt->X, &pt->X, &ZZi ) ); MOD_MUL( pt->X ); - - /* - * Y = Y / Z^3 mod p - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &pt->Y, &pt->Y, &ZZi ) ); MOD_MUL( pt->Y ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &pt->Y, &pt->Y, &Zi ) ); MOD_MUL( pt->Y ); - - /* - * Z = 1 - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z, 1 ) ); - -cleanup: - - mbedtls_mpi_free( &Zi ); mbedtls_mpi_free( &ZZi ); - - return( ret ); -} - -/* - * Normalize jacobian coordinates of an array of (pointers to) points, - * using Montgomery's trick to perform only one inversion mod P. - * (See for example Cohen's "A Course in Computational Algebraic Number - * Theory", Algorithm 10.3.4.) - * - * Warning: fails (returning an error) if one of the points is zero! - * This should never happen, see choice of w in ecp_mul_comb(). - * - * Cost: 1N(t) := 1I + (6t - 3)M + 1S - */ -static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp, - mbedtls_ecp_point *T[], size_t t_len ) -{ - int ret; - size_t i; - mbedtls_mpi *c, u, Zi, ZZi; - - if( t_len < 2 ) - return( ecp_normalize_jac( grp, *T ) ); - - if( ( c = mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL ) - return( MBEDTLS_ERR_ECP_ALLOC_FAILED ); - - mbedtls_mpi_init( &u ); mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi ); - - /* - * c[i] = Z_0 * ... * Z_i - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &c[0], &T[0]->Z ) ); - for( i = 1; i < t_len; i++ ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &c[i], &c[i-1], &T[i]->Z ) ); - MOD_MUL( c[i] ); - } - - /* - * u = 1 / (Z_0 * ... * Z_n) mod P - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &u, &c[t_len-1], &grp->P ) ); - - for( i = t_len - 1; ; i-- ) - { - /* - * Zi = 1 / Z_i mod p - * u = 1 / (Z_0 * ... * Z_i) mod P - */ - if( i == 0 ) { - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &Zi, &u ) ); - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &Zi, &u, &c[i-1] ) ); MOD_MUL( Zi ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &u, &u, &T[i]->Z ) ); MOD_MUL( u ); - } - - /* - * proceed as in normalize() - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ZZi, &Zi, &Zi ) ); MOD_MUL( ZZi ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T[i]->X, &T[i]->X, &ZZi ) ); MOD_MUL( T[i]->X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T[i]->Y, &T[i]->Y, &ZZi ) ); MOD_MUL( T[i]->Y ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T[i]->Y, &T[i]->Y, &Zi ) ); MOD_MUL( T[i]->Y ); - - /* - * Post-precessing: reclaim some memory by shrinking coordinates - * - not storing Z (always 1) - * - shrinking other coordinates, but still keeping the same number of - * limbs as P, as otherwise it will too likely be regrown too fast. - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_shrink( &T[i]->X, grp->P.n ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shrink( &T[i]->Y, grp->P.n ) ); - mbedtls_mpi_free( &T[i]->Z ); - - if( i == 0 ) - break; - } - -cleanup: - - mbedtls_mpi_free( &u ); mbedtls_mpi_free( &Zi ); mbedtls_mpi_free( &ZZi ); - for( i = 0; i < t_len; i++ ) - mbedtls_mpi_free( &c[i] ); - mbedtls_free( c ); - - return( ret ); -} - -/* - * Conditional point inversion: Q -> -Q = (Q.X, -Q.Y, Q.Z) without leak. - * "inv" must be 0 (don't invert) or 1 (invert) or the result will be invalid - */ -static int ecp_safe_invert_jac( const mbedtls_ecp_group *grp, - mbedtls_ecp_point *Q, - unsigned char inv ) -{ - int ret; - unsigned char nonzero; - mbedtls_mpi mQY; - - mbedtls_mpi_init( &mQY ); - - /* Use the fact that -Q.Y mod P = P - Q.Y unless Q.Y == 0 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &mQY, &grp->P, &Q->Y ) ); - nonzero = mbedtls_mpi_cmp_int( &Q->Y, 0 ) != 0; - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &Q->Y, &mQY, inv & nonzero ) ); - -cleanup: - mbedtls_mpi_free( &mQY ); - - return( ret ); -} - -/* - * Point doubling R = 2 P, Jacobian coordinates - * - * Based on http://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian.html#doubling-dbl-1998-cmo-2 . - * - * We follow the variable naming fairly closely. The formula variations that trade a MUL for a SQR - * (plus a few ADDs) aren't useful as our bignum implementation doesn't distinguish squaring. - * - * Standard optimizations are applied when curve parameter A is one of { 0, -3 }. - * - * Cost: 1D := 3M + 4S (A == 0) - * 4M + 4S (A == -3) - * 3M + 6S + 1a otherwise - */ -static int ecp_double_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_ecp_point *P ) -{ - int ret; - mbedtls_mpi M, S, T, U; - -#if defined(MBEDTLS_SELF_TEST) - dbl_count++; -#endif - - mbedtls_mpi_init( &M ); mbedtls_mpi_init( &S ); mbedtls_mpi_init( &T ); mbedtls_mpi_init( &U ); - - /* Special case for A = -3 */ - if( grp->A.p == NULL ) - { - /* M = 3(X + Z^2)(X - Z^2) */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &P->Z, &P->Z ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &T, &P->X, &S ) ); MOD_ADD( T ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &U, &P->X, &S ) ); MOD_SUB( U ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &T, &U ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &M, &S, 3 ) ); MOD_ADD( M ); - } - else - { - /* M = 3.X^2 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &P->X, &P->X ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &M, &S, 3 ) ); MOD_ADD( M ); - - /* Optimize away for "koblitz" curves with A = 0 */ - if( mbedtls_mpi_cmp_int( &grp->A, 0 ) != 0 ) - { - /* M += A.Z^4 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &P->Z, &P->Z ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, &S, &S ) ); MOD_MUL( T ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &T, &grp->A ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &M, &M, &S ) ); MOD_ADD( M ); - } - } - - /* S = 4.X.Y^2 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, &P->Y, &P->Y ) ); MOD_MUL( T ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &T, 1 ) ); MOD_ADD( T ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &P->X, &T ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &S, 1 ) ); MOD_ADD( S ); - - /* U = 8.Y^4 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &U, &T, &T ) ); MOD_MUL( U ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &U, 1 ) ); MOD_ADD( U ); - - /* T = M^2 - 2.S */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, &M, &M ) ); MOD_MUL( T ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T, &T, &S ) ); MOD_SUB( T ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T, &T, &S ) ); MOD_SUB( T ); - - /* S = M(S - T) - U */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &S, &S, &T ) ); MOD_SUB( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S, &S, &M ) ); MOD_MUL( S ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &S, &S, &U ) ); MOD_SUB( S ); - - /* U = 2.Y.Z */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &U, &P->Y, &P->Z ) ); MOD_MUL( U ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &U, 1 ) ); MOD_ADD( U ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->X, &T ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->Y, &S ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->Z, &U ) ); - -cleanup: - mbedtls_mpi_free( &M ); mbedtls_mpi_free( &S ); mbedtls_mpi_free( &T ); mbedtls_mpi_free( &U ); - - return( ret ); -} - -/* - * Addition: R = P + Q, mixed affine-Jacobian coordinates (GECC 3.22) - * - * The coordinates of Q must be normalized (= affine), - * but those of P don't need to. R is not normalized. - * - * Special cases: (1) P or Q is zero, (2) R is zero, (3) P == Q. - * None of these cases can happen as intermediate step in ecp_mul_comb(): - * - at each step, P, Q and R are multiples of the base point, the factor - * being less than its order, so none of them is zero; - * - Q is an odd multiple of the base point, P an even multiple, - * due to the choice of precomputed points in the modified comb method. - * So branches for these cases do not leak secret information. - * - * We accept Q->Z being unset (saving memory in tables) as meaning 1. - * - * Cost: 1A := 8M + 3S - */ -static int ecp_add_mixed( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_ecp_point *P, const mbedtls_ecp_point *Q ) -{ - int ret; - mbedtls_mpi T1, T2, T3, T4, X, Y, Z; - -#if defined(MBEDTLS_SELF_TEST) - add_count++; -#endif - - /* - * Trivial cases: P == 0 or Q == 0 (case 1) - */ - if( mbedtls_mpi_cmp_int( &P->Z, 0 ) == 0 ) - return( mbedtls_ecp_copy( R, Q ) ); - - if( Q->Z.p != NULL && mbedtls_mpi_cmp_int( &Q->Z, 0 ) == 0 ) - return( mbedtls_ecp_copy( R, P ) ); - - /* - * Make sure Q coordinates are normalized - */ - if( Q->Z.p != NULL && mbedtls_mpi_cmp_int( &Q->Z, 1 ) != 0 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &T1 ); mbedtls_mpi_init( &T2 ); mbedtls_mpi_init( &T3 ); mbedtls_mpi_init( &T4 ); - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T1, &P->Z, &P->Z ) ); MOD_MUL( T1 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T2, &T1, &P->Z ) ); MOD_MUL( T2 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T1, &T1, &Q->X ) ); MOD_MUL( T1 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T2, &T2, &Q->Y ) ); MOD_MUL( T2 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T1, &T1, &P->X ) ); MOD_SUB( T1 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T2, &T2, &P->Y ) ); MOD_SUB( T2 ); - - /* Special cases (2) and (3) */ - if( mbedtls_mpi_cmp_int( &T1, 0 ) == 0 ) - { - if( mbedtls_mpi_cmp_int( &T2, 0 ) == 0 ) - { - ret = ecp_double_jac( grp, R, P ); - goto cleanup; - } - else - { - ret = mbedtls_ecp_set_zero( R ); - goto cleanup; - } - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &Z, &P->Z, &T1 ) ); MOD_MUL( Z ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T3, &T1, &T1 ) ); MOD_MUL( T3 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T4, &T3, &T1 ) ); MOD_MUL( T4 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T3, &T3, &P->X ) ); MOD_MUL( T3 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &T1, &T3, 2 ) ); MOD_ADD( T1 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &X, &T2, &T2 ) ); MOD_MUL( X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &X, &X, &T1 ) ); MOD_SUB( X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &X, &X, &T4 ) ); MOD_SUB( X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T3, &T3, &X ) ); MOD_SUB( T3 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T3, &T3, &T2 ) ); MOD_MUL( T3 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T4, &T4, &P->Y ) ); MOD_MUL( T4 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &Y, &T3, &T4 ) ); MOD_SUB( Y ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->X, &X ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->Y, &Y ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R->Z, &Z ) ); - -cleanup: - - mbedtls_mpi_free( &T1 ); mbedtls_mpi_free( &T2 ); mbedtls_mpi_free( &T3 ); mbedtls_mpi_free( &T4 ); - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); - - return( ret ); -} - -/* - * Randomize jacobian coordinates: - * (X, Y, Z) -> (l^2 X, l^3 Y, l Z) for random l - * This is sort of the reverse operation of ecp_normalize_jac(). - * - * This countermeasure was first suggested in [2]. - */ -static int ecp_randomize_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *pt, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret; - mbedtls_mpi l, ll; - size_t p_size = ( grp->pbits + 7 ) / 8; - int count = 0; - - mbedtls_mpi_init( &l ); mbedtls_mpi_init( &ll ); - - /* Generate l such that 1 < l < p */ - do - { - mbedtls_mpi_fill_random( &l, p_size, f_rng, p_rng ); - - while( mbedtls_mpi_cmp_mpi( &l, &grp->P ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &l, 1 ) ); - - if( count++ > 10 ) - return( MBEDTLS_ERR_ECP_RANDOM_FAILED ); - } - while( mbedtls_mpi_cmp_int( &l, 1 ) <= 0 ); - - /* Z = l * Z */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &pt->Z, &pt->Z, &l ) ); MOD_MUL( pt->Z ); - - /* X = l^2 * X */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ll, &l, &l ) ); MOD_MUL( ll ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &pt->X, &pt->X, &ll ) ); MOD_MUL( pt->X ); - - /* Y = l^3 * Y */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ll, &ll, &l ) ); MOD_MUL( ll ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &pt->Y, &pt->Y, &ll ) ); MOD_MUL( pt->Y ); - -cleanup: - mbedtls_mpi_free( &l ); mbedtls_mpi_free( &ll ); - - return( ret ); -} - -/* - * Check and define parameters used by the comb method (see below for details) - */ -#if MBEDTLS_ECP_WINDOW_SIZE < 2 || MBEDTLS_ECP_WINDOW_SIZE > 7 -#error "MBEDTLS_ECP_WINDOW_SIZE out of bounds" -#endif - -/* d = ceil( n / w ) */ -#define COMB_MAX_D ( MBEDTLS_ECP_MAX_BITS + 1 ) / 2 - -/* number of precomputed points */ -#define COMB_MAX_PRE ( 1 << ( MBEDTLS_ECP_WINDOW_SIZE - 1 ) ) - -/* - * Compute the representation of m that will be used with our comb method. - * - * The basic comb method is described in GECC 3.44 for example. We use a - * modified version that provides resistance to SPA by avoiding zero - * digits in the representation as in [3]. We modify the method further by - * requiring that all K_i be odd, which has the small cost that our - * representation uses one more K_i, due to carries. - * - * Also, for the sake of compactness, only the seven low-order bits of x[i] - * are used to represent K_i, and the msb of x[i] encodes the the sign (s_i in - * the paper): it is set if and only if if s_i == -1; - * - * Calling conventions: - * - x is an array of size d + 1 - * - w is the size, ie number of teeth, of the comb, and must be between - * 2 and 7 (in practice, between 2 and MBEDTLS_ECP_WINDOW_SIZE) - * - m is the MPI, expected to be odd and such that bitlength(m) <= w * d - * (the result will be incorrect if these assumptions are not satisfied) - */ -static void ecp_comb_fixed( unsigned char x[], size_t d, - unsigned char w, const mbedtls_mpi *m ) -{ - size_t i, j; - unsigned char c, cc, adjust; - - memset( x, 0, d+1 ); - - /* First get the classical comb values (except for x_d = 0) */ - for( i = 0; i < d; i++ ) - for( j = 0; j < w; j++ ) - x[i] |= mbedtls_mpi_get_bit( m, i + d * j ) << j; - - /* Now make sure x_1 .. x_d are odd */ - c = 0; - for( i = 1; i <= d; i++ ) - { - /* Add carry and update it */ - cc = x[i] & c; - x[i] = x[i] ^ c; - c = cc; - - /* Adjust if needed, avoiding branches */ - adjust = 1 - ( x[i] & 0x01 ); - c |= x[i] & ( x[i-1] * adjust ); - x[i] = x[i] ^ ( x[i-1] * adjust ); - x[i-1] |= adjust << 7; - } -} - -/* - * Precompute points for the comb method - * - * If i = i_{w-1} ... i_1 is the binary representation of i, then - * T[i] = i_{w-1} 2^{(w-1)d} P + ... + i_1 2^d P + P - * - * T must be able to hold 2^{w - 1} elements - * - * Cost: d(w-1) D + (2^{w-1} - 1) A + 1 N(w-1) + 1 N(2^{w-1} - 1) - */ -static int ecp_precompute_comb( const mbedtls_ecp_group *grp, - mbedtls_ecp_point T[], const mbedtls_ecp_point *P, - unsigned char w, size_t d ) -{ - int ret; - unsigned char i, k; - size_t j; - mbedtls_ecp_point *cur, *TT[COMB_MAX_PRE - 1]; - - /* - * Set T[0] = P and - * T[2^{l-1}] = 2^{dl} P for l = 1 .. w-1 (this is not the final value) - */ - MBEDTLS_MPI_CHK( mbedtls_ecp_copy( &T[0], P ) ); - - k = 0; - for( i = 1; i < ( 1U << ( w - 1 ) ); i <<= 1 ) - { - cur = T + i; - MBEDTLS_MPI_CHK( mbedtls_ecp_copy( cur, T + ( i >> 1 ) ) ); - for( j = 0; j < d; j++ ) - MBEDTLS_MPI_CHK( ecp_double_jac( grp, cur, cur ) ); - - TT[k++] = cur; - } - - MBEDTLS_MPI_CHK( ecp_normalize_jac_many( grp, TT, k ) ); - - /* - * Compute the remaining ones using the minimal number of additions - * Be careful to update T[2^l] only after using it! - */ - k = 0; - for( i = 1; i < ( 1U << ( w - 1 ) ); i <<= 1 ) - { - j = i; - while( j-- ) - { - MBEDTLS_MPI_CHK( ecp_add_mixed( grp, &T[i + j], &T[j], &T[i] ) ); - TT[k++] = &T[i + j]; - } - } - - MBEDTLS_MPI_CHK( ecp_normalize_jac_many( grp, TT, k ) ); - -cleanup: - return( ret ); -} - -/* - * Select precomputed point: R = sign(i) * T[ abs(i) / 2 ] - */ -static int ecp_select_comb( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_ecp_point T[], unsigned char t_len, - unsigned char i ) -{ - int ret; - unsigned char ii, j; - - /* Ignore the "sign" bit and scale down */ - ii = ( i & 0x7Fu ) >> 1; - - /* Read the whole table to thwart cache-based timing attacks */ - for( j = 0; j < t_len; j++ ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &R->X, &T[j].X, j == ii ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &R->Y, &T[j].Y, j == ii ) ); - } - - /* Safely invert result if i is "negative" */ - MBEDTLS_MPI_CHK( ecp_safe_invert_jac( grp, R, i >> 7 ) ); - -cleanup: - return( ret ); -} - -/* - * Core multiplication algorithm for the (modified) comb method. - * This part is actually common with the basic comb method (GECC 3.44) - * - * Cost: d A + d D + 1 R - */ -static int ecp_mul_comb_core( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_ecp_point T[], unsigned char t_len, - const unsigned char x[], size_t d, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point Txi; - size_t i; - - mbedtls_ecp_point_init( &Txi ); - - /* Start with a non-zero point and randomize its coordinates */ - i = d; - MBEDTLS_MPI_CHK( ecp_select_comb( grp, R, T, t_len, x[i] ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &R->Z, 1 ) ); - if( f_rng != 0 ) - MBEDTLS_MPI_CHK( ecp_randomize_jac( grp, R, f_rng, p_rng ) ); - - while( i-- != 0 ) - { - MBEDTLS_MPI_CHK( ecp_double_jac( grp, R, R ) ); - MBEDTLS_MPI_CHK( ecp_select_comb( grp, &Txi, T, t_len, x[i] ) ); - MBEDTLS_MPI_CHK( ecp_add_mixed( grp, R, R, &Txi ) ); - } - -cleanup: - mbedtls_ecp_point_free( &Txi ); - - return( ret ); -} - -/* - * Multiplication using the comb method, - * for curves in short Weierstrass form - */ -static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_mpi *m, const mbedtls_ecp_point *P, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char w, m_is_odd, p_eq_g, pre_len, i; - size_t d; - unsigned char k[COMB_MAX_D + 1]; - mbedtls_ecp_point *T; - mbedtls_mpi M, mm; - - mbedtls_mpi_init( &M ); - mbedtls_mpi_init( &mm ); - - /* we need N to be odd to trnaform m in an odd number, check now */ - if( mbedtls_mpi_get_bit( &grp->N, 0 ) != 1 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * Minimize the number of multiplications, that is minimize - * 10 * d * w + 18 * 2^(w-1) + 11 * d + 7 * w, with d = ceil( nbits / w ) - * (see costs of the various parts, with 1S = 1M) - */ - w = grp->nbits >= 384 ? 5 : 4; - - /* - * If P == G, pre-compute a bit more, since this may be re-used later. - * Just adding one avoids upping the cost of the first mul too much, - * and the memory cost too. - */ -#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1 - p_eq_g = ( mbedtls_mpi_cmp_mpi( &P->Y, &grp->G.Y ) == 0 && - mbedtls_mpi_cmp_mpi( &P->X, &grp->G.X ) == 0 ); - if( p_eq_g ) - w++; -#else - p_eq_g = 0; -#endif - - /* - * Make sure w is within bounds. - * (The last test is useful only for very small curves in the test suite.) - */ - if( w > MBEDTLS_ECP_WINDOW_SIZE ) - w = MBEDTLS_ECP_WINDOW_SIZE; - if( w >= grp->nbits ) - w = 2; - - /* Other sizes that depend on w */ - pre_len = 1U << ( w - 1 ); - d = ( grp->nbits + w - 1 ) / w; - - /* - * Prepare precomputed points: if P == G we want to - * use grp->T if already initialized, or initialize it. - */ - T = p_eq_g ? grp->T : NULL; - - if( T == NULL ) - { - T = mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) ); - if( T == NULL ) - { - ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; - goto cleanup; - } - - MBEDTLS_MPI_CHK( ecp_precompute_comb( grp, T, P, w, d ) ); - - if( p_eq_g ) - { - grp->T = T; - grp->T_size = pre_len; - } - } - - /* - * Make sure M is odd (M = m or M = N - m, since N is odd) - * using the fact that m * P = - (N - m) * P - */ - m_is_odd = ( mbedtls_mpi_get_bit( m, 0 ) == 1 ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &M, m ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &mm, &grp->N, m ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( &M, &mm, ! m_is_odd ) ); - - /* - * Go for comb multiplication, R = M * P - */ - ecp_comb_fixed( k, d, w, &M ); - MBEDTLS_MPI_CHK( ecp_mul_comb_core( grp, R, T, pre_len, k, d, f_rng, p_rng ) ); - - /* - * Now get m * P from M * P and normalize it - */ - MBEDTLS_MPI_CHK( ecp_safe_invert_jac( grp, R, ! m_is_odd ) ); - MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, R ) ); - -cleanup: - - if( T != NULL && ! p_eq_g ) - { - for( i = 0; i < pre_len; i++ ) - mbedtls_ecp_point_free( &T[i] ); - mbedtls_free( T ); - } - - mbedtls_mpi_free( &M ); - mbedtls_mpi_free( &mm ); - - if( ret != 0 ) - mbedtls_ecp_point_free( R ); - - return( ret ); -} - -#endif /* ECP_SHORTWEIERSTRASS */ - -#if defined(ECP_MONTGOMERY) -/* - * For Montgomery curves, we do all the internal arithmetic in projective - * coordinates. Import/export of points uses only the x coordinates, which is - * internaly represented as X / Z. - * - * For scalar multiplication, we'll use a Montgomery ladder. - */ - -/* - * Normalize Montgomery x/z coordinates: X = X/Z, Z = 1 - * Cost: 1M + 1I - */ -static int ecp_normalize_mxz( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &P->Z, &P->Z, &grp->P ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &P->X, &P->X, &P->Z ) ); MOD_MUL( P->X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); - -cleanup: - return( ret ); -} - -/* - * Randomize projective x/z coordinates: - * (X, Z) -> (l X, l Z) for random l - * This is sort of the reverse operation of ecp_normalize_mxz(). - * - * This countermeasure was first suggested in [2]. - * Cost: 2M - */ -static int ecp_randomize_mxz( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret; - mbedtls_mpi l; - size_t p_size = ( grp->pbits + 7 ) / 8; - int count = 0; - - mbedtls_mpi_init( &l ); - - /* Generate l such that 1 < l < p */ - do - { - mbedtls_mpi_fill_random( &l, p_size, f_rng, p_rng ); - - while( mbedtls_mpi_cmp_mpi( &l, &grp->P ) >= 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &l, 1 ) ); - - if( count++ > 10 ) - return( MBEDTLS_ERR_ECP_RANDOM_FAILED ); - } - while( mbedtls_mpi_cmp_int( &l, 1 ) <= 0 ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &P->X, &P->X, &l ) ); MOD_MUL( P->X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &P->Z, &P->Z, &l ) ); MOD_MUL( P->Z ); - -cleanup: - mbedtls_mpi_free( &l ); - - return( ret ); -} - -/* - * Double-and-add: R = 2P, S = P + Q, with d = X(P - Q), - * for Montgomery curves in x/z coordinates. - * - * http://www.hyperelliptic.org/EFD/g1p/auto-code/montgom/xz/ladder/mladd-1987-m.op3 - * with - * d = X1 - * P = (X2, Z2) - * Q = (X3, Z3) - * R = (X4, Z4) - * S = (X5, Z5) - * and eliminating temporary variables tO, ..., t4. - * - * Cost: 5M + 4S - */ -static int ecp_double_add_mxz( const mbedtls_ecp_group *grp, - mbedtls_ecp_point *R, mbedtls_ecp_point *S, - const mbedtls_ecp_point *P, const mbedtls_ecp_point *Q, - const mbedtls_mpi *d ) -{ - int ret; - mbedtls_mpi A, AA, B, BB, E, C, D, DA, CB; - - mbedtls_mpi_init( &A ); mbedtls_mpi_init( &AA ); mbedtls_mpi_init( &B ); - mbedtls_mpi_init( &BB ); mbedtls_mpi_init( &E ); mbedtls_mpi_init( &C ); - mbedtls_mpi_init( &D ); mbedtls_mpi_init( &DA ); mbedtls_mpi_init( &CB ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &A, &P->X, &P->Z ) ); MOD_ADD( A ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &AA, &A, &A ) ); MOD_MUL( AA ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &B, &P->X, &P->Z ) ); MOD_SUB( B ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &BB, &B, &B ) ); MOD_MUL( BB ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &E, &AA, &BB ) ); MOD_SUB( E ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &C, &Q->X, &Q->Z ) ); MOD_ADD( C ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &D, &Q->X, &Q->Z ) ); MOD_SUB( D ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &DA, &D, &A ) ); MOD_MUL( DA ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &CB, &C, &B ) ); MOD_MUL( CB ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &S->X, &DA, &CB ) ); MOD_MUL( S->X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S->X, &S->X, &S->X ) ); MOD_MUL( S->X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &S->Z, &DA, &CB ) ); MOD_SUB( S->Z ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S->Z, &S->Z, &S->Z ) ); MOD_MUL( S->Z ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &S->Z, d, &S->Z ) ); MOD_MUL( S->Z ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &R->X, &AA, &BB ) ); MOD_MUL( R->X ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &R->Z, &grp->A, &E ) ); MOD_MUL( R->Z ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &R->Z, &BB, &R->Z ) ); MOD_ADD( R->Z ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &R->Z, &E, &R->Z ) ); MOD_MUL( R->Z ); - -cleanup: - mbedtls_mpi_free( &A ); mbedtls_mpi_free( &AA ); mbedtls_mpi_free( &B ); - mbedtls_mpi_free( &BB ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &C ); - mbedtls_mpi_free( &D ); mbedtls_mpi_free( &DA ); mbedtls_mpi_free( &CB ); - - return( ret ); -} - -/* - * Multiplication with Montgomery ladder in x/z coordinates, - * for curves in Montgomery form - */ -static int ecp_mul_mxz( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_mpi *m, const mbedtls_ecp_point *P, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - size_t i; - unsigned char b; - mbedtls_ecp_point RP; - mbedtls_mpi PX; - - mbedtls_ecp_point_init( &RP ); mbedtls_mpi_init( &PX ); - - /* Save PX and read from P before writing to R, in case P == R */ - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &PX, &P->X ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_copy( &RP, P ) ); - - /* Set R to zero in modified x/z coordinates */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &R->X, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &R->Z, 0 ) ); - mbedtls_mpi_free( &R->Y ); - - /* RP.X might be sligtly larger than P, so reduce it */ - MOD_ADD( RP.X ); - - /* Randomize coordinates of the starting point */ - if( f_rng != NULL ) - MBEDTLS_MPI_CHK( ecp_randomize_mxz( grp, &RP, f_rng, p_rng ) ); - - /* Loop invariant: R = result so far, RP = R + P */ - i = mbedtls_mpi_bitlen( m ); /* one past the (zero-based) most significant bit */ - while( i-- > 0 ) - { - b = mbedtls_mpi_get_bit( m, i ); - /* - * if (b) R = 2R + P else R = 2R, - * which is: - * if (b) double_add( RP, R, RP, R ) - * else double_add( R, RP, R, RP ) - * but using safe conditional swaps to avoid leaks - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_swap( &R->X, &RP.X, b ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_swap( &R->Z, &RP.Z, b ) ); - MBEDTLS_MPI_CHK( ecp_double_add_mxz( grp, R, &RP, R, &RP, &PX ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_swap( &R->X, &RP.X, b ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_swap( &R->Z, &RP.Z, b ) ); - } - - MBEDTLS_MPI_CHK( ecp_normalize_mxz( grp, R ) ); - -cleanup: - mbedtls_ecp_point_free( &RP ); mbedtls_mpi_free( &PX ); - - return( ret ); -} - -#endif /* ECP_MONTGOMERY */ - -/* - * Multiplication R = m * P - */ -int mbedtls_ecp_mul( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_mpi *m, const mbedtls_ecp_point *P, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret; - - /* Common sanity checks */ - if( mbedtls_mpi_cmp_int( &P->Z, 1 ) != 0 ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_ecp_check_privkey( grp, m ) ) != 0 || - ( ret = mbedtls_ecp_check_pubkey( grp, P ) ) != 0 ) - return( ret ); - -#if defined(ECP_MONTGOMERY) - if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY ) - return( ecp_mul_mxz( grp, R, m, P, f_rng, p_rng ) ); -#endif -#if defined(ECP_SHORTWEIERSTRASS) - if( ecp_get_type( grp ) == ECP_TYPE_SHORT_WEIERSTRASS ) - return( ecp_mul_comb( grp, R, m, P, f_rng, p_rng ) ); -#endif - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); -} - -#if defined(ECP_SHORTWEIERSTRASS) -/* - * Check that an affine point is valid as a public key, - * short weierstrass curves (SEC1 3.2.3.1) - */ -static int ecp_check_pubkey_sw( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt ) -{ - int ret; - mbedtls_mpi YY, RHS; - - /* pt coordinates must be normalized for our checks */ - if( mbedtls_mpi_cmp_int( &pt->X, 0 ) < 0 || - mbedtls_mpi_cmp_int( &pt->Y, 0 ) < 0 || - mbedtls_mpi_cmp_mpi( &pt->X, &grp->P ) >= 0 || - mbedtls_mpi_cmp_mpi( &pt->Y, &grp->P ) >= 0 ) - return( MBEDTLS_ERR_ECP_INVALID_KEY ); - - mbedtls_mpi_init( &YY ); mbedtls_mpi_init( &RHS ); - - /* - * YY = Y^2 - * RHS = X (X^2 + A) + B = X^3 + A X + B - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &YY, &pt->Y, &pt->Y ) ); MOD_MUL( YY ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &RHS, &pt->X, &pt->X ) ); MOD_MUL( RHS ); - - /* Special case for A = -3 */ - if( grp->A.p == NULL ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &RHS, &RHS, 3 ) ); MOD_SUB( RHS ); - } - else - { - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &RHS, &RHS, &grp->A ) ); MOD_ADD( RHS ); - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &RHS, &RHS, &pt->X ) ); MOD_MUL( RHS ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &RHS, &RHS, &grp->B ) ); MOD_ADD( RHS ); - - if( mbedtls_mpi_cmp_mpi( &YY, &RHS ) != 0 ) - ret = MBEDTLS_ERR_ECP_INVALID_KEY; - -cleanup: - - mbedtls_mpi_free( &YY ); mbedtls_mpi_free( &RHS ); - - return( ret ); -} -#endif /* ECP_SHORTWEIERSTRASS */ - -/* - * R = m * P with shortcuts for m == 1 and m == -1 - * NOT constant-time - ONLY for short Weierstrass! - */ -static int mbedtls_ecp_mul_shortcuts( mbedtls_ecp_group *grp, - mbedtls_ecp_point *R, - const mbedtls_mpi *m, - const mbedtls_ecp_point *P ) -{ - int ret; - - if( mbedtls_mpi_cmp_int( m, 1 ) == 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_ecp_copy( R, P ) ); - } - else if( mbedtls_mpi_cmp_int( m, -1 ) == 0 ) - { - MBEDTLS_MPI_CHK( mbedtls_ecp_copy( R, P ) ); - if( mbedtls_mpi_cmp_int( &R->Y, 0 ) != 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &R->Y, &grp->P, &R->Y ) ); - } - else - { - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, R, m, P, NULL, NULL ) ); - } - -cleanup: - return( ret ); -} - -/* - * Linear combination - * NOT constant-time - */ -int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_mpi *m, const mbedtls_ecp_point *P, - const mbedtls_mpi *n, const mbedtls_ecp_point *Q ) -{ - int ret; - mbedtls_ecp_point mP; - - if( ecp_get_type( grp ) != ECP_TYPE_SHORT_WEIERSTRASS ) - return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ); - - mbedtls_ecp_point_init( &mP ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, &mP, m, P ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, R, n, Q ) ); - - MBEDTLS_MPI_CHK( ecp_add_mixed( grp, R, &mP, R ) ); - MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, R ) ); - -cleanup: - mbedtls_ecp_point_free( &mP ); - - return( ret ); -} - - -#if defined(ECP_MONTGOMERY) -/* - * Check validity of a public key for Montgomery curves with x-only schemes - */ -static int ecp_check_pubkey_mx( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt ) -{ - /* [Curve25519 p. 5] Just check X is the correct number of bytes */ - if( mbedtls_mpi_size( &pt->X ) > ( grp->nbits + 7 ) / 8 ) - return( MBEDTLS_ERR_ECP_INVALID_KEY ); - - return( 0 ); -} -#endif /* ECP_MONTGOMERY */ - -/* - * Check that a point is valid as a public key - */ -int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt ) -{ - /* Must use affine coordinates */ - if( mbedtls_mpi_cmp_int( &pt->Z, 1 ) != 0 ) - return( MBEDTLS_ERR_ECP_INVALID_KEY ); - -#if defined(ECP_MONTGOMERY) - if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY ) - return( ecp_check_pubkey_mx( grp, pt ) ); -#endif -#if defined(ECP_SHORTWEIERSTRASS) - if( ecp_get_type( grp ) == ECP_TYPE_SHORT_WEIERSTRASS ) - return( ecp_check_pubkey_sw( grp, pt ) ); -#endif - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); -} - -/* - * Check that an mbedtls_mpi is valid as a private key - */ -int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, const mbedtls_mpi *d ) -{ -#if defined(ECP_MONTGOMERY) - if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY ) - { - /* see [Curve25519] page 5 */ - if( mbedtls_mpi_get_bit( d, 0 ) != 0 || - mbedtls_mpi_get_bit( d, 1 ) != 0 || - mbedtls_mpi_get_bit( d, 2 ) != 0 || - mbedtls_mpi_bitlen( d ) - 1 != grp->nbits ) /* mbedtls_mpi_bitlen is one-based! */ - return( MBEDTLS_ERR_ECP_INVALID_KEY ); - else - return( 0 ); - } -#endif /* ECP_MONTGOMERY */ -#if defined(ECP_SHORTWEIERSTRASS) - if( ecp_get_type( grp ) == ECP_TYPE_SHORT_WEIERSTRASS ) - { - /* see SEC1 3.2 */ - if( mbedtls_mpi_cmp_int( d, 1 ) < 0 || - mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ) - return( MBEDTLS_ERR_ECP_INVALID_KEY ); - else - return( 0 ); - } -#endif /* ECP_SHORTWEIERSTRASS */ - - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); -} - -/* - * Generate a keypair with configurable base point - */ -int mbedtls_ecp_gen_keypair_base( mbedtls_ecp_group *grp, - const mbedtls_ecp_point *G, - mbedtls_mpi *d, mbedtls_ecp_point *Q, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - size_t n_size = ( grp->nbits + 7 ) / 8; - -#if defined(ECP_MONTGOMERY) - if( ecp_get_type( grp ) == ECP_TYPE_MONTGOMERY ) - { - /* [M225] page 5 */ - size_t b; - - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( d, n_size, f_rng, p_rng ) ); - - /* Make sure the most significant bit is nbits */ - b = mbedtls_mpi_bitlen( d ) - 1; /* mbedtls_mpi_bitlen is one-based */ - if( b > grp->nbits ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( d, b - grp->nbits ) ); - else - MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( d, grp->nbits, 1 ) ); - - /* Make sure the last three bits are unset */ - MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( d, 0, 0 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( d, 1, 0 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( d, 2, 0 ) ); - } - else -#endif /* ECP_MONTGOMERY */ -#if defined(ECP_SHORTWEIERSTRASS) - if( ecp_get_type( grp ) == ECP_TYPE_SHORT_WEIERSTRASS ) - { - /* SEC1 3.2.1: Generate d such that 1 <= n < N */ - int count = 0; - unsigned char rnd[MBEDTLS_ECP_MAX_BYTES]; - - /* - * Match the procedure given in RFC 6979 (deterministic ECDSA): - * - use the same byte ordering; - * - keep the leftmost nbits bits of the generated octet string; - * - try until result is in the desired range. - * This also avoids any biais, which is especially important for ECDSA. - */ - do - { - MBEDTLS_MPI_CHK( f_rng( p_rng, rnd, n_size ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( d, rnd, n_size ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( d, 8 * n_size - grp->nbits ) ); - - /* - * Each try has at worst a probability 1/2 of failing (the msb has - * a probability 1/2 of being 0, and then the result will be < N), - * so after 30 tries failure probability is a most 2**(-30). - * - * For most curves, 1 try is enough with overwhelming probability, - * since N starts with a lot of 1s in binary, but some curves - * such as secp224k1 are actually very close to the worst case. - */ - if( ++count > 30 ) - return( MBEDTLS_ERR_ECP_RANDOM_FAILED ); - } - while( mbedtls_mpi_cmp_int( d, 1 ) < 0 || - mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ); - } - else -#endif /* ECP_SHORTWEIERSTRASS */ - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - -cleanup: - if( ret != 0 ) - return( ret ); - - return( mbedtls_ecp_mul( grp, Q, d, G, f_rng, p_rng ) ); -} - -/* - * Generate key pair, wrapper for conventional base point - */ -int mbedtls_ecp_gen_keypair( mbedtls_ecp_group *grp, - mbedtls_mpi *d, mbedtls_ecp_point *Q, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - return( mbedtls_ecp_gen_keypair_base( grp, &grp->G, d, Q, f_rng, p_rng ) ); -} - -/* - * Generate a keypair, prettier wrapper - */ -int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret; - - if( ( ret = mbedtls_ecp_group_load( &key->grp, grp_id ) ) != 0 ) - return( ret ); - - return( mbedtls_ecp_gen_keypair( &key->grp, &key->d, &key->Q, f_rng, p_rng ) ); -} - -/* - * Check a public-private key pair - */ -int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv ) -{ - int ret; - mbedtls_ecp_point Q; - mbedtls_ecp_group grp; - - if( pub->grp.id == MBEDTLS_ECP_DP_NONE || - pub->grp.id != prv->grp.id || - mbedtls_mpi_cmp_mpi( &pub->Q.X, &prv->Q.X ) || - mbedtls_mpi_cmp_mpi( &pub->Q.Y, &prv->Q.Y ) || - mbedtls_mpi_cmp_mpi( &pub->Q.Z, &prv->Q.Z ) ) - { - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - } - - mbedtls_ecp_point_init( &Q ); - mbedtls_ecp_group_init( &grp ); - - /* mbedtls_ecp_mul() needs a non-const group... */ - mbedtls_ecp_group_copy( &grp, &prv->grp ); - - /* Also checks d is valid */ - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &Q, &prv->d, &prv->grp.G, NULL, NULL ) ); - - if( mbedtls_mpi_cmp_mpi( &Q.X, &prv->Q.X ) || - mbedtls_mpi_cmp_mpi( &Q.Y, &prv->Q.Y ) || - mbedtls_mpi_cmp_mpi( &Q.Z, &prv->Q.Z ) ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - -cleanup: - mbedtls_ecp_point_free( &Q ); - mbedtls_ecp_group_free( &grp ); - - return( ret ); -} - -#if defined(MBEDTLS_SELF_TEST) - -/* - * Checkup routine - */ -int mbedtls_ecp_self_test( int verbose ) -{ - int ret; - size_t i; - mbedtls_ecp_group grp; - mbedtls_ecp_point R, P; - mbedtls_mpi m; - unsigned long add_c_prev, dbl_c_prev, mul_c_prev; - /* exponents especially adapted for secp192r1 */ - const char *exponents[] = - { - "000000000000000000000000000000000000000000000001", /* one */ - "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22830", /* N - 1 */ - "5EA6F389A38B8BC81E767753B15AA5569E1782E30ABE7D25", /* random */ - "400000000000000000000000000000000000000000000000", /* one and zeros */ - "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", /* all ones */ - "555555555555555555555555555555555555555555555555", /* 101010... */ - }; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &R ); - mbedtls_ecp_point_init( &P ); - mbedtls_mpi_init( &m ); - - /* Use secp192r1 if available, or any available curve */ -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &grp, MBEDTLS_ECP_DP_SECP192R1 ) ); -#else - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &grp, mbedtls_ecp_curve_list()->grp_id ) ); -#endif - - if( verbose != 0 ) - mbedtls_printf( " ECP test #1 (constant op_count, base point G): " ); - - /* Do a dummy multiplication first to trigger precomputation */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &m, 2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &P, &m, &grp.G, NULL, NULL ) ); - - add_count = 0; - dbl_count = 0; - mul_count = 0; - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[0] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &grp.G, NULL, NULL ) ); - - for( i = 1; i < sizeof( exponents ) / sizeof( exponents[0] ); i++ ) - { - add_c_prev = add_count; - dbl_c_prev = dbl_count; - mul_c_prev = mul_count; - add_count = 0; - dbl_count = 0; - mul_count = 0; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[i] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &grp.G, NULL, NULL ) ); - - if( add_count != add_c_prev || - dbl_count != dbl_c_prev || - mul_count != mul_c_prev ) - { - if( verbose != 0 ) - mbedtls_printf( "failed (%u)\n", (unsigned int) i ); - - ret = 1; - goto cleanup; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " ECP test #2 (constant op_count, other point): " ); - /* We computed P = 2G last time, use it */ - - add_count = 0; - dbl_count = 0; - mul_count = 0; - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[0] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &P, NULL, NULL ) ); - - for( i = 1; i < sizeof( exponents ) / sizeof( exponents[0] ); i++ ) - { - add_c_prev = add_count; - dbl_c_prev = dbl_count; - mul_c_prev = mul_count; - add_count = 0; - dbl_count = 0; - mul_count = 0; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[i] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &P, NULL, NULL ) ); - - if( add_count != add_c_prev || - dbl_count != dbl_c_prev || - mul_count != mul_c_prev ) - { - if( verbose != 0 ) - mbedtls_printf( "failed (%u)\n", (unsigned int) i ); - - ret = 1; - goto cleanup; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - - if( ret < 0 && verbose != 0 ) - mbedtls_printf( "Unexpected error, return code = %08X\n", ret ); - - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &R ); - mbedtls_ecp_point_free( &P ); - mbedtls_mpi_free( &m ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_ECP_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ecp_curves.c b/build/premake/premake5/contrib/mbedtls/library/ecp_curves.c deleted file mode 100644 index 9a6e8eb187..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ecp_curves.c +++ /dev/null @@ -1,1325 +0,0 @@ -/* - * Elliptic curves over GF(p): curve-specific data and functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ECP_C) - -#include "mbedtls/ecp.h" - -#include - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -/* - * Conversion macros for embedded constants: - * build lists of mbedtls_mpi_uint's from lists of unsigned char's grouped by 8, 4 or 2 - */ -#if defined(MBEDTLS_HAVE_INT32) - -#define BYTES_TO_T_UINT_4( a, b, c, d ) \ - ( (mbedtls_mpi_uint) a << 0 ) | \ - ( (mbedtls_mpi_uint) b << 8 ) | \ - ( (mbedtls_mpi_uint) c << 16 ) | \ - ( (mbedtls_mpi_uint) d << 24 ) - -#define BYTES_TO_T_UINT_2( a, b ) \ - BYTES_TO_T_UINT_4( a, b, 0, 0 ) - -#define BYTES_TO_T_UINT_8( a, b, c, d, e, f, g, h ) \ - BYTES_TO_T_UINT_4( a, b, c, d ), \ - BYTES_TO_T_UINT_4( e, f, g, h ) - -#else /* 64-bits */ - -#define BYTES_TO_T_UINT_8( a, b, c, d, e, f, g, h ) \ - ( (mbedtls_mpi_uint) a << 0 ) | \ - ( (mbedtls_mpi_uint) b << 8 ) | \ - ( (mbedtls_mpi_uint) c << 16 ) | \ - ( (mbedtls_mpi_uint) d << 24 ) | \ - ( (mbedtls_mpi_uint) e << 32 ) | \ - ( (mbedtls_mpi_uint) f << 40 ) | \ - ( (mbedtls_mpi_uint) g << 48 ) | \ - ( (mbedtls_mpi_uint) h << 56 ) - -#define BYTES_TO_T_UINT_4( a, b, c, d ) \ - BYTES_TO_T_UINT_8( a, b, c, d, 0, 0, 0, 0 ) - -#define BYTES_TO_T_UINT_2( a, b ) \ - BYTES_TO_T_UINT_8( a, b, 0, 0, 0, 0, 0, 0 ) - -#endif /* bits in mbedtls_mpi_uint */ - -/* - * Note: the constants are in little-endian order - * to be directly usable in MPIs - */ - -/* - * Domain parameters for secp192r1 - */ -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) -static const mbedtls_mpi_uint secp192r1_p[] = { - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -static const mbedtls_mpi_uint secp192r1_b[] = { - BYTES_TO_T_UINT_8( 0xB1, 0xB9, 0x46, 0xC1, 0xEC, 0xDE, 0xB8, 0xFE ), - BYTES_TO_T_UINT_8( 0x49, 0x30, 0x24, 0x72, 0xAB, 0xE9, 0xA7, 0x0F ), - BYTES_TO_T_UINT_8( 0xE7, 0x80, 0x9C, 0xE5, 0x19, 0x05, 0x21, 0x64 ), -}; -static const mbedtls_mpi_uint secp192r1_gx[] = { - BYTES_TO_T_UINT_8( 0x12, 0x10, 0xFF, 0x82, 0xFD, 0x0A, 0xFF, 0xF4 ), - BYTES_TO_T_UINT_8( 0x00, 0x88, 0xA1, 0x43, 0xEB, 0x20, 0xBF, 0x7C ), - BYTES_TO_T_UINT_8( 0xF6, 0x90, 0x30, 0xB0, 0x0E, 0xA8, 0x8D, 0x18 ), -}; -static const mbedtls_mpi_uint secp192r1_gy[] = { - BYTES_TO_T_UINT_8( 0x11, 0x48, 0x79, 0x1E, 0xA1, 0x77, 0xF9, 0x73 ), - BYTES_TO_T_UINT_8( 0xD5, 0xCD, 0x24, 0x6B, 0xED, 0x11, 0x10, 0x63 ), - BYTES_TO_T_UINT_8( 0x78, 0xDA, 0xC8, 0xFF, 0x95, 0x2B, 0x19, 0x07 ), -}; -static const mbedtls_mpi_uint secp192r1_n[] = { - BYTES_TO_T_UINT_8( 0x31, 0x28, 0xD2, 0xB4, 0xB1, 0xC9, 0x6B, 0x14 ), - BYTES_TO_T_UINT_8( 0x36, 0xF8, 0xDE, 0x99, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -#endif /* MBEDTLS_ECP_DP_SECP192R1_ENABLED */ - -/* - * Domain parameters for secp224r1 - */ -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) -static const mbedtls_mpi_uint secp224r1_p[] = { - BYTES_TO_T_UINT_8( 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ), - BYTES_TO_T_UINT_8( 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00 ), -}; -static const mbedtls_mpi_uint secp224r1_b[] = { - BYTES_TO_T_UINT_8( 0xB4, 0xFF, 0x55, 0x23, 0x43, 0x39, 0x0B, 0x27 ), - BYTES_TO_T_UINT_8( 0xBA, 0xD8, 0xBF, 0xD7, 0xB7, 0xB0, 0x44, 0x50 ), - BYTES_TO_T_UINT_8( 0x56, 0x32, 0x41, 0xF5, 0xAB, 0xB3, 0x04, 0x0C ), - BYTES_TO_T_UINT_4( 0x85, 0x0A, 0x05, 0xB4 ), -}; -static const mbedtls_mpi_uint secp224r1_gx[] = { - BYTES_TO_T_UINT_8( 0x21, 0x1D, 0x5C, 0x11, 0xD6, 0x80, 0x32, 0x34 ), - BYTES_TO_T_UINT_8( 0x22, 0x11, 0xC2, 0x56, 0xD3, 0xC1, 0x03, 0x4A ), - BYTES_TO_T_UINT_8( 0xB9, 0x90, 0x13, 0x32, 0x7F, 0xBF, 0xB4, 0x6B ), - BYTES_TO_T_UINT_4( 0xBD, 0x0C, 0x0E, 0xB7 ), -}; -static const mbedtls_mpi_uint secp224r1_gy[] = { - BYTES_TO_T_UINT_8( 0x34, 0x7E, 0x00, 0x85, 0x99, 0x81, 0xD5, 0x44 ), - BYTES_TO_T_UINT_8( 0x64, 0x47, 0x07, 0x5A, 0xA0, 0x75, 0x43, 0xCD ), - BYTES_TO_T_UINT_8( 0xE6, 0xDF, 0x22, 0x4C, 0xFB, 0x23, 0xF7, 0xB5 ), - BYTES_TO_T_UINT_4( 0x88, 0x63, 0x37, 0xBD ), -}; -static const mbedtls_mpi_uint secp224r1_n[] = { - BYTES_TO_T_UINT_8( 0x3D, 0x2A, 0x5C, 0x5C, 0x45, 0x29, 0xDD, 0x13 ), - BYTES_TO_T_UINT_8( 0x3E, 0xF0, 0xB8, 0xE0, 0xA2, 0x16, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_4( 0xFF, 0xFF, 0xFF, 0xFF ), -}; -#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */ - -/* - * Domain parameters for secp256r1 - */ -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) -static const mbedtls_mpi_uint secp256r1_p[] = { - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00 ), - BYTES_TO_T_UINT_8( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ), - BYTES_TO_T_UINT_8( 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -static const mbedtls_mpi_uint secp256r1_b[] = { - BYTES_TO_T_UINT_8( 0x4B, 0x60, 0xD2, 0x27, 0x3E, 0x3C, 0xCE, 0x3B ), - BYTES_TO_T_UINT_8( 0xF6, 0xB0, 0x53, 0xCC, 0xB0, 0x06, 0x1D, 0x65 ), - BYTES_TO_T_UINT_8( 0xBC, 0x86, 0x98, 0x76, 0x55, 0xBD, 0xEB, 0xB3 ), - BYTES_TO_T_UINT_8( 0xE7, 0x93, 0x3A, 0xAA, 0xD8, 0x35, 0xC6, 0x5A ), -}; -static const mbedtls_mpi_uint secp256r1_gx[] = { - BYTES_TO_T_UINT_8( 0x96, 0xC2, 0x98, 0xD8, 0x45, 0x39, 0xA1, 0xF4 ), - BYTES_TO_T_UINT_8( 0xA0, 0x33, 0xEB, 0x2D, 0x81, 0x7D, 0x03, 0x77 ), - BYTES_TO_T_UINT_8( 0xF2, 0x40, 0xA4, 0x63, 0xE5, 0xE6, 0xBC, 0xF8 ), - BYTES_TO_T_UINT_8( 0x47, 0x42, 0x2C, 0xE1, 0xF2, 0xD1, 0x17, 0x6B ), -}; -static const mbedtls_mpi_uint secp256r1_gy[] = { - BYTES_TO_T_UINT_8( 0xF5, 0x51, 0xBF, 0x37, 0x68, 0x40, 0xB6, 0xCB ), - BYTES_TO_T_UINT_8( 0xCE, 0x5E, 0x31, 0x6B, 0x57, 0x33, 0xCE, 0x2B ), - BYTES_TO_T_UINT_8( 0x16, 0x9E, 0x0F, 0x7C, 0x4A, 0xEB, 0xE7, 0x8E ), - BYTES_TO_T_UINT_8( 0x9B, 0x7F, 0x1A, 0xFE, 0xE2, 0x42, 0xE3, 0x4F ), -}; -static const mbedtls_mpi_uint secp256r1_n[] = { - BYTES_TO_T_UINT_8( 0x51, 0x25, 0x63, 0xFC, 0xC2, 0xCA, 0xB9, 0xF3 ), - BYTES_TO_T_UINT_8( 0x84, 0x9E, 0x17, 0xA7, 0xAD, 0xFA, 0xE6, 0xBC ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED */ - -/* - * Domain parameters for secp384r1 - */ -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) -static const mbedtls_mpi_uint secp384r1_p[] = { - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00 ), - BYTES_TO_T_UINT_8( 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -static const mbedtls_mpi_uint secp384r1_b[] = { - BYTES_TO_T_UINT_8( 0xEF, 0x2A, 0xEC, 0xD3, 0xED, 0xC8, 0x85, 0x2A ), - BYTES_TO_T_UINT_8( 0x9D, 0xD1, 0x2E, 0x8A, 0x8D, 0x39, 0x56, 0xC6 ), - BYTES_TO_T_UINT_8( 0x5A, 0x87, 0x13, 0x50, 0x8F, 0x08, 0x14, 0x03 ), - BYTES_TO_T_UINT_8( 0x12, 0x41, 0x81, 0xFE, 0x6E, 0x9C, 0x1D, 0x18 ), - BYTES_TO_T_UINT_8( 0x19, 0x2D, 0xF8, 0xE3, 0x6B, 0x05, 0x8E, 0x98 ), - BYTES_TO_T_UINT_8( 0xE4, 0xE7, 0x3E, 0xE2, 0xA7, 0x2F, 0x31, 0xB3 ), -}; -static const mbedtls_mpi_uint secp384r1_gx[] = { - BYTES_TO_T_UINT_8( 0xB7, 0x0A, 0x76, 0x72, 0x38, 0x5E, 0x54, 0x3A ), - BYTES_TO_T_UINT_8( 0x6C, 0x29, 0x55, 0xBF, 0x5D, 0xF2, 0x02, 0x55 ), - BYTES_TO_T_UINT_8( 0x38, 0x2A, 0x54, 0x82, 0xE0, 0x41, 0xF7, 0x59 ), - BYTES_TO_T_UINT_8( 0x98, 0x9B, 0xA7, 0x8B, 0x62, 0x3B, 0x1D, 0x6E ), - BYTES_TO_T_UINT_8( 0x74, 0xAD, 0x20, 0xF3, 0x1E, 0xC7, 0xB1, 0x8E ), - BYTES_TO_T_UINT_8( 0x37, 0x05, 0x8B, 0xBE, 0x22, 0xCA, 0x87, 0xAA ), -}; -static const mbedtls_mpi_uint secp384r1_gy[] = { - BYTES_TO_T_UINT_8( 0x5F, 0x0E, 0xEA, 0x90, 0x7C, 0x1D, 0x43, 0x7A ), - BYTES_TO_T_UINT_8( 0x9D, 0x81, 0x7E, 0x1D, 0xCE, 0xB1, 0x60, 0x0A ), - BYTES_TO_T_UINT_8( 0xC0, 0xB8, 0xF0, 0xB5, 0x13, 0x31, 0xDA, 0xE9 ), - BYTES_TO_T_UINT_8( 0x7C, 0x14, 0x9A, 0x28, 0xBD, 0x1D, 0xF4, 0xF8 ), - BYTES_TO_T_UINT_8( 0x29, 0xDC, 0x92, 0x92, 0xBF, 0x98, 0x9E, 0x5D ), - BYTES_TO_T_UINT_8( 0x6F, 0x2C, 0x26, 0x96, 0x4A, 0xDE, 0x17, 0x36 ), -}; -static const mbedtls_mpi_uint secp384r1_n[] = { - BYTES_TO_T_UINT_8( 0x73, 0x29, 0xC5, 0xCC, 0x6A, 0x19, 0xEC, 0xEC ), - BYTES_TO_T_UINT_8( 0x7A, 0xA7, 0xB0, 0x48, 0xB2, 0x0D, 0x1A, 0x58 ), - BYTES_TO_T_UINT_8( 0xDF, 0x2D, 0x37, 0xF4, 0x81, 0x4D, 0x63, 0xC7 ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -#endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */ - -/* - * Domain parameters for secp521r1 - */ -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) -static const mbedtls_mpi_uint secp521r1_p[] = { - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_2( 0xFF, 0x01 ), -}; -static const mbedtls_mpi_uint secp521r1_b[] = { - BYTES_TO_T_UINT_8( 0x00, 0x3F, 0x50, 0x6B, 0xD4, 0x1F, 0x45, 0xEF ), - BYTES_TO_T_UINT_8( 0xF1, 0x34, 0x2C, 0x3D, 0x88, 0xDF, 0x73, 0x35 ), - BYTES_TO_T_UINT_8( 0x07, 0xBF, 0xB1, 0x3B, 0xBD, 0xC0, 0x52, 0x16 ), - BYTES_TO_T_UINT_8( 0x7B, 0x93, 0x7E, 0xEC, 0x51, 0x39, 0x19, 0x56 ), - BYTES_TO_T_UINT_8( 0xE1, 0x09, 0xF1, 0x8E, 0x91, 0x89, 0xB4, 0xB8 ), - BYTES_TO_T_UINT_8( 0xF3, 0x15, 0xB3, 0x99, 0x5B, 0x72, 0xDA, 0xA2 ), - BYTES_TO_T_UINT_8( 0xEE, 0x40, 0x85, 0xB6, 0xA0, 0x21, 0x9A, 0x92 ), - BYTES_TO_T_UINT_8( 0x1F, 0x9A, 0x1C, 0x8E, 0x61, 0xB9, 0x3E, 0x95 ), - BYTES_TO_T_UINT_2( 0x51, 0x00 ), -}; -static const mbedtls_mpi_uint secp521r1_gx[] = { - BYTES_TO_T_UINT_8( 0x66, 0xBD, 0xE5, 0xC2, 0x31, 0x7E, 0x7E, 0xF9 ), - BYTES_TO_T_UINT_8( 0x9B, 0x42, 0x6A, 0x85, 0xC1, 0xB3, 0x48, 0x33 ), - BYTES_TO_T_UINT_8( 0xDE, 0xA8, 0xFF, 0xA2, 0x27, 0xC1, 0x1D, 0xFE ), - BYTES_TO_T_UINT_8( 0x28, 0x59, 0xE7, 0xEF, 0x77, 0x5E, 0x4B, 0xA1 ), - BYTES_TO_T_UINT_8( 0xBA, 0x3D, 0x4D, 0x6B, 0x60, 0xAF, 0x28, 0xF8 ), - BYTES_TO_T_UINT_8( 0x21, 0xB5, 0x3F, 0x05, 0x39, 0x81, 0x64, 0x9C ), - BYTES_TO_T_UINT_8( 0x42, 0xB4, 0x95, 0x23, 0x66, 0xCB, 0x3E, 0x9E ), - BYTES_TO_T_UINT_8( 0xCD, 0xE9, 0x04, 0x04, 0xB7, 0x06, 0x8E, 0x85 ), - BYTES_TO_T_UINT_2( 0xC6, 0x00 ), -}; -static const mbedtls_mpi_uint secp521r1_gy[] = { - BYTES_TO_T_UINT_8( 0x50, 0x66, 0xD1, 0x9F, 0x76, 0x94, 0xBE, 0x88 ), - BYTES_TO_T_UINT_8( 0x40, 0xC2, 0x72, 0xA2, 0x86, 0x70, 0x3C, 0x35 ), - BYTES_TO_T_UINT_8( 0x61, 0x07, 0xAD, 0x3F, 0x01, 0xB9, 0x50, 0xC5 ), - BYTES_TO_T_UINT_8( 0x40, 0x26, 0xF4, 0x5E, 0x99, 0x72, 0xEE, 0x97 ), - BYTES_TO_T_UINT_8( 0x2C, 0x66, 0x3E, 0x27, 0x17, 0xBD, 0xAF, 0x17 ), - BYTES_TO_T_UINT_8( 0x68, 0x44, 0x9B, 0x57, 0x49, 0x44, 0xF5, 0x98 ), - BYTES_TO_T_UINT_8( 0xD9, 0x1B, 0x7D, 0x2C, 0xB4, 0x5F, 0x8A, 0x5C ), - BYTES_TO_T_UINT_8( 0x04, 0xC0, 0x3B, 0x9A, 0x78, 0x6A, 0x29, 0x39 ), - BYTES_TO_T_UINT_2( 0x18, 0x01 ), -}; -static const mbedtls_mpi_uint secp521r1_n[] = { - BYTES_TO_T_UINT_8( 0x09, 0x64, 0x38, 0x91, 0x1E, 0xB7, 0x6F, 0xBB ), - BYTES_TO_T_UINT_8( 0xAE, 0x47, 0x9C, 0x89, 0xB8, 0xC9, 0xB5, 0x3B ), - BYTES_TO_T_UINT_8( 0xD0, 0xA5, 0x09, 0xF7, 0x48, 0x01, 0xCC, 0x7F ), - BYTES_TO_T_UINT_8( 0x6B, 0x96, 0x2F, 0xBF, 0x83, 0x87, 0x86, 0x51 ), - BYTES_TO_T_UINT_8( 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_2( 0xFF, 0x01 ), -}; -#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) -static const mbedtls_mpi_uint secp192k1_p[] = { - BYTES_TO_T_UINT_8( 0x37, 0xEE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -static const mbedtls_mpi_uint secp192k1_a[] = { - BYTES_TO_T_UINT_2( 0x00, 0x00 ), -}; -static const mbedtls_mpi_uint secp192k1_b[] = { - BYTES_TO_T_UINT_2( 0x03, 0x00 ), -}; -static const mbedtls_mpi_uint secp192k1_gx[] = { - BYTES_TO_T_UINT_8( 0x7D, 0x6C, 0xE0, 0xEA, 0xB1, 0xD1, 0xA5, 0x1D ), - BYTES_TO_T_UINT_8( 0x34, 0xF4, 0xB7, 0x80, 0x02, 0x7D, 0xB0, 0x26 ), - BYTES_TO_T_UINT_8( 0xAE, 0xE9, 0x57, 0xC0, 0x0E, 0xF1, 0x4F, 0xDB ), -}; -static const mbedtls_mpi_uint secp192k1_gy[] = { - BYTES_TO_T_UINT_8( 0x9D, 0x2F, 0x5E, 0xD9, 0x88, 0xAA, 0x82, 0x40 ), - BYTES_TO_T_UINT_8( 0x34, 0x86, 0xBE, 0x15, 0xD0, 0x63, 0x41, 0x84 ), - BYTES_TO_T_UINT_8( 0xA7, 0x28, 0x56, 0x9C, 0x6D, 0x2F, 0x2F, 0x9B ), -}; -static const mbedtls_mpi_uint secp192k1_n[] = { - BYTES_TO_T_UINT_8( 0x8D, 0xFD, 0xDE, 0x74, 0x6A, 0x46, 0x69, 0x0F ), - BYTES_TO_T_UINT_8( 0x17, 0xFC, 0xF2, 0x26, 0xFE, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) -static const mbedtls_mpi_uint secp224k1_p[] = { - BYTES_TO_T_UINT_8( 0x6D, 0xE5, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_4( 0xFF, 0xFF, 0xFF, 0xFF ), -}; -static const mbedtls_mpi_uint secp224k1_a[] = { - BYTES_TO_T_UINT_2( 0x00, 0x00 ), -}; -static const mbedtls_mpi_uint secp224k1_b[] = { - BYTES_TO_T_UINT_2( 0x05, 0x00 ), -}; -static const mbedtls_mpi_uint secp224k1_gx[] = { - BYTES_TO_T_UINT_8( 0x5C, 0xA4, 0xB7, 0xB6, 0x0E, 0x65, 0x7E, 0x0F ), - BYTES_TO_T_UINT_8( 0xA9, 0x75, 0x70, 0xE4, 0xE9, 0x67, 0xA4, 0x69 ), - BYTES_TO_T_UINT_8( 0xA1, 0x28, 0xFC, 0x30, 0xDF, 0x99, 0xF0, 0x4D ), - BYTES_TO_T_UINT_4( 0x33, 0x5B, 0x45, 0xA1 ), -}; -static const mbedtls_mpi_uint secp224k1_gy[] = { - BYTES_TO_T_UINT_8( 0xA5, 0x61, 0x6D, 0x55, 0xDB, 0x4B, 0xCA, 0xE2 ), - BYTES_TO_T_UINT_8( 0x59, 0xBD, 0xB0, 0xC0, 0xF7, 0x19, 0xE3, 0xF7 ), - BYTES_TO_T_UINT_8( 0xD6, 0xFB, 0xCA, 0x82, 0x42, 0x34, 0xBA, 0x7F ), - BYTES_TO_T_UINT_4( 0xED, 0x9F, 0x08, 0x7E ), -}; -static const mbedtls_mpi_uint secp224k1_n[] = { - BYTES_TO_T_UINT_8( 0xF7, 0xB1, 0x9F, 0x76, 0x71, 0xA9, 0xF0, 0xCA ), - BYTES_TO_T_UINT_8( 0x84, 0x61, 0xEC, 0xD2, 0xE8, 0xDC, 0x01, 0x00 ), - BYTES_TO_T_UINT_8( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ), - BYTES_TO_T_UINT_8( 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 ), -}; -#endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) -static const mbedtls_mpi_uint secp256k1_p[] = { - BYTES_TO_T_UINT_8( 0x2F, 0xFC, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -static const mbedtls_mpi_uint secp256k1_a[] = { - BYTES_TO_T_UINT_2( 0x00, 0x00 ), -}; -static const mbedtls_mpi_uint secp256k1_b[] = { - BYTES_TO_T_UINT_2( 0x07, 0x00 ), -}; -static const mbedtls_mpi_uint secp256k1_gx[] = { - BYTES_TO_T_UINT_8( 0x98, 0x17, 0xF8, 0x16, 0x5B, 0x81, 0xF2, 0x59 ), - BYTES_TO_T_UINT_8( 0xD9, 0x28, 0xCE, 0x2D, 0xDB, 0xFC, 0x9B, 0x02 ), - BYTES_TO_T_UINT_8( 0x07, 0x0B, 0x87, 0xCE, 0x95, 0x62, 0xA0, 0x55 ), - BYTES_TO_T_UINT_8( 0xAC, 0xBB, 0xDC, 0xF9, 0x7E, 0x66, 0xBE, 0x79 ), -}; -static const mbedtls_mpi_uint secp256k1_gy[] = { - BYTES_TO_T_UINT_8( 0xB8, 0xD4, 0x10, 0xFB, 0x8F, 0xD0, 0x47, 0x9C ), - BYTES_TO_T_UINT_8( 0x19, 0x54, 0x85, 0xA6, 0x48, 0xB4, 0x17, 0xFD ), - BYTES_TO_T_UINT_8( 0xA8, 0x08, 0x11, 0x0E, 0xFC, 0xFB, 0xA4, 0x5D ), - BYTES_TO_T_UINT_8( 0x65, 0xC4, 0xA3, 0x26, 0x77, 0xDA, 0x3A, 0x48 ), -}; -static const mbedtls_mpi_uint secp256k1_n[] = { - BYTES_TO_T_UINT_8( 0x41, 0x41, 0x36, 0xD0, 0x8C, 0x5E, 0xD2, 0xBF ), - BYTES_TO_T_UINT_8( 0x3B, 0xA0, 0x48, 0xAF, 0xE6, 0xDC, 0xAE, 0xBA ), - BYTES_TO_T_UINT_8( 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), - BYTES_TO_T_UINT_8( 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF ), -}; -#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */ - -/* - * Domain parameters for brainpoolP256r1 (RFC 5639 3.4) - */ -#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) -static const mbedtls_mpi_uint brainpoolP256r1_p[] = { - BYTES_TO_T_UINT_8( 0x77, 0x53, 0x6E, 0x1F, 0x1D, 0x48, 0x13, 0x20 ), - BYTES_TO_T_UINT_8( 0x28, 0x20, 0x26, 0xD5, 0x23, 0xF6, 0x3B, 0x6E ), - BYTES_TO_T_UINT_8( 0x72, 0x8D, 0x83, 0x9D, 0x90, 0x0A, 0x66, 0x3E ), - BYTES_TO_T_UINT_8( 0xBC, 0xA9, 0xEE, 0xA1, 0xDB, 0x57, 0xFB, 0xA9 ), -}; -static const mbedtls_mpi_uint brainpoolP256r1_a[] = { - BYTES_TO_T_UINT_8( 0xD9, 0xB5, 0x30, 0xF3, 0x44, 0x4B, 0x4A, 0xE9 ), - BYTES_TO_T_UINT_8( 0x6C, 0x5C, 0xDC, 0x26, 0xC1, 0x55, 0x80, 0xFB ), - BYTES_TO_T_UINT_8( 0xE7, 0xFF, 0x7A, 0x41, 0x30, 0x75, 0xF6, 0xEE ), - BYTES_TO_T_UINT_8( 0x57, 0x30, 0x2C, 0xFC, 0x75, 0x09, 0x5A, 0x7D ), -}; -static const mbedtls_mpi_uint brainpoolP256r1_b[] = { - BYTES_TO_T_UINT_8( 0xB6, 0x07, 0x8C, 0xFF, 0x18, 0xDC, 0xCC, 0x6B ), - BYTES_TO_T_UINT_8( 0xCE, 0xE1, 0xF7, 0x5C, 0x29, 0x16, 0x84, 0x95 ), - BYTES_TO_T_UINT_8( 0xBF, 0x7C, 0xD7, 0xBB, 0xD9, 0xB5, 0x30, 0xF3 ), - BYTES_TO_T_UINT_8( 0x44, 0x4B, 0x4A, 0xE9, 0x6C, 0x5C, 0xDC, 0x26 ), -}; -static const mbedtls_mpi_uint brainpoolP256r1_gx[] = { - BYTES_TO_T_UINT_8( 0x62, 0x32, 0xCE, 0x9A, 0xBD, 0x53, 0x44, 0x3A ), - BYTES_TO_T_UINT_8( 0xC2, 0x23, 0xBD, 0xE3, 0xE1, 0x27, 0xDE, 0xB9 ), - BYTES_TO_T_UINT_8( 0xAF, 0xB7, 0x81, 0xFC, 0x2F, 0x48, 0x4B, 0x2C ), - BYTES_TO_T_UINT_8( 0xCB, 0x57, 0x7E, 0xCB, 0xB9, 0xAE, 0xD2, 0x8B ), -}; -static const mbedtls_mpi_uint brainpoolP256r1_gy[] = { - BYTES_TO_T_UINT_8( 0x97, 0x69, 0x04, 0x2F, 0xC7, 0x54, 0x1D, 0x5C ), - BYTES_TO_T_UINT_8( 0x54, 0x8E, 0xED, 0x2D, 0x13, 0x45, 0x77, 0xC2 ), - BYTES_TO_T_UINT_8( 0xC9, 0x1D, 0x61, 0x14, 0x1A, 0x46, 0xF8, 0x97 ), - BYTES_TO_T_UINT_8( 0xFD, 0xC4, 0xDA, 0xC3, 0x35, 0xF8, 0x7E, 0x54 ), -}; -static const mbedtls_mpi_uint brainpoolP256r1_n[] = { - BYTES_TO_T_UINT_8( 0xA7, 0x56, 0x48, 0x97, 0x82, 0x0E, 0x1E, 0x90 ), - BYTES_TO_T_UINT_8( 0xF7, 0xA6, 0x61, 0xB5, 0xA3, 0x7A, 0x39, 0x8C ), - BYTES_TO_T_UINT_8( 0x71, 0x8D, 0x83, 0x9D, 0x90, 0x0A, 0x66, 0x3E ), - BYTES_TO_T_UINT_8( 0xBC, 0xA9, 0xEE, 0xA1, 0xDB, 0x57, 0xFB, 0xA9 ), -}; -#endif /* MBEDTLS_ECP_DP_BP256R1_ENABLED */ - -/* - * Domain parameters for brainpoolP384r1 (RFC 5639 3.6) - */ -#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) -static const mbedtls_mpi_uint brainpoolP384r1_p[] = { - BYTES_TO_T_UINT_8( 0x53, 0xEC, 0x07, 0x31, 0x13, 0x00, 0x47, 0x87 ), - BYTES_TO_T_UINT_8( 0x71, 0x1A, 0x1D, 0x90, 0x29, 0xA7, 0xD3, 0xAC ), - BYTES_TO_T_UINT_8( 0x23, 0x11, 0xB7, 0x7F, 0x19, 0xDA, 0xB1, 0x12 ), - BYTES_TO_T_UINT_8( 0xB4, 0x56, 0x54, 0xED, 0x09, 0x71, 0x2F, 0x15 ), - BYTES_TO_T_UINT_8( 0xDF, 0x41, 0xE6, 0x50, 0x7E, 0x6F, 0x5D, 0x0F ), - BYTES_TO_T_UINT_8( 0x28, 0x6D, 0x38, 0xA3, 0x82, 0x1E, 0xB9, 0x8C ), -}; -static const mbedtls_mpi_uint brainpoolP384r1_a[] = { - BYTES_TO_T_UINT_8( 0x26, 0x28, 0xCE, 0x22, 0xDD, 0xC7, 0xA8, 0x04 ), - BYTES_TO_T_UINT_8( 0xEB, 0xD4, 0x3A, 0x50, 0x4A, 0x81, 0xA5, 0x8A ), - BYTES_TO_T_UINT_8( 0x0F, 0xF9, 0x91, 0xBA, 0xEF, 0x65, 0x91, 0x13 ), - BYTES_TO_T_UINT_8( 0x87, 0x27, 0xB2, 0x4F, 0x8E, 0xA2, 0xBE, 0xC2 ), - BYTES_TO_T_UINT_8( 0xA0, 0xAF, 0x05, 0xCE, 0x0A, 0x08, 0x72, 0x3C ), - BYTES_TO_T_UINT_8( 0x0C, 0x15, 0x8C, 0x3D, 0xC6, 0x82, 0xC3, 0x7B ), -}; -static const mbedtls_mpi_uint brainpoolP384r1_b[] = { - BYTES_TO_T_UINT_8( 0x11, 0x4C, 0x50, 0xFA, 0x96, 0x86, 0xB7, 0x3A ), - BYTES_TO_T_UINT_8( 0x94, 0xC9, 0xDB, 0x95, 0x02, 0x39, 0xB4, 0x7C ), - BYTES_TO_T_UINT_8( 0xD5, 0x62, 0xEB, 0x3E, 0xA5, 0x0E, 0x88, 0x2E ), - BYTES_TO_T_UINT_8( 0xA6, 0xD2, 0xDC, 0x07, 0xE1, 0x7D, 0xB7, 0x2F ), - BYTES_TO_T_UINT_8( 0x7C, 0x44, 0xF0, 0x16, 0x54, 0xB5, 0x39, 0x8B ), - BYTES_TO_T_UINT_8( 0x26, 0x28, 0xCE, 0x22, 0xDD, 0xC7, 0xA8, 0x04 ), -}; -static const mbedtls_mpi_uint brainpoolP384r1_gx[] = { - BYTES_TO_T_UINT_8( 0x1E, 0xAF, 0xD4, 0x47, 0xE2, 0xB2, 0x87, 0xEF ), - BYTES_TO_T_UINT_8( 0xAA, 0x46, 0xD6, 0x36, 0x34, 0xE0, 0x26, 0xE8 ), - BYTES_TO_T_UINT_8( 0xE8, 0x10, 0xBD, 0x0C, 0xFE, 0xCA, 0x7F, 0xDB ), - BYTES_TO_T_UINT_8( 0xE3, 0x4F, 0xF1, 0x7E, 0xE7, 0xA3, 0x47, 0x88 ), - BYTES_TO_T_UINT_8( 0x6B, 0x3F, 0xC1, 0xB7, 0x81, 0x3A, 0xA6, 0xA2 ), - BYTES_TO_T_UINT_8( 0xFF, 0x45, 0xCF, 0x68, 0xF0, 0x64, 0x1C, 0x1D ), -}; -static const mbedtls_mpi_uint brainpoolP384r1_gy[] = { - BYTES_TO_T_UINT_8( 0x15, 0x53, 0x3C, 0x26, 0x41, 0x03, 0x82, 0x42 ), - BYTES_TO_T_UINT_8( 0x11, 0x81, 0x91, 0x77, 0x21, 0x46, 0x46, 0x0E ), - BYTES_TO_T_UINT_8( 0x28, 0x29, 0x91, 0xF9, 0x4F, 0x05, 0x9C, 0xE1 ), - BYTES_TO_T_UINT_8( 0x64, 0x58, 0xEC, 0xFE, 0x29, 0x0B, 0xB7, 0x62 ), - BYTES_TO_T_UINT_8( 0x52, 0xD5, 0xCF, 0x95, 0x8E, 0xEB, 0xB1, 0x5C ), - BYTES_TO_T_UINT_8( 0xA4, 0xC2, 0xF9, 0x20, 0x75, 0x1D, 0xBE, 0x8A ), -}; -static const mbedtls_mpi_uint brainpoolP384r1_n[] = { - BYTES_TO_T_UINT_8( 0x65, 0x65, 0x04, 0xE9, 0x02, 0x32, 0x88, 0x3B ), - BYTES_TO_T_UINT_8( 0x10, 0xC3, 0x7F, 0x6B, 0xAF, 0xB6, 0x3A, 0xCF ), - BYTES_TO_T_UINT_8( 0xA7, 0x25, 0x04, 0xAC, 0x6C, 0x6E, 0x16, 0x1F ), - BYTES_TO_T_UINT_8( 0xB3, 0x56, 0x54, 0xED, 0x09, 0x71, 0x2F, 0x15 ), - BYTES_TO_T_UINT_8( 0xDF, 0x41, 0xE6, 0x50, 0x7E, 0x6F, 0x5D, 0x0F ), - BYTES_TO_T_UINT_8( 0x28, 0x6D, 0x38, 0xA3, 0x82, 0x1E, 0xB9, 0x8C ), -}; -#endif /* MBEDTLS_ECP_DP_BP384R1_ENABLED */ - -/* - * Domain parameters for brainpoolP512r1 (RFC 5639 3.7) - */ -#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) -static const mbedtls_mpi_uint brainpoolP512r1_p[] = { - BYTES_TO_T_UINT_8( 0xF3, 0x48, 0x3A, 0x58, 0x56, 0x60, 0xAA, 0x28 ), - BYTES_TO_T_UINT_8( 0x85, 0xC6, 0x82, 0x2D, 0x2F, 0xFF, 0x81, 0x28 ), - BYTES_TO_T_UINT_8( 0xE6, 0x80, 0xA3, 0xE6, 0x2A, 0xA1, 0xCD, 0xAE ), - BYTES_TO_T_UINT_8( 0x42, 0x68, 0xC6, 0x9B, 0x00, 0x9B, 0x4D, 0x7D ), - BYTES_TO_T_UINT_8( 0x71, 0x08, 0x33, 0x70, 0xCA, 0x9C, 0x63, 0xD6 ), - BYTES_TO_T_UINT_8( 0x0E, 0xD2, 0xC9, 0xB3, 0xB3, 0x8D, 0x30, 0xCB ), - BYTES_TO_T_UINT_8( 0x07, 0xFC, 0xC9, 0x33, 0xAE, 0xE6, 0xD4, 0x3F ), - BYTES_TO_T_UINT_8( 0x8B, 0xC4, 0xE9, 0xDB, 0xB8, 0x9D, 0xDD, 0xAA ), -}; -static const mbedtls_mpi_uint brainpoolP512r1_a[] = { - BYTES_TO_T_UINT_8( 0xCA, 0x94, 0xFC, 0x77, 0x4D, 0xAC, 0xC1, 0xE7 ), - BYTES_TO_T_UINT_8( 0xB9, 0xC7, 0xF2, 0x2B, 0xA7, 0x17, 0x11, 0x7F ), - BYTES_TO_T_UINT_8( 0xB5, 0xC8, 0x9A, 0x8B, 0xC9, 0xF1, 0x2E, 0x0A ), - BYTES_TO_T_UINT_8( 0xA1, 0x3A, 0x25, 0xA8, 0x5A, 0x5D, 0xED, 0x2D ), - BYTES_TO_T_UINT_8( 0xBC, 0x63, 0x98, 0xEA, 0xCA, 0x41, 0x34, 0xA8 ), - BYTES_TO_T_UINT_8( 0x10, 0x16, 0xF9, 0x3D, 0x8D, 0xDD, 0xCB, 0x94 ), - BYTES_TO_T_UINT_8( 0xC5, 0x4C, 0x23, 0xAC, 0x45, 0x71, 0x32, 0xE2 ), - BYTES_TO_T_UINT_8( 0x89, 0x3B, 0x60, 0x8B, 0x31, 0xA3, 0x30, 0x78 ), -}; -static const mbedtls_mpi_uint brainpoolP512r1_b[] = { - BYTES_TO_T_UINT_8( 0x23, 0xF7, 0x16, 0x80, 0x63, 0xBD, 0x09, 0x28 ), - BYTES_TO_T_UINT_8( 0xDD, 0xE5, 0xBA, 0x5E, 0xB7, 0x50, 0x40, 0x98 ), - BYTES_TO_T_UINT_8( 0x67, 0x3E, 0x08, 0xDC, 0xCA, 0x94, 0xFC, 0x77 ), - BYTES_TO_T_UINT_8( 0x4D, 0xAC, 0xC1, 0xE7, 0xB9, 0xC7, 0xF2, 0x2B ), - BYTES_TO_T_UINT_8( 0xA7, 0x17, 0x11, 0x7F, 0xB5, 0xC8, 0x9A, 0x8B ), - BYTES_TO_T_UINT_8( 0xC9, 0xF1, 0x2E, 0x0A, 0xA1, 0x3A, 0x25, 0xA8 ), - BYTES_TO_T_UINT_8( 0x5A, 0x5D, 0xED, 0x2D, 0xBC, 0x63, 0x98, 0xEA ), - BYTES_TO_T_UINT_8( 0xCA, 0x41, 0x34, 0xA8, 0x10, 0x16, 0xF9, 0x3D ), -}; -static const mbedtls_mpi_uint brainpoolP512r1_gx[] = { - BYTES_TO_T_UINT_8( 0x22, 0xF8, 0xB9, 0xBC, 0x09, 0x22, 0x35, 0x8B ), - BYTES_TO_T_UINT_8( 0x68, 0x5E, 0x6A, 0x40, 0x47, 0x50, 0x6D, 0x7C ), - BYTES_TO_T_UINT_8( 0x5F, 0x7D, 0xB9, 0x93, 0x7B, 0x68, 0xD1, 0x50 ), - BYTES_TO_T_UINT_8( 0x8D, 0xD4, 0xD0, 0xE2, 0x78, 0x1F, 0x3B, 0xFF ), - BYTES_TO_T_UINT_8( 0x8E, 0x09, 0xD0, 0xF4, 0xEE, 0x62, 0x3B, 0xB4 ), - BYTES_TO_T_UINT_8( 0xC1, 0x16, 0xD9, 0xB5, 0x70, 0x9F, 0xED, 0x85 ), - BYTES_TO_T_UINT_8( 0x93, 0x6A, 0x4C, 0x9C, 0x2E, 0x32, 0x21, 0x5A ), - BYTES_TO_T_UINT_8( 0x64, 0xD9, 0x2E, 0xD8, 0xBD, 0xE4, 0xAE, 0x81 ), -}; -static const mbedtls_mpi_uint brainpoolP512r1_gy[] = { - BYTES_TO_T_UINT_8( 0x92, 0x08, 0xD8, 0x3A, 0x0F, 0x1E, 0xCD, 0x78 ), - BYTES_TO_T_UINT_8( 0x06, 0x54, 0xF0, 0xA8, 0x2F, 0x2B, 0xCA, 0xD1 ), - BYTES_TO_T_UINT_8( 0xAE, 0x63, 0x27, 0x8A, 0xD8, 0x4B, 0xCA, 0x5B ), - BYTES_TO_T_UINT_8( 0x5E, 0x48, 0x5F, 0x4A, 0x49, 0xDE, 0xDC, 0xB2 ), - BYTES_TO_T_UINT_8( 0x11, 0x81, 0x1F, 0x88, 0x5B, 0xC5, 0x00, 0xA0 ), - BYTES_TO_T_UINT_8( 0x1A, 0x7B, 0xA5, 0x24, 0x00, 0xF7, 0x09, 0xF2 ), - BYTES_TO_T_UINT_8( 0xFD, 0x22, 0x78, 0xCF, 0xA9, 0xBF, 0xEA, 0xC0 ), - BYTES_TO_T_UINT_8( 0xEC, 0x32, 0x63, 0x56, 0x5D, 0x38, 0xDE, 0x7D ), -}; -static const mbedtls_mpi_uint brainpoolP512r1_n[] = { - BYTES_TO_T_UINT_8( 0x69, 0x00, 0xA9, 0x9C, 0x82, 0x96, 0x87, 0xB5 ), - BYTES_TO_T_UINT_8( 0xDD, 0xDA, 0x5D, 0x08, 0x81, 0xD3, 0xB1, 0x1D ), - BYTES_TO_T_UINT_8( 0x47, 0x10, 0xAC, 0x7F, 0x19, 0x61, 0x86, 0x41 ), - BYTES_TO_T_UINT_8( 0x19, 0x26, 0xA9, 0x4C, 0x41, 0x5C, 0x3E, 0x55 ), - BYTES_TO_T_UINT_8( 0x70, 0x08, 0x33, 0x70, 0xCA, 0x9C, 0x63, 0xD6 ), - BYTES_TO_T_UINT_8( 0x0E, 0xD2, 0xC9, 0xB3, 0xB3, 0x8D, 0x30, 0xCB ), - BYTES_TO_T_UINT_8( 0x07, 0xFC, 0xC9, 0x33, 0xAE, 0xE6, 0xD4, 0x3F ), - BYTES_TO_T_UINT_8( 0x8B, 0xC4, 0xE9, 0xDB, 0xB8, 0x9D, 0xDD, 0xAA ), -}; -#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */ - -/* - * Create an MPI from embedded constants - * (assumes len is an exact multiple of sizeof mbedtls_mpi_uint) - */ -static inline void ecp_mpi_load( mbedtls_mpi *X, const mbedtls_mpi_uint *p, size_t len ) -{ - X->s = 1; - X->n = len / sizeof( mbedtls_mpi_uint ); - X->p = (mbedtls_mpi_uint *) p; -} - -/* - * Set an MPI to static value 1 - */ -static inline void ecp_mpi_set1( mbedtls_mpi *X ) -{ - static mbedtls_mpi_uint one[] = { 1 }; - X->s = 1; - X->n = 1; - X->p = one; -} - -/* - * Make group available from embedded constants - */ -static int ecp_group_load( mbedtls_ecp_group *grp, - const mbedtls_mpi_uint *p, size_t plen, - const mbedtls_mpi_uint *a, size_t alen, - const mbedtls_mpi_uint *b, size_t blen, - const mbedtls_mpi_uint *gx, size_t gxlen, - const mbedtls_mpi_uint *gy, size_t gylen, - const mbedtls_mpi_uint *n, size_t nlen) -{ - ecp_mpi_load( &grp->P, p, plen ); - if( a != NULL ) - ecp_mpi_load( &grp->A, a, alen ); - ecp_mpi_load( &grp->B, b, blen ); - ecp_mpi_load( &grp->N, n, nlen ); - - ecp_mpi_load( &grp->G.X, gx, gxlen ); - ecp_mpi_load( &grp->G.Y, gy, gylen ); - ecp_mpi_set1( &grp->G.Z ); - - grp->pbits = mbedtls_mpi_bitlen( &grp->P ); - grp->nbits = mbedtls_mpi_bitlen( &grp->N ); - - grp->h = 1; - - return( 0 ); -} - -#if defined(MBEDTLS_ECP_NIST_OPTIM) -/* Forward declarations */ -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) -static int ecp_mod_p192( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) -static int ecp_mod_p224( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) -static int ecp_mod_p256( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) -static int ecp_mod_p384( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) -static int ecp_mod_p521( mbedtls_mpi * ); -#endif - -#define NIST_MODP( P ) grp->modp = ecp_mod_ ## P; -#else -#define NIST_MODP( P ) -#endif /* MBEDTLS_ECP_NIST_OPTIM */ - -/* Additional forward declarations */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) -static int ecp_mod_p255( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) -static int ecp_mod_p192k1( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) -static int ecp_mod_p224k1( mbedtls_mpi * ); -#endif -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) -static int ecp_mod_p256k1( mbedtls_mpi * ); -#endif - -#define LOAD_GROUP_A( G ) ecp_group_load( grp, \ - G ## _p, sizeof( G ## _p ), \ - G ## _a, sizeof( G ## _a ), \ - G ## _b, sizeof( G ## _b ), \ - G ## _gx, sizeof( G ## _gx ), \ - G ## _gy, sizeof( G ## _gy ), \ - G ## _n, sizeof( G ## _n ) ) - -#define LOAD_GROUP( G ) ecp_group_load( grp, \ - G ## _p, sizeof( G ## _p ), \ - NULL, 0, \ - G ## _b, sizeof( G ## _b ), \ - G ## _gx, sizeof( G ## _gx ), \ - G ## _gy, sizeof( G ## _gy ), \ - G ## _n, sizeof( G ## _n ) ) - -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) -/* - * Specialized function for creating the Curve25519 group - */ -static int ecp_use_curve25519( mbedtls_ecp_group *grp ) -{ - int ret; - - /* Actually ( A + 2 ) / 4 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &grp->A, 16, "01DB42" ) ); - - /* P = 2^255 - 19 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &grp->P, 255 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) ); - grp->pbits = mbedtls_mpi_bitlen( &grp->P ); - - /* Y intentionaly not set, since we use x/z coordinates. - * This is used as a marker to identify Montgomery curves! */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->G.X, 9 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->G.Z, 1 ) ); - mbedtls_mpi_free( &grp->G.Y ); - - /* Actually, the required msb for private keys */ - grp->nbits = 254; - -cleanup: - if( ret != 0 ) - mbedtls_ecp_group_free( grp ); - - return( ret ); -} -#endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */ - -/* - * Set a group using well-known domain parameters - */ -int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id id ) -{ - mbedtls_ecp_group_free( grp ); - - grp->id = id; - - switch( id ) - { -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) - case MBEDTLS_ECP_DP_SECP192R1: - NIST_MODP( p192 ); - return( LOAD_GROUP( secp192r1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP192R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) - case MBEDTLS_ECP_DP_SECP224R1: - NIST_MODP( p224 ); - return( LOAD_GROUP( secp224r1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) - case MBEDTLS_ECP_DP_SECP256R1: - NIST_MODP( p256 ); - return( LOAD_GROUP( secp256r1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) - case MBEDTLS_ECP_DP_SECP384R1: - NIST_MODP( p384 ); - return( LOAD_GROUP( secp384r1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) - case MBEDTLS_ECP_DP_SECP521R1: - NIST_MODP( p521 ); - return( LOAD_GROUP( secp521r1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) - case MBEDTLS_ECP_DP_SECP192K1: - grp->modp = ecp_mod_p192k1; - return( LOAD_GROUP_A( secp192k1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) - case MBEDTLS_ECP_DP_SECP224K1: - grp->modp = ecp_mod_p224k1; - return( LOAD_GROUP_A( secp224k1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) - case MBEDTLS_ECP_DP_SECP256K1: - grp->modp = ecp_mod_p256k1; - return( LOAD_GROUP_A( secp256k1 ) ); -#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) - case MBEDTLS_ECP_DP_BP256R1: - return( LOAD_GROUP_A( brainpoolP256r1 ) ); -#endif /* MBEDTLS_ECP_DP_BP256R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) - case MBEDTLS_ECP_DP_BP384R1: - return( LOAD_GROUP_A( brainpoolP384r1 ) ); -#endif /* MBEDTLS_ECP_DP_BP384R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) - case MBEDTLS_ECP_DP_BP512R1: - return( LOAD_GROUP_A( brainpoolP512r1 ) ); -#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - case MBEDTLS_ECP_DP_CURVE25519: - grp->modp = ecp_mod_p255; - return( ecp_use_curve25519( grp ) ); -#endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */ - - default: - mbedtls_ecp_group_free( grp ); - return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ); - } -} - -#if defined(MBEDTLS_ECP_NIST_OPTIM) -/* - * Fast reduction modulo the primes used by the NIST curves. - * - * These functions are critical for speed, but not needed for correct - * operations. So, we make the choice to heavily rely on the internals of our - * bignum library, which creates a tight coupling between these functions and - * our MPI implementation. However, the coupling between the ECP module and - * MPI remains loose, since these functions can be deactivated at will. - */ - -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) -/* - * Compared to the way things are presented in FIPS 186-3 D.2, - * we proceed in columns, from right (least significant chunk) to left, - * adding chunks to N in place, and keeping a carry for the next chunk. - * This avoids moving things around in memory, and uselessly adding zeros, - * compared to the more straightforward, line-oriented approach. - * - * For this prime we need to handle data in chunks of 64 bits. - * Since this is always a multiple of our basic mbedtls_mpi_uint, we can - * use a mbedtls_mpi_uint * to designate such a chunk, and small loops to handle it. - */ - -/* Add 64-bit chunks (dst += src) and update carry */ -static inline void add64( mbedtls_mpi_uint *dst, mbedtls_mpi_uint *src, mbedtls_mpi_uint *carry ) -{ - unsigned char i; - mbedtls_mpi_uint c = 0; - for( i = 0; i < 8 / sizeof( mbedtls_mpi_uint ); i++, dst++, src++ ) - { - *dst += c; c = ( *dst < c ); - *dst += *src; c += ( *dst < *src ); - } - *carry += c; -} - -/* Add carry to a 64-bit chunk and update carry */ -static inline void carry64( mbedtls_mpi_uint *dst, mbedtls_mpi_uint *carry ) -{ - unsigned char i; - for( i = 0; i < 8 / sizeof( mbedtls_mpi_uint ); i++, dst++ ) - { - *dst += *carry; - *carry = ( *dst < *carry ); - } -} - -#define WIDTH 8 / sizeof( mbedtls_mpi_uint ) -#define A( i ) N->p + i * WIDTH -#define ADD( i ) add64( p, A( i ), &c ) -#define NEXT p += WIDTH; carry64( p, &c ) -#define LAST p += WIDTH; *p = c; while( ++p < end ) *p = 0 - -/* - * Fast quasi-reduction modulo p192 (FIPS 186-3 D.2.1) - */ -static int ecp_mod_p192( mbedtls_mpi *N ) -{ - int ret; - mbedtls_mpi_uint c = 0; - mbedtls_mpi_uint *p, *end; - - /* Make sure we have enough blocks so that A(5) is legal */ - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( N, 6 * WIDTH ) ); - - p = N->p; - end = p + N->n; - - ADD( 3 ); ADD( 5 ); NEXT; // A0 += A3 + A5 - ADD( 3 ); ADD( 4 ); ADD( 5 ); NEXT; // A1 += A3 + A4 + A5 - ADD( 4 ); ADD( 5 ); LAST; // A2 += A4 + A5 - -cleanup: - return( ret ); -} - -#undef WIDTH -#undef A -#undef ADD -#undef NEXT -#undef LAST -#endif /* MBEDTLS_ECP_DP_SECP192R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) -/* - * The reader is advised to first understand ecp_mod_p192() since the same - * general structure is used here, but with additional complications: - * (1) chunks of 32 bits, and (2) subtractions. - */ - -/* - * For these primes, we need to handle data in chunks of 32 bits. - * This makes it more complicated if we use 64 bits limbs in MPI, - * which prevents us from using a uniform access method as for p192. - * - * So, we define a mini abstraction layer to access 32 bit chunks, - * load them in 'cur' for work, and store them back from 'cur' when done. - * - * While at it, also define the size of N in terms of 32-bit chunks. - */ -#define LOAD32 cur = A( i ); - -#if defined(MBEDTLS_HAVE_INT32) /* 32 bit */ - -#define MAX32 N->n -#define A( j ) N->p[j] -#define STORE32 N->p[i] = cur; - -#else /* 64-bit */ - -#define MAX32 N->n * 2 -#define A( j ) j % 2 ? (uint32_t)( N->p[j/2] >> 32 ) : (uint32_t)( N->p[j/2] ) -#define STORE32 \ - if( i % 2 ) { \ - N->p[i/2] &= 0x00000000FFFFFFFF; \ - N->p[i/2] |= ((mbedtls_mpi_uint) cur) << 32; \ - } else { \ - N->p[i/2] &= 0xFFFFFFFF00000000; \ - N->p[i/2] |= (mbedtls_mpi_uint) cur; \ - } - -#endif /* sizeof( mbedtls_mpi_uint ) */ - -/* - * Helpers for addition and subtraction of chunks, with signed carry. - */ -static inline void add32( uint32_t *dst, uint32_t src, signed char *carry ) -{ - *dst += src; - *carry += ( *dst < src ); -} - -static inline void sub32( uint32_t *dst, uint32_t src, signed char *carry ) -{ - *carry -= ( *dst < src ); - *dst -= src; -} - -#define ADD( j ) add32( &cur, A( j ), &c ); -#define SUB( j ) sub32( &cur, A( j ), &c ); - -/* - * Helpers for the main 'loop' - * (see fix_negative for the motivation of C) - */ -#define INIT( b ) \ - int ret; \ - signed char c = 0, cc; \ - uint32_t cur; \ - size_t i = 0, bits = b; \ - mbedtls_mpi C; \ - mbedtls_mpi_uint Cp[ b / 8 / sizeof( mbedtls_mpi_uint) + 1 ]; \ - \ - C.s = 1; \ - C.n = b / 8 / sizeof( mbedtls_mpi_uint) + 1; \ - C.p = Cp; \ - memset( Cp, 0, C.n * sizeof( mbedtls_mpi_uint ) ); \ - \ - MBEDTLS_MPI_CHK( mbedtls_mpi_grow( N, b * 2 / 8 / sizeof( mbedtls_mpi_uint ) ) ); \ - LOAD32; - -#define NEXT \ - STORE32; i++; LOAD32; \ - cc = c; c = 0; \ - if( cc < 0 ) \ - sub32( &cur, -cc, &c ); \ - else \ - add32( &cur, cc, &c ); \ - -#define LAST \ - STORE32; i++; \ - cur = c > 0 ? c : 0; STORE32; \ - cur = 0; while( ++i < MAX32 ) { STORE32; } \ - if( c < 0 ) fix_negative( N, c, &C, bits ); - -/* - * If the result is negative, we get it in the form - * c * 2^(bits + 32) + N, with c negative and N positive shorter than 'bits' - */ -static inline int fix_negative( mbedtls_mpi *N, signed char c, mbedtls_mpi *C, size_t bits ) -{ - int ret; - - /* C = - c * 2^(bits + 32) */ -#if !defined(MBEDTLS_HAVE_INT64) - ((void) bits); -#else - if( bits == 224 ) - C->p[ C->n - 1 ] = ((mbedtls_mpi_uint) -c) << 32; - else -#endif - C->p[ C->n - 1 ] = (mbedtls_mpi_uint) -c; - - /* N = - ( C - N ) */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( N, C, N ) ); - N->s = -1; - -cleanup: - - return( ret ); -} - -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) -/* - * Fast quasi-reduction modulo p224 (FIPS 186-3 D.2.2) - */ -static int ecp_mod_p224( mbedtls_mpi *N ) -{ - INIT( 224 ); - - SUB( 7 ); SUB( 11 ); NEXT; // A0 += -A7 - A11 - SUB( 8 ); SUB( 12 ); NEXT; // A1 += -A8 - A12 - SUB( 9 ); SUB( 13 ); NEXT; // A2 += -A9 - A13 - SUB( 10 ); ADD( 7 ); ADD( 11 ); NEXT; // A3 += -A10 + A7 + A11 - SUB( 11 ); ADD( 8 ); ADD( 12 ); NEXT; // A4 += -A11 + A8 + A12 - SUB( 12 ); ADD( 9 ); ADD( 13 ); NEXT; // A5 += -A12 + A9 + A13 - SUB( 13 ); ADD( 10 ); LAST; // A6 += -A13 + A10 - -cleanup: - return( ret ); -} -#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) -/* - * Fast quasi-reduction modulo p256 (FIPS 186-3 D.2.3) - */ -static int ecp_mod_p256( mbedtls_mpi *N ) -{ - INIT( 256 ); - - ADD( 8 ); ADD( 9 ); - SUB( 11 ); SUB( 12 ); SUB( 13 ); SUB( 14 ); NEXT; // A0 - - ADD( 9 ); ADD( 10 ); - SUB( 12 ); SUB( 13 ); SUB( 14 ); SUB( 15 ); NEXT; // A1 - - ADD( 10 ); ADD( 11 ); - SUB( 13 ); SUB( 14 ); SUB( 15 ); NEXT; // A2 - - ADD( 11 ); ADD( 11 ); ADD( 12 ); ADD( 12 ); ADD( 13 ); - SUB( 15 ); SUB( 8 ); SUB( 9 ); NEXT; // A3 - - ADD( 12 ); ADD( 12 ); ADD( 13 ); ADD( 13 ); ADD( 14 ); - SUB( 9 ); SUB( 10 ); NEXT; // A4 - - ADD( 13 ); ADD( 13 ); ADD( 14 ); ADD( 14 ); ADD( 15 ); - SUB( 10 ); SUB( 11 ); NEXT; // A5 - - ADD( 14 ); ADD( 14 ); ADD( 15 ); ADD( 15 ); ADD( 14 ); ADD( 13 ); - SUB( 8 ); SUB( 9 ); NEXT; // A6 - - ADD( 15 ); ADD( 15 ); ADD( 15 ); ADD( 8 ); - SUB( 10 ); SUB( 11 ); SUB( 12 ); SUB( 13 ); LAST; // A7 - -cleanup: - return( ret ); -} -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) -/* - * Fast quasi-reduction modulo p384 (FIPS 186-3 D.2.4) - */ -static int ecp_mod_p384( mbedtls_mpi *N ) -{ - INIT( 384 ); - - ADD( 12 ); ADD( 21 ); ADD( 20 ); - SUB( 23 ); NEXT; // A0 - - ADD( 13 ); ADD( 22 ); ADD( 23 ); - SUB( 12 ); SUB( 20 ); NEXT; // A2 - - ADD( 14 ); ADD( 23 ); - SUB( 13 ); SUB( 21 ); NEXT; // A2 - - ADD( 15 ); ADD( 12 ); ADD( 20 ); ADD( 21 ); - SUB( 14 ); SUB( 22 ); SUB( 23 ); NEXT; // A3 - - ADD( 21 ); ADD( 21 ); ADD( 16 ); ADD( 13 ); ADD( 12 ); ADD( 20 ); ADD( 22 ); - SUB( 15 ); SUB( 23 ); SUB( 23 ); NEXT; // A4 - - ADD( 22 ); ADD( 22 ); ADD( 17 ); ADD( 14 ); ADD( 13 ); ADD( 21 ); ADD( 23 ); - SUB( 16 ); NEXT; // A5 - - ADD( 23 ); ADD( 23 ); ADD( 18 ); ADD( 15 ); ADD( 14 ); ADD( 22 ); - SUB( 17 ); NEXT; // A6 - - ADD( 19 ); ADD( 16 ); ADD( 15 ); ADD( 23 ); - SUB( 18 ); NEXT; // A7 - - ADD( 20 ); ADD( 17 ); ADD( 16 ); - SUB( 19 ); NEXT; // A8 - - ADD( 21 ); ADD( 18 ); ADD( 17 ); - SUB( 20 ); NEXT; // A9 - - ADD( 22 ); ADD( 19 ); ADD( 18 ); - SUB( 21 ); NEXT; // A10 - - ADD( 23 ); ADD( 20 ); ADD( 19 ); - SUB( 22 ); LAST; // A11 - -cleanup: - return( ret ); -} -#endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */ - -#undef A -#undef LOAD32 -#undef STORE32 -#undef MAX32 -#undef INIT -#undef NEXT -#undef LAST - -#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED || - MBEDTLS_ECP_DP_SECP256R1_ENABLED || - MBEDTLS_ECP_DP_SECP384R1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) -/* - * Here we have an actual Mersenne prime, so things are more straightforward. - * However, chunks are aligned on a 'weird' boundary (521 bits). - */ - -/* Size of p521 in terms of mbedtls_mpi_uint */ -#define P521_WIDTH ( 521 / 8 / sizeof( mbedtls_mpi_uint ) + 1 ) - -/* Bits to keep in the most significant mbedtls_mpi_uint */ -#define P521_MASK 0x01FF - -/* - * Fast quasi-reduction modulo p521 (FIPS 186-3 D.2.5) - * Write N as A1 + 2^521 A0, return A0 + A1 - */ -static int ecp_mod_p521( mbedtls_mpi *N ) -{ - int ret; - size_t i; - mbedtls_mpi M; - mbedtls_mpi_uint Mp[P521_WIDTH + 1]; - /* Worst case for the size of M is when mbedtls_mpi_uint is 16 bits: - * we need to hold bits 513 to 1056, which is 34 limbs, that is - * P521_WIDTH + 1. Otherwise P521_WIDTH is enough. */ - - if( N->n < P521_WIDTH ) - return( 0 ); - - /* M = A1 */ - M.s = 1; - M.n = N->n - ( P521_WIDTH - 1 ); - if( M.n > P521_WIDTH + 1 ) - M.n = P521_WIDTH + 1; - M.p = Mp; - memcpy( Mp, N->p + P521_WIDTH - 1, M.n * sizeof( mbedtls_mpi_uint ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, 521 % ( 8 * sizeof( mbedtls_mpi_uint ) ) ) ); - - /* N = A0 */ - N->p[P521_WIDTH - 1] &= P521_MASK; - for( i = P521_WIDTH; i < N->n; i++ ) - N->p[i] = 0; - - /* N = A0 + A1 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); - -cleanup: - return( ret ); -} - -#undef P521_WIDTH -#undef P521_MASK -#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */ - -#endif /* MBEDTLS_ECP_NIST_OPTIM */ - -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - -/* Size of p255 in terms of mbedtls_mpi_uint */ -#define P255_WIDTH ( 255 / 8 / sizeof( mbedtls_mpi_uint ) + 1 ) - -/* - * Fast quasi-reduction modulo p255 = 2^255 - 19 - * Write N as A0 + 2^255 A1, return A0 + 19 * A1 - */ -static int ecp_mod_p255( mbedtls_mpi *N ) -{ - int ret; - size_t i; - mbedtls_mpi M; - mbedtls_mpi_uint Mp[P255_WIDTH + 2]; - - if( N->n < P255_WIDTH ) - return( 0 ); - - /* M = A1 */ - M.s = 1; - M.n = N->n - ( P255_WIDTH - 1 ); - if( M.n > P255_WIDTH + 1 ) - M.n = P255_WIDTH + 1; - M.p = Mp; - memset( Mp, 0, sizeof Mp ); - memcpy( Mp, N->p + P255_WIDTH - 1, M.n * sizeof( mbedtls_mpi_uint ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, 255 % ( 8 * sizeof( mbedtls_mpi_uint ) ) ) ); - M.n++; /* Make room for multiplication by 19 */ - - /* N = A0 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( N, 255, 0 ) ); - for( i = P255_WIDTH; i < N->n; i++ ) - N->p[i] = 0; - - /* N = A0 + 19 * A1 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &M, &M, 19 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); - -cleanup: - return( ret ); -} -#endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \ - defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) -/* - * Fast quasi-reduction modulo P = 2^s - R, - * with R about 33 bits, used by the Koblitz curves. - * - * Write N as A0 + 2^224 A1, return A0 + R * A1. - * Actually do two passes, since R is big. - */ -#define P_KOBLITZ_MAX ( 256 / 8 / sizeof( mbedtls_mpi_uint ) ) // Max limbs in P -#define P_KOBLITZ_R ( 8 / sizeof( mbedtls_mpi_uint ) ) // Limbs in R -static inline int ecp_mod_koblitz( mbedtls_mpi *N, mbedtls_mpi_uint *Rp, size_t p_limbs, - size_t adjust, size_t shift, mbedtls_mpi_uint mask ) -{ - int ret; - size_t i; - mbedtls_mpi M, R; - mbedtls_mpi_uint Mp[P_KOBLITZ_MAX + P_KOBLITZ_R]; - - if( N->n < p_limbs ) - return( 0 ); - - /* Init R */ - R.s = 1; - R.p = Rp; - R.n = P_KOBLITZ_R; - - /* Common setup for M */ - M.s = 1; - M.p = Mp; - - /* M = A1 */ - M.n = N->n - ( p_limbs - adjust ); - if( M.n > p_limbs + adjust ) - M.n = p_limbs + adjust; - memset( Mp, 0, sizeof Mp ); - memcpy( Mp, N->p + p_limbs - adjust, M.n * sizeof( mbedtls_mpi_uint ) ); - if( shift != 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, shift ) ); - M.n += R.n - adjust; /* Make room for multiplication by R */ - - /* N = A0 */ - if( mask != 0 ) - N->p[p_limbs - 1] &= mask; - for( i = p_limbs; i < N->n; i++ ) - N->p[i] = 0; - - /* N = A0 + R * A1 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &M, &M, &R ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); - - /* Second pass */ - - /* M = A1 */ - M.n = N->n - ( p_limbs - adjust ); - if( M.n > p_limbs + adjust ) - M.n = p_limbs + adjust; - memset( Mp, 0, sizeof Mp ); - memcpy( Mp, N->p + p_limbs - adjust, M.n * sizeof( mbedtls_mpi_uint ) ); - if( shift != 0 ) - MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, shift ) ); - M.n += R.n - adjust; /* Make room for multiplication by R */ - - /* N = A0 */ - if( mask != 0 ) - N->p[p_limbs - 1] &= mask; - for( i = p_limbs; i < N->n; i++ ) - N->p[i] = 0; - - /* N = A0 + R * A1 */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &M, &M, &R ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); - -cleanup: - return( ret ); -} -#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED) || - MBEDTLS_ECP_DP_SECP224K1_ENABLED) || - MBEDTLS_ECP_DP_SECP256K1_ENABLED) */ - -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) -/* - * Fast quasi-reduction modulo p192k1 = 2^192 - R, - * with R = 2^32 + 2^12 + 2^8 + 2^7 + 2^6 + 2^3 + 1 = 0x0100001119 - */ -static int ecp_mod_p192k1( mbedtls_mpi *N ) -{ - static mbedtls_mpi_uint Rp[] = { - BYTES_TO_T_UINT_8( 0xC9, 0x11, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 ) }; - - return( ecp_mod_koblitz( N, Rp, 192 / 8 / sizeof( mbedtls_mpi_uint ), 0, 0, 0 ) ); -} -#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) -/* - * Fast quasi-reduction modulo p224k1 = 2^224 - R, - * with R = 2^32 + 2^12 + 2^11 + 2^9 + 2^7 + 2^4 + 2 + 1 = 0x0100001A93 - */ -static int ecp_mod_p224k1( mbedtls_mpi *N ) -{ - static mbedtls_mpi_uint Rp[] = { - BYTES_TO_T_UINT_8( 0x93, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 ) }; - -#if defined(MBEDTLS_HAVE_INT64) - return( ecp_mod_koblitz( N, Rp, 4, 1, 32, 0xFFFFFFFF ) ); -#else - return( ecp_mod_koblitz( N, Rp, 224 / 8 / sizeof( mbedtls_mpi_uint ), 0, 0, 0 ) ); -#endif -} - -#endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */ - -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) -/* - * Fast quasi-reduction modulo p256k1 = 2^256 - R, - * with R = 2^32 + 2^9 + 2^8 + 2^7 + 2^6 + 2^4 + 1 = 0x01000003D1 - */ -static int ecp_mod_p256k1( mbedtls_mpi *N ) -{ - static mbedtls_mpi_uint Rp[] = { - BYTES_TO_T_UINT_8( 0xD1, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 ) }; - return( ecp_mod_koblitz( N, Rp, 256 / 8 / sizeof( mbedtls_mpi_uint ), 0, 0, 0 ) ); -} -#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */ - -#endif /* MBEDTLS_ECP_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/entropy.c b/build/premake/premake5/contrib/mbedtls/library/entropy.c deleted file mode 100644 index cdbd35c34e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/entropy.c +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Entropy accumulator implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ENTROPY_C) - -#include "mbedtls/entropy.h" -#include "mbedtls/entropy_poll.h" - -#include - -#if defined(MBEDTLS_FS_IO) -#include -#endif - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if defined(MBEDTLS_HAVEGE_C) -#include "mbedtls/havege.h" -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -#define ENTROPY_MAX_LOOP 256 /**< Maximum amount to loop before error */ - -void mbedtls_entropy_init( mbedtls_entropy_context *ctx ) -{ - memset( ctx, 0, sizeof(mbedtls_entropy_context) ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif - -#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) - mbedtls_sha512_starts( &ctx->accumulator, 0 ); -#else - mbedtls_sha256_starts( &ctx->accumulator, 0 ); -#endif -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_init( &ctx->havege_data ); -#endif - -#if !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) -#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) - mbedtls_entropy_add_source( ctx, mbedtls_platform_entropy_poll, NULL, - MBEDTLS_ENTROPY_MIN_PLATFORM, - MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif -#if defined(MBEDTLS_TIMING_C) - mbedtls_entropy_add_source( ctx, mbedtls_hardclock_poll, NULL, - MBEDTLS_ENTROPY_MIN_HARDCLOCK, - MBEDTLS_ENTROPY_SOURCE_WEAK ); -#endif -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_entropy_add_source( ctx, mbedtls_havege_poll, &ctx->havege_data, - MBEDTLS_ENTROPY_MIN_HAVEGE, - MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) - mbedtls_entropy_add_source( ctx, mbedtls_hardware_poll, NULL, - MBEDTLS_ENTROPY_MIN_HARDWARE, - MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif -#endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */ -} - -void mbedtls_entropy_free( mbedtls_entropy_context *ctx ) -{ -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_free( &ctx->havege_data ); -#endif -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &ctx->mutex ); -#endif - mbedtls_zeroize( ctx, sizeof( mbedtls_entropy_context ) ); -} - -int mbedtls_entropy_add_source( mbedtls_entropy_context *ctx, - mbedtls_entropy_f_source_ptr f_source, void *p_source, - size_t threshold, int strong ) -{ - int index, ret = 0; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - index = ctx->source_count; - if( index >= MBEDTLS_ENTROPY_MAX_SOURCES ) - { - ret = MBEDTLS_ERR_ENTROPY_MAX_SOURCES; - goto exit; - } - - ctx->source[index].f_source = f_source; - ctx->source[index].p_source = p_source; - ctx->source[index].threshold = threshold; - ctx->source[index].strong = strong; - - ctx->source_count++; - -exit: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -/* - * Entropy accumulator update - */ -static int entropy_update( mbedtls_entropy_context *ctx, unsigned char source_id, - const unsigned char *data, size_t len ) -{ - unsigned char header[2]; - unsigned char tmp[MBEDTLS_ENTROPY_BLOCK_SIZE]; - size_t use_len = len; - const unsigned char *p = data; - - if( use_len > MBEDTLS_ENTROPY_BLOCK_SIZE ) - { -#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) - mbedtls_sha512( data, len, tmp, 0 ); -#else - mbedtls_sha256( data, len, tmp, 0 ); -#endif - p = tmp; - use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; - } - - header[0] = source_id; - header[1] = use_len & 0xFF; - -#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) - mbedtls_sha512_update( &ctx->accumulator, header, 2 ); - mbedtls_sha512_update( &ctx->accumulator, p, use_len ); -#else - mbedtls_sha256_update( &ctx->accumulator, header, 2 ); - mbedtls_sha256_update( &ctx->accumulator, p, use_len ); -#endif - - return( 0 ); -} - -int mbedtls_entropy_update_manual( mbedtls_entropy_context *ctx, - const unsigned char *data, size_t len ) -{ - int ret; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - ret = entropy_update( ctx, MBEDTLS_ENTROPY_SOURCE_MANUAL, data, len ); - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -/* - * Run through the different sources to add entropy to our accumulator - */ -static int entropy_gather_internal( mbedtls_entropy_context *ctx ) -{ - int ret, i, have_one_strong = 0; - unsigned char buf[MBEDTLS_ENTROPY_MAX_GATHER]; - size_t olen; - - if( ctx->source_count == 0 ) - return( MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED ); - - /* - * Run through our entropy sources - */ - for( i = 0; i < ctx->source_count; i++ ) - { - if( ctx->source[i].strong == MBEDTLS_ENTROPY_SOURCE_STRONG ) - have_one_strong = 1; - - olen = 0; - if( ( ret = ctx->source[i].f_source( ctx->source[i].p_source, - buf, MBEDTLS_ENTROPY_MAX_GATHER, &olen ) ) != 0 ) - { - return( ret ); - } - - /* - * Add if we actually gathered something - */ - if( olen > 0 ) - { - entropy_update( ctx, (unsigned char) i, buf, olen ); - ctx->source[i].size += olen; - } - } - - if( have_one_strong == 0 ) - return( MBEDTLS_ERR_ENTROPY_NO_STRONG_SOURCE ); - - return( 0 ); -} - -/* - * Thread-safe wrapper for entropy_gather_internal() - */ -int mbedtls_entropy_gather( mbedtls_entropy_context *ctx ) -{ - int ret; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - ret = entropy_gather_internal( ctx ); - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -int mbedtls_entropy_func( void *data, unsigned char *output, size_t len ) -{ - int ret, count = 0, i, done; - mbedtls_entropy_context *ctx = (mbedtls_entropy_context *) data; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; - - if( len > MBEDTLS_ENTROPY_BLOCK_SIZE ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - /* - * Always gather extra entropy before a call - */ - do - { - if( count++ > ENTROPY_MAX_LOOP ) - { - ret = MBEDTLS_ERR_ENTROPY_SOURCE_FAILED; - goto exit; - } - - if( ( ret = entropy_gather_internal( ctx ) ) != 0 ) - goto exit; - - done = 1; - for( i = 0; i < ctx->source_count; i++ ) - if( ctx->source[i].size < ctx->source[i].threshold ) - done = 0; - } - while( ! done ); - - memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE ); - -#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) - mbedtls_sha512_finish( &ctx->accumulator, buf ); - - /* - * Reset accumulator and counters and recycle existing entropy - */ - memset( &ctx->accumulator, 0, sizeof( mbedtls_sha512_context ) ); - mbedtls_sha512_starts( &ctx->accumulator, 0 ); - mbedtls_sha512_update( &ctx->accumulator, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ); - - /* - * Perform second SHA-512 on entropy - */ - mbedtls_sha512( buf, MBEDTLS_ENTROPY_BLOCK_SIZE, buf, 0 ); -#else /* MBEDTLS_ENTROPY_SHA512_ACCUMULATOR */ - mbedtls_sha256_finish( &ctx->accumulator, buf ); - - /* - * Reset accumulator and counters and recycle existing entropy - */ - memset( &ctx->accumulator, 0, sizeof( mbedtls_sha256_context ) ); - mbedtls_sha256_starts( &ctx->accumulator, 0 ); - mbedtls_sha256_update( &ctx->accumulator, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ); - - /* - * Perform second SHA-256 on entropy - */ - mbedtls_sha256( buf, MBEDTLS_ENTROPY_BLOCK_SIZE, buf, 0 ); -#endif /* MBEDTLS_ENTROPY_SHA512_ACCUMULATOR */ - - for( i = 0; i < ctx->source_count; i++ ) - ctx->source[i].size = 0; - - memcpy( output, buf, len ); - - ret = 0; - -exit: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -#if defined(MBEDTLS_FS_IO) -int mbedtls_entropy_write_seed_file( mbedtls_entropy_context *ctx, const char *path ) -{ - int ret = MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR; - FILE *f; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; - - if( ( f = fopen( path, "wb" ) ) == NULL ) - return( MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR ); - - if( ( ret = mbedtls_entropy_func( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) ) != 0 ) - goto exit; - - if( fwrite( buf, 1, MBEDTLS_ENTROPY_BLOCK_SIZE, f ) != MBEDTLS_ENTROPY_BLOCK_SIZE ) - { - ret = MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR; - goto exit; - } - - ret = 0; - -exit: - fclose( f ); - return( ret ); -} - -int mbedtls_entropy_update_seed_file( mbedtls_entropy_context *ctx, const char *path ) -{ - FILE *f; - size_t n; - unsigned char buf[ MBEDTLS_ENTROPY_MAX_SEED_SIZE ]; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR ); - - fseek( f, 0, SEEK_END ); - n = (size_t) ftell( f ); - fseek( f, 0, SEEK_SET ); - - if( n > MBEDTLS_ENTROPY_MAX_SEED_SIZE ) - n = MBEDTLS_ENTROPY_MAX_SEED_SIZE; - - if( fread( buf, 1, n, f ) != n ) - { - fclose( f ); - return( MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR ); - } - - fclose( f ); - - mbedtls_entropy_update_manual( ctx, buf, n ); - - return( mbedtls_entropy_write_seed_file( ctx, path ) ); -} -#endif /* MBEDTLS_FS_IO */ - -#if defined(MBEDTLS_SELF_TEST) -/* - * Dummy source function - */ -static int entropy_dummy_source( void *data, unsigned char *output, - size_t len, size_t *olen ) -{ - ((void) data); - - memset( output, 0x2a, len ); - *olen = len; - - return( 0 ); -} - -/* - * The actual entropy quality is hard to test, but we can at least - * test that the functions don't cause errors and write the correct - * amount of data to buffers. - */ -int mbedtls_entropy_self_test( int verbose ) -{ - int ret = 0; - mbedtls_entropy_context ctx; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; - unsigned char acc[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; - size_t i, j; - - if( verbose != 0 ) - mbedtls_printf( " ENTROPY test: " ); - - mbedtls_entropy_init( &ctx ); - - /* First do a gather to make sure we have default sources */ - if( ( ret = mbedtls_entropy_gather( &ctx ) ) != 0 ) - goto cleanup; - - ret = mbedtls_entropy_add_source( &ctx, entropy_dummy_source, NULL, 16, - MBEDTLS_ENTROPY_SOURCE_WEAK ); - if( ret != 0 ) - goto cleanup; - - if( ( ret = mbedtls_entropy_update_manual( &ctx, buf, sizeof buf ) ) != 0 ) - goto cleanup; - - /* - * To test that mbedtls_entropy_func writes correct number of bytes: - * - use the whole buffer and rely on ASan to detect overruns - * - collect entropy 8 times and OR the result in an accumulator: - * any byte should then be 0 with probably 2^(-64), so requiring - * each of the 32 or 64 bytes to be non-zero has a false failure rate - * of at most 2^(-58) which is acceptable. - */ - for( i = 0; i < 8; i++ ) - { - if( ( ret = mbedtls_entropy_func( &ctx, buf, sizeof( buf ) ) ) != 0 ) - goto cleanup; - - for( j = 0; j < sizeof( buf ); j++ ) - acc[j] |= buf[j]; - } - - for( j = 0; j < sizeof( buf ); j++ ) - { - if( acc[j] == 0 ) - { - ret = 1; - goto cleanup; - } - } - -cleanup: - mbedtls_entropy_free( &ctx ); - - if( verbose != 0 ) - { - if( ret != 0 ) - mbedtls_printf( "failed\n" ); - else - mbedtls_printf( "passed\n" ); - - mbedtls_printf( "\n" ); - } - - return( ret != 0 ); -} -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_ENTROPY_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/entropy_poll.c b/build/premake/premake5/contrib/mbedtls/library/entropy_poll.c deleted file mode 100644 index 25a27bef3e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/entropy_poll.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Platform-specific and custom entropy polling functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ENTROPY_C) - -#include "mbedtls/entropy.h" -#include "mbedtls/entropy_poll.h" - -#if defined(MBEDTLS_TIMING_C) -#include -#include "mbedtls/timing.h" -#endif -#if defined(MBEDTLS_HAVEGE_C) -#include "mbedtls/havege.h" -#endif - -#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) - -#if !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x0400 -#endif -#include -#include - -int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len, - size_t *olen ) -{ - HCRYPTPROV provider; - ((void) data); - *olen = 0; - - if( CryptAcquireContext( &provider, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) == FALSE ) - { - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - } - - if( CryptGenRandom( provider, (DWORD) len, output ) == FALSE ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - CryptReleaseContext( provider, 0 ); - *olen = len; - - return( 0 ); -} -#else /* _WIN32 && !EFIX64 && !EFI32 */ - -/* - * Test for Linux getrandom() support. - * Since there is no wrapper in the libc yet, use the generic syscall wrapper - * available in GNU libc and compatible libc's (eg uClibc). - */ -#if defined(__linux__) && defined(__GLIBC__) -#include -#include -#if defined(SYS_getrandom) -#define HAVE_GETRANDOM - -static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags ) -{ - /* MemSan cannot understand that the syscall writes to the buffer */ -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) - memset( buf, 0, buflen ); -#endif -#endif - - return( syscall( SYS_getrandom, buf, buflen, flags ) ); -} - -#include -/* Check if version is at least 3.17.0 */ -static int check_version_3_17_plus( void ) -{ - int minor; - struct utsname un; - const char *ver; - - /* Get version information */ - uname(&un); - ver = un.release; - - /* Check major version; assume a single digit */ - if( ver[0] < '3' || ver[0] > '9' || ver [1] != '.' ) - return( -1 ); - - if( ver[0] - '0' > 3 ) - return( 0 ); - - /* Ok, so now we know major == 3, check minor. - * Assume 1 or 2 digits. */ - if( ver[2] < '0' || ver[2] > '9' ) - return( -1 ); - - minor = ver[2] - '0'; - - if( ver[3] >= '0' && ver[3] <= '9' ) - minor = 10 * minor + ver[3] - '0'; - else if( ver [3] != '.' ) - return( -1 ); - - if( minor < 17 ) - return( -1 ); - - return( 0 ); -} -static int has_getrandom = -1; -#endif /* SYS_getrandom */ -#endif /* __linux__ */ - -#include - -int mbedtls_platform_entropy_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - FILE *file; - size_t read_len; - ((void) data); - -#if defined(HAVE_GETRANDOM) - if( has_getrandom == -1 ) - has_getrandom = ( check_version_3_17_plus() == 0 ); - - if( has_getrandom ) - { - int ret; - - if( ( ret = getrandom_wrapper( output, len, 0 ) ) < 0 ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - *olen = ret; - return( 0 ); - } -#endif /* HAVE_GETRANDOM */ - - *olen = 0; - - file = fopen( "/dev/urandom", "rb" ); - if( file == NULL ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - read_len = fread( output, 1, len, file ); - if( read_len != len ) - { - fclose( file ); - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - } - - fclose( file ); - *olen = len; - - return( 0 ); -} -#endif /* _WIN32 && !EFIX64 && !EFI32 */ -#endif /* !MBEDTLS_NO_PLATFORM_ENTROPY */ - -#if defined(MBEDTLS_TIMING_C) -int mbedtls_hardclock_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - unsigned long timer = mbedtls_timing_hardclock(); - ((void) data); - *olen = 0; - - if( len < sizeof(unsigned long) ) - return( 0 ); - - memcpy( output, &timer, sizeof(unsigned long) ); - *olen = sizeof(unsigned long); - - return( 0 ); -} -#endif /* MBEDTLS_TIMING_C */ - -#if defined(MBEDTLS_HAVEGE_C) -int mbedtls_havege_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - mbedtls_havege_state *hs = (mbedtls_havege_state *) data; - *olen = 0; - - if( mbedtls_havege_random( hs, output, len ) != 0 ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - *olen = len; - - return( 0 ); -} -#endif /* MBEDTLS_HAVEGE_C */ - -#endif /* MBEDTLS_ENTROPY_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/error.c b/build/premake/premake5/contrib/mbedtls/library/error.c deleted file mode 100644 index debda1d786..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/error.c +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Error message information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) -#include "mbedtls/error.h" -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_ERROR_C) - -#include - -#if defined(MBEDTLS_AES_C) -#include "mbedtls/aes.h" -#endif - -#if defined(MBEDTLS_BASE64_C) -#include "mbedtls/base64.h" -#endif - -#if defined(MBEDTLS_BIGNUM_C) -#include "mbedtls/bignum.h" -#endif - -#if defined(MBEDTLS_BLOWFISH_C) -#include "mbedtls/blowfish.h" -#endif - -#if defined(MBEDTLS_CAMELLIA_C) -#include "mbedtls/camellia.h" -#endif - -#if defined(MBEDTLS_CCM_C) -#include "mbedtls/ccm.h" -#endif - -#if defined(MBEDTLS_CIPHER_C) -#include "mbedtls/cipher.h" -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/ctr_drbg.h" -#endif - -#if defined(MBEDTLS_DES_C) -#include "mbedtls/des.h" -#endif - -#if defined(MBEDTLS_DHM_C) -#include "mbedtls/dhm.h" -#endif - -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif - -#if defined(MBEDTLS_ENTROPY_C) -#include "mbedtls/entropy.h" -#endif - -#if defined(MBEDTLS_GCM_C) -#include "mbedtls/gcm.h" -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) -#include "mbedtls/hmac_drbg.h" -#endif - -#if defined(MBEDTLS_MD_C) -#include "mbedtls/md.h" -#endif - -#if defined(MBEDTLS_NET_C) -#include "mbedtls/net.h" -#endif - -#if defined(MBEDTLS_OID_C) -#include "mbedtls/oid.h" -#endif - -#if defined(MBEDTLS_PADLOCK_C) -#include "mbedtls/padlock.h" -#endif - -#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PK_C) -#include "mbedtls/pk.h" -#endif - -#if defined(MBEDTLS_PKCS12_C) -#include "mbedtls/pkcs12.h" -#endif - -#if defined(MBEDTLS_PKCS5_C) -#include "mbedtls/pkcs5.h" -#endif - -#if defined(MBEDTLS_RSA_C) -#include "mbedtls/rsa.h" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) -#include "mbedtls/ssl.h" -#endif - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -#include "mbedtls/x509.h" -#endif - -#if defined(MBEDTLS_XTEA_C) -#include "mbedtls/xtea.h" -#endif - - -void mbedtls_strerror( int ret, char *buf, size_t buflen ) -{ - size_t len; - int use_ret; - - if( buflen == 0 ) - return; - - memset( buf, 0x00, buflen ); - - if( ret < 0 ) - ret = -ret; - - if( ret & 0xFF80 ) - { - use_ret = ret & 0xFF80; - - // High level error codes - // - // BEGIN generated code -#if defined(MBEDTLS_CIPHER_C) - if( use_ret == -(MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "CIPHER - The selected feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Failed to allocate memory" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_INVALID_PADDING) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Input data contains invalid padding and is rejected" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Decryption of block requires a full block" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_AUTH_FAILED) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Authentication failed (for AEAD modes)" ); -#endif /* MBEDTLS_CIPHER_C */ - -#if defined(MBEDTLS_DHM_C) - if( use_ret == -(MBEDTLS_ERR_DHM_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "DHM - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_DHM_READ_PARAMS_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Reading of the DHM parameters failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Making of the DHM parameters failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Reading of the public values failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Making of the public value failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_CALC_SECRET_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Calculation of the DHM secret failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "DHM - The ASN.1 data is not formatted correctly" ); - if( use_ret == -(MBEDTLS_ERR_DHM_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Allocation of memory failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "DHM - Read/write of file failed" ); -#endif /* MBEDTLS_DHM_C */ - -#if defined(MBEDTLS_ECP_C) - if( use_ret == -(MBEDTLS_ERR_ECP_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "ECP - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "ECP - The buffer is too small to write to" ); - if( use_ret == -(MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "ECP - Requested curve not available" ); - if( use_ret == -(MBEDTLS_ERR_ECP_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "ECP - The signature is not valid" ); - if( use_ret == -(MBEDTLS_ERR_ECP_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "ECP - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_ECP_RANDOM_FAILED) ) - mbedtls_snprintf( buf, buflen, "ECP - Generation of random value, such as (ephemeral) key, failed" ); - if( use_ret == -(MBEDTLS_ERR_ECP_INVALID_KEY) ) - mbedtls_snprintf( buf, buflen, "ECP - Invalid private or public key" ); - if( use_ret == -(MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "ECP - Signature is valid but shorter than the user-supplied length" ); -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_MD_C) - if( use_ret == -(MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "MD - The selected feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_MD_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "MD - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_MD_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "MD - Failed to allocate memory" ); - if( use_ret == -(MBEDTLS_ERR_MD_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "MD - Opening or reading of file failed" ); -#endif /* MBEDTLS_MD_C */ - -#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) - if( use_ret == -(MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT) ) - mbedtls_snprintf( buf, buflen, "PEM - No PEM header or footer found" ); - if( use_ret == -(MBEDTLS_ERR_PEM_INVALID_DATA) ) - mbedtls_snprintf( buf, buflen, "PEM - PEM string is not as expected" ); - if( use_ret == -(MBEDTLS_ERR_PEM_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "PEM - Failed to allocate memory" ); - if( use_ret == -(MBEDTLS_ERR_PEM_INVALID_ENC_IV) ) - mbedtls_snprintf( buf, buflen, "PEM - RSA IV is not in hex-format" ); - if( use_ret == -(MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG) ) - mbedtls_snprintf( buf, buflen, "PEM - Unsupported key encryption algorithm" ); - if( use_ret == -(MBEDTLS_ERR_PEM_PASSWORD_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "PEM - Private key password can't be empty" ); - if( use_ret == -(MBEDTLS_ERR_PEM_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PEM - Given private key password does not allow for correct decryption" ); - if( use_ret == -(MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PEM - Unavailable feature, e.g. hashing/encryption combination" ); - if( use_ret == -(MBEDTLS_ERR_PEM_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PEM - Bad input parameters to function" ); -#endif /* MBEDTLS_PEM_PARSE_C || MBEDTLS_PEM_WRITE_C */ - -#if defined(MBEDTLS_PK_C) - if( use_ret == -(MBEDTLS_ERR_PK_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "PK - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_PK_TYPE_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PK - Type mismatch, eg attempt to encrypt with an ECDSA key" ); - if( use_ret == -(MBEDTLS_ERR_PK_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PK - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_PK_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "PK - Read/write of file failed" ); - if( use_ret == -(MBEDTLS_ERR_PK_KEY_INVALID_VERSION) ) - mbedtls_snprintf( buf, buflen, "PK - Unsupported key version" ); - if( use_ret == -(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "PK - Invalid key tag or value" ); - if( use_ret == -(MBEDTLS_ERR_PK_UNKNOWN_PK_ALG) ) - mbedtls_snprintf( buf, buflen, "PK - Key algorithm is unsupported (only RSA and EC are supported)" ); - if( use_ret == -(MBEDTLS_ERR_PK_PASSWORD_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "PK - Private key password can't be empty" ); - if( use_ret == -(MBEDTLS_ERR_PK_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PK - Given private key password does not allow for correct decryption" ); - if( use_ret == -(MBEDTLS_ERR_PK_INVALID_PUBKEY) ) - mbedtls_snprintf( buf, buflen, "PK - The pubkey tag or value is invalid (only RSA and EC are supported)" ); - if( use_ret == -(MBEDTLS_ERR_PK_INVALID_ALG) ) - mbedtls_snprintf( buf, buflen, "PK - The algorithm tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE) ) - mbedtls_snprintf( buf, buflen, "PK - Elliptic curve is unsupported (only NIST curves are supported)" ); - if( use_ret == -(MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PK - Unavailable feature, e.g. RSA disabled for RSA key" ); - if( use_ret == -(MBEDTLS_ERR_PK_SIG_LEN_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PK - The signature is valid but its length is less than expected" ); -#endif /* MBEDTLS_PK_C */ - -#if defined(MBEDTLS_PKCS12_C) - if( use_ret == -(MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - Feature not available, e.g. unsupported encryption scheme" ); - if( use_ret == -(MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - PBE ASN.1 data not as expected" ); - if( use_ret == -(MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - Given private key password does not allow for correct decryption" ); -#endif /* MBEDTLS_PKCS12_C */ - -#if defined(MBEDTLS_PKCS5_C) - if( use_ret == -(MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_PKCS5_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Unexpected ASN.1 data" ); - if( use_ret == -(MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Requested encryption or digest alg not available" ); - if( use_ret == -(MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Given private key password does not allow for correct decryption" ); -#endif /* MBEDTLS_PKCS5_C */ - -#if defined(MBEDTLS_RSA_C) - if( use_ret == -(MBEDTLS_ERR_RSA_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "RSA - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_RSA_INVALID_PADDING) ) - mbedtls_snprintf( buf, buflen, "RSA - Input data contains invalid padding and is rejected" ); - if( use_ret == -(MBEDTLS_ERR_RSA_KEY_GEN_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - Something failed during generation of a key" ); - if( use_ret == -(MBEDTLS_ERR_RSA_KEY_CHECK_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - Key failed to pass the library's validity check" ); - if( use_ret == -(MBEDTLS_ERR_RSA_PUBLIC_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The public key operation failed" ); - if( use_ret == -(MBEDTLS_ERR_RSA_PRIVATE_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The private key operation failed" ); - if( use_ret == -(MBEDTLS_ERR_RSA_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The PKCS#1 verification failed" ); - if( use_ret == -(MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE) ) - mbedtls_snprintf( buf, buflen, "RSA - The output buffer for decryption is not large enough" ); - if( use_ret == -(MBEDTLS_ERR_RSA_RNG_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The random generator failed to generate non-zeros" ); -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_SSL_TLS_C) - if( use_ret == -(MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "SSL - The requested feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "SSL - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INVALID_MAC) ) - mbedtls_snprintf( buf, buflen, "SSL - Verification of the message MAC failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INVALID_RECORD) ) - mbedtls_snprintf( buf, buflen, "SSL - An invalid SSL record was received" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CONN_EOF) ) - mbedtls_snprintf( buf, buflen, "SSL - The connection indicated an EOF" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNKNOWN_CIPHER) ) - mbedtls_snprintf( buf, buflen, "SSL - An unknown cipher was received" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN) ) - mbedtls_snprintf( buf, buflen, "SSL - The server has no ciphersuites in common with the client" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_RNG) ) - mbedtls_snprintf( buf, buflen, "SSL - No RNG was provided to the SSL module" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE) ) - mbedtls_snprintf( buf, buflen, "SSL - No client certification received from the client, but required by the authentication mode" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE) ) - mbedtls_snprintf( buf, buflen, "SSL - Our own certificate(s) is/are too large to send in an SSL message" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - The own certificate is not set, but needed by the server" ); - if( use_ret == -(MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - The own private key or pre-shared key is not set, but needed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - No CA Chain is set, but required to operate" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE) ) - mbedtls_snprintf( buf, buflen, "SSL - An unexpected message was received from our peer" ); - if( use_ret == -(MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE) ) - { - mbedtls_snprintf( buf, buflen, "SSL - A fatal alert message was received from our peer" ); - return; - } - if( use_ret == -(MBEDTLS_ERR_SSL_PEER_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Verification of our peer failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) ) - mbedtls_snprintf( buf, buflen, "SSL - The peer notified us that the connection is going to be closed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientHello handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ServerHello handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the Certificate handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the CertificateRequest handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ServerKeyExchange handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO_DONE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ServerHelloDone handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientKeyExchange handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Read Public" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Calculate Secret" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the CertificateVerify handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ChangeCipherSpec handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_FINISHED) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the Finished handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_HW_ACCEL_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Hardware acceleration function returned with error" ); - if( use_ret == -(MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH) ) - mbedtls_snprintf( buf, buflen, "SSL - Hardware acceleration function skipped / left alone data" ); - if( use_ret == -(MBEDTLS_ERR_SSL_COMPRESSION_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the compression / decompression failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION) ) - mbedtls_snprintf( buf, buflen, "SSL - Handshake protocol not within min/max boundaries" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the NewSessionTicket handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - Session ticket has expired" ); - if( use_ret == -(MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "SSL - Public key type mismatch (eg, asked for RSA key exchange and presented EC key)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY) ) - mbedtls_snprintf( buf, buflen, "SSL - Unknown identity received (eg, PSK identity)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INTERNAL_ERROR) ) - mbedtls_snprintf( buf, buflen, "SSL - Internal error (eg, unexpected failure in lower-level module)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_COUNTER_WRAPPING) ) - mbedtls_snprintf( buf, buflen, "SSL - A counter would wrap (eg, too many messages exchanged)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO) ) - mbedtls_snprintf( buf, buflen, "SSL - Unexpected message at ServerHello in renegotiation" ); - if( use_ret == -(MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - DTLS client must retry for hello verification" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "SSL - A buffer is too small to receive or write a message" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE) ) - mbedtls_snprintf( buf, buflen, "SSL - None of the common ciphersuites is usable (eg, no suitable certificate, see debug messages)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_WANT_READ) ) - mbedtls_snprintf( buf, buflen, "SSL - Connection requires a read call" ); - if( use_ret == -(MBEDTLS_ERR_SSL_WANT_WRITE) ) - mbedtls_snprintf( buf, buflen, "SSL - Connection requires a write call" ); - if( use_ret == -(MBEDTLS_ERR_SSL_TIMEOUT) ) - mbedtls_snprintf( buf, buflen, "SSL - The operation timed out" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CLIENT_RECONNECT) ) - mbedtls_snprintf( buf, buflen, "SSL - The client initiated a reconnect from the same port" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNEXPECTED_RECORD) ) - mbedtls_snprintf( buf, buflen, "SSL - Record header looks valid but is not expected" ); -#endif /* MBEDTLS_SSL_TLS_C */ - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) - if( use_ret == -(MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "X509 - Unavailable feature, e.g. RSA hashing/encryption combination" ); - if( use_ret == -(MBEDTLS_ERR_X509_UNKNOWN_OID) ) - mbedtls_snprintf( buf, buflen, "X509 - Requested OID is unknown" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "X509 - The CRT/CRL/CSR format is invalid, e.g. different type expected" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_VERSION) ) - mbedtls_snprintf( buf, buflen, "X509 - The CRT/CRL/CSR version element is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_SERIAL) ) - mbedtls_snprintf( buf, buflen, "X509 - The serial tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_ALG) ) - mbedtls_snprintf( buf, buflen, "X509 - The algorithm tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_NAME) ) - mbedtls_snprintf( buf, buflen, "X509 - The name tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_DATE) ) - mbedtls_snprintf( buf, buflen, "X509 - The date tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_SIGNATURE) ) - mbedtls_snprintf( buf, buflen, "X509 - The signature tag or value invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_EXTENSIONS) ) - mbedtls_snprintf( buf, buflen, "X509 - The extension tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_UNKNOWN_VERSION) ) - mbedtls_snprintf( buf, buflen, "X509 - CRT/CRL/CSR has an unsupported version number" ); - if( use_ret == -(MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG) ) - mbedtls_snprintf( buf, buflen, "X509 - Signature algorithm (oid) is unsupported" ); - if( use_ret == -(MBEDTLS_ERR_X509_SIG_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "X509 - Signature algorithms do not match. (see \\c ::mbedtls_x509_crt sig_oid)" ); - if( use_ret == -(MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "X509 - Certificate verification failed, e.g. CRL, CA or signature check failed" ); - if( use_ret == -(MBEDTLS_ERR_X509_CERT_UNKNOWN_FORMAT) ) - mbedtls_snprintf( buf, buflen, "X509 - Format not recognized as DER or PEM" ); - if( use_ret == -(MBEDTLS_ERR_X509_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "X509 - Input invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "X509 - Allocation of memory failed" ); - if( use_ret == -(MBEDTLS_ERR_X509_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "X509 - Read/write of file failed" ); - if( use_ret == -(MBEDTLS_ERR_X509_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "X509 - Destination buffer is too small" ); -#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */ - // END generated code - - if( strlen( buf ) == 0 ) - mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); - } - - use_ret = ret & ~0xFF80; - - if( use_ret == 0 ) - return; - - // If high level code is present, make a concatenation between both - // error strings. - // - len = strlen( buf ); - - if( len > 0 ) - { - if( buflen - len < 5 ) - return; - - mbedtls_snprintf( buf + len, buflen - len, " : " ); - - buf += len + 3; - buflen -= len + 3; - } - - // Low level error codes - // - // BEGIN generated code -#if defined(MBEDTLS_AES_C) - if( use_ret == -(MBEDTLS_ERR_AES_INVALID_KEY_LENGTH) ) - mbedtls_snprintf( buf, buflen, "AES - Invalid key length" ); - if( use_ret == -(MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "AES - Invalid data input length" ); -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_ASN1_PARSE_C) - if( use_ret == -(MBEDTLS_ERR_ASN1_OUT_OF_DATA) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Out of data when parsing an ASN1 data structure" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) ) - mbedtls_snprintf( buf, buflen, "ASN1 - ASN1 tag was of an unexpected value" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_INVALID_LENGTH) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Error when trying to determine the length or invalid length" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_LENGTH_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Actual length differs from expected length" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_INVALID_DATA) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Data is invalid. (not used)" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_BUF_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Buffer too small when writing ASN.1 data structure" ); -#endif /* MBEDTLS_ASN1_PARSE_C */ - -#if defined(MBEDTLS_BASE64_C) - if( use_ret == -(MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "BASE64 - Output buffer too small" ); - if( use_ret == -(MBEDTLS_ERR_BASE64_INVALID_CHARACTER) ) - mbedtls_snprintf( buf, buflen, "BASE64 - Invalid character in input" ); -#endif /* MBEDTLS_BASE64_C */ - -#if defined(MBEDTLS_BIGNUM_C) - if( use_ret == -(MBEDTLS_ERR_MPI_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - An error occurred while reading from or writing to a file" ); - if( use_ret == -(MBEDTLS_ERR_MPI_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_MPI_INVALID_CHARACTER) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - There is an invalid character in the digit string" ); - if( use_ret == -(MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The buffer is too small to write to" ); - if( use_ret == -(MBEDTLS_ERR_MPI_NEGATIVE_VALUE) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The input arguments are negative or result in illegal output" ); - if( use_ret == -(MBEDTLS_ERR_MPI_DIVISION_BY_ZERO) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The input argument for division is zero, which is not allowed" ); - if( use_ret == -(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The input arguments are not acceptable" ); - if( use_ret == -(MBEDTLS_ERR_MPI_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - Memory allocation failed" ); -#endif /* MBEDTLS_BIGNUM_C */ - -#if defined(MBEDTLS_BLOWFISH_C) - if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH) ) - mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid key length" ); - if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid data input length" ); -#endif /* MBEDTLS_BLOWFISH_C */ - -#if defined(MBEDTLS_CAMELLIA_C) - if( use_ret == -(MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH) ) - mbedtls_snprintf( buf, buflen, "CAMELLIA - Invalid key length" ); - if( use_ret == -(MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "CAMELLIA - Invalid data input length" ); -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_CCM_C) - if( use_ret == -(MBEDTLS_ERR_CCM_BAD_INPUT) ) - mbedtls_snprintf( buf, buflen, "CCM - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_CCM_AUTH_FAILED) ) - mbedtls_snprintf( buf, buflen, "CCM - Authenticated decryption failed" ); -#endif /* MBEDTLS_CCM_C */ - -#if defined(MBEDTLS_CTR_DRBG_C) - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - The entropy source failed" ); - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - Too many random requested in single call" ); - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - Input too large (Entropy + additional)" ); - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - Read/write error in file" ); -#endif /* MBEDTLS_CTR_DRBG_C */ - -#if defined(MBEDTLS_DES_C) - if( use_ret == -(MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "DES - The data input has an invalid length" ); -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ENTROPY_C) - if( use_ret == -(MBEDTLS_ERR_ENTROPY_SOURCE_FAILED) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - Critical entropy source failure" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_MAX_SOURCES) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - No more sources can be added" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - No sources have been added to poll" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_NO_STRONG_SOURCE) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - No strong sources have been added to poll" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - Read/write error in file" ); -#endif /* MBEDTLS_ENTROPY_C */ - -#if defined(MBEDTLS_GCM_C) - if( use_ret == -(MBEDTLS_ERR_GCM_AUTH_FAILED) ) - mbedtls_snprintf( buf, buflen, "GCM - Authenticated decryption failed" ); - if( use_ret == -(MBEDTLS_ERR_GCM_BAD_INPUT) ) - mbedtls_snprintf( buf, buflen, "GCM - Bad input parameters to function" ); -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_HMAC_DRBG_C) - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - Too many random requested in single call" ); - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - Input too large (Entropy + additional)" ); - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - Read/write error in file" ); - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - The entropy source failed" ); -#endif /* MBEDTLS_HMAC_DRBG_C */ - -#if defined(MBEDTLS_NET_C) - if( use_ret == -(MBEDTLS_ERR_NET_SOCKET_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Failed to open a socket" ); - if( use_ret == -(MBEDTLS_ERR_NET_CONNECT_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - The connection to the given server / port failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_BIND_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Binding of the socket failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_LISTEN_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Could not listen on the socket" ); - if( use_ret == -(MBEDTLS_ERR_NET_ACCEPT_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Could not accept the incoming connection" ); - if( use_ret == -(MBEDTLS_ERR_NET_RECV_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Reading information from the socket failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_SEND_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Sending information through the socket failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_CONN_RESET) ) - mbedtls_snprintf( buf, buflen, "NET - Connection was reset by peer" ); - if( use_ret == -(MBEDTLS_ERR_NET_UNKNOWN_HOST) ) - mbedtls_snprintf( buf, buflen, "NET - Failed to get an IP address for the given hostname" ); - if( use_ret == -(MBEDTLS_ERR_NET_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "NET - Buffer is too small to hold the data" ); - if( use_ret == -(MBEDTLS_ERR_NET_INVALID_CONTEXT) ) - mbedtls_snprintf( buf, buflen, "NET - The context is invalid, eg because it was free()ed" ); -#endif /* MBEDTLS_NET_C */ - -#if defined(MBEDTLS_OID_C) - if( use_ret == -(MBEDTLS_ERR_OID_NOT_FOUND) ) - mbedtls_snprintf( buf, buflen, "OID - OID is not found" ); - if( use_ret == -(MBEDTLS_ERR_OID_BUF_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "OID - output buffer is too small" ); -#endif /* MBEDTLS_OID_C */ - -#if defined(MBEDTLS_PADLOCK_C) - if( use_ret == -(MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED) ) - mbedtls_snprintf( buf, buflen, "PADLOCK - Input data should be aligned" ); -#endif /* MBEDTLS_PADLOCK_C */ - -#if defined(MBEDTLS_THREADING_C) - if( use_ret == -(MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "THREADING - The selected feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_THREADING_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "THREADING - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_THREADING_MUTEX_ERROR) ) - mbedtls_snprintf( buf, buflen, "THREADING - Locking / unlocking / free failed with error code" ); -#endif /* MBEDTLS_THREADING_C */ - -#if defined(MBEDTLS_XTEA_C) - if( use_ret == -(MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "XTEA - The data input has an invalid length" ); -#endif /* MBEDTLS_XTEA_C */ - // END generated code - - if( strlen( buf ) != 0 ) - return; - - mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); -} - -#else /* MBEDTLS_ERROR_C */ - -#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) - -/* - * Provide an non-function in case MBEDTLS_ERROR_C is not defined - */ -void mbedtls_strerror( int ret, char *buf, size_t buflen ) -{ - ((void) ret); - - if( buflen > 0 ) - buf[0] = '\0'; -} - -#endif /* MBEDTLS_ERROR_STRERROR_DUMMY */ - -#endif /* MBEDTLS_ERROR_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/gcm.c b/build/premake/premake5/contrib/mbedtls/library/gcm.c deleted file mode 100644 index aaacf97d61..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/gcm.c +++ /dev/null @@ -1,953 +0,0 @@ -/* - * NIST SP800-38D compliant GCM implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf - * - * See also: - * [MGV] http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-revised-spec.pdf - * - * We use the algorithm described as Shoup's method with 4-bit tables in - * [MGV] 4.1, pp. 12-13, to enhance speed without using too much memory. - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_GCM_C) - -#include "mbedtls/gcm.h" - -#include - -#if defined(MBEDTLS_AESNI_C) -#include "mbedtls/aesni.h" -#endif - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Initialize a context - */ -void mbedtls_gcm_init( mbedtls_gcm_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_gcm_context ) ); -} - -/* - * Precompute small multiples of H, that is set - * HH[i] || HL[i] = H times i, - * where i is seen as a field element as in [MGV], ie high-order bits - * correspond to low powers of P. The result is stored in the same way, that - * is the high-order bit of HH corresponds to P^0 and the low-order bit of HL - * corresponds to P^127. - */ -static int gcm_gen_table( mbedtls_gcm_context *ctx ) -{ - int ret, i, j; - uint64_t hi, lo; - uint64_t vl, vh; - unsigned char h[16]; - size_t olen = 0; - - memset( h, 0, 16 ); - if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 ) - return( ret ); - - /* pack h as two 64-bits ints, big-endian */ - GET_UINT32_BE( hi, h, 0 ); - GET_UINT32_BE( lo, h, 4 ); - vh = (uint64_t) hi << 32 | lo; - - GET_UINT32_BE( hi, h, 8 ); - GET_UINT32_BE( lo, h, 12 ); - vl = (uint64_t) hi << 32 | lo; - - /* 8 = 1000 corresponds to 1 in GF(2^128) */ - ctx->HL[8] = vl; - ctx->HH[8] = vh; - -#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64) - /* With CLMUL support, we need only h, not the rest of the table */ - if( mbedtls_aesni_has_support( MBEDTLS_AESNI_CLMUL ) ) - return( 0 ); -#endif - - /* 0 corresponds to 0 in GF(2^128) */ - ctx->HH[0] = 0; - ctx->HL[0] = 0; - - for( i = 4; i > 0; i >>= 1 ) - { - uint32_t T = ( vl & 1 ) * 0xe1000000U; - vl = ( vh << 63 ) | ( vl >> 1 ); - vh = ( vh >> 1 ) ^ ( (uint64_t) T << 32); - - ctx->HL[i] = vl; - ctx->HH[i] = vh; - } - - for( i = 2; i <= 8; i *= 2 ) - { - uint64_t *HiL = ctx->HL + i, *HiH = ctx->HH + i; - vh = *HiH; - vl = *HiL; - for( j = 1; j < i; j++ ) - { - HiH[j] = vh ^ ctx->HH[j]; - HiL[j] = vl ^ ctx->HL[j]; - } - } - - return( 0 ); -} - -int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx, - mbedtls_cipher_id_t cipher, - const unsigned char *key, - unsigned int keybits ) -{ - int ret; - const mbedtls_cipher_info_t *cipher_info; - - cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, MBEDTLS_MODE_ECB ); - if( cipher_info == NULL ) - return( MBEDTLS_ERR_GCM_BAD_INPUT ); - - if( cipher_info->block_size != 16 ) - return( MBEDTLS_ERR_GCM_BAD_INPUT ); - - mbedtls_cipher_free( &ctx->cipher_ctx ); - - if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, - MBEDTLS_ENCRYPT ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = gcm_gen_table( ctx ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -/* - * Shoup's method for multiplication use this table with - * last4[x] = x times P^128 - * where x and last4[x] are seen as elements of GF(2^128) as in [MGV] - */ -static const uint64_t last4[16] = -{ - 0x0000, 0x1c20, 0x3840, 0x2460, - 0x7080, 0x6ca0, 0x48c0, 0x54e0, - 0xe100, 0xfd20, 0xd940, 0xc560, - 0x9180, 0x8da0, 0xa9c0, 0xb5e0 -}; - -/* - * Sets output to x times H using the precomputed tables. - * x and output are seen as elements of GF(2^128) as in [MGV]. - */ -static void gcm_mult( mbedtls_gcm_context *ctx, const unsigned char x[16], - unsigned char output[16] ) -{ - int i = 0; - unsigned char lo, hi, rem; - uint64_t zh, zl; - -#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64) - if( mbedtls_aesni_has_support( MBEDTLS_AESNI_CLMUL ) ) { - unsigned char h[16]; - - PUT_UINT32_BE( ctx->HH[8] >> 32, h, 0 ); - PUT_UINT32_BE( ctx->HH[8], h, 4 ); - PUT_UINT32_BE( ctx->HL[8] >> 32, h, 8 ); - PUT_UINT32_BE( ctx->HL[8], h, 12 ); - - mbedtls_aesni_gcm_mult( output, x, h ); - return; - } -#endif /* MBEDTLS_AESNI_C && MBEDTLS_HAVE_X86_64 */ - - lo = x[15] & 0xf; - - zh = ctx->HH[lo]; - zl = ctx->HL[lo]; - - for( i = 15; i >= 0; i-- ) - { - lo = x[i] & 0xf; - hi = x[i] >> 4; - - if( i != 15 ) - { - rem = (unsigned char) zl & 0xf; - zl = ( zh << 60 ) | ( zl >> 4 ); - zh = ( zh >> 4 ); - zh ^= (uint64_t) last4[rem] << 48; - zh ^= ctx->HH[lo]; - zl ^= ctx->HL[lo]; - - } - - rem = (unsigned char) zl & 0xf; - zl = ( zh << 60 ) | ( zl >> 4 ); - zh = ( zh >> 4 ); - zh ^= (uint64_t) last4[rem] << 48; - zh ^= ctx->HH[hi]; - zl ^= ctx->HL[hi]; - } - - PUT_UINT32_BE( zh >> 32, output, 0 ); - PUT_UINT32_BE( zh, output, 4 ); - PUT_UINT32_BE( zl >> 32, output, 8 ); - PUT_UINT32_BE( zl, output, 12 ); -} - -int mbedtls_gcm_starts( mbedtls_gcm_context *ctx, - int mode, - const unsigned char *iv, - size_t iv_len, - const unsigned char *add, - size_t add_len ) -{ - int ret; - unsigned char work_buf[16]; - size_t i; - const unsigned char *p; - size_t use_len, olen = 0; - - /* IV and AD are limited to 2^64 bits, so 2^61 bytes */ - if( ( (uint64_t) iv_len ) >> 61 != 0 || - ( (uint64_t) add_len ) >> 61 != 0 ) - { - return( MBEDTLS_ERR_GCM_BAD_INPUT ); - } - - memset( ctx->y, 0x00, sizeof(ctx->y) ); - memset( ctx->buf, 0x00, sizeof(ctx->buf) ); - - ctx->mode = mode; - ctx->len = 0; - ctx->add_len = 0; - - if( iv_len == 12 ) - { - memcpy( ctx->y, iv, iv_len ); - ctx->y[15] = 1; - } - else - { - memset( work_buf, 0x00, 16 ); - PUT_UINT32_BE( iv_len * 8, work_buf, 12 ); - - p = iv; - while( iv_len > 0 ) - { - use_len = ( iv_len < 16 ) ? iv_len : 16; - - for( i = 0; i < use_len; i++ ) - ctx->y[i] ^= p[i]; - - gcm_mult( ctx, ctx->y, ctx->y ); - - iv_len -= use_len; - p += use_len; - } - - for( i = 0; i < 16; i++ ) - ctx->y[i] ^= work_buf[i]; - - gcm_mult( ctx, ctx->y, ctx->y ); - } - - if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->base_ectr, - &olen ) ) != 0 ) - { - return( ret ); - } - - ctx->add_len = add_len; - p = add; - while( add_len > 0 ) - { - use_len = ( add_len < 16 ) ? add_len : 16; - - for( i = 0; i < use_len; i++ ) - ctx->buf[i] ^= p[i]; - - gcm_mult( ctx, ctx->buf, ctx->buf ); - - add_len -= use_len; - p += use_len; - } - - return( 0 ); -} - -int mbedtls_gcm_update( mbedtls_gcm_context *ctx, - size_t length, - const unsigned char *input, - unsigned char *output ) -{ - int ret; - unsigned char ectr[16]; - size_t i; - const unsigned char *p; - unsigned char *out_p = output; - size_t use_len, olen = 0; - - if( output > input && (size_t) ( output - input ) < length ) - return( MBEDTLS_ERR_GCM_BAD_INPUT ); - - /* Total length is restricted to 2^39 - 256 bits, ie 2^36 - 2^5 bytes - * Also check for possible overflow */ - if( ctx->len + length < ctx->len || - (uint64_t) ctx->len + length > 0xFFFFFFFE0ull ) - { - return( MBEDTLS_ERR_GCM_BAD_INPUT ); - } - - ctx->len += length; - - p = input; - while( length > 0 ) - { - use_len = ( length < 16 ) ? length : 16; - - for( i = 16; i > 12; i-- ) - if( ++ctx->y[i - 1] != 0 ) - break; - - if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ectr, - &olen ) ) != 0 ) - { - return( ret ); - } - - for( i = 0; i < use_len; i++ ) - { - if( ctx->mode == MBEDTLS_GCM_DECRYPT ) - ctx->buf[i] ^= p[i]; - out_p[i] = ectr[i] ^ p[i]; - if( ctx->mode == MBEDTLS_GCM_ENCRYPT ) - ctx->buf[i] ^= out_p[i]; - } - - gcm_mult( ctx, ctx->buf, ctx->buf ); - - length -= use_len; - p += use_len; - out_p += use_len; - } - - return( 0 ); -} - -int mbedtls_gcm_finish( mbedtls_gcm_context *ctx, - unsigned char *tag, - size_t tag_len ) -{ - unsigned char work_buf[16]; - size_t i; - uint64_t orig_len = ctx->len * 8; - uint64_t orig_add_len = ctx->add_len * 8; - - if( tag_len > 16 || tag_len < 4 ) - return( MBEDTLS_ERR_GCM_BAD_INPUT ); - - if( tag_len != 0 ) - memcpy( tag, ctx->base_ectr, tag_len ); - - if( orig_len || orig_add_len ) - { - memset( work_buf, 0x00, 16 ); - - PUT_UINT32_BE( ( orig_add_len >> 32 ), work_buf, 0 ); - PUT_UINT32_BE( ( orig_add_len ), work_buf, 4 ); - PUT_UINT32_BE( ( orig_len >> 32 ), work_buf, 8 ); - PUT_UINT32_BE( ( orig_len ), work_buf, 12 ); - - for( i = 0; i < 16; i++ ) - ctx->buf[i] ^= work_buf[i]; - - gcm_mult( ctx, ctx->buf, ctx->buf ); - - for( i = 0; i < tag_len; i++ ) - tag[i] ^= ctx->buf[i]; - } - - return( 0 ); -} - -int mbedtls_gcm_crypt_and_tag( mbedtls_gcm_context *ctx, - int mode, - size_t length, - const unsigned char *iv, - size_t iv_len, - const unsigned char *add, - size_t add_len, - const unsigned char *input, - unsigned char *output, - size_t tag_len, - unsigned char *tag ) -{ - int ret; - - if( ( ret = mbedtls_gcm_starts( ctx, mode, iv, iv_len, add, add_len ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_gcm_update( ctx, length, input, output ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_gcm_finish( ctx, tag, tag_len ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx, - size_t length, - const unsigned char *iv, - size_t iv_len, - const unsigned char *add, - size_t add_len, - const unsigned char *tag, - size_t tag_len, - const unsigned char *input, - unsigned char *output ) -{ - int ret; - unsigned char check_tag[16]; - size_t i; - int diff; - - if( ( ret = mbedtls_gcm_crypt_and_tag( ctx, MBEDTLS_GCM_DECRYPT, length, - iv, iv_len, add, add_len, - input, output, tag_len, check_tag ) ) != 0 ) - { - return( ret ); - } - - /* Check tag in "constant-time" */ - for( diff = 0, i = 0; i < tag_len; i++ ) - diff |= tag[i] ^ check_tag[i]; - - if( diff != 0 ) - { - mbedtls_zeroize( output, length ); - return( MBEDTLS_ERR_GCM_AUTH_FAILED ); - } - - return( 0 ); -} - -void mbedtls_gcm_free( mbedtls_gcm_context *ctx ) -{ - mbedtls_cipher_free( &ctx->cipher_ctx ); - mbedtls_zeroize( ctx, sizeof( mbedtls_gcm_context ) ); -} - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -/* - * AES-GCM test vectors from: - * - * http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip - */ -#define MAX_TESTS 6 - -static const int key_index[MAX_TESTS] = - { 0, 0, 1, 1, 1, 1 }; - -static const unsigned char key[MAX_TESTS][32] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, - 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, -}; - -static const size_t iv_len[MAX_TESTS] = - { 12, 12, 12, 12, 8, 60 }; - -static const int iv_index[MAX_TESTS] = - { 0, 0, 1, 1, 1, 2 }; - -static const unsigned char iv[MAX_TESTS][64] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }, - { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, - 0xde, 0xca, 0xf8, 0x88 }, - { 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5, - 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa, - 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1, - 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28, - 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39, - 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54, - 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57, - 0xa6, 0x37, 0xb3, 0x9b }, -}; - -static const size_t add_len[MAX_TESTS] = - { 0, 0, 0, 20, 20, 20 }; - -static const int add_index[MAX_TESTS] = - { 0, 0, 0, 1, 1, 1 }; - -static const unsigned char additional[MAX_TESTS][64] = -{ - { 0x00 }, - { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xab, 0xad, 0xda, 0xd2 }, -}; - -static const size_t pt_len[MAX_TESTS] = - { 0, 16, 64, 60, 60, 60 }; - -static const int pt_index[MAX_TESTS] = - { 0, 0, 1, 1, 1, 1 }; - -static const unsigned char pt[MAX_TESTS][64] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, - 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, -}; - -static const unsigned char ct[MAX_TESTS * 3][64] = -{ - { 0x00 }, - { 0x03, 0x88, 0xda, 0xce, 0x60, 0xb6, 0xa3, 0x92, - 0xf3, 0x28, 0xc2, 0xb9, 0x71, 0xb2, 0xfe, 0x78 }, - { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, - 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, - 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, - 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, - 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, - 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, - 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, - 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85 }, - { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, - 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, - 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, - 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, - 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, - 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, - 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, - 0x3d, 0x58, 0xe0, 0x91 }, - { 0x61, 0x35, 0x3b, 0x4c, 0x28, 0x06, 0x93, 0x4a, - 0x77, 0x7f, 0xf5, 0x1f, 0xa2, 0x2a, 0x47, 0x55, - 0x69, 0x9b, 0x2a, 0x71, 0x4f, 0xcd, 0xc6, 0xf8, - 0x37, 0x66, 0xe5, 0xf9, 0x7b, 0x6c, 0x74, 0x23, - 0x73, 0x80, 0x69, 0x00, 0xe4, 0x9f, 0x24, 0xb2, - 0x2b, 0x09, 0x75, 0x44, 0xd4, 0x89, 0x6b, 0x42, - 0x49, 0x89, 0xb5, 0xe1, 0xeb, 0xac, 0x0f, 0x07, - 0xc2, 0x3f, 0x45, 0x98 }, - { 0x8c, 0xe2, 0x49, 0x98, 0x62, 0x56, 0x15, 0xb6, - 0x03, 0xa0, 0x33, 0xac, 0xa1, 0x3f, 0xb8, 0x94, - 0xbe, 0x91, 0x12, 0xa5, 0xc3, 0xa2, 0x11, 0xa8, - 0xba, 0x26, 0x2a, 0x3c, 0xca, 0x7e, 0x2c, 0xa7, - 0x01, 0xe4, 0xa9, 0xa4, 0xfb, 0xa4, 0x3c, 0x90, - 0xcc, 0xdc, 0xb2, 0x81, 0xd4, 0x8c, 0x7c, 0x6f, - 0xd6, 0x28, 0x75, 0xd2, 0xac, 0xa4, 0x17, 0x03, - 0x4c, 0x34, 0xae, 0xe5 }, - { 0x00 }, - { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, - 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00 }, - { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, - 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, - 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, - 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, - 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, - 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, - 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, - 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56 }, - { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, - 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, - 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, - 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, - 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, - 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, - 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, - 0xcc, 0xda, 0x27, 0x10 }, - { 0x0f, 0x10, 0xf5, 0x99, 0xae, 0x14, 0xa1, 0x54, - 0xed, 0x24, 0xb3, 0x6e, 0x25, 0x32, 0x4d, 0xb8, - 0xc5, 0x66, 0x63, 0x2e, 0xf2, 0xbb, 0xb3, 0x4f, - 0x83, 0x47, 0x28, 0x0f, 0xc4, 0x50, 0x70, 0x57, - 0xfd, 0xdc, 0x29, 0xdf, 0x9a, 0x47, 0x1f, 0x75, - 0xc6, 0x65, 0x41, 0xd4, 0xd4, 0xda, 0xd1, 0xc9, - 0xe9, 0x3a, 0x19, 0xa5, 0x8e, 0x8b, 0x47, 0x3f, - 0xa0, 0xf0, 0x62, 0xf7 }, - { 0xd2, 0x7e, 0x88, 0x68, 0x1c, 0xe3, 0x24, 0x3c, - 0x48, 0x30, 0x16, 0x5a, 0x8f, 0xdc, 0xf9, 0xff, - 0x1d, 0xe9, 0xa1, 0xd8, 0xe6, 0xb4, 0x47, 0xef, - 0x6e, 0xf7, 0xb7, 0x98, 0x28, 0x66, 0x6e, 0x45, - 0x81, 0xe7, 0x90, 0x12, 0xaf, 0x34, 0xdd, 0xd9, - 0xe2, 0xf0, 0x37, 0x58, 0x9b, 0x29, 0x2d, 0xb3, - 0xe6, 0x7c, 0x03, 0x67, 0x45, 0xfa, 0x22, 0xe7, - 0xe9, 0xb7, 0x37, 0x3b }, - { 0x00 }, - { 0xce, 0xa7, 0x40, 0x3d, 0x4d, 0x60, 0x6b, 0x6e, - 0x07, 0x4e, 0xc5, 0xd3, 0xba, 0xf3, 0x9d, 0x18 }, - { 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, - 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, - 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, - 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, - 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, - 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, - 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, - 0xbc, 0xc9, 0xf6, 0x62, 0x89, 0x80, 0x15, 0xad }, - { 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, - 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, - 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, - 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, - 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, - 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, - 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, - 0xbc, 0xc9, 0xf6, 0x62 }, - { 0xc3, 0x76, 0x2d, 0xf1, 0xca, 0x78, 0x7d, 0x32, - 0xae, 0x47, 0xc1, 0x3b, 0xf1, 0x98, 0x44, 0xcb, - 0xaf, 0x1a, 0xe1, 0x4d, 0x0b, 0x97, 0x6a, 0xfa, - 0xc5, 0x2f, 0xf7, 0xd7, 0x9b, 0xba, 0x9d, 0xe0, - 0xfe, 0xb5, 0x82, 0xd3, 0x39, 0x34, 0xa4, 0xf0, - 0x95, 0x4c, 0xc2, 0x36, 0x3b, 0xc7, 0x3f, 0x78, - 0x62, 0xac, 0x43, 0x0e, 0x64, 0xab, 0xe4, 0x99, - 0xf4, 0x7c, 0x9b, 0x1f }, - { 0x5a, 0x8d, 0xef, 0x2f, 0x0c, 0x9e, 0x53, 0xf1, - 0xf7, 0x5d, 0x78, 0x53, 0x65, 0x9e, 0x2a, 0x20, - 0xee, 0xb2, 0xb2, 0x2a, 0xaf, 0xde, 0x64, 0x19, - 0xa0, 0x58, 0xab, 0x4f, 0x6f, 0x74, 0x6b, 0xf4, - 0x0f, 0xc0, 0xc3, 0xb7, 0x80, 0xf2, 0x44, 0x45, - 0x2d, 0xa3, 0xeb, 0xf1, 0xc5, 0xd8, 0x2c, 0xde, - 0xa2, 0x41, 0x89, 0x97, 0x20, 0x0e, 0xf8, 0x2e, - 0x44, 0xae, 0x7e, 0x3f }, -}; - -static const unsigned char tag[MAX_TESTS * 3][16] = -{ - { 0x58, 0xe2, 0xfc, 0xce, 0xfa, 0x7e, 0x30, 0x61, - 0x36, 0x7f, 0x1d, 0x57, 0xa4, 0xe7, 0x45, 0x5a }, - { 0xab, 0x6e, 0x47, 0xd4, 0x2c, 0xec, 0x13, 0xbd, - 0xf5, 0x3a, 0x67, 0xb2, 0x12, 0x57, 0xbd, 0xdf }, - { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, - 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, - { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, - 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, - { 0x36, 0x12, 0xd2, 0xe7, 0x9e, 0x3b, 0x07, 0x85, - 0x56, 0x1b, 0xe1, 0x4a, 0xac, 0xa2, 0xfc, 0xcb }, - { 0x61, 0x9c, 0xc5, 0xae, 0xff, 0xfe, 0x0b, 0xfa, - 0x46, 0x2a, 0xf4, 0x3c, 0x16, 0x99, 0xd0, 0x50 }, - { 0xcd, 0x33, 0xb2, 0x8a, 0xc7, 0x73, 0xf7, 0x4b, - 0xa0, 0x0e, 0xd1, 0xf3, 0x12, 0x57, 0x24, 0x35 }, - { 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, - 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, - { 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, - 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, - { 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, - 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, - { 0x65, 0xdc, 0xc5, 0x7f, 0xcf, 0x62, 0x3a, 0x24, - 0x09, 0x4f, 0xcc, 0xa4, 0x0d, 0x35, 0x33, 0xf8 }, - { 0xdc, 0xf5, 0x66, 0xff, 0x29, 0x1c, 0x25, 0xbb, - 0xb8, 0x56, 0x8f, 0xc3, 0xd3, 0x76, 0xa6, 0xd9 }, - { 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9, - 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b }, - { 0xd0, 0xd1, 0xc8, 0xa7, 0x99, 0x99, 0x6b, 0xf0, - 0x26, 0x5b, 0x98, 0xb5, 0xd4, 0x8a, 0xb9, 0x19 }, - { 0xb0, 0x94, 0xda, 0xc5, 0xd9, 0x34, 0x71, 0xbd, - 0xec, 0x1a, 0x50, 0x22, 0x70, 0xe3, 0xcc, 0x6c }, - { 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, - 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }, - { 0x3a, 0x33, 0x7d, 0xbf, 0x46, 0xa7, 0x92, 0xc4, - 0x5e, 0x45, 0x49, 0x13, 0xfe, 0x2e, 0xa8, 0xf2 }, - { 0xa4, 0x4a, 0x82, 0x66, 0xee, 0x1c, 0x8e, 0xb0, - 0xc8, 0xb5, 0xd4, 0xcf, 0x5a, 0xe9, 0xf1, 0x9a }, -}; - -int mbedtls_gcm_self_test( int verbose ) -{ - mbedtls_gcm_context ctx; - unsigned char buf[64]; - unsigned char tag_buf[16]; - int i, j, ret; - mbedtls_cipher_id_t cipher = MBEDTLS_CIPHER_ID_AES; - - mbedtls_gcm_init( &ctx ); - - for( j = 0; j < 3; j++ ) - { - int key_len = 128 + 64 * j; - - for( i = 0; i < MAX_TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d (%s): ", - key_len, i, "enc" ); - - mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); - - ret = mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_ENCRYPT, - pt_len[i], - iv[iv_index[i]], iv_len[i], - additional[add_index[i]], add_len[i], - pt[pt_index[i]], buf, 16, tag_buf ); - - if( ret != 0 || - memcmp( buf, ct[j * 6 + i], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d (%s): ", - key_len, i, "dec" ); - - mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); - - ret = mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_DECRYPT, - pt_len[i], - iv[iv_index[i]], iv_len[i], - additional[add_index[i]], add_len[i], - ct[j * 6 + i], buf, 16, tag_buf ); - - if( ret != 0 || - memcmp( buf, pt[pt_index[i]], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d split (%s): ", - key_len, i, "enc" ); - - mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); - - ret = mbedtls_gcm_starts( &ctx, MBEDTLS_GCM_ENCRYPT, - iv[iv_index[i]], iv_len[i], - additional[add_index[i]], add_len[i] ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( pt_len[i] > 32 ) - { - size_t rest_len = pt_len[i] - 32; - ret = mbedtls_gcm_update( &ctx, 32, pt[pt_index[i]], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - ret = mbedtls_gcm_update( &ctx, rest_len, pt[pt_index[i]] + 32, - buf + 32 ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - else - { - ret = mbedtls_gcm_update( &ctx, pt_len[i], pt[pt_index[i]], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - ret = mbedtls_gcm_finish( &ctx, tag_buf, 16 ); - if( ret != 0 || - memcmp( buf, ct[j * 6 + i], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d split (%s): ", - key_len, i, "dec" ); - - mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); - - ret = mbedtls_gcm_starts( &ctx, MBEDTLS_GCM_DECRYPT, - iv[iv_index[i]], iv_len[i], - additional[add_index[i]], add_len[i] ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( pt_len[i] > 32 ) - { - size_t rest_len = pt_len[i] - 32; - ret = mbedtls_gcm_update( &ctx, 32, ct[j * 6 + i], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - ret = mbedtls_gcm_update( &ctx, rest_len, ct[j * 6 + i] + 32, - buf + 32 ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - else - { - ret = mbedtls_gcm_update( &ctx, pt_len[i], ct[j * 6 + i], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - ret = mbedtls_gcm_finish( &ctx, tag_buf, 16 ); - if( ret != 0 || - memcmp( buf, pt[pt_index[i]], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - } - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - -#endif /* MBEDTLS_GCM_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/havege.c b/build/premake/premake5/contrib/mbedtls/library/havege.c deleted file mode 100644 index 7623bc0676..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/havege.c +++ /dev/null @@ -1,243 +0,0 @@ -/** - * \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The HAVEGE RNG was designed by Andre Seznec in 2002. - * - * http://www.irisa.fr/caps/projects/hipsor/publi.php - * - * Contact: seznec(at)irisa_dot_fr - orocheco(at)irisa_dot_fr - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_HAVEGE_C) - -#include "mbedtls/havege.h" -#include "mbedtls/timing.h" - -#include - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* ------------------------------------------------------------------------ - * On average, one iteration accesses two 8-word blocks in the havege WALK - * table, and generates 16 words in the RES array. - * - * The data read in the WALK table is updated and permuted after each use. - * The result of the hardware clock counter read is used for this update. - * - * 25 conditional tests are present. The conditional tests are grouped in - * two nested groups of 12 conditional tests and 1 test that controls the - * permutation; on average, there should be 6 tests executed and 3 of them - * should be mispredicted. - * ------------------------------------------------------------------------ - */ - -#define SWAP(X,Y) { int *T = X; X = Y; Y = T; } - -#define TST1_ENTER if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1; -#define TST2_ENTER if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1; - -#define TST1_LEAVE U1++; } -#define TST2_LEAVE U2++; } - -#define ONE_ITERATION \ - \ - PTEST = PT1 >> 20; \ - \ - TST1_ENTER TST1_ENTER TST1_ENTER TST1_ENTER \ - TST1_ENTER TST1_ENTER TST1_ENTER TST1_ENTER \ - TST1_ENTER TST1_ENTER TST1_ENTER TST1_ENTER \ - \ - TST1_LEAVE TST1_LEAVE TST1_LEAVE TST1_LEAVE \ - TST1_LEAVE TST1_LEAVE TST1_LEAVE TST1_LEAVE \ - TST1_LEAVE TST1_LEAVE TST1_LEAVE TST1_LEAVE \ - \ - PTX = (PT1 >> 18) & 7; \ - PT1 &= 0x1FFF; \ - PT2 &= 0x1FFF; \ - CLK = (int) mbedtls_timing_hardclock(); \ - \ - i = 0; \ - A = &WALK[PT1 ]; RES[i++] ^= *A; \ - B = &WALK[PT2 ]; RES[i++] ^= *B; \ - C = &WALK[PT1 ^ 1]; RES[i++] ^= *C; \ - D = &WALK[PT2 ^ 4]; RES[i++] ^= *D; \ - \ - IN = (*A >> (1)) ^ (*A << (31)) ^ CLK; \ - *A = (*B >> (2)) ^ (*B << (30)) ^ CLK; \ - *B = IN ^ U1; \ - *C = (*C >> (3)) ^ (*C << (29)) ^ CLK; \ - *D = (*D >> (4)) ^ (*D << (28)) ^ CLK; \ - \ - A = &WALK[PT1 ^ 2]; RES[i++] ^= *A; \ - B = &WALK[PT2 ^ 2]; RES[i++] ^= *B; \ - C = &WALK[PT1 ^ 3]; RES[i++] ^= *C; \ - D = &WALK[PT2 ^ 6]; RES[i++] ^= *D; \ - \ - if( PTEST & 1 ) SWAP( A, C ); \ - \ - IN = (*A >> (5)) ^ (*A << (27)) ^ CLK; \ - *A = (*B >> (6)) ^ (*B << (26)) ^ CLK; \ - *B = IN; CLK = (int) mbedtls_timing_hardclock(); \ - *C = (*C >> (7)) ^ (*C << (25)) ^ CLK; \ - *D = (*D >> (8)) ^ (*D << (24)) ^ CLK; \ - \ - A = &WALK[PT1 ^ 4]; \ - B = &WALK[PT2 ^ 1]; \ - \ - PTEST = PT2 >> 1; \ - \ - PT2 = (RES[(i - 8) ^ PTY] ^ WALK[PT2 ^ PTY ^ 7]); \ - PT2 = ((PT2 & 0x1FFF) & (~8)) ^ ((PT1 ^ 8) & 0x8); \ - PTY = (PT2 >> 10) & 7; \ - \ - TST2_ENTER TST2_ENTER TST2_ENTER TST2_ENTER \ - TST2_ENTER TST2_ENTER TST2_ENTER TST2_ENTER \ - TST2_ENTER TST2_ENTER TST2_ENTER TST2_ENTER \ - \ - TST2_LEAVE TST2_LEAVE TST2_LEAVE TST2_LEAVE \ - TST2_LEAVE TST2_LEAVE TST2_LEAVE TST2_LEAVE \ - TST2_LEAVE TST2_LEAVE TST2_LEAVE TST2_LEAVE \ - \ - C = &WALK[PT1 ^ 5]; \ - D = &WALK[PT2 ^ 5]; \ - \ - RES[i++] ^= *A; \ - RES[i++] ^= *B; \ - RES[i++] ^= *C; \ - RES[i++] ^= *D; \ - \ - IN = (*A >> ( 9)) ^ (*A << (23)) ^ CLK; \ - *A = (*B >> (10)) ^ (*B << (22)) ^ CLK; \ - *B = IN ^ U2; \ - *C = (*C >> (11)) ^ (*C << (21)) ^ CLK; \ - *D = (*D >> (12)) ^ (*D << (20)) ^ CLK; \ - \ - A = &WALK[PT1 ^ 6]; RES[i++] ^= *A; \ - B = &WALK[PT2 ^ 3]; RES[i++] ^= *B; \ - C = &WALK[PT1 ^ 7]; RES[i++] ^= *C; \ - D = &WALK[PT2 ^ 7]; RES[i++] ^= *D; \ - \ - IN = (*A >> (13)) ^ (*A << (19)) ^ CLK; \ - *A = (*B >> (14)) ^ (*B << (18)) ^ CLK; \ - *B = IN; \ - *C = (*C >> (15)) ^ (*C << (17)) ^ CLK; \ - *D = (*D >> (16)) ^ (*D << (16)) ^ CLK; \ - \ - PT1 = ( RES[( i - 8 ) ^ PTX] ^ \ - WALK[PT1 ^ PTX ^ 7] ) & (~1); \ - PT1 ^= (PT2 ^ 0x10) & 0x10; \ - \ - for( n++, i = 0; i < 16; i++ ) \ - hs->pool[n % MBEDTLS_HAVEGE_COLLECT_SIZE] ^= RES[i]; - -/* - * Entropy gathering function - */ -static void havege_fill( mbedtls_havege_state *hs ) -{ - int i, n = 0; - int U1, U2, *A, *B, *C, *D; - int PT1, PT2, *WALK, RES[16]; - int PTX, PTY, CLK, PTEST, IN; - - WALK = hs->WALK; - PT1 = hs->PT1; - PT2 = hs->PT2; - - PTX = U1 = 0; - PTY = U2 = 0; - - memset( RES, 0, sizeof( RES ) ); - - while( n < MBEDTLS_HAVEGE_COLLECT_SIZE * 4 ) - { - ONE_ITERATION - ONE_ITERATION - ONE_ITERATION - ONE_ITERATION - } - - hs->PT1 = PT1; - hs->PT2 = PT2; - - hs->offset[0] = 0; - hs->offset[1] = MBEDTLS_HAVEGE_COLLECT_SIZE / 2; -} - -/* - * HAVEGE initialization - */ -void mbedtls_havege_init( mbedtls_havege_state *hs ) -{ - memset( hs, 0, sizeof( mbedtls_havege_state ) ); - - havege_fill( hs ); -} - -void mbedtls_havege_free( mbedtls_havege_state *hs ) -{ - if( hs == NULL ) - return; - - mbedtls_zeroize( hs, sizeof( mbedtls_havege_state ) ); -} - -/* - * HAVEGE rand function - */ -int mbedtls_havege_random( void *p_rng, unsigned char *buf, size_t len ) -{ - int val; - size_t use_len; - mbedtls_havege_state *hs = (mbedtls_havege_state *) p_rng; - unsigned char *p = buf; - - while( len > 0 ) - { - use_len = len; - if( use_len > sizeof(int) ) - use_len = sizeof(int); - - if( hs->offset[1] >= MBEDTLS_HAVEGE_COLLECT_SIZE ) - havege_fill( hs ); - - val = hs->pool[hs->offset[0]++]; - val ^= hs->pool[hs->offset[1]++]; - - memcpy( p, &val, use_len ); - - len -= use_len; - p += use_len; - } - - return( 0 ); -} - -#endif /* MBEDTLS_HAVEGE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/hmac_drbg.c b/build/premake/premake5/contrib/mbedtls/library/hmac_drbg.c deleted file mode 100644 index bf5f9b5bd3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/hmac_drbg.c +++ /dev/null @@ -1,529 +0,0 @@ -/* - * HMAC_DRBG implementation (NIST SP 800-90) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * The NIST SP 800-90A DRBGs are described in the following publication. - * http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf - * References below are based on rev. 1 (January 2012). - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) - -#include "mbedtls/hmac_drbg.h" - -#include - -#if defined(MBEDTLS_FS_IO) -#include -#endif - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_SELF_TEST */ -#endif /* MBEDTLS_PLATFORM_C */ - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * HMAC_DRBG context initialization - */ -void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_hmac_drbg_context ) ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif -} - -/* - * HMAC_DRBG update, using optional additional data (10.1.2.2) - */ -void mbedtls_hmac_drbg_update( mbedtls_hmac_drbg_context *ctx, - const unsigned char *additional, size_t add_len ) -{ - size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); - unsigned char rounds = ( additional != NULL && add_len != 0 ) ? 2 : 1; - unsigned char sep[1]; - unsigned char K[MBEDTLS_MD_MAX_SIZE]; - - for( sep[0] = 0; sep[0] < rounds; sep[0]++ ) - { - /* Step 1 or 4 */ - mbedtls_md_hmac_reset( &ctx->md_ctx ); - mbedtls_md_hmac_update( &ctx->md_ctx, ctx->V, md_len ); - mbedtls_md_hmac_update( &ctx->md_ctx, sep, 1 ); - if( rounds == 2 ) - mbedtls_md_hmac_update( &ctx->md_ctx, additional, add_len ); - mbedtls_md_hmac_finish( &ctx->md_ctx, K ); - - /* Step 2 or 5 */ - mbedtls_md_hmac_starts( &ctx->md_ctx, K, md_len ); - mbedtls_md_hmac_update( &ctx->md_ctx, ctx->V, md_len ); - mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ); - } -} - -/* - * Simplified HMAC_DRBG initialisation (for use with deterministic ECDSA) - */ -int mbedtls_hmac_drbg_seed_buf( mbedtls_hmac_drbg_context *ctx, - const mbedtls_md_info_t * md_info, - const unsigned char *data, size_t data_len ) -{ - int ret; - - if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) - return( ret ); - - /* - * Set initial working state. - * Use the V memory location, which is currently all 0, to initialize the - * MD context with an all-zero key. Then set V to its initial value. - */ - mbedtls_md_hmac_starts( &ctx->md_ctx, ctx->V, mbedtls_md_get_size( md_info ) ); - memset( ctx->V, 0x01, mbedtls_md_get_size( md_info ) ); - - mbedtls_hmac_drbg_update( ctx, data, data_len ); - - return( 0 ); -} - -/* - * HMAC_DRBG reseeding: 10.1.2.4 (arabic) + 9.2 (Roman) - */ -int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx, - const unsigned char *additional, size_t len ) -{ - unsigned char seed[MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT]; - size_t seedlen; - - /* III. Check input length */ - if( len > MBEDTLS_HMAC_DRBG_MAX_INPUT || - ctx->entropy_len + len > MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT ) - { - return( MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG ); - } - - memset( seed, 0, MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT ); - - /* IV. Gather entropy_len bytes of entropy for the seed */ - if( ctx->f_entropy( ctx->p_entropy, seed, ctx->entropy_len ) != 0 ) - return( MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED ); - - seedlen = ctx->entropy_len; - - /* 1. Concatenate entropy and additional data if any */ - if( additional != NULL && len != 0 ) - { - memcpy( seed + seedlen, additional, len ); - seedlen += len; - } - - /* 2. Update state */ - mbedtls_hmac_drbg_update( ctx, seed, seedlen ); - - /* 3. Reset reseed_counter */ - ctx->reseed_counter = 1; - - /* 4. Done */ - return( 0 ); -} - -/* - * HMAC_DRBG initialisation (10.1.2.3 + 9.1) - */ -int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx, - const mbedtls_md_info_t * md_info, - int (*f_entropy)(void *, unsigned char *, size_t), - void *p_entropy, - const unsigned char *custom, - size_t len ) -{ - int ret; - size_t entropy_len, md_size; - - if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) - return( ret ); - - md_size = mbedtls_md_get_size( md_info ); - - /* - * Set initial working state. - * Use the V memory location, which is currently all 0, to initialize the - * MD context with an all-zero key. Then set V to its initial value. - */ - mbedtls_md_hmac_starts( &ctx->md_ctx, ctx->V, md_size ); - memset( ctx->V, 0x01, md_size ); - - ctx->f_entropy = f_entropy; - ctx->p_entropy = p_entropy; - - ctx->reseed_interval = MBEDTLS_HMAC_DRBG_RESEED_INTERVAL; - - /* - * See SP800-57 5.6.1 (p. 65-66) for the security strength provided by - * each hash function, then according to SP800-90A rev1 10.1 table 2, - * min_entropy_len (in bits) is security_strength. - * - * (This also matches the sizes used in the NIST test vectors.) - */ - entropy_len = md_size <= 20 ? 16 : /* 160-bits hash -> 128 bits */ - md_size <= 28 ? 24 : /* 224-bits hash -> 192 bits */ - 32; /* better (256+) -> 256 bits */ - - /* - * For initialisation, use more entropy to emulate a nonce - * (Again, matches test vectors.) - */ - ctx->entropy_len = entropy_len * 3 / 2; - - if( ( ret = mbedtls_hmac_drbg_reseed( ctx, custom, len ) ) != 0 ) - return( ret ); - - ctx->entropy_len = entropy_len; - - return( 0 ); -} - -/* - * Set prediction resistance - */ -void mbedtls_hmac_drbg_set_prediction_resistance( mbedtls_hmac_drbg_context *ctx, - int resistance ) -{ - ctx->prediction_resistance = resistance; -} - -/* - * Set entropy length grabbed for reseeds - */ -void mbedtls_hmac_drbg_set_entropy_len( mbedtls_hmac_drbg_context *ctx, size_t len ) -{ - ctx->entropy_len = len; -} - -/* - * Set reseed interval - */ -void mbedtls_hmac_drbg_set_reseed_interval( mbedtls_hmac_drbg_context *ctx, int interval ) -{ - ctx->reseed_interval = interval; -} - -/* - * HMAC_DRBG random function with optional additional data: - * 10.1.2.5 (arabic) + 9.3 (Roman) - */ -int mbedtls_hmac_drbg_random_with_add( void *p_rng, - unsigned char *output, size_t out_len, - const unsigned char *additional, size_t add_len ) -{ - int ret; - mbedtls_hmac_drbg_context *ctx = (mbedtls_hmac_drbg_context *) p_rng; - size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); - size_t left = out_len; - unsigned char *out = output; - - /* II. Check request length */ - if( out_len > MBEDTLS_HMAC_DRBG_MAX_REQUEST ) - return( MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG ); - - /* III. Check input length */ - if( add_len > MBEDTLS_HMAC_DRBG_MAX_INPUT ) - return( MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG ); - - /* 1. (aka VII and IX) Check reseed counter and PR */ - if( ctx->f_entropy != NULL && /* For no-reseeding instances */ - ( ctx->prediction_resistance == MBEDTLS_HMAC_DRBG_PR_ON || - ctx->reseed_counter > ctx->reseed_interval ) ) - { - if( ( ret = mbedtls_hmac_drbg_reseed( ctx, additional, add_len ) ) != 0 ) - return( ret ); - - add_len = 0; /* VII.4 */ - } - - /* 2. Use additional data if any */ - if( additional != NULL && add_len != 0 ) - mbedtls_hmac_drbg_update( ctx, additional, add_len ); - - /* 3, 4, 5. Generate bytes */ - while( left != 0 ) - { - size_t use_len = left > md_len ? md_len : left; - - mbedtls_md_hmac_reset( &ctx->md_ctx ); - mbedtls_md_hmac_update( &ctx->md_ctx, ctx->V, md_len ); - mbedtls_md_hmac_finish( &ctx->md_ctx, ctx->V ); - - memcpy( out, ctx->V, use_len ); - out += use_len; - left -= use_len; - } - - /* 6. Update */ - mbedtls_hmac_drbg_update( ctx, additional, add_len ); - - /* 7. Update reseed counter */ - ctx->reseed_counter++; - - /* 8. Done */ - return( 0 ); -} - -/* - * HMAC_DRBG random function - */ -int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len ) -{ - int ret; - mbedtls_hmac_drbg_context *ctx = (mbedtls_hmac_drbg_context *) p_rng; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - ret = mbedtls_hmac_drbg_random_with_add( ctx, output, out_len, NULL, 0 ); - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -/* - * Free an HMAC_DRBG context - */ -void mbedtls_hmac_drbg_free( mbedtls_hmac_drbg_context *ctx ) -{ - if( ctx == NULL ) - return; - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &ctx->mutex ); -#endif - mbedtls_md_free( &ctx->md_ctx ); - mbedtls_zeroize( ctx, sizeof( mbedtls_hmac_drbg_context ) ); -} - -#if defined(MBEDTLS_FS_IO) -int mbedtls_hmac_drbg_write_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path ) -{ - int ret; - FILE *f; - unsigned char buf[ MBEDTLS_HMAC_DRBG_MAX_INPUT ]; - - if( ( f = fopen( path, "wb" ) ) == NULL ) - return( MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR ); - - if( ( ret = mbedtls_hmac_drbg_random( ctx, buf, sizeof( buf ) ) ) != 0 ) - goto exit; - - if( fwrite( buf, 1, sizeof( buf ), f ) != sizeof( buf ) ) - { - ret = MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR; - goto exit; - } - - ret = 0; - -exit: - fclose( f ); - return( ret ); -} - -int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path ) -{ - FILE *f; - size_t n; - unsigned char buf[ MBEDTLS_HMAC_DRBG_MAX_INPUT ]; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR ); - - fseek( f, 0, SEEK_END ); - n = (size_t) ftell( f ); - fseek( f, 0, SEEK_SET ); - - if( n > MBEDTLS_HMAC_DRBG_MAX_INPUT ) - { - fclose( f ); - return( MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG ); - } - - if( fread( buf, 1, n, f ) != n ) - { - fclose( f ); - return( MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR ); - } - - fclose( f ); - - mbedtls_hmac_drbg_update( ctx, buf, n ); - - return( mbedtls_hmac_drbg_write_seed_file( ctx, path ) ); -} -#endif /* MBEDTLS_FS_IO */ - - -#if defined(MBEDTLS_SELF_TEST) - -#if !defined(MBEDTLS_SHA1_C) -/* Dummy checkup routine */ -int mbedtls_hmac_drbg_self_test( int verbose ) -{ - (void) verbose; - return( 0 ); -} -#else - -#define OUTPUT_LEN 80 - -/* From a NIST PR=true test vector */ -static const unsigned char entropy_pr[] = { - 0xa0, 0xc9, 0xab, 0x58, 0xf1, 0xe2, 0xe5, 0xa4, 0xde, 0x3e, 0xbd, 0x4f, - 0xf7, 0x3e, 0x9c, 0x5b, 0x64, 0xef, 0xd8, 0xca, 0x02, 0x8c, 0xf8, 0x11, - 0x48, 0xa5, 0x84, 0xfe, 0x69, 0xab, 0x5a, 0xee, 0x42, 0xaa, 0x4d, 0x42, - 0x17, 0x60, 0x99, 0xd4, 0x5e, 0x13, 0x97, 0xdc, 0x40, 0x4d, 0x86, 0xa3, - 0x7b, 0xf5, 0x59, 0x54, 0x75, 0x69, 0x51, 0xe4 }; -static const unsigned char result_pr[OUTPUT_LEN] = { - 0x9a, 0x00, 0xa2, 0xd0, 0x0e, 0xd5, 0x9b, 0xfe, 0x31, 0xec, 0xb1, 0x39, - 0x9b, 0x60, 0x81, 0x48, 0xd1, 0x96, 0x9d, 0x25, 0x0d, 0x3c, 0x1e, 0x94, - 0x10, 0x10, 0x98, 0x12, 0x93, 0x25, 0xca, 0xb8, 0xfc, 0xcc, 0x2d, 0x54, - 0x73, 0x19, 0x70, 0xc0, 0x10, 0x7a, 0xa4, 0x89, 0x25, 0x19, 0x95, 0x5e, - 0x4b, 0xc6, 0x00, 0x1d, 0x7f, 0x4e, 0x6a, 0x2b, 0xf8, 0xa3, 0x01, 0xab, - 0x46, 0x05, 0x5c, 0x09, 0xa6, 0x71, 0x88, 0xf1, 0xa7, 0x40, 0xee, 0xf3, - 0xe1, 0x5c, 0x02, 0x9b, 0x44, 0xaf, 0x03, 0x44 }; - -/* From a NIST PR=false test vector */ -static const unsigned char entropy_nopr[] = { - 0x79, 0x34, 0x9b, 0xbf, 0x7c, 0xdd, 0xa5, 0x79, 0x95, 0x57, 0x86, 0x66, - 0x21, 0xc9, 0x13, 0x83, 0x11, 0x46, 0x73, 0x3a, 0xbf, 0x8c, 0x35, 0xc8, - 0xc7, 0x21, 0x5b, 0x5b, 0x96, 0xc4, 0x8e, 0x9b, 0x33, 0x8c, 0x74, 0xe3, - 0xe9, 0x9d, 0xfe, 0xdf }; -static const unsigned char result_nopr[OUTPUT_LEN] = { - 0xc6, 0xa1, 0x6a, 0xb8, 0xd4, 0x20, 0x70, 0x6f, 0x0f, 0x34, 0xab, 0x7f, - 0xec, 0x5a, 0xdc, 0xa9, 0xd8, 0xca, 0x3a, 0x13, 0x3e, 0x15, 0x9c, 0xa6, - 0xac, 0x43, 0xc6, 0xf8, 0xa2, 0xbe, 0x22, 0x83, 0x4a, 0x4c, 0x0a, 0x0a, - 0xff, 0xb1, 0x0d, 0x71, 0x94, 0xf1, 0xc1, 0xa5, 0xcf, 0x73, 0x22, 0xec, - 0x1a, 0xe0, 0x96, 0x4e, 0xd4, 0xbf, 0x12, 0x27, 0x46, 0xe0, 0x87, 0xfd, - 0xb5, 0xb3, 0xe9, 0x1b, 0x34, 0x93, 0xd5, 0xbb, 0x98, 0xfa, 0xed, 0x49, - 0xe8, 0x5f, 0x13, 0x0f, 0xc8, 0xa4, 0x59, 0xb7 }; - -/* "Entropy" from buffer */ -static size_t test_offset; -static int hmac_drbg_self_test_entropy( void *data, - unsigned char *buf, size_t len ) -{ - const unsigned char *p = data; - memcpy( buf, p + test_offset, len ); - test_offset += len; - return( 0 ); -} - -#define CHK( c ) if( (c) != 0 ) \ - { \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - return( 1 ); \ - } - -/* - * Checkup routine for HMAC_DRBG with SHA-1 - */ -int mbedtls_hmac_drbg_self_test( int verbose ) -{ - mbedtls_hmac_drbg_context ctx; - unsigned char buf[OUTPUT_LEN]; - const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ); - - mbedtls_hmac_drbg_init( &ctx ); - - /* - * PR = True - */ - if( verbose != 0 ) - mbedtls_printf( " HMAC_DRBG (PR = True) : " ); - - test_offset = 0; - CHK( mbedtls_hmac_drbg_seed( &ctx, md_info, - hmac_drbg_self_test_entropy, (void *) entropy_pr, - NULL, 0 ) ); - mbedtls_hmac_drbg_set_prediction_resistance( &ctx, MBEDTLS_HMAC_DRBG_PR_ON ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( memcmp( buf, result_pr, OUTPUT_LEN ) ); - mbedtls_hmac_drbg_free( &ctx ); - - mbedtls_hmac_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - /* - * PR = False - */ - if( verbose != 0 ) - mbedtls_printf( " HMAC_DRBG (PR = False) : " ); - - mbedtls_hmac_drbg_init( &ctx ); - - test_offset = 0; - CHK( mbedtls_hmac_drbg_seed( &ctx, md_info, - hmac_drbg_self_test_entropy, (void *) entropy_nopr, - NULL, 0 ) ); - CHK( mbedtls_hmac_drbg_reseed( &ctx, NULL, 0 ) ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( memcmp( buf, result_nopr, OUTPUT_LEN ) ); - mbedtls_hmac_drbg_free( &ctx ); - - mbedtls_hmac_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_HMAC_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/md.c b/build/premake/premake5/contrib/mbedtls/library/md.c deleted file mode 100644 index eda98f6361..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/md.c +++ /dev/null @@ -1,471 +0,0 @@ -/** - * \file mbedtls_md.c - * - * \brief Generic message digest wrapper for mbed TLS - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD_C) - -#include "mbedtls/md.h" -#include "mbedtls/md_internal.h" - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include - -#if defined(MBEDTLS_FS_IO) -#include -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Reminder: update profiles in x509_crt.c when adding a new hash! - */ -static const int supported_digests[] = { - -#if defined(MBEDTLS_SHA512_C) - MBEDTLS_MD_SHA512, - MBEDTLS_MD_SHA384, -#endif - -#if defined(MBEDTLS_SHA256_C) - MBEDTLS_MD_SHA256, - MBEDTLS_MD_SHA224, -#endif - -#if defined(MBEDTLS_SHA1_C) - MBEDTLS_MD_SHA1, -#endif - -#if defined(MBEDTLS_RIPEMD160_C) - MBEDTLS_MD_RIPEMD160, -#endif - -#if defined(MBEDTLS_MD5_C) - MBEDTLS_MD_MD5, -#endif - -#if defined(MBEDTLS_MD4_C) - MBEDTLS_MD_MD4, -#endif - -#if defined(MBEDTLS_MD2_C) - MBEDTLS_MD_MD2, -#endif - - MBEDTLS_MD_NONE -}; - -const int *mbedtls_md_list( void ) -{ - return( supported_digests ); -} - -const mbedtls_md_info_t *mbedtls_md_info_from_string( const char *md_name ) -{ - if( NULL == md_name ) - return( NULL ); - - /* Get the appropriate digest information */ -#if defined(MBEDTLS_MD2_C) - if( !strcmp( "MD2", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_MD2 ); -#endif -#if defined(MBEDTLS_MD4_C) - if( !strcmp( "MD4", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_MD4 ); -#endif -#if defined(MBEDTLS_MD5_C) - if( !strcmp( "MD5", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_MD5 ); -#endif -#if defined(MBEDTLS_RIPEMD160_C) - if( !strcmp( "RIPEMD160", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_RIPEMD160 ); -#endif -#if defined(MBEDTLS_SHA1_C) - if( !strcmp( "SHA1", md_name ) || !strcmp( "SHA", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ); -#endif -#if defined(MBEDTLS_SHA256_C) - if( !strcmp( "SHA224", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_SHA224 ); - if( !strcmp( "SHA256", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ); -#endif -#if defined(MBEDTLS_SHA512_C) - if( !strcmp( "SHA384", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_SHA384 ); - if( !strcmp( "SHA512", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_SHA512 ); -#endif - return( NULL ); -} - -const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type ) -{ - switch( md_type ) - { -#if defined(MBEDTLS_MD2_C) - case MBEDTLS_MD_MD2: - return( &mbedtls_md2_info ); -#endif -#if defined(MBEDTLS_MD4_C) - case MBEDTLS_MD_MD4: - return( &mbedtls_md4_info ); -#endif -#if defined(MBEDTLS_MD5_C) - case MBEDTLS_MD_MD5: - return( &mbedtls_md5_info ); -#endif -#if defined(MBEDTLS_RIPEMD160_C) - case MBEDTLS_MD_RIPEMD160: - return( &mbedtls_ripemd160_info ); -#endif -#if defined(MBEDTLS_SHA1_C) - case MBEDTLS_MD_SHA1: - return( &mbedtls_sha1_info ); -#endif -#if defined(MBEDTLS_SHA256_C) - case MBEDTLS_MD_SHA224: - return( &mbedtls_sha224_info ); - case MBEDTLS_MD_SHA256: - return( &mbedtls_sha256_info ); -#endif -#if defined(MBEDTLS_SHA512_C) - case MBEDTLS_MD_SHA384: - return( &mbedtls_sha384_info ); - case MBEDTLS_MD_SHA512: - return( &mbedtls_sha512_info ); -#endif - default: - return( NULL ); - } -} - -void mbedtls_md_init( mbedtls_md_context_t *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_md_context_t ) ); -} - -void mbedtls_md_free( mbedtls_md_context_t *ctx ) -{ - if( ctx == NULL || ctx->md_info == NULL ) - return; - - if( ctx->md_ctx != NULL ) - ctx->md_info->ctx_free_func( ctx->md_ctx ); - - if( ctx->hmac_ctx != NULL ) - { - mbedtls_zeroize( ctx->hmac_ctx, 2 * ctx->md_info->block_size ); - mbedtls_free( ctx->hmac_ctx ); - } - - mbedtls_zeroize( ctx, sizeof( mbedtls_md_context_t ) ); -} - -int mbedtls_md_clone( mbedtls_md_context_t *dst, - const mbedtls_md_context_t *src ) -{ - if( dst == NULL || dst->md_info == NULL || - src == NULL || src->md_info == NULL || - dst->md_info != src->md_info ) - { - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - } - - dst->md_info->clone_func( dst->md_ctx, src->md_ctx ); - - return( 0 ); -} - -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) -int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) -{ - return mbedtls_md_setup( ctx, md_info, 1 ); -} -#endif - -int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ) -{ - if( md_info == NULL || ctx == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - if( ( ctx->md_ctx = md_info->ctx_alloc_func() ) == NULL ) - return( MBEDTLS_ERR_MD_ALLOC_FAILED ); - - if( hmac != 0 ) - { - ctx->hmac_ctx = mbedtls_calloc( 2, md_info->block_size ); - if( ctx->hmac_ctx == NULL ) - { - md_info->ctx_free_func( ctx->md_ctx ); - return( MBEDTLS_ERR_MD_ALLOC_FAILED ); - } - } - - ctx->md_info = md_info; - - return( 0 ); -} - -int mbedtls_md_starts( mbedtls_md_context_t *ctx ) -{ - if( ctx == NULL || ctx->md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - ctx->md_info->starts_func( ctx->md_ctx ); - - return( 0 ); -} - -int mbedtls_md_update( mbedtls_md_context_t *ctx, const unsigned char *input, size_t ilen ) -{ - if( ctx == NULL || ctx->md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - ctx->md_info->update_func( ctx->md_ctx, input, ilen ); - - return( 0 ); -} - -int mbedtls_md_finish( mbedtls_md_context_t *ctx, unsigned char *output ) -{ - if( ctx == NULL || ctx->md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - ctx->md_info->finish_func( ctx->md_ctx, output ); - - return( 0 ); -} - -int mbedtls_md( const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - if( md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - md_info->digest_func( input, ilen, output ); - - return( 0 ); -} - -#if defined(MBEDTLS_FS_IO) -int mbedtls_md_file( const mbedtls_md_info_t *md_info, const char *path, unsigned char *output ) -{ - int ret; - FILE *f; - size_t n; - mbedtls_md_context_t ctx; - unsigned char buf[1024]; - - if( md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( MBEDTLS_ERR_MD_FILE_IO_ERROR ); - - mbedtls_md_init( &ctx ); - - if( ( ret = mbedtls_md_setup( &ctx, md_info, 0 ) ) != 0 ) - goto cleanup; - - md_info->starts_func( ctx.md_ctx ); - - while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 ) - md_info->update_func( ctx.md_ctx, buf, n ); - - if( ferror( f ) != 0 ) - { - ret = MBEDTLS_ERR_MD_FILE_IO_ERROR; - goto cleanup; - } - - md_info->finish_func( ctx.md_ctx, output ); - -cleanup: - fclose( f ); - mbedtls_md_free( &ctx ); - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ - -int mbedtls_md_hmac_starts( mbedtls_md_context_t *ctx, const unsigned char *key, size_t keylen ) -{ - unsigned char sum[MBEDTLS_MD_MAX_SIZE]; - unsigned char *ipad, *opad; - size_t i; - - if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - if( keylen > (size_t) ctx->md_info->block_size ) - { - ctx->md_info->starts_func( ctx->md_ctx ); - ctx->md_info->update_func( ctx->md_ctx, key, keylen ); - ctx->md_info->finish_func( ctx->md_ctx, sum ); - - keylen = ctx->md_info->size; - key = sum; - } - - ipad = (unsigned char *) ctx->hmac_ctx; - opad = (unsigned char *) ctx->hmac_ctx + ctx->md_info->block_size; - - memset( ipad, 0x36, ctx->md_info->block_size ); - memset( opad, 0x5C, ctx->md_info->block_size ); - - for( i = 0; i < keylen; i++ ) - { - ipad[i] = (unsigned char)( ipad[i] ^ key[i] ); - opad[i] = (unsigned char)( opad[i] ^ key[i] ); - } - - mbedtls_zeroize( sum, sizeof( sum ) ); - - ctx->md_info->starts_func( ctx->md_ctx ); - ctx->md_info->update_func( ctx->md_ctx, ipad, ctx->md_info->block_size ); - - return( 0 ); -} - -int mbedtls_md_hmac_update( mbedtls_md_context_t *ctx, const unsigned char *input, size_t ilen ) -{ - if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - ctx->md_info->update_func( ctx->md_ctx, input, ilen ); - - return( 0 ); -} - -int mbedtls_md_hmac_finish( mbedtls_md_context_t *ctx, unsigned char *output ) -{ - unsigned char tmp[MBEDTLS_MD_MAX_SIZE]; - unsigned char *opad; - - if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - opad = (unsigned char *) ctx->hmac_ctx + ctx->md_info->block_size; - - ctx->md_info->finish_func( ctx->md_ctx, tmp ); - ctx->md_info->starts_func( ctx->md_ctx ); - ctx->md_info->update_func( ctx->md_ctx, opad, ctx->md_info->block_size ); - ctx->md_info->update_func( ctx->md_ctx, tmp, ctx->md_info->size ); - ctx->md_info->finish_func( ctx->md_ctx, output ); - - return( 0 ); -} - -int mbedtls_md_hmac_reset( mbedtls_md_context_t *ctx ) -{ - unsigned char *ipad; - - if( ctx == NULL || ctx->md_info == NULL || ctx->hmac_ctx == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - ipad = (unsigned char *) ctx->hmac_ctx; - - ctx->md_info->starts_func( ctx->md_ctx ); - ctx->md_info->update_func( ctx->md_ctx, ipad, ctx->md_info->block_size ); - - return( 0 ); -} - -int mbedtls_md_hmac( const mbedtls_md_info_t *md_info, const unsigned char *key, size_t keylen, - const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - mbedtls_md_context_t ctx; - int ret; - - if( md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - mbedtls_md_init( &ctx ); - - if( ( ret = mbedtls_md_setup( &ctx, md_info, 1 ) ) != 0 ) - return( ret ); - - mbedtls_md_hmac_starts( &ctx, key, keylen ); - mbedtls_md_hmac_update( &ctx, input, ilen ); - mbedtls_md_hmac_finish( &ctx, output ); - - mbedtls_md_free( &ctx ); - - return( 0 ); -} - -int mbedtls_md_process( mbedtls_md_context_t *ctx, const unsigned char *data ) -{ - if( ctx == NULL || ctx->md_info == NULL ) - return( MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - ctx->md_info->process_func( ctx->md_ctx, data ); - - return( 0 ); -} - -unsigned char mbedtls_md_get_size( const mbedtls_md_info_t *md_info ) -{ - if( md_info == NULL ) - return( 0 ); - - return md_info->size; -} - -mbedtls_md_type_t mbedtls_md_get_type( const mbedtls_md_info_t *md_info ) -{ - if( md_info == NULL ) - return( MBEDTLS_MD_NONE ); - - return md_info->type; -} - -const char *mbedtls_md_get_name( const mbedtls_md_info_t *md_info ) -{ - if( md_info == NULL ) - return( NULL ); - - return md_info->name; -} - -#endif /* MBEDTLS_MD_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/md2.c b/build/premake/premake5/contrib/mbedtls/library/md2.c deleted file mode 100644 index 8976701312..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/md2.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * RFC 1115/1319 compliant MD2 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The MD2 algorithm was designed by Ron Rivest in 1989. - * - * http://www.ietf.org/rfc/rfc1115.txt - * http://www.ietf.org/rfc/rfc1319.txt - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD2_C) - -#include "mbedtls/md2.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_MD2_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -static const unsigned char PI_SUBST[256] = -{ - 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, 0x3D, 0x36, - 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13, 0x62, 0xA7, 0x05, 0xF3, - 0xC0, 0xC7, 0x73, 0x8C, 0x98, 0x93, 0x2B, 0xD9, 0xBC, 0x4C, - 0x82, 0xCA, 0x1E, 0x9B, 0x57, 0x3C, 0xFD, 0xD4, 0xE0, 0x16, - 0x67, 0x42, 0x6F, 0x18, 0x8A, 0x17, 0xE5, 0x12, 0xBE, 0x4E, - 0xC4, 0xD6, 0xDA, 0x9E, 0xDE, 0x49, 0xA0, 0xFB, 0xF5, 0x8E, - 0xBB, 0x2F, 0xEE, 0x7A, 0xA9, 0x68, 0x79, 0x91, 0x15, 0xB2, - 0x07, 0x3F, 0x94, 0xC2, 0x10, 0x89, 0x0B, 0x22, 0x5F, 0x21, - 0x80, 0x7F, 0x5D, 0x9A, 0x5A, 0x90, 0x32, 0x27, 0x35, 0x3E, - 0xCC, 0xE7, 0xBF, 0xF7, 0x97, 0x03, 0xFF, 0x19, 0x30, 0xB3, - 0x48, 0xA5, 0xB5, 0xD1, 0xD7, 0x5E, 0x92, 0x2A, 0xAC, 0x56, - 0xAA, 0xC6, 0x4F, 0xB8, 0x38, 0xD2, 0x96, 0xA4, 0x7D, 0xB6, - 0x76, 0xFC, 0x6B, 0xE2, 0x9C, 0x74, 0x04, 0xF1, 0x45, 0x9D, - 0x70, 0x59, 0x64, 0x71, 0x87, 0x20, 0x86, 0x5B, 0xCF, 0x65, - 0xE6, 0x2D, 0xA8, 0x02, 0x1B, 0x60, 0x25, 0xAD, 0xAE, 0xB0, - 0xB9, 0xF6, 0x1C, 0x46, 0x61, 0x69, 0x34, 0x40, 0x7E, 0x0F, - 0x55, 0x47, 0xA3, 0x23, 0xDD, 0x51, 0xAF, 0x3A, 0xC3, 0x5C, - 0xF9, 0xCE, 0xBA, 0xC5, 0xEA, 0x26, 0x2C, 0x53, 0x0D, 0x6E, - 0x85, 0x28, 0x84, 0x09, 0xD3, 0xDF, 0xCD, 0xF4, 0x41, 0x81, - 0x4D, 0x52, 0x6A, 0xDC, 0x37, 0xC8, 0x6C, 0xC1, 0xAB, 0xFA, - 0x24, 0xE1, 0x7B, 0x08, 0x0C, 0xBD, 0xB1, 0x4A, 0x78, 0x88, - 0x95, 0x8B, 0xE3, 0x63, 0xE8, 0x6D, 0xE9, 0xCB, 0xD5, 0xFE, - 0x3B, 0x00, 0x1D, 0x39, 0xF2, 0xEF, 0xB7, 0x0E, 0x66, 0x58, - 0xD0, 0xE4, 0xA6, 0x77, 0x72, 0xF8, 0xEB, 0x75, 0x4B, 0x0A, - 0x31, 0x44, 0x50, 0xB4, 0x8F, 0xED, 0x1F, 0x1A, 0xDB, 0x99, - 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14 -}; - -void mbedtls_md2_init( mbedtls_md2_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_md2_context ) ); -} - -void mbedtls_md2_free( mbedtls_md2_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_md2_context ) ); -} - -void mbedtls_md2_clone( mbedtls_md2_context *dst, - const mbedtls_md2_context *src ) -{ - *dst = *src; -} - -/* - * MD2 context setup - */ -void mbedtls_md2_starts( mbedtls_md2_context *ctx ) -{ - memset( ctx->cksum, 0, 16 ); - memset( ctx->state, 0, 46 ); - memset( ctx->buffer, 0, 16 ); - ctx->left = 0; -} - -#if !defined(MBEDTLS_MD2_PROCESS_ALT) -void mbedtls_md2_process( mbedtls_md2_context *ctx ) -{ - int i, j; - unsigned char t = 0; - - for( i = 0; i < 16; i++ ) - { - ctx->state[i + 16] = ctx->buffer[i]; - ctx->state[i + 32] = - (unsigned char)( ctx->buffer[i] ^ ctx->state[i]); - } - - for( i = 0; i < 18; i++ ) - { - for( j = 0; j < 48; j++ ) - { - ctx->state[j] = (unsigned char) - ( ctx->state[j] ^ PI_SUBST[t] ); - t = ctx->state[j]; - } - - t = (unsigned char)( t + i ); - } - - t = ctx->cksum[15]; - - for( i = 0; i < 16; i++ ) - { - ctx->cksum[i] = (unsigned char) - ( ctx->cksum[i] ^ PI_SUBST[ctx->buffer[i] ^ t] ); - t = ctx->cksum[i]; - } -} -#endif /* !MBEDTLS_MD2_PROCESS_ALT */ - -/* - * MD2 process buffer - */ -void mbedtls_md2_update( mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen ) -{ - size_t fill; - - while( ilen > 0 ) - { - if( ctx->left + ilen > 16 ) - fill = 16 - ctx->left; - else - fill = ilen; - - memcpy( ctx->buffer + ctx->left, input, fill ); - - ctx->left += fill; - input += fill; - ilen -= fill; - - if( ctx->left == 16 ) - { - ctx->left = 0; - mbedtls_md2_process( ctx ); - } - } -} - -/* - * MD2 final digest - */ -void mbedtls_md2_finish( mbedtls_md2_context *ctx, unsigned char output[16] ) -{ - size_t i; - unsigned char x; - - x = (unsigned char)( 16 - ctx->left ); - - for( i = ctx->left; i < 16; i++ ) - ctx->buffer[i] = x; - - mbedtls_md2_process( ctx ); - - memcpy( ctx->buffer, ctx->cksum, 16 ); - mbedtls_md2_process( ctx ); - - memcpy( output, ctx->state, 16 ); -} - -#endif /* !MBEDTLS_MD2_ALT */ - -/* - * output = MD2( input buffer ) - */ -void mbedtls_md2( const unsigned char *input, size_t ilen, unsigned char output[16] ) -{ - mbedtls_md2_context ctx; - - mbedtls_md2_init( &ctx ); - mbedtls_md2_starts( &ctx ); - mbedtls_md2_update( &ctx, input, ilen ); - mbedtls_md2_finish( &ctx, output ); - mbedtls_md2_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) - -/* - * RFC 1319 test vectors - */ -static const char md2_test_str[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const unsigned char md2_test_sum[7][16] = -{ - { 0x83, 0x50, 0xE5, 0xA3, 0xE2, 0x4C, 0x15, 0x3D, - 0xF2, 0x27, 0x5C, 0x9F, 0x80, 0x69, 0x27, 0x73 }, - { 0x32, 0xEC, 0x01, 0xEC, 0x4A, 0x6D, 0xAC, 0x72, - 0xC0, 0xAB, 0x96, 0xFB, 0x34, 0xC0, 0xB5, 0xD1 }, - { 0xDA, 0x85, 0x3B, 0x0D, 0x3F, 0x88, 0xD9, 0x9B, - 0x30, 0x28, 0x3A, 0x69, 0xE6, 0xDE, 0xD6, 0xBB }, - { 0xAB, 0x4F, 0x49, 0x6B, 0xFB, 0x2A, 0x53, 0x0B, - 0x21, 0x9F, 0xF3, 0x30, 0x31, 0xFE, 0x06, 0xB0 }, - { 0x4E, 0x8D, 0xDF, 0xF3, 0x65, 0x02, 0x92, 0xAB, - 0x5A, 0x41, 0x08, 0xC3, 0xAA, 0x47, 0x94, 0x0B }, - { 0xDA, 0x33, 0xDE, 0xF2, 0xA4, 0x2D, 0xF1, 0x39, - 0x75, 0x35, 0x28, 0x46, 0xC3, 0x03, 0x38, 0xCD }, - { 0xD5, 0x97, 0x6F, 0x79, 0xD8, 0x3D, 0x3A, 0x0D, - 0xC9, 0x80, 0x6C, 0x3C, 0x66, 0xF3, 0xEF, 0xD8 } -}; - -/* - * Checkup routine - */ -int mbedtls_md2_self_test( int verbose ) -{ - int i; - unsigned char md2sum[16]; - - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " MD2 test #%d: ", i + 1 ); - - mbedtls_md2( (unsigned char *) md2_test_str[i], - strlen( md2_test_str[i] ), md2sum ); - - if( memcmp( md2sum, md2_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MD2_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/md4.c b/build/premake/premake5/contrib/mbedtls/library/md4.c deleted file mode 100644 index 11a77e3ae4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/md4.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - * RFC 1186/1320 compliant MD4 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The MD4 algorithm was designed by Ron Rivest in 1990. - * - * http://www.ietf.org/rfc/rfc1186.txt - * http://www.ietf.org/rfc/rfc1320.txt - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD4_C) - -#include "mbedtls/md4.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_MD4_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (little endian) - */ -#ifndef GET_UINT32_LE -#define GET_UINT32_LE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] ) \ - | ( (uint32_t) (b)[(i) + 1] << 8 ) \ - | ( (uint32_t) (b)[(i) + 2] << 16 ) \ - | ( (uint32_t) (b)[(i) + 3] << 24 ); \ -} -#endif - -#ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ - (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ - (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ - (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ -} -#endif - -void mbedtls_md4_init( mbedtls_md4_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_md4_context ) ); -} - -void mbedtls_md4_free( mbedtls_md4_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_md4_context ) ); -} - -void mbedtls_md4_clone( mbedtls_md4_context *dst, - const mbedtls_md4_context *src ) -{ - *dst = *src; -} - -/* - * MD4 context setup - */ -void mbedtls_md4_starts( mbedtls_md4_context *ctx ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - ctx->state[0] = 0x67452301; - ctx->state[1] = 0xEFCDAB89; - ctx->state[2] = 0x98BADCFE; - ctx->state[3] = 0x10325476; -} - -#if !defined(MBEDTLS_MD4_PROCESS_ALT) -void mbedtls_md4_process( mbedtls_md4_context *ctx, const unsigned char data[64] ) -{ - uint32_t X[16], A, B, C, D; - - GET_UINT32_LE( X[ 0], data, 0 ); - GET_UINT32_LE( X[ 1], data, 4 ); - GET_UINT32_LE( X[ 2], data, 8 ); - GET_UINT32_LE( X[ 3], data, 12 ); - GET_UINT32_LE( X[ 4], data, 16 ); - GET_UINT32_LE( X[ 5], data, 20 ); - GET_UINT32_LE( X[ 6], data, 24 ); - GET_UINT32_LE( X[ 7], data, 28 ); - GET_UINT32_LE( X[ 8], data, 32 ); - GET_UINT32_LE( X[ 9], data, 36 ); - GET_UINT32_LE( X[10], data, 40 ); - GET_UINT32_LE( X[11], data, 44 ); - GET_UINT32_LE( X[12], data, 48 ); - GET_UINT32_LE( X[13], data, 52 ); - GET_UINT32_LE( X[14], data, 56 ); - GET_UINT32_LE( X[15], data, 60 ); - -#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) - - A = ctx->state[0]; - B = ctx->state[1]; - C = ctx->state[2]; - D = ctx->state[3]; - -#define F(x, y, z) ((x & y) | ((~x) & z)) -#define P(a,b,c,d,x,s) { a += F(b,c,d) + x; a = S(a,s); } - - P( A, B, C, D, X[ 0], 3 ); - P( D, A, B, C, X[ 1], 7 ); - P( C, D, A, B, X[ 2], 11 ); - P( B, C, D, A, X[ 3], 19 ); - P( A, B, C, D, X[ 4], 3 ); - P( D, A, B, C, X[ 5], 7 ); - P( C, D, A, B, X[ 6], 11 ); - P( B, C, D, A, X[ 7], 19 ); - P( A, B, C, D, X[ 8], 3 ); - P( D, A, B, C, X[ 9], 7 ); - P( C, D, A, B, X[10], 11 ); - P( B, C, D, A, X[11], 19 ); - P( A, B, C, D, X[12], 3 ); - P( D, A, B, C, X[13], 7 ); - P( C, D, A, B, X[14], 11 ); - P( B, C, D, A, X[15], 19 ); - -#undef P -#undef F - -#define F(x,y,z) ((x & y) | (x & z) | (y & z)) -#define P(a,b,c,d,x,s) { a += F(b,c,d) + x + 0x5A827999; a = S(a,s); } - - P( A, B, C, D, X[ 0], 3 ); - P( D, A, B, C, X[ 4], 5 ); - P( C, D, A, B, X[ 8], 9 ); - P( B, C, D, A, X[12], 13 ); - P( A, B, C, D, X[ 1], 3 ); - P( D, A, B, C, X[ 5], 5 ); - P( C, D, A, B, X[ 9], 9 ); - P( B, C, D, A, X[13], 13 ); - P( A, B, C, D, X[ 2], 3 ); - P( D, A, B, C, X[ 6], 5 ); - P( C, D, A, B, X[10], 9 ); - P( B, C, D, A, X[14], 13 ); - P( A, B, C, D, X[ 3], 3 ); - P( D, A, B, C, X[ 7], 5 ); - P( C, D, A, B, X[11], 9 ); - P( B, C, D, A, X[15], 13 ); - -#undef P -#undef F - -#define F(x,y,z) (x ^ y ^ z) -#define P(a,b,c,d,x,s) { a += F(b,c,d) + x + 0x6ED9EBA1; a = S(a,s); } - - P( A, B, C, D, X[ 0], 3 ); - P( D, A, B, C, X[ 8], 9 ); - P( C, D, A, B, X[ 4], 11 ); - P( B, C, D, A, X[12], 15 ); - P( A, B, C, D, X[ 2], 3 ); - P( D, A, B, C, X[10], 9 ); - P( C, D, A, B, X[ 6], 11 ); - P( B, C, D, A, X[14], 15 ); - P( A, B, C, D, X[ 1], 3 ); - P( D, A, B, C, X[ 9], 9 ); - P( C, D, A, B, X[ 5], 11 ); - P( B, C, D, A, X[13], 15 ); - P( A, B, C, D, X[ 3], 3 ); - P( D, A, B, C, X[11], 9 ); - P( C, D, A, B, X[ 7], 11 ); - P( B, C, D, A, X[15], 15 ); - -#undef F -#undef P - - ctx->state[0] += A; - ctx->state[1] += B; - ctx->state[2] += C; - ctx->state[3] += D; -} -#endif /* !MBEDTLS_MD4_PROCESS_ALT */ - -/* - * MD4 process buffer - */ -void mbedtls_md4_update( mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen ) -{ - size_t fill; - uint32_t left; - - if( ilen == 0 ) - return; - - left = ctx->total[0] & 0x3F; - fill = 64 - left; - - ctx->total[0] += (uint32_t) ilen; - ctx->total[0] &= 0xFFFFFFFF; - - if( ctx->total[0] < (uint32_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), - (void *) input, fill ); - mbedtls_md4_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 64 ) - { - mbedtls_md4_process( ctx, input ); - input += 64; - ilen -= 64; - } - - if( ilen > 0 ) - { - memcpy( (void *) (ctx->buffer + left), - (void *) input, ilen ); - } -} - -static const unsigned char md4_padding[64] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * MD4 final digest - */ -void mbedtls_md4_finish( mbedtls_md4_context *ctx, unsigned char output[16] ) -{ - uint32_t last, padn; - uint32_t high, low; - unsigned char msglen[8]; - - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT32_LE( low, msglen, 0 ); - PUT_UINT32_LE( high, msglen, 4 ); - - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - - mbedtls_md4_update( ctx, (unsigned char *) md4_padding, padn ); - mbedtls_md4_update( ctx, msglen, 8 ); - - PUT_UINT32_LE( ctx->state[0], output, 0 ); - PUT_UINT32_LE( ctx->state[1], output, 4 ); - PUT_UINT32_LE( ctx->state[2], output, 8 ); - PUT_UINT32_LE( ctx->state[3], output, 12 ); -} - -#endif /* !MBEDTLS_MD4_ALT */ - -/* - * output = MD4( input buffer ) - */ -void mbedtls_md4( const unsigned char *input, size_t ilen, unsigned char output[16] ) -{ - mbedtls_md4_context ctx; - - mbedtls_md4_init( &ctx ); - mbedtls_md4_starts( &ctx ); - mbedtls_md4_update( &ctx, input, ilen ); - mbedtls_md4_finish( &ctx, output ); - mbedtls_md4_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) - -/* - * RFC 1320 test vectors - */ -static const char md4_test_str[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const unsigned char md4_test_sum[7][16] = -{ - { 0x31, 0xD6, 0xCF, 0xE0, 0xD1, 0x6A, 0xE9, 0x31, - 0xB7, 0x3C, 0x59, 0xD7, 0xE0, 0xC0, 0x89, 0xC0 }, - { 0xBD, 0xE5, 0x2C, 0xB3, 0x1D, 0xE3, 0x3E, 0x46, - 0x24, 0x5E, 0x05, 0xFB, 0xDB, 0xD6, 0xFB, 0x24 }, - { 0xA4, 0x48, 0x01, 0x7A, 0xAF, 0x21, 0xD8, 0x52, - 0x5F, 0xC1, 0x0A, 0xE8, 0x7A, 0xA6, 0x72, 0x9D }, - { 0xD9, 0x13, 0x0A, 0x81, 0x64, 0x54, 0x9F, 0xE8, - 0x18, 0x87, 0x48, 0x06, 0xE1, 0xC7, 0x01, 0x4B }, - { 0xD7, 0x9E, 0x1C, 0x30, 0x8A, 0xA5, 0xBB, 0xCD, - 0xEE, 0xA8, 0xED, 0x63, 0xDF, 0x41, 0x2D, 0xA9 }, - { 0x04, 0x3F, 0x85, 0x82, 0xF2, 0x41, 0xDB, 0x35, - 0x1C, 0xE6, 0x27, 0xE1, 0x53, 0xE7, 0xF0, 0xE4 }, - { 0xE3, 0x3B, 0x4D, 0xDC, 0x9C, 0x38, 0xF2, 0x19, - 0x9C, 0x3E, 0x7B, 0x16, 0x4F, 0xCC, 0x05, 0x36 } -}; - -/* - * Checkup routine - */ -int mbedtls_md4_self_test( int verbose ) -{ - int i; - unsigned char md4sum[16]; - - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " MD4 test #%d: ", i + 1 ); - - mbedtls_md4( (unsigned char *) md4_test_str[i], - strlen( md4_test_str[i] ), md4sum ); - - if( memcmp( md4sum, md4_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MD4_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/md5.c b/build/premake/premake5/contrib/mbedtls/library/md5.c deleted file mode 100644 index 5d972dc9dd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/md5.c +++ /dev/null @@ -1,404 +0,0 @@ -/* - * RFC 1321 compliant MD5 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The MD5 algorithm was designed by Ron Rivest in 1991. - * - * http://www.ietf.org/rfc/rfc1321.txt - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD5_C) - -#include "mbedtls/md5.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_MD5_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (little endian) - */ -#ifndef GET_UINT32_LE -#define GET_UINT32_LE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] ) \ - | ( (uint32_t) (b)[(i) + 1] << 8 ) \ - | ( (uint32_t) (b)[(i) + 2] << 16 ) \ - | ( (uint32_t) (b)[(i) + 3] << 24 ); \ -} -#endif - -#ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ - (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ - (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ - (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ -} -#endif - -void mbedtls_md5_init( mbedtls_md5_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_md5_context ) ); -} - -void mbedtls_md5_free( mbedtls_md5_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_md5_context ) ); -} - -void mbedtls_md5_clone( mbedtls_md5_context *dst, - const mbedtls_md5_context *src ) -{ - *dst = *src; -} - -/* - * MD5 context setup - */ -void mbedtls_md5_starts( mbedtls_md5_context *ctx ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - ctx->state[0] = 0x67452301; - ctx->state[1] = 0xEFCDAB89; - ctx->state[2] = 0x98BADCFE; - ctx->state[3] = 0x10325476; -} - -#if !defined(MBEDTLS_MD5_PROCESS_ALT) -void mbedtls_md5_process( mbedtls_md5_context *ctx, const unsigned char data[64] ) -{ - uint32_t X[16], A, B, C, D; - - GET_UINT32_LE( X[ 0], data, 0 ); - GET_UINT32_LE( X[ 1], data, 4 ); - GET_UINT32_LE( X[ 2], data, 8 ); - GET_UINT32_LE( X[ 3], data, 12 ); - GET_UINT32_LE( X[ 4], data, 16 ); - GET_UINT32_LE( X[ 5], data, 20 ); - GET_UINT32_LE( X[ 6], data, 24 ); - GET_UINT32_LE( X[ 7], data, 28 ); - GET_UINT32_LE( X[ 8], data, 32 ); - GET_UINT32_LE( X[ 9], data, 36 ); - GET_UINT32_LE( X[10], data, 40 ); - GET_UINT32_LE( X[11], data, 44 ); - GET_UINT32_LE( X[12], data, 48 ); - GET_UINT32_LE( X[13], data, 52 ); - GET_UINT32_LE( X[14], data, 56 ); - GET_UINT32_LE( X[15], data, 60 ); - -#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) - -#define P(a,b,c,d,k,s,t) \ -{ \ - a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \ -} - - A = ctx->state[0]; - B = ctx->state[1]; - C = ctx->state[2]; - D = ctx->state[3]; - -#define F(x,y,z) (z ^ (x & (y ^ z))) - - P( A, B, C, D, 0, 7, 0xD76AA478 ); - P( D, A, B, C, 1, 12, 0xE8C7B756 ); - P( C, D, A, B, 2, 17, 0x242070DB ); - P( B, C, D, A, 3, 22, 0xC1BDCEEE ); - P( A, B, C, D, 4, 7, 0xF57C0FAF ); - P( D, A, B, C, 5, 12, 0x4787C62A ); - P( C, D, A, B, 6, 17, 0xA8304613 ); - P( B, C, D, A, 7, 22, 0xFD469501 ); - P( A, B, C, D, 8, 7, 0x698098D8 ); - P( D, A, B, C, 9, 12, 0x8B44F7AF ); - P( C, D, A, B, 10, 17, 0xFFFF5BB1 ); - P( B, C, D, A, 11, 22, 0x895CD7BE ); - P( A, B, C, D, 12, 7, 0x6B901122 ); - P( D, A, B, C, 13, 12, 0xFD987193 ); - P( C, D, A, B, 14, 17, 0xA679438E ); - P( B, C, D, A, 15, 22, 0x49B40821 ); - -#undef F - -#define F(x,y,z) (y ^ (z & (x ^ y))) - - P( A, B, C, D, 1, 5, 0xF61E2562 ); - P( D, A, B, C, 6, 9, 0xC040B340 ); - P( C, D, A, B, 11, 14, 0x265E5A51 ); - P( B, C, D, A, 0, 20, 0xE9B6C7AA ); - P( A, B, C, D, 5, 5, 0xD62F105D ); - P( D, A, B, C, 10, 9, 0x02441453 ); - P( C, D, A, B, 15, 14, 0xD8A1E681 ); - P( B, C, D, A, 4, 20, 0xE7D3FBC8 ); - P( A, B, C, D, 9, 5, 0x21E1CDE6 ); - P( D, A, B, C, 14, 9, 0xC33707D6 ); - P( C, D, A, B, 3, 14, 0xF4D50D87 ); - P( B, C, D, A, 8, 20, 0x455A14ED ); - P( A, B, C, D, 13, 5, 0xA9E3E905 ); - P( D, A, B, C, 2, 9, 0xFCEFA3F8 ); - P( C, D, A, B, 7, 14, 0x676F02D9 ); - P( B, C, D, A, 12, 20, 0x8D2A4C8A ); - -#undef F - -#define F(x,y,z) (x ^ y ^ z) - - P( A, B, C, D, 5, 4, 0xFFFA3942 ); - P( D, A, B, C, 8, 11, 0x8771F681 ); - P( C, D, A, B, 11, 16, 0x6D9D6122 ); - P( B, C, D, A, 14, 23, 0xFDE5380C ); - P( A, B, C, D, 1, 4, 0xA4BEEA44 ); - P( D, A, B, C, 4, 11, 0x4BDECFA9 ); - P( C, D, A, B, 7, 16, 0xF6BB4B60 ); - P( B, C, D, A, 10, 23, 0xBEBFBC70 ); - P( A, B, C, D, 13, 4, 0x289B7EC6 ); - P( D, A, B, C, 0, 11, 0xEAA127FA ); - P( C, D, A, B, 3, 16, 0xD4EF3085 ); - P( B, C, D, A, 6, 23, 0x04881D05 ); - P( A, B, C, D, 9, 4, 0xD9D4D039 ); - P( D, A, B, C, 12, 11, 0xE6DB99E5 ); - P( C, D, A, B, 15, 16, 0x1FA27CF8 ); - P( B, C, D, A, 2, 23, 0xC4AC5665 ); - -#undef F - -#define F(x,y,z) (y ^ (x | ~z)) - - P( A, B, C, D, 0, 6, 0xF4292244 ); - P( D, A, B, C, 7, 10, 0x432AFF97 ); - P( C, D, A, B, 14, 15, 0xAB9423A7 ); - P( B, C, D, A, 5, 21, 0xFC93A039 ); - P( A, B, C, D, 12, 6, 0x655B59C3 ); - P( D, A, B, C, 3, 10, 0x8F0CCC92 ); - P( C, D, A, B, 10, 15, 0xFFEFF47D ); - P( B, C, D, A, 1, 21, 0x85845DD1 ); - P( A, B, C, D, 8, 6, 0x6FA87E4F ); - P( D, A, B, C, 15, 10, 0xFE2CE6E0 ); - P( C, D, A, B, 6, 15, 0xA3014314 ); - P( B, C, D, A, 13, 21, 0x4E0811A1 ); - P( A, B, C, D, 4, 6, 0xF7537E82 ); - P( D, A, B, C, 11, 10, 0xBD3AF235 ); - P( C, D, A, B, 2, 15, 0x2AD7D2BB ); - P( B, C, D, A, 9, 21, 0xEB86D391 ); - -#undef F - - ctx->state[0] += A; - ctx->state[1] += B; - ctx->state[2] += C; - ctx->state[3] += D; -} -#endif /* !MBEDTLS_MD5_PROCESS_ALT */ - -/* - * MD5 process buffer - */ -void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen ) -{ - size_t fill; - uint32_t left; - - if( ilen == 0 ) - return; - - left = ctx->total[0] & 0x3F; - fill = 64 - left; - - ctx->total[0] += (uint32_t) ilen; - ctx->total[0] &= 0xFFFFFFFF; - - if( ctx->total[0] < (uint32_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), input, fill ); - mbedtls_md5_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 64 ) - { - mbedtls_md5_process( ctx, input ); - input += 64; - ilen -= 64; - } - - if( ilen > 0 ) - { - memcpy( (void *) (ctx->buffer + left), input, ilen ); - } -} - -static const unsigned char md5_padding[64] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * MD5 final digest - */ -void mbedtls_md5_finish( mbedtls_md5_context *ctx, unsigned char output[16] ) -{ - uint32_t last, padn; - uint32_t high, low; - unsigned char msglen[8]; - - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT32_LE( low, msglen, 0 ); - PUT_UINT32_LE( high, msglen, 4 ); - - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - - mbedtls_md5_update( ctx, md5_padding, padn ); - mbedtls_md5_update( ctx, msglen, 8 ); - - PUT_UINT32_LE( ctx->state[0], output, 0 ); - PUT_UINT32_LE( ctx->state[1], output, 4 ); - PUT_UINT32_LE( ctx->state[2], output, 8 ); - PUT_UINT32_LE( ctx->state[3], output, 12 ); -} - -#endif /* !MBEDTLS_MD5_ALT */ - -/* - * output = MD5( input buffer ) - */ -void mbedtls_md5( const unsigned char *input, size_t ilen, unsigned char output[16] ) -{ - mbedtls_md5_context ctx; - - mbedtls_md5_init( &ctx ); - mbedtls_md5_starts( &ctx ); - mbedtls_md5_update( &ctx, input, ilen ); - mbedtls_md5_finish( &ctx, output ); - mbedtls_md5_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) -/* - * RFC 1321 test vectors - */ -static const unsigned char md5_test_buf[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const int md5_test_buflen[7] = -{ - 0, 1, 3, 14, 26, 62, 80 -}; - -static const unsigned char md5_test_sum[7][16] = -{ - { 0xD4, 0x1D, 0x8C, 0xD9, 0x8F, 0x00, 0xB2, 0x04, - 0xE9, 0x80, 0x09, 0x98, 0xEC, 0xF8, 0x42, 0x7E }, - { 0x0C, 0xC1, 0x75, 0xB9, 0xC0, 0xF1, 0xB6, 0xA8, - 0x31, 0xC3, 0x99, 0xE2, 0x69, 0x77, 0x26, 0x61 }, - { 0x90, 0x01, 0x50, 0x98, 0x3C, 0xD2, 0x4F, 0xB0, - 0xD6, 0x96, 0x3F, 0x7D, 0x28, 0xE1, 0x7F, 0x72 }, - { 0xF9, 0x6B, 0x69, 0x7D, 0x7C, 0xB7, 0x93, 0x8D, - 0x52, 0x5A, 0x2F, 0x31, 0xAA, 0xF1, 0x61, 0xD0 }, - { 0xC3, 0xFC, 0xD3, 0xD7, 0x61, 0x92, 0xE4, 0x00, - 0x7D, 0xFB, 0x49, 0x6C, 0xCA, 0x67, 0xE1, 0x3B }, - { 0xD1, 0x74, 0xAB, 0x98, 0xD2, 0x77, 0xD9, 0xF5, - 0xA5, 0x61, 0x1C, 0x2C, 0x9F, 0x41, 0x9D, 0x9F }, - { 0x57, 0xED, 0xF4, 0xA2, 0x2B, 0xE3, 0xC9, 0x55, - 0xAC, 0x49, 0xDA, 0x2E, 0x21, 0x07, 0xB6, 0x7A } -}; - -/* - * Checkup routine - */ -int mbedtls_md5_self_test( int verbose ) -{ - int i; - unsigned char md5sum[16]; - - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " MD5 test #%d: ", i + 1 ); - - mbedtls_md5( md5_test_buf[i], md5_test_buflen[i], md5sum ); - - if( memcmp( md5sum, md5_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MD5_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/md_wrap.c b/build/premake/premake5/contrib/mbedtls/library/md_wrap.c deleted file mode 100644 index 2cfcae200e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/md_wrap.c +++ /dev/null @@ -1,575 +0,0 @@ -/** - * \file md_wrap.c - * - * \brief Generic message digest wrapper for mbed TLS - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD_C) - -#include "mbedtls/md_internal.h" - -#if defined(MBEDTLS_MD2_C) -#include "mbedtls/md2.h" -#endif - -#if defined(MBEDTLS_MD4_C) -#include "mbedtls/md4.h" -#endif - -#if defined(MBEDTLS_MD5_C) -#include "mbedtls/md5.h" -#endif - -#if defined(MBEDTLS_RIPEMD160_C) -#include "mbedtls/ripemd160.h" -#endif - -#if defined(MBEDTLS_SHA1_C) -#include "mbedtls/sha1.h" -#endif - -#if defined(MBEDTLS_SHA256_C) -#include "mbedtls/sha256.h" -#endif - -#if defined(MBEDTLS_SHA512_C) -#include "mbedtls/sha512.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_MD2_C) - -static void md2_starts_wrap( void *ctx ) -{ - mbedtls_md2_starts( (mbedtls_md2_context *) ctx ); -} - -static void md2_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_md2_update( (mbedtls_md2_context *) ctx, input, ilen ); -} - -static void md2_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_md2_finish( (mbedtls_md2_context *) ctx, output ); -} - -static void *md2_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md2_context ) ); - - if( ctx != NULL ) - mbedtls_md2_init( (mbedtls_md2_context *) ctx ); - - return( ctx ); -} - -static void md2_ctx_free( void *ctx ) -{ - mbedtls_md2_free( (mbedtls_md2_context *) ctx ); - mbedtls_free( ctx ); -} - -static void md2_clone_wrap( void *dst, const void *src ) -{ - mbedtls_md2_clone( (mbedtls_md2_context *) dst, - (const mbedtls_md2_context *) src ); -} - -static void md2_process_wrap( void *ctx, const unsigned char *data ) -{ - ((void) data); - - mbedtls_md2_process( (mbedtls_md2_context *) ctx ); -} - -const mbedtls_md_info_t mbedtls_md2_info = { - MBEDTLS_MD_MD2, - "MD2", - 16, - 16, - md2_starts_wrap, - md2_update_wrap, - md2_finish_wrap, - mbedtls_md2, - md2_ctx_alloc, - md2_ctx_free, - md2_clone_wrap, - md2_process_wrap, -}; - -#endif /* MBEDTLS_MD2_C */ - -#if defined(MBEDTLS_MD4_C) - -static void md4_starts_wrap( void *ctx ) -{ - mbedtls_md4_starts( (mbedtls_md4_context *) ctx ); -} - -static void md4_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_md4_update( (mbedtls_md4_context *) ctx, input, ilen ); -} - -static void md4_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_md4_finish( (mbedtls_md4_context *) ctx, output ); -} - -static void *md4_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md4_context ) ); - - if( ctx != NULL ) - mbedtls_md4_init( (mbedtls_md4_context *) ctx ); - - return( ctx ); -} - -static void md4_ctx_free( void *ctx ) -{ - mbedtls_md4_free( (mbedtls_md4_context *) ctx ); - mbedtls_free( ctx ); -} - -static void md4_clone_wrap( void *dst, const void *src ) -{ - mbedtls_md4_clone( (mbedtls_md4_context *) dst, - (const mbedtls_md4_context *) src ); -} - -static void md4_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_md4_process( (mbedtls_md4_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_md4_info = { - MBEDTLS_MD_MD4, - "MD4", - 16, - 64, - md4_starts_wrap, - md4_update_wrap, - md4_finish_wrap, - mbedtls_md4, - md4_ctx_alloc, - md4_ctx_free, - md4_clone_wrap, - md4_process_wrap, -}; - -#endif /* MBEDTLS_MD4_C */ - -#if defined(MBEDTLS_MD5_C) - -static void md5_starts_wrap( void *ctx ) -{ - mbedtls_md5_starts( (mbedtls_md5_context *) ctx ); -} - -static void md5_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_md5_update( (mbedtls_md5_context *) ctx, input, ilen ); -} - -static void md5_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_md5_finish( (mbedtls_md5_context *) ctx, output ); -} - -static void *md5_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md5_context ) ); - - if( ctx != NULL ) - mbedtls_md5_init( (mbedtls_md5_context *) ctx ); - - return( ctx ); -} - -static void md5_ctx_free( void *ctx ) -{ - mbedtls_md5_free( (mbedtls_md5_context *) ctx ); - mbedtls_free( ctx ); -} - -static void md5_clone_wrap( void *dst, const void *src ) -{ - mbedtls_md5_clone( (mbedtls_md5_context *) dst, - (const mbedtls_md5_context *) src ); -} - -static void md5_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_md5_process( (mbedtls_md5_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_md5_info = { - MBEDTLS_MD_MD5, - "MD5", - 16, - 64, - md5_starts_wrap, - md5_update_wrap, - md5_finish_wrap, - mbedtls_md5, - md5_ctx_alloc, - md5_ctx_free, - md5_clone_wrap, - md5_process_wrap, -}; - -#endif /* MBEDTLS_MD5_C */ - -#if defined(MBEDTLS_RIPEMD160_C) - -static void ripemd160_starts_wrap( void *ctx ) -{ - mbedtls_ripemd160_starts( (mbedtls_ripemd160_context *) ctx ); -} - -static void ripemd160_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_ripemd160_update( (mbedtls_ripemd160_context *) ctx, input, ilen ); -} - -static void ripemd160_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_ripemd160_finish( (mbedtls_ripemd160_context *) ctx, output ); -} - -static void *ripemd160_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ripemd160_context ) ); - - if( ctx != NULL ) - mbedtls_ripemd160_init( (mbedtls_ripemd160_context *) ctx ); - - return( ctx ); -} - -static void ripemd160_ctx_free( void *ctx ) -{ - mbedtls_ripemd160_free( (mbedtls_ripemd160_context *) ctx ); - mbedtls_free( ctx ); -} - -static void ripemd160_clone_wrap( void *dst, const void *src ) -{ - mbedtls_ripemd160_clone( (mbedtls_ripemd160_context *) dst, - (const mbedtls_ripemd160_context *) src ); -} - -static void ripemd160_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_ripemd160_process( (mbedtls_ripemd160_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_ripemd160_info = { - MBEDTLS_MD_RIPEMD160, - "RIPEMD160", - 20, - 64, - ripemd160_starts_wrap, - ripemd160_update_wrap, - ripemd160_finish_wrap, - mbedtls_ripemd160, - ripemd160_ctx_alloc, - ripemd160_ctx_free, - ripemd160_clone_wrap, - ripemd160_process_wrap, -}; - -#endif /* MBEDTLS_RIPEMD160_C */ - -#if defined(MBEDTLS_SHA1_C) - -static void sha1_starts_wrap( void *ctx ) -{ - mbedtls_sha1_starts( (mbedtls_sha1_context *) ctx ); -} - -static void sha1_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_sha1_update( (mbedtls_sha1_context *) ctx, input, ilen ); -} - -static void sha1_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_sha1_finish( (mbedtls_sha1_context *) ctx, output ); -} - -static void *sha1_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha1_context ) ); - - if( ctx != NULL ) - mbedtls_sha1_init( (mbedtls_sha1_context *) ctx ); - - return( ctx ); -} - -static void sha1_clone_wrap( void *dst, const void *src ) -{ - mbedtls_sha1_clone( (mbedtls_sha1_context *) dst, - (const mbedtls_sha1_context *) src ); -} - -static void sha1_ctx_free( void *ctx ) -{ - mbedtls_sha1_free( (mbedtls_sha1_context *) ctx ); - mbedtls_free( ctx ); -} - -static void sha1_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_sha1_process( (mbedtls_sha1_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_sha1_info = { - MBEDTLS_MD_SHA1, - "SHA1", - 20, - 64, - sha1_starts_wrap, - sha1_update_wrap, - sha1_finish_wrap, - mbedtls_sha1, - sha1_ctx_alloc, - sha1_ctx_free, - sha1_clone_wrap, - sha1_process_wrap, -}; - -#endif /* MBEDTLS_SHA1_C */ - -/* - * Wrappers for generic message digests - */ -#if defined(MBEDTLS_SHA256_C) - -static void sha224_starts_wrap( void *ctx ) -{ - mbedtls_sha256_starts( (mbedtls_sha256_context *) ctx, 1 ); -} - -static void sha224_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_sha256_update( (mbedtls_sha256_context *) ctx, input, ilen ); -} - -static void sha224_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_sha256_finish( (mbedtls_sha256_context *) ctx, output ); -} - -static void sha224_wrap( const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - mbedtls_sha256( input, ilen, output, 1 ); -} - -static void *sha224_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha256_context ) ); - - if( ctx != NULL ) - mbedtls_sha256_init( (mbedtls_sha256_context *) ctx ); - - return( ctx ); -} - -static void sha224_ctx_free( void *ctx ) -{ - mbedtls_sha256_free( (mbedtls_sha256_context *) ctx ); - mbedtls_free( ctx ); -} - -static void sha224_clone_wrap( void *dst, const void *src ) -{ - mbedtls_sha256_clone( (mbedtls_sha256_context *) dst, - (const mbedtls_sha256_context *) src ); -} - -static void sha224_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_sha256_process( (mbedtls_sha256_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_sha224_info = { - MBEDTLS_MD_SHA224, - "SHA224", - 28, - 64, - sha224_starts_wrap, - sha224_update_wrap, - sha224_finish_wrap, - sha224_wrap, - sha224_ctx_alloc, - sha224_ctx_free, - sha224_clone_wrap, - sha224_process_wrap, -}; - -static void sha256_starts_wrap( void *ctx ) -{ - mbedtls_sha256_starts( (mbedtls_sha256_context *) ctx, 0 ); -} - -static void sha256_wrap( const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - mbedtls_sha256( input, ilen, output, 0 ); -} - -const mbedtls_md_info_t mbedtls_sha256_info = { - MBEDTLS_MD_SHA256, - "SHA256", - 32, - 64, - sha256_starts_wrap, - sha224_update_wrap, - sha224_finish_wrap, - sha256_wrap, - sha224_ctx_alloc, - sha224_ctx_free, - sha224_clone_wrap, - sha224_process_wrap, -}; - -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - -static void sha384_starts_wrap( void *ctx ) -{ - mbedtls_sha512_starts( (mbedtls_sha512_context *) ctx, 1 ); -} - -static void sha384_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_sha512_update( (mbedtls_sha512_context *) ctx, input, ilen ); -} - -static void sha384_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_sha512_finish( (mbedtls_sha512_context *) ctx, output ); -} - -static void sha384_wrap( const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - mbedtls_sha512( input, ilen, output, 1 ); -} - -static void *sha384_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha512_context ) ); - - if( ctx != NULL ) - mbedtls_sha512_init( (mbedtls_sha512_context *) ctx ); - - return( ctx ); -} - -static void sha384_ctx_free( void *ctx ) -{ - mbedtls_sha512_free( (mbedtls_sha512_context *) ctx ); - mbedtls_free( ctx ); -} - -static void sha384_clone_wrap( void *dst, const void *src ) -{ - mbedtls_sha512_clone( (mbedtls_sha512_context *) dst, - (const mbedtls_sha512_context *) src ); -} - -static void sha384_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_sha512_process( (mbedtls_sha512_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_sha384_info = { - MBEDTLS_MD_SHA384, - "SHA384", - 48, - 128, - sha384_starts_wrap, - sha384_update_wrap, - sha384_finish_wrap, - sha384_wrap, - sha384_ctx_alloc, - sha384_ctx_free, - sha384_clone_wrap, - sha384_process_wrap, -}; - -static void sha512_starts_wrap( void *ctx ) -{ - mbedtls_sha512_starts( (mbedtls_sha512_context *) ctx, 0 ); -} - -static void sha512_wrap( const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - mbedtls_sha512( input, ilen, output, 0 ); -} - -const mbedtls_md_info_t mbedtls_sha512_info = { - MBEDTLS_MD_SHA512, - "SHA512", - 64, - 128, - sha512_starts_wrap, - sha384_update_wrap, - sha384_finish_wrap, - sha512_wrap, - sha384_ctx_alloc, - sha384_ctx_free, - sha384_clone_wrap, - sha384_process_wrap, -}; - -#endif /* MBEDTLS_SHA512_C */ - -#endif /* MBEDTLS_MD_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/memory_buffer_alloc.c b/build/premake/premake5/contrib/mbedtls/library/memory_buffer_alloc.c deleted file mode 100644 index b2c775a3d6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/memory_buffer_alloc.c +++ /dev/null @@ -1,750 +0,0 @@ -/* - * Buffer-based memory allocator - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" - -/* No need for the header guard as MBEDTLS_MEMORY_BUFFER_ALLOC_C - is dependent upon MBEDTLS_PLATFORM_C */ -#include "mbedtls/platform.h" - -#include - -#if defined(MBEDTLS_MEMORY_BACKTRACE) -#include -#endif - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -#define MAGIC1 0xFF00AA55 -#define MAGIC2 0xEE119966 -#define MAX_BT 20 - -typedef struct _memory_header memory_header; -struct _memory_header -{ - size_t magic1; - size_t size; - size_t alloc; - memory_header *prev; - memory_header *next; - memory_header *prev_free; - memory_header *next_free; -#if defined(MBEDTLS_MEMORY_BACKTRACE) - char **trace; - size_t trace_count; -#endif - size_t magic2; -}; - -typedef struct -{ - unsigned char *buf; - size_t len; - memory_header *first; - memory_header *first_free; - int verify; -#if defined(MBEDTLS_MEMORY_DEBUG) - size_t alloc_count; - size_t free_count; - size_t total_used; - size_t maximum_used; - size_t header_count; - size_t maximum_header_count; -#endif -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; -#endif -} -buffer_alloc_ctx; - -static buffer_alloc_ctx heap; - -#if defined(MBEDTLS_MEMORY_DEBUG) -static void debug_header( memory_header *hdr ) -{ -#if defined(MBEDTLS_MEMORY_BACKTRACE) - size_t i; -#endif - - mbedtls_fprintf( stderr, "HDR: PTR(%10zu), PREV(%10zu), NEXT(%10zu), " - "ALLOC(%zu), SIZE(%10zu)\n", - (size_t) hdr, (size_t) hdr->prev, (size_t) hdr->next, - hdr->alloc, hdr->size ); - mbedtls_fprintf( stderr, " FPREV(%10zu), FNEXT(%10zu)\n", - (size_t) hdr->prev_free, (size_t) hdr->next_free ); - -#if defined(MBEDTLS_MEMORY_BACKTRACE) - mbedtls_fprintf( stderr, "TRACE: \n" ); - for( i = 0; i < hdr->trace_count; i++ ) - mbedtls_fprintf( stderr, "%s\n", hdr->trace[i] ); - mbedtls_fprintf( stderr, "\n" ); -#endif -} - -static void debug_chain() -{ - memory_header *cur = heap.first; - - mbedtls_fprintf( stderr, "\nBlock list\n" ); - while( cur != NULL ) - { - debug_header( cur ); - cur = cur->next; - } - - mbedtls_fprintf( stderr, "Free list\n" ); - cur = heap.first_free; - - while( cur != NULL ) - { - debug_header( cur ); - cur = cur->next_free; - } -} -#endif /* MBEDTLS_MEMORY_DEBUG */ - -static int verify_header( memory_header *hdr ) -{ - if( hdr->magic1 != MAGIC1 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: MAGIC1 mismatch\n" ); -#endif - return( 1 ); - } - - if( hdr->magic2 != MAGIC2 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: MAGIC2 mismatch\n" ); -#endif - return( 1 ); - } - - if( hdr->alloc > 1 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: alloc has illegal value\n" ); -#endif - return( 1 ); - } - - if( hdr->prev != NULL && hdr->prev == hdr->next ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: prev == next\n" ); -#endif - return( 1 ); - } - - if( hdr->prev_free != NULL && hdr->prev_free == hdr->next_free ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: prev_free == next_free\n" ); -#endif - return( 1 ); - } - - return( 0 ); -} - -static int verify_chain() -{ - memory_header *prv = heap.first, *cur = heap.first->next; - - if( verify_header( heap.first ) != 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification of first header " - "failed\n" ); -#endif - return( 1 ); - } - - if( heap.first->prev != NULL ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification failed: " - "first->prev != NULL\n" ); -#endif - return( 1 ); - } - - while( cur != NULL ) - { - if( verify_header( cur ) != 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification of header " - "failed\n" ); -#endif - return( 1 ); - } - - if( cur->prev != prv ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification failed: " - "cur->prev != prv\n" ); -#endif - return( 1 ); - } - - prv = cur; - cur = cur->next; - } - - return( 0 ); -} - -static void *buffer_alloc_calloc( size_t n, size_t size ) -{ - memory_header *new, *cur = heap.first_free; - unsigned char *p; - void *ret; - size_t original_len, len; -#if defined(MBEDTLS_MEMORY_BACKTRACE) - void *trace_buffer[MAX_BT]; - size_t trace_cnt; -#endif - - if( heap.buf == NULL || heap.first == NULL ) - return( NULL ); - - original_len = len = n * size; - - if( n != 0 && len / n != size ) - return( NULL ); - - if( len % MBEDTLS_MEMORY_ALIGN_MULTIPLE ) - { - len -= len % MBEDTLS_MEMORY_ALIGN_MULTIPLE; - len += MBEDTLS_MEMORY_ALIGN_MULTIPLE; - } - - // Find block that fits - // - while( cur != NULL ) - { - if( cur->size >= len ) - break; - - cur = cur->next_free; - } - - if( cur == NULL ) - return( NULL ); - - if( cur->alloc != 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: block in free_list but allocated " - "data\n" ); -#endif - mbedtls_exit( 1 ); - } - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.alloc_count++; -#endif - - // Found location, split block if > memory_header + 4 room left - // - if( cur->size - len < sizeof(memory_header) + - MBEDTLS_MEMORY_ALIGN_MULTIPLE ) - { - cur->alloc = 1; - - // Remove from free_list - // - if( cur->prev_free != NULL ) - cur->prev_free->next_free = cur->next_free; - else - heap.first_free = cur->next_free; - - if( cur->next_free != NULL ) - cur->next_free->prev_free = cur->prev_free; - - cur->prev_free = NULL; - cur->next_free = NULL; - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.total_used += cur->size; - if( heap.total_used > heap.maximum_used ) - heap.maximum_used = heap.total_used; -#endif -#if defined(MBEDTLS_MEMORY_BACKTRACE) - trace_cnt = backtrace( trace_buffer, MAX_BT ); - cur->trace = backtrace_symbols( trace_buffer, trace_cnt ); - cur->trace_count = trace_cnt; -#endif - - if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_ALLOC ) && verify_chain() != 0 ) - mbedtls_exit( 1 ); - - ret = (unsigned char *) cur + sizeof( memory_header ); - memset( ret, 0, original_len ); - - return( ret ); - } - - p = ( (unsigned char *) cur ) + sizeof(memory_header) + len; - new = (memory_header *) p; - - new->size = cur->size - len - sizeof(memory_header); - new->alloc = 0; - new->prev = cur; - new->next = cur->next; -#if defined(MBEDTLS_MEMORY_BACKTRACE) - new->trace = NULL; - new->trace_count = 0; -#endif - new->magic1 = MAGIC1; - new->magic2 = MAGIC2; - - if( new->next != NULL ) - new->next->prev = new; - - // Replace cur with new in free_list - // - new->prev_free = cur->prev_free; - new->next_free = cur->next_free; - if( new->prev_free != NULL ) - new->prev_free->next_free = new; - else - heap.first_free = new; - - if( new->next_free != NULL ) - new->next_free->prev_free = new; - - cur->alloc = 1; - cur->size = len; - cur->next = new; - cur->prev_free = NULL; - cur->next_free = NULL; - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.header_count++; - if( heap.header_count > heap.maximum_header_count ) - heap.maximum_header_count = heap.header_count; - heap.total_used += cur->size; - if( heap.total_used > heap.maximum_used ) - heap.maximum_used = heap.total_used; -#endif -#if defined(MBEDTLS_MEMORY_BACKTRACE) - trace_cnt = backtrace( trace_buffer, MAX_BT ); - cur->trace = backtrace_symbols( trace_buffer, trace_cnt ); - cur->trace_count = trace_cnt; -#endif - - if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_ALLOC ) && verify_chain() != 0 ) - mbedtls_exit( 1 ); - - ret = (unsigned char *) cur + sizeof( memory_header ); - memset( ret, 0, original_len ); - - return( ret ); -} - -static void buffer_alloc_free( void *ptr ) -{ - memory_header *hdr, *old = NULL; - unsigned char *p = (unsigned char *) ptr; - - if( ptr == NULL || heap.buf == NULL || heap.first == NULL ) - return; - - if( p < heap.buf || p > heap.buf + heap.len ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: mbedtls_free() outside of managed " - "space\n" ); -#endif - mbedtls_exit( 1 ); - } - - p -= sizeof(memory_header); - hdr = (memory_header *) p; - - if( verify_header( hdr ) != 0 ) - mbedtls_exit( 1 ); - - if( hdr->alloc != 1 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: mbedtls_free() on unallocated " - "data\n" ); -#endif - mbedtls_exit( 1 ); - } - - hdr->alloc = 0; - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.free_count++; - heap.total_used -= hdr->size; -#endif - - // Regroup with block before - // - if( hdr->prev != NULL && hdr->prev->alloc == 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.header_count--; -#endif - hdr->prev->size += sizeof(memory_header) + hdr->size; - hdr->prev->next = hdr->next; - old = hdr; - hdr = hdr->prev; - - if( hdr->next != NULL ) - hdr->next->prev = hdr; - -#if defined(MBEDTLS_MEMORY_BACKTRACE) - free( old->trace ); -#endif - memset( old, 0, sizeof(memory_header) ); - } - - // Regroup with block after - // - if( hdr->next != NULL && hdr->next->alloc == 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.header_count--; -#endif - hdr->size += sizeof(memory_header) + hdr->next->size; - old = hdr->next; - hdr->next = hdr->next->next; - - if( hdr->prev_free != NULL || hdr->next_free != NULL ) - { - if( hdr->prev_free != NULL ) - hdr->prev_free->next_free = hdr->next_free; - else - heap.first_free = hdr->next_free; - - if( hdr->next_free != NULL ) - hdr->next_free->prev_free = hdr->prev_free; - } - - hdr->prev_free = old->prev_free; - hdr->next_free = old->next_free; - - if( hdr->prev_free != NULL ) - hdr->prev_free->next_free = hdr; - else - heap.first_free = hdr; - - if( hdr->next_free != NULL ) - hdr->next_free->prev_free = hdr; - - if( hdr->next != NULL ) - hdr->next->prev = hdr; - -#if defined(MBEDTLS_MEMORY_BACKTRACE) - free( old->trace ); -#endif - memset( old, 0, sizeof(memory_header) ); - } - - // Prepend to free_list if we have not merged - // (Does not have to stay in same order as prev / next list) - // - if( old == NULL ) - { - hdr->next_free = heap.first_free; - if( heap.first_free != NULL ) - heap.first_free->prev_free = hdr; - heap.first_free = hdr; - } - -#if defined(MBEDTLS_MEMORY_BACKTRACE) - hdr->trace = NULL; - hdr->trace_count = 0; -#endif - - if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_FREE ) && verify_chain() != 0 ) - mbedtls_exit( 1 ); -} - -void mbedtls_memory_buffer_set_verify( int verify ) -{ - heap.verify = verify; -} - -int mbedtls_memory_buffer_alloc_verify() -{ - return verify_chain(); -} - -#if defined(MBEDTLS_MEMORY_DEBUG) -void mbedtls_memory_buffer_alloc_status() -{ - mbedtls_fprintf( stderr, - "Current use: %zu blocks / %zu bytes, max: %zu blocks / " - "%zu bytes (total %zu bytes), alloc / free: %zu / %zu\n", - heap.header_count, heap.total_used, - heap.maximum_header_count, heap.maximum_used, - heap.maximum_header_count * sizeof( memory_header ) - + heap.maximum_used, - heap.alloc_count, heap.free_count ); - - if( heap.first->next == NULL ) - mbedtls_fprintf( stderr, "All memory de-allocated in stack buffer\n" ); - else - { - mbedtls_fprintf( stderr, "Memory currently allocated:\n" ); - debug_chain(); - } -} - -void mbedtls_memory_buffer_alloc_max_get( size_t *max_used, size_t *max_blocks ) -{ - *max_used = heap.maximum_used; - *max_blocks = heap.maximum_header_count; -} - -void mbedtls_memory_buffer_alloc_max_reset( void ) -{ - heap.maximum_used = 0; - heap.maximum_header_count = 0; -} - -void mbedtls_memory_buffer_alloc_cur_get( size_t *cur_used, size_t *cur_blocks ) -{ - *cur_used = heap.total_used; - *cur_blocks = heap.header_count; -} -#endif /* MBEDTLS_MEMORY_DEBUG */ - -#if defined(MBEDTLS_THREADING_C) -static void *buffer_alloc_calloc_mutexed( size_t n, size_t size ) -{ - void *buf; - if( mbedtls_mutex_lock( &heap.mutex ) != 0 ) - return( NULL ); - buf = buffer_alloc_calloc( n, size ); - if( mbedtls_mutex_unlock( &heap.mutex ) ) - return( NULL ); - return( buf ); -} - -static void buffer_alloc_free_mutexed( void *ptr ) -{ - /* We have to good option here, but corrupting the heap seems - * worse than loosing memory. */ - if( mbedtls_mutex_lock( &heap.mutex ) ) - return; - buffer_alloc_free( ptr ); - (void) mbedtls_mutex_unlock( &heap.mutex ); -} -#endif /* MBEDTLS_THREADING_C */ - -void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len ) -{ - memset( &heap, 0, sizeof(buffer_alloc_ctx) ); - memset( buf, 0, len ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &heap.mutex ); - mbedtls_platform_set_calloc_free( buffer_alloc_calloc_mutexed, - buffer_alloc_free_mutexed ); -#else - mbedtls_platform_set_calloc_free( buffer_alloc_calloc, buffer_alloc_free ); -#endif - - if( (size_t) buf % MBEDTLS_MEMORY_ALIGN_MULTIPLE ) - { - /* Adjust len first since buf is used in the computation */ - len -= MBEDTLS_MEMORY_ALIGN_MULTIPLE - - (size_t) buf % MBEDTLS_MEMORY_ALIGN_MULTIPLE; - buf += MBEDTLS_MEMORY_ALIGN_MULTIPLE - - (size_t) buf % MBEDTLS_MEMORY_ALIGN_MULTIPLE; - } - - heap.buf = buf; - heap.len = len; - - heap.first = (memory_header *) buf; - heap.first->size = len - sizeof(memory_header); - heap.first->magic1 = MAGIC1; - heap.first->magic2 = MAGIC2; - heap.first_free = heap.first; -} - -void mbedtls_memory_buffer_alloc_free() -{ -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &heap.mutex ); -#endif - mbedtls_zeroize( &heap, sizeof(buffer_alloc_ctx) ); -} - -#if defined(MBEDTLS_SELF_TEST) -static int check_pointer( void *p ) -{ - if( p == NULL ) - return( -1 ); - - if( (size_t) p % MBEDTLS_MEMORY_ALIGN_MULTIPLE != 0 ) - return( -1 ); - - return( 0 ); -} - -static int check_all_free( ) -{ - if( -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.total_used != 0 || -#endif - heap.first != heap.first_free || - (void *) heap.first != (void *) heap.buf ) - { - return( -1 ); - } - - return( 0 ); -} - -#define TEST_ASSERT( condition ) \ - if( ! (condition) ) \ - { \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - \ - ret = 1; \ - goto cleanup; \ - } - -int mbedtls_memory_buffer_alloc_self_test( int verbose ) -{ - unsigned char buf[1024]; - unsigned char *p, *q, *r, *end; - int ret = 0; - - if( verbose != 0 ) - mbedtls_printf( " MBA test #1 (basic alloc-free cycle): " ); - - mbedtls_memory_buffer_alloc_init( buf, sizeof( buf ) ); - - p = mbedtls_calloc( 1, 1 ); - q = mbedtls_calloc( 1, 128 ); - r = mbedtls_calloc( 1, 16 ); - - TEST_ASSERT( check_pointer( p ) == 0 && - check_pointer( q ) == 0 && - check_pointer( r ) == 0 ); - - mbedtls_free( r ); - mbedtls_free( q ); - mbedtls_free( p ); - - TEST_ASSERT( check_all_free( ) == 0 ); - - /* Memorize end to compare with the next test */ - end = heap.buf + heap.len; - - mbedtls_memory_buffer_alloc_free( ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " MBA test #2 (buf not aligned): " ); - - mbedtls_memory_buffer_alloc_init( buf + 1, sizeof( buf ) - 1 ); - - TEST_ASSERT( heap.buf + heap.len == end ); - - p = mbedtls_calloc( 1, 1 ); - q = mbedtls_calloc( 1, 128 ); - r = mbedtls_calloc( 1, 16 ); - - TEST_ASSERT( check_pointer( p ) == 0 && - check_pointer( q ) == 0 && - check_pointer( r ) == 0 ); - - mbedtls_free( r ); - mbedtls_free( q ); - mbedtls_free( p ); - - TEST_ASSERT( check_all_free( ) == 0 ); - - mbedtls_memory_buffer_alloc_free( ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " MBA test #3 (full): " ); - - mbedtls_memory_buffer_alloc_init( buf, sizeof( buf ) ); - - p = mbedtls_calloc( 1, sizeof( buf ) - sizeof( memory_header ) ); - - TEST_ASSERT( check_pointer( p ) == 0 ); - TEST_ASSERT( mbedtls_calloc( 1, 1 ) == NULL ); - - mbedtls_free( p ); - - p = mbedtls_calloc( 1, sizeof( buf ) - 2 * sizeof( memory_header ) - 16 ); - q = mbedtls_calloc( 1, 16 ); - - TEST_ASSERT( check_pointer( p ) == 0 && check_pointer( q ) == 0 ); - TEST_ASSERT( mbedtls_calloc( 1, 1 ) == NULL ); - - mbedtls_free( q ); - - TEST_ASSERT( mbedtls_calloc( 1, 17 ) == NULL ); - - mbedtls_free( p ); - - TEST_ASSERT( check_all_free( ) == 0 ); - - mbedtls_memory_buffer_alloc_free( ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - mbedtls_memory_buffer_alloc_free( ); - - return( ret ); -} -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/net.c b/build/premake/premake5/contrib/mbedtls/library/net.c deleted file mode 100644 index a77268c557..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/net.c +++ /dev/null @@ -1,575 +0,0 @@ -/* - * TCP/IP or UDP/IP networking functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_NET_C) - -#include "mbedtls/net.h" - -#include - -#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ - !defined(EFI32) - -#ifdef _WIN32_WINNT -#undef _WIN32_WINNT -#endif -/* Enables getaddrinfo() & Co */ -#define _WIN32_WINNT 0x0501 -#include - -#include -#include - -#if defined(_MSC_VER) -#if defined(_WIN32_WCE) -#pragma comment( lib, "ws2.lib" ) -#else -#pragma comment( lib, "ws2_32.lib" ) -#endif -#endif /* _MSC_VER */ - -#define read(fd,buf,len) recv(fd,(char*)buf,(int) len,0) -#define write(fd,buf,len) send(fd,(char*)buf,(int) len,0) -#define close(fd) closesocket(fd) - -static int wsa_init_done = 0; - -#else /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ - -/* Some MS functions want int and MSVC warns if we pass size_t, - * but the standard fucntions use socklen_t, so cast only for MSVC */ -#if defined(_MSC_VER) -#define MSVC_INT_CAST (int) -#else -#define MSVC_INT_CAST -#endif - -#include -#include - -#include - -#include - -/* - * Prepare for using the sockets interface - */ -static int net_prepare( void ) -{ -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) - WSADATA wsaData; - - if( wsa_init_done == 0 ) - { - if( WSAStartup( MAKEWORD(2,0), &wsaData ) != 0 ) - return( MBEDTLS_ERR_NET_SOCKET_FAILED ); - - wsa_init_done = 1; - } -#else -#if !defined(EFIX64) && !defined(EFI32) - signal( SIGPIPE, SIG_IGN ); -#endif -#endif - return( 0 ); -} - -/* - * Initialize a context - */ -void mbedtls_net_init( mbedtls_net_context *ctx ) -{ - ctx->fd = -1; -} - -/* - * Initiate a TCP connection with host:port and the given protocol - */ -int mbedtls_net_connect( mbedtls_net_context *ctx, const char *host, const char *port, int proto ) -{ - int ret; - struct addrinfo hints, *addr_list, *cur; - - if( ( ret = net_prepare() ) != 0 ) - return( ret ); - - /* Do name resolution with both IPv6 and IPv4 */ - memset( &hints, 0, sizeof( hints ) ); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = proto == MBEDTLS_NET_PROTO_UDP ? SOCK_DGRAM : SOCK_STREAM; - hints.ai_protocol = proto == MBEDTLS_NET_PROTO_UDP ? IPPROTO_UDP : IPPROTO_TCP; - - if( getaddrinfo( host, port, &hints, &addr_list ) != 0 ) - return( MBEDTLS_ERR_NET_UNKNOWN_HOST ); - - /* Try the sockaddrs until a connection succeeds */ - ret = MBEDTLS_ERR_NET_UNKNOWN_HOST; - for( cur = addr_list; cur != NULL; cur = cur->ai_next ) - { - ctx->fd = (int) socket( cur->ai_family, cur->ai_socktype, - cur->ai_protocol ); - if( ctx->fd < 0 ) - { - ret = MBEDTLS_ERR_NET_SOCKET_FAILED; - continue; - } - - if( connect( ctx->fd, cur->ai_addr, MSVC_INT_CAST cur->ai_addrlen ) == 0 ) - { - ret = 0; - break; - } - - close( ctx->fd ); - ret = MBEDTLS_ERR_NET_CONNECT_FAILED; - } - - freeaddrinfo( addr_list ); - - return( ret ); -} - -/* - * Create a listening socket on bind_ip:port - */ -int mbedtls_net_bind( mbedtls_net_context *ctx, const char *bind_ip, const char *port, int proto ) -{ - int n, ret; - struct addrinfo hints, *addr_list, *cur; - - if( ( ret = net_prepare() ) != 0 ) - return( ret ); - - /* Bind to IPv6 and/or IPv4, but only in the desired protocol */ - memset( &hints, 0, sizeof( hints ) ); - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = proto == MBEDTLS_NET_PROTO_UDP ? SOCK_DGRAM : SOCK_STREAM; - hints.ai_protocol = proto == MBEDTLS_NET_PROTO_UDP ? IPPROTO_UDP : IPPROTO_TCP; - if( bind_ip == NULL ) - hints.ai_flags = AI_PASSIVE; - - if( getaddrinfo( bind_ip, port, &hints, &addr_list ) != 0 ) - return( MBEDTLS_ERR_NET_UNKNOWN_HOST ); - - /* Try the sockaddrs until a binding succeeds */ - ret = MBEDTLS_ERR_NET_UNKNOWN_HOST; - for( cur = addr_list; cur != NULL; cur = cur->ai_next ) - { - ctx->fd = (int) socket( cur->ai_family, cur->ai_socktype, - cur->ai_protocol ); - if( ctx->fd < 0 ) - { - ret = MBEDTLS_ERR_NET_SOCKET_FAILED; - continue; - } - - n = 1; - if( setsockopt( ctx->fd, SOL_SOCKET, SO_REUSEADDR, - (const char *) &n, sizeof( n ) ) != 0 ) - { - close( ctx->fd ); - ret = MBEDTLS_ERR_NET_SOCKET_FAILED; - continue; - } - - if( bind( ctx->fd, cur->ai_addr, MSVC_INT_CAST cur->ai_addrlen ) != 0 ) - { - close( ctx->fd ); - ret = MBEDTLS_ERR_NET_BIND_FAILED; - continue; - } - - /* Listen only makes sense for TCP */ - if( proto == MBEDTLS_NET_PROTO_TCP ) - { - if( listen( ctx->fd, MBEDTLS_NET_LISTEN_BACKLOG ) != 0 ) - { - close( ctx->fd ); - ret = MBEDTLS_ERR_NET_LISTEN_FAILED; - continue; - } - } - - /* I we ever get there, it's a success */ - ret = 0; - break; - } - - freeaddrinfo( addr_list ); - - return( ret ); - -} - -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) -/* - * Check if the requested operation would be blocking on a non-blocking socket - * and thus 'failed' with a negative return value. - */ -static int net_would_block( const mbedtls_net_context *ctx ) -{ - ((void) ctx); - return( WSAGetLastError() == WSAEWOULDBLOCK ); -} -#else -/* - * Check if the requested operation would be blocking on a non-blocking socket - * and thus 'failed' with a negative return value. - * - * Note: on a blocking socket this function always returns 0! - */ -static int net_would_block( const mbedtls_net_context *ctx ) -{ - /* - * Never return 'WOULD BLOCK' on a non-blocking socket - */ - if( ( fcntl( ctx->fd, F_GETFL ) & O_NONBLOCK ) != O_NONBLOCK ) - return( 0 ); - - switch( errno ) - { -#if defined EAGAIN - case EAGAIN: -#endif -#if defined EWOULDBLOCK && EWOULDBLOCK != EAGAIN - case EWOULDBLOCK: -#endif - return( 1 ); - } - return( 0 ); -} -#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ - -/* - * Accept a connection from a remote client - */ -int mbedtls_net_accept( mbedtls_net_context *bind_ctx, - mbedtls_net_context *client_ctx, - void *client_ip, size_t buf_size, size_t *ip_len ) -{ - int ret; - int type; - - struct sockaddr_storage client_addr; - -#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \ - defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t) - socklen_t n = (socklen_t) sizeof( client_addr ); - socklen_t type_len = (socklen_t) sizeof( type ); -#else - int n = (int) sizeof( client_addr ); - int type_len = (int) sizeof( type ); -#endif - - /* Is this a TCP or UDP socket? */ - if( getsockopt( bind_ctx->fd, SOL_SOCKET, SO_TYPE, - (void *) &type, &type_len ) != 0 || - ( type != SOCK_STREAM && type != SOCK_DGRAM ) ) - { - return( MBEDTLS_ERR_NET_ACCEPT_FAILED ); - } - - if( type == SOCK_STREAM ) - { - /* TCP: actual accept() */ - ret = client_ctx->fd = (int) accept( bind_ctx->fd, - (struct sockaddr *) &client_addr, &n ); - } - else - { - /* UDP: wait for a message, but keep it in the queue */ - char buf[1] = { 0 }; - - ret = (int) recvfrom( bind_ctx->fd, buf, sizeof( buf ), MSG_PEEK, - (struct sockaddr *) &client_addr, &n ); - -#if defined(_WIN32) - if( ret == SOCKET_ERROR && - WSAGetLastError() == WSAEMSGSIZE ) - { - /* We know buf is too small, thanks, just peeking here */ - ret = 0; - } -#endif - } - - if( ret < 0 ) - { - if( net_would_block( bind_ctx ) != 0 ) - return( MBEDTLS_ERR_SSL_WANT_READ ); - - return( MBEDTLS_ERR_NET_ACCEPT_FAILED ); - } - - /* UDP: hijack the listening socket to communicate with the client, - * then bind a new socket to accept new connections */ - if( type != SOCK_STREAM ) - { - struct sockaddr_storage local_addr; - int one = 1; - - if( connect( bind_ctx->fd, (struct sockaddr *) &client_addr, n ) != 0 ) - return( MBEDTLS_ERR_NET_ACCEPT_FAILED ); - - client_ctx->fd = bind_ctx->fd; - bind_ctx->fd = -1; /* In case we exit early */ - - n = sizeof( struct sockaddr_storage ); - if( getsockname( client_ctx->fd, - (struct sockaddr *) &local_addr, &n ) != 0 || - ( bind_ctx->fd = (int) socket( local_addr.ss_family, - SOCK_DGRAM, IPPROTO_UDP ) ) < 0 || - setsockopt( bind_ctx->fd, SOL_SOCKET, SO_REUSEADDR, - (const char *) &one, sizeof( one ) ) != 0 ) - { - return( MBEDTLS_ERR_NET_SOCKET_FAILED ); - } - - if( bind( bind_ctx->fd, (struct sockaddr *) &local_addr, n ) != 0 ) - { - return( MBEDTLS_ERR_NET_BIND_FAILED ); - } - } - - if( client_ip != NULL ) - { - if( client_addr.ss_family == AF_INET ) - { - struct sockaddr_in *addr4 = (struct sockaddr_in *) &client_addr; - *ip_len = sizeof( addr4->sin_addr.s_addr ); - - if( buf_size < *ip_len ) - return( MBEDTLS_ERR_NET_BUFFER_TOO_SMALL ); - - memcpy( client_ip, &addr4->sin_addr.s_addr, *ip_len ); - } - else - { - struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) &client_addr; - *ip_len = sizeof( addr6->sin6_addr.s6_addr ); - - if( buf_size < *ip_len ) - return( MBEDTLS_ERR_NET_BUFFER_TOO_SMALL ); - - memcpy( client_ip, &addr6->sin6_addr.s6_addr, *ip_len); - } - } - - return( 0 ); -} - -/* - * Set the socket blocking or non-blocking - */ -int mbedtls_net_set_block( mbedtls_net_context *ctx ) -{ -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) - u_long n = 0; - return( ioctlsocket( ctx->fd, FIONBIO, &n ) ); -#else - return( fcntl( ctx->fd, F_SETFL, fcntl( ctx->fd, F_GETFL ) & ~O_NONBLOCK ) ); -#endif -} - -int mbedtls_net_set_nonblock( mbedtls_net_context *ctx ) -{ -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) - u_long n = 1; - return( ioctlsocket( ctx->fd, FIONBIO, &n ) ); -#else - return( fcntl( ctx->fd, F_SETFL, fcntl( ctx->fd, F_GETFL ) | O_NONBLOCK ) ); -#endif -} - -/* - * Portable usleep helper - */ -void mbedtls_net_usleep( unsigned long usec ) -{ -#if defined(_WIN32) - Sleep( ( usec + 999 ) / 1000 ); -#else - struct timeval tv; - tv.tv_sec = usec / 1000000; -#if defined(__unix__) || defined(__unix) || \ - ( defined(__APPLE__) && defined(__MACH__) ) - tv.tv_usec = (suseconds_t) usec % 1000000; -#else - tv.tv_usec = usec % 1000000; -#endif - select( 0, NULL, NULL, NULL, &tv ); -#endif -} - -/* - * Read at most 'len' characters - */ -int mbedtls_net_recv( void *ctx, unsigned char *buf, size_t len ) -{ - int ret; - int fd = ((mbedtls_net_context *) ctx)->fd; - - if( fd < 0 ) - return( MBEDTLS_ERR_NET_INVALID_CONTEXT ); - - ret = (int) read( fd, buf, len ); - - if( ret < 0 ) - { - if( net_would_block( ctx ) != 0 ) - return( MBEDTLS_ERR_SSL_WANT_READ ); - -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) - if( WSAGetLastError() == WSAECONNRESET ) - return( MBEDTLS_ERR_NET_CONN_RESET ); -#else - if( errno == EPIPE || errno == ECONNRESET ) - return( MBEDTLS_ERR_NET_CONN_RESET ); - - if( errno == EINTR ) - return( MBEDTLS_ERR_SSL_WANT_READ ); -#endif - - return( MBEDTLS_ERR_NET_RECV_FAILED ); - } - - return( ret ); -} - -/* - * Read at most 'len' characters, blocking for at most 'timeout' ms - */ -int mbedtls_net_recv_timeout( void *ctx, unsigned char *buf, size_t len, - uint32_t timeout ) -{ - int ret; - struct timeval tv; - fd_set read_fds; - int fd = ((mbedtls_net_context *) ctx)->fd; - - if( fd < 0 ) - return( MBEDTLS_ERR_NET_INVALID_CONTEXT ); - - FD_ZERO( &read_fds ); - FD_SET( fd, &read_fds ); - - tv.tv_sec = timeout / 1000; - tv.tv_usec = ( timeout % 1000 ) * 1000; - - ret = select( fd + 1, &read_fds, NULL, NULL, timeout == 0 ? NULL : &tv ); - - /* Zero fds ready means we timed out */ - if( ret == 0 ) - return( MBEDTLS_ERR_SSL_TIMEOUT ); - - if( ret < 0 ) - { -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) - if( WSAGetLastError() == WSAEINTR ) - return( MBEDTLS_ERR_SSL_WANT_READ ); -#else - if( errno == EINTR ) - return( MBEDTLS_ERR_SSL_WANT_READ ); -#endif - - return( MBEDTLS_ERR_NET_RECV_FAILED ); - } - - /* This call will not block */ - return( mbedtls_net_recv( ctx, buf, len ) ); -} - -/* - * Write at most 'len' characters - */ -int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len ) -{ - int ret; - int fd = ((mbedtls_net_context *) ctx)->fd; - - if( fd < 0 ) - return( MBEDTLS_ERR_NET_INVALID_CONTEXT ); - - ret = (int) write( fd, buf, len ); - - if( ret < 0 ) - { - if( net_would_block( ctx ) != 0 ) - return( MBEDTLS_ERR_SSL_WANT_WRITE ); - -#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ - !defined(EFI32) - if( WSAGetLastError() == WSAECONNRESET ) - return( MBEDTLS_ERR_NET_CONN_RESET ); -#else - if( errno == EPIPE || errno == ECONNRESET ) - return( MBEDTLS_ERR_NET_CONN_RESET ); - - if( errno == EINTR ) - return( MBEDTLS_ERR_SSL_WANT_WRITE ); -#endif - - return( MBEDTLS_ERR_NET_SEND_FAILED ); - } - - return( ret ); -} - -/* - * Gracefully close the connection - */ -void mbedtls_net_free( mbedtls_net_context *ctx ) -{ - if( ctx->fd == -1 ) - return; - - shutdown( ctx->fd, 2 ); - close( ctx->fd ); - - ctx->fd = -1; -} - -#endif /* MBEDTLS_NET_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/oid.c b/build/premake/premake5/contrib/mbedtls/library/oid.c deleted file mode 100644 index c71cd9bc1b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/oid.c +++ /dev/null @@ -1,650 +0,0 @@ -/** - * \file oid.c - * - * \brief Object Identifier (OID) database - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_OID_C) - -#include "mbedtls/oid.h" -#include "mbedtls/rsa.h" - -#include -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -#include "mbedtls/x509.h" -#endif - -/* - * Macro to automatically add the size of #define'd OIDs - */ -#define ADD_LEN(s) s, MBEDTLS_OID_SIZE(s) - -/* - * Macro to generate an internal function for oid_XXX_from_asn1() (used by - * the other functions) - */ -#define FN_OID_TYPED_FROM_ASN1( TYPE_T, NAME, LIST ) \ -static const TYPE_T * oid_ ## NAME ## _from_asn1( const mbedtls_asn1_buf *oid ) \ -{ \ - const TYPE_T *p = LIST; \ - const mbedtls_oid_descriptor_t *cur = (const mbedtls_oid_descriptor_t *) p; \ - if( p == NULL || oid == NULL ) return( NULL ); \ - while( cur->asn1 != NULL ) { \ - if( cur->asn1_len == oid->len && \ - memcmp( cur->asn1, oid->p, oid->len ) == 0 ) { \ - return( p ); \ - } \ - p++; \ - cur = (const mbedtls_oid_descriptor_t *) p; \ - } \ - return( NULL ); \ -} - -/* - * Macro to generate a function for retrieving a single attribute from the - * descriptor of an mbedtls_oid_descriptor_t wrapper. - */ -#define FN_OID_GET_DESCRIPTOR_ATTR1(FN_NAME, TYPE_T, TYPE_NAME, ATTR1_TYPE, ATTR1) \ -int FN_NAME( const mbedtls_asn1_buf *oid, ATTR1_TYPE * ATTR1 ) \ -{ \ - const TYPE_T *data = oid_ ## TYPE_NAME ## _from_asn1( oid ); \ - if( data == NULL ) return( MBEDTLS_ERR_OID_NOT_FOUND ); \ - *ATTR1 = data->descriptor.ATTR1; \ - return( 0 ); \ -} - -/* - * Macro to generate a function for retrieving a single attribute from an - * mbedtls_oid_descriptor_t wrapper. - */ -#define FN_OID_GET_ATTR1(FN_NAME, TYPE_T, TYPE_NAME, ATTR1_TYPE, ATTR1) \ -int FN_NAME( const mbedtls_asn1_buf *oid, ATTR1_TYPE * ATTR1 ) \ -{ \ - const TYPE_T *data = oid_ ## TYPE_NAME ## _from_asn1( oid ); \ - if( data == NULL ) return( MBEDTLS_ERR_OID_NOT_FOUND ); \ - *ATTR1 = data->ATTR1; \ - return( 0 ); \ -} - -/* - * Macro to generate a function for retrieving two attributes from an - * mbedtls_oid_descriptor_t wrapper. - */ -#define FN_OID_GET_ATTR2(FN_NAME, TYPE_T, TYPE_NAME, ATTR1_TYPE, ATTR1, \ - ATTR2_TYPE, ATTR2) \ -int FN_NAME( const mbedtls_asn1_buf *oid, ATTR1_TYPE * ATTR1, ATTR2_TYPE * ATTR2 ) \ -{ \ - const TYPE_T *data = oid_ ## TYPE_NAME ## _from_asn1( oid ); \ - if( data == NULL ) return( MBEDTLS_ERR_OID_NOT_FOUND ); \ - *ATTR1 = data->ATTR1; \ - *ATTR2 = data->ATTR2; \ - return( 0 ); \ -} - -/* - * Macro to generate a function for retrieving the OID based on a single - * attribute from a mbedtls_oid_descriptor_t wrapper. - */ -#define FN_OID_GET_OID_BY_ATTR1(FN_NAME, TYPE_T, LIST, ATTR1_TYPE, ATTR1) \ -int FN_NAME( ATTR1_TYPE ATTR1, const char **oid, size_t *olen ) \ -{ \ - const TYPE_T *cur = LIST; \ - while( cur->descriptor.asn1 != NULL ) { \ - if( cur->ATTR1 == ATTR1 ) { \ - *oid = cur->descriptor.asn1; \ - *olen = cur->descriptor.asn1_len; \ - return( 0 ); \ - } \ - cur++; \ - } \ - return( MBEDTLS_ERR_OID_NOT_FOUND ); \ -} - -/* - * Macro to generate a function for retrieving the OID based on two - * attributes from a mbedtls_oid_descriptor_t wrapper. - */ -#define FN_OID_GET_OID_BY_ATTR2(FN_NAME, TYPE_T, LIST, ATTR1_TYPE, ATTR1, \ - ATTR2_TYPE, ATTR2) \ -int FN_NAME( ATTR1_TYPE ATTR1, ATTR2_TYPE ATTR2, const char **oid , \ - size_t *olen ) \ -{ \ - const TYPE_T *cur = LIST; \ - while( cur->descriptor.asn1 != NULL ) { \ - if( cur->ATTR1 == ATTR1 && cur->ATTR2 == ATTR2 ) { \ - *oid = cur->descriptor.asn1; \ - *olen = cur->descriptor.asn1_len; \ - return( 0 ); \ - } \ - cur++; \ - } \ - return( MBEDTLS_ERR_OID_NOT_FOUND ); \ -} - -/* - * For X520 attribute types - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - const char *short_name; -} oid_x520_attr_t; - -static const oid_x520_attr_t oid_x520_attr_type[] = -{ - { - { ADD_LEN( MBEDTLS_OID_AT_CN ), "id-at-commonName", "Common Name" }, - "CN", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_COUNTRY ), "id-at-countryName", "Country" }, - "C", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_LOCALITY ), "id-at-locality", "Locality" }, - "L", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_STATE ), "id-at-state", "State" }, - "ST", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_ORGANIZATION ),"id-at-organizationName", "Organization" }, - "O", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_ORG_UNIT ), "id-at-organizationalUnitName", "Org Unit" }, - "OU", - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS9_EMAIL ), "emailAddress", "E-mail address" }, - "emailAddress", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_SERIAL_NUMBER ),"id-at-serialNumber", "Serial number" }, - "serialNumber", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_POSTAL_ADDRESS ),"id-at-postalAddress", "Postal address" }, - "postalAddress", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_POSTAL_CODE ), "id-at-postalCode", "Postal code" }, - "postalCode", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_SUR_NAME ), "id-at-surName", "Surname" }, - "SN", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_GIVEN_NAME ), "id-at-givenName", "Given name" }, - "GN", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_INITIALS ), "id-at-initials", "Initials" }, - "initials", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_GENERATION_QUALIFIER ), "id-at-generationQualifier", "Generation qualifier" }, - "generationQualifier", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_TITLE ), "id-at-title", "Title" }, - "title", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_DN_QUALIFIER ),"id-at-dnQualifier", "Distinguished Name qualifier" }, - "dnQualifier", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_PSEUDONYM ), "id-at-pseudonym", "Pseudonym" }, - "pseudonym", - }, - { - { ADD_LEN( MBEDTLS_OID_DOMAIN_COMPONENT ), "id-domainComponent", "Domain component" }, - "DC", - }, - { - { ADD_LEN( MBEDTLS_OID_AT_UNIQUE_IDENTIFIER ), "id-at-uniqueIdentifier", "Unique Identifier" }, - "uniqueIdentifier", - }, - { - { NULL, 0, NULL, NULL }, - NULL, - } -}; - -FN_OID_TYPED_FROM_ASN1(oid_x520_attr_t, x520_attr, oid_x520_attr_type) -FN_OID_GET_ATTR1(mbedtls_oid_get_attr_short_name, oid_x520_attr_t, x520_attr, const char *, short_name) - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -/* - * For X509 extensions - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - int ext_type; -} oid_x509_ext_t; - -static const oid_x509_ext_t oid_x509_ext[] = -{ - { - { ADD_LEN( MBEDTLS_OID_BASIC_CONSTRAINTS ), "id-ce-basicConstraints", "Basic Constraints" }, - MBEDTLS_X509_EXT_BASIC_CONSTRAINTS, - }, - { - { ADD_LEN( MBEDTLS_OID_KEY_USAGE ), "id-ce-keyUsage", "Key Usage" }, - MBEDTLS_X509_EXT_KEY_USAGE, - }, - { - { ADD_LEN( MBEDTLS_OID_EXTENDED_KEY_USAGE ), "id-ce-extKeyUsage", "Extended Key Usage" }, - MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE, - }, - { - { ADD_LEN( MBEDTLS_OID_SUBJECT_ALT_NAME ), "id-ce-subjectAltName", "Subject Alt Name" }, - MBEDTLS_X509_EXT_SUBJECT_ALT_NAME, - }, - { - { ADD_LEN( MBEDTLS_OID_NS_CERT_TYPE ), "id-netscape-certtype", "Netscape Certificate Type" }, - MBEDTLS_X509_EXT_NS_CERT_TYPE, - }, - { - { NULL, 0, NULL, NULL }, - 0, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_x509_ext_t, x509_ext, oid_x509_ext) -FN_OID_GET_ATTR1(mbedtls_oid_get_x509_ext_type, oid_x509_ext_t, x509_ext, int, ext_type) - -static const mbedtls_oid_descriptor_t oid_ext_key_usage[] = -{ - { ADD_LEN( MBEDTLS_OID_SERVER_AUTH ), "id-kp-serverAuth", "TLS Web Server Authentication" }, - { ADD_LEN( MBEDTLS_OID_CLIENT_AUTH ), "id-kp-clientAuth", "TLS Web Client Authentication" }, - { ADD_LEN( MBEDTLS_OID_CODE_SIGNING ), "id-kp-codeSigning", "Code Signing" }, - { ADD_LEN( MBEDTLS_OID_EMAIL_PROTECTION ), "id-kp-emailProtection", "E-mail Protection" }, - { ADD_LEN( MBEDTLS_OID_TIME_STAMPING ), "id-kp-timeStamping", "Time Stamping" }, - { ADD_LEN( MBEDTLS_OID_OCSP_SIGNING ), "id-kp-OCSPSigning", "OCSP Signing" }, - { NULL, 0, NULL, NULL }, -}; - -FN_OID_TYPED_FROM_ASN1(mbedtls_oid_descriptor_t, ext_key_usage, oid_ext_key_usage) -FN_OID_GET_ATTR1(mbedtls_oid_get_extended_key_usage, mbedtls_oid_descriptor_t, ext_key_usage, const char *, description) -#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */ - -#if defined(MBEDTLS_MD_C) -/* - * For SignatureAlgorithmIdentifier - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - mbedtls_md_type_t md_alg; - mbedtls_pk_type_t pk_alg; -} oid_sig_alg_t; - -static const oid_sig_alg_t oid_sig_alg[] = -{ - { - { ADD_LEN( MBEDTLS_OID_PKCS1_MD2 ), "md2WithRSAEncryption", "RSA with MD2" }, - MBEDTLS_MD_MD2, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_MD4 ), "md4WithRSAEncryption", "RSA with MD4" }, - MBEDTLS_MD_MD4, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_MD5 ), "md5WithRSAEncryption", "RSA with MD5" }, - MBEDTLS_MD_MD5, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_SHA1 ), "sha-1WithRSAEncryption", "RSA with SHA1" }, - MBEDTLS_MD_SHA1, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_SHA224 ), "sha224WithRSAEncryption", "RSA with SHA-224" }, - MBEDTLS_MD_SHA224, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_SHA256 ), "sha256WithRSAEncryption", "RSA with SHA-256" }, - MBEDTLS_MD_SHA256, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_SHA384 ), "sha384WithRSAEncryption", "RSA with SHA-384" }, - MBEDTLS_MD_SHA384, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS1_SHA512 ), "sha512WithRSAEncryption", "RSA with SHA-512" }, - MBEDTLS_MD_SHA512, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_RSA_SHA_OBS ), "sha-1WithRSAEncryption", "RSA with SHA1" }, - MBEDTLS_MD_SHA1, MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_ECDSA_SHA1 ), "ecdsa-with-SHA1", "ECDSA with SHA1" }, - MBEDTLS_MD_SHA1, MBEDTLS_PK_ECDSA, - }, - { - { ADD_LEN( MBEDTLS_OID_ECDSA_SHA224 ), "ecdsa-with-SHA224", "ECDSA with SHA224" }, - MBEDTLS_MD_SHA224, MBEDTLS_PK_ECDSA, - }, - { - { ADD_LEN( MBEDTLS_OID_ECDSA_SHA256 ), "ecdsa-with-SHA256", "ECDSA with SHA256" }, - MBEDTLS_MD_SHA256, MBEDTLS_PK_ECDSA, - }, - { - { ADD_LEN( MBEDTLS_OID_ECDSA_SHA384 ), "ecdsa-with-SHA384", "ECDSA with SHA384" }, - MBEDTLS_MD_SHA384, MBEDTLS_PK_ECDSA, - }, - { - { ADD_LEN( MBEDTLS_OID_ECDSA_SHA512 ), "ecdsa-with-SHA512", "ECDSA with SHA512" }, - MBEDTLS_MD_SHA512, MBEDTLS_PK_ECDSA, - }, - { - { ADD_LEN( MBEDTLS_OID_RSASSA_PSS ), "RSASSA-PSS", "RSASSA-PSS" }, - MBEDTLS_MD_NONE, MBEDTLS_PK_RSASSA_PSS, - }, - { - { NULL, 0, NULL, NULL }, - MBEDTLS_MD_NONE, MBEDTLS_PK_NONE, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_sig_alg_t, sig_alg, oid_sig_alg) -FN_OID_GET_DESCRIPTOR_ATTR1(mbedtls_oid_get_sig_alg_desc, oid_sig_alg_t, sig_alg, const char *, description) -FN_OID_GET_ATTR2(mbedtls_oid_get_sig_alg, oid_sig_alg_t, sig_alg, mbedtls_md_type_t, md_alg, mbedtls_pk_type_t, pk_alg) -FN_OID_GET_OID_BY_ATTR2(mbedtls_oid_get_oid_by_sig_alg, oid_sig_alg_t, oid_sig_alg, mbedtls_pk_type_t, pk_alg, mbedtls_md_type_t, md_alg) -#endif /* MBEDTLS_MD_C */ - -/* - * For PublicKeyInfo (PKCS1, RFC 5480) - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - mbedtls_pk_type_t pk_alg; -} oid_pk_alg_t; - -static const oid_pk_alg_t oid_pk_alg[] = -{ - { - { ADD_LEN( MBEDTLS_OID_PKCS1_RSA ), "rsaEncryption", "RSA" }, - MBEDTLS_PK_RSA, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_ALG_UNRESTRICTED ), "id-ecPublicKey", "Generic EC key" }, - MBEDTLS_PK_ECKEY, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_ALG_ECDH ), "id-ecDH", "EC key for ECDH" }, - MBEDTLS_PK_ECKEY_DH, - }, - { - { NULL, 0, NULL, NULL }, - MBEDTLS_PK_NONE, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_pk_alg_t, pk_alg, oid_pk_alg) -FN_OID_GET_ATTR1(mbedtls_oid_get_pk_alg, oid_pk_alg_t, pk_alg, mbedtls_pk_type_t, pk_alg) -FN_OID_GET_OID_BY_ATTR1(mbedtls_oid_get_oid_by_pk_alg, oid_pk_alg_t, oid_pk_alg, mbedtls_pk_type_t, pk_alg) - -#if defined(MBEDTLS_ECP_C) -/* - * For namedCurve (RFC 5480) - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - mbedtls_ecp_group_id grp_id; -} oid_ecp_grp_t; - -static const oid_ecp_grp_t oid_ecp_grp[] = -{ - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP192R1 ), "secp192r1", "secp192r1" }, - MBEDTLS_ECP_DP_SECP192R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP224R1 ), "secp224r1", "secp224r1" }, - MBEDTLS_ECP_DP_SECP224R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP256R1 ), "secp256r1", "secp256r1" }, - MBEDTLS_ECP_DP_SECP256R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP384R1 ), "secp384r1", "secp384r1" }, - MBEDTLS_ECP_DP_SECP384R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP521R1 ), "secp521r1", "secp521r1" }, - MBEDTLS_ECP_DP_SECP521R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP192K1 ), "secp192k1", "secp192k1" }, - MBEDTLS_ECP_DP_SECP192K1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP224K1 ), "secp224k1", "secp224k1" }, - MBEDTLS_ECP_DP_SECP224K1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP256K1 ), "secp256k1", "secp256k1" }, - MBEDTLS_ECP_DP_SECP256K1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_BP256R1 ), "brainpoolP256r1","brainpool256r1" }, - MBEDTLS_ECP_DP_BP256R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_BP384R1 ), "brainpoolP384r1","brainpool384r1" }, - MBEDTLS_ECP_DP_BP384R1, - }, - { - { ADD_LEN( MBEDTLS_OID_EC_GRP_BP512R1 ), "brainpoolP512r1","brainpool512r1" }, - MBEDTLS_ECP_DP_BP512R1, - }, - { - { NULL, 0, NULL, NULL }, - MBEDTLS_ECP_DP_NONE, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_ecp_grp_t, grp_id, oid_ecp_grp) -FN_OID_GET_ATTR1(mbedtls_oid_get_ec_grp, oid_ecp_grp_t, grp_id, mbedtls_ecp_group_id, grp_id) -FN_OID_GET_OID_BY_ATTR1(mbedtls_oid_get_oid_by_ec_grp, oid_ecp_grp_t, oid_ecp_grp, mbedtls_ecp_group_id, grp_id) -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_CIPHER_C) -/* - * For PKCS#5 PBES2 encryption algorithm - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - mbedtls_cipher_type_t cipher_alg; -} oid_cipher_alg_t; - -static const oid_cipher_alg_t oid_cipher_alg[] = -{ - { - { ADD_LEN( MBEDTLS_OID_DES_CBC ), "desCBC", "DES-CBC" }, - MBEDTLS_CIPHER_DES_CBC, - }, - { - { ADD_LEN( MBEDTLS_OID_DES_EDE3_CBC ), "des-ede3-cbc", "DES-EDE3-CBC" }, - MBEDTLS_CIPHER_DES_EDE3_CBC, - }, - { - { NULL, 0, NULL, NULL }, - MBEDTLS_CIPHER_NONE, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_cipher_alg_t, cipher_alg, oid_cipher_alg) -FN_OID_GET_ATTR1(mbedtls_oid_get_cipher_alg, oid_cipher_alg_t, cipher_alg, mbedtls_cipher_type_t, cipher_alg) -#endif /* MBEDTLS_CIPHER_C */ - -#if defined(MBEDTLS_MD_C) -/* - * For digestAlgorithm - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - mbedtls_md_type_t md_alg; -} oid_md_alg_t; - -static const oid_md_alg_t oid_md_alg[] = -{ - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD2 ), "id-md2", "MD2" }, - MBEDTLS_MD_MD2, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD4 ), "id-md4", "MD4" }, - MBEDTLS_MD_MD4, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD5 ), "id-md5", "MD5" }, - MBEDTLS_MD_MD5, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_SHA1 ), "id-sha1", "SHA-1" }, - MBEDTLS_MD_SHA1, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_SHA224 ), "id-sha224", "SHA-224" }, - MBEDTLS_MD_SHA224, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_SHA256 ), "id-sha256", "SHA-256" }, - MBEDTLS_MD_SHA256, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_SHA384 ), "id-sha384", "SHA-384" }, - MBEDTLS_MD_SHA384, - }, - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_SHA512 ), "id-sha512", "SHA-512" }, - MBEDTLS_MD_SHA512, - }, - { - { NULL, 0, NULL, NULL }, - MBEDTLS_MD_NONE, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_md_alg_t, md_alg, oid_md_alg) -FN_OID_GET_ATTR1(mbedtls_oid_get_md_alg, oid_md_alg_t, md_alg, mbedtls_md_type_t, md_alg) -FN_OID_GET_OID_BY_ATTR1(mbedtls_oid_get_oid_by_md, oid_md_alg_t, oid_md_alg, mbedtls_md_type_t, md_alg) -#endif /* MBEDTLS_MD_C */ - -#if defined(MBEDTLS_PKCS12_C) -/* - * For PKCS#12 PBEs - */ -typedef struct { - mbedtls_oid_descriptor_t descriptor; - mbedtls_md_type_t md_alg; - mbedtls_cipher_type_t cipher_alg; -} oid_pkcs12_pbe_alg_t; - -static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] = -{ - { - { ADD_LEN( MBEDTLS_OID_PKCS12_PBE_SHA1_DES3_EDE_CBC ), "pbeWithSHAAnd3-KeyTripleDES-CBC", "PBE with SHA1 and 3-Key 3DES" }, - MBEDTLS_MD_SHA1, MBEDTLS_CIPHER_DES_EDE3_CBC, - }, - { - { ADD_LEN( MBEDTLS_OID_PKCS12_PBE_SHA1_DES2_EDE_CBC ), "pbeWithSHAAnd2-KeyTripleDES-CBC", "PBE with SHA1 and 2-Key 3DES" }, - MBEDTLS_MD_SHA1, MBEDTLS_CIPHER_DES_EDE_CBC, - }, - { - { NULL, 0, NULL, NULL }, - MBEDTLS_MD_NONE, MBEDTLS_CIPHER_NONE, - }, -}; - -FN_OID_TYPED_FROM_ASN1(oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, oid_pkcs12_pbe_alg) -FN_OID_GET_ATTR2(mbedtls_oid_get_pkcs12_pbe_alg, oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, mbedtls_md_type_t, md_alg, mbedtls_cipher_type_t, cipher_alg) -#endif /* MBEDTLS_PKCS12_C */ - -#define OID_SAFE_SNPRINTF \ - do { \ - if( ret < 0 || (size_t) ret >= n ) \ - return( MBEDTLS_ERR_OID_BUF_TOO_SMALL ); \ - \ - n -= (size_t) ret; \ - p += (size_t) ret; \ - } while( 0 ) - -/* Return the x.y.z.... style numeric string for the given OID */ -int mbedtls_oid_get_numeric_string( char *buf, size_t size, - const mbedtls_asn1_buf *oid ) -{ - int ret; - size_t i, n; - unsigned int value; - char *p; - - p = buf; - n = size; - - /* First byte contains first two dots */ - if( oid->len > 0 ) - { - ret = mbedtls_snprintf( p, n, "%d.%d", oid->p[0] / 40, oid->p[0] % 40 ); - OID_SAFE_SNPRINTF; - } - - value = 0; - for( i = 1; i < oid->len; i++ ) - { - /* Prevent overflow in value. */ - if( ( ( value << 7 ) >> 7 ) != value ) - return( MBEDTLS_ERR_OID_BUF_TOO_SMALL ); - - value <<= 7; - value += oid->p[i] & 0x7F; - - if( !( oid->p[i] & 0x80 ) ) - { - /* Last byte */ - ret = mbedtls_snprintf( p, n, ".%d", value ); - OID_SAFE_SNPRINTF; - value = 0; - } - } - - return( (int) ( size - n ) ); -} - -#endif /* MBEDTLS_OID_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/padlock.c b/build/premake/premake5/contrib/mbedtls/library/padlock.c deleted file mode 100644 index b85ff9cd2c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/padlock.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * VIA PadLock support functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * This implementation is based on the VIA PadLock Programming Guide: - * - * http://www.via.com.tw/en/downloads/whitepapers/initiatives/padlock/ - * programming_guide.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PADLOCK_C) - -#include "mbedtls/padlock.h" - -#include - -#ifndef asm -#define asm __asm -#endif - -#if defined(MBEDTLS_HAVE_X86) - -/* - * PadLock detection routine - */ -int mbedtls_padlock_has_support( int feature ) -{ - static int flags = -1; - int ebx = 0, edx = 0; - - if( flags == -1 ) - { - asm( "movl %%ebx, %0 \n\t" - "movl $0xC0000000, %%eax \n\t" - "cpuid \n\t" - "cmpl $0xC0000001, %%eax \n\t" - "movl $0, %%edx \n\t" - "jb unsupported \n\t" - "movl $0xC0000001, %%eax \n\t" - "cpuid \n\t" - "unsupported: \n\t" - "movl %%edx, %1 \n\t" - "movl %2, %%ebx \n\t" - : "=m" (ebx), "=m" (edx) - : "m" (ebx) - : "eax", "ecx", "edx" ); - - flags = edx; - } - - return( flags & feature ); -} - -/* - * PadLock AES-ECB block en(de)cryption - */ -int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx, - int mode, - const unsigned char input[16], - unsigned char output[16] ) -{ - int ebx = 0; - uint32_t *rk; - uint32_t *blk; - uint32_t *ctrl; - unsigned char buf[256]; - - rk = ctx->rk; - blk = MBEDTLS_PADLOCK_ALIGN16( buf ); - memcpy( blk, input, 16 ); - - ctrl = blk + 4; - *ctrl = 0x80 | ctx->nr | ( ( ctx->nr + ( mode^1 ) - 10 ) << 9 ); - - asm( "pushfl \n\t" - "popfl \n\t" - "movl %%ebx, %0 \n\t" - "movl $1, %%ecx \n\t" - "movl %2, %%edx \n\t" - "movl %3, %%ebx \n\t" - "movl %4, %%esi \n\t" - "movl %4, %%edi \n\t" - ".byte 0xf3,0x0f,0xa7,0xc8 \n\t" - "movl %1, %%ebx \n\t" - : "=m" (ebx) - : "m" (ebx), "m" (ctrl), "m" (rk), "m" (blk) - : "memory", "ecx", "edx", "esi", "edi" ); - - memcpy( output, blk, 16 ); - - return( 0 ); -} - -/* - * PadLock AES-CBC buffer en(de)cryption - */ -int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx, - int mode, - size_t length, - unsigned char iv[16], - const unsigned char *input, - unsigned char *output ) -{ - int ebx = 0; - size_t count; - uint32_t *rk; - uint32_t *iw; - uint32_t *ctrl; - unsigned char buf[256]; - - if( ( (long) input & 15 ) != 0 || - ( (long) output & 15 ) != 0 ) - return( MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED ); - - rk = ctx->rk; - iw = MBEDTLS_PADLOCK_ALIGN16( buf ); - memcpy( iw, iv, 16 ); - - ctrl = iw + 4; - *ctrl = 0x80 | ctx->nr | ( ( ctx->nr + ( mode ^ 1 ) - 10 ) << 9 ); - - count = ( length + 15 ) >> 4; - - asm( "pushfl \n\t" - "popfl \n\t" - "movl %%ebx, %0 \n\t" - "movl %2, %%ecx \n\t" - "movl %3, %%edx \n\t" - "movl %4, %%ebx \n\t" - "movl %5, %%esi \n\t" - "movl %6, %%edi \n\t" - "movl %7, %%eax \n\t" - ".byte 0xf3,0x0f,0xa7,0xd0 \n\t" - "movl %1, %%ebx \n\t" - : "=m" (ebx) - : "m" (ebx), "m" (count), "m" (ctrl), - "m" (rk), "m" (input), "m" (output), "m" (iw) - : "memory", "eax", "ecx", "edx", "esi", "edi" ); - - memcpy( iv, iw, 16 ); - - return( 0 ); -} - -#endif /* MBEDTLS_HAVE_X86 */ - -#endif /* MBEDTLS_PADLOCK_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pem.c b/build/premake/premake5/contrib/mbedtls/library/pem.c deleted file mode 100644 index 1ee3966e1e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pem.c +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Privacy Enhanced Mail (PEM) decoding - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) - -#include "mbedtls/pem.h" -#include "mbedtls/base64.h" -#include "mbedtls/des.h" -#include "mbedtls/aes.h" -#include "mbedtls/md5.h" -#include "mbedtls/cipher.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -#if defined(MBEDTLS_PEM_PARSE_C) -void mbedtls_pem_init( mbedtls_pem_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_pem_context ) ); -} - -#if defined(MBEDTLS_MD5_C) && defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_DES_C) || defined(MBEDTLS_AES_C) ) -/* - * Read a 16-byte hex string and convert it to binary - */ -static int pem_get_iv( const unsigned char *s, unsigned char *iv, - size_t iv_len ) -{ - size_t i, j, k; - - memset( iv, 0, iv_len ); - - for( i = 0; i < iv_len * 2; i++, s++ ) - { - if( *s >= '0' && *s <= '9' ) j = *s - '0'; else - if( *s >= 'A' && *s <= 'F' ) j = *s - '7'; else - if( *s >= 'a' && *s <= 'f' ) j = *s - 'W'; else - return( MBEDTLS_ERR_PEM_INVALID_ENC_IV ); - - k = ( ( i & 1 ) != 0 ) ? j : j << 4; - - iv[i >> 1] = (unsigned char)( iv[i >> 1] | k ); - } - - return( 0 ); -} - -static void pem_pbkdf1( unsigned char *key, size_t keylen, - unsigned char *iv, - const unsigned char *pwd, size_t pwdlen ) -{ - mbedtls_md5_context md5_ctx; - unsigned char md5sum[16]; - size_t use_len; - - mbedtls_md5_init( &md5_ctx ); - - /* - * key[ 0..15] = MD5(pwd || IV) - */ - mbedtls_md5_starts( &md5_ctx ); - mbedtls_md5_update( &md5_ctx, pwd, pwdlen ); - mbedtls_md5_update( &md5_ctx, iv, 8 ); - mbedtls_md5_finish( &md5_ctx, md5sum ); - - if( keylen <= 16 ) - { - memcpy( key, md5sum, keylen ); - - mbedtls_md5_free( &md5_ctx ); - mbedtls_zeroize( md5sum, 16 ); - return; - } - - memcpy( key, md5sum, 16 ); - - /* - * key[16..23] = MD5(key[ 0..15] || pwd || IV]) - */ - mbedtls_md5_starts( &md5_ctx ); - mbedtls_md5_update( &md5_ctx, md5sum, 16 ); - mbedtls_md5_update( &md5_ctx, pwd, pwdlen ); - mbedtls_md5_update( &md5_ctx, iv, 8 ); - mbedtls_md5_finish( &md5_ctx, md5sum ); - - use_len = 16; - if( keylen < 32 ) - use_len = keylen - 16; - - memcpy( key + 16, md5sum, use_len ); - - mbedtls_md5_free( &md5_ctx ); - mbedtls_zeroize( md5sum, 16 ); -} - -#if defined(MBEDTLS_DES_C) -/* - * Decrypt with DES-CBC, using PBKDF1 for key derivation - */ -static void pem_des_decrypt( unsigned char des_iv[8], - unsigned char *buf, size_t buflen, - const unsigned char *pwd, size_t pwdlen ) -{ - mbedtls_des_context des_ctx; - unsigned char des_key[8]; - - mbedtls_des_init( &des_ctx ); - - pem_pbkdf1( des_key, 8, des_iv, pwd, pwdlen ); - - mbedtls_des_setkey_dec( &des_ctx, des_key ); - mbedtls_des_crypt_cbc( &des_ctx, MBEDTLS_DES_DECRYPT, buflen, - des_iv, buf, buf ); - - mbedtls_des_free( &des_ctx ); - mbedtls_zeroize( des_key, 8 ); -} - -/* - * Decrypt with 3DES-CBC, using PBKDF1 for key derivation - */ -static void pem_des3_decrypt( unsigned char des3_iv[8], - unsigned char *buf, size_t buflen, - const unsigned char *pwd, size_t pwdlen ) -{ - mbedtls_des3_context des3_ctx; - unsigned char des3_key[24]; - - mbedtls_des3_init( &des3_ctx ); - - pem_pbkdf1( des3_key, 24, des3_iv, pwd, pwdlen ); - - mbedtls_des3_set3key_dec( &des3_ctx, des3_key ); - mbedtls_des3_crypt_cbc( &des3_ctx, MBEDTLS_DES_DECRYPT, buflen, - des3_iv, buf, buf ); - - mbedtls_des3_free( &des3_ctx ); - mbedtls_zeroize( des3_key, 24 ); -} -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_AES_C) -/* - * Decrypt with AES-XXX-CBC, using PBKDF1 for key derivation - */ -static void pem_aes_decrypt( unsigned char aes_iv[16], unsigned int keylen, - unsigned char *buf, size_t buflen, - const unsigned char *pwd, size_t pwdlen ) -{ - mbedtls_aes_context aes_ctx; - unsigned char aes_key[32]; - - mbedtls_aes_init( &aes_ctx ); - - pem_pbkdf1( aes_key, keylen, aes_iv, pwd, pwdlen ); - - mbedtls_aes_setkey_dec( &aes_ctx, aes_key, keylen * 8 ); - mbedtls_aes_crypt_cbc( &aes_ctx, MBEDTLS_AES_DECRYPT, buflen, - aes_iv, buf, buf ); - - mbedtls_aes_free( &aes_ctx ); - mbedtls_zeroize( aes_key, keylen ); -} -#endif /* MBEDTLS_AES_C */ - -#endif /* MBEDTLS_MD5_C && MBEDTLS_CIPHER_MODE_CBC && - ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ - -int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const char *footer, - const unsigned char *data, const unsigned char *pwd, - size_t pwdlen, size_t *use_len ) -{ - int ret, enc; - size_t len; - unsigned char *buf; - const unsigned char *s1, *s2, *end; -#if defined(MBEDTLS_MD5_C) && defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_DES_C) || defined(MBEDTLS_AES_C) ) - unsigned char pem_iv[16]; - mbedtls_cipher_type_t enc_alg = MBEDTLS_CIPHER_NONE; -#else - ((void) pwd); - ((void) pwdlen); -#endif /* MBEDTLS_MD5_C && MBEDTLS_CIPHER_MODE_CBC && - ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ - - if( ctx == NULL ) - return( MBEDTLS_ERR_PEM_BAD_INPUT_DATA ); - - s1 = (unsigned char *) strstr( (const char *) data, header ); - - if( s1 == NULL ) - return( MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ); - - s2 = (unsigned char *) strstr( (const char *) data, footer ); - - if( s2 == NULL || s2 <= s1 ) - return( MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ); - - s1 += strlen( header ); - if( *s1 == ' ' ) s1++; - if( *s1 == '\r' ) s1++; - if( *s1 == '\n' ) s1++; - else return( MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ); - - end = s2; - end += strlen( footer ); - if( *end == ' ' ) end++; - if( *end == '\r' ) end++; - if( *end == '\n' ) end++; - *use_len = end - data; - - enc = 0; - - if( memcmp( s1, "Proc-Type: 4,ENCRYPTED", 22 ) == 0 ) - { -#if defined(MBEDTLS_MD5_C) && defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_DES_C) || defined(MBEDTLS_AES_C) ) - enc++; - - s1 += 22; - if( *s1 == '\r' ) s1++; - if( *s1 == '\n' ) s1++; - else return( MBEDTLS_ERR_PEM_INVALID_DATA ); - - -#if defined(MBEDTLS_DES_C) - if( memcmp( s1, "DEK-Info: DES-EDE3-CBC,", 23 ) == 0 ) - { - enc_alg = MBEDTLS_CIPHER_DES_EDE3_CBC; - - s1 += 23; - if( pem_get_iv( s1, pem_iv, 8 ) != 0 ) - return( MBEDTLS_ERR_PEM_INVALID_ENC_IV ); - - s1 += 16; - } - else if( memcmp( s1, "DEK-Info: DES-CBC,", 18 ) == 0 ) - { - enc_alg = MBEDTLS_CIPHER_DES_CBC; - - s1 += 18; - if( pem_get_iv( s1, pem_iv, 8) != 0 ) - return( MBEDTLS_ERR_PEM_INVALID_ENC_IV ); - - s1 += 16; - } -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_AES_C) - if( memcmp( s1, "DEK-Info: AES-", 14 ) == 0 ) - { - if( memcmp( s1, "DEK-Info: AES-128-CBC,", 22 ) == 0 ) - enc_alg = MBEDTLS_CIPHER_AES_128_CBC; - else if( memcmp( s1, "DEK-Info: AES-192-CBC,", 22 ) == 0 ) - enc_alg = MBEDTLS_CIPHER_AES_192_CBC; - else if( memcmp( s1, "DEK-Info: AES-256-CBC,", 22 ) == 0 ) - enc_alg = MBEDTLS_CIPHER_AES_256_CBC; - else - return( MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG ); - - s1 += 22; - if( pem_get_iv( s1, pem_iv, 16 ) != 0 ) - return( MBEDTLS_ERR_PEM_INVALID_ENC_IV ); - - s1 += 32; - } -#endif /* MBEDTLS_AES_C */ - - if( enc_alg == MBEDTLS_CIPHER_NONE ) - return( MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG ); - - if( *s1 == '\r' ) s1++; - if( *s1 == '\n' ) s1++; - else return( MBEDTLS_ERR_PEM_INVALID_DATA ); -#else - return( MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE ); -#endif /* MBEDTLS_MD5_C && MBEDTLS_CIPHER_MODE_CBC && - ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ - } - - if( s1 == s2 ) - return( MBEDTLS_ERR_PEM_INVALID_DATA ); - - ret = mbedtls_base64_decode( NULL, 0, &len, s1, s2 - s1 ); - - if( ret == MBEDTLS_ERR_BASE64_INVALID_CHARACTER ) - return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); - - if( ( buf = mbedtls_calloc( 1, len ) ) == NULL ) - return( MBEDTLS_ERR_PEM_ALLOC_FAILED ); - - if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) - { - mbedtls_free( buf ); - return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); - } - - if( enc != 0 ) - { -#if defined(MBEDTLS_MD5_C) && defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_DES_C) || defined(MBEDTLS_AES_C) ) - if( pwd == NULL ) - { - mbedtls_free( buf ); - return( MBEDTLS_ERR_PEM_PASSWORD_REQUIRED ); - } - -#if defined(MBEDTLS_DES_C) - if( enc_alg == MBEDTLS_CIPHER_DES_EDE3_CBC ) - pem_des3_decrypt( pem_iv, buf, len, pwd, pwdlen ); - else if( enc_alg == MBEDTLS_CIPHER_DES_CBC ) - pem_des_decrypt( pem_iv, buf, len, pwd, pwdlen ); -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_AES_C) - if( enc_alg == MBEDTLS_CIPHER_AES_128_CBC ) - pem_aes_decrypt( pem_iv, 16, buf, len, pwd, pwdlen ); - else if( enc_alg == MBEDTLS_CIPHER_AES_192_CBC ) - pem_aes_decrypt( pem_iv, 24, buf, len, pwd, pwdlen ); - else if( enc_alg == MBEDTLS_CIPHER_AES_256_CBC ) - pem_aes_decrypt( pem_iv, 32, buf, len, pwd, pwdlen ); -#endif /* MBEDTLS_AES_C */ - - /* - * The result will be ASN.1 starting with a SEQUENCE tag, with 1 to 3 - * length bytes (allow 4 to be sure) in all known use cases. - * - * Use that as heurisitic to try detecting password mismatchs. - */ - if( len <= 2 || buf[0] != 0x30 || buf[1] > 0x83 ) - { - mbedtls_free( buf ); - return( MBEDTLS_ERR_PEM_PASSWORD_MISMATCH ); - } -#else - mbedtls_free( buf ); - return( MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE ); -#endif /* MBEDTLS_MD5_C && MBEDTLS_CIPHER_MODE_CBC && - ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ - } - - ctx->buf = buf; - ctx->buflen = len; - - return( 0 ); -} - -void mbedtls_pem_free( mbedtls_pem_context *ctx ) -{ - mbedtls_free( ctx->buf ); - mbedtls_free( ctx->info ); - - mbedtls_zeroize( ctx, sizeof( mbedtls_pem_context ) ); -} -#endif /* MBEDTLS_PEM_PARSE_C */ - -#if defined(MBEDTLS_PEM_WRITE_C) -int mbedtls_pem_write_buffer( const char *header, const char *footer, - const unsigned char *der_data, size_t der_len, - unsigned char *buf, size_t buf_len, size_t *olen ) -{ - int ret; - unsigned char *encode_buf, *c, *p = buf; - size_t len = 0, use_len, add_len = 0; - - mbedtls_base64_encode( NULL, 0, &use_len, der_data, der_len ); - add_len = strlen( header ) + strlen( footer ) + ( use_len / 64 ) + 1; - - if( use_len + add_len > buf_len ) - { - *olen = use_len + add_len; - return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); - } - - if( ( encode_buf = mbedtls_calloc( 1, use_len ) ) == NULL ) - return( MBEDTLS_ERR_PEM_ALLOC_FAILED ); - - if( ( ret = mbedtls_base64_encode( encode_buf, use_len, &use_len, der_data, - der_len ) ) != 0 ) - { - mbedtls_free( encode_buf ); - return( ret ); - } - - memcpy( p, header, strlen( header ) ); - p += strlen( header ); - c = encode_buf; - - while( use_len ) - { - len = ( use_len > 64 ) ? 64 : use_len; - memcpy( p, c, len ); - use_len -= len; - p += len; - c += len; - *p++ = '\n'; - } - - memcpy( p, footer, strlen( footer ) ); - p += strlen( footer ); - - *p++ = '\0'; - *olen = p - buf; - - mbedtls_free( encode_buf ); - return( 0 ); -} -#endif /* MBEDTLS_PEM_WRITE_C */ -#endif /* MBEDTLS_PEM_PARSE_C || MBEDTLS_PEM_WRITE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pk.c b/build/premake/premake5/contrib/mbedtls/library/pk.c deleted file mode 100644 index 10bd0a5828..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pk.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Public Key abstraction layer - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PK_C) -#include "mbedtls/pk.h" -#include "mbedtls/pk_internal.h" - -#if defined(MBEDTLS_RSA_C) -#include "mbedtls/rsa.h" -#endif -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif -#if defined(MBEDTLS_ECDSA_C) -#include "mbedtls/ecdsa.h" -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Initialise a mbedtls_pk_context - */ -void mbedtls_pk_init( mbedtls_pk_context *ctx ) -{ - if( ctx == NULL ) - return; - - ctx->pk_info = NULL; - ctx->pk_ctx = NULL; -} - -/* - * Free (the components of) a mbedtls_pk_context - */ -void mbedtls_pk_free( mbedtls_pk_context *ctx ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return; - - ctx->pk_info->ctx_free_func( ctx->pk_ctx ); - - mbedtls_zeroize( ctx, sizeof( mbedtls_pk_context ) ); -} - -/* - * Get pk_info structure from type - */ -const mbedtls_pk_info_t * mbedtls_pk_info_from_type( mbedtls_pk_type_t pk_type ) -{ - switch( pk_type ) { -#if defined(MBEDTLS_RSA_C) - case MBEDTLS_PK_RSA: - return( &mbedtls_rsa_info ); -#endif -#if defined(MBEDTLS_ECP_C) - case MBEDTLS_PK_ECKEY: - return( &mbedtls_eckey_info ); - case MBEDTLS_PK_ECKEY_DH: - return( &mbedtls_eckeydh_info ); -#endif -#if defined(MBEDTLS_ECDSA_C) - case MBEDTLS_PK_ECDSA: - return( &mbedtls_ecdsa_info ); -#endif - /* MBEDTLS_PK_RSA_ALT omitted on purpose */ - default: - return( NULL ); - } -} - -/* - * Initialise context - */ -int mbedtls_pk_setup( mbedtls_pk_context *ctx, const mbedtls_pk_info_t *info ) -{ - if( ctx == NULL || info == NULL || ctx->pk_info != NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ( ctx->pk_ctx = info->ctx_alloc_func() ) == NULL ) - return( MBEDTLS_ERR_PK_ALLOC_FAILED ); - - ctx->pk_info = info; - - return( 0 ); -} - -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -/* - * Initialize an RSA-alt context - */ -int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key, - mbedtls_pk_rsa_alt_decrypt_func decrypt_func, - mbedtls_pk_rsa_alt_sign_func sign_func, - mbedtls_pk_rsa_alt_key_len_func key_len_func ) -{ - mbedtls_rsa_alt_context *rsa_alt; - const mbedtls_pk_info_t *info = &mbedtls_rsa_alt_info; - - if( ctx == NULL || ctx->pk_info != NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ( ctx->pk_ctx = info->ctx_alloc_func() ) == NULL ) - return( MBEDTLS_ERR_PK_ALLOC_FAILED ); - - ctx->pk_info = info; - - rsa_alt = (mbedtls_rsa_alt_context *) ctx->pk_ctx; - - rsa_alt->key = key; - rsa_alt->decrypt_func = decrypt_func; - rsa_alt->sign_func = sign_func; - rsa_alt->key_len_func = key_len_func; - - return( 0 ); -} -#endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ - -/* - * Tell if a PK can do the operations of the given type - */ -int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type ) -{ - /* null or NONE context can't do anything */ - if( ctx == NULL || ctx->pk_info == NULL ) - return( 0 ); - - return( ctx->pk_info->can_do( type ) ); -} - -/* - * Helper for mbedtls_pk_sign and mbedtls_pk_verify - */ -static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len ) -{ - const mbedtls_md_info_t *md_info; - - if( *hash_len != 0 ) - return( 0 ); - - if( ( md_info = mbedtls_md_info_from_type( md_alg ) ) == NULL ) - return( -1 ); - - *hash_len = mbedtls_md_get_size( md_info ); - return( 0 ); -} - -/* - * Verify a signature - */ -int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ) -{ - if( ctx == NULL || ctx->pk_info == NULL || - pk_hashlen_helper( md_alg, &hash_len ) != 0 ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ctx->pk_info->verify_func == NULL ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - - return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg, hash, hash_len, - sig, sig_len ) ); -} - -/* - * Verify a signature with options - */ -int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options, - mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ! mbedtls_pk_can_do( ctx, type ) ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - - if( type == MBEDTLS_PK_RSASSA_PSS ) - { -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PKCS1_V21) - int ret; - const mbedtls_pk_rsassa_pss_options *pss_opts; - - if( options == NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - pss_opts = (const mbedtls_pk_rsassa_pss_options *) options; - - if( sig_len < mbedtls_pk_get_len( ctx ) ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - ret = mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_pk_rsa( *ctx ), - NULL, NULL, MBEDTLS_RSA_PUBLIC, - md_alg, (unsigned int) hash_len, hash, - pss_opts->mgf1_hash_id, - pss_opts->expected_salt_len, - sig ); - if( ret != 0 ) - return( ret ); - - if( sig_len > mbedtls_pk_get_len( ctx ) ) - return( MBEDTLS_ERR_PK_SIG_LEN_MISMATCH ); - - return( 0 ); -#else - return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE ); -#endif - } - - /* General case: no options */ - if( options != NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - return( mbedtls_pk_verify( ctx, md_alg, hash, hash_len, sig, sig_len ) ); -} - -/* - * Make a signature - */ -int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - if( ctx == NULL || ctx->pk_info == NULL || - pk_hashlen_helper( md_alg, &hash_len ) != 0 ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ctx->pk_info->sign_func == NULL ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - - return( ctx->pk_info->sign_func( ctx->pk_ctx, md_alg, hash, hash_len, - sig, sig_len, f_rng, p_rng ) ); -} - -/* - * Decrypt message - */ -int mbedtls_pk_decrypt( mbedtls_pk_context *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ctx->pk_info->decrypt_func == NULL ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - - return( ctx->pk_info->decrypt_func( ctx->pk_ctx, input, ilen, - output, olen, osize, f_rng, p_rng ) ); -} - -/* - * Encrypt message - */ -int mbedtls_pk_encrypt( mbedtls_pk_context *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ctx->pk_info->encrypt_func == NULL ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - - return( ctx->pk_info->encrypt_func( ctx->pk_ctx, input, ilen, - output, olen, osize, f_rng, p_rng ) ); -} - -/* - * Check public-private key pair - */ -int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_context *prv ) -{ - if( pub == NULL || pub->pk_info == NULL || - prv == NULL || prv->pk_info == NULL || - prv->pk_info->check_pair_func == NULL ) - { - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - } - - if( prv->pk_info->type == MBEDTLS_PK_RSA_ALT ) - { - if( pub->pk_info->type != MBEDTLS_PK_RSA ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - } - else - { - if( pub->pk_info != prv->pk_info ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - } - - return( prv->pk_info->check_pair_func( pub->pk_ctx, prv->pk_ctx ) ); -} - -/* - * Get key size in bits - */ -size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( 0 ); - - return( ctx->pk_info->get_bitlen( ctx->pk_ctx ) ); -} - -/* - * Export debug information - */ -int mbedtls_pk_debug( const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *items ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - if( ctx->pk_info->debug_func == NULL ) - return( MBEDTLS_ERR_PK_TYPE_MISMATCH ); - - ctx->pk_info->debug_func( ctx->pk_ctx, items ); - return( 0 ); -} - -/* - * Access the PK type name - */ -const char *mbedtls_pk_get_name( const mbedtls_pk_context *ctx ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( "invalid PK" ); - - return( ctx->pk_info->name ); -} - -/* - * Access the PK type - */ -mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx ) -{ - if( ctx == NULL || ctx->pk_info == NULL ) - return( MBEDTLS_PK_NONE ); - - return( ctx->pk_info->type ); -} - -#endif /* MBEDTLS_PK_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pk_wrap.c b/build/premake/premake5/contrib/mbedtls/library/pk_wrap.c deleted file mode 100644 index 712ad48323..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pk_wrap.c +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Public Key abstraction layer: wrapper functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PK_C) -#include "mbedtls/pk_internal.h" - -/* Even if RSA not activated, for the sake of RSA-alt */ -#include "mbedtls/rsa.h" - -#include - -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif - -#if defined(MBEDTLS_ECDSA_C) -#include "mbedtls/ecdsa.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} -#endif - -#if defined(MBEDTLS_RSA_C) -static int rsa_can_do( mbedtls_pk_type_t type ) -{ - return( type == MBEDTLS_PK_RSA || - type == MBEDTLS_PK_RSASSA_PSS ); -} - -static size_t rsa_get_bitlen( const void *ctx ) -{ - return( 8 * ((const mbedtls_rsa_context *) ctx)->len ); -} - -static int rsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ) -{ - int ret; - - if( sig_len < ((mbedtls_rsa_context *) ctx)->len ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( ( ret = mbedtls_rsa_pkcs1_verify( (mbedtls_rsa_context *) ctx, NULL, NULL, - MBEDTLS_RSA_PUBLIC, md_alg, - (unsigned int) hash_len, hash, sig ) ) != 0 ) - return( ret ); - - if( sig_len > ((mbedtls_rsa_context *) ctx)->len ) - return( MBEDTLS_ERR_PK_SIG_LEN_MISMATCH ); - - return( 0 ); -} - -static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - *sig_len = ((mbedtls_rsa_context *) ctx)->len; - - return( mbedtls_rsa_pkcs1_sign( (mbedtls_rsa_context *) ctx, f_rng, p_rng, MBEDTLS_RSA_PRIVATE, - md_alg, (unsigned int) hash_len, hash, sig ) ); -} - -static int rsa_decrypt_wrap( void *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - if( ilen != ((mbedtls_rsa_context *) ctx)->len ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - return( mbedtls_rsa_pkcs1_decrypt( (mbedtls_rsa_context *) ctx, f_rng, p_rng, - MBEDTLS_RSA_PRIVATE, olen, input, output, osize ) ); -} - -static int rsa_encrypt_wrap( void *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - *olen = ((mbedtls_rsa_context *) ctx)->len; - - if( *olen > osize ) - return( MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE ); - - return( mbedtls_rsa_pkcs1_encrypt( (mbedtls_rsa_context *) ctx, - f_rng, p_rng, MBEDTLS_RSA_PUBLIC, ilen, input, output ) ); -} - -static int rsa_check_pair_wrap( const void *pub, const void *prv ) -{ - return( mbedtls_rsa_check_pub_priv( (const mbedtls_rsa_context *) pub, - (const mbedtls_rsa_context *) prv ) ); -} - -static void *rsa_alloc_wrap( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_rsa_context ) ); - - if( ctx != NULL ) - mbedtls_rsa_init( (mbedtls_rsa_context *) ctx, 0, 0 ); - - return( ctx ); -} - -static void rsa_free_wrap( void *ctx ) -{ - mbedtls_rsa_free( (mbedtls_rsa_context *) ctx ); - mbedtls_free( ctx ); -} - -static void rsa_debug( const void *ctx, mbedtls_pk_debug_item *items ) -{ - items->type = MBEDTLS_PK_DEBUG_MPI; - items->name = "rsa.N"; - items->value = &( ((mbedtls_rsa_context *) ctx)->N ); - - items++; - - items->type = MBEDTLS_PK_DEBUG_MPI; - items->name = "rsa.E"; - items->value = &( ((mbedtls_rsa_context *) ctx)->E ); -} - -const mbedtls_pk_info_t mbedtls_rsa_info = { - MBEDTLS_PK_RSA, - "RSA", - rsa_get_bitlen, - rsa_can_do, - rsa_verify_wrap, - rsa_sign_wrap, - rsa_decrypt_wrap, - rsa_encrypt_wrap, - rsa_check_pair_wrap, - rsa_alloc_wrap, - rsa_free_wrap, - rsa_debug, -}; -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) -/* - * Generic EC key - */ -static int eckey_can_do( mbedtls_pk_type_t type ) -{ - return( type == MBEDTLS_PK_ECKEY || - type == MBEDTLS_PK_ECKEY_DH || - type == MBEDTLS_PK_ECDSA ); -} - -static size_t eckey_get_bitlen( const void *ctx ) -{ - return( ((mbedtls_ecp_keypair *) ctx)->grp.pbits ); -} - -#if defined(MBEDTLS_ECDSA_C) -/* Forward declarations */ -static int ecdsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ); - -static int ecdsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); - -static int eckey_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ) -{ - int ret; - mbedtls_ecdsa_context ecdsa; - - mbedtls_ecdsa_init( &ecdsa ); - - if( ( ret = mbedtls_ecdsa_from_keypair( &ecdsa, ctx ) ) == 0 ) - ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len ); - - mbedtls_ecdsa_free( &ecdsa ); - - return( ret ); -} - -static int eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret; - mbedtls_ecdsa_context ecdsa; - - mbedtls_ecdsa_init( &ecdsa ); - - if( ( ret = mbedtls_ecdsa_from_keypair( &ecdsa, ctx ) ) == 0 ) - ret = ecdsa_sign_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len, - f_rng, p_rng ); - - mbedtls_ecdsa_free( &ecdsa ); - - return( ret ); -} - -#endif /* MBEDTLS_ECDSA_C */ - -static int eckey_check_pair( const void *pub, const void *prv ) -{ - return( mbedtls_ecp_check_pub_priv( (const mbedtls_ecp_keypair *) pub, - (const mbedtls_ecp_keypair *) prv ) ); -} - -static void *eckey_alloc_wrap( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecp_keypair ) ); - - if( ctx != NULL ) - mbedtls_ecp_keypair_init( ctx ); - - return( ctx ); -} - -static void eckey_free_wrap( void *ctx ) -{ - mbedtls_ecp_keypair_free( (mbedtls_ecp_keypair *) ctx ); - mbedtls_free( ctx ); -} - -static void eckey_debug( const void *ctx, mbedtls_pk_debug_item *items ) -{ - items->type = MBEDTLS_PK_DEBUG_ECP; - items->name = "eckey.Q"; - items->value = &( ((mbedtls_ecp_keypair *) ctx)->Q ); -} - -const mbedtls_pk_info_t mbedtls_eckey_info = { - MBEDTLS_PK_ECKEY, - "EC", - eckey_get_bitlen, - eckey_can_do, -#if defined(MBEDTLS_ECDSA_C) - eckey_verify_wrap, - eckey_sign_wrap, -#else - NULL, - NULL, -#endif - NULL, - NULL, - eckey_check_pair, - eckey_alloc_wrap, - eckey_free_wrap, - eckey_debug, -}; - -/* - * EC key restricted to ECDH - */ -static int eckeydh_can_do( mbedtls_pk_type_t type ) -{ - return( type == MBEDTLS_PK_ECKEY || - type == MBEDTLS_PK_ECKEY_DH ); -} - -const mbedtls_pk_info_t mbedtls_eckeydh_info = { - MBEDTLS_PK_ECKEY_DH, - "EC_DH", - eckey_get_bitlen, /* Same underlying key structure */ - eckeydh_can_do, - NULL, - NULL, - NULL, - NULL, - eckey_check_pair, - eckey_alloc_wrap, /* Same underlying key structure */ - eckey_free_wrap, /* Same underlying key structure */ - eckey_debug, /* Same underlying key structure */ -}; -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_ECDSA_C) -static int ecdsa_can_do( mbedtls_pk_type_t type ) -{ - return( type == MBEDTLS_PK_ECDSA ); -} - -static int ecdsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - const unsigned char *sig, size_t sig_len ) -{ - int ret; - ((void) md_alg); - - ret = mbedtls_ecdsa_read_signature( (mbedtls_ecdsa_context *) ctx, - hash, hash_len, sig, sig_len ); - - if( ret == MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH ) - return( MBEDTLS_ERR_PK_SIG_LEN_MISMATCH ); - - return( ret ); -} - -static int ecdsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - return( mbedtls_ecdsa_write_signature( (mbedtls_ecdsa_context *) ctx, - md_alg, hash, hash_len, sig, sig_len, f_rng, p_rng ) ); -} - -static void *ecdsa_alloc_wrap( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecdsa_context ) ); - - if( ctx != NULL ) - mbedtls_ecdsa_init( (mbedtls_ecdsa_context *) ctx ); - - return( ctx ); -} - -static void ecdsa_free_wrap( void *ctx ) -{ - mbedtls_ecdsa_free( (mbedtls_ecdsa_context *) ctx ); - mbedtls_free( ctx ); -} - -const mbedtls_pk_info_t mbedtls_ecdsa_info = { - MBEDTLS_PK_ECDSA, - "ECDSA", - eckey_get_bitlen, /* Compatible key structures */ - ecdsa_can_do, - ecdsa_verify_wrap, - ecdsa_sign_wrap, - NULL, - NULL, - eckey_check_pair, /* Compatible key structures */ - ecdsa_alloc_wrap, - ecdsa_free_wrap, - eckey_debug, /* Compatible key structures */ -}; -#endif /* MBEDTLS_ECDSA_C */ - -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) -/* - * Support for alternative RSA-private implementations - */ - -static int rsa_alt_can_do( mbedtls_pk_type_t type ) -{ - return( type == MBEDTLS_PK_RSA ); -} - -static size_t rsa_alt_get_bitlen( const void *ctx ) -{ - const mbedtls_rsa_alt_context *rsa_alt = (const mbedtls_rsa_alt_context *) ctx; - - return( 8 * rsa_alt->key_len_func( rsa_alt->key ) ); -} - -static int rsa_alt_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, - const unsigned char *hash, size_t hash_len, - unsigned char *sig, size_t *sig_len, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - mbedtls_rsa_alt_context *rsa_alt = (mbedtls_rsa_alt_context *) ctx; - - *sig_len = rsa_alt->key_len_func( rsa_alt->key ); - - return( rsa_alt->sign_func( rsa_alt->key, f_rng, p_rng, MBEDTLS_RSA_PRIVATE, - md_alg, (unsigned int) hash_len, hash, sig ) ); -} - -static int rsa_alt_decrypt_wrap( void *ctx, - const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen, size_t osize, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - mbedtls_rsa_alt_context *rsa_alt = (mbedtls_rsa_alt_context *) ctx; - - ((void) f_rng); - ((void) p_rng); - - if( ilen != rsa_alt->key_len_func( rsa_alt->key ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - return( rsa_alt->decrypt_func( rsa_alt->key, - MBEDTLS_RSA_PRIVATE, olen, input, output, osize ) ); -} - -#if defined(MBEDTLS_RSA_C) -static int rsa_alt_check_pair( const void *pub, const void *prv ) -{ - unsigned char sig[MBEDTLS_MPI_MAX_SIZE]; - unsigned char hash[32]; - size_t sig_len = 0; - int ret; - - if( rsa_alt_get_bitlen( prv ) != rsa_get_bitlen( pub ) ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - - memset( hash, 0x2a, sizeof( hash ) ); - - if( ( ret = rsa_alt_sign_wrap( (void *) prv, MBEDTLS_MD_NONE, - hash, sizeof( hash ), - sig, &sig_len, NULL, NULL ) ) != 0 ) - { - return( ret ); - } - - if( rsa_verify_wrap( (void *) pub, MBEDTLS_MD_NONE, - hash, sizeof( hash ), sig, sig_len ) != 0 ) - { - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - } - - return( 0 ); -} -#endif /* MBEDTLS_RSA_C */ - -static void *rsa_alt_alloc_wrap( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_rsa_alt_context ) ); - - if( ctx != NULL ) - memset( ctx, 0, sizeof( mbedtls_rsa_alt_context ) ); - - return( ctx ); -} - -static void rsa_alt_free_wrap( void *ctx ) -{ - mbedtls_zeroize( ctx, sizeof( mbedtls_rsa_alt_context ) ); - mbedtls_free( ctx ); -} - -const mbedtls_pk_info_t mbedtls_rsa_alt_info = { - MBEDTLS_PK_RSA_ALT, - "RSA-alt", - rsa_alt_get_bitlen, - rsa_alt_can_do, - NULL, - rsa_alt_sign_wrap, - rsa_alt_decrypt_wrap, - NULL, -#if defined(MBEDTLS_RSA_C) - rsa_alt_check_pair, -#else - NULL, -#endif - rsa_alt_alloc_wrap, - rsa_alt_free_wrap, - NULL, -}; - -#endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ - -#endif /* MBEDTLS_PK_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pkcs11.c b/build/premake/premake5/contrib/mbedtls/library/pkcs11.c deleted file mode 100644 index 0ea64252ee..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pkcs11.c +++ /dev/null @@ -1,240 +0,0 @@ -/** - * \file pkcs11.c - * - * \brief Wrapper for PKCS#11 library libpkcs11-helper - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#include "mbedtls/pkcs11.h" - -#if defined(MBEDTLS_PKCS11_C) - -#include "mbedtls/md.h" -#include "mbedtls/oid.h" -#include "mbedtls/x509_crt.h" - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include - -void mbedtls_pkcs11_init( mbedtls_pkcs11_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_pkcs11_context ) ); -} - -int mbedtls_pkcs11_x509_cert_bind( mbedtls_x509_crt *cert, pkcs11h_certificate_t pkcs11_cert ) -{ - int ret = 1; - unsigned char *cert_blob = NULL; - size_t cert_blob_size = 0; - - if( cert == NULL ) - { - ret = 2; - goto cleanup; - } - - if( pkcs11h_certificate_getCertificateBlob( pkcs11_cert, NULL, - &cert_blob_size ) != CKR_OK ) - { - ret = 3; - goto cleanup; - } - - cert_blob = mbedtls_calloc( 1, cert_blob_size ); - if( NULL == cert_blob ) - { - ret = 4; - goto cleanup; - } - - if( pkcs11h_certificate_getCertificateBlob( pkcs11_cert, cert_blob, - &cert_blob_size ) != CKR_OK ) - { - ret = 5; - goto cleanup; - } - - if( 0 != mbedtls_x509_crt_parse( cert, cert_blob, cert_blob_size ) ) - { - ret = 6; - goto cleanup; - } - - ret = 0; - -cleanup: - if( NULL != cert_blob ) - mbedtls_free( cert_blob ); - - return( ret ); -} - - -int mbedtls_pkcs11_priv_key_bind( mbedtls_pkcs11_context *priv_key, - pkcs11h_certificate_t pkcs11_cert ) -{ - int ret = 1; - mbedtls_x509_crt cert; - - mbedtls_x509_crt_init( &cert ); - - if( priv_key == NULL ) - goto cleanup; - - if( 0 != mbedtls_pkcs11_x509_cert_bind( &cert, pkcs11_cert ) ) - goto cleanup; - - priv_key->len = mbedtls_pk_get_len( &cert.pk ); - priv_key->pkcs11h_cert = pkcs11_cert; - - ret = 0; - -cleanup: - mbedtls_x509_crt_free( &cert ); - - return( ret ); -} - -void mbedtls_pkcs11_priv_key_free( mbedtls_pkcs11_context *priv_key ) -{ - if( NULL != priv_key ) - pkcs11h_certificate_freeCertificate( priv_key->pkcs11h_cert ); -} - -int mbedtls_pkcs11_decrypt( mbedtls_pkcs11_context *ctx, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ) -{ - size_t input_len, output_len; - - if( NULL == ctx ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( MBEDTLS_RSA_PRIVATE != mode ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - output_len = input_len = ctx->len; - - if( input_len < 16 || input_len > output_max_len ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - /* Determine size of output buffer */ - if( pkcs11h_certificate_decryptAny( ctx->pkcs11h_cert, CKM_RSA_PKCS, input, - input_len, NULL, &output_len ) != CKR_OK ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - - if( output_len > output_max_len ) - return( MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE ); - - if( pkcs11h_certificate_decryptAny( ctx->pkcs11h_cert, CKM_RSA_PKCS, input, - input_len, output, &output_len ) != CKR_OK ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - *olen = output_len; - return( 0 ); -} - -int mbedtls_pkcs11_sign( mbedtls_pkcs11_context *ctx, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ) -{ - size_t sig_len = 0, asn_len = 0, oid_size = 0; - unsigned char *p = sig; - const char *oid; - - if( NULL == ctx ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( MBEDTLS_RSA_PRIVATE != mode ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( md_alg != MBEDTLS_MD_NONE ) - { - const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( mbedtls_oid_get_oid_by_md( md_alg, &oid, &oid_size ) != 0 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - hashlen = mbedtls_md_get_size( md_info ); - asn_len = 10 + oid_size; - } - - sig_len = ctx->len; - if( hashlen > sig_len || asn_len > sig_len || - hashlen + asn_len > sig_len ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - - if( md_alg != MBEDTLS_MD_NONE ) - { - /* - * DigestInfo ::= SEQUENCE { - * digestAlgorithm DigestAlgorithmIdentifier, - * digest Digest } - * - * DigestAlgorithmIdentifier ::= AlgorithmIdentifier - * - * Digest ::= OCTET STRING - */ - *p++ = MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED; - *p++ = (unsigned char) ( 0x08 + oid_size + hashlen ); - *p++ = MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED; - *p++ = (unsigned char) ( 0x04 + oid_size ); - *p++ = MBEDTLS_ASN1_OID; - *p++ = oid_size & 0xFF; - memcpy( p, oid, oid_size ); - p += oid_size; - *p++ = MBEDTLS_ASN1_NULL; - *p++ = 0x00; - *p++ = MBEDTLS_ASN1_OCTET_STRING; - *p++ = hashlen; - } - - memcpy( p, hash, hashlen ); - - if( pkcs11h_certificate_signAny( ctx->pkcs11h_cert, CKM_RSA_PKCS, sig, - asn_len + hashlen, sig, &sig_len ) != CKR_OK ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - - return( 0 ); -} - -#endif /* defined(MBEDTLS_PKCS11_C) */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pkcs12.c b/build/premake/premake5/contrib/mbedtls/library/pkcs12.c deleted file mode 100644 index 7023b9dbc8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pkcs12.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * PKCS#12 Personal Information Exchange Syntax - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The PKCS #12 Personal Information Exchange Syntax Standard v1.1 - * - * http://www.rsa.com/rsalabs/pkcs/files/h11301-wp-pkcs-12v1-1-personal-information-exchange-syntax.pdf - * ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/pkcs-12v1-1.asn - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PKCS12_C) - -#include "mbedtls/pkcs12.h" -#include "mbedtls/asn1.h" -#include "mbedtls/cipher.h" - -#include - -#if defined(MBEDTLS_ARC4_C) -#include "mbedtls/arc4.h" -#endif - -#if defined(MBEDTLS_DES_C) -#include "mbedtls/des.h" -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -static int pkcs12_parse_pbe_params( mbedtls_asn1_buf *params, - mbedtls_asn1_buf *salt, int *iterations ) -{ - int ret; - unsigned char **p = ¶ms->p; - const unsigned char *end = params->p + params->len; - - /* - * pkcs-12PbeParams ::= SEQUENCE { - * salt OCTET STRING, - * iterations INTEGER - * } - * - */ - if( params->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) - return( MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - if( ( ret = mbedtls_asn1_get_tag( p, end, &salt->len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT + ret ); - - salt->p = *p; - *p += salt->len; - - if( ( ret = mbedtls_asn1_get_int( p, end, iterations ) ) != 0 ) - return( MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT + ret ); - - if( *p != end ) - return( MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -#define PKCS12_MAX_PWDLEN 128 - -static int pkcs12_pbe_derive_key_iv( mbedtls_asn1_buf *pbe_params, mbedtls_md_type_t md_type, - const unsigned char *pwd, size_t pwdlen, - unsigned char *key, size_t keylen, - unsigned char *iv, size_t ivlen ) -{ - int ret, iterations; - mbedtls_asn1_buf salt; - size_t i; - unsigned char unipwd[PKCS12_MAX_PWDLEN * 2 + 2]; - - if( pwdlen > PKCS12_MAX_PWDLEN ) - return( MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA ); - - memset( &salt, 0, sizeof(mbedtls_asn1_buf) ); - memset( &unipwd, 0, sizeof(unipwd) ); - - if( ( ret = pkcs12_parse_pbe_params( pbe_params, &salt, - &iterations ) ) != 0 ) - return( ret ); - - for( i = 0; i < pwdlen; i++ ) - unipwd[i * 2 + 1] = pwd[i]; - - if( ( ret = mbedtls_pkcs12_derivation( key, keylen, unipwd, pwdlen * 2 + 2, - salt.p, salt.len, md_type, - MBEDTLS_PKCS12_DERIVE_KEY, iterations ) ) != 0 ) - { - return( ret ); - } - - if( iv == NULL || ivlen == 0 ) - return( 0 ); - - if( ( ret = mbedtls_pkcs12_derivation( iv, ivlen, unipwd, pwdlen * 2 + 2, - salt.p, salt.len, md_type, - MBEDTLS_PKCS12_DERIVE_IV, iterations ) ) != 0 ) - { - return( ret ); - } - return( 0 ); -} - -#undef PKCS12_MAX_PWDLEN - -int mbedtls_pkcs12_pbe_sha1_rc4_128( mbedtls_asn1_buf *pbe_params, int mode, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *data, size_t len, - unsigned char *output ) -{ -#if !defined(MBEDTLS_ARC4_C) - ((void) pbe_params); - ((void) mode); - ((void) pwd); - ((void) pwdlen); - ((void) data); - ((void) len); - ((void) output); - return( MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE ); -#else - int ret; - unsigned char key[16]; - mbedtls_arc4_context ctx; - ((void) mode); - - mbedtls_arc4_init( &ctx ); - - if( ( ret = pkcs12_pbe_derive_key_iv( pbe_params, MBEDTLS_MD_SHA1, - pwd, pwdlen, - key, 16, NULL, 0 ) ) != 0 ) - { - return( ret ); - } - - mbedtls_arc4_setup( &ctx, key, 16 ); - if( ( ret = mbedtls_arc4_crypt( &ctx, len, data, output ) ) != 0 ) - goto exit; - -exit: - mbedtls_zeroize( key, sizeof( key ) ); - mbedtls_arc4_free( &ctx ); - - return( ret ); -#endif /* MBEDTLS_ARC4_C */ -} - -int mbedtls_pkcs12_pbe( mbedtls_asn1_buf *pbe_params, int mode, - mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *data, size_t len, - unsigned char *output ) -{ - int ret, keylen = 0; - unsigned char key[32]; - unsigned char iv[16]; - const mbedtls_cipher_info_t *cipher_info; - mbedtls_cipher_context_t cipher_ctx; - size_t olen = 0; - - cipher_info = mbedtls_cipher_info_from_type( cipher_type ); - if( cipher_info == NULL ) - return( MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE ); - - keylen = cipher_info->key_bitlen / 8; - - if( ( ret = pkcs12_pbe_derive_key_iv( pbe_params, md_type, pwd, pwdlen, - key, keylen, - iv, cipher_info->iv_size ) ) != 0 ) - { - return( ret ); - } - - mbedtls_cipher_init( &cipher_ctx ); - - if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_cipher_reset( &cipher_ctx ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_cipher_update( &cipher_ctx, data, len, - output, &olen ) ) != 0 ) - { - goto exit; - } - - if( ( ret = mbedtls_cipher_finish( &cipher_ctx, output + olen, &olen ) ) != 0 ) - ret = MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH; - -exit: - mbedtls_zeroize( key, sizeof( key ) ); - mbedtls_zeroize( iv, sizeof( iv ) ); - mbedtls_cipher_free( &cipher_ctx ); - - return( ret ); -} - -static void pkcs12_fill_buffer( unsigned char *data, size_t data_len, - const unsigned char *filler, size_t fill_len ) -{ - unsigned char *p = data; - size_t use_len; - - while( data_len > 0 ) - { - use_len = ( data_len > fill_len ) ? fill_len : data_len; - memcpy( p, filler, use_len ); - p += use_len; - data_len -= use_len; - } -} - -int mbedtls_pkcs12_derivation( unsigned char *data, size_t datalen, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *salt, size_t saltlen, - mbedtls_md_type_t md_type, int id, int iterations ) -{ - int ret; - unsigned int j; - - unsigned char diversifier[128]; - unsigned char salt_block[128], pwd_block[128], hash_block[128]; - unsigned char hash_output[MBEDTLS_MD_MAX_SIZE]; - unsigned char *p; - unsigned char c; - - size_t hlen, use_len, v, i; - - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - - // This version only allows max of 64 bytes of password or salt - if( datalen > 128 || pwdlen > 64 || saltlen > 64 ) - return( MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA ); - - md_info = mbedtls_md_info_from_type( md_type ); - if( md_info == NULL ) - return( MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE ); - - mbedtls_md_init( &md_ctx ); - - if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) - return( ret ); - hlen = mbedtls_md_get_size( md_info ); - - if( hlen <= 32 ) - v = 64; - else - v = 128; - - memset( diversifier, (unsigned char) id, v ); - - pkcs12_fill_buffer( salt_block, v, salt, saltlen ); - pkcs12_fill_buffer( pwd_block, v, pwd, pwdlen ); - - p = data; - while( datalen > 0 ) - { - // Calculate hash( diversifier || salt_block || pwd_block ) - if( ( ret = mbedtls_md_starts( &md_ctx ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_md_update( &md_ctx, diversifier, v ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_md_update( &md_ctx, salt_block, v ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_md_update( &md_ctx, pwd_block, v ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_md_finish( &md_ctx, hash_output ) ) != 0 ) - goto exit; - - // Perform remaining ( iterations - 1 ) recursive hash calculations - for( i = 1; i < (size_t) iterations; i++ ) - { - if( ( ret = mbedtls_md( md_info, hash_output, hlen, hash_output ) ) != 0 ) - goto exit; - } - - use_len = ( datalen > hlen ) ? hlen : datalen; - memcpy( p, hash_output, use_len ); - datalen -= use_len; - p += use_len; - - if( datalen == 0 ) - break; - - // Concatenating copies of hash_output into hash_block (B) - pkcs12_fill_buffer( hash_block, v, hash_output, hlen ); - - // B += 1 - for( i = v; i > 0; i-- ) - if( ++hash_block[i - 1] != 0 ) - break; - - // salt_block += B - c = 0; - for( i = v; i > 0; i-- ) - { - j = salt_block[i - 1] + hash_block[i - 1] + c; - c = (unsigned char) (j >> 8); - salt_block[i - 1] = j & 0xFF; - } - - // pwd_block += B - c = 0; - for( i = v; i > 0; i-- ) - { - j = pwd_block[i - 1] + hash_block[i - 1] + c; - c = (unsigned char) (j >> 8); - pwd_block[i - 1] = j & 0xFF; - } - } - - ret = 0; - -exit: - mbedtls_zeroize( salt_block, sizeof( salt_block ) ); - mbedtls_zeroize( pwd_block, sizeof( pwd_block ) ); - mbedtls_zeroize( hash_block, sizeof( hash_block ) ); - mbedtls_zeroize( hash_output, sizeof( hash_output ) ); - - mbedtls_md_free( &md_ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_PKCS12_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pkcs5.c b/build/premake/premake5/contrib/mbedtls/library/pkcs5.c deleted file mode 100644 index 44af9869b1..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pkcs5.c +++ /dev/null @@ -1,405 +0,0 @@ -/** - * \file pkcs5.c - * - * \brief PKCS#5 functions - * - * \author Mathias Olsson - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * PKCS#5 includes PBKDF2 and more - * - * http://tools.ietf.org/html/rfc2898 (Specification) - * http://tools.ietf.org/html/rfc6070 (Test vectors) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PKCS5_C) - -#include "mbedtls/pkcs5.h" -#include "mbedtls/asn1.h" -#include "mbedtls/cipher.h" -#include "mbedtls/oid.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -static int pkcs5_parse_pbkdf2_params( const mbedtls_asn1_buf *params, - mbedtls_asn1_buf *salt, int *iterations, - int *keylen, mbedtls_md_type_t *md_type ) -{ - int ret; - mbedtls_asn1_buf prf_alg_oid; - unsigned char *p = params->p; - const unsigned char *end = params->p + params->len; - - if( params->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - /* - * PBKDF2-params ::= SEQUENCE { - * salt OCTET STRING, - * iterationCount INTEGER, - * keyLength INTEGER OPTIONAL - * prf AlgorithmIdentifier DEFAULT algid-hmacWithSHA1 - * } - * - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &salt->len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + ret ); - - salt->p = p; - p += salt->len; - - if( ( ret = mbedtls_asn1_get_int( &p, end, iterations ) ) != 0 ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + ret ); - - if( p == end ) - return( 0 ); - - if( ( ret = mbedtls_asn1_get_int( &p, end, keylen ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + ret ); - } - - if( p == end ) - return( 0 ); - - if( ( ret = mbedtls_asn1_get_alg_null( &p, end, &prf_alg_oid ) ) != 0 ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + ret ); - - if( MBEDTLS_OID_CMP( MBEDTLS_OID_HMAC_SHA1, &prf_alg_oid ) != 0 ) - return( MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE ); - - *md_type = MBEDTLS_MD_SHA1; - - if( p != end ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode, - const unsigned char *pwd, size_t pwdlen, - const unsigned char *data, size_t datalen, - unsigned char *output ) -{ - int ret, iterations = 0, keylen = 0; - unsigned char *p, *end; - mbedtls_asn1_buf kdf_alg_oid, enc_scheme_oid, kdf_alg_params, enc_scheme_params; - mbedtls_asn1_buf salt; - mbedtls_md_type_t md_type = MBEDTLS_MD_SHA1; - unsigned char key[32], iv[32]; - size_t olen = 0; - const mbedtls_md_info_t *md_info; - const mbedtls_cipher_info_t *cipher_info; - mbedtls_md_context_t md_ctx; - mbedtls_cipher_type_t cipher_alg; - mbedtls_cipher_context_t cipher_ctx; - - p = pbe_params->p; - end = p + pbe_params->len; - - /* - * PBES2-params ::= SEQUENCE { - * keyDerivationFunc AlgorithmIdentifier {{PBES2-KDFs}}, - * encryptionScheme AlgorithmIdentifier {{PBES2-Encs}} - * } - */ - if( pbe_params->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - if( ( ret = mbedtls_asn1_get_alg( &p, end, &kdf_alg_oid, &kdf_alg_params ) ) != 0 ) - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + ret ); - - // Only PBKDF2 supported at the moment - // - if( MBEDTLS_OID_CMP( MBEDTLS_OID_PKCS5_PBKDF2, &kdf_alg_oid ) != 0 ) - return( MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE ); - - if( ( ret = pkcs5_parse_pbkdf2_params( &kdf_alg_params, - &salt, &iterations, &keylen, - &md_type ) ) != 0 ) - { - return( ret ); - } - - md_info = mbedtls_md_info_from_type( md_type ); - if( md_info == NULL ) - return( MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE ); - - if( ( ret = mbedtls_asn1_get_alg( &p, end, &enc_scheme_oid, - &enc_scheme_params ) ) != 0 ) - { - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT + ret ); - } - - if( mbedtls_oid_get_cipher_alg( &enc_scheme_oid, &cipher_alg ) != 0 ) - return( MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE ); - - cipher_info = mbedtls_cipher_info_from_type( cipher_alg ); - if( cipher_info == NULL ) - return( MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE ); - - /* - * The value of keylen from pkcs5_parse_pbkdf2_params() is ignored - * since it is optional and we don't know if it was set or not - */ - keylen = cipher_info->key_bitlen / 8; - - if( enc_scheme_params.tag != MBEDTLS_ASN1_OCTET_STRING || - enc_scheme_params.len != cipher_info->iv_size ) - { - return( MBEDTLS_ERR_PKCS5_INVALID_FORMAT ); - } - - mbedtls_md_init( &md_ctx ); - mbedtls_cipher_init( &cipher_ctx ); - - memcpy( iv, enc_scheme_params.p, enc_scheme_params.len ); - - if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_pkcs5_pbkdf2_hmac( &md_ctx, pwd, pwdlen, salt.p, salt.len, - iterations, keylen, key ) ) != 0 ) - { - goto exit; - } - - if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) != 0 ) - goto exit; - - if( ( ret = mbedtls_cipher_crypt( &cipher_ctx, iv, enc_scheme_params.len, - data, datalen, output, &olen ) ) != 0 ) - ret = MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH; - -exit: - mbedtls_md_free( &md_ctx ); - mbedtls_cipher_free( &cipher_ctx ); - - return( ret ); -} - -int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *password, - size_t plen, const unsigned char *salt, size_t slen, - unsigned int iteration_count, - uint32_t key_length, unsigned char *output ) -{ - int ret, j; - unsigned int i; - unsigned char md1[MBEDTLS_MD_MAX_SIZE]; - unsigned char work[MBEDTLS_MD_MAX_SIZE]; - unsigned char md_size = mbedtls_md_get_size( ctx->md_info ); - size_t use_len; - unsigned char *out_p = output; - unsigned char counter[4]; - - memset( counter, 0, 4 ); - counter[3] = 1; - - if( iteration_count > 0xFFFFFFFF ) - return( MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA ); - - while( key_length ) - { - // U1 ends up in work - // - if( ( ret = mbedtls_md_hmac_starts( ctx, password, plen ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_md_hmac_update( ctx, salt, slen ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_md_hmac_update( ctx, counter, 4 ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_md_hmac_finish( ctx, work ) ) != 0 ) - return( ret ); - - memcpy( md1, work, md_size ); - - for( i = 1; i < iteration_count; i++ ) - { - // U2 ends up in md1 - // - if( ( ret = mbedtls_md_hmac_starts( ctx, password, plen ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_md_hmac_update( ctx, md1, md_size ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_md_hmac_finish( ctx, md1 ) ) != 0 ) - return( ret ); - - // U1 xor U2 - // - for( j = 0; j < md_size; j++ ) - work[j] ^= md1[j]; - } - - use_len = ( key_length < md_size ) ? key_length : md_size; - memcpy( out_p, work, use_len ); - - key_length -= (uint32_t) use_len; - out_p += use_len; - - for( i = 4; i > 0; i-- ) - if( ++counter[i - 1] != 0 ) - break; - } - - return( 0 ); -} - -#if defined(MBEDTLS_SELF_TEST) - -#if !defined(MBEDTLS_SHA1_C) -int mbedtls_pkcs5_self_test( int verbose ) -{ - if( verbose != 0 ) - mbedtls_printf( " PBKDF2 (SHA1): skipped\n\n" ); - - return( 0 ); -} -#else - -#define MAX_TESTS 6 - -static const size_t plen[MAX_TESTS] = - { 8, 8, 8, 24, 9 }; - -static const unsigned char password[MAX_TESTS][32] = -{ - "password", - "password", - "password", - "passwordPASSWORDpassword", - "pass\0word", -}; - -static const size_t slen[MAX_TESTS] = - { 4, 4, 4, 36, 5 }; - -static const unsigned char salt[MAX_TESTS][40] = -{ - "salt", - "salt", - "salt", - "saltSALTsaltSALTsaltSALTsaltSALTsalt", - "sa\0lt", -}; - -static const uint32_t it_cnt[MAX_TESTS] = - { 1, 2, 4096, 4096, 4096 }; - -static const uint32_t key_len[MAX_TESTS] = - { 20, 20, 20, 25, 16 }; - -static const unsigned char result_key[MAX_TESTS][32] = -{ - { 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71, - 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06, - 0x2f, 0xe0, 0x37, 0xa6 }, - { 0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c, - 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0, - 0xd8, 0xde, 0x89, 0x57 }, - { 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a, - 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, - 0x65, 0xa4, 0x29, 0xc1 }, - { 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b, - 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a, - 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70, - 0x38 }, - { 0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d, - 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3 }, -}; - -int mbedtls_pkcs5_self_test( int verbose ) -{ - mbedtls_md_context_t sha1_ctx; - const mbedtls_md_info_t *info_sha1; - int ret, i; - unsigned char key[64]; - - mbedtls_md_init( &sha1_ctx ); - - info_sha1 = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ); - if( info_sha1 == NULL ) - { - ret = 1; - goto exit; - } - - if( ( ret = mbedtls_md_setup( &sha1_ctx, info_sha1, 1 ) ) != 0 ) - { - ret = 1; - goto exit; - } - - for( i = 0; i < MAX_TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " PBKDF2 (SHA1) #%d: ", i ); - - ret = mbedtls_pkcs5_pbkdf2_hmac( &sha1_ctx, password[i], plen[i], salt[i], - slen[i], it_cnt[i], key_len[i], key ); - if( ret != 0 || - memcmp( result_key[i], key, key_len[i] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - mbedtls_printf( "\n" ); - -exit: - mbedtls_md_free( &sha1_ctx ); - - return( ret ); -} -#endif /* MBEDTLS_SHA1_C */ - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_PKCS5_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pkparse.c b/build/premake/premake5/contrib/mbedtls/library/pkparse.c deleted file mode 100644 index 275429e603..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pkparse.c +++ /dev/null @@ -1,1293 +0,0 @@ -/* - * Public Key layer for parsing key files and structures - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PK_PARSE_C) - -#include "mbedtls/pk.h" -#include "mbedtls/asn1.h" -#include "mbedtls/oid.h" - -#include - -#if defined(MBEDTLS_RSA_C) -#include "mbedtls/rsa.h" -#endif -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif -#if defined(MBEDTLS_ECDSA_C) -#include "mbedtls/ecdsa.h" -#endif -#if defined(MBEDTLS_PEM_PARSE_C) -#include "mbedtls/pem.h" -#endif -#if defined(MBEDTLS_PKCS5_C) -#include "mbedtls/pkcs5.h" -#endif -#if defined(MBEDTLS_PKCS12_C) -#include "mbedtls/pkcs12.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_FS_IO) -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Load all data from a file into a given buffer. - * - * The file is expected to contain either PEM or DER encoded data. - * A terminating null byte is always appended. It is included in the announced - * length only if the data looks like it is PEM encoded. - */ -int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n ) -{ - FILE *f; - long size; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( MBEDTLS_ERR_PK_FILE_IO_ERROR ); - - fseek( f, 0, SEEK_END ); - if( ( size = ftell( f ) ) == -1 ) - { - fclose( f ); - return( MBEDTLS_ERR_PK_FILE_IO_ERROR ); - } - fseek( f, 0, SEEK_SET ); - - *n = (size_t) size; - - if( *n + 1 == 0 || - ( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL ) - { - fclose( f ); - return( MBEDTLS_ERR_PK_ALLOC_FAILED ); - } - - if( fread( *buf, 1, *n, f ) != *n ) - { - fclose( f ); - mbedtls_free( *buf ); - return( MBEDTLS_ERR_PK_FILE_IO_ERROR ); - } - - fclose( f ); - - (*buf)[*n] = '\0'; - - if( strstr( (const char *) *buf, "-----BEGIN " ) != NULL ) - ++*n; - - return( 0 ); -} - -/* - * Load and parse a private key - */ -int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx, - const char *path, const char *pwd ) -{ - int ret; - size_t n; - unsigned char *buf; - - if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) - return( ret ); - - if( pwd == NULL ) - ret = mbedtls_pk_parse_key( ctx, buf, n, NULL, 0 ); - else - ret = mbedtls_pk_parse_key( ctx, buf, n, - (const unsigned char *) pwd, strlen( pwd ) ); - - mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); - - return( ret ); -} - -/* - * Load and parse a public key - */ -int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path ) -{ - int ret; - size_t n; - unsigned char *buf; - - if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) - return( ret ); - - ret = mbedtls_pk_parse_public_key( ctx, buf, n ); - - mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ - -#if defined(MBEDTLS_ECP_C) -/* Minimally parse an ECParameters buffer to and mbedtls_asn1_buf - * - * ECParameters ::= CHOICE { - * namedCurve OBJECT IDENTIFIER - * specifiedCurve SpecifiedECDomain -- = SEQUENCE { ... } - * -- implicitCurve NULL - * } - */ -static int pk_get_ecparams( unsigned char **p, const unsigned char *end, - mbedtls_asn1_buf *params ) -{ - int ret; - - /* Tag may be either OID or SEQUENCE */ - params->tag = **p; - if( params->tag != MBEDTLS_ASN1_OID -#if defined(MBEDTLS_PK_PARSE_EC_EXTENDED) - && params->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) -#endif - ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - } - - if( ( ret = mbedtls_asn1_get_tag( p, end, ¶ms->len, params->tag ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - params->p = *p; - *p += params->len; - - if( *p != end ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -#if defined(MBEDTLS_PK_PARSE_EC_EXTENDED) -/* - * Parse a SpecifiedECDomain (SEC 1 C.2) and (mostly) fill the group with it. - * WARNING: the resulting group should only be used with - * pk_group_id_from_specified(), since its base point may not be set correctly - * if it was encoded compressed. - * - * SpecifiedECDomain ::= SEQUENCE { - * version SpecifiedECDomainVersion(ecdpVer1 | ecdpVer2 | ecdpVer3, ...), - * fieldID FieldID {{FieldTypes}}, - * curve Curve, - * base ECPoint, - * order INTEGER, - * cofactor INTEGER OPTIONAL, - * hash HashAlgorithm OPTIONAL, - * ... - * } - * - * We only support prime-field as field type, and ignore hash and cofactor. - */ -static int pk_group_from_specified( const mbedtls_asn1_buf *params, mbedtls_ecp_group *grp ) -{ - int ret; - unsigned char *p = params->p; - const unsigned char * const end = params->p + params->len; - const unsigned char *end_field, *end_curve; - size_t len; - int ver; - - /* SpecifiedECDomainVersion ::= INTEGER { 1, 2, 3 } */ - if( ( ret = mbedtls_asn1_get_int( &p, end, &ver ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( ver < 1 || ver > 3 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); - - /* - * FieldID { FIELD-ID:IOSet } ::= SEQUENCE { -- Finite field - * fieldType FIELD-ID.&id({IOSet}), - * parameters FIELD-ID.&Type({IOSet}{@fieldType}) - * } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( ret ); - - end_field = p + len; - - /* - * FIELD-ID ::= TYPE-IDENTIFIER - * FieldTypes FIELD-ID ::= { - * { Prime-p IDENTIFIED BY prime-field } | - * { Characteristic-two IDENTIFIED BY characteristic-two-field } - * } - * prime-field OBJECT IDENTIFIER ::= { id-fieldType 1 } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end_field, &len, MBEDTLS_ASN1_OID ) ) != 0 ) - return( ret ); - - if( len != MBEDTLS_OID_SIZE( MBEDTLS_OID_ANSI_X9_62_PRIME_FIELD ) || - memcmp( p, MBEDTLS_OID_ANSI_X9_62_PRIME_FIELD, len ) != 0 ) - { - return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE ); - } - - p += len; - - /* Prime-p ::= INTEGER -- Field of size p. */ - if( ( ret = mbedtls_asn1_get_mpi( &p, end_field, &grp->P ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - grp->pbits = mbedtls_mpi_bitlen( &grp->P ); - - if( p != end_field ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - /* - * Curve ::= SEQUENCE { - * a FieldElement, - * b FieldElement, - * seed BIT STRING OPTIONAL - * -- Shall be present if used in SpecifiedECDomain - * -- with version equal to ecdpVer2 or ecdpVer3 - * } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( ret ); - - end_curve = p + len; - - /* - * FieldElement ::= OCTET STRING - * containing an integer in the case of a prime field - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end_curve, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 || - ( ret = mbedtls_mpi_read_binary( &grp->A, p, len ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - p += len; - - if( ( ret = mbedtls_asn1_get_tag( &p, end_curve, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 || - ( ret = mbedtls_mpi_read_binary( &grp->B, p, len ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - p += len; - - /* Ignore seed BIT STRING OPTIONAL */ - if( ( ret = mbedtls_asn1_get_tag( &p, end_curve, &len, MBEDTLS_ASN1_BIT_STRING ) ) == 0 ) - p += len; - - if( p != end_curve ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - /* - * ECPoint ::= OCTET STRING - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( ( ret = mbedtls_ecp_point_read_binary( grp, &grp->G, - ( const unsigned char *) p, len ) ) != 0 ) - { - /* - * If we can't read the point because it's compressed, cheat by - * reading only the X coordinate and the parity bit of Y. - */ - if( ret != MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE || - ( p[0] != 0x02 && p[0] != 0x03 ) || - len != mbedtls_mpi_size( &grp->P ) + 1 || - mbedtls_mpi_read_binary( &grp->G.X, p + 1, len - 1 ) != 0 || - mbedtls_mpi_lset( &grp->G.Y, p[0] - 2 ) != 0 || - mbedtls_mpi_lset( &grp->G.Z, 1 ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); - } - } - - p += len; - - /* - * order INTEGER - */ - if( ( ret = mbedtls_asn1_get_mpi( &p, end, &grp->N ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - grp->nbits = mbedtls_mpi_bitlen( &grp->N ); - - /* - * Allow optional elements by purposefully not enforcing p == end here. - */ - - return( 0 ); -} - -/* - * Find the group id associated with an (almost filled) group as generated by - * pk_group_from_specified(), or return an error if unknown. - */ -static int pk_group_id_from_group( const mbedtls_ecp_group *grp, mbedtls_ecp_group_id *grp_id ) -{ - int ret = 0; - mbedtls_ecp_group ref; - const mbedtls_ecp_group_id *id; - - mbedtls_ecp_group_init( &ref ); - - for( id = mbedtls_ecp_grp_id_list(); *id != MBEDTLS_ECP_DP_NONE; id++ ) - { - /* Load the group associated to that id */ - mbedtls_ecp_group_free( &ref ); - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ref, *id ) ); - - /* Compare to the group we were given, starting with easy tests */ - if( grp->pbits == ref.pbits && grp->nbits == ref.nbits && - mbedtls_mpi_cmp_mpi( &grp->P, &ref.P ) == 0 && - mbedtls_mpi_cmp_mpi( &grp->A, &ref.A ) == 0 && - mbedtls_mpi_cmp_mpi( &grp->B, &ref.B ) == 0 && - mbedtls_mpi_cmp_mpi( &grp->N, &ref.N ) == 0 && - mbedtls_mpi_cmp_mpi( &grp->G.X, &ref.G.X ) == 0 && - mbedtls_mpi_cmp_mpi( &grp->G.Z, &ref.G.Z ) == 0 && - /* For Y we may only know the parity bit, so compare only that */ - mbedtls_mpi_get_bit( &grp->G.Y, 0 ) == mbedtls_mpi_get_bit( &ref.G.Y, 0 ) ) - { - break; - } - - } - -cleanup: - mbedtls_ecp_group_free( &ref ); - - *grp_id = *id; - - if( ret == 0 && *id == MBEDTLS_ECP_DP_NONE ) - ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; - - return( ret ); -} - -/* - * Parse a SpecifiedECDomain (SEC 1 C.2) and find the associated group ID - */ -static int pk_group_id_from_specified( const mbedtls_asn1_buf *params, - mbedtls_ecp_group_id *grp_id ) -{ - int ret; - mbedtls_ecp_group grp; - - mbedtls_ecp_group_init( &grp ); - - if( ( ret = pk_group_from_specified( params, &grp ) ) != 0 ) - goto cleanup; - - ret = pk_group_id_from_group( &grp, grp_id ); - -cleanup: - mbedtls_ecp_group_free( &grp ); - - return( ret ); -} -#endif /* MBEDTLS_PK_PARSE_EC_EXTENDED */ - -/* - * Use EC parameters to initialise an EC group - * - * ECParameters ::= CHOICE { - * namedCurve OBJECT IDENTIFIER - * specifiedCurve SpecifiedECDomain -- = SEQUENCE { ... } - * -- implicitCurve NULL - */ -static int pk_use_ecparams( const mbedtls_asn1_buf *params, mbedtls_ecp_group *grp ) -{ - int ret; - mbedtls_ecp_group_id grp_id; - - if( params->tag == MBEDTLS_ASN1_OID ) - { - if( mbedtls_oid_get_ec_grp( params, &grp_id ) != 0 ) - return( MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE ); - } - else - { -#if defined(MBEDTLS_PK_PARSE_EC_EXTENDED) - if( ( ret = pk_group_id_from_specified( params, &grp_id ) ) != 0 ) - return( ret ); -#else - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); -#endif - } - - /* - * grp may already be initilialized; if so, make sure IDs match - */ - if( grp->id != MBEDTLS_ECP_DP_NONE && grp->id != grp_id ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); - - if( ( ret = mbedtls_ecp_group_load( grp, grp_id ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -/* - * EC public key is an EC point - * - * The caller is responsible for clearing the structure upon failure if - * desired. Take care to pass along the possible ECP_FEATURE_UNAVAILABLE - * return code of mbedtls_ecp_point_read_binary() and leave p in a usable state. - */ -static int pk_get_ecpubkey( unsigned char **p, const unsigned char *end, - mbedtls_ecp_keypair *key ) -{ - int ret; - - if( ( ret = mbedtls_ecp_point_read_binary( &key->grp, &key->Q, - (const unsigned char *) *p, end - *p ) ) == 0 ) - { - ret = mbedtls_ecp_check_pubkey( &key->grp, &key->Q ); - } - - /* - * We know mbedtls_ecp_point_read_binary consumed all bytes or failed - */ - *p = (unsigned char *) end; - - return( ret ); -} -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_RSA_C) -/* - * RSAPublicKey ::= SEQUENCE { - * modulus INTEGER, -- n - * publicExponent INTEGER -- e - * } - */ -static int pk_get_rsapubkey( unsigned char **p, - const unsigned char *end, - mbedtls_rsa_context *rsa ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY + ret ); - - if( *p + len != end ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - if( ( ret = mbedtls_asn1_get_mpi( p, end, &rsa->N ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( p, end, &rsa->E ) ) != 0 ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY + ret ); - - if( *p != end ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - if( ( ret = mbedtls_rsa_check_pubkey( rsa ) ) != 0 ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY ); - - rsa->len = mbedtls_mpi_size( &rsa->N ); - - return( 0 ); -} -#endif /* MBEDTLS_RSA_C */ - -/* Get a PK algorithm identifier - * - * AlgorithmIdentifier ::= SEQUENCE { - * algorithm OBJECT IDENTIFIER, - * parameters ANY DEFINED BY algorithm OPTIONAL } - */ -static int pk_get_pk_alg( unsigned char **p, - const unsigned char *end, - mbedtls_pk_type_t *pk_alg, mbedtls_asn1_buf *params ) -{ - int ret; - mbedtls_asn1_buf alg_oid; - - memset( params, 0, sizeof(mbedtls_asn1_buf) ); - - if( ( ret = mbedtls_asn1_get_alg( p, end, &alg_oid, params ) ) != 0 ) - return( MBEDTLS_ERR_PK_INVALID_ALG + ret ); - - if( mbedtls_oid_get_pk_alg( &alg_oid, pk_alg ) != 0 ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - /* - * No parameters with RSA (only for EC) - */ - if( *pk_alg == MBEDTLS_PK_RSA && - ( ( params->tag != MBEDTLS_ASN1_NULL && params->tag != 0 ) || - params->len != 0 ) ) - { - return( MBEDTLS_ERR_PK_INVALID_ALG ); - } - - return( 0 ); -} - -/* - * SubjectPublicKeyInfo ::= SEQUENCE { - * algorithm AlgorithmIdentifier, - * subjectPublicKey BIT STRING } - */ -int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end, - mbedtls_pk_context *pk ) -{ - int ret; - size_t len; - mbedtls_asn1_buf alg_params; - mbedtls_pk_type_t pk_alg = MBEDTLS_PK_NONE; - const mbedtls_pk_info_t *pk_info; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - end = *p + len; - - if( ( ret = pk_get_pk_alg( p, end, &pk_alg, &alg_params ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_asn1_get_bitstring_null( p, end, &len ) ) != 0 ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY + ret ); - - if( *p + len != end ) - return( MBEDTLS_ERR_PK_INVALID_PUBKEY + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - if( ( pk_info = mbedtls_pk_info_from_type( pk_alg ) ) == NULL ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ) - return( ret ); - -#if defined(MBEDTLS_RSA_C) - if( pk_alg == MBEDTLS_PK_RSA ) - { - ret = pk_get_rsapubkey( p, end, mbedtls_pk_rsa( *pk ) ); - } else -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_ECP_C) - if( pk_alg == MBEDTLS_PK_ECKEY_DH || pk_alg == MBEDTLS_PK_ECKEY ) - { - ret = pk_use_ecparams( &alg_params, &mbedtls_pk_ec( *pk )->grp ); - if( ret == 0 ) - ret = pk_get_ecpubkey( p, end, mbedtls_pk_ec( *pk ) ); - } else -#endif /* MBEDTLS_ECP_C */ - ret = MBEDTLS_ERR_PK_UNKNOWN_PK_ALG; - - if( ret == 0 && *p != end ) - ret = MBEDTLS_ERR_PK_INVALID_PUBKEY - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH; - - if( ret != 0 ) - mbedtls_pk_free( pk ); - - return( ret ); -} - -#if defined(MBEDTLS_RSA_C) -/* - * Parse a PKCS#1 encoded private RSA key - */ -static int pk_parse_key_pkcs1_der( mbedtls_rsa_context *rsa, - const unsigned char *key, - size_t keylen ) -{ - int ret; - size_t len; - unsigned char *p, *end; - - p = (unsigned char *) key; - end = p + keylen; - - /* - * This function parses the RSAPrivateKey (PKCS#1) - * - * RSAPrivateKey ::= SEQUENCE { - * version Version, - * modulus INTEGER, -- n - * publicExponent INTEGER, -- e - * privateExponent INTEGER, -- d - * prime1 INTEGER, -- p - * prime2 INTEGER, -- q - * exponent1 INTEGER, -- d mod (p-1) - * exponent2 INTEGER, -- d mod (q-1) - * coefficient INTEGER, -- (inverse of q) mod p - * otherPrimeInfos OtherPrimeInfos OPTIONAL - * } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - end = p + len; - - if( ( ret = mbedtls_asn1_get_int( &p, end, &rsa->ver ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - if( rsa->ver != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_VERSION ); - } - - if( ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->N ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->E ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->D ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->P ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->Q ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->DP ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->DQ ) ) != 0 || - ( ret = mbedtls_asn1_get_mpi( &p, end, &rsa->QP ) ) != 0 ) - { - mbedtls_rsa_free( rsa ); - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - rsa->len = mbedtls_mpi_size( &rsa->N ); - - if( p != end ) - { - mbedtls_rsa_free( rsa ); - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - if( ( ret = mbedtls_rsa_check_privkey( rsa ) ) != 0 ) - { - mbedtls_rsa_free( rsa ); - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) -/* - * Parse a SEC1 encoded private EC key - */ -static int pk_parse_key_sec1_der( mbedtls_ecp_keypair *eck, - const unsigned char *key, - size_t keylen ) -{ - int ret; - int version, pubkey_done; - size_t len; - mbedtls_asn1_buf params; - unsigned char *p = (unsigned char *) key; - unsigned char *end = p + keylen; - unsigned char *end2; - - /* - * RFC 5915, or SEC1 Appendix C.4 - * - * ECPrivateKey ::= SEQUENCE { - * version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), - * privateKey OCTET STRING, - * parameters [0] ECParameters {{ NamedCurve }} OPTIONAL, - * publicKey [1] BIT STRING OPTIONAL - * } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - end = p + len; - - if( ( ret = mbedtls_asn1_get_int( &p, end, &version ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( version != 1 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_VERSION ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( ( ret = mbedtls_mpi_read_binary( &eck->d, p, len ) ) != 0 ) - { - mbedtls_ecp_keypair_free( eck ); - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - p += len; - - pubkey_done = 0; - if( p != end ) - { - /* - * Is 'parameters' present? - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0 ) ) == 0 ) - { - if( ( ret = pk_get_ecparams( &p, p + len, ¶ms) ) != 0 || - ( ret = pk_use_ecparams( ¶ms, &eck->grp ) ) != 0 ) - { - mbedtls_ecp_keypair_free( eck ); - return( ret ); - } - } - else if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - { - mbedtls_ecp_keypair_free( eck ); - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - /* - * Is 'publickey' present? If not, or if we can't read it (eg because it - * is compressed), create it from the private key. - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 1 ) ) == 0 ) - { - end2 = p + len; - - if( ( ret = mbedtls_asn1_get_bitstring_null( &p, end2, &len ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( p + len != end2 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - if( ( ret = pk_get_ecpubkey( &p, end2, eck ) ) == 0 ) - pubkey_done = 1; - else - { - /* - * The only acceptable failure mode of pk_get_ecpubkey() above - * is if the point format is not recognized. - */ - if( ret != MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); - } - } - else if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - { - mbedtls_ecp_keypair_free( eck ); - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - } - - if( ! pubkey_done && - ( ret = mbedtls_ecp_mul( &eck->grp, &eck->Q, &eck->d, &eck->grp.G, - NULL, NULL ) ) != 0 ) - { - mbedtls_ecp_keypair_free( eck ); - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - if( ( ret = mbedtls_ecp_check_privkey( &eck->grp, &eck->d ) ) != 0 ) - { - mbedtls_ecp_keypair_free( eck ); - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_ECP_C */ - -/* - * Parse an unencrypted PKCS#8 encoded private key - */ -static int pk_parse_key_pkcs8_unencrypted_der( - mbedtls_pk_context *pk, - const unsigned char* key, - size_t keylen ) -{ - int ret, version; - size_t len; - mbedtls_asn1_buf params; - unsigned char *p = (unsigned char *) key; - unsigned char *end = p + keylen; - mbedtls_pk_type_t pk_alg = MBEDTLS_PK_NONE; - const mbedtls_pk_info_t *pk_info; - - /* - * This function parses the PrivatKeyInfo object (PKCS#8 v1.2 = RFC 5208) - * - * PrivateKeyInfo ::= SEQUENCE { - * version Version, - * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, - * privateKey PrivateKey, - * attributes [0] IMPLICIT Attributes OPTIONAL } - * - * Version ::= INTEGER - * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier - * PrivateKey ::= OCTET STRING - * - * The PrivateKey OCTET STRING is a SEC1 ECPrivateKey - */ - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - end = p + len; - - if( ( ret = mbedtls_asn1_get_int( &p, end, &version ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( version != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_VERSION + ret ); - - if( ( ret = pk_get_pk_alg( &p, end, &pk_alg, ¶ms ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( len < 1 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - if( ( pk_info = mbedtls_pk_info_from_type( pk_alg ) ) == NULL ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ) - return( ret ); - -#if defined(MBEDTLS_RSA_C) - if( pk_alg == MBEDTLS_PK_RSA ) - { - if( ( ret = pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ), p, len ) ) != 0 ) - { - mbedtls_pk_free( pk ); - return( ret ); - } - } else -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_ECP_C) - if( pk_alg == MBEDTLS_PK_ECKEY || pk_alg == MBEDTLS_PK_ECKEY_DH ) - { - if( ( ret = pk_use_ecparams( ¶ms, &mbedtls_pk_ec( *pk )->grp ) ) != 0 || - ( ret = pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ), p, len ) ) != 0 ) - { - mbedtls_pk_free( pk ); - return( ret ); - } - } else -#endif /* MBEDTLS_ECP_C */ - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - return( 0 ); -} - -/* - * Parse an encrypted PKCS#8 encoded private key - */ -#if defined(MBEDTLS_PKCS12_C) || defined(MBEDTLS_PKCS5_C) -static int pk_parse_key_pkcs8_encrypted_der( - mbedtls_pk_context *pk, - const unsigned char *key, size_t keylen, - const unsigned char *pwd, size_t pwdlen ) -{ - int ret, decrypted = 0; - size_t len; - unsigned char buf[2048]; - unsigned char *p, *end; - mbedtls_asn1_buf pbe_alg_oid, pbe_params; -#if defined(MBEDTLS_PKCS12_C) - mbedtls_cipher_type_t cipher_alg; - mbedtls_md_type_t md_alg; -#endif - - memset( buf, 0, sizeof( buf ) ); - - p = (unsigned char *) key; - end = p + keylen; - - if( pwdlen == 0 ) - return( MBEDTLS_ERR_PK_PASSWORD_REQUIRED ); - - /* - * This function parses the EncryptedPrivatKeyInfo object (PKCS#8) - * - * EncryptedPrivateKeyInfo ::= SEQUENCE { - * encryptionAlgorithm EncryptionAlgorithmIdentifier, - * encryptedData EncryptedData - * } - * - * EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier - * - * EncryptedData ::= OCTET STRING - * - * The EncryptedData OCTET STRING is a PKCS#8 PrivateKeyInfo - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - } - - end = p + len; - - if( ( ret = mbedtls_asn1_get_alg( &p, end, &pbe_alg_oid, &pbe_params ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret ); - - if( len > sizeof( buf ) ) - return( MBEDTLS_ERR_PK_BAD_INPUT_DATA ); - - /* - * Decrypt EncryptedData with appropriate PDE - */ -#if defined(MBEDTLS_PKCS12_C) - if( mbedtls_oid_get_pkcs12_pbe_alg( &pbe_alg_oid, &md_alg, &cipher_alg ) == 0 ) - { - if( ( ret = mbedtls_pkcs12_pbe( &pbe_params, MBEDTLS_PKCS12_PBE_DECRYPT, - cipher_alg, md_alg, - pwd, pwdlen, p, len, buf ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH ) - return( MBEDTLS_ERR_PK_PASSWORD_MISMATCH ); - - return( ret ); - } - - decrypted = 1; - } - else if( MBEDTLS_OID_CMP( MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_128, &pbe_alg_oid ) == 0 ) - { - if( ( ret = mbedtls_pkcs12_pbe_sha1_rc4_128( &pbe_params, - MBEDTLS_PKCS12_PBE_DECRYPT, - pwd, pwdlen, - p, len, buf ) ) != 0 ) - { - return( ret ); - } - - // Best guess for password mismatch when using RC4. If first tag is - // not MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE - // - if( *buf != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) - return( MBEDTLS_ERR_PK_PASSWORD_MISMATCH ); - - decrypted = 1; - } - else -#endif /* MBEDTLS_PKCS12_C */ -#if defined(MBEDTLS_PKCS5_C) - if( MBEDTLS_OID_CMP( MBEDTLS_OID_PKCS5_PBES2, &pbe_alg_oid ) == 0 ) - { - if( ( ret = mbedtls_pkcs5_pbes2( &pbe_params, MBEDTLS_PKCS5_DECRYPT, pwd, pwdlen, - p, len, buf ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH ) - return( MBEDTLS_ERR_PK_PASSWORD_MISMATCH ); - - return( ret ); - } - - decrypted = 1; - } - else -#endif /* MBEDTLS_PKCS5_C */ - { - ((void) pwd); - } - - if( decrypted == 0 ) - return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE ); - - return( pk_parse_key_pkcs8_unencrypted_der( pk, buf, len ) ); -} -#endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */ - -/* - * Parse a private key - */ -int mbedtls_pk_parse_key( mbedtls_pk_context *pk, - const unsigned char *key, size_t keylen, - const unsigned char *pwd, size_t pwdlen ) -{ - int ret; - const mbedtls_pk_info_t *pk_info; - -#if defined(MBEDTLS_PEM_PARSE_C) - size_t len; - mbedtls_pem_context pem; - - mbedtls_pem_init( &pem ); - -#if defined(MBEDTLS_RSA_C) - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( keylen == 0 || key[keylen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN RSA PRIVATE KEY-----", - "-----END RSA PRIVATE KEY-----", - key, pwd, pwdlen, &len ); - - if( ret == 0 ) - { - if( ( pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == NULL ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 || - ( ret = pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ), - pem.buf, pem.buflen ) ) != 0 ) - { - mbedtls_pk_free( pk ); - } - - mbedtls_pem_free( &pem ); - return( ret ); - } - else if( ret == MBEDTLS_ERR_PEM_PASSWORD_MISMATCH ) - return( MBEDTLS_ERR_PK_PASSWORD_MISMATCH ); - else if( ret == MBEDTLS_ERR_PEM_PASSWORD_REQUIRED ) - return( MBEDTLS_ERR_PK_PASSWORD_REQUIRED ); - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - return( ret ); -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( keylen == 0 || key[keylen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN EC PRIVATE KEY-----", - "-----END EC PRIVATE KEY-----", - key, pwd, pwdlen, &len ); - if( ret == 0 ) - { - if( ( pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_ECKEY ) ) == NULL ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 || - ( ret = pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ), - pem.buf, pem.buflen ) ) != 0 ) - { - mbedtls_pk_free( pk ); - } - - mbedtls_pem_free( &pem ); - return( ret ); - } - else if( ret == MBEDTLS_ERR_PEM_PASSWORD_MISMATCH ) - return( MBEDTLS_ERR_PK_PASSWORD_MISMATCH ); - else if( ret == MBEDTLS_ERR_PEM_PASSWORD_REQUIRED ) - return( MBEDTLS_ERR_PK_PASSWORD_REQUIRED ); - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - return( ret ); -#endif /* MBEDTLS_ECP_C */ - - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( keylen == 0 || key[keylen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN PRIVATE KEY-----", - "-----END PRIVATE KEY-----", - key, NULL, 0, &len ); - if( ret == 0 ) - { - if( ( ret = pk_parse_key_pkcs8_unencrypted_der( pk, - pem.buf, pem.buflen ) ) != 0 ) - { - mbedtls_pk_free( pk ); - } - - mbedtls_pem_free( &pem ); - return( ret ); - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - return( ret ); - -#if defined(MBEDTLS_PKCS12_C) || defined(MBEDTLS_PKCS5_C) - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( keylen == 0 || key[keylen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN ENCRYPTED PRIVATE KEY-----", - "-----END ENCRYPTED PRIVATE KEY-----", - key, NULL, 0, &len ); - if( ret == 0 ) - { - if( ( ret = pk_parse_key_pkcs8_encrypted_der( pk, - pem.buf, pem.buflen, - pwd, pwdlen ) ) != 0 ) - { - mbedtls_pk_free( pk ); - } - - mbedtls_pem_free( &pem ); - return( ret ); - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - return( ret ); -#endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */ -#else - ((void) ret); - ((void) pwd); - ((void) pwdlen); -#endif /* MBEDTLS_PEM_PARSE_C */ - - /* - * At this point we only know it's not a PEM formatted key. Could be any - * of the known DER encoded private key formats - * - * We try the different DER format parsers to see if one passes without - * error - */ -#if defined(MBEDTLS_PKCS12_C) || defined(MBEDTLS_PKCS5_C) - if( ( ret = pk_parse_key_pkcs8_encrypted_der( pk, key, keylen, - pwd, pwdlen ) ) == 0 ) - { - return( 0 ); - } - - mbedtls_pk_free( pk ); - - if( ret == MBEDTLS_ERR_PK_PASSWORD_MISMATCH ) - { - return( ret ); - } -#endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */ - - if( ( ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen ) ) == 0 ) - return( 0 ); - - mbedtls_pk_free( pk ); - -#if defined(MBEDTLS_RSA_C) - if( ( pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == NULL ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 || - ( ret = pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ), key, keylen ) ) == 0 ) - { - return( 0 ); - } - - mbedtls_pk_free( pk ); -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) - if( ( pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_ECKEY ) ) == NULL ) - return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG ); - - if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 || - ( ret = pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ), key, keylen ) ) == 0 ) - { - return( 0 ); - } - - mbedtls_pk_free( pk ); -#endif /* MBEDTLS_ECP_C */ - - return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); -} - -/* - * Parse a public key - */ -int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx, - const unsigned char *key, size_t keylen ) -{ - int ret; - unsigned char *p; -#if defined(MBEDTLS_PEM_PARSE_C) - size_t len; - mbedtls_pem_context pem; - - mbedtls_pem_init( &pem ); - - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( keylen == 0 || key[keylen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN PUBLIC KEY-----", - "-----END PUBLIC KEY-----", - key, NULL, 0, &len ); - - if( ret == 0 ) - { - /* - * Was PEM encoded - */ - key = pem.buf; - keylen = pem.buflen; - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - mbedtls_pem_free( &pem ); - return( ret ); - } -#endif /* MBEDTLS_PEM_PARSE_C */ - p = (unsigned char *) key; - - ret = mbedtls_pk_parse_subpubkey( &p, p + keylen, ctx ); - -#if defined(MBEDTLS_PEM_PARSE_C) - mbedtls_pem_free( &pem ); -#endif - - return( ret ); -} - -#endif /* MBEDTLS_PK_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/pkwrite.c b/build/premake/premake5/contrib/mbedtls/library/pkwrite.c deleted file mode 100644 index 83b798c119..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/pkwrite.c +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Public Key layer for writing key files and structures - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PK_WRITE_C) - -#include "mbedtls/pk.h" -#include "mbedtls/asn1write.h" -#include "mbedtls/oid.h" - -#include - -#if defined(MBEDTLS_RSA_C) -#include "mbedtls/rsa.h" -#endif -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif -#if defined(MBEDTLS_ECDSA_C) -#include "mbedtls/ecdsa.h" -#endif -#if defined(MBEDTLS_PEM_WRITE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_RSA_C) -/* - * RSAPublicKey ::= SEQUENCE { - * modulus INTEGER, -- n - * publicExponent INTEGER -- e - * } - */ -static int pk_write_rsa_pubkey( unsigned char **p, unsigned char *start, - mbedtls_rsa_context *rsa ) -{ - int ret; - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( p, start, &rsa->E ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( p, start, &rsa->N ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) -/* - * EC public key is an EC point - */ -static int pk_write_ec_pubkey( unsigned char **p, unsigned char *start, - mbedtls_ecp_keypair *ec ) -{ - int ret; - size_t len = 0; - unsigned char buf[MBEDTLS_ECP_MAX_PT_LEN]; - - if( ( ret = mbedtls_ecp_point_write_binary( &ec->grp, &ec->Q, - MBEDTLS_ECP_PF_UNCOMPRESSED, - &len, buf, sizeof( buf ) ) ) != 0 ) - { - return( ret ); - } - - if( *p < start || (size_t)( *p - start ) < len ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *p -= len; - memcpy( *p, buf, len ); - - return( (int) len ); -} - -/* - * ECParameters ::= CHOICE { - * namedCurve OBJECT IDENTIFIER - * } - */ -static int pk_write_ec_param( unsigned char **p, unsigned char *start, - mbedtls_ecp_keypair *ec ) -{ - int ret; - size_t len = 0; - const char *oid; - size_t oid_len; - - if( ( ret = mbedtls_oid_get_oid_by_ec_grp( ec->grp.id, &oid, &oid_len ) ) != 0 ) - return( ret ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid, oid_len ) ); - - return( (int) len ); -} -#endif /* MBEDTLS_ECP_C */ - -int mbedtls_pk_write_pubkey( unsigned char **p, unsigned char *start, - const mbedtls_pk_context *key ) -{ - int ret; - size_t len = 0; - -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) - MBEDTLS_ASN1_CHK_ADD( len, pk_write_rsa_pubkey( p, start, mbedtls_pk_rsa( *key ) ) ); - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) - MBEDTLS_ASN1_CHK_ADD( len, pk_write_ec_pubkey( p, start, mbedtls_pk_ec( *key ) ) ); - else -#endif - return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE ); - - return( (int) len ); -} - -int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *key, unsigned char *buf, size_t size ) -{ - int ret; - unsigned char *c; - size_t len = 0, par_len = 0, oid_len; - const char *oid; - - c = buf + size; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, key ) ); - - if( c - buf < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - /* - * SubjectPublicKeyInfo ::= SEQUENCE { - * algorithm AlgorithmIdentifier, - * subjectPublicKey BIT STRING } - */ - *--c = 0; - len += 1; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_BIT_STRING ) ); - - if( ( ret = mbedtls_oid_get_oid_by_pk_alg( mbedtls_pk_get_type( key ), - &oid, &oid_len ) ) != 0 ) - { - return( ret ); - } - -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) - { - MBEDTLS_ASN1_CHK_ADD( par_len, pk_write_ec_param( &c, buf, mbedtls_pk_ec( *key ) ) ); - } -#endif - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_algorithm_identifier( &c, buf, oid, oid_len, - par_len ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} - -int mbedtls_pk_write_key_der( mbedtls_pk_context *key, unsigned char *buf, size_t size ) -{ - int ret; - unsigned char *c = buf + size; - size_t len = 0; - -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) - { - mbedtls_rsa_context *rsa = mbedtls_pk_rsa( *key ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->QP ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->DQ ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->DP ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->Q ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->P ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->D ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->E ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &rsa->N ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, buf, 0 ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - } - else -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) - { - mbedtls_ecp_keypair *ec = mbedtls_pk_ec( *key ); - size_t pub_len = 0, par_len = 0; - - /* - * RFC 5915, or SEC1 Appendix C.4 - * - * ECPrivateKey ::= SEQUENCE { - * version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), - * privateKey OCTET STRING, - * parameters [0] ECParameters {{ NamedCurve }} OPTIONAL, - * publicKey [1] BIT STRING OPTIONAL - * } - */ - - /* publicKey */ - MBEDTLS_ASN1_CHK_ADD( pub_len, pk_write_ec_pubkey( &c, buf, ec ) ); - - if( c - buf < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - *--c = 0; - pub_len += 1; - - MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_len( &c, buf, pub_len ) ); - MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_BIT_STRING ) ); - - MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_len( &c, buf, pub_len ) ); - MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_asn1_write_tag( &c, buf, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 1 ) ); - len += pub_len; - - /* parameters */ - MBEDTLS_ASN1_CHK_ADD( par_len, pk_write_ec_param( &c, buf, ec ) ); - - MBEDTLS_ASN1_CHK_ADD( par_len, mbedtls_asn1_write_len( &c, buf, par_len ) ); - MBEDTLS_ASN1_CHK_ADD( par_len, mbedtls_asn1_write_tag( &c, buf, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0 ) ); - len += par_len; - - /* privateKey: write as MPI then fix tag */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, buf, &ec->d ) ); - *c = MBEDTLS_ASN1_OCTET_STRING; - - /* version */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, buf, 1 ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - } - else -#endif /* MBEDTLS_ECP_C */ - return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE ); - - return( (int) len ); -} - -#if defined(MBEDTLS_PEM_WRITE_C) - -#define PEM_BEGIN_PUBLIC_KEY "-----BEGIN PUBLIC KEY-----\n" -#define PEM_END_PUBLIC_KEY "-----END PUBLIC KEY-----\n" - -#define PEM_BEGIN_PRIVATE_KEY_RSA "-----BEGIN RSA PRIVATE KEY-----\n" -#define PEM_END_PRIVATE_KEY_RSA "-----END RSA PRIVATE KEY-----\n" -#define PEM_BEGIN_PRIVATE_KEY_EC "-----BEGIN EC PRIVATE KEY-----\n" -#define PEM_END_PRIVATE_KEY_EC "-----END EC PRIVATE KEY-----\n" - -/* - * Max sizes of key per types. Shown as tag + len (+ content). - */ - -#if defined(MBEDTLS_RSA_C) -/* - * RSA public keys: - * SubjectPublicKeyInfo ::= SEQUENCE { 1 + 3 - * algorithm AlgorithmIdentifier, 1 + 1 (sequence) - * + 1 + 1 + 9 (rsa oid) - * + 1 + 1 (params null) - * subjectPublicKey BIT STRING } 1 + 3 + (1 + below) - * RSAPublicKey ::= SEQUENCE { 1 + 3 - * modulus INTEGER, -- n 1 + 3 + MPI_MAX + 1 - * publicExponent INTEGER -- e 1 + 3 + MPI_MAX + 1 - * } - */ -#define RSA_PUB_DER_MAX_BYTES 38 + 2 * MBEDTLS_MPI_MAX_SIZE - -/* - * RSA private keys: - * RSAPrivateKey ::= SEQUENCE { 1 + 3 - * version Version, 1 + 1 + 1 - * modulus INTEGER, 1 + 3 + MPI_MAX + 1 - * publicExponent INTEGER, 1 + 3 + MPI_MAX + 1 - * privateExponent INTEGER, 1 + 3 + MPI_MAX + 1 - * prime1 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 - * prime2 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 - * exponent1 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 - * exponent2 INTEGER, 1 + 3 + MPI_MAX / 2 + 1 - * coefficient INTEGER, 1 + 3 + MPI_MAX / 2 + 1 - * otherPrimeInfos OtherPrimeInfos OPTIONAL 0 (not supported) - * } - */ -#define MPI_MAX_SIZE_2 MBEDTLS_MPI_MAX_SIZE / 2 + \ - MBEDTLS_MPI_MAX_SIZE % 2 -#define RSA_PRV_DER_MAX_BYTES 47 + 3 * MBEDTLS_MPI_MAX_SIZE \ - + 5 * MPI_MAX_SIZE_2 - -#else /* MBEDTLS_RSA_C */ - -#define RSA_PUB_DER_MAX_BYTES 0 -#define RSA_PRV_DER_MAX_BYTES 0 - -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_ECP_C) -/* - * EC public keys: - * SubjectPublicKeyInfo ::= SEQUENCE { 1 + 2 - * algorithm AlgorithmIdentifier, 1 + 1 (sequence) - * + 1 + 1 + 7 (ec oid) - * + 1 + 1 + 9 (namedCurve oid) - * subjectPublicKey BIT STRING 1 + 2 + 1 [1] - * + 1 (point format) [1] - * + 2 * ECP_MAX (coords) [1] - * } - */ -#define ECP_PUB_DER_MAX_BYTES 30 + 2 * MBEDTLS_ECP_MAX_BYTES - -/* - * EC private keys: - * ECPrivateKey ::= SEQUENCE { 1 + 2 - * version INTEGER , 1 + 1 + 1 - * privateKey OCTET STRING, 1 + 1 + ECP_MAX - * parameters [0] ECParameters OPTIONAL, 1 + 1 + (1 + 1 + 9) - * publicKey [1] BIT STRING OPTIONAL 1 + 2 + [1] above - * } - */ -#define ECP_PRV_DER_MAX_BYTES 29 + 3 * MBEDTLS_ECP_MAX_BYTES - -#else /* MBEDTLS_ECP_C */ - -#define ECP_PUB_DER_MAX_BYTES 0 -#define ECP_PRV_DER_MAX_BYTES 0 - -#endif /* MBEDTLS_ECP_C */ - -#define PUB_DER_MAX_BYTES RSA_PUB_DER_MAX_BYTES > ECP_PUB_DER_MAX_BYTES ? \ - RSA_PUB_DER_MAX_BYTES : ECP_PUB_DER_MAX_BYTES -#define PRV_DER_MAX_BYTES RSA_PRV_DER_MAX_BYTES > ECP_PRV_DER_MAX_BYTES ? \ - RSA_PRV_DER_MAX_BYTES : ECP_PRV_DER_MAX_BYTES - -int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *key, unsigned char *buf, size_t size ) -{ - int ret; - unsigned char output_buf[PUB_DER_MAX_BYTES]; - size_t olen = 0; - - if( ( ret = mbedtls_pk_write_pubkey_der( key, output_buf, - sizeof(output_buf) ) ) < 0 ) - { - return( ret ); - } - - if( ( ret = mbedtls_pem_write_buffer( PEM_BEGIN_PUBLIC_KEY, PEM_END_PUBLIC_KEY, - output_buf + sizeof(output_buf) - ret, - ret, buf, size, &olen ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} - -int mbedtls_pk_write_key_pem( mbedtls_pk_context *key, unsigned char *buf, size_t size ) -{ - int ret; - unsigned char output_buf[PRV_DER_MAX_BYTES]; - const char *begin, *end; - size_t olen = 0; - - if( ( ret = mbedtls_pk_write_key_der( key, output_buf, sizeof(output_buf) ) ) < 0 ) - return( ret ); - -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) - { - begin = PEM_BEGIN_PRIVATE_KEY_RSA; - end = PEM_END_PRIVATE_KEY_RSA; - } - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) - { - begin = PEM_BEGIN_PRIVATE_KEY_EC; - end = PEM_END_PRIVATE_KEY_EC; - } - else -#endif - return( MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE ); - - if( ( ret = mbedtls_pem_write_buffer( begin, end, - output_buf + sizeof(output_buf) - ret, - ret, buf, size, &olen ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_PEM_WRITE_C */ - -#endif /* MBEDTLS_PK_WRITE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/platform.c b/build/premake/premake5/contrib/mbedtls/library/platform.c deleted file mode 100644 index d634c6277e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/platform.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Platform abstraction layer - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) - -#include "mbedtls/platform.h" - -#if defined(MBEDTLS_PLATFORM_MEMORY) -#if !defined(MBEDTLS_PLATFORM_STD_CALLOC) -static void *platform_calloc_uninit( size_t n, size_t size ) -{ - ((void) n); - ((void) size); - return( NULL ); -} - -#define MBEDTLS_PLATFORM_STD_CALLOC platform_calloc_uninit -#endif /* !MBEDTLS_PLATFORM_STD_CALLOC */ - -#if !defined(MBEDTLS_PLATFORM_STD_FREE) -static void platform_free_uninit( void *ptr ) -{ - ((void) ptr); -} - -#define MBEDTLS_PLATFORM_STD_FREE platform_free_uninit -#endif /* !MBEDTLS_PLATFORM_STD_FREE */ - -void * (*mbedtls_calloc)( size_t, size_t ) = MBEDTLS_PLATFORM_STD_CALLOC; -void (*mbedtls_free)( void * ) = MBEDTLS_PLATFORM_STD_FREE; - -int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ), - void (*free_func)( void * ) ) -{ - mbedtls_calloc = calloc_func; - mbedtls_free = free_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_MEMORY */ - -#if defined(_WIN32) -#include -int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... ) -{ - int ret; - va_list argp; - - /* Avoid calling the invalid parameter handler by checking ourselves */ - if( s == NULL || n == 0 || fmt == NULL ) - return( -1 ); - - va_start( argp, fmt ); -#if defined(_TRUNCATE) - ret = _vsnprintf_s( s, n, _TRUNCATE, fmt, argp ); -#else - ret = _vsnprintf( s, n, fmt, argp ); - if( ret < 0 || (size_t) ret == n ) - { - s[n-1] = '\0'; - ret = -1; - } -#endif - va_end( argp ); - - return( ret ); -} -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_SNPRINTF) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_snprintf_uninit( char * s, size_t n, - const char * format, ... ) -{ - ((void) s); - ((void) n); - ((void) format); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_SNPRINTF platform_snprintf_uninit -#endif /* !MBEDTLS_PLATFORM_STD_SNPRINTF */ - -int (*mbedtls_snprintf)( char * s, size_t n, - const char * format, - ... ) = MBEDTLS_PLATFORM_STD_SNPRINTF; - -int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, - const char * format, - ... ) ) -{ - mbedtls_snprintf = snprintf_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ - -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_PRINTF) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_printf_uninit( const char *format, ... ) -{ - ((void) format); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_PRINTF platform_printf_uninit -#endif /* !MBEDTLS_PLATFORM_STD_PRINTF */ - -int (*mbedtls_printf)( const char *, ... ) = MBEDTLS_PLATFORM_STD_PRINTF; - -int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) ) -{ - mbedtls_printf = printf_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ - -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_FPRINTF) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_fprintf_uninit( FILE *stream, const char *format, ... ) -{ - ((void) stream); - ((void) format); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_FPRINTF platform_fprintf_uninit -#endif /* !MBEDTLS_PLATFORM_STD_FPRINTF */ - -int (*mbedtls_fprintf)( FILE *, const char *, ... ) = - MBEDTLS_PLATFORM_STD_FPRINTF; - -int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *, const char *, ... ) ) -{ - mbedtls_fprintf = fprintf_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ - -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_EXIT) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static void platform_exit_uninit( int status ) -{ - ((void) status); -} - -#define MBEDTLS_PLATFORM_STD_EXIT platform_exit_uninit -#endif /* !MBEDTLS_PLATFORM_STD_EXIT */ - -void (*mbedtls_exit)( int status ) = MBEDTLS_PLATFORM_STD_EXIT; - -int mbedtls_platform_set_exit( void (*exit_func)( int status ) ) -{ - mbedtls_exit = exit_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_EXIT_ALT */ - -#endif /* MBEDTLS_PLATFORM_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ripemd160.c b/build/premake/premake5/contrib/mbedtls/library/ripemd160.c deleted file mode 100644 index a55cc3eb41..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ripemd160.c +++ /dev/null @@ -1,464 +0,0 @@ -/* - * RIPE MD-160 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * The RIPEMD-160 algorithm was designed by RIPE in 1996 - * http://homes.esat.kuleuven.be/~bosselae/mbedtls_ripemd160.html - * http://ehash.iaik.tugraz.at/wiki/RIPEMD-160 - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_RIPEMD160_C) - -#include "mbedtls/ripemd160.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -/* - * 32-bit integer manipulation macros (little endian) - */ -#ifndef GET_UINT32_LE -#define GET_UINT32_LE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] ) \ - | ( (uint32_t) (b)[(i) + 1] << 8 ) \ - | ( (uint32_t) (b)[(i) + 2] << 16 ) \ - | ( (uint32_t) (b)[(i) + 3] << 24 ); \ -} -#endif - -#ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ - (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ - (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ - (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ -} -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_ripemd160_context ) ); -} - -void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_ripemd160_context ) ); -} - -void mbedtls_ripemd160_clone( mbedtls_ripemd160_context *dst, - const mbedtls_ripemd160_context *src ) -{ - *dst = *src; -} - -/* - * RIPEMD-160 context setup - */ -void mbedtls_ripemd160_starts( mbedtls_ripemd160_context *ctx ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - ctx->state[0] = 0x67452301; - ctx->state[1] = 0xEFCDAB89; - ctx->state[2] = 0x98BADCFE; - ctx->state[3] = 0x10325476; - ctx->state[4] = 0xC3D2E1F0; -} - -#if !defined(MBEDTLS_RIPEMD160_PROCESS_ALT) -/* - * Process one block - */ -void mbedtls_ripemd160_process( mbedtls_ripemd160_context *ctx, const unsigned char data[64] ) -{ - uint32_t A, B, C, D, E, Ap, Bp, Cp, Dp, Ep, X[16]; - - GET_UINT32_LE( X[ 0], data, 0 ); - GET_UINT32_LE( X[ 1], data, 4 ); - GET_UINT32_LE( X[ 2], data, 8 ); - GET_UINT32_LE( X[ 3], data, 12 ); - GET_UINT32_LE( X[ 4], data, 16 ); - GET_UINT32_LE( X[ 5], data, 20 ); - GET_UINT32_LE( X[ 6], data, 24 ); - GET_UINT32_LE( X[ 7], data, 28 ); - GET_UINT32_LE( X[ 8], data, 32 ); - GET_UINT32_LE( X[ 9], data, 36 ); - GET_UINT32_LE( X[10], data, 40 ); - GET_UINT32_LE( X[11], data, 44 ); - GET_UINT32_LE( X[12], data, 48 ); - GET_UINT32_LE( X[13], data, 52 ); - GET_UINT32_LE( X[14], data, 56 ); - GET_UINT32_LE( X[15], data, 60 ); - - A = Ap = ctx->state[0]; - B = Bp = ctx->state[1]; - C = Cp = ctx->state[2]; - D = Dp = ctx->state[3]; - E = Ep = ctx->state[4]; - -#define F1( x, y, z ) ( x ^ y ^ z ) -#define F2( x, y, z ) ( ( x & y ) | ( ~x & z ) ) -#define F3( x, y, z ) ( ( x | ~y ) ^ z ) -#define F4( x, y, z ) ( ( x & z ) | ( y & ~z ) ) -#define F5( x, y, z ) ( x ^ ( y | ~z ) ) - -#define S( x, n ) ( ( x << n ) | ( x >> (32 - n) ) ) - -#define P( a, b, c, d, e, r, s, f, k ) \ - a += f( b, c, d ) + X[r] + k; \ - a = S( a, s ) + e; \ - c = S( c, 10 ); - -#define P2( a, b, c, d, e, r, s, rp, sp ) \ - P( a, b, c, d, e, r, s, F, K ); \ - P( a ## p, b ## p, c ## p, d ## p, e ## p, rp, sp, Fp, Kp ); - -#define F F1 -#define K 0x00000000 -#define Fp F5 -#define Kp 0x50A28BE6 - P2( A, B, C, D, E, 0, 11, 5, 8 ); - P2( E, A, B, C, D, 1, 14, 14, 9 ); - P2( D, E, A, B, C, 2, 15, 7, 9 ); - P2( C, D, E, A, B, 3, 12, 0, 11 ); - P2( B, C, D, E, A, 4, 5, 9, 13 ); - P2( A, B, C, D, E, 5, 8, 2, 15 ); - P2( E, A, B, C, D, 6, 7, 11, 15 ); - P2( D, E, A, B, C, 7, 9, 4, 5 ); - P2( C, D, E, A, B, 8, 11, 13, 7 ); - P2( B, C, D, E, A, 9, 13, 6, 7 ); - P2( A, B, C, D, E, 10, 14, 15, 8 ); - P2( E, A, B, C, D, 11, 15, 8, 11 ); - P2( D, E, A, B, C, 12, 6, 1, 14 ); - P2( C, D, E, A, B, 13, 7, 10, 14 ); - P2( B, C, D, E, A, 14, 9, 3, 12 ); - P2( A, B, C, D, E, 15, 8, 12, 6 ); -#undef F -#undef K -#undef Fp -#undef Kp - -#define F F2 -#define K 0x5A827999 -#define Fp F4 -#define Kp 0x5C4DD124 - P2( E, A, B, C, D, 7, 7, 6, 9 ); - P2( D, E, A, B, C, 4, 6, 11, 13 ); - P2( C, D, E, A, B, 13, 8, 3, 15 ); - P2( B, C, D, E, A, 1, 13, 7, 7 ); - P2( A, B, C, D, E, 10, 11, 0, 12 ); - P2( E, A, B, C, D, 6, 9, 13, 8 ); - P2( D, E, A, B, C, 15, 7, 5, 9 ); - P2( C, D, E, A, B, 3, 15, 10, 11 ); - P2( B, C, D, E, A, 12, 7, 14, 7 ); - P2( A, B, C, D, E, 0, 12, 15, 7 ); - P2( E, A, B, C, D, 9, 15, 8, 12 ); - P2( D, E, A, B, C, 5, 9, 12, 7 ); - P2( C, D, E, A, B, 2, 11, 4, 6 ); - P2( B, C, D, E, A, 14, 7, 9, 15 ); - P2( A, B, C, D, E, 11, 13, 1, 13 ); - P2( E, A, B, C, D, 8, 12, 2, 11 ); -#undef F -#undef K -#undef Fp -#undef Kp - -#define F F3 -#define K 0x6ED9EBA1 -#define Fp F3 -#define Kp 0x6D703EF3 - P2( D, E, A, B, C, 3, 11, 15, 9 ); - P2( C, D, E, A, B, 10, 13, 5, 7 ); - P2( B, C, D, E, A, 14, 6, 1, 15 ); - P2( A, B, C, D, E, 4, 7, 3, 11 ); - P2( E, A, B, C, D, 9, 14, 7, 8 ); - P2( D, E, A, B, C, 15, 9, 14, 6 ); - P2( C, D, E, A, B, 8, 13, 6, 6 ); - P2( B, C, D, E, A, 1, 15, 9, 14 ); - P2( A, B, C, D, E, 2, 14, 11, 12 ); - P2( E, A, B, C, D, 7, 8, 8, 13 ); - P2( D, E, A, B, C, 0, 13, 12, 5 ); - P2( C, D, E, A, B, 6, 6, 2, 14 ); - P2( B, C, D, E, A, 13, 5, 10, 13 ); - P2( A, B, C, D, E, 11, 12, 0, 13 ); - P2( E, A, B, C, D, 5, 7, 4, 7 ); - P2( D, E, A, B, C, 12, 5, 13, 5 ); -#undef F -#undef K -#undef Fp -#undef Kp - -#define F F4 -#define K 0x8F1BBCDC -#define Fp F2 -#define Kp 0x7A6D76E9 - P2( C, D, E, A, B, 1, 11, 8, 15 ); - P2( B, C, D, E, A, 9, 12, 6, 5 ); - P2( A, B, C, D, E, 11, 14, 4, 8 ); - P2( E, A, B, C, D, 10, 15, 1, 11 ); - P2( D, E, A, B, C, 0, 14, 3, 14 ); - P2( C, D, E, A, B, 8, 15, 11, 14 ); - P2( B, C, D, E, A, 12, 9, 15, 6 ); - P2( A, B, C, D, E, 4, 8, 0, 14 ); - P2( E, A, B, C, D, 13, 9, 5, 6 ); - P2( D, E, A, B, C, 3, 14, 12, 9 ); - P2( C, D, E, A, B, 7, 5, 2, 12 ); - P2( B, C, D, E, A, 15, 6, 13, 9 ); - P2( A, B, C, D, E, 14, 8, 9, 12 ); - P2( E, A, B, C, D, 5, 6, 7, 5 ); - P2( D, E, A, B, C, 6, 5, 10, 15 ); - P2( C, D, E, A, B, 2, 12, 14, 8 ); -#undef F -#undef K -#undef Fp -#undef Kp - -#define F F5 -#define K 0xA953FD4E -#define Fp F1 -#define Kp 0x00000000 - P2( B, C, D, E, A, 4, 9, 12, 8 ); - P2( A, B, C, D, E, 0, 15, 15, 5 ); - P2( E, A, B, C, D, 5, 5, 10, 12 ); - P2( D, E, A, B, C, 9, 11, 4, 9 ); - P2( C, D, E, A, B, 7, 6, 1, 12 ); - P2( B, C, D, E, A, 12, 8, 5, 5 ); - P2( A, B, C, D, E, 2, 13, 8, 14 ); - P2( E, A, B, C, D, 10, 12, 7, 6 ); - P2( D, E, A, B, C, 14, 5, 6, 8 ); - P2( C, D, E, A, B, 1, 12, 2, 13 ); - P2( B, C, D, E, A, 3, 13, 13, 6 ); - P2( A, B, C, D, E, 8, 14, 14, 5 ); - P2( E, A, B, C, D, 11, 11, 0, 15 ); - P2( D, E, A, B, C, 6, 8, 3, 13 ); - P2( C, D, E, A, B, 15, 5, 9, 11 ); - P2( B, C, D, E, A, 13, 6, 11, 11 ); -#undef F -#undef K -#undef Fp -#undef Kp - - C = ctx->state[1] + C + Dp; - ctx->state[1] = ctx->state[2] + D + Ep; - ctx->state[2] = ctx->state[3] + E + Ap; - ctx->state[3] = ctx->state[4] + A + Bp; - ctx->state[4] = ctx->state[0] + B + Cp; - ctx->state[0] = C; -} -#endif /* !MBEDTLS_RIPEMD160_PROCESS_ALT */ - -/* - * RIPEMD-160 process buffer - */ -void mbedtls_ripemd160_update( mbedtls_ripemd160_context *ctx, - const unsigned char *input, size_t ilen ) -{ - size_t fill; - uint32_t left; - - if( ilen == 0 ) - return; - - left = ctx->total[0] & 0x3F; - fill = 64 - left; - - ctx->total[0] += (uint32_t) ilen; - ctx->total[0] &= 0xFFFFFFFF; - - if( ctx->total[0] < (uint32_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), input, fill ); - mbedtls_ripemd160_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 64 ) - { - mbedtls_ripemd160_process( ctx, input ); - input += 64; - ilen -= 64; - } - - if( ilen > 0 ) - { - memcpy( (void *) (ctx->buffer + left), input, ilen ); - } -} - -static const unsigned char ripemd160_padding[64] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * RIPEMD-160 final digest - */ -void mbedtls_ripemd160_finish( mbedtls_ripemd160_context *ctx, unsigned char output[20] ) -{ - uint32_t last, padn; - uint32_t high, low; - unsigned char msglen[8]; - - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT32_LE( low, msglen, 0 ); - PUT_UINT32_LE( high, msglen, 4 ); - - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - - mbedtls_ripemd160_update( ctx, ripemd160_padding, padn ); - mbedtls_ripemd160_update( ctx, msglen, 8 ); - - PUT_UINT32_LE( ctx->state[0], output, 0 ); - PUT_UINT32_LE( ctx->state[1], output, 4 ); - PUT_UINT32_LE( ctx->state[2], output, 8 ); - PUT_UINT32_LE( ctx->state[3], output, 12 ); - PUT_UINT32_LE( ctx->state[4], output, 16 ); -} - -/* - * output = RIPEMD-160( input buffer ) - */ -void mbedtls_ripemd160( const unsigned char *input, size_t ilen, - unsigned char output[20] ) -{ - mbedtls_ripemd160_context ctx; - - mbedtls_ripemd160_init( &ctx ); - mbedtls_ripemd160_starts( &ctx ); - mbedtls_ripemd160_update( &ctx, input, ilen ); - mbedtls_ripemd160_finish( &ctx, output ); - mbedtls_ripemd160_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) -/* - * Test vectors from the RIPEMD-160 paper and - * http://homes.esat.kuleuven.be/~bosselae/mbedtls_ripemd160.html#HMAC - */ -#define TESTS 8 -#define KEYS 2 -static const char *ripemd160_test_input[TESTS] = -{ - "", - "a", - "abc", - "message digest", - "abcdefghijklmnopqrstuvwxyz", - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - "1234567890123456789012345678901234567890" - "1234567890123456789012345678901234567890", -}; - -static const unsigned char ripemd160_test_md[TESTS][20] = -{ - { 0x9c, 0x11, 0x85, 0xa5, 0xc5, 0xe9, 0xfc, 0x54, 0x61, 0x28, - 0x08, 0x97, 0x7e, 0xe8, 0xf5, 0x48, 0xb2, 0x25, 0x8d, 0x31 }, - { 0x0b, 0xdc, 0x9d, 0x2d, 0x25, 0x6b, 0x3e, 0xe9, 0xda, 0xae, - 0x34, 0x7b, 0xe6, 0xf4, 0xdc, 0x83, 0x5a, 0x46, 0x7f, 0xfe }, - { 0x8e, 0xb2, 0x08, 0xf7, 0xe0, 0x5d, 0x98, 0x7a, 0x9b, 0x04, - 0x4a, 0x8e, 0x98, 0xc6, 0xb0, 0x87, 0xf1, 0x5a, 0x0b, 0xfc }, - { 0x5d, 0x06, 0x89, 0xef, 0x49, 0xd2, 0xfa, 0xe5, 0x72, 0xb8, - 0x81, 0xb1, 0x23, 0xa8, 0x5f, 0xfa, 0x21, 0x59, 0x5f, 0x36 }, - { 0xf7, 0x1c, 0x27, 0x10, 0x9c, 0x69, 0x2c, 0x1b, 0x56, 0xbb, - 0xdc, 0xeb, 0x5b, 0x9d, 0x28, 0x65, 0xb3, 0x70, 0x8d, 0xbc }, - { 0x12, 0xa0, 0x53, 0x38, 0x4a, 0x9c, 0x0c, 0x88, 0xe4, 0x05, - 0xa0, 0x6c, 0x27, 0xdc, 0xf4, 0x9a, 0xda, 0x62, 0xeb, 0x2b }, - { 0xb0, 0xe2, 0x0b, 0x6e, 0x31, 0x16, 0x64, 0x02, 0x86, 0xed, - 0x3a, 0x87, 0xa5, 0x71, 0x30, 0x79, 0xb2, 0x1f, 0x51, 0x89 }, - { 0x9b, 0x75, 0x2e, 0x45, 0x57, 0x3d, 0x4b, 0x39, 0xf4, 0xdb, - 0xd3, 0x32, 0x3c, 0xab, 0x82, 0xbf, 0x63, 0x32, 0x6b, 0xfb }, -}; - -/* - * Checkup routine - */ -int mbedtls_ripemd160_self_test( int verbose ) -{ - int i; - unsigned char output[20]; - - memset( output, 0, sizeof output ); - - for( i = 0; i < TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " RIPEMD-160 test #%d: ", i + 1 ); - - mbedtls_ripemd160( (const unsigned char *) ripemd160_test_input[i], - strlen( ripemd160_test_input[i] ), - output ); - - if( memcmp( output, ripemd160_test_md[i], 20 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_RIPEMD160_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/rsa.c b/build/premake/premake5/contrib/mbedtls/library/rsa.c deleted file mode 100644 index efdd055c41..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/rsa.c +++ /dev/null @@ -1,1705 +0,0 @@ -/* - * The RSA public-key cryptosystem - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * RSA was designed by Ron Rivest, Adi Shamir and Len Adleman. - * - * http://theory.lcs.mit.edu/~rivest/rsapaper.pdf - * http://www.cacr.math.uwaterloo.ca/hac/about/chap8.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_RSA_C) - -#include "mbedtls/rsa.h" -#include "mbedtls/oid.h" - -#include - -#if defined(MBEDTLS_PKCS1_V21) -#include "mbedtls/md.h" -#endif - -#if defined(MBEDTLS_PKCS1_V15) && !defined(__OpenBSD__) -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -/* - * Initialize an RSA context - */ -void mbedtls_rsa_init( mbedtls_rsa_context *ctx, - int padding, - int hash_id ) -{ - memset( ctx, 0, sizeof( mbedtls_rsa_context ) ); - - mbedtls_rsa_set_padding( ctx, padding, hash_id ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif -} - -/* - * Set padding for an existing RSA context - */ -void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding, int hash_id ) -{ - ctx->padding = padding; - ctx->hash_id = hash_id; -} - -#if defined(MBEDTLS_GENPRIME) - -/* - * Generate an RSA keypair - */ -int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - unsigned int nbits, int exponent ) -{ - int ret; - mbedtls_mpi P1, Q1, H, G; - - if( f_rng == NULL || nbits < 128 || exponent < 3 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - - /* - * find primes P and Q with Q < P so that: - * GCD( E, (P-1)*(Q-1) ) == 1 - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->E, exponent ) ); - - do - { - MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, ( nbits + 1 ) >> 1, 0, - f_rng, p_rng ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, ( nbits + 1 ) >> 1, 0, - f_rng, p_rng ) ); - - if( mbedtls_mpi_cmp_mpi( &ctx->P, &ctx->Q ) < 0 ) - mbedtls_mpi_swap( &ctx->P, &ctx->Q ); - - if( mbedtls_mpi_cmp_mpi( &ctx->P, &ctx->Q ) == 0 ) - continue; - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->N, &ctx->P, &ctx->Q ) ); - if( mbedtls_mpi_bitlen( &ctx->N ) != nbits ) - continue; - - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &G, &ctx->E, &H ) ); - } - while( mbedtls_mpi_cmp_int( &G, 1 ) != 0 ); - - /* - * D = E^-1 mod ((P-1)*(Q-1)) - * DP = D mod (P - 1) - * DQ = D mod (Q - 1) - * QP = Q^-1 mod P - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->D , &ctx->E, &H ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->DP, &ctx->D, &P1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->DQ, &ctx->D, &Q1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->QP, &ctx->Q, &ctx->P ) ); - - ctx->len = ( mbedtls_mpi_bitlen( &ctx->N ) + 7 ) >> 3; - -cleanup: - - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - - if( ret != 0 ) - { - mbedtls_rsa_free( ctx ); - return( MBEDTLS_ERR_RSA_KEY_GEN_FAILED + ret ); - } - - return( 0 ); -} - -#endif /* MBEDTLS_GENPRIME */ - -/* - * Check a public RSA key - */ -int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx ) -{ - if( !ctx->N.p || !ctx->E.p ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - - if( ( ctx->N.p[0] & 1 ) == 0 || - ( ctx->E.p[0] & 1 ) == 0 ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - - if( mbedtls_mpi_bitlen( &ctx->N ) < 128 || - mbedtls_mpi_bitlen( &ctx->N ) > MBEDTLS_MPI_MAX_BITS ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - - if( mbedtls_mpi_bitlen( &ctx->E ) < 2 || - mbedtls_mpi_cmp_mpi( &ctx->E, &ctx->N ) >= 0 ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - - return( 0 ); -} - -/* - * Check a private RSA key - */ -int mbedtls_rsa_check_privkey( const mbedtls_rsa_context *ctx ) -{ - int ret; - mbedtls_mpi PQ, DE, P1, Q1, H, I, G, G2, L1, L2, DP, DQ, QP; - - if( ( ret = mbedtls_rsa_check_pubkey( ctx ) ) != 0 ) - return( ret ); - - if( !ctx->P.p || !ctx->Q.p || !ctx->D.p ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - - mbedtls_mpi_init( &PQ ); mbedtls_mpi_init( &DE ); mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); - mbedtls_mpi_init( &H ); mbedtls_mpi_init( &I ); mbedtls_mpi_init( &G ); mbedtls_mpi_init( &G2 ); - mbedtls_mpi_init( &L1 ); mbedtls_mpi_init( &L2 ); mbedtls_mpi_init( &DP ); mbedtls_mpi_init( &DQ ); - mbedtls_mpi_init( &QP ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &PQ, &ctx->P, &ctx->Q ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &DE, &ctx->D, &ctx->E ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &G, &ctx->E, &H ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &G2, &P1, &Q1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( &L1, &L2, &H, &G2 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &I, &DE, &L1 ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &DP, &ctx->D, &P1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &DQ, &ctx->D, &Q1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &QP, &ctx->Q, &ctx->P ) ); - /* - * Check for a valid PKCS1v2 private key - */ - if( mbedtls_mpi_cmp_mpi( &PQ, &ctx->N ) != 0 || - mbedtls_mpi_cmp_mpi( &DP, &ctx->DP ) != 0 || - mbedtls_mpi_cmp_mpi( &DQ, &ctx->DQ ) != 0 || - mbedtls_mpi_cmp_mpi( &QP, &ctx->QP ) != 0 || - mbedtls_mpi_cmp_int( &L2, 0 ) != 0 || - mbedtls_mpi_cmp_int( &I, 1 ) != 0 || - mbedtls_mpi_cmp_int( &G, 1 ) != 0 ) - { - ret = MBEDTLS_ERR_RSA_KEY_CHECK_FAILED; - } - -cleanup: - mbedtls_mpi_free( &PQ ); mbedtls_mpi_free( &DE ); mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); - mbedtls_mpi_free( &H ); mbedtls_mpi_free( &I ); mbedtls_mpi_free( &G ); mbedtls_mpi_free( &G2 ); - mbedtls_mpi_free( &L1 ); mbedtls_mpi_free( &L2 ); mbedtls_mpi_free( &DP ); mbedtls_mpi_free( &DQ ); - mbedtls_mpi_free( &QP ); - - if( ret == MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ) - return( ret ); - - if( ret != 0 ) - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED + ret ); - - return( 0 ); -} - -/* - * Check if contexts holding a public and private key match - */ -int mbedtls_rsa_check_pub_priv( const mbedtls_rsa_context *pub, const mbedtls_rsa_context *prv ) -{ - if( mbedtls_rsa_check_pubkey( pub ) != 0 || - mbedtls_rsa_check_privkey( prv ) != 0 ) - { - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - } - - if( mbedtls_mpi_cmp_mpi( &pub->N, &prv->N ) != 0 || - mbedtls_mpi_cmp_mpi( &pub->E, &prv->E ) != 0 ) - { - return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); - } - - return( 0 ); -} - -/* - * Do an RSA public key operation - */ -int mbedtls_rsa_public( mbedtls_rsa_context *ctx, - const unsigned char *input, - unsigned char *output ) -{ - int ret; - size_t olen; - mbedtls_mpi T; - - mbedtls_mpi_init( &T ); - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &T, input, ctx->len ) ); - - if( mbedtls_mpi_cmp_mpi( &T, &ctx->N ) >= 0 ) - { - ret = MBEDTLS_ERR_MPI_BAD_INPUT_DATA; - goto cleanup; - } - - olen = ctx->len; - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T, &T, &ctx->E, &ctx->N, &ctx->RN ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &T, output, olen ) ); - -cleanup: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - mbedtls_mpi_free( &T ); - - if( ret != 0 ) - return( MBEDTLS_ERR_RSA_PUBLIC_FAILED + ret ); - - return( 0 ); -} - -/* - * Generate or update blinding values, see section 10 of: - * KOCHER, Paul C. Timing attacks on implementations of Diffie-Hellman, RSA, - * DSS, and other systems. In : Advances in Cryptology-CRYPTO'96. Springer - * Berlin Heidelberg, 1996. p. 104-113. - */ -static int rsa_prepare_blinding( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) -{ - int ret, count = 0; - - if( ctx->Vf.p != NULL ) - { - /* We already have blinding values, just update them by squaring */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->Vi, &ctx->Vi, &ctx->Vi ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->Vi, &ctx->Vi, &ctx->N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->Vf, &ctx->Vf, &ctx->Vf ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->Vf, &ctx->Vf, &ctx->N ) ); - - goto cleanup; - } - - /* Unblinding value: Vf = random number, invertible mod N */ - do { - if( count++ > 10 ) - return( MBEDTLS_ERR_RSA_RNG_FAILED ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &ctx->Vf, ctx->len - 1, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &ctx->Vi, &ctx->Vf, &ctx->N ) ); - } while( mbedtls_mpi_cmp_int( &ctx->Vi, 1 ) != 0 ); - - /* Blinding value: Vi = Vf^(-e) mod N */ - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->Vi, &ctx->Vf, &ctx->N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->Vi, &ctx->Vi, &ctx->E, &ctx->N, &ctx->RN ) ); - - -cleanup: - return( ret ); -} - -/* - * Do an RSA private key operation - */ -int mbedtls_rsa_private( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - const unsigned char *input, - unsigned char *output ) -{ - int ret; - size_t olen; - mbedtls_mpi T, T1, T2; - - /* Make sure we have private key info, prevent possible misuse */ - if( ctx->P.p == NULL || ctx->Q.p == NULL || ctx->D.p == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - mbedtls_mpi_init( &T ); mbedtls_mpi_init( &T1 ); mbedtls_mpi_init( &T2 ); - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &T, input, ctx->len ) ); - if( mbedtls_mpi_cmp_mpi( &T, &ctx->N ) >= 0 ) - { - ret = MBEDTLS_ERR_MPI_BAD_INPUT_DATA; - goto cleanup; - } - - if( f_rng != NULL ) - { - /* - * Blinding - * T = T * Vi mod N - */ - MBEDTLS_MPI_CHK( rsa_prepare_blinding( ctx, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, &T, &ctx->Vi ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &T, &T, &ctx->N ) ); - } - -#if defined(MBEDTLS_RSA_NO_CRT) - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T, &T, &ctx->D, &ctx->N, &ctx->RN ) ); -#else - /* - * faster decryption using the CRT - * - * T1 = input ^ dP mod P - * T2 = input ^ dQ mod Q - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T1, &T, &ctx->DP, &ctx->P, &ctx->RP ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T2, &T, &ctx->DQ, &ctx->Q, &ctx->RQ ) ); - - /* - * T = (T1 - T2) * (Q^-1 mod P) mod P - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T, &T1, &T2 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T1, &T, &ctx->QP ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &T, &T1, &ctx->P ) ); - - /* - * T = T2 + T * Q - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T1, &T, &ctx->Q ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &T, &T2, &T1 ) ); -#endif /* MBEDTLS_RSA_NO_CRT */ - - if( f_rng != NULL ) - { - /* - * Unblind - * T = T * Vf mod N - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, &T, &ctx->Vf ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &T, &T, &ctx->N ) ); - } - - olen = ctx->len; - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &T, output, olen ) ); - -cleanup: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - mbedtls_mpi_free( &T ); mbedtls_mpi_free( &T1 ); mbedtls_mpi_free( &T2 ); - - if( ret != 0 ) - return( MBEDTLS_ERR_RSA_PRIVATE_FAILED + ret ); - - return( 0 ); -} - -#if defined(MBEDTLS_PKCS1_V21) -/** - * Generate and apply the MGF1 operation (from PKCS#1 v2.1) to a buffer. - * - * \param dst buffer to mask - * \param dlen length of destination buffer - * \param src source of the mask generation - * \param slen length of the source buffer - * \param md_ctx message digest context to use - */ -static void mgf_mask( unsigned char *dst, size_t dlen, unsigned char *src, - size_t slen, mbedtls_md_context_t *md_ctx ) -{ - unsigned char mask[MBEDTLS_MD_MAX_SIZE]; - unsigned char counter[4]; - unsigned char *p; - unsigned int hlen; - size_t i, use_len; - - memset( mask, 0, MBEDTLS_MD_MAX_SIZE ); - memset( counter, 0, 4 ); - - hlen = mbedtls_md_get_size( md_ctx->md_info ); - - // Generate and apply dbMask - // - p = dst; - - while( dlen > 0 ) - { - use_len = hlen; - if( dlen < hlen ) - use_len = dlen; - - mbedtls_md_starts( md_ctx ); - mbedtls_md_update( md_ctx, src, slen ); - mbedtls_md_update( md_ctx, counter, 4 ); - mbedtls_md_finish( md_ctx, mask ); - - for( i = 0; i < use_len; ++i ) - *p++ ^= mask[i]; - - counter[3]++; - - dlen -= use_len; - } -} -#endif /* MBEDTLS_PKCS1_V21 */ - -#if defined(MBEDTLS_PKCS1_V21) -/* - * Implementation of the PKCS#1 v2.1 RSAES-OAEP-ENCRYPT function - */ -int mbedtls_rsa_rsaes_oaep_encrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - const unsigned char *label, size_t label_len, - size_t ilen, - const unsigned char *input, - unsigned char *output ) -{ - size_t olen; - int ret; - unsigned char *p = output; - unsigned int hlen; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( f_rng == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - md_info = mbedtls_md_info_from_type( (mbedtls_md_type_t) ctx->hash_id ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - olen = ctx->len; - hlen = mbedtls_md_get_size( md_info ); - - if( olen < ilen + 2 * hlen + 2 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - memset( output, 0, olen ); - - *p++ = 0; - - // Generate a random octet string seed - // - if( ( ret = f_rng( p_rng, p, hlen ) ) != 0 ) - return( MBEDTLS_ERR_RSA_RNG_FAILED + ret ); - - p += hlen; - - // Construct DB - // - mbedtls_md( md_info, label, label_len, p ); - p += hlen; - p += olen - 2 * hlen - 2 - ilen; - *p++ = 1; - memcpy( p, input, ilen ); - - mbedtls_md_init( &md_ctx ); - mbedtls_md_setup( &md_ctx, md_info, 0 ); - - // maskedDB: Apply dbMask to DB - // - mgf_mask( output + hlen + 1, olen - hlen - 1, output + 1, hlen, - &md_ctx ); - - // maskedSeed: Apply seedMask to seed - // - mgf_mask( output + 1, hlen, output + hlen + 1, olen - hlen - 1, - &md_ctx ); - - mbedtls_md_free( &md_ctx ); - - return( ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, output, output ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, output, output ) ); -} -#endif /* MBEDTLS_PKCS1_V21 */ - -#if defined(MBEDTLS_PKCS1_V15) -/* - * Implementation of the PKCS#1 v2.1 RSAES-PKCS1-V1_5-ENCRYPT function - */ -int mbedtls_rsa_rsaes_pkcs1_v15_encrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t ilen, - const unsigned char *input, - unsigned char *output ) -{ - size_t nb_pad, olen; - int ret; - unsigned char *p = output; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( f_rng == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - olen = ctx->len; - - if( olen < ilen + 11 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - nb_pad = olen - 3 - ilen; - - *p++ = 0; - if( mode == MBEDTLS_RSA_PUBLIC ) - { - *p++ = MBEDTLS_RSA_CRYPT; - - while( nb_pad-- > 0 ) - { - int rng_dl = 100; - - do { - ret = f_rng( p_rng, p, 1 ); - } while( *p == 0 && --rng_dl && ret == 0 ); - - // Check if RNG failed to generate data - // - if( rng_dl == 0 || ret != 0 ) - return( MBEDTLS_ERR_RSA_RNG_FAILED + ret ); - - p++; - } - } - else - { - *p++ = MBEDTLS_RSA_SIGN; - - while( nb_pad-- > 0 ) - *p++ = 0xFF; - } - - *p++ = 0; - memcpy( p, input, ilen ); - - return( ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, output, output ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, output, output ) ); -} -#endif /* MBEDTLS_PKCS1_V15 */ - -/* - * Add the message padding, then do an RSA operation - */ -int mbedtls_rsa_pkcs1_encrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t ilen, - const unsigned char *input, - unsigned char *output ) -{ - switch( ctx->padding ) - { -#if defined(MBEDTLS_PKCS1_V15) - case MBEDTLS_RSA_PKCS_V15: - return mbedtls_rsa_rsaes_pkcs1_v15_encrypt( ctx, f_rng, p_rng, mode, ilen, - input, output ); -#endif - -#if defined(MBEDTLS_PKCS1_V21) - case MBEDTLS_RSA_PKCS_V21: - return mbedtls_rsa_rsaes_oaep_encrypt( ctx, f_rng, p_rng, mode, NULL, 0, - ilen, input, output ); -#endif - - default: - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - } -} - -#if defined(MBEDTLS_PKCS1_V21) -/* - * Implementation of the PKCS#1 v2.1 RSAES-OAEP-DECRYPT function - */ -int mbedtls_rsa_rsaes_oaep_decrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - const unsigned char *label, size_t label_len, - size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ) -{ - int ret; - size_t ilen, i, pad_len; - unsigned char *p, bad, pad_done; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - unsigned char lhash[MBEDTLS_MD_MAX_SIZE]; - unsigned int hlen; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - - /* - * Parameters sanity checks - */ - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - ilen = ctx->len; - - if( ilen < 16 || ilen > sizeof( buf ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - md_info = mbedtls_md_info_from_type( (mbedtls_md_type_t) ctx->hash_id ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - /* - * RSA operation - */ - ret = ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, input, buf ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, input, buf ); - - if( ret != 0 ) - return( ret ); - - /* - * Unmask data and generate lHash - */ - hlen = mbedtls_md_get_size( md_info ); - - mbedtls_md_init( &md_ctx ); - mbedtls_md_setup( &md_ctx, md_info, 0 ); - - /* Generate lHash */ - mbedtls_md( md_info, label, label_len, lhash ); - - /* seed: Apply seedMask to maskedSeed */ - mgf_mask( buf + 1, hlen, buf + hlen + 1, ilen - hlen - 1, - &md_ctx ); - - /* DB: Apply dbMask to maskedDB */ - mgf_mask( buf + hlen + 1, ilen - hlen - 1, buf + 1, hlen, - &md_ctx ); - - mbedtls_md_free( &md_ctx ); - - /* - * Check contents, in "constant-time" - */ - p = buf; - bad = 0; - - bad |= *p++; /* First byte must be 0 */ - - p += hlen; /* Skip seed */ - - /* Check lHash */ - for( i = 0; i < hlen; i++ ) - bad |= lhash[i] ^ *p++; - - /* Get zero-padding len, but always read till end of buffer - * (minus one, for the 01 byte) */ - pad_len = 0; - pad_done = 0; - for( i = 0; i < ilen - 2 * hlen - 2; i++ ) - { - pad_done |= p[i]; - pad_len += ((pad_done | (unsigned char)-pad_done) >> 7) ^ 1; - } - - p += pad_len; - bad |= *p++ ^ 0x01; - - /* - * The only information "leaked" is whether the padding was correct or not - * (eg, no data is copied if it was not correct). This meets the - * recommendations in PKCS#1 v2.2: an opponent cannot distinguish between - * the different error conditions. - */ - if( bad != 0 ) - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - - if( ilen - ( p - buf ) > output_max_len ) - return( MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE ); - - *olen = ilen - (p - buf); - memcpy( output, p, *olen ); - - return( 0 ); -} -#endif /* MBEDTLS_PKCS1_V21 */ - -#if defined(MBEDTLS_PKCS1_V15) -/* - * Implementation of the PKCS#1 v2.1 RSAES-PKCS1-V1_5-DECRYPT function - */ -int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len) -{ - int ret; - size_t ilen, pad_count = 0, i; - unsigned char *p, bad, pad_done = 0; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - ilen = ctx->len; - - if( ilen < 16 || ilen > sizeof( buf ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - ret = ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, input, buf ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, input, buf ); - - if( ret != 0 ) - return( ret ); - - p = buf; - bad = 0; - - /* - * Check and get padding len in "constant-time" - */ - bad |= *p++; /* First byte must be 0 */ - - /* This test does not depend on secret data */ - if( mode == MBEDTLS_RSA_PRIVATE ) - { - bad |= *p++ ^ MBEDTLS_RSA_CRYPT; - - /* Get padding len, but always read till end of buffer - * (minus one, for the 00 byte) */ - for( i = 0; i < ilen - 3; i++ ) - { - pad_done |= ((p[i] | (unsigned char)-p[i]) >> 7) ^ 1; - pad_count += ((pad_done | (unsigned char)-pad_done) >> 7) ^ 1; - } - - p += pad_count; - bad |= *p++; /* Must be zero */ - } - else - { - bad |= *p++ ^ MBEDTLS_RSA_SIGN; - - /* Get padding len, but always read till end of buffer - * (minus one, for the 00 byte) */ - for( i = 0; i < ilen - 3; i++ ) - { - pad_done |= ( p[i] != 0xFF ); - pad_count += ( pad_done == 0 ); - } - - p += pad_count; - bad |= *p++; /* Must be zero */ - } - - if( bad ) - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - - if( ilen - ( p - buf ) > output_max_len ) - return( MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE ); - - *olen = ilen - (p - buf); - memcpy( output, p, *olen ); - - return( 0 ); -} -#endif /* MBEDTLS_PKCS1_V15 */ - -/* - * Do an RSA operation, then remove the message padding - */ -int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len) -{ - switch( ctx->padding ) - { -#if defined(MBEDTLS_PKCS1_V15) - case MBEDTLS_RSA_PKCS_V15: - return mbedtls_rsa_rsaes_pkcs1_v15_decrypt( ctx, f_rng, p_rng, mode, olen, - input, output, output_max_len ); -#endif - -#if defined(MBEDTLS_PKCS1_V21) - case MBEDTLS_RSA_PKCS_V21: - return mbedtls_rsa_rsaes_oaep_decrypt( ctx, f_rng, p_rng, mode, NULL, 0, - olen, input, output, - output_max_len ); -#endif - - default: - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - } -} - -#if defined(MBEDTLS_PKCS1_V21) -/* - * Implementation of the PKCS#1 v2.1 RSASSA-PSS-SIGN function - */ -int mbedtls_rsa_rsassa_pss_sign( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ) -{ - size_t olen; - unsigned char *p = sig; - unsigned char salt[MBEDTLS_MD_MAX_SIZE]; - unsigned int slen, hlen, offset = 0; - int ret; - size_t msb; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( f_rng == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - olen = ctx->len; - - if( md_alg != MBEDTLS_MD_NONE ) - { - // Gather length of hash to sign - // - md_info = mbedtls_md_info_from_type( md_alg ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - hashlen = mbedtls_md_get_size( md_info ); - } - - md_info = mbedtls_md_info_from_type( (mbedtls_md_type_t) ctx->hash_id ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - hlen = mbedtls_md_get_size( md_info ); - slen = hlen; - - if( olen < hlen + slen + 2 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - memset( sig, 0, olen ); - - // Generate salt of length slen - // - if( ( ret = f_rng( p_rng, salt, slen ) ) != 0 ) - return( MBEDTLS_ERR_RSA_RNG_FAILED + ret ); - - // Note: EMSA-PSS encoding is over the length of N - 1 bits - // - msb = mbedtls_mpi_bitlen( &ctx->N ) - 1; - p += olen - hlen * 2 - 2; - *p++ = 0x01; - memcpy( p, salt, slen ); - p += slen; - - mbedtls_md_init( &md_ctx ); - mbedtls_md_setup( &md_ctx, md_info, 0 ); - - // Generate H = Hash( M' ) - // - mbedtls_md_starts( &md_ctx ); - mbedtls_md_update( &md_ctx, p, 8 ); - mbedtls_md_update( &md_ctx, hash, hashlen ); - mbedtls_md_update( &md_ctx, salt, slen ); - mbedtls_md_finish( &md_ctx, p ); - - // Compensate for boundary condition when applying mask - // - if( msb % 8 == 0 ) - offset = 1; - - // maskedDB: Apply dbMask to DB - // - mgf_mask( sig + offset, olen - hlen - 1 - offset, p, hlen, &md_ctx ); - - mbedtls_md_free( &md_ctx ); - - msb = mbedtls_mpi_bitlen( &ctx->N ) - 1; - sig[0] &= 0xFF >> ( olen * 8 - msb ); - - p += hlen; - *p++ = 0xBC; - - return( ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, sig, sig ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, sig, sig ) ); -} -#endif /* MBEDTLS_PKCS1_V21 */ - -#if defined(MBEDTLS_PKCS1_V15) -/* - * Implementation of the PKCS#1 v2.1 RSASSA-PKCS1-V1_5-SIGN function - */ -/* - * Do an RSA operation to sign the message digest - */ -int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ) -{ - size_t nb_pad, olen, oid_size = 0; - unsigned char *p = sig; - const char *oid = NULL; - unsigned char *sig_try = NULL, *verif = NULL; - size_t i; - unsigned char diff; - volatile unsigned char diff_no_optimize; - int ret; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - olen = ctx->len; - nb_pad = olen - 3; - - if( md_alg != MBEDTLS_MD_NONE ) - { - const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( mbedtls_oid_get_oid_by_md( md_alg, &oid, &oid_size ) != 0 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - nb_pad -= 10 + oid_size; - - hashlen = mbedtls_md_get_size( md_info ); - } - - nb_pad -= hashlen; - - if( ( nb_pad < 8 ) || ( nb_pad > olen ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - *p++ = 0; - *p++ = MBEDTLS_RSA_SIGN; - memset( p, 0xFF, nb_pad ); - p += nb_pad; - *p++ = 0; - - if( md_alg == MBEDTLS_MD_NONE ) - { - memcpy( p, hash, hashlen ); - } - else - { - /* - * DigestInfo ::= SEQUENCE { - * digestAlgorithm DigestAlgorithmIdentifier, - * digest Digest } - * - * DigestAlgorithmIdentifier ::= AlgorithmIdentifier - * - * Digest ::= OCTET STRING - */ - *p++ = MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED; - *p++ = (unsigned char) ( 0x08 + oid_size + hashlen ); - *p++ = MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED; - *p++ = (unsigned char) ( 0x04 + oid_size ); - *p++ = MBEDTLS_ASN1_OID; - *p++ = oid_size & 0xFF; - memcpy( p, oid, oid_size ); - p += oid_size; - *p++ = MBEDTLS_ASN1_NULL; - *p++ = 0x00; - *p++ = MBEDTLS_ASN1_OCTET_STRING; - *p++ = hashlen; - memcpy( p, hash, hashlen ); - } - - if( mode == MBEDTLS_RSA_PUBLIC ) - return( mbedtls_rsa_public( ctx, sig, sig ) ); - - /* - * In order to prevent Lenstra's attack, make the signature in a - * temporary buffer and check it before returning it. - */ - sig_try = mbedtls_calloc( 1, ctx->len ); - if( sig_try == NULL ) - return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); - - verif = mbedtls_calloc( 1, ctx->len ); - if( verif == NULL ) - { - mbedtls_free( sig_try ); - return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); - } - - MBEDTLS_MPI_CHK( mbedtls_rsa_private( ctx, f_rng, p_rng, sig, sig_try ) ); - MBEDTLS_MPI_CHK( mbedtls_rsa_public( ctx, sig_try, verif ) ); - - /* Compare in constant time just in case */ - for( diff = 0, i = 0; i < ctx->len; i++ ) - diff |= verif[i] ^ sig[i]; - diff_no_optimize = diff; - - if( diff_no_optimize != 0 ) - { - ret = MBEDTLS_ERR_RSA_PRIVATE_FAILED; - goto cleanup; - } - - memcpy( sig, sig_try, ctx->len ); - -cleanup: - mbedtls_free( sig_try ); - mbedtls_free( verif ); - - return( ret ); -} -#endif /* MBEDTLS_PKCS1_V15 */ - -/* - * Do an RSA operation to sign the message digest - */ -int mbedtls_rsa_pkcs1_sign( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ) -{ - switch( ctx->padding ) - { -#if defined(MBEDTLS_PKCS1_V15) - case MBEDTLS_RSA_PKCS_V15: - return mbedtls_rsa_rsassa_pkcs1_v15_sign( ctx, f_rng, p_rng, mode, md_alg, - hashlen, hash, sig ); -#endif - -#if defined(MBEDTLS_PKCS1_V21) - case MBEDTLS_RSA_PKCS_V21: - return mbedtls_rsa_rsassa_pss_sign( ctx, f_rng, p_rng, mode, md_alg, - hashlen, hash, sig ); -#endif - - default: - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - } -} - -#if defined(MBEDTLS_PKCS1_V21) -/* - * Implementation of the PKCS#1 v2.1 RSASSA-PSS-VERIFY function - */ -int mbedtls_rsa_rsassa_pss_verify_ext( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - mbedtls_md_type_t mgf1_hash_id, - int expected_salt_len, - const unsigned char *sig ) -{ - int ret; - size_t siglen; - unsigned char *p; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - unsigned char result[MBEDTLS_MD_MAX_SIZE]; - unsigned char zeros[8]; - unsigned int hlen; - size_t slen, msb; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V21 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - siglen = ctx->len; - - if( siglen < 16 || siglen > sizeof( buf ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - ret = ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, sig, buf ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, sig, buf ); - - if( ret != 0 ) - return( ret ); - - p = buf; - - if( buf[siglen - 1] != 0xBC ) - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - - if( md_alg != MBEDTLS_MD_NONE ) - { - // Gather length of hash to sign - // - md_info = mbedtls_md_info_from_type( md_alg ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - hashlen = mbedtls_md_get_size( md_info ); - } - - md_info = mbedtls_md_info_from_type( mgf1_hash_id ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - hlen = mbedtls_md_get_size( md_info ); - slen = siglen - hlen - 1; /* Currently length of salt + padding */ - - memset( zeros, 0, 8 ); - - // Note: EMSA-PSS verification is over the length of N - 1 bits - // - msb = mbedtls_mpi_bitlen( &ctx->N ) - 1; - - // Compensate for boundary condition when applying mask - // - if( msb % 8 == 0 ) - { - p++; - siglen -= 1; - } - if( buf[0] >> ( 8 - siglen * 8 + msb ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - mbedtls_md_init( &md_ctx ); - mbedtls_md_setup( &md_ctx, md_info, 0 ); - - mgf_mask( p, siglen - hlen - 1, p + siglen - hlen - 1, hlen, &md_ctx ); - - buf[0] &= 0xFF >> ( siglen * 8 - msb ); - - while( p < buf + siglen && *p == 0 ) - p++; - - if( p == buf + siglen || - *p++ != 0x01 ) - { - mbedtls_md_free( &md_ctx ); - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - } - - /* Actual salt len */ - slen -= p - buf; - - if( expected_salt_len != MBEDTLS_RSA_SALT_LEN_ANY && - slen != (size_t) expected_salt_len ) - { - mbedtls_md_free( &md_ctx ); - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - } - - // Generate H = Hash( M' ) - // - mbedtls_md_starts( &md_ctx ); - mbedtls_md_update( &md_ctx, zeros, 8 ); - mbedtls_md_update( &md_ctx, hash, hashlen ); - mbedtls_md_update( &md_ctx, p, slen ); - mbedtls_md_finish( &md_ctx, result ); - - mbedtls_md_free( &md_ctx ); - - if( memcmp( p + slen, result, hlen ) == 0 ) - return( 0 ); - else - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); -} - -/* - * Simplified PKCS#1 v2.1 RSASSA-PSS-VERIFY function - */ -int mbedtls_rsa_rsassa_pss_verify( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - const unsigned char *sig ) -{ - mbedtls_md_type_t mgf1_hash_id = ( ctx->hash_id != MBEDTLS_MD_NONE ) - ? (mbedtls_md_type_t) ctx->hash_id - : md_alg; - - return( mbedtls_rsa_rsassa_pss_verify_ext( ctx, f_rng, p_rng, mode, - md_alg, hashlen, hash, - mgf1_hash_id, MBEDTLS_RSA_SALT_LEN_ANY, - sig ) ); - -} -#endif /* MBEDTLS_PKCS1_V21 */ - -#if defined(MBEDTLS_PKCS1_V15) -/* - * Implementation of the PKCS#1 v2.1 RSASSA-PKCS1-v1_5-VERIFY function - */ -int mbedtls_rsa_rsassa_pkcs1_v15_verify( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - const unsigned char *sig ) -{ - int ret; - size_t len, siglen, asn1_len; - unsigned char *p, *end; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - mbedtls_md_type_t msg_md_alg; - const mbedtls_md_info_t *md_info; - mbedtls_asn1_buf oid; - - if( mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - siglen = ctx->len; - - if( siglen < 16 || siglen > sizeof( buf ) ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - ret = ( mode == MBEDTLS_RSA_PUBLIC ) - ? mbedtls_rsa_public( ctx, sig, buf ) - : mbedtls_rsa_private( ctx, f_rng, p_rng, sig, buf ); - - if( ret != 0 ) - return( ret ); - - p = buf; - - if( *p++ != 0 || *p++ != MBEDTLS_RSA_SIGN ) - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - - while( *p != 0 ) - { - if( p >= buf + siglen - 1 || *p != 0xFF ) - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - p++; - } - p++; - - len = siglen - ( p - buf ); - - if( len == hashlen && md_alg == MBEDTLS_MD_NONE ) - { - if( memcmp( p, hash, hashlen ) == 0 ) - return( 0 ); - else - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - } - - md_info = mbedtls_md_info_from_type( md_alg ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - hashlen = mbedtls_md_get_size( md_info ); - - end = p + len; - - // Parse the ASN.1 structure inside the PKCS#1 v1.5 structure - // - if( ( ret = mbedtls_asn1_get_tag( &p, end, &asn1_len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( asn1_len + 2 != len ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &asn1_len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( asn1_len + 6 + hashlen != len ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &oid.len, MBEDTLS_ASN1_OID ) ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - oid.p = p; - p += oid.len; - - if( mbedtls_oid_get_md_alg( &oid, &msg_md_alg ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( md_alg != msg_md_alg ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - /* - * assume the algorithm parameters must be NULL - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &asn1_len, MBEDTLS_ASN1_NULL ) ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &asn1_len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( asn1_len != hashlen ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - if( memcmp( p, hash, hashlen ) != 0 ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - p += hashlen; - - if( p != end ) - return( MBEDTLS_ERR_RSA_VERIFY_FAILED ); - - return( 0 ); -} -#endif /* MBEDTLS_PKCS1_V15 */ - -/* - * Do an RSA operation and check the message digest - */ -int mbedtls_rsa_pkcs1_verify( mbedtls_rsa_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - const unsigned char *sig ) -{ - switch( ctx->padding ) - { -#if defined(MBEDTLS_PKCS1_V15) - case MBEDTLS_RSA_PKCS_V15: - return mbedtls_rsa_rsassa_pkcs1_v15_verify( ctx, f_rng, p_rng, mode, md_alg, - hashlen, hash, sig ); -#endif - -#if defined(MBEDTLS_PKCS1_V21) - case MBEDTLS_RSA_PKCS_V21: - return mbedtls_rsa_rsassa_pss_verify( ctx, f_rng, p_rng, mode, md_alg, - hashlen, hash, sig ); -#endif - - default: - return( MBEDTLS_ERR_RSA_INVALID_PADDING ); - } -} - -/* - * Copy the components of an RSA key - */ -int mbedtls_rsa_copy( mbedtls_rsa_context *dst, const mbedtls_rsa_context *src ) -{ - int ret; - - dst->ver = src->ver; - dst->len = src->len; - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->N, &src->N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->E, &src->E ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->D, &src->D ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->P, &src->P ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->Q, &src->Q ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->DP, &src->DP ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->DQ, &src->DQ ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->QP, &src->QP ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->RN, &src->RN ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->RP, &src->RP ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->RQ, &src->RQ ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->Vi, &src->Vi ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->Vf, &src->Vf ) ); - - dst->padding = src->padding; - dst->hash_id = src->hash_id; - -cleanup: - if( ret != 0 ) - mbedtls_rsa_free( dst ); - - return( ret ); -} - -/* - * Free the components of an RSA key - */ -void mbedtls_rsa_free( mbedtls_rsa_context *ctx ) -{ - mbedtls_mpi_free( &ctx->Vi ); mbedtls_mpi_free( &ctx->Vf ); - mbedtls_mpi_free( &ctx->RQ ); mbedtls_mpi_free( &ctx->RP ); mbedtls_mpi_free( &ctx->RN ); - mbedtls_mpi_free( &ctx->QP ); mbedtls_mpi_free( &ctx->DQ ); mbedtls_mpi_free( &ctx->DP ); - mbedtls_mpi_free( &ctx->Q ); mbedtls_mpi_free( &ctx->P ); mbedtls_mpi_free( &ctx->D ); - mbedtls_mpi_free( &ctx->E ); mbedtls_mpi_free( &ctx->N ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &ctx->mutex ); -#endif -} - -#if defined(MBEDTLS_SELF_TEST) - -#include "mbedtls/sha1.h" - -/* - * Example RSA-1024 keypair, for test purposes - */ -#define KEY_LEN 128 - -#define RSA_N "9292758453063D803DD603D5E777D788" \ - "8ED1D5BF35786190FA2F23EBC0848AEA" \ - "DDA92CA6C3D80B32C4D109BE0F36D6AE" \ - "7130B9CED7ACDF54CFC7555AC14EEBAB" \ - "93A89813FBF3C4F8066D2D800F7C38A8" \ - "1AE31942917403FF4946B0A83D3D3E05" \ - "EE57C6F5F5606FB5D4BC6CD34EE0801A" \ - "5E94BB77B07507233A0BC7BAC8F90F79" - -#define RSA_E "10001" - -#define RSA_D "24BF6185468786FDD303083D25E64EFC" \ - "66CA472BC44D253102F8B4A9D3BFA750" \ - "91386C0077937FE33FA3252D28855837" \ - "AE1B484A8A9A45F7EE8C0C634F99E8CD" \ - "DF79C5CE07EE72C7F123142198164234" \ - "CABB724CF78B8173B9F880FC86322407" \ - "AF1FEDFDDE2BEB674CA15F3E81A1521E" \ - "071513A1E85B5DFA031F21ECAE91A34D" - -#define RSA_P "C36D0EB7FCD285223CFB5AABA5BDA3D8" \ - "2C01CAD19EA484A87EA4377637E75500" \ - "FCB2005C5C7DD6EC4AC023CDA285D796" \ - "C3D9E75E1EFC42488BB4F1D13AC30A57" - -#define RSA_Q "C000DF51A7C77AE8D7C7370C1FF55B69" \ - "E211C2B9E5DB1ED0BF61D0D9899620F4" \ - "910E4168387E3C30AA1E00C339A79508" \ - "8452DD96A9A5EA5D9DCA68DA636032AF" - -#define RSA_DP "C1ACF567564274FB07A0BBAD5D26E298" \ - "3C94D22288ACD763FD8E5600ED4A702D" \ - "F84198A5F06C2E72236AE490C93F07F8" \ - "3CC559CD27BC2D1CA488811730BB5725" - -#define RSA_DQ "4959CBF6F8FEF750AEE6977C155579C7" \ - "D8AAEA56749EA28623272E4F7D0592AF" \ - "7C1F1313CAC9471B5C523BFE592F517B" \ - "407A1BD76C164B93DA2D32A383E58357" - -#define RSA_QP "9AE7FBC99546432DF71896FC239EADAE" \ - "F38D18D2B2F0E2DD275AA977E2BF4411" \ - "F5A3B2A5D33605AEBBCCBA7FEB9F2D2F" \ - "A74206CEC169D74BF5A8C50D6F48EA08" - -#define PT_LEN 24 -#define RSA_PT "\xAA\xBB\xCC\x03\x02\x01\x00\xFF\xFF\xFF\xFF\xFF" \ - "\x11\x22\x33\x0A\x0B\x0C\xCC\xDD\xDD\xDD\xDD\xDD" - -#if defined(MBEDTLS_PKCS1_V15) -static int myrand( void *rng_state, unsigned char *output, size_t len ) -{ -#if !defined(__OpenBSD__) - size_t i; - - if( rng_state != NULL ) - rng_state = NULL; - - for( i = 0; i < len; ++i ) - output[i] = rand(); -#else - if( rng_state != NULL ) - rng_state = NULL; - - arc4random_buf( output, len ); -#endif /* !OpenBSD */ - - return( 0 ); -} -#endif /* MBEDTLS_PKCS1_V15 */ - -/* - * Checkup routine - */ -int mbedtls_rsa_self_test( int verbose ) -{ - int ret = 0; -#if defined(MBEDTLS_PKCS1_V15) - size_t len; - mbedtls_rsa_context rsa; - unsigned char rsa_plaintext[PT_LEN]; - unsigned char rsa_decrypted[PT_LEN]; - unsigned char rsa_ciphertext[KEY_LEN]; -#if defined(MBEDTLS_SHA1_C) - unsigned char sha1sum[20]; -#endif - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - rsa.len = KEY_LEN; - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.N , 16, RSA_N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.E , 16, RSA_E ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.D , 16, RSA_D ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.P , 16, RSA_P ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.Q , 16, RSA_Q ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.DP, 16, RSA_DP ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.DQ, 16, RSA_DQ ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.QP, 16, RSA_QP ) ); - - if( verbose != 0 ) - mbedtls_printf( " RSA key validation: " ); - - if( mbedtls_rsa_check_pubkey( &rsa ) != 0 || - mbedtls_rsa_check_privkey( &rsa ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n PKCS#1 encryption : " ); - - memcpy( rsa_plaintext, RSA_PT, PT_LEN ); - - if( mbedtls_rsa_pkcs1_encrypt( &rsa, myrand, NULL, MBEDTLS_RSA_PUBLIC, PT_LEN, - rsa_plaintext, rsa_ciphertext ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n PKCS#1 decryption : " ); - - if( mbedtls_rsa_pkcs1_decrypt( &rsa, myrand, NULL, MBEDTLS_RSA_PRIVATE, &len, - rsa_ciphertext, rsa_decrypted, - sizeof(rsa_decrypted) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( memcmp( rsa_decrypted, rsa_plaintext, len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -#if defined(MBEDTLS_SHA1_C) - if( verbose != 0 ) - mbedtls_printf( "PKCS#1 data sign : " ); - - mbedtls_sha1( rsa_plaintext, PT_LEN, sha1sum ); - - if( mbedtls_rsa_pkcs1_sign( &rsa, myrand, NULL, MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_SHA1, 0, - sha1sum, rsa_ciphertext ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n PKCS#1 sig. verify: " ); - - if( mbedtls_rsa_pkcs1_verify( &rsa, NULL, NULL, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_SHA1, 0, - sha1sum, rsa_ciphertext ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); -#endif /* MBEDTLS_SHA1_C */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -cleanup: - mbedtls_rsa_free( &rsa ); -#else /* MBEDTLS_PKCS1_V15 */ - ((void) verbose); -#endif /* MBEDTLS_PKCS1_V15 */ - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_RSA_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/sha1.c b/build/premake/premake5/contrib/mbedtls/library/sha1.c deleted file mode 100644 index 8c77cbaa8f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/sha1.c +++ /dev/null @@ -1,448 +0,0 @@ -/* - * FIPS-180-1 compliant SHA-1 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The SHA-1 standard was published by NIST in 1993. - * - * http://www.itl.nist.gov/fipspubs/fip180-1.htm - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SHA1_C) - -#include "mbedtls/sha1.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_SHA1_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -void mbedtls_sha1_init( mbedtls_sha1_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_sha1_context ) ); -} - -void mbedtls_sha1_free( mbedtls_sha1_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_sha1_context ) ); -} - -void mbedtls_sha1_clone( mbedtls_sha1_context *dst, - const mbedtls_sha1_context *src ) -{ - *dst = *src; -} - -/* - * SHA-1 context setup - */ -void mbedtls_sha1_starts( mbedtls_sha1_context *ctx ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - ctx->state[0] = 0x67452301; - ctx->state[1] = 0xEFCDAB89; - ctx->state[2] = 0x98BADCFE; - ctx->state[3] = 0x10325476; - ctx->state[4] = 0xC3D2E1F0; -} - -#if !defined(MBEDTLS_SHA1_PROCESS_ALT) -void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] ) -{ - uint32_t temp, W[16], A, B, C, D, E; - - GET_UINT32_BE( W[ 0], data, 0 ); - GET_UINT32_BE( W[ 1], data, 4 ); - GET_UINT32_BE( W[ 2], data, 8 ); - GET_UINT32_BE( W[ 3], data, 12 ); - GET_UINT32_BE( W[ 4], data, 16 ); - GET_UINT32_BE( W[ 5], data, 20 ); - GET_UINT32_BE( W[ 6], data, 24 ); - GET_UINT32_BE( W[ 7], data, 28 ); - GET_UINT32_BE( W[ 8], data, 32 ); - GET_UINT32_BE( W[ 9], data, 36 ); - GET_UINT32_BE( W[10], data, 40 ); - GET_UINT32_BE( W[11], data, 44 ); - GET_UINT32_BE( W[12], data, 48 ); - GET_UINT32_BE( W[13], data, 52 ); - GET_UINT32_BE( W[14], data, 56 ); - GET_UINT32_BE( W[15], data, 60 ); - -#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) - -#define R(t) \ -( \ - temp = W[( t - 3 ) & 0x0F] ^ W[( t - 8 ) & 0x0F] ^ \ - W[( t - 14 ) & 0x0F] ^ W[ t & 0x0F], \ - ( W[t & 0x0F] = S(temp,1) ) \ -) - -#define P(a,b,c,d,e,x) \ -{ \ - e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \ -} - - A = ctx->state[0]; - B = ctx->state[1]; - C = ctx->state[2]; - D = ctx->state[3]; - E = ctx->state[4]; - -#define F(x,y,z) (z ^ (x & (y ^ z))) -#define K 0x5A827999 - - P( A, B, C, D, E, W[0] ); - P( E, A, B, C, D, W[1] ); - P( D, E, A, B, C, W[2] ); - P( C, D, E, A, B, W[3] ); - P( B, C, D, E, A, W[4] ); - P( A, B, C, D, E, W[5] ); - P( E, A, B, C, D, W[6] ); - P( D, E, A, B, C, W[7] ); - P( C, D, E, A, B, W[8] ); - P( B, C, D, E, A, W[9] ); - P( A, B, C, D, E, W[10] ); - P( E, A, B, C, D, W[11] ); - P( D, E, A, B, C, W[12] ); - P( C, D, E, A, B, W[13] ); - P( B, C, D, E, A, W[14] ); - P( A, B, C, D, E, W[15] ); - P( E, A, B, C, D, R(16) ); - P( D, E, A, B, C, R(17) ); - P( C, D, E, A, B, R(18) ); - P( B, C, D, E, A, R(19) ); - -#undef K -#undef F - -#define F(x,y,z) (x ^ y ^ z) -#define K 0x6ED9EBA1 - - P( A, B, C, D, E, R(20) ); - P( E, A, B, C, D, R(21) ); - P( D, E, A, B, C, R(22) ); - P( C, D, E, A, B, R(23) ); - P( B, C, D, E, A, R(24) ); - P( A, B, C, D, E, R(25) ); - P( E, A, B, C, D, R(26) ); - P( D, E, A, B, C, R(27) ); - P( C, D, E, A, B, R(28) ); - P( B, C, D, E, A, R(29) ); - P( A, B, C, D, E, R(30) ); - P( E, A, B, C, D, R(31) ); - P( D, E, A, B, C, R(32) ); - P( C, D, E, A, B, R(33) ); - P( B, C, D, E, A, R(34) ); - P( A, B, C, D, E, R(35) ); - P( E, A, B, C, D, R(36) ); - P( D, E, A, B, C, R(37) ); - P( C, D, E, A, B, R(38) ); - P( B, C, D, E, A, R(39) ); - -#undef K -#undef F - -#define F(x,y,z) ((x & y) | (z & (x | y))) -#define K 0x8F1BBCDC - - P( A, B, C, D, E, R(40) ); - P( E, A, B, C, D, R(41) ); - P( D, E, A, B, C, R(42) ); - P( C, D, E, A, B, R(43) ); - P( B, C, D, E, A, R(44) ); - P( A, B, C, D, E, R(45) ); - P( E, A, B, C, D, R(46) ); - P( D, E, A, B, C, R(47) ); - P( C, D, E, A, B, R(48) ); - P( B, C, D, E, A, R(49) ); - P( A, B, C, D, E, R(50) ); - P( E, A, B, C, D, R(51) ); - P( D, E, A, B, C, R(52) ); - P( C, D, E, A, B, R(53) ); - P( B, C, D, E, A, R(54) ); - P( A, B, C, D, E, R(55) ); - P( E, A, B, C, D, R(56) ); - P( D, E, A, B, C, R(57) ); - P( C, D, E, A, B, R(58) ); - P( B, C, D, E, A, R(59) ); - -#undef K -#undef F - -#define F(x,y,z) (x ^ y ^ z) -#define K 0xCA62C1D6 - - P( A, B, C, D, E, R(60) ); - P( E, A, B, C, D, R(61) ); - P( D, E, A, B, C, R(62) ); - P( C, D, E, A, B, R(63) ); - P( B, C, D, E, A, R(64) ); - P( A, B, C, D, E, R(65) ); - P( E, A, B, C, D, R(66) ); - P( D, E, A, B, C, R(67) ); - P( C, D, E, A, B, R(68) ); - P( B, C, D, E, A, R(69) ); - P( A, B, C, D, E, R(70) ); - P( E, A, B, C, D, R(71) ); - P( D, E, A, B, C, R(72) ); - P( C, D, E, A, B, R(73) ); - P( B, C, D, E, A, R(74) ); - P( A, B, C, D, E, R(75) ); - P( E, A, B, C, D, R(76) ); - P( D, E, A, B, C, R(77) ); - P( C, D, E, A, B, R(78) ); - P( B, C, D, E, A, R(79) ); - -#undef K -#undef F - - ctx->state[0] += A; - ctx->state[1] += B; - ctx->state[2] += C; - ctx->state[3] += D; - ctx->state[4] += E; -} -#endif /* !MBEDTLS_SHA1_PROCESS_ALT */ - -/* - * SHA-1 process buffer - */ -void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen ) -{ - size_t fill; - uint32_t left; - - if( ilen == 0 ) - return; - - left = ctx->total[0] & 0x3F; - fill = 64 - left; - - ctx->total[0] += (uint32_t) ilen; - ctx->total[0] &= 0xFFFFFFFF; - - if( ctx->total[0] < (uint32_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), input, fill ); - mbedtls_sha1_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 64 ) - { - mbedtls_sha1_process( ctx, input ); - input += 64; - ilen -= 64; - } - - if( ilen > 0 ) - memcpy( (void *) (ctx->buffer + left), input, ilen ); -} - -static const unsigned char sha1_padding[64] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * SHA-1 final digest - */ -void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] ) -{ - uint32_t last, padn; - uint32_t high, low; - unsigned char msglen[8]; - - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT32_BE( high, msglen, 0 ); - PUT_UINT32_BE( low, msglen, 4 ); - - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - - mbedtls_sha1_update( ctx, sha1_padding, padn ); - mbedtls_sha1_update( ctx, msglen, 8 ); - - PUT_UINT32_BE( ctx->state[0], output, 0 ); - PUT_UINT32_BE( ctx->state[1], output, 4 ); - PUT_UINT32_BE( ctx->state[2], output, 8 ); - PUT_UINT32_BE( ctx->state[3], output, 12 ); - PUT_UINT32_BE( ctx->state[4], output, 16 ); -} - -#endif /* !MBEDTLS_SHA1_ALT */ - -/* - * output = SHA-1( input buffer ) - */ -void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output[20] ) -{ - mbedtls_sha1_context ctx; - - mbedtls_sha1_init( &ctx ); - mbedtls_sha1_starts( &ctx ); - mbedtls_sha1_update( &ctx, input, ilen ); - mbedtls_sha1_finish( &ctx, output ); - mbedtls_sha1_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) -/* - * FIPS-180-1 test vectors - */ -static const unsigned char sha1_test_buf[3][57] = -{ - { "abc" }, - { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }, - { "" } -}; - -static const int sha1_test_buflen[3] = -{ - 3, 56, 1000 -}; - -static const unsigned char sha1_test_sum[3][20] = -{ - { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E, - 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D }, - { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E, 0xBA, 0xAE, - 0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 }, - { 0x34, 0xAA, 0x97, 0x3C, 0xD4, 0xC4, 0xDA, 0xA4, 0xF6, 0x1E, - 0xEB, 0x2B, 0xDB, 0xAD, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6F } -}; - -/* - * Checkup routine - */ -int mbedtls_sha1_self_test( int verbose ) -{ - int i, j, buflen, ret = 0; - unsigned char buf[1024]; - unsigned char sha1sum[20]; - mbedtls_sha1_context ctx; - - mbedtls_sha1_init( &ctx ); - - /* - * SHA-1 - */ - for( i = 0; i < 3; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " SHA-1 test #%d: ", i + 1 ); - - mbedtls_sha1_starts( &ctx ); - - if( i == 2 ) - { - memset( buf, 'a', buflen = 1000 ); - - for( j = 0; j < 1000; j++ ) - mbedtls_sha1_update( &ctx, buf, buflen ); - } - else - mbedtls_sha1_update( &ctx, sha1_test_buf[i], - sha1_test_buflen[i] ); - - mbedtls_sha1_finish( &ctx, sha1sum ); - - if( memcmp( sha1sum, sha1_test_sum[i], 20 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_sha1_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_SHA1_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/sha256.c b/build/premake/premake5/contrib/mbedtls/library/sha256.c deleted file mode 100644 index 4e82c0b793..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/sha256.c +++ /dev/null @@ -1,445 +0,0 @@ -/* - * FIPS-180-2 compliant SHA-256 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The SHA-256 Secure Hash Standard was published by NIST in 2002. - * - * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SHA256_C) - -#include "mbedtls/sha256.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_SHA256_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -do { \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} while( 0 ) -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -do { \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} while( 0 ) -#endif - -void mbedtls_sha256_init( mbedtls_sha256_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_sha256_context ) ); -} - -void mbedtls_sha256_free( mbedtls_sha256_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_sha256_context ) ); -} - -void mbedtls_sha256_clone( mbedtls_sha256_context *dst, - const mbedtls_sha256_context *src ) -{ - *dst = *src; -} - -/* - * SHA-256 context setup - */ -void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - if( is224 == 0 ) - { - /* SHA-256 */ - ctx->state[0] = 0x6A09E667; - ctx->state[1] = 0xBB67AE85; - ctx->state[2] = 0x3C6EF372; - ctx->state[3] = 0xA54FF53A; - ctx->state[4] = 0x510E527F; - ctx->state[5] = 0x9B05688C; - ctx->state[6] = 0x1F83D9AB; - ctx->state[7] = 0x5BE0CD19; - } - else - { - /* SHA-224 */ - ctx->state[0] = 0xC1059ED8; - ctx->state[1] = 0x367CD507; - ctx->state[2] = 0x3070DD17; - ctx->state[3] = 0xF70E5939; - ctx->state[4] = 0xFFC00B31; - ctx->state[5] = 0x68581511; - ctx->state[6] = 0x64F98FA7; - ctx->state[7] = 0xBEFA4FA4; - } - - ctx->is224 = is224; -} - -#if !defined(MBEDTLS_SHA256_PROCESS_ALT) -static const uint32_t K[] = -{ - 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, - 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, - 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, - 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, - 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, - 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, - 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, - 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, - 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, - 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, - 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, - 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, - 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, - 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, - 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, - 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2, -}; - -#define SHR(x,n) ((x & 0xFFFFFFFF) >> n) -#define ROTR(x,n) (SHR(x,n) | (x << (32 - n))) - -#define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3)) -#define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10)) - -#define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22)) -#define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25)) - -#define F0(x,y,z) ((x & y) | (z & (x | y))) -#define F1(x,y,z) (z ^ (x & (y ^ z))) - -#define R(t) \ -( \ - W[t] = S1(W[t - 2]) + W[t - 7] + \ - S0(W[t - 15]) + W[t - 16] \ -) - -#define P(a,b,c,d,e,f,g,h,x,K) \ -{ \ - temp1 = h + S3(e) + F1(e,f,g) + K + x; \ - temp2 = S2(a) + F0(a,b,c); \ - d += temp1; h = temp1 + temp2; \ -} - -void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] ) -{ - uint32_t temp1, temp2, W[64]; - uint32_t A[8]; - unsigned int i; - - for( i = 0; i < 8; i++ ) - A[i] = ctx->state[i]; - -#if defined(MBEDTLS_SHA256_SMALLER) - for( i = 0; i < 64; i++ ) - { - if( i < 16 ) - GET_UINT32_BE( W[i], data, 4 * i ); - else - R( i ); - - P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i], K[i] ); - - temp1 = A[7]; A[7] = A[6]; A[6] = A[5]; A[5] = A[4]; A[4] = A[3]; - A[3] = A[2]; A[2] = A[1]; A[1] = A[0]; A[0] = temp1; - } -#else /* MBEDTLS_SHA256_SMALLER */ - for( i = 0; i < 16; i++ ) - GET_UINT32_BE( W[i], data, 4 * i ); - - for( i = 0; i < 16; i += 8 ) - { - P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i+0], K[i+0] ); - P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], W[i+1], K[i+1] ); - P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], W[i+2], K[i+2] ); - P( A[5], A[6], A[7], A[0], A[1], A[2], A[3], A[4], W[i+3], K[i+3] ); - P( A[4], A[5], A[6], A[7], A[0], A[1], A[2], A[3], W[i+4], K[i+4] ); - P( A[3], A[4], A[5], A[6], A[7], A[0], A[1], A[2], W[i+5], K[i+5] ); - P( A[2], A[3], A[4], A[5], A[6], A[7], A[0], A[1], W[i+6], K[i+6] ); - P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], W[i+7], K[i+7] ); - } - - for( i = 16; i < 64; i += 8 ) - { - P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], R(i+0), K[i+0] ); - P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], R(i+1), K[i+1] ); - P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], R(i+2), K[i+2] ); - P( A[5], A[6], A[7], A[0], A[1], A[2], A[3], A[4], R(i+3), K[i+3] ); - P( A[4], A[5], A[6], A[7], A[0], A[1], A[2], A[3], R(i+4), K[i+4] ); - P( A[3], A[4], A[5], A[6], A[7], A[0], A[1], A[2], R(i+5), K[i+5] ); - P( A[2], A[3], A[4], A[5], A[6], A[7], A[0], A[1], R(i+6), K[i+6] ); - P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], R(i+7), K[i+7] ); - } -#endif /* MBEDTLS_SHA256_SMALLER */ - - for( i = 0; i < 8; i++ ) - ctx->state[i] += A[i]; -} -#endif /* !MBEDTLS_SHA256_PROCESS_ALT */ - -/* - * SHA-256 process buffer - */ -void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *input, - size_t ilen ) -{ - size_t fill; - uint32_t left; - - if( ilen == 0 ) - return; - - left = ctx->total[0] & 0x3F; - fill = 64 - left; - - ctx->total[0] += (uint32_t) ilen; - ctx->total[0] &= 0xFFFFFFFF; - - if( ctx->total[0] < (uint32_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), input, fill ); - mbedtls_sha256_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 64 ) - { - mbedtls_sha256_process( ctx, input ); - input += 64; - ilen -= 64; - } - - if( ilen > 0 ) - memcpy( (void *) (ctx->buffer + left), input, ilen ); -} - -static const unsigned char sha256_padding[64] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * SHA-256 final digest - */ -void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32] ) -{ - uint32_t last, padn; - uint32_t high, low; - unsigned char msglen[8]; - - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT32_BE( high, msglen, 0 ); - PUT_UINT32_BE( low, msglen, 4 ); - - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - - mbedtls_sha256_update( ctx, sha256_padding, padn ); - mbedtls_sha256_update( ctx, msglen, 8 ); - - PUT_UINT32_BE( ctx->state[0], output, 0 ); - PUT_UINT32_BE( ctx->state[1], output, 4 ); - PUT_UINT32_BE( ctx->state[2], output, 8 ); - PUT_UINT32_BE( ctx->state[3], output, 12 ); - PUT_UINT32_BE( ctx->state[4], output, 16 ); - PUT_UINT32_BE( ctx->state[5], output, 20 ); - PUT_UINT32_BE( ctx->state[6], output, 24 ); - - if( ctx->is224 == 0 ) - PUT_UINT32_BE( ctx->state[7], output, 28 ); -} - -#endif /* !MBEDTLS_SHA256_ALT */ - -/* - * output = SHA-256( input buffer ) - */ -void mbedtls_sha256( const unsigned char *input, size_t ilen, - unsigned char output[32], int is224 ) -{ - mbedtls_sha256_context ctx; - - mbedtls_sha256_init( &ctx ); - mbedtls_sha256_starts( &ctx, is224 ); - mbedtls_sha256_update( &ctx, input, ilen ); - mbedtls_sha256_finish( &ctx, output ); - mbedtls_sha256_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) -/* - * FIPS-180-2 test vectors - */ -static const unsigned char sha256_test_buf[3][57] = -{ - { "abc" }, - { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }, - { "" } -}; - -static const int sha256_test_buflen[3] = -{ - 3, 56, 1000 -}; - -static const unsigned char sha256_test_sum[6][32] = -{ - /* - * SHA-224 test vectors - */ - { 0x23, 0x09, 0x7D, 0x22, 0x34, 0x05, 0xD8, 0x22, - 0x86, 0x42, 0xA4, 0x77, 0xBD, 0xA2, 0x55, 0xB3, - 0x2A, 0xAD, 0xBC, 0xE4, 0xBD, 0xA0, 0xB3, 0xF7, - 0xE3, 0x6C, 0x9D, 0xA7 }, - { 0x75, 0x38, 0x8B, 0x16, 0x51, 0x27, 0x76, 0xCC, - 0x5D, 0xBA, 0x5D, 0xA1, 0xFD, 0x89, 0x01, 0x50, - 0xB0, 0xC6, 0x45, 0x5C, 0xB4, 0xF5, 0x8B, 0x19, - 0x52, 0x52, 0x25, 0x25 }, - { 0x20, 0x79, 0x46, 0x55, 0x98, 0x0C, 0x91, 0xD8, - 0xBB, 0xB4, 0xC1, 0xEA, 0x97, 0x61, 0x8A, 0x4B, - 0xF0, 0x3F, 0x42, 0x58, 0x19, 0x48, 0xB2, 0xEE, - 0x4E, 0xE7, 0xAD, 0x67 }, - - /* - * SHA-256 test vectors - */ - { 0xBA, 0x78, 0x16, 0xBF, 0x8F, 0x01, 0xCF, 0xEA, - 0x41, 0x41, 0x40, 0xDE, 0x5D, 0xAE, 0x22, 0x23, - 0xB0, 0x03, 0x61, 0xA3, 0x96, 0x17, 0x7A, 0x9C, - 0xB4, 0x10, 0xFF, 0x61, 0xF2, 0x00, 0x15, 0xAD }, - { 0x24, 0x8D, 0x6A, 0x61, 0xD2, 0x06, 0x38, 0xB8, - 0xE5, 0xC0, 0x26, 0x93, 0x0C, 0x3E, 0x60, 0x39, - 0xA3, 0x3C, 0xE4, 0x59, 0x64, 0xFF, 0x21, 0x67, - 0xF6, 0xEC, 0xED, 0xD4, 0x19, 0xDB, 0x06, 0xC1 }, - { 0xCD, 0xC7, 0x6E, 0x5C, 0x99, 0x14, 0xFB, 0x92, - 0x81, 0xA1, 0xC7, 0xE2, 0x84, 0xD7, 0x3E, 0x67, - 0xF1, 0x80, 0x9A, 0x48, 0xA4, 0x97, 0x20, 0x0E, - 0x04, 0x6D, 0x39, 0xCC, 0xC7, 0x11, 0x2C, 0xD0 } -}; - -/* - * Checkup routine - */ -int mbedtls_sha256_self_test( int verbose ) -{ - int i, j, k, buflen, ret = 0; - unsigned char buf[1024]; - unsigned char sha256sum[32]; - mbedtls_sha256_context ctx; - - mbedtls_sha256_init( &ctx ); - - for( i = 0; i < 6; i++ ) - { - j = i % 3; - k = i < 3; - - if( verbose != 0 ) - mbedtls_printf( " SHA-%d test #%d: ", 256 - k * 32, j + 1 ); - - mbedtls_sha256_starts( &ctx, k ); - - if( j == 2 ) - { - memset( buf, 'a', buflen = 1000 ); - - for( j = 0; j < 1000; j++ ) - mbedtls_sha256_update( &ctx, buf, buflen ); - } - else - mbedtls_sha256_update( &ctx, sha256_test_buf[j], - sha256_test_buflen[j] ); - - mbedtls_sha256_finish( &ctx, sha256sum ); - - if( memcmp( sha256sum, sha256_test_sum[i], 32 - k * 4 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_sha256_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_SHA256_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/sha512.c b/build/premake/premake5/contrib/mbedtls/library/sha512.c deleted file mode 100644 index af610bb43f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/sha512.c +++ /dev/null @@ -1,500 +0,0 @@ -/* - * FIPS-180-2 compliant SHA-384/512 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The SHA-512 Secure Hash Standard was published by NIST in 2002. - * - * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SHA512_C) - -#include "mbedtls/sha512.h" - -#if defined(_MSC_VER) || defined(__WATCOMC__) - #define UL64(x) x##ui64 -#else - #define UL64(x) x##ULL -#endif - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_SHA512_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 64-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT64_BE -#define GET_UINT64_BE(n,b,i) \ -{ \ - (n) = ( (uint64_t) (b)[(i) ] << 56 ) \ - | ( (uint64_t) (b)[(i) + 1] << 48 ) \ - | ( (uint64_t) (b)[(i) + 2] << 40 ) \ - | ( (uint64_t) (b)[(i) + 3] << 32 ) \ - | ( (uint64_t) (b)[(i) + 4] << 24 ) \ - | ( (uint64_t) (b)[(i) + 5] << 16 ) \ - | ( (uint64_t) (b)[(i) + 6] << 8 ) \ - | ( (uint64_t) (b)[(i) + 7] ); \ -} -#endif /* GET_UINT64_BE */ - -#ifndef PUT_UINT64_BE -#define PUT_UINT64_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 56 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 48 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 40 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) >> 32 ); \ - (b)[(i) + 4] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 5] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 6] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 7] = (unsigned char) ( (n) ); \ -} -#endif /* PUT_UINT64_BE */ - -/* - * Round constants - */ -static const uint64_t K[80] = -{ - UL64(0x428A2F98D728AE22), UL64(0x7137449123EF65CD), - UL64(0xB5C0FBCFEC4D3B2F), UL64(0xE9B5DBA58189DBBC), - UL64(0x3956C25BF348B538), UL64(0x59F111F1B605D019), - UL64(0x923F82A4AF194F9B), UL64(0xAB1C5ED5DA6D8118), - UL64(0xD807AA98A3030242), UL64(0x12835B0145706FBE), - UL64(0x243185BE4EE4B28C), UL64(0x550C7DC3D5FFB4E2), - UL64(0x72BE5D74F27B896F), UL64(0x80DEB1FE3B1696B1), - UL64(0x9BDC06A725C71235), UL64(0xC19BF174CF692694), - UL64(0xE49B69C19EF14AD2), UL64(0xEFBE4786384F25E3), - UL64(0x0FC19DC68B8CD5B5), UL64(0x240CA1CC77AC9C65), - UL64(0x2DE92C6F592B0275), UL64(0x4A7484AA6EA6E483), - UL64(0x5CB0A9DCBD41FBD4), UL64(0x76F988DA831153B5), - UL64(0x983E5152EE66DFAB), UL64(0xA831C66D2DB43210), - UL64(0xB00327C898FB213F), UL64(0xBF597FC7BEEF0EE4), - UL64(0xC6E00BF33DA88FC2), UL64(0xD5A79147930AA725), - UL64(0x06CA6351E003826F), UL64(0x142929670A0E6E70), - UL64(0x27B70A8546D22FFC), UL64(0x2E1B21385C26C926), - UL64(0x4D2C6DFC5AC42AED), UL64(0x53380D139D95B3DF), - UL64(0x650A73548BAF63DE), UL64(0x766A0ABB3C77B2A8), - UL64(0x81C2C92E47EDAEE6), UL64(0x92722C851482353B), - UL64(0xA2BFE8A14CF10364), UL64(0xA81A664BBC423001), - UL64(0xC24B8B70D0F89791), UL64(0xC76C51A30654BE30), - UL64(0xD192E819D6EF5218), UL64(0xD69906245565A910), - UL64(0xF40E35855771202A), UL64(0x106AA07032BBD1B8), - UL64(0x19A4C116B8D2D0C8), UL64(0x1E376C085141AB53), - UL64(0x2748774CDF8EEB99), UL64(0x34B0BCB5E19B48A8), - UL64(0x391C0CB3C5C95A63), UL64(0x4ED8AA4AE3418ACB), - UL64(0x5B9CCA4F7763E373), UL64(0x682E6FF3D6B2B8A3), - UL64(0x748F82EE5DEFB2FC), UL64(0x78A5636F43172F60), - UL64(0x84C87814A1F0AB72), UL64(0x8CC702081A6439EC), - UL64(0x90BEFFFA23631E28), UL64(0xA4506CEBDE82BDE9), - UL64(0xBEF9A3F7B2C67915), UL64(0xC67178F2E372532B), - UL64(0xCA273ECEEA26619C), UL64(0xD186B8C721C0C207), - UL64(0xEADA7DD6CDE0EB1E), UL64(0xF57D4F7FEE6ED178), - UL64(0x06F067AA72176FBA), UL64(0x0A637DC5A2C898A6), - UL64(0x113F9804BEF90DAE), UL64(0x1B710B35131C471B), - UL64(0x28DB77F523047D84), UL64(0x32CAAB7B40C72493), - UL64(0x3C9EBE0A15C9BEBC), UL64(0x431D67C49C100D4C), - UL64(0x4CC5D4BECB3E42B6), UL64(0x597F299CFC657E2A), - UL64(0x5FCB6FAB3AD6FAEC), UL64(0x6C44198C4A475817) -}; - -void mbedtls_sha512_init( mbedtls_sha512_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_sha512_context ) ); -} - -void mbedtls_sha512_free( mbedtls_sha512_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_sha512_context ) ); -} - -void mbedtls_sha512_clone( mbedtls_sha512_context *dst, - const mbedtls_sha512_context *src ) -{ - *dst = *src; -} - -/* - * SHA-512 context setup - */ -void mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - if( is384 == 0 ) - { - /* SHA-512 */ - ctx->state[0] = UL64(0x6A09E667F3BCC908); - ctx->state[1] = UL64(0xBB67AE8584CAA73B); - ctx->state[2] = UL64(0x3C6EF372FE94F82B); - ctx->state[3] = UL64(0xA54FF53A5F1D36F1); - ctx->state[4] = UL64(0x510E527FADE682D1); - ctx->state[5] = UL64(0x9B05688C2B3E6C1F); - ctx->state[6] = UL64(0x1F83D9ABFB41BD6B); - ctx->state[7] = UL64(0x5BE0CD19137E2179); - } - else - { - /* SHA-384 */ - ctx->state[0] = UL64(0xCBBB9D5DC1059ED8); - ctx->state[1] = UL64(0x629A292A367CD507); - ctx->state[2] = UL64(0x9159015A3070DD17); - ctx->state[3] = UL64(0x152FECD8F70E5939); - ctx->state[4] = UL64(0x67332667FFC00B31); - ctx->state[5] = UL64(0x8EB44A8768581511); - ctx->state[6] = UL64(0xDB0C2E0D64F98FA7); - ctx->state[7] = UL64(0x47B5481DBEFA4FA4); - } - - ctx->is384 = is384; -} - -#if !defined(MBEDTLS_SHA512_PROCESS_ALT) -void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char data[128] ) -{ - int i; - uint64_t temp1, temp2, W[80]; - uint64_t A, B, C, D, E, F, G, H; - -#define SHR(x,n) (x >> n) -#define ROTR(x,n) (SHR(x,n) | (x << (64 - n))) - -#define S0(x) (ROTR(x, 1) ^ ROTR(x, 8) ^ SHR(x, 7)) -#define S1(x) (ROTR(x,19) ^ ROTR(x,61) ^ SHR(x, 6)) - -#define S2(x) (ROTR(x,28) ^ ROTR(x,34) ^ ROTR(x,39)) -#define S3(x) (ROTR(x,14) ^ ROTR(x,18) ^ ROTR(x,41)) - -#define F0(x,y,z) ((x & y) | (z & (x | y))) -#define F1(x,y,z) (z ^ (x & (y ^ z))) - -#define P(a,b,c,d,e,f,g,h,x,K) \ -{ \ - temp1 = h + S3(e) + F1(e,f,g) + K + x; \ - temp2 = S2(a) + F0(a,b,c); \ - d += temp1; h = temp1 + temp2; \ -} - - for( i = 0; i < 16; i++ ) - { - GET_UINT64_BE( W[i], data, i << 3 ); - } - - for( ; i < 80; i++ ) - { - W[i] = S1(W[i - 2]) + W[i - 7] + - S0(W[i - 15]) + W[i - 16]; - } - - A = ctx->state[0]; - B = ctx->state[1]; - C = ctx->state[2]; - D = ctx->state[3]; - E = ctx->state[4]; - F = ctx->state[5]; - G = ctx->state[6]; - H = ctx->state[7]; - i = 0; - - do - { - P( A, B, C, D, E, F, G, H, W[i], K[i] ); i++; - P( H, A, B, C, D, E, F, G, W[i], K[i] ); i++; - P( G, H, A, B, C, D, E, F, W[i], K[i] ); i++; - P( F, G, H, A, B, C, D, E, W[i], K[i] ); i++; - P( E, F, G, H, A, B, C, D, W[i], K[i] ); i++; - P( D, E, F, G, H, A, B, C, W[i], K[i] ); i++; - P( C, D, E, F, G, H, A, B, W[i], K[i] ); i++; - P( B, C, D, E, F, G, H, A, W[i], K[i] ); i++; - } - while( i < 80 ); - - ctx->state[0] += A; - ctx->state[1] += B; - ctx->state[2] += C; - ctx->state[3] += D; - ctx->state[4] += E; - ctx->state[5] += F; - ctx->state[6] += G; - ctx->state[7] += H; -} -#endif /* !MBEDTLS_SHA512_PROCESS_ALT */ - -/* - * SHA-512 process buffer - */ -void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *input, - size_t ilen ) -{ - size_t fill; - unsigned int left; - - if( ilen == 0 ) - return; - - left = (unsigned int) (ctx->total[0] & 0x7F); - fill = 128 - left; - - ctx->total[0] += (uint64_t) ilen; - - if( ctx->total[0] < (uint64_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), input, fill ); - mbedtls_sha512_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 128 ) - { - mbedtls_sha512_process( ctx, input ); - input += 128; - ilen -= 128; - } - - if( ilen > 0 ) - memcpy( (void *) (ctx->buffer + left), input, ilen ); -} - -static const unsigned char sha512_padding[128] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * SHA-512 final digest - */ -void mbedtls_sha512_finish( mbedtls_sha512_context *ctx, unsigned char output[64] ) -{ - size_t last, padn; - uint64_t high, low; - unsigned char msglen[16]; - - high = ( ctx->total[0] >> 61 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT64_BE( high, msglen, 0 ); - PUT_UINT64_BE( low, msglen, 8 ); - - last = (size_t)( ctx->total[0] & 0x7F ); - padn = ( last < 112 ) ? ( 112 - last ) : ( 240 - last ); - - mbedtls_sha512_update( ctx, sha512_padding, padn ); - mbedtls_sha512_update( ctx, msglen, 16 ); - - PUT_UINT64_BE( ctx->state[0], output, 0 ); - PUT_UINT64_BE( ctx->state[1], output, 8 ); - PUT_UINT64_BE( ctx->state[2], output, 16 ); - PUT_UINT64_BE( ctx->state[3], output, 24 ); - PUT_UINT64_BE( ctx->state[4], output, 32 ); - PUT_UINT64_BE( ctx->state[5], output, 40 ); - - if( ctx->is384 == 0 ) - { - PUT_UINT64_BE( ctx->state[6], output, 48 ); - PUT_UINT64_BE( ctx->state[7], output, 56 ); - } -} - -#endif /* !MBEDTLS_SHA512_ALT */ - -/* - * output = SHA-512( input buffer ) - */ -void mbedtls_sha512( const unsigned char *input, size_t ilen, - unsigned char output[64], int is384 ) -{ - mbedtls_sha512_context ctx; - - mbedtls_sha512_init( &ctx ); - mbedtls_sha512_starts( &ctx, is384 ); - mbedtls_sha512_update( &ctx, input, ilen ); - mbedtls_sha512_finish( &ctx, output ); - mbedtls_sha512_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) - -/* - * FIPS-180-2 test vectors - */ -static const unsigned char sha512_test_buf[3][113] = -{ - { "abc" }, - { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" - "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu" }, - { "" } -}; - -static const int sha512_test_buflen[3] = -{ - 3, 112, 1000 -}; - -static const unsigned char sha512_test_sum[6][64] = -{ - /* - * SHA-384 test vectors - */ - { 0xCB, 0x00, 0x75, 0x3F, 0x45, 0xA3, 0x5E, 0x8B, - 0xB5, 0xA0, 0x3D, 0x69, 0x9A, 0xC6, 0x50, 0x07, - 0x27, 0x2C, 0x32, 0xAB, 0x0E, 0xDE, 0xD1, 0x63, - 0x1A, 0x8B, 0x60, 0x5A, 0x43, 0xFF, 0x5B, 0xED, - 0x80, 0x86, 0x07, 0x2B, 0xA1, 0xE7, 0xCC, 0x23, - 0x58, 0xBA, 0xEC, 0xA1, 0x34, 0xC8, 0x25, 0xA7 }, - { 0x09, 0x33, 0x0C, 0x33, 0xF7, 0x11, 0x47, 0xE8, - 0x3D, 0x19, 0x2F, 0xC7, 0x82, 0xCD, 0x1B, 0x47, - 0x53, 0x11, 0x1B, 0x17, 0x3B, 0x3B, 0x05, 0xD2, - 0x2F, 0xA0, 0x80, 0x86, 0xE3, 0xB0, 0xF7, 0x12, - 0xFC, 0xC7, 0xC7, 0x1A, 0x55, 0x7E, 0x2D, 0xB9, - 0x66, 0xC3, 0xE9, 0xFA, 0x91, 0x74, 0x60, 0x39 }, - { 0x9D, 0x0E, 0x18, 0x09, 0x71, 0x64, 0x74, 0xCB, - 0x08, 0x6E, 0x83, 0x4E, 0x31, 0x0A, 0x4A, 0x1C, - 0xED, 0x14, 0x9E, 0x9C, 0x00, 0xF2, 0x48, 0x52, - 0x79, 0x72, 0xCE, 0xC5, 0x70, 0x4C, 0x2A, 0x5B, - 0x07, 0xB8, 0xB3, 0xDC, 0x38, 0xEC, 0xC4, 0xEB, - 0xAE, 0x97, 0xDD, 0xD8, 0x7F, 0x3D, 0x89, 0x85 }, - - /* - * SHA-512 test vectors - */ - { 0xDD, 0xAF, 0x35, 0xA1, 0x93, 0x61, 0x7A, 0xBA, - 0xCC, 0x41, 0x73, 0x49, 0xAE, 0x20, 0x41, 0x31, - 0x12, 0xE6, 0xFA, 0x4E, 0x89, 0xA9, 0x7E, 0xA2, - 0x0A, 0x9E, 0xEE, 0xE6, 0x4B, 0x55, 0xD3, 0x9A, - 0x21, 0x92, 0x99, 0x2A, 0x27, 0x4F, 0xC1, 0xA8, - 0x36, 0xBA, 0x3C, 0x23, 0xA3, 0xFE, 0xEB, 0xBD, - 0x45, 0x4D, 0x44, 0x23, 0x64, 0x3C, 0xE8, 0x0E, - 0x2A, 0x9A, 0xC9, 0x4F, 0xA5, 0x4C, 0xA4, 0x9F }, - { 0x8E, 0x95, 0x9B, 0x75, 0xDA, 0xE3, 0x13, 0xDA, - 0x8C, 0xF4, 0xF7, 0x28, 0x14, 0xFC, 0x14, 0x3F, - 0x8F, 0x77, 0x79, 0xC6, 0xEB, 0x9F, 0x7F, 0xA1, - 0x72, 0x99, 0xAE, 0xAD, 0xB6, 0x88, 0x90, 0x18, - 0x50, 0x1D, 0x28, 0x9E, 0x49, 0x00, 0xF7, 0xE4, - 0x33, 0x1B, 0x99, 0xDE, 0xC4, 0xB5, 0x43, 0x3A, - 0xC7, 0xD3, 0x29, 0xEE, 0xB6, 0xDD, 0x26, 0x54, - 0x5E, 0x96, 0xE5, 0x5B, 0x87, 0x4B, 0xE9, 0x09 }, - { 0xE7, 0x18, 0x48, 0x3D, 0x0C, 0xE7, 0x69, 0x64, - 0x4E, 0x2E, 0x42, 0xC7, 0xBC, 0x15, 0xB4, 0x63, - 0x8E, 0x1F, 0x98, 0xB1, 0x3B, 0x20, 0x44, 0x28, - 0x56, 0x32, 0xA8, 0x03, 0xAF, 0xA9, 0x73, 0xEB, - 0xDE, 0x0F, 0xF2, 0x44, 0x87, 0x7E, 0xA6, 0x0A, - 0x4C, 0xB0, 0x43, 0x2C, 0xE5, 0x77, 0xC3, 0x1B, - 0xEB, 0x00, 0x9C, 0x5C, 0x2C, 0x49, 0xAA, 0x2E, - 0x4E, 0xAD, 0xB2, 0x17, 0xAD, 0x8C, 0xC0, 0x9B } -}; - -/* - * Checkup routine - */ -int mbedtls_sha512_self_test( int verbose ) -{ - int i, j, k, buflen, ret = 0; - unsigned char buf[1024]; - unsigned char sha512sum[64]; - mbedtls_sha512_context ctx; - - mbedtls_sha512_init( &ctx ); - - for( i = 0; i < 6; i++ ) - { - j = i % 3; - k = i < 3; - - if( verbose != 0 ) - mbedtls_printf( " SHA-%d test #%d: ", 512 - k * 128, j + 1 ); - - mbedtls_sha512_starts( &ctx, k ); - - if( j == 2 ) - { - memset( buf, 'a', buflen = 1000 ); - - for( j = 0; j < 1000; j++ ) - mbedtls_sha512_update( &ctx, buf, buflen ); - } - else - mbedtls_sha512_update( &ctx, sha512_test_buf[j], - sha512_test_buflen[j] ); - - mbedtls_sha512_finish( &ctx, sha512sum ); - - if( memcmp( sha512sum, sha512_test_sum[i], 64 - k * 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_sha512_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_SHA512_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_cache.c b/build/premake/premake5/contrib/mbedtls/library/ssl_cache.c deleted file mode 100644 index 711bc535c0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_cache.c +++ /dev/null @@ -1,326 +0,0 @@ -/* - * SSL session cache implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * These session callbacks use a simple chained list - * to store and retrieve the session information. - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_CACHE_C) - -#include "mbedtls/ssl_cache.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache ) -{ - memset( cache, 0, sizeof( mbedtls_ssl_cache_context ) ); - - cache->timeout = MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT; - cache->max_entries = MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES; - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &cache->mutex ); -#endif -} - -int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ) -{ - int ret = 1; -#if defined(MBEDTLS_HAVE_TIME) - time_t t = time( NULL ); -#endif - mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data; - mbedtls_ssl_cache_entry *cur, *entry; - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_lock( &cache->mutex ) != 0 ) - return( 1 ); -#endif - - cur = cache->chain; - entry = NULL; - - while( cur != NULL ) - { - entry = cur; - cur = cur->next; - -#if defined(MBEDTLS_HAVE_TIME) - if( cache->timeout != 0 && - (int) ( t - entry->timestamp ) > cache->timeout ) - continue; -#endif - - if( session->ciphersuite != entry->session.ciphersuite || - session->compression != entry->session.compression || - session->id_len != entry->session.id_len ) - continue; - - if( memcmp( session->id, entry->session.id, - entry->session.id_len ) != 0 ) - continue; - - memcpy( session->master, entry->session.master, 48 ); - - session->verify_result = entry->session.verify_result; - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * Restore peer certificate (without rest of the original chain) - */ - if( entry->peer_cert.p != NULL ) - { - if( ( session->peer_cert = mbedtls_calloc( 1, - sizeof(mbedtls_x509_crt) ) ) == NULL ) - { - ret = 1; - goto exit; - } - - mbedtls_x509_crt_init( session->peer_cert ); - if( mbedtls_x509_crt_parse( session->peer_cert, entry->peer_cert.p, - entry->peer_cert.len ) != 0 ) - { - mbedtls_free( session->peer_cert ); - session->peer_cert = NULL; - ret = 1; - goto exit; - } - } -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - ret = 0; - goto exit; - } - -exit: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &cache->mutex ) != 0 ) - ret = 1; -#endif - - return( ret ); -} - -int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) -{ - int ret = 1; -#if defined(MBEDTLS_HAVE_TIME) - time_t t = time( NULL ), oldest = 0; - mbedtls_ssl_cache_entry *old = NULL; -#endif - mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data; - mbedtls_ssl_cache_entry *cur, *prv; - int count = 0; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &cache->mutex ) ) != 0 ) - return( ret ); -#endif - - cur = cache->chain; - prv = NULL; - - while( cur != NULL ) - { - count++; - -#if defined(MBEDTLS_HAVE_TIME) - if( cache->timeout != 0 && - (int) ( t - cur->timestamp ) > cache->timeout ) - { - cur->timestamp = t; - break; /* expired, reuse this slot, update timestamp */ - } -#endif - - if( memcmp( session->id, cur->session.id, cur->session.id_len ) == 0 ) - break; /* client reconnected, keep timestamp for session id */ - -#if defined(MBEDTLS_HAVE_TIME) - if( oldest == 0 || cur->timestamp < oldest ) - { - oldest = cur->timestamp; - old = cur; - } -#endif - - prv = cur; - cur = cur->next; - } - - if( cur == NULL ) - { -#if defined(MBEDTLS_HAVE_TIME) - /* - * Reuse oldest entry if max_entries reached - */ - if( count >= cache->max_entries ) - { - if( old == NULL ) - { - ret = 1; - goto exit; - } - - cur = old; - } -#else /* MBEDTLS_HAVE_TIME */ - /* - * Reuse first entry in chain if max_entries reached, - * but move to last place - */ - if( count >= cache->max_entries ) - { - if( cache->chain == NULL ) - { - ret = 1; - goto exit; - } - - cur = cache->chain; - cache->chain = cur->next; - cur->next = NULL; - prv->next = cur; - } -#endif /* MBEDTLS_HAVE_TIME */ - else - { - /* - * max_entries not reached, create new entry - */ - cur = mbedtls_calloc( 1, sizeof(mbedtls_ssl_cache_entry) ); - if( cur == NULL ) - { - ret = 1; - goto exit; - } - - if( prv == NULL ) - cache->chain = cur; - else - prv->next = cur; - } - -#if defined(MBEDTLS_HAVE_TIME) - cur->timestamp = t; -#endif - } - - memcpy( &cur->session, session, sizeof( mbedtls_ssl_session ) ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * If we're reusing an entry, free its certificate first - */ - if( cur->peer_cert.p != NULL ) - { - mbedtls_free( cur->peer_cert.p ); - memset( &cur->peer_cert, 0, sizeof(mbedtls_x509_buf) ); - } - - /* - * Store peer certificate - */ - if( session->peer_cert != NULL ) - { - cur->peer_cert.p = mbedtls_calloc( 1, session->peer_cert->raw.len ); - if( cur->peer_cert.p == NULL ) - { - ret = 1; - goto exit; - } - - memcpy( cur->peer_cert.p, session->peer_cert->raw.p, - session->peer_cert->raw.len ); - cur->peer_cert.len = session->peer_cert->raw.len; - - cur->session.peer_cert = NULL; - } -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - ret = 0; - -exit: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &cache->mutex ) != 0 ) - ret = 1; -#endif - - return( ret ); -} - -#if defined(MBEDTLS_HAVE_TIME) -void mbedtls_ssl_cache_set_timeout( mbedtls_ssl_cache_context *cache, int timeout ) -{ - if( timeout < 0 ) timeout = 0; - - cache->timeout = timeout; -} -#endif /* MBEDTLS_HAVE_TIME */ - -void mbedtls_ssl_cache_set_max_entries( mbedtls_ssl_cache_context *cache, int max ) -{ - if( max < 0 ) max = 0; - - cache->max_entries = max; -} - -void mbedtls_ssl_cache_free( mbedtls_ssl_cache_context *cache ) -{ - mbedtls_ssl_cache_entry *cur, *prv; - - cur = cache->chain; - - while( cur != NULL ) - { - prv = cur; - cur = cur->next; - - mbedtls_ssl_session_free( &prv->session ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_free( prv->peer_cert.p ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - mbedtls_free( prv ); - } - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &cache->mutex ); -#endif -} - -#endif /* MBEDTLS_SSL_CACHE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_ciphersuites.c b/build/premake/premake5/contrib/mbedtls/library/ssl_ciphersuites.c deleted file mode 100644 index 949b9ed648..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_ciphersuites.c +++ /dev/null @@ -1,1852 +0,0 @@ -/** - * \file ssl_ciphersuites.c - * - * \brief SSL ciphersuites for mbed TLS - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_TLS_C) - -#include "mbedtls/ssl_ciphersuites.h" -#include "mbedtls/ssl.h" - -// #include -#include - -/* - * Ordered from most preferred to least preferred in terms of security. - * - * Current rule (except rc4, weak and null which come last): - * 1. By key exchange: - * Forward-secure non-PSK > forward-secure PSK > ECJPAKE > other non-PSK > other PSK - * 2. By key length and cipher: - * AES-256 > Camellia-256 > AES-128 > Camellia-128 > 3DES - * 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8 - * 4. By hash function used when relevant - * 5. By key exchange/auth again: EC > non-EC - */ -static const int ciphersuite_preference[] = -{ -#if defined(MBEDTLS_SSL_CIPHERSUITES) - MBEDTLS_SSL_CIPHERSUITES, -#else - /* All AES-256 ephemeral suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, - MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, - MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, - - /* All CAMELLIA-256 ephemeral suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, - MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, - MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, - MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, - - /* All AES-128 ephemeral suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, - MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, - MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, - - /* All CAMELLIA-128 ephemeral suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, - - /* All remaining >= 128-bit ephemeral suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, - MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, - MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, - - /* The PSK ephemeral suites */ - MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM, - MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, - MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, - MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8, - - MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM, - MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8, - - MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, - - /* The ECJPAKE suite */ - MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8, - - /* All AES-256 suites */ - MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_RSA_WITH_AES_256_CCM, - MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, - MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, - - /* All CAMELLIA-256 suites */ - MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, - MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, - MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, - MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, - - /* All AES-128 suites */ - MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_RSA_WITH_AES_128_CCM, - MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, - - /* All CAMELLIA-128 suites */ - MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, - MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, - - /* All remaining >= 128-bit suites */ - MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA, - MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, - MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, - - /* The RSA PSK suites */ - MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, - - MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, - - MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, - - /* The PSK suites */ - MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384, - MBEDTLS_TLS_PSK_WITH_AES_256_CCM, - MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384, - MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA, - MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, - MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, - MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, - - MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_PSK_WITH_AES_128_CCM, - MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256, - MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA, - MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, - MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, - MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, - - MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, - - /* RC4 suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA, - MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA, - MBEDTLS_TLS_RSA_WITH_RC4_128_SHA, - MBEDTLS_TLS_RSA_WITH_RC4_128_MD5, - MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA, - MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, - MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA, - MBEDTLS_TLS_PSK_WITH_RC4_128_SHA, - - /* Weak suites */ - MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA, - MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA, - - /* NULL suites */ - MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA, - MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA, - MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384, - MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256, - MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA, - MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384, - MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256, - MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA, - - MBEDTLS_TLS_RSA_WITH_NULL_SHA256, - MBEDTLS_TLS_RSA_WITH_NULL_SHA, - MBEDTLS_TLS_RSA_WITH_NULL_MD5, - MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA, - MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA, - MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384, - MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256, - MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA, - MBEDTLS_TLS_PSK_WITH_NULL_SHA384, - MBEDTLS_TLS_PSK_WITH_NULL_SHA256, - MBEDTLS_TLS_PSK_WITH_NULL_SHA, - -#endif /* MBEDTLS_SSL_CIPHERSUITES */ - 0 -}; - -static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] = -{ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_SHA1_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_SHA256_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA512_C */ -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, -#endif /* MBEDTLS_CCM_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS-ECDHE-ECDSA-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_SHA1_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_SHA256_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS-ECDHE-RSA-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_SHA256_C) -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, - { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, -#endif /* MBEDTLS_CCM_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_SHA256_C) -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA1_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, - { MBEDTLS_TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, -#endif /* MBEDTLS_CCM_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_MD5_C) - { MBEDTLS_TLS_RSA_WITH_RC4_128_MD5, "TLS-RSA-WITH-RC4-128-MD5", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_WITH_RC4_128_SHA, "TLS-RSA-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif -#endif /* MBEDTLS_ARC4_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_SHA1_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_SHA256_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-RSA-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA, "TLS-ECDH-RSA-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_SHA1_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_SHA256_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_GCM_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, "TLS-ECDH-ECDSA-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ - -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, - { MBEDTLS_TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, -#endif /* MBEDTLS_CCM_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-PSK-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_PSK_WITH_RC4_128_SHA, "TLS-PSK-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8", - MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, - { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, -#endif /* MBEDTLS_CCM_C */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA, "TLS-DHE-PSK-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) -#if defined(MBEDTLS_AES_C) - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA, "TLS-ECDHE-PSK-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256", - MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384", - MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA", - MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, - - { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA", - MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_CAMELLIA_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_GCM_C) -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256", - MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384", - MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_GCM_C */ -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA", - MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - 0 }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ARC4_C) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA, "TLS-RSA-PSK-WITH-RC4-128-SHA", - MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_NODTLS }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_ARC4_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_CCM_C) - { MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8, "TLS-ECJPAKE-WITH-AES-128-CCM-8", - MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECJPAKE, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_SHORT_TAG }, -#endif /* MBEDTLS_CCM_C */ -#endif /* MBEDTLS_AES_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_ENABLE_WEAK_CIPHERSUITES) -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) -#if defined(MBEDTLS_MD5_C) - { MBEDTLS_TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif - -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif - -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ - -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ - -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ - -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ - -#if defined(MBEDTLS_SHA256_C) - { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif - -#if defined(MBEDTLS_SHA512_C) - { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384", - MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ - -#if defined(MBEDTLS_DES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA, "TLS-DHE-RSA-WITH-DES-CBC-SHA", - MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) -#if defined(MBEDTLS_SHA1_C) - { MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA, "TLS-RSA-WITH-DES-CBC-SHA", - MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0, - MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3, - MBEDTLS_CIPHERSUITE_WEAK }, -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* MBEDTLS_DES_C */ -#endif /* MBEDTLS_ENABLE_WEAK_CIPHERSUITES */ - - { 0, "", - MBEDTLS_CIPHER_NONE, MBEDTLS_MD_NONE, MBEDTLS_KEY_EXCHANGE_NONE, - 0, 0, 0, 0, 0 } -}; - -#if defined(MBEDTLS_SSL_CIPHERSUITES) -const int *mbedtls_ssl_list_ciphersuites( void ) -{ - return( ciphersuite_preference ); -} -#else -#define MAX_CIPHERSUITES sizeof( ciphersuite_definitions ) / \ - sizeof( ciphersuite_definitions[0] ) -static int supported_ciphersuites[MAX_CIPHERSUITES]; -static int supported_init = 0; - -const int *mbedtls_ssl_list_ciphersuites( void ) -{ - /* - * On initial call filter out all ciphersuites not supported by current - * build based on presence in the ciphersuite_definitions. - */ - if( supported_init == 0 ) - { - const int *p; - int *q; - - for( p = ciphersuite_preference, q = supported_ciphersuites; - *p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1; - p++ ) - { -#if defined(MBEDTLS_REMOVE_ARC4_CIPHERSUITES) - const mbedtls_ssl_ciphersuite_t *cs_info; - if( ( cs_info = mbedtls_ssl_ciphersuite_from_id( *p ) ) != NULL && - cs_info->cipher != MBEDTLS_CIPHER_ARC4_128 ) -#else - if( mbedtls_ssl_ciphersuite_from_id( *p ) != NULL ) -#endif - *(q++) = *p; - } - *q = 0; - - supported_init = 1; - } - - return( supported_ciphersuites ); -} -#endif /* MBEDTLS_SSL_CIPHERSUITES */ - -const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string( - const char *ciphersuite_name ) -{ - const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions; - - if( NULL == ciphersuite_name ) - return( NULL ); - - while( cur->id != 0 ) - { - if( 0 == strcmp( cur->name, ciphersuite_name ) ) - return( cur ); - - cur++; - } - - return( NULL ); -} - -const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id( int ciphersuite ) -{ - const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions; - - while( cur->id != 0 ) - { - if( cur->id == ciphersuite ) - return( cur ); - - cur++; - } - - return( NULL ); -} - -const char *mbedtls_ssl_get_ciphersuite_name( const int ciphersuite_id ) -{ - const mbedtls_ssl_ciphersuite_t *cur; - - cur = mbedtls_ssl_ciphersuite_from_id( ciphersuite_id ); - - if( cur == NULL ) - return( "unknown" ); - - return( cur->name ); -} - -int mbedtls_ssl_get_ciphersuite_id( const char *ciphersuite_name ) -{ - const mbedtls_ssl_ciphersuite_t *cur; - - cur = mbedtls_ssl_ciphersuite_from_string( ciphersuite_name ); - - if( cur == NULL ) - return( 0 ); - - return( cur->id ); -} - -#if defined(MBEDTLS_PK_C) -mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg( const mbedtls_ssl_ciphersuite_t *info ) -{ - switch( info->key_exchange ) - { - case MBEDTLS_KEY_EXCHANGE_RSA: - case MBEDTLS_KEY_EXCHANGE_DHE_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA: - case MBEDTLS_KEY_EXCHANGE_RSA_PSK: - return( MBEDTLS_PK_RSA ); - - case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA: - return( MBEDTLS_PK_ECDSA ); - - case MBEDTLS_KEY_EXCHANGE_ECDH_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA: - return( MBEDTLS_PK_ECKEY ); - - default: - return( MBEDTLS_PK_NONE ); - } -} -#endif /* MBEDTLS_PK_C */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) -int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info ) -{ - switch( info->key_exchange ) - { - case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA: - case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK: - case MBEDTLS_KEY_EXCHANGE_ECDH_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA: - return( 1 ); - - default: - return( 0 ); - } -} -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info ) -{ - switch( info->key_exchange ) - { - case MBEDTLS_KEY_EXCHANGE_PSK: - case MBEDTLS_KEY_EXCHANGE_RSA_PSK: - case MBEDTLS_KEY_EXCHANGE_DHE_PSK: - case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK: - return( 1 ); - - default: - return( 0 ); - } -} -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#endif /* MBEDTLS_SSL_TLS_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_cli.c b/build/premake/premake5/contrib/mbedtls/library/ssl_cli.c deleted file mode 100644 index 4452169d98..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_cli.c +++ /dev/null @@ -1,3390 +0,0 @@ -/* - * SSLv3/TLSv1 client-side functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_CLI_C) - -#include "mbedtls/debug.h" -#include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" - -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include - -#if defined(MBEDTLS_HAVE_TIME) -#include -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} -#endif - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) -static void ssl_write_hostname_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - size_t hostname_len; - - *olen = 0; - - if( ssl->hostname == NULL ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding server name extension: %s", - ssl->hostname ) ); - - hostname_len = strlen( ssl->hostname ); - - if( end < p || (size_t)( end - p ) < hostname_len + 9 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - /* - * struct { - * NameType name_type; - * select (name_type) { - * case host_name: HostName; - * } name; - * } ServerName; - * - * enum { - * host_name(0), (255) - * } NameType; - * - * opaque HostName<1..2^16-1>; - * - * struct { - * ServerName server_name_list<1..2^16-1> - * } ServerNameList; - */ - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SERVERNAME >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SERVERNAME ) & 0xFF ); - - *p++ = (unsigned char)( ( (hostname_len + 5) >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( (hostname_len + 5) ) & 0xFF ); - - *p++ = (unsigned char)( ( (hostname_len + 3) >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( (hostname_len + 3) ) & 0xFF ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME ) & 0xFF ); - *p++ = (unsigned char)( ( hostname_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( hostname_len ) & 0xFF ); - - memcpy( p, ssl->hostname, hostname_len ); - - *olen = hostname_len + 9; -} -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -static void ssl_write_renegotiation_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - *olen = 0; - - if( ssl->renego_status != MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding renegotiation extension" ) ); - - if( end < p || (size_t)( end - p ) < 5 + ssl->verify_data_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - /* - * Secure renegotiation - */ - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_RENEGOTIATION_INFO >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_RENEGOTIATION_INFO ) & 0xFF ); - - *p++ = 0x00; - *p++ = ( ssl->verify_data_len + 1 ) & 0xFF; - *p++ = ssl->verify_data_len & 0xFF; - - memcpy( p, ssl->own_verify_data, ssl->verify_data_len ); - - *olen = 5 + ssl->verify_data_len; -} -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - -/* - * Only if we handle at least one key exchange that needs signatures. - */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ - defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -static void ssl_write_signature_algorithms_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - size_t sig_alg_len = 0; - const int *md; -#if defined(MBEDTLS_RSA_C) || defined(MBEDTLS_ECDSA_C) - unsigned char *sig_alg_list = buf + 6; -#endif - - *olen = 0; - - if( ssl->conf->max_minor_ver != MBEDTLS_SSL_MINOR_VERSION_3 ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding signature_algorithms extension" ) ); - - for( md = ssl->conf->sig_hashes; *md != MBEDTLS_MD_NONE; md++ ) - { -#if defined(MBEDTLS_ECDSA_C) - sig_alg_len += 2; -#endif -#if defined(MBEDTLS_RSA_C) - sig_alg_len += 2; -#endif - } - - if( end < p || (size_t)( end - p ) < sig_alg_len + 6 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - /* - * Prepare signature_algorithms extension (TLS 1.2) - */ - sig_alg_len = 0; - - for( md = ssl->conf->sig_hashes; *md != MBEDTLS_MD_NONE; md++ ) - { -#if defined(MBEDTLS_ECDSA_C) - sig_alg_list[sig_alg_len++] = mbedtls_ssl_hash_from_md_alg( *md ); - sig_alg_list[sig_alg_len++] = MBEDTLS_SSL_SIG_ECDSA; -#endif -#if defined(MBEDTLS_RSA_C) - sig_alg_list[sig_alg_len++] = mbedtls_ssl_hash_from_md_alg( *md ); - sig_alg_list[sig_alg_len++] = MBEDTLS_SSL_SIG_RSA; -#endif - } - - /* - * enum { - * none(0), md5(1), sha1(2), sha224(3), sha256(4), sha384(5), - * sha512(6), (255) - * } HashAlgorithm; - * - * enum { anonymous(0), rsa(1), dsa(2), ecdsa(3), (255) } - * SignatureAlgorithm; - * - * struct { - * HashAlgorithm hash; - * SignatureAlgorithm signature; - * } SignatureAndHashAlgorithm; - * - * SignatureAndHashAlgorithm - * supported_signature_algorithms<2..2^16-2>; - */ - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SIG_ALG >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SIG_ALG ) & 0xFF ); - - *p++ = (unsigned char)( ( ( sig_alg_len + 2 ) >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( ( sig_alg_len + 2 ) ) & 0xFF ); - - *p++ = (unsigned char)( ( sig_alg_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( sig_alg_len ) & 0xFF ); - - *olen = 6 + sig_alg_len; -} -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 && - MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static void ssl_write_supported_elliptic_curves_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - unsigned char *elliptic_curve_list = p + 6; - size_t elliptic_curve_len = 0; - const mbedtls_ecp_curve_info *info; -#if defined(MBEDTLS_ECP_C) - const mbedtls_ecp_group_id *grp_id; -#else - ((void) ssl); -#endif - - *olen = 0; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding supported_elliptic_curves extension" ) ); - -#if defined(MBEDTLS_ECP_C) - for( grp_id = ssl->conf->curve_list; *grp_id != MBEDTLS_ECP_DP_NONE; grp_id++ ) - { - info = mbedtls_ecp_curve_info_from_grp_id( *grp_id ); -#else - for( info = mbedtls_ecp_curve_list(); info->grp_id != MBEDTLS_ECP_DP_NONE; info++ ) - { -#endif - elliptic_curve_len += 2; - } - - if( end < p || (size_t)( end - p ) < 6 + elliptic_curve_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - elliptic_curve_len = 0; - -#if defined(MBEDTLS_ECP_C) - for( grp_id = ssl->conf->curve_list; *grp_id != MBEDTLS_ECP_DP_NONE; grp_id++ ) - { - info = mbedtls_ecp_curve_info_from_grp_id( *grp_id ); -#else - for( info = mbedtls_ecp_curve_list(); info->grp_id != MBEDTLS_ECP_DP_NONE; info++ ) - { -#endif - - elliptic_curve_list[elliptic_curve_len++] = info->tls_id >> 8; - elliptic_curve_list[elliptic_curve_len++] = info->tls_id & 0xFF; - } - - if( elliptic_curve_len == 0 ) - return; - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES ) & 0xFF ); - - *p++ = (unsigned char)( ( ( elliptic_curve_len + 2 ) >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( ( elliptic_curve_len + 2 ) ) & 0xFF ); - - *p++ = (unsigned char)( ( ( elliptic_curve_len ) >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( ( elliptic_curve_len ) ) & 0xFF ); - - *olen = 6 + elliptic_curve_len; -} - -static void ssl_write_supported_point_formats_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - *olen = 0; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding supported_point_formats extension" ) ); - - if( end < p || (size_t)( end - p ) < 6 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS ) & 0xFF ); - - *p++ = 0x00; - *p++ = 2; - - *p++ = 1; - *p++ = MBEDTLS_ECP_PF_UNCOMPRESSED; - - *olen = 6; -} -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || - MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static void ssl_write_ecjpake_kkpp_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - int ret; - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - size_t kkpp_len; - - *olen = 0; - - /* Skip costly extension if we can't use EC J-PAKE anyway */ - if( mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding ecjpake_kkpp extension" ) ); - - if( end - p < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ECJPAKE_KKPP >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ECJPAKE_KKPP ) & 0xFF ); - - /* - * We may need to send ClientHello multiple times for Hello verification. - * We don't want to compute fresh values every time (both for performance - * and consistency reasons), so cache the extension content. - */ - if( ssl->handshake->ecjpake_cache == NULL || - ssl->handshake->ecjpake_cache_len == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "generating new ecjpake parameters" ) ); - - ret = mbedtls_ecjpake_write_round_one( &ssl->handshake->ecjpake_ctx, - p + 2, end - p - 2, &kkpp_len, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1 , "mbedtls_ecjpake_write_round_one", ret ); - return; - } - - ssl->handshake->ecjpake_cache = mbedtls_calloc( 1, kkpp_len ); - if( ssl->handshake->ecjpake_cache == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "allocation failed" ) ); - return; - } - - memcpy( ssl->handshake->ecjpake_cache, p + 2, kkpp_len ); - ssl->handshake->ecjpake_cache_len = kkpp_len; - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "re-using cached ecjpake parameters" ) ); - - kkpp_len = ssl->handshake->ecjpake_cache_len; - - if( (size_t)( end - p - 2 ) < kkpp_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - memcpy( p + 2, ssl->handshake->ecjpake_cache, kkpp_len ); - } - - *p++ = (unsigned char)( ( kkpp_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( kkpp_len ) & 0xFF ); - - *olen = kkpp_len + 4; -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -static void ssl_write_max_fragment_length_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - *olen = 0; - - if( ssl->conf->mfl_code == MBEDTLS_SSL_MAX_FRAG_LEN_NONE ) { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding max_fragment_length extension" ) ); - - if( end < p || (size_t)( end - p ) < 5 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH ) & 0xFF ); - - *p++ = 0x00; - *p++ = 1; - - *p++ = ssl->conf->mfl_code; - - *olen = 5; -} -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -static void ssl_write_truncated_hmac_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - *olen = 0; - - if( ssl->conf->trunc_hmac == MBEDTLS_SSL_TRUNC_HMAC_DISABLED ) - { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding truncated_hmac extension" ) ); - - if( end < p || (size_t)( end - p ) < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_TRUNCATED_HMAC >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_TRUNCATED_HMAC ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -static void ssl_write_encrypt_then_mac_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - *olen = 0; - - if( ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_DISABLED || - ssl->conf->max_minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding encrypt_then_mac " - "extension" ) ); - - if( end < p || (size_t)( end - p ) < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -static void ssl_write_extended_ms_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - *olen = 0; - - if( ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED || - ssl->conf->max_minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding extended_master_secret " - "extension" ) ); - - if( end < p || (size_t)( end - p ) < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -static void ssl_write_session_ticket_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - size_t tlen = ssl->session_negotiate->ticket_len; - - *olen = 0; - - if( ssl->conf->session_tickets == MBEDTLS_SSL_SESSION_TICKETS_DISABLED ) - { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding session ticket extension" ) ); - - if( end < p || (size_t)( end - p ) < 4 + tlen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SESSION_TICKET >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SESSION_TICKET ) & 0xFF ); - - *p++ = (unsigned char)( ( tlen >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( tlen ) & 0xFF ); - - *olen = 4; - - if( ssl->session_negotiate->ticket == NULL || tlen == 0 ) - { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "sending session ticket of length %d", tlen ) ); - - memcpy( p, ssl->session_negotiate->ticket, tlen ); - - *olen += tlen; -} -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_SSL_ALPN) -static void ssl_write_alpn_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, size_t *olen ) -{ - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - size_t alpnlen = 0; - const char **cur; - - *olen = 0; - - if( ssl->conf->alpn_list == NULL ) - { - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding alpn extension" ) ); - - for( cur = ssl->conf->alpn_list; *cur != NULL; cur++ ) - alpnlen += (unsigned char)( strlen( *cur ) & 0xFF ) + 1; - - if( end < p || (size_t)( end - p ) < 6 + alpnlen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ALPN >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ALPN ) & 0xFF ); - - /* - * opaque ProtocolName<1..2^8-1>; - * - * struct { - * ProtocolName protocol_name_list<2..2^16-1> - * } ProtocolNameList; - */ - - /* Skip writing extension and list length for now */ - p += 4; - - for( cur = ssl->conf->alpn_list; *cur != NULL; cur++ ) - { - *p = (unsigned char)( strlen( *cur ) & 0xFF ); - memcpy( p + 1, *cur, *p ); - p += 1 + *p; - } - - *olen = p - buf; - - /* List length = olen - 2 (ext_type) - 2 (ext_len) - 2 (list_len) */ - buf[4] = (unsigned char)( ( ( *olen - 6 ) >> 8 ) & 0xFF ); - buf[5] = (unsigned char)( ( ( *olen - 6 ) ) & 0xFF ); - - /* Extension length = olen - 2 (ext_type) - 2 (ext_len) */ - buf[2] = (unsigned char)( ( ( *olen - 4 ) >> 8 ) & 0xFF ); - buf[3] = (unsigned char)( ( ( *olen - 4 ) ) & 0xFF ); -} -#endif /* MBEDTLS_SSL_ALPN */ - -/* - * Generate random bytes for ClientHello - */ -static int ssl_generate_random( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *p = ssl->handshake->randbytes; -#if defined(MBEDTLS_HAVE_TIME) - time_t t; -#endif - - /* - * When responding to a verify request, MUST reuse random (RFC 6347 4.2.1) - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake->verify_cookie != NULL ) - { - return( 0 ); - } -#endif - -#if defined(MBEDTLS_HAVE_TIME) - t = time( NULL ); - *p++ = (unsigned char)( t >> 24 ); - *p++ = (unsigned char)( t >> 16 ); - *p++ = (unsigned char)( t >> 8 ); - *p++ = (unsigned char)( t ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, current time: %lu", t ) ); -#else - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 4 ) ) != 0 ) - return( ret ); - - p += 4; -#endif /* MBEDTLS_HAVE_TIME */ - - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 28 ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) -{ - int ret; - size_t i, n, olen, ext_len = 0; - unsigned char *buf; - unsigned char *p, *q; - unsigned char offer_compress; - const int *ciphersuites; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write client hello" ) ); - - if( ssl->conf->f_rng == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "no RNG provided") ); - return( MBEDTLS_ERR_SSL_NO_RNG ); - } - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE ) -#endif - { - ssl->major_ver = ssl->conf->min_major_ver; - ssl->minor_ver = ssl->conf->min_minor_ver; - } - - if( ssl->conf->max_major_ver == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "configured max major version is invalid, " - "consider using mbedtls_ssl_config_defaults()" ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - /* - * 0 . 0 handshake type - * 1 . 3 handshake length - * 4 . 5 highest version supported - * 6 . 9 current UNIX time - * 10 . 37 random bytes - */ - buf = ssl->out_msg; - p = buf + 4; - - mbedtls_ssl_write_version( ssl->conf->max_major_ver, ssl->conf->max_minor_ver, - ssl->conf->transport, p ); - p += 2; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, max version: [%d:%d]", - buf[4], buf[5] ) ); - - if( ( ret = ssl_generate_random( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_generate_random", ret ); - return( ret ); - } - - memcpy( p, ssl->handshake->randbytes, 32 ); - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, random bytes", p, 32 ); - p += 32; - - /* - * 38 . 38 session id length - * 39 . 39+n session id - * 39+n . 39+n DTLS only: cookie length (1 byte) - * 40+n . .. DTSL only: cookie - * .. . .. ciphersuitelist length (2 bytes) - * .. . .. ciphersuitelist - * .. . .. compression methods length (1 byte) - * .. . .. compression methods - * .. . .. extensions length (2 bytes) - * .. . .. extensions - */ - n = ssl->session_negotiate->id_len; - - if( n < 16 || n > 32 || -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE || -#endif - ssl->handshake->resume == 0 ) - { - n = 0; - } - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - /* - * RFC 5077 section 3.4: "When presenting a ticket, the client MAY - * generate and include a Session ID in the TLS ClientHello." - */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE ) -#endif - { - if( ssl->session_negotiate->ticket != NULL && - ssl->session_negotiate->ticket_len != 0 ) - { - ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->session_negotiate->id, 32 ); - - if( ret != 0 ) - return( ret ); - - ssl->session_negotiate->id_len = n = 32; - } - } -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - - *p++ = (unsigned char) n; - - for( i = 0; i < n; i++ ) - *p++ = ssl->session_negotiate->id[i]; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, session id len.: %d", n ) ); - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, session id", buf + 39, n ); - - /* - * DTLS cookie - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - if( ssl->handshake->verify_cookie == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "no verify cookie to send" ) ); - *p++ = 0; - } - else - { - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, cookie", - ssl->handshake->verify_cookie, - ssl->handshake->verify_cookie_len ); - - *p++ = ssl->handshake->verify_cookie_len; - memcpy( p, ssl->handshake->verify_cookie, - ssl->handshake->verify_cookie_len ); - p += ssl->handshake->verify_cookie_len; - } - } -#endif - - /* - * Ciphersuite list - */ - ciphersuites = ssl->conf->ciphersuite_list[ssl->minor_ver]; - - /* Skip writing ciphersuite length for now */ - n = 0; - q = p; - p += 2; - - for( i = 0; ciphersuites[i] != 0; i++ ) - { - ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( ciphersuites[i] ); - - if( ciphersuite_info == NULL ) - continue; - - if( ciphersuite_info->min_minor_ver > ssl->conf->max_minor_ver || - ciphersuite_info->max_minor_ver < ssl->conf->min_minor_ver ) - continue; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ( ciphersuite_info->flags & MBEDTLS_CIPHERSUITE_NODTLS ) ) - continue; -#endif - -#if defined(MBEDTLS_ARC4_C) - if( ssl->conf->arc4_disabled == MBEDTLS_SSL_ARC4_DISABLED && - ciphersuite_info->cipher == MBEDTLS_CIPHER_ARC4_128 ) - continue; -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE && - mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) - continue; -#endif - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %04x", - ciphersuites[i] ) ); - - n++; - *p++ = (unsigned char)( ciphersuites[i] >> 8 ); - *p++ = (unsigned char)( ciphersuites[i] ); - } - - /* - * Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV - */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE ) -#endif - { - *p++ = (unsigned char)( MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO >> 8 ); - *p++ = (unsigned char)( MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO ); - n++; - } - - /* Some versions of OpenSSL don't handle it correctly if not at end */ -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) - if( ssl->conf->fallback == MBEDTLS_SSL_IS_FALLBACK ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "adding FALLBACK_SCSV" ) ); - *p++ = (unsigned char)( MBEDTLS_SSL_FALLBACK_SCSV_VALUE >> 8 ); - *p++ = (unsigned char)( MBEDTLS_SSL_FALLBACK_SCSV_VALUE ); - n++; - } -#endif - - *q++ = (unsigned char)( n >> 7 ); - *q++ = (unsigned char)( n << 1 ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, got %d ciphersuites", n ) ); - -#if defined(MBEDTLS_ZLIB_SUPPORT) - offer_compress = 1; -#else - offer_compress = 0; -#endif - - /* - * We don't support compression with DTLS right now: is many records come - * in the same datagram, uncompressing one could overwrite the next one. - * We don't want to add complexity for handling that case unless there is - * an actual need for it. - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - offer_compress = 0; -#endif - - if( offer_compress ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, compress len.: %d", 2 ) ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, compress alg.: %d %d", - MBEDTLS_SSL_COMPRESS_DEFLATE, MBEDTLS_SSL_COMPRESS_NULL ) ); - - *p++ = 2; - *p++ = MBEDTLS_SSL_COMPRESS_DEFLATE; - *p++ = MBEDTLS_SSL_COMPRESS_NULL; - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, compress len.: %d", 1 ) ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, compress alg.: %d", - MBEDTLS_SSL_COMPRESS_NULL ) ); - - *p++ = 1; - *p++ = MBEDTLS_SSL_COMPRESS_NULL; - } - - // First write extensions, then the total length - // -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - ssl_write_hostname_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl_write_renegotiation_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ - defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) - ssl_write_signature_algorithms_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - ssl_write_supported_elliptic_curves_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; - - ssl_write_supported_point_formats_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - ssl_write_ecjpake_kkpp_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - ssl_write_max_fragment_length_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - ssl_write_truncated_hmac_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - ssl_write_encrypt_then_mac_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - ssl_write_extended_ms_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_ALPN) - ssl_write_alpn_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - - /* olen unused if all extensions are disabled */ - ((void) olen); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, total extension length: %d", - ext_len ) ); - - if( ext_len > 0 ) - { - *p++ = (unsigned char)( ( ext_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( ext_len ) & 0xFF ); - p += ext_len; - } - - ssl->out_msglen = p - buf; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_CLIENT_HELLO; - - ssl->state++; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - mbedtls_ssl_send_flight_completed( ssl ); -#endif - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write client hello" ) ); - - return( 0 ); -} - -static int ssl_parse_renegotiation_info( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - int ret; - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) - { - /* Check verify-data in constant-time. The length OTOH is no secret */ - if( len != 1 + ssl->verify_data_len * 2 || - buf[0] != ssl->verify_data_len * 2 || - mbedtls_ssl_safer_memcmp( buf + 1, - ssl->own_verify_data, ssl->verify_data_len ) != 0 || - mbedtls_ssl_safer_memcmp( buf + 1 + ssl->verify_data_len, - ssl->peer_verify_data, ssl->verify_data_len ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "non-matching renegotiation info" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - } - else -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - { - if( len != 1 || buf[0] != 0x00 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "non-zero length renegotiation info" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - ssl->secure_renegotiation = MBEDTLS_SSL_SECURE_RENEGOTIATION; - } - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -static int ssl_parse_max_fragment_length_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - /* - * server should use the extension only if we did, - * and if so the server's value should match ours (and len is always 1) - */ - if( ssl->conf->mfl_code == MBEDTLS_SSL_MAX_FRAG_LEN_NONE || - len != 1 || - buf[0] != ssl->conf->mfl_code ) - { - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - return( 0 ); -} -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -static int ssl_parse_truncated_hmac_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( ssl->conf->trunc_hmac == MBEDTLS_SSL_TRUNC_HMAC_DISABLED || - len != 0 ) - { - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - ((void) buf); - - ssl->session_negotiate->trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_ENABLED; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -static int ssl_parse_encrypt_then_mac_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_DISABLED || - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 || - len != 0 ) - { - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - ((void) buf); - - ssl->session_negotiate->encrypt_then_mac = MBEDTLS_SSL_ETM_ENABLED; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -static int ssl_parse_extended_ms_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED || - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 || - len != 0 ) - { - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - ((void) buf); - - ssl->handshake->extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -static int ssl_parse_session_ticket_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( ssl->conf->session_tickets == MBEDTLS_SSL_SESSION_TICKETS_DISABLED || - len != 0 ) - { - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - ((void) buf); - - ssl->handshake->new_session_ticket = 1; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static int ssl_parse_supported_point_formats_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - size_t list_size; - const unsigned char *p; - - list_size = buf[0]; - if( list_size + 1 != len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - p = buf + 1; - while( list_size > 0 ) - { - if( p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED || - p[0] == MBEDTLS_ECP_PF_COMPRESSED ) - { -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) - ssl->handshake->ecdh_ctx.point_format = p[0]; -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - ssl->handshake->ecjpake_ctx.point_format = p[0]; -#endif - MBEDTLS_SSL_DEBUG_MSG( 4, ( "point format selected: %d", p[0] ) ); - return( 0 ); - } - - list_size--; - p++; - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "no point format in common" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); -} -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || - MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static int ssl_parse_ecjpake_kkpp( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - int ret; - - if( ssl->transform_negotiate->ciphersuite_info->key_exchange != - MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "skip ecjpake kkpp extension" ) ); - return( 0 ); - } - - /* If we got here, we no longer need our cached extension */ - mbedtls_free( ssl->handshake->ecjpake_cache ); - ssl->handshake->ecjpake_cache = NULL; - ssl->handshake->ecjpake_cache_len = 0; - - if( ( ret = mbedtls_ecjpake_read_round_one( &ssl->handshake->ecjpake_ctx, - buf, len ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_read_round_one", ret ); - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_ALPN) -static int ssl_parse_alpn_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - size_t list_len, name_len; - const char **p; - - /* If we didn't send it, the server shouldn't send it */ - if( ssl->conf->alpn_list == NULL ) - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - - /* - * opaque ProtocolName<1..2^8-1>; - * - * struct { - * ProtocolName protocol_name_list<2..2^16-1> - * } ProtocolNameList; - * - * the "ProtocolNameList" MUST contain exactly one "ProtocolName" - */ - - /* Min length is 2 (list_len) + 1 (name_len) + 1 (name) */ - if( len < 4 ) - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - - list_len = ( buf[0] << 8 ) | buf[1]; - if( list_len != len - 2 ) - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - - name_len = buf[2]; - if( name_len != list_len - 1 ) - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - - /* Check that the server chosen protocol was in our list and save it */ - for( p = ssl->conf->alpn_list; *p != NULL; p++ ) - { - if( name_len == strlen( *p ) && - memcmp( buf + 3, *p, name_len ) == 0 ) - { - ssl->alpn_chosen = *p; - return( 0 ); - } - } - - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); -} -#endif /* MBEDTLS_SSL_ALPN */ - -/* - * Parse HelloVerifyRequest. Only called after verifying the HS type. - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) -static int ssl_parse_hello_verify_request( mbedtls_ssl_context *ssl ) -{ - const unsigned char *p = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ); - int major_ver, minor_ver; - unsigned char cookie_len; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse hello verify request" ) ); - - /* - * struct { - * ProtocolVersion server_version; - * opaque cookie<0..2^8-1>; - * } HelloVerifyRequest; - */ - MBEDTLS_SSL_DEBUG_BUF( 3, "server version", p, 2 ); - mbedtls_ssl_read_version( &major_ver, &minor_ver, ssl->conf->transport, p ); - p += 2; - - /* - * Since the RFC is not clear on this point, accept DTLS 1.0 (TLS 1.1) - * even is lower than our min version. - */ - if( major_ver < MBEDTLS_SSL_MAJOR_VERSION_3 || - minor_ver < MBEDTLS_SSL_MINOR_VERSION_2 || - major_ver > ssl->conf->max_major_ver || - minor_ver > ssl->conf->max_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server version" ) ); - - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION ); - - return( MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION ); - } - - cookie_len = *p++; - MBEDTLS_SSL_DEBUG_BUF( 3, "cookie", p, cookie_len ); - - mbedtls_free( ssl->handshake->verify_cookie ); - - ssl->handshake->verify_cookie = mbedtls_calloc( 1, cookie_len ); - if( ssl->handshake->verify_cookie == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc failed (%d bytes)", cookie_len ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - memcpy( ssl->handshake->verify_cookie, p, cookie_len ); - ssl->handshake->verify_cookie_len = cookie_len; - - /* Start over at ClientHello */ - ssl->state = MBEDTLS_SSL_CLIENT_HELLO; - mbedtls_ssl_reset_checksum( ssl ); - - mbedtls_ssl_recv_flight_completed( ssl ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse hello verify request" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) -{ - int ret, i; - size_t n; - size_t ext_len; - unsigned char *buf, *ext; - unsigned char comp; -#if defined(MBEDTLS_ZLIB_SUPPORT) - int accept_comp; -#endif -#if defined(MBEDTLS_SSL_RENEGOTIATION) - int renegotiation_info_seen = 0; -#endif - int handshake_failure = 0; - const mbedtls_ssl_ciphersuite_t *suite_info; -#if defined(MBEDTLS_DEBUG_C) - uint32_t t; -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server hello" ) ); - - buf = ssl->in_msg; - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - ssl->renego_records_seen++; - - if( ssl->conf->renego_max_records >= 0 && - ssl->renego_records_seen > ssl->conf->renego_max_records ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "renegotiation requested, " - "but not honored by server" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "non-handshake message during renego" ) ); - return( MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO ); - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - if( buf[0] == MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "received hello verify request" ) ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse server hello" ) ); - return( ssl_parse_hello_verify_request( ssl ) ); - } - else - { - /* We made it through the verification process */ - mbedtls_free( ssl->handshake->verify_cookie ); - ssl->handshake->verify_cookie = NULL; - ssl->handshake->verify_cookie_len = 0; - } - } -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - if( ssl->in_hslen < 38 + mbedtls_ssl_hs_hdr_len( ssl ) || - buf[0] != MBEDTLS_SSL_HS_SERVER_HELLO ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - /* - * 0 . 1 server_version - * 2 . 33 random (maybe including 4 bytes of Unix time) - * 34 . 34 session_id length = n - * 35 . 34+n session_id - * 35+n . 36+n cipher_suite - * 37+n . 37+n compression_method - * - * 38+n . 39+n extensions length (optional) - * 40+n . .. extensions - */ - buf += mbedtls_ssl_hs_hdr_len( ssl ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, version", buf + 0, 2 ); - mbedtls_ssl_read_version( &ssl->major_ver, &ssl->minor_ver, - ssl->conf->transport, buf + 0 ); - - if( ssl->major_ver < ssl->conf->min_major_ver || - ssl->minor_ver < ssl->conf->min_minor_ver || - ssl->major_ver > ssl->conf->max_major_ver || - ssl->minor_ver > ssl->conf->max_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server version out of bounds - " - " min: [%d:%d], server: [%d:%d], max: [%d:%d]", - ssl->conf->min_major_ver, ssl->conf->min_minor_ver, - ssl->major_ver, ssl->minor_ver, - ssl->conf->max_major_ver, ssl->conf->max_minor_ver ) ); - - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION ); - - return( MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION ); - } - -#if defined(MBEDTLS_DEBUG_C) - t = ( (uint32_t) buf[2] << 24 ) - | ( (uint32_t) buf[3] << 16 ) - | ( (uint32_t) buf[4] << 8 ) - | ( (uint32_t) buf[5] ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", t ) ); -#endif - - memcpy( ssl->handshake->randbytes + 32, buf + 2, 32 ); - - n = buf[34]; - - MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, random bytes", buf + 2, 32 ); - - if( n > 32 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - if( ssl->in_hslen > mbedtls_ssl_hs_hdr_len( ssl ) + 39 + n ) - { - ext_len = ( ( buf[38 + n] << 8 ) - | ( buf[39 + n] ) ); - - if( ( ext_len > 0 && ext_len < 4 ) || - ssl->in_hslen != mbedtls_ssl_hs_hdr_len( ssl ) + 40 + n + ext_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - } - else if( ssl->in_hslen == mbedtls_ssl_hs_hdr_len( ssl ) + 38 + n ) - { - ext_len = 0; - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - /* ciphersuite (used later) */ - i = ( buf[35 + n] << 8 ) | buf[36 + n]; - - /* - * Read and check compression - */ - comp = buf[37 + n]; - -#if defined(MBEDTLS_ZLIB_SUPPORT) - /* See comments in ssl_write_client_hello() */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - accept_comp = 0; - else -#endif - accept_comp = 1; - - if( comp != MBEDTLS_SSL_COMPRESS_NULL && - ( comp != MBEDTLS_SSL_COMPRESS_DEFLATE || accept_comp == 0 ) ) -#else /* MBEDTLS_ZLIB_SUPPORT */ - if( comp != MBEDTLS_SSL_COMPRESS_NULL ) -#endif/* MBEDTLS_ZLIB_SUPPORT */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server hello, bad compression: %d", comp ) ); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); - } - - /* - * Initialize update checksum functions - */ - ssl->transform_negotiate->ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( i ); - - if( ssl->transform_negotiate->ciphersuite_info == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "ciphersuite info for %04x not found", i ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - mbedtls_ssl_optimize_checksum( ssl, ssl->transform_negotiate->ciphersuite_info ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, session id len.: %d", n ) ); - MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, session id", buf + 35, n ); - - /* - * Check if the session can be resumed - */ - if( ssl->handshake->resume == 0 || n == 0 || -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE || -#endif - ssl->session_negotiate->ciphersuite != i || - ssl->session_negotiate->compression != comp || - ssl->session_negotiate->id_len != n || - memcmp( ssl->session_negotiate->id, buf + 35, n ) != 0 ) - { - ssl->state++; - ssl->handshake->resume = 0; -#if defined(MBEDTLS_HAVE_TIME) - ssl->session_negotiate->start = time( NULL ); -#endif - ssl->session_negotiate->ciphersuite = i; - ssl->session_negotiate->compression = comp; - ssl->session_negotiate->id_len = n; - memcpy( ssl->session_negotiate->id, buf + 35, n ); - } - else - { - ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC; - - if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret ); - return( ret ); - } - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed", - ssl->handshake->resume ? "a" : "no" ) ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %04x", i ) ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, compress alg.: %d", buf[37 + n] ) ); - - suite_info = mbedtls_ssl_ciphersuite_from_id( ssl->session_negotiate->ciphersuite ); - if( suite_info == NULL -#if defined(MBEDTLS_ARC4_C) - || ( ssl->conf->arc4_disabled && - suite_info->cipher == MBEDTLS_CIPHER_ARC4_128 ) -#endif - ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %s", suite_info->name ) ); - - i = 0; - while( 1 ) - { - if( ssl->conf->ciphersuite_list[ssl->minor_ver][i] == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - if( ssl->conf->ciphersuite_list[ssl->minor_ver][i++] == - ssl->session_negotiate->ciphersuite ) - { - break; - } - } - - if( comp != MBEDTLS_SSL_COMPRESS_NULL -#if defined(MBEDTLS_ZLIB_SUPPORT) - && comp != MBEDTLS_SSL_COMPRESS_DEFLATE -#endif - ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - ssl->session_negotiate->compression = comp; - - ext = buf + 40 + n; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "server hello, total extension length: %d", ext_len ) ); - - while( ext_len ) - { - unsigned int ext_id = ( ( ext[0] << 8 ) - | ( ext[1] ) ); - unsigned int ext_size = ( ( ext[2] << 8 ) - | ( ext[3] ) ); - - if( ext_size + 4 > ext_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - switch( ext_id ) - { - case MBEDTLS_TLS_EXT_RENEGOTIATION_INFO: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found renegotiation extension" ) ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - renegotiation_info_seen = 1; -#endif - - if( ( ret = ssl_parse_renegotiation_info( ssl, ext + 4, - ext_size ) ) != 0 ) - return( ret ); - - break; - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - case MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found max_fragment_length extension" ) ); - - if( ( ret = ssl_parse_max_fragment_length_ext( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - case MBEDTLS_TLS_EXT_TRUNCATED_HMAC: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found truncated_hmac extension" ) ); - - if( ( ret = ssl_parse_truncated_hmac_ext( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - case MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found encrypt_then_mac extension" ) ); - - if( ( ret = ssl_parse_encrypt_then_mac_ext( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - case MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found extended_master_secret extension" ) ); - - if( ( ret = ssl_parse_extended_ms_ext( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - case MBEDTLS_TLS_EXT_SESSION_TICKET: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found session_ticket extension" ) ); - - if( ( ret = ssl_parse_session_ticket_ext( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - case MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found supported_point_formats extension" ) ); - - if( ( ret = ssl_parse_supported_point_formats_ext( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || - MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - case MBEDTLS_TLS_EXT_ECJPAKE_KKPP: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found ecjpake_kkpp extension" ) ); - - if( ( ret = ssl_parse_ecjpake_kkpp( ssl, - ext + 4, ext_size ) ) != 0 ) - { - return( ret ); - } - - break; -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_ALPN) - case MBEDTLS_TLS_EXT_ALPN: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found alpn extension" ) ); - - if( ( ret = ssl_parse_alpn_ext( ssl, ext + 4, ext_size ) ) != 0 ) - return( ret ); - - break; -#endif /* MBEDTLS_SSL_ALPN */ - - default: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "unknown extension found: %d (ignoring)", - ext_id ) ); - } - - ext_len -= 4 + ext_size; - ext += 4 + ext_size; - - if( ext_len > 0 && ext_len < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - } - - /* - * Renegotiation security checks - */ - if( ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "legacy renegotiation, breaking off handshake" ) ); - handshake_failure = 1; - } -#if defined(MBEDTLS_SSL_RENEGOTIATION) - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->secure_renegotiation == MBEDTLS_SSL_SECURE_RENEGOTIATION && - renegotiation_info_seen == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "renegotiation_info extension missing (secure)" ) ); - handshake_failure = 1; - } - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "legacy renegotiation not allowed" ) ); - handshake_failure = 1; - } - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - renegotiation_info_seen == 1 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "renegotiation_info extension present (legacy)" ) ); - handshake_failure = 1; - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - if( handshake_failure == 1 ) - { - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse server hello" ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) -static int ssl_parse_server_dh_params( mbedtls_ssl_context *ssl, unsigned char **p, - unsigned char *end ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - - /* - * Ephemeral DH parameters: - * - * struct { - * opaque dh_p<1..2^16-1>; - * opaque dh_g<1..2^16-1>; - * opaque dh_Ys<1..2^16-1>; - * } ServerDHParams; - */ - if( ( ret = mbedtls_dhm_read_params( &ssl->handshake->dhm_ctx, p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 2, ( "mbedtls_dhm_read_params" ), ret ); - return( ret ); - } - - if( ssl->handshake->dhm_ctx.len * 8 < ssl->conf->dhm_min_bitlen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "DHM prime too short: %d < %d", - ssl->handshake->dhm_ctx.len * 8, - ssl->conf->dhm_min_bitlen ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: P ", &ssl->handshake->dhm_ctx.P ); - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: G ", &ssl->handshake->dhm_ctx.G ); - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GY", &ssl->handshake->dhm_ctx.GY ); - - return( ret ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) -static int ssl_check_server_ecdh_params( const mbedtls_ssl_context *ssl ) -{ - const mbedtls_ecp_curve_info *curve_info; - - curve_info = mbedtls_ecp_curve_info_from_grp_id( ssl->handshake->ecdh_ctx.grp.id ); - if( curve_info == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDH curve: %s", curve_info->name ) ); - -#if defined(MBEDTLS_ECP_C) - if( mbedtls_ssl_check_curve( ssl, ssl->handshake->ecdh_ctx.grp.id ) != 0 ) -#else - if( ssl->handshake->ecdh_ctx.grp.nbits < 163 || - ssl->handshake->ecdh_ctx.grp.nbits > 521 ) -#endif - return( -1 ); - - MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp", &ssl->handshake->ecdh_ctx.Qp ); - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) -static int ssl_parse_server_ecdh_params( mbedtls_ssl_context *ssl, - unsigned char **p, - unsigned char *end ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - - /* - * Ephemeral ECDH parameters: - * - * struct { - * ECParameters curve_params; - * ECPoint public; - * } ServerECDHParams; - */ - if( ( ret = mbedtls_ecdh_read_params( &ssl->handshake->ecdh_ctx, - (const unsigned char **) p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ecdh_read_params" ), ret ); - return( ret ); - } - - if( ssl_check_server_ecdh_params( ssl ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message (ECDHE curve)" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - return( ret ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -static int ssl_parse_server_psk_hint( mbedtls_ssl_context *ssl, - unsigned char **p, - unsigned char *end ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - size_t len; - ((void) ssl); - - /* - * PSK parameters: - * - * opaque psk_identity_hint<0..2^16-1>; - */ - len = (*p)[0] << 8 | (*p)[1]; - *p += 2; - - if( (*p) + len > end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message (psk_identity_hint length)" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - // TODO: Retrieve PSK identity hint and callback to app - // - *p += len; - ret = 0; - - return( ret ); -} -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) -/* - * Generate a pre-master secret and encrypt it with the server's RSA key - */ -static int ssl_write_encrypted_pms( mbedtls_ssl_context *ssl, - size_t offset, size_t *olen, - size_t pms_offset ) -{ - int ret; - size_t len_bytes = ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ? 0 : 2; - unsigned char *p = ssl->handshake->premaster + pms_offset; - - if( offset + len_bytes > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small for encrypted pms" ) ); - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - } - - /* - * Generate (part of) the pre-master as - * struct { - * ProtocolVersion client_version; - * opaque random[46]; - * } PreMasterSecret; - */ - mbedtls_ssl_write_version( ssl->conf->max_major_ver, ssl->conf->max_minor_ver, - ssl->conf->transport, p ); - - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p + 2, 46 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "f_rng", ret ); - return( ret ); - } - - ssl->handshake->pmslen = 48; - - if( ssl->session_negotiate->peer_cert == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "certificate required" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - /* - * Now write it out, encrypted - */ - if( ! mbedtls_pk_can_do( &ssl->session_negotiate->peer_cert->pk, - MBEDTLS_PK_RSA ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "certificate key type mismatch" ) ); - return( MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH ); - } - - if( ( ret = mbedtls_pk_encrypt( &ssl->session_negotiate->peer_cert->pk, - p, ssl->handshake->pmslen, - ssl->out_msg + offset + len_bytes, olen, - MBEDTLS_SSL_MAX_CONTENT_LEN - offset - len_bytes, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_rsa_pkcs1_encrypt", ret ); - return( ret ); - } - -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( len_bytes == 2 ) - { - ssl->out_msg[offset+0] = (unsigned char)( *olen >> 8 ); - ssl->out_msg[offset+1] = (unsigned char)( *olen ); - *olen += 2; - } -#endif - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) -static int ssl_parse_signature_algorithm( mbedtls_ssl_context *ssl, - unsigned char **p, - unsigned char *end, - mbedtls_md_type_t *md_alg, - mbedtls_pk_type_t *pk_alg ) -{ - ((void) ssl); - *md_alg = MBEDTLS_MD_NONE; - *pk_alg = MBEDTLS_PK_NONE; - - /* Only in TLS 1.2 */ - if( ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_3 ) - { - return( 0 ); - } - - if( (*p) + 2 > end ) - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - - /* - * Get hash algorithm - */ - if( ( *md_alg = mbedtls_ssl_md_alg_from_hash( (*p)[0] ) ) == MBEDTLS_MD_NONE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "Server used unsupported " - "HashAlgorithm %d", *(p)[0] ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - /* - * Get signature algorithm - */ - if( ( *pk_alg = mbedtls_ssl_pk_alg_from_sig( (*p)[1] ) ) == MBEDTLS_PK_NONE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server used unsupported " - "SignatureAlgorithm %d", (*p)[1] ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - /* - * Check if the hash is acceptable - */ - if( mbedtls_ssl_check_sig_hash( ssl, *md_alg ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server used HashAlgorithm " - "that was not offered" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "Server used SignatureAlgorithm %d", (*p)[1] ) ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "Server used HashAlgorithm %d", (*p)[0] ) ); - *p += 2; - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) -static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl ) -{ - int ret; - const mbedtls_ecp_keypair *peer_key; - - if( ssl->session_negotiate->peer_cert == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "certificate required" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - if( ! mbedtls_pk_can_do( &ssl->session_negotiate->peer_cert->pk, - MBEDTLS_PK_ECKEY ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server key not ECDH capable" ) ); - return( MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH ); - } - - peer_key = mbedtls_pk_ec( ssl->session_negotiate->peer_cert->pk ); - - if( ( ret = mbedtls_ecdh_get_params( &ssl->handshake->ecdh_ctx, peer_key, - MBEDTLS_ECDH_THEIRS ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ecdh_get_params" ), ret ); - return( ret ); - } - - if( ssl_check_server_ecdh_params( ssl ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server certificate (ECDH curve)" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - - return( ret ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ - -static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl ) -{ - int ret; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - unsigned char *p, *end; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server key exchange" ) ); - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse server key exchange" ) ); - ssl->state++; - return( 0 ); - } - ((void) p); - ((void) end); -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA ) - { - if( ( ret = ssl_get_ecdh_params_from_cert( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_get_ecdh_params_from_cert", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse server key exchange" ) ); - ssl->state++; - return( 0 ); - } - ((void) p); - ((void) end); -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - /* - * ServerKeyExchange may be skipped with PSK and RSA-PSK when the server - * doesn't use a psk_identity_hint - */ - if( ssl->in_msg[0] != MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE ) - { - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - { - ssl->record_read = 1; - goto exit; - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - p = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ); - end = ssl->in_msg + ssl->in_hslen; - MBEDTLS_SSL_DEBUG_BUF( 3, "server key exchange", p, end - p ); - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - if( ssl_parse_server_psk_hint( ssl, &p, end ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - } /* FALLTROUGH */ -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - ; /* nothing more to do */ - else -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED || - MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK ) - { - if( ssl_parse_server_dh_params( ssl, &p, end ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA ) - { - if( ssl_parse_server_ecdh_params( ssl, &p, end ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - ret = mbedtls_ecjpake_read_round_two( &ssl->handshake->ecjpake_ctx, - p, end - p ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_read_round_two", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA ) - { - size_t sig_len, hashlen; - unsigned char hash[64]; - mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE; - mbedtls_pk_type_t pk_alg = MBEDTLS_PK_NONE; - unsigned char *params = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ); - size_t params_len = p - params; - - /* - * Handle the digitally-signed structure - */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - if( ssl_parse_signature_algorithm( ssl, &p, end, - &md_alg, &pk_alg ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - if( pk_alg != mbedtls_ssl_get_ciphersuite_sig_pk_alg( ciphersuite_info ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( ssl->minor_ver < MBEDTLS_SSL_MINOR_VERSION_3 ) - { - pk_alg = mbedtls_ssl_get_ciphersuite_sig_pk_alg( ciphersuite_info ); - - /* Default hash for ECDSA is SHA-1 */ - if( pk_alg == MBEDTLS_PK_ECDSA && md_alg == MBEDTLS_MD_NONE ) - md_alg = MBEDTLS_MD_SHA1; - } - else -#endif - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - /* - * Read signature - */ - sig_len = ( p[0] << 8 ) | p[1]; - p += 2; - - if( end != p + sig_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "signature", p, sig_len ); - - /* - * Compute the hash that has been signed - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( md_alg == MBEDTLS_MD_NONE ) - { - mbedtls_md5_context mbedtls_md5; - mbedtls_sha1_context mbedtls_sha1; - - mbedtls_md5_init( &mbedtls_md5 ); - mbedtls_sha1_init( &mbedtls_sha1 ); - - hashlen = 36; - - /* - * digitally-signed struct { - * opaque md5_hash[16]; - * opaque sha_hash[20]; - * }; - * - * md5_hash - * MD5(ClientHello.random + ServerHello.random - * + ServerParams); - * sha_hash - * SHA(ClientHello.random + ServerHello.random - * + ServerParams); - */ - mbedtls_md5_starts( &mbedtls_md5 ); - mbedtls_md5_update( &mbedtls_md5, ssl->handshake->randbytes, 64 ); - mbedtls_md5_update( &mbedtls_md5, params, params_len ); - mbedtls_md5_finish( &mbedtls_md5, hash ); - - mbedtls_sha1_starts( &mbedtls_sha1 ); - mbedtls_sha1_update( &mbedtls_sha1, ssl->handshake->randbytes, 64 ); - mbedtls_sha1_update( &mbedtls_sha1, params, params_len ); - mbedtls_sha1_finish( &mbedtls_sha1, hash + 16 ); - - mbedtls_md5_free( &mbedtls_md5 ); - mbedtls_sha1_free( &mbedtls_sha1 ); - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 || MBEDTLS_SSL_PROTO_TLS1 || \ - MBEDTLS_SSL_PROTO_TLS1_1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( md_alg != MBEDTLS_MD_NONE ) - { - mbedtls_md_context_t ctx; - - mbedtls_md_init( &ctx ); - - /* Info from md_alg will be used instead */ - hashlen = 0; - - /* - * digitally-signed struct { - * opaque client_random[32]; - * opaque server_random[32]; - * ServerDHParams params; - * }; - */ - if( ( ret = mbedtls_md_setup( &ctx, - mbedtls_md_info_from_type( md_alg ), 0 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_md_setup", ret ); - return( ret ); - } - - mbedtls_md_starts( &ctx ); - mbedtls_md_update( &ctx, ssl->handshake->randbytes, 64 ); - mbedtls_md_update( &ctx, params, params_len ); - mbedtls_md_finish( &ctx, hash ); - mbedtls_md_free( &ctx ); - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \ - MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "parameters hash", hash, hashlen != 0 ? hashlen : - (unsigned int) ( mbedtls_md_get_size( mbedtls_md_info_from_type( md_alg ) ) ) ); - - if( ssl->session_negotiate->peer_cert == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "certificate required" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - /* - * Verify signature - */ - if( ! mbedtls_pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); - return( MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH ); - } - - if( ( ret = mbedtls_pk_verify( &ssl->session_negotiate->peer_cert->pk, - md_alg, hash, hashlen, p, sig_len ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_pk_verify", ret ); - return( ret ); - } - } -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ - -exit: - ssl->state++; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse server key exchange" ) ); - - return( 0 ); -} - -#if !defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) -static int ssl_parse_certificate_request( mbedtls_ssl_context *ssl ) -{ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate request" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate request" ) ); - ssl->state++; - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); -} -#else -static int ssl_parse_certificate_request( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *buf, *p; - size_t n = 0, m = 0; - size_t cert_type_len = 0, dn_len = 0; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate request" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate request" ) ); - ssl->state++; - return( 0 ); - } - - if( ssl->record_read == 0 ) - { - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate request message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - ssl->record_read = 1; - } - - ssl->client_auth = 0; - ssl->state++; - - if( ssl->in_msg[0] == MBEDTLS_SSL_HS_CERTIFICATE_REQUEST ) - ssl->client_auth++; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "got %s certificate request", - ssl->client_auth ? "a" : "no" ) ); - - if( ssl->client_auth == 0 ) - goto exit; - - ssl->record_read = 0; - - // TODO: handshake_failure alert for an anonymous server to request - // client authentication - - /* - * struct { - * ClientCertificateType certificate_types<1..2^8-1>; - * SignatureAndHashAlgorithm - * supported_signature_algorithms<2^16-1>; -- TLS 1.2 only - * DistinguishedName certificate_authorities<0..2^16-1>; - * } CertificateRequest; - */ - buf = ssl->in_msg; - - // Retrieve cert types - // - cert_type_len = buf[mbedtls_ssl_hs_hdr_len( ssl )]; - n = cert_type_len; - - if( ssl->in_hslen < mbedtls_ssl_hs_hdr_len( ssl ) + 2 + n ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate request message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST ); - } - - p = buf + mbedtls_ssl_hs_hdr_len( ssl ) + 1; - while( cert_type_len > 0 ) - { -#if defined(MBEDTLS_RSA_C) - if( *p == MBEDTLS_SSL_CERT_TYPE_RSA_SIGN && - mbedtls_pk_can_do( mbedtls_ssl_own_key( ssl ), MBEDTLS_PK_RSA ) ) - { - ssl->handshake->cert_type = MBEDTLS_SSL_CERT_TYPE_RSA_SIGN; - break; - } - else -#endif -#if defined(MBEDTLS_ECDSA_C) - if( *p == MBEDTLS_SSL_CERT_TYPE_ECDSA_SIGN && - mbedtls_pk_can_do( mbedtls_ssl_own_key( ssl ), MBEDTLS_PK_ECDSA ) ) - { - ssl->handshake->cert_type = MBEDTLS_SSL_CERT_TYPE_ECDSA_SIGN; - break; - } - else -#endif - { - ; /* Unsupported cert type, ignore */ - } - - cert_type_len--; - p++; - } - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - /* Ignored, see comments about hash in write_certificate_verify */ - // TODO: should check the signature part against our pk_key though - size_t sig_alg_len = ( ( buf[mbedtls_ssl_hs_hdr_len( ssl ) + 1 + n] << 8 ) - | ( buf[mbedtls_ssl_hs_hdr_len( ssl ) + 2 + n] ) ); - - m += 2; - n += sig_alg_len; - - if( ssl->in_hslen < mbedtls_ssl_hs_hdr_len( ssl ) + 2 + n ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate request message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST ); - } - } -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - - /* Ignore certificate_authorities, we only have one cert anyway */ - // TODO: should not send cert if no CA matches - dn_len = ( ( buf[mbedtls_ssl_hs_hdr_len( ssl ) + 1 + m + n] << 8 ) - | ( buf[mbedtls_ssl_hs_hdr_len( ssl ) + 2 + m + n] ) ); - - n += dn_len; - if( ssl->in_hslen != mbedtls_ssl_hs_hdr_len( ssl ) + 3 + m + n ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate request message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST ); - } - -exit: - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse certificate request" ) ); - - return( 0 ); -} -#endif /* !MBEDTLS_KEY_EXCHANGE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ - -static int ssl_parse_server_hello_done( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server hello done" ) ); - - if( ssl->record_read == 0 ) - { - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello done message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - } - ssl->record_read = 0; - - if( ssl->in_hslen != mbedtls_ssl_hs_hdr_len( ssl ) || - ssl->in_msg[0] != MBEDTLS_SSL_HS_SERVER_HELLO_DONE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello done message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO_DONE ); - } - - ssl->state++; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - mbedtls_ssl_recv_flight_completed( ssl ); -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse server hello done" ) ); - - return( 0 ); -} - -static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl ) -{ - int ret; - size_t i, n; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write client key exchange" ) ); - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_RSA ) - { - /* - * DHM key exchange -- send G^X mod P - */ - n = ssl->handshake->dhm_ctx.len; - - ssl->out_msg[4] = (unsigned char)( n >> 8 ); - ssl->out_msg[5] = (unsigned char)( n ); - i = 6; - - ret = mbedtls_dhm_make_public( &ssl->handshake->dhm_ctx, - (int) mbedtls_mpi_size( &ssl->handshake->dhm_ctx.P ), - &ssl->out_msg[i], n, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_make_public", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: X ", &ssl->handshake->dhm_ctx.X ); - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GX", &ssl->handshake->dhm_ctx.GX ); - - if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx, - ssl->handshake->premaster, - MBEDTLS_PREMASTER_SIZE, - &ssl->handshake->pmslen, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_calc_secret", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: K ", &ssl->handshake->dhm_ctx.K ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA ) - { - /* - * ECDH key exchange -- send client public value - */ - i = 4; - - ret = mbedtls_ecdh_make_public( &ssl->handshake->ecdh_ctx, - &n, - &ssl->out_msg[i], 1000, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_make_public", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Q", &ssl->handshake->ecdh_ctx.Q ); - - if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx, - &ssl->handshake->pmslen, - ssl->handshake->premaster, - MBEDTLS_MPI_MAX_SIZE, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_calc_secret", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MPI( 3, "ECDH: z", &ssl->handshake->ecdh_ctx.z ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - /* - * opaque psk_identity<0..2^16-1>; - */ - if( ssl->conf->psk == NULL || ssl->conf->psk_identity == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no private key for PSK" ) ); - return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); - } - - i = 4; - n = ssl->conf->psk_identity_len; - - if( i + 2 + n > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "psk identity too long or " - "SSL buffer too short" ) ); - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - } - - ssl->out_msg[i++] = (unsigned char)( n >> 8 ); - ssl->out_msg[i++] = (unsigned char)( n ); - - memcpy( ssl->out_msg + i, ssl->conf->psk_identity, ssl->conf->psk_identity_len ); - i += ssl->conf->psk_identity_len; - -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK ) - { - n = 0; - } - else -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - { - if( ( ret = ssl_write_encrypted_pms( ssl, i, &n, 2 ) ) != 0 ) - return( ret ); - } - else -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK ) - { - /* - * ClientDiffieHellmanPublic public (DHM send G^X mod P) - */ - n = ssl->handshake->dhm_ctx.len; - - if( i + 2 + n > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "psk identity or DHM size too long" - " or SSL buffer too short" ) ); - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - } - - ssl->out_msg[i++] = (unsigned char)( n >> 8 ); - ssl->out_msg[i++] = (unsigned char)( n ); - - ret = mbedtls_dhm_make_public( &ssl->handshake->dhm_ctx, - (int) mbedtls_mpi_size( &ssl->handshake->dhm_ctx.P ), - &ssl->out_msg[i], n, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_make_public", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - /* - * ClientECDiffieHellmanPublic public; - */ - ret = mbedtls_ecdh_make_public( &ssl->handshake->ecdh_ctx, &n, - &ssl->out_msg[i], MBEDTLS_SSL_MAX_CONTENT_LEN - i, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_make_public", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Q", &ssl->handshake->ecdh_ctx.Q ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - if( ( ret = mbedtls_ssl_psk_derive_premaster( ssl, - ciphersuite_info->key_exchange ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_psk_derive_premaster", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA ) - { - i = 4; - if( ( ret = ssl_write_encrypted_pms( ssl, i, &n, 0 ) ) != 0 ) - return( ret ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - i = 4; - - ret = mbedtls_ecjpake_write_round_two( &ssl->handshake->ecjpake_ctx, - ssl->out_msg + i, MBEDTLS_SSL_MAX_CONTENT_LEN - i, &n, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_write_round_two", ret ); - return( ret ); - } - - ret = mbedtls_ecjpake_derive_secret( &ssl->handshake->ecjpake_ctx, - ssl->handshake->premaster, 32, &ssl->handshake->pmslen, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_derive_secret", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ - { - ((void) ciphersuite_info); - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - ssl->out_msglen = i + n; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_CLIENT_KEY_EXCHANGE; - - ssl->state++; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write client key exchange" ) ); - - return( 0 ); -} - -#if !defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) -static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl ) -{ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate verify" ) ); - - if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret ); - return( ret ); - } - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate verify" ) ); - ssl->state++; - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); -} -#else -static int ssl_write_certificate_verify( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - size_t n = 0, offset = 0; - unsigned char hash[48]; - unsigned char *hash_start = hash; - mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE; - unsigned int hashlen; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate verify" ) ); - - if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret ); - return( ret ); - } - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate verify" ) ); - ssl->state++; - return( 0 ); - } - - if( ssl->client_auth == 0 || mbedtls_ssl_own_cert( ssl ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate verify" ) ); - ssl->state++; - return( 0 ); - } - - if( mbedtls_ssl_own_key( ssl ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no private key for certificate" ) ); - return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); - } - - /* - * Make an RSA signature of the handshake digests - */ - ssl->handshake->calc_verify( ssl, hash ); - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_3 ) - { - /* - * digitally-signed struct { - * opaque md5_hash[16]; - * opaque sha_hash[20]; - * }; - * - * md5_hash - * MD5(handshake_messages); - * - * sha_hash - * SHA(handshake_messages); - */ - hashlen = 36; - md_alg = MBEDTLS_MD_NONE; - - /* - * For ECDSA, default hash is SHA-1 only - */ - if( mbedtls_pk_can_do( mbedtls_ssl_own_key( ssl ), MBEDTLS_PK_ECDSA ) ) - { - hash_start += 16; - hashlen -= 16; - md_alg = MBEDTLS_MD_SHA1; - } - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 || MBEDTLS_SSL_PROTO_TLS1 || \ - MBEDTLS_SSL_PROTO_TLS1_1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - /* - * digitally-signed struct { - * opaque handshake_messages[handshake_messages_length]; - * }; - * - * Taking shortcut here. We assume that the server always allows the - * PRF Hash function and has sent it in the allowed signature - * algorithms list received in the Certificate Request message. - * - * Until we encounter a server that does not, we will take this - * shortcut. - * - * Reason: Otherwise we should have running hashes for SHA512 and SHA224 - * in order to satisfy 'weird' needs from the server side. - */ - if( ssl->transform_negotiate->ciphersuite_info->mac == - MBEDTLS_MD_SHA384 ) - { - md_alg = MBEDTLS_MD_SHA384; - ssl->out_msg[4] = MBEDTLS_SSL_HASH_SHA384; - } - else - { - md_alg = MBEDTLS_MD_SHA256; - ssl->out_msg[4] = MBEDTLS_SSL_HASH_SHA256; - } - ssl->out_msg[5] = mbedtls_ssl_sig_from_pk( mbedtls_ssl_own_key( ssl ) ); - - /* Info from md_alg will be used instead */ - hashlen = 0; - offset = 2; - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - if( ( ret = mbedtls_pk_sign( mbedtls_ssl_own_key( ssl ), md_alg, hash_start, hashlen, - ssl->out_msg + 6 + offset, &n, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_pk_sign", ret ); - return( ret ); - } - - ssl->out_msg[4 + offset] = (unsigned char)( n >> 8 ); - ssl->out_msg[5 + offset] = (unsigned char)( n ); - - ssl->out_msglen = 6 + n + offset; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_CERTIFICATE_VERIFY; - - ssl->state++; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write certificate verify" ) ); - - return( ret ); -} -#endif /* !MBEDTLS_KEY_EXCHANGE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -static int ssl_parse_new_session_ticket( mbedtls_ssl_context *ssl ) -{ - int ret; - uint32_t lifetime; - size_t ticket_len; - unsigned char *ticket; - const unsigned char *msg; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse new session ticket" ) ); - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad new session ticket message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - /* - * struct { - * uint32 ticket_lifetime_hint; - * opaque ticket<0..2^16-1>; - * } NewSessionTicket; - * - * 0 . 3 ticket_lifetime_hint - * 4 . 5 ticket_len (n) - * 6 . 5+n ticket content - */ - if( ssl->in_msg[0] != MBEDTLS_SSL_HS_NEW_SESSION_TICKET || - ssl->in_hslen < 6 + mbedtls_ssl_hs_hdr_len( ssl ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad new session ticket message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET ); - } - - msg = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ); - - lifetime = ( msg[0] << 24 ) | ( msg[1] << 16 ) | - ( msg[2] << 8 ) | ( msg[3] ); - - ticket_len = ( msg[4] << 8 ) | ( msg[5] ); - - if( ticket_len + 6 + mbedtls_ssl_hs_hdr_len( ssl ) != ssl->in_hslen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad new session ticket message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket length: %d", ticket_len ) ); - - /* We're not waiting for a NewSessionTicket message any more */ - ssl->handshake->new_session_ticket = 0; - ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC; - - /* - * Zero-length ticket means the server changed his mind and doesn't want - * to send a ticket after all, so just forget it - */ - if( ticket_len == 0 ) - return( 0 ); - - mbedtls_zeroize( ssl->session_negotiate->ticket, - ssl->session_negotiate->ticket_len ); - mbedtls_free( ssl->session_negotiate->ticket ); - ssl->session_negotiate->ticket = NULL; - ssl->session_negotiate->ticket_len = 0; - - if( ( ticket = mbedtls_calloc( 1, ticket_len ) ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "ticket alloc failed" ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - memcpy( ticket, msg + 6, ticket_len ); - - ssl->session_negotiate->ticket = ticket; - ssl->session_negotiate->ticket_len = ticket_len; - ssl->session_negotiate->ticket_lifetime = lifetime; - - /* - * RFC 5077 section 3.4: - * "If the client receives a session ticket from the server, then it - * discards any Session ID that was sent in the ServerHello." - */ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket in use, discarding session id" ) ); - ssl->session_negotiate->id_len = 0; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse new session ticket" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -/* - * SSL handshake -- client side -- single step - */ -int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ) -{ - int ret = 0; - - if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->handshake == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "client state: %d", ssl->state ) ); - - if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 ) - return( ret ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING ) - { - if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 ) - return( ret ); - } -#endif - - /* Change state now, so that it is right in mbedtls_ssl_read_record(), used - * by DTLS for dropping out-of-sequence ChangeCipherSpec records */ -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - if( ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC && - ssl->handshake->new_session_ticket != 0 ) - { - ssl->state = MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET; - } -#endif - - switch( ssl->state ) - { - case MBEDTLS_SSL_HELLO_REQUEST: - ssl->state = MBEDTLS_SSL_CLIENT_HELLO; - break; - - /* - * ==> ClientHello - */ - case MBEDTLS_SSL_CLIENT_HELLO: - ret = ssl_write_client_hello( ssl ); - break; - - /* - * <== ServerHello - * Certificate - * ( ServerKeyExchange ) - * ( CertificateRequest ) - * ServerHelloDone - */ - case MBEDTLS_SSL_SERVER_HELLO: - ret = ssl_parse_server_hello( ssl ); - break; - - case MBEDTLS_SSL_SERVER_CERTIFICATE: - ret = mbedtls_ssl_parse_certificate( ssl ); - break; - - case MBEDTLS_SSL_SERVER_KEY_EXCHANGE: - ret = ssl_parse_server_key_exchange( ssl ); - break; - - case MBEDTLS_SSL_CERTIFICATE_REQUEST: - ret = ssl_parse_certificate_request( ssl ); - break; - - case MBEDTLS_SSL_SERVER_HELLO_DONE: - ret = ssl_parse_server_hello_done( ssl ); - break; - - /* - * ==> ( Certificate/Alert ) - * ClientKeyExchange - * ( CertificateVerify ) - * ChangeCipherSpec - * Finished - */ - case MBEDTLS_SSL_CLIENT_CERTIFICATE: - ret = mbedtls_ssl_write_certificate( ssl ); - break; - - case MBEDTLS_SSL_CLIENT_KEY_EXCHANGE: - ret = ssl_write_client_key_exchange( ssl ); - break; - - case MBEDTLS_SSL_CERTIFICATE_VERIFY: - ret = ssl_write_certificate_verify( ssl ); - break; - - case MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC: - ret = mbedtls_ssl_write_change_cipher_spec( ssl ); - break; - - case MBEDTLS_SSL_CLIENT_FINISHED: - ret = mbedtls_ssl_write_finished( ssl ); - break; - - /* - * <== ( NewSessionTicket ) - * ChangeCipherSpec - * Finished - */ -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - case MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET: - ret = ssl_parse_new_session_ticket( ssl ); - break; -#endif - - case MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC: - ret = mbedtls_ssl_parse_change_cipher_spec( ssl ); - break; - - case MBEDTLS_SSL_SERVER_FINISHED: - ret = mbedtls_ssl_parse_finished( ssl ); - break; - - case MBEDTLS_SSL_FLUSH_BUFFERS: - MBEDTLS_SSL_DEBUG_MSG( 2, ( "handshake: done" ) ); - ssl->state = MBEDTLS_SSL_HANDSHAKE_WRAPUP; - break; - - case MBEDTLS_SSL_HANDSHAKE_WRAPUP: - mbedtls_ssl_handshake_wrapup( ssl ); - break; - - default: - MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid state %d", ssl->state ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - return( ret ); -} -#endif /* MBEDTLS_SSL_CLI_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_cookie.c b/build/premake/premake5/contrib/mbedtls/library/ssl_cookie.c deleted file mode 100644 index 7e0c573ad5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_cookie.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * DTLS cookie callbacks implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * These session callbacks use a simple chained list - * to store and retrieve the session information. - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_COOKIE_C) - -#include "mbedtls/ssl_cookie.h" -#include "mbedtls/ssl_internal.h" - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * If DTLS is in use, then at least one of SHA-1, SHA-256, SHA-512 is - * available. Try SHA-256 first, 512 wastes resources since we need to stay - * with max 32 bytes of cookie for DTLS 1.0 - */ -#if defined(MBEDTLS_SHA256_C) -#define COOKIE_MD MBEDTLS_MD_SHA224 -#define COOKIE_MD_OUTLEN 32 -#define COOKIE_HMAC_LEN 28 -#elif defined(MBEDTLS_SHA512_C) -#define COOKIE_MD MBEDTLS_MD_SHA384 -#define COOKIE_MD_OUTLEN 48 -#define COOKIE_HMAC_LEN 28 -#elif defined(MBEDTLS_SHA1_C) -#define COOKIE_MD MBEDTLS_MD_SHA1 -#define COOKIE_MD_OUTLEN 20 -#define COOKIE_HMAC_LEN 20 -#else -#error "DTLS hello verify needs SHA-1 or SHA-2" -#endif - -/* - * Cookies are formed of a 4-bytes timestamp (or serial number) and - * an HMAC of timestemp and client ID. - */ -#define COOKIE_LEN ( 4 + COOKIE_HMAC_LEN ) - -void mbedtls_ssl_cookie_init( mbedtls_ssl_cookie_ctx *ctx ) -{ - mbedtls_md_init( &ctx->hmac_ctx ); -#if !defined(MBEDTLS_HAVE_TIME) - ctx->serial = 0; -#endif - ctx->timeout = MBEDTLS_SSL_COOKIE_TIMEOUT; - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif -} - -void mbedtls_ssl_cookie_set_timeout( mbedtls_ssl_cookie_ctx *ctx, unsigned long delay ) -{ - ctx->timeout = delay; -} - -void mbedtls_ssl_cookie_free( mbedtls_ssl_cookie_ctx *ctx ) -{ - mbedtls_md_free( &ctx->hmac_ctx ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif - - mbedtls_zeroize( ctx, sizeof( mbedtls_ssl_cookie_ctx ) ); -} - -int mbedtls_ssl_cookie_setup( mbedtls_ssl_cookie_ctx *ctx, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char key[COOKIE_MD_OUTLEN]; - - if( ( ret = f_rng( p_rng, key, sizeof( key ) ) ) != 0 ) - return( ret ); - - ret = mbedtls_md_setup( &ctx->hmac_ctx, mbedtls_md_info_from_type( COOKIE_MD ), 1 ); - if( ret != 0 ) - return( ret ); - - ret = mbedtls_md_hmac_starts( &ctx->hmac_ctx, key, sizeof( key ) ); - if( ret != 0 ) - return( ret ); - - mbedtls_zeroize( key, sizeof( key ) ); - - return( 0 ); -} - -/* - * Generate the HMAC part of a cookie - */ -static int ssl_cookie_hmac( mbedtls_md_context_t *hmac_ctx, - const unsigned char time[4], - unsigned char **p, unsigned char *end, - const unsigned char *cli_id, size_t cli_id_len ) -{ - unsigned char hmac_out[COOKIE_MD_OUTLEN]; - - if( (size_t)( end - *p ) < COOKIE_HMAC_LEN ) - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - - if( mbedtls_md_hmac_reset( hmac_ctx ) != 0 || - mbedtls_md_hmac_update( hmac_ctx, time, 4 ) != 0 || - mbedtls_md_hmac_update( hmac_ctx, cli_id, cli_id_len ) != 0 || - mbedtls_md_hmac_finish( hmac_ctx, hmac_out ) != 0 ) - { - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - memcpy( *p, hmac_out, COOKIE_HMAC_LEN ); - *p += COOKIE_HMAC_LEN; - - return( 0 ); -} - -/* - * Generate cookie for DTLS ClientHello verification - */ -int mbedtls_ssl_cookie_write( void *p_ctx, - unsigned char **p, unsigned char *end, - const unsigned char *cli_id, size_t cli_id_len ) -{ - int ret; - mbedtls_ssl_cookie_ctx *ctx = (mbedtls_ssl_cookie_ctx *) p_ctx; - unsigned long t; - - if( ctx == NULL || cli_id == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( (size_t)( end - *p ) < COOKIE_LEN ) - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - -#if defined(MBEDTLS_HAVE_TIME) - t = (unsigned long) time( NULL ); -#else - t = ctx->serial++; -#endif - - (*p)[0] = (unsigned char)( t >> 24 ); - (*p)[1] = (unsigned char)( t >> 16 ); - (*p)[2] = (unsigned char)( t >> 8 ); - (*p)[3] = (unsigned char)( t ); - *p += 4; - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR + ret ); -#endif - - ret = ssl_cookie_hmac( &ctx->hmac_ctx, *p - 4, - p, end, cli_id, cli_id_len ); - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR + - MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -/* - * Check a cookie - */ -int mbedtls_ssl_cookie_check( void *p_ctx, - const unsigned char *cookie, size_t cookie_len, - const unsigned char *cli_id, size_t cli_id_len ) -{ - unsigned char ref_hmac[COOKIE_HMAC_LEN]; - int ret = 0; - unsigned char *p = ref_hmac; - mbedtls_ssl_cookie_ctx *ctx = (mbedtls_ssl_cookie_ctx *) p_ctx; - unsigned long cur_time, cookie_time; - - if( ctx == NULL || cli_id == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( cookie_len != COOKIE_LEN ) - return( -1 ); - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR + ret ); -#endif - - if( ssl_cookie_hmac( &ctx->hmac_ctx, cookie, - &p, p + sizeof( ref_hmac ), - cli_id, cli_id_len ) != 0 ) - ret = -1; - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR + - MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - if( ret != 0 ) - return( ret ); - - if( mbedtls_ssl_safer_memcmp( cookie + 4, ref_hmac, sizeof( ref_hmac ) ) != 0 ) - return( -1 ); - -#if defined(MBEDTLS_HAVE_TIME) - cur_time = (unsigned long) time( NULL ); -#else - cur_time = ctx->serial; -#endif - - cookie_time = ( (unsigned long) cookie[0] << 24 ) | - ( (unsigned long) cookie[1] << 16 ) | - ( (unsigned long) cookie[2] << 8 ) | - ( (unsigned long) cookie[3] ); - - if( ctx->timeout != 0 && cur_time - cookie_time > ctx->timeout ) - return( -1 ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_COOKIE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_srv.c b/build/premake/premake5/contrib/mbedtls/library/ssl_srv.c deleted file mode 100644 index 6b5b461e17..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_srv.c +++ /dev/null @@ -1,3881 +0,0 @@ -/* - * SSLv3/TLSv1 server-side functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_SRV_C) - -#include "mbedtls/debug.h" -#include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" - -#include - -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_HAVE_TIME) -#include -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} -#endif - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) -int mbedtls_ssl_set_client_transport_id( mbedtls_ssl_context *ssl, - const unsigned char *info, - size_t ilen ) -{ - if( ssl->conf->endpoint != MBEDTLS_SSL_IS_SERVER ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - mbedtls_free( ssl->cli_id ); - - if( ( ssl->cli_id = mbedtls_calloc( 1, ilen ) ) == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - memcpy( ssl->cli_id, info, ilen ); - ssl->cli_id_len = ilen; - - return( 0 ); -} - -void mbedtls_ssl_conf_dtls_cookies( mbedtls_ssl_config *conf, - mbedtls_ssl_cookie_write_t *f_cookie_write, - mbedtls_ssl_cookie_check_t *f_cookie_check, - void *p_cookie ) -{ - conf->f_cookie_write = f_cookie_write; - conf->f_cookie_check = f_cookie_check; - conf->p_cookie = p_cookie; -} -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) -static int ssl_parse_servername_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - int ret; - size_t servername_list_size, hostname_len; - const unsigned char *p; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "parse ServerName extension" ) ); - - servername_list_size = ( ( buf[0] << 8 ) | ( buf[1] ) ); - if( servername_list_size + 2 != len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - p = buf + 2; - while( servername_list_size > 0 ) - { - hostname_len = ( ( p[1] << 8 ) | p[2] ); - if( hostname_len + 3 > servername_list_size ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - if( p[0] == MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME ) - { - ret = ssl->conf->f_sni( ssl->conf->p_sni, - ssl, p + 3, hostname_len ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_sni_wrapper", ret ); - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - return( 0 ); - } - - servername_list_size -= hostname_len + 3; - p += hostname_len + 3; - } - - if( servername_list_size != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ - -static int ssl_parse_renegotiation_info( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - int ret; - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) - { - /* Check verify-data in constant-time. The length OTOH is no secret */ - if( len != 1 + ssl->verify_data_len || - buf[0] != ssl->verify_data_len || - mbedtls_ssl_safer_memcmp( buf + 1, ssl->peer_verify_data, - ssl->verify_data_len ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "non-matching renegotiation info" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - } - else -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - { - if( len != 1 || buf[0] != 0x0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "non-zero length renegotiation info" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ssl->secure_renegotiation = MBEDTLS_SSL_SECURE_RENEGOTIATION; - } - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ - defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -static int ssl_parse_signature_algorithms_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - size_t sig_alg_list_size; - const unsigned char *p; - const unsigned char *end = buf + len; - const int *md_cur; - - - sig_alg_list_size = ( ( buf[0] << 8 ) | ( buf[1] ) ); - if( sig_alg_list_size + 2 != len || - sig_alg_list_size % 2 != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - /* - * For now, ignore the SignatureAlgorithm part and rely on offered - * ciphersuites only for that part. To be fixed later. - * - * So, just look at the HashAlgorithm part. - */ - for( md_cur = ssl->conf->sig_hashes; *md_cur != MBEDTLS_MD_NONE; md_cur++ ) { - for( p = buf + 2; p < end; p += 2 ) { - if( *md_cur == (int) mbedtls_ssl_md_alg_from_hash( p[0] ) ) { - ssl->handshake->sig_alg = p[0]; - goto have_sig_alg; - } - } - } - - /* Some key echanges do not need signatures at all */ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "no signature_algorithm in common" ) ); - return( 0 ); - -have_sig_alg: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, signature_algorithm ext: %d", - ssl->handshake->sig_alg ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 && - MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static int ssl_parse_supported_elliptic_curves( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - size_t list_size, our_size; - const unsigned char *p; - const mbedtls_ecp_curve_info *curve_info, **curves; - - list_size = ( ( buf[0] << 8 ) | ( buf[1] ) ); - if( list_size + 2 != len || - list_size % 2 != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - /* Should never happen unless client duplicates the extension */ - if( ssl->handshake->curves != NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - /* Don't allow our peer to make us allocate too much memory, - * and leave room for a final 0 */ - our_size = list_size / 2 + 1; - if( our_size > MBEDTLS_ECP_DP_MAX ) - our_size = MBEDTLS_ECP_DP_MAX; - - if( ( curves = mbedtls_calloc( our_size, sizeof( *curves ) ) ) == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - ssl->handshake->curves = curves; - - p = buf + 2; - while( list_size > 0 && our_size > 1 ) - { - curve_info = mbedtls_ecp_curve_info_from_tls_id( ( p[0] << 8 ) | p[1] ); - - if( curve_info != NULL ) - { - *curves++ = curve_info; - our_size--; - } - - list_size -= 2; - p += 2; - } - - return( 0 ); -} - -static int ssl_parse_supported_point_formats( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - size_t list_size; - const unsigned char *p; - - list_size = buf[0]; - if( list_size + 1 != len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - p = buf + 1; - while( list_size > 0 ) - { - if( p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED || - p[0] == MBEDTLS_ECP_PF_COMPRESSED ) - { -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) - ssl->handshake->ecdh_ctx.point_format = p[0]; -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - ssl->handshake->ecjpake_ctx.point_format = p[0]; -#endif - MBEDTLS_SSL_DEBUG_MSG( 4, ( "point format selected: %d", p[0] ) ); - return( 0 ); - } - - list_size--; - p++; - } - - return( 0 ); -} -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || - MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static int ssl_parse_ecjpake_kkpp( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - int ret; - - if( mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "skip ecjpake kkpp extension" ) ); - return( 0 ); - } - - if( ( ret = mbedtls_ecjpake_read_round_one( &ssl->handshake->ecjpake_ctx, - buf, len ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_read_round_one", ret ); - return( ret ); - } - - /* Only mark the extension as OK when we're sure it is */ - ssl->handshake->cli_exts |= MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK; - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -static int ssl_parse_max_fragment_length_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( len != 1 || buf[0] >= MBEDTLS_SSL_MAX_FRAG_LEN_INVALID ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ssl->session_negotiate->mfl_code = buf[0]; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -static int ssl_parse_truncated_hmac_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( len != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ((void) buf); - - if( ssl->conf->trunc_hmac == MBEDTLS_SSL_TRUNC_HMAC_ENABLED ) - ssl->session_negotiate->trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_ENABLED; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -static int ssl_parse_encrypt_then_mac_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( len != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ((void) buf); - - if( ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_ENABLED && - ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_0 ) - { - ssl->session_negotiate->encrypt_then_mac = MBEDTLS_SSL_ETM_ENABLED; - } - - return( 0 ); -} -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -static int ssl_parse_extended_ms_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, - size_t len ) -{ - if( len != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ((void) buf); - - if( ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_ENABLED && - ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_0 ) - { - ssl->handshake->extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; - } - - return( 0 ); -} -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -static int ssl_parse_session_ticket_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t len ) -{ - int ret; - mbedtls_ssl_session session; - - mbedtls_ssl_session_init( &session ); - - if( ssl->conf->f_ticket_parse == NULL || - ssl->conf->f_ticket_write == NULL ) - { - return( 0 ); - } - - /* Remember the client asked us to send a new ticket */ - ssl->handshake->new_session_ticket = 1; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket length: %d", len ) ); - - if( len == 0 ) - return( 0 ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket rejected: renegotiating" ) ); - return( 0 ); - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - /* - * Failures are ok: just ignore the ticket and proceed. - */ - if( ( ret = ssl->conf->f_ticket_parse( ssl->conf->p_ticket, &session, - buf, len ) ) != 0 ) - { - mbedtls_ssl_session_free( &session ); - - if( ret == MBEDTLS_ERR_SSL_INVALID_MAC ) - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket is not authentic" ) ); - else if( ret == MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED ) - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket is expired" ) ); - else - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_ticket_parse", ret ); - - return( 0 ); - } - - /* - * Keep the session ID sent by the client, since we MUST send it back to - * inform them we're accepting the ticket (RFC 5077 section 3.4) - */ - session.id_len = ssl->session_negotiate->id_len; - memcpy( &session.id, ssl->session_negotiate->id, session.id_len ); - - mbedtls_ssl_session_free( ssl->session_negotiate ); - memcpy( ssl->session_negotiate, &session, sizeof( mbedtls_ssl_session ) ); - - /* Zeroize instead of free as we copied the content */ - mbedtls_zeroize( &session, sizeof( mbedtls_ssl_session ) ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "session successfully restored from ticket" ) ); - - ssl->handshake->resume = 1; - - /* Don't send a new ticket after all, this one is OK */ - ssl->handshake->new_session_ticket = 0; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_SSL_ALPN) -static int ssl_parse_alpn_ext( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - size_t list_len, cur_len, ours_len; - const unsigned char *theirs, *start, *end; - const char **ours; - - /* If ALPN not configured, just ignore the extension */ - if( ssl->conf->alpn_list == NULL ) - return( 0 ); - - /* - * opaque ProtocolName<1..2^8-1>; - * - * struct { - * ProtocolName protocol_name_list<2..2^16-1> - * } ProtocolNameList; - */ - - /* Min length is 2 (list_len) + 1 (name_len) + 1 (name) */ - if( len < 4 ) - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - - list_len = ( buf[0] << 8 ) | buf[1]; - if( list_len != len - 2 ) - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - - /* - * Use our order of preference - */ - start = buf + 2; - end = buf + len; - for( ours = ssl->conf->alpn_list; *ours != NULL; ours++ ) - { - ours_len = strlen( *ours ); - for( theirs = start; theirs != end; theirs += cur_len ) - { - /* If the list is well formed, we should get equality first */ - if( theirs > end ) - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - - cur_len = *theirs++; - - /* Empty strings MUST NOT be included */ - if( cur_len == 0 ) - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - - if( cur_len == ours_len && - memcmp( theirs, *ours, cur_len ) == 0 ) - { - ssl->alpn_chosen = *ours; - return( 0 ); - } - } - } - - /* If we get there, no match was found */ - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_NO_APPLICATION_PROTOCOL ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); -} -#endif /* MBEDTLS_SSL_ALPN */ - -/* - * Auxiliary functions for ServerHello parsing and related actions - */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/* - * Return 0 if the given key uses one of the acceptable curves, -1 otherwise - */ -#if defined(MBEDTLS_ECDSA_C) -static int ssl_check_key_curve( mbedtls_pk_context *pk, - const mbedtls_ecp_curve_info **curves ) -{ - const mbedtls_ecp_curve_info **crv = curves; - mbedtls_ecp_group_id grp_id = mbedtls_pk_ec( *pk )->grp.id; - - while( *crv != NULL ) - { - if( (*crv)->grp_id == grp_id ) - return( 0 ); - crv++; - } - - return( -1 ); -} -#endif /* MBEDTLS_ECDSA_C */ - -/* - * Try picking a certificate for this ciphersuite, - * return 0 on success and -1 on failure. - */ -static int ssl_pick_cert( mbedtls_ssl_context *ssl, - const mbedtls_ssl_ciphersuite_t * ciphersuite_info ) -{ - mbedtls_ssl_key_cert *cur, *list, *fallback = NULL; - mbedtls_pk_type_t pk_alg = mbedtls_ssl_get_ciphersuite_sig_pk_alg( ciphersuite_info ); - uint32_t flags; - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - if( ssl->handshake->sni_key_cert != NULL ) - list = ssl->handshake->sni_key_cert; - else -#endif - list = ssl->conf->key_cert; - - if( pk_alg == MBEDTLS_PK_NONE ) - return( 0 ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite requires certificate" ) ); - - if( list == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server has no certificate" ) ); - return( -1 ); - } - - for( cur = list; cur != NULL; cur = cur->next ) - { - MBEDTLS_SSL_DEBUG_CRT( 3, "candidate certificate chain, certificate", - cur->cert ); - - if( ! mbedtls_pk_can_do( cur->key, pk_alg ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "certificate mismatch: key type" ) ); - continue; - } - - /* - * This avoids sending the client a cert it'll reject based on - * keyUsage or other extensions. - * - * It also allows the user to provision different certificates for - * different uses based on keyUsage, eg if they want to avoid signing - * and decrypting with the same RSA key. - */ - if( mbedtls_ssl_check_cert_usage( cur->cert, ciphersuite_info, - MBEDTLS_SSL_IS_SERVER, &flags ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "certificate mismatch: " - "(extended) key usage extension" ) ); - continue; - } - -#if defined(MBEDTLS_ECDSA_C) - if( pk_alg == MBEDTLS_PK_ECDSA && - ssl_check_key_curve( cur->key, ssl->handshake->curves ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "certificate mismatch: elliptic curve" ) ); - continue; - } -#endif - - /* - * Try to select a SHA-1 certificate for pre-1.2 clients, but still - * present them a SHA-higher cert rather than failing if it's the only - * one we got that satisfies the other conditions. - */ - if( ssl->minor_ver < MBEDTLS_SSL_MINOR_VERSION_3 && - cur->cert->sig_md != MBEDTLS_MD_SHA1 ) - { - if( fallback == NULL ) - fallback = cur; - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "certificate not preferred: " - "sha-2 with pre-TLS 1.2 client" ) ); - continue; - } - } - - /* If we get there, we got a winner */ - break; - } - - if( cur == NULL ) - cur = fallback; - - /* Do not update ssl->handshake->key_cert unless there is a match */ - if( cur != NULL ) - { - ssl->handshake->key_cert = cur; - MBEDTLS_SSL_DEBUG_CRT( 3, "selected certificate chain, certificate", - ssl->handshake->key_cert->cert ); - return( 0 ); - } - - return( -1 ); -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -/* - * Check if a given ciphersuite is suitable for use with our config/keys/etc - * Sets ciphersuite_info only if the suite matches. - */ -static int ssl_ciphersuite_match( mbedtls_ssl_context *ssl, int suite_id, - const mbedtls_ssl_ciphersuite_t **ciphersuite_info ) -{ - const mbedtls_ssl_ciphersuite_t *suite_info; - - suite_info = mbedtls_ssl_ciphersuite_from_id( suite_id ); - if( suite_info == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "trying ciphersuite: %s", suite_info->name ) ); - - if( suite_info->min_minor_ver > ssl->minor_ver || - suite_info->max_minor_ver < ssl->minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: version" ) ); - return( 0 ); - } - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ( suite_info->flags & MBEDTLS_CIPHERSUITE_NODTLS ) ) - return( 0 ); -#endif - -#if defined(MBEDTLS_ARC4_C) - if( ssl->conf->arc4_disabled == MBEDTLS_SSL_ARC4_DISABLED && - suite_info->cipher == MBEDTLS_CIPHER_ARC4_128 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: rc4" ) ); - return( 0 ); - } -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( suite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE && - ( ssl->handshake->cli_exts & MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK ) == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: ecjpake " - "not configured or ext missing" ) ); - return( 0 ); - } -#endif - - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) - if( mbedtls_ssl_ciphersuite_uses_ec( suite_info ) && - ( ssl->handshake->curves == NULL || - ssl->handshake->curves[0] == NULL ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: " - "no common elliptic curve" ) ); - return( 0 ); - } -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - /* If the ciphersuite requires a pre-shared key and we don't - * have one, skip it now rather than failing later */ - if( mbedtls_ssl_ciphersuite_uses_psk( suite_info ) && - ssl->conf->f_psk == NULL && - ( ssl->conf->psk == NULL || ssl->conf->psk_identity == NULL || - ssl->conf->psk_identity_len == 0 || ssl->conf->psk_len == 0 ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: no pre-shared key" ) ); - return( 0 ); - } -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * Final check: if ciphersuite requires us to have a - * certificate/key of a particular type: - * - select the appropriate certificate if we have one, or - * - try the next ciphersuite if we don't - * This must be done last since we modify the key_cert list. - */ - if( ssl_pick_cert( ssl, suite_info ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: " - "no suitable certificate" ) ); - return( 0 ); - } -#endif - - *ciphersuite_info = suite_info; - return( 0 ); -} - -#if defined(MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO) -static int ssl_parse_client_hello_v2( mbedtls_ssl_context *ssl ) -{ - int ret, got_common_suite; - unsigned int i, j; - size_t n; - unsigned int ciph_len, sess_len, chal_len; - unsigned char *buf, *p; - const int *ciphersuites; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse client hello v2" ) ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "client hello v2 illegal for renegotiation" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - buf = ssl->in_hdr; - - MBEDTLS_SSL_DEBUG_BUF( 4, "record header", buf, 5 ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v2, message type: %d", - buf[2] ) ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v2, message len.: %d", - ( ( buf[0] & 0x7F ) << 8 ) | buf[1] ) ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v2, max. version: [%d:%d]", - buf[3], buf[4] ) ); - - /* - * SSLv2 Client Hello - * - * Record layer: - * 0 . 1 message length - * - * SSL layer: - * 2 . 2 message type - * 3 . 4 protocol version - */ - if( buf[2] != MBEDTLS_SSL_HS_CLIENT_HELLO || - buf[3] != MBEDTLS_SSL_MAJOR_VERSION_3 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - n = ( ( buf[0] << 8 ) | buf[1] ) & 0x7FFF; - - if( n < 17 || n > 512 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ssl->major_ver = MBEDTLS_SSL_MAJOR_VERSION_3; - ssl->minor_ver = ( buf[4] <= ssl->conf->max_minor_ver ) - ? buf[4] : ssl->conf->max_minor_ver; - - if( ssl->minor_ver < ssl->conf->min_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "client only supports ssl smaller than minimum" - " [%d:%d] < [%d:%d]", - ssl->major_ver, ssl->minor_ver, - ssl->conf->min_major_ver, ssl->conf->min_minor_ver ) ); - - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION ); - return( MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION ); - } - - ssl->handshake->max_major_ver = buf[3]; - ssl->handshake->max_minor_ver = buf[4]; - - if( ( ret = mbedtls_ssl_fetch_input( ssl, 2 + n ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret ); - return( ret ); - } - - ssl->handshake->update_checksum( ssl, buf + 2, n ); - - buf = ssl->in_msg; - n = ssl->in_left - 5; - - /* - * 0 . 1 ciphersuitelist length - * 2 . 3 session id length - * 4 . 5 challenge length - * 6 . .. ciphersuitelist - * .. . .. session id - * .. . .. challenge - */ - MBEDTLS_SSL_DEBUG_BUF( 4, "record contents", buf, n ); - - ciph_len = ( buf[0] << 8 ) | buf[1]; - sess_len = ( buf[2] << 8 ) | buf[3]; - chal_len = ( buf[4] << 8 ) | buf[5]; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciph_len: %d, sess_len: %d, chal_len: %d", - ciph_len, sess_len, chal_len ) ); - - /* - * Make sure each parameter length is valid - */ - if( ciph_len < 3 || ( ciph_len % 3 ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - if( sess_len > 32 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - if( chal_len < 8 || chal_len > 32 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - if( n != 6 + ciph_len + sess_len + chal_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, ciphersuitelist", - buf + 6, ciph_len ); - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, session id", - buf + 6 + ciph_len, sess_len ); - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, challenge", - buf + 6 + ciph_len + sess_len, chal_len ); - - p = buf + 6 + ciph_len; - ssl->session_negotiate->id_len = sess_len; - memset( ssl->session_negotiate->id, 0, - sizeof( ssl->session_negotiate->id ) ); - memcpy( ssl->session_negotiate->id, p, ssl->session_negotiate->id_len ); - - p += sess_len; - memset( ssl->handshake->randbytes, 0, 64 ); - memcpy( ssl->handshake->randbytes + 32 - chal_len, p, chal_len ); - - /* - * Check for TLS_EMPTY_RENEGOTIATION_INFO_SCSV - */ - for( i = 0, p = buf + 6; i < ciph_len; i += 3, p += 3 ) - { - if( p[0] == 0 && p[1] == 0 && p[2] == MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "received TLS_EMPTY_RENEGOTIATION_INFO " ) ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "received RENEGOTIATION SCSV " - "during renegotiation" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - ssl->secure_renegotiation = MBEDTLS_SSL_SECURE_RENEGOTIATION; - break; - } - } - -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) - for( i = 0, p = buf + 6; i < ciph_len; i += 3, p += 3 ) - { - if( p[0] == 0 && - p[1] == (unsigned char)( ( MBEDTLS_SSL_FALLBACK_SCSV_VALUE >> 8 ) & 0xff ) && - p[2] == (unsigned char)( ( MBEDTLS_SSL_FALLBACK_SCSV_VALUE ) & 0xff ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "received FALLBACK_SCSV" ) ); - - if( ssl->minor_ver < ssl->conf->max_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "inapropriate fallback" ) ); - - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_INAPROPRIATE_FALLBACK ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - break; - } - } -#endif /* MBEDTLS_SSL_FALLBACK_SCSV */ - - got_common_suite = 0; - ciphersuites = ssl->conf->ciphersuite_list[ssl->minor_ver]; - ciphersuite_info = NULL; -#if defined(MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE) - for( j = 0, p = buf + 6; j < ciph_len; j += 3, p += 3 ) - { - for( i = 0; ciphersuites[i] != 0; i++ ) -#else - for( i = 0; ciphersuites[i] != 0; i++ ) - { - for( j = 0, p = buf + 6; j < ciph_len; j += 3, p += 3 ) -#endif - { - if( p[0] != 0 || - p[1] != ( ( ciphersuites[i] >> 8 ) & 0xFF ) || - p[2] != ( ( ciphersuites[i] ) & 0xFF ) ) - continue; - - got_common_suite = 1; - - if( ( ret = ssl_ciphersuite_match( ssl, ciphersuites[i], - &ciphersuite_info ) ) != 0 ) - return( ret ); - - if( ciphersuite_info != NULL ) - goto have_ciphersuite_v2; - } - } - - if( got_common_suite ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got ciphersuites in common, " - "but none of them usable" ) ); - return( MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE ); - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no ciphersuites in common" ) ); - return( MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN ); - } - -have_ciphersuite_v2: - MBEDTLS_SSL_DEBUG_MSG( 2, ( "selected ciphersuite: %s", ciphersuite_info->name ) ); - - ssl->session_negotiate->ciphersuite = ciphersuites[i]; - ssl->transform_negotiate->ciphersuite_info = ciphersuite_info; - mbedtls_ssl_optimize_checksum( ssl, ssl->transform_negotiate->ciphersuite_info ); - - /* - * SSLv2 Client Hello relevant renegotiation security checks - */ - if( ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "legacy renegotiation, breaking off handshake" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ssl->in_left = 0; - ssl->state++; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse client hello v2" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO */ - -static int ssl_parse_client_hello( mbedtls_ssl_context *ssl ) -{ - int ret, got_common_suite; - size_t i, j; - size_t ciph_offset, comp_offset, ext_offset; - size_t msg_len, ciph_len, sess_len, comp_len, ext_len; -#if defined(MBEDTLS_SSL_PROTO_DTLS) - size_t cookie_offset, cookie_len; -#endif - unsigned char *buf, *p, *ext; -#if defined(MBEDTLS_SSL_RENEGOTIATION) - int renegotiation_info_seen = 0; -#endif - int handshake_failure = 0; - const int *ciphersuites; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - int major, minor; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse client hello" ) ); - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -read_record_header: -#endif - /* - * If renegotiating, then the input was read with mbedtls_ssl_read_record(), - * otherwise read it ourselves manually in order to support SSLv2 - * ClientHello, which doesn't use the same record layer format. - */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE ) -#endif - { - if( ( ret = mbedtls_ssl_fetch_input( ssl, 5 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret ); - return( ret ); - } - } - - buf = ssl->in_hdr; - -#if defined(MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO) -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_STREAM ) -#endif - if( ( buf[0] & 0x80 ) != 0 ) - return ssl_parse_client_hello_v2( ssl ); -#endif - - MBEDTLS_SSL_DEBUG_BUF( 4, "record header", buf, mbedtls_ssl_hdr_len( ssl ) ); - - /* - * SSLv3/TLS Client Hello - * - * Record layer: - * 0 . 0 message type - * 1 . 2 protocol version - * 3 . 11 DTLS: epoch + record sequence number - * 3 . 4 message length - */ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, message type: %d", - buf[0] ) ); - - if( buf[0] != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, message len.: %d", - ( ssl->in_len[0] << 8 ) | ssl->in_len[1] ) ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, protocol version: [%d:%d]", - buf[1], buf[2] ) ); - - mbedtls_ssl_read_version( &major, &minor, ssl->conf->transport, buf + 1 ); - - /* According to RFC 5246 Appendix E.1, the version here is typically - * "{03,00}, the lowest version number supported by the client, [or] the - * value of ClientHello.client_version", so the only meaningful check here - * is the major version shouldn't be less than 3 */ - if( major < MBEDTLS_SSL_MAJOR_VERSION_3 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - /* For DTLS if this is the initial handshake, remember the client sequence - * number to use it in our next message (RFC 6347 4.2.1) */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM -#if defined(MBEDTLS_SSL_RENEGOTIATION) - && ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE -#endif - ) - { - /* Epoch should be 0 for initial handshakes */ - if( ssl->in_ctr[0] != 0 || ssl->in_ctr[1] != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - memcpy( ssl->out_ctr + 2, ssl->in_ctr + 2, 6 ); - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - if( mbedtls_ssl_dtls_replay_check( ssl ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "replayed record, discarding" ) ); - ssl->next_record_offset = 0; - ssl->in_left = 0; - goto read_record_header; - } - - /* No MAC to check yet, so we can update right now */ - mbedtls_ssl_dtls_replay_update( ssl ); -#endif - } -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - msg_len = ( ssl->in_len[0] << 8 ) | ssl->in_len[1]; - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) - { - /* Set by mbedtls_ssl_read_record() */ - msg_len = ssl->in_hslen; - } - else -#endif - { - if( msg_len > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - if( ( ret = mbedtls_ssl_fetch_input( ssl, mbedtls_ssl_hdr_len( ssl ) + msg_len ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret ); - return( ret ); - } - - /* Done reading this record, get ready for the next one */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - ssl->next_record_offset = msg_len + mbedtls_ssl_hdr_len( ssl ); - else -#endif - ssl->in_left = 0; - } - - buf = ssl->in_msg; - - MBEDTLS_SSL_DEBUG_BUF( 4, "record contents", buf, msg_len ); - - ssl->handshake->update_checksum( ssl, buf, msg_len ); - - /* - * Handshake layer: - * 0 . 0 handshake type - * 1 . 3 handshake length - * 4 . 5 DTLS only: message seqence number - * 6 . 8 DTLS only: fragment offset - * 9 . 11 DTLS only: fragment length - */ - if( msg_len < mbedtls_ssl_hs_hdr_len( ssl ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, handshake type: %d", buf[0] ) ); - - if( buf[0] != MBEDTLS_SSL_HS_CLIENT_HELLO ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, handshake len.: %d", - ( buf[1] << 16 ) | ( buf[2] << 8 ) | buf[3] ) ); - - /* We don't support fragmentation of ClientHello (yet?) */ - if( buf[1] != 0 || - msg_len != mbedtls_ssl_hs_hdr_len( ssl ) + ( ( buf[2] << 8 ) | buf[3] ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - /* - * Copy the client's handshake message_seq on initial handshakes, - * check sequence number on renego. - */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - /* This couldn't be done in ssl_prepare_handshake_record() */ - unsigned int cli_msg_seq = ( ssl->in_msg[4] << 8 ) | - ssl->in_msg[5]; - - if( cli_msg_seq != ssl->handshake->in_msg_seq ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message_seq: " - "%d (expected %d)", cli_msg_seq, - ssl->handshake->in_msg_seq ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ssl->handshake->in_msg_seq++; - } - else -#endif - { - unsigned int cli_msg_seq = ( ssl->in_msg[4] << 8 ) | - ssl->in_msg[5]; - ssl->handshake->out_msg_seq = cli_msg_seq; - ssl->handshake->in_msg_seq = cli_msg_seq + 1; - } - - /* - * For now we don't support fragmentation, so make sure - * fragment_offset == 0 and fragment_length == length - */ - if( ssl->in_msg[6] != 0 || ssl->in_msg[7] != 0 || ssl->in_msg[8] != 0 || - memcmp( ssl->in_msg + 1, ssl->in_msg + 9, 3 ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "ClientHello fragmentation not supported" ) ); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); - } - } -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - buf += mbedtls_ssl_hs_hdr_len( ssl ); - msg_len -= mbedtls_ssl_hs_hdr_len( ssl ); - - /* - * ClientHello layer: - * 0 . 1 protocol version - * 2 . 33 random bytes (starting with 4 bytes of Unix time) - * 34 . 35 session id length (1 byte) - * 35 . 34+x session id - * 35+x . 35+x DTLS only: cookie length (1 byte) - * 36+x . .. DTLS only: cookie - * .. . .. ciphersuite list length (2 bytes) - * .. . .. ciphersuite list - * .. . .. compression alg. list length (1 byte) - * .. . .. compression alg. list - * .. . .. extensions length (2 bytes, optional) - * .. . .. extensions (optional) - */ - - /* - * Minimal length (with everything empty and extensions ommitted) is - * 2 + 32 + 1 + 2 + 1 = 38 bytes. Check that first, so that we can - * read at least up to session id length without worrying. - */ - if( msg_len < 38 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - /* - * Check and save the protocol version - */ - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, version", buf, 2 ); - - mbedtls_ssl_read_version( &ssl->major_ver, &ssl->minor_ver, - ssl->conf->transport, buf ); - - ssl->handshake->max_major_ver = ssl->major_ver; - ssl->handshake->max_minor_ver = ssl->minor_ver; - - if( ssl->major_ver < ssl->conf->min_major_ver || - ssl->minor_ver < ssl->conf->min_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "client only supports ssl smaller than minimum" - " [%d:%d] < [%d:%d]", - ssl->major_ver, ssl->minor_ver, - ssl->conf->min_major_ver, ssl->conf->min_minor_ver ) ); - - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION ); - - return( MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION ); - } - - if( ssl->major_ver > ssl->conf->max_major_ver ) - { - ssl->major_ver = ssl->conf->max_major_ver; - ssl->minor_ver = ssl->conf->max_minor_ver; - } - else if( ssl->minor_ver > ssl->conf->max_minor_ver ) - ssl->minor_ver = ssl->conf->max_minor_ver; - - /* - * Save client random (inc. Unix time) - */ - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, random bytes", buf + 2, 32 ); - - memcpy( ssl->handshake->randbytes, buf + 2, 32 ); - - /* - * Check the session ID length and save session ID - */ - sess_len = buf[34]; - - if( sess_len > sizeof( ssl->session_negotiate->id ) || - sess_len + 34 + 2 > msg_len ) /* 2 for cipherlist length field */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, session id", buf + 35, sess_len ); - - ssl->session_negotiate->id_len = sess_len; - memset( ssl->session_negotiate->id, 0, - sizeof( ssl->session_negotiate->id ) ); - memcpy( ssl->session_negotiate->id, buf + 35, - ssl->session_negotiate->id_len ); - - /* - * Check the cookie length and content - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - cookie_offset = 35 + sess_len; - cookie_len = buf[cookie_offset]; - - if( cookie_offset + 1 + cookie_len + 2 > msg_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, cookie", - buf + cookie_offset + 1, cookie_len ); - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) - if( ssl->conf->f_cookie_check != NULL -#if defined(MBEDTLS_SSL_RENEGOTIATION) - && ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE -#endif - ) - { - if( ssl->conf->f_cookie_check( ssl->conf->p_cookie, - buf + cookie_offset + 1, cookie_len, - ssl->cli_id, ssl->cli_id_len ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "cookie verification failed" ) ); - ssl->handshake->verify_cookie_len = 1; - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "cookie verification passed" ) ); - ssl->handshake->verify_cookie_len = 0; - } - } - else -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ - { - /* We know we didn't send a cookie, so it should be empty */ - if( cookie_len != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "cookie verification skipped" ) ); - } - - /* - * Check the ciphersuitelist length (will be parsed later) - */ - ciph_offset = cookie_offset + 1 + cookie_len; - } - else -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - ciph_offset = 35 + sess_len; - - ciph_len = ( buf[ciph_offset + 0] << 8 ) - | ( buf[ciph_offset + 1] ); - - if( ciph_len < 2 || - ciph_len + 2 + ciph_offset + 1 > msg_len || /* 1 for comp. alg. len */ - ( ciph_len % 2 ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, ciphersuitelist", - buf + ciph_offset + 2, ciph_len ); - - /* - * Check the compression algorithms length and pick one - */ - comp_offset = ciph_offset + 2 + ciph_len; - - comp_len = buf[comp_offset]; - - if( comp_len < 1 || - comp_len > 16 || - comp_len + comp_offset + 1 > msg_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, compression", - buf + comp_offset + 1, comp_len ); - - ssl->session_negotiate->compression = MBEDTLS_SSL_COMPRESS_NULL; -#if defined(MBEDTLS_ZLIB_SUPPORT) - for( i = 0; i < comp_len; ++i ) - { - if( buf[comp_offset + 1 + i] == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - ssl->session_negotiate->compression = MBEDTLS_SSL_COMPRESS_DEFLATE; - break; - } - } -#endif - - /* See comments in ssl_write_client_hello() */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - ssl->session_negotiate->compression = MBEDTLS_SSL_COMPRESS_NULL; -#endif - - /* - * Check the extension length - */ - ext_offset = comp_offset + 1 + comp_len; - if( msg_len > ext_offset ) - { - if( msg_len < ext_offset + 2 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - ext_len = ( buf[ext_offset + 0] << 8 ) - | ( buf[ext_offset + 1] ); - - if( ( ext_len > 0 && ext_len < 4 ) || - msg_len != ext_offset + 2 + ext_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - } - else - ext_len = 0; - - ext = buf + ext_offset + 2; - MBEDTLS_SSL_DEBUG_BUF( 3, "client hello extensions", ext, ext_len ); - - while( ext_len != 0 ) - { - unsigned int ext_id = ( ( ext[0] << 8 ) - | ( ext[1] ) ); - unsigned int ext_size = ( ( ext[2] << 8 ) - | ( ext[3] ) ); - - if( ext_size + 4 > ext_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - switch( ext_id ) - { -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - case MBEDTLS_TLS_EXT_SERVERNAME: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found ServerName extension" ) ); - if( ssl->conf->f_sni == NULL ) - break; - - ret = ssl_parse_servername_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ - - case MBEDTLS_TLS_EXT_RENEGOTIATION_INFO: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found renegotiation extension" ) ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - renegotiation_info_seen = 1; -#endif - - ret = ssl_parse_renegotiation_info( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ - defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) - case MBEDTLS_TLS_EXT_SIG_ALG: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found signature_algorithms extension" ) ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - break; -#endif - - ret = ssl_parse_signature_algorithms_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 && - MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - case MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found supported elliptic curves extension" ) ); - - ret = ssl_parse_supported_elliptic_curves( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; - - case MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found supported point formats extension" ) ); - ssl->handshake->cli_exts |= MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT; - - ret = ssl_parse_supported_point_formats( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || - MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - case MBEDTLS_TLS_EXT_ECJPAKE_KKPP: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found ecjpake kkpp extension" ) ); - - ret = ssl_parse_ecjpake_kkpp( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - case MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found max fragment length extension" ) ); - - ret = ssl_parse_max_fragment_length_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - case MBEDTLS_TLS_EXT_TRUNCATED_HMAC: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found truncated hmac extension" ) ); - - ret = ssl_parse_truncated_hmac_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - case MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found encrypt then mac extension" ) ); - - ret = ssl_parse_encrypt_then_mac_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - case MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found extended master secret extension" ) ); - - ret = ssl_parse_extended_ms_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - case MBEDTLS_TLS_EXT_SESSION_TICKET: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found session ticket extension" ) ); - - ret = ssl_parse_session_ticket_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_SSL_ALPN) - case MBEDTLS_TLS_EXT_ALPN: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "found alpn extension" ) ); - - ret = ssl_parse_alpn_ext( ssl, ext + 4, ext_size ); - if( ret != 0 ) - return( ret ); - break; -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - - default: - MBEDTLS_SSL_DEBUG_MSG( 3, ( "unknown extension found: %d (ignoring)", - ext_id ) ); - } - - ext_len -= 4 + ext_size; - ext += 4 + ext_size; - - if( ext_len > 0 && ext_len < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - } - -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) - for( i = 0, p = buf + 41 + sess_len; i < ciph_len; i += 2, p += 2 ) - { - if( p[0] == (unsigned char)( ( MBEDTLS_SSL_FALLBACK_SCSV_VALUE >> 8 ) & 0xff ) && - p[1] == (unsigned char)( ( MBEDTLS_SSL_FALLBACK_SCSV_VALUE ) & 0xff ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "received FALLBACK_SCSV" ) ); - - if( ssl->minor_ver < ssl->conf->max_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "inapropriate fallback" ) ); - - mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_INAPROPRIATE_FALLBACK ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - break; - } - } -#endif /* MBEDTLS_SSL_FALLBACK_SCSV */ - - /* - * Check for TLS_EMPTY_RENEGOTIATION_INFO_SCSV - */ - for( i = 0, p = buf + ciph_offset + 2; i < ciph_len; i += 2, p += 2 ) - { - if( p[0] == 0 && p[1] == MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "received TLS_EMPTY_RENEGOTIATION_INFO " ) ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "received RENEGOTIATION SCSV during renegotiation" ) ); - - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } -#endif - ssl->secure_renegotiation = MBEDTLS_SSL_SECURE_RENEGOTIATION; - break; - } - } - - /* - * Renegotiation security checks - */ - if( ssl->secure_renegotiation != MBEDTLS_SSL_SECURE_RENEGOTIATION && - ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "legacy renegotiation, breaking off handshake" ) ); - handshake_failure = 1; - } -#if defined(MBEDTLS_SSL_RENEGOTIATION) - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->secure_renegotiation == MBEDTLS_SSL_SECURE_RENEGOTIATION && - renegotiation_info_seen == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "renegotiation_info extension missing (secure)" ) ); - handshake_failure = 1; - } - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "legacy renegotiation not allowed" ) ); - handshake_failure = 1; - } - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - renegotiation_info_seen == 1 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "renegotiation_info extension present (legacy)" ) ); - handshake_failure = 1; - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - if( handshake_failure == 1 ) - { - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - /* - * Search for a matching ciphersuite - * (At the end because we need information from the EC-based extensions - * and certificate from the SNI callback triggered by the SNI extension.) - */ - got_common_suite = 0; - ciphersuites = ssl->conf->ciphersuite_list[ssl->minor_ver]; - ciphersuite_info = NULL; -#if defined(MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE) - for( j = 0, p = buf + ciph_offset + 2; j < ciph_len; j += 2, p += 2 ) - { - for( i = 0; ciphersuites[i] != 0; i++ ) -#else - for( i = 0; ciphersuites[i] != 0; i++ ) - { - for( j = 0, p = buf + ciph_offset + 2; j < ciph_len; j += 2, p += 2 ) -#endif - { - if( p[0] != ( ( ciphersuites[i] >> 8 ) & 0xFF ) || - p[1] != ( ( ciphersuites[i] ) & 0xFF ) ) - continue; - - got_common_suite = 1; - - if( ( ret = ssl_ciphersuite_match( ssl, ciphersuites[i], - &ciphersuite_info ) ) != 0 ) - return( ret ); - - if( ciphersuite_info != NULL ) - goto have_ciphersuite; - } - } - - if( got_common_suite ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got ciphersuites in common, " - "but none of them usable" ) ); - mbedtls_ssl_send_fatal_handshake_failure( ssl ); - return( MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE ); - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no ciphersuites in common" ) ); - mbedtls_ssl_send_fatal_handshake_failure( ssl ); - return( MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN ); - } - -have_ciphersuite: - MBEDTLS_SSL_DEBUG_MSG( 2, ( "selected ciphersuite: %s", ciphersuite_info->name ) ); - - ssl->session_negotiate->ciphersuite = ciphersuites[i]; - ssl->transform_negotiate->ciphersuite_info = ciphersuite_info; - mbedtls_ssl_optimize_checksum( ssl, ssl->transform_negotiate->ciphersuite_info ); - - ssl->state++; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - mbedtls_ssl_recv_flight_completed( ssl ); -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse client hello" ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -static void ssl_write_truncated_hmac_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - - if( ssl->session_negotiate->trunc_hmac == MBEDTLS_SSL_TRUNC_HMAC_DISABLED ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding truncated hmac extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_TRUNCATED_HMAC >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_TRUNCATED_HMAC ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -static void ssl_write_encrypt_then_mac_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - const mbedtls_ssl_ciphersuite_t *suite = NULL; - const mbedtls_cipher_info_t *cipher = NULL; - - if( ssl->session_negotiate->encrypt_then_mac == MBEDTLS_SSL_EXTENDED_MS_DISABLED || - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - *olen = 0; - return; - } - - /* - * RFC 7366: "If a server receives an encrypt-then-MAC request extension - * from a client and then selects a stream or Authenticated Encryption - * with Associated Data (AEAD) ciphersuite, it MUST NOT send an - * encrypt-then-MAC response extension back to the client." - */ - if( ( suite = mbedtls_ssl_ciphersuite_from_id( - ssl->session_negotiate->ciphersuite ) ) == NULL || - ( cipher = mbedtls_cipher_info_from_type( suite->cipher ) ) == NULL || - cipher->mode != MBEDTLS_MODE_CBC ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding encrypt then mac extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -static void ssl_write_extended_ms_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - - if( ssl->handshake->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED || - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding extended master secret " - "extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -static void ssl_write_session_ticket_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - - if( ssl->handshake->new_session_ticket == 0 ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding session ticket extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SESSION_TICKET >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SESSION_TICKET ) & 0xFF ); - - *p++ = 0x00; - *p++ = 0x00; - - *olen = 4; -} -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -static void ssl_write_renegotiation_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - - if( ssl->secure_renegotiation != MBEDTLS_SSL_SECURE_RENEGOTIATION ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, secure renegotiation extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_RENEGOTIATION_INFO >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_RENEGOTIATION_INFO ) & 0xFF ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) - { - *p++ = 0x00; - *p++ = ( ssl->verify_data_len * 2 + 1 ) & 0xFF; - *p++ = ssl->verify_data_len * 2 & 0xFF; - - memcpy( p, ssl->peer_verify_data, ssl->verify_data_len ); - p += ssl->verify_data_len; - memcpy( p, ssl->own_verify_data, ssl->verify_data_len ); - p += ssl->verify_data_len; - } - else -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - { - *p++ = 0x00; - *p++ = 0x01; - *p++ = 0x00; - } - - *olen = p - buf; -} - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -static void ssl_write_max_fragment_length_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - - if( ssl->session_negotiate->mfl_code == MBEDTLS_SSL_MAX_FRAG_LEN_NONE ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, max_fragment_length extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH ) & 0xFF ); - - *p++ = 0x00; - *p++ = 1; - - *p++ = ssl->session_negotiate->mfl_code; - - *olen = 5; -} -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static void ssl_write_supported_point_formats_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - unsigned char *p = buf; - ((void) ssl); - - if( ( ssl->handshake->cli_exts & - MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT ) == 0 ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, supported_point_formats extension" ) ); - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS ) & 0xFF ); - - *p++ = 0x00; - *p++ = 2; - - *p++ = 1; - *p++ = MBEDTLS_ECP_PF_UNCOMPRESSED; - - *olen = 6; -} -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -static void ssl_write_ecjpake_kkpp_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, - size_t *olen ) -{ - int ret; - unsigned char *p = buf; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - size_t kkpp_len; - - *olen = 0; - - /* Skip costly computation if not needed */ - if( ssl->transform_negotiate->ciphersuite_info->key_exchange != - MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, ecjpake kkpp extension" ) ); - - if( end - p < 4 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "buffer too small" ) ); - return; - } - - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ECJPAKE_KKPP >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_ECJPAKE_KKPP ) & 0xFF ); - - ret = mbedtls_ecjpake_write_round_one( &ssl->handshake->ecjpake_ctx, - p + 2, end - p - 2, &kkpp_len, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1 , "mbedtls_ecjpake_write_round_one", ret ); - return; - } - - *p++ = (unsigned char)( ( kkpp_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( kkpp_len ) & 0xFF ); - - *olen = kkpp_len + 4; -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_SSL_ALPN ) -static void ssl_write_alpn_ext( mbedtls_ssl_context *ssl, - unsigned char *buf, size_t *olen ) -{ - if( ssl->alpn_chosen == NULL ) - { - *olen = 0; - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding alpn extension" ) ); - - /* - * 0 . 1 ext identifier - * 2 . 3 ext length - * 4 . 5 protocol list length - * 6 . 6 protocol name length - * 7 . 7+n protocol name - */ - buf[0] = (unsigned char)( ( MBEDTLS_TLS_EXT_ALPN >> 8 ) & 0xFF ); - buf[1] = (unsigned char)( ( MBEDTLS_TLS_EXT_ALPN ) & 0xFF ); - - *olen = 7 + strlen( ssl->alpn_chosen ); - - buf[2] = (unsigned char)( ( ( *olen - 4 ) >> 8 ) & 0xFF ); - buf[3] = (unsigned char)( ( ( *olen - 4 ) ) & 0xFF ); - - buf[4] = (unsigned char)( ( ( *olen - 6 ) >> 8 ) & 0xFF ); - buf[5] = (unsigned char)( ( ( *olen - 6 ) ) & 0xFF ); - - buf[6] = (unsigned char)( ( ( *olen - 7 ) ) & 0xFF ); - - memcpy( buf + 7, ssl->alpn_chosen, *olen - 7 ); -} -#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */ - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) -static int ssl_write_hello_verify_request( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *p = ssl->out_msg + 4; - unsigned char *cookie_len_byte; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write hello verify request" ) ); - - /* - * struct { - * ProtocolVersion server_version; - * opaque cookie<0..2^8-1>; - * } HelloVerifyRequest; - */ - - /* The RFC is not clear on this point, but sending the actual negotiated - * version looks like the most interoperable thing to do. */ - mbedtls_ssl_write_version( ssl->major_ver, ssl->minor_ver, - ssl->conf->transport, p ); - MBEDTLS_SSL_DEBUG_BUF( 3, "server version", p, 2 ); - p += 2; - - /* If we get here, f_cookie_check is not null */ - if( ssl->conf->f_cookie_write == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "inconsistent cookie callbacks" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - /* Skip length byte until we know the length */ - cookie_len_byte = p++; - - if( ( ret = ssl->conf->f_cookie_write( ssl->conf->p_cookie, - &p, ssl->out_buf + MBEDTLS_SSL_BUFFER_LEN, - ssl->cli_id, ssl->cli_id_len ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "f_cookie_write", ret ); - return( ret ); - } - - *cookie_len_byte = (unsigned char)( p - ( cookie_len_byte + 1 ) ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "cookie sent", cookie_len_byte + 1, *cookie_len_byte ); - - ssl->out_msglen = p - ssl->out_msg; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST; - - ssl->state = MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write hello verify request" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ - -static int ssl_write_server_hello( mbedtls_ssl_context *ssl ) -{ -#if defined(MBEDTLS_HAVE_TIME) - time_t t; -#endif - int ret; - size_t olen, ext_len = 0, n; - unsigned char *buf, *p; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write server hello" ) ); - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake->verify_cookie_len != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "client hello was not authenticated" ) ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server hello" ) ); - - return( ssl_write_hello_verify_request( ssl ) ); - } -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ - - if( ssl->conf->f_rng == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "no RNG provided") ); - return( MBEDTLS_ERR_SSL_NO_RNG ); - } - - /* - * 0 . 0 handshake type - * 1 . 3 handshake length - * 4 . 5 protocol version - * 6 . 9 UNIX time() - * 10 . 37 random bytes - */ - buf = ssl->out_msg; - p = buf + 4; - - mbedtls_ssl_write_version( ssl->major_ver, ssl->minor_ver, - ssl->conf->transport, p ); - p += 2; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen version: [%d:%d]", - buf[4], buf[5] ) ); - -#if defined(MBEDTLS_HAVE_TIME) - t = time( NULL ); - *p++ = (unsigned char)( t >> 24 ); - *p++ = (unsigned char)( t >> 16 ); - *p++ = (unsigned char)( t >> 8 ); - *p++ = (unsigned char)( t ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", t ) ); -#else - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 4 ) ) != 0 ) - return( ret ); - - p += 4; -#endif /* MBEDTLS_HAVE_TIME */ - - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 28 ) ) != 0 ) - return( ret ); - - p += 28; - - memcpy( ssl->handshake->randbytes + 32, buf + 6, 32 ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, random bytes", buf + 6, 32 ); - - /* - * Resume is 0 by default, see ssl_handshake_init(). - * It may be already set to 1 by ssl_parse_session_ticket_ext(). - * If not, try looking up session ID in our cache. - */ - if( ssl->handshake->resume == 0 && -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE && -#endif - ssl->session_negotiate->id_len != 0 && - ssl->conf->f_get_cache != NULL && - ssl->conf->f_get_cache( ssl->conf->p_cache, ssl->session_negotiate ) == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "session successfully restored from cache" ) ); - ssl->handshake->resume = 1; - } - - if( ssl->handshake->resume == 0 ) - { - /* - * New session, create a new session id, - * unless we're about to issue a session ticket - */ - ssl->state++; - -#if defined(MBEDTLS_HAVE_TIME) - ssl->session_negotiate->start = time( NULL ); -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - if( ssl->handshake->new_session_ticket != 0 ) - { - ssl->session_negotiate->id_len = n = 0; - memset( ssl->session_negotiate->id, 0, 32 ); - } - else -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - { - ssl->session_negotiate->id_len = n = 32; - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->session_negotiate->id, - n ) ) != 0 ) - return( ret ); - } - } - else - { - /* - * Resuming a session - */ - n = ssl->session_negotiate->id_len; - ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC; - - if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret ); - return( ret ); - } - } - - /* - * 38 . 38 session id length - * 39 . 38+n session id - * 39+n . 40+n chosen ciphersuite - * 41+n . 41+n chosen compression alg. - * 42+n . 43+n extensions length - * 44+n . 43+n+m extensions - */ - *p++ = (unsigned char) ssl->session_negotiate->id_len; - memcpy( p, ssl->session_negotiate->id, ssl->session_negotiate->id_len ); - p += ssl->session_negotiate->id_len; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, session id len.: %d", n ) ); - MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, session id", buf + 39, n ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed", - ssl->handshake->resume ? "a" : "no" ) ); - - *p++ = (unsigned char)( ssl->session_negotiate->ciphersuite >> 8 ); - *p++ = (unsigned char)( ssl->session_negotiate->ciphersuite ); - *p++ = (unsigned char)( ssl->session_negotiate->compression ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %s", - mbedtls_ssl_get_ciphersuite_name( ssl->session_negotiate->ciphersuite ) ) ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, compress alg.: 0x%02X", - ssl->session_negotiate->compression ) ); - - /* - * First write extensions, then the total length - */ - ssl_write_renegotiation_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - ssl_write_max_fragment_length_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - ssl_write_truncated_hmac_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - ssl_write_encrypt_then_mac_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - ssl_write_extended_ms_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - ssl_write_supported_point_formats_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - ssl_write_ecjpake_kkpp_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - -#if defined(MBEDTLS_SSL_ALPN) - ssl_write_alpn_ext( ssl, p + 2 + ext_len, &olen ); - ext_len += olen; -#endif - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, total extension length: %d", ext_len ) ); - - if( ext_len > 0 ) - { - *p++ = (unsigned char)( ( ext_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( ext_len ) & 0xFF ); - p += ext_len; - } - - ssl->out_msglen = p - buf; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_SERVER_HELLO; - - ret = mbedtls_ssl_write_record( ssl ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server hello" ) ); - - return( ret ); -} - -#if !defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) -static int ssl_write_certificate_request( mbedtls_ssl_context *ssl ) -{ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate request" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate request" ) ); - ssl->state++; - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); -} -#else -static int ssl_write_certificate_request( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - size_t dn_size, total_dn_size; /* excluding length bytes */ - size_t ct_len, sa_len; /* including length bytes */ - unsigned char *buf, *p; - const unsigned char * const end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - const mbedtls_x509_crt *crt; - int authmode; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate request" ) ); - - ssl->state++; - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - if( ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET ) - authmode = ssl->handshake->sni_authmode; - else -#endif - authmode = ssl->conf->authmode; - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE || - authmode == MBEDTLS_SSL_VERIFY_NONE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate request" ) ); - return( 0 ); - } - - /* - * 0 . 0 handshake type - * 1 . 3 handshake length - * 4 . 4 cert type count - * 5 .. m-1 cert types - * m .. m+1 sig alg length (TLS 1.2 only) - * m+1 .. n-1 SignatureAndHashAlgorithms (TLS 1.2 only) - * n .. n+1 length of all DNs - * n+2 .. n+3 length of DN 1 - * n+4 .. ... Distinguished Name #1 - * ... .. ... length of DN 2, etc. - */ - buf = ssl->out_msg; - p = buf + 4; - - /* - * Supported certificate types - * - * ClientCertificateType certificate_types<1..2^8-1>; - * enum { (255) } ClientCertificateType; - */ - ct_len = 0; - -#if defined(MBEDTLS_RSA_C) - p[1 + ct_len++] = MBEDTLS_SSL_CERT_TYPE_RSA_SIGN; -#endif -#if defined(MBEDTLS_ECDSA_C) - p[1 + ct_len++] = MBEDTLS_SSL_CERT_TYPE_ECDSA_SIGN; -#endif - - p[0] = (unsigned char) ct_len++; - p += ct_len; - - sa_len = 0; -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - /* - * Add signature_algorithms for verify (TLS 1.2) - * - * SignatureAndHashAlgorithm supported_signature_algorithms<2..2^16-2>; - * - * struct { - * HashAlgorithm hash; - * SignatureAlgorithm signature; - * } SignatureAndHashAlgorithm; - * - * enum { (255) } HashAlgorithm; - * enum { (255) } SignatureAlgorithm; - */ - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - /* - * Only use current running hash algorithm that is already required - * for requested ciphersuite. - */ - ssl->handshake->verify_sig_alg = MBEDTLS_SSL_HASH_SHA256; - - if( ssl->transform_negotiate->ciphersuite_info->mac == - MBEDTLS_MD_SHA384 ) - { - ssl->handshake->verify_sig_alg = MBEDTLS_SSL_HASH_SHA384; - } - - /* - * Supported signature algorithms - */ -#if defined(MBEDTLS_RSA_C) - p[2 + sa_len++] = ssl->handshake->verify_sig_alg; - p[2 + sa_len++] = MBEDTLS_SSL_SIG_RSA; -#endif -#if defined(MBEDTLS_ECDSA_C) - p[2 + sa_len++] = ssl->handshake->verify_sig_alg; - p[2 + sa_len++] = MBEDTLS_SSL_SIG_ECDSA; -#endif - - p[0] = (unsigned char)( sa_len >> 8 ); - p[1] = (unsigned char)( sa_len ); - sa_len += 2; - p += sa_len; - } -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - - /* - * DistinguishedName certificate_authorities<0..2^16-1>; - * opaque DistinguishedName<1..2^16-1>; - */ - p += 2; -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - if( ssl->handshake->sni_ca_chain != NULL ) - crt = ssl->handshake->sni_ca_chain; - else -#endif - crt = ssl->conf->ca_chain; - - total_dn_size = 0; - while( crt != NULL && crt->version != 0 ) - { - dn_size = crt->subject_raw.len; - - if( end < p || - (size_t)( end - p ) < dn_size || - (size_t)( end - p ) < 2 + dn_size ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "skipping CAs: buffer too short" ) ); - break; - } - - *p++ = (unsigned char)( dn_size >> 8 ); - *p++ = (unsigned char)( dn_size ); - memcpy( p, crt->subject_raw.p, dn_size ); - p += dn_size; - - MBEDTLS_SSL_DEBUG_BUF( 3, "requested DN", p - dn_size, dn_size ); - - total_dn_size += 2 + dn_size; - crt = crt->next; - } - - ssl->out_msglen = p - buf; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_CERTIFICATE_REQUEST; - ssl->out_msg[4 + ct_len + sa_len] = (unsigned char)( total_dn_size >> 8 ); - ssl->out_msg[5 + ct_len + sa_len] = (unsigned char)( total_dn_size ); - - ret = mbedtls_ssl_write_record( ssl ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write certificate request" ) ); - - return( ret ); -} -#endif /* !MBEDTLS_KEY_EXCHANGE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) -static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl ) -{ - int ret; - - if( ! mbedtls_pk_can_do( mbedtls_ssl_own_key( ssl ), MBEDTLS_PK_ECKEY ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server key not ECDH capable" ) ); - return( MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH ); - } - - if( ( ret = mbedtls_ecdh_get_params( &ssl->handshake->ecdh_ctx, - mbedtls_pk_ec( *mbedtls_ssl_own_key( ssl ) ), - MBEDTLS_ECDH_OURS ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "mbedtls_ecdh_get_params" ), ret ); - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ - -static int ssl_write_server_key_exchange( mbedtls_ssl_context *ssl ) -{ - int ret; - size_t n = 0; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = - ssl->transform_negotiate->ciphersuite_info; - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - unsigned char *p = ssl->out_msg + 4; - unsigned char *dig_signed = p; - size_t dig_signed_len = 0, len; - ((void) dig_signed); - ((void) dig_signed_len); - ((void) len); -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write server key exchange" ) ); - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write server key exchange" ) ); - ssl->state++; - return( 0 ); - } -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA ) - { - ssl_get_ecdh_params_from_cert( ssl ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write server key exchange" ) ); - ssl->state++; - return( 0 ); - } -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - size_t jlen; - const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN; - - ret = mbedtls_ecjpake_write_round_two( &ssl->handshake->ecjpake_ctx, - p, end - p, &jlen, ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_write_round_two", ret ); - return( ret ); - } - - p += jlen; - n += jlen; - } -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - /* TODO: Support identity hints */ - *(p++) = 0x00; - *(p++) = 0x00; - - n += 2; - } -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK ) - { - if( ssl->conf->dhm_P.p == NULL || ssl->conf->dhm_G.p == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "no DH parameters set" ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - /* - * Ephemeral DH parameters: - * - * struct { - * opaque dh_p<1..2^16-1>; - * opaque dh_g<1..2^16-1>; - * opaque dh_Ys<1..2^16-1>; - * } ServerDHParams; - */ - if( ( ret = mbedtls_mpi_copy( &ssl->handshake->dhm_ctx.P, &ssl->conf->dhm_P ) ) != 0 || - ( ret = mbedtls_mpi_copy( &ssl->handshake->dhm_ctx.G, &ssl->conf->dhm_G ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_mpi_copy", ret ); - return( ret ); - } - - if( ( ret = mbedtls_dhm_make_params( &ssl->handshake->dhm_ctx, - (int) mbedtls_mpi_size( &ssl->handshake->dhm_ctx.P ), - p, &len, ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_make_params", ret ); - return( ret ); - } - - dig_signed = p; - dig_signed_len = len; - - p += len; - n += len; - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: X ", &ssl->handshake->dhm_ctx.X ); - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: P ", &ssl->handshake->dhm_ctx.P ); - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: G ", &ssl->handshake->dhm_ctx.G ); - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GX", &ssl->handshake->dhm_ctx.GX ); - } -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - /* - * Ephemeral ECDH parameters: - * - * struct { - * ECParameters curve_params; - * ECPoint public; - * } ServerECDHParams; - */ - const mbedtls_ecp_curve_info **curve = NULL; - const mbedtls_ecp_group_id *gid; - - /* Match our preference list against the offered curves */ - for( gid = ssl->conf->curve_list; *gid != MBEDTLS_ECP_DP_NONE; gid++ ) - for( curve = ssl->handshake->curves; *curve != NULL; curve++ ) - if( (*curve)->grp_id == *gid ) - goto curve_matching_done; - -curve_matching_done: - if( curve == NULL || *curve == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "no matching curve for ECDHE" ) ); - return( MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDHE curve: %s", (*curve)->name ) ); - - if( ( ret = mbedtls_ecp_group_load( &ssl->handshake->ecdh_ctx.grp, - (*curve)->grp_id ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecp_group_load", ret ); - return( ret ); - } - - if( ( ret = mbedtls_ecdh_make_params( &ssl->handshake->ecdh_ctx, &len, - p, MBEDTLS_SSL_MAX_CONTENT_LEN - n, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_make_params", ret ); - return( ret ); - } - - dig_signed = p; - dig_signed_len = len; - - p += len; - n += len; - - MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Q ", &ssl->handshake->ecdh_ctx.Q ); - } -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA ) - { - size_t signature_len = 0; - unsigned int hashlen = 0; - unsigned char hash[64]; - mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE; - - /* - * Choose hash algorithm. NONE means MD5 + SHA1 here. - */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - md_alg = mbedtls_ssl_md_alg_from_hash( ssl->handshake->sig_alg ); - - if( md_alg == MBEDTLS_MD_NONE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( ciphersuite_info->key_exchange == - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA ) - { - md_alg = MBEDTLS_MD_SHA1; - } - else -#endif - { - md_alg = MBEDTLS_MD_NONE; - } - - /* - * Compute the hash to be signed - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( md_alg == MBEDTLS_MD_NONE ) - { - mbedtls_md5_context mbedtls_md5; - mbedtls_sha1_context mbedtls_sha1; - - mbedtls_md5_init( &mbedtls_md5 ); - mbedtls_sha1_init( &mbedtls_sha1 ); - - /* - * digitally-signed struct { - * opaque md5_hash[16]; - * opaque sha_hash[20]; - * }; - * - * md5_hash - * MD5(ClientHello.random + ServerHello.random - * + ServerParams); - * sha_hash - * SHA(ClientHello.random + ServerHello.random - * + ServerParams); - */ - mbedtls_md5_starts( &mbedtls_md5 ); - mbedtls_md5_update( &mbedtls_md5, ssl->handshake->randbytes, 64 ); - mbedtls_md5_update( &mbedtls_md5, dig_signed, dig_signed_len ); - mbedtls_md5_finish( &mbedtls_md5, hash ); - - mbedtls_sha1_starts( &mbedtls_sha1 ); - mbedtls_sha1_update( &mbedtls_sha1, ssl->handshake->randbytes, 64 ); - mbedtls_sha1_update( &mbedtls_sha1, dig_signed, dig_signed_len ); - mbedtls_sha1_finish( &mbedtls_sha1, hash + 16 ); - - hashlen = 36; - - mbedtls_md5_free( &mbedtls_md5 ); - mbedtls_sha1_free( &mbedtls_sha1 ); - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 || MBEDTLS_SSL_PROTO_TLS1 || \ - MBEDTLS_SSL_PROTO_TLS1_1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( md_alg != MBEDTLS_MD_NONE ) - { - mbedtls_md_context_t ctx; - const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); - - mbedtls_md_init( &ctx ); - - /* Info from md_alg will be used instead */ - hashlen = 0; - - /* - * digitally-signed struct { - * opaque client_random[32]; - * opaque server_random[32]; - * ServerDHParams params; - * }; - */ - if( ( ret = mbedtls_md_setup( &ctx, md_info, 0 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_md_setup", ret ); - return( ret ); - } - - mbedtls_md_starts( &ctx ); - mbedtls_md_update( &ctx, ssl->handshake->randbytes, 64 ); - mbedtls_md_update( &ctx, dig_signed, dig_signed_len ); - mbedtls_md_finish( &ctx, hash ); - mbedtls_md_free( &ctx ); - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \ - MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_BUF( 3, "parameters hash", hash, hashlen != 0 ? hashlen : - (unsigned int) ( mbedtls_md_get_size( mbedtls_md_info_from_type( md_alg ) ) ) ); - - /* - * Make the signature - */ - if( mbedtls_ssl_own_key( ssl ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no private key" ) ); - return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); - } - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - *(p++) = ssl->handshake->sig_alg; - *(p++) = mbedtls_ssl_sig_from_pk( mbedtls_ssl_own_key( ssl ) ); - - n += 2; - } -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - - if( ( ret = mbedtls_pk_sign( mbedtls_ssl_own_key( ssl ), md_alg, hash, hashlen, - p + 2 , &signature_len, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_pk_sign", ret ); - return( ret ); - } - - *(p++) = (unsigned char)( signature_len >> 8 ); - *(p++) = (unsigned char)( signature_len ); - n += 2; - - MBEDTLS_SSL_DEBUG_BUF( 3, "my signature", p, signature_len ); - - n += signature_len; - } -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || - MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ - - ssl->out_msglen = 4 + n; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE; - - ssl->state++; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server key exchange" ) ); - - return( 0 ); -} - -static int ssl_write_server_hello_done( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write server hello done" ) ); - - ssl->out_msglen = 4; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_SERVER_HELLO_DONE; - - ssl->state++; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - mbedtls_ssl_send_flight_completed( ssl ); -#endif - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write server hello done" ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) -static int ssl_parse_client_dh_public( mbedtls_ssl_context *ssl, unsigned char **p, - const unsigned char *end ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - size_t n; - - /* - * Receive G^Y mod P, premaster = (G^Y)^X mod P - */ - if( *p + 2 > end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - n = ( (*p)[0] << 8 ) | (*p)[1]; - *p += 2; - - if( *p + n > end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - if( ( ret = mbedtls_dhm_read_public( &ssl->handshake->dhm_ctx, *p, n ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_read_public", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP ); - } - - *p += n; - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GY", &ssl->handshake->dhm_ctx.GY ); - - return( ret ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) -static int ssl_parse_encrypted_pms( mbedtls_ssl_context *ssl, - const unsigned char *p, - const unsigned char *end, - size_t pms_offset ) -{ - int ret; - size_t len = mbedtls_pk_get_len( mbedtls_ssl_own_key( ssl ) ); - unsigned char *pms = ssl->handshake->premaster + pms_offset; - unsigned char ver[2]; - unsigned char fake_pms[48], peer_pms[48]; - unsigned char mask; - size_t i, peer_pmslen; - unsigned int diff; - - if( ! mbedtls_pk_can_do( mbedtls_ssl_own_key( ssl ), MBEDTLS_PK_RSA ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no RSA private key" ) ); - return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); - } - - /* - * Decrypt the premaster using own private RSA key - */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_0 ) - { - if( *p++ != ( ( len >> 8 ) & 0xFF ) || - *p++ != ( ( len ) & 0xFF ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - } -#endif - - if( p + len != end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - mbedtls_ssl_write_version( ssl->handshake->max_major_ver, - ssl->handshake->max_minor_ver, - ssl->conf->transport, ver ); - - /* - * Protection against Bleichenbacher's attack: invalid PKCS#1 v1.5 padding - * must not cause the connection to end immediately; instead, send a - * bad_record_mac later in the handshake. - * Also, avoid data-dependant branches here to protect against - * timing-based variants. - */ - ret = ssl->conf->f_rng( ssl->conf->p_rng, fake_pms, sizeof( fake_pms ) ); - if( ret != 0 ) - return( ret ); - - ret = mbedtls_pk_decrypt( mbedtls_ssl_own_key( ssl ), p, len, - peer_pms, &peer_pmslen, - sizeof( peer_pms ), - ssl->conf->f_rng, ssl->conf->p_rng ); - - diff = (unsigned int) ret; - diff |= peer_pmslen ^ 48; - diff |= peer_pms[0] ^ ver[0]; - diff |= peer_pms[1] ^ ver[1]; - -#if defined(MBEDTLS_SSL_DEBUG_ALL) - if( diff != 0 ) - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); -#endif - - if( sizeof( ssl->handshake->premaster ) < pms_offset || - sizeof( ssl->handshake->premaster ) - pms_offset < 48 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - ssl->handshake->pmslen = 48; - - /* mask = diff ? 0xff : 0x00 using bit operations to avoid branches */ - /* MSVC has a warning about unary minus on unsigned, but this is - * well-defined and precisely what we want to do here */ -#if defined(_MSC_VER) -#pragma warning( push ) -#pragma warning( disable : 4146 ) -#endif - mask = - ( ( diff | - diff ) >> ( sizeof( unsigned int ) * 8 - 1 ) ); -#if defined(_MSC_VER) -#pragma warning( pop ) -#endif - - for( i = 0; i < ssl->handshake->pmslen; i++ ) - pms[i] = ( mask & fake_pms[i] ) | ( (~mask) & peer_pms[i] ); - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -static int ssl_parse_client_psk_identity( mbedtls_ssl_context *ssl, unsigned char **p, - const unsigned char *end ) -{ - int ret = 0; - size_t n; - - if( ssl->conf->f_psk == NULL && - ( ssl->conf->psk == NULL || ssl->conf->psk_identity == NULL || - ssl->conf->psk_identity_len == 0 || ssl->conf->psk_len == 0 ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no pre-shared key" ) ); - return( MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ); - } - - /* - * Receive client pre-shared key identity name - */ - if( *p + 2 > end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - n = ( (*p)[0] << 8 ) | (*p)[1]; - *p += 2; - - if( n < 1 || n > 65535 || *p + n > end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - if( ssl->conf->f_psk != NULL ) - { - if( ssl->conf->f_psk( ssl->conf->p_psk, ssl, *p, n ) != 0 ) - ret = MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY; - } - else - { - /* Identity is not a big secret since clients send it in the clear, - * but treat it carefully anyway, just in case */ - if( n != ssl->conf->psk_identity_len || - mbedtls_ssl_safer_memcmp( ssl->conf->psk_identity, *p, n ) != 0 ) - { - ret = MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY; - } - } - - if( ret == MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY ) - { - MBEDTLS_SSL_DEBUG_BUF( 3, "Unknown PSK identity", *p, n ); - if( ( ret = mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY ) ) != 0 ) - { - return( ret ); - } - - return( MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY ); - } - - *p += n; - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl ) -{ - int ret; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - unsigned char *p, *end; - - ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse client key exchange" ) ); - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - p = ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ); - end = ssl->in_msg + ssl->in_hslen; - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - if( ssl->in_msg[0] != MBEDTLS_SSL_HS_CLIENT_KEY_EXCHANGE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_RSA ) - { - if( ( ret = ssl_parse_client_dh_public( ssl, &p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_client_dh_public" ), ret ); - return( ret ); - } - - if( p != end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx, - ssl->handshake->premaster, - MBEDTLS_PREMASTER_SIZE, - &ssl->handshake->pmslen, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_calc_secret", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS ); - } - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: K ", &ssl->handshake->dhm_ctx.K ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_RSA || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA ) - { - if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx, - p, end - p) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_read_public", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP ); - } - - MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp ", &ssl->handshake->ecdh_ctx.Qp ); - - if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx, - &ssl->handshake->pmslen, - ssl->handshake->premaster, - MBEDTLS_MPI_MAX_SIZE, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_calc_secret", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS ); - } - - MBEDTLS_SSL_DEBUG_MPI( 3, "ECDH: z ", &ssl->handshake->ecdh_ctx.z ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED || - MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK ) - { - if( ( ret = ssl_parse_client_psk_identity( ssl, &p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_client_psk_identity" ), ret ); - return( ret ); - } - - if( p != end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - if( ( ret = mbedtls_ssl_psk_derive_premaster( ssl, - ciphersuite_info->key_exchange ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_psk_derive_premaster", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - { - if( ( ret = ssl_parse_client_psk_identity( ssl, &p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_client_psk_identity" ), ret ); - return( ret ); - } - - if( ( ret = ssl_parse_encrypted_pms( ssl, p, end, 2 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_encrypted_pms" ), ret ); - return( ret ); - } - - if( ( ret = mbedtls_ssl_psk_derive_premaster( ssl, - ciphersuite_info->key_exchange ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_psk_derive_premaster", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK ) - { - if( ( ret = ssl_parse_client_psk_identity( ssl, &p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_client_psk_identity" ), ret ); - return( ret ); - } - if( ( ret = ssl_parse_client_dh_public( ssl, &p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_client_dh_public" ), ret ); - return( ret ); - } - - if( p != end ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client key exchange" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE ); - } - - if( ( ret = mbedtls_ssl_psk_derive_premaster( ssl, - ciphersuite_info->key_exchange ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_psk_derive_premaster", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - if( ( ret = ssl_parse_client_psk_identity( ssl, &p, end ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_client_psk_identity" ), ret ); - return( ret ); - } - - if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx, - p, end - p ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_read_public", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP ); - } - - MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp ", &ssl->handshake->ecdh_ctx.Qp ); - - if( ( ret = mbedtls_ssl_psk_derive_premaster( ssl, - ciphersuite_info->key_exchange ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_psk_derive_premaster", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA ) - { - if( ( ret = ssl_parse_encrypted_pms( ssl, p, end, 0 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, ( "ssl_parse_parse_encrypted_pms_secret" ), ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - ret = mbedtls_ecjpake_read_round_two( &ssl->handshake->ecjpake_ctx, - p, end - p ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_read_round_two", ret ); - return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE ); - } - - ret = mbedtls_ecjpake_derive_secret( &ssl->handshake->ecjpake_ctx, - ssl->handshake->premaster, 32, &ssl->handshake->pmslen, - ssl->conf->f_rng, ssl->conf->p_rng ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecjpake_derive_secret", ret ); - return( ret ); - } - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret ); - return( ret ); - } - - ssl->state++; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse client key exchange" ) ); - - return( 0 ); -} - -#if !defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) -static int ssl_parse_certificate_verify( mbedtls_ssl_context *ssl ) -{ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate verify" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate verify" ) ); - ssl->state++; - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); -} -#else -static int ssl_parse_certificate_verify( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - size_t i, sig_len; - unsigned char hash[48]; - unsigned char *hash_start = hash; - size_t hashlen; -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - mbedtls_pk_type_t pk_alg; -#endif - mbedtls_md_type_t md_alg; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate verify" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE || - ssl->session_negotiate->peer_cert == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate verify" ) ); - ssl->state++; - return( 0 ); - } - - /* Needs to be done before read_record() to exclude current message */ - ssl->handshake->calc_verify( ssl, hash ); - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - ssl->state++; - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE || - ssl->in_msg[0] != MBEDTLS_SSL_HS_CERTIFICATE_VERIFY ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate verify message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - i = mbedtls_ssl_hs_hdr_len( ssl ); - - /* - * struct { - * SignatureAndHashAlgorithm algorithm; -- TLS 1.2 only - * opaque signature<0..2^16-1>; - * } DigitallySigned; - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_3 ) - { - md_alg = MBEDTLS_MD_NONE; - hashlen = 36; - - /* For ECDSA, use SHA-1, not MD-5 + SHA-1 */ - if( mbedtls_pk_can_do( &ssl->session_negotiate->peer_cert->pk, - MBEDTLS_PK_ECDSA ) ) - { - hash_start += 16; - hashlen -= 16; - md_alg = MBEDTLS_MD_SHA1; - } - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 || MBEDTLS_SSL_PROTO_TLS1 || - MBEDTLS_SSL_PROTO_TLS1_1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - if( i + 2 > ssl->in_hslen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate verify message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - /* - * Hash - */ - if( ssl->in_msg[i] != ssl->handshake->verify_sig_alg ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "peer not adhering to requested sig_alg" - " for verify message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - md_alg = mbedtls_ssl_md_alg_from_hash( ssl->handshake->verify_sig_alg ); - - /* Info from md_alg will be used instead */ - hashlen = 0; - - i++; - - /* - * Signature - */ - if( ( pk_alg = mbedtls_ssl_pk_alg_from_sig( ssl->in_msg[i] ) ) - == MBEDTLS_PK_NONE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "peer not adhering to requested sig_alg" - " for verify message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - /* - * Check the certificate's key type matches the signature alg - */ - if( ! mbedtls_pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "sig_alg doesn't match cert key" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - i++; - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - if( i + 2 > ssl->in_hslen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate verify message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - sig_len = ( ssl->in_msg[i] << 8 ) | ssl->in_msg[i+1]; - i += 2; - - if( i + sig_len != ssl->in_hslen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate verify message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY ); - } - - if( ( ret = mbedtls_pk_verify( &ssl->session_negotiate->peer_cert->pk, - md_alg, hash_start, hashlen, - ssl->in_msg + i, sig_len ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_pk_verify", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse certificate verify" ) ); - - return( ret ); -} -#endif /* !MBEDTLS_KEY_EXCHANGE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED && - !MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -static int ssl_write_new_session_ticket( mbedtls_ssl_context *ssl ) -{ - int ret; - size_t tlen; - uint32_t lifetime; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write new session ticket" ) ); - - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_NEW_SESSION_TICKET; - - /* - * struct { - * uint32 ticket_lifetime_hint; - * opaque ticket<0..2^16-1>; - * } NewSessionTicket; - * - * 4 . 7 ticket_lifetime_hint (0 = unspecified) - * 8 . 9 ticket_len (n) - * 10 . 9+n ticket content - */ - - if( ( ret = ssl->conf->f_ticket_write( ssl->conf->p_ticket, - ssl->session_negotiate, - ssl->out_msg + 10, - ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN, - &tlen, &lifetime ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_ticket_write", ret ); - tlen = 0; - } - - ssl->out_msg[4] = ( lifetime >> 24 ) & 0xFF; - ssl->out_msg[5] = ( lifetime >> 16 ) & 0xFF; - ssl->out_msg[6] = ( lifetime >> 8 ) & 0xFF; - ssl->out_msg[7] = ( lifetime ) & 0xFF; - - ssl->out_msg[8] = (unsigned char)( ( tlen >> 8 ) & 0xFF ); - ssl->out_msg[9] = (unsigned char)( ( tlen ) & 0xFF ); - - ssl->out_msglen = 10 + tlen; - - /* - * Morally equivalent to updating ssl->state, but NewSessionTicket and - * ChangeCipherSpec share the same state. - */ - ssl->handshake->new_session_ticket = 0; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write new session ticket" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -/* - * SSL handshake -- server side -- single step - */ -int mbedtls_ssl_handshake_server_step( mbedtls_ssl_context *ssl ) -{ - int ret = 0; - - if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->handshake == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "server state: %d", ssl->state ) ); - - if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 ) - return( ret ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING ) - { - if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 ) - return( ret ); - } -#endif - - switch( ssl->state ) - { - case MBEDTLS_SSL_HELLO_REQUEST: - ssl->state = MBEDTLS_SSL_CLIENT_HELLO; - break; - - /* - * <== ClientHello - */ - case MBEDTLS_SSL_CLIENT_HELLO: - ret = ssl_parse_client_hello( ssl ); - break; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - case MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT: - return( MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED ); -#endif - - /* - * ==> ServerHello - * Certificate - * ( ServerKeyExchange ) - * ( CertificateRequest ) - * ServerHelloDone - */ - case MBEDTLS_SSL_SERVER_HELLO: - ret = ssl_write_server_hello( ssl ); - break; - - case MBEDTLS_SSL_SERVER_CERTIFICATE: - ret = mbedtls_ssl_write_certificate( ssl ); - break; - - case MBEDTLS_SSL_SERVER_KEY_EXCHANGE: - ret = ssl_write_server_key_exchange( ssl ); - break; - - case MBEDTLS_SSL_CERTIFICATE_REQUEST: - ret = ssl_write_certificate_request( ssl ); - break; - - case MBEDTLS_SSL_SERVER_HELLO_DONE: - ret = ssl_write_server_hello_done( ssl ); - break; - - /* - * <== ( Certificate/Alert ) - * ClientKeyExchange - * ( CertificateVerify ) - * ChangeCipherSpec - * Finished - */ - case MBEDTLS_SSL_CLIENT_CERTIFICATE: - ret = mbedtls_ssl_parse_certificate( ssl ); - break; - - case MBEDTLS_SSL_CLIENT_KEY_EXCHANGE: - ret = ssl_parse_client_key_exchange( ssl ); - break; - - case MBEDTLS_SSL_CERTIFICATE_VERIFY: - ret = ssl_parse_certificate_verify( ssl ); - break; - - case MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC: - ret = mbedtls_ssl_parse_change_cipher_spec( ssl ); - break; - - case MBEDTLS_SSL_CLIENT_FINISHED: - ret = mbedtls_ssl_parse_finished( ssl ); - break; - - /* - * ==> ( NewSessionTicket ) - * ChangeCipherSpec - * Finished - */ - case MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC: -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - if( ssl->handshake->new_session_ticket != 0 ) - ret = ssl_write_new_session_ticket( ssl ); - else -#endif - ret = mbedtls_ssl_write_change_cipher_spec( ssl ); - break; - - case MBEDTLS_SSL_SERVER_FINISHED: - ret = mbedtls_ssl_write_finished( ssl ); - break; - - case MBEDTLS_SSL_FLUSH_BUFFERS: - MBEDTLS_SSL_DEBUG_MSG( 2, ( "handshake: done" ) ); - ssl->state = MBEDTLS_SSL_HANDSHAKE_WRAPUP; - break; - - case MBEDTLS_SSL_HANDSHAKE_WRAPUP: - mbedtls_ssl_handshake_wrapup( ssl ); - break; - - default: - MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid state %d", ssl->state ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - return( ret ); -} -#endif /* MBEDTLS_SSL_SRV_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_ticket.c b/build/premake/premake5/contrib/mbedtls/library/ssl_ticket.c deleted file mode 100644 index 0e27900b55..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_ticket.c +++ /dev/null @@ -1,489 +0,0 @@ -/* - * TLS server tickets callbacks implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_TICKET_C) - -#include "mbedtls/ssl_ticket.h" - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Initialze context - */ -void mbedtls_ssl_ticket_init( mbedtls_ssl_ticket_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_ssl_ticket_context ) ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &ctx->mutex ); -#endif -} - -#define MAX_KEY_BYTES 32 /* 256 bits */ - -/* - * Generate/update a key - */ -static int ssl_ticket_gen_key( mbedtls_ssl_ticket_context *ctx, - unsigned char index ) -{ - int ret; - unsigned char buf[MAX_KEY_BYTES]; - mbedtls_ssl_ticket_key *key = ctx->keys + index; - -#if defined(MBEDTLS_HAVE_TIME) - key->generation_time = (uint32_t) time( NULL ); -#endif - - if( ( ret = ctx->f_rng( ctx->p_rng, key->name, sizeof( key->name ) ) ) != 0 ) - return( ret ); - - if( ( ret = ctx->f_rng( ctx->p_rng, buf, sizeof( buf ) ) ) != 0 ) - return( ret ); - - /* With GCM and CCM, same context can encrypt & decrypt */ - ret = mbedtls_cipher_setkey( &key->ctx, buf, - mbedtls_cipher_get_key_bitlen( &key->ctx ), - MBEDTLS_ENCRYPT ); - - mbedtls_zeroize( buf, sizeof( buf ) ); - - return( ret ); -} - -/* - * Rotate/generate keys if necessary - */ -static int ssl_ticket_update_keys( mbedtls_ssl_ticket_context *ctx ) -{ -#if !defined(MBEDTLS_HAVE_TIME) - ((void) ctx); -#else - if( ctx->ticket_lifetime != 0 ) - { - uint32_t current_time = (uint32_t) time( NULL ); - uint32_t key_time = ctx->keys[ctx->active].generation_time; - - if( current_time > key_time && - current_time - key_time < ctx->ticket_lifetime ) - { - return( 0 ); - } - - ctx->active = 1 - ctx->active; - - return( ssl_ticket_gen_key( ctx, ctx->active ) ); - } - else -#endif /* MBEDTLS_HAVE_TIME */ - return( 0 ); -} - -/* - * Setup context for actual use - */ -int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, - mbedtls_cipher_type_t cipher, - uint32_t lifetime ) -{ - int ret; - const mbedtls_cipher_info_t *cipher_info; - - ctx->f_rng = f_rng; - ctx->p_rng = p_rng; - - ctx->ticket_lifetime = lifetime; - - cipher_info = mbedtls_cipher_info_from_type( cipher); - if( cipher_info == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( cipher_info->mode != MBEDTLS_MODE_GCM && - cipher_info->mode != MBEDTLS_MODE_CCM ) - { - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - if( cipher_info->key_bitlen > 8 * MAX_KEY_BYTES ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_cipher_setup( &ctx->keys[0].ctx, cipher_info ) ) != 0 || - ( ret = mbedtls_cipher_setup( &ctx->keys[1].ctx, cipher_info ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = ssl_ticket_gen_key( ctx, 0 ) ) != 0 || - ( ret = ssl_ticket_gen_key( ctx, 1 ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} - -/* - * Serialize a session in the following format: - * 0 . n-1 session structure, n = sizeof(mbedtls_ssl_session) - * n . n+2 peer_cert length = m (0 if no certificate) - * n+3 . n+2+m peer cert ASN.1 - */ -static int ssl_save_session( const mbedtls_ssl_session *session, - unsigned char *buf, size_t buf_len, - size_t *olen ) -{ - unsigned char *p = buf; - size_t left = buf_len; -#if defined(MBEDTLS_X509_CRT_PARSE_C) - size_t cert_len; -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - if( left < sizeof( mbedtls_ssl_session ) ) - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - - memcpy( p, session, sizeof( mbedtls_ssl_session ) ); - p += sizeof( mbedtls_ssl_session ); - left -= sizeof( mbedtls_ssl_session ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( session->peer_cert == NULL ) - cert_len = 0; - else - cert_len = session->peer_cert->raw.len; - - if( left < 3 + cert_len ) - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - - *p++ = (unsigned char)( cert_len >> 16 & 0xFF ); - *p++ = (unsigned char)( cert_len >> 8 & 0xFF ); - *p++ = (unsigned char)( cert_len & 0xFF ); - - if( session->peer_cert != NULL ) - memcpy( p, session->peer_cert->raw.p, cert_len ); - - p += cert_len; -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - *olen = p - buf; - - return( 0 ); -} - -/* - * Unserialise session, see ssl_save_session() - */ -static int ssl_load_session( mbedtls_ssl_session *session, - const unsigned char *buf, size_t len ) -{ - const unsigned char *p = buf; - const unsigned char * const end = buf + len; -#if defined(MBEDTLS_X509_CRT_PARSE_C) - size_t cert_len; -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - if( p + sizeof( mbedtls_ssl_session ) > end ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - memcpy( session, p, sizeof( mbedtls_ssl_session ) ); - p += sizeof( mbedtls_ssl_session ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( p + 3 > end ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - cert_len = ( p[0] << 16 ) | ( p[1] << 8 ) | p[2]; - p += 3; - - if( cert_len == 0 ) - { - session->peer_cert = NULL; - } - else - { - int ret; - - if( p + cert_len > end ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - session->peer_cert = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ); - - if( session->peer_cert == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - mbedtls_x509_crt_init( session->peer_cert ); - - if( ( ret = mbedtls_x509_crt_parse_der( session->peer_cert, - p, cert_len ) ) != 0 ) - { - mbedtls_x509_crt_free( session->peer_cert ); - mbedtls_free( session->peer_cert ); - session->peer_cert = NULL; - return( ret ); - } - - p += cert_len; - } -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - if( p != end ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - return( 0 ); -} - -/* - * Create session ticket, with the following structure: - * - * struct { - * opaque key_name[4]; - * opaque iv[12]; - * opaque encrypted_state<0..2^16-1>; - * opaque tag[16]; - * } ticket; - * - * The key_name, iv, and length of encrypted_state are the additional - * authenticated data. - */ -int mbedtls_ssl_ticket_write( void *p_ticket, - const mbedtls_ssl_session *session, - unsigned char *start, - const unsigned char *end, - size_t *tlen, - uint32_t *ticket_lifetime ) -{ - int ret; - mbedtls_ssl_ticket_context *ctx = p_ticket; - mbedtls_ssl_ticket_key *key; - unsigned char *key_name = start; - unsigned char *iv = start + 4; - unsigned char *state_len_bytes = iv + 12; - unsigned char *state = state_len_bytes + 2; - unsigned char *tag; - size_t clear_len, ciph_len; - - *tlen = 0; - - if( ctx == NULL || ctx->f_rng == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - /* We need at least 4 bytes for key_name, 12 for IV, 2 for len 16 for tag, - * in addition to session itself, that will be checked when writing it. */ - if( end - start < 4 + 12 + 2 + 16 ) - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - if( ( ret = ssl_ticket_update_keys( ctx ) ) != 0 ) - goto cleanup; - - key = &ctx->keys[ctx->active]; - - *ticket_lifetime = ctx->ticket_lifetime; - - memcpy( key_name, key->name, 4 ); - - if( ( ret = ctx->f_rng( ctx->p_rng, iv, 12 ) ) != 0 ) - goto cleanup; - - /* Dump session state */ - if( ( ret = ssl_save_session( session, - state, end - state, &clear_len ) ) != 0 || - (unsigned long) clear_len > 65535 ) - { - goto cleanup; - } - state_len_bytes[0] = ( clear_len >> 8 ) & 0xff; - state_len_bytes[1] = ( clear_len ) & 0xff; - - /* Encrypt and authenticate */ - tag = state + clear_len; - if( ( ret = mbedtls_cipher_auth_encrypt( &key->ctx, - iv, 12, key_name, 4 + 12 + 2, - state, clear_len, state, &ciph_len, tag, 16 ) ) != 0 ) - { - goto cleanup; - } - if( ciph_len != clear_len ) - { - ret = MBEDTLS_ERR_SSL_INTERNAL_ERROR; - goto cleanup; - } - - *tlen = 4 + 12 + 2 + 16 + ciph_len; - -cleanup: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -/* - * Select key based on name - */ -static mbedtls_ssl_ticket_key *ssl_ticket_select_key( - mbedtls_ssl_ticket_context *ctx, - const unsigned char name[4] ) -{ - unsigned char i; - - for( i = 0; i < sizeof( ctx->keys ) / sizeof( *ctx->keys ); i++ ) - if( memcmp( name, ctx->keys[i].name, 4 ) == 0 ) - return( &ctx->keys[i] ); - - return( NULL ); -} - -/* - * Load session ticket (see mbedtls_ssl_ticket_write for structure) - */ -int mbedtls_ssl_ticket_parse( void *p_ticket, - mbedtls_ssl_session *session, - unsigned char *buf, - size_t len ) -{ - int ret; - mbedtls_ssl_ticket_context *ctx = p_ticket; - mbedtls_ssl_ticket_key *key; - unsigned char *key_name = buf; - unsigned char *iv = buf + 4; - unsigned char *enc_len_p = iv + 12; - unsigned char *ticket = enc_len_p + 2; - unsigned char *tag; - size_t enc_len, clear_len; - - if( ctx == NULL || ctx->f_rng == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - /* See mbedtls_ssl_ticket_write() */ - if( len < 4 + 12 + 2 + 16 ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_THREADING_C) - if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) - return( ret ); -#endif - - if( ( ret = ssl_ticket_update_keys( ctx ) ) != 0 ) - goto cleanup; - - enc_len = ( enc_len_p[0] << 8 ) | enc_len_p[1]; - tag = ticket + enc_len; - - if( len != 4 + 12 + 2 + enc_len + 16 ) - { - ret = MBEDTLS_ERR_SSL_BAD_INPUT_DATA; - goto cleanup; - } - - /* Select key */ - if( ( key = ssl_ticket_select_key( ctx, key_name ) ) == NULL ) - { - /* We can't know for sure but this is a likely option unless we're - * under attack - this is only informative anyway */ - ret = MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED; - goto cleanup; - } - - /* Decrypt and authenticate */ - if( ( ret = mbedtls_cipher_auth_decrypt( &key->ctx, iv, 12, - key_name, 4 + 12 + 2, ticket, enc_len, - ticket, &clear_len, tag, 16 ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_CIPHER_AUTH_FAILED ) - ret = MBEDTLS_ERR_SSL_INVALID_MAC; - - goto cleanup; - } - if( clear_len != enc_len ) - { - ret = MBEDTLS_ERR_SSL_INTERNAL_ERROR; - goto cleanup; - } - - /* Actually load session */ - if( ( ret = ssl_load_session( session, ticket, clear_len ) ) != 0 ) - goto cleanup; - -#if defined(MBEDTLS_HAVE_TIME) - { - /* Check for expiration */ - time_t current_time = time( NULL ); - - if( current_time < session->start || - (uint32_t)( current_time - session->start ) > ctx->ticket_lifetime ) - { - ret = MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED; - goto cleanup; - } - } -#endif - -cleanup: -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} - -/* - * Free context - */ -void mbedtls_ssl_ticket_free( mbedtls_ssl_ticket_context *ctx ) -{ - mbedtls_cipher_free( &ctx->keys[0].ctx ); - mbedtls_cipher_free( &ctx->keys[1].ctx ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &ctx->mutex ); -#endif - - mbedtls_zeroize( ctx, sizeof( mbedtls_ssl_ticket_context ) ); -} - -#endif /* MBEDTLS_SSL_TICKET_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/ssl_tls.c b/build/premake/premake5/contrib/mbedtls/library/ssl_tls.c deleted file mode 100644 index 4424f56776..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/ssl_tls.c +++ /dev/null @@ -1,7602 +0,0 @@ -/* - * SSLv3/TLSv1 shared functions - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The SSL 3.0 specification was drafted by Netscape in 1996, - * and became an IETF standard in 1999. - * - * http://wp.netscape.com/eng/ssl3/ - * http://www.ietf.org/rfc/rfc2246.txt - * http://www.ietf.org/rfc/rfc4346.txt - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SSL_TLS_C) - -#include "mbedtls/debug.h" -#include "mbedtls/ssl.h" -#include "mbedtls/ssl_internal.h" - -#include - -#if defined(MBEDTLS_X509_CRT_PARSE_C) && \ - defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) -#include "mbedtls/oid.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* Length of the "epoch" field in the record header */ -static inline size_t ssl_ep_len( const mbedtls_ssl_context *ssl ) -{ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - return( 2 ); -#else - ((void) ssl); -#endif - return( 0 ); -} - -/* - * Start a timer. - * Passing millisecs = 0 cancels a running timer. - */ -static void ssl_set_timer( mbedtls_ssl_context *ssl, uint32_t millisecs ) -{ - if( ssl->f_set_timer == NULL ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "set_timer to %d ms", (int) millisecs ) ); - ssl->f_set_timer( ssl->p_timer, millisecs / 4, millisecs ); -} - -/* - * Return -1 is timer is expired, 0 if it isn't. - */ -static int ssl_check_timer( mbedtls_ssl_context *ssl ) -{ - if( ssl->f_get_timer == NULL ) - return( 0 ); - - if( ssl->f_get_timer( ssl->p_timer ) == 2 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "timer expired" ) ); - return( -1 ); - } - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -/* - * Double the retransmit timeout value, within the allowed range, - * returning -1 if the maximum value has already been reached. - */ -static int ssl_double_retransmit_timeout( mbedtls_ssl_context *ssl ) -{ - uint32_t new_timeout; - - if( ssl->handshake->retransmit_timeout >= ssl->conf->hs_timeout_max ) - return( -1 ); - - new_timeout = 2 * ssl->handshake->retransmit_timeout; - - /* Avoid arithmetic overflow and range overflow */ - if( new_timeout < ssl->handshake->retransmit_timeout || - new_timeout > ssl->conf->hs_timeout_max ) - { - new_timeout = ssl->conf->hs_timeout_max; - } - - ssl->handshake->retransmit_timeout = new_timeout; - MBEDTLS_SSL_DEBUG_MSG( 3, ( "update timeout value to %d millisecs", - ssl->handshake->retransmit_timeout ) ); - - return( 0 ); -} - -static void ssl_reset_retransmit_timeout( mbedtls_ssl_context *ssl ) -{ - ssl->handshake->retransmit_timeout = ssl->conf->hs_timeout_min; - MBEDTLS_SSL_DEBUG_MSG( 3, ( "update timeout value to %d millisecs", - ssl->handshake->retransmit_timeout ) ); -} -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -/* - * Convert max_fragment_length codes to length. - * RFC 6066 says: - * enum{ - * 2^9(1), 2^10(2), 2^11(3), 2^12(4), (255) - * } MaxFragmentLength; - * and we add 0 -> extension unused - */ -static unsigned int mfl_code_to_length[MBEDTLS_SSL_MAX_FRAG_LEN_INVALID] = -{ - MBEDTLS_SSL_MAX_CONTENT_LEN, /* MBEDTLS_SSL_MAX_FRAG_LEN_NONE */ - 512, /* MBEDTLS_SSL_MAX_FRAG_LEN_512 */ - 1024, /* MBEDTLS_SSL_MAX_FRAG_LEN_1024 */ - 2048, /* MBEDTLS_SSL_MAX_FRAG_LEN_2048 */ - 4096, /* MBEDTLS_SSL_MAX_FRAG_LEN_4096 */ -}; -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_CLI_C) -static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session *src ) -{ - mbedtls_ssl_session_free( dst ); - memcpy( dst, src, sizeof( mbedtls_ssl_session ) ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( src->peer_cert != NULL ) - { - int ret; - - dst->peer_cert = mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); - if( dst->peer_cert == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - mbedtls_x509_crt_init( dst->peer_cert ); - - if( ( ret = mbedtls_x509_crt_parse_der( dst->peer_cert, src->peer_cert->raw.p, - src->peer_cert->raw.len ) ) != 0 ) - { - mbedtls_free( dst->peer_cert ); - dst->peer_cert = NULL; - return( ret ); - } - } -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) - if( src->ticket != NULL ) - { - dst->ticket = mbedtls_calloc( 1, src->ticket_len ); - if( dst->ticket == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - memcpy( dst->ticket, src->ticket, src->ticket_len ); - } -#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_CLI_C */ - - return( 0 ); -} -#endif /* MBEDTLS_SSL_CLI_C */ - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) -int (*mbedtls_ssl_hw_record_init)( mbedtls_ssl_context *ssl, - const unsigned char *key_enc, const unsigned char *key_dec, - size_t keylen, - const unsigned char *iv_enc, const unsigned char *iv_dec, - size_t ivlen, - const unsigned char *mac_enc, const unsigned char *mac_dec, - size_t maclen ) = NULL; -int (*mbedtls_ssl_hw_record_activate)( mbedtls_ssl_context *ssl, int direction) = NULL; -int (*mbedtls_ssl_hw_record_reset)( mbedtls_ssl_context *ssl ) = NULL; -int (*mbedtls_ssl_hw_record_write)( mbedtls_ssl_context *ssl ) = NULL; -int (*mbedtls_ssl_hw_record_read)( mbedtls_ssl_context *ssl ) = NULL; -int (*mbedtls_ssl_hw_record_finish)( mbedtls_ssl_context *ssl ) = NULL; -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ - -/* - * Key material generation - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) -static int ssl3_prf( const unsigned char *secret, size_t slen, - const char *label, - const unsigned char *random, size_t rlen, - unsigned char *dstbuf, size_t dlen ) -{ - size_t i; - mbedtls_md5_context md5; - mbedtls_sha1_context sha1; - unsigned char padding[16]; - unsigned char sha1sum[20]; - ((void)label); - - mbedtls_md5_init( &md5 ); - mbedtls_sha1_init( &sha1 ); - - /* - * SSLv3: - * block = - * MD5( secret + SHA1( 'A' + secret + random ) ) + - * MD5( secret + SHA1( 'BB' + secret + random ) ) + - * MD5( secret + SHA1( 'CCC' + secret + random ) ) + - * ... - */ - for( i = 0; i < dlen / 16; i++ ) - { - memset( padding, (unsigned char) ('A' + i), 1 + i ); - - mbedtls_sha1_starts( &sha1 ); - mbedtls_sha1_update( &sha1, padding, 1 + i ); - mbedtls_sha1_update( &sha1, secret, slen ); - mbedtls_sha1_update( &sha1, random, rlen ); - mbedtls_sha1_finish( &sha1, sha1sum ); - - mbedtls_md5_starts( &md5 ); - mbedtls_md5_update( &md5, secret, slen ); - mbedtls_md5_update( &md5, sha1sum, 20 ); - mbedtls_md5_finish( &md5, dstbuf + i * 16 ); - } - - mbedtls_md5_free( &md5 ); - mbedtls_sha1_free( &sha1 ); - - mbedtls_zeroize( padding, sizeof( padding ) ); - mbedtls_zeroize( sha1sum, sizeof( sha1sum ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) -static int tls1_prf( const unsigned char *secret, size_t slen, - const char *label, - const unsigned char *random, size_t rlen, - unsigned char *dstbuf, size_t dlen ) -{ - size_t nb, hs; - size_t i, j, k; - const unsigned char *S1, *S2; - unsigned char tmp[128]; - unsigned char h_i[20]; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - int ret; - - mbedtls_md_init( &md_ctx ); - - if( sizeof( tmp ) < 20 + strlen( label ) + rlen ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - hs = ( slen + 1 ) / 2; - S1 = secret; - S2 = secret + slen - hs; - - nb = strlen( label ); - memcpy( tmp + 20, label, nb ); - memcpy( tmp + 20 + nb, random, rlen ); - nb += rlen; - - /* - * First compute P_md5(secret,label+random)[0..dlen] - */ - if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_MD5 ) ) == NULL ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - - if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) - return( ret ); - - mbedtls_md_hmac_starts( &md_ctx, S1, hs ); - mbedtls_md_hmac_update( &md_ctx, tmp + 20, nb ); - mbedtls_md_hmac_finish( &md_ctx, 4 + tmp ); - - for( i = 0; i < dlen; i += 16 ) - { - mbedtls_md_hmac_reset ( &md_ctx ); - mbedtls_md_hmac_update( &md_ctx, 4 + tmp, 16 + nb ); - mbedtls_md_hmac_finish( &md_ctx, h_i ); - - mbedtls_md_hmac_reset ( &md_ctx ); - mbedtls_md_hmac_update( &md_ctx, 4 + tmp, 16 ); - mbedtls_md_hmac_finish( &md_ctx, 4 + tmp ); - - k = ( i + 16 > dlen ) ? dlen % 16 : 16; - - for( j = 0; j < k; j++ ) - dstbuf[i + j] = h_i[j]; - } - - mbedtls_md_free( &md_ctx ); - - /* - * XOR out with P_sha1(secret,label+random)[0..dlen] - */ - if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ) ) == NULL ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - - if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) - return( ret ); - - mbedtls_md_hmac_starts( &md_ctx, S2, hs ); - mbedtls_md_hmac_update( &md_ctx, tmp + 20, nb ); - mbedtls_md_hmac_finish( &md_ctx, tmp ); - - for( i = 0; i < dlen; i += 20 ) - { - mbedtls_md_hmac_reset ( &md_ctx ); - mbedtls_md_hmac_update( &md_ctx, tmp, 20 + nb ); - mbedtls_md_hmac_finish( &md_ctx, h_i ); - - mbedtls_md_hmac_reset ( &md_ctx ); - mbedtls_md_hmac_update( &md_ctx, tmp, 20 ); - mbedtls_md_hmac_finish( &md_ctx, tmp ); - - k = ( i + 20 > dlen ) ? dlen % 20 : 20; - - for( j = 0; j < k; j++ ) - dstbuf[i + j] = (unsigned char)( dstbuf[i + j] ^ h_i[j] ); - } - - mbedtls_md_free( &md_ctx ); - - mbedtls_zeroize( tmp, sizeof( tmp ) ); - mbedtls_zeroize( h_i, sizeof( h_i ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_PROTO_TLS1) || MBEDTLS_SSL_PROTO_TLS1_1 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -static int tls_prf_generic( mbedtls_md_type_t md_type, - const unsigned char *secret, size_t slen, - const char *label, - const unsigned char *random, size_t rlen, - unsigned char *dstbuf, size_t dlen ) -{ - size_t nb; - size_t i, j, k, md_len; - unsigned char tmp[128]; - unsigned char h_i[MBEDTLS_MD_MAX_SIZE]; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - int ret; - - mbedtls_md_init( &md_ctx ); - - if( ( md_info = mbedtls_md_info_from_type( md_type ) ) == NULL ) - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - - md_len = mbedtls_md_get_size( md_info ); - - if( sizeof( tmp ) < md_len + strlen( label ) + rlen ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - nb = strlen( label ); - memcpy( tmp + md_len, label, nb ); - memcpy( tmp + md_len + nb, random, rlen ); - nb += rlen; - - /* - * Compute P_(secret, label + random)[0..dlen] - */ - if ( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) - return( ret ); - - mbedtls_md_hmac_starts( &md_ctx, secret, slen ); - mbedtls_md_hmac_update( &md_ctx, tmp + md_len, nb ); - mbedtls_md_hmac_finish( &md_ctx, tmp ); - - for( i = 0; i < dlen; i += md_len ) - { - mbedtls_md_hmac_reset ( &md_ctx ); - mbedtls_md_hmac_update( &md_ctx, tmp, md_len + nb ); - mbedtls_md_hmac_finish( &md_ctx, h_i ); - - mbedtls_md_hmac_reset ( &md_ctx ); - mbedtls_md_hmac_update( &md_ctx, tmp, md_len ); - mbedtls_md_hmac_finish( &md_ctx, tmp ); - - k = ( i + md_len > dlen ) ? dlen % md_len : md_len; - - for( j = 0; j < k; j++ ) - dstbuf[i + j] = h_i[j]; - } - - mbedtls_md_free( &md_ctx ); - - mbedtls_zeroize( tmp, sizeof( tmp ) ); - mbedtls_zeroize( h_i, sizeof( h_i ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_SHA256_C) -static int tls_prf_sha256( const unsigned char *secret, size_t slen, - const char *label, - const unsigned char *random, size_t rlen, - unsigned char *dstbuf, size_t dlen ) -{ - return( tls_prf_generic( MBEDTLS_MD_SHA256, secret, slen, - label, random, rlen, dstbuf, dlen ) ); -} -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) -static int tls_prf_sha384( const unsigned char *secret, size_t slen, - const char *label, - const unsigned char *random, size_t rlen, - unsigned char *dstbuf, size_t dlen ) -{ - return( tls_prf_generic( MBEDTLS_MD_SHA384, secret, slen, - label, random, rlen, dstbuf, dlen ) ); -} -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -static void ssl_update_checksum_start( mbedtls_ssl_context *, const unsigned char *, size_t ); - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) -static void ssl_update_checksum_md5sha1( mbedtls_ssl_context *, const unsigned char *, size_t ); -#endif - -#if defined(MBEDTLS_SSL_PROTO_SSL3) -static void ssl_calc_verify_ssl( mbedtls_ssl_context *, unsigned char * ); -static void ssl_calc_finished_ssl( mbedtls_ssl_context *, unsigned char *, int ); -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) -static void ssl_calc_verify_tls( mbedtls_ssl_context *, unsigned char * ); -static void ssl_calc_finished_tls( mbedtls_ssl_context *, unsigned char *, int ); -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) -static void ssl_update_checksum_sha256( mbedtls_ssl_context *, const unsigned char *, size_t ); -static void ssl_calc_verify_tls_sha256( mbedtls_ssl_context *,unsigned char * ); -static void ssl_calc_finished_tls_sha256( mbedtls_ssl_context *,unsigned char *, int ); -#endif - -#if defined(MBEDTLS_SHA512_C) -static void ssl_update_checksum_sha384( mbedtls_ssl_context *, const unsigned char *, size_t ); -static void ssl_calc_verify_tls_sha384( mbedtls_ssl_context *, unsigned char * ); -static void ssl_calc_finished_tls_sha384( mbedtls_ssl_context *, unsigned char *, int ); -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl ) -{ - int ret = 0; - unsigned char tmp[64]; - unsigned char keyblk[256]; - unsigned char *key1; - unsigned char *key2; - unsigned char *mac_enc; - unsigned char *mac_dec; - size_t iv_copy_len; - const mbedtls_cipher_info_t *cipher_info; - const mbedtls_md_info_t *md_info; - - mbedtls_ssl_session *session = ssl->session_negotiate; - mbedtls_ssl_transform *transform = ssl->transform_negotiate; - mbedtls_ssl_handshake_params *handshake = ssl->handshake; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> derive keys" ) ); - - cipher_info = mbedtls_cipher_info_from_type( transform->ciphersuite_info->cipher ); - if( cipher_info == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "cipher info for %d not found", - transform->ciphersuite_info->cipher ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - md_info = mbedtls_md_info_from_type( transform->ciphersuite_info->mac ); - if( md_info == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "mbedtls_md info for %d not found", - transform->ciphersuite_info->mac ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - /* - * Set appropriate PRF function and other SSL / TLS / TLS1.2 functions - */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - handshake->tls_prf = ssl3_prf; - handshake->calc_verify = ssl_calc_verify_ssl; - handshake->calc_finished = ssl_calc_finished_ssl; - } - else -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( ssl->minor_ver < MBEDTLS_SSL_MINOR_VERSION_3 ) - { - handshake->tls_prf = tls1_prf; - handshake->calc_verify = ssl_calc_verify_tls; - handshake->calc_finished = ssl_calc_finished_tls; - } - else -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA512_C) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 && - transform->ciphersuite_info->mac == MBEDTLS_MD_SHA384 ) - { - handshake->tls_prf = tls_prf_sha384; - handshake->calc_verify = ssl_calc_verify_tls_sha384; - handshake->calc_finished = ssl_calc_finished_tls_sha384; - } - else -#endif -#if defined(MBEDTLS_SHA256_C) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - handshake->tls_prf = tls_prf_sha256; - handshake->calc_verify = ssl_calc_verify_tls_sha256; - handshake->calc_finished = ssl_calc_finished_tls_sha256; - } - else -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - /* - * SSLv3: - * master = - * MD5( premaster + SHA1( 'A' + premaster + randbytes ) ) + - * MD5( premaster + SHA1( 'BB' + premaster + randbytes ) ) + - * MD5( premaster + SHA1( 'CCC' + premaster + randbytes ) ) - * - * TLSv1+: - * master = PRF( premaster, "master secret", randbytes )[0..47] - */ - if( handshake->resume == 0 ) - { - MBEDTLS_SSL_DEBUG_BUF( 3, "premaster secret", handshake->premaster, - handshake->pmslen ); - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - if( ssl->handshake->extended_ms == MBEDTLS_SSL_EXTENDED_MS_ENABLED ) - { - unsigned char session_hash[48]; - size_t hash_len; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "using extended master secret" ) ); - - ssl->handshake->calc_verify( ssl, session_hash ); - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { -#if defined(MBEDTLS_SHA512_C) - if( ssl->transform_negotiate->ciphersuite_info->mac == - MBEDTLS_MD_SHA384 ) - { - hash_len = 48; - } - else -#endif - hash_len = 32; - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - hash_len = 36; - - MBEDTLS_SSL_DEBUG_BUF( 3, "session hash", session_hash, hash_len ); - - ret = handshake->tls_prf( handshake->premaster, handshake->pmslen, - "extended master secret", - session_hash, hash_len, - session->master, 48 ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "prf", ret ); - return( ret ); - } - - } - else -#endif - ret = handshake->tls_prf( handshake->premaster, handshake->pmslen, - "master secret", - handshake->randbytes, 64, - session->master, 48 ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "prf", ret ); - return( ret ); - } - - mbedtls_zeroize( handshake->premaster, sizeof(handshake->premaster) ); - } - else - MBEDTLS_SSL_DEBUG_MSG( 3, ( "no premaster (session resumed)" ) ); - - /* - * Swap the client and server random values. - */ - memcpy( tmp, handshake->randbytes, 64 ); - memcpy( handshake->randbytes, tmp + 32, 32 ); - memcpy( handshake->randbytes + 32, tmp, 32 ); - mbedtls_zeroize( tmp, sizeof( tmp ) ); - - /* - * SSLv3: - * key block = - * MD5( master + SHA1( 'A' + master + randbytes ) ) + - * MD5( master + SHA1( 'BB' + master + randbytes ) ) + - * MD5( master + SHA1( 'CCC' + master + randbytes ) ) + - * MD5( master + SHA1( 'DDDD' + master + randbytes ) ) + - * ... - * - * TLSv1: - * key block = PRF( master, "key expansion", randbytes ) - */ - ret = handshake->tls_prf( session->master, 48, "key expansion", - handshake->randbytes, 64, keyblk, 256 ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "prf", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "ciphersuite = %s", - mbedtls_ssl_get_ciphersuite_name( session->ciphersuite ) ) ); - MBEDTLS_SSL_DEBUG_BUF( 3, "master secret", session->master, 48 ); - MBEDTLS_SSL_DEBUG_BUF( 4, "random bytes", handshake->randbytes, 64 ); - MBEDTLS_SSL_DEBUG_BUF( 4, "key block", keyblk, 256 ); - - mbedtls_zeroize( handshake->randbytes, sizeof( handshake->randbytes ) ); - - /* - * Determine the appropriate key, IV and MAC length. - */ - - transform->keylen = cipher_info->key_bitlen / 8; - - if( cipher_info->mode == MBEDTLS_MODE_GCM || - cipher_info->mode == MBEDTLS_MODE_CCM ) - { - transform->maclen = 0; - - transform->ivlen = 12; - transform->fixed_ivlen = 4; - - /* Minimum length is expicit IV + tag */ - transform->minlen = transform->ivlen - transform->fixed_ivlen - + ( transform->ciphersuite_info->flags & - MBEDTLS_CIPHERSUITE_SHORT_TAG ? 8 : 16 ); - } - else - { - /* Initialize HMAC contexts */ - if( ( ret = mbedtls_md_setup( &transform->md_ctx_enc, md_info, 1 ) ) != 0 || - ( ret = mbedtls_md_setup( &transform->md_ctx_dec, md_info, 1 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_md_setup", ret ); - return( ret ); - } - - /* Get MAC length */ - transform->maclen = mbedtls_md_get_size( md_info ); - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - /* - * If HMAC is to be truncated, we shall keep the leftmost bytes, - * (rfc 6066 page 13 or rfc 2104 section 4), - * so we only need to adjust the length here. - */ - if( session->trunc_hmac == MBEDTLS_SSL_TRUNC_HMAC_ENABLED ) - transform->maclen = MBEDTLS_SSL_TRUNCATED_HMAC_LEN; -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - - /* IV length */ - transform->ivlen = cipher_info->iv_size; - - /* Minimum length */ - if( cipher_info->mode == MBEDTLS_MODE_STREAM ) - transform->minlen = transform->maclen; - else - { - /* - * GenericBlockCipher: - * 1. if EtM is in use: one block plus MAC - * otherwise: * first multiple of blocklen greater than maclen - * 2. IV except for SSL3 and TLS 1.0 - */ -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - if( session->encrypt_then_mac == MBEDTLS_SSL_ETM_ENABLED ) - { - transform->minlen = transform->maclen - + cipher_info->block_size; - } - else -#endif - { - transform->minlen = transform->maclen - + cipher_info->block_size - - transform->maclen % cipher_info->block_size; - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 || - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_1 ) - ; /* No need to adjust minlen */ - else -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_2 || - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - transform->minlen += transform->ivlen; - } - else -#endif - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - } - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "keylen: %d, minlen: %d, ivlen: %d, maclen: %d", - transform->keylen, transform->minlen, transform->ivlen, - transform->maclen ) ); - - /* - * Finally setup the cipher contexts, IVs and MAC secrets. - */ -#if defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - { - key1 = keyblk + transform->maclen * 2; - key2 = keyblk + transform->maclen * 2 + transform->keylen; - - mac_enc = keyblk; - mac_dec = keyblk + transform->maclen; - - /* - * This is not used in TLS v1.1. - */ - iv_copy_len = ( transform->fixed_ivlen ) ? - transform->fixed_ivlen : transform->ivlen; - memcpy( transform->iv_enc, key2 + transform->keylen, iv_copy_len ); - memcpy( transform->iv_dec, key2 + transform->keylen + iv_copy_len, - iv_copy_len ); - } - else -#endif /* MBEDTLS_SSL_CLI_C */ -#if defined(MBEDTLS_SSL_SRV_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - { - key1 = keyblk + transform->maclen * 2 + transform->keylen; - key2 = keyblk + transform->maclen * 2; - - mac_enc = keyblk + transform->maclen; - mac_dec = keyblk; - - /* - * This is not used in TLS v1.1. - */ - iv_copy_len = ( transform->fixed_ivlen ) ? - transform->fixed_ivlen : transform->ivlen; - memcpy( transform->iv_dec, key1 + transform->keylen, iv_copy_len ); - memcpy( transform->iv_enc, key1 + transform->keylen + iv_copy_len, - iv_copy_len ); - } - else -#endif /* MBEDTLS_SSL_SRV_C */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - if( transform->maclen > sizeof transform->mac_enc ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - memcpy( transform->mac_enc, mac_enc, transform->maclen ); - memcpy( transform->mac_dec, mac_dec, transform->maclen ); - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_1 ) - { - mbedtls_md_hmac_starts( &transform->md_ctx_enc, mac_enc, transform->maclen ); - mbedtls_md_hmac_starts( &transform->md_ctx_dec, mac_dec, transform->maclen ); - } - else -#endif - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_init != NULL ) - { - int ret = 0; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "going for mbedtls_ssl_hw_record_init()" ) ); - - if( ( ret = mbedtls_ssl_hw_record_init( ssl, key1, key2, transform->keylen, - transform->iv_enc, transform->iv_dec, - iv_copy_len, - mac_enc, mac_dec, - transform->maclen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_init", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - } -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ - -#if defined(MBEDTLS_SSL_EXPORT_KEYS) - if( ssl->conf->f_export_keys != NULL ) - { - ssl->conf->f_export_keys( ssl->conf->p_export_keys, - session->master, keyblk, - transform->maclen, transform->keylen, - iv_copy_len ); - } -#endif - - if( ( ret = mbedtls_cipher_setup( &transform->cipher_ctx_enc, - cipher_info ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_setup", ret ); - return( ret ); - } - - if( ( ret = mbedtls_cipher_setup( &transform->cipher_ctx_dec, - cipher_info ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_setup", ret ); - return( ret ); - } - - if( ( ret = mbedtls_cipher_setkey( &transform->cipher_ctx_enc, key1, - cipher_info->key_bitlen, - MBEDTLS_ENCRYPT ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_setkey", ret ); - return( ret ); - } - - if( ( ret = mbedtls_cipher_setkey( &transform->cipher_ctx_dec, key2, - cipher_info->key_bitlen, - MBEDTLS_DECRYPT ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_setkey", ret ); - return( ret ); - } - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - if( cipher_info->mode == MBEDTLS_MODE_CBC ) - { - if( ( ret = mbedtls_cipher_set_padding_mode( &transform->cipher_ctx_enc, - MBEDTLS_PADDING_NONE ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_set_padding_mode", ret ); - return( ret ); - } - - if( ( ret = mbedtls_cipher_set_padding_mode( &transform->cipher_ctx_dec, - MBEDTLS_PADDING_NONE ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_set_padding_mode", ret ); - return( ret ); - } - } -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - - mbedtls_zeroize( keyblk, sizeof( keyblk ) ); - -#if defined(MBEDTLS_ZLIB_SUPPORT) - // Initialize compression - // - if( session->compression == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - if( ssl->compress_buf == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "Allocating compression buffer" ) ); - ssl->compress_buf = mbedtls_calloc( 1, MBEDTLS_SSL_BUFFER_LEN ); - if( ssl->compress_buf == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", - MBEDTLS_SSL_BUFFER_LEN ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "Initializing zlib states" ) ); - - memset( &transform->ctx_deflate, 0, sizeof( transform->ctx_deflate ) ); - memset( &transform->ctx_inflate, 0, sizeof( transform->ctx_inflate ) ); - - if( deflateInit( &transform->ctx_deflate, - Z_DEFAULT_COMPRESSION ) != Z_OK || - inflateInit( &transform->ctx_inflate ) != Z_OK ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "Failed to initialize compression" ) ); - return( MBEDTLS_ERR_SSL_COMPRESSION_FAILED ); - } - } -#endif /* MBEDTLS_ZLIB_SUPPORT */ - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= derive keys" ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_PROTO_SSL3) -void ssl_calc_verify_ssl( mbedtls_ssl_context *ssl, unsigned char hash[36] ) -{ - mbedtls_md5_context md5; - mbedtls_sha1_context sha1; - unsigned char pad_1[48]; - unsigned char pad_2[48]; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc verify ssl" ) ); - - mbedtls_md5_init( &md5 ); - mbedtls_sha1_init( &sha1 ); - - mbedtls_md5_clone( &md5, &ssl->handshake->fin_md5 ); - mbedtls_sha1_clone( &sha1, &ssl->handshake->fin_sha1 ); - - memset( pad_1, 0x36, 48 ); - memset( pad_2, 0x5C, 48 ); - - mbedtls_md5_update( &md5, ssl->session_negotiate->master, 48 ); - mbedtls_md5_update( &md5, pad_1, 48 ); - mbedtls_md5_finish( &md5, hash ); - - mbedtls_md5_starts( &md5 ); - mbedtls_md5_update( &md5, ssl->session_negotiate->master, 48 ); - mbedtls_md5_update( &md5, pad_2, 48 ); - mbedtls_md5_update( &md5, hash, 16 ); - mbedtls_md5_finish( &md5, hash ); - - mbedtls_sha1_update( &sha1, ssl->session_negotiate->master, 48 ); - mbedtls_sha1_update( &sha1, pad_1, 40 ); - mbedtls_sha1_finish( &sha1, hash + 16 ); - - mbedtls_sha1_starts( &sha1 ); - mbedtls_sha1_update( &sha1, ssl->session_negotiate->master, 48 ); - mbedtls_sha1_update( &sha1, pad_2, 40 ); - mbedtls_sha1_update( &sha1, hash + 16, 20 ); - mbedtls_sha1_finish( &sha1, hash + 16 ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calculated verify result", hash, 36 ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc verify" ) ); - - mbedtls_md5_free( &md5 ); - mbedtls_sha1_free( &sha1 ); - - return; -} -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) -void ssl_calc_verify_tls( mbedtls_ssl_context *ssl, unsigned char hash[36] ) -{ - mbedtls_md5_context md5; - mbedtls_sha1_context sha1; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc verify tls" ) ); - - mbedtls_md5_init( &md5 ); - mbedtls_sha1_init( &sha1 ); - - mbedtls_md5_clone( &md5, &ssl->handshake->fin_md5 ); - mbedtls_sha1_clone( &sha1, &ssl->handshake->fin_sha1 ); - - mbedtls_md5_finish( &md5, hash ); - mbedtls_sha1_finish( &sha1, hash + 16 ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calculated verify result", hash, 36 ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc verify" ) ); - - mbedtls_md5_free( &md5 ); - mbedtls_sha1_free( &sha1 ); - - return; -} -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) -void ssl_calc_verify_tls_sha256( mbedtls_ssl_context *ssl, unsigned char hash[32] ) -{ - mbedtls_sha256_context sha256; - - mbedtls_sha256_init( &sha256 ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc verify sha256" ) ); - - mbedtls_sha256_clone( &sha256, &ssl->handshake->fin_sha256 ); - mbedtls_sha256_finish( &sha256, hash ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calculated verify result", hash, 32 ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc verify" ) ); - - mbedtls_sha256_free( &sha256 ); - - return; -} -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) -void ssl_calc_verify_tls_sha384( mbedtls_ssl_context *ssl, unsigned char hash[48] ) -{ - mbedtls_sha512_context sha512; - - mbedtls_sha512_init( &sha512 ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc verify sha384" ) ); - - mbedtls_sha512_clone( &sha512, &ssl->handshake->fin_sha512 ); - mbedtls_sha512_finish( &sha512, hash ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calculated verify result", hash, 48 ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc verify" ) ); - - mbedtls_sha512_free( &sha512 ); - - return; -} -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -int mbedtls_ssl_psk_derive_premaster( mbedtls_ssl_context *ssl, mbedtls_key_exchange_type_t key_ex ) -{ - unsigned char *p = ssl->handshake->premaster; - unsigned char *end = p + sizeof( ssl->handshake->premaster ); - const unsigned char *psk = ssl->conf->psk; - size_t psk_len = ssl->conf->psk_len; - - /* If the psk callback was called, use its result */ - if( ssl->handshake->psk != NULL ) - { - psk = ssl->handshake->psk; - psk_len = ssl->handshake->psk_len; - } - - /* - * PMS = struct { - * opaque other_secret<0..2^16-1>; - * opaque psk<0..2^16-1>; - * }; - * with "other_secret" depending on the particular key exchange - */ -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) - if( key_ex == MBEDTLS_KEY_EXCHANGE_PSK ) - { - if( end - p < 2 ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - *(p++) = (unsigned char)( psk_len >> 8 ); - *(p++) = (unsigned char)( psk_len ); - - if( end < p || (size_t)( end - p ) < psk_len ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - memset( p, 0, psk_len ); - p += psk_len; - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - if( key_ex == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - { - /* - * other_secret already set by the ClientKeyExchange message, - * and is 48 bytes long - */ - *p++ = 0; - *p++ = 48; - p += 48; - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - if( key_ex == MBEDTLS_KEY_EXCHANGE_DHE_PSK ) - { - int ret; - size_t len; - - /* Write length only when we know the actual value */ - if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx, - p + 2, end - ( p + 2 ), &len, - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_calc_secret", ret ); - return( ret ); - } - *(p++) = (unsigned char)( len >> 8 ); - *(p++) = (unsigned char)( len ); - p += len; - - MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: K ", &ssl->handshake->dhm_ctx.K ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - if( key_ex == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK ) - { - int ret; - size_t zlen; - - if( ( ret = mbedtls_ecdh_calc_secret( &ssl->handshake->ecdh_ctx, &zlen, - p + 2, end - ( p + 2 ), - ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ecdh_calc_secret", ret ); - return( ret ); - } - - *(p++) = (unsigned char)( zlen >> 8 ); - *(p++) = (unsigned char)( zlen ); - p += zlen; - - MBEDTLS_SSL_DEBUG_MPI( 3, "ECDH: z", &ssl->handshake->ecdh_ctx.z ); - } - else -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - /* opaque psk<0..2^16-1>; */ - if( end - p < 2 ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - *(p++) = (unsigned char)( psk_len >> 8 ); - *(p++) = (unsigned char)( psk_len ); - - if( end < p || (size_t)( end - p ) < psk_len ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - memcpy( p, psk, psk_len ); - p += psk_len; - - ssl->handshake->pmslen = p - ssl->handshake->premaster; - - return( 0 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_SSL_PROTO_SSL3) -/* - * SSLv3.0 MAC functions - */ -static void ssl_mac( mbedtls_md_context_t *md_ctx, unsigned char *secret, - unsigned char *buf, size_t len, - unsigned char *ctr, int type ) -{ - unsigned char header[11]; - unsigned char padding[48]; - int padlen; - int md_size = mbedtls_md_get_size( md_ctx->md_info ); - int md_type = mbedtls_md_get_type( md_ctx->md_info ); - - /* Only MD5 and SHA-1 supported */ - if( md_type == MBEDTLS_MD_MD5 ) - padlen = 48; - else - padlen = 40; - - memcpy( header, ctr, 8 ); - header[ 8] = (unsigned char) type; - header[ 9] = (unsigned char)( len >> 8 ); - header[10] = (unsigned char)( len ); - - memset( padding, 0x36, padlen ); - mbedtls_md_starts( md_ctx ); - mbedtls_md_update( md_ctx, secret, md_size ); - mbedtls_md_update( md_ctx, padding, padlen ); - mbedtls_md_update( md_ctx, header, 11 ); - mbedtls_md_update( md_ctx, buf, len ); - mbedtls_md_finish( md_ctx, buf + len ); - - memset( padding, 0x5C, padlen ); - mbedtls_md_starts( md_ctx ); - mbedtls_md_update( md_ctx, secret, md_size ); - mbedtls_md_update( md_ctx, padding, padlen ); - mbedtls_md_update( md_ctx, buf + len, md_size ); - mbedtls_md_finish( md_ctx, buf + len ); -} -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - -#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) || \ - ( defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_AES_C) || defined(MBEDTLS_CAMELLIA_C) ) ) -#define SSL_SOME_MODES_USE_MAC -#endif - -/* - * Encryption/decryption functions - */ -static int ssl_encrypt_buf( mbedtls_ssl_context *ssl ) -{ - mbedtls_cipher_mode_t mode; - int auth_done = 0; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> encrypt buf" ) ); - - if( ssl->session_out == NULL || ssl->transform_out == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - mode = mbedtls_cipher_get_cipher_mode( &ssl->transform_out->cipher_ctx_enc ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "before encrypt: output payload", - ssl->out_msg, ssl->out_msglen ); - - /* - * Add MAC before if needed - */ -#if defined(SSL_SOME_MODES_USE_MAC) - if( mode == MBEDTLS_MODE_STREAM || - ( mode == MBEDTLS_MODE_CBC -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - && ssl->session_out->encrypt_then_mac == MBEDTLS_SSL_ETM_DISABLED -#endif - ) ) - { -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - ssl_mac( &ssl->transform_out->md_ctx_enc, - ssl->transform_out->mac_enc, - ssl->out_msg, ssl->out_msglen, - ssl->out_ctr, ssl->out_msgtype ); - } - else -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_1 ) - { - mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, ssl->out_ctr, 8 ); - mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, ssl->out_hdr, 3 ); - mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, ssl->out_len, 2 ); - mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, - ssl->out_msg, ssl->out_msglen ); - mbedtls_md_hmac_finish( &ssl->transform_out->md_ctx_enc, - ssl->out_msg + ssl->out_msglen ); - mbedtls_md_hmac_reset( &ssl->transform_out->md_ctx_enc ); - } - else -#endif - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_BUF( 4, "computed mac", - ssl->out_msg + ssl->out_msglen, - ssl->transform_out->maclen ); - - ssl->out_msglen += ssl->transform_out->maclen; - auth_done++; - } -#endif /* AEAD not the only option */ - - /* - * Encrypt - */ -#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) - if( mode == MBEDTLS_MODE_STREAM ) - { - int ret; - size_t olen = 0; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before encrypt: msglen = %d, " - "including %d bytes of padding", - ssl->out_msglen, 0 ) ); - - if( ( ret = mbedtls_cipher_crypt( &ssl->transform_out->cipher_ctx_enc, - ssl->transform_out->iv_enc, - ssl->transform_out->ivlen, - ssl->out_msg, ssl->out_msglen, - ssl->out_msg, &olen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_crypt", ret ); - return( ret ); - } - - if( ssl->out_msglen != olen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - } - else -#endif /* MBEDTLS_ARC4_C || MBEDTLS_CIPHER_NULL_CIPHER */ -#if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) - if( mode == MBEDTLS_MODE_GCM || - mode == MBEDTLS_MODE_CCM ) - { - int ret; - size_t enc_msglen, olen; - unsigned char *enc_msg; - unsigned char add_data[13]; - unsigned char taglen = ssl->transform_out->ciphersuite_info->flags & - MBEDTLS_CIPHERSUITE_SHORT_TAG ? 8 : 16; - - memcpy( add_data, ssl->out_ctr, 8 ); - add_data[8] = ssl->out_msgtype; - mbedtls_ssl_write_version( ssl->major_ver, ssl->minor_ver, - ssl->conf->transport, add_data + 9 ); - add_data[11] = ( ssl->out_msglen >> 8 ) & 0xFF; - add_data[12] = ssl->out_msglen & 0xFF; - - MBEDTLS_SSL_DEBUG_BUF( 4, "additional data used for AEAD", - add_data, 13 ); - - /* - * Generate IV - */ -#if defined(MBEDTLS_SSL_AEAD_RANDOM_IV) - ret = ssl->conf->f_rng( ssl->conf->p_rng, - ssl->transform_out->iv_enc + ssl->transform_out->fixed_ivlen, - ssl->transform_out->ivlen - ssl->transform_out->fixed_ivlen ); - if( ret != 0 ) - return( ret ); - - memcpy( ssl->out_iv, - ssl->transform_out->iv_enc + ssl->transform_out->fixed_ivlen, - ssl->transform_out->ivlen - ssl->transform_out->fixed_ivlen ); -#else - if( ssl->transform_out->ivlen - ssl->transform_out->fixed_ivlen != 8 ) - { - /* Reminder if we ever add an AEAD mode with a different size */ - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - memcpy( ssl->transform_out->iv_enc + ssl->transform_out->fixed_ivlen, - ssl->out_ctr, 8 ); - memcpy( ssl->out_iv, ssl->out_ctr, 8 ); -#endif - - MBEDTLS_SSL_DEBUG_BUF( 4, "IV used", ssl->out_iv, - ssl->transform_out->ivlen - ssl->transform_out->fixed_ivlen ); - - /* - * Fix pointer positions and message length with added IV - */ - enc_msg = ssl->out_msg; - enc_msglen = ssl->out_msglen; - ssl->out_msglen += ssl->transform_out->ivlen - - ssl->transform_out->fixed_ivlen; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before encrypt: msglen = %d, " - "including %d bytes of padding", - ssl->out_msglen, 0 ) ); - - /* - * Encrypt and authenticate - */ - if( ( ret = mbedtls_cipher_auth_encrypt( &ssl->transform_out->cipher_ctx_enc, - ssl->transform_out->iv_enc, - ssl->transform_out->ivlen, - add_data, 13, - enc_msg, enc_msglen, - enc_msg, &olen, - enc_msg + enc_msglen, taglen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_auth_encrypt", ret ); - return( ret ); - } - - if( olen != enc_msglen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - ssl->out_msglen += taglen; - auth_done++; - - MBEDTLS_SSL_DEBUG_BUF( 4, "after encrypt: tag", enc_msg + enc_msglen, taglen ); - } - else -#endif /* MBEDTLS_GCM_C || MBEDTLS_CCM_C */ -#if defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_AES_C) || defined(MBEDTLS_CAMELLIA_C) ) - if( mode == MBEDTLS_MODE_CBC ) - { - int ret; - unsigned char *enc_msg; - size_t enc_msglen, padlen, olen = 0, i; - - padlen = ssl->transform_out->ivlen - ( ssl->out_msglen + 1 ) % - ssl->transform_out->ivlen; - if( padlen == ssl->transform_out->ivlen ) - padlen = 0; - - for( i = 0; i <= padlen; i++ ) - ssl->out_msg[ssl->out_msglen + i] = (unsigned char) padlen; - - ssl->out_msglen += padlen + 1; - - enc_msglen = ssl->out_msglen; - enc_msg = ssl->out_msg; - -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2) - /* - * Prepend per-record IV for block cipher in TLS v1.1 and up as per - * Method 1 (6.2.3.2. in RFC4346 and RFC5246) - */ - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 ) - { - /* - * Generate IV - */ - ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->transform_out->iv_enc, - ssl->transform_out->ivlen ); - if( ret != 0 ) - return( ret ); - - memcpy( ssl->out_iv, ssl->transform_out->iv_enc, - ssl->transform_out->ivlen ); - - /* - * Fix pointer positions and message length with added IV - */ - enc_msg = ssl->out_msg; - enc_msglen = ssl->out_msglen; - ssl->out_msglen += ssl->transform_out->ivlen; - } -#endif /* MBEDTLS_SSL_PROTO_TLS1_1 || MBEDTLS_SSL_PROTO_TLS1_2 */ - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before encrypt: msglen = %d, " - "including %d bytes of IV and %d bytes of padding", - ssl->out_msglen, ssl->transform_out->ivlen, - padlen + 1 ) ); - - if( ( ret = mbedtls_cipher_crypt( &ssl->transform_out->cipher_ctx_enc, - ssl->transform_out->iv_enc, - ssl->transform_out->ivlen, - enc_msg, enc_msglen, - enc_msg, &olen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_crypt", ret ); - return( ret ); - } - - if( enc_msglen != olen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) - if( ssl->minor_ver < MBEDTLS_SSL_MINOR_VERSION_2 ) - { - /* - * Save IV in SSL3 and TLS1 - */ - memcpy( ssl->transform_out->iv_enc, - ssl->transform_out->cipher_ctx_enc.iv, - ssl->transform_out->ivlen ); - } -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - if( auth_done == 0 ) - { - /* - * MAC(MAC_write_key, seq_num + - * TLSCipherText.type + - * TLSCipherText.version + - * length_of( (IV +) ENC(...) ) + - * IV + // except for TLS 1.0 - * ENC(content + padding + padding_length)); - */ - unsigned char pseudo_hdr[13]; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "using encrypt then mac" ) ); - - memcpy( pseudo_hdr + 0, ssl->out_ctr, 8 ); - memcpy( pseudo_hdr + 8, ssl->out_hdr, 3 ); - pseudo_hdr[11] = (unsigned char)( ( ssl->out_msglen >> 8 ) & 0xFF ); - pseudo_hdr[12] = (unsigned char)( ( ssl->out_msglen ) & 0xFF ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "MAC'd meta-data", pseudo_hdr, 13 ); - - mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, pseudo_hdr, 13 ); - mbedtls_md_hmac_update( &ssl->transform_out->md_ctx_enc, - ssl->out_iv, ssl->out_msglen ); - mbedtls_md_hmac_finish( &ssl->transform_out->md_ctx_enc, - ssl->out_iv + ssl->out_msglen ); - mbedtls_md_hmac_reset( &ssl->transform_out->md_ctx_enc ); - - ssl->out_msglen += ssl->transform_out->maclen; - auth_done++; - } -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - } - else -#endif /* MBEDTLS_CIPHER_MODE_CBC && - ( MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C ) */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - /* Make extra sure authentication was performed, exactly once */ - if( auth_done != 1 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= encrypt buf" ) ); - - return( 0 ); -} - -#define SSL_MAX_MAC_SIZE 48 - -static int ssl_decrypt_buf( mbedtls_ssl_context *ssl ) -{ - size_t i; - mbedtls_cipher_mode_t mode; - int auth_done = 0; -#if defined(SSL_SOME_MODES_USE_MAC) - size_t padlen = 0, correct = 1; -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> decrypt buf" ) ); - - if( ssl->session_in == NULL || ssl->transform_in == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - mode = mbedtls_cipher_get_cipher_mode( &ssl->transform_in->cipher_ctx_dec ); - - if( ssl->in_msglen < ssl->transform_in->minlen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "in_msglen (%d) < minlen (%d)", - ssl->in_msglen, ssl->transform_in->minlen ) ); - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } - -#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) - if( mode == MBEDTLS_MODE_STREAM ) - { - int ret; - size_t olen = 0; - - padlen = 0; - - if( ( ret = mbedtls_cipher_crypt( &ssl->transform_in->cipher_ctx_dec, - ssl->transform_in->iv_dec, - ssl->transform_in->ivlen, - ssl->in_msg, ssl->in_msglen, - ssl->in_msg, &olen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_crypt", ret ); - return( ret ); - } - - if( ssl->in_msglen != olen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - } - else -#endif /* MBEDTLS_ARC4_C || MBEDTLS_CIPHER_NULL_CIPHER */ -#if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) - if( mode == MBEDTLS_MODE_GCM || - mode == MBEDTLS_MODE_CCM ) - { - int ret; - size_t dec_msglen, olen; - unsigned char *dec_msg; - unsigned char *dec_msg_result; - unsigned char add_data[13]; - unsigned char taglen = ssl->transform_in->ciphersuite_info->flags & - MBEDTLS_CIPHERSUITE_SHORT_TAG ? 8 : 16; - size_t explicit_iv_len = ssl->transform_in->ivlen - - ssl->transform_in->fixed_ivlen; - - if( ssl->in_msglen < explicit_iv_len + taglen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "msglen (%d) < explicit_iv_len (%d) " - "+ taglen (%d)", ssl->in_msglen, - explicit_iv_len, taglen ) ); - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } - dec_msglen = ssl->in_msglen - explicit_iv_len - taglen; - - dec_msg = ssl->in_msg; - dec_msg_result = ssl->in_msg; - ssl->in_msglen = dec_msglen; - - memcpy( add_data, ssl->in_ctr, 8 ); - add_data[8] = ssl->in_msgtype; - mbedtls_ssl_write_version( ssl->major_ver, ssl->minor_ver, - ssl->conf->transport, add_data + 9 ); - add_data[11] = ( ssl->in_msglen >> 8 ) & 0xFF; - add_data[12] = ssl->in_msglen & 0xFF; - - MBEDTLS_SSL_DEBUG_BUF( 4, "additional data used for AEAD", - add_data, 13 ); - - memcpy( ssl->transform_in->iv_dec + ssl->transform_in->fixed_ivlen, - ssl->in_iv, - ssl->transform_in->ivlen - ssl->transform_in->fixed_ivlen ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "IV used", ssl->transform_in->iv_dec, - ssl->transform_in->ivlen ); - MBEDTLS_SSL_DEBUG_BUF( 4, "TAG used", dec_msg + dec_msglen, taglen ); - - /* - * Decrypt and authenticate - */ - if( ( ret = mbedtls_cipher_auth_decrypt( &ssl->transform_in->cipher_ctx_dec, - ssl->transform_in->iv_dec, - ssl->transform_in->ivlen, - add_data, 13, - dec_msg, dec_msglen, - dec_msg_result, &olen, - dec_msg + dec_msglen, taglen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_auth_decrypt", ret ); - - if( ret == MBEDTLS_ERR_CIPHER_AUTH_FAILED ) - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - - return( ret ); - } - auth_done++; - - if( olen != dec_msglen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - } - else -#endif /* MBEDTLS_GCM_C || MBEDTLS_CCM_C */ -#if defined(MBEDTLS_CIPHER_MODE_CBC) && \ - ( defined(MBEDTLS_AES_C) || defined(MBEDTLS_CAMELLIA_C) ) - if( mode == MBEDTLS_MODE_CBC ) - { - /* - * Decrypt and check the padding - */ - int ret; - unsigned char *dec_msg; - unsigned char *dec_msg_result; - size_t dec_msglen; - size_t minlen = 0; - size_t olen = 0; - - /* - * Check immediate ciphertext sanity - */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 ) - minlen += ssl->transform_in->ivlen; -#endif - - if( ssl->in_msglen < minlen + ssl->transform_in->ivlen || - ssl->in_msglen < minlen + ssl->transform_in->maclen + 1 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "msglen (%d) < max( ivlen(%d), maclen (%d) " - "+ 1 ) ( + expl IV )", ssl->in_msglen, - ssl->transform_in->ivlen, - ssl->transform_in->maclen ) ); - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } - - dec_msglen = ssl->in_msglen; - dec_msg = ssl->in_msg; - dec_msg_result = ssl->in_msg; - - /* - * Authenticate before decrypt if enabled - */ -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - if( ssl->session_in->encrypt_then_mac == MBEDTLS_SSL_ETM_ENABLED ) - { - unsigned char computed_mac[SSL_MAX_MAC_SIZE]; - unsigned char pseudo_hdr[13]; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "using encrypt then mac" ) ); - - dec_msglen -= ssl->transform_in->maclen; - ssl->in_msglen -= ssl->transform_in->maclen; - - memcpy( pseudo_hdr + 0, ssl->in_ctr, 8 ); - memcpy( pseudo_hdr + 8, ssl->in_hdr, 3 ); - pseudo_hdr[11] = (unsigned char)( ( ssl->in_msglen >> 8 ) & 0xFF ); - pseudo_hdr[12] = (unsigned char)( ( ssl->in_msglen ) & 0xFF ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "MAC'd meta-data", pseudo_hdr, 13 ); - - mbedtls_md_hmac_update( &ssl->transform_in->md_ctx_dec, pseudo_hdr, 13 ); - mbedtls_md_hmac_update( &ssl->transform_in->md_ctx_dec, - ssl->in_iv, ssl->in_msglen ); - mbedtls_md_hmac_finish( &ssl->transform_in->md_ctx_dec, computed_mac ); - mbedtls_md_hmac_reset( &ssl->transform_in->md_ctx_dec ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "message mac", ssl->in_iv + ssl->in_msglen, - ssl->transform_in->maclen ); - MBEDTLS_SSL_DEBUG_BUF( 4, "computed mac", computed_mac, - ssl->transform_in->maclen ); - - if( mbedtls_ssl_safer_memcmp( ssl->in_iv + ssl->in_msglen, computed_mac, - ssl->transform_in->maclen ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "message mac does not match" ) ); - - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } - auth_done++; - } -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ - - /* - * Check length sanity - */ - if( ssl->in_msglen % ssl->transform_in->ivlen != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "msglen (%d) %% ivlen (%d) != 0", - ssl->in_msglen, ssl->transform_in->ivlen ) ); - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } - -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2) - /* - * Initialize for prepended IV for block cipher in TLS v1.1 and up - */ - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 ) - { - dec_msglen -= ssl->transform_in->ivlen; - ssl->in_msglen -= ssl->transform_in->ivlen; - - for( i = 0; i < ssl->transform_in->ivlen; i++ ) - ssl->transform_in->iv_dec[i] = ssl->in_iv[i]; - } -#endif /* MBEDTLS_SSL_PROTO_TLS1_1 || MBEDTLS_SSL_PROTO_TLS1_2 */ - - if( ( ret = mbedtls_cipher_crypt( &ssl->transform_in->cipher_ctx_dec, - ssl->transform_in->iv_dec, - ssl->transform_in->ivlen, - dec_msg, dec_msglen, - dec_msg_result, &olen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_crypt", ret ); - return( ret ); - } - - if( dec_msglen != olen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) - if( ssl->minor_ver < MBEDTLS_SSL_MINOR_VERSION_2 ) - { - /* - * Save IV in SSL3 and TLS1 - */ - memcpy( ssl->transform_in->iv_dec, - ssl->transform_in->cipher_ctx_dec.iv, - ssl->transform_in->ivlen ); - } -#endif - - padlen = 1 + ssl->in_msg[ssl->in_msglen - 1]; - - if( ssl->in_msglen < ssl->transform_in->maclen + padlen && - auth_done == 0 ) - { -#if defined(MBEDTLS_SSL_DEBUG_ALL) - MBEDTLS_SSL_DEBUG_MSG( 1, ( "msglen (%d) < maclen (%d) + padlen (%d)", - ssl->in_msglen, ssl->transform_in->maclen, padlen ) ); -#endif - padlen = 0; - correct = 0; - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - if( padlen > ssl->transform_in->ivlen ) - { -#if defined(MBEDTLS_SSL_DEBUG_ALL) - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad padding length: is %d, " - "should be no more than %d", - padlen, ssl->transform_in->ivlen ) ); -#endif - correct = 0; - } - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver > MBEDTLS_SSL_MINOR_VERSION_0 ) - { - /* - * TLSv1+: always check the padding up to the first failure - * and fake check up to 256 bytes of padding - */ - size_t pad_count = 0, real_count = 1; - size_t padding_idx = ssl->in_msglen - padlen - 1; - - /* - * Padding is guaranteed to be incorrect if: - * 1. padlen >= ssl->in_msglen - * - * 2. padding_idx >= MBEDTLS_SSL_MAX_CONTENT_LEN + - * ssl->transform_in->maclen - * - * In both cases we reset padding_idx to a safe value (0) to - * prevent out-of-buffer reads. - */ - correct &= ( ssl->in_msglen >= padlen + 1 ); - correct &= ( padding_idx < MBEDTLS_SSL_MAX_CONTENT_LEN + - ssl->transform_in->maclen ); - - padding_idx *= correct; - - for( i = 1; i <= 256; i++ ) - { - real_count &= ( i <= padlen ); - pad_count += real_count * - ( ssl->in_msg[padding_idx + i] == padlen - 1 ); - } - - correct &= ( pad_count == padlen ); /* Only 1 on correct padding */ - -#if defined(MBEDTLS_SSL_DEBUG_ALL) - if( padlen > 0 && correct == 0 ) - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad padding byte detected" ) ); -#endif - padlen &= correct * 0x1FF; - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \ - MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - ssl->in_msglen -= padlen; - } - else -#endif /* MBEDTLS_CIPHER_MODE_CBC && - ( MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C ) */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_BUF( 4, "raw buffer after decryption", - ssl->in_msg, ssl->in_msglen ); - - /* - * Authenticate if not done yet. - * Compute the MAC regardless of the padding result (RFC4346, CBCTIME). - */ -#if defined(SSL_SOME_MODES_USE_MAC) - if( auth_done == 0 ) - { - unsigned char tmp[SSL_MAX_MAC_SIZE]; - - ssl->in_msglen -= ssl->transform_in->maclen; - - ssl->in_len[0] = (unsigned char)( ssl->in_msglen >> 8 ); - ssl->in_len[1] = (unsigned char)( ssl->in_msglen ); - - memcpy( tmp, ssl->in_msg + ssl->in_msglen, ssl->transform_in->maclen ); - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - ssl_mac( &ssl->transform_in->md_ctx_dec, - ssl->transform_in->mac_dec, - ssl->in_msg, ssl->in_msglen, - ssl->in_ctr, ssl->in_msgtype ); - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver > MBEDTLS_SSL_MINOR_VERSION_0 ) - { - /* - * Process MAC and always update for padlen afterwards to make - * total time independent of padlen - * - * extra_run compensates MAC check for padlen - * - * Known timing attacks: - * - Lucky Thirteen (http://www.isg.rhul.ac.uk/tls/TLStiming.pdf) - * - * We use ( ( Lx + 8 ) / 64 ) to handle 'negative Lx' values - * correctly. (We round down instead of up, so -56 is the correct - * value for our calculations instead of -55) - */ - size_t j, extra_run = 0; - extra_run = ( 13 + ssl->in_msglen + padlen + 8 ) / 64 - - ( 13 + ssl->in_msglen + 8 ) / 64; - - extra_run &= correct * 0xFF; - - mbedtls_md_hmac_update( &ssl->transform_in->md_ctx_dec, ssl->in_ctr, 8 ); - mbedtls_md_hmac_update( &ssl->transform_in->md_ctx_dec, ssl->in_hdr, 3 ); - mbedtls_md_hmac_update( &ssl->transform_in->md_ctx_dec, ssl->in_len, 2 ); - mbedtls_md_hmac_update( &ssl->transform_in->md_ctx_dec, ssl->in_msg, - ssl->in_msglen ); - mbedtls_md_hmac_finish( &ssl->transform_in->md_ctx_dec, - ssl->in_msg + ssl->in_msglen ); - /* Call mbedtls_md_process at least once due to cache attacks */ - for( j = 0; j < extra_run + 1; j++ ) - mbedtls_md_process( &ssl->transform_in->md_ctx_dec, ssl->in_msg ); - - mbedtls_md_hmac_reset( &ssl->transform_in->md_ctx_dec ); - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \ - MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - MBEDTLS_SSL_DEBUG_BUF( 4, "message mac", tmp, ssl->transform_in->maclen ); - MBEDTLS_SSL_DEBUG_BUF( 4, "computed mac", ssl->in_msg + ssl->in_msglen, - ssl->transform_in->maclen ); - - if( mbedtls_ssl_safer_memcmp( tmp, ssl->in_msg + ssl->in_msglen, - ssl->transform_in->maclen ) != 0 ) - { -#if defined(MBEDTLS_SSL_DEBUG_ALL) - MBEDTLS_SSL_DEBUG_MSG( 1, ( "message mac does not match" ) ); -#endif - correct = 0; - } - auth_done++; - - /* - * Finally check the correct flag - */ - if( correct == 0 ) - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } -#endif /* SSL_SOME_MODES_USE_MAC */ - - /* Make extra sure authentication was performed, exactly once */ - if( auth_done != 1 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - if( ssl->in_msglen == 0 ) - { - ssl->nb_zero++; - - /* - * Three or more empty messages may be a DoS attack - * (excessive CPU consumption). - */ - if( ssl->nb_zero > 3 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "received four consecutive empty " - "messages, possible DoS attack" ) ); - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } - } - else - ssl->nb_zero = 0; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - ; /* in_ctr read from peer, not maintained internally */ - } - else -#endif - { - for( i = 8; i > ssl_ep_len( ssl ); i-- ) - if( ++ssl->in_ctr[i - 1] != 0 ) - break; - - /* The loop goes to its end iff the counter is wrapping */ - if( i == ssl_ep_len( ssl ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "incoming message counter would wrap" ) ); - return( MBEDTLS_ERR_SSL_COUNTER_WRAPPING ); - } - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= decrypt buf" ) ); - - return( 0 ); -} - -#undef MAC_NONE -#undef MAC_PLAINTEXT -#undef MAC_CIPHERTEXT - -#if defined(MBEDTLS_ZLIB_SUPPORT) -/* - * Compression/decompression functions - */ -static int ssl_compress_buf( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *msg_post = ssl->out_msg; - size_t len_pre = ssl->out_msglen; - unsigned char *msg_pre = ssl->compress_buf; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> compress buf" ) ); - - if( len_pre == 0 ) - return( 0 ); - - memcpy( msg_pre, ssl->out_msg, len_pre ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before compression: msglen = %d, ", - ssl->out_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "before compression: output payload", - ssl->out_msg, ssl->out_msglen ); - - ssl->transform_out->ctx_deflate.next_in = msg_pre; - ssl->transform_out->ctx_deflate.avail_in = len_pre; - ssl->transform_out->ctx_deflate.next_out = msg_post; - ssl->transform_out->ctx_deflate.avail_out = MBEDTLS_SSL_BUFFER_LEN; - - ret = deflate( &ssl->transform_out->ctx_deflate, Z_SYNC_FLUSH ); - if( ret != Z_OK ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "failed to perform compression (%d)", ret ) ); - return( MBEDTLS_ERR_SSL_COMPRESSION_FAILED ); - } - - ssl->out_msglen = MBEDTLS_SSL_BUFFER_LEN - - ssl->transform_out->ctx_deflate.avail_out; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "after compression: msglen = %d, ", - ssl->out_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "after compression: output payload", - ssl->out_msg, ssl->out_msglen ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= compress buf" ) ); - - return( 0 ); -} - -static int ssl_decompress_buf( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *msg_post = ssl->in_msg; - size_t len_pre = ssl->in_msglen; - unsigned char *msg_pre = ssl->compress_buf; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> decompress buf" ) ); - - if( len_pre == 0 ) - return( 0 ); - - memcpy( msg_pre, ssl->in_msg, len_pre ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before decompression: msglen = %d, ", - ssl->in_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "before decompression: input payload", - ssl->in_msg, ssl->in_msglen ); - - ssl->transform_in->ctx_inflate.next_in = msg_pre; - ssl->transform_in->ctx_inflate.avail_in = len_pre; - ssl->transform_in->ctx_inflate.next_out = msg_post; - ssl->transform_in->ctx_inflate.avail_out = MBEDTLS_SSL_MAX_CONTENT_LEN; - - ret = inflate( &ssl->transform_in->ctx_inflate, Z_SYNC_FLUSH ); - if( ret != Z_OK ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "failed to perform decompression (%d)", ret ) ); - return( MBEDTLS_ERR_SSL_COMPRESSION_FAILED ); - } - - ssl->in_msglen = MBEDTLS_SSL_MAX_CONTENT_LEN - - ssl->transform_in->ctx_inflate.avail_out; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "after decompression: msglen = %d, ", - ssl->in_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "after decompression: input payload", - ssl->in_msg, ssl->in_msglen ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= decompress buf" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_ZLIB_SUPPORT */ - -#if defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_SSL_RENEGOTIATION) -static int ssl_write_hello_request( mbedtls_ssl_context *ssl ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -static int ssl_resend_hello_request( mbedtls_ssl_context *ssl ) -{ - /* If renegotiation is not enforced, retransmit until we would reach max - * timeout if we were using the usual handshake doubling scheme */ - if( ssl->conf->renego_max_records < 0 ) - { - uint32_t ratio = ssl->conf->hs_timeout_max / ssl->conf->hs_timeout_min + 1; - unsigned char doublings = 1; - - while( ratio != 0 ) - { - ++doublings; - ratio >>= 1; - } - - if( ++ssl->renego_records_seen > doublings ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "no longer retransmitting hello request" ) ); - return( 0 ); - } - } - - return( ssl_write_hello_request( ssl ) ); -} -#endif -#endif /* MBEDTLS_SSL_SRV_C && MBEDTLS_SSL_RENEGOTIATION */ - -/* - * Fill the input message buffer by appending data to it. - * The amount of data already fetched is in ssl->in_left. - * - * If we return 0, is it guaranteed that (at least) nb_want bytes are - * available (from this read and/or a previous one). Otherwise, an error code - * is returned (possibly EOF or WANT_READ). - * - * With stream transport (TLS) on success ssl->in_left == nb_want, but - * with datagram transport (DTLS) on success ssl->in_left >= nb_want, - * since we always read a whole datagram at once. - * - * For DTLS, it is up to the caller to set ssl->next_record_offset when - * they're done reading a record. - */ -int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want ) -{ - int ret; - size_t len; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> fetch input" ) ); - - if( ssl->f_recv == NULL && ssl->f_recv_timeout == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "Bad usage of mbedtls_ssl_set_bio() " - "or mbedtls_ssl_set_bio()" ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - if( nb_want > MBEDTLS_SSL_BUFFER_LEN - (size_t)( ssl->in_hdr - ssl->in_buf ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "requesting more data than fits" ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - uint32_t timeout; - - /* Just to be sure */ - if( ssl->f_set_timer == NULL || ssl->f_get_timer == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "You must use " - "mbedtls_ssl_set_timer_cb() for DTLS" ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - /* - * The point is, we need to always read a full datagram at once, so we - * sometimes read more then requested, and handle the additional data. - * It could be the rest of the current record (while fetching the - * header) and/or some other records in the same datagram. - */ - - /* - * Move to the next record in the already read datagram if applicable - */ - if( ssl->next_record_offset != 0 ) - { - if( ssl->in_left < ssl->next_record_offset ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - ssl->in_left -= ssl->next_record_offset; - - if( ssl->in_left != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "next record in same datagram, offset: %d", - ssl->next_record_offset ) ); - memmove( ssl->in_hdr, - ssl->in_hdr + ssl->next_record_offset, - ssl->in_left ); - } - - ssl->next_record_offset = 0; - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "in_left: %d, nb_want: %d", - ssl->in_left, nb_want ) ); - - /* - * Done if we already have enough data. - */ - if( nb_want <= ssl->in_left) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= fetch input" ) ); - return( 0 ); - } - - /* - * A record can't be split accross datagrams. If we need to read but - * are not at the beginning of a new record, the caller did something - * wrong. - */ - if( ssl->in_left != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - /* - * Don't even try to read if time's out already. - * This avoids by-passing the timer when repeatedly receiving messages - * that will end up being dropped. - */ - if( ssl_check_timer( ssl ) != 0 ) - ret = MBEDTLS_ERR_SSL_TIMEOUT; - else - { - len = MBEDTLS_SSL_BUFFER_LEN - ( ssl->in_hdr - ssl->in_buf ); - - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - timeout = ssl->handshake->retransmit_timeout; - else - timeout = ssl->conf->read_timeout; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "f_recv_timeout: %u ms", timeout ) ); - - if( ssl->f_recv_timeout != NULL ) - ret = ssl->f_recv_timeout( ssl->p_bio, ssl->in_hdr, len, - timeout ); - else - ret = ssl->f_recv( ssl->p_bio, ssl->in_hdr, len ); - - MBEDTLS_SSL_DEBUG_RET( 2, "ssl->f_recv(_timeout)", ret ); - - if( ret == 0 ) - return( MBEDTLS_ERR_SSL_CONN_EOF ); - } - - if( ret == MBEDTLS_ERR_SSL_TIMEOUT ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "timeout" ) ); - ssl_set_timer( ssl, 0 ); - - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - { - if( ssl_double_retransmit_timeout( ssl ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "handshake timeout" ) ); - return( MBEDTLS_ERR_SSL_TIMEOUT ); - } - - if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_resend", ret ); - return( ret ); - } - - return( MBEDTLS_ERR_SSL_WANT_READ ); - } -#if defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_SSL_RENEGOTIATION) - else if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_PENDING ) - { - if( ( ret = ssl_resend_hello_request( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_resend_hello_request", ret ); - return( ret ); - } - - return( MBEDTLS_ERR_SSL_WANT_READ ); - } -#endif /* MBEDTLS_SSL_SRV_C && MBEDTLS_SSL_RENEGOTIATION */ - } - - if( ret < 0 ) - return( ret ); - - ssl->in_left = ret; - } - else -#endif - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "in_left: %d, nb_want: %d", - ssl->in_left, nb_want ) ); - - while( ssl->in_left < nb_want ) - { - len = nb_want - ssl->in_left; - - if( ssl_check_timer( ssl ) != 0 ) - ret = MBEDTLS_ERR_SSL_TIMEOUT; - else - { - if( ssl->f_recv_timeout != NULL ) - { - ret = ssl->f_recv_timeout( ssl->p_bio, - ssl->in_hdr + ssl->in_left, len, - ssl->conf->read_timeout ); - } - else - { - ret = ssl->f_recv( ssl->p_bio, - ssl->in_hdr + ssl->in_left, len ); - } - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "in_left: %d, nb_want: %d", - ssl->in_left, nb_want ) ); - MBEDTLS_SSL_DEBUG_RET( 2, "ssl->f_recv(_timeout)", ret ); - - if( ret == 0 ) - return( MBEDTLS_ERR_SSL_CONN_EOF ); - - if( ret < 0 ) - return( ret ); - - ssl->in_left += ret; - } - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= fetch input" ) ); - - return( 0 ); -} - -/* - * Flush any data not yet written - */ -int mbedtls_ssl_flush_output( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *buf, i; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> flush output" ) ); - - if( ssl->f_send == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "Bad usage of mbedtls_ssl_set_bio() " - "or mbedtls_ssl_set_bio()" ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - /* Avoid incrementing counter if data is flushed */ - if( ssl->out_left == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= flush output" ) ); - return( 0 ); - } - - while( ssl->out_left > 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "message length: %d, out_left: %d", - mbedtls_ssl_hdr_len( ssl ) + ssl->out_msglen, ssl->out_left ) ); - - buf = ssl->out_hdr + mbedtls_ssl_hdr_len( ssl ) + - ssl->out_msglen - ssl->out_left; - ret = ssl->f_send( ssl->p_bio, buf, ssl->out_left ); - - MBEDTLS_SSL_DEBUG_RET( 2, "ssl->f_send", ret ); - - if( ret <= 0 ) - return( ret ); - - ssl->out_left -= ret; - } - - for( i = 8; i > ssl_ep_len( ssl ); i-- ) - if( ++ssl->out_ctr[i - 1] != 0 ) - break; - - /* The loop goes to its end iff the counter is wrapping */ - if( i == ssl_ep_len( ssl ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "outgoing message counter would wrap" ) ); - return( MBEDTLS_ERR_SSL_COUNTER_WRAPPING ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= flush output" ) ); - - return( 0 ); -} - -/* - * Functions to handle the DTLS retransmission state machine - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) -/* - * Append current handshake message to current outgoing flight - */ -static int ssl_flight_append( mbedtls_ssl_context *ssl ) -{ - mbedtls_ssl_flight_item *msg; - - /* Allocate space for current message */ - if( ( msg = mbedtls_calloc( 1, sizeof( mbedtls_ssl_flight_item ) ) ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc %d bytes failed", - sizeof( mbedtls_ssl_flight_item ) ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - if( ( msg->p = mbedtls_calloc( 1, ssl->out_msglen ) ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc %d bytes failed", ssl->out_msglen ) ); - mbedtls_free( msg ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - /* Copy current handshake message with headers */ - memcpy( msg->p, ssl->out_msg, ssl->out_msglen ); - msg->len = ssl->out_msglen; - msg->type = ssl->out_msgtype; - msg->next = NULL; - - /* Append to the current flight */ - if( ssl->handshake->flight == NULL ) - ssl->handshake->flight = msg; - else - { - mbedtls_ssl_flight_item *cur = ssl->handshake->flight; - while( cur->next != NULL ) - cur = cur->next; - cur->next = msg; - } - - return( 0 ); -} - -/* - * Free the current flight of handshake messages - */ -static void ssl_flight_free( mbedtls_ssl_flight_item *flight ) -{ - mbedtls_ssl_flight_item *cur = flight; - mbedtls_ssl_flight_item *next; - - while( cur != NULL ) - { - next = cur->next; - - mbedtls_free( cur->p ); - mbedtls_free( cur ); - - cur = next; - } -} - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -static void ssl_dtls_replay_reset( mbedtls_ssl_context *ssl ); -#endif - -/* - * Swap transform_out and out_ctr with the alternative ones - */ -static void ssl_swap_epochs( mbedtls_ssl_context *ssl ) -{ - mbedtls_ssl_transform *tmp_transform; - unsigned char tmp_out_ctr[8]; - - if( ssl->transform_out == ssl->handshake->alt_transform_out ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "skip swap epochs" ) ); - return; - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "swap epochs" ) ); - - /* Swap transforms */ - tmp_transform = ssl->transform_out; - ssl->transform_out = ssl->handshake->alt_transform_out; - ssl->handshake->alt_transform_out = tmp_transform; - - /* Swap epoch + sequence_number */ - memcpy( tmp_out_ctr, ssl->out_ctr, 8 ); - memcpy( ssl->out_ctr, ssl->handshake->alt_out_ctr, 8 ); - memcpy( ssl->handshake->alt_out_ctr, tmp_out_ctr, 8 ); - - /* Adjust to the newly activated transform */ - if( ssl->transform_out != NULL && - ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 ) - { - ssl->out_msg = ssl->out_iv + ssl->transform_out->ivlen - - ssl->transform_out->fixed_ivlen; - } - else - ssl->out_msg = ssl->out_iv; - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_activate != NULL ) - { - if( ( ret = mbedtls_ssl_hw_record_activate( ssl, MBEDTLS_SSL_CHANNEL_OUTBOUND ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_activate", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - } -#endif -} - -/* - * Retransmit the current flight of messages. - * - * Need to remember the current message in case flush_output returns - * WANT_WRITE, causing us to exit this function and come back later. - * This function must be called until state is no longer SENDING. - */ -int mbedtls_ssl_resend( mbedtls_ssl_context *ssl ) -{ - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> mbedtls_ssl_resend" ) ); - - if( ssl->handshake->retransmit_state != MBEDTLS_SSL_RETRANS_SENDING ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialise resending" ) ); - - ssl->handshake->cur_msg = ssl->handshake->flight; - ssl_swap_epochs( ssl ); - - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_SENDING; - } - - while( ssl->handshake->cur_msg != NULL ) - { - int ret; - mbedtls_ssl_flight_item *cur = ssl->handshake->cur_msg; - - /* Swap epochs before sending Finished: we can't do it after - * sending ChangeCipherSpec, in case write returns WANT_READ. - * Must be done before copying, may change out_msg pointer */ - if( cur->type == MBEDTLS_SSL_MSG_HANDSHAKE && - cur->p[0] == MBEDTLS_SSL_HS_FINISHED ) - { - ssl_swap_epochs( ssl ); - } - - memcpy( ssl->out_msg, cur->p, cur->len ); - ssl->out_msglen = cur->len; - ssl->out_msgtype = cur->type; - - ssl->handshake->cur_msg = cur->next; - - MBEDTLS_SSL_DEBUG_BUF( 3, "resent handshake message header", ssl->out_msg, 12 ); - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - } - - if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER ) - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_FINISHED; - else - { - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_WAITING; - ssl_set_timer( ssl, ssl->handshake->retransmit_timeout ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= mbedtls_ssl_resend" ) ); - - return( 0 ); -} - -/* - * To be called when the last message of an incoming flight is received. - */ -void mbedtls_ssl_recv_flight_completed( mbedtls_ssl_context *ssl ) -{ - /* We won't need to resend that one any more */ - ssl_flight_free( ssl->handshake->flight ); - ssl->handshake->flight = NULL; - ssl->handshake->cur_msg = NULL; - - /* The next incoming flight will start with this msg_seq */ - ssl->handshake->in_flight_start_seq = ssl->handshake->in_msg_seq; - - /* Cancel timer */ - ssl_set_timer( ssl, 0 ); - - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE && - ssl->in_msg[0] == MBEDTLS_SSL_HS_FINISHED ) - { - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_FINISHED; - } - else - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_PREPARING; -} - -/* - * To be called when the last message of an outgoing flight is send. - */ -void mbedtls_ssl_send_flight_completed( mbedtls_ssl_context *ssl ) -{ - ssl_reset_retransmit_timeout( ssl ); - ssl_set_timer( ssl, ssl->handshake->retransmit_timeout ); - - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE && - ssl->in_msg[0] == MBEDTLS_SSL_HS_FINISHED ) - { - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_FINISHED; - } - else - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_WAITING; -} -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -/* - * Record layer functions - */ - -/* - * Write current record. - * Uses ssl->out_msgtype, ssl->out_msglen and bytes at ssl->out_msg. - */ -int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl ) -{ - int ret, done = 0; - size_t len = ssl->out_msglen; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write record" ) ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake != NULL && - ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING ) - { - ; /* Skip special handshake treatment when resending */ - } - else -#endif - if( ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) - { - if( ssl->out_msg[0] != MBEDTLS_SSL_HS_HELLO_REQUEST && - ssl->handshake == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - ssl->out_msg[1] = (unsigned char)( ( len - 4 ) >> 16 ); - ssl->out_msg[2] = (unsigned char)( ( len - 4 ) >> 8 ); - ssl->out_msg[3] = (unsigned char)( ( len - 4 ) ); - - /* - * DTLS has additional fields in the Handshake layer, - * between the length field and the actual payload: - * uint16 message_seq; - * uint24 fragment_offset; - * uint24 fragment_length; - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - /* Make room for the additional DTLS fields */ - memmove( ssl->out_msg + 12, ssl->out_msg + 4, len - 4 ); - ssl->out_msglen += 8; - len += 8; - - /* Write message_seq and update it, except for HelloRequest */ - if( ssl->out_msg[0] != MBEDTLS_SSL_HS_HELLO_REQUEST ) - { - ssl->out_msg[4] = ( ssl->handshake->out_msg_seq >> 8 ) & 0xFF; - ssl->out_msg[5] = ( ssl->handshake->out_msg_seq ) & 0xFF; - ++( ssl->handshake->out_msg_seq ); - } - else - { - ssl->out_msg[4] = 0; - ssl->out_msg[5] = 0; - } - - /* We don't fragment, so frag_offset = 0 and frag_len = len */ - memset( ssl->out_msg + 6, 0x00, 3 ); - memcpy( ssl->out_msg + 9, ssl->out_msg + 1, 3 ); - } -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - if( ssl->out_msg[0] != MBEDTLS_SSL_HS_HELLO_REQUEST ) - ssl->handshake->update_checksum( ssl, ssl->out_msg, len ); - } - - /* Save handshake and CCS messages for resending */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake != NULL && - ssl->handshake->retransmit_state != MBEDTLS_SSL_RETRANS_SENDING && - ( ssl->out_msgtype == MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC || - ssl->out_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) ) - { - if( ( ret = ssl_flight_append( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_flight_append", ret ); - return( ret ); - } - } -#endif - -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->transform_out != NULL && - ssl->session_out->compression == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - if( ( ret = ssl_compress_buf( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_compress_buf", ret ); - return( ret ); - } - - len = ssl->out_msglen; - } -#endif /*MBEDTLS_ZLIB_SUPPORT */ - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_write != NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "going for mbedtls_ssl_hw_record_write()" ) ); - - ret = mbedtls_ssl_hw_record_write( ssl ); - if( ret != 0 && ret != MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_write", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - - if( ret == 0 ) - done = 1; - } -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ - if( !done ) - { - ssl->out_hdr[0] = (unsigned char) ssl->out_msgtype; - mbedtls_ssl_write_version( ssl->major_ver, ssl->minor_ver, - ssl->conf->transport, ssl->out_hdr + 1 ); - - ssl->out_len[0] = (unsigned char)( len >> 8 ); - ssl->out_len[1] = (unsigned char)( len ); - - if( ssl->transform_out != NULL ) - { - if( ( ret = ssl_encrypt_buf( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_encrypt_buf", ret ); - return( ret ); - } - - len = ssl->out_msglen; - ssl->out_len[0] = (unsigned char)( len >> 8 ); - ssl->out_len[1] = (unsigned char)( len ); - } - - ssl->out_left = mbedtls_ssl_hdr_len( ssl ) + ssl->out_msglen; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "output record: msgtype = %d, " - "version = [%d:%d], msglen = %d", - ssl->out_hdr[0], ssl->out_hdr[1], ssl->out_hdr[2], - ( ssl->out_len[0] << 8 ) | ssl->out_len[1] ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "output record sent to network", - ssl->out_hdr, mbedtls_ssl_hdr_len( ssl ) + ssl->out_msglen ); - } - - if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flush_output", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write record" ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -/* - * Mark bits in bitmask (used for DTLS HS reassembly) - */ -static void ssl_bitmask_set( unsigned char *mask, size_t offset, size_t len ) -{ - unsigned int start_bits, end_bits; - - start_bits = 8 - ( offset % 8 ); - if( start_bits != 8 ) - { - size_t first_byte_idx = offset / 8; - - /* Special case */ - if( len <= start_bits ) - { - for( ; len != 0; len-- ) - mask[first_byte_idx] |= 1 << ( start_bits - len ); - - /* Avoid potential issues with offset or len becoming invalid */ - return; - } - - offset += start_bits; /* Now offset % 8 == 0 */ - len -= start_bits; - - for( ; start_bits != 0; start_bits-- ) - mask[first_byte_idx] |= 1 << ( start_bits - 1 ); - } - - end_bits = len % 8; - if( end_bits != 0 ) - { - size_t last_byte_idx = ( offset + len ) / 8; - - len -= end_bits; /* Now len % 8 == 0 */ - - for( ; end_bits != 0; end_bits-- ) - mask[last_byte_idx] |= 1 << ( 8 - end_bits ); - } - - memset( mask + offset / 8, 0xFF, len / 8 ); -} - -/* - * Check that bitmask is full - */ -static int ssl_bitmask_check( unsigned char *mask, size_t len ) -{ - size_t i; - - for( i = 0; i < len / 8; i++ ) - if( mask[i] != 0xFF ) - return( -1 ); - - for( i = 0; i < len % 8; i++ ) - if( ( mask[len / 8] & ( 1 << ( 7 - i ) ) ) == 0 ) - return( -1 ); - - return( 0 ); -} - -/* - * Reassemble fragmented DTLS handshake messages. - * - * Use a temporary buffer for reassembly, divided in two parts: - * - the first holds the reassembled message (including handshake header), - * - the second holds a bitmask indicating which parts of the message - * (excluding headers) have been received so far. - */ -static int ssl_reassemble_dtls_handshake( mbedtls_ssl_context *ssl ) -{ - unsigned char *msg, *bitmask; - size_t frag_len, frag_off; - size_t msg_len = ssl->in_hslen - 12; /* Without headers */ - - if( ssl->handshake == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "not supported outside handshake (for now)" ) ); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); - } - - /* - * For first fragment, check size and allocate buffer - */ - if( ssl->handshake->hs_msg == NULL ) - { - size_t alloc_len; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialize reassembly, total length = %d", - msg_len ) ); - - if( ssl->in_hslen > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "handshake message too large" ) ); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); - } - - /* The bitmask needs one bit per byte of message excluding header */ - alloc_len = 12 + msg_len + msg_len / 8 + ( msg_len % 8 != 0 ); - - ssl->handshake->hs_msg = mbedtls_calloc( 1, alloc_len ); - if( ssl->handshake->hs_msg == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc failed (%d bytes)", alloc_len ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - /* Prepare final header: copy msg_type, length and message_seq, - * then add standardised fragment_offset and fragment_length */ - memcpy( ssl->handshake->hs_msg, ssl->in_msg, 6 ); - memset( ssl->handshake->hs_msg + 6, 0, 3 ); - memcpy( ssl->handshake->hs_msg + 9, - ssl->handshake->hs_msg + 1, 3 ); - } - else - { - /* Make sure msg_type and length are consistent */ - if( memcmp( ssl->handshake->hs_msg, ssl->in_msg, 4 ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "fragment header mismatch" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - } - - msg = ssl->handshake->hs_msg + 12; - bitmask = msg + msg_len; - - /* - * Check and copy current fragment - */ - frag_off = ( ssl->in_msg[6] << 16 ) | - ( ssl->in_msg[7] << 8 ) | - ssl->in_msg[8]; - frag_len = ( ssl->in_msg[9] << 16 ) | - ( ssl->in_msg[10] << 8 ) | - ssl->in_msg[11]; - - if( frag_off + frag_len > msg_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid fragment offset/len: %d + %d > %d", - frag_off, frag_len, msg_len ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - if( frag_len + 12 > ssl->in_msglen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid fragment length: %d + 12 > %d", - frag_len, ssl->in_msglen ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "adding fragment, offset = %d, length = %d", - frag_off, frag_len ) ); - - memcpy( msg + frag_off, ssl->in_msg + 12, frag_len ); - ssl_bitmask_set( bitmask, frag_off, frag_len ); - - /* - * Do we have the complete message by now? - * If yes, finalize it, else ask to read the next record. - */ - if( ssl_bitmask_check( bitmask, msg_len ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "message is not complete yet" ) ); - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "handshake message completed" ) ); - - if( frag_len + 12 < ssl->in_msglen ) - { - /* - * We'got more handshake messages in the same record. - * This case is not handled now because no know implementation does - * that and it's hard to test, so we prefer to fail cleanly for now. - */ - MBEDTLS_SSL_DEBUG_MSG( 1, ( "last fragment not alone in its record" ) ); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); - } - - if( ssl->in_left > ssl->next_record_offset ) - { - /* - * We've got more data in the buffer after the current record, - * that we don't want to overwrite. Move it before writing the - * reassembled message, and adjust in_left and next_record_offset. - */ - unsigned char *cur_remain = ssl->in_hdr + ssl->next_record_offset; - unsigned char *new_remain = ssl->in_msg + ssl->in_hslen; - size_t remain_len = ssl->in_left - ssl->next_record_offset; - - /* First compute and check new lengths */ - ssl->next_record_offset = new_remain - ssl->in_hdr; - ssl->in_left = ssl->next_record_offset + remain_len; - - if( ssl->in_left > MBEDTLS_SSL_BUFFER_LEN - - (size_t)( ssl->in_hdr - ssl->in_buf ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "reassembled message too large for buffer" ) ); - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - } - - memmove( new_remain, cur_remain, remain_len ); - } - - memcpy( ssl->in_msg, ssl->handshake->hs_msg, ssl->in_hslen ); - - mbedtls_free( ssl->handshake->hs_msg ); - ssl->handshake->hs_msg = NULL; - - MBEDTLS_SSL_DEBUG_BUF( 3, "reassembled handshake message", - ssl->in_msg, ssl->in_hslen ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -static int ssl_prepare_handshake_record( mbedtls_ssl_context *ssl ) -{ - if( ssl->in_msglen < mbedtls_ssl_hs_hdr_len( ssl ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "handshake message too short: %d", - ssl->in_msglen ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - ssl->in_hslen = mbedtls_ssl_hs_hdr_len( ssl ) + ( - ( ssl->in_msg[1] << 16 ) | - ( ssl->in_msg[2] << 8 ) | - ssl->in_msg[3] ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "handshake message: msglen =" - " %d, type = %d, hslen = %d", - ssl->in_msglen, ssl->in_msg[0], ssl->in_hslen ) ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - int ret; - unsigned int recv_msg_seq = ( ssl->in_msg[4] << 8 ) | ssl->in_msg[5]; - - /* ssl->handshake is NULL when receiving ClientHello for renego */ - if( ssl->handshake != NULL && - recv_msg_seq != ssl->handshake->in_msg_seq ) - { - /* Retransmit only on last message from previous flight, to avoid - * too many retransmissions. - * Besides, No sane server ever retransmits HelloVerifyRequest */ - if( recv_msg_seq == ssl->handshake->in_flight_start_seq - 1 && - ssl->in_msg[0] != MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "received message from last flight, " - "message_seq = %d, start_of_flight = %d", - recv_msg_seq, - ssl->handshake->in_flight_start_seq ) ); - - if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_resend", ret ); - return( ret ); - } - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "dropping out-of-sequence message: " - "message_seq = %d, expected = %d", - recv_msg_seq, - ssl->handshake->in_msg_seq ) ); - } - - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - /* Wait until message completion to increment in_msg_seq */ - - /* Reassemble if current message is fragmented or reassembly is - * already in progress */ - if( ssl->in_msglen < ssl->in_hslen || - memcmp( ssl->in_msg + 6, "\0\0\0", 3 ) != 0 || - memcmp( ssl->in_msg + 9, ssl->in_msg + 1, 3 ) != 0 || - ( ssl->handshake != NULL && ssl->handshake->hs_msg != NULL ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "found fragmented DTLS handshake message" ) ); - - if( ( ret = ssl_reassemble_dtls_handshake( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_reassemble_dtls_handshake", ret ); - return( ret ); - } - } - } - else -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - /* With TLS we don't handle fragmentation (for now) */ - if( ssl->in_msglen < ssl->in_hslen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "TLS handshake fragmentation not supported" ) ); - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); - } - - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER && - ssl->handshake != NULL ) - { - ssl->handshake->update_checksum( ssl, ssl->in_msg, ssl->in_hslen ); - } - - /* Handshake message is complete, increment counter */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake != NULL ) - { - ssl->handshake->in_msg_seq++; - } -#endif - - return( 0 ); -} - -/* - * DTLS anti-replay: RFC 6347 4.1.2.6 - * - * in_window is a field of bits numbered from 0 (lsb) to 63 (msb). - * Bit n is set iff record number in_window_top - n has been seen. - * - * Usually, in_window_top is the last record number seen and the lsb of - * in_window is set. The only exception is the initial state (record number 0 - * not seen yet). - */ -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -static void ssl_dtls_replay_reset( mbedtls_ssl_context *ssl ) -{ - ssl->in_window_top = 0; - ssl->in_window = 0; -} - -static inline uint64_t ssl_load_six_bytes( unsigned char *buf ) -{ - return( ( (uint64_t) buf[0] << 40 ) | - ( (uint64_t) buf[1] << 32 ) | - ( (uint64_t) buf[2] << 24 ) | - ( (uint64_t) buf[3] << 16 ) | - ( (uint64_t) buf[4] << 8 ) | - ( (uint64_t) buf[5] ) ); -} - -/* - * Return 0 if sequence number is acceptable, -1 otherwise - */ -int mbedtls_ssl_dtls_replay_check( mbedtls_ssl_context *ssl ) -{ - uint64_t rec_seqnum = ssl_load_six_bytes( ssl->in_ctr + 2 ); - uint64_t bit; - - if( ssl->conf->anti_replay == MBEDTLS_SSL_ANTI_REPLAY_DISABLED ) - return( 0 ); - - if( rec_seqnum > ssl->in_window_top ) - return( 0 ); - - bit = ssl->in_window_top - rec_seqnum; - - if( bit >= 64 ) - return( -1 ); - - if( ( ssl->in_window & ( (uint64_t) 1 << bit ) ) != 0 ) - return( -1 ); - - return( 0 ); -} - -/* - * Update replay window on new validated record - */ -void mbedtls_ssl_dtls_replay_update( mbedtls_ssl_context *ssl ) -{ - uint64_t rec_seqnum = ssl_load_six_bytes( ssl->in_ctr + 2 ); - - if( ssl->conf->anti_replay == MBEDTLS_SSL_ANTI_REPLAY_DISABLED ) - return; - - if( rec_seqnum > ssl->in_window_top ) - { - /* Update window_top and the contents of the window */ - uint64_t shift = rec_seqnum - ssl->in_window_top; - - if( shift >= 64 ) - ssl->in_window = 1; - else - { - ssl->in_window <<= shift; - ssl->in_window |= 1; - } - - ssl->in_window_top = rec_seqnum; - } - else - { - /* Mark that number as seen in the current window */ - uint64_t bit = ssl->in_window_top - rec_seqnum; - - if( bit < 64 ) /* Always true, but be extra sure */ - ssl->in_window |= (uint64_t) 1 << bit; - } -} -#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */ - -#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && defined(MBEDTLS_SSL_SRV_C) -/* Forward declaration */ -static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial ); - -/* - * Without any SSL context, check if a datagram looks like a ClientHello with - * a valid cookie, and if it doesn't, generate a HelloVerifyRequest message. - * Both input and output include full DTLS headers. - * - * - if cookie is valid, return 0 - * - if ClientHello looks superficially valid but cookie is not, - * fill obuf and set olen, then - * return MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED - * - otherwise return a specific error code - */ -static int ssl_check_dtls_clihlo_cookie( - mbedtls_ssl_cookie_write_t *f_cookie_write, - mbedtls_ssl_cookie_check_t *f_cookie_check, - void *p_cookie, - const unsigned char *cli_id, size_t cli_id_len, - const unsigned char *in, size_t in_len, - unsigned char *obuf, size_t buf_len, size_t *olen ) -{ - size_t sid_len, cookie_len; - unsigned char *p; - - if( f_cookie_write == NULL || f_cookie_check == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - /* - * Structure of ClientHello with record and handshake headers, - * and expected values. We don't need to check a lot, more checks will be - * done when actually parsing the ClientHello - skipping those checks - * avoids code duplication and does not make cookie forging any easier. - * - * 0-0 ContentType type; copied, must be handshake - * 1-2 ProtocolVersion version; copied - * 3-4 uint16 epoch; copied, must be 0 - * 5-10 uint48 sequence_number; copied - * 11-12 uint16 length; (ignored) - * - * 13-13 HandshakeType msg_type; (ignored) - * 14-16 uint24 length; (ignored) - * 17-18 uint16 message_seq; copied - * 19-21 uint24 fragment_offset; copied, must be 0 - * 22-24 uint24 fragment_length; (ignored) - * - * 25-26 ProtocolVersion client_version; (ignored) - * 27-58 Random random; (ignored) - * 59-xx SessionID session_id; 1 byte len + sid_len content - * 60+ opaque cookie<0..2^8-1>; 1 byte len + content - * ... - * - * Minimum length is 61 bytes. - */ - if( in_len < 61 || - in[0] != MBEDTLS_SSL_MSG_HANDSHAKE || - in[3] != 0 || in[4] != 0 || - in[19] != 0 || in[20] != 0 || in[21] != 0 ) - { - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - } - - sid_len = in[59]; - if( sid_len > in_len - 61 ) - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - - cookie_len = in[60 + sid_len]; - if( cookie_len > in_len - 60 ) - return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO ); - - if( f_cookie_check( p_cookie, in + sid_len + 61, cookie_len, - cli_id, cli_id_len ) == 0 ) - { - /* Valid cookie */ - return( 0 ); - } - - /* - * If we get here, we've got an invalid cookie, let's prepare HVR. - * - * 0-0 ContentType type; copied - * 1-2 ProtocolVersion version; copied - * 3-4 uint16 epoch; copied - * 5-10 uint48 sequence_number; copied - * 11-12 uint16 length; olen - 13 - * - * 13-13 HandshakeType msg_type; hello_verify_request - * 14-16 uint24 length; olen - 25 - * 17-18 uint16 message_seq; copied - * 19-21 uint24 fragment_offset; copied - * 22-24 uint24 fragment_length; olen - 25 - * - * 25-26 ProtocolVersion server_version; 0xfe 0xff - * 27-27 opaque cookie<0..2^8-1>; cookie_len = olen - 27, cookie - * - * Minimum length is 28. - */ - if( buf_len < 28 ) - return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); - - /* Copy most fields and adapt others */ - memcpy( obuf, in, 25 ); - obuf[13] = MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST; - obuf[25] = 0xfe; - obuf[26] = 0xff; - - /* Generate and write actual cookie */ - p = obuf + 28; - if( f_cookie_write( p_cookie, - &p, obuf + buf_len, cli_id, cli_id_len ) != 0 ) - { - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - *olen = p - obuf; - - /* Go back and fill length fields */ - obuf[27] = (unsigned char)( *olen - 28 ); - - obuf[14] = obuf[22] = (unsigned char)( ( *olen - 25 ) >> 16 ); - obuf[15] = obuf[23] = (unsigned char)( ( *olen - 25 ) >> 8 ); - obuf[16] = obuf[24] = (unsigned char)( ( *olen - 25 ) ); - - obuf[11] = (unsigned char)( ( *olen - 13 ) >> 8 ); - obuf[12] = (unsigned char)( ( *olen - 13 ) ); - - return( MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED ); -} - -/* - * Handle possible client reconnect with the same UDP quadruplet - * (RFC 6347 Section 4.2.8). - * - * Called by ssl_parse_record_header() in case we receive an epoch 0 record - * that looks like a ClientHello. - * - * - if the input looks like a ClientHello without cookies, - * send back HelloVerifyRequest, then - * return MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED - * - if the input looks like a ClientHello with a valid cookie, - * reset the session of the current context, and - * return MBEDTLS_ERR_SSL_CLIENT_RECONNECT - * - if anything goes wrong, return a specific error code - * - * mbedtls_ssl_read_record() will ignore the record if anything else than - * MBEDTLS_ERR_SSL_CLIENT_RECONNECT or 0 is returned, although this function - * cannot not return 0. - */ -static int ssl_handle_possible_reconnect( mbedtls_ssl_context *ssl ) -{ - int ret; - size_t len; - - ret = ssl_check_dtls_clihlo_cookie( - ssl->conf->f_cookie_write, - ssl->conf->f_cookie_check, - ssl->conf->p_cookie, - ssl->cli_id, ssl->cli_id_len, - ssl->in_buf, ssl->in_left, - ssl->out_buf, MBEDTLS_SSL_MAX_CONTENT_LEN, &len ); - - MBEDTLS_SSL_DEBUG_RET( 2, "ssl_check_dtls_clihlo_cookie", ret ); - - if( ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED ) - { - /* Dont check write errors as we can't do anything here. - * If the error is permanent we'll catch it later, - * if it's not, then hopefully it'll work next time. */ - (void) ssl->f_send( ssl->p_bio, ssl->out_buf, len ); - - return( MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED ); - } - - if( ret == 0 ) - { - /* Got a valid cookie, partially reset context */ - if( ( ret = ssl_session_reset_int( ssl, 1 ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "reset", ret ); - return( ret ); - } - - return( MBEDTLS_ERR_SSL_CLIENT_RECONNECT ); - } - - return( ret ); -} -#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE && MBEDTLS_SSL_SRV_C */ - -/* - * ContentType type; - * ProtocolVersion version; - * uint16 epoch; // DTLS only - * uint48 sequence_number; // DTLS only - * uint16 length; - * - * Return 0 if header looks sane (and, for DTLS, the record is expected) - * MBEDTLS_ERR_SSL_INVALID_RECORD if the header looks bad, - * MBEDTLS_ERR_SSL_UNEXPECTED_RECORD (DTLS only) if sane but unexpected. - * - * With DTLS, mbedtls_ssl_read_record() will: - * 1. proceed with the record if this function returns 0 - * 2. drop only the current record if this function returns UNEXPECTED_RECORD - * 3. return CLIENT_RECONNECT if this function return that value - * 4. drop the whole datagram if this function returns anything else. - * Point 2 is needed when the peer is resending, and we have already received - * the first record from a datagram but are still waiting for the others. - */ -static int ssl_parse_record_header( mbedtls_ssl_context *ssl ) -{ - int ret; - int major_ver, minor_ver; - - MBEDTLS_SSL_DEBUG_BUF( 4, "input record header", ssl->in_hdr, mbedtls_ssl_hdr_len( ssl ) ); - - ssl->in_msgtype = ssl->in_hdr[0]; - ssl->in_msglen = ( ssl->in_len[0] << 8 ) | ssl->in_len[1]; - mbedtls_ssl_read_version( &major_ver, &minor_ver, ssl->conf->transport, ssl->in_hdr + 1 ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "input record: msgtype = %d, " - "version = [%d:%d], msglen = %d", - ssl->in_msgtype, - major_ver, minor_ver, ssl->in_msglen ) ); - - /* Check record type */ - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE && - ssl->in_msgtype != MBEDTLS_SSL_MSG_ALERT && - ssl->in_msgtype != MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC && - ssl->in_msgtype != MBEDTLS_SSL_MSG_APPLICATION_DATA ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "unknown record type" ) ); - - if( ( ret = mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE ) ) != 0 ) - { - return( ret ); - } - - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - /* Check version */ - if( major_ver != ssl->major_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "major version mismatch" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - if( minor_ver > ssl->conf->max_minor_ver ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "minor version mismatch" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - /* Check length against the size of our buffer */ - if( ssl->in_msglen > MBEDTLS_SSL_BUFFER_LEN - - (size_t)( ssl->in_msg - ssl->in_buf ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - - /* Check length against bounds of the current transform and version */ - if( ssl->transform_in == NULL ) - { - if( ssl->in_msglen < 1 || - ssl->in_msglen > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - } - else - { - if( ssl->in_msglen < ssl->transform_in->minlen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 && - ssl->in_msglen > ssl->transform_in->minlen + MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - /* - * TLS encrypted messages can have up to 256 bytes of padding - */ - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_1 && - ssl->in_msglen > ssl->transform_in->minlen + - MBEDTLS_SSL_MAX_CONTENT_LEN + 256 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } -#endif - } - - /* - * DTLS-related tests done last, because most of them may result in - * silently dropping the record (but not the whole datagram), and we only - * want to consider that after ensuring that the "basic" fields (type, - * version, length) are sane. - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - unsigned int rec_epoch = ( ssl->in_ctr[0] << 8 ) | ssl->in_ctr[1]; - - /* Drop unexpected ChangeCipherSpec messages */ - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC && - ssl->state != MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC && - ssl->state != MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "dropping unexpected ChangeCipherSpec" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD ); - } - - /* Drop unexpected ApplicationData records, - * except at the beginning of renegotiations */ - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_APPLICATION_DATA && - ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER -#if defined(MBEDTLS_SSL_RENEGOTIATION) - && ! ( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS && - ssl->state == MBEDTLS_SSL_SERVER_HELLO ) -#endif - ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "dropping unexpected ApplicationData" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD ); - } - - /* Check epoch (and sequence number) with DTLS */ - if( rec_epoch != ssl->in_epoch ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "record from another epoch: " - "expected %d, received %d", - ssl->in_epoch, rec_epoch ) ); - -#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && defined(MBEDTLS_SSL_SRV_C) - /* - * Check for an epoch 0 ClientHello. We can't use in_msg here to - * access the first byte of record content (handshake type), as we - * have an active transform (possibly iv_len != 0), so use the - * fact that the record header len is 13 instead. - */ - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER && - rec_epoch == 0 && - ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE && - ssl->in_left > 13 && - ssl->in_buf[13] == MBEDTLS_SSL_HS_CLIENT_HELLO ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "possible client reconnect " - "from the same port" ) ); - return( ssl_handle_possible_reconnect( ssl ) ); - } - else -#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE && MBEDTLS_SSL_SRV_C */ - return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD ); - } - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - /* Replay detection only works for the current epoch */ - if( rec_epoch == ssl->in_epoch && - mbedtls_ssl_dtls_replay_check( ssl ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "replayed record" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_RECORD ); - } -#endif - } -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - return( 0 ); -} - -/* - * If applicable, decrypt (and decompress) record content - */ -static int ssl_prepare_record_content( mbedtls_ssl_context *ssl ) -{ - int ret, done = 0; - - MBEDTLS_SSL_DEBUG_BUF( 4, "input record from network", - ssl->in_hdr, mbedtls_ssl_hdr_len( ssl ) + ssl->in_msglen ); - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_read != NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "going for mbedtls_ssl_hw_record_read()" ) ); - - ret = mbedtls_ssl_hw_record_read( ssl ); - if( ret != 0 && ret != MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_read", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - - if( ret == 0 ) - done = 1; - } -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ - if( !done && ssl->transform_in != NULL ) - { - if( ( ret = ssl_decrypt_buf( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_decrypt_buf", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_BUF( 4, "input payload after decrypt", - ssl->in_msg, ssl->in_msglen ); - - if( ssl->in_msglen > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) ); - return( MBEDTLS_ERR_SSL_INVALID_RECORD ); - } - } - -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->transform_in != NULL && - ssl->session_in->compression == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - if( ( ret = ssl_decompress_buf( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_decompress_buf", ret ); - return( ret ); - } - - // TODO: what's the purpose of these lines? is in_len used? - ssl->in_len[0] = (unsigned char)( ssl->in_msglen >> 8 ); - ssl->in_len[1] = (unsigned char)( ssl->in_msglen ); - } -#endif /* MBEDTLS_ZLIB_SUPPORT */ - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - mbedtls_ssl_dtls_replay_update( ssl ); - } -#endif - - return( 0 ); -} - -static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl ); - -/* - * Read a record. - * - * Silently ignore non-fatal alert (and for DTLS, invalid records as well, - * RFC 6347 4.1.2.7) and continue reading until a valid record is found. - * - */ -int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> read record" ) ); - - if( ssl->in_hslen != 0 && ssl->in_hslen < ssl->in_msglen ) - { - /* - * Get next Handshake message in the current record - */ - ssl->in_msglen -= ssl->in_hslen; - - memmove( ssl->in_msg, ssl->in_msg + ssl->in_hslen, - ssl->in_msglen ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "remaining content in record", - ssl->in_msg, ssl->in_msglen ); - - if( ( ret = ssl_prepare_handshake_record( ssl ) ) != 0 ) - return( ret ); - - return( 0 ); - } - - ssl->in_hslen = 0; - - /* - * Read the record header and parse it - */ -read_record_header: - if( ( ret = mbedtls_ssl_fetch_input( ssl, mbedtls_ssl_hdr_len( ssl ) ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret ); - return( ret ); - } - - if( ( ret = ssl_parse_record_header( ssl ) ) != 0 ) - { -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ret != MBEDTLS_ERR_SSL_CLIENT_RECONNECT ) - { - if( ret == MBEDTLS_ERR_SSL_UNEXPECTED_RECORD ) - { - /* Skip unexpected record (but not whole datagram) */ - ssl->next_record_offset = ssl->in_msglen - + mbedtls_ssl_hdr_len( ssl ); - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "discarding unexpected record " - "(header)" ) ); - } - else - { - /* Skip invalid record and the rest of the datagram */ - ssl->next_record_offset = 0; - ssl->in_left = 0; - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "discarding invalid record " - "(header)" ) ); - } - - /* Get next record */ - goto read_record_header; - } -#endif - return( ret ); - } - - /* - * Read and optionally decrypt the message contents - */ - if( ( ret = mbedtls_ssl_fetch_input( ssl, - mbedtls_ssl_hdr_len( ssl ) + ssl->in_msglen ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret ); - return( ret ); - } - - /* Done reading this record, get ready for the next one */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - ssl->next_record_offset = ssl->in_msglen + mbedtls_ssl_hdr_len( ssl ); - else -#endif - ssl->in_left = 0; - - if( ( ret = ssl_prepare_record_content( ssl ) ) != 0 ) - { -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - /* Silently discard invalid records */ - if( ret == MBEDTLS_ERR_SSL_INVALID_RECORD || - ret == MBEDTLS_ERR_SSL_INVALID_MAC ) - { - /* Except when waiting for Finished as a bad mac here - * probably means something went wrong in the handshake - * (eg wrong psk used, mitm downgrade attempt, etc.) */ - if( ssl->state == MBEDTLS_SSL_CLIENT_FINISHED || - ssl->state == MBEDTLS_SSL_SERVER_FINISHED ) - { -#if defined(MBEDTLS_SSL_ALL_ALERT_MESSAGES) - if( ret == MBEDTLS_ERR_SSL_INVALID_MAC ) - { - mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC ); - } -#endif - return( ret ); - } - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) - if( ssl->conf->badmac_limit != 0 && - ++ssl->badmac_seen >= ssl->conf->badmac_limit ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "too many records with bad MAC" ) ); - return( MBEDTLS_ERR_SSL_INVALID_MAC ); - } -#endif - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "discarding invalid record (mac)" ) ); - goto read_record_header; - } - - return( ret ); - } - else -#endif - { - /* Error out (and send alert) on invalid records */ -#if defined(MBEDTLS_SSL_ALL_ALERT_MESSAGES) - if( ret == MBEDTLS_ERR_SSL_INVALID_MAC ) - { - mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC ); - } -#endif - return( ret ); - } - } - - /* - * When we sent the last flight of the handshake, we MUST respond to a - * retransmit of the peer's previous flight with a retransmit. (In - * practice, only the Finished message will make it, other messages - * including CCS use the old transform so they're dropped as invalid.) - * - * If the record we received is not a handshake message, however, it - * means the peer received our last flight so we can clean up - * handshake info. - * - * This check needs to be done before prepare_handshake() due to an edge - * case: if the client immediately requests renegotiation, this - * finishes the current handshake first, avoiding the new ClientHello - * being mistaken for an ancient message in the current handshake. - */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake != NULL && - ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER ) - { - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE && - ssl->in_msg[0] == MBEDTLS_SSL_HS_FINISHED ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "received retransmit of last flight" ) ); - - if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_resend", ret ); - return( ret ); - } - - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - else - { - ssl_handshake_wrapup_free_hs_transform( ssl ); - } - } -#endif - - /* - * Handle particular types of records - */ - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) - { - if( ( ret = ssl_prepare_handshake_record( ssl ) ) != 0 ) - return( ret ); - } - - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_ALERT ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "got an alert message, type: [%d:%d]", - ssl->in_msg[0], ssl->in_msg[1] ) ); - - /* - * Ignore non-fatal alerts, except close_notify and no_renegotiation - */ - if( ssl->in_msg[0] == MBEDTLS_SSL_ALERT_LEVEL_FATAL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "is a fatal alert message (msg %d)", - ssl->in_msg[1] ) ); - return( MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE ); - } - - if( ssl->in_msg[0] == MBEDTLS_SSL_ALERT_LEVEL_WARNING && - ssl->in_msg[1] == MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "is a close notify message" ) ); - return( MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY ); - } - -#if defined(MBEDTLS_SSL_RENEGOTIATION_ENABLED) - if( ssl->in_msg[0] == MBEDTLS_SSL_ALERT_LEVEL_WARNING && - ssl->in_msg[1] == MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "is a SSLv3 no_cert" ) ); - /* Will be handled when trying to parse ServerHello */ - return( 0 ); - } -#endif - -#if defined(MBEDTLS_SSL_PROTO_SSL3) && defined(MBEDTLS_SSL_SRV_C) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 && - ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->in_msg[0] == MBEDTLS_SSL_ALERT_LEVEL_WARNING && - ssl->in_msg[1] == MBEDTLS_SSL_ALERT_MSG_NO_CERT ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "is a SSLv3 no_cert" ) ); - /* Will be handled in mbedtls_ssl_parse_certificate() */ - return( 0 ); - } -#endif /* MBEDTLS_SSL_PROTO_SSL3 && MBEDTLS_SSL_SRV_C */ - - /* Silently ignore: fetch new message */ - goto read_record_header; - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= read record" ) ); - - return( 0 ); -} - -int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl ) -{ - int ret; - - if( ( ret = mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_FATAL, - MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} - -int mbedtls_ssl_send_alert_message( mbedtls_ssl_context *ssl, - unsigned char level, - unsigned char message ) -{ - int ret; - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> send alert message" ) ); - - ssl->out_msgtype = MBEDTLS_SSL_MSG_ALERT; - ssl->out_msglen = 2; - ssl->out_msg[0] = level; - ssl->out_msg[1] = message; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= send alert message" ) ); - - return( 0 ); -} - -/* - * Handshake functions - */ -#if !defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \ - !defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) -int mbedtls_ssl_write_certificate( mbedtls_ssl_context *ssl ) -{ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate" ) ); - ssl->state++; - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); -} - -int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl ) -{ - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) ); - ssl->state++; - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); -} -#else -int mbedtls_ssl_write_certificate( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - size_t i, n; - const mbedtls_x509_crt *crt; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write certificate" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate" ) ); - ssl->state++; - return( 0 ); - } - -#if defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - { - if( ssl->client_auth == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip write certificate" ) ); - ssl->state++; - return( 0 ); - } - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - /* - * If using SSLv3 and got no cert, send an Alert message - * (otherwise an empty Certificate message will be sent). - */ - if( mbedtls_ssl_own_cert( ssl ) == NULL && - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - ssl->out_msglen = 2; - ssl->out_msgtype = MBEDTLS_SSL_MSG_ALERT; - ssl->out_msg[0] = MBEDTLS_SSL_ALERT_LEVEL_WARNING; - ssl->out_msg[1] = MBEDTLS_SSL_ALERT_MSG_NO_CERT; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "got no certificate to send" ) ); - goto write_msg; - } -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - } -#endif /* MBEDTLS_SSL_CLI_C */ -#if defined(MBEDTLS_SSL_SRV_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - { - if( mbedtls_ssl_own_cert( ssl ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no certificate to send" ) ); - return( MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED ); - } - } -#endif - - MBEDTLS_SSL_DEBUG_CRT( 3, "own certificate", mbedtls_ssl_own_cert( ssl ) ); - - /* - * 0 . 0 handshake type - * 1 . 3 handshake length - * 4 . 6 length of all certs - * 7 . 9 length of cert. 1 - * 10 . n-1 peer certificate - * n . n+2 length of cert. 2 - * n+3 . ... upper level cert, etc. - */ - i = 7; - crt = mbedtls_ssl_own_cert( ssl ); - - while( crt != NULL ) - { - n = crt->raw.len; - if( n > MBEDTLS_SSL_MAX_CONTENT_LEN - 3 - i ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "certificate too large, %d > %d", - i + 3 + n, MBEDTLS_SSL_MAX_CONTENT_LEN ) ); - return( MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE ); - } - - ssl->out_msg[i ] = (unsigned char)( n >> 16 ); - ssl->out_msg[i + 1] = (unsigned char)( n >> 8 ); - ssl->out_msg[i + 2] = (unsigned char)( n ); - - i += 3; memcpy( ssl->out_msg + i, crt->raw.p, n ); - i += n; crt = crt->next; - } - - ssl->out_msg[4] = (unsigned char)( ( i - 7 ) >> 16 ); - ssl->out_msg[5] = (unsigned char)( ( i - 7 ) >> 8 ); - ssl->out_msg[6] = (unsigned char)( ( i - 7 ) ); - - ssl->out_msglen = i; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_CERTIFICATE; - -#if defined(MBEDTLS_SSL_PROTO_SSL3) && defined(MBEDTLS_SSL_CLI_C) -write_msg: -#endif - - ssl->state++; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write certificate" ) ); - - return( ret ); -} - -int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - size_t i, n; - const mbedtls_ssl_ciphersuite_t *ciphersuite_info = ssl->transform_negotiate->ciphersuite_info; - int authmode = ssl->conf->authmode; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse certificate" ) ); - - if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_DHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECDHE_PSK || - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) ); - ssl->state++; - return( 0 ); - } - -#if defined(MBEDTLS_SSL_SRV_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_RSA_PSK ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) ); - ssl->state++; - return( 0 ); - } - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - if( ssl->handshake->sni_authmode != MBEDTLS_SSL_VERIFY_UNSET ) - authmode = ssl->handshake->sni_authmode; -#endif - - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - authmode == MBEDTLS_SSL_VERIFY_NONE ) - { - ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_SKIP_VERIFY; - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= skip parse certificate" ) ); - ssl->state++; - return( 0 ); - } -#endif - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - ssl->state++; - -#if defined(MBEDTLS_SSL_SRV_C) -#if defined(MBEDTLS_SSL_PROTO_SSL3) - /* - * Check if the client sent an empty certificate - */ - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - if( ssl->in_msglen == 2 && - ssl->in_msgtype == MBEDTLS_SSL_MSG_ALERT && - ssl->in_msg[0] == MBEDTLS_SSL_ALERT_LEVEL_WARNING && - ssl->in_msg[1] == MBEDTLS_SSL_ALERT_MSG_NO_CERT ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "SSLv3 client has no certificate" ) ); - - ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_MISSING; - if( authmode == MBEDTLS_SSL_VERIFY_OPTIONAL ) - return( 0 ); - else - return( MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE ); - } - } -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_0 ) - { - if( ssl->in_hslen == 3 + mbedtls_ssl_hs_hdr_len( ssl ) && - ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE && - ssl->in_msg[0] == MBEDTLS_SSL_HS_CERTIFICATE && - memcmp( ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ), "\0\0\0", 3 ) == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "TLSv1 client has no certificate" ) ); - - ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_MISSING; - if( authmode == MBEDTLS_SSL_VERIFY_OPTIONAL ) - return( 0 ); - else - return( MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE ); - } - } -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \ - MBEDTLS_SSL_PROTO_TLS1_2 */ -#endif /* MBEDTLS_SSL_SRV_C */ - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - if( ssl->in_msg[0] != MBEDTLS_SSL_HS_CERTIFICATE || - ssl->in_hslen < mbedtls_ssl_hs_hdr_len( ssl ) + 3 + 3 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - - i = mbedtls_ssl_hs_hdr_len( ssl ); - - /* - * Same message structure as in mbedtls_ssl_write_certificate() - */ - n = ( ssl->in_msg[i+1] << 8 ) | ssl->in_msg[i+2]; - - if( ssl->in_msg[i] != 0 || - ssl->in_hslen != n + 3 + mbedtls_ssl_hs_hdr_len( ssl ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - - /* In case we tried to reuse a session but it failed */ - if( ssl->session_negotiate->peer_cert != NULL ) - { - mbedtls_x509_crt_free( ssl->session_negotiate->peer_cert ); - mbedtls_free( ssl->session_negotiate->peer_cert ); - } - - if( ( ssl->session_negotiate->peer_cert = mbedtls_calloc( 1, - sizeof( mbedtls_x509_crt ) ) ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", - sizeof( mbedtls_x509_crt ) ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - mbedtls_x509_crt_init( ssl->session_negotiate->peer_cert ); - - i += 3; - - while( i < ssl->in_hslen ) - { - if( ssl->in_msg[i] != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - - n = ( (unsigned int) ssl->in_msg[i + 1] << 8 ) - | (unsigned int) ssl->in_msg[i + 2]; - i += 3; - - if( n < 128 || i + n > ssl->in_hslen ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - - ret = mbedtls_x509_crt_parse_der( ssl->session_negotiate->peer_cert, - ssl->in_msg + i, n ); - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, " mbedtls_x509_crt_parse_der", ret ); - return( ret ); - } - - i += n; - } - - MBEDTLS_SSL_DEBUG_CRT( 3, "peer certificate", ssl->session_negotiate->peer_cert ); - - /* - * On client, make sure the server cert doesn't change during renego to - * avoid "triple handshake" attack: https://secure-resumption.com/ - */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) && defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT && - ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - if( ssl->session->peer_cert == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "new server cert during renegotiation" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - - if( ssl->session->peer_cert->raw.len != - ssl->session_negotiate->peer_cert->raw.len || - memcmp( ssl->session->peer_cert->raw.p, - ssl->session_negotiate->peer_cert->raw.p, - ssl->session->peer_cert->raw.len ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "server cert changed during renegotiation" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE ); - } - } -#endif /* MBEDTLS_SSL_RENEGOTIATION && MBEDTLS_SSL_CLI_C */ - - if( authmode != MBEDTLS_SSL_VERIFY_NONE ) - { - mbedtls_x509_crt *ca_chain; - mbedtls_x509_crl *ca_crl; - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - if( ssl->handshake->sni_ca_chain != NULL ) - { - ca_chain = ssl->handshake->sni_ca_chain; - ca_crl = ssl->handshake->sni_ca_crl; - } - else -#endif - { - ca_chain = ssl->conf->ca_chain; - ca_crl = ssl->conf->ca_crl; - } - - if( ca_chain == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "got no CA chain" ) ); - return( MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED ); - } - - /* - * Main check: verify certificate - */ - ret = mbedtls_x509_crt_verify_with_profile( - ssl->session_negotiate->peer_cert, - ca_chain, ca_crl, - ssl->conf->cert_profile, - ssl->hostname, - &ssl->session_negotiate->verify_result, - ssl->conf->f_vrfy, ssl->conf->p_vrfy ); - - if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "x509_verify_cert", ret ); - } - - /* - * Secondary checks: always done, but change 'ret' only if it was 0 - */ - -#if defined(MBEDTLS_ECP_C) - { - const mbedtls_pk_context *pk = &ssl->session_negotiate->peer_cert->pk; - - /* If certificate uses an EC key, make sure the curve is OK */ - if( mbedtls_pk_can_do( pk, MBEDTLS_PK_ECKEY ) && - mbedtls_ssl_check_curve( ssl, mbedtls_pk_ec( *pk )->grp.id ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate (EC key curve)" ) ); - if( ret == 0 ) - ret = MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE; - } - } -#endif /* MBEDTLS_ECP_C */ - - if( mbedtls_ssl_check_cert_usage( ssl->session_negotiate->peer_cert, - ciphersuite_info, - ! ssl->conf->endpoint, - &ssl->session_negotiate->verify_result ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate (usage extensions)" ) ); - if( ret == 0 ) - ret = MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE; - } - - if( authmode == MBEDTLS_SSL_VERIFY_OPTIONAL ) - ret = 0; - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse certificate" ) ); - - return( ret ); -} -#endif /* !MBEDTLS_KEY_EXCHANGE_RSA_ENABLED - !MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED - !MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED - !MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED - !MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED - !MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED - !MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ - -int mbedtls_ssl_write_change_cipher_spec( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write change cipher spec" ) ); - - ssl->out_msgtype = MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC; - ssl->out_msglen = 1; - ssl->out_msg[0] = 1; - - ssl->state++; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write change cipher spec" ) ); - - return( 0 ); -} - -int mbedtls_ssl_parse_change_cipher_spec( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse change cipher spec" ) ); - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad change cipher spec message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - if( ssl->in_msglen != 1 || ssl->in_msg[0] != 1 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad change cipher spec message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC ); - } - - /* - * Switch to our negotiated transform and session parameters for inbound - * data. - */ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "switching to new transform spec for inbound data" ) ); - ssl->transform_in = ssl->transform_negotiate; - ssl->session_in = ssl->session_negotiate; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - ssl_dtls_replay_reset( ssl ); -#endif - - /* Increment epoch */ - if( ++ssl->in_epoch == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "DTLS epoch would wrap" ) ); - return( MBEDTLS_ERR_SSL_COUNTER_WRAPPING ); - } - } - else -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - memset( ssl->in_ctr, 0, 8 ); - - /* - * Set the in_msg pointer to the correct location based on IV length - */ - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 ) - { - ssl->in_msg = ssl->in_iv + ssl->transform_negotiate->ivlen - - ssl->transform_negotiate->fixed_ivlen; - } - else - ssl->in_msg = ssl->in_iv; - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_activate != NULL ) - { - if( ( ret = mbedtls_ssl_hw_record_activate( ssl, MBEDTLS_SSL_CHANNEL_INBOUND ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_activate", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - } -#endif - - ssl->state++; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse change cipher spec" ) ); - - return( 0 ); -} - -void mbedtls_ssl_optimize_checksum( mbedtls_ssl_context *ssl, - const mbedtls_ssl_ciphersuite_t *ciphersuite_info ) -{ - ((void) ciphersuite_info); - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - if( ssl->minor_ver < MBEDTLS_SSL_MINOR_VERSION_3 ) - ssl->handshake->update_checksum = ssl_update_checksum_md5sha1; - else -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA512_C) - if( ciphersuite_info->mac == MBEDTLS_MD_SHA384 ) - ssl->handshake->update_checksum = ssl_update_checksum_sha384; - else -#endif -#if defined(MBEDTLS_SHA256_C) - if( ciphersuite_info->mac != MBEDTLS_MD_SHA384 ) - ssl->handshake->update_checksum = ssl_update_checksum_sha256; - else -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return; - } -} - -void mbedtls_ssl_reset_checksum( mbedtls_ssl_context *ssl ) -{ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - mbedtls_md5_starts( &ssl->handshake->fin_md5 ); - mbedtls_sha1_starts( &ssl->handshake->fin_sha1 ); -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) - mbedtls_sha256_starts( &ssl->handshake->fin_sha256, 0 ); -#endif -#if defined(MBEDTLS_SHA512_C) - mbedtls_sha512_starts( &ssl->handshake->fin_sha512, 1 ); -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -} - -static void ssl_update_checksum_start( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - mbedtls_md5_update( &ssl->handshake->fin_md5 , buf, len ); - mbedtls_sha1_update( &ssl->handshake->fin_sha1, buf, len ); -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) - mbedtls_sha256_update( &ssl->handshake->fin_sha256, buf, len ); -#endif -#if defined(MBEDTLS_SHA512_C) - mbedtls_sha512_update( &ssl->handshake->fin_sha512, buf, len ); -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -} - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) -static void ssl_update_checksum_md5sha1( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - mbedtls_md5_update( &ssl->handshake->fin_md5 , buf, len ); - mbedtls_sha1_update( &ssl->handshake->fin_sha1, buf, len ); -} -#endif - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) -static void ssl_update_checksum_sha256( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - mbedtls_sha256_update( &ssl->handshake->fin_sha256, buf, len ); -} -#endif - -#if defined(MBEDTLS_SHA512_C) -static void ssl_update_checksum_sha384( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - mbedtls_sha512_update( &ssl->handshake->fin_sha512, buf, len ); -} -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -#if defined(MBEDTLS_SSL_PROTO_SSL3) -static void ssl_calc_finished_ssl( - mbedtls_ssl_context *ssl, unsigned char *buf, int from ) -{ - const char *sender; - mbedtls_md5_context md5; - mbedtls_sha1_context sha1; - - unsigned char padbuf[48]; - unsigned char md5sum[16]; - unsigned char sha1sum[20]; - - mbedtls_ssl_session *session = ssl->session_negotiate; - if( !session ) - session = ssl->session; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc finished ssl" ) ); - - mbedtls_md5_init( &md5 ); - mbedtls_sha1_init( &sha1 ); - - mbedtls_md5_clone( &md5, &ssl->handshake->fin_md5 ); - mbedtls_sha1_clone( &sha1, &ssl->handshake->fin_sha1 ); - - /* - * SSLv3: - * hash = - * MD5( master + pad2 + - * MD5( handshake + sender + master + pad1 ) ) - * + SHA1( master + pad2 + - * SHA1( handshake + sender + master + pad1 ) ) - */ - -#if !defined(MBEDTLS_MD5_ALT) - MBEDTLS_SSL_DEBUG_BUF( 4, "finished md5 state", (unsigned char *) - md5.state, sizeof( md5.state ) ); -#endif - -#if !defined(MBEDTLS_SHA1_ALT) - MBEDTLS_SSL_DEBUG_BUF( 4, "finished sha1 state", (unsigned char *) - sha1.state, sizeof( sha1.state ) ); -#endif - - sender = ( from == MBEDTLS_SSL_IS_CLIENT ) ? "CLNT" - : "SRVR"; - - memset( padbuf, 0x36, 48 ); - - mbedtls_md5_update( &md5, (const unsigned char *) sender, 4 ); - mbedtls_md5_update( &md5, session->master, 48 ); - mbedtls_md5_update( &md5, padbuf, 48 ); - mbedtls_md5_finish( &md5, md5sum ); - - mbedtls_sha1_update( &sha1, (const unsigned char *) sender, 4 ); - mbedtls_sha1_update( &sha1, session->master, 48 ); - mbedtls_sha1_update( &sha1, padbuf, 40 ); - mbedtls_sha1_finish( &sha1, sha1sum ); - - memset( padbuf, 0x5C, 48 ); - - mbedtls_md5_starts( &md5 ); - mbedtls_md5_update( &md5, session->master, 48 ); - mbedtls_md5_update( &md5, padbuf, 48 ); - mbedtls_md5_update( &md5, md5sum, 16 ); - mbedtls_md5_finish( &md5, buf ); - - mbedtls_sha1_starts( &sha1 ); - mbedtls_sha1_update( &sha1, session->master, 48 ); - mbedtls_sha1_update( &sha1, padbuf , 40 ); - mbedtls_sha1_update( &sha1, sha1sum, 20 ); - mbedtls_sha1_finish( &sha1, buf + 16 ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calc finished result", buf, 36 ); - - mbedtls_md5_free( &md5 ); - mbedtls_sha1_free( &sha1 ); - - mbedtls_zeroize( padbuf, sizeof( padbuf ) ); - mbedtls_zeroize( md5sum, sizeof( md5sum ) ); - mbedtls_zeroize( sha1sum, sizeof( sha1sum ) ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc finished" ) ); -} -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) -static void ssl_calc_finished_tls( - mbedtls_ssl_context *ssl, unsigned char *buf, int from ) -{ - int len = 12; - const char *sender; - mbedtls_md5_context md5; - mbedtls_sha1_context sha1; - unsigned char padbuf[36]; - - mbedtls_ssl_session *session = ssl->session_negotiate; - if( !session ) - session = ssl->session; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc finished tls" ) ); - - mbedtls_md5_init( &md5 ); - mbedtls_sha1_init( &sha1 ); - - mbedtls_md5_clone( &md5, &ssl->handshake->fin_md5 ); - mbedtls_sha1_clone( &sha1, &ssl->handshake->fin_sha1 ); - - /* - * TLSv1: - * hash = PRF( master, finished_label, - * MD5( handshake ) + SHA1( handshake ) )[0..11] - */ - -#if !defined(MBEDTLS_MD5_ALT) - MBEDTLS_SSL_DEBUG_BUF( 4, "finished md5 state", (unsigned char *) - md5.state, sizeof( md5.state ) ); -#endif - -#if !defined(MBEDTLS_SHA1_ALT) - MBEDTLS_SSL_DEBUG_BUF( 4, "finished sha1 state", (unsigned char *) - sha1.state, sizeof( sha1.state ) ); -#endif - - sender = ( from == MBEDTLS_SSL_IS_CLIENT ) - ? "client finished" - : "server finished"; - - mbedtls_md5_finish( &md5, padbuf ); - mbedtls_sha1_finish( &sha1, padbuf + 16 ); - - ssl->handshake->tls_prf( session->master, 48, sender, - padbuf, 36, buf, len ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calc finished result", buf, len ); - - mbedtls_md5_free( &md5 ); - mbedtls_sha1_free( &sha1 ); - - mbedtls_zeroize( padbuf, sizeof( padbuf ) ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc finished" ) ); -} -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 */ - -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) -static void ssl_calc_finished_tls_sha256( - mbedtls_ssl_context *ssl, unsigned char *buf, int from ) -{ - int len = 12; - const char *sender; - mbedtls_sha256_context sha256; - unsigned char padbuf[32]; - - mbedtls_ssl_session *session = ssl->session_negotiate; - if( !session ) - session = ssl->session; - - mbedtls_sha256_init( &sha256 ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc finished tls sha256" ) ); - - mbedtls_sha256_clone( &sha256, &ssl->handshake->fin_sha256 ); - - /* - * TLSv1.2: - * hash = PRF( master, finished_label, - * Hash( handshake ) )[0.11] - */ - -#if !defined(MBEDTLS_SHA256_ALT) - MBEDTLS_SSL_DEBUG_BUF( 4, "finished sha2 state", (unsigned char *) - sha256.state, sizeof( sha256.state ) ); -#endif - - sender = ( from == MBEDTLS_SSL_IS_CLIENT ) - ? "client finished" - : "server finished"; - - mbedtls_sha256_finish( &sha256, padbuf ); - - ssl->handshake->tls_prf( session->master, 48, sender, - padbuf, 32, buf, len ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calc finished result", buf, len ); - - mbedtls_sha256_free( &sha256 ); - - mbedtls_zeroize( padbuf, sizeof( padbuf ) ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc finished" ) ); -} -#endif /* MBEDTLS_SHA256_C */ - -#if defined(MBEDTLS_SHA512_C) -static void ssl_calc_finished_tls_sha384( - mbedtls_ssl_context *ssl, unsigned char *buf, int from ) -{ - int len = 12; - const char *sender; - mbedtls_sha512_context sha512; - unsigned char padbuf[48]; - - mbedtls_ssl_session *session = ssl->session_negotiate; - if( !session ) - session = ssl->session; - - mbedtls_sha512_init( &sha512 ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> calc finished tls sha384" ) ); - - mbedtls_sha512_clone( &sha512, &ssl->handshake->fin_sha512 ); - - /* - * TLSv1.2: - * hash = PRF( master, finished_label, - * Hash( handshake ) )[0.11] - */ - -#if !defined(MBEDTLS_SHA512_ALT) - MBEDTLS_SSL_DEBUG_BUF( 4, "finished sha512 state", (unsigned char *) - sha512.state, sizeof( sha512.state ) ); -#endif - - sender = ( from == MBEDTLS_SSL_IS_CLIENT ) - ? "client finished" - : "server finished"; - - mbedtls_sha512_finish( &sha512, padbuf ); - - ssl->handshake->tls_prf( session->master, 48, sender, - padbuf, 48, buf, len ); - - MBEDTLS_SSL_DEBUG_BUF( 3, "calc finished result", buf, len ); - - mbedtls_sha512_free( &sha512 ); - - mbedtls_zeroize( padbuf, sizeof( padbuf ) ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= calc finished" ) ); -} -#endif /* MBEDTLS_SHA512_C */ -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl ) -{ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup: final free" ) ); - - /* - * Free our handshake params - */ - mbedtls_ssl_handshake_free( ssl->handshake ); - mbedtls_free( ssl->handshake ); - ssl->handshake = NULL; - - /* - * Free the previous transform and swith in the current one - */ - if( ssl->transform ) - { - mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); - } - ssl->transform = ssl->transform_negotiate; - ssl->transform_negotiate = NULL; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "<= handshake wrapup: final free" ) ); -} - -void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl ) -{ - int resume = ssl->handshake->resume; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup" ) ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - ssl->renego_status = MBEDTLS_SSL_RENEGOTIATION_DONE; - ssl->renego_records_seen = 0; - } -#endif - - /* - * Free the previous session and switch in the current one - */ - if( ssl->session ) - { -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - /* RFC 7366 3.1: keep the EtM state */ - ssl->session_negotiate->encrypt_then_mac = - ssl->session->encrypt_then_mac; -#endif - - mbedtls_ssl_session_free( ssl->session ); - mbedtls_free( ssl->session ); - } - ssl->session = ssl->session_negotiate; - ssl->session_negotiate = NULL; - - /* - * Add cache entry - */ - if( ssl->conf->f_set_cache != NULL && - ssl->session->id_len != 0 && - resume == 0 ) - { - if( ssl->conf->f_set_cache( ssl->conf->p_cache, ssl->session ) != 0 ) - MBEDTLS_SSL_DEBUG_MSG( 1, ( "cache did not store session" ) ); - } - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->handshake->flight != NULL ) - { - /* Cancel handshake timer */ - ssl_set_timer( ssl, 0 ); - - /* Keep last flight around in case we need to resend it: - * we need the handshake and transform structures for that */ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "skip freeing handshake and transform" ) ); - } - else -#endif - ssl_handshake_wrapup_free_hs_transform( ssl ); - - ssl->state++; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "<= handshake wrapup" ) ); -} - -int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl ) -{ - int ret, hash_len; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write finished" ) ); - - /* - * Set the out_msg pointer to the correct location based on IV length - */ - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_2 ) - { - ssl->out_msg = ssl->out_iv + ssl->transform_negotiate->ivlen - - ssl->transform_negotiate->fixed_ivlen; - } - else - ssl->out_msg = ssl->out_iv; - - ssl->handshake->calc_finished( ssl, ssl->out_msg + 4, ssl->conf->endpoint ); - - // TODO TLS/1.2 Hash length is determined by cipher suite (Page 63) - hash_len = ( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) ? 36 : 12; - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl->verify_data_len = hash_len; - memcpy( ssl->own_verify_data, ssl->out_msg + 4, hash_len ); -#endif - - ssl->out_msglen = 4 + hash_len; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_FINISHED; - - /* - * In case of session resuming, invert the client and server - * ChangeCipherSpec messages order. - */ - if( ssl->handshake->resume != 0 ) - { -#if defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - ssl->state = MBEDTLS_SSL_HANDSHAKE_WRAPUP; -#endif -#if defined(MBEDTLS_SSL_SRV_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - ssl->state = MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC; -#endif - } - else - ssl->state++; - - /* - * Switch to our negotiated transform and session parameters for outbound - * data. - */ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "switching to new transform spec for outbound data" ) ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - unsigned char i; - - /* Remember current epoch settings for resending */ - ssl->handshake->alt_transform_out = ssl->transform_out; - memcpy( ssl->handshake->alt_out_ctr, ssl->out_ctr, 8 ); - - /* Set sequence_number to zero */ - memset( ssl->out_ctr + 2, 0, 6 ); - - /* Increment epoch */ - for( i = 2; i > 0; i-- ) - if( ++ssl->out_ctr[i - 1] != 0 ) - break; - - /* The loop goes to its end iff the counter is wrapping */ - if( i == 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "DTLS epoch would wrap" ) ); - return( MBEDTLS_ERR_SSL_COUNTER_WRAPPING ); - } - } - else -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - memset( ssl->out_ctr, 0, 8 ); - - ssl->transform_out = ssl->transform_negotiate; - ssl->session_out = ssl->session_negotiate; - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_activate != NULL ) - { - if( ( ret = mbedtls_ssl_hw_record_activate( ssl, MBEDTLS_SSL_CHANNEL_OUTBOUND ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_activate", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - } -#endif - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - mbedtls_ssl_send_flight_completed( ssl ); -#endif - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write finished" ) ); - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_PROTO_SSL3) -#define SSL_MAX_HASH_LEN 36 -#else -#define SSL_MAX_HASH_LEN 12 -#endif - -int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned int hash_len; - unsigned char buf[SSL_MAX_HASH_LEN]; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse finished" ) ); - - ssl->handshake->calc_finished( ssl, buf, ssl->conf->endpoint ^ 1 ); - - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad finished message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - /* There is currently no ciphersuite using another length with TLS 1.2 */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - hash_len = 36; - else -#endif - hash_len = 12; - - if( ssl->in_msg[0] != MBEDTLS_SSL_HS_FINISHED || - ssl->in_hslen != mbedtls_ssl_hs_hdr_len( ssl ) + hash_len ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad finished message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_FINISHED ); - } - - if( mbedtls_ssl_safer_memcmp( ssl->in_msg + mbedtls_ssl_hs_hdr_len( ssl ), - buf, hash_len ) != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad finished message" ) ); - return( MBEDTLS_ERR_SSL_BAD_HS_FINISHED ); - } - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl->verify_data_len = hash_len; - memcpy( ssl->peer_verify_data, buf, hash_len ); -#endif - - if( ssl->handshake->resume != 0 ) - { -#if defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - ssl->state = MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC; -#endif -#if defined(MBEDTLS_SSL_SRV_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - ssl->state = MBEDTLS_SSL_HANDSHAKE_WRAPUP; -#endif - } - else - ssl->state++; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - mbedtls_ssl_recv_flight_completed( ssl ); -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse finished" ) ); - - return( 0 ); -} - -static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake ) -{ - memset( handshake, 0, sizeof( mbedtls_ssl_handshake_params ) ); - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - mbedtls_md5_init( &handshake->fin_md5 ); - mbedtls_sha1_init( &handshake->fin_sha1 ); - mbedtls_md5_starts( &handshake->fin_md5 ); - mbedtls_sha1_starts( &handshake->fin_sha1 ); -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) - mbedtls_sha256_init( &handshake->fin_sha256 ); - mbedtls_sha256_starts( &handshake->fin_sha256, 0 ); -#endif -#if defined(MBEDTLS_SHA512_C) - mbedtls_sha512_init( &handshake->fin_sha512 ); - mbedtls_sha512_starts( &handshake->fin_sha512, 1 ); -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - - handshake->update_checksum = ssl_update_checksum_start; - handshake->sig_alg = MBEDTLS_SSL_HASH_SHA1; - -#if defined(MBEDTLS_DHM_C) - mbedtls_dhm_init( &handshake->dhm_ctx ); -#endif -#if defined(MBEDTLS_ECDH_C) - mbedtls_ecdh_init( &handshake->ecdh_ctx ); -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - mbedtls_ecjpake_init( &handshake->ecjpake_ctx ); -#if defined(MBEDTLS_SSL_CLI_C) - handshake->ecjpake_cache = NULL; - handshake->ecjpake_cache_len = 0; -#endif -#endif - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - handshake->sni_authmode = MBEDTLS_SSL_VERIFY_UNSET; -#endif -} - -static void ssl_transform_init( mbedtls_ssl_transform *transform ) -{ - memset( transform, 0, sizeof(mbedtls_ssl_transform) ); - - mbedtls_cipher_init( &transform->cipher_ctx_enc ); - mbedtls_cipher_init( &transform->cipher_ctx_dec ); - - mbedtls_md_init( &transform->md_ctx_enc ); - mbedtls_md_init( &transform->md_ctx_dec ); -} - -void mbedtls_ssl_session_init( mbedtls_ssl_session *session ) -{ - memset( session, 0, sizeof(mbedtls_ssl_session) ); -} - -static int ssl_handshake_init( mbedtls_ssl_context *ssl ) -{ - /* Clear old handshake information if present */ - if( ssl->transform_negotiate ) - mbedtls_ssl_transform_free( ssl->transform_negotiate ); - if( ssl->session_negotiate ) - mbedtls_ssl_session_free( ssl->session_negotiate ); - if( ssl->handshake ) - mbedtls_ssl_handshake_free( ssl->handshake ); - - /* - * Either the pointers are now NULL or cleared properly and can be freed. - * Now allocate missing structures. - */ - if( ssl->transform_negotiate == NULL ) - { - ssl->transform_negotiate = mbedtls_calloc( 1, sizeof(mbedtls_ssl_transform) ); - } - - if( ssl->session_negotiate == NULL ) - { - ssl->session_negotiate = mbedtls_calloc( 1, sizeof(mbedtls_ssl_session) ); - } - - if( ssl->handshake == NULL ) - { - ssl->handshake = mbedtls_calloc( 1, sizeof(mbedtls_ssl_handshake_params) ); - } - - /* All pointers should exist and can be directly freed without issue */ - if( ssl->handshake == NULL || - ssl->transform_negotiate == NULL || - ssl->session_negotiate == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc() of ssl sub-contexts failed" ) ); - - mbedtls_free( ssl->handshake ); - mbedtls_free( ssl->transform_negotiate ); - mbedtls_free( ssl->session_negotiate ); - - ssl->handshake = NULL; - ssl->transform_negotiate = NULL; - ssl->session_negotiate = NULL; - - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - /* Initialize structures */ - mbedtls_ssl_session_init( ssl->session_negotiate ); - ssl_transform_init( ssl->transform_negotiate ); - ssl_handshake_params_init( ssl->handshake ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - ssl->handshake->alt_transform_out = ssl->transform_out; - - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_PREPARING; - else - ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_WAITING; - - ssl_set_timer( ssl, 0 ); - } -#endif - - return( 0 ); -} - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) -/* Dummy cookie callbacks for defaults */ -static int ssl_cookie_write_dummy( void *ctx, - unsigned char **p, unsigned char *end, - const unsigned char *cli_id, size_t cli_id_len ) -{ - ((void) ctx); - ((void) p); - ((void) end); - ((void) cli_id); - ((void) cli_id_len); - - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); -} - -static int ssl_cookie_check_dummy( void *ctx, - const unsigned char *cookie, size_t cookie_len, - const unsigned char *cli_id, size_t cli_id_len ) -{ - ((void) ctx); - ((void) cookie); - ((void) cookie_len); - ((void) cli_id); - ((void) cli_id_len); - - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); -} -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY && MBEDTLS_SSL_SRV_C */ - -/* - * Initialize an SSL context - */ -void mbedtls_ssl_init( mbedtls_ssl_context *ssl ) -{ - memset( ssl, 0, sizeof( mbedtls_ssl_context ) ); -} - -/* - * Setup an SSL context - */ -int mbedtls_ssl_setup( mbedtls_ssl_context *ssl, - const mbedtls_ssl_config *conf ) -{ - int ret; - const size_t len = MBEDTLS_SSL_BUFFER_LEN; - - ssl->conf = conf; - - /* - * Prepare base structures - */ - if( ( ssl-> in_buf = mbedtls_calloc( 1, len ) ) == NULL || - ( ssl->out_buf = mbedtls_calloc( 1, len ) ) == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", len ) ); - mbedtls_free( ssl->in_buf ); - ssl->in_buf = NULL; - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - ssl->out_hdr = ssl->out_buf; - ssl->out_ctr = ssl->out_buf + 3; - ssl->out_len = ssl->out_buf + 11; - ssl->out_iv = ssl->out_buf + 13; - ssl->out_msg = ssl->out_buf + 13; - - ssl->in_hdr = ssl->in_buf; - ssl->in_ctr = ssl->in_buf + 3; - ssl->in_len = ssl->in_buf + 11; - ssl->in_iv = ssl->in_buf + 13; - ssl->in_msg = ssl->in_buf + 13; - } - else -#endif - { - ssl->out_ctr = ssl->out_buf; - ssl->out_hdr = ssl->out_buf + 8; - ssl->out_len = ssl->out_buf + 11; - ssl->out_iv = ssl->out_buf + 13; - ssl->out_msg = ssl->out_buf + 13; - - ssl->in_ctr = ssl->in_buf; - ssl->in_hdr = ssl->in_buf + 8; - ssl->in_len = ssl->in_buf + 11; - ssl->in_iv = ssl->in_buf + 13; - ssl->in_msg = ssl->in_buf + 13; - } - - if( ( ret = ssl_handshake_init( ssl ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -/* - * Reset an initialized and used SSL context for re-use while retaining - * all application-set variables, function pointers and data. - * - * If partial is non-zero, keep data in the input buffer and client ID. - * (Use when a DTLS client reconnects from the same port.) - */ -static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial ) -{ - int ret; - - ssl->state = MBEDTLS_SSL_HELLO_REQUEST; - - /* Cancel any possibly running timer */ - ssl_set_timer( ssl, 0 ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - ssl->renego_status = MBEDTLS_SSL_INITIAL_HANDSHAKE; - ssl->renego_records_seen = 0; - - ssl->verify_data_len = 0; - memset( ssl->own_verify_data, 0, MBEDTLS_SSL_VERIFY_DATA_MAX_LEN ); - memset( ssl->peer_verify_data, 0, MBEDTLS_SSL_VERIFY_DATA_MAX_LEN ); -#endif - ssl->secure_renegotiation = MBEDTLS_SSL_LEGACY_RENEGOTIATION; - - ssl->in_offt = NULL; - - ssl->in_msg = ssl->in_buf + 13; - ssl->in_msgtype = 0; - ssl->in_msglen = 0; - if( partial == 0 ) - ssl->in_left = 0; -#if defined(MBEDTLS_SSL_PROTO_DTLS) - ssl->next_record_offset = 0; - ssl->in_epoch = 0; -#endif -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - ssl_dtls_replay_reset( ssl ); -#endif - - ssl->in_hslen = 0; - ssl->nb_zero = 0; - ssl->record_read = 0; - - ssl->out_msg = ssl->out_buf + 13; - ssl->out_msgtype = 0; - ssl->out_msglen = 0; - ssl->out_left = 0; -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - if( ssl->split_done != MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED ) - ssl->split_done = 0; -#endif - - ssl->transform_in = NULL; - ssl->transform_out = NULL; - - memset( ssl->out_buf, 0, MBEDTLS_SSL_BUFFER_LEN ); - if( partial == 0 ) - memset( ssl->in_buf, 0, MBEDTLS_SSL_BUFFER_LEN ); - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_reset != NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "going for mbedtls_ssl_hw_record_reset()" ) ); - if( ( ret = mbedtls_ssl_hw_record_reset( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_hw_record_reset", ret ); - return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED ); - } - } -#endif - - if( ssl->transform ) - { - mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); - ssl->transform = NULL; - } - - if( ssl->session ) - { - mbedtls_ssl_session_free( ssl->session ); - mbedtls_free( ssl->session ); - ssl->session = NULL; - } - -#if defined(MBEDTLS_SSL_ALPN) - ssl->alpn_chosen = NULL; -#endif - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) - if( partial == 0 ) - { - mbedtls_free( ssl->cli_id ); - ssl->cli_id = NULL; - ssl->cli_id_len = 0; - } -#endif - - if( ( ret = ssl_handshake_init( ssl ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -/* - * Reset an initialized and used SSL context for re-use while retaining - * all application-set variables, function pointers and data. - */ -int mbedtls_ssl_session_reset( mbedtls_ssl_context *ssl ) -{ - return( ssl_session_reset_int( ssl, 0 ) ); -} - -/* - * SSL set accessors - */ -void mbedtls_ssl_conf_endpoint( mbedtls_ssl_config *conf, int endpoint ) -{ - conf->endpoint = endpoint; -} - -void mbedtls_ssl_conf_transport( mbedtls_ssl_config *conf, int transport ) -{ - conf->transport = transport; -} - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -void mbedtls_ssl_conf_dtls_anti_replay( mbedtls_ssl_config *conf, char mode ) -{ - conf->anti_replay = mode; -} -#endif - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) -void mbedtls_ssl_conf_dtls_badmac_limit( mbedtls_ssl_config *conf, unsigned limit ) -{ - conf->badmac_limit = limit; -} -#endif - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -void mbedtls_ssl_conf_handshake_timeout( mbedtls_ssl_config *conf, uint32_t min, uint32_t max ) -{ - conf->hs_timeout_min = min; - conf->hs_timeout_max = max; -} -#endif - -void mbedtls_ssl_conf_authmode( mbedtls_ssl_config *conf, int authmode ) -{ - conf->authmode = authmode; -} - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -void mbedtls_ssl_conf_verify( mbedtls_ssl_config *conf, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ) -{ - conf->f_vrfy = f_vrfy; - conf->p_vrfy = p_vrfy; -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -void mbedtls_ssl_conf_rng( mbedtls_ssl_config *conf, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - conf->f_rng = f_rng; - conf->p_rng = p_rng; -} - -void mbedtls_ssl_conf_dbg( mbedtls_ssl_config *conf, - void (*f_dbg)(void *, int, const char *, int, const char *), - void *p_dbg ) -{ - conf->f_dbg = f_dbg; - conf->p_dbg = p_dbg; -} - -void mbedtls_ssl_set_bio( mbedtls_ssl_context *ssl, - void *p_bio, - int (*f_send)(void *, const unsigned char *, size_t), - int (*f_recv)(void *, unsigned char *, size_t), - int (*f_recv_timeout)(void *, unsigned char *, size_t, uint32_t) ) -{ - ssl->p_bio = p_bio; - ssl->f_send = f_send; - ssl->f_recv = f_recv; - ssl->f_recv_timeout = f_recv_timeout; -} - -void mbedtls_ssl_conf_read_timeout( mbedtls_ssl_config *conf, uint32_t timeout ) -{ - conf->read_timeout = timeout; -} - -void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, - void *p_timer, - void (*f_set_timer)(void *, uint32_t int_ms, uint32_t fin_ms), - int (*f_get_timer)(void *) ) -{ - ssl->p_timer = p_timer; - ssl->f_set_timer = f_set_timer; - ssl->f_get_timer = f_get_timer; - - /* Make sure we start with no timer running */ - ssl_set_timer( ssl, 0 ); -} - -#if defined(MBEDTLS_SSL_SRV_C) -void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf, - void *p_cache, - int (*f_get_cache)(void *, mbedtls_ssl_session *), - int (*f_set_cache)(void *, const mbedtls_ssl_session *) ) -{ - conf->p_cache = p_cache; - conf->f_get_cache = f_get_cache; - conf->f_set_cache = f_set_cache; -} -#endif /* MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_SSL_CLI_C) -int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session ) -{ - int ret; - - if( ssl == NULL || - session == NULL || - ssl->session_negotiate == NULL || - ssl->conf->endpoint != MBEDTLS_SSL_IS_CLIENT ) - { - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - if( ( ret = ssl_session_copy( ssl->session_negotiate, session ) ) != 0 ) - return( ret ); - - ssl->handshake->resume = 1; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_CLI_C */ - -void mbedtls_ssl_conf_ciphersuites( mbedtls_ssl_config *conf, - const int *ciphersuites ) -{ - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_0] = ciphersuites; - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_1] = ciphersuites; - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_2] = ciphersuites; - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_3] = ciphersuites; -} - -void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf, - const int *ciphersuites, - int major, int minor ) -{ - if( major != MBEDTLS_SSL_MAJOR_VERSION_3 ) - return; - - if( minor < MBEDTLS_SSL_MINOR_VERSION_0 || minor > MBEDTLS_SSL_MINOR_VERSION_3 ) - return; - - conf->ciphersuite_list[minor] = ciphersuites; -} - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -void mbedtls_ssl_conf_cert_profile( mbedtls_ssl_config *conf, - const mbedtls_x509_crt_profile *profile ) -{ - conf->cert_profile = profile; -} - -/* Append a new keycert entry to a (possibly empty) list */ -static int ssl_append_key_cert( mbedtls_ssl_key_cert **head, - mbedtls_x509_crt *cert, - mbedtls_pk_context *key ) -{ - mbedtls_ssl_key_cert *new; - - new = mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) ); - if( new == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - new->cert = cert; - new->key = key; - new->next = NULL; - - /* Update head is the list was null, else add to the end */ - if( *head == NULL ) - { - *head = new; - } - else - { - mbedtls_ssl_key_cert *cur = *head; - while( cur->next != NULL ) - cur = cur->next; - cur->next = new; - } - - return( 0 ); -} - -int mbedtls_ssl_conf_own_cert( mbedtls_ssl_config *conf, - mbedtls_x509_crt *own_cert, - mbedtls_pk_context *pk_key ) -{ - return( ssl_append_key_cert( &conf->key_cert, own_cert, pk_key ) ); -} - -void mbedtls_ssl_conf_ca_chain( mbedtls_ssl_config *conf, - mbedtls_x509_crt *ca_chain, - mbedtls_x509_crl *ca_crl ) -{ - conf->ca_chain = ca_chain; - conf->ca_crl = ca_crl; -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) -int mbedtls_ssl_set_hs_own_cert( mbedtls_ssl_context *ssl, - mbedtls_x509_crt *own_cert, - mbedtls_pk_context *pk_key ) -{ - return( ssl_append_key_cert( &ssl->handshake->sni_key_cert, - own_cert, pk_key ) ); -} - -void mbedtls_ssl_set_hs_ca_chain( mbedtls_ssl_context *ssl, - mbedtls_x509_crt *ca_chain, - mbedtls_x509_crl *ca_crl ) -{ - ssl->handshake->sni_ca_chain = ca_chain; - ssl->handshake->sni_ca_crl = ca_crl; -} - -void mbedtls_ssl_set_hs_authmode( mbedtls_ssl_context *ssl, - int authmode ) -{ - ssl->handshake->sni_authmode = authmode; -} -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -/* - * Set EC J-PAKE password for current handshake - */ -int mbedtls_ssl_set_hs_ecjpake_password( mbedtls_ssl_context *ssl, - const unsigned char *pw, - size_t pw_len ) -{ - mbedtls_ecjpake_role role; - - if( ssl->handshake == NULL && ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - role = MBEDTLS_ECJPAKE_SERVER; - else - role = MBEDTLS_ECJPAKE_CLIENT; - - return( mbedtls_ecjpake_setup( &ssl->handshake->ecjpake_ctx, - role, - MBEDTLS_MD_SHA256, - MBEDTLS_ECP_DP_SECP256R1, - pw, pw_len ) ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf, - const unsigned char *psk, size_t psk_len, - const unsigned char *psk_identity, size_t psk_identity_len ) -{ - if( psk == NULL || psk_identity == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( psk_len > MBEDTLS_PSK_MAX_LEN ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - /* Identity len will be encoded on two bytes */ - if( ( psk_identity_len >> 16 ) != 0 || - psk_identity_len > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - if( conf->psk != NULL || conf->psk_identity != NULL ) - { - mbedtls_free( conf->psk ); - mbedtls_free( conf->psk_identity ); - conf->psk = NULL; - conf->psk_identity = NULL; - } - - if( ( conf->psk = mbedtls_calloc( 1, psk_len ) ) == NULL || - ( conf->psk_identity = mbedtls_calloc( 1, psk_identity_len ) ) == NULL ) - { - mbedtls_free( conf->psk ); - mbedtls_free( conf->psk_identity ); - conf->psk = NULL; - conf->psk_identity = NULL; - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - - conf->psk_len = psk_len; - conf->psk_identity_len = psk_identity_len; - - memcpy( conf->psk, psk, conf->psk_len ); - memcpy( conf->psk_identity, psk_identity, conf->psk_identity_len ); - - return( 0 ); -} - -int mbedtls_ssl_set_hs_psk( mbedtls_ssl_context *ssl, - const unsigned char *psk, size_t psk_len ) -{ - if( psk == NULL || ssl->handshake == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( psk_len > MBEDTLS_PSK_MAX_LEN ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( ssl->handshake->psk != NULL ) - mbedtls_free( ssl->handshake->psk ); - - if( ( ssl->handshake->psk = mbedtls_calloc( 1, psk_len ) ) == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - ssl->handshake->psk_len = psk_len; - memcpy( ssl->handshake->psk, psk, ssl->handshake->psk_len ); - - return( 0 ); -} - -void mbedtls_ssl_conf_psk_cb( mbedtls_ssl_config *conf, - int (*f_psk)(void *, mbedtls_ssl_context *, const unsigned char *, - size_t), - void *p_psk ) -{ - conf->f_psk = f_psk; - conf->p_psk = p_psk; -} -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_SRV_C) -int mbedtls_ssl_conf_dh_param( mbedtls_ssl_config *conf, const char *dhm_P, const char *dhm_G ) -{ - int ret; - - if( ( ret = mbedtls_mpi_read_string( &conf->dhm_P, 16, dhm_P ) ) != 0 || - ( ret = mbedtls_mpi_read_string( &conf->dhm_G, 16, dhm_G ) ) != 0 ) - { - mbedtls_mpi_free( &conf->dhm_P ); - mbedtls_mpi_free( &conf->dhm_G ); - return( ret ); - } - - return( 0 ); -} - -int mbedtls_ssl_conf_dh_param_ctx( mbedtls_ssl_config *conf, mbedtls_dhm_context *dhm_ctx ) -{ - int ret; - - if( ( ret = mbedtls_mpi_copy( &conf->dhm_P, &dhm_ctx->P ) ) != 0 || - ( ret = mbedtls_mpi_copy( &conf->dhm_G, &dhm_ctx->G ) ) != 0 ) - { - mbedtls_mpi_free( &conf->dhm_P ); - mbedtls_mpi_free( &conf->dhm_G ); - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_DHM_C && MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_CLI_C) -/* - * Set the minimum length for Diffie-Hellman parameters - */ -void mbedtls_ssl_conf_dhm_min_bitlen( mbedtls_ssl_config *conf, - unsigned int bitlen ) -{ - conf->dhm_min_bitlen = bitlen; -} -#endif /* MBEDTLS_DHM_C && MBEDTLS_SSL_CLI_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -/* - * Set allowed/preferred hashes for handshake signatures - */ -void mbedtls_ssl_conf_sig_hashes( mbedtls_ssl_config *conf, - const int *hashes ) -{ - conf->sig_hashes = hashes; -} -#endif - -#if defined(MBEDTLS_ECP_C) -/* - * Set the allowed elliptic curves - */ -void mbedtls_ssl_conf_curves( mbedtls_ssl_config *conf, - const mbedtls_ecp_group_id *curve_list ) -{ - conf->curve_list = curve_list; -} -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -int mbedtls_ssl_set_hostname( mbedtls_ssl_context *ssl, const char *hostname ) -{ - size_t hostname_len; - - if( hostname == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - hostname_len = strlen( hostname ); - - if( hostname_len + 1 == 0 ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( hostname_len > MBEDTLS_SSL_MAX_HOST_NAME_LEN ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - ssl->hostname = mbedtls_calloc( 1, hostname_len + 1 ); - - if( ssl->hostname == NULL ) - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - - memcpy( ssl->hostname, hostname, hostname_len ); - - ssl->hostname[hostname_len] = '\0'; - - return( 0 ); -} -#endif - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) -void mbedtls_ssl_conf_sni( mbedtls_ssl_config *conf, - int (*f_sni)(void *, mbedtls_ssl_context *, - const unsigned char *, size_t), - void *p_sni ) -{ - conf->f_sni = f_sni; - conf->p_sni = p_sni; -} -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ - -#if defined(MBEDTLS_SSL_ALPN) -int mbedtls_ssl_conf_alpn_protocols( mbedtls_ssl_config *conf, const char **protos ) -{ - size_t cur_len, tot_len; - const char **p; - - /* - * "Empty strings MUST NOT be included and byte strings MUST NOT be - * truncated". Check lengths now rather than later. - */ - tot_len = 0; - for( p = protos; *p != NULL; p++ ) - { - cur_len = strlen( *p ); - tot_len += cur_len; - - if( cur_len == 0 || cur_len > 255 || tot_len > 65535 ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - conf->alpn_list = protos; - - return( 0 ); -} - -const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl ) -{ - return( ssl->alpn_chosen ); -} -#endif /* MBEDTLS_SSL_ALPN */ - -void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int minor ) -{ - conf->max_major_ver = major; - conf->max_minor_ver = minor; -} - -void mbedtls_ssl_conf_min_version( mbedtls_ssl_config *conf, int major, int minor ) -{ - conf->min_major_ver = major; - conf->min_minor_ver = minor; -} - -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) && defined(MBEDTLS_SSL_CLI_C) -void mbedtls_ssl_conf_fallback( mbedtls_ssl_config *conf, char fallback ) -{ - conf->fallback = fallback; -} -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -void mbedtls_ssl_conf_encrypt_then_mac( mbedtls_ssl_config *conf, char etm ) -{ - conf->encrypt_then_mac = etm; -} -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -void mbedtls_ssl_conf_extended_master_secret( mbedtls_ssl_config *conf, char ems ) -{ - conf->extended_ms = ems; -} -#endif - -#if defined(MBEDTLS_ARC4_C) -void mbedtls_ssl_conf_arc4_support( mbedtls_ssl_config *conf, char arc4 ) -{ - conf->arc4_disabled = arc4; -} -#endif - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -int mbedtls_ssl_conf_max_frag_len( mbedtls_ssl_config *conf, unsigned char mfl_code ) -{ - if( mfl_code >= MBEDTLS_SSL_MAX_FRAG_LEN_INVALID || - mfl_code_to_length[mfl_code] > MBEDTLS_SSL_MAX_CONTENT_LEN ) - { - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - conf->mfl_code = mfl_code; - - return( 0 ); -} -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -void mbedtls_ssl_conf_truncated_hmac( mbedtls_ssl_config *conf, int truncate ) -{ - conf->trunc_hmac = truncate; -} -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) -void mbedtls_ssl_conf_cbc_record_splitting( mbedtls_ssl_config *conf, char split ) -{ - conf->cbc_record_splitting = split; -} -#endif - -void mbedtls_ssl_conf_legacy_renegotiation( mbedtls_ssl_config *conf, int allow_legacy ) -{ - conf->allow_legacy_renegotiation = allow_legacy; -} - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -void mbedtls_ssl_conf_renegotiation( mbedtls_ssl_config *conf, int renegotiation ) -{ - conf->disable_renegotiation = renegotiation; -} - -void mbedtls_ssl_conf_renegotiation_enforced( mbedtls_ssl_config *conf, int max_records ) -{ - conf->renego_max_records = max_records; -} - -void mbedtls_ssl_conf_renegotiation_period( mbedtls_ssl_config *conf, - const unsigned char period[8] ) -{ - memcpy( conf->renego_period, period, 8 ); -} -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -#if defined(MBEDTLS_SSL_CLI_C) -void mbedtls_ssl_conf_session_tickets( mbedtls_ssl_config *conf, int use_tickets ) -{ - conf->session_tickets = use_tickets; -} -#endif - -#if defined(MBEDTLS_SSL_SRV_C) -void mbedtls_ssl_conf_session_tickets_cb( mbedtls_ssl_config *conf, - mbedtls_ssl_ticket_write_t *f_ticket_write, - mbedtls_ssl_ticket_parse_t *f_ticket_parse, - void *p_ticket ) -{ - conf->f_ticket_write = f_ticket_write; - conf->f_ticket_parse = f_ticket_parse; - conf->p_ticket = p_ticket; -} -#endif -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_SSL_EXPORT_KEYS) -void mbedtls_ssl_conf_export_keys_cb( mbedtls_ssl_config *conf, - mbedtls_ssl_export_keys_t *f_export_keys, - void *p_export_keys ) -{ - conf->f_export_keys = f_export_keys; - conf->p_export_keys = p_export_keys; -} -#endif - -/* - * SSL get accessors - */ -size_t mbedtls_ssl_get_bytes_avail( const mbedtls_ssl_context *ssl ) -{ - return( ssl->in_offt == NULL ? 0 : ssl->in_msglen ); -} - -uint32_t mbedtls_ssl_get_verify_result( const mbedtls_ssl_context *ssl ) -{ - if( ssl->session != NULL ) - return( ssl->session->verify_result ); - - if( ssl->session_negotiate != NULL ) - return( ssl->session_negotiate->verify_result ); - - return( 0xFFFFFFFF ); -} - -const char *mbedtls_ssl_get_ciphersuite( const mbedtls_ssl_context *ssl ) -{ - if( ssl == NULL || ssl->session == NULL ) - return( NULL ); - - return mbedtls_ssl_get_ciphersuite_name( ssl->session->ciphersuite ); -} - -const char *mbedtls_ssl_get_version( const mbedtls_ssl_context *ssl ) -{ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - switch( ssl->minor_ver ) - { - case MBEDTLS_SSL_MINOR_VERSION_2: - return( "DTLSv1.0" ); - - case MBEDTLS_SSL_MINOR_VERSION_3: - return( "DTLSv1.2" ); - - default: - return( "unknown (DTLS)" ); - } - } -#endif - - switch( ssl->minor_ver ) - { - case MBEDTLS_SSL_MINOR_VERSION_0: - return( "SSLv3.0" ); - - case MBEDTLS_SSL_MINOR_VERSION_1: - return( "TLSv1.0" ); - - case MBEDTLS_SSL_MINOR_VERSION_2: - return( "TLSv1.1" ); - - case MBEDTLS_SSL_MINOR_VERSION_3: - return( "TLSv1.2" ); - - default: - return( "unknown" ); - } -} - -int mbedtls_ssl_get_record_expansion( const mbedtls_ssl_context *ssl ) -{ - size_t transform_expansion; - const mbedtls_ssl_transform *transform = ssl->transform_out; - -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->session_out->compression != MBEDTLS_SSL_COMPRESS_NULL ) - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); -#endif - - if( transform == NULL ) - return( (int) mbedtls_ssl_hdr_len( ssl ) ); - - switch( mbedtls_cipher_get_cipher_mode( &transform->cipher_ctx_enc ) ) - { - case MBEDTLS_MODE_GCM: - case MBEDTLS_MODE_CCM: - case MBEDTLS_MODE_STREAM: - transform_expansion = transform->minlen; - break; - - case MBEDTLS_MODE_CBC: - transform_expansion = transform->maclen - + mbedtls_cipher_get_block_size( &transform->cipher_ctx_enc ); - break; - - default: - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - - return( (int)( mbedtls_ssl_hdr_len( ssl ) + transform_expansion ) ); -} - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -size_t mbedtls_ssl_get_max_frag_len( const mbedtls_ssl_context *ssl ) -{ - size_t max_len; - - /* - * Assume mfl_code is correct since it was checked when set - */ - max_len = mfl_code_to_length[ssl->conf->mfl_code]; - - /* - * Check if a smaller max length was negotiated - */ - if( ssl->session_out != NULL && - mfl_code_to_length[ssl->session_out->mfl_code] < max_len ) - { - max_len = mfl_code_to_length[ssl->session_out->mfl_code]; - } - - return max_len; -} -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -const mbedtls_x509_crt *mbedtls_ssl_get_peer_cert( const mbedtls_ssl_context *ssl ) -{ - if( ssl == NULL || ssl->session == NULL ) - return( NULL ); - - return( ssl->session->peer_cert ); -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_CLI_C) -int mbedtls_ssl_get_session( const mbedtls_ssl_context *ssl, mbedtls_ssl_session *dst ) -{ - if( ssl == NULL || - dst == NULL || - ssl->session == NULL || - ssl->conf->endpoint != MBEDTLS_SSL_IS_CLIENT ) - { - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - - return( ssl_session_copy( dst, ssl->session ) ); -} -#endif /* MBEDTLS_SSL_CLI_C */ - -/* - * Perform a single step of the SSL handshake - */ -int mbedtls_ssl_handshake_step( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - ret = mbedtls_ssl_handshake_client_step( ssl ); -#endif -#if defined(MBEDTLS_SSL_SRV_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - ret = mbedtls_ssl_handshake_server_step( ssl ); -#endif - - return( ret ); -} - -/* - * Perform the SSL handshake - */ -int mbedtls_ssl_handshake( mbedtls_ssl_context *ssl ) -{ - int ret = 0; - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> handshake" ) ); - - while( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - { - ret = mbedtls_ssl_handshake_step( ssl ); - - if( ret != 0 ) - break; - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= handshake" ) ); - - return( ret ); -} - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -#if defined(MBEDTLS_SSL_SRV_C) -/* - * Write HelloRequest to request renegotiation on server - */ -static int ssl_write_hello_request( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write hello request" ) ); - - ssl->out_msglen = 4; - ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; - ssl->out_msg[0] = MBEDTLS_SSL_HS_HELLO_REQUEST; - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write hello request" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_SSL_SRV_C */ - -/* - * Actually renegotiate current connection, triggered by either: - * - any side: calling mbedtls_ssl_renegotiate(), - * - client: receiving a HelloRequest during mbedtls_ssl_read(), - * - server: receiving any handshake message on server during mbedtls_ssl_read() after - * the initial handshake is completed. - * If the handshake doesn't complete due to waiting for I/O, it will continue - * during the next calls to mbedtls_ssl_renegotiate() or mbedtls_ssl_read() respectively. - */ -static int ssl_start_renegotiation( mbedtls_ssl_context *ssl ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> renegotiate" ) ); - - if( ( ret = ssl_handshake_init( ssl ) ) != 0 ) - return( ret ); - - /* RFC 6347 4.2.2: "[...] the HelloRequest will have message_seq = 0 and - * the ServerHello will have message_seq = 1" */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_PENDING ) - { - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - ssl->handshake->out_msg_seq = 1; - else - ssl->handshake->in_msg_seq = 1; - } -#endif - - ssl->state = MBEDTLS_SSL_HELLO_REQUEST; - ssl->renego_status = MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS; - - if( ( ret = mbedtls_ssl_handshake( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_handshake", ret ); - return( ret ); - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= renegotiate" ) ); - - return( 0 ); -} - -/* - * Renegotiate current connection on client, - * or request renegotiation on server - */ -int mbedtls_ssl_renegotiate( mbedtls_ssl_context *ssl ) -{ - int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_SSL_SRV_C) - /* On server, just send the request */ - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - { - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - ssl->renego_status = MBEDTLS_SSL_RENEGOTIATION_PENDING; - - /* Did we already try/start sending HelloRequest? */ - if( ssl->out_left != 0 ) - return( mbedtls_ssl_flush_output( ssl ) ); - - return( ssl_write_hello_request( ssl ) ); - } -#endif /* MBEDTLS_SSL_SRV_C */ - -#if defined(MBEDTLS_SSL_CLI_C) - /* - * On client, either start the renegotiation process or, - * if already in progress, continue the handshake - */ - if( ssl->renego_status != MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) - { - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( ( ret = ssl_start_renegotiation( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_start_renegotiation", ret ); - return( ret ); - } - } - else - { - if( ( ret = mbedtls_ssl_handshake( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_handshake", ret ); - return( ret ); - } - } -#endif /* MBEDTLS_SSL_CLI_C */ - - return( ret ); -} - -/* - * Check record counters and renegotiate if they're above the limit. - */ -static int ssl_check_ctr_renegotiate( mbedtls_ssl_context *ssl ) -{ - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER || - ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_PENDING || - ssl->conf->disable_renegotiation == MBEDTLS_SSL_RENEGOTIATION_DISABLED ) - { - return( 0 ); - } - - if( memcmp( ssl->in_ctr, ssl->conf->renego_period, 8 ) <= 0 && - memcmp( ssl->out_ctr, ssl->conf->renego_period, 8 ) <= 0 ) - { - return( 0 ); - } - - MBEDTLS_SSL_DEBUG_MSG( 1, ( "record counter limit reached: renegotiate" ) ); - return( mbedtls_ssl_renegotiate( ssl ) ); -} -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - -/* - * Receive application data decrypted from the SSL layer - */ -int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len ) -{ - int ret, record_read = 0; - size_t n; - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> read" ) ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 ) - return( ret ); - - if( ssl->handshake != NULL && - ssl->handshake->retransmit_state == MBEDTLS_SSL_RETRANS_SENDING ) - { - if( ( ret = mbedtls_ssl_resend( ssl ) ) != 0 ) - return( ret ); - } - } -#endif - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ( ret = ssl_check_ctr_renegotiate( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_check_ctr_renegotiate", ret ); - return( ret ); - } -#endif - - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - { - ret = mbedtls_ssl_handshake( ssl ); - if( ret == MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO ) - { - record_read = 1; - } - else if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_handshake", ret ); - return( ret ); - } - } - - if( ssl->in_offt == NULL ) - { - /* Start timer if not already running */ - if( ssl->f_get_timer != NULL && - ssl->f_get_timer( ssl->p_timer ) == -1 ) - { - ssl_set_timer( ssl, ssl->conf->read_timeout ); - } - - if( ! record_read ) - { - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_SSL_CONN_EOF ) - return( 0 ); - - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - } - - if( ssl->in_msglen == 0 && - ssl->in_msgtype == MBEDTLS_SSL_MSG_APPLICATION_DATA ) - { - /* - * OpenSSL sends empty messages to randomize the IV - */ - if( ( ret = mbedtls_ssl_read_record( ssl ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_SSL_CONN_EOF ) - return( 0 ); - - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret ); - return( ret ); - } - } - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_HANDSHAKE ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "received handshake message" ) ); - -#if defined(MBEDTLS_SSL_CLI_C) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT && - ( ssl->in_msg[0] != MBEDTLS_SSL_HS_HELLO_REQUEST || - ssl->in_hslen != mbedtls_ssl_hs_hdr_len( ssl ) ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "handshake received (not HelloRequest)" ) ); - - /* With DTLS, drop the packet (probably from last handshake) */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - return( MBEDTLS_ERR_SSL_WANT_READ ); -#endif - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->in_msg[0] != MBEDTLS_SSL_HS_CLIENT_HELLO ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "handshake received (not ClientHello)" ) ); - - /* With DTLS, drop the packet (probably from last handshake) */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - return( MBEDTLS_ERR_SSL_WANT_READ ); -#endif - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } -#endif - - if( ssl->conf->disable_renegotiation == MBEDTLS_SSL_RENEGOTIATION_DISABLED || - ( ssl->secure_renegotiation == MBEDTLS_SSL_LEGACY_RENEGOTIATION && - ssl->conf->allow_legacy_renegotiation == - MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION ) ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "refusing renegotiation, sending alert" ) ); - -#if defined(MBEDTLS_SSL_PROTO_SSL3) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) - { - /* - * SSLv3 does not have a "no_renegotiation" alert - */ - if( ( ret = mbedtls_ssl_send_fatal_handshake_failure( ssl ) ) != 0 ) - return( ret ); - } - else -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_1 ) - { - if( ( ret = mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_WARNING, - MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION ) ) != 0 ) - { - return( ret ); - } - } - else -#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || - MBEDTLS_SSL_PROTO_TLS1_2 */ - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) ); - return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } - } - else - { - /* DTLS clients need to know renego is server-initiated */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT ) - { - ssl->renego_status = MBEDTLS_SSL_RENEGOTIATION_PENDING; - } -#endif - ret = ssl_start_renegotiation( ssl ); - if( ret == MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO ) - { - record_read = 1; - } - else if( ret != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_start_renegotiation", ret ); - return( ret ); - } - } - - /* If a non-handshake record was read during renego, fallthrough, - * else tell the user they should call mbedtls_ssl_read() again */ - if( ! record_read ) - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - else if( ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_PENDING ) - { - - if( ssl->conf->renego_max_records >= 0 ) - { - if( ++ssl->renego_records_seen > ssl->conf->renego_max_records ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "renegotiation requested, " - "but not honored by client" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - } - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - /* Fatal and closure alerts handled by mbedtls_ssl_read_record() */ - if( ssl->in_msgtype == MBEDTLS_SSL_MSG_ALERT ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "ignoring non-fatal non-closure alert" ) ); - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - - if( ssl->in_msgtype != MBEDTLS_SSL_MSG_APPLICATION_DATA ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad application data message" ) ); - return( MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE ); - } - - ssl->in_offt = ssl->in_msg; - - /* We're going to return something now, cancel timer, - * except if handshake (renegotiation) is in progress */ - if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER ) - ssl_set_timer( ssl, 0 ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - /* If we requested renego but received AppData, resend HelloRequest. - * Do it now, after setting in_offt, to avoid taking this branch - * again if ssl_write_hello_request() returns WANT_WRITE */ -#if defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_SSL_RENEGOTIATION) - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && - ssl->renego_status == MBEDTLS_SSL_RENEGOTIATION_PENDING ) - { - if( ( ret = ssl_resend_hello_request( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_resend_hello_request", ret ); - return( ret ); - } - } -#endif /* MBEDTLS_SSL_SRV_C && MBEDTLS_SSL_RENEGOTIATION */ -#endif - } - - n = ( len < ssl->in_msglen ) - ? len : ssl->in_msglen; - - memcpy( buf, ssl->in_offt, n ); - ssl->in_msglen -= n; - - if( ssl->in_msglen == 0 ) - /* all bytes consumed */ - ssl->in_offt = NULL; - else - /* more data available */ - ssl->in_offt += n; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= read" ) ); - - return( (int) n ); -} - -/* - * Send application data to be encrypted by the SSL layer, - * taking care of max fragment length and buffer size - */ -static int ssl_write_real( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - int ret; -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - size_t max_len = mbedtls_ssl_get_max_frag_len( ssl ); - - if( len > max_len ) - { -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "fragment larger than the (negotiated) " - "maximum fragment length: %d > %d", - len, max_len ) ); - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - } - else -#endif - len = max_len; - } -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - - if( ssl->out_left != 0 ) - { - if( ( ret = mbedtls_ssl_flush_output( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_flush_output", ret ); - return( ret ); - } - } - else - { - ssl->out_msglen = len; - ssl->out_msgtype = MBEDTLS_SSL_MSG_APPLICATION_DATA; - memcpy( ssl->out_msg, buf, len ); - - if( ( ret = mbedtls_ssl_write_record( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_write_record", ret ); - return( ret ); - } - } - - return( (int) len ); -} - -/* - * Write application data, doing 1/n-1 splitting if necessary. - * - * With non-blocking I/O, ssl_write_real() may return WANT_WRITE, - * then the caller will call us again with the same arguments, so - * remember wether we already did the split or not. - */ -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) -static int ssl_write_split( mbedtls_ssl_context *ssl, - const unsigned char *buf, size_t len ) -{ - int ret; - - if( ssl->conf->cbc_record_splitting == - MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED || - len <= 1 || - ssl->minor_ver > MBEDTLS_SSL_MINOR_VERSION_1 || - mbedtls_cipher_get_cipher_mode( &ssl->transform_out->cipher_ctx_enc ) - != MBEDTLS_MODE_CBC ) - { - return( ssl_write_real( ssl, buf, len ) ); - } - - if( ssl->split_done == 0 ) - { - if( ( ret = ssl_write_real( ssl, buf, 1 ) ) <= 0 ) - return( ret ); - ssl->split_done = 1; - } - - if( ( ret = ssl_write_real( ssl, buf + 1, len - 1 ) ) <= 0 ) - return( ret ); - ssl->split_done = 0; - - return( ret + 1 ); -} -#endif /* MBEDTLS_SSL_CBC_RECORD_SPLITTING */ - -/* - * Write application data (public-facing wrapper) - */ -int mbedtls_ssl_write( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) -{ - int ret; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write" ) ); - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( ( ret = ssl_check_ctr_renegotiate( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_check_ctr_renegotiate", ret ); - return( ret ); - } -#endif - - if( ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) - { - if( ( ret = mbedtls_ssl_handshake( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_handshake", ret ); - return( ret ); - } - } - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - ret = ssl_write_split( ssl, buf, len ); -#else - ret = ssl_write_real( ssl, buf, len ); -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write" ) ); - - return( ret ); -} - -/* - * Notify the peer that the connection is being closed - */ -int mbedtls_ssl_close_notify( mbedtls_ssl_context *ssl ) -{ - int ret; - - if( ssl == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write close notify" ) ); - - if( ssl->out_left != 0 ) - return( mbedtls_ssl_flush_output( ssl ) ); - - if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER ) - { - if( ( ret = mbedtls_ssl_send_alert_message( ssl, - MBEDTLS_SSL_ALERT_LEVEL_WARNING, - MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_send_alert_message", ret ); - return( ret ); - } - } - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= write close notify" ) ); - - return( 0 ); -} - -void mbedtls_ssl_transform_free( mbedtls_ssl_transform *transform ) -{ - if( transform == NULL ) - return; - -#if defined(MBEDTLS_ZLIB_SUPPORT) - deflateEnd( &transform->ctx_deflate ); - inflateEnd( &transform->ctx_inflate ); -#endif - - mbedtls_cipher_free( &transform->cipher_ctx_enc ); - mbedtls_cipher_free( &transform->cipher_ctx_dec ); - - mbedtls_md_free( &transform->md_ctx_enc ); - mbedtls_md_free( &transform->md_ctx_dec ); - - mbedtls_zeroize( transform, sizeof( mbedtls_ssl_transform ) ); -} - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -static void ssl_key_cert_free( mbedtls_ssl_key_cert *key_cert ) -{ - mbedtls_ssl_key_cert *cur = key_cert, *next; - - while( cur != NULL ) - { - next = cur->next; - mbedtls_free( cur ); - cur = next; - } -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -void mbedtls_ssl_handshake_free( mbedtls_ssl_handshake_params *handshake ) -{ - if( handshake == NULL ) - return; - -#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \ - defined(MBEDTLS_SSL_PROTO_TLS1_1) - mbedtls_md5_free( &handshake->fin_md5 ); - mbedtls_sha1_free( &handshake->fin_sha1 ); -#endif -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) -#if defined(MBEDTLS_SHA256_C) - mbedtls_sha256_free( &handshake->fin_sha256 ); -#endif -#if defined(MBEDTLS_SHA512_C) - mbedtls_sha512_free( &handshake->fin_sha512 ); -#endif -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ - -#if defined(MBEDTLS_DHM_C) - mbedtls_dhm_free( &handshake->dhm_ctx ); -#endif -#if defined(MBEDTLS_ECDH_C) - mbedtls_ecdh_free( &handshake->ecdh_ctx ); -#endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - mbedtls_ecjpake_free( &handshake->ecjpake_ctx ); -#if defined(MBEDTLS_SSL_CLI_C) - mbedtls_free( handshake->ecjpake_cache ); - handshake->ecjpake_cache = NULL; - handshake->ecjpake_cache_len = 0; -#endif -#endif - -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) - /* explicit void pointer cast for buggy MS compiler */ - mbedtls_free( (void *) handshake->curves ); -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - if( handshake->psk != NULL ) - { - mbedtls_zeroize( handshake->psk, handshake->psk_len ); - mbedtls_free( handshake->psk ); - } -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) && \ - defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - /* - * Free only the linked list wrapper, not the keys themselves - * since the belong to the SNI callback - */ - if( handshake->sni_key_cert != NULL ) - { - mbedtls_ssl_key_cert *cur = handshake->sni_key_cert, *next; - - while( cur != NULL ) - { - next = cur->next; - mbedtls_free( cur ); - cur = next; - } - } -#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_SSL_SERVER_NAME_INDICATION */ - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - mbedtls_free( handshake->verify_cookie ); - mbedtls_free( handshake->hs_msg ); - ssl_flight_free( handshake->flight ); -#endif - - mbedtls_zeroize( handshake, sizeof( mbedtls_ssl_handshake_params ) ); -} - -void mbedtls_ssl_session_free( mbedtls_ssl_session *session ) -{ - if( session == NULL ) - return; - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( session->peer_cert != NULL ) - { - mbedtls_x509_crt_free( session->peer_cert ); - mbedtls_free( session->peer_cert ); - } -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) - mbedtls_free( session->ticket ); -#endif - - mbedtls_zeroize( session, sizeof( mbedtls_ssl_session ) ); -} - -/* - * Free an SSL context - */ -void mbedtls_ssl_free( mbedtls_ssl_context *ssl ) -{ - if( ssl == NULL ) - return; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> free" ) ); - - if( ssl->out_buf != NULL ) - { - mbedtls_zeroize( ssl->out_buf, MBEDTLS_SSL_BUFFER_LEN ); - mbedtls_free( ssl->out_buf ); - } - - if( ssl->in_buf != NULL ) - { - mbedtls_zeroize( ssl->in_buf, MBEDTLS_SSL_BUFFER_LEN ); - mbedtls_free( ssl->in_buf ); - } - -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->compress_buf != NULL ) - { - mbedtls_zeroize( ssl->compress_buf, MBEDTLS_SSL_BUFFER_LEN ); - mbedtls_free( ssl->compress_buf ); - } -#endif - - if( ssl->transform ) - { - mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); - } - - if( ssl->handshake ) - { - mbedtls_ssl_handshake_free( ssl->handshake ); - mbedtls_ssl_transform_free( ssl->transform_negotiate ); - mbedtls_ssl_session_free( ssl->session_negotiate ); - - mbedtls_free( ssl->handshake ); - mbedtls_free( ssl->transform_negotiate ); - mbedtls_free( ssl->session_negotiate ); - } - - if( ssl->session ) - { - mbedtls_ssl_session_free( ssl->session ); - mbedtls_free( ssl->session ); - } - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( ssl->hostname != NULL ) - { - mbedtls_zeroize( ssl->hostname, strlen( ssl->hostname ) ); - mbedtls_free( ssl->hostname ); - } -#endif - -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - if( mbedtls_ssl_hw_record_finish != NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 2, ( "going for mbedtls_ssl_hw_record_finish()" ) ); - mbedtls_ssl_hw_record_finish( ssl ); - } -#endif - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) - mbedtls_free( ssl->cli_id ); -#endif - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= free" ) ); - - /* Actually clear after last debug message */ - mbedtls_zeroize( ssl, sizeof( mbedtls_ssl_context ) ); -} - -/* - * Initialze mbedtls_ssl_config - */ -void mbedtls_ssl_config_init( mbedtls_ssl_config *conf ) -{ - memset( conf, 0, sizeof( mbedtls_ssl_config ) ); -} - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -static int ssl_preset_default_hashes[] = { -#if defined(MBEDTLS_SHA512_C) - MBEDTLS_MD_SHA512, - MBEDTLS_MD_SHA384, -#endif -#if defined(MBEDTLS_SHA256_C) - MBEDTLS_MD_SHA256, - MBEDTLS_MD_SHA224, -#endif -#if defined(MBEDTLS_SHA1_C) - MBEDTLS_MD_SHA1, -#endif - MBEDTLS_MD_NONE -}; -#endif - -static int ssl_preset_suiteb_ciphersuites[] = { - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - 0 -}; - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -static int ssl_preset_suiteb_hashes[] = { - MBEDTLS_MD_SHA256, - MBEDTLS_MD_SHA384, - MBEDTLS_MD_NONE -}; -#endif - -#if defined(MBEDTLS_ECP_C) -static mbedtls_ecp_group_id ssl_preset_suiteb_curves[] = { - MBEDTLS_ECP_DP_SECP256R1, - MBEDTLS_ECP_DP_SECP384R1, - MBEDTLS_ECP_DP_NONE -}; -#endif - -/* - * Load default in mbedtls_ssl_config - */ -int mbedtls_ssl_config_defaults( mbedtls_ssl_config *conf, - int endpoint, int transport, int preset ) -{ -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_SRV_C) - int ret; -#endif - - /* Use the functions here so that they are covered in tests, - * but otherwise access member directly for efficiency */ - mbedtls_ssl_conf_endpoint( conf, endpoint ); - mbedtls_ssl_conf_transport( conf, transport ); - - /* - * Things that are common to all presets - */ -#if defined(MBEDTLS_SSL_CLI_C) - if( endpoint == MBEDTLS_SSL_IS_CLIENT ) - { - conf->authmode = MBEDTLS_SSL_VERIFY_REQUIRED; -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - conf->session_tickets = MBEDTLS_SSL_SESSION_TICKETS_ENABLED; -#endif - } -#endif - -#if defined(MBEDTLS_ARC4_C) - conf->arc4_disabled = MBEDTLS_SSL_ARC4_DISABLED; -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - conf->encrypt_then_mac = MBEDTLS_SSL_ETM_ENABLED; -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - conf->extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; -#endif - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - conf->cbc_record_splitting = MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED; -#endif - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) - conf->f_cookie_write = ssl_cookie_write_dummy; - conf->f_cookie_check = ssl_cookie_check_dummy; -#endif - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - conf->anti_replay = MBEDTLS_SSL_ANTI_REPLAY_ENABLED; -#endif - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - conf->hs_timeout_min = MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MIN; - conf->hs_timeout_max = MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MAX; -#endif - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - conf->renego_max_records = MBEDTLS_SSL_RENEGO_MAX_RECORDS_DEFAULT; - memset( conf->renego_period, 0xFF, 7 ); - conf->renego_period[7] = 0x00; -#endif - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_SRV_C) - if( endpoint == MBEDTLS_SSL_IS_SERVER ) - { - if( ( ret = mbedtls_ssl_conf_dh_param( conf, - MBEDTLS_DHM_RFC5114_MODP_2048_P, - MBEDTLS_DHM_RFC5114_MODP_2048_G ) ) != 0 ) - { - return( ret ); - } - } -#endif - - /* - * Preset-specific defaults - */ - switch( preset ) - { - /* - * NSA Suite B - */ - case MBEDTLS_SSL_PRESET_SUITEB: - conf->min_major_ver = MBEDTLS_SSL_MAJOR_VERSION_3; - conf->min_minor_ver = MBEDTLS_SSL_MINOR_VERSION_3; /* TLS 1.2 */ - conf->max_major_ver = MBEDTLS_SSL_MAX_MAJOR_VERSION; - conf->max_minor_ver = MBEDTLS_SSL_MAX_MINOR_VERSION; - - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_0] = - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_1] = - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_2] = - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_3] = - ssl_preset_suiteb_ciphersuites; - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - conf->cert_profile = &mbedtls_x509_crt_profile_suiteb; -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) - conf->sig_hashes = ssl_preset_suiteb_hashes; -#endif - -#if defined(MBEDTLS_ECP_C) - conf->curve_list = ssl_preset_suiteb_curves; -#endif - break; - - /* - * Default - */ - default: - conf->min_major_ver = MBEDTLS_SSL_MAJOR_VERSION_3; - conf->min_minor_ver = MBEDTLS_SSL_MINOR_VERSION_1; /* TLS 1.0 */ - conf->max_major_ver = MBEDTLS_SSL_MAX_MAJOR_VERSION; - conf->max_minor_ver = MBEDTLS_SSL_MAX_MINOR_VERSION; - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - conf->min_minor_ver = MBEDTLS_SSL_MINOR_VERSION_2; -#endif - - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_0] = - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_1] = - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_2] = - conf->ciphersuite_list[MBEDTLS_SSL_MINOR_VERSION_3] = - mbedtls_ssl_list_ciphersuites(); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - conf->cert_profile = &mbedtls_x509_crt_profile_default; -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) - conf->sig_hashes = ssl_preset_default_hashes; -#endif - -#if defined(MBEDTLS_ECP_C) - conf->curve_list = mbedtls_ecp_grp_id_list(); -#endif - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_SSL_CLI_C) - conf->dhm_min_bitlen = 1024; -#endif - } - - return( 0 ); -} - -/* - * Free mbedtls_ssl_config - */ -void mbedtls_ssl_config_free( mbedtls_ssl_config *conf ) -{ -#if defined(MBEDTLS_DHM_C) - mbedtls_mpi_free( &conf->dhm_P ); - mbedtls_mpi_free( &conf->dhm_G ); -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - if( conf->psk != NULL ) - { - mbedtls_zeroize( conf->psk, conf->psk_len ); - mbedtls_zeroize( conf->psk_identity, conf->psk_identity_len ); - mbedtls_free( conf->psk ); - mbedtls_free( conf->psk_identity ); - conf->psk_len = 0; - conf->psk_identity_len = 0; - } -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - ssl_key_cert_free( conf->key_cert ); -#endif - - mbedtls_zeroize( conf, sizeof( mbedtls_ssl_config ) ); -} - -#if defined(MBEDTLS_PK_C) && \ - ( defined(MBEDTLS_RSA_C) || defined(MBEDTLS_ECDSA_C) ) -/* - * Convert between MBEDTLS_PK_XXX and SSL_SIG_XXX - */ -unsigned char mbedtls_ssl_sig_from_pk( mbedtls_pk_context *pk ) -{ -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_can_do( pk, MBEDTLS_PK_RSA ) ) - return( MBEDTLS_SSL_SIG_RSA ); -#endif -#if defined(MBEDTLS_ECDSA_C) - if( mbedtls_pk_can_do( pk, MBEDTLS_PK_ECDSA ) ) - return( MBEDTLS_SSL_SIG_ECDSA ); -#endif - return( MBEDTLS_SSL_SIG_ANON ); -} - -mbedtls_pk_type_t mbedtls_ssl_pk_alg_from_sig( unsigned char sig ) -{ - switch( sig ) - { -#if defined(MBEDTLS_RSA_C) - case MBEDTLS_SSL_SIG_RSA: - return( MBEDTLS_PK_RSA ); -#endif -#if defined(MBEDTLS_ECDSA_C) - case MBEDTLS_SSL_SIG_ECDSA: - return( MBEDTLS_PK_ECDSA ); -#endif - default: - return( MBEDTLS_PK_NONE ); - } -} -#endif /* MBEDTLS_PK_C && ( MBEDTLS_RSA_C || MBEDTLS_ECDSA_C ) */ - -/* - * Convert from MBEDTLS_SSL_HASH_XXX to MBEDTLS_MD_XXX - */ -mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash( unsigned char hash ) -{ - switch( hash ) - { -#if defined(MBEDTLS_MD5_C) - case MBEDTLS_SSL_HASH_MD5: - return( MBEDTLS_MD_MD5 ); -#endif -#if defined(MBEDTLS_SHA1_C) - case MBEDTLS_SSL_HASH_SHA1: - return( MBEDTLS_MD_SHA1 ); -#endif -#if defined(MBEDTLS_SHA256_C) - case MBEDTLS_SSL_HASH_SHA224: - return( MBEDTLS_MD_SHA224 ); - case MBEDTLS_SSL_HASH_SHA256: - return( MBEDTLS_MD_SHA256 ); -#endif -#if defined(MBEDTLS_SHA512_C) - case MBEDTLS_SSL_HASH_SHA384: - return( MBEDTLS_MD_SHA384 ); - case MBEDTLS_SSL_HASH_SHA512: - return( MBEDTLS_MD_SHA512 ); -#endif - default: - return( MBEDTLS_MD_NONE ); - } -} - -/* - * Convert from MBEDTLS_MD_XXX to MBEDTLS_SSL_HASH_XXX - */ -unsigned char mbedtls_ssl_hash_from_md_alg( int md ) -{ - switch( md ) - { -#if defined(MBEDTLS_MD5_C) - case MBEDTLS_MD_MD5: - return( MBEDTLS_SSL_HASH_MD5 ); -#endif -#if defined(MBEDTLS_SHA1_C) - case MBEDTLS_MD_SHA1: - return( MBEDTLS_SSL_HASH_SHA1 ); -#endif -#if defined(MBEDTLS_SHA256_C) - case MBEDTLS_MD_SHA224: - return( MBEDTLS_SSL_HASH_SHA224 ); - case MBEDTLS_MD_SHA256: - return( MBEDTLS_SSL_HASH_SHA256 ); -#endif -#if defined(MBEDTLS_SHA512_C) - case MBEDTLS_MD_SHA384: - return( MBEDTLS_SSL_HASH_SHA384 ); - case MBEDTLS_MD_SHA512: - return( MBEDTLS_SSL_HASH_SHA512 ); -#endif - default: - return( MBEDTLS_SSL_HASH_NONE ); - } -} - -#if defined(MBEDTLS_ECP_C) -/* - * Check if a curve proposed by the peer is in our list. - * Return 0 if we're willing to use it, -1 otherwise. - */ -int mbedtls_ssl_check_curve( const mbedtls_ssl_context *ssl, mbedtls_ecp_group_id grp_id ) -{ - const mbedtls_ecp_group_id *gid; - - if( ssl->conf->curve_list == NULL ) - return( -1 ); - - for( gid = ssl->conf->curve_list; *gid != MBEDTLS_ECP_DP_NONE; gid++ ) - if( *gid == grp_id ) - return( 0 ); - - return( -1 ); -} -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) -/* - * Check if a hash proposed by the peer is in our list. - * Return 0 if we're willing to use it, -1 otherwise. - */ -int mbedtls_ssl_check_sig_hash( const mbedtls_ssl_context *ssl, - mbedtls_md_type_t md ) -{ - const int *cur; - - if( ssl->conf->sig_hashes == NULL ) - return( -1 ); - - for( cur = ssl->conf->sig_hashes; *cur != MBEDTLS_MD_NONE; cur++ ) - if( *cur == (int) md ) - return( 0 ); - - return( -1 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED */ - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -int mbedtls_ssl_check_cert_usage( const mbedtls_x509_crt *cert, - const mbedtls_ssl_ciphersuite_t *ciphersuite, - int cert_endpoint, - uint32_t *flags ) -{ - int ret = 0; -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) - int usage = 0; -#endif -#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) - const char *ext_oid; - size_t ext_len; -#endif - -#if !defined(MBEDTLS_X509_CHECK_KEY_USAGE) && \ - !defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) - ((void) cert); - ((void) cert_endpoint); - ((void) flags); -#endif - -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) - if( cert_endpoint == MBEDTLS_SSL_IS_SERVER ) - { - /* Server part of the key exchange */ - switch( ciphersuite->key_exchange ) - { - case MBEDTLS_KEY_EXCHANGE_RSA: - case MBEDTLS_KEY_EXCHANGE_RSA_PSK: - usage = MBEDTLS_X509_KU_KEY_ENCIPHERMENT; - break; - - case MBEDTLS_KEY_EXCHANGE_DHE_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA: - usage = MBEDTLS_X509_KU_DIGITAL_SIGNATURE; - break; - - case MBEDTLS_KEY_EXCHANGE_ECDH_RSA: - case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA: - usage = MBEDTLS_X509_KU_KEY_AGREEMENT; - break; - - /* Don't use default: we want warnings when adding new values */ - case MBEDTLS_KEY_EXCHANGE_NONE: - case MBEDTLS_KEY_EXCHANGE_PSK: - case MBEDTLS_KEY_EXCHANGE_DHE_PSK: - case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK: - case MBEDTLS_KEY_EXCHANGE_ECJPAKE: - usage = 0; - } - } - else - { - /* Client auth: we only implement rsa_sign and mbedtls_ecdsa_sign for now */ - usage = MBEDTLS_X509_KU_DIGITAL_SIGNATURE; - } - - if( mbedtls_x509_crt_check_key_usage( cert, usage ) != 0 ) - { - *flags |= MBEDTLS_X509_BADCERT_KEY_USAGE; - ret = -1; - } -#else - ((void) ciphersuite); -#endif /* MBEDTLS_X509_CHECK_KEY_USAGE */ - -#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) - if( cert_endpoint == MBEDTLS_SSL_IS_SERVER ) - { - ext_oid = MBEDTLS_OID_SERVER_AUTH; - ext_len = MBEDTLS_OID_SIZE( MBEDTLS_OID_SERVER_AUTH ); - } - else - { - ext_oid = MBEDTLS_OID_CLIENT_AUTH; - ext_len = MBEDTLS_OID_SIZE( MBEDTLS_OID_CLIENT_AUTH ); - } - - if( mbedtls_x509_crt_check_extended_key_usage( cert, ext_oid, ext_len ) != 0 ) - { - *flags |= MBEDTLS_X509_BADCERT_EXT_KEY_USAGE; - ret = -1; - } -#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */ - - return( ret ); -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -/* - * Convert version numbers to/from wire format - * and, for DTLS, to/from TLS equivalent. - * - * For TLS this is the identity. - * For DTLS, use one complement (v -> 255 - v, and then map as follows: - * 1.0 <-> 3.2 (DTLS 1.0 is based on TLS 1.1) - * 1.x <-> 3.x+1 for x != 0 (DTLS 1.2 based on TLS 1.2) - */ -void mbedtls_ssl_write_version( int major, int minor, int transport, - unsigned char ver[2] ) -{ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - if( minor == MBEDTLS_SSL_MINOR_VERSION_2 ) - --minor; /* DTLS 1.0 stored as TLS 1.1 internally */ - - ver[0] = (unsigned char)( 255 - ( major - 2 ) ); - ver[1] = (unsigned char)( 255 - ( minor - 1 ) ); - } - else -#else - ((void) transport); -#endif - { - ver[0] = (unsigned char) major; - ver[1] = (unsigned char) minor; - } -} - -void mbedtls_ssl_read_version( int *major, int *minor, int transport, - const unsigned char ver[2] ) -{ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - *major = 255 - ver[0] + 2; - *minor = 255 - ver[1] + 1; - - if( *minor == MBEDTLS_SSL_MINOR_VERSION_1 ) - ++*minor; /* DTLS 1.0 stored as TLS 1.1 internally */ - } - else -#else - ((void) transport); -#endif - { - *major = ver[0]; - *minor = ver[1]; - } -} - -#endif /* MBEDTLS_SSL_TLS_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/threading.c b/build/premake/premake5/contrib/mbedtls/library/threading.c deleted file mode 100644 index 1b6d9cd445..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/threading.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Threading abstraction layer - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_THREADING_C) - -#include "mbedtls/threading.h" - -#if defined(MBEDTLS_THREADING_PTHREAD) -static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex ) -{ - if( mutex == NULL ) - return; - - mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0; -} - -static void threading_mutex_free_pthread( mbedtls_threading_mutex_t *mutex ) -{ - if( mutex == NULL ) - return; - - (void) pthread_mutex_destroy( &mutex->mutex ); -} - -static int threading_mutex_lock_pthread( mbedtls_threading_mutex_t *mutex ) -{ - if( mutex == NULL || ! mutex->is_valid ) - return( MBEDTLS_ERR_THREADING_BAD_INPUT_DATA ); - - if( pthread_mutex_lock( &mutex->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); - - return( 0 ); -} - -static int threading_mutex_unlock_pthread( mbedtls_threading_mutex_t *mutex ) -{ - if( mutex == NULL || ! mutex->is_valid ) - return( MBEDTLS_ERR_THREADING_BAD_INPUT_DATA ); - - if( pthread_mutex_unlock( &mutex->mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); - - return( 0 ); -} - -void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t * ) = threading_mutex_init_pthread; -void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t * ) = threading_mutex_free_pthread; -int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t * ) = threading_mutex_lock_pthread; -int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t * ) = threading_mutex_unlock_pthread; - -/* - * With phtreads we can statically initialize mutexes - */ -#define MUTEX_INIT = { PTHREAD_MUTEX_INITIALIZER, 1 } - -#endif /* MBEDTLS_THREADING_PTHREAD */ - -#if defined(MBEDTLS_THREADING_ALT) -static int threading_mutex_fail( mbedtls_threading_mutex_t *mutex ) -{ - ((void) mutex ); - return( MBEDTLS_ERR_THREADING_BAD_INPUT_DATA ); -} -static void threading_mutex_dummy( mbedtls_threading_mutex_t *mutex ) -{ - ((void) mutex ); - return; -} - -void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t * ) = threading_mutex_dummy; -void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t * ) = threading_mutex_dummy; -int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t * ) = threading_mutex_fail; -int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t * ) = threading_mutex_fail; - -/* - * Set functions pointers and initialize global mutexes - */ -void mbedtls_threading_set_alt( void (*mutex_init)( mbedtls_threading_mutex_t * ), - void (*mutex_free)( mbedtls_threading_mutex_t * ), - int (*mutex_lock)( mbedtls_threading_mutex_t * ), - int (*mutex_unlock)( mbedtls_threading_mutex_t * ) ) -{ - mbedtls_mutex_init = mutex_init; - mbedtls_mutex_free = mutex_free; - mbedtls_mutex_lock = mutex_lock; - mbedtls_mutex_unlock = mutex_unlock; - - mbedtls_mutex_init( &mbedtls_threading_readdir_mutex ); - mbedtls_mutex_init( &mbedtls_threading_gmtime_mutex ); -} - -/* - * Free global mutexes - */ -void mbedtls_threading_free_alt( void ) -{ - mbedtls_mutex_free( &mbedtls_threading_readdir_mutex ); - mbedtls_mutex_free( &mbedtls_threading_gmtime_mutex ); -} -#endif /* MBEDTLS_THREADING_ALT */ - -/* - * Define global mutexes - */ -#ifndef MUTEX_INIT -#define MUTEX_INIT -#endif -mbedtls_threading_mutex_t mbedtls_threading_readdir_mutex MUTEX_INIT; -mbedtls_threading_mutex_t mbedtls_threading_gmtime_mutex MUTEX_INIT; - -#endif /* MBEDTLS_THREADING_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/timing.c b/build/premake/premake5/contrib/mbedtls/library/timing.c deleted file mode 100644 index 5d8b25b997..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/timing.c +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Portable interface to the CPU cycle counter - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_TIMING_C) - -#include "mbedtls/timing.h" - -#if !defined(MBEDTLS_TIMING_ALT) - -#ifndef asm -#define asm __asm -#endif - -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) - -#include -#include - -struct _hr_time -{ - LARGE_INTEGER start; -}; - -#else - -#include -#include -#include -#include -#include - -struct _hr_time -{ - struct timeval start; -}; - -#endif /* _WIN32 && !EFIX64 && !EFI32 */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - ( defined(_MSC_VER) && defined(_M_IX86) ) || defined(__WATCOMC__) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long tsc; - __asm rdtsc - __asm mov [tsc], eax - return( tsc ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - ( _MSC_VER && _M_IX86 ) || __WATCOMC__ */ - -/* some versions of mingw-64 have 32-bit longs even on x84_64 */ -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && ( defined(__i386__) || ( \ - ( defined(__amd64__) || defined( __x86_64__) ) && __SIZEOF_LONG__ == 4 ) ) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long lo, hi; - asm volatile( "rdtsc" : "=a" (lo), "=d" (hi) ); - return( lo ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && __i386__ */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && ( defined(__amd64__) || defined(__x86_64__) ) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long lo, hi; - asm volatile( "rdtsc" : "=a" (lo), "=d" (hi) ); - return( lo | ( hi << 32 ) ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && ( __amd64__ || __x86_64__ ) */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && ( defined(__powerpc__) || defined(__ppc__) ) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long tbl, tbu0, tbu1; - - do - { - asm volatile( "mftbu %0" : "=r" (tbu0) ); - asm volatile( "mftb %0" : "=r" (tbl ) ); - asm volatile( "mftbu %0" : "=r" (tbu1) ); - } - while( tbu0 != tbu1 ); - - return( tbl ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && ( __powerpc__ || __ppc__ ) */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && defined(__sparc64__) - -#if defined(__OpenBSD__) -#warning OpenBSD does not allow access to tick register using software version instead -#else -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long tick; - asm volatile( "rdpr %%tick, %0;" : "=&r" (tick) ); - return( tick ); -} -#endif /* __OpenBSD__ */ -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && __sparc64__ */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && defined(__sparc__) && !defined(__sparc64__) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long tick; - asm volatile( ".byte 0x83, 0x41, 0x00, 0x00" ); - asm volatile( "mov %%g1, %0" : "=r" (tick) ); - return( tick ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && __sparc__ && !__sparc64__ */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && defined(__alpha__) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long cc; - asm volatile( "rpcc %0" : "=r" (cc) ); - return( cc & 0xFFFFFFFF ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && __alpha__ */ - -#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \ - defined(__GNUC__) && defined(__ia64__) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - unsigned long itc; - asm volatile( "mov %0 = ar.itc" : "=r" (itc) ); - return( itc ); -} -#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM && - __GNUC__ && __ia64__ */ - -#if !defined(HAVE_HARDCLOCK) && defined(_MSC_VER) && \ - !defined(EFIX64) && !defined(EFI32) - -#define HAVE_HARDCLOCK - -unsigned long mbedtls_timing_hardclock( void ) -{ - LARGE_INTEGER offset; - - QueryPerformanceCounter( &offset ); - - return( (unsigned long)( offset.QuadPart ) ); -} -#endif /* !HAVE_HARDCLOCK && _MSC_VER && !EFIX64 && !EFI32 */ - -#if !defined(HAVE_HARDCLOCK) - -#define HAVE_HARDCLOCK - -static int hardclock_init = 0; -static struct timeval tv_init; - -unsigned long mbedtls_timing_hardclock( void ) -{ - struct timeval tv_cur; - - if( hardclock_init == 0 ) - { - gettimeofday( &tv_init, NULL ); - hardclock_init = 1; - } - - gettimeofday( &tv_cur, NULL ); - return( ( tv_cur.tv_sec - tv_init.tv_sec ) * 1000000 - + ( tv_cur.tv_usec - tv_init.tv_usec ) ); -} -#endif /* !HAVE_HARDCLOCK */ - -volatile int mbedtls_timing_alarmed = 0; - -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) - -unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset ) -{ - unsigned long delta; - LARGE_INTEGER offset, hfreq; - struct _hr_time *t = (struct _hr_time *) val; - - QueryPerformanceCounter( &offset ); - QueryPerformanceFrequency( &hfreq ); - - delta = (unsigned long)( ( 1000 * - ( offset.QuadPart - t->start.QuadPart ) ) / - hfreq.QuadPart ); - - if( reset ) - QueryPerformanceCounter( &t->start ); - - return( delta ); -} - -/* It's OK to use a global because alarm() is supposed to be global anyway */ -static DWORD alarmMs; - -static DWORD WINAPI TimerProc( LPVOID TimerContext ) -{ - ((void) TimerContext); - Sleep( alarmMs ); - mbedtls_timing_alarmed = 1; - return( TRUE ); -} - -void mbedtls_set_alarm( int seconds ) -{ - DWORD ThreadId; - - mbedtls_timing_alarmed = 0; - alarmMs = seconds * 1000; - CloseHandle( CreateThread( NULL, 0, TimerProc, NULL, 0, &ThreadId ) ); -} - -#else /* _WIN32 && !EFIX64 && !EFI32 */ - -unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset ) -{ - unsigned long delta; - struct timeval offset; - struct _hr_time *t = (struct _hr_time *) val; - - gettimeofday( &offset, NULL ); - - if( reset ) - { - t->start.tv_sec = offset.tv_sec; - t->start.tv_usec = offset.tv_usec; - return( 0 ); - } - - delta = ( offset.tv_sec - t->start.tv_sec ) * 1000 - + ( offset.tv_usec - t->start.tv_usec ) / 1000; - - return( delta ); -} - -static void sighandler( int signum ) -{ - mbedtls_timing_alarmed = 1; - signal( signum, sighandler ); -} - -void mbedtls_set_alarm( int seconds ) -{ - mbedtls_timing_alarmed = 0; - signal( SIGALRM, sighandler ); - alarm( seconds ); -} - -#endif /* _WIN32 && !EFIX64 && !EFI32 */ - -/* - * Set delays to watch - */ -void mbedtls_timing_set_delay( void *data, uint32_t int_ms, uint32_t fin_ms ) -{ - mbedtls_timing_delay_context *ctx = (mbedtls_timing_delay_context *) data; - - ctx->int_ms = int_ms; - ctx->fin_ms = fin_ms; - - if( fin_ms != 0 ) - (void) mbedtls_timing_get_timer( &ctx->timer, 1 ); -} - -/* - * Get number of delays expired - */ -int mbedtls_timing_get_delay( void *data ) -{ - mbedtls_timing_delay_context *ctx = (mbedtls_timing_delay_context *) data; - unsigned long elapsed_ms; - - if( ctx->fin_ms == 0 ) - return( -1 ); - - elapsed_ms = mbedtls_timing_get_timer( &ctx->timer, 0 ); - - if( elapsed_ms >= ctx->fin_ms ) - return( 2 ); - - if( elapsed_ms >= ctx->int_ms ) - return( 1 ); - - return( 0 ); -} - -#endif /* !MBEDTLS_TIMING_ALT */ - -#if defined(MBEDTLS_SELF_TEST) - -/* - * Busy-waits for the given number of milliseconds. - * Used for testing mbedtls_timing_hardclock. - */ -static void busy_msleep( unsigned long msec ) -{ - struct mbedtls_timing_hr_time hires; - unsigned long i = 0; /* for busy-waiting */ - volatile unsigned long j; /* to prevent optimisation */ - - (void) mbedtls_timing_get_timer( &hires, 1 ); - - while( mbedtls_timing_get_timer( &hires, 0 ) < msec ) - i++; - - j = i; - (void) j; -} - -#define FAIL do \ -{ \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - \ - return( 1 ); \ -} while( 0 ) - -/* - * Checkup routine - * - * Warning: this is work in progress, some tests may not be reliable enough - * yet! False positives may happen. - */ -int mbedtls_timing_self_test( int verbose ) -{ - unsigned long cycles, ratio; - unsigned long millisecs, secs; - int hardfail; - struct mbedtls_timing_hr_time hires; - uint32_t a, b; - mbedtls_timing_delay_context ctx; - - if( verbose != 0 ) - mbedtls_printf( " TIMING tests note: will take some time!\n" ); - - - if( verbose != 0 ) - mbedtls_printf( " TIMING test #1 (set_alarm / get_timer): " ); - - for( secs = 1; secs <= 3; secs++ ) - { - (void) mbedtls_timing_get_timer( &hires, 1 ); - - mbedtls_set_alarm( (int) secs ); - while( !mbedtls_timing_alarmed ) - ; - - millisecs = mbedtls_timing_get_timer( &hires, 0 ); - - /* For some reason on Windows it looks like alarm has an extra delay - * (maybe related to creating a new thread). Allow some room here. */ - if( millisecs < 800 * secs || millisecs > 1200 * secs + 300 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " TIMING test #2 (set/get_delay ): " ); - - for( a = 200; a <= 400; a += 200 ) - { - for( b = 200; b <= 400; b += 200 ) - { - mbedtls_timing_set_delay( &ctx, a, a + b ); - - busy_msleep( a - a / 8 ); - if( mbedtls_timing_get_delay( &ctx ) != 0 ) - FAIL; - - busy_msleep( a / 4 ); - if( mbedtls_timing_get_delay( &ctx ) != 1 ) - FAIL; - - busy_msleep( b - a / 8 - b / 8 ); - if( mbedtls_timing_get_delay( &ctx ) != 1 ) - FAIL; - - busy_msleep( b / 4 ); - if( mbedtls_timing_get_delay( &ctx ) != 2 ) - FAIL; - } - } - - mbedtls_timing_set_delay( &ctx, 0, 0 ); - busy_msleep( 200 ); - if( mbedtls_timing_get_delay( &ctx ) != -1 ) - FAIL; - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " TIMING test #3 (hardclock / get_timer): " ); - - /* - * Allow one failure for possible counter wrapping. - * On a 4Ghz 32-bit machine the cycle counter wraps about once per second; - * since the whole test is about 10ms, it shouldn't happen twice in a row. - */ - hardfail = 0; - -hard_test: - if( hardfail > 1 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed (ignored)\n" ); - - goto hard_test_done; - } - - /* Get a reference ratio cycles/ms */ - millisecs = 1; - cycles = mbedtls_timing_hardclock(); - busy_msleep( millisecs ); - cycles = mbedtls_timing_hardclock() - cycles; - ratio = cycles / millisecs; - - /* Check that the ratio is mostly constant */ - for( millisecs = 2; millisecs <= 4; millisecs++ ) - { - cycles = mbedtls_timing_hardclock(); - busy_msleep( millisecs ); - cycles = mbedtls_timing_hardclock() - cycles; - - /* Allow variation up to 20% */ - if( cycles / millisecs < ratio - ratio / 5 || - cycles / millisecs > ratio + ratio / 5 ) - { - hardfail++; - goto hard_test; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -hard_test_done: - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_TIMING_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/version.c b/build/premake/premake5/contrib/mbedtls/library/version.c deleted file mode 100644 index 6ca80d4695..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/version.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Version information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_VERSION_C) - -#include "mbedtls/version.h" -#include - -unsigned int mbedtls_version_get_number() -{ - return( MBEDTLS_VERSION_NUMBER ); -} - -void mbedtls_version_get_string( char *string ) -{ - memcpy( string, MBEDTLS_VERSION_STRING, - sizeof( MBEDTLS_VERSION_STRING ) ); -} - -void mbedtls_version_get_string_full( char *string ) -{ - memcpy( string, MBEDTLS_VERSION_STRING_FULL, - sizeof( MBEDTLS_VERSION_STRING_FULL ) ); -} - -#endif /* MBEDTLS_VERSION_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/version_features.c b/build/premake/premake5/contrib/mbedtls/library/version_features.c deleted file mode 100644 index 1575e093e3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/version_features.c +++ /dev/null @@ -1,635 +0,0 @@ -/* - * Version feature information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_VERSION_C) - -#include "mbedtls/version.h" - -#include - -static const char *features[] = { -#if defined(MBEDTLS_VERSION_FEATURES) -#if defined(MBEDTLS_HAVE_ASM) - "MBEDTLS_HAVE_ASM", -#endif /* MBEDTLS_HAVE_ASM */ -#if defined(MBEDTLS_HAVE_SSE2) - "MBEDTLS_HAVE_SSE2", -#endif /* MBEDTLS_HAVE_SSE2 */ -#if defined(MBEDTLS_HAVE_TIME) - "MBEDTLS_HAVE_TIME", -#endif /* MBEDTLS_HAVE_TIME */ -#if defined(MBEDTLS_HAVE_TIME_DATE) - "MBEDTLS_HAVE_TIME_DATE", -#endif /* MBEDTLS_HAVE_TIME_DATE */ -#if defined(MBEDTLS_PLATFORM_MEMORY) - "MBEDTLS_PLATFORM_MEMORY", -#endif /* MBEDTLS_PLATFORM_MEMORY */ -#if defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) - "MBEDTLS_PLATFORM_NO_STD_FUNCTIONS", -#endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) - "MBEDTLS_PLATFORM_EXIT_ALT", -#endif /* MBEDTLS_PLATFORM_EXIT_ALT */ -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) - "MBEDTLS_PLATFORM_FPRINTF_ALT", -#endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) - "MBEDTLS_PLATFORM_PRINTF_ALT", -#endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) - "MBEDTLS_PLATFORM_SNPRINTF_ALT", -#endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ -#if defined(MBEDTLS_DEPRECATED_WARNING) - "MBEDTLS_DEPRECATED_WARNING", -#endif /* MBEDTLS_DEPRECATED_WARNING */ -#if defined(MBEDTLS_DEPRECATED_REMOVED) - "MBEDTLS_DEPRECATED_REMOVED", -#endif /* MBEDTLS_DEPRECATED_REMOVED */ -#if defined(MBEDTLS_TIMING_ALT) - "MBEDTLS_TIMING_ALT", -#endif /* MBEDTLS_TIMING_ALT */ -#if defined(MBEDTLS_AES_ALT) - "MBEDTLS_AES_ALT", -#endif /* MBEDTLS_AES_ALT */ -#if defined(MBEDTLS_ARC4_ALT) - "MBEDTLS_ARC4_ALT", -#endif /* MBEDTLS_ARC4_ALT */ -#if defined(MBEDTLS_BLOWFISH_ALT) - "MBEDTLS_BLOWFISH_ALT", -#endif /* MBEDTLS_BLOWFISH_ALT */ -#if defined(MBEDTLS_CAMELLIA_ALT) - "MBEDTLS_CAMELLIA_ALT", -#endif /* MBEDTLS_CAMELLIA_ALT */ -#if defined(MBEDTLS_DES_ALT) - "MBEDTLS_DES_ALT", -#endif /* MBEDTLS_DES_ALT */ -#if defined(MBEDTLS_XTEA_ALT) - "MBEDTLS_XTEA_ALT", -#endif /* MBEDTLS_XTEA_ALT */ -#if defined(MBEDTLS_MD2_ALT) - "MBEDTLS_MD2_ALT", -#endif /* MBEDTLS_MD2_ALT */ -#if defined(MBEDTLS_MD4_ALT) - "MBEDTLS_MD4_ALT", -#endif /* MBEDTLS_MD4_ALT */ -#if defined(MBEDTLS_MD5_ALT) - "MBEDTLS_MD5_ALT", -#endif /* MBEDTLS_MD5_ALT */ -#if defined(MBEDTLS_RIPEMD160_ALT) - "MBEDTLS_RIPEMD160_ALT", -#endif /* MBEDTLS_RIPEMD160_ALT */ -#if defined(MBEDTLS_SHA1_ALT) - "MBEDTLS_SHA1_ALT", -#endif /* MBEDTLS_SHA1_ALT */ -#if defined(MBEDTLS_SHA256_ALT) - "MBEDTLS_SHA256_ALT", -#endif /* MBEDTLS_SHA256_ALT */ -#if defined(MBEDTLS_SHA512_ALT) - "MBEDTLS_SHA512_ALT", -#endif /* MBEDTLS_SHA512_ALT */ -#if defined(MBEDTLS_MD2_PROCESS_ALT) - "MBEDTLS_MD2_PROCESS_ALT", -#endif /* MBEDTLS_MD2_PROCESS_ALT */ -#if defined(MBEDTLS_MD4_PROCESS_ALT) - "MBEDTLS_MD4_PROCESS_ALT", -#endif /* MBEDTLS_MD4_PROCESS_ALT */ -#if defined(MBEDTLS_MD5_PROCESS_ALT) - "MBEDTLS_MD5_PROCESS_ALT", -#endif /* MBEDTLS_MD5_PROCESS_ALT */ -#if defined(MBEDTLS_RIPEMD160_PROCESS_ALT) - "MBEDTLS_RIPEMD160_PROCESS_ALT", -#endif /* MBEDTLS_RIPEMD160_PROCESS_ALT */ -#if defined(MBEDTLS_SHA1_PROCESS_ALT) - "MBEDTLS_SHA1_PROCESS_ALT", -#endif /* MBEDTLS_SHA1_PROCESS_ALT */ -#if defined(MBEDTLS_SHA256_PROCESS_ALT) - "MBEDTLS_SHA256_PROCESS_ALT", -#endif /* MBEDTLS_SHA256_PROCESS_ALT */ -#if defined(MBEDTLS_SHA512_PROCESS_ALT) - "MBEDTLS_SHA512_PROCESS_ALT", -#endif /* MBEDTLS_SHA512_PROCESS_ALT */ -#if defined(MBEDTLS_DES_SETKEY_ALT) - "MBEDTLS_DES_SETKEY_ALT", -#endif /* MBEDTLS_DES_SETKEY_ALT */ -#if defined(MBEDTLS_DES_CRYPT_ECB_ALT) - "MBEDTLS_DES_CRYPT_ECB_ALT", -#endif /* MBEDTLS_DES_CRYPT_ECB_ALT */ -#if defined(MBEDTLS_DES3_CRYPT_ECB_ALT) - "MBEDTLS_DES3_CRYPT_ECB_ALT", -#endif /* MBEDTLS_DES3_CRYPT_ECB_ALT */ -#if defined(MBEDTLS_AES_SETKEY_ENC_ALT) - "MBEDTLS_AES_SETKEY_ENC_ALT", -#endif /* MBEDTLS_AES_SETKEY_ENC_ALT */ -#if defined(MBEDTLS_AES_SETKEY_DEC_ALT) - "MBEDTLS_AES_SETKEY_DEC_ALT", -#endif /* MBEDTLS_AES_SETKEY_DEC_ALT */ -#if defined(MBEDTLS_AES_ENCRYPT_ALT) - "MBEDTLS_AES_ENCRYPT_ALT", -#endif /* MBEDTLS_AES_ENCRYPT_ALT */ -#if defined(MBEDTLS_AES_DECRYPT_ALT) - "MBEDTLS_AES_DECRYPT_ALT", -#endif /* MBEDTLS_AES_DECRYPT_ALT */ -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) - "MBEDTLS_ENTROPY_HARDWARE_ALT", -#endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ -#if defined(MBEDTLS_AES_ROM_TABLES) - "MBEDTLS_AES_ROM_TABLES", -#endif /* MBEDTLS_AES_ROM_TABLES */ -#if defined(MBEDTLS_CAMELLIA_SMALL_MEMORY) - "MBEDTLS_CAMELLIA_SMALL_MEMORY", -#endif /* MBEDTLS_CAMELLIA_SMALL_MEMORY */ -#if defined(MBEDTLS_CIPHER_MODE_CBC) - "MBEDTLS_CIPHER_MODE_CBC", -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_CIPHER_MODE_CFB) - "MBEDTLS_CIPHER_MODE_CFB", -#endif /* MBEDTLS_CIPHER_MODE_CFB */ -#if defined(MBEDTLS_CIPHER_MODE_CTR) - "MBEDTLS_CIPHER_MODE_CTR", -#endif /* MBEDTLS_CIPHER_MODE_CTR */ -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) - "MBEDTLS_CIPHER_NULL_CIPHER", -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ -#if defined(MBEDTLS_CIPHER_PADDING_PKCS7) - "MBEDTLS_CIPHER_PADDING_PKCS7", -#endif /* MBEDTLS_CIPHER_PADDING_PKCS7 */ -#if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS) - "MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS", -#endif /* MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS */ -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN) - "MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN", -#endif /* MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN */ -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS) - "MBEDTLS_CIPHER_PADDING_ZEROS", -#endif /* MBEDTLS_CIPHER_PADDING_ZEROS */ -#if defined(MBEDTLS_ENABLE_WEAK_CIPHERSUITES) - "MBEDTLS_ENABLE_WEAK_CIPHERSUITES", -#endif /* MBEDTLS_ENABLE_WEAK_CIPHERSUITES */ -#if defined(MBEDTLS_REMOVE_ARC4_CIPHERSUITES) - "MBEDTLS_REMOVE_ARC4_CIPHERSUITES", -#endif /* MBEDTLS_REMOVE_ARC4_CIPHERSUITES */ -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) - "MBEDTLS_ECP_DP_SECP192R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP192R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) - "MBEDTLS_ECP_DP_SECP224R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) - "MBEDTLS_ECP_DP_SECP256R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) - "MBEDTLS_ECP_DP_SECP384R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) - "MBEDTLS_ECP_DP_SECP521R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) - "MBEDTLS_ECP_DP_SECP192K1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) - "MBEDTLS_ECP_DP_SECP224K1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) - "MBEDTLS_ECP_DP_SECP256K1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) - "MBEDTLS_ECP_DP_BP256R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_BP256R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) - "MBEDTLS_ECP_DP_BP384R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_BP384R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) - "MBEDTLS_ECP_DP_BP512R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - "MBEDTLS_ECP_DP_CURVE25519_ENABLED", -#endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */ -#if defined(MBEDTLS_ECP_NIST_OPTIM) - "MBEDTLS_ECP_NIST_OPTIM", -#endif /* MBEDTLS_ECP_NIST_OPTIM */ -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) - "MBEDTLS_ECDSA_DETERMINISTIC", -#endif /* MBEDTLS_ECDSA_DETERMINISTIC */ -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ -#if defined(MBEDTLS_PK_PARSE_EC_EXTENDED) - "MBEDTLS_PK_PARSE_EC_EXTENDED", -#endif /* MBEDTLS_PK_PARSE_EC_EXTENDED */ -#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) - "MBEDTLS_ERROR_STRERROR_DUMMY", -#endif /* MBEDTLS_ERROR_STRERROR_DUMMY */ -#if defined(MBEDTLS_GENPRIME) - "MBEDTLS_GENPRIME", -#endif /* MBEDTLS_GENPRIME */ -#if defined(MBEDTLS_FS_IO) - "MBEDTLS_FS_IO", -#endif /* MBEDTLS_FS_IO */ -#if defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) - "MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES", -#endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */ -#if defined(MBEDTLS_NO_PLATFORM_ENTROPY) - "MBEDTLS_NO_PLATFORM_ENTROPY", -#endif /* MBEDTLS_NO_PLATFORM_ENTROPY */ -#if defined(MBEDTLS_ENTROPY_FORCE_SHA256) - "MBEDTLS_ENTROPY_FORCE_SHA256", -#endif /* MBEDTLS_ENTROPY_FORCE_SHA256 */ -#if defined(MBEDTLS_MEMORY_DEBUG) - "MBEDTLS_MEMORY_DEBUG", -#endif /* MBEDTLS_MEMORY_DEBUG */ -#if defined(MBEDTLS_MEMORY_BACKTRACE) - "MBEDTLS_MEMORY_BACKTRACE", -#endif /* MBEDTLS_MEMORY_BACKTRACE */ -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) - "MBEDTLS_PK_RSA_ALT_SUPPORT", -#endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ -#if defined(MBEDTLS_PKCS1_V15) - "MBEDTLS_PKCS1_V15", -#endif /* MBEDTLS_PKCS1_V15 */ -#if defined(MBEDTLS_PKCS1_V21) - "MBEDTLS_PKCS1_V21", -#endif /* MBEDTLS_PKCS1_V21 */ -#if defined(MBEDTLS_RSA_NO_CRT) - "MBEDTLS_RSA_NO_CRT", -#endif /* MBEDTLS_RSA_NO_CRT */ -#if defined(MBEDTLS_SELF_TEST) - "MBEDTLS_SELF_TEST", -#endif /* MBEDTLS_SELF_TEST */ -#if defined(MBEDTLS_SHA256_SMALLER) - "MBEDTLS_SHA256_SMALLER", -#endif /* MBEDTLS_SHA256_SMALLER */ -#if defined(MBEDTLS_SSL_AEAD_RANDOM_IV) - "MBEDTLS_SSL_AEAD_RANDOM_IV", -#endif /* MBEDTLS_SSL_AEAD_RANDOM_IV */ -#if defined(MBEDTLS_SSL_ALL_ALERT_MESSAGES) - "MBEDTLS_SSL_ALL_ALERT_MESSAGES", -#endif /* MBEDTLS_SSL_ALL_ALERT_MESSAGES */ -#if defined(MBEDTLS_SSL_DEBUG_ALL) - "MBEDTLS_SSL_DEBUG_ALL", -#endif /* MBEDTLS_SSL_DEBUG_ALL */ -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - "MBEDTLS_SSL_ENCRYPT_THEN_MAC", -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - "MBEDTLS_SSL_EXTENDED_MASTER_SECRET", -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) - "MBEDTLS_SSL_FALLBACK_SCSV", -#endif /* MBEDTLS_SSL_FALLBACK_SCSV */ -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - "MBEDTLS_SSL_HW_RECORD_ACCEL", -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - "MBEDTLS_SSL_CBC_RECORD_SPLITTING", -#endif /* MBEDTLS_SSL_CBC_RECORD_SPLITTING */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - "MBEDTLS_SSL_RENEGOTIATION", -#endif /* MBEDTLS_SSL_RENEGOTIATION */ -#if defined(MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO) - "MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO", -#endif /* MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO */ -#if defined(MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE) - "MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE", -#endif /* MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE */ -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - "MBEDTLS_SSL_MAX_FRAGMENT_LENGTH", -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) - "MBEDTLS_SSL_PROTO_SSL3", -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) - "MBEDTLS_SSL_PROTO_TLS1", -#endif /* MBEDTLS_SSL_PROTO_TLS1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) - "MBEDTLS_SSL_PROTO_TLS1_1", -#endif /* MBEDTLS_SSL_PROTO_TLS1_1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - "MBEDTLS_SSL_PROTO_TLS1_2", -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - "MBEDTLS_SSL_PROTO_DTLS", -#endif /* MBEDTLS_SSL_PROTO_DTLS */ -#if defined(MBEDTLS_SSL_ALPN) - "MBEDTLS_SSL_ALPN", -#endif /* MBEDTLS_SSL_ALPN */ -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - "MBEDTLS_SSL_DTLS_ANTI_REPLAY", -#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */ -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) - "MBEDTLS_SSL_DTLS_HELLO_VERIFY", -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ -#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) - "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE", -#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE */ -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) - "MBEDTLS_SSL_DTLS_BADMAC_LIMIT", -#endif /* MBEDTLS_SSL_DTLS_BADMAC_LIMIT */ -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - "MBEDTLS_SSL_SESSION_TICKETS", -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ -#if defined(MBEDTLS_SSL_EXPORT_KEYS) - "MBEDTLS_SSL_EXPORT_KEYS", -#endif /* MBEDTLS_SSL_EXPORT_KEYS */ -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - "MBEDTLS_SSL_SERVER_NAME_INDICATION", -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - "MBEDTLS_SSL_TRUNCATED_HMAC", -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ -#if defined(MBEDTLS_THREADING_ALT) - "MBEDTLS_THREADING_ALT", -#endif /* MBEDTLS_THREADING_ALT */ -#if defined(MBEDTLS_THREADING_PTHREAD) - "MBEDTLS_THREADING_PTHREAD", -#endif /* MBEDTLS_THREADING_PTHREAD */ -#if defined(MBEDTLS_VERSION_FEATURES) - "MBEDTLS_VERSION_FEATURES", -#endif /* MBEDTLS_VERSION_FEATURES */ -#if defined(MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3) - "MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3", -#endif /* MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 */ -#if defined(MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION) - "MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION", -#endif /* MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION */ -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) - "MBEDTLS_X509_CHECK_KEY_USAGE", -#endif /* MBEDTLS_X509_CHECK_KEY_USAGE */ -#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) - "MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE", -#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */ -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - "MBEDTLS_X509_RSASSA_PSS_SUPPORT", -#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ -#if defined(MBEDTLS_ZLIB_SUPPORT) - "MBEDTLS_ZLIB_SUPPORT", -#endif /* MBEDTLS_ZLIB_SUPPORT */ -#if defined(MBEDTLS_AESNI_C) - "MBEDTLS_AESNI_C", -#endif /* MBEDTLS_AESNI_C */ -#if defined(MBEDTLS_AES_C) - "MBEDTLS_AES_C", -#endif /* MBEDTLS_AES_C */ -#if defined(MBEDTLS_ARC4_C) - "MBEDTLS_ARC4_C", -#endif /* MBEDTLS_ARC4_C */ -#if defined(MBEDTLS_ASN1_PARSE_C) - "MBEDTLS_ASN1_PARSE_C", -#endif /* MBEDTLS_ASN1_PARSE_C */ -#if defined(MBEDTLS_ASN1_WRITE_C) - "MBEDTLS_ASN1_WRITE_C", -#endif /* MBEDTLS_ASN1_WRITE_C */ -#if defined(MBEDTLS_BASE64_C) - "MBEDTLS_BASE64_C", -#endif /* MBEDTLS_BASE64_C */ -#if defined(MBEDTLS_BIGNUM_C) - "MBEDTLS_BIGNUM_C", -#endif /* MBEDTLS_BIGNUM_C */ -#if defined(MBEDTLS_BLOWFISH_C) - "MBEDTLS_BLOWFISH_C", -#endif /* MBEDTLS_BLOWFISH_C */ -#if defined(MBEDTLS_CAMELLIA_C) - "MBEDTLS_CAMELLIA_C", -#endif /* MBEDTLS_CAMELLIA_C */ -#if defined(MBEDTLS_CCM_C) - "MBEDTLS_CCM_C", -#endif /* MBEDTLS_CCM_C */ -#if defined(MBEDTLS_CERTS_C) - "MBEDTLS_CERTS_C", -#endif /* MBEDTLS_CERTS_C */ -#if defined(MBEDTLS_CIPHER_C) - "MBEDTLS_CIPHER_C", -#endif /* MBEDTLS_CIPHER_C */ -#if defined(MBEDTLS_CTR_DRBG_C) - "MBEDTLS_CTR_DRBG_C", -#endif /* MBEDTLS_CTR_DRBG_C */ -#if defined(MBEDTLS_DEBUG_C) - "MBEDTLS_DEBUG_C", -#endif /* MBEDTLS_DEBUG_C */ -#if defined(MBEDTLS_DES_C) - "MBEDTLS_DES_C", -#endif /* MBEDTLS_DES_C */ -#if defined(MBEDTLS_DHM_C) - "MBEDTLS_DHM_C", -#endif /* MBEDTLS_DHM_C */ -#if defined(MBEDTLS_ECDH_C) - "MBEDTLS_ECDH_C", -#endif /* MBEDTLS_ECDH_C */ -#if defined(MBEDTLS_ECDSA_C) - "MBEDTLS_ECDSA_C", -#endif /* MBEDTLS_ECDSA_C */ -#if defined(MBEDTLS_ECJPAKE_C) - "MBEDTLS_ECJPAKE_C", -#endif /* MBEDTLS_ECJPAKE_C */ -#if defined(MBEDTLS_ECP_C) - "MBEDTLS_ECP_C", -#endif /* MBEDTLS_ECP_C */ -#if defined(MBEDTLS_ENTROPY_C) - "MBEDTLS_ENTROPY_C", -#endif /* MBEDTLS_ENTROPY_C */ -#if defined(MBEDTLS_ERROR_C) - "MBEDTLS_ERROR_C", -#endif /* MBEDTLS_ERROR_C */ -#if defined(MBEDTLS_GCM_C) - "MBEDTLS_GCM_C", -#endif /* MBEDTLS_GCM_C */ -#if defined(MBEDTLS_HAVEGE_C) - "MBEDTLS_HAVEGE_C", -#endif /* MBEDTLS_HAVEGE_C */ -#if defined(MBEDTLS_HMAC_DRBG_C) - "MBEDTLS_HMAC_DRBG_C", -#endif /* MBEDTLS_HMAC_DRBG_C */ -#if defined(MBEDTLS_MD_C) - "MBEDTLS_MD_C", -#endif /* MBEDTLS_MD_C */ -#if defined(MBEDTLS_MD2_C) - "MBEDTLS_MD2_C", -#endif /* MBEDTLS_MD2_C */ -#if defined(MBEDTLS_MD4_C) - "MBEDTLS_MD4_C", -#endif /* MBEDTLS_MD4_C */ -#if defined(MBEDTLS_MD5_C) - "MBEDTLS_MD5_C", -#endif /* MBEDTLS_MD5_C */ -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - "MBEDTLS_MEMORY_BUFFER_ALLOC_C", -#endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ -#if defined(MBEDTLS_NET_C) - "MBEDTLS_NET_C", -#endif /* MBEDTLS_NET_C */ -#if defined(MBEDTLS_OID_C) - "MBEDTLS_OID_C", -#endif /* MBEDTLS_OID_C */ -#if defined(MBEDTLS_PADLOCK_C) - "MBEDTLS_PADLOCK_C", -#endif /* MBEDTLS_PADLOCK_C */ -#if defined(MBEDTLS_PEM_PARSE_C) - "MBEDTLS_PEM_PARSE_C", -#endif /* MBEDTLS_PEM_PARSE_C */ -#if defined(MBEDTLS_PEM_WRITE_C) - "MBEDTLS_PEM_WRITE_C", -#endif /* MBEDTLS_PEM_WRITE_C */ -#if defined(MBEDTLS_PK_C) - "MBEDTLS_PK_C", -#endif /* MBEDTLS_PK_C */ -#if defined(MBEDTLS_PK_PARSE_C) - "MBEDTLS_PK_PARSE_C", -#endif /* MBEDTLS_PK_PARSE_C */ -#if defined(MBEDTLS_PK_WRITE_C) - "MBEDTLS_PK_WRITE_C", -#endif /* MBEDTLS_PK_WRITE_C */ -#if defined(MBEDTLS_PKCS5_C) - "MBEDTLS_PKCS5_C", -#endif /* MBEDTLS_PKCS5_C */ -#if defined(MBEDTLS_PKCS11_C) - "MBEDTLS_PKCS11_C", -#endif /* MBEDTLS_PKCS11_C */ -#if defined(MBEDTLS_PKCS12_C) - "MBEDTLS_PKCS12_C", -#endif /* MBEDTLS_PKCS12_C */ -#if defined(MBEDTLS_PLATFORM_C) - "MBEDTLS_PLATFORM_C", -#endif /* MBEDTLS_PLATFORM_C */ -#if defined(MBEDTLS_RIPEMD160_C) - "MBEDTLS_RIPEMD160_C", -#endif /* MBEDTLS_RIPEMD160_C */ -#if defined(MBEDTLS_RSA_C) - "MBEDTLS_RSA_C", -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_SHA1_C) - "MBEDTLS_SHA1_C", -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_SHA256_C) - "MBEDTLS_SHA256_C", -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - "MBEDTLS_SHA512_C", -#endif /* MBEDTLS_SHA512_C */ -#if defined(MBEDTLS_SSL_CACHE_C) - "MBEDTLS_SSL_CACHE_C", -#endif /* MBEDTLS_SSL_CACHE_C */ -#if defined(MBEDTLS_SSL_COOKIE_C) - "MBEDTLS_SSL_COOKIE_C", -#endif /* MBEDTLS_SSL_COOKIE_C */ -#if defined(MBEDTLS_SSL_TICKET_C) - "MBEDTLS_SSL_TICKET_C", -#endif /* MBEDTLS_SSL_TICKET_C */ -#if defined(MBEDTLS_SSL_CLI_C) - "MBEDTLS_SSL_CLI_C", -#endif /* MBEDTLS_SSL_CLI_C */ -#if defined(MBEDTLS_SSL_SRV_C) - "MBEDTLS_SSL_SRV_C", -#endif /* MBEDTLS_SSL_SRV_C */ -#if defined(MBEDTLS_SSL_TLS_C) - "MBEDTLS_SSL_TLS_C", -#endif /* MBEDTLS_SSL_TLS_C */ -#if defined(MBEDTLS_THREADING_C) - "MBEDTLS_THREADING_C", -#endif /* MBEDTLS_THREADING_C */ -#if defined(MBEDTLS_TIMING_C) - "MBEDTLS_TIMING_C", -#endif /* MBEDTLS_TIMING_C */ -#if defined(MBEDTLS_VERSION_C) - "MBEDTLS_VERSION_C", -#endif /* MBEDTLS_VERSION_C */ -#if defined(MBEDTLS_X509_USE_C) - "MBEDTLS_X509_USE_C", -#endif /* MBEDTLS_X509_USE_C */ -#if defined(MBEDTLS_X509_CRT_PARSE_C) - "MBEDTLS_X509_CRT_PARSE_C", -#endif /* MBEDTLS_X509_CRT_PARSE_C */ -#if defined(MBEDTLS_X509_CRL_PARSE_C) - "MBEDTLS_X509_CRL_PARSE_C", -#endif /* MBEDTLS_X509_CRL_PARSE_C */ -#if defined(MBEDTLS_X509_CSR_PARSE_C) - "MBEDTLS_X509_CSR_PARSE_C", -#endif /* MBEDTLS_X509_CSR_PARSE_C */ -#if defined(MBEDTLS_X509_CREATE_C) - "MBEDTLS_X509_CREATE_C", -#endif /* MBEDTLS_X509_CREATE_C */ -#if defined(MBEDTLS_X509_CRT_WRITE_C) - "MBEDTLS_X509_CRT_WRITE_C", -#endif /* MBEDTLS_X509_CRT_WRITE_C */ -#if defined(MBEDTLS_X509_CSR_WRITE_C) - "MBEDTLS_X509_CSR_WRITE_C", -#endif /* MBEDTLS_X509_CSR_WRITE_C */ -#if defined(MBEDTLS_XTEA_C) - "MBEDTLS_XTEA_C", -#endif /* MBEDTLS_XTEA_C */ -#endif /* MBEDTLS_VERSION_FEATURES */ - NULL -}; - -int mbedtls_version_check_feature( const char *feature ) -{ - const char **idx = features; - - if( *idx == NULL ) - return( -2 ); - - if( feature == NULL ) - return( -1 ); - - while( *idx != NULL ) - { - if( !strcmp( *idx, feature ) ) - return( 0 ); - idx++; - } - return( -1 ); -} - -#endif /* MBEDTLS_VERSION_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509.c b/build/premake/premake5/contrib/mbedtls/library/x509.c deleted file mode 100644 index ffc3d6c94b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509.c +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * X.509 common functions for parsing and verification - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The ITU-T X.509 standard defines a certificate format for PKI. - * - * http://www.ietf.org/rfc/rfc5280.txt (Certificates and CRLs) - * http://www.ietf.org/rfc/rfc3279.txt (Alg IDs for CRLs) - * http://www.ietf.org/rfc/rfc2986.txt (CSRs, aka PKCS#10) - * - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_USE_C) - -#include "mbedtls/x509.h" -#include "mbedtls/asn1.h" -#include "mbedtls/oid.h" - -#include -#include - -#if defined(MBEDTLS_PEM_PARSE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) -#include -#else -#include -#endif - -#if defined(MBEDTLS_FS_IO) -#include -#if !defined(_WIN32) -#include -#include -#include -#endif -#endif - -#define CHECK(code) if( ( ret = code ) != 0 ){ return( ret ); } - -/* - * CertificateSerialNumber ::= INTEGER - */ -int mbedtls_x509_get_serial( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *serial ) -{ - int ret; - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_SERIAL + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - if( **p != ( MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_PRIMITIVE | 2 ) && - **p != MBEDTLS_ASN1_INTEGER ) - return( MBEDTLS_ERR_X509_INVALID_SERIAL + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - serial->tag = *(*p)++; - - if( ( ret = mbedtls_asn1_get_len( p, end, &serial->len ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_SERIAL + ret ); - - serial->p = *p; - *p += serial->len; - - return( 0 ); -} - -/* Get an algorithm identifier without parameters (eg for signatures) - * - * AlgorithmIdentifier ::= SEQUENCE { - * algorithm OBJECT IDENTIFIER, - * parameters ANY DEFINED BY algorithm OPTIONAL } - */ -int mbedtls_x509_get_alg_null( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *alg ) -{ - int ret; - - if( ( ret = mbedtls_asn1_get_alg_null( p, end, alg ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - return( 0 ); -} - -/* - * Parse an algorithm identifier with (optional) paramaters - */ -int mbedtls_x509_get_alg( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *alg, mbedtls_x509_buf *params ) -{ - int ret; - - if( ( ret = mbedtls_asn1_get_alg( p, end, alg, params ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - return( 0 ); -} - -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) -/* - * HashAlgorithm ::= AlgorithmIdentifier - * - * AlgorithmIdentifier ::= SEQUENCE { - * algorithm OBJECT IDENTIFIER, - * parameters ANY DEFINED BY algorithm OPTIONAL } - * - * For HashAlgorithm, parameters MUST be NULL or absent. - */ -static int x509_get_hash_alg( const mbedtls_x509_buf *alg, mbedtls_md_type_t *md_alg ) -{ - int ret; - unsigned char *p; - const unsigned char *end; - mbedtls_x509_buf md_oid; - size_t len; - - /* Make sure we got a SEQUENCE and setup bounds */ - if( alg->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - p = (unsigned char *) alg->p; - end = p + alg->len; - - if( p >= end ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - /* Parse md_oid */ - md_oid.tag = *p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &md_oid.len, MBEDTLS_ASN1_OID ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - md_oid.p = p; - p += md_oid.len; - - /* Get md_alg from md_oid */ - if( ( ret = mbedtls_oid_get_md_alg( &md_oid, md_alg ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - /* Make sure params is absent of NULL */ - if( p == end ) - return( 0 ); - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_NULL ) ) != 0 || len != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p != end ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * RSASSA-PSS-params ::= SEQUENCE { - * hashAlgorithm [0] HashAlgorithm DEFAULT sha1Identifier, - * maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1Identifier, - * saltLength [2] INTEGER DEFAULT 20, - * trailerField [3] INTEGER DEFAULT 1 } - * -- Note that the tags in this Sequence are explicit. - * - * RFC 4055 (which defines use of RSASSA-PSS in PKIX) states that the value - * of trailerField MUST be 1, and PKCS#1 v2.2 doesn't even define any other - * option. Enfore this at parsing time. - */ -int mbedtls_x509_get_rsassa_pss_params( const mbedtls_x509_buf *params, - mbedtls_md_type_t *md_alg, mbedtls_md_type_t *mgf_md, - int *salt_len ) -{ - int ret; - unsigned char *p; - const unsigned char *end, *end2; - size_t len; - mbedtls_x509_buf alg_id, alg_params; - - /* First set everything to defaults */ - *md_alg = MBEDTLS_MD_SHA1; - *mgf_md = MBEDTLS_MD_SHA1; - *salt_len = 20; - - /* Make sure params is a SEQUENCE and setup bounds */ - if( params->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - p = (unsigned char *) params->p; - end = p + params->len; - - if( p == end ) - return( 0 ); - - /* - * HashAlgorithm - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0 ) ) == 0 ) - { - end2 = p + len; - - /* HashAlgorithm ::= AlgorithmIdentifier (without parameters) */ - if( ( ret = mbedtls_x509_get_alg_null( &p, end2, &alg_id ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_oid_get_md_alg( &alg_id, md_alg ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p != end2 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - else if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p == end ) - return( 0 ); - - /* - * MaskGenAlgorithm - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 1 ) ) == 0 ) - { - end2 = p + len; - - /* MaskGenAlgorithm ::= AlgorithmIdentifier (params = HashAlgorithm) */ - if( ( ret = mbedtls_x509_get_alg( &p, end2, &alg_id, &alg_params ) ) != 0 ) - return( ret ); - - /* Only MFG1 is recognised for now */ - if( MBEDTLS_OID_CMP( MBEDTLS_OID_MGF1, &alg_id ) != 0 ) - return( MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE + - MBEDTLS_ERR_OID_NOT_FOUND ); - - /* Parse HashAlgorithm */ - if( ( ret = x509_get_hash_alg( &alg_params, mgf_md ) ) != 0 ) - return( ret ); - - if( p != end2 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - else if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p == end ) - return( 0 ); - - /* - * salt_len - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2 ) ) == 0 ) - { - end2 = p + len; - - if( ( ret = mbedtls_asn1_get_int( &p, end2, salt_len ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p != end2 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - else if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p == end ) - return( 0 ); - - /* - * trailer_field (if present, must be 1) - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 3 ) ) == 0 ) - { - int trailer_field; - - end2 = p + len; - - if( ( ret = mbedtls_asn1_get_int( &p, end2, &trailer_field ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p != end2 ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - if( trailer_field != 1 ) - return( MBEDTLS_ERR_X509_INVALID_ALG ); - } - else if( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( MBEDTLS_ERR_X509_INVALID_ALG + ret ); - - if( p != end ) - return( MBEDTLS_ERR_X509_INVALID_ALG + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} -#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ - -/* - * AttributeTypeAndValue ::= SEQUENCE { - * type AttributeType, - * value AttributeValue } - * - * AttributeType ::= OBJECT IDENTIFIER - * - * AttributeValue ::= ANY DEFINED BY AttributeType - */ -static int x509_get_attr_type_value( unsigned char **p, - const unsigned char *end, - mbedtls_x509_name *cur ) -{ - int ret; - size_t len; - mbedtls_x509_buf *oid; - mbedtls_x509_buf *val; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_NAME + ret ); - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_NAME + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - oid = &cur->oid; - oid->tag = **p; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &oid->len, MBEDTLS_ASN1_OID ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_NAME + ret ); - - oid->p = *p; - *p += oid->len; - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_NAME + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - if( **p != MBEDTLS_ASN1_BMP_STRING && **p != MBEDTLS_ASN1_UTF8_STRING && - **p != MBEDTLS_ASN1_T61_STRING && **p != MBEDTLS_ASN1_PRINTABLE_STRING && - **p != MBEDTLS_ASN1_IA5_STRING && **p != MBEDTLS_ASN1_UNIVERSAL_STRING && - **p != MBEDTLS_ASN1_BIT_STRING ) - return( MBEDTLS_ERR_X509_INVALID_NAME + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - val = &cur->val; - val->tag = *(*p)++; - - if( ( ret = mbedtls_asn1_get_len( p, end, &val->len ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_NAME + ret ); - - val->p = *p; - *p += val->len; - - cur->next = NULL; - - return( 0 ); -} - -/* - * Name ::= CHOICE { -- only one possibility for now -- - * rdnSequence RDNSequence } - * - * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName - * - * RelativeDistinguishedName ::= - * SET OF AttributeTypeAndValue - * - * AttributeTypeAndValue ::= SEQUENCE { - * type AttributeType, - * value AttributeValue } - * - * AttributeType ::= OBJECT IDENTIFIER - * - * AttributeValue ::= ANY DEFINED BY AttributeType - * - * The data structure is optimized for the common case where each RDN has only - * one element, which is represented as a list of AttributeTypeAndValue. - * For the general case we still use a flat list, but we mark elements of the - * same set so that they are "merged" together in the functions that consume - * this list, eg mbedtls_x509_dn_gets(). - */ -int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end, - mbedtls_x509_name *cur ) -{ - int ret; - size_t set_len; - const unsigned char *end_set; - - /* don't use recursion, we'd risk stack overflow if not optimized */ - while( 1 ) - { - /* - * parse SET - */ - if( ( ret = mbedtls_asn1_get_tag( p, end, &set_len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SET ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_NAME + ret ); - - end_set = *p + set_len; - - while( 1 ) - { - if( ( ret = x509_get_attr_type_value( p, end_set, cur ) ) != 0 ) - return( ret ); - - if( *p == end_set ) - break; - - /* Mark this item as being no the only one in a set */ - cur->next_merged = 1; - - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_name ) ); - - if( cur->next == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - cur = cur->next; - } - - /* - * continue until end of SEQUENCE is reached - */ - if( *p == end ) - return( 0 ); - - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_name ) ); - - if( cur->next == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - cur = cur->next; - } -} - -static int x509_parse_int(unsigned char **p, unsigned n, int *res){ - *res = 0; - for( ; n > 0; --n ){ - if( ( **p < '0') || ( **p > '9' ) ) return MBEDTLS_ERR_X509_INVALID_DATE; - *res *= 10; - *res += (*(*p)++ - '0'); - } - return 0; -} - -/* - * Time ::= CHOICE { - * utcTime UTCTime, - * generalTime GeneralizedTime } - */ -int mbedtls_x509_get_time( unsigned char **p, const unsigned char *end, - mbedtls_x509_time *time ) -{ - int ret; - size_t len; - unsigned char tag; - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_DATE + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - tag = **p; - - if( tag == MBEDTLS_ASN1_UTC_TIME ) - { - (*p)++; - ret = mbedtls_asn1_get_len( p, end, &len ); - - if( ret != 0 ) - return( MBEDTLS_ERR_X509_INVALID_DATE + ret ); - - CHECK( x509_parse_int( p, 2, &time->year ) ); - CHECK( x509_parse_int( p, 2, &time->mon ) ); - CHECK( x509_parse_int( p, 2, &time->day ) ); - CHECK( x509_parse_int( p, 2, &time->hour ) ); - CHECK( x509_parse_int( p, 2, &time->min ) ); - if( len > 10 ) - CHECK( x509_parse_int( p, 2, &time->sec ) ); - if( len > 12 && *(*p)++ != 'Z' ) - return( MBEDTLS_ERR_X509_INVALID_DATE ); - - time->year += 100 * ( time->year < 50 ); - time->year += 1900; - - return( 0 ); - } - else if( tag == MBEDTLS_ASN1_GENERALIZED_TIME ) - { - (*p)++; - ret = mbedtls_asn1_get_len( p, end, &len ); - - if( ret != 0 ) - return( MBEDTLS_ERR_X509_INVALID_DATE + ret ); - - CHECK( x509_parse_int( p, 4, &time->year ) ); - CHECK( x509_parse_int( p, 2, &time->mon ) ); - CHECK( x509_parse_int( p, 2, &time->day ) ); - CHECK( x509_parse_int( p, 2, &time->hour ) ); - CHECK( x509_parse_int( p, 2, &time->min ) ); - if( len > 12 ) - CHECK( x509_parse_int( p, 2, &time->sec ) ); - if( len > 14 && *(*p)++ != 'Z' ) - return( MBEDTLS_ERR_X509_INVALID_DATE ); - - return( 0 ); - } - else - return( MBEDTLS_ERR_X509_INVALID_DATE + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); -} - -int mbedtls_x509_get_sig( unsigned char **p, const unsigned char *end, mbedtls_x509_buf *sig ) -{ - int ret; - size_t len; - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_SIGNATURE + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - sig->tag = **p; - - if( ( ret = mbedtls_asn1_get_bitstring_null( p, end, &len ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_SIGNATURE + ret ); - - sig->len = len; - sig->p = *p; - - *p += len; - - return( 0 ); -} - -/* - * Get signature algorithm from alg OID and optional parameters - */ -int mbedtls_x509_get_sig_alg( const mbedtls_x509_buf *sig_oid, const mbedtls_x509_buf *sig_params, - mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg, - void **sig_opts ) -{ - int ret; - - if( *sig_opts != NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - if( ( ret = mbedtls_oid_get_sig_alg( sig_oid, md_alg, pk_alg ) ) != 0 ) - return( MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG + ret ); - -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - if( *pk_alg == MBEDTLS_PK_RSASSA_PSS ) - { - mbedtls_pk_rsassa_pss_options *pss_opts; - - pss_opts = mbedtls_calloc( 1, sizeof( mbedtls_pk_rsassa_pss_options ) ); - if( pss_opts == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - ret = mbedtls_x509_get_rsassa_pss_params( sig_params, - md_alg, - &pss_opts->mgf1_hash_id, - &pss_opts->expected_salt_len ); - if( ret != 0 ) - { - mbedtls_free( pss_opts ); - return( ret ); - } - - *sig_opts = (void *) pss_opts; - } - else -#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ - { - /* Make sure parameters are absent or NULL */ - if( ( sig_params->tag != MBEDTLS_ASN1_NULL && sig_params->tag != 0 ) || - sig_params->len != 0 ) - return( MBEDTLS_ERR_X509_INVALID_ALG ); - } - - return( 0 ); -} - -/* - * X.509 Extensions (No parsing of extensions, pointer should - * be either manually updated or extensions should be parsed! - */ -int mbedtls_x509_get_ext( unsigned char **p, const unsigned char *end, - mbedtls_x509_buf *ext, int tag ) -{ - int ret; - size_t len; - - if( *p == end ) - return( 0 ); - - ext->tag = **p; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &ext->len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | tag ) ) != 0 ) - return( ret ); - - ext->p = *p; - end = *p + ext->len; - - /* - * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension - * - * Extension ::= SEQUENCE { - * extnID OBJECT IDENTIFIER, - * critical BOOLEAN DEFAULT FALSE, - * extnValue OCTET STRING } - */ - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( end != *p + len ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * Store the name in printable form into buf; no more - * than size characters will be written - */ -int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn ) -{ - int ret; - size_t i, n; - unsigned char c, merge = 0; - const mbedtls_x509_name *name; - const char *short_name = NULL; - char s[MBEDTLS_X509_MAX_DN_NAME_SIZE], *p; - - memset( s, 0, sizeof( s ) ); - - name = dn; - p = buf; - n = size; - - while( name != NULL ) - { - if( !name->oid.p ) - { - name = name->next; - continue; - } - - if( name != dn ) - { - ret = mbedtls_snprintf( p, n, merge ? " + " : ", " ); - MBEDTLS_X509_SAFE_SNPRINTF; - } - - ret = mbedtls_oid_get_attr_short_name( &name->oid, &short_name ); - - if( ret == 0 ) - ret = mbedtls_snprintf( p, n, "%s=", short_name ); - else - ret = mbedtls_snprintf( p, n, "\?\?=" ); - MBEDTLS_X509_SAFE_SNPRINTF; - - for( i = 0; i < name->val.len; i++ ) - { - if( i >= sizeof( s ) - 1 ) - break; - - c = name->val.p[i]; - if( c < 32 || c == 127 || ( c > 128 && c < 160 ) ) - s[i] = '?'; - else s[i] = c; - } - s[i] = '\0'; - ret = mbedtls_snprintf( p, n, "%s", s ); - MBEDTLS_X509_SAFE_SNPRINTF; - - merge = name->next_merged; - name = name->next; - } - - return( (int) ( size - n ) ); -} - -/* - * Store the serial in printable form into buf; no more - * than size characters will be written - */ -int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *serial ) -{ - int ret; - size_t i, n, nr; - char *p; - - p = buf; - n = size; - - nr = ( serial->len <= 32 ) - ? serial->len : 28; - - for( i = 0; i < nr; i++ ) - { - if( i == 0 && nr > 1 && serial->p[i] == 0x0 ) - continue; - - ret = mbedtls_snprintf( p, n, "%02X%s", - serial->p[i], ( i < nr - 1 ) ? ":" : "" ); - MBEDTLS_X509_SAFE_SNPRINTF; - } - - if( nr != serial->len ) - { - ret = mbedtls_snprintf( p, n, "...." ); - MBEDTLS_X509_SAFE_SNPRINTF; - } - - return( (int) ( size - n ) ); -} - -/* - * Helper for writing signature algorithms - */ -int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *sig_oid, - mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, - const void *sig_opts ) -{ - int ret; - char *p = buf; - size_t n = size; - const char *desc = NULL; - - ret = mbedtls_oid_get_sig_alg_desc( sig_oid, &desc ); - if( ret != 0 ) - ret = mbedtls_snprintf( p, n, "???" ); - else - ret = mbedtls_snprintf( p, n, "%s", desc ); - MBEDTLS_X509_SAFE_SNPRINTF; - -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - if( pk_alg == MBEDTLS_PK_RSASSA_PSS ) - { - const mbedtls_pk_rsassa_pss_options *pss_opts; - const mbedtls_md_info_t *md_info, *mgf_md_info; - - pss_opts = (const mbedtls_pk_rsassa_pss_options *) sig_opts; - - md_info = mbedtls_md_info_from_type( md_alg ); - mgf_md_info = mbedtls_md_info_from_type( pss_opts->mgf1_hash_id ); - - ret = mbedtls_snprintf( p, n, " (%s, MGF1-%s, 0x%02X)", - md_info ? mbedtls_md_get_name( md_info ) : "???", - mgf_md_info ? mbedtls_md_get_name( mgf_md_info ) : "???", - pss_opts->expected_salt_len ); - MBEDTLS_X509_SAFE_SNPRINTF; - } -#else - ((void) pk_alg); - ((void) md_alg); - ((void) sig_opts); -#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ - - return( (int)( size - n ) ); -} - -/* - * Helper for writing "RSA key size", "EC key size", etc - */ -int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name ) -{ - char *p = buf; - size_t n = buf_size; - int ret; - - ret = mbedtls_snprintf( p, n, "%s key size", name ); - MBEDTLS_X509_SAFE_SNPRINTF; - - return( 0 ); -} - -#if defined(MBEDTLS_HAVE_TIME_DATE) -/* - * Set the time structure to the current time. - * Return 0 on success, non-zero on failure. - */ -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) -static int x509_get_current_time( mbedtls_x509_time *now ) -{ - SYSTEMTIME st; - - GetSystemTime( &st ); - - now->year = st.wYear; - now->mon = st.wMonth; - now->day = st.wDay; - now->hour = st.wHour; - now->min = st.wMinute; - now->sec = st.wSecond; - - return( 0 ); -} -#else -static int x509_get_current_time( mbedtls_x509_time *now ) -{ - struct tm *lt; - time_t tt; - int ret = 0; - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_lock( &mbedtls_threading_gmtime_mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - tt = time( NULL ); - lt = gmtime( &tt ); - - if( lt == NULL ) - ret = -1; - else - { - now->year = lt->tm_year + 1900; - now->mon = lt->tm_mon + 1; - now->day = lt->tm_mday; - now->hour = lt->tm_hour; - now->min = lt->tm_min; - now->sec = lt->tm_sec; - } - -#if defined(MBEDTLS_THREADING_C) - if( mbedtls_mutex_unlock( &mbedtls_threading_gmtime_mutex ) != 0 ) - return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); -#endif - - return( ret ); -} -#endif /* _WIN32 && !EFIX64 && !EFI32 */ - -/* - * Return 0 if before <= after, 1 otherwise - */ -static int x509_check_time( const mbedtls_x509_time *before, const mbedtls_x509_time *after ) -{ - if( before->year > after->year ) - return( 1 ); - - if( before->year == after->year && - before->mon > after->mon ) - return( 1 ); - - if( before->year == after->year && - before->mon == after->mon && - before->day > after->day ) - return( 1 ); - - if( before->year == after->year && - before->mon == after->mon && - before->day == after->day && - before->hour > after->hour ) - return( 1 ); - - if( before->year == after->year && - before->mon == after->mon && - before->day == after->day && - before->hour == after->hour && - before->min > after->min ) - return( 1 ); - - if( before->year == after->year && - before->mon == after->mon && - before->day == after->day && - before->hour == after->hour && - before->min == after->min && - before->sec > after->sec ) - return( 1 ); - - return( 0 ); -} - -int mbedtls_x509_time_is_past( const mbedtls_x509_time *to ) -{ - mbedtls_x509_time now; - - if( x509_get_current_time( &now ) != 0 ) - return( 1 ); - - return( x509_check_time( &now, to ) ); -} - -int mbedtls_x509_time_is_future( const mbedtls_x509_time *from ) -{ - mbedtls_x509_time now; - - if( x509_get_current_time( &now ) != 0 ) - return( 1 ); - - return( x509_check_time( from, &now ) ); -} - -#else /* MBEDTLS_HAVE_TIME_DATE */ - -int mbedtls_x509_time_is_past( const mbedtls_x509_time *to ) -{ - ((void) to); - return( 0 ); -} - -int mbedtls_x509_time_is_future( const mbedtls_x509_time *from ) -{ - ((void) from); - return( 0 ); -} -#endif /* MBEDTLS_HAVE_TIME_DATE */ - -#if defined(MBEDTLS_SELF_TEST) - -#include "mbedtls/x509_crt.h" -#include "mbedtls/certs.h" - -/* - * Checkup routine - */ -int mbedtls_x509_self_test( int verbose ) -{ -#if defined(MBEDTLS_CERTS_C) && defined(MBEDTLS_SHA1_C) - int ret; - uint32_t flags; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - - if( verbose != 0 ) - mbedtls_printf( " X.509 certificate load: " ); - - mbedtls_x509_crt_init( &clicert ); - - ret = mbedtls_x509_crt_parse( &clicert, (const unsigned char *) mbedtls_test_cli_crt, - mbedtls_test_cli_crt_len ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - - mbedtls_x509_crt_init( &cacert ); - - ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_ca_crt, - mbedtls_test_ca_crt_len ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n X.509 signature verify: "); - - ret = mbedtls_x509_crt_verify( &clicert, &cacert, NULL, NULL, &flags, NULL, NULL ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n\n"); - - mbedtls_x509_crt_free( &cacert ); - mbedtls_x509_crt_free( &clicert ); - - return( 0 ); -#else - ((void) verbose); - return( 0 ); -#endif /* MBEDTLS_CERTS_C && MBEDTLS_SHA1_C */ -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_X509_USE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509_create.c b/build/premake/premake5/contrib/mbedtls/library/x509_create.c deleted file mode 100644 index df20ec8ebd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509_create.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * X.509 base functions for creating certificates / CSRs - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_CREATE_C) - -#include "mbedtls/x509.h" -#include "mbedtls/asn1write.h" -#include "mbedtls/oid.h" - -#include - -typedef struct { - const char *name; - size_t name_len; - const char*oid; -} x509_attr_descriptor_t; - -#define ADD_STRLEN( s ) s, sizeof( s ) - 1 - -static const x509_attr_descriptor_t x509_attrs[] = -{ - { ADD_STRLEN( "CN" ), MBEDTLS_OID_AT_CN }, - { ADD_STRLEN( "commonName" ), MBEDTLS_OID_AT_CN }, - { ADD_STRLEN( "C" ), MBEDTLS_OID_AT_COUNTRY }, - { ADD_STRLEN( "countryName" ), MBEDTLS_OID_AT_COUNTRY }, - { ADD_STRLEN( "O" ), MBEDTLS_OID_AT_ORGANIZATION }, - { ADD_STRLEN( "organizationName" ), MBEDTLS_OID_AT_ORGANIZATION }, - { ADD_STRLEN( "L" ), MBEDTLS_OID_AT_LOCALITY }, - { ADD_STRLEN( "locality" ), MBEDTLS_OID_AT_LOCALITY }, - { ADD_STRLEN( "R" ), MBEDTLS_OID_PKCS9_EMAIL }, - { ADD_STRLEN( "OU" ), MBEDTLS_OID_AT_ORG_UNIT }, - { ADD_STRLEN( "organizationalUnitName" ), MBEDTLS_OID_AT_ORG_UNIT }, - { ADD_STRLEN( "ST" ), MBEDTLS_OID_AT_STATE }, - { ADD_STRLEN( "stateOrProvinceName" ), MBEDTLS_OID_AT_STATE }, - { ADD_STRLEN( "emailAddress" ), MBEDTLS_OID_PKCS9_EMAIL }, - { ADD_STRLEN( "serialNumber" ), MBEDTLS_OID_AT_SERIAL_NUMBER }, - { ADD_STRLEN( "postalAddress" ), MBEDTLS_OID_AT_POSTAL_ADDRESS }, - { ADD_STRLEN( "postalCode" ), MBEDTLS_OID_AT_POSTAL_CODE }, - { ADD_STRLEN( "dnQualifier" ), MBEDTLS_OID_AT_DN_QUALIFIER }, - { ADD_STRLEN( "title" ), MBEDTLS_OID_AT_TITLE }, - { ADD_STRLEN( "surName" ), MBEDTLS_OID_AT_SUR_NAME }, - { ADD_STRLEN( "SN" ), MBEDTLS_OID_AT_SUR_NAME }, - { ADD_STRLEN( "givenName" ), MBEDTLS_OID_AT_GIVEN_NAME }, - { ADD_STRLEN( "GN" ), MBEDTLS_OID_AT_GIVEN_NAME }, - { ADD_STRLEN( "initials" ), MBEDTLS_OID_AT_INITIALS }, - { ADD_STRLEN( "pseudonym" ), MBEDTLS_OID_AT_PSEUDONYM }, - { ADD_STRLEN( "generationQualifier" ), MBEDTLS_OID_AT_GENERATION_QUALIFIER }, - { ADD_STRLEN( "domainComponent" ), MBEDTLS_OID_DOMAIN_COMPONENT }, - { ADD_STRLEN( "DC" ), MBEDTLS_OID_DOMAIN_COMPONENT }, - { NULL, 0, NULL } -}; - -static const char *x509_at_oid_from_name( const char *name, size_t name_len ) -{ - const x509_attr_descriptor_t *cur; - - for( cur = x509_attrs; cur->name != NULL; cur++ ) - if( cur->name_len == name_len && - strncmp( cur->name, name, name_len ) == 0 ) - break; - - return( cur->oid ); -} - -int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *name ) -{ - int ret = 0; - const char *s = name, *c = s; - const char *end = s + strlen( s ); - const char *oid = NULL; - int in_tag = 1; - char data[MBEDTLS_X509_MAX_DN_NAME_SIZE]; - char *d = data; - - /* Clear existing chain if present */ - mbedtls_asn1_free_named_data_list( head ); - - while( c <= end ) - { - if( in_tag && *c == '=' ) - { - if( ( oid = x509_at_oid_from_name( s, c - s ) ) == NULL ) - { - ret = MBEDTLS_ERR_X509_UNKNOWN_OID; - goto exit; - } - - s = c + 1; - in_tag = 0; - d = data; - } - - if( !in_tag && *c == '\\' && c != end ) - { - c++; - - /* Check for valid escaped characters */ - if( c == end || *c != ',' ) - { - ret = MBEDTLS_ERR_X509_INVALID_NAME; - goto exit; - } - } - else if( !in_tag && ( *c == ',' || c == end ) ) - { - if( mbedtls_asn1_store_named_data( head, oid, strlen( oid ), - (unsigned char *) data, - d - data ) == NULL ) - { - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - } - - while( c < end && *(c + 1) == ' ' ) - c++; - - s = c + 1; - in_tag = 1; - } - - if( !in_tag && s != c + 1 ) - { - *(d++) = *c; - - if( d - data == MBEDTLS_X509_MAX_DN_NAME_SIZE ) - { - ret = MBEDTLS_ERR_X509_INVALID_NAME; - goto exit; - } - } - - c++; - } - -exit: - - return( ret ); -} - -/* The first byte of the value in the mbedtls_asn1_named_data structure is reserved - * to store the critical boolean for us - */ -int mbedtls_x509_set_extension( mbedtls_asn1_named_data **head, const char *oid, size_t oid_len, - int critical, const unsigned char *val, size_t val_len ) -{ - mbedtls_asn1_named_data *cur; - - if( ( cur = mbedtls_asn1_store_named_data( head, oid, oid_len, - NULL, val_len + 1 ) ) == NULL ) - { - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - } - - cur->val.p[0] = critical; - memcpy( cur->val.p + 1, val, val_len ); - - return( 0 ); -} - -/* - * RelativeDistinguishedName ::= - * SET OF AttributeTypeAndValue - * - * AttributeTypeAndValue ::= SEQUENCE { - * type AttributeType, - * value AttributeValue } - * - * AttributeType ::= OBJECT IDENTIFIER - * - * AttributeValue ::= ANY DEFINED BY AttributeType - */ -static int x509_write_name( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len, - const unsigned char *name, size_t name_len ) -{ - int ret; - size_t len = 0; - - // Write PrintableString for all except MBEDTLS_OID_PKCS9_EMAIL - // - if( MBEDTLS_OID_SIZE( MBEDTLS_OID_PKCS9_EMAIL ) == oid_len && - memcmp( oid, MBEDTLS_OID_PKCS9_EMAIL, oid_len ) == 0 ) - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_ia5_string( p, start, - (const char *) name, - name_len ) ); - } - else - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_printable_string( p, start, - (const char *) name, - name_len ) ); - } - - // Write OID - // - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( p, start, oid, oid_len ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SET ) ); - - return( (int) len ); -} - -int mbedtls_x509_write_names( unsigned char **p, unsigned char *start, - mbedtls_asn1_named_data *first ) -{ - int ret; - size_t len = 0; - mbedtls_asn1_named_data *cur = first; - - while( cur != NULL ) - { - MBEDTLS_ASN1_CHK_ADD( len, x509_write_name( p, start, (char *) cur->oid.p, - cur->oid.len, - cur->val.p, cur->val.len ) ); - cur = cur->next; - } - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} - -int mbedtls_x509_write_sig( unsigned char **p, unsigned char *start, - const char *oid, size_t oid_len, - unsigned char *sig, size_t size ) -{ - int ret; - size_t len = 0; - - if( *p < start || (size_t)( *p - start ) < size ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - len = size; - (*p) -= len; - memcpy( *p, sig, len ); - - if( *p - start < 1 ) - return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); - - *--(*p) = 0; - len += 1; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_BIT_STRING ) ); - - // Write OID - // - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_algorithm_identifier( p, start, oid, - oid_len, 0 ) ); - - return( (int) len ); -} - -static int x509_write_extension( unsigned char **p, unsigned char *start, - mbedtls_asn1_named_data *ext ) -{ - int ret; - size_t len = 0; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, ext->val.p + 1, - ext->val.len - 1 ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, ext->val.len - 1 ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OCTET_STRING ) ); - - if( ext->val.p[0] != 0 ) - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_bool( p, start, 1 ) ); - } - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, ext->oid.p, - ext->oid.len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, ext->oid.len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_OID ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} - -/* - * Extension ::= SEQUENCE { - * extnID OBJECT IDENTIFIER, - * critical BOOLEAN DEFAULT FALSE, - * extnValue OCTET STRING - * -- contains the DER encoding of an ASN.1 value - * -- corresponding to the extension type identified - * -- by extnID - * } - */ -int mbedtls_x509_write_extensions( unsigned char **p, unsigned char *start, - mbedtls_asn1_named_data *first ) -{ - int ret; - size_t len = 0; - mbedtls_asn1_named_data *cur_ext = first; - - while( cur_ext != NULL ) - { - MBEDTLS_ASN1_CHK_ADD( len, x509_write_extension( p, start, cur_ext ) ); - cur_ext = cur_ext->next; - } - - return( (int) len ); -} - -#endif /* MBEDTLS_X509_CREATE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509_crl.c b/build/premake/premake5/contrib/mbedtls/library/x509_crl.c deleted file mode 100644 index 125a77399d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509_crl.c +++ /dev/null @@ -1,721 +0,0 @@ -/* - * X.509 Certidicate Revocation List (CRL) parsing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The ITU-T X.509 standard defines a certificate format for PKI. - * - * http://www.ietf.org/rfc/rfc5280.txt (Certificates and CRLs) - * http://www.ietf.org/rfc/rfc3279.txt (Alg IDs for CRLs) - * http://www.ietf.org/rfc/rfc2986.txt (CSRs, aka PKCS#10) - * - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_CRL_PARSE_C) - -#include "mbedtls/x509_crl.h" -#include "mbedtls/oid.h" - -#include - -#if defined(MBEDTLS_PEM_PARSE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_snprintf snprintf -#endif - -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) -#include -#else -#include -#endif - -#if defined(MBEDTLS_FS_IO) || defined(EFIX64) || defined(EFI32) -#include -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Version ::= INTEGER { v1(0), v2(1) } - */ -static int x509_crl_get_version( unsigned char **p, - const unsigned char *end, - int *ver ) -{ - int ret; - - if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - { - *ver = 0; - return( 0 ); - } - - return( MBEDTLS_ERR_X509_INVALID_VERSION + ret ); - } - - return( 0 ); -} - -/* - * X.509 CRL v2 extensions (no extensions parsed yet.) - */ -static int x509_get_crl_ext( unsigned char **p, - const unsigned char *end, - mbedtls_x509_buf *ext ) -{ - int ret; - size_t len = 0; - - /* Get explicit tag */ - if( ( ret = mbedtls_x509_get_ext( p, end, ext, 0) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( 0 ); - - return( ret ); - } - - while( *p < end ) - { - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - *p += len; - } - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * X.509 CRL v2 entry extensions (no extensions parsed yet.) - */ -static int x509_get_crl_entry_ext( unsigned char **p, - const unsigned char *end, - mbedtls_x509_buf *ext ) -{ - int ret; - size_t len = 0; - - /* OPTIONAL */ - if( end <= *p ) - return( 0 ); - - ext->tag = **p; - ext->p = *p; - - /* - * Get CRL-entry extension sequence header - * crlEntryExtensions Extensions OPTIONAL -- if present, MUST be v2 - */ - if( ( ret = mbedtls_asn1_get_tag( p, end, &ext->len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - { - ext->p = NULL; - return( 0 ); - } - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - } - - end = *p + ext->len; - - if( end != *p + ext->len ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - while( *p < end ) - { - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - *p += len; - } - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * X.509 CRL Entries - */ -static int x509_get_entries( unsigned char **p, - const unsigned char *end, - mbedtls_x509_crl_entry *entry ) -{ - int ret; - size_t entry_len; - mbedtls_x509_crl_entry *cur_entry = entry; - - if( *p == end ) - return( 0 ); - - if( ( ret = mbedtls_asn1_get_tag( p, end, &entry_len, - MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( 0 ); - - return( ret ); - } - - end = *p + entry_len; - - while( *p < end ) - { - size_t len2; - const unsigned char *end2; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len2, - MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED ) ) != 0 ) - { - return( ret ); - } - - cur_entry->raw.tag = **p; - cur_entry->raw.p = *p; - cur_entry->raw.len = len2; - end2 = *p + len2; - - if( ( ret = mbedtls_x509_get_serial( p, end2, &cur_entry->serial ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_x509_get_time( p, end2, - &cur_entry->revocation_date ) ) != 0 ) - return( ret ); - - if( ( ret = x509_get_crl_entry_ext( p, end2, - &cur_entry->entry_ext ) ) != 0 ) - return( ret ); - - if( *p < end ) - { - cur_entry->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crl_entry ) ); - - if( cur_entry->next == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - cur_entry = cur_entry->next; - } - } - - return( 0 ); -} - -/* - * Parse one CRLs in DER format and append it to the chained list - */ -int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain, - const unsigned char *buf, size_t buflen ) -{ - int ret; - size_t len; - unsigned char *p, *end; - mbedtls_x509_buf sig_params1, sig_params2, sig_oid2; - mbedtls_x509_crl *crl = chain; - - /* - * Check for valid input - */ - if( crl == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - memset( &sig_params1, 0, sizeof( mbedtls_x509_buf ) ); - memset( &sig_params2, 0, sizeof( mbedtls_x509_buf ) ); - memset( &sig_oid2, 0, sizeof( mbedtls_x509_buf ) ); - - /* - * Add new CRL on the end of the chain if needed. - */ - while( crl->version != 0 && crl->next != NULL ) - crl = crl->next; - - if( crl->version != 0 && crl->next == NULL ) - { - crl->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crl ) ); - - if( crl->next == NULL ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - } - - mbedtls_x509_crl_init( crl->next ); - crl = crl->next; - } - - /* - * Copy raw DER-encoded CRL - */ - if( ( p = mbedtls_calloc( 1, buflen ) ) == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - memcpy( p, buf, buflen ); - - crl->raw.p = p; - crl->raw.len = buflen; - - end = p + buflen; - - /* - * CertificateList ::= SEQUENCE { - * tbsCertList TBSCertList, - * signatureAlgorithm AlgorithmIdentifier, - * signatureValue BIT STRING } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT ); - } - - if( len != (size_t) ( end - p ) ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - /* - * TBSCertList ::= SEQUENCE { - */ - crl->tbs.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - end = p + len; - crl->tbs.len = end - crl->tbs.p; - - /* - * Version ::= INTEGER OPTIONAL { v1(0), v2(1) } - * -- if present, MUST be v2 - * - * signature AlgorithmIdentifier - */ - if( ( ret = x509_crl_get_version( &p, end, &crl->version ) ) != 0 || - ( ret = mbedtls_x509_get_alg( &p, end, &crl->sig_oid, &sig_params1 ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - - crl->version++; - - if( crl->version > 2 ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_UNKNOWN_VERSION ); - } - - if( ( ret = mbedtls_x509_get_sig_alg( &crl->sig_oid, &sig_params1, - &crl->sig_md, &crl->sig_pk, - &crl->sig_opts ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG ); - } - - /* - * issuer Name - */ - crl->issuer_raw.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - if( ( ret = mbedtls_x509_get_name( &p, p + len, &crl->issuer ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - - crl->issuer_raw.len = p - crl->issuer_raw.p; - - /* - * thisUpdate Time - * nextUpdate Time OPTIONAL - */ - if( ( ret = mbedtls_x509_get_time( &p, end, &crl->this_update ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - - if( ( ret = mbedtls_x509_get_time( &p, end, &crl->next_update ) ) != 0 ) - { - if( ret != ( MBEDTLS_ERR_X509_INVALID_DATE + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) && - ret != ( MBEDTLS_ERR_X509_INVALID_DATE + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ) ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - } - - /* - * revokedCertificates SEQUENCE OF SEQUENCE { - * userCertificate CertificateSerialNumber, - * revocationDate Time, - * crlEntryExtensions Extensions OPTIONAL - * -- if present, MUST be v2 - * } OPTIONAL - */ - if( ( ret = x509_get_entries( &p, end, &crl->entry ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - - /* - * crlExtensions EXPLICIT Extensions OPTIONAL - * -- if present, MUST be v2 - */ - if( crl->version == 2 ) - { - ret = x509_get_crl_ext( &p, end, &crl->crl_ext ); - - if( ret != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - } - - if( p != end ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - end = crl->raw.p + crl->raw.len; - - /* - * signatureAlgorithm AlgorithmIdentifier, - * signatureValue BIT STRING - */ - if( ( ret = mbedtls_x509_get_alg( &p, end, &sig_oid2, &sig_params2 ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - - if( crl->sig_oid.len != sig_oid2.len || - memcmp( crl->sig_oid.p, sig_oid2.p, crl->sig_oid.len ) != 0 || - sig_params1.len != sig_params2.len || - ( sig_params1.len != 0 && - memcmp( sig_params1.p, sig_params2.p, sig_params1.len ) != 0 ) ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_SIG_MISMATCH ); - } - - if( ( ret = mbedtls_x509_get_sig( &p, end, &crl->sig ) ) != 0 ) - { - mbedtls_x509_crl_free( crl ); - return( ret ); - } - - if( p != end ) - { - mbedtls_x509_crl_free( crl ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - return( 0 ); -} - -/* - * Parse one or more CRLs and add them to the chained list - */ -int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen ) -{ -#if defined(MBEDTLS_PEM_PARSE_C) - int ret; - size_t use_len; - mbedtls_pem_context pem; - int is_pem = 0; - - if( chain == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - do - { - mbedtls_pem_init( &pem ); - - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( buflen == 0 || buf[buflen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN X509 CRL-----", - "-----END X509 CRL-----", - buf, NULL, 0, &use_len ); - - if( ret == 0 ) - { - /* - * Was PEM encoded - */ - is_pem = 1; - - buflen -= use_len; - buf += use_len; - - if( ( ret = mbedtls_x509_crl_parse_der( chain, - pem.buf, pem.buflen ) ) != 0 ) - { - return( ret ); - } - - mbedtls_pem_free( &pem ); - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - mbedtls_pem_free( &pem ); - return( ret ); - } - } - /* In the PEM case, buflen is 1 at the end, for the terminated NULL byte. - * And a valid CRL cannot be less than 1 byte anyway. */ - while( is_pem && buflen > 1 ); - - if( is_pem ) - return( 0 ); - else -#endif /* MBEDTLS_PEM_PARSE_C */ - return( mbedtls_x509_crl_parse_der( chain, buf, buflen ) ); -} - -#if defined(MBEDTLS_FS_IO) -/* - * Load one or more CRLs and add them to the chained list - */ -int mbedtls_x509_crl_parse_file( mbedtls_x509_crl *chain, const char *path ) -{ - int ret; - size_t n; - unsigned char *buf; - - if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) - return( ret ); - - ret = mbedtls_x509_crl_parse( chain, buf, n ); - - mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ - -/* - * Return an informational string about the certificate. - */ -#define BEFORE_COLON 14 -#define BC "14" -/* - * Return an informational string about the CRL. - */ -int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix, - const mbedtls_x509_crl *crl ) -{ - int ret; - size_t n; - char *p; - const mbedtls_x509_crl_entry *entry; - - p = buf; - n = size; - - ret = mbedtls_snprintf( p, n, "%sCRL version : %d", - prefix, crl->version ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_x509_dn_gets( p, n, &crl->issuer ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%sthis update : " \ - "%04d-%02d-%02d %02d:%02d:%02d", prefix, - crl->this_update.year, crl->this_update.mon, - crl->this_update.day, crl->this_update.hour, - crl->this_update.min, crl->this_update.sec ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%snext update : " \ - "%04d-%02d-%02d %02d:%02d:%02d", prefix, - crl->next_update.year, crl->next_update.mon, - crl->next_update.day, crl->next_update.hour, - crl->next_update.min, crl->next_update.sec ); - MBEDTLS_X509_SAFE_SNPRINTF; - - entry = &crl->entry; - - ret = mbedtls_snprintf( p, n, "\n%sRevoked certificates:", - prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - while( entry != NULL && entry->raw.len != 0 ) - { - ret = mbedtls_snprintf( p, n, "\n%sserial number: ", - prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_serial_gets( p, n, &entry->serial ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, " revocation date: " \ - "%04d-%02d-%02d %02d:%02d:%02d", - entry->revocation_date.year, entry->revocation_date.mon, - entry->revocation_date.day, entry->revocation_date.hour, - entry->revocation_date.min, entry->revocation_date.sec ); - MBEDTLS_X509_SAFE_SNPRINTF; - - entry = entry->next; - } - - ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_sig_alg_gets( p, n, &crl->sig_oid, crl->sig_pk, crl->sig_md, - crl->sig_opts ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n" ); - MBEDTLS_X509_SAFE_SNPRINTF; - - return( (int) ( size - n ) ); -} - -/* - * Initialize a CRL chain - */ -void mbedtls_x509_crl_init( mbedtls_x509_crl *crl ) -{ - memset( crl, 0, sizeof(mbedtls_x509_crl) ); -} - -/* - * Unallocate all CRL data - */ -void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ) -{ - mbedtls_x509_crl *crl_cur = crl; - mbedtls_x509_crl *crl_prv; - mbedtls_x509_name *name_cur; - mbedtls_x509_name *name_prv; - mbedtls_x509_crl_entry *entry_cur; - mbedtls_x509_crl_entry *entry_prv; - - if( crl == NULL ) - return; - - do - { -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - mbedtls_free( crl_cur->sig_opts ); -#endif - - name_cur = crl_cur->issuer.next; - while( name_cur != NULL ) - { - name_prv = name_cur; - name_cur = name_cur->next; - mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); - } - - entry_cur = crl_cur->entry.next; - while( entry_cur != NULL ) - { - entry_prv = entry_cur; - entry_cur = entry_cur->next; - mbedtls_zeroize( entry_prv, sizeof( mbedtls_x509_crl_entry ) ); - mbedtls_free( entry_prv ); - } - - if( crl_cur->raw.p != NULL ) - { - mbedtls_zeroize( crl_cur->raw.p, crl_cur->raw.len ); - mbedtls_free( crl_cur->raw.p ); - } - - crl_cur = crl_cur->next; - } - while( crl_cur != NULL ); - - crl_cur = crl; - do - { - crl_prv = crl_cur; - crl_cur = crl_cur->next; - - mbedtls_zeroize( crl_prv, sizeof( mbedtls_x509_crl ) ); - if( crl_prv != crl ) - mbedtls_free( crl_prv ); - } - while( crl_cur != NULL ); -} - -#endif /* MBEDTLS_X509_CRL_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509_crt.c b/build/premake/premake5/contrib/mbedtls/library/x509_crt.c deleted file mode 100644 index 6dc5ad34f4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509_crt.c +++ /dev/null @@ -1,2372 +0,0 @@ -/* - * X.509 certificate parsing and verification - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The ITU-T X.509 standard defines a certificate format for PKI. - * - * http://www.ietf.org/rfc/rfc5280.txt (Certificates and CRLs) - * http://www.ietf.org/rfc/rfc3279.txt (Alg IDs for CRLs) - * http://www.ietf.org/rfc/rfc2986.txt (CSRs, aka PKCS#10) - * - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - -#include "mbedtls/x509_crt.h" -#include "mbedtls/oid.h" - -#include -#include - -#if defined(MBEDTLS_PEM_PARSE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) -#include -#else -#include -#endif - -#if defined(MBEDTLS_FS_IO) -#include -#if !defined(_WIN32) || defined(EFIX64) || defined(EFI32) -#include -#include -#include -#endif /* !_WIN32 || EFIX64 || EFI32 */ -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Default profile - */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default = -{ - /* Hashes from SHA-1 and above */ - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_RIPEMD160 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA224 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA384 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA512 ), - 0xFFFFFFF, /* Any PK alg */ - 0xFFFFFFF, /* Any curve */ - 2048, -}; - -/* - * Next-default profile - */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next = -{ - /* Hashes from SHA-256 and above */ - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA384 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA512 ), - 0xFFFFFFF, /* Any PK alg */ -#if defined(MBEDTLS_ECP_C) - /* Curves at or above 128-bit security level */ - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_SECP256R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_SECP384R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_SECP521R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_BP256R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_BP384R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_BP512R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_SECP256K1 ), -#else - 0, -#endif - 2048, -}; - -/* - * NSA Suite B Profile - */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb = -{ - /* Only SHA-256 and 384 */ - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA384 ), - /* Only ECDSA */ - MBEDTLS_X509_ID_FLAG( MBEDTLS_PK_ECDSA ), -#if defined(MBEDTLS_ECP_C) - /* Only NIST P-256 and P-384 */ - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_SECP256R1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_ECP_DP_SECP384R1 ), -#else - 0, -#endif - 0, -}; - -/* - * Check md_alg against profile - * Return 0 if md_alg acceptable for this profile, -1 otherwise - */ -static int x509_profile_check_md_alg( const mbedtls_x509_crt_profile *profile, - mbedtls_md_type_t md_alg ) -{ - if( ( profile->allowed_mds & MBEDTLS_X509_ID_FLAG( md_alg ) ) != 0 ) - return( 0 ); - - return( -1 ); -} - -/* - * Check pk_alg against profile - * Return 0 if pk_alg acceptable for this profile, -1 otherwise - */ -static int x509_profile_check_pk_alg( const mbedtls_x509_crt_profile *profile, - mbedtls_pk_type_t pk_alg ) -{ - if( ( profile->allowed_pks & MBEDTLS_X509_ID_FLAG( pk_alg ) ) != 0 ) - return( 0 ); - - return( -1 ); -} - -/* - * Check key against profile - * Return 0 if pk_alg acceptable for this profile, -1 otherwise - */ -static int x509_profile_check_key( const mbedtls_x509_crt_profile *profile, - mbedtls_pk_type_t pk_alg, - const mbedtls_pk_context *pk ) -{ -#if defined(MBEDTLS_RSA_C) - if( pk_alg == MBEDTLS_PK_RSA || pk_alg == MBEDTLS_PK_RSASSA_PSS ) - { - if( mbedtls_pk_get_bitlen( pk ) >= profile->rsa_min_bitlen ) - return( 0 ); - - return( -1 ); - } -#endif - -#if defined(MBEDTLS_ECP_C) - if( pk_alg == MBEDTLS_PK_ECDSA || - pk_alg == MBEDTLS_PK_ECKEY || - pk_alg == MBEDTLS_PK_ECKEY_DH ) - { - mbedtls_ecp_group_id gid = mbedtls_pk_ec( *pk )->grp.id; - - if( ( profile->allowed_curves & MBEDTLS_X509_ID_FLAG( gid ) ) != 0 ) - return( 0 ); - - return( -1 ); - } -#endif - - return( -1 ); -} - -/* - * Version ::= INTEGER { v1(0), v2(1), v3(2) } - */ -static int x509_get_version( unsigned char **p, - const unsigned char *end, - int *ver ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0 ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - { - *ver = 0; - return( 0 ); - } - - return( ret ); - } - - end = *p + len; - - if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_VERSION + ret ); - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_VERSION + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * Validity ::= SEQUENCE { - * notBefore Time, - * notAfter Time } - */ -static int x509_get_dates( unsigned char **p, - const unsigned char *end, - mbedtls_x509_time *from, - mbedtls_x509_time *to ) -{ - int ret; - size_t len; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_DATE + ret ); - - end = *p + len; - - if( ( ret = mbedtls_x509_get_time( p, end, from ) ) != 0 ) - return( ret ); - - if( ( ret = mbedtls_x509_get_time( p, end, to ) ) != 0 ) - return( ret ); - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_DATE + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * X.509 v2/v3 unique identifier (not parsed) - */ -static int x509_get_uid( unsigned char **p, - const unsigned char *end, - mbedtls_x509_buf *uid, int n ) -{ - int ret; - - if( *p == end ) - return( 0 ); - - uid->tag = **p; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &uid->len, - MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | n ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( 0 ); - - return( ret ); - } - - uid->p = *p; - *p += uid->len; - - return( 0 ); -} - -static int x509_get_basic_constraints( unsigned char **p, - const unsigned char *end, - int *ca_istrue, - int *max_pathlen ) -{ - int ret; - size_t len; - - /* - * BasicConstraints ::= SEQUENCE { - * cA BOOLEAN DEFAULT FALSE, - * pathLenConstraint INTEGER (0..MAX) OPTIONAL } - */ - *ca_istrue = 0; /* DEFAULT FALSE */ - *max_pathlen = 0; /* endless */ - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( *p == end ) - return( 0 ); - - if( ( ret = mbedtls_asn1_get_bool( p, end, ca_istrue ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - ret = mbedtls_asn1_get_int( p, end, ca_istrue ); - - if( ret != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( *ca_istrue != 0 ) - *ca_istrue = 1; - } - - if( *p == end ) - return( 0 ); - - if( ( ret = mbedtls_asn1_get_int( p, end, max_pathlen ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - (*max_pathlen)++; - - return( 0 ); -} - -static int x509_get_ns_cert_type( unsigned char **p, - const unsigned char *end, - unsigned char *ns_cert_type) -{ - int ret; - mbedtls_x509_bitstring bs = { 0, 0, NULL }; - - if( ( ret = mbedtls_asn1_get_bitstring( p, end, &bs ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( bs.len != 1 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - - /* Get actual bitstring */ - *ns_cert_type = *bs.p; - return( 0 ); -} - -static int x509_get_key_usage( unsigned char **p, - const unsigned char *end, - unsigned int *key_usage) -{ - int ret; - size_t i; - mbedtls_x509_bitstring bs = { 0, 0, NULL }; - - if( ( ret = mbedtls_asn1_get_bitstring( p, end, &bs ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( bs.len < 1 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - - /* Get actual bitstring */ - *key_usage = 0; - for( i = 0; i < bs.len && i < sizeof( unsigned int ); i++ ) - { - *key_usage |= (unsigned int) bs.p[i] << (8*i); - } - - return( 0 ); -} - -/* - * ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId - * - * KeyPurposeId ::= OBJECT IDENTIFIER - */ -static int x509_get_ext_key_usage( unsigned char **p, - const unsigned char *end, - mbedtls_x509_sequence *ext_key_usage) -{ - int ret; - - if( ( ret = mbedtls_asn1_get_sequence_of( p, end, ext_key_usage, MBEDTLS_ASN1_OID ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - /* Sequence length must be >= 1 */ - if( ext_key_usage->buf.p == NULL ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_INVALID_LENGTH ); - - return( 0 ); -} - -/* - * SubjectAltName ::= GeneralNames - * - * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName - * - * GeneralName ::= CHOICE { - * otherName [0] OtherName, - * rfc822Name [1] IA5String, - * dNSName [2] IA5String, - * x400Address [3] ORAddress, - * directoryName [4] Name, - * ediPartyName [5] EDIPartyName, - * uniformResourceIdentifier [6] IA5String, - * iPAddress [7] OCTET STRING, - * registeredID [8] OBJECT IDENTIFIER } - * - * OtherName ::= SEQUENCE { - * type-id OBJECT IDENTIFIER, - * value [0] EXPLICIT ANY DEFINED BY type-id } - * - * EDIPartyName ::= SEQUENCE { - * nameAssigner [0] DirectoryString OPTIONAL, - * partyName [1] DirectoryString } - * - * NOTE: we only parse and use dNSName at this point. - */ -static int x509_get_subject_alt_name( unsigned char **p, - const unsigned char *end, - mbedtls_x509_sequence *subject_alt_name ) -{ - int ret; - size_t len, tag_len; - mbedtls_asn1_buf *buf; - unsigned char tag; - mbedtls_asn1_sequence *cur = subject_alt_name; - - /* Get main sequence tag */ - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( *p + len != end ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - while( *p < end ) - { - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - tag = **p; - (*p)++; - if( ( ret = mbedtls_asn1_get_len( p, end, &tag_len ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - if( ( tag & MBEDTLS_ASN1_CONTEXT_SPECIFIC ) != MBEDTLS_ASN1_CONTEXT_SPECIFIC ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - - /* Skip everything but DNS name */ - if( tag != ( MBEDTLS_ASN1_CONTEXT_SPECIFIC | 2 ) ) - { - *p += tag_len; - continue; - } - - /* Allocate and assign next pointer */ - if( cur->buf.p != NULL ) - { - if( cur->next != NULL ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS ); - - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_asn1_sequence ) ); - - if( cur->next == NULL ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_ALLOC_FAILED ); - - cur = cur->next; - } - - buf = &(cur->buf); - buf->tag = tag; - buf->p = *p; - buf->len = tag_len; - *p += buf->len; - } - - /* Set final sequence entry's next pointer to NULL */ - cur->next = NULL; - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * X.509 v3 extensions - * - * TODO: Perform all of the basic constraints tests required by the RFC - * TODO: Set values for undetected extensions to a sane default? - * - */ -static int x509_get_crt_ext( unsigned char **p, - const unsigned char *end, - mbedtls_x509_crt *crt ) -{ - int ret; - size_t len; - unsigned char *end_ext_data, *end_ext_octet; - - if( ( ret = mbedtls_x509_get_ext( p, end, &crt->v3_ext, 3 ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - return( 0 ); - - return( ret ); - } - - while( *p < end ) - { - /* - * Extension ::= SEQUENCE { - * extnID OBJECT IDENTIFIER, - * critical BOOLEAN DEFAULT FALSE, - * extnValue OCTET STRING } - */ - mbedtls_x509_buf extn_oid = {0, 0, NULL}; - int is_critical = 0; /* DEFAULT FALSE */ - int ext_type = 0; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - end_ext_data = *p + len; - - /* Get extension ID */ - extn_oid.tag = **p; - - if( ( ret = mbedtls_asn1_get_tag( p, end, &extn_oid.len, MBEDTLS_ASN1_OID ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - extn_oid.p = *p; - *p += extn_oid.len; - - if( ( end - *p ) < 1 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_OUT_OF_DATA ); - - /* Get optional critical */ - if( ( ret = mbedtls_asn1_get_bool( p, end_ext_data, &is_critical ) ) != 0 && - ( ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - /* Data should be octet string type */ - if( ( ret = mbedtls_asn1_get_tag( p, end_ext_data, &len, - MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret ); - - end_ext_octet = *p + len; - - if( end_ext_octet != end_ext_data ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - /* - * Detect supported extensions - */ - ret = mbedtls_oid_get_x509_ext_type( &extn_oid, &ext_type ); - - if( ret != 0 ) - { - /* No parser found, skip extension */ - *p = end_ext_octet; - -#if !defined(MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION) - if( is_critical ) - { - /* Data is marked as critical: fail */ - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ); - } -#endif - continue; - } - - /* Forbid repeated extensions */ - if( ( crt->ext_types & ext_type ) != 0 ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS ); - - crt->ext_types |= ext_type; - - switch( ext_type ) - { - case MBEDTLS_X509_EXT_BASIC_CONSTRAINTS: - /* Parse basic constraints */ - if( ( ret = x509_get_basic_constraints( p, end_ext_octet, - &crt->ca_istrue, &crt->max_pathlen ) ) != 0 ) - return( ret ); - break; - - case MBEDTLS_X509_EXT_KEY_USAGE: - /* Parse key usage */ - if( ( ret = x509_get_key_usage( p, end_ext_octet, - &crt->key_usage ) ) != 0 ) - return( ret ); - break; - - case MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE: - /* Parse extended key usage */ - if( ( ret = x509_get_ext_key_usage( p, end_ext_octet, - &crt->ext_key_usage ) ) != 0 ) - return( ret ); - break; - - case MBEDTLS_X509_EXT_SUBJECT_ALT_NAME: - /* Parse subject alt name */ - if( ( ret = x509_get_subject_alt_name( p, end_ext_octet, - &crt->subject_alt_names ) ) != 0 ) - return( ret ); - break; - - case MBEDTLS_X509_EXT_NS_CERT_TYPE: - /* Parse netscape certificate type */ - if( ( ret = x509_get_ns_cert_type( p, end_ext_octet, - &crt->ns_cert_type ) ) != 0 ) - return( ret ); - break; - - default: - return( MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE ); - } - } - - if( *p != end ) - return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - - return( 0 ); -} - -/* - * Parse and fill a single X.509 certificate in DER format - */ -static int x509_crt_parse_der_core( mbedtls_x509_crt *crt, const unsigned char *buf, - size_t buflen ) -{ - int ret; - size_t len; - unsigned char *p, *end, *crt_end; - mbedtls_x509_buf sig_params1, sig_params2, sig_oid2; - - memset( &sig_params1, 0, sizeof( mbedtls_x509_buf ) ); - memset( &sig_params2, 0, sizeof( mbedtls_x509_buf ) ); - memset( &sig_oid2, 0, sizeof( mbedtls_x509_buf ) ); - - /* - * Check for valid input - */ - if( crt == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - p = mbedtls_calloc( 1, len = buflen ); - if( p == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - memcpy( p, buf, buflen ); - - crt->raw.p = p; - crt->raw.len = len; - end = p + len; - - /* - * Certificate ::= SEQUENCE { - * tbsCertificate TBSCertificate, - * signatureAlgorithm AlgorithmIdentifier, - * signatureValue BIT STRING } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT ); - } - - if( len > (size_t) ( end - p ) ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - crt_end = p + len; - - /* - * TBSCertificate ::= SEQUENCE { - */ - crt->tbs.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - end = p + len; - crt->tbs.len = end - crt->tbs.p; - - /* - * Version ::= INTEGER { v1(0), v2(1), v3(2) } - * - * CertificateSerialNumber ::= INTEGER - * - * signature AlgorithmIdentifier - */ - if( ( ret = x509_get_version( &p, end, &crt->version ) ) != 0 || - ( ret = mbedtls_x509_get_serial( &p, end, &crt->serial ) ) != 0 || - ( ret = mbedtls_x509_get_alg( &p, end, &crt->sig_oid, - &sig_params1 ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - crt->version++; - - if( crt->version > 3 ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_UNKNOWN_VERSION ); - } - - if( ( ret = mbedtls_x509_get_sig_alg( &crt->sig_oid, &sig_params1, - &crt->sig_md, &crt->sig_pk, - &crt->sig_opts ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - /* - * issuer Name - */ - crt->issuer_raw.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - if( ( ret = mbedtls_x509_get_name( &p, p + len, &crt->issuer ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - crt->issuer_raw.len = p - crt->issuer_raw.p; - - /* - * Validity ::= SEQUENCE { - * notBefore Time, - * notAfter Time } - * - */ - if( ( ret = x509_get_dates( &p, end, &crt->valid_from, - &crt->valid_to ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - /* - * subject Name - */ - crt->subject_raw.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - if( len && ( ret = mbedtls_x509_get_name( &p, p + len, &crt->subject ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - crt->subject_raw.len = p - crt->subject_raw.p; - - /* - * SubjectPublicKeyInfo - */ - if( ( ret = mbedtls_pk_parse_subpubkey( &p, end, &crt->pk ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - /* - * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL, - * -- If present, version shall be v2 or v3 - * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, - * -- If present, version shall be v2 or v3 - * extensions [3] EXPLICIT Extensions OPTIONAL - * -- If present, version shall be v3 - */ - if( crt->version == 2 || crt->version == 3 ) - { - ret = x509_get_uid( &p, end, &crt->issuer_id, 1 ); - if( ret != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - } - - if( crt->version == 2 || crt->version == 3 ) - { - ret = x509_get_uid( &p, end, &crt->subject_id, 2 ); - if( ret != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - } - -#if !defined(MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3) - if( crt->version == 3 ) -#endif - { - ret = x509_get_crt_ext( &p, end, crt ); - if( ret != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - } - - if( p != end ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - end = crt_end; - - /* - * } - * -- end of TBSCertificate - * - * signatureAlgorithm AlgorithmIdentifier, - * signatureValue BIT STRING - */ - if( ( ret = mbedtls_x509_get_alg( &p, end, &sig_oid2, &sig_params2 ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - if( crt->sig_oid.len != sig_oid2.len || - memcmp( crt->sig_oid.p, sig_oid2.p, crt->sig_oid.len ) != 0 || - sig_params1.len != sig_params2.len || - ( sig_params1.len != 0 && - memcmp( sig_params1.p, sig_params2.p, sig_params1.len ) != 0 ) ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_SIG_MISMATCH ); - } - - if( ( ret = mbedtls_x509_get_sig( &p, end, &crt->sig ) ) != 0 ) - { - mbedtls_x509_crt_free( crt ); - return( ret ); - } - - if( p != end ) - { - mbedtls_x509_crt_free( crt ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - return( 0 ); -} - -/* - * Parse one X.509 certificate in DER format from a buffer and add them to a - * chained list - */ -int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain, const unsigned char *buf, - size_t buflen ) -{ - int ret; - mbedtls_x509_crt *crt = chain, *prev = NULL; - - /* - * Check for valid input - */ - if( crt == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - while( crt->version != 0 && crt->next != NULL ) - { - prev = crt; - crt = crt->next; - } - - /* - * Add new certificate on the end of the chain if needed. - */ - if( crt->version != 0 && crt->next == NULL ) - { - crt->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ); - - if( crt->next == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - prev = crt; - mbedtls_x509_crt_init( crt->next ); - crt = crt->next; - } - - if( ( ret = x509_crt_parse_der_core( crt, buf, buflen ) ) != 0 ) - { - if( prev ) - prev->next = NULL; - - if( crt != chain ) - mbedtls_free( crt ); - - return( ret ); - } - - return( 0 ); -} - -/* - * Parse one or more PEM certificates from a buffer and add them to the chained - * list - */ -int mbedtls_x509_crt_parse( mbedtls_x509_crt *chain, const unsigned char *buf, size_t buflen ) -{ - int success = 0, first_error = 0, total_failed = 0; - int buf_format = MBEDTLS_X509_FORMAT_DER; - - /* - * Check for valid input - */ - if( chain == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - /* - * Determine buffer content. Buffer contains either one DER certificate or - * one or more PEM certificates. - */ -#if defined(MBEDTLS_PEM_PARSE_C) - if( buflen != 0 && buf[buflen - 1] == '\0' && - strstr( (const char *) buf, "-----BEGIN CERTIFICATE-----" ) != NULL ) - { - buf_format = MBEDTLS_X509_FORMAT_PEM; - } -#endif - - if( buf_format == MBEDTLS_X509_FORMAT_DER ) - return mbedtls_x509_crt_parse_der( chain, buf, buflen ); - -#if defined(MBEDTLS_PEM_PARSE_C) - if( buf_format == MBEDTLS_X509_FORMAT_PEM ) - { - int ret; - mbedtls_pem_context pem; - - /* 1 rather than 0 since the terminating NULL byte is counted in */ - while( buflen > 1 ) - { - size_t use_len; - mbedtls_pem_init( &pem ); - - /* If we get there, we know the string is null-terminated */ - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN CERTIFICATE-----", - "-----END CERTIFICATE-----", - buf, NULL, 0, &use_len ); - - if( ret == 0 ) - { - /* - * Was PEM encoded - */ - buflen -= use_len; - buf += use_len; - } - else if( ret == MBEDTLS_ERR_PEM_BAD_INPUT_DATA ) - { - return( ret ); - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - mbedtls_pem_free( &pem ); - - /* - * PEM header and footer were found - */ - buflen -= use_len; - buf += use_len; - - if( first_error == 0 ) - first_error = ret; - - total_failed++; - continue; - } - else - break; - - ret = mbedtls_x509_crt_parse_der( chain, pem.buf, pem.buflen ); - - mbedtls_pem_free( &pem ); - - if( ret != 0 ) - { - /* - * Quit parsing on a memory error - */ - if( ret == MBEDTLS_ERR_X509_ALLOC_FAILED ) - return( ret ); - - if( first_error == 0 ) - first_error = ret; - - total_failed++; - continue; - } - - success = 1; - } - } -#endif /* MBEDTLS_PEM_PARSE_C */ - - if( success ) - return( total_failed ); - else if( first_error ) - return( first_error ); - else - return( MBEDTLS_ERR_X509_CERT_UNKNOWN_FORMAT ); -} - -#if defined(MBEDTLS_FS_IO) -/* - * Load one or more certificates and add them to the chained list - */ -int mbedtls_x509_crt_parse_file( mbedtls_x509_crt *chain, const char *path ) -{ - int ret; - size_t n; - unsigned char *buf; - - if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) - return( ret ); - - ret = mbedtls_x509_crt_parse( chain, buf, n ); - - mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); - - return( ret ); -} - -int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path ) -{ - int ret = 0; -#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) - int w_ret; - WCHAR szDir[MAX_PATH]; - char filename[MAX_PATH]; - char *p; - size_t len = strlen( path ); - - WIN32_FIND_DATAW file_data; - HANDLE hFind; - - if( len > MAX_PATH - 3 ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - memset( szDir, 0, sizeof(szDir) ); - memset( filename, 0, MAX_PATH ); - memcpy( filename, path, len ); - filename[len++] = '\\'; - p = filename + len; - filename[len++] = '*'; - - w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir, - MAX_PATH - 3 ); - if( w_ret == 0 ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - hFind = FindFirstFileW( szDir, &file_data ); - if( hFind == INVALID_HANDLE_VALUE ) - return( MBEDTLS_ERR_X509_FILE_IO_ERROR ); - - len = MAX_PATH - len; - do - { - memset( p, 0, len ); - - if( file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) - continue; - - w_ret = WideCharToMultiByte( CP_ACP, 0, file_data.cFileName, - lstrlenW( file_data.cFileName ), - p, (int) len - 1, - NULL, NULL ); - if( w_ret == 0 ) - return( MBEDTLS_ERR_X509_FILE_IO_ERROR ); - - w_ret = mbedtls_x509_crt_parse_file( chain, filename ); - if( w_ret < 0 ) - ret++; - else - ret += w_ret; - } - while( FindNextFileW( hFind, &file_data ) != 0 ); - - if( GetLastError() != ERROR_NO_MORE_FILES ) - ret = MBEDTLS_ERR_X509_FILE_IO_ERROR; - - FindClose( hFind ); -#else /* _WIN32 */ - int t_ret; - struct stat sb; - struct dirent *entry; - char entry_name[255]; - DIR *dir = opendir( path ); - - if( dir == NULL ) - return( MBEDTLS_ERR_X509_FILE_IO_ERROR ); - -#if defined(MBEDTLS_THREADING_PTHREAD) - if( ( ret = mbedtls_mutex_lock( &mbedtls_threading_readdir_mutex ) ) != 0 ) - { - closedir( dir ); - return( ret ); - } -#endif - - while( ( entry = readdir( dir ) ) != NULL ) - { - mbedtls_snprintf( entry_name, sizeof entry_name, "%s/%s", path, entry->d_name ); - - if( stat( entry_name, &sb ) == -1 ) - { - closedir( dir ); - ret = MBEDTLS_ERR_X509_FILE_IO_ERROR; - goto cleanup; - } - - if( !S_ISREG( sb.st_mode ) ) - continue; - - // Ignore parse errors - // - t_ret = mbedtls_x509_crt_parse_file( chain, entry_name ); - if( t_ret < 0 ) - ret++; - else - ret += t_ret; - } - closedir( dir ); - -cleanup: -#if defined(MBEDTLS_THREADING_PTHREAD) - if( mbedtls_mutex_unlock( &mbedtls_threading_readdir_mutex ) != 0 ) - ret = MBEDTLS_ERR_THREADING_MUTEX_ERROR; -#endif - -#endif /* _WIN32 */ - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ - -static int x509_info_subject_alt_name( char **buf, size_t *size, - const mbedtls_x509_sequence *subject_alt_name ) -{ - size_t i; - size_t n = *size; - char *p = *buf; - const mbedtls_x509_sequence *cur = subject_alt_name; - const char *sep = ""; - size_t sep_len = 0; - - while( cur != NULL ) - { - if( cur->buf.len + sep_len >= n ) - { - *p = '\0'; - return( MBEDTLS_ERR_X509_BUFFER_TOO_SMALL ); - } - - n -= cur->buf.len + sep_len; - for( i = 0; i < sep_len; i++ ) - *p++ = sep[i]; - for( i = 0; i < cur->buf.len; i++ ) - *p++ = cur->buf.p[i]; - - sep = ", "; - sep_len = 2; - - cur = cur->next; - } - - *p = '\0'; - - *size = n; - *buf = p; - - return( 0 ); -} - -#define PRINT_ITEM(i) \ - { \ - ret = mbedtls_snprintf( p, n, "%s" i, sep ); \ - MBEDTLS_X509_SAFE_SNPRINTF; \ - sep = ", "; \ - } - -#define CERT_TYPE(type,name) \ - if( ns_cert_type & type ) \ - PRINT_ITEM( name ); - -static int x509_info_cert_type( char **buf, size_t *size, - unsigned char ns_cert_type ) -{ - int ret; - size_t n = *size; - char *p = *buf; - const char *sep = ""; - - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT, "SSL Client" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER, "SSL Server" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_EMAIL, "Email" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING, "Object Signing" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_RESERVED, "Reserved" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_SSL_CA, "SSL CA" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_EMAIL_CA, "Email CA" ); - CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA, "Object Signing CA" ); - - *size = n; - *buf = p; - - return( 0 ); -} - -#define KEY_USAGE(code,name) \ - if( key_usage & code ) \ - PRINT_ITEM( name ); - -static int x509_info_key_usage( char **buf, size_t *size, - unsigned int key_usage ) -{ - int ret; - size_t n = *size; - char *p = *buf; - const char *sep = ""; - - KEY_USAGE( MBEDTLS_X509_KU_DIGITAL_SIGNATURE, "Digital Signature" ); - KEY_USAGE( MBEDTLS_X509_KU_NON_REPUDIATION, "Non Repudiation" ); - KEY_USAGE( MBEDTLS_X509_KU_KEY_ENCIPHERMENT, "Key Encipherment" ); - KEY_USAGE( MBEDTLS_X509_KU_DATA_ENCIPHERMENT, "Data Encipherment" ); - KEY_USAGE( MBEDTLS_X509_KU_KEY_AGREEMENT, "Key Agreement" ); - KEY_USAGE( MBEDTLS_X509_KU_KEY_CERT_SIGN, "Key Cert Sign" ); - KEY_USAGE( MBEDTLS_X509_KU_CRL_SIGN, "CRL Sign" ); - KEY_USAGE( MBEDTLS_X509_KU_ENCIPHER_ONLY, "Encipher Only" ); - KEY_USAGE( MBEDTLS_X509_KU_DECIPHER_ONLY, "Decipher Only" ); - - *size = n; - *buf = p; - - return( 0 ); -} - -static int x509_info_ext_key_usage( char **buf, size_t *size, - const mbedtls_x509_sequence *extended_key_usage ) -{ - int ret; - const char *desc; - size_t n = *size; - char *p = *buf; - const mbedtls_x509_sequence *cur = extended_key_usage; - const char *sep = ""; - - while( cur != NULL ) - { - if( mbedtls_oid_get_extended_key_usage( &cur->buf, &desc ) != 0 ) - desc = "???"; - - ret = mbedtls_snprintf( p, n, "%s%s", sep, desc ); - MBEDTLS_X509_SAFE_SNPRINTF; - - sep = ", "; - - cur = cur->next; - } - - *size = n; - *buf = p; - - return( 0 ); -} - -/* - * Return an informational string about the certificate. - */ -#define BEFORE_COLON 18 -#define BC "18" -int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, - const mbedtls_x509_crt *crt ) -{ - int ret; - size_t n; - char *p; - char key_size_str[BEFORE_COLON]; - - p = buf; - n = size; - - ret = mbedtls_snprintf( p, n, "%scert. version : %d\n", - prefix, crt->version ); - MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "%sserial number : ", - prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_serial_gets( p, n, &crt->serial ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_x509_dn_gets( p, n, &crt->issuer ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%ssubject name : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_x509_dn_gets( p, n, &crt->subject ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%sissued on : " \ - "%04d-%02d-%02d %02d:%02d:%02d", prefix, - crt->valid_from.year, crt->valid_from.mon, - crt->valid_from.day, crt->valid_from.hour, - crt->valid_from.min, crt->valid_from.sec ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%sexpires on : " \ - "%04d-%02d-%02d %02d:%02d:%02d", prefix, - crt->valid_to.year, crt->valid_to.mon, - crt->valid_to.day, crt->valid_to.hour, - crt->valid_to.min, crt->valid_to.sec ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_sig_alg_gets( p, n, &crt->sig_oid, crt->sig_pk, - crt->sig_md, crt->sig_opts ); - MBEDTLS_X509_SAFE_SNPRINTF; - - /* Key size */ - if( ( ret = mbedtls_x509_key_size_helper( key_size_str, BEFORE_COLON, - mbedtls_pk_get_name( &crt->pk ) ) ) != 0 ) - { - return( ret ); - } - - ret = mbedtls_snprintf( p, n, "\n%s%-" BC "s: %d bits", prefix, key_size_str, - (int) mbedtls_pk_get_bitlen( &crt->pk ) ); - MBEDTLS_X509_SAFE_SNPRINTF; - - /* - * Optional extensions - */ - - if( crt->ext_types & MBEDTLS_X509_EXT_BASIC_CONSTRAINTS ) - { - ret = mbedtls_snprintf( p, n, "\n%sbasic constraints : CA=%s", prefix, - crt->ca_istrue ? "true" : "false" ); - MBEDTLS_X509_SAFE_SNPRINTF; - - if( crt->max_pathlen > 0 ) - { - ret = mbedtls_snprintf( p, n, ", max_pathlen=%d", crt->max_pathlen - 1 ); - MBEDTLS_X509_SAFE_SNPRINTF; - } - } - - if( crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME ) - { - ret = mbedtls_snprintf( p, n, "\n%ssubject alt name : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - if( ( ret = x509_info_subject_alt_name( &p, &n, - &crt->subject_alt_names ) ) != 0 ) - return( ret ); - } - - if( crt->ext_types & MBEDTLS_X509_EXT_NS_CERT_TYPE ) - { - ret = mbedtls_snprintf( p, n, "\n%scert. type : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - if( ( ret = x509_info_cert_type( &p, &n, crt->ns_cert_type ) ) != 0 ) - return( ret ); - } - - if( crt->ext_types & MBEDTLS_X509_EXT_KEY_USAGE ) - { - ret = mbedtls_snprintf( p, n, "\n%skey usage : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - if( ( ret = x509_info_key_usage( &p, &n, crt->key_usage ) ) != 0 ) - return( ret ); - } - - if( crt->ext_types & MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE ) - { - ret = mbedtls_snprintf( p, n, "\n%sext key usage : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - if( ( ret = x509_info_ext_key_usage( &p, &n, - &crt->ext_key_usage ) ) != 0 ) - return( ret ); - } - - ret = mbedtls_snprintf( p, n, "\n" ); - MBEDTLS_X509_SAFE_SNPRINTF; - - return( (int) ( size - n ) ); -} - -struct x509_crt_verify_string { - int code; - const char *string; -}; - -static const struct x509_crt_verify_string x509_crt_verify_strings[] = { - { MBEDTLS_X509_BADCERT_EXPIRED, "The certificate validity has expired" }, - { MBEDTLS_X509_BADCERT_REVOKED, "The certificate has been revoked (is on a CRL)" }, - { MBEDTLS_X509_BADCERT_CN_MISMATCH, "The certificate Common Name (CN) does not match with the expected CN" }, - { MBEDTLS_X509_BADCERT_NOT_TRUSTED, "The certificate is not correctly signed by the trusted CA" }, - { MBEDTLS_X509_BADCRL_NOT_TRUSTED, "The CRL is not correctly signed by the trusted CA" }, - { MBEDTLS_X509_BADCRL_EXPIRED, "The CRL is expired" }, - { MBEDTLS_X509_BADCERT_MISSING, "Certificate was missing" }, - { MBEDTLS_X509_BADCERT_SKIP_VERIFY, "Certificate verification was skipped" }, - { MBEDTLS_X509_BADCERT_OTHER, "Other reason (can be used by verify callback)" }, - { MBEDTLS_X509_BADCERT_FUTURE, "The certificate validity starts in the future" }, - { MBEDTLS_X509_BADCRL_FUTURE, "The CRL is from the future" }, - { MBEDTLS_X509_BADCERT_KEY_USAGE, "Usage does not match the keyUsage extension" }, - { MBEDTLS_X509_BADCERT_EXT_KEY_USAGE, "Usage does not match the extendedKeyUsage extension" }, - { MBEDTLS_X509_BADCERT_NS_CERT_TYPE, "Usage does not match the nsCertType extension" }, - { MBEDTLS_X509_BADCERT_BAD_MD, "The certificate is signed with an unacceptable hash." }, - { MBEDTLS_X509_BADCERT_BAD_PK, "The certificate is signed with an unacceptable PK alg (eg RSA vs ECDSA)." }, - { MBEDTLS_X509_BADCERT_BAD_KEY, "The certificate is signed with an unacceptable key (eg bad curve, RSA too short)." }, - { MBEDTLS_X509_BADCRL_BAD_MD, "The CRL is signed with an unacceptable hash." }, - { MBEDTLS_X509_BADCRL_BAD_PK, "The CRL is signed with an unacceptable PK alg (eg RSA vs ECDSA)." }, - { MBEDTLS_X509_BADCRL_BAD_KEY, "The CRL is signed with an unacceptable key (eg bad curve, RSA too short)." }, - { 0, NULL } -}; - -int mbedtls_x509_crt_verify_info( char *buf, size_t size, const char *prefix, - uint32_t flags ) -{ - int ret; - const struct x509_crt_verify_string *cur; - char *p = buf; - size_t n = size; - - for( cur = x509_crt_verify_strings; cur->string != NULL ; cur++ ) - { - if( ( flags & cur->code ) == 0 ) - continue; - - ret = mbedtls_snprintf( p, n, "%s%s\n", prefix, cur->string ); - MBEDTLS_X509_SAFE_SNPRINTF; - flags ^= cur->code; - } - - if( flags != 0 ) - { - ret = mbedtls_snprintf( p, n, "%sUnknown reason " - "(this should not happen)\n", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - } - - return( (int) ( size - n ) ); -} - -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) -int mbedtls_x509_crt_check_key_usage( const mbedtls_x509_crt *crt, - unsigned int usage ) -{ - unsigned int usage_must, usage_may; - unsigned int may_mask = MBEDTLS_X509_KU_ENCIPHER_ONLY - | MBEDTLS_X509_KU_DECIPHER_ONLY; - - if( ( crt->ext_types & MBEDTLS_X509_EXT_KEY_USAGE ) == 0 ) - return( 0 ); - - usage_must = usage & ~may_mask; - - if( ( ( crt->key_usage & ~may_mask ) & usage_must ) != usage_must ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - usage_may = usage & may_mask; - - if( ( ( crt->key_usage & may_mask ) | usage_may ) != usage_may ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - return( 0 ); -} -#endif - -#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) -int mbedtls_x509_crt_check_extended_key_usage( const mbedtls_x509_crt *crt, - const char *usage_oid, - size_t usage_len ) -{ - const mbedtls_x509_sequence *cur; - - /* Extension is not mandatory, absent means no restriction */ - if( ( crt->ext_types & MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE ) == 0 ) - return( 0 ); - - /* - * Look for the requested usage (or wildcard ANY) in our list - */ - for( cur = &crt->ext_key_usage; cur != NULL; cur = cur->next ) - { - const mbedtls_x509_buf *cur_oid = &cur->buf; - - if( cur_oid->len == usage_len && - memcmp( cur_oid->p, usage_oid, usage_len ) == 0 ) - { - return( 0 ); - } - - if( MBEDTLS_OID_CMP( MBEDTLS_OID_ANY_EXTENDED_KEY_USAGE, cur_oid ) == 0 ) - return( 0 ); - } - - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); -} -#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */ - -#if defined(MBEDTLS_X509_CRL_PARSE_C) -/* - * Return 1 if the certificate is revoked, or 0 otherwise. - */ -int mbedtls_x509_crt_is_revoked( const mbedtls_x509_crt *crt, const mbedtls_x509_crl *crl ) -{ - const mbedtls_x509_crl_entry *cur = &crl->entry; - - while( cur != NULL && cur->serial.len != 0 ) - { - if( crt->serial.len == cur->serial.len && - memcmp( crt->serial.p, cur->serial.p, crt->serial.len ) == 0 ) - { - if( mbedtls_x509_time_is_past( &cur->revocation_date ) ) - return( 1 ); - } - - cur = cur->next; - } - - return( 0 ); -} - -/* - * Check that the given certificate is valid according to the CRL. - */ -static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca, - mbedtls_x509_crl *crl_list, - const mbedtls_x509_crt_profile *profile ) -{ - int flags = 0; - unsigned char hash[MBEDTLS_MD_MAX_SIZE]; - const mbedtls_md_info_t *md_info; - - if( ca == NULL ) - return( flags ); - - /* - * TODO: What happens if no CRL is present? - * Suggestion: Revocation state should be unknown if no CRL is present. - * For backwards compatibility this is not yet implemented. - */ - - while( crl_list != NULL ) - { - if( crl_list->version == 0 || - crl_list->issuer_raw.len != ca->subject_raw.len || - memcmp( crl_list->issuer_raw.p, ca->subject_raw.p, - crl_list->issuer_raw.len ) != 0 ) - { - crl_list = crl_list->next; - continue; - } - - /* - * Check if the CA is configured to sign CRLs - */ -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) - if( mbedtls_x509_crt_check_key_usage( ca, MBEDTLS_X509_KU_CRL_SIGN ) != 0 ) - { - flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED; - break; - } -#endif - - /* - * Check if CRL is correctly signed by the trusted CA - */ - if( x509_profile_check_md_alg( profile, crl_list->sig_md ) != 0 ) - flags |= MBEDTLS_X509_BADCRL_BAD_MD; - - if( x509_profile_check_pk_alg( profile, crl_list->sig_pk ) != 0 ) - flags |= MBEDTLS_X509_BADCRL_BAD_PK; - - md_info = mbedtls_md_info_from_type( crl_list->sig_md ); - if( md_info == NULL ) - { - /* - * Cannot check 'unknown' hash - */ - flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED; - break; - } - - mbedtls_md( md_info, crl_list->tbs.p, crl_list->tbs.len, hash ); - - if( x509_profile_check_key( profile, crl_list->sig_pk, &ca->pk ) != 0 ) - flags |= MBEDTLS_X509_BADCERT_BAD_KEY; - - if( mbedtls_pk_verify_ext( crl_list->sig_pk, crl_list->sig_opts, &ca->pk, - crl_list->sig_md, hash, mbedtls_md_get_size( md_info ), - crl_list->sig.p, crl_list->sig.len ) != 0 ) - { - flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED; - break; - } - - /* - * Check for validity of CRL (Do not drop out) - */ - if( mbedtls_x509_time_is_past( &crl_list->next_update ) ) - flags |= MBEDTLS_X509_BADCRL_EXPIRED; - - if( mbedtls_x509_time_is_future( &crl_list->this_update ) ) - flags |= MBEDTLS_X509_BADCRL_FUTURE; - - /* - * Check if certificate is revoked - */ - if( mbedtls_x509_crt_is_revoked( crt, crl_list ) ) - { - flags |= MBEDTLS_X509_BADCERT_REVOKED; - break; - } - - crl_list = crl_list->next; - } - - return( flags ); -} -#endif /* MBEDTLS_X509_CRL_PARSE_C */ - -/* - * Like memcmp, but case-insensitive and always returns -1 if different - */ -static int x509_memcasecmp( const void *s1, const void *s2, size_t len ) -{ - size_t i; - unsigned char diff; - const unsigned char *n1 = s1, *n2 = s2; - - for( i = 0; i < len; i++ ) - { - diff = n1[i] ^ n2[i]; - - if( diff == 0 ) - continue; - - if( diff == 32 && - ( ( n1[i] >= 'a' && n1[i] <= 'z' ) || - ( n1[i] >= 'A' && n1[i] <= 'Z' ) ) ) - { - continue; - } - - return( -1 ); - } - - return( 0 ); -} - -/* - * Return 0 if name matches wildcard, -1 otherwise - */ -static int x509_check_wildcard( const char *cn, mbedtls_x509_buf *name ) -{ - size_t i; - size_t cn_idx = 0, cn_len = strlen( cn ); - - if( name->len < 3 || name->p[0] != '*' || name->p[1] != '.' ) - return( 0 ); - - for( i = 0; i < cn_len; ++i ) - { - if( cn[i] == '.' ) - { - cn_idx = i; - break; - } - } - - if( cn_idx == 0 ) - return( -1 ); - - if( cn_len - cn_idx == name->len - 1 && - x509_memcasecmp( name->p + 1, cn + cn_idx, name->len - 1 ) == 0 ) - { - return( 0 ); - } - - return( -1 ); -} - -/* - * Compare two X.509 strings, case-insensitive, and allowing for some encoding - * variations (but not all). - * - * Return 0 if equal, -1 otherwise. - */ -static int x509_string_cmp( const mbedtls_x509_buf *a, const mbedtls_x509_buf *b ) -{ - if( a->tag == b->tag && - a->len == b->len && - memcmp( a->p, b->p, b->len ) == 0 ) - { - return( 0 ); - } - - if( ( a->tag == MBEDTLS_ASN1_UTF8_STRING || a->tag == MBEDTLS_ASN1_PRINTABLE_STRING ) && - ( b->tag == MBEDTLS_ASN1_UTF8_STRING || b->tag == MBEDTLS_ASN1_PRINTABLE_STRING ) && - a->len == b->len && - x509_memcasecmp( a->p, b->p, b->len ) == 0 ) - { - return( 0 ); - } - - return( -1 ); -} - -/* - * Compare two X.509 Names (aka rdnSequence). - * - * See RFC 5280 section 7.1, though we don't implement the whole algorithm: - * we sometimes return unequal when the full algorithm would return equal, - * but never the other way. (In particular, we don't do Unicode normalisation - * or space folding.) - * - * Return 0 if equal, -1 otherwise. - */ -static int x509_name_cmp( const mbedtls_x509_name *a, const mbedtls_x509_name *b ) -{ - /* Avoid recursion, it might not be optimised by the compiler */ - while( a != NULL || b != NULL ) - { - if( a == NULL || b == NULL ) - return( -1 ); - - /* type */ - if( a->oid.tag != b->oid.tag || - a->oid.len != b->oid.len || - memcmp( a->oid.p, b->oid.p, b->oid.len ) != 0 ) - { - return( -1 ); - } - - /* value */ - if( x509_string_cmp( &a->val, &b->val ) != 0 ) - return( -1 ); - - /* structure of the list of sets */ - if( a->next_merged != b->next_merged ) - return( -1 ); - - a = a->next; - b = b->next; - } - - /* a == NULL == b */ - return( 0 ); -} - -/* - * Check if 'parent' is a suitable parent (signing CA) for 'child'. - * Return 0 if yes, -1 if not. - * - * top means parent is a locally-trusted certificate - * bottom means child is the end entity cert - */ -static int x509_crt_check_parent( const mbedtls_x509_crt *child, - const mbedtls_x509_crt *parent, - int top, int bottom ) -{ - int need_ca_bit; - - /* Parent must be the issuer */ - if( x509_name_cmp( &child->issuer, &parent->subject ) != 0 ) - return( -1 ); - - /* Parent must have the basicConstraints CA bit set as a general rule */ - need_ca_bit = 1; - - /* Exception: v1/v2 certificates that are locally trusted. */ - if( top && parent->version < 3 ) - need_ca_bit = 0; - - /* Exception: self-signed end-entity certs that are locally trusted. */ - if( top && bottom && - child->raw.len == parent->raw.len && - memcmp( child->raw.p, parent->raw.p, child->raw.len ) == 0 ) - { - need_ca_bit = 0; - } - - if( need_ca_bit && ! parent->ca_istrue ) - return( -1 ); - -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) - if( need_ca_bit && - mbedtls_x509_crt_check_key_usage( parent, MBEDTLS_X509_KU_KEY_CERT_SIGN ) != 0 ) - { - return( -1 ); - } -#endif - - return( 0 ); -} - -static int x509_crt_verify_top( - mbedtls_x509_crt *child, mbedtls_x509_crt *trust_ca, - mbedtls_x509_crl *ca_crl, - const mbedtls_x509_crt_profile *profile, - int path_cnt, int self_cnt, uint32_t *flags, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ) -{ - int ret; - uint32_t ca_flags = 0; - int check_path_cnt; - unsigned char hash[MBEDTLS_MD_MAX_SIZE]; - const mbedtls_md_info_t *md_info; - - if( mbedtls_x509_time_is_past( &child->valid_to ) ) - *flags |= MBEDTLS_X509_BADCERT_EXPIRED; - - if( mbedtls_x509_time_is_future( &child->valid_from ) ) - *flags |= MBEDTLS_X509_BADCERT_FUTURE; - - if( x509_profile_check_md_alg( profile, child->sig_md ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_MD; - - if( x509_profile_check_pk_alg( profile, child->sig_pk ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_PK; - - /* - * Child is the top of the chain. Check against the trust_ca list. - */ - *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED; - - md_info = mbedtls_md_info_from_type( child->sig_md ); - if( md_info == NULL ) - { - /* - * Cannot check 'unknown', no need to try any CA - */ - trust_ca = NULL; - } - else - mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ); - - for( /* trust_ca */ ; trust_ca != NULL; trust_ca = trust_ca->next ) - { - if( x509_crt_check_parent( child, trust_ca, 1, path_cnt == 0 ) != 0 ) - continue; - - check_path_cnt = path_cnt + 1; - - /* - * Reduce check_path_cnt to check against if top of the chain is - * the same as the trusted CA - */ - if( child->subject_raw.len == trust_ca->subject_raw.len && - memcmp( child->subject_raw.p, trust_ca->subject_raw.p, - child->issuer_raw.len ) == 0 ) - { - check_path_cnt--; - } - - /* Self signed certificates do not count towards the limit */ - if( trust_ca->max_pathlen > 0 && - trust_ca->max_pathlen < check_path_cnt - self_cnt ) - { - continue; - } - - if( mbedtls_pk_verify_ext( child->sig_pk, child->sig_opts, &trust_ca->pk, - child->sig_md, hash, mbedtls_md_get_size( md_info ), - child->sig.p, child->sig.len ) != 0 ) - { - continue; - } - - /* - * Top of chain is signed by a trusted CA - */ - *flags &= ~MBEDTLS_X509_BADCERT_NOT_TRUSTED; - - if( x509_profile_check_key( profile, child->sig_pk, &trust_ca->pk ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_KEY; - - break; - } - - /* - * If top of chain is not the same as the trusted CA send a verify request - * to the callback for any issues with validity and CRL presence for the - * trusted CA certificate. - */ - if( trust_ca != NULL && - ( child->subject_raw.len != trust_ca->subject_raw.len || - memcmp( child->subject_raw.p, trust_ca->subject_raw.p, - child->issuer_raw.len ) != 0 ) ) - { -#if defined(MBEDTLS_X509_CRL_PARSE_C) - /* Check trusted CA's CRL for the chain's top crt */ - *flags |= x509_crt_verifycrl( child, trust_ca, ca_crl, profile ); -#else - ((void) ca_crl); -#endif - - if( mbedtls_x509_time_is_past( &trust_ca->valid_to ) ) - ca_flags |= MBEDTLS_X509_BADCERT_EXPIRED; - - if( mbedtls_x509_time_is_future( &trust_ca->valid_from ) ) - ca_flags |= MBEDTLS_X509_BADCERT_FUTURE; - - if( NULL != f_vrfy ) - { - if( ( ret = f_vrfy( p_vrfy, trust_ca, path_cnt + 1, - &ca_flags ) ) != 0 ) - { - return( ret ); - } - } - } - - /* Call callback on top cert */ - if( NULL != f_vrfy ) - { - if( ( ret = f_vrfy( p_vrfy, child, path_cnt, flags ) ) != 0 ) - return( ret ); - } - - *flags |= ca_flags; - - return( 0 ); -} - -static int x509_crt_verify_child( - mbedtls_x509_crt *child, mbedtls_x509_crt *parent, - mbedtls_x509_crt *trust_ca, mbedtls_x509_crl *ca_crl, - const mbedtls_x509_crt_profile *profile, - int path_cnt, int self_cnt, uint32_t *flags, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ) -{ - int ret; - uint32_t parent_flags = 0; - unsigned char hash[MBEDTLS_MD_MAX_SIZE]; - mbedtls_x509_crt *grandparent; - const mbedtls_md_info_t *md_info; - - /* Counting intermediate self signed certificates */ - if( ( path_cnt != 0 ) && x509_name_cmp( &child->issuer, &child->subject ) == 0 ) - self_cnt++; - - /* path_cnt is 0 for the first intermediate CA */ - if( 1 + path_cnt > MBEDTLS_X509_MAX_INTERMEDIATE_CA ) - { - *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED; - return( MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ); - } - - if( mbedtls_x509_time_is_past( &child->valid_to ) ) - *flags |= MBEDTLS_X509_BADCERT_EXPIRED; - - if( mbedtls_x509_time_is_future( &child->valid_from ) ) - *flags |= MBEDTLS_X509_BADCERT_FUTURE; - - if( x509_profile_check_md_alg( profile, child->sig_md ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_MD; - - if( x509_profile_check_pk_alg( profile, child->sig_pk ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_PK; - - md_info = mbedtls_md_info_from_type( child->sig_md ); - if( md_info == NULL ) - { - /* - * Cannot check 'unknown' hash - */ - *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED; - } - else - { - mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ); - - if( x509_profile_check_key( profile, child->sig_pk, &parent->pk ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_KEY; - - if( mbedtls_pk_verify_ext( child->sig_pk, child->sig_opts, &parent->pk, - child->sig_md, hash, mbedtls_md_get_size( md_info ), - child->sig.p, child->sig.len ) != 0 ) - { - *flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED; - } - } - -#if defined(MBEDTLS_X509_CRL_PARSE_C) - /* Check trusted CA's CRL for the given crt */ - *flags |= x509_crt_verifycrl(child, parent, ca_crl, profile ); -#endif - - /* Look for a grandparent in trusted CAs */ - for( grandparent = trust_ca; - grandparent != NULL; - grandparent = grandparent->next ) - { - if( x509_crt_check_parent( parent, grandparent, - 0, path_cnt == 0 ) == 0 ) - break; - } - - if( grandparent != NULL ) - { - ret = x509_crt_verify_top( parent, grandparent, ca_crl, profile, - path_cnt + 1, self_cnt, &parent_flags, f_vrfy, p_vrfy ); - if( ret != 0 ) - return( ret ); - } - else - { - /* Look for a grandparent upwards the chain */ - for( grandparent = parent->next; - grandparent != NULL; - grandparent = grandparent->next ) - { - /* +2 because the current step is not yet accounted for - * and because max_pathlen is one higher than it should be. - * Also self signed certificates do not count to the limit. */ - if( grandparent->max_pathlen > 0 && - grandparent->max_pathlen < 2 + path_cnt - self_cnt ) - { - continue; - } - - if( x509_crt_check_parent( parent, grandparent, - 0, path_cnt == 0 ) == 0 ) - break; - } - - /* Is our parent part of the chain or at the top? */ - if( grandparent != NULL ) - { - ret = x509_crt_verify_child( parent, grandparent, trust_ca, ca_crl, - profile, path_cnt + 1, self_cnt, &parent_flags, - f_vrfy, p_vrfy ); - if( ret != 0 ) - return( ret ); - } - else - { - ret = x509_crt_verify_top( parent, trust_ca, ca_crl, profile, - path_cnt + 1, self_cnt, &parent_flags, - f_vrfy, p_vrfy ); - if( ret != 0 ) - return( ret ); - } - } - - /* child is verified to be a child of the parent, call verify callback */ - if( NULL != f_vrfy ) - if( ( ret = f_vrfy( p_vrfy, child, path_cnt, flags ) ) != 0 ) - return( ret ); - - *flags |= parent_flags; - - return( 0 ); -} - -/* - * Verify the certificate validity - */ -int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt, - mbedtls_x509_crt *trust_ca, - mbedtls_x509_crl *ca_crl, - const char *cn, uint32_t *flags, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ) -{ - return( mbedtls_x509_crt_verify_with_profile( crt, trust_ca, ca_crl, - &mbedtls_x509_crt_profile_default, cn, flags, f_vrfy, p_vrfy ) ); -} - - -/* - * Verify the certificate validity, with profile - */ -int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt, - mbedtls_x509_crt *trust_ca, - mbedtls_x509_crl *ca_crl, - const mbedtls_x509_crt_profile *profile, - const char *cn, uint32_t *flags, - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *), - void *p_vrfy ) -{ - size_t cn_len; - int ret; - int pathlen = 0, selfsigned = 0; - mbedtls_x509_crt *parent; - mbedtls_x509_name *name; - mbedtls_x509_sequence *cur = NULL; - mbedtls_pk_type_t pk_type; - - if( profile == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - *flags = 0; - - if( cn != NULL ) - { - name = &crt->subject; - cn_len = strlen( cn ); - - if( crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME ) - { - cur = &crt->subject_alt_names; - - while( cur != NULL ) - { - if( cur->buf.len == cn_len && - x509_memcasecmp( cn, cur->buf.p, cn_len ) == 0 ) - break; - - if( cur->buf.len > 2 && - memcmp( cur->buf.p, "*.", 2 ) == 0 && - x509_check_wildcard( cn, &cur->buf ) == 0 ) - { - break; - } - - cur = cur->next; - } - - if( cur == NULL ) - *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH; - } - else - { - while( name != NULL ) - { - if( MBEDTLS_OID_CMP( MBEDTLS_OID_AT_CN, &name->oid ) == 0 ) - { - if( name->val.len == cn_len && - x509_memcasecmp( name->val.p, cn, cn_len ) == 0 ) - break; - - if( name->val.len > 2 && - memcmp( name->val.p, "*.", 2 ) == 0 && - x509_check_wildcard( cn, &name->val ) == 0 ) - break; - } - - name = name->next; - } - - if( name == NULL ) - *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH; - } - } - - /* Check the type and size of the key */ - pk_type = mbedtls_pk_get_type( &crt->pk ); - - if( x509_profile_check_pk_alg( profile, pk_type ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_PK; - - if( x509_profile_check_key( profile, pk_type, &crt->pk ) != 0 ) - *flags |= MBEDTLS_X509_BADCERT_BAD_KEY; - - /* Look for a parent in trusted CAs */ - for( parent = trust_ca; parent != NULL; parent = parent->next ) - { - if( x509_crt_check_parent( crt, parent, 0, pathlen == 0 ) == 0 ) - break; - } - - if( parent != NULL ) - { - ret = x509_crt_verify_top( crt, parent, ca_crl, profile, - pathlen, selfsigned, flags, f_vrfy, p_vrfy ); - if( ret != 0 ) - return( ret ); - } - else - { - /* Look for a parent upwards the chain */ - for( parent = crt->next; parent != NULL; parent = parent->next ) - if( x509_crt_check_parent( crt, parent, 0, pathlen == 0 ) == 0 ) - break; - - /* Are we part of the chain or at the top? */ - if( parent != NULL ) - { - ret = x509_crt_verify_child( crt, parent, trust_ca, ca_crl, profile, - pathlen, selfsigned, flags, f_vrfy, p_vrfy ); - if( ret != 0 ) - return( ret ); - } - else - { - ret = x509_crt_verify_top( crt, trust_ca, ca_crl, profile, - pathlen, selfsigned, flags, f_vrfy, p_vrfy ); - if( ret != 0 ) - return( ret ); - } - } - - if( *flags != 0 ) - return( MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ); - - return( 0 ); -} - -/* - * Initialize a certificate chain - */ -void mbedtls_x509_crt_init( mbedtls_x509_crt *crt ) -{ - memset( crt, 0, sizeof(mbedtls_x509_crt) ); -} - -/* - * Unallocate all certificate data - */ -void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) -{ - mbedtls_x509_crt *cert_cur = crt; - mbedtls_x509_crt *cert_prv; - mbedtls_x509_name *name_cur; - mbedtls_x509_name *name_prv; - mbedtls_x509_sequence *seq_cur; - mbedtls_x509_sequence *seq_prv; - - if( crt == NULL ) - return; - - do - { - mbedtls_pk_free( &cert_cur->pk ); - -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - mbedtls_free( cert_cur->sig_opts ); -#endif - - name_cur = cert_cur->issuer.next; - while( name_cur != NULL ) - { - name_prv = name_cur; - name_cur = name_cur->next; - mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); - } - - name_cur = cert_cur->subject.next; - while( name_cur != NULL ) - { - name_prv = name_cur; - name_cur = name_cur->next; - mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); - } - - seq_cur = cert_cur->ext_key_usage.next; - while( seq_cur != NULL ) - { - seq_prv = seq_cur; - seq_cur = seq_cur->next; - mbedtls_zeroize( seq_prv, sizeof( mbedtls_x509_sequence ) ); - mbedtls_free( seq_prv ); - } - - seq_cur = cert_cur->subject_alt_names.next; - while( seq_cur != NULL ) - { - seq_prv = seq_cur; - seq_cur = seq_cur->next; - mbedtls_zeroize( seq_prv, sizeof( mbedtls_x509_sequence ) ); - mbedtls_free( seq_prv ); - } - - if( cert_cur->raw.p != NULL ) - { - mbedtls_zeroize( cert_cur->raw.p, cert_cur->raw.len ); - mbedtls_free( cert_cur->raw.p ); - } - - cert_cur = cert_cur->next; - } - while( cert_cur != NULL ); - - cert_cur = crt; - do - { - cert_prv = cert_cur; - cert_cur = cert_cur->next; - - mbedtls_zeroize( cert_prv, sizeof( mbedtls_x509_crt ) ); - if( cert_prv != crt ) - mbedtls_free( cert_prv ); - } - while( cert_cur != NULL ); -} - -#endif /* MBEDTLS_X509_CRT_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509_csr.c b/build/premake/premake5/contrib/mbedtls/library/x509_csr.c deleted file mode 100644 index dbf659b442..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509_csr.c +++ /dev/null @@ -1,417 +0,0 @@ -/* - * X.509 Certificate Signing Request (CSR) parsing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The ITU-T X.509 standard defines a certificate format for PKI. - * - * http://www.ietf.org/rfc/rfc5280.txt (Certificates and CRLs) - * http://www.ietf.org/rfc/rfc3279.txt (Alg IDs for CRLs) - * http://www.ietf.org/rfc/rfc2986.txt (CSRs, aka PKCS#10) - * - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf - * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_CSR_PARSE_C) - -#include "mbedtls/x509_csr.h" -#include "mbedtls/oid.h" - -#include - -#if defined(MBEDTLS_PEM_PARSE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_FS_IO) || defined(EFIX64) || defined(EFI32) -#include -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * Version ::= INTEGER { v1(0) } - */ -static int x509_csr_get_version( unsigned char **p, - const unsigned char *end, - int *ver ) -{ - int ret; - - if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) - { - if( ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) - { - *ver = 0; - return( 0 ); - } - - return( MBEDTLS_ERR_X509_INVALID_VERSION + ret ); - } - - return( 0 ); -} - -/* - * Parse a CSR in DER format - */ -int mbedtls_x509_csr_parse_der( mbedtls_x509_csr *csr, - const unsigned char *buf, size_t buflen ) -{ - int ret; - size_t len; - unsigned char *p, *end; - mbedtls_x509_buf sig_params; - - memset( &sig_params, 0, sizeof( mbedtls_x509_buf ) ); - - /* - * Check for valid input - */ - if( csr == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - mbedtls_x509_csr_init( csr ); - - /* - * first copy the raw DER data - */ - p = mbedtls_calloc( 1, len = buflen ); - - if( p == NULL ) - return( MBEDTLS_ERR_X509_ALLOC_FAILED ); - - memcpy( p, buf, buflen ); - - csr->raw.p = p; - csr->raw.len = len; - end = p + len; - - /* - * CertificationRequest ::= SEQUENCE { - * certificationRequestInfo CertificationRequestInfo, - * signatureAlgorithm AlgorithmIdentifier, - * signature BIT STRING - * } - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT ); - } - - if( len != (size_t) ( end - p ) ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - /* - * CertificationRequestInfo ::= SEQUENCE { - */ - csr->cri.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - end = p + len; - csr->cri.len = end - csr->cri.p; - - /* - * Version ::= INTEGER { v1(0) } - */ - if( ( ret = x509_csr_get_version( &p, end, &csr->version ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( ret ); - } - - csr->version++; - - if( csr->version != 1 ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_UNKNOWN_VERSION ); - } - - /* - * subject Name - */ - csr->subject_raw.p = p; - - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - - if( ( ret = mbedtls_x509_get_name( &p, p + len, &csr->subject ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( ret ); - } - - csr->subject_raw.len = p - csr->subject_raw.p; - - /* - * subjectPKInfo SubjectPublicKeyInfo - */ - if( ( ret = mbedtls_pk_parse_subpubkey( &p, end, &csr->pk ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( ret ); - } - - /* - * attributes [0] Attributes - */ - if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_CONTEXT_SPECIFIC ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + ret ); - } - // TODO Parse Attributes / extension requests - - p += len; - - end = csr->raw.p + csr->raw.len; - - /* - * signatureAlgorithm AlgorithmIdentifier, - * signature BIT STRING - */ - if( ( ret = mbedtls_x509_get_alg( &p, end, &csr->sig_oid, &sig_params ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( ret ); - } - - if( ( ret = mbedtls_x509_get_sig_alg( &csr->sig_oid, &sig_params, - &csr->sig_md, &csr->sig_pk, - &csr->sig_opts ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG ); - } - - if( ( ret = mbedtls_x509_get_sig( &p, end, &csr->sig ) ) != 0 ) - { - mbedtls_x509_csr_free( csr ); - return( ret ); - } - - if( p != end ) - { - mbedtls_x509_csr_free( csr ); - return( MBEDTLS_ERR_X509_INVALID_FORMAT + - MBEDTLS_ERR_ASN1_LENGTH_MISMATCH ); - } - - return( 0 ); -} - -/* - * Parse a CSR, allowing for PEM or raw DER encoding - */ -int mbedtls_x509_csr_parse( mbedtls_x509_csr *csr, const unsigned char *buf, size_t buflen ) -{ - int ret; -#if defined(MBEDTLS_PEM_PARSE_C) - size_t use_len; - mbedtls_pem_context pem; -#endif - - /* - * Check for valid input - */ - if( csr == NULL || buf == NULL ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_PEM_PARSE_C) - mbedtls_pem_init( &pem ); - - /* Avoid calling mbedtls_pem_read_buffer() on non-null-terminated string */ - if( buflen == 0 || buf[buflen - 1] != '\0' ) - ret = MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT; - else - ret = mbedtls_pem_read_buffer( &pem, - "-----BEGIN CERTIFICATE REQUEST-----", - "-----END CERTIFICATE REQUEST-----", - buf, NULL, 0, &use_len ); - - if( ret == 0 ) - { - /* - * Was PEM encoded, parse the result - */ - if( ( ret = mbedtls_x509_csr_parse_der( csr, pem.buf, pem.buflen ) ) != 0 ) - return( ret ); - - mbedtls_pem_free( &pem ); - return( 0 ); - } - else if( ret != MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - mbedtls_pem_free( &pem ); - return( ret ); - } - else -#endif /* MBEDTLS_PEM_PARSE_C */ - return( mbedtls_x509_csr_parse_der( csr, buf, buflen ) ); -} - -#if defined(MBEDTLS_FS_IO) -/* - * Load a CSR into the structure - */ -int mbedtls_x509_csr_parse_file( mbedtls_x509_csr *csr, const char *path ) -{ - int ret; - size_t n; - unsigned char *buf; - - if( ( ret = mbedtls_pk_load_file( path, &buf, &n ) ) != 0 ) - return( ret ); - - ret = mbedtls_x509_csr_parse( csr, buf, n ); - - mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); - - return( ret ); -} -#endif /* MBEDTLS_FS_IO */ - -#define BEFORE_COLON 14 -#define BC "14" -/* - * Return an informational string about the CSR. - */ -int mbedtls_x509_csr_info( char *buf, size_t size, const char *prefix, - const mbedtls_x509_csr *csr ) -{ - int ret; - size_t n; - char *p; - char key_size_str[BEFORE_COLON]; - - p = buf; - n = size; - - ret = mbedtls_snprintf( p, n, "%sCSR version : %d", - prefix, csr->version ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%ssubject name : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_x509_dn_gets( p, n, &csr->subject ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_sig_alg_gets( p, n, &csr->sig_oid, csr->sig_pk, csr->sig_md, - csr->sig_opts ); - MBEDTLS_X509_SAFE_SNPRINTF; - - if( ( ret = mbedtls_x509_key_size_helper( key_size_str, BEFORE_COLON, - mbedtls_pk_get_name( &csr->pk ) ) ) != 0 ) - { - return( ret ); - } - - ret = mbedtls_snprintf( p, n, "\n%s%-" BC "s: %d bits\n", prefix, key_size_str, - (int) mbedtls_pk_get_bitlen( &csr->pk ) ); - MBEDTLS_X509_SAFE_SNPRINTF; - - return( (int) ( size - n ) ); -} - -/* - * Initialize a CSR - */ -void mbedtls_x509_csr_init( mbedtls_x509_csr *csr ) -{ - memset( csr, 0, sizeof(mbedtls_x509_csr) ); -} - -/* - * Unallocate all CSR data - */ -void mbedtls_x509_csr_free( mbedtls_x509_csr *csr ) -{ - mbedtls_x509_name *name_cur; - mbedtls_x509_name *name_prv; - - if( csr == NULL ) - return; - - mbedtls_pk_free( &csr->pk ); - -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - mbedtls_free( csr->sig_opts ); -#endif - - name_cur = csr->subject.next; - while( name_cur != NULL ) - { - name_prv = name_cur; - name_cur = name_cur->next; - mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); - } - - if( csr->raw.p != NULL ) - { - mbedtls_zeroize( csr->raw.p, csr->raw.len ); - mbedtls_free( csr->raw.p ); - } - - mbedtls_zeroize( csr, sizeof( mbedtls_x509_csr ) ); -} - -#endif /* MBEDTLS_X509_CSR_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509write_crt.c b/build/premake/premake5/contrib/mbedtls/library/x509write_crt.c deleted file mode 100644 index 9041d440ff..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509write_crt.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - * X.509 certificate writing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * References: - * - certificates: RFC 5280, updated by RFC 6818 - * - CSRs: PKCS#10 v1.7 aka RFC 2986 - * - attributes: PKCS#9 v2.0 aka RFC 2985 - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_CRT_WRITE_C) - -#include "mbedtls/x509_crt.h" -#include "mbedtls/oid.h" -#include "mbedtls/asn1write.h" -#include "mbedtls/sha1.h" - -#include - -#if defined(MBEDTLS_PEM_WRITE_C) -#include "mbedtls/pem.h" -#endif /* MBEDTLS_PEM_WRITE_C */ - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -void mbedtls_x509write_crt_init( mbedtls_x509write_cert *ctx ) -{ - memset( ctx, 0, sizeof(mbedtls_x509write_cert) ); - - mbedtls_mpi_init( &ctx->serial ); - ctx->version = MBEDTLS_X509_CRT_VERSION_3; -} - -void mbedtls_x509write_crt_free( mbedtls_x509write_cert *ctx ) -{ - mbedtls_mpi_free( &ctx->serial ); - - mbedtls_asn1_free_named_data_list( &ctx->subject ); - mbedtls_asn1_free_named_data_list( &ctx->issuer ); - mbedtls_asn1_free_named_data_list( &ctx->extensions ); - - mbedtls_zeroize( ctx, sizeof(mbedtls_x509write_cert) ); -} - -void mbedtls_x509write_crt_set_version( mbedtls_x509write_cert *ctx, int version ) -{ - ctx->version = version; -} - -void mbedtls_x509write_crt_set_md_alg( mbedtls_x509write_cert *ctx, mbedtls_md_type_t md_alg ) -{ - ctx->md_alg = md_alg; -} - -void mbedtls_x509write_crt_set_subject_key( mbedtls_x509write_cert *ctx, mbedtls_pk_context *key ) -{ - ctx->subject_key = key; -} - -void mbedtls_x509write_crt_set_issuer_key( mbedtls_x509write_cert *ctx, mbedtls_pk_context *key ) -{ - ctx->issuer_key = key; -} - -int mbedtls_x509write_crt_set_subject_name( mbedtls_x509write_cert *ctx, - const char *subject_name ) -{ - return mbedtls_x509_string_to_names( &ctx->subject, subject_name ); -} - -int mbedtls_x509write_crt_set_issuer_name( mbedtls_x509write_cert *ctx, - const char *issuer_name ) -{ - return mbedtls_x509_string_to_names( &ctx->issuer, issuer_name ); -} - -int mbedtls_x509write_crt_set_serial( mbedtls_x509write_cert *ctx, const mbedtls_mpi *serial ) -{ - int ret; - - if( ( ret = mbedtls_mpi_copy( &ctx->serial, serial ) ) != 0 ) - return( ret ); - - return( 0 ); -} - -int mbedtls_x509write_crt_set_validity( mbedtls_x509write_cert *ctx, const char *not_before, - const char *not_after ) -{ - if( strlen( not_before ) != MBEDTLS_X509_RFC5280_UTC_TIME_LEN - 1 || - strlen( not_after ) != MBEDTLS_X509_RFC5280_UTC_TIME_LEN - 1 ) - { - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - } - strncpy( ctx->not_before, not_before, MBEDTLS_X509_RFC5280_UTC_TIME_LEN ); - strncpy( ctx->not_after , not_after , MBEDTLS_X509_RFC5280_UTC_TIME_LEN ); - ctx->not_before[MBEDTLS_X509_RFC5280_UTC_TIME_LEN - 1] = 'Z'; - ctx->not_after[MBEDTLS_X509_RFC5280_UTC_TIME_LEN - 1] = 'Z'; - - return( 0 ); -} - -int mbedtls_x509write_crt_set_extension( mbedtls_x509write_cert *ctx, - const char *oid, size_t oid_len, - int critical, - const unsigned char *val, size_t val_len ) -{ - return mbedtls_x509_set_extension( &ctx->extensions, oid, oid_len, - critical, val, val_len ); -} - -int mbedtls_x509write_crt_set_basic_constraints( mbedtls_x509write_cert *ctx, - int is_ca, int max_pathlen ) -{ - int ret; - unsigned char buf[9]; - unsigned char *c = buf + sizeof(buf); - size_t len = 0; - - memset( buf, 0, sizeof(buf) ); - - if( is_ca && max_pathlen > 127 ) - return( MBEDTLS_ERR_X509_BAD_INPUT_DATA ); - - if( is_ca ) - { - if( max_pathlen >= 0 ) - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, buf, max_pathlen ) ); - } - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_bool( &c, buf, 1 ) ); - } - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_BASIC_CONSTRAINTS, - MBEDTLS_OID_SIZE( MBEDTLS_OID_BASIC_CONSTRAINTS ), - 0, buf + sizeof(buf) - len, len ); -} - -#if defined(MBEDTLS_SHA1_C) -int mbedtls_x509write_crt_set_subject_key_identifier( mbedtls_x509write_cert *ctx ) -{ - int ret; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE * 2 + 20]; /* tag, length + 2xMPI */ - unsigned char *c = buf + sizeof(buf); - size_t len = 0; - - memset( buf, 0, sizeof(buf) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, ctx->subject_key ) ); - - mbedtls_sha1( buf + sizeof(buf) - len, len, buf + sizeof(buf) - 20 ); - c = buf + sizeof(buf) - 20; - len = 20; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_OCTET_STRING ) ); - - return mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_SUBJECT_KEY_IDENTIFIER, - MBEDTLS_OID_SIZE( MBEDTLS_OID_SUBJECT_KEY_IDENTIFIER ), - 0, buf + sizeof(buf) - len, len ); -} - -int mbedtls_x509write_crt_set_authority_key_identifier( mbedtls_x509write_cert *ctx ) -{ - int ret; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE * 2 + 20]; /* tag, length + 2xMPI */ - unsigned char *c = buf + sizeof(buf); - size_t len = 0; - - memset( buf, 0, sizeof(buf) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, ctx->issuer_key ) ); - - mbedtls_sha1( buf + sizeof(buf) - len, len, buf + sizeof(buf) - 20 ); - c = buf + sizeof(buf) - 20; - len = 20; - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | 0 ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_AUTHORITY_KEY_IDENTIFIER, - MBEDTLS_OID_SIZE( MBEDTLS_OID_AUTHORITY_KEY_IDENTIFIER ), - 0, buf + sizeof(buf) - len, len ); -} -#endif /* MBEDTLS_SHA1_C */ - -int mbedtls_x509write_crt_set_key_usage( mbedtls_x509write_cert *ctx, - unsigned int key_usage ) -{ - unsigned char buf[4], ku; - unsigned char *c; - int ret; - - /* We currently only support 7 bits, from 0x80 to 0x02 */ - if( ( key_usage & ~0xfe ) != 0 ) - return( MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE ); - - c = buf + 4; - ku = (unsigned char) key_usage; - - if( ( ret = mbedtls_asn1_write_bitstring( &c, buf, &ku, 7 ) ) != 4 ) - return( ret ); - - ret = mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_KEY_USAGE, - MBEDTLS_OID_SIZE( MBEDTLS_OID_KEY_USAGE ), - 1, buf, 4 ); - if( ret != 0 ) - return( ret ); - - return( 0 ); -} - -int mbedtls_x509write_crt_set_ns_cert_type( mbedtls_x509write_cert *ctx, - unsigned char ns_cert_type ) -{ - unsigned char buf[4]; - unsigned char *c; - int ret; - - c = buf + 4; - - if( ( ret = mbedtls_asn1_write_bitstring( &c, buf, &ns_cert_type, 8 ) ) != 4 ) - return( ret ); - - ret = mbedtls_x509write_crt_set_extension( ctx, MBEDTLS_OID_NS_CERT_TYPE, - MBEDTLS_OID_SIZE( MBEDTLS_OID_NS_CERT_TYPE ), - 0, buf, 4 ); - if( ret != 0 ) - return( ret ); - - return( 0 ); -} - -static int x509_write_time( unsigned char **p, unsigned char *start, - const char *time, size_t size ) -{ - int ret; - size_t len = 0; - - /* - * write MBEDTLS_ASN1_UTC_TIME if year < 2050 (2 bytes shorter) - */ - if( time[0] == '2' && time[1] == '0' && time [2] < '5' ) - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, - (const unsigned char *) time + 2, - size - 2 ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_UTC_TIME ) ); - } - else - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_raw_buffer( p, start, - (const unsigned char *) time, - size ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_GENERALIZED_TIME ) ); - } - - return( (int) len ); -} - -int mbedtls_x509write_crt_der( mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - const char *sig_oid; - size_t sig_oid_len = 0; - unsigned char *c, *c2; - unsigned char hash[64]; - unsigned char sig[MBEDTLS_MPI_MAX_SIZE]; - unsigned char tmp_buf[2048]; - size_t sub_len = 0, pub_len = 0, sig_and_oid_len = 0, sig_len; - size_t len = 0; - mbedtls_pk_type_t pk_alg; - - /* - * Prepare data to be signed in tmp_buf - */ - c = tmp_buf + sizeof( tmp_buf ); - - /* Signature algorithm needed in TBS, and later for actual signature */ - pk_alg = mbedtls_pk_get_type( ctx->issuer_key ); - if( pk_alg == MBEDTLS_PK_ECKEY ) - pk_alg = MBEDTLS_PK_ECDSA; - - if( ( ret = mbedtls_oid_get_oid_by_sig_alg( pk_alg, ctx->md_alg, - &sig_oid, &sig_oid_len ) ) != 0 ) - { - return( ret ); - } - - /* - * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_extensions( &c, tmp_buf, ctx->extensions ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | - MBEDTLS_ASN1_CONSTRUCTED | 3 ) ); - - /* - * SubjectPublicKeyInfo - */ - MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_pk_write_pubkey_der( ctx->subject_key, - tmp_buf, c - tmp_buf ) ); - c -= pub_len; - len += pub_len; - - /* - * Subject ::= Name - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_names( &c, tmp_buf, ctx->subject ) ); - - /* - * Validity ::= SEQUENCE { - * notBefore Time, - * notAfter Time } - */ - sub_len = 0; - - MBEDTLS_ASN1_CHK_ADD( sub_len, x509_write_time( &c, tmp_buf, ctx->not_after, - MBEDTLS_X509_RFC5280_UTC_TIME_LEN ) ); - - MBEDTLS_ASN1_CHK_ADD( sub_len, x509_write_time( &c, tmp_buf, ctx->not_before, - MBEDTLS_X509_RFC5280_UTC_TIME_LEN ) ); - - len += sub_len; - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, sub_len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - /* - * Issuer ::= Name - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_names( &c, tmp_buf, ctx->issuer ) ); - - /* - * Signature ::= AlgorithmIdentifier - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_algorithm_identifier( &c, tmp_buf, - sig_oid, strlen( sig_oid ), 0 ) ); - - /* - * Serial ::= INTEGER - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_mpi( &c, tmp_buf, &ctx->serial ) ); - - /* - * Version ::= INTEGER { v1(0), v2(1), v3(2) } - */ - sub_len = 0; - MBEDTLS_ASN1_CHK_ADD( sub_len, mbedtls_asn1_write_int( &c, tmp_buf, ctx->version ) ); - len += sub_len; - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, sub_len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONTEXT_SPECIFIC | - MBEDTLS_ASN1_CONSTRUCTED | 0 ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - /* - * Make signature - */ - mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash ); - - if( ( ret = mbedtls_pk_sign( ctx->issuer_key, ctx->md_alg, hash, 0, sig, &sig_len, - f_rng, p_rng ) ) != 0 ) - { - return( ret ); - } - - /* - * Write data to output buffer - */ - c2 = buf + size; - MBEDTLS_ASN1_CHK_ADD( sig_and_oid_len, mbedtls_x509_write_sig( &c2, buf, - sig_oid, sig_oid_len, sig, sig_len ) ); - - c2 -= len; - memcpy( c2, c, len ); - - len += sig_and_oid_len; - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c2, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c2, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} - -#define PEM_BEGIN_CRT "-----BEGIN CERTIFICATE-----\n" -#define PEM_END_CRT "-----END CERTIFICATE-----\n" - -#if defined(MBEDTLS_PEM_WRITE_C) -int mbedtls_x509write_crt_pem( mbedtls_x509write_cert *crt, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char output_buf[4096]; - size_t olen = 0; - - if( ( ret = mbedtls_x509write_crt_der( crt, output_buf, sizeof(output_buf), - f_rng, p_rng ) ) < 0 ) - { - return( ret ); - } - - if( ( ret = mbedtls_pem_write_buffer( PEM_BEGIN_CRT, PEM_END_CRT, - output_buf + sizeof(output_buf) - ret, - ret, buf, size, &olen ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_PEM_WRITE_C */ - -#endif /* MBEDTLS_X509_CRT_WRITE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/x509write_csr.c b/build/premake/premake5/contrib/mbedtls/library/x509write_csr.c deleted file mode 100644 index 0b9a2851e0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/x509write_csr.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * X.509 Certificate Signing Request writing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * References: - * - CSRs: PKCS#10 v1.7 aka RFC 2986 - * - attributes: PKCS#9 v2.0 aka RFC 2985 - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_X509_CSR_WRITE_C) - -#include "mbedtls/x509_csr.h" -#include "mbedtls/oid.h" -#include "mbedtls/asn1write.h" - -#include -#include - -#if defined(MBEDTLS_PEM_WRITE_C) -#include "mbedtls/pem.h" -#endif - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -void mbedtls_x509write_csr_init( mbedtls_x509write_csr *ctx ) -{ - memset( ctx, 0, sizeof(mbedtls_x509write_csr) ); -} - -void mbedtls_x509write_csr_free( mbedtls_x509write_csr *ctx ) -{ - mbedtls_asn1_free_named_data_list( &ctx->subject ); - mbedtls_asn1_free_named_data_list( &ctx->extensions ); - - mbedtls_zeroize( ctx, sizeof(mbedtls_x509write_csr) ); -} - -void mbedtls_x509write_csr_set_md_alg( mbedtls_x509write_csr *ctx, mbedtls_md_type_t md_alg ) -{ - ctx->md_alg = md_alg; -} - -void mbedtls_x509write_csr_set_key( mbedtls_x509write_csr *ctx, mbedtls_pk_context *key ) -{ - ctx->key = key; -} - -int mbedtls_x509write_csr_set_subject_name( mbedtls_x509write_csr *ctx, - const char *subject_name ) -{ - return mbedtls_x509_string_to_names( &ctx->subject, subject_name ); -} - -int mbedtls_x509write_csr_set_extension( mbedtls_x509write_csr *ctx, - const char *oid, size_t oid_len, - const unsigned char *val, size_t val_len ) -{ - return mbedtls_x509_set_extension( &ctx->extensions, oid, oid_len, - 0, val, val_len ); -} - -int mbedtls_x509write_csr_set_key_usage( mbedtls_x509write_csr *ctx, unsigned char key_usage ) -{ - unsigned char buf[4]; - unsigned char *c; - int ret; - - c = buf + 4; - - if( ( ret = mbedtls_asn1_write_bitstring( &c, buf, &key_usage, 7 ) ) != 4 ) - return( ret ); - - ret = mbedtls_x509write_csr_set_extension( ctx, MBEDTLS_OID_KEY_USAGE, - MBEDTLS_OID_SIZE( MBEDTLS_OID_KEY_USAGE ), - buf, 4 ); - if( ret != 0 ) - return( ret ); - - return( 0 ); -} - -int mbedtls_x509write_csr_set_ns_cert_type( mbedtls_x509write_csr *ctx, - unsigned char ns_cert_type ) -{ - unsigned char buf[4]; - unsigned char *c; - int ret; - - c = buf + 4; - - if( ( ret = mbedtls_asn1_write_bitstring( &c, buf, &ns_cert_type, 8 ) ) != 4 ) - return( ret ); - - ret = mbedtls_x509write_csr_set_extension( ctx, MBEDTLS_OID_NS_CERT_TYPE, - MBEDTLS_OID_SIZE( MBEDTLS_OID_NS_CERT_TYPE ), - buf, 4 ); - if( ret != 0 ) - return( ret ); - - return( 0 ); -} - -int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - const char *sig_oid; - size_t sig_oid_len = 0; - unsigned char *c, *c2; - unsigned char hash[64]; - unsigned char sig[MBEDTLS_MPI_MAX_SIZE]; - unsigned char tmp_buf[2048]; - size_t pub_len = 0, sig_and_oid_len = 0, sig_len; - size_t len = 0; - mbedtls_pk_type_t pk_alg; - - /* - * Prepare data to be signed in tmp_buf - */ - c = tmp_buf + sizeof( tmp_buf ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_extensions( &c, tmp_buf, ctx->extensions ) ); - - if( len ) - { - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SET ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( &c, tmp_buf, MBEDTLS_OID_PKCS9_CSR_EXT_REQ, - MBEDTLS_OID_SIZE( MBEDTLS_OID_PKCS9_CSR_EXT_REQ ) ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - } - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_CONTEXT_SPECIFIC ) ); - - MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_pk_write_pubkey_der( ctx->key, - tmp_buf, c - tmp_buf ) ); - c -= pub_len; - len += pub_len; - - /* - * Subject ::= Name - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_names( &c, tmp_buf, ctx->subject ) ); - - /* - * Version ::= INTEGER { v1(0), v2(1), v3(2) } - */ - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, tmp_buf, 0 ) ); - - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - /* - * Prepare signature - */ - mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash ); - - pk_alg = mbedtls_pk_get_type( ctx->key ); - if( pk_alg == MBEDTLS_PK_ECKEY ) - pk_alg = MBEDTLS_PK_ECDSA; - - if( ( ret = mbedtls_pk_sign( ctx->key, ctx->md_alg, hash, 0, sig, &sig_len, - f_rng, p_rng ) ) != 0 || - ( ret = mbedtls_oid_get_oid_by_sig_alg( pk_alg, ctx->md_alg, - &sig_oid, &sig_oid_len ) ) != 0 ) - { - return( ret ); - } - - /* - * Write data to output buffer - */ - c2 = buf + size; - MBEDTLS_ASN1_CHK_ADD( sig_and_oid_len, mbedtls_x509_write_sig( &c2, buf, - sig_oid, sig_oid_len, sig, sig_len ) ); - - c2 -= len; - memcpy( c2, c, len ); - - len += sig_and_oid_len; - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c2, buf, len ) ); - MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c2, buf, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE ) ); - - return( (int) len ); -} - -#define PEM_BEGIN_CSR "-----BEGIN CERTIFICATE REQUEST-----\n" -#define PEM_END_CSR "-----END CERTIFICATE REQUEST-----\n" - -#if defined(MBEDTLS_PEM_WRITE_C) -int mbedtls_x509write_csr_pem( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char output_buf[4096]; - size_t olen = 0; - - if( ( ret = mbedtls_x509write_csr_der( ctx, output_buf, sizeof(output_buf), - f_rng, p_rng ) ) < 0 ) - { - return( ret ); - } - - if( ( ret = mbedtls_pem_write_buffer( PEM_BEGIN_CSR, PEM_END_CSR, - output_buf + sizeof(output_buf) - ret, - ret, buf, size, &olen ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} -#endif /* MBEDTLS_PEM_WRITE_C */ - -#endif /* MBEDTLS_X509_CSR_WRITE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/library/xtea.c b/build/premake/premake5/contrib/mbedtls/library/xtea.c deleted file mode 100644 index fe0a3509f6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/library/xtea.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - * An 32-bit implementation of the XTEA algorithm - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_XTEA_C) - -#include "mbedtls/xtea.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_XTEA_ALT) - -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -void mbedtls_xtea_init( mbedtls_xtea_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_xtea_context ) ); -} - -void mbedtls_xtea_free( mbedtls_xtea_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_xtea_context ) ); -} - -/* - * XTEA key schedule - */ -void mbedtls_xtea_setup( mbedtls_xtea_context *ctx, const unsigned char key[16] ) -{ - int i; - - memset( ctx, 0, sizeof(mbedtls_xtea_context) ); - - for( i = 0; i < 4; i++ ) - { - GET_UINT32_BE( ctx->k[i], key, i << 2 ); - } -} - -/* - * XTEA encrypt function - */ -int mbedtls_xtea_crypt_ecb( mbedtls_xtea_context *ctx, int mode, - const unsigned char input[8], unsigned char output[8]) -{ - uint32_t *k, v0, v1, i; - - k = ctx->k; - - GET_UINT32_BE( v0, input, 0 ); - GET_UINT32_BE( v1, input, 4 ); - - if( mode == MBEDTLS_XTEA_ENCRYPT ) - { - uint32_t sum = 0, delta = 0x9E3779B9; - - for( i = 0; i < 32; i++ ) - { - v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]); - sum += delta; - v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum>>11) & 3]); - } - } - else /* MBEDTLS_XTEA_DECRYPT */ - { - uint32_t delta = 0x9E3779B9, sum = delta * 32; - - for( i = 0; i < 32; i++ ) - { - v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum>>11) & 3]); - sum -= delta; - v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]); - } - } - - PUT_UINT32_BE( v0, output, 0 ); - PUT_UINT32_BE( v1, output, 4 ); - - return( 0 ); -} - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -/* - * XTEA-CBC buffer encryption/decryption - */ -int mbedtls_xtea_crypt_cbc( mbedtls_xtea_context *ctx, int mode, size_t length, - unsigned char iv[8], const unsigned char *input, - unsigned char *output) -{ - int i; - unsigned char temp[8]; - - if( length % 8 ) - return( MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH ); - - if( mode == MBEDTLS_XTEA_DECRYPT ) - { - while( length > 0 ) - { - memcpy( temp, input, 8 ); - mbedtls_xtea_crypt_ecb( ctx, mode, input, output ); - - for( i = 0; i < 8; i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); - - memcpy( iv, temp, 8 ); - - input += 8; - output += 8; - length -= 8; - } - } - else - { - while( length > 0 ) - { - for( i = 0; i < 8; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); - - mbedtls_xtea_crypt_ecb( ctx, mode, output, output ); - memcpy( iv, output, 8 ); - - input += 8; - output += 8; - length -= 8; - } - } - - return( 0 ); -} -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#endif /* !MBEDTLS_XTEA_ALT */ - -#if defined(MBEDTLS_SELF_TEST) - -/* - * XTEA tests vectors (non-official) - */ - -static const unsigned char xtea_test_key[6][16] = -{ - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char xtea_test_pt[6][8] = -{ - { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48 }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, - { 0x5a, 0x5b, 0x6e, 0x27, 0x89, 0x48, 0xd7, 0x7f }, - { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48 }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, - { 0x70, 0xe1, 0x22, 0x5d, 0x6e, 0x4e, 0x76, 0x55 } -}; - -static const unsigned char xtea_test_ct[6][8] = -{ - { 0x49, 0x7d, 0xf3, 0xd0, 0x72, 0x61, 0x2c, 0xb5 }, - { 0xe7, 0x8f, 0x2d, 0x13, 0x74, 0x43, 0x41, 0xd8 }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, - { 0xa0, 0x39, 0x05, 0x89, 0xf8, 0xb8, 0xef, 0xa5 }, - { 0xed, 0x23, 0x37, 0x5a, 0x82, 0x1a, 0x8c, 0x2d }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 } -}; - -/* - * Checkup routine - */ -int mbedtls_xtea_self_test( int verbose ) -{ - int i, ret = 0; - unsigned char buf[8]; - mbedtls_xtea_context ctx; - - mbedtls_xtea_init( &ctx ); - for( i = 0; i < 6; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " XTEA test #%d: ", i + 1 ); - - memcpy( buf, xtea_test_pt[i], 8 ); - - mbedtls_xtea_setup( &ctx, xtea_test_key[i] ); - mbedtls_xtea_crypt_ecb( &ctx, MBEDTLS_XTEA_ENCRYPT, buf, buf ); - - if( memcmp( buf, xtea_test_ct[i], 8 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_xtea_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_XTEA_C */ diff --git a/build/premake/premake5/contrib/mbedtls/premake5.lua b/build/premake/premake5/contrib/mbedtls/premake5.lua deleted file mode 100644 index 68809f87ab..0000000000 --- a/build/premake/premake5/contrib/mbedtls/premake5.lua +++ /dev/null @@ -1,19 +0,0 @@ -project "mbedtls-lib" - language "C" - kind "StaticLib" - warnings "off" - - includedirs { 'include' } - - if not _OPTIONS["no-zlib"] then - defines { 'MBEDTLS_ZLIB_SUPPORT' } - includedirs { '../zlib' } - end - - files - { - "include/**.h", - "library/*.c" - } - - diff --git a/build/premake/premake5/contrib/mbedtls/programs/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/CMakeLists.txt deleted file mode 100644 index 4cdae7821b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_subdirectory(aes) -add_subdirectory(hash) -add_subdirectory(pkey) -add_subdirectory(random) -add_subdirectory(ssl) -add_subdirectory(test) -add_subdirectory(x509) -add_subdirectory(util) diff --git a/build/premake/premake5/contrib/mbedtls/programs/aes/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/aes/CMakeLists.txt deleted file mode 100644 index f5a0caabbb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/aes/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -add_executable(aescrypt2 aescrypt2.c) -target_link_libraries(aescrypt2 mbedtls) - -add_executable(crypt_and_hash crypt_and_hash.c) -target_link_libraries(crypt_and_hash mbedtls) - -install(TARGETS aescrypt2 crypt_and_hash - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/aes/aescrypt2.c b/build/premake/premake5/contrib/mbedtls/programs/aes/aescrypt2.c deleted file mode 100644 index 027062499f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/aes/aescrypt2.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * AES-256 file encryption program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#include "mbedtls/aes.h" -#include "mbedtls/md.h" - -#include -#include -#include - -#if defined(_WIN32) -#include -#if !defined(_WIN32_WCE) -#include -#endif -#else -#include -#include -#endif - -#define MODE_ENCRYPT 0 -#define MODE_DECRYPT 1 - -#define USAGE \ - "\n aescrypt2 \n" \ - "\n : 0 = encrypt, 1 = decrypt\n" \ - "\n example: aescrypt2 0 file file.aes hex:E76B2413958B00E193\n" \ - "\n" - -#if !defined(MBEDTLS_AES_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_MD_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_AES_C and/or MBEDTLS_SHA256_C " - "and/or MBEDTLS_FS_IO and/or MBEDTLS_MD_C " - "not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - int ret = 1; - - int i, n; - int mode, lastn; - size_t keylen; - FILE *fkey, *fin = NULL, *fout = NULL; - - char *p; - unsigned char IV[16]; - unsigned char key[512]; - unsigned char digest[32]; - unsigned char buffer[1024]; - unsigned char diff; - - mbedtls_aes_context aes_ctx; - mbedtls_md_context_t sha_ctx; - -#if defined(_WIN32_WCE) - long filesize, offset; -#elif defined(_WIN32) - LARGE_INTEGER li_size; - __int64 filesize, offset; -#else - off_t filesize, offset; -#endif - - mbedtls_aes_init( &aes_ctx ); - mbedtls_md_init( &sha_ctx ); - - ret = mbedtls_md_setup( &sha_ctx, mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), 1 ); - if( ret != 0 ) - { - mbedtls_printf( " ! mbedtls_md_setup() returned -0x%04x\n", -ret ); - goto exit; - } - - /* - * Parse the command-line arguments. - */ - if( argc != 5 ) - { - mbedtls_printf( USAGE ); - -#if defined(_WIN32) - mbedtls_printf( "\n Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - goto exit; - } - - mode = atoi( argv[1] ); - memset(IV, 0, sizeof(IV)); - memset(key, 0, sizeof(key)); - memset(digest, 0, sizeof(digest)); - memset(buffer, 0, sizeof(buffer)); - - if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) - { - mbedtls_fprintf( stderr, "invalide operation mode\n" ); - goto exit; - } - - if( strcmp( argv[2], argv[3] ) == 0 ) - { - mbedtls_fprintf( stderr, "input and output filenames must differ\n" ); - goto exit; - } - - if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) - { - mbedtls_fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); - goto exit; - } - - if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) - { - mbedtls_fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); - goto exit; - } - - /* - * Read the secret key and clean the command line. - */ - if( ( fkey = fopen( argv[4], "rb" ) ) != NULL ) - { - keylen = fread( key, 1, sizeof( key ), fkey ); - fclose( fkey ); - } - else - { - if( memcmp( argv[4], "hex:", 4 ) == 0 ) - { - p = &argv[4][4]; - keylen = 0; - - while( sscanf( p, "%02X", &n ) > 0 && - keylen < (int) sizeof( key ) ) - { - key[keylen++] = (unsigned char) n; - p += 2; - } - } - else - { - keylen = strlen( argv[4] ); - - if( keylen > (int) sizeof( key ) ) - keylen = (int) sizeof( key ); - - memcpy( key, argv[4], keylen ); - } - } - - memset( argv[4], 0, strlen( argv[4] ) ); - -#if defined(_WIN32_WCE) - filesize = fseek( fin, 0L, SEEK_END ); -#else -#if defined(_WIN32) - /* - * Support large files (> 2Gb) on Win32 - */ - li_size.QuadPart = 0; - li_size.LowPart = - SetFilePointer( (HANDLE) _get_osfhandle( _fileno( fin ) ), - li_size.LowPart, &li_size.HighPart, FILE_END ); - - if( li_size.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR ) - { - mbedtls_fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); - goto exit; - } - - filesize = li_size.QuadPart; -#else - if( ( filesize = lseek( fileno( fin ), 0, SEEK_END ) ) < 0 ) - { - perror( "lseek" ); - goto exit; - } -#endif -#endif - - if( fseek( fin, 0, SEEK_SET ) < 0 ) - { - mbedtls_fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); - goto exit; - } - - if( mode == MODE_ENCRYPT ) - { - /* - * Generate the initialization vector as: - * IV = SHA-256( filesize || filename )[0..15] - */ - for( i = 0; i < 8; i++ ) - buffer[i] = (unsigned char)( filesize >> ( i << 3 ) ); - - p = argv[2]; - - mbedtls_md_starts( &sha_ctx ); - mbedtls_md_update( &sha_ctx, buffer, 8 ); - mbedtls_md_update( &sha_ctx, (unsigned char *) p, strlen( p ) ); - mbedtls_md_finish( &sha_ctx, digest ); - - memcpy( IV, digest, 16 ); - - /* - * The last four bits in the IV are actually used - * to store the file size modulo the AES block size. - */ - lastn = (int)( filesize & 0x0F ); - - IV[15] = (unsigned char) - ( ( IV[15] & 0xF0 ) | lastn ); - - /* - * Append the IV at the beginning of the output. - */ - if( fwrite( IV, 1, 16, fout ) != 16 ) - { - mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); - goto exit; - } - - /* - * Hash the IV and the secret key together 8192 times - * using the result to setup the AES context and HMAC. - */ - memset( digest, 0, 32 ); - memcpy( digest, IV, 16 ); - - for( i = 0; i < 8192; i++ ) - { - mbedtls_md_starts( &sha_ctx ); - mbedtls_md_update( &sha_ctx, digest, 32 ); - mbedtls_md_update( &sha_ctx, key, keylen ); - mbedtls_md_finish( &sha_ctx, digest ); - } - - memset( key, 0, sizeof( key ) ); - mbedtls_aes_setkey_enc( &aes_ctx, digest, 256 ); - mbedtls_md_hmac_starts( &sha_ctx, digest, 32 ); - - /* - * Encrypt and write the ciphertext. - */ - for( offset = 0; offset < filesize; offset += 16 ) - { - n = ( filesize - offset > 16 ) ? 16 : (int) - ( filesize - offset ); - - if( fread( buffer, 1, n, fin ) != (size_t) n ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", n ); - goto exit; - } - - for( i = 0; i < 16; i++ ) - buffer[i] = (unsigned char)( buffer[i] ^ IV[i] ); - - mbedtls_aes_crypt_ecb( &aes_ctx, MBEDTLS_AES_ENCRYPT, buffer, buffer ); - mbedtls_md_hmac_update( &sha_ctx, buffer, 16 ); - - if( fwrite( buffer, 1, 16, fout ) != 16 ) - { - mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); - goto exit; - } - - memcpy( IV, buffer, 16 ); - } - - /* - * Finally write the HMAC. - */ - mbedtls_md_hmac_finish( &sha_ctx, digest ); - - if( fwrite( digest, 1, 32, fout ) != 32 ) - { - mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); - goto exit; - } - } - - if( mode == MODE_DECRYPT ) - { - unsigned char tmp[16]; - - /* - * The encrypted file must be structured as follows: - * - * 00 .. 15 Initialization Vector - * 16 .. 31 AES Encrypted Block #1 - * .. - * N*16 .. (N+1)*16 - 1 AES Encrypted Block #N - * (N+1)*16 .. (N+1)*16 + 32 HMAC-SHA-256(ciphertext) - */ - if( filesize < 48 ) - { - mbedtls_fprintf( stderr, "File too short to be encrypted.\n" ); - goto exit; - } - - if( ( filesize & 0x0F ) != 0 ) - { - mbedtls_fprintf( stderr, "File size not a multiple of 16.\n" ); - goto exit; - } - - /* - * Subtract the IV + HMAC length. - */ - filesize -= ( 16 + 32 ); - - /* - * Read the IV and original filesize modulo 16. - */ - if( fread( buffer, 1, 16, fin ) != 16 ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", 16 ); - goto exit; - } - - memcpy( IV, buffer, 16 ); - lastn = IV[15] & 0x0F; - - /* - * Hash the IV and the secret key together 8192 times - * using the result to setup the AES context and HMAC. - */ - memset( digest, 0, 32 ); - memcpy( digest, IV, 16 ); - - for( i = 0; i < 8192; i++ ) - { - mbedtls_md_starts( &sha_ctx ); - mbedtls_md_update( &sha_ctx, digest, 32 ); - mbedtls_md_update( &sha_ctx, key, keylen ); - mbedtls_md_finish( &sha_ctx, digest ); - } - - memset( key, 0, sizeof( key ) ); - mbedtls_aes_setkey_dec( &aes_ctx, digest, 256 ); - mbedtls_md_hmac_starts( &sha_ctx, digest, 32 ); - - /* - * Decrypt and write the plaintext. - */ - for( offset = 0; offset < filesize; offset += 16 ) - { - if( fread( buffer, 1, 16, fin ) != 16 ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", 16 ); - goto exit; - } - - memcpy( tmp, buffer, 16 ); - - mbedtls_md_hmac_update( &sha_ctx, buffer, 16 ); - mbedtls_aes_crypt_ecb( &aes_ctx, MBEDTLS_AES_DECRYPT, buffer, buffer ); - - for( i = 0; i < 16; i++ ) - buffer[i] = (unsigned char)( buffer[i] ^ IV[i] ); - - memcpy( IV, tmp, 16 ); - - n = ( lastn > 0 && offset == filesize - 16 ) - ? lastn : 16; - - if( fwrite( buffer, 1, n, fout ) != (size_t) n ) - { - mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", n ); - goto exit; - } - } - - /* - * Verify the message authentication code. - */ - mbedtls_md_hmac_finish( &sha_ctx, digest ); - - if( fread( buffer, 1, 32, fin ) != 32 ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", 32 ); - goto exit; - } - - /* Use constant-time buffer comparison */ - diff = 0; - for( i = 0; i < 32; i++ ) - diff |= digest[i] ^ buffer[i]; - - if( diff != 0 ) - { - mbedtls_fprintf( stderr, "HMAC check failed: wrong key, " - "or file corrupted.\n" ); - goto exit; - } - } - - ret = 0; - -exit: - if( fin ) - fclose( fin ); - if( fout ) - fclose( fout ); - - memset( buffer, 0, sizeof( buffer ) ); - memset( digest, 0, sizeof( digest ) ); - - mbedtls_aes_free( &aes_ctx ); - mbedtls_md_free( &sha_ctx ); - - return( ret ); -} -#endif /* MBEDTLS_AES_C && MBEDTLS_SHA256_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/aes/crypt_and_hash.c b/build/premake/premake5/contrib/mbedtls/programs/aes/crypt_and_hash.c deleted file mode 100644 index 102144eca2..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/aes/crypt_and_hash.c +++ /dev/null @@ -1,545 +0,0 @@ -/* - * \brief Generic file encryption program using generic wrappers for configured - * security. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_CIPHER_C) && defined(MBEDTLS_MD_C) && \ - defined(MBEDTLS_FS_IO) -#include "mbedtls/cipher.h" -#include "mbedtls/md.h" - -#include -#include -#include -#endif - -#if defined(_WIN32) -#include -#if !defined(_WIN32_WCE) -#include -#endif -#else -#include -#include -#endif - -#define MODE_ENCRYPT 0 -#define MODE_DECRYPT 1 - -#define USAGE \ - "\n crypt_and_hash \n" \ - "\n : 0 = encrypt, 1 = decrypt\n" \ - "\n example: crypt_and_hash 0 file file.aes AES-128-CBC SHA1 hex:E76B2413958B00E193\n" \ - "\n" - -#if !defined(MBEDTLS_CIPHER_C) || !defined(MBEDTLS_MD_C) || \ - !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_CIPHER_C and/or MBEDTLS_MD_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - int ret = 1, i, n; - int mode, lastn; - size_t keylen, ilen, olen; - FILE *fkey, *fin = NULL, *fout = NULL; - - char *p; - unsigned char IV[16]; - unsigned char key[512]; - unsigned char digest[MBEDTLS_MD_MAX_SIZE]; - unsigned char buffer[1024]; - unsigned char output[1024]; - unsigned char diff; - - const mbedtls_cipher_info_t *cipher_info; - const mbedtls_md_info_t *md_info; - mbedtls_cipher_context_t cipher_ctx; - mbedtls_md_context_t md_ctx; -#if defined(_WIN32_WCE) - long filesize, offset; -#elif defined(_WIN32) - LARGE_INTEGER li_size; - __int64 filesize, offset; -#else - off_t filesize, offset; -#endif - - mbedtls_cipher_init( &cipher_ctx ); - mbedtls_md_init( &md_ctx ); - - /* - * Parse the command-line arguments. - */ - if( argc != 7 ) - { - const int *list; - - mbedtls_printf( USAGE ); - - mbedtls_printf( "Available ciphers:\n" ); - list = mbedtls_cipher_list(); - while( *list ) - { - cipher_info = mbedtls_cipher_info_from_type( *list ); - mbedtls_printf( " %s\n", cipher_info->name ); - list++; - } - - mbedtls_printf( "\nAvailable message digests:\n" ); - list = mbedtls_md_list(); - while( *list ) - { - md_info = mbedtls_md_info_from_type( *list ); - mbedtls_printf( " %s\n", mbedtls_md_get_name( md_info ) ); - list++; - } - -#if defined(_WIN32) - mbedtls_printf( "\n Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - goto exit; - } - - mode = atoi( argv[1] ); - - if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) - { - mbedtls_fprintf( stderr, "invalid operation mode\n" ); - goto exit; - } - - if( strcmp( argv[2], argv[3] ) == 0 ) - { - mbedtls_fprintf( stderr, "input and output filenames must differ\n" ); - goto exit; - } - - if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) - { - mbedtls_fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); - goto exit; - } - - if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) - { - mbedtls_fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); - goto exit; - } - - /* - * Read the Cipher and MD from the command line - */ - cipher_info = mbedtls_cipher_info_from_string( argv[4] ); - if( cipher_info == NULL ) - { - mbedtls_fprintf( stderr, "Cipher '%s' not found\n", argv[4] ); - goto exit; - } - if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_setup failed\n" ); - goto exit; - } - - md_info = mbedtls_md_info_from_string( argv[5] ); - if( md_info == NULL ) - { - mbedtls_fprintf( stderr, "Message Digest '%s' not found\n", argv[5] ); - goto exit; - } - mbedtls_md_setup( &md_ctx, md_info, 1 ); - - /* - * Read the secret key and clean the command line. - */ - if( ( fkey = fopen( argv[6], "rb" ) ) != NULL ) - { - keylen = fread( key, 1, sizeof( key ), fkey ); - fclose( fkey ); - } - else - { - if( memcmp( argv[6], "hex:", 4 ) == 0 ) - { - p = &argv[6][4]; - keylen = 0; - - while( sscanf( p, "%02X", &n ) > 0 && - keylen < (int) sizeof( key ) ) - { - key[keylen++] = (unsigned char) n; - p += 2; - } - } - else - { - keylen = strlen( argv[6] ); - - if( keylen > (int) sizeof( key ) ) - keylen = (int) sizeof( key ); - - memcpy( key, argv[6], keylen ); - } - } - - memset( argv[6], 0, strlen( argv[6] ) ); - -#if defined(_WIN32_WCE) - filesize = fseek( fin, 0L, SEEK_END ); -#else -#if defined(_WIN32) - /* - * Support large files (> 2Gb) on Win32 - */ - li_size.QuadPart = 0; - li_size.LowPart = - SetFilePointer( (HANDLE) _get_osfhandle( _fileno( fin ) ), - li_size.LowPart, &li_size.HighPart, FILE_END ); - - if( li_size.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR ) - { - mbedtls_fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); - goto exit; - } - - filesize = li_size.QuadPart; -#else - if( ( filesize = lseek( fileno( fin ), 0, SEEK_END ) ) < 0 ) - { - perror( "lseek" ); - goto exit; - } -#endif -#endif - - if( fseek( fin, 0, SEEK_SET ) < 0 ) - { - mbedtls_fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); - goto exit; - } - - if( mode == MODE_ENCRYPT ) - { - /* - * Generate the initialization vector as: - * IV = SHA-256( filesize || filename )[0..15] - */ - for( i = 0; i < 8; i++ ) - buffer[i] = (unsigned char)( filesize >> ( i << 3 ) ); - - p = argv[2]; - - mbedtls_md_starts( &md_ctx ); - mbedtls_md_update( &md_ctx, buffer, 8 ); - mbedtls_md_update( &md_ctx, (unsigned char *) p, strlen( p ) ); - mbedtls_md_finish( &md_ctx, digest ); - - memcpy( IV, digest, 16 ); - - /* - * The last four bits in the IV are actually used - * to store the file size modulo the AES block size. - */ - lastn = (int)( filesize & 0x0F ); - - IV[15] = (unsigned char) - ( ( IV[15] & 0xF0 ) | lastn ); - - /* - * Append the IV at the beginning of the output. - */ - if( fwrite( IV, 1, 16, fout ) != 16 ) - { - mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); - goto exit; - } - - /* - * Hash the IV and the secret key together 8192 times - * using the result to setup the AES context and HMAC. - */ - memset( digest, 0, 32 ); - memcpy( digest, IV, 16 ); - - for( i = 0; i < 8192; i++ ) - { - mbedtls_md_starts( &md_ctx ); - mbedtls_md_update( &md_ctx, digest, 32 ); - mbedtls_md_update( &md_ctx, key, keylen ); - mbedtls_md_finish( &md_ctx, digest ); - - } - - memset( key, 0, sizeof( key ) ); - - if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, - MBEDTLS_ENCRYPT ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_setkey() returned error\n"); - goto exit; - } - if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_set_iv() returned error\n"); - goto exit; - } - if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_reset() returned error\n"); - goto exit; - } - - mbedtls_md_hmac_starts( &md_ctx, digest, 32 ); - - /* - * Encrypt and write the ciphertext. - */ - for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) - { - ilen = ( (unsigned int) filesize - offset > mbedtls_cipher_get_block_size( &cipher_ctx ) ) ? - mbedtls_cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset ); - - if( fread( buffer, 1, ilen, fin ) != ilen ) - { - mbedtls_fprintf( stderr, "fread(%ld bytes) failed\n", (long) ilen ); - goto exit; - } - - if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_update() returned error\n"); - goto exit; - } - - mbedtls_md_hmac_update( &md_ctx, output, olen ); - - if( fwrite( output, 1, olen, fout ) != olen ) - { - mbedtls_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); - goto exit; - } - } - - if( mbedtls_cipher_finish( &cipher_ctx, output, &olen ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_finish() returned error\n" ); - goto exit; - } - mbedtls_md_hmac_update( &md_ctx, output, olen ); - - if( fwrite( output, 1, olen, fout ) != olen ) - { - mbedtls_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); - goto exit; - } - - /* - * Finally write the HMAC. - */ - mbedtls_md_hmac_finish( &md_ctx, digest ); - - if( fwrite( digest, 1, mbedtls_md_get_size( md_info ), fout ) != mbedtls_md_get_size( md_info ) ) - { - mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", mbedtls_md_get_size( md_info ) ); - goto exit; - } - } - - if( mode == MODE_DECRYPT ) - { - /* - * The encrypted file must be structured as follows: - * - * 00 .. 15 Initialization Vector - * 16 .. 31 AES Encrypted Block #1 - * .. - * N*16 .. (N+1)*16 - 1 AES Encrypted Block #N - * (N+1)*16 .. (N+1)*16 + 32 HMAC-SHA-256(ciphertext) - */ - if( filesize < 16 + mbedtls_md_get_size( md_info ) ) - { - mbedtls_fprintf( stderr, "File too short to be encrypted.\n" ); - goto exit; - } - - if( ( ( filesize - mbedtls_md_get_size( md_info ) ) % - mbedtls_cipher_get_block_size( &cipher_ctx ) ) != 0 ) - { - mbedtls_fprintf( stderr, "File content not a multiple of the block size (%d).\n", - mbedtls_cipher_get_block_size( &cipher_ctx )); - goto exit; - } - - /* - * Subtract the IV + HMAC length. - */ - filesize -= ( 16 + mbedtls_md_get_size( md_info ) ); - - /* - * Read the IV and original filesize modulo 16. - */ - if( fread( buffer, 1, 16, fin ) != 16 ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", 16 ); - goto exit; - } - - memcpy( IV, buffer, 16 ); - lastn = IV[15] & 0x0F; - - /* - * Hash the IV and the secret key together 8192 times - * using the result to setup the AES context and HMAC. - */ - memset( digest, 0, 32 ); - memcpy( digest, IV, 16 ); - - for( i = 0; i < 8192; i++ ) - { - mbedtls_md_starts( &md_ctx ); - mbedtls_md_update( &md_ctx, digest, 32 ); - mbedtls_md_update( &md_ctx, key, keylen ); - mbedtls_md_finish( &md_ctx, digest ); - } - - memset( key, 0, sizeof( key ) ); - - if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, - MBEDTLS_DECRYPT ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_setkey() returned error\n" ); - goto exit; - } - - if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_set_iv() returned error\n" ); - goto exit; - } - - if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_reset() returned error\n" ); - goto exit; - } - - mbedtls_md_hmac_starts( &md_ctx, digest, 32 ); - - /* - * Decrypt and write the plaintext. - */ - for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) - { - if( fread( buffer, 1, mbedtls_cipher_get_block_size( &cipher_ctx ), fin ) != - (size_t) mbedtls_cipher_get_block_size( &cipher_ctx ) ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", - mbedtls_cipher_get_block_size( &cipher_ctx ) ); - goto exit; - } - - mbedtls_md_hmac_update( &md_ctx, buffer, mbedtls_cipher_get_block_size( &cipher_ctx ) ); - if( mbedtls_cipher_update( &cipher_ctx, buffer, - mbedtls_cipher_get_block_size( &cipher_ctx ), - output, &olen ) != 0 ) - { - mbedtls_fprintf( stderr, "mbedtls_cipher_update() returned error\n" ); - goto exit; - } - - if( fwrite( output, 1, olen, fout ) != olen ) - { - mbedtls_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); - goto exit; - } - } - - /* - * Verify the message authentication code. - */ - mbedtls_md_hmac_finish( &md_ctx, digest ); - - if( fread( buffer, 1, mbedtls_md_get_size( md_info ), fin ) != mbedtls_md_get_size( md_info ) ) - { - mbedtls_fprintf( stderr, "fread(%d bytes) failed\n", mbedtls_md_get_size( md_info ) ); - goto exit; - } - - /* Use constant-time buffer comparison */ - diff = 0; - for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) - diff |= digest[i] ^ buffer[i]; - - if( diff != 0 ) - { - mbedtls_fprintf( stderr, "HMAC check failed: wrong key, " - "or file corrupted.\n" ); - goto exit; - } - - /* - * Write the final block of data - */ - mbedtls_cipher_finish( &cipher_ctx, output, &olen ); - - if( fwrite( output, 1, olen, fout ) != olen ) - { - mbedtls_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); - goto exit; - } - } - - ret = 0; - -exit: - if( fin ) - fclose( fin ); - if( fout ) - fclose( fout ); - - memset( buffer, 0, sizeof( buffer ) ); - memset( digest, 0, sizeof( digest ) ); - - mbedtls_cipher_free( &cipher_ctx ); - mbedtls_md_free( &md_ctx ); - - return( ret ); -} -#endif /* MBEDTLS_CIPHER_C && MBEDTLS_MD_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/hash/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/hash/CMakeLists.txt deleted file mode 100644 index eda975bb06..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/hash/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -add_executable(hello hello.c) -target_link_libraries(hello mbedtls) - -add_executable(generic_sum generic_sum.c) -target_link_libraries(generic_sum mbedtls) - -install(TARGETS hello generic_sum - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/hash/generic_sum.c b/build/premake/premake5/contrib/mbedtls/programs/hash/generic_sum.c deleted file mode 100644 index f071d311e3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/hash/generic_sum.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * generic message digest layer demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_MD_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/md.h" - -#include -#include -#endif - -#if !defined(MBEDTLS_MD_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_MD_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -static int generic_wrapper( const mbedtls_md_info_t *md_info, char *filename, unsigned char *sum ) -{ - int ret = mbedtls_md_file( md_info, filename, sum ); - - if( ret == 1 ) - mbedtls_fprintf( stderr, "failed to open: %s\n", filename ); - - if( ret == 2 ) - mbedtls_fprintf( stderr, "failed to read: %s\n", filename ); - - return( ret ); -} - -static int generic_print( const mbedtls_md_info_t *md_info, char *filename ) -{ - int i; - unsigned char sum[MBEDTLS_MD_MAX_SIZE]; - - if( generic_wrapper( md_info, filename, sum ) != 0 ) - return( 1 ); - - for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) - mbedtls_printf( "%02x", sum[i] ); - - mbedtls_printf( " %s\n", filename ); - return( 0 ); -} - -static int generic_check( const mbedtls_md_info_t *md_info, char *filename ) -{ - int i; - size_t n; - FILE *f; - int nb_err1, nb_err2; - int nb_tot1, nb_tot2; - unsigned char sum[MBEDTLS_MD_MAX_SIZE]; - char buf[MBEDTLS_MD_MAX_SIZE * 2 + 1], line[1024]; - char diff; - - if( ( f = fopen( filename, "rb" ) ) == NULL ) - { - mbedtls_printf( "failed to open: %s\n", filename ); - return( 1 ); - } - - nb_err1 = nb_err2 = 0; - nb_tot1 = nb_tot2 = 0; - - memset( line, 0, sizeof( line ) ); - - n = sizeof( line ); - - while( fgets( line, (int) n - 1, f ) != NULL ) - { - n = strlen( line ); - - if( n < (size_t) 2 * mbedtls_md_get_size( md_info ) + 4 ) - { - mbedtls_printf("No '%s' hash found on line.\n", mbedtls_md_get_name( md_info )); - continue; - } - - if( line[2 * mbedtls_md_get_size( md_info )] != ' ' || line[2 * mbedtls_md_get_size( md_info ) + 1] != ' ' ) - { - mbedtls_printf("No '%s' hash found on line.\n", mbedtls_md_get_name( md_info )); - continue; - } - - if( line[n - 1] == '\n' ) { n--; line[n] = '\0'; } - if( line[n - 1] == '\r' ) { n--; line[n] = '\0'; } - - nb_tot1++; - - if( generic_wrapper( md_info, line + 2 + 2 * mbedtls_md_get_size( md_info ), sum ) != 0 ) - { - nb_err1++; - continue; - } - - nb_tot2++; - - for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) - sprintf( buf + i * 2, "%02x", sum[i] ); - - /* Use constant-time buffer comparison */ - diff = 0; - for( i = 0; i < 2 * mbedtls_md_get_size( md_info ); i++ ) - diff |= line[i] ^ buf[i]; - - if( diff != 0 ) - { - nb_err2++; - mbedtls_fprintf( stderr, "wrong checksum: %s\n", line + 66 ); - } - - n = sizeof( line ); - } - - if( nb_err1 != 0 ) - { - mbedtls_printf( "WARNING: %d (out of %d) input files could " - "not be read\n", nb_err1, nb_tot1 ); - } - - if( nb_err2 != 0 ) - { - mbedtls_printf( "WARNING: %d (out of %d) computed checksums did " - "not match\n", nb_err2, nb_tot2 ); - } - - fclose( f ); - - return( nb_err1 != 0 || nb_err2 != 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret, i; - const mbedtls_md_info_t *md_info; - mbedtls_md_context_t md_ctx; - - mbedtls_md_init( &md_ctx ); - - if( argc == 1 ) - { - const int *list; - - mbedtls_printf( "print mode: generic_sum ...\n" ); - mbedtls_printf( "check mode: generic_sum -c \n" ); - - mbedtls_printf( "\nAvailable message digests:\n" ); - list = mbedtls_md_list(); - while( *list ) - { - md_info = mbedtls_md_info_from_type( *list ); - mbedtls_printf( " %s\n", mbedtls_md_get_name( md_info ) ); - list++; - } - -#if defined(_WIN32) - mbedtls_printf( "\n Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( 1 ); - } - - /* - * Read the MD from the command line - */ - md_info = mbedtls_md_info_from_string( argv[1] ); - if( md_info == NULL ) - { - mbedtls_fprintf( stderr, "Message Digest '%s' not found\n", argv[1] ); - return( 1 ); - } - if( mbedtls_md_setup( &md_ctx, md_info, 0 ) ) - { - mbedtls_fprintf( stderr, "Failed to initialize context.\n" ); - return( 1 ); - } - - ret = 0; - if( argc == 4 && strcmp( "-c", argv[2] ) == 0 ) - { - ret |= generic_check( md_info, argv[3] ); - goto exit; - } - - for( i = 2; i < argc; i++ ) - ret |= generic_print( md_info, argv[i] ); - -exit: - mbedtls_md_free( &md_ctx ); - - return( ret ); -} -#endif /* MBEDTLS_MD_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/hash/hello.c b/build/premake/premake5/contrib/mbedtls/programs/hash/hello.c deleted file mode 100644 index df420f284a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/hash/hello.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Classic "Hello, world" demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_MD5_C) -#include "mbedtls/md5.h" -#endif - -#if !defined(MBEDTLS_MD5_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_MD5_C not defined.\n"); - return( 0 ); -} -#else -int main( void ) -{ - int i; - unsigned char digest[16]; - char str[] = "Hello, world!"; - - mbedtls_printf( "\n MD5('%s') = ", str ); - - mbedtls_md5( (unsigned char *) str, 13, digest ); - - for( i = 0; i < 16; i++ ) - mbedtls_printf( "%02x", digest[i] ); - - mbedtls_printf( "\n\n" ); - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( 0 ); -} -#endif /* MBEDTLS_MD5_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/pkey/CMakeLists.txt deleted file mode 100644 index 5a37a42129..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/CMakeLists.txt +++ /dev/null @@ -1,63 +0,0 @@ -add_executable(dh_client dh_client.c) -target_link_libraries(dh_client mbedtls) - -add_executable(dh_genprime dh_genprime.c) -target_link_libraries(dh_genprime mbedtls) - -add_executable(dh_server dh_server.c) -target_link_libraries(dh_server mbedtls) - -add_executable(ecdh_curve25519 ecdh_curve25519.c) -target_link_libraries(ecdh_curve25519 mbedtls) - -add_executable(ecdsa ecdsa.c) -target_link_libraries(ecdsa mbedtls) - -add_executable(gen_key gen_key.c) -target_link_libraries(gen_key mbedtls) - -add_executable(key_app key_app.c) -target_link_libraries(key_app mbedtls) - -add_executable(key_app_writer key_app_writer.c) -target_link_libraries(key_app_writer mbedtls) - -add_executable(mpi_demo mpi_demo.c) -target_link_libraries(mpi_demo mbedtls) - -add_executable(rsa_genkey rsa_genkey.c) -target_link_libraries(rsa_genkey mbedtls) - -add_executable(rsa_sign rsa_sign.c) -target_link_libraries(rsa_sign mbedtls) - -add_executable(rsa_verify rsa_verify.c) -target_link_libraries(rsa_verify mbedtls) - -add_executable(rsa_sign_pss rsa_sign_pss.c) -target_link_libraries(rsa_sign_pss mbedtls) - -add_executable(rsa_verify_pss rsa_verify_pss.c) -target_link_libraries(rsa_verify_pss mbedtls) - -add_executable(rsa_encrypt rsa_encrypt.c) -target_link_libraries(rsa_encrypt mbedtls) - -add_executable(rsa_decrypt rsa_decrypt.c) -target_link_libraries(rsa_decrypt mbedtls) - -add_executable(pk_sign pk_sign.c) -target_link_libraries(pk_sign mbedtls) - -add_executable(pk_verify pk_verify.c) -target_link_libraries(pk_verify mbedtls) - -add_executable(pk_encrypt pk_encrypt.c) -target_link_libraries(pk_encrypt mbedtls) - -add_executable(pk_decrypt pk_decrypt.c) -target_link_libraries(pk_decrypt mbedtls) - -install(TARGETS dh_client dh_genprime dh_server key_app mpi_demo rsa_genkey rsa_sign rsa_verify rsa_encrypt rsa_decrypt pk_encrypt pk_decrypt pk_sign pk_verify gen_key - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_client.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_client.c deleted file mode 100644 index 59c4fa8c21..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_client.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Diffie-Hellman-Merkle key exchange (client side) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \ - defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_NET_C) && \ - defined(MBEDTLS_RSA_C) && defined(MBEDTLS_SHA256_C) && \ - defined(MBEDTLS_FS_IO) && defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/net.h" -#include "mbedtls/aes.h" -#include "mbedtls/dhm.h" -#include "mbedtls/rsa.h" -#include "mbedtls/sha1.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#endif - -#define SERVER_NAME "localhost" -#define SERVER_PORT "11999" - -#if !defined(MBEDTLS_AES_C) || !defined(MBEDTLS_DHM_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NET_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_AES_C and/or MBEDTLS_DHM_C and/or MBEDTLS_ENTROPY_C " - "and/or MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_SHA256_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( void ) -{ - FILE *f; - - int ret; - size_t n, buflen; - mbedtls_net_context server_fd; - - unsigned char *p, *end; - unsigned char buf[2048]; - unsigned char hash[32]; - const char *pers = "dh_client"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_rsa_context rsa; - mbedtls_dhm_context dhm; - mbedtls_aes_context aes; - - mbedtls_net_init( &server_fd ); - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, MBEDTLS_MD_SHA256 ); - mbedtls_dhm_init( &dhm ); - mbedtls_aes_init( &aes ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - /* - * 1. Setup the RNG - */ - mbedtls_printf( "\n . Seeding the random number generator" ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - /* - * 2. Read the server's public RSA key - */ - mbedtls_printf( "\n . Reading public key from rsa_pub.txt" ); - fflush( stdout ); - - if( ( f = fopen( "rsa_pub.txt", "rb" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not open rsa_pub.txt\n" \ - " ! Please run rsa_genkey first\n\n" ); - goto exit; - } - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_mpi_read_file( &rsa.N, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.E, 16, f ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_file returned %d\n\n", ret ); - goto exit; - } - - rsa.len = ( mbedtls_mpi_bitlen( &rsa.N ) + 7 ) >> 3; - - fclose( f ); - - /* - * 3. Initiate the connection - */ - mbedtls_printf( "\n . Connecting to tcp/%s/%s", SERVER_NAME, - SERVER_PORT ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, SERVER_NAME, - SERVER_PORT, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret ); - goto exit; - } - - /* - * 4a. First get the buffer length - */ - mbedtls_printf( "\n . Receiving the server's DH parameters" ); - fflush( stdout ); - - memset( buf, 0, sizeof( buf ) ); - - if( ( ret = mbedtls_net_recv( &server_fd, buf, 2 ) ) != 2 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_recv returned %d\n\n", ret ); - goto exit; - } - - n = buflen = ( buf[0] << 8 ) | buf[1]; - if( buflen < 1 || buflen > sizeof( buf ) ) - { - mbedtls_printf( " failed\n ! Got an invalid buffer length\n\n" ); - goto exit; - } - - /* - * 4b. Get the DHM parameters: P, G and Ys = G^Xs mod P - */ - memset( buf, 0, sizeof( buf ) ); - - if( ( ret = mbedtls_net_recv( &server_fd, buf, n ) ) != (int) n ) - { - mbedtls_printf( " failed\n ! mbedtls_net_recv returned %d\n\n", ret ); - goto exit; - } - - p = buf, end = buf + buflen; - - if( ( ret = mbedtls_dhm_read_params( &dhm, &p, end ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_read_params returned %d\n\n", ret ); - goto exit; - } - - if( dhm.len < 64 || dhm.len > 512 ) - { - ret = 1; - mbedtls_printf( " failed\n ! Invalid DHM modulus size\n\n" ); - goto exit; - } - - /* - * 5. Check that the server's RSA signature matches - * the SHA-256 hash of (P,G,Ys) - */ - mbedtls_printf( "\n . Verifying the server's RSA signature" ); - fflush( stdout ); - - p += 2; - - if( ( n = (size_t) ( end - p ) ) != rsa.len ) - { - ret = 1; - mbedtls_printf( " failed\n ! Invalid RSA signature size\n\n" ); - goto exit; - } - - mbedtls_sha1( buf, (int)( p - 2 - buf ), hash ); - - if( ( ret = mbedtls_rsa_pkcs1_verify( &rsa, NULL, NULL, MBEDTLS_RSA_PUBLIC, - MBEDTLS_MD_SHA256, 0, hash, p ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_pkcs1_verify returned %d\n\n", ret ); - goto exit; - } - - /* - * 6. Send our public value: Yc = G ^ Xc mod P - */ - mbedtls_printf( "\n . Sending own public value to server" ); - fflush( stdout ); - - n = dhm.len; - if( ( ret = mbedtls_dhm_make_public( &dhm, (int) dhm.len, buf, n, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_make_public returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_net_send( &server_fd, buf, n ) ) != (int) n ) - { - mbedtls_printf( " failed\n ! mbedtls_net_send returned %d\n\n", ret ); - goto exit; - } - - /* - * 7. Derive the shared secret: K = Ys ^ Xc mod P - */ - mbedtls_printf( "\n . Shared secret: " ); - fflush( stdout ); - - if( ( ret = mbedtls_dhm_calc_secret( &dhm, buf, sizeof( buf ), &n, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_calc_secret returned %d\n\n", ret ); - goto exit; - } - - for( n = 0; n < 16; n++ ) - mbedtls_printf( "%02x", buf[n] ); - - /* - * 8. Setup the AES-256 decryption key - * - * This is an overly simplified example; best practice is - * to hash the shared secret with a random value to derive - * the keying material for the encryption/decryption keys, - * IVs and MACs. - */ - mbedtls_printf( "...\n . Receiving and decrypting the ciphertext" ); - fflush( stdout ); - - mbedtls_aes_setkey_dec( &aes, buf, 256 ); - - memset( buf, 0, sizeof( buf ) ); - - if( ( ret = mbedtls_net_recv( &server_fd, buf, 16 ) ) != 16 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_recv returned %d\n\n", ret ); - goto exit; - } - - mbedtls_aes_crypt_ecb( &aes, MBEDTLS_AES_DECRYPT, buf, buf ); - buf[16] = '\0'; - mbedtls_printf( "\n . Plaintext is \"%s\"\n\n", (char *) buf ); - -exit: - - mbedtls_net_free( &server_fd ); - - mbedtls_aes_free( &aes ); - mbedtls_rsa_free( &rsa ); - mbedtls_dhm_free( &dhm ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_AES_C && MBEDTLS_DHM_C && MBEDTLS_ENTROPY_C && - MBEDTLS_NET_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && - MBEDTLS_FS_IO && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_genprime.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_genprime.c deleted file mode 100644 index 6005a62f5d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_genprime.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Diffie-Hellman-Merkle key exchange (prime generation) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_GENPRIME) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_FS_IO and/or MBEDTLS_CTR_DRBG_C and/or " - "MBEDTLS_GENPRIME not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/bignum.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include - -#define USAGE \ - "\n usage: dh_genprime param=<>...\n" \ - "\n acceprable parameters:\n" \ - " bits=%%d default: 2048\n" - -#define DFL_BITS 2048 - -/* - * Note: G = 4 is always a quadratic residue mod P, - * so it is a generator of order Q (with P = 2*Q+1). - */ -#define GENERATOR "4" - -int main( int argc, char **argv ) -{ - int ret = 1; - mbedtls_mpi G, P, Q; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - const char *pers = "dh_genprime"; - FILE *fout; - int nbits = DFL_BITS; - int i; - char *p, *q; - - mbedtls_mpi_init( &G ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - mbedtls_entropy_init( &entropy ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - return( 1 ); - } - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "bits" ) == 0 ) - { - nbits = atoi( q ); - if( nbits < 0 || nbits > MBEDTLS_MPI_MAX_BITS ) - goto usage; - } - else - goto usage; - } - - if( ( ret = mbedtls_mpi_read_string( &G, 10, GENERATOR ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_string returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ! Generating large primes may take minutes!\n" ); - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Generating the modulus, please wait..." ); - fflush( stdout ); - - /* - * This can take a long time... - */ - if( ( ret = mbedtls_mpi_gen_prime( &P, nbits, 1, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_gen_prime returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Verifying that Q = (P-1)/2 is prime..." ); - fflush( stdout ); - - if( ( ret = mbedtls_mpi_sub_int( &Q, &P, 1 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_sub_int returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_mpi_div_int( &Q, NULL, &Q, 2 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_div_int returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_mpi_is_prime( &Q, mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_is_prime returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Exporting the value in dh_prime.txt..." ); - fflush( stdout ); - - if( ( fout = fopen( "dh_prime.txt", "wb+" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not create dh_prime.txt\n\n" ); - goto exit; - } - - if( ( ret = mbedtls_mpi_write_file( "P = ", &P, 16, fout ) != 0 ) || - ( ret = mbedtls_mpi_write_file( "G = ", &G, 16, fout ) != 0 ) ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_write_file returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n\n" ); - fclose( fout ); - -exit: - - mbedtls_mpi_free( &G ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_FS_IO && - MBEDTLS_CTR_DRBG_C && MBEDTLS_GENPRIME */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_prime.txt b/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_prime.txt deleted file mode 100644 index de0c281483..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_prime.txt +++ /dev/null @@ -1,2 +0,0 @@ -P = FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF -G = 02 diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_server.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_server.c deleted file mode 100644 index 83b0b44569..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/dh_server.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Diffie-Hellman-Merkle key exchange (server side) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \ - defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_NET_C) && \ - defined(MBEDTLS_RSA_C) && defined(MBEDTLS_SHA256_C) && \ - defined(MBEDTLS_FS_IO) && defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/net.h" -#include "mbedtls/aes.h" -#include "mbedtls/dhm.h" -#include "mbedtls/rsa.h" -#include "mbedtls/sha1.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#endif - -#define SERVER_PORT "11999" -#define PLAINTEXT "==Hello there!==" - -#if !defined(MBEDTLS_AES_C) || !defined(MBEDTLS_DHM_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NET_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_AES_C and/or MBEDTLS_DHM_C and/or MBEDTLS_ENTROPY_C " - "and/or MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_SHA256_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( void ) -{ - FILE *f; - - int ret; - size_t n, buflen; - mbedtls_net_context listen_fd, client_fd; - - unsigned char buf[2048]; - unsigned char hash[32]; - unsigned char buf2[2]; - const char *pers = "dh_server"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_rsa_context rsa; - mbedtls_dhm_context dhm; - mbedtls_aes_context aes; - - mbedtls_net_init( &listen_fd ); - mbedtls_net_init( &client_fd ); - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, MBEDTLS_MD_SHA256 ); - mbedtls_dhm_init( &dhm ); - mbedtls_aes_init( &aes ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - /* - * 1. Setup the RNG - */ - mbedtls_printf( "\n . Seeding the random number generator" ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - /* - * 2a. Read the server's private RSA key - */ - mbedtls_printf( "\n . Reading private key from rsa_priv.txt" ); - fflush( stdout ); - - if( ( f = fopen( "rsa_priv.txt", "rb" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not open rsa_priv.txt\n" \ - " ! Please run rsa_genkey first\n\n" ); - goto exit; - } - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_mpi_read_file( &rsa.N , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.E , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.D , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.P , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.Q , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.DP, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.DQ, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.QP, 16, f ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_file returned %d\n\n", ret ); - goto exit; - } - - rsa.len = ( mbedtls_mpi_bitlen( &rsa.N ) + 7 ) >> 3; - - fclose( f ); - - /* - * 2b. Get the DHM modulus and generator - */ - mbedtls_printf( "\n . Reading DH parameters from dh_prime.txt" ); - fflush( stdout ); - - if( ( f = fopen( "dh_prime.txt", "rb" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not open dh_prime.txt\n" \ - " ! Please run dh_genprime first\n\n" ); - goto exit; - } - - if( mbedtls_mpi_read_file( &dhm.P, 16, f ) != 0 || - mbedtls_mpi_read_file( &dhm.G, 16, f ) != 0 ) - { - mbedtls_printf( " failed\n ! Invalid DH parameter file\n\n" ); - goto exit; - } - - fclose( f ); - - /* - * 3. Wait for a client to connect - */ - mbedtls_printf( "\n . Waiting for a remote connection" ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, NULL, SERVER_PORT, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_bind returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - NULL, 0, NULL ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_accept returned %d\n\n", ret ); - goto exit; - } - - /* - * 4. Setup the DH parameters (P,G,Ys) - */ - mbedtls_printf( "\n . Sending the server's DH parameters" ); - fflush( stdout ); - - memset( buf, 0, sizeof( buf ) ); - - if( ( ret = mbedtls_dhm_make_params( &dhm, (int) mbedtls_mpi_size( &dhm.P ), buf, &n, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_make_params returned %d\n\n", ret ); - goto exit; - } - - /* - * 5. Sign the parameters and send them - */ - mbedtls_sha1( buf, n, hash ); - - buf[n ] = (unsigned char)( rsa.len >> 8 ); - buf[n + 1] = (unsigned char)( rsa.len ); - - if( ( ret = mbedtls_rsa_pkcs1_sign( &rsa, NULL, NULL, MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_SHA256, - 0, hash, buf + n + 2 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_pkcs1_sign returned %d\n\n", ret ); - goto exit; - } - - buflen = n + 2 + rsa.len; - buf2[0] = (unsigned char)( buflen >> 8 ); - buf2[1] = (unsigned char)( buflen ); - - if( ( ret = mbedtls_net_send( &client_fd, buf2, 2 ) ) != 2 || - ( ret = mbedtls_net_send( &client_fd, buf, buflen ) ) != (int) buflen ) - { - mbedtls_printf( " failed\n ! mbedtls_net_send returned %d\n\n", ret ); - goto exit; - } - - /* - * 6. Get the client's public value: Yc = G ^ Xc mod P - */ - mbedtls_printf( "\n . Receiving the client's public value" ); - fflush( stdout ); - - memset( buf, 0, sizeof( buf ) ); - - if( ( ret = mbedtls_net_recv( &client_fd, buf, n ) ) != (int) n ) - { - mbedtls_printf( " failed\n ! mbedtls_net_recv returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_dhm_read_public( &dhm, buf, dhm.len ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_read_public returned %d\n\n", ret ); - goto exit; - } - - /* - * 7. Derive the shared secret: K = Ys ^ Xc mod P - */ - mbedtls_printf( "\n . Shared secret: " ); - fflush( stdout ); - - if( ( ret = mbedtls_dhm_calc_secret( &dhm, buf, sizeof( buf ), &n, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_calc_secret returned %d\n\n", ret ); - goto exit; - } - - for( n = 0; n < 16; n++ ) - mbedtls_printf( "%02x", buf[n] ); - - /* - * 8. Setup the AES-256 encryption key - * - * This is an overly simplified example; best practice is - * to hash the shared secret with a random value to derive - * the keying material for the encryption/decryption keys - * and MACs. - */ - mbedtls_printf( "...\n . Encrypting and sending the ciphertext" ); - fflush( stdout ); - - mbedtls_aes_setkey_enc( &aes, buf, 256 ); - memcpy( buf, PLAINTEXT, 16 ); - mbedtls_aes_crypt_ecb( &aes, MBEDTLS_AES_ENCRYPT, buf, buf ); - - if( ( ret = mbedtls_net_send( &client_fd, buf, 16 ) ) != 16 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_send returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( "\n\n" ); - -exit: - - mbedtls_net_free( &client_fd ); - mbedtls_net_free( &listen_fd ); - - mbedtls_aes_free( &aes ); - mbedtls_rsa_free( &rsa ); - mbedtls_dhm_free( &dhm ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_AES_C && MBEDTLS_DHM_C && MBEDTLS_ENTROPY_C && - MBEDTLS_NET_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && - MBEDTLS_FS_IO && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/ecdh_curve25519.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/ecdh_curve25519.c deleted file mode 100644 index aa15c46870..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/ecdh_curve25519.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Example ECDHE with Curve25519 program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_ECDH_C) || \ - !defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf( "MBEDTLS_ECDH_C and/or " - "MBEDTLS_ECP_DP_CURVE25519_ENABLED and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C " - "not defined\n" ); - return( 0 ); -} -#else - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/ecdh.h" - -int main( int argc, char *argv[] ) -{ - int ret; - mbedtls_ecdh_context ctx_cli, ctx_srv; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char cli_to_srv[32], srv_to_cli[32]; - const char pers[] = "ecdh"; - ((void) argc); - ((void) argv); - - mbedtls_ecdh_init( &ctx_cli ); - mbedtls_ecdh_init( &ctx_srv ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - /* - * Initialize random number generation - */ - mbedtls_printf( " . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - sizeof pers ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * Client: inialize context and generate keypair - */ - mbedtls_printf( " . Setting up client context..." ); - fflush( stdout ); - - ret = mbedtls_ecp_group_load( &ctx_cli.grp, MBEDTLS_ECP_DP_CURVE25519 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecp_group_load returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_ecdh_gen_public( &ctx_cli.grp, &ctx_cli.d, &ctx_cli.Q, - mbedtls_ctr_drbg_random, &ctr_drbg ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdh_gen_public returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_mpi_write_binary( &ctx_cli.Q.X, cli_to_srv, 32 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_write_binary returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * Server: initialize context and generate keypair - */ - mbedtls_printf( " . Setting up server context..." ); - fflush( stdout ); - - ret = mbedtls_ecp_group_load( &ctx_srv.grp, MBEDTLS_ECP_DP_CURVE25519 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecp_group_load returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_ecdh_gen_public( &ctx_srv.grp, &ctx_srv.d, &ctx_srv.Q, - mbedtls_ctr_drbg_random, &ctr_drbg ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdh_gen_public returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_mpi_write_binary( &ctx_srv.Q.X, srv_to_cli, 32 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_write_binary returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * Server: read peer's key and generate shared secret - */ - mbedtls_printf( " . Server reading client key and computing secret..." ); - fflush( stdout ); - - ret = mbedtls_mpi_lset( &ctx_srv.Qp.Z, 1 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_lset returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_mpi_read_binary( &ctx_srv.Qp.X, cli_to_srv, 32 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_binary returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_ecdh_compute_shared( &ctx_srv.grp, &ctx_srv.z, - &ctx_srv.Qp, &ctx_srv.d, - mbedtls_ctr_drbg_random, &ctr_drbg ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdh_compute_shared returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * Client: read peer's key and generate shared secret - */ - mbedtls_printf( " . Client reading server key and computing secret..." ); - fflush( stdout ); - - ret = mbedtls_mpi_lset( &ctx_cli.Qp.Z, 1 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_lset returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_mpi_read_binary( &ctx_cli.Qp.X, srv_to_cli, 32 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_binary returned %d\n", ret ); - goto exit; - } - - ret = mbedtls_ecdh_compute_shared( &ctx_cli.grp, &ctx_cli.z, - &ctx_cli.Qp, &ctx_cli.d, - mbedtls_ctr_drbg_random, &ctr_drbg ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdh_compute_shared returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * Verification: are the computed secret equal? - */ - mbedtls_printf( " . Checking if both computed secrets are equal..." ); - fflush( stdout ); - - ret = mbedtls_mpi_cmp_mpi( &ctx_cli.z, &ctx_srv.z ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdh_compute_shared returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - -exit: - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - mbedtls_ecdh_free( &ctx_srv ); - mbedtls_ecdh_free( &ctx_cli ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - - return( ret != 0 ); -} -#endif /* MBEDTLS_ECDH_C && MBEDTLS_ECP_DP_CURVE25519_ENABLED && - MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/ecdsa.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/ecdsa.c deleted file mode 100644 index 069d312026..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/ecdsa.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Example ECDSA program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_ECDSA_C) && \ - defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/ecdsa.h" - -#include -#endif - -/* - * Uncomment to show key and signature details - */ -#define VERBOSE - -/* - * Uncomment to force use of a specific curve - */ -#define ECPARAMS MBEDTLS_ECP_DP_SECP192R1 - -#if !defined(ECPARAMS) -#define ECPARAMS mbedtls_ecp_curve_list()->grp_id -#endif - -#if !defined(MBEDTLS_ECDSA_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_ECDSA_C and/or MBEDTLS_SHA256_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined\n"); - return( 0 ); -} -#else -#if defined(VERBOSE) -static void dump_buf( const char *title, unsigned char *buf, size_t len ) -{ - size_t i; - - mbedtls_printf( "%s", title ); - for( i = 0; i < len; i++ ) - mbedtls_printf("%c%c", "0123456789ABCDEF" [buf[i] / 16], - "0123456789ABCDEF" [buf[i] % 16] ); - mbedtls_printf( "\n" ); -} - -static void dump_pubkey( const char *title, mbedtls_ecdsa_context *key ) -{ - unsigned char buf[300]; - size_t len; - - if( mbedtls_ecp_point_write_binary( &key->grp, &key->Q, - MBEDTLS_ECP_PF_UNCOMPRESSED, &len, buf, sizeof buf ) != 0 ) - { - mbedtls_printf("internal error\n"); - return; - } - - dump_buf( title, buf, len ); -} -#else -#define dump_buf( a, b, c ) -#define dump_pubkey( a, b ) -#endif - -int main( int argc, char *argv[] ) -{ - int ret; - mbedtls_ecdsa_context ctx_sign, ctx_verify; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char hash[] = "This should be the hash of a message."; - unsigned char sig[512]; - size_t sig_len; - const char *pers = "ecdsa"; - ((void) argv); - - mbedtls_ecdsa_init( &ctx_sign ); - mbedtls_ecdsa_init( &ctx_verify ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - memset(sig, 0, sizeof( sig ) ); - ret = 1; - - if( argc != 1 ) - { - mbedtls_printf( "usage: ecdsa\n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - /* - * Generate a key pair for signing - */ - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Generating key pair..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ecdsa_genkey( &ctx_sign, ECPARAMS, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdsa_genkey returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok (key size: %d bits)\n", (int) ctx_sign.grp.pbits ); - - dump_pubkey( " + Public key: ", &ctx_sign ); - - /* - * Sign some message hash - */ - mbedtls_printf( " . Signing message..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ecdsa_write_signature( &ctx_sign, MBEDTLS_MD_SHA256, - hash, sizeof( hash ), - sig, &sig_len, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdsa_genkey returned %d\n", ret ); - goto exit; - } - mbedtls_printf( " ok (signature length = %u)\n", (unsigned int) sig_len ); - - dump_buf( " + Hash: ", hash, sizeof hash ); - dump_buf( " + Signature: ", sig, sig_len ); - - /* - * Transfer public information to verifying context - * - * We could use the same context for verification and signatures, but we - * chose to use a new one in order to make it clear that the verifying - * context only needs the public key (Q), and not the private key (d). - */ - mbedtls_printf( " . Preparing verification context..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ecp_group_copy( &ctx_verify.grp, &ctx_sign.grp ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecp_group_copy returned %d\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ecp_copy( &ctx_verify.Q, &ctx_sign.Q ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecp_copy returned %d\n", ret ); - goto exit; - } - - ret = 0; - - /* - * Verify signature - */ - mbedtls_printf( " ok\n . Verifying signature..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ecdsa_read_signature( &ctx_verify, - hash, sizeof( hash ), - sig, sig_len ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ecdsa_read_signature returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -exit: - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - mbedtls_ecdsa_free( &ctx_verify ); - mbedtls_ecdsa_free( &ctx_sign ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - - return( ret ); -} -#endif /* MBEDTLS_ECDSA_C && MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C && - ECPARAMS */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/gen_key.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/gen_key.c deleted file mode 100644 index 63a3aeb98a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/gen_key.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Key generation application - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_FS_IO) && \ - defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/error.h" -#include "mbedtls/pk.h" -#include "mbedtls/ecdsa.h" -#include "mbedtls/rsa.h" -#include "mbedtls/error.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#include - -#if !defined(_WIN32) -#include - -#define DEV_RANDOM_THRESHOLD 32 - -int dev_random_entropy_poll( void *data, unsigned char *output, - size_t len, size_t *olen ) -{ - FILE *file; - size_t ret, left = len; - unsigned char *p = output; - ((void) data); - - *olen = 0; - - file = fopen( "/dev/random", "rb" ); - if( file == NULL ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - while( left > 0 ) - { - /* /dev/random can return much less than requested. If so, try again */ - ret = fread( p, 1, left, file ); - if( ret == 0 && ferror( file ) ) - { - fclose( file ); - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - } - - p += ret; - left -= ret; - sleep( 1 ); - } - fclose( file ); - *olen = len; - - return( 0 ); -} -#endif /* !_WIN32 */ -#endif - -#if defined(MBEDTLS_ECP_C) -#define DFL_EC_CURVE mbedtls_ecp_curve_list()->grp_id -#else -#define DFL_EC_CURVE 0 -#endif - -#if !defined(_WIN32) && defined(MBEDTLS_FS_IO) -#define USAGE_DEV_RANDOM \ - " use_dev_random=0|1 default: 0\n" -#else -#define USAGE_DEV_RANDOM "" -#endif /* !_WIN32 && MBEDTLS_FS_IO */ - -#define FORMAT_PEM 0 -#define FORMAT_DER 1 - -#define DFL_TYPE MBEDTLS_PK_RSA -#define DFL_RSA_KEYSIZE 4096 -#define DFL_FILENAME "keyfile.key" -#define DFL_FORMAT FORMAT_PEM -#define DFL_USE_DEV_RANDOM 0 - -#define USAGE \ - "\n usage: gen_key param=<>...\n" \ - "\n acceptable parameters:\n" \ - " type=rsa|ec default: rsa\n" \ - " rsa_keysize=%%d default: 4096\n" \ - " ec_curve=%%s see below\n" \ - " filename=%%s default: keyfile.key\n" \ - " format=pem|der default: pem\n" \ - USAGE_DEV_RANDOM \ - "\n" - -#if !defined(MBEDTLS_PK_WRITE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf( "MBEDTLS_PK_WRITE_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C " - "not defined.\n" ); - return( 0 ); -} -#else -/* - * global options - */ -struct options -{ - int type; /* the type of key to generate */ - int rsa_keysize; /* length of key in bits */ - int ec_curve; /* curve identifier for EC keys */ - const char *filename; /* filename of the key file */ - int format; /* the output format to use */ - int use_dev_random; /* use /dev/random as entropy source */ -} opt; - -static int write_private_key( mbedtls_pk_context *key, const char *output_file ) -{ - int ret; - FILE *f; - unsigned char output_buf[16000]; - unsigned char *c = output_buf; - size_t len = 0; - - memset(output_buf, 0, 16000); - if( opt.format == FORMAT_PEM ) - { - if( ( ret = mbedtls_pk_write_key_pem( key, output_buf, 16000 ) ) != 0 ) - return( ret ); - - len = strlen( (char *) output_buf ); - } - else - { - if( ( ret = mbedtls_pk_write_key_der( key, output_buf, 16000 ) ) < 0 ) - return( ret ); - - len = ret; - c = output_buf + sizeof(output_buf) - len; - } - - if( ( f = fopen( output_file, "wb" ) ) == NULL ) - return( -1 ); - - if( fwrite( c, 1, len, f ) != len ) - { - fclose( f ); - return( -1 ); - } - - fclose( f ); - - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0; - mbedtls_pk_context key; - char buf[1024]; - int i; - char *p, *q; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - const char *pers = "gen_key"; -#if defined(MBEDTLS_ECP_C) - const mbedtls_ecp_curve_info *curve_info; -#endif - - /* - * Set to sane values - */ - mbedtls_pk_init( &key ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - memset( buf, 0, sizeof( buf ) ); - - if( argc == 0 ) - { - usage: - ret = 1; - mbedtls_printf( USAGE ); -#if defined(MBEDTLS_ECP_C) - mbedtls_printf( " available ec_curve values:\n" ); - curve_info = mbedtls_ecp_curve_list(); - mbedtls_printf( " %s (default)\n", curve_info->name ); - while( ( ++curve_info )->name != NULL ) - mbedtls_printf( " %s\n", curve_info->name ); -#endif - goto exit; - } - - opt.type = DFL_TYPE; - opt.rsa_keysize = DFL_RSA_KEYSIZE; - opt.ec_curve = DFL_EC_CURVE; - opt.filename = DFL_FILENAME; - opt.format = DFL_FORMAT; - opt.use_dev_random = DFL_USE_DEV_RANDOM; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "type" ) == 0 ) - { - if( strcmp( q, "rsa" ) == 0 ) - opt.type = MBEDTLS_PK_RSA; - else if( strcmp( q, "ec" ) == 0 ) - opt.type = MBEDTLS_PK_ECKEY; - else - goto usage; - } - else if( strcmp( p, "format" ) == 0 ) - { - if( strcmp( q, "pem" ) == 0 ) - opt.format = FORMAT_PEM; - else if( strcmp( q, "der" ) == 0 ) - opt.format = FORMAT_DER; - else - goto usage; - } - else if( strcmp( p, "rsa_keysize" ) == 0 ) - { - opt.rsa_keysize = atoi( q ); - if( opt.rsa_keysize < 1024 || - opt.rsa_keysize > MBEDTLS_MPI_MAX_BITS ) - goto usage; - } -#if defined(MBEDTLS_ECP_C) - else if( strcmp( p, "ec_curve" ) == 0 ) - { - if( ( curve_info = mbedtls_ecp_curve_info_from_name( q ) ) == NULL ) - goto usage; - opt.ec_curve = curve_info->grp_id; - } -#endif - else if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else if( strcmp( p, "use_dev_random" ) == 0 ) - { - opt.use_dev_random = atoi( q ); - if( opt.use_dev_random < 0 || opt.use_dev_random > 1 ) - goto usage; - } - else - goto usage; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); -#if !defined(_WIN32) && defined(MBEDTLS_FS_IO) - if( opt.use_dev_random ) - { - if( ( ret = mbedtls_entropy_add_source( &entropy, dev_random_entropy_poll, - NULL, DEV_RANDOM_THRESHOLD, - MBEDTLS_ENTROPY_SOURCE_STRONG ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_entropy_add_source returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf("\n Using /dev/random, so can take a long time! " ); - fflush( stdout ); - } -#endif /* !_WIN32 && MBEDTLS_FS_IO */ - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned -0x%04x\n", -ret ); - goto exit; - } - - /* - * 1.1. Generate the key - */ - mbedtls_printf( "\n . Generating the private key ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_setup( &key, mbedtls_pk_info_from_type( opt.type ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_setup returned -0x%04x", -ret ); - goto exit; - } - -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_GENPRIME) - if( opt.type == MBEDTLS_PK_RSA ) - { - ret = mbedtls_rsa_gen_key( mbedtls_pk_rsa( key ), mbedtls_ctr_drbg_random, &ctr_drbg, - opt.rsa_keysize, 65537 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_gen_key returned -0x%04x", -ret ); - goto exit; - } - } - else -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_ECP_C) - if( opt.type == MBEDTLS_PK_ECKEY ) - { - ret = mbedtls_ecp_gen_key( opt.ec_curve, mbedtls_pk_ec( key ), - mbedtls_ctr_drbg_random, &ctr_drbg ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_gen_key returned -0x%04x", -ret ); - goto exit; - } - } - else -#endif /* MBEDTLS_ECP_C */ - { - mbedtls_printf( " failed\n ! key type not supported\n" ); - goto exit; - } - - /* - * 1.2 Print the key - */ - mbedtls_printf( " ok\n . Key information:\n" ); - -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_RSA ) - { - mbedtls_rsa_context *rsa = mbedtls_pk_rsa( key ); - mbedtls_mpi_write_file( "N: ", &rsa->N, 16, NULL ); - mbedtls_mpi_write_file( "E: ", &rsa->E, 16, NULL ); - mbedtls_mpi_write_file( "D: ", &rsa->D, 16, NULL ); - mbedtls_mpi_write_file( "P: ", &rsa->P, 16, NULL ); - mbedtls_mpi_write_file( "Q: ", &rsa->Q, 16, NULL ); - mbedtls_mpi_write_file( "DP: ", &rsa->DP, 16, NULL ); - mbedtls_mpi_write_file( "DQ: ", &rsa->DQ, 16, NULL ); - mbedtls_mpi_write_file( "QP: ", &rsa->QP, 16, NULL ); - } - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_ECKEY ) - { - mbedtls_ecp_keypair *ecp = mbedtls_pk_ec( key ); - mbedtls_printf( "curve: %s\n", - mbedtls_ecp_curve_info_from_grp_id( ecp->grp.id )->name ); - mbedtls_mpi_write_file( "X_Q: ", &ecp->Q.X, 16, NULL ); - mbedtls_mpi_write_file( "Y_Q: ", &ecp->Q.Y, 16, NULL ); - mbedtls_mpi_write_file( "D: ", &ecp->d , 16, NULL ); - } - else -#endif - mbedtls_printf(" ! key type not supported\n"); - - /* - * 1.3 Export key - */ - mbedtls_printf( " . Writing key to file..." ); - - if( ( ret = write_private_key( &key, opt.filename ) ) != 0 ) - { - mbedtls_printf( " failed\n" ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -exit: - - if( ret != 0 && ret != 1) - { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror( ret, buf, sizeof( buf ) ); - mbedtls_printf( " - %s\n", buf ); -#else - mbedtls_printf("\n"); -#endif - } - - mbedtls_pk_free( &key ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_PK_WRITE_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/key_app.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/key_app.c deleted file mode 100644 index b6b84464d2..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/key_app.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Key reading application - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && \ - defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/error.h" -#include "mbedtls/rsa.h" -#include "mbedtls/x509.h" - -#include -#endif - -#define MODE_NONE 0 -#define MODE_PRIVATE 1 -#define MODE_PUBLIC 2 - -#define DFL_MODE MODE_NONE -#define DFL_FILENAME "keyfile.key" -#define DFL_PASSWORD "" -#define DFL_PASSWORD_FILE "" -#define DFL_DEBUG_LEVEL 0 - -#define USAGE \ - "\n usage: key_app param=<>...\n" \ - "\n acceptable parameters:\n" \ - " mode=private|public default: none\n" \ - " filename=%%s default: keyfile.key\n" \ - " password=%%s default: \"\"\n" \ - " password_file=%%s default: \"\"\n" \ - "\n" - - -#if !defined(MBEDTLS_BIGNUM_C) || \ - !defined(MBEDTLS_PK_PARSE_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or " - "MBEDTLS_PK_PARSE_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -/* - * global options - */ -struct options -{ - int mode; /* the mode to run the application in */ - const char *filename; /* filename of the key file */ - const char *password; /* password for the private key */ - const char *password_file; /* password_file for the private key */ -} opt; - -int main( int argc, char *argv[] ) -{ - int ret = 0; - mbedtls_pk_context pk; - char buf[1024]; - int i; - char *p, *q; - - /* - * Set to sane values - */ - mbedtls_pk_init( &pk ); - memset( buf, 0, sizeof(buf) ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - goto exit; - } - - opt.mode = DFL_MODE; - opt.filename = DFL_FILENAME; - opt.password = DFL_PASSWORD; - opt.password_file = DFL_PASSWORD_FILE; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "mode" ) == 0 ) - { - if( strcmp( q, "private" ) == 0 ) - opt.mode = MODE_PRIVATE; - else if( strcmp( q, "public" ) == 0 ) - opt.mode = MODE_PUBLIC; - else - goto usage; - } - else if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else if( strcmp( p, "password" ) == 0 ) - opt.password = q; - else if( strcmp( p, "password_file" ) == 0 ) - opt.password_file = q; - else - goto usage; - } - - if( opt.mode == MODE_PRIVATE ) - { - if( strlen( opt.password ) && strlen( opt.password_file ) ) - { - mbedtls_printf( "Error: cannot have both password and password_file\n" ); - goto usage; - } - - if( strlen( opt.password_file ) ) - { - FILE *f; - - mbedtls_printf( "\n . Loading the password file ..." ); - if( ( f = fopen( opt.password_file, "rb" ) ) == NULL ) - { - mbedtls_printf( " failed\n ! fopen returned NULL\n" ); - goto exit; - } - if( fgets( buf, sizeof(buf), f ) == NULL ) - { - fclose( f ); - mbedtls_printf( "Error: fgets() failed to retrieve password\n" ); - goto exit; - } - fclose( f ); - - i = (int) strlen( buf ); - if( buf[i - 1] == '\n' ) buf[i - 1] = '\0'; - if( buf[i - 2] == '\r' ) buf[i - 2] = '\0'; - opt.password = buf; - } - - /* - * 1.1. Load the key - */ - mbedtls_printf( "\n . Loading the private key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_keyfile( &pk, opt.filename, opt.password ); - - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2 Print the key - */ - mbedtls_printf( " . Key information ...\n" ); -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( &pk ) == MBEDTLS_PK_RSA ) - { - mbedtls_rsa_context *rsa = mbedtls_pk_rsa( pk ); - mbedtls_mpi_write_file( "N: ", &rsa->N, 16, NULL ); - mbedtls_mpi_write_file( "E: ", &rsa->E, 16, NULL ); - mbedtls_mpi_write_file( "D: ", &rsa->D, 16, NULL ); - mbedtls_mpi_write_file( "P: ", &rsa->P, 16, NULL ); - mbedtls_mpi_write_file( "Q: ", &rsa->Q, 16, NULL ); - mbedtls_mpi_write_file( "DP: ", &rsa->DP, 16, NULL ); - mbedtls_mpi_write_file( "DQ: ", &rsa->DQ, 16, NULL ); - mbedtls_mpi_write_file( "QP: ", &rsa->QP, 16, NULL ); - } - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( &pk ) == MBEDTLS_PK_ECKEY ) - { - mbedtls_ecp_keypair *ecp = mbedtls_pk_ec( pk ); - mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); - mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); - mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); - mbedtls_mpi_write_file( "D : ", &ecp->d , 16, NULL ); - } - else -#endif - { - mbedtls_printf("Do not know how to print key information for this type\n" ); - goto exit; - } - } - else if( opt.mode == MODE_PUBLIC ) - { - /* - * 1.1. Load the key - */ - mbedtls_printf( "\n . Loading the public key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_public_keyfile( &pk, opt.filename ); - - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_public_keyfile returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - mbedtls_printf( " . Key information ...\n" ); -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( &pk ) == MBEDTLS_PK_RSA ) - { - mbedtls_rsa_context *rsa = mbedtls_pk_rsa( pk ); - mbedtls_mpi_write_file( "N: ", &rsa->N, 16, NULL ); - mbedtls_mpi_write_file( "E: ", &rsa->E, 16, NULL ); - } - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( &pk ) == MBEDTLS_PK_ECKEY ) - { - mbedtls_ecp_keypair *ecp = mbedtls_pk_ec( pk ); - mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); - mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); - mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); - } - else -#endif - { - mbedtls_printf("Do not know how to print key information for this type\n" ); - goto exit; - } - } - else - goto usage; - -exit: - -#if defined(MBEDTLS_ERROR_C) - mbedtls_strerror( ret, buf, sizeof(buf) ); - mbedtls_printf( " ! Last error was: %s\n", buf ); -#endif - - mbedtls_pk_free( &pk ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/key_app_writer.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/key_app_writer.c deleted file mode 100644 index 9d120772a6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/key_app_writer.c +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Key writing application - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/error.h" -#include "mbedtls/pk.h" -#include "mbedtls/error.h" - -#include -#include -#endif - -#if defined(MBEDTLS_PEM_WRITE_C) -#define USAGE_OUT \ - " output_file=%%s default: keyfile.pem\n" \ - " output_format=pem|der default: pem\n" -#else -#define USAGE_OUT \ - " output_file=%%s default: keyfile.der\n" \ - " output_format=der default: der\n" -#endif - -#if defined(MBEDTLS_PEM_WRITE_C) -#define DFL_OUTPUT_FILENAME "keyfile.pem" -#define DFL_OUTPUT_FORMAT OUTPUT_FORMAT_PEM -#else -#define DFL_OUTPUT_FILENAME "keyfile.der" -#define DFL_OUTPUT_FORMAT OUTPUT_FORMAT_DER -#endif - -#define DFL_MODE MODE_NONE -#define DFL_FILENAME "keyfile.key" -#define DFL_DEBUG_LEVEL 0 -#define DFL_OUTPUT_MODE OUTPUT_MODE_NONE - -#define MODE_NONE 0 -#define MODE_PRIVATE 1 -#define MODE_PUBLIC 2 - -#define OUTPUT_MODE_NONE 0 -#define OUTPUT_MODE_PRIVATE 1 -#define OUTPUT_MODE_PUBLIC 2 - -#define OUTPUT_FORMAT_PEM 0 -#define OUTPUT_FORMAT_DER 1 - -#define USAGE \ - "\n usage: key_app param=<>...\n" \ - "\n acceptable parameters:\n" \ - " mode=private|public default: none\n" \ - " filename=%%s default: keyfile.key\n" \ - " output_mode=private|public default: none\n" \ - USAGE_OUT \ - "\n" - -#if !defined(MBEDTLS_PK_WRITE_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf( "MBEDTLS_PK_WRITE_C and/or MBEDTLS_FS_IO not defined.\n" ); - return( 0 ); -} -#else -/* - * global options - */ -struct options -{ - int mode; /* the mode to run the application in */ - const char *filename; /* filename of the key file */ - int output_mode; /* the output mode to use */ - const char *output_file; /* where to store the constructed key file */ - int output_format; /* the output format to use */ -} opt; - -static int write_public_key( mbedtls_pk_context *key, const char *output_file ) -{ - int ret; - FILE *f; - unsigned char output_buf[16000]; - unsigned char *c = output_buf; - size_t len = 0; - - memset(output_buf, 0, 16000); - -#if defined(MBEDTLS_PEM_WRITE_C) - if( opt.output_format == OUTPUT_FORMAT_PEM ) - { - if( ( ret = mbedtls_pk_write_pubkey_pem( key, output_buf, 16000 ) ) != 0 ) - return( ret ); - - len = strlen( (char *) output_buf ); - } - else -#endif - { - if( ( ret = mbedtls_pk_write_pubkey_der( key, output_buf, 16000 ) ) < 0 ) - return( ret ); - - len = ret; - c = output_buf + sizeof(output_buf) - len - 1; - } - - if( ( f = fopen( output_file, "w" ) ) == NULL ) - return( -1 ); - - if( fwrite( c, 1, len, f ) != len ) - { - fclose( f ); - return( -1 ); - } - - fclose( f ); - - return( 0 ); -} - -static int write_private_key( mbedtls_pk_context *key, const char *output_file ) -{ - int ret; - FILE *f; - unsigned char output_buf[16000]; - unsigned char *c = output_buf; - size_t len = 0; - - memset(output_buf, 0, 16000); - -#if defined(MBEDTLS_PEM_WRITE_C) - if( opt.output_format == OUTPUT_FORMAT_PEM ) - { - if( ( ret = mbedtls_pk_write_key_pem( key, output_buf, 16000 ) ) != 0 ) - return( ret ); - - len = strlen( (char *) output_buf ); - } - else -#endif - { - if( ( ret = mbedtls_pk_write_key_der( key, output_buf, 16000 ) ) < 0 ) - return( ret ); - - len = ret; - c = output_buf + sizeof(output_buf) - len - 1; - } - - if( ( f = fopen( output_file, "w" ) ) == NULL ) - return( -1 ); - - if( fwrite( c, 1, len, f ) != len ) - { - fclose( f ); - return( -1 ); - } - - fclose( f ); - - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0; - mbedtls_pk_context key; - char buf[1024]; - int i; - char *p, *q; - - /* - * Set to sane values - */ - mbedtls_pk_init( &key ); - memset( buf, 0, sizeof( buf ) ); - - if( argc == 0 ) - { - usage: - ret = 1; - mbedtls_printf( USAGE ); - goto exit; - } - - opt.mode = DFL_MODE; - opt.filename = DFL_FILENAME; - opt.output_mode = DFL_OUTPUT_MODE; - opt.output_file = DFL_OUTPUT_FILENAME; - opt.output_format = DFL_OUTPUT_FORMAT; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "mode" ) == 0 ) - { - if( strcmp( q, "private" ) == 0 ) - opt.mode = MODE_PRIVATE; - else if( strcmp( q, "public" ) == 0 ) - opt.mode = MODE_PUBLIC; - else - goto usage; - } - else if( strcmp( p, "output_mode" ) == 0 ) - { - if( strcmp( q, "private" ) == 0 ) - opt.output_mode = OUTPUT_MODE_PRIVATE; - else if( strcmp( q, "public" ) == 0 ) - opt.output_mode = OUTPUT_MODE_PUBLIC; - else - goto usage; - } - else if( strcmp( p, "output_format" ) == 0 ) - { -#if defined(MBEDTLS_PEM_WRITE_C) - if( strcmp( q, "pem" ) == 0 ) - opt.output_format = OUTPUT_FORMAT_PEM; - else -#endif - if( strcmp( q, "der" ) == 0 ) - opt.output_format = OUTPUT_FORMAT_DER; - else - goto usage; - } - else if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else if( strcmp( p, "output_file" ) == 0 ) - opt.output_file = q; - else - goto usage; - } - - if( opt.mode == MODE_NONE && opt.output_mode != OUTPUT_MODE_NONE ) - { - mbedtls_printf( "\nCannot output a key without reading one.\n"); - goto exit; - } - - if( opt.mode == MODE_PUBLIC && opt.output_mode == OUTPUT_MODE_PRIVATE ) - { - mbedtls_printf( "\nCannot output a private key from a public key.\n"); - goto exit; - } - - if( opt.mode == MODE_PRIVATE ) - { - /* - * 1.1. Load the key - */ - mbedtls_printf( "\n . Loading the private key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_keyfile( &key, opt.filename, NULL ); - - if( ret != 0 ) - { - mbedtls_strerror( ret, (char *) buf, sizeof(buf) ); - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned -0x%04x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2 Print the key - */ - mbedtls_printf( " . Key information ...\n" ); - -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_RSA ) - { - mbedtls_rsa_context *rsa = mbedtls_pk_rsa( key ); - mbedtls_mpi_write_file( "N: ", &rsa->N, 16, NULL ); - mbedtls_mpi_write_file( "E: ", &rsa->E, 16, NULL ); - mbedtls_mpi_write_file( "D: ", &rsa->D, 16, NULL ); - mbedtls_mpi_write_file( "P: ", &rsa->P, 16, NULL ); - mbedtls_mpi_write_file( "Q: ", &rsa->Q, 16, NULL ); - mbedtls_mpi_write_file( "DP: ", &rsa->DP, 16, NULL ); - mbedtls_mpi_write_file( "DQ: ", &rsa->DQ, 16, NULL ); - mbedtls_mpi_write_file( "QP: ", &rsa->QP, 16, NULL ); - } - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_ECKEY ) - { - mbedtls_ecp_keypair *ecp = mbedtls_pk_ec( key ); - mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); - mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); - mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); - mbedtls_mpi_write_file( "D : ", &ecp->d , 16, NULL ); - } - else -#endif - mbedtls_printf("key type not supported yet\n"); - - } - else if( opt.mode == MODE_PUBLIC ) - { - /* - * 1.1. Load the key - */ - mbedtls_printf( "\n . Loading the public key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_public_keyfile( &key, opt.filename ); - - if( ret != 0 ) - { - mbedtls_strerror( ret, (char *) buf, sizeof(buf) ); - mbedtls_printf( " failed\n ! mbedtls_pk_parse_public_key returned -0x%04x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2 Print the key - */ - mbedtls_printf( " . Key information ...\n" ); - -#if defined(MBEDTLS_RSA_C) - if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_RSA ) - { - mbedtls_rsa_context *rsa = mbedtls_pk_rsa( key ); - mbedtls_mpi_write_file( "N: ", &rsa->N, 16, NULL ); - mbedtls_mpi_write_file( "E: ", &rsa->E, 16, NULL ); - } - else -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_ECKEY ) - { - mbedtls_ecp_keypair *ecp = mbedtls_pk_ec( key ); - mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); - mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); - mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); - } - else -#endif - mbedtls_printf("key type not supported yet\n"); - } - else - goto usage; - - if( opt.output_mode == OUTPUT_MODE_PUBLIC ) - { - write_public_key( &key, opt.output_file ); - } - if( opt.output_mode == OUTPUT_MODE_PRIVATE ) - { - write_private_key( &key, opt.output_file ); - } - -exit: - - if( ret != 0 && ret != 1) - { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror( ret, buf, sizeof( buf ) ); - mbedtls_printf( " - %s\n", buf ); -#else - mbedtls_printf("\n"); -#endif - } - - mbedtls_pk_free( &key ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_PK_WRITE_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/mpi_demo.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/mpi_demo.c deleted file mode 100644 index afe8957e79..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/mpi_demo.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Simple MPI demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/bignum.h" - -#include -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -int main( void ) -{ - int ret; - mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; - - mbedtls_mpi_init( &E ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &N ); - mbedtls_mpi_init( &H ); mbedtls_mpi_init( &D ); mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); - mbedtls_mpi_init( &Z ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P, 10, "2789" ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &Q, 10, "3203" ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &E, 10, "257" ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &N, &P, &Q ) ); - - mbedtls_printf( "\n Public key:\n\n" ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " N = ", &N, 10, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " E = ", &E, 10, NULL ) ); - - mbedtls_printf( "\n Private key:\n\n" ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " P = ", &P, 10, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " Q = ", &Q, 10, NULL ) ); - -#if defined(MBEDTLS_GENPRIME) - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P, &P, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q, &Q, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P, &Q ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &D, &E, &H ) ); - - mbedtls_mpi_write_file( " D = E^-1 mod (P-1)*(Q-1) = ", - &D, 10, NULL ); -#else - mbedtls_printf("\nTest skipped (MBEDTLS_GENPRIME not defined).\n\n"); -#endif - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &X, 10, "55555" ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &Y, &X, &E, &N, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &Z, &Y, &D, &N, NULL ) ); - - mbedtls_printf( "\n RSA operation:\n\n" ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " X (plaintext) = ", &X, 10, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " Y (ciphertext) = X^E mod N = ", &Y, 10, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " Z (decrypted) = Y^D mod N = ", &Z, 10, NULL ) ); - mbedtls_printf( "\n" ); - -cleanup: - mbedtls_mpi_free( &E ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &N ); - mbedtls_mpi_free( &H ); mbedtls_mpi_free( &D ); mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); - mbedtls_mpi_free( &Z ); - - if( ret != 0 ) - { - mbedtls_printf( "\nAn error occurred.\n" ); - ret = 1; - } - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_decrypt.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_decrypt.c deleted file mode 100644 index 32fbc7545a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_decrypt.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Public key-based simple decryption program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_PK_PARSE_C) && \ - defined(MBEDTLS_FS_IO) && defined(MBEDTLS_ENTROPY_C) && \ - defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/error.h" -#include "mbedtls/pk.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#endif - - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_PK_PARSE_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or " - "MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret, c; - size_t i, olen = 0; - mbedtls_pk_context pk; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char result[1024]; - unsigned char buf[512]; - const char *pers = "mbedtls_pk_decrypt"; - ((void) argv); - - mbedtls_ctr_drbg_init( &ctr_drbg ); - memset(result, 0, sizeof( result ) ); - ret = 1; - - if( argc != 2 ) - { - mbedtls_printf( "usage: mbedtls_pk_decrypt \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( "\n . Reading private key from '%s'", argv[1] ); - fflush( stdout ); - - mbedtls_pk_init( &pk ); - - if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned -0x%04x\n", -ret ); - goto exit; - } - - /* - * Extract the RSA encrypted value from the text file - */ - ret = 1; - - if( ( f = fopen( "result-enc.txt", "rb" ) ) == NULL ) - { - mbedtls_printf( "\n ! Could not open %s\n\n", "result-enc.txt" ); - goto exit; - } - - i = 0; - - while( fscanf( f, "%02X", &c ) > 0 && - i < (int) sizeof( buf ) ) - buf[i++] = (unsigned char) c; - - fclose( f ); - - /* - * Decrypt the encrypted RSA data and print the result. - */ - mbedtls_printf( "\n . Decrypting the encrypted data" ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_decrypt( &pk, buf, i, result, &olen, sizeof(result), - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_decrypt returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf( "\n . OK\n\n" ); - - mbedtls_printf( "The decrypted result is: '%s'\n\n", result ); - - ret = 0; - -exit: - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(MBEDTLS_ERROR_C) - if( ret != 0 ) - { - mbedtls_strerror( ret, (char *) buf, sizeof(buf) ); - mbedtls_printf( " ! Last error was: %s\n", buf ); - } -#endif - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && - MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_encrypt.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_encrypt.c deleted file mode 100644 index 7ca9d5ad9b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_encrypt.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * RSA simple data encryption program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_PK_PARSE_C) && \ - defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_FS_IO) && \ - defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/error.h" -#include "mbedtls/pk.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_PK_PARSE_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret; - size_t i, olen = 0; - mbedtls_pk_context pk; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char input[1024]; - unsigned char buf[512]; - const char *pers = "mbedtls_pk_encrypt"; - - ret = 1; - mbedtls_ctr_drbg_init( &ctr_drbg ); - - if( argc != 3 ) - { - mbedtls_printf( "usage: mbedtls_pk_encrypt \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf( "\n . Reading public key from '%s'", argv[1] ); - fflush( stdout ); - - mbedtls_pk_init( &pk ); - - if( ( ret = mbedtls_pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_public_keyfile returned -0x%04x\n", -ret ); - goto exit; - } - - if( strlen( argv[2] ) > 100 ) - { - mbedtls_printf( " Input data larger than 100 characters.\n\n" ); - goto exit; - } - - memcpy( input, argv[2], strlen( argv[2] ) ); - - /* - * Calculate the RSA encryption of the hash. - */ - mbedtls_printf( "\n . Generating the encrypted value" ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_encrypt( &pk, input, strlen( argv[2] ), - buf, &olen, sizeof(buf), - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_encrypt returned -0x%04x\n", -ret ); - goto exit; - } - - /* - * Write the signature into result-enc.txt - */ - if( ( f = fopen( "result-enc.txt", "wb+" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not create %s\n\n", "result-enc.txt" ); - goto exit; - } - - for( i = 0; i < olen; i++ ) - mbedtls_fprintf( f, "%02X%s", buf[i], - ( i + 1 ) % 16 == 0 ? "\r\n" : " " ); - - fclose( f ); - - mbedtls_printf( "\n . Done (created \"%s\")\n\n", "result-enc.txt" ); - -exit: - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(MBEDTLS_ERROR_C) - if( ret != 0 ) - { - mbedtls_strerror( ret, (char *) buf, sizeof(buf) ); - mbedtls_printf( " ! Last error was: %s\n", buf ); - } -#endif - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_PK_PARSE_C && MBEDTLS_ENTROPY_C && - MBEDTLS_FS_IO && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_sign.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_sign.c deleted file mode 100644 index 322e8aff0c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_sign.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Public key-based signature creation program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_snprintf snprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_SHA256_C) || !defined(MBEDTLS_MD_C) || \ - !defined(MBEDTLS_PK_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_SHA256_C and/or MBEDTLS_MD_C and/or " - "MBEDTLS_PK_PARSE_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/error.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/md.h" -#include "mbedtls/pk.h" - -#include -#include - -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret = 1; - mbedtls_pk_context pk; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char hash[32]; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - char filename[512]; - const char *pers = "mbedtls_pk_sign"; - size_t olen = 0; - - mbedtls_entropy_init( &entropy ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - mbedtls_pk_init( &pk ); - - if( argc != 3 ) - { - mbedtls_printf( "usage: mbedtls_pk_sign \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf( "\n . Reading private key from '%s'", argv[1] ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not open '%s'\n", argv[1] ); - goto exit; - } - - /* - * Compute the SHA-256 hash of the input file, - * then calculate the signature of the hash. - */ - mbedtls_printf( "\n . Generating the SHA-256 signature" ); - fflush( stdout ); - - if( ( ret = mbedtls_md_file( - mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), - argv[2], hash ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); - goto exit; - } - - if( ( ret = mbedtls_pk_sign( &pk, MBEDTLS_MD_SHA256, hash, 0, buf, &olen, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_sign returned -0x%04x\n", -ret ); - goto exit; - } - - /* - * Write the signature into .sig - */ - mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[2] ); - - if( ( f = fopen( filename, "wb+" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not create %s\n\n", filename ); - goto exit; - } - - if( fwrite( buf, 1, olen, f ) != olen ) - { - mbedtls_printf( "failed\n ! fwrite failed\n\n" ); - goto exit; - } - - fclose( f ); - - mbedtls_printf( "\n . Done (created \"%s\")\n\n", filename ); - -exit: - mbedtls_pk_free( &pk ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(MBEDTLS_ERROR_C) - if( ret != 0 ) - { - mbedtls_strerror( ret, (char *) buf, sizeof(buf) ); - mbedtls_printf( " ! Last error was: %s\n", buf ); - } -#endif - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && - MBEDTLS_SHA256_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && - MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_verify.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_verify.c deleted file mode 100644 index d35d17f69d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/pk_verify.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Public key-based signature verification program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_snprintf snprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_MD_C) || \ - !defined(MBEDTLS_SHA256_C) || !defined(MBEDTLS_PK_PARSE_C) || \ - !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_MD_C and/or " - "MBEDTLS_SHA256_C and/or MBEDTLS_PK_PARSE_C and/or " - "MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/error.h" -#include "mbedtls/md.h" -#include "mbedtls/pk.h" - -#include -#include - -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret = 1; - size_t i; - mbedtls_pk_context pk; - unsigned char hash[32]; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - char filename[512]; - - mbedtls_pk_init( &pk ); - - if( argc != 3 ) - { - mbedtls_printf( "usage: mbedtls_pk_verify \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Reading public key from '%s'", argv[1] ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_public_keyfile returned -0x%04x\n", -ret ); - goto exit; - } - - /* - * Extract the signature from the file - */ - ret = 1; - mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[2] ); - - if( ( f = fopen( filename, "rb" ) ) == NULL ) - { - mbedtls_printf( "\n ! Could not open %s\n\n", filename ); - goto exit; - } - - - i = fread( buf, 1, sizeof(buf), f ); - - fclose( f ); - - /* - * Compute the SHA-256 hash of the input file and - * verify the signature - */ - mbedtls_printf( "\n . Verifying the SHA-256 signature" ); - fflush( stdout ); - - if( ( ret = mbedtls_md_file( - mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), - argv[2], hash ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); - goto exit; - } - - if( ( ret = mbedtls_pk_verify( &pk, MBEDTLS_MD_SHA256, hash, 0, - buf, i ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_verify returned -0x%04x\n", -ret ); - goto exit; - } - - mbedtls_printf( "\n . OK (the signature is valid)\n\n" ); - - ret = 0; - -exit: - mbedtls_pk_free( &pk ); - -#if defined(MBEDTLS_ERROR_C) - if( ret != 0 ) - { - mbedtls_strerror( ret, (char *) buf, sizeof(buf) ); - mbedtls_printf( " ! Last error was: %s\n", buf ); - } -#endif - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_SHA256_C && - MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_decrypt.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_decrypt.c deleted file mode 100644 index 94431e0cec..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_decrypt.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * RSA simple decryption program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_RSA_C) && \ - defined(MBEDTLS_FS_IO) && defined(MBEDTLS_ENTROPY_C) && \ - defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/rsa.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret, c; - size_t i; - mbedtls_rsa_context rsa; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char result[1024]; - unsigned char buf[512]; - const char *pers = "rsa_decrypt"; - ((void) argv); - - memset(result, 0, sizeof( result ) ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - ret = 1; - - if( argc != 1 ) - { - mbedtls_printf( "usage: rsa_decrypt\n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( "\n . Reading private key from rsa_priv.txt" ); - fflush( stdout ); - - if( ( f = fopen( "rsa_priv.txt", "rb" ) ) == NULL ) - { - mbedtls_printf( " failed\n ! Could not open rsa_priv.txt\n" \ - " ! Please run rsa_genkey first\n\n" ); - goto exit; - } - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_mpi_read_file( &rsa.N , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.E , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.D , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.P , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.Q , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.DP, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.DQ, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.QP, 16, f ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_file returned %d\n\n", ret ); - goto exit; - } - - rsa.len = ( mbedtls_mpi_bitlen( &rsa.N ) + 7 ) >> 3; - - fclose( f ); - - /* - * Extract the RSA encrypted value from the text file - */ - ret = 1; - - if( ( f = fopen( "result-enc.txt", "rb" ) ) == NULL ) - { - mbedtls_printf( "\n ! Could not open %s\n\n", "result-enc.txt" ); - goto exit; - } - - i = 0; - - while( fscanf( f, "%02X", &c ) > 0 && - i < (int) sizeof( buf ) ) - buf[i++] = (unsigned char) c; - - fclose( f ); - - if( i != rsa.len ) - { - mbedtls_printf( "\n ! Invalid RSA signature format\n\n" ); - goto exit; - } - - /* - * Decrypt the encrypted RSA data and print the result. - */ - mbedtls_printf( "\n . Decrypting the encrypted data" ); - fflush( stdout ); - - if( ( ret = mbedtls_rsa_pkcs1_decrypt( &rsa, mbedtls_ctr_drbg_random, &ctr_drbg, - MBEDTLS_RSA_PRIVATE, &i, buf, result, - 1024 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_pkcs1_decrypt returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( "\n . OK\n\n" ); - - mbedtls_printf( "The decrypted result is: '%s'\n\n", result ); - - ret = 0; - -exit: - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_encrypt.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_encrypt.c deleted file mode 100644 index 796343f1b3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_encrypt.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * RSA simple data encryption program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_RSA_C) && \ - defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_FS_IO) && \ - defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/rsa.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret; - size_t i; - mbedtls_rsa_context rsa; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char input[1024]; - unsigned char buf[512]; - const char *pers = "rsa_encrypt"; - - mbedtls_ctr_drbg_init( &ctr_drbg ); - ret = 1; - - if( argc != 2 ) - { - mbedtls_printf( "usage: rsa_encrypt \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( "\n . Reading public key from rsa_pub.txt" ); - fflush( stdout ); - - if( ( f = fopen( "rsa_pub.txt", "rb" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not open rsa_pub.txt\n" \ - " ! Please run rsa_genkey first\n\n" ); - goto exit; - } - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_mpi_read_file( &rsa.N, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.E, 16, f ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_file returned %d\n\n", ret ); - goto exit; - } - - rsa.len = ( mbedtls_mpi_bitlen( &rsa.N ) + 7 ) >> 3; - - fclose( f ); - - if( strlen( argv[1] ) > 100 ) - { - mbedtls_printf( " Input data larger than 100 characters.\n\n" ); - goto exit; - } - - memcpy( input, argv[1], strlen( argv[1] ) ); - - /* - * Calculate the RSA encryption of the hash. - */ - mbedtls_printf( "\n . Generating the RSA encrypted value" ); - fflush( stdout ); - - if( ( ret = mbedtls_rsa_pkcs1_encrypt( &rsa, mbedtls_ctr_drbg_random, &ctr_drbg, - MBEDTLS_RSA_PUBLIC, strlen( argv[1] ), - input, buf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_pkcs1_encrypt returned %d\n\n", ret ); - goto exit; - } - - /* - * Write the signature into result-enc.txt - */ - if( ( f = fopen( "result-enc.txt", "wb+" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not create %s\n\n", "result-enc.txt" ); - goto exit; - } - - for( i = 0; i < rsa.len; i++ ) - mbedtls_fprintf( f, "%02X%s", buf[i], - ( i + 1 ) % 16 == 0 ? "\r\n" : " " ); - - fclose( f ); - - mbedtls_printf( "\n . Done (created \"%s\")\n\n", "result-enc.txt" ); - -exit: - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_ENTROPY_C && - MBEDTLS_FS_IO && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_genkey.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_genkey.c deleted file mode 100644 index e199ad247d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_genkey.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Example RSA key generation program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_ENTROPY_C) && \ - defined(MBEDTLS_RSA_C) && defined(MBEDTLS_GENPRIME) && \ - defined(MBEDTLS_FS_IO) && defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/bignum.h" -#include "mbedtls/x509.h" -#include "mbedtls/rsa.h" - -#include -#include -#endif - -#define KEY_SIZE 2048 -#define EXPONENT 65537 - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_GENPRIME) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_RSA_C and/or MBEDTLS_GENPRIME and/or " - "MBEDTLS_FS_IO and/or MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else -int main( void ) -{ - int ret; - mbedtls_rsa_context rsa; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - FILE *fpub = NULL; - FILE *fpriv = NULL; - const char *pers = "rsa_genkey"; - - mbedtls_ctr_drbg_init( &ctr_drbg ); - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Generating the RSA key [ %d-bit ]...", KEY_SIZE ); - fflush( stdout ); - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_rsa_gen_key( &rsa, mbedtls_ctr_drbg_random, &ctr_drbg, KEY_SIZE, - EXPONENT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_gen_key returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Exporting the public key in rsa_pub.txt...." ); - fflush( stdout ); - - if( ( fpub = fopen( "rsa_pub.txt", "wb+" ) ) == NULL ) - { - mbedtls_printf( " failed\n ! could not open rsa_pub.txt for writing\n\n" ); - ret = 1; - goto exit; - } - - if( ( ret = mbedtls_mpi_write_file( "N = ", &rsa.N, 16, fpub ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "E = ", &rsa.E, 16, fpub ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_write_file returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n . Exporting the private key in rsa_priv.txt..." ); - fflush( stdout ); - - if( ( fpriv = fopen( "rsa_priv.txt", "wb+" ) ) == NULL ) - { - mbedtls_printf( " failed\n ! could not open rsa_priv.txt for writing\n" ); - ret = 1; - goto exit; - } - - if( ( ret = mbedtls_mpi_write_file( "N = " , &rsa.N , 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "E = " , &rsa.E , 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "D = " , &rsa.D , 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "P = " , &rsa.P , 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "Q = " , &rsa.Q , 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "DP = ", &rsa.DP, 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "DQ = ", &rsa.DQ, 16, fpriv ) ) != 0 || - ( ret = mbedtls_mpi_write_file( "QP = ", &rsa.QP, 16, fpriv ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_write_file returned %d\n\n", ret ); - goto exit; - } -/* - mbedtls_printf( " ok\n . Generating the certificate..." ); - - x509write_init_raw( &cert ); - x509write_add_pubkey( &cert, &rsa ); - x509write_add_subject( &cert, "CN='localhost'" ); - x509write_add_validity( &cert, "2007-09-06 17:00:32", - "2010-09-06 17:00:32" ); - x509write_create_selfsign( &cert, &rsa ); - x509write_crtfile( &cert, "cert.der", X509_OUTPUT_DER ); - x509write_crtfile( &cert, "cert.pem", X509_OUTPUT_PEM ); - x509write_free_raw( &cert ); -*/ - mbedtls_printf( " ok\n\n" ); - -exit: - - if( fpub != NULL ) - fclose( fpub ); - - if( fpriv != NULL ) - fclose( fpriv ); - - mbedtls_rsa_free( &rsa ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_RSA_C && - MBEDTLS_GENPRIME && MBEDTLS_FS_IO && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_priv.txt b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_priv.txt deleted file mode 100644 index 254fcf8522..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_priv.txt +++ /dev/null @@ -1,8 +0,0 @@ -N = A1D46FBA2318F8DCEF16C280948B1CF27966B9B47225ED2989F8D74B45BD36049C0AAB5AD0FF003553BA843C8E12782FC5873BB89A3DC84B883D25666CD22BF3ACD5B675969F8BEBFBCAC93FDD927C7442B178B10D1DFF9398E52316AAE0AF74E594650BDC3C670241D418684593CDA1A7B9DC4F20D2FDC6F66344074003E211 -E = 010001 -D = 589552BB4F2F023ADDDD5586D0C8FD857512D82080436678D07F984A29D892D31F1F7000FC5A39A0F73E27D885E47249A4148C8A5653EF69F91F8F736BA9F84841C2D99CD8C24DE8B72B5C9BE0EDBE23F93D731749FEA9CFB4A48DD2B7F35A2703E74AA2D4DB7DE9CEEA7D763AF0ADA7AC176C4E9A22C4CDA65CEC0C65964401 -P = CD083568D2D46C44C40C1FA0101AF2155E59C70B08423112AF0C1202514BBA5210765E29FF13036F56C7495894D80CF8C3BAEE2839BACBB0B86F6A2965F60DB1 -Q = CA0EEEA5E710E8E9811A6B846399420E3AE4A4C16647E426DDF8BBBCB11CD3F35CE2E4B6BCAD07AE2C0EC2ECBFCC601B207CDD77B5673E16382B1130BF465261 -DP = 0D0E21C07BF434B4A83B116472C2147A11D8EB98A33CFBBCF1D275EF19D815941622435AAF3839B6C432CA53CE9E772CFBE1923A937A766FD93E96E6EDEC1DF1 -DQ = 269CEBE6305DFEE4809377F078C814E37B45AE6677114DFC4F76F5097E1F3031D592567AC55B9B98213B40ECD54A4D2361F5FAACA1B1F51F71E4690893C4F081 -QP = 97AC5BB885ABCA314375E9E4DB1BA4B2218C90619F61BD474F5785075ECA81750A735199A8C191FE2D3355E7CF601A70E5CABDE0E02C2538BB9FB4871540B3C1 diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_pub.txt b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_pub.txt deleted file mode 100644 index 1e7ae0c9c9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_pub.txt +++ /dev/null @@ -1,2 +0,0 @@ -N = A1D46FBA2318F8DCEF16C280948B1CF27966B9B47225ED2989F8D74B45BD36049C0AAB5AD0FF003553BA843C8E12782FC5873BB89A3DC84B883D25666CD22BF3ACD5B675969F8BEBFBCAC93FDD927C7442B178B10D1DFF9398E52316AAE0AF74E594650BDC3C670241D418684593CDA1A7B9DC4F20D2FDC6F66344074003E211 -E = 010001 diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign.c deleted file mode 100644 index e897c65197..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * RSA/SHA-256 signature creation program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_SHA256_C) || !defined(MBEDTLS_MD_C) || \ - !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_MD_C and/or " - "MBEDTLS_SHA256_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/rsa.h" -#include "mbedtls/md.h" - -#include -#include - -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret; - size_t i; - mbedtls_rsa_context rsa; - unsigned char hash[32]; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - char filename[512]; - - ret = 1; - - if( argc != 2 ) - { - mbedtls_printf( "usage: rsa_sign \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Reading private key from rsa_priv.txt" ); - fflush( stdout ); - - if( ( f = fopen( "rsa_priv.txt", "rb" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not open rsa_priv.txt\n" \ - " ! Please run rsa_genkey first\n\n" ); - goto exit; - } - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_mpi_read_file( &rsa.N , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.E , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.D , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.P , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.Q , 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.DP, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.DQ, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.QP, 16, f ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_file returned %d\n\n", ret ); - goto exit; - } - - rsa.len = ( mbedtls_mpi_bitlen( &rsa.N ) + 7 ) >> 3; - - fclose( f ); - - mbedtls_printf( "\n . Checking the private key" ); - fflush( stdout ); - if( ( ret = mbedtls_rsa_check_privkey( &rsa ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_check_privkey failed with -0x%0x\n", -ret ); - goto exit; - } - - /* - * Compute the SHA-256 hash of the input file, - * then calculate the RSA signature of the hash. - */ - mbedtls_printf( "\n . Generating the RSA/SHA-256 signature" ); - fflush( stdout ); - - if( ( ret = mbedtls_md_file( - mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), - argv[1], hash ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); - goto exit; - } - - if( ( ret = mbedtls_rsa_pkcs1_sign( &rsa, NULL, NULL, MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_SHA256, - 20, hash, buf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_pkcs1_sign returned -0x%0x\n\n", -ret ); - goto exit; - } - - /* - * Write the signature into .sig - */ - mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[1] ); - - if( ( f = fopen( filename, "wb+" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not create %s\n\n", argv[1] ); - goto exit; - } - - for( i = 0; i < rsa.len; i++ ) - mbedtls_fprintf( f, "%02X%s", buf[i], - ( i + 1 ) % 16 == 0 ? "\r\n" : " " ); - - fclose( f ); - - mbedtls_printf( "\n . Done (created \"%s\")\n\n", filename ); - -exit: - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && - MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign_pss.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign_pss.c deleted file mode 100644 index c045a04c1c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_sign_pss.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * RSASSA-PSS/SHA-256 signature creation program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_snprintf snprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_MD_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_PK_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_MD_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_RSA_C and/or MBEDTLS_SHA256_C and/or " - "MBEDTLS_PK_PARSE_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/md.h" -#include "mbedtls/rsa.h" -#include "mbedtls/md.h" -#include "mbedtls/x509.h" - -#include -#include - -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret = 1; - mbedtls_pk_context pk; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - unsigned char hash[32]; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - char filename[512]; - const char *pers = "rsa_sign_pss"; - size_t olen = 0; - - mbedtls_entropy_init( &entropy ); - mbedtls_pk_init( &pk ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - if( argc != 3 ) - { - mbedtls_printf( "usage: rsa_sign_pss \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( "\n . Reading private key from '%s'", argv[1] ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); - mbedtls_printf( " ! mbedtls_pk_parse_public_keyfile returned %d\n\n", ret ); - goto exit; - } - - if( !mbedtls_pk_can_do( &pk, MBEDTLS_PK_RSA ) ) - { - ret = 1; - mbedtls_printf( " failed\n ! Key is not an RSA key\n" ); - goto exit; - } - - mbedtls_rsa_set_padding( mbedtls_pk_rsa( pk ), MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA256 ); - - /* - * Compute the SHA-256 hash of the input file, - * then calculate the RSA signature of the hash. - */ - mbedtls_printf( "\n . Generating the RSA/SHA-256 signature" ); - fflush( stdout ); - - if( ( ret = mbedtls_md_file( - mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), - argv[2], hash ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); - goto exit; - } - - if( ( ret = mbedtls_pk_sign( &pk, MBEDTLS_MD_SHA256, hash, 0, buf, &olen, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_sign returned %d\n\n", ret ); - goto exit; - } - - /* - * Write the signature into .sig - */ - mbedtls_snprintf( filename, 512, "%s.sig", argv[2] ); - - if( ( f = fopen( filename, "wb+" ) ) == NULL ) - { - ret = 1; - mbedtls_printf( " failed\n ! Could not create %s\n\n", filename ); - goto exit; - } - - if( fwrite( buf, 1, olen, f ) != olen ) - { - mbedtls_printf( "failed\n ! fwrite failed\n\n" ); - goto exit; - } - - fclose( f ); - - mbedtls_printf( "\n . Done (created \"%s\")\n\n", filename ); - -exit: - mbedtls_pk_free( &pk ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_RSA_C && - MBEDTLS_SHA256_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && - MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify.c deleted file mode 100644 index ade36dc830..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * RSA/SHA-256 signature verification program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_SHA256_C) || !defined(MBEDTLS_MD_C) || \ - !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_MD_C and/or " - "MBEDTLS_SHA256_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/rsa.h" -#include "mbedtls/md.h" - -#include -#include - -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret, c; - size_t i; - mbedtls_rsa_context rsa; - unsigned char hash[32]; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - char filename[512]; - - ret = 1; - if( argc != 2 ) - { - mbedtls_printf( "usage: rsa_verify \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Reading public key from rsa_pub.txt" ); - fflush( stdout ); - - if( ( f = fopen( "rsa_pub.txt", "rb" ) ) == NULL ) - { - mbedtls_printf( " failed\n ! Could not open rsa_pub.txt\n" \ - " ! Please run rsa_genkey first\n\n" ); - goto exit; - } - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( ( ret = mbedtls_mpi_read_file( &rsa.N, 16, f ) ) != 0 || - ( ret = mbedtls_mpi_read_file( &rsa.E, 16, f ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_read_file returned %d\n\n", ret ); - goto exit; - } - - rsa.len = ( mbedtls_mpi_bitlen( &rsa.N ) + 7 ) >> 3; - - fclose( f ); - - /* - * Extract the RSA signature from the text file - */ - ret = 1; - mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[1] ); - - if( ( f = fopen( filename, "rb" ) ) == NULL ) - { - mbedtls_printf( "\n ! Could not open %s\n\n", filename ); - goto exit; - } - - i = 0; - while( fscanf( f, "%02X", &c ) > 0 && - i < (int) sizeof( buf ) ) - buf[i++] = (unsigned char) c; - - fclose( f ); - - if( i != rsa.len ) - { - mbedtls_printf( "\n ! Invalid RSA signature format\n\n" ); - goto exit; - } - - /* - * Compute the SHA-256 hash of the input file and - * verify the signature - */ - mbedtls_printf( "\n . Verifying the RSA/SHA-256 signature" ); - fflush( stdout ); - - if( ( ret = mbedtls_md_file( - mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), - argv[1], hash ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); - goto exit; - } - - if( ( ret = mbedtls_rsa_pkcs1_verify( &rsa, NULL, NULL, MBEDTLS_RSA_PUBLIC, - MBEDTLS_MD_SHA256, 20, hash, buf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_pkcs1_verify returned -0x%0x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( "\n . OK (the signature is valid)\n\n" ); - - ret = 0; - -exit: - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && - MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify_pss.c b/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify_pss.c deleted file mode 100644 index 31b720f360..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/pkey/rsa_verify_pss.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * RSASSA-PSS/SHA-256 signature verification program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_snprintf snprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_MD_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_PK_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_MD_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_RSA_C and/or MBEDTLS_SHA256_C and/or " - "MBEDTLS_PK_PARSE_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/md.h" -#include "mbedtls/pem.h" -#include "mbedtls/pk.h" -#include "mbedtls/md.h" -#include "mbedtls/x509.h" - -#include -#include - -int main( int argc, char *argv[] ) -{ - FILE *f; - int ret = 1; - size_t i; - mbedtls_pk_context pk; - unsigned char hash[32]; - unsigned char buf[MBEDTLS_MPI_MAX_SIZE]; - char filename[512]; - - mbedtls_pk_init( &pk ); - - if( argc != 3 ) - { - mbedtls_printf( "usage: rsa_verify_pss \n" ); - -#if defined(_WIN32) - mbedtls_printf( "\n" ); -#endif - - goto exit; - } - - mbedtls_printf( "\n . Reading public key from '%s'", argv[1] ); - fflush( stdout ); - - if( ( ret = mbedtls_pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); - mbedtls_printf( " ! mbedtls_pk_parse_public_keyfile returned %d\n\n", ret ); - goto exit; - } - - if( !mbedtls_pk_can_do( &pk, MBEDTLS_PK_RSA ) ) - { - ret = 1; - mbedtls_printf( " failed\n ! Key is not an RSA key\n" ); - goto exit; - } - - mbedtls_rsa_set_padding( mbedtls_pk_rsa( pk ), MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA256 ); - - /* - * Extract the RSA signature from the file - */ - ret = 1; - mbedtls_snprintf( filename, 512, "%s.sig", argv[2] ); - - if( ( f = fopen( filename, "rb" ) ) == NULL ) - { - mbedtls_printf( "\n ! Could not open %s\n\n", filename ); - goto exit; - } - - - i = fread( buf, 1, MBEDTLS_MPI_MAX_SIZE, f ); - - fclose( f ); - - /* - * Compute the SHA-256 hash of the input file and - * verify the signature - */ - mbedtls_printf( "\n . Verifying the RSA/SHA-256 signature" ); - fflush( stdout ); - - if( ( ret = mbedtls_md_file( - mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ), - argv[2], hash ) ) != 0 ) - { - mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); - goto exit; - } - - if( ( ret = mbedtls_pk_verify( &pk, MBEDTLS_MD_SHA256, hash, 0, - buf, i ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_verify returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( "\n . OK (the signature is valid)\n\n" ); - - ret = 0; - -exit: - mbedtls_pk_free( &pk ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_SHA256_C && - MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/random/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/random/CMakeLists.txt deleted file mode 100644 index 30933d88dd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/random/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -add_executable(gen_random_havege gen_random_havege.c) -target_link_libraries(gen_random_havege mbedtls) - -add_executable(gen_random_ctr_drbg gen_random_ctr_drbg.c) -target_link_libraries(gen_random_ctr_drbg mbedtls) - -add_executable(gen_entropy gen_entropy.c) -target_link_libraries(gen_entropy mbedtls) - -install(TARGETS gen_random_havege gen_random_ctr_drbg gen_entropy - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/random/gen_entropy.c b/build/premake/premake5/contrib/mbedtls/programs/random/gen_entropy.c deleted file mode 100644 index 792d3818ab..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/random/gen_entropy.c +++ /dev/null @@ -1,96 +0,0 @@ -/** - * \brief Use and generate multiple entropies calls into a file - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/entropy.h" - -#include -#endif - -#if !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - int i, k, ret; - mbedtls_entropy_context entropy; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; - - if( argc < 2 ) - { - mbedtls_fprintf( stderr, "usage: %s \n", argv[0] ); - return( 1 ); - } - - if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) - { - mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); - return( 1 ); - } - - mbedtls_entropy_init( &entropy ); - - for( i = 0, k = 768; i < k; i++ ) - { - ret = mbedtls_entropy_func( &entropy, buf, sizeof( buf ) ); - if( ret != 0 ) - { - mbedtls_printf("failed!\n"); - goto cleanup; - } - - fwrite( buf, 1, sizeof( buf ), f ); - - mbedtls_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ - "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); - fflush( stdout ); - } - - ret = 0; - -cleanup: - mbedtls_printf( "\n" ); - - fclose( f ); - mbedtls_entropy_free( &entropy ); - - return( ret ); -} -#endif /* MBEDTLS_ENTROPY_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/random/gen_random_ctr_drbg.c b/build/premake/premake5/contrib/mbedtls/programs/random/gen_random_ctr_drbg.c deleted file mode 100644 index c76f99d09c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/random/gen_random_ctr_drbg.c +++ /dev/null @@ -1,130 +0,0 @@ -/** - * \brief Use and generate random data into a file via the CTR_DBRG based on AES - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) && defined(MBEDTLS_ENTROPY_C) && \ - defined(MBEDTLS_FS_IO) -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#endif - -#if !defined(MBEDTLS_CTR_DRBG_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_CTR_DRBG_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - int i, k, ret; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_entropy_context entropy; - unsigned char buf[1024]; - - mbedtls_ctr_drbg_init( &ctr_drbg ); - - if( argc < 2 ) - { - mbedtls_fprintf( stderr, "usage: %s \n", argv[0] ); - return( 1 ); - } - - if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) - { - mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); - return( 1 ); - } - - mbedtls_entropy_init( &entropy ); - ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, (const unsigned char *) "RANDOM_GEN", 10 ); - if( ret != 0 ) - { - mbedtls_printf( "failed in mbedtls_ctr_drbg_seed: %d\n", ret ); - goto cleanup; - } - mbedtls_ctr_drbg_set_prediction_resistance( &ctr_drbg, MBEDTLS_CTR_DRBG_PR_OFF ); - -#if defined(MBEDTLS_FS_IO) - ret = mbedtls_ctr_drbg_update_seed_file( &ctr_drbg, "seedfile" ); - - if( ret == MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR ) - { - mbedtls_printf( "Failed to open seedfile. Generating one.\n" ); - ret = mbedtls_ctr_drbg_write_seed_file( &ctr_drbg, "seedfile" ); - if( ret != 0 ) - { - mbedtls_printf( "failed in mbedtls_ctr_drbg_write_seed_file: %d\n", ret ); - goto cleanup; - } - } - else if( ret != 0 ) - { - mbedtls_printf( "failed in mbedtls_ctr_drbg_update_seed_file: %d\n", ret ); - goto cleanup; - } -#endif - - for( i = 0, k = 768; i < k; i++ ) - { - ret = mbedtls_ctr_drbg_random( &ctr_drbg, buf, sizeof( buf ) ); - if( ret != 0 ) - { - mbedtls_printf("failed!\n"); - goto cleanup; - } - - fwrite( buf, 1, sizeof( buf ), f ); - - mbedtls_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ - "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); - fflush( stdout ); - } - - ret = 0; - -cleanup: - mbedtls_printf("\n"); - - fclose( f ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - - return( ret ); -} -#endif /* MBEDTLS_CTR_DRBG_C && MBEDTLS_ENTROPY_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/random/gen_random_havege.c b/build/premake/premake5/contrib/mbedtls/programs/random/gen_random_havege.c deleted file mode 100644 index 6c31462654..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/random/gen_random_havege.c +++ /dev/null @@ -1,101 +0,0 @@ -/** - * \brief Generate random data into a file - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_HAVEGE_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/havege.h" - -#include -#include -#endif - -#if !defined(MBEDTLS_HAVEGE_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_HAVEGE_C not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - FILE *f; - time_t t; - int i, k, ret = 0; - mbedtls_havege_state hs; - unsigned char buf[1024]; - - if( argc < 2 ) - { - mbedtls_fprintf( stderr, "usage: %s \n", argv[0] ); - return( 1 ); - } - - if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) - { - mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); - return( 1 ); - } - - mbedtls_havege_init( &hs ); - - t = time( NULL ); - - for( i = 0, k = 768; i < k; i++ ) - { - if( mbedtls_havege_random( &hs, buf, sizeof( buf ) ) != 0 ) - { - mbedtls_printf( "Failed to get random from source.\n" ); - - ret = 1; - goto exit; - } - - fwrite( buf, sizeof( buf ), 1, f ); - - mbedtls_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ - "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); - fflush( stdout ); - } - - if( t == time( NULL ) ) - t--; - - mbedtls_printf(" \n "); - -exit: - mbedtls_havege_free( &hs ); - fclose( f ); - return( ret ); -} -#endif /* MBEDTLS_HAVEGE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/ssl/CMakeLists.txt deleted file mode 100644 index 1e65633412..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/CMakeLists.txt +++ /dev/null @@ -1,62 +0,0 @@ -set(THREADS_USE_PTHREADS_WIN32 true) -find_package(Threads) - -set(libs - mbedtls -) - -set(targets - dtls_client - dtls_server - ssl_client1 - ssl_client2 - ssl_server - ssl_fork_server - ssl_mail_client - mini_client -) - -if(USE_PKCS11_HELPER_LIBRARY) - set(libs ${libs} pkcs11-helper) -endif(USE_PKCS11_HELPER_LIBRARY) - -if(ENABLE_ZLIB_SUPPORT) - set(libs ${libs} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB_SUPPORT) - -add_executable(dtls_client dtls_client.c) -target_link_libraries(dtls_client ${libs}) - -add_executable(dtls_server dtls_server.c) -target_link_libraries(dtls_server ${libs}) - -add_executable(ssl_client1 ssl_client1.c) -target_link_libraries(ssl_client1 ${libs}) - -add_executable(ssl_client2 ssl_client2.c) -target_link_libraries(ssl_client2 ${libs}) - -add_executable(ssl_server ssl_server.c) -target_link_libraries(ssl_server ${libs}) - -add_executable(ssl_server2 ssl_server2.c) -target_link_libraries(ssl_server2 ${libs}) - -add_executable(ssl_fork_server ssl_fork_server.c) -target_link_libraries(ssl_fork_server ${libs}) - -add_executable(ssl_mail_client ssl_mail_client.c) -target_link_libraries(ssl_mail_client ${libs}) - -add_executable(mini_client mini_client.c) -target_link_libraries(mini_client ${libs}) - -if(THREADS_FOUND) - add_executable(ssl_pthread_server ssl_pthread_server.c) - target_link_libraries(ssl_pthread_server ${libs} ${CMAKE_THREAD_LIBS_INIT}) - set(targets ${targets} ssl_pthread_server) -endif(THREADS_FOUND) - -install(TARGETS ${targets} - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_client.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_client.c deleted file mode 100644 index b37eb838cd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_client.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Simple DTLS client demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_fprintf fprintf -#endif - -#if !defined(MBEDTLS_SSL_CLI_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_TIMING_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_CERTS_C) -int main( void ) -{ - mbedtls_printf( "MBEDTLS_SSL_CLI_C and/or MBEDTLS_SSL_PROTO_DTLS and/or " - "MBEDTLS_NET_C and/or MBEDTLS_TIMING_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C and/or " - "MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C not defined.\n" ); - return( 0 ); -} -#else - -#include - -#include "mbedtls/net.h" -#include "mbedtls/debug.h" -#include "mbedtls/ssl.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/error.h" -#include "mbedtls/certs.h" -#include "mbedtls/timing.h" - -#define SERVER_PORT "4433" -#define SERVER_NAME "localhost" -#define SERVER_ADDR "127.0.0.1" /* forces IPv4 */ -#define MESSAGE "Echo this" - -#define READ_TIMEOUT_MS 1000 -#define MAX_RETRY 5 - -#define DEBUG_LEVEL 0 - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -int main( int argc, char *argv[] ) -{ - int ret, len; - mbedtls_net_context server_fd; - uint32_t flags; - unsigned char buf[1024]; - const char *pers = "dtls_client"; - int retry_left = MAX_RETRY; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt cacert; - mbedtls_timing_delay_context timer; - - ((void) argc); - ((void) argv); - -#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold( DEBUG_LEVEL ); -#endif - - /* - * 0. Initialize the RNG and the session data - */ - mbedtls_net_init( &server_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_x509_crt_init( &cacert ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 0. Load certificates - */ - mbedtls_printf( " . Loading the CA root certificate ..." ); - fflush( stdout ); - - ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok (%d skipped)\n", ret ); - - /* - * 1. Start the connection - */ - mbedtls_printf( " . Connecting to udp/%s/%s...", SERVER_NAME, SERVER_PORT ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, SERVER_ADDR, - SERVER_PORT, MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Setup stuff - */ - mbedtls_printf( " . Setting up the DTLS structure..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_DATAGRAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - /* OPTIONAL is usually a bad choice for security, but makes interop easier - * in this simplified example, in which the ca chain is hardcoded. - * Production code should set a proper ca chain and use REQUIRED. */ - mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_OPTIONAL ); - mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_set_hostname( &ssl, SERVER_NAME ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &server_fd, - mbedtls_net_send, mbedtls_net_recv, mbedtls_net_recv_timeout ); - - mbedtls_ssl_set_timer_cb( &ssl, &timer, mbedtls_timing_set_delay, - mbedtls_timing_get_delay ); - - mbedtls_printf( " ok\n" ); - - /* - * 4. Handshake - */ - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - do ret = mbedtls_ssl_handshake( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 5. Verify the server certificate - */ - mbedtls_printf( " . Verifying peer X.509 certificate..." ); - - /* In real life, we would have used MBEDTLS_SSL_VERIFY_REQUIRED so that the - * handshake would not succeed if the peer's cert is bad. Even if we used - * MBEDTLS_SSL_VERIFY_OPTIONAL, we would bail out here if ret != 0 */ - if( ( flags = mbedtls_ssl_get_verify_result( &ssl ) ) != 0 ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - mbedtls_printf( " ok\n" ); - - /* - * 6. Write the echo request - */ -send_request: - mbedtls_printf( " > Write to server:" ); - fflush( stdout ); - - len = sizeof( MESSAGE ) - 1; - - do ret = mbedtls_ssl_write( &ssl, (unsigned char *) MESSAGE, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto exit; - } - - len = ret; - mbedtls_printf( " %d bytes written\n\n%s\n\n", len, MESSAGE ); - - /* - * 7. Read the echo response - */ - mbedtls_printf( " < Read from server:" ); - fflush( stdout ); - - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - - do ret = mbedtls_ssl_read( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_TIMEOUT: - mbedtls_printf( " timeout\n\n" ); - if( retry_left-- > 0 ) - goto send_request; - goto exit; - - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - ret = 0; - goto close_notify; - - default: - mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n\n", -ret ); - goto exit; - } - } - - len = ret; - mbedtls_printf( " %d bytes read\n\n%s\n\n", len, buf ); - - /* - * 8. Done, cleanly close the connection - */ -close_notify: - mbedtls_printf( " . Closing the connection..." ); - - /* No error checking, the connection might be closed already */ - do ret = mbedtls_ssl_close_notify( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - ret = 0; - - mbedtls_printf( " done\n" ); - - /* - * 9. Final clean-ups and exit - */ -exit: - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf( "Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &server_fd ); - - mbedtls_x509_crt_free( &cacert ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - /* Shell can not handle large exit numbers -> 1 for errors */ - if( ret < 0 ) - ret = 1; - - return( ret ); -} -#endif /* MBEDTLS_SSL_CLI_C && MBEDTLS_SSL_PROTO_DTLS && MBEDTLS_NET_C && - MBEDTLD_TIMING_C && MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C && - MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_RSA_C && MBEDTLS_CERTS_C && - MBEDTLS_PEM_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_server.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_server.c deleted file mode 100644 index df0fc780a6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/dtls_server.c +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Simple DTLS server demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_fprintf fprintf -#endif - -#if !defined(MBEDTLS_SSL_SRV_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \ - !defined(MBEDTLS_SSL_COOKIE_C) || !defined(MBEDTLS_NET_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_CERTS_C) || !defined(MBEDTLS_PEM_PARSE_C) || \ - !defined(MBEDTLS_TIMING_C) - -int main( void ) -{ - printf( "MBEDTLS_SSL_SRV_C and/or MBEDTLS_SSL_PROTO_DTLS and/or " - "MBEDTLS_SSL_COOKIE_C and/or MBEDTLS_NET_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C and/or " - "MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CERTS_C and/or MBEDTLS_PEM_PARSE_C and/or " - "MBEDTLS_TIMING_C not defined.\n" ); - return( 0 ); -} -#else - -#if defined(_WIN32) -#include -#endif - -#include -#include -#include - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" -#include "mbedtls/ssl.h" -#include "mbedtls/ssl_cookie.h" -#include "mbedtls/net.h" -#include "mbedtls/error.h" -#include "mbedtls/debug.h" -#include "mbedtls/timing.h" - -#if defined(MBEDTLS_SSL_CACHE_C) -#include "mbedtls/ssl_cache.h" -#endif - -#define READ_TIMEOUT_MS 10000 /* 5 seconds */ -#define DEBUG_LEVEL 0 - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -int main( void ) -{ - int ret, len; - mbedtls_net_context listen_fd, client_fd; - unsigned char buf[1024]; - const char *pers = "dtls_server"; - unsigned char client_ip[16] = { 0 }; - size_t cliip_len; - mbedtls_ssl_cookie_ctx cookie_ctx; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt srvcert; - mbedtls_pk_context pkey; - mbedtls_timing_delay_context timer; -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_context cache; -#endif - - mbedtls_net_init( &listen_fd ); - mbedtls_net_init( &client_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_ssl_cookie_init( &cookie_ctx ); -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_init( &cache ); -#endif - mbedtls_x509_crt_init( &srvcert ); - mbedtls_pk_init( &pkey ); - mbedtls_entropy_init( &entropy ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - -#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold( DEBUG_LEVEL ); -#endif - - /* - * 1. Load the certificates and private RSA key - */ - printf( "\n . Loading the server cert. and key..." ); - fflush( stdout ); - - /* - * This demonstration program uses embedded test certificates. - * Instead, you may want to use mbedtls_x509_crt_parse_file() to read the - * server and CA certificates, as well as mbedtls_pk_parse_keyfile(). - */ - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_srv_crt, - mbedtls_test_srv_crt_len ); - if( ret != 0 ) - { - printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); - if( ret != 0 ) - { - printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_srv_key, - mbedtls_test_srv_key_len, NULL, 0 ); - if( ret != 0 ) - { - printf( " failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret ); - goto exit; - } - - printf( " ok\n" ); - - /* - * 2. Setup the "listening" UDP socket - */ - printf( " . Bind on udp/*/4433 ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "4433", MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - printf( " failed\n ! mbedtls_net_bind returned %d\n\n", ret ); - goto exit; - } - - printf( " ok\n" ); - - /* - * 3. Seed the RNG - */ - printf( " . Seeding the random number generator..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - printf( " ok\n" ); - - /* - * 4. Setup stuff - */ - printf( " . Setting up the DTLS data..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_SERVER, - MBEDTLS_SSL_TRANSPORT_DATAGRAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_conf_session_cache( &conf, &cache, - mbedtls_ssl_cache_get, - mbedtls_ssl_cache_set ); -#endif - - mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL ); - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 ) - { - printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_cookie_setup( &cookie_ctx, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - printf( " failed\n ! mbedtls_ssl_cookie_setup returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_conf_dtls_cookies( &conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, - &cookie_ctx ); - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_set_timer_cb( &ssl, &timer, mbedtls_timing_set_delay, - mbedtls_timing_get_delay ); - - printf( " ok\n" ); - -reset: -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - printf("Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &client_fd ); - - mbedtls_ssl_session_reset( &ssl ); - - /* - * 3. Wait until a client connects - */ - printf( " . Waiting for a remote connection ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - client_ip, sizeof( client_ip ), &cliip_len ) ) != 0 ) - { - printf( " failed\n ! mbedtls_net_accept returned %d\n\n", ret ); - goto exit; - } - - /* For HelloVerifyRequest cookies */ - if( ( ret = mbedtls_ssl_set_client_transport_id( &ssl, - client_ip, cliip_len ) ) != 0 ) - { - printf( " failed\n ! " - "mbedtls_ssl_set_client_transport_id() returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &client_fd, - mbedtls_net_send, mbedtls_net_recv, mbedtls_net_recv_timeout ); - - printf( " ok\n" ); - - /* - * 5. Handshake - */ - printf( " . Performing the DTLS handshake..." ); - fflush( stdout ); - - do ret = mbedtls_ssl_handshake( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED ) - { - printf( " hello verification requested\n" ); - ret = 0; - goto reset; - } - else if( ret != 0 ) - { - printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", -ret ); - goto reset; - } - - printf( " ok\n" ); - - /* - * 6. Read the echo Request - */ - printf( " < Read from client:" ); - fflush( stdout ); - - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - - do ret = mbedtls_ssl_read( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_TIMEOUT: - printf( " timeout\n\n" ); - goto reset; - - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - printf( " connection was closed gracefully\n" ); - ret = 0; - goto close_notify; - - default: - printf( " mbedtls_ssl_read returned -0x%x\n\n", -ret ); - goto reset; - } - } - - len = ret; - printf( " %d bytes read\n\n%s\n\n", len, buf ); - - /* - * 7. Write the 200 Response - */ - printf( " > Write to client:" ); - fflush( stdout ); - - do ret = mbedtls_ssl_write( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret < 0 ) - { - printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto exit; - } - - len = ret; - printf( " %d bytes written\n\n%s\n\n", len, buf ); - - /* - * 8. Done, cleanly close the connection - */ -close_notify: - printf( " . Closing the connection..." ); - - /* No error checking, the connection might be closed already */ - do ret = mbedtls_ssl_close_notify( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - ret = 0; - - printf( " done\n" ); - - goto reset; - - /* - * Final clean-ups and exit - */ -exit: - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - printf( "Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &client_fd ); - mbedtls_net_free( &listen_fd ); - - mbedtls_x509_crt_free( &srvcert ); - mbedtls_pk_free( &pkey ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ssl_cookie_free( &cookie_ctx ); -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_free( &cache ); -#endif - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - /* Shell can not handle large exit numbers -> 1 for errors */ - if( ret < 0 ) - ret = 1; - - return( ret ); -} -#endif /* MBEDTLS_SSL_SRV_C && MBEDTLS_SSL_PROTO_DTLS && - MBEDTLS_SSL_COOKIE_C && MBEDTLS_NET_C && MBEDTLS_ENTROPY_C && - MBEDTLS_CTR_DRBG_C && MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_RSA_C - && MBEDTLS_CERTS_C && MBEDTLS_PEM_PARSE_C && MBEDTLS_TIMING_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/mini_client.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/mini_client.c deleted file mode 100644 index d61312425f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/mini_client.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Minimal SSL client, used for memory measurements. - * (meant to be used with config-suite-b.h or config-ccm-psk-tls1_2.h) - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -/* - * We're creating and connecting the socket "manually" rather than using the - * NET module, in order to avoid the overhead of getaddrinfo() which tends to - * dominate memory usage in small configurations. For the sake of simplicity, - * only a Unix version is implemented. - * - * Warning: we are breaking some of the abtractions from the NET layer here. - * This is not a good example for general use. This programs has the specific - * goal of minimizing use of the libc functions on full-blown OSes. - */ -#if defined(unix) || defined(__unix__) || defined(__unix) -#define UNIX -#endif - -#if !defined(MBEDTLS_CTR_DRBG_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_SSL_CLI_C) || \ - !defined(UNIX) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif -int main( void ) -{ - mbedtls_printf( "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_SSL_CLI_C and/or UNIX " - "not defined.\n"); - return( 0 ); -} -#else - -#include - -#include "mbedtls/net.h" -#include "mbedtls/ssl.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include -#include - -/* - * Hardcoded values for server host and port - */ -#define PORT_BE 0x1151 /* 4433 */ -#define PORT_LE 0x5111 -#define ADDR_BE 0x7f000001 /* 127.0.0.1 */ -#define ADDR_LE 0x0100007f -#define HOSTNAME "localhost" /* for cert verification if enabled */ - -#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n" - -const char *pers = "mini_client"; - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -const unsigned char psk[] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f -}; -const char psk_id[] = "Client_identity"; -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/* This is tests/data_files/test-ca2.crt, a CA using EC secp384r1 */ -const unsigned char ca_cert[] = { - 0x30, 0x82, 0x02, 0x52, 0x30, 0x82, 0x01, 0xd7, 0xa0, 0x03, 0x02, 0x01, - 0x02, 0x02, 0x09, 0x00, 0xc1, 0x43, 0xe2, 0x7e, 0x62, 0x43, 0xcc, 0xe8, - 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, - 0x30, 0x3e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, - 0x02, 0x4e, 0x4c, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x0a, - 0x13, 0x08, 0x50, 0x6f, 0x6c, 0x61, 0x72, 0x53, 0x53, 0x4c, 0x31, 0x1c, - 0x30, 0x1a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x13, 0x50, 0x6f, 0x6c, - 0x61, 0x72, 0x73, 0x73, 0x6c, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x45, - 0x43, 0x20, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x33, 0x30, 0x39, - 0x32, 0x34, 0x31, 0x35, 0x34, 0x39, 0x34, 0x38, 0x5a, 0x17, 0x0d, 0x32, - 0x33, 0x30, 0x39, 0x32, 0x32, 0x31, 0x35, 0x34, 0x39, 0x34, 0x38, 0x5a, - 0x30, 0x3e, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, - 0x02, 0x4e, 0x4c, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x0a, - 0x13, 0x08, 0x50, 0x6f, 0x6c, 0x61, 0x72, 0x53, 0x53, 0x4c, 0x31, 0x1c, - 0x30, 0x1a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x13, 0x50, 0x6f, 0x6c, - 0x61, 0x72, 0x73, 0x73, 0x6c, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x45, - 0x43, 0x20, 0x43, 0x41, 0x30, 0x76, 0x30, 0x10, 0x06, 0x07, 0x2a, 0x86, - 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x05, 0x2b, 0x81, 0x04, 0x00, 0x22, - 0x03, 0x62, 0x00, 0x04, 0xc3, 0xda, 0x2b, 0x34, 0x41, 0x37, 0x58, 0x2f, - 0x87, 0x56, 0xfe, 0xfc, 0x89, 0xba, 0x29, 0x43, 0x4b, 0x4e, 0xe0, 0x6e, - 0xc3, 0x0e, 0x57, 0x53, 0x33, 0x39, 0x58, 0xd4, 0x52, 0xb4, 0x91, 0x95, - 0x39, 0x0b, 0x23, 0xdf, 0x5f, 0x17, 0x24, 0x62, 0x48, 0xfc, 0x1a, 0x95, - 0x29, 0xce, 0x2c, 0x2d, 0x87, 0xc2, 0x88, 0x52, 0x80, 0xaf, 0xd6, 0x6a, - 0xab, 0x21, 0xdd, 0xb8, 0xd3, 0x1c, 0x6e, 0x58, 0xb8, 0xca, 0xe8, 0xb2, - 0x69, 0x8e, 0xf3, 0x41, 0xad, 0x29, 0xc3, 0xb4, 0x5f, 0x75, 0xa7, 0x47, - 0x6f, 0xd5, 0x19, 0x29, 0x55, 0x69, 0x9a, 0x53, 0x3b, 0x20, 0xb4, 0x66, - 0x16, 0x60, 0x33, 0x1e, 0xa3, 0x81, 0xa0, 0x30, 0x81, 0x9d, 0x30, 0x1d, - 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x9d, 0x6d, 0x20, - 0x24, 0x49, 0x01, 0x3f, 0x2b, 0xcb, 0x78, 0xb5, 0x19, 0xbc, 0x7e, 0x24, - 0xc9, 0xdb, 0xfb, 0x36, 0x7c, 0x30, 0x6e, 0x06, 0x03, 0x55, 0x1d, 0x23, - 0x04, 0x67, 0x30, 0x65, 0x80, 0x14, 0x9d, 0x6d, 0x20, 0x24, 0x49, 0x01, - 0x3f, 0x2b, 0xcb, 0x78, 0xb5, 0x19, 0xbc, 0x7e, 0x24, 0xc9, 0xdb, 0xfb, - 0x36, 0x7c, 0xa1, 0x42, 0xa4, 0x40, 0x30, 0x3e, 0x31, 0x0b, 0x30, 0x09, - 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x4e, 0x4c, 0x31, 0x11, 0x30, - 0x0f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x08, 0x50, 0x6f, 0x6c, 0x61, - 0x72, 0x53, 0x53, 0x4c, 0x31, 0x1c, 0x30, 0x1a, 0x06, 0x03, 0x55, 0x04, - 0x03, 0x13, 0x13, 0x50, 0x6f, 0x6c, 0x61, 0x72, 0x73, 0x73, 0x6c, 0x20, - 0x54, 0x65, 0x73, 0x74, 0x20, 0x45, 0x43, 0x20, 0x43, 0x41, 0x82, 0x09, - 0x00, 0xc1, 0x43, 0xe2, 0x7e, 0x62, 0x43, 0xcc, 0xe8, 0x30, 0x0c, 0x06, - 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, - 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, - 0x69, 0x00, 0x30, 0x66, 0x02, 0x31, 0x00, 0xc3, 0xb4, 0x62, 0x73, 0x56, - 0x28, 0x95, 0x00, 0x7d, 0x78, 0x12, 0x26, 0xd2, 0x71, 0x7b, 0x19, 0xf8, - 0x8a, 0x98, 0x3e, 0x92, 0xfe, 0x33, 0x9e, 0xe4, 0x79, 0xd2, 0xfe, 0x7a, - 0xb7, 0x87, 0x74, 0x3c, 0x2b, 0xb8, 0xd7, 0x69, 0x94, 0x0b, 0xa3, 0x67, - 0x77, 0xb8, 0xb3, 0xbe, 0xd1, 0x36, 0x32, 0x02, 0x31, 0x00, 0xfd, 0x67, - 0x9c, 0x94, 0x23, 0x67, 0xc0, 0x56, 0xba, 0x4b, 0x33, 0x15, 0x00, 0xc6, - 0xe3, 0xcc, 0x31, 0x08, 0x2c, 0x9c, 0x8b, 0xda, 0xa9, 0x75, 0x23, 0x2f, - 0xb8, 0x28, 0xe7, 0xf2, 0x9c, 0x14, 0x3a, 0x40, 0x01, 0x5c, 0xaf, 0x0c, - 0xb2, 0xcf, 0x74, 0x7f, 0x30, 0x9f, 0x08, 0x43, 0xad, 0x20, -}; -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -enum exit_codes -{ - exit_ok = 0, - ctr_drbg_seed_failed, - ssl_config_defaults_failed, - ssl_setup_failed, - hostname_failed, - socket_failed, - connect_failed, - x509_crt_parse_failed, - ssl_handshake_failed, - ssl_write_failed, -}; - -int main( void ) -{ - int ret = exit_ok; - mbedtls_net_context server_fd; - struct sockaddr_in addr; -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt ca; -#endif - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_ctr_drbg_init( &ctr_drbg ); - - /* - * 0. Initialize and setup stuff - */ - mbedtls_net_init( &server_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt_init( &ca ); -#endif - - mbedtls_entropy_init( &entropy ); - if( mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, strlen( pers ) ) != 0 ) - { - ret = ctr_drbg_seed_failed; - goto exit; - } - - if( mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) != 0 ) - { - ret = ssl_config_defaults_failed; - goto exit; - } - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - mbedtls_ssl_conf_psk( &conf, psk, sizeof( psk ), - (const unsigned char *) psk_id, sizeof( psk_id ) - 1 ); -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( mbedtls_x509_crt_parse_der( &ca, ca_cert, sizeof( ca_cert ) ) != 0 ) - { - ret = x509_crt_parse_failed; - goto exit; - } - - mbedtls_ssl_conf_ca_chain( &conf, &ca, NULL ); - mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_REQUIRED ); -#endif - - if( mbedtls_ssl_setup( &ssl, &conf ) != 0 ) - { - ret = ssl_setup_failed; - goto exit; - } - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( mbedtls_ssl_set_hostname( &ssl, HOSTNAME ) != 0 ) - { - ret = hostname_failed; - goto exit; - } -#endif - - /* - * 1. Start the connection - */ - memset( &addr, 0, sizeof( addr ) ); - addr.sin_family = AF_INET; - - ret = 1; /* for endianness detection */ - addr.sin_port = *((char *) &ret) == ret ? PORT_LE : PORT_BE; - addr.sin_addr.s_addr = *((char *) &ret) == ret ? ADDR_LE : ADDR_BE; - ret = 0; - - if( ( server_fd.fd = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 ) - { - ret = socket_failed; - goto exit; - } - - if( connect( server_fd.fd, - (const struct sockaddr *) &addr, sizeof( addr ) ) < 0 ) - { - ret = connect_failed; - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - if( mbedtls_ssl_handshake( &ssl ) != 0 ) - { - ret = ssl_handshake_failed; - goto exit; - } - - /* - * 2. Write the GET request and close the connection - */ - if( mbedtls_ssl_write( &ssl, (const unsigned char *) GET_REQUEST, - sizeof( GET_REQUEST ) - 1 ) <= 0 ) - { - ret = ssl_write_failed; - goto exit; - } - - mbedtls_ssl_close_notify( &ssl ); - -exit: - mbedtls_net_free( &server_fd ); - - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt_free( &ca ); -#endif - - return( ret ); -} -#endif diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client1.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client1.c deleted file mode 100644 index 1aeddf71c4..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client1.c +++ /dev/null @@ -1,310 +0,0 @@ -/* - * SSL client demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_CLI_C) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_CERTS_C) || !defined(MBEDTLS_PEM_PARSE_C) || \ - !defined(MBEDTLS_CTR_DRBG_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_CLI_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C " - "not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/net.h" -#include "mbedtls/debug.h" -#include "mbedtls/ssl.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/error.h" -#include "mbedtls/certs.h" - -#include - -#define SERVER_PORT "4433" -#define SERVER_NAME "localhost" -#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n" - -#define DEBUG_LEVEL 1 - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -int main( void ) -{ - int ret, len; - mbedtls_net_context server_fd; - uint32_t flags; - unsigned char buf[1024]; - const char *pers = "ssl_client1"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt cacert; - -#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold( DEBUG_LEVEL ); -#endif - - /* - * 0. Initialize the RNG and the session data - */ - mbedtls_net_init( &server_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_x509_crt_init( &cacert ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 0. Initialize certificates - */ - mbedtls_printf( " . Loading the CA root certificate ..." ); - fflush( stdout ); - - ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok (%d skipped)\n", ret ); - - /* - * 1. Start the connection - */ - mbedtls_printf( " . Connecting to tcp/%s/%s...", SERVER_NAME, SERVER_PORT ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, SERVER_NAME, - SERVER_PORT, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Setup stuff - */ - mbedtls_printf( " . Setting up the SSL/TLS structure..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* OPTIONAL is not optimal for security, - * but makes interop easier in this simplified example */ - mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_OPTIONAL ); - mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_set_hostname( &ssl, "mbed TLS Server 1" ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - /* - * 4. Handshake - */ - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", -ret ); - goto exit; - } - } - - mbedtls_printf( " ok\n" ); - - /* - * 5. Verify the server certificate - */ - mbedtls_printf( " . Verifying peer X.509 certificate..." ); - - /* In real life, we probably want to bail out when ret != 0 */ - if( ( flags = mbedtls_ssl_get_verify_result( &ssl ) ) != 0 ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - mbedtls_printf( " ok\n" ); - - /* - * 3. Write the GET request - */ - mbedtls_printf( " > Write to server:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, GET_REQUEST ); - - while( ( ret = mbedtls_ssl_write( &ssl, buf, len ) ) <= 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto exit; - } - } - - len = ret; - mbedtls_printf( " %d bytes written\n\n%s", len, (char *) buf ); - - /* - * 7. Read the HTTP response - */ - mbedtls_printf( " < Read from server:" ); - fflush( stdout ); - - do - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - ret = mbedtls_ssl_read( &ssl, buf, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY ) - break; - - if( ret < 0 ) - { - mbedtls_printf( "failed\n ! mbedtls_ssl_read returned %d\n\n", ret ); - break; - } - - if( ret == 0 ) - { - mbedtls_printf( "\n\nEOF\n\n" ); - break; - } - - len = ret; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - } - while( 1 ); - - mbedtls_ssl_close_notify( &ssl ); - -exit: - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf("Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &server_fd ); - - mbedtls_x509_crt_free( &cacert ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && - MBEDTLS_SSL_CLI_C && MBEDTLS_NET_C && MBEDTLS_RSA_C && - MBEDTLS_CERTS_C && MBEDTLS_PEM_PARSE_C && MBEDTLS_CTR_DRBG_C && - MBEDTLS_X509_CRT_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client2.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client2.c deleted file mode 100644 index 559e5028d8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_client2.c +++ /dev/null @@ -1,1670 +0,0 @@ -/* - * SSL client with certificate authentication - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_fprintf fprintf -#define mbedtls_snprintf snprintf -#endif - -#if !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_CLI_C) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_CLI_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_CTR_DRBG_C and/or not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/net.h" -#include "mbedtls/ssl.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" -#include "mbedtls/error.h" -#include "mbedtls/debug.h" -#include "mbedtls/timing.h" - -#include -#include -#include - -#define DFL_SERVER_NAME "localhost" -#define DFL_SERVER_ADDR NULL -#define DFL_SERVER_PORT "4433" -#define DFL_REQUEST_PAGE "/" -#define DFL_REQUEST_SIZE -1 -#define DFL_DEBUG_LEVEL 0 -#define DFL_NBIO 0 -#define DFL_READ_TIMEOUT 0 -#define DFL_MAX_RESEND 0 -#define DFL_CA_FILE "" -#define DFL_CA_PATH "" -#define DFL_CRT_FILE "" -#define DFL_KEY_FILE "" -#define DFL_PSK "" -#define DFL_PSK_IDENTITY "Client_identity" -#define DFL_ECJPAKE_PW NULL -#define DFL_FORCE_CIPHER 0 -#define DFL_RENEGOTIATION MBEDTLS_SSL_RENEGOTIATION_DISABLED -#define DFL_ALLOW_LEGACY -2 -#define DFL_RENEGOTIATE 0 -#define DFL_EXCHANGES 1 -#define DFL_MIN_VERSION -1 -#define DFL_MAX_VERSION -1 -#define DFL_ARC4 -1 -#define DFL_AUTH_MODE -1 -#define DFL_MFL_CODE MBEDTLS_SSL_MAX_FRAG_LEN_NONE -#define DFL_TRUNC_HMAC -1 -#define DFL_RECSPLIT -1 -#define DFL_DHMLEN -1 -#define DFL_RECONNECT 0 -#define DFL_RECO_DELAY 0 -#define DFL_RECONNECT_HARD 0 -#define DFL_TICKETS MBEDTLS_SSL_SESSION_TICKETS_ENABLED -#define DFL_ALPN_STRING NULL -#define DFL_TRANSPORT MBEDTLS_SSL_TRANSPORT_STREAM -#define DFL_HS_TO_MIN 0 -#define DFL_HS_TO_MAX 0 -#define DFL_FALLBACK -1 -#define DFL_EXTENDED_MS -1 -#define DFL_ETM -1 - -#define GET_REQUEST "GET %s HTTP/1.0\r\nExtra-header: " -#define GET_REQUEST_END "\r\n\r\n" - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -#if defined(MBEDTLS_FS_IO) -#define USAGE_IO \ - " ca_file=%%s The single file containing the top-level CA(s) you fully trust\n" \ - " default: \"\" (pre-loaded)\n" \ - " ca_path=%%s The path containing the top-level CA(s) you fully trust\n" \ - " default: \"\" (pre-loaded) (overrides ca_file)\n" \ - " crt_file=%%s Your own cert and chain (in bottom to top order, top may be omitted)\n" \ - " default: \"\" (pre-loaded)\n" \ - " key_file=%%s default: \"\" (pre-loaded)\n" -#else -#define USAGE_IO \ - " No file operations available (MBEDTLS_FS_IO not defined)\n" -#endif /* MBEDTLS_FS_IO */ -#else -#define USAGE_IO "" -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -#define USAGE_PSK \ - " psk=%%s default: \"\" (in hex, without 0x)\n" \ - " psk_identity=%%s default: \"Client_identity\"\n" -#else -#define USAGE_PSK "" -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -#define USAGE_TICKETS \ - " tickets=%%d default: 1 (enabled)\n" -#else -#define USAGE_TICKETS "" -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -#define USAGE_TRUNC_HMAC \ - " trunc_hmac=%%d default: library default\n" -#else -#define USAGE_TRUNC_HMAC "" -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -#define USAGE_MAX_FRAG_LEN \ - " max_frag_len=%%d default: 16384 (tls default)\n" \ - " options: 512, 1024, 2048, 4096\n" -#else -#define USAGE_MAX_FRAG_LEN "" -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) -#define USAGE_RECSPLIT \ - " recsplit=0/1 default: (library default: on)\n" -#else -#define USAGE_RECSPLIT -#endif - -#if defined(MBEDTLS_DHM_C) -#define USAGE_DHMLEN \ - " dhmlen=%%d default: (library default: 1024 bits)\n" -#else -#define USAGE_DHMLEN -#endif - -#if defined(MBEDTLS_SSL_ALPN) -#define USAGE_ALPN \ - " alpn=%%s default: \"\" (disabled)\n" \ - " example: spdy/1,http/1.1\n" -#else -#define USAGE_ALPN "" -#endif /* MBEDTLS_SSL_ALPN */ - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -#define USAGE_DTLS \ - " dtls=%%d default: 0 (TLS)\n" \ - " hs_timeout=%%d-%%d default: (library default: 1000-60000)\n" \ - " range of DTLS handshake timeouts in millisecs\n" -#else -#define USAGE_DTLS "" -#endif - -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) -#define USAGE_FALLBACK \ - " fallback=0/1 default: (library default: off)\n" -#else -#define USAGE_FALLBACK "" -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -#define USAGE_EMS \ - " extended_ms=0/1 default: (library default: on)\n" -#else -#define USAGE_EMS "" -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -#define USAGE_ETM \ - " etm=0/1 default: (library default: on)\n" -#else -#define USAGE_ETM "" -#endif - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -#define USAGE_RENEGO \ - " renegotiation=%%d default: 0 (disabled)\n" \ - " renegotiate=%%d default: 0 (disabled)\n" -#else -#define USAGE_RENEGO "" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -#define USAGE_ECJPAKE \ - " ecjpake_pw=%%s default: none (disabled)\n" -#else -#define USAGE_ECJPAKE "" -#endif - -#define USAGE \ - "\n usage: ssl_client2 param=<>...\n" \ - "\n acceptable parameters:\n" \ - " server_name=%%s default: localhost\n" \ - " server_addr=%%s default: given by name\n" \ - " server_port=%%d default: 4433\n" \ - " request_page=%%s default: \".\"\n" \ - " request_size=%%d default: about 34 (basic request)\n" \ - " (minimum: 0, max: 16384)\n" \ - " debug_level=%%d default: 0 (disabled)\n" \ - " nbio=%%d default: 0 (blocking I/O)\n" \ - " options: 1 (non-blocking), 2 (added delays)\n" \ - " read_timeout=%%d default: 0 ms (no timeout)\n" \ - " max_resend=%%d default: 0 (no resend on timeout)\n" \ - "\n" \ - USAGE_DTLS \ - "\n" \ - " auth_mode=%%s default: (library default: none)\n" \ - " options: none, optional, required\n" \ - USAGE_IO \ - "\n" \ - USAGE_PSK \ - USAGE_ECJPAKE \ - "\n" \ - " allow_legacy=%%d default: (library default: no)\n" \ - USAGE_RENEGO \ - " exchanges=%%d default: 1\n" \ - " reconnect=%%d default: 0 (disabled)\n" \ - " reco_delay=%%d default: 0 seconds\n" \ - " reconnect_hard=%%d default: 0 (disabled)\n" \ - USAGE_TICKETS \ - USAGE_MAX_FRAG_LEN \ - USAGE_TRUNC_HMAC \ - USAGE_ALPN \ - USAGE_FALLBACK \ - USAGE_EMS \ - USAGE_ETM \ - USAGE_RECSPLIT \ - USAGE_DHMLEN \ - "\n" \ - " arc4=%%d default: (library default: 0)\n" \ - " min_version=%%s default: (library default: tls1)\n" \ - " max_version=%%s default: (library default: tls1_2)\n" \ - " force_version=%%s default: \"\" (none)\n" \ - " options: ssl3, tls1, tls1_1, tls1_2, dtls1, dtls1_2\n" \ - "\n" \ - " force_ciphersuite= default: all enabled\n"\ - " acceptable ciphersuite names:\n" - -/* - * global options - */ -struct options -{ - const char *server_name; /* hostname of the server (client only) */ - const char *server_addr; /* address of the server (client only) */ - const char *server_port; /* port on which the ssl service runs */ - int debug_level; /* level of debugging */ - int nbio; /* should I/O be blocking? */ - uint32_t read_timeout; /* timeout on mbedtls_ssl_read() in milliseconds */ - int max_resend; /* DTLS times to resend on read timeout */ - const char *request_page; /* page on server to request */ - int request_size; /* pad request with header to requested size */ - const char *ca_file; /* the file with the CA certificate(s) */ - const char *ca_path; /* the path with the CA certificate(s) reside */ - const char *crt_file; /* the file with the client certificate */ - const char *key_file; /* the file with the client key */ - const char *psk; /* the pre-shared key */ - const char *psk_identity; /* the pre-shared key identity */ - const char *ecjpake_pw; /* the EC J-PAKE password */ - int force_ciphersuite[2]; /* protocol/ciphersuite to use, or all */ - int renegotiation; /* enable / disable renegotiation */ - int allow_legacy; /* allow legacy renegotiation */ - int renegotiate; /* attempt renegotiation? */ - int renego_delay; /* delay before enforcing renegotiation */ - int exchanges; /* number of data exchanges */ - int min_version; /* minimum protocol version accepted */ - int max_version; /* maximum protocol version accepted */ - int arc4; /* flag for arc4 suites support */ - int auth_mode; /* verify mode for connection */ - unsigned char mfl_code; /* code for maximum fragment length */ - int trunc_hmac; /* negotiate truncated hmac or not */ - int recsplit; /* enable record splitting? */ - int dhmlen; /* minimum DHM params len in bits */ - int reconnect; /* attempt to resume session */ - int reco_delay; /* delay in seconds before resuming session */ - int reconnect_hard; /* unexpectedly reconnect from the same port */ - int tickets; /* enable / disable session tickets */ - const char *alpn_string; /* ALPN supported protocols */ - int transport; /* TLS or DTLS? */ - uint32_t hs_to_min; /* Initial value of DTLS handshake timer */ - uint32_t hs_to_max; /* Max value of DTLS handshake timer */ - int fallback; /* is this a fallback connection? */ - int extended_ms; /* negotiate extended master secret? */ - int etm; /* negotiate encrypt then mac? */ -} opt; - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - const char *p, *basename; - - /* Extract basename from file */ - for( p = basename = file; *p != '\0'; p++ ) - if( *p == '/' || *p == '\\' ) - basename = p + 1; - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: |%d| %s", basename, line, level, str ); - fflush( (FILE *) ctx ); -} - -/* - * Test recv/send functions that make sure each try returns - * WANT_READ/WANT_WRITE at least once before sucesseding - */ -static int my_recv( void *ctx, unsigned char *buf, size_t len ) -{ - static int first_try = 1; - int ret; - - if( first_try ) - { - first_try = 0; - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - - ret = mbedtls_net_recv( ctx, buf, len ); - if( ret != MBEDTLS_ERR_SSL_WANT_READ ) - first_try = 1; /* Next call will be a new operation */ - return( ret ); -} - -static int my_send( void *ctx, const unsigned char *buf, size_t len ) -{ - static int first_try = 1; - int ret; - - if( first_try ) - { - first_try = 0; - return( MBEDTLS_ERR_SSL_WANT_WRITE ); - } - - ret = mbedtls_net_send( ctx, buf, len ); - if( ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - first_try = 1; /* Next call will be a new operation */ - return( ret ); -} - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -/* - * Enabled if debug_level > 1 in code below - */ -static int my_verify( void *data, mbedtls_x509_crt *crt, int depth, uint32_t *flags ) -{ - char buf[1024]; - ((void) data); - - mbedtls_printf( "\nVerify requested for (Depth %d):\n", depth ); - mbedtls_x509_crt_info( buf, sizeof( buf ) - 1, "", crt ); - mbedtls_printf( "%s", buf ); - - if ( ( *flags ) == 0 ) - mbedtls_printf( " This certificate has no flags\n" ); - else - { - mbedtls_x509_crt_verify_info( buf, sizeof( buf ), " ! ", *flags ); - mbedtls_printf( "%s\n", buf ); - } - - return( 0 ); -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -int main( int argc, char *argv[] ) -{ - int ret = 0, len, tail_len, i, written, frags, retry_left; - mbedtls_net_context server_fd; - unsigned char buf[MBEDTLS_SSL_MAX_CONTENT_LEN + 1]; -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - unsigned char psk[MBEDTLS_PSK_MAX_LEN]; - size_t psk_len = 0; -#endif -#if defined(MBEDTLS_SSL_ALPN) - const char *alpn_list[10]; -#endif - const char *pers = "ssl_client2"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_ssl_session saved_session; -#if defined(MBEDTLS_TIMING_C) - mbedtls_timing_delay_context timer; -#endif -#if defined(MBEDTLS_X509_CRT_PARSE_C) - uint32_t flags; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - mbedtls_pk_context pkey; -#endif - char *p, *q; - const int *list; - - /* - * Make sure memory references are valid. - */ - mbedtls_net_init( &server_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - memset( &saved_session, 0, sizeof( mbedtls_ssl_session ) ); - mbedtls_ctr_drbg_init( &ctr_drbg ); -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt_init( &cacert ); - mbedtls_x509_crt_init( &clicert ); - mbedtls_pk_init( &pkey ); -#endif -#if defined(MBEDTLS_SSL_ALPN) - memset( (void * ) alpn_list, 0, sizeof( alpn_list ) ); -#endif - - if( argc == 0 ) - { - usage: - if( ret == 0 ) - ret = 1; - - mbedtls_printf( USAGE ); - - list = mbedtls_ssl_list_ciphersuites(); - while( *list ) - { - mbedtls_printf(" %-42s", mbedtls_ssl_get_ciphersuite_name( *list ) ); - list++; - if( !*list ) - break; - mbedtls_printf(" %s\n", mbedtls_ssl_get_ciphersuite_name( *list ) ); - list++; - } - mbedtls_printf("\n"); - goto exit; - } - - opt.server_name = DFL_SERVER_NAME; - opt.server_addr = DFL_SERVER_ADDR; - opt.server_port = DFL_SERVER_PORT; - opt.debug_level = DFL_DEBUG_LEVEL; - opt.nbio = DFL_NBIO; - opt.read_timeout = DFL_READ_TIMEOUT; - opt.max_resend = DFL_MAX_RESEND; - opt.request_page = DFL_REQUEST_PAGE; - opt.request_size = DFL_REQUEST_SIZE; - opt.ca_file = DFL_CA_FILE; - opt.ca_path = DFL_CA_PATH; - opt.crt_file = DFL_CRT_FILE; - opt.key_file = DFL_KEY_FILE; - opt.psk = DFL_PSK; - opt.psk_identity = DFL_PSK_IDENTITY; - opt.ecjpake_pw = DFL_ECJPAKE_PW; - opt.force_ciphersuite[0]= DFL_FORCE_CIPHER; - opt.renegotiation = DFL_RENEGOTIATION; - opt.allow_legacy = DFL_ALLOW_LEGACY; - opt.renegotiate = DFL_RENEGOTIATE; - opt.exchanges = DFL_EXCHANGES; - opt.min_version = DFL_MIN_VERSION; - opt.max_version = DFL_MAX_VERSION; - opt.arc4 = DFL_ARC4; - opt.auth_mode = DFL_AUTH_MODE; - opt.mfl_code = DFL_MFL_CODE; - opt.trunc_hmac = DFL_TRUNC_HMAC; - opt.recsplit = DFL_RECSPLIT; - opt.dhmlen = DFL_DHMLEN; - opt.reconnect = DFL_RECONNECT; - opt.reco_delay = DFL_RECO_DELAY; - opt.reconnect_hard = DFL_RECONNECT_HARD; - opt.tickets = DFL_TICKETS; - opt.alpn_string = DFL_ALPN_STRING; - opt.transport = DFL_TRANSPORT; - opt.hs_to_min = DFL_HS_TO_MIN; - opt.hs_to_max = DFL_HS_TO_MAX; - opt.fallback = DFL_FALLBACK; - opt.extended_ms = DFL_EXTENDED_MS; - opt.etm = DFL_ETM; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "server_name" ) == 0 ) - opt.server_name = q; - else if( strcmp( p, "server_addr" ) == 0 ) - opt.server_addr = q; - else if( strcmp( p, "server_port" ) == 0 ) - opt.server_port = q; - else if( strcmp( p, "dtls" ) == 0 ) - { - int t = atoi( q ); - if( t == 0 ) - opt.transport = MBEDTLS_SSL_TRANSPORT_STREAM; - else if( t == 1 ) - opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM; - else - goto usage; - } - else if( strcmp( p, "debug_level" ) == 0 ) - { - opt.debug_level = atoi( q ); - if( opt.debug_level < 0 || opt.debug_level > 65535 ) - goto usage; - } - else if( strcmp( p, "nbio" ) == 0 ) - { - opt.nbio = atoi( q ); - if( opt.nbio < 0 || opt.nbio > 2 ) - goto usage; - } - else if( strcmp( p, "read_timeout" ) == 0 ) - opt.read_timeout = atoi( q ); - else if( strcmp( p, "max_resend" ) == 0 ) - { - opt.max_resend = atoi( q ); - if( opt.max_resend < 0 ) - goto usage; - } - else if( strcmp( p, "request_page" ) == 0 ) - opt.request_page = q; - else if( strcmp( p, "request_size" ) == 0 ) - { - opt.request_size = atoi( q ); - if( opt.request_size < 0 || opt.request_size > MBEDTLS_SSL_MAX_CONTENT_LEN ) - goto usage; - } - else if( strcmp( p, "ca_file" ) == 0 ) - opt.ca_file = q; - else if( strcmp( p, "ca_path" ) == 0 ) - opt.ca_path = q; - else if( strcmp( p, "crt_file" ) == 0 ) - opt.crt_file = q; - else if( strcmp( p, "key_file" ) == 0 ) - opt.key_file = q; - else if( strcmp( p, "psk" ) == 0 ) - opt.psk = q; - else if( strcmp( p, "psk_identity" ) == 0 ) - opt.psk_identity = q; - else if( strcmp( p, "ecjpake_pw" ) == 0 ) - opt.ecjpake_pw = q; - else if( strcmp( p, "force_ciphersuite" ) == 0 ) - { - opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id( q ); - - if( opt.force_ciphersuite[0] == 0 ) - { - ret = 2; - goto usage; - } - opt.force_ciphersuite[1] = 0; - } - else if( strcmp( p, "renegotiation" ) == 0 ) - { - opt.renegotiation = (atoi( q )) ? MBEDTLS_SSL_RENEGOTIATION_ENABLED : - MBEDTLS_SSL_RENEGOTIATION_DISABLED; - } - else if( strcmp( p, "allow_legacy" ) == 0 ) - { - switch( atoi( q ) ) - { - case -1: opt.allow_legacy = MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE; break; - case 0: opt.allow_legacy = MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION; break; - case 1: opt.allow_legacy = MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION; break; - default: goto usage; - } - } - else if( strcmp( p, "renegotiate" ) == 0 ) - { - opt.renegotiate = atoi( q ); - if( opt.renegotiate < 0 || opt.renegotiate > 1 ) - goto usage; - } - else if( strcmp( p, "exchanges" ) == 0 ) - { - opt.exchanges = atoi( q ); - if( opt.exchanges < 1 ) - goto usage; - } - else if( strcmp( p, "reconnect" ) == 0 ) - { - opt.reconnect = atoi( q ); - if( opt.reconnect < 0 || opt.reconnect > 2 ) - goto usage; - } - else if( strcmp( p, "reco_delay" ) == 0 ) - { - opt.reco_delay = atoi( q ); - if( opt.reco_delay < 0 ) - goto usage; - } - else if( strcmp( p, "reconnect_hard" ) == 0 ) - { - opt.reconnect_hard = atoi( q ); - if( opt.reconnect_hard < 0 || opt.reconnect_hard > 1 ) - goto usage; - } - else if( strcmp( p, "tickets" ) == 0 ) - { - opt.tickets = atoi( q ); - if( opt.tickets < 0 || opt.tickets > 2 ) - goto usage; - } - else if( strcmp( p, "alpn" ) == 0 ) - { - opt.alpn_string = q; - } - else if( strcmp( p, "fallback" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.fallback = MBEDTLS_SSL_IS_NOT_FALLBACK; break; - case 1: opt.fallback = MBEDTLS_SSL_IS_FALLBACK; break; - default: goto usage; - } - } - else if( strcmp( p, "extended_ms" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.extended_ms = MBEDTLS_SSL_EXTENDED_MS_DISABLED; break; - case 1: opt.extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "etm" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.etm = MBEDTLS_SSL_ETM_DISABLED; break; - case 1: opt.etm = MBEDTLS_SSL_ETM_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "min_version" ) == 0 ) - { - if( strcmp( q, "ssl3" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_0; - else if( strcmp( q, "tls1" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_1; - else if( strcmp( q, "tls1_1" ) == 0 || - strcmp( q, "dtls1" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - else if( strcmp( q, "tls1_2" ) == 0 || - strcmp( q, "dtls1_2" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_3; - else - goto usage; - } - else if( strcmp( p, "max_version" ) == 0 ) - { - if( strcmp( q, "ssl3" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_0; - else if( strcmp( q, "tls1" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_1; - else if( strcmp( q, "tls1_1" ) == 0 || - strcmp( q, "dtls1" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_2; - else if( strcmp( q, "tls1_2" ) == 0 || - strcmp( q, "dtls1_2" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_3; - else - goto usage; - } - else if( strcmp( p, "arc4" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.arc4 = MBEDTLS_SSL_ARC4_DISABLED; break; - case 1: opt.arc4 = MBEDTLS_SSL_ARC4_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "force_version" ) == 0 ) - { - if( strcmp( q, "ssl3" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_0; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_0; - } - else if( strcmp( q, "tls1" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_1; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_1; - } - else if( strcmp( q, "tls1_1" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_2; - } - else if( strcmp( q, "tls1_2" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_3; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_3; - } - else if( strcmp( q, "dtls1" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_2; - opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM; - } - else if( strcmp( q, "dtls1_2" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_3; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_3; - opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM; - } - else - goto usage; - } - else if( strcmp( p, "auth_mode" ) == 0 ) - { - if( strcmp( q, "none" ) == 0 ) - opt.auth_mode = MBEDTLS_SSL_VERIFY_NONE; - else if( strcmp( q, "optional" ) == 0 ) - opt.auth_mode = MBEDTLS_SSL_VERIFY_OPTIONAL; - else if( strcmp( q, "required" ) == 0 ) - opt.auth_mode = MBEDTLS_SSL_VERIFY_REQUIRED; - else - goto usage; - } - else if( strcmp( p, "max_frag_len" ) == 0 ) - { - if( strcmp( q, "512" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_512; - else if( strcmp( q, "1024" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_1024; - else if( strcmp( q, "2048" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_2048; - else if( strcmp( q, "4096" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_4096; - else - goto usage; - } - else if( strcmp( p, "trunc_hmac" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_DISABLED; break; - case 1: opt.trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "hs_timeout" ) == 0 ) - { - if( ( p = strchr( q, '-' ) ) == NULL ) - goto usage; - *p++ = '\0'; - opt.hs_to_min = atoi( q ); - opt.hs_to_max = atoi( p ); - if( opt.hs_to_min == 0 || opt.hs_to_max < opt.hs_to_min ) - goto usage; - } - else if( strcmp( p, "recsplit" ) == 0 ) - { - opt.recsplit = atoi( q ); - if( opt.recsplit < 0 || opt.recsplit > 1 ) - goto usage; - } - else if( strcmp( p, "dhmlen" ) == 0 ) - { - opt.dhmlen = atoi( q ); - if( opt.dhmlen < 0 ) - goto usage; - } - else - goto usage; - } - -#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold( opt.debug_level ); -#endif - - if( opt.force_ciphersuite[0] > 0 ) - { - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( opt.force_ciphersuite[0] ); - - if( opt.max_version != -1 && - ciphersuite_info->min_minor_ver > opt.max_version ) - { - mbedtls_printf("forced ciphersuite not allowed with this protocol version\n"); - ret = 2; - goto usage; - } - if( opt.min_version != -1 && - ciphersuite_info->max_minor_ver < opt.min_version ) - { - mbedtls_printf("forced ciphersuite not allowed with this protocol version\n"); - ret = 2; - goto usage; - } - - /* If the server selects a version that's not supported by - * this suite, then there will be no common ciphersuite... */ - if( opt.max_version == -1 || - opt.max_version > ciphersuite_info->max_minor_ver ) - { - opt.max_version = ciphersuite_info->max_minor_ver; - } - if( opt.min_version < ciphersuite_info->min_minor_ver ) - { - opt.min_version = ciphersuite_info->min_minor_ver; - /* DTLS starts with TLS 1.1 */ - if( opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - opt.min_version < MBEDTLS_SSL_MINOR_VERSION_2 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - } - - /* Enable RC4 if needed and not explicitly disabled */ - if( ciphersuite_info->cipher == MBEDTLS_CIPHER_ARC4_128 ) - { - if( opt.arc4 == MBEDTLS_SSL_ARC4_DISABLED ) - { - mbedtls_printf("forced RC4 ciphersuite with RC4 disabled\n"); - ret = 2; - goto usage; - } - - opt.arc4 = MBEDTLS_SSL_ARC4_ENABLED; - } - } - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - /* - * Unhexify the pre-shared key if any is given - */ - if( strlen( opt.psk ) ) - { - unsigned char c; - size_t j; - - if( strlen( opt.psk ) % 2 != 0 ) - { - mbedtls_printf("pre-shared key not valid hex\n"); - goto exit; - } - - psk_len = strlen( opt.psk ) / 2; - - for( j = 0; j < strlen( opt.psk ); j += 2 ) - { - c = opt.psk[j]; - if( c >= '0' && c <= '9' ) - c -= '0'; - else if( c >= 'a' && c <= 'f' ) - c -= 'a' - 10; - else if( c >= 'A' && c <= 'F' ) - c -= 'A' - 10; - else - { - mbedtls_printf("pre-shared key not valid hex\n"); - goto exit; - } - psk[ j / 2 ] = c << 4; - - c = opt.psk[j + 1]; - if( c >= '0' && c <= '9' ) - c -= '0'; - else if( c >= 'a' && c <= 'f' ) - c -= 'a' - 10; - else if( c >= 'A' && c <= 'F' ) - c -= 'A' - 10; - else - { - mbedtls_printf("pre-shared key not valid hex\n"); - goto exit; - } - psk[ j / 2 ] |= c; - } - } -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_SSL_ALPN) - if( opt.alpn_string != NULL ) - { - p = (char *) opt.alpn_string; - i = 0; - - /* Leave room for a final NULL in alpn_list */ - while( i < (int) sizeof alpn_list - 1 && *p != '\0' ) - { - alpn_list[i++] = p; - - /* Terminate the current string and move on to next one */ - while( *p != ',' && *p != '\0' ) - p++; - if( *p == ',' ) - *p++ = '\0'; - } - } -#endif /* MBEDTLS_SSL_ALPN */ - - /* - * 0. Initialize the RNG and the session data - */ - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned -0x%x\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * 1.1. Load the trusted CA - */ - mbedtls_printf( " . Loading the CA root certificate ..." ); - fflush( stdout ); - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.ca_path ) ) - if( strcmp( opt.ca_path, "none" ) == 0 ) - ret = 0; - else - ret = mbedtls_x509_crt_parse_path( &cacert, opt.ca_path ); - else if( strlen( opt.ca_file ) ) - if( strcmp( opt.ca_file, "none" ) == 0 ) - ret = 0; - else - ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file ); - else -#endif -#if defined(MBEDTLS_CERTS_C) - for( i = 0; mbedtls_test_cas[i] != NULL; i++ ) - { - ret = mbedtls_x509_crt_parse( &cacert, - (const unsigned char *) mbedtls_test_cas[i], - mbedtls_test_cas_len[i] ); - if( ret != 0 ) - break; - } -#else - { - ret = 1; - mbedtls_printf("MBEDTLS_CERTS_C not defined."); - } -#endif - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok (%d skipped)\n", ret ); - - /* - * 1.2. Load own certificate and private key - * - * (can be skipped if client authentication is not required) - */ - mbedtls_printf( " . Loading the client cert. and key..." ); - fflush( stdout ); - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.crt_file ) ) - if( strcmp( opt.crt_file, "none" ) == 0 ) - ret = 0; - else - ret = mbedtls_x509_crt_parse_file( &clicert, opt.crt_file ); - else -#endif -#if defined(MBEDTLS_CERTS_C) - ret = mbedtls_x509_crt_parse( &clicert, (const unsigned char *) mbedtls_test_cli_crt, - mbedtls_test_cli_crt_len ); -#else - { - ret = 1; - mbedtls_printf("MBEDTLS_CERTS_C not defined."); - } -#endif - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.key_file ) ) - if( strcmp( opt.key_file, "none" ) == 0 ) - ret = 0; - else - ret = mbedtls_pk_parse_keyfile( &pkey, opt.key_file, "" ); - else -#endif -#if defined(MBEDTLS_CERTS_C) - ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_cli_key, - mbedtls_test_cli_key_len, NULL, 0 ); -#else - { - ret = 1; - mbedtls_printf("MBEDTLS_CERTS_C not defined."); - } -#endif - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_key returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - /* - * 2. Start the connection - */ - if( opt.server_addr == NULL) - opt.server_addr = opt.server_name; - - mbedtls_printf( " . Connecting to %s/%s/%s...", - opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ? "tcp" : "udp", - opt.server_addr, opt.server_port ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, opt.server_addr, opt.server_port, - opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ? - MBEDTLS_NET_PROTO_TCP : MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned -0x%x\n\n", -ret ); - goto exit; - } - - if( opt.nbio > 0 ) - ret = mbedtls_net_set_nonblock( &server_fd ); - else - ret = mbedtls_net_set_block( &server_fd ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 3. Setup stuff - */ - mbedtls_printf( " . Setting up the SSL/TLS structure..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - opt.transport, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned -0x%x\n\n", -ret ); - goto exit; - } - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( opt.debug_level > 0 ) - mbedtls_ssl_conf_verify( &conf, my_verify, NULL ); -#endif - - if( opt.auth_mode != DFL_AUTH_MODE ) - mbedtls_ssl_conf_authmode( &conf, opt.auth_mode ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( opt.hs_to_min != DFL_HS_TO_MIN || opt.hs_to_max != DFL_HS_TO_MAX ) - mbedtls_ssl_conf_handshake_timeout( &conf, opt.hs_to_min, opt.hs_to_max ); -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - if( ( ret = mbedtls_ssl_conf_max_frag_len( &conf, opt.mfl_code ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_max_frag_len returned %d\n\n", ret ); - goto exit; - } -#endif - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - if( opt.trunc_hmac != DFL_TRUNC_HMAC ) - mbedtls_ssl_conf_truncated_hmac( &conf, opt.trunc_hmac ); -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - if( opt.extended_ms != DFL_EXTENDED_MS ) - mbedtls_ssl_conf_extended_master_secret( &conf, opt.extended_ms ); -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - if( opt.etm != DFL_ETM ) - mbedtls_ssl_conf_encrypt_then_mac( &conf, opt.etm ); -#endif - -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - if( opt.recsplit != DFL_RECSPLIT ) - mbedtls_ssl_conf_cbc_record_splitting( &conf, opt.recsplit - ? MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED - : MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED ); -#endif - -#if defined(MBEDTLS_DHM_C) - if( opt.dhmlen != DFL_DHMLEN ) - mbedtls_ssl_conf_dhm_min_bitlen( &conf, opt.dhmlen ); -#endif - -#if defined(MBEDTLS_SSL_ALPN) - if( opt.alpn_string != NULL ) - if( ( ret = mbedtls_ssl_conf_alpn_protocols( &conf, alpn_list ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_alpn_protocols returned %d\n\n", ret ); - goto exit; - } -#endif - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - - mbedtls_ssl_conf_read_timeout( &conf, opt.read_timeout ); - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - mbedtls_ssl_conf_session_tickets( &conf, opt.tickets ); -#endif - - if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) - mbedtls_ssl_conf_ciphersuites( &conf, opt.force_ciphersuite ); - -#if defined(MBEDTLS_ARC4_C) - if( opt.arc4 != DFL_ARC4 ) - mbedtls_ssl_conf_arc4_support( &conf, opt.arc4 ); -#endif - - if( opt.allow_legacy != DFL_ALLOW_LEGACY ) - mbedtls_ssl_conf_legacy_renegotiation( &conf, opt.allow_legacy ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - mbedtls_ssl_conf_renegotiation( &conf, opt.renegotiation ); -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( strcmp( opt.ca_path, "none" ) != 0 && - strcmp( opt.ca_file, "none" ) != 0 ) - { - mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); - } - if( strcmp( opt.crt_file, "none" ) != 0 && - strcmp( opt.key_file, "none" ) != 0 ) - { - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &clicert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - } -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - if( ( ret = mbedtls_ssl_conf_psk( &conf, psk, psk_len, - (const unsigned char *) opt.psk_identity, - strlen( opt.psk_identity ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_psk returned %d\n\n", ret ); - goto exit; - } -#endif - - if( opt.min_version != DFL_MIN_VERSION ) - mbedtls_ssl_conf_min_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.min_version ); - - if( opt.max_version != DFL_MAX_VERSION ) - mbedtls_ssl_conf_max_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.max_version ); - -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) - if( opt.fallback != DFL_FALLBACK ) - mbedtls_ssl_conf_fallback( &conf, opt.fallback ); -#endif - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned -0x%x\n\n", -ret ); - goto exit; - } - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( ( ret = mbedtls_ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret ); - goto exit; - } -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( opt.ecjpake_pw != DFL_ECJPAKE_PW ) - { - if( ( ret = mbedtls_ssl_set_hs_ecjpake_password( &ssl, - (const unsigned char *) opt.ecjpake_pw, - strlen( opt.ecjpake_pw ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hs_ecjpake_password returned %d\n\n", ret ); - goto exit; - } - } -#endif - - if( opt.nbio == 2 ) - mbedtls_ssl_set_bio( &ssl, &server_fd, my_send, my_recv, NULL ); - else - mbedtls_ssl_set_bio( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, - opt.nbio == 0 ? mbedtls_net_recv_timeout : NULL ); - -#if defined(MBEDTLS_TIMING_C) - mbedtls_ssl_set_timer_cb( &ssl, &timer, mbedtls_timing_set_delay, - mbedtls_timing_get_delay ); -#endif - - mbedtls_printf( " ok\n" ); - - /* - * 4. Handshake - */ - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n", -ret ); - if( ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ) - mbedtls_printf( - " Unable to verify the server's certificate. " - "Either it is invalid,\n" - " or you didn't set ca_file or ca_path " - "to an appropriate value.\n" - " Alternatively, you may want to use " - "auth_mode=optional for testing purposes.\n" ); - mbedtls_printf( "\n" ); - goto exit; - } - } - - mbedtls_printf( " ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", - mbedtls_ssl_get_version( &ssl ), mbedtls_ssl_get_ciphersuite( &ssl ) ); - - if( ( ret = mbedtls_ssl_get_record_expansion( &ssl ) ) >= 0 ) - mbedtls_printf( " [ Record expansion is %d ]\n", ret ); - else - mbedtls_printf( " [ Record expansion is unknown (compression) ]\n" ); - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - mbedtls_printf( " [ Maximum fragment length is %u ]\n", - (unsigned int) mbedtls_ssl_get_max_frag_len( &ssl ) ); -#endif - -#if defined(MBEDTLS_SSL_ALPN) - if( opt.alpn_string != NULL ) - { - const char *alp = mbedtls_ssl_get_alpn_protocol( &ssl ); - mbedtls_printf( " [ Application Layer Protocol is %s ]\n", - alp ? alp : "(none)" ); - } -#endif - - if( opt.reconnect != 0 ) - { - mbedtls_printf(" . Saving session for reuse..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_get_session( &ssl, &saved_session ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_get_session returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - } - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * 5. Verify the server certificate - */ - mbedtls_printf( " . Verifying peer X.509 certificate..." ); - - if( ( flags = mbedtls_ssl_get_verify_result( &ssl ) ) != 0 ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - mbedtls_printf( " ok\n" ); - - if( mbedtls_ssl_get_peer_cert( &ssl ) != NULL ) - { - mbedtls_printf( " . Peer certificate information ...\n" ); - mbedtls_x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", - mbedtls_ssl_get_peer_cert( &ssl ) ); - mbedtls_printf( "%s\n", buf ); - } -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( opt.renegotiate ) - { - /* - * Perform renegotiation (this must be done when the server is waiting - * for input from our side). - */ - mbedtls_printf( " . Performing renegotiation..." ); - fflush( stdout ); - while( ( ret = mbedtls_ssl_renegotiate( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_renegotiate returned %d\n\n", ret ); - goto exit; - } - } - mbedtls_printf( " ok\n" ); - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - /* - * 6. Write the GET request - */ - retry_left = opt.max_resend; -send_request: - mbedtls_printf( " > Write to server:" ); - fflush( stdout ); - - len = mbedtls_snprintf( (char *) buf, sizeof(buf) - 1, GET_REQUEST, - opt.request_page ); - tail_len = (int) strlen( GET_REQUEST_END ); - - /* Add padding to GET request to reach opt.request_size in length */ - if( opt.request_size != DFL_REQUEST_SIZE && - len + tail_len < opt.request_size ) - { - memset( buf + len, 'A', opt.request_size - len - tail_len ); - len += opt.request_size - len - tail_len; - } - - strncpy( (char *) buf + len, GET_REQUEST_END, sizeof(buf) - len - 1 ); - len += tail_len; - - /* Truncate if request size is smaller than the "natural" size */ - if( opt.request_size != DFL_REQUEST_SIZE && - len > opt.request_size ) - { - len = opt.request_size; - - /* Still end with \r\n unless that's really not possible */ - if( len >= 2 ) buf[len - 2] = '\r'; - if( len >= 1 ) buf[len - 1] = '\n'; - } - - if( opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ) - { - for( written = 0, frags = 0; written < len; written += ret, frags++ ) - { - while( ( ret = mbedtls_ssl_write( &ssl, buf + written, len - written ) ) - <= 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned -0x%x\n\n", -ret ); - goto exit; - } - } - } - } - else /* Not stream, so datagram */ - { - do ret = mbedtls_ssl_write( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto exit; - } - - frags = 1; - written = ret; - } - - buf[written] = '\0'; - mbedtls_printf( " %d bytes written in %d fragments\n\n%s\n", written, frags, (char *) buf ); - - /* - * 7. Read the HTTP response - */ - mbedtls_printf( " < Read from server:" ); - fflush( stdout ); - - /* - * TLS and DTLS need different reading styles (stream vs datagram) - */ - if( opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ) - { - do - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - ret = mbedtls_ssl_read( &ssl, buf, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - ret = 0; - goto close_notify; - - case 0: - case MBEDTLS_ERR_NET_CONN_RESET: - mbedtls_printf( " connection was reset by peer\n" ); - ret = 0; - goto reconnect; - - default: - mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n", -ret ); - goto exit; - } - } - - len = ret; - buf[len] = '\0'; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - - /* End of message should be detected according to the syntax of the - * application protocol (eg HTTP), just use a dummy test here. */ - if( ret > 0 && buf[len-1] == '\n' ) - { - ret = 0; - break; - } - } - while( 1 ); - } - else /* Not stream, so datagram */ - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - - do ret = mbedtls_ssl_read( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_TIMEOUT: - mbedtls_printf( " timeout\n" ); - if( retry_left-- > 0 ) - goto send_request; - goto exit; - - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - ret = 0; - goto close_notify; - - default: - mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n", -ret ); - goto exit; - } - } - - len = ret; - buf[len] = '\0'; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - ret = 0; - } - - /* - * 7b. Simulate hard reset and reconnect from same port? - */ - if( opt.reconnect_hard != 0 ) - { - opt.reconnect_hard = 0; - - mbedtls_printf( " . Restarting connection from same port..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_session_reset returned -0x%x\n\n", -ret ); - goto exit; - } - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", -ret ); - goto exit; - } - } - - mbedtls_printf( " ok\n" ); - - goto send_request; - } - - /* - * 7c. Continue doing data exchanges? - */ - if( --opt.exchanges > 0 ) - goto send_request; - - /* - * 8. Done, cleanly close the connection - */ -close_notify: - mbedtls_printf( " . Closing the connection..." ); - fflush( stdout ); - - /* No error checking, the connection might be closed already */ - do ret = mbedtls_ssl_close_notify( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - ret = 0; - - mbedtls_printf( " done\n" ); - - /* - * 9. Reconnect? - */ -reconnect: - if( opt.reconnect != 0 ) - { - --opt.reconnect; - - mbedtls_net_free( &server_fd ); - -#if defined(MBEDTLS_TIMING_C) - if( opt.reco_delay > 0 ) - mbedtls_net_usleep( 1000000 * opt.reco_delay ); -#endif - - mbedtls_printf( " . Reconnecting with saved session..." ); - - if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_session_reset returned -0x%x\n\n", -ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_set_session( &ssl, &saved_session ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_session returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_net_connect( &server_fd, opt.server_addr, opt.server_port, - opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ? - MBEDTLS_NET_PROTO_TCP : MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned -0x%x\n\n", -ret ); - goto exit; - } - - if( opt.nbio > 0 ) - ret = mbedtls_net_set_nonblock( &server_fd ); - else - ret = mbedtls_net_set_block( &server_fd ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", - -ret ); - goto exit; - } - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", -ret ); - goto exit; - } - } - - mbedtls_printf( " ok\n" ); - - goto send_request; - } - - /* - * Cleanup and exit - */ -exit: -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf("Last error was: -0x%X - %s\n\n", -ret, error_buf ); - } -#endif - - mbedtls_net_free( &server_fd ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt_free( &clicert ); - mbedtls_x509_crt_free( &cacert ); - mbedtls_pk_free( &pkey ); -#endif - mbedtls_ssl_session_free( &saved_session ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - // Shell can not handle large exit numbers -> 1 for errors - if( ret < 0 ) - ret = 1; - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && - MBEDTLS_SSL_CLI_C && MBEDTLS_NET_C && MBEDTLS_RSA_C && - MBEDTLS_CTR_DRBG_C MBEDTLS_TIMING_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_fork_server.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_fork_server.c deleted file mode 100644 index 13ce5dd603..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_fork_server.c +++ /dev/null @@ -1,407 +0,0 @@ -/* - * SSL server demonstration program using fork() for handling multiple clients - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_SSL_TLS_C) || \ - !defined(MBEDTLS_SSL_SRV_C) || !defined(MBEDTLS_NET_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_TIMING_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_PEM_PARSE_C) -int main( int argc, char *argv[] ) -{ - ((void) argc); - ((void) argv); - - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_ENTROPY_C " - "and/or MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or " - "MBEDTLS_TIMING_C and/or MBEDTLS_PEM_PARSE_C not defined.\n"); - return( 0 ); -} -#elif defined(_WIN32) -int main( void ) -{ - mbedtls_printf("_WIN32 defined. This application requires fork() and signals " - "to work correctly.\n"); - return( 0 ); -} -#else - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" -#include "mbedtls/ssl.h" -#include "mbedtls/net.h" -#include "mbedtls/timing.h" - -#include -#include - -#if !defined(_MSC_VER) || defined(EFIX64) || defined(EFI32) -#include -#endif - -#define HTTP_RESPONSE \ - "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

mbed TLS Test Server

\r\n" \ - "

Successful connection using: %s

\r\n" - -#define DEBUG_LEVEL 0 - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -int main( void ) -{ - int ret, len, cnt = 0, pid; - mbedtls_net_context listen_fd, client_fd; - unsigned char buf[1024]; - const char *pers = "ssl_fork_server"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt srvcert; - mbedtls_pk_context pkey; - - mbedtls_net_init( &listen_fd ); - mbedtls_net_init( &client_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_entropy_init( &entropy ); - mbedtls_pk_init( &pkey ); - mbedtls_x509_crt_init( &srvcert ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - signal( SIGCHLD, SIG_IGN ); - - /* - * 0. Initial seeding of the RNG - */ - mbedtls_printf( "\n . Initial seeding of the random generator..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1. Load the certificates and private RSA key - */ - mbedtls_printf( " . Loading the server cert. and key..." ); - fflush( stdout ); - - /* - * This demonstration program uses embedded test certificates. - * Instead, you may want to use mbedtls_x509_crt_parse_file() to read the - * server and CA certificates, as well as mbedtls_pk_parse_keyfile(). - */ - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_srv_crt, - mbedtls_test_srv_crt_len ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_srv_key, - mbedtls_test_srv_key_len, NULL, 0 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1b. Prepare SSL configuration - */ - mbedtls_printf( " . Configuring SSL..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_SERVER, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - - mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL ); - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Setup the listening TCP socket - */ - mbedtls_printf( " . Bind on https://localhost:4433/ ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "4433", MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_bind returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - while( 1 ) - { - /* - * 3. Wait until a client connects - */ - mbedtls_net_init( &client_fd ); - mbedtls_ssl_init( &ssl ); - - mbedtls_printf( " . Waiting for a remote connection ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - NULL, 0, NULL ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_accept returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 3.5. Forking server thread - */ - - pid = fork(); - - mbedtls_printf( " . Forking to handle connection ..." ); - fflush( stdout ); - - if( pid < 0 ) - { - mbedtls_printf(" failed\n ! fork returned %d\n\n", pid ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - if( pid != 0 ) - { - if( ( ret = mbedtls_ctr_drbg_reseed( &ctr_drbg, - (const unsigned char *) "parent", - 6 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_reseed returned %d\n", ret ); - goto exit; - } - - mbedtls_net_free( &client_fd ); - continue; - } - - mbedtls_net_free( &listen_fd ); - - /* - * 4. Setup stuff - */ - mbedtls_printf( " . Setting up the SSL data...." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_reseed( &ctr_drbg, - (const unsigned char *) "child", - 5 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_reseed returned %d\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &client_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - mbedtls_printf( " ok\n" ); - - /* - * 5. Handshake - */ - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned %d\n\n", ret ); - goto exit; - } - } - - mbedtls_printf( " ok\n" ); - - /* - * 6. Read the HTTP Request - */ - mbedtls_printf( " < Read from client:" ); - fflush( stdout ); - - do - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - ret = mbedtls_ssl_read( &ssl, buf, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - break; - - case MBEDTLS_ERR_NET_CONN_RESET: - mbedtls_printf( " connection was reset by peer\n" ); - break; - - default: - mbedtls_printf( " mbedtls_ssl_read returned %d\n", ret ); - break; - } - - break; - } - - len = ret; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - - if( ret > 0 ) - break; - } - while( 1 ); - - /* - * 7. Write the 200 Response - */ - mbedtls_printf( " > Write to client:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, HTTP_RESPONSE, - mbedtls_ssl_get_ciphersuite( &ssl ) ); - - while( cnt++ < 100 ) - { - while( ( ret = mbedtls_ssl_write( &ssl, buf, len ) ) <= 0 ) - { - if( ret == MBEDTLS_ERR_NET_CONN_RESET ) - { - mbedtls_printf( " failed\n ! peer closed the connection\n\n" ); - goto exit; - } - - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto exit; - } - } - len = ret; - mbedtls_printf( " %d bytes written\n\n%s\n", len, (char *) buf ); - - mbedtls_net_usleep( 1000000 ); - } - - mbedtls_ssl_close_notify( &ssl ); - goto exit; - } - -exit: - mbedtls_net_free( &client_fd ); - mbedtls_net_free( &listen_fd ); - - mbedtls_x509_crt_free( &srvcert ); - mbedtls_pk_free( &pkey ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C && - MBEDTLS_SSL_TLS_C && MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C && - MBEDTLS_RSA_C && MBEDTLS_CTR_DRBG_C && MBEDTLS_PEM_PARSE_C && - ! _WIN32 */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_mail_client.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_mail_client.c deleted file mode 100644 index 974c170207..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_mail_client.c +++ /dev/null @@ -1,839 +0,0 @@ -/* - * SSL client for SMTP servers - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_CLI_C) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_CTR_DRBG_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \ - !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_CLI_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C " - "not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/base64.h" -#include "mbedtls/error.h" -#include "mbedtls/net.h" -#include "mbedtls/ssl.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" - -#include -#include - -#if !defined(_MSC_VER) || defined(EFIX64) || defined(EFI32) -#include -#else -#include -#endif - -#if defined(_WIN32) || defined(_WIN32_WCE) -#include -#include - -#if defined(_MSC_VER) -#if defined(_WIN32_WCE) -#pragma comment( lib, "ws2.lib" ) -#else -#pragma comment( lib, "ws2_32.lib" ) -#endif -#endif /* _MSC_VER */ -#endif - -#define DFL_SERVER_NAME "localhost" -#define DFL_SERVER_PORT "465" -#define DFL_USER_NAME "user" -#define DFL_USER_PWD "password" -#define DFL_MAIL_FROM "" -#define DFL_MAIL_TO "" -#define DFL_DEBUG_LEVEL 0 -#define DFL_CA_FILE "" -#define DFL_CRT_FILE "" -#define DFL_KEY_FILE "" -#define DFL_FORCE_CIPHER 0 -#define DFL_MODE 0 -#define DFL_AUTHENTICATION 0 - -#define MODE_SSL_TLS 0 -#define MODE_STARTTLS 0 - -#if defined(MBEDTLS_BASE64_C) -#define USAGE_AUTH \ - " authentication=%%d default: 0 (disabled)\n" \ - " user_name=%%s default: \"user\"\n" \ - " user_pwd=%%s default: \"password\"\n" -#else -#define USAGE_AUTH \ - " authentication options disabled. (Require MBEDTLS_BASE64_C)\n" -#endif /* MBEDTLS_BASE64_C */ - -#if defined(MBEDTLS_FS_IO) -#define USAGE_IO \ - " ca_file=%%s default: \"\" (pre-loaded)\n" \ - " crt_file=%%s default: \"\" (pre-loaded)\n" \ - " key_file=%%s default: \"\" (pre-loaded)\n" -#else -#define USAGE_IO \ - " No file operations available (MBEDTLS_FS_IO not defined)\n" -#endif /* MBEDTLS_FS_IO */ - -#define USAGE \ - "\n usage: ssl_mail_client param=<>...\n" \ - "\n acceptable parameters:\n" \ - " server_name=%%s default: localhost\n" \ - " server_port=%%d default: 4433\n" \ - " debug_level=%%d default: 0 (disabled)\n" \ - " mode=%%d default: 0 (SSL/TLS) (1 for STARTTLS)\n" \ - USAGE_AUTH \ - " mail_from=%%s default: \"\"\n" \ - " mail_to=%%s default: \"\"\n" \ - USAGE_IO \ - " force_ciphersuite= default: all enabled\n"\ - " acceptable ciphersuite names:\n" - -/* - * global options - */ -struct options -{ - const char *server_name; /* hostname of the server (client only) */ - const char *server_port; /* port on which the ssl service runs */ - int debug_level; /* level of debugging */ - int authentication; /* if authentication is required */ - int mode; /* SSL/TLS (0) or STARTTLS (1) */ - const char *user_name; /* username to use for authentication */ - const char *user_pwd; /* password to use for authentication */ - const char *mail_from; /* E-Mail address to use as sender */ - const char *mail_to; /* E-Mail address to use as recipient */ - const char *ca_file; /* the file with the CA certificate(s) */ - const char *crt_file; /* the file with the client certificate */ - const char *key_file; /* the file with the client key */ - int force_ciphersuite[2]; /* protocol/ciphersuite to use, or all */ -} opt; - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -static int do_handshake( mbedtls_ssl_context *ssl ) -{ - int ret; - uint32_t flags; - unsigned char buf[1024]; - memset(buf, 0, 1024); - - /* - * 4. Handshake - */ - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - while( ( ret = mbedtls_ssl_handshake( ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { -#if defined(MBEDTLS_ERROR_C) - mbedtls_strerror( ret, (char *) buf, 1024 ); -#endif - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned %d: %s\n\n", ret, buf ); - return( -1 ); - } - } - - mbedtls_printf( " ok\n [ Ciphersuite is %s ]\n", - mbedtls_ssl_get_ciphersuite( ssl ) ); - - /* - * 5. Verify the server certificate - */ - mbedtls_printf( " . Verifying peer X.509 certificate..." ); - - /* In real life, we probably want to bail out when ret != 0 */ - if( ( flags = mbedtls_ssl_get_verify_result( ssl ) ) != 0 ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - mbedtls_printf( " ok\n" ); - - mbedtls_printf( " . Peer certificate information ...\n" ); - mbedtls_x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", - mbedtls_ssl_get_peer_cert( ssl ) ); - mbedtls_printf( "%s\n", buf ); - - return( 0 ); -} - -static int write_ssl_data( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len ) -{ - int ret; - - mbedtls_printf("\n%s", buf); - while( len && ( ret = mbedtls_ssl_write( ssl, buf, len ) ) <= 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - return -1; - } - } - - return( 0 ); -} - -static int write_ssl_and_get_response( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len ) -{ - int ret; - unsigned char data[128]; - char code[4]; - size_t i, idx = 0; - - mbedtls_printf("\n%s", buf); - while( len && ( ret = mbedtls_ssl_write( ssl, buf, len ) ) <= 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - return -1; - } - } - - do - { - len = sizeof( data ) - 1; - memset( data, 0, sizeof( data ) ); - ret = mbedtls_ssl_read( ssl, data, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY ) - return -1; - - if( ret <= 0 ) - { - mbedtls_printf( "failed\n ! mbedtls_ssl_read returned %d\n\n", ret ); - return -1; - } - - mbedtls_printf("\n%s", data); - len = ret; - for( i = 0; i < len; i++ ) - { - if( data[i] != '\n' ) - { - if( idx < 4 ) - code[ idx++ ] = data[i]; - continue; - } - - if( idx == 4 && code[0] >= '0' && code[0] <= '9' && code[3] == ' ' ) - { - code[3] = '\0'; - return atoi( code ); - } - - idx = 0; - } - } - while( 1 ); -} - -static int write_and_get_response( mbedtls_net_context *sock_fd, unsigned char *buf, size_t len ) -{ - int ret; - unsigned char data[128]; - char code[4]; - size_t i, idx = 0; - - mbedtls_printf("\n%s", buf); - if( len && ( ret = mbedtls_net_send( sock_fd, buf, len ) ) <= 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - return -1; - } - - do - { - len = sizeof( data ) - 1; - memset( data, 0, sizeof( data ) ); - ret = mbedtls_net_recv( sock_fd, data, len ); - - if( ret <= 0 ) - { - mbedtls_printf( "failed\n ! read returned %d\n\n", ret ); - return -1; - } - - data[len] = '\0'; - mbedtls_printf("\n%s", data); - len = ret; - for( i = 0; i < len; i++ ) - { - if( data[i] != '\n' ) - { - if( idx < 4 ) - code[ idx++ ] = data[i]; - continue; - } - - if( idx == 4 && code[0] >= '0' && code[0] <= '9' && code[3] == ' ' ) - { - code[3] = '\0'; - return atoi( code ); - } - - idx = 0; - } - } - while( 1 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0, len; - mbedtls_net_context server_fd; - unsigned char buf[1024]; -#if defined(MBEDTLS_BASE64_C) - unsigned char base[1024]; -#endif - char hostname[32]; - const char *pers = "ssl_mail_client"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - mbedtls_pk_context pkey; - int i; - size_t n; - char *p, *q; - const int *list; - - /* - * Make sure memory references are valid in case we exit early. - */ - mbedtls_net_init( &server_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - memset( &buf, 0, sizeof( buf ) ); - mbedtls_x509_crt_init( &cacert ); - mbedtls_x509_crt_init( &clicert ); - mbedtls_pk_init( &pkey ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - - list = mbedtls_ssl_list_ciphersuites(); - while( *list ) - { - mbedtls_printf(" %s\n", mbedtls_ssl_get_ciphersuite_name( *list ) ); - list++; - } - mbedtls_printf("\n"); - goto exit; - } - - opt.server_name = DFL_SERVER_NAME; - opt.server_port = DFL_SERVER_PORT; - opt.debug_level = DFL_DEBUG_LEVEL; - opt.authentication = DFL_AUTHENTICATION; - opt.mode = DFL_MODE; - opt.user_name = DFL_USER_NAME; - opt.user_pwd = DFL_USER_PWD; - opt.mail_from = DFL_MAIL_FROM; - opt.mail_to = DFL_MAIL_TO; - opt.ca_file = DFL_CA_FILE; - opt.crt_file = DFL_CRT_FILE; - opt.key_file = DFL_KEY_FILE; - opt.force_ciphersuite[0]= DFL_FORCE_CIPHER; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "server_name" ) == 0 ) - opt.server_name = q; - else if( strcmp( p, "server_port" ) == 0 ) - opt.server_port = q; - else if( strcmp( p, "debug_level" ) == 0 ) - { - opt.debug_level = atoi( q ); - if( opt.debug_level < 0 || opt.debug_level > 65535 ) - goto usage; - } - else if( strcmp( p, "authentication" ) == 0 ) - { - opt.authentication = atoi( q ); - if( opt.authentication < 0 || opt.authentication > 1 ) - goto usage; - } - else if( strcmp( p, "mode" ) == 0 ) - { - opt.mode = atoi( q ); - if( opt.mode < 0 || opt.mode > 1 ) - goto usage; - } - else if( strcmp( p, "user_name" ) == 0 ) - opt.user_name = q; - else if( strcmp( p, "user_pwd" ) == 0 ) - opt.user_pwd = q; - else if( strcmp( p, "mail_from" ) == 0 ) - opt.mail_from = q; - else if( strcmp( p, "mail_to" ) == 0 ) - opt.mail_to = q; - else if( strcmp( p, "ca_file" ) == 0 ) - opt.ca_file = q; - else if( strcmp( p, "crt_file" ) == 0 ) - opt.crt_file = q; - else if( strcmp( p, "key_file" ) == 0 ) - opt.key_file = q; - else if( strcmp( p, "force_ciphersuite" ) == 0 ) - { - opt.force_ciphersuite[0] = -1; - - opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id( q ); - - if( opt.force_ciphersuite[0] <= 0 ) - goto usage; - - opt.force_ciphersuite[1] = 0; - } - else - goto usage; - } - - /* - * 0. Initialize the RNG and the session data - */ - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.1. Load the trusted CA - */ - mbedtls_printf( " . Loading the CA root certificate ..." ); - fflush( stdout ); - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.ca_file ) ) - ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file ); - else -#endif -#if defined(MBEDTLS_CERTS_C) - ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); -#else - { - ret = 1; - mbedtls_printf("MBEDTLS_CERTS_C not defined."); - } -#endif - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok (%d skipped)\n", ret ); - - /* - * 1.2. Load own certificate and private key - * - * (can be skipped if client authentication is not required) - */ - mbedtls_printf( " . Loading the client cert. and key..." ); - fflush( stdout ); - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.crt_file ) ) - ret = mbedtls_x509_crt_parse_file( &clicert, opt.crt_file ); - else -#endif -#if defined(MBEDTLS_CERTS_C) - ret = mbedtls_x509_crt_parse( &clicert, (const unsigned char *) mbedtls_test_cli_crt, - mbedtls_test_cli_crt_len ); -#else - { - ret = -1; - mbedtls_printf("MBEDTLS_CERTS_C not defined."); - } -#endif - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.key_file ) ) - ret = mbedtls_pk_parse_keyfile( &pkey, opt.key_file, "" ); - else -#endif -#if defined(MBEDTLS_CERTS_C) && defined(MBEDTLS_PEM_PARSE_C) - ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_cli_key, - mbedtls_test_cli_key_len, NULL, 0 ); -#else - { - ret = -1; - mbedtls_printf("MBEDTLS_CERTS_C or MBEDTLS_PEM_PARSE_C not defined."); - } -#endif - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Start the connection - */ - mbedtls_printf( " . Connecting to tcp/%s/%s...", opt.server_name, - opt.server_port ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, opt.server_name, - opt.server_port, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 3. Setup stuff - */ - mbedtls_printf( " . Setting up the SSL/TLS structure..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - /* OPTIONAL is not optimal for security, - * but makes interop easier in this simplified example */ - mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_OPTIONAL ); - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - - if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) - mbedtls_ssl_conf_ciphersuites( &conf, opt.force_ciphersuite ); - - mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &clicert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - mbedtls_printf( " ok\n" ); - - if( opt.mode == MODE_SSL_TLS ) - { - if( do_handshake( &ssl ) != 0 ) - goto exit; - - mbedtls_printf( " > Get header from server:" ); - fflush( stdout ); - - ret = write_ssl_and_get_response( &ssl, buf, 0 ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write EHLO to server:" ); - fflush( stdout ); - - gethostname( hostname, 32 ); - len = sprintf( (char *) buf, "EHLO %s\r\n", hostname ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - } - else - { - mbedtls_printf( " > Get header from server:" ); - fflush( stdout ); - - ret = write_and_get_response( &server_fd, buf, 0 ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write EHLO to server:" ); - fflush( stdout ); - - gethostname( hostname, 32 ); - len = sprintf( (char *) buf, "EHLO %s\r\n", hostname ); - ret = write_and_get_response( &server_fd, buf, len ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write STARTTLS to server:" ); - fflush( stdout ); - - gethostname( hostname, 32 ); - len = sprintf( (char *) buf, "STARTTLS\r\n" ); - ret = write_and_get_response( &server_fd, buf, len ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - if( do_handshake( &ssl ) != 0 ) - goto exit; - } - -#if defined(MBEDTLS_BASE64_C) - if( opt.authentication ) - { - mbedtls_printf( " > Write AUTH LOGIN to server:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, "AUTH LOGIN\r\n" ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 200 || ret > 399 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write username to server: %s", opt.user_name ); - fflush( stdout ); - - ret = mbedtls_base64_encode( base, sizeof( base ), &n, (const unsigned char *) opt.user_name, - strlen( opt.user_name ) ); - - if( ret != 0 ) { - mbedtls_printf( " failed\n ! mbedtls_base64_encode returned %d\n\n", ret ); - goto exit; - } - len = sprintf( (char *) buf, "%s\r\n", base ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 300 || ret > 399 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write password to server: %s", opt.user_pwd ); - fflush( stdout ); - - ret = mbedtls_base64_encode( base, sizeof( base ), &n, (const unsigned char *) opt.user_pwd, - strlen( opt.user_pwd ) ); - - if( ret != 0 ) { - mbedtls_printf( " failed\n ! mbedtls_base64_encode returned %d\n\n", ret ); - goto exit; - } - len = sprintf( (char *) buf, "%s\r\n", base ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 200 || ret > 399 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - } -#endif - - mbedtls_printf( " > Write MAIL FROM to server:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, "MAIL FROM:<%s>\r\n", opt.mail_from ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write RCPT TO to server:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, "RCPT TO:<%s>\r\n", opt.mail_to ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write DATA to server:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, "DATA\r\n" ); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 300 || ret > 399 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_printf( " > Write content to server:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, "From: %s\r\nSubject: mbed TLS Test mail\r\n\r\n" - "This is a simple test mail from the " - "mbed TLS mail client example.\r\n" - "\r\n" - "Enjoy!", opt.mail_from ); - ret = write_ssl_data( &ssl, buf, len ); - - len = sprintf( (char *) buf, "\r\n.\r\n"); - ret = write_ssl_and_get_response( &ssl, buf, len ); - if( ret < 200 || ret > 299 ) - { - mbedtls_printf( " failed\n ! server responded with %d\n\n", ret ); - goto exit; - } - - mbedtls_printf(" ok\n" ); - - mbedtls_ssl_close_notify( &ssl ); - -exit: - - mbedtls_net_free( &server_fd ); - mbedtls_x509_crt_free( &clicert ); - mbedtls_x509_crt_free( &cacert ); - mbedtls_pk_free( &pkey ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && - MBEDTLS_SSL_CLI_C && MBEDTLS_NET_C && MBEDTLS_RSA_C ** - MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_pthread_server.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_pthread_server.c deleted file mode 100644 index c4b02ac54c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_pthread_server.c +++ /dev/null @@ -1,529 +0,0 @@ -/* - * SSL server demonstration program using pthread for handling multiple - * clients. - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_SSL_TLS_C) || \ - !defined(MBEDTLS_SSL_SRV_C) || !defined(MBEDTLS_NET_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_THREADING_C) || !defined(MBEDTLS_THREADING_PTHREAD) || \ - !defined(MBEDTLS_PEM_PARSE_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_ENTROPY_C " - "and/or MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C and/or " - "MBEDTLS_THREADING_C and/or MBEDTLS_THREADING_PTHREAD " - "and/or MBEDTLS_PEM_PARSE_C not defined.\n"); - return( 0 ); -} -#else - -#include -#include - -#if defined(_WIN32) -#include -#endif - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" -#include "mbedtls/ssl.h" -#include "mbedtls/net.h" -#include "mbedtls/error.h" - -#if defined(MBEDTLS_SSL_CACHE_C) -#include "mbedtls/ssl_cache.h" -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -#define HTTP_RESPONSE \ - "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

mbed TLS Test Server

\r\n" \ - "

Successful connection using: %s

\r\n" - -#define DEBUG_LEVEL 0 - -#define MAX_NUM_THREADS 5 - -mbedtls_threading_mutex_t debug_mutex; - -static void my_mutexed_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - long int thread_id = (long int) pthread_self(); - - mbedtls_mutex_lock( &debug_mutex ); - - ((void) level); - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: [ #%ld ] %s", - file, line, thread_id, str ); - fflush( (FILE *) ctx ); - - mbedtls_mutex_unlock( &debug_mutex ); -} - -typedef struct { - mbedtls_net_context client_fd; - int thread_complete; - const mbedtls_ssl_config *config; -} thread_info_t; - -typedef struct { - int active; - thread_info_t data; - pthread_t thread; -} pthread_info_t; - -static thread_info_t base_info; -static pthread_info_t threads[MAX_NUM_THREADS]; - -static void *handle_ssl_connection( void *data ) -{ - int ret, len; - thread_info_t *thread_info = (thread_info_t *) data; - mbedtls_net_context *client_fd = &thread_info->client_fd; - long int thread_id = (long int) pthread_self(); - unsigned char buf[1024]; - mbedtls_ssl_context ssl; - - /* Make sure memory references are valid */ - mbedtls_ssl_init( &ssl ); - - mbedtls_printf( " [ #%ld ] Setting up SSL/TLS data\n", thread_id ); - - /* - * 4. Get the SSL context ready - */ - if( ( ret = mbedtls_ssl_setup( &ssl, thread_info->config ) ) != 0 ) - { - mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_setup returned -0x%04x\n", - thread_id, -ret ); - goto thread_exit; - } - - mbedtls_ssl_set_bio( &ssl, client_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - /* - * 5. Handshake - */ - mbedtls_printf( " [ #%ld ] Performing the SSL/TLS handshake\n", thread_id ); - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_handshake returned -0x%04x\n", - thread_id, -ret ); - goto thread_exit; - } - } - - mbedtls_printf( " [ #%ld ] ok\n", thread_id ); - - /* - * 6. Read the HTTP Request - */ - mbedtls_printf( " [ #%ld ] < Read from client\n", thread_id ); - - do - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - ret = mbedtls_ssl_read( &ssl, buf, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " [ #%ld ] connection was closed gracefully\n", - thread_id ); - goto thread_exit; - - case MBEDTLS_ERR_NET_CONN_RESET: - mbedtls_printf( " [ #%ld ] connection was reset by peer\n", - thread_id ); - goto thread_exit; - - default: - mbedtls_printf( " [ #%ld ] mbedtls_ssl_read returned -0x%04x\n", - thread_id, -ret ); - goto thread_exit; - } - } - - len = ret; - mbedtls_printf( " [ #%ld ] %d bytes read\n=====\n%s\n=====\n", - thread_id, len, (char *) buf ); - - if( ret > 0 ) - break; - } - while( 1 ); - - /* - * 7. Write the 200 Response - */ - mbedtls_printf( " [ #%ld ] > Write to client:\n", thread_id ); - - len = sprintf( (char *) buf, HTTP_RESPONSE, - mbedtls_ssl_get_ciphersuite( &ssl ) ); - - while( ( ret = mbedtls_ssl_write( &ssl, buf, len ) ) <= 0 ) - { - if( ret == MBEDTLS_ERR_NET_CONN_RESET ) - { - mbedtls_printf( " [ #%ld ] failed: peer closed the connection\n", - thread_id ); - goto thread_exit; - } - - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_write returned -0x%04x\n", - thread_id, ret ); - goto thread_exit; - } - } - - len = ret; - mbedtls_printf( " [ #%ld ] %d bytes written\n=====\n%s\n=====\n", - thread_id, len, (char *) buf ); - - mbedtls_printf( " [ #%ld ] . Closing the connection...", thread_id ); - - while( ( ret = mbedtls_ssl_close_notify( &ssl ) ) < 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_close_notify returned -0x%04x\n", - thread_id, ret ); - goto thread_exit; - } - } - - mbedtls_printf( " ok\n" ); - - ret = 0; - -thread_exit: - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf(" [ #%ld ] Last error was: -0x%04x - %s\n\n", - thread_id, -ret, error_buf ); - } -#endif - - mbedtls_net_free( client_fd ); - mbedtls_ssl_free( &ssl ); - - thread_info->thread_complete = 1; - - return( NULL ); -} - -static int thread_create( mbedtls_net_context *client_fd ) -{ - int ret, i; - - /* - * Find in-active or finished thread slot - */ - for( i = 0; i < MAX_NUM_THREADS; i++ ) - { - if( threads[i].active == 0 ) - break; - - if( threads[i].data.thread_complete == 1 ) - { - mbedtls_printf( " [ main ] Cleaning up thread %d\n", i ); - pthread_join(threads[i].thread, NULL ); - memset( &threads[i], 0, sizeof(pthread_info_t) ); - break; - } - } - - if( i == MAX_NUM_THREADS ) - return( -1 ); - - /* - * Fill thread-info for thread - */ - memcpy( &threads[i].data, &base_info, sizeof(base_info) ); - threads[i].active = 1; - memcpy( &threads[i].data.client_fd, client_fd, sizeof( mbedtls_net_context ) ); - - if( ( ret = pthread_create( &threads[i].thread, NULL, handle_ssl_connection, - &threads[i].data ) ) != 0 ) - { - return( ret ); - } - - return( 0 ); -} - -int main( void ) -{ - int ret; - mbedtls_net_context listen_fd, client_fd; - const char pers[] = "ssl_pthread_server"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_config conf; - mbedtls_x509_crt srvcert; - mbedtls_x509_crt cachain; - mbedtls_pk_context pkey; -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - unsigned char alloc_buf[100000]; -#endif -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_context cache; -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_init( alloc_buf, sizeof(alloc_buf) ); -#endif - -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_init( &cache ); -#endif - - mbedtls_x509_crt_init( &srvcert ); - mbedtls_x509_crt_init( &cachain ); - - mbedtls_ssl_config_init( &conf ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - memset( threads, 0, sizeof(threads) ); - mbedtls_net_init( &listen_fd ); - mbedtls_net_init( &client_fd ); - - mbedtls_mutex_init( &debug_mutex ); - - base_info.config = &conf; - - /* - * We use only a single entropy source that is used in all the threads. - */ - mbedtls_entropy_init( &entropy ); - - /* - * 1. Load the certificates and private RSA key - */ - mbedtls_printf( "\n . Loading the server cert. and key..." ); - fflush( stdout ); - - /* - * This demonstration program uses embedded test certificates. - * Instead, you may want to use mbedtls_x509_crt_parse_file() to read the - * server and CA certificates, as well as mbedtls_pk_parse_keyfile(). - */ - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_srv_crt, - mbedtls_test_srv_crt_len ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_x509_crt_parse( &cachain, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - mbedtls_pk_init( &pkey ); - ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_srv_key, - mbedtls_test_srv_key_len, NULL, 0 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1b. Seed the random number generator - */ - mbedtls_printf( " . Seeding the random number generator..." ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed: mbedtls_ctr_drbg_seed returned -0x%04x\n", - -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1c. Prepare SSL configuration - */ - mbedtls_printf( " . Setting up the SSL data...." ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_SERVER, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed: mbedtls_ssl_config_defaults returned -0x%04x\n", - -ret ); - goto exit; - } - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_mutexed_debug, stdout ); - - /* mbedtls_ssl_cache_get() and mbedtls_ssl_cache_set() are thread-safe if - * MBEDTLS_THREADING_C is set. - */ -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_conf_session_cache( &conf, &cache, - mbedtls_ssl_cache_get, - mbedtls_ssl_cache_set ); -#endif - - mbedtls_ssl_conf_ca_chain( &conf, &cachain, NULL ); - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - - /* - * 2. Setup the listening TCP socket - */ - mbedtls_printf( " . Bind on https://localhost:4433/ ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "4433", MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_bind returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -reset: -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf( " [ main ] Last error was: -0x%04x - %s\n", -ret, error_buf ); - } -#endif - - /* - * 3. Wait until a client connects - */ - mbedtls_printf( " [ main ] Waiting for a remote connection\n" ); - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - NULL, 0, NULL ) ) != 0 ) - { - mbedtls_printf( " [ main ] failed: mbedtls_net_accept returned -0x%04x\n", ret ); - goto exit; - } - - mbedtls_printf( " [ main ] ok\n" ); - mbedtls_printf( " [ main ] Creating a new thread\n" ); - - if( ( ret = thread_create( &client_fd ) ) != 0 ) - { - mbedtls_printf( " [ main ] failed: thread_create returned %d\n", ret ); - mbedtls_net_free( &client_fd ); - goto reset; - } - - ret = 0; - goto reset; - -exit: - mbedtls_x509_crt_free( &srvcert ); - mbedtls_pk_free( &pkey ); -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_free( &cache ); -#endif - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - mbedtls_ssl_config_free( &conf ); - - mbedtls_net_free( &listen_fd ); - - mbedtls_mutex_free( &debug_mutex ); - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_free(); -#endif - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} - -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C && - MBEDTLS_SSL_TLS_C && MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C && - MBEDTLS_RSA_C && MBEDTLS_CTR_DRBG_C && MBEDTLS_THREADING_C && - MBEDTLS_THREADING_PTHREAD && MBEDTLS_PEM_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server.c deleted file mode 100644 index 70efba9386..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server.c +++ /dev/null @@ -1,398 +0,0 @@ -/* - * SSL server demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_CERTS_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_SSL_TLS_C) || \ - !defined(MBEDTLS_SSL_SRV_C) || !defined(MBEDTLS_NET_C) || \ - !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_PEM_PARSE_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_CERTS_C and/or MBEDTLS_ENTROPY_C " - "and/or MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C " - "and/or MBEDTLS_PEM_PARSE_C not defined.\n"); - return( 0 ); -} -#else - -#include -#include - -#if defined(_WIN32) -#include -#endif - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" -#include "mbedtls/ssl.h" -#include "mbedtls/net.h" -#include "mbedtls/error.h" -#include "mbedtls/debug.h" - -#if defined(MBEDTLS_SSL_CACHE_C) -#include "mbedtls/ssl_cache.h" -#endif - -#define HTTP_RESPONSE \ - "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

mbed TLS Test Server

\r\n" \ - "

Successful connection using: %s

\r\n" - -#define DEBUG_LEVEL 0 - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -int main( void ) -{ - int ret, len; - mbedtls_net_context listen_fd, client_fd; - unsigned char buf[1024]; - const char *pers = "ssl_server"; - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt srvcert; - mbedtls_pk_context pkey; -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_context cache; -#endif - - mbedtls_net_init( &listen_fd ); - mbedtls_net_init( &client_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_init( &cache ); -#endif - mbedtls_x509_crt_init( &srvcert ); - mbedtls_pk_init( &pkey ); - mbedtls_entropy_init( &entropy ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - -#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold( DEBUG_LEVEL ); -#endif - - /* - * 1. Load the certificates and private RSA key - */ - mbedtls_printf( "\n . Loading the server cert. and key..." ); - fflush( stdout ); - - /* - * This demonstration program uses embedded test certificates. - * Instead, you may want to use mbedtls_x509_crt_parse_file() to read the - * server and CA certificates, as well as mbedtls_pk_parse_keyfile(). - */ - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_srv_crt, - mbedtls_test_srv_crt_len ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_x509_crt_parse( &srvcert, (const unsigned char *) mbedtls_test_cas_pem, - mbedtls_test_cas_pem_len ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_pk_parse_key( &pkey, (const unsigned char *) mbedtls_test_srv_key, - mbedtls_test_srv_key_len, NULL, 0 ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Setup the listening TCP socket - */ - mbedtls_printf( " . Bind on https://localhost:4433/ ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "4433", MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_bind returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 3. Seed the RNG - */ - mbedtls_printf( " . Seeding the random number generator..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 4. Setup stuff - */ - mbedtls_printf( " . Setting up the SSL data...." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_SERVER, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_conf_session_cache( &conf, &cache, - mbedtls_ssl_cache_get, - mbedtls_ssl_cache_set ); -#endif - - mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL ); - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -reset: -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf("Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &client_fd ); - - mbedtls_ssl_session_reset( &ssl ); - - /* - * 3. Wait until a client connects - */ - mbedtls_printf( " . Waiting for a remote connection ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - NULL, 0, NULL ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_accept returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_set_bio( &ssl, &client_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - mbedtls_printf( " ok\n" ); - - /* - * 5. Handshake - */ - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned %d\n\n", ret ); - goto reset; - } - } - - mbedtls_printf( " ok\n" ); - - /* - * 6. Read the HTTP Request - */ - mbedtls_printf( " < Read from client:" ); - fflush( stdout ); - - do - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - ret = mbedtls_ssl_read( &ssl, buf, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - break; - - case MBEDTLS_ERR_NET_CONN_RESET: - mbedtls_printf( " connection was reset by peer\n" ); - break; - - default: - mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n", -ret ); - break; - } - - break; - } - - len = ret; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - - if( ret > 0 ) - break; - } - while( 1 ); - - /* - * 7. Write the 200 Response - */ - mbedtls_printf( " > Write to client:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, HTTP_RESPONSE, - mbedtls_ssl_get_ciphersuite( &ssl ) ); - - while( ( ret = mbedtls_ssl_write( &ssl, buf, len ) ) <= 0 ) - { - if( ret == MBEDTLS_ERR_NET_CONN_RESET ) - { - mbedtls_printf( " failed\n ! peer closed the connection\n\n" ); - goto reset; - } - - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto exit; - } - } - - len = ret; - mbedtls_printf( " %d bytes written\n\n%s\n", len, (char *) buf ); - - mbedtls_printf( " . Closing the connection..." ); - - while( ( ret = mbedtls_ssl_close_notify( &ssl ) ) < 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_close_notify returned %d\n\n", ret ); - goto reset; - } - } - - mbedtls_printf( " ok\n" ); - - ret = 0; - goto reset; - -exit: - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf("Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &client_fd ); - mbedtls_net_free( &listen_fd ); - - mbedtls_x509_crt_free( &srvcert ); - mbedtls_pk_free( &pkey ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_free( &cache ); -#endif - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_CERTS_C && MBEDTLS_ENTROPY_C && - MBEDTLS_SSL_TLS_C && MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C && - MBEDTLS_RSA_C && MBEDTLS_CTR_DRBG_C && MBEDTLS_X509_CRT_PARSE_C - && MBEDTLS_FS_IO && MBEDTLS_PEM_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server2.c b/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server2.c deleted file mode 100644 index b586a70084..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/ssl/ssl_server2.c +++ /dev/null @@ -1,2335 +0,0 @@ -/* - * SSL client with options - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_SRV_C) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_SRV_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_CTR_DRBG_C and/or not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/net.h" -#include "mbedtls/ssl.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/certs.h" -#include "mbedtls/x509.h" -#include "mbedtls/error.h" -#include "mbedtls/debug.h" -#include "mbedtls/timing.h" - -#include -#include -#include - -#if !defined(_WIN32) -#include -#endif - -#if defined(MBEDTLS_SSL_CACHE_C) -#include "mbedtls/ssl_cache.h" -#endif - -#if defined(MBEDTLS_SSL_TICKET_C) -#include "mbedtls/ssl_ticket.h" -#endif - -#if defined(MBEDTLS_SSL_COOKIE_C) -#include "mbedtls/ssl_cookie.h" -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) && defined(MBEDTLS_FS_IO) -#define SNI_OPTION -#endif - -#if defined(_WIN32) -#include -#endif - -#define DFL_SERVER_ADDR NULL -#define DFL_SERVER_PORT "4433" -#define DFL_DEBUG_LEVEL 0 -#define DFL_NBIO 0 -#define DFL_READ_TIMEOUT 0 -#define DFL_CA_FILE "" -#define DFL_CA_PATH "" -#define DFL_CRT_FILE "" -#define DFL_KEY_FILE "" -#define DFL_CRT_FILE2 "" -#define DFL_KEY_FILE2 "" -#define DFL_PSK "" -#define DFL_PSK_IDENTITY "Client_identity" -#define DFL_ECJPAKE_PW NULL -#define DFL_PSK_LIST NULL -#define DFL_FORCE_CIPHER 0 -#define DFL_VERSION_SUITES NULL -#define DFL_RENEGOTIATION MBEDTLS_SSL_RENEGOTIATION_DISABLED -#define DFL_ALLOW_LEGACY -2 -#define DFL_RENEGOTIATE 0 -#define DFL_RENEGO_DELAY -2 -#define DFL_RENEGO_PERIOD -1 -#define DFL_EXCHANGES 1 -#define DFL_MIN_VERSION -1 -#define DFL_MAX_VERSION -1 -#define DFL_ARC4 -1 -#define DFL_AUTH_MODE -1 -#define DFL_MFL_CODE MBEDTLS_SSL_MAX_FRAG_LEN_NONE -#define DFL_TRUNC_HMAC -1 -#define DFL_TICKETS MBEDTLS_SSL_SESSION_TICKETS_ENABLED -#define DFL_TICKET_TIMEOUT 86400 -#define DFL_CACHE_MAX -1 -#define DFL_CACHE_TIMEOUT -1 -#define DFL_SNI NULL -#define DFL_ALPN_STRING NULL -#define DFL_DHM_FILE NULL -#define DFL_TRANSPORT MBEDTLS_SSL_TRANSPORT_STREAM -#define DFL_COOKIES 1 -#define DFL_ANTI_REPLAY -1 -#define DFL_HS_TO_MIN 0 -#define DFL_HS_TO_MAX 0 -#define DFL_BADMAC_LIMIT -1 -#define DFL_EXTENDED_MS -1 -#define DFL_ETM -1 - -#define LONG_RESPONSE "

01-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \ - "02-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \ - "03-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \ - "04-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \ - "05-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \ - "06-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \ - "07-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah

\r\n" - -/* Uncomment LONG_RESPONSE at the end of HTTP_RESPONSE to test sending longer - * packets (for fragmentation purposes) */ -#define HTTP_RESPONSE \ - "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n" \ - "

mbed TLS Test Server

\r\n" \ - "

Successful connection using: %s

\r\n" // LONG_RESPONSE - -/* - * Size of the basic I/O buffer. Able to hold our default response. - * - * You will need to adapt the mbedtls_ssl_get_bytes_avail() test in ssl-opt.sh - * if you change this value to something outside the range <= 100 or > 500 - */ -#define IO_BUF_LEN 200 - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -#if defined(MBEDTLS_FS_IO) -#define USAGE_IO \ - " ca_file=%%s The single file containing the top-level CA(s) you fully trust\n" \ - " default: \"\" (pre-loaded)\n" \ - " ca_path=%%s The path containing the top-level CA(s) you fully trust\n" \ - " default: \"\" (pre-loaded) (overrides ca_file)\n" \ - " crt_file=%%s Your own cert and chain (in bottom to top order, top may be omitted)\n" \ - " default: see note after key_file2\n" \ - " key_file=%%s default: see note after key_file2\n" \ - " crt_file2=%%s Your second cert and chain (in bottom to top order, top may be omitted)\n" \ - " default: see note after key_file2\n" \ - " key_file2=%%s default: see note below\n" \ - " note: if neither crt_file/key_file nor crt_file2/key_file2 are used,\n" \ - " preloaded certificate(s) and key(s) are used if available\n" \ - " dhm_file=%%s File containing Diffie-Hellman parameters\n" \ - " default: preloaded parameters\n" -#else -#define USAGE_IO \ - "\n" \ - " No file operations available (MBEDTLS_FS_IO not defined)\n" \ - "\n" -#endif /* MBEDTLS_FS_IO */ -#else -#define USAGE_IO "" -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) -#define USAGE_PSK \ - " psk=%%s default: \"\" (in hex, without 0x)\n" \ - " psk_identity=%%s default: \"Client_identity\"\n" -#else -#define USAGE_PSK "" -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) -#define USAGE_TICKETS \ - " tickets=%%d default: 1 (enabled)\n" \ - " ticket_timeout=%%d default: 86400 (one day)\n" -#else -#define USAGE_TICKETS "" -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ - -#if defined(MBEDTLS_SSL_CACHE_C) -#define USAGE_CACHE \ - " cache_max=%%d default: cache default (50)\n" \ - " cache_timeout=%%d default: cache default (1d)\n" -#else -#define USAGE_CACHE "" -#endif /* MBEDTLS_SSL_CACHE_C */ - -#if defined(SNI_OPTION) -#define USAGE_SNI \ - " sni=%%s name1,cert1,key1,ca1,crl1,auth1[,...]\n" \ - " default: disabled\n" -#else -#define USAGE_SNI "" -#endif /* SNI_OPTION */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) -#define USAGE_MAX_FRAG_LEN \ - " max_frag_len=%%d default: 16384 (tls default)\n" \ - " options: 512, 1024, 2048, 4096\n" -#else -#define USAGE_MAX_FRAG_LEN "" -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) -#define USAGE_TRUNC_HMAC \ - " trunc_hmac=%%d default: library default\n" -#else -#define USAGE_TRUNC_HMAC "" -#endif - -#if defined(MBEDTLS_SSL_ALPN) -#define USAGE_ALPN \ - " alpn=%%s default: \"\" (disabled)\n" \ - " example: spdy/1,http/1.1\n" -#else -#define USAGE_ALPN "" -#endif /* MBEDTLS_SSL_ALPN */ - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) -#define USAGE_COOKIES \ - " cookies=0/1/-1 default: 1 (enabled)\n" \ - " 0: disabled, -1: library default (broken)\n" -#else -#define USAGE_COOKIES "" -#endif - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) -#define USAGE_ANTI_REPLAY \ - " anti_replay=0/1 default: (library default: enabled)\n" -#else -#define USAGE_ANTI_REPLAY "" -#endif - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) -#define USAGE_BADMAC_LIMIT \ - " badmac_limit=%%d default: (library default: disabled)\n" -#else -#define USAGE_BADMAC_LIMIT "" -#endif - -#if defined(MBEDTLS_SSL_PROTO_DTLS) -#define USAGE_DTLS \ - " dtls=%%d default: 0 (TLS)\n" \ - " hs_timeout=%%d-%%d default: (library default: 1000-60000)\n" \ - " range of DTLS handshake timeouts in millisecs\n" -#else -#define USAGE_DTLS "" -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) -#define USAGE_EMS \ - " extended_ms=0/1 default: (library default: on)\n" -#else -#define USAGE_EMS "" -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) -#define USAGE_ETM \ - " etm=0/1 default: (library default: on)\n" -#else -#define USAGE_ETM "" -#endif - -#if defined(MBEDTLS_SSL_RENEGOTIATION) -#define USAGE_RENEGO \ - " renegotiation=%%d default: 0 (disabled)\n" \ - " renegotiate=%%d default: 0 (disabled)\n" \ - " renego_delay=%%d default: -2 (library default)\n" \ - " renego_period=%%d default: (library default)\n" -#else -#define USAGE_RENEGO "" -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -#define USAGE_ECJPAKE \ - " ecjpake_pw=%%s default: none (disabled)\n" -#else -#define USAGE_ECJPAKE "" -#endif - -#define USAGE \ - "\n usage: ssl_server2 param=<>...\n" \ - "\n acceptable parameters:\n" \ - " server_addr=%%d default: (all interfaces)\n" \ - " server_port=%%d default: 4433\n" \ - " debug_level=%%d default: 0 (disabled)\n" \ - " nbio=%%d default: 0 (blocking I/O)\n" \ - " options: 1 (non-blocking), 2 (added delays)\n" \ - " read_timeout=%%d default: 0 ms (no timeout)\n" \ - "\n" \ - USAGE_DTLS \ - USAGE_COOKIES \ - USAGE_ANTI_REPLAY \ - USAGE_BADMAC_LIMIT \ - "\n" \ - " auth_mode=%%s default: (library default: none)\n" \ - " options: none, optional, required\n" \ - USAGE_IO \ - USAGE_SNI \ - "\n" \ - USAGE_PSK \ - USAGE_ECJPAKE \ - "\n" \ - " allow_legacy=%%d default: (library default: no)\n" \ - USAGE_RENEGO \ - " exchanges=%%d default: 1\n" \ - "\n" \ - USAGE_TICKETS \ - USAGE_CACHE \ - USAGE_MAX_FRAG_LEN \ - USAGE_TRUNC_HMAC \ - USAGE_ALPN \ - USAGE_EMS \ - USAGE_ETM \ - "\n" \ - " arc4=%%d default: (library default: 0)\n" \ - " min_version=%%s default: (library default: tls1)\n" \ - " max_version=%%s default: (library default: tls1_2)\n" \ - " force_version=%%s default: \"\" (none)\n" \ - " options: ssl3, tls1, tls1_1, tls1_2, dtls1, dtls1_2\n" \ - "\n" \ - " version_suites=a,b,c,d per-version ciphersuites\n" \ - " in order from ssl3 to tls1_2\n" \ - " default: all enabled\n" \ - " force_ciphersuite= default: all enabled\n" \ - " acceptable ciphersuite names:\n" - -/* - * global options - */ -struct options -{ - const char *server_addr; /* address on which the ssl service runs */ - const char *server_port; /* port on which the ssl service runs */ - int debug_level; /* level of debugging */ - int nbio; /* should I/O be blocking? */ - uint32_t read_timeout; /* timeout on mbedtls_ssl_read() in milliseconds */ - const char *ca_file; /* the file with the CA certificate(s) */ - const char *ca_path; /* the path with the CA certificate(s) reside */ - const char *crt_file; /* the file with the server certificate */ - const char *key_file; /* the file with the server key */ - const char *crt_file2; /* the file with the 2nd server certificate */ - const char *key_file2; /* the file with the 2nd server key */ - const char *psk; /* the pre-shared key */ - const char *psk_identity; /* the pre-shared key identity */ - char *psk_list; /* list of PSK id/key pairs for callback */ - const char *ecjpake_pw; /* the EC J-PAKE password */ - int force_ciphersuite[2]; /* protocol/ciphersuite to use, or all */ - const char *version_suites; /* per-version ciphersuites */ - int renegotiation; /* enable / disable renegotiation */ - int allow_legacy; /* allow legacy renegotiation */ - int renegotiate; /* attempt renegotiation? */ - int renego_delay; /* delay before enforcing renegotiation */ - int renego_period; /* period for automatic renegotiation */ - int exchanges; /* number of data exchanges */ - int min_version; /* minimum protocol version accepted */ - int max_version; /* maximum protocol version accepted */ - int arc4; /* flag for arc4 suites support */ - int auth_mode; /* verify mode for connection */ - unsigned char mfl_code; /* code for maximum fragment length */ - int trunc_hmac; /* accept truncated hmac? */ - int tickets; /* enable / disable session tickets */ - int ticket_timeout; /* session ticket lifetime */ - int cache_max; /* max number of session cache entries */ - int cache_timeout; /* expiration delay of session cache entries */ - char *sni; /* string describing sni information */ - const char *alpn_string; /* ALPN supported protocols */ - const char *dhm_file; /* the file with the DH parameters */ - int extended_ms; /* allow negotiation of extended MS? */ - int etm; /* allow negotiation of encrypt-then-MAC? */ - int transport; /* TLS or DTLS? */ - int cookies; /* Use cookies for DTLS? -1 to break them */ - int anti_replay; /* Use anti-replay for DTLS? -1 for default */ - uint32_t hs_to_min; /* Initial value of DTLS handshake timer */ - uint32_t hs_to_max; /* Max value of DTLS handshake timer */ - int badmac_limit; /* Limit of records with bad MAC */ -} opt; - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - const char *p, *basename; - - /* Extract basename from file */ - for( p = basename = file; *p != '\0'; p++ ) - if( *p == '/' || *p == '\\' ) - basename = p + 1; - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: |%d| %s", basename, line, level, str ); - fflush( (FILE *) ctx ); -} - -/* - * Test recv/send functions that make sure each try returns - * WANT_READ/WANT_WRITE at least once before sucesseding - */ -static int my_recv( void *ctx, unsigned char *buf, size_t len ) -{ - static int first_try = 1; - int ret; - - if( first_try ) - { - first_try = 0; - return( MBEDTLS_ERR_SSL_WANT_READ ); - } - - ret = mbedtls_net_recv( ctx, buf, len ); - if( ret != MBEDTLS_ERR_SSL_WANT_READ ) - first_try = 1; /* Next call will be a new operation */ - return( ret ); -} - -static int my_send( void *ctx, const unsigned char *buf, size_t len ) -{ - static int first_try = 1; - int ret; - - if( first_try ) - { - first_try = 0; - return( MBEDTLS_ERR_SSL_WANT_WRITE ); - } - - ret = mbedtls_net_send( ctx, buf, len ); - if( ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - first_try = 1; /* Next call will be a new operation */ - return( ret ); -} - -/* - * Return authmode from string, or -1 on error - */ -static int get_auth_mode( const char *s ) -{ - if( strcmp( s, "none" ) == 0 ) - return( MBEDTLS_SSL_VERIFY_NONE ); - if( strcmp( s, "optional" ) == 0 ) - return( MBEDTLS_SSL_VERIFY_OPTIONAL ); - if( strcmp( s, "required" ) == 0 ) - return( MBEDTLS_SSL_VERIFY_REQUIRED ); - - return( -1 ); -} - -/* - * Used by sni_parse and psk_parse to handle coma-separated lists - */ -#define GET_ITEM( dst ) \ - dst = p; \ - while( *p != ',' ) \ - if( ++p > end ) \ - goto error; \ - *p++ = '\0'; - -#if defined(SNI_OPTION) -typedef struct _sni_entry sni_entry; - -struct _sni_entry { - const char *name; - mbedtls_x509_crt *cert; - mbedtls_pk_context *key; - mbedtls_x509_crt* ca; - mbedtls_x509_crl* crl; - int authmode; - sni_entry *next; -}; - -void sni_free( sni_entry *head ) -{ - sni_entry *cur = head, *next; - - while( cur != NULL ) - { - mbedtls_x509_crt_free( cur->cert ); - mbedtls_free( cur->cert ); - - mbedtls_pk_free( cur->key ); - mbedtls_free( cur->key ); - - mbedtls_x509_crt_free( cur->ca ); - mbedtls_free( cur->ca ); - - mbedtls_x509_crl_free( cur->crl ); - mbedtls_free( cur->crl ); - - next = cur->next; - mbedtls_free( cur ); - cur = next; - } -} - -/* - * Parse a string of sextuples name1,crt1,key1,ca1,crl1,auth1[,...] - * into a usable sni_entry list. For ca1, crl1, auth1, the special value - * '-' means unset. If ca1 is unset, then crl1 is ignored too. - * - * Modifies the input string! This is not production quality! - */ -sni_entry *sni_parse( char *sni_string ) -{ - sni_entry *cur = NULL, *new = NULL; - char *p = sni_string; - char *end = p; - char *crt_file, *key_file, *ca_file, *crl_file, *auth_str; - - while( *end != '\0' ) - ++end; - *end = ','; - - while( p <= end ) - { - if( ( new = mbedtls_calloc( 1, sizeof( sni_entry ) ) ) == NULL ) - { - sni_free( cur ); - return( NULL ); - } - - GET_ITEM( new->name ); - GET_ITEM( crt_file ); - GET_ITEM( key_file ); - GET_ITEM( ca_file ); - GET_ITEM( crl_file ); - GET_ITEM( auth_str ); - - if( ( new->cert = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ) ) == NULL || - ( new->key = mbedtls_calloc( 1, sizeof( mbedtls_pk_context ) ) ) == NULL ) - goto error; - - mbedtls_x509_crt_init( new->cert ); - mbedtls_pk_init( new->key ); - - if( mbedtls_x509_crt_parse_file( new->cert, crt_file ) != 0 || - mbedtls_pk_parse_keyfile( new->key, key_file, "" ) != 0 ) - goto error; - - if( strcmp( ca_file, "-" ) != 0 ) - { - if( ( new->ca = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ) ) == NULL ) - goto error; - - mbedtls_x509_crt_init( new->ca ); - - if( mbedtls_x509_crt_parse_file( new->ca, ca_file ) != 0 ) - goto error; - } - - if( strcmp( crl_file, "-" ) != 0 ) - { - if( ( new->crl = mbedtls_calloc( 1, sizeof( mbedtls_x509_crl ) ) ) == NULL ) - goto error; - - mbedtls_x509_crl_init( new->crl ); - - if( mbedtls_x509_crl_parse_file( new->crl, crl_file ) != 0 ) - goto error; - } - - if( strcmp( auth_str, "-" ) != 0 ) - { - if( ( new->authmode = get_auth_mode( auth_str ) ) < 0 ) - goto error; - } - else - new->authmode = DFL_AUTH_MODE; - - new->next = cur; - cur = new; - } - - return( cur ); - -error: - sni_free( new ); - sni_free( cur ); - return( NULL ); -} - -/* - * SNI callback. - */ -int sni_callback( void *p_info, mbedtls_ssl_context *ssl, - const unsigned char *name, size_t name_len ) -{ - const sni_entry *cur = (const sni_entry *) p_info; - - while( cur != NULL ) - { - if( name_len == strlen( cur->name ) && - memcmp( name, cur->name, name_len ) == 0 ) - { - if( cur->ca != NULL ) - mbedtls_ssl_set_hs_ca_chain( ssl, cur->ca, cur->crl ); - - if( cur->authmode != DFL_AUTH_MODE ) - mbedtls_ssl_set_hs_authmode( ssl, cur->authmode ); - - return( mbedtls_ssl_set_hs_own_cert( ssl, cur->cert, cur->key ) ); - } - - cur = cur->next; - } - - return( -1 ); -} - -#endif /* SNI_OPTION */ - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - -#define HEX2NUM( c ) \ - if( c >= '0' && c <= '9' ) \ - c -= '0'; \ - else if( c >= 'a' && c <= 'f' ) \ - c -= 'a' - 10; \ - else if( c >= 'A' && c <= 'F' ) \ - c -= 'A' - 10; \ - else \ - return( -1 ); - -/* - * Convert a hex string to bytes. - * Return 0 on success, -1 on error. - */ -int unhexify( unsigned char *output, const char *input, size_t *olen ) -{ - unsigned char c; - size_t j; - - *olen = strlen( input ); - if( *olen % 2 != 0 || *olen / 2 > MBEDTLS_PSK_MAX_LEN ) - return( -1 ); - *olen /= 2; - - for( j = 0; j < *olen * 2; j += 2 ) - { - c = input[j]; - HEX2NUM( c ); - output[ j / 2 ] = c << 4; - - c = input[j + 1]; - HEX2NUM( c ); - output[ j / 2 ] |= c; - } - - return( 0 ); -} - -typedef struct _psk_entry psk_entry; - -struct _psk_entry -{ - const char *name; - size_t key_len; - unsigned char key[MBEDTLS_PSK_MAX_LEN]; - psk_entry *next; -}; - -/* - * Free a list of psk_entry's - */ -void psk_free( psk_entry *head ) -{ - psk_entry *next; - - while( head != NULL ) - { - next = head->next; - mbedtls_free( head ); - head = next; - } -} - -/* - * Parse a string of pairs name1,key1[,name2,key2[,...]] - * into a usable psk_entry list. - * - * Modifies the input string! This is not production quality! - */ -psk_entry *psk_parse( char *psk_string ) -{ - psk_entry *cur = NULL, *new = NULL; - char *p = psk_string; - char *end = p; - char *key_hex; - - while( *end != '\0' ) - ++end; - *end = ','; - - while( p <= end ) - { - if( ( new = mbedtls_calloc( 1, sizeof( psk_entry ) ) ) == NULL ) - goto error; - - memset( new, 0, sizeof( psk_entry ) ); - - GET_ITEM( new->name ); - GET_ITEM( key_hex ); - - if( unhexify( new->key, key_hex, &new->key_len ) != 0 ) - goto error; - - new->next = cur; - cur = new; - } - - return( cur ); - -error: - psk_free( new ); - psk_free( cur ); - return( 0 ); -} - -/* - * PSK callback - */ -int psk_callback( void *p_info, mbedtls_ssl_context *ssl, - const unsigned char *name, size_t name_len ) -{ - psk_entry *cur = (psk_entry *) p_info; - - while( cur != NULL ) - { - if( name_len == strlen( cur->name ) && - memcmp( name, cur->name, name_len ) == 0 ) - { - return( mbedtls_ssl_set_hs_psk( ssl, cur->key, cur->key_len ) ); - } - - cur = cur->next; - } - - return( -1 ); -} -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -static mbedtls_net_context listen_fd, client_fd; - -/* Interruption handler to ensure clean exit (for valgrind testing) */ -#if !defined(_WIN32) -static int received_sigterm = 0; -void term_handler( int sig ) -{ - ((void) sig); - received_sigterm = 1; - mbedtls_net_free( &listen_fd ); /* causes mbedtls_net_accept() to abort */ - mbedtls_net_free( &client_fd ); /* causes net_read() to abort */ -} -#endif - -int main( int argc, char *argv[] ) -{ - int ret = 0, len, written, frags, exchanges_left; - int version_suites[4][2]; - unsigned char buf[IO_BUF_LEN]; -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - unsigned char psk[MBEDTLS_PSK_MAX_LEN]; - size_t psk_len = 0; - psk_entry *psk_info = NULL; -#endif - const char *pers = "ssl_server2"; - unsigned char client_ip[16] = { 0 }; - size_t cliip_len; -#if defined(MBEDTLS_SSL_COOKIE_C) - mbedtls_ssl_cookie_ctx cookie_ctx; -#endif - - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; -#if defined(MBEDTLS_TIMING_C) - mbedtls_timing_delay_context timer; -#endif -#if defined(MBEDTLS_SSL_RENEGOTIATION) - unsigned char renego_period[8] = { 0 }; -#endif -#if defined(MBEDTLS_X509_CRT_PARSE_C) - uint32_t flags; - mbedtls_x509_crt cacert; - mbedtls_x509_crt srvcert; - mbedtls_pk_context pkey; - mbedtls_x509_crt srvcert2; - mbedtls_pk_context pkey2; - int key_cert_init = 0, key_cert_init2 = 0; -#endif -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_FS_IO) - mbedtls_dhm_context dhm; -#endif -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_context cache; -#endif -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - mbedtls_ssl_ticket_context ticket_ctx; -#endif -#if defined(SNI_OPTION) - sni_entry *sni_info = NULL; -#endif -#if defined(MBEDTLS_SSL_ALPN) - const char *alpn_list[10]; -#endif -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - unsigned char alloc_buf[100000]; -#endif - - int i; - char *p, *q; - const int *list; - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_init( alloc_buf, sizeof(alloc_buf) ); -#endif - - /* - * Make sure memory references are valid in case we exit early. - */ - mbedtls_net_init( &client_fd ); - mbedtls_net_init( &listen_fd ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_ctr_drbg_init( &ctr_drbg ); -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt_init( &cacert ); - mbedtls_x509_crt_init( &srvcert ); - mbedtls_pk_init( &pkey ); - mbedtls_x509_crt_init( &srvcert2 ); - mbedtls_pk_init( &pkey2 ); -#endif -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_FS_IO) - mbedtls_dhm_init( &dhm ); -#endif -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_init( &cache ); -#endif -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - mbedtls_ssl_ticket_init( &ticket_ctx ); -#endif -#if defined(MBEDTLS_SSL_ALPN) - memset( (void *) alpn_list, 0, sizeof( alpn_list ) ); -#endif -#if defined(MBEDTLS_SSL_COOKIE_C) - mbedtls_ssl_cookie_init( &cookie_ctx ); -#endif - -#if !defined(_WIN32) - /* Abort cleanly on SIGTERM and SIGINT */ - signal( SIGTERM, term_handler ); - signal( SIGINT, term_handler ); -#endif - - if( argc == 0 ) - { - usage: - if( ret == 0 ) - ret = 1; - - mbedtls_printf( USAGE ); - - list = mbedtls_ssl_list_ciphersuites(); - while( *list ) - { - mbedtls_printf(" %-42s", mbedtls_ssl_get_ciphersuite_name( *list ) ); - list++; - if( !*list ) - break; - mbedtls_printf(" %s\n", mbedtls_ssl_get_ciphersuite_name( *list ) ); - list++; - } - mbedtls_printf("\n"); - goto exit; - } - - opt.server_addr = DFL_SERVER_ADDR; - opt.server_port = DFL_SERVER_PORT; - opt.debug_level = DFL_DEBUG_LEVEL; - opt.nbio = DFL_NBIO; - opt.read_timeout = DFL_READ_TIMEOUT; - opt.ca_file = DFL_CA_FILE; - opt.ca_path = DFL_CA_PATH; - opt.crt_file = DFL_CRT_FILE; - opt.key_file = DFL_KEY_FILE; - opt.crt_file2 = DFL_CRT_FILE2; - opt.key_file2 = DFL_KEY_FILE2; - opt.psk = DFL_PSK; - opt.psk_identity = DFL_PSK_IDENTITY; - opt.psk_list = DFL_PSK_LIST; - opt.ecjpake_pw = DFL_ECJPAKE_PW; - opt.force_ciphersuite[0]= DFL_FORCE_CIPHER; - opt.version_suites = DFL_VERSION_SUITES; - opt.renegotiation = DFL_RENEGOTIATION; - opt.allow_legacy = DFL_ALLOW_LEGACY; - opt.renegotiate = DFL_RENEGOTIATE; - opt.renego_delay = DFL_RENEGO_DELAY; - opt.renego_period = DFL_RENEGO_PERIOD; - opt.exchanges = DFL_EXCHANGES; - opt.min_version = DFL_MIN_VERSION; - opt.max_version = DFL_MAX_VERSION; - opt.arc4 = DFL_ARC4; - opt.auth_mode = DFL_AUTH_MODE; - opt.mfl_code = DFL_MFL_CODE; - opt.trunc_hmac = DFL_TRUNC_HMAC; - opt.tickets = DFL_TICKETS; - opt.ticket_timeout = DFL_TICKET_TIMEOUT; - opt.cache_max = DFL_CACHE_MAX; - opt.cache_timeout = DFL_CACHE_TIMEOUT; - opt.sni = DFL_SNI; - opt.alpn_string = DFL_ALPN_STRING; - opt.dhm_file = DFL_DHM_FILE; - opt.transport = DFL_TRANSPORT; - opt.cookies = DFL_COOKIES; - opt.anti_replay = DFL_ANTI_REPLAY; - opt.hs_to_min = DFL_HS_TO_MIN; - opt.hs_to_max = DFL_HS_TO_MAX; - opt.badmac_limit = DFL_BADMAC_LIMIT; - opt.extended_ms = DFL_EXTENDED_MS; - opt.etm = DFL_ETM; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "server_port" ) == 0 ) - opt.server_port = q; - else if( strcmp( p, "server_addr" ) == 0 ) - opt.server_addr = q; - else if( strcmp( p, "dtls" ) == 0 ) - { - int t = atoi( q ); - if( t == 0 ) - opt.transport = MBEDTLS_SSL_TRANSPORT_STREAM; - else if( t == 1 ) - opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM; - else - goto usage; - } - else if( strcmp( p, "debug_level" ) == 0 ) - { - opt.debug_level = atoi( q ); - if( opt.debug_level < 0 || opt.debug_level > 65535 ) - goto usage; - } - else if( strcmp( p, "nbio" ) == 0 ) - { - opt.nbio = atoi( q ); - if( opt.nbio < 0 || opt.nbio > 2 ) - goto usage; - } - else if( strcmp( p, "read_timeout" ) == 0 ) - opt.read_timeout = atoi( q ); - else if( strcmp( p, "ca_file" ) == 0 ) - opt.ca_file = q; - else if( strcmp( p, "ca_path" ) == 0 ) - opt.ca_path = q; - else if( strcmp( p, "crt_file" ) == 0 ) - opt.crt_file = q; - else if( strcmp( p, "key_file" ) == 0 ) - opt.key_file = q; - else if( strcmp( p, "crt_file2" ) == 0 ) - opt.crt_file2 = q; - else if( strcmp( p, "key_file2" ) == 0 ) - opt.key_file2 = q; - else if( strcmp( p, "dhm_file" ) == 0 ) - opt.dhm_file = q; - else if( strcmp( p, "psk" ) == 0 ) - opt.psk = q; - else if( strcmp( p, "psk_identity" ) == 0 ) - opt.psk_identity = q; - else if( strcmp( p, "psk_list" ) == 0 ) - opt.psk_list = q; - else if( strcmp( p, "ecjpake_pw" ) == 0 ) - opt.ecjpake_pw = q; - else if( strcmp( p, "force_ciphersuite" ) == 0 ) - { - opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id( q ); - - if( opt.force_ciphersuite[0] == 0 ) - { - ret = 2; - goto usage; - } - opt.force_ciphersuite[1] = 0; - } - else if( strcmp( p, "version_suites" ) == 0 ) - opt.version_suites = q; - else if( strcmp( p, "renegotiation" ) == 0 ) - { - opt.renegotiation = (atoi( q )) ? MBEDTLS_SSL_RENEGOTIATION_ENABLED : - MBEDTLS_SSL_RENEGOTIATION_DISABLED; - } - else if( strcmp( p, "allow_legacy" ) == 0 ) - { - switch( atoi( q ) ) - { - case -1: opt.allow_legacy = MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE; break; - case 0: opt.allow_legacy = MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION; break; - case 1: opt.allow_legacy = MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION; break; - default: goto usage; - } - } - else if( strcmp( p, "renegotiate" ) == 0 ) - { - opt.renegotiate = atoi( q ); - if( opt.renegotiate < 0 || opt.renegotiate > 1 ) - goto usage; - } - else if( strcmp( p, "renego_delay" ) == 0 ) - { - opt.renego_delay = atoi( q ); - } - else if( strcmp( p, "renego_period" ) == 0 ) - { - opt.renego_period = atoi( q ); - if( opt.renego_period < 2 || opt.renego_period > 255 ) - goto usage; - } - else if( strcmp( p, "exchanges" ) == 0 ) - { - opt.exchanges = atoi( q ); - if( opt.exchanges < 0 ) - goto usage; - } - else if( strcmp( p, "min_version" ) == 0 ) - { - if( strcmp( q, "ssl3" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_0; - else if( strcmp( q, "tls1" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_1; - else if( strcmp( q, "tls1_1" ) == 0 || - strcmp( q, "dtls1" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - else if( strcmp( q, "tls1_2" ) == 0 || - strcmp( q, "dtls1_2" ) == 0 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_3; - else - goto usage; - } - else if( strcmp( p, "max_version" ) == 0 ) - { - if( strcmp( q, "ssl3" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_0; - else if( strcmp( q, "tls1" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_1; - else if( strcmp( q, "tls1_1" ) == 0 || - strcmp( q, "dtls1" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_2; - else if( strcmp( q, "tls1_2" ) == 0 || - strcmp( q, "dtls1_2" ) == 0 ) - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_3; - else - goto usage; - } - else if( strcmp( p, "arc4" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.arc4 = MBEDTLS_SSL_ARC4_DISABLED; break; - case 1: opt.arc4 = MBEDTLS_SSL_ARC4_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "force_version" ) == 0 ) - { - if( strcmp( q, "ssl3" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_0; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_0; - } - else if( strcmp( q, "tls1" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_1; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_1; - } - else if( strcmp( q, "tls1_1" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_2; - } - else if( strcmp( q, "tls1_2" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_3; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_3; - } - else if( strcmp( q, "dtls1" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_2; - opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM; - } - else if( strcmp( q, "dtls1_2" ) == 0 ) - { - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_3; - opt.max_version = MBEDTLS_SSL_MINOR_VERSION_3; - opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM; - } - else - goto usage; - } - else if( strcmp( p, "auth_mode" ) == 0 ) - { - if( ( opt.auth_mode = get_auth_mode( q ) ) < 0 ) - goto usage; - } - else if( strcmp( p, "max_frag_len" ) == 0 ) - { - if( strcmp( q, "512" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_512; - else if( strcmp( q, "1024" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_1024; - else if( strcmp( q, "2048" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_2048; - else if( strcmp( q, "4096" ) == 0 ) - opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_4096; - else - goto usage; - } - else if( strcmp( p, "alpn" ) == 0 ) - { - opt.alpn_string = q; - } - else if( strcmp( p, "trunc_hmac" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_DISABLED; break; - case 1: opt.trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "extended_ms" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.extended_ms = MBEDTLS_SSL_EXTENDED_MS_DISABLED; break; - case 1: opt.extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "etm" ) == 0 ) - { - switch( atoi( q ) ) - { - case 0: opt.etm = MBEDTLS_SSL_ETM_DISABLED; break; - case 1: opt.etm = MBEDTLS_SSL_ETM_ENABLED; break; - default: goto usage; - } - } - else if( strcmp( p, "tickets" ) == 0 ) - { - opt.tickets = atoi( q ); - if( opt.tickets < 0 || opt.tickets > 1 ) - goto usage; - } - else if( strcmp( p, "ticket_timeout" ) == 0 ) - { - opt.ticket_timeout = atoi( q ); - if( opt.ticket_timeout < 0 ) - goto usage; - } - else if( strcmp( p, "cache_max" ) == 0 ) - { - opt.cache_max = atoi( q ); - if( opt.cache_max < 0 ) - goto usage; - } - else if( strcmp( p, "cache_timeout" ) == 0 ) - { - opt.cache_timeout = atoi( q ); - if( opt.cache_timeout < 0 ) - goto usage; - } - else if( strcmp( p, "cookies" ) == 0 ) - { - opt.cookies = atoi( q ); - if( opt.cookies < -1 || opt.cookies > 1) - goto usage; - } - else if( strcmp( p, "anti_replay" ) == 0 ) - { - opt.anti_replay = atoi( q ); - if( opt.anti_replay < 0 || opt.anti_replay > 1) - goto usage; - } - else if( strcmp( p, "badmac_limit" ) == 0 ) - { - opt.badmac_limit = atoi( q ); - if( opt.badmac_limit < 0 ) - goto usage; - } - else if( strcmp( p, "hs_timeout" ) == 0 ) - { - if( ( p = strchr( q, '-' ) ) == NULL ) - goto usage; - *p++ = '\0'; - opt.hs_to_min = atoi( q ); - opt.hs_to_max = atoi( p ); - if( opt.hs_to_min == 0 || opt.hs_to_max < opt.hs_to_min ) - goto usage; - } - else if( strcmp( p, "sni" ) == 0 ) - { - opt.sni = q; - } - else - goto usage; - } - -#if defined(MBEDTLS_DEBUG_C) - mbedtls_debug_set_threshold( opt.debug_level ); -#endif - - if( opt.force_ciphersuite[0] > 0 ) - { - const mbedtls_ssl_ciphersuite_t *ciphersuite_info; - ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( opt.force_ciphersuite[0] ); - - if( opt.max_version != -1 && - ciphersuite_info->min_minor_ver > opt.max_version ) - { - mbedtls_printf("forced ciphersuite not allowed with this protocol version\n"); - ret = 2; - goto usage; - } - if( opt.min_version != -1 && - ciphersuite_info->max_minor_ver < opt.min_version ) - { - mbedtls_printf("forced ciphersuite not allowed with this protocol version\n"); - ret = 2; - goto usage; - } - - /* If we select a version that's not supported by - * this suite, then there will be no common ciphersuite... */ - if( opt.max_version == -1 || - opt.max_version > ciphersuite_info->max_minor_ver ) - { - opt.max_version = ciphersuite_info->max_minor_ver; - } - if( opt.min_version < ciphersuite_info->min_minor_ver ) - { - opt.min_version = ciphersuite_info->min_minor_ver; - /* DTLS starts with TLS 1.1 */ - if( opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && - opt.min_version < MBEDTLS_SSL_MINOR_VERSION_2 ) - opt.min_version = MBEDTLS_SSL_MINOR_VERSION_2; - } - - /* Enable RC4 if needed and not explicitly disabled */ - if( ciphersuite_info->cipher == MBEDTLS_CIPHER_ARC4_128 ) - { - if( opt.arc4 == MBEDTLS_SSL_ARC4_DISABLED ) - { - mbedtls_printf("forced RC4 ciphersuite with RC4 disabled\n"); - ret = 2; - goto usage; - } - - opt.arc4 = MBEDTLS_SSL_ARC4_ENABLED; - } - } - - if( opt.version_suites != NULL ) - { - const char *name[4] = { 0 }; - - /* Parse 4-element coma-separated list */ - for( i = 0, p = (char *) opt.version_suites; - i < 4 && *p != '\0'; - i++ ) - { - name[i] = p; - - /* Terminate the current string and move on to next one */ - while( *p != ',' && *p != '\0' ) - p++; - if( *p == ',' ) - *p++ = '\0'; - } - - if( i != 4 ) - { - mbedtls_printf( "too few values for version_suites\n" ); - ret = 1; - goto exit; - } - - memset( version_suites, 0, sizeof( version_suites ) ); - - /* Get the suites identifiers from their name */ - for( i = 0; i < 4; i++ ) - { - version_suites[i][0] = mbedtls_ssl_get_ciphersuite_id( name[i] ); - - if( version_suites[i][0] == 0 ) - { - mbedtls_printf( "unknown ciphersuite: '%s'\n", name[i] ); - ret = 2; - goto usage; - } - } - } - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - /* - * Unhexify the pre-shared key and parse the list if any given - */ - if( unhexify( psk, opt.psk, &psk_len ) != 0 ) - { - mbedtls_printf( "pre-shared key not valid hex\n" ); - goto exit; - } - - if( opt.psk_list != NULL ) - { - if( ( psk_info = psk_parse( opt.psk_list ) ) == NULL ) - { - mbedtls_printf( "psk_list invalid" ); - goto exit; - } - } -#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */ - -#if defined(MBEDTLS_SSL_ALPN) - if( opt.alpn_string != NULL ) - { - p = (char *) opt.alpn_string; - i = 0; - - /* Leave room for a final NULL in alpn_list */ - while( i < (int) sizeof alpn_list - 1 && *p != '\0' ) - { - alpn_list[i++] = p; - - /* Terminate the current string and move on to next one */ - while( *p != ',' && *p != '\0' ) - p++; - if( *p == ',' ) - *p++ = '\0'; - } - } -#endif /* MBEDTLS_SSL_ALPN */ - - /* - * 0. Initialize the RNG and the session data - */ - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned -0x%x\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * 1.1. Load the trusted CA - */ - mbedtls_printf( " . Loading the CA root certificate ..." ); - fflush( stdout ); - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.ca_path ) ) - if( strcmp( opt.ca_path, "none" ) == 0 ) - ret = 0; - else - ret = mbedtls_x509_crt_parse_path( &cacert, opt.ca_path ); - else if( strlen( opt.ca_file ) ) - if( strcmp( opt.ca_file, "none" ) == 0 ) - ret = 0; - else - ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file ); - else -#endif -#if defined(MBEDTLS_CERTS_C) - for( i = 0; mbedtls_test_cas[i] != NULL; i++ ) - { - ret = mbedtls_x509_crt_parse( &cacert, - (const unsigned char *) mbedtls_test_cas[i], - mbedtls_test_cas_len[i] ); - if( ret != 0 ) - break; - } -#else - { - ret = 1; - mbedtls_printf("MBEDTLS_CERTS_C not defined."); - } -#endif - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok (%d skipped)\n", ret ); - - /* - * 1.2. Load own certificate and private key - */ - mbedtls_printf( " . Loading the server cert. and key..." ); - fflush( stdout ); - -#if defined(MBEDTLS_FS_IO) - if( strlen( opt.crt_file ) && strcmp( opt.crt_file, "none" ) != 0 ) - { - key_cert_init++; - if( ( ret = mbedtls_x509_crt_parse_file( &srvcert, opt.crt_file ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse_file returned -0x%x\n\n", - -ret ); - goto exit; - } - } - if( strlen( opt.key_file ) && strcmp( opt.key_file, "none" ) != 0 ) - { - key_cert_init++; - if( ( ret = mbedtls_pk_parse_keyfile( &pkey, opt.key_file, "" ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned -0x%x\n\n", -ret ); - goto exit; - } - } - if( key_cert_init == 1 ) - { - mbedtls_printf( " failed\n ! crt_file without key_file or vice-versa\n\n" ); - goto exit; - } - - if( strlen( opt.crt_file2 ) && strcmp( opt.crt_file2, "none" ) != 0 ) - { - key_cert_init2++; - if( ( ret = mbedtls_x509_crt_parse_file( &srvcert2, opt.crt_file2 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse_file(2) returned -0x%x\n\n", - -ret ); - goto exit; - } - } - if( strlen( opt.key_file2 ) && strcmp( opt.key_file2, "none" ) != 0 ) - { - key_cert_init2++; - if( ( ret = mbedtls_pk_parse_keyfile( &pkey2, opt.key_file2, "" ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile(2) returned -0x%x\n\n", - -ret ); - goto exit; - } - } - if( key_cert_init2 == 1 ) - { - mbedtls_printf( " failed\n ! crt_file2 without key_file2 or vice-versa\n\n" ); - goto exit; - } -#endif - if( key_cert_init == 0 && - strcmp( opt.crt_file, "none" ) != 0 && - strcmp( opt.key_file, "none" ) != 0 && - key_cert_init2 == 0 && - strcmp( opt.crt_file2, "none" ) != 0 && - strcmp( opt.key_file2, "none" ) != 0 ) - { -#if !defined(MBEDTLS_CERTS_C) - mbedtls_printf( "Not certificated or key provided, and \n" - "MBEDTLS_CERTS_C not defined!\n" ); - goto exit; -#else -#if defined(MBEDTLS_RSA_C) - if( ( ret = mbedtls_x509_crt_parse( &srvcert, - (const unsigned char *) mbedtls_test_srv_crt_rsa, - mbedtls_test_srv_crt_rsa_len ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - if( ( ret = mbedtls_pk_parse_key( &pkey, - (const unsigned char *) mbedtls_test_srv_key_rsa, - mbedtls_test_srv_key_rsa_len, NULL, 0 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_key returned -0x%x\n\n", -ret ); - goto exit; - } - key_cert_init = 2; -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_ECDSA_C) - if( ( ret = mbedtls_x509_crt_parse( &srvcert2, - (const unsigned char *) mbedtls_test_srv_crt_ec, - mbedtls_test_srv_crt_ec_len ) ) != 0 ) - { - mbedtls_printf( " failed\n ! x509_crt_parse2 returned -0x%x\n\n", -ret ); - goto exit; - } - if( ( ret = mbedtls_pk_parse_key( &pkey2, - (const unsigned char *) mbedtls_test_srv_key_ec, - mbedtls_test_srv_key_ec_len, NULL, 0 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! pk_parse_key2 returned -0x%x\n\n", -ret ); - goto exit; - } - key_cert_init2 = 2; -#endif /* MBEDTLS_ECDSA_C */ -#endif /* MBEDTLS_CERTS_C */ - } - - mbedtls_printf( " ok\n" ); -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_FS_IO) - if( opt.dhm_file != NULL ) - { - mbedtls_printf( " . Loading DHM parameters..." ); - fflush( stdout ); - - if( ( ret = mbedtls_dhm_parse_dhmfile( &dhm, opt.dhm_file ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_dhm_parse_dhmfile returned -0x%04X\n\n", - -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - } -#endif - -#if defined(SNI_OPTION) - if( opt.sni != NULL ) - { - mbedtls_printf( " . Setting up SNI information..." ); - fflush( stdout ); - - if( ( sni_info = sni_parse( opt.sni ) ) == NULL ) - { - mbedtls_printf( " failed\n" ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - } -#endif /* SNI_OPTION */ - - /* - * 2. Setup the listening TCP socket - */ - mbedtls_printf( " . Bind on %s://%s:%s/ ...", - opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ? "tcp" : "udp", - opt.server_addr ? opt.server_addr : "*", - opt.server_port ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, opt.server_addr, opt.server_port, - opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ? - MBEDTLS_NET_PROTO_TCP : MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_bind returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 3. Setup stuff - */ - mbedtls_printf( " . Setting up the SSL/TLS structure..." ); - fflush( stdout ); - - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_SERVER, - opt.transport, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned -0x%x\n\n", -ret ); - goto exit; - } - - if( opt.auth_mode != DFL_AUTH_MODE ) - mbedtls_ssl_conf_authmode( &conf, opt.auth_mode ); - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( opt.hs_to_min != DFL_HS_TO_MIN || opt.hs_to_max != DFL_HS_TO_MAX ) - mbedtls_ssl_conf_handshake_timeout( &conf, opt.hs_to_min, opt.hs_to_max ); -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - if( ( ret = mbedtls_ssl_conf_max_frag_len( &conf, opt.mfl_code ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_max_frag_len returned %d\n\n", ret ); - goto exit; - }; -#endif - -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - if( opt.trunc_hmac != DFL_TRUNC_HMAC ) - mbedtls_ssl_conf_truncated_hmac( &conf, opt.trunc_hmac ); -#endif - -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - if( opt.extended_ms != DFL_EXTENDED_MS ) - mbedtls_ssl_conf_extended_master_secret( &conf, opt.extended_ms ); -#endif - -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - if( opt.etm != DFL_ETM ) - mbedtls_ssl_conf_encrypt_then_mac( &conf, opt.etm ); -#endif - -#if defined(MBEDTLS_SSL_ALPN) - if( opt.alpn_string != NULL ) - if( ( ret = mbedtls_ssl_conf_alpn_protocols( &conf, alpn_list ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_alpn_protocols returned %d\n\n", ret ); - goto exit; - } -#endif - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - -#if defined(MBEDTLS_SSL_CACHE_C) - if( opt.cache_max != -1 ) - mbedtls_ssl_cache_set_max_entries( &cache, opt.cache_max ); - - if( opt.cache_timeout != -1 ) - mbedtls_ssl_cache_set_timeout( &cache, opt.cache_timeout ); - - mbedtls_ssl_conf_session_cache( &conf, &cache, - mbedtls_ssl_cache_get, - mbedtls_ssl_cache_set ); -#endif - -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - if( opt.tickets == MBEDTLS_SSL_SESSION_TICKETS_ENABLED ) - { - if( ( ret = mbedtls_ssl_ticket_setup( &ticket_ctx, - mbedtls_ctr_drbg_random, &ctr_drbg, - MBEDTLS_CIPHER_AES_256_GCM, - opt.ticket_timeout ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_ticket_setup returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_conf_session_tickets_cb( &conf, - mbedtls_ssl_ticket_write, - mbedtls_ssl_ticket_parse, - &ticket_ctx ); - } -#endif - -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { -#if defined(MBEDTLS_SSL_COOKIE_C) - if( opt.cookies > 0 ) - { - if( ( ret = mbedtls_ssl_cookie_setup( &cookie_ctx, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_cookie_setup returned %d\n\n", ret ); - goto exit; - } - - mbedtls_ssl_conf_dtls_cookies( &conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, - &cookie_ctx ); - } - else -#endif /* MBEDTLS_SSL_COOKIE_C */ -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) - if( opt.cookies == 0 ) - { - mbedtls_ssl_conf_dtls_cookies( &conf, NULL, NULL, NULL ); - } - else -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ - { - ; /* Nothing to do */ - } - -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - if( opt.anti_replay != DFL_ANTI_REPLAY ) - mbedtls_ssl_conf_dtls_anti_replay( &conf, opt.anti_replay ); -#endif - -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) - if( opt.badmac_limit != DFL_BADMAC_LIMIT ) - mbedtls_ssl_conf_dtls_badmac_limit( &conf, opt.badmac_limit ); -#endif - } -#endif /* MBEDTLS_SSL_PROTO_DTLS */ - - if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) - mbedtls_ssl_conf_ciphersuites( &conf, opt.force_ciphersuite ); - -#if defined(MBEDTLS_ARC4_C) - if( opt.arc4 != DFL_ARC4 ) - mbedtls_ssl_conf_arc4_support( &conf, opt.arc4 ); -#endif - - if( opt.version_suites != NULL ) - { - mbedtls_ssl_conf_ciphersuites_for_version( &conf, version_suites[0], - MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_0 ); - mbedtls_ssl_conf_ciphersuites_for_version( &conf, version_suites[1], - MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_1 ); - mbedtls_ssl_conf_ciphersuites_for_version( &conf, version_suites[2], - MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_2 ); - mbedtls_ssl_conf_ciphersuites_for_version( &conf, version_suites[3], - MBEDTLS_SSL_MAJOR_VERSION_3, - MBEDTLS_SSL_MINOR_VERSION_3 ); - } - - if( opt.allow_legacy != DFL_ALLOW_LEGACY ) - mbedtls_ssl_conf_legacy_renegotiation( &conf, opt.allow_legacy ); -#if defined(MBEDTLS_SSL_RENEGOTIATION) - mbedtls_ssl_conf_renegotiation( &conf, opt.renegotiation ); - - if( opt.renego_delay != DFL_RENEGO_DELAY ) - mbedtls_ssl_conf_renegotiation_enforced( &conf, opt.renego_delay ); - - if( opt.renego_period != DFL_RENEGO_PERIOD ) - { - renego_period[7] = opt.renego_period; - mbedtls_ssl_conf_renegotiation_period( &conf, renego_period ); - } -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( strcmp( opt.ca_path, "none" ) != 0 && - strcmp( opt.ca_file, "none" ) != 0 ) - { - mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); - } - if( key_cert_init ) - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } - if( key_cert_init2 ) - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert2, &pkey2 ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto exit; - } -#endif - -#if defined(SNI_OPTION) - if( opt.sni != NULL ) - mbedtls_ssl_conf_sni( &conf, sni_callback, sni_info ); -#endif - -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - if( strlen( opt.psk ) != 0 && strlen( opt.psk_identity ) != 0 ) - { - ret = mbedtls_ssl_conf_psk( &conf, psk, psk_len, - (const unsigned char *) opt.psk_identity, - strlen( opt.psk_identity ) ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n mbedtls_ssl_conf_psk returned -0x%04X\n\n", - ret ); - goto exit; - } - } - - if( opt.psk_list != NULL ) - mbedtls_ssl_conf_psk_cb( &conf, psk_callback, psk_info ); -#endif - -#if defined(MBEDTLS_DHM_C) - /* - * Use different group than default DHM group - */ -#if defined(MBEDTLS_FS_IO) - if( opt.dhm_file != NULL ) - ret = mbedtls_ssl_conf_dh_param_ctx( &conf, &dhm ); -#endif - if( ret != 0 ) - { - mbedtls_printf( " failed\n mbedtls_ssl_conf_dh_param returned -0x%04X\n\n", - ret ); - goto exit; - } -#endif - - if( opt.min_version != DFL_MIN_VERSION ) - mbedtls_ssl_conf_min_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.min_version ); - - if( opt.max_version != DFL_MIN_VERSION ) - mbedtls_ssl_conf_max_version( &conf, MBEDTLS_SSL_MAJOR_VERSION_3, opt.max_version ); - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned -0x%x\n\n", -ret ); - goto exit; - } - - if( opt.nbio == 2 ) - mbedtls_ssl_set_bio( &ssl, &client_fd, my_send, my_recv, NULL ); - else - mbedtls_ssl_set_bio( &ssl, &client_fd, mbedtls_net_send, mbedtls_net_recv, - opt.nbio == 0 ? mbedtls_net_recv_timeout : NULL ); - -#if defined(MBEDTLS_TIMING_C) - mbedtls_ssl_set_timer_cb( &ssl, &timer, mbedtls_timing_set_delay, - mbedtls_timing_get_delay ); -#endif - - mbedtls_printf( " ok\n" ); - -reset: -#if !defined(_WIN32) - if( received_sigterm ) - { - mbedtls_printf( " interrupted by SIGTERM\n" ); - ret = 0; - goto exit; - } -#endif - - if( ret == MBEDTLS_ERR_SSL_CLIENT_RECONNECT ) - { - mbedtls_printf( " ! Client initiated reconnection from same port\n" ); - goto handshake; - } - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf("Last error was: %d - %s\n\n", ret, error_buf ); - } -#endif - - mbedtls_net_free( &client_fd ); - - mbedtls_ssl_session_reset( &ssl ); - - /* - * 3. Wait until a client connects - */ - mbedtls_printf( " . Waiting for a remote connection ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - client_ip, sizeof( client_ip ), &cliip_len ) ) != 0 ) - { -#if !defined(_WIN32) - if( received_sigterm ) - { - mbedtls_printf( " interrupted by signal\n" ); - ret = 0; - goto exit; - } -#endif - - mbedtls_printf( " failed\n ! mbedtls_net_accept returned -0x%x\n\n", -ret ); - goto exit; - } - - if( opt.nbio > 0 ) - ret = mbedtls_net_set_nonblock( &client_fd ); - else - ret = mbedtls_net_set_block( &client_fd ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_ssl_conf_read_timeout( &conf, opt.read_timeout ); - -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) - if( opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - { - if( ( ret = mbedtls_ssl_set_client_transport_id( &ssl, - client_ip, cliip_len ) ) != 0 ) - { - mbedtls_printf( " failed\n ! " - "mbedtls_ssl_set_client_transport_id() returned -0x%x\n\n", -ret ); - goto exit; - } - } -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ - -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - if( opt.ecjpake_pw != DFL_ECJPAKE_PW ) - { - if( ( ret = mbedtls_ssl_set_hs_ecjpake_password( &ssl, - (const unsigned char *) opt.ecjpake_pw, - strlen( opt.ecjpake_pw ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hs_ecjpake_password returned %d\n\n", ret ); - goto exit; - } - } -#endif - - mbedtls_printf( " ok\n" ); - - /* - * 4. Handshake - */ -handshake: - mbedtls_printf( " . Performing the SSL/TLS handshake..." ); - fflush( stdout ); - - do ret = mbedtls_ssl_handshake( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED ) - { - mbedtls_printf( " hello verification requested\n" ); - ret = 0; - goto reset; - } - else if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", -ret ); - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - if( ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ) - { - char vrfy_buf[512]; - flags = mbedtls_ssl_get_verify_result( &ssl ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } -#endif - - goto reset; - } - else /* ret == 0 */ - { - mbedtls_printf( " ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", - mbedtls_ssl_get_version( &ssl ), mbedtls_ssl_get_ciphersuite( &ssl ) ); - } - - if( ( ret = mbedtls_ssl_get_record_expansion( &ssl ) ) >= 0 ) - mbedtls_printf( " [ Record expansion is %d ]\n", ret ); - else - mbedtls_printf( " [ Record expansion is unknown (compression) ]\n" ); - -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - mbedtls_printf( " [ Maximum fragment length is %u ]\n", - (unsigned int) mbedtls_ssl_get_max_frag_len( &ssl ) ); -#endif - -#if defined(MBEDTLS_SSL_ALPN) - if( opt.alpn_string != NULL ) - { - const char *alp = mbedtls_ssl_get_alpn_protocol( &ssl ); - mbedtls_printf( " [ Application Layer Protocol is %s ]\n", - alp ? alp : "(none)" ); - } -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) - /* - * 5. Verify the server certificate - */ - mbedtls_printf( " . Verifying peer X.509 certificate..." ); - - if( ( flags = mbedtls_ssl_get_verify_result( &ssl ) ) != 0 ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - mbedtls_printf( " ok\n" ); - - if( mbedtls_ssl_get_peer_cert( &ssl ) != NULL ) - { - char crt_buf[512]; - - mbedtls_printf( " . Peer certificate information ...\n" ); - mbedtls_x509_crt_info( crt_buf, sizeof( crt_buf ), " ", - mbedtls_ssl_get_peer_cert( &ssl ) ); - mbedtls_printf( "%s\n", crt_buf ); - } -#endif /* MBEDTLS_X509_CRT_PARSE_C */ - - if( opt.exchanges == 0 ) - goto close_notify; - - exchanges_left = opt.exchanges; -data_exchange: - /* - * 6. Read the HTTP Request - */ - mbedtls_printf( " < Read from client:" ); - fflush( stdout ); - - /* - * TLS and DTLS need different reading styles (stream vs datagram) - */ - if( opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ) - { - do - { - int terminated = 0; - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - ret = mbedtls_ssl_read( &ssl, buf, len ); - - if( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ) - continue; - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - goto close_notify; - - case 0: - case MBEDTLS_ERR_NET_CONN_RESET: - mbedtls_printf( " connection was reset by peer\n" ); - ret = MBEDTLS_ERR_NET_CONN_RESET; - goto reset; - - default: - mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n", -ret ); - goto reset; - } - } - - if( mbedtls_ssl_get_bytes_avail( &ssl ) == 0 ) - { - len = ret; - buf[len] = '\0'; - mbedtls_printf( " %d bytes read\n\n%s\n", len, (char *) buf ); - - /* End of message should be detected according to the syntax of the - * application protocol (eg HTTP), just use a dummy test here. */ - if( buf[len - 1] == '\n' ) - terminated = 1; - } - else - { - int extra_len, ori_len; - unsigned char *larger_buf; - - ori_len = ret; - extra_len = (int) mbedtls_ssl_get_bytes_avail( &ssl ); - - larger_buf = mbedtls_calloc( 1, ori_len + extra_len + 1 ); - if( larger_buf == NULL ) - { - mbedtls_printf( " ! memory allocation failed\n" ); - ret = 1; - goto reset; - } - - memset( larger_buf, 0, ori_len + extra_len ); - memcpy( larger_buf, buf, ori_len ); - - /* This read should never fail and get the whole cached data */ - ret = mbedtls_ssl_read( &ssl, larger_buf + ori_len, extra_len ); - if( ret != extra_len || - mbedtls_ssl_get_bytes_avail( &ssl ) != 0 ) - { - mbedtls_printf( " ! mbedtls_ssl_read failed on cached data\n" ); - ret = 1; - goto reset; - } - - larger_buf[ori_len + extra_len] = '\0'; - mbedtls_printf( " %u bytes read (%u + %u)\n\n%s\n", - ori_len + extra_len, ori_len, extra_len, - (char *) larger_buf ); - - /* End of message should be detected according to the syntax of the - * application protocol (eg HTTP), just use a dummy test here. */ - if( larger_buf[ori_len + extra_len - 1] == '\n' ) - terminated = 1; - - mbedtls_free( larger_buf ); - } - - if( terminated ) - { - ret = 0; - break; - } - } - while( 1 ); - } - else /* Not stream, so datagram */ - { - len = sizeof( buf ) - 1; - memset( buf, 0, sizeof( buf ) ); - - do ret = mbedtls_ssl_read( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret <= 0 ) - { - switch( ret ) - { - case MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY: - mbedtls_printf( " connection was closed gracefully\n" ); - ret = 0; - goto close_notify; - - default: - mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n", -ret ); - goto reset; - } - } - - len = ret; - buf[len] = '\0'; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - ret = 0; - } - - /* - * 7a. Request renegotiation while client is waiting for input from us. - * (only on the first exchange, to be able to test retransmission) - */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - if( opt.renegotiate && exchanges_left == opt.exchanges ) - { - mbedtls_printf( " . Requestion renegotiation..." ); - fflush( stdout ); - - while( ( ret = mbedtls_ssl_renegotiate( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_renegotiate returned %d\n\n", ret ); - goto reset; - } - } - - mbedtls_printf( " ok\n" ); - } -#endif /* MBEDTLS_SSL_RENEGOTIATION */ - - /* - * 7. Write the 200 Response - */ - mbedtls_printf( " > Write to client:" ); - fflush( stdout ); - - len = sprintf( (char *) buf, HTTP_RESPONSE, - mbedtls_ssl_get_ciphersuite( &ssl ) ); - - if( opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ) - { - for( written = 0, frags = 0; written < len; written += ret, frags++ ) - { - while( ( ret = mbedtls_ssl_write( &ssl, buf + written, len - written ) ) - <= 0 ) - { - if( ret == MBEDTLS_ERR_NET_CONN_RESET ) - { - mbedtls_printf( " failed\n ! peer closed the connection\n\n" ); - goto reset; - } - - if( ret != MBEDTLS_ERR_SSL_WANT_READ && - ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto reset; - } - } - } - } - else /* Not stream, so datagram */ - { - do ret = mbedtls_ssl_write( &ssl, buf, len ); - while( ret == MBEDTLS_ERR_SSL_WANT_READ || - ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret ); - goto reset; - } - - frags = 1; - written = ret; - } - - buf[written] = '\0'; - mbedtls_printf( " %d bytes written in %d fragments\n\n%s\n", written, frags, (char *) buf ); - ret = 0; - - /* - * 7b. Continue doing data exchanges? - */ - if( --exchanges_left > 0 ) - goto data_exchange; - - /* - * 8. Done, cleanly close the connection - */ -close_notify: - mbedtls_printf( " . Closing the connection..." ); - - /* No error checking, the connection might be closed already */ - do ret = mbedtls_ssl_close_notify( &ssl ); - while( ret == MBEDTLS_ERR_SSL_WANT_WRITE ); - ret = 0; - - mbedtls_printf( " done\n" ); - - goto reset; - - /* - * Cleanup and exit - */ -exit: -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf("Last error was: -0x%X - %s\n\n", -ret, error_buf ); - } -#endif - - mbedtls_printf( " . Cleaning up..." ); - fflush( stdout ); - - mbedtls_net_free( &client_fd ); - mbedtls_net_free( &listen_fd ); - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_FS_IO) - mbedtls_dhm_free( &dhm ); -#endif -#if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_x509_crt_free( &cacert ); - mbedtls_x509_crt_free( &srvcert ); - mbedtls_pk_free( &pkey ); - mbedtls_x509_crt_free( &srvcert2 ); - mbedtls_pk_free( &pkey2 ); -#endif -#if defined(SNI_OPTION) - sni_free( sni_info ); -#endif -#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) - psk_free( psk_info ); -#endif -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_FS_IO) - mbedtls_dhm_free( &dhm ); -#endif - - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(MBEDTLS_SSL_CACHE_C) - mbedtls_ssl_cache_free( &cache ); -#endif -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - mbedtls_ssl_ticket_free( &ticket_ctx ); -#endif -#if defined(MBEDTLS_SSL_COOKIE_C) - mbedtls_ssl_cookie_free( &cookie_ctx ); -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_memory_buffer_alloc_status(); -#endif - mbedtls_memory_buffer_alloc_free(); -#endif - - mbedtls_printf( " done.\n" ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - // Shell can not handle large exit numbers -> 1 for errors - if( ret < 0 ) - ret = 1; - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && - MBEDTLS_SSL_SRV_C && MBEDTLS_NET_C && MBEDTLS_RSA_C && - MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/test/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/test/CMakeLists.txt deleted file mode 100644 index 0ed7145466..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/test/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -set(libs - mbedtls -) - -if(USE_PKCS11_HELPER_LIBRARY) - set(libs ${libs} pkcs11-helper) -endif(USE_PKCS11_HELPER_LIBRARY) - -if(ENABLE_ZLIB_SUPPORT) - set(libs ${libs} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB_SUPPORT) - -add_executable(selftest selftest.c) -target_link_libraries(selftest ${libs}) - -add_executable(benchmark benchmark.c) -target_link_libraries(benchmark ${libs}) - -add_executable(ssl_cert_test ssl_cert_test.c) -target_link_libraries(ssl_cert_test ${libs}) - -add_executable(udp_proxy udp_proxy.c) -target_link_libraries(udp_proxy ${libs}) - -install(TARGETS selftest benchmark ssl_cert_test udp_proxy - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/test/benchmark.c b/build/premake/premake5/contrib/mbedtls/programs/test/benchmark.c deleted file mode 100644 index 8ab32f6779..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/test/benchmark.c +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Benchmark demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_exit exit -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#define mbedtls_free free -#endif - -#if !defined(MBEDTLS_TIMING_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_TIMING_C not defined.\n"); - return( 0 ); -} -#else - -#include -#include - -#include "mbedtls/timing.h" - -#include "mbedtls/md4.h" -#include "mbedtls/md5.h" -#include "mbedtls/ripemd160.h" -#include "mbedtls/sha1.h" -#include "mbedtls/sha256.h" -#include "mbedtls/sha512.h" -#include "mbedtls/arc4.h" -#include "mbedtls/des.h" -#include "mbedtls/aes.h" -#include "mbedtls/blowfish.h" -#include "mbedtls/camellia.h" -#include "mbedtls/gcm.h" -#include "mbedtls/ccm.h" -#include "mbedtls/havege.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/hmac_drbg.h" -#include "mbedtls/rsa.h" -#include "mbedtls/dhm.h" -#include "mbedtls/ecdsa.h" -#include "mbedtls/ecdh.h" -#include "mbedtls/error.h" - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -/* - * For heap usage estimates, we need an estimate of the overhead per allocated - * block. ptmalloc2/3 (used in gnu libc for instance) uses 2 size_t per block, - * so use that as our baseline. - */ -#define MEM_BLOCK_OVERHEAD ( 2 * sizeof( size_t ) ) - -/* - * Size to use for the alloc buffer if MEMORY_BUFFER_ALLOC_C is defined. - */ -#define HEAP_SIZE (1u << 16) // 64k - -#define BUFSIZE 1024 -#define HEADER_FORMAT " %-24s : " -#define TITLE_LEN 25 - -#define OPTIONS \ - "md4, md5, ripemd160, sha1, sha256, sha512,\n" \ - "arc4, des3, des, aes_cbc, aes_gcm, aes_ccm, camellia, blowfish,\n" \ - "havege, ctr_drbg, hmac_drbg\n" \ - "rsa, dhm, ecdsa, ecdh.\n" - -#if defined(MBEDTLS_ERROR_C) -#define PRINT_ERROR \ - mbedtls_strerror( ret, ( char * )tmp, sizeof( tmp ) ); \ - mbedtls_printf( "FAILED: %s\n", tmp ); -#else -#define PRINT_ERROR \ - mbedtls_printf( "FAILED: -0x%04x\n", -ret ); -#endif - -#define TIME_AND_TSC( TITLE, CODE ) \ -do { \ - unsigned long ii, jj, tsc; \ - \ - mbedtls_printf( HEADER_FORMAT, TITLE ); \ - fflush( stdout ); \ - \ - mbedtls_set_alarm( 1 ); \ - for( ii = 1; ! mbedtls_timing_alarmed; ii++ ) \ - { \ - CODE; \ - } \ - \ - tsc = mbedtls_timing_hardclock(); \ - for( jj = 0; jj < 1024; jj++ ) \ - { \ - CODE; \ - } \ - \ - mbedtls_printf( "%9lu Kb/s, %9lu cycles/byte\n", \ - ii * BUFSIZE / 1024, \ - ( mbedtls_timing_hardclock() - tsc ) / ( jj * BUFSIZE ) ); \ -} while( 0 ) - -#if defined(MBEDTLS_ERROR_C) -#define PRINT_ERROR \ - mbedtls_strerror( ret, ( char * )tmp, sizeof( tmp ) ); \ - mbedtls_printf( "FAILED: %s\n", tmp ); -#else -#define PRINT_ERROR \ - mbedtls_printf( "FAILED: -0x%04x\n", -ret ); -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG) - -#define MEMORY_MEASURE_INIT \ - size_t max_used, max_blocks, max_bytes; \ - size_t prv_used, prv_blocks; \ - mbedtls_memory_buffer_alloc_cur_get( &prv_used, &prv_blocks ); \ - mbedtls_memory_buffer_alloc_max_reset( ); - -#define MEMORY_MEASURE_PRINT( title_len ) \ - mbedtls_memory_buffer_alloc_max_get( &max_used, &max_blocks ); \ - for( ii = 12 - title_len; ii != 0; ii-- ) mbedtls_printf( " " ); \ - max_used -= prv_used; \ - max_blocks -= prv_blocks; \ - max_bytes = max_used + MEM_BLOCK_OVERHEAD * max_blocks; \ - mbedtls_printf( "%6u heap bytes", (unsigned) max_bytes ); - -#else -#define MEMORY_MEASURE_INIT -#define MEMORY_MEASURE_PRINT( title_len ) -#endif - -#define TIME_PUBLIC( TITLE, TYPE, CODE ) \ -do { \ - unsigned long ii; \ - int ret; \ - MEMORY_MEASURE_INIT; \ - \ - mbedtls_printf( HEADER_FORMAT, TITLE ); \ - fflush( stdout ); \ - mbedtls_set_alarm( 3 ); \ - \ - ret = 0; \ - for( ii = 1; ! mbedtls_timing_alarmed && ! ret ; ii++ ) \ - { \ - CODE; \ - } \ - \ - if( ret != 0 ) \ - { \ - PRINT_ERROR; \ - } \ - else \ - { \ - mbedtls_printf( "%6lu " TYPE "/s", ii / 3 ); \ - MEMORY_MEASURE_PRINT( sizeof( TYPE ) + 1 ); \ - mbedtls_printf( "\n" ); \ - } \ -} while( 0 ) - -static int myrand( void *rng_state, unsigned char *output, size_t len ) -{ - size_t use_len; - int rnd; - - if( rng_state != NULL ) - rng_state = NULL; - - while( len > 0 ) - { - use_len = len; - if( use_len > sizeof(int) ) - use_len = sizeof(int); - - rnd = rand(); - memcpy( output, &rnd, use_len ); - output += use_len; - len -= use_len; - } - - return( 0 ); -} - -/* - * Clear some memory that was used to prepare the context - */ -#if defined(MBEDTLS_ECP_C) -void ecp_clear_precomputed( mbedtls_ecp_group *grp ) -{ - if( grp->T != NULL ) - { - size_t i; - for( i = 0; i < grp->T_size; i++ ) - mbedtls_ecp_point_free( &grp->T[i] ); - mbedtls_free( grp->T ); - } - grp->T = NULL; - grp->T_size = 0; -} -#else -#define ecp_clear_precomputed( g ) -#endif - -unsigned char buf[BUFSIZE]; - -typedef struct { - char md4, md5, ripemd160, sha1, sha256, sha512, - arc4, des3, des, aes_cbc, aes_gcm, aes_ccm, camellia, blowfish, - havege, ctr_drbg, hmac_drbg, - rsa, dhm, ecdsa, ecdh; -} todo_list; - -int main( int argc, char *argv[] ) -{ - int i; - unsigned char tmp[200]; - char title[TITLE_LEN]; - todo_list todo; -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - unsigned char alloc_buf[HEAP_SIZE] = { 0 }; -#endif - - if( argc <= 1 ) - { - memset( &todo, 1, sizeof( todo ) ); - } - else - { - memset( &todo, 0, sizeof( todo ) ); - - for( i = 1; i < argc; i++ ) - { - if( strcmp( argv[i], "md4" ) == 0 ) - todo.md4 = 1; - else if( strcmp( argv[i], "md5" ) == 0 ) - todo.md5 = 1; - else if( strcmp( argv[i], "ripemd160" ) == 0 ) - todo.ripemd160 = 1; - else if( strcmp( argv[i], "sha1" ) == 0 ) - todo.sha1 = 1; - else if( strcmp( argv[i], "sha256" ) == 0 ) - todo.sha256 = 1; - else if( strcmp( argv[i], "sha512" ) == 0 ) - todo.sha512 = 1; - else if( strcmp( argv[i], "arc4" ) == 0 ) - todo.arc4 = 1; - else if( strcmp( argv[i], "des3" ) == 0 ) - todo.des3 = 1; - else if( strcmp( argv[i], "des" ) == 0 ) - todo.des = 1; - else if( strcmp( argv[i], "aes_cbc" ) == 0 ) - todo.aes_cbc = 1; - else if( strcmp( argv[i], "aes_gcm" ) == 0 ) - todo.aes_gcm = 1; - else if( strcmp( argv[i], "aes_ccm" ) == 0 ) - todo.aes_ccm = 1; - else if( strcmp( argv[i], "camellia" ) == 0 ) - todo.camellia = 1; - else if( strcmp( argv[i], "blowfish" ) == 0 ) - todo.blowfish = 1; - else if( strcmp( argv[i], "havege" ) == 0 ) - todo.havege = 1; - else if( strcmp( argv[i], "ctr_drbg" ) == 0 ) - todo.ctr_drbg = 1; - else if( strcmp( argv[i], "hmac_drbg" ) == 0 ) - todo.hmac_drbg = 1; - else if( strcmp( argv[i], "rsa" ) == 0 ) - todo.rsa = 1; - else if( strcmp( argv[i], "dhm" ) == 0 ) - todo.dhm = 1; - else if( strcmp( argv[i], "ecdsa" ) == 0 ) - todo.ecdsa = 1; - else if( strcmp( argv[i], "ecdh" ) == 0 ) - todo.ecdh = 1; - else - { - mbedtls_printf( "Unrecognized option: %s\n", argv[i] ); - mbedtls_printf( "Available options: " OPTIONS ); - } - } - } - - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_init( alloc_buf, sizeof( alloc_buf ) ); -#endif - memset( buf, 0xAA, sizeof( buf ) ); - memset( tmp, 0xBB, sizeof( tmp ) ); - -#if defined(MBEDTLS_MD4_C) - if( todo.md4 ) - TIME_AND_TSC( "MD4", mbedtls_md4( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_MD5_C) - if( todo.md5 ) - TIME_AND_TSC( "MD5", mbedtls_md5( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_RIPEMD160_C) - if( todo.ripemd160 ) - TIME_AND_TSC( "RIPEMD160", mbedtls_ripemd160( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_SHA1_C) - if( todo.sha1 ) - TIME_AND_TSC( "SHA-1", mbedtls_sha1( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_SHA256_C) - if( todo.sha256 ) - TIME_AND_TSC( "SHA-256", mbedtls_sha256( buf, BUFSIZE, tmp, 0 ) ); -#endif - -#if defined(MBEDTLS_SHA512_C) - if( todo.sha512 ) - TIME_AND_TSC( "SHA-512", mbedtls_sha512( buf, BUFSIZE, tmp, 0 ) ); -#endif - -#if defined(MBEDTLS_ARC4_C) - if( todo.arc4 ) - { - mbedtls_arc4_context arc4; - mbedtls_arc4_init( &arc4 ); - mbedtls_arc4_setup( &arc4, tmp, 32 ); - TIME_AND_TSC( "ARC4", mbedtls_arc4_crypt( &arc4, BUFSIZE, buf, buf ) ); - mbedtls_arc4_free( &arc4 ); - } -#endif - -#if defined(MBEDTLS_DES_C) && defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.des3 ) - { - mbedtls_des3_context des3; - mbedtls_des3_init( &des3 ); - mbedtls_des3_set3key_enc( &des3, tmp ); - TIME_AND_TSC( "3DES", - mbedtls_des3_crypt_cbc( &des3, MBEDTLS_DES_ENCRYPT, BUFSIZE, tmp, buf, buf ) ); - mbedtls_des3_free( &des3 ); - } - - if( todo.des ) - { - mbedtls_des_context des; - mbedtls_des_init( &des ); - mbedtls_des_setkey_enc( &des, tmp ); - TIME_AND_TSC( "DES", - mbedtls_des_crypt_cbc( &des, MBEDTLS_DES_ENCRYPT, BUFSIZE, tmp, buf, buf ) ); - mbedtls_des_free( &des ); - } -#endif - -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.aes_cbc ) - { - int keysize; - mbedtls_aes_context aes; - mbedtls_aes_init( &aes ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "AES-CBC-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_aes_setkey_enc( &aes, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_aes_crypt_cbc( &aes, MBEDTLS_AES_ENCRYPT, BUFSIZE, tmp, buf, buf ) ); - } - mbedtls_aes_free( &aes ); - } -#endif -#if defined(MBEDTLS_GCM_C) - if( todo.aes_gcm ) - { - int keysize; - mbedtls_gcm_context gcm; - - mbedtls_gcm_init( &gcm ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "AES-GCM-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_gcm_setkey( &gcm, MBEDTLS_CIPHER_ID_AES, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_gcm_crypt_and_tag( &gcm, MBEDTLS_GCM_ENCRYPT, BUFSIZE, tmp, - 12, NULL, 0, buf, buf, 16, tmp ) ); - - mbedtls_gcm_free( &gcm ); - } - } -#endif -#if defined(MBEDTLS_CCM_C) - if( todo.aes_ccm ) - { - int keysize; - mbedtls_ccm_context ccm; - - mbedtls_ccm_init( &ccm ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "AES-CCM-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_ccm_setkey( &ccm, MBEDTLS_CIPHER_ID_AES, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_ccm_encrypt_and_tag( &ccm, BUFSIZE, tmp, - 12, NULL, 0, buf, buf, tmp, 16 ) ); - - mbedtls_ccm_free( &ccm ); - } - } -#endif -#endif - -#if defined(MBEDTLS_CAMELLIA_C) && defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.camellia ) - { - int keysize; - mbedtls_camellia_context camellia; - mbedtls_camellia_init( &camellia ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "CAMELLIA-CBC-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_camellia_setkey_enc( &camellia, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_camellia_crypt_cbc( &camellia, MBEDTLS_CAMELLIA_ENCRYPT, - BUFSIZE, tmp, buf, buf ) ); - } - mbedtls_camellia_free( &camellia ); - } -#endif - -#if defined(MBEDTLS_BLOWFISH_C) && defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.blowfish ) - { - int keysize; - mbedtls_blowfish_context blowfish; - mbedtls_blowfish_init( &blowfish ); - - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "BLOWFISH-CBC-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_blowfish_setkey( &blowfish, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_blowfish_crypt_cbc( &blowfish, MBEDTLS_BLOWFISH_ENCRYPT, BUFSIZE, - tmp, buf, buf ) ); - } - - mbedtls_blowfish_free( &blowfish ); - } -#endif - -#if defined(MBEDTLS_HAVEGE_C) - if( todo.havege ) - { - mbedtls_havege_state hs; - mbedtls_havege_init( &hs ); - TIME_AND_TSC( "HAVEGE", mbedtls_havege_random( &hs, buf, BUFSIZE ) ); - mbedtls_havege_free( &hs ); - } -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) - if( todo.ctr_drbg ) - { - mbedtls_ctr_drbg_context ctr_drbg; - - mbedtls_ctr_drbg_init( &ctr_drbg ); - - if( mbedtls_ctr_drbg_seed( &ctr_drbg, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - TIME_AND_TSC( "CTR_DRBG (NOPR)", - if( mbedtls_ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - - if( mbedtls_ctr_drbg_seed( &ctr_drbg, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - mbedtls_ctr_drbg_set_prediction_resistance( &ctr_drbg, MBEDTLS_CTR_DRBG_PR_ON ); - TIME_AND_TSC( "CTR_DRBG (PR)", - if( mbedtls_ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - } -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) - if( todo.hmac_drbg ) - { - mbedtls_hmac_drbg_context hmac_drbg; - const mbedtls_md_info_t *md_info; - - mbedtls_hmac_drbg_init( &hmac_drbg ); - -#if defined(MBEDTLS_SHA1_C) - if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ) ) == NULL ) - mbedtls_exit(1); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - TIME_AND_TSC( "HMAC_DRBG SHA-1 (NOPR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - mbedtls_hmac_drbg_set_prediction_resistance( &hmac_drbg, - MBEDTLS_HMAC_DRBG_PR_ON ); - TIME_AND_TSC( "HMAC_DRBG SHA-1 (PR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); -#endif - -#if defined(MBEDTLS_SHA256_C) - if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ) ) == NULL ) - mbedtls_exit(1); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - TIME_AND_TSC( "HMAC_DRBG SHA-256 (NOPR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - mbedtls_hmac_drbg_set_prediction_resistance( &hmac_drbg, - MBEDTLS_HMAC_DRBG_PR_ON ); - TIME_AND_TSC( "HMAC_DRBG SHA-256 (PR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); -#endif - } -#endif - -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_GENPRIME) - if( todo.rsa ) - { - int keysize; - mbedtls_rsa_context rsa; - for( keysize = 2048; keysize <= 4096; keysize *= 2 ) - { - mbedtls_snprintf( title, sizeof( title ), "RSA-%d", keysize ); - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - mbedtls_rsa_gen_key( &rsa, myrand, NULL, keysize, 65537 ); - - TIME_PUBLIC( title, " public", - buf[0] = 0; - ret = mbedtls_rsa_public( &rsa, buf, buf ) ); - - TIME_PUBLIC( title, "private", - buf[0] = 0; - ret = mbedtls_rsa_private( &rsa, myrand, NULL, buf, buf ) ); - - mbedtls_rsa_free( &rsa ); - } - } -#endif - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_BIGNUM_C) - if( todo.dhm ) - { - int dhm_sizes[] = { 2048, 3072 }; - const char *dhm_P[] = { - MBEDTLS_DHM_RFC3526_MODP_2048_P, - MBEDTLS_DHM_RFC3526_MODP_3072_P, - }; - const char *dhm_G[] = { - MBEDTLS_DHM_RFC3526_MODP_2048_G, - MBEDTLS_DHM_RFC3526_MODP_3072_G, - }; - - mbedtls_dhm_context dhm; - size_t olen; - for( i = 0; (size_t) i < sizeof( dhm_sizes ) / sizeof( dhm_sizes[0] ); i++ ) - { - mbedtls_dhm_init( &dhm ); - - if( mbedtls_mpi_read_string( &dhm.P, 16, dhm_P[i] ) != 0 || - mbedtls_mpi_read_string( &dhm.G, 16, dhm_G[i] ) != 0 ) - { - mbedtls_exit( 1 ); - } - - dhm.len = mbedtls_mpi_size( &dhm.P ); - mbedtls_dhm_make_public( &dhm, (int) dhm.len, buf, dhm.len, myrand, NULL ); - if( mbedtls_mpi_copy( &dhm.GY, &dhm.GX ) != 0 ) - mbedtls_exit( 1 ); - - mbedtls_snprintf( title, sizeof( title ), "DHE-%d", dhm_sizes[i] ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_dhm_make_public( &dhm, (int) dhm.len, buf, dhm.len, - myrand, NULL ); - ret |= mbedtls_dhm_calc_secret( &dhm, buf, sizeof( buf ), &olen, myrand, NULL ) ); - - mbedtls_snprintf( title, sizeof( title ), "DH-%d", dhm_sizes[i] ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_dhm_calc_secret( &dhm, buf, sizeof( buf ), &olen, myrand, NULL ) ); - - mbedtls_dhm_free( &dhm ); - } - } -#endif - -#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_SHA256_C) - if( todo.ecdsa ) - { - mbedtls_ecdsa_context ecdsa; - const mbedtls_ecp_curve_info *curve_info; - size_t sig_len; - - memset( buf, 0x2A, sizeof( buf ) ); - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdsa_init( &ecdsa ); - - if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 ) - mbedtls_exit( 1 ); - ecp_clear_precomputed( &ecdsa.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDSA-%s", - curve_info->name ); - TIME_PUBLIC( title, "sign", - ret = mbedtls_ecdsa_write_signature( &ecdsa, MBEDTLS_MD_SHA256, buf, curve_info->bit_size, - tmp, &sig_len, myrand, NULL ) ); - - mbedtls_ecdsa_free( &ecdsa ); - } - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdsa_init( &ecdsa ); - - if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 || - mbedtls_ecdsa_write_signature( &ecdsa, MBEDTLS_MD_SHA256, buf, curve_info->bit_size, - tmp, &sig_len, myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - ecp_clear_precomputed( &ecdsa.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDSA-%s", - curve_info->name ); - TIME_PUBLIC( title, "verify", - ret = mbedtls_ecdsa_read_signature( &ecdsa, buf, curve_info->bit_size, - tmp, sig_len ) ); - - mbedtls_ecdsa_free( &ecdsa ); - } - } -#endif - -#if defined(MBEDTLS_ECDH_C) - if( todo.ecdh ) - { - mbedtls_ecdh_context ecdh; -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - mbedtls_mpi z; -#endif - const mbedtls_ecp_curve_info *curve_info; - size_t olen; - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdh_init( &ecdh ); - - if( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) != 0 || - mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ) != 0 || - mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) != 0 ) - { - mbedtls_exit( 1 ); - } - ecp_clear_precomputed( &ecdh.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDHE-%s", - curve_info->name ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ); - ret |= mbedtls_ecdh_calc_secret( &ecdh, &olen, buf, sizeof( buf ), - myrand, NULL ) ); - mbedtls_ecdh_free( &ecdh ); - } - - /* Curve25519 needs to be handled separately */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - mbedtls_ecdh_init( &ecdh ); - mbedtls_mpi_init( &z ); - - if( mbedtls_ecp_group_load( &ecdh.grp, MBEDTLS_ECP_DP_CURVE25519 ) != 0 || - mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Qp, myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - - TIME_PUBLIC( "ECDHE-Curve25519", "handshake", - ret |= mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Q, - myrand, NULL ); - ret |= mbedtls_ecdh_compute_shared( &ecdh.grp, &z, &ecdh.Qp, &ecdh.d, - myrand, NULL ) ); - - mbedtls_ecdh_free( &ecdh ); - mbedtls_mpi_free( &z ); -#endif - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdh_init( &ecdh ); - - if( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) != 0 || - mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ) != 0 || - mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) != 0 || - mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - ecp_clear_precomputed( &ecdh.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDH-%s", - curve_info->name ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_ecdh_calc_secret( &ecdh, &olen, buf, sizeof( buf ), - myrand, NULL ) ); - mbedtls_ecdh_free( &ecdh ); - } - - /* Curve25519 needs to be handled separately */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - mbedtls_ecdh_init( &ecdh ); - mbedtls_mpi_init( &z ); - - if( mbedtls_ecp_group_load( &ecdh.grp, MBEDTLS_ECP_DP_CURVE25519 ) != 0 || - mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Qp, - myrand, NULL ) != 0 || - mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Q, myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - - TIME_PUBLIC( "ECDH-Curve25519", "handshake", - ret |= mbedtls_ecdh_compute_shared( &ecdh.grp, &z, &ecdh.Qp, &ecdh.d, - myrand, NULL ) ); - - mbedtls_ecdh_free( &ecdh ); - mbedtls_mpi_free( &z ); -#endif - } -#endif - - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_free(); -#endif - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( 0 ); -} - -#endif /* MBEDTLS_TIMING_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/test/selftest.c b/build/premake/premake5/contrib/mbedtls/programs/test/selftest.c deleted file mode 100644 index fe5d514260..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/test/selftest.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Self-test demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "mbedtls/entropy.h" -#include "mbedtls/hmac_drbg.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/dhm.h" -#include "mbedtls/gcm.h" -#include "mbedtls/ccm.h" -#include "mbedtls/md2.h" -#include "mbedtls/md4.h" -#include "mbedtls/md5.h" -#include "mbedtls/ripemd160.h" -#include "mbedtls/sha1.h" -#include "mbedtls/sha256.h" -#include "mbedtls/sha512.h" -#include "mbedtls/arc4.h" -#include "mbedtls/des.h" -#include "mbedtls/aes.h" -#include "mbedtls/camellia.h" -#include "mbedtls/base64.h" -#include "mbedtls/bignum.h" -#include "mbedtls/rsa.h" -#include "mbedtls/x509.h" -#include "mbedtls/xtea.h" -#include "mbedtls/pkcs5.h" -#include "mbedtls/ecp.h" -#include "mbedtls/ecjpake.h" -#include "mbedtls/timing.h" - -#include -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -static int test_snprintf( size_t n, const char ref_buf[10], int ref_ret ) -{ - int ret; - char buf[10] = "xxxxxxxxx"; - const char ref[10] = "xxxxxxxxx"; - - ret = mbedtls_snprintf( buf, n, "%s", "123" ); - if( ret < 0 || (size_t) ret >= n ) - ret = -1; - - if( strncmp( ref_buf, buf, sizeof( buf ) ) != 0 || - ref_ret != ret || - memcmp( buf + n, ref + n, sizeof( buf ) - n ) != 0 ) - { - return( 1 ); - } - - return( 0 ); -} - -static int run_test_snprintf( void ) -{ - return( test_snprintf( 0, "xxxxxxxxx", -1 ) != 0 || - test_snprintf( 1, "", -1 ) != 0 || - test_snprintf( 2, "1", -1 ) != 0 || - test_snprintf( 3, "12", -1 ) != 0 || - test_snprintf( 4, "123", 3 ) != 0 || - test_snprintf( 5, "123", 3 ) != 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0, v; -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - unsigned char buf[1000000]; -#endif - void *pointer; - - /* - * The C standard doesn't guarantee that all-bits-0 is the representation - * of a NULL pointer. We do however use that in our code for initializing - * structures, which should work on every modern platform. Let's be sure. - */ - memset( &pointer, 0, sizeof( void * ) ); - if( pointer != NULL ) - { - mbedtls_printf( "all-bits-zero is not a NULL pointer\n" ); - return( 1 ); - } - - /* - * Make sure we have a snprintf that correctly zero-terminates - */ - if( run_test_snprintf() != 0 ) - { - mbedtls_printf( "the snprintf implementation is broken\n" ); - return( 0 ); - } - - if( argc == 2 && strcmp( argv[1], "-quiet" ) == 0 ) - v = 0; - else - { - v = 1; - mbedtls_printf( "\n" ); - } - -#if defined(MBEDTLS_SELF_TEST) - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_init( buf, sizeof(buf) ); -#endif - -#if defined(MBEDTLS_MD2_C) - if( ( ret = mbedtls_md2_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_MD4_C) - if( ( ret = mbedtls_md4_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_MD5_C) - if( ( ret = mbedtls_md5_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_RIPEMD160_C) - if( ( ret = mbedtls_ripemd160_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_SHA1_C) - if( ( ret = mbedtls_sha1_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_SHA256_C) - if( ( ret = mbedtls_sha256_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_SHA512_C) - if( ( ret = mbedtls_sha512_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ARC4_C) - if( ( ret = mbedtls_arc4_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_DES_C) - if( ( ret = mbedtls_des_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_AES_C) - if( ( ret = mbedtls_aes_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_GCM_C) && defined(MBEDTLS_AES_C) - if( ( ret = mbedtls_gcm_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_CCM_C) && defined(MBEDTLS_AES_C) - if( ( ret = mbedtls_ccm_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_BASE64_C) - if( ( ret = mbedtls_base64_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_BIGNUM_C) - if( ( ret = mbedtls_mpi_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_RSA_C) - if( ( ret = mbedtls_rsa_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_X509_USE_C) - if( ( ret = mbedtls_x509_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_XTEA_C) - if( ( ret = mbedtls_xtea_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_CAMELLIA_C) - if( ( ret = mbedtls_camellia_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) - if( ( ret = mbedtls_ctr_drbg_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) - if( ( ret = mbedtls_hmac_drbg_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ECP_C) - if( ( ret = mbedtls_ecp_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ECJPAKE_C) - if( ( ret = mbedtls_ecjpake_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_DHM_C) - if( ( ret = mbedtls_dhm_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ENTROPY_C) - if( ( ret = mbedtls_entropy_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_PKCS5_C) - if( ( ret = mbedtls_pkcs5_self_test( v ) ) != 0 ) - return( ret ); -#endif - -/* Slow tests last */ - -#if defined(MBEDTLS_TIMING_C) - if( ( ret = mbedtls_timing_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#else - mbedtls_printf( " MBEDTLS_SELF_TEST not defined.\n" ); -#endif - - if( v != 0 ) - { -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_memory_buffer_alloc_status(); -#endif - } - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_free(); - - if( ( ret = mbedtls_memory_buffer_alloc_self_test( v ) ) != 0 ) - return( ret ); -#endif - - if( v != 0 ) - { - mbedtls_printf( " [ All tests passed ]\n\n" ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - } - - return( ret ); -} diff --git a/build/premake/premake5/contrib/mbedtls/programs/test/ssl_cert_test.c b/build/premake/premake5/contrib/mbedtls/programs/test/ssl_cert_test.c deleted file mode 100644 index 9cfcd2d554..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/test/ssl_cert_test.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * SSL certificate functionality tests - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_snprintf snprintf -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_X509_CRT_PARSE_C) && \ - defined(MBEDTLS_FS_IO) && defined(MBEDTLS_X509_CRL_PARSE_C) -#include "mbedtls/certs.h" -#include "mbedtls/x509_crt.h" - -#include -#include -#endif - -#define MAX_CLIENT_CERTS 8 - -#if !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \ - !defined(MBEDTLS_FS_IO) || !defined(MBEDTLS_X509_CRL_PARSE_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_RSA_C and/or MBEDTLS_X509_CRT_PARSE_C " - "MBEDTLS_FS_IO and/or MBEDTLS_X509_CRL_PARSE_C " - "not defined.\n"); - return( 0 ); -} -#else -const char *client_certificates[MAX_CLIENT_CERTS] = -{ - "client1.crt", - "client2.crt", - "server1.crt", - "server2.crt", - "cert_sha224.crt", - "cert_sha256.crt", - "cert_sha384.crt", - "cert_sha512.crt" -}; - -const char *client_private_keys[MAX_CLIENT_CERTS] = -{ - "client1.key", - "client2.key", - "server1.key", - "server2.key", - "cert_digest.key", - "cert_digest.key", - "cert_digest.key", - "cert_digest.key" -}; - -int main( void ) -{ - int ret, i; - mbedtls_x509_crt cacert; - mbedtls_x509_crl crl; - char buf[10240]; - - mbedtls_x509_crt_init( &cacert ); - mbedtls_x509_crl_init( &crl ); - - /* - * 1.1. Load the trusted CA - */ - mbedtls_printf( "\n . Loading the CA root certificate ..." ); - fflush( stdout ); - - /* - * Alternatively, you may load the CA certificates from a .pem or - * .crt file by calling mbedtls_x509_crt_parse_file( &cacert, "myca.crt" ). - */ - ret = mbedtls_x509_crt_parse_file( &cacert, "ssl/test-ca/test-ca.crt" ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse_file returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - mbedtls_x509_crt_info( buf, 1024, "CRT: ", &cacert ); - mbedtls_printf("%s\n", buf ); - - /* - * 1.2. Load the CRL - */ - mbedtls_printf( " . Loading the CRL ..." ); - fflush( stdout ); - - ret = mbedtls_x509_crl_parse_file( &crl, "ssl/test-ca/crl.pem" ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crl_parse_file returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - mbedtls_x509_crl_info( buf, 1024, "CRL: ", &crl ); - mbedtls_printf("%s\n", buf ); - - for( i = 0; i < MAX_CLIENT_CERTS; i++ ) - { - /* - * 1.3. Load own certificate - */ - char name[512]; - uint32_t flags; - mbedtls_x509_crt clicert; - mbedtls_pk_context pk; - - mbedtls_x509_crt_init( &clicert ); - mbedtls_pk_init( &pk ); - - mbedtls_snprintf(name, 512, "ssl/test-ca/%s", client_certificates[i]); - - mbedtls_printf( " . Loading the client certificate %s...", name ); - fflush( stdout ); - - ret = mbedtls_x509_crt_parse_file( &clicert, name ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse_file returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.4. Verify certificate validity with CA certificate - */ - mbedtls_printf( " . Verify the client certificate with CA certificate..." ); - fflush( stdout ); - - ret = mbedtls_x509_crt_verify( &clicert, &cacert, &crl, NULL, &flags, NULL, - NULL ); - if( ret != 0 ) - { - if( ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_verify returned %d\n\n", ret ); - goto exit; - } - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.5. Load own private key - */ - mbedtls_snprintf(name, 512, "ssl/test-ca/%s", client_private_keys[i]); - - mbedtls_printf( " . Loading the client private key %s...", name ); - fflush( stdout ); - - ret = mbedtls_pk_parse_keyfile( &pk, name, NULL ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.6. Verify certificate validity with private key - */ - mbedtls_printf( " . Verify the client certificate with private key..." ); - fflush( stdout ); - - - /* EC NOT IMPLEMENTED YET */ - if( ! mbedtls_pk_can_do( &clicert.pk, MBEDTLS_PK_RSA ) ) - { - mbedtls_printf( " failed\n ! certificate's key is not RSA\n\n" ); - ret = MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE; - goto exit; - } - - ret = mbedtls_mpi_cmp_mpi(&mbedtls_pk_rsa( pk )->N, &mbedtls_pk_rsa( clicert.pk )->N); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_cmp_mpi for N returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_mpi_cmp_mpi(&mbedtls_pk_rsa( pk )->E, &mbedtls_pk_rsa( clicert.pk )->E); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_mpi_cmp_mpi for E returned %d\n\n", ret ); - goto exit; - } - - ret = mbedtls_rsa_check_privkey( mbedtls_pk_rsa( pk ) ); - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_rsa_check_privkey returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - mbedtls_x509_crt_free( &clicert ); - mbedtls_pk_free( &pk ); - } - -exit: - mbedtls_x509_crt_free( &cacert ); - mbedtls_x509_crl_free( &crl ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_RSA_C && MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_FS_IO && - MBEDTLS_X509_CRL_PARSE_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/test/udp_proxy.c b/build/premake/premake5/contrib/mbedtls/programs/test/udp_proxy.c deleted file mode 100644 index eb8d29e71d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/test/udp_proxy.c +++ /dev/null @@ -1,617 +0,0 @@ -/* - * UDP proxy: emulate an unreliable UDP connexion for DTLS testing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * Warning: this is an internal utility program we use for tests. - * It does break some abstractions from the NET layer, and is thus NOT an - * example of good general usage. - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_NET_C) -#include -int main( void ) -{ - mbedtls_printf( "MBEDTLS_NET_C not defined.\n" ); - return( 0 ); -} -#else - -#include "mbedtls/net.h" -#include "mbedtls/error.h" -#include "mbedtls/ssl.h" - -#include -#include -#include -#include - -/* For select() */ -#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ - !defined(EFI32) -#include -#include -#if defined(_MSC_VER) -#if defined(_WIN32_WCE) -#pragma comment( lib, "ws2.lib" ) -#else -#pragma comment( lib, "ws2_32.lib" ) -#endif -#endif /* _MSC_VER */ -#else /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ -#include -#include -#include -#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ - -/* For gettimeofday() */ -#if !defined(_WIN32) -#include -#endif - -#define MAX_MSG_SIZE 16384 + 2048 /* max record/datagram size */ - -#define DFL_SERVER_ADDR "localhost" -#define DFL_SERVER_PORT "4433" -#define DFL_LISTEN_ADDR "localhost" -#define DFL_LISTEN_PORT "5556" - -#define USAGE \ - "\n usage: udp_proxy param=<>...\n" \ - "\n acceptable parameters:\n" \ - " server_addr=%%s default: localhost\n" \ - " server_port=%%d default: 4433\n" \ - " listen_addr=%%s default: localhost\n" \ - " listen_port=%%d default: 4433\n" \ - "\n" \ - " duplicate=%%d default: 0 (no duplication)\n" \ - " duplicate about 1:N packets randomly\n" \ - " delay=%%d default: 0 (no delayed packets)\n" \ - " delay about 1:N packets randomly\n" \ - " delay_ccs=0/1 default: 0 (don't delay ChangeCipherSpec)\n" \ - " drop=%%d default: 0 (no dropped packets)\n" \ - " drop about 1:N packets randomly\n" \ - " mtu=%%d default: 0 (unlimited)\n" \ - " drop packets larger than N bytes\n" \ - " bad_ad=0/1 default: 0 (don't add bad ApplicationData)\n" \ - " protect_hvr=0/1 default: 0 (don't protect HelloVerifyRequest)\n" \ - " protect_len=%%d default: (don't protect packets of this size)\n" \ - "\n" \ - " seed=%%d default: (use current time)\n" \ - "\n" - -/* - * global options - */ -static struct options -{ - const char *server_addr; /* address to forward packets to */ - const char *server_port; /* port to forward packets to */ - const char *listen_addr; /* address for accepting client connections */ - const char *listen_port; /* port for accepting client connections */ - - int duplicate; /* duplicate 1 in N packets (none if 0) */ - int delay; /* delay 1 packet in N (none if 0) */ - int delay_ccs; /* delay ChangeCipherSpec */ - int drop; /* drop 1 packet in N (none if 0) */ - int mtu; /* drop packets larger than this */ - int bad_ad; /* inject corrupted ApplicationData record */ - int protect_hvr; /* never drop or delay HelloVerifyRequest */ - int protect_len; /* never drop/delay packet of the given size*/ - - unsigned int seed; /* seed for "random" events */ -} opt; - -static void exit_usage( const char *name, const char *value ) -{ - if( value == NULL ) - mbedtls_printf( " unknown option or missing value: %s\n", name ); - else - mbedtls_printf( " option %s: illegal value: %s\n", name, value ); - - mbedtls_printf( USAGE ); - exit( 1 ); -} - -static void get_options( int argc, char *argv[] ) -{ - int i; - char *p, *q; - - opt.server_addr = DFL_SERVER_ADDR; - opt.server_port = DFL_SERVER_PORT; - opt.listen_addr = DFL_LISTEN_ADDR; - opt.listen_port = DFL_LISTEN_PORT; - /* Other members default to 0 */ - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - exit_usage( p, NULL ); - *q++ = '\0'; - - if( strcmp( p, "server_addr" ) == 0 ) - opt.server_addr = q; - else if( strcmp( p, "server_port" ) == 0 ) - opt.server_port = q; - else if( strcmp( p, "listen_addr" ) == 0 ) - opt.listen_addr = q; - else if( strcmp( p, "listen_port" ) == 0 ) - opt.listen_port = q; - else if( strcmp( p, "duplicate" ) == 0 ) - { - opt.duplicate = atoi( q ); - if( opt.duplicate < 0 || opt.duplicate > 20 ) - exit_usage( p, q ); - } - else if( strcmp( p, "delay" ) == 0 ) - { - opt.delay = atoi( q ); - if( opt.delay < 0 || opt.delay > 20 || opt.delay == 1 ) - exit_usage( p, q ); - } - else if( strcmp( p, "delay_ccs" ) == 0 ) - { - opt.delay_ccs = atoi( q ); - if( opt.delay_ccs < 0 || opt.delay_ccs > 1 ) - exit_usage( p, q ); - } - else if( strcmp( p, "drop" ) == 0 ) - { - opt.drop = atoi( q ); - if( opt.drop < 0 || opt.drop > 20 || opt.drop == 1 ) - exit_usage( p, q ); - } - else if( strcmp( p, "mtu" ) == 0 ) - { - opt.mtu = atoi( q ); - if( opt.mtu < 0 || opt.mtu > MAX_MSG_SIZE ) - exit_usage( p, q ); - } - else if( strcmp( p, "bad_ad" ) == 0 ) - { - opt.bad_ad = atoi( q ); - if( opt.bad_ad < 0 || opt.bad_ad > 1 ) - exit_usage( p, q ); - } - else if( strcmp( p, "protect_hvr" ) == 0 ) - { - opt.protect_hvr = atoi( q ); - if( opt.protect_hvr < 0 || opt.protect_hvr > 1 ) - exit_usage( p, q ); - } - else if( strcmp( p, "protect_len" ) == 0 ) - { - opt.protect_len = atoi( q ); - if( opt.protect_len < 0 ) - exit_usage( p, q ); - } - else if( strcmp( p, "seed" ) == 0 ) - { - opt.seed = atoi( q ); - if( opt.seed == 0 ) - exit_usage( p, q ); - } - else - exit_usage( p, NULL ); - } -} - -static const char *msg_type( unsigned char *msg, size_t len ) -{ - if( len < 1 ) return( "Invalid" ); - switch( msg[0] ) - { - case MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC: return( "ChangeCipherSpec" ); - case MBEDTLS_SSL_MSG_ALERT: return( "Alert" ); - case MBEDTLS_SSL_MSG_APPLICATION_DATA: return( "ApplicationData" ); - case MBEDTLS_SSL_MSG_HANDSHAKE: break; /* See below */ - default: return( "Unknown" ); - } - - if( len < 13 + 12 ) return( "Invalid handshake" ); - - /* - * Our handshake message are less than 2^16 bytes long, so they should - * have 0 as the first byte of length, frag_offset and frag_length. - * Otherwise, assume they are encrypted. - */ - if( msg[14] || msg[19] || msg[22] ) return( "Encrypted handshake" ); - - switch( msg[13] ) - { - case MBEDTLS_SSL_HS_HELLO_REQUEST: return( "HelloRequest" ); - case MBEDTLS_SSL_HS_CLIENT_HELLO: return( "ClientHello" ); - case MBEDTLS_SSL_HS_SERVER_HELLO: return( "ServerHello" ); - case MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST: return( "HelloVerifyRequest" ); - case MBEDTLS_SSL_HS_NEW_SESSION_TICKET: return( "NewSessionTicket" ); - case MBEDTLS_SSL_HS_CERTIFICATE: return( "Certificate" ); - case MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE: return( "ServerKeyExchange" ); - case MBEDTLS_SSL_HS_CERTIFICATE_REQUEST: return( "CertificateRequest" ); - case MBEDTLS_SSL_HS_SERVER_HELLO_DONE: return( "ServerHelloDone" ); - case MBEDTLS_SSL_HS_CERTIFICATE_VERIFY: return( "CertificateVerify" ); - case MBEDTLS_SSL_HS_CLIENT_KEY_EXCHANGE: return( "ClientKeyExchange" ); - case MBEDTLS_SSL_HS_FINISHED: return( "Finished" ); - default: return( "Unknown handshake" ); - } -} - -/* Return elapsed time in milliseconds since the first call */ -static unsigned long ellapsed_time( void ) -{ -#if defined(_WIN32) - return( 0 ); -#else - static struct timeval ref = { 0, 0 }; - struct timeval now; - - if( ref.tv_sec == 0 && ref.tv_usec == 0 ) - { - gettimeofday( &ref, NULL ); - return( 0 ); - } - - gettimeofday( &now, NULL ); - return( 1000 * ( now.tv_sec - ref.tv_sec ) - + ( now.tv_usec - ref.tv_usec ) / 1000 ); -#endif -} - -typedef struct -{ - mbedtls_net_context *dst; - const char *way; - const char *type; - unsigned len; - unsigned char buf[MAX_MSG_SIZE]; -} packet; - -/* Print packet. Outgoing packets come with a reason (forward, dupl, etc.) */ -void print_packet( const packet *p, const char *why ) -{ - if( why == NULL ) - mbedtls_printf( " %05lu %s %s (%u bytes)\n", - ellapsed_time(), p->way, p->type, p->len ); - else - mbedtls_printf( " %s %s (%u bytes): %s\n", - p->way, p->type, p->len, why ); - fflush( stdout ); -} - -int send_packet( const packet *p, const char *why ) -{ - int ret; - mbedtls_net_context *dst = p->dst; - - /* insert corrupted ApplicationData record? */ - if( opt.bad_ad && - strcmp( p->type, "ApplicationData" ) == 0 ) - { - unsigned char buf[MAX_MSG_SIZE]; - memcpy( buf, p->buf, p->len ); - ++buf[p->len - 1]; - - print_packet( p, "corrupted" ); - if( ( ret = mbedtls_net_send( dst, buf, p->len ) ) <= 0 ) - { - mbedtls_printf( " ! mbedtls_net_send returned %d\n", ret ); - return( ret ); - } - } - - print_packet( p, why ); - if( ( ret = mbedtls_net_send( dst, p->buf, p->len ) ) <= 0 ) - { - mbedtls_printf( " ! mbedtls_net_send returned %d\n", ret ); - return( ret ); - } - - /* Don't duplicate Application Data, only handshake covered */ - if( opt.duplicate != 0 && - strcmp( p->type, "ApplicationData" ) != 0 && - rand() % opt.duplicate == 0 ) - { - print_packet( p, "duplicated" ); - - if( ( ret = mbedtls_net_send( dst, p->buf, p->len ) ) <= 0 ) - { - mbedtls_printf( " ! mbedtls_net_send returned %d\n", ret ); - return( ret ); - } - } - - return( 0 ); -} - -static packet prev; - -void clear_pending( void ) -{ - memset( &prev, 0, sizeof( packet ) ); -} - -/* - * Avoid dropping or delaying a packet that was already dropped twice: this - * only results in uninteresting timeouts. We can't rely on type to identify - * packets, since during renegotiation they're all encrypted. So, rely on - * size mod 2048 (which is usually just size). - */ -static unsigned char dropped[2048] = { 0 }; -#define DROP_MAX 2 - -/* - * OpenSSL groups packets in a datagram the first time it sends them, but not - * when it resends them. Count every record as seen the first time. - */ -void update_dropped( const packet *p ) -{ - size_t id = p->len % sizeof( dropped ); - const unsigned char *end = p->buf + p->len; - const unsigned char *cur = p->buf; - size_t len = ( ( cur[11] << 8 ) | cur[12] ) + 13; - - ++dropped[id]; - - /* Avoid counting single record twice */ - if( len == p->len ) - return; - - while( cur < end ) - { - len = ( ( cur[11] << 8 ) | cur[12] ) + 13; - - id = len % sizeof( dropped ); - ++dropped[id]; - - cur += len; - } -} - -int handle_message( const char *way, - mbedtls_net_context *dst, - mbedtls_net_context *src ) -{ - int ret; - packet cur; - size_t id; - - /* receive packet */ - if( ( ret = mbedtls_net_recv( src, cur.buf, sizeof( cur.buf ) ) ) <= 0 ) - { - mbedtls_printf( " ! mbedtls_net_recv returned %d\n", ret ); - return( ret ); - } - - cur.len = ret; - cur.type = msg_type( cur.buf, cur.len ); - cur.way = way; - cur.dst = dst; - print_packet( &cur, NULL ); - - id = cur.len % sizeof( dropped ); - - /* do we want to drop, delay, or forward it? */ - if( ( opt.mtu != 0 && - cur.len > (unsigned) opt.mtu ) || - ( opt.drop != 0 && - strcmp( cur.type, "ApplicationData" ) != 0 && - ! ( opt.protect_hvr && - strcmp( cur.type, "HelloVerifyRequest" ) == 0 ) && - cur.len != (size_t) opt.protect_len && - dropped[id] < DROP_MAX && - rand() % opt.drop == 0 ) ) - { - update_dropped( &cur ); - } - else if( ( opt.delay_ccs == 1 && - strcmp( cur.type, "ChangeCipherSpec" ) == 0 ) || - ( opt.delay != 0 && - strcmp( cur.type, "ApplicationData" ) != 0 && - ! ( opt.protect_hvr && - strcmp( cur.type, "HelloVerifyRequest" ) == 0 ) && - prev.dst == NULL && - cur.len != (size_t) opt.protect_len && - dropped[id] < DROP_MAX && - rand() % opt.delay == 0 ) ) - { - memcpy( &prev, &cur, sizeof( packet ) ); - } - else - { - /* forward and possibly duplicate */ - if( ( ret = send_packet( &cur, "forwarded" ) ) != 0 ) - return( ret ); - - /* send previously delayed message if any */ - if( prev.dst != NULL ) - { - ret = send_packet( &prev, "delayed" ); - memset( &prev, 0, sizeof( packet ) ); - if( ret != 0 ) - return( ret ); - } - } - - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret; - - mbedtls_net_context listen_fd, client_fd, server_fd; - - int nb_fds; - fd_set read_fds; - - mbedtls_net_init( &listen_fd ); - mbedtls_net_init( &client_fd ); - mbedtls_net_init( &server_fd ); - - get_options( argc, argv ); - - /* - * Decisions to drop/delay/duplicate packets are pseudo-random: dropping - * exactly 1 in N packets would lead to problems when a flight has exactly - * N packets: the same packet would be dropped on every resend. - * - * In order to be able to reproduce problems reliably, the seed may be - * specified explicitly. - */ - if( opt.seed == 0 ) - { - opt.seed = (unsigned int) time( NULL ); - mbedtls_printf( " . Pseudo-random seed: %u\n", opt.seed ); - } - - srand( opt.seed ); - - /* - * 0. "Connect" to the server - */ - mbedtls_printf( " . Connect to server on UDP/%s/%s ...", - opt.server_addr, opt.server_port ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, opt.server_addr, opt.server_port, - MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1. Setup the "listening" UDP socket - */ - mbedtls_printf( " . Bind on UDP/%s/%s ...", - opt.listen_addr, opt.listen_port ); - fflush( stdout ); - - if( ( ret = mbedtls_net_bind( &listen_fd, opt.listen_addr, opt.listen_port, - MBEDTLS_NET_PROTO_UDP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_bind returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Wait until a client connects - */ -accept: - mbedtls_net_free( &client_fd ); - - mbedtls_printf( " . Waiting for a remote connection ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, - NULL, 0, NULL ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_accept returned %d\n\n", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 3. Forward packets forever (kill the process to terminate it) - */ - clear_pending(); - memset( dropped, 0, sizeof( dropped ) ); - - nb_fds = client_fd.fd; - if( nb_fds < server_fd.fd ) - nb_fds = server_fd.fd; - if( nb_fds < listen_fd.fd ) - nb_fds = listen_fd.fd; - ++nb_fds; - - while( 1 ) - { - FD_ZERO( &read_fds ); - FD_SET( server_fd.fd, &read_fds ); - FD_SET( client_fd.fd, &read_fds ); - FD_SET( listen_fd.fd, &read_fds ); - - if( ( ret = select( nb_fds, &read_fds, NULL, NULL, NULL ) ) <= 0 ) - { - perror( "select" ); - goto exit; - } - - if( FD_ISSET( listen_fd.fd, &read_fds ) ) - goto accept; - - if( FD_ISSET( client_fd.fd, &read_fds ) ) - { - if( ( ret = handle_message( "S <- C", - &server_fd, &client_fd ) ) != 0 ) - goto accept; - } - - if( FD_ISSET( server_fd.fd, &read_fds ) ) - { - if( ( ret = handle_message( "S -> C", - &client_fd, &server_fd ) ) != 0 ) - goto accept; - } - } - -exit: - -#ifdef MBEDTLS_ERROR_C - if( ret != 0 ) - { - char error_buf[100]; - mbedtls_strerror( ret, error_buf, 100 ); - mbedtls_printf( "Last error was: -0x%04X - %s\n\n", - ret, error_buf ); - fflush( stdout ); - } -#endif - - mbedtls_net_free( &client_fd ); - mbedtls_net_free( &server_fd ); - mbedtls_net_free( &listen_fd ); - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret != 0 ); -} - -#endif /* MBEDTLS_NET_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/util/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/util/CMakeLists.txt deleted file mode 100644 index f9b6604538..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/util/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -set(libs - mbedtls -) - -add_executable(strerror strerror.c) -target_link_libraries(strerror ${libs}) - -add_executable(pem2der pem2der.c) -target_link_libraries(pem2der ${libs}) - -install(TARGETS strerror pem2der - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/util/pem2der.c b/build/premake/premake5/contrib/mbedtls/programs/util/pem2der.c deleted file mode 100644 index ad2c6ac139..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/util/pem2der.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Convert PEM to DER - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_FS_IO) -#include "mbedtls/error.h" -#include "mbedtls/base64.h" - -#include -#include -#include -#endif - -#define DFL_FILENAME "file.pem" -#define DFL_OUTPUT_FILENAME "file.der" - -#define USAGE \ - "\n usage: pem2der param=<>...\n" \ - "\n acceptable parameters:\n" \ - " filename=%%s default: file.pem\n" \ - " output_file=%%s default: file.der\n" \ - "\n" - -#if !defined(MBEDTLS_BASE64_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BASE64_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else -/* - * global options - */ -struct options -{ - const char *filename; /* filename of the input file */ - const char *output_file; /* where to store the output */ -} opt; - -int convert_pem_to_der( const unsigned char *input, size_t ilen, - unsigned char *output, size_t *olen ) -{ - int ret; - const unsigned char *s1, *s2, *end = input + ilen; - size_t len = 0; - - s1 = (unsigned char *) strstr( (const char *) input, "-----BEGIN" ); - if( s1 == NULL ) - return( -1 ); - - s2 = (unsigned char *) strstr( (const char *) input, "-----END" ); - if( s2 == NULL ) - return( -1 ); - - s1 += 10; - while( s1 < end && *s1 != '-' ) - s1++; - while( s1 < end && *s1 == '-' ) - s1++; - if( *s1 == '\r' ) s1++; - if( *s1 == '\n' ) s1++; - - if( s2 <= s1 || s2 > end ) - return( -1 ); - - ret = mbedtls_base64_decode( NULL, 0, &len, (const unsigned char *) s1, s2 - s1 ); - if( ret == MBEDTLS_ERR_BASE64_INVALID_CHARACTER ) - return( ret ); - - if( len > *olen ) - return( -1 ); - - if( ( ret = mbedtls_base64_decode( output, len, &len, (const unsigned char *) s1, - s2 - s1 ) ) != 0 ) - { - return( ret ); - } - - *olen = len; - - return( 0 ); -} - -/* - * Load all data from a file into a given buffer. - */ -static int load_file( const char *path, unsigned char **buf, size_t *n ) -{ - FILE *f; - long size; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( -1 ); - - fseek( f, 0, SEEK_END ); - if( ( size = ftell( f ) ) == -1 ) - { - fclose( f ); - return( -1 ); - } - fseek( f, 0, SEEK_SET ); - - *n = (size_t) size; - - if( *n + 1 == 0 || - ( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL ) - { - fclose( f ); - return( -1 ); - } - - if( fread( *buf, 1, *n, f ) != *n ) - { - fclose( f ); - free( *buf ); - *buf = NULL; - return( -1 ); - } - - fclose( f ); - - (*buf)[*n] = '\0'; - - return( 0 ); -} - -/* - * Write buffer to a file - */ -static int write_file( const char *path, unsigned char *buf, size_t n ) -{ - FILE *f; - - if( ( f = fopen( path, "wb" ) ) == NULL ) - return( -1 ); - - if( fwrite( buf, 1, n, f ) != n ) - { - fclose( f ); - return( -1 ); - } - - fclose( f ); - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0; - unsigned char *pem_buffer = NULL; - unsigned char der_buffer[4096]; - char buf[1024]; - size_t pem_size, der_size = sizeof(der_buffer); - int i; - char *p, *q; - - /* - * Set to sane values - */ - memset( buf, 0, sizeof(buf) ); - memset( der_buffer, 0, sizeof(der_buffer) ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - goto exit; - } - - opt.filename = DFL_FILENAME; - opt.output_file = DFL_OUTPUT_FILENAME; - - for( i = 1; i < argc; i++ ) - { - - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else if( strcmp( p, "output_file" ) == 0 ) - opt.output_file = q; - else - goto usage; - } - - /* - * 1.1. Load the PEM file - */ - mbedtls_printf( "\n . Loading the PEM file ..." ); - fflush( stdout ); - - ret = load_file( opt.filename, &pem_buffer, &pem_size ); - - if( ret != 0 ) - { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror( ret, buf, 1024 ); -#endif - mbedtls_printf( " failed\n ! load_file returned %d - %s\n\n", ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2. Convert from PEM to DER - */ - mbedtls_printf( " . Converting from PEM to DER ..." ); - fflush( stdout ); - - if( ( ret = convert_pem_to_der( pem_buffer, pem_size, der_buffer, &der_size ) ) != 0 ) - { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror( ret, buf, 1024 ); -#endif - mbedtls_printf( " failed\n ! convert_pem_to_der %d - %s\n\n", ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.3. Write the DER file - */ - mbedtls_printf( " . Writing the DER file ..." ); - fflush( stdout ); - - ret = write_file( opt.output_file, der_buffer, der_size ); - - if( ret != 0 ) - { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror( ret, buf, 1024 ); -#endif - mbedtls_printf( " failed\n ! write_file returned %d - %s\n\n", ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -exit: - free( pem_buffer ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BASE64_C && MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/util/strerror.c b/build/premake/premake5/contrib/mbedtls/programs/util/strerror.c deleted file mode 100644 index 458280c989..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/util/strerror.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Translate error code to error string - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) -#include "mbedtls/error.h" - -#include -#include -#include -#endif - -#define USAGE \ - "\n usage: strerror \n" \ - "\n where can be a decimal or hexadecimal (starts with 0x or -0x)\n" - -#if !defined(MBEDTLS_ERROR_C) && !defined(MBEDTLS_ERROR_STRERROR_DUMMY) -int main( void ) -{ - mbedtls_printf("MBEDTLS_ERROR_C and/or MBEDTLS_ERROR_STRERROR_DUMMY not defined.\n"); - return( 0 ); -} -#else -int main( int argc, char *argv[] ) -{ - long int val; - char *end = argv[1]; - - if( argc != 2 ) - { - mbedtls_printf( USAGE ); - return( 0 ); - } - - val = strtol( argv[1], &end, 10 ); - if( *end != '\0' ) - { - val = strtol( argv[1], &end, 16 ); - if( *end != '\0' ) - { - mbedtls_printf( USAGE ); - return( 0 ); - } - } - if( val > 0 ) - val = -val; - - if( val != 0 ) - { - char error_buf[200]; - mbedtls_strerror( val, error_buf, 200 ); - mbedtls_printf("Last error was: -0x%04x - %s\n\n", (int) -val, error_buf ); - } - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( val ); -} -#endif /* MBEDTLS_ERROR_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/wince_main.c b/build/premake/premake5/contrib/mbedtls/programs/wince_main.c deleted file mode 100644 index 203a2ba456..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/wince_main.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Windows CE console application entry point - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if defined(_WIN32_WCE) - -#include - -extern int main( int, const char ** ); - -int _tmain( int argc, _TCHAR* targv[] ) -{ - char **argv; - int i; - - argv = ( char ** ) calloc( argc, sizeof( char * ) ); - - for ( i = 0; i < argc; i++ ) { - size_t len; - len = _tcslen( targv[i] ) + 1; - argv[i] = ( char * ) calloc( len, sizeof( char ) ); - wcstombs( argv[i], targv[i], len ); - } - - return main( argc, argv ); -} - -#endif /* defined(_WIN32_WCE) */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/x509/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/programs/x509/CMakeLists.txt deleted file mode 100644 index 39b8b5bab3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/x509/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -set(libs - mbedtls -) - -if(USE_PKCS11_HELPER_LIBRARY) - set(libs ${libs} pkcs11-helper) -endif(USE_PKCS11_HELPER_LIBRARY) - -if(ENABLE_ZLIB_SUPPORT) - set(libs ${libs} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB_SUPPORT) - -add_executable(cert_app cert_app.c) -target_link_libraries(cert_app ${libs}) - -add_executable(crl_app crl_app.c) -target_link_libraries(crl_app ${libs}) - -add_executable(req_app req_app.c) -target_link_libraries(req_app ${libs}) - -add_executable(cert_req cert_req.c) -target_link_libraries(cert_req ${libs}) - -add_executable(cert_write cert_write.c) -target_link_libraries(cert_write ${libs}) - -install(TARGETS cert_app crl_app req_app cert_req cert_write - DESTINATION "bin" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/build/premake/premake5/contrib/mbedtls/programs/x509/cert_app.c b/build/premake/premake5/contrib/mbedtls/programs/x509/cert_app.c deleted file mode 100644 index 84f67e6d3f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/x509/cert_app.c +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Certificate reading application - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ - !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_CLI_C) || \ - !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or " - "MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_CLI_C and/or " - "MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_X509_CRT_PARSE_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_CTR_DRBG_C not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/net.h" -#include "mbedtls/ssl.h" -#include "mbedtls/x509.h" - -#include -#include -#include - -#define MODE_NONE 0 -#define MODE_FILE 1 -#define MODE_SSL 2 - -#define DFL_MODE MODE_NONE -#define DFL_FILENAME "cert.crt" -#define DFL_CA_FILE "" -#define DFL_CRL_FILE "" -#define DFL_CA_PATH "" -#define DFL_SERVER_NAME "localhost" -#define DFL_SERVER_PORT "4433" -#define DFL_DEBUG_LEVEL 0 -#define DFL_PERMISSIVE 0 - -#define USAGE_IO \ - " ca_file=%%s The single file containing the top-level CA(s) you fully trust\n" \ - " default: \"\" (none)\n" \ - " crl_file=%%s The single CRL file you want to use\n" \ - " default: \"\" (none)\n" \ - " ca_path=%%s The path containing the top-level CA(s) you fully trust\n" \ - " default: \"\" (none) (overrides ca_file)\n" - -#define USAGE \ - "\n usage: cert_app param=<>...\n" \ - "\n acceptable parameters:\n" \ - " mode=file|ssl default: none\n" \ - " filename=%%s default: cert.crt\n" \ - USAGE_IO \ - " server_name=%%s default: localhost\n" \ - " server_port=%%d default: 4433\n" \ - " debug_level=%%d default: 0 (disabled)\n" \ - " permissive=%%d default: 0 (disabled)\n" \ - "\n" - -/* - * global options - */ -struct options -{ - int mode; /* the mode to run the application in */ - const char *filename; /* filename of the certificate file */ - const char *ca_file; /* the file with the CA certificate(s) */ - const char *crl_file; /* the file with the CRL to use */ - const char *ca_path; /* the path with the CA certificate(s) reside */ - const char *server_name; /* hostname of the server (client only) */ - const char *server_port; /* port on which the ssl service runs */ - int debug_level; /* level of debugging */ - int permissive; /* permissive parsing */ -} opt; - -static void my_debug( void *ctx, int level, - const char *file, int line, - const char *str ) -{ - ((void) level); - - mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str ); - fflush( (FILE *) ctx ); -} - -static int my_verify( void *data, mbedtls_x509_crt *crt, int depth, uint32_t *flags ) -{ - char buf[1024]; - ((void) data); - - mbedtls_printf( "\nVerify requested for (Depth %d):\n", depth ); - mbedtls_x509_crt_info( buf, sizeof( buf ) - 1, "", crt ); - mbedtls_printf( "%s", buf ); - - if ( ( *flags ) == 0 ) - mbedtls_printf( " This certificate has no flags\n" ); - else - { - mbedtls_x509_crt_verify_info( buf, sizeof( buf ), " ! ", *flags ); - mbedtls_printf( "%s\n", buf ); - } - - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0; - mbedtls_net_context server_fd; - unsigned char buf[1024]; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - mbedtls_x509_crl cacrl; - mbedtls_pk_context pkey; - int i, j; - uint32_t flags; - int verify = 0; - char *p, *q; - const char *pers = "cert_app"; - - /* - * Set to sane values - */ - mbedtls_net_init( &server_fd ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_x509_crt_init( &cacert ); - mbedtls_x509_crt_init( &clicert ); -#if defined(MBEDTLS_X509_CRL_PARSE_C) - mbedtls_x509_crl_init( &cacrl ); -#else - /* Zeroize structure as CRL parsing is not supported and we have to pass - it to the verify function */ - memset( &cacrl, 0, sizeof(mbedtls_x509_crl) ); -#endif - mbedtls_pk_init( &pkey ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - ret = 2; - goto exit; - } - - opt.mode = DFL_MODE; - opt.filename = DFL_FILENAME; - opt.ca_file = DFL_CA_FILE; - opt.crl_file = DFL_CRL_FILE; - opt.ca_path = DFL_CA_PATH; - opt.server_name = DFL_SERVER_NAME; - opt.server_port = DFL_SERVER_PORT; - opt.debug_level = DFL_DEBUG_LEVEL; - opt.permissive = DFL_PERMISSIVE; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - for( j = 0; p + j < q; j++ ) - { - if( argv[i][j] >= 'A' && argv[i][j] <= 'Z' ) - argv[i][j] |= 0x20; - } - - if( strcmp( p, "mode" ) == 0 ) - { - if( strcmp( q, "file" ) == 0 ) - opt.mode = MODE_FILE; - else if( strcmp( q, "ssl" ) == 0 ) - opt.mode = MODE_SSL; - else - goto usage; - } - else if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else if( strcmp( p, "ca_file" ) == 0 ) - opt.ca_file = q; - else if( strcmp( p, "crl_file" ) == 0 ) - opt.crl_file = q; - else if( strcmp( p, "ca_path" ) == 0 ) - opt.ca_path = q; - else if( strcmp( p, "server_name" ) == 0 ) - opt.server_name = q; - else if( strcmp( p, "server_port" ) == 0 ) - opt.server_port = q; - else if( strcmp( p, "debug_level" ) == 0 ) - { - opt.debug_level = atoi( q ); - if( opt.debug_level < 0 || opt.debug_level > 65535 ) - goto usage; - } - else if( strcmp( p, "permissive" ) == 0 ) - { - opt.permissive = atoi( q ); - if( opt.permissive < 0 || opt.permissive > 1 ) - goto usage; - } - else - goto usage; - } - - /* - * 1.1. Load the trusted CA - */ - mbedtls_printf( " . Loading the CA root certificate ..." ); - fflush( stdout ); - - if( strlen( opt.ca_path ) ) - { - ret = mbedtls_x509_crt_parse_path( &cacert, opt.ca_path ); - verify = 1; - } - else if( strlen( opt.ca_file ) ) - { - ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file ); - verify = 1; - } - - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret ); - goto exit; - } - - mbedtls_printf( " ok (%d skipped)\n", ret ); - -#if defined(MBEDTLS_X509_CRL_PARSE_C) - if( strlen( opt.crl_file ) ) - { - if( ( ret = mbedtls_x509_crl_parse_file( &cacrl, opt.crl_file ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crl_parse returned -0x%x\n\n", -ret ); - goto exit; - } - - verify = 1; - } -#endif - - if( opt.mode == MODE_FILE ) - { - mbedtls_x509_crt crt; - mbedtls_x509_crt *cur = &crt; - mbedtls_x509_crt_init( &crt ); - - /* - * 1.1. Load the certificate(s) - */ - mbedtls_printf( "\n . Loading the certificate(s) ..." ); - fflush( stdout ); - - ret = mbedtls_x509_crt_parse_file( &crt, opt.filename ); - - if( ret < 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse_file returned %d\n\n", ret ); - mbedtls_x509_crt_free( &crt ); - goto exit; - } - - if( opt.permissive == 0 && ret > 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse failed to parse %d certificates\n\n", ret ); - mbedtls_x509_crt_free( &crt ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2 Print the certificate(s) - */ - while( cur != NULL ) - { - mbedtls_printf( " . Peer certificate information ...\n" ); - ret = mbedtls_x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", - cur ); - if( ret == -1 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_info returned %d\n\n", ret ); - mbedtls_x509_crt_free( &crt ); - goto exit; - } - - mbedtls_printf( "%s\n", buf ); - - cur = cur->next; - } - - ret = 0; - - /* - * 1.3 Verify the certificate - */ - if( verify ) - { - mbedtls_printf( " . Verifying X.509 certificate..." ); - - if( ( ret = mbedtls_x509_crt_verify( &crt, &cacert, &cacrl, NULL, &flags, - my_verify, NULL ) ) != 0 ) - { - char vrfy_buf[512]; - - mbedtls_printf( " failed\n" ); - - mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags ); - - mbedtls_printf( "%s\n", vrfy_buf ); - } - else - mbedtls_printf( " ok\n" ); - } - - mbedtls_x509_crt_free( &crt ); - } - else if( opt.mode == MODE_SSL ) - { - /* - * 1. Initialize the RNG and the session data - */ - mbedtls_printf( "\n . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret ); - goto ssl_exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 2. Start the connection - */ - mbedtls_printf( " . SSL connection to tcp/%s/%s...", opt.server_name, - opt.server_port ); - fflush( stdout ); - - if( ( ret = mbedtls_net_connect( &server_fd, opt.server_name, - opt.server_port, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret ); - goto ssl_exit; - } - - /* - * 3. Setup stuff - */ - if( ( ret = mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_STREAM, - MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret ); - goto exit; - } - - if( verify ) - { - mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_REQUIRED ); - mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL ); - mbedtls_ssl_conf_verify( &conf, my_verify, NULL ); - } - else - mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_NONE ); - - mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg ); - mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); - - if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &clicert, &pkey ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret ); - goto ssl_exit; - } - - if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret ); - goto ssl_exit; - } - - if( ( ret = mbedtls_ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret ); - goto ssl_exit; - } - - mbedtls_ssl_set_bio( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL ); - - /* - * 4. Handshake - */ - while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 ) - { - if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) - { - mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned %d\n\n", ret ); - goto ssl_exit; - } - } - - mbedtls_printf( " ok\n" ); - - /* - * 5. Print the certificate - */ - mbedtls_printf( " . Peer certificate information ...\n" ); - ret = mbedtls_x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", - ssl.session->peer_cert ); - if( ret == -1 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crt_info returned %d\n\n", ret ); - goto ssl_exit; - } - - mbedtls_printf( "%s\n", buf ); - - mbedtls_ssl_close_notify( &ssl ); - -ssl_exit: - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); - } - else - goto usage; - -exit: - - mbedtls_net_free( &server_fd ); - mbedtls_x509_crt_free( &cacert ); - mbedtls_x509_crt_free( &clicert ); -#if defined(MBEDTLS_X509_CRL_PARSE_C) - mbedtls_x509_crl_free( &cacrl ); -#endif - mbedtls_pk_free( &pkey ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - if( ret < 0 ) - ret = 1; - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C && - MBEDTLS_SSL_CLI_C && MBEDTLS_NET_C && MBEDTLS_RSA_C && - MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_FS_IO && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/x509/cert_req.c b/build/premake/premake5/contrib/mbedtls/programs/x509/cert_req.c deleted file mode 100644 index 5cafb80cd6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/x509/cert_req.c +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Certificate request generation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_X509_CSR_WRITE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_PK_PARSE_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) -int main( void ) -{ - mbedtls_printf( "MBEDTLS_X509_CSR_WRITE_C and/or MBEDTLS_FS_IO and/or " - "MBEDTLS_PK_PARSE_C and/or MBEDTLS_SHA256_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C " - "not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/x509_csr.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/error.h" - -#include -#include -#include - -#define DFL_FILENAME "keyfile.key" -#define DFL_DEBUG_LEVEL 0 -#define DFL_OUTPUT_FILENAME "cert.req" -#define DFL_SUBJECT_NAME "CN=Cert,O=mbed TLS,C=UK" -#define DFL_KEY_USAGE 0 -#define DFL_NS_CERT_TYPE 0 - -#define USAGE \ - "\n usage: cert_req param=<>...\n" \ - "\n acceptable parameters:\n" \ - " filename=%%s default: keyfile.key\n" \ - " debug_level=%%d default: 0 (disabled)\n" \ - " output_file=%%s default: cert.req\n" \ - " subject_name=%%s default: CN=Cert,O=mbed TLS,C=UK\n" \ - " key_usage=%%s default: (empty)\n" \ - " Comma-separated-list of values:\n" \ - " digital_signature\n" \ - " non_repudiation\n" \ - " key_encipherment\n" \ - " data_encipherment\n" \ - " key_agreement\n" \ - " key_cert_sign\n" \ - " crl_sign\n" \ - " ns_cert_type=%%s default: (empty)\n" \ - " Comma-separated-list of values:\n" \ - " ssl_client\n" \ - " ssl_server\n" \ - " email\n" \ - " object_signing\n" \ - " ssl_ca\n" \ - " email_ca\n" \ - " object_signing_ca\n" \ - "\n" - -/* - * global options - */ -struct options -{ - const char *filename; /* filename of the key file */ - int debug_level; /* level of debugging */ - const char *output_file; /* where to store the constructed key file */ - const char *subject_name; /* subject name for certificate request */ - unsigned char key_usage; /* key usage flags */ - unsigned char ns_cert_type; /* NS cert type */ -} opt; - -int write_certificate_request( mbedtls_x509write_csr *req, const char *output_file, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - FILE *f; - unsigned char output_buf[4096]; - size_t len = 0; - - memset( output_buf, 0, 4096 ); - if( ( ret = mbedtls_x509write_csr_pem( req, output_buf, 4096, f_rng, p_rng ) ) < 0 ) - return( ret ); - - len = strlen( (char *) output_buf ); - - if( ( f = fopen( output_file, "w" ) ) == NULL ) - return( -1 ); - - if( fwrite( output_buf, 1, len, f ) != len ) - { - fclose( f ); - return( -1 ); - } - - fclose( f ); - - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0; - mbedtls_pk_context key; - char buf[1024]; - int i; - char *p, *q, *r; - mbedtls_x509write_csr req; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - const char *pers = "csr example app"; - - /* - * Set to sane values - */ - mbedtls_x509write_csr_init( &req ); - mbedtls_x509write_csr_set_md_alg( &req, MBEDTLS_MD_SHA256 ); - mbedtls_pk_init( &key ); - mbedtls_ctr_drbg_init( &ctr_drbg ); - memset( buf, 0, sizeof( buf ) ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - ret = 1; - goto exit; - } - - opt.filename = DFL_FILENAME; - opt.debug_level = DFL_DEBUG_LEVEL; - opt.output_file = DFL_OUTPUT_FILENAME; - opt.subject_name = DFL_SUBJECT_NAME; - opt.key_usage = DFL_KEY_USAGE; - opt.ns_cert_type = DFL_NS_CERT_TYPE; - - for( i = 1; i < argc; i++ ) - { - - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else if( strcmp( p, "output_file" ) == 0 ) - opt.output_file = q; - else if( strcmp( p, "debug_level" ) == 0 ) - { - opt.debug_level = atoi( q ); - if( opt.debug_level < 0 || opt.debug_level > 65535 ) - goto usage; - } - else if( strcmp( p, "subject_name" ) == 0 ) - { - opt.subject_name = q; - } - else if( strcmp( p, "key_usage" ) == 0 ) - { - while( q != NULL ) - { - if( ( r = strchr( q, ',' ) ) != NULL ) - *r++ = '\0'; - - if( strcmp( q, "digital_signature" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_DIGITAL_SIGNATURE; - else if( strcmp( q, "non_repudiation" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_NON_REPUDIATION; - else if( strcmp( q, "key_encipherment" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_KEY_ENCIPHERMENT; - else if( strcmp( q, "data_encipherment" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_DATA_ENCIPHERMENT; - else if( strcmp( q, "key_agreement" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_KEY_AGREEMENT; - else if( strcmp( q, "key_cert_sign" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_KEY_CERT_SIGN; - else if( strcmp( q, "crl_sign" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_CRL_SIGN; - else - goto usage; - - q = r; - } - } - else if( strcmp( p, "ns_cert_type" ) == 0 ) - { - while( q != NULL ) - { - if( ( r = strchr( q, ',' ) ) != NULL ) - *r++ = '\0'; - - if( strcmp( q, "ssl_client" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT; - else if( strcmp( q, "ssl_server" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER; - else if( strcmp( q, "email" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_EMAIL; - else if( strcmp( q, "object_signing" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING; - else if( strcmp( q, "ssl_ca" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_SSL_CA; - else if( strcmp( q, "email_ca" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_EMAIL_CA; - else if( strcmp( q, "object_signing_ca" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA; - else - goto usage; - - q = r; - } - } - else - goto usage; - } - - if( opt.key_usage ) - mbedtls_x509write_csr_set_key_usage( &req, opt.key_usage ); - - if( opt.ns_cert_type ) - mbedtls_x509write_csr_set_ns_cert_type( &req, opt.ns_cert_type ); - - /* - * 0. Seed the PRNG - */ - mbedtls_printf( " . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.0. Check the subject name for validity - */ - mbedtls_printf( " . Checking subject name..." ); - fflush( stdout ); - - if( ( ret = mbedtls_x509write_csr_set_subject_name( &req, opt.subject_name ) ) != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509write_csr_set_subject_name returned %d", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.1. Load the key - */ - mbedtls_printf( " . Loading the private key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_keyfile( &key, opt.filename, NULL ); - - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned %d", ret ); - goto exit; - } - - mbedtls_x509write_csr_set_key( &req, &key ); - - mbedtls_printf( " ok\n" ); - - /* - * 1.2. Writing the request - */ - mbedtls_printf( " . Writing the certificate request ..." ); - fflush( stdout ); - - if( ( ret = write_certificate_request( &req, opt.output_file, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_printf( " failed\n ! write_certifcate_request %d", ret ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -exit: - - if( ret != 0 && ret != 1) - { -#ifdef MBEDTLS_ERROR_C - mbedtls_strerror( ret, buf, sizeof( buf ) ); - mbedtls_printf( " - %s\n", buf ); -#else - mbedtls_printf("\n"); -#endif - } - - mbedtls_x509write_csr_free( &req ); - mbedtls_pk_free( &key ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_X509_CSR_WRITE_C && MBEDTLS_PK_PARSE_C && MBEDTLS_FS_IO && - MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/x509/cert_write.c b/build/premake/premake5/contrib/mbedtls/programs/x509/cert_write.c deleted file mode 100644 index 7907d8221f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/x509/cert_write.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Certificate generation and signing - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_X509_CRT_WRITE_C) || \ - !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_FS_IO) || \ - !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_CTR_DRBG_C) || \ - !defined(MBEDTLS_ERROR_C) || !defined(MBEDTLS_SHA256_C) -int main( void ) -{ - mbedtls_printf( "MBEDTLS_X509_CRT_WRITE_C and/or MBEDTLS_X509_CRT_PARSE_C and/or " - "MBEDTLS_FS_IO and/or MBEDTLS_SHA256_C and/or " - "MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C and/or " - "MBEDTLS_ERROR_C not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/x509_crt.h" -#include "mbedtls/x509_csr.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/error.h" - -#include -#include -#include - -#if defined(MBEDTLS_X509_CSR_PARSE_C) -#define USAGE_CSR \ - " request_file=%%s default: (empty)\n" \ - " If request_file is specified, subject_key,\n" \ - " subject_pwd and subject_name are ignored!\n" -#else -#define USAGE_CSR "" -#endif /* MBEDTLS_X509_CSR_PARSE_C */ - -#define DFL_ISSUER_CRT "" -#define DFL_REQUEST_FILE "" -#define DFL_SUBJECT_KEY "subject.key" -#define DFL_ISSUER_KEY "ca.key" -#define DFL_SUBJECT_PWD "" -#define DFL_ISSUER_PWD "" -#define DFL_OUTPUT_FILENAME "cert.crt" -#define DFL_SUBJECT_NAME "CN=Cert,O=mbed TLS,C=UK" -#define DFL_ISSUER_NAME "CN=CA,O=mbed TLS,C=UK" -#define DFL_NOT_BEFORE "20010101000000" -#define DFL_NOT_AFTER "20301231235959" -#define DFL_SERIAL "1" -#define DFL_SELFSIGN 0 -#define DFL_IS_CA 0 -#define DFL_MAX_PATHLEN -1 -#define DFL_KEY_USAGE 0 -#define DFL_NS_CERT_TYPE 0 - -#define USAGE \ - "\n usage: cert_write param=<>...\n" \ - "\n acceptable parameters:\n" \ - USAGE_CSR \ - " subject_key=%%s default: subject.key\n" \ - " subject_pwd=%%s default: (empty)\n" \ - " subject_name=%%s default: CN=Cert,O=mbed TLS,C=UK\n" \ - "\n" \ - " issuer_crt=%%s default: (empty)\n" \ - " If issuer_crt is specified, issuer_name is\n" \ - " ignored!\n" \ - " issuer_name=%%s default: CN=CA,O=mbed TLS,C=UK\n" \ - "\n" \ - " selfsign=%%d default: 0 (false)\n" \ - " If selfsign is enabled, issuer_name and\n" \ - " issuer_key are required (issuer_crt and\n" \ - " subject_* are ignored\n" \ - " issuer_key=%%s default: ca.key\n" \ - " issuer_pwd=%%s default: (empty)\n" \ - " output_file=%%s default: cert.crt\n" \ - " serial=%%s default: 1\n" \ - " not_before=%%s default: 20010101000000\n"\ - " not_after=%%s default: 20301231235959\n"\ - " is_ca=%%d default: 0 (disabled)\n" \ - " max_pathlen=%%d default: -1 (none)\n" \ - " key_usage=%%s default: (empty)\n" \ - " Comma-separated-list of values:\n" \ - " digital_signature\n" \ - " non_repudiation\n" \ - " key_encipherment\n" \ - " data_encipherment\n" \ - " key_agreement\n" \ - " key_cert_sign\n" \ - " crl_sign\n" \ - " ns_cert_type=%%s default: (empty)\n" \ - " Comma-separated-list of values:\n" \ - " ssl_client\n" \ - " ssl_server\n" \ - " email\n" \ - " object_signing\n" \ - " ssl_ca\n" \ - " email_ca\n" \ - " object_signing_ca\n" \ - "\n" - -/* - * global options - */ -struct options -{ - const char *issuer_crt; /* filename of the issuer certificate */ - const char *request_file; /* filename of the certificate request */ - const char *subject_key; /* filename of the subject key file */ - const char *issuer_key; /* filename of the issuer key file */ - const char *subject_pwd; /* password for the subject key file */ - const char *issuer_pwd; /* password for the issuer key file */ - const char *output_file; /* where to store the constructed key file */ - const char *subject_name; /* subject name for certificate */ - const char *issuer_name; /* issuer name for certificate */ - const char *not_before; /* validity period not before */ - const char *not_after; /* validity period not after */ - const char *serial; /* serial number string */ - int selfsign; /* selfsign the certificate */ - int is_ca; /* is a CA certificate */ - int max_pathlen; /* maximum CA path length */ - unsigned char key_usage; /* key usage flags */ - unsigned char ns_cert_type; /* NS cert type */ -} opt; - -int write_certificate( mbedtls_x509write_cert *crt, const char *output_file, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - FILE *f; - unsigned char output_buf[4096]; - size_t len = 0; - - memset( output_buf, 0, 4096 ); - if( ( ret = mbedtls_x509write_crt_pem( crt, output_buf, 4096, f_rng, p_rng ) ) < 0 ) - return( ret ); - - len = strlen( (char *) output_buf ); - - if( ( f = fopen( output_file, "w" ) ) == NULL ) - return( -1 ); - - if( fwrite( output_buf, 1, len, f ) != len ) - { - fclose( f ); - return( -1 ); - } - - fclose( f ); - - return( 0 ); -} - -int main( int argc, char *argv[] ) -{ - int ret = 0; - mbedtls_x509_crt issuer_crt; - mbedtls_pk_context loaded_issuer_key, loaded_subject_key; - mbedtls_pk_context *issuer_key = &loaded_issuer_key, - *subject_key = &loaded_subject_key; - char buf[1024]; - char issuer_name[256]; - int i; - char *p, *q, *r; -#if defined(MBEDTLS_X509_CSR_PARSE_C) - char subject_name[256]; - mbedtls_x509_csr csr; -#endif - mbedtls_x509write_cert crt; - mbedtls_mpi serial; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - const char *pers = "crt example app"; - - /* - * Set to sane values - */ - mbedtls_x509write_crt_init( &crt ); - mbedtls_x509write_crt_set_md_alg( &crt, MBEDTLS_MD_SHA256 ); - mbedtls_pk_init( &loaded_issuer_key ); - mbedtls_pk_init( &loaded_subject_key ); - mbedtls_mpi_init( &serial ); - mbedtls_ctr_drbg_init( &ctr_drbg ); -#if defined(MBEDTLS_X509_CSR_PARSE_C) - mbedtls_x509_csr_init( &csr ); -#endif - mbedtls_x509_crt_init( &issuer_crt ); - memset( buf, 0, 1024 ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - ret = 1; - goto exit; - } - - opt.issuer_crt = DFL_ISSUER_CRT; - opt.request_file = DFL_REQUEST_FILE; - opt.subject_key = DFL_SUBJECT_KEY; - opt.issuer_key = DFL_ISSUER_KEY; - opt.subject_pwd = DFL_SUBJECT_PWD; - opt.issuer_pwd = DFL_ISSUER_PWD; - opt.output_file = DFL_OUTPUT_FILENAME; - opt.subject_name = DFL_SUBJECT_NAME; - opt.issuer_name = DFL_ISSUER_NAME; - opt.not_before = DFL_NOT_BEFORE; - opt.not_after = DFL_NOT_AFTER; - opt.serial = DFL_SERIAL; - opt.selfsign = DFL_SELFSIGN; - opt.is_ca = DFL_IS_CA; - opt.max_pathlen = DFL_MAX_PATHLEN; - opt.key_usage = DFL_KEY_USAGE; - opt.ns_cert_type = DFL_NS_CERT_TYPE; - - for( i = 1; i < argc; i++ ) - { - - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "request_file" ) == 0 ) - opt.request_file = q; - else if( strcmp( p, "subject_key" ) == 0 ) - opt.subject_key = q; - else if( strcmp( p, "issuer_key" ) == 0 ) - opt.issuer_key = q; - else if( strcmp( p, "subject_pwd" ) == 0 ) - opt.subject_pwd = q; - else if( strcmp( p, "issuer_pwd" ) == 0 ) - opt.issuer_pwd = q; - else if( strcmp( p, "issuer_crt" ) == 0 ) - opt.issuer_crt = q; - else if( strcmp( p, "output_file" ) == 0 ) - opt.output_file = q; - else if( strcmp( p, "subject_name" ) == 0 ) - { - opt.subject_name = q; - } - else if( strcmp( p, "issuer_name" ) == 0 ) - { - opt.issuer_name = q; - } - else if( strcmp( p, "not_before" ) == 0 ) - { - opt.not_before = q; - } - else if( strcmp( p, "not_after" ) == 0 ) - { - opt.not_after = q; - } - else if( strcmp( p, "serial" ) == 0 ) - { - opt.serial = q; - } - else if( strcmp( p, "selfsign" ) == 0 ) - { - opt.selfsign = atoi( q ); - if( opt.selfsign < 0 || opt.selfsign > 1 ) - goto usage; - } - else if( strcmp( p, "is_ca" ) == 0 ) - { - opt.is_ca = atoi( q ); - if( opt.is_ca < 0 || opt.is_ca > 1 ) - goto usage; - } - else if( strcmp( p, "max_pathlen" ) == 0 ) - { - opt.max_pathlen = atoi( q ); - if( opt.max_pathlen < -1 || opt.max_pathlen > 127 ) - goto usage; - } - else if( strcmp( p, "key_usage" ) == 0 ) - { - while( q != NULL ) - { - if( ( r = strchr( q, ',' ) ) != NULL ) - *r++ = '\0'; - - if( strcmp( q, "digital_signature" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_DIGITAL_SIGNATURE; - else if( strcmp( q, "non_repudiation" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_NON_REPUDIATION; - else if( strcmp( q, "key_encipherment" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_KEY_ENCIPHERMENT; - else if( strcmp( q, "data_encipherment" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_DATA_ENCIPHERMENT; - else if( strcmp( q, "key_agreement" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_KEY_AGREEMENT; - else if( strcmp( q, "key_cert_sign" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_KEY_CERT_SIGN; - else if( strcmp( q, "crl_sign" ) == 0 ) - opt.key_usage |= MBEDTLS_X509_KU_CRL_SIGN; - else - goto usage; - - q = r; - } - } - else if( strcmp( p, "ns_cert_type" ) == 0 ) - { - while( q != NULL ) - { - if( ( r = strchr( q, ',' ) ) != NULL ) - *r++ = '\0'; - - if( strcmp( q, "ssl_client" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT; - else if( strcmp( q, "ssl_server" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER; - else if( strcmp( q, "email" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_EMAIL; - else if( strcmp( q, "object_signing" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING; - else if( strcmp( q, "ssl_ca" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_SSL_CA; - else if( strcmp( q, "email_ca" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_EMAIL_CA; - else if( strcmp( q, "object_signing_ca" ) == 0 ) - opt.ns_cert_type |= MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA; - else - goto usage; - - q = r; - } - } - else - goto usage; - } - - mbedtls_printf("\n"); - - /* - * 0. Seed the PRNG - */ - mbedtls_printf( " . Seeding the random number generator..." ); - fflush( stdout ); - - mbedtls_entropy_init( &entropy ); - if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, - strlen( pers ) ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d - %s\n", ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - // Parse serial to MPI - // - mbedtls_printf( " . Reading serial number..." ); - fflush( stdout ); - - if( ( ret = mbedtls_mpi_read_string( &serial, 10, opt.serial ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_mpi_read_string returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - // Parse issuer certificate if present - // - if( !opt.selfsign && strlen( opt.issuer_crt ) ) - { - /* - * 1.0.a. Load the certificates - */ - mbedtls_printf( " . Loading the issuer certificate ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_x509_crt_parse_file( &issuer_crt, opt.issuer_crt ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse_file returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - ret = mbedtls_x509_dn_gets( issuer_name, sizeof(issuer_name), - &issuer_crt.subject ); - if( ret < 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509_dn_gets returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - opt.issuer_name = issuer_name; - - mbedtls_printf( " ok\n" ); - } - -#if defined(MBEDTLS_X509_CSR_PARSE_C) - // Parse certificate request if present - // - if( !opt.selfsign && strlen( opt.request_file ) ) - { - /* - * 1.0.b. Load the CSR - */ - mbedtls_printf( " . Loading the certificate request ..." ); - fflush( stdout ); - - if( ( ret = mbedtls_x509_csr_parse_file( &csr, opt.request_file ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509_csr_parse_file returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - ret = mbedtls_x509_dn_gets( subject_name, sizeof(subject_name), - &csr.subject ); - if( ret < 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509_dn_gets returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - opt.subject_name = subject_name; - subject_key = &csr.pk; - - mbedtls_printf( " ok\n" ); - } -#endif /* MBEDTLS_X509_CSR_PARSE_C */ - - /* - * 1.1. Load the keys - */ - if( !opt.selfsign && !strlen( opt.request_file ) ) - { - mbedtls_printf( " . Loading the subject key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_keyfile( &loaded_subject_key, opt.subject_key, - opt.subject_pwd ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - } - - mbedtls_printf( " . Loading the issuer key ..." ); - fflush( stdout ); - - ret = mbedtls_pk_parse_keyfile( &loaded_issuer_key, opt.issuer_key, - opt.issuer_pwd ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_pk_parse_keyfile returned -x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - // Check if key and issuer certificate match - // - if( strlen( opt.issuer_crt ) ) - { - if( !mbedtls_pk_can_do( &issuer_crt.pk, MBEDTLS_PK_RSA ) || - mbedtls_mpi_cmp_mpi( &mbedtls_pk_rsa( issuer_crt.pk )->N, - &mbedtls_pk_rsa( *issuer_key )->N ) != 0 || - mbedtls_mpi_cmp_mpi( &mbedtls_pk_rsa( issuer_crt.pk )->E, - &mbedtls_pk_rsa( *issuer_key )->E ) != 0 ) - { - mbedtls_printf( " failed\n ! issuer_key does not match issuer certificate\n\n" ); - ret = -1; - goto exit; - } - } - - mbedtls_printf( " ok\n" ); - - if( opt.selfsign ) - { - opt.subject_name = opt.issuer_name; - subject_key = issuer_key; - } - - mbedtls_x509write_crt_set_subject_key( &crt, subject_key ); - mbedtls_x509write_crt_set_issuer_key( &crt, issuer_key ); - - /* - * 1.0. Check the names for validity - */ - if( ( ret = mbedtls_x509write_crt_set_subject_name( &crt, opt.subject_name ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_subject_name returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - if( ( ret = mbedtls_x509write_crt_set_issuer_name( &crt, opt.issuer_name ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_issuer_name returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " . Setting certificate values ..." ); - fflush( stdout ); - - ret = mbedtls_x509write_crt_set_serial( &crt, &serial ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_serial returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - ret = mbedtls_x509write_crt_set_validity( &crt, opt.not_before, opt.not_after ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_validity returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - mbedtls_printf( " . Adding the Basic Constraints extension ..." ); - fflush( stdout ); - - ret = mbedtls_x509write_crt_set_basic_constraints( &crt, opt.is_ca, - opt.max_pathlen ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! x509write_crt_set_basic_contraints returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -#if defined(MBEDTLS_SHA1_C) - mbedtls_printf( " . Adding the Subject Key Identifier ..." ); - fflush( stdout ); - - ret = mbedtls_x509write_crt_set_subject_key_identifier( &crt ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_subject_key_identifier returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - mbedtls_printf( " . Adding the Authority Key Identifier ..." ); - fflush( stdout ); - - ret = mbedtls_x509write_crt_set_authority_key_identifier( &crt ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_authority_key_identifier returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); -#endif /* MBEDTLS_SHA1_C */ - - if( opt.key_usage ) - { - mbedtls_printf( " . Adding the Key Usage extension ..." ); - fflush( stdout ); - - ret = mbedtls_x509write_crt_set_key_usage( &crt, opt.key_usage ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_key_usage returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - } - - if( opt.ns_cert_type ) - { - mbedtls_printf( " . Adding the NS Cert Type extension ..." ); - fflush( stdout ); - - ret = mbedtls_x509write_crt_set_ns_cert_type( &crt, opt.ns_cert_type ); - if( ret != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! mbedtls_x509write_crt_set_ns_cert_type returned -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - } - - /* - * 1.2. Writing the request - */ - mbedtls_printf( " . Writing the certificate..." ); - fflush( stdout ); - - if( ( ret = write_certificate( &crt, opt.output_file, - mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) - { - mbedtls_strerror( ret, buf, 1024 ); - mbedtls_printf( " failed\n ! write_certifcate -0x%02x - %s\n\n", -ret, buf ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - -exit: - mbedtls_x509write_crt_free( &crt ); - mbedtls_pk_free( &loaded_subject_key ); - mbedtls_pk_free( &loaded_issuer_key ); - mbedtls_mpi_free( &serial ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_X509_CRT_WRITE_C && MBEDTLS_X509_CRT_PARSE_C && - MBEDTLS_FS_IO && MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C && - MBEDTLS_ERROR_C */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/x509/crl_app.c b/build/premake/premake5/contrib/mbedtls/programs/x509/crl_app.c deleted file mode 100644 index 210d19e96a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/x509/crl_app.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * CRL reading application - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_X509_CRL_PARSE_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_X509_CRL_PARSE_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/x509_crl.h" - -#include -#include -#include - -#define DFL_FILENAME "crl.pem" -#define DFL_DEBUG_LEVEL 0 - -#define USAGE \ - "\n usage: crl_app param=<>...\n" \ - "\n acceptable parameters:\n" \ - " filename=%%s default: crl.pem\n" \ - "\n" - -/* - * global options - */ -struct options -{ - const char *filename; /* filename of the certificate file */ -} opt; - -int main( int argc, char *argv[] ) -{ - int ret = 0; - unsigned char buf[100000]; - mbedtls_x509_crl crl; - int i; - char *p, *q; - - /* - * Set to sane values - */ - mbedtls_x509_crl_init( &crl ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - goto exit; - } - - opt.filename = DFL_FILENAME; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else - goto usage; - } - - /* - * 1.1. Load the CRL - */ - mbedtls_printf( "\n . Loading the CRL ..." ); - fflush( stdout ); - - ret = mbedtls_x509_crl_parse_file( &crl, opt.filename ); - - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crl_parse_file returned %d\n\n", ret ); - mbedtls_x509_crl_free( &crl ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2 Print the CRL - */ - mbedtls_printf( " . CRL information ...\n" ); - ret = mbedtls_x509_crl_info( (char *) buf, sizeof( buf ) - 1, " ", &crl ); - if( ret == -1 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_crl_info returned %d\n\n", ret ); - mbedtls_x509_crl_free( &crl ); - goto exit; - } - - mbedtls_printf( "%s\n", buf ); - -exit: - mbedtls_x509_crl_free( &crl ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_X509_CRL_PARSE_C && - MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/programs/x509/req_app.c b/build/premake/premake5/contrib/mbedtls/programs/x509/req_app.c deleted file mode 100644 index 8410a5371e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/programs/x509/req_app.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Certificate request reading application - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ - !defined(MBEDTLS_X509_CSR_PARSE_C) || !defined(MBEDTLS_FS_IO) -int main( void ) -{ - mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or " - "MBEDTLS_X509_CSR_PARSE_C and/or MBEDTLS_FS_IO not defined.\n"); - return( 0 ); -} -#else - -#include "mbedtls/x509_csr.h" - -#include -#include -#include - -#define DFL_FILENAME "cert.req" -#define DFL_DEBUG_LEVEL 0 - -#define USAGE \ - "\n usage: req_app param=<>...\n" \ - "\n acceptable parameters:\n" \ - " filename=%%s default: cert.req\n" \ - "\n" - -/* - * global options - */ -struct options -{ - const char *filename; /* filename of the certificate request */ -} opt; - -int main( int argc, char *argv[] ) -{ - int ret = 0; - unsigned char buf[100000]; - mbedtls_x509_csr csr; - int i; - char *p, *q; - - /* - * Set to sane values - */ - mbedtls_x509_csr_init( &csr ); - - if( argc == 0 ) - { - usage: - mbedtls_printf( USAGE ); - goto exit; - } - - opt.filename = DFL_FILENAME; - - for( i = 1; i < argc; i++ ) - { - p = argv[i]; - if( ( q = strchr( p, '=' ) ) == NULL ) - goto usage; - *q++ = '\0'; - - if( strcmp( p, "filename" ) == 0 ) - opt.filename = q; - else - goto usage; - } - - /* - * 1.1. Load the CSR - */ - mbedtls_printf( "\n . Loading the CSR ..." ); - fflush( stdout ); - - ret = mbedtls_x509_csr_parse_file( &csr, opt.filename ); - - if( ret != 0 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_csr_parse_file returned %d\n\n", ret ); - mbedtls_x509_csr_free( &csr ); - goto exit; - } - - mbedtls_printf( " ok\n" ); - - /* - * 1.2 Print the CSR - */ - mbedtls_printf( " . CSR information ...\n" ); - ret = mbedtls_x509_csr_info( (char *) buf, sizeof( buf ) - 1, " ", &csr ); - if( ret == -1 ) - { - mbedtls_printf( " failed\n ! mbedtls_x509_csr_info returned %d\n\n", ret ); - mbedtls_x509_csr_free( &csr ); - goto exit; - } - - mbedtls_printf( "%s\n", buf ); - -exit: - mbedtls_x509_csr_free( &csr ); - -#if defined(_WIN32) - mbedtls_printf( " + Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - - return( ret ); -} -#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_X509_CSR_PARSE_C && - MBEDTLS_FS_IO */ diff --git a/build/premake/premake5/contrib/mbedtls/scripts/bump_version.sh b/build/premake/premake5/contrib/mbedtls/scripts/bump_version.sh deleted file mode 100644 index 97d2f1f871..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/bump_version.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -VERSION="" -SOVERSION="" - -# Parse arguments -# -until [ -z "$1" ] -do - case "$1" in - --version) - # Version to use - shift - VERSION=$1 - ;; - --so-crypto) - shift - SO_CRYPTO=$1 - ;; - --so-x509) - shift - SO_X509=$1 - ;; - --so-tls) - shift - SO_TLS=$1 - ;; - -v|--verbose) - # Be verbose - VERBOSE="1" - ;; - -h|--help) - # print help - echo "Usage: $0" - echo -e " -h|--help\t\tPrint this help." - echo -e " --version \tVersion to bump to." - echo -e " --so-crypto \tSO version to bump libmbedcrypto to." - echo -e " --so-x509 \tSO version to bump libmbedx509 to." - echo -e " --so-tls \tSO version to bump libmbedtls to." - echo -e " -v|--verbose\t\tVerbose." - exit 1 - ;; - *) - # print error - echo "Unknown argument: '$1'" - exit 1 - ;; - esac - shift -done - -if [ "X" = "X$VERSION" ]; -then - echo "No version specified. Unable to continue." - exit 1 -fi - -[ $VERBOSE ] && echo "Bumping VERSION in library/CMakeLists.txt" -sed -e "s/ VERSION [0-9.]\{1,\}/ VERSION $VERSION/g" < library/CMakeLists.txt > tmp -mv tmp library/CMakeLists.txt - -if [ "X" != "X$SO_CRYPTO" ]; -then - [ $VERBOSE ] && echo "Bumping SOVERSION for libmbedcrypto in library/CMakeLists.txt" - sed -e "/mbedcrypto/ s/ SOVERSION [0-9]\{1,\}/ SOVERSION $SO_CRYPTO/g" < library/CMakeLists.txt > tmp - mv tmp library/CMakeLists.txt - - [ $VERBOSE ] && echo "Bumping SOVERSION for libmbedcrypto in library/Makefile" - sed -e "s/SOEXT_CRYPTO=so.[0-9]\{1,\}/SOEXT_CRYPTO=so.$SO_CRYPTO/g" < library/Makefile > tmp - mv tmp library/Makefile -fi - -if [ "X" != "X$SO_X509" ]; -then - [ $VERBOSE ] && echo "Bumping SOVERSION for libmbedx509 in library/CMakeLists.txt" - sed -e "/mbedx509/ s/ SOVERSION [0-9]\{1,\}/ SOVERSION $SO_X509/g" < library/CMakeLists.txt > tmp - mv tmp library/CMakeLists.txt - - [ $VERBOSE ] && echo "Bumping SOVERSION for libmbedx509 in library/Makefile" - sed -e "s/SOEXT_X509=so.[0-9]\{1,\}/SOEXT_X509=so.$SO_X509/g" < library/Makefile > tmp - mv tmp library/Makefile -fi - -if [ "X" != "X$SO_TLS" ]; -then - [ $VERBOSE ] && echo "Bumping SOVERSION for libmbedtls in library/CMakeLists.txt" - sed -e "/mbedtls/ s/ SOVERSION [0-9]\{1,\}/ SOVERSION $SO_TLS/g" < library/CMakeLists.txt > tmp - mv tmp library/CMakeLists.txt - - [ $VERBOSE ] && echo "Bumping SOVERSION for libmbedtls in library/Makefile" - sed -e "s/SOEXT_TLS=so.[0-9]\{1,\}/SOEXT_TLS=so.$SO_TLS/g" < library/Makefile > tmp - mv tmp library/Makefile -fi - -[ $VERBOSE ] && echo "Bumping VERSION in include/mbedtls/version.h" -read MAJOR MINOR PATCH <<<$(IFS="."; echo $VERSION) -VERSION_NR="$( printf "0x%02X%02X%02X00" $MAJOR $MINOR $PATCH )" -cat include/mbedtls/version.h | \ - sed -e "s/_VERSION_MAJOR .\{1,\}/_VERSION_MAJOR $MAJOR/" | \ - sed -e "s/_VERSION_MINOR .\{1,\}/_VERSION_MINOR $MINOR/" | \ - sed -e "s/_VERSION_PATCH .\{1,\}/_VERSION_PATCH $PATCH/" | \ - sed -e "s/_VERSION_NUMBER .\{1,\}/_VERSION_NUMBER $VERSION_NR/" | \ - sed -e "s/_VERSION_STRING .\{1,\}/_VERSION_STRING \"$VERSION\"/" | \ - sed -e "s/_VERSION_STRING_FULL .\{1,\}/_VERSION_STRING_FULL \"mbed TLS $VERSION\"/" \ - > tmp -mv tmp include/mbedtls/version.h - -[ $VERBOSE ] && echo "Bumping version in tests/suites/test_suite_version.data" -sed -e "s/version:\".\{1,\}/version:\"$VERSION\"/g" < tests/suites/test_suite_version.data > tmp -mv tmp tests/suites/test_suite_version.data - -[ $VERBOSE ] && echo "Bumping version in yotta/data/module.json" -sed -e "s/\"version\": \".\{1,\}\"/\"version\": \"$VERSION\"/g" < yotta/data/module.json > tmp -mv tmp yotta/data/module.json - -[ $VERBOSE ] && echo "Bumping PROJECT_NAME in doxygen/mbedtls.doxyfile and doxygen/input/doc_mainpage.h" -for i in doxygen/mbedtls.doxyfile doxygen/input/doc_mainpage.h; -do - sed -e "s/mbed TLS v[0-9\.]\{1,\}/mbed TLS v$VERSION/g" < $i > tmp - mv tmp $i -done - -[ $VERBOSE ] && echo "Re-generating library/error.c" -scripts/generate_errors.pl - -[ $VERBOSE ] && echo "Re-generating library/version_features.c" -scripts/generate_features.pl - -[ $VERBOSE ] && echo "Re-generating visualc files" -scripts/generate_visualc_files.pl diff --git a/build/premake/premake5/contrib/mbedtls/scripts/config.pl b/build/premake/premake5/contrib/mbedtls/scripts/config.pl deleted file mode 100644 index d4c32fd1b8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/config.pl +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/perl - -# Tune the configuration file - -use warnings; -use strict; - -my $usage = <] unset -$0 [-f ] set [] -EOU -# for our eyes only: -# $0 [-f ] full|realfull - -# Things that shouldn't be enabled with "full". -# Notes: -# - MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 and -# MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION could be enabled if the -# respective tests were adapted -my @excluded = qw( -MBEDTLS_DEPRECATED_REMOVED -MBEDTLS_HAVE_SSE2 -MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -MBEDTLS_ECP_DP_M221_ENABLED -MBEDTLS_ECP_DP_M383_ENABLED -MBEDTLS_ECP_DP_M511_ENABLED -MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -MBEDTLS_NO_PLATFORM_ENTROPY -MBEDTLS_REMOVE_ARC4_CIPHERSUITES -MBEDTLS_SSL_HW_RECORD_ACCEL -MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION -MBEDTLS_ZLIB_SUPPORT -MBEDTLS_PKCS11_C -_ALT\s*$ -); - -# Things that should be enabled in "full" even if they match @excluded -my @non_excluded = qw( -PLATFORM_[A-Z0-9]+_ALT -); - -my $config_file = "include/mbedtls/config.h"; - -# get -f option -if (@ARGV >= 2 && $ARGV[0] eq "-f") { - shift; # -f - $config_file = shift; - - -f $config_file or die "No such file: $config_file\n"; -} else { - if (! -f $config_file) { - chdir '..' or die; - -f $config_file - or die "Without -f, must be run from root or scripts\n" - } -} - -# get action -die $usage unless @ARGV; -my $action = shift; - -my ($name, $value); -if ($action eq "full" || $action eq "realfull") { - # nothing to do -} elsif ($action eq "unset") { - die $usage unless @ARGV; - $name = shift; -} elsif ($action eq "set") { - die $usage unless @ARGV; - $name = shift; - $value = shift if @ARGV; -} else { - die $usage; -} -die $usage if @ARGV; - -open my $config_read, '<', $config_file or die "read $config_file: $!\n"; -my @config_lines = <$config_read>; -close $config_read; - -my ($exclude_re, $no_exclude_re); -if ($action eq "realfull") { - $exclude_re = qr/^$/; - $no_exclude_re = qr/./; -} else { - $exclude_re = join '|', @excluded; - $no_exclude_re = join '|', @non_excluded; -} - -open my $config_write, '>', $config_file or die "write $config_file: $!\n"; - -my $done; -for my $line (@config_lines) { - if ($action eq "full" || $action eq "realfull") { - if ($line =~ /name SECTION: Module configuration options/) { - $done = 1; - } - - if (!$done && $line =~ m!^//\s?#define! && - ( $line !~ /$exclude_re/ || $line =~ /$no_exclude_re/ ) ) { - $line =~ s!^//\s?!!; - } - if (!$done && $line =~ m!^\s?#define! && - ! ( $line !~ /$exclude_re/ || $line =~ /$no_exclude_re/ ) ) { - $line =~ s!^!//!; - } - } elsif ($action eq "unset") { - if (!$done && $line =~ /^\s*#define\s*$name\b/) { - $line = '//' . $line; - $done = 1; - } - } elsif (!$done && $action eq "set") { - if ($line =~ m!^(?://)?\s*#define\s*$name\b!) { - $line = "#define $name"; - $line .= " $value" if defined $value && $value ne ""; - $line .= "\n"; - $done = 1; - } - } - - print $config_write $line; -} - -close $config_write; - -die "configuration section not found" if ($action eq "full" && !$done); -die "$name not found" if ($action ne "full" && !$done); - -__END__ diff --git a/build/premake/premake5/contrib/mbedtls/scripts/data_files/error.fmt b/build/premake/premake5/contrib/mbedtls/scripts/data_files/error.fmt deleted file mode 100644 index bd6ef01381..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/data_files/error.fmt +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Error message information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) -#include "mbedtls/error.h" -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_ERROR_C) - -#include - -HEADER_INCLUDED - -void mbedtls_strerror( int ret, char *buf, size_t buflen ) -{ - size_t len; - int use_ret; - - if( buflen == 0 ) - return; - - memset( buf, 0x00, buflen ); - - if( ret < 0 ) - ret = -ret; - - if( ret & 0xFF80 ) - { - use_ret = ret & 0xFF80; - - // High level error codes - // - // BEGIN generated code -HIGH_LEVEL_CODE_CHECKS - // END generated code - - if( strlen( buf ) == 0 ) - mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); - } - - use_ret = ret & ~0xFF80; - - if( use_ret == 0 ) - return; - - // If high level code is present, make a concatenation between both - // error strings. - // - len = strlen( buf ); - - if( len > 0 ) - { - if( buflen - len < 5 ) - return; - - mbedtls_snprintf( buf + len, buflen - len, " : " ); - - buf += len + 3; - buflen -= len + 3; - } - - // Low level error codes - // - // BEGIN generated code -LOW_LEVEL_CODE_CHECKS - // END generated code - - if( strlen( buf ) != 0 ) - return; - - mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); -} - -#else /* MBEDTLS_ERROR_C */ - -#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) - -/* - * Provide an non-function in case MBEDTLS_ERROR_C is not defined - */ -void mbedtls_strerror( int ret, char *buf, size_t buflen ) -{ - ((void) ret); - - if( buflen > 0 ) - buf[0] = '\0'; -} - -#endif /* MBEDTLS_ERROR_STRERROR_DUMMY */ - -#endif /* MBEDTLS_ERROR_C */ diff --git a/build/premake/premake5/contrib/mbedtls/scripts/data_files/rename-1.3-2.0.txt b/build/premake/premake5/contrib/mbedtls/scripts/data_files/rename-1.3-2.0.txt deleted file mode 100644 index 397f6beae6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/data_files/rename-1.3-2.0.txt +++ /dev/null @@ -1,2175 +0,0 @@ -AES_DECRYPT MBEDTLS_AES_DECRYPT -AES_ENCRYPT MBEDTLS_AES_ENCRYPT -ASN1_BIT_STRING MBEDTLS_ASN1_BIT_STRING -ASN1_BMP_STRING MBEDTLS_ASN1_BMP_STRING -ASN1_BOOLEAN MBEDTLS_ASN1_BOOLEAN -ASN1_CHK_ADD MBEDTLS_ASN1_CHK_ADD -ASN1_CONSTRUCTED MBEDTLS_ASN1_CONSTRUCTED -ASN1_CONTEXT_SPECIFIC MBEDTLS_ASN1_CONTEXT_SPECIFIC -ASN1_GENERALIZED_TIME MBEDTLS_ASN1_GENERALIZED_TIME -ASN1_IA5_STRING MBEDTLS_ASN1_IA5_STRING -ASN1_INTEGER MBEDTLS_ASN1_INTEGER -ASN1_NULL MBEDTLS_ASN1_NULL -ASN1_OCTET_STRING MBEDTLS_ASN1_OCTET_STRING -ASN1_OID MBEDTLS_ASN1_OID -ASN1_PRIMITIVE MBEDTLS_ASN1_PRIMITIVE -ASN1_PRINTABLE_STRING MBEDTLS_ASN1_PRINTABLE_STRING -ASN1_SEQUENCE MBEDTLS_ASN1_SEQUENCE -ASN1_SET MBEDTLS_ASN1_SET -ASN1_T61_STRING MBEDTLS_ASN1_T61_STRING -ASN1_UNIVERSAL_STRING MBEDTLS_ASN1_UNIVERSAL_STRING -ASN1_UTC_TIME MBEDTLS_ASN1_UTC_TIME -ASN1_UTF8_STRING MBEDTLS_ASN1_UTF8_STRING -BADCERT_CN_MISMATCH MBEDTLS_X509_BADCERT_CN_MISMATCH -BADCERT_EXPIRED MBEDTLS_X509_BADCERT_EXPIRED -BADCERT_EXT_KEY_USAGE MBEDTLS_X509_BADCERT_EXT_KEY_USAGE -BADCERT_FUTURE MBEDTLS_X509_BADCERT_FUTURE -BADCERT_KEY_USAGE MBEDTLS_X509_BADCERT_KEY_USAGE -BADCERT_MISSING MBEDTLS_X509_BADCERT_MISSING -BADCERT_NOT_TRUSTED MBEDTLS_X509_BADCERT_NOT_TRUSTED -BADCERT_NS_CERT_TYPE MBEDTLS_X509_BADCERT_NS_CERT_TYPE -BADCERT_OTHER MBEDTLS_X509_BADCERT_OTHER -BADCERT_REVOKED MBEDTLS_X509_BADCERT_REVOKED -BADCERT_SKIP_VERIFY MBEDTLS_X509_BADCERT_SKIP_VERIFY -BADCRL_EXPIRED MBEDTLS_X509_BADCRL_EXPIRED -BADCRL_FUTURE MBEDTLS_X509_BADCRL_FUTURE -BADCRL_NOT_TRUSTED MBEDTLS_X509_BADCRL_NOT_TRUSTED -BLOWFISH_BLOCKSIZE MBEDTLS_BLOWFISH_BLOCKSIZE -BLOWFISH_DECRYPT MBEDTLS_BLOWFISH_DECRYPT -BLOWFISH_ENCRYPT MBEDTLS_BLOWFISH_ENCRYPT -BLOWFISH_MAX_KEY MBEDTLS_BLOWFISH_MAX_KEY_BITS -BLOWFISH_MIN_KEY MBEDTLS_BLOWFISH_MIN_KEY_BITS -BLOWFISH_ROUNDS MBEDTLS_BLOWFISH_ROUNDS -CAMELLIA_DECRYPT MBEDTLS_CAMELLIA_DECRYPT -CAMELLIA_ENCRYPT MBEDTLS_CAMELLIA_ENCRYPT -COLLECT_SIZE MBEDTLS_HAVEGE_COLLECT_SIZE -CTR_DRBG_BLOCKSIZE MBEDTLS_CTR_DRBG_BLOCKSIZE -CTR_DRBG_ENTROPY_LEN MBEDTLS_CTR_DRBG_ENTROPY_LEN -CTR_DRBG_KEYBITS MBEDTLS_CTR_DRBG_KEYBITS -CTR_DRBG_KEYSIZE MBEDTLS_CTR_DRBG_KEYSIZE -CTR_DRBG_MAX_INPUT MBEDTLS_CTR_DRBG_MAX_INPUT -CTR_DRBG_MAX_REQUEST MBEDTLS_CTR_DRBG_MAX_REQUEST -CTR_DRBG_MAX_SEED_INPUT MBEDTLS_CTR_DRBG_MAX_SEED_INPUT -CTR_DRBG_PR_OFF MBEDTLS_CTR_DRBG_PR_OFF -CTR_DRBG_PR_ON MBEDTLS_CTR_DRBG_PR_ON -CTR_DRBG_RESEED_INTERVAL MBEDTLS_CTR_DRBG_RESEED_INTERVAL -CTR_DRBG_SEEDLEN MBEDTLS_CTR_DRBG_SEEDLEN -DEPRECATED MBEDTLS_DEPRECATED -DES_DECRYPT MBEDTLS_DES_DECRYPT -DES_ENCRYPT MBEDTLS_DES_ENCRYPT -DES_KEY_SIZE MBEDTLS_DES_KEY_SIZE -ENTROPY_BLOCK_SIZE MBEDTLS_ENTROPY_BLOCK_SIZE -ENTROPY_MAX_GATHER MBEDTLS_ENTROPY_MAX_GATHER -ENTROPY_MAX_SEED_SIZE MBEDTLS_ENTROPY_MAX_SEED_SIZE -ENTROPY_MAX_SOURCES MBEDTLS_ENTROPY_MAX_SOURCES -ENTROPY_MIN_HARDCLOCK MBEDTLS_ENTROPY_MIN_HARDCLOCK -ENTROPY_MIN_HAVEGE MBEDTLS_ENTROPY_MIN_HAVEGE -ENTROPY_MIN_PLATFORM MBEDTLS_ENTROPY_MIN_PLATFORM -ENTROPY_SOURCE_MANUAL MBEDTLS_ENTROPY_SOURCE_MANUAL -EXT_AUTHORITY_KEY_IDENTIFIER MBEDTLS_X509_EXT_AUTHORITY_KEY_IDENTIFIER -EXT_BASIC_CONSTRAINTS MBEDTLS_X509_EXT_BASIC_CONSTRAINTS -EXT_CERTIFICATE_POLICIES MBEDTLS_X509_EXT_CERTIFICATE_POLICIES -EXT_CRL_DISTRIBUTION_POINTS MBEDTLS_X509_EXT_CRL_DISTRIBUTION_POINTS -EXT_EXTENDED_KEY_USAGE MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE -EXT_FRESHEST_CRL MBEDTLS_X509_EXT_FRESHEST_CRL -EXT_INIHIBIT_ANYPOLICY MBEDTLS_X509_EXT_INIHIBIT_ANYPOLICY -EXT_ISSUER_ALT_NAME MBEDTLS_X509_EXT_ISSUER_ALT_NAME -EXT_KEY_USAGE MBEDTLS_X509_EXT_KEY_USAGE -EXT_NAME_CONSTRAINTS MBEDTLS_X509_EXT_NAME_CONSTRAINTS -EXT_NS_CERT_TYPE MBEDTLS_X509_EXT_NS_CERT_TYPE -EXT_POLICY_CONSTRAINTS MBEDTLS_X509_EXT_POLICY_CONSTRAINTS -EXT_POLICY_MAPPINGS MBEDTLS_X509_EXT_POLICY_MAPPINGS -EXT_SUBJECT_ALT_NAME MBEDTLS_X509_EXT_SUBJECT_ALT_NAME -EXT_SUBJECT_DIRECTORY_ATTRS MBEDTLS_X509_EXT_SUBJECT_DIRECTORY_ATTRS -EXT_SUBJECT_KEY_IDENTIFIER MBEDTLS_X509_EXT_SUBJECT_KEY_IDENTIFIER -GCM_DECRYPT MBEDTLS_GCM_DECRYPT -GCM_ENCRYPT MBEDTLS_GCM_ENCRYPT -KU_CRL_SIGN MBEDTLS_X509_KU_CRL_SIGN -KU_DATA_ENCIPHERMENT MBEDTLS_X509_KU_DATA_ENCIPHERMENT -KU_DIGITAL_SIGNATURE MBEDTLS_X509_KU_DIGITAL_SIGNATURE -KU_KEY_AGREEMENT MBEDTLS_X509_KU_KEY_AGREEMENT -KU_KEY_CERT_SIGN MBEDTLS_X509_KU_KEY_CERT_SIGN -KU_KEY_ENCIPHERMENT MBEDTLS_X509_KU_KEY_ENCIPHERMENT -KU_NON_REPUDIATION MBEDTLS_X509_KU_NON_REPUDIATION -LN_2_DIV_LN_10_SCALE100 MBEDTLS_LN_2_DIV_LN_10_SCALE100 -MD_CONTEXT_T_INIT MBEDTLS_MD_CONTEXT_T_INIT -MEMORY_VERIFY_ALLOC MBEDTLS_MEMORY_VERIFY_ALLOC -MEMORY_VERIFY_ALWAYS MBEDTLS_MEMORY_VERIFY_ALWAYS -MEMORY_VERIFY_FREE MBEDTLS_MEMORY_VERIFY_FREE -MEMORY_VERIFY_NONE MBEDTLS_MEMORY_VERIFY_NONE -MPI_CHK MBEDTLS_MPI_CHK -NET_PROTO_TCP MBEDTLS_NET_PROTO_TCP -NET_PROTO_UDP MBEDTLS_NET_PROTO_UDP -NS_CERT_TYPE_EMAIL MBEDTLS_X509_NS_CERT_TYPE_EMAIL -NS_CERT_TYPE_EMAIL_CA MBEDTLS_X509_NS_CERT_TYPE_EMAIL_CA -NS_CERT_TYPE_OBJECT_SIGNING MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING -NS_CERT_TYPE_OBJECT_SIGNING_CA MBEDTLS_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA -NS_CERT_TYPE_RESERVED MBEDTLS_X509_NS_CERT_TYPE_RESERVED -NS_CERT_TYPE_SSL_CA MBEDTLS_X509_NS_CERT_TYPE_SSL_CA -NS_CERT_TYPE_SSL_CLIENT MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT -NS_CERT_TYPE_SSL_SERVER MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER -OID_ANSI_X9_62 MBEDTLS_OID_ANSI_X9_62 -OID_ANSI_X9_62_FIELD_TYPE MBEDTLS_OID_ANSI_X9_62_FIELD_TYPE -OID_ANSI_X9_62_PRIME_FIELD MBEDTLS_OID_ANSI_X9_62_PRIME_FIELD -OID_ANSI_X9_62_SIG MBEDTLS_OID_ANSI_X9_62_SIG -OID_ANSI_X9_62_SIG_SHA2 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 -OID_ANY_EXTENDED_KEY_USAGE MBEDTLS_OID_ANY_EXTENDED_KEY_USAGE -OID_AT MBEDTLS_OID_AT -OID_AT_CN MBEDTLS_OID_AT_CN -OID_AT_COUNTRY MBEDTLS_OID_AT_COUNTRY -OID_AT_DN_QUALIFIER MBEDTLS_OID_AT_DN_QUALIFIER -OID_AT_GENERATION_QUALIFIER MBEDTLS_OID_AT_GENERATION_QUALIFIER -OID_AT_GIVEN_NAME MBEDTLS_OID_AT_GIVEN_NAME -OID_AT_INITIALS MBEDTLS_OID_AT_INITIALS -OID_AT_LOCALITY MBEDTLS_OID_AT_LOCALITY -OID_AT_ORGANIZATION MBEDTLS_OID_AT_ORGANIZATION -OID_AT_ORG_UNIT MBEDTLS_OID_AT_ORG_UNIT -OID_AT_POSTAL_ADDRESS MBEDTLS_OID_AT_POSTAL_ADDRESS -OID_AT_POSTAL_CODE MBEDTLS_OID_AT_POSTAL_CODE -OID_AT_PSEUDONYM MBEDTLS_OID_AT_PSEUDONYM -OID_AT_SERIAL_NUMBER MBEDTLS_OID_AT_SERIAL_NUMBER -OID_AT_STATE MBEDTLS_OID_AT_STATE -OID_AT_SUR_NAME MBEDTLS_OID_AT_SUR_NAME -OID_AT_TITLE MBEDTLS_OID_AT_TITLE -OID_AT_UNIQUE_IDENTIFIER MBEDTLS_OID_AT_UNIQUE_IDENTIFIER -OID_AUTHORITY_KEY_IDENTIFIER MBEDTLS_OID_AUTHORITY_KEY_IDENTIFIER -OID_BASIC_CONSTRAINTS MBEDTLS_OID_BASIC_CONSTRAINTS -OID_CERTICOM MBEDTLS_OID_CERTICOM -OID_CERTIFICATE_POLICIES MBEDTLS_OID_CERTIFICATE_POLICIES -OID_CLIENT_AUTH MBEDTLS_OID_CLIENT_AUTH -OID_CMP MBEDTLS_OID_CMP -OID_CODE_SIGNING MBEDTLS_OID_CODE_SIGNING -OID_COUNTRY_US MBEDTLS_OID_COUNTRY_US -OID_CRL_DISTRIBUTION_POINTS MBEDTLS_OID_CRL_DISTRIBUTION_POINTS -OID_CRL_NUMBER MBEDTLS_OID_CRL_NUMBER -OID_DES_CBC MBEDTLS_OID_DES_CBC -OID_DES_EDE3_CBC MBEDTLS_OID_DES_EDE3_CBC -OID_DIGEST_ALG_MD2 MBEDTLS_OID_DIGEST_ALG_MD2 -OID_DIGEST_ALG_MD4 MBEDTLS_OID_DIGEST_ALG_MD4 -OID_DIGEST_ALG_MD5 MBEDTLS_OID_DIGEST_ALG_MD5 -OID_DIGEST_ALG_SHA1 MBEDTLS_OID_DIGEST_ALG_SHA1 -OID_DIGEST_ALG_SHA224 MBEDTLS_OID_DIGEST_ALG_SHA224 -OID_DIGEST_ALG_SHA256 MBEDTLS_OID_DIGEST_ALG_SHA256 -OID_DIGEST_ALG_SHA384 MBEDTLS_OID_DIGEST_ALG_SHA384 -OID_DIGEST_ALG_SHA512 MBEDTLS_OID_DIGEST_ALG_SHA512 -OID_DOMAIN_COMPONENT MBEDTLS_OID_DOMAIN_COMPONENT -OID_ECDSA_SHA1 MBEDTLS_OID_ECDSA_SHA1 -OID_ECDSA_SHA224 MBEDTLS_OID_ECDSA_SHA224 -OID_ECDSA_SHA256 MBEDTLS_OID_ECDSA_SHA256 -OID_ECDSA_SHA384 MBEDTLS_OID_ECDSA_SHA384 -OID_ECDSA_SHA512 MBEDTLS_OID_ECDSA_SHA512 -OID_EC_ALG_ECDH MBEDTLS_OID_EC_ALG_ECDH -OID_EC_ALG_UNRESTRICTED MBEDTLS_OID_EC_ALG_UNRESTRICTED -OID_EC_BRAINPOOL_V1 MBEDTLS_OID_EC_BRAINPOOL_V1 -OID_EC_GRP_BP256R1 MBEDTLS_OID_EC_GRP_BP256R1 -OID_EC_GRP_BP384R1 MBEDTLS_OID_EC_GRP_BP384R1 -OID_EC_GRP_BP512R1 MBEDTLS_OID_EC_GRP_BP512R1 -OID_EC_GRP_SECP192K1 MBEDTLS_OID_EC_GRP_SECP192K1 -OID_EC_GRP_SECP192R1 MBEDTLS_OID_EC_GRP_SECP192R1 -OID_EC_GRP_SECP224K1 MBEDTLS_OID_EC_GRP_SECP224K1 -OID_EC_GRP_SECP224R1 MBEDTLS_OID_EC_GRP_SECP224R1 -OID_EC_GRP_SECP256K1 MBEDTLS_OID_EC_GRP_SECP256K1 -OID_EC_GRP_SECP256R1 MBEDTLS_OID_EC_GRP_SECP256R1 -OID_EC_GRP_SECP384R1 MBEDTLS_OID_EC_GRP_SECP384R1 -OID_EC_GRP_SECP521R1 MBEDTLS_OID_EC_GRP_SECP521R1 -OID_EMAIL_PROTECTION MBEDTLS_OID_EMAIL_PROTECTION -OID_EXTENDED_KEY_USAGE MBEDTLS_OID_EXTENDED_KEY_USAGE -OID_FRESHEST_CRL MBEDTLS_OID_FRESHEST_CRL -OID_GOV MBEDTLS_OID_GOV -OID_HMAC_SHA1 MBEDTLS_OID_HMAC_SHA1 -OID_ID_CE MBEDTLS_OID_ID_CE -OID_INIHIBIT_ANYPOLICY MBEDTLS_OID_INIHIBIT_ANYPOLICY -OID_ISO_CCITT_DS MBEDTLS_OID_ISO_CCITT_DS -OID_ISO_IDENTIFIED_ORG MBEDTLS_OID_ISO_IDENTIFIED_ORG -OID_ISO_ITU_COUNTRY MBEDTLS_OID_ISO_ITU_COUNTRY -OID_ISO_ITU_US_ORG MBEDTLS_OID_ISO_ITU_US_ORG -OID_ISO_MEMBER_BODIES MBEDTLS_OID_ISO_MEMBER_BODIES -OID_ISSUER_ALT_NAME MBEDTLS_OID_ISSUER_ALT_NAME -OID_KEY_USAGE MBEDTLS_OID_KEY_USAGE -OID_KP MBEDTLS_OID_KP -OID_MGF1 MBEDTLS_OID_MGF1 -OID_NAME_CONSTRAINTS MBEDTLS_OID_NAME_CONSTRAINTS -OID_NETSCAPE MBEDTLS_OID_NETSCAPE -OID_NS_BASE_URL MBEDTLS_OID_NS_BASE_URL -OID_NS_CA_POLICY_URL MBEDTLS_OID_NS_CA_POLICY_URL -OID_NS_CA_REVOCATION_URL MBEDTLS_OID_NS_CA_REVOCATION_URL -OID_NS_CERT MBEDTLS_OID_NS_CERT -OID_NS_CERT_SEQUENCE MBEDTLS_OID_NS_CERT_SEQUENCE -OID_NS_CERT_TYPE MBEDTLS_OID_NS_CERT_TYPE -OID_NS_COMMENT MBEDTLS_OID_NS_COMMENT -OID_NS_DATA_TYPE MBEDTLS_OID_NS_DATA_TYPE -OID_NS_RENEWAL_URL MBEDTLS_OID_NS_RENEWAL_URL -OID_NS_REVOCATION_URL MBEDTLS_OID_NS_REVOCATION_URL -OID_NS_SSL_SERVER_NAME MBEDTLS_OID_NS_SSL_SERVER_NAME -OID_OCSP_SIGNING MBEDTLS_OID_OCSP_SIGNING -OID_OIW_SECSIG MBEDTLS_OID_OIW_SECSIG -OID_OIW_SECSIG_ALG MBEDTLS_OID_OIW_SECSIG_ALG -OID_OIW_SECSIG_SHA1 MBEDTLS_OID_OIW_SECSIG_SHA1 -OID_ORGANIZATION MBEDTLS_OID_ORGANIZATION -OID_ORG_ANSI_X9_62 MBEDTLS_OID_ORG_ANSI_X9_62 -OID_ORG_CERTICOM MBEDTLS_OID_ORG_CERTICOM -OID_ORG_DOD MBEDTLS_OID_ORG_DOD -OID_ORG_GOV MBEDTLS_OID_ORG_GOV -OID_ORG_NETSCAPE MBEDTLS_OID_ORG_NETSCAPE -OID_ORG_OIW MBEDTLS_OID_ORG_OIW -OID_ORG_RSA_DATA_SECURITY MBEDTLS_OID_ORG_RSA_DATA_SECURITY -OID_ORG_TELETRUST MBEDTLS_OID_ORG_TELETRUST -OID_PKCS MBEDTLS_OID_PKCS -OID_PKCS1 MBEDTLS_OID_PKCS1 -OID_PKCS12 MBEDTLS_OID_PKCS12 -OID_PKCS12_PBE MBEDTLS_OID_PKCS12_PBE -OID_PKCS12_PBE_SHA1_DES2_EDE_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_DES2_EDE_CBC -OID_PKCS12_PBE_SHA1_DES3_EDE_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_DES3_EDE_CBC -OID_PKCS12_PBE_SHA1_RC2_128_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_RC2_128_CBC -OID_PKCS12_PBE_SHA1_RC2_40_CBC MBEDTLS_OID_PKCS12_PBE_SHA1_RC2_40_CBC -OID_PKCS12_PBE_SHA1_RC4_128 MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_128 -OID_PKCS12_PBE_SHA1_RC4_40 MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_40 -OID_PKCS1_MD2 MBEDTLS_OID_PKCS1_MD2 -OID_PKCS1_MD4 MBEDTLS_OID_PKCS1_MD4 -OID_PKCS1_MD5 MBEDTLS_OID_PKCS1_MD5 -OID_PKCS1_RSA MBEDTLS_OID_PKCS1_RSA -OID_PKCS1_SHA1 MBEDTLS_OID_PKCS1_SHA1 -OID_PKCS1_SHA224 MBEDTLS_OID_PKCS1_SHA224 -OID_PKCS1_SHA256 MBEDTLS_OID_PKCS1_SHA256 -OID_PKCS1_SHA384 MBEDTLS_OID_PKCS1_SHA384 -OID_PKCS1_SHA512 MBEDTLS_OID_PKCS1_SHA512 -OID_PKCS5 MBEDTLS_OID_PKCS5 -OID_PKCS5_PBES2 MBEDTLS_OID_PKCS5_PBES2 -OID_PKCS5_PBE_MD2_DES_CBC MBEDTLS_OID_PKCS5_PBE_MD2_DES_CBC -OID_PKCS5_PBE_MD2_RC2_CBC MBEDTLS_OID_PKCS5_PBE_MD2_RC2_CBC -OID_PKCS5_PBE_MD5_DES_CBC MBEDTLS_OID_PKCS5_PBE_MD5_DES_CBC -OID_PKCS5_PBE_MD5_RC2_CBC MBEDTLS_OID_PKCS5_PBE_MD5_RC2_CBC -OID_PKCS5_PBE_SHA1_DES_CBC MBEDTLS_OID_PKCS5_PBE_SHA1_DES_CBC -OID_PKCS5_PBE_SHA1_RC2_CBC MBEDTLS_OID_PKCS5_PBE_SHA1_RC2_CBC -OID_PKCS5_PBKDF2 MBEDTLS_OID_PKCS5_PBKDF2 -OID_PKCS5_PBMAC1 MBEDTLS_OID_PKCS5_PBMAC1 -OID_PKCS9 MBEDTLS_OID_PKCS9 -OID_PKCS9_CSR_EXT_REQ MBEDTLS_OID_PKCS9_CSR_EXT_REQ -OID_PKCS9_EMAIL MBEDTLS_OID_PKCS9_EMAIL -OID_PKIX MBEDTLS_OID_PKIX -OID_POLICY_CONSTRAINTS MBEDTLS_OID_POLICY_CONSTRAINTS -OID_POLICY_MAPPINGS MBEDTLS_OID_POLICY_MAPPINGS -OID_PRIVATE_KEY_USAGE_PERIOD MBEDTLS_OID_PRIVATE_KEY_USAGE_PERIOD -OID_RSASSA_PSS MBEDTLS_OID_RSASSA_PSS -OID_RSA_COMPANY MBEDTLS_OID_RSA_COMPANY -OID_RSA_SHA_OBS MBEDTLS_OID_RSA_SHA_OBS -OID_SERVER_AUTH MBEDTLS_OID_SERVER_AUTH -OID_SIZE MBEDTLS_OID_SIZE -OID_SUBJECT_ALT_NAME MBEDTLS_OID_SUBJECT_ALT_NAME -OID_SUBJECT_DIRECTORY_ATTRS MBEDTLS_OID_SUBJECT_DIRECTORY_ATTRS -OID_SUBJECT_KEY_IDENTIFIER MBEDTLS_OID_SUBJECT_KEY_IDENTIFIER -OID_TELETRUST MBEDTLS_OID_TELETRUST -OID_TIME_STAMPING MBEDTLS_OID_TIME_STAMPING -PADLOCK_ACE MBEDTLS_PADLOCK_ACE -PADLOCK_ALIGN16 MBEDTLS_PADLOCK_ALIGN16 -PADLOCK_PHE MBEDTLS_PADLOCK_PHE -PADLOCK_PMM MBEDTLS_PADLOCK_PMM -PADLOCK_RNG MBEDTLS_PADLOCK_RNG -PKCS12_DERIVE_IV MBEDTLS_PKCS12_DERIVE_IV -PKCS12_DERIVE_KEY MBEDTLS_PKCS12_DERIVE_KEY -PKCS12_DERIVE_MAC_KEY MBEDTLS_PKCS12_DERIVE_MAC_KEY -PKCS12_PBE_DECRYPT MBEDTLS_PKCS12_PBE_DECRYPT -PKCS12_PBE_ENCRYPT MBEDTLS_PKCS12_PBE_ENCRYPT -PKCS5_DECRYPT MBEDTLS_PKCS5_DECRYPT -PKCS5_ENCRYPT MBEDTLS_PKCS5_ENCRYPT -POLARSSL_AESNI_AES MBEDTLS_AESNI_AES -POLARSSL_AESNI_C MBEDTLS_AESNI_C -POLARSSL_AESNI_CLMUL MBEDTLS_AESNI_CLMUL -POLARSSL_AESNI_H MBEDTLS_AESNI_H -POLARSSL_AES_ALT MBEDTLS_AES_ALT -POLARSSL_AES_C MBEDTLS_AES_C -POLARSSL_AES_H MBEDTLS_AES_H -POLARSSL_AES_ROM_TABLES MBEDTLS_AES_ROM_TABLES -POLARSSL_ARC4_ALT MBEDTLS_ARC4_ALT -POLARSSL_ARC4_C MBEDTLS_ARC4_C -POLARSSL_ARC4_H MBEDTLS_ARC4_H -POLARSSL_ASN1_H MBEDTLS_ASN1_H -POLARSSL_ASN1_PARSE_C MBEDTLS_ASN1_PARSE_C -POLARSSL_ASN1_WRITE_C MBEDTLS_ASN1_WRITE_C -POLARSSL_ASN1_WRITE_H MBEDTLS_ASN1_WRITE_H -POLARSSL_BASE64_C MBEDTLS_BASE64_C -POLARSSL_BASE64_H MBEDTLS_BASE64_H -POLARSSL_BIGNUM_C MBEDTLS_BIGNUM_C -POLARSSL_BIGNUM_H MBEDTLS_BIGNUM_H -POLARSSL_BLOWFISH_ALT MBEDTLS_BLOWFISH_ALT -POLARSSL_BLOWFISH_C MBEDTLS_BLOWFISH_C -POLARSSL_BLOWFISH_H MBEDTLS_BLOWFISH_H -POLARSSL_BN_MUL_H MBEDTLS_BN_MUL_H -POLARSSL_CAMELLIA_ALT MBEDTLS_CAMELLIA_ALT -POLARSSL_CAMELLIA_C MBEDTLS_CAMELLIA_C -POLARSSL_CAMELLIA_H MBEDTLS_CAMELLIA_H -POLARSSL_CAMELLIA_SMALL_MEMORY MBEDTLS_CAMELLIA_SMALL_MEMORY -POLARSSL_CCM_C MBEDTLS_CCM_C -POLARSSL_CCM_H MBEDTLS_CCM_H -POLARSSL_CERTS_C MBEDTLS_CERTS_C -POLARSSL_CERTS_H MBEDTLS_CERTS_H -POLARSSL_CHECK_CONFIG_H MBEDTLS_CHECK_CONFIG_H -POLARSSL_CIPHERSUITE_NODTLS MBEDTLS_CIPHERSUITE_NODTLS -POLARSSL_CIPHERSUITE_SHORT_TAG MBEDTLS_CIPHERSUITE_SHORT_TAG -POLARSSL_CIPHERSUITE_WEAK MBEDTLS_CIPHERSUITE_WEAK -POLARSSL_CIPHER_AES_128_CBC MBEDTLS_CIPHER_AES_128_CBC -POLARSSL_CIPHER_AES_128_CCM MBEDTLS_CIPHER_AES_128_CCM -POLARSSL_CIPHER_AES_128_CFB128 MBEDTLS_CIPHER_AES_128_CFB128 -POLARSSL_CIPHER_AES_128_CTR MBEDTLS_CIPHER_AES_128_CTR -POLARSSL_CIPHER_AES_128_ECB MBEDTLS_CIPHER_AES_128_ECB -POLARSSL_CIPHER_AES_128_GCM MBEDTLS_CIPHER_AES_128_GCM -POLARSSL_CIPHER_AES_192_CBC MBEDTLS_CIPHER_AES_192_CBC -POLARSSL_CIPHER_AES_192_CCM MBEDTLS_CIPHER_AES_192_CCM -POLARSSL_CIPHER_AES_192_CFB128 MBEDTLS_CIPHER_AES_192_CFB128 -POLARSSL_CIPHER_AES_192_CTR MBEDTLS_CIPHER_AES_192_CTR -POLARSSL_CIPHER_AES_192_ECB MBEDTLS_CIPHER_AES_192_ECB -POLARSSL_CIPHER_AES_192_GCM MBEDTLS_CIPHER_AES_192_GCM -POLARSSL_CIPHER_AES_256_CBC MBEDTLS_CIPHER_AES_256_CBC -POLARSSL_CIPHER_AES_256_CCM MBEDTLS_CIPHER_AES_256_CCM -POLARSSL_CIPHER_AES_256_CFB128 MBEDTLS_CIPHER_AES_256_CFB128 -POLARSSL_CIPHER_AES_256_CTR MBEDTLS_CIPHER_AES_256_CTR -POLARSSL_CIPHER_AES_256_ECB MBEDTLS_CIPHER_AES_256_ECB -POLARSSL_CIPHER_AES_256_GCM MBEDTLS_CIPHER_AES_256_GCM -POLARSSL_CIPHER_ARC4_128 MBEDTLS_CIPHER_ARC4_128 -POLARSSL_CIPHER_BLOWFISH_CBC MBEDTLS_CIPHER_BLOWFISH_CBC -POLARSSL_CIPHER_BLOWFISH_CFB64 MBEDTLS_CIPHER_BLOWFISH_CFB64 -POLARSSL_CIPHER_BLOWFISH_CTR MBEDTLS_CIPHER_BLOWFISH_CTR -POLARSSL_CIPHER_BLOWFISH_ECB MBEDTLS_CIPHER_BLOWFISH_ECB -POLARSSL_CIPHER_C MBEDTLS_CIPHER_C -POLARSSL_CIPHER_CAMELLIA_128_CBC MBEDTLS_CIPHER_CAMELLIA_128_CBC -POLARSSL_CIPHER_CAMELLIA_128_CCM MBEDTLS_CIPHER_CAMELLIA_128_CCM -POLARSSL_CIPHER_CAMELLIA_128_CFB128 MBEDTLS_CIPHER_CAMELLIA_128_CFB128 -POLARSSL_CIPHER_CAMELLIA_128_CTR MBEDTLS_CIPHER_CAMELLIA_128_CTR -POLARSSL_CIPHER_CAMELLIA_128_ECB MBEDTLS_CIPHER_CAMELLIA_128_ECB -POLARSSL_CIPHER_CAMELLIA_128_GCM MBEDTLS_CIPHER_CAMELLIA_128_GCM -POLARSSL_CIPHER_CAMELLIA_192_CBC MBEDTLS_CIPHER_CAMELLIA_192_CBC -POLARSSL_CIPHER_CAMELLIA_192_CCM MBEDTLS_CIPHER_CAMELLIA_192_CCM -POLARSSL_CIPHER_CAMELLIA_192_CFB128 MBEDTLS_CIPHER_CAMELLIA_192_CFB128 -POLARSSL_CIPHER_CAMELLIA_192_CTR MBEDTLS_CIPHER_CAMELLIA_192_CTR -POLARSSL_CIPHER_CAMELLIA_192_ECB MBEDTLS_CIPHER_CAMELLIA_192_ECB -POLARSSL_CIPHER_CAMELLIA_192_GCM MBEDTLS_CIPHER_CAMELLIA_192_GCM -POLARSSL_CIPHER_CAMELLIA_256_CBC MBEDTLS_CIPHER_CAMELLIA_256_CBC -POLARSSL_CIPHER_CAMELLIA_256_CCM MBEDTLS_CIPHER_CAMELLIA_256_CCM -POLARSSL_CIPHER_CAMELLIA_256_CFB128 MBEDTLS_CIPHER_CAMELLIA_256_CFB128 -POLARSSL_CIPHER_CAMELLIA_256_CTR MBEDTLS_CIPHER_CAMELLIA_256_CTR -POLARSSL_CIPHER_CAMELLIA_256_ECB MBEDTLS_CIPHER_CAMELLIA_256_ECB -POLARSSL_CIPHER_CAMELLIA_256_GCM MBEDTLS_CIPHER_CAMELLIA_256_GCM -POLARSSL_CIPHER_DES_CBC MBEDTLS_CIPHER_DES_CBC -POLARSSL_CIPHER_DES_ECB MBEDTLS_CIPHER_DES_ECB -POLARSSL_CIPHER_DES_EDE3_CBC MBEDTLS_CIPHER_DES_EDE3_CBC -POLARSSL_CIPHER_DES_EDE3_ECB MBEDTLS_CIPHER_DES_EDE3_ECB -POLARSSL_CIPHER_DES_EDE_CBC MBEDTLS_CIPHER_DES_EDE_CBC -POLARSSL_CIPHER_DES_EDE_ECB MBEDTLS_CIPHER_DES_EDE_ECB -POLARSSL_CIPHER_H MBEDTLS_CIPHER_H -POLARSSL_CIPHER_ID_3DES MBEDTLS_CIPHER_ID_3DES -POLARSSL_CIPHER_ID_AES MBEDTLS_CIPHER_ID_AES -POLARSSL_CIPHER_ID_ARC4 MBEDTLS_CIPHER_ID_ARC4 -POLARSSL_CIPHER_ID_BLOWFISH MBEDTLS_CIPHER_ID_BLOWFISH -POLARSSL_CIPHER_ID_CAMELLIA MBEDTLS_CIPHER_ID_CAMELLIA -POLARSSL_CIPHER_ID_DES MBEDTLS_CIPHER_ID_DES -POLARSSL_CIPHER_ID_NONE MBEDTLS_CIPHER_ID_NONE -POLARSSL_CIPHER_ID_NULL MBEDTLS_CIPHER_ID_NULL -POLARSSL_CIPHER_MODE_AEAD MBEDTLS_CIPHER_MODE_AEAD -POLARSSL_CIPHER_MODE_CBC MBEDTLS_CIPHER_MODE_CBC -POLARSSL_CIPHER_MODE_CFB MBEDTLS_CIPHER_MODE_CFB -POLARSSL_CIPHER_MODE_CTR MBEDTLS_CIPHER_MODE_CTR -POLARSSL_CIPHER_MODE_STREAM MBEDTLS_CIPHER_MODE_STREAM -POLARSSL_CIPHER_MODE_WITH_PADDING MBEDTLS_CIPHER_MODE_WITH_PADDING -POLARSSL_CIPHER_NONE MBEDTLS_CIPHER_NONE -POLARSSL_CIPHER_NULL MBEDTLS_CIPHER_NULL -POLARSSL_CIPHER_NULL_CIPHER MBEDTLS_CIPHER_NULL_CIPHER -POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -POLARSSL_CIPHER_PADDING_PKCS7 MBEDTLS_CIPHER_PADDING_PKCS7 -POLARSSL_CIPHER_PADDING_ZEROS MBEDTLS_CIPHER_PADDING_ZEROS -POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -POLARSSL_CIPHER_VARIABLE_IV_LEN MBEDTLS_CIPHER_VARIABLE_IV_LEN -POLARSSL_CIPHER_VARIABLE_KEY_LEN MBEDTLS_CIPHER_VARIABLE_KEY_LEN -POLARSSL_CIPHER_WRAP_H MBEDTLS_CIPHER_WRAP_H -POLARSSL_CONFIG_FILE MBEDTLS_CONFIG_FILE -POLARSSL_CONFIG_H MBEDTLS_CONFIG_H -POLARSSL_CTR_DRBG_C MBEDTLS_CTR_DRBG_C -POLARSSL_CTR_DRBG_H MBEDTLS_CTR_DRBG_H -POLARSSL_DEBUG_C MBEDTLS_DEBUG_C -POLARSSL_DEBUG_DFL_MODE MBEDTLS_DEBUG_DFL_MODE -POLARSSL_DEBUG_H MBEDTLS_DEBUG_H -POLARSSL_DEBUG_LOG_FULL MBEDTLS_DEBUG_LOG_FULL -POLARSSL_DEBUG_LOG_RAW MBEDTLS_DEBUG_LOG_RAW -POLARSSL_DECRYPT MBEDTLS_DECRYPT -POLARSSL_DEPRECATED_REMOVED MBEDTLS_DEPRECATED_REMOVED -POLARSSL_DEPRECATED_WARNING MBEDTLS_DEPRECATED_WARNING -POLARSSL_DES_ALT MBEDTLS_DES_ALT -POLARSSL_DES_C MBEDTLS_DES_C -POLARSSL_DES_H MBEDTLS_DES_H -POLARSSL_DHM_C MBEDTLS_DHM_C -POLARSSL_DHM_H MBEDTLS_DHM_H -POLARSSL_DHM_RFC2409_MODP_1024_G MBEDTLS_DHM_RFC2409_MODP_1024_G -POLARSSL_DHM_RFC2409_MODP_1024_P MBEDTLS_DHM_RFC2409_MODP_1024_P -POLARSSL_DHM_RFC3526_MODP_2048_G MBEDTLS_DHM_RFC3526_MODP_2048_G -POLARSSL_DHM_RFC3526_MODP_2048_P MBEDTLS_DHM_RFC3526_MODP_2048_P -POLARSSL_DHM_RFC3526_MODP_3072_G MBEDTLS_DHM_RFC3526_MODP_3072_G -POLARSSL_DHM_RFC3526_MODP_3072_P MBEDTLS_DHM_RFC3526_MODP_3072_P -POLARSSL_DHM_RFC5114_MODP_1024_G MBEDTLS_DHM_RFC5114_MODP_1024_G -POLARSSL_DHM_RFC5114_MODP_1024_P MBEDTLS_DHM_RFC5114_MODP_1024_P -POLARSSL_DHM_RFC5114_MODP_2048_G MBEDTLS_DHM_RFC5114_MODP_2048_G -POLARSSL_DHM_RFC5114_MODP_2048_P MBEDTLS_DHM_RFC5114_MODP_2048_P -POLARSSL_ECDH_C MBEDTLS_ECDH_C -POLARSSL_ECDH_H MBEDTLS_ECDH_H -POLARSSL_ECDH_OURS MBEDTLS_ECDH_OURS -POLARSSL_ECDH_THEIRS MBEDTLS_ECDH_THEIRS -POLARSSL_ECDSA_C MBEDTLS_ECDSA_C -POLARSSL_ECDSA_DETERMINISTIC MBEDTLS_ECDSA_DETERMINISTIC -POLARSSL_ECDSA_H MBEDTLS_ECDSA_H -POLARSSL_ECP_C MBEDTLS_ECP_C -POLARSSL_ECP_DP_BP256R1 MBEDTLS_ECP_DP_BP256R1 -POLARSSL_ECP_DP_BP256R1_ENABLED MBEDTLS_ECP_DP_BP256R1_ENABLED -POLARSSL_ECP_DP_BP384R1 MBEDTLS_ECP_DP_BP384R1 -POLARSSL_ECP_DP_BP384R1_ENABLED MBEDTLS_ECP_DP_BP384R1_ENABLED -POLARSSL_ECP_DP_BP512R1 MBEDTLS_ECP_DP_BP512R1 -POLARSSL_ECP_DP_BP512R1_ENABLED MBEDTLS_ECP_DP_BP512R1_ENABLED -POLARSSL_ECP_DP_M255 MBEDTLS_ECP_DP_CURVE25519 -POLARSSL_ECP_DP_M255_ENABLED MBEDTLS_ECP_DP_CURVE25519_ENABLED -POLARSSL_ECP_DP_MAX MBEDTLS_ECP_DP_MAX -POLARSSL_ECP_DP_NONE MBEDTLS_ECP_DP_NONE -POLARSSL_ECP_DP_SECP192K1 MBEDTLS_ECP_DP_SECP192K1 -POLARSSL_ECP_DP_SECP192K1_ENABLED MBEDTLS_ECP_DP_SECP192K1_ENABLED -POLARSSL_ECP_DP_SECP192R1 MBEDTLS_ECP_DP_SECP192R1 -POLARSSL_ECP_DP_SECP192R1_ENABLED MBEDTLS_ECP_DP_SECP192R1_ENABLED -POLARSSL_ECP_DP_SECP224K1 MBEDTLS_ECP_DP_SECP224K1 -POLARSSL_ECP_DP_SECP224K1_ENABLED MBEDTLS_ECP_DP_SECP224K1_ENABLED -POLARSSL_ECP_DP_SECP224R1 MBEDTLS_ECP_DP_SECP224R1 -POLARSSL_ECP_DP_SECP224R1_ENABLED MBEDTLS_ECP_DP_SECP224R1_ENABLED -POLARSSL_ECP_DP_SECP256K1 MBEDTLS_ECP_DP_SECP256K1 -POLARSSL_ECP_DP_SECP256K1_ENABLED MBEDTLS_ECP_DP_SECP256K1_ENABLED -POLARSSL_ECP_DP_SECP256R1 MBEDTLS_ECP_DP_SECP256R1 -POLARSSL_ECP_DP_SECP256R1_ENABLED MBEDTLS_ECP_DP_SECP256R1_ENABLED -POLARSSL_ECP_DP_SECP384R1 MBEDTLS_ECP_DP_SECP384R1 -POLARSSL_ECP_DP_SECP384R1_ENABLED MBEDTLS_ECP_DP_SECP384R1_ENABLED -POLARSSL_ECP_DP_SECP521R1 MBEDTLS_ECP_DP_SECP521R1 -POLARSSL_ECP_DP_SECP521R1_ENABLED MBEDTLS_ECP_DP_SECP521R1_ENABLED -POLARSSL_ECP_FIXED_POINT_OPTIM MBEDTLS_ECP_FIXED_POINT_OPTIM -POLARSSL_ECP_H MBEDTLS_ECP_H -POLARSSL_ECP_MAX_BITS MBEDTLS_ECP_MAX_BITS -POLARSSL_ECP_MAX_BYTES MBEDTLS_ECP_MAX_BYTES -POLARSSL_ECP_MAX_PT_LEN MBEDTLS_ECP_MAX_PT_LEN -POLARSSL_ECP_NIST_OPTIM MBEDTLS_ECP_NIST_OPTIM -POLARSSL_ECP_PF_COMPRESSED MBEDTLS_ECP_PF_COMPRESSED -POLARSSL_ECP_PF_UNCOMPRESSED MBEDTLS_ECP_PF_UNCOMPRESSED -POLARSSL_ECP_TLS_NAMED_CURVE MBEDTLS_ECP_TLS_NAMED_CURVE -POLARSSL_ECP_WINDOW_SIZE MBEDTLS_ECP_WINDOW_SIZE -POLARSSL_ENABLE_WEAK_CIPHERSUITES MBEDTLS_ENABLE_WEAK_CIPHERSUITES -POLARSSL_ENCRYPT MBEDTLS_ENCRYPT -POLARSSL_ENTROPY_C MBEDTLS_ENTROPY_C -POLARSSL_ENTROPY_FORCE_SHA256 MBEDTLS_ENTROPY_FORCE_SHA256 -POLARSSL_ENTROPY_H MBEDTLS_ENTROPY_H -POLARSSL_ENTROPY_POLL_H MBEDTLS_ENTROPY_POLL_H -POLARSSL_ENTROPY_SHA256_ACCUMULATOR MBEDTLS_ENTROPY_SHA256_ACCUMULATOR -POLARSSL_ENTROPY_SHA512_ACCUMULATOR MBEDTLS_ENTROPY_SHA512_ACCUMULATOR -POLARSSL_ERROR_C MBEDTLS_ERROR_C -POLARSSL_ERROR_H MBEDTLS_ERROR_H -POLARSSL_ERROR_STRERROR_BC MBEDTLS_ERROR_STRERROR_BC -POLARSSL_ERROR_STRERROR_DUMMY MBEDTLS_ERROR_STRERROR_DUMMY -POLARSSL_ERR_AES_INVALID_INPUT_LENGTH MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH -POLARSSL_ERR_AES_INVALID_KEY_LENGTH MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -POLARSSL_ERR_ASN1_BUF_TOO_SMALL MBEDTLS_ERR_ASN1_BUF_TOO_SMALL -POLARSSL_ERR_ASN1_INVALID_DATA MBEDTLS_ERR_ASN1_INVALID_DATA -POLARSSL_ERR_ASN1_INVALID_LENGTH MBEDTLS_ERR_ASN1_INVALID_LENGTH -POLARSSL_ERR_ASN1_LENGTH_MISMATCH MBEDTLS_ERR_ASN1_LENGTH_MISMATCH -POLARSSL_ERR_ASN1_MALLOC_FAILED MBEDTLS_ERR_ASN1_ALLOC_FAILED -POLARSSL_ERR_ASN1_OUT_OF_DATA MBEDTLS_ERR_ASN1_OUT_OF_DATA -POLARSSL_ERR_ASN1_UNEXPECTED_TAG MBEDTLS_ERR_ASN1_UNEXPECTED_TAG -POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -POLARSSL_ERR_BASE64_INVALID_CHARACTER MBEDTLS_ERR_BASE64_INVALID_CHARACTER -POLARSSL_ERR_BLOWFISH_INVALID_INPUT_LENGTH MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH -POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -POLARSSL_ERR_CCM_AUTH_FAILED MBEDTLS_ERR_CCM_AUTH_FAILED -POLARSSL_ERR_CCM_BAD_INPUT MBEDTLS_ERR_CCM_BAD_INPUT -POLARSSL_ERR_CIPHER_ALLOC_FAILED MBEDTLS_ERR_CIPHER_ALLOC_FAILED -POLARSSL_ERR_CIPHER_AUTH_FAILED MBEDTLS_ERR_CIPHER_AUTH_FAILED -POLARSSL_ERR_CIPHER_BAD_INPUT_DATA MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA -POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE -POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED -POLARSSL_ERR_CIPHER_INVALID_PADDING MBEDTLS_ERR_CIPHER_INVALID_PADDING -POLARSSL_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -POLARSSL_ERR_CTR_DRBG_FILE_IO_ERROR MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR -POLARSSL_ERR_CTR_DRBG_INPUT_TOO_BIG MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG -POLARSSL_ERR_CTR_DRBG_REQUEST_TOO_BIG MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG -POLARSSL_ERR_DES_INVALID_INPUT_LENGTH MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH -POLARSSL_ERR_DHM_BAD_INPUT_DATA MBEDTLS_ERR_DHM_BAD_INPUT_DATA -POLARSSL_ERR_DHM_CALC_SECRET_FAILED MBEDTLS_ERR_DHM_CALC_SECRET_FAILED -POLARSSL_ERR_DHM_FILE_IO_ERROR MBEDTLS_ERR_DHM_FILE_IO_ERROR -POLARSSL_ERR_DHM_INVALID_FORMAT MBEDTLS_ERR_DHM_INVALID_FORMAT -POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED -POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED -POLARSSL_ERR_DHM_MALLOC_FAILED MBEDTLS_ERR_DHM_ALLOC_FAILED -POLARSSL_ERR_DHM_READ_PARAMS_FAILED MBEDTLS_ERR_DHM_READ_PARAMS_FAILED -POLARSSL_ERR_DHM_READ_PUBLIC_FAILED MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED -POLARSSL_ERR_ECP_BAD_INPUT_DATA MBEDTLS_ERR_ECP_BAD_INPUT_DATA -POLARSSL_ERR_ECP_BUFFER_TOO_SMALL MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL -POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE -POLARSSL_ERR_ECP_INVALID_KEY MBEDTLS_ERR_ECP_INVALID_KEY -POLARSSL_ERR_ECP_MALLOC_FAILED MBEDTLS_ERR_ECP_ALLOC_FAILED -POLARSSL_ERR_ECP_RANDOM_FAILED MBEDTLS_ERR_ECP_RANDOM_FAILED -POLARSSL_ERR_ECP_SIG_LEN_MISMATCH MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH -POLARSSL_ERR_ECP_VERIFY_FAILED MBEDTLS_ERR_ECP_VERIFY_FAILED -POLARSSL_ERR_ENTROPY_FILE_IO_ERROR MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR -POLARSSL_ERR_ENTROPY_MAX_SOURCES MBEDTLS_ERR_ENTROPY_MAX_SOURCES -POLARSSL_ERR_ENTROPY_NO_SOURCES_DEFINED MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED -POLARSSL_ERR_ENTROPY_SOURCE_FAILED MBEDTLS_ERR_ENTROPY_SOURCE_FAILED -POLARSSL_ERR_GCM_AUTH_FAILED MBEDTLS_ERR_GCM_AUTH_FAILED -POLARSSL_ERR_GCM_BAD_INPUT MBEDTLS_ERR_GCM_BAD_INPUT -POLARSSL_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED -POLARSSL_ERR_HMAC_DRBG_FILE_IO_ERROR MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR -POLARSSL_ERR_HMAC_DRBG_INPUT_TOO_BIG MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG -POLARSSL_ERR_HMAC_DRBG_REQUEST_TOO_BIG MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG -POLARSSL_ERR_MD2_FILE_IO_ERROR MBEDTLS_ERR_MD2_FILE_IO_ERROR -POLARSSL_ERR_MD4_FILE_IO_ERROR MBEDTLS_ERR_MD4_FILE_IO_ERROR -POLARSSL_ERR_MD5_FILE_IO_ERROR MBEDTLS_ERR_MD5_FILE_IO_ERROR -POLARSSL_ERR_MD_ALLOC_FAILED MBEDTLS_ERR_MD_ALLOC_FAILED -POLARSSL_ERR_MD_BAD_INPUT_DATA MBEDTLS_ERR_MD_BAD_INPUT_DATA -POLARSSL_ERR_MD_FEATURE_UNAVAILABLE MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE -POLARSSL_ERR_MD_FILE_IO_ERROR MBEDTLS_ERR_MD_FILE_IO_ERROR -POLARSSL_ERR_MPI_BAD_INPUT_DATA MBEDTLS_ERR_MPI_BAD_INPUT_DATA -POLARSSL_ERR_MPI_BUFFER_TOO_SMALL MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -POLARSSL_ERR_MPI_DIVISION_BY_ZERO MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -POLARSSL_ERR_MPI_FILE_IO_ERROR MBEDTLS_ERR_MPI_FILE_IO_ERROR -POLARSSL_ERR_MPI_INVALID_CHARACTER MBEDTLS_ERR_MPI_INVALID_CHARACTER -POLARSSL_ERR_MPI_MALLOC_FAILED MBEDTLS_ERR_MPI_ALLOC_FAILED -POLARSSL_ERR_MPI_NEGATIVE_VALUE MBEDTLS_ERR_MPI_NEGATIVE_VALUE -POLARSSL_ERR_MPI_NOT_ACCEPTABLE MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -POLARSSL_ERR_NET_ACCEPT_FAILED MBEDTLS_ERR_NET_ACCEPT_FAILED -POLARSSL_ERR_NET_BIND_FAILED MBEDTLS_ERR_NET_BIND_FAILED -POLARSSL_ERR_NET_CONNECT_FAILED MBEDTLS_ERR_NET_CONNECT_FAILED -POLARSSL_ERR_NET_CONN_RESET MBEDTLS_ERR_NET_CONN_RESET -POLARSSL_ERR_NET_LISTEN_FAILED MBEDTLS_ERR_NET_LISTEN_FAILED -POLARSSL_ERR_NET_RECV_FAILED MBEDTLS_ERR_NET_RECV_FAILED -POLARSSL_ERR_NET_SEND_FAILED MBEDTLS_ERR_NET_SEND_FAILED -POLARSSL_ERR_NET_SOCKET_FAILED MBEDTLS_ERR_NET_SOCKET_FAILED -POLARSSL_ERR_NET_TIMEOUT MBEDTLS_ERR_SSL_TIMEOUT -POLARSSL_ERR_NET_UNKNOWN_HOST MBEDTLS_ERR_NET_UNKNOWN_HOST -POLARSSL_ERR_NET_WANT_READ MBEDTLS_ERR_SSL_WANT_READ -POLARSSL_ERR_NET_WANT_WRITE MBEDTLS_ERR_SSL_WANT_WRITE -POLARSSL_ERR_OID_BUF_TOO_SMALL MBEDTLS_ERR_OID_BUF_TOO_SMALL -POLARSSL_ERR_OID_NOT_FOUND MBEDTLS_ERR_OID_NOT_FOUND -POLARSSL_ERR_PADLOCK_DATA_MISALIGNED MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED -POLARSSL_ERR_PBKDF2_BAD_INPUT_DATA MBEDTLS_ERR_PBKDF2_BAD_INPUT_DATA -POLARSSL_ERR_PEM_BAD_INPUT_DATA MBEDTLS_ERR_PEM_BAD_INPUT_DATA -POLARSSL_ERR_PEM_FEATURE_UNAVAILABLE MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE -POLARSSL_ERR_PEM_INVALID_DATA MBEDTLS_ERR_PEM_INVALID_DATA -POLARSSL_ERR_PEM_INVALID_ENC_IV MBEDTLS_ERR_PEM_INVALID_ENC_IV -POLARSSL_ERR_PEM_MALLOC_FAILED MBEDTLS_ERR_PEM_ALLOC_FAILED -POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT -POLARSSL_ERR_PEM_PASSWORD_MISMATCH MBEDTLS_ERR_PEM_PASSWORD_MISMATCH -POLARSSL_ERR_PEM_PASSWORD_REQUIRED MBEDTLS_ERR_PEM_PASSWORD_REQUIRED -POLARSSL_ERR_PEM_UNKNOWN_ENC_ALG MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG -POLARSSL_ERR_PKCS12_BAD_INPUT_DATA MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA -POLARSSL_ERR_PKCS12_FEATURE_UNAVAILABLE MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE -POLARSSL_ERR_PKCS12_PASSWORD_MISMATCH MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH -POLARSSL_ERR_PKCS12_PBE_INVALID_FORMAT MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT -POLARSSL_ERR_PKCS5_BAD_INPUT_DATA MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -POLARSSL_ERR_PKCS5_FEATURE_UNAVAILABLE MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -POLARSSL_ERR_PKCS5_INVALID_FORMAT MBEDTLS_ERR_PKCS5_INVALID_FORMAT -POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -POLARSSL_ERR_PK_BAD_INPUT_DATA MBEDTLS_ERR_PK_BAD_INPUT_DATA -POLARSSL_ERR_PK_FEATURE_UNAVAILABLE MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -POLARSSL_ERR_PK_FILE_IO_ERROR MBEDTLS_ERR_PK_FILE_IO_ERROR -POLARSSL_ERR_PK_INVALID_ALG MBEDTLS_ERR_PK_INVALID_ALG -POLARSSL_ERR_PK_INVALID_PUBKEY MBEDTLS_ERR_PK_INVALID_PUBKEY -POLARSSL_ERR_PK_KEY_INVALID_FORMAT MBEDTLS_ERR_PK_KEY_INVALID_FORMAT -POLARSSL_ERR_PK_KEY_INVALID_VERSION MBEDTLS_ERR_PK_KEY_INVALID_VERSION -POLARSSL_ERR_PK_MALLOC_FAILED MBEDTLS_ERR_PK_ALLOC_FAILED -POLARSSL_ERR_PK_PASSWORD_MISMATCH MBEDTLS_ERR_PK_PASSWORD_MISMATCH -POLARSSL_ERR_PK_PASSWORD_REQUIRED MBEDTLS_ERR_PK_PASSWORD_REQUIRED -POLARSSL_ERR_PK_SIG_LEN_MISMATCH MBEDTLS_ERR_PK_SIG_LEN_MISMATCH -POLARSSL_ERR_PK_TYPE_MISMATCH MBEDTLS_ERR_PK_TYPE_MISMATCH -POLARSSL_ERR_PK_UNKNOWN_NAMED_CURVE MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -POLARSSL_ERR_PK_UNKNOWN_PK_ALG MBEDTLS_ERR_PK_UNKNOWN_PK_ALG -POLARSSL_ERR_RIPEMD160_FILE_IO_ERROR MBEDTLS_ERR_RIPEMD160_FILE_IO_ERROR -POLARSSL_ERR_RSA_BAD_INPUT_DATA MBEDTLS_ERR_RSA_BAD_INPUT_DATA -POLARSSL_ERR_RSA_INVALID_PADDING MBEDTLS_ERR_RSA_INVALID_PADDING -POLARSSL_ERR_RSA_KEY_CHECK_FAILED MBEDTLS_ERR_RSA_KEY_CHECK_FAILED -POLARSSL_ERR_RSA_KEY_GEN_FAILED MBEDTLS_ERR_RSA_KEY_GEN_FAILED -POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE -POLARSSL_ERR_RSA_PRIVATE_FAILED MBEDTLS_ERR_RSA_PRIVATE_FAILED -POLARSSL_ERR_RSA_PUBLIC_FAILED MBEDTLS_ERR_RSA_PUBLIC_FAILED -POLARSSL_ERR_RSA_RNG_FAILED MBEDTLS_ERR_RSA_RNG_FAILED -POLARSSL_ERR_RSA_VERIFY_FAILED MBEDTLS_ERR_RSA_VERIFY_FAILED -POLARSSL_ERR_SHA1_FILE_IO_ERROR MBEDTLS_ERR_SHA1_FILE_IO_ERROR -POLARSSL_ERR_SHA256_FILE_IO_ERROR MBEDTLS_ERR_SHA256_FILE_IO_ERROR -POLARSSL_ERR_SHA512_FILE_IO_ERROR MBEDTLS_ERR_SHA512_FILE_IO_ERROR -POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE -POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST -POLARSSL_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY -POLARSSL_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC -POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO -POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE -POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS -POLARSSL_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP -POLARSSL_ERR_SSL_BAD_HS_FINISHED MBEDTLS_ERR_SSL_BAD_HS_FINISHED -POLARSSL_ERR_SSL_BAD_HS_NEW_SESSION_TICKET MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET -POLARSSL_ERR_SSL_BAD_HS_PROTOCOL_VERSION MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION -POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO -POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO_DONE MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO_DONE -POLARSSL_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE -POLARSSL_ERR_SSL_BAD_INPUT_DATA MBEDTLS_ERR_SSL_BAD_INPUT_DATA -POLARSSL_ERR_SSL_BUFFER_TOO_SMALL MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL -POLARSSL_ERR_SSL_CA_CHAIN_REQUIRED MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED -POLARSSL_ERR_SSL_CERTIFICATE_REQUIRED MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED -POLARSSL_ERR_SSL_CERTIFICATE_TOO_LARGE MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE -POLARSSL_ERR_SSL_COMPRESSION_FAILED MBEDTLS_ERR_SSL_COMPRESSION_FAILED -POLARSSL_ERR_SSL_CONN_EOF MBEDTLS_ERR_SSL_CONN_EOF -POLARSSL_ERR_SSL_COUNTER_WRAPPING MBEDTLS_ERR_SSL_COUNTER_WRAPPING -POLARSSL_ERR_SSL_FATAL_ALERT_MESSAGE MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE -POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE -POLARSSL_ERR_SSL_HELLO_VERIFY_REQUIRED MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED -POLARSSL_ERR_SSL_HW_ACCEL_FAILED MBEDTLS_ERR_SSL_HW_ACCEL_FAILED -POLARSSL_ERR_SSL_HW_ACCEL_FALLTHROUGH MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH -POLARSSL_ERR_SSL_INTERNAL_ERROR MBEDTLS_ERR_SSL_INTERNAL_ERROR -POLARSSL_ERR_SSL_INVALID_MAC MBEDTLS_ERR_SSL_INVALID_MAC -POLARSSL_ERR_SSL_INVALID_RECORD MBEDTLS_ERR_SSL_INVALID_RECORD -POLARSSL_ERR_SSL_MALLOC_FAILED MBEDTLS_ERR_SSL_ALLOC_FAILED -POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN -POLARSSL_ERR_SSL_NO_CLIENT_CERTIFICATE MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE -POLARSSL_ERR_SSL_NO_RNG MBEDTLS_ERR_SSL_NO_RNG -POLARSSL_ERR_SSL_NO_USABLE_CIPHERSUITE MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE -POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY -POLARSSL_ERR_SSL_PEER_VERIFY_FAILED MBEDTLS_ERR_SSL_PEER_VERIFY_FAILED -POLARSSL_ERR_SSL_PK_TYPE_MISMATCH MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH -POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED -POLARSSL_ERR_SSL_SESSION_TICKET_EXPIRED MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED -POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE -POLARSSL_ERR_SSL_UNKNOWN_CIPHER MBEDTLS_ERR_SSL_UNKNOWN_CIPHER -POLARSSL_ERR_SSL_UNKNOWN_IDENTITY MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY -POLARSSL_ERR_SSL_WAITING_SERVER_HELLO_RENEGO MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO -POLARSSL_ERR_THREADING_BAD_INPUT_DATA MBEDTLS_ERR_THREADING_BAD_INPUT_DATA -POLARSSL_ERR_THREADING_FEATURE_UNAVAILABLE MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE -POLARSSL_ERR_THREADING_MUTEX_ERROR MBEDTLS_ERR_THREADING_MUTEX_ERROR -POLARSSL_ERR_X509_BAD_INPUT_DATA MBEDTLS_ERR_X509_BAD_INPUT_DATA -POLARSSL_ERR_X509_CERT_UNKNOWN_FORMAT MBEDTLS_ERR_X509_CERT_UNKNOWN_FORMAT -POLARSSL_ERR_X509_CERT_VERIFY_FAILED MBEDTLS_ERR_X509_CERT_VERIFY_FAILED -POLARSSL_ERR_X509_FEATURE_UNAVAILABLE MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE -POLARSSL_ERR_X509_FILE_IO_ERROR MBEDTLS_ERR_X509_FILE_IO_ERROR -POLARSSL_ERR_X509_INVALID_ALG MBEDTLS_ERR_X509_INVALID_ALG -POLARSSL_ERR_X509_INVALID_DATE MBEDTLS_ERR_X509_INVALID_DATE -POLARSSL_ERR_X509_INVALID_EXTENSIONS MBEDTLS_ERR_X509_INVALID_EXTENSIONS -POLARSSL_ERR_X509_INVALID_FORMAT MBEDTLS_ERR_X509_INVALID_FORMAT -POLARSSL_ERR_X509_INVALID_NAME MBEDTLS_ERR_X509_INVALID_NAME -POLARSSL_ERR_X509_INVALID_SERIAL MBEDTLS_ERR_X509_INVALID_SERIAL -POLARSSL_ERR_X509_INVALID_SIGNATURE MBEDTLS_ERR_X509_INVALID_SIGNATURE -POLARSSL_ERR_X509_INVALID_VERSION MBEDTLS_ERR_X509_INVALID_VERSION -POLARSSL_ERR_X509_MALLOC_FAILED MBEDTLS_ERR_X509_ALLOC_FAILED -POLARSSL_ERR_X509_SIG_MISMATCH MBEDTLS_ERR_X509_SIG_MISMATCH -POLARSSL_ERR_X509_UNKNOWN_OID MBEDTLS_ERR_X509_UNKNOWN_OID -POLARSSL_ERR_X509_UNKNOWN_SIG_ALG MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG -POLARSSL_ERR_X509_UNKNOWN_VERSION MBEDTLS_ERR_X509_UNKNOWN_VERSION -POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH -POLARSSL_FS_IO MBEDTLS_FS_IO -POLARSSL_GCM_C MBEDTLS_GCM_C -POLARSSL_GCM_H MBEDTLS_GCM_H -POLARSSL_GENPRIME MBEDTLS_GENPRIME -POLARSSL_HAVEGE_C MBEDTLS_HAVEGE_C -POLARSSL_HAVEGE_H MBEDTLS_HAVEGE_H -POLARSSL_HAVE_ASM MBEDTLS_HAVE_ASM -POLARSSL_HAVE_INT16 MBEDTLS_HAVE_INT16 -POLARSSL_HAVE_INT32 MBEDTLS_HAVE_INT32 -POLARSSL_HAVE_INT64 MBEDTLS_HAVE_INT64 -POLARSSL_HAVE_INT8 MBEDTLS_HAVE_INT8 -POLARSSL_HAVE_IPV6 MBEDTLS_HAVE_IPV6 -POLARSSL_HAVE_LONGLONG MBEDTLS_HAVE_LONGLONG -POLARSSL_HAVE_SSE2 MBEDTLS_HAVE_SSE2 -POLARSSL_HAVE_TIME MBEDTLS_HAVE_TIME -POLARSSL_HAVE_UDBL MBEDTLS_HAVE_UDBL -POLARSSL_HAVE_X86 MBEDTLS_HAVE_X86 -POLARSSL_HAVE_X86_64 MBEDTLS_HAVE_X86_64 -POLARSSL_HMAC_DRBG_C MBEDTLS_HMAC_DRBG_C -POLARSSL_HMAC_DRBG_H MBEDTLS_HMAC_DRBG_H -POLARSSL_HMAC_DRBG_MAX_INPUT MBEDTLS_HMAC_DRBG_MAX_INPUT -POLARSSL_HMAC_DRBG_MAX_REQUEST MBEDTLS_HMAC_DRBG_MAX_REQUEST -POLARSSL_HMAC_DRBG_MAX_SEED_INPUT MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT -POLARSSL_HMAC_DRBG_PR_OFF MBEDTLS_HMAC_DRBG_PR_OFF -POLARSSL_HMAC_DRBG_PR_ON MBEDTLS_HMAC_DRBG_PR_ON -POLARSSL_HMAC_DRBG_RESEED_INTERVAL MBEDTLS_HMAC_DRBG_RESEED_INTERVAL -POLARSSL_KEY_EXCHANGE_DHE_PSK MBEDTLS_KEY_EXCHANGE_DHE_PSK -POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED -POLARSSL_KEY_EXCHANGE_DHE_RSA MBEDTLS_KEY_EXCHANGE_DHE_RSA -POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED -POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA -POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -POLARSSL_KEY_EXCHANGE_ECDHE_PSK MBEDTLS_KEY_EXCHANGE_ECDHE_PSK -POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -POLARSSL_KEY_EXCHANGE_ECDHE_RSA MBEDTLS_KEY_EXCHANGE_ECDHE_RSA -POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED -POLARSSL_KEY_EXCHANGE_ECDH_ECDSA MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA -POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -POLARSSL_KEY_EXCHANGE_ECDH_RSA MBEDTLS_KEY_EXCHANGE_ECDH_RSA -POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -POLARSSL_KEY_EXCHANGE_NONE MBEDTLS_KEY_EXCHANGE_NONE -POLARSSL_KEY_EXCHANGE_PSK MBEDTLS_KEY_EXCHANGE_PSK -POLARSSL_KEY_EXCHANGE_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_PSK_ENABLED -POLARSSL_KEY_EXCHANGE_RSA MBEDTLS_KEY_EXCHANGE_RSA -POLARSSL_KEY_EXCHANGE_RSA_ENABLED MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -POLARSSL_KEY_EXCHANGE_RSA_PSK MBEDTLS_KEY_EXCHANGE_RSA_PSK -POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -POLARSSL_KEY_EXCHANGE__SOME__ECDHE_ENABLED MBEDTLS_KEY_EXCHANGE__SOME__ECDHE_ENABLED -POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED -POLARSSL_KEY_EXCHANGE__WITH_CERT__ENABLED MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED -POLARSSL_KEY_LENGTH_DES MBEDTLS_KEY_LENGTH_DES -POLARSSL_KEY_LENGTH_DES_EDE MBEDTLS_KEY_LENGTH_DES_EDE -POLARSSL_KEY_LENGTH_DES_EDE3 MBEDTLS_KEY_LENGTH_DES_EDE3 -POLARSSL_KEY_LENGTH_NONE MBEDTLS_KEY_LENGTH_NONE -POLARSSL_MAX_BLOCK_LENGTH MBEDTLS_MAX_BLOCK_LENGTH -POLARSSL_MAX_IV_LENGTH MBEDTLS_MAX_IV_LENGTH -POLARSSL_MD2_ALT MBEDTLS_MD2_ALT -POLARSSL_MD2_C MBEDTLS_MD2_C -POLARSSL_MD2_H MBEDTLS_MD2_H -POLARSSL_MD4_ALT MBEDTLS_MD4_ALT -POLARSSL_MD4_C MBEDTLS_MD4_C -POLARSSL_MD4_H MBEDTLS_MD4_H -POLARSSL_MD5_ALT MBEDTLS_MD5_ALT -POLARSSL_MD5_C MBEDTLS_MD5_C -POLARSSL_MD5_H MBEDTLS_MD5_H -POLARSSL_MD_C MBEDTLS_MD_C -POLARSSL_MD_H MBEDTLS_MD_H -POLARSSL_MD_MAX_SIZE MBEDTLS_MD_MAX_SIZE -POLARSSL_MD_MD2 MBEDTLS_MD_MD2 -POLARSSL_MD_MD4 MBEDTLS_MD_MD4 -POLARSSL_MD_MD5 MBEDTLS_MD_MD5 -POLARSSL_MD_NONE MBEDTLS_MD_NONE -POLARSSL_MD_RIPEMD160 MBEDTLS_MD_RIPEMD160 -POLARSSL_MD_SHA1 MBEDTLS_MD_SHA1 -POLARSSL_MD_SHA224 MBEDTLS_MD_SHA224 -POLARSSL_MD_SHA256 MBEDTLS_MD_SHA256 -POLARSSL_MD_SHA384 MBEDTLS_MD_SHA384 -POLARSSL_MD_SHA512 MBEDTLS_MD_SHA512 -POLARSSL_MD_WRAP_H MBEDTLS_MD_WRAP_H -POLARSSL_MEMORY_ALIGN_MULTIPLE MBEDTLS_MEMORY_ALIGN_MULTIPLE -POLARSSL_MEMORY_BACKTRACE MBEDTLS_MEMORY_BACKTRACE -POLARSSL_MEMORY_BUFFER_ALLOC_C MBEDTLS_MEMORY_BUFFER_ALLOC_C -POLARSSL_MEMORY_BUFFER_ALLOC_H MBEDTLS_MEMORY_BUFFER_ALLOC_H -POLARSSL_MEMORY_C MBEDTLS_MEMORY_C -POLARSSL_MEMORY_DEBUG MBEDTLS_MEMORY_DEBUG -POLARSSL_MEMORY_H MBEDTLS_MEMORY_H -POLARSSL_MODE_CBC MBEDTLS_MODE_CBC -POLARSSL_MODE_CCM MBEDTLS_MODE_CCM -POLARSSL_MODE_CFB MBEDTLS_MODE_CFB -POLARSSL_MODE_CTR MBEDTLS_MODE_CTR -POLARSSL_MODE_ECB MBEDTLS_MODE_ECB -POLARSSL_MODE_GCM MBEDTLS_MODE_GCM -POLARSSL_MODE_NONE MBEDTLS_MODE_NONE -POLARSSL_MODE_OFB MBEDTLS_MODE_OFB -POLARSSL_MODE_STREAM MBEDTLS_MODE_STREAM -POLARSSL_MPI_MAX_BITS MBEDTLS_MPI_MAX_BITS -POLARSSL_MPI_MAX_BITS_SCALE100 MBEDTLS_MPI_MAX_BITS_SCALE100 -POLARSSL_MPI_MAX_LIMBS MBEDTLS_MPI_MAX_LIMBS -POLARSSL_MPI_MAX_SIZE MBEDTLS_MPI_MAX_SIZE -POLARSSL_MPI_RW_BUFFER_SIZE MBEDTLS_MPI_RW_BUFFER_SIZE -POLARSSL_MPI_WINDOW_SIZE MBEDTLS_MPI_WINDOW_SIZE -POLARSSL_NET_C MBEDTLS_NET_C -POLARSSL_NET_H MBEDTLS_NET_H -POLARSSL_NET_LISTEN_BACKLOG MBEDTLS_NET_LISTEN_BACKLOG -POLARSSL_NO_DEFAULT_ENTROPY_SOURCES MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -POLARSSL_NO_PLATFORM_ENTROPY MBEDTLS_NO_PLATFORM_ENTROPY -POLARSSL_OID_C MBEDTLS_OID_C -POLARSSL_OID_H MBEDTLS_OID_H -POLARSSL_OPERATION_NONE MBEDTLS_OPERATION_NONE -POLARSSL_PADDING_NONE MBEDTLS_PADDING_NONE -POLARSSL_PADDING_ONE_AND_ZEROS MBEDTLS_PADDING_ONE_AND_ZEROS -POLARSSL_PADDING_PKCS7 MBEDTLS_PADDING_PKCS7 -POLARSSL_PADDING_ZEROS MBEDTLS_PADDING_ZEROS -POLARSSL_PADDING_ZEROS_AND_LEN MBEDTLS_PADDING_ZEROS_AND_LEN -POLARSSL_PADLOCK_C MBEDTLS_PADLOCK_C -POLARSSL_PADLOCK_H MBEDTLS_PADLOCK_H -POLARSSL_PBKDF2_C MBEDTLS_PBKDF2_C -POLARSSL_PBKDF2_H MBEDTLS_PBKDF2_H -POLARSSL_PEM_H MBEDTLS_PEM_H -POLARSSL_PEM_PARSE_C MBEDTLS_PEM_PARSE_C -POLARSSL_PEM_WRITE_C MBEDTLS_PEM_WRITE_C -POLARSSL_PKCS11_C MBEDTLS_PKCS11_C -POLARSSL_PKCS11_H MBEDTLS_PKCS11_H -POLARSSL_PKCS12_C MBEDTLS_PKCS12_C -POLARSSL_PKCS12_H MBEDTLS_PKCS12_H -POLARSSL_PKCS1_V15 MBEDTLS_PKCS1_V15 -POLARSSL_PKCS1_V21 MBEDTLS_PKCS1_V21 -POLARSSL_PKCS5_C MBEDTLS_PKCS5_C -POLARSSL_PKCS5_H MBEDTLS_PKCS5_H -POLARSSL_PK_C MBEDTLS_PK_C -POLARSSL_PK_DEBUG_ECP MBEDTLS_PK_DEBUG_ECP -POLARSSL_PK_DEBUG_MAX_ITEMS MBEDTLS_PK_DEBUG_MAX_ITEMS -POLARSSL_PK_DEBUG_MPI MBEDTLS_PK_DEBUG_MPI -POLARSSL_PK_DEBUG_NONE MBEDTLS_PK_DEBUG_NONE -POLARSSL_PK_ECDSA MBEDTLS_PK_ECDSA -POLARSSL_PK_ECKEY MBEDTLS_PK_ECKEY -POLARSSL_PK_ECKEY_DH MBEDTLS_PK_ECKEY_DH -POLARSSL_PK_H MBEDTLS_PK_H -POLARSSL_PK_NONE MBEDTLS_PK_NONE -POLARSSL_PK_PARSE_C MBEDTLS_PK_PARSE_C -POLARSSL_PK_PARSE_EC_EXTENDED MBEDTLS_PK_PARSE_EC_EXTENDED -POLARSSL_PK_RSA MBEDTLS_PK_RSA -POLARSSL_PK_RSASSA_PSS MBEDTLS_PK_RSASSA_PSS -POLARSSL_PK_RSA_ALT MBEDTLS_PK_RSA_ALT -POLARSSL_PK_WRAP_H MBEDTLS_PK_WRAP_H -POLARSSL_PK_WRITE_C MBEDTLS_PK_WRITE_C -POLARSSL_PLATFORM_C MBEDTLS_PLATFORM_C -POLARSSL_PLATFORM_EXIT_ALT MBEDTLS_PLATFORM_EXIT_ALT -POLARSSL_PLATFORM_EXIT_MACRO MBEDTLS_PLATFORM_EXIT_MACRO -POLARSSL_PLATFORM_FPRINTF_ALT MBEDTLS_PLATFORM_FPRINTF_ALT -POLARSSL_PLATFORM_FPRINTF_MACRO MBEDTLS_PLATFORM_FPRINTF_MACRO -POLARSSL_PLATFORM_FREE_MACRO MBEDTLS_PLATFORM_FREE_MACRO -POLARSSL_PLATFORM_H MBEDTLS_PLATFORM_H -POLARSSL_PLATFORM_MALLOC_MACRO MBEDTLS_PLATFORM_ALLOC_MACRO -POLARSSL_PLATFORM_MEMORY MBEDTLS_PLATFORM_MEMORY -POLARSSL_PLATFORM_NO_STD_FUNCTIONS MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -POLARSSL_PLATFORM_PRINTF_ALT MBEDTLS_PLATFORM_PRINTF_ALT -POLARSSL_PLATFORM_PRINTF_MACRO MBEDTLS_PLATFORM_PRINTF_MACRO -POLARSSL_PLATFORM_SNPRINTF_ALT MBEDTLS_PLATFORM_SNPRINTF_ALT -POLARSSL_PLATFORM_SNPRINTF_MACRO MBEDTLS_PLATFORM_SNPRINTF_MACRO -POLARSSL_PLATFORM_STD_EXIT MBEDTLS_PLATFORM_STD_EXIT -POLARSSL_PLATFORM_STD_FPRINTF MBEDTLS_PLATFORM_STD_FPRINTF -POLARSSL_PLATFORM_STD_FREE MBEDTLS_PLATFORM_STD_FREE -POLARSSL_PLATFORM_STD_MALLOC MBEDTLS_PLATFORM_STD_CALLOC -POLARSSL_PLATFORM_STD_MEM_HDR MBEDTLS_PLATFORM_STD_MEM_HDR -POLARSSL_PLATFORM_STD_PRINTF MBEDTLS_PLATFORM_STD_PRINTF -POLARSSL_PLATFORM_STD_SNPRINTF MBEDTLS_PLATFORM_STD_SNPRINTF -POLARSSL_PREMASTER_SIZE MBEDTLS_PREMASTER_SIZE -POLARSSL_PSK_MAX_LEN MBEDTLS_PSK_MAX_LEN -POLARSSL_REMOVE_ARC4_CIPHERSUITES MBEDTLS_REMOVE_ARC4_CIPHERSUITES -POLARSSL_RIPEMD160_ALT MBEDTLS_RIPEMD160_ALT -POLARSSL_RIPEMD160_C MBEDTLS_RIPEMD160_C -POLARSSL_RIPEMD160_H MBEDTLS_RIPEMD160_H -POLARSSL_RSA_C MBEDTLS_RSA_C -POLARSSL_RSA_H MBEDTLS_RSA_H -POLARSSL_RSA_NO_CRT MBEDTLS_RSA_NO_CRT -POLARSSL_SELF_TEST MBEDTLS_SELF_TEST -POLARSSL_SHA1_ALT MBEDTLS_SHA1_ALT -POLARSSL_SHA1_C MBEDTLS_SHA1_C -POLARSSL_SHA1_H MBEDTLS_SHA1_H -POLARSSL_SHA256_ALT MBEDTLS_SHA256_ALT -POLARSSL_SHA256_C MBEDTLS_SHA256_C -POLARSSL_SHA256_H MBEDTLS_SHA256_H -POLARSSL_SHA512_ALT MBEDTLS_SHA512_ALT -POLARSSL_SHA512_C MBEDTLS_SHA512_C -POLARSSL_SHA512_H MBEDTLS_SHA512_H -POLARSSL_SSL_AEAD_RANDOM_IV MBEDTLS_SSL_AEAD_RANDOM_IV -POLARSSL_SSL_ALERT_MESSAGES MBEDTLS_SSL_ALERT_MESSAGES -POLARSSL_SSL_ALPN MBEDTLS_SSL_ALPN -POLARSSL_SSL_CACHE_C MBEDTLS_SSL_CACHE_C -POLARSSL_SSL_CACHE_H MBEDTLS_SSL_CACHE_H -POLARSSL_SSL_CBC_RECORD_SPLITTING MBEDTLS_SSL_CBC_RECORD_SPLITTING -POLARSSL_SSL_CIPHERSUITES_H MBEDTLS_SSL_CIPHERSUITES_H -POLARSSL_SSL_CLI_C MBEDTLS_SSL_CLI_C -POLARSSL_SSL_COOKIE_C MBEDTLS_SSL_COOKIE_C -POLARSSL_SSL_COOKIE_H MBEDTLS_SSL_COOKIE_H -POLARSSL_SSL_COOKIE_TIMEOUT MBEDTLS_SSL_COOKIE_TIMEOUT -POLARSSL_SSL_DEBUG_ALL MBEDTLS_SSL_DEBUG_ALL -POLARSSL_SSL_DISABLE_RENEGOTIATION MBEDTLS_SSL_DISABLE_RENEGOTIATION -POLARSSL_SSL_DTLS_ANTI_REPLAY MBEDTLS_SSL_DTLS_ANTI_REPLAY -POLARSSL_SSL_DTLS_BADMAC_LIMIT MBEDTLS_SSL_DTLS_BADMAC_LIMIT -POLARSSL_SSL_DTLS_HELLO_VERIFY MBEDTLS_SSL_DTLS_HELLO_VERIFY -POLARSSL_SSL_ENCRYPT_THEN_MAC MBEDTLS_SSL_ENCRYPT_THEN_MAC -POLARSSL_SSL_EXTENDED_MASTER_SECRET MBEDTLS_SSL_EXTENDED_MASTER_SECRET -POLARSSL_SSL_FALLBACK_SCSV MBEDTLS_SSL_FALLBACK_SCSV -POLARSSL_SSL_H MBEDTLS_SSL_H -POLARSSL_SSL_HW_RECORD_ACCEL MBEDTLS_SSL_HW_RECORD_ACCEL -POLARSSL_SSL_MAX_FRAGMENT_LENGTH MBEDTLS_SSL_MAX_FRAGMENT_LENGTH -POLARSSL_SSL_PROTO_DTLS MBEDTLS_SSL_PROTO_DTLS -POLARSSL_SSL_PROTO_SSL3 MBEDTLS_SSL_PROTO_SSL3 -POLARSSL_SSL_PROTO_TLS1 MBEDTLS_SSL_PROTO_TLS1 -POLARSSL_SSL_PROTO_TLS1_1 MBEDTLS_SSL_PROTO_TLS1_1 -POLARSSL_SSL_PROTO_TLS1_2 MBEDTLS_SSL_PROTO_TLS1_2 -POLARSSL_SSL_RENEGOTIATION MBEDTLS_SSL_RENEGOTIATION -POLARSSL_SSL_SERVER_NAME_INDICATION MBEDTLS_SSL_SERVER_NAME_INDICATION -POLARSSL_SSL_SESSION_TICKETS MBEDTLS_SSL_SESSION_TICKETS -POLARSSL_SSL_SRV_C MBEDTLS_SSL_SRV_C -POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE -POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -POLARSSL_SSL_TLS_C MBEDTLS_SSL_TLS_C -POLARSSL_SSL_TRUNCATED_HMAC MBEDTLS_SSL_TRUNCATED_HMAC -POLARSSL_THREADING_ALT MBEDTLS_THREADING_ALT -POLARSSL_THREADING_C MBEDTLS_THREADING_C -POLARSSL_THREADING_H MBEDTLS_THREADING_H -POLARSSL_THREADING_IMPL MBEDTLS_THREADING_IMPL -POLARSSL_THREADING_PTHREAD MBEDTLS_THREADING_PTHREAD -POLARSSL_TIMING_ALT MBEDTLS_TIMING_ALT -POLARSSL_TIMING_C MBEDTLS_TIMING_C -POLARSSL_TIMING_H MBEDTLS_TIMING_H -POLARSSL_VERSION_C MBEDTLS_VERSION_C -POLARSSL_VERSION_FEATURES MBEDTLS_VERSION_FEATURES -POLARSSL_VERSION_H MBEDTLS_VERSION_H -POLARSSL_VERSION_MAJOR MBEDTLS_VERSION_MAJOR -POLARSSL_VERSION_MINOR MBEDTLS_VERSION_MINOR -POLARSSL_VERSION_NUMBER MBEDTLS_VERSION_NUMBER -POLARSSL_VERSION_PATCH MBEDTLS_VERSION_PATCH -POLARSSL_VERSION_STRING MBEDTLS_VERSION_STRING -POLARSSL_VERSION_STRING_FULL MBEDTLS_VERSION_STRING_FULL -POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION -POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE -POLARSSL_X509_CHECK_KEY_USAGE MBEDTLS_X509_CHECK_KEY_USAGE -POLARSSL_X509_CREATE_C MBEDTLS_X509_CREATE_C -POLARSSL_X509_CRL_H MBEDTLS_X509_CRL_H -POLARSSL_X509_CRL_PARSE_C MBEDTLS_X509_CRL_PARSE_C -POLARSSL_X509_CRT_H MBEDTLS_X509_CRT_H -POLARSSL_X509_CRT_PARSE_C MBEDTLS_X509_CRT_PARSE_C -POLARSSL_X509_CRT_WRITE_C MBEDTLS_X509_CRT_WRITE_C -POLARSSL_X509_CSR_H MBEDTLS_X509_CSR_H -POLARSSL_X509_CSR_PARSE_C MBEDTLS_X509_CSR_PARSE_C -POLARSSL_X509_CSR_WRITE_C MBEDTLS_X509_CSR_WRITE_C -POLARSSL_X509_H MBEDTLS_X509_H -POLARSSL_X509_MAX_INTERMEDIATE_CA MBEDTLS_X509_MAX_INTERMEDIATE_CA -POLARSSL_X509_RSASSA_PSS_SUPPORT MBEDTLS_X509_RSASSA_PSS_SUPPORT -POLARSSL_X509_USE_C MBEDTLS_X509_USE_C -POLARSSL_XTEA_ALT MBEDTLS_XTEA_ALT -POLARSSL_XTEA_C MBEDTLS_XTEA_C -POLARSSL_XTEA_H MBEDTLS_XTEA_H -POLARSSL_ZLIB_SUPPORT MBEDTLS_ZLIB_SUPPORT -RSA_CRYPT MBEDTLS_RSA_CRYPT -RSA_PKCS_V15 MBEDTLS_RSA_PKCS_V15 -RSA_PKCS_V21 MBEDTLS_RSA_PKCS_V21 -RSA_PRIVATE MBEDTLS_RSA_PRIVATE -RSA_PUBLIC MBEDTLS_RSA_PUBLIC -RSA_SALT_LEN_ANY MBEDTLS_RSA_SALT_LEN_ANY -RSA_SIGN MBEDTLS_RSA_SIGN -SSL_ALERT_LEVEL_FATAL MBEDTLS_SSL_ALERT_LEVEL_FATAL -SSL_ALERT_LEVEL_WARNING MBEDTLS_SSL_ALERT_LEVEL_WARNING -SSL_ALERT_MSG_ACCESS_DENIED MBEDTLS_SSL_ALERT_MSG_ACCESS_DENIED -SSL_ALERT_MSG_BAD_CERT MBEDTLS_SSL_ALERT_MSG_BAD_CERT -SSL_ALERT_MSG_BAD_RECORD_MAC MBEDTLS_SSL_ALERT_MSG_BAD_RECORD_MAC -SSL_ALERT_MSG_CERT_EXPIRED MBEDTLS_SSL_ALERT_MSG_CERT_EXPIRED -SSL_ALERT_MSG_CERT_REVOKED MBEDTLS_SSL_ALERT_MSG_CERT_REVOKED -SSL_ALERT_MSG_CERT_UNKNOWN MBEDTLS_SSL_ALERT_MSG_CERT_UNKNOWN -SSL_ALERT_MSG_CLOSE_NOTIFY MBEDTLS_SSL_ALERT_MSG_CLOSE_NOTIFY -SSL_ALERT_MSG_DECODE_ERROR MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR -SSL_ALERT_MSG_DECOMPRESSION_FAILURE MBEDTLS_SSL_ALERT_MSG_DECOMPRESSION_FAILURE -SSL_ALERT_MSG_DECRYPTION_FAILED MBEDTLS_SSL_ALERT_MSG_DECRYPTION_FAILED -SSL_ALERT_MSG_DECRYPT_ERROR MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR -SSL_ALERT_MSG_EXPORT_RESTRICTION MBEDTLS_SSL_ALERT_MSG_EXPORT_RESTRICTION -SSL_ALERT_MSG_HANDSHAKE_FAILURE MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE -SSL_ALERT_MSG_ILLEGAL_PARAMETER MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER -SSL_ALERT_MSG_INAPROPRIATE_FALLBACK MBEDTLS_SSL_ALERT_MSG_INAPROPRIATE_FALLBACK -SSL_ALERT_MSG_INSUFFICIENT_SECURITY MBEDTLS_SSL_ALERT_MSG_INSUFFICIENT_SECURITY -SSL_ALERT_MSG_INTERNAL_ERROR MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR -SSL_ALERT_MSG_NO_APPLICATION_PROTOCOL MBEDTLS_SSL_ALERT_MSG_NO_APPLICATION_PROTOCOL -SSL_ALERT_MSG_NO_CERT MBEDTLS_SSL_ALERT_MSG_NO_CERT -SSL_ALERT_MSG_NO_RENEGOTIATION MBEDTLS_SSL_ALERT_MSG_NO_RENEGOTIATION -SSL_ALERT_MSG_PROTOCOL_VERSION MBEDTLS_SSL_ALERT_MSG_PROTOCOL_VERSION -SSL_ALERT_MSG_RECORD_OVERFLOW MBEDTLS_SSL_ALERT_MSG_RECORD_OVERFLOW -SSL_ALERT_MSG_UNEXPECTED_MESSAGE MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE -SSL_ALERT_MSG_UNKNOWN_CA MBEDTLS_SSL_ALERT_MSG_UNKNOWN_CA -SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY MBEDTLS_SSL_ALERT_MSG_UNKNOWN_PSK_IDENTITY -SSL_ALERT_MSG_UNRECOGNIZED_NAME MBEDTLS_SSL_ALERT_MSG_UNRECOGNIZED_NAME -SSL_ALERT_MSG_UNSUPPORTED_CERT MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_CERT -SSL_ALERT_MSG_UNSUPPORTED_EXT MBEDTLS_SSL_ALERT_MSG_UNSUPPORTED_EXT -SSL_ALERT_MSG_USER_CANCELED MBEDTLS_SSL_ALERT_MSG_USER_CANCELED -SSL_ANTI_REPLAY_DISABLED MBEDTLS_SSL_ANTI_REPLAY_DISABLED -SSL_ANTI_REPLAY_ENABLED MBEDTLS_SSL_ANTI_REPLAY_ENABLED -SSL_ARC4_DISABLED MBEDTLS_SSL_ARC4_DISABLED -SSL_ARC4_ENABLED MBEDTLS_SSL_ARC4_ENABLED -SSL_BUFFER_LEN MBEDTLS_SSL_BUFFER_LEN -SSL_CACHE_DEFAULT_MAX_ENTRIES MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES -SSL_CACHE_DEFAULT_TIMEOUT MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT -SSL_CBC_RECORD_SPLITTING_DISABLED MBEDTLS_SSL_CBC_RECORD_SPLITTING_DISABLED -SSL_CBC_RECORD_SPLITTING_ENABLED MBEDTLS_SSL_CBC_RECORD_SPLITTING_ENABLED -SSL_CERTIFICATE_REQUEST MBEDTLS_SSL_CERTIFICATE_REQUEST -SSL_CERTIFICATE_VERIFY MBEDTLS_SSL_CERTIFICATE_VERIFY -SSL_CERT_TYPE_ECDSA_SIGN MBEDTLS_SSL_CERT_TYPE_ECDSA_SIGN -SSL_CERT_TYPE_RSA_SIGN MBEDTLS_SSL_CERT_TYPE_RSA_SIGN -SSL_CHANNEL_INBOUND MBEDTLS_SSL_CHANNEL_INBOUND -SSL_CHANNEL_OUTBOUND MBEDTLS_SSL_CHANNEL_OUTBOUND -SSL_CIPHERSUITES MBEDTLS_SSL_CIPHERSUITES -SSL_CLIENT_CERTIFICATE MBEDTLS_SSL_CLIENT_CERTIFICATE -SSL_CLIENT_CHANGE_CIPHER_SPEC MBEDTLS_SSL_CLIENT_CHANGE_CIPHER_SPEC -SSL_CLIENT_FINISHED MBEDTLS_SSL_CLIENT_FINISHED -SSL_CLIENT_HELLO MBEDTLS_SSL_CLIENT_HELLO -SSL_CLIENT_KEY_EXCHANGE MBEDTLS_SSL_CLIENT_KEY_EXCHANGE -SSL_COMPRESSION_ADD MBEDTLS_SSL_COMPRESSION_ADD -SSL_COMPRESS_DEFLATE MBEDTLS_SSL_COMPRESS_DEFLATE -SSL_COMPRESS_NULL MBEDTLS_SSL_COMPRESS_NULL -SSL_DEBUG_BUF MBEDTLS_SSL_DEBUG_BUF -SSL_DEBUG_CRT MBEDTLS_SSL_DEBUG_CRT -SSL_DEBUG_ECP MBEDTLS_SSL_DEBUG_ECP -SSL_DEBUG_MPI MBEDTLS_SSL_DEBUG_MPI -SSL_DEBUG_MSG MBEDTLS_SSL_DEBUG_MSG -SSL_DEBUG_RET MBEDTLS_SSL_DEBUG_RET -SSL_DEFAULT_TICKET_LIFETIME MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME -SSL_DTLS_TIMEOUT_DFL_MAX MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MAX -SSL_DTLS_TIMEOUT_DFL_MIN MBEDTLS_SSL_DTLS_TIMEOUT_DFL_MIN -SSL_EMPTY_RENEGOTIATION_INFO MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO -SSL_ETM_DISABLED MBEDTLS_SSL_ETM_DISABLED -SSL_ETM_ENABLED MBEDTLS_SSL_ETM_ENABLED -SSL_EXTENDED_MS_DISABLED MBEDTLS_SSL_EXTENDED_MS_DISABLED -SSL_EXTENDED_MS_ENABLED MBEDTLS_SSL_EXTENDED_MS_ENABLED -SSL_FALLBACK_SCSV MBEDTLS_SSL_FALLBACK_SCSV -SSL_FLUSH_BUFFERS MBEDTLS_SSL_FLUSH_BUFFERS -SSL_HANDSHAKE_OVER MBEDTLS_SSL_HANDSHAKE_OVER -SSL_HANDSHAKE_WRAPUP MBEDTLS_SSL_HANDSHAKE_WRAPUP -SSL_HASH_MD5 MBEDTLS_SSL_HASH_MD5 -SSL_HASH_NONE MBEDTLS_SSL_HASH_NONE -SSL_HASH_SHA1 MBEDTLS_SSL_HASH_SHA1 -SSL_HASH_SHA224 MBEDTLS_SSL_HASH_SHA224 -SSL_HASH_SHA256 MBEDTLS_SSL_HASH_SHA256 -SSL_HASH_SHA384 MBEDTLS_SSL_HASH_SHA384 -SSL_HASH_SHA512 MBEDTLS_SSL_HASH_SHA512 -SSL_HELLO_REQUEST MBEDTLS_SSL_HELLO_REQUEST -SSL_HS_CERTIFICATE MBEDTLS_SSL_HS_CERTIFICATE -SSL_HS_CERTIFICATE_REQUEST MBEDTLS_SSL_HS_CERTIFICATE_REQUEST -SSL_HS_CERTIFICATE_VERIFY MBEDTLS_SSL_HS_CERTIFICATE_VERIFY -SSL_HS_CLIENT_HELLO MBEDTLS_SSL_HS_CLIENT_HELLO -SSL_HS_CLIENT_KEY_EXCHANGE MBEDTLS_SSL_HS_CLIENT_KEY_EXCHANGE -SSL_HS_FINISHED MBEDTLS_SSL_HS_FINISHED -SSL_HS_HELLO_REQUEST MBEDTLS_SSL_HS_HELLO_REQUEST -SSL_HS_HELLO_VERIFY_REQUEST MBEDTLS_SSL_HS_HELLO_VERIFY_REQUEST -SSL_HS_NEW_SESSION_TICKET MBEDTLS_SSL_HS_NEW_SESSION_TICKET -SSL_HS_SERVER_HELLO MBEDTLS_SSL_HS_SERVER_HELLO -SSL_HS_SERVER_HELLO_DONE MBEDTLS_SSL_HS_SERVER_HELLO_DONE -SSL_HS_SERVER_KEY_EXCHANGE MBEDTLS_SSL_HS_SERVER_KEY_EXCHANGE -SSL_INITIAL_HANDSHAKE MBEDTLS_SSL_INITIAL_HANDSHAKE -SSL_IS_CLIENT MBEDTLS_SSL_IS_CLIENT -SSL_IS_FALLBACK MBEDTLS_SSL_IS_FALLBACK -SSL_IS_NOT_FALLBACK MBEDTLS_SSL_IS_NOT_FALLBACK -SSL_IS_SERVER MBEDTLS_SSL_IS_SERVER -SSL_LEGACY_ALLOW_RENEGOTIATION MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION -SSL_LEGACY_BREAK_HANDSHAKE MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE -SSL_LEGACY_NO_RENEGOTIATION MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION -SSL_LEGACY_RENEGOTIATION MBEDTLS_SSL_LEGACY_RENEGOTIATION -SSL_MAC_ADD MBEDTLS_SSL_MAC_ADD -SSL_MAJOR_VERSION_3 MBEDTLS_SSL_MAJOR_VERSION_3 -SSL_MAX_CONTENT_LEN MBEDTLS_SSL_MAX_CONTENT_LEN -SSL_MAX_FRAG_LEN_1024 MBEDTLS_SSL_MAX_FRAG_LEN_1024 -SSL_MAX_FRAG_LEN_2048 MBEDTLS_SSL_MAX_FRAG_LEN_2048 -SSL_MAX_FRAG_LEN_4096 MBEDTLS_SSL_MAX_FRAG_LEN_4096 -SSL_MAX_FRAG_LEN_512 MBEDTLS_SSL_MAX_FRAG_LEN_512 -SSL_MAX_FRAG_LEN_INVALID MBEDTLS_SSL_MAX_FRAG_LEN_INVALID -SSL_MAX_FRAG_LEN_NONE MBEDTLS_SSL_MAX_FRAG_LEN_NONE -SSL_MAX_MAJOR_VERSION MBEDTLS_SSL_MAX_MAJOR_VERSION -SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MAX_MINOR_VERSION -SSL_MINOR_VERSION_0 MBEDTLS_SSL_MINOR_VERSION_0 -SSL_MINOR_VERSION_1 MBEDTLS_SSL_MINOR_VERSION_1 -SSL_MINOR_VERSION_2 MBEDTLS_SSL_MINOR_VERSION_2 -SSL_MINOR_VERSION_3 MBEDTLS_SSL_MINOR_VERSION_3 -SSL_MIN_MAJOR_VERSION MBEDTLS_SSL_MIN_MAJOR_VERSION -SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MIN_MINOR_VERSION -SSL_MSG_ALERT MBEDTLS_SSL_MSG_ALERT -SSL_MSG_APPLICATION_DATA MBEDTLS_SSL_MSG_APPLICATION_DATA -SSL_MSG_CHANGE_CIPHER_SPEC MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC -SSL_MSG_HANDSHAKE MBEDTLS_SSL_MSG_HANDSHAKE -SSL_PADDING_ADD MBEDTLS_SSL_PADDING_ADD -SSL_RENEGOTIATION MBEDTLS_SSL_RENEGOTIATION -SSL_RENEGOTIATION_DISABLED MBEDTLS_SSL_RENEGOTIATION_DISABLED -SSL_RENEGOTIATION_DONE MBEDTLS_SSL_RENEGOTIATION_DONE -SSL_RENEGOTIATION_ENABLED MBEDTLS_SSL_RENEGOTIATION_ENABLED -SSL_RENEGOTIATION_NOT_ENFORCED MBEDTLS_SSL_RENEGOTIATION_NOT_ENFORCED -SSL_RENEGOTIATION_PENDING MBEDTLS_SSL_RENEGOTIATION_PENDING -SSL_RENEGO_MAX_RECORDS_DEFAULT MBEDTLS_SSL_RENEGO_MAX_RECORDS_DEFAULT -SSL_RETRANS_FINISHED MBEDTLS_SSL_RETRANS_FINISHED -SSL_RETRANS_PREPARING MBEDTLS_SSL_RETRANS_PREPARING -SSL_RETRANS_SENDING MBEDTLS_SSL_RETRANS_SENDING -SSL_RETRANS_WAITING MBEDTLS_SSL_RETRANS_WAITING -SSL_SECURE_RENEGOTIATION MBEDTLS_SSL_SECURE_RENEGOTIATION -SSL_SERVER_CERTIFICATE MBEDTLS_SSL_SERVER_CERTIFICATE -SSL_SERVER_CHANGE_CIPHER_SPEC MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC -SSL_SERVER_FINISHED MBEDTLS_SSL_SERVER_FINISHED -SSL_SERVER_HELLO MBEDTLS_SSL_SERVER_HELLO -SSL_SERVER_HELLO_DONE MBEDTLS_SSL_SERVER_HELLO_DONE -SSL_SERVER_HELLO_VERIFY_REQUEST_SENT MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT -SSL_SERVER_KEY_EXCHANGE MBEDTLS_SSL_SERVER_KEY_EXCHANGE -SSL_SERVER_NEW_SESSION_TICKET MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET -SSL_SESSION_TICKETS_DISABLED MBEDTLS_SSL_SESSION_TICKETS_DISABLED -SSL_SESSION_TICKETS_ENABLED MBEDTLS_SSL_SESSION_TICKETS_ENABLED -SSL_SIG_ANON MBEDTLS_SSL_SIG_ANON -SSL_SIG_ECDSA MBEDTLS_SSL_SIG_ECDSA -SSL_SIG_RSA MBEDTLS_SSL_SIG_RSA -SSL_TRANSPORT_DATAGRAM MBEDTLS_SSL_TRANSPORT_DATAGRAM -SSL_TRANSPORT_STREAM MBEDTLS_SSL_TRANSPORT_STREAM -SSL_TRUNCATED_HMAC_LEN MBEDTLS_SSL_TRUNCATED_HMAC_LEN -SSL_TRUNC_HMAC_DISABLED MBEDTLS_SSL_TRUNC_HMAC_DISABLED -SSL_TRUNC_HMAC_ENABLED MBEDTLS_SSL_TRUNC_HMAC_ENABLED -SSL_VERIFY_DATA_MAX_LEN MBEDTLS_SSL_VERIFY_DATA_MAX_LEN -SSL_VERIFY_NONE MBEDTLS_SSL_VERIFY_NONE -SSL_VERIFY_OPTIONAL MBEDTLS_SSL_VERIFY_OPTIONAL -SSL_VERIFY_REQUIRED MBEDTLS_SSL_VERIFY_REQUIRED -TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA -TLS_DHE_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA -TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 -TLS_DHE_PSK_WITH_AES_128_CCM MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM -TLS_DHE_PSK_WITH_AES_128_CCM_8 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8 -TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 -TLS_DHE_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA -TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 -TLS_DHE_PSK_WITH_AES_256_CCM MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM -TLS_DHE_PSK_WITH_AES_256_CCM_8 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8 -TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 -TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 -TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 -TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 -TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 -TLS_DHE_PSK_WITH_NULL_SHA MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA -TLS_DHE_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256 -TLS_DHE_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384 -TLS_DHE_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA -TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA -TLS_DHE_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA -TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 -TLS_DHE_RSA_WITH_AES_128_CCM MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM -TLS_DHE_RSA_WITH_AES_128_CCM_8 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8 -TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 -TLS_DHE_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA -TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 -TLS_DHE_RSA_WITH_AES_256_CCM MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM -TLS_DHE_RSA_WITH_AES_256_CCM_8 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8 -TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 -TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA -TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 -TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 -TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA -TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 -TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 -TLS_DHE_RSA_WITH_DES_CBC_SHA MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA -TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA -TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA -TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 -TLS_ECDHE_ECDSA_WITH_AES_128_CCM MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM -TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 -TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 -TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA -TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 -TLS_ECDHE_ECDSA_WITH_AES_256_CCM MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM -TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 -TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 -TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 -TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 -TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 -TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 -TLS_ECDHE_ECDSA_WITH_NULL_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA -TLS_ECDHE_ECDSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA -TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA -TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA -TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 -TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA -TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 -TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 -TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 -TLS_ECDHE_PSK_WITH_NULL_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA -TLS_ECDHE_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256 -TLS_ECDHE_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384 -TLS_ECDHE_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA -TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA -TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA -TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 -TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 -TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA -TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 -TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 -TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 -TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 -TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 -TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 -TLS_ECDHE_RSA_WITH_NULL_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA -TLS_ECDHE_RSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA -TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA -TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA -TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 -TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 -TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA -TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 -TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 -TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 -TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 -TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 -TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 -TLS_ECDH_ECDSA_WITH_NULL_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA -TLS_ECDH_ECDSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA -TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA -TLS_ECDH_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA -TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 -TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 -TLS_ECDH_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA -TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 -TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 -TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 -TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 -TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 -TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 -TLS_ECDH_RSA_WITH_NULL_SHA MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA -TLS_ECDH_RSA_WITH_RC4_128_SHA MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA -TLS_EXT_ALPN MBEDTLS_TLS_EXT_ALPN -TLS_EXT_ENCRYPT_THEN_MAC MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC -TLS_EXT_EXTENDED_MASTER_SECRET MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET -TLS_EXT_MAX_FRAGMENT_LENGTH MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH -TLS_EXT_RENEGOTIATION_INFO MBEDTLS_TLS_EXT_RENEGOTIATION_INFO -TLS_EXT_SERVERNAME MBEDTLS_TLS_EXT_SERVERNAME -TLS_EXT_SERVERNAME_HOSTNAME MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME -TLS_EXT_SESSION_TICKET MBEDTLS_TLS_EXT_SESSION_TICKET -TLS_EXT_SIG_ALG MBEDTLS_TLS_EXT_SIG_ALG -TLS_EXT_SUPPORTED_ELLIPTIC_CURVES MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES -TLS_EXT_SUPPORTED_POINT_FORMATS MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS -TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT -TLS_EXT_TRUNCATED_HMAC MBEDTLS_TLS_EXT_TRUNCATED_HMAC -TLS_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA -TLS_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA -TLS_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 -TLS_PSK_WITH_AES_128_CCM MBEDTLS_TLS_PSK_WITH_AES_128_CCM -TLS_PSK_WITH_AES_128_CCM_8 MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8 -TLS_PSK_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 -TLS_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA -TLS_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 -TLS_PSK_WITH_AES_256_CCM MBEDTLS_TLS_PSK_WITH_AES_256_CCM -TLS_PSK_WITH_AES_256_CCM_8 MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8 -TLS_PSK_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 -TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 -TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 -TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 -TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 -TLS_PSK_WITH_NULL_SHA MBEDTLS_TLS_PSK_WITH_NULL_SHA -TLS_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_PSK_WITH_NULL_SHA256 -TLS_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_PSK_WITH_NULL_SHA384 -TLS_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_PSK_WITH_RC4_128_SHA -TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA -TLS_RSA_PSK_WITH_AES_128_CBC_SHA MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA -TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 -TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 -TLS_RSA_PSK_WITH_AES_256_CBC_SHA MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA -TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 -TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 -TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 -TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 -TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 -TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 -TLS_RSA_PSK_WITH_NULL_SHA MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA -TLS_RSA_PSK_WITH_NULL_SHA256 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256 -TLS_RSA_PSK_WITH_NULL_SHA384 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384 -TLS_RSA_PSK_WITH_RC4_128_SHA MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA -TLS_RSA_WITH_3DES_EDE_CBC_SHA MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA -TLS_RSA_WITH_AES_128_CBC_SHA MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA -TLS_RSA_WITH_AES_128_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 -TLS_RSA_WITH_AES_128_CCM MBEDTLS_TLS_RSA_WITH_AES_128_CCM -TLS_RSA_WITH_AES_128_CCM_8 MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8 -TLS_RSA_WITH_AES_128_GCM_SHA256 MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 -TLS_RSA_WITH_AES_256_CBC_SHA MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA -TLS_RSA_WITH_AES_256_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 -TLS_RSA_WITH_AES_256_CCM MBEDTLS_TLS_RSA_WITH_AES_256_CCM -TLS_RSA_WITH_AES_256_CCM_8 MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8 -TLS_RSA_WITH_AES_256_GCM_SHA384 MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 -TLS_RSA_WITH_CAMELLIA_128_CBC_SHA MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA -TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 -TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 -TLS_RSA_WITH_CAMELLIA_256_CBC_SHA MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA -TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 -TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 -TLS_RSA_WITH_DES_CBC_SHA MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA -TLS_RSA_WITH_NULL_MD5 MBEDTLS_TLS_RSA_WITH_NULL_MD5 -TLS_RSA_WITH_NULL_SHA MBEDTLS_TLS_RSA_WITH_NULL_SHA -TLS_RSA_WITH_NULL_SHA256 MBEDTLS_TLS_RSA_WITH_NULL_SHA256 -TLS_RSA_WITH_RC4_128_MD5 MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 -TLS_RSA_WITH_RC4_128_SHA MBEDTLS_TLS_RSA_WITH_RC4_128_SHA -X509_CRT_VERSION_1 MBEDTLS_X509_CRT_VERSION_1 -X509_CRT_VERSION_2 MBEDTLS_X509_CRT_VERSION_2 -X509_CRT_VERSION_3 MBEDTLS_X509_CRT_VERSION_3 -X509_FORMAT_DER MBEDTLS_X509_FORMAT_DER -X509_FORMAT_PEM MBEDTLS_X509_FORMAT_PEM -X509_MAX_DN_NAME_SIZE MBEDTLS_X509_MAX_DN_NAME_SIZE -X509_RFC5280_MAX_SERIAL_LEN MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN -X509_RFC5280_UTC_TIME_LEN MBEDTLS_X509_RFC5280_UTC_TIME_LEN -XTEA_DECRYPT MBEDTLS_XTEA_DECRYPT -XTEA_ENCRYPT MBEDTLS_XTEA_ENCRYPT -_asn1_bitstring mbedtls_asn1_bitstring -_asn1_buf mbedtls_asn1_buf -_asn1_named_data mbedtls_asn1_named_data -_asn1_sequence mbedtls_asn1_sequence -_ssl_cache_context mbedtls_ssl_cache_context -_ssl_cache_entry mbedtls_ssl_cache_entry -_ssl_ciphersuite_t mbedtls_ssl_ciphersuite_t -_ssl_context mbedtls_ssl_context -_ssl_flight_item mbedtls_ssl_flight_item -_ssl_handshake_params mbedtls_ssl_handshake_params -_ssl_key_cert mbedtls_ssl_key_cert -_ssl_premaster_secret mbedtls_ssl_premaster_secret -_ssl_session mbedtls_ssl_session -_ssl_ticket_keys mbedtls_ssl_ticket_keys -_ssl_transform mbedtls_ssl_transform -_x509_crl mbedtls_x509_crl -_x509_crl_entry mbedtls_x509_crl_entry -_x509_crt mbedtls_x509_crt -_x509_csr mbedtls_x509_csr -_x509_time mbedtls_x509_time -_x509write_cert mbedtls_x509write_cert -_x509write_csr mbedtls_x509write_csr -aes_context mbedtls_aes_context -aes_crypt_cbc mbedtls_aes_crypt_cbc -aes_crypt_cfb128 mbedtls_aes_crypt_cfb128 -aes_crypt_cfb8 mbedtls_aes_crypt_cfb8 -aes_crypt_ctr mbedtls_aes_crypt_ctr -aes_crypt_ecb mbedtls_aes_crypt_ecb -aes_free mbedtls_aes_free -aes_init mbedtls_aes_init -aes_self_test mbedtls_aes_self_test -aes_setkey_dec mbedtls_aes_setkey_dec -aes_setkey_enc mbedtls_aes_setkey_enc -aesni_crypt_ecb mbedtls_aesni_crypt_ecb -aesni_gcm_mult mbedtls_aesni_gcm_mult -aesni_inverse_key mbedtls_aesni_inverse_key -aesni_setkey_enc mbedtls_aesni_setkey_enc -aesni_supports mbedtls_aesni_has_support -alarmed mbedtls_timing_alarmed -arc4_context mbedtls_arc4_context -arc4_crypt mbedtls_arc4_crypt -arc4_free mbedtls_arc4_free -arc4_init mbedtls_arc4_init -arc4_self_test mbedtls_arc4_self_test -arc4_setup mbedtls_arc4_setup -asn1_bitstring mbedtls_asn1_bitstring -asn1_buf mbedtls_asn1_buf -asn1_find_named_data mbedtls_asn1_find_named_data -asn1_free_named_data mbedtls_asn1_free_named_data -asn1_free_named_data_list mbedtls_asn1_free_named_data_list -asn1_get_alg mbedtls_asn1_get_alg -asn1_get_alg_null mbedtls_asn1_get_alg_null -asn1_get_bitstring mbedtls_asn1_get_bitstring -asn1_get_bitstring_null mbedtls_asn1_get_bitstring_null -asn1_get_bool mbedtls_asn1_get_bool -asn1_get_int mbedtls_asn1_get_int -asn1_get_len mbedtls_asn1_get_len -asn1_get_mpi mbedtls_asn1_get_mpi -asn1_get_sequence_of mbedtls_asn1_get_sequence_of -asn1_get_tag mbedtls_asn1_get_tag -asn1_named_data mbedtls_asn1_named_data -asn1_sequence mbedtls_asn1_sequence -asn1_store_named_data mbedtls_asn1_store_named_data -asn1_write_algorithm_identifier mbedtls_asn1_write_algorithm_identifier -asn1_write_bitstring mbedtls_asn1_write_bitstring -asn1_write_bool mbedtls_asn1_write_bool -asn1_write_ia5_string mbedtls_asn1_write_ia5_string -asn1_write_int mbedtls_asn1_write_int -asn1_write_len mbedtls_asn1_write_len -asn1_write_mpi mbedtls_asn1_write_mpi -asn1_write_null mbedtls_asn1_write_null -asn1_write_octet_string mbedtls_asn1_write_octet_string -asn1_write_oid mbedtls_asn1_write_oid -asn1_write_printable_string mbedtls_asn1_write_printable_string -asn1_write_raw_buffer mbedtls_asn1_write_raw_buffer -asn1_write_tag mbedtls_asn1_write_tag -base64_decode mbedtls_base64_decode -base64_encode mbedtls_base64_encode -base64_self_test mbedtls_base64_self_test -blowfish_context mbedtls_blowfish_context -blowfish_crypt_cbc mbedtls_blowfish_crypt_cbc -blowfish_crypt_cfb64 mbedtls_blowfish_crypt_cfb64 -blowfish_crypt_ctr mbedtls_blowfish_crypt_ctr -blowfish_crypt_ecb mbedtls_blowfish_crypt_ecb -blowfish_free mbedtls_blowfish_free -blowfish_init mbedtls_blowfish_init -blowfish_setkey mbedtls_blowfish_setkey -camellia_context mbedtls_camellia_context -camellia_crypt_cbc mbedtls_camellia_crypt_cbc -camellia_crypt_cfb128 mbedtls_camellia_crypt_cfb128 -camellia_crypt_ctr mbedtls_camellia_crypt_ctr -camellia_crypt_ecb mbedtls_camellia_crypt_ecb -camellia_free mbedtls_camellia_free -camellia_init mbedtls_camellia_init -camellia_self_test mbedtls_camellia_self_test -camellia_setkey_dec mbedtls_camellia_setkey_dec -camellia_setkey_enc mbedtls_camellia_setkey_enc -ccm_auth_decrypt mbedtls_ccm_auth_decrypt -ccm_context mbedtls_ccm_context -ccm_encrypt_and_tag mbedtls_ccm_encrypt_and_tag -ccm_free mbedtls_ccm_free -ccm_init mbedtls_ccm_init -ccm_self_test mbedtls_ccm_self_test -cipher_auth_decrypt mbedtls_cipher_auth_decrypt -cipher_auth_encrypt mbedtls_cipher_auth_encrypt -cipher_base_t mbedtls_cipher_base_t -cipher_check_tag mbedtls_cipher_check_tag -cipher_context_t mbedtls_cipher_context_t -cipher_crypt mbedtls_cipher_crypt -cipher_definition_t mbedtls_cipher_definition_t -cipher_definitions mbedtls_cipher_definitions -cipher_finish mbedtls_cipher_finish -cipher_free mbedtls_cipher_free -cipher_free_ctx mbedtls_cipher_free_ctx -cipher_get_block_size mbedtls_cipher_get_block_size -cipher_get_cipher_mode mbedtls_cipher_get_cipher_mode -cipher_get_iv_size mbedtls_cipher_get_iv_size -cipher_get_key_size mbedtls_cipher_get_key_bitlen -cipher_get_name mbedtls_cipher_get_name -cipher_get_operation mbedtls_cipher_get_operation -cipher_get_type mbedtls_cipher_get_type -cipher_id_t mbedtls_cipher_id_t -cipher_info_from_string mbedtls_cipher_info_from_string -cipher_info_from_type mbedtls_cipher_info_from_type -cipher_info_from_values mbedtls_cipher_info_from_values -cipher_info_t mbedtls_cipher_info_t -cipher_init mbedtls_cipher_init -cipher_init_ctx mbedtls_cipher_setup -cipher_list mbedtls_cipher_list -cipher_mode_t mbedtls_cipher_mode_t -cipher_padding_t mbedtls_cipher_padding_t -cipher_reset mbedtls_cipher_reset -cipher_self_test mbedtls_cipher_self_test -cipher_set_iv mbedtls_cipher_set_iv -cipher_set_padding_mode mbedtls_cipher_set_padding_mode -cipher_setkey mbedtls_cipher_setkey -cipher_type_t mbedtls_cipher_type_t -cipher_update mbedtls_cipher_update -cipher_update_ad mbedtls_cipher_update_ad -cipher_write_tag mbedtls_cipher_write_tag -ctr_drbg_context mbedtls_ctr_drbg_context -ctr_drbg_free mbedtls_ctr_drbg_free -ctr_drbg_init mbedtls_ctr_drbg_init -ctr_drbg_init_entropy_len mbedtls_ctr_drbg_init_entropy_len -ctr_drbg_random mbedtls_ctr_drbg_random -ctr_drbg_random_with_add mbedtls_ctr_drbg_random_with_add -ctr_drbg_reseed mbedtls_ctr_drbg_reseed -ctr_drbg_self_test mbedtls_ctr_drbg_self_test -ctr_drbg_set_entropy_len mbedtls_ctr_drbg_set_entropy_len -ctr_drbg_set_prediction_resistance mbedtls_ctr_drbg_set_prediction_resistance -ctr_drbg_set_reseed_interval mbedtls_ctr_drbg_set_reseed_interval -ctr_drbg_update mbedtls_ctr_drbg_update -ctr_drbg_update_seed_file mbedtls_ctr_drbg_update_seed_file -ctr_drbg_write_seed_file mbedtls_ctr_drbg_write_seed_file -debug_fmt mbedtls_debug_fmt -debug_print_buf mbedtls_debug_print_buf -debug_print_crt mbedtls_debug_print_crt -debug_print_ecp mbedtls_debug_print_ecp -debug_print_mpi mbedtls_debug_print_mpi -debug_print_msg mbedtls_debug_print_msg -debug_print_ret mbedtls_debug_print_ret -debug_set_log_mode mbedtls_debug_set_log_mode -debug_set_threshold mbedtls_debug_set_threshold -des3_context mbedtls_des3_context -des3_crypt_cbc mbedtls_des3_crypt_cbc -des3_crypt_ecb mbedtls_des3_crypt_ecb -des3_free mbedtls_des3_free -des3_init mbedtls_des3_init -des3_set2key_dec mbedtls_des3_set2key_dec -des3_set2key_enc mbedtls_des3_set2key_enc -des3_set3key_dec mbedtls_des3_set3key_dec -des3_set3key_enc mbedtls_des3_set3key_enc -des_context mbedtls_des_context -des_crypt_cbc mbedtls_des_crypt_cbc -des_crypt_ecb mbedtls_des_crypt_ecb -des_free mbedtls_des_free -des_init mbedtls_des_init -des_key_check_key_parity mbedtls_des_key_check_key_parity -des_key_check_weak mbedtls_des_key_check_weak -des_key_set_parity mbedtls_des_key_set_parity -des_self_test mbedtls_des_self_test -des_setkey_dec mbedtls_des_setkey_dec -des_setkey_enc mbedtls_des_setkey_enc -dhm_calc_secret mbedtls_dhm_calc_secret -dhm_context mbedtls_dhm_context -dhm_free mbedtls_dhm_free -dhm_init mbedtls_dhm_init -dhm_make_params mbedtls_dhm_make_params -dhm_make_public mbedtls_dhm_make_public -dhm_parse_dhm mbedtls_dhm_parse_dhm -dhm_parse_dhmfile mbedtls_dhm_parse_dhmfile -dhm_read_params mbedtls_dhm_read_params -dhm_read_public mbedtls_dhm_read_public -dhm_self_test mbedtls_dhm_self_test -ecdh_calc_secret mbedtls_ecdh_calc_secret -ecdh_compute_shared mbedtls_ecdh_compute_shared -ecdh_context mbedtls_ecdh_context -ecdh_free mbedtls_ecdh_free -ecdh_gen_public mbedtls_ecdh_gen_public -ecdh_get_params mbedtls_ecdh_get_params -ecdh_init mbedtls_ecdh_init -ecdh_make_params mbedtls_ecdh_make_params -ecdh_make_public mbedtls_ecdh_make_public -ecdh_read_params mbedtls_ecdh_read_params -ecdh_read_public mbedtls_ecdh_read_public -ecdh_self_test mbedtls_ecdh_self_test -ecdh_side mbedtls_ecdh_side -ecdsa_context mbedtls_ecdsa_context -ecdsa_free mbedtls_ecdsa_free -ecdsa_from_keypair mbedtls_ecdsa_from_keypair -ecdsa_genkey mbedtls_ecdsa_genkey -ecdsa_info mbedtls_ecdsa_info -ecdsa_init mbedtls_ecdsa_init -ecdsa_read_signature mbedtls_ecdsa_read_signature -ecdsa_self_test mbedtls_ecdsa_self_test -ecdsa_sign mbedtls_ecdsa_sign -ecdsa_sign_det mbedtls_ecdsa_sign_det -ecdsa_verify mbedtls_ecdsa_verify -ecdsa_write_signature mbedtls_ecdsa_write_signature -ecdsa_write_signature_det mbedtls_ecdsa_write_signature_det -eckey_info mbedtls_eckey_info -eckeydh_info mbedtls_eckeydh_info -ecp_add mbedtls_ecp_add -ecp_check_privkey mbedtls_ecp_check_privkey -ecp_check_pub_priv mbedtls_ecp_check_pub_priv -ecp_check_pubkey mbedtls_ecp_check_pubkey -ecp_copy mbedtls_ecp_copy -ecp_curve_info mbedtls_ecp_curve_info -ecp_curve_info_from_grp_id mbedtls_ecp_curve_info_from_grp_id -ecp_curve_info_from_name mbedtls_ecp_curve_info_from_name -ecp_curve_info_from_tls_id mbedtls_ecp_curve_info_from_tls_id -ecp_curve_list mbedtls_ecp_curve_list -ecp_gen_key mbedtls_ecp_gen_key -ecp_gen_keypair mbedtls_ecp_gen_keypair -ecp_group mbedtls_ecp_group -ecp_group_copy mbedtls_ecp_group_copy -ecp_group_free mbedtls_ecp_group_free -ecp_group_id mbedtls_ecp_group_id -ecp_group_init mbedtls_ecp_group_init -ecp_group_read_string mbedtls_ecp_group_read_string -ecp_grp_id_list mbedtls_ecp_grp_id_list -ecp_is_zero mbedtls_ecp_is_zero -ecp_keypair mbedtls_ecp_keypair -ecp_keypair_free mbedtls_ecp_keypair_free -ecp_keypair_init mbedtls_ecp_keypair_init -ecp_mul mbedtls_ecp_mul -ecp_point mbedtls_ecp_point -ecp_point_free mbedtls_ecp_point_free -ecp_point_init mbedtls_ecp_point_init -ecp_point_read_binary mbedtls_ecp_point_read_binary -ecp_point_read_string mbedtls_ecp_point_read_string -ecp_point_write_binary mbedtls_ecp_point_write_binary -ecp_self_test mbedtls_ecp_self_test -ecp_set_zero mbedtls_ecp_set_zero -ecp_sub mbedtls_ecp_sub -ecp_tls_read_group mbedtls_ecp_tls_read_group -ecp_tls_read_point mbedtls_ecp_tls_read_point -ecp_tls_write_group mbedtls_ecp_tls_write_group -ecp_tls_write_point mbedtls_ecp_tls_write_point -ecp_use_known_dp mbedtls_ecp_group_load -entropy_add_source mbedtls_entropy_add_source -entropy_context mbedtls_entropy_context -entropy_free mbedtls_entropy_free -entropy_func mbedtls_entropy_func -entropy_gather mbedtls_entropy_gather -entropy_init mbedtls_entropy_init -entropy_self_test mbedtls_entropy_self_test -entropy_update_manual mbedtls_entropy_update_manual -entropy_update_seed_file mbedtls_entropy_update_seed_file -entropy_write_seed_file mbedtls_entropy_write_seed_file -error_strerror mbedtls_strerror -f_source_ptr mbedtls_entropy_f_source_ptr -gcm_auth_decrypt mbedtls_gcm_auth_decrypt -gcm_context mbedtls_gcm_context -gcm_crypt_and_tag mbedtls_gcm_crypt_and_tag -gcm_finish mbedtls_gcm_finish -gcm_free mbedtls_gcm_free -gcm_init mbedtls_gcm_init -gcm_self_test mbedtls_gcm_self_test -gcm_starts mbedtls_gcm_starts -gcm_update mbedtls_gcm_update -get_timer mbedtls_timing_get_timer -hardclock mbedtls_timing_hardclock -hardclock_poll mbedtls_hardclock_poll -havege_free mbedtls_havege_free -havege_init mbedtls_havege_init -havege_poll mbedtls_havege_poll -havege_random mbedtls_havege_random -havege_state mbedtls_havege_state -hmac_drbg_context mbedtls_hmac_drbg_context -hmac_drbg_free mbedtls_hmac_drbg_free -hmac_drbg_init mbedtls_hmac_drbg_init -hmac_drbg_init_buf mbedtls_hmac_drbg_init_buf -hmac_drbg_random mbedtls_hmac_drbg_random -hmac_drbg_random_with_add mbedtls_hmac_drbg_random_with_add -hmac_drbg_reseed mbedtls_hmac_drbg_reseed -hmac_drbg_self_test mbedtls_hmac_drbg_self_test -hmac_drbg_set_entropy_len mbedtls_hmac_drbg_set_entropy_len -hmac_drbg_set_prediction_resistance mbedtls_hmac_drbg_set_prediction_resistance -hmac_drbg_set_reseed_interval mbedtls_hmac_drbg_set_reseed_interval -hmac_drbg_update mbedtls_hmac_drbg_update -hmac_drbg_update_seed_file mbedtls_hmac_drbg_update_seed_file -hmac_drbg_write_seed_file mbedtls_hmac_drbg_write_seed_file -hr_time mbedtls_timing_hr_time -key_exchange_type_t mbedtls_key_exchange_type_t -m_sleep mbedtls_timing_m_sleep -md mbedtls_md -md2 mbedtls_md2 -md2_context mbedtls_md2_context -md2_file mbedtls_md2_file -md2_finish mbedtls_md2_finish -md2_free mbedtls_md2_free -md2_hmac mbedtls_md2_hmac -md2_hmac_finish mbedtls_md2_hmac_finish -md2_hmac_reset mbedtls_md2_hmac_reset -md2_hmac_starts mbedtls_md2_hmac_starts -md2_hmac_update mbedtls_md2_hmac_update -md2_info mbedtls_md2_info -md2_init mbedtls_md2_init -md2_process mbedtls_md2_process -md2_self_test mbedtls_md2_self_test -md2_starts mbedtls_md2_starts -md2_update mbedtls_md2_update -md4 mbedtls_md4 -md4_context mbedtls_md4_context -md4_file mbedtls_md4_file -md4_finish mbedtls_md4_finish -md4_free mbedtls_md4_free -md4_hmac mbedtls_md4_hmac -md4_hmac_finish mbedtls_md4_hmac_finish -md4_hmac_reset mbedtls_md4_hmac_reset -md4_hmac_starts mbedtls_md4_hmac_starts -md4_hmac_update mbedtls_md4_hmac_update -md4_info mbedtls_md4_info -md4_init mbedtls_md4_init -md4_process mbedtls_md4_process -md4_self_test mbedtls_md4_self_test -md4_starts mbedtls_md4_starts -md4_update mbedtls_md4_update -md5 mbedtls_md5 -md5_context mbedtls_md5_context -md5_file mbedtls_md5_file -md5_finish mbedtls_md5_finish -md5_free mbedtls_md5_free -md5_hmac mbedtls_md5_hmac -md5_hmac_finish mbedtls_md5_hmac_finish -md5_hmac_reset mbedtls_md5_hmac_reset -md5_hmac_starts mbedtls_md5_hmac_starts -md5_hmac_update mbedtls_md5_hmac_update -md5_info mbedtls_md5_info -md5_init mbedtls_md5_init -md5_process mbedtls_md5_process -md5_self_test mbedtls_md5_self_test -md5_starts mbedtls_md5_starts -md5_update mbedtls_md5_update -md_context_t mbedtls_md_context_t -md_file mbedtls_md_file -md_finish mbedtls_md_finish -md_free mbedtls_md_free -md_free_ctx mbedtls_md_free_ctx -md_get_name mbedtls_md_get_name -md_get_size mbedtls_md_get_size -md_get_type mbedtls_md_get_type -md_hmac mbedtls_md_hmac -md_hmac_finish mbedtls_md_hmac_finish -md_hmac_reset mbedtls_md_hmac_reset -md_hmac_starts mbedtls_md_hmac_starts -md_hmac_update mbedtls_md_hmac_update -md_info_from_string mbedtls_md_info_from_string -md_info_from_type mbedtls_md_info_from_type -md_info_t mbedtls_md_info_t -md_init mbedtls_md_init -md_init_ctx mbedtls_md_init_ctx -md_list mbedtls_md_list -md_process mbedtls_md_process -md_starts mbedtls_md_starts -md_type_t mbedtls_md_type_t -md_update mbedtls_md_update -memory_buffer_alloc_cur_get mbedtls_memory_buffer_alloc_cur_get -memory_buffer_alloc_free mbedtls_memory_buffer_alloc_free -memory_buffer_alloc_init mbedtls_memory_buffer_alloc_init -memory_buffer_alloc_max_get mbedtls_memory_buffer_alloc_max_get -memory_buffer_alloc_max_reset mbedtls_memory_buffer_alloc_max_reset -memory_buffer_alloc_self_test mbedtls_memory_buffer_alloc_self_test -memory_buffer_alloc_status mbedtls_memory_buffer_alloc_status -memory_buffer_alloc_verify mbedtls_memory_buffer_alloc_verify -memory_buffer_set_verify mbedtls_memory_buffer_set_verify -memory_set_own mbedtls_memory_set_own -mpi mbedtls_mpi -mpi_add_abs mbedtls_mpi_add_abs -mpi_add_int mbedtls_mpi_add_int -mpi_add_mpi mbedtls_mpi_add_mpi -mpi_cmp_abs mbedtls_mpi_cmp_abs -mpi_cmp_int mbedtls_mpi_cmp_int -mpi_cmp_mpi mbedtls_mpi_cmp_mpi -mpi_copy mbedtls_mpi_copy -mpi_div_int mbedtls_mpi_div_int -mpi_div_mpi mbedtls_mpi_div_mpi -mpi_exp_mod mbedtls_mpi_exp_mod -mpi_fill_random mbedtls_mpi_fill_random -mpi_free mbedtls_mpi_free -mpi_gcd mbedtls_mpi_gcd -mpi_gen_prime mbedtls_mpi_gen_prime -mpi_get_bit mbedtls_mpi_get_bit -mpi_grow mbedtls_mpi_grow -mpi_init mbedtls_mpi_init -mpi_inv_mod mbedtls_mpi_inv_mod -mpi_is_prime mbedtls_mpi_is_prime -mpi_lsb mbedtls_mpi_lsb -mpi_lset mbedtls_mpi_lset -mpi_mod_int mbedtls_mpi_mod_int -mpi_mod_mpi mbedtls_mpi_mod_mpi -mpi_msb mbedtls_mpi_bitlen -mpi_mul_int mbedtls_mpi_mul_int -mpi_mul_mpi mbedtls_mpi_mul_mpi -mpi_read_binary mbedtls_mpi_read_binary -mpi_read_file mbedtls_mpi_read_file -mpi_read_string mbedtls_mpi_read_string -mpi_safe_cond_assign mbedtls_mpi_safe_cond_assign -mpi_safe_cond_swap mbedtls_mpi_safe_cond_swap -mpi_self_test mbedtls_mpi_self_test -mpi_set_bit mbedtls_mpi_set_bit -mpi_shift_l mbedtls_mpi_shift_l -mpi_shift_r mbedtls_mpi_shift_r -mpi_shrink mbedtls_mpi_shrink -mpi_size mbedtls_mpi_size -mpi_sub_abs mbedtls_mpi_sub_abs -mpi_sub_int mbedtls_mpi_sub_int -mpi_sub_mpi mbedtls_mpi_sub_mpi -mpi_swap mbedtls_mpi_swap -mpi_write_binary mbedtls_mpi_write_binary -mpi_write_file mbedtls_mpi_write_file -mpi_write_string mbedtls_mpi_write_string -net_accept mbedtls_net_accept -net_bind mbedtls_net_bind -net_close mbedtls_net_free -net_connect mbedtls_net_connect -net_recv mbedtls_net_recv -net_recv_timeout mbedtls_net_recv_timeout -net_send mbedtls_net_send -net_set_block mbedtls_net_set_block -net_set_nonblock mbedtls_net_set_nonblock -net_usleep mbedtls_net_usleep -oid_descriptor_t mbedtls_oid_descriptor_t -oid_get_attr_short_name mbedtls_oid_get_attr_short_name -oid_get_cipher_alg mbedtls_oid_get_cipher_alg -oid_get_ec_grp mbedtls_oid_get_ec_grp -oid_get_extended_key_usage mbedtls_oid_get_extended_key_usage -oid_get_md_alg mbedtls_oid_get_md_alg -oid_get_numeric_string mbedtls_oid_get_numeric_string -oid_get_oid_by_ec_grp mbedtls_oid_get_oid_by_ec_grp -oid_get_oid_by_md mbedtls_oid_get_oid_by_md -oid_get_oid_by_pk_alg mbedtls_oid_get_oid_by_pk_alg -oid_get_oid_by_sig_alg mbedtls_oid_get_oid_by_sig_alg -oid_get_pk_alg mbedtls_oid_get_pk_alg -oid_get_pkcs12_pbe_alg mbedtls_oid_get_pkcs12_pbe_alg -oid_get_sig_alg mbedtls_oid_get_sig_alg -oid_get_sig_alg_desc mbedtls_oid_get_sig_alg_desc -oid_get_x509_ext_type mbedtls_oid_get_x509_ext_type -operation_t mbedtls_operation_t -padlock_supports mbedtls_padlock_has_support -padlock_xcryptcbc mbedtls_padlock_xcryptcbc -padlock_xcryptecb mbedtls_padlock_xcryptecb -pem_context mbedtls_pem_context -pem_free mbedtls_pem_free -pem_init mbedtls_pem_init -pem_read_buffer mbedtls_pem_read_buffer -pem_write_buffer mbedtls_pem_write_buffer -pk_can_do mbedtls_pk_can_do -pk_check_pair mbedtls_pk_check_pair -pk_context mbedtls_pk_context -pk_debug mbedtls_pk_debug -pk_debug_item mbedtls_pk_debug_item -pk_debug_type mbedtls_pk_debug_type -pk_decrypt mbedtls_pk_decrypt -pk_ec mbedtls_pk_ec -pk_encrypt mbedtls_pk_encrypt -pk_free mbedtls_pk_free -pk_get_len mbedtls_pk_get_len -pk_get_name mbedtls_pk_get_name -pk_get_size mbedtls_pk_get_bitlen -pk_get_type mbedtls_pk_get_type -pk_info_from_type mbedtls_pk_info_from_type -pk_info_t mbedtls_pk_info_t -pk_init mbedtls_pk_init -pk_init_ctx mbedtls_pk_setup -pk_init_ctx_rsa_alt mbedtls_pk_setup_rsa_alt -pk_load_file mbedtls_pk_load_file -pk_parse_key mbedtls_pk_parse_key -pk_parse_keyfile mbedtls_pk_parse_keyfile -pk_parse_public_key mbedtls_pk_parse_public_key -pk_parse_public_keyfile mbedtls_pk_parse_public_keyfile -pk_parse_subpubkey mbedtls_pk_parse_subpubkey -pk_rsa mbedtls_pk_rsa -pk_rsa_alt_decrypt_func mbedtls_pk_rsa_alt_decrypt_func -pk_rsa_alt_key_len_func mbedtls_pk_rsa_alt_key_len_func -pk_rsa_alt_sign_func mbedtls_pk_rsa_alt_sign_func -pk_rsassa_pss_options mbedtls_pk_rsassa_pss_options -pk_sign mbedtls_pk_sign -pk_type_t mbedtls_pk_type_t -pk_verify mbedtls_pk_verify -pk_verify_ext mbedtls_pk_verify_ext -pk_write_key_der mbedtls_pk_write_key_der -pk_write_key_pem mbedtls_pk_write_key_pem -pk_write_pubkey mbedtls_pk_write_pubkey -pk_write_pubkey_der mbedtls_pk_write_pubkey_der -pk_write_pubkey_pem mbedtls_pk_write_pubkey_pem -pkcs11_context mbedtls_pkcs11_context -pkcs11_decrypt mbedtls_pkcs11_decrypt -pkcs11_priv_key_free mbedtls_pkcs11_priv_key_free -pkcs11_priv_key_init mbedtls_pkcs11_priv_key_bind -pkcs11_sign mbedtls_pkcs11_sign -pkcs11_x509_cert_init mbedtls_pkcs11_x509_cert_bind -pkcs12_derivation mbedtls_pkcs12_derivation -pkcs12_pbe mbedtls_pkcs12_pbe -pkcs12_pbe_sha1_rc4_128 mbedtls_pkcs12_pbe_sha1_rc4_128 -pkcs5_pbes2 mbedtls_pkcs5_pbes2 -pkcs5_pbkdf2_hmac mbedtls_pkcs5_pbkdf2_hmac -pkcs5_self_test mbedtls_pkcs5_self_test -platform_entropy_poll mbedtls_platform_entropy_poll -platform_set_exit mbedtls_platform_set_exit -platform_set_fprintf mbedtls_platform_set_fprintf -platform_set_malloc_free mbedtls_platform_set_malloc_free -platform_set_printf mbedtls_platform_set_printf -platform_set_snprintf mbedtls_platform_set_snprintf -polarssl_exit mbedtls_exit -polarssl_fprintf mbedtls_fprintf -polarssl_free mbedtls_free -polarssl_malloc mbedtls_malloc -polarssl_mutex_free mbedtls_mutex_free -polarssl_mutex_init mbedtls_mutex_init -polarssl_mutex_lock mbedtls_mutex_lock -polarssl_mutex_unlock mbedtls_mutex_unlock -polarssl_printf mbedtls_printf -polarssl_snprintf mbedtls_snprintf -polarssl_strerror mbedtls_strerror -ripemd160 mbedtls_ripemd160 -ripemd160_context mbedtls_ripemd160_context -ripemd160_file mbedtls_ripemd160_file -ripemd160_finish mbedtls_ripemd160_finish -ripemd160_free mbedtls_ripemd160_free -ripemd160_hmac mbedtls_ripemd160_hmac -ripemd160_hmac_finish mbedtls_ripemd160_hmac_finish -ripemd160_hmac_reset mbedtls_ripemd160_hmac_reset -ripemd160_hmac_starts mbedtls_ripemd160_hmac_starts -ripemd160_hmac_update mbedtls_ripemd160_hmac_update -ripemd160_info mbedtls_ripemd160_info -ripemd160_init mbedtls_ripemd160_init -ripemd160_process mbedtls_ripemd160_process -ripemd160_self_test mbedtls_ripemd160_self_test -ripemd160_starts mbedtls_ripemd160_starts -ripemd160_update mbedtls_ripemd160_update -rsa_alt_context mbedtls_rsa_alt_context -rsa_alt_info mbedtls_rsa_alt_info -rsa_check_privkey mbedtls_rsa_check_privkey -rsa_check_pub_priv mbedtls_rsa_check_pub_priv -rsa_check_pubkey mbedtls_rsa_check_pubkey -rsa_context mbedtls_rsa_context -rsa_copy mbedtls_rsa_copy -rsa_decrypt_func mbedtls_rsa_decrypt_func -rsa_free mbedtls_rsa_free -rsa_gen_key mbedtls_rsa_gen_key -rsa_info mbedtls_rsa_info -rsa_init mbedtls_rsa_init -rsa_key_len_func mbedtls_rsa_key_len_func -rsa_pkcs1_decrypt mbedtls_rsa_pkcs1_decrypt -rsa_pkcs1_encrypt mbedtls_rsa_pkcs1_encrypt -rsa_pkcs1_sign mbedtls_rsa_pkcs1_sign -rsa_pkcs1_verify mbedtls_rsa_pkcs1_verify -rsa_private mbedtls_rsa_private -rsa_public mbedtls_rsa_public -rsa_rsaes_oaep_decrypt mbedtls_rsa_rsaes_oaep_decrypt -rsa_rsaes_oaep_encrypt mbedtls_rsa_rsaes_oaep_encrypt -rsa_rsaes_pkcs1_v15_decrypt mbedtls_rsa_rsaes_pkcs1_v15_decrypt -rsa_rsaes_pkcs1_v15_encrypt mbedtls_rsa_rsaes_pkcs1_v15_encrypt -rsa_rsassa_pkcs1_v15_sign mbedtls_rsa_rsassa_pkcs1_v15_sign -rsa_rsassa_pkcs1_v15_verify mbedtls_rsa_rsassa_pkcs1_v15_verify -rsa_rsassa_pss_sign mbedtls_rsa_rsassa_pss_sign -rsa_rsassa_pss_verify mbedtls_rsa_rsassa_pss_verify -rsa_rsassa_pss_verify_ext mbedtls_rsa_rsassa_pss_verify_ext -rsa_self_test mbedtls_rsa_self_test -rsa_set_padding mbedtls_rsa_set_padding -rsa_sign_func mbedtls_rsa_sign_func -safer_memcmp mbedtls_ssl_safer_memcmp -set_alarm mbedtls_set_alarm -sha1 mbedtls_sha1 -sha1_context mbedtls_sha1_context -sha1_file mbedtls_sha1_file -sha1_finish mbedtls_sha1_finish -sha1_free mbedtls_sha1_free -sha1_hmac mbedtls_sha1_hmac -sha1_hmac_finish mbedtls_sha1_hmac_finish -sha1_hmac_reset mbedtls_sha1_hmac_reset -sha1_hmac_starts mbedtls_sha1_hmac_starts -sha1_hmac_update mbedtls_sha1_hmac_update -sha1_info mbedtls_sha1_info -sha1_init mbedtls_sha1_init -sha1_process mbedtls_sha1_process -sha1_self_test mbedtls_sha1_self_test -sha1_starts mbedtls_sha1_starts -sha1_update mbedtls_sha1_update -sha224_info mbedtls_sha224_info -sha256 mbedtls_sha256 -sha256_context mbedtls_sha256_context -sha256_file mbedtls_sha256_file -sha256_finish mbedtls_sha256_finish -sha256_free mbedtls_sha256_free -sha256_hmac mbedtls_sha256_hmac -sha256_hmac_finish mbedtls_sha256_hmac_finish -sha256_hmac_reset mbedtls_sha256_hmac_reset -sha256_hmac_starts mbedtls_sha256_hmac_starts -sha256_hmac_update mbedtls_sha256_hmac_update -sha256_info mbedtls_sha256_info -sha256_init mbedtls_sha256_init -sha256_process mbedtls_sha256_process -sha256_self_test mbedtls_sha256_self_test -sha256_starts mbedtls_sha256_starts -sha256_update mbedtls_sha256_update -sha384_info mbedtls_sha384_info -sha512 mbedtls_sha512 -sha512_context mbedtls_sha512_context -sha512_file mbedtls_sha512_file -sha512_finish mbedtls_sha512_finish -sha512_free mbedtls_sha512_free -sha512_hmac mbedtls_sha512_hmac -sha512_hmac_finish mbedtls_sha512_hmac_finish -sha512_hmac_reset mbedtls_sha512_hmac_reset -sha512_hmac_starts mbedtls_sha512_hmac_starts -sha512_hmac_update mbedtls_sha512_hmac_update -sha512_info mbedtls_sha512_info -sha512_init mbedtls_sha512_init -sha512_process mbedtls_sha512_process -sha512_self_test mbedtls_sha512_self_test -sha512_starts mbedtls_sha512_starts -sha512_update mbedtls_sha512_update -source_state mbedtls_entropy_source_state -ssl_cache_context mbedtls_ssl_cache_context -ssl_cache_entry mbedtls_ssl_cache_entry -ssl_cache_free mbedtls_ssl_cache_free -ssl_cache_get mbedtls_ssl_cache_get -ssl_cache_init mbedtls_ssl_cache_init -ssl_cache_set mbedtls_ssl_cache_set -ssl_cache_set_max_entries mbedtls_ssl_cache_set_max_entries -ssl_cache_set_timeout mbedtls_ssl_cache_set_timeout -ssl_check_cert_usage mbedtls_ssl_check_cert_usage -ssl_ciphersuite_from_id mbedtls_ssl_ciphersuite_from_id -ssl_ciphersuite_from_string mbedtls_ssl_ciphersuite_from_string -ssl_ciphersuite_t mbedtls_ssl_ciphersuite_t -ssl_ciphersuite_uses_ec mbedtls_ssl_ciphersuite_uses_ec -ssl_ciphersuite_uses_psk mbedtls_ssl_ciphersuite_uses_psk -ssl_close_notify mbedtls_ssl_close_notify -ssl_context mbedtls_ssl_context -ssl_cookie_check mbedtls_ssl_cookie_check -ssl_cookie_check_t mbedtls_ssl_cookie_check_t -ssl_cookie_ctx mbedtls_ssl_cookie_ctx -ssl_cookie_free mbedtls_ssl_cookie_free -ssl_cookie_init mbedtls_ssl_cookie_init -ssl_cookie_set_timeout mbedtls_ssl_cookie_set_timeout -ssl_cookie_setup mbedtls_ssl_cookie_setup -ssl_cookie_write mbedtls_ssl_cookie_write -ssl_cookie_write_t mbedtls_ssl_cookie_write_t -ssl_curve_is_acceptable mbedtls_ssl_curve_is_acceptable -ssl_derive_keys mbedtls_ssl_derive_keys -ssl_dtls_replay_check mbedtls_ssl_dtls_replay_check -ssl_dtls_replay_update mbedtls_ssl_dtls_replay_update -ssl_fetch_input mbedtls_ssl_fetch_input -ssl_flight_item mbedtls_ssl_flight_item -ssl_flush_output mbedtls_ssl_flush_output -ssl_free mbedtls_ssl_free -ssl_get_alpn_protocol mbedtls_ssl_get_alpn_protocol -ssl_get_bytes_avail mbedtls_ssl_get_bytes_avail -ssl_get_ciphersuite mbedtls_ssl_get_ciphersuite -ssl_get_ciphersuite_id mbedtls_ssl_get_ciphersuite_id -ssl_get_ciphersuite_name mbedtls_ssl_get_ciphersuite_name -ssl_get_ciphersuite_sig_pk_alg mbedtls_ssl_get_ciphersuite_sig_pk_alg -ssl_get_peer_cert mbedtls_ssl_get_peer_cert -ssl_get_record_expansion mbedtls_ssl_get_record_expansion -ssl_get_session mbedtls_ssl_get_session -ssl_get_verify_result mbedtls_ssl_get_verify_result -ssl_get_version mbedtls_ssl_get_version -ssl_handshake mbedtls_ssl_handshake -ssl_handshake_client_step mbedtls_ssl_handshake_client_step -ssl_handshake_free mbedtls_ssl_handshake_free -ssl_handshake_params mbedtls_ssl_handshake_params -ssl_handshake_server_step mbedtls_ssl_handshake_server_step -ssl_handshake_step mbedtls_ssl_handshake_step -ssl_handshake_wrapup mbedtls_ssl_handshake_wrapup -ssl_hdr_len mbedtls_ssl_hdr_len -ssl_hs_hdr_len mbedtls_ssl_hs_hdr_len -ssl_hw_record_activate mbedtls_ssl_hw_record_activate -ssl_hw_record_finish mbedtls_ssl_hw_record_finish -ssl_hw_record_init mbedtls_ssl_hw_record_init -ssl_hw_record_read mbedtls_ssl_hw_record_read -ssl_hw_record_reset mbedtls_ssl_hw_record_reset -ssl_hw_record_write mbedtls_ssl_hw_record_write -ssl_init mbedtls_ssl_init -ssl_key_cert mbedtls_ssl_key_cert -ssl_legacy_renegotiation mbedtls_ssl_conf_legacy_renegotiation -ssl_list_ciphersuites mbedtls_ssl_list_ciphersuites -ssl_md_alg_from_hash mbedtls_ssl_md_alg_from_hash -ssl_optimize_checksum mbedtls_ssl_optimize_checksum -ssl_own_cert mbedtls_ssl_own_cert -ssl_own_key mbedtls_ssl_own_key -ssl_parse_certificate mbedtls_ssl_parse_certificate -ssl_parse_change_cipher_spec mbedtls_ssl_parse_change_cipher_spec -ssl_parse_finished mbedtls_ssl_parse_finished -ssl_pk_alg_from_sig mbedtls_ssl_pk_alg_from_sig -ssl_pkcs11_decrypt mbedtls_ssl_pkcs11_decrypt -ssl_pkcs11_key_len mbedtls_ssl_pkcs11_key_len -ssl_pkcs11_sign mbedtls_ssl_pkcs11_sign -ssl_psk_derive_premaster mbedtls_ssl_psk_derive_premaster -ssl_read mbedtls_ssl_read -ssl_read_record mbedtls_ssl_read_record -ssl_read_version mbedtls_ssl_read_version -ssl_recv_flight_completed mbedtls_ssl_recv_flight_completed -ssl_renegotiate mbedtls_ssl_renegotiate -ssl_resend mbedtls_ssl_resend -ssl_reset_checksum mbedtls_ssl_reset_checksum -ssl_send_alert_message mbedtls_ssl_send_alert_message -ssl_send_fatal_handshake_failure mbedtls_ssl_send_fatal_handshake_failure -ssl_send_flight_completed mbedtls_ssl_send_flight_completed -ssl_session mbedtls_ssl_session -ssl_session_free mbedtls_ssl_session_free -ssl_session_init mbedtls_ssl_session_init -ssl_session_reset mbedtls_ssl_session_reset -ssl_set_alpn_protocols mbedtls_ssl_conf_alpn_protocols -ssl_set_arc4_support mbedtls_ssl_conf_arc4_support -ssl_set_authmode mbedtls_ssl_conf_authmode -ssl_set_bio mbedtls_ssl_set_bio -ssl_set_bio_timeout mbedtls_ssl_set_bio_timeout -ssl_set_ca_chain mbedtls_ssl_conf_ca_chain -ssl_set_cbc_record_splitting mbedtls_ssl_conf_cbc_record_splitting -ssl_set_ciphersuites mbedtls_ssl_conf_ciphersuites -ssl_set_ciphersuites_for_version mbedtls_ssl_conf_ciphersuites_for_version -ssl_set_client_transport_id mbedtls_ssl_set_client_transport_id -ssl_set_curves mbedtls_ssl_conf_curves -ssl_set_dbg mbedtls_ssl_conf_dbg -ssl_set_dh_param mbedtls_ssl_conf_dh_param -ssl_set_dh_param_ctx mbedtls_ssl_conf_dh_param_ctx -ssl_set_dtls_anti_replay mbedtls_ssl_conf_dtls_anti_replay -ssl_set_dtls_badmac_limit mbedtls_ssl_conf_dtls_badmac_limit -ssl_set_dtls_cookies mbedtls_ssl_conf_dtls_cookies -ssl_set_encrypt_then_mac mbedtls_ssl_conf_encrypt_then_mac -ssl_set_endpoint mbedtls_ssl_conf_endpoint -ssl_set_extended_master_secret mbedtls_ssl_conf_extended_master_secret -ssl_set_fallback mbedtls_ssl_conf_fallback -ssl_set_handshake_timeout mbedtls_ssl_conf_handshake_timeout -ssl_set_hostname mbedtls_ssl_set_hostname -ssl_set_max_frag_len mbedtls_ssl_conf_max_frag_len -ssl_set_max_version mbedtls_ssl_conf_max_version -ssl_set_min_version mbedtls_ssl_conf_min_version -ssl_set_own_cert mbedtls_ssl_conf_own_cert -ssl_set_own_cert_alt mbedtls_ssl_set_own_cert_alt -ssl_set_own_cert_rsa mbedtls_ssl_set_own_cert_rsa -ssl_set_psk mbedtls_ssl_conf_psk -ssl_set_psk_cb mbedtls_ssl_conf_psk_cb -ssl_set_renegotiation mbedtls_ssl_conf_renegotiation -ssl_set_renegotiation_enforced mbedtls_ssl_conf_renegotiation_enforced -ssl_set_renegotiation_period mbedtls_ssl_conf_renegotiation_period -ssl_set_rng mbedtls_ssl_conf_rng -ssl_set_session mbedtls_ssl_set_session -ssl_set_session_cache mbedtls_ssl_conf_session_cache -ssl_set_session_ticket_lifetime mbedtls_ssl_conf_session_ticket_lifetime -ssl_set_session_tickets mbedtls_ssl_conf_session_tickets -ssl_set_sni mbedtls_ssl_conf_sni -ssl_set_transport mbedtls_ssl_conf_transport -ssl_set_truncated_hmac mbedtls_ssl_conf_truncated_hmac -ssl_set_verify mbedtls_ssl_conf_verify -ssl_sig_from_pk mbedtls_ssl_sig_from_pk -ssl_states mbedtls_ssl_states -ssl_ticket_keys mbedtls_ssl_ticket_keys -ssl_transform mbedtls_ssl_transform -ssl_transform_free mbedtls_ssl_transform_free -ssl_write mbedtls_ssl_write -ssl_write_certificate mbedtls_ssl_write_certificate -ssl_write_change_cipher_spec mbedtls_ssl_write_change_cipher_spec -ssl_write_finished mbedtls_ssl_write_finished -ssl_write_record mbedtls_ssl_write_record -ssl_write_version mbedtls_ssl_write_version -supported_ciphers mbedtls_cipher_supported -t_sint mbedtls_mpi_sint -t_udbl mbedtls_t_udbl -t_uint mbedtls_mpi_uint -test_ca_crt mbedtls_test_ca_crt -test_ca_crt_ec mbedtls_test_ca_crt_ec -test_ca_crt_rsa mbedtls_test_ca_crt_rsa -test_ca_key mbedtls_test_ca_key -test_ca_key_ec mbedtls_test_ca_key_ec -test_ca_key_rsa mbedtls_test_ca_key_rsa -test_ca_list mbedtls_test_cas_pem -test_ca_pwd mbedtls_test_ca_pwd -test_ca_pwd_ec mbedtls_test_ca_pwd_ec -test_ca_pwd_rsa mbedtls_test_ca_pwd_rsa -test_cli_crt mbedtls_test_cli_crt -test_cli_crt_ec mbedtls_test_cli_crt_ec -test_cli_crt_rsa mbedtls_test_cli_crt_rsa -test_cli_key mbedtls_test_cli_key -test_cli_key_ec mbedtls_test_cli_key_ec -test_cli_key_rsa mbedtls_test_cli_key_rsa -test_dhm_params mbedtls_test_dhm_params -test_srv_crt mbedtls_test_srv_crt -test_srv_crt_ec mbedtls_test_srv_crt_ec -test_srv_crt_rsa mbedtls_test_srv_crt_rsa -test_srv_key mbedtls_test_srv_key -test_srv_key_ec mbedtls_test_srv_key_ec -test_srv_key_rsa mbedtls_test_srv_key_rsa -threading_mutex_t mbedtls_threading_mutex_t -threading_set_alt mbedtls_threading_set_alt -timing_self_test mbedtls_timing_self_test -version_check_feature mbedtls_version_check_feature -version_get_number mbedtls_version_get_number -version_get_string mbedtls_version_get_string -version_get_string_full mbedtls_version_get_string_full -x509_bitstring mbedtls_x509_bitstring -x509_buf mbedtls_x509_buf -x509_crl mbedtls_x509_crl -x509_crl_entry mbedtls_x509_crl_entry -x509_crl_free mbedtls_x509_crl_free -x509_crl_info mbedtls_x509_crl_info -x509_crl_init mbedtls_x509_crl_init -x509_crl_parse mbedtls_x509_crl_parse -x509_crl_parse_der mbedtls_x509_crl_parse_der -x509_crl_parse_file mbedtls_x509_crl_parse_file -x509_crt mbedtls_x509_crt -x509_crt_check_extended_key_usage mbedtls_x509_crt_check_extended_key_usage -x509_crt_check_key_usage mbedtls_x509_crt_check_key_usage -x509_crt_free mbedtls_x509_crt_free -x509_crt_info mbedtls_x509_crt_info -x509_crt_init mbedtls_x509_crt_init -x509_crt_parse mbedtls_x509_crt_parse -x509_crt_parse_der mbedtls_x509_crt_parse_der -x509_crt_parse_file mbedtls_x509_crt_parse_file -x509_crt_parse_path mbedtls_x509_crt_parse_path -x509_crt_revoked mbedtls_x509_crt_is_revoked -x509_crt_verify mbedtls_x509_crt_verify -x509_crt_verify_info mbedtls_x509_crt_verify_info -x509_csr mbedtls_x509_csr -x509_csr_free mbedtls_x509_csr_free -x509_csr_info mbedtls_x509_csr_info -x509_csr_init mbedtls_x509_csr_init -x509_csr_parse mbedtls_x509_csr_parse -x509_csr_parse_der mbedtls_x509_csr_parse_der -x509_csr_parse_file mbedtls_x509_csr_parse_file -x509_dn_gets mbedtls_x509_dn_gets -x509_get_alg mbedtls_x509_get_alg -x509_get_alg_null mbedtls_x509_get_alg_null -x509_get_ext mbedtls_x509_get_ext -x509_get_name mbedtls_x509_get_name -x509_get_rsassa_pss_params mbedtls_x509_get_rsassa_pss_params -x509_get_serial mbedtls_x509_get_serial -x509_get_sig mbedtls_x509_get_sig -x509_get_sig_alg mbedtls_x509_get_sig_alg -x509_get_time mbedtls_x509_get_time -x509_key_size_helper mbedtls_x509_key_size_helper -x509_name mbedtls_x509_name -x509_oid_get_description mbedtls_x509_oid_get_description -x509_oid_get_numeric_string mbedtls_x509_oid_get_numeric_string -x509_self_test mbedtls_x509_self_test -x509_sequence mbedtls_x509_sequence -x509_serial_gets mbedtls_x509_serial_gets -x509_set_extension mbedtls_x509_set_extension -x509_sig_alg_gets mbedtls_x509_sig_alg_gets -x509_string_to_names mbedtls_x509_string_to_names -x509_time mbedtls_x509_time -x509_time_expired mbedtls_x509_time_is_past -x509_time_future mbedtls_x509_time_is_future -x509_write_extensions mbedtls_x509_write_extensions -x509_write_names mbedtls_x509_write_names -x509_write_sig mbedtls_x509_write_sig -x509write_cert mbedtls_x509write_cert -x509write_crt_der mbedtls_x509write_crt_der -x509write_crt_free mbedtls_x509write_crt_free -x509write_crt_init mbedtls_x509write_crt_init -x509write_crt_pem mbedtls_x509write_crt_pem -x509write_crt_set_authority_key_identifier mbedtls_x509write_crt_set_authority_key_identifier -x509write_crt_set_basic_constraints mbedtls_x509write_crt_set_basic_constraints -x509write_crt_set_extension mbedtls_x509write_crt_set_extension -x509write_crt_set_issuer_key mbedtls_x509write_crt_set_issuer_key -x509write_crt_set_issuer_name mbedtls_x509write_crt_set_issuer_name -x509write_crt_set_key_usage mbedtls_x509write_crt_set_key_usage -x509write_crt_set_md_alg mbedtls_x509write_crt_set_md_alg -x509write_crt_set_ns_cert_type mbedtls_x509write_crt_set_ns_cert_type -x509write_crt_set_serial mbedtls_x509write_crt_set_serial -x509write_crt_set_subject_key mbedtls_x509write_crt_set_subject_key -x509write_crt_set_subject_key_identifier mbedtls_x509write_crt_set_subject_key_identifier -x509write_crt_set_subject_name mbedtls_x509write_crt_set_subject_name -x509write_crt_set_validity mbedtls_x509write_crt_set_validity -x509write_crt_set_version mbedtls_x509write_crt_set_version -x509write_csr mbedtls_x509write_csr -x509write_csr_der mbedtls_x509write_csr_der -x509write_csr_free mbedtls_x509write_csr_free -x509write_csr_init mbedtls_x509write_csr_init -x509write_csr_pem mbedtls_x509write_csr_pem -x509write_csr_set_extension mbedtls_x509write_csr_set_extension -x509write_csr_set_key mbedtls_x509write_csr_set_key -x509write_csr_set_key_usage mbedtls_x509write_csr_set_key_usage -x509write_csr_set_md_alg mbedtls_x509write_csr_set_md_alg -x509write_csr_set_ns_cert_type mbedtls_x509write_csr_set_ns_cert_type -x509write_csr_set_subject_name mbedtls_x509write_csr_set_subject_name -xtea_context mbedtls_xtea_context -xtea_crypt_cbc mbedtls_xtea_crypt_cbc -xtea_crypt_ecb mbedtls_xtea_crypt_ecb -xtea_free mbedtls_xtea_free -xtea_init mbedtls_xtea_init -xtea_self_test mbedtls_xtea_self_test -xtea_setup mbedtls_xtea_setup diff --git a/build/premake/premake5/contrib/mbedtls/scripts/data_files/version_features.fmt b/build/premake/premake5/contrib/mbedtls/scripts/data_files/version_features.fmt deleted file mode 100644 index 767eda1c74..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/data_files/version_features.fmt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Version feature information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_VERSION_C) - -#include "mbedtls/version.h" - -#include - -static const char *features[] = { -#if defined(MBEDTLS_VERSION_FEATURES) -FEATURE_DEFINES -#endif /* MBEDTLS_VERSION_FEATURES */ - NULL -}; - -int mbedtls_version_check_feature( const char *feature ) -{ - const char **idx = features; - - if( *idx == NULL ) - return( -2 ); - - if( feature == NULL ) - return( -1 ); - - while( *idx != NULL ) - { - if( !strcmp( *idx, feature ) ) - return( 0 ); - idx++; - } - return( -1 ); -} - -#endif /* MBEDTLS_VERSION_C */ diff --git a/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-app-template.dsp b/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-app-template.dsp deleted file mode 100644 index ff7c00e57c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-app-template.dsp +++ /dev/null @@ -1,101 +0,0 @@ -# Microsoft Developer Studio Project File - Name="" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG= - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f ".mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f ".mak" CFG=" - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE " - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE " - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == " - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "" -# PROP BASE Intermediate_Dir "temp" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "temp" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == " - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "" -# PROP BASE Intermediate_Dir "temp" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "temp" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name " - Win32 Release" -# Name " - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\programs\.c -# ADD CPP /I "../../include" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-main-template.dsp b/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-main-template.dsp deleted file mode 100644 index 3f4d5c413d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-main-template.dsp +++ /dev/null @@ -1,94 +0,0 @@ -# Microsoft Developer Studio Project File - Name="mbedtls" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=mbedtls - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "mbedtls.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mbedtls.mak" CFG="mbedtls - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mbedtls - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "mbedtls - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mbedtls - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "" -# PROP BASE Intermediate_Dir "temp" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "temp" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "mbedtls - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "" -# PROP BASE Intermediate_Dir "temp" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "temp" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "mbedtls - Win32 Release" -# Name "mbedtls - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -SOURCE_ENTRIES -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -HEADER_ENTRIES -# End Group -# End Target -# End Project diff --git a/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-workspace-template.dsw b/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-workspace-template.dsw deleted file mode 100644 index 9b2e262dff..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/data_files/vs6-workspace-template.dsw +++ /dev/null @@ -1,18 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -APP_ENTRIES -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/build/premake/premake5/contrib/mbedtls/scripts/ecc-heap.sh b/build/premake/premake5/contrib/mbedtls/scripts/ecc-heap.sh deleted file mode 100644 index 94a04cf7ec..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/ecc-heap.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -# Measure heap usage (and performance) of ECC operations with various values of -# the relevant tunable compile-time parameters. -# -# Usage (preferably on a 32-bit platform): -# cmake -D CMAKE_BUILD_TYPE=Release . -# scripts/ecc-heap.sh | tee ecc-heap.log - -set -eu - -CONFIG_H='include/mbedtls/config.h' - -if [ -r $CONFIG_H ]; then :; else - echo "$CONFIG_H not found" >&2 - exit 1 -fi - -if grep -i cmake Makefile >/dev/null; then :; else - echo "Needs Cmake" >&2 - exit 1 -fi - -if git status | grep -F $CONFIG_H >/dev/null 2>&1; then - echo "config.h not clean" >&2 - exit 1 -fi - -CONFIG_BAK=${CONFIG_H}.bak -cp $CONFIG_H $CONFIG_BAK - -cat << EOF >$CONFIG_H -#define MBEDTLS_PLATFORM_C -#define MBEDTLS_PLATFORM_MEMORY -#define MBEDTLS_MEMORY_BUFFER_ALLOC_C -#define MBEDTLS_MEMORY_DEBUG - -#define MBEDTLS_TIMING_C - -#define MBEDTLS_BIGNUM_C -#define MBEDTLS_ECP_C -#define MBEDTLS_ASN1_PARSE_C -#define MBEDTLS_ASN1_WRITE_C -#define MBEDTLS_ECDSA_C -#define MBEDTLS_ECDH_C - -#define MBEDTLS_ECP_DP_SECP192R1_ENABLED -#define MBEDTLS_ECP_DP_SECP224R1_ENABLED -#define MBEDTLS_ECP_DP_SECP256R1_ENABLED -#define MBEDTLS_ECP_DP_SECP384R1_ENABLED -#define MBEDTLS_ECP_DP_SECP521R1_ENABLED -#define MBEDTLS_ECP_DP_CURVE25519_ENABLED - -#include "check_config.h" - -//#define MBEDTLS_ECP_WINDOW_SIZE 6 -//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 -EOF - -for F in 0 1; do - for W in 2 3 4 5 6; do - scripts/config.pl set MBEDTLS_ECP_WINDOW_SIZE $W - scripts/config.pl set MBEDTLS_ECP_FIXED_POINT_OPTIM $F - make benchmark >/dev/null 2>&1 - echo "fixed point optim = $F, max window size = $W" - echo "--------------------------------------------" - programs/test/benchmark - done -done - -# cleanup - -mv $CONFIG_BAK $CONFIG_H -make clean diff --git a/build/premake/premake5/contrib/mbedtls/scripts/find-mem-leak.cocci b/build/premake/premake5/contrib/mbedtls/scripts/find-mem-leak.cocci deleted file mode 100644 index 5cfe4522da..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/find-mem-leak.cocci +++ /dev/null @@ -1,20 +0,0 @@ -@@ -expression x, y; -statement S; -@@ - x = mbedtls_malloc(...); - y = mbedtls_malloc(...); - ... -* if (x == NULL || y == NULL) - S - -@@ -expression x, y; -statement S; -@@ - if ( -* (x = mbedtls_malloc(...)) == NULL - || -* (y = mbedtls_malloc(...)) == NULL - ) - S diff --git a/build/premake/premake5/contrib/mbedtls/scripts/footprint.sh b/build/premake/premake5/contrib/mbedtls/scripts/footprint.sh deleted file mode 100644 index 87d62dfc4c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/footprint.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh - -set -eu - -CONFIG_H='include/mbedtls/config.h' - -if [ -r $CONFIG_H ]; then :; else - echo "$CONFIG_H not found" >&2 - echo "This script needs to be run from the root of" >&2 - echo "a git checkout or uncompressed tarball" >&2 - exit 1 -fi - -if grep -i cmake Makefile >/dev/null; then - echo "Not compatible with CMake" >&2 - exit 1 -fi - -if which arm-none-eabi-gcc >/dev/null 2>&1; then :; else - echo "You need the ARM-GCC toolchain in your path" >&2 - echo "See https://launchpad.net/gcc-arm-embedded/" >&2 - exit 1 -fi - -ARMGCC_FLAGS='-Os -march=armv7-m -mthumb' -OUTFILE='00-footprint-summary.txt' - -log() -{ - echo "$@" - echo "$@" >> "$OUTFILE" -} - -doit() -{ - NAME="$1" - FILE="$2" - - log "" - log "$NAME ($FILE):" - - cp $CONFIG_H ${CONFIG_H}.bak - if [ "$FILE" != $CONFIG_H ]; then - cp "$FILE" $CONFIG_H - fi - - { - scripts/config.pl unset MBEDTLS_NET_C || true - scripts/config.pl unset MBEDTLS_TIMING_C || true - scripts/config.pl unset MBEDTLS_FS_IO || true - } >/dev/null 2>&1 - - CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld \ - CFLAGS="$ARMGCC_FLAGS" make clean lib >/dev/null - - OUT="size-${NAME}.txt" - arm-none-eabi-size -t library/libmbed*.a > "$OUT" - log "$( head -n1 "$OUT" )" - log "$( tail -n1 "$OUT" )" - - cp ${CONFIG_H}.bak $CONFIG_H -} - -# truncate the file just this time -echo "(generated by $0)" > "$OUTFILE" -echo "" >> "$OUTFILE" - -log "Footprint of standard configurations (minus net.c, timing.c, fs_io)" -log "for bare-metal ARM Cortex-M3/M4 microcontrollers." - -VERSION_H="include/mbedtls/version.h" -MBEDTLS_VERSION=$( sed -n 's/.*VERSION_STRING *"\(.*\)"/\1/p' $VERSION_H ) -if git rev-parse HEAD >/dev/null; then - GIT_HEAD=$( git rev-parse HEAD | head -c 10 ) - GIT_VERSION=" (git head: $GIT_HEAD)" -else - GIT_VERSION="" -fi - -log "" -log "mbed TLS $MBEDTLS_VERSION$GIT_VERSION" -log "$( arm-none-eabi-gcc --version | head -n1 )" -log "CFLAGS=$ARMGCC_FLAGS" - -# creates the yotta config -yotta/create-module.sh >/dev/null - -doit default include/mbedtls/config.h -doit yotta yotta/module/mbedtls/config.h -doit thread configs/config-thread.h -doit suite-b configs/config-suite-b.h -doit psk configs/config-ccm-psk-tls1_2.h - -zip mbedtls-footprint.zip "$OUTFILE" size-*.txt >/dev/null diff --git a/build/premake/premake5/contrib/mbedtls/scripts/generate_errors.pl b/build/premake/premake5/contrib/mbedtls/scripts/generate_errors.pl deleted file mode 100644 index 9605d68026..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/generate_errors.pl +++ /dev/null @@ -1,195 +0,0 @@ -#!/usr/bin/perl - -# Generate error.c -# -# Usage: ./generate_errors.pl or scripts/generate_errors.pl without arguments, -# or generate_errors.pl include_dir data_dir error_file - -use strict; - -my ($include_dir, $data_dir, $error_file); - -if( @ARGV ) { - die "Invalid number of arguments" if scalar @ARGV != 3; - ($include_dir, $data_dir, $error_file) = @ARGV; - - -d $include_dir or die "No such directory: $include_dir\n"; - -d $data_dir or die "No such directory: $data_dir\n"; -} else { - $include_dir = 'include/mbedtls'; - $data_dir = 'scripts/data_files'; - $error_file = 'library/error.c'; - - unless( -d $include_dir && -d $data_dir ) { - chdir '..' or die; - -d $include_dir && -d $data_dir - or die "Without arguments, must be run from root or scripts\n" - } -} - -my $error_format_file = $data_dir.'/error.fmt'; - -my @low_level_modules = ( "AES", "ASN1", "BLOWFISH", "CAMELLIA", "BIGNUM", - "BASE64", "XTEA", "PBKDF2", "OID", - "PADLOCK", "DES", "NET", "CTR_DRBG", "ENTROPY", - "HMAC_DRBG", "MD2", "MD4", "MD5", "RIPEMD160", - "SHA1", "SHA256", "SHA512", "GCM", "THREADING", "CCM" ); -my @high_level_modules = ( "PEM", "X509", "DHM", "RSA", "ECP", "MD", "CIPHER", "SSL", - "PK", "PKCS12", "PKCS5" ); - -my $line_separator = $/; -undef $/; - -open(FORMAT_FILE, "$error_format_file") or die "Opening error format file '$error_format_file': $!"; -my $error_format = ; -close(FORMAT_FILE); - -$/ = $line_separator; - -open(GREP, "grep \"define MBEDTLS_ERR_\" $include_dir/* |") || die("Failure when calling grep: $!"); - -my $ll_old_define = ""; -my $hl_old_define = ""; - -my $ll_code_check = ""; -my $hl_code_check = ""; - -my $headers = ""; - -my %error_codes_seen; - -while (my $line = ) -{ - next if ($line =~ /compat-1.2.h/); - my ($error_name, $error_code) = $line =~ /(MBEDTLS_ERR_\w+)\s+\-(0x\w+)/; - my ($description) = $line =~ /\/\*\*< (.*?)\.? \*\//; - - die "Duplicated error code: $error_code ($error_name)\n" - if( $error_codes_seen{$error_code}++ ); - - $description =~ s/\\/\\\\/g; - if ($description eq "") { - $description = "DESCRIPTION MISSING"; - warn "Missing description for $error_name\n"; - } - - my ($module_name) = $error_name =~ /^MBEDTLS_ERR_([^_]+)/; - - # Fix faulty ones - $module_name = "BIGNUM" if ($module_name eq "MPI"); - $module_name = "CTR_DRBG" if ($module_name eq "CTR"); - $module_name = "HMAC_DRBG" if ($module_name eq "HMAC"); - - my $define_name = $module_name; - $define_name = "X509_USE,X509_CREATE" if ($define_name eq "X509"); - $define_name = "ASN1_PARSE" if ($define_name eq "ASN1"); - $define_name = "SSL_TLS" if ($define_name eq "SSL"); - $define_name = "PEM_PARSE,PEM_WRITE" if ($define_name eq "PEM"); - - my $include_name = $module_name; - $include_name =~ tr/A-Z/a-z/; - $include_name = "" if ($include_name eq "asn1"); - - my $found_ll = grep $_ eq $module_name, @low_level_modules; - my $found_hl = grep $_ eq $module_name, @high_level_modules; - if (!$found_ll && !$found_hl) - { - printf("Error: Do not know how to handle: $module_name\n"); - exit 1; - } - - my $code_check; - my $old_define; - my $white_space; - my $first; - - if ($found_ll) - { - $code_check = \$ll_code_check; - $old_define = \$ll_old_define; - $white_space = ' '; - } - else - { - $code_check = \$hl_code_check; - $old_define = \$hl_old_define; - $white_space = ' '; - } - - if ($define_name ne ${$old_define}) - { - if (${$old_define} ne "") - { - ${$code_check} .= "#endif /* "; - $first = 0; - foreach my $dep (split(/,/, ${$old_define})) - { - ${$code_check} .= " || " if ($first++); - ${$code_check} .= "MBEDTLS_${dep}_C"; - } - ${$code_check} .= " */\n\n"; - } - - ${$code_check} .= "#if "; - $headers .= "#if " if ($include_name ne ""); - $first = 0; - foreach my $dep (split(/,/, ${define_name})) - { - ${$code_check} .= " || " if ($first); - $headers .= " || " if ($first++); - - ${$code_check} .= "defined(MBEDTLS_${dep}_C)"; - $headers .= "defined(MBEDTLS_${dep}_C)" if - ($include_name ne ""); - } - ${$code_check} .= "\n"; - $headers .= "\n#include \"mbedtls/${include_name}.h\"\n". - "#endif\n\n" if ($include_name ne ""); - ${$old_define} = $define_name; - } - - if ($error_name eq "MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE") - { - ${$code_check} .= "${white_space}if( use_ret == -($error_name) )\n". - "${white_space}\{\n". - "${white_space} mbedtls_snprintf( buf, buflen, \"$module_name - $description\" );\n". - "${white_space} return;\n". - "${white_space}}\n" - } - else - { - ${$code_check} .= "${white_space}if( use_ret == -($error_name) )\n". - "${white_space} mbedtls_snprintf( buf, buflen, \"$module_name - $description\" );\n" - } -}; - -if ($ll_old_define ne "") -{ - $ll_code_check .= "#endif /* "; - my $first = 0; - foreach my $dep (split(/,/, $ll_old_define)) - { - $ll_code_check .= " || " if ($first++); - $ll_code_check .= "MBEDTLS_${dep}_C"; - } - $ll_code_check .= " */\n"; -} -if ($hl_old_define ne "") -{ - $hl_code_check .= "#endif /* "; - my $first = 0; - foreach my $dep (split(/,/, $hl_old_define)) - { - $hl_code_check .= " || " if ($first++); - $hl_code_check .= "MBEDTLS_${dep}_C"; - } - $hl_code_check .= " */\n"; -} - -$error_format =~ s/HEADER_INCLUDED\n/$headers/g; -$error_format =~ s/LOW_LEVEL_CODE_CHECKS\n/$ll_code_check/g; -$error_format =~ s/HIGH_LEVEL_CODE_CHECKS\n/$hl_code_check/g; - -open(ERROR_FILE, ">$error_file") or die "Opening destination file '$error_file': $!"; -print ERROR_FILE $error_format; -close(ERROR_FILE); diff --git a/build/premake/premake5/contrib/mbedtls/scripts/generate_features.pl b/build/premake/premake5/contrib/mbedtls/scripts/generate_features.pl deleted file mode 100644 index 2aa695c544..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/generate_features.pl +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -# - -use strict; - -my ($include_dir, $data_dir, $feature_file); - -if( @ARGV ) { - die "Invalid number of arguments" if scalar @ARGV != 3; - ($include_dir, $data_dir, $feature_file) = @ARGV; - - -d $include_dir or die "No such directory: $include_dir\n"; - -d $data_dir or die "No such directory: $data_dir\n"; -} else { - $include_dir = 'include/mbedtls'; - $data_dir = 'scripts/data_files'; - $feature_file = 'library/version_features.c'; - - unless( -d $include_dir && -d $data_dir ) { - chdir '..' or die; - -d $include_dir && -d $data_dir - or die "Without arguments, must be run from root or scripts\n" - } -} - -my $feature_format_file = $data_dir.'/version_features.fmt'; - -my @sections = ( "System support", "mbed TLS modules", - "mbed TLS feature support" ); - -my $line_separator = $/; -undef $/; - -open(FORMAT_FILE, "$feature_format_file") or die "Opening feature format file '$feature_format_file': $!"; -my $feature_format = ; -close(FORMAT_FILE); - -$/ = $line_separator; - -open(CONFIG_H, "$include_dir/config.h") || die("Failure when opening config.h: $!"); - -my $feature_defines = ""; -my $in_section = 0; - -while (my $line = ) -{ - next if ($in_section && $line !~ /#define/ && $line !~ /SECTION/); - next if (!$in_section && $line !~ /SECTION/); - - if ($in_section) { - if ($line =~ /SECTION/) { - $in_section = 0; - next; - } - - my ($define) = $line =~ /#define (\w+)/; - $feature_defines .= "#if defined(${define})\n"; - $feature_defines .= " \"${define}\",\n"; - $feature_defines .= "#endif /* ${define} */\n"; - } - - if (!$in_section) { - my ($section_name) = $line =~ /SECTION: ([\w ]+)/; - my $found_section = grep $_ eq $section_name, @sections; - - $in_section = 1 if ($found_section); - } -}; - -$feature_format =~ s/FEATURE_DEFINES\n/$feature_defines/g; - -open(ERROR_FILE, ">$feature_file") or die "Opening destination file '$feature_file': $!"; -print ERROR_FILE $feature_format; -close(ERROR_FILE); diff --git a/build/premake/premake5/contrib/mbedtls/scripts/generate_visualc_files.pl b/build/premake/premake5/contrib/mbedtls/scripts/generate_visualc_files.pl deleted file mode 100644 index 8d36653b4c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/generate_visualc_files.pl +++ /dev/null @@ -1,195 +0,0 @@ -#!/usr/bin/perl - -# Generate files for MS Visual Studio: -# - for VS6: main project (library) file, individual app files, workspace -# - for VS2010: main file, individual apps, solution file -# -# Must be run from mbedTLS root or scripts directory. -# Takes no argument. - -use warnings; -use strict; -use Digest::MD5 'md5_hex'; - -my $vsx_dir = "visualc/VS2010"; -my $vsx_ext = "vcxproj"; -my $vsx_app_tpl_file = "scripts/data_files/vs2010-app-template.$vsx_ext"; -my $vsx_main_tpl_file = "scripts/data_files/vs2010-main-template.$vsx_ext"; -my $vsx_main_file = "$vsx_dir/mbedTLS.$vsx_ext"; -my $vsx_sln_tpl_file = "scripts/data_files/vs2010-sln-template.sln"; -my $vsx_sln_file = "$vsx_dir/mbedTLS.sln"; - -my $programs_dir = 'programs'; -my $header_dir = 'include/mbedtls'; -my $source_dir = 'library'; - -# Need windows line endings! -my $vsx_hdr_tpl = <\r -EOT -my $vsx_src_tpl = <\r -EOT - -my $vsx_sln_app_entry_tpl = <; - close $fh; - - return $content; -} - -sub content_to_file { - my ($content, $filename) = @_; - - open my $fh, '>', $filename or die "Could not write to $filename\n"; - print $fh $content; - close $fh; -} - -sub gen_app_guid { - my ($path) = @_; - - my $guid = md5_hex( "mbedTLS:$path" ); - $guid =~ s/(.{8})(.{4})(.{4})(.{4})(.{12})/\U{$1-$2-$3-$4-$5}/; - - return $guid; -} - -sub gen_app { - my ($path, $template, $dir, $ext) = @_; - - my $guid = gen_app_guid( $path ); - $path =~ s!/!\\!g; - (my $appname = $path) =~ s/.*\\//; - - my $content = $template; - $content =~ s//$path/g; - $content =~ s//$appname/g; - $content =~ s//$guid/g; - - content_to_file( $content, "$dir/$appname.$ext" ); -} - -sub get_app_list { - my $app_list = `cd $programs_dir && make list`; - die "make list failed: $!\n" if $?; - - return split /\s+/, $app_list; -} - -sub gen_app_files { - my @app_list = @_; - - my $vsx_tpl = slurp_file( $vsx_app_tpl_file ); - - for my $app ( @app_list ) { - gen_app( $app, $vsx_tpl, $vsx_dir, $vsx_ext ); - } -} - -sub gen_entry_list { - my ($tpl, @names) = @_; - - my $entries; - for my $name (@names) { - (my $entry = $tpl) =~ s/{NAME}/$name/g; - $entries .= $entry; - } - - return $entries; -} - -sub gen_main_file { - my ($headers, $sources, $hdr_tpl, $src_tpl, $main_tpl, $main_out) = @_; - - my $header_entries = gen_entry_list( $hdr_tpl, @$headers ); - my $source_entries = gen_entry_list( $src_tpl, @$sources ); - - my $out = slurp_file( $main_tpl ); - $out =~ s/SOURCE_ENTRIES\r\n/$source_entries/m; - $out =~ s/HEADER_ENTRIES\r\n/$header_entries/m; - - content_to_file( $out, $main_out ); -} - -sub gen_vsx_solution { - my (@app_names) = @_; - - my ($app_entries, $conf_entries); - for my $path (@app_names) { - my $guid = gen_app_guid( $path ); - (my $appname = $path) =~ s!.*/!!; - - my $app_entry = $vsx_sln_app_entry_tpl; - $app_entry =~ s/{APPNAME}/$appname/g; - $app_entry =~ s/{GUID}/$guid/g; - - $app_entries .= $app_entry; - - my $conf_entry = $vsx_sln_conf_entry_tpl; - $conf_entry =~ s/{GUID}/$guid/g; - - $conf_entries .= $conf_entry; - } - - my $out = slurp_file( $vsx_sln_tpl_file ); - $out =~ s/APP_ENTRIES\r\n/$app_entries/m; - $out =~ s/CONF_ENTRIES\r\n/$conf_entries/m; - - content_to_file( $out, $vsx_sln_file ); -} - -sub main { - if( ! check_dirs() ) { - chdir '..' or die; - check_dirs or die "Must but run from mbedTLS root or scripts dir\n"; - } - - my @app_list = get_app_list(); - my @headers = <$header_dir/*.h>; - my @sources = <$source_dir/*.c>; - map { s!/!\\!g } @headers; - map { s!/!\\!g } @sources; - - gen_app_files( @app_list ); - - gen_main_file( \@headers, \@sources, - $vsx_hdr_tpl, $vsx_src_tpl, - $vsx_main_tpl_file, $vsx_main_file ); - - gen_vsx_solution( @app_list ); - - return 0; -} diff --git a/build/premake/premake5/contrib/mbedtls/scripts/malloc-init.pl b/build/premake/premake5/contrib/mbedtls/scripts/malloc-init.pl deleted file mode 100644 index b7d6fcface..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/malloc-init.pl +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl - -# Check for malloc calls not shortly followed by initialisation. -# -# Known limitations: -# - false negative: can't see allocations spanning more than one line -# - possible false negatives, see patterns -# - false positive: malloc-malloc-init-init is not accepted -# - false positives: "non-standard" init functions (eg, the things being -# initialised is not the first arg, or initialise struct members) -# -# Since false positives are expected, the results must be manually reviewed. -# -# Typical usage: scripts/malloc-init.pl library/*.c - -use warnings; -use strict; - -use utf8; -use open qw(:std utf8); - -my $limit = 7; -my $inits = qr/memset|memcpy|_init|fread|base64_..code/; - -# cases to bear in mind: -# -# 0. foo = malloc(...); memset( foo, ... ); -# 1. *foo = malloc(...); memset( *foo, ... ); -# 2. type *foo = malloc(...); memset( foo, ...); -# 3. foo = malloc(...); foo_init( (type *) foo ); -# 4. foo = malloc(...); for(i=0..n) { init( &foo[i] ); } -# -# The chosen patterns are a bit relaxed, but unlikely to cause false positives -# in real code (initialising *foo or &foo instead of foo will likely be caught -# by functional tests). -# -my $id = qr/([a-zA-Z-0-9_\->\.]*)/; -my $prefix = qr/\s(?:\*?|\&?|\([a-z_]* \*\))\s*/; - -my $name; -my $line; -my @bad; - -die "Usage: $0 file.c [...]\n" unless @ARGV; - -while (my $file = shift @ARGV) -{ - open my $fh, "<", $file or die "read $file failed: $!\n"; - while (<$fh>) - { - if( /mbedtls_malloc\(/ ) { - if( /$id\s*=.*mbedtls_malloc\(/ ) { - push @bad, "$file:$line:$name" if $name; - $name = $1; - $line = $.; - } else { - push @bad, "$file:$.:???" unless /return mbedtls_malloc/; - } - } elsif( $name && /(?:$inits)\($prefix\Q$name\E\b/ ) { - undef $name; - } elsif( $name && $. - $line > $limit ) { - push @bad, "$file:$line:$name"; - undef $name; - undef $line; - } - } - close $fh or die; -} - -print "$_\n" for @bad; diff --git a/build/premake/premake5/contrib/mbedtls/scripts/massif_max.pl b/build/premake/premake5/contrib/mbedtls/scripts/massif_max.pl deleted file mode 100644 index d1ce4ca7de..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/massif_max.pl +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/perl - -# Parse a massif.out.xxx file and output peak total memory usage - -use warnings; -use strict; - -use utf8; -use open qw(:std utf8); - -die unless @ARGV == 1; - -my @snaps; -open my $fh, '<', $ARGV[0] or die; -{ local $/ = 'snapshot='; @snaps = <$fh>; } -close $fh or die; - -my ($max, $max_heap, $max_he, $max_stack) = (0, 0, 0, 0); -for (@snaps) -{ - my ($heap, $heap_extra, $stack) = m{ - mem_heap_B=(\d+)\n - mem_heap_extra_B=(\d+)\n - mem_stacks_B=(\d+) - }xm; - next unless defined $heap; - my $total = $heap + $heap_extra + $stack; - if( $total > $max ) { - ($max, $max_heap, $max_he, $max_stack) = ($total, $heap, $heap_extra, $stack); - } -} - -printf "$max (heap $max_heap+$max_he, stack $max_stack)\n"; diff --git a/build/premake/premake5/contrib/mbedtls/scripts/memory.sh b/build/premake/premake5/contrib/mbedtls/scripts/memory.sh deleted file mode 100644 index 3dad2899c7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/memory.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/sh - -# Measure memory usage of a minimal client using a small configuration -# Currently hardwired to ccm-psk and suite-b, may be expanded later -# -# Use different build options for measuring executable size and memory usage, -# since for memory we want debug information. - -set -eu - -CONFIG_H='include/mbedtls/config.h' - -CLIENT='mini_client' - -CFLAGS_EXEC='-fno-asynchronous-unwind-tables -Wl,--gc-section -ffunction-sections -fdata-sections' -CFLAGS_MEM=-g3 - -if [ -r $CONFIG_H ]; then :; else - echo "$CONFIG_H not found" >&2 - exit 1 -fi - -if grep -i cmake Makefile >/dev/null; then - echo "Not compatible with CMake" >&2 - exit 1 -fi - -if [ $( uname ) != Linux ]; then - echo "Only work on Linux" >&2 - exit 1 -fi - -if git status | grep -F $CONFIG_H >/dev/null 2>&1; then - echo "config.h not clean" >&2 - exit 1 -fi - -# make measurements with one configuration -# usage: do_config -do_config() -{ - NAME=$1 - UNSET_LIST=$2 - SERVER_ARGS=$3 - - echo "" - echo "config-$NAME:" - cp configs/config-$NAME.h $CONFIG_H - scripts/config.pl unset MBEDTLS_SSL_SRV_C - - for FLAG in $UNSET_LIST; do - scripts/config.pl unset $FLAG - done - - grep -F SSL_MAX_CONTENT_LEN $CONFIG_H || echo 'SSL_MAX_CONTENT_LEN=16384' - - printf " Executable size... " - - make clean - CFLAGS=$CFLAGS_EXEC make OFLAGS=-Os lib >/dev/null 2>&1 - cd programs - CFLAGS=$CFLAGS_EXEC make OFLAGS=-Os ssl/$CLIENT >/dev/null - strip ssl/$CLIENT - stat -c '%s' ssl/$CLIENT - cd .. - - printf " Peak ram usage... " - - make clean - CFLAGS=$CFLAGS_MEM make OFLAGS=-Os lib >/dev/null 2>&1 - cd programs - CFLAGS=$CFLAGS_MEM make OFLAGS=-Os ssl/$CLIENT >/dev/null - cd .. - - ./ssl_server2 $SERVER_ARGS >/dev/null & - SRV_PID=$! - sleep 1; - - if valgrind --tool=massif --stacks=yes programs/ssl/$CLIENT >/dev/null 2>&1 - then - FAILED=0 - else - echo "client failed" >&2 - FAILED=1 - fi - - kill $SRV_PID - wait $SRV_PID - - scripts/massif_max.pl massif.out.* - mv massif.out.* massif-$NAME.$$ -} - -# preparation - -CONFIG_BAK=${CONFIG_H}.bak -cp $CONFIG_H $CONFIG_BAK - -rm -f massif.out.* - -printf "building server... " - -make clean -make lib >/dev/null 2>&1 -(cd programs && make ssl/ssl_server2) >/dev/null -cp programs/ssl/ssl_server2 . - -echo "done" - -# actual measurements - -do_config "ccm-psk-tls1_2" \ - "" \ - "psk=000102030405060708090A0B0C0D0E0F" - -do_config "suite-b" \ - "MBEDTLS_BASE64_C MBEDTLS_PEM_PARSE_C MBEDTLS_CERTS_C" \ - "" - -# cleanup - -mv $CONFIG_BAK $CONFIG_H -make clean -rm ssl_server2 - -exit $FAILED diff --git a/build/premake/premake5/contrib/mbedtls/scripts/rename.pl b/build/premake/premake5/contrib/mbedtls/scripts/rename.pl deleted file mode 100644 index c169078e35..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/rename.pl +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/perl - -# rename identifiers (functions, types, enum constant, etc) -# on upgrades of major version according to a list - -use warnings; -use strict; - -use utf8; -use open qw(:std utf8); - -my $usage = "Usage: $0 [-f datafile] [-s] [--] [filenames...]\n"; - -(my $datafile = $0) =~ s/rename.pl$/data_files\/rename-1.3-2.0.txt/; -my $do_strings = 0; - -while( @ARGV && $ARGV[0] =~ /^-/ ) { - my $opt = shift; - if( $opt eq '--' ) { - last; - } elsif( $opt eq '-f' ) { - $datafile = shift; - } elsif( $opt eq '-s' ) { - $do_strings = 1; shift; - } else { - die $usage; - } -} - -my %subst; -open my $nfh, '<', $datafile or die "Could not read $datafile\n"; -my $ident = qr/[_A-Za-z][_A-Za-z0-9]*/; -while( my $line = <$nfh> ) { - chomp $line; - my ( $old, $new ) = ( $line =~ /^($ident)\s+($ident)$/ ); - if( ! $old || ! $new ) { - die "$0: $datafile:$.: bad input '$line'\n"; - } - $subst{$old} = $new; -} -close $nfh or die; - -my $string = qr/"(?:\\.|[^\\"])*"/; -my $space = qr/\s+/; -my $idnum = qr/[a-zA-Z0-9_]+/; -my $symbols = qr/[-!#\$%&'()*+,.\/:;<=>?@[\\\]^_`{|}~]+|"/; - -# if we replace inside strings, we don't consider them a token -my $token = $do_strings ? qr/$space|$idnum|$symbols/ - : qr/$string|$space|$idnum|$symbols/; - -my %warnings; - -while( my $filename = shift ) -{ - print STDERR "$filename... "; - if( -d $filename ) { print STDERR "skip (directory)\n"; next } - - open my $rfh, '<', $filename or die; - my @lines = <$rfh>; - close $rfh or die; - - my @out; - for my $line (@lines) { - if( $line =~ /#include/ ) { - $line =~ s/polarssl/mbedtls/; - $line =~ s/POLARSSL/MBEDTLS/; - push( @out, $line ); - next; - } - - my @words = ($line =~ /$token/g); - my $checkline = join '', @words; - if( $checkline eq $line ) { - my @new = map { exists $subst{$_} ? $subst{$_} : $_ } @words; - push( @out, join '', @new ); - } else { - $warnings{$filename} = [] unless $warnings{$filename}; - push @{ $warnings{$filename} }, $line; - push( @out, $line ); - } - } - - open my $wfh, '>', $filename or die; - print $wfh $_ for @out; - close $wfh or die; - print STDERR "done\n"; -} - -if( %warnings ) { - print "\nWarning: lines skipped due to unexpected characters:\n"; - for my $filename (sort keys %warnings) { - print "in $filename:\n"; - print for @{ $warnings{$filename} }; - } -} diff --git a/build/premake/premake5/contrib/mbedtls/scripts/rm-malloc-cast.cocci b/build/premake/premake5/contrib/mbedtls/scripts/rm-malloc-cast.cocci deleted file mode 100644 index 9337dc5019..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/rm-malloc-cast.cocci +++ /dev/null @@ -1,7 +0,0 @@ -@rm_malloc_cast@ -expression x, n; -type T; -@@ - x = -- (T *) - mbedtls_malloc(n) diff --git a/build/premake/premake5/contrib/mbedtls/scripts/tmp_ignore_makefiles.sh b/build/premake/premake5/contrib/mbedtls/scripts/tmp_ignore_makefiles.sh deleted file mode 100644 index df9450e14f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/scripts/tmp_ignore_makefiles.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Temporarily (de)ignore Makefiles generated by CMake to allow easier -# git development - -IGNORE="" - -# Parse arguments -# -until [ -z "$1" ] -do - case "$1" in - -u|--undo) - IGNORE="0" - ;; - -v|--verbose) - # Be verbose - VERBOSE="1" - ;; - -h|--help) - # print help - echo "Usage: $0" - echo -e " -h|--help\t\tPrint this help." - echo -e " -u|--undo\t\tRemove ignores and continue tracking." - echo -e " -v|--verbose\t\tVerbose." - exit 1 - ;; - *) - # print error - echo "Unknown argument: '$1'" - exit 1 - ;; - esac - shift -done - -if [ "X" = "X$IGNORE" ]; -then - [ $VERBOSE ] && echo "Ignoring Makefiles" - git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile -else - [ $VERBOSE ] && echo "Tracking Makefiles" - git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile -fi diff --git a/build/premake/premake5/contrib/mbedtls/tests/CMakeLists.txt b/build/premake/premake5/contrib/mbedtls/tests/CMakeLists.txt deleted file mode 100644 index 1cca81830e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/CMakeLists.txt +++ /dev/null @@ -1,120 +0,0 @@ -set(libs - mbedtls -) - -if(USE_PKCS11_HELPER_LIBRARY) - set(libs ${libs} pkcs11-helper) -endif(USE_PKCS11_HELPER_LIBRARY) - -if(ENABLE_ZLIB_SUPPORT) - set(libs ${libs} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB_SUPPORT) - -function(add_test_suite suite_name) - if(ARGV1) - set(data_name ${ARGV1}) - else() - set(data_name ${suite_name}) - endif() - - add_custom_command( - OUTPUT test_suite_${data_name}.c - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl ${CMAKE_CURRENT_SOURCE_DIR}/suites test_suite_${suite_name} test_suite_${data_name} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl mbedtls suites/helpers.function suites/main_test.function suites/test_suite_${suite_name}.function suites/test_suite_${data_name}.data - ) - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - add_executable(test_suite_${data_name} test_suite_${data_name}.c) - target_link_libraries(test_suite_${data_name} ${libs}) - add_test(${data_name}-suite test_suite_${data_name}) -endfunction(add_test_suite) - -if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") -endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - -if(MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w") # no warnings here -endif(MSVC) - -add_test_suite(aes aes.ecb) -add_test_suite(aes aes.cbc) -add_test_suite(aes aes.cfb) -add_test_suite(aes aes.rest) -add_test_suite(arc4) -add_test_suite(asn1write) -add_test_suite(base64) -add_test_suite(blowfish) -add_test_suite(camellia) -add_test_suite(ccm) -add_test_suite(cipher cipher.aes) -add_test_suite(cipher cipher.arc4) -add_test_suite(cipher cipher.blowfish) -add_test_suite(cipher cipher.camellia) -add_test_suite(cipher cipher.ccm) -add_test_suite(cipher cipher.des) -add_test_suite(cipher cipher.gcm) -add_test_suite(cipher cipher.null) -add_test_suite(cipher cipher.padding) -add_test_suite(ctr_drbg) -add_test_suite(debug) -add_test_suite(des) -add_test_suite(dhm) -add_test_suite(ecdh) -add_test_suite(ecdsa) -add_test_suite(ecjpake) -add_test_suite(ecp) -add_test_suite(entropy) -add_test_suite(error) -add_test_suite(gcm gcm.aes128_en) -add_test_suite(gcm gcm.aes192_en) -add_test_suite(gcm gcm.aes256_en) -add_test_suite(gcm gcm.aes128_de) -add_test_suite(gcm gcm.aes192_de) -add_test_suite(gcm gcm.aes256_de) -add_test_suite(gcm gcm.camellia) -add_test_suite(hmac_drbg hmac_drbg.misc) -add_test_suite(hmac_drbg hmac_drbg.no_reseed) -add_test_suite(hmac_drbg hmac_drbg.nopr) -add_test_suite(hmac_drbg hmac_drbg.pr) -add_test_suite(md) -add_test_suite(mdx) -add_test_suite(memory_buffer_alloc) -add_test_suite(mpi) -add_test_suite(pem) -add_test_suite(pkcs1_v21) -add_test_suite(pkcs5) -add_test_suite(pk) -add_test_suite(pkparse) -add_test_suite(pkwrite) -add_test_suite(shax) -add_test_suite(ssl) -add_test_suite(rsa) -add_test_suite(version) -add_test_suite(xtea) -add_test_suite(x509parse) -add_test_suite(x509write) - -# Make data_files available in an out-of-source build -if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) - # Get OS dependent path to use in `execute_process` - file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/data_files" link) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data_files" target) - - if (NOT EXISTS ${link}) - if (CMAKE_HOST_UNIX) - set(command ln -s ${target} ${link}) - else() - set(command cmd.exe /c mklink /d ${link} ${target}) - endif() - - execute_process(COMMAND ${command} - RESULT_VARIABLE result - ERROR_VARIABLE output) - - if (NOT ${result} EQUAL 0) - message(FATAL_ERROR "Could not create symbolic link for: ${target} --> ${output}") - endif() - endif() -endif() - diff --git a/build/premake/premake5/contrib/mbedtls/tests/Descriptions.txt b/build/premake/premake5/contrib/mbedtls/tests/Descriptions.txt deleted file mode 100644 index 8b13bb39f0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/Descriptions.txt +++ /dev/null @@ -1,22 +0,0 @@ -test_suites - The various 'test_suite_XXX' programs from the 'tests' directory, executed - using 'make check' (Unix make) or 'make test' (Cmake), include test cases - (reference test vectors, sanity checks, malformed input for parsing - functions, etc.) for all modules except the SSL modules. - -selftests - The 'programs/test/selftest' program runs the 'XXX_self_test()' functions - of each individual module. Most of them are included in the respective - test suite, but some slower ones are only included here. - -compat - The 'tests/compat.sh' script checks interoperability with OpenSSL and - GnuTLS (and ourselves!) for every common ciphersuite, in every TLS - version, both ways (client/server), using client authentication or not. - For each ciphersuite/version/side/authmode it performs a full handshake - and a small data exchange. - -ssl_opt - The 'tests/ssl-opt.sh' script checks various options and/or operations not - covered by compat.sh: session resumption (using session cache or tickets), - renegotiation, SNI, other extensions, etc. diff --git a/build/premake/premake5/contrib/mbedtls/tests/compat.sh b/build/premake/premake5/contrib/mbedtls/tests/compat.sh deleted file mode 100644 index 4b43e33a5e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/compat.sh +++ /dev/null @@ -1,1232 +0,0 @@ -#!/bin/sh - -# Test interop with OpenSSL and GnuTLS (and self-op while at it). -# -# Check each common ciphersuite, with each version, both ways (client/server), -# with and without client authentication. -# -# Peer version requirements: -# - OpenSSL 1.0.1e 11 Feb 2013 (probably NOT since 1.0.1, tested with 1.0.1e) -# - GnuTLS 3.2.15 (probably works since 3.2.12 but tested only with 3.2.15) - -set -u - -# initialise counters -TESTS=0 -FAILED=0 -SKIPPED=0 -SRVMEM=0 - -# default commands, can be overriden by the environment -: ${P_SRV:=../programs/ssl/ssl_server2} -: ${P_CLI:=../programs/ssl/ssl_client2} -: ${OPENSSL_CMD:=openssl} # OPENSSL would conflict with the build system -: ${GNUTLS_CLI:=gnutls-cli} -: ${GNUTLS_SERV:=gnutls-serv} - -# do we have a recent enough GnuTLS? -if ( which $GNUTLS_CLI && which $GNUTLS_SERV ) >/dev/null 2>&1; then - G_VER="$( $GNUTLS_CLI --version | head -n1 )" - if echo "$G_VER" | grep '@VERSION@' > /dev/null; then # git version - PEER_GNUTLS=" GnuTLS" - else - eval $( echo $G_VER | sed 's/.* \([0-9]*\)\.\([0-9]\)*\.\([0-9]*\)$/MAJOR="\1" MINOR="\2" PATCH="\3"/' ) - if [ $MAJOR -lt 3 -o \ - \( $MAJOR -eq 3 -a $MINOR -lt 2 \) -o \ - \( $MAJOR -eq 3 -a $MINOR -eq 2 -a $PATCH -lt 15 \) ] - then - PEER_GNUTLS="" - else - PEER_GNUTLS=" GnuTLS" - fi - fi -else - PEER_GNUTLS="" -fi - -# default values for options -MODES="ssl3 tls1 tls1_1 tls1_2 dtls1 dtls1_2" -VERIFIES="NO YES" -TYPES="ECDSA RSA PSK" -FILTER="" -EXCLUDE='NULL\|DES-CBC-\|RC4\|ARCFOUR' # avoid plain DES but keep 3DES-EDE-CBC (mbedTLS), DES-CBC3 (OpenSSL) -VERBOSE="" -MEMCHECK=0 -PEERS="OpenSSL$PEER_GNUTLS mbedTLS" - -# hidden option: skip DTLS with OpenSSL -# (travis CI has a version that doesn't work for us) -: ${OSSL_NO_DTLS:=0} - -print_usage() { - echo "Usage: $0" - printf " -h|--help\tPrint this help.\n" - printf " -f|--filter\tOnly matching ciphersuites are tested (Default: '$FILTER')\n" - printf " -e|--exclude\tMatching ciphersuites are excluded (Default: '$EXCLUDE')\n" - printf " -m|--modes\tWhich modes to perform (Default: '$MODES')\n" - printf " -t|--types\tWhich key exchange type to perform (Default: '$TYPES')\n" - printf " -V|--verify\tWhich verification modes to perform (Default: '$VERIFIES')\n" - printf " -p|--peers\tWhich peers to use (Default: '$PEERS')\n" - printf " \tAlso available: GnuTLS (needs v3.2.15 or higher)\n" - printf " -M|--memcheck\tCheck memory leaks and errors.\n" - printf " -v|--verbose\tSet verbose output.\n" -} - -get_options() { - while [ $# -gt 0 ]; do - case "$1" in - -f|--filter) - shift; FILTER=$1 - ;; - -e|--exclude) - shift; EXCLUDE=$1 - ;; - -m|--modes) - shift; MODES=$1 - ;; - -t|--types) - shift; TYPES=$1 - ;; - -V|--verify) - shift; VERIFIES=$1 - ;; - -p|--peers) - shift; PEERS=$1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -M|--memcheck) - MEMCHECK=1 - ;; - -h|--help) - print_usage - exit 0 - ;; - *) - echo "Unknown argument: '$1'" - print_usage - exit 1 - ;; - esac - shift - done - - # sanitize some options (modes checked later) - VERIFIES="$( echo $VERIFIES | tr [a-z] [A-Z] )" - TYPES="$( echo $TYPES | tr [a-z] [A-Z] )" -} - -log() { - if [ "X" != "X$VERBOSE" ]; then - echo "" - echo "$@" - fi -} - -# is_dtls -is_dtls() -{ - test "$1" = "dtls1" -o "$1" = "dtls1_2" -} - -# minor_ver -minor_ver() -{ - case "$1" in - ssl3) - echo 0 - ;; - tls1) - echo 1 - ;; - tls1_1|dtls1) - echo 2 - ;; - tls1_2|dtls1_2) - echo 3 - ;; - *) - echo "error: invalid mode: $MODE" >&2 - # exiting is no good here, typically called in a subshell - echo -1 - esac -} - -filter() -{ - LIST="$1" - NEW_LIST="" - - if is_dtls "$MODE"; then - EXCLMODE="$EXCLUDE"'\|RC4\|ARCFOUR' - else - EXCLMODE="$EXCLUDE" - fi - - for i in $LIST; - do - NEW_LIST="$NEW_LIST $( echo "$i" | grep "$FILTER" | grep -v "$EXCLMODE" )" - done - - # normalize whitespace - echo "$NEW_LIST" | sed -e 's/[[:space:]][[:space:]]*/ /g' -e 's/^ //' -e 's/ $//' -} - -# OpenSSL 1.0.1h with -Verify wants a ClientCertificate message even for -# PSK ciphersuites with DTLS, which is incorrect, so disable them for now -check_openssl_server_bug() -{ - if test "X$VERIFY" = "XYES" && is_dtls "$MODE" && \ - echo "$1" | grep "^TLS-PSK" >/dev/null; - then - SKIP_NEXT="YES" - fi -} - -filter_ciphersuites() -{ - if [ "X" != "X$FILTER" -o "X" != "X$EXCLUDE" ]; - then - P_CIPHERS=$( filter "$P_CIPHERS" ) - O_CIPHERS=$( filter "$O_CIPHERS" ) - G_CIPHERS=$( filter "$G_CIPHERS" ) - fi - - # OpenSSL 1.0.1h doesn't support DTLS 1.2 - if [ `minor_ver "$MODE"` -ge 3 ] && is_dtls "$MODE"; then - O_CIPHERS="" - case "$PEER" in - [Oo]pen*) - P_CIPHERS="" - ;; - esac - fi - - # For GnuTLS client -> mbed TLS server, - # we need to force IPv4 by connecting to 127.0.0.1 but then auth fails - if [ "X$VERIFY" = "XYES" ] && is_dtls "$MODE"; then - G_CIPHERS="" - fi -} - -reset_ciphersuites() -{ - P_CIPHERS="" - O_CIPHERS="" - G_CIPHERS="" -} - -add_common_ciphersuites() -{ - case $TYPE in - - "ECDSA") - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-ECDSA-WITH-NULL-SHA \ - TLS-ECDHE-ECDSA-WITH-RC4-128-SHA \ - TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA \ - TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA \ - TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-ECDSA:+NULL:+SHA1 \ - +ECDHE-ECDSA:+ARCFOUR-128:+SHA1 \ - +ECDHE-ECDSA:+3DES-CBC:+SHA1 \ - +ECDHE-ECDSA:+AES-128-CBC:+SHA1 \ - +ECDHE-ECDSA:+AES-256-CBC:+SHA1 \ - " - O_CIPHERS="$O_CIPHERS \ - ECDHE-ECDSA-NULL-SHA \ - ECDHE-ECDSA-RC4-SHA \ - ECDHE-ECDSA-DES-CBC3-SHA \ - ECDHE-ECDSA-AES128-SHA \ - ECDHE-ECDSA-AES256-SHA \ - " - fi - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256 \ - TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384 \ - TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256 \ - TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384 \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-ECDSA:+AES-128-CBC:+SHA256 \ - +ECDHE-ECDSA:+AES-256-CBC:+SHA384 \ - +ECDHE-ECDSA:+AES-128-GCM:+AEAD \ - +ECDHE-ECDSA:+AES-256-GCM:+AEAD \ - " - O_CIPHERS="$O_CIPHERS \ - ECDHE-ECDSA-AES128-SHA256 \ - ECDHE-ECDSA-AES256-SHA384 \ - ECDHE-ECDSA-AES128-GCM-SHA256 \ - ECDHE-ECDSA-AES256-GCM-SHA384 \ - " - fi - ;; - - "RSA") - P_CIPHERS="$P_CIPHERS \ - TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - TLS-DHE-RSA-WITH-AES-256-CBC-SHA \ - TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA \ - TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA \ - TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA \ - TLS-RSA-WITH-AES-256-CBC-SHA \ - TLS-RSA-WITH-CAMELLIA-256-CBC-SHA \ - TLS-RSA-WITH-AES-128-CBC-SHA \ - TLS-RSA-WITH-CAMELLIA-128-CBC-SHA \ - TLS-RSA-WITH-3DES-EDE-CBC-SHA \ - TLS-RSA-WITH-RC4-128-SHA \ - TLS-RSA-WITH-RC4-128-MD5 \ - TLS-RSA-WITH-NULL-MD5 \ - TLS-RSA-WITH-NULL-SHA \ - " - G_CIPHERS="$G_CIPHERS \ - +DHE-RSA:+AES-128-CBC:+SHA1 \ - +DHE-RSA:+AES-256-CBC:+SHA1 \ - +DHE-RSA:+CAMELLIA-128-CBC:+SHA1 \ - +DHE-RSA:+CAMELLIA-256-CBC:+SHA1 \ - +DHE-RSA:+3DES-CBC:+SHA1 \ - +RSA:+AES-256-CBC:+SHA1 \ - +RSA:+CAMELLIA-256-CBC:+SHA1 \ - +RSA:+AES-128-CBC:+SHA1 \ - +RSA:+CAMELLIA-128-CBC:+SHA1 \ - +RSA:+3DES-CBC:+SHA1 \ - +RSA:+ARCFOUR-128:+SHA1 \ - +RSA:+ARCFOUR-128:+MD5 \ - +RSA:+NULL:+MD5 \ - +RSA:+NULL:+SHA1 \ - " - O_CIPHERS="$O_CIPHERS \ - DHE-RSA-AES128-SHA \ - DHE-RSA-AES256-SHA \ - DHE-RSA-CAMELLIA128-SHA \ - DHE-RSA-CAMELLIA256-SHA \ - EDH-RSA-DES-CBC3-SHA \ - AES256-SHA \ - CAMELLIA256-SHA \ - AES128-SHA \ - CAMELLIA128-SHA \ - DES-CBC3-SHA \ - RC4-SHA \ - RC4-MD5 \ - NULL-MD5 \ - NULL-SHA \ - " - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA \ - TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA \ - TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA \ - TLS-ECDHE-RSA-WITH-RC4-128-SHA \ - TLS-ECDHE-RSA-WITH-NULL-SHA \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-RSA:+AES-128-CBC:+SHA1 \ - +ECDHE-RSA:+AES-256-CBC:+SHA1 \ - +ECDHE-RSA:+3DES-CBC:+SHA1 \ - +ECDHE-RSA:+ARCFOUR-128:+SHA1 \ - +ECDHE-RSA:+NULL:+SHA1 \ - " - O_CIPHERS="$O_CIPHERS \ - ECDHE-RSA-AES256-SHA \ - ECDHE-RSA-AES128-SHA \ - ECDHE-RSA-DES-CBC3-SHA \ - ECDHE-RSA-RC4-SHA \ - ECDHE-RSA-NULL-SHA \ - " - fi - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-RSA-WITH-AES-128-CBC-SHA256 \ - TLS-DHE-RSA-WITH-AES-128-CBC-SHA256 \ - TLS-RSA-WITH-AES-256-CBC-SHA256 \ - TLS-DHE-RSA-WITH-AES-256-CBC-SHA256 \ - TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256 \ - TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384 \ - TLS-RSA-WITH-AES-128-GCM-SHA256 \ - TLS-RSA-WITH-AES-256-GCM-SHA384 \ - TLS-DHE-RSA-WITH-AES-128-GCM-SHA256 \ - TLS-DHE-RSA-WITH-AES-256-GCM-SHA384 \ - TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 \ - TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384 \ - " - G_CIPHERS="$G_CIPHERS \ - +RSA:+AES-128-CBC:+SHA256 \ - +DHE-RSA:+AES-128-CBC:+SHA256 \ - +RSA:+AES-256-CBC:+SHA256 \ - +DHE-RSA:+AES-256-CBC:+SHA256 \ - +ECDHE-RSA:+AES-128-CBC:+SHA256 \ - +ECDHE-RSA:+AES-256-CBC:+SHA384 \ - +RSA:+AES-128-GCM:+AEAD \ - +RSA:+AES-256-GCM:+AEAD \ - +DHE-RSA:+AES-128-GCM:+AEAD \ - +DHE-RSA:+AES-256-GCM:+AEAD \ - +ECDHE-RSA:+AES-128-GCM:+AEAD \ - +ECDHE-RSA:+AES-256-GCM:+AEAD \ - " - O_CIPHERS="$O_CIPHERS \ - NULL-SHA256 \ - AES128-SHA256 \ - DHE-RSA-AES128-SHA256 \ - AES256-SHA256 \ - DHE-RSA-AES256-SHA256 \ - ECDHE-RSA-AES128-SHA256 \ - ECDHE-RSA-AES256-SHA384 \ - AES128-GCM-SHA256 \ - DHE-RSA-AES128-GCM-SHA256 \ - AES256-GCM-SHA384 \ - DHE-RSA-AES256-GCM-SHA384 \ - ECDHE-RSA-AES128-GCM-SHA256 \ - ECDHE-RSA-AES256-GCM-SHA384 \ - " - fi - ;; - - "PSK") - P_CIPHERS="$P_CIPHERS \ - TLS-PSK-WITH-RC4-128-SHA \ - TLS-PSK-WITH-3DES-EDE-CBC-SHA \ - TLS-PSK-WITH-AES-128-CBC-SHA \ - TLS-PSK-WITH-AES-256-CBC-SHA \ - " - G_CIPHERS="$G_CIPHERS \ - +PSK:+ARCFOUR-128:+SHA1 \ - +PSK:+3DES-CBC:+SHA1 \ - +PSK:+AES-128-CBC:+SHA1 \ - +PSK:+AES-256-CBC:+SHA1 \ - " - O_CIPHERS="$O_CIPHERS \ - PSK-RC4-SHA \ - PSK-3DES-EDE-CBC-SHA \ - PSK-AES128-CBC-SHA \ - PSK-AES256-CBC-SHA \ - " - ;; - esac -} - -add_openssl_ciphersuites() -{ - case $TYPE in - - "ECDSA") - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDH-ECDSA-WITH-NULL-SHA \ - TLS-ECDH-ECDSA-WITH-RC4-128-SHA \ - TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA \ - TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA \ - TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA \ - " - O_CIPHERS="$O_CIPHERS \ - ECDH-ECDSA-NULL-SHA \ - ECDH-ECDSA-RC4-SHA \ - ECDH-ECDSA-DES-CBC3-SHA \ - ECDH-ECDSA-AES128-SHA \ - ECDH-ECDSA-AES256-SHA \ - " - fi - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256 \ - TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384 \ - TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256 \ - TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384 \ - " - O_CIPHERS="$O_CIPHERS \ - ECDH-ECDSA-AES128-SHA256 \ - ECDH-ECDSA-AES256-SHA384 \ - ECDH-ECDSA-AES128-GCM-SHA256 \ - ECDH-ECDSA-AES256-GCM-SHA384 \ - " - fi - ;; - - "RSA") - P_CIPHERS="$P_CIPHERS \ - TLS-RSA-WITH-DES-CBC-SHA \ - TLS-DHE-RSA-WITH-DES-CBC-SHA \ - " - O_CIPHERS="$O_CIPHERS \ - DES-CBC-SHA \ - EDH-RSA-DES-CBC-SHA \ - " - ;; - - "PSK") - ;; - esac -} - -add_gnutls_ciphersuites() -{ - case $TYPE in - - "ECDSA") - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384 \ - TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384 \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-ECDSA:+CAMELLIA-128-CBC:+SHA256 \ - +ECDHE-ECDSA:+CAMELLIA-256-CBC:+SHA384 \ - +ECDHE-ECDSA:+CAMELLIA-128-GCM:+AEAD \ - +ECDHE-ECDSA:+CAMELLIA-256-GCM:+AEAD \ - " - fi - ;; - - "RSA") - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-RSA-WITH-NULL-SHA256 \ - " - G_CIPHERS="$G_CIPHERS \ - +RSA:+NULL:+SHA256 \ - " - fi - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384 \ - TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256 \ - TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256 \ - TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384 \ - TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384 \ - TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-RSA:+CAMELLIA-128-CBC:+SHA256 \ - +ECDHE-RSA:+CAMELLIA-256-CBC:+SHA384 \ - +RSA:+CAMELLIA-128-CBC:+SHA256 \ - +RSA:+CAMELLIA-256-CBC:+SHA256 \ - +DHE-RSA:+CAMELLIA-128-CBC:+SHA256 \ - +DHE-RSA:+CAMELLIA-256-CBC:+SHA256 \ - +ECDHE-RSA:+CAMELLIA-128-GCM:+AEAD \ - +ECDHE-RSA:+CAMELLIA-256-GCM:+AEAD \ - +DHE-RSA:+CAMELLIA-128-GCM:+AEAD \ - +DHE-RSA:+CAMELLIA-256-GCM:+AEAD \ - +RSA:+CAMELLIA-128-GCM:+AEAD \ - +RSA:+CAMELLIA-256-GCM:+AEAD \ - " - fi - ;; - - "PSK") - P_CIPHERS="$P_CIPHERS \ - TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA \ - TLS-DHE-PSK-WITH-AES-128-CBC-SHA \ - TLS-DHE-PSK-WITH-AES-256-CBC-SHA \ - TLS-DHE-PSK-WITH-RC4-128-SHA \ - " - G_CIPHERS="$G_CIPHERS \ - +DHE-PSK:+3DES-CBC:+SHA1 \ - +DHE-PSK:+AES-128-CBC:+SHA1 \ - +DHE-PSK:+AES-256-CBC:+SHA1 \ - +DHE-PSK:+ARCFOUR-128:+SHA1 \ - " - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA \ - TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA \ - TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA \ - TLS-ECDHE-PSK-WITH-RC4-128-SHA \ - TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA \ - TLS-RSA-PSK-WITH-AES-256-CBC-SHA \ - TLS-RSA-PSK-WITH-AES-128-CBC-SHA \ - TLS-RSA-PSK-WITH-RC4-128-SHA \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-PSK:+3DES-CBC:+SHA1 \ - +ECDHE-PSK:+AES-128-CBC:+SHA1 \ - +ECDHE-PSK:+AES-256-CBC:+SHA1 \ - +ECDHE-PSK:+ARCFOUR-128:+SHA1 \ - +RSA-PSK:+3DES-CBC:+SHA1 \ - +RSA-PSK:+AES-256-CBC:+SHA1 \ - +RSA-PSK:+AES-128-CBC:+SHA1 \ - +RSA-PSK:+ARCFOUR-128:+SHA1 \ - " - fi - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384 \ - TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384 \ - TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256 \ - TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-ECDHE-PSK-WITH-NULL-SHA384 \ - TLS-ECDHE-PSK-WITH-NULL-SHA256 \ - TLS-PSK-WITH-AES-128-CBC-SHA256 \ - TLS-PSK-WITH-AES-256-CBC-SHA384 \ - TLS-DHE-PSK-WITH-AES-128-CBC-SHA256 \ - TLS-DHE-PSK-WITH-AES-256-CBC-SHA384 \ - TLS-PSK-WITH-NULL-SHA256 \ - TLS-PSK-WITH-NULL-SHA384 \ - TLS-DHE-PSK-WITH-NULL-SHA256 \ - TLS-DHE-PSK-WITH-NULL-SHA384 \ - TLS-RSA-PSK-WITH-AES-256-CBC-SHA384 \ - TLS-RSA-PSK-WITH-AES-128-CBC-SHA256 \ - TLS-RSA-PSK-WITH-NULL-SHA256 \ - TLS-RSA-PSK-WITH-NULL-SHA384 \ - TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384 \ - TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384 \ - TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384 \ - TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-PSK-WITH-AES-128-GCM-SHA256 \ - TLS-PSK-WITH-AES-256-GCM-SHA384 \ - TLS-DHE-PSK-WITH-AES-128-GCM-SHA256 \ - TLS-DHE-PSK-WITH-AES-256-GCM-SHA384 \ - TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384 \ - TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384 \ - TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384 \ - TLS-RSA-PSK-WITH-AES-256-GCM-SHA384 \ - TLS-RSA-PSK-WITH-AES-128-GCM-SHA256 \ - " - G_CIPHERS="$G_CIPHERS \ - +ECDHE-PSK:+AES-256-CBC:+SHA384 \ - +ECDHE-PSK:+CAMELLIA-256-CBC:+SHA384 \ - +ECDHE-PSK:+AES-128-CBC:+SHA256 \ - +ECDHE-PSK:+CAMELLIA-128-CBC:+SHA256 \ - +PSK:+AES-128-CBC:+SHA256 \ - +PSK:+AES-256-CBC:+SHA384 \ - +DHE-PSK:+AES-128-CBC:+SHA256 \ - +DHE-PSK:+AES-256-CBC:+SHA384 \ - +RSA-PSK:+AES-256-CBC:+SHA384 \ - +RSA-PSK:+AES-128-CBC:+SHA256 \ - +DHE-PSK:+CAMELLIA-128-CBC:+SHA256 \ - +DHE-PSK:+CAMELLIA-256-CBC:+SHA384 \ - +PSK:+CAMELLIA-128-CBC:+SHA256 \ - +PSK:+CAMELLIA-256-CBC:+SHA384 \ - +RSA-PSK:+CAMELLIA-256-CBC:+SHA384 \ - +RSA-PSK:+CAMELLIA-128-CBC:+SHA256 \ - +PSK:+AES-128-GCM:+AEAD \ - +PSK:+AES-256-GCM:+AEAD \ - +DHE-PSK:+AES-128-GCM:+AEAD \ - +DHE-PSK:+AES-256-GCM:+AEAD \ - +RSA-PSK:+CAMELLIA-128-GCM:+AEAD \ - +RSA-PSK:+CAMELLIA-256-GCM:+AEAD \ - +PSK:+CAMELLIA-128-GCM:+AEAD \ - +PSK:+CAMELLIA-256-GCM:+AEAD \ - +DHE-PSK:+CAMELLIA-128-GCM:+AEAD \ - +DHE-PSK:+CAMELLIA-256-GCM:+AEAD \ - +RSA-PSK:+AES-256-GCM:+AEAD \ - +RSA-PSK:+AES-128-GCM:+AEAD \ - +ECDHE-PSK:+NULL:+SHA384 \ - +ECDHE-PSK:+NULL:+SHA256 \ - +PSK:+NULL:+SHA256 \ - +PSK:+NULL:+SHA384 \ - +DHE-PSK:+NULL:+SHA256 \ - +DHE-PSK:+NULL:+SHA384 \ - +RSA-PSK:+NULL:+SHA256 \ - +RSA-PSK:+NULL:+SHA384 \ - " - fi - ;; - esac -} - -add_mbedtls_ciphersuites() -{ - case $TYPE in - - "ECDSA") - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256 \ - TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384 \ - " - fi - if [ `minor_ver "$MODE"` -ge 3 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256 \ - TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384 \ - TLS-ECDHE-ECDSA-WITH-AES-128-CCM \ - TLS-ECDHE-ECDSA-WITH-AES-256-CCM \ - TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8 \ - TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8 \ - " - fi - ;; - - "RSA") - if [ "$MODE" = "tls1_2" ]; - then - P_CIPHERS="$P_CIPHERS \ - TLS-RSA-WITH-AES-128-CCM \ - TLS-RSA-WITH-AES-256-CCM \ - TLS-DHE-RSA-WITH-AES-128-CCM \ - TLS-DHE-RSA-WITH-AES-256-CCM \ - TLS-RSA-WITH-AES-128-CCM-8 \ - TLS-RSA-WITH-AES-256-CCM-8 \ - TLS-DHE-RSA-WITH-AES-128-CCM-8 \ - TLS-DHE-RSA-WITH-AES-256-CCM-8 \ - " - fi - ;; - - "PSK") - # *PSK-NULL-SHA suites supported by GnuTLS 3.3.5 but not 3.2.15 - P_CIPHERS="$P_CIPHERS \ - TLS-PSK-WITH-NULL-SHA \ - TLS-DHE-PSK-WITH-NULL-SHA \ - " - if [ `minor_ver "$MODE"` -gt 0 ] - then - P_CIPHERS="$P_CIPHERS \ - TLS-ECDHE-PSK-WITH-NULL-SHA \ - TLS-RSA-PSK-WITH-NULL-SHA \ - " - fi - if [ "$MODE" = "tls1_2" ]; - then - P_CIPHERS="$P_CIPHERS \ - TLS-PSK-WITH-AES-128-CCM \ - TLS-PSK-WITH-AES-256-CCM \ - TLS-DHE-PSK-WITH-AES-128-CCM \ - TLS-DHE-PSK-WITH-AES-256-CCM \ - TLS-PSK-WITH-AES-128-CCM-8 \ - TLS-PSK-WITH-AES-256-CCM-8 \ - TLS-DHE-PSK-WITH-AES-128-CCM-8 \ - TLS-DHE-PSK-WITH-AES-256-CCM-8 \ - " - fi - ;; - esac -} - -setup_arguments() -{ - G_MODE="" - case "$MODE" in - "ssl3") - G_PRIO_MODE="+VERS-SSL3.0" - ;; - "tls1") - G_PRIO_MODE="+VERS-TLS1.0" - ;; - "tls1_1") - G_PRIO_MODE="+VERS-TLS1.1" - ;; - "tls1_2") - G_PRIO_MODE="+VERS-TLS1.2" - ;; - "dtls1") - G_PRIO_MODE="+VERS-DTLS1.0" - G_MODE="-u" - ;; - "dtls1_2") - G_PRIO_MODE="+VERS-DTLS1.2" - G_MODE="-u" - ;; - *) - echo "error: invalid mode: $MODE" >&2 - exit 1; - esac - - P_SERVER_ARGS="server_port=$PORT server_addr=0.0.0.0 force_version=$MODE arc4=1" - O_SERVER_ARGS="-accept $PORT -cipher NULL,ALL -$MODE -dhparam data_files/dhparams.pem" - G_SERVER_ARGS="-p $PORT --http $G_MODE" - G_SERVER_PRIO="NORMAL:+ARCFOUR-128:+NULL:+MD5:+PSK:+DHE-PSK:+ECDHE-PSK:+RSA-PSK:-VERS-TLS-ALL:$G_PRIO_MODE" - - # with OpenSSL 1.0.1h, -www, -WWW and -HTTP break DTLS handshakes - if is_dtls "$MODE"; then - O_SERVER_ARGS="$O_SERVER_ARGS" - else - O_SERVER_ARGS="$O_SERVER_ARGS -www" - fi - - P_CLIENT_ARGS="server_port=$PORT server_addr=127.0.0.1 force_version=$MODE" - O_CLIENT_ARGS="-connect localhost:$PORT -$MODE" - G_CLIENT_ARGS="-p $PORT --debug 3 $G_MODE" - G_CLIENT_PRIO="NONE:$G_PRIO_MODE:+COMP-NULL:+CURVE-ALL:+SIGN-ALL" - - if [ "X$VERIFY" = "XYES" ]; - then - P_SERVER_ARGS="$P_SERVER_ARGS ca_file=data_files/test-ca_cat12.crt auth_mode=required" - O_SERVER_ARGS="$O_SERVER_ARGS -CAfile data_files/test-ca_cat12.crt -Verify 10" - G_SERVER_ARGS="$G_SERVER_ARGS --x509cafile data_files/test-ca_cat12.crt --require-client-cert" - - P_CLIENT_ARGS="$P_CLIENT_ARGS ca_file=data_files/test-ca_cat12.crt auth_mode=required" - O_CLIENT_ARGS="$O_CLIENT_ARGS -CAfile data_files/test-ca_cat12.crt -verify 10" - G_CLIENT_ARGS="$G_CLIENT_ARGS --x509cafile data_files/test-ca_cat12.crt" - else - # don't request a client cert at all - P_SERVER_ARGS="$P_SERVER_ARGS ca_file=none auth_mode=none" - G_SERVER_ARGS="$G_SERVER_ARGS --disable-client-cert" - - P_CLIENT_ARGS="$P_CLIENT_ARGS ca_file=none auth_mode=none" - O_CLIENT_ARGS="$O_CLIENT_ARGS" - G_CLIENT_ARGS="$G_CLIENT_ARGS --insecure" - fi - - case $TYPE in - "ECDSA") - P_SERVER_ARGS="$P_SERVER_ARGS crt_file=data_files/server5.crt key_file=data_files/server5.key" - O_SERVER_ARGS="$O_SERVER_ARGS -cert data_files/server5.crt -key data_files/server5.key" - G_SERVER_ARGS="$G_SERVER_ARGS --x509certfile data_files/server5.crt --x509keyfile data_files/server5.key" - - if [ "X$VERIFY" = "XYES" ]; then - P_CLIENT_ARGS="$P_CLIENT_ARGS crt_file=data_files/server6.crt key_file=data_files/server6.key" - O_CLIENT_ARGS="$O_CLIENT_ARGS -cert data_files/server6.crt -key data_files/server6.key" - G_CLIENT_ARGS="$G_CLIENT_ARGS --x509certfile data_files/server6.crt --x509keyfile data_files/server6.key" - else - P_CLIENT_ARGS="$P_CLIENT_ARGS crt_file=none key_file=none" - fi - ;; - - "RSA") - P_SERVER_ARGS="$P_SERVER_ARGS crt_file=data_files/server2.crt key_file=data_files/server2.key" - O_SERVER_ARGS="$O_SERVER_ARGS -cert data_files/server2.crt -key data_files/server2.key" - G_SERVER_ARGS="$G_SERVER_ARGS --x509certfile data_files/server2.crt --x509keyfile data_files/server2.key" - - if [ "X$VERIFY" = "XYES" ]; then - P_CLIENT_ARGS="$P_CLIENT_ARGS crt_file=data_files/server1.crt key_file=data_files/server1.key" - O_CLIENT_ARGS="$O_CLIENT_ARGS -cert data_files/server1.crt -key data_files/server1.key" - G_CLIENT_ARGS="$G_CLIENT_ARGS --x509certfile data_files/server1.crt --x509keyfile data_files/server1.key" - else - P_CLIENT_ARGS="$P_CLIENT_ARGS crt_file=none key_file=none" - fi - ;; - - "PSK") - # give RSA-PSK-capable server a RSA cert - # (should be a separate type, but harder to close with openssl) - P_SERVER_ARGS="$P_SERVER_ARGS psk=6162636465666768696a6b6c6d6e6f70 ca_file=none crt_file=data_files/server2.crt key_file=data_files/server2.key" - O_SERVER_ARGS="$O_SERVER_ARGS -psk 6162636465666768696a6b6c6d6e6f70 -nocert" - G_SERVER_ARGS="$G_SERVER_ARGS --x509certfile data_files/server2.crt --x509keyfile data_files/server2.key --pskpasswd data_files/passwd.psk" - - P_CLIENT_ARGS="$P_CLIENT_ARGS psk=6162636465666768696a6b6c6d6e6f70 crt_file=none key_file=none" - O_CLIENT_ARGS="$O_CLIENT_ARGS -psk 6162636465666768696a6b6c6d6e6f70" - G_CLIENT_ARGS="$G_CLIENT_ARGS --pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70" - ;; - esac -} - -# is_polar -is_polar() { - echo "$1" | grep 'ssl_server2\|ssl_client2' > /dev/null -} - -# has_mem_err -has_mem_err() { - if ( grep -F 'All heap blocks were freed -- no leaks are possible' "$1" && - grep -F 'ERROR SUMMARY: 0 errors from 0 contexts' "$1" ) > /dev/null - then - return 1 # false: does not have errors - else - return 0 # true: has errors - fi -} - -# start_server -# also saves name and command -start_server() { - case $1 in - [Oo]pen*) - SERVER_CMD="$OPENSSL_CMD s_server $O_SERVER_ARGS" - ;; - [Gg]nu*) - SERVER_CMD="$GNUTLS_SERV $G_SERVER_ARGS --priority $G_SERVER_PRIO" - ;; - mbed*) - SERVER_CMD="$P_SRV $P_SERVER_ARGS" - if [ "$MEMCHECK" -gt 0 ]; then - SERVER_CMD="valgrind --leak-check=full $SERVER_CMD" - fi - ;; - *) - echo "error: invalid server name: $1" >&2 - exit 1 - ;; - esac - SERVER_NAME=$1 - - log "$SERVER_CMD" - echo "$SERVER_CMD" > $SRV_OUT - # for servers without -www or equivalent - while :; do echo bla; sleep 1; done | $SERVER_CMD >> $SRV_OUT 2>&1 & - PROCESS_ID=$! - - sleep 1 -} - -# terminate the running server -stop_server() { - kill $PROCESS_ID 2>/dev/null - wait $PROCESS_ID 2>/dev/null - - if [ "$MEMCHECK" -gt 0 ]; then - if is_polar "$SERVER_CMD" && has_mem_err $SRV_OUT; then - echo " ! Server had memory errors" - SRVMEM=$(( $SRVMEM + 1 )) - return - fi - fi - - rm -f $SRV_OUT -} - -# kill the running server (used when killed by signal) -cleanup() { - rm -f $SRV_OUT $CLI_OUT - kill $PROCESS_ID >/dev/null 2>&1 - kill $WATCHDOG_PID >/dev/null 2>&1 - exit 1 -} - -# wait for client to terminate and set EXIT -# must be called right after starting the client -wait_client_done() { - CLI_PID=$! - - ( sleep "$DOG_DELAY"; echo "TIMEOUT" >> $CLI_OUT; kill $CLI_PID ) & - WATCHDOG_PID=$! - - wait $CLI_PID - EXIT=$? - - kill $WATCHDOG_PID - wait $WATCHDOG_PID - - echo "EXIT: $EXIT" >> $CLI_OUT -} - -# run_client -run_client() { - # announce what we're going to do - TESTS=$(( $TESTS + 1 )) - VERIF=$(echo $VERIFY | tr '[:upper:]' '[:lower:]') - TITLE="`echo $1 | head -c1`->`echo $SERVER_NAME | head -c1`" - TITLE="$TITLE $MODE,$VERIF $2" - printf "$TITLE " - LEN=$(( 72 - `echo "$TITLE" | wc -c` )) - for i in `seq 1 $LEN`; do printf '.'; done; printf ' ' - - # should we skip? - if [ "X$SKIP_NEXT" = "XYES" ]; then - SKIP_NEXT="NO" - echo "SKIP" - SKIPPED=$(( $SKIPPED + 1 )) - return - fi - - # run the command and interpret result - case $1 in - [Oo]pen*) - CLIENT_CMD="$OPENSSL_CMD s_client $O_CLIENT_ARGS -cipher $2" - log "$CLIENT_CMD" - echo "$CLIENT_CMD" > $CLI_OUT - printf 'GET HTTP/1.0\r\n\r\n' | $CLIENT_CMD >> $CLI_OUT 2>&1 & - wait_client_done - - if [ $EXIT -eq 0 ]; then - RESULT=0 - else - if grep 'Cipher is (NONE)' $CLI_OUT >/dev/null; then - RESULT=1 - else - RESULT=2 - fi - fi - ;; - - [Gg]nu*) - # need to force IPv4 with UDP, but keep localhost for auth - if is_dtls "$MODE"; then - G_HOST="127.0.0.1" - else - G_HOST="localhost" - fi - CLIENT_CMD="$GNUTLS_CLI $G_CLIENT_ARGS --priority $G_PRIO_MODE:$2 $G_HOST" - log "$CLIENT_CMD" - echo "$CLIENT_CMD" > $CLI_OUT - printf 'GET HTTP/1.0\r\n\r\n' | $CLIENT_CMD >> $CLI_OUT 2>&1 & - wait_client_done - - if [ $EXIT -eq 0 ]; then - RESULT=0 - else - RESULT=2 - # interpret early failure, with a handshake_failure alert - # before the server hello, as "no ciphersuite in common" - if grep -F 'Received alert [40]: Handshake failed' $CLI_OUT; then - if grep -i 'SERVER HELLO .* was received' $CLI_OUT; then : - else - RESULT=1 - fi - fi >/dev/null - fi - ;; - - mbed*) - CLIENT_CMD="$P_CLI $P_CLIENT_ARGS force_ciphersuite=$2" - if [ "$MEMCHECK" -gt 0 ]; then - CLIENT_CMD="valgrind --leak-check=full $CLIENT_CMD" - fi - log "$CLIENT_CMD" - echo "$CLIENT_CMD" > $CLI_OUT - $CLIENT_CMD >> $CLI_OUT 2>&1 & - wait_client_done - - case $EXIT in - "0") RESULT=0 ;; - "2") RESULT=1 ;; - *) RESULT=2 ;; - esac - - if [ "$MEMCHECK" -gt 0 ]; then - if is_polar "$CLIENT_CMD" && has_mem_err $CLI_OUT; then - RESULT=2 - fi - fi - - ;; - - *) - echo "error: invalid client name: $1" >&2 - exit 1 - ;; - esac - - echo "EXIT: $EXIT" >> $CLI_OUT - - # report and count result - case $RESULT in - "0") - echo PASS - ;; - "1") - echo SKIP - SKIPPED=$(( $SKIPPED + 1 )) - ;; - "2") - echo FAIL - cp $SRV_OUT c-srv-${TESTS}.log - cp $CLI_OUT c-cli-${TESTS}.log - echo " ! outputs saved to c-srv-${TESTS}.log, c-cli-${TESTS}.log" - - if [ "X${USER:-}" = Xbuildbot -o "X${LOGNAME:-}" = Xbuildbot ]; then - echo " ! server output:" - cat c-srv-${TESTS}.log - echo " ! ===================================================" - echo " ! client output:" - cat c-cli-${TESTS}.log - fi - - FAILED=$(( $FAILED + 1 )) - ;; - esac - - rm -f $CLI_OUT -} - -# -# MAIN -# - -if cd $( dirname $0 ); then :; else - echo "cd $( dirname $0 ) failed" >&2 - exit 1 -fi - -get_options "$@" - -# sanity checks, avoid an avalanche of errors -if [ ! -x "$P_SRV" ]; then - echo "Command '$P_SRV' is not an executable file" >&2 - exit 1 -fi -if [ ! -x "$P_CLI" ]; then - echo "Command '$P_CLI' is not an executable file" >&2 - exit 1 -fi - -if echo "$PEERS" | grep -i openssl > /dev/null; then - if which "$OPENSSL_CMD" >/dev/null 2>&1; then :; else - echo "Command '$OPENSSL_CMD' not found" >&2 - exit 1 - fi -fi - -if echo "$PEERS" | grep -i gnutls > /dev/null; then - for CMD in "$GNUTLS_CLI" "$GNUTLS_SERV"; do - if which "$CMD" >/dev/null 2>&1; then :; else - echo "Command '$CMD' not found" >&2 - exit 1 - fi - done -fi - -for PEER in $PEERS; do - case "$PEER" in - mbed*|[Oo]pen*|[Gg]nu*) - ;; - *) - echo "Unknown peers: $PEER" >&2 - exit 1 - esac -done - -# Pick a "unique" port in the range 10000-19999. -PORT="0000$$" -PORT="1$(echo $PORT | tail -c 5)" - -# Also pick a unique name for intermediate files -SRV_OUT="srv_out.$$" -CLI_OUT="cli_out.$$" - -# client timeout delay: be more patient with valgrind -if [ "$MEMCHECK" -gt 0 ]; then - DOG_DELAY=30 -else - DOG_DELAY=10 -fi - -SKIP_NEXT="NO" - -trap cleanup INT TERM HUP - -for VERIFY in $VERIFIES; do - for MODE in $MODES; do - for TYPE in $TYPES; do - for PEER in $PEERS; do - - setup_arguments - - case "$PEER" in - - [Oo]pen*) - - if test "$OSSL_NO_DTLS" -gt 0 && is_dtls "$MODE"; then - continue; - fi - - reset_ciphersuites - add_common_ciphersuites - add_openssl_ciphersuites - filter_ciphersuites - - if [ "X" != "X$P_CIPHERS" ]; then - start_server "OpenSSL" - for i in $P_CIPHERS; do - check_openssl_server_bug $i - run_client mbedTLS $i - done - stop_server - fi - - if [ "X" != "X$O_CIPHERS" ]; then - start_server "mbedTLS" - for i in $O_CIPHERS; do - run_client OpenSSL $i - done - stop_server - fi - - ;; - - [Gg]nu*) - - reset_ciphersuites - add_common_ciphersuites - add_gnutls_ciphersuites - filter_ciphersuites - - if [ "X" != "X$P_CIPHERS" ]; then - start_server "GnuTLS" - for i in $P_CIPHERS; do - run_client mbedTLS $i - done - stop_server - fi - - if [ "X" != "X$G_CIPHERS" ]; then - start_server "mbedTLS" - for i in $G_CIPHERS; do - run_client GnuTLS $i - done - stop_server - fi - - ;; - - mbed*) - - reset_ciphersuites - add_common_ciphersuites - add_openssl_ciphersuites - add_gnutls_ciphersuites - add_mbedtls_ciphersuites - filter_ciphersuites - - if [ "X" != "X$P_CIPHERS" ]; then - start_server "mbedTLS" - for i in $P_CIPHERS; do - run_client mbedTLS $i - done - stop_server - fi - - ;; - - *) - echo "Unknown peer: $PEER" >&2 - exit 1 - ;; - - esac - - done - done - done -done - -echo "------------------------------------------------------------------------" - -if [ $FAILED -ne 0 -o $SRVMEM -ne 0 ]; -then - printf "FAILED" -else - printf "PASSED" -fi - -if [ "$MEMCHECK" -gt 0 ]; then - MEMREPORT=", $SRVMEM server memory errors" -else - MEMREPORT="" -fi - -PASSED=$(( $TESTS - $FAILED )) -echo " ($PASSED / $TESTS tests ($SKIPPED skipped$MEMREPORT))" - -FAILED=$(( $FAILED + $SRVMEM )) -exit $FAILED diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/Readme-x509.txt b/build/premake/premake5/contrib/mbedtls/tests/data_files/Readme-x509.txt deleted file mode 100644 index 680d61230d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/Readme-x509.txt +++ /dev/null @@ -1,93 +0,0 @@ -This documents the X.509 CAs, certificates, and CRLS used for testing. - -Certification authorities -------------------------- - -There are two main CAs for use as trusted roots: -- test-ca.crt aka "C=NL, O=PolarSSL, CN=PolarSSL Test CA" - uses a RSA-2048 key -- test-ca2*.crt aka "C=NL, O=PolarSSL, CN=Polarssl Test EC CA" - uses an EC key with NIST P-384 (aka secp384r1) - variants used to test the keyUsage extension -The files test-ca_cat12 and test-ca_cat21 contain them concatenated both ways. - -Two intermediate CAs are signed by them: -- test-int-ca.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA" - uses RSA-4096, signed by test-ca2 -- test-int-ca2.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA" - uses an EC key with NIST P-256, signed by test-ca - -A third intermediate CA is signed by test-int-ca2.crt: -- test-int-ca3.crt "C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3" - -Finally, other CAs for specific purposes: -- enco-ca-prstr.pem: has its CN encoded as a printable string, but child cert - enco-cert-utf8str.pem has its issuer's CN encoded as a UTF-8 string. -- test-ca-v1.crt: v1 "CA", signs - server1-v1.crt: v1 "intermediate CA", signs - server2-v1*.crt: EE cert (without of with chain in same file) -- keyUsage.decipherOnly.crt: has the decipherOnly keyUsage bit set - -End-entity certificates ------------------------ - -Short information fields: - -- name or pattern -- issuing CA: 1 -> test-ca.crt - 2 -> test-ca2.crt - I1 -> test-int-ca.crt - I2 -> test-int-ca2.crt - I3 -> test-int-ca3.crt - O -> other -- key type: R -> RSA, E -> EC -- C -> there is a CRL revoking this cert (see below) -- L -> CN=localhost (useful for local test servers) -- P1, P2 if the file includes parent (resp. parent + grandparent) -- free-form comments - -List of certificates: - -- cert_example_multi*.crt: 1/O R: subjectAltName -- cert_example_wildcard.crt: 1 R: wildcard in subject's CN -- cert_md*.crt, cert_sha*.crt: 1 R: signature hash -- cert_v1_with_ext.crt: 1 R: v1 with extensions (illegal) -- cli2.crt: 2 E: basic -- enco-cert-utf8str.pem: see enco-ca-prstr.pem above -- server1*.crt: 1* R C* P1*: misc *(server1-v1 see test-ca-v1.crt above) - *CRL for: .cert_type.crt, .crt, .key_usage.crt, .v1.crt - P1 only for _ca.crt -- server2-v1*.crt: O R: see test-ca-v1.crt above -- server2*.crt: 1 R L: misc -- server3.crt: 1 E L: EC cert signed by RSA CA -- server4.crt: 2 R L: RSA cert signed by EC CA -- server5*.crt: 2* E L: misc *(except server5-selfsigned) - -sha*: hashes - -eku*: extendeKeyUsage (cli/srv = www client/server, cs = codesign, etc) - -ku*: keyUsage (ds = signatures, ke/ka = key exchange/agreement) -- server6-ss-child.crt: O E: "child" of non-CA server5-selfsigned -- server6.crt, server6.pem: 2 E L C: revoked -- server7*.crt: I1 E L P1*: EC signed by RSA signed by EC - *P1 except 7.crt, P2 _int-ca_ca2.crt - *_space: with PEM error(s) -- server8*.crt: I2 R L: RSA signed by EC signed by RSA (P1 for _int-ca2) -- server9*.crt: 1 R C* L P1*: signed using RSASSA-PSS - *CRL for: 9.crt, -badsign, -with-ca (P1) -- server10*.crt: I3 E L P2/P3 - -Certificate revocation lists ----------------------------- - -Signing CA in parentheses (same meaning as certificates). - -- crl-ec-sha*.pem: (2) server6.crt -- crl-future.pem: (2) server6.crt + unknown -- crl-rsa-pss-*.pem: (1) server9{,badsign,with-ca}.crt + cert_sha384.crt + unknown -- crl.pem, crl_expired.pem: (1) server1{,.cert_type,.key_usage,.v1}.crt + unknown -- crl_md*.pem: crl_sha*.pem: (1) same as crl.pem -- crt_cat_*.pem: (1+2) concatenations in various orders: - ec = crl-ec-sha256.pem, ecfut = crl-future.pem - rsa = crl.pem, rsabadpem = same with pem error, rsaexp = crl_expired.pem - -Note: crl_future would revoke server9 and cert_sha384.crt if signed by CA 1 - crl-rsa-pss* would revoke server6.crt if signed by CA 2 diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/bitstring-in-dn.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/bitstring-in-dn.pem deleted file mode 100644 index 0808a06861..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/bitstring-in-dn.pem +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEATCCAumgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBxMRMwEQYDVQQDDApUZXN0 -IENBIDAxMREwDwYDVQQIDAhFY25pdm9ycDELMAkGA1UEBhMCWFgxHjAcBgkqhkiG -9w0BCQEWD3RjYUBleGFtcGxlLmNvbTEaMBgGA1UECgwRVGVzdCBDQSBBdXRob3Jp -dHkwHhcNMTUwMzExMTIwNjUxWhcNMjUwMzA4MTIwNjUxWjCBmzELMAkGA1UEBhMC -WFgxDDAKBgNVBAoMA3RjYTERMA8GA1UECAwIRWNuaXZvcnAxDDAKBgNVBAsMA1RD -QTEPMA0GA1UEAwwGQ2xpZW50MSEwHwYJKoZIhvcNAQkBFhJjbGllbnRAZXhhbXBs -ZS5jb20xEzARBgNVBAUTCjcxMDEwMTIyNTUxFDASBgNVBC0DCwA3MTAxMDEyMjU1 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnQS0JLb8Dqy8V2mszkWk -V8c/NPQcG3ivueXZHqOT9JTiPqrigGcLHtlmlaJ0aUUxix7q60aOds041TFyeknT -SUFYY4ppOhiP+fOpWKPv4ZMwhSI2XzcgYhQSNHV0lIG1we9RAAfumomDMq7oMJhb -EGf0ihibbwZXPUwBlm10GaB4K93PNY8Bz4ekBxzQ1WJkQ5LGsQnVZSuLnvp5dWSe -J2axxyY4hPXR30jzEyZvy4kv4nzAu5lqZ5XKLrRO4TKwZrtr+CCPVkPJRE36rWYt -tQaJEEpNOo0ZPpTtG6F8/tGh5r8jFx/f6wG+nyANJJ98kEP8i6TPjRrg+697mLcd -iQIDAQABo3kwdzAJBgNVHRMEAjAAMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9j -cmwuZXhhbXBsZS5jb20vdGVzdF9jYV8wMS5jcmwwEwYDVR0lBAwwCgYIKwYBBQUH -AwIwHQYDVR0RBBYwFIESY2xpZW50QGV4YW1wbGUuY29tMA0GCSqGSIb3DQEBBQUA -A4IBAQBySELCnU8/PtGIG3dwhJENOSU5R7w8jpRXxHCuSBR+W6nuUCISz+z+EdF/ -A7AOJDASuS+4gkrSSmQhGFpf7E5VbF8trVZhLAZrXqKMcUreKH6v0I8MAUXmIs3G -tqiBGf7pSYJN9DvVOOgANjdy6THuUzYv5qSvBZ4pNYEfHSlMNrV7niynd8dgPOML -pA7GUfv5k2mMkMbSD15pTMgcavrBKYgyqcvF1C3qghfoL5+i38H8sKzF8hy7wHtE -ESHtBq20RYA3m0UcA0e64GcanO2Ps/AQVBc7qMeHbqnqj3uUhtTkQcMUWnMgy1NR -5RbzoLMOxq7hoOCyIaQeM/wgxeGE ------END CERTIFICATE----- ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAnQS0JLb8Dqy8V2mszkWkV8c/NPQcG3ivueXZHqOT9JTiPqri -gGcLHtlmlaJ0aUUxix7q60aOds041TFyeknTSUFYY4ppOhiP+fOpWKPv4ZMwhSI2 -XzcgYhQSNHV0lIG1we9RAAfumomDMq7oMJhbEGf0ihibbwZXPUwBlm10GaB4K93P -NY8Bz4ekBxzQ1WJkQ5LGsQnVZSuLnvp5dWSeJ2axxyY4hPXR30jzEyZvy4kv4nzA -u5lqZ5XKLrRO4TKwZrtr+CCPVkPJRE36rWYttQaJEEpNOo0ZPpTtG6F8/tGh5r8j -Fx/f6wG+nyANJJ98kEP8i6TPjRrg+697mLcdiQIDAQABAoIBAF7i3MnjGmbz080v -OxJb23iAG54wdlvTjr3UPGTbjSmcXyxnsADQRFQcJHYAekCzY8EiqewL80OvuMx8 -2SU1P81hA70Dg5tsBHWT3Z6HUwsKG6QYjKr1cUhTwLyazhyAVgogSN6v7GzO9M3I -DOBw8Xb0mz5oqGVre4S7TapN8n8ZG5oWm0XKGACXy0KbzY0KvWdkUzumFQ8X/ARE -FsWyu+O69EbMqZRUKu45SrcubsdVGjOwseZHkmp5V6pc6Q/OrTHZqXJtDva5UIRq -+Lof5scy9jiwwRnM/klvh23mz0ySU4YA3645m5KqyWR4YJCR1MnMANmXUSeYWfYz -19+R1gECgYEAzm83lI7eIhTH38H0/jFpf3R7vNjPX3TR5waa4EXsCxhTOpoL89mR -iNmzH0aOC4OR8rz/9PCnwmtH1lyQ4r/RokBmCp3pBxeWSlenFfV3rLCeEDo0Q/OL -SX5DL4IbZD0VmNDt606WS7AEv93GhpN03Anw6kgHQUm1l030PR9DYZECgYEAwrgO -/RyB/Ehw7smlysZb2sn1lvd6z8fg+pcu8ZNRKODaYCCOb8p1lnHrnIQdEmjhlmVp -HAEuJ5jxCb+lyruV+dlx+0W/p6lHtKr0iBHG8EFkHnjN6Y+59Qu0HfSm0pZw7Ftr -QcUDPuDJkTVUAvrZqciWlwzTWCC9KYXtasT+AHkCgYEAnP80dAUbpyvKvr/RxShr -JYW/PWZegChmIp+BViOXWvDLC3xwrqm+5yc59QVBrjwH2WYn+26zB0dzwPFxNyHP -GuiDMnvZ54zmve9foXGn7Gv+KjU53pvwSJqAGjeHAXr7W9c5uoVwBGv/kLPn8h1e -+KGO2X6iFeMq+cFNiNan9iECgYBj+oGnsKWFVeS2ls8LyMGNGzmAZF2opiZ8RHgU -DeIULS+zP8Qi3j92GdQyLxuGQlfiEvvfJzP9nOfWa5LC/4JIIUAHFo8LlT1+JHEe -FJKi9dBkXP7NN8DxcyruXpnxctFUarQttuytslmMt2cFiKuOI7I+qJUzoMu/sEZx -FeidcQKBgQCuralmtbl4nxjn3aR/ZgFTAKCL9WaJPh5hFJ9q4UuWxJdBX5z3Ey3/ -70ehLKYPumjmZtXynzz4BTWj1W9X+tgj/499uzV6LdQERGjT6WVy8xR9RELWW0an -N9N1IAc4qTSjbI4EIMwMBSAoFfCux/jfDkG4g+RDnpV92sqxz2CtKg== ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi.crt deleted file mode 100644 index c1e19987a0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi.crt +++ /dev/null @@ -1,80 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 17 (0x11) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: May 10 13:23:41 2012 GMT - Not After : May 11 13:23:41 2022 GMT - Subject: C=NL, O=PolarSSL, CN=www.example.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - X509v3 Subject Alternative Name: - DNS:example.com, DNS:example.net, DNS:*.example.org - Signature Algorithm: sha1WithRSAEncryption - 4f:09:cb:7a:d5:ee:f5:ef:62:0d:dc:7b:a2:85:d6:8c:ca:95: - b4:6b:da:11:5b:92:00:75:13:b9:ca:0b:ce:ea:fb:c3:1f:e2: - 3f:7f:21:74:79:e2:e6:bc:da:06:e5:2f:6f:f6:55:c6:73:39: - cf:48:bc:0d:2f:0c:d2:7a:06:c3:4a:4c:d9:48:5d:a0:d0:73: - 89:e4:d4:85:1d:96:9a:0e:57:99:c6:6f:1d:21:27:1f:8d:05: - 29:e8:40:ae:82:39:68:c3:97:07:cf:3c:93:4c:1a:df:2f:a6: - a4:55:48:7f:7c:8c:1a:c9:22:da:24:cd:92:39:c6:8a:ec:b0: - 8d:f5:69:82:67:cb:04:ee:de:53:41:96:c1:27:dc:2f:fe:33: - fa:d3:0e:b8:d4:32:a9:84:28:53:a5:f0:d1:89:d5:a2:98:e7: - 16:91:bb:9c:c0:41:8e:8c:58:ac:ff:e3:dd:2e:7a:ab:b0:b9: - 71:76:ad:0f:27:33:f7:a9:29:d3:c0:76:c0:bf:06:40:7c:0e: - d5:a4:7c:8a:e2:32:6e:16:ae:da:64:1f:b0:55:7c:db:dd:f1: - a4:ba:44:7c:b3:99:58:d2:34:6e:00:ea:97:6c:14:3a:f2:10: - 1e:0a:a2:49:10:76:01:f4:f2:c8:18:fd:cc:63:46:12:8b:09: - 1b:f1:94:e6 ------BEGIN CERTIFICATE----- -MIIDcjCCAlqgAwIBAgIBETANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTIwNTEwMTMyMzQxWhcNMjIwNTExMTMyMzQxWjA6MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbTCCASIwDQYJ -KoZIhvcNAQEBBQADggEPADCCAQoCggEBALk8SsXIo46QF6SeUqpxdSZhgOfHtW2M -/6q2QSa3vhGtXHMWDGQRSAT/1uE7BduJu7OXCdUcFN1ohzmwPXHL4nbQGtgYLYAb -VPblRJrxy69hLt9JDZ0Jt+2x/Tz9PPokz12/fORT5yW16kQi6SbT6iCUnuZhZ7ou -B2cLAy+iCe3wM48LzhDvZ6TGCNrB7cI/10rdFT35XhyBYEY+tbM9L6beRxy8kq7r -3ydrFla33OzRVVelbux1JfW3e9+r0jpakZh9lxcLEwqna0qLwUcw+zr4QQTVwd+4 -Hb97AaVlouAeNremXMwwWvjNb83xGWIlygHjNX/6IPXc/WmyagB9F/cCAwEAAaOB -gTB/MAkGA1UdEwQCMAAwHQYDVR0OBBYEFH3knGvm+XF9RtISPa1rHf3CqnhMMB8G -A1UdIwQYMBaAFLRa5KWz3tJS9rnVppUP6z68x/3/MDIGA1UdEQQrMCmCC2V4YW1w -bGUuY29tggtleGFtcGxlLm5ldIINKi5leGFtcGxlLm9yZzANBgkqhkiG9w0BAQUF -AAOCAQEATwnLetXu9e9iDdx7ooXWjMqVtGvaEVuSAHUTucoLzur7wx/iP38hdHni -5rzaBuUvb/ZVxnM5z0i8DS8M0noGw0pM2UhdoNBzieTUhR2Wmg5XmcZvHSEnH40F -KehAroI5aMOXB888k0wa3y+mpFVIf3yMGski2iTNkjnGiuywjfVpgmfLBO7eU0GW -wSfcL/4z+tMOuNQyqYQoU6Xw0YnVopjnFpG7nMBBjoxYrP/j3S56q7C5cXatDycz -96kp08B2wL8GQHwO1aR8iuIybhau2mQfsFV8293xpLpEfLOZWNI0bgDql2wUOvIQ -HgqiSRB2AfTyyBj9zGNGEosJG/GU5g== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi_nocn.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi_nocn.crt deleted file mode 100644 index 1634846e1b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_multi_nocn.crt +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB/TCCAWagAwIBAgIJAPfGf/jpqWP5MA0GCSqGSIb3DQEBBQUAMA0xCzAJBgNV -BAYTAk5MMB4XDTE0MDEyMjEwMDQzM1oXDTI0MDEyMjEwMDQzM1owDTELMAkGA1UE -BhMCTkwwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAN0Rip+ZurBoyirqO2pt -WZftTslU5A3uzqB9oB6q6A7CuxNA24oSjokTJKXF9frY9ZDXyMrLxf6THa/aEiNz -UnlGGrqgVyt2FjGzqK/nOJsIi2OZOgol7kXSGFi6uZMa7dRYmmMbN/z3FAifhWVJ -81kybdHg6G3eUu1mtKkL2kCVAgMBAAGjZTBjMAkGA1UdEwQCMAAwCwYDVR0PBAQD -AgXgMEkGA1UdEQRCMECCHHd3dy5zaG90b2thbi1icmF1bnNjaHdlaWcuZGWCFHd3 -dy5tYXNzaW1vLWFiYXRlLmV1hwTAqAEBhwTAqEWQMA0GCSqGSIb3DQEBBQUAA4GB -ABjx1ytrqCyFC5/0cjWnbLK9vsvLny2ZikDewfRxqJ5zAxGWLqHOr1SmUmu2DrvB -bkT9g5z19+iMhPnzJz1x7Q2m7WTIJTuUPK+hKZJATDLNhZ86h5Nkw8k9YzKcOrPm -EIqsy55CSgLU0ntljqSBvSb4ifrF1NnIWej2lSfN6r+3 ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_wildcard.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_wildcard.crt deleted file mode 100644 index 4895e8a037..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_example_wildcard.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 12 (0xc) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 7 16:06:36 2012 GMT - Not After : Feb 7 16:06:36 2022 GMT - Subject: C=NL, O=PolarSSL, CN=*.example.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: sha1WithRSAEncryption - 91:b3:84:5c:5d:60:f2:a5:0a:4a:dc:d6:c6:75:da:34:52:72: - 6c:0e:60:4f:ef:0e:55:f3:4b:bf:d0:40:e7:91:2c:a7:94:8f: - 3d:db:0a:ec:b2:f5:83:a7:a1:33:61:96:37:57:14:80:5b:e7: - bc:e1:d3:2c:36:32:6f:ef:7a:00:99:33:15:fc:38:20:df:74: - 7d:3d:0f:81:d0:b4:fd:b6:46:f1:c5:b8:bc:de:74:a2:41:a7: - c8:51:da:20:12:82:3e:0c:8c:48:da:19:b6:52:e9:4f:67:c1: - 28:9e:20:b6:ce:be:89:bd:64:d7:05:3e:87:af:ba:2b:5d:aa: - fe:62:66:fb:a6:75:ad:89:a1:18:e8:78:54:ea:df:0a:85:e9: - 32:32:a8:1a:cd:35:81:f8:a8:da:d1:16:8a:63:e7:67:da:6e: - e1:3b:1c:31:20:99:ee:e2:b2:fb:82:c5:21:e2:63:4c:61:15: - 4d:53:ad:dd:15:7f:0b:b6:33:43:ad:27:8a:b1:af:93:17:72: - c4:be:31:26:93:3c:7d:fc:d5:3d:cf:0b:be:c5:7b:e9:b4:f8: - f3:30:f2:f5:a2:27:eb:9a:71:fc:7f:79:5e:88:c5:a6:2d:33: - 57:ba:38:06:e6:ad:0b:96:97:9d:cc:94:7b:83:09:17:a6:ee: - ce:bb:0f:36 ------BEGIN CERTIFICATE----- -MIIDOzCCAiOgAwIBAgIBDDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTIwMjA3MTYwNjM2WhcNMjIwMjA3MTYwNjM2WjA4MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxFjAUBgNVBAMUDSouZXhhbXBsZS5jb20wggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5PErFyKOOkBeknlKqcXUmYYDnx7VtjP+q -tkEmt74RrVxzFgxkEUgE/9bhOwXbibuzlwnVHBTdaIc5sD1xy+J20BrYGC2AG1T2 -5USa8cuvYS7fSQ2dCbftsf08/Tz6JM9dv3zkU+cltepEIukm0+oglJ7mYWe6Lgdn -CwMvognt8DOPC84Q72ekxgjawe3CP9dK3RU9+V4cgWBGPrWzPS+m3kccvJKu698n -axZWt9zs0VVXpW7sdSX1t3vfq9I6WpGYfZcXCxMKp2tKi8FHMPs6+EEE1cHfuB2/ -ewGlZaLgHja3plzMMFr4zW/N8RliJcoB4zV/+iD13P1psmoAfRf3AgMBAAGjTTBL -MAkGA1UdEwQCMAAwHQYDVR0OBBYEFH3knGvm+XF9RtISPa1rHf3CqnhMMB8GA1Ud -IwQYMBaAFLRa5KWz3tJS9rnVppUP6z68x/3/MA0GCSqGSIb3DQEBBQUAA4IBAQCR -s4RcXWDypQpK3NbGddo0UnJsDmBP7w5V80u/0EDnkSynlI892wrssvWDp6EzYZY3 -VxSAW+e84dMsNjJv73oAmTMV/Dgg33R9PQ+B0LT9tkbxxbi83nSiQafIUdogEoI+ -DIxI2hm2UulPZ8EoniC2zr6JvWTXBT6Hr7orXar+Ymb7pnWtiaEY6HhU6t8Kheky -MqgazTWB+Kja0RaKY+dn2m7hOxwxIJnu4rL7gsUh4mNMYRVNU63dFX8LtjNDrSeK -sa+TF3LEvjEmkzx9/NU9zwu+xXvptPjzMPL1oifrmnH8f3leiMWmLTNXujgG5q0L -lpedzJR7gwkXpu7Ouw82 ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md2.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md2.crt deleted file mode 100644 index bfea77b6f3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md2.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 9 (0x9) - Signature Algorithm: md2WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Jul 12 10:56:59 2009 GMT - Not After : Jul 12 10:56:59 2011 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert MD2 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:dc:13:74:81:c6:12:f6:67:5d:a1:66:72:ed:dc: - 79:b6:58:5c:32:58:b3:d4:14:fd:6c:02:61:9e:0b: - 99:46:63:a3:0a:41:d4:42:33:21:e6:ed:43:07:5a: - 1d:a2:3b:64:29:a8:2a:c1:66:28:00:59:d8:0c:49: - 2d:30:b7:3d:8c:bb:60:62:31:83:27:7f:4b:95:92: - 2e:a0:d6:c6:84:94:4b:b3:e4:a6:cc:ff:32:3a:c5: - ec:4c:c9:24:58:bf:b3:33:77:6a:b5:17:8b:02:10: - 29:8e:95:aa:91:60:17:43:42:87:a8:7c:da:09:83: - 98:9d:7a:65:5e:20:52:07:2e:65:a5:31:fd:d9:74: - 1e:00:c9:ae:9d:81:56:8b:08:0a:f5:1e:9c:dc:a2: - 5e:6c:db:ff:11:83:15:f4:d1:24:57:9b:0f:eb:35: - c9:f1:aa:46:4e:74:7f:fe:1d:b0:91:1f:89:4a:84: - cb:df:75:e3:cd:77:82:62:09:e5:9f:6d:29:de:2e: - 25:d8:48:b6:20:be:51:97:4c:2d:20:65:2d:2a:50: - 9e:24:5d:72:95:e0:a2:06:41:8c:61:e4:50:57:74: - 96:b1:29:b5:a1:88:37:f1:5c:9e:b2:9e:8e:83:8d: - 72:3b:b5:5c:fe:bb:12:89:72:5c:a1:f9:d8:18:29: - b2:27 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - B7:51:D4:E5:20:D5:45:54:F4:C5:51:1B:E0:82:B5:61:05:AF:9B:B6 - X509v3 Authority Key Identifier: - keyid:CF:22:31:27:91:D8:C2:54:FF:1E:DA:D9:EE:8A:C5:89:32:AD:0C:21 - - Signature Algorithm: md2WithRSAEncryption - 28:5a:dd:48:fb:ec:80:fe:de:b7:20:c0:4c:05:a9:4b:51:e9: - a7:d1:4b:5e:76:42:d2:5d:9a:14:19:3b:cb:f9:91:d7:0f:11: - c9:cd:dd:00:8b:2c:76:73:22:a0:19:49:81:63:40:30:48:27: - 62:90:ca:b8:dc:33:35:b3:4b:58:ca:dc:07:66:87:2e:ea:44: - 2a:6a:13:67:7a:32:5e:48:1d:88:88:c5:70:e6:e7:ec:1b:2f: - a7:f4:61:71:29:f6:66:93:30:60:7e:b3:4c:01:c8:2c:53:ce: - 00:11:ec:bf:f6:f2:ce:51:97:d8:ed:ed:dc:c9:6b:b8:19:15: - c8:9a:61:6d:12:9a:99:25:d8:03:1d:a6:4c:20:a5:f8:46:a3: - 05:32:bb:1a:8e:1a:65:0d:f3:13:35:1d:6f:73:28:31:12:d7: - c4:9e:73:a0:a7:ce:82:25:d1:40:e8:1b:77:60:f3:3e:81:7f: - 19:ee:cf:97:4d:c8:c3:35:9b:72:98:3b:c3:35:43:14:0a:04: - 21:7b:f7:db:e6:5f:ce:21:d1:ce:bf:b7:ef:c1:63:21:c2:78: - e1:37:aa:b1:e0:31:b3:b6:63:4c:fd:66:c8:e6:cf:f8:d9:97: - 2f:cf:92:81:3f:d4:bf:ec:e2:ad:6e:39:c7:a6:a8:e0:32:b0: - 2e:0d:e1:30 ------BEGIN CERTIFICATE----- -MIIDPzCCAiegAwIBAgIBCTANBgkqhkiG9w0BAQIFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MDkwNzEyMTA1NjU5WhcNMTEwNzEyMTA1NjU5WjA8MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENlcnQgTUQyMIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3BN0gcYS9mddoWZy7dx5tlhcMliz -1BT9bAJhnguZRmOjCkHUQjMh5u1DB1odojtkKagqwWYoAFnYDEktMLc9jLtgYjGD -J39LlZIuoNbGhJRLs+SmzP8yOsXsTMkkWL+zM3dqtReLAhApjpWqkWAXQ0KHqHza -CYOYnXplXiBSBy5lpTH92XQeAMmunYFWiwgK9R6c3KJebNv/EYMV9NEkV5sP6zXJ -8apGTnR//h2wkR+JSoTL33XjzXeCYgnln20p3i4l2Ei2IL5Rl0wtIGUtKlCeJF1y -leCiBkGMYeRQV3SWsSm1oYg38Vyesp6Og41yO7Vc/rsSiXJcofnYGCmyJwIDAQAB -o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS3UdTlINVFVPTFURvggrVhBa+btjAf -BgNVHSMEGDAWgBTPIjEnkdjCVP8e2tnuisWJMq0MITANBgkqhkiG9w0BAQIFAAOC -AQEAKFrdSPvsgP7etyDATAWpS1Hpp9FLXnZC0l2aFBk7y/mR1w8Ryc3dAIssdnMi -oBlJgWNAMEgnYpDKuNwzNbNLWMrcB2aHLupEKmoTZ3oyXkgdiIjFcObn7Bsvp/Rh -cSn2ZpMwYH6zTAHILFPOABHsv/byzlGX2O3t3MlruBkVyJphbRKamSXYAx2mTCCl -+EajBTK7Go4aZQ3zEzUdb3MoMRLXxJ5zoKfOgiXRQOgbd2DzPoF/Ge7Pl03IwzWb -cpg7wzVDFAoEIXv32+ZfziHRzr+378FjIcJ44TeqseAxs7ZjTP1myObP+NmXL8+S -gT/Uv+zirW45x6ao4DKwLg3hMA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md4.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md4.crt deleted file mode 100644 index 16f166b815..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md4.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 5 (0x5) - Signature Algorithm: md4WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert MD4 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: md4WithRSAEncryption - 94:db:e1:86:71:2d:43:d6:51:61:a7:95:bc:e8:73:da:ff:e4: - fd:41:0f:5c:de:14:f4:c4:ba:5d:2c:30:2c:a6:dc:2d:e8:87: - 45:f1:c5:fe:d1:4a:64:99:19:09:2f:72:7c:3f:8d:c8:31:22: - dd:0a:69:03:3d:12:8c:4d:c3:f7:a3:c5:d1:5d:c9:ff:4b:83: - 6b:d6:b4:e5:d8:ce:94:5e:ec:bf:68:c5:b2:63:8e:5c:cb:f3: - 8d:62:73:82:62:7e:df:db:7d:0b:8d:21:10:db:9a:a1:62:4d: - 46:42:d1:bb:38:32:ef:c1:fc:a1:e2:7f:60:08:37:32:20:2c: - 7c:a2:c9:12:0d:89:fe:2b:15:08:91:79:e2:a9:79:a4:da:cd: - 81:43:01:e2:09:2d:1a:f4:16:ef:af:4d:50:46:5e:2d:dd:48: - 27:10:c0:42:b7:a5:9e:c2:1f:6e:50:36:03:ed:95:77:9a:a3: - d9:4c:d7:23:93:b1:24:2a:63:27:28:7a:de:3d:59:d2:92:c8: - 8f:f6:39:1d:65:ab:09:78:05:46:90:a9:f6:10:b1:ef:c8:8c: - 4d:7d:8d:f2:78:b7:88:15:09:7e:df:e9:87:a8:64:c1:95:53: - fb:da:05:b7:62:bc:ad:fb:d9:a4:a9:06:6c:6b:98:01:b9:39: - 78:d3:4e:87 ------BEGIN CERTIFICATE----- -MIIDPzCCAiegAwIBAgIBBTANBgkqhkiG9w0BAQMFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA8MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENlcnQgTUQ0MIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTxKxcijjpAXpJ5SqnF1JmGA58e1 -bYz/qrZBJre+Ea1ccxYMZBFIBP/W4TsF24m7s5cJ1RwU3WiHObA9ccvidtAa2Bgt -gBtU9uVEmvHLr2Eu30kNnQm37bH9PP08+iTPXb985FPnJbXqRCLpJtPqIJSe5mFn -ui4HZwsDL6IJ7fAzjwvOEO9npMYI2sHtwj/XSt0VPfleHIFgRj61sz0vpt5HHLyS -ruvfJ2sWVrfc7NFVV6Vu7HUl9bd736vSOlqRmH2XFwsTCqdrSovBRzD7OvhBBNXB -37gdv3sBpWWi4B42t6ZczDBa+M1vzfEZYiXKAeM1f/og9dz9abJqAH0X9wIDAQAB -o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBR95Jxr5vlxfUbSEj2tax39wqp4TDAf -BgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQMFAAOC -AQEAlNvhhnEtQ9ZRYaeVvOhz2v/k/UEPXN4U9MS6XSwwLKbcLeiHRfHF/tFKZJkZ -CS9yfD+NyDEi3QppAz0SjE3D96PF0V3J/0uDa9a05djOlF7sv2jFsmOOXMvzjWJz -gmJ+39t9C40hENuaoWJNRkLRuzgy78H8oeJ/YAg3MiAsfKLJEg2J/isVCJF54ql5 -pNrNgUMB4gktGvQW769NUEZeLd1IJxDAQrelnsIfblA2A+2Vd5qj2UzXI5OxJCpj -Jyh63j1Z0pLIj/Y5HWWrCXgFRpCp9hCx78iMTX2N8ni3iBUJft/ph6hkwZVT+9oF -t2K8rfvZpKkGbGuYAbk5eNNOhw== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md5.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md5.crt deleted file mode 100644 index 13d43f1acb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_md5.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 6 (0x6) - Signature Algorithm: md5WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert MD5 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: md5WithRSAEncryption - 92:13:81:0c:ff:ac:ab:98:52:6c:28:c9:c6:3e:80:c6:ec:77: - d0:13:e1:a2:29:1d:2f:b7:c5:95:41:83:60:d9:50:9c:d0:d6: - 09:f7:0f:97:cd:c0:e6:b2:68:fa:31:c9:2a:a3:d3:1e:53:ae: - 79:dc:35:ba:b0:d9:e5:7a:37:1b:2a:92:fa:d2:59:90:43:1b: - 6a:91:c1:db:36:da:e9:39:d3:f5:ac:e3:46:01:ca:55:04:17: - 1a:b1:97:28:e8:ff:1b:e7:e1:10:c9:b5:31:d8:ce:a6:89:6a: - 4a:df:78:7b:02:2f:83:b3:41:d5:ef:0b:b6:44:ff:32:a6:cf: - 1b:c2:f4:b0:75:66:a9:da:6f:7c:a5:e3:c6:c1:3a:2f:bf:f8: - 12:6f:04:2c:37:f2:4e:fc:b9:09:ff:a4:5b:40:19:e9:58:91: - 64:82:d6:ad:b9:7f:c0:12:c2:ce:b7:b6:ba:fb:10:a2:3f:74: - 97:10:39:d4:dc:4a:e5:5c:f7:e5:3a:d9:68:d7:17:6b:f5:51: - 08:b4:a2:30:0d:cc:36:10:6d:4e:1d:22:cc:48:d1:38:44:ba: - cc:2b:47:99:f7:c6:8b:41:24:f3:f1:2c:10:1a:f2:88:bb:b2: - e0:fd:44:26:3d:ad:ea:af:1d:d0:00:56:41:4e:f4:b0:3b:9d: - 32:6f:48:c7 ------BEGIN CERTIFICATE----- -MIIDPzCCAiegAwIBAgIBBjANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA8MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGjAYBgNVBAMTEVBvbGFyU1NMIENlcnQgTUQ1MIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTxKxcijjpAXpJ5SqnF1JmGA58e1 -bYz/qrZBJre+Ea1ccxYMZBFIBP/W4TsF24m7s5cJ1RwU3WiHObA9ccvidtAa2Bgt -gBtU9uVEmvHLr2Eu30kNnQm37bH9PP08+iTPXb985FPnJbXqRCLpJtPqIJSe5mFn -ui4HZwsDL6IJ7fAzjwvOEO9npMYI2sHtwj/XSt0VPfleHIFgRj61sz0vpt5HHLyS -ruvfJ2sWVrfc7NFVV6Vu7HUl9bd736vSOlqRmH2XFwsTCqdrSovBRzD7OvhBBNXB -37gdv3sBpWWi4B42t6ZczDBa+M1vzfEZYiXKAeM1f/og9dz9abJqAH0X9wIDAQAB -o00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBR95Jxr5vlxfUbSEj2tax39wqp4TDAf -BgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQQFAAOC -AQEAkhOBDP+sq5hSbCjJxj6Axux30BPhoikdL7fFlUGDYNlQnNDWCfcPl83A5rJo -+jHJKqPTHlOuedw1urDZ5Xo3GyqS+tJZkEMbapHB2zba6TnT9azjRgHKVQQXGrGX -KOj/G+fhEMm1MdjOpolqSt94ewIvg7NB1e8LtkT/MqbPG8L0sHVmqdpvfKXjxsE6 -L7/4Em8ELDfyTvy5Cf+kW0AZ6ViRZILWrbl/wBLCzre2uvsQoj90lxA51NxK5Vz3 -5TrZaNcXa/VRCLSiMA3MNhBtTh0izEjROES6zCtHmffGi0Ek8/EsEBryiLuy4P1E -Jj2t6q8d0ABWQU70sDudMm9Ixw== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha1.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha1.crt deleted file mode 100644 index 718b2f27e9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha1.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 7 (0x7) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA1 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: sha1WithRSAEncryption - 93:26:40:68:3d:e7:62:ea:d1:6a:78:2b:c2:07:f3:0d:3b:f6: - 69:18:cd:08:5e:31:e7:48:60:08:2a:46:b6:de:d1:35:0a:ec: - 31:36:83:7d:eb:7c:d8:63:09:c3:e4:c5:10:ca:7c:7b:2f:20: - 4d:d2:0e:5f:ee:09:e3:84:4f:28:cc:08:74:9a:11:23:5f:de: - 0e:3a:0f:8b:2d:64:91:05:f6:d5:c7:30:c8:20:ee:6c:c4:62: - 7c:8d:a8:4d:2e:70:8c:ac:b5:5d:de:9b:10:5c:98:fd:a1:78: - 9b:9c:f0:73:33:de:2f:8c:59:fa:dc:af:4c:df:97:e3:9d:00: - 37:9a:fa:d3:67:77:b9:2f:b9:4a:23:ad:f9:b4:a1:b7:ac:c5: - a8:0f:62:8c:e6:7e:b4:94:2a:db:f2:fc:52:92:a4:9e:4e:51: - 4f:9d:c0:ce:ae:3d:17:1c:94:6c:5f:e8:16:b5:ce:2e:e2:5a: - cf:6a:db:dd:b0:d4:be:62:a5:46:92:30:7c:7c:fc:05:f8:78: - 30:93:30:28:ab:69:a1:72:31:dc:3b:97:63:3a:5b:b3:e1:34: - 86:80:4a:28:f5:dc:d5:84:8c:13:a4:6c:d2:c1:2d:a6:25:d7: - 6f:c9:93:78:a5:16:ba:d9:17:6e:3e:ca:96:f2:9e:5c:e3:ae: - 12:2e:a5:11 ------BEGIN CERTIFICATE----- -MIIDQDCCAiigAwIBAgIBBzANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA9MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGzAZBgNVBAMTElBvbGFyU1NMIENlcnQgU0hBMTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALk8SsXIo46QF6SeUqpxdSZhgOfH -tW2M/6q2QSa3vhGtXHMWDGQRSAT/1uE7BduJu7OXCdUcFN1ohzmwPXHL4nbQGtgY -LYAbVPblRJrxy69hLt9JDZ0Jt+2x/Tz9PPokz12/fORT5yW16kQi6SbT6iCUnuZh -Z7ouB2cLAy+iCe3wM48LzhDvZ6TGCNrB7cI/10rdFT35XhyBYEY+tbM9L6beRxy8 -kq7r3ydrFla33OzRVVelbux1JfW3e9+r0jpakZh9lxcLEwqna0qLwUcw+zr4QQTV -wd+4Hb97AaVlouAeNremXMwwWvjNb83xGWIlygHjNX/6IPXc/WmyagB9F/cCAwEA -AaNNMEswCQYDVR0TBAIwADAdBgNVHQ4EFgQUfeSca+b5cX1G0hI9rWsd/cKqeEww -HwYDVR0jBBgwFoAUtFrkpbPe0lL2udWmlQ/rPrzH/f8wDQYJKoZIhvcNAQEFBQAD -ggEBAJMmQGg952Lq0Wp4K8IH8w079mkYzQheMedIYAgqRrbe0TUK7DE2g33rfNhj -CcPkxRDKfHsvIE3SDl/uCeOETyjMCHSaESNf3g46D4stZJEF9tXHMMgg7mzEYnyN -qE0ucIystV3emxBcmP2heJuc8HMz3i+MWfrcr0zfl+OdADea+tNnd7kvuUojrfm0 -obesxagPYozmfrSUKtvy/FKSpJ5OUU+dwM6uPRcclGxf6Ba1zi7iWs9q292w1L5i -pUaSMHx8/AX4eDCTMCiraaFyMdw7l2M6W7PhNIaASij13NWEjBOkbNLBLaYl12/J -k3ilFrrZF24+ypbynlzjrhIupRE= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha224.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha224.crt deleted file mode 100644 index 7283c28c0b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha224.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 8 (0x8) - Signature Algorithm: sha224WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA224 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: sha224WithRSAEncryption - b8:9b:0a:d1:b4:d1:a4:ce:05:39:42:7a:3b:7b:5e:fd:97:57: - 8a:36:60:42:39:d0:e6:0c:9c:7e:2f:2b:be:ef:e7:45:34:77: - 48:7a:10:4a:fd:76:ca:42:39:25:3c:fa:19:f8:63:6c:e7:36: - 27:9a:ec:06:ce:e4:f7:2c:2e:c6:36:c1:25:bd:ab:09:aa:e2: - da:4e:de:ae:b5:f5:ba:9e:90:24:52:34:96:96:61:4c:26:b5: - 57:65:b1:10:ed:13:2b:54:90:ce:d3:21:cb:8c:d3:4c:6c:e5: - e1:78:22:16:3f:e1:be:f1:ee:5d:39:48:a1:e6:80:46:f4:46: - f2:79:03:3e:f1:fc:51:47:d9:05:e8:85:81:1b:0b:4f:fa:85: - 9d:ce:e7:76:5a:6f:da:98:9f:43:f1:f3:2f:2f:57:28:aa:70: - 14:82:7f:d5:69:14:8c:f9:82:b6:2f:a6:df:b5:6b:0e:43:c9: - 96:91:64:3d:8b:a8:17:15:9a:88:42:a4:d0:90:c0:a3:a2:e1: - dd:f6:95:6d:3b:9d:71:a6:1e:9e:2c:1e:db:f6:5f:93:43:2c: - ed:53:70:55:50:56:df:cd:96:6c:d5:91:0f:b1:a7:f4:b7:17: - 9d:1f:0b:f6:0b:f8:fe:e7:7c:de:c1:20:b7:fc:69:13:ba:e2: - 61:9b:a5:62 ------BEGIN CERTIFICATE----- -MIIDQjCCAiqgAwIBAgIBCDANBgkqhkiG9w0BAQ4FADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA/MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBMjI0MIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTxKxcijjpAXpJ5SqnF1JmGA -58e1bYz/qrZBJre+Ea1ccxYMZBFIBP/W4TsF24m7s5cJ1RwU3WiHObA9ccvidtAa -2BgtgBtU9uVEmvHLr2Eu30kNnQm37bH9PP08+iTPXb985FPnJbXqRCLpJtPqIJSe -5mFnui4HZwsDL6IJ7fAzjwvOEO9npMYI2sHtwj/XSt0VPfleHIFgRj61sz0vpt5H -HLySruvfJ2sWVrfc7NFVV6Vu7HUl9bd736vSOlqRmH2XFwsTCqdrSovBRzD7OvhB -BNXB37gdv3sBpWWi4B42t6ZczDBa+M1vzfEZYiXKAeM1f/og9dz9abJqAH0X9wID -AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBR95Jxr5vlxfUbSEj2tax39wqp4 -TDAfBgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQ4F -AAOCAQEAuJsK0bTRpM4FOUJ6O3te/ZdXijZgQjnQ5gycfi8rvu/nRTR3SHoQSv12 -ykI5JTz6GfhjbOc2J5rsBs7k9ywuxjbBJb2rCari2k7errX1up6QJFI0lpZhTCa1 -V2WxEO0TK1SQztMhy4zTTGzl4XgiFj/hvvHuXTlIoeaARvRG8nkDPvH8UUfZBeiF -gRsLT/qFnc7ndlpv2pifQ/HzLy9XKKpwFIJ/1WkUjPmCti+m37VrDkPJlpFkPYuo -FxWaiEKk0JDAo6Lh3faVbTudcaYeniwe2/Zfk0Ms7VNwVVBW382WbNWRD7Gn9LcX -nR8L9gv4/ud83sEgt/xpE7riYZulYg== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha256.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha256.crt deleted file mode 100644 index 03a7521316..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha256.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 9 (0x9) - Signature Algorithm: sha256WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA256 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: sha256WithRSAEncryption - 69:ce:f9:a9:d5:e2:32:db:fe:a9:f9:92:7a:d6:76:37:05:51: - c9:e3:a1:03:72:b2:bc:2c:86:4b:31:16:02:10:e8:43:d4:c0: - 33:3c:4f:ea:9d:12:6b:57:51:bc:d7:d9:42:56:cf:c7:29:e7: - d7:52:24:49:29:ac:9c:de:8f:cc:ab:1a:a9:62:07:5a:6b:f7: - fb:19:ab:f5:b1:2c:a4:aa:dc:5d:03:73:17:7c:ea:52:44:80: - ca:70:d3:10:c5:2e:fd:9f:d2:0d:65:c4:f2:cc:ef:1b:18:e1: - 0a:08:4e:67:d0:56:7f:24:54:2e:73:31:b5:4d:22:74:f8:30: - f9:92:c4:64:c9:46:80:d4:e1:bd:d6:e7:26:ea:bb:c4:fe:6f: - a2:c5:10:e4:64:2f:b0:44:04:2c:b3:44:39:cf:b4:de:ac:83: - 43:5e:0b:ca:cd:fb:4e:18:e6:38:39:e7:10:3f:d6:59:17:e7: - 42:ef:00:e3:88:c6:43:bc:21:12:bf:20:a8:64:c6:30:dc:8c: - 6b:b8:6a:ce:6b:8a:22:3b:d8:af:0c:b4:bb:4d:be:96:dd:40: - d9:87:3e:95:2e:1a:27:23:62:e8:6e:bd:e0:89:d0:a7:28:16: - 95:ea:cb:89:a3:f7:7f:fb:0f:ac:ab:d6:a8:b4:cb:43:92:d9: - cb:3e:8a:11 ------BEGIN CERTIFICATE----- -MIIDQjCCAiqgAwIBAgIBCTANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA/MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBMjU2MIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTxKxcijjpAXpJ5SqnF1JmGA -58e1bYz/qrZBJre+Ea1ccxYMZBFIBP/W4TsF24m7s5cJ1RwU3WiHObA9ccvidtAa -2BgtgBtU9uVEmvHLr2Eu30kNnQm37bH9PP08+iTPXb985FPnJbXqRCLpJtPqIJSe -5mFnui4HZwsDL6IJ7fAzjwvOEO9npMYI2sHtwj/XSt0VPfleHIFgRj61sz0vpt5H -HLySruvfJ2sWVrfc7NFVV6Vu7HUl9bd736vSOlqRmH2XFwsTCqdrSovBRzD7OvhB -BNXB37gdv3sBpWWi4B42t6ZczDBa+M1vzfEZYiXKAeM1f/og9dz9abJqAH0X9wID -AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBR95Jxr5vlxfUbSEj2tax39wqp4 -TDAfBgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQsF -AAOCAQEAac75qdXiMtv+qfmSetZ2NwVRyeOhA3KyvCyGSzEWAhDoQ9TAMzxP6p0S -a1dRvNfZQlbPxynn11IkSSmsnN6PzKsaqWIHWmv3+xmr9bEspKrcXQNzF3zqUkSA -ynDTEMUu/Z/SDWXE8szvGxjhCghOZ9BWfyRULnMxtU0idPgw+ZLEZMlGgNThvdbn -Juq7xP5vosUQ5GQvsEQELLNEOc+03qyDQ14Lys37ThjmODnnED/WWRfnQu8A44jG -Q7whEr8gqGTGMNyMa7hqzmuKIjvYrwy0u02+lt1A2Yc+lS4aJyNi6G694InQpygW -lerLiaP3f/sPrKvWqLTLQ5LZyz6KEQ== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha384.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha384.crt deleted file mode 100644 index 73caac90df..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha384.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 10 (0xa) - Signature Algorithm: sha384WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA384 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: sha384WithRSAEncryption - 68:e6:03:f0:ba:44:e7:cc:e1:b2:07:6c:56:c8:be:b7:ba:80: - 61:c8:f9:66:57:e1:cb:60:7d:cd:8d:0f:66:b0:f2:61:45:fd: - fc:c8:93:95:bb:b4:14:00:76:c7:e1:57:a6:e2:60:31:8b:fc: - e1:0f:68:24:4c:bb:1d:c5:b6:77:ec:23:e1:5b:4f:10:6c:6a: - e0:6d:e7:34:f8:72:14:ae:16:57:25:8b:e8:b9:71:a1:d0:78: - ea:18:c1:51:c4:2e:26:6d:cb:80:8d:a5:b9:de:e7:37:c1:2b: - ec:e8:98:c6:f9:1a:bf:fe:a3:de:3d:d6:59:98:45:dc:4a:a6: - ad:0a:af:73:50:43:23:5a:9b:9a:f9:8f:ff:41:15:e5:9c:12: - 9e:29:55:5c:79:9c:89:0c:c8:8a:82:86:b1:96:ae:7c:7d:4f: - 0b:fd:e3:9e:8b:a5:4d:88:55:05:ad:6c:63:aa:74:0c:41:0d: - 47:22:cc:1a:45:02:92:5e:d1:e0:b9:31:52:ff:f6:30:f0:87: - 2c:dd:fa:fa:b9:cc:45:cb:36:33:5b:35:7f:5f:05:4f:e0:8f: - 9a:e4:d2:fa:c9:d4:fc:62:99:ac:59:fb:fd:04:bc:5a:c0:47: - 5e:5d:3d:df:31:8c:7f:dc:00:cb:cb:c0:f4:62:41:44:db:1d: - ba:c0:ad:8a ------BEGIN CERTIFICATE----- -MIIDQjCCAiqgAwIBAgIBCjANBgkqhkiG9w0BAQwFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA/MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBMzg0MIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTxKxcijjpAXpJ5SqnF1JmGA -58e1bYz/qrZBJre+Ea1ccxYMZBFIBP/W4TsF24m7s5cJ1RwU3WiHObA9ccvidtAa -2BgtgBtU9uVEmvHLr2Eu30kNnQm37bH9PP08+iTPXb985FPnJbXqRCLpJtPqIJSe -5mFnui4HZwsDL6IJ7fAzjwvOEO9npMYI2sHtwj/XSt0VPfleHIFgRj61sz0vpt5H -HLySruvfJ2sWVrfc7NFVV6Vu7HUl9bd736vSOlqRmH2XFwsTCqdrSovBRzD7OvhB -BNXB37gdv3sBpWWi4B42t6ZczDBa+M1vzfEZYiXKAeM1f/og9dz9abJqAH0X9wID -AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBR95Jxr5vlxfUbSEj2tax39wqp4 -TDAfBgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQwF -AAOCAQEAaOYD8LpE58zhsgdsVsi+t7qAYcj5Zlfhy2B9zY0PZrDyYUX9/MiTlbu0 -FAB2x+FXpuJgMYv84Q9oJEy7HcW2d+wj4VtPEGxq4G3nNPhyFK4WVyWL6LlxodB4 -6hjBUcQuJm3LgI2lud7nN8Er7OiYxvkav/6j3j3WWZhF3EqmrQqvc1BDI1qbmvmP -/0EV5ZwSnilVXHmciQzIioKGsZaufH1PC/3jnoulTYhVBa1sY6p0DEENRyLMGkUC -kl7R4LkxUv/2MPCHLN36+rnMRcs2M1s1f18FT+CPmuTS+snU/GKZrFn7/QS8WsBH -Xl093zGMf9wAy8vA9GJBRNsdusCtig== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha512.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha512.crt deleted file mode 100644 index 4bb4eed039..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_sha512.crt +++ /dev/null @@ -1,77 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 11 (0xb) - Signature Algorithm: sha512WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:07 2011 GMT - Not After : Feb 12 14:44:07 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA512 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:b9:3c:4a:c5:c8:a3:8e:90:17:a4:9e:52:aa:71: - 75:26:61:80:e7:c7:b5:6d:8c:ff:aa:b6:41:26:b7: - be:11:ad:5c:73:16:0c:64:11:48:04:ff:d6:e1:3b: - 05:db:89:bb:b3:97:09:d5:1c:14:dd:68:87:39:b0: - 3d:71:cb:e2:76:d0:1a:d8:18:2d:80:1b:54:f6:e5: - 44:9a:f1:cb:af:61:2e:df:49:0d:9d:09:b7:ed:b1: - fd:3c:fd:3c:fa:24:cf:5d:bf:7c:e4:53:e7:25:b5: - ea:44:22:e9:26:d3:ea:20:94:9e:e6:61:67:ba:2e: - 07:67:0b:03:2f:a2:09:ed:f0:33:8f:0b:ce:10:ef: - 67:a4:c6:08:da:c1:ed:c2:3f:d7:4a:dd:15:3d:f9: - 5e:1c:81:60:46:3e:b5:b3:3d:2f:a6:de:47:1c:bc: - 92:ae:eb:df:27:6b:16:56:b7:dc:ec:d1:55:57:a5: - 6e:ec:75:25:f5:b7:7b:df:ab:d2:3a:5a:91:98:7d: - 97:17:0b:13:0a:a7:6b:4a:8b:c1:47:30:fb:3a:f8: - 41:04:d5:c1:df:b8:1d:bf:7b:01:a5:65:a2:e0:1e: - 36:b7:a6:5c:cc:30:5a:f8:cd:6f:cd:f1:19:62:25: - ca:01:e3:35:7f:fa:20:f5:dc:fd:69:b2:6a:00:7d: - 17:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Subject Key Identifier: - 7D:E4:9C:6B:E6:F9:71:7D:46:D2:12:3D:AD:6B:1D:FD:C2:AA:78:4C - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - - Signature Algorithm: sha512WithRSAEncryption - 84:68:78:72:54:00:bf:8a:45:28:35:be:18:47:d8:69:f6:67: - de:a6:f8:a6:d0:fd:9f:79:f7:e8:02:8a:c3:83:5d:85:45:cc: - b6:98:77:a7:18:3f:6b:d2:e4:d0:af:d5:52:d9:db:7e:4a:d3: - 68:b0:08:64:14:de:c2:3b:1d:7b:ac:79:ad:49:5a:4c:f6:d2: - 35:ef:a4:8c:b7:5b:d1:0b:7b:50:c6:9c:48:3e:96:3b:1b:0b: - 0e:e8:10:3f:8c:3b:4f:6b:1d:5c:3a:27:f3:43:22:ac:37:11: - 71:b8:07:66:b0:f8:71:c3:22:cf:f4:96:83:93:fb:42:b0:1a: - 43:f9:4b:df:cb:5f:0f:ba:9e:80:f1:ff:08:3a:46:51:dc:d0: - 36:bd:b1:c4:ca:fb:00:12:e7:e0:37:70:40:0e:73:19:63:c2: - e5:da:56:77:07:68:a5:40:9e:d6:0f:ad:b5:b3:b2:f5:3f:01: - e8:68:e7:a3:b0:d7:f3:dd:ff:b6:d7:8f:75:4e:25:ab:12:32: - 99:45:ad:57:40:de:d7:b4:0d:d0:c3:66:89:47:f2:0c:b2:b5: - df:52:0e:fa:63:62:65:89:07:4a:80:69:0e:4e:ba:c0:43:5d: - 05:75:22:cf:50:f9:ac:bd:ef:8d:8c:10:08:b6:8b:62:4f:a1: - 60:55:a3:0d ------BEGIN CERTIFICATE----- -MIIDQjCCAiqgAwIBAgIBCzANBgkqhkiG9w0BAQ0FADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDA3WhcNMjEwMjEyMTQ0NDA3WjA/MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxHTAbBgNVBAMTFFBvbGFyU1NMIENlcnQgU0hBNTEyMIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuTxKxcijjpAXpJ5SqnF1JmGA -58e1bYz/qrZBJre+Ea1ccxYMZBFIBP/W4TsF24m7s5cJ1RwU3WiHObA9ccvidtAa -2BgtgBtU9uVEmvHLr2Eu30kNnQm37bH9PP08+iTPXb985FPnJbXqRCLpJtPqIJSe -5mFnui4HZwsDL6IJ7fAzjwvOEO9npMYI2sHtwj/XSt0VPfleHIFgRj61sz0vpt5H -HLySruvfJ2sWVrfc7NFVV6Vu7HUl9bd736vSOlqRmH2XFwsTCqdrSovBRzD7OvhB -BNXB37gdv3sBpWWi4B42t6ZczDBa+M1vzfEZYiXKAeM1f/og9dz9abJqAH0X9wID -AQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBR95Jxr5vlxfUbSEj2tax39wqp4 -TDAfBgNVHSMEGDAWgBS0WuSls97SUva51aaVD+s+vMf9/zANBgkqhkiG9w0BAQ0F -AAOCAQEAhGh4clQAv4pFKDW+GEfYafZn3qb4ptD9n3n36AKKw4NdhUXMtph3pxg/ -a9Lk0K/VUtnbfkrTaLAIZBTewjsde6x5rUlaTPbSNe+kjLdb0Qt7UMacSD6WOxsL -DugQP4w7T2sdXDon80MirDcRcbgHZrD4ccMiz/SWg5P7QrAaQ/lL38tfD7qegPH/ -CDpGUdzQNr2xxMr7ABLn4DdwQA5zGWPC5dpWdwdopUCe1g+ttbOy9T8B6Gjno7DX -893/ttePdU4lqxIymUWtV0De17QN0MNmiUfyDLK131IO+mNiZYkHSoBpDk66wENd -BXUiz1D5rL3vjYwQCLaLYk+hYFWjDQ== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_v1_with_ext.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_v1_with_ext.crt deleted file mode 100644 index 4f0704885c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cert_v1_with_ext.crt +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDzTCCArUCCQC97UTH0j7CpDANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC -WFgxCzAJBgNVBAgTAlhYMQswCQYDVQQHEwJYWDELMAkGA1UEChMCWFgxCzAJBgNV -BAsTAlhYMScwJQYJKoZIhvcNAQkBFhhhZG1pbkBpZGVudGl0eS1jaGVjay5vcmcx -GzAZBgNVBAMTEmlkZW50aXR5LWNoZWNrLm9yZzAeFw0xMzA3MDQxNjE3MDJaFw0x -NDA3MDQxNjE3MDJaMIGHMQswCQYDVQQGEwJYWDELMAkGA1UECBMCWFgxCzAJBgNV -BAcTAlhYMQswCQYDVQQKEwJYWDELMAkGA1UECxMCWFgxJzAlBgkqhkiG9w0BCQEW -GGFkbWluQGlkZW50aXR5LWNoZWNrLm9yZzEbMBkGA1UEAxMSaWRlbnRpdHktY2hl -Y2sub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1v8FswMughO8 -mwkHWAf+XRpK33kYR0ifBnObvk2R9ZTEUk/TfFEEFVlen5xhiE0g8lbCj8Y5Mzsg -wZsJv5in/KnraYb7VC0ah0jx4sMkhKRcyUWfjyH8r7FNH1j1jd08ZpWJGotYxxaL -evqom1rzLN99JPObwyCCgGcQjlRV7cMfIgwlwHb/JPXOy/hYAgjrCjqvBu3nL5/b -HF0PyVGiKCEQiHhMBKNjAxzQrCUGy7Vp+3QlIYrs6/m5A96vohX/j+wzwIp3QgiK -Yhj5E4Zo/iQLf6Rwl7pL4RTdT+crcy143mYiShNY+ayl9snfVJNnuHaMe15fVEsP -X9lDvdBvXwIDAQABoz8wPTA7BgNVHREENDAyghJpZGVudGl0eS1jaGVjay5vcmeC -Fnd3dy5pZGVudGl0eS1jaGVjay5vcmeHBCU7/jAwDQYJKoZIhvcNAQEFBQADggEB -AAXUXoWlQxKvSCVWhes8x03MCude0nDqDFH1DPGIKeVeWOw87nVni+hIvy8II6hj -5ZfGSHuZci2AgElA3tXk2qDcZ/uBXe2VV4IwsgXKUYSlpz1xoU55InT4e7KdssEP -HOyrU03Dzm8Jk0PhgEJpV48tkWYoJvZvOiwG0e43UPDv9xp8C8EbvJmmuWkUWnNW -o0yDnoAOxGfUGSUQ1guTpWCoQEKj3DS4v4lI0kNmJm+oRE2vv1XealWEHSuMpRZO -Qhy8WImX3muw99MP579tY44D5Z7p3kpiC1bwV3tzkHdf5mkrAbFJIfliPvjMrPMw -2eyXXijDsebpT0w3ruMxjHg= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.crt deleted file mode 100644 index 2dfa51632f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.crt +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICLDCCAbKgAwIBAgIBDTAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EwHhcN -MTMwOTI0MTU1MjA0WhcNMjMwOTIyMTU1MjA0WjBBMQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxHzAdBgNVBAMTFlBvbGFyU1NMIFRlc3QgQ2xpZW50IDIw -WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARX5a6xc9/TrLuTuIH/Eq7u5lOszlVT -9jQOzC7jYyUL35ji81xgNpbA1RgUcOV/n9VLRRjlsGzVXPiWj4dwo+THo4GdMIGa -MAkGA1UdEwQCMAAwHQYDVR0OBBYEFHoAX4Zk/OBd5REQO7LmO8QmP8/iMG4GA1Ud -IwRnMGWAFJ1tICRJAT8ry3i1Gbx+JMnb+zZ8oUKkQDA+MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0GC -CQDBQ+J+YkPM6DAKBggqhkjOPQQDAgNoADBlAjBKZQ17IIOimbmoD/yN7o89u3BM -lgOsjnhw3fIOoLIWy2WOGsk/LGF++DzvrRzuNiACMQCd8iem1XS4JK7haj8xocpU -LwjQje5PDGHfd3h9tP38Qknu5bJqws0md2KOKHyeV0U= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.key b/build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.key deleted file mode 100644 index e747d0943c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/cli2.key +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIPb3hmTxZ3/mZI3vyk7p3U3wBf+WIop6hDhkFzJhmLcqoAoGCCqGSM49 -AwEHoUQDQgAEV+WusXPf06y7k7iB/xKu7uZTrM5VU/Y0Dswu42MlC9+Y4vNcYDaW -wNUYFHDlf5/VS0UY5bBs1Vz4lo+HcKPkxw== ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha1.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha1.pem deleted file mode 100644 index 8358640a0d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha1.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN X509 CRL----- -MIIBbzCB9gIBATAJBgcqhkjOPQQBMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQ -b2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBFQyBDQRcNMTMwOTI0MTYz -MTA4WhcNMjMwOTIyMTYzMTA4WjAUMBICAQoXDTEzMDkyNDE2MjgzOFqgcjBwMG4G -A1UdIwRnMGWAFJ1tICRJAT8ry3i1Gbx+JMnb+zZ8oUKkQDA+MQswCQYDVQQGEwJO -TDERMA8GA1UEChMIUG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMg -Q0GCCQDBQ+J+YkPM6DAJBgcqhkjOPQQBA2kAMGYCMQDVG95rrSSl4dJgbJ5vR1GW -svEuEsAh35EhF1WrcadMuCeMQVX9cUPupFfQUpHyMfoCMQCKf0yv8pN9BAoi3FVm -56meWPhUekgLKKMAobt2oJJY6feuiFU2YFGs1aF0rV6Bj+U= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha224.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha224.pem deleted file mode 100644 index 9131f104ff..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha224.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN X509 CRL----- -MIIBcDCB9wIBATAKBggqhkjOPQQDATA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwEDaAAwZQIwbn+i0dOest0IJGzuqBLA -V5nscZPvHjDV6lWsSwurS4LC/Uv/qWteuMCp3OqQRJHcAjEA6KA0dibovfL1WKFo -C8jUGxlMfHeWDRkqMfcjjgIpky7v50sKtDOfmFJn3HFUbiKp ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha256.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha256.pem deleted file mode 100644 index adfd5f8937..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha256.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN X509 CRL----- -MIIBcTCB9wIBATAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwIDaQAwZgIxAKuQ684s7gyhtxKJr6Ln -S2BQ02f1jjPHrZVdXaZvm3C5tGi2cKkoK1aMiyC3LsRCuAIxAIMhj0TmcuIZr5fX -g5RByD7zUnZBpoEAdgxFy4JPJ2IViWOPekSGh8b/JY1VNS6Zbw== ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha384.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha384.pem deleted file mode 100644 index b757abb186..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha384.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN X509 CRL----- -MIIBcDCB9wIBATAKBggqhkjOPQQDAzA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwMDaAAwZQIwateJaD13+Yi4HWBIlOov -8ZDsvnfQfW/R0A1s2ZccAi+byurShuNGiSvsFSh5d/6QAjEA427F8bNk/fdj5YXu -Oo1qEd7WpD2dNUb0draGSIcJGBRGzi5it14UXr9cR4S5eJ6Q ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha512.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha512.pem deleted file mode 100644 index f7c9402a39..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-ec-sha512.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN X509 CRL----- -MIIBcTCB9wIBATAKBggqhkjOPQQDBDA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwQDaQAwZgIxAL/VFrDIYUECsS0rVpAy -6zt/CqeAZ1sa/l5LTaG1XW286n2Kibipr6EpkYZNYIQILgIxAI0wb3Py1DHPWpYf -/BFBH7C3KYq+nWTrLeEnhrjU1LzG/CiQ8lnuskya6lw/P3lJ/A== ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-future.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-future.pem deleted file mode 100644 index 1938219d48..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-future.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBgzCCAQoCAQEwCQYHKoZIzj0EATA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTMyMDMxMDEx -MDUxNVoXDTQyMDMwODExMDUxNVowKDASAgEKFw0xMzA5MjQxNjI4MzhaMBICARYX -DTE0MDEyMDEzNDMwNVqgcjBwMG4GA1UdIwRnMGWAFJ1tICRJAT8ry3i1Gbx+JMnb -+zZ8oUKkQDA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMIUG9sYXJTU0wxHDAaBgNV -BAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0GCCQDBQ+J+YkPM6DAJBgcqhkjOPQQBA2gA -MGUCMQCmsvNsOQdbGpmzpeZlKU9lDP6yyWenrI/89swZYogE3cSPob4tOzeYg38i -or91IPgCMD7N/0Qz6Nq2IgBtZORLgsA0ltK+W6AOS+/EIhvGuXV8uguUyYknl4vb -+cE+lWxhCQ== ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1-badsign.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1-badsign.pem deleted file mode 100644 index 7e2a59677a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1-badsign.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN X509 CRL----- -MIICJDCCAQYCAQEwEwYJKoZIhvcNAQEKMAaiBAICAOowOzELMAkGA1UEBhMCTkwx -ETAPBgNVBAoTCFBvbGFyU1NMMRkwFwYDVQQDExBQb2xhclNTTCBUZXN0IENBFw0x -NDAxMjAxMzQ2MzVaFw0yNDAxMTgxMzQ2MzVaMCgwEgIBChcNMTMwOTI0MTYyODM4 -WjASAgEWFw0xNDAxMjAxMzQzMDVaoGcwZTBjBgNVHSMEXDBagBS0WuSls97SUva5 -1aaVD+s+vMf9/6E/pD0wOzELMAkGA1UEBhMCTkwxETAPBgNVBAoTCFBvbGFyU1NM -MRkwFwYDVQQDExBQb2xhclNTTCBUZXN0IENBggEAMBMGCSqGSIb3DQEBCjAGogQC -AgDqA4IBAQB8ZBX0BEgRcx0lfk1ctELRu1AYoJ5BnsmQpq23Ca4YIP2yb2kTN1ZS -4fR4SgYcNctgo2JJiNiUkCu1ZnRUOJUy8UlEio0+aeumTNz6CbeJEDhr5NC3oiV0 -MzvLn9rJVLPetOT9UrvvIy8iz5Pn1d8mu5rkt9BKQRq9NQx8riKnSIoTc91NLCMo -mkCCB55DVbazODSWK19e6yQ0JS454RglOsqRtLJ/EDbi6lCsLXotFt3GEGMrob1O -7Qck1Z59boaHxGYFEVnx90+4M3/qikVtwZdcBjLEmfuwYvszFw8J2y6Xwmg/HtUa -y6li0JzWNHtkKUlCv2+SESZbD3NU8GQY ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1.pem deleted file mode 100644 index 59ca4f703e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha1.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN X509 CRL----- -MIICJDCCAQYCAQEwEwYJKoZIhvcNAQEKMAaiBAICAOowOzELMAkGA1UEBhMCTkwx -ETAPBgNVBAoTCFBvbGFyU1NMMRkwFwYDVQQDExBQb2xhclNTTCBUZXN0IENBFw0x -NDAxMjAxMzQ2MzVaFw0yNDAxMTgxMzQ2MzVaMCgwEgIBChcNMTMwOTI0MTYyODM4 -WjASAgEWFw0xNDAxMjAxMzQzMDVaoGcwZTBjBgNVHSMEXDBagBS0WuSls97SUva5 -1aaVD+s+vMf9/6E/pD0wOzELMAkGA1UEBhMCTkwxETAPBgNVBAoTCFBvbGFyU1NM -MRkwFwYDVQQDExBQb2xhclNTTCBUZXN0IENBggEAMBMGCSqGSIb3DQEBCjAGogQC -AgDqA4IBAQB8ZBX0BEgRcx0lfk1ctELRu1AYoJ5BnsmQpq23Ca4YIP2yb2kTN1ZS -4fR4SgYcNctgo2JJiNiUkCu1ZnRUOJUy8UlEio0+aeumTNz6CbeJEDhr5NC3oiV0 -MzvLn9rJVLPetOT9UrvvIy8iz5Pn1d8mu5rkt9BKQRq9NQx8riKnSIoTc91NLCMo -mkCCB55DVbazODSWK19e6yQ0JS454RglOsqRtLJ/EDbi6lCsLXotFt3GEGMrob1O -7Qck1Z59boaHxGYFEVnx90+4M3/qikVtwZdcBjLEmfuwYvszFw8J2y6Xwmg/HtUa -y6li0JzWNHtkKUlCv2+SESZbD3NU8GQZ ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha224.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha224.pem deleted file mode 100644 index a51d5d9113..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha224.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN X509 CRL----- -MIICejCCATECAQEwPgYJKoZIhvcNAQEKMDGgDTALBglghkgBZQMEAgShGjAYBgkq -hkiG9w0BAQgwCwYJYIZIAWUDBAIEogQCAgDiMDsxCzAJBgNVBAYTAk5MMREwDwYD -VQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVzdCBDQRcNMTQwMTIw -MTM1NjA2WhcNMjQwMTE4MTM1NjA2WjAoMBICAQoXDTEzMDkyNDE2MjgzOFowEgIB -FhcNMTQwMTIwMTM0MzA1WqBnMGUwYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/r -PrzH/f+hP6Q9MDsxCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcG -A1UEAxMQUG9sYXJTU0wgVGVzdCBDQYIBADA+BgkqhkiG9w0BAQowMaANMAsGCWCG -SAFlAwQCBKEaMBgGCSqGSIb3DQEBCDALBglghkgBZQMEAgSiBAICAOIDggEBAEJI -i9sQOzMvvOTksN48+X+kk/wkLMKRGI222lqU6y6tP1LX3OE/+KN8gPXR+lCC+e0v -TsRTJkpKEcmHZoP/8kOtZnLb9PdITKGMQnZ+dmn5MFEzZI/zyrYWuJTuK1Q83w0e -Mc88cAhu8i4PTk/WnsWDphK1Q2YRupmmwWSUpp1Z2rpR+YSCedC01TVrtSUJUBw9 -NSqKDhyWYJIbS6/bFaERswC8xlMRhyLHUvikjmAK36TbIdhTnEffHOPW75sEOEEB -f0A3VtlZ7y5yt2/a6vOauJCivxKt/PutdHfBqH43QQmoVLWC2FmT9ADTJwcsZB3D -a6JSqCIMRCQY2JOUn0A= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha256.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha256.pem deleted file mode 100644 index f16a49118e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha256.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN X509 CRL----- -MIICejCCATECAQEwPgYJKoZIhvcNAQEKMDGgDTALBglghkgBZQMEAgGhGjAYBgkq -hkiG9w0BAQgwCwYJYIZIAWUDBAIBogQCAgDeMDsxCzAJBgNVBAYTAk5MMREwDwYD -VQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVzdCBDQRcNMTQwMTIw -MTM1NjE2WhcNMjQwMTE4MTM1NjE2WjAoMBICAQoXDTEzMDkyNDE2MjgzOFowEgIB -FhcNMTQwMTIwMTM0MzA1WqBnMGUwYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/r -PrzH/f+hP6Q9MDsxCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcG -A1UEAxMQUG9sYXJTU0wgVGVzdCBDQYIBADA+BgkqhkiG9w0BAQowMaANMAsGCWCG -SAFlAwQCAaEaMBgGCSqGSIb3DQEBCDALBglghkgBZQMEAgGiBAICAN4DggEBAEZ4 -oqp9i5eXrN6aCSTaU1j07MVTFW/U1jQAq6GseB6bEvoEXFMUHJsgAObqCK9flfEC -FEqXqWSo33hhPU7AKKttbDLjUYRNnQAPRUnRIl1/a1+UjqgKchWWD9ityeW8ICxo -IdATX9reYmPDLIMqTC7zuflYkvrvdEOuBORQP5mn4j8t84MSQF/p4qzaU0XxLo4X -ckzZCcHpa45AApCDjJMd9onhFVCYsykiYrF9NQFO8TI4lQ5jv79GoufEzvhY1SPB -r1xz4sMpfyaoPaa3SM2/nD65E5jzXell2u2VWNGKv4zAQP0E5yGel+1rklBltadb -XLdJyyak33CLBKu+nJc= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha384.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha384.pem deleted file mode 100644 index 50f7e4cd24..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha384.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN X509 CRL----- -MIICejCCATECAQEwPgYJKoZIhvcNAQEKMDGgDTALBglghkgBZQMEAgKhGjAYBgkq -hkiG9w0BAQgwCwYJYIZIAWUDBAICogQCAgDOMDsxCzAJBgNVBAYTAk5MMREwDwYD -VQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVzdCBDQRcNMTQwMTIw -MTM1NjI4WhcNMjQwMTE4MTM1NjI4WjAoMBICAQoXDTEzMDkyNDE2MjgzOFowEgIB -FhcNMTQwMTIwMTM0MzA1WqBnMGUwYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/r -PrzH/f+hP6Q9MDsxCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcG -A1UEAxMQUG9sYXJTU0wgVGVzdCBDQYIBADA+BgkqhkiG9w0BAQowMaANMAsGCWCG -SAFlAwQCAqEaMBgGCSqGSIb3DQEBCDALBglghkgBZQMEAgKiBAICAM4DggEBAAco -SntUGDLBOAu0IIZaVea5Nt1NMsMcppC0hWPuH1LKAwyUODBqpT+0+AuALK0eIdYR -a7mAB+cv2fFwmwxnQWJ1Fvx4ft/N2AAfB83VRKpSo3xR8bxloHfTWKmyxJHmH9j1 -EYmLS86rj3Nhjf4m/YlQQ3Im5HwOgSgBOE8glq5D+0Wmsi9LsNEZXEzMw7TMUgbs -y9o/ghYF/shKU4mewK3DeM9gQiTcH5A4ISXR87hBQ08AKJRAG1CLvTyzqWiUUY+k -q8iZDYF17sHrPi2yn8q9c4zdxiaWDGDdL0Lh90wXGTAageoGEq25TMuL5FpX+u1u -KUH/xf1jEnNzbYNGiZw= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha512.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha512.pem deleted file mode 100644 index 0f1d6510bc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl-rsa-pss-sha512.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN X509 CRL----- -MIICejCCATECAQEwPgYJKoZIhvcNAQEKMDGgDTALBglghkgBZQMEAgOhGjAYBgkq -hkiG9w0BAQgwCwYJYIZIAWUDBAIDogQCAgC+MDsxCzAJBgNVBAYTAk5MMREwDwYD -VQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVzdCBDQRcNMTQwMTIw -MTM1NjM4WhcNMjQwMTE4MTM1NjM4WjAoMBICAQoXDTEzMDkyNDE2MjgzOFowEgIB -FhcNMTQwMTIwMTM0MzA1WqBnMGUwYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/r -PrzH/f+hP6Q9MDsxCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcG -A1UEAxMQUG9sYXJTU0wgVGVzdCBDQYIBADA+BgkqhkiG9w0BAQowMaANMAsGCWCG -SAFlAwQCA6EaMBgGCSqGSIb3DQEBCDALBglghkgBZQMEAgOiBAICAL4DggEBAB9F -ywBfxOjetxNbCFhOYoPY2jvFCFVdlowMGuxEhX/LktqiBXqRc2r5naQSzuHqO8Iq -1zACtiDLri0CvgSHlravBNeY4c2wj//ueFE89tY5pK9E6vZp7cV+RfMx2YfGPAA2 -t7tWZ2rJWzELg8cZ8hpjSwFH7JmgJzjE5gi2gADhBYO6Vv5S3SOgqNjiN1OM31AU -p6GHK5Y1jurF5Zwzs+w3wXoXgpOxxwEC4eiS86c9kNSudwTLvDTU0bYEQE1cF+K0 -sB8QWABFJfuO5kjD2w3rWgmAiOKsZoxd1xrda+WD3JhDXnoVq3oVBIVlWVz6YID8 -enMfMvwScA5AImzu9xA= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl.pem deleted file mode 100644 index 2bd10968e7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjI1 -OVoXDTE5MTEyNTEwMjI1OVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAJYuWdKPdblMVWCnxpMnchuL -dqWzK2BA0RelCaGjpxuwX3NmLDm+5hKja/DJxaRqTOf4RSC3kcX8CdIldsLO96dz -//wAQdFPDhy6AFT5vKTO8ItPHDb7qFOqFqpeJi5XN1yoZGTB1ei0mgD3xBaKbp6U -yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q -NbKXDiPRmPX0qVleCZSeSp1JAmU4GoCO+96qQUpjgll+6xWya3UNj61f9sh0Zzr7 -5ug2LZo5uBM/LpNR1K3TLxNCcg7uUPTn9r143d7ivJhPl3tEJn4PXjv6mlLoOgU= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ec-rsa.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ec-rsa.pem deleted file mode 100644 index 3cda8ff03e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ec-rsa.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN X509 CRL----- -MIIBcTCB9wIBATAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwIDaQAwZgIxAKuQ684s7gyhtxKJr6Ln -S2BQ02f1jjPHrZVdXaZvm3C5tGi2cKkoK1aMiyC3LsRCuAIxAIMhj0TmcuIZr5fX -g5RByD7zUnZBpoEAdgxFy4JPJ2IViWOPekSGh8b/JY1VNS6Zbw== ------END X509 CRL----- ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjI1 -OVoXDTE5MTEyNTEwMjI1OVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAJYuWdKPdblMVWCnxpMnchuL -dqWzK2BA0RelCaGjpxuwX3NmLDm+5hKja/DJxaRqTOf4RSC3kcX8CdIldsLO96dz -//wAQdFPDhy6AFT5vKTO8ItPHDb7qFOqFqpeJi5XN1yoZGTB1ei0mgD3xBaKbp6U -yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q -NbKXDiPRmPX0qVleCZSeSp1JAmU4GoCO+96qQUpjgll+6xWya3UNj61f9sh0Zzr7 -5ug2LZo5uBM/LpNR1K3TLxNCcg7uUPTn9r143d7ivJhPl3tEJn4PXjv6mlLoOgU= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ecfut-rsa.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ecfut-rsa.pem deleted file mode 100644 index 87b8c29440..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_ecfut-rsa.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN X509 CRL----- -MIIBgzCCAQoCAQEwCQYHKoZIzj0EATA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTMyMDMxMDEx -MDUxNVoXDTQyMDMwODExMDUxNVowKDASAgEKFw0xMzA5MjQxNjI4MzhaMBICARYX -DTE0MDEyMDEzNDMwNVqgcjBwMG4GA1UdIwRnMGWAFJ1tICRJAT8ry3i1Gbx+JMnb -+zZ8oUKkQDA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMIUG9sYXJTU0wxHDAaBgNV -BAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0GCCQDBQ+J+YkPM6DAJBgcqhkjOPQQBA2gA -MGUCMQCmsvNsOQdbGpmzpeZlKU9lDP6yyWenrI/89swZYogE3cSPob4tOzeYg38i -or91IPgCMD7N/0Qz6Nq2IgBtZORLgsA0ltK+W6AOS+/EIhvGuXV8uguUyYknl4vb -+cE+lWxhCQ== ------END X509 CRL----- ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjI1 -OVoXDTE5MTEyNTEwMjI1OVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAJYuWdKPdblMVWCnxpMnchuL -dqWzK2BA0RelCaGjpxuwX3NmLDm+5hKja/DJxaRqTOf4RSC3kcX8CdIldsLO96dz -//wAQdFPDhy6AFT5vKTO8ItPHDb7qFOqFqpeJi5XN1yoZGTB1ei0mgD3xBaKbp6U -yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q -NbKXDiPRmPX0qVleCZSeSp1JAmU4GoCO+96qQUpjgll+6xWya3UNj61f9sh0Zzr7 -5ug2LZo5uBM/LpNR1K3TLxNCcg7uUPTn9r143d7ivJhPl3tEJn4PXjv6mlLoOgU= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsa-ec.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsa-ec.pem deleted file mode 100644 index ded369d897..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsa-ec.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjI1 -OVoXDTE5MTEyNTEwMjI1OVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAJYuWdKPdblMVWCnxpMnchuL -dqWzK2BA0RelCaGjpxuwX3NmLDm+5hKja/DJxaRqTOf4RSC3kcX8CdIldsLO96dz -//wAQdFPDhy6AFT5vKTO8ItPHDb7qFOqFqpeJi5XN1yoZGTB1ei0mgD3xBaKbp6U -yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q -NbKXDiPRmPX0qVleCZSeSp1JAmU4GoCO+96qQUpjgll+6xWya3UNj61f9sh0Zzr7 -5ug2LZo5uBM/LpNR1K3TLxNCcg7uUPTn9r143d7ivJhPl3tEJn4PXjv6mlLoOgU= ------END X509 CRL----- ------BEGIN X509 CRL----- -MIIBcTCB9wIBATAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwIDaQAwZgIxAKuQ684s7gyhtxKJr6Ln -S2BQ02f1jjPHrZVdXaZvm3C5tGi2cKkoK1aMiyC3LsRCuAIxAIMhj0TmcuIZr5fX -g5RByD7zUnZBpoEAdgxFy4JPJ2IViWOPekSGh8b/JY1VNS6Zbw== ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsabadpem-ec.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsabadpem-ec.pem deleted file mode 100644 index a035e1899e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_cat_rsabadpem-ec.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjI1 -OVoXDTE5MTEyNTEwMjI1OVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAJYuWdKPdblMVWCnxpMnchuL -dqWzK2BA0RelCaGjpxuwX3NmLDm+5hKja/DJxaRqTOf4RSC3kcX8CdIldsLO96dz -//wAQdFPDhy6AFT5vKTO8ItPHDb7qFOqFqpeJi5XN1yoZGTB1ei0mgD3xBaKbp6U -yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q -NbKXDiPRmPX0qVleCZSeSp1JAmU4GoCO+96qQUpjgll+6xWya3UNj61f9sh0Zzr7 -5ug2LZo5uBM/LpNR1K3TLxNCcg7uUPTn9r143d7ivJhPl3tEJn4PXjv6mlLoOgU ------END X509 CRL----- ------BEGIN X509 CRL----- -MIIBcTCB9wIBATAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwIDaQAwZgIxAKuQ684s7gyhtxKJr6Ln -S2BQ02f1jjPHrZVdXaZvm3C5tGi2cKkoK1aMiyC3LsRCuAIxAIMhj0TmcuIZr5fX -g5RByD7zUnZBpoEAdgxFy4JPJ2IViWOPekSGh8b/JY1VNS6Zbw== ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_expired.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_expired.pem deleted file mode 100644 index cf60ae4d78..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_expired.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjQx -OVoXDTExMDIyMDExMjQxOVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAKgP1XmCIPbfY1/UO+SVFQir -jArZ94QnQdoan4tJ29d8DmTxJ+z9/KyWNoGeOwc9P/2GQQaZahQOBr0f6lYd67Ct -wFVh/Q2zF8FgRcrQV7u/vJM33Q2yEsQkMGlM7rE5lC972vUKWu/NKq8bN9W/tWxZ -SFbvTXpv024aI0IRudpOCALnIy8SFhVb2/52IN2uR6qrFizDexMEdSckgpHuJzGS -IiANhIMn5LdQYJFjPgBzQU12tDdgzcpxtGhT10y4uQre+UbSjw+iVyml3issw59k -OSmkWFb06LamRC215JAMok3YQO5RnxCR8EjqPcJr+7+O9a1O1++yiaitg4bUjEA= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md2.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md2.pem deleted file mode 100644 index e27379564a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md2.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQIFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTA5MDcxOTE5NTYz -N1oXDTA5MDkxNzE5NTYzN1owKDASAgEBFw0wOTAyMDkyMTEyMzZaMBICAQMXDTA5 -MDIwOTIxMTIzNlowDQYJKoZIhvcNAQECBQADggEBAF8F5y82zgtxcwQ4aFvrkanT -ygyd5+RW/Y//vpck44V+CYx1d1r+QkauaXel9qUKBPsg2dUwQ+jwV/m+Sp2MHaX5 -NfW7XUb7Ji4yhwgh9/9vFPqqnKBf9esLJuJoQ4mLhcGB5J1yCcavLrynvB4PJEnG -graTbbyizelXBmk3ApvNYxczJZxt7EzpVbrFaev7myGmOffdDkIMc2WDpDkyLTlU -kITjB7fMJhD/dgNskKZ4fgkKKKPCMJrJPO67Wzwqx/6vsrZcACB9X+143WZr4GVO -Fw2SaMnqfVLlUEndoOpbLCU4ugcc82kQQF3TsovXJYW7XqoWl2u/ENCwShl9rl4= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md4.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md4.pem deleted file mode 100644 index 1f77dab78c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md4.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQMFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEDBQADggEBAIJtYXy3uwIpmSGfi9muS8xv -36FT6g3s1V/xicdPa54juJgBI6sxHKzQtbSNIbqadEWwUtvQ8k1EMRo9UGObhRV8 -i+UWm5qi0GFV7nMi4E2p2Ji/sFKtgdxkzhCfn+p3MoGgx/nC7YtwpnNdF+kuCV1M -JTPqfm+taZkYADOafP/hRaPx3TI+HNE3ux4Cb7hNpWdfWzt48ZPMuhCMzItLd/UK -xxjJam9XAGUTKi7+eWtma9XzmYOIElQv2KFPVMcx5nvg039rrWK6tObGL67kCfTH -v+nIx7rAOW6UNU8aj1kfJHYjEKMBH1I9wjMSHUpkxBLQOKlPNRksiEVsIhmEVss= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md5.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md5.pem deleted file mode 100644 index 1b17967ec8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_md5.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEEBQADggEBAKKCJZ1MwL+gKAw3RV4qEmb9 -gMDdSLJ1Vdkn9FgDx2ijNnYDtvaW+I3sOXrq7O6gVN1KEamJJbufVJA5+OE2oVbC -husEdgQm8D5TbrGcjPIPWxgYyuuRsl7XovZhXnqTIUrC+J8oH9XzKaMc+HZb5UhR -h8bzcyp+9jbBje7lWwKTzkuvd/I7VbS02TUkWFJTrYB0Laj8WMcgcZiyX0iZuj8j -4hOupu0lPoSzZ4h7t0Vmay6wO+8n8LJohyiwYS7LddpOjIdP0MWifN7u/ArqNNlh -2kg8eAc1pYOU/pJFTAAbOmC/kQpa9skd+PPIPPh9T53o3yeDQA0vFqN92JryCCU= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha1.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha1.pem deleted file mode 100644 index 049bebfcf5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha1.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAG64jqn7VLdvnKROsbCPR8w9 -xnox9vjuM2lGWema9sTuptw9EhArVSbibXZ1IPPyrEy1QOq3NukBqUW3KzOzYV5M -BxZSa28FTQxtVChWkDUIMCK8BSxy07yieFf/3A8mbfcW3ZzN4akLxOweuFp6l2H7 -9oa2jeUi1BlHCZS6JYI2pHZl8qiMRiqqMleSM2k1w7TraKLNBFM8UK72brXeZjPi -nNOzdYsQDzWo1HW7dsLWLfZKoJeyqvofVDQpC5dO56kty/do89z1OnEXfzMNeVVT -JCeAOzuu6kdrf+9keRoWhcIoBos/XtTV57u0pgr81bLgjj5PYivevKL/kKbyvKI= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha224.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha224.pem deleted file mode 100644 index 066f5be070..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha224.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQ4FADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEOBQADggEBAL2sIly2OwgBu9UfEImduTG/ -RtGEO8RkXbCRJPLZaVGQh9b8rCRVHL9tIWm372FVkKyYEm3mIrl2ry16RznRt5yx -Dd8/DKUGUlIe1KwzjDc9O7bv1FDSXHd1USmGTheKDHNtuJXYENMHdoyR2k2BVGOZ -ie4zUcSpqyMjBlUjgNmXN6gQIcrRImumVUjMk74+rWTa0hQ0piF2qlRuE1dDqcZP -LkE/92rbnFeRAO91XUeEj13dif2UjlArFWd62AFp0wtIn2sb7wahhUj9/rEs6Wgx -kdiNsRMto6/ixLrPu3vxs80ZPWHey587T1ZZ9bS/wDkp9W+W0rGyRoPVmqiKtvM= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha256.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha256.pem deleted file mode 100644 index c3ca25699f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha256.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQsFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQELBQADggEBAG4mBBgwfNynCYYL2CEnqore -mgKpC32tB6WiUBu9figcvdN3nSX/1wrB8rpiE8R04C8oSFglwhotJCnlWsy42tjb -0pk0Wuizln0PFMc/OypqRNNhwx31SHH42W4KzONiqvq3n/WkH3M1YniR1ZnMlyvi -lJioQn6ZAoc6O6mMP1J9duKYYhiMAOV992PD1/iqXw+jYN31RwdIS8/mGzIs4ake -EdviwhM3E4/sVbNOWCOnZFYV4m+yNAEe29HL1VKw6UXixBczct+brqXNVD3U6T0F -5ovR6BTefZO17eT52Duke5RZGDUyQOGywxOYKI5W+FcOYdp+U5Idk399tAz2Mdw= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha384.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha384.pem deleted file mode 100644 index b3baa2a950..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha384.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQwFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEMBQADggEBAC0GpmRvsrvshp1q/SXk80HA -m28ZvEuys9zY5/AnrtYHQfsX9QRJk5li7PlnzHtVGp8I5Qi4mJVPaJ+JmhqAc/oo -NPmxDx8m9XF9v0XHzqQZIWlPXH8QM9WLzTazbQFXhuwnZ6LPhpo+m8cbN91mUFil -9g+SGkma+VYV+yPRNmKyldcRVvPZUIkhTCMWkZoYrbDXUmkVQpsgz2c5ksIeMI/7 -4Qj9J38I9AOt0DlQ3etFhNc0OMnR7zY8tn9B4dejoNklEZfiyDxsDZVPusZrxnWM -WxuehOGHZf3YESjLMtR7BW26QRHIF/nhGDHsbLiunxXI6eJlbYFoZMfwc6TMqnc= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha512.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha512.pem deleted file mode 100644 index 4d712e55de..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crl_sha512.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQ0FADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIxMjE0NDQw -N1oXDTExMDQxMzE0NDQwN1owKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQENBQADggEBAH6GU24hd6d/5PmDusT+h2Kl -e7scmhkZDPU+VJSnzHdEREYTPaoFqyVBuJOE95lZELEqdOauhO3lG2WEQVGcgEcv -4jS2EzR3BYex1c1upqGtdIvIoA9TOLukdy6KeauomiWho2Kd7bSaXHy20jwdkLko -/t3lVhTtBvKbh8XHVYwCaw1aCj3LydwNcS+zPnRgsMVHszFxmMNn5HCRW8lbYwcf -UA98OmxIZs2hpBKRpvlfA5y6sXEx2+tSMg+MJrziGBgG6OR/m+KTaK5Yle9nrC+7 -hzKIe83hpktvfB1CY5Ak4Uke9/1FRqAjs5KCRxYSGQ7ZdS7DgAeGwT3slLbl/tY= ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/crt_cat_rsaexp-ec.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/crt_cat_rsaexp-ec.pem deleted file mode 100644 index 4f74c9ac25..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/crt_cat_rsaexp-ec.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN X509 CRL----- -MIIBqzCBlDANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EXDTExMDIyMDEwMjQx -OVoXDTExMDIyMDExMjQxOVowKDASAgEBFw0xMTAyMTIxNDQ0MDdaMBICAQMXDTEx -MDIxMjE0NDQwN1owDQYJKoZIhvcNAQEFBQADggEBAKgP1XmCIPbfY1/UO+SVFQir -jArZ94QnQdoan4tJ29d8DmTxJ+z9/KyWNoGeOwc9P/2GQQaZahQOBr0f6lYd67Ct -wFVh/Q2zF8FgRcrQV7u/vJM33Q2yEsQkMGlM7rE5lC972vUKWu/NKq8bN9W/tWxZ -SFbvTXpv024aI0IRudpOCALnIy8SFhVb2/52IN2uR6qrFizDexMEdSckgpHuJzGS -IiANhIMn5LdQYJFjPgBzQU12tDdgzcpxtGhT10y4uQre+UbSjw+iVyml3issw59k -OSmkWFb06LamRC215JAMok3YQO5RnxCR8EjqPcJr+7+O9a1O1++yiaitg4bUjEA= ------END X509 CRL----- ------BEGIN X509 CRL----- -MIIBcTCB9wIBATAKBggqhkjOPQQDAjA+MQswCQYDVQQGEwJOTDERMA8GA1UEChMI -UG9sYXJTU0wxHDAaBgNVBAMTE1BvbGFyc3NsIFRlc3QgRUMgQ0EXDTEzMDkyNDE2 -MzEwOFoXDTIzMDkyMjE2MzEwOFowFDASAgEKFw0xMzA5MjQxNjI4MzhaoHIwcDBu -BgNVHSMEZzBlgBSdbSAkSQE/K8t4tRm8fiTJ2/s2fKFCpEAwPjELMAkGA1UEBhMC -TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD -IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwIDaQAwZgIxAKuQ684s7gyhtxKJr6Ln -S2BQ02f1jjPHrZVdXaZvm3C5tGi2cKkoK1aMiyC3LsRCuAIxAIMhj0TmcuIZr5fX -g5RByD7zUnZBpoEAdgxFy4JPJ2IViWOPekSGh8b/JY1VNS6Zbw== ------END X509 CRL----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dh.1000.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/dh.1000.pem deleted file mode 100644 index 172f19fb47..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dh.1000.pem +++ /dev/null @@ -1,34 +0,0 @@ - -Recommended key length: 160 bits - -generator: - 23:84:3c:0d:55:8c:b9:7d:a9:d5:9a:80:82:fb:50: - 89:29:71:8e:8e:a1:29:2e:df:db:01:34:41:e7:66: - fa:60:dc:bc:34:83:45:70:e0:61:e9:a6:25:23:c2: - 77:33:a9:8a:90:94:21:ff:84:d2:7b:36:39:9b:e5: - f0:88:2b:35:98:64:28:58:27:be:fa:bf:e3:60:cc: - c4:61:60:59:78:a7:e1:a3:b3:a7:3e:7e:5b:a8:d7: - b7:ba:25:0e:b1:9e:79:03:b5:83:ba:43:34:b6:c1: - ce:45:66:72:07:64:8a:af:14:d8:ae:18:19:ba:25: - a6:d9:36:f8:8c: - -prime: - 9e:a4:a8:c4:29:fe:76:18:02:4f:76:c9:29:0e:f2: - ba:0d:92:08:9d:d9:b3:28:41:5d:88:4e:fe:3c:ae: - c1:d4:3e:7e:fb:d8:2c:bf:7b:63:70:99:9e:c4:ac: - d0:1e:7c:4e:22:07:d2:b5:f9:9a:9e:52:e2:97:9d: - c3:cb:0d:66:33:75:95:a7:96:6e:69:ec:16:bd:06: - 4a:1a:dc:b2:d4:29:23:ab:2e:8f:7f:6a:84:1d:82: - 23:6e:42:8c:1e:70:3d:21:bb:b9:b9:8f:f9:fd:9c: - 53:08:e4:e8:5a:04:ca:5f:8f:73:55:ac:e1:41:20: - c7:43:fa:8f:99: - - ------BEGIN DH PARAMETERS----- -MIIBAwJ+AJ6kqMQp/nYYAk92ySkO8roNkgid2bMoQV2ITv48rsHUPn772Cy/e2Nw -mZ7ErNAefE4iB9K1+ZqeUuKXncPLDWYzdZWnlm5p7Ba9Bkoa3LLUKSOrLo9/aoQd -giNuQowecD0hu7m5j/n9nFMI5OhaBMpfj3NVrOFBIMdD+o+ZAn0jhDwNVYy5fanV -moCC+1CJKXGOjqEpLt/bATRB52b6YNy8NINFcOBh6aYlI8J3M6mKkJQh/4TSezY5 -m+XwiCs1mGQoWCe++r/jYMzEYWBZeKfho7OnPn5bqNe3uiUOsZ55A7WDukM0tsHO -RWZyB2SKrxTYrhgZuiWm2Tb4jAICAKA= ------END DH PARAMETERS----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dh.optlen.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/dh.optlen.pem deleted file mode 100644 index ee1e29bace..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dh.optlen.pem +++ /dev/null @@ -1,58 +0,0 @@ - -Recommended key length: 256 bits - -generator: - 80:0a:bf:e7:dc:66:7a:a1:7b:cd:7c:04:61:4b:c2: - 21:a6:54:82:cc:c0:4b:60:46:02:b0:e1:31:90:8a: - 93:8e:a1:1b:48:dc:51:5d:ab:7a:bc:bb:1e:0c:7f: - d6:65:11:ed:c0:d8:65:51:b7:63:24:96:e0:3d:f9: - 43:57:e1:c4:ea:07:a7:ce:1e:38:1a:2f:ca:fd:ff: - 5f:5b:f0:0d:f8:28:80:60:20:e8:75:c0:09:26:e4: - d0:11:f8:84:77:a1:b0:19:27:d7:38:13:ca:d4:84: - 7c:63:96:b9:24:46:21:be:2b:00:b6:3c:65:92:53: - 31:84:13:44:3c:d2:44:21:5c:d7:fd:4c:be:79:6e: - 82:c6:cf:70:f8:9c:c0:c5:28:fb:8e:34:48:09:b3: - 18:76:e7:ef:73:9d:51:60:d0:95:c9:68:41:88:b0: - c8:75:5c:7a:46:8d:47:f5:6d:6d:b9:ea:01:29:24: - ec:b0:55:6f:b7:13:12:a8:d7:c9:3b:b2:89:8e:a0: - 8e:e5:4e:eb:59:45:48:28:5f:06:a9:73:cb:be:2a: - 0c:b0:2e:90:f3:23:fe:04:55:21:f3:4c:68:35:4a: - 6d:3e:95:db:ff:f1:eb:64:69:2e:dc:0a:44:f3:d3: - e4:08:d0:e4:79:a5:41:e7:79:a6:05:42:59:e2:d8: - 54: - -prime: - b3:12:6a:ea:f4:71:53:c7:d6:7f:40:30:30:b2:92: - b5:bd:5a:6c:9e:ae:1c:13:7a:f3:40:87:fc:e2:a3: - 6a:57:8d:70:c5:c5:60:ad:2b:db:92:4c:4a:4d:be: - e2:0a:16:71:be:71:03:ce:87:de:fa:76:90:89:36: - 80:3d:be:ca:60:c3:3e:12:89:c1:a0:3a:c2:c6:c4: - e4:94:05:e5:90:2f:a0:59:6a:1c:ba:a8:95:cc:40: - 2d:52:13:ed:4a:5f:1f:5b:a8:b5:e1:ed:3d:a9:51: - a4:c4:75:af:eb:0c:a6:60:b7:36:8c:38:c8:e8:09: - f3:82:d9:6a:e1:9e:60:dc:98:4e:61:cb:42:b5:df: - d7:23:32:2a:cf:32:7f:9e:41:3c:da:64:00:c1:5c: - 5b:2e:a1:fa:34:40:5d:83:98:2f:ba:40:e6:d8:52: - da:3d:91:01:9b:f2:35:11:31:42:54:dc:21:1a:90: - 83:3e:5b:17:98:ee:52:a7:81:98:c5:55:64:47:29: - ad:92:f0:60:36:7c:74:de:d3:77:04:ad:fc:27:3a: - 4a:33:fe:c8:21:bd:2e:bd:3b:c0:51:73:0e:97:a4: - dd:14:d2:b7:66:06:25:92:f5:ee:c0:9d:16:bb:50: - ef:eb:f2:cc:00:dd:3e:0e:34:18:e6:0e:c8:48:70: - f7: - - ------BEGIN DH PARAMETERS----- -MIICDgKCAQEAsxJq6vRxU8fWf0AwMLKStb1abJ6uHBN680CH/OKjaleNcMXFYK0r -25JMSk2+4goWcb5xA86H3vp2kIk2gD2+ymDDPhKJwaA6wsbE5JQF5ZAvoFlqHLqo -lcxALVIT7UpfH1uoteHtPalRpMR1r+sMpmC3Now4yOgJ84LZauGeYNyYTmHLQrXf -1yMyKs8yf55BPNpkAMFcWy6h+jRAXYOYL7pA5thS2j2RAZvyNRExQlTcIRqQgz5b -F5juUqeBmMVVZEcprZLwYDZ8dN7TdwSt/Cc6SjP+yCG9Lr07wFFzDpek3RTSt2YG -JZL17sCdFrtQ7+vyzADdPg40GOYOyEhw9wKCAQEAgAq/59xmeqF7zXwEYUvCIaZU -gszAS2BGArDhMZCKk46hG0jcUV2rery7Hgx/1mUR7cDYZVG3YySW4D35Q1fhxOoH -p84eOBovyv3/X1vwDfgogGAg6HXACSbk0BH4hHehsBkn1zgTytSEfGOWuSRGIb4r -ALY8ZZJTMYQTRDzSRCFc1/1MvnlugsbPcPicwMUo+440SAmzGHbn73OdUWDQlclo -QYiwyHVcekaNR/VtbbnqASkk7LBVb7cTEqjXyTuyiY6gjuVO61lFSChfBqlzy74q -DLAukPMj/gRVIfNMaDVKbT6V2//x62RpLtwKRPPT5AjQ5HmlQed5pgVCWeLYVAIC -AQA= ------END DH PARAMETERS----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dhparams.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/dhparams.pem deleted file mode 100644 index 7ce05f0c0b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dhparams.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN DH PARAMETERS----- -MIGHAoGBAJ419DBEOgmQTzo5qXl5fQcN9TN455wkOL7052HzxxRVMyhYmwQcgJvh -1sa18fyfR9OiVEMYglOpkqVoGLN7qd5aQNNi5W7/C+VBdHTBJcGZJyyP5B3qcz32 -9mLJKudlVudV0Qxk5qUJaPZ/xupz0NyoVpviuiBOI1gNi8ovSXWzAgEC ------END DH PARAMETERS----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir1/test-ca.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir1/test-ca.crt deleted file mode 100644 index 3c1d14cd22..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir1/test-ca.crt +++ /dev/null @@ -1,80 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:00 2011 GMT - Not After : Feb 12 14:44:00 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:c0:df:37:fc:17:bb:e0:96:9d:3f:86:de:96:32: - 7d:44:a5:16:a0:cd:21:f1:99:d4:ec:ea:cb:7c:18: - 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: - 1e:7b:c0:8d:39:df:38:5d:70:78:07:d3:9e:d9:93: - e8:b9:72:51:c5:ce:a3:30:52:a9:f2:e7:40:70:14: - cb:44:a2:72:0b:c2:e5:40:f9:3e:e5:a6:0e:b3:f9: - ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: - 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: - c3:c6:9f:cb:ba:ec:60:7d:b7:e6:84:32:be:4f:fb: - 58:26:22:03:5b:d4:b4:d5:fb:f5:e3:96:2e:70:c0: - e4:2e:bd:fc:2e:ee:e2:41:55:c0:34:2e:7d:24:72: - 69:cb:47:b1:14:40:83:7d:67:f4:86:f6:31:ab:f1: - 79:a4:b2:b5:2e:12:f9:84:17:f0:62:6f:27:3e:13: - 58:b1:54:0d:21:9a:73:37:a1:30:cf:6f:92:dc:f6: - e9:fc:ac:db:2e:28:d1:7e:02:4b:23:a0:15:f2:38: - 65:64:09:ea:0c:6e:8e:1b:17:a0:71:c8:b3:9b:c9: - ab:e9:c3:f2:cf:87:96:8f:80:02:32:9e:99:58:6f: - a2:d5 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:TRUE - X509v3 Subject Key Identifier: - B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - DirName:/C=NL/O=PolarSSL/CN=PolarSSL Test CA - serial:00 - - Signature Algorithm: sha1WithRSAEncryption - b8:fd:54:d8:00:54:90:8b:25:b0:27:dd:95:cd:a2:f7:84:07: - 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: - 32:89:be:63:47:53:ff:b6:be:f1:2e:8c:54:c0:99:3f:a0:b9: - 37:23:72:5f:0d:46:59:8f:d8:47:cd:97:4c:9f:07:0c:12:62: - 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: - 8b:9b:e0:d5:dc:67:ed:8c:6b:33:d7:74:22:3c:4c:db:b5:8d: - 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: - e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: - e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: - 66:d9:1f:9b:f5:13:48:b0:4d:14:d1:de:b2:24:d9:78:7d:f5: - 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: - 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: - 08:60:cd:32:18:d0:73:e0:58:71:d9:e5:d2:53:d7:8d:d0:ca: - e9:5d:2a:0a:0d:5d:55:ec:21:50:17:16:e6:06:4a:cd:5e:de: - f7:e0:e9:54 ------BEGIN CERTIFICATE----- -MIIDhzCCAm+gAwIBAgIBADANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDAwWhcNMjEwMjEyMTQ0NDAwWjA7MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA3zf8F7vglp0/ht6WMn1EpRagzSHx -mdTs6st8GFgIlKXsm8WL3xoemTiZhx57wI053zhdcHgH057Zk+i5clHFzqMwUqny -50BwFMtEonILwuVA+T7lpg6z+exKY8C4KQB0nFc7qKUEkHHxvYPZP9al4jwqj+8n -YMPGn8u67GB9t+aEMr5P+1gmIgNb1LTV+/Xjli5wwOQuvfwu7uJBVcA0Ln0kcmnL -R7EUQIN9Z/SG9jGr8XmksrUuEvmEF/Bibyc+E1ixVA0hmnM3oTDPb5Lc9un8rNsu -KNF+AksjoBXyOGVkCeoMbo4bF6BxyLObyavpw/LPh5aPgAIynplYb6LVAgMBAAGj -gZUwgZIwDAYDVR0TBAUwAwEB/zAdBgNVHQ4EFgQUtFrkpbPe0lL2udWmlQ/rPrzH -/f8wYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/rPrzH/f+hP6Q9MDsxCzAJBgNV -BAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVz -dCBDQYIBADANBgkqhkiG9w0BAQUFAAOCAQEAuP1U2ABUkIslsCfdlc2i94QHHYeJ -SsR4EdgHtdciUI5I62J6Mom+Y0dT/7a+8S6MVMCZP6C5NyNyXw1GWY/YR82XTJ8H -DBJiCTok5DbZ6SzaONBzdWHXwWwmi5vg1dxn7YxrM9d0IjxM27WNKs4sDQhZBQkF -pjmfs2cb4oPl4Y9T9meTx/lvdkRYEug61Jfn6cA+qHpyPYdTH+UshITnmp5/Ztkf -m/UTSLBNFNHesiTZeH31NcxYGdHSme9Nc/gfidRa0FLOCfWxRlFqAI47zG9jAQCZ -7Z2mCGDNMhjQc+BYcdnl0lPXjdDK6V0qCg1dVewhUBcW5gZKzV7e9+DpVA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca.crt deleted file mode 100644 index 3c1d14cd22..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca.crt +++ /dev/null @@ -1,80 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:00 2011 GMT - Not After : Feb 12 14:44:00 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:c0:df:37:fc:17:bb:e0:96:9d:3f:86:de:96:32: - 7d:44:a5:16:a0:cd:21:f1:99:d4:ec:ea:cb:7c:18: - 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: - 1e:7b:c0:8d:39:df:38:5d:70:78:07:d3:9e:d9:93: - e8:b9:72:51:c5:ce:a3:30:52:a9:f2:e7:40:70:14: - cb:44:a2:72:0b:c2:e5:40:f9:3e:e5:a6:0e:b3:f9: - ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: - 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: - c3:c6:9f:cb:ba:ec:60:7d:b7:e6:84:32:be:4f:fb: - 58:26:22:03:5b:d4:b4:d5:fb:f5:e3:96:2e:70:c0: - e4:2e:bd:fc:2e:ee:e2:41:55:c0:34:2e:7d:24:72: - 69:cb:47:b1:14:40:83:7d:67:f4:86:f6:31:ab:f1: - 79:a4:b2:b5:2e:12:f9:84:17:f0:62:6f:27:3e:13: - 58:b1:54:0d:21:9a:73:37:a1:30:cf:6f:92:dc:f6: - e9:fc:ac:db:2e:28:d1:7e:02:4b:23:a0:15:f2:38: - 65:64:09:ea:0c:6e:8e:1b:17:a0:71:c8:b3:9b:c9: - ab:e9:c3:f2:cf:87:96:8f:80:02:32:9e:99:58:6f: - a2:d5 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:TRUE - X509v3 Subject Key Identifier: - B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - DirName:/C=NL/O=PolarSSL/CN=PolarSSL Test CA - serial:00 - - Signature Algorithm: sha1WithRSAEncryption - b8:fd:54:d8:00:54:90:8b:25:b0:27:dd:95:cd:a2:f7:84:07: - 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: - 32:89:be:63:47:53:ff:b6:be:f1:2e:8c:54:c0:99:3f:a0:b9: - 37:23:72:5f:0d:46:59:8f:d8:47:cd:97:4c:9f:07:0c:12:62: - 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: - 8b:9b:e0:d5:dc:67:ed:8c:6b:33:d7:74:22:3c:4c:db:b5:8d: - 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: - e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: - e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: - 66:d9:1f:9b:f5:13:48:b0:4d:14:d1:de:b2:24:d9:78:7d:f5: - 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: - 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: - 08:60:cd:32:18:d0:73:e0:58:71:d9:e5:d2:53:d7:8d:d0:ca: - e9:5d:2a:0a:0d:5d:55:ec:21:50:17:16:e6:06:4a:cd:5e:de: - f7:e0:e9:54 ------BEGIN CERTIFICATE----- -MIIDhzCCAm+gAwIBAgIBADANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDAwWhcNMjEwMjEyMTQ0NDAwWjA7MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA3zf8F7vglp0/ht6WMn1EpRagzSHx -mdTs6st8GFgIlKXsm8WL3xoemTiZhx57wI053zhdcHgH057Zk+i5clHFzqMwUqny -50BwFMtEonILwuVA+T7lpg6z+exKY8C4KQB0nFc7qKUEkHHxvYPZP9al4jwqj+8n -YMPGn8u67GB9t+aEMr5P+1gmIgNb1LTV+/Xjli5wwOQuvfwu7uJBVcA0Ln0kcmnL -R7EUQIN9Z/SG9jGr8XmksrUuEvmEF/Bibyc+E1ixVA0hmnM3oTDPb5Lc9un8rNsu -KNF+AksjoBXyOGVkCeoMbo4bF6BxyLObyavpw/LPh5aPgAIynplYb6LVAgMBAAGj -gZUwgZIwDAYDVR0TBAUwAwEB/zAdBgNVHQ4EFgQUtFrkpbPe0lL2udWmlQ/rPrzH -/f8wYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/rPrzH/f+hP6Q9MDsxCzAJBgNV -BAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVz -dCBDQYIBADANBgkqhkiG9w0BAQUFAAOCAQEAuP1U2ABUkIslsCfdlc2i94QHHYeJ -SsR4EdgHtdciUI5I62J6Mom+Y0dT/7a+8S6MVMCZP6C5NyNyXw1GWY/YR82XTJ8H -DBJiCTok5DbZ6SzaONBzdWHXwWwmi5vg1dxn7YxrM9d0IjxM27WNKs4sDQhZBQkF -pjmfs2cb4oPl4Y9T9meTx/lvdkRYEug61Jfn6cA+qHpyPYdTH+UshITnmp5/Ztkf -m/UTSLBNFNHesiTZeH31NcxYGdHSme9Nc/gfidRa0FLOCfWxRlFqAI47zG9jAQCZ -7Z2mCGDNMhjQc+BYcdnl0lPXjdDK6V0qCg1dVewhUBcW5gZKzV7e9+DpVA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca2.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca2.crt deleted file mode 100644 index d41a420ef9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir2/test-ca2.crt +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICUjCCAdegAwIBAgIJAMFD4n5iQ8zoMAoGCCqGSM49BAMCMD4xCzAJBgNVBAYT -Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF -QyBDQTAeFw0xMzA5MjQxNTQ5NDhaFw0yMzA5MjIxNTQ5NDhaMD4xCzAJBgNVBAYT -Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF -QyBDQTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMPaKzRBN1gvh1b+/Im6KUNLTuBu -ww5XUzM5WNRStJGVOQsj318XJGJI/BqVKc4sLYfCiFKAr9ZqqyHduNMcbli4yuiy -aY7zQa0pw7RfdadHb9UZKVVpmlM7ILRmFmAzHqOBoDCBnTAdBgNVHQ4EFgQUnW0g -JEkBPyvLeLUZvH4kydv7NnwwbgYDVR0jBGcwZYAUnW0gJEkBPyvLeLUZvH4kydv7 -NnyhQqRAMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UE -AxMTUG9sYXJzc2wgVGVzdCBFQyBDQYIJAMFD4n5iQ8zoMAwGA1UdEwQFMAMBAf8w -CgYIKoZIzj0EAwIDaQAwZgIxAMO0YnNWKJUAfXgSJtJxexn4ipg+kv4znuR50v56 -t4d0PCu412mUC6Nnd7izvtE2MgIxAP1nnJQjZ8BWukszFQDG48wxCCyci9qpdSMv -uCjn8pwUOkABXK8Mss90fzCfCEOtIA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/Readme b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/Readme deleted file mode 100644 index 189dadc898..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/Readme +++ /dev/null @@ -1 +0,0 @@ -This is just to make sure files that don't parse as certs are ignored. diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca.crt deleted file mode 100644 index 3c1d14cd22..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca.crt +++ /dev/null @@ -1,80 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Validity - Not Before: Feb 12 14:44:00 2011 GMT - Not After : Feb 12 14:44:00 2021 GMT - Subject: C=NL, O=PolarSSL, CN=PolarSSL Test CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:c0:df:37:fc:17:bb:e0:96:9d:3f:86:de:96:32: - 7d:44:a5:16:a0:cd:21:f1:99:d4:ec:ea:cb:7c:18: - 58:08:94:a5:ec:9b:c5:8b:df:1a:1e:99:38:99:87: - 1e:7b:c0:8d:39:df:38:5d:70:78:07:d3:9e:d9:93: - e8:b9:72:51:c5:ce:a3:30:52:a9:f2:e7:40:70:14: - cb:44:a2:72:0b:c2:e5:40:f9:3e:e5:a6:0e:b3:f9: - ec:4a:63:c0:b8:29:00:74:9c:57:3b:a8:a5:04:90: - 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60: - c3:c6:9f:cb:ba:ec:60:7d:b7:e6:84:32:be:4f:fb: - 58:26:22:03:5b:d4:b4:d5:fb:f5:e3:96:2e:70:c0: - e4:2e:bd:fc:2e:ee:e2:41:55:c0:34:2e:7d:24:72: - 69:cb:47:b1:14:40:83:7d:67:f4:86:f6:31:ab:f1: - 79:a4:b2:b5:2e:12:f9:84:17:f0:62:6f:27:3e:13: - 58:b1:54:0d:21:9a:73:37:a1:30:cf:6f:92:dc:f6: - e9:fc:ac:db:2e:28:d1:7e:02:4b:23:a0:15:f2:38: - 65:64:09:ea:0c:6e:8e:1b:17:a0:71:c8:b3:9b:c9: - ab:e9:c3:f2:cf:87:96:8f:80:02:32:9e:99:58:6f: - a2:d5 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:TRUE - X509v3 Subject Key Identifier: - B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - X509v3 Authority Key Identifier: - keyid:B4:5A:E4:A5:B3:DE:D2:52:F6:B9:D5:A6:95:0F:EB:3E:BC:C7:FD:FF - DirName:/C=NL/O=PolarSSL/CN=PolarSSL Test CA - serial:00 - - Signature Algorithm: sha1WithRSAEncryption - b8:fd:54:d8:00:54:90:8b:25:b0:27:dd:95:cd:a2:f7:84:07: - 1d:87:89:4a:c4:78:11:d8:07:b5:d7:22:50:8e:48:eb:62:7a: - 32:89:be:63:47:53:ff:b6:be:f1:2e:8c:54:c0:99:3f:a0:b9: - 37:23:72:5f:0d:46:59:8f:d8:47:cd:97:4c:9f:07:0c:12:62: - 09:3a:24:e4:36:d9:e9:2c:da:38:d0:73:75:61:d7:c1:6c:26: - 8b:9b:e0:d5:dc:67:ed:8c:6b:33:d7:74:22:3c:4c:db:b5:8d: - 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5: - e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7: - e9:c0:3e:a8:7a:72:3d:87:53:1f:e5:2c:84:84:e7:9a:9e:7f: - 66:d9:1f:9b:f5:13:48:b0:4d:14:d1:de:b2:24:d9:78:7d:f5: - 35:cc:58:19:d1:d2:99:ef:4d:73:f8:1f:89:d4:5a:d0:52:ce: - 09:f5:b1:46:51:6a:00:8e:3b:cc:6f:63:01:00:99:ed:9d:a6: - 08:60:cd:32:18:d0:73:e0:58:71:d9:e5:d2:53:d7:8d:d0:ca: - e9:5d:2a:0a:0d:5d:55:ec:21:50:17:16:e6:06:4a:cd:5e:de: - f7:e0:e9:54 ------BEGIN CERTIFICATE----- -MIIDhzCCAm+gAwIBAgIBADANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJOTDER -MA8GA1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwHhcN -MTEwMjEyMTQ0NDAwWhcNMjEwMjEyMTQ0NDAwWjA7MQswCQYDVQQGEwJOTDERMA8G -A1UEChMIUG9sYXJTU0wxGTAXBgNVBAMTEFBvbGFyU1NMIFRlc3QgQ0EwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA3zf8F7vglp0/ht6WMn1EpRagzSHx -mdTs6st8GFgIlKXsm8WL3xoemTiZhx57wI053zhdcHgH057Zk+i5clHFzqMwUqny -50BwFMtEonILwuVA+T7lpg6z+exKY8C4KQB0nFc7qKUEkHHxvYPZP9al4jwqj+8n -YMPGn8u67GB9t+aEMr5P+1gmIgNb1LTV+/Xjli5wwOQuvfwu7uJBVcA0Ln0kcmnL -R7EUQIN9Z/SG9jGr8XmksrUuEvmEF/Bibyc+E1ixVA0hmnM3oTDPb5Lc9un8rNsu -KNF+AksjoBXyOGVkCeoMbo4bF6BxyLObyavpw/LPh5aPgAIynplYb6LVAgMBAAGj -gZUwgZIwDAYDVR0TBAUwAwEB/zAdBgNVHQ4EFgQUtFrkpbPe0lL2udWmlQ/rPrzH -/f8wYwYDVR0jBFwwWoAUtFrkpbPe0lL2udWmlQ/rPrzH/f+hP6Q9MDsxCzAJBgNV -BAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEZMBcGA1UEAxMQUG9sYXJTU0wgVGVz -dCBDQYIBADANBgkqhkiG9w0BAQUFAAOCAQEAuP1U2ABUkIslsCfdlc2i94QHHYeJ -SsR4EdgHtdciUI5I62J6Mom+Y0dT/7a+8S6MVMCZP6C5NyNyXw1GWY/YR82XTJ8H -DBJiCTok5DbZ6SzaONBzdWHXwWwmi5vg1dxn7YxrM9d0IjxM27WNKs4sDQhZBQkF -pjmfs2cb4oPl4Y9T9meTx/lvdkRYEug61Jfn6cA+qHpyPYdTH+UshITnmp5/Ztkf -m/UTSLBNFNHesiTZeH31NcxYGdHSme9Nc/gfidRa0FLOCfWxRlFqAI47zG9jAQCZ -7Z2mCGDNMhjQc+BYcdnl0lPXjdDK6V0qCg1dVewhUBcW5gZKzV7e9+DpVA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca2.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca2.crt deleted file mode 100644 index d41a420ef9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir3/test-ca2.crt +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICUjCCAdegAwIBAgIJAMFD4n5iQ8zoMAoGCCqGSM49BAMCMD4xCzAJBgNVBAYT -Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF -QyBDQTAeFw0xMzA5MjQxNTQ5NDhaFw0yMzA5MjIxNTQ5NDhaMD4xCzAJBgNVBAYT -Ak5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UEAxMTUG9sYXJzc2wgVGVzdCBF -QyBDQTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMPaKzRBN1gvh1b+/Im6KUNLTuBu -ww5XUzM5WNRStJGVOQsj318XJGJI/BqVKc4sLYfCiFKAr9ZqqyHduNMcbli4yuiy -aY7zQa0pw7RfdadHb9UZKVVpmlM7ILRmFmAzHqOBoDCBnTAdBgNVHQ4EFgQUnW0g -JEkBPyvLeLUZvH4kydv7NnwwbgYDVR0jBGcwZYAUnW0gJEkBPyvLeLUZvH4kydv7 -NnyhQqRAMD4xCzAJBgNVBAYTAk5MMREwDwYDVQQKEwhQb2xhclNTTDEcMBoGA1UE -AxMTUG9sYXJzc2wgVGVzdCBFQyBDQYIJAMFD4n5iQ8zoMAwGA1UdEwQFMAMBAf8w -CgYIKoZIzj0EAwIDaQAwZgIxAMO0YnNWKJUAfXgSJtJxexn4ipg+kv4znuR50v56 -t4d0PCu412mUC6Nnd7izvtE2MgIxAP1nnJQjZ8BWukszFQDG48wxCCyci9qpdSMv -uCjn8pwUOkABXK8Mss90fzCfCEOtIA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/Readme b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/Readme deleted file mode 100644 index 3f1f610b92..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/Readme +++ /dev/null @@ -1,47 +0,0 @@ -This directory contains the certificates for the tests targeting the enforcement of the policy indicated by the *pathLenConstraint* field. All leaf elements were generated with *is_ca* unset and all roots with the *selfsign=1* option. - -1. zero pathlen constraint on an intermediate CA (invalid) -``` -cert11.crt -> cert12.crt (max_pathlen=0) -> cert13.crt -> cert14.crt -``` - -2. zero pathlen constraint on the root CA (invalid) -``` -cert21.crt (max_pathlen=0) -> cert22.crt -> cert23.crt -``` - -3. nonzero pathlen constraint on the root CA (invalid) -``` -cert31.crt (max_pathlen=1) -> cert32.crt -> cert33.crt -> cert34.crt -``` - -4. nonzero pathlen constraint on an intermediate CA (invalid) -``` -cert41.crt -> cert42.crt (max_pathlen=1) -> cert43.crt -> cert44.crt -> cert45.crt -``` - -5. nonzero pathlen constraint on an intermediate CA with maximum number of elements in the chain (valid) -``` -cert51.crt -> cert52.crt (max_pathlen=1) -> cert53.crt -> cert54.crt -``` - -6. nonzero pathlen constraint on the root CA with maximum number of elements in the chain (valid) -``` -cert61.crt (max_pathlen=1) -> cert62.crt -> cert63.crt -``` - -7. pathlen constraint on the root CA with maximum number of elements and a self signed certificate in the chain (valid) -(This situation happens for example when a root of some hierarchy gets integrated into another hierarchy. In this case the certificates issued before the integration will have an intermadiate self signed certificate in their chain) -``` -cert71.crt (max_pathlen=1) -> cert72.crt -> cert73.crt (self signed) -> cert74.crt -> cert74.crt -``` - -8. zero pathlen constraint on first intermediate CA (valid) -``` -cert81.crt -> cert82.crt (max_pathlen=0) -> cert83.crt -``` - -9. zero pathlen constraint on trusted root (valid) -``` -cert91.crt (max_pathlen=0) -> cert92.crt -``` diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert11.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert11.crt deleted file mode 100644 index 3077c3da44..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert11.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC9zCCAd+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -hqLw+KDH8+tkX9hphnydOZFoueGTY5v8WdYI6KZXoIln9IAu4Rmb6M59uLziXurg -VKuwBqOkbUZsIY0NOA6C8FpdjZL1di8Viq669vBBs9c+x9hKpx8/VVcZfTaGgqni -h5XiivQynBQ4E2KOxEQ+VjUMDqIBHYG1VXWs4KMkAeJsqDYHtmS4XsC9TXTIri5S -9IX4mE5A9+ngSTo0/6Sjwcd27uO2IQHXDC7jkxX5OH5jFPAqsVKTYDeWlCU7bvbr -iy1H9Z9uCl+M7unbAl8BKQ8leOnno3KO3lQQAPGP2EFRT0XMuUXJnfydPbzMa9FY -ufB1I8zCBZviPvO/Of3yrwIDAQABo1AwTjAMBgNVHRMEBTADAQEBMB0GA1UdDgQW -BBSUHSH6gjrYFZnS1gDvk7BpfwTKwDAfBgNVHSMEGDAWgBSUHSH6gjrYFZnS1gDv -k7BpfwTKwDANBgkqhkiG9w0BAQsFAAOCAQEATLqZGFEBO+2IiHjkn7pBkAuktmHm -jkkuFLONwe0vlxZFaabaFqSgkoS5eZ50D0dmuUkpJRNMnGK1B/ja5RewtAdxD6us -VT8JpeWYkhxaSIHjUW95jJLMVr17it8jHawI05tD26nqDjTq3C2rM4ExpAaK/Dgv -83ZHe4IdvenkXckDMIjmSsK0GfomZmKvmnfxhg4FnQvZGI48JJUqPA2dHxRhUyr4 -ohBmH5Xi5oLICd85GRi8YqD00agKL99EjGulaKNEdsQkrC4ZvY6QDV0EEnbu8b4R -GfiA42UWN2dKNSqNhBOrP9g5yTcIWXh1Dwpd1Z9vhBCwmBegPqqM5IM1dQ== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert12.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert12.crt deleted file mode 100644 index fd88c2d138..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert12.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCjCCAfKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANJrP7/Y+KjupvlgaOmQYArfGuoh3CzcdPe/mlhq+fxD -8U9qzgSVuVR+FpNZi9DyMljMBrWV1OnZI+cVCDYYkNMa3IkV+AkzJGqwcSBKE+6N -RXZvv+I4xbGymdSSaT6Kh1PgPVk/EYNfLFF30pBsycjM81aMtZgW6aA9xCSp0r8W -XkZodsrJUQerDh/7VmDVEeKanZog8auvrvs/ENiA8d4p/75lOIER4nLz6SSn5Eqy -uXzNCwmT5PVwWStXbDD7EBs3rOtR2VNWQ9o6QdfKQOe/SkIddZr1IWGEJ8JHjtNo -jxcYO67A+Jgp1Jwjk+83eRICs0hlWyeHWfBlbOVIKLcCAwEAAaNTMFEwDwYDVR0T -BAgwBgEBAQIBADAdBgNVHQ4EFgQUyw8Phy/FAvifGQ+G6HWkMiWzyqUwHwYDVR0j -BBgwFoAUlB0h+oI62BWZ0tYA75OwaX8EysAwDQYJKoZIhvcNAQELBQADggEBACFS -6tFy9TpVMUfh1mkr3rFEVtho0NJkRhJW8z2PTmKQa069S9gS+U6+CsqwvM1y3yyh -Pt2q34fhhhbQ+gS8iAm+zvQtBsys3frfVkeKmRzxWDh2LnT+tJi/xtqdlULua5NB -21So46HdlceDTuv2vUbrHgxUS/IEjIL6OZZ0Sc6S6YybvGSioGsRUHO2k2IiOnUa -C+hpBvOkXScnItfdMKAAce71CsZeN97sbxeNIMBDiX9bSy+dZLscEhRwBUABiNr/ -sYdYvIpbrFXowjMtBdac+vvhcem7dkCrCdsGylGINWhE2tC9hKmFkFXo4mu/AGDS -M4/59TlMeK8X+WZ9zBs= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert13.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert13.crt deleted file mode 100644 index ac01a22cd6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert13.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFzCCAf+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAmMSQwIgYDVQQDExtUZXN0IGludGVybWVkaWF0ZSBtYXhwYXRoIDIw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs0qdKXytu/GTKpa2H0CE3 -OPSIMM2hiYbavzUroyL+hFv9XVoxh5CGnVUxK7B9ifVvzyElrcV7tjuIlGwp1hLH -tx/YU22xksI/n5/NS/qrxkK5xjwEWB9lx93rwLK0QnfjYRZrir7yySoBKi6IlHOv -GOwl0V/JAslMWwUZlFmvYvoCWSWGrDAkxWVnHq+HoZ7YoM/bdJdsIIJYe3tt7L8D -cJVP5dQ8jSs8/Ehm8BbG339r3B7v/KdK8zuoMig9ag/YOu9jOb0QvYC2HdZoL4WV -N+7aasTQmDGWGOt7fk7AEl0EI8lDvr2O/5q6ad9jRCkxyq3lJwRy+M3MdVKgA1On -AgMBAAGjUDBOMAwGA1UdEwQFMAMBAQEwHQYDVR0OBBYEFM6u5Gkjkxb8PDdQIGKD -D8t1Zv/9MB8GA1UdIwQYMBaAFMsPD4cvxQL4nxkPhuh1pDIls8qlMA0GCSqGSIb3 -DQEBCwUAA4IBAQCLpKATt01DUM8wCiDFVSpmpiCBqxnLRfQuY+ta1p+f15LME+cT -94lwaYCfCBtXQYwiuVFYdK8ztWEStPg6BecMLPB2K9gO/talxUoVDumsmR83p+2y -8YJmFHyjr+BShsjP9paCjUQkJiMOiWRpNFNpScv0IOHmb8NLER3vX/tCmxyVHPg/ -7tBpDXRD6jOyajYH4KUx6wddcYWb63N9sApVpRHNaqpUKjuiQwfUFZjA7AyK/FUS -/cO3++uq+CkZhBu8vupaznXD4h0E28GbZgvu/F0edB7f0Q5DpnuDJ6HFMYl3A2mM -m8pqKNnRYGCtQwppBYVsoBisga2ymtNud7K+ ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert14.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert14.crt deleted file mode 100644 index 49e1cbb2ec..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert14.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDIwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAeMRwwGgYDVQQDExNUZXN0IGxlYWYgaW52YWxpZCAzMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw6Vc/T2GYTWj7nGZcy2voZyeWkFyfDIy -oexyJe8eyuWX+YqaSCra1JMcww0Jy8e9/6/aI9ezd1d73eZDcW5h61tagCpBki+W -dYh+FJfCdDdPnSkitWOBLKBK21AQ9dxePvkQBEanDdAk2IwasydCoHEiSCqwXNEz -jVJPL38ibbLf9sNO3kk6zOFA3QqVSTJ4BddNh9bHL7y106ekfMhrfyTzSpo3Wj0V -20ThmJZ1NuwYRl3j1XHALP0t8Cp2ZLbXuFsTWqTFNzXj+gWM8b2IfZqmqcew5poZ -4aDkjXXOizRxDPxCHp7rLz9xv1pIIBxady0YWp+w9vxLxFF6rYBLtQIDAQABo00w -SzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQoF/qrn9WnKV3zOnCwMl99Uhmx8DAfBgNV -HSMEGDAWgBTOruRpI5MW/Dw3UCBigw/LdWb//TANBgkqhkiG9w0BAQsFAAOCAQEA -VUnlX//h3T5Ajc85WNkyTuirhSZtIr6+X/AxH4kR/QG5NiaDxP9H0FzMs5FcMni8 -3Rs4d2H3CBs+QB7lm/b+xy26vpORwlVFXScHeTEanuXSVsmGPkn7TAQrPoyZgVUN -uy4TGi8Mlkso4gmgehvgTklIV+Emxy32Abd1lRfI8/vOQ1xTdA7f3X98AfWStTya -DGRsQLZE/Q4/Gh57xNqF0ftBIRwt9TbGlu8AyZiIilVECGvE/gtTwuqpQPOhJQmi -NdYTErgD2Wkw9ohifQFo46AMMU1seehtqijW2pC2UjmV5nboPs0eGQmWrfNCjDOr -sZfh98BafcaFGjz605V36g== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert21.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert21.crt deleted file mode 100644 index 501c5d7f23..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert21.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+jCCAeKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -mTX2sHY42Ord9gWyB6GcdlLjjE+4zBJ1BoDpMnvJ89niMTuZTq1ViMp/B6RuTH+2 -YF3+riZYQDH9yM/8rgvAUIvK9STaq19Zrm0mnfQUo9yKdkfoJ+XvWuvK6f+NkAMg -xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q -GSwpgC+DhVoQzFRofUdK9O9MkgR675iftaFDvyi7F0fxrSLfB/Wy4cgRYzIW6pyN -2sXWivKdLI3bgB01ffdbO17ZAGILK1whO29/bX6hbH09Y/H7jR2vjy+KP9N0PEa3 -7SBymlokB3A8wq/LWPYPeQIDAQABo1MwUTAPBgNVHRMECDAGAQEBAgEAMB0GA1Ud -DgQWBBSOBd1fH00Y9r5S8cELj/9IT4BGlDAfBgNVHSMEGDAWgBSOBd1fH00Y9r5S -8cELj/9IT4BGlDANBgkqhkiG9w0BAQsFAAOCAQEAFEY2StppaPzOgG6vEvPJr//+ -NWY1jKcBB3cT+zWJW54+BexDjyaBRnBIPvRLDG8PAlhlYr9v/P6JCjBSuhYorFLG -P4ZhD+akuMvn6yF7nsyG20LHPwvE7/jye7+zSO3hhyqCg7N7M7O17exo/agw/iUI -DYUuUv1ZJlZvPB2kmZMYa78g0P2ynyKpu4hdbstJzxwA4aQDXGQxcQNtv+3ZCdC2 -TI4w0jodkjqdq/4y0McpkEvYL3/LaQElLaHr8CQo7xYEzsjv+cnzojCO/ilXU+Rl -sz940Q4njAJqlpfiJ44aFytjp96uN4YVpViFCvRz//9uyQY9kuA/8kKwJuO3qw== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert22.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert22.crt deleted file mode 100644 index 5dcd65def8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert22.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDBzCCAe+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANpGlBMXdo8cO9oqUw/b6PMwiMNV8LCe6wB9VKHPa6OG -Q0o8Xqktgwnh1rojgpMhbCApE7UXeMr6ZGq/NtqmO1hO5adV5JehWZyvg7j4EBpG -g8iWo0jNpKMJ0Yx1uBkkljEdZLTHa4bK/zy2NKqDNS2yWs9/M5+xw5XE2ecAg7FT -cXhf3q50V+M6T2IaQ9BxntTyCT8IIF2eRM/t9Y944s9Rfzm/KQVKRYPudX7YhTt9 -iqCJB4JoqYhs3HEO0wPkJxY4KBTUCN94s+7jUFdRrYxe+8Ya6tIYWqD38i5qdGhY -xrVey1LatsDJQ2EgNYobM/LjoCLK1WUssEqf0OU2bi0CAwEAAaNQME4wDAYDVR0T -BAUwAwEBATAdBgNVHQ4EFgQUOBl8edVm/H5xdS2EGEeLzftZ/DUwHwYDVR0jBBgw -FoAUjgXdXx9NGPa+UvHBC4//SE+ARpQwDQYJKoZIhvcNAQELBQADggEBAFwZriTu -DKkiDHFfz3UX4fIxYTHCi4TveYZGPeTbxhBb3XZC5qDF4T5HvCTSkG9+oFfZzI1a -lPN2yZB7QnmHJoyWa5fuovwUL0iI3iIZMqU56tdVPW8gkJe++U5kHMSpz2VF0eo8 -7XkKWxZovRwczgfDFRP9zM9CylyzQjqxx6kbxJozWnwc5UrVbJMaPIqonXp1nDoZ -i878+hX4rJUEjgO6Sa9GVZQpmuCrQF0qKsTiUBzZN67hoD3xoTAYi5IXQE2tRD1N -j3zwng9liCsxurGMnuV0BPWv/IDYRu/syjee1Qv1VFeRto5D4Rldmi2p1f5iWJCk -5m5YpRsknaICjYs= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert23.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert23.crt deleted file mode 100644 index 6c54725497..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert23.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAeMRwwGgYDVQQDExNUZXN0IGxlYWYgaW52YWxpZCAyMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAigGgHGNWNkEWWFn7eaU4kC2WjR3RtcBs -oW1MlQndUvwWUHgcbfIg7nh66Oi6Xl3IqAMjHj1J0EPGcwTfmLdaRvN38KjTMh3/ -FiFrrUL0MNgiGxjkTthWgsfV4C/i3vRDTCW+2UMFdd6+z7hwFf+ldTsCP9Qp+93G -drslrvAR2W0qjHLULAJGk/6WzxFG6xeCgdhkooDPprsflZJ/cN1SuqTYOaVMAj9J -aovStUTVhF8ouDULpq0fiBImoldObcGdaAWlgRl0k8NdoSLpWd/7+hi4sH5PSOZq -+8g1lQ3cgrE7ta4X3p/i6eApcn1hyEkTy9ZpKOFvZXnM4D1j8+KSKQIDAQABo00w -SzAJBgNVHRMEAjAAMB0GA1UdDgQWBBTCN2vDLY1tcenTzyRmlS4TBe2xijAfBgNV -HSMEGDAWgBQ4GXx51Wb8fnF1LYQYR4vN+1n8NTANBgkqhkiG9w0BAQsFAAOCAQEA -eb/tgtSbrz7j7HQaxGgI5LVedRro3a2fNLhO0wNboGI6gACIPait1ePkUwuMfLfl -Fky2/2VZ8Ie4pQqxFmdSUqf1NSmxgiWLRho4oTiFv1z08LYQgSdKT49ffKO67TDG -D1nI8rEuT1Nupq8WI5jcKgWqktMJjgKzfN+9nCgFGQMGqTBnt7uYZHhnuZfKSJPv -gHmS4gj72OQ2Nu6xORGhd6J8VjzcG6BX1pLebNQRzlHT3E5IVNF/9cCrc+E87Wns -bDGtzhyx7SIP7/2TiJeBZs7p8xXpaDF2cNx2F+jZH+P8feT7c+JoY7A72uVDSlYf -WVf02pylKRgqayOujH3PWA== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert31.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert31.crt deleted file mode 100644 index 8c2af4c459..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert31.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+jCCAeKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -mTX2sHY42Ord9gWyB6GcdlLjjE+4zBJ1BoDpMnvJ89niMTuZTq1ViMp/B6RuTH+2 -YF3+riZYQDH9yM/8rgvAUIvK9STaq19Zrm0mnfQUo9yKdkfoJ+XvWuvK6f+NkAMg -xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q -GSwpgC+DhVoQzFRofUdK9O9MkgR675iftaFDvyi7F0fxrSLfB/Wy4cgRYzIW6pyN -2sXWivKdLI3bgB01ffdbO17ZAGILK1whO29/bX6hbH09Y/H7jR2vjy+KP9N0PEa3 -7SBymlokB3A8wq/LWPYPeQIDAQABo1MwUTAPBgNVHRMECDAGAQEBAgEBMB0GA1Ud -DgQWBBSOBd1fH00Y9r5S8cELj/9IT4BGlDAfBgNVHSMEGDAWgBSOBd1fH00Y9r5S -8cELj/9IT4BGlDANBgkqhkiG9w0BAQsFAAOCAQEAB9nLaqxsBW0isDaBGNJyzH9O -WqYY0hex9tm3UqygfE9b9aahykpkowQIzh4D9Xpbd0hZGVlK/sw2qsKj6gDOiMtL -uWs4gaFNWIQqhVsTzL88c7XaW55n+TRQdVZyy38DZVWphte1Mumc9WB8N15rZTDh -iXjwGl0mrV1egq4hJZLpy14f6ihqU7KGfmc9onxvgvWxYLi+5v8874c4ophSKsI2 -qVE8iZ6uq2oQ66Pd5S50cYk6MEW5lifAhLM5WFZmW7dRKmykBGZ9rFrJrIvhkmh9 -He7q6TEQP1Wcoc147nIg0BTkHGtdrEv3jIX6UKKUEwUUk9ARB1mSodZQHBhuww== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert32.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert32.crt deleted file mode 100644 index 5dcd65def8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert32.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDBzCCAe+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANpGlBMXdo8cO9oqUw/b6PMwiMNV8LCe6wB9VKHPa6OG -Q0o8Xqktgwnh1rojgpMhbCApE7UXeMr6ZGq/NtqmO1hO5adV5JehWZyvg7j4EBpG -g8iWo0jNpKMJ0Yx1uBkkljEdZLTHa4bK/zy2NKqDNS2yWs9/M5+xw5XE2ecAg7FT -cXhf3q50V+M6T2IaQ9BxntTyCT8IIF2eRM/t9Y944s9Rfzm/KQVKRYPudX7YhTt9 -iqCJB4JoqYhs3HEO0wPkJxY4KBTUCN94s+7jUFdRrYxe+8Ya6tIYWqD38i5qdGhY -xrVey1LatsDJQ2EgNYobM/LjoCLK1WUssEqf0OU2bi0CAwEAAaNQME4wDAYDVR0T -BAUwAwEBATAdBgNVHQ4EFgQUOBl8edVm/H5xdS2EGEeLzftZ/DUwHwYDVR0jBBgw -FoAUjgXdXx9NGPa+UvHBC4//SE+ARpQwDQYJKoZIhvcNAQELBQADggEBAFwZriTu -DKkiDHFfz3UX4fIxYTHCi4TveYZGPeTbxhBb3XZC5qDF4T5HvCTSkG9+oFfZzI1a -lPN2yZB7QnmHJoyWa5fuovwUL0iI3iIZMqU56tdVPW8gkJe++U5kHMSpz2VF0eo8 -7XkKWxZovRwczgfDFRP9zM9CylyzQjqxx6kbxJozWnwc5UrVbJMaPIqonXp1nDoZ -i878+hX4rJUEjgO6Sa9GVZQpmuCrQF0qKsTiUBzZN67hoD3xoTAYi5IXQE2tRD1N -j3zwng9liCsxurGMnuV0BPWv/IDYRu/syjee1Qv1VFeRto5D4Rldmi2p1f5iWJCk -5m5YpRsknaICjYs= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert33.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert33.crt deleted file mode 100644 index 8e5d192b67..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert33.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFzCCAf+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAmMSQwIgYDVQQDExtUZXN0IGludGVybWVkaWF0ZSBtYXhwYXRoIDIw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCKAaAcY1Y2QRZYWft5pTiQ -LZaNHdG1wGyhbUyVCd1S/BZQeBxt8iDueHro6LpeXcioAyMePUnQQ8ZzBN+Yt1pG -83fwqNMyHf8WIWutQvQw2CIbGORO2FaCx9XgL+Le9ENMJb7ZQwV13r7PuHAV/6V1 -OwI/1Cn73cZ2uyWu8BHZbSqMctQsAkaT/pbPEUbrF4KB2GSigM+mux+Vkn9w3VK6 -pNg5pUwCP0lqi9K1RNWEXyi4NQumrR+IEiaiV05twZ1oBaWBGXSTw12hIulZ3/v6 -GLiwfk9I5mr7yDWVDdyCsTu1rhfen+Lp4ClyfWHISRPL1mko4W9leczgPWPz4pIp -AgMBAAGjUDBOMAwGA1UdEwQFMAMBAQEwHQYDVR0OBBYEFMI3a8MtjW1x6dPPJGaV -LhMF7bGKMB8GA1UdIwQYMBaAFDgZfHnVZvx+cXUthBhHi837Wfw1MA0GCSqGSIb3 -DQEBCwUAA4IBAQCprzpoj6UaEG4eqLg2L3HqsvY73/XE8ytuZ9wDC3HodnmpezUX -48XwJPHFO7OGPGWZgsU2qX/Zp7yUXkVFSK4VnmnSzUtXNVlU0oWEEOzQLrpphksH -dcF8YNN/Y65KnhzIU784uHeFefUpPaE6yS5OSZboptZWVF9y1LoU3F7gN0UGvVG9 -hflz5O0/KvmYd+6+Yrje+2lbHiJHNXLmOPiZyk9TBDknygBuU14IOWghQim3yks9 -tKk8D38Vl85V5aG9nO4STjx5J8BtSl0x6wW3t9WwU5UC9geCROhZI1XRBafIoKkn -VSgHLpLTARtLikbbg/3SxpnW12msHvgLVasf ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert34.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert34.crt deleted file mode 100644 index bebcb651de..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert34.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDIwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAeMRwwGgYDVQQDExNUZXN0IGxlYWYgaW52YWxpZCAzMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkSrgWFD4lYQ0RF/z3mJZjn1lgNBkhnCP -0hciJv/etoMN3bCB+uc8fo0wxDQ2ZcbzTAQ0qBNnjJvAJ1qslZA9boIBKmT8JSix -ii/1XTDWI3E5aOvX1h6lW66pVsIzLm0NAf0VJn2xLw0Yv8hfKbwjcNeAfm7GCwJB -8skjekMKJ8+e6pP4ZHxmrnOo0kUlCg8w8RKzZ6sYJxX1ETekWPEUSXrscQ/YSjpO -zjLDph1lO4gVErBhdJgJpJznqkrRBiR7f/hIrpAV3wOUbtfrxrIb5FXOM9rt/svW -RRrzIUGnBvo04WZ+KQHPsMn+9x8i+/tueOg1KLfs10hW0RWsTQjmOQIDAQABo00w -SzAJBgNVHRMEAjAAMB0GA1UdDgQWBBSOBr1U4h5PYyOqGe/gJgwWk7FfezAfBgNV -HSMEGDAWgBTCN2vDLY1tcenTzyRmlS4TBe2xijANBgkqhkiG9w0BAQsFAAOCAQEA -aBLuwNN5vOh2dLbn8lMNsc/oTFSInzu+ylzC/KLTkjoyMYY+S2ISUuew9pzUo4Gs -AAE/rqVYednayyA13eNRBnwIw+8kPTESaJMGl6uQQd8DzAalzqxbFhbwFY2T0pdi -LNFkGjmGdpRNy/VSTy6JEEBMhIKXjMpactmpiV6mwK3bfnFaXZ6o70+JZrNeiSe0 -g8sci6gBVEt27bGvhLalut8WXc7VCkxQhQCSBdv/94EmRxzPye6iAK0L9jaTHlt+ -qR5MWJxZN32muI7nsKnetUMZbIYwvO1LPn8f+0hdYkck8kE7ga1UM98oTgQeIOmj -3JNCDkNY+Z387ujaaOAVxw== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert41.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert41.crt deleted file mode 100644 index 7065c94265..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert41.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC9zCCAd+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgNDAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCA0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -mTX2sHY42Ord9gWyB6GcdlLjjE+4zBJ1BoDpMnvJ89niMTuZTq1ViMp/B6RuTH+2 -YF3+riZYQDH9yM/8rgvAUIvK9STaq19Zrm0mnfQUo9yKdkfoJ+XvWuvK6f+NkAMg -xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q -GSwpgC+DhVoQzFRofUdK9O9MkgR675iftaFDvyi7F0fxrSLfB/Wy4cgRYzIW6pyN -2sXWivKdLI3bgB01ffdbO17ZAGILK1whO29/bX6hbH09Y/H7jR2vjy+KP9N0PEa3 -7SBymlokB3A8wq/LWPYPeQIDAQABo1AwTjAMBgNVHRMEBTADAQEBMB0GA1UdDgQW -BBSOBd1fH00Y9r5S8cELj/9IT4BGlDAfBgNVHSMEGDAWgBSOBd1fH00Y9r5S8cEL -j/9IT4BGlDANBgkqhkiG9w0BAQsFAAOCAQEAWhrHGIMcEG2UJfv920hftxi+Jvj/ -ivrhEscqlVA0QNLqZV8v/ai/AiypDLk7uwKtsxF2i+sl81473aSFS9hh3F83/ofm -x8EU8X1FBQHN1zyAEpZyPXr7MiaTXn4w5sCeZLmpWyxGk+cRiPVRE0QUbXDGfVRp -3v984oCUMUzbb+zv6QlkHa6m/kZq0qrnNVVp0X4c7/Pb5elJOVlKnIslNgd/eLrz -zSabToAX9OP6tbJdSRky/LmIYW+CXH/Y4YVwpEu7NisZmDo6lnCBoRQB3QgxoMLp -mM+RUY+AyHr0ZsSUSb6iicJMRZ3mhxCLvnK/Noe/3hq4pUk4Sit7s7JL7A== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert42.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert42.crt deleted file mode 100644 index c0713188a3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert42.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCjCCAfKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgNDAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANpGlBMXdo8cO9oqUw/b6PMwiMNV8LCe6wB9VKHPa6OG -Q0o8Xqktgwnh1rojgpMhbCApE7UXeMr6ZGq/NtqmO1hO5adV5JehWZyvg7j4EBpG -g8iWo0jNpKMJ0Yx1uBkkljEdZLTHa4bK/zy2NKqDNS2yWs9/M5+xw5XE2ecAg7FT -cXhf3q50V+M6T2IaQ9BxntTyCT8IIF2eRM/t9Y944s9Rfzm/KQVKRYPudX7YhTt9 -iqCJB4JoqYhs3HEO0wPkJxY4KBTUCN94s+7jUFdRrYxe+8Ya6tIYWqD38i5qdGhY -xrVey1LatsDJQ2EgNYobM/LjoCLK1WUssEqf0OU2bi0CAwEAAaNTMFEwDwYDVR0T -BAgwBgEBAQIBATAdBgNVHQ4EFgQUOBl8edVm/H5xdS2EGEeLzftZ/DUwHwYDVR0j -BBgwFoAUjgXdXx9NGPa+UvHBC4//SE+ARpQwDQYJKoZIhvcNAQELBQADggEBAGKh -pBhYSGN0KGWIG4GG4mVoTiw880ehetDuTpl3ymZNqkoUuTaAtU3PJWOctcJva7h6 -4PSgyabi/WQmhntR1GxCUt0GTuhHmyJYsSwakXUgMgF6W6TKcxg6m4vjMkkrf+ZT -1lO/MiwxhTTluHPGkl/nBG+uxySInuQMDvdyQDXp2e17qxops+G+1UnRJinqLtsd -LMkCOT4pyh6B5ysnJ8gP1Z2EKWjhKJcIHRMUm7Ap/pf8Zgh5LIqdRtDSuNuTmPLP -lkgoebOCO3c/mWCciR0xGCcz86G3fYznvGp4XqHnRkg3SpAcHQbQ/nSHA+1LdfFi -nqZQPnJPVsJctDR935c= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert43.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert43.crt deleted file mode 100644 index 8e5d192b67..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert43.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFzCCAf+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAmMSQwIgYDVQQDExtUZXN0IGludGVybWVkaWF0ZSBtYXhwYXRoIDIw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCKAaAcY1Y2QRZYWft5pTiQ -LZaNHdG1wGyhbUyVCd1S/BZQeBxt8iDueHro6LpeXcioAyMePUnQQ8ZzBN+Yt1pG -83fwqNMyHf8WIWutQvQw2CIbGORO2FaCx9XgL+Le9ENMJb7ZQwV13r7PuHAV/6V1 -OwI/1Cn73cZ2uyWu8BHZbSqMctQsAkaT/pbPEUbrF4KB2GSigM+mux+Vkn9w3VK6 -pNg5pUwCP0lqi9K1RNWEXyi4NQumrR+IEiaiV05twZ1oBaWBGXSTw12hIulZ3/v6 -GLiwfk9I5mr7yDWVDdyCsTu1rhfen+Lp4ClyfWHISRPL1mko4W9leczgPWPz4pIp -AgMBAAGjUDBOMAwGA1UdEwQFMAMBAQEwHQYDVR0OBBYEFMI3a8MtjW1x6dPPJGaV -LhMF7bGKMB8GA1UdIwQYMBaAFDgZfHnVZvx+cXUthBhHi837Wfw1MA0GCSqGSIb3 -DQEBCwUAA4IBAQCprzpoj6UaEG4eqLg2L3HqsvY73/XE8ytuZ9wDC3HodnmpezUX -48XwJPHFO7OGPGWZgsU2qX/Zp7yUXkVFSK4VnmnSzUtXNVlU0oWEEOzQLrpphksH -dcF8YNN/Y65KnhzIU784uHeFefUpPaE6yS5OSZboptZWVF9y1LoU3F7gN0UGvVG9 -hflz5O0/KvmYd+6+Yrje+2lbHiJHNXLmOPiZyk9TBDknygBuU14IOWghQim3yks9 -tKk8D38Vl85V5aG9nO4STjx5J8BtSl0x6wW3t9WwU5UC9geCROhZI1XRBafIoKkn -VSgHLpLTARtLikbbg/3SxpnW12msHvgLVasf ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert44.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert44.crt deleted file mode 100644 index 084fb2d823..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert44.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFzCCAf+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDIwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAmMSQwIgYDVQQDExtUZXN0IGludGVybWVkaWF0ZSBtYXhwYXRoIDMw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCRKuBYUPiVhDREX/PeYlmO -fWWA0GSGcI/SFyIm/962gw3dsIH65zx+jTDENDZlxvNMBDSoE2eMm8AnWqyVkD1u -ggEqZPwlKLGKL/VdMNYjcTlo69fWHqVbrqlWwjMubQ0B/RUmfbEvDRi/yF8pvCNw -14B+bsYLAkHyySN6Qwonz57qk/hkfGauc6jSRSUKDzDxErNnqxgnFfURN6RY8RRJ -euxxD9hKOk7OMsOmHWU7iBUSsGF0mAmknOeqStEGJHt/+EiukBXfA5Ru1+vGshvk -Vc4z2u3+y9ZFGvMhQacG+jThZn4pAc+wyf73HyL7+2546DUot+zXSFbRFaxNCOY5 -AgMBAAGjUDBOMAwGA1UdEwQFMAMBAQEwHQYDVR0OBBYEFI4GvVTiHk9jI6oZ7+Am -DBaTsV97MB8GA1UdIwQYMBaAFMI3a8MtjW1x6dPPJGaVLhMF7bGKMA0GCSqGSIb3 -DQEBCwUAA4IBAQCB3dtsoVdschVyCWSI16Se46RZJtLW1bM019KdyZj9DdIZ2VPm -Ip+BQFcVJyzbfmhn5QBbhNDKkwsfldI9Y8IqZ132j442/XIFZIilaPi3cE/WLFUY -Nxu2opuN3+KDwDYO32CUp3frr9OjAtB5amZnkXau+C1EkJlSuWaT+/gIlYwlr4/H -uADcyqFSmy28P9jmkK8AzZHhKnlRadAn2cDB8MFXD5VxnLJfejkprQVLdxTXRovP -cE/6c7PUGIK22WcSX8KTfuviKmjdGVhgeKps2nRNKaSIlqYCztyc8IjcZwJCnh6c -ZW8V9bi7WxDK+I9PPgrgLK8W+VTkS0RtjP5a ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert45.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert45.crt deleted file mode 100644 index e5d5b3d895..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert45.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDMwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAeMRwwGgYDVQQDExNUZXN0IGxlYWYgaW52YWxpZCA0MIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkcNsE/s4nauA5vSG/23znHT5ZjFAQiRa -83xo83MD2jMrBjgBBzOW0IKedk9lmqcRmoMsWt3PbYeH2Am+EqtOjh9vbHw/wXEw -eXg7DtZaYTjeRNkrwZ0z5Bz/TTvia7YkcfaU83OG4JyL8GmmbtiGNOHZyHqTv2Ky -j6YqyBJaDE7dwBNBJd5DElEuvr6Tu/Y3K3Z6z8bZUAX/5oII2sq8rg76ZQ+Dfk8i -upjp4MVPvowh/+ys+WNMW5MA5k1dwYyU1MZ20O/aa9VTMkb4DPyv4pXZgi1dBCMc -YskPRVoPPsE5xl3DZ3h4qZ039MbcalXFYe65689+Ra1O4/dsXR5raQIDAQABo00w -SzAJBgNVHRMEAjAAMB0GA1UdDgQWBBTKtXdQZA8cZkS/89eiih4GTJX+fDAfBgNV -HSMEGDAWgBSOBr1U4h5PYyOqGe/gJgwWk7FfezANBgkqhkiG9w0BAQsFAAOCAQEA -IWynyo8ezt+So+w29h7z2ZS3/EcrErnSiDDJ0DaE/vcvflrT/tEPeDHTxy61qQuX -KoseO84foFqLPu1YqgSjRgmbk76gt8aAu0lr6/t0RHWdHKZG3QtK8696pGoMAhVg -Ha3f/YYaEkqSnHwU+/vxEXEkGHM22UHwb7dtH2LfBHtoQtjE6M+Ulv6QdkLj2LFD -XMKJIyAlibTRMW8YOP4G/DekCq1DstUOcTn7BFqeAjjzYwv3NHpOJHdZrUgyGb7B -QqDXf2rM3s7LEpwDMvfdraAEWld4/LRLkfau/PfKD5YwGYg3Nb45xyXFSEijVjAr -23G8HAIcJJu2jUIWGr9OtQ== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert51.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert51.crt deleted file mode 100644 index 7065c94265..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert51.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC9zCCAd+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgNDAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCA0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -mTX2sHY42Ord9gWyB6GcdlLjjE+4zBJ1BoDpMnvJ89niMTuZTq1ViMp/B6RuTH+2 -YF3+riZYQDH9yM/8rgvAUIvK9STaq19Zrm0mnfQUo9yKdkfoJ+XvWuvK6f+NkAMg -xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q -GSwpgC+DhVoQzFRofUdK9O9MkgR675iftaFDvyi7F0fxrSLfB/Wy4cgRYzIW6pyN -2sXWivKdLI3bgB01ffdbO17ZAGILK1whO29/bX6hbH09Y/H7jR2vjy+KP9N0PEa3 -7SBymlokB3A8wq/LWPYPeQIDAQABo1AwTjAMBgNVHRMEBTADAQEBMB0GA1UdDgQW -BBSOBd1fH00Y9r5S8cELj/9IT4BGlDAfBgNVHSMEGDAWgBSOBd1fH00Y9r5S8cEL -j/9IT4BGlDANBgkqhkiG9w0BAQsFAAOCAQEAWhrHGIMcEG2UJfv920hftxi+Jvj/ -ivrhEscqlVA0QNLqZV8v/ai/AiypDLk7uwKtsxF2i+sl81473aSFS9hh3F83/ofm -x8EU8X1FBQHN1zyAEpZyPXr7MiaTXn4w5sCeZLmpWyxGk+cRiPVRE0QUbXDGfVRp -3v984oCUMUzbb+zv6QlkHa6m/kZq0qrnNVVp0X4c7/Pb5elJOVlKnIslNgd/eLrz -zSabToAX9OP6tbJdSRky/LmIYW+CXH/Y4YVwpEu7NisZmDo6lnCBoRQB3QgxoMLp -mM+RUY+AyHr0ZsSUSb6iicJMRZ3mhxCLvnK/Noe/3hq4pUk4Sit7s7JL7A== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert52.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert52.crt deleted file mode 100644 index c0713188a3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert52.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCjCCAfKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgNDAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANpGlBMXdo8cO9oqUw/b6PMwiMNV8LCe6wB9VKHPa6OG -Q0o8Xqktgwnh1rojgpMhbCApE7UXeMr6ZGq/NtqmO1hO5adV5JehWZyvg7j4EBpG -g8iWo0jNpKMJ0Yx1uBkkljEdZLTHa4bK/zy2NKqDNS2yWs9/M5+xw5XE2ecAg7FT -cXhf3q50V+M6T2IaQ9BxntTyCT8IIF2eRM/t9Y944s9Rfzm/KQVKRYPudX7YhTt9 -iqCJB4JoqYhs3HEO0wPkJxY4KBTUCN94s+7jUFdRrYxe+8Ya6tIYWqD38i5qdGhY -xrVey1LatsDJQ2EgNYobM/LjoCLK1WUssEqf0OU2bi0CAwEAAaNTMFEwDwYDVR0T -BAgwBgEBAQIBATAdBgNVHQ4EFgQUOBl8edVm/H5xdS2EGEeLzftZ/DUwHwYDVR0j -BBgwFoAUjgXdXx9NGPa+UvHBC4//SE+ARpQwDQYJKoZIhvcNAQELBQADggEBAGKh -pBhYSGN0KGWIG4GG4mVoTiw880ehetDuTpl3ymZNqkoUuTaAtU3PJWOctcJva7h6 -4PSgyabi/WQmhntR1GxCUt0GTuhHmyJYsSwakXUgMgF6W6TKcxg6m4vjMkkrf+ZT -1lO/MiwxhTTluHPGkl/nBG+uxySInuQMDvdyQDXp2e17qxops+G+1UnRJinqLtsd -LMkCOT4pyh6B5ysnJ8gP1Z2EKWjhKJcIHRMUm7Ap/pf8Zgh5LIqdRtDSuNuTmPLP -lkgoebOCO3c/mWCciR0xGCcz86G3fYznvGp4XqHnRkg3SpAcHQbQ/nSHA+1LdfFi -nqZQPnJPVsJctDR935c= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert53.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert53.crt deleted file mode 100644 index 8e5d192b67..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert53.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFzCCAf+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAmMSQwIgYDVQQDExtUZXN0IGludGVybWVkaWF0ZSBtYXhwYXRoIDIw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCKAaAcY1Y2QRZYWft5pTiQ -LZaNHdG1wGyhbUyVCd1S/BZQeBxt8iDueHro6LpeXcioAyMePUnQQ8ZzBN+Yt1pG -83fwqNMyHf8WIWutQvQw2CIbGORO2FaCx9XgL+Le9ENMJb7ZQwV13r7PuHAV/6V1 -OwI/1Cn73cZ2uyWu8BHZbSqMctQsAkaT/pbPEUbrF4KB2GSigM+mux+Vkn9w3VK6 -pNg5pUwCP0lqi9K1RNWEXyi4NQumrR+IEiaiV05twZ1oBaWBGXSTw12hIulZ3/v6 -GLiwfk9I5mr7yDWVDdyCsTu1rhfen+Lp4ClyfWHISRPL1mko4W9leczgPWPz4pIp -AgMBAAGjUDBOMAwGA1UdEwQFMAMBAQEwHQYDVR0OBBYEFMI3a8MtjW1x6dPPJGaV -LhMF7bGKMB8GA1UdIwQYMBaAFDgZfHnVZvx+cXUthBhHi837Wfw1MA0GCSqGSIb3 -DQEBCwUAA4IBAQCprzpoj6UaEG4eqLg2L3HqsvY73/XE8ytuZ9wDC3HodnmpezUX -48XwJPHFO7OGPGWZgsU2qX/Zp7yUXkVFSK4VnmnSzUtXNVlU0oWEEOzQLrpphksH -dcF8YNN/Y65KnhzIU784uHeFefUpPaE6yS5OSZboptZWVF9y1LoU3F7gN0UGvVG9 -hflz5O0/KvmYd+6+Yrje+2lbHiJHNXLmOPiZyk9TBDknygBuU14IOWghQim3yks9 -tKk8D38Vl85V5aG9nO4STjx5J8BtSl0x6wW3t9WwU5UC9geCROhZI1XRBafIoKkn -VSgHLpLTARtLikbbg/3SxpnW12msHvgLVasf ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert54.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert54.crt deleted file mode 100644 index e42e14f54c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert54.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCjCCAfKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDIwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAcMRowGAYDVQQDExFUZXN0IExlYWYgNCB2YWxpZDCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAJEq4FhQ+JWENERf895iWY59ZYDQZIZwj9IX -Iib/3raDDd2wgfrnPH6NMMQ0NmXG80wENKgTZ4ybwCdarJWQPW6CASpk/CUosYov -9V0w1iNxOWjr19YepVuuqVbCMy5tDQH9FSZ9sS8NGL/IXym8I3DXgH5uxgsCQfLJ -I3pDCifPnuqT+GR8Zq5zqNJFJQoPMPESs2erGCcV9RE3pFjxFEl67HEP2Eo6Ts4y -w6YdZTuIFRKwYXSYCaSc56pK0QYke3/4SK6QFd8DlG7X68ayG+RVzjPa7f7L1kUa -8yFBpwb6NOFmfikBz7DJ/vcfIvv7bnjoNSi37NdIVtEVrE0I5jkCAwEAAaNNMEsw -CQYDVR0TBAIwADAdBgNVHQ4EFgQUjga9VOIeT2Mjqhnv4CYMFpOxX3swHwYDVR0j -BBgwFoAUwjdrwy2NbXHp088kZpUuEwXtsYowDQYJKoZIhvcNAQELBQADggEBADdp -VpPr4AzE7ecrhclQKGjPa7leaorYuevjTLWsieY17mVQhlMX1itTNXlPBUfPAsOd -O7LUgY0yZOnV7l8TbfGal8pIF+acgFLgqM5A6z8ngChMi6iKEZChDVffAVHJs3e/ -WUm7VeFY8Mvwnay3iHj2trC7XQX2SZCovXYfNP3bVyqIaDNqt6SPY1skouWpmmUn -ISzcyH6EU/CegFjHJyXxrsIW9Nv2mDejrmcR0EJOmEAfWUgonfemeX93xkwZHW2s -lZ8/e6rTPPSGdhY/b4VRu6o1FpLcPLGZSgPwYBNVYtgT4WsoT0xUvm6Y1WipiZda -B/bpiL8l4GSVtTw1Jko= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert61.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert61.crt deleted file mode 100644 index 8c2af4c459..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert61.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+jCCAeKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -mTX2sHY42Ord9gWyB6GcdlLjjE+4zBJ1BoDpMnvJ89niMTuZTq1ViMp/B6RuTH+2 -YF3+riZYQDH9yM/8rgvAUIvK9STaq19Zrm0mnfQUo9yKdkfoJ+XvWuvK6f+NkAMg -xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q -GSwpgC+DhVoQzFRofUdK9O9MkgR675iftaFDvyi7F0fxrSLfB/Wy4cgRYzIW6pyN -2sXWivKdLI3bgB01ffdbO17ZAGILK1whO29/bX6hbH09Y/H7jR2vjy+KP9N0PEa3 -7SBymlokB3A8wq/LWPYPeQIDAQABo1MwUTAPBgNVHRMECDAGAQEBAgEBMB0GA1Ud -DgQWBBSOBd1fH00Y9r5S8cELj/9IT4BGlDAfBgNVHSMEGDAWgBSOBd1fH00Y9r5S -8cELj/9IT4BGlDANBgkqhkiG9w0BAQsFAAOCAQEAB9nLaqxsBW0isDaBGNJyzH9O -WqYY0hex9tm3UqygfE9b9aahykpkowQIzh4D9Xpbd0hZGVlK/sw2qsKj6gDOiMtL -uWs4gaFNWIQqhVsTzL88c7XaW55n+TRQdVZyy38DZVWphte1Mumc9WB8N15rZTDh -iXjwGl0mrV1egq4hJZLpy14f6ihqU7KGfmc9onxvgvWxYLi+5v8874c4ophSKsI2 -qVE8iZ6uq2oQ66Pd5S50cYk6MEW5lifAhLM5WFZmW7dRKmykBGZ9rFrJrIvhkmh9 -He7q6TEQP1Wcoc147nIg0BTkHGtdrEv3jIX6UKKUEwUUk9ARB1mSodZQHBhuww== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert62.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert62.crt deleted file mode 100644 index 5dcd65def8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert62.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDBzCCAe+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANpGlBMXdo8cO9oqUw/b6PMwiMNV8LCe6wB9VKHPa6OG -Q0o8Xqktgwnh1rojgpMhbCApE7UXeMr6ZGq/NtqmO1hO5adV5JehWZyvg7j4EBpG -g8iWo0jNpKMJ0Yx1uBkkljEdZLTHa4bK/zy2NKqDNS2yWs9/M5+xw5XE2ecAg7FT -cXhf3q50V+M6T2IaQ9BxntTyCT8IIF2eRM/t9Y944s9Rfzm/KQVKRYPudX7YhTt9 -iqCJB4JoqYhs3HEO0wPkJxY4KBTUCN94s+7jUFdRrYxe+8Ya6tIYWqD38i5qdGhY -xrVey1LatsDJQ2EgNYobM/LjoCLK1WUssEqf0OU2bi0CAwEAAaNQME4wDAYDVR0T -BAUwAwEBATAdBgNVHQ4EFgQUOBl8edVm/H5xdS2EGEeLzftZ/DUwHwYDVR0jBBgw -FoAUjgXdXx9NGPa+UvHBC4//SE+ARpQwDQYJKoZIhvcNAQELBQADggEBAFwZriTu -DKkiDHFfz3UX4fIxYTHCi4TveYZGPeTbxhBb3XZC5qDF4T5HvCTSkG9+oFfZzI1a -lPN2yZB7QnmHJoyWa5fuovwUL0iI3iIZMqU56tdVPW8gkJe++U5kHMSpz2VF0eo8 -7XkKWxZovRwczgfDFRP9zM9CylyzQjqxx6kbxJozWnwc5UrVbJMaPIqonXp1nDoZ -i878+hX4rJUEjgO6Sa9GVZQpmuCrQF0qKsTiUBzZN67hoD3xoTAYi5IXQE2tRD1N -j3zwng9liCsxurGMnuV0BPWv/IDYRu/syjee1Qv1VFeRto5D4Rldmi2p1f5iWJCk -5m5YpRsknaICjYs= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert63.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert63.crt deleted file mode 100644 index ffa90e4fd0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert63.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCjCCAfKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAcMRowGAYDVQQDExFUZXN0IExlYWYgdmFsaWQgMjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAIoBoBxjVjZBFlhZ+3mlOJAtlo0d0bXAbKFt -TJUJ3VL8FlB4HG3yIO54eujoul5dyKgDIx49SdBDxnME35i3Wkbzd/Co0zId/xYh -a61C9DDYIhsY5E7YVoLH1eAv4t70Q0wlvtlDBXXevs+4cBX/pXU7Aj/UKfvdxna7 -Ja7wEdltKoxy1CwCRpP+ls8RRusXgoHYZKKAz6a7H5WSf3DdUrqk2DmlTAI/SWqL -0rVE1YRfKLg1C6atH4gSJqJXTm3BnWgFpYEZdJPDXaEi6Vnf+/oYuLB+T0jmavvI -NZUN3IKxO7WuF96f4ungKXJ9YchJE8vWaSjhb2V5zOA9Y/PikikCAwEAAaNNMEsw -CQYDVR0TBAIwADAdBgNVHQ4EFgQUwjdrwy2NbXHp088kZpUuEwXtsYowHwYDVR0j -BBgwFoAUOBl8edVm/H5xdS2EGEeLzftZ/DUwDQYJKoZIhvcNAQELBQADggEBABrt -2fKOUwAb5EFD/ebXMM4Qzg6sFYpq/mcnPlmGmqwNzmumlgYUBS15liTnA4nBgR09 -b2sejlwnzcnrsFB18YCmE/TIPuh3XMJXmUxjcnCy3qPuSwpuwG3brUGQPiIZhRZz -1+iSc7uba/JGaTqLBItaRPlB6dD3jqY3UowFaWvnYiVmCXg147EBC5Mn2EDiukg0 -xsqM03yfpUkp4/W9+WpJuGNyhicSJbNxlh3zEjrgWeMvhnFmrTr7ss6P2ZoKGS3/ -QrZBLUzkk25hCF3dTNfTDVSQUt0rONJvx3ym+Kp+zQWc/oHsDs0STs5Db2J0dGp8 -VEyxyevfwivF4EQ70Jw= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert71.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert71.crt deleted file mode 100644 index 8c2af4c459..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert71.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+jCCAeKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMBYxFDASBgNV -BAMTC1Rlc3Qgcm9vdCAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA -mTX2sHY42Ord9gWyB6GcdlLjjE+4zBJ1BoDpMnvJ89niMTuZTq1ViMp/B6RuTH+2 -YF3+riZYQDH9yM/8rgvAUIvK9STaq19Zrm0mnfQUo9yKdkfoJ+XvWuvK6f+NkAMg -xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q -GSwpgC+DhVoQzFRofUdK9O9MkgR675iftaFDvyi7F0fxrSLfB/Wy4cgRYzIW6pyN -2sXWivKdLI3bgB01ffdbO17ZAGILK1whO29/bX6hbH09Y/H7jR2vjy+KP9N0PEa3 -7SBymlokB3A8wq/LWPYPeQIDAQABo1MwUTAPBgNVHRMECDAGAQEBAgEBMB0GA1Ud -DgQWBBSOBd1fH00Y9r5S8cELj/9IT4BGlDAfBgNVHSMEGDAWgBSOBd1fH00Y9r5S -8cELj/9IT4BGlDANBgkqhkiG9w0BAQsFAAOCAQEAB9nLaqxsBW0isDaBGNJyzH9O -WqYY0hex9tm3UqygfE9b9aahykpkowQIzh4D9Xpbd0hZGVlK/sw2qsKj6gDOiMtL -uWs4gaFNWIQqhVsTzL88c7XaW55n+TRQdVZyy38DZVWphte1Mumc9WB8N15rZTDh -iXjwGl0mrV1egq4hJZLpy14f6ihqU7KGfmc9onxvgvWxYLi+5v8874c4ophSKsI2 -qVE8iZ6uq2oQ66Pd5S50cYk6MEW5lifAhLM5WFZmW7dRKmykBGZ9rFrJrIvhkmh9 -He7q6TEQP1Wcoc147nIg0BTkHGtdrEv3jIX6UKKUEwUUk9ARB1mSodZQHBhuww== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert72.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert72.crt deleted file mode 100644 index 5dcd65def8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert72.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDBzCCAe+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDEwtUZXN0 -IHJvb3QgMjAeFw0wMTAxMDEwMDAwMDBaFw0zMDEyMzEyMzU5NTlaMCYxJDAiBgNV -BAMTG1Rlc3QgaW50ZXJtZWRpYXRlIG1heHBhdGggMTCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBANpGlBMXdo8cO9oqUw/b6PMwiMNV8LCe6wB9VKHPa6OG -Q0o8Xqktgwnh1rojgpMhbCApE7UXeMr6ZGq/NtqmO1hO5adV5JehWZyvg7j4EBpG -g8iWo0jNpKMJ0Yx1uBkkljEdZLTHa4bK/zy2NKqDNS2yWs9/M5+xw5XE2ecAg7FT -cXhf3q50V+M6T2IaQ9BxntTyCT8IIF2eRM/t9Y944s9Rfzm/KQVKRYPudX7YhTt9 -iqCJB4JoqYhs3HEO0wPkJxY4KBTUCN94s+7jUFdRrYxe+8Ya6tIYWqD38i5qdGhY -xrVey1LatsDJQ2EgNYobM/LjoCLK1WUssEqf0OU2bi0CAwEAAaNQME4wDAYDVR0T -BAUwAwEBATAdBgNVHQ4EFgQUOBl8edVm/H5xdS2EGEeLzftZ/DUwHwYDVR0jBBgw -FoAUjgXdXx9NGPa+UvHBC4//SE+ARpQwDQYJKoZIhvcNAQELBQADggEBAFwZriTu -DKkiDHFfz3UX4fIxYTHCi4TveYZGPeTbxhBb3XZC5qDF4T5HvCTSkG9+oFfZzI1a -lPN2yZB7QnmHJoyWa5fuovwUL0iI3iIZMqU56tdVPW8gkJe++U5kHMSpz2VF0eo8 -7XkKWxZovRwczgfDFRP9zM9CylyzQjqxx6kbxJozWnwc5UrVbJMaPIqonXp1nDoZ -i878+hX4rJUEjgO6Sa9GVZQpmuCrQF0qKsTiUBzZN67hoD3xoTAYi5IXQE2tRD1N -j3zwng9liCsxurGMnuV0BPWv/IDYRu/syjee1Qv1VFeRto5D4Rldmi2p1f5iWJCk -5m5YpRsknaICjYs= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert73.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert73.crt deleted file mode 100644 index 6854c74a0f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert73.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDFzCCAf+gAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAmMSQwIgYDVQQDExtUZXN0IGludGVybWVkaWF0ZSBtYXhwYXRoIDEw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaRpQTF3aPHDvaKlMP2+jz -MIjDVfCwnusAfVShz2ujhkNKPF6pLYMJ4da6I4KTIWwgKRO1F3jK+mRqvzbapjtY -TuWnVeSXoVmcr4O4+BAaRoPIlqNIzaSjCdGMdbgZJJYxHWS0x2uGyv88tjSqgzUt -slrPfzOfscOVxNnnAIOxU3F4X96udFfjOk9iGkPQcZ7U8gk/CCBdnkTP7fWPeOLP -UX85vykFSkWD7nV+2IU7fYqgiQeCaKmIbNxxDtMD5CcWOCgU1AjfeLPu41BXUa2M -XvvGGurSGFqg9/IuanRoWMa1XstS2rbAyUNhIDWKGzPy46AiytVlLLBKn9DlNm4t -AgMBAAGjUDBOMAwGA1UdEwQFMAMBAQEwHQYDVR0OBBYEFDgZfHnVZvx+cXUthBhH -i837Wfw1MB8GA1UdIwQYMBaAFDgZfHnVZvx+cXUthBhHi837Wfw1MA0GCSqGSIb3 -DQEBCwUAA4IBAQDPQC9vYJegBgVZHu0StoRT7L6ShWcZc5Z/TeyrqJBdoiguSRq5 -kMiFXZpksxeFlIUYry21MigYqxOXGZ2GZYNqhLpYVh7hzAY8uYvf4U70q88zj7mw -gIcgEaMd71GHqbb2O5x3fCN7vLeU5DFYBWfqLlkL57Uqr2aRDHlucryyRNordicN -WbCxPozmqtbNMABEUbjLMCCuzJeNRSZbS0OOod6Xd3N00EK7PqaRhbihbq3L6gUG -MjUI2keSxW4vXcDfI5Hqem6SHpCc3retx2VUgwIDAoTrw7E4dwmyC4Tp7TDJL/+d -GU8qhRmoQer7mLUzpb3s8mq/4rZx+alTQ3gu ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert74.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert74.crt deleted file mode 100644 index 920c4c2089..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert74.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCjCCAfKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtUZXN0 -IGludGVybWVkaWF0ZSBtYXhwYXRoIDEwHhcNMDEwMTAxMDAwMDAwWhcNMzAxMjMx -MjM1OTU5WjAcMRowGAYDVQQDExFUZXN0IExlYWYgdmFsaWQgMzCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAIoBoBxjVjZBFlhZ+3mlOJAtlo0d0bXAbKFt -TJUJ3VL8FlB4HG3yIO54eujoul5dyKgDIx49SdBDxnME35i3Wkbzd/Co0zId/xYh -a61C9DDYIhsY5E7YVoLH1eAv4t70Q0wlvtlDBXXevs+4cBX/pXU7Aj/UKfvdxna7 -Ja7wEdltKoxy1CwCRpP+ls8RRusXgoHYZKKAz6a7H5WSf3DdUrqk2DmlTAI/SWqL -0rVE1YRfKLg1C6atH4gSJqJXTm3BnWgFpYEZdJPDXaEi6Vnf+/oYuLB+T0jmavvI -NZUN3IKxO7WuF96f4ungKXJ9YchJE8vWaSjhb2V5zOA9Y/PikikCAwEAAaNNMEsw -CQYDVR0TBAIwADAdBgNVHQ4EFgQUwjdrwy2NbXHp088kZpUuEwXtsYowHwYDVR0j -BBgwFoAUOBl8edVm/H5xdS2EGEeLzftZ/DUwDQYJKoZIhvcNAQELBQADggEBAK9R -J7H8epG2NagZ3Gpl6R1jSiIixWlPJci2Bz1Nr8NIER64TJCKHeh9ku6tzSdrVL3B -2rj5GmpubDXEWAKfMtt0ccF2UIva9rDMNzaAnCSevWHXf9Httr84X6RmhtXb9/Rm -fp3W+L0GlDfHfHn8uoVdQe5e6xkmGxtcHDUsyO/CJMkrwUyoB8zs7UtlNtOf45H4 -PPg09lzV7RQ9vFIH48F/4gZW+w3AqN9ZwvYkGcJUY8tyHpb9hDrR4F6loVInrlCE -0pQiQXNCdee1za9QsScSjYNxGfR2Dkzote41H098jvLalLTTg5Fqx/AylnX285FI -ETGOumNQ51IJLUpq+hc= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert81.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert81.crt deleted file mode 100644 index 26b2bd5556..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert81.crt +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBpTCCAUmgAwIBAgIBUTAMBggqhkjOPQQDAgUAMDExDzANBgNVBAMTBlJvb3Qg -ODERMA8GA1UEChMIbWJlZCBUTFMxCzAJBgNVBAYTAlVLMB4XDTAxMDEwMTAwMDAw -MFoXDTMwMTIzMTIzNTk1OVowMTEPMA0GA1UEAxMGUm9vdCA4MREwDwYDVQQKEwht -YmVkIFRMUzELMAkGA1UEBhMCVUswWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT1 -GuTQ9vgf2l3oLM25r78cvIAQqE02GzQGjp/WWw3CysEwTwNEuZGhRiD5lDmkbUGW -UNxv/7uJjy7k3K3fDNdko1AwTjAMBgNVHRMEBTADAQH/MB0GA1UdDgQWBBTHFA2h -Au0tPnzeYnLcmlTQj4FAajAfBgNVHSMEGDAWgBTHFA2hAu0tPnzeYnLcmlTQj4FA -ajAMBggqhkjOPQQDAgUAA0gAMEUCIH7Z/HNb/Pwbs40iNll1a9gmgAbYOgdlVPWo -nSdcb7cZAiEAlhVb6CdBXsjOfAWWEET/QP74z608PKFccCIFPCDLkxo= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert82.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert82.crt deleted file mode 100644 index d49ecc9f36..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert82.crt +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBqDCCAUygAwIBAgIBUjAMBggqhkjOPQQDAgUAMDExDzANBgNVBAMTBlJvb3Qg -ODERMA8GA1UEChMIbWJlZCBUTFMxCzAJBgNVBAYTAlVLMB4XDTAxMDEwMTAwMDAw -MFoXDTMwMTIzMTIzNTk1OVowMTEPMA0GA1UEAxMGSW50IDgyMREwDwYDVQQKEwht -YmVkIFRMUzELMAkGA1UEBhMCVUswWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS2 -giYQt4HVfQ2t8eTS0bvISwp7ol2x17umbllBxwzGDFEUQ00JL1/SStezecK0lNhE -0AvY8Ez2soQEtdSeQGkCo1MwUTAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBS3 -+nsv3nQknSg4aDjlTiRpCPo7XzAfBgNVHSMEGDAWgBTHFA2hAu0tPnzeYnLcmlTQ -j4FAajAMBggqhkjOPQQDAgUAA0gAMEUCIQDus2Lvx3yyvaViY1s334uMm6ge484X -oktMyxLVjkAMiAIgehTHiJJaT9PnlVa+hUpxsIfVAuMexrm5fw/bDF5Nxzw= ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert83.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert83.crt deleted file mode 100644 index 21a748e323..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert83.crt +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBoDCCAUWgAwIBAgIBUzAMBggqhkjOPQQDAgUAMDExDzANBgNVBAMTBkludCA4 -MjERMA8GA1UEChMIbWJlZCBUTFMxCzAJBgNVBAYTAlVLMB4XDTAxMDEwMTAwMDAw -MFoXDTMwMTIzMTIzNTk1OVowMDEOMAwGA1UEAxMFRUUgODMxETAPBgNVBAoTCG1i -ZWQgVExTMQswCQYDVQQGEwJVSzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMSy -6X5iBYrdxxOMfdcA23pLBoJCeyEjiWfALxTm80MJGBdRNVdnT50xNU3SDDwHWPda -/EQqHq+itsqkUeyAGAyjTTBLMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGsFH/KsvM4n -r+i1gI2iCVXi3KtFMB8GA1UdIwQYMBaAFLf6ey/edCSdKDhoOOVOJGkI+jtfMAwG -CCqGSM49BAMCBQADRwAwRAIgQURH8DHWFHVK38+znWc85G1P+g4ocdkA5Gt0LbOg -SJMCIBsacOLFywxZYF8atizw6zMRw+QeHR2514JIhJUck2kd ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert91.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert91.crt deleted file mode 100644 index 6d4605a7ca..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert91.crt +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBqTCCAUygAwIBAgIBWzAMBggqhkjOPQQDAgUAMDExDzANBgNVBAMTBlJvb3Qg -OTERMA8GA1UEChMIbWJlZCBUTFMxCzAJBgNVBAYTAlVLMB4XDTAxMDEwMTAwMDAw -MFoXDTMwMTIzMTIzNTk1OVowMTEPMA0GA1UEAxMGUm9vdCA5MREwDwYDVQQKEwht -YmVkIFRMUzELMAkGA1UEBhMCVUswWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATh -D2SmdS6D7cYi2vGMyuCdol/OOUN2di2pS2wfSI/MsY/Z4O9iNHqbXQP6l+hcT5ap -daycs7r6ZPNqmWM7b16go1MwUTAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBRb -zVrcAxddj0i0DEqvTGT8F37bizAfBgNVHSMEGDAWgBRbzVrcAxddj0i0DEqvTGT8 -F37bizAMBggqhkjOPQQDAgUAA0kAMEYCIQDbrSV4ndH0vAR3HqJfBn8NT8zdvMjB -qSJes6Qwa42b2wIhAKyoH0H+b1Svw8pMkvUYF4ElH5Cnn7gxb7Wl3arc0+hQ ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert92.crt b/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert92.crt deleted file mode 100644 index 49b53a5bca..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/dir4/cert92.crt +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBoTCCAUWgAwIBAgIBXDAMBggqhkjOPQQDAgUAMDExDzANBgNVBAMTBlJvb3Qg -OTERMA8GA1UEChMIbWJlZCBUTFMxCzAJBgNVBAYTAlVLMB4XDTAxMDEwMTAwMDAw -MFoXDTMwMTIzMTIzNTk1OVowMDEOMAwGA1UEAxMFRUUgOTIxETAPBgNVBAoTCG1i -ZWQgVExTMQswCQYDVQQGEwJVSzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABC9E -tK1pE8Ei8vgScunyjx50C+qDsQS8D2RhGHC4VkE2yyiFxJA/ynhoeXTKZsHuEWI9 -CfOSvk0RrTWf9nr0pTGjTTBLMAkGA1UdEwQCMAAwHQYDVR0OBBYEFLqsN52tAf1k -XlzxQmdD5qG6Sy6PMB8GA1UdIwQYMBaAFFvNWtwDF12PSLQMSq9MZPwXftuLMAwG -CCqGSM49BAMCBQADSAAwRQIgXlfKqhkhXgK112Eycl+Z5NHM+6aqXE7i9j7IyGfk -ikICIQDBYNGbpSx82XG+IS/h4AWNTa4Hs6rmWvQDWJum7NrzMQ== ------END CERTIFICATE----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_prv.pem deleted file mode 100644 index ebb83a02cb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_prv.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MGgCAQEEHGhJ+X0QZvaZd1ljfH44mUZM7j7HrJcGU6C+B0KgBwYFK4EEACGhPAM6 -AAQWk6KQ9/C1cf4rQdXYSwEydjH0qGD5lfozLAl/VBkrsQ8AET8q/7E8GiTORJFF -calUQK4BSgDL9w== ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_pub.pem deleted file mode 100644 index d2da54a651..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_224_pub.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -ME4wEAYHKoZIzj0CAQYFK4EEACEDOgAEFpOikPfwtXH+K0HV2EsBMnYx9Khg+ZX6 -MywJf1QZK7EPABE/Kv+xPBokzkSRRXGpVECuAUoAy/c= ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_prv.pem deleted file mode 100644 index e42dd4a6c6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_prv.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIEnJqMGMS4hWOMQxzx3xyZQTFgm1gNT9Q6DKsX2y8T7uoAoGCCqGSM49 -AwEHoUQDQgAEd3Jlb4FLOZJ51eHxeB+sbwmaPFyhsONTUYNLCLZeC1clkM2vj3aT -YbzzSs/BHl4HToQmvd4Evm5lOUVElhfeRQ== ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_pub.pem deleted file mode 100644 index 701da02fc6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_256_pub.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEd3Jlb4FLOZJ51eHxeB+sbwmaPFyh -sONTUYNLCLZeC1clkM2vj3aTYbzzSs/BHl4HToQmvd4Evm5lOUVElhfeRQ== ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_prv.pem deleted file mode 100644 index 7890759b42..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_prv.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIGkAgEBBDA/XY2b4oC1aWzFzJ+Uz4r35rYd1lkrKrKzpMYHRQQX7DJ9zcrtfBAF -PXGaBXTwp2qgBwYFK4EEACKhZANiAATZxmK1C6KcpHmQRQ4EOur08MabFWdtES9i -KnHJMFmvmZaRxWgNK0TREVedsS9KQTou1cRfz7Z7W2PgC5Hr5Z0JprGsLAxCgqoS -MX7VkU+Zm8SIuxMug0LMNvLKXjN5x0c= ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_pub.pem deleted file mode 100644 index de95382e44..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_384_pub.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PUBLIC KEY----- -MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2cZitQuinKR5kEUOBDrq9PDGmxVnbREv -YipxyTBZr5mWkcVoDStE0RFXnbEvSkE6LtXEX8+2e1tj4AuR6+WdCaaxrCwMQoKq -EjF+1ZFPmZvEiLsTLoNCzDbyyl4zecdH ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_prv.pem deleted file mode 100644 index 144bb44b74..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_prv.pem +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIHcAgEBBEIBsbatB7t55zINpZhg6ijgVShPYFjyed5mbgbUNdKve9oo2Z+ke33Q -lj4WsAcweO6LijjZZqWC9G0Z/5XfOtloWq6gBwYFK4EEACOhgYkDgYYABAAd4ULV -T2nrA47kt6+dPKB3Nv2c9xnrNU1ph57n88E2+w+/nwj4a+X6Eo7BoFHT5sZD6Fra -j/rPNmPCYL0shEtvVgDO6OSKnmXQnK3YnyNd7gXzuKZGvnFfH2fVtDTg/yOh/Afv -d0AZPkDu/287zf12WqkVUDNST+TyBfVETiksTC9qwQ== ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_pub.pem deleted file mode 100644 index 26bc5c51d8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_521_pub.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAHeFC1U9p6wOO5LevnTygdzb9nPcZ -6zVNaYee5/PBNvsPv58I+Gvl+hKOwaBR0+bGQ+ha2o/6zzZjwmC9LIRLb1YAzujk -ip5l0Jyt2J8jXe4F87imRr5xXx9n1bQ04P8jofwH73dAGT5A7v9vO839dlqpFVAz -Uk/k8gX1RE4pLEwvasE= ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_prv.pem deleted file mode 100644 index 9d6a867cc8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_prv.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHgCAQEEICFh1vLbdlJvpiwW81aoDwHzL3dnhLNqqZeZqLdmIID/oAsGCSskAwMC -CAEBB6FEA0IABHaMjK5KvKYwbbDtgbDEpiFcN4Bm7G1hbBRuE/HH34CblqtpEcJ9 -igIznwkmhA5VI209HvviZp0JDkxMZg+tqR0= ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_pub.pem deleted file mode 100644 index f738623d8e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp256_pub.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MFowFAYHKoZIzj0CAQYJKyQDAwIIAQEHA0IABHaMjK5KvKYwbbDtgbDEpiFcN4Bm -7G1hbBRuE/HH34CblqtpEcJ9igIznwkmhA5VI209HvviZp0JDkxMZg+tqR0= ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_prv.pem deleted file mode 100644 index 34e82db7a5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_prv.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIGoAgEBBDA92S51DZDX05/BiFzYrRLqlEHyK5M0tNllICrbFEjOJMWAioXdmvwi -mvCjEk91W8ugCwYJKyQDAwIIAQELoWQDYgAEcZ+dCTpifg01A4XGYc6/AMYZI1Zv -6QBqMQevHYcbxrtomF/XIuoyvjFvjng7fNGVd4X2bPwMsZXdXJmo56uqhIVTpYTf -0rSOdtRF/gDdi+WQlth31GltI7S8jbFHJOZq ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_pub.pem deleted file mode 100644 index eb202e2140..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp384_pub.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PUBLIC KEY----- -MHowFAYHKoZIzj0CAQYJKyQDAwIIAQELA2IABHGfnQk6Yn4NNQOFxmHOvwDGGSNW -b+kAajEHrx2HG8a7aJhf1yLqMr4xb454O3zRlXeF9mz8DLGV3VyZqOerqoSFU6WE -39K0jnbURf4A3YvlkJbYd9RpbSO0vI2xRyTmag== ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_prv.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_prv.pem deleted file mode 100644 index a30c622dbb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_prv.pem +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIHaAgEBBEA3LJd49p9ybLyj9KJo8WtNYX0QKA15pqApzVGHn+EBKTTf5TlUVTN9 -9pBtx9bS7qTbsgZcAij3Oz7XFkgOfXHSoAsGCSskAwMCCAEBDaGBhQOBggAEOLfs -krYcXGx/vCik7HWdSPzU4uN03v1cSWilTb73UQ5ReIb7/DjqOapSk1nXCnFWw108 -usfOd2vbJR3WS85xI0Qk7nBJ7tBy8NvE15mW4XXVV+JjdjrpcJXAgec+fbLjitw9 -TJoEh7Ht6HbcH8phyQLpodhyK4YSko8YokhFWRo= ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_pub.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_pub.pem deleted file mode 100644 index ff5d07296a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_bp512_pub.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGbMBQGByqGSM49AgEGCSskAwMCCAEBDQOBggAEOLfskrYcXGx/vCik7HWdSPzU -4uN03v1cSWilTb73UQ5ReIb7/DjqOapSk1nXCnFWw108usfOd2vbJR3WS85xI0Qk -7nBJ7tBy8NvE15mW4XXVV+JjdjrpcJXAgec+fbLjitw9TJoEh7Ht6HbcH8phyQLp -odhyK4YSko8YokhFWRo= ------END PUBLIC KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.noopt.der b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.noopt.der deleted file mode 100644 index fde16a17a7551d655f8cb0e66febe4809a664845..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67 zcmXqTWMX765N2c7YV$Z}%f!gW0cJ2Wva_fgs4_7!vM9Vh?a{s>m+gy*#G)C0*3J3b V_^STXASoBE`EGX z(BSW}ler5`n2i`%0!#PYH&|Tod2aCJXF^3CHyG2me%Z3U>{!Y7W1mB|Us7Syk?*IS* diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pem deleted file mode 100644 index dbeab7c2f7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PRIVATE KEY----- -MG8CAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQEEVTBTAgEBBBgzjoaogeI49Um9bwVT -SUtz49YRMP3GyW2hNAMyAARRdbzfMKNw851Tk+YScojYAWe19LS3dsZ098bzVLfS -JAYsH2hUtaevD+V46vJY8Cc= ------END PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.der b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.der deleted file mode 100644 index db0b5bdcc1e5968d6039da050329a4655450b70a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Bip+fsrsA1_~;MNQUQ00s;sC1aY=dO>V08rMojg zy}s5dmLWj|5RT&{O7fC_@-7`5hng0Hy)*?UdFgBfZG5)PKx%-7VT?&&PwBBo+X18@ zrJ}BIdWXNmQ-TDdU9Z9JVAxdA^WrGnj&B`sf=1PHrop=H2wm8ZhmEI@J1;(tx}>Oc CK0xLG diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.pem deleted file mode 100644 index 7413d1ea94..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.pk8.pw.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIGRMBwGCiqGSIb3DQEMAQEwDgQIIrlmCCSpJzcCAggABHGm2LyJ60ojfilRRp8h -Xf+sWL3lJq6wlj4Nk41SHVnZ2RiVtP5NVK908/WxnXkridd6Qpjnq/14woWVmQxT -IzhKFVi22YmQyBsNj+bEGDAE4c9qaby8u6zbzs7Qj29F90f/PiYsaIEGcNn/W88e -XarNDw== ------END ENCRYPTED PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.der b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.der deleted file mode 100644 index fe336b71055afccfda17798c806c7b94a5cabbea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmV-n0G|IaUjhLE1Q;`phNyw!IQ2=rZv|6HOLODa5itG6$!(wt1_&yKNX|V20Rf>j z12O;vQFXlEFr#quol}$M5^{*x0cW-Jw6}J~boa*dRJYP31}quXE DZeJ@@ diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pem deleted file mode 100644 index a8a7990fd5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MF8CAQEEGDOOhqiB4jj1Sb1vBVNJS3Pj1hEw/cbJbaAKBggqhkjOPQMBAaE0AzIA -BFF1vN8wo3DznVOT5hJyiNgBZ7X0tLd2xnT3xvNUt9IkBiwfaFS1p68P5Xjq8ljw -Jw== ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pw.pem b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pw.pem deleted file mode 100644 index 62a0860bd1..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.sec1.pw.pem +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-CBC,AA94892A169FA426 - -gSkFuUENNke5MvkWHc11/w1NQWBxaIxGT+d5oRcqs44D3tltVOwtdnYexoD9uSIL -wMFFRLL6I5ii1Naa38nPOMaa7kLU2J3jY8SeIH1rQ43X6tlpv9WFGqDn/m6X7oKo -RMMfGdicPZg= ------END EC PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.specdom.der b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_prv.specdom.der deleted file mode 100644 index a80a2e3ca8f64dde6b51eb5fb2175a980fe41aa5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 214 zcmXqLyv)SN$fD4659*bng;n5O;PweHTd^&ShX_g{+ZxnSn#2(*5o3bPUe)3S380p3^o e^9o-rDsL%>UJ~wRzj?dci$+r}&h^@@Tz>%m9&f1t diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_pub.der b/build/premake/premake5/contrib/mbedtls/tests/data_files/ec_pub.der deleted file mode 100644 index 74c5951f60c2c13c29369f85c95958c4af70dc3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 75 zcmXr;G!SNE*J|@PXUoLM#sOw9Gcqz8F|h2Ztlhk>p5u+JXSV+q!OhE^;4p#*mj($chDe6@ z4FLxRpn?a8FoFk!0s#Opf(LyD2`Yw2hW8Bt2LUh~1_~;MNQUSG)6eKb-*e(h`Xt>$Zy zUeW4x+>(b#T9UqeX!q#h95Vz-+_~Y?{$VrV?OD1a6zV~ z&c6NHRA@=(k=lmDOSvEGD0z4VkW`xH`hv{zIGo{^*df_^l1=Xo}FwR>2-mi3*L~#d*xBm|vh}L-du%`_c zNsRPYaX7h8G&ouPl@<#o!e%H5EJFn>;zClz%F;UL$ojg8A%O)U_5)rcmn;9JL`DiY zKJ6D~J?gox)!aPNb>f-aKfQ0KZ*WXy=IXugXYe0jWzoBr zNm%uI5?7D!H;Vt!K}T4ue=GXo^sZ{o4V^f+k+U zyv{<6Rj~BfWONJ6jF||#c$4A2Sk5%zf{KZt%@8GyzymflteKd)22l5TZ2dZGP)@@P z5Lc{FrJ*W9tqLgbkVl9j)6uHI$$WWzj=v4VFq`oY+yK}}b&ly`$;o~14t`Iev&CMN zZ(-Aw6$HV-B#4kP9!9Wa#xh~1cT4_qpoE{2o+}(291qYRZhM6NutQ8>uB!vLh7tOq ze%RYlM9D__Bh)EWLp^;tcfCb1JL~%*&R^0*=ri2armph1Am=^b8x>p;eB~2#R#s=0 z3Fw=jK(~t}8{5rZnM5MUVaWTewTkmgS4y+16}l!d!tS3^oHks47npEErV|CXpr@08!C?{Q zO}lC!8Cp^cZy&Bz_4v&XfxgLq(0`fPRF^`_&1jWxB39kh#FRlC*9U4GC@?Pilt_Vr z%&-0U*yuQt4DjxRH9X1ASh{wY6wAHR7g0689}_0QJ1uCr+}3us+zGhL+cY44DH|(M z(aYRwbr*ZDA8^Y?-P)abm|pb4x2SD$NoXWQ*Kets#m&R;v?%0k!_>s>aL{g^kO;~C zCvS0e*tJ5m7ye0EKu2#HZDcOfC-H@tHG|T}+{55yyok+KvN!C2I`ZVQrL}|$?vmSNgi0VGSavd!b_wa;x5K$lR zM0#eJK(E9+2g}mBqBuZ~oCPJx!F~6Ny+45;dC79PNF;290b}H3sxLHKHqb?S@30^H z>KddDc(h4V@ZUE}KX?V60rhfaGUvD=%^y|cxkC&^T1Yr55IlFp&?lw2rW0T2ZQEy+ z_;~}8@}fZ2RJ{qo14`G${gV^-c9A#b-5fNZN}4obxh&4w5Zc~n@{D{PIL1HT-}dyk zE0#N26>K={3)2HJ+W9#qSM700`UY_GjM{#3IGfoCl=yDqK1k3r;Vi8u z$t!5I@CFu>)Exv?V3H4s50zG%Ak2w^Kc&%QqzmY2Ko>Kyvlc4 zV)`41$(sTuzV+~&LNQUdh5Bo=7)G>8nT?um=P#aV&cYl{rA1eNkkK9v1`77 zzSVxq<0HiP-i73-g8)~-L@Ib6i73=Be(8oX#)!WkymR@nigIwl z29oC!|5)Rx7CqL{VHs>Egx11!9vk9{S`ML&k@iyXYjGlINW7W^Oca+isLok zuq+X4N)0R&ty*GB=8-E-+}h(g;y$&iTBy)2ozkZkg9N8`%TT+*U6LOsr_}hAMI=jm z6@j>~TAIT#{%u^UHIL6d#g95ZHV?2-1HZ$E54L2jH>FUDQ8EO&Dh0;XkIgQbpO~jL zse2-)Ydg?lknr+j&hLCLy}VBY@}IkNm?4J8$y}A(4R6Pr-W4(RD`6hnQSq-sn@!Fi z;O;X5M`MTNNCyReILNa8?iO-22bg?CVfKsTta^Bf3T*#4c9W;B?cR2>x&~yGa%lNDkf%OiQL^xVwkEMqSHUEDI+R&hJU`0Ypzb- z(0oZ&qQJ2ZsV@TB$&e^b@bkxp<#87U7y|(ON3=J(xa?351^+MOW`3+#0Pa3{-dQ`I zHkb0@*J#(Bllr*nC(s+;W*1M@U~67yL>o@wp}EOzySR8@aCg?K(3uz0V+tIwD6LXj zKSczM3PV^7iHZdQICIzQE$ z{8;cwl5|tvs-&`O;&t#5|4n@!h6+8E@gyvA7OUk!Xj2^>8|0q5^d^icEtyS%&$<(g z>8BhHgTo{vK?iVB}!|vM{k`_&c^v=%V3hOyea^}#ZydeAmy{SLl7*j->^Hyt z4Y<^d9pxC^+E*iBLq7_MAf@-^S9fBP6V;$nWahZ28jN%=mhtGV3(L>OTwidaA`fl=AnL?RRng%5t* z1j$A9?RazXuEA59G=V7M zSrU`1v%)5P1TZl$AutIB1uG5%0vZJX1Qb$?xAdc;PI%Fxc{oiXnYZd80XYN+Nj0L( Lu!EV#0s;sC_v&0} diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/format_rsa.key b/build/premake/premake5/contrib/mbedtls/tests/data_files/format_rsa.key deleted file mode 100644 index 0c8cb57c6a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/format_rsa.key +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQDA0UszjREl+JklUyevaN8fb0Gp13Dzb4pY3MCoJK15BWoeoUFA -IVvuI0C8bRm/i1OO4BN9tSRrRjW+S89YbYy1C73PUgKZSejjnEFA4chcSOKOhZlM -6K7+Pcrcx+sdiDu1DheODMiSFhoxt+H6IUvBEGkI5AWFu5MDP7wlU/AZfQIDAQAB -AoGAU6o9HEhIuZYuNZDodmdl8YjgECdIfojWmgpnmk4X65xa2KGV45LWBfXMADbC -5mc5QZSfQHuaKuYTKdhRRwh59c9VPwYhN8hdgFzbJS9KfJTDuKhsZrdomHRN2fHK -Jn5MrbVCeZPbYS0M1PzVgEz/BGRp4Ik3RAxTlt+XBtunHA0CQQDz6Gor3gFTdCWM -XtrWEfMW+arWvPUBlOhw3U0YgpWqdea36YeXd9DEIIKn9bQU4g0SjkpO7jd/ccBm -zM89dfjXAkEAymB11gLDd0JZhUCk155uBucaZeez/VNucEgvjWDphRInqJg+2JW2 -gSgXNFeSTY9iKlLdBL1zYdywOXM3fd6RywJAIqFYGbxeodO21RROq+BGjHeMWwrf -Godi7Utue9FmoJo21NvyZX4chQw8oM5Q8DocMwtC36wQ8yZac/4WWpqaZwJAbMIy -EXUivrC1k1sOO6I01xjTovhGTlnL/COPCpeOZ6k+DujivVqX3glBjyuQwIXR55To -mmeF3o3PVtCIfehiyQJATsyRPJ1FOYIlIywMSaGHqSpVoebWbDQ6BhYOOvmx5/Zd -Tun1+7WrtPoxM+LQumgPEdx7VDq2L4SetYB/Md1OSQ== ------END RSA PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_1 b/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_1 deleted file mode 100644 index 681fad248fe41bd2a40bab1ebf35cb338c27d690..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5120 zcmV+b6#wf?GWlN@9c7EgYk-wdqKTGXdjc54Ru`$FYzCy#(9E}onS>s{LyLzaDX2iY z^6rmF9|gWj{Q%PcwUdC38kvc4ZR?nRMf8O{I9BH|EL3#ir?STx~8oG#PWAnU-E$4q>3LBJxJ=84c*pMUxNN7#pTIgdqIbtAYD|QI|uv$m17}-LtP>M3|AXPTXUG7Y{`` zC&!q^5ZT&_{-^QYop49J)=fAYrHSt#?%h^`|MYZ@*4Fs&9Twv(?oSxkudKCnx>BqT0hkH0F7<-R%$R7n&z#zVI^-$MF?1y)49j<*SF6 z$9=`zo`2&`w|oqB!vSV&nsUBhu*Lij7=E5){s2+lya%gfSI1dwi^4zF3lxySK@)0W z8GE}Q^0lxbd6t>gs`q%SH)#r5yFf@OISbrD_$j*@E&0724GhzoMasL|Ft5g$8JJjo zH^i8^!8B8w-!;MollP?t%n-RW7ThM^ZT_uMAp3xxOCKcW35YkJ+}Cc@x9xT^%q4Fi zZy-@jj9PjSeGm4&cq`)*WPIK(XU>lp8x@Ku;U^#kRCK(4`9CJR{s7wHE|>2lT`!;+JmRgw>$Qd;0zZO-7Bvzuqb0 zP}wC(O5cN+=*@h$XV*Zf{EG?JA&p=BC6gP?%RW%|RM3u(4I`}c8R2qE_gjRzyCg`= z0~Gyoo8A}W@4X0BzL9F$qkryem?PD%4+8#Gbi(G#SbU&ngC88smic|yMq()h0MjT*`FG zfpe|iej}pZa;rP}8VK^qrwJF;N$0Th1%2cZ#Leg{GEfvT0Vs*HZ&}7ZAcxky$JN+| zYI1=E8M#71&Mq!Q@zjAajrZI0Hd#DPF7#)DcOAy}V4F{jb@~R#L?g`e&rrkgn?`!w z*U+5l;HbzlIOf2o$2NaO890oXv1Up%vbCo1X%tdBNLl%wwqgs%SM5*Jkt}hH0E#Y1 zG8?#~*K-A=xn5x|Pc~Z5q#%F~Aho2o+7z@h$4Ot(BuggPb!^X=lw^q+qgk^H`B@2VS0Kpc1~r6m9MlVlyWS*iWU>R#GTCUE&d#8)O-r8<@>T$)?`pgYUG$^aWAxA1R5OXKi*E)Gke59 z*(4+r=@DK4xUWNJ$(PuMcMF*4l@t9n^T-Bl+-=fG)Kg;ER%`3#j zeNT0tbGY-dyZp6R3)@hXm8}*dr|Fn@EMiy~rG=#kyh-}NOfwa%7Dm5ZTlp~IGzwu2 zA>7+amn#dyMKFa-fksu!0yoKR$hS_kvEXw_TxxxfxJj%vB*lz5M`U+~qCy}G2;8P4 z7*w8(_fpNhd2in9k~lh7qvpGm#F&I;FFmn&coNx}S5E|K3mbSrvhpq5(>am3{Thj8 zB~x-=>#u^dw%N0olD9>4ww1 zpfR?SO5Hhua!qR7PP8?Fh#NW1KxS%t>sbz!0euho)ZlAFy8yolCzcJDyZ<>_mN zh?a$JI|wFfOC~~(#yy+IYxnhDzX}o`<_$Io<0PPnXn4}nc%;L1YKGx=RzIPoP3w5} z)|~$DCm1sFBhLZNGWbD;hOnPPzBRLI5_4^pEq%A zs=$t=fUtETS+jqn-!ziw#6hWtLSV<&01vLX$g0ketpy;Li$p7#&nkf;7);E2nVfLQ zNHBW=F){ifm0UMY$wTAX&)vBpbog(w$LDehq2sdioBdU|#P(f8s$Ep!SM)euU773` zxx~RQljEsh>gjh$bpQZY;J0jZZzhIZ?DOvOa$S5n%}MDMn?0}%bc+g`p^^o;tNyES zq}xCxvzXhCe?e%B6oD~%A{7JINY3)QYy8R(5~|)YfS=?c<2)UTf)hN24>_FF=8s8S zCuzv)?SD3jI4x&6LJnm4$6_b&lV||TYML}prX&0rP7k&mStL>-xjCrkx(*v&@>WZ~az1wUvsck&7*r?lbHH3wx$J}as9t<YUS6O(}6d# z_u%%JFRMbCi78qHg`+{!g^Wecq@O*v^q3%WmLO$yzDyrPTDWC<0Cv?@#tCdTCQzCg z*@}%(RxXw7JY%$prjZ=>3>~F>U!D$*3q=gXqOGcz$ue$q8v)n?5jlIG-@t2U7cf}n zP-KgI1?s)EYYfhTsD+phPX0Regvu$OA6a_ z77o8x^OgzHcV={^H#nr^&=VHo@Ye1f?Oz_;Cj4f;h#f1tCU978F>YPd$`_Av;K@1neDk z26mGLE;AB>lfG12UWHwXth3%Ss0FrV@?^6b;Ss@S7726xV#`Ba_)JRYImmm3x_H}W z%r8xP>e7kiJZTQ8Ur#mH>}rg$Ok`R9TtfwMDP3gsgMuJzfs`&u#}iijoccIKuXLoU z&|_B{P#XH3okE==;g7ohF2_I2yB!eOiXMLChC$c5+c89SPeL1WRKW=n7+bXLT^&qM3gYXQ@A!q3=ouA^izJYs&Jp7a6e-90SSE;SRf&kc} z>u@TySxf<8=}Xm)BC-)2a7fx_4gS0r4}W3v3Vhj;k;b&1=`^zJEx^7=?mIxi={U~$ zIGv%>1qgt1zba6od&ng20Mxjj=yHa(Q)FLdxP+cE3~qyMseTZ4YP4)RVVo}QpCPb} z0Qyfhr>V@!I$LueH^;E?XGKky-0w1RsXNu%qcXF+1M*qF+S5}6DN!qejWtc-WbwS z4L1_FbZIHGW3g||l7yw*-ty@1841vWXWzk`mqd5<+OanFU_E!oH=9XJP^I=+74ZZu+gY7c0X^R=iD z3pIDvW^{b5Auo-w=OoPBQpB^@Bu|+DL?q(xT|-Sp@Wkj8mFTiVlv~!{+zLk<`iA7f0u?64pid^00Mo(>k`4BiFWlZ)y1p!Fi{naA^#VV*xIR9 z9s49Wf7hMC3RV17o7HjI5h3jAqbptXsn@p*H(J{NW=hHLMI7eAfA(HVx^hD=63buT zZ<%x`jE4|g(U?#I312+Ne|SkEfqJgOB2J!IZ`->}R5jI}cJBDLWAc8AjoB10Y6vaC zgf_-Z4YKX25VO{3vuEtld<3IbK|7y%VA(ksD$T?dpUk`|9#TQ5n8)GkO9jpfO3L#n zU!az1Xry`w{qY4Vg%{^8q5FfoY?Lal_@lAwF}eNmFyCamH5YQ{oUz=O1EJKF`SYUqg0rToIk1F?FD3Sc*IhgP<8uM_l+NCn9#bxf9j;MA^oei zJxprS4+^T@q!X0M&uO>Lh!y;HsYu9}iVr>rZQ@@;;8|3lE(q)tgMh9d@on%^(~P$5 z(~F+Kz)8}TOgity;{bT!D*;-g9*mY;l9DcJLGONab|RRmcP)QSf-Z(K`LUuthz}d>3a@fH3OgFCfU3GKoo{ z;%v6!R!yTPfy-d}%?GcqLdEtU&bm4mCZYTvuNvFt$IT#^d9wr0Gp&tWJ|APvKVfB@s+md!?CD@Q|4)Adb zK0?9$pDy?ay!^F(RszQSj+)gPQ$;a(@3u!5Z4^Lp^4(mrG5xvyCR-F z8^ZCqjvXU~pM6gbR;&$k5r)G|S@}H(-b{}jA+mPNS;{hW*be@_(iSXw=nH-Fju~O7 zx@6zpc@AU_E}|;xB=N}7>>y(Sx=c-KeSWO7Db z_uXr}nnB|sK%*SNNNpmk)b?Up$q_;n4JqR0HH=*3EJ)L=a!JW`Rg@_x#iHY377CL+ zoGR*$Z!HJS5N=4PQwp#Y4E zFV&*YbUq><2K;@NOHKla=D<4v&l=a6umy|5pZIv)f%^POV4!bcJxihkir|wKUJm$> ir4WYmAv+m;W`z}*XmvB;o*!<%?6TRYLi(#;rGhO^Ru|U* diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_2 b/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_2 deleted file mode 100644 index cc44eaceaa..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_2 +++ /dev/null @@ -1,2 +0,0 @@ -'Ïò|'D„Wך~ÛJ>UN *ÏX˜"ð­QdäÈiÄÿ!qáŽ4‰º£],0Vë¶)o›j©~öŽê¼Ü mÞGwP j$üð© ³N‰ŒÇ4 Ü”‹ÝFâ>5/4¼¡1ÔÖz|-Û h¶*háÃAÃ~ -fʼn™·›Ì0 îÒÁÑ-/àb…2“¸óȵ \ No newline at end of file diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_3 b/build/premake/premake5/contrib/mbedtls/tests/data_files/hash_file_3 deleted file mode 100644 index 58bb0bad41ac235fed6e4781aba716da4c978421..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13 Ucmdlf^K?!5WgBI`Lr$Ol*ibawGg zen~7`U;#En6>sf>)343^;$$m$07tsW~JP}Ye*E!A(aC9Vr`-5S%wc^9IS&OEk=JVowdU(u!NU{gp@rwVRDG++ij zJO0@Ty4L`JS$N%C{BCDw7$B~TFbmHahy3jkXjSLQ2)j|5Da`OzAwjBxQ0UY5T^ylv z(okG3irfr^_4Zg$)>e1++U9Dz%nAGg@TFt=KQBm4sO6PXJCvd=f}d7{`le_EVjq;n z@d1?r*Ix?3m}%;N&U;b&?cR%@Z1*b>=xZ(l0Ug}BM#!x<>Z@LFqK0Obgkk|T@}G`3 z3U`|AgX4E|GZZ``qF=KxIn5$erisgm$HEq$`fD8Y&o@k*F^|LmIgLR;w9w4%GC)jd zQ|U=X4JnYv%5^a3Fw=)_zuqSce5g`r=S36NpKZrz3Sh5Vd+{7lWlbl&mT&oI!TLWta6zm=p&ExgJU?d-sc*UJVJ} zj+-|XBb`WB$R4siNF1Rc0vRn@GPl+Bmv1<( zt9(4cZ^I<;aI`g7LRt%WedT3YuGrr6aLQQv!F75J@6Yit&ZG)9p-t$OZot$8s2GOl zK&=%{h{>>DLu2%%WCb8``3a_g6WvM zQx(9raRuWuOzh{V%u0D_L?Od1e_Do{1g>pKBL48Z2+-F{Q`Lb|2=Ux6d?y@ZFF)KF z_=4xIiSiUzb`wm=o-+B4(^!IM&3<|gH?s_JyAoZehDk~pR`DW-qBeNnNfrB%pm@T> z(Q=F@mQJx0%GsFX)Lox*+~NVv81IQPqgU+xTSzvI$*hooidoMD(Yy$9xA;BuW#_?S4YXAyBusdqer^ARm2REh!@P zg=vMf$}J1HPT3f7tdFwJnZ(dyJ=}eC&(3}^bAQBZ!-H}+NUj3~VB1t4)yY7}L7!B# zvQ2%>wopn}AAuA~c)41|uR`~bxHE2JT~iDxkoN2*+Pk?)plnlJ6qZSK0+v``QM0p~D>{ z6=gF|U^9yjn4`a?3eY_Oz8I-4q2JD}c*9`QVR-Lc;L9x=*}Avjk((@F@r+!Fji8YybcN diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_3des.key b/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_3des.key deleted file mode 100644 index f9c11ade0b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_3des.key +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIE6jAcBgoqhkiG9w0BDAEDMA4ECGhNuQogiktrAgIIAASCBMhfcb+Jt0YOgGni -IWnwmmtYT6Nvina/j3FCGzcHCDyUQDqh1rPUtZnmUdM3fyEGlUJdX9wmHh3gUkWx -JE00QMzYDQsUbGrt8H3rCQ+aXegCicXAyBgDh0YUhO7bWmgJNSvZOduIeCJ81mnb -xtl3CGgaYVOWspr458crtvn1Hlhq0EGs54EUHWBE89PHNxokGHqkFQcdp7QHO9Zm -ZvjTn+kR0K5KQbeQwMf3LcboueDV71ueUZsHlTSZ5Qs7WZORRzMBoo2SWV+Mh7U/ -yAQv4i6CMauVifVqTMbLtfdTyZCts3N57sGstyqIruE1Jwg8m3i+cV/QIh9Fcgo8 -R+snSlbOZMzCpUIvcuVkEMBP8+89/BtIabXL8SoTsD6v/f/YJfcw9qpOH+AoA3JG -UZT+0VxfIk0JUkX8QvM2qMQYY9efX+Dq+N0ODS1vsdP43pKxowOQlQUPKOsqoDch -IXW9qDD3uV+clg5L6BqDbX1O98oegcg6L24ZK1yKVzotiTj/eaZVpzTtrNYzWB0+ -qO9FTwLqOmIRcduKKu5zctC7QlpFY3U2ikbkYpPsam/9GSXVe0LuMRLleiMPQUdU -ZJlkZr221OGq5TVhyJ6zEwud26wExB16tLU26ZvEFwExoUPboH/UQwX8L9vd8BKp -a32u35n5MOn+54Rfa4qfpU+uLB056CCKL8PwVLN9Xzeg+gJLfWqwEalPmSsylakO -7+suOGaUKy1a/uszD97dKk3Abwfoyb0qvbdF131GR04NYIzkQl72CBlxuWqVUt9o -pmwsUDAzwoJWi0sKy0dTm3KZHLJ+3OMIydod3beS9uS6Yro6NJBN5EPw3PoByBF5 -DUkOfW6tV0dlHyXOuwU+JzBd4iwJgO53GVPAap8a/eOGgNCiw72gYM4lcHnwShL0 -/v969VqntPXb7YF1hMs6ef3zTmLEB4xaXcARynnNkZnpQppxSPeHeXU+KxZCjkLE -brzHFnUMr8UJOyra3C/iXfi/OKJcBIURc3oY29Q45GBcV0s/W3n8TVF4qEqtbv3c -NbEmgcdzLGA28XiuyUH+pLxK3qP54jlqhd22q5qoN/gz4MKG+hJMMcO00Hj7+4Fb -fnxxGE5far3zjHLaxfnRKIfseU9DrQVh6gTg8ibe0kdoUXrptIb51eRcukE7s/yc -01Play8GYik4x+kcNAmQT29EslB/3RcrWH3tZExJjjDaC+Ty2atCMmlLGxt7VHOa -C3k0QHYSE/TULBldB64S1vVFrZgzLFTlXKGm38mOGCG3t/lQQDTo3IAp0YE+atM3 -VG6ON3SSU0QRP1aEkZY8t9rf3+/J8Nl8oF4kF9ISzLNhlR/KJlNkmDvG/ic0skJK -KYezuuYH8/eEr9ZFfBsb9mRsFCM9iBZl/XqebCCC5/kfXzL/Hpp4f0L7DH4C0f6L -LbMCFhvsCNGh+1pdIjN9hbAkv/r2NN8+MaY2xFk0ukLfKgpLp0EfpkkcM0EZcvFn -j1JpB7rshCLj4PzM77fLh99H4cffL2qyzXqFF2Y7iW28bW/RQFxYwpyEnowrcRH/ -11Qi525SdKWRkb9QlTJqFI6wsWe5kmYO/kDqGUpGPGK8+XTRTFjTci7NPLqN+s0w -Z4/b5SMVucBKq9sUm6g= ------END ENCRYPTED PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_rc4_128.key b/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_rc4_128.key deleted file mode 100644 index d475ef4814..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbe_sha1_rc4_128.key +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIE4zAcBgoqhkiG9w0BDAEBMA4ECCLhzdwnOXIZAgIIAASCBMG8Wgfn++CFRl37 -FdQZ90pI+u37yj8v0kFd3rDaDMurEftf10gWwTbm8R8J0eK1edIAHQabkgsF83gD -yrxKFp1zhHI1t65gPKHcirhx0t9XuClxAOzEme//iMaw/yf/IKYo9NRqyvA6BKHW -2h3J4+JSGLSaCsRUyzhoL6xOzF+VX8zE8PI11TcqfJe7TGs/9G0Pv2XxFpfrG7pz -nz5mkAYdckYHcu7+CQGJ09ZUkblV3MYKEEbq5xXEo4Kku/n1YNrh6BEWMLo5XgOU -YIAkzhSfnbTt6QrxM+90b4qwk5amrC4w1jUu73ZzaBQs7fhx01pR2y3zTPBD2Dpk -G3iLprgEFqsoGCCOqqqEiEF/xDREZEPW0es2RruQ9Tn14LbgTj5XVFI/wBcvp9uZ -pjS5chC0/CRbGcRi47A9vx9bjgwiGCDpxx0/Kn68uFCaCeGOAQ687XxAn1UHmBD3 -esjjb7S16ld9rSKV0oXWugUZKFdoq87AHY8Njhin++biuAEfySu3iH5ajzZV9dEj -6JHVwotuL2diVu7NU8mIsfr1kCJoUxIAbWFvoglWNmTtaIBkc5ch+kUTsz9rDtSp -lL9fT+wzjN7Q7lyRfIhNOheg2xF9huwF6mqnSlDfvwvEJ8NsQI9+CeooI2c1Zc0a -Bh/vDvCzov8TE+1Ma8CnrbaM/aSZ0FIq6PcpWSBLXSDXbLwabEEOLoXQXogOZsc5 -0sz71l5c8jJPlzXxFYYW8CNuxTsUP+hN2oWvbmL5YLq8P+1tw68jcdbqhTqoqrW1 -pGEXd2iMRUfCTDuCM6Bn4iIN80qUqqBAuoTC+zCVHnI7+ygmovhf/ykfVzNaDSIW -BkDsmZoH6bq3F9HpvOWggh0yK/l1b1E4PDQ6hq7qWNyJMyjYBJEbEdd9O3GW2qev -3ARhb0yGulxYH/h3yp2mIfxL+UTfRMcUZD2SobL+phLR/9TMUi6IaHnBAF85snAb -rbtAKCp9myFLwG1BujaQ18fKQFgcMjbJY3gLIz+3AC72irLSdgGti2drjP2hDGKp -RITAEydZXIwf67JMKkvyuknVWMf9ri9tMOZEvohnU3bW4g9vkv89CUtCLWF8iejM -fKIP5hjHOcKRLvvACFbgjYCPt8iPCcQckYe+FZI5T7zYsyQQ47fygS1f7MWZblPJ -UKAm8jxWUyySvEzIMHkoZaHtC72OS/L3iCjJ7mkKSZKeCDAzSEJeeQcOl0klVCQ8 -0P+mXq5wtGakW9MKLhmsOjUIsyN2f3gCO0nESYhWD+3EKFLSW7ZsHbDmwqSDh6bn -blFvlQd7cpfYFtlmbxZFcv/l2ijQWPHi93G/0VIhFHxI6LegKt00bIL5iwyF3NpW -dNzuE69hweTSKvOPqRsRnWyGv9dVLIaQPwUS+eEfsGGNzM9rbty0j5Bw6KY/uDgt -blTfN3yZBcyEsdPwyiVLdi65zMzN8g4VVQBHFhXWPa2N4gJQVq+6q9hQkgFFU7y3 -f8MX4BrKq8ifwWxsjL2FawcAoDcHUdCZjt/HZ+9/rL3iQvKeHbDbqu4kxlrE1FJn -0LHIB21qZIo+6r3fdNMUFkuDRBT9eEh3Wxlg8G35FYCIiOuIwB2ED/Hdnqtnemxj -kjRXU176HQ== ------END ENCRYPTED PRIVATE KEY----- diff --git a/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbes2_pbkdf2_3des.der b/build/premake/premake5/contrib/mbedtls/tests/data_files/pkcs8_pbes2_pbkdf2_3des.der deleted file mode 100644 index 75c573443b45403476840b15f8f4e54128963415..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1298 zcmV+t1?~DUf&~sRKn4jahDe6@4FLrWFf%Y41_>&LNQU&4g?7QqA4Emnk#<- z0tf&w6b1+?hDe6@4Fd-R2+vfK<9z#(w*-O&$eSfk@eG>q0KM;tdSZ>r;gc)Wm&R#o zrG*kd$_eL4_CjE^q{M#`l>NnSl_@ORXe$&OK&>(qF43ac0^+o%1YuuYgS6a}Y63r3 zrHN(Tm3Zv1yug22NTT6+VFJv#+E)egQ4m3#Fo8By2I7^tNTHWI=8&G08KhIq*lnJ{ zxzB0wcEC_L473s^&Hr&wb&=Qtih2}D5ulIjnk;Jdg9B#=UYc`25r4g;m4i%O#r>PZ zb_3!@J?LZ8^vIoLPbkoEV#OIk}&K+F6)PufaOIn!NxjD2@L=f&M{(k)i>-j zVzeQh?h|=(FU((_qyUdV;I&d7?9WXn|w7v;U)Yb{$IVa@Cm{2oJtFW(-KC?pC zg+mQLdej;ziDV#&U>k{*&EiE7jw=xwinLw?wwAJ}V?=AsBJ)QzlIT>au>*Ew^U1>1 zvo`GC*F)M+kxAzbiuR5g!FFpMU2%wdRdBw+4WzMpi41k5Tcrd0fI{sP$kv4VI3;E4 z?-I4&+89RTbfQ%0RgCNG7pbpe#1tF7nzH%%v^(>5w$|d5`9vH<$bEp>nOYGttTjB*sV!rbcZLeBX6oh@;HZ%P zmVK;6Bg3>Ma@JE}zJbi0mkPNI-G?z2zMh-Lx)AbH(nb37x~-;ZGM5C;>ZIfMqTTRd zF$2%HFIMMJCm67@d{k-O_a$+7=HH4C{TW7d6}04=OD68u!6QP_NRslQW#|FqUINMl%p$_IFCf^+`1+3WgUvSKM>~gFBYJF zu<8~4#67vv$VQWBSlMohWp%fWY$z-iClY$>wPGjOL+iw=G6}*U3Uyb0*49zl4pd|W z_|@xJR9u5c|#L8L&w}$8{+7@TM`H%(@K&h%}k(*cO|{&OE+;9lqhJ0pN9p zB7Yb8m-^3SUOwZ*wLr+8_{!hpB_|dBAR|;~a=u|Bl=T?nptC`}eaL;jZ?*NkC zi@?%|Qc;7r?j4&YBN|?(rWE+&NDa9}8mf#n$A&2 - exit 1 -fi - -CONFIG_H='include/mbedtls/config.h' -CONFIG_BAK="$CONFIG_H.bak" - -MEMORY=0 - -while [ $# -gt 0 ]; do - case "$1" in - -m*) - MEMORY=${1#-m} - ;; - *) - echo "Unknown argument: '$1'" >&2 - echo "Use the source, Luke!" >&2 - exit 1 - ;; - esac - shift -done - -# remove built files as well as the cmake cache/config -cleanup() -{ - make clean - - find . -name yotta -prune -o -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+ - rm -f include/Makefile include/mbedtls/Makefile programs/*/Makefile - git update-index --no-skip-worktree Makefile library/Makefile programs/Makefile tests/Makefile - git checkout -- Makefile library/Makefile programs/Makefile tests/Makefile - - if [ -f "$CONFIG_BAK" ]; then - mv "$CONFIG_BAK" "$CONFIG_H" - fi -} - -trap cleanup INT TERM HUP - -msg() -{ - echo "" - echo "******************************************************************" - echo "* $1 " - printf "* "; date - echo "******************************************************************" -} - -# The test ordering tries to optimize for the following criteria: -# 1. Catch possible problems early, by running first tests that run quickly -# and/or are more likely to fail than others (eg I use Clang most of the -# time, so start with a GCC build). -# 2. Minimize total running time, by avoiding useless rebuilds -# -# Indicative running times are given for reference. - -msg "test: recursion.pl" # < 1s -tests/scripts/recursion.pl library/*.c - -msg "test: freshness of generated source files" # < 1s -tests/scripts/check-generated-files.sh - -msg "test: doxygen markup outside doxygen blocks" # < 1s -tests/scripts/check-doxy-blocks.pl - -msg "test/build: declared and exported names" # < 3s -cleanup -tests/scripts/check-names.sh - -msg "build: create and build yotta module" # ~ 30s -cleanup -tests/scripts/yotta-build.sh - -msg "build: cmake, gcc, ASan" # ~ 1 min 50s -cleanup -CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . -make - -msg "test: main suites and selftest (ASan build)" # ~ 50s -make test -programs/test/selftest - -msg "test: ssl-opt.sh (ASan build)" # ~ 1 min -tests/ssl-opt.sh - -msg "test/build: ref-configs (ASan build)" # ~ 6 min 20s -tests/scripts/test-ref-configs.pl - -# Most frequent issues are likely to be caught at this point - -msg "build: with ASan (rebuild after ref-configs)" # ~ 1 min -make - -msg "test: compat.sh (ASan build)" # ~ 6 min -tests/compat.sh - -msg "build: cmake, full config, clang" # ~ 50s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # too slow for tests -CC=clang cmake -D CMAKE_BUILD_TYPE:String=Check . -make - -msg "test: main suites (full config)" # ~ 5s -make test - -msg "test: ssl-opt.sh default (full config)" # ~ 1s -tests/ssl-opt.sh -f Default - -msg "test: compat.sh RC4, DES & NULL (full config)" # ~ 2 min -tests/compat.sh -e '3DES\|DES-CBC3' -f 'NULL\|DES\|RC4\|ARCFOUR' - -msg "test/build: curves.pl (gcc)" # ~ 4 min -cleanup -cmake -D CMAKE_BUILD_TYPE:String=Debug . -tests/scripts/curves.pl - -msg "test/build: key-exchanges (gcc)" # ~ 1 min -cleanup -cmake -D CMAKE_BUILD_TYPE:String=Check . -tests/scripts/key-exchanges.pl - -msg "build: Unix make, -Os (gcc)" # ~ 30s -cleanup -CC=gcc CFLAGS='-Werror -Os' make - -# this is meant to cath missing #define mbedtls_printf etc -# disable fsio to catch some more missing #include -msg "build: full config except platform/fsio, make, gcc" # ~ 30s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_PLATFORM_C -scripts/config.pl unset MBEDTLS_PLATFORM_MEMORY -scripts/config.pl unset MBEDTLS_PLATFORM_PRINTF_ALT -scripts/config.pl unset MBEDTLS_PLATFORM_FPRINTF_ALT -scripts/config.pl unset MBEDTLS_PLATFORM_SNPRINTF_ALT -scripts/config.pl unset MBEDTLS_PLATFORM_EXIT_ALT -scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C -scripts/config.pl unset MBEDTLS_FS_IO -CC=gcc CFLAGS='-Werror -O0' make - -# catch compile bugs in _uninit functions -msg "build: full config with NO_STD_FUNCTION, make, gcc" # ~ 30s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl set MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -CC=gcc CFLAGS='-Werror -O0' make - -msg "build: full config except ssl_srv.c, make, gcc" # ~ 30s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_SSL_SRV_C -CC=gcc CFLAGS='-Werror -O0' make - -msg "build: full config except ssl_cli.c, make, gcc" # ~ 30s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_SSL_CLI_C -CC=gcc CFLAGS='-Werror -O0' make - -msg "build: full config except net.c, make, gcc -std=c99 -pedantic" # ~ 30s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc. -scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux -CC=gcc CFLAGS='-Werror -O0 -std=c99 -pedantic' make lib - -if uname -a | grep -F Linux >/dev/null; then -msg "build/test: make shared" # ~ 40s -cleanup -make SHARED=1 all check -fi - -if uname -a | grep -F x86_64 >/dev/null; then -msg "build: i386, make, gcc" # ~ 30s -cleanup -CC=gcc CFLAGS='-Werror -m32' make -fi # x86_64 - -if which arm-none-eabi-gcc >/dev/null; then -msg "build: arm-none-eabi-gcc, make" # ~ 10s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_NET_C -scripts/config.pl unset MBEDTLS_TIMING_C -scripts/config.pl unset MBEDTLS_FS_IO -# following things are not in the default config -scripts/config.pl unset MBEDTLS_HAVEGE_C # depends on timing.c -scripts/config.pl unset MBEDTLS_THREADING_PTHREAD -scripts/config.pl unset MBEDTLS_THREADING_C -scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # execinfo.h -scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit -CC=arm-none-eabi-gcc AR=arm-none-eabi-ar LD=arm-none-eabi-ld CFLAGS=-Werror make lib -fi # arm-gcc - -if which armcc >/dev/null && armcc --help >/dev/null 2>&1; then -msg "build: armcc, make" -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl full -scripts/config.pl unset MBEDTLS_NET_C -scripts/config.pl unset MBEDTLS_TIMING_C -scripts/config.pl unset MBEDTLS_FS_IO -scripts/config.pl unset MBEDTLS_HAVE_TIME -scripts/config.pl unset MBEDTLS_HAVE_TIME_DATE -# following things are not in the default config -scripts/config.pl unset MBEDTLS_DEPRECATED_WARNING -scripts/config.pl unset MBEDTLS_HAVEGE_C # depends on timing.c -scripts/config.pl unset MBEDTLS_THREADING_PTHREAD -scripts/config.pl unset MBEDTLS_THREADING_C -scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # execinfo.h -scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C # calls exit -CC=armcc WARNING_CFLAGS= make lib 2> armcc.stderr -if [ -s armcc.stderr ]; then - cat armcc.stderr - exit 1; -fi -rm armcc.stderr -fi # armcc - -if which i686-w64-mingw32-gcc >/dev/null; then -msg "build: cross-mingw64, make" # ~ 30s -cleanup -CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS=-Werror WINDOWS_BUILD=1 make -WINDOWS_BUILD=1 make clean -CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS=-Werror WINDOWS_BUILD=1 SHARED=1 make -WINDOWS_BUILD=1 make clean -fi - -# MemSan currently only available on Linux 64 bits -if uname -a | grep 'Linux.*x86_64' >/dev/null; then - -msg "build: MSan (clang)" # ~ 1 min 20s -cleanup -cp "$CONFIG_H" "$CONFIG_BAK" -scripts/config.pl unset MBEDTLS_AESNI_C # memsan doesn't grok asm -CC=clang cmake -D CMAKE_BUILD_TYPE:String=MemSan . -make - -msg "test: main suites (MSan)" # ~ 10s -make test - -msg "test: ssl-opt.sh (MSan)" # ~ 1 min -tests/ssl-opt.sh - -# Optional part(s) - -if [ "$MEMORY" -gt 0 ]; then - msg "test: compat.sh (MSan)" # ~ 6 min 20s - tests/compat.sh -fi - -else # no MemSan - -msg "build: Release (clang)" -cleanup -CC=clang cmake -D CMAKE_BUILD_TYPE:String=Release . -make - -msg "test: main suites valgrind (Release)" -make memcheck - -# Optional part(s) -# Currently broken, programs don't seem to receive signals -# under valgrind on OS X - -if [ "$MEMORY" -gt 0 ]; then - msg "test: ssl-opt.sh --memcheck (Release)" - tests/ssl-opt.sh --memcheck -fi - -if [ "$MEMORY" -gt 1 ]; then - msg "test: compat.sh --memcheck (Release)" - tests/compat.sh --memcheck -fi - -fi # MemSan - -msg "Done, cleaning up" -cleanup - diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/check-doxy-blocks.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/check-doxy-blocks.pl deleted file mode 100644 index abd27a8642..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/check-doxy-blocks.pl +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl - -# Detect comment blocks that are likely meant to be doxygen blocks but aren't. -# -# More precisely, look for normal comment block containing '\'. -# Of course one could use doxygen warnings, eg with: -# sed -e '/EXTRACT/s/YES/NO/' doxygen/mbedtls.doxyfile | doxygen - -# but that would warn about any undocumented item, while our goal is to find -# items that are documented, but not marked as such by mistake. - -use warnings; -use strict; -use File::Basename; - -# C/header files in the following directories will be checked -my @directories = qw(include/mbedtls library doxygen/input); - -# very naive pattern to find directives: -# everything with a backslach except '\0' and backslash at EOL -my $doxy_re = qr/\\(?!0|\n)/; - -sub check_file { - my ($fname) = @_; - open my $fh, '<', $fname or die "Failed to open '$fname': $!\n"; - - # first line of the last normal comment block, - # or 0 if not in a normal comment block - my $block_start = 0; - while (my $line = <$fh>) { - $block_start = $. if $line =~ m/\/\*(?![*!])/; - $block_start = 0 if $line =~ m/\*\//; - if ($block_start and $line =~ m/$doxy_re/) { - print "$fname:$block_start: directive on line $.\n"; - $block_start = 0; # report only one directive per block - } - } - - close $fh; -} - -sub check_dir { - my ($dirname) = @_; - for my $file (<$dirname/*.[ch]>) { - check_file($file); - } -} - -# locate root directory based on invocation name -my $root = dirname($0) . '/..'; -chdir $root or die "Can't chdir to '$root': $!\n"; - -# just do it -for my $dir (@directories) { - check_dir($dir) -} - -__END__ diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/check-generated-files.sh b/build/premake/premake5/contrib/mbedtls/tests/scripts/check-generated-files.sh deleted file mode 100644 index 0400bc7544..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/check-generated-files.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# check if generated files are up-to-date - -set -eu - -if [ -d library -a -d include -a -d tests ]; then :; else - echo "Must be run from mbed TLS root" >&2 - exit 1 -fi - -check() -{ - FILE=$1 - SCRIPT=$2 - - cp $FILE $FILE.bak - $SCRIPT - diff $FILE $FILE.bak - mv $FILE.bak $FILE -} - -check library/error.c scripts/generate_errors.pl -check library/version_features.c scripts/generate_features.pl diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/check-names.sh b/build/premake/premake5/contrib/mbedtls/tests/scripts/check-names.sh deleted file mode 100644 index 7e67cefa8d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/check-names.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -set -eu - -tests/scripts/list-macros.sh -tests/scripts/list-enum-consts.pl -tests/scripts/list-identifiers.sh -tests/scripts/list-symbols.sh - -FAIL=0 - -printf "Exported symbols declared in header: " -UNDECLARED=$( diff exported-symbols identifiers | sed -n -e 's/^< //p' ) -if [ "x$UNDECLARED" = "x" ]; then - echo "PASS" -else - echo "FAIL" - echo "$UNDECLARED" - FAIL=1 -fi - -diff macros identifiers | sed -n -e 's/< //p' > actual-macros - -for THING in actual-macros enum-consts; do - printf "Names of $THING: " - test -r $THING - BAD=$( grep -v '^MBEDTLS_[0-9A-Z_]*[0-9A-Z]$' $THING || true ) - if [ "x$BAD" = "x" ]; then - echo "PASS" - else - echo "FAIL" - echo "$BAD" - FAIL=1 - fi -done - -for THING in identifiers; do - printf "Names of $THING: " - test -r $THING - BAD=$( grep -v '^mbedtls_[0-9a-z_]*[0-9a-z]$' $THING || true ) - if [ "x$BAD" = "x" ]; then - echo "PASS" - else - echo "FAIL" - echo "$BAD" - FAIL=1 - fi -done - -printf "Likely typos: " -sort -u actual-macros enum-consts > _caps -HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' ) -NL=' -' -sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \ - $HEADERS library/*.c \ - | grep MBEDTLS | sort -u > _MBEDTLS_XXX -TYPOS=$( diff _caps _MBEDTLS_XXX | sed -n 's/^> //p' \ - | egrep -v 'XXX|__|_$|^MBEDTLS_.*CONFIG_FILE$' || true ) -rm _MBEDTLS_XXX _caps -if [ "x$TYPOS" = "x" ]; then - echo "PASS" -else - echo "FAIL" - echo "$TYPOS" - FAIL=1 -fi - -if [ "$FAIL" -eq 0 ]; then - rm macros actual-macros enum-consts identifiers exported-symbols - echo "PASSED" - exit 0 -else - echo "FAILED" - exit 1 -fi diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/curves.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/curves.pl deleted file mode 100644 index 654bc5c3eb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/curves.pl +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl - -# test dependencies on individual curves in tests -# - build -# - run test suite -# -# Usage: tests/scripts/curves.pl - -use warnings; -use strict; - --d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n"; - -my $sed_cmd = 's/^#define \(MBEDTLS_ECP_DP.*_ENABLED\)/\1/p'; -my $config_h = 'include/mbedtls/config.h'; -my @curves = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` ); - -system( "cp $config_h $config_h.bak" ) and die; -sub abort { - system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; - die $_[0]; -} - -for my $curve (@curves) { - system( "cp $config_h.bak $config_h" ) and die "$config_h not restored\n"; - # depends on a specific curve. Also, ignore error if it wasn't enabled - system( "scripts/config.pl unset MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED" ); - system( "make clean" ) and die; - - print "\n******************************************\n"; - print "* Testing without curve: $curve\n"; - print "******************************************\n"; - - system( "scripts/config.pl unset $curve" ) - and abort "Failed to disable $curve\n"; - - system( "make lib" ) and abort "Failed to build lib: $curve\n"; - system( "cd tests && make" ) and abort "Failed to build tests: $curve\n"; - system( "make test" ) and abort "Failed test suite: $curve\n"; - -} - -system( "mv $config_h.bak $config_h" ) and die "$config_h not restored\n"; -system( "make clean" ) and die; -exit 0; diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_ctr_drbg.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_ctr_drbg.pl deleted file mode 100644 index 66d9b3ab03..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_ctr_drbg.pl +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -# -# Based on NIST CTR_DRBG.rsp validation file -# Only uses AES-256-CTR cases that use a Derivation function -# and concats nonce and personalization for initialization. - -use strict; - -my $file = shift; - -open(TEST_DATA, "$file") or die "Opening test cases '$file': $!"; - -sub get_suite_val($) -{ - my $name = shift; - my $val = ""; - - my $line = ; - ($val) = ($line =~ /\[$name\s\=\s(\w+)\]/); - - return $val; -} - -sub get_val($) -{ - my $name = shift; - my $val = ""; - my $line; - - while($line = ) - { - next if($line !~ /=/); - last; - } - - ($val) = ($line =~ /^$name = (\w+)/); - - return $val; -} - -my $cnt = 1;; -while (my $line = ) -{ - next if ($line !~ /^\[AES-256 use df/); - - my $PredictionResistanceStr = get_suite_val("PredictionResistance"); - my $PredictionResistance = 0; - $PredictionResistance = 1 if ($PredictionResistanceStr eq 'True'); - my $EntropyInputLen = get_suite_val("EntropyInputLen"); - my $NonceLen = get_suite_val("NonceLen"); - my $PersonalizationStringLen = get_suite_val("PersonalizationStringLen"); - my $AdditionalInputLen = get_suite_val("AdditionalInputLen"); - - for ($cnt = 0; $cnt < 15; $cnt++) - { - my $Count = get_val("COUNT"); - my $EntropyInput = get_val("EntropyInput"); - my $Nonce = get_val("Nonce"); - my $PersonalizationString = get_val("PersonalizationString"); - my $AdditionalInput1 = get_val("AdditionalInput"); - my $EntropyInputPR1 = get_val("EntropyInputPR") if ($PredictionResistance == 1); - my $EntropyInputReseed = get_val("EntropyInputReseed") if ($PredictionResistance == 0); - my $AdditionalInputReseed = get_val("AdditionalInputReseed") if ($PredictionResistance == 0); - my $AdditionalInput2 = get_val("AdditionalInput"); - my $EntropyInputPR2 = get_val("EntropyInputPR") if ($PredictionResistance == 1); - my $ReturnedBits = get_val("ReturnedBits"); - - if ($PredictionResistance == 1) - { - print("CTR_DRBG NIST Validation (AES-256 use df,$PredictionResistanceStr,$EntropyInputLen,$NonceLen,$PersonalizationStringLen,$AdditionalInputLen) #$Count\n"); - print("ctr_drbg_validate_pr"); - print(":\"$Nonce$PersonalizationString\""); - print(":\"$EntropyInput$EntropyInputPR1$EntropyInputPR2\""); - print(":\"$AdditionalInput1\""); - print(":\"$AdditionalInput2\""); - print(":\"$ReturnedBits\""); - print("\n\n"); - } - else - { - print("CTR_DRBG NIST Validation (AES-256 use df,$PredictionResistanceStr,$EntropyInputLen,$NonceLen,$PersonalizationStringLen,$AdditionalInputLen) #$Count\n"); - print("ctr_drbg_validate_nopr"); - print(":\"$Nonce$PersonalizationString\""); - print(":\"$EntropyInput$EntropyInputReseed\""); - print(":\"$AdditionalInput1\""); - print(":\"$AdditionalInputReseed\""); - print(":\"$AdditionalInput2\""); - print(":\"$ReturnedBits\""); - print("\n\n"); - } - } -} -close(TEST_DATA); diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_decrypt.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_decrypt.pl deleted file mode 100644 index 6decac2867..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_decrypt.pl +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/perl -# -# Based on NIST gcmDecryptxxx.rsp validation files -# Only first 3 of every set used for compile time saving - -use strict; - -my $file = shift; - -open(TEST_DATA, "$file") or die "Opening test cases '$file': $!"; - -sub get_suite_val($) -{ - my $name = shift; - my $val = ""; - - while(my $line = ) - { - next if ($line !~ /^\[/); - ($val) = ($line =~ /\[$name\s\=\s(\w+)\]/); - last; - } - - return $val; -} - -sub get_val($) -{ - my $name = shift; - my $val = ""; - my $line; - - while($line = ) - { - next if($line !~ /=/); - last; - } - - ($val) = ($line =~ /^$name = (\w+)/); - - return $val; -} - -sub get_val_or_fail($) -{ - my $name = shift; - my $val = "FAIL"; - my $line; - - while($line = ) - { - next if($line !~ /=/ && $line !~ /FAIL/); - last; - } - - ($val) = ($line =~ /^$name = (\w+)/) if ($line =~ /=/); - - return $val; -} - -my $cnt = 1;; -while (my $line = ) -{ - my $key_len = get_suite_val("Keylen"); - next if ($key_len !~ /\d+/); - my $iv_len = get_suite_val("IVlen"); - my $pt_len = get_suite_val("PTlen"); - my $add_len = get_suite_val("AADlen"); - my $tag_len = get_suite_val("Taglen"); - - for ($cnt = 0; $cnt < 3; $cnt++) - { - my $Count = get_val("Count"); - my $key = get_val("Key"); - my $iv = get_val("IV"); - my $ct = get_val("CT"); - my $add = get_val("AAD"); - my $tag = get_val("Tag"); - my $pt = get_val_or_fail("PT"); - - print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n"); - print("gcm_decrypt_and_verify"); - print(":\"$key\""); - print(":\"$ct\""); - print(":\"$iv\""); - print(":\"$add\""); - print(":$tag_len"); - print(":\"$tag\""); - print(":\"$pt\""); - print(":0"); - print("\n\n"); - } -} - -print("GCM Selftest\n"); -print("gcm_selftest:\n\n"); - -close(TEST_DATA); diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_encrypt.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_encrypt.pl deleted file mode 100644 index 8adbbcefc1..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_gcm_encrypt.pl +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -# -# Based on NIST gcmEncryptIntIVxxx.rsp validation files -# Only first 3 of every set used for compile time saving - -use strict; - -my $file = shift; - -open(TEST_DATA, "$file") or die "Opening test cases '$file': $!"; - -sub get_suite_val($) -{ - my $name = shift; - my $val = ""; - - while(my $line = ) - { - next if ($line !~ /^\[/); - ($val) = ($line =~ /\[$name\s\=\s(\w+)\]/); - last; - } - - return $val; -} - -sub get_val($) -{ - my $name = shift; - my $val = ""; - my $line; - - while($line = ) - { - next if($line !~ /=/); - last; - } - - ($val) = ($line =~ /^$name = (\w+)/); - - return $val; -} - -my $cnt = 1;; -while (my $line = ) -{ - my $key_len = get_suite_val("Keylen"); - next if ($key_len !~ /\d+/); - my $iv_len = get_suite_val("IVlen"); - my $pt_len = get_suite_val("PTlen"); - my $add_len = get_suite_val("AADlen"); - my $tag_len = get_suite_val("Taglen"); - - for ($cnt = 0; $cnt < 3; $cnt++) - { - my $Count = get_val("Count"); - my $key = get_val("Key"); - my $pt = get_val("PT"); - my $add = get_val("AAD"); - my $iv = get_val("IV"); - my $ct = get_val("CT"); - my $tag = get_val("Tag"); - - print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n"); - print("gcm_encrypt_and_tag"); - print(":\"$key\""); - print(":\"$pt\""); - print(":\"$iv\""); - print(":\"$add\""); - print(":\"$ct\""); - print(":$tag_len"); - print(":\"$tag\""); - print(":0"); - print("\n\n"); - } -} - -print("GCM Selftest\n"); -print("gcm_selftest:\n\n"); - -close(TEST_DATA); diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_pkcs1_v21_sign_verify.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_pkcs1_v21_sign_verify.pl deleted file mode 100644 index 0d7fc7d1ed..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/gen_pkcs1_v21_sign_verify.pl +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/perl -# - -use strict; - -my $file = shift; - -open(TEST_DATA, "$file") or die "Opening test cases '$file': $!"; - -sub get_val($$) -{ - my $str = shift; - my $name = shift; - my $val = ""; - - while(my $line = ) - { - next if($line !~ /^# $str/); - last; - } - - while(my $line = ) - { - last if($line eq "\r\n"); - $val .= $line; - } - - $val =~ s/[ \r\n]//g; - - return $val; -} - -my $state = 0; -my $val_n = ""; -my $val_e = ""; -my $val_p = ""; -my $val_q = ""; -my $mod = 0; -my $cnt = 1; -while (my $line = ) -{ - next if ($line !~ /^# Example/); - - ( $mod ) = ($line =~ /A (\d+)/); - $val_n = get_val("RSA modulus n", "N"); - $val_e = get_val("RSA public exponent e", "E"); - $val_p = get_val("Prime p", "P"); - $val_q = get_val("Prime q", "Q"); - - for(my $i = 1; $i <= 6; $i++) - { - my $val_m = get_val("Message to be", "M"); - my $val_salt = get_val("Salt", "Salt"); - my $val_sig = get_val("Signature", "Sig"); - - print("RSASSA-PSS Signature Example ${cnt}_${i}\n"); - print("pkcs1_rsassa_pss_sign:$mod:16:\"$val_p\":16:\"$val_q\":16:\"$val_n\":16:\"$val_e\":SIG_RSA_SHA1:MBEDTLS_MD_SHA1"); - print(":\"$val_m\""); - print(":\"$val_salt\""); - print(":\"$val_sig\":0"); - print("\n\n"); - - print("RSASSA-PSS Signature Example ${cnt}_${i} (verify)\n"); - print("pkcs1_rsassa_pss_verify:$mod:16:\"$val_n\":16:\"$val_e\":SIG_RSA_SHA1:MBEDTLS_MD_SHA1"); - print(":\"$val_m\""); - print(":\"$val_salt\""); - print(":\"$val_sig\":0"); - print("\n\n"); - } - $cnt++; -} -close(TEST_DATA); diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/generate_code.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/generate_code.pl deleted file mode 100644 index 1c7a281d7a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/generate_code.pl +++ /dev/null @@ -1,254 +0,0 @@ -#!/usr/bin/env perl -# - -use strict; - -my $suite_dir = shift or die "Missing suite directory"; -my $suite_name = shift or die "Missing suite name"; -my $data_name = shift or die "Missing data name"; -my $test_main_file = do { my $arg = shift; defined($arg) ? $arg : $suite_dir."/main_test.function" }; -my $test_file = $data_name.".c"; -my $test_helper_file = $suite_dir."/helpers.function"; -my $test_case_file = $suite_dir."/".$suite_name.".function"; -my $test_case_data = $suite_dir."/".$data_name.".data"; - -my $line_separator = $/; -undef $/; - -open(TEST_HELPERS, "$test_helper_file") or die "Opening test helpers '$test_helper_file': $!"; -my $test_helpers = ; -close(TEST_HELPERS); - -open(TEST_MAIN, "$test_main_file") or die "Opening test main '$test_main_file': $!"; -my $test_main = ; -close(TEST_MAIN); - -open(TEST_CASES, "$test_case_file") or die "Opening test cases '$test_case_file': $!"; -my $test_cases = ; -close(TEST_CASES); - -open(TEST_DATA, "$test_case_data") or die "Opening test data '$test_case_data': $!"; -my $test_data = ; -close(TEST_DATA); - -my ( $suite_header ) = $test_cases =~ /\/\* BEGIN_HEADER \*\/\n(.*?)\n\/\* END_HEADER \*\//s; -my ( $suite_defines ) = $test_cases =~ /\/\* BEGIN_DEPENDENCIES\n \* (.*?)\n \* END_DEPENDENCIES/s; - -my $requirements; -if ($suite_defines =~ /^depends_on:/) -{ - ( $requirements ) = $suite_defines =~ /^depends_on:(.*)$/; -} - -my @var_req_arr = split(/:/, $requirements); -my $suite_pre_code; -my $suite_post_code; -my $dispatch_code; -my $mapping_code; -my %mapping_values; - -while (@var_req_arr) -{ - my $req = shift @var_req_arr; - $req =~ s/(!?)(.*)/$1defined($2)/; - - $suite_pre_code .= "#if $req\n"; - $suite_post_code .= "#endif /* $req */\n"; -} - -$/ = $line_separator; - -open(TEST_FILE, ">$test_file") or die "Opening destination file '$test_file': $!"; -print TEST_FILE << "END"; -#if !defined(MBEDTLS_CONFIG_FILE) -#include -#else -#include MBEDTLS_CONFIG_FILE -#endif - -$test_helpers - -$suite_pre_code -$suite_header -$suite_post_code - -END - -$test_main =~ s/SUITE_PRE_DEP/$suite_pre_code/; -$test_main =~ s/SUITE_POST_DEP/$suite_post_code/; - -while($test_cases =~ /\/\* BEGIN_CASE *([\w:]*) \*\/\n(.*?)\n\/\* END_CASE \*\//msg) -{ - my $function_deps = $1; - my $function_decl = $2; - - # Sanity checks of function - if ($function_decl !~ /^void /) - { - die "Test function does not have 'void' as return type\n"; - } - if ($function_decl !~ /^void (\w+)\(\s*(.*?)\s*\)\s*{(.*)}/ms) - { - die "Function declaration not in expected format\n"; - } - my $function_name = $1; - my $function_params = $2; - my $function_pre_code; - my $function_post_code; - my $param_defs; - my $param_checks; - my @dispatch_params; - my @var_def_arr = split(/,\s*/, $function_params); - my $i = 1; - my $mapping_regex = "".$function_name; - my $mapping_count = 0; - - $function_decl =~ s/^void /void test_suite_/; - - # Add exit label if not present - if ($function_decl !~ /^exit:$/m) - { - $function_decl =~ s/}\s*$/\nexit:\n return;\n}/; - } - - if ($function_deps =~ /^depends_on:/) - { - ( $function_deps ) = $function_deps =~ /^depends_on:(.*)$/; - } - - foreach my $req (split(/:/, $function_deps)) - { - $function_pre_code .= "#ifdef $req\n"; - $function_post_code .= "#endif /* $req */\n"; - } - - foreach my $def (@var_def_arr) - { - # Handle the different parameter types - if( substr($def, 0, 4) eq "int " ) - { - $param_defs .= " int param$i;\n"; - $param_checks .= " if( verify_int( params[$i], ¶m$i ) != 0 ) return( 2 );\n"; - push @dispatch_params, "param$i"; - - $mapping_regex .= ":([\\d\\w |\\+\\-\\(\\)]+)"; - $mapping_count++; - } - elsif( substr($def, 0, 6) eq "char *" ) - { - $param_defs .= " char *param$i = params[$i];\n"; - $param_checks .= " if( verify_string( ¶m$i ) != 0 ) return( 2 );\n"; - push @dispatch_params, "param$i"; - $mapping_regex .= ":[^:\n]+"; - } - else - { - die "Parameter declaration not of supported type (int, char *)\n"; - } - $i++; - - } - - # Find non-integer values we should map for this function - if( $mapping_count) - { - my @res = $test_data =~ /^$mapping_regex/msg; - foreach my $value (@res) - { - next unless ($value !~ /^\d+$/); - if ( $mapping_values{$value} ) { - ${ $mapping_values{$value} }{$function_pre_code} = 1; - } else { - $mapping_values{$value} = { $function_pre_code => 1 }; - } - } - } - - my $call_params = join ", ", @dispatch_params; - my $param_count = @var_def_arr + 1; - $dispatch_code .= << "END"; -if( strcmp( params[0], "$function_name" ) == 0 ) -{ -$function_pre_code -$param_defs - if( cnt != $param_count ) - { - mbedtls_fprintf( stderr, "\\nIncorrect argument count (%d != %d)\\n", cnt, $param_count ); - return( 2 ); - } - -$param_checks - test_suite_$function_name( $call_params ); - return ( 0 ); -$function_post_code - return ( 3 ); -} -else -END - - my $function_code = $function_pre_code . $function_decl . "\n" . $function_post_code; - $test_main =~ s/FUNCTION_CODE/$function_code\nFUNCTION_CODE/; -} - -# Find specific case dependencies that we should be able to check -# and make check code -my $dep_check_code; - -my @res = $test_data =~ /^depends_on:([\w:]+)/msg; -my %case_deps; -foreach my $deps (@res) -{ - foreach my $dep (split(/:/, $deps)) - { - $case_deps{$dep} = 1; - } -} -while( my ($key, $value) = each(%case_deps) ) -{ - $dep_check_code .= << "END"; - if( strcmp( str, "$key" ) == 0 ) - { -#if defined($key) - return( 0 ); -#else - return( 1 ); -#endif - } -END -} - -# Make mapping code -while( my ($key, $value) = each(%mapping_values) ) -{ - my $key_mapping_code = << "END"; - if( strcmp( str, "$key" ) == 0 ) - { - *value = ( $key ); - return( 0 ); - } -END - - # handle depenencies, unless used at least one without depends - if ($value->{""}) { - $mapping_code .= $key_mapping_code; - next; - } - for my $ifdef ( keys %$value ) { - (my $endif = $ifdef) =~ s!ifdef!endif //!g; - $mapping_code .= $ifdef . $key_mapping_code . $endif; - } -} - -$dispatch_code =~ s/^(.+)/ $1/mg; - -$test_main =~ s/TEST_FILENAME/$test_case_data/; -$test_main =~ s/FUNCTION_CODE//; -$test_main =~ s/DEP_CHECK_CODE/$dep_check_code/; -$test_main =~ s/DISPATCH_FUNCTION/$dispatch_code/; -$test_main =~ s/MAPPING_CODE/$mapping_code/; - -print TEST_FILE << "END"; -$test_main -END - -close(TEST_FILE); diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/key-exchanges.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/key-exchanges.pl deleted file mode 100644 index 46826c3de8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/key-exchanges.pl +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl - -# test that all configs with only a single key exchange enabled build -# -# Usage: tests/scripts/key-exchanges.pl - -use warnings; -use strict; - --d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n"; - -my $sed_cmd = 's/^#define \(MBEDTLS_KEY_EXCHANGE_.*_ENABLED\)/\1/p'; -my $config_h = 'include/mbedtls/config.h'; -my @kexes = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` ); - -system( "cp $config_h $config_h.bak" ) and die; -sub abort { - system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; - die $_[0]; -} - -for my $kex (@kexes) { - system( "cp $config_h.bak $config_h" ) and die "$config_h not restored\n"; - system( "make clean" ) and die; - - print "\n******************************************\n"; - print "* Testing with key exchange: $kex\n"; - print "******************************************\n"; - - # full config with all key exchanges disabled except one - system( "scripts/config.pl full" ) and abort "Failed config full\n"; - for my $k (@kexes) { - next if $k eq $kex; - system( "scripts/config.pl unset $k" ) - and abort "Failed to disable $k\n"; - } - - system( "make lib CFLAGS='-Os -Werror'" ) and abort "Failed to build lib: $kex\n"; -} - -system( "mv $config_h.bak $config_h" ) and die "$config_h not restored\n"; -system( "make clean" ) and die; -exit 0; diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-enum-consts.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/list-enum-consts.pl deleted file mode 100644 index 633e3fdf9e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-enum-consts.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use strict; - -use utf8; -use open qw(:std utf8); - --d 'include/mbedtls' or die "$0: must be run from root\n"; - -@ARGV = grep { ! /compat-1\.3\.h/ } ; - -my @consts; -my $state = 'out'; -while (<>) -{ - if( $state eq 'out' and /^(typedef )?enum \{/ ) { - $state = 'in'; - } elsif( $state eq 'out' and /^(typedef )?enum/ ) { - $state = 'start'; - } elsif( $state eq 'start' and /{/ ) { - $state = 'in'; - } elsif( $state eq 'in' and /}/ ) { - $state = 'out'; - } elsif( $state eq 'in' ) { - s/=.*//; s!/\*.*!!; s/,.*//; s/\s+//g; chomp; - push @consts, $_ if $_; - } -} - -open my $fh, '>', 'enum-consts' or die; -print $fh "$_\n" for sort @consts; -close $fh or die; - -printf "%8d enum-consts\n", scalar @consts; diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-identifiers.sh b/build/premake/premake5/contrib/mbedtls/tests/scripts/list-identifiers.sh deleted file mode 100644 index 130d9d63f6..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-identifiers.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -eu - -if [ -d include/mbedtls ]; then :; else - echo "$0: must be run from root" >&2 - exit 1 -fi - -HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h|bn_mul' ) - -rm -f identifiers - -grep '^[^ /#{]' $HEADERS | \ - sed -e 's/^[^:]*://' | \ - egrep -v '^(extern "C"|(typedef )?(struct|enum)( {)?$|};?$)' \ - > _decls - -if true; then -sed -n -e 's/.* \**\([a-zA-Z_][a-zA-Z0-9_]*\)(.*/\1/p' \ - -e 's/.*(\*\(.*\))(.*/\1/p' _decls -grep -v '(' _decls | sed -e 's/\([a-zA-Z0-9_]*\)[;[].*/\1/' -e 's/.* \**//' -fi > _identifiers - -if [ $( wc -l < _identifiers ) -eq $( wc -l < _decls ) ]; then - rm _decls - egrep -v '^(u?int(16|32|64)_t)$' _identifiers | sort > identifiers - rm _identifiers -else - echo "$0: oops, lost some identifiers" 2>&1 - exit 1 -fi - -wc -l identifiers diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-macros.sh b/build/premake/premake5/contrib/mbedtls/tests/scripts/list-macros.sh deleted file mode 100644 index 3c84adba63..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-macros.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -eu - -if [ -d include/mbedtls ]; then :; else - echo "$0: must be run from root" >&2 - exit 1 -fi - -HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' ) - -sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \ - | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \ - | sort -u > macros - -wc -l macros diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-symbols.sh b/build/premake/premake5/contrib/mbedtls/tests/scripts/list-symbols.sh deleted file mode 100644 index c258719429..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/list-symbols.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -eu - -if [ -d include/mbedtls ]; then :; else - echo "$0: must be run from root" >&2 - exit 1 -fi - -if grep -i cmake Makefile >/dev/null; then - echo "$0: not compatible with cmake" >&2 - exit 1 -fi - -cp include/mbedtls/config.h include/mbedtls/config.h.bak -scripts/config.pl full -CFLAGS=-fno-asynchronous-unwind-tables make clean lib >/dev/null 2>&1 -mv include/mbedtls/config.h.bak include/mbedtls/config.h -if uname | grep -F Darwin >/dev/null; then - nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' -elif uname | grep -F Linux >/dev/null; then - nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' -fi | sort > exported-symbols -make clean - -wc -l exported-symbols diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/recursion.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/recursion.pl deleted file mode 100644 index 3ad42b1f8f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/recursion.pl +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/perl - -# Find functions making recursive calls to themselves. -# (Multiple recursion where a() calls b() which calls a() not covered.) -# -# When the recursion depth might depend on data controlled by the attacker in -# an unbounded way, those functions should use interation instead. -# -# Typical usage: scripts/recursion.pl library/*.c - -use warnings; -use strict; - -use utf8; -use open qw(:std utf8); - -# exclude functions that are ok: -# - mpi_write_hlp: bounded by size of mbedtls_mpi, a compile-time constant -# - x509_crt_verify_child: bounded by MBEDTLS_X509_MAX_INTERMEDIATE_CA -my $known_ok = qr/mpi_write_hlp|x509_crt_verify_child/; - -my $cur_name; -my $inside; -my @funcs; - -die "Usage: $0 file.c [...]\n" unless @ARGV; - -while (<>) -{ - if( /^[^\/#{}\s]/ && ! /\[.*]/ ) { - chomp( $cur_name = $_ ) unless $inside; - } elsif( /^{/ && $cur_name ) { - $inside = 1; - $cur_name =~ s/.* ([^ ]*)\(.*/$1/; - } elsif( /^}/ && $inside ) { - undef $inside; - undef $cur_name; - } elsif( $inside && /\b\Q$cur_name\E\([^)]/ ) { - push @funcs, $cur_name unless /$known_ok/; - } -} - -print "$_\n" for @funcs; -exit @funcs; diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/run-test-suites.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/run-test-suites.pl deleted file mode 100644 index b91355d303..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/run-test-suites.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use strict; - -use utf8; -use open qw(:std utf8); - -my @suites = grep { ! /\.(?:c|gcno)$/ } glob 'test_suite_*'; -die "$0: no test suite found\n" unless @suites; - -# in case test suites are linked dynamically -$ENV{'LD_LIBRARY_PATH'} = '../library'; - -my $prefix = $^O eq "MSWin32" ? '' : './'; - -my ($failed_suites, $total_tests_run); -for my $suite (@suites) -{ - print "$suite ", "." x ( 72 - length($suite) - 2 - 4 ), " "; - my $result = `$prefix$suite`; - if( $result =~ /PASSED/ ) { - print "PASS\n"; - my ($tests, $skipped) = $result =~ /([0-9]*) tests.*?([0-9]*) skipped/; - $total_tests_run += $tests - $skipped; - } else { - $failed_suites++; - print "FAIL\n"; - } -} - -print "-" x 72, "\n"; -print $failed_suites ? "FAILED" : "PASSED"; -printf " (%d suites, %d tests run)\n", scalar @suites, $total_tests_run; -exit( $failed_suites ? 1 : 0 ); diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/test-ref-configs.pl b/build/premake/premake5/contrib/mbedtls/tests/scripts/test-ref-configs.pl deleted file mode 100644 index 8f4738cb45..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/test-ref-configs.pl +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/perl - -# test standard configurations: -# - build -# - run test suite -# - run compat.sh -# -# Usage: tests/scripts/test-ref-configs.pl [config-name [...]] - -use warnings; -use strict; - -my %configs = ( - 'config-mini-tls1_1.h' => { - 'compat' => '-m tls1_1 -f \'^DES-CBC3-SHA$\|^TLS-RSA-WITH-3DES-EDE-CBC-SHA$\'', - }, - 'config-suite-b.h' => { - 'compat' => "-m tls1_2 -f 'ECDHE-ECDSA.*AES.*GCM' -p mbedTLS", - }, - 'config-picocoin.h' => { - }, - 'config-ccm-psk-tls1_2.h' => { - 'compat' => '-m tls1_2 -f \'^TLS-PSK-WITH-AES-...-CCM-8\'', - }, - 'config-thread.h' => { - 'opt' => '-f ECJPAKE.*nolog', - }, -); - -# If no config-name is provided, use all known configs. -# Otherwise, use the provided names only. -if ($#ARGV >= 0) { - my %configs_ori = ( %configs ); - %configs = (); - - foreach my $conf_name (@ARGV) { - if( ! exists $configs_ori{$conf_name} ) { - die "Unknown configuration: $conf_name\n"; - } else { - $configs{$conf_name} = $configs_ori{$conf_name}; - } - } -} - --d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n"; - -my $config_h = 'include/mbedtls/config.h'; - -system( "cp $config_h $config_h.bak" ) and die; -sub abort { - system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; - die $_[0]; -} - -while( my ($conf, $data) = each %configs ) { - system( "cp $config_h.bak $config_h" ) and die; - system( "make clean" ) and die; - - print "\n******************************************\n"; - print "* Testing configuration: $conf\n"; - print "******************************************\n"; - - system( "cp configs/$conf $config_h" ) - and abort "Failed to activate $conf\n"; - - system( "make CFLAGS='-Os -Werror'" ) and abort "Failed to build: $conf\n"; - system( "make test" ) and abort "Failed test suite: $conf\n"; - - my $compat = $data->{'compat'}; - if( $compat ) - { - print "\nrunning compat.sh $compat\n"; - system( "tests/compat.sh $compat" ) - and abort "Failed compat.sh: $conf\n"; - } - else - { - print "\nskipping compat.sh\n"; - } - - my $opt = $data->{'opt'}; - if( $opt ) - { - print "\nrunning ssl-opt.sh $opt\n"; - system( "tests/ssl-opt.sh $opt" ) - and abort "Failed ssl-opt.sh: $conf\n"; - } - else - { - print "\nskipping ssl-opt.sh\n"; - } -} - -system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; -system( "make clean" ); -exit 0; diff --git a/build/premake/premake5/contrib/mbedtls/tests/scripts/yotta-build.sh b/build/premake/premake5/contrib/mbedtls/tests/scripts/yotta-build.sh deleted file mode 100644 index 0651baee6e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/scripts/yotta-build.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# Do test builds of the yotta module for all supported targets - -set -eu - -yotta/create-module.sh -cd yotta/module -yt update || true # needs network - -yotta_build() -{ - TARGET=$1 - echo; echo "*** $TARGET ***" - yt -t $TARGET build -} - -if uname -a | grep 'Linux.*x86' >/dev/null; then - yotta_build x86-linux-native -fi -if uname -a | grep 'Darwin.*x86' >/dev/null; then - yotta_build x86-osx-native -fi -if which armcc >/dev/null && armcc --help >/dev/null 2>&1; then - yotta_build frdm-k64f-armcc - #yotta_build nordic-nrf51822-16k-armcc -fi -if which arm-none-eabi-gcc >/dev/null; then - yotta_build frdm-k64f-gcc - #yotta_build st-nucleo-f401re-gcc # dirent - #yotta_build stm32f429i-disco-gcc # fails in mbed-hal-st-stm32f4 - #yotta_build nordic-nrf51822-16k-gcc # fails in minar-platform - #yotta_build bbc-microbit-classic-gcc # fails in minar-platform - #yotta_build st-stm32f439zi-gcc # fails in mbed-hal-st-stm32f4 - #yotta_build st-stm32f429i-disco-gcc # fails in mbed-hal-st-stm32f4 -fi diff --git a/build/premake/premake5/contrib/mbedtls/tests/ssl-opt.sh b/build/premake/premake5/contrib/mbedtls/tests/ssl-opt.sh deleted file mode 100644 index c0b6f94d67..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/ssl-opt.sh +++ /dev/null @@ -1,3446 +0,0 @@ -#!/bin/sh - -# Test various options that are not covered by compat.sh -# -# Here the goal is not to cover every ciphersuite/version, but -# rather specific options (max fragment length, truncated hmac, etc) -# or procedures (session resumption from cache or ticket, renego, etc). -# -# Assumes a build with default options. - -set -u - -# default values, can be overriden by the environment -: ${P_SRV:=../programs/ssl/ssl_server2} -: ${P_CLI:=../programs/ssl/ssl_client2} -: ${P_PXY:=../programs/test/udp_proxy} -: ${OPENSSL_CMD:=openssl} # OPENSSL would conflict with the build system -: ${GNUTLS_CLI:=gnutls-cli} -: ${GNUTLS_SERV:=gnutls-serv} - -O_SRV="$OPENSSL_CMD s_server -www -cert data_files/server5.crt -key data_files/server5.key" -O_CLI="echo 'GET / HTTP/1.0' | $OPENSSL_CMD s_client" -G_SRV="$GNUTLS_SERV --x509certfile data_files/server5.crt --x509keyfile data_files/server5.key" -G_CLI="echo 'GET / HTTP/1.0' | $GNUTLS_CLI --x509cafile data_files/test-ca_cat12.crt" - -TESTS=0 -FAILS=0 -SKIPS=0 - -CONFIG_H='../include/mbedtls/config.h' - -MEMCHECK=0 -FILTER='.*' -EXCLUDE='^$' - -print_usage() { - echo "Usage: $0 [options]" - printf " -h|--help\tPrint this help.\n" - printf " -m|--memcheck\tCheck memory leaks and errors.\n" - printf " -f|--filter\tOnly matching tests are executed (default: '$FILTER')\n" - printf " -e|--exclude\tMatching tests are excluded (default: '$EXCLUDE')\n" -} - -get_options() { - while [ $# -gt 0 ]; do - case "$1" in - -f|--filter) - shift; FILTER=$1 - ;; - -e|--exclude) - shift; EXCLUDE=$1 - ;; - -m|--memcheck) - MEMCHECK=1 - ;; - -h|--help) - print_usage - exit 0 - ;; - *) - echo "Unknown argument: '$1'" - print_usage - exit 1 - ;; - esac - shift - done -} - -# skip next test if the flag is not enabled in config.h -requires_config_enabled() { - if grep "^#define $1" $CONFIG_H > /dev/null; then :; else - SKIP_NEXT="YES" - fi -} - -# skip next test if OpenSSL doesn't support FALLBACK_SCSV -requires_openssl_with_fallback_scsv() { - if [ -z "${OPENSSL_HAS_FBSCSV:-}" ]; then - if $OPENSSL_CMD s_client -help 2>&1 | grep fallback_scsv >/dev/null - then - OPENSSL_HAS_FBSCSV="YES" - else - OPENSSL_HAS_FBSCSV="NO" - fi - fi - if [ "$OPENSSL_HAS_FBSCSV" = "NO" ]; then - SKIP_NEXT="YES" - fi -} - -# skip next test if GnuTLS isn't available -requires_gnutls() { - if [ -z "${GNUTLS_AVAILABLE:-}" ]; then - if ( which "$GNUTLS_CLI" && which "$GNUTLS_SERV" ) >/dev/null 2>&1; then - GNUTLS_AVAILABLE="YES" - else - GNUTLS_AVAILABLE="NO" - fi - fi - if [ "$GNUTLS_AVAILABLE" = "NO" ]; then - SKIP_NEXT="YES" - fi -} - -# skip next test if IPv6 isn't available on this host -requires_ipv6() { - if [ -z "${HAS_IPV6:-}" ]; then - $P_SRV server_addr='::1' > $SRV_OUT 2>&1 & - SRV_PID=$! - sleep 1 - kill $SRV_PID >/dev/null 2>&1 - if grep "NET - Binding of the socket failed" $SRV_OUT >/dev/null; then - HAS_IPV6="NO" - else - HAS_IPV6="YES" - fi - rm -r $SRV_OUT - fi - - if [ "$HAS_IPV6" = "NO" ]; then - SKIP_NEXT="YES" - fi -} - -# skip the next test if valgrind is in use -not_with_valgrind() { - if [ "$MEMCHECK" -gt 0 ]; then - SKIP_NEXT="YES" - fi -} - -# multiply the client timeout delay by the given factor for the next test -needs_more_time() { - CLI_DELAY_FACTOR=$1 -} - -# print_name -print_name() { - printf "$1 " - LEN=$(( 72 - `echo "$1" | wc -c` )) - for i in `seq 1 $LEN`; do printf '.'; done - printf ' ' - - TESTS=$(( $TESTS + 1 )) -} - -# fail -fail() { - echo "FAIL" - echo " ! $1" - - mv $SRV_OUT o-srv-${TESTS}.log - mv $CLI_OUT o-cli-${TESTS}.log - if [ -n "$PXY_CMD" ]; then - mv $PXY_OUT o-pxy-${TESTS}.log - fi - echo " ! outputs saved to o-XXX-${TESTS}.log" - - if [ "X${USER:-}" = Xbuildbot -o "X${LOGNAME:-}" = Xbuildbot ]; then - echo " ! server output:" - cat o-srv-${TESTS}.log - echo " ! ========================================================" - echo " ! client output:" - cat o-cli-${TESTS}.log - if [ -n "$PXY_CMD" ]; then - echo " ! ========================================================" - echo " ! proxy output:" - cat o-pxy-${TESTS}.log - fi - echo "" - fi - - FAILS=$(( $FAILS + 1 )) -} - -# is_polar -is_polar() { - echo "$1" | grep 'ssl_server2\|ssl_client2' > /dev/null -} - -# openssl s_server doesn't have -www with DTLS -check_osrv_dtls() { - if echo "$SRV_CMD" | grep 's_server.*-dtls' >/dev/null; then - NEEDS_INPUT=1 - SRV_CMD="$( echo $SRV_CMD | sed s/-www// )" - else - NEEDS_INPUT=0 - fi -} - -# provide input to commands that need it -provide_input() { - if [ $NEEDS_INPUT -eq 0 ]; then - return - fi - - while true; do - echo "HTTP/1.0 200 OK" - sleep 1 - done -} - -# has_mem_err -has_mem_err() { - if ( grep -F 'All heap blocks were freed -- no leaks are possible' "$1" && - grep -F 'ERROR SUMMARY: 0 errors from 0 contexts' "$1" ) > /dev/null - then - return 1 # false: does not have errors - else - return 0 # true: has errors - fi -} - -# wait for server to start: two versions depending on lsof availability -wait_server_start() { - if which lsof >/dev/null 2>&1; then - START_TIME=$( date +%s ) - DONE=0 - - # make a tight loop, server usually takes less than 1 sec to start - if [ "$DTLS" -eq 1 ]; then - while [ $DONE -eq 0 ]; do - if lsof -nbi UDP:"$SRV_PORT" 2>/dev/null | grep UDP >/dev/null - then - DONE=1 - elif [ $(( $( date +%s ) - $START_TIME )) -gt $DOG_DELAY ]; then - echo "SERVERSTART TIMEOUT" - echo "SERVERSTART TIMEOUT" >> $SRV_OUT - DONE=1 - fi - done - else - while [ $DONE -eq 0 ]; do - if lsof -nbi TCP:"$SRV_PORT" 2>/dev/null | grep LISTEN >/dev/null - then - DONE=1 - elif [ $(( $( date +%s ) - $START_TIME )) -gt $DOG_DELAY ]; then - echo "SERVERSTART TIMEOUT" - echo "SERVERSTART TIMEOUT" >> $SRV_OUT - DONE=1 - fi - done - fi - else - sleep "$START_DELAY" - fi -} - -# wait for client to terminate and set CLI_EXIT -# must be called right after starting the client -wait_client_done() { - CLI_PID=$! - - CLI_DELAY=$(( $DOG_DELAY * $CLI_DELAY_FACTOR )) - CLI_DELAY_FACTOR=1 - - ( sleep $CLI_DELAY; echo "===CLIENT_TIMEOUT===" >> $CLI_OUT; kill $CLI_PID ) & - DOG_PID=$! - - wait $CLI_PID - CLI_EXIT=$? - - kill $DOG_PID >/dev/null 2>&1 - wait $DOG_PID - - echo "EXIT: $CLI_EXIT" >> $CLI_OUT -} - -# check if the given command uses dtls and sets global variable DTLS -detect_dtls() { - if echo "$1" | grep 'dtls=1\|-dtls1\|-u' >/dev/null; then - DTLS=1 - else - DTLS=0 - fi -} - -# Usage: run_test name [-p proxy_cmd] srv_cmd cli_cmd cli_exit [option [...]] -# Options: -s pattern pattern that must be present in server output -# -c pattern pattern that must be present in client output -# -S pattern pattern that must be absent in server output -# -C pattern pattern that must be absent in client output -run_test() { - NAME="$1" - shift 1 - - if echo "$NAME" | grep "$FILTER" | grep -v "$EXCLUDE" >/dev/null; then : - else - SKIP_NEXT="NO" - return - fi - - print_name "$NAME" - - # should we skip? - if [ "X$SKIP_NEXT" = "XYES" ]; then - SKIP_NEXT="NO" - echo "SKIP" - SKIPS=$(( $SKIPS + 1 )) - return - fi - - # does this test use a proxy? - if [ "X$1" = "X-p" ]; then - PXY_CMD="$2" - shift 2 - else - PXY_CMD="" - fi - - # get commands and client output - SRV_CMD="$1" - CLI_CMD="$2" - CLI_EXPECT="$3" - shift 3 - - # fix client port - if [ -n "$PXY_CMD" ]; then - CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g ) - else - CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$SRV_PORT/g ) - fi - - # update DTLS variable - detect_dtls "$SRV_CMD" - - # prepend valgrind to our commands if active - if [ "$MEMCHECK" -gt 0 ]; then - if is_polar "$SRV_CMD"; then - SRV_CMD="valgrind --leak-check=full $SRV_CMD" - fi - if is_polar "$CLI_CMD"; then - CLI_CMD="valgrind --leak-check=full $CLI_CMD" - fi - fi - - TIMES_LEFT=2 - while [ $TIMES_LEFT -gt 0 ]; do - TIMES_LEFT=$(( $TIMES_LEFT - 1 )) - - # run the commands - if [ -n "$PXY_CMD" ]; then - echo "$PXY_CMD" > $PXY_OUT - $PXY_CMD >> $PXY_OUT 2>&1 & - PXY_PID=$! - # assume proxy starts faster than server - fi - - check_osrv_dtls - echo "$SRV_CMD" > $SRV_OUT - provide_input | $SRV_CMD >> $SRV_OUT 2>&1 & - SRV_PID=$! - wait_server_start - - echo "$CLI_CMD" > $CLI_OUT - eval "$CLI_CMD" >> $CLI_OUT 2>&1 & - wait_client_done - - # terminate the server (and the proxy) - kill $SRV_PID - wait $SRV_PID - if [ -n "$PXY_CMD" ]; then - kill $PXY_PID >/dev/null 2>&1 - wait $PXY_PID - fi - - # retry only on timeouts - if grep '===CLIENT_TIMEOUT===' $CLI_OUT >/dev/null; then - printf "RETRY " - else - TIMES_LEFT=0 - fi - done - - # check if the client and server went at least to the handshake stage - # (useful to avoid tests with only negative assertions and non-zero - # expected client exit to incorrectly succeed in case of catastrophic - # failure) - if is_polar "$SRV_CMD"; then - if grep "Performing the SSL/TLS handshake" $SRV_OUT >/dev/null; then :; - else - fail "server or client failed to reach handshake stage" - return - fi - fi - if is_polar "$CLI_CMD"; then - if grep "Performing the SSL/TLS handshake" $CLI_OUT >/dev/null; then :; - else - fail "server or client failed to reach handshake stage" - return - fi - fi - - # check server exit code - if [ $? != 0 ]; then - fail "server fail" - return - fi - - # check client exit code - if [ \( "$CLI_EXPECT" = 0 -a "$CLI_EXIT" != 0 \) -o \ - \( "$CLI_EXPECT" != 0 -a "$CLI_EXIT" = 0 \) ] - then - fail "bad client exit code (expected $CLI_EXPECT, got $CLI_EXIT)" - return - fi - - # check other assertions - # lines beginning with == are added by valgrind, ignore them - while [ $# -gt 0 ] - do - case $1 in - "-s") - if grep -v '^==' $SRV_OUT | grep "$2" >/dev/null; then :; else - fail "-s $2" - return - fi - ;; - - "-c") - if grep -v '^==' $CLI_OUT | grep "$2" >/dev/null; then :; else - fail "-c $2" - return - fi - ;; - - "-S") - if grep -v '^==' $SRV_OUT | grep "$2" >/dev/null; then - fail "-S $2" - return - fi - ;; - - "-C") - if grep -v '^==' $CLI_OUT | grep "$2" >/dev/null; then - fail "-C $2" - return - fi - ;; - - *) - echo "Unknown test: $1" >&2 - exit 1 - esac - shift 2 - done - - # check valgrind's results - if [ "$MEMCHECK" -gt 0 ]; then - if is_polar "$SRV_CMD" && has_mem_err $SRV_OUT; then - fail "Server has memory errors" - return - fi - if is_polar "$CLI_CMD" && has_mem_err $CLI_OUT; then - fail "Client has memory errors" - return - fi - fi - - # if we're here, everything is ok - echo "PASS" - rm -f $SRV_OUT $CLI_OUT $PXY_OUT -} - -cleanup() { - rm -f $CLI_OUT $SRV_OUT $PXY_OUT $SESSION - test -n "${SRV_PID:-}" && kill $SRV_PID >/dev/null 2>&1 - test -n "${PXY_PID:-}" && kill $PXY_PID >/dev/null 2>&1 - test -n "${CLI_PID:-}" && kill $CLI_PID >/dev/null 2>&1 - test -n "${DOG_PID:-}" && kill $DOG_PID >/dev/null 2>&1 - exit 1 -} - -# -# MAIN -# - -if cd $( dirname $0 ); then :; else - echo "cd $( dirname $0 ) failed" >&2 - exit 1 -fi - -get_options "$@" - -# sanity checks, avoid an avalanche of errors -if [ ! -x "$P_SRV" ]; then - echo "Command '$P_SRV' is not an executable file" - exit 1 -fi -if [ ! -x "$P_CLI" ]; then - echo "Command '$P_CLI' is not an executable file" - exit 1 -fi -if [ ! -x "$P_PXY" ]; then - echo "Command '$P_PXY' is not an executable file" - exit 1 -fi -if which $OPENSSL_CMD >/dev/null 2>&1; then :; else - echo "Command '$OPENSSL_CMD' not found" - exit 1 -fi - -# used by watchdog -MAIN_PID="$$" - -# be more patient with valgrind -if [ "$MEMCHECK" -gt 0 ]; then - START_DELAY=3 - DOG_DELAY=30 -else - START_DELAY=1 - DOG_DELAY=10 -fi -CLI_DELAY_FACTOR=1 - -# Pick a "unique" server port in the range 10000-19999, and a proxy port -PORT_BASE="0000$$" -PORT_BASE="$( printf $PORT_BASE | tail -c 4 )" -SRV_PORT="1$PORT_BASE" -PXY_PORT="2$PORT_BASE" -unset PORT_BASE - -# fix commands to use this port, force IPv4 while at it -# +SRV_PORT will be replaced by either $SRV_PORT or $PXY_PORT later -P_SRV="$P_SRV server_addr=127.0.0.1 server_port=$SRV_PORT" -P_CLI="$P_CLI server_addr=127.0.0.1 server_port=+SRV_PORT" -P_PXY="$P_PXY server_addr=127.0.0.1 server_port=$SRV_PORT listen_addr=127.0.0.1 listen_port=$PXY_PORT" -O_SRV="$O_SRV -accept $SRV_PORT -dhparam data_files/dhparams.pem" -O_CLI="$O_CLI -connect localhost:+SRV_PORT" -G_SRV="$G_SRV -p $SRV_PORT" -G_CLI="$G_CLI -p +SRV_PORT localhost" - -# Also pick a unique name for intermediate files -SRV_OUT="srv_out.$$" -CLI_OUT="cli_out.$$" -PXY_OUT="pxy_out.$$" -SESSION="session.$$" - -SKIP_NEXT="NO" - -trap cleanup INT TERM HUP - -# Basic test - -# Checks that: -# - things work with all ciphersuites active (used with config-full in all.sh) -# - the expected (highest security) parameters are selected -# ("signature_algorithm ext: 6" means SHA-512 (highest common hash)) -run_test "Default" \ - "$P_SRV debug_level=3" \ - "$P_CLI" \ - 0 \ - -s "Protocol is TLSv1.2" \ - -s "Ciphersuite is TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384" \ - -s "client hello v3, signature_algorithm ext: 6" \ - -s "ECDHE curve: secp521r1" \ - -S "error" \ - -C "error" - -run_test "Default, DTLS" \ - "$P_SRV dtls=1" \ - "$P_CLI dtls=1" \ - 0 \ - -s "Protocol is DTLSv1.2" \ - -s "Ciphersuite is TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384" - -# Tests for rc4 option - -run_test "RC4: server disabled, client enabled" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 1 \ - -s "SSL - The server has no ciphersuites in common" - -run_test "RC4: server half, client enabled" \ - "$P_SRV arc4=1" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 1 \ - -s "SSL - The server has no ciphersuites in common" - -run_test "RC4: server enabled, client disabled" \ - "$P_SRV force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI" \ - 1 \ - -s "SSL - The server has no ciphersuites in common" - -run_test "RC4: both enabled" \ - "$P_SRV force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -S "SSL - None of the common ciphersuites is usable" \ - -S "SSL - The server has no ciphersuites in common" - -# Tests for Truncated HMAC extension - -run_test "Truncated HMAC: client default, server default" \ - "$P_SRV debug_level=4" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -s "dumping 'computed mac' (20 bytes)" \ - -S "dumping 'computed mac' (10 bytes)" - -run_test "Truncated HMAC: client disabled, server default" \ - "$P_SRV debug_level=4" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - trunc_hmac=0" \ - 0 \ - -s "dumping 'computed mac' (20 bytes)" \ - -S "dumping 'computed mac' (10 bytes)" - -run_test "Truncated HMAC: client enabled, server default" \ - "$P_SRV debug_level=4" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "dumping 'computed mac' (20 bytes)" \ - -S "dumping 'computed mac' (10 bytes)" - -run_test "Truncated HMAC: client enabled, server disabled" \ - "$P_SRV debug_level=4 trunc_hmac=0" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "dumping 'computed mac' (20 bytes)" \ - -S "dumping 'computed mac' (10 bytes)" - -run_test "Truncated HMAC: client enabled, server enabled" \ - "$P_SRV debug_level=4 trunc_hmac=1" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -S "dumping 'computed mac' (20 bytes)" \ - -s "dumping 'computed mac' (10 bytes)" - -# Tests for Encrypt-then-MAC extension - -run_test "Encrypt then MAC: default" \ - "$P_SRV debug_level=3 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - "$P_CLI debug_level=3" \ - 0 \ - -c "client hello, adding encrypt_then_mac extension" \ - -s "found encrypt then mac extension" \ - -s "server hello, adding encrypt then mac extension" \ - -c "found encrypt_then_mac extension" \ - -c "using encrypt then mac" \ - -s "using encrypt then mac" - -run_test "Encrypt then MAC: client enabled, server disabled" \ - "$P_SRV debug_level=3 etm=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - "$P_CLI debug_level=3 etm=1" \ - 0 \ - -c "client hello, adding encrypt_then_mac extension" \ - -s "found encrypt then mac extension" \ - -S "server hello, adding encrypt then mac extension" \ - -C "found encrypt_then_mac extension" \ - -C "using encrypt then mac" \ - -S "using encrypt then mac" - -run_test "Encrypt then MAC: client enabled, aead cipher" \ - "$P_SRV debug_level=3 etm=1 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-GCM-SHA256" \ - "$P_CLI debug_level=3 etm=1" \ - 0 \ - -c "client hello, adding encrypt_then_mac extension" \ - -s "found encrypt then mac extension" \ - -S "server hello, adding encrypt then mac extension" \ - -C "found encrypt_then_mac extension" \ - -C "using encrypt then mac" \ - -S "using encrypt then mac" - -run_test "Encrypt then MAC: client enabled, stream cipher" \ - "$P_SRV debug_level=3 etm=1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI debug_level=3 etm=1 arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -c "client hello, adding encrypt_then_mac extension" \ - -s "found encrypt then mac extension" \ - -S "server hello, adding encrypt then mac extension" \ - -C "found encrypt_then_mac extension" \ - -C "using encrypt then mac" \ - -S "using encrypt then mac" - -run_test "Encrypt then MAC: client disabled, server enabled" \ - "$P_SRV debug_level=3 etm=1 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - "$P_CLI debug_level=3 etm=0" \ - 0 \ - -C "client hello, adding encrypt_then_mac extension" \ - -S "found encrypt then mac extension" \ - -S "server hello, adding encrypt then mac extension" \ - -C "found encrypt_then_mac extension" \ - -C "using encrypt then mac" \ - -S "using encrypt then mac" - -run_test "Encrypt then MAC: client SSLv3, server enabled" \ - "$P_SRV debug_level=3 min_version=ssl3 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - "$P_CLI debug_level=3 force_version=ssl3" \ - 0 \ - -C "client hello, adding encrypt_then_mac extension" \ - -S "found encrypt then mac extension" \ - -S "server hello, adding encrypt then mac extension" \ - -C "found encrypt_then_mac extension" \ - -C "using encrypt then mac" \ - -S "using encrypt then mac" - -run_test "Encrypt then MAC: client enabled, server SSLv3" \ - "$P_SRV debug_level=3 force_version=ssl3 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - "$P_CLI debug_level=3 min_version=ssl3" \ - 0 \ - -c "client hello, adding encrypt_then_mac extension" \ - -s "found encrypt then mac extension" \ - -S "server hello, adding encrypt then mac extension" \ - -C "found encrypt_then_mac extension" \ - -C "using encrypt then mac" \ - -S "using encrypt then mac" - -# Tests for Extended Master Secret extension - -run_test "Extended Master Secret: default" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3" \ - 0 \ - -c "client hello, adding extended_master_secret extension" \ - -s "found extended master secret extension" \ - -s "server hello, adding extended master secret extension" \ - -c "found extended_master_secret extension" \ - -c "using extended master secret" \ - -s "using extended master secret" - -run_test "Extended Master Secret: client enabled, server disabled" \ - "$P_SRV debug_level=3 extended_ms=0" \ - "$P_CLI debug_level=3 extended_ms=1" \ - 0 \ - -c "client hello, adding extended_master_secret extension" \ - -s "found extended master secret extension" \ - -S "server hello, adding extended master secret extension" \ - -C "found extended_master_secret extension" \ - -C "using extended master secret" \ - -S "using extended master secret" - -run_test "Extended Master Secret: client disabled, server enabled" \ - "$P_SRV debug_level=3 extended_ms=1" \ - "$P_CLI debug_level=3 extended_ms=0" \ - 0 \ - -C "client hello, adding extended_master_secret extension" \ - -S "found extended master secret extension" \ - -S "server hello, adding extended master secret extension" \ - -C "found extended_master_secret extension" \ - -C "using extended master secret" \ - -S "using extended master secret" - -run_test "Extended Master Secret: client SSLv3, server enabled" \ - "$P_SRV debug_level=3 min_version=ssl3" \ - "$P_CLI debug_level=3 force_version=ssl3" \ - 0 \ - -C "client hello, adding extended_master_secret extension" \ - -S "found extended master secret extension" \ - -S "server hello, adding extended master secret extension" \ - -C "found extended_master_secret extension" \ - -C "using extended master secret" \ - -S "using extended master secret" - -run_test "Extended Master Secret: client enabled, server SSLv3" \ - "$P_SRV debug_level=3 force_version=ssl3" \ - "$P_CLI debug_level=3 min_version=ssl3" \ - 0 \ - -c "client hello, adding extended_master_secret extension" \ - -s "found extended master secret extension" \ - -S "server hello, adding extended master secret extension" \ - -C "found extended_master_secret extension" \ - -C "using extended master secret" \ - -S "using extended master secret" - -# Tests for FALLBACK_SCSV - -run_test "Fallback SCSV: default" \ - "$P_SRV debug_level=2" \ - "$P_CLI debug_level=3 force_version=tls1_1" \ - 0 \ - -C "adding FALLBACK_SCSV" \ - -S "received FALLBACK_SCSV" \ - -S "inapropriate fallback" \ - -C "is a fatal alert message (msg 86)" - -run_test "Fallback SCSV: explicitly disabled" \ - "$P_SRV debug_level=2" \ - "$P_CLI debug_level=3 force_version=tls1_1 fallback=0" \ - 0 \ - -C "adding FALLBACK_SCSV" \ - -S "received FALLBACK_SCSV" \ - -S "inapropriate fallback" \ - -C "is a fatal alert message (msg 86)" - -run_test "Fallback SCSV: enabled" \ - "$P_SRV debug_level=2" \ - "$P_CLI debug_level=3 force_version=tls1_1 fallback=1" \ - 1 \ - -c "adding FALLBACK_SCSV" \ - -s "received FALLBACK_SCSV" \ - -s "inapropriate fallback" \ - -c "is a fatal alert message (msg 86)" - -run_test "Fallback SCSV: enabled, max version" \ - "$P_SRV debug_level=2" \ - "$P_CLI debug_level=3 fallback=1" \ - 0 \ - -c "adding FALLBACK_SCSV" \ - -s "received FALLBACK_SCSV" \ - -S "inapropriate fallback" \ - -C "is a fatal alert message (msg 86)" - -requires_openssl_with_fallback_scsv -run_test "Fallback SCSV: default, openssl server" \ - "$O_SRV" \ - "$P_CLI debug_level=3 force_version=tls1_1 fallback=0" \ - 0 \ - -C "adding FALLBACK_SCSV" \ - -C "is a fatal alert message (msg 86)" - -requires_openssl_with_fallback_scsv -run_test "Fallback SCSV: enabled, openssl server" \ - "$O_SRV" \ - "$P_CLI debug_level=3 force_version=tls1_1 fallback=1" \ - 1 \ - -c "adding FALLBACK_SCSV" \ - -c "is a fatal alert message (msg 86)" - -requires_openssl_with_fallback_scsv -run_test "Fallback SCSV: disabled, openssl client" \ - "$P_SRV debug_level=2" \ - "$O_CLI -tls1_1" \ - 0 \ - -S "received FALLBACK_SCSV" \ - -S "inapropriate fallback" - -requires_openssl_with_fallback_scsv -run_test "Fallback SCSV: enabled, openssl client" \ - "$P_SRV debug_level=2" \ - "$O_CLI -tls1_1 -fallback_scsv" \ - 1 \ - -s "received FALLBACK_SCSV" \ - -s "inapropriate fallback" - -requires_openssl_with_fallback_scsv -run_test "Fallback SCSV: enabled, max version, openssl client" \ - "$P_SRV debug_level=2" \ - "$O_CLI -fallback_scsv" \ - 0 \ - -s "received FALLBACK_SCSV" \ - -S "inapropriate fallback" - -# Tests for CBC 1/n-1 record splitting - -run_test "CBC Record splitting: TLS 1.2, no splitting" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - request_size=123 force_version=tls1_2" \ - 0 \ - -s "Read from client: 123 bytes read" \ - -S "Read from client: 1 bytes read" \ - -S "122 bytes read" - -run_test "CBC Record splitting: TLS 1.1, no splitting" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - request_size=123 force_version=tls1_1" \ - 0 \ - -s "Read from client: 123 bytes read" \ - -S "Read from client: 1 bytes read" \ - -S "122 bytes read" - -run_test "CBC Record splitting: TLS 1.0, splitting" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - request_size=123 force_version=tls1" \ - 0 \ - -S "Read from client: 123 bytes read" \ - -s "Read from client: 1 bytes read" \ - -s "122 bytes read" - -run_test "CBC Record splitting: SSLv3, splitting" \ - "$P_SRV min_version=ssl3" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - request_size=123 force_version=ssl3" \ - 0 \ - -S "Read from client: 123 bytes read" \ - -s "Read from client: 1 bytes read" \ - -s "122 bytes read" - -run_test "CBC Record splitting: TLS 1.0 RC4, no splitting" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - request_size=123 force_version=tls1" \ - 0 \ - -s "Read from client: 123 bytes read" \ - -S "Read from client: 1 bytes read" \ - -S "122 bytes read" - -run_test "CBC Record splitting: TLS 1.0, splitting disabled" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - request_size=123 force_version=tls1 recsplit=0" \ - 0 \ - -s "Read from client: 123 bytes read" \ - -S "Read from client: 1 bytes read" \ - -S "122 bytes read" - -run_test "CBC Record splitting: TLS 1.0, splitting, nbio" \ - "$P_SRV nbio=2" \ - "$P_CLI nbio=2 force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA \ - request_size=123 force_version=tls1" \ - 0 \ - -S "Read from client: 123 bytes read" \ - -s "Read from client: 1 bytes read" \ - -s "122 bytes read" - -# Tests for Session Tickets - -run_test "Session resume using tickets: basic" \ - "$P_SRV debug_level=3 tickets=1" \ - "$P_CLI debug_level=3 tickets=1 reconnect=1" \ - 0 \ - -c "client hello, adding session ticket extension" \ - -s "found session ticket extension" \ - -s "server hello, adding session ticket extension" \ - -c "found session_ticket extension" \ - -c "parse new session ticket" \ - -S "session successfully restored from cache" \ - -s "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using tickets: cache disabled" \ - "$P_SRV debug_level=3 tickets=1 cache_max=0" \ - "$P_CLI debug_level=3 tickets=1 reconnect=1" \ - 0 \ - -c "client hello, adding session ticket extension" \ - -s "found session ticket extension" \ - -s "server hello, adding session ticket extension" \ - -c "found session_ticket extension" \ - -c "parse new session ticket" \ - -S "session successfully restored from cache" \ - -s "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using tickets: timeout" \ - "$P_SRV debug_level=3 tickets=1 cache_max=0 ticket_timeout=1" \ - "$P_CLI debug_level=3 tickets=1 reconnect=1 reco_delay=2" \ - 0 \ - -c "client hello, adding session ticket extension" \ - -s "found session ticket extension" \ - -s "server hello, adding session ticket extension" \ - -c "found session_ticket extension" \ - -c "parse new session ticket" \ - -S "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -S "a session has been resumed" \ - -C "a session has been resumed" - -run_test "Session resume using tickets: openssl server" \ - "$O_SRV" \ - "$P_CLI debug_level=3 tickets=1 reconnect=1" \ - 0 \ - -c "client hello, adding session ticket extension" \ - -c "found session_ticket extension" \ - -c "parse new session ticket" \ - -c "a session has been resumed" - -run_test "Session resume using tickets: openssl client" \ - "$P_SRV debug_level=3 tickets=1" \ - "( $O_CLI -sess_out $SESSION; \ - $O_CLI -sess_in $SESSION; \ - rm -f $SESSION )" \ - 0 \ - -s "found session ticket extension" \ - -s "server hello, adding session ticket extension" \ - -S "session successfully restored from cache" \ - -s "session successfully restored from ticket" \ - -s "a session has been resumed" - -# Tests for Session Resume based on session-ID and cache - -run_test "Session resume using cache: tickets enabled on client" \ - "$P_SRV debug_level=3 tickets=0" \ - "$P_CLI debug_level=3 tickets=1 reconnect=1" \ - 0 \ - -c "client hello, adding session ticket extension" \ - -s "found session ticket extension" \ - -S "server hello, adding session ticket extension" \ - -C "found session_ticket extension" \ - -C "parse new session ticket" \ - -s "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using cache: tickets enabled on server" \ - "$P_SRV debug_level=3 tickets=1" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1" \ - 0 \ - -C "client hello, adding session ticket extension" \ - -S "found session ticket extension" \ - -S "server hello, adding session ticket extension" \ - -C "found session_ticket extension" \ - -C "parse new session ticket" \ - -s "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using cache: cache_max=0" \ - "$P_SRV debug_level=3 tickets=0 cache_max=0" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1" \ - 0 \ - -S "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -S "a session has been resumed" \ - -C "a session has been resumed" - -run_test "Session resume using cache: cache_max=1" \ - "$P_SRV debug_level=3 tickets=0 cache_max=1" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1" \ - 0 \ - -s "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using cache: timeout > delay" \ - "$P_SRV debug_level=3 tickets=0" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=0" \ - 0 \ - -s "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using cache: timeout < delay" \ - "$P_SRV debug_level=3 tickets=0 cache_timeout=1" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \ - 0 \ - -S "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -S "a session has been resumed" \ - -C "a session has been resumed" - -run_test "Session resume using cache: no timeout" \ - "$P_SRV debug_level=3 tickets=0 cache_timeout=0" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \ - 0 \ - -s "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -s "a session has been resumed" \ - -c "a session has been resumed" - -run_test "Session resume using cache: openssl client" \ - "$P_SRV debug_level=3 tickets=0" \ - "( $O_CLI -sess_out $SESSION; \ - $O_CLI -sess_in $SESSION; \ - rm -f $SESSION )" \ - 0 \ - -s "found session ticket extension" \ - -S "server hello, adding session ticket extension" \ - -s "session successfully restored from cache" \ - -S "session successfully restored from ticket" \ - -s "a session has been resumed" - -run_test "Session resume using cache: openssl server" \ - "$O_SRV" \ - "$P_CLI debug_level=3 tickets=0 reconnect=1" \ - 0 \ - -C "found session_ticket extension" \ - -C "parse new session ticket" \ - -c "a session has been resumed" - -# Tests for Max Fragment Length extension - -run_test "Max fragment length: not used, reference" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3" \ - 0 \ - -c "Maximum fragment length is 16384" \ - -s "Maximum fragment length is 16384" \ - -C "client hello, adding max_fragment_length extension" \ - -S "found max fragment length extension" \ - -S "server hello, max_fragment_length extension" \ - -C "found max_fragment_length extension" - -run_test "Max fragment length: used by client" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3 max_frag_len=4096" \ - 0 \ - -c "Maximum fragment length is 4096" \ - -s "Maximum fragment length is 4096" \ - -c "client hello, adding max_fragment_length extension" \ - -s "found max fragment length extension" \ - -s "server hello, max_fragment_length extension" \ - -c "found max_fragment_length extension" - -run_test "Max fragment length: used by server" \ - "$P_SRV debug_level=3 max_frag_len=4096" \ - "$P_CLI debug_level=3" \ - 0 \ - -c "Maximum fragment length is 16384" \ - -s "Maximum fragment length is 4096" \ - -C "client hello, adding max_fragment_length extension" \ - -S "found max fragment length extension" \ - -S "server hello, max_fragment_length extension" \ - -C "found max_fragment_length extension" - -requires_gnutls -run_test "Max fragment length: gnutls server" \ - "$G_SRV" \ - "$P_CLI debug_level=3 max_frag_len=4096" \ - 0 \ - -c "Maximum fragment length is 4096" \ - -c "client hello, adding max_fragment_length extension" \ - -c "found max_fragment_length extension" - -run_test "Max fragment length: client, message just fits" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3 max_frag_len=2048 request_size=2048" \ - 0 \ - -c "Maximum fragment length is 2048" \ - -s "Maximum fragment length is 2048" \ - -c "client hello, adding max_fragment_length extension" \ - -s "found max fragment length extension" \ - -s "server hello, max_fragment_length extension" \ - -c "found max_fragment_length extension" \ - -c "2048 bytes written in 1 fragments" \ - -s "2048 bytes read" - -run_test "Max fragment length: client, larger message" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3 max_frag_len=2048 request_size=2345" \ - 0 \ - -c "Maximum fragment length is 2048" \ - -s "Maximum fragment length is 2048" \ - -c "client hello, adding max_fragment_length extension" \ - -s "found max fragment length extension" \ - -s "server hello, max_fragment_length extension" \ - -c "found max_fragment_length extension" \ - -c "2345 bytes written in 2 fragments" \ - -s "2048 bytes read" \ - -s "297 bytes read" - -run_test "Max fragment length: DTLS client, larger message" \ - "$P_SRV debug_level=3 dtls=1" \ - "$P_CLI debug_level=3 dtls=1 max_frag_len=2048 request_size=2345" \ - 1 \ - -c "Maximum fragment length is 2048" \ - -s "Maximum fragment length is 2048" \ - -c "client hello, adding max_fragment_length extension" \ - -s "found max fragment length extension" \ - -s "server hello, max_fragment_length extension" \ - -c "found max_fragment_length extension" \ - -c "fragment larger than.*maximum" - -# Tests for renegotiation - -run_test "Renegotiation: none, for reference" \ - "$P_SRV debug_level=3 exchanges=2 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -S "write hello request" - -run_test "Renegotiation: client-initiated" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -S "write hello request" - -run_test "Renegotiation: server-initiated" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 auth_mode=optional renegotiate=1" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" - -run_test "Renegotiation: double" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 auth_mode=optional renegotiate=1" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" - -run_test "Renegotiation: client-initiated, server-rejected" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=0 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ - 1 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -S "=> renegotiate" \ - -S "write hello request" \ - -c "SSL - Unexpected message at ServerHello in renegotiation" \ - -c "failed" - -run_test "Renegotiation: server-initiated, client-rejected, default" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -s "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -run_test "Renegotiation: server-initiated, client-rejected, not enforced" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ - renego_delay=-1 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -s "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -# delay 2 for 1 alert record + 1 application data record -run_test "Renegotiation: server-initiated, client-rejected, delay 2" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ - renego_delay=2 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -s "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -run_test "Renegotiation: server-initiated, client-rejected, delay 0" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ - renego_delay=0 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -s "write hello request" \ - -s "SSL - An unexpected message was received from our peer" - -run_test "Renegotiation: server-initiated, client-accepted, delay 0" \ - "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ - renego_delay=0 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -run_test "Renegotiation: periodic, just below period" \ - "$P_SRV debug_level=3 exchanges=9 renegotiation=1 renego_period=3 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=2 renegotiation=1" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -S "record counter limit reached: renegotiate" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -S "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -# one extra exchange to be able to complete renego -run_test "Renegotiation: periodic, just above period" \ - "$P_SRV debug_level=3 exchanges=9 renegotiation=1 renego_period=3 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=4 renegotiation=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -s "record counter limit reached: renegotiate" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -run_test "Renegotiation: periodic, two times period" \ - "$P_SRV debug_level=3 exchanges=9 renegotiation=1 renego_period=3 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=7 renegotiation=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -s "record counter limit reached: renegotiate" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -run_test "Renegotiation: periodic, above period, disabled" \ - "$P_SRV debug_level=3 exchanges=9 renegotiation=0 renego_period=3 auth_mode=optional" \ - "$P_CLI debug_level=3 exchanges=4 renegotiation=1" \ - 0 \ - -C "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -S "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -S "record counter limit reached: renegotiate" \ - -C "=> renegotiate" \ - -S "=> renegotiate" \ - -S "write hello request" \ - -S "SSL - An unexpected message was received from our peer" \ - -S "failed" - -run_test "Renegotiation: nbio, client-initiated" \ - "$P_SRV debug_level=3 nbio=2 exchanges=2 renegotiation=1 auth_mode=optional" \ - "$P_CLI debug_level=3 nbio=2 exchanges=2 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -S "write hello request" - -run_test "Renegotiation: nbio, server-initiated" \ - "$P_SRV debug_level=3 nbio=2 exchanges=2 renegotiation=1 renegotiate=1 auth_mode=optional" \ - "$P_CLI debug_level=3 nbio=2 exchanges=2 renegotiation=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" - -run_test "Renegotiation: openssl server, client-initiated" \ - "$O_SRV -www" \ - "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -C "ssl_hanshake() returned" \ - -C "error" \ - -c "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renegotiation: gnutls server strict, client-initiated" \ - "$G_SRV --priority=NORMAL:%SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -C "ssl_hanshake() returned" \ - -C "error" \ - -c "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renegotiation: gnutls server unsafe, client-initiated default" \ - "$G_SRV --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1" \ - 1 \ - -c "client hello, adding renegotiation extension" \ - -C "found renegotiation extension" \ - -c "=> renegotiate" \ - -c "mbedtls_ssl_handshake() returned" \ - -c "error" \ - -C "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renegotiation: gnutls server unsafe, client-inititated no legacy" \ - "$G_SRV --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1 \ - allow_legacy=0" \ - 1 \ - -c "client hello, adding renegotiation extension" \ - -C "found renegotiation extension" \ - -c "=> renegotiate" \ - -c "mbedtls_ssl_handshake() returned" \ - -c "error" \ - -C "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renegotiation: gnutls server unsafe, client-inititated legacy" \ - "$G_SRV --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1 \ - allow_legacy=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -C "found renegotiation extension" \ - -c "=> renegotiate" \ - -C "ssl_hanshake() returned" \ - -C "error" \ - -c "HTTP/1.0 200 [Oo][Kk]" - -run_test "Renegotiation: DTLS, client-initiated" \ - "$P_SRV debug_level=3 dtls=1 exchanges=2 renegotiation=1" \ - "$P_CLI debug_level=3 dtls=1 exchanges=2 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -S "write hello request" - -run_test "Renegotiation: DTLS, server-initiated" \ - "$P_SRV debug_level=3 dtls=1 exchanges=2 renegotiation=1 renegotiate=1" \ - "$P_CLI debug_level=3 dtls=1 exchanges=2 renegotiation=1 \ - read_timeout=1000 max_resend=2" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ - -s "found renegotiation extension" \ - -s "server hello, secure renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "write hello request" - -requires_gnutls -run_test "Renegotiation: DTLS, gnutls server, client-initiated" \ - "$G_SRV -u --mtu 4096" \ - "$P_CLI debug_level=3 dtls=1 exchanges=1 renegotiation=1 renegotiate=1" \ - 0 \ - -c "client hello, adding renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -C "mbedtls_ssl_handshake returned" \ - -C "error" \ - -s "Extra-header:" - -# Test for the "secure renegotation" extension only (no actual renegotiation) - -requires_gnutls -run_test "Renego ext: gnutls server strict, client default" \ - "$G_SRV --priority=NORMAL:%SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3" \ - 0 \ - -c "found renegotiation extension" \ - -C "error" \ - -c "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renego ext: gnutls server unsafe, client default" \ - "$G_SRV --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3" \ - 0 \ - -C "found renegotiation extension" \ - -C "error" \ - -c "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renego ext: gnutls server unsafe, client break legacy" \ - "$G_SRV --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - "$P_CLI debug_level=3 allow_legacy=-1" \ - 1 \ - -C "found renegotiation extension" \ - -c "error" \ - -C "HTTP/1.0 200 [Oo][Kk]" - -requires_gnutls -run_test "Renego ext: gnutls client strict, server default" \ - "$P_SRV debug_level=3" \ - "$G_CLI --priority=NORMAL:%SAFE_RENEGOTIATION" \ - 0 \ - -s "received TLS_EMPTY_RENEGOTIATION_INFO\|found renegotiation extension" \ - -s "server hello, secure renegotiation extension" - -requires_gnutls -run_test "Renego ext: gnutls client unsafe, server default" \ - "$P_SRV debug_level=3" \ - "$G_CLI --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - 0 \ - -S "received TLS_EMPTY_RENEGOTIATION_INFO\|found renegotiation extension" \ - -S "server hello, secure renegotiation extension" - -requires_gnutls -run_test "Renego ext: gnutls client unsafe, server break legacy" \ - "$P_SRV debug_level=3 allow_legacy=-1" \ - "$G_CLI --priority=NORMAL:%DISABLE_SAFE_RENEGOTIATION" \ - 1 \ - -S "received TLS_EMPTY_RENEGOTIATION_INFO\|found renegotiation extension" \ - -S "server hello, secure renegotiation extension" - -# Tests for auth_mode - -run_test "Authentication: server badcert, client required" \ - "$P_SRV crt_file=data_files/server5-badsign.crt \ - key_file=data_files/server5.key" \ - "$P_CLI debug_level=1 auth_mode=required" \ - 1 \ - -c "x509_verify_cert() returned" \ - -c "! The certificate is not correctly signed by the trusted CA" \ - -c "! mbedtls_ssl_handshake returned" \ - -c "X509 - Certificate verification failed" - -run_test "Authentication: server badcert, client optional" \ - "$P_SRV crt_file=data_files/server5-badsign.crt \ - key_file=data_files/server5.key" \ - "$P_CLI debug_level=1 auth_mode=optional" \ - 0 \ - -c "x509_verify_cert() returned" \ - -c "! The certificate is not correctly signed by the trusted CA" \ - -C "! mbedtls_ssl_handshake returned" \ - -C "X509 - Certificate verification failed" - -run_test "Authentication: server badcert, client none" \ - "$P_SRV crt_file=data_files/server5-badsign.crt \ - key_file=data_files/server5.key" \ - "$P_CLI debug_level=1 auth_mode=none" \ - 0 \ - -C "x509_verify_cert() returned" \ - -C "! The certificate is not correctly signed by the trusted CA" \ - -C "! mbedtls_ssl_handshake returned" \ - -C "X509 - Certificate verification failed" - -run_test "Authentication: client badcert, server required" \ - "$P_SRV debug_level=3 auth_mode=required" \ - "$P_CLI debug_level=3 crt_file=data_files/server5-badsign.crt \ - key_file=data_files/server5.key" \ - 1 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" \ - -s "x509_verify_cert() returned" \ - -s "! The certificate is not correctly signed by the trusted CA" \ - -s "! mbedtls_ssl_handshake returned" \ - -c "! mbedtls_ssl_handshake returned" \ - -s "X509 - Certificate verification failed" - -run_test "Authentication: client badcert, server optional" \ - "$P_SRV debug_level=3 auth_mode=optional" \ - "$P_CLI debug_level=3 crt_file=data_files/server5-badsign.crt \ - key_file=data_files/server5.key" \ - 0 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" \ - -s "x509_verify_cert() returned" \ - -s "! The certificate is not correctly signed by the trusted CA" \ - -S "! mbedtls_ssl_handshake returned" \ - -C "! mbedtls_ssl_handshake returned" \ - -S "X509 - Certificate verification failed" - -run_test "Authentication: client badcert, server none" \ - "$P_SRV debug_level=3 auth_mode=none" \ - "$P_CLI debug_level=3 crt_file=data_files/server5-badsign.crt \ - key_file=data_files/server5.key" \ - 0 \ - -s "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got no certificate request" \ - -c "skip write certificate" \ - -c "skip write certificate verify" \ - -s "skip parse certificate verify" \ - -S "x509_verify_cert() returned" \ - -S "! The certificate is not correctly signed by the trusted CA" \ - -S "! mbedtls_ssl_handshake returned" \ - -C "! mbedtls_ssl_handshake returned" \ - -S "X509 - Certificate verification failed" - -run_test "Authentication: client no cert, server optional" \ - "$P_SRV debug_level=3 auth_mode=optional" \ - "$P_CLI debug_level=3 crt_file=none key_file=none" \ - 0 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate$" \ - -C "got no certificate to send" \ - -S "SSLv3 client has no certificate" \ - -c "skip write certificate verify" \ - -s "skip parse certificate verify" \ - -s "! Certificate was missing" \ - -S "! mbedtls_ssl_handshake returned" \ - -C "! mbedtls_ssl_handshake returned" \ - -S "X509 - Certificate verification failed" - -run_test "Authentication: openssl client no cert, server optional" \ - "$P_SRV debug_level=3 auth_mode=optional" \ - "$O_CLI" \ - 0 \ - -S "skip write certificate request" \ - -s "skip parse certificate verify" \ - -s "! Certificate was missing" \ - -S "! mbedtls_ssl_handshake returned" \ - -S "X509 - Certificate verification failed" - -run_test "Authentication: client no cert, openssl server optional" \ - "$O_SRV -verify 10" \ - "$P_CLI debug_level=3 crt_file=none key_file=none" \ - 0 \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate$" \ - -c "skip write certificate verify" \ - -C "! mbedtls_ssl_handshake returned" - -run_test "Authentication: client no cert, ssl3" \ - "$P_SRV debug_level=3 auth_mode=optional force_version=ssl3" \ - "$P_CLI debug_level=3 crt_file=none key_file=none min_version=ssl3" \ - 0 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate$" \ - -c "skip write certificate verify" \ - -c "got no certificate to send" \ - -s "SSLv3 client has no certificate" \ - -s "skip parse certificate verify" \ - -s "! Certificate was missing" \ - -S "! mbedtls_ssl_handshake returned" \ - -C "! mbedtls_ssl_handshake returned" \ - -S "X509 - Certificate verification failed" - -# Tests for certificate selection based on SHA verson - -run_test "Certificate hash: client TLS 1.2 -> SHA-2" \ - "$P_SRV crt_file=data_files/server5.crt \ - key_file=data_files/server5.key \ - crt_file2=data_files/server5-sha1.crt \ - key_file2=data_files/server5.key" \ - "$P_CLI force_version=tls1_2" \ - 0 \ - -c "signed using.*ECDSA with SHA256" \ - -C "signed using.*ECDSA with SHA1" - -run_test "Certificate hash: client TLS 1.1 -> SHA-1" \ - "$P_SRV crt_file=data_files/server5.crt \ - key_file=data_files/server5.key \ - crt_file2=data_files/server5-sha1.crt \ - key_file2=data_files/server5.key" \ - "$P_CLI force_version=tls1_1" \ - 0 \ - -C "signed using.*ECDSA with SHA256" \ - -c "signed using.*ECDSA with SHA1" - -run_test "Certificate hash: client TLS 1.0 -> SHA-1" \ - "$P_SRV crt_file=data_files/server5.crt \ - key_file=data_files/server5.key \ - crt_file2=data_files/server5-sha1.crt \ - key_file2=data_files/server5.key" \ - "$P_CLI force_version=tls1" \ - 0 \ - -C "signed using.*ECDSA with SHA256" \ - -c "signed using.*ECDSA with SHA1" - -run_test "Certificate hash: client TLS 1.1, no SHA-1 -> SHA-2 (order 1)" \ - "$P_SRV crt_file=data_files/server5.crt \ - key_file=data_files/server5.key \ - crt_file2=data_files/server6.crt \ - key_file2=data_files/server6.key" \ - "$P_CLI force_version=tls1_1" \ - 0 \ - -c "serial number.*09" \ - -c "signed using.*ECDSA with SHA256" \ - -C "signed using.*ECDSA with SHA1" - -run_test "Certificate hash: client TLS 1.1, no SHA-1 -> SHA-2 (order 2)" \ - "$P_SRV crt_file=data_files/server6.crt \ - key_file=data_files/server6.key \ - crt_file2=data_files/server5.crt \ - key_file2=data_files/server5.key" \ - "$P_CLI force_version=tls1_1" \ - 0 \ - -c "serial number.*0A" \ - -c "signed using.*ECDSA with SHA256" \ - -C "signed using.*ECDSA with SHA1" - -# tests for SNI - -run_test "SNI: no SNI callback" \ - "$P_SRV debug_level=3 \ - crt_file=data_files/server5.crt key_file=data_files/server5.key" \ - "$P_CLI server_name=localhost" \ - 0 \ - -S "parse ServerName extension" \ - -c "issuer name *: C=NL, O=PolarSSL, CN=Polarssl Test EC CA" \ - -c "subject name *: C=NL, O=PolarSSL, CN=localhost" - -run_test "SNI: matching cert 1" \ - "$P_SRV debug_level=3 \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,-,polarssl.example,data_files/server1-nospace.crt,data_files/server1.key,-,-,-" \ - "$P_CLI server_name=localhost" \ - 0 \ - -s "parse ServerName extension" \ - -c "issuer name *: C=NL, O=PolarSSL, CN=PolarSSL Test CA" \ - -c "subject name *: C=NL, O=PolarSSL, CN=localhost" - -run_test "SNI: matching cert 2" \ - "$P_SRV debug_level=3 \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,-,polarssl.example,data_files/server1-nospace.crt,data_files/server1.key,-,-,-" \ - "$P_CLI server_name=polarssl.example" \ - 0 \ - -s "parse ServerName extension" \ - -c "issuer name *: C=NL, O=PolarSSL, CN=PolarSSL Test CA" \ - -c "subject name *: C=NL, O=PolarSSL, CN=polarssl.example" - -run_test "SNI: no matching cert" \ - "$P_SRV debug_level=3 \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,-,polarssl.example,data_files/server1-nospace.crt,data_files/server1.key,-,-,-" \ - "$P_CLI server_name=nonesuch.example" \ - 1 \ - -s "parse ServerName extension" \ - -s "ssl_sni_wrapper() returned" \ - -s "mbedtls_ssl_handshake returned" \ - -c "mbedtls_ssl_handshake returned" \ - -c "SSL - A fatal alert message was received from our peer" - -run_test "SNI: client auth no override: optional" \ - "$P_SRV debug_level=3 auth_mode=optional \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,-" \ - "$P_CLI debug_level=3 server_name=localhost" \ - 0 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" - -run_test "SNI: client auth override: none -> optional" \ - "$P_SRV debug_level=3 auth_mode=none \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,optional" \ - "$P_CLI debug_level=3 server_name=localhost" \ - 0 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" - -run_test "SNI: client auth override: optional -> none" \ - "$P_SRV debug_level=3 auth_mode=optional \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,none" \ - "$P_CLI debug_level=3 server_name=localhost" \ - 0 \ - -s "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got no certificate request" \ - -c "skip write certificate" \ - -c "skip write certificate verify" \ - -s "skip parse certificate verify" - -run_test "SNI: CA no override" \ - "$P_SRV debug_level=3 auth_mode=optional \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - ca_file=data_files/test-ca.crt \ - sni=localhost,data_files/server2.crt,data_files/server2.key,-,-,required" \ - "$P_CLI debug_level=3 server_name=localhost \ - crt_file=data_files/server6.crt key_file=data_files/server6.key" \ - 1 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" \ - -s "x509_verify_cert() returned" \ - -s "! The certificate is not correctly signed by the trusted CA" \ - -S "The certificate has been revoked (is on a CRL)" - -run_test "SNI: CA override" \ - "$P_SRV debug_level=3 auth_mode=optional \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - ca_file=data_files/test-ca.crt \ - sni=localhost,data_files/server2.crt,data_files/server2.key,data_files/test-ca2.crt,-,required" \ - "$P_CLI debug_level=3 server_name=localhost \ - crt_file=data_files/server6.crt key_file=data_files/server6.key" \ - 0 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" \ - -S "x509_verify_cert() returned" \ - -S "! The certificate is not correctly signed by the trusted CA" \ - -S "The certificate has been revoked (is on a CRL)" - -run_test "SNI: CA override with CRL" \ - "$P_SRV debug_level=3 auth_mode=optional \ - crt_file=data_files/server5.crt key_file=data_files/server5.key \ - ca_file=data_files/test-ca.crt \ - sni=localhost,data_files/server2.crt,data_files/server2.key,data_files/test-ca2.crt,data_files/crl-ec-sha256.pem,required" \ - "$P_CLI debug_level=3 server_name=localhost \ - crt_file=data_files/server6.crt key_file=data_files/server6.key" \ - 1 \ - -S "skip write certificate request" \ - -C "skip parse certificate request" \ - -c "got a certificate request" \ - -C "skip write certificate" \ - -C "skip write certificate verify" \ - -S "skip parse certificate verify" \ - -s "x509_verify_cert() returned" \ - -S "! The certificate is not correctly signed by the trusted CA" \ - -s "The certificate has been revoked (is on a CRL)" - -# Tests for non-blocking I/O: exercise a variety of handshake flows - -run_test "Non-blocking I/O: basic handshake" \ - "$P_SRV nbio=2 tickets=0 auth_mode=none" \ - "$P_CLI nbio=2 tickets=0" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -run_test "Non-blocking I/O: client auth" \ - "$P_SRV nbio=2 tickets=0 auth_mode=required" \ - "$P_CLI nbio=2 tickets=0" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -run_test "Non-blocking I/O: ticket" \ - "$P_SRV nbio=2 tickets=1 auth_mode=none" \ - "$P_CLI nbio=2 tickets=1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -run_test "Non-blocking I/O: ticket + client auth" \ - "$P_SRV nbio=2 tickets=1 auth_mode=required" \ - "$P_CLI nbio=2 tickets=1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -run_test "Non-blocking I/O: ticket + client auth + resume" \ - "$P_SRV nbio=2 tickets=1 auth_mode=required" \ - "$P_CLI nbio=2 tickets=1 reconnect=1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -run_test "Non-blocking I/O: ticket + resume" \ - "$P_SRV nbio=2 tickets=1 auth_mode=none" \ - "$P_CLI nbio=2 tickets=1 reconnect=1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -run_test "Non-blocking I/O: session-id resume" \ - "$P_SRV nbio=2 tickets=0 auth_mode=none" \ - "$P_CLI nbio=2 tickets=0 reconnect=1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -c "Read from server: .* bytes read" - -# Tests for version negotiation - -run_test "Version check: all -> 1.2" \ - "$P_SRV" \ - "$P_CLI" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -s "Protocol is TLSv1.2" \ - -c "Protocol is TLSv1.2" - -run_test "Version check: cli max 1.1 -> 1.1" \ - "$P_SRV" \ - "$P_CLI max_version=tls1_1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -s "Protocol is TLSv1.1" \ - -c "Protocol is TLSv1.1" - -run_test "Version check: srv max 1.1 -> 1.1" \ - "$P_SRV max_version=tls1_1" \ - "$P_CLI" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -s "Protocol is TLSv1.1" \ - -c "Protocol is TLSv1.1" - -run_test "Version check: cli+srv max 1.1 -> 1.1" \ - "$P_SRV max_version=tls1_1" \ - "$P_CLI max_version=tls1_1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -s "Protocol is TLSv1.1" \ - -c "Protocol is TLSv1.1" - -run_test "Version check: cli max 1.1, srv min 1.1 -> 1.1" \ - "$P_SRV min_version=tls1_1" \ - "$P_CLI max_version=tls1_1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -s "Protocol is TLSv1.1" \ - -c "Protocol is TLSv1.1" - -run_test "Version check: cli min 1.1, srv max 1.1 -> 1.1" \ - "$P_SRV max_version=tls1_1" \ - "$P_CLI min_version=tls1_1" \ - 0 \ - -S "mbedtls_ssl_handshake returned" \ - -C "mbedtls_ssl_handshake returned" \ - -s "Protocol is TLSv1.1" \ - -c "Protocol is TLSv1.1" - -run_test "Version check: cli min 1.2, srv max 1.1 -> fail" \ - "$P_SRV max_version=tls1_1" \ - "$P_CLI min_version=tls1_2" \ - 1 \ - -s "mbedtls_ssl_handshake returned" \ - -c "mbedtls_ssl_handshake returned" \ - -c "SSL - Handshake protocol not within min/max boundaries" - -run_test "Version check: srv min 1.2, cli max 1.1 -> fail" \ - "$P_SRV min_version=tls1_2" \ - "$P_CLI max_version=tls1_1" \ - 1 \ - -s "mbedtls_ssl_handshake returned" \ - -c "mbedtls_ssl_handshake returned" \ - -s "SSL - Handshake protocol not within min/max boundaries" - -# Tests for ALPN extension - -run_test "ALPN: none" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3" \ - 0 \ - -C "client hello, adding alpn extension" \ - -S "found alpn extension" \ - -C "got an alert message, type: \\[2:120]" \ - -S "server hello, adding alpn extension" \ - -C "found alpn extension " \ - -C "Application Layer Protocol is" \ - -S "Application Layer Protocol is" - -run_test "ALPN: client only" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3 alpn=abc,1234" \ - 0 \ - -c "client hello, adding alpn extension" \ - -s "found alpn extension" \ - -C "got an alert message, type: \\[2:120]" \ - -S "server hello, adding alpn extension" \ - -C "found alpn extension " \ - -c "Application Layer Protocol is (none)" \ - -S "Application Layer Protocol is" - -run_test "ALPN: server only" \ - "$P_SRV debug_level=3 alpn=abc,1234" \ - "$P_CLI debug_level=3" \ - 0 \ - -C "client hello, adding alpn extension" \ - -S "found alpn extension" \ - -C "got an alert message, type: \\[2:120]" \ - -S "server hello, adding alpn extension" \ - -C "found alpn extension " \ - -C "Application Layer Protocol is" \ - -s "Application Layer Protocol is (none)" - -run_test "ALPN: both, common cli1-srv1" \ - "$P_SRV debug_level=3 alpn=abc,1234" \ - "$P_CLI debug_level=3 alpn=abc,1234" \ - 0 \ - -c "client hello, adding alpn extension" \ - -s "found alpn extension" \ - -C "got an alert message, type: \\[2:120]" \ - -s "server hello, adding alpn extension" \ - -c "found alpn extension" \ - -c "Application Layer Protocol is abc" \ - -s "Application Layer Protocol is abc" - -run_test "ALPN: both, common cli2-srv1" \ - "$P_SRV debug_level=3 alpn=abc,1234" \ - "$P_CLI debug_level=3 alpn=1234,abc" \ - 0 \ - -c "client hello, adding alpn extension" \ - -s "found alpn extension" \ - -C "got an alert message, type: \\[2:120]" \ - -s "server hello, adding alpn extension" \ - -c "found alpn extension" \ - -c "Application Layer Protocol is abc" \ - -s "Application Layer Protocol is abc" - -run_test "ALPN: both, common cli1-srv2" \ - "$P_SRV debug_level=3 alpn=abc,1234" \ - "$P_CLI debug_level=3 alpn=1234,abcde" \ - 0 \ - -c "client hello, adding alpn extension" \ - -s "found alpn extension" \ - -C "got an alert message, type: \\[2:120]" \ - -s "server hello, adding alpn extension" \ - -c "found alpn extension" \ - -c "Application Layer Protocol is 1234" \ - -s "Application Layer Protocol is 1234" - -run_test "ALPN: both, no common" \ - "$P_SRV debug_level=3 alpn=abc,123" \ - "$P_CLI debug_level=3 alpn=1234,abcde" \ - 1 \ - -c "client hello, adding alpn extension" \ - -s "found alpn extension" \ - -c "got an alert message, type: \\[2:120]" \ - -S "server hello, adding alpn extension" \ - -C "found alpn extension" \ - -C "Application Layer Protocol is 1234" \ - -S "Application Layer Protocol is 1234" - - -# Tests for keyUsage in leaf certificates, part 1: -# server-side certificate/suite selection - -run_test "keyUsage srv: RSA, digitalSignature -> (EC)DHE-RSA" \ - "$P_SRV key_file=data_files/server2.key \ - crt_file=data_files/server2.ku-ds.crt" \ - "$P_CLI" \ - 0 \ - -c "Ciphersuite is TLS-[EC]*DHE-RSA-WITH-" - - -run_test "keyUsage srv: RSA, keyEncipherment -> RSA" \ - "$P_SRV key_file=data_files/server2.key \ - crt_file=data_files/server2.ku-ke.crt" \ - "$P_CLI" \ - 0 \ - -c "Ciphersuite is TLS-RSA-WITH-" - -run_test "keyUsage srv: RSA, keyAgreement -> fail" \ - "$P_SRV key_file=data_files/server2.key \ - crt_file=data_files/server2.ku-ka.crt" \ - "$P_CLI" \ - 1 \ - -C "Ciphersuite is " - -run_test "keyUsage srv: ECDSA, digitalSignature -> ECDHE-ECDSA" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.ku-ds.crt" \ - "$P_CLI" \ - 0 \ - -c "Ciphersuite is TLS-ECDHE-ECDSA-WITH-" - - -run_test "keyUsage srv: ECDSA, keyAgreement -> ECDH-" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.ku-ka.crt" \ - "$P_CLI" \ - 0 \ - -c "Ciphersuite is TLS-ECDH-" - -run_test "keyUsage srv: ECDSA, keyEncipherment -> fail" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.ku-ke.crt" \ - "$P_CLI" \ - 1 \ - -C "Ciphersuite is " - -# Tests for keyUsage in leaf certificates, part 2: -# client-side checking of server cert - -run_test "keyUsage cli: DigitalSignature+KeyEncipherment, RSA: OK" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ds_ke.crt" \ - "$P_CLI debug_level=1 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "keyUsage cli: DigitalSignature+KeyEncipherment, DHE-RSA: OK" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ds_ke.crt" \ - "$P_CLI debug_level=1 \ - force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "keyUsage cli: KeyEncipherment, RSA: OK" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ke.crt" \ - "$P_CLI debug_level=1 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "keyUsage cli: KeyEncipherment, DHE-RSA: fail" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ke.crt" \ - "$P_CLI debug_level=1 \ - force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ - 1 \ - -c "bad certificate (usage extensions)" \ - -c "Processing of the Certificate handshake message failed" \ - -C "Ciphersuite is TLS-" - -run_test "keyUsage cli: KeyEncipherment, DHE-RSA: fail, soft" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ke.crt" \ - "$P_CLI debug_level=1 auth_mode=optional \ - force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -c "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" \ - -c "! Usage does not match the keyUsage extension" - -run_test "keyUsage cli: DigitalSignature, DHE-RSA: OK" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ds.crt" \ - "$P_CLI debug_level=1 \ - force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "keyUsage cli: DigitalSignature, RSA: fail" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ds.crt" \ - "$P_CLI debug_level=1 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - 1 \ - -c "bad certificate (usage extensions)" \ - -c "Processing of the Certificate handshake message failed" \ - -C "Ciphersuite is TLS-" - -run_test "keyUsage cli: DigitalSignature, RSA: fail, soft" \ - "$O_SRV -key data_files/server2.key \ - -cert data_files/server2.ku-ds.crt" \ - "$P_CLI debug_level=1 auth_mode=optional \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -c "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" \ - -c "! Usage does not match the keyUsage extension" - -# Tests for keyUsage in leaf certificates, part 3: -# server-side checking of client cert - -run_test "keyUsage cli-auth: RSA, DigitalSignature: OK" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server2.key \ - -cert data_files/server2.ku-ds.crt" \ - 0 \ - -S "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "keyUsage cli-auth: RSA, KeyEncipherment: fail (soft)" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server2.key \ - -cert data_files/server2.ku-ke.crt" \ - 0 \ - -s "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "keyUsage cli-auth: RSA, KeyEncipherment: fail (hard)" \ - "$P_SRV debug_level=1 auth_mode=required" \ - "$O_CLI -key data_files/server2.key \ - -cert data_files/server2.ku-ke.crt" \ - 1 \ - -s "bad certificate (usage extensions)" \ - -s "Processing of the Certificate handshake message failed" - -run_test "keyUsage cli-auth: ECDSA, DigitalSignature: OK" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.ku-ds.crt" \ - 0 \ - -S "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "keyUsage cli-auth: ECDSA, KeyAgreement: fail (soft)" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.ku-ka.crt" \ - 0 \ - -s "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -# Tests for extendedKeyUsage, part 1: server-side certificate/suite selection - -run_test "extKeyUsage srv: serverAuth -> OK" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.eku-srv.crt" \ - "$P_CLI" \ - 0 - -run_test "extKeyUsage srv: serverAuth,clientAuth -> OK" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.eku-srv.crt" \ - "$P_CLI" \ - 0 - -run_test "extKeyUsage srv: codeSign,anyEKU -> OK" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.eku-cs_any.crt" \ - "$P_CLI" \ - 0 - -run_test "extKeyUsage srv: codeSign -> fail" \ - "$P_SRV key_file=data_files/server5.key \ - crt_file=data_files/server5.eku-cli.crt" \ - "$P_CLI" \ - 1 - -# Tests for extendedKeyUsage, part 2: client-side checking of server cert - -run_test "extKeyUsage cli: serverAuth -> OK" \ - "$O_SRV -key data_files/server5.key \ - -cert data_files/server5.eku-srv.crt" \ - "$P_CLI debug_level=1" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "extKeyUsage cli: serverAuth,clientAuth -> OK" \ - "$O_SRV -key data_files/server5.key \ - -cert data_files/server5.eku-srv_cli.crt" \ - "$P_CLI debug_level=1" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "extKeyUsage cli: codeSign,anyEKU -> OK" \ - "$O_SRV -key data_files/server5.key \ - -cert data_files/server5.eku-cs_any.crt" \ - "$P_CLI debug_level=1" \ - 0 \ - -C "bad certificate (usage extensions)" \ - -C "Processing of the Certificate handshake message failed" \ - -c "Ciphersuite is TLS-" - -run_test "extKeyUsage cli: codeSign -> fail" \ - "$O_SRV -key data_files/server5.key \ - -cert data_files/server5.eku-cs.crt" \ - "$P_CLI debug_level=1" \ - 1 \ - -c "bad certificate (usage extensions)" \ - -c "Processing of the Certificate handshake message failed" \ - -C "Ciphersuite is TLS-" - -# Tests for extendedKeyUsage, part 3: server-side checking of client cert - -run_test "extKeyUsage cli-auth: clientAuth -> OK" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.eku-cli.crt" \ - 0 \ - -S "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "extKeyUsage cli-auth: serverAuth,clientAuth -> OK" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.eku-srv_cli.crt" \ - 0 \ - -S "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "extKeyUsage cli-auth: codeSign,anyEKU -> OK" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.eku-cs_any.crt" \ - 0 \ - -S "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "extKeyUsage cli-auth: codeSign -> fail (soft)" \ - "$P_SRV debug_level=1 auth_mode=optional" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.eku-cs.crt" \ - 0 \ - -s "bad certificate (usage extensions)" \ - -S "Processing of the Certificate handshake message failed" - -run_test "extKeyUsage cli-auth: codeSign -> fail (hard)" \ - "$P_SRV debug_level=1 auth_mode=required" \ - "$O_CLI -key data_files/server5.key \ - -cert data_files/server5.eku-cs.crt" \ - 1 \ - -s "bad certificate (usage extensions)" \ - -s "Processing of the Certificate handshake message failed" - -# Tests for DHM parameters loading - -run_test "DHM parameters: reference" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=3" \ - 0 \ - -c "value of 'DHM: P ' (2048 bits)" \ - -c "value of 'DHM: G ' (2048 bits)" - -run_test "DHM parameters: other parameters" \ - "$P_SRV dhm_file=data_files/dhparams.pem" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=3" \ - 0 \ - -c "value of 'DHM: P ' (1024 bits)" \ - -c "value of 'DHM: G ' (2 bits)" - -# Tests for DHM client-side size checking - -run_test "DHM size: server default, client default, OK" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=1" \ - 0 \ - -C "DHM prime too short:" - -run_test "DHM size: server default, client 2048, OK" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=1 dhmlen=2048" \ - 0 \ - -C "DHM prime too short:" - -run_test "DHM size: server 1024, client default, OK" \ - "$P_SRV dhm_file=data_files/dhparams.pem" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=1" \ - 0 \ - -C "DHM prime too short:" - -run_test "DHM size: server 1000, client default, rejected" \ - "$P_SRV dhm_file=data_files/dh.1000.pem" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=1" \ - 1 \ - -c "DHM prime too short:" - -run_test "DHM size: server default, client 2049, rejected" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ - debug_level=1 dhmlen=2049" \ - 1 \ - -c "DHM prime too short:" - -# Tests for PSK callback - -run_test "PSK callback: psk, no callback" \ - "$P_SRV psk=abc123 psk_identity=foo" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=foo psk=abc123" \ - 0 \ - -S "SSL - None of the common ciphersuites is usable" \ - -S "SSL - Unknown identity received" \ - -S "SSL - Verification of the message MAC failed" - -run_test "PSK callback: no psk, no callback" \ - "$P_SRV" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=foo psk=abc123" \ - 1 \ - -s "SSL - None of the common ciphersuites is usable" \ - -S "SSL - Unknown identity received" \ - -S "SSL - Verification of the message MAC failed" - -run_test "PSK callback: callback overrides other settings" \ - "$P_SRV psk=abc123 psk_identity=foo psk_list=abc,dead,def,beef" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=foo psk=abc123" \ - 1 \ - -S "SSL - None of the common ciphersuites is usable" \ - -s "SSL - Unknown identity received" \ - -S "SSL - Verification of the message MAC failed" - -run_test "PSK callback: first id matches" \ - "$P_SRV psk_list=abc,dead,def,beef" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=abc psk=dead" \ - 0 \ - -S "SSL - None of the common ciphersuites is usable" \ - -S "SSL - Unknown identity received" \ - -S "SSL - Verification of the message MAC failed" - -run_test "PSK callback: second id matches" \ - "$P_SRV psk_list=abc,dead,def,beef" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=def psk=beef" \ - 0 \ - -S "SSL - None of the common ciphersuites is usable" \ - -S "SSL - Unknown identity received" \ - -S "SSL - Verification of the message MAC failed" - -run_test "PSK callback: no match" \ - "$P_SRV psk_list=abc,dead,def,beef" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=ghi psk=beef" \ - 1 \ - -S "SSL - None of the common ciphersuites is usable" \ - -s "SSL - Unknown identity received" \ - -S "SSL - Verification of the message MAC failed" - -run_test "PSK callback: wrong key" \ - "$P_SRV psk_list=abc,dead,def,beef" \ - "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ - psk_identity=abc psk=beef" \ - 1 \ - -S "SSL - None of the common ciphersuites is usable" \ - -S "SSL - Unknown identity received" \ - -s "SSL - Verification of the message MAC failed" - -# Tests for EC J-PAKE - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: client not configured" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3" \ - 0 \ - -C "add ciphersuite: c0ff" \ - -C "adding ecjpake_kkpp extension" \ - -S "found ecjpake kkpp extension" \ - -S "skip ecjpake kkpp extension" \ - -S "ciphersuite mismatch: ecjpake not configured" \ - -S "server hello, ecjpake kkpp extension" \ - -C "found ecjpake_kkpp extension" \ - -S "None of the common ciphersuites is usable" - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: server not configured" \ - "$P_SRV debug_level=3" \ - "$P_CLI debug_level=3 ecjpake_pw=bla \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 1 \ - -c "add ciphersuite: c0ff" \ - -c "adding ecjpake_kkpp extension" \ - -s "found ecjpake kkpp extension" \ - -s "skip ecjpake kkpp extension" \ - -s "ciphersuite mismatch: ecjpake not configured" \ - -S "server hello, ecjpake kkpp extension" \ - -C "found ecjpake_kkpp extension" \ - -s "None of the common ciphersuites is usable" - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: working, TLS" \ - "$P_SRV debug_level=3 ecjpake_pw=bla" \ - "$P_CLI debug_level=3 ecjpake_pw=bla \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 0 \ - -c "add ciphersuite: c0ff" \ - -c "adding ecjpake_kkpp extension" \ - -C "re-using cached ecjpake parameters" \ - -s "found ecjpake kkpp extension" \ - -S "skip ecjpake kkpp extension" \ - -S "ciphersuite mismatch: ecjpake not configured" \ - -s "server hello, ecjpake kkpp extension" \ - -c "found ecjpake_kkpp extension" \ - -S "None of the common ciphersuites is usable" \ - -S "SSL - Verification of the message MAC failed" - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: password mismatch, TLS" \ - "$P_SRV debug_level=3 ecjpake_pw=bla" \ - "$P_CLI debug_level=3 ecjpake_pw=bad \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 1 \ - -C "re-using cached ecjpake parameters" \ - -s "SSL - Verification of the message MAC failed" - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: working, DTLS" \ - "$P_SRV debug_level=3 dtls=1 ecjpake_pw=bla" \ - "$P_CLI debug_level=3 dtls=1 ecjpake_pw=bla \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 0 \ - -c "re-using cached ecjpake parameters" \ - -S "SSL - Verification of the message MAC failed" - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: working, DTLS, no cookie" \ - "$P_SRV debug_level=3 dtls=1 ecjpake_pw=bla cookies=0" \ - "$P_CLI debug_level=3 dtls=1 ecjpake_pw=bla \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 0 \ - -C "re-using cached ecjpake parameters" \ - -S "SSL - Verification of the message MAC failed" - -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: password mismatch, DTLS" \ - "$P_SRV debug_level=3 dtls=1 ecjpake_pw=bla" \ - "$P_CLI debug_level=3 dtls=1 ecjpake_pw=bad \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 1 \ - -c "re-using cached ecjpake parameters" \ - -s "SSL - Verification of the message MAC failed" - -# for tests with configs/config-thread.h -requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECJPAKE -run_test "ECJPAKE: working, DTLS, nolog" \ - "$P_SRV dtls=1 ecjpake_pw=bla" \ - "$P_CLI dtls=1 ecjpake_pw=bla \ - force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ - 0 - -# Tests for ciphersuites per version - -run_test "Per-version suites: SSL3" \ - "$P_SRV min_version=ssl3 version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-AES-256-CBC-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ - "$P_CLI force_version=ssl3" \ - 0 \ - -c "Ciphersuite is TLS-RSA-WITH-3DES-EDE-CBC-SHA" - -run_test "Per-version suites: TLS 1.0" \ - "$P_SRV arc4=1 version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-AES-256-CBC-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ - "$P_CLI force_version=tls1 arc4=1" \ - 0 \ - -c "Ciphersuite is TLS-RSA-WITH-AES-256-CBC-SHA" - -run_test "Per-version suites: TLS 1.1" \ - "$P_SRV version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-AES-256-CBC-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ - "$P_CLI force_version=tls1_1" \ - 0 \ - -c "Ciphersuite is TLS-RSA-WITH-AES-128-CBC-SHA" - -run_test "Per-version suites: TLS 1.2" \ - "$P_SRV version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-AES-256-CBC-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ - "$P_CLI force_version=tls1_2" \ - 0 \ - -c "Ciphersuite is TLS-RSA-WITH-AES-128-GCM-SHA256" - -# Test for ClientHello without extensions - -requires_gnutls -run_test "ClientHello without extensions" \ - "$P_SRV debug_level=3" \ - "$G_CLI --priority=NORMAL:%NO_EXTENSIONS:%DISABLE_SAFE_RENEGOTIATION" \ - 0 \ - -s "dumping 'client hello extensions' (0 bytes)" - -# Tests for mbedtls_ssl_get_bytes_avail() - -run_test "mbedtls_ssl_get_bytes_avail: no extra data" \ - "$P_SRV" \ - "$P_CLI request_size=100" \ - 0 \ - -s "Read from client: 100 bytes read$" - -run_test "mbedtls_ssl_get_bytes_avail: extra data" \ - "$P_SRV" \ - "$P_CLI request_size=500" \ - 0 \ - -s "Read from client: 500 bytes read (.*+.*)" - -# Tests for small packets - -run_test "Small packet SSLv3 BlockCipher" \ - "$P_SRV min_version=ssl3" \ - "$P_CLI request_size=1 force_version=ssl3 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet SSLv3 StreamCipher" \ - "$P_SRV min_version=ssl3 arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=1 force_version=ssl3 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.0 BlockCipher" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.0 BlockCipher without EtM" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1 etm=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.0 BlockCipher truncated MAC" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.0 StreamCipher truncated MAC" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=1 force_version=tls1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.1 BlockCipher" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.1 BlockCipher without EtM" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_1 etm=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.1 StreamCipher" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=1 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.1 BlockCipher truncated MAC" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.1 StreamCipher truncated MAC" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=1 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 BlockCipher" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 BlockCipher without EtM" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_2 etm=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 BlockCipher larger MAC" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 BlockCipher truncated MAC" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 StreamCipher" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 StreamCipher truncated MAC" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 AEAD" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CCM" \ - 0 \ - -s "Read from client: 1 bytes read" - -run_test "Small packet TLS 1.2 AEAD shorter tag" \ - "$P_SRV" \ - "$P_CLI request_size=1 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CCM-8" \ - 0 \ - -s "Read from client: 1 bytes read" - -# Test for large packets - -run_test "Large packet SSLv3 BlockCipher" \ - "$P_SRV min_version=ssl3" \ - "$P_CLI request_size=16384 force_version=ssl3 recsplit=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet SSLv3 StreamCipher" \ - "$P_SRV min_version=ssl3 arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=16384 force_version=ssl3 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.0 BlockCipher" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1 recsplit=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.0 BlockCipher truncated MAC" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1 recsplit=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.0 StreamCipher truncated MAC" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=16384 force_version=tls1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.1 BlockCipher" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.1 StreamCipher" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=16384 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.1 BlockCipher truncated MAC" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.1 StreamCipher truncated MAC" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=16384 force_version=tls1_1 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 BlockCipher" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 BlockCipher larger MAC" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 BlockCipher truncated MAC" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 StreamCipher" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 StreamCipher truncated MAC" \ - "$P_SRV arc4=1 force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ - trunc_hmac=1" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 AEAD" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CCM" \ - 0 \ - -s "Read from client: 16384 bytes read" - -run_test "Large packet TLS 1.2 AEAD shorter tag" \ - "$P_SRV" \ - "$P_CLI request_size=16384 force_version=tls1_2 \ - force_ciphersuite=TLS-RSA-WITH-AES-256-CCM-8" \ - 0 \ - -s "Read from client: 16384 bytes read" - -# Tests for DTLS HelloVerifyRequest - -run_test "DTLS cookie: enabled" \ - "$P_SRV dtls=1 debug_level=2" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -s "cookie verification failed" \ - -s "cookie verification passed" \ - -S "cookie verification skipped" \ - -c "received hello verify request" \ - -s "hello verification requested" \ - -S "SSL - The requested feature is not available" - -run_test "DTLS cookie: disabled" \ - "$P_SRV dtls=1 debug_level=2 cookies=0" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -S "cookie verification failed" \ - -S "cookie verification passed" \ - -s "cookie verification skipped" \ - -C "received hello verify request" \ - -S "hello verification requested" \ - -S "SSL - The requested feature is not available" - -run_test "DTLS cookie: default (failing)" \ - "$P_SRV dtls=1 debug_level=2 cookies=-1" \ - "$P_CLI dtls=1 debug_level=2 hs_timeout=100-400" \ - 1 \ - -s "cookie verification failed" \ - -S "cookie verification passed" \ - -S "cookie verification skipped" \ - -C "received hello verify request" \ - -S "hello verification requested" \ - -s "SSL - The requested feature is not available" - -requires_ipv6 -run_test "DTLS cookie: enabled, IPv6" \ - "$P_SRV dtls=1 debug_level=2 server_addr=::1" \ - "$P_CLI dtls=1 debug_level=2 server_addr=::1" \ - 0 \ - -s "cookie verification failed" \ - -s "cookie verification passed" \ - -S "cookie verification skipped" \ - -c "received hello verify request" \ - -s "hello verification requested" \ - -S "SSL - The requested feature is not available" - -run_test "DTLS cookie: enabled, nbio" \ - "$P_SRV dtls=1 nbio=2 debug_level=2" \ - "$P_CLI dtls=1 nbio=2 debug_level=2" \ - 0 \ - -s "cookie verification failed" \ - -s "cookie verification passed" \ - -S "cookie verification skipped" \ - -c "received hello verify request" \ - -s "hello verification requested" \ - -S "SSL - The requested feature is not available" - -# Tests for client reconnecting from the same port with DTLS - -not_with_valgrind # spurious resend -run_test "DTLS client reconnect from same port: reference" \ - "$P_SRV dtls=1 exchanges=2 read_timeout=1000" \ - "$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-1000" \ - 0 \ - -C "resend" \ - -S "The operation timed out" \ - -S "Client initiated reconnection from same port" - -not_with_valgrind # spurious resend -run_test "DTLS client reconnect from same port: reconnect" \ - "$P_SRV dtls=1 exchanges=2 read_timeout=1000" \ - "$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-1000 reconnect_hard=1" \ - 0 \ - -C "resend" \ - -S "The operation timed out" \ - -s "Client initiated reconnection from same port" - -run_test "DTLS client reconnect from same port: reconnect, nbio" \ - "$P_SRV dtls=1 exchanges=2 read_timeout=1000 nbio=2" \ - "$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-1000 reconnect_hard=1" \ - 0 \ - -S "The operation timed out" \ - -s "Client initiated reconnection from same port" - -run_test "DTLS client reconnect from same port: no cookies" \ - "$P_SRV dtls=1 exchanges=2 read_timeout=1000 cookies=0" \ - "$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-8000 reconnect_hard=1" \ - 0 \ - -s "The operation timed out" \ - -S "Client initiated reconnection from same port" - -# Tests for various cases of client authentication with DTLS -# (focused on handshake flows and message parsing) - -run_test "DTLS client auth: required" \ - "$P_SRV dtls=1 auth_mode=required" \ - "$P_CLI dtls=1" \ - 0 \ - -s "Verifying peer X.509 certificate... ok" - -run_test "DTLS client auth: optional, client has no cert" \ - "$P_SRV dtls=1 auth_mode=optional" \ - "$P_CLI dtls=1 crt_file=none key_file=none" \ - 0 \ - -s "! Certificate was missing" - -run_test "DTLS client auth: none, client has no cert" \ - "$P_SRV dtls=1 auth_mode=none" \ - "$P_CLI dtls=1 crt_file=none key_file=none debug_level=2" \ - 0 \ - -c "skip write certificate$" \ - -s "! Certificate verification was skipped" - -run_test "DTLS wrong PSK: badmac alert" \ - "$P_SRV dtls=1 psk=abc123 force_ciphersuite=TLS-PSK-WITH-AES-128-GCM-SHA256" \ - "$P_CLI dtls=1 psk=abc124" \ - 1 \ - -s "SSL - Verification of the message MAC failed" \ - -c "SSL - A fatal alert message was received from our peer" - -# Tests for receiving fragmented handshake messages with DTLS - -requires_gnutls -run_test "DTLS reassembly: no fragmentation (gnutls server)" \ - "$G_SRV -u --mtu 2048 -a" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -C "found fragmented DTLS handshake message" \ - -C "error" - -requires_gnutls -run_test "DTLS reassembly: some fragmentation (gnutls server)" \ - "$G_SRV -u --mtu 512" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -C "error" - -requires_gnutls -run_test "DTLS reassembly: more fragmentation (gnutls server)" \ - "$G_SRV -u --mtu 128" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -C "error" - -requires_gnutls -run_test "DTLS reassembly: more fragmentation, nbio (gnutls server)" \ - "$G_SRV -u --mtu 128" \ - "$P_CLI dtls=1 nbio=2 debug_level=2" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -C "error" - -requires_gnutls -run_test "DTLS reassembly: fragmentation, renego (gnutls server)" \ - "$G_SRV -u --mtu 256" \ - "$P_CLI debug_level=3 dtls=1 renegotiation=1 renegotiate=1" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -c "client hello, adding renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -C "mbedtls_ssl_handshake returned" \ - -C "error" \ - -s "Extra-header:" - -requires_gnutls -run_test "DTLS reassembly: fragmentation, nbio, renego (gnutls server)" \ - "$G_SRV -u --mtu 256" \ - "$P_CLI debug_level=3 nbio=2 dtls=1 renegotiation=1 renegotiate=1" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -c "client hello, adding renegotiation extension" \ - -c "found renegotiation extension" \ - -c "=> renegotiate" \ - -C "mbedtls_ssl_handshake returned" \ - -C "error" \ - -s "Extra-header:" - -run_test "DTLS reassembly: no fragmentation (openssl server)" \ - "$O_SRV -dtls1 -mtu 2048" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -C "found fragmented DTLS handshake message" \ - -C "error" - -run_test "DTLS reassembly: some fragmentation (openssl server)" \ - "$O_SRV -dtls1 -mtu 768" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -C "error" - -run_test "DTLS reassembly: more fragmentation (openssl server)" \ - "$O_SRV -dtls1 -mtu 256" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -C "error" - -run_test "DTLS reassembly: fragmentation, nbio (openssl server)" \ - "$O_SRV -dtls1 -mtu 256" \ - "$P_CLI dtls=1 nbio=2 debug_level=2" \ - 0 \ - -c "found fragmented DTLS handshake message" \ - -C "error" - -# Tests for specific things with "unreliable" UDP connection - -not_with_valgrind # spurious resend due to timeout -run_test "DTLS proxy: reference" \ - -p "$P_PXY" \ - "$P_SRV dtls=1 debug_level=2" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -C "replayed record" \ - -S "replayed record" \ - -C "record from another epoch" \ - -S "record from another epoch" \ - -C "discarding invalid record" \ - -S "discarding invalid record" \ - -S "resend" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -not_with_valgrind # spurious resend due to timeout -run_test "DTLS proxy: duplicate every packet" \ - -p "$P_PXY duplicate=1" \ - "$P_SRV dtls=1 debug_level=2" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -c "replayed record" \ - -s "replayed record" \ - -c "discarding invalid record" \ - -s "discarding invalid record" \ - -S "resend" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -run_test "DTLS proxy: duplicate every packet, server anti-replay off" \ - -p "$P_PXY duplicate=1" \ - "$P_SRV dtls=1 debug_level=2 anti_replay=0" \ - "$P_CLI dtls=1 debug_level=2" \ - 0 \ - -c "replayed record" \ - -S "replayed record" \ - -c "discarding invalid record" \ - -s "discarding invalid record" \ - -c "resend" \ - -s "resend" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -run_test "DTLS proxy: inject invalid AD record, default badmac_limit" \ - -p "$P_PXY bad_ad=1" \ - "$P_SRV dtls=1 debug_level=1" \ - "$P_CLI dtls=1 debug_level=1 read_timeout=100" \ - 0 \ - -c "discarding invalid record (mac)" \ - -s "discarding invalid record (mac)" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" \ - -S "too many records with bad MAC" \ - -S "Verification of the message MAC failed" - -run_test "DTLS proxy: inject invalid AD record, badmac_limit 1" \ - -p "$P_PXY bad_ad=1" \ - "$P_SRV dtls=1 debug_level=1 badmac_limit=1" \ - "$P_CLI dtls=1 debug_level=1 read_timeout=100" \ - 1 \ - -C "discarding invalid record (mac)" \ - -S "discarding invalid record (mac)" \ - -S "Extra-header:" \ - -C "HTTP/1.0 200 OK" \ - -s "too many records with bad MAC" \ - -s "Verification of the message MAC failed" - -run_test "DTLS proxy: inject invalid AD record, badmac_limit 2" \ - -p "$P_PXY bad_ad=1" \ - "$P_SRV dtls=1 debug_level=1 badmac_limit=2" \ - "$P_CLI dtls=1 debug_level=1 read_timeout=100" \ - 0 \ - -c "discarding invalid record (mac)" \ - -s "discarding invalid record (mac)" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" \ - -S "too many records with bad MAC" \ - -S "Verification of the message MAC failed" - -run_test "DTLS proxy: inject invalid AD record, badmac_limit 2, exchanges 2"\ - -p "$P_PXY bad_ad=1" \ - "$P_SRV dtls=1 debug_level=1 badmac_limit=2 exchanges=2" \ - "$P_CLI dtls=1 debug_level=1 read_timeout=100 exchanges=2" \ - 1 \ - -c "discarding invalid record (mac)" \ - -s "discarding invalid record (mac)" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" \ - -s "too many records with bad MAC" \ - -s "Verification of the message MAC failed" - -run_test "DTLS proxy: delay ChangeCipherSpec" \ - -p "$P_PXY delay_ccs=1" \ - "$P_SRV dtls=1 debug_level=1" \ - "$P_CLI dtls=1 debug_level=1" \ - 0 \ - -c "record from another epoch" \ - -s "record from another epoch" \ - -c "discarding invalid record" \ - -s "discarding invalid record" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -# Tests for "randomly unreliable connection": try a variety of flows and peers - -needs_more_time 2 -run_test "DTLS proxy: 3d (drop, delay, duplicate), \"short\" PSK handshake" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 2 -run_test "DTLS proxy: 3d, \"short\" RSA handshake" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 2 -run_test "DTLS proxy: 3d, \"short\" (no ticket, no cli_auth) FS handshake" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 2 -run_test "DTLS proxy: 3d, FS, client auth" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=required" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 2 -run_test "DTLS proxy: 3d, FS, ticket" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=1 auth_mode=none" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=1" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 2 -run_test "DTLS proxy: 3d, max handshake (FS, ticket + client auth)" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=1 auth_mode=required" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=1" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 2 -run_test "DTLS proxy: 3d, max handshake, nbio" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 nbio=2 tickets=1 \ - auth_mode=required" \ - "$P_CLI dtls=1 hs_timeout=250-10000 nbio=2 tickets=1" \ - 0 \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 4 -run_test "DTLS proxy: 3d, min handshake, resumption" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123 debug_level=3" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - debug_level=3 reconnect=1 read_timeout=1000 max_resend=10 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8" \ - 0 \ - -s "a session has been resumed" \ - -c "a session has been resumed" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 4 -run_test "DTLS proxy: 3d, min handshake, resumption, nbio" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123 debug_level=3 nbio=2" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - debug_level=3 reconnect=1 read_timeout=1000 max_resend=10 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8 nbio=2" \ - 0 \ - -s "a session has been resumed" \ - -c "a session has been resumed" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 4 -run_test "DTLS proxy: 3d, min handshake, client-initiated renego" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123 renegotiation=1 debug_level=2" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - renegotiate=1 debug_level=2 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8" \ - 0 \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 4 -run_test "DTLS proxy: 3d, min handshake, client-initiated renego, nbio" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123 renegotiation=1 debug_level=2" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - renegotiate=1 debug_level=2 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8" \ - 0 \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 4 -run_test "DTLS proxy: 3d, min handshake, server-initiated renego" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123 renegotiate=1 renegotiation=1 exchanges=4 \ - debug_level=2" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - renegotiation=1 exchanges=4 debug_level=2 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8" \ - 0 \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 4 -run_test "DTLS proxy: 3d, min handshake, server-initiated renego, nbio" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$P_SRV dtls=1 hs_timeout=250-10000 tickets=0 auth_mode=none \ - psk=abc123 renegotiate=1 renegotiation=1 exchanges=4 \ - debug_level=2 nbio=2" \ - "$P_CLI dtls=1 hs_timeout=250-10000 tickets=0 psk=abc123 \ - renegotiation=1 exchanges=4 debug_level=2 nbio=2 \ - force_ciphersuite=TLS-PSK-WITH-AES-128-CCM-8" \ - 0 \ - -c "=> renegotiate" \ - -s "=> renegotiate" \ - -s "Extra-header:" \ - -c "HTTP/1.0 200 OK" - -needs_more_time 6 -not_with_valgrind # risk of non-mbedtls peer timing out -run_test "DTLS proxy: 3d, openssl server" \ - -p "$P_PXY drop=5 delay=5 duplicate=5 protect_hvr=1" \ - "$O_SRV -dtls1 -mtu 2048" \ - "$P_CLI dtls=1 hs_timeout=250-60000 tickets=0" \ - 0 \ - -c "HTTP/1.0 200 OK" - -needs_more_time 8 -not_with_valgrind # risk of non-mbedtls peer timing out -run_test "DTLS proxy: 3d, openssl server, fragmentation" \ - -p "$P_PXY drop=5 delay=5 duplicate=5 protect_hvr=1" \ - "$O_SRV -dtls1 -mtu 768" \ - "$P_CLI dtls=1 hs_timeout=250-60000 tickets=0" \ - 0 \ - -c "HTTP/1.0 200 OK" - -needs_more_time 8 -not_with_valgrind # risk of non-mbedtls peer timing out -run_test "DTLS proxy: 3d, openssl server, fragmentation, nbio" \ - -p "$P_PXY drop=5 delay=5 duplicate=5 protect_hvr=1" \ - "$O_SRV -dtls1 -mtu 768" \ - "$P_CLI dtls=1 hs_timeout=250-60000 nbio=2 tickets=0" \ - 0 \ - -c "HTTP/1.0 200 OK" - -requires_gnutls -needs_more_time 6 -not_with_valgrind # risk of non-mbedtls peer timing out -run_test "DTLS proxy: 3d, gnutls server" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$G_SRV -u --mtu 2048 -a" \ - "$P_CLI dtls=1 hs_timeout=250-60000" \ - 0 \ - -s "Extra-header:" \ - -c "Extra-header:" - -requires_gnutls -needs_more_time 8 -not_with_valgrind # risk of non-mbedtls peer timing out -run_test "DTLS proxy: 3d, gnutls server, fragmentation" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$G_SRV -u --mtu 512" \ - "$P_CLI dtls=1 hs_timeout=250-60000" \ - 0 \ - -s "Extra-header:" \ - -c "Extra-header:" - -requires_gnutls -needs_more_time 8 -not_with_valgrind # risk of non-mbedtls peer timing out -run_test "DTLS proxy: 3d, gnutls server, fragmentation, nbio" \ - -p "$P_PXY drop=5 delay=5 duplicate=5" \ - "$G_SRV -u --mtu 512" \ - "$P_CLI dtls=1 hs_timeout=250-60000 nbio=2" \ - 0 \ - -s "Extra-header:" \ - -c "Extra-header:" - -# Final report - -echo "------------------------------------------------------------------------" - -if [ $FAILS = 0 ]; then - printf "PASSED" -else - printf "FAILED" -fi -PASSES=$(( $TESTS - $FAILS )) -echo " ($PASSES / $TESTS tests ($SKIPS skipped))" - -exit $FAILS diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/helpers.function b/build/premake/premake5/contrib/mbedtls/tests/suites/helpers.function deleted file mode 100644 index 8f681dbd42..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/helpers.function +++ /dev/null @@ -1,300 +0,0 @@ -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#define mbedtls_fprintf fprintf -#define mbedtls_calloc calloc -#define mbedtls_free free -#define mbedtls_exit exit -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#ifdef _MSC_VER -#include -typedef UINT32 uint32_t; -#else -#include -#endif - -#include -#include -#include - -#define assert(a) if( !( a ) ) \ -{ \ - mbedtls_fprintf( stderr, "Assertion Failed at %s:%d - %s\n", \ - __FILE__, __LINE__, #a ); \ - mbedtls_exit( 1 ); \ -} - -/* - * 32-bit integer manipulation macros (big endian) - */ -#ifndef GET_UINT32_BE -#define GET_UINT32_BE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ - | ( (uint32_t) (b)[(i) + 1] << 16 ) \ - | ( (uint32_t) (b)[(i) + 2] << 8 ) \ - | ( (uint32_t) (b)[(i) + 3] ); \ -} -#endif - -#ifndef PUT_UINT32_BE -#define PUT_UINT32_BE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) ); \ -} -#endif - -static int unhexify( unsigned char *obuf, const char *ibuf ) -{ - unsigned char c, c2; - int len = strlen( ibuf ) / 2; - assert( strlen( ibuf ) % 2 == 0 ); // must be even number of bytes - - while( *ibuf != 0 ) - { - c = *ibuf++; - if( c >= '0' && c <= '9' ) - c -= '0'; - else if( c >= 'a' && c <= 'f' ) - c -= 'a' - 10; - else if( c >= 'A' && c <= 'F' ) - c -= 'A' - 10; - else - assert( 0 ); - - c2 = *ibuf++; - if( c2 >= '0' && c2 <= '9' ) - c2 -= '0'; - else if( c2 >= 'a' && c2 <= 'f' ) - c2 -= 'a' - 10; - else if( c2 >= 'A' && c2 <= 'F' ) - c2 -= 'A' - 10; - else - assert( 0 ); - - *obuf++ = ( c << 4 ) | c2; - } - - return len; -} - -static void hexify( unsigned char *obuf, const unsigned char *ibuf, int len ) -{ - unsigned char l, h; - - while( len != 0 ) - { - h = *ibuf / 16; - l = *ibuf % 16; - - if( h < 10 ) - *obuf++ = '0' + h; - else - *obuf++ = 'a' + h - 10; - - if( l < 10 ) - *obuf++ = '0' + l; - else - *obuf++ = 'a' + l - 10; - - ++ibuf; - len--; - } -} - -/** - * Allocate and zeroize a buffer. - * - * If the size if zero, a pointer to a zeroized 1-byte buffer is returned. - * - * For convenience, dies if allocation fails. - */ -static unsigned char *zero_alloc( size_t len ) -{ - void *p; - size_t actual_len = ( len != 0 ) ? len : 1; - - p = mbedtls_calloc( 1, actual_len ); - assert( p != NULL ); - - memset( p, 0x00, actual_len ); - - return( p ); -} - -/** - * Allocate and fill a buffer from hex data. - * - * The buffer is sized exactly as needed. This allows to detect buffer - * overruns (including overreads) when running the test suite under valgrind. - * - * If the size if zero, a pointer to a zeroized 1-byte buffer is returned. - * - * For convenience, dies if allocation fails. - */ -static unsigned char *unhexify_alloc( const char *ibuf, size_t *olen ) -{ - unsigned char *obuf; - - *olen = strlen( ibuf ) / 2; - - if( *olen == 0 ) - return( zero_alloc( *olen ) ); - - obuf = mbedtls_calloc( 1, *olen ); - assert( obuf != NULL ); - - (void) unhexify( obuf, ibuf ); - - return( obuf ); -} - -/** - * This function just returns data from rand(). - * Although predictable and often similar on multiple - * runs, this does not result in identical random on - * each run. So do not use this if the results of a - * test depend on the random data that is generated. - * - * rng_state shall be NULL. - */ -static int rnd_std_rand( void *rng_state, unsigned char *output, size_t len ) -{ -#if !defined(__OpenBSD__) - size_t i; - - if( rng_state != NULL ) - rng_state = NULL; - - for( i = 0; i < len; ++i ) - output[i] = rand(); -#else - if( rng_state != NULL ) - rng_state = NULL; - - arc4random_buf( output, len ); -#endif /* !OpenBSD */ - - return( 0 ); -} - -/** - * This function only returns zeros - * - * rng_state shall be NULL. - */ -static int rnd_zero_rand( void *rng_state, unsigned char *output, size_t len ) -{ - if( rng_state != NULL ) - rng_state = NULL; - - memset( output, 0, len ); - - return( 0 ); -} - -typedef struct -{ - unsigned char *buf; - size_t length; -} rnd_buf_info; - -/** - * This function returns random based on a buffer it receives. - * - * rng_state shall be a pointer to a rnd_buf_info structure. - * - * The number of bytes released from the buffer on each call to - * the random function is specified by per_call. (Can be between - * 1 and 4) - * - * After the buffer is empty it will return rand(); - */ -static int rnd_buffer_rand( void *rng_state, unsigned char *output, size_t len ) -{ - rnd_buf_info *info = (rnd_buf_info *) rng_state; - size_t use_len; - - if( rng_state == NULL ) - return( rnd_std_rand( NULL, output, len ) ); - - use_len = len; - if( len > info->length ) - use_len = info->length; - - if( use_len ) - { - memcpy( output, info->buf, use_len ); - info->buf += use_len; - info->length -= use_len; - } - - if( len - use_len > 0 ) - return( rnd_std_rand( NULL, output + use_len, len - use_len ) ); - - return( 0 ); -} - -/** - * Info structure for the pseudo random function - * - * Key should be set at the start to a test-unique value. - * Do not forget endianness! - * State( v0, v1 ) should be set to zero. - */ -typedef struct -{ - uint32_t key[16]; - uint32_t v0, v1; -} rnd_pseudo_info; - -/** - * This function returns random based on a pseudo random function. - * This means the results should be identical on all systems. - * Pseudo random is based on the XTEA encryption algorithm to - * generate pseudorandom. - * - * rng_state shall be a pointer to a rnd_pseudo_info structure. - */ -static int rnd_pseudo_rand( void *rng_state, unsigned char *output, size_t len ) -{ - rnd_pseudo_info *info = (rnd_pseudo_info *) rng_state; - uint32_t i, *k, sum, delta=0x9E3779B9; - unsigned char result[4], *out = output; - - if( rng_state == NULL ) - return( rnd_std_rand( NULL, output, len ) ); - - k = info->key; - - while( len > 0 ) - { - size_t use_len = ( len > 4 ) ? 4 : len; - sum = 0; - - for( i = 0; i < 32; i++ ) - { - info->v0 += ( ( ( info->v1 << 4 ) ^ ( info->v1 >> 5 ) ) - + info->v1 ) ^ ( sum + k[sum & 3] ); - sum += delta; - info->v1 += ( ( ( info->v0 << 4 ) ^ ( info->v0 >> 5 ) ) - + info->v0 ) ^ ( sum + k[( sum>>11 ) & 3] ); - } - - PUT_UINT32_BE( info->v0, result, 0 ); - memcpy( out, result, use_len ); - len -= use_len; - out += 4; - } - - return( 0 ); -} diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/main_test.function b/build/premake/premake5/contrib/mbedtls/tests/suites/main_test.function deleted file mode 100644 index 420ee76977..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/main_test.function +++ /dev/null @@ -1,371 +0,0 @@ -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_exit exit -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_fprintf fprintf -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -static int test_errors = 0; - -SUITE_PRE_DEP -#define TEST_SUITE_ACTIVE - -static void test_fail( const char *test ) -{ - test_errors++; - if( test_errors == 1 ) - mbedtls_printf( "FAILED\n" ); - mbedtls_printf( " %s\n", test ); -} - -#define TEST_ASSERT( TEST ) \ - do { \ - if( ! (TEST) ) \ - { \ - test_fail( #TEST ); \ - goto exit; \ - } \ - } while( 0 ) - -int verify_string( char **str ) -{ - if( (*str)[0] != '"' || - (*str)[strlen( *str ) - 1] != '"' ) - { - mbedtls_printf( "Expected string (with \"\") for parameter and got: %s\n", *str ); - return( -1 ); - } - - (*str)++; - (*str)[strlen( *str ) - 1] = '\0'; - - return( 0 ); -} - -int verify_int( char *str, int *value ) -{ - size_t i; - int minus = 0; - int digits = 1; - int hex = 0; - - for( i = 0; i < strlen( str ); i++ ) - { - if( i == 0 && str[i] == '-' ) - { - minus = 1; - continue; - } - - if( ( ( minus && i == 2 ) || ( !minus && i == 1 ) ) && - str[i - 1] == '0' && str[i] == 'x' ) - { - hex = 1; - continue; - } - - if( ! ( ( str[i] >= '0' && str[i] <= '9' ) || - ( hex && ( ( str[i] >= 'a' && str[i] <= 'f' ) || - ( str[i] >= 'A' && str[i] <= 'F' ) ) ) ) ) - { - digits = 0; - break; - } - } - - if( digits ) - { - if( hex ) - *value = strtol( str, NULL, 16 ); - else - *value = strtol( str, NULL, 10 ); - - return( 0 ); - } - -MAPPING_CODE - - mbedtls_printf( "Expected integer for parameter and got: %s\n", str ); - return( -1 ); -} - -FUNCTION_CODE -SUITE_POST_DEP - -int dep_check( char *str ) -{ - if( str == NULL ) - return( 1 ); - -DEP_CHECK_CODE - - return( 1 ); -} - -int dispatch_test(int cnt, char *params[50]) -{ - int ret; - ((void) cnt); - ((void) params); - -#if defined(TEST_SUITE_ACTIVE) -DISPATCH_FUNCTION - { - mbedtls_fprintf( stdout, "FAILED\nSkipping unknown test function '%s'\n", params[0] ); - fflush( stdout ); - return( 1 ); - } -#else - return( 3 ); -#endif - return( ret ); -} - -int get_line( FILE *f, char *buf, size_t len ) -{ - char *ret; - - ret = fgets( buf, len, f ); - if( ret == NULL ) - return( -1 ); - - if( strlen( buf ) && buf[strlen(buf) - 1] == '\n' ) - buf[strlen(buf) - 1] = '\0'; - if( strlen( buf ) && buf[strlen(buf) - 1] == '\r' ) - buf[strlen(buf) - 1] = '\0'; - - return( 0 ); -} - -int parse_arguments( char *buf, size_t len, char *params[50] ) -{ - int cnt = 0, i; - char *cur = buf; - char *p = buf, *q; - - params[cnt++] = cur; - - while( *p != '\0' && p < buf + len ) - { - if( *p == '\\' ) - { - p++; - p++; - continue; - } - if( *p == ':' ) - { - if( p + 1 < buf + len ) - { - cur = p + 1; - params[cnt++] = cur; - } - *p = '\0'; - } - - p++; - } - - // Replace newlines, question marks and colons in strings - for( i = 0; i < cnt; i++ ) - { - p = params[i]; - q = params[i]; - - while( *p != '\0' ) - { - if( *p == '\\' && *(p + 1) == 'n' ) - { - p += 2; - *(q++) = '\n'; - } - else if( *p == '\\' && *(p + 1) == ':' ) - { - p += 2; - *(q++) = ':'; - } - else if( *p == '\\' && *(p + 1) == '?' ) - { - p += 2; - *(q++) = '?'; - } - else - *(q++) = *(p++); - } - *q = '\0'; - } - - return( cnt ); -} - -static int test_snprintf( size_t n, const char ref_buf[10], int ref_ret ) -{ - int ret; - char buf[10] = "xxxxxxxxx"; - const char ref[10] = "xxxxxxxxx"; - - ret = mbedtls_snprintf( buf, n, "%s", "123" ); - if( ret < 0 || (size_t) ret >= n ) - ret = -1; - - if( strncmp( ref_buf, buf, sizeof( buf ) ) != 0 || - ref_ret != ret || - memcmp( buf + n, ref + n, sizeof( buf ) - n ) != 0 ) - { - return( 1 ); - } - - return( 0 ); -} - -static int run_test_snprintf( void ) -{ - return( test_snprintf( 0, "xxxxxxxxx", -1 ) != 0 || - test_snprintf( 1, "", -1 ) != 0 || - test_snprintf( 2, "1", -1 ) != 0 || - test_snprintf( 3, "12", -1 ) != 0 || - test_snprintf( 4, "123", 3 ) != 0 || - test_snprintf( 5, "123", 3 ) != 0 ); -} - -int main() -{ - int ret, i, cnt, total_errors = 0, total_tests = 0, total_skipped = 0; - const char *filename = "TEST_FILENAME"; - FILE *file; - char buf[5000]; - char *params[50]; - void *pointer; - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \ - !defined(TEST_SUITE_MEMORY_BUFFER_ALLOC) - unsigned char alloc_buf[1000000]; - mbedtls_memory_buffer_alloc_init( alloc_buf, sizeof(alloc_buf) ); -#endif - - /* - * The C standard doesn't guarantee that all-bits-0 is the representation - * of a NULL pointer. We do however use that in our code for initializing - * structures, which should work on every modern platform. Let's be sure. - */ - memset( &pointer, 0, sizeof( void * ) ); - if( pointer != NULL ) - { - mbedtls_fprintf( stderr, "all-bits-zero is not a NULL pointer\n" ); - return( 1 ); - } - - /* - * Make sure we have a snprintf that correctly zero-terminates - */ - if( run_test_snprintf() != 0 ) - { - mbedtls_fprintf( stderr, "the snprintf implementation is broken\n" ); - return( 0 ); - } - - file = fopen( filename, "r" ); - if( file == NULL ) - { - mbedtls_fprintf( stderr, "Failed to open\n" ); - return( 1 ); - } - - while( !feof( file ) ) - { - int skip = 0; - - if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 ) - break; - mbedtls_fprintf( stdout, "%s%.66s", test_errors ? "\n" : "", buf ); - mbedtls_fprintf( stdout, " " ); - for( i = strlen( buf ) + 1; i < 67; i++ ) - mbedtls_fprintf( stdout, "." ); - mbedtls_fprintf( stdout, " " ); - fflush( stdout ); - - total_tests++; - - if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 ) - break; - cnt = parse_arguments( buf, strlen(buf), params ); - - if( strcmp( params[0], "depends_on" ) == 0 ) - { - for( i = 1; i < cnt; i++ ) - if( dep_check( params[i] ) != 0 ) - skip = 1; - - if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 ) - break; - cnt = parse_arguments( buf, strlen(buf), params ); - } - - if( skip == 0 ) - { - test_errors = 0; - ret = dispatch_test( cnt, params ); - } - - if( skip == 1 || ret == 3 ) - { - total_skipped++; - mbedtls_fprintf( stdout, "----\n" ); - fflush( stdout ); - } - else if( ret == 0 && test_errors == 0 ) - { - mbedtls_fprintf( stdout, "PASS\n" ); - fflush( stdout ); - } - else if( ret == 2 ) - { - mbedtls_fprintf( stderr, "FAILED: FATAL PARSE ERROR\n" ); - fclose(file); - mbedtls_exit( 2 ); - } - else - total_errors++; - - if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 ) - break; - if( strlen(buf) != 0 ) - { - mbedtls_fprintf( stderr, "Should be empty %d\n", (int) strlen(buf) ); - return( 1 ); - } - } - fclose(file); - - mbedtls_fprintf( stdout, "\n----------------------------------------------------------------------------\n\n"); - if( total_errors == 0 ) - mbedtls_fprintf( stdout, "PASSED" ); - else - mbedtls_fprintf( stdout, "FAILED" ); - - mbedtls_fprintf( stdout, " (%d / %d tests (%d skipped))\n", - total_tests - total_errors, total_tests, total_skipped ); - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \ - !defined(TEST_SUITE_MEMORY_BUFFER_ALLOC) -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_memory_buffer_alloc_status(); -#endif - mbedtls_memory_buffer_alloc_free(); -#endif - - return( total_errors != 0 ); -} - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cbc.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cbc.data deleted file mode 100644 index 95a9eee4e8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cbc.data +++ /dev/null @@ -1,215 +0,0 @@ -AES-128-CBC Encrypt NIST KAT #1 -aes_encrypt_cbc:"fffffffffffff8000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"8b527a6aebdaec9eaef8eda2cb7783e5":0 - -AES-128-CBC Encrypt NIST KAT #2 -aes_encrypt_cbc:"fffffffffffffc000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"43fdaf53ebbc9880c228617d6a9b548b":0 - -AES-128-CBC Encrypt NIST KAT #3 -aes_encrypt_cbc:"fffffffffffffe000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"53786104b9744b98f052c46f1c850d0b":0 - -AES-128-CBC Encrypt NIST KAT #4 -aes_encrypt_cbc:"e37b1c6aa2846f6fdb413f238b089f23":"00000000000000000000000000000000":"00000000000000000000000000000000":"43c9f7e62f5d288bb27aa40ef8fe1ea8":0 - -AES-128-CBC Encrypt NIST KAT #5 -aes_encrypt_cbc:"6c002b682483e0cabcc731c253be5674":"00000000000000000000000000000000":"00000000000000000000000000000000":"3580d19cff44f1014a7c966a69059de5":0 - -AES-128-CBC Encrypt NIST KAT #6 -aes_encrypt_cbc:"143ae8ed6555aba96110ab58893a8ae1":"00000000000000000000000000000000":"00000000000000000000000000000000":"806da864dd29d48deafbe764f8202aef":0 - -AES-128-CBC Encrypt NIST KAT #7 -aes_encrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"6a118a874519e64e9963798a503f1d35":"dc43be40be0e53712f7e2bf5ca707209":0 - -AES-128-CBC Encrypt NIST KAT #8 -aes_encrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"cb9fceec81286ca3e989bd979b0cb284":"92beedab1895a94faa69b632e5cc47ce":0 - -AES-128-CBC Encrypt NIST KAT #9 -aes_encrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"b26aeb1874e47ca8358ff22378f09144":"459264f4798f6a78bacb89c15ed3d601":0 - -AES-128-CBC Encrypt NIST KAT #10 -aes_encrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffffffffffc000000000":"90684a2ac55fe1ec2b8ebd5622520b73":0 - -AES-128-CBC Encrypt NIST KAT #11 -aes_encrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffffffffffe000000000":"7472f9a7988607ca79707795991035e6":0 - -AES-128-CBC Encrypt NIST KAT #12 -aes_encrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"fffffffffffffffffffffff000000000":"56aff089878bf3352f8df172a3ae47d8":0 - -AES-128-CBC Decrypt NIST KAT #1 -aes_decrypt_cbc:"ffffffffe00000000000000000000000":"00000000000000000000000000000000":"23f710842b9bb9c32f26648c786807ca":"00000000000000000000000000000000":0 - -AES-128-CBC Decrypt NIST KAT #2 -aes_decrypt_cbc:"fffffffff00000000000000000000000":"00000000000000000000000000000000":"44a98bf11e163f632c47ec6a49683a89":"00000000000000000000000000000000":0 - -AES-128-CBC Decrypt NIST KAT #3 -aes_decrypt_cbc:"fffffffff80000000000000000000000":"00000000000000000000000000000000":"0f18aff94274696d9b61848bd50ac5e5":"00000000000000000000000000000000":0 - -AES-128-CBC Decrypt NIST KAT #4 -aes_decrypt_cbc:"e234cdca2606b81f29408d5f6da21206":"00000000000000000000000000000000":"fff60a4740086b3b9c56195b98d91a7b":"00000000000000000000000000000000":0 - -AES-128-CBC Decrypt NIST KAT #5 -aes_decrypt_cbc:"13237c49074a3da078dc1d828bb78c6f":"00000000000000000000000000000000":"8146a08e2357f0caa30ca8c94d1a0544":"00000000000000000000000000000000":0 - -AES-128-CBC Decrypt NIST KAT #6 -aes_decrypt_cbc:"3071a2a48fe6cbd04f1a129098e308f8":"00000000000000000000000000000000":"4b98e06d356deb07ebb824e5713f7be3":"00000000000000000000000000000000":0 - -AES-128-CBC Decrypt NIST KAT #7 -aes_decrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"0336763e966d92595a567cc9ce537f5e":"f34481ec3cc627bacd5dc3fb08f273e6":0 - -AES-128-CBC Decrypt NIST KAT #8 -aes_decrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"a9a1631bf4996954ebc093957b234589":"9798c4640bad75c7c3227db910174e72":0 - -AES-128-CBC Decrypt NIST KAT #9 -aes_decrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"ff4f8391a6a40ca5b25d23bedd44a597":"96ab5c2ff612d9dfaae8c31f30c42168":0 - -AES-128-CBC Decrypt NIST KAT #10 -aes_decrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"f9b0fda0c4a898f5b9e6f661c4ce4d07":"fffffffffffffffffffffffffffffff0":0 - -AES-128-CBC Decrypt NIST KAT #11 -aes_decrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"8ade895913685c67c5269f8aae42983e":"fffffffffffffffffffffffffffffff8":0 - -AES-128-CBC Decrypt NIST KAT #12 -aes_decrypt_cbc:"00000000000000000000000000000000":"00000000000000000000000000000000":"39bde67d5c8ed8a8b1c37eb8fa9f5ac0":"fffffffffffffffffffffffffffffffc":0 - -AES-192-CBC Encrypt NIST KAT #1 -aes_encrypt_cbc:"fffffffffffffffffffffffffffffffffffffffffffffe00":"00000000000000000000000000000000":"00000000000000000000000000000000":"ddb505e6cc1384cbaec1df90b80beb20":0 - -AES-192-CBC Encrypt NIST KAT #2 -aes_encrypt_cbc:"ffffffffffffffffffffffffffffffffffffffffffffff00":"00000000000000000000000000000000":"00000000000000000000000000000000":"5674a3bed27bf4bd3622f9f5fe208306":0 - -AES-192-CBC Encrypt NIST KAT #3 -aes_encrypt_cbc:"ffffffffffffffffffffffffffffffffffffffffffffff80":"00000000000000000000000000000000":"00000000000000000000000000000000":"b687f26a89cfbfbb8e5eeac54055315e":0 - -AES-192-CBC Encrypt NIST KAT #4 -aes_encrypt_cbc:"25a39dbfd8034f71a81f9ceb55026e4037f8f6aa30ab44ce":"00000000000000000000000000000000":"00000000000000000000000000000000":"3608c344868e94555d23a120f8a5502d":0 - -AES-192-CBC Encrypt NIST KAT #5 -aes_encrypt_cbc:"e08c15411774ec4a908b64eadc6ac4199c7cd453f3aaef53":"00000000000000000000000000000000":"00000000000000000000000000000000":"77da2021935b840b7f5dcc39132da9e5":0 - -AES-192-CBC Encrypt NIST KAT #6 -aes_encrypt_cbc:"3b375a1ff7e8d44409696e6326ec9dec86138e2ae010b980":"00000000000000000000000000000000":"00000000000000000000000000000000":"3b7c24f825e3bf9873c9f14d39a0e6f4":0 - -AES-192-CBC Encrypt NIST KAT #7 -aes_encrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"51719783d3185a535bd75adc65071ce1":"4f354592ff7c8847d2d0870ca9481b7c":0 - -AES-192-CBC Encrypt NIST KAT #8 -aes_encrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"26aa49dcfe7629a8901a69a9914e6dfd":"d5e08bf9a182e857cf40b3a36ee248cc":0 - -AES-192-CBC Encrypt NIST KAT #9 -aes_encrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"941a4773058224e1ef66d10e0a6ee782":"067cd9d3749207791841562507fa9626":0 - -AES-192-CBC Encrypt NIST KAT #10 -aes_encrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffc00000000000000000000000000000":"030d7e5b64f380a7e4ea5387b5cd7f49":0 - -AES-192-CBC Encrypt NIST KAT #11 -aes_encrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffe00000000000000000000000000000":"0dc9a2610037009b698f11bb7e86c83e":0 - -AES-192-CBC Encrypt NIST KAT #12 -aes_encrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"fff00000000000000000000000000000":"0046612c766d1840c226364f1fa7ed72":0 - -AES-192-CBC Decrypt NIST KAT #1 -aes_decrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"902d88d13eae52089abd6143cfe394e9":"ffffffffe00000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #2 -aes_decrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"d49bceb3b823fedd602c305345734bd2":"fffffffff00000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #3 -aes_decrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"707b1dbb0ffa40ef7d95def421233fae":"fffffffff80000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #4 -aes_decrypt_cbc:"fffffffffffffffffffc0000000000000000000000000000":"00000000000000000000000000000000":"8dfd999be5d0cfa35732c0ddc88ff5a5":"00000000000000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #5 -aes_decrypt_cbc:"fffffffffffffffffffe0000000000000000000000000000":"00000000000000000000000000000000":"02647c76a300c3173b841487eb2bae9f":"00000000000000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #6 -aes_decrypt_cbc:"ffffffffffffffffffff0000000000000000000000000000":"00000000000000000000000000000000":"172df8b02f04b53adab028b4e01acd87":"00000000000000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #7 -aes_decrypt_cbc:"b3ad5cea1dddc214ca969ac35f37dae1a9a9d1528f89bb35":"00000000000000000000000000000000":"3cf5e1d21a17956d1dffad6a7c41c659":"00000000000000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #8 -aes_decrypt_cbc:"45899367c3132849763073c435a9288a766c8b9ec2308516":"00000000000000000000000000000000":"69fd12e8505f8ded2fdcb197a121b362":"00000000000000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #9 -aes_decrypt_cbc:"ec250e04c3903f602647b85a401a1ae7ca2f02f67fa4253e":"00000000000000000000000000000000":"8aa584e2cc4d17417a97cb9a28ba29c8":"00000000000000000000000000000000":0 - -AES-192-CBC Decrypt NIST KAT #10 -aes_decrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"c9b8135ff1b5adc413dfd053b21bd96d":"9c2d8842e5f48f57648205d39a239af1":0 - -AES-192-CBC Decrypt NIST KAT #11 -aes_decrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"4a3650c3371ce2eb35e389a171427440":"bff52510095f518ecca60af4205444bb":0 - -AES-192-CBC Decrypt NIST KAT #12 -aes_decrypt_cbc:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"4f354592ff7c8847d2d0870ca9481b7c":"51719783d3185a535bd75adc65071ce1":0 - -AES-256-CBC Encrypt NIST KAT #1 -aes_encrypt_cbc:"8000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"e35a6dcb19b201a01ebcfa8aa22b5759":0 - -AES-256-CBC Encrypt NIST KAT #2 -aes_encrypt_cbc:"c000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"b29169cdcf2d83e838125a12ee6aa400":0 - -AES-256-CBC Encrypt NIST KAT #3 -aes_encrypt_cbc:"e000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"d8f3a72fc3cdf74dfaf6c3e6b97b2fa6":0 - -AES-256-CBC Encrypt NIST KAT #4 -aes_encrypt_cbc:"dc0eba1f2232a7879ded34ed8428eeb8769b056bbaf8ad77cb65c3541430b4cf":"00000000000000000000000000000000":"00000000000000000000000000000000":"fc6aec906323480005c58e7e1ab004ad":0 - -AES-256-CBC Encrypt NIST KAT #5 -aes_encrypt_cbc:"f8be9ba615c5a952cabbca24f68f8593039624d524c816acda2c9183bd917cb9":"00000000000000000000000000000000":"00000000000000000000000000000000":"a3944b95ca0b52043584ef02151926a8":0 - -AES-256-CBC Encrypt NIST KAT #6 -aes_encrypt_cbc:"797f8b3d176dac5b7e34a2d539c4ef367a16f8635f6264737591c5c07bf57a3e":"00000000000000000000000000000000":"00000000000000000000000000000000":"a74289fe73a4c123ca189ea1e1b49ad5":0 - -AES-256-CBC Encrypt NIST KAT #7 -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"761c1fe41a18acf20d241650611d90f1":"623a52fcea5d443e48d9181ab32c7421":0 - -AES-256-CBC Encrypt NIST KAT #8 -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"8a560769d605868ad80d819bdba03771":"38f2c7ae10612415d27ca190d27da8b4":0 - -AES-256-CBC Encrypt NIST KAT #9 -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"91fbef2d15a97816060bee1feaa49afe":"1bc704f1bce135ceb810341b216d7abe":0 - -AES-256-CBC Encrypt NIST KAT #10 -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffff800000000000000000":"0d9ac756eb297695eed4d382eb126d26":0 - -AES-256-CBC Encrypt NIST KAT #11 -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffc00000000000000000":"56ede9dda3f6f141bff1757fa689c3e1":0 - -AES-256-CBC Encrypt NIST KAT #12 -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffe00000000000000000":"768f520efe0f23e61d3ec8ad9ce91774":0 - -AES-256-CBC Decrypt NIST KAT #1 -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"49af6b372135acef10132e548f217b17":"ff000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #2 -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"8bcd40f94ebb63b9f7909676e667f1e7":"ff800000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #3 -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"fe1cffb83f45dcfb38b29be438dbd3ab":"ffc00000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #4 -aes_decrypt_cbc:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00":"00000000000000000000000000000000":"cca7c3086f5f9511b31233da7cab9160":"00000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #5 -aes_decrypt_cbc:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00":"00000000000000000000000000000000":"5b40ff4ec9be536ba23035fa4f06064c":"00000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #6 -aes_decrypt_cbc:"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00":"00000000000000000000000000000000":"60eb5af8416b257149372194e8b88749":"00000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #7 -aes_decrypt_cbc:"90143ae20cd78c5d8ebdd6cb9dc1762427a96c78c639bccc41a61424564eafe1":"00000000000000000000000000000000":"798c7c005dee432b2c8ea5dfa381ecc3":"00000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #8 -aes_decrypt_cbc:"b7a5794d52737475d53d5a377200849be0260a67a2b22ced8bbef12882270d07":"00000000000000000000000000000000":"637c31dc2591a07636f646b72daabbe7":"00000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #9 -aes_decrypt_cbc:"fca02f3d5011cfc5c1e23165d413a049d4526a991827424d896fe3435e0bf68e":"00000000000000000000000000000000":"179a49c712154bbffbe6e7a84a18e220":"00000000000000000000000000000000":0 - -AES-256-CBC Decrypt NIST KAT #10 -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"5c9d844ed46f9885085e5d6a4f94c7d7":"014730f80ac625fe84f026c60bfd547d":0 - -AES-256-CBC Decrypt NIST KAT #11 -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"a9ff75bd7cf6613d3731c77c3b6d0c04":"0b24af36193ce4665f2825d7b4749c98":0 - -AES-256-CBC Decrypt NIST KAT #12 -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c7421":"761c1fe41a18acf20d241650611d90f1":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cfb.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cfb.data deleted file mode 100644 index 3f4953f526..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.cfb.data +++ /dev/null @@ -1,467 +0,0 @@ -AES-128-CFB128 Encrypt NIST KAT #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"f0000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"970014d634e2b7650777e8e84d03ccd8" - -AES-128-CFB128 Encrypt NIST KAT #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"f8000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"f17e79aed0db7e279e955b5f493875a7" - -AES-128-CFB128 Encrypt NIST KAT #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"fc000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"9ed5a75136a940d0963da379db4af26a" - -AES-128-CFB128 Encrypt NIST KAT #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"64cf9c7abc50b888af65f49d521944b2":"00000000000000000000000000000000":"00000000000000000000000000000000":"f7efc89d5dba578104016ce5ad659c05" - -AES-128-CFB128 Encrypt NIST KAT #5 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"47d6742eefcc0465dc96355e851b64d9":"00000000000000000000000000000000":"00000000000000000000000000000000":"0306194f666d183624aa230a8b264ae7" - -AES-128-CFB128 Encrypt NIST KAT #6 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"3eb39790678c56bee34bbcdeccf6cdb5":"00000000000000000000000000000000":"00000000000000000000000000000000":"858075d536d79ccee571f7d7204b1f67" - -AES-128-CFB128 Encrypt NIST KAT #7 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"00000000000000000000000000000000":"6a118a874519e64e9963798a503f1d35":"00000000000000000000000000000000":"dc43be40be0e53712f7e2bf5ca707209" - -AES-128-CFB128 Encrypt NIST KAT #8 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"00000000000000000000000000000000":"cb9fceec81286ca3e989bd979b0cb284":"00000000000000000000000000000000":"92beedab1895a94faa69b632e5cc47ce" - -AES-128-CFB128 Encrypt NIST KAT #9 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"00000000000000000000000000000000":"b26aeb1874e47ca8358ff22378f09144":"00000000000000000000000000000000":"459264f4798f6a78bacb89c15ed3d601" - -AES-128-CFB128 Encrypt NIST KAT #10 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"00000000000000000000000000000000":"fffffffffffffffffffffffffffffff0":"00000000000000000000000000000000":"f9b0fda0c4a898f5b9e6f661c4ce4d07" - -AES-128-CFB128 Encrypt NIST KAT #11 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"00000000000000000000000000000000":"fffffffffffffffffffffffffffffff8":"00000000000000000000000000000000":"8ade895913685c67c5269f8aae42983e" - -AES-128-CFB128 Encrypt NIST KAT #12 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"00000000000000000000000000000000":"fffffffffffffffffffffffffffffffc":"00000000000000000000000000000000":"39bde67d5c8ed8a8b1c37eb8fa9f5ac0" - -AES-128-CFB128 Decrypt NIST KAT #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"fffffffe000000000000000000000000":"00000000000000000000000000000000":"1114bc2028009b923f0b01915ce5e7c4":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"ffffffff000000000000000000000000":"00000000000000000000000000000000":"9c28524a16a1e1c1452971caa8d13476":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"ffffffff800000000000000000000000":"00000000000000000000000000000000":"ed62e16363638360fdd6ad62112794f0":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"3071a2a48fe6cbd04f1a129098e308f8":"00000000000000000000000000000000":"4b98e06d356deb07ebb824e5713f7be3":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #5 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"90f42ec0f68385f2ffc5dfc03a654dce":"00000000000000000000000000000000":"7a20a53d460fc9ce0423a7a0764c6cf2":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #6 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"febd9a24d8b65c1c787d50a4ed3619a9":"00000000000000000000000000000000":"f4a70d8af877f9b02b4c40df57d45b17":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #7 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"00000000000000000000000000000000":"f34481ec3cc627bacd5dc3fb08f273e6":"0336763e966d92595a567cc9ce537f5e":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #8 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"00000000000000000000000000000000":"9798c4640bad75c7c3227db910174e72":"a9a1631bf4996954ebc093957b234589":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #9 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"00000000000000000000000000000000":"96ab5c2ff612d9dfaae8c31f30c42168":"ff4f8391a6a40ca5b25d23bedd44a597":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #10 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"00000000000000000000000000000000":"ffffffffffffffff0000000000000000":"f807c3e7985fe0f5a50e2cdb25c5109e":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #11 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"00000000000000000000000000000000":"ffffffffffffffff8000000000000000":"41f992a856fb278b389a62f5d274d7e9":"00000000000000000000000000000000" - -AES-128-CFB128 Decrypt NIST KAT #12 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"00000000000000000000000000000000":"ffffffffffffffffc000000000000000":"10d3ed7a6fe15ab4d91acbc7d0767ab1":"00000000000000000000000000000000" - -AES-192-CFB128 Encrypt NIST KAT #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"fffffffffffffffffffc0000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"8dfd999be5d0cfa35732c0ddc88ff5a5" - -AES-192-CFB128 Encrypt NIST KAT #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"fffffffffffffffffffe0000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"02647c76a300c3173b841487eb2bae9f" - -AES-192-CFB128 Encrypt NIST KAT #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"ffffffffffffffffffff0000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"172df8b02f04b53adab028b4e01acd87" - -AES-192-CFB128 Encrypt NIST KAT #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"d184c36cf0dddfec39e654195006022237871a47c33d3198":"00000000000000000000000000000000":"00000000000000000000000000000000":"2e19fb60a3e1de0166f483c97824a978" - -AES-192-CFB128 Encrypt NIST KAT #5 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"4c6994ffa9dcdc805b60c2c0095334c42d95a8fc0ca5b080":"00000000000000000000000000000000":"00000000000000000000000000000000":"7656709538dd5fec41e0ce6a0f8e207d" - -AES-192-CFB128 Encrypt NIST KAT #6 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"c88f5b00a4ef9a6840e2acaf33f00a3bdc4e25895303fa72":"00000000000000000000000000000000":"00000000000000000000000000000000":"a67cf333b314d411d3c0ae6e1cfcd8f5" - -AES-192-CFB128 Encrypt NIST KAT #7 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"000000000000000000000000000000000000000000000000":"9c2d8842e5f48f57648205d39a239af1":"00000000000000000000000000000000":"c9b8135ff1b5adc413dfd053b21bd96d" - -AES-192-CFB128 Encrypt NIST KAT #8 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"000000000000000000000000000000000000000000000000":"bff52510095f518ecca60af4205444bb":"00000000000000000000000000000000":"4a3650c3371ce2eb35e389a171427440" - -AES-192-CFB128 Encrypt NIST KAT #9 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"000000000000000000000000000000000000000000000000":"51719783d3185a535bd75adc65071ce1":"00000000000000000000000000000000":"4f354592ff7c8847d2d0870ca9481b7c" - -AES-192-CFB128 Encrypt NIST KAT #10 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"000000000000000000000000000000000000000000000000":"ffffffffffffffe00000000000000000":"00000000000000000000000000000000":"f34e4a6324ea4a5c39a661c8fe5ada8f" - -AES-192-CFB128 Encrypt NIST KAT #11 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"000000000000000000000000000000000000000000000000":"fffffffffffffff00000000000000000":"00000000000000000000000000000000":"0882a16f44088d42447a29ac090ec17e" - -AES-192-CFB128 Encrypt NIST KAT #12 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"000000000000000000000000000000000000000000000000":"fffffffffffffff80000000000000000":"00000000000000000000000000000000":"3a3c15bfc11a9537c130687004e136ee" - -AES-192-CFB128 Decrypt NIST KAT #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"ffffffffffffffffffffffffffffffffffffffffffe00000":"00000000000000000000000000000000":"60136703374f64e860b48ce31f930716":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"fffffffffffffffffffffffffffffffffffffffffff00000":"00000000000000000000000000000000":"8d63a269b14d506ccc401ab8a9f1b591":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"fffffffffffffffffffffffffffffffffffffffffff80000":"00000000000000000000000000000000":"d317f81dc6aa454aee4bd4a5a5cff4bd":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"98c6b8e01e379fbd14e61af6af891596583565f2a27d59e9":"00000000000000000000000000000000":"19c80ec4a6deb7e5ed1033dda933498f":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #5 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"b3ad5cea1dddc214ca969ac35f37dae1a9a9d1528f89bb35":"00000000000000000000000000000000":"3cf5e1d21a17956d1dffad6a7c41c659":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #6 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"45899367c3132849763073c435a9288a766c8b9ec2308516":"00000000000000000000000000000000":"69fd12e8505f8ded2fdcb197a121b362":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #7 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"000000000000000000000000000000000000000000000000":"1b077a6af4b7f98229de786d7516b639":"275cfc0413d8ccb70513c3859b1d0f72":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #8 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"000000000000000000000000000000000000000000000000":"9c2d8842e5f48f57648205d39a239af1":"c9b8135ff1b5adc413dfd053b21bd96d":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #9 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"000000000000000000000000000000000000000000000000":"bff52510095f518ecca60af4205444bb":"4a3650c3371ce2eb35e389a171427440":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #10 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"000000000000000000000000000000000000000000000000":"ffffffffffffffffffff000000000000":"54d632d03aba0bd0f91877ebdd4d09cb":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #11 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"000000000000000000000000000000000000000000000000":"ffffffffffffffffffff800000000000":"d3427be7e4d27cd54f5fe37b03cf0897":"00000000000000000000000000000000" - -AES-192-CFB128 Decrypt NIST KAT #12 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"000000000000000000000000000000000000000000000000":"ffffffffffffffffffffc00000000000":"b2099795e88cc158fd75ea133d7e7fbe":"00000000000000000000000000000000" - -AES-256-CFB128 Encrypt NIST KAT #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"ffffffe000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"bbd1097a62433f79449fa97d4ee80dbf" - -AES-256-CFB128 Encrypt NIST KAT #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"fffffff000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"07058e408f5b99b0e0f061a1761b5b3b" - -AES-256-CFB128 Encrypt NIST KAT #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"fffffff800000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"00000000000000000000000000000000":"5fd1f13fa0f31e37fabde328f894eac2" - -AES-256-CFB128 Encrypt NIST KAT #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"13428b5e4c005e0636dd338405d173ab135dec2a25c22c5df0722d69dcc43887":"00000000000000000000000000000000":"00000000000000000000000000000000":"649a71545378c783e368c9ade7114f6c" - -AES-256-CFB128 Encrypt NIST KAT #5 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"07eb03a08d291d1b07408bf3512ab40c91097ac77461aad4bb859647f74f00ee":"00000000000000000000000000000000":"00000000000000000000000000000000":"47cb030da2ab051dfc6c4bf6910d12bb" - -AES-256-CFB128 Encrypt NIST KAT #6 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"90143ae20cd78c5d8ebdd6cb9dc1762427a96c78c639bccc41a61424564eafe1":"00000000000000000000000000000000":"00000000000000000000000000000000":"798c7c005dee432b2c8ea5dfa381ecc3" - -AES-256-CFB128 Encrypt NIST KAT #7 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"0b24af36193ce4665f2825d7b4749c98":"00000000000000000000000000000000":"a9ff75bd7cf6613d3731c77c3b6d0c04" - -AES-256-CFB128 Encrypt NIST KAT #8 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"761c1fe41a18acf20d241650611d90f1":"00000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c7421" - -AES-256-CFB128 Encrypt NIST KAT #9 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"8a560769d605868ad80d819bdba03771":"00000000000000000000000000000000":"38f2c7ae10612415d27ca190d27da8b4" - -AES-256-CFB128 Encrypt NIST KAT #10 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"ffffffffffffffffffffffffe0000000":"00000000000000000000000000000000":"2be1fae5048a25582a679ca10905eb80" - -AES-256-CFB128 Encrypt NIST KAT #11 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"fffffffffffffffffffffffff0000000":"00000000000000000000000000000000":"da86f292c6f41ea34fb2068df75ecc29" - -AES-256-CFB128 Encrypt NIST KAT #12 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_encrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"fffffffffffffffffffffffff8000000":"00000000000000000000000000000000":"220df19f85d69b1b562fa69a3c5beca5" - -AES-256-CFB128 Decrypt NIST KAT #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"ffffffffff800000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"be66cfea2fecd6bf0ec7b4352c99bcaa":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"ffffffffffc00000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"df31144f87a2ef523facdcf21a427804":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"ffffffffffe00000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"b5bb0f5629fb6aae5e1839a3c3625d63":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"1d85a181b54cde51f0e098095b2962fdc93b51fe9b88602b3f54130bf76a5bd9":"00000000000000000000000000000000":"531c2c38344578b84d50b3c917bbb6e1":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #5 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"dc0eba1f2232a7879ded34ed8428eeb8769b056bbaf8ad77cb65c3541430b4cf":"00000000000000000000000000000000":"fc6aec906323480005c58e7e1ab004ad":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #6 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"f8be9ba615c5a952cabbca24f68f8593039624d524c816acda2c9183bd917cb9":"00000000000000000000000000000000":"a3944b95ca0b52043584ef02151926a8":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #7 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"761c1fe41a18acf20d241650611d90f1":"623a52fcea5d443e48d9181ab32c7421":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #8 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"8a560769d605868ad80d819bdba03771":"38f2c7ae10612415d27ca190d27da8b4":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #9 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"91fbef2d15a97816060bee1feaa49afe":"1bc704f1bce135ceb810341b216d7abe":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #10 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"e0000000000000000000000000000000":"9b80eefb7ebe2d2b16247aa0efc72f5d":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #11 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"f0000000000000000000000000000000":"7f2c5ece07a98d8bee13c51177395ff7":"00000000000000000000000000000000" - -AES-256-CFB128 Decrypt NIST KAT #12 -depends_on:MBEDTLS_CIPHER_MODE_CFB -aes_decrypt_cfb128:"0000000000000000000000000000000000000000000000000000000000000000":"f8000000000000000000000000000000":"7818d800dcf6f4be1e0e94f403d1e4c2":"00000000000000000000000000000000" - -AES-128-CFB8 Encrypt NIST MMT #0 -aes_encrypt_cfb8:"c57d699d89df7cfbef71c080a6b10ac3":"fcb2bc4c006b87483978796a2ae2c42e":"61":"24" - -AES-128-CFB8 Encrypt NIST MMT #1 -aes_encrypt_cfb8:"0d8f3dc3edee60db658bb97faf46fba3":"e481fdc42e606b96a383c0a1a5520ebb":"aacd":"5066" - -AES-128-CFB8 Encrypt NIST MMT #2 -aes_encrypt_cfb8:"c8fe9bf77b930f46d2078b8c0e657cd4":"f475c64991b20eaee183a22629e21e22":"c90635":"d27691" - -AES-128-CFB8 Encrypt NIST MMT #3 -aes_encrypt_cfb8:"280cf81af5cc7e7363579c1da03390e6":"5d6cf4722d0e21f1d9ced53a0e36c342":"b2a22ced":"73f3aebf" - -AES-128-CFB8 Encrypt NIST MMT #4 -aes_encrypt_cfb8:"5d5e7f20e0a66d3e09e0e5a9912f8a46":"052d7ea0ad1f2956a23b27afe1d87b6b":"b84a90fc6d":"1a9a61c307" - -AES-128-CFB8 Encrypt NIST MMT #5 -aes_encrypt_cfb8:"ec89fb348787cf902ca973c47081438d":"528fe95c711bd13f37bc52cc9e96d45c":"14253472e99d":"cfc247e33a3b" - -AES-128-CFB8 Encrypt NIST MMT #6 -aes_encrypt_cfb8:"6607987c354809cba818639dcd185147":"552c101a0b7c0ca143af258453937fa3":"9b1a5a1369166e":"b7ab2a4cc71904" - -AES-128-CFB8 Encrypt NIST MMT #7 -aes_encrypt_cfb8:"c028e6bf2b749ffa86759f2f84e93cb0":"288c752d9faccf367e5d0cca1fa6ec3b":"324015878cdc82bf":"873250152fc6a5bb" - -AES-128-CFB8 Encrypt NIST MMT #8 -aes_encrypt_cfb8:"d01da95d2c2a61da06ea78cfba59cc30":"f9a393ad90814faf262e3a5b1d97592e":"57c1a30e48166d9640":"e9a8c3b776edd39e3d" - -AES-128-CFB8 Encrypt NIST MMT #9 -aes_encrypt_cfb8:"3a6f9159263fa6cef2a075caface5817":"0fc23662b7dbf73827f0c7de321ca36e":"87efeb8d559ed3367728":"8e9c50425614d540ce11" - -AES-128-CFB8 Decrypt NIST MMT #0 -aes_decrypt_cfb8:"03edfe082550bd5ac8ddf64f42a0547f":"52acd8dab62c981da08e51939cc08dab":"21":"09" - -AES-128-CFB8 Decrypt NIST MMT #1 -aes_decrypt_cfb8:"38cf776750162edc63c3b5dbe311ab9f":"98fbbd288872c40f1926b16ecaec1561":"4878":"eb24" - -AES-128-CFB8 Decrypt NIST MMT #2 -aes_decrypt_cfb8:"c9053c87c3e56bc5e52bd31f6545f991":"b8f9640d0923da13fe6eb87b01f0cfa0":"aeb6d2":"910949" - -AES-128-CFB8 Decrypt NIST MMT #3 -aes_decrypt_cfb8:"e96771f5f20a89ee871261d2d18e1e46":"6e86403e33396655907ae06ef192262f":"83cab2f3":"3b7f1f1c" - -AES-128-CFB8 Decrypt NIST MMT #4 -aes_decrypt_cfb8:"92ad13ecb60bde1bb3b34ce07867672b":"f95a4060b8f80e3f839d4c3ca33dad94":"49f73e652b":"17b9b9e16d" - -AES-128-CFB8 Decrypt NIST MMT #5 -aes_decrypt_cfb8:"eb57b8dd076e7bbb33d4bfc4d7ecb27e":"51135997a067dcd2e016c57134c5fa52":"b0eacbf2ca46":"ca989fa4e818" - -AES-128-CFB8 Decrypt NIST MMT #6 -aes_decrypt_cfb8:"70abc48bb1be490183f0fe3df56195ff":"e251f179174b71ee1e488ab3dd200483":"08fbef9b2a369a":"5405da1186b7e0" - -AES-128-CFB8 Decrypt NIST MMT #7 -aes_decrypt_cfb8:"1273b8e0eee1a1ca827059b4d0a3a55d":"622cab49092d026f554dd98a6441dc26":"b3cb9d8892423aeb":"d497df73afb9787c" - -AES-128-CFB8 Decrypt NIST MMT #8 -aes_decrypt_cfb8:"49437e06b6faa5f20fd98bf71f8ff554":"63c818e0d3cb5b7054ef3e1e87df0e12":"01992a986279c3685e":"f203bcd402b65919da" - -AES-128-CFB8 Decrypt NIST MMT #9 -aes_decrypt_cfb8:"6399c1dc068ba3509845628fa9ed1a96":"1157c2766c86b754df485be9dd5851df":"c9c284e9abbfe6fb11fe":"feff4e2e2458addf2a54" - -AES-192-CFB8 Encrypt NIST MMT #0 -aes_encrypt_cfb8:"32a1b0e3da368db563d7316b9779d3327e53d9a6d287ed97":"3dd0e7e21f09d5842f3a699da9b57346":"54":"6d" - -AES-192-CFB8 Encrypt NIST MMT #1 -aes_encrypt_cfb8:"a6381dcc18dd85d7729c1dce90743bbe1df580d857f5b9c4":"c0ac501fad7f4a1465daf32e18fc1a4f":"a456":"8fb6" - -AES-192-CFB8 Encrypt NIST MMT #2 -aes_encrypt_cfb8:"d08dbee4732c7ffc544c1695b201d30e795037325ef0aa18":"a1e39aeeb972a8d70aa0fc7d6fac6eac":"fd115d":"c4c016" - -AES-192-CFB8 Encrypt NIST MMT #3 -aes_encrypt_cfb8:"277185a4a440869920f523c4d578fc5bedd33aee8d2ebaf7":"67be00572f82aabc13d6e5a2e51d1f08":"88e07061":"8bb630ba" - -AES-192-CFB8 Encrypt NIST MMT #4 -aes_encrypt_cfb8:"83f70fdce47306fcbb8c21b6a8b3209f7ec185fef4deebd4":"ff73b310cf7e62ce6f501092fa6cc888":"36664e222d":"20855555d1" - -AES-192-CFB8 Encrypt NIST MMT #5 -aes_encrypt_cfb8:"c5be271a29f4a29e085e8e98196601dcb88ccc03e559a304":"9f51fa2eb8a084718f7240e47d135dce":"b57f12342a62":"73ff9bf3ec4b" - -AES-192-CFB8 Encrypt NIST MMT #6 -aes_encrypt_cfb8:"9c55322e6d495be01076d4b80371ad1479ae5636ff9861f5":"2b79cfc1ff37254dedf5924a6b61e3e0":"6dcede43c2ee65":"7c897658282220" - -AES-192-CFB8 Encrypt NIST MMT #7 -aes_encrypt_cfb8:"6e78ccece7d1b2a3c08cf0de738bee33cbbbf78d9bf4922c":"4bbe15b1e94a7b97250a2136d8804e46":"ceda42527871f802":"d92ff89045b1917f" - -AES-192-CFB8 Encrypt NIST MMT #8 -aes_encrypt_cfb8:"13c98665746f7825b37b404916240adbd1e4364be1d05c63":"0e479fbd5f3961f38b8a26be1f2d65c5":"1b0a63d73464ab3c8a":"5485847e5d3c2e2cc4" - -AES-192-CFB8 Encrypt NIST MMT #9 -aes_encrypt_cfb8:"537e7bf661fd4024a024613f15b13690f7d0c847c1e18965":"3a81f9d9d3c155b0caad5d73349476fc":"d3d8b9b984adc24237ee":"3879fea72ac99929e53a" - -AES-192-CFB8 Decrypt NIST MMT #0 -aes_decrypt_cfb8:"7dbdc15ad4034ed828dc862799b7adc9abd68eaf9d526d5d":"4359683af5a3a85c248fb7f5506f317b":"25":"2d" - -AES-192-CFB8 Decrypt NIST MMT #1 -aes_decrypt_cfb8:"3a2cdf9c9608c1dd6233d03dd855293b0885915114b25279":"e7a28ee34acc52128ddae658ec6398a2":"0678":"7b04" - -AES-192-CFB8 Decrypt NIST MMT #2 -aes_decrypt_cfb8:"c984b99a6cc5bc88003143cbe4b755e6e30ba94114f7ad1e":"41e3b8fd138f8c358dfeef420302f634":"037cf6":"658d0a" - -AES-192-CFB8 Decrypt NIST MMT #3 -aes_decrypt_cfb8:"39747da225bdc0c53c3463fd686dbe19d14157535171f91d":"77d3a5ad8bbdb169f8d29e5f21798651":"0fb0cee2":"2d191f2f" - -AES-192-CFB8 Decrypt NIST MMT #4 -aes_decrypt_cfb8:"4cd13179dfa16d01c6a8633dfc8783e723e72114c9b0d50a":"6657c46c99d642474c330d8016b71dbe":"09d914cf0b":"105a64c872" - -AES-192-CFB8 Decrypt NIST MMT #5 -aes_decrypt_cfb8:"5dcc9b8d8a456e9917cd8d54d7f7100b34964b4ed2d398a0":"4fa295a8987f1b010ce4e011fbf94156":"288c752d9fac":"98f332d37b78" - -AES-192-CFB8 Decrypt NIST MMT #6 -aes_decrypt_cfb8:"c8baf0204ef80b8e0125efe43a0bccdfd0f356b62e6c75fe":"e9144bf2cbc5720a1b4cb6f37d11edff":"c9981a34b7aa89":"56bb4c3cae53b3" - -AES-192-CFB8 Decrypt NIST MMT #7 -aes_decrypt_cfb8:"64e40763f38a63ae378c32052b0ae3aa538bb868a04ac985":"aacf65089e4b285438451ffdcd0f6389":"d8fcf83a88510a0d":"b567411bc61b0a76" - -AES-192-CFB8 Decrypt NIST MMT #8 -aes_decrypt_cfb8:"7bfdca9605f17253f203efffc92da96fde023007d22cdad0":"45c09e44036070f8a7737a5176b8cf26":"9c195b1944c4af5bfb":"89358df65c3ef14d26" - -AES-192-CFB8 Decrypt NIST MMT #9 -aes_decrypt_cfb8:"baf08b76317a65c5f07ae6f57eb0e65488659324d29709e3":"0a02846b62abb693ef31d754842eed29":"729c0b6deb75fa6eb5e8":"9895932402393dc33a60" - -AES-256-CFB8 Encrypt NIST MMT #0 -aes_encrypt_cfb8:"34e8091cee09f1bd3ebf1e8f05f51bfbd4899ef2ae006a3a0f7875052cdd46c8":"43eb4dcc4b04a80216a20e4a09a7abb5":"f9":"28" - -AES-256-CFB8 Encrypt NIST MMT #1 -aes_encrypt_cfb8:"e04e43173113109e1343393842fe6caef3f8a2e506d7f55f83dcb10444c6ad23":"a38b88a293b077fb5546636aad90d663":"2914":"69a6" - -AES-256-CFB8 Encrypt NIST MMT #2 -aes_encrypt_cfb8:"064874092f7a13cc4462247ad423d0e96edf42e8b67a5a23b7a0a6477b098e66":"338c552ff1eca14408e05d8cf9f3b31b":"b974fa":"1cff95" - -AES-256-CFB8 Encrypt NIST MMT #3 -aes_encrypt_cfb8:"56794adb0ef04aeddeabd650de736531d408837954b919002c33edfdff976cc2":"71b5526facea4236d33f1f4107e4b04f":"db774912":"f04d9d4f" - -AES-256-CFB8 Encrypt NIST MMT #4 -aes_encrypt_cfb8:"dddd7f234e7d0e6ec64560b96430986a856f2ee9805443a7946e31601ef6679d":"e20f39db0025eb24491bd06012887108":"ad1d5311ea":"19cc97a662" - -AES-256-CFB8 Encrypt NIST MMT #5 -aes_encrypt_cfb8:"ec73a760272c83f91771b3ab7b188715c6d6afb9c554feae83856e966a3863d0":"ae7bfa38fd25778fcf66ce8157f6e42e":"02fe724fbc5d":"b0eca63405f4" - -AES-256-CFB8 Encrypt NIST MMT #6 -aes_encrypt_cfb8:"a66874ca0b70fb98b37c033ec96413f339adae02acade015b9f016b459db3309":"6ed480d9e4ed031cf66bb1e07f8d5514":"b4777e6bcd9a05":"8c017397ad5bab" - -AES-256-CFB8 Encrypt NIST MMT #7 -aes_encrypt_cfb8:"a3dbbb775ada92b0b8ed1632444e21c1c86ff3eba8f628307306e766b8c15b5c":"4ec56a8e541f5cfe7b8ab947bfa4fd08":"1d70a5a82badf5ea":"1e22bebebeacd81d" - -AES-256-CFB8 Encrypt NIST MMT #8 -aes_encrypt_cfb8:"64135e67c0ca1acef3360d930afcd726c5b04861a69c1b6a48bde1daf20f3b1f":"5377a154d5f948189f9aa57b466c16b2":"a36ca5ea382a322eef":"3105016567d3174aed" - -AES-256-CFB8 Encrypt NIST MMT #9 -aes_encrypt_cfb8:"ebbb4566b5e182e0f072466b0b311df38f9175bc0213a5530bce2ec4d74f400d":"0956a48e01002c9e16376d6e308dbad1":"b0fe25ac8d3d28a2f471":"638c6823e7256fb5626e" - -AES-256-CFB8 Decrypt NIST MMT #0 -aes_decrypt_cfb8:"1687831580cb764321a9d674dbd0a9640f668b0f58ef01b87a710b3095d5f855":"6cd5bec6d6e1fd23afc543b8f80d3f89":"6f":"98" - -AES-256-CFB8 Decrypt NIST MMT #1 -aes_decrypt_cfb8:"b6b504e8b7065373ea31cd549e52eda7cb96fd1db14eddacbc420085ab48b747":"870ecd45b1241803ddaf8bad15a025d7":"17d4":"3572" - -AES-256-CFB8 Decrypt NIST MMT #2 -aes_decrypt_cfb8:"6ad3105e15fb5b742bf4fe1eb8e98c6c1ffea653107c84f6b42ed1232a0bbc21":"17534c89c4eae5dea6ea353dde7b1623":"a9841e":"f9411a" - -AES-256-CFB8 Decrypt NIST MMT #3 -aes_decrypt_cfb8:"758f3fa8b2b289f19fd59e7316be40b904eff7f565caac4570f972360e0da787":"b21335ae980898fa92c4b3069e532973":"84b35e25":"47887872" - -AES-256-CFB8 Decrypt NIST MMT #4 -aes_decrypt_cfb8:"802e854eb799500975d960a67885820d195e02ab23d51f15e5cdbcee86a1580c":"94478c4e44e2fa8d2e6bc43d384597e6":"d1e96bf1e8":"ed414b5689" - -AES-256-CFB8 Decrypt NIST MMT #5 -aes_decrypt_cfb8:"3a0c03ca9d1e5d49bb37f9041f88d159c3f1d5ce26c798f59ed54a93f0a0e600":"9aae38ba832e4b093b50444074517d20":"74410ccd12da":"8207eee2a7ab" - -AES-256-CFB8 Decrypt NIST MMT #6 -aes_decrypt_cfb8:"ee05462128fea75e919f6f436cb198f222847d698a283f5767df682d33d3ce77":"d2ad55e41887075184635112a22fc093":"ff039e89877b44":"aff3aa4c24e353" - -AES-256-CFB8 Decrypt NIST MMT #7 -aes_decrypt_cfb8:"08abbdcc3eb9c1717db1faa38dcd0893afd5e16e2596747af58f8d61ebedf9cd":"b925c8dc9a9b55a4372ea6d37d21c1eb":"e176ba99ea602fd9":"b7370050288bf600" - -AES-256-CFB8 Decrypt NIST MMT #8 -aes_decrypt_cfb8:"56d404a893fb3b3f594aab18939230b096646a37a781629fbd9270f3891a5cea":"e5906b36f2d97e6f2db19b6c7a3ce319":"c55a9a917a809a784b":"e44995bbb0fff40fee" - -AES-256-CFB8 Decrypt NIST MMT #9 -aes_decrypt_cfb8:"ec13062551e4d7291e320f565b749eea1809b663b26f2c4d53b52058b833e0ad":"fbfa5a528e20863012790c2abafb5a0c":"2bfc3f0209307140101a":"547bfd642cf6e12ed942" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.ecb.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.ecb.data deleted file mode 100644 index 6349034a69..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.ecb.data +++ /dev/null @@ -1,230 +0,0 @@ -AES-128-ECB Encrypt NIST KAT #1 -aes_encrypt_ecb:"00000000000000000000000000000000":"f34481ec3cc627bacd5dc3fb08f273e6":"0336763e966d92595a567cc9ce537f5e":0 - -AES-128-ECB Encrypt NIST KAT #2 -aes_encrypt_ecb:"00000000000000000000000000000000":"9798c4640bad75c7c3227db910174e72":"a9a1631bf4996954ebc093957b234589":0 - -AES-128-ECB Encrypt NIST KAT #3 -aes_encrypt_ecb:"00000000000000000000000000000000":"96ab5c2ff612d9dfaae8c31f30c42168":"ff4f8391a6a40ca5b25d23bedd44a597":0 - -AES-128-ECB Encrypt NIST KAT #4 -aes_encrypt_ecb:"e0000000000000000000000000000000":"00000000000000000000000000000000":"72a1da770f5d7ac4c9ef94d822affd97":0 - -AES-128-ECB Encrypt NIST KAT #5 -aes_encrypt_ecb:"f0000000000000000000000000000000":"00000000000000000000000000000000":"970014d634e2b7650777e8e84d03ccd8":0 - -AES-128-ECB Encrypt NIST KAT #6 -aes_encrypt_ecb:"f8000000000000000000000000000000":"00000000000000000000000000000000":"f17e79aed0db7e279e955b5f493875a7":0 - -AES-128-ECB Encrypt NIST KAT #7 -aes_encrypt_ecb:"fffffffffffff0000000000000000000":"00000000000000000000000000000000":"7b90785125505fad59b13c186dd66ce3":0 - -AES-128-ECB Encrypt NIST KAT #8 -aes_encrypt_ecb:"fffffffffffff8000000000000000000":"00000000000000000000000000000000":"8b527a6aebdaec9eaef8eda2cb7783e5":0 - -AES-128-ECB Encrypt NIST KAT #9 -aes_encrypt_ecb:"fffffffffffffc000000000000000000":"00000000000000000000000000000000":"43fdaf53ebbc9880c228617d6a9b548b":0 - -AES-128-ECB Encrypt NIST KAT #10 -aes_encrypt_ecb:"ffffffffffffffffffffffffffffc000":"00000000000000000000000000000000":"70c46bb30692be657f7eaa93ebad9897":0 - -AES-128-ECB Encrypt NIST KAT #11 -aes_encrypt_ecb:"ffffffffffffffffffffffffffffe000":"00000000000000000000000000000000":"323994cfb9da285a5d9642e1759b224a":0 - -AES-128-ECB Encrypt NIST KAT #12 -aes_encrypt_ecb:"fffffffffffffffffffffffffffff000":"00000000000000000000000000000000":"1dbf57877b7b17385c85d0b54851e371":0 - -AES-128-ECB Encrypt NIST KAT #13 -aes_encrypt_ecb:"00000000000000000000000000000000":"ffffffffffffffc00000000000000000":"3a4d354f02bb5a5e47d39666867f246a":0 - -AES-128-ECB Encrypt NIST KAT #14 -aes_encrypt_ecb:"00000000000000000000000000000000":"ffffffffffffffe00000000000000000":"d451b8d6e1e1a0ebb155fbbf6e7b7dc3":0 - -AES-128-ECB Encrypt NIST KAT #15 -aes_encrypt_ecb:"00000000000000000000000000000000":"fffffffffffffff00000000000000000":"6898d4f42fa7ba6a10ac05e87b9f2080":0 - -AES-128-ECB Encrypt NIST KAT #16 -aes_encrypt_ecb:"00000000000000000000000000000000":"ffffffffffffffffffffffffe0000000":"082eb8be35f442fb52668e16a591d1d6":0 - -AES-128-ECB Encrypt NIST KAT #17 -aes_encrypt_ecb:"00000000000000000000000000000000":"fffffffffffffffffffffffff0000000":"e656f9ecf5fe27ec3e4a73d00c282fb3":0 - -AES-128-ECB Encrypt NIST KAT #18 -aes_encrypt_ecb:"00000000000000000000000000000000":"fffffffffffffffffffffffff8000000":"2ca8209d63274cd9a29bb74bcd77683a":0 - -AES-128-ECB Decrypt NIST KAT #1 -aes_decrypt_ecb:"00000000000000000000000000000000":"db4f1aa530967d6732ce4715eb0ee24b":"ff000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #2 -aes_decrypt_ecb:"00000000000000000000000000000000":"a81738252621dd180a34f3455b4baa2f":"ff800000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #3 -aes_decrypt_ecb:"00000000000000000000000000000000":"77e2b508db7fd89234caf7939ee5621a":"ffc00000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #4 -aes_decrypt_ecb:"00000000000000000000000000000000":"dc43be40be0e53712f7e2bf5ca707209":"6a118a874519e64e9963798a503f1d35":0 - -AES-128-ECB Decrypt NIST KAT #5 -aes_decrypt_ecb:"00000000000000000000000000000000":"92beedab1895a94faa69b632e5cc47ce":"cb9fceec81286ca3e989bd979b0cb284":0 - -AES-128-ECB Decrypt NIST KAT #6 -aes_decrypt_ecb:"00000000000000000000000000000000":"459264f4798f6a78bacb89c15ed3d601":"b26aeb1874e47ca8358ff22378f09144":0 - -AES-128-ECB Decrypt NIST KAT #7 -aes_decrypt_ecb:"b69418a85332240dc82492353956ae0c":"a303d940ded8f0baff6f75414cac5243":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #8 -aes_decrypt_ecb:"71b5c08a1993e1362e4d0ce9b22b78d5":"c2dabd117f8a3ecabfbb11d12194d9d0":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #9 -aes_decrypt_ecb:"e234cdca2606b81f29408d5f6da21206":"fff60a4740086b3b9c56195b98d91a7b":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #10 -aes_decrypt_ecb:"ffffffffffffffff0000000000000000":"84be19e053635f09f2665e7bae85b42d":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #11 -aes_decrypt_ecb:"ffffffffffffffff8000000000000000":"32cd652842926aea4aa6137bb2be2b5e":"00000000000000000000000000000000":0 - -AES-192-ECB Encrypt NIST KAT #1 -aes_encrypt_ecb:"000000000000000000000000000000000000000000000000":"fffffffffffffffffffff80000000000":"156f07767a85a4312321f63968338a01":0 - -AES-192-ECB Encrypt NIST KAT #2 -aes_encrypt_ecb:"000000000000000000000000000000000000000000000000":"fffffffffffffffffffffc0000000000":"15eec9ebf42b9ca76897d2cd6c5a12e2":0 - -AES-192-ECB Encrypt NIST KAT #3 -aes_encrypt_ecb:"000000000000000000000000000000000000000000000000":"fffffffffffffffffffffe0000000000":"db0d3a6fdcc13f915e2b302ceeb70fd8":0 - -AES-192-ECB Encrypt NIST KAT #4 -aes_encrypt_ecb:"000000000000000000000000000000000000000000000000":"51719783d3185a535bd75adc65071ce1":"4f354592ff7c8847d2d0870ca9481b7c":0 - -AES-192-ECB Encrypt NIST KAT #5 -aes_encrypt_ecb:"000000000000000000000000000000000000000000000000":"26aa49dcfe7629a8901a69a9914e6dfd":"d5e08bf9a182e857cf40b3a36ee248cc":0 - -AES-192-ECB Encrypt NIST KAT #6 -aes_encrypt_ecb:"000000000000000000000000000000000000000000000000":"941a4773058224e1ef66d10e0a6ee782":"067cd9d3749207791841562507fa9626":0 - -AES-192-ECB Encrypt NIST KAT #7 -aes_encrypt_ecb:"d2926527e0aa9f37b45e2ec2ade5853ef807576104c7ace3":"00000000000000000000000000000000":"dd619e1cf204446112e0af2b9afa8f8c":0 - -AES-192-ECB Encrypt NIST KAT #8 -aes_encrypt_ecb:"982215f4e173dfa0fcffe5d3da41c4812c7bcc8ed3540f93":"00000000000000000000000000000000":"d4f0aae13c8fe9339fbf9e69ed0ad74d":0 - -AES-192-ECB Encrypt NIST KAT #9 -aes_encrypt_ecb:"98c6b8e01e379fbd14e61af6af891596583565f2a27d59e9":"00000000000000000000000000000000":"19c80ec4a6deb7e5ed1033dda933498f":0 - -AES-192-ECB Encrypt NIST KAT #10 -aes_encrypt_ecb:"fffffffffffffffffffffffffff800000000000000000000":"00000000000000000000000000000000":"8dd274bd0f1b58ae345d9e7233f9b8f3":0 - -AES-192-ECB Encrypt NIST KAT #11 -aes_encrypt_ecb:"fffffffffffffffffffffffffffc00000000000000000000":"00000000000000000000000000000000":"9d6bdc8f4ce5feb0f3bed2e4b9a9bb0b":0 - -AES-192-ECB Encrypt NIST KAT #12 -aes_encrypt_ecb:"fffffffffffffffffffffffffffe00000000000000000000":"00000000000000000000000000000000":"fd5548bcf3f42565f7efa94562528d46":0 - -AES-192-ECB Decrypt NIST KAT #1 -aes_decrypt_ecb:"fffffffffffffffffffffffffffffffff000000000000000":"bb2852c891c5947d2ed44032c421b85f":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #2 -aes_decrypt_ecb:"fffffffffffffffffffffffffffffffff800000000000000":"1b9f5fbd5e8a4264c0a85b80409afa5e":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #3 -aes_decrypt_ecb:"fffffffffffffffffffffffffffffffffc00000000000000":"30dab809f85a917fe924733f424ac589":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #4 -aes_decrypt_ecb:"61257134a518a0d57d9d244d45f6498cbc32f2bafc522d79":"cfe4d74002696ccf7d87b14a2f9cafc9":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #5 -aes_decrypt_ecb:"b0ab0a6a818baef2d11fa33eac947284fb7d748cfb75e570":"d2eafd86f63b109b91f5dbb3a3fb7e13":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #6 -aes_decrypt_ecb:"ee053aa011c8b428cdcc3636313c54d6a03cac01c71579d6":"9b9fdd1c5975655f539998b306a324af":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #7 -aes_decrypt_ecb:"000000000000000000000000000000000000000000000000":"275cfc0413d8ccb70513c3859b1d0f72":"1b077a6af4b7f98229de786d7516b639":0 - -AES-192-ECB Decrypt NIST KAT #8 -aes_decrypt_ecb:"000000000000000000000000000000000000000000000000":"c9b8135ff1b5adc413dfd053b21bd96d":"9c2d8842e5f48f57648205d39a239af1":0 - -AES-192-ECB Decrypt NIST KAT #9 -aes_decrypt_ecb:"000000000000000000000000000000000000000000000000":"4a3650c3371ce2eb35e389a171427440":"bff52510095f518ecca60af4205444bb":0 - -AES-192-ECB Decrypt NIST KAT #10 -aes_decrypt_ecb:"000000000000000000000000000000000000000000000000":"b2099795e88cc158fd75ea133d7e7fbe":"ffffffffffffffffffffc00000000000":0 - -AES-192-ECB Decrypt NIST KAT #11 -aes_decrypt_ecb:"000000000000000000000000000000000000000000000000":"a6cae46fb6fadfe7a2c302a34242817b":"ffffffffffffffffffffe00000000000":0 - -AES-192-ECB Decrypt NIST KAT #12 -aes_decrypt_ecb:"000000000000000000000000000000000000000000000000":"026a7024d6a902e0b3ffccbaa910cc3f":"fffffffffffffffffffff00000000000":0 - -AES-256-ECB Encrypt NIST KAT #1 -aes_encrypt_ecb:"c1cc358b449909a19436cfbb3f852ef8bcb5ed12ac7058325f56e6099aab1a1c":"00000000000000000000000000000000":"352065272169abf9856843927d0674fd":0 - -AES-256-ECB Encrypt NIST KAT #2 -aes_encrypt_ecb:"984ca75f4ee8d706f46c2d98c0bf4a45f5b00d791c2dfeb191b5ed8e420fd627":"00000000000000000000000000000000":"4307456a9e67813b452e15fa8fffe398":0 - -AES-256-ECB Encrypt NIST KAT #3 -aes_encrypt_ecb:"b43d08a447ac8609baadae4ff12918b9f68fc1653f1269222f123981ded7a92f":"00000000000000000000000000000000":"4663446607354989477a5c6f0f007ef4":0 - -AES-256-ECB Encrypt NIST KAT #4 -aes_encrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"0b24af36193ce4665f2825d7b4749c98":"a9ff75bd7cf6613d3731c77c3b6d0c04":0 - -AES-256-ECB Encrypt NIST KAT #5 -aes_encrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"761c1fe41a18acf20d241650611d90f1":"623a52fcea5d443e48d9181ab32c7421":0 - -AES-256-ECB Encrypt NIST KAT #6 -aes_encrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"8a560769d605868ad80d819bdba03771":"38f2c7ae10612415d27ca190d27da8b4":0 - -AES-256-ECB Encrypt NIST KAT #7 -aes_encrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"ffffff80000000000000000000000000":"36aff0ef7bf3280772cf4cac80a0d2b2":0 - -AES-256-ECB Encrypt NIST KAT #8 -aes_encrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"ffffffc0000000000000000000000000":"1f8eedea0f62a1406d58cfc3ecea72cf":0 - -AES-256-ECB Encrypt NIST KAT #9 -aes_encrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"ffffffe0000000000000000000000000":"abf4154a3375a1d3e6b1d454438f95a6":0 - -AES-256-ECB Encrypt NIST KAT #10 -aes_encrypt_ecb:"ffffffffffffffffffffffffffffffffffff8000000000000000000000000000":"00000000000000000000000000000000":"45d089c36d5c5a4efc689e3b0de10dd5":0 - -AES-256-ECB Encrypt NIST KAT #11 -aes_encrypt_ecb:"ffffffffffffffffffffffffffffffffffffc000000000000000000000000000":"00000000000000000000000000000000":"b4da5df4becb5462e03a0ed00d295629":0 - -AES-256-ECB Encrypt NIST KAT #12 -aes_encrypt_ecb:"ffffffffffffffffffffffffffffffffffffe000000000000000000000000000":"00000000000000000000000000000000":"dcf4e129136c1a4b7a0f38935cc34b2b":0 - -AES-256-ECB Decrypt NIST KAT #1 -aes_decrypt_ecb:"fffffffffffffffffffffffffffffffffffffffffffffff00000000000000000":"edf61ae362e882ddc0167474a7a77f3a":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #2 -aes_decrypt_ecb:"fffffffffffffffffffffffffffffffffffffffffffffff80000000000000000":"6168b00ba7859e0970ecfd757efecf7c":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #3 -aes_decrypt_ecb:"fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000":"d1415447866230d28bb1ea18a4cdfd02":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #4 -aes_decrypt_ecb:"f8be9ba615c5a952cabbca24f68f8593039624d524c816acda2c9183bd917cb9":"a3944b95ca0b52043584ef02151926a8":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #5 -aes_decrypt_ecb:"797f8b3d176dac5b7e34a2d539c4ef367a16f8635f6264737591c5c07bf57a3e":"a74289fe73a4c123ca189ea1e1b49ad5":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #6 -aes_decrypt_ecb:"6838d40caf927749c13f0329d331f448e202c73ef52c5f73a37ca635d4c47707":"b91d4ea4488644b56cf0812fa7fcf5fc":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #7 -aes_decrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c7421":"761c1fe41a18acf20d241650611d90f1":0 - -AES-256-ECB Decrypt NIST KAT #8 -aes_decrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"38f2c7ae10612415d27ca190d27da8b4":"8a560769d605868ad80d819bdba03771":0 - -AES-256-ECB Decrypt NIST KAT #9 -aes_decrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"1bc704f1bce135ceb810341b216d7abe":"91fbef2d15a97816060bee1feaa49afe":0 - -AES-256-ECB Decrypt NIST KAT #10 -aes_decrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"ddc6bf790c15760d8d9aeb6f9a75fd4e":"80000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #11 -aes_decrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"0a6bdc6d4c1e6280301fd8e97ddbe601":"c0000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #12 -aes_decrypt_ecb:"0000000000000000000000000000000000000000000000000000000000000000":"9b80eefb7ebe2d2b16247aa0efc72f5d":"e0000000000000000000000000000000":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.function deleted file mode 100644 index 97bf51b88a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.function +++ /dev/null @@ -1,297 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/aes.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_AES_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void aes_encrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string, int setkey_result ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - int key_len; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - TEST_ASSERT( mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ) == setkey_result ); - if( setkey_result == 0 ) - { - TEST_ASSERT( mbedtls_aes_crypt_ecb( &ctx, MBEDTLS_AES_ENCRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void aes_decrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string, int setkey_result ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - int key_len; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - TEST_ASSERT( mbedtls_aes_setkey_dec( &ctx, key_str, key_len * 8 ) == setkey_result ); - if( setkey_result == 0 ) - { - TEST_ASSERT( mbedtls_aes_crypt_ecb( &ctx, MBEDTLS_AES_DECRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void aes_encrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, - int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - int key_len, data_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - data_len = unhexify( src_str, hex_src_string ); - - mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_aes_crypt_cbc( &ctx, MBEDTLS_AES_ENCRYPT, data_len, iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0 ) - { - hexify( dst_str, output, data_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void aes_decrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, - int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - int key_len, data_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - data_len = unhexify( src_str, hex_src_string ); - - mbedtls_aes_setkey_dec( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_aes_crypt_cbc( &ctx, MBEDTLS_AES_DECRYPT, data_len, iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0) - { - hexify( dst_str, output, data_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void aes_encrypt_cfb128( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - size_t iv_offset = 0; - int key_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_aes_crypt_cfb128( &ctx, MBEDTLS_AES_ENCRYPT, 16, &iv_offset, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void aes_decrypt_cfb128( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - size_t iv_offset = 0; - int key_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_aes_crypt_cfb128( &ctx, MBEDTLS_AES_DECRYPT, 16, &iv_offset, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void aes_encrypt_cfb8( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - int key_len, src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_aes_crypt_cfb8( &ctx, MBEDTLS_AES_ENCRYPT, src_len, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void aes_decrypt_cfb8( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_aes_context ctx; - int key_len, src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_aes_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_aes_crypt_cfb8( &ctx, MBEDTLS_AES_DECRYPT, src_len, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_aes_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void aes_selftest() -{ - TEST_ASSERT( mbedtls_aes_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.rest.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.rest.data deleted file mode 100644 index bbb222f101..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_aes.rest.data +++ /dev/null @@ -1,15 +0,0 @@ -AES-ECB Encrypt (Invalid keylength) -aes_encrypt_ecb:"000000000000000000000000000000":"f34481ec3cc627bacd5dc3fb08f273e6":"0336763e966d92595a567cc9ce537f5e":MBEDTLS_ERR_AES_INVALID_KEY_LENGTH - -AES-ECB Decrypt (Invalid keylength) -aes_decrypt_ecb:"000000000000000000000000000000":"f34481ec3cc627bacd5dc3fb08f273e6":"0336763e966d92595a567cc9ce537f5e":MBEDTLS_ERR_AES_INVALID_KEY_LENGTH - -AES-256-CBC Encrypt (Invalid input length) -aes_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffe000000000000000":"":MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH - -AES-256-CBC Decrypt (Invalid input length) -aes_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c74":"":MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH - -AES Selftest -depends_on:MBEDTLS_SELF_TEST -aes_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.data deleted file mode 100644 index cf32c85dd1..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.data +++ /dev/null @@ -1,27 +0,0 @@ -Test vector ARC4 [Cryptlib] -mbedtls_arc4_crypt:"0000000000000000":"0123456789abcdef":"7494c2e7104b0879" - -Test vector ARC4 [COMMERCE] -mbedtls_arc4_crypt:"dcee4cf92c":"618a63d2fb":"f13829c9de" - -Test vector ARC4 [SSH ARCFOUR] -mbedtls_arc4_crypt:"527569736c696e6e756e206c61756c75206b6f727669737373616e692c2074e4686be470e46964656e2070e4e46c6ce42074e47973696b75752e204b6573e479f66e206f6e206f6e6e69206f6d616e616e692c206b61736b6973617675756e206c61616b736f7420766572686f75752e20456e206d6120696c6f697473652c20737572652068756f6b61612c206d75747461206d657473e46e2074756d6d757573206d756c6c652074756f6b61612e205075756e746f2070696c76656e2c206d692068756b6b75752c207369696e746f20766172616e207475756c6973656e2c206d69206e756b6b75752e2054756f6b7375742076616e616d6f6e206a61207661726a6f74207665656e2c206e69697374e420737964e46d656e69206c61756c756e207465656e2e202d2045696e6f204c65696e6f":"29041972fb42ba5fc7127712f13829c9":"358186999001e6b5daf05eceeb7eee21e0689c1f00eea81f7dd2caaee1d2763e68af0ead33d66c268bc946c484fbe94c5f5e0b86a59279e4f824e7a640bd223210b0a61160b7bce986ea65688003596b630a6b90f8e0caf6912a98eb872176e83c202caa64166d2cce57ff1bca57b213f0ed1aa72fb8ea52b0be01cd1e412867720b326eb389d011bd70d8af035fb0d8589dbce3c666f5ea8d4c7954c50c3f340b0467f81b425961c11843074df620f208404b394cf9d37ff54b5f1ad8f6ea7da3c561dfa7281f964463d2cc35a4d1b03490dec51b0711fbd6f55f79234d5b7c766622a66de92be996461d5e4dc878ef9bca030521e8351e4baed2fd04f9467368c4ad6ac186d08245b263a2666d1f6c5420f1599dfd9f438921c2f5a463938ce0982265eef70179bc553f339eb1a4c1af5f6a547f" - -Test Vector ARC4 [RFC6229 40-bit] -mbedtls_arc4_crypt:"0000000000000000000000000000000000000000000000000000000000000000":"0102030405":"b2396305f03dc027ccc3524a0a1118a86982944f18fc82d589c403a47a0d0919" - -Test Vector ARC4 [RFC6229 56-bit] -mbedtls_arc4_crypt:"0000000000000000000000000000000000000000000000000000000000000000":"01020304050607":"293f02d47f37c9b633f2af5285feb46be620f1390d19bd84e2e0fd752031afc1" - -Test Vector ARC4 [RFC6229 64-bit] -mbedtls_arc4_crypt:"0000000000000000000000000000000000000000000000000000000000000000":"0102030405060708":"97ab8a1bf0afb96132f2f67258da15a88263efdb45c4a18684ef87e6b19e5b09" - -Test Vector ARC4 [RFC6229 128-bit] -mbedtls_arc4_crypt:"0000000000000000000000000000000000000000000000000000000000000000":"0102030405060708090a0b0c0d0e0f10":"9ac7cc9a609d1ef7b2932899cde41b975248c4959014126a6e8a84f11d1a9e1c" - -TMP -mbedtls_arc4_crypt:"1400002433c96cfa5c53a65184fcba83d9793f42522f94e49bf25edcb7a23c9eaae5ca84f6ee6da8":"5e58b1ad80":"e9a3d07ea1a3eac9fd73dcb14c409f2d434a72b6aa077e0924bcffc236f55d2d372b289707571531" - -ARC4 Selftest -depends_on:MBEDTLS_SELF_TEST -arc4_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.function deleted file mode 100644 index 3da7d8830b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_arc4.function +++ /dev/null @@ -1,46 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/arc4.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ARC4_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_arc4_crypt( char *hex_src_string, char *hex_key_string, - char *hex_dst_string ) -{ - unsigned char src_str[1000]; - unsigned char key_str[1000]; - unsigned char dst_str[1000]; - unsigned char dst_hexstr[2000]; - int src_len, key_len; - mbedtls_arc4_context ctx; - - memset(src_str, 0x00, 1000); - memset(key_str, 0x00, 1000); - memset(dst_str, 0x00, 1000); - memset(dst_hexstr, 0x00, 2000); - mbedtls_arc4_init( &ctx ); - - src_len = unhexify( src_str, hex_src_string ); - key_len = unhexify( key_str, hex_key_string ); - - mbedtls_arc4_setup(&ctx, key_str, key_len); - TEST_ASSERT( mbedtls_arc4_crypt(&ctx, src_len, src_str, dst_str ) == 0 ); - hexify( dst_hexstr, dst_str, src_len ); - - TEST_ASSERT( strcmp( (char *) dst_hexstr, hex_dst_string ) == 0 ); - -exit: - mbedtls_arc4_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void arc4_selftest() -{ - TEST_ASSERT( mbedtls_arc4_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.data deleted file mode 100644 index 61934f5568..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.data +++ /dev/null @@ -1,50 +0,0 @@ -ASN.1 Write Octet String #0 (Empty string) -mbedtls_asn1_write_octet_string:"":"0400":2:2 - -ASN.1 Write Octet String #1 (Large buffer) -mbedtls_asn1_write_octet_string:"AABBCC":"0403AABBCC":10:5 - -ASN.1 Write Octet String #2 (Buffer just fits) -mbedtls_asn1_write_octet_string:"AABBCC":"0403AABBCC":5:5 - -ASN.1 Write Octet String #3 (Buffer too small for tag) -mbedtls_asn1_write_octet_string:"AABBCC":"0403AABBCC":4:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write Octet String #4 (Buffer too small for len) -mbedtls_asn1_write_octet_string:"AABBCC":"0403AABBCC":3:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write Octet String #5 (Buffer too small for string) -mbedtls_asn1_write_octet_string:"AABBCC":"0403AABBCC":2:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write Octet String #6 (l = 128, large buffer) -mbedtls_asn1_write_octet_string:"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"048180000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":140:131 - -ASN.1 Write Octet String #7 (l = 128, buffer just fits) -mbedtls_asn1_write_octet_string:"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"048180000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":131:131 - -ASN.1 Write Octet String #8 (l = 128, buffer too small for tag) -mbedtls_asn1_write_octet_string:"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"":130:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write Octet String #9 (l = 128, buffer too small for len) -mbedtls_asn1_write_octet_string:"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"":129:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write Octet String #9 (l = 128, buffer too small for string) -mbedtls_asn1_write_octet_string:"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"":127:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write IA5 String #0 (Empty string) -mbedtls_asn1_write_ia5_string:"":"1600":2:2 - -ASN.1 Write IA5 String #1 (Large buffer) -mbedtls_asn1_write_ia5_string:"ABC":"1603414243":10:5 - -ASN.1 Write IA5 String #2 (Buffer just fits) -mbedtls_asn1_write_ia5_string:"ABC":"1603414243":5:5 - -ASN.1 Write IA5 String #3 (Buffer too small for tag) -mbedtls_asn1_write_ia5_string:"ABC":"":4:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write IA5 String #4 (Buffer too small for len) -mbedtls_asn1_write_ia5_string:"ABC":"":3:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL - -ASN.1 Write IA5 String #5 (Buffer too small for string) -mbedtls_asn1_write_ia5_string:"ABC":"":2:MBEDTLS_ERR_ASN1_BUF_TOO_SMALL diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.function deleted file mode 100644 index a15c8216dc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_asn1write.function +++ /dev/null @@ -1,84 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/asn1write.h" - -#define GUARD_LEN 4 -#define GUARD_VAL 0x2a -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ASN1_WRITE_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_asn1_write_octet_string( char *hex_str, char *hex_asn1, - int buf_len, int result ) -{ - int ret; - unsigned char buf[150]; - unsigned char str[150] = { 0 }; - unsigned char asn1[150] = { 0 }; - size_t str_len, asn1_len, i; - unsigned char *p; - - memset( buf, GUARD_VAL, sizeof( buf ) ); - - str_len = unhexify( str, hex_str ); - asn1_len = unhexify( asn1, hex_asn1 ); - - p = buf + GUARD_LEN + buf_len; - - ret = mbedtls_asn1_write_octet_string( &p, buf + GUARD_LEN, str, str_len ); - - /* Check for buffer overwrite on both sides */ - for( i = 0; i < GUARD_LEN; i++ ) - { - TEST_ASSERT( buf[i] == GUARD_VAL ); - TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL ); - } - - if( result >= 0 ) - { - TEST_ASSERT( (size_t) ret == asn1_len ); - TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len ); - - TEST_ASSERT( memcmp( p, asn1, asn1_len ) == 0 ); - } -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_asn1_write_ia5_string( char *str, char *hex_asn1, - int buf_len, int result ) -{ - int ret; - unsigned char buf[150]; - unsigned char asn1[150] = { 0 }; - size_t str_len, asn1_len, i; - unsigned char *p; - - memset( buf, GUARD_VAL, sizeof( buf ) ); - - str_len = strlen( str ); - asn1_len = unhexify( asn1, hex_asn1 ); - - p = buf + GUARD_LEN + buf_len; - - ret = mbedtls_asn1_write_ia5_string( &p, buf + GUARD_LEN, str, str_len ); - - /* Check for buffer overwrite on both sides */ - for( i = 0; i < GUARD_LEN; i++ ) - { - TEST_ASSERT( buf[i] == GUARD_VAL ); - TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL ); - } - - if( result >= 0 ) - { - TEST_ASSERT( (size_t) ret == asn1_len ); - TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len ); - - TEST_ASSERT( memcmp( p, asn1, asn1_len ) == 0 ); - } -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.data deleted file mode 100644 index da99ffa879..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.data +++ /dev/null @@ -1,172 +0,0 @@ -Test case mbedtls_base64_encode #1 buffer just right -mbedtls_base64_encode:"":"":0:0 - -Test case mbedtls_base64_encode #2 buffer just right -mbedtls_base64_encode:"f":"Zg==":5:0 - -Test case mbedtls_base64_encode #2 buffer too small -mbedtls_base64_encode:"f":"Zg==":4:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Test case mbedtls_base64_encode #3 buffer just right -mbedtls_base64_encode:"fo":"Zm8=":5:0 - -Test case mbedtls_base64_encode #3 buffer too small -mbedtls_base64_encode:"fo":"Zm8=":4:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Test case mbedtls_base64_encode #4 buffer just right -mbedtls_base64_encode:"foo":"Zm9v":5:0 - -Test case mbedtls_base64_encode #4 buffer too small -mbedtls_base64_encode:"foo":"Zm9v":4:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Test case mbedtls_base64_encode #5 buffer just right -mbedtls_base64_encode:"foob":"Zm9vYg==":9:0 - -Test case mbedtls_base64_encode #5 buffer too small -mbedtls_base64_encode:"foob":"Zm9vYg==":8:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Test case mbedtls_base64_encode #6 buffer just right -mbedtls_base64_encode:"fooba":"Zm9vYmE=":9:0 - -Test case mbedtls_base64_encode #6 buffer too small -mbedtls_base64_encode:"fooba":"Zm9vYmE=":8:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Test case mbedtls_base64_encode #7 buffer just right -mbedtls_base64_encode:"foobar":"Zm9vYmFy":9:0 - -Test case mbedtls_base64_encode #7 buffer too small -mbedtls_base64_encode:"foobar":"Zm9vYmFy":8:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Test case mbedtls_base64_decode #1 -mbedtls_base64_decode:"":"":0 - -Test case mbedtls_base64_decode #2 -mbedtls_base64_decode:"Zg==":"f":0 - -Test case mbedtls_base64_decode #3 -mbedtls_base64_decode:"Zm8=":"fo":0 - -Test case mbedtls_base64_decode #4 -mbedtls_base64_decode:"Zm9v":"foo":0 - -Test case mbedtls_base64_decode #5 -mbedtls_base64_decode:"Zm9vYg==":"foob":0 - -Test case mbedtls_base64_decode #6 -mbedtls_base64_decode:"Zm9vYmE=":"fooba":0 - -Test case mbedtls_base64_decode #7 -mbedtls_base64_decode:"Zm9vYmFy":"foobar":0 - -Base64 decode (Illegal character) -mbedtls_base64_decode:"zm#=":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode (Too much equal signs) -mbedtls_base64_decode:"zm===":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode (Invalid char after equal signs) -mbedtls_base64_decode:"zm=masd":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode (Space inside string) -mbedtls_base64_decode:"zm masd":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmFy" (no newline nor '\0' at end) -base64_decode_hex_src:"5a6d3976596d4679":"foobar":0 - -Base64 decode "Zm9vYmFy\n" (LF at end) -base64_decode_hex_src:"5a6d3976596d46790a":"foobar":0 - -Base64 decode "Zm9vYmFy\r\n" (CRLF at end) -base64_decode_hex_src:"5a6d3976596d46790d0a":"foobar":0 - -Base64 decode "Zm9vYmFy\r" (CR at end) -base64_decode_hex_src:"5a6d3976596d46790d":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmFy " (SP at end) -base64_decode_hex_src:"5a6d3976596d467920":"foobar":0 - -Base64 decode "Zm9vYmFy \n" (SP+LF at end) -base64_decode_hex_src:"5a6d3976596d4679200a":"foobar":0 - -Base64 decode "Zm9vYmFy \r\n" (SP+CRLF at end) -base64_decode_hex_src:"5a6d3976596d4679200d0a":"foobar":0 - -Base64 decode "Zm9vYmFy \r" (SP+CR at end) -base64_decode_hex_src:"5a6d3976596d4679200d":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmFy " (2SP at end) -base64_decode_hex_src:"5a6d3976596d46792020":"foobar":0 - -Base64 decode "Zm9vYmFy \n" (2SP+LF at end) -base64_decode_hex_src:"5a6d3976596d467920200a":"foobar":0 - -Base64 decode "Zm9vYmFy \r\n" (2SP+CRLF at end) -base64_decode_hex_src:"5a6d3976596d467920200d0a":"foobar":0 - -Base64 decode "Zm9vYmFy \r" (2SP+CR at end) -base64_decode_hex_src:"5a6d3976596d467920200d":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmF\ny" (LF inside) -base64_decode_hex_src:"5a6d3976596d460a79":"foobar":0 - -Base64 decode "Zm9vYmF\ry" (CRLF inside) -base64_decode_hex_src:"5a6d3976596d460d0a79":"foobar":0 - -Base64 decode "Zm9vYmF\ry" (CR inside) -base64_decode_hex_src:"5a6d3976596d460d79":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmF y" (SP inside) -base64_decode_hex_src:"5a6d3976596d462079":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmF \ny" (SP+LF inside) -base64_decode_hex_src:"5a6d3976596d46200a79":"foobar":0 - -Base64 decode "Zm9vYmF \ry" (SP+CRLF inside) -base64_decode_hex_src:"5a6d3976596d46200d0a79":"foobar":0 - -Base64 decode "Zm9vYmF \ry" (SP+CR inside) -base64_decode_hex_src:"5a6d3976596d46200d79":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmF y" (2SP inside) -base64_decode_hex_src:"5a6d3976596d46202079":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 decode "Zm9vYmF \ny" (2SP+LF inside) -base64_decode_hex_src:"5a6d3976596d4620200a79":"foobar":0 - -Base64 decode "Zm9vYmF \ry" (2SP+CRLF inside) -base64_decode_hex_src:"5a6d3976596d4620200d0a79":"foobar":0 - -Base64 decode "Zm9vYmF \ry" (2SP+CR inside) -base64_decode_hex_src:"5a6d3976596d4620200d79":"":MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -Base64 encode hex #1 -base64_encode_hex:"010203040506070809":"AQIDBAUGBwgJ":13:0 - -Base64 encode hex #2 (buffer too small) -base64_encode_hex:"010203040506070809":"AQIDBAUGBwgJ":12:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Base64 encode hex #3 -base64_encode_hex:"0102030405060708":"AQIDBAUGBwg=":13:0 - -Base64 encode hex #4 -base64_encode_hex:"01020304050607":"AQIDBAUGBw==":13:0 - -Base64 decode hex #1 -base64_decode_hex:"AQIDBAUGBwgJ":"010203040506070809":9:0 - -Base64 decode hex #2 (buffer too small) -base64_decode_hex:"AQIDBAUGBwgJ":"010203040506070809":8:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Base64 decode hex #3 -base64_decode_hex:"AQIDBAUGBwg=":"0102030405060708":8:0 - -Base64 decode hex #4 -base64_decode_hex:"AQIDBAUGBw==":"01020304050607":7:0 - -Base64 decode hex #5 (buffer too small) -base64_decode_hex:"AQIDBAUGBw==":"01020304050607":6:MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL - -Base64 Selftest -depends_on:MBEDTLS_SELF_TEST -base64_selftest: - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.function deleted file mode 100644 index ab6d88ca74..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_base64.function +++ /dev/null @@ -1,124 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/base64.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_BASE64_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_base64_encode( char *src_string, char *dst_string, int dst_buf_size, - int result ) -{ - unsigned char src_str[1000]; - unsigned char dst_str[1000]; - size_t len; - - memset(src_str, 0x00, 1000); - memset(dst_str, 0x00, 1000); - - strncpy( (char *) src_str, src_string, sizeof(src_str) - 1 ); - TEST_ASSERT( mbedtls_base64_encode( dst_str, dst_buf_size, &len, src_str, strlen( (char *) src_str ) ) == result ); - if( result == 0 ) - { - TEST_ASSERT( strcmp( (char *) dst_str, dst_string ) == 0 ); - } -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_base64_decode( char *src_string, char *dst_string, int result ) -{ - unsigned char src_str[1000]; - unsigned char dst_str[1000]; - size_t len; - int res; - - memset(src_str, 0x00, 1000); - memset(dst_str, 0x00, 1000); - - strncpy( (char *) src_str, src_string, sizeof(src_str) - 1 ); - res = mbedtls_base64_decode( dst_str, sizeof( dst_str ), &len, src_str, strlen( (char *) src_str ) ); - TEST_ASSERT( res == result ); - if( result == 0 ) - { - TEST_ASSERT( strcmp( (char *) dst_str, dst_string ) == 0 ); - } -} -/* END_CASE */ - -/* BEGIN_CASE */ -void base64_encode_hex( char *src_hex, char *dst, int dst_buf_size, - int result ) -{ - unsigned char *src = NULL, *res = NULL; - size_t len, src_len; - - src = unhexify_alloc( src_hex, &src_len ); - res = zero_alloc( dst_buf_size ); - - TEST_ASSERT( mbedtls_base64_encode( res, dst_buf_size, &len, src, src_len ) == result ); - if( result == 0 ) - { - TEST_ASSERT( len == strlen( dst ) ); - TEST_ASSERT( memcmp( dst, res, len ) == 0 ); - } - -exit: - mbedtls_free( src ); - mbedtls_free( res ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void base64_decode_hex( char *src, char *dst_hex, int dst_buf_size, - int result ) -{ - unsigned char *dst = NULL, *res = NULL; - size_t len, dst_len; - - dst = unhexify_alloc( dst_hex, &dst_len ); - res = zero_alloc( dst_buf_size ); - - TEST_ASSERT( mbedtls_base64_decode( res, dst_buf_size, &len, (unsigned char *) src, - strlen( src ) ) == result ); - if( result == 0 ) - { - TEST_ASSERT( len == dst_len ); - TEST_ASSERT( memcmp( dst, res, len ) == 0 ); - } - -exit: - mbedtls_free( dst ); - mbedtls_free( res ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void base64_decode_hex_src( char *src_hex, char *dst_ref, int result ) -{ - unsigned char dst[1000] = { 0 }; - unsigned char *src; - size_t src_len, len; - - src = unhexify_alloc( src_hex, &src_len ); - - TEST_ASSERT( mbedtls_base64_decode( dst, sizeof( dst ), &len, src, src_len ) == result ); - if( result == 0 ) - { - TEST_ASSERT( len == strlen( dst_ref ) ); - TEST_ASSERT( memcmp( dst, dst_ref, len ) == 0 ); - } - -exit: - mbedtls_free( src ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void base64_selftest() -{ - TEST_ASSERT( mbedtls_base64_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.data deleted file mode 100644 index 1ba311f590..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.data +++ /dev/null @@ -1,308 +0,0 @@ -BLOWFISH-ECB Encrypt SSLeay reference #1 -blowfish_encrypt_ecb:"0000000000000000":"0000000000000000":"4ef997456198dd78":0 - -BLOWFISH-ECB Encrypt SSLeay reference #2 -blowfish_encrypt_ecb:"ffffffffffffffff":"ffffffffffffffff":"51866fd5b85ecb8a":0 - -BLOWFISH-ECB Encrypt SSLeay reference #3 -blowfish_encrypt_ecb:"3000000000000000":"1000000000000001":"7d856f9a613063f2":0 - -BLOWFISH-ECB Encrypt SSLeay reference #4 -blowfish_encrypt_ecb:"1111111111111111":"1111111111111111":"2466dd878b963c9d":0 - -BLOWFISH-ECB Encrypt SSLeay reference #5 -blowfish_encrypt_ecb:"0123456789abcdef":"1111111111111111":"61f9c3802281b096":0 - -BLOWFISH-ECB Encrypt SSLeay reference #6 -blowfish_encrypt_ecb:"1111111111111111":"0123456789abcdef":"7d0cc630afda1ec7":0 - -BLOWFISH-ECB Encrypt SSLeay reference #7 -blowfish_encrypt_ecb:"0000000000000000":"0000000000000000":"4ef997456198dd78":0 - -BLOWFISH-ECB Encrypt SSLeay reference #8 -blowfish_encrypt_ecb:"fedcba9876543210":"0123456789abcdef":"0aceab0fc6a0a28d":0 - -BLOWFISH-ECB Encrypt SSLeay reference #9 -blowfish_encrypt_ecb:"7ca110454a1a6e57":"01a1d6d039776742":"59c68245eb05282b":0 - -BLOWFISH-ECB Encrypt SSLeay reference #10 -blowfish_encrypt_ecb:"0131d9619dc1376e":"5cd54ca83def57da":"b1b8cc0b250f09a0":0 - -BLOWFISH-ECB Encrypt SSLeay reference #11 -blowfish_encrypt_ecb:"07a1133e4a0b2686":"0248d43806f67172":"1730e5778bea1da4":0 - -BLOWFISH-ECB Encrypt SSLeay reference #12 -blowfish_encrypt_ecb:"3849674c2602319e":"51454b582ddf440a":"a25e7856cf2651eb":0 - -BLOWFISH-ECB Encrypt SSLeay reference #13 -blowfish_encrypt_ecb:"04b915ba43feb5b6":"42fd443059577fa2":"353882b109ce8f1a":0 - -BLOWFISH-ECB Encrypt SSLeay reference #14 -blowfish_encrypt_ecb:"0113b970fd34f2ce":"059b5e0851cf143a":"48f4d0884c379918":0 - -BLOWFISH-ECB Encrypt SSLeay reference #15 -blowfish_encrypt_ecb:"0170f175468fb5e6":"0756d8e0774761d2":"432193b78951fc98":0 - -BLOWFISH-ECB Encrypt SSLeay reference #16 -blowfish_encrypt_ecb:"43297fad38e373fe":"762514b829bf486a":"13f04154d69d1ae5":0 - -BLOWFISH-ECB Encrypt SSLeay reference #17 -blowfish_encrypt_ecb:"07a7137045da2a16":"3bdd119049372802":"2eedda93ffd39c79":0 - -BLOWFISH-ECB Encrypt SSLeay reference #18 -blowfish_encrypt_ecb:"04689104c2fd3b2f":"26955f6835af609a":"d887e0393c2da6e3":0 - -BLOWFISH-ECB Encrypt SSLeay reference #19 -blowfish_encrypt_ecb:"37d06bb516cb7546":"164d5e404f275232":"5f99d04f5b163969":0 - -BLOWFISH-ECB Encrypt SSLeay reference #20 -blowfish_encrypt_ecb:"1f08260d1ac2465e":"6b056e18759f5cca":"4a057a3b24d3977b":0 - -BLOWFISH-ECB Encrypt SSLeay reference #21 -blowfish_encrypt_ecb:"584023641aba6176":"004bd6ef09176062":"452031c1e4fada8e":0 - -BLOWFISH-ECB Encrypt SSLeay reference #22 -blowfish_encrypt_ecb:"025816164629b007":"480d39006ee762f2":"7555ae39f59b87bd":0 - -BLOWFISH-ECB Encrypt SSLeay reference #23 -blowfish_encrypt_ecb:"49793ebc79b3258f":"437540c8698f3cfa":"53c55f9cb49fc019":0 - -BLOWFISH-ECB Encrypt SSLeay reference #24 -blowfish_encrypt_ecb:"4fb05e1515ab73a7":"072d43a077075292":"7a8e7bfa937e89a3":0 - -BLOWFISH-ECB Encrypt SSLeay reference #25 -blowfish_encrypt_ecb:"49e95d6d4ca229bf":"02fe55778117f12a":"cf9c5d7a4986adb5":0 - -BLOWFISH-ECB Encrypt SSLeay reference #26 -blowfish_encrypt_ecb:"018310dc409b26d6":"1d9d5c5018f728c2":"d1abb290658bc778":0 - -BLOWFISH-ECB Encrypt SSLeay reference #27 -blowfish_encrypt_ecb:"1c587f1c13924fef":"305532286d6f295a":"55cb3774d13ef201":0 - -BLOWFISH-ECB Encrypt SSLeay reference #28 -blowfish_encrypt_ecb:"0101010101010101":"0123456789abcdef":"fa34ec4847b268b2":0 - -BLOWFISH-ECB Encrypt SSLeay reference #29 -blowfish_encrypt_ecb:"1f1f1f1f0e0e0e0e":"0123456789abcdef":"a790795108ea3cae":0 - -BLOWFISH-ECB Encrypt SSLeay reference #30 -blowfish_encrypt_ecb:"e0fee0fef1fef1fe":"0123456789abcdef":"c39e072d9fac631d":0 - -BLOWFISH-ECB Encrypt SSLeay reference #31 -blowfish_encrypt_ecb:"0000000000000000":"ffffffffffffffff":"014933e0cdaff6e4":0 - -BLOWFISH-ECB Encrypt SSLeay reference #32 -blowfish_encrypt_ecb:"ffffffffffffffff":"0000000000000000":"f21e9a77b71c49bc":0 - -BLOWFISH-ECB Encrypt SSLeay reference #33 -blowfish_encrypt_ecb:"0123456789abcdef":"0000000000000000":"245946885754369a":0 - -BLOWFISH-ECB Encrypt SSLeay reference #34 -blowfish_encrypt_ecb:"fedcba9876543210":"ffffffffffffffff":"6b5c5a9c5d9e0a5a":0 - -BLOWFISH-ECB Decrypt SSLeay reference #1 -blowfish_decrypt_ecb:"0000000000000000":"4ef997456198dd78":"0000000000000000":0 - -BLOWFISH-ECB Decrypt SSLeay reference #2 -blowfish_decrypt_ecb:"ffffffffffffffff":"51866fd5b85ecb8a":"ffffffffffffffff":0 - -BLOWFISH-ECB Decrypt SSLeay reference #3 -blowfish_decrypt_ecb:"3000000000000000":"7d856f9a613063f2":"1000000000000001":0 - -BLOWFISH-ECB Decrypt SSLeay reference #4 -blowfish_decrypt_ecb:"1111111111111111":"2466dd878b963c9d":"1111111111111111":0 - -BLOWFISH-ECB Decrypt SSLeay reference #5 -blowfish_decrypt_ecb:"0123456789abcdef":"61f9c3802281b096":"1111111111111111":0 - -BLOWFISH-ECB Decrypt SSLeay reference #6 -blowfish_decrypt_ecb:"1111111111111111":"7d0cc630afda1ec7":"0123456789abcdef":0 - -BLOWFISH-ECB Decrypt SSLeay reference #7 -blowfish_decrypt_ecb:"0000000000000000":"4ef997456198dd78":"0000000000000000":0 - -BLOWFISH-ECB Decrypt SSLeay reference #8 -blowfish_decrypt_ecb:"fedcba9876543210":"0aceab0fc6a0a28d":"0123456789abcdef":0 - -BLOWFISH-ECB Decrypt SSLeay reference #9 -blowfish_decrypt_ecb:"7ca110454a1a6e57":"59c68245eb05282b":"01a1d6d039776742":0 - -BLOWFISH-ECB Decrypt SSLeay reference #10 -blowfish_decrypt_ecb:"0131d9619dc1376e":"b1b8cc0b250f09a0":"5cd54ca83def57da":0 - -BLOWFISH-ECB Decrypt SSLeay reference #11 -blowfish_decrypt_ecb:"07a1133e4a0b2686":"1730e5778bea1da4":"0248d43806f67172":0 - -BLOWFISH-ECB Decrypt SSLeay reference #12 -blowfish_decrypt_ecb:"3849674c2602319e":"a25e7856cf2651eb":"51454b582ddf440a":0 - -BLOWFISH-ECB Decrypt SSLeay reference #13 -blowfish_decrypt_ecb:"04b915ba43feb5b6":"353882b109ce8f1a":"42fd443059577fa2":0 - -BLOWFISH-ECB Decrypt SSLeay reference #14 -blowfish_decrypt_ecb:"0113b970fd34f2ce":"48f4d0884c379918":"059b5e0851cf143a":0 - -BLOWFISH-ECB Encrypt SSLeay reference #15 -blowfish_encrypt_ecb:"0170f175468fb5e6":"0756d8e0774761d2":"432193b78951fc98":0 - -BLOWFISH-ECB Decrypt SSLeay reference #16 -blowfish_decrypt_ecb:"43297fad38e373fe":"13f04154d69d1ae5":"762514b829bf486a":0 - -BLOWFISH-ECB Decrypt SSLeay reference #17 -blowfish_decrypt_ecb:"07a7137045da2a16":"2eedda93ffd39c79":"3bdd119049372802":0 - -BLOWFISH-ECB Decrypt SSLeay reference #18 -blowfish_decrypt_ecb:"04689104c2fd3b2f":"d887e0393c2da6e3":"26955f6835af609a":0 - -BLOWFISH-ECB Decrypt SSLeay reference #19 -blowfish_decrypt_ecb:"37d06bb516cb7546":"5f99d04f5b163969":"164d5e404f275232":0 - -BLOWFISH-ECB Decrypt SSLeay reference #20 -blowfish_decrypt_ecb:"1f08260d1ac2465e":"4a057a3b24d3977b":"6b056e18759f5cca":0 - -BLOWFISH-ECB Decrypt SSLeay reference #21 -blowfish_decrypt_ecb:"584023641aba6176":"452031c1e4fada8e":"004bd6ef09176062":0 - -BLOWFISH-ECB Decrypt SSLeay reference #22 -blowfish_decrypt_ecb:"025816164629b007":"7555ae39f59b87bd":"480d39006ee762f2":0 - -BLOWFISH-ECB Decrypt SSLeay reference #23 -blowfish_decrypt_ecb:"49793ebc79b3258f":"53c55f9cb49fc019":"437540c8698f3cfa":0 - -BLOWFISH-ECB Decrypt SSLeay reference #24 -blowfish_decrypt_ecb:"4fb05e1515ab73a7":"7a8e7bfa937e89a3":"072d43a077075292":0 - -BLOWFISH-ECB Decrypt SSLeay reference #25 -blowfish_decrypt_ecb:"49e95d6d4ca229bf":"cf9c5d7a4986adb5":"02fe55778117f12a":0 - -BLOWFISH-ECB Decrypt SSLeay reference #26 -blowfish_decrypt_ecb:"018310dc409b26d6":"d1abb290658bc778":"1d9d5c5018f728c2":0 - -BLOWFISH-ECB Decrypt SSLeay reference #27 -blowfish_decrypt_ecb:"1c587f1c13924fef":"55cb3774d13ef201":"305532286d6f295a":0 - -BLOWFISH-ECB Decrypt SSLeay reference #28 -blowfish_decrypt_ecb:"0101010101010101":"fa34ec4847b268b2":"0123456789abcdef":0 - -BLOWFISH-ECB Decrypt SSLeay reference #29 -blowfish_decrypt_ecb:"1f1f1f1f0e0e0e0e":"a790795108ea3cae":"0123456789abcdef":0 - -BLOWFISH-ECB Decrypt SSLeay reference #30 -blowfish_decrypt_ecb:"e0fee0fef1fef1fe":"c39e072d9fac631d":"0123456789abcdef":0 - -BLOWFISH-ECB Decrypt SSLeay reference #31 -blowfish_decrypt_ecb:"0000000000000000":"014933e0cdaff6e4":"ffffffffffffffff":0 - -BLOWFISH-ECB Decrypt SSLeay reference #32 -blowfish_decrypt_ecb:"ffffffffffffffff":"f21e9a77b71c49bc":"0000000000000000":0 - -BLOWFISH-ECB Decrypt SSLeay reference #33 -blowfish_decrypt_ecb:"0123456789abcdef":"245946885754369a":"0000000000000000":0 - -BLOWFISH-ECB Decrypt SSLeay reference #34 -blowfish_decrypt_ecb:"fedcba9876543210":"6b5c5a9c5d9e0a5a":"ffffffffffffffff":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #1 -blowfish_encrypt_ecb:"f0":"fedcba9876543210":"":MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH - -BLOWFISH-SETKEY Setkey SSLeay reference #2 -blowfish_encrypt_ecb:"f0e1":"fedcba9876543210":"":MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH - -BLOWFISH-SETKEY Setkey SSLeay reference #3 -blowfish_encrypt_ecb:"f0e1d2":"fedcba9876543210":"":MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH - -BLOWFISH-SETKEY Setkey SSLeay reference #4 -blowfish_encrypt_ecb:"f0e1d2c3":"fedcba9876543210":"be1e639408640f05":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #5 -blowfish_encrypt_ecb:"f0e1d2c3b4":"fedcba9876543210":"b39e44481bdb1e6e":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #6 -blowfish_encrypt_ecb:"f0e1d2c3b4a5":"fedcba9876543210":"9457aa83b1928c0d":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #7 -blowfish_encrypt_ecb:"f0e1d2c3b4a596":"fedcba9876543210":"8bb77032f960629d":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #8 -blowfish_encrypt_ecb:"f0e1d2c3b4a59687":"fedcba9876543210":"e87a244e2cc85e82":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #9 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778":"fedcba9876543210":"15750e7a4f4ec577":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #10 -blowfish_encrypt_ecb:"f0e1d2c3b4a596877869":"fedcba9876543210":"122ba70b3ab64ae0":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #11 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a":"fedcba9876543210":"3a833c9affc537f6":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #12 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b":"fedcba9876543210":"9409da87a90f6bf2":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #13 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c":"fedcba9876543210":"884f80625060b8b4":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #14 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d":"fedcba9876543210":"1f85031c19e11968":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #15 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e":"fedcba9876543210":"79d9373a714ca34f":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #16 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f":"fedcba9876543210":"93142887ee3be15c":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #17 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f00":"fedcba9876543210":"03429e838ce2d14b":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #18 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f0011":"fedcba9876543210":"a4299e27469ff67b":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #19 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f001122":"fedcba9876543210":"afd5aed1c1bc96a8":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #20 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f00112233":"fedcba9876543210":"10851c0e3858da9f":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #21 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f0011223344":"fedcba9876543210":"e6f51ed79b9db21f":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #22 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455":"fedcba9876543210":"64a6e14afd36b46f":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #23 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f00112233445566":"fedcba9876543210":"80c7d7d45a5479ad":0 - -BLOWFISH-SETKEY Setkey SSLeay reference #24 -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f0011223344556677":"fedcba9876543210":"05044b62fa52d080":0 - -BLOWFISH-SETKEY Setkey 440 bits -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f00112233445566778899aabbccddeeff0123456789abcdef0102030405060708090a0b0c0d0e0f":"fedcba9876543210":"9a2ab8f1b00c73d2":0 - -BLOWFISH-SETKEY Setkey 448 bits -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f00112233445566778899aabbccddeeff0123456789abcdef0102030405060708090a0b0c0d0e0fff":"fedcba9876543210":"2fb3ab7f0ee91b69":0 - -BLOWFISH-SETKEY Setkey 456 bits -blowfish_encrypt_ecb:"f0e1d2c3b4a5968778695a4b3c2d1e0f00112233445566778899aabbccddeeff0123456789abcdef0102030405060708090a0b0c0d0e0fffff":"fedcba9876543210":"":MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH - -BLOWFISH-CBC Encrypt -blowfish_encrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F722000000000":"6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5ff92cc":0 - -BLOWFISH-CBC Decrypt -blowfish_decrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC":"37363534333231204e6f77206973207468652074696d6520666f722000000000":0 - -BLOWFISH-CBC Encrypt -blowfish_encrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F7220000000":"":MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH - -BLOWFISH-CBC Decrypt -blowfish_decrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC00":"":MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH - -BLOWFISH-CFB Encrypt -blowfish_encrypt_cfb64:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F722000":"e73214a2822139caf26ecf6d2eb9e76e3da3de04d1517200519d57a6c3" - -BLOWFISH-CFB Decrypt -blowfish_decrypt_cfb64:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"E73214A2822139CAF26ECF6D2EB9E76E3DA3DE04D1517200519D57A6C3":"37363534333231204e6f77206973207468652074696d6520666f722000" - -BLOWFISH-CTR Encrypt -blowfish_encrypt_ctr:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F722000":"e73214a2822139ca60254740dd8c5b8acf5e9569c4affeb944b8fc020e" - -BLOWFISH-CTR Decrypt -blowfish_encrypt_ctr:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"e73214a2822139ca60254740dd8c5b8acf5e9569c4affeb944b8fc020e":"37363534333231204e6f77206973207468652074696d6520666f722000" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.function deleted file mode 100644 index e3c2252906..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_blowfish.function +++ /dev/null @@ -1,260 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/blowfish.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_BLOWFISH_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void blowfish_encrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string, int setkey_result ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - int key_len; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - TEST_ASSERT( mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ) == setkey_result ); - if( setkey_result == 0 ) - { - TEST_ASSERT( mbedtls_blowfish_crypt_ecb( &ctx, MBEDTLS_BLOWFISH_ENCRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void blowfish_decrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string, int setkey_result ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - int key_len; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - TEST_ASSERT( mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ) == setkey_result ); - if( setkey_result == 0 ) - { - TEST_ASSERT( mbedtls_blowfish_crypt_ecb( &ctx, MBEDTLS_BLOWFISH_DECRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void blowfish_encrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, - int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - int key_len, data_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - data_len = unhexify( src_str, hex_src_string ); - - mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ); - - TEST_ASSERT( mbedtls_blowfish_crypt_cbc( &ctx, MBEDTLS_BLOWFISH_ENCRYPT, data_len , iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0 ) - { - hexify( dst_str, output, data_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void blowfish_decrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, - int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - int key_len, data_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - data_len = unhexify( src_str, hex_src_string ); - - mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_blowfish_crypt_cbc( &ctx, MBEDTLS_BLOWFISH_DECRYPT, data_len , iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0) - { - hexify( dst_str, output, data_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void blowfish_encrypt_cfb64( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - size_t iv_offset = 0; - int key_len, src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_blowfish_crypt_cfb64( &ctx, MBEDTLS_BLOWFISH_ENCRYPT, src_len, &iv_offset, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void blowfish_decrypt_cfb64( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - size_t iv_offset = 0; - int key_len, src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_blowfish_crypt_cfb64( &ctx, MBEDTLS_BLOWFISH_DECRYPT, src_len, &iv_offset, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CTR */ -void blowfish_encrypt_ctr( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char stream_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_blowfish_context ctx; - size_t iv_offset = 0; - int key_len, src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(stream_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_blowfish_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_blowfish_setkey( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_blowfish_crypt_ctr( &ctx, src_len, &iv_offset, iv_str, stream_str, src_str, output ) == 0 ); - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_blowfish_free( &ctx ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.data deleted file mode 100644 index 14298387a0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.data +++ /dev/null @@ -1,201 +0,0 @@ -Camellia-128-ECB Encrypt RFC3713 #1 -camellia_encrypt_ecb:"0123456789abcdeffedcba9876543210":"0123456789abcdeffedcba9876543210":"67673138549669730857065648eabe43":0 - -Camellia-192-ECB Encrypt RFC3713 #1 -camellia_encrypt_ecb:"0123456789abcdeffedcba98765432100011223344556677":"0123456789abcdeffedcba9876543210":"b4993401b3e996f84ee5cee7d79b09b9":0 - -Camellia-256-ECB Encrypt RFC3713 #1 -camellia_encrypt_ecb:"0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff":"0123456789abcdeffedcba9876543210":"9acc237dff16d76c20ef7c919e3a7509":0 - -Camellia-128-ECB Encrypt Perl EVP #1 -camellia_encrypt_ecb:"000102030405060708090A0B0C0D0E0F":"00112233445566778899AABBCCDDEEFF":"77CF412067AF8270613529149919546F":0 - -Camellia-192-ECB Encrypt Perl EVP #1 -camellia_encrypt_ecb:"000102030405060708090A0B0C0D0E0F1011121314151617":"00112233445566778899AABBCCDDEEFF":"B22F3C36B72D31329EEE8ADDC2906C68":0 - -Camellia-256-ECB Encrypt Perl EVP #1 -camellia_encrypt_ecb:"000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F":"00112233445566778899AABBCCDDEEFF":"2EDF1F3418D53B88841FC8985FB1ECF2":0 - -Camellia-128-ECB Encrypt Perl EVP #1 -camellia_encrypt_ecb:"2B7E151628AED2A6ABF7158809CF4F3C":"6BC1BEE22E409F96E93D7E117393172A":"432FC5DCD628115B7C388D770B270C96":0 - -Camellia-128-ECB Encrypt Perl EVP #2 -camellia_encrypt_ecb:"2B7E151628AED2A6ABF7158809CF4F3C":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"0BE1F14023782A22E8384C5ABB7FAB2B":0 - -Camellia-128-ECB Encrypt Perl EVP #3 -camellia_encrypt_ecb:"2B7E151628AED2A6ABF7158809CF4F3C":"30C81C46A35CE411E5FBC1191A0A52EF":"A0A1ABCD1893AB6FE0FE5B65DF5F8636":0 - -Camellia-128-ECB Encrypt Perl EVP #4 -camellia_encrypt_ecb:"2B7E151628AED2A6ABF7158809CF4F3C":"F69F2445DF4F9B17AD2B417BE66C3710":"E61925E0D5DFAA9BB29F815B3076E51A":0 - -Camellia-192-ECB Encrypt Perl EVP #1 -camellia_encrypt_ecb:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"6BC1BEE22E409F96E93D7E117393172A":"CCCC6C4E138B45848514D48D0D3439D3":0 - -Camellia-192-ECB Encrypt Perl EVP #2 -camellia_encrypt_ecb:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"5713C62C14B2EC0F8393B6AFD6F5785A":0 - -Camellia-192-ECB Encrypt Perl EVP #3 -camellia_encrypt_ecb:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"30C81C46A35CE411E5FBC1191A0A52EF":"B40ED2B60EB54D09D030CF511FEEF366":0 - -Camellia-192-ECB Encrypt Perl EVP #4 -camellia_encrypt_ecb:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"F69F2445DF4F9B17AD2B417BE66C3710":"909DBD95799096748CB27357E73E1D26":0 - -Camellia-256-ECB Encrypt Perl EVP #1 -camellia_encrypt_ecb:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"6BC1BEE22E409F96E93D7E117393172A":"BEFD219B112FA00098919CD101C9CCFA":0 - -Camellia-256-ECB Encrypt Perl EVP #2 -camellia_encrypt_ecb:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"C91D3A8F1AEA08A9386CF4B66C0169EA":0 - -Camellia-256-ECB Encrypt Perl EVP #3 -camellia_encrypt_ecb:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"30C81C46A35CE411E5FBC1191A0A52EF":"A623D711DC5F25A51BB8A80D56397D28":0 - -Camellia-256-ECB Encrypt Perl EVP #4 -camellia_encrypt_ecb:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"F69F2445DF4F9B17AD2B417BE66C3710":"7960109FB6DC42947FCFE59EA3C5EB6B":0 - -Camellia-128-CBC Encrypt Perl EVP #1 -camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"1607CF494B36BBF00DAEB0B503C831AB":0 - -Camellia-128-CBC Encrypt Perl EVP #2 -camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"1607CF494B36BBF00DAEB0B503C831AB":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"A2F2CF671629EF7840C5A5DFB5074887":0 - -Camellia-128-CBC Encrypt Perl EVP #3 -camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"A2F2CF671629EF7840C5A5DFB5074887":"30C81C46A35CE411E5FBC1191A0A52EF":"0F06165008CF8B8B5A63586362543E54":0 - -Camellia-128-CBC Encrypt Perl EVP #4 -camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"36A84CDAFD5F9A85ADA0F0A993D6D577":"F69F2445DF4F9B17AD2B417BE66C3710":"74C64268CDB8B8FAF5B34E8AF3732980":0 - -Camellia-192-CBC Encrypt Perl EVP #1 -camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"2A4830AB5AC4A1A2405955FD2195CF93":0 - -Camellia-192-CBC Encrypt Perl EVP #2 -camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"2A4830AB5AC4A1A2405955FD2195CF93":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"5D5A869BD14CE54264F892A6DD2EC3D5":0 - -Camellia-192-CBC Encrypt Perl EVP #3 -camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"5D5A869BD14CE54264F892A6DD2EC3D5":"30C81C46A35CE411E5FBC1191A0A52EF":"37D359C3349836D884E310ADDF68C449":0 - -Camellia-192-CBC Encrypt Perl EVP #4 -camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"37D359C3349836D884E310ADDF68C449":"F69F2445DF4F9B17AD2B417BE66C3710":"01FAAA930B4AB9916E9668E1428C6B08":0 - -Camellia-256-CBC Encrypt Perl EVP #1 -camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"E6CFA35FC02B134A4D2C0B6737AC3EDA":0 - -Camellia-256-CBC Encrypt Perl EVP #2 -camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"E6CFA35FC02B134A4D2C0B6737AC3EDA":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"36CBEB73BD504B4070B1B7DE2B21EB50":0 - -Camellia-256-CBC Encrypt Perl EVP #3 -camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"36CBEB73BD504B4070B1B7DE2B21EB50":"30C81C46A35CE411E5FBC1191A0A52EF":"E31A6055297D96CA3330CDF1B1860A83":0 - -Camellia-256-CBC Encrypt Perl EVP #4 -camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"E31A6055297D96CA3330CDF1B1860A83":"F69F2445DF4F9B17AD2B417BE66C3710":"5D563F6D1CCCF236051C0C5C1C58F28F":0 - -Camellia-128-CFB128 Encrypt Perl EVP #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"14F7646187817EB586599146B82BD719" - -Camellia-128-CFB128 Encrypt Perl EVP #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"14F7646187817EB586599146B82BD719":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"A53D28BB82DF741103EA4F921A44880B" - -Camellia-128-CFB128 Encrypt Perl EVP #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"A53D28BB82DF741103EA4F921A44880B":"30C81C46A35CE411E5FBC1191A0A52EF":"9C2157A664626D1DEF9EA420FDE69B96" - -Camellia-128-CFB128 Encrypt Perl EVP #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"9C2157A664626D1DEF9EA420FDE69B96":"F69F2445DF4F9B17AD2B417BE66C3710":"742A25F0542340C7BAEF24CA8482BB09" - -Camellia-128-CFB128 Decrypt Perl EVP #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"14F7646187817EB586599146B82BD719" - -Camellia-128-CFB128 Decrypt Perl EVP #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"14F7646187817EB586599146B82BD719":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"A53D28BB82DF741103EA4F921A44880B" - -Camellia-128-CFB128 Decrypt Perl EVP #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"A53D28BB82DF741103EA4F921A44880B":"30C81C46A35CE411E5FBC1191A0A52EF":"9C2157A664626D1DEF9EA420FDE69B96" - -Camellia-128-CFB128 Decrypt Perl EVP #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"9C2157A664626D1DEF9EA420FDE69B96":"F69F2445DF4F9B17AD2B417BE66C3710":"742A25F0542340C7BAEF24CA8482BB09" - -Camellia-192-CFB128 Encrypt Perl EVP #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"C832BB9780677DAA82D9B6860DCD565E" - -Camellia-192-CFB128 Encrypt Perl EVP #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"C832BB9780677DAA82D9B6860DCD565E":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"86F8491627906D780C7A6D46EA331F98" - -Camellia-192-CFB128 Encrypt Perl EVP #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"86F8491627906D780C7A6D46EA331F98":"30C81C46A35CE411E5FBC1191A0A52EF":"69511CCE594CF710CB98BB63D7221F01" - -Camellia-192-CFB128 Encrypt Perl EVP #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"69511CCE594CF710CB98BB63D7221F01":"F69F2445DF4F9B17AD2B417BE66C3710":"D5B5378A3ABED55803F25565D8907B84" - -Camellia-192-CFB128 Decrypt Perl EVP #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"C832BB9780677DAA82D9B6860DCD565E" - -Camellia-192-CFB128 Decrypt Perl EVP #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"C832BB9780677DAA82D9B6860DCD565E":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"86F8491627906D780C7A6D46EA331F98" - -Camellia-192-CFB128 Decrypt Perl EVP #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"86F8491627906D780C7A6D46EA331F98":"30C81C46A35CE411E5FBC1191A0A52EF":"69511CCE594CF710CB98BB63D7221F01" - -Camellia-192-CFB128 Decrypt Perl EVP #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"69511CCE594CF710CB98BB63D7221F01":"F69F2445DF4F9B17AD2B417BE66C3710":"D5B5378A3ABED55803F25565D8907B84" - -Camellia-256-CFB128 Encrypt Perl EVP #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"CF6107BB0CEA7D7FB1BD31F5E7B06C93" - -Camellia-256-CFB128 Encrypt Perl EVP #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"CF6107BB0CEA7D7FB1BD31F5E7B06C93":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"89BEDB4CCDD864EA11BA4CBE849B5E2B" - -Camellia-256-CFB128 Encrypt Perl EVP #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"89BEDB4CCDD864EA11BA4CBE849B5E2B":"30C81C46A35CE411E5FBC1191A0A52EF":"555FC3F34BDD2D54C62D9E3BF338C1C4" - -Camellia-256-CFB128 Encrypt Perl EVP #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_encrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"555FC3F34BDD2D54C62D9E3BF338C1C4":"F69F2445DF4F9B17AD2B417BE66C3710":"5953ADCE14DB8C7F39F1BD39F359BFFA" - -Camellia-256-CFB128 Decrypt Perl EVP #1 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"CF6107BB0CEA7D7FB1BD31F5E7B06C93" - -Camellia-256-CFB128 Decrypt Perl EVP #2 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"CF6107BB0CEA7D7FB1BD31F5E7B06C93":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"89BEDB4CCDD864EA11BA4CBE849B5E2B" - -Camellia-256-CFB128 Decrypt Perl EVP #3 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"89BEDB4CCDD864EA11BA4CBE849B5E2B":"30C81C46A35CE411E5FBC1191A0A52EF":"555FC3F34BDD2D54C62D9E3BF338C1C4" - -Camellia-256-CFB128 Decrypt Perl EVP #4 -depends_on:MBEDTLS_CIPHER_MODE_CFB -camellia_decrypt_cfb128:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"555FC3F34BDD2D54C62D9E3BF338C1C4":"F69F2445DF4F9B17AD2B417BE66C3710":"5953ADCE14DB8C7F39F1BD39F359BFFA" - -Camellia-ECB Encrypt (Invalid key length) -camellia_encrypt_ecb:"0123456789abcdeffedcba98765432":"0123456789abcdeffedcba9876543210":"67673138549669730857065648eabe43":MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH - -Camellia-ECB Decrypt (Invalid key length) -camellia_decrypt_ecb:"0123456789abcdeffedcba98765432":"0123456789abcdeffedcba9876543210":"67673138549669730857065648eabe43":MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH - -Camellia-256-CBC Encrypt (Invalid input length) -camellia_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffe000000000000000":"":MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH - -Camellia-256-CBC Decrypt (Invalid input length) -camellia_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c74":"":MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH - -Camellia Selftest -depends_on:MBEDTLS_SELF_TEST -camellia_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.function deleted file mode 100644 index 8c69a96ee5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_camellia.function +++ /dev/null @@ -1,229 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/camellia.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_CAMELLIA_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void camellia_encrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string, int setkey_result ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_camellia_context ctx; - int key_len; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_camellia_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - TEST_ASSERT( mbedtls_camellia_setkey_enc( &ctx, key_str, key_len * 8 ) == setkey_result ); - if( setkey_result == 0 ) - { - TEST_ASSERT( mbedtls_camellia_crypt_ecb( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_camellia_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void camellia_decrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string, int setkey_result ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_camellia_context ctx; - int key_len; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_camellia_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - TEST_ASSERT( mbedtls_camellia_setkey_dec( &ctx, key_str, key_len * 8 ) == setkey_result ); - if( setkey_result == 0 ) - { - TEST_ASSERT( mbedtls_camellia_crypt_ecb( &ctx, MBEDTLS_CAMELLIA_DECRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_camellia_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void camellia_encrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, - int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_camellia_context ctx; - int key_len, data_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_camellia_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - data_len = unhexify( src_str, hex_src_string ); - - mbedtls_camellia_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_camellia_crypt_cbc( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, data_len, iv_str, src_str, output) == cbc_result ); - if( cbc_result == 0 ) - { - hexify( dst_str, output, data_len ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_camellia_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void camellia_decrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, - int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_camellia_context ctx; - int key_len, data_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_camellia_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - data_len = unhexify( src_str, hex_src_string ); - - mbedtls_camellia_setkey_dec( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_camellia_crypt_cbc( &ctx, MBEDTLS_CAMELLIA_DECRYPT, data_len, iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0 ) - { - hexify( dst_str, output, data_len ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_camellia_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void camellia_encrypt_cfb128( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_camellia_context ctx; - size_t iv_offset = 0; - int key_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_camellia_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_camellia_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_camellia_crypt_cfb128( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, 16, &iv_offset, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_camellia_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */ -void camellia_decrypt_cfb128( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_camellia_context ctx; - size_t iv_offset = 0; - int key_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_camellia_init( &ctx ); - - key_len = unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_camellia_setkey_enc( &ctx, key_str, key_len * 8 ); - TEST_ASSERT( mbedtls_camellia_crypt_cfb128( &ctx, MBEDTLS_CAMELLIA_DECRYPT, 16, &iv_offset, iv_str, src_str, output ) == 0 ); - hexify( dst_str, output, 16 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_camellia_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void camellia_selftest() -{ - TEST_ASSERT( mbedtls_camellia_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.data deleted file mode 100644 index 90ba42d83c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.data +++ /dev/null @@ -1,1482 +0,0 @@ -CCM self test -mbedtls_ccm_self_test: - -CCM init #1 AES-128: OK -depends_on:MBEDTLS_AES_C -mbedtls_ccm_setkey:MBEDTLS_CIPHER_ID_AES:128:0 - -CCM init #2 CAMELLIA-256: OK -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_setkey:MBEDTLS_CIPHER_ID_CAMELLIA:256:0 - -CCM init #3 AES-224: bad key size -depends_on:MBEDTLS_AES_C -mbedtls_ccm_setkey:MBEDTLS_CIPHER_ID_AES:224:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM init #4 BLOWFISH-128: bad block size -depends_on:MBEDTLS_BLOWFISH_C -mbedtls_ccm_setkey:MBEDTLS_CIPHER_ID_BLOWFISH:128:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lengths #1 all OK -ccm_lengths:5:10:5:8:0 - -CCM lengths #2 nonce too short -ccm_lengths:5:6:5:8:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lengths #3 nonce too long -ccm_lengths:5:14:5:8:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lengths #4 tag too short -ccm_lengths:5:10:5:2:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lengths #5 tag too long -ccm_lengths:5:10:5:18:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lengths #6 tag length not even -ccm_lengths:5:10:5:7:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lenghts #7 AD too long (2^16 - 2^8 + 1) -ccm_lengths:5:10:65281:8:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM lengths #8 msg too long for this IV length (2^16, q = 2) -ccm_lengths:65536:13:5:8:MBEDTLS_ERR_CCM_BAD_INPUT - -CCM encrypt and tag RFC 3610 #1 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E":"00000003020100A0A1A2A3A4A5":"0001020304050607":"588C979A61C663D2F066D0C2C0F989806D5F6B61DAC38417E8D12CFDF926E0" - -CCM encrypt and tag RFC 3610 #2 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F":"00000004030201A0A1A2A3A4A5":"0001020304050607":"72C91A36E135F8CF291CA894085C87E3CC15C439C9E43A3BA091D56E10400916" - -CCM encrypt and tag RFC 3610 #3 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20":"00000005040302A0A1A2A3A4A5":"0001020304050607":"51B1E5F44A197D1DA46B0F8E2D282AE871E838BB64DA8596574ADAA76FBD9FB0C5" - -CCM encrypt and tag RFC 3610 #4 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E":"00000006050403A0A1A2A3A4A5":"000102030405060708090A0B":"A28C6865939A9A79FAAA5C4C2A9D4A91CDAC8C96C861B9C9E61EF1" - -CCM encrypt and tag RFC 3610 #5 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F":"00000007060504A0A1A2A3A4A5":"000102030405060708090A0B":"DCF1FB7B5D9E23FB9D4E131253658AD86EBDCA3E51E83F077D9C2D93" - -CCM encrypt and tag RFC 3610 #6 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F20":"00000008070605A0A1A2A3A4A5":"000102030405060708090A0B":"6FC1B011F006568B5171A42D953D469B2570A4BD87405A0443AC91CB94" - -CCM encrypt and tag RFC 3610 #7 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E":"00000009080706A0A1A2A3A4A5":"0001020304050607":"0135D1B2C95F41D5D1D4FEC185D166B8094E999DFED96C048C56602C97ACBB7490" - -CCM encrypt and tag RFC 3610 #8 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F":"0000000A090807A0A1A2A3A4A5":"0001020304050607":"7B75399AC0831DD2F0BBD75879A2FD8F6CAE6B6CD9B7DB24C17B4433F434963F34B4" - -CCM encrypt and tag RFC 3610 #9 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20":"0000000B0A0908A0A1A2A3A4A5":"0001020304050607":"82531A60CC24945A4B8279181AB5C84DF21CE7F9B73F42E197EA9C07E56B5EB17E5F4E" - -CCM encrypt and tag RFC 3610 #10 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E":"0000000C0B0A09A0A1A2A3A4A5":"000102030405060708090A0B":"07342594157785152B074098330ABB141B947B566AA9406B4D999988DD" - -CCM encrypt and tag RFC 3610 #11 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F":"0000000D0C0B0AA0A1A2A3A4A5":"000102030405060708090A0B":"676BB20380B0E301E8AB79590A396DA78B834934F53AA2E9107A8B6C022C" - -CCM encrypt and tag RFC 3610 #12 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F20":"0000000E0D0C0BA0A1A2A3A4A5":"000102030405060708090A0B":"C0FFA0D6F05BDB67F24D43A4338D2AA4BED7B20E43CD1AA31662E7AD65D6DB" - -CCM encrypt and tag RFC 3610 #13 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"08E8CF97D820EA258460E96AD9CF5289054D895CEAC47C":"00412B4EA9CDBE3C9696766CFA":"0BE1A88BACE018B1":"4CB97F86A2A4689A877947AB8091EF5386A6FFBDD080F8E78CF7CB0CDDD7B3" - -CCM encrypt and tag RFC 3610 #14 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"9020EA6F91BDD85AFA0039BA4BAFF9BFB79C7028949CD0EC":"0033568EF7B2633C9696766CFA":"63018F76DC8A1BCB":"4CCB1E7CA981BEFAA0726C55D378061298C85C92814ABC33C52EE81D7D77C08A" - -CCM encrypt and tag RFC 3610 #15 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"B916E0EACC1C00D7DCEC68EC0B3BBB1A02DE8A2D1AA346132E":"00103FE41336713C9696766CFA":"AA6CFA36CAE86B40":"B1D23A2220DDC0AC900D9AA03C61FCF4A559A4417767089708A776796EDB723506" - -CCM encrypt and tag RFC 3610 #16 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"12DAAC5630EFA5396F770CE1A66B21F7B2101C":"00764C63B8058E3C9696766CFA":"D0D0735C531E1BECF049C244":"14D253C3967B70609B7CBB7C499160283245269A6F49975BCADEAF" - -CCM encrypt and tag RFC 3610 #17 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"E88B6A46C78D63E52EB8C546EFB5DE6F75E9CC0D":"00F8B678094E3B3C9696766CFA":"77B60F011C03E1525899BCAE":"5545FF1A085EE2EFBF52B2E04BEE1E2336C73E3F762C0C7744FE7E3C" - -CCM encrypt and tag RFC 3610 #18 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"6435ACBAFB11A82E2F071D7CA4A5EBD93A803BA87F":"00D560912D3F703C9696766CFA":"CD9044D2B71FDB8120EA60C0":"009769ECABDF48625594C59251E6035722675E04C847099E5AE0704551" - -CCM encrypt and tag RFC 3610 #19 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"8A19B950BCF71A018E5E6701C91787659809D67DBEDD18":"0042FFF8F1951C3C9696766CFA":"D85BC7E69F944FB8":"BC218DAA947427B6DB386A99AC1AEF23ADE0B52939CB6A637CF9BEC2408897C6BA" - -CCM encrypt and tag RFC 3610 #20 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"1761433C37C5A35FC1F39F406302EB907C6163BE38C98437":"00920F40E56CDC3C9696766CFA":"74A0EBC9069F5B37":"5810E6FD25874022E80361A478E3E9CF484AB04F447EFFF6F0A477CC2FC9BF548944" - -CCM encrypt and tag RFC 3610 #21 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"A434A8E58500C6E41530538862D686EA9E81301B5AE4226BFA":"0027CA0C7120BC3C9696766CFA":"44A3AA3AAE6475CA":"F2BEED7BC5098E83FEB5B31608F8E29C38819A89C8E776F1544D4151A4ED3A8B87B9CE" - -CCM encrypt and tag RFC 3610 #22 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"B96B49E21D621741632875DB7F6C9243D2D7C2":"005B8CCBCD9AF83C9696766CFA":"EC46BB63B02520C33C49FD70":"31D750A09DA3ED7FDDD49A2032AABF17EC8EBF7D22C8088C666BE5C197" - -CCM encrypt and tag RFC 3610 #23 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"E2FCFBB880442C731BF95167C8FFD7895E337076":"003EBE94044B9A3C9696766CFA":"47A65AC78B3D594227E85E71":"E882F1DBD38CE3EDA7C23F04DD65071EB41342ACDF7E00DCCEC7AE52987D" - -CCM encrypt and tag RFC 3610 #24 -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"D7828D13B2B0BDC325A76236DF93CC6B":"ABF21C0B02FEB88F856DF4A37381BCE3CC128517D4":"008D493B30AE8B3C9696766CFA":"6E37A6EF546D955D34AB6059":"F32905B88A641B04B9C9FFB58CC390900F3DA12AB16DCE9E82EFA16DA62059" - -CCM encrypt and tag NIST VTT AES-128 #1 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"43b1a6bc8d0d22d6d1ca95c18593cca5":"a2b381c7d1545c408fe29817a21dc435a154c87256346b05":"9882578e750b9682c6ca7f8f86":"2084f3861c9ad0ccee7c63a7e05aece5db8b34bd8724cc06b4ca99a7f9c4914f":"cc69ed76985e0ed4c8365a72775e5a19bfccc71aeb116c85a8c74677" - -CCM encrypt and tag NIST VTT AES-128 #2 (P=24, N=13, A=32, T=6) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"44e89189b815b4649c4e9b38c4275a5a":"8db6ae1eb959963931d1c5224f29ef50019d2b0db7f5f76f":"374c83e94384061ac01963f88d":"cd149d17dba7ec50000b8c5390d114697fafb61025301f4e3eaa9f4535718a08":"df952dce0f843374d33da94c969eff07b7bc2418ca9ee01e32bc2ffa8600" - -CCM encrypt and tag NIST VTT AES-128 #3 (P=24, N=13, A=32, T=8) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"368f35a1f80eaaacd6bb136609389727":"1cccd55825316a94c5979e049310d1d717cdfb7624289dac":"842a8445847502ea77363a16b6":"34396dfcfa6f742aea7040976bd596497a7a6fa4fb85ee8e4ca394d02095b7bf":"1a58094f0e8c6035a5584bfa8d1009c5f78fd2ca487ff222f6d1d897d6051618" - -CCM encrypt and tag NIST VTT AES-128 #4 (P=24, N=13, A=32, T=10) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"996a09a652fa6c82eae8be7886d7e75e":"84cdd7380f47524b86168ed95386faa402831f22045183d0":"a8b3eb68f205a46d8f632c3367":"c71620d0477c8137b77ec5c72ced4df3a1e987fd9af6b5b10853f0526d876cd5":"a7fbf9dd1b099ed3acf6bcbd0b6f7cae57bee99f9d084f826d86e69c07f053d1a607" - -CCM encrypt and tag NIST VTT AES-128 #5 (P=24, N=13, A=32, T=12) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3ee186594f110fb788a8bf8aa8be5d4a":"d71864877f2578db092daba2d6a1f9f4698a9c356c7830a1":"44f705d52acf27b7f17196aa9b":"2c16724296ff85e079627be3053ea95adf35722c21886baba343bd6c79b5cb57":"b4dd74e7a0cc51aea45dfb401a41d5822c96901a83247ea0d6965f5aa6e31302a9cc2b36" - -CCM encrypt and tag NIST VTT AES-128 #6 (P=24, N=13, A=32, T=14) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7b2d52a5186d912cf6b83ace7740ceda":"ea384b081f60bb450808e0c20dc2914ae14a320612c3e1e8":"f47be3a2b019d1beededf5b80c":"76cf3522aff97a44b4edd0eef3b81e3ab3cd1ccc93a767a133afd508315f05ed":"79070f33114a980dfd48215051e224dfd01471ac293242afddb36e37da1ee8a88a77d7f12cc6" - -CCM encrypt and tag NIST VTT AES-128 #7 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4189351b5caea375a0299e81c621bf43":"4535d12b4377928a7c0a61c9f825a48671ea05910748c8ef":"48c0906930561e0ab0ef4cd972":"40a27c1d1e23ea3dbe8056b2774861a4a201cce49f19997d19206d8c8a343951":"26c56961c035a7e452cce61bc6ee220d77b3f94d18fd10b6d80e8bf80f4a46cab06d4313f0db9be9" - -CCM encrypt and tag NIST VTT AES-192 #1 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"11fd45743d946e6d37341fec49947e8c70482494a8f07fcc":"ee7e6075ba52846de5d6254959a18affc4faf59c8ef63489":"c6aeebcb146cfafaae66f78aab":"7dc8c52144a7cb65b3e5a846e8fd7eae37bf6996c299b56e49144ebf43a1770f":"137d9da59baf5cbfd46620c5f298fc766de10ac68e774edf1f2c5bad" - -CCM encrypt and tag NIST VTT AES-192 #2 (P=24, N=13, A=32, T=6) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"146a163bbf10746e7c1201546ba46de769be23f9d7cc2c80":"473b6600559aefb67f7976f0a5cc744fb456efd86f615648":"f5827e51707d8d64bb522985bb":"599b12ebd3347a5ad098772c44c49eed954ec27c3ba6206d899ddaabca23a762":"26d2be30e171439d54a0fec291c6024d1de09d61b44f53258ba1360406f9" - -CCM encrypt and tag NIST VTT AES-192 #3 (P=24, N=13, A=32, T=8) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bdf277af2226f03ec1a0ba7a8532ade6aea9b3d519fe2d38":"0ff89eff92a530b66684cd75a39481e7e069a7d05e89b692":"cc3c596be884e7caed503315c0":"4d6546167b3ed55f01c62bd384e02e1039c0d67ef7abe33291fecb136272f73b":"6ef66a52c866bd5df20ec5096de92167ad83cab0e095ad0c778a299f1224f10c" - -CCM encrypt and tag NIST VTT AES-192 #4 (P=24, N=13, A=32, T=10) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"62f8eba1c2c5f66215493a6fa6ae007aae5be92f7880336a":"f5522e3405d9b77cbf3257db2b9675e618e8744a0ee03f0f":"15769753f503aa324f4b0e8ee0":"1bc05440ee3e34d0f25e90ca1ecbb555d0fb92b311621d171be6f2b719923d23":"b9103942dbbb93e15086751c9bb0a3d33112b55f95b7d4f32ff0bb90a8879812683f" - -CCM encrypt and tag NIST VTT AES-192 #5 (P=24, N=13, A=32, T=12) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5a5667197f46b8027980d0a3166c0a419713d4df0629a860":"d0e4024d6e33daafc011fe463545ed20f172872f6f33cefa":"6236b01079d180fce156fbaab4":"29bdf65b29394d363d5243d4249bad087520f8d733a763daa1356be458d487e5":"479f3d408bfa00d1cd1c8bf11a167ce7ae4bcdb011f04e38733013b8ebe5e92b1917640c" - -CCM encrypt and tag NIST VTT AES-192 #6 (P=24, N=13, A=32, T=14) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d2d4482ea8e98c1cf309671895a16610152ce283434bca38":"78168e5cc3cddf4b90d5bc11613465030903e0196f1fe443":"6ee177d48f59bd37045ec03731":"9ef2d0d556d05cf9d1ee9dab9b322a389c75cd4e9dee2c0d08eea961efce8690":"e2324a6d5643dfc8aea8c08cbbc245494a3dcbcb800c797c3abcdb0563978785bf7fd71c6c1f" - -CCM encrypt and tag NIST VTT AES-192 #7 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a7177fd129674c6c91c1c89f4408139afe187026b8114893":"2cea0f7304860a4f40a28c8b890db60f3891b9982478495e":"31bb28f0e1e63c36ca3959dd18":"2529a834668187213f5342a1f3deea0dc2765478c7d71c9c21b9eb1351a5f6cb":"5bb7aa6ab9c02a5712d62343fbe61f774e598d6b87545612380ea23dcffc9574f672bca92e306411" - -CCM encrypt and tag NIST VTT AES-256 #1 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9074b1ae4ca3342fe5bf6f14bcf2f27904f0b15179d95a654f61e699692e6f71":"239029f150bccbd67edbb67f8ae456b4ea066a4beee065f9":"2e1e0132468500d4bd47862563":"3c5f5404370abdcb1edde99de60d0682c600b034e063b7d3237723da70ab7552":"9c8d5dd227fd9f81237601830afee4f0115636c8e5d5fd743cb9afed" - -CCM encrypt and tag NIST VTT AES-256 #2 (P=24, N=13, A=32, T=6) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8596a69890b0e47d43aeeca54b52029331da06fae63aa3249faaca94e2605feb":"f0b065da6ecb9ddcab855152d3b4155037adfa758ba96070":"20442e1c3f3c88919c39978b78":"4e0d3aa502bd03fe1761b167c4e0df1d228301d3ebaa4a0281becd813266e255":"d6a0f377f7c1b14dcdba729cae5271b027e71cc7850173ec265867a29eb3" - -CCM encrypt and tag NIST VTT AES-256 #3 (P=24, N=13, A=32, T=8) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bae73483de27b581a7c13f178a6d7bda168c1b4a1cb9180512a13e3ab914eb61":"28ef408d57930086011b167ac04b866e5b58fe6690a0b9c3":"daf54faef6e4fc7867624b76f2":"7022eaa52c9da821da72d2edd98f6b91dfe474999b75b34699aeb38465f70c1c":"356367c6cee4453658418d9517f7c6faddcd7c65aef460138cf050f48c505151" - -CCM encrypt and tag NIST VTT AES-256 #4 (P=24, N=13, A=32, T=10) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d5b321b0ac2fedce0933d57d12195c7b9941f4caa95529125ed21c41fac43374":"6aa6ea668df60b0db85592d0a819c9df9e1099916272aafb":"b35fb2262edfa14938a0fba03e":"ba762bbda601d711e2dfc9dbe3003d39df1043ca845612b8e9dc9ff5c5d06ec4":"97027de5effd82c58f8dbfb909d7696fbe2d54916262912001a4d765bc1c95c90a95" - -CCM encrypt and tag NIST VTT AES-256 #5 (P=24, N=13, A=32, T=12) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7f4af6765cad1d511db07e33aaafd57646ec279db629048aa6770af24849aa0d":"7ebef26bf4ecf6f0ebb2eb860edbf900f27b75b4a6340fdb":"dde2a362ce81b2b6913abc3095":"404f5df97ece7431987bc098cce994fc3c063b519ffa47b0365226a0015ef695":"353022db9c568bd7183a13c40b1ba30fcc768c54264aa2cd2927a053c9244d3217a7ad05" - -CCM encrypt and tag NIST VTT AES-256 #6 (P=24, N=13, A=32, T=14) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5c8b59d3e7986c277d5ad51e4a2233251076809ebf59463f47cd10b4aa951f8c":"138ee53b1914d3322c2dd0a4e02faab2236555131d5eea08":"21ff892b743d661189e205c7f3":"f1e0af185180d2eb63e50e37ba692647cac2c6a149d70c81dbd34685ed78feaa":"5b2f3026f30fdd50accc40ddd093b7997f23d7c6d3c8bc425f82c828413643b8794494cb5236" - -CCM encrypt and tag NIST VTT AES-256 #7 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"60823b64e0b2da3a7eb772bd5941c534e6ff94ea96b564e2b38f82c78bb54522":"a8be794613835c4366e75817d228438f011a2ec8a86f9797":"48526f1bffc97dd65e42906983":"fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a":"cc3efe04d84a4ec5cb6a6c28dc2c2d386a359d9550dbdec963ddd56464aed6d0613159d1aa181dcb" - -CCM encrypt and tag NIST VPT AES-128 #1 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2ebf60f0969013a54a3dedb19d20f6c8":"":"1de8c5e21f9db33123ff870add":"e1de6c6119d7db471136285d10b47a450221b16978569190ef6a22b055295603":"0ead29ef205fbb86d11abe5ed704b880" - -CCM encrypt and tag NIST VPT AES-128 #2 (P=1, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6ae7a8e907b8720f4b0d5507c1d0dc41":"0e":"7f18ad442e536a0159e7aa8c0f":"9c9b0f11e020c6512a63dfa1a5ec8df8bd8e2ad83cf87b80b38635621c5dc0d7":"4c201784bdab19e255787fecd02000c49d" - -CCM encrypt and tag NIST VPT AES-128 #3 (P=2, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3d746ae6cac5cefd01f021c0bbf4bc3c":"4360":"597b3614ff9cd567afd1aad4e5":"90446190e1ff5e48e8a09d692b217de3ad0ab4a670e7f1b437f9c07a902cad60":"e38fdb77c1f8bbac2903a2ec7bc0f9c5654d" - -CCM encrypt and tag NIST VPT AES-128 #4 (P=3, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3e4fa1c6f8b00f1296956735ee86e310":"3a6734":"c6a170936568651020edfe15df":"00d57896da2435a4271afb9c98f61a650e63a4955357c47d073c5165dd4ea318":"384be657bfc5f385b179be7333eb3f57df546b" - -CCM encrypt and tag NIST VPT AES-128 #5 (P=4, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7ccbb8557f6e08f436d0957d4bbe7fdf":"4cabeb02":"bb8e2ef2ed9484f9021cda7073":"fba1d18a74a3bb38671ab2842ffaa434cd572a0b45320e4145930b3008d8d350":"32501f4235c4dd96e83d5ab4c3c31c523453c317" - -CCM encrypt and tag NIST VPT AES-128 #6 (P=5, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3725c7905bfaca415908c617b78f8dee":"f5499a7082":"c98ec4473e051a4d4ac56fd082":"11bc87f1c2d2076ba47c5cb530dd6c2a224f7a0f7f554e23d7d29077c7787680":"e378b776242066751af249d521c6eaebdff40b2642" - -CCM encrypt and tag NIST VPT AES-128 #7 (P=6, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"80bead98a05d1bb173cd4fca463b8fa3":"e479990bf082":"8a14a6d255aa4032ebff37a3d7":"bb4e706e73d21df66f64173859d47e247527cd9832e20dccff8548ed5f554108":"89c9246238878427f36b1f6c633e4542f32b50ca8edb" - -CCM encrypt and tag NIST VPT AES-128 #8 (P=7, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dc8ec91184ba18eae31ac2d3b252673f":"2a5775986551c8":"0da4c988f521f5648259f2bec2":"6d5573c9279897d7d1602d8a95c04bb5ca3fad2dbe89a024b3651eb227e73bb5":"4f259f2a718faea852a7c4358dfa9f5467357638acac90" - -CCM encrypt and tag NIST VPT AES-128 #9 (P=8, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"19f97ef5318b8005fc7133fa31dd1236":"6d972a673fbe1ca1":"01ce9814c6329dbee1d02b1321":"85853f120981f33cf1d50fde6b8bc865fe988a9f12579acdb336f9f992b08b89":"2f12a7e7acecae5d2563309efc19368cdee8266538ca89d3" - -CCM encrypt and tag NIST VPT AES-128 #10 (P=9, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c17944bfaeeb808eed66ae7242ab545f":"7caae2640e734539d3":"910b3db64df3728ca98219e01b":"edf64f98b3ab593cbcf68ab37a8c9472e49cb849d4a744deae925a5a43faf262":"0dae8b3ccf0b439f6ff8ee4a233dfb7753f6bfe321b3e26959" - -CCM encrypt and tag NIST VPT AES-128 #11 (P=10, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0fb9df6f638847f5de371f003dd938f4":"e10cc36bc1c5d3c646ab":"c9ddf61c052f3502ad6b229819":"4f9938d5bc3dcbe47f6b256d5e99723d0891e50c6175aba41b011e4686113c49":"7f797367de50be6dc04e4cf0d8c24189affd35060cb7ca3dd136" - -CCM encrypt and tag NIST VPT AES-128 #12 (P=11, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"006ff7d3153caf906ec7929f5aef9276":"31be1b241cae79c54c2446":"57db1541a185bd9cdc34d62025":"7d9681cac38e778fba11f4464f69ed9ebfea31b7ffcaf2925b3381c65d975974":"9dd8a4244fbdb30b624578a625c43233476bbb959acd9edebe2883" - -CCM encrypt and tag NIST VPT AES-128 #13 (P=12, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"026331e98aba9e8c23a9e8a91d0b0c97":"a82200ef3a08c390dec5cbf9":"bccfe69bba168b81cbdf7d018a":"26e011143a686a7224ddb8c5b1e5d31713fa22c386785e2c34f498ae56d07ed5":"adf4fc6f9be113066c09248fcb56a9c1a1c3bb16fbb9fbaedacdb12b" - -CCM encrypt and tag NIST VPT AES-128 #14 (P=13, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d32088d50df9aba14d9022c870a0cb85":"4b10788c1a03bca656f04f1f98":"e16c69861efc206e85aab1255e":"0eff7d7bcceb873c3203a8df74f4e91b04bd607ec11202f96cfeb99f5bcdb7aa":"89f15b1cb665a8851da03b874ca6f73242f2f227350c0277e4e72cdaa6" - -CCM encrypt and tag NIST VPT AES-128 #15 (P=14, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7301c907b9d2aaac355c5416ff25c59b":"484300aa3a506afcd313b49ead8d":"7304b65b6dab466273862c88b9":"2c5d114eff62c527cc2e03c33c595a80fe609bfc0fe13ce3380efe05d85cceac":"928ca58b0d373dc50c52afac787ce8eeb5d5b493661259a9d91ea31a5f7e" - -CCM encrypt and tag NIST VPT AES-128 #16 (P=15, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"38be46d271bf868c198052391f8a2147":"61bd1385be92097e866550a55278f0":"6758f67db9bfea5f0e0972e08b":"c6de3be97f11d0e2ab85c9353b783f25b37366a78a2012cecf5b7a87138b3c86":"7c9fa8d99b38f825315ece6a2613f55e902f296dcce870263ae50cda4fadae" - -CCM encrypt and tag NIST VPT AES-128 #17 (P=16, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"70010ed90e6186ecad41f0d3c7c42ff8":"be322f58efa7f8c68a635e0b9cce77f2":"a5f4f4986e98472965f5abcc4b":"3fec0e5cc24d67139437cbc8112414fc8daccd1a94b49a4c76e2d39303547317":"8e4425ae573974f0f0693a188b525812eef08e3fb15f4227e0d989a4d587a8cf" - -CCM encrypt and tag NIST VPT AES-128 #18 (P=17, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"79eae5baddc5887bdf3031fd1d65085b":"001343e6191f5f1738e7d19d4eec2b9592":"9da59614535d1fad35f2ece00f":"46603500af9e4e7a2f9545411a58b21a6efd21f2b5f315d02d964c09270145b3":"2162e27bfbf1d00f2404754a254665fd9270f0edb415993588b2535e2e0e4fd086" - -CCM encrypt and tag NIST VPT AES-128 #19 (P=18, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c14eda0f958465246fe6ab541e5dfd75":"617868ae91f705c6b583b5fd7e1e4086a1bb":"32b63ca7e269223f80a56baaaa":"733f8e7670de3446016916510dfe722ce671570121d91331a64feb3d03f210e6":"b2dc1e548b3d3f225a34082f4391980a0788b4cc36852fd64a423fb8e872252b248e" - -CCM encrypt and tag NIST VPT AES-128 #20 (P=19, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c5e7147f56ba4530b8799ababeb82772":"2f3bf0b566440912a1e47a0c07f1cfd39cb440":"bdd38e173fb20b981659c597d6":"3a069a2bfda44abbb0a82a97e5e9047258c803da2c66190d77149e0f010b3af9":"bd6265dcba9e14c59e515e395dc60bd053345fa6d7568c738e3a7fdf142d8f2d1562c0" - -CCM encrypt and tag NIST VPT AES-128 #21 (P=20, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"78c46e3249ca28e1ef0531d80fd37c12":"4802422c9b3b4459ba26e7863ad87b0c172cfe4b":"5de41a86ce3f3fb1b685b3ca4d":"e98a77f2a941b36232589486b05f4278275588665a06d98aec98915cc5607e06":"daea2234ea433533bf0716abe1aa3844b6d3c51e9d5ca3d8ec5065630d2de0717cdeb7d5" - -CCM encrypt and tag NIST VPT AES-128 #22 (P=21, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8883002bf13b3a94b2467225970df938":"d516bbff452e7706c91c7ace3e9baa76d65ff7050f":"818a702d5c8ee973b34e9acda1":"545aeac737c0ca2a3d5e1fd966840c3a0d71e0301abbe99c7af18d24cc7e9633":"b85242fdc06344f2bd9a97b408902ebcd22aece3d42f2da4dd4d817c9fa2d44bc02163a0a9" - -CCM encrypt and tag NIST VPT AES-128 #23 (P=22, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5cea00ee44cfb9cfbb598d3812e380ef":"33bfd0713f30fcac8f7f95920ac6d9b803ddd5480dd8":"948788a9c8188cb988430a7ebd":"50422c5e6a0fb8231b3bb6e2f89607019be6ad92a4dae8e0fe3f9e486476004b":"b168747dea3ae0fbede4402af9a3dc3185d6d162f859d828101682de32923788c70262b84814" - -CCM encrypt and tag NIST VPT AES-128 #24 (P=23, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cb83f77751e72711401cbbf4f61aa0ed":"eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06":"c0b461b2e15b8b116ef9281704":"2bd112231f903fa0dff085db48a2e2a96ec0199249b005d5ab4c2eab753f9ad0":"feb114b7bd3b43497b62454a675a632c3546d2802462c6af57647efda119c59862cd5dd3904efc" - -CCM encrypt and tag NIST VPT AES-128 #25 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"43c1142877d9f450e12d7b6db47a85ba":"b506a6ba900c1147c806775324b36eb376aa01d4c3eef6f5":"76becd9d27ca8a026215f32712":"6a59aacadd416e465264c15e1a1e9bfa084687492710f9bda832e2571e468224":"14b14fe5b317411392861638ec383ae40ba95fefe34255dc2ec067887114bc370281de6f00836ce4" - -CCM encrypt and tag NIST VPT AES-192 #1 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"086e2967cde99e90faaea8a94e168bf0e066c503a849a9f3":"":"929542cd690f1babcf1696cb03":"58f70bab24e0a6137e5cd3eb18656f2b5ccddc3f538a0000c65190e4a3668e71":"3bf9d93af6ffac9ac84cd3202d4e0cc8" - -CCM encrypt and tag NIST VPT AES-192 #2 (P=1, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"992d38768b11a236945bd4b327c3728fac24c091238b6553":"1c":"b248a90b84b0122a5ad8e12760":"27cabc40da0e1eda0ea5f8abbb7c179e30776250a7b30d711b0e106c5ee9d84a":"1a96f58c3f38c44d1a345f3e2da6679f20" - -CCM encrypt and tag NIST VPT AES-192 #3 (P=2, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5012db40ff6ae23c1e1ce43768c5936c4400b0e79ae77f30":"0c6c":"b67e500b35d60ad7264240027c":"40affd355416200191ba64edec8d7d27ead235a7b2e01a12662273deb36379b8":"c996ef3d6ef9f981557506ecc8797bbaaaa7" - -CCM encrypt and tag NIST VPT AES-192 #4 (P=3, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fa15cc7f0de294d7341b1fd79326c8be78e67822343c1992":"bcb898":"e5257aed2bda0495aa44591db4":"31a0338c3839931fa1dd5131cb796c4c6cfde9fb336d8a80ac35dec463be7a94":"68f08298d9a2147776dca9c1a42382bce323b2" - -CCM encrypt and tag NIST VPT AES-192 #5 (P=4, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b5330a8447d74a7987fb718cfae246b5c7e057991064eeaf":"b46b343e":"2ef29d62b40d8643848797cde8":"1225b036e6044df52314016760e92750de0936120395de750a2c54a7fa0cea82":"c2c39d6f9344e2de064f269d065a2a6108605916" - -CCM encrypt and tag NIST VPT AES-192 #6 (P=5, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"30419145ae966591b408c29e5fd14d9112542909be5363f7":"8ceaeb89fd":"27e6b2a482bbc6f13702005708":"e04e81e860daf9696098c723085d8023c240ebe7a643131e35359ab04bd650fe":"ec9d5ed36243ddf77b33d8cf2963ba76fd4e19f3c5" - -CCM encrypt and tag NIST VPT AES-192 #7 (P=6, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"748ad503388a34041a7bdae6361d57894357c333bacf02ca":"24d6880aed7e":"518b79d194579b19f2d8845b70":"691dd98f61fd213b0840ec5a6f06ef9a1420be0d59bde5e43546347a2a865a94":"270120f9634ec15536e21d961c675070ec4cff9037bc" - -CCM encrypt and tag NIST VPT AES-192 #8 (P=7, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b930cca30a3fd230c237c8f3cc6792d0c4084dff5c18d775":"2a755e362373ef":"7574802fd82fe96c05431acd40":"1cf83928b6a9e525fe578c5c0f40c322be71b3092239bff954dd6883738d6d71":"f06238b0450fd1f4b6cab1383adb420c4724aa7bdfefb7" - -CCM encrypt and tag NIST VPT AES-192 #9 (P=8, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"314c136999e41d137bd7ba17201a9fa406025868334e39b3":"4d54d8b06b204445":"65f7a0f4c0f5bba9d26f7e0ddb":"5c7ce4819b30b975ae6ce58dcc1bfa29a8b6dda8f4b76c7e23516487745e829c":"2baf90c490b11f9607482362ab3f157c42d0e9c6c5cffcf0" - -CCM encrypt and tag NIST VPT AES-192 #10 (P=9, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a19f6be062ec0aaf33046bd52734f3336c85d8368bef86ab":"13511ae5ff6c6860a1":"7f2d07f8169c5672b4df7f6cac":"d68d5f763db6111c5d6324d694cb0236beab877daae8115ecb75d60530777b58":"b3859b757802ebd048467fd8e139eb9ee8fcdca45ed87dc1c8" - -CCM encrypt and tag NIST VPT AES-192 #11 (P=10, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"de1c8263345081d2dfa9afdf37675971135e178df554a4d8":"f777aba1fa70f94e6de9":"a301bb82f91a582db01355c388":"9ad52c041390d0d4aaf65a4667c3239c95e7eae6178acc23fb4e70a852d483c6":"9d8bff6d2dcde77104ac6aba025abc01416a7ca9f096ab2529cb" - -CCM encrypt and tag NIST VPT AES-192 #12 (P=11, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"248d36bd15f58e47fcf1c948272355821f8492e6e69f3661":"33709d9c7906e2f82dd9e2":"9e8d492c304cf6ad59102bca0e":"9ec08c7ed6b70823d819e9ab019e9929249f966fdb2069311a0ddc680ac468f5":"9114d36b79b1918b2720f40cddce66df9b4802f737bea4bd8f5378" - -CCM encrypt and tag NIST VPT AES-192 #13 (P=12, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"77a67fb504b961028633321111aac2c30eb6d71a8cf72056":"10554c062d269ff6dcd98493":"acadc0330194906f8c75ac287f":"8c18486d52571f70f2ba6a747aaa3d4b3ebc2e481ee1b70907dddb94bdfa0ca6":"7f8b0cad79b545e5addf0b04ff4b0f2b2a5067283210aba8630d0306" - -CCM encrypt and tag NIST VPT AES-192 #14 (P=13, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0d423519e4110c06063061323f8c7c95387776b6ee4e4b6e":"4021ff104ff1dbd91e46db249f":"39abe53826d9b8e300fe747533":"cdd9bf1b4f865e922c678ec4947ea0cb02e78bd5c1538f33aeb818ad3f47e519":"7953d3cd66d093785d123f65ba37f16761dd6aedbfc789ad96edf1490d" - -CCM encrypt and tag NIST VPT AES-192 #15 (P=14, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a60cf7ceb62bf3118532bc61daa25ce946991047f951b536":"d64f9426febce6a84c954dd5ded5":"7499494faa44a7576f9ed5580d":"baa482c64eefd09118549a8968f44cfea7a436913a428e30aa4ab44802a4ba35":"f7580f17266d68237747bf57c7ed8242ac1a1979c5a9e7bc67d7698c7efa" - -CCM encrypt and tag NIST VPT AES-192 #16 (P=15, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"82d4bc9aac298b09112073277205e1bf42176d1e6339b76c":"25a53fd3e476dc0860eeeea25fcb0c":"70325ef19e581b743095cd5eb1":"6d14bb2635c5d0ae83687f1824279cf141173527e1b32d1baf8a27f7fe34a542":"4a1cfd0023557a184b929965b0a445cb3993ca35acf354cb2b4254ff672e7f" - -CCM encrypt and tag NIST VPT AES-192 #17 (P=16, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6873f1c6c30975aff6f08470264321130a6e5984ade324e9":"5051a0b0b6766cd6ea29a672769d40fe":"7c4d2f7cec04361f187f0726d5":"77743b5d83a00d2c8d5f7e10781531b496e09f3bc9295d7ae9799e64668ef8c5":"0ce5ac8d6b256fb7580bf6acc76426af40bce58fd4cd6548df90a0337c842004" - -CCM encrypt and tag NIST VPT AES-192 #18 (P=17, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3cf8da27d5be1af024158985f725fd7a6242cbe0041f2c17":"f6dd2c64bf597e63263ccae1c54e0805fe":"07f77f114d7264a122a7e9db4f":"30457e99616f0247f1339b101974ea231904d0ef7bd0d5ee9b57c6c16761a282":"ce3031c3a70600e9340b2ddfe56aa72cffdc5e53e68c51ee55b276eb3f85d2cf63" - -CCM encrypt and tag NIST VPT AES-192 #19 (P=18, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b46a3a24c66eb846ca6413c001153dc6998970c12e7acd5a":"56d18d3e2e496440d0a5c9e1bcb464faf5bc":"b79c33c96a0a90030694163e2a":"ea9405d6a46cac9783a7b48ac2e25cc9a3a519c4658b2a8770a37240d41587fb":"01baba2e0d5b49d600d03a7ed84ee878926c0ca478f40a6fbde01f584d938a1c91bf" - -CCM encrypt and tag NIST VPT AES-192 #20 (P=19, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7b71045ccef735bd0c5bea3cf3b7e16e58d9c62061a204e0":"890d05420d57e3b3d8dbef117fe60c3fa6a095":"2b9ecfd179242c295fe6c6fa55":"b89166f97deb9cc7fdeb63639eeafb145895b307749ec1a293b27115f3aa8232":"f842ff6662684de8785af275fa2d82d587de0687ebe35e883cbd53b82f2a4624c03894" - -CCM encrypt and tag NIST VPT AES-192 #21 (P=20, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dc7c67715f2709e150cceff020aaacf88a1e7568191acbcf":"f383bd3e6270876b74abbb5d35e7d4f11d83412c":"da56ea046990c70fa216e5e6c4":"f799818d91be7bab555a2e39f1f45810a94d07179f94fe1151d95ab963c47611":"377b5df263c5c74f63603692cbb61ea37b6d686c743f71e15490ca41d245768988719ede" - -CCM encrypt and tag NIST VPT AES-192 #22 (P=21, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f41e369a1599627e76983e9a4fc2e963dab4960b09ebe390":"81ad3f386bedcbf656ff535c63580d1f87e3c72326":"68ef8285b90f28bcd3cb1bacea":"dbe3e82e49624d968f5463ceb8af189fb3ad8b3b4122142b110d848a286dae71":"9f6028153e06d14d30b862a99a35413413c04a49dc6f68a03a11cf00d58f062a7b36465d13" - -CCM encrypt and tag NIST VPT AES-192 #23 (P=22, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3289e59e3a7b29bf4a309afc253030bba4b9bdd64f0722f9":"53911a67b65738f87fc7c20d6db8044bde1af95838d1":"30259ce106e9bd7a8bacbaf212":"2870bd9a26c510e9a256920899bbc77a4eb9b53f927045a943d5ed6b13638cf3":"70cf37d4b6f7e707376b1574ce17c040b5143da47abb2fe9afafc2fccd98ccf63b0fdec30eac" - -CCM encrypt and tag NIST VPT AES-192 #24 (P=23, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"40f1aff2e44d05f12126097a0f07ac0359ba1a609356a4e6":"8d98c580fb366f330dbfda20f91d99a0878b47efd14c6d":"0df3fc6396f851785fca9aa5ff":"e9699b20b0574fce8b5cbc4ef792eb96e2c1cce36b1b1f06ea2a95fe300633cc":"579cdf9da62a2df471e03450516adb4ce99ae0f70b1776a39c3b429a1f922fac0b59e29a122e43" - -CCM encrypt and tag NIST VPT AES-192 #25 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"91f9d636a071c3aad1743137e0644a73de9e47bd76acd919":"4eaf9384cad976f65f98042d561d760b5a787330dc658f6c":"1bf491ac320d660eb2dd45c6c3":"3bdfd7f18d2b6d0804d779f0679aaa2d7d32978c2df8015ae4b758d337be81dd":"635530cab14e3d0a135bb6eebb5829412676e6dd4995f99cb7e17f235bd660e7e17b2c65320e9fd4" - -CCM encrypt and tag NIST VPT AES-256 #1 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c6c14c655e52c8a4c7e8d54e974d698e1f21ee3ba717a0adfa6136d02668c476":"":"291e91b19de518cd7806de44f6":"b4f8326944a45d95f91887c2a6ac36b60eea5edef84c1c358146a666b6878335":"ca482c674b599046cc7d7ee0d00eec1e" - -CCM encrypt and tag NIST VPT AES-256 #2 (P=1, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cc49d4a397887cb57bc92c8a8c26a7aac205c653ef4011c1f48390ad35f5df14":"1a":"6df8c5c28d1728975a0b766cd7":"080f82469505118842e5fa70df5323de175a37609904ee5e76288f94ca84b3c5":"a5f24e87a11a95374d4c190945bf08ef2f" - -CCM encrypt and tag NIST VPT AES-256 #3 (P=2, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"36b0175379e7ae19c277fe656a2252a82796309be0f0d4e1c07fdde88aca4510":"be80":"021bd8b551947be4c18cf1a455":"b5c6e8313b9c68e6bb84bffd65fa4108d243f580eab99bb80563ed1050c8266b":"ecacc3152e43d9efea26e16c1d1793e2a8c4" - -CCM encrypt and tag NIST VPT AES-256 #4 (P=3, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ddb739acda6c56ec9aefc4f4cbc258587f443da4e76ddfa85dbe0813a8784944":"db457c":"0bddf342121b82f906368b0d7b":"887486fff7922768186363ef17eb78e5cf2fab8f47a4eb327de8b16d63b02acb":"54473c3f65d6be431e79700378049ac06f2599" - -CCM encrypt and tag NIST VPT AES-256 #5 (P=4, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"62b82637e567ad27c3066d533ed76e314522ac5c53851a8c958ce6c64b82ffd0":"87294078":"5bc2896d8b81999546f88232ab":"fffb40b0d18cb23018aac109bf62d849adca42629d8a9ad1299b83fe274f9a63":"2bc22735ab21dfdcfe95bd83592fb6b4168d9a23" - -CCM encrypt and tag NIST VPT AES-256 #6 (P=5, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bc29a16e19cfbe32bf4948e8e4484159bc819b7eec504e4441a1a98ca210e576":"3e8c6d1b12":"4f18bcc8ee0bbb80de30a9e086":"574931ae4b24bdf7e9217eca6ce2a07287999e529f6e106e3721c42dacf00f5d":"45f3795fcf9c66e1a43103d9a18f5fba5fab83f994" - -CCM encrypt and tag NIST VPT AES-256 #7 (P=6, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5f4b4f97b6aa48adb3336c451aac377fde4adf47897fd9ccdf139f33be76b18c":"1b62ad19dcac":"7a76eac44486afdb112fc4aab9":"a66c980f6621e03ff93b55d5a148615c4ad36d6cbdd0b22b173b4b1479fb8ff7":"4ad1fcf57c12b14e0e659a6305b4aeffae82f8a66c94" - -CCM encrypt and tag NIST VPT AES-256 #8 (P=7, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f7aaeff3a1dc0cc5ecf220c67ad9f6dda060b4f1be3cc609cb4f18b2342a88a2":"d48daa2919348d":"d0d6871b9adc8623ac63faf00f":"e97175c23c5b47da8ce67811c6d60a7499b3b7e1347ad860519285b67201fe38":"eb32ab153a8e092fa325bafc176a07c31e6cc0a852d288" - -CCM encrypt and tag NIST VPT AES-256 #9 (P=8, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"493e14623cd250058a7fc66a3fee0c24b6e363b966c2314aff53b276b6c2ea7b":"e5653e512d8b0b70":"fe2d8ae8da94a6df563f89ce00":"579a637e37a0974cd2fc3b735d9ed088e8e488ffe210f043e0f9d2079a015ad6":"75d31f8d47bee5c4e2ba537355ae8ab25cc9ed3511ff5053" - -CCM encrypt and tag NIST VPT AES-256 #10 (P=9, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b23255372455c69244a0210e6a9e13b155a5ec9d6d0900e54a8f4d9f7a255e3a":"615d724ae94a5daf8d":"274846196d78f0af2df5860231":"69adcae8a1e9a3f2fe9e62591f7b4c5b19d3b50e769521f67e7ea8d7b58d9fc8":"f019ae51063239287d896e7127f17d13f98013b420219eb877" - -CCM encrypt and tag NIST VPT AES-256 #11 (P=10, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dbf06366f766e2811ecd5d4384d6d08336adc37e0824d620cf0d9e7fd1e7afa9":"2e3cf0af8c96c7b22719":"b3503ed4e277ed9769b20c10c0":"9ae5a04baa9d02c8854e609899c6240851cbc83f81f752bc04c71affa4eed385":"e317df43ab46eb31be7e76f2730d771d56099a0c8d2703d7a24e" - -CCM encrypt and tag NIST VPT AES-256 #12 (P=11, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4dd555bd3a5253a90b68b5d4d46bd050340ee07ddad3a72048c657b5d76bb207":"8015c0f07a7acd4b1cbdd2":"bdb1b82ba864893c2ee8f7426c":"9bcc5848e928ba0068f7a867e79e83a6f93593354a8bfcfc306aeeb9821c1da1":"8e9f80c726980b3d42e43a6512a0481255b729a10f9edb5f07c60c" - -CCM encrypt and tag NIST VPT AES-256 #13 (P=12, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d3ad8cda9a0d91a205c4c05665728bb255d50a83403c9ab9243fcbbe95ae7906":"a203aeb635e195bc33fd42fa":"0b5f69697eb1af24e8e6fcb605":"ea26ea68facdac3c75ba0cdf7b1ad703c9474af83b3fbfc58e548d776b2529b9":"62666297a809c982b50722bd56bc555899345e0404b2938edf33168e" - -CCM encrypt and tag NIST VPT AES-256 #14 (P=13, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e300fc7a5b96806382c35af5b2c2e8e26382751b59010d4b1cfc90a4a9cb06df":"8714eb9ecf8bdb13e919de40f9":"55b59eb434dd1ba3723ee0dc72":"9b1d85384cb6f47c0b13514a303d4e1d95af4c6442691f314a401135f07829ec":"ba6063824d314aa3cbab14b8c54c6520dac0f073856d9b9010b7857736" - -CCM encrypt and tag NIST VPT AES-256 #15 (P=14, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3ae5be5904bae62609ac525e2d1cad90133447573d7b608975a6a2b16cb2efc0":"959403e0771c21a416bd03f38983":"61bf06b9fa5a450d094f3ddcb5":"0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd":"37a346bc4909965c5497838251826385a52c68914e9d1f63fd297ee6e7ed" - -CCM encrypt and tag NIST VPT AES-256 #16 (P=15, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fab62b3e5deda7a9c1128663cc81c44b74ab1bfe70bc1c9dec7c7fd08173b80a":"54be71705e453177b53c92bbf2ab13":"a5c1b146c82c34b2e6ebeceb58":"5e60b02b26e2d5f752eb55ea5f50bb354a6f01b800cea5c815ff0030b8c7d475":"788db949697b8cd9abbc74ed9aa40cd6852dc829469368491149d6bb140071" - -CCM encrypt and tag NIST VPT AES-256 #17 (P=16, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ee8ce187169779d13e443d6428e38b38b55dfb90f0228a8a4e62f8f535806e62":"d15f98f2c6d670f55c78a06648332bc9":"121642c4218b391c98e6269c8a":"718d13e47522ac4cdf3f828063980b6d452fcdcd6e1a1904bf87f548a5fd5a05":"cc17bf8794c843457d899391898ed22a6f9d28fcb64234e1cd793c4144f1da50" - -CCM encrypt and tag NIST VPT AES-256 #18 (P=17, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7da6ef35ad594a09cb74daf27e50a6b30d6b4160cf0de41ee32bbf2a208b911d":"b0053d1f490809794250d856062d0aaa92":"98a32d7fe606583e2906420297":"217d130408a738e6a833931e69f8696960c817407301560bbe5fbd92361488b4":"a6341ee3d60eb34a8a8bc2806d50dd57a3f628ee49a8c2005c7d07d354bf80994d" - -CCM encrypt and tag NIST VPT AES-256 #19 (P=18, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0786706f680c27b792d054faa63f499a8e6b5ddb90502946235bf74c022d772c":"6a26677836d65bd0d35a027d278b2534e7df":"f61ef1c8c10a863efeb4a1de86":"67874c808600a27fcab34d6f69cc5c730831ad4589075dd82479823cb9b41dc3":"d1c1f3c60603359c7d6a707f05ecb2296f8e52f2210b7a798ad5c778ee7cfd7fe6e0" - -CCM encrypt and tag NIST VPT AES-256 #20 (P=19, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bac55f9847d93325bf5071c220c0a3dfeb38f214292d47b4acb7b0a597fe056f":"c1a994dc198f5676ea85801cd27cc8f47267ec":"05b50c458adbba16c55fcc454d":"89ad6ae1e550975eaa916a62615e6b6a66366a17a7e06380a95ea5cdcc1d3302":"7c9b138177590edaafec4728c4663e77458ffbe3243faec177de4a2e4a293952073e43" - -CCM encrypt and tag NIST VPT AES-256 #21 (P=20, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8beedeb85d42c2a7fa6f7237b05acb197dd8e1672471ac878064fe5319eab876":"7b125c3b9612a8b554913d0384f4795c90cd387c":"8479bdfad28ebe781e9c01a3f6":"7aebdfd955d6e8a19a701d387447a4bdd59a9382156ab0c0dcd37b89419d6eff":"6cc611d816b18c6847b348e46a4119465104254a04e2dfeeeac9c3255f6227704848d5b2" - -CCM encrypt and tag NIST VPT AES-256 #22 (P=21, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c3a0c126cad581012151c25cf85a44472c23f83b6095b6004f4f32cd60ec2db2":"73b09d18554471309141aa33b687f9248b50fe3154":"94ab51ce75db8b046d6ab92830":"2a243246bfe5b5ab05f51bf5f401af52d5bbaa2549cf57a18e197597fe15dd8c":"b7e8264ca70fd2a4fb76f20a8ad5da3c37f5893fb12abeeaef1187f815ca481ed8ddd3dd37" - -CCM encrypt and tag NIST VPT AES-256 #23 (P=22, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9cdebaeee8690b68751070691f49593668a6de12d3a948b38ddbd3f75218b2d4":"3cbb08f133270e4454bcaaa0f20f6d63c38b6572e766":"af1a97d43151f5ea9c48ad36a3":"f5353fb6bfc8f09d556158132d6cbb97d9045eacdc71f782bcef62d258b1950a":"3966930a2ae8fdd8f40e7007f3fde0bd6eb48a46e6d26eef83da9f6384b1a2bda10790dadb3f" - -CCM encrypt and tag NIST VPT AES-256 #24 (P=23, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d34264a12c35cdd67ac105e2826b071e46f8131d1e325f8e0ae80a6447375135":"79ac1a6a9eca5e07ce635bfd666ef72b16f3f2e140d56c":"3891e308b9f44c5b5a8b59004a":"0cda000ed754456a844c9ed61843deea9dadf5e723ea1448057712996d660f8c":"1abcc9b1649deaa0bfa7dcd23508282d9c50ca7fee72486950608d7bcb39dcf03a2cab01587f61" - -CCM encrypt and tag NIST VPT AES-256 #25 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4ad98dbef0fb2a188b6c49a859c920967214b998435a00b93d931b5acecaf976":"9cea3b061e5c402d48497ea4948d75b8af7746d4e570c848":"00d772b07788536b688ff2b84a":"5f8b1400920891e8057639618183c9c847821c1aae79f2a90d75f114db21e975":"f28ec535c2d834963c85814ec4173c0b8983dff8dc4a2d4e0f73bfb28ad42aa8f75f549a93594dd4" - -CCM encrypt and tag NIST VNT AES-128 #1 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c0425ed20cd28fda67a2bcc0ab342a49":"4f065a23eeca6b18d118e1de4d7e5ca1a7c0e556d786d407":"37667f334dce90":"0b3e8d9785c74c8f41ea257d4d87495ffbbb335542b12e0d62bb177ec7a164d9":"768fccdf4898bca099e33c3d40565497dec22dd6e33dcf4384d71be8565c21a455db45816da8158c" - -CCM encrypt and tag NIST VNT AES-128 #2 (P=24, N=8, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0b6256bd328a4cda2510d527c0f73ed4":"78a292662b8e05abc2d44fbefd0840795e7493028015d9f2":"21fd9011d6d9484a":"66ff35c4f86ad7755b149e14e299034763023e7384f4af8c35277d2c7e1a7de2":"5a0be834c57b59d47a4590d8d19a1206d3c06e937a9b57f74034d9fdb43c3f48932aa72177b23bf6" - -CCM encrypt and tag NIST VNT AES-128 #3 (P=24, N=9, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"afdccc84f257cb768b7ad735edbd1990":"56d0942490e546798f30d3c60ad4e3e110fc04f5b1c1fa83":"b7776aa998f4d1189b":"9f9ac464de508b98e789243fdb32db458538f8a291ed93ddf8aeaacfbfc371aa":"96f124c74fd737819008ddef440320f4a3733d0062c83c893e259aecf12ba08f2a2e966a3341d6d4" - -CCM encrypt and tag NIST VNT AES-128 #4 (P=24, N=10, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6ccb68d3838d4ddf660b9cd904cad40f":"5ea35c082e2b190e9d98e6b2daad8672f587b4f2968072fc":"c4fb7519a19f13d9d1fc":"092e64fef08b5655a86cdb8de63ffaa7772e8730844e9016141af8bad2216246":"cda5fe3d15d00150b99120c7f206b88a4c2c4a39ca9143425603ab284a73a38cc916f8b653c92ab4" - -CCM encrypt and tag NIST VNT AES-128 #5 (P=24, N=11, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e6ab9e70a4fb51b01c2e262233e64c0d":"ba15916733550d7aa82b2f6b117cd3f54c83ddc16cd0288a":"74e689eb5af9441dd690a6":"42f6518ee0fbe42f28e13b4bb2eb60517b37c9744394d9143393a879c3e107c7":"dcc151443288f35d39ed8fae6f0ce1d1eb656f4f7fd65c0b16f322ce85d7c54e71ac560fd4da9651" - -CCM encrypt and tag NIST VNT AES-128 #6 (P=24, N=12, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"005e8f4d8e0cbf4e1ceeb5d87a275848":"b6f345204526439daf84998f380dcfb4b4167c959c04ff65":"0ec3ac452b547b9062aac8fa":"2f1821aa57e5278ffd33c17d46615b77363149dbc98470413f6543a6b749f2ca":"9575e16f35da3c88a19c26a7b762044f4d7bbbafeff05d754829e2a7752fa3a14890972884b511d8" - -CCM encrypt and tag NIST VNT AES-128 #7 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ac87fef3b76e725d66d905625a387e82":"959403e0771c21a416bd03f3898390e90d0a0899f69f9552":"61bf06b9fa5a450d094f3ddcb5":"0245484bcd987787fe97fda6c8ffb6e7058d7b8f7064f27514afaac4048767fd":"cabf8aa613d5357aa3e70173d43f1f202b628a61d18e8b572eb66bb8213a515aa61e5f0945cd57f4" - -CCM encrypt and tag NIST VNT AES-192 #1 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ceb009aea4454451feadf0e6b36f45555dd04723baa448e8":"c8d275f919e17d7fe69c2a1f58939dfe4d403791b5df1310":"764043c49460b7":"6e80dd7f1badf3a1c9ab25c75f10bde78c23fa0eb8f9aaa53adefbf4cbf78fe4":"8a0f3d8229e48e7487fd95a28ad392c80b3681d4fbc7bbfd2dd6ef1c45d4ccb723dc074414db506d" - -CCM encrypt and tag NIST VNT AES-192 #2 (P=24, N=8, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1dd56442fa09a42890b1b4274b950770ea8beea2e048193d":"bd92d6744cde446fc8621625658fc4bc00dcb97f06195ad7":"ad749d596d88a4b4":"c67219909828adef64422286008e1e306867a1c0b3da95444507a68b45c953e4":"076cffd0ca978fe2bad411ced45a090abafb22a99896f6a75a1969276aa2b0cdb37ccaf2845dbf6e" - -CCM encrypt and tag NIST VNT AES-192 #3 (P=24, N=9, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8cc622645065c72d0d2aca75802cf1bbbd81096721627c08":"597b3614ff9cd567afd1aad4e5f52cc3fa4ca32b9b213c55":"cd84acbe9abb6a990a":"447b6f36acdad2d1cfd6e9a92f4055ad90142e61f4a19927caea9dbe634d3208":"2d7fb83e6621eed9073e0386d032c6941bef37b2cf36a4c6c5e36222d17c6fb0631c3f560a3ce4a4" - -CCM encrypt and tag NIST VNT AES-192 #4 (P=24, N=10, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ab72eef2aba30205c986e2052d6e2c67881d24ae5fceaa8f":"2a794b84fc9e4a7e6d70a82b5141fd132177a86b4e8fc13a":"d7a46e726ed43f1580eb":"baa86f14271b2be7dbb37ddc7c95ce4857e57aa94624d594d7bd6ceeaada8d5f":"2d7f76464417613bb61d3657481346b74fc9d6abc6a3babd39365dce86859cd82395d11bfc8cf188" - -CCM encrypt and tag NIST VNT AES-192 #5 (P=24, N=11, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"af84c6f302c59aeee6d5728ed5da2e3c64a5a781c52c4d1b":"6db41aeb5f7c24df8929dbc30483b3c7934b3bd1cdce5bb9":"df990c42a268950677c433":"a6ab5d78427f297a4b7e21f1091ff3a5b20caa3fe1cbcb09459d9df596a6c8e1":"8c9328258bf71970d33e23a3ff81cc1c9cbe196a1294264bfd6a7255e4801963bb30a63de3fc5b82" - -CCM encrypt and tag NIST VNT AES-192 #6 (P=24, N=12, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d49b255aed8be1c02eb6d8ae2bac6dcd7901f1f61df3bbf5":"062eafb0cd09d26e65108c0f56fcc7a305f31c34e0f3a24c":"1af29e721c98e81fb6286370":"64f8a0eee5487a4958a489ed35f1327e2096542c1bdb2134fb942ca91804c274":"721344e2fd05d2ee50713531052d75e4071103ab0436f65f0af2a663da51bac626c9f4128ba5ec0b" - -CCM encrypt and tag NIST VNT AES-192 #7 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"36ad1e3fb630d1b1fbccfd685f44edd8984427b78deae7a9":"8b9db1c8f9b4892a5654c85467bcffa2e15e28392c938952":"3af625df8be9d7685a842f260e":"308443033ecd4a814475672b814b7c6d813d0ec2a0caeecbcaba18a2840cdb6c":"6bc6890fee299c712fb8d9df9c141f24ee1572b8f15112c2f8c99ccf2d82788cf613a61d60dae458" - -CCM encrypt and tag NIST VNT AES-256 #1 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"553521a765ab0c3fd203654e9916330e189bdf951feee9b44b10da208fee7acf":"644eb34b9a126e437b5e015eea141ca1a88020f2d5d6cc2c":"aaa23f101647d8":"a355d4c611812e5f9258d7188b3df8851477094ffc2af2cf0c8670db903fbbe0":"27ed90668174ebf8241a3c74b35e1246b6617e4123578f153bdb67062a13ef4e986f5bb3d0bb4307" - -CCM encrypt and tag NIST VNT AES-256 #2 (P=24, N=8, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"472bf7946bce1d3c6f168f4475e5bb3a67d5df2fa01e64bce8bb6e43a6c8b177":"59eb45bbbeb054b0b97334d53580ce03f699ac2a7e490143":"790134a8db83f2da":"a7a86a4407b7ecebc89434baa65ef173e88bd2dad9899b717ca578867c2d916f":"db4961070f528ccd1a5a0681ee4d0ce3515fb890bccedc2dbc00b1d8b2bc393a8d09e87af7811f55" - -CCM encrypt and tag NIST VNT AES-256 #3 (P=24, N=9, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"58ae7965a508e8dd2eda69b5d888a28a1cb3783bad55d59d5b0da87137b72e93":"e61bad17640ecff926d0b0238271ee4c9f8e801dd7243e9e":"caa3d928d2bf2b7f2c":"304678b3ffd3200e33a8912bcb556b3cfec53ca17f70ecba00d359f9f51d3e3b":"7bb1137c14cb4d324a4a8f1115c619ebf74927f0bed60a8d5a9140ff50dc4da375c7d2de80de097f" - -CCM encrypt and tag NIST VNT AES-256 #4 (P=24, N=10, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aecc5e18088bf9fd7b17f089bdd5607b69903b04b726361f8a81e221b1c91891":"d4291c99901345afe29f58912a414a7498f37b44362bdf3c":"c527d309ab29ee91c5fc":"8f9a73e7bc1c11e2919020ba3a404cbddf861e9e78477218e3be2cd4337b278d":"392784a9e0b14bcd37639ec5409d6ead3e75f855e5a92c33ffc040ef3977e0035ce6ea6d157c18d3" - -CCM encrypt and tag NIST VNT AES-256 #5 (P=24, N=11, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"97bc7482a87ba005475dfa3448f59d4b3f9c4c969d08b39b1b21ef965c0f5125":"b99bf4dc781795fc4d3a8467b06e1665d4e543657f23129f":"0bcf78103ec52d6df28887":"049c10f0cb37ae08eae2d0766563b7c5a8454f841c2061a4f71a0a2158ae6ce5":"0d3891fa0caac1f7ebe41b480920ffd34d4155064c24f3b17a483163dd8f228d1f20cd4f86cf38fd" - -CCM encrypt and tag NIST VNT AES-256 #6 (P=24, N=12, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d6ff67379a2ead2ca87aa4f29536258f9fb9fc2e91b0ed18e7b9f5df332dd1dc":"98626ffc6c44f13c964e7fcb7d16e988990d6d063d012d33":"2f1d0717a822e20c7cd28f0a":"d50741d34c8564d92f396b97be782923ff3c855ea9757bde419f632c83997630":"50e22db70ac2bab6d6af7059c90d00fbf0fb52eee5eb650e08aca7dec636170f481dcb9fefb85c05" - -CCM encrypt and tag NIST VNT AES-256 #7 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4a75ff2f66dae2935403cce27e829ad8be98185c73f8bc61d3ce950a83007e11":"205f2a664a8512e18321a91c13ec13b9e6b633228c57cc1e":"46eb390b175e75da6193d7edb6":"282f05f734f249c0535ee396282218b7c4913c39b59ad2a03ffaf5b0e9b0f780":"58f1584f761983bef4d0060746b5d5ee610ecfda31101a7f5460e9b7856d60a5ad9803c0762f8176" - -CCM encrypt and tag NIST VADT AES-128 #1 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d24a3d3dde8c84830280cb87abad0bb3":"7c86135ed9c2a515aaae0e9a208133897269220f30870006":"f1100035bb24a8d26004e0e24b":"":"1faeb0ee2ca2cd52f0aa3966578344f24e69b742c4ab37ab1123301219c70599b7c373ad4b3ad67b" - -CCM encrypt and tag NIST VADT AES-128 #2 (P=24, N=13, A=1, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"08b0da255d2083808a1b4d367090bacc":"1b156d7e2bf7c9a25ad91cff7b0b02161cb78ff9162286b0":"777828b13679a9e2ca89568233":"dd":"e8b80af4960d5417c15726406e345c5c46831192b03432eed16b6282283e16602331bcca9d51ce76" - -CCM encrypt and tag NIST VADT AES-128 #3 (P=24, N=13, A=2, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1538cc03b60880bf3e7d388e29f27739":"e7b819a853ffe79baaa72097ff0d04f02640ae62bcfd3da5":"9e734de325026b5d7128193973":"c93c":"1d8f42f9730424fa27240bd6277f4882604f440324b11b003ca01d874439b4e1f79a26d8c6dc433a" - -CCM encrypt and tag NIST VADT AES-128 #4 (P=24, N=13, A=3, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f149e41d848f59276cfddd743bafa9a9":"9759e6f21f5a588010f57e6d6eae178d8b20ab59cda66f42":"14b756d66fc51134e203d1c6f9":"f5827e":"f634bf00f1f9f1f93f41049d7f3797b05e805f0b14850f4e78e2a23411147a6187da6818506232ee" - -CCM encrypt and tag NIST VADT AES-128 #5 (P=24, N=13, A=4, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9a57a22c7f26feff8ca6cceff214e4c2":"035c516776c706a7dd5f181fa6aa891b04dd423042ea0667":"88f30fd2b04fb8ddbce8fc26e6":"a95bdff6":"b92f7ec2ebecebdbd2977b3874e61bf496a382153b2529fc9b6443a35f329b2068916fb6ab8227eb" - -CCM encrypt and tag NIST VADT AES-128 #6 (P=24, N=13, A=5, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"54caf96ef6d448734700aadab50faf7a":"c69f7c5a50f3e72123371bbfd6bdf532b99ef78500508dfe":"a3803e752ae849c910d8da36af":"5f476348dd":"20c43ad83610880249f1632dd418ec9a5ed333b50e996d1a4e5a32fbe7961b832b722bc07a18595b" - -CCM encrypt and tag NIST VADT AES-128 #7 (P=24, N=13, A=6, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cc0c084d7de011e2f031616a302e7a31":"15b369889699b6de1fa3ee73e5fe19814e46f129074c965b":"f0b4522847f6f8336fe534a4e7":"da853a27aee2":"f39755d160a64611368a8eccf6fcbc45ef7f1f56240eb19a2e3ca4ec3c776ab58843f617d605fd72" - -CCM encrypt and tag NIST VADT AES-128 #8 (P=24, N=13, A=7, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d7572ed0e37261efa02f8c83e695efdc":"1edef80c57d17f969f8bde10ab38a1a8811a124de72c526e":"f4f96d7b4384a3930b3d830f82":"922340ec94861f":"de14558cc686e1836f1f121ea1b941a9ebd4f0fb916dc870fd541b988a801cb5751c7faaf5b0c164" - -CCM encrypt and tag NIST VADT AES-128 #9 (P=24, N=13, A=8, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"98a42d7a0c5917deaf3b4de3f0cbe0a1":"9aa9c8358117564371366beeec923051ef433252197aaad5":"03d33ab0c2df7bfce88b5ee4c4":"2d5438b728b950d9":"9ff942baa60f440c17a78e9581216b9a947a67f04d54911feecfff971fdfaa856310b014aa59c978" - -CCM encrypt and tag NIST VADT AES-128 #10 (P=24, N=13, A=9, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2a68e3fe746f593c1b97cb637079c3e5":"13b4a874888db0e5d8fd814b5e7e04f7fdfbc1601ccc02bc":"cd62d0f27b7f4864dc7c343acd":"abe4f1d3812bfe3ccf":"032835a3dbf688d09cf2a32a92b101959d33ff47500f92f4fd49840440f866d1a22b0854996111d8" - -CCM encrypt and tag NIST VADT AES-128 #11 (P=24, N=13, A=10, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"46b067cf9b1a28cf187002e90b14e130":"cc0915194218d4536e467433cd6d79ff1d9eb9ff160ab684":"bad8c03292bf01cfd8d34f860c":"8d65880eddb9fd96d276":"bd56edc015692c6ab9bec493a9893863598414a3d11a6a0f27ecdcb257d0d30491e5bf1aa8f90958" - -CCM encrypt and tag NIST VADT AES-128 #12 (P=24, N=13, A=11, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e94dac9c90984790a7c0c867536615ff":"4d64461c55eb16bf7b9120f22be349598f2f394da8460dc6":"c19f06f91e645d4199365f18c0":"537038b5357e358a930bd6":"e9fc5004c2359724e1e4411ae6f834ef6bea046d549753c88790c1648f461a31c84e62ea8592a074" - -CCM encrypt and tag NIST VADT AES-128 #13 (P=24, N=13, A=12, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f6bb5d59b0fa9de0828b115303bf94aa":"011fc50329bfd63a85ebd4f7693363602f1a4147371270b7":"05358f33e1fc6a53ab5a5c98ce":"040b25771239cc2a39446e3c":"4432d7eb42980734d34f19c50cf8abf71ac1b19ed75a727854e5d050a405f755047d09cb0f49546a" - -CCM encrypt and tag NIST VADT AES-128 #14 (P=24, N=13, A=13, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d1da2e961e78063af8de41865b226873":"8e5fa1a6662a8378cda15697e926841594f2f394fa5a34ab":"03739f5474857006340cce554d":"e3afd091d2b588465872a6300f":"ca0d95e3ff186ad6b88d45fc4079e6b7b4a615e7e8dd5f4742d522cc9dc19c47a4fa0b1528069cf8" - -CCM encrypt and tag NIST VADT AES-128 #15 (P=24, N=13, A=14, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1eee667267ef10b03624cf9c341e3f75":"798e31cce0a83702a95171fb1162a17b9ce00ec3592ce262":"0630a3eae27e505c61c56e6560":"d24651ef0561282d3e20e834960c":"f3c3e52f1a1ff528a8d3783ee4e75f114e3e6416334815d2d9236d5c5c9319092078411b72c51ba8" - -CCM encrypt and tag NIST VADT AES-128 #16 (P=24, N=13, A=15, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dbbd26f5d9e970e4e384b2273961be5a":"553714e17a208a2eceb847a4a2d95088388b1ac8d8ca43e0":"0b1eabe504ef4822542e397fec":"477937301c83ba02d50760b603e0ea":"1c80213268bad5402c4dc9b5d836ab7499810d0d8a974716df9a0e986ab2890736423bb3772cec3e" - -CCM encrypt and tag NIST VADT AES-128 #17 (P=24, N=13, A=16, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"10a7720f2e18f739c26924925af6b670":"e59782a9aea45f467b90e51a0fdf166baba05663def2d8b6":"8c4e7813ab9bce9dafee01c628":"a209941fab710fda38d11c68b13d930f":"e357b1ccdaca6f3506dc45279c2e4c59f5307a5fd6a99cd72341ea8c0785569973f90ee9ee645acc" - -CCM encrypt and tag NIST VADT AES-128 #18 (P=24, N=13, A=17, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6bffab1f4f4c1ff66b4a669b515b2f8d":"d91b12e8655dd92b1332fc1d71c391c96a17111562d90ba3":"ddb34d5e0140fb96d690e1a2b7":"5cbba9ea778e01af00afb2a934f28c7211":"d302e5b2d5d90433186b804cd7717e2db2f22cdc34fb2942ab30780a2c4f12af8f35350d65284c59" - -CCM encrypt and tag NIST VADT AES-128 #19 (P=24, N=13, A=18, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ae6136df9ab43631ef143515dacedbe7":"6a493c5ef3769ccc4101dbb2eb36e1e5bbc577a057ce0731":"c5c445792208a50c8e93d64aa3":"e04006b68c83a5dd4ceac3cde238e48895ae":"c7584c0203c2535c5702c6ae93b7cbfb066f4a055c627a180d6d676d11fce907b5c93fa1ed7bff2b" - -CCM encrypt and tag NIST VADT AES-128 #20 (P=24, N=13, A=19, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f1908328edf2996ebfc9655472ca5ad0":"eede01b08f9a303cdf14c99d7a45732972c6eff2a1db06eb":"4c693364546930b6c5250e2699":"4a3634e5028df97fbe00eb016e8ea4f1918faa":"90c850790b0b380f5aeb2488fdf43c9d5ef1759861e86f6e52570e769629dcc2e568737ba53a1195" - -CCM encrypt and tag NIST VADT AES-128 #21 (P=24, N=13, A=20, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"61cb8eb792e95d099a1455fb789d8d16":"6ad541695a37c32d73ff6d5f870abd5b0f362a8968c4fce0":"1f37b3e59137f2a60dc09d16ac":"09db3efac9473f713da630ae92c2c8604c61c51e":"e65fcc975865c1499b088b58ba163283085d8ca68dc3b235d89756e5d78753ef22c012ae34b39a20" - -CCM encrypt and tag NIST VADT AES-128 #22 (P=24, N=13, A=21, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"be1ed49e2cb0caf6b6a0940c58453b93":"a9eec383f63892521e4616fcbadc5485942ffaf4669c43a7":"b78ad129457681fa7346435b97":"161d92c7df1ebb0924719e066e08b95eb4914a5eda":"949be340720c4fdc4adc05cb777dd81a2549628d33fba07e62d2b338a7b34ebd9d85c244c952d681" - -CCM encrypt and tag NIST VADT AES-128 #23 (P=24, N=13, A=22, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"34ab6fd7f54a2e0276fcb7cf1e203aba":"8d164f598ea141082b1069776fccd87baf6a2563cbdbc9d1":"6091afb62c1a8eed4da5624dd7":"1ab5cc3d7b01dc74e6cf838bb565fea3187d33d552a2":"0d30ab07153b5153637969e6bd3539448c541e42b3d432fd7ef14622a9b621d1721b944c60f7fd67" - -CCM encrypt and tag NIST VADT AES-128 #24 (P=24, N=13, A=23, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ea96f90fbae12a857f5c97e0cba57943":"49db80f22bc267a70e5636dfbc8a21c83d9691fe4b9c3051":"21cc46d9ced1539b0ad946e600":"105258d2f25f62675aee975cfdb668aff833f05b61eb2a":"d2fcc8b7809b5fc07e44083e437d8180157f1782a9ce9f65c7fa9ee2e7cdc1b755258f2212a8a8f4" - -CCM encrypt and tag NIST VADT AES-128 #25 (P=24, N=13, A=24, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"35b403a15212097085d6e2b77ec3d4f2":"7dd7396db6613eb80909a3b8c0029b624912aabedda0659b":"daa423bf9256c3fcc347a293aa":"d3c0ed74e5f25e4c1e479e1a51182bb018698ec267269149":"5b00cf8a66baa7fe22502ed6f4861af71fa64b550d643f95eee82c19ecba34280604b58d92dacd3f" - -CCM encrypt and tag NIST VADT AES-128 #26 (P=24, N=13, A=25, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7a459aadb48f1a528edae71fcf698b84":"0b3d947de8632dc8ff752f619ba7c84716fac7a23e101641":"fa4616b715ea898772b0e89dd4":"0c0b4a45df5c3919c1e1669c5af5d398d9545e44307d95c481":"7db9f3f7dc26fc2adf58d4525d26d5601e977de5a7c33911a1138cff7b624f9908b5b4d7e90a824a" - -CCM encrypt and tag NIST VADT AES-128 #27 (P=24, N=13, A=26, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ca748225057f735f712ecc64791367f0":"e92cd0cb97afe4fb00c4f12e9b9abe1d08db98f49a27f461":"1341a6998eb1f50d4b710a13ac":"5fb96b045f494808c02014f06074bd45b8a8ad12b4cb448ec162":"82b666694232e86e82295beae66ae67d56aceb5d6b1484ceb4a6843ec16078038c10afedc41f5362" - -CCM encrypt and tag NIST VADT AES-128 #28 (P=24, N=13, A=27, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fdf2b2c7fcb3789b4e90abe607dca2af":"d7aa4efa5d75195a400018bd38f7d8cd53fdffe88df1837f":"a69ddc66e63a3415f21009d53a":"c76846da496ed87b9c0f65c6266c9a822224acde9775efb186a4a5":"150d9a8b78d9c04239d66207a1f95021bbb1b7c70d7c354825d05e5a2e76a90f6fe489fd74cab2a3" - -CCM encrypt and tag NIST VADT AES-128 #29 (P=24, N=13, A=28, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7d870d7e52d3053c65eefad47764cfeb":"109317556c21c969eda65a94176d7a11462c9ae18a865b6d":"37d888f4aa452d7bf217f5a529":"9610949f6d23d5b1f3989b2f4e524fab4f297a5bec8ddad4f16cb616":"4e6b967b1571c6d7b9e118b112b7ac949a4a175650316a242dd579cb0d201d22c86bbc7fbe47bd0d" - -CCM encrypt and tag NIST VADT AES-128 #30 (P=24, N=13, A=29, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8fcac40527c0e7ca8eaff265ca12c053":"78d1e96af8cebdcc7e7e2a4ddcfa34f6cf9a24fb85672ad7":"ae9f012fd9af60a400e20b1690":"9ce65598cd1f86afc9aaaf172809570cc306333c25523f863c6d0e0154":"9adb9a95a9379ad795d8d3ffd4e37a045160d6d727f974a6cb3b5151f327e65447e52c7525562c91" - -CCM encrypt and tag NIST VADT AES-128 #31 (P=24, N=13, A=30, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ddf9f150cc3f1c15e8e773663c5b061c":"79d8841ab83279724ce35e1a8abd4e158168dcf388ab4c3d":"98c5036b7d54da9a1177105600":"20c5ab290e6d97f53c74121951f39ba865b3acc465fa3f0fb8a591622277":"d00d29396ffa9e691290d746527777bf96a851f306d4da0b1816df1e0e82bb7bc8105930ad6a2232" - -CCM encrypt and tag NIST VADT AES-128 #32 (P=24, N=13, A=31, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b1dc81d116d94f5eced526b37c004b95":"54390715b6e7c7bd51a234db059a51ba030cf22ee00b7277":"97c8f69fb91b17299461fd8d63":"f8b08aa83bed09ca342249b2cf9e2b45a89dcfb8711a120395e455921af481":"cb629994c3418a662a8cde1b5f4d99aa7df66e24c53dc6df11297930fd44c63675b7cca70671ef4d" - -CCM encrypt and tag NIST VADT AES-128 #33 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5a33980e71e7d67fd6cf171454dc96e5":"a34dfa24847c365291ce1b54bcf8d9a75d861e5133cc3a74":"33ae68ebb8010c6b3da6b9cb29":"eca622a37570df619e10ebb18bebadb2f2b49c4d2b2ff715873bb672e30fc0ff":"7a60fa7ee8859e283cce378fb6b95522ab8b70efcdb0265f7c4b4fa597666b86dd1353e400f28864" - -CCM encrypt and tag NIST VADT AES-192 #1 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886":"39f08a2af1d8da6212550639b91fb2573e39a8eb5d801de8":"15b369889699b6de1fa3ee73e5":"":"6342b8700edec97a960eb16e7cb1eb4412fb4e263ddd2206b090155d34a76c8324e5550c3ef426ed" - -CCM encrypt and tag NIST VADT AES-192 #2 (P=24, N=13, A=1, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9748798c0f3cc766795c8ce0e4c979c1930dfe7faefea84a":"100fa71462277d76ca81f2cfdb3d39d3894b0ca28074a0f0":"cdf4ba655acfe8e2134fa0542f":"67":"36e2415b4f888a6072f260d7e786d803be16f8b9cbee112d7ff74e3b05b7d7c13284573bd3e7e481" - -CCM encrypt and tag NIST VADT AES-192 #3 (P=24, N=13, A=2, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"393dcac5a28d77297946d7ab471ae03bd303ba3499e2ce26":"262f4ac988812500cb437f52f0c182148e85a0bec67a2736":"fe7329f343f6e726a90b11ae37":"1c8b":"e6d43f822ad168aa9c2e29c07f4592d7bbeb0203f418f3020ecdbc200be353112faf20e2be711908" - -CCM encrypt and tag NIST VADT AES-192 #4 (P=24, N=13, A=3, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a74abc4347e4be0acb0a73bb8f7d25c35bae13b77f80233a":"6372824bf416cd072a7ad0ae5f9f596c6127520c1b688ab4":"6a850e94940da8781159ba97ef":"a4490e":"b14a07bdc119d87611342c4c6935c5786ff1f9ae2eb49e6191c88a3cb4fbafcb8a4a157d587d7e39" - -CCM encrypt and tag NIST VADT AES-192 #5 (P=24, N=13, A=4, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"df052e95aea3769a433ce4e4e800b8418649bbe8c6297eb0":"e8c1a89228d8212f75c136bab7923a89f9fea18e781cb836":"ba356d392c3f700f4f2706a4ca":"8ffc0e3d":"66b5d782323925e1bd0a8413a9a5a881356453d5df2cbeb199b2e1e803550dcdde55fd66ecb45edd" - -CCM encrypt and tag NIST VADT AES-192 #6 (P=24, N=13, A=5, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"16d345606a315ad2406abbcb43cd8cabe948107ba6d17a72":"d3bef460223c81e4579c9d1d463ac5e0881685de1420a411":"d4ef3e9e04f1b7f20ffc5a022e":"a468f08d07":"abb85db49a9b1c8724ecbc734cc8373bd20083cfa4007b1cfe4d3a3bb25f89f692884be230c6035c" - -CCM encrypt and tag NIST VADT AES-192 #7 (P=24, N=13, A=6, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1c476cfd7dd300d961fd3f24a6fe0e80742b00851676ca63":"6f3938932b5c1280311e892280d8a822a828a0be7fdb1bcd":"e300fc7a5b96806382c35af5b2":"28130f938c45":"df48662fe134e75a85abc2cece2c3b6236c88a70fa792e9beadc9601adf9fbdf4e3e94b395b0a332" - -CCM encrypt and tag NIST VADT AES-192 #8 (P=24, N=13, A=7, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"79d1e38a70df1cf239be168833dcd0570bc8f37b3aa26c37":"83c24f3a77b83b4ef45277ba90225f3ba1722312f52b1a07":"8229d6d7e9e21fdc789bff5dcf":"076887d2abe900":"19d880f1d959a68f162de243d4a45747ace704613359b27218d1531a066de60a95d2924a6910e990" - -CCM encrypt and tag NIST VADT AES-192 #9 (P=24, N=13, A=8, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"72e6cebdaf88205c4e74428664bc0d7eb4687a272217b7ca":"54bc7e3c227df4e83252a5848fea12dfdb2d14b9e67c1629":"3820db475c7cb04a0f74d8e449":"f427c47e10c45bb3":"91e7baff2b42af63e26c87ce6991af22422c1f82906858b1721961de5c768f4d19bd3034f44f08d2" - -CCM encrypt and tag NIST VADT AES-192 #10 (P=24, N=13, A=9, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"39c03a0c8634047b1635348f284d3dc1e752ab40548eb337":"0662e63c88e963d3e0cf2c4653515ae4474a2c78ab0394c0":"9e2ea8eb7f56087ee506925648":"28d157f09a71da80dd":"01dcd4dd3b8c1369518136ce45e8bb9df565b0ad231a887b02ada34addf0aa2f4744ed2e07995491" - -CCM encrypt and tag NIST VADT AES-192 #11 (P=24, N=13, A=10, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e2a92ffbb0b5eb68cb82687f12449fae5167d375131b0b10":"048c9ba4597c3bb595bfd5048e5e9a1296f30e5c0118b177":"441ad5e1382e083a95224f395d":"2352648299b0413cb2ce":"25247a258e4ac0a988d8def60cc174a9d4578cd5346fb5150c96e8ab8774baa421f39c64a386c418" - -CCM encrypt and tag NIST VADT AES-192 #12 (P=24, N=13, A=11, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ef1ad3eb0bde7d4728389da2255d1f8a66ecb72e6f2f1ac4":"9f580cc6c62a05ce125c6bec109a48ca527ee26a64b14b68":"8e7d8a44244daa7df2b340993e":"521583c25eb4a3b2e46120":"ff0ff95bcb0bccd5e4aadd77ac6770f5013654eb3c6386fded2c87135861b43a99f258b6938f66e3" - -CCM encrypt and tag NIST VADT AES-192 #13 (P=24, N=13, A=12, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"44cba20b7204ed85327c9c71c6fea00b47ce7bdde9dea490":"6333bde218b784ccd8370492f7c8c722f8ef143af66d71d7":"f3329154d8908f4e4a5b079992":"f1e0af185180d2eb63e50e37":"b9401a4927b34dc15e9193db00212f85f0c319781ec90e3b4484d93cb422cb564acc63d3d18e169c" - -CCM encrypt and tag NIST VADT AES-192 #14 (P=24, N=13, A=13, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b5f43f3ae38a6165f0f990abe9ee50cd9ad7e847a0a51731":"3726c1aaf85ee8099a7ebd3268700e07d4b3f292c65bba34":"13501aebda19a9bf1b5ffaa42a":"ead4c45ff9db54f9902a6de181":"fd80e88f07dad09eed5569a4f9bb65c42ef426dda40450119503d811701642143013f28ce384d912" - -CCM encrypt and tag NIST VADT AES-192 #15 (P=24, N=13, A=14, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"13f179aa2a23bc90a85660306394940e9bb226ce3885ec01":"d3b36c6289ad6ae7c5d885fe83d62a76270689ce05fa3b48":"aaa52c63ca1f74a203d08c2078":"5cc924222692979a8e28ab1e0018":"bc4fcef401c2e1d1c335734ff23ea52c3474d2e6f31648a7f58649400ac9e825b038d67f0c2a6f1c" - -CCM encrypt and tag NIST VADT AES-192 #16 (P=24, N=13, A=15, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c1dfc48273d406a3a7b9176f80b2dc4e9a7f68134bab66d2":"67d9728a88f1fac3af43ed6d634ba902896bd226858697d9":"1ac53ba965cdaeeef7326a37e4":"39ba54a410a58a5d11615a2163cc3b":"360f0fc714994e3b59448b50cdd61d511b4f09e0e5fb5ac826a51fe5b9b598a17eb3da10f936813b" - -CCM encrypt and tag NIST VADT AES-192 #17 (P=24, N=13, A=16, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d8a662ab8449bd037da0346a24565683a3bbbbd1800e3c1c":"61fdd10938557080191d13dd6c3002dd445d9af988029199":"166fb8d0e110124c09013e0568":"1c1c082eeb5b8548283d50cc2ace1c35":"23c05927502a4ee6e61e4e10552d49b020643eab476eeacc867601fe79a122a7817819655183283e" - -CCM encrypt and tag NIST VADT AES-192 #18 (P=24, N=13, A=17, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"116f4855121d6aa53e8b8b43a2e23d468c8568c744f49de5":"1bd3b5db392402790be16e8d0a715453928f17f3384c13a7":"924322a3ef0c64412f460a91b2":"03c2d22a3bb08bbb96b2811ce4b1110a83":"ad736402626df0f9393fe4491eb812725ad39d6facf20b5b2f9340b0d48a17ae1cc71d7515e61ee9" - -CCM encrypt and tag NIST VADT AES-192 #19 (P=24, N=13, A=18, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e67f3ba11282d61fe36e38cab7b559c2fd9cbe8bf7eb5863":"d7a954dae563b93385c02c82e0143b6c17ce3067d8b54120":"a727ed373886dd872859b92ccd":"68d199e8fced02b7aeba31aa94068a25d27a":"c6cfaa1f54d041089bd81f89197e57a53b2880cefc3f9d877e30b2bcc3f1ea9ec2b8f28bf0af4ecf" - -CCM encrypt and tag NIST VADT AES-192 #20 (P=24, N=13, A=19, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e0a29a2c7840cf9b41de49780b9ee92d646a4bfc5b9da74a":"344dc8b6bd66a1fbbe330a95af5dd2a8783dc264d6a9267d":"fc9fd876b1edded09f70b18824":"36e15baafa0002efbb4bb26503b7e3b79f6c68":"43b3b96aa5a54378f3bb573ffda3e154aa7f425fc3008175b60a77b9d38740356b544b1c0f259086" - -CCM encrypt and tag NIST VADT AES-192 #21 (P=24, N=13, A=20, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"26d0a3a8509d97f81379d21981fe1a02c579121ab7356ca0":"37ab2a0b7b69942278e21032fc83eba6cdc34f5285a8b711":"8015c0f07a7acd4b1cbdd21b54":"093ed26ada5628cfb8cfc1391526b3bcc4af97d9":"a3a60b422eb070b499cf6da0a404b13a05cedda549c6b93e6ca0e07e04674f21a46df2659a5905fb" - -CCM encrypt and tag NIST VADT AES-192 #22 (P=24, N=13, A=21, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aac60835c309d837aacc635931af95702a4784c214283ebb":"e8610756528f75607b83926597ef515f4b32a8386437e6d4":"0e20602d4dc38baa1ebf94ded5":"796e55fbe7bed46d025599c258964a99574c523f6a":"e0a3d5f43e688ce104f4ae1a4fcd85500aa6b8fdbcd1b8d3003c0c3b7369e79339433e1754c0937f" - -CCM encrypt and tag NIST VADT AES-192 #23 (P=24, N=13, A=22, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"671544bf2988056f7f9ccd526861391a27233793a23f811f":"576b069ae2713f53d2924c1fd68f786cb2eec68892f9e1be":"0a259148a1d081e0df381ecd0c":"61dafc237cb52f83ab773ba8a885462b6f77d4924611":"ce06b3d09b02921f290544032a081a7766612940048867281bb089af0245792c16e6320cf5ffa19e" - -CCM encrypt and tag NIST VADT AES-192 #24 (P=24, N=13, A=23, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"90e2c63b6e5394b1aeec03f95a9d13a01a7d4e9d58610786":"44dd098b1f869d670a8a841900c4bef023a1946a0c278354":"dada5465eb9b7229807a39e557":"f5629ca0eea589f6cf963d875a7d2efb656983f2dd2231":"6b38ca85450e05e7b9362ed7e6e291a130ff233b5a561cdef7ec84dd992fdf98514f845dac8f656e" - -CCM encrypt and tag NIST VADT AES-192 #25 (P=24, N=13, A=24, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"13cdaaa4f5721c6d7e709cc048063cfb8b9d92e6425903e6":"d7c837971b973f5f651102bf8d032e7dcd10e306739a0d6c":"f97b532259babac5322e9d9a79":"ad6622279832502839a82348486d42e9b38626e8f06317c4":"4709600418f2839841e6d126359f6982bdb53acc7ff209635623d15b24184481eadc63bb8c878fc4" - -CCM encrypt and tag NIST VADT AES-192 #26 (P=24, N=13, A=25, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"90851933d4d3257137984cdb9cba2ca737322dac4dbd64bc":"ba1785a149cb8b69a4e011c11a3ff06f6d7218f525ac81b5":"be02df3a840322df8d448c600c":"69a9dd9ac8be489c3a3f7f070bdaca10699171f66ab3da9351":"89ab2efefa8406336d9e2245199fbc9454f0ef650b9ed0f446c7246bd3130803bf8d703ef5bdf15c" - -CCM encrypt and tag NIST VADT AES-192 #27 (P=24, N=13, A=26, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5c5d02c93faa74a848e5046fc52f236049e28cd8096dcac6":"b4da43ebfe9396b68f4689fba8837c68d0064841c6ddd4a7":"54cbf2889437673b8875a0f567":"09fc21ac4a1f43de29621cacf3ad84e055c6b220721af7ce33bb":"d40725397229021a18f3481e3a85f70445557bb2a85e4ae8101a34c777e918e16186fda05a386572" - -CCM encrypt and tag NIST VADT AES-192 #28 (P=24, N=13, A=27, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0234dae5bd7ae66c67ff0c1a3f1a191a0d7bceb451bc2b7d":"0f960a89a7e806f8709047cb7a2e7c4211ad724692c88a05":"16d345606a315ad2406abbcb43":"c37fdf7449fd7e943595d75e977089c623be0a3926e63fdbbfdf4a":"3907880d25f910eab12dd14e704d1b33ea7c453634d54da2a461f44dac1112ae3f9c65671a931d3e" - -CCM encrypt and tag NIST VADT AES-192 #29 (P=24, N=13, A=28, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6351a67fd6daabd2fd49ee944dd41dd37301f958dd17fcc3":"0c0663dd69ccbffbbd0c8c2e9473d0354451ae7a20fa3695":"b8d517b033754058128d13d11a":"511c6924fa96db716f6b053b7a48aebdc1504145a56cd02d6be2590d":"19f2745df5007619c79c84d174e4521b942776478a0601d982c560fede4741e2fd3b54b3a48f3e38" - -CCM encrypt and tag NIST VADT AES-192 #30 (P=24, N=13, A=29, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9a5a9560baed3b8e0e90b92655d4e5f33889e5d7253d9f6c":"5bbe9c1fb2563e3e82999fe097b28da4dc6ff2e020f3b4f3":"c0049382cdd8646756d4e6bff5":"c95a86d52088a8b0107cc5b437a8938b2c9e74e46e2e03bb9bceecdbe3":"6d5401db42b5c48b79203b6ad82806d7460ac4c82ad0809b811020480e834f6fe55900a162a4e61a" - -CCM encrypt and tag NIST VADT AES-192 #31 (P=24, N=13, A=30, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3e61094c80df0053e86d43fccf4e1d3ee2cdb862d3237b0a":"1fada8f4c7daea0d1c370184c169485b80a278708ed41451":"63f00b2488809fdc49ca5f05d5":"a08763ca936abdeece06467bef8c3c47c3a473636a039d4db540c867d3e3":"680dd22f16a1290bde42c9792dfa997aed24d5bd2265b6e095aa6b99d3f894d3790c2aa2dae1ba2c" - -CCM encrypt and tag NIST VADT AES-192 #32 (P=24, N=13, A=31, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b5664dd6ed435df006052f6ded74bb7ce9482ca9229886f7":"0b6de49b530703affc94010c2b793ddc6de0c44d48037ff2":"7a1649896f3e030c18f0205599":"c5f1a26351e53e6509c8bbbed03c42c23ad81c65fccec7ffa1cb494c7f1fc4":"56b02fea595cc24e798691ae905be3d466ca68ca744005dba260b5ea3b047020b73b5bafa17e5084" - -CCM encrypt and tag NIST VADT AES-192 #33 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"50925853a84a33ff392154e4e737efc18dcfc98f4d5235a9":"718f061e8b972a3adcf465d66c5b28e8661f080127f6722f":"809343e986f6ff47f54d4cac22":"d70aef3532bdc5293a3ebb11589ac1f801c9f93ea0d656e1d04068facf9f768b":"bad3b0e6772e9c4c9c631c095e259d99692292932efb72b8966e91a19617bb748f3495aa433585bb" - -CCM encrypt and tag NIST VADT AES-256 #1 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886df3ba3e6da3a1389":"30d56ff2a25b83fee791110fcaea48e41db7c7f098a81000":"72a60f345a1978fb40f28a2fa4":"":"55f068c0bbba8b598013dd1841fd740fda2902322148ab5e935753e601b79db4ae730b6ae3500731" - -CCM encrypt and tag NIST VADT AES-256 #2 (P=24, N=13, A=1, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a4490ed6ab51dbfccd6f3702a857575dad44da3a27eaf31178abc97da60d1e4b":"1b5cc6b1651dec4bbbf5130343852e971c7ff1774100d9be":"26ceaf6e3b28190a17c4f0c378":"9e":"789bce069a725a96c484e64a9e54dcb7a7c268c85df47815a462ff2dd8ba44a381e1f6edab12b5a9" - -CCM encrypt and tag NIST VADT AES-256 #3 (P=24, N=13, A=2, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"df594db94ef8eca56a417afe946085eaed444c7cc648d07d58132e6cb5bc2bc3":"f4d7978fad36223623ccb5bb18a7373cba8a6e3b1c921259":"c1ad812bf2bbb2cdaee4636ee7":"c0c3":"bea778540a90033b2c0d087e3cc447711ea25f7eea96855506ec97f23bd6ea97834f92f7263c3195" - -CCM encrypt and tag NIST VADT AES-256 #4 (P=24, N=13, A=3, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d98193ab2a465e3fcd85651aaeca18b8e91489b73b7c7e93b518c4b5b81fc6ac":"edba7d6312144e90ec9eaace7576045a46e553dcb8ee5a98":"2247dc7e2674e9e0a63fe70613":"4dc2f4":"44b9ea727c847336fd739ad11f4b906b292edb810462f06ef59626ad5cdac2e4d4cb07b538a1fd8f" - -CCM encrypt and tag NIST VADT AES-256 #5 (P=24, N=13, A=4, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"45c8afd7373cb0f6b092af3a633d9fd97c4ca378e19d75f9b74d089429726c29":"0b92adbb251dc29a67f0bb97f8e7160862b6c4e843d07fd9":"fdb1fa230ae0b172ff98fc7496":"270981af":"274e2faea3271ea6fa0494c1951f115b5491a893056c3ee4c76fc350e585277e373e9119bf9595cb" - -CCM encrypt and tag NIST VADT AES-256 #6 (P=24, N=13, A=5, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a2e6bf39efd1ceddc92b4333ed92d65efeea6c031ca345adb93a7770a8039bcd":"d822f84b023f12ea9e3ce16b904278e4aaab5e11c2c23f3f":"693cbb46bc8366086ec7cd7776":"3ba11282d6":"9f91fd2f6472e33b02b1eabb9d6655729d44c44dad6b3883fe0667bcc5806b225224b04ade8b21c1" - -CCM encrypt and tag NIST VADT AES-256 #7 (P=24, N=13, A=6, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c5a850167a5bfdf56636ce9e56e2952855504e35cc4f5d24ee5e168853be82d8":"e758796d7db73bccb1697c42df691ac57974b40ca9186a43":"c45b165477e8bfa9ca3a1cd3ca":"4759557e9bab":"93ad58bd5f4f77ac4f92b0ae16c62489e4074c7f152e2ed8a88179e0d32f4928eff13b4ce2873338" - -CCM encrypt and tag NIST VADT AES-256 #8 (P=24, N=13, A=7, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ae8f93c3efe38e2af07e256961dd33028faa0716e5320a7ab319a10d2f4c5548":"bc9ca92a9c9919e39095d3e53fb148694620ae61227e0069":"6333bde218b784ccd8370492f7":"0b1fabdf2a4107":"45811b0c8f754bf03950e520cd4afc81c2e3eb8a11f4fd386d5a6e4b1fbee15d35939c721004502e" - -CCM encrypt and tag NIST VADT AES-256 #9 (P=24, N=13, A=8, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"548c2d1eb7d91e003633d4d9ff199e4a8447180edd89ac7867d25a1db288b5ce":"49fd5cbe4aff89dc3b8718f9ce545d612cbbebb289ecbf42":"23b205bd6ff8ed0bab0c98999c":"a6601111cd92c943":"3cfc6211e359ae322802fc9566f377b0dfe17d1dfe0878ebf2a9047e37cc0be1fab0006af8db8dc4" - -CCM encrypt and tag NIST VADT AES-256 #10 (P=24, N=13, A=9, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aab793e377a12484dbdd74c9b3a85c74c286e1cc498663fbd7c718b5633bb91a":"7c0889854658d3408c5d8043aad2f4ae4a89449a36f8a3b8":"10022cddb323e88b3c08f95a0f":"82b8c736037ce2f2e8":"1044250f58857c69f72b5d3454d43949e5c02b3822970b280de1a3f7fc5d06cc30f06075f5504ed7" - -CCM encrypt and tag NIST VADT AES-256 #11 (P=24, N=13, A=10, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"06ac39896073a44283611a66ccab067e2dd2faa8da82ff9a45bb29e54d2e6e77":"3216dce3b8b1ce0e79e40fffcac728ab191aaaf319d971d3":"6c7942c9819cf69b817bfcdb0a":"215e2a6c24325340fdec":"c5b3b50ed8a7b7b96b02ba9464b6a2ff80e90548605699a63d70e6dffb31a376a1eb7f94526dca48" - -CCM encrypt and tag NIST VADT AES-256 #12 (P=24, N=13, A=11, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"50412c6444bcf9829506ab019e98234af1541061557412740bc120b456052763":"6cdbd63f6d591f59776f828533b28e2453a214d1d0dd8a39":"85684f94c3702c5d870310166d":"f706a3e09df95d3e21d2e0":"8c8b4ae854a5d5c265b25e3b54bded9444cc454b3e0e6a24d6c05eaf406a5ebd578e19edd5227380" - -CCM encrypt and tag NIST VADT AES-256 #13 (P=24, N=13, A=12, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8a56588fe5e125237b6cdc30f940b8d88b2863ec501a0cb00b1abade1b5ce0ed":"c825952293e434ea866db558aaf486ef09a92bf366988f71":"d80210b9f9776ea36dc0e0a787":"e4296d1c8cf4ffc4b2635135":"b8b3b15fdf6a4a0b5abc313afc769e4e8413bd887552583ede3ed995d1b70561c8e28a7b1a7e3dc8" - -CCM encrypt and tag NIST VADT AES-256 #14 (P=24, N=13, A=13, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a4cc7e1c90f8684e6a5f95e6898ab4e3c194cb46e196d8228062b9f3fa744930":"10d4cff95ef490923c9e0906880729d4d05412e7675cce76":"cdc2712e51c7f333d6bad78eee":"569c56b27268d3db54e728aac0":"be3ce3e9dc72499839a98ae52abb17415e8547687e8a3c7b8aaaac20d4c9276f2851cbba2b04d185" - -CCM encrypt and tag NIST VADT AES-256 #15 (P=24, N=13, A=14, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"347e12eec56e95aafcc7d25bf10fc756b4e42bc2e43da7f97df24331f27f1f5c":"ca88dddfc876a12f45f19562bc9ca250f43267ab251a7f34":"b8d517b033754058128d13d11a":"511c6924fa96db716f6b053b7a48":"eeedcfa8f5b5b48c1d7e277526eecb7294213b9f5785167ae949b93003dfe63c95c1d49edfb4de3f" - -CCM encrypt and tag NIST VADT AES-256 #16 (P=24, N=13, A=15, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"520902aa27c16dee112812b2e685aa203aeb8b8633bd1bfc99728a482d96c1fe":"533fee7d2c7740db55770e48cb1b541d990ea3f8f08ed1a6":"ddf50502f414c1bf24888f1328":"22b4f8f1aac02a9b2ef785d0ff6f93":"fc867b319e0e4ab45ec518a1b5dcec4f29982173f3abfd4d8a8f8d14d2bdac84c3737cfbd75b7c0b" - -CCM encrypt and tag NIST VADT AES-256 #17 (P=24, N=13, A=16, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"57da1c2704219ed59abfdf04743a9a93c87a63d471818de0f1564b2db6421562":"ddc3c1aa73fb6de92bb4db138e26f3c2e0543ab4f5924871":"4b60a47b7e90f622fa0bf803e1":"0ae8c012ff39753510df3ee80707e4e2":"daa8256d4753fdf9cfef876295badaba89b45cc497f54d220ec2c6fb687753bca4580adc6aa2f296" - -CCM encrypt and tag NIST VADT AES-256 #18 (P=24, N=13, A=17, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9267ebc99ccf648b146cba3c251187e24a9947d806ceb0ced6894211641a1e0d":"967daf12f16f166b7b5038f83a1cf0b980f5abf4c7746f2a":"9b7298950280e8762ecdc9bbe4":"5824689453bc406bf891b85e4576e38fe8":"7cfe2a7a54306eb8d8a63d3d1ae86794f9a2c22198b2cb4f10ca926f1a430c08c12e23db3d913e93" - -CCM encrypt and tag NIST VADT AES-256 #19 (P=24, N=13, A=18, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7a855e1690ee638de01db43b37401dcd569c1ae03dc73dd0a917d0cadb5abc29":"33ae68ebb8010c6b3da6b9cb29fe9f8bd09b59ec39f4ce4b":"8f160a873a1166c8b32bccbba7":"72674aca7eba2fc0eeafbd143c2c4d8aa6c8":"b22afdf4f12c43ec23e01ac1215a3f5286059211207e957057e9a9203da74387a9468f8af5e27547" - -CCM encrypt and tag NIST VADT AES-256 #20 (P=24, N=13, A=19, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0ebdc6ddb4c502725dd6ee8da95d56a0d1044b4694d6ba8475a4434f23a8474f":"c7360282c85484a5a33ab1c68dd70873ab4e74ffd4a62cd5":"fb717a8c82114477253acc14f6":"41e9d65632f74f449a6842d5e6c4a86ef83791":"2e961b3a2fa1609a4e6fd04bff6ac5e306ae2638706f997b42be2e2ba05c54b619850db5c9d684fe" - -CCM encrypt and tag NIST VADT AES-256 #21 (P=24, N=13, A=20, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2ff64bbec197a63315c2f328dcb4837d0cdc21a5d6f89ff1d97cb51195330cd8":"4a17522da707b4b2587a0ae367a2cd2831bb593a18ef442a":"a235f8ee3de9896b71910ac02c":"2b411bea57b51d10a4d2fb17ef0f204aa53cf112":"1bf122798bd8ee8e73391d589bd046a294d1615794e69cb9e6f3ba30143acbc3a1c1c6ec74333107" - -CCM encrypt and tag NIST VADT AES-256 #22 (P=24, N=13, A=21, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"24e9f08a9a007f9976919e10dc432002e2e078a339677f00105c72ed35633a3f":"d3416a81b4246eb0bf8119a72a886bbc0ac9449c69f71d2f":"15977424eeec0ec7f647e6c798":"2d838eb51a4bc69a001a18adf2084a680f02a3c5fc":"e001a8fae390dc5d672cdd18f86a1f728158ec83a002050def9af5679edbcbb7db20ab6af30698db" - -CCM encrypt and tag NIST VADT AES-256 #23 (P=24, N=13, A=22, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0ec1b22b8df05dc92135d2dfbefed8ea81458f5ea1b801e8a218faf6cbdf1a79":"2f59d94d4ab8eeb84c2a6fefb7fb0a3ac059c1e1a65ae34a":"97ebcb8575bb58260208d5c227":"a2f6337f86dd00d1a58448851e95d8c9bace4a5c8710":"7ca0b1dbe34b0391e524b868b0af08b3e096917664d6aa2cabc1f9d0132394149c9062b74b82f04b" - -CCM encrypt and tag NIST VADT AES-256 #24 (P=24, N=13, A=23, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0875020959ed969cfb38636d1d5aabce9658b00171a7614ea9e5395331c7659c":"065ef9eeafbe077c1c7049f43eb0d8999708e8609f214d5c":"451101250ec6f26652249d59dc":"7cc9c51b69f98a06391ab32742fb6365e15106c811fe8a":"990065322a438e136860f7b019807e9feff52a642bf3d44a9163fa7a867f04cab6f52dc250070f31" - -CCM encrypt and tag NIST VADT AES-256 #25 (P=24, N=13, A=24, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ef4c1d2314e671f666cc6667660f1438a293208c7cc29b412d81277f0a635c91":"c99c3e79125b6fd95e737326a842424eb6c6ecea4c0475c4":"50b23b052922366c25dd40e348":"cd0522ebe1fed82465277d1c10ae9316a98b4469be63b180":"76df4be4ec8373864399acda11294b220b9f7c3a7d2b3660b25764e40ac6a171e7e6bab4fdee4288" - -CCM encrypt and tag NIST VADT AES-256 #26 (P=24, N=13, A=25, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8544808e8fbf8c3a5e1d4ca751d4b603af9fe119eabc6923205815e0e748b7e7":"617d54fc6a23601c79e3984f93bfc2d151fde420863206b3":"b44a58724596b4d8dea827c1a0":"f5b2c88f5232c37273b1e66aa31cfa7201e33c21d60054d025":"57b3414db48982c6567265e1e0173bf38fdfaffe4461fbebc1411af83237c0f9eb0bfe8ed914da66" - -CCM encrypt and tag NIST VADT AES-256 #27 (P=24, N=13, A=26, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e19eaddd9f1574447e7e6525f7fd67e3b42807e44fbb60e75d8c3e98abc18361":"b3b0de10b7c0996662f1b064e04e528b7d85ca1166985d33":"a8c459ce0223358826fb1ec0f0":"ef88f4393d6c1e7b7be55a12144209ee051bb779e440432721ef":"d63e6082c95c6c5ff2bc0771321a4f883ef61cff7b99e0ea8a20a1abe7c842ebc08c8c81a2743c81" - -CCM encrypt and tag NIST VADT AES-256 #28 (P=24, N=13, A=27, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9498f02e50487cfbda1ce6459e241233bd4c4cb10281dcb51915dbc7fb6545c0":"0d16cc69caa9f19b88b05e151b3d26accd018ca4a5786a80":"e3bd4bc3a60cddd26c20aa8636":"70cfcb828d483216b46c3cd22e2f9ee879e9e3059b566179b6e16c":"f1c4bedb8d6f91676881daa37656a7e6402f472735b04a0f1f8332f4236437737438e7aa1b5100c7" - -CCM encrypt and tag NIST VADT AES-256 #29 (P=24, N=13, A=28, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3ac7d5bc4698c021e49a685cd71057e09821633957d1d59c3c30cbc3f2d1dbf8":"89198d3acc39b950f0d411119c478c60b2422ffe7e26e00b":"54c8ff5459702aac058bb3be04":"ecbd7091732e49c0f4bda2e63235ea43bbf8c8730f955f9c049dd1ec":"7717b8e4447afcea1eeebf3e39ffdab2f52828e7931ef27e475acd27900478f09fec1f479ab3a7c8" - -CCM encrypt and tag NIST VADT AES-256 #30 (P=24, N=13, A=29, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"948882c3667caa81c9b900996e3d591e6fcb3d08333eeb29911e9c6338710c17":"8b9130b0c3c15366831bbb19f377e3209a8dbf7619cd09bd":"43b0aca2f0a9030f90559fa6d3":"a516ca8405e5c8854e667921b5c5e1968bdd052915b55ac9984b7eefb3":"4646b2acdeb11174171da23999cd54e297daa32bbc13d30512e57c576b315f48c11877178389aaa0" - -CCM encrypt and tag NIST VADT AES-256 #31 (P=24, N=13, A=30, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3bf52cc5ee86b9a0190f390a5c0366a560b557000dbe5115fd9ee11630a62769":"094b538110495e938b08cf748a6bcf3e0c80ff9c66570237":"f9fbd02f28ecc929d369182752":"ebf0b3e3199a5c3773c761c725c7600add5f9d8321c9f8e5e5fd1c7a5d2f":"4d8b53016fc8bc9677184c0fa15bbd3d671b9366d82ecb67f8562eadcdcbcdbad1299bea1523f5d2" - -CCM encrypt and tag NIST VADT AES-256 #32 (P=24, N=13, A=31, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e45bb1730d0d539aab3805350ac986540de9f0f6c239ee70395c291397b70309":"bc8b3bc48c7a88c9fafde258b6ccaa9d4f0d018703d63871":"d5c7824af715bb7822b6b340fe":"860f4a09ad8b3d345c2aa18ffb803f0bc3b734a4d047a1437701a5e3d95288":"95f083ad6bbaee6ab540fe023858f8baf25e333fd3e89c00e678a392d228b210dc5c991905dacf3f" - -CCM encrypt and tag NIST VADT AES-256 #33 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2e6e34070caf1b8820ed39edfa83459abe1c15a1827f1c39f7ac316c4c27910f":"771a7baa9cf83aa253349f6475d5e74dba4525307b022ba7":"c49ccef869bb86d21932cb443b":"d37e35d7cdccd9824a1ae4c787819735e4af798a3beb49d4705336d6496853ad":"eebac2475004970071dfa2cfb855c4e78b1add8dcbccfc0bd6b14027324b657a56263df148665393" - -CCM auth decrypt tag NIST DVPT AES-128 #1 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4ae701103c63deca5b5a3939d7d05992":"02209f55":"5a8aa485c316e9":"":4:"" - -CCM auth decrypt tag NIST DVPT AES-128 #2 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4ae701103c63deca5b5a3939d7d05992":"9a04c241":"3796cf51b87266":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #3 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3":"75d582db43ce9b13ab4b6f7f14341330":"5a8aa485c316e9":"":16:"" - -CCM auth decrypt tag NIST DVPT AES-128 #4 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3":"3a65e03af37b81d05acc7ec1bc39deb0":"3796cf51b87266":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #5 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3":"90156f3f":"5a8aa485c316e9403aff859fbb":"":4:"" - -CCM auth decrypt tag NIST DVPT AES-128 #6 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3":"88909016":"a16a2e741f1cd9717285b6d882":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #7 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd":"fb04dc5a44c6bb000f2440f5154364b4":"5a8aa485c316e9403aff859fbb":"":16:"" - -CCM auth decrypt tag NIST DVPT AES-128 #8 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd":"5447075bf42a59b91f08064738b015ab":"a16a2e741f1cd9717285b6d882":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #9 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd":"a90e8ea44085ced791b2fdb7fd44b5cf0bd7d27718029bb703e1fa6b":"5a8aa485c316e9":"":4:"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -CCM auth decrypt tag NIST DVPT AES-128 #10 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd":"50aafe0578c115c4a8e126ff7b3ccb64dce8ccaa8ceda69f23e5d81c":"31f8fa25827d48":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #11 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d5243":"24ab9eeb0e5508cae80074f1070ee188a637171860881f1f2d9a3fbc210595b7b8b1b41523111a8e":"5a8aa485c316e9":"":16:"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -CCM auth decrypt tag NIST DVPT AES-128 #12 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d5243":"7ebfda6fa5da1dbffd82dc29b875798fbcef8ba0084fbd2463af747cc88a001fa94e060290f209c4":"31f8fa25827d48":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #13 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d5243":"4a550134f94455979ec4bf89ad2bd80d25a77ae94e456134a3e138b9":"5a8aa485c316e9403aff859fbb":"":4:"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -CCM auth decrypt tag NIST DVPT AES-128 #14 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d5243":"118ec53dd1bfbe52d5b9fe5dfebecf2ee674ec983eada654091a5ae9":"49004912fdd7269279b1f06a89":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #15 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe4829":"4bfe4e35784f0a65b545477e5e2f4bae0e1e6fa717eaf2cb6a9a970b9beb2ac1bd4fd62168f8378a":"5a8aa485c316e9403aff859fbb":"":16:"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -CCM auth decrypt tag NIST DVPT AES-128 #16 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe4829":"0c56a503aa2c12e87450d45a7b714db980fd348f327c0065a65666144994bad0c8195bcb4ade1337":"49004912fdd7269279b1f06a89":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #17 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe4829":"782e4318":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":4:"" - -CCM auth decrypt tag NIST DVPT AES-128 #18 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe4829":"a04f270a":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #19 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b":"41b476013f45e4a781f253a6f3b1e530":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":16:"" - -CCM auth decrypt tag NIST DVPT AES-128 #20 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b":"f9f018fcd125822616083fffebc4c8e6":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #21 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b":"9f69f24f":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":4:"" - -CCM auth decrypt tag NIST DVPT AES-128 #22 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b":"e17afaa4":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #23 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c7571":"1859ac36a40a6b28b34266253627797a":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":16:"" - -CCM auth decrypt tag NIST DVPT AES-128 #24 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c7571":"edf8b46eb69ac0044116019dec183072":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #25 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c7571":"6be31860ca271ef448de8f8d8b39346daf4b81d7e92d65b338f125fa":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":4:"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -CCM auth decrypt tag NIST DVPT AES-128 #26 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c7571":"4cc57a9927a6bc401441870d3193bf89ebd163f5c01501c728a66b69":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #27 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728c":"b351ab96b2e45515254558d5212673ee6c776d42dbca3b512cf3a20b7fd7c49e6e79bef475c2906f":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":16:"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -CCM auth decrypt tag NIST DVPT AES-128 #28 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728c":"df1a5285caa41b4bb47f6e5ceceba4e82721828d68427a3081d18ca149d6766bfaccec88f194eb5b":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #29 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728c":"934f893824e880f743d196b22d1f340a52608155087bd28ac25e5329":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":4:"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -CCM auth decrypt tag NIST DVPT AES-128 #30 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728c":"f43ba9d834ad85dfab3f1c0c27c3441fe4e411a38a261a6559b3b3ee":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-128 #31 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"26511fb51fcfa75cb4b44da75a6e5a0e":"50038b5fdd364ee747b70d00bd36840ece4ea19998123375c0a458bfcafa3b2609afe0f825cbf503":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":16:"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -CCM auth decrypt tag NIST DVPT AES-128 #32 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"26511fb51fcfa75cb4b44da75a6e5a0e":"78ed8ff6b5a1255d0fbd0a719a9c27b059ff5f83d0c4962c390042ba8bb5f6798dab01c5afad7306":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #1 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"c98ad7f38b2c7e970c9b965ec87a08208384718f78206c6c":"9d4b7f3b":"5a8aa485c316e9":"":4:"" - -CCM auth decrypt tag NIST DVPT AES-192 #2 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"c98ad7f38b2c7e970c9b965ec87a08208384718f78206c6c":"80745de9":"3796cf51b87266":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #3 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"17223038fa99d53681ca1beabe78d1b4":"5a8aa485c316e9":"":16:"" - -CCM auth decrypt tag NIST DVPT AES-192 #4 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"d0e1eeef4d2a264536bb1c2c1bde7c35":"3796cf51b87266":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #5 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"fe69ed84":"5a8aa485c316e9403aff859fbb":"":4:"" - -CCM auth decrypt tag NIST DVPT AES-192 #6 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"db7ffc82":"a16a2e741f1cd9717285b6d882":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #7 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"0c66a8e547ed4f8c2c9a9a1eb5d455b9":"5a8aa485c316e9403aff859fbb":"":16:"" - -CCM auth decrypt tag NIST DVPT AES-192 #8 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"38757b3a61a4dc97ca3ab88bf1240695":"a16a2e741f1cd9717285b6d882":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #9 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"411986d04d6463100bff03f7d0bde7ea2c3488784378138cddc93a54":"5a8aa485c316e9":"":4:"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -CCM auth decrypt tag NIST DVPT AES-192 #10 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"32b649ab56162e55d4148a1292d6a225a988eb1308298273b6889036":"31f8fa25827d48":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #11 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"cba4b4aeb85f0492fd8d905c4a6d8233139833373ef188a8c5a5ebecf7ac8607fe412189e83d9d20":"5a8aa485c316e9":"":16:"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -CCM auth decrypt tag NIST DVPT AES-192 #12 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"ca62713728b5c9d652504b0ae8fd4fee5d297ee6a8d19cb6e699f15f14d34dcaf9ba8ed4b877c97d":"31f8fa25827d48":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #13 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"042653c674ef2a90f7fb11d30848e530ae59478f1051633a34fad277":"5a8aa485c316e9403aff859fbb":"":4:"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -CCM auth decrypt tag NIST DVPT AES-192 #14 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"1902d9769a7ba3d3268e1257395c8c2e5f98eef295dcbfa5a35df775":"49004912fdd7269279b1f06a89":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #15 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"a5b7d8cca2069908d1ed88e6a9fe2c9bede3131dad54671ea7ade30a07d185692ab0ebdf4c78cf7a":"5a8aa485c316e9403aff859fbb":"":16:"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -CCM auth decrypt tag NIST DVPT AES-192 #16 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"9a98617fb97a0dfe466be692272dcdaec1c5443a3b51312ef042c86363cc05afb98c66e16be8a445":"49004912fdd7269279b1f06a89":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #17 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"1d089a5f":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":4:"" - -CCM auth decrypt tag NIST DVPT AES-192 #18 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"2f46022a":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #19 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"5280a2137fee3deefcfe9b63a1199fb3":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":16:"" - -CCM auth decrypt tag NIST DVPT AES-192 #20 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"d40a7318c5f2d82f838c0beeefe0d598":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #21 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"5e0eaebd":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":4:"" - -CCM auth decrypt tag NIST DVPT AES-192 #22 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"71b7fc33":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #23 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"d07ccf9fdc3d33aa94cda3d230da707c":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":16:"" - -CCM auth decrypt tag NIST DVPT AES-192 #24 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"65fe32b649dc328c9f531584897e85b3":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #25 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"9f6ca4af9b159148c889a6584d1183ea26e2614874b0504575dea8d1":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":4:"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -CCM auth decrypt tag NIST DVPT AES-192 #26 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"84d8212e9cfc2121252baa3b065b1edcf50497b9594db1ebd7965825":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #27 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"6aab64c4787599d8f213446beadb16e08dba60e97f56dbd14d1d980d6fe0fb44b421992662b97975":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":16:"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -CCM auth decrypt tag NIST DVPT AES-192 #28 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"4980b2ee49b1aaf393175f5ab9bae95ec7904557dfa206603c51d36c826f01384100886198a7f6a3":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #29 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"16e543d0e20615ff0df15acd9927ddfe40668a54bb854cccc25e9fce":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":4:"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -CCM auth decrypt tag NIST DVPT AES-192 #30 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"df35b109caf690656ae278bbd8f8bba687a2ce11b105dae98ecedb3e":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-192 #31 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886":"c5b0b2ef17498c5570eb335df4588032958ba3d69bf6f3178464a6f7fa2b76744e8e8d95691cecb8":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":16:"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -CCM auth decrypt tag NIST DVPT AES-192 #32 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886":"d1f0518929f4ae2f0543de2a7dfe4bb0110bb3057e524a1c06bd6dc2e6bcc3436cffb969ae900388":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #1 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6":"469c90bb":"a544218dadd3c1":"":4:"" - -CCM auth decrypt tag NIST DVPT AES-256 #2 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6":"46a908ed":"d3d5424e20fbec":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #3 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"8207eb14d33855a52acceed17dbcbf6e":"a544218dadd3c1":"":16:"" - -CCM auth decrypt tag NIST DVPT AES-256 #4 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"60f8e127cb4d30db6df0622158cd931d":"d3d5424e20fbec":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #5 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"8a19a133":"a544218dadd3c10583db49cf39":"":4:"" - -CCM auth decrypt tag NIST DVPT AES-256 #6 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"2e317f1b":"3c0e2815d37d844f7ac240ba9d":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #7 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"97e1a8dd4259ccd2e431e057b0397fcf":"a544218dadd3c10583db49cf39":"":16:"" - -CCM auth decrypt tag NIST DVPT AES-256 #8 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"5a9596c511ea6a8671adefc4f2157d8b":"3c0e2815d37d844f7ac240ba9d":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #9 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"64a1341679972dc5869fcf69b19d5c5ea50aa0b5e985f5b722aa8d59":"a544218dadd3c1":"":4:"d3d5424e20fbec43ae495353ed830271515ab104f8860c98" - -CCM auth decrypt tag NIST DVPT AES-256 #10 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"c5b7f802bffc498c1626e3774f1d9f94045dfd8e1a10a20277d00a75":"bfcda8b5a2d0d2":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #11 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"bc51c3925a960e7732533e4ef3a4f69ee6826de952bcb0fd374f3bb6db8377ebfc79674858c4f305":"a544218dadd3c1":"":16:"d3d5424e20fbec43ae495353ed830271515ab104f8860c98" - -CCM auth decrypt tag NIST DVPT AES-256 #12 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"afa1fa8e8a70e26b02161150556d604101fdf423f332c3363275f2a4907d51b734fe7238cebbd48f":"bfcda8b5a2d0d2":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #13 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"63e00d30e4b08fd2a1cc8d70fab327b2368e77a93be4f4123d14fb3f":"a544218dadd3c10583db49cf39":"":4:"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e" - -CCM auth decrypt tag NIST DVPT AES-256 #14 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"bb5425b3869b76856ec58e39886fb6f6f2ac13fe44cb132d8d0c0099":"894dcaa61008eb8fb052c60d41":"":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #15 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"f0050ad16392021a3f40207bed3521fb1e9f808f49830c423a578d179902f912f9ea1afbce1120b3":"a544218dadd3c10583db49cf39":"":16:"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e" - -CCM auth decrypt tag NIST DVPT AES-256 #16 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"c408190d0fbf5034f83b24a8ed9657331a7ce141de4fae769084607b83bd06e6442eac8dacf583cc":"894dcaa61008eb8fb052c60d41":"":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #17 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"92d00fbe":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":4:"" - -CCM auth decrypt tag NIST DVPT AES-256 #18 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"9143e5c4":"78c46e3249ca28":"232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #19 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"93af11a08379eb37a16aa2837f09d69d":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":16:"" - -CCM auth decrypt tag NIST DVPT AES-256 #20 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"d19b0c14ec686a7961ca7c386d125a65":"78c46e3249ca28":"232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #21 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"866d4227":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":4:"" - -CCM auth decrypt tag NIST DVPT AES-256 #22 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"94cb1127":"e8de970f6ee8e80ede933581b5":"89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #23 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"867b0d87cf6e0f718200a97b4f6d5ad5":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":16:"" - -CCM auth decrypt tag NIST DVPT AES-256 #24 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"677a040d46ee3f2b7838273bdad14f16":"e8de970f6ee8e80ede933581b5":"89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #25 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"c2fe12658139f5d0dd22cadf2e901695b579302a72fc56083ebc7720":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":4:"78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3" - -CCM auth decrypt tag NIST DVPT AES-256 #26 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"94748ba81229e53c38583a8564b23ebbafc6f6efdf4c2a81c44db2c9":"6ba004fd176791":"5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #27 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"3341168eb8c48468c414347fb08f71d2086f7c2d1bd581ce1ac68bd42f5ec7fa7e068cc0ecd79c2a":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":16:"78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3" - -CCM auth decrypt tag NIST DVPT AES-256 #28 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"d543acda712b898cbb27b8f598b2e4438ce587a836e2785147c3338a2400809e739b63ba8227d2f9":"6ba004fd176791":"5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b":16:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #29 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"c0ea400b599561e7905b99262b4565d5c3dc49fad84d7c69ef891339":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":4:"e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3" - -CCM auth decrypt tag NIST DVPT AES-256 #30 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"60871e03ea0eb968536c99f926ea24ef43d41272ad9fb7f63d488623":"8fa501c5dd9ac9b868144c9fa5":"5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800":4:"FAIL" - -CCM auth decrypt tag NIST DVPT AES-256 #31 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e":"8d34cdca37ce77be68f65baf3382e31efa693e63f914a781367f30f2eaad8c063ca50795acd90203":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":16:"e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3" - -CCM auth decrypt tag NIST DVPT AES-256 #32 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C -mbedtls_ccm_auth_decrypt:MBEDTLS_CIPHER_ID_AES:"314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e":"516c0095cc3d85fd55e48da17c592e0c7014b9daafb82bdc4b41096dfdbe9cc1ab610f8f3e038d16":"8fa501c5dd9ac9b868144c9fa5":"5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800":16:"FAIL" - -CCM-Camellia encrypt and tag RFC 5528 #1 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E":"00000003020100A0A1A2A3A4A5":"0001020304050607":"BA737185E719310492F38A5F1251DA55FAFBC949848A0DFCAECE746B3DB9AD" - -CCM-Camellia encrypt and tag RFC 5528 #2 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F":"00000004030201A0A1A2A3A4A5":"0001020304050607":"5D2564BF8EAFE1D99526EC016D1BF0424CFBD2CD62848F3360B2295DF24283E8" - -CCM-Camellia encrypt and tag RFC 5528 #3 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20":"00000005040302A0A1A2A3A4A5":"0001020304050607":"81F663D6C7787817F9203608B982AD15DC2BBD87D756F79204F551D6682F23AA46" - -CCM-Camellia encrypt and tag RFC 5528 #4 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E":"00000006050403A0A1A2A3A4A5":"000102030405060708090A0B":"CAEF1E827211B08F7BD90F08C77288C070A4A08B3A933A63E497A0" - -CCM-Camellia encrypt and tag RFC 5528 #5 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F":"00000007060504A0A1A2A3A4A5":"000102030405060708090A0B":"2AD3BAD94FC52E92BE438E827C1023B96A8A77258FA17BA7F331DB09" - -CCM-Camellia encrypt and tag RFC 5528 #6 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F20":"00000008070605A0A1A2A3A4A5":"000102030405060708090A0B":"FEA5480BA53FA8D3C34422AACE4DE67FFA3BB73BABAB36A1EE4FE0FE28" - -CCM-Camellia encrypt and tag RFC 5528 #7 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E":"00000009080706A0A1A2A3A4A5":"0001020304050607":"54532026E54C119A8D36D9EC6E1ED97416C8708C4B5C2CACAFA3BCCF7A4EBF9573" - -CCM-Camellia encrypt and tag RFC 5528 #8 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F":"0000000A090807A0A1A2A3A4A5":"0001020304050607":"8AD19B001A87D148F4D92BEF34525CCCE3A63C6512A6F5757388E4913EF14701F441" - -CCM-Camellia encrypt and tag RFC 5528 #9 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20":"0000000B0A0908A0A1A2A3A4A5":"0001020304050607":"5DB08D62407E6E31D60F9CA2C60474219AC0BE50C0D4A5778794D6E230CD25C9FEBF87" - -CCM-Camellia encrypt and tag RFC 5528 #10 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E":"0000000C0B0A09A0A1A2A3A4A5":"000102030405060708090A0B":"DB118CCEC1B8761C877CD8963A67D6F3BBBC5CD09299EB11F312F23237" - -CCM-Camellia encrypt and tag RFC 5528 #11 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F":"0000000D0C0B0AA0A1A2A3A4A5":"000102030405060708090A0B":"7CC83D8DC49103525B483DC5CA7EA9AB812B7056079DAFFADA16CCCF2C4E" - -CCM-Camellia encrypt and tag RFC 5528 #12 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0C0D0E0F101112131415161718191A1B1C1D1E1F20":"0000000E0D0C0BA0A1A2A3A4A5":"000102030405060708090A0B":"2CD35B8820D23E7AA351B0E92FC79367238B2CC748CBB94C2947793D64AF75" - -CCM-Camellia encrypt and tag RFC 5528 #13 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"C6B5F3E6CA2311AEF7472B203E735EA561ADB17D56C5A3":"00A970110E1927B160B6A31C1C":"6B7F464507FAE496":"A435D727348DDD22907F7EB8F5FDBB4D939DA6524DB4F64558C02D25B127EE" - -CCM-Camellia encrypt and tag RFC 5528 #14 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"01F6CE6764C574483BB02E6BBF1E0ABD26A22572B4D80EE7":"0083CD8CE0CB42B160B6A31C1C":"986605B43DF15DE7":"8AE052508FBECA932E346F05E0DC0DFBCF939EAFFA3E587C867D6E1C48703806" - -CCM-Camellia encrypt and tag RFC 5528 #15 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"CDF1D8406FC2E9014953897005FBFB8BA57276F92404608E08":"005F54950B18F2B160B6A31C1C":"48F2E7E1A7671A51":"08B67EE21C8BF26E473E408599E9C0836D6AF0BB18DF55466CA80878A790476DE5" - -CCM-Camellia encrypt and tag RFC 5528 #16 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"B005DCFA0B59181426A961685A993D8C43185B":"00EC600863319AB160B6A31C1C":"DE97DF3B8CBD6D8E5030DA4C":"63B78B4967B19EDBB733CD1114F64EB226089368C354828D950CC5" - -CCM-Camellia encrypt and tag RFC 5528 #17 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"2E20211298105F129D5ED95B93F72D30B2FACCD7":"0060CFF1A31EA1B160B6A31C1C":"A5EE93E457DF05466E782DCF":"0BC6BBE2A8B909F4629EE6DC148DA44410E18AF43147383276F66A9F" - -CCM-Camellia encrypt and tag RFC 5528 #18 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"2645941E75632D3491AF0FC0C9876C3BE4AA7468C9":"000F85CD995C97B160B6A31C1C":"24AA1BF9A5CD876182A25074":"222AD632FA31D6AF970C345F7E77CA3BD0DC25B340A1A3D31F8D4B44B7" - -CCM-Camellia encrypt and tag RFC 5528 #19 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"070135A6437C9DB120CD61D8F6C39C3EA125FD95A0D23D":"00C29B2CAAC4CDB160B6A31C1C":"691946B9CA07BE87":"05B8E1B9C49CFD56CF130AA6251DC2ECC06CCC508FE697A0066D57C84BEC182768" - -CCM-Camellia encrypt and tag RFC 5528 #20 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"C8C0880E6C636E20093DD6594217D2E18877DB264E71A5CC":"002C6B7595EE62B160B6A31C1C":"D0C54ECB84627DC4":"54CEB968DEE23611575EC003DFAA1CD48849BDF5AE2EDB6B7FA775B150ED4383C5A9" - -CCM-Camellia encrypt and tag RFC 5528 #21 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"F75DAA0710C4E64297794DC2B7D2A20757B1AA4E448002FFAB":"00C53CD4C2AA24B160B6A31C1C":"E285E0E4808CDA3D":"B1404546BF667210CA28E309B39BD6CA7E9FC8285FE698D43CD20A02E0BDCAED2010D3" - -CCM-Camellia encrypt and tag RFC 5528 #22 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"C238822FAC5F98FF929405B0AD127A4E41854E":"00BEE9267FBADCB160B6A31C1C":"6CAEF9941141570D7C813405":"94C8959C11569A297831A721005857AB61B87A2DEA0936B6EB5F625F5D" - -CCM-Camellia encrypt and tag RFC 5528 #23 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"4DBF3E774AD245E5D5891F9D1C32A0AE022C85D7":"00DFA8B1245007B160B6A31C1C":"36A52CF16B19A2037AB7011E":"5869E3AAD2447C74E0FC05F9A4EA74577F4DE8CA8924764296AD04119CE7" - -CCM-Camellia encrypt and tag RFC 5528 #24 -depends_on:MBEDTLS_CAMELLIA_C -mbedtls_ccm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"D75C2778078CA93D971F96FDE720F4CD":"9DC9EDAE2FF5DF8636E8C6DE0EED55F7867E33337D":"003B8FD8D3A937B160B6A31C1C":"A4D499F78419728C19178B0C":"4B198156393B0F7796086AAFB454F8C3F034CCA966945F1FCEA7E11BEE6A2F" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.function deleted file mode 100644 index 13371eb9ee..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ccm.function +++ /dev/null @@ -1,189 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/ccm.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_CCM_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST:MBEDTLS_AES_C */ -void mbedtls_ccm_self_test( ) -{ - TEST_ASSERT( mbedtls_ccm_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ccm_setkey( int cipher_id, int key_size, int result ) -{ - mbedtls_ccm_context ctx; - unsigned char key[32]; - int ret; - - mbedtls_ccm_init( &ctx ); - - memset( key, 0x2A, sizeof( key ) ); - TEST_ASSERT( (unsigned) key_size <= 8 * sizeof( key ) ); - - ret = mbedtls_ccm_setkey( &ctx, cipher_id, key, key_size ); - TEST_ASSERT( ret == result ); - -exit: - mbedtls_ccm_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_AES_C */ -void ccm_lengths( int msg_len, int iv_len, int add_len, int tag_len, int res ) -{ - mbedtls_ccm_context ctx; - unsigned char key[16]; - unsigned char msg[10]; - unsigned char iv[14]; - unsigned char add[10]; - unsigned char out[10]; - unsigned char tag[18]; - int decrypt_ret; - - mbedtls_ccm_init( &ctx ); - - memset( key, 0, sizeof( key ) ); - memset( msg, 0, sizeof( msg ) ); - memset( iv, 0, sizeof( iv ) ); - memset( add, 0, sizeof( add ) ); - memset( out, 0, sizeof( out ) ); - memset( tag, 0, sizeof( tag ) ); - - TEST_ASSERT( mbedtls_ccm_setkey( &ctx, MBEDTLS_CIPHER_ID_AES, - key, 8 * sizeof( key ) ) == 0 ); - - TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len, - msg, out, tag, tag_len ) == res ); - - decrypt_ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len, - msg, out, tag, tag_len ); - - if( res == 0 ) - TEST_ASSERT( decrypt_ret == MBEDTLS_ERR_CCM_AUTH_FAILED ); - else - TEST_ASSERT( decrypt_ret == res ); - -exit: - mbedtls_ccm_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ccm_encrypt_and_tag( int cipher_id, - char *key_hex, char *msg_hex, - char *iv_hex, char *add_hex, - char *result_hex ) -{ - unsigned char key[32]; - unsigned char msg[50]; - unsigned char iv[13]; - unsigned char add[32]; - unsigned char result[50]; - mbedtls_ccm_context ctx; - size_t key_len, msg_len, iv_len, add_len, tag_len, result_len; - - mbedtls_ccm_init( &ctx ); - - memset( key, 0x00, sizeof( key ) ); - memset( msg, 0x00, sizeof( msg ) ); - memset( iv, 0x00, sizeof( iv ) ); - memset( add, 0x00, sizeof( add ) ); - memset( result, 0x00, sizeof( result ) ); - - key_len = unhexify( key, key_hex ); - msg_len = unhexify( msg, msg_hex ); - iv_len = unhexify( iv, iv_hex ); - add_len = unhexify( add, add_hex ); - result_len = unhexify( result, result_hex ); - tag_len = result_len - msg_len; - - TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id, key, key_len * 8 ) == 0 ); - - /* Test with input == output */ - TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len, - msg, msg, msg + msg_len, tag_len ) == 0 ); - - TEST_ASSERT( memcmp( msg, result, result_len ) == 0 ); - - /* Check we didn't write past the end */ - TEST_ASSERT( msg[result_len] == 0 && msg[result_len + 1] == 0 ); - -exit: - mbedtls_ccm_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ccm_auth_decrypt( int cipher_id, - char *key_hex, char *msg_hex, - char *iv_hex, char *add_hex, - int tag_len, char *result_hex ) -{ - unsigned char key[32]; - unsigned char msg[50]; - unsigned char iv[13]; - unsigned char add[32]; - unsigned char tag[16]; - unsigned char result[50]; - mbedtls_ccm_context ctx; - size_t key_len, msg_len, iv_len, add_len, result_len; - int ret; - - mbedtls_ccm_init( &ctx ); - - memset( key, 0x00, sizeof( key ) ); - memset( msg, 0x00, sizeof( msg ) ); - memset( iv, 0x00, sizeof( iv ) ); - memset( add, 0x00, sizeof( add ) ); - memset( tag, 0x00, sizeof( tag ) ); - memset( result, 0x00, sizeof( result ) ); - - key_len = unhexify( key, key_hex ); - msg_len = unhexify( msg, msg_hex ); - iv_len = unhexify( iv, iv_hex ); - add_len = unhexify( add, add_hex ); - msg_len -= tag_len; - memcpy( tag, msg + msg_len, tag_len ); - - if( strcmp( "FAIL", result_hex ) == 0 ) - { - ret = MBEDTLS_ERR_CCM_AUTH_FAILED; - result_len = -1; - } - else - { - ret = 0; - result_len = unhexify( result, result_hex ); - } - - TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id, key, key_len * 8 ) == 0 ); - - /* Test with input == output */ - TEST_ASSERT( mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len, - msg, msg, msg + msg_len, tag_len ) == ret ); - - if( ret == 0 ) - { - TEST_ASSERT( memcmp( msg, result, result_len ) == 0 ); - } - else - { - size_t i; - - for( i = 0; i < msg_len; i++ ) - TEST_ASSERT( msg[i] == 0 ); - } - - /* Check we didn't write past the end (where the original tag is) */ - TEST_ASSERT( memcmp( msg + msg_len, tag, tag_len ) == 0 ); - -exit: - mbedtls_ccm_free( &ctx ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.aes.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.aes.data deleted file mode 100644 index 9c21cfcc59..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.aes.data +++ /dev/null @@ -1,1099 +0,0 @@ -Decrypt empty buffer -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -dec_empty_buf: - -AES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:0:-1 - -AES Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:1:-1 - -AES Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:2:-1 - -AES Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:7:-1 - -AES Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:8:-1 - -AES Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:9:-1 - -AES Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:15:-1 - -AES Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:16:-1 - -AES Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:17:-1 - -AES Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:31:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:32:-1 - -AES Encrypt and decrypt 33 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:33:-1 - -AES Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:47:-1 - -AES Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:48:-1 - -AES Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:49:-1 - -AES Encrypt and decrypt 0 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:0:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 1 byte with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:1:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 2 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:2:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 7 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:7:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 8 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:8:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 9 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:9:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 15 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:15:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 16 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:16:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 17 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:17:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 31 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:31:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:32:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 33 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:33:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 47 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:47:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 48 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:48:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 49 bytes with one and zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:49:MBEDTLS_PADDING_ONE_AND_ZEROS - -AES Encrypt and decrypt 0 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:0:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 1 byte with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:1:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 2 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:2:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 7 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:7:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 8 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:8:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 9 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:9:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 15 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:15:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 16 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:16:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 17 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:17:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 31 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:31:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:32:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 33 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:33:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 47 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:47:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 48 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:48:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 49 bytes with zeros and len padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:49:MBEDTLS_PADDING_ZEROS_AND_LEN - -AES Encrypt and decrypt 0 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:0:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 1 byte with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:1:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 2 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:2:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 7 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:7:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 8 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:8:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 9 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:9:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 15 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:15:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 16 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:16:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 17 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:17:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 31 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:31:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:32:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 33 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:33:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 47 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:47:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 48 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:48:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 49 bytes with zeros padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_ZEROS -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:49:MBEDTLS_PADDING_ZEROS - -AES Encrypt and decrypt 0 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:0:MBEDTLS_PADDING_NONE - -AES Encrypt and decrypt 16 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:16:MBEDTLS_PADDING_NONE - -AES Encrypt and decrypt 32 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:32:MBEDTLS_PADDING_NONE - -AES Encrypt and decrypt 48 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CBC:"AES-128-CBC":128:48:MBEDTLS_PADDING_NONE - -AES Try encrypting 1 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:1:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 2 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:2:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 7 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:7:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 8 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:8:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 9 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:9:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 15 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:15:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 17 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:17:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 31 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:31:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 33 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:33:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 47 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:47:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Try encrypting 49 bytes with no padding -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:128:49:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -AES Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:0:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:1:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:0:1: - -AES Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:16:0: - -AES Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:0:16: - -AES Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:1:15: - -AES Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:15:1: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:15:7: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:16:6: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:17:6: - -AES Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CBC:128:16:16: - -AES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:0:-1 - -AES Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:1:-1 - -AES Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:2:-1 - -AES Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:7:-1 - -AES Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:8:-1 - -AES Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:9:-1 - -AES Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:15:-1 - -AES Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:16:-1 - -AES Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:17:-1 - -AES Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:31:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:32:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:33:-1 - -AES Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:47:-1 - -AES Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:48:-1 - -AES Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CFB128:"AES-128-CFB128":128:49:-1 - -AES Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:0:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:1:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:0:1: - -AES Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:16:0: - -AES Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:0:16: - -AES Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:1:15: - -AES Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:15:1: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:15:7: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:16:6: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:17:6: - -AES Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CFB128:128:16:16: - -AES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:0:-1 - -AES Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:1:-1 - -AES Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:2:-1 - -AES Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:7:-1 - -AES Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:8:-1 - -AES Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:9:-1 - -AES Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:15:-1 - -AES Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:16:-1 - -AES Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:17:-1 - -AES Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:31:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:32:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:33:-1 - -AES Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:47:-1 - -AES Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:48:-1 - -AES Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_AES_128_CTR:"AES-128-CTR":128:49:-1 - -AES Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:0:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:1:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:0:1: - -AES Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:16:0: - -AES Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:0:16: - -AES Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:1:15: - -AES Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:15:1: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:15:7: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:16:6: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:17:6: - -AES Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_CTR:128:16:16: - -AES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:0:-1 - -AES Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:1:-1 - -AES Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:2:-1 - -AES Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:7:-1 - -AES Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:8:-1 - -AES Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:9:-1 - -AES Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:15:-1 - -AES Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:16:-1 - -AES Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:17:-1 - -AES Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:31:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:32:-1 - -AES Encrypt and decrypt 33 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:33:-1 - -AES Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:47:-1 - -AES Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:48:-1 - -AES Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_192_CBC:"AES-192-CBC":192:49:-1 - -AES Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:0:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:1:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:0:1: - -AES Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:16:0: - -AES Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:0:16: - -AES Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:1:15: - -AES Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:15:1: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:15:7: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:16:6: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:17:6: - -AES Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_CBC:192:16:16: - -AES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:0:-1 - -AES Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:1:-1 - -AES Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:2:-1 - -AES Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:7:-1 - -AES Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:8:-1 - -AES Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:9:-1 - -AES Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:15:-1 - -AES Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:16:-1 - -AES Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:17:-1 - -AES Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:31:-1 - -AES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:32:-1 - -AES Encrypt and decrypt 33 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:33:-1 - -AES Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:47:-1 - -AES Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:48:-1 - -AES Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_AES_256_CBC:"AES-256-CBC":256:49:-1 - -AES Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:0:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:1:0: - -AES Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:0:1: - -AES Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:16:0: - -AES Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:0:16: - -AES Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:1:15: - -AES Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:15:1: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:15:7: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:16:6: - -AES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:17:6: - -AES Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_CBC:256:16:16: - -AES Decrypt test vector #0 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_PADDING_PKCS7:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_PKCS7:"ffffffffe00000000000000000000000":"00000000000000000000000000000000":"23f710842b9bb9c32f26648c786807ca":"00000000000000000000000000000000":"":"":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -AES Decrypt test vector #1 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_NONE:"ffffffffe00000000000000000000000":"00000000000000000000000000000000":"23f710842b9bb9c32f26648c786807ca":"00000000000000000000000000000000":"":"":0:0 - -AES Decrypt test vector #2 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_CBC:MBEDTLS_PADDING_NONE:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"707b1dbb0ffa40ef7d95def421233fae":"fffffffff80000000000000000000000":"":"":0:0 - -AES Decrypt test vector #3 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_CBC:MBEDTLS_PADDING_NONE:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"49af6b372135acef10132e548f217b17":"ff000000000000000000000000000000":"":"":0:0 - -AES Decrypt test vector #4 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_CFB128:-1:"fffffffe000000000000000000000000":"00000000000000000000000000000000":"1114bc2028009b923f0b01915ce5e7c4":"00000000000000000000000000000000":"":"":0:0: - -AES Decrypt test vector #5 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_CFB128:-1:"ffffffffffffffffffffffffffffffffffffffffffe00000":"00000000000000000000000000000000":"60136703374f64e860b48ce31f930716":"00000000000000000000000000000000":"":"":0:0 - -AES Decrypt test vector #6 -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_CFB128:-1:"ffffffffff800000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"be66cfea2fecd6bf0ec7b4352c99bcaa":"00000000000000000000000000000000":"":"":0:0 - -AES-128-ECB Encrypt NIST KAT #1 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"f34481ec3cc627bacd5dc3fb08f273e6":"0336763e966d92595a567cc9ce537f5e":0 - -AES-128-ECB Encrypt NIST KAT #2 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"9798c4640bad75c7c3227db910174e72":"a9a1631bf4996954ebc093957b234589":0 - -AES-128-ECB Encrypt NIST KAT #3 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"96ab5c2ff612d9dfaae8c31f30c42168":"ff4f8391a6a40ca5b25d23bedd44a597":0 - -AES-128-ECB Encrypt NIST KAT #4 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"e0000000000000000000000000000000":"00000000000000000000000000000000":"72a1da770f5d7ac4c9ef94d822affd97":0 - -AES-128-ECB Encrypt NIST KAT #5 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"f0000000000000000000000000000000":"00000000000000000000000000000000":"970014d634e2b7650777e8e84d03ccd8":0 - -AES-128-ECB Encrypt NIST KAT #6 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"f8000000000000000000000000000000":"00000000000000000000000000000000":"f17e79aed0db7e279e955b5f493875a7":0 - -AES-128-ECB Encrypt NIST KAT #7 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"fffffffffffff0000000000000000000":"00000000000000000000000000000000":"7b90785125505fad59b13c186dd66ce3":0 - -AES-128-ECB Encrypt NIST KAT #8 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"fffffffffffff8000000000000000000":"00000000000000000000000000000000":"8b527a6aebdaec9eaef8eda2cb7783e5":0 - -AES-128-ECB Encrypt NIST KAT #9 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"fffffffffffffc000000000000000000":"00000000000000000000000000000000":"43fdaf53ebbc9880c228617d6a9b548b":0 - -AES-128-ECB Encrypt NIST KAT #10 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"ffffffffffffffffffffffffffffc000":"00000000000000000000000000000000":"70c46bb30692be657f7eaa93ebad9897":0 - -AES-128-ECB Encrypt NIST KAT #11 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"ffffffffffffffffffffffffffffe000":"00000000000000000000000000000000":"323994cfb9da285a5d9642e1759b224a":0 - -AES-128-ECB Encrypt NIST KAT #12 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"fffffffffffffffffffffffffffff000":"00000000000000000000000000000000":"1dbf57877b7b17385c85d0b54851e371":0 - -AES-128-ECB Encrypt NIST KAT #13 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"ffffffffffffffc00000000000000000":"3a4d354f02bb5a5e47d39666867f246a":0 - -AES-128-ECB Encrypt NIST KAT #14 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"ffffffffffffffe00000000000000000":"d451b8d6e1e1a0ebb155fbbf6e7b7dc3":0 - -AES-128-ECB Encrypt NIST KAT #15 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"fffffffffffffff00000000000000000":"6898d4f42fa7ba6a10ac05e87b9f2080":0 - -AES-128-ECB Encrypt NIST KAT #16 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"ffffffffffffffffffffffffe0000000":"082eb8be35f442fb52668e16a591d1d6":0 - -AES-128-ECB Encrypt NIST KAT #17 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"fffffffffffffffffffffffff0000000":"e656f9ecf5fe27ec3e4a73d00c282fb3":0 - -AES-128-ECB Encrypt NIST KAT #18 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"fffffffffffffffffffffffff8000000":"2ca8209d63274cd9a29bb74bcd77683a":0 - -AES-128-ECB Decrypt NIST KAT #1 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"db4f1aa530967d6732ce4715eb0ee24b":"ff000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #2 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"a81738252621dd180a34f3455b4baa2f":"ff800000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #3 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"77e2b508db7fd89234caf7939ee5621a":"ffc00000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #4 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"dc43be40be0e53712f7e2bf5ca707209":"6a118a874519e64e9963798a503f1d35":0 - -AES-128-ECB Decrypt NIST KAT #5 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"92beedab1895a94faa69b632e5cc47ce":"cb9fceec81286ca3e989bd979b0cb284":0 - -AES-128-ECB Decrypt NIST KAT #6 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"459264f4798f6a78bacb89c15ed3d601":"b26aeb1874e47ca8358ff22378f09144":0 - -AES-128-ECB Decrypt NIST KAT #7 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"b69418a85332240dc82492353956ae0c":"a303d940ded8f0baff6f75414cac5243":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #8 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"71b5c08a1993e1362e4d0ce9b22b78d5":"c2dabd117f8a3ecabfbb11d12194d9d0":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #9 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"e234cdca2606b81f29408d5f6da21206":"fff60a4740086b3b9c56195b98d91a7b":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #10 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"ffffffffffffffff0000000000000000":"84be19e053635f09f2665e7bae85b42d":"00000000000000000000000000000000":0 - -AES-128-ECB Decrypt NIST KAT #11 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_128_ECB:MBEDTLS_DECRYPT:"ffffffffffffffff8000000000000000":"32cd652842926aea4aa6137bb2be2b5e":"00000000000000000000000000000000":0 - -AES-192-ECB Encrypt NIST KAT #1 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"000000000000000000000000000000000000000000000000":"fffffffffffffffffffff80000000000":"156f07767a85a4312321f63968338a01":0 - -AES-192-ECB Encrypt NIST KAT #2 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"000000000000000000000000000000000000000000000000":"fffffffffffffffffffffc0000000000":"15eec9ebf42b9ca76897d2cd6c5a12e2":0 - -AES-192-ECB Encrypt NIST KAT #3 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"000000000000000000000000000000000000000000000000":"fffffffffffffffffffffe0000000000":"db0d3a6fdcc13f915e2b302ceeb70fd8":0 - -AES-192-ECB Encrypt NIST KAT #4 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"000000000000000000000000000000000000000000000000":"51719783d3185a535bd75adc65071ce1":"4f354592ff7c8847d2d0870ca9481b7c":0 - -AES-192-ECB Encrypt NIST KAT #5 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"000000000000000000000000000000000000000000000000":"26aa49dcfe7629a8901a69a9914e6dfd":"d5e08bf9a182e857cf40b3a36ee248cc":0 - -AES-192-ECB Encrypt NIST KAT #6 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"000000000000000000000000000000000000000000000000":"941a4773058224e1ef66d10e0a6ee782":"067cd9d3749207791841562507fa9626":0 - -AES-192-ECB Encrypt NIST KAT #7 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"d2926527e0aa9f37b45e2ec2ade5853ef807576104c7ace3":"00000000000000000000000000000000":"dd619e1cf204446112e0af2b9afa8f8c":0 - -AES-192-ECB Encrypt NIST KAT #8 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"982215f4e173dfa0fcffe5d3da41c4812c7bcc8ed3540f93":"00000000000000000000000000000000":"d4f0aae13c8fe9339fbf9e69ed0ad74d":0 - -AES-192-ECB Encrypt NIST KAT #9 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"98c6b8e01e379fbd14e61af6af891596583565f2a27d59e9":"00000000000000000000000000000000":"19c80ec4a6deb7e5ed1033dda933498f":0 - -AES-192-ECB Encrypt NIST KAT #10 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"fffffffffffffffffffffffffff800000000000000000000":"00000000000000000000000000000000":"8dd274bd0f1b58ae345d9e7233f9b8f3":0 - -AES-192-ECB Encrypt NIST KAT #11 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"fffffffffffffffffffffffffffc00000000000000000000":"00000000000000000000000000000000":"9d6bdc8f4ce5feb0f3bed2e4b9a9bb0b":0 - -AES-192-ECB Encrypt NIST KAT #12 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_ENCRYPT:"fffffffffffffffffffffffffffe00000000000000000000":"00000000000000000000000000000000":"fd5548bcf3f42565f7efa94562528d46":0 - -AES-192-ECB Decrypt NIST KAT #1 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"fffffffffffffffffffffffffffffffff000000000000000":"bb2852c891c5947d2ed44032c421b85f":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #2 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"fffffffffffffffffffffffffffffffff800000000000000":"1b9f5fbd5e8a4264c0a85b80409afa5e":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #3 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"fffffffffffffffffffffffffffffffffc00000000000000":"30dab809f85a917fe924733f424ac589":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #4 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"61257134a518a0d57d9d244d45f6498cbc32f2bafc522d79":"cfe4d74002696ccf7d87b14a2f9cafc9":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #5 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"b0ab0a6a818baef2d11fa33eac947284fb7d748cfb75e570":"d2eafd86f63b109b91f5dbb3a3fb7e13":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #6 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"ee053aa011c8b428cdcc3636313c54d6a03cac01c71579d6":"9b9fdd1c5975655f539998b306a324af":"00000000000000000000000000000000":0 - -AES-192-ECB Decrypt NIST KAT #7 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"000000000000000000000000000000000000000000000000":"275cfc0413d8ccb70513c3859b1d0f72":"1b077a6af4b7f98229de786d7516b639":0 - -AES-192-ECB Decrypt NIST KAT #8 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"000000000000000000000000000000000000000000000000":"c9b8135ff1b5adc413dfd053b21bd96d":"9c2d8842e5f48f57648205d39a239af1":0 - -AES-192-ECB Decrypt NIST KAT #9 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"000000000000000000000000000000000000000000000000":"4a3650c3371ce2eb35e389a171427440":"bff52510095f518ecca60af4205444bb":0 - -AES-192-ECB Decrypt NIST KAT #10 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"000000000000000000000000000000000000000000000000":"b2099795e88cc158fd75ea133d7e7fbe":"ffffffffffffffffffffc00000000000":0 - -AES-192-ECB Decrypt NIST KAT #11 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"000000000000000000000000000000000000000000000000":"a6cae46fb6fadfe7a2c302a34242817b":"ffffffffffffffffffffe00000000000":0 - -AES-192-ECB Decrypt NIST KAT #12 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_192_ECB:MBEDTLS_DECRYPT:"000000000000000000000000000000000000000000000000":"026a7024d6a902e0b3ffccbaa910cc3f":"fffffffffffffffffffff00000000000":0 - -AES-256-ECB Encrypt NIST KAT #1 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"c1cc358b449909a19436cfbb3f852ef8bcb5ed12ac7058325f56e6099aab1a1c":"00000000000000000000000000000000":"352065272169abf9856843927d0674fd":0 - -AES-256-ECB Encrypt NIST KAT #2 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"984ca75f4ee8d706f46c2d98c0bf4a45f5b00d791c2dfeb191b5ed8e420fd627":"00000000000000000000000000000000":"4307456a9e67813b452e15fa8fffe398":0 - -AES-256-ECB Encrypt NIST KAT #3 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"b43d08a447ac8609baadae4ff12918b9f68fc1653f1269222f123981ded7a92f":"00000000000000000000000000000000":"4663446607354989477a5c6f0f007ef4":0 - -AES-256-ECB Encrypt NIST KAT #4 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"0b24af36193ce4665f2825d7b4749c98":"a9ff75bd7cf6613d3731c77c3b6d0c04":0 - -AES-256-ECB Encrypt NIST KAT #5 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"761c1fe41a18acf20d241650611d90f1":"623a52fcea5d443e48d9181ab32c7421":0 - -AES-256-ECB Encrypt NIST KAT #6 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"8a560769d605868ad80d819bdba03771":"38f2c7ae10612415d27ca190d27da8b4":0 - -AES-256-ECB Encrypt NIST KAT #7 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"ffffff80000000000000000000000000":"36aff0ef7bf3280772cf4cac80a0d2b2":0 - -AES-256-ECB Encrypt NIST KAT #8 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"ffffffc0000000000000000000000000":"1f8eedea0f62a1406d58cfc3ecea72cf":0 - -AES-256-ECB Encrypt NIST KAT #9 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"ffffffe0000000000000000000000000":"abf4154a3375a1d3e6b1d454438f95a6":0 - -AES-256-ECB Encrypt NIST KAT #10 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"ffffffffffffffffffffffffffffffffffff8000000000000000000000000000":"00000000000000000000000000000000":"45d089c36d5c5a4efc689e3b0de10dd5":0 - -AES-256-ECB Encrypt NIST KAT #11 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"ffffffffffffffffffffffffffffffffffffc000000000000000000000000000":"00000000000000000000000000000000":"b4da5df4becb5462e03a0ed00d295629":0 - -AES-256-ECB Encrypt NIST KAT #12 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_ENCRYPT:"ffffffffffffffffffffffffffffffffffffe000000000000000000000000000":"00000000000000000000000000000000":"dcf4e129136c1a4b7a0f38935cc34b2b":0 - -AES-256-ECB Decrypt NIST KAT #1 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"fffffffffffffffffffffffffffffffffffffffffffffff00000000000000000":"edf61ae362e882ddc0167474a7a77f3a":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #2 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"fffffffffffffffffffffffffffffffffffffffffffffff80000000000000000":"6168b00ba7859e0970ecfd757efecf7c":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #3 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000":"d1415447866230d28bb1ea18a4cdfd02":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #4 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"f8be9ba615c5a952cabbca24f68f8593039624d524c816acda2c9183bd917cb9":"a3944b95ca0b52043584ef02151926a8":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #5 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"797f8b3d176dac5b7e34a2d539c4ef367a16f8635f6264737591c5c07bf57a3e":"a74289fe73a4c123ca189ea1e1b49ad5":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #6 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"6838d40caf927749c13f0329d331f448e202c73ef52c5f73a37ca635d4c47707":"b91d4ea4488644b56cf0812fa7fcf5fc":"00000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #7 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c7421":"761c1fe41a18acf20d241650611d90f1":0 - -AES-256-ECB Decrypt NIST KAT #8 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"38f2c7ae10612415d27ca190d27da8b4":"8a560769d605868ad80d819bdba03771":0 - -AES-256-ECB Decrypt NIST KAT #9 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"1bc704f1bce135ceb810341b216d7abe":"91fbef2d15a97816060bee1feaa49afe":0 - -AES-256-ECB Decrypt NIST KAT #10 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"ddc6bf790c15760d8d9aeb6f9a75fd4e":"80000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #11 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"0a6bdc6d4c1e6280301fd8e97ddbe601":"c0000000000000000000000000000000":0 - -AES-256-ECB Decrypt NIST KAT #12 -depends_on:MBEDTLS_AES_C -test_vec_ecb:MBEDTLS_CIPHER_AES_256_ECB:MBEDTLS_DECRYPT:"0000000000000000000000000000000000000000000000000000000000000000":"9b80eefb7ebe2d2b16247aa0efc72f5d":"e0000000000000000000000000000000":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.arc4.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.arc4.data deleted file mode 100644 index 1dd23110dd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.arc4.data +++ /dev/null @@ -1,103 +0,0 @@ -ARC4 Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:0:-1 - -ARC4 Encrypt and decrypt 1 byte -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:1:-1 - -ARC4 Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:2:-1 - -ARC4 Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:7:-1 - -ARC4 Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:8:-1 - -ARC4 Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:9:-1 - -ARC4 Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:15:-1 - -ARC4 Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:16:-1 - -ARC4 Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:17:-1 - -ARC4 Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:31:-1 - -ARC4 Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:32:-1 - -ARC4 Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:33:-1 - -ARC4 Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:47:-1 - -ARC4 Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:48:-1 - -ARC4 Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_ARC4_C -enc_dec_buf:MBEDTLS_CIPHER_ARC4_128:"ARC4-128":128:49:-1 - -ARC4 Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:0:0: - -ARC4 Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:1:0: - -ARC4 Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:0:1: - -ARC4 Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:16:0: - -ARC4 Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:0:16: - -ARC4 Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:1:15: - -ARC4 Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:15:1: - -ARC4 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:15:7: - -ARC4 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:16:6: - -ARC4 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:17:6: - -ARC4 Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_ARC4_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_ARC4_128:128:16:16: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.blowfish.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.blowfish.data deleted file mode 100644 index 9be846dadc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.blowfish.data +++ /dev/null @@ -1,603 +0,0 @@ -BLOWFISH Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:0:-1 - -BLOWFISH Encrypt and decrypt 1 byte -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:1:-1 - -BLOWFISH Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:2:-1 - -BLOWFISH Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:7:-1 - -BLOWFISH Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:8:-1 - -BLOWFISH Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:9:-1 - -BLOWFISH Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:15:-1 - -BLOWFISH Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:16:-1 - -BLOWFISH Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:17:-1 - -BLOWFISH Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:31:-1 - -BLOWFISH Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:32:-1 - -BLOWFISH Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:33:-1 - -BLOWFISH Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:47:-1 - -BLOWFISH Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:48:-1 - -BLOWFISH Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:49:-1 - -BLOWFISH Encrypt and decrypt 0 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:0:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 1 byte with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:1:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 2 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:2:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 7 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:7:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 8 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:8:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 9 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:9:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 15 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:15:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 16 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:16:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 17 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:17:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 31 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:31:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:32:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:33:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 47 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:47:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 48 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:48:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 49 bytes with one and zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:49:MBEDTLS_PADDING_ONE_AND_ZEROS - -BLOWFISH Encrypt and decrypt 0 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:0:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 1 byte with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:1:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 2 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:2:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 7 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:7:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 8 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:8:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 9 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:9:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 15 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:15:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 16 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:16:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 17 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:17:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 31 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:31:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:32:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:33:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 47 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:47:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 48 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:48:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 49 bytes with zeros and len padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:49:MBEDTLS_PADDING_ZEROS_AND_LEN - -BLOWFISH Encrypt and decrypt 0 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:0:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 1 byte with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:1:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 2 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:2:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 7 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:7:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 8 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:8:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 9 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:9:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 15 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:15:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 16 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:16:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 17 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:17:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 31 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:31:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:32:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:33:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 47 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:47:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 48 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:48:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 49 bytes with zeros padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:49:MBEDTLS_PADDING_ZEROS - -BLOWFISH Encrypt and decrypt 0 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:0:MBEDTLS_PADDING_NONE - -BLOWFISH Encrypt and decrypt 8 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:8:MBEDTLS_PADDING_NONE - -BLOWFISH Encrypt and decrypt 16 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:16:MBEDTLS_PADDING_NONE - -BLOWFISH Encrypt and decrypt 32 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:32:MBEDTLS_PADDING_NONE - -BLOWFISH Encrypt and decrypt 48 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":128:48:MBEDTLS_PADDING_NONE - -BLOWFISH Try encrypting 1 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:1:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 2 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:2:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 7 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:7:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 9 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:9:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 15 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:15:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 17 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:17:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 31 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:31:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 33 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:33:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 47 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:47:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Try encrypting 49 bytes with no padding -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_NONE:128:49:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -BLOWFISH Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:0:0: - -BLOWFISH Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:1:0: - -BLOWFISH Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:0:1: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:16:0: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:0:16: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:1:15: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:15:1: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:15:7: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:16:6: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:17:6: - -BLOWFISH Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CBC:128:16:16: - -BLOWFISH Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:0:-1 - -BLOWFISH Encrypt and decrypt 1 byte -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:1:-1 - -BLOWFISH Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:2:-1 - -BLOWFISH Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:7:-1 - -BLOWFISH Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:8:-1 - -BLOWFISH Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:9:-1 - -BLOWFISH Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:15:-1 - -BLOWFISH Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:16:-1 - -BLOWFISH Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:17:-1 - -BLOWFISH Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:31:-1 - -BLOWFISH Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:32:-1 - -BLOWFISH Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:33:-1 - -BLOWFISH Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:47:-1 - -BLOWFISH Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:48:-1 - -BLOWFISH Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":128:49:-1 - -BLOWFISH Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:0:0: - -BLOWFISH Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:1:0: - -BLOWFISH Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:0:1: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:16:0: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:0:16: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:1:15: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:15:1: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:15:7: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:16:6: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:17:6: - -BLOWFISH Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CFB64:128:16:16: - -BLOWFISH Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:0:-1 - -BLOWFISH Encrypt and decrypt 1 byte -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:1:-1 - -BLOWFISH Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:2:-1 - -BLOWFISH Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:7:-1 - -BLOWFISH Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:8:-1 - -BLOWFISH Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:9:-1 - -BLOWFISH Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:15:-1 - -BLOWFISH Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:16:-1 - -BLOWFISH Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:17:-1 - -BLOWFISH Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:31:-1 - -BLOWFISH Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:32:-1 - -BLOWFISH Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:33:-1 - -BLOWFISH Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:47:-1 - -BLOWFISH Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:48:-1 - -BLOWFISH Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":128:49:-1 - -BLOWFISH Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:0:0: - -BLOWFISH Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:1:0: - -BLOWFISH Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:0:1: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:16:0: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:0:16: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:1:15: - -BLOWFISH Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:15:1: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:15:7: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:16:6: - -BLOWFISH Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:17:6: - -BLOWFISH Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_BLOWFISH_CTR:128:16:16: - -BLOWFISH CBC Encrypt and decrypt 7 bytes, 192-bits key -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CBC:"BLOWFISH-CBC":192:7:-1 - -BLOWFISH CTR Encrypt and decrypt 7 bytes, 192-bits key -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CTR:"BLOWFISH-CTR":192:7:-1 - -BLOWFISH CFB64 Encrypt and decrypt 7 bytes, 192-bits key -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_BLOWFISH_CFB64:"BLOWFISH-CFB64":192:7:-1 - -BLOWFISH ECB Encrypt test vector (SSLeay) #1 -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_ENCRYPT:"00000000000000000000000000000000":"0000000000000000":"4ef997456198dd78":0 - -BLOWFISH ECB Encrypt test vector (SSLeay) #2 -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_ENCRYPT:"ffffffffffffffffffffffffffffffff":"ffffffffffffffff":"51866fd5b85ecb8a":0 - -BLOWFISH ECB Encrypt test vector (SSLeay) #3 -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_ENCRYPT:"fedcba9876543210fedcba9876543210":"0123456789abcdef":"0aceab0fc6a0a28d":0 - -BLOWFISH ECB Encrypt test vector (SSLeay) #3, 64-bit key -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_ENCRYPT:"fedcba9876543210":"0123456789abcdef":"0aceab0fc6a0a28d":0 - -BLOWFISH ECB Encrypt test vector (SSLeay) #3, 192-bit key -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_ENCRYPT:"fedcba9876543210fedcba9876543210fedcba9876543210":"0123456789abcdef":"0aceab0fc6a0a28d":0 - -BLOWFISH ECB Decrypt test vector (SSLeay) #1 -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_DECRYPT:"00000000000000000000000000000000":"4ef997456198dd78":"0000000000000000":0 - -BLOWFISH ECB Decrypt test vector (SSLeay) #2 -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_DECRYPT:"ffffffffffffffffffffffffffffffff":"51866fd5b85ecb8a":"ffffffffffffffff":0 - -BLOWFISH ECB Decrypt test vector (SSLeay) #3 -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_DECRYPT:"3849674c2602319e3849674c2602319e":"a25e7856cf2651eb":"51454b582ddf440a":0 - -BLOWFISH ECB Decrypt test vector (SSLeay) #3, 64-bit key -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_DECRYPT:"3849674c2602319e":"a25e7856cf2651eb":"51454b582ddf440a":0 - -BLOWFISH ECB Decrypt test vector (SSLeay) #3, 192-bit key -depends_on:MBEDTLS_BLOWFISH_C -test_vec_ecb:MBEDTLS_CIPHER_BLOWFISH_ECB:MBEDTLS_DECRYPT:"3849674c2602319e3849674c2602319e3849674c2602319e":"a25e7856cf2651eb":"51454b582ddf440a":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.camellia.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.camellia.data deleted file mode 100644 index b89b70def5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.camellia.data +++ /dev/null @@ -1,759 +0,0 @@ -CAMELLIA Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:0:-1 - -CAMELLIA Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:1:-1 - -CAMELLIA Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:2:-1 - -CAMELLIA Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:7:-1 - -CAMELLIA Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:8:-1 - -CAMELLIA Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:9:-1 - -CAMELLIA Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:15:-1 - -CAMELLIA Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:16:-1 - -CAMELLIA Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:17:-1 - -CAMELLIA Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:31:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:32:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:33:-1 - -CAMELLIA Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:47:-1 - -CAMELLIA Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:48:-1 - -CAMELLIA Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:49:-1 - -CAMELLIA Encrypt and decrypt 0 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:0:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 1 byte with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:1:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 2 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:2:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 7 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:7:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 8 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:8:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 9 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:9:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 15 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:15:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 16 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:16:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 17 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:17:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 31 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:31:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:32:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:33:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 47 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:47:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 48 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:48:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 49 bytes with one and zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:49:MBEDTLS_PADDING_ONE_AND_ZEROS - -CAMELLIA Encrypt and decrypt 0 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:0:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 1 byte with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:1:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 2 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:2:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 7 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:7:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 8 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:8:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 9 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:9:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 15 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:15:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 16 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:16:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 17 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:17:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 31 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:31:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:32:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:33:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 47 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:47:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 48 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:48:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 49 bytes with zeros and len padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:49:MBEDTLS_PADDING_ZEROS_AND_LEN - -CAMELLIA Encrypt and decrypt 0 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:0:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 1 byte with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:1:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 2 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:2:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 7 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:7:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 8 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:8:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 9 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:9:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 15 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:15:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 16 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:16:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 17 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:17:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 31 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:31:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:32:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:33:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 47 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:47:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 48 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:48:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 49 bytes with zeros padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:49:MBEDTLS_PADDING_ZEROS - -CAMELLIA Encrypt and decrypt 0 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:0:MBEDTLS_PADDING_NONE - -CAMELLIA Encrypt and decrypt 16 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:16:MBEDTLS_PADDING_NONE - -CAMELLIA Encrypt and decrypt 32 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:32:MBEDTLS_PADDING_NONE - -CAMELLIA Encrypt and decrypt 48 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CBC:"CAMELLIA-128-CBC":128:48:MBEDTLS_PADDING_NONE - -CAMELLIA Try encrypting 1 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:1:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 2 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:2:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 7 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:7:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 8 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:8:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 9 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:9:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 15 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:15:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 17 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:17:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 31 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:31:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 33 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:33:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 47 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:47:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Try encrypting 49 bytes with no padding -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_NONE:128:49:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -CAMELLIA Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:0:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:1:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:0:1: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:16:0: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:0:16: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:1:15: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:15:1: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:15:7: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:16:6: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:17:6: - -CAMELLIA Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CBC:128:16:16: - -CAMELLIA Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:0:-1 - -CAMELLIA Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:1:-1 - -CAMELLIA Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:2:-1 - -CAMELLIA Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:7:-1 - -CAMELLIA Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:8:-1 - -CAMELLIA Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:9:-1 - -CAMELLIA Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:15:-1 - -CAMELLIA Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:16:-1 - -CAMELLIA Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:17:-1 - -CAMELLIA Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:31:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:32:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:33:-1 - -CAMELLIA Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:47:-1 - -CAMELLIA Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:48:-1 - -CAMELLIA Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:"CAMELLIA-128-CFB128":128:49:-1 - -CAMELLIA Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:0:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:1:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:0:1: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:16:0: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:0:16: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:1:15: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:15:1: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:15:7: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:16:6: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:17:6: - -CAMELLIA Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:128:16:16: - -CAMELLIA Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:0:-1 - -CAMELLIA Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:1:-1 - -CAMELLIA Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:2:-1 - -CAMELLIA Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:7:-1 - -CAMELLIA Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:8:-1 - -CAMELLIA Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:9:-1 - -CAMELLIA Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:15:-1 - -CAMELLIA Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:16:-1 - -CAMELLIA Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:17:-1 - -CAMELLIA Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:31:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:32:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:33:-1 - -CAMELLIA Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:47:-1 - -CAMELLIA Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:48:-1 - -CAMELLIA Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_CTR:"CAMELLIA-128-CTR":128:49:-1 - -CAMELLIA Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:0:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:1:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:0:1: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:16:0: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:0:16: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:1:15: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:15:1: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:15:7: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:16:6: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:17:6: - -CAMELLIA Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_CTR:128:16:16: - -CAMELLIA Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:0:-1 - -CAMELLIA Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:1:-1 - -CAMELLIA Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:2:-1 - -CAMELLIA Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:7:-1 - -CAMELLIA Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:8:-1 - -CAMELLIA Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:9:-1 - -CAMELLIA Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:15:-1 - -CAMELLIA Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:16:-1 - -CAMELLIA Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:17:-1 - -CAMELLIA Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:31:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:32:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:33:-1 - -CAMELLIA Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:47:-1 - -CAMELLIA Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:48:-1 - -CAMELLIA Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_CBC:"CAMELLIA-192-CBC":192:49:-1 - -CAMELLIA Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:0:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:1:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:0:1: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:16:0: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:0:16: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:1:15: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:15:1: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:15:7: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:16:6: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:17:6: - -CAMELLIA Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_CBC:192:16:16: - -CAMELLIA Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:0:-1 - -CAMELLIA Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:1:-1 - -CAMELLIA Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:2:-1 - -CAMELLIA Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:7:-1 - -CAMELLIA Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:8:-1 - -CAMELLIA Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:9:-1 - -CAMELLIA Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:15:-1 - -CAMELLIA Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:16:-1 - -CAMELLIA Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:17:-1 - -CAMELLIA Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:31:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:32:-1 - -CAMELLIA Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:33:-1 - -CAMELLIA Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:47:-1 - -CAMELLIA Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:48:-1 - -CAMELLIA Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_CBC:"CAMELLIA-256-CBC":256:49:-1 - -CAMELLIA Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:0:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:1:0: - -CAMELLIA Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:0:1: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:16:0: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:0:16: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:1:15: - -CAMELLIA Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:15:1: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:15:7: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:16:6: - -CAMELLIA Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:17:6: - -CAMELLIA Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_CBC:256:16:16: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.ccm.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.ccm.data deleted file mode 100644 index dc44091927..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.ccm.data +++ /dev/null @@ -1,480 +0,0 @@ -AES-128-CCM test vector NIST #1 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"4ae701103c63deca5b5a3939d7d05992":"5a8aa485c316e9":"":"":"02209f55":"" - -AES-128-CCM test vector NIST #2 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"4ae701103c63deca5b5a3939d7d05992":"3796cf51b87266":"":"":"9a04c241":"FAIL" - -AES-128-CCM test vector NIST #3 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3":"5a8aa485c316e9":"":"":"75d582db43ce9b13ab4b6f7f14341330":"" - -AES-128-CCM test vector NIST #4 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3":"3796cf51b87266":"":"":"3a65e03af37b81d05acc7ec1bc39deb0":"FAIL" - -AES-128-CCM test vector NIST #5 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3":"5a8aa485c316e9403aff859fbb":"":"":"90156f3f":"" - -AES-128-CCM test vector NIST #6 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3":"a16a2e741f1cd9717285b6d882":"":"":"88909016":"FAIL" - -AES-128-CCM test vector NIST #7 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"19ebfde2d5468ba0a3031bde629b11fd":"5a8aa485c316e9403aff859fbb":"":"":"fb04dc5a44c6bb000f2440f5154364b4":"" - -AES-128-CCM test vector NIST #8 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"19ebfde2d5468ba0a3031bde629b11fd":"a16a2e741f1cd9717285b6d882":"":"":"5447075bf42a59b91f08064738b015ab":"FAIL" - -AES-128-CCM test vector NIST #9 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"19ebfde2d5468ba0a3031bde629b11fd":"5a8aa485c316e9":"":"a90e8ea44085ced791b2fdb7fd44b5cf0bd7d27718029bb7":"03e1fa6b":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -AES-128-CCM test vector NIST #10 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"19ebfde2d5468ba0a3031bde629b11fd":"31f8fa25827d48":"":"50aafe0578c115c4a8e126ff7b3ccb64dce8ccaa8ceda69f":"23e5d81c":"FAIL" - -AES-128-CCM test vector NIST #11 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"197afb02ffbd8f699dacae87094d5243":"5a8aa485c316e9":"":"24ab9eeb0e5508cae80074f1070ee188a637171860881f1f":"2d9a3fbc210595b7b8b1b41523111a8e":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -AES-128-CCM test vector NIST #12 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"197afb02ffbd8f699dacae87094d5243":"31f8fa25827d48":"":"7ebfda6fa5da1dbffd82dc29b875798fbcef8ba0084fbd24":"63af747cc88a001fa94e060290f209c4":"FAIL" - -AES-128-CCM test vector NIST #13 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"197afb02ffbd8f699dacae87094d5243":"5a8aa485c316e9403aff859fbb":"":"4a550134f94455979ec4bf89ad2bd80d25a77ae94e456134":"a3e138b9":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -AES-128-CCM test vector NIST #14 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"197afb02ffbd8f699dacae87094d5243":"49004912fdd7269279b1f06a89":"":"118ec53dd1bfbe52d5b9fe5dfebecf2ee674ec983eada654":"091a5ae9":"FAIL" - -AES-128-CCM test vector NIST #15 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"90929a4b0ac65b350ad1591611fe4829":"5a8aa485c316e9403aff859fbb":"":"4bfe4e35784f0a65b545477e5e2f4bae0e1e6fa717eaf2cb":"6a9a970b9beb2ac1bd4fd62168f8378a":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -AES-128-CCM test vector NIST #16 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"90929a4b0ac65b350ad1591611fe4829":"49004912fdd7269279b1f06a89":"":"0c56a503aa2c12e87450d45a7b714db980fd348f327c0065":"a65666144994bad0c8195bcb4ade1337":"FAIL" - -AES-128-CCM test vector NIST #17 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"90929a4b0ac65b350ad1591611fe4829":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"":"782e4318":"" - -AES-128-CCM test vector NIST #18 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"90929a4b0ac65b350ad1591611fe4829":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":"":"a04f270a":"FAIL" - -AES-128-CCM test vector NIST #19 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"":"41b476013f45e4a781f253a6f3b1e530":"" - -AES-128-CCM test vector NIST #20 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":"":"f9f018fcd125822616083fffebc4c8e6":"FAIL" - -AES-128-CCM test vector NIST #21 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"":"9f69f24f":"" - -AES-128-CCM test vector NIST #22 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":"":"e17afaa4":"FAIL" - -AES-128-CCM test vector NIST #23 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"f9fdca4ac64fe7f014de0f43039c7571":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"":"1859ac36a40a6b28b34266253627797a":"" - -AES-128-CCM test vector NIST #24 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"f9fdca4ac64fe7f014de0f43039c7571":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":"":"edf8b46eb69ac0044116019dec183072":"FAIL" - -AES-128-CCM test vector NIST #25 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"f9fdca4ac64fe7f014de0f43039c7571":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"6be31860ca271ef448de8f8d8b39346daf4b81d7e92d65b3":"38f125fa":"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -AES-128-CCM test vector NIST #26 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"f9fdca4ac64fe7f014de0f43039c7571":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":"4cc57a9927a6bc401441870d3193bf89ebd163f5c01501c7":"28a66b69":"FAIL" - -AES-128-CCM test vector NIST #27 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"a7aa635ea51b0bb20a092bd5573e728c":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"b351ab96b2e45515254558d5212673ee6c776d42dbca3b51":"2cf3a20b7fd7c49e6e79bef475c2906f":"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -AES-128-CCM test vector NIST #28 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"a7aa635ea51b0bb20a092bd5573e728c":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":"df1a5285caa41b4bb47f6e5ceceba4e82721828d68427a30":"81d18ca149d6766bfaccec88f194eb5b":"FAIL" - -AES-128-CCM test vector NIST #29 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"a7aa635ea51b0bb20a092bd5573e728c":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"934f893824e880f743d196b22d1f340a52608155087bd28a":"c25e5329":"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -AES-128-CCM test vector NIST #30 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"a7aa635ea51b0bb20a092bd5573e728c":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":"f43ba9d834ad85dfab3f1c0c27c3441fe4e411a38a261a65":"59b3b3ee":"FAIL" - -AES-128-CCM test vector NIST #31 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"26511fb51fcfa75cb4b44da75a6e5a0e":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"50038b5fdd364ee747b70d00bd36840ece4ea19998123375":"c0a458bfcafa3b2609afe0f825cbf503":"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -AES-128-CCM test vector NIST #32 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_128_CCM:"26511fb51fcfa75cb4b44da75a6e5a0e":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":"78ed8ff6b5a1255d0fbd0a719a9c27b059ff5f83d0c4962c":"390042ba8bb5f6798dab01c5afad7306":"FAIL" - -AES-192-CCM test vector NIST #1 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"c98ad7f38b2c7e970c9b965ec87a08208384718f78206c6c":"5a8aa485c316e9":"":"":"9d4b7f3b":"" - -AES-192-CCM test vector NIST #2 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"c98ad7f38b2c7e970c9b965ec87a08208384718f78206c6c":"3796cf51b87266":"":"":"80745de9":"FAIL" - -AES-192-CCM test vector NIST #3 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"5a8aa485c316e9":"":"":"17223038fa99d53681ca1beabe78d1b4":"" - -AES-192-CCM test vector NIST #4 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"3796cf51b87266":"":"":"d0e1eeef4d2a264536bb1c2c1bde7c35":"FAIL" - -AES-192-CCM test vector NIST #5 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"5a8aa485c316e9403aff859fbb":"":"":"fe69ed84":"" - -AES-192-CCM test vector NIST #6 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"4bb3c4a4f893ad8c9bdc833c325d62b3d3ad1bccf9282a65":"a16a2e741f1cd9717285b6d882":"":"":"db7ffc82":"FAIL" - -AES-192-CCM test vector NIST #7 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"5a8aa485c316e9403aff859fbb":"":"":"0c66a8e547ed4f8c2c9a9a1eb5d455b9":"" - -AES-192-CCM test vector NIST #8 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"a16a2e741f1cd9717285b6d882":"":"":"38757b3a61a4dc97ca3ab88bf1240695":"FAIL" - -AES-192-CCM test vector NIST #9 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"5a8aa485c316e9":"":"411986d04d6463100bff03f7d0bde7ea2c3488784378138c":"ddc93a54":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -AES-192-CCM test vector NIST #10 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"19ebfde2d5468ba0a3031bde629b11fd4094afcb205393fa":"31f8fa25827d48":"":"32b649ab56162e55d4148a1292d6a225a988eb1308298273":"b6889036":"FAIL" - -AES-192-CCM test vector NIST #11 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"5a8aa485c316e9":"":"cba4b4aeb85f0492fd8d905c4a6d8233139833373ef188a8":"c5a5ebecf7ac8607fe412189e83d9d20":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22" - -AES-192-CCM test vector NIST #12 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"31f8fa25827d48":"":"ca62713728b5c9d652504b0ae8fd4fee5d297ee6a8d19cb6":"e699f15f14d34dcaf9ba8ed4b877c97d":"FAIL" - -AES-192-CCM test vector NIST #13 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"5a8aa485c316e9403aff859fbb":"":"042653c674ef2a90f7fb11d30848e530ae59478f1051633a":"34fad277":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -AES-192-CCM test vector NIST #14 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"197afb02ffbd8f699dacae87094d524324576b99844f75e1":"49004912fdd7269279b1f06a89":"":"1902d9769a7ba3d3268e1257395c8c2e5f98eef295dcbfa5":"a35df775":"FAIL" - -AES-192-CCM test vector NIST #15 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"5a8aa485c316e9403aff859fbb":"":"a5b7d8cca2069908d1ed88e6a9fe2c9bede3131dad54671e":"a7ade30a07d185692ab0ebdf4c78cf7a":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697" - -AES-192-CCM test vector NIST #16 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"49004912fdd7269279b1f06a89":"":"9a98617fb97a0dfe466be692272dcdaec1c5443a3b51312e":"f042c86363cc05afb98c66e16be8a445":"FAIL" - -AES-192-CCM test vector NIST #17 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"":"1d089a5f":"" - -AES-192-CCM test vector NIST #18 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"90929a4b0ac65b350ad1591611fe48297e03956f6083e451":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":"":"2f46022a":"FAIL" - -AES-192-CCM test vector NIST #19 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"":"5280a2137fee3deefcfe9b63a1199fb3":"" - -AES-192-CCM test vector NIST #20 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"a265480ca88d5f":"a2248a882ecbf850daf91933a389e78e81623d233dfd47bf8321361a38f138fe":"":"d40a7318c5f2d82f838c0beeefe0d598":"FAIL" - -AES-192-CCM test vector NIST #21 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"":"5e0eaebd":"" - -AES-192-CCM test vector NIST #22 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"6a798d7c5e1a72b43e20ad5c7b08567b12ab744b61c070e2":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":"":"71b7fc33":"FAIL" - -AES-192-CCM test vector NIST #23 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"":"d07ccf9fdc3d33aa94cda3d230da707c":"" - -AES-192-CCM test vector NIST #24 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"8739b4bea1a099fe547499cbc6":"f6107696edb332b2ea059d8860fee26be42e5e12e1a4f79a8d0eafce1b2278a7":"":"65fe32b649dc328c9f531584897e85b3":"FAIL" - -AES-192-CCM test vector NIST #25 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"9f6ca4af9b159148c889a6584d1183ea26e2614874b05045":"75dea8d1":"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -AES-192-CCM test vector NIST #26 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"f9fdca4ac64fe7f014de0f43039c757194d544ce5d15eed4":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":"84d8212e9cfc2121252baa3b065b1edcf50497b9594db1eb":"d7965825":"FAIL" - -AES-192-CCM test vector NIST #27 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"5a8aa485c316e9":"3796cf51b8726652a4204733b8fbb047cf00fb91a9837e22ec22b1a268f88e2c":"6aab64c4787599d8f213446beadb16e08dba60e97f56dbd1":"4d1d980d6fe0fb44b421992662b97975":"a265480ca88d5f536db0dc6abc40faf0d05be7a966977768" - -AES-192-CCM test vector NIST #28 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"fdd2d6f503c915":"5b92394f21ddc3ad49d9b0881b829a5935cb3a4d23e292a62fb66b5e7ab7020e":"4980b2ee49b1aaf393175f5ab9bae95ec7904557dfa20660":"3c51d36c826f01384100886198a7f6a3":"FAIL" - -AES-192-CCM test vector NIST #29 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"16e543d0e20615ff0df15acd9927ddfe40668a54bb854ccc":"c25e9fce":"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -AES-192-CCM test vector NIST #30 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"a7aa635ea51b0bb20a092bd5573e728ccd4b3e8cdd2ab33d":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":"df35b109caf690656ae278bbd8f8bba687a2ce11b105dae9":"8ecedb3e":"FAIL" - -AES-192-CCM test vector NIST #31 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886":"5a8aa485c316e9403aff859fbb":"a16a2e741f1cd9717285b6d882c1fc53655e9773761ad697a7ee6410184c7982":"c5b0b2ef17498c5570eb335df4588032958ba3d69bf6f317":"8464a6f7fa2b76744e8e8d95691cecb8":"8739b4bea1a099fe547499cbc6d1b13d849b8084c9b6acc5" - -AES-192-CCM test vector NIST #32 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_192_CCM:"26511fb51fcfa75cb4b44da75a6e5a0eb8d9c8f3b906f886":"0812757ad0cc4d17c4cfe7a642":"ec6c44a7e94e51a3ca6dee229098391575ec7213c85267fbf7492fdbeee61b10":"d1f0518929f4ae2f0543de2a7dfe4bb0110bb3057e524a1c":"06bd6dc2e6bcc3436cffb969ae900388":"FAIL" - -AES-256-CCM test vector NIST #1 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6":"a544218dadd3c1":"":"":"469c90bb":"" - -AES-256-CCM test vector NIST #2 (P=0, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"eda32f751456e33195f1f499cf2dc7c97ea127b6d488f211ccc5126fbb24afa6":"d3d5424e20fbec":"":"":"46a908ed":"FAIL" - -AES-256-CCM test vector NIST #3 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"a544218dadd3c1":"":"":"8207eb14d33855a52acceed17dbcbf6e":"" - -AES-256-CCM test vector NIST #4 (P=0, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"d3d5424e20fbec":"":"":"60f8e127cb4d30db6df0622158cd931d":"FAIL" - -AES-256-CCM test vector NIST #5 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"a544218dadd3c10583db49cf39":"":"":"8a19a133":"" - -AES-256-CCM test vector NIST #6 (P=0, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"e1b8a927a95efe94656677b692662000278b441c79e879dd5c0ddc758bdc9ee8":"3c0e2815d37d844f7ac240ba9d":"":"":"2e317f1b":"FAIL" - -AES-256-CCM test vector NIST #7 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"a544218dadd3c10583db49cf39":"":"":"97e1a8dd4259ccd2e431e057b0397fcf":"" - -AES-256-CCM test vector NIST #8 (P=0, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"3c0e2815d37d844f7ac240ba9d":"":"":"5a9596c511ea6a8671adefc4f2157d8b":"FAIL" - -AES-256-CCM test vector NIST #9 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"a544218dadd3c1":"":"64a1341679972dc5869fcf69b19d5c5ea50aa0b5e985f5b7":"22aa8d59":"d3d5424e20fbec43ae495353ed830271515ab104f8860c98" - -AES-256-CCM test vector NIST #10 (P=24, N=7, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"af063639e66c284083c5cf72b70d8bc277f5978e80d9322d99f2fdc718cda569":"bfcda8b5a2d0d2":"":"c5b7f802bffc498c1626e3774f1d9f94045dfd8e1a10a202":"77d00a75":"FAIL" - -AES-256-CCM test vector NIST #11 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"a544218dadd3c1":"":"bc51c3925a960e7732533e4ef3a4f69ee6826de952bcb0fd":"374f3bb6db8377ebfc79674858c4f305":"d3d5424e20fbec43ae495353ed830271515ab104f8860c98" - -AES-256-CCM test vector NIST #12 (P=24, N=7, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"bfcda8b5a2d0d2":"":"afa1fa8e8a70e26b02161150556d604101fdf423f332c336":"3275f2a4907d51b734fe7238cebbd48f":"FAIL" - -AES-256-CCM test vector NIST #13 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"a544218dadd3c10583db49cf39":"":"63e00d30e4b08fd2a1cc8d70fab327b2368e77a93be4f412":"3d14fb3f":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e" - -AES-256-CCM test vector NIST #14 (P=24, N=13, A=0, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"f7079dfa3b5c7b056347d7e437bcded683abd6e2c9e069d333284082cbb5d453":"894dcaa61008eb8fb052c60d41":"":"bb5425b3869b76856ec58e39886fb6f6f2ac13fe44cb132d":"8d0c0099":"FAIL" - -AES-256-CCM test vector NIST #15 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"a544218dadd3c10583db49cf39":"":"f0050ad16392021a3f40207bed3521fb1e9f808f49830c42":"3a578d179902f912f9ea1afbce1120b3":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e" - -AES-256-CCM test vector NIST #16 (P=24, N=13, A=0, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"894dcaa61008eb8fb052c60d41":"":"c408190d0fbf5034f83b24a8ed9657331a7ce141de4fae76":"9084607b83bd06e6442eac8dacf583cc":"FAIL" - -AES-256-CCM test vector NIST #17 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":"":"92d00fbe":"" - -AES-256-CCM test vector NIST #18 (P=0, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"1b0e8df63c57f05d9ac457575ea764524b8610ae5164e6215f426f5a7ae6ede4":"78c46e3249ca28":"232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc":"":"9143e5c4":"FAIL" - -AES-256-CCM test vector NIST #19 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":"":"93af11a08379eb37a16aa2837f09d69d":"" - -AES-256-CCM test vector NIST #20 (P=0, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"78c46e3249ca28":"232e957c65ffa11988e830d4617d500f1c4a35c1221f396c41ab214f074ca2dc":"":"d19b0c14ec686a7961ca7c386d125a65":"FAIL" - -AES-256-CCM test vector NIST #21 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":"":"866d4227":"" - -AES-256-CCM test vector NIST #22 (P=0, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"a4bc10b1a62c96d459fbaf3a5aa3face7313bb9e1253e696f96a7a8e36801088":"e8de970f6ee8e80ede933581b5":"89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a":"":"94cb1127":"FAIL" - -AES-256-CCM test vector NIST #23 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":"":"867b0d87cf6e0f718200a97b4f6d5ad5":"" - -AES-256-CCM test vector NIST #24 (P=0, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"e8de970f6ee8e80ede933581b5":"89f8b068d34f56bc49d839d8e47b347e6dae737b903b278632447e6c0485d26a":"":"677a040d46ee3f2b7838273bdad14f16":"FAIL" - -AES-256-CCM test vector NIST #25 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":"c2fe12658139f5d0dd22cadf2e901695b579302a72fc5608":"3ebc7720":"78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3" - -AES-256-CCM test vector NIST #26 (P=24, N=7, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"8c5cf3457ff22228c39c051c4e05ed4093657eb303f859a9d4b0f8be0127d88a":"6ba004fd176791":"5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b":"94748ba81229e53c38583a8564b23ebbafc6f6efdf4c2a81":"c44db2c9":"FAIL" - -AES-256-CCM test vector NIST #27 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"a544218dadd3c1":"d3d5424e20fbec43ae495353ed830271515ab104f8860c988d15b6d36c038eab":"3341168eb8c48468c414347fb08f71d2086f7c2d1bd581ce":"1ac68bd42f5ec7fa7e068cc0ecd79c2a":"78c46e3249ca28e1ef0531d80fd37c124d9aecb7be6668e3" - -AES-256-CCM test vector NIST #28 (P=24, N=7, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"6ba004fd176791":"5a053b2a1bb87e85d56527bfcdcd3ecafb991bb10e4c862bb0751c700a29f54b":"d543acda712b898cbb27b8f598b2e4438ce587a836e27851":"47c3338a2400809e739b63ba8227d2f9":"FAIL" - -AES-256-CCM test vector NIST #29 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":"c0ea400b599561e7905b99262b4565d5c3dc49fad84d7c69":"ef891339":"e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3" - -AES-256-CCM test vector NIST #30 (P=24, N=13, A=32, T=4) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"705334e30f53dd2f92d190d2c1437c8772f940c55aa35e562214ed45bd458ffe":"8fa501c5dd9ac9b868144c9fa5":"5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800":"60871e03ea0eb968536c99f926ea24ef43d41272ad9fb7f6":"3d488623":"FAIL" - -AES-256-CCM test vector NIST #31 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e":"a544218dadd3c10583db49cf39":"3c0e2815d37d844f7ac240ba9d6e3a0b2a86f706e885959e09a1005e024f6907":"8d34cdca37ce77be68f65baf3382e31efa693e63f914a781":"367f30f2eaad8c063ca50795acd90203":"e8de970f6ee8e80ede933581b5bcf4d837e2b72baa8b00c3" - -AES-256-CCM test vector NIST #32 (P=24, N=13, A=32, T=16) -depends_on:MBEDTLS_AES_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_AES_256_CCM:"314a202f836f9f257e22d8c11757832ae5131d357a72df88f3eff0ffcee0da4e":"8fa501c5dd9ac9b868144c9fa5":"5bb40e3bb72b4509324a7edc852f72535f1f6283156e63f6959ffaf39dcde800":"516c0095cc3d85fd55e48da17c592e0c7014b9daafb82bdc":"4b41096dfdbe9cc1ab610f8f3e038d16":"FAIL" - -Camellia-CCM test vector RFC 5528 #1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000003020100A0A1A2A3A4A5":"0001020304050607":"BA737185E719310492F38A5F1251DA55FAFBC949848A0D":"FCAECE746B3DB9AD":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E" - -Camellia-CCM test vector RFC 5528 #2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000004030201A0A1A2A3A4A5":"0001020304050607":"5D2564BF8EAFE1D99526EC016D1BF0424CFBD2CD62848F33":"60B2295DF24283E8":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F" - -Camellia-CCM test vector RFC 5528 #3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000005040302A0A1A2A3A4A5":"0001020304050607":"81F663D6C7787817F9203608B982AD15DC2BBD87D756F79204":"F551D6682F23AA46":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20" - -Camellia-CCM test vector RFC 5528 #4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000006050403A0A1A2A3A4A5":"000102030405060708090A0B":"CAEF1E827211B08F7BD90F08C77288C070A4A0":"8B3A933A63E497A0":"0C0D0E0F101112131415161718191A1B1C1D1E" - -Camellia-CCM test vector RFC 5528 #5 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000007060504A0A1A2A3A4A5":"000102030405060708090A0B":"2AD3BAD94FC52E92BE438E827C1023B96A8A7725":"8FA17BA7F331DB09":"0C0D0E0F101112131415161718191A1B1C1D1E1F" - -Camellia-CCM test vector RFC 5528 #6 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000008070605A0A1A2A3A4A5":"000102030405060708090A0B":"FEA5480BA53FA8D3C34422AACE4DE67FFA3BB73BAB":"AB36A1EE4FE0FE28":"0C0D0E0F101112131415161718191A1B1C1D1E1F20" - -Camellia-CCM test vector RFC 5528 #7 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"00000009080706A0A1A2A3A4A5":"0001020304050607":"54532026E54C119A8D36D9EC6E1ED97416C8708C4B5C2C":"ACAFA3BCCF7A4EBF9573":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E" - -Camellia-CCM test vector RFC 5528 #8 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0000000A090807A0A1A2A3A4A5":"0001020304050607":"8AD19B001A87D148F4D92BEF34525CCCE3A63C6512A6F575":"7388E4913EF14701F441":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F" - -Camellia-CCM test vector RFC 5528 #9 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0000000B0A0908A0A1A2A3A4A5":"0001020304050607":"5DB08D62407E6E31D60F9CA2C60474219AC0BE50C0D4A57787":"94D6E230CD25C9FEBF87":"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20" - -Camellia-CCM test vector RFC 5528 #10 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0000000C0B0A09A0A1A2A3A4A5":"000102030405060708090A0B":"DB118CCEC1B8761C877CD8963A67D6F3BBBC5C":"D09299EB11F312F23237":"0C0D0E0F101112131415161718191A1B1C1D1E" - -Camellia-CCM test vector RFC 5528 #11 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0000000D0C0B0AA0A1A2A3A4A5":"000102030405060708090A0B":"7CC83D8DC49103525B483DC5CA7EA9AB812B7056":"079DAFFADA16CCCF2C4E":"0C0D0E0F101112131415161718191A1B1C1D1E1F" - -Camellia-CCM test vector RFC 5528 #12 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF":"0000000E0D0C0BA0A1A2A3A4A5":"000102030405060708090A0B":"2CD35B8820D23E7AA351B0E92FC79367238B2CC748":"CBB94C2947793D64AF75":"0C0D0E0F101112131415161718191A1B1C1D1E1F20" - -Camellia-CCM test vector RFC 5528 #13 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"00A970110E1927B160B6A31C1C":"6B7F464507FAE496":"A435D727348DDD22907F7EB8F5FDBB4D939DA6524DB4F6":"4558C02D25B127EE":"C6B5F3E6CA2311AEF7472B203E735EA561ADB17D56C5A3" - -Camellia-CCM test vector RFC 5528 #14 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"0083CD8CE0CB42B160B6A31C1C":"986605B43DF15DE7":"8AE052508FBECA932E346F05E0DC0DFBCF939EAFFA3E587C":"867D6E1C48703806":"01F6CE6764C574483BB02E6BBF1E0ABD26A22572B4D80EE7" - -Camellia-CCM test vector RFC 5528 #15 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"005F54950B18F2B160B6A31C1C":"48F2E7E1A7671A51":"08B67EE21C8BF26E473E408599E9C0836D6AF0BB18DF55466C":"A80878A790476DE5":"CDF1D8406FC2E9014953897005FBFB8BA57276F92404608E08" - -Camellia-CCM test vector RFC 5528 #16 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"00EC600863319AB160B6A31C1C":"DE97DF3B8CBD6D8E5030DA4C":"63B78B4967B19EDBB733CD1114F64EB2260893":"68C354828D950CC5":"B005DCFA0B59181426A961685A993D8C43185B" - -Camellia-CCM test vector RFC 5528 #17 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"0060CFF1A31EA1B160B6A31C1C":"A5EE93E457DF05466E782DCF":"0BC6BBE2A8B909F4629EE6DC148DA44410E18AF4":"3147383276F66A9F":"2E20211298105F129D5ED95B93F72D30B2FACCD7" - -Camellia-CCM test vector RFC 5528 #18 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"000F85CD995C97B160B6A31C1C":"24AA1BF9A5CD876182A25074":"222AD632FA31D6AF970C345F7E77CA3BD0DC25B340":"A1A3D31F8D4B44B7":"2645941E75632D3491AF0FC0C9876C3BE4AA7468C9" - -Camellia-CCM test vector RFC 5528 #19 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"00C29B2CAAC4CDB160B6A31C1C":"691946B9CA07BE87":"05B8E1B9C49CFD56CF130AA6251DC2ECC06CCC508FE697":"A0066D57C84BEC182768":"070135A6437C9DB120CD61D8F6C39C3EA125FD95A0D23D" - -Camellia-CCM test vector RFC 5528 #20 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"002C6B7595EE62B160B6A31C1C":"D0C54ECB84627DC4":"54CEB968DEE23611575EC003DFAA1CD48849BDF5AE2EDB6B":"7FA775B150ED4383C5A9":"C8C0880E6C636E20093DD6594217D2E18877DB264E71A5CC" - -Camellia-CCM test vector RFC 5528 #21 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"00C53CD4C2AA24B160B6A31C1C":"E285E0E4808CDA3D":"B1404546BF667210CA28E309B39BD6CA7E9FC8285FE698D43C":"D20A02E0BDCAED2010D3":"F75DAA0710C4E64297794DC2B7D2A20757B1AA4E448002FFAB" - -Camellia-CCM test vector RFC 5528 #22 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"00BEE9267FBADCB160B6A31C1C":"6CAEF9941141570D7C813405":"94C8959C11569A297831A721005857AB61B87A":"2DEA0936B6EB5F625F5D":"C238822FAC5F98FF929405B0AD127A4E41854E" - -Camellia-CCM test vector RFC 5528 #23 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"00DFA8B1245007B160B6A31C1C":"36A52CF16B19A2037AB7011E":"5869E3AAD2447C74E0FC05F9A4EA74577F4DE8CA":"8924764296AD04119CE7":"4DBF3E774AD245E5D5891F9D1C32A0AE022C85D7" - -Camellia-CCM test vector RFC 5528 #24 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CCM_C -auth_crypt_tv:MBEDTLS_CIPHER_CAMELLIA_128_CCM:"D75C2778078CA93D971F96FDE720F4CD":"003B8FD8D3A937B160B6A31C1C":"A4D499F78419728C19178B0C":"4B198156393B0F7796086AAFB454F8C3F034CCA966":"945F1FCEA7E11BEE6A2F":"9DC9EDAE2FF5DF8636E8C6DE0EED55F7867E33337D" - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.des.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.des.data deleted file mode 100644 index 3aac934b0b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.des.data +++ /dev/null @@ -1,591 +0,0 @@ -DES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:0:-1 - -DES Encrypt and decrypt 1 byte -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:1:-1 - -DES Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:2:-1 - -DES Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:7:-1 - -DES Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:8:-1 - -DES Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:9:-1 - -DES Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:15:-1 - -DES Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:16:-1 - -DES Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:17:-1 - -DES Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:31:-1 - -DES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:32:-1 - -DES Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:33:-1 - -DES Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:47:-1 - -DES Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:48:-1 - -DES Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:49:-1 - -DES Encrypt and decrypt 0 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:0:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 1 byte with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:1:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 2 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:2:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 7 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:7:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 8 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:8:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 9 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:9:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 15 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:15:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 16 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:16:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 17 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:17:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 31 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:31:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:32:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 32 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:33:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 47 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:47:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 48 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:48:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 49 bytes with one and zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:49:MBEDTLS_PADDING_ONE_AND_ZEROS - -DES Encrypt and decrypt 0 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:0:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 1 byte with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:1:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 2 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:2:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 7 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:7:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 8 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:8:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 9 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:9:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 15 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:15:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 16 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:16:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 17 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:17:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 31 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:31:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:32:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 32 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:33:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 47 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:47:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 48 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:48:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 49 bytes with zeros and len padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:49:MBEDTLS_PADDING_ZEROS_AND_LEN - -DES Encrypt and decrypt 0 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:0:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 1 byte with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:1:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 2 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:2:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 7 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:7:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 8 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:8:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 9 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:9:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 15 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:15:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 16 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:16:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 17 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:17:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 31 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:31:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:32:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 32 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:33:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 47 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:47:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 48 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:48:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 49 bytes with zeros padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:49:MBEDTLS_PADDING_ZEROS - -DES Encrypt and decrypt 0 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:0:MBEDTLS_PADDING_NONE - -DES Encrypt and decrypt 8 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:8:MBEDTLS_PADDING_NONE - -DES Encrypt and decrypt 16 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:16:MBEDTLS_PADDING_NONE - -DES Encrypt and decrypt 32 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:32:MBEDTLS_PADDING_NONE - -DES Encrypt and decrypt 48 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_CBC:"DES-CBC":64:48:MBEDTLS_PADDING_NONE - -DES Try encrypting 1 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:1:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 2 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:2:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 7 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:7:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 9 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:9:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 15 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:15:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 17 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:17:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 31 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:31:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 33 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:33:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 47 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:47:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Try encrypting 49 bytes with no padding -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_fail:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_NONE:64:49:MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED - -DES Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:0:0: - -DES Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:1:0: - -DES Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:0:1: - -DES Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:16:0: - -DES Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:0:16: - -DES Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:1:15: - -DES Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:15:1: - -DES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:15:7: - -DES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:16:6: - -DES Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:17:6: - -DES Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_CBC:64:16:16: - -DES Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:0:-1 - -DES3 Encrypt and decrypt 1 byte -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:1:-1 - -DES3 Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:2:-1 - -DES3 Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:7:-1 - -DES3 Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:8:-1 - -DES3 Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:9:-1 - -DES3 Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:15:-1 - -DES3 Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:16:-1 - -DES3 Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:17:-1 - -DES3 Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:31:-1 - -DES3 Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:32:-1 - -DES3 Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:33:-1 - -DES3 Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:47:-1 - -DES3 Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:48:-1 - -DES3 Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE_CBC:"DES-EDE-CBC":128:49:-1 - -DES3 Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:0:0: - -DES3 Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:1:0: - -DES3 Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:0:1: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:16:0: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:0:16: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:1:15: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:15:1: - -DES3 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:15:7: - -DES3 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:16:6: - -DES3 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:17:6: - -DES3 Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE_CBC:128:16:16: - -DES3 Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:0:-1 - -DES3 Encrypt and decrypt 1 byte -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:1:-1 - -DES3 Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:2:-1 - -DES3 Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:7:-1 - -DES3 Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:8:-1 - -DES3 Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:9:-1 - -DES3 Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:15:-1 - -DES3 Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:16:-1 - -DES3 Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:17:-1 - -DES3 Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:31:-1 - -DES3 Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:32:-1 - -DES3 Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:33:-1 - -DES3 Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:47:-1 - -DES3 Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:48:-1 - -DES3 Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf:MBEDTLS_CIPHER_DES_EDE3_CBC:"DES-EDE3-CBC":192:49:-1 - -DES3 Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:0:0: - -DES3 Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:1:0: - -DES3 Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:0:1: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:16:0: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:0:16: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:1:15: - -DES3 Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:15:1: - -DES3 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:15:7: - -DES3 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:16:6: - -DES3 Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:17:6: - -DES3 Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -enc_dec_buf_multipart:MBEDTLS_CIPHER_DES_EDE3_CBC:192:16:16: - -DES ECB Encrypt test vector (OpenSSL) #1 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_ECB:MBEDTLS_ENCRYPT:"0000000000000000":"0000000000000000":"8CA64DE9C1B123A7":0 - -DES ECB Encrypt test vector (OpenSSL) #2 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_ECB:MBEDTLS_ENCRYPT:"FFFFFFFFFFFFFFFF":"FFFFFFFFFFFFFFFF":"7359B2163E4EDC58":0 - -DES ECB Encrypt test vector (OpenSSL) #3 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_ECB:MBEDTLS_ENCRYPT:"FEDCBA9876543210":"0123456789ABCDEF":"ED39D950FA74BCC4":0 - -DES ECB Decrypt test vector (OpenSSL) #1 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_ECB:MBEDTLS_DECRYPT:"0000000000000000":"8CA64DE9C1B123A7":"0000000000000000":0 - -DES ECB Decrypt test vector (OpenSSL) #2 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_ECB:MBEDTLS_DECRYPT:"FFFFFFFFFFFFFFFF":"7359B2163E4EDC58":"FFFFFFFFFFFFFFFF":0 - -DES ECB Decrypt test vector (OpenSSL) #3 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_ECB:MBEDTLS_DECRYPT:"43297FAD38E373FE":"EA676B2CB7DB2B7A":"762514B829BF486A":0 - -DES3-EDE ECB Encrypt test vector (OpenSSL) #1 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_EDE_ECB:MBEDTLS_ENCRYPT:"0000000000000000FFFFFFFFFFFFFFFF":"0000000000000000":"9295B59BB384736E":0 - -DES3-EDE ECB Encrypt test vector (OpenSSL) #2 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_EDE_ECB:MBEDTLS_ENCRYPT:"FFFFFFFFFFFFFFFF3000000000000000":"FFFFFFFFFFFFFFFF":"199E9D6DF39AA816":0 - -DES3-EDE ECB Decrypt test vector (OpenSSL) #1 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_EDE_ECB:MBEDTLS_DECRYPT:"0000000000000000FFFFFFFFFFFFFFFF":"9295B59BB384736E":"0000000000000000":0 - -DES3-EDE ECB Decrypt test vector (OpenSSL) #2 -depends_on:MBEDTLS_DES_C -test_vec_ecb:MBEDTLS_CIPHER_DES_EDE_ECB:MBEDTLS_DECRYPT:"FFFFFFFFFFFFFFFF3000000000000000":"199E9D6DF39AA816":"FFFFFFFFFFFFFFFF":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.function deleted file mode 100644 index 967a6a0a1c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.function +++ /dev/null @@ -1,676 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/cipher.h" - -#if defined(MBEDTLS_GCM_C) -#include "mbedtls/gcm.h" -#endif -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_CIPHER_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_cipher_list( ) -{ - const int *cipher_type; - - for( cipher_type = mbedtls_cipher_list(); *cipher_type != 0; cipher_type++ ) - TEST_ASSERT( mbedtls_cipher_info_from_type( *cipher_type ) != NULL ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void cipher_null_args( ) -{ - mbedtls_cipher_context_t ctx; - const mbedtls_cipher_info_t *info = mbedtls_cipher_info_from_type( *( mbedtls_cipher_list() ) ); - unsigned char buf[1] = { 0 }; - size_t olen; - - mbedtls_cipher_init( &ctx ); - - TEST_ASSERT( mbedtls_cipher_get_block_size( NULL ) == 0 ); - TEST_ASSERT( mbedtls_cipher_get_block_size( &ctx ) == 0 ); - - TEST_ASSERT( mbedtls_cipher_get_cipher_mode( NULL ) == MBEDTLS_MODE_NONE ); - TEST_ASSERT( mbedtls_cipher_get_cipher_mode( &ctx ) == MBEDTLS_MODE_NONE ); - - TEST_ASSERT( mbedtls_cipher_get_iv_size( NULL ) == 0 ); - TEST_ASSERT( mbedtls_cipher_get_iv_size( &ctx ) == 0 ); - - TEST_ASSERT( mbedtls_cipher_info_from_string( NULL ) == NULL ); - - TEST_ASSERT( mbedtls_cipher_setup( &ctx, NULL ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_setup( NULL, info ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_cipher_setkey( NULL, buf, 0, MBEDTLS_ENCRYPT ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_setkey( &ctx, buf, 0, MBEDTLS_ENCRYPT ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_cipher_set_iv( NULL, buf, 0 ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_set_iv( &ctx, buf, 0 ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_cipher_reset( NULL ) == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_reset( &ctx ) == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( mbedtls_cipher_update_ad( NULL, buf, 0 ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_update_ad( &ctx, buf, 0 ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); -#endif - - TEST_ASSERT( mbedtls_cipher_update( NULL, buf, 0, buf, &olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_update( &ctx, buf, 0, buf, &olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_cipher_finish( NULL, buf, &olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_finish( &ctx, buf, &olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( mbedtls_cipher_write_tag( NULL, buf, olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_write_tag( &ctx, buf, olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_cipher_check_tag( NULL, buf, olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_cipher_check_tag( &ctx, buf, olen ) - == MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); -#endif -} -/* END_CASE */ - -/* BEGIN_CASE */ -void enc_dec_buf( int cipher_id, char *cipher_string, int key_len, - int length_val, int pad_mode ) -{ - size_t length = length_val, outlen, total_len, i, block_size; - unsigned char key[32]; - unsigned char iv[16]; - unsigned char ad[13]; - unsigned char tag[16]; - unsigned char inbuf[64]; - unsigned char encbuf[64]; - unsigned char decbuf[64]; - - const mbedtls_cipher_info_t *cipher_info; - mbedtls_cipher_context_t ctx_dec; - mbedtls_cipher_context_t ctx_enc; - - /* - * Prepare contexts - */ - mbedtls_cipher_init( &ctx_dec ); - mbedtls_cipher_init( &ctx_enc ); - - memset( key, 0x2a, sizeof( key ) ); - - /* Check and get info structures */ - cipher_info = mbedtls_cipher_info_from_type( cipher_id ); - TEST_ASSERT( NULL != cipher_info ); - TEST_ASSERT( mbedtls_cipher_info_from_string( cipher_string ) == cipher_info ); - - /* Initialise enc and dec contexts */ - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx_dec, cipher_info ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx_enc, cipher_info ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_dec, key, key_len, MBEDTLS_DECRYPT ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_enc, key, key_len, MBEDTLS_ENCRYPT ) ); - -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) - if( -1 != pad_mode ) - { - TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx_dec, pad_mode ) ); - TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx_enc, pad_mode ) ); - } -#else - (void) pad_mode; -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - - /* - * Do a few encode/decode cycles - */ - for( i = 0; i < 3; i++ ) - { - memset( iv , 0x00 + i, sizeof( iv ) ); - memset( ad, 0x10 + i, sizeof( ad ) ); - memset( inbuf, 0x20 + i, sizeof( inbuf ) ); - - memset( encbuf, 0, sizeof( encbuf ) ); - memset( decbuf, 0, sizeof( decbuf ) ); - memset( tag, 0, sizeof( tag ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, sizeof( iv ) ) ); - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_enc, iv, sizeof( iv ) ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx_dec ) ); - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx_enc ) ); - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx_dec, ad, sizeof( ad ) - i ) ); - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx_enc, ad, sizeof( ad ) - i ) ); -#endif - - block_size = mbedtls_cipher_get_block_size( &ctx_enc ); - TEST_ASSERT( block_size != 0 ); - - /* encode length number of bytes from inbuf */ - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_enc, inbuf, length, encbuf, &outlen ) ); - total_len = outlen; - - TEST_ASSERT( total_len == length || - ( total_len % block_size == 0 && - total_len < length && - total_len + block_size > length ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_finish( &ctx_enc, encbuf + outlen, &outlen ) ); - total_len += outlen; - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_write_tag( &ctx_enc, tag, sizeof( tag ) ) ); -#endif - - TEST_ASSERT( total_len == length || - ( total_len % block_size == 0 && - total_len > length && - total_len <= length + block_size ) ); - - /* decode the previously encoded string */ - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_dec, encbuf, total_len, decbuf, &outlen ) ); - total_len = outlen; - - TEST_ASSERT( total_len == length || - ( total_len % block_size == 0 && - total_len < length && - total_len + block_size >= length ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_finish( &ctx_dec, decbuf + outlen, &outlen ) ); - total_len += outlen; - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_check_tag( &ctx_dec, tag, sizeof( tag ) ) ); -#endif - - /* check result */ - TEST_ASSERT( total_len == length ); - TEST_ASSERT( 0 == memcmp(inbuf, decbuf, length) ); - } - - /* - * Done - */ -exit: - mbedtls_cipher_free( &ctx_dec ); - mbedtls_cipher_free( &ctx_enc ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void enc_fail( int cipher_id, int pad_mode, int key_len, - int length_val, int ret ) -{ - size_t length = length_val; - unsigned char key[32]; - unsigned char iv[16]; - - const mbedtls_cipher_info_t *cipher_info; - mbedtls_cipher_context_t ctx; - - unsigned char inbuf[64]; - unsigned char encbuf[64]; - - size_t outlen = 0; - - memset( key, 0, 32 ); - memset( iv , 0, 16 ); - - mbedtls_cipher_init( &ctx ); - - memset( inbuf, 5, 64 ); - memset( encbuf, 0, 64 ); - - /* Check and get info structures */ - cipher_info = mbedtls_cipher_info_from_type( cipher_id ); - TEST_ASSERT( NULL != cipher_info ); - - /* Initialise context */ - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, key_len, MBEDTLS_ENCRYPT ) ); -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) - TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, pad_mode ) ); -#else - (void) pad_mode; -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx, iv, 16 ) ); - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx ) ); -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx, NULL, 0 ) ); -#endif - - /* encode length number of bytes from inbuf */ - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx, inbuf, length, encbuf, &outlen ) ); - TEST_ASSERT( ret == mbedtls_cipher_finish( &ctx, encbuf + outlen, &outlen ) ); - - /* done */ -exit: - mbedtls_cipher_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void dec_empty_buf() -{ - unsigned char key[32]; - unsigned char iv[16]; - - mbedtls_cipher_context_t ctx_dec; - const mbedtls_cipher_info_t *cipher_info; - - unsigned char encbuf[64]; - unsigned char decbuf[64]; - - size_t outlen = 0; - - memset( key, 0, 32 ); - memset( iv , 0, 16 ); - - mbedtls_cipher_init( &ctx_dec ); - - memset( encbuf, 0, 64 ); - memset( decbuf, 0, 64 ); - - /* Initialise context */ - cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_CBC ); - TEST_ASSERT( NULL != cipher_info); - - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx_dec, cipher_info ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_dec, key, 128, MBEDTLS_DECRYPT ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, 16 ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx_dec ) ); - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx_dec, NULL, 0 ) ); -#endif - - /* decode 0-byte string */ - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_dec, encbuf, 0, decbuf, &outlen ) ); - TEST_ASSERT( 0 == outlen ); - TEST_ASSERT( MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED == mbedtls_cipher_finish( - &ctx_dec, decbuf + outlen, &outlen ) ); - TEST_ASSERT( 0 == outlen ); - -exit: - mbedtls_cipher_free( &ctx_dec ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void enc_dec_buf_multipart( int cipher_id, int key_len, int first_length_val, - int second_length_val ) -{ - size_t first_length = first_length_val; - size_t second_length = second_length_val; - size_t length = first_length + second_length; - size_t block_size; - unsigned char key[32]; - unsigned char iv[16]; - - mbedtls_cipher_context_t ctx_dec; - mbedtls_cipher_context_t ctx_enc; - const mbedtls_cipher_info_t *cipher_info; - - unsigned char inbuf[64]; - unsigned char encbuf[64]; - unsigned char decbuf[64]; - - size_t outlen = 0; - size_t totaloutlen = 0; - - memset( key, 0, 32 ); - memset( iv , 0, 16 ); - - mbedtls_cipher_init( &ctx_dec ); - mbedtls_cipher_init( &ctx_enc ); - - memset( inbuf, 5, 64 ); - memset( encbuf, 0, 64 ); - memset( decbuf, 0, 64 ); - - /* Initialise enc and dec contexts */ - cipher_info = mbedtls_cipher_info_from_type( cipher_id ); - TEST_ASSERT( NULL != cipher_info); - - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx_dec, cipher_info ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx_enc, cipher_info ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_dec, key, key_len, MBEDTLS_DECRYPT ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_enc, key, key_len, MBEDTLS_ENCRYPT ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, 16 ) ); - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_enc, iv, 16 ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx_dec ) ); - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx_enc ) ); - -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx_dec, NULL, 0 ) ); - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx_enc, NULL, 0 ) ); -#endif - - block_size = mbedtls_cipher_get_block_size( &ctx_enc ); - TEST_ASSERT( block_size != 0 ); - - /* encode length number of bytes from inbuf */ - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_enc, inbuf, first_length, encbuf, &outlen ) ); - totaloutlen = outlen; - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_enc, inbuf + first_length, second_length, encbuf + totaloutlen, &outlen ) ); - totaloutlen += outlen; - TEST_ASSERT( totaloutlen == length || - ( totaloutlen % block_size == 0 && - totaloutlen < length && - totaloutlen + block_size > length ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_finish( &ctx_enc, encbuf + totaloutlen, &outlen ) ); - totaloutlen += outlen; - TEST_ASSERT( totaloutlen == length || - ( totaloutlen % block_size == 0 && - totaloutlen > length && - totaloutlen <= length + block_size ) ); - - /* decode the previously encoded string */ - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx_dec, encbuf, totaloutlen, decbuf, &outlen ) ); - totaloutlen = outlen; - - TEST_ASSERT( totaloutlen == length || - ( totaloutlen % block_size == 0 && - totaloutlen < length && - totaloutlen + block_size >= length ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_finish( &ctx_dec, decbuf + outlen, &outlen ) ); - totaloutlen += outlen; - - TEST_ASSERT( totaloutlen == length ); - - TEST_ASSERT( 0 == memcmp(inbuf, decbuf, length) ); - -exit: - mbedtls_cipher_free( &ctx_dec ); - mbedtls_cipher_free( &ctx_enc ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void decrypt_test_vec( int cipher_id, int pad_mode, - char *hex_key, char *hex_iv, - char *hex_cipher, char *hex_clear, - char *hex_ad, char *hex_tag, - int finish_result, int tag_result ) -{ - unsigned char key[50]; - unsigned char iv[50]; - unsigned char cipher[200]; - unsigned char clear[200]; - unsigned char ad[200]; - unsigned char tag[20]; - size_t key_len, iv_len, cipher_len, clear_len; -#if defined(MBEDTLS_GCM_C) - size_t ad_len, tag_len; -#endif - mbedtls_cipher_context_t ctx; - unsigned char output[200]; - size_t outlen, total_len; - - mbedtls_cipher_init( &ctx ); - - memset( key, 0x00, sizeof( key ) ); - memset( iv, 0x00, sizeof( iv ) ); - memset( cipher, 0x00, sizeof( cipher ) ); - memset( clear, 0x00, sizeof( clear ) ); - memset( ad, 0x00, sizeof( ad ) ); - memset( tag, 0x00, sizeof( tag ) ); - memset( output, 0x00, sizeof( output ) ); - - key_len = unhexify( key, hex_key ); - iv_len = unhexify( iv, hex_iv ); - cipher_len = unhexify( cipher, hex_cipher ); - clear_len = unhexify( clear, hex_clear ); -#if defined(MBEDTLS_GCM_C) - ad_len = unhexify( ad, hex_ad ); - tag_len = unhexify( tag, hex_tag ); -#else - ((void) hex_ad); - ((void) hex_tag); -#endif - - /* Prepare context */ - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, - mbedtls_cipher_info_from_type( cipher_id ) ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, 8 * key_len, MBEDTLS_DECRYPT ) ); -#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) - if( pad_mode != -1 ) - TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, pad_mode ) ); -#else - (void) pad_mode; -#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ - TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx, iv, iv_len ) ); - TEST_ASSERT( 0 == mbedtls_cipher_reset( &ctx ) ); -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( 0 == mbedtls_cipher_update_ad( &ctx, ad, ad_len ) ); -#endif - - /* decode buffer and check tag */ - total_len = 0; - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx, cipher, cipher_len, output, &outlen ) ); - total_len += outlen; - TEST_ASSERT( finish_result == mbedtls_cipher_finish( &ctx, output + outlen, - &outlen ) ); - total_len += outlen; -#if defined(MBEDTLS_GCM_C) - TEST_ASSERT( tag_result == mbedtls_cipher_check_tag( &ctx, tag, tag_len ) ); -#endif - - /* check plaintext only if everything went fine */ - if( 0 == finish_result && 0 == tag_result ) - { - TEST_ASSERT( total_len == clear_len ); - TEST_ASSERT( 0 == memcmp( output, clear, clear_len ) ); - } - -exit: - mbedtls_cipher_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_AEAD */ -void auth_crypt_tv( int cipher_id, char *hex_key, char *hex_iv, - char *hex_ad, char *hex_cipher, - char *hex_tag, char *hex_clear ) -{ - int ret; - unsigned char key[50]; - unsigned char iv[50]; - unsigned char cipher[200]; - unsigned char clear[200]; - unsigned char ad[200]; - unsigned char tag[20]; - unsigned char my_tag[20]; - size_t key_len, iv_len, cipher_len, clear_len, ad_len, tag_len; - mbedtls_cipher_context_t ctx; - unsigned char output[200]; - size_t outlen; - - mbedtls_cipher_init( &ctx ); - - memset( key, 0x00, sizeof( key ) ); - memset( iv, 0x00, sizeof( iv ) ); - memset( cipher, 0x00, sizeof( cipher ) ); - memset( clear, 0x00, sizeof( clear ) ); - memset( ad, 0x00, sizeof( ad ) ); - memset( tag, 0x00, sizeof( tag ) ); - memset( my_tag, 0xFF, sizeof( my_tag ) ); - memset( output, 0xFF, sizeof( output ) ); - - key_len = unhexify( key, hex_key ); - iv_len = unhexify( iv, hex_iv ); - cipher_len = unhexify( cipher, hex_cipher ); - ad_len = unhexify( ad, hex_ad ); - tag_len = unhexify( tag, hex_tag ); - - /* Prepare context */ - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, - mbedtls_cipher_info_from_type( cipher_id ) ) ); - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, 8 * key_len, MBEDTLS_DECRYPT ) ); - - /* decode buffer and check tag */ - ret = mbedtls_cipher_auth_decrypt( &ctx, iv, iv_len, ad, ad_len, - cipher, cipher_len, output, &outlen, - tag, tag_len ); - - /* make sure we didn't overwrite */ - TEST_ASSERT( output[outlen + 0] == 0xFF ); - TEST_ASSERT( output[outlen + 1] == 0xFF ); - - /* make sure the message is rejected if it should be */ - if( strcmp( hex_clear, "FAIL" ) == 0 ) - { - TEST_ASSERT( ret == MBEDTLS_ERR_CIPHER_AUTH_FAILED ); - goto exit; - } - - /* otherwise, make sure it was decrypted properly */ - TEST_ASSERT( ret == 0 ); - - clear_len = unhexify( clear, hex_clear ); - TEST_ASSERT( outlen == clear_len ); - TEST_ASSERT( memcmp( output, clear, clear_len ) == 0 ); - - /* then encrypt the clear and make sure we get the same ciphertext and tag */ - memset( output, 0xFF, sizeof( output ) ); - outlen = 0; - - ret = mbedtls_cipher_auth_encrypt( &ctx, iv, iv_len, ad, ad_len, - clear, clear_len, output, &outlen, - my_tag, tag_len ); - TEST_ASSERT( ret == 0 ); - - TEST_ASSERT( outlen == clear_len ); - TEST_ASSERT( memcmp( output, cipher, clear_len ) == 0 ); - TEST_ASSERT( memcmp( my_tag, tag, tag_len ) == 0 ); - - /* make sure we didn't overwrite */ - TEST_ASSERT( output[outlen + 0] == 0xFF ); - TEST_ASSERT( output[outlen + 1] == 0xFF ); - TEST_ASSERT( my_tag[tag_len + 0] == 0xFF ); - TEST_ASSERT( my_tag[tag_len + 1] == 0xFF ); - - -exit: - mbedtls_cipher_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void test_vec_ecb( int cipher_id, int operation, char *hex_key, - char *hex_input, char *hex_result, - int finish_result ) -{ - unsigned char key[50]; - unsigned char input[16]; - unsigned char result[16]; - size_t key_len; - mbedtls_cipher_context_t ctx; - unsigned char output[32]; - size_t outlen; - - mbedtls_cipher_init( &ctx ); - - memset( key, 0x00, sizeof( key ) ); - memset( input, 0x00, sizeof( input ) ); - memset( result, 0x00, sizeof( result ) ); - memset( output, 0x00, sizeof( output ) ); - - /* Prepare context */ - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, - mbedtls_cipher_info_from_type( cipher_id ) ) ); - - key_len = unhexify( key, hex_key ); - TEST_ASSERT( unhexify( input, hex_input ) == - (int) mbedtls_cipher_get_block_size( &ctx ) ); - TEST_ASSERT( unhexify( result, hex_result ) == - (int) mbedtls_cipher_get_block_size( &ctx ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, 8 * key_len, operation ) ); - - TEST_ASSERT( 0 == mbedtls_cipher_update( &ctx, input, - mbedtls_cipher_get_block_size( &ctx ), - output, &outlen ) ); - TEST_ASSERT( outlen == mbedtls_cipher_get_block_size( &ctx ) ); - TEST_ASSERT( finish_result == mbedtls_cipher_finish( &ctx, output + outlen, - &outlen ) ); - TEST_ASSERT( 0 == outlen ); - - /* check plaintext only if everything went fine */ - if( 0 == finish_result ) - TEST_ASSERT( 0 == memcmp( output, result, - mbedtls_cipher_get_block_size( &ctx ) ) ); - -exit: - mbedtls_cipher_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_WITH_PADDING */ -void set_padding( int cipher_id, int pad_mode, int ret ) -{ - const mbedtls_cipher_info_t *cipher_info; - mbedtls_cipher_context_t ctx; - - mbedtls_cipher_init( &ctx ); - - cipher_info = mbedtls_cipher_info_from_type( cipher_id ); - TEST_ASSERT( NULL != cipher_info ); - TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) ); - - TEST_ASSERT( ret == mbedtls_cipher_set_padding_mode( &ctx, pad_mode ) ); - -exit: - mbedtls_cipher_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void check_padding( int pad_mode, char *input_str, int ret, int dlen_check ) -{ - mbedtls_cipher_info_t cipher_info; - mbedtls_cipher_context_t ctx; - unsigned char input[16]; - size_t ilen, dlen; - - /* build a fake context just for getting access to get_padding */ - mbedtls_cipher_init( &ctx ); - cipher_info.mode = MBEDTLS_MODE_CBC; - ctx.cipher_info = &cipher_info; - - TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, pad_mode ) ); - - ilen = unhexify( input, input_str ); - - TEST_ASSERT( ret == ctx.get_padding( input, ilen, &dlen ) ); - if( 0 == ret ) - TEST_ASSERT( dlen == (size_t) dlen_check ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.gcm.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.gcm.data deleted file mode 100644 index b0ccbe8719..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.gcm.data +++ /dev/null @@ -1,703 +0,0 @@ -AES 128 GCM Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:0:-1 - -AES 128 GCM Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:1:-1 - -AES 128 GCM Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:2:-1 - -AES 128 GCM Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:7:-1 - -AES 128 GCM Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:8:-1 - -AES 128 GCM Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:9:-1 - -AES 128 GCM Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:15:-1 - -AES 128 GCM Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:16:-1 - -AES 128 GCM Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:17:-1 - -AES 128 GCM Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:31:-1 - -AES 128 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:32:-1 - -AES 128 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:33:-1 - -AES 128 GCM Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:47:-1 - -AES 128 GCM Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:48:-1 - -AES 128 GCM Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:49:-1 - -AES 128 GCM Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:0:0 - -AES 128 GCM Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:1:0 - -AES 128 GCM Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:0:1 - -AES 128 GCM Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:16:0 - -AES 128 GCM Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:0:16 - -AES 128 GCM Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:16:6 - -AES 128 GCM Encrypt and decrypt 22 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:0:22 - -AES 128 GCM Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_128_GCM:128:16:16 - -AES 128 GCM Decrypt test vector #1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"d785dafea3e966731ef6fc6202262584":"d91a46205ee94058b3b8403997592dd2":"":"":"":"3b92a17c1b9c3578a68cffea5a5b6245":0:0 - -AES 128 GCM Decrypt test vector #2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"9ab5c8ca905b5fe50461f4a68941144b":"96dd3927a96e16123f2e9d6b367d303f":"":"":"":"6e0c53ef":0:0 - -AES 128 GCM Decrypt test vector #3 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"b5fc7af605721a9cfe61c1ee6a4b3e22":"6b757d4055823d1035d01077666037d6":"":"":"":"e8c09ddd":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 128 GCM Decrypt test vector #4 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"03c0b4a6e508a8490db0d086a82c9db7":"ac52f6c1a05030321fa39f87e89fdb5e":"":"":"33316ca79d10a79f4fd038593e8eef09625089dc4e0ffe4bc1f2871554fa6666ab3e7fe7885edef694b410456f3ec0e513bb25f1b48d95e4820c5972c1aabb25c84c08566002dadc36df334c1ce86847964a122016d389ac873bca8c335a7a99bcef91e1b985ae5d488a2d7f78b4bf14e0c2dc715e814f4e24276057cf668172":"756292d8b4653887edef51679b161812":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 128 GCM Decrypt test vector #5 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"2bc73fba942ff105823b5dccf6befb1c":"902c3e3b69b1ef8395d7281ff74cce38":"":"":"4adec0b4ac00325a860044d9f9519daa4f7c163229a75819b0fd7d8e23319f030e61dfa8eadabff42ea27bc36bdb6cad249e801ca631b656836448b7172c11126bad2781e6a1aa4f62c4eda53409408b008c057e0b81215cc13ddabbb8f1915f4bbab854f8b00763a530ad5055d265778cd3080d0bd35b76a329bdd5b5a2d268":"ebdd7c8e87fe733138a433543542d1":0:0 - -AES 128 GCM Decrypt test vector #6 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"0dd358bc3f992f26e81e3a2f3aa2d517":"d8c750bb443ee1a169dfe97cfe4d855b":"87cc4fd75788c9d5cc83bae5d764dd249d178ab23224049795d4288b5ed9ea3f317068a39a7574b300c8544226e87b08e008fbe241d094545c211d56ac44437d41491a438272738968c8d371aa7787b5f606c8549a9d868d8a71380e9657d3c0337979feb01de5991fc1470dfc59eb02511efbbff3fcb479a862ba3844a25aaa":"77949b29f085bb3abb71a5386003811233056d3296eb093370f7777dadd306d93d59dcb9754d3857cf2758091ba661f845ef0582f6ae0e134328106f0d5d16b541cd74fdc756dc7b53f4f8a194daeea9369ebb1630c01ccb307b848e9527da20a39898d748fd59206f0b79d0ed946a8958033a45bd9ae673518b32606748eb65":"":"a81d13973baa22a751833d7d3f94b3b1":0:0 - -AES 128 GCM Decrypt test vector #7 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"9a433c612d7e1bdff881e4d63ba8b141":"8b670cf31f470f79a6c0b79e73863ca1":"ce10758332f423228b5e4ae31efda7677586934a1d8f05d9b7a0dc4e2010ec3eaacb71a527a5fff8e787d75ebd24ad163394c891b33477ed9e2a2d853c364cb1c5d0bc317fcaf4010817dbe5f1fd1037c701b291b3a66b164bc818bf5c00a4c210a1671faa574d74c7f3543f6c09aaf117e12e2eb3dae55edb1cc5b4086b617d":"":"":"8526fd25daf890e79946a205b698f287":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 128 GCM Decrypt test vector #8 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"69eedf3777e594c30e94e9c5e2bce467":"a3330638a809ba358d6c098e4342b81e":"5114e9983c96fecec3f7304ca42f52aa16cb7c6aadfb62ad537c93a3188835ca0703dad34c73cf96435b668b68a7a1d056931959316e8d3ab956bf64c4e07479c7767f9d488b0c0c351333ccf400b7e0be19a0fd173e3f2a1ae313f27e516952260fd2da9ab9daca478ebb93cd07d0b7503b32364d8e308d904d966c58f226bb":"208e6321238bf5c6e2ef55a4b8f531cbbfb0d77374fe32df6dd663486cf79beeed39bb6910c3c78dd0cc30707a0a12b226b2d06024db25dcd8a4e620f009cafa5242121e864c7f3f4360aaf1e9d4e548d99615156f156008418c1c41ff2bbc007cecf8f209c73203e6df89b32871de637b3d6af2e277d146ae03f3404d387b77":"df4e3f2b47cf0e8590228fcf9913fb8a5eb9751bba318fd2d57be68c7e788e04fabf303699b99f26313d1c4956105cd2817aad21b91c28f3b9251e9c0b354490fa5abfcea0065aa3cc9b96772eb8af06a1a9054bf12d3ae698dfb01a13f989f8b8a4bb61686cf3adf58f05873a24d403a62a092290c2481e4159588fea6b9a09":"5de3068e1e20eed469265000077b1db9":0:0 - -AES 128 GCM Decrypt test vector #9 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_128_GCM:-1:"45cc35311eedf0ba093bf901931a7036":"fed5084de3c348f5a0adf4c2fd4e848a":"5dc8d7525eaad035c19714ae1b1e538cb66a4089027245351e0ad9297410fb3a0c1155407c10a8bb95a9ca624a9c9925dac003ee78926c6e90ff4ccdba10e8a78bda1c4478162a0e302de5ff05fb0f94c89c3c7429fb94828bdcd97d21333c2ee72963ee6f056ce272b8bab007e653a42b01d1d2041ba627f169c8c0d32e6dae":"":"6e210914e4aed188d576f5ad7fc7e4cf7dd8d82f34ea3bcbdb7267cfd9045f806978dbff3460c4e8ff8c4edb6ad2edba405a8d915729d89aab2116b36a70b54f5920a97f5a571977e0329eda6c696749be940eabfc6d8b0bbd6fbdb87657b3a7695da9f5d3a7384257f20e0becd8512d3705cc246ee6ca1e610921cf92603d79":"266a895fc21da5176b44b446d7d1921d":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 192 GCM Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:0:-1 - -AES 192 GCM Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:1:-1 - -AES 192 GCM Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:2:-1 - -AES 192 GCM Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:7:-1 - -AES 192 GCM Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:8:-1 - -AES 192 GCM Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:9:-1 - -AES 192 GCM Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:15:-1 - -AES 192 GCM Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:16:-1 - -AES 192 GCM Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:17:-1 - -AES 192 GCM Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:31:-1 - -AES 192 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:32:-1 - -AES 192 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:33:-1 - -AES 192 GCM Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:47:-1 - -AES 192 GCM Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:48:-1 - -AES 192 GCM Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_192_GCM:"AES-192-GCM":192:49:-1 - -AES 192 GCM Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:0:0 - -AES 192 GCM Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:1:0 - -AES 192 GCM Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:0:1 - -AES 192 GCM Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:16:0 - -AES 192 GCM Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:0:16 - -AES 192 GCM Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:16:6 - -AES 192 GCM Encrypt and decrypt 22 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:0:22 - -AES 192 GCM Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_192_GCM:192:16:16 - -AES 192 GCM Decrypt test vector #1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_GCM:-1:"806766a4d2b6507cc4113bc0e46eebe120eacd948c24dc7f":"4f801c772395c4519ec830980c8ca5a4":"":"":"":"8fa16452b132bebc6aa521e92cb3b0ea":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 192 GCM Decrypt test vector #2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_GCM:-1:"be2f0f4ae4ab851b258ec5602628df261b6a69e309ff9043":"646a91d83ae72b9b9e9fce64135cbf73":"":"":"":"169e717e2bae42e3eb61d0a1a29b":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 192 GCM Decrypt test vector #3 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_GCM:-1:"1eb53aa548b41bfdc85c657ebdebdae0c7e525a6432bc012":"37ffc64d4b2d9c82dd17d1ad3076d82b":"":"":"":"34b8e037084b3f2d":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 192 GCM Decrypt test vector #4 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_GCM:-1:"c6a98102af3d875bcdebe594661d3a6b376970c02b11d019":"bea8cd85a28a2c05bf7406b8eef1efcc":"":"":"f2f80e2c042092cc7240b598ab30fad055bce85408aa0f8cefaf8a7204f0e2acb87c78f46a5867b1f1c19461cbf5ed5d2ca21c96a63fb1f42f10f394952e63520795c56df77d6a04cb5ad006ee865a47dc2349a814a630b3d4c4e0fd149f51e8fa846656ea569fd29a1ebafc061446eb80ec182f833f1f6d9083545abf52fa4c":"04b80f25ae9d07f5fd8220263ac3f2f7":0:0 - -AES 192 GCM Decrypt test vector #5 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_GCM:-1:"a249135c9f2f5a8b1af66442a4d4e101771a918ef8acee05":"80b6e48fe4a3b08d40c1636b25dfd2c4":"c62b39b937edbdc9b644321d5d284e62eaa4154010c7a3208c1ef4706fba90223da04b2f686a28b975eff17386598ba77e212855692f384782c1f3c00be011e466e145f6f8b65c458e41409e01a019b290773992e19334ffaca544e28fc9044a5e86bcd2fa5ad2e76f2be3f014d8c387456a8fcfded3ae4d1194d0e3e53a2031":"b865f8dd64a6f51a500bcfc8cadbc9e9f5d54d2d27d815ecfe3d5731e1b230c587b46958c6187e41b52ff187a14d26aa41c5f9909a3b77859429232e5bd6c6dc22cf5590402476d033a32682e8ab8dc7ed0b089c5ab20ab9a8c5d6a3be9ea7aa56c9d3ab08de4a4a019abb447db448062f16a533d416951a8ff6f13ed5608f77":"":"951c1c89b6d95661630d739dd9120a73":0:0 - -AES 192 GCM Decrypt test vector #6 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_192_GCM:-1:"23c201968def551817f20e49b09dbb5aae0033305bef68a0":"bd2952d215aed5e915d863e7f7696b3e":"77bc8af42d1b64ee39012df5fc33c554af32bfef6d9182804dcfe370dfc4b9d059bdbc55f6ba4eacb8e3a491d96a65360d790864ba60acf1a605f6b28a6591513ea3cfd768ff47aee242a8e9bdfac399b452231bfd59d81c9b91f8dc589ad751d8f9fdad01dd00631f0cb51cb0248332f24194b577e5571ceb5c037a6d0bcfe8":"17d93c921009c6b0b3ecf243d08b701422983f2dcaec9c8d7604a2d5565ed96ce5cddcb183cd5882f8d61d3202c9015d207fed16a4c1195ba712428c727601135315fc504e80c253c3a2e4a5593fc6c4a206edce1fd7104e8a888385bbb396d3cdf1eb2b2aa4d0c9e45451e99550d9cfa05aafe6e7b5319c73c33fd6f98db3c5":"23f35fac583897519b94998084ad6d77666e13595109e874625bc6ccc6d0c7816a62d64b02e670fa664e3bb52c276b1bafbeb44e5f9cc3ae028daf1d787344482f31fce5d2800020732b381a8b11c6837f428204b7ed2f4c4810067f2d4da99987b66e6525fc6b9217a8f6933f1681b7cfa857e102f616a7c84adc2f676e3a8f":"bb9ba3a9ac7d63e67bd78d71dc3133b3":0:0 - -AES 256 GCM Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:0:-1 - -AES 256 GCM Encrypt and decrypt 1 byte -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:1:-1 - -AES 256 GCM Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:2:-1 - -AES 256 GCM Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:7:-1 - -AES 256 GCM Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:8:-1 - -AES 256 GCM Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:9:-1 - -AES 256 GCM Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:15:-1 - -AES 256 GCM Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:16:-1 - -AES 256 GCM Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:17:-1 - -AES 256 GCM Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:31:-1 - -AES 256 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:32:-1 - -AES 256 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:33:-1 - -AES 256 GCM Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:47:-1 - -AES 256 GCM Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:48:-1 - -AES 256 GCM Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_AES_256_GCM:"AES-256-GCM":256:49:-1 - -AES 256 GCM Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:0:0 - -AES 256 GCM Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:1:0 - -AES 256 GCM Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:0:1 - -AES 256 GCM Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:16:0 - -AES 256 GCM Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:0:16 - -AES 256 GCM Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:16:6 - -AES 256 GCM Encrypt and decrypt 22 bytes in multiple parts 2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:0:22 - -AES 256 GCM Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_AES_256_GCM:256:16:16 - -AES 128 GCM Decrypt test vector #0 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"2c186654406b2b92c9639a7189d4ab5ab0b9bb87c43005027f3fa832fd3507b1":"3a0324d63a70400490c92e7604a3ba97":"":"":"":"4c61cd2e28a13d78a4e87ea7374dd01a":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 128 GCM Decrypt test vector #1 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"c8ae011795c9a60ad7660a31fe354fa6f7e9c2724d7a126436291680cd95c007":"1bd9ea6186450f9cd253ccfed2812b1c":"":"":"":"35214bbc510430e3":0:0 - -AES 128 GCM Decrypt test vector #2 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"449d39f863e4909984b37f2e5c09ea4d4b3e9fac67bd57c299e4e1d1f084aaa3":"d8e9118f331bb5a359f0aa8882861b72":"":"":"4ddcae0bc24d622e12bdeaac73e8d1ab7957af051d27dfaafce53aeed4cdd3f989ea25989a2f41cfb3c38dbd841c5560b0b5ab1861b1fbcd236865d13da55b50219462e021f8a21848a64a85326031fcec8fe47a6ef4a435dd2b2fff637644ffcf3914ef2dfa5dd556421bfd297be150b31db039f0f2cc422b282e659e70cceb":"c595b9d99414891228c9fa5edb5fcce3":0:0 - -AES 128 GCM Decrypt test vector #3 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"1a1bb9122e762ecd7ff861a1d65e52607d98e7ae5bd1c3a944e443710f3b0599":"32f99ea4cbf52c2701c2252e5e6c863d":"":"":"91b7a70c3a06c1f7f2ea584acb5dd76177ba07323c94f2e8f7cbe93fc0bb7c389c3c88e16aa53174f0fc373bc778a6ccf91bf61b6e92c2969d3441eb17a0a835d30dcf882472a6d3cb036533b04d79f05ebfaadf221ae1c14af3f02fa41867acfdfa35f81e8a9d11d42b9a63288c759063c0c3040c3e6ee69cf7c75f9c33fea1":"a8e29e08623a3efdbbe8b111de30a4":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 128 GCM Decrypt test vector #4 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"f10965a66255f0c3515af497ccbb257a09f22ec2d57c5edae322a3e6d2d188ef":"c571ce0e911de5d883dc4a0787483235":"91598690edf2de8b27f9bc7461a84e80811cee544f0542923898328cf157590251f0342cb81d359b5dccc5391a12320d1444c26f24178977dd6705c2b365dc1ece0152c42e2f0ee3162cf886ef5529f4f16a77f3bdd2aeccd405b59addf098521d0d38cc25f1991e11be7ecf24caedb48a2a286d2e560a38fa9001c5a228c4d1":"2867996e389e09ec0da94d42e77b1e436b50065b09ca4adf1cd03240444ee699dbb7b3fc081a1869ca607d77d5ff9754fc3c997ff0a4ee17543a2ba77886b88a7128bcc51d3450df58ff3a26671b02c1d213df6adb6f7e853080eb46b504517cbaea162710a9bbc2da8b552eb6b0e0cb98e44fcab0a157312be67974678d143e":"":"6d9d3a5dbc8dce385f092fff14bfffda":0:0 - -AES 128 GCM Decrypt test vector #5 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"4103b1ddff87a508a219c808a04ad4750668688f4c2ee75b92d28d70b98a2c94":"5cea906737518c2cb901016e30206276":"a00a196193ff07006b7df524824bd0971d63f447a3a7bb1b75c1e2d11789482c115cff677b54948d36dc4de34200bce97be0101d88cee39b177857dd5da3cb0d2f9d6e1150f72a3bd655e0bace1d25a657ba9a7f8dff082b4460432075afb20173da22b49beeb6a030d72ba07869ff4389fc1c28d87018d7c1a9829c21932197":"":"":"3a3a771dd5f31c977e154ef5c73a":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -AES 128 GCM Decrypt test vector #6 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"df867d1dd8a287821a54479cab6f88636d2aca30e1bf01a5dffc735e17590356":"35019826c51dd1ef07ff915d9ac4ea96":"6517272cac85d7f38902bcb4b96a0c59c4bdc46bfefa6ebacd7f2fb1629b87ca91de2ffefc42ce3cfd34dcbf01b3f7cadcea3f99e6addf35d36c51f2ceb1f85c1f56a04ec9c9fff60cd7fc238674992183ea3de72ef778561b906202b7b83fe6562a0bca9c1e0a18638e8685b998b4192f5120435809ad6e93a0422d00725262":"723be39bc13adbc48c861b07753f64fac1ae28fc8933acba888b6538721df0a8b91c040a26522fe0dbb7335d8f63d209e89f7cde23afa9ca3c584b336d63a91e07fdd8808b14c3214c96a202e665bbaaa34248ff30348f3d79c9f16e66ad6c5903305acd887a89b6244eb7c2d96e18b13a686de935bf3821444ee20f48678be5":"0375ed93f287eefe414ab2968844bd10148860c528dbf571a77aa74f98cc669a7fc317adc9f7cf2d80dda29b19db635b30a044399f3665b6176ed669146d28f5ada03b3d32d53fe46575a8afcd37f20386d9e36f7e090b4fefadfab7f008e02f1b5022c0eeb81d03443a276eae48c038ed173631687d2450b913b02c97243edb":"e49beb083a9b008ae97a17e3825692f0":0:0 - -AES 128 GCM Decrypt test vector #7 -depends_on:MBEDTLS_AES_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_AES_256_GCM:-1:"886c77b80f5f3a21c01932685a540b23629f6d41d5574fc527227ed0bdf2e21b":"5ec506edb1890a5a63b464490450d419":"53a17d7b69f607f08676d6f6dd4e8db08e01333a8355d8c87616e84cdf10ef5b041fc6ddc3f6a245c0f534c2b167064af82f45e4702a5e8dede59579fdecf6713353392433950c9b97c38d9ee515ac97d0970ccf03981954540088567a30941bb2cca08cbed680500f8342faa7aebbc6c143e2ea57ba6b4ac1fd975dcc5d0871":"79ee27adfa9698a97d217c5010ec807806feda37db811e398c3b82abf698aece08561fffc6c601d2691738e279eeb57e5804e1405a9913830e3ba0d7b979213ef40d733a19497d4bb1b8b2c609a8f904e29771fa230c39a48ebb8c3376f07c8013fff6e34f10fe53988a6ec87a9296c0a7cfba769adefe599ec6671012965973":"05b8d820c9f439d7aeae5c7da0ee25fb0dad47cc3e6f3a47e8b984e856201546975f8214531fc3c2e504d2ac10fa49cb948596b9a8fab01b95c49d6f04d1589f93b77b899e803dd20e1f00a51c0b5953e85be639109b14b100e35ca26d84ea629964b0db8260dfa5a150a66261bf37e79de2ec49e9f1b082a7c58ecd3d39b6c9":"ffdf56e1c1a7252b88422787536484":0:0 - -CAMELLIA 128 GCM Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:0:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:1:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:2:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:7:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:8:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:9:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:15:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:16:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:17:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:31:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:32:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:33:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:47:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:48:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_128_GCM:"CAMELLIA-128-GCM":128:49:-1 - -CAMELLIA 128 GCM Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:0:0 - -CAMELLIA 128 GCM Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:1:0 - -CAMELLIA 128 GCM Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:0:1 - -CAMELLIA 128 GCM Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:16:0 - -CAMELLIA 128 GCM Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:0:16 - -CAMELLIA 128 GCM Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:16:6 - -CAMELLIA 128 GCM Encrypt and decrypt 22 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:0:22 - -CAMELLIA 128 GCM Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_128_GCM:128:16:16 - -CAMELLIA 128 GCM Decrypt test vector #1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_128_GCM:-1:"00000000000000000000000000000000":"000000000000000000000000":"":"":"":"f5574acc3148dfcb9015200631024df8":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 128 GCM Decrypt test vector #2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_128_GCM:-1:"00000000000000000000000000000000":"000000000000000000000000":"defe3e0b5c54c94b4f2a0f5a46f6210d":"00000000000000000000000000000000":"":"f672b94d192266c7c8c8dbb427cc989a":0:0 - -CAMELLIA 128 GCM Decrypt test vector #3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_128_GCM:-1:"feffe9928665731c6d6a8f9467308308":"cafebabefacedbaddecaf889":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f8260614bab815":"":"":"86e318012dd8329dc9dae6a170f61b24":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 128 GCM Decrypt test vector #4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_128_GCM:-1:"feffe9928665731c6d6a8f9467308308":"cafebabefacedbaddecaf888":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f82606":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"9f458869431576ea6a095456ec6b8101":0:0 - -CAMELLIA 128 GCM Decrypt test vector #5 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_128_GCM:-1:"feffe9928665731c6d6a8f9467308308":"cafebabefacedbad":"28fd7434d5cd424a5353818fc21a982460d20cf632eb1e6c4fbfca17d5abcf6a52111086162fe9570e7774c7a912aca3dfa10067ddaad40688645bdd":"":"feedfadedeadbeeffeedfacedeadbeefabaddad2":"e86f8f2e730c49d536f00fb5225d28b1":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 192 GCM Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:0:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:1:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:2:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:7:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:8:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:9:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:15:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:16:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:17:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:31:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:32:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:33:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:47:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:48:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_192_GCM:"CAMELLIA-192-GCM":192:49:-1 - -CAMELLIA 192 GCM Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:0:0 - -CAMELLIA 192 GCM Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:1:0 - -CAMELLIA 192 GCM Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:0:1 - -CAMELLIA 192 GCM Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:16:0 - -CAMELLIA 192 GCM Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:0:16 - -CAMELLIA 192 GCM Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:16:6 - -CAMELLIA 192 GCM Encrypt and decrypt 22 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:0:22 - -CAMELLIA 192 GCM Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_192_GCM:192:16:16 - -CAMELLIA 192 GCM Decrypt test vector #1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_192_GCM:-1:"000000000000000000000000000000000000000000000000":"000000000000000000000000":"":"":"":"ba9ae89fddce4b51131e17c4d65ce587":0:0 - -CAMELLIA 192 GCM Decrypt test vector #2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_192_GCM:-1:"000000000000000000000000000000000000000000000000":"000000000000000000000000":"8f9c0aa2549714c88bb2665e8af86d42":"":"":"783cff5c5aca7197320658a74279ab37":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 192 GCM Decrypt test vector #3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_192_GCM:-1:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"cafebabefacedbaddecaf888":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6a60bb2e9":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":"":"8d645a0b0e48d3c3b60a014157cb49b4":0:0 - -CAMELLIA 192 GCM Decrypt test vector #4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_192_GCM:-1:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"cafebabefacedbaddecaf888":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6":"":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"11b15bb5ab6fac0c422014e91eacbf2b":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 192 GCM Decrypt test vector #5 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_192_GCM:-1:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"cafebabefacedbad":"678b3dcb270faa206dc5f6fbb5014996e86d6f3e35cdcdfeb03b37b9b06ff4ff2682248823bd3c84124dc76af7bde3dd440c228b5efbc795dd80dfb6":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"f876143d933214a5035ff0bb96ff650b":0:0 - -CAMELLIA 256 GCM Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:0:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 1 byte -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:1:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:2:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:7:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:8:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:9:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:15:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:16:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 17 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:17:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:31:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:32:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:33:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:47:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:48:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf:MBEDTLS_CIPHER_CAMELLIA_256_GCM:"CAMELLIA-256-GCM":256:49:-1 - -CAMELLIA 256 GCM Encrypt and decrypt 0 bytes in multiple parts -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:0:0 - -CAMELLIA 256 GCM Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:1:0 - -CAMELLIA 256 GCM Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:0:1 - -CAMELLIA 256 GCM Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:16:0 - -CAMELLIA 256 GCM Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:0:16 - -CAMELLIA 256 GCM Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:16:6 - -CAMELLIA 256 GCM Encrypt and decrypt 22 bytes in multiple parts 2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:0:22 - -CAMELLIA 256 GCM Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -enc_dec_buf_multipart:MBEDTLS_CIPHER_CAMELLIA_256_GCM:256:16:16 - -CAMELLIA 256 GCM Decrypt test vector #1 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_256_GCM:-1:"0000000000000000000000000000000000000000000000000000000000000001":"000000000000000000000000":"":"":"":"9cdb269b5d293bc5db9c55b057d9b591":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 256 GCM Decrypt test vector #2 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_256_GCM:-1:"0000000000000000000000000000000000000000000000000000000000000000":"000000000000000000000000":"3d4b2cde666761ba5dfb305178e667fb":"00000000000000000000000000000000":"":"284b63bb143c40ce100fb4dea6bb617b":0:0 - -CAMELLIA 256 GCM Decrypt test vector #3 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_256_GCM:-1:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"cafebabefacedbaddecaf888":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4949d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b776549e092":"":"":"c912686270a2b9966415fca3be75c468":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED - -CAMELLIA 256 GCM Decrypt test vector #4 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_256_GCM:-1:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"cafebabefacedbaddecaf888":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b77":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"4e4b178d8fe26fdc95e2e7246dd94bec":0:0 - -CAMELLIA 256 GCM Decrypt test vector #5 -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_GCM_C -decrypt_test_vec:MBEDTLS_CIPHER_CAMELLIA_256_GCM:-1:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"cafebabefacedbad":"6ca95fbb7d16577a9ef2fded94dc85b5d40c629f6bef2c649888e3cbb0ededc7810c04b12c2983bbbbc482e16e45c9215ae12c15c55f2f4809d06652":"":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"e6472b8ebd331bfcc7c0fa63ce094462":0:MBEDTLS_ERR_CIPHER_AUTH_FAILED diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.null.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.null.data deleted file mode 100644 index c65e970a7d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.null.data +++ /dev/null @@ -1,95 +0,0 @@ -NULL Encrypt and decrypt 0 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:0:-1 - -NULL Encrypt and decrypt 1 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:1:-1 - -NULL Encrypt and decrypt 2 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:2:-1 - -NULL Encrypt and decrypt 7 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:7:-1 - -NULL Encrypt and decrypt 8 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:8:-1 - -NULL Encrypt and decrypt 9 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:9:-1 - -NULL Encrypt and decrypt 15 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:15:-1 - -NULL Encrypt and decrypt 16 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:16:-1 - -NULL Encrypt and decrypt 31 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:31:-1 - -NULL Encrypt and decrypt 32 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:32:-1 - -NULL Encrypt and decrypt 33 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:33:-1 - -NULL Encrypt and decrypt 47 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:47:-1 - -NULL Encrypt and decrypt 48 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:48:-1 - -NULL Encrypt and decrypt 49 bytes -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:49:-1 - -NULL Encrypt and decrypt 1 bytes in multiple parts 1 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:1:0: - -NULL Encrypt and decrypt 1 bytes in multiple parts 2 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:0:1: - -NULL Encrypt and decrypt 16 bytes in multiple parts 1 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:16:0: - -NULL Encrypt and decrypt 16 bytes in multiple parts 2 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:0:16: - -NULL Encrypt and decrypt 16 bytes in multiple parts 3 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:1:15: - -NULL Encrypt and decrypt 16 bytes in multiple parts 4 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:15:1: - -NULL Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:15:7: - -NULL Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:16:6: - -NULL Encrypt and decrypt 22 bytes in multiple parts 1 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:17:6: - -NULL Encrypt and decrypt 32 bytes in multiple parts 1 -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -enc_dec_buf_multipart:MBEDTLS_CIPHER_NULL:0:16:16: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.padding.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.padding.data deleted file mode 100644 index d6fc266721..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_cipher.padding.data +++ /dev/null @@ -1,234 +0,0 @@ -Cipher list -mbedtls_cipher_list: - -Cipher null/uninitialised arguments -cipher_null_args: - -Set padding with AES-CBC -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -set_padding:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_PKCS7:0 - -Set padding with AES-CFB -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB -set_padding:MBEDTLS_CIPHER_AES_128_CFB128:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set padding with AES-CTR -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR -set_padding:MBEDTLS_CIPHER_AES_128_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set padding with CAMELLIA-CBC -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_PKCS7:0 - -Set padding with CAMELLIA-CFB -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB -set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set padding with CAMELLIA-CTR -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR -set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set padding with DES-CBC -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -set_padding:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_PKCS7:0 - -Set padding with BLOWFISH-CBC -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -set_padding:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_PKCS7:0 - -Set padding with BLOWFISH-CFB -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB -set_padding:MBEDTLS_CIPHER_BLOWFISH_CFB64:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set padding with BLOWFISH-CTR -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR -set_padding:MBEDTLS_CIPHER_BLOWFISH_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set padding with NULL -depends_on:MBEDTLS_CIPHER_NULL_CIPHER -set_padding:MBEDTLS_CIPHER_NULL:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA - -Set non-existent padding with AES-CBC -depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC -set_padding:MBEDTLS_CIPHER_AES_128_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE - -Set non-existent padding with CAMELLIA-CBC -depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC -set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE - -Set non-existent padding with DES-CBC -depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC -set_padding:MBEDTLS_CIPHER_DES_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE - -Set non-existent padding with BLOWFISH-CBC -depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC -set_padding:MBEDTLS_CIPHER_BLOWFISH_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE - -Check PKCS padding #1 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0004040404":0:4 - -Check PKCS padding #2 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0001":0:4 - -Check PKCS padding #3 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD000101":0:5 - -Check PKCS padding #4 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"030303":0:0 - -Check PKCS padding #5 (null padding) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #6 (too few padding bytes) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0002":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #1) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030203":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #2) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030103":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #3) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030703":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #4) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030b03":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #5) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00031303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #6) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00032303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #7) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00034203":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #8) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00038303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #9) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00020303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #10) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00010303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #11) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00070303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #12) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD000b0303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #13) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00130303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #14) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00230303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #15) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00420303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #7 (non-uniform padding bytes #16) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00830303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check PKCS padding #8 (overlong) -depends_on:MBEDTLS_CIPHER_PADDING_PKCS7 -check_padding:MBEDTLS_PADDING_PKCS7:"040404":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check one and zeros padding #1 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD0080":0:4 - -Check one and zeros padding #2 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD008000":0:4 - -Check one and zeros padding #3 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD00800000":0:4 - -Check one and zeros padding #4 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD00808000":0:5 - -Check one and zeros padding #5 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"800000":0:0 - -Check one and zeros padding #6 (missing one) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD0000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4 - -Check one and zeros padding #7 (overlong) -depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"0000000000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4 - -Check zeros and len padding #1 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD0001":0:4 - -Check zeros and len padding #2 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000002":0:4 - -Check zeros and len padding #3 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000003":0:3 - -Check zeros and len padding #4 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"000003":0:0 - -Check zeros and len padding #5 (overlong) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"000004":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check zeros and len padding #6 (not enough zeros) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000004":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0 - -Check zeros padding #1 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS -check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD00":0:3 - -Check zeros padding #2 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS -check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD0000":0:3 - -Check zeros padding #3 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS -check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD":0:3 - -Check zeros padding #4 (correct) -depends_on:MBEDTLS_CIPHER_PADDING_ZEROS -check_padding:MBEDTLS_PADDING_ZEROS:"000000":0:0 - -Check no padding #1 (correct by definition) -check_padding:MBEDTLS_PADDING_NONE:"DABBAD00":0:4 - -Check no padding #2 (correct by definition) -check_padding:MBEDTLS_PADDING_NONE:"DABBAD0001":0:5 - -Check no padding #3 (correct by definition) -check_padding:MBEDTLS_PADDING_NONE:"":0:0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.data deleted file mode 100644 index 5c69d20cba..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.data +++ /dev/null @@ -1,732 +0,0 @@ -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #0 -ctr_drbg_validate_pr:"d254fcff021e69d229c9cfad85fa486c":"c18081a65d44021619b3f180b1c920026a546f0c7081498b6ea662526d51b1cb583bfad5375ffbc9ff46d219c7223e95459d82e1e7229f633169d26b57474fa337c9981c0bfb91314d55b9e91c5a5ee49392cfc52312d5562c4a6effdc10d068":"":"":"34011656b429008f3563ecb5f2590723" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #1 -ctr_drbg_validate_pr:"7be87545266dadd1d73546c0927afc8d":"a7f38c750bd6ff41c4e79f5b7dd3024d58ca3f1f4c096486c4a73c4f74a2410c4c9c5143eb8c09df842ba4427f385bbf65c350b0bf2c87242c7a23c8c2e0e419e44e500c250f6bc0dc25ec0ce929c4ad5ffb7a87950c618f8cee1af4831b4b8e":"":"":"d5b1da77f36ce58510b75dfde71dbd5d" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #2 -ctr_drbg_validate_pr:"3771416b162f4d9c5f48a05b7aa73938":"d20a0e5cdb714f01b48e00bae51909f345af05de13217e5d55fc6c2d705aea550420d9a458594d825b71e16b36130020cf5948fe813462061c1a222d1ff0e1e4b3d21ae8eee31d3260330d668d24ef3c8941b8720e8591b7deec4bd35a3a1f1a":"":"":"3cbd7d53ac1772c959311419adad836e" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #3 -ctr_drbg_validate_pr:"f2bad8f7dab3f5886faa1cf6e1f52c87":"4df54a483b4510ed76049faae14b962fbb16459d1f6b4f4dbeca85deded6018361223c893f9442719c51eb5695e1304a1c2be8c05d0846b6510a9525a28831a8efcbd82aa50540d7e7864e2b8a42d44380cdc6e02eebb48d0b5a840b7cdd6e04":"":"":"0062d822bc549bea292c37846340789b" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #4 -ctr_drbg_validate_pr:"1c5760aa0fd4ce308735b28682b67246":"89defd4445061c080e4762afac194b9f79c4bb1ed88c961af41d9d37bd388a1d45c82ca46f404348a2ae5e22ce00aa35ebc7c5051d8800890d44d25284489efcbd1f5e2b16e403f6921f71bbdfcf7b9aeddef65bc92fbd1cb9e4ea389aee5179":"":"":"3baf81155548afca67d57c503d00a5b4" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #5 -ctr_drbg_validate_pr:"b72b9451a5e866e226978623d36b3491":"2713d74affed98e3433559e17d240288bb1a1790904cd7754cad97007e205a157b8ddca704a3624413f2ec8361ccd85442fb0b7cc60a247f0fd102cef44677321514ea4186d0203ab7387925d0222800ce2078c4588bc50cdfccbc04fbecd593":"":"":"047a50890c282e26bfede4c0904f5369" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #6 -ctr_drbg_validate_pr:"91b955a3e7eccd7f07290cba4464baff":"b160465448894c7d5ee1963bb3e1a2f3f75fcd167ffa332c41c4c91c1830b7c07413bd580302958aa6fa81588ad2b3173698a4afafda468acb368dbbd524207196b9a3be37ac21ba7a072b4c8223492ee18b48551524d5c3449c5c8d3517212e":"":"":"af2c062fedb98ee599ae1f47fc202071" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #7 -ctr_drbg_validate_pr:"d08114670c4f6016a4cf9d2da3e3a674":"38dfbfb52c185acf74de00b5a50f0cd9688286747ab340cfe9ad30d38b390fd2443bfd7ea93941d8262ae0f66b0eab4ff64ba59a2ff940c3c26fda103e0d798dbcaa1318e842143975673af8408b5af48dfbaa56ca4f9ddc87100028b4a95549":"":"":"55030fef65c679ecaffb0dc070bfd4d2" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #8 -ctr_drbg_validate_pr:"e2af9abe8770e33798a5f05b22057d24":"88fb2a8020e604ea64a620f4704078857062cc97e24604c30de4c70cbf5e5bea0f0db79d16f4db636a2d6cd992c5890389a40cfe93967eac609e5b9f66788944285758547c7136ef2ee3b38724ed340d61763d0d5991ece4924bb72483b96945":"":"":"a44f0cfa383916811fffb2e0cfc9bfc3" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #9 -ctr_drbg_validate_pr:"ae30f1642753c5cb6e118d7ff5d59f1d":"340def3420b608420d81b4ea8252a3d86d3e1dd7597e6063ed923a73a7b8e981e6079f7f0c42deb9f4ef11d2f3581abadf44b06d882afdc47896777ce8dafd85ec040f7873d0e25c4be709c614a28b708e547266ac8f07f5fdb450d63bc0c999":"":"":"c7e7670145573581842bd1f3e0c6e90b" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #10 -ctr_drbg_validate_pr:"711ecfe467d6f83bcc82e566729669af":"21d6c822706d1af09e4d233c0ebac7f4ec60c7be2500dd41a85a19b2dc5c7da27f8a82164bd2a644218cb5ac283c547da1064784413eed5ecf32fadd00357abaae81225ac8d0391ead533362cff56798825445d639b0b45e0312aa7047c00b4d":"":"":"d3a0d2c457f5e9d1328a9e1d22b6eaf6" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #11 -ctr_drbg_validate_pr:"f9b22152bc0eff1ebf0bfafeea40aecf":"4ee32f0aeadb3936e17f1aa3b18c10f773def5f83500c2ba96f84408a2521c1258f6be9aa5cee528746629aa2b8118ac41dd98ef1b3de31d26b8c2ad3442081203f5ef21df409df3381fbf2e064fbaec64d731dc93b3218e34bb3b03bfd88373":"":"":"86009b14c4906a409abe6ca9b0718cbe" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #12 -ctr_drbg_validate_pr:"5174e76e904ff1471367ccace9c66ed9":"fa81535670275e8ab74121377cf88a4742dd0d7a99cf06eb9c2b4fe2b03423dbe441201144c22a9fc0ca49f5ef614987a2271cc1089d10ee01b25163c090a1f263797e4f130920cdc3b890a078e8abbb070ded2e8fd717f4389f06ff2c10d180":"":"":"18d6fcd35457d2678175df36df5e215d" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #13 -ctr_drbg_validate_pr:"73c372f60519e8eca371eaa13fb54f88":"930c290a797b85d58b52d0d92356436977b2f636f07d5a80c987fb7eea6b750cceb9eb87860547ab4029865a6810fc5c3663c4e369f290994461d2e9c7160a8b5985853bd9088b3e969f988fe6923b3994040eeee09ad353b969d58938237cfe":"":"":"f62c7cfbe74555744790bcc7930e03c3" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,0) #14 -ctr_drbg_validate_pr:"75ba8ddeef24f9f5b00b426a362c4f02":"7065d128ddb2fc6ea31f4110b6c0934ed112c51d74a4a0741a0843d8befac22902a01353322674c3d58935144a0f8f171a99dbeab71272ff7518c46cc7ebb573adbf95bff8ec68eeba5e8ec1221655aed8420086bda89c7de34f217dce73ccab":"":"":"700761857ea2763e8739b8f6f6481d1c" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #0 -ctr_drbg_validate_pr:"14051b57277bc3d3bbae51bdecfb9f5d":"82c80d922c47bbec0f664dd623e22a11a3b84d308351e45e30ee286e89547d22c43e17b3ca0fa08f77eef1001ba696932e9ee890e7aac4661c138e5b5ce36773d3120c35f8c94e0a78ffbf407a63ca435392e17c07461522fdc1f63f037aacff":"b70e7c1c4b8e0f1770e05b29a93f9d7a6540f23ab84136b05b161d85e5f19251":"5a737c128bd69f927f8f3ad68f93f6356d5f4ec0e36b6b50ced43dcd5c44dbc2":"a4e6c754194a09614994b36ecce33b55" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #1 -ctr_drbg_validate_pr:"4526b268128ea35f8558b4e1d08388f2":"952f3f179cbbda27ebd30f4fc31bf96baccb2adbaa9c090bc0f37044a44e85b3bc668cd3533faaf56b5da9242844d65733f7ac1f55c38b175749b88e18d19672b7bdab54e0ababdd4519fb07e0c25578f64ad40d0beb0a26275d5e2f4906aa70":"6b167c7cebea2e585ab974b60c4d305a113102ca8c3dc87651665728c4c675ad":"a038f1ca1f420eae449791f13be4901bfb91e41e052e02635b1f1817bd8969b1":"745ec376282e20fd1f9151f7040ed94a" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #2 -ctr_drbg_validate_pr:"c1aafa90f394e0ba9a528032dc6780d3":"75fd042bfd994de2c92e5aa505945ec93bd7cf366d86a356723fca3c9479ee17fb59c6ca8ba89784d43f06cdad113e5081e02427ee0714439d88dc1a6257fc91d99c1a15e92527847ab10883cc8f471cad8cf0882f5b6d33a846a00dee154012":"c704164ce80a400cb2f54d1b2d7efa20f32b699fa881bfc7b56cfd7c4bee1ea6":"f3baff4b6f42c8e75b70c2a72a027b14a99ae49a5a47c7af0f538843c94e1a69":"7af9113cd607cdb4c6534f401fe4e96c" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #3 -ctr_drbg_validate_pr:"e6e726b72e7b264a36ec0cd60d4578b5":"0c3c6dd706076d6484478347559b495d7ee898c39cde06027bc99f7bf69ce1140ca04602265e1308af6dd6446a1cf151749b22a99e8a05d30cc3ccd00e663bc1bc37e08ee62834fcc52a4bc8c1d6442544187484f81dc729417d5bedfcab5a54":"d84b978483c0bd8f8c231d92ea88ac21e6e667215804b15725a7ed32f7fc5dd7":"9a8971f6c559f7f197c73a94a92f957d1919ad305f4167c56fe729d50e5754a5":"e16ee5bceca30f1fbcadb5de2d7cfc42" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #4 -ctr_drbg_validate_pr:"0272d86db283244eb7ee0ed8c8054b89":"a08ce39f2f671e1f934821a8db9070f39a734a7a20e70307fccca17db15bb4e8a421600df11d1a6e7806a14826739322c8043649ea707180f1d00dea752c2c36398030519465864c4d38163f5b0dd5be07dbc0ae29693ad4a67ca69f28414634":"aa97055cf46ba26465dfb3ef1cf93191625c352768b2d8e34459499a27502e50":"dddd0007eb29fdf942220e920ca0637db4b91cbf898efd2696576ff6bfacb9d1":"9db0057e39ca6e0f16e79b4f8a0ed5c7" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #5 -ctr_drbg_validate_pr:"4ad8f72a0d0e28a758722b20e3017d7e":"89af36a1c53f730c1b818b26aa510627b17e6f9da51c8e53930de883b7cc7a3e8c3c463c910646ac3ff08f05bca8e340daf9a322d133ae453fdf7e6860a27ff4495c89875431ba9de3e4f3247cda8c62acc86f7066448f639d8ba8b5249337f8":"9d060b7ed63bdb59263c75ebe6a54bf3a4ac9c9926ca8fb49caa905a2651eead":"016099232dc44bb7cdb492f4955ab1aabc5dc0b5731447cea2eb1d92e41482d1":"4b658e95adae4bf0c418fded4431c27f" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #6 -ctr_drbg_validate_pr:"aa19b944c2e1b9d27933bc87322bdf14":"dc8c60dd42c85fed86cb32af035bbde5737526eb07991397c853256f2f0cb311bce70e1c5e32fc3510402d7d7e3de36fa5e584234daf391bc53cc651e001ab7fcf760679b3c82057f9d09bfdcab8e158d4daa63b20c0e1102f7a06bf5a2788dd":"6b98fec5f7de8098ff9df80f62473c73831edace832a767abf5965ea8bf789ba":"cc998bd5752f9c96ec35d9658cc8b3833dd6ab80c7accd6777c06c2cf7c01e59":"fc58833e0e27f7705e4937dd2aadb238" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #7 -ctr_drbg_validate_pr:"10c8c17a25041e2ef0d3cc80671e4cfe":"513fb96b6164ece801e52855aad28cb80131e7872d8432d27a974fb62d8d0100bb7ebcb8f5c066e230377a8847d6798c3d8090469b9719a80ac956ac33186b00eb8ca64c5530421f93932bc7c98ee92651e85dab562483bdb189676802726647":"240f36a0a598fe2116ffa682824f25acc35132f137f5221bc0ff05b501f5fd97":"22a5eb5aa00309a762ab60a8c2647eebe1083f8905104b5d375ed1661b4c8478":"145a16109ec39b0615a9916d07f0854e" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #8 -ctr_drbg_validate_pr:"cea0c3c12be683c0f27693650a6a3d7d":"df8bc70e45fe14abb02c1b9a9754c37497fc2f67709edd854196fc4d074b12797ce7cb292f14cb1d6904abf32bf229299db5ccf5a791a3b8cd3e40a64f38f6b57df759a863e09d7676d2f3ff2762cdab221151000dba32a67f38cab93d5b7a55":"bf2ac545d94e318066ff88f39791a8385e1a8539e99ac4fa5a6b97a4caead9d4":"846efef8672d256c63aa05a61de86a1bbc6950de8bfb9808d1c1066aef7f7d70":"8d8f0389d41adcac8ca7b61fc02409c3" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #9 -ctr_drbg_validate_pr:"1b782af2545352631983dc89945ffc37":"51930fb7095edef3fc20aca2a24127f03d3c4b983329e013ad8a35016f581dd7b2d11bafbf971c1fdefd95a0024195e6e90a60ec39b1a8dbe0cb0c3aabf9cf56b662efc722b2dffa6c3be651f199cbc3da2315b4d55aeafd1492283889e1c34f":"1b6295986f6fb55dc4c4c19a3dba41066fdc0297d50fb14e9501ba4378d662ed":"6e66ff63fc457014550b85210a18f00beab765f9e12aa16818f29d1449620d28":"78dfcb662736a831efaa592153a9aff9" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #10 -ctr_drbg_validate_pr:"6580f6df5c8de7c4a105c11ed44435c2":"d37403db6f84a7ba162e1cc351fe2e44d674ae8606280c9dac3e3975f30cbe1c9925e502a9804b91aada5cc97b259b90ccb5b8103394d9a28f0709fc9b5ffe9d73ad3672e02064ea68cebe3face5d823ee605c46c173db591135f564558dab4c":"97486a5e6ce6c6cf9d3f9a313d346cbc34b2bd54db80c5f8d74d6f6939f89519":"8377fcb52556f9974f1aa325d6e141d7b81355bd160abbc86e0007571b3c1904":"77031d3474303470dca9336b1692c504" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #11 -ctr_drbg_validate_pr:"f5303f148d6d6faca90aa88b07ab2ba9":"a0de51b8efa44b8245dba31d78f7840b2b7abced4e265b4cd9628eabc6ebbccb0f118dd8cc958b36dc959e22c4a03dafa212eeedec7d25ee6c5961187bee83b1ed3a75c7bdd9d0713b16cc67e68231f4cb274c8f3dfcc7e5d288c426a0d43b8f":"8d1fddc11dbad007e9b14679a5599e5e8a836197f14d010f3329d164c02d46d6":"9ceb6570568455d42a7397f8ca8b8af7a961a33a73770544cca563c04bc919ca":"9882f0bd1f6129a78b51d108e752b2d9" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #12 -ctr_drbg_validate_pr:"5a799c58985aa2898cc8fe8e5bc4a9f8":"dbdbef9d217e9051025c321b628c1cc823d508ffdd13fc4edbe8677658a57ef5b64395a6b7d62c0e93dc0956ee0217ec48ae054f1d4680023cc1b2af666efa9e1458cf6b0dae72eef2392e93687bd1fb5f366bb2cdd12937ad09724e39db4189":"8c179b35739e75719e74f7c3e038bc06eb3e212d6ade85275cfebf12b2dce2a2":"af617f2e228adde3edaf52a7e5979476dbb9cd2956a1737d93a16563bbbb4888":"49a04f3b4ef052747c7f4e77c91603e8" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #13 -ctr_drbg_validate_pr:"8f5b51983a8156a529f559ac3afebbf0":"bf22b182d39622e941017285adbdfe446c3d1a72601d0e5a15674f3b1b260170b1b2ab6b588a0267d86776a5d4ce80e132d7135a581af75ea6de65153680e28ce35ce78d0917b4932000d62260149e5a3ae72bc250548390b664f53c697dac45":"4cbb5b2d6e666d5dd3dd99b951ea435cae5a75d2e1eb41a48c775829b860e98b":"a4b4171c2592516404434932ad0a8ee67bd776a03479b507c406405b3d8962bc":"cab49631733f06e3fb3e0898e5ad22e7" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,0,256) #14 -ctr_drbg_validate_pr:"9f305a77cbaec1ab408cfc0eb89c6cbb":"1e50fada1e76a0d243e6f64c36a173ddc1f47a1dab834f5cd492568792958d5be22cce3110c8e8958b47f07b5c63f86b254942361d4d553e47d36103f47cd7f0bbee27d2e238b1d85671afe8284ee1fd2a431a5f69b2df73e95341c3a2e4fe4b":"c254f3b40e773eb09053b226820f68cafa3458ad403ad36f715245a854752a93":"699e177b7be3353c45ce7b7a0d573b00087d700a9f2c1cd2e370e05d4ddadc86":"bb6b02b25a496f29245315f58a16febc" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #0 -ctr_drbg_validate_pr:"e09f65dcffc0d3a4d84bacc41617a4e46ce5184eca011049ab657566f728e4aa28315ffac166ebe50e1269b01c95b3a2":"545a783ae97d827ed0b81d9752ad0f7e965f511b1f5dae0f872e9ec37cfe63af86c1d15e153887989b605773b16ad5505e65f617cfa8ef46547c4c3f9d0c4fd0b6e1cff5ca0f1929266fe43ba8f45ad664cfe5e90903a9cb722b42ae8989c148":"":"":"1e77d7cc18775fef9a3d3e00903da01b" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #1 -ctr_drbg_validate_pr:"056cd44c8847d89da05fbef95e9660d589046b0c02f9b42c17fd8b069f831c73cd896005ec080113589b6f07be6e42ea":"dde6c0850fe642602eb222ca7371213c598cef8c3e71e0593ea8edb54e1bed130b9b0aebe0893093b950c52f56eb9b338aa4bd01dae030515726ece1bf751660b4a3602da6400e4b94edebba646b5c3d4e64ceea1c4f14b7a19f0142783247df":"":"":"a790ab939e63555d02ea1e9696051725" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #2 -ctr_drbg_validate_pr:"73c72c7dfe138ef4b9817d41b9722b3940762b59bda26b3f6bb8b30583e01d088a29726b71d36ffeebdb387010cb1bb6":"6fe09520e26f5abece0fceadc54913c650a9f55725af45a9a5f373d09b9970b8706b9041d0189a204f6a4eb527dfa86584a3bee3265b809c3932ae5e7228194a3cf7592fc9301c833b45a53be32b9caec9f0f91ba86519f12b0b235f68419c1e":"":"":"798d997f46ff7cc4206994085340325e" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #3 -ctr_drbg_validate_pr:"cdba7c7033c34852b7bc1a6b33edab36f41d563bd0395d1001c02ffc0c42ec8595ed2b5ddabc923372e3b6bb457833fa":"532960c23c8c8b2146576dde52fadc985134914abf42ca1c5f47206937fda41289ae5d9f935dc4ce45f77cad230a4f345599e3bae4071188324483a0b93593c96d8b6ac6c0d8b52f8795c44171f0d8cd0b1e85dc75ce8abe65d5f25460166ba0":"":"":"9d48160aca60f1a82baaa8a7d804a3d8" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #4 -ctr_drbg_validate_pr:"02cef01aca992f60aa12db4b2c441689e4972a6f9deaf3663082afed642c1502b67b42d490af1c52c7e6eaf459882eca":"9216c9a833f81953792260a688eb7c3dfc85565ae6a6033203741a763db056247808e0ecd5ba1fc4549c3a757eba535adc786e810ddaae9a2714d31f5154f2c3ee81108669f1239f4f4efd6e18aabfa2d88f0ac25f4740108f6cfebffeb2d857":"":"":"d6378bcf43be1ad42da83780c1dab314" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #5 -ctr_drbg_validate_pr:"d7d80084e9d1fbb9315c3bce1510dbf22cf11fa54177d913a3b04b64cb30957395bd6f3d7e3d866d1be41b29db9ed81d":"80d4741e4e646748bb65e1289f1f9b3c21bffec4d0a666b301f199d76b4a83464583057079b069946b03d6ac81ebf9e6fa8d4081120f18bf58286a0c4de7576f36f3c7c353126f481a065ac28bdf28e13cd0c1e7911db6343c47d613f1750dc6":"":"":"9165a92ed92248b2d237d9f46d39bde8" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #6 -ctr_drbg_validate_pr:"df5a68d3bede467fd69716f5f8fbac297594b8573921afb864ba76aaa6dd89e83b89e359a5a0dd1aac9b4acb9573d218":"52df6336f93781115c2a77bd8f99cb717871fe14707947a21f6093dd9205bc378acf61329f8831369b4b1af0a9edfb25d74f5863f26859ad9c920767b113c47ed2690053bf9a2f7c7a67a8d680e08865720b9e9f7b6ae697e3c93e66f24b6ddc":"":"":"c542cf248a163bbceee7b9f1453bd90b" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #7 -ctr_drbg_validate_pr:"2945527372ff71edfa5776f55f7e4a247544aa6de974e81b2eba5552843ab6dfa248695f4f3225a43d4bf3672c3a6b2e":"aa560af2132cbd0624a69c7a7e733cd59a4f2d4e61d2b830087bd88f30fa792c7e4d3168fa86a10f7619d5b9dcf4f7bb08b350ba6a6bfc0fdfb7ee7aca07260c9a11abe49963c36efaefa94d2978ed09472bf93cc873d0f24c000762bb1402cd":"":"":"33af0134eeca279dce5e69c2cda3f3f4" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #8 -ctr_drbg_validate_pr:"b30cb767125674f6099a5cf7cb2e4f5b6c1cd1e32ffc1e393b1c5698b52b37f971f12521a7c1ffaaf3233d5391bc4c86":"2d42b00248d95d9378a2aece40d636bc1ab22edaaa64daa34335195a9efa4c1b58f13ac184ca2be52e15c3a977abde2aa505243fc106c4ea6f0671fe0f209b106ea8965645af73d8ebb8a80251db2967149c701cfe1d157cc189b03bf1bff1ac":"":"":"1e10eff9ceebc7e5f66e5213cb07fca4" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #9 -ctr_drbg_validate_pr:"c962a2da4524f08adcdd5ceddc04e669ad6154aee06164645e80c832506b98f9919451c7ec1d3a6a9704f83def8f6e2d":"a1ff68a85e437475b1b518821dbaac1730071a4ddd3255361778194fb0cfe3293e38df81527d8b8da15d03acb26467b6b53d7952441b79f95b633f4a979d998fd0417b9193023288b657d30c0cb2dada264addf9d13f1f8ed10b74e2dd2b56b3":"":"":"58990069b72b7557c234d5caf4334853" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #10 -ctr_drbg_validate_pr:"a3cc1fe561d03a055e8eedaa0e713be490c4bd4c6839a5b98c2ac0139bf215bdc46783d2a3e6b9d15d9b7a8bfe15104b":"207267911c12125cb3012230e4fafd257777ccbfb91653f77e4c1287574f9b79d81af7fb304790349dd457983cc99b48d5f4677ccd979fcc6e545cbf5b5c8b98102c9a89ae354349dbdee31a362d47c7cdae128034c0f4c3e71e298fe1af33c6":"":"":"ffd1d259acd79111a6fb508181272831" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #11 -ctr_drbg_validate_pr:"ecf186071b81e0ed384d4ebfb5bf261b4054e2e6072b51d21dfb6817adc51ff1c8956ff3612767538cdc8d73fade78b3":"3b9aec9f8bf8495004c5e4e731e5c347988e787caf003f001e68584e3510a6abdedffa15895702c2d57c304300f4f0af80a89bcc36b3cea2f08a0740236b80cfd2ea6e5cfe4144bc4ae09270fb6bc58c313dbaaedc16d643fc0565171f963222":"":"":"a2d917f5ec39a090b55d51713006e49d" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #12 -ctr_drbg_validate_pr:"3fcedba86089709aa638d00713150df781d4a93e85f155338e90ff537bcbf017f37a2d62259f5d8cc40ddfb041592539":"6b1e9d45c2ec598de7527b6414a339f26192fc4e3f5eff4b3a3e2a80ee0f2e9743031804d1be12b3c7ff6fbc222db1d97226890addeef0e1579a860e2279292c2f769416b7068f582f6ffc192ae4c4f1eeb41d5f77f0a612b059c47aef8e3d8e":"":"":"aa414799c51957de97c0070fb00eb919" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #13 -ctr_drbg_validate_pr:"f4c45fb8f58b7ebf73a0cd81c6a26686977558d4b8bf1cedfc6bd3754de6aaed5008fd72208437c54d8feb9a16ce3224":"6d170cf472ea07da6146a7087ed15d3f5b6ad72b8c99e46bae3b89e49a6e63467199ee16096516c2362dbd181bf5343a29fd0932d72eeb019fc3bfea3a3b01ffc2b985e341cfb6479d9dc71e2197b5cffc402587182e5fe93b5a8cf75eac2e42":"":"":"f557f627688fe63c119cf0f25274aa74" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,0) #14 -ctr_drbg_validate_pr:"7120742a7807b66c5a9b50995d5494a5b9451bb795393c0d8a30ae665879269408f8297d49ab87410a7f16a65a54b1cb":"c08a6f9797ea668cd14ba6338cb5d23c0921e637e66a96259f78e33e45aafd035edb44394cb459453b9b48beac1e32d3b6f281473cda42fb6fd6c6b9858e7a4143d81bfc2faf4ef4b632c473be50a87b982815be589a91ca750dc875a0808b89":"":"":"521973eac38e81de4e41ccc35db6193d" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #0 -ctr_drbg_validate_pr:"add2bbbab76589c3216c55332b36ffa46ecae72072d3845a32d34b2472c4632b9d12240c23268e8316370bd1064f686d":"6168fc1af0b5956b85099b743f1378493b85ec93133ba94f96ab2ce4c88fdd6a0b23afdff162d7d34397f87704a84220bdf60fc1172f9f54bb561786680ebaa9bf6c592a0d440fae9a5e0373d8a6e1cf25613824869e53e8a4df56f406079c0f":"7e084abbe3217cc923d2f8b07398ba847423ab068ae222d37bce9bd24a76b8de":"946bc99fab8dc5ec71881d008c8968e4c8077736176d7978c7064e99042829c3":"224ab4b8b6ee7db19ec9f9a0d9e29700" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #1 -ctr_drbg_validate_pr:"8964ebde61f0c4e23f8e91244ae9682ed0b17e424edd4c025b461a2d209a538583f29465df3f89cf04f703b771ff5c90":"4db8e8a27fe7a0378e37d4cc01b6a465d34be91f48c52fdc1023ef2ea1241082f522805bc8777fda6c10e3d441b58f648edcd7d4df3df8c8a398d7b005c4fd6f41c9b033bd38fc5f577069251529b58273f6a9175feb3978798fdeb78a043232":"5eb3fb44784f181852d80fcf7c2e3b8414ae797f7b9b013b59cf86b9d3a19006":"3eec358f7f9e789e4ad5a78dd73987addbf3ae5b06d826cec2d54425289dc9af":"9a66c015d2550e3f78c44b901075fabb" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #2 -ctr_drbg_validate_pr:"98784aa794df5400890e6803f06d886aeb0833b1fea28a5f7952397aa21092ceafdb9194079f3609bc68233147c778e7":"7338521e8e127e70da259b37f5f5cdf83079bdb4024234b8ceecfba8d8c3f1c8510ff91f3bd08f2c54f11b534048a320a15ba0fccec8da34d4ef7f49ade4847814c859831907992d0adab27046324d4d9a853eb986b8de25b34ea74eb3d11048":"b14c5314aac11cb43f45730e474b84fbf5d1480d94d0699b80e3570f6636aa72":"d6208912348236feee1d258092283dd9db75899769dd109cc2f0f26d88dcc6bf":"5ec75fdd1ed3a742328e11344784b681" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #3 -ctr_drbg_validate_pr:"fe9b7df306c4ccd02afd6142c6650418325617945147de436a55e78aa45866116d6678e013a0e2c5a13e0d01fbd84039":"c4da56f4239fde0bc49b1d852cb36c80205f9e99e5995a80be04bbbba15f25b8d054c397a34cff1326a71f0acc4f7942795cabc3fa46339dc54b4bf7f11c095af8503004d97c485acec8815d1404674592c896ecfabefcbf222f4fe5a3ced0af":"086d09a6ee20c69bf5c054ebc6250f06097c8da1a932fb3d4b1fb5f40af6268a":"44e64b14c49ebb75c536329bb41ab198848849ca121c960db99f7b26330b1f6d":"7aa3a7e159d194399fc8ef9eb531a704" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #4 -ctr_drbg_validate_pr:"c0d47ee2328185df2c299d270e11fee26df753a5b4f899fdc0dff79eb50748232f9f79cf3f5e9bd4a26a48e743843b02":"a6b5dd5f1bad95331caae5852be50a26267af655c98feb8b66c45a8ae2ddfca270ab0d8023e43e6e22a7b5904d63482f045e85556b9c105cde0f3eb7b1fff1026086c80b195196803b5f664362b659578894d6551fb7c4566eec02202fdc298f":"3b575d028046e7f6005dfcdfcdcf03ff77a9cacd2516bcdff7f3601a9a951317":"f13b58daed46f5bf3c62b518ab5c508dd2bc3e33d132939049421ff29c31c4f0":"8469dfa89453d1481abedd6cc62e4e44" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #5 -ctr_drbg_validate_pr:"a0db812a939fbf3942b00be018cff4578b9fb62629c766a50f3518fe634100b1cbc4244ae843fe32125c53b653705457":"7e3dca20a7a977b6616a684e309015cf6a37edd0d85819fe91d074c915b0c9540a8aa486f58685b064851d6164150b1c1b0e2e545c6358d28b2f5263b2fd12c503d271ab6de76d4fa4c604cae469335840328008d8ce5545586b9ea6b21da4f9":"554b297bc32866a52884fabfc6d837690de30467b8f9158b258869e6f4ed0831":"4f688cba5908e0699b33b508847f7dac32f233e6f02cf093efdacae74259f3b6":"9696dd6ed5875cdef4a918a6686455a8" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #6 -ctr_drbg_validate_pr:"ff6cd20443a32c9e938f2a617bbb969ba54040b12723b0d452a669b584ba16ffaacbe38af62b5a62e0c67d165d022344":"efcf7536f32932526fe82b3a2333508404727878723fc09cbd902581d82463cf6acf1ddf4217ea6404469193e8db0e7e8c864ae655b49c6a095f80f1ab16985453f0fb729c119d8a3b820034626a93b1f70eb99b6cd8c990dda34a1c6a4b6eea":"8d412208091b987ee0781ff679c50dbab9ef389156f570f27aaf3e699bdade48":"501381ce5e7718c92ee73e9c247965dd5f0bbde013c4b5e625e9af8907e40566":"4f323934adb8a2096f17d5c4d7444078" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #7 -ctr_drbg_validate_pr:"bd14779153ed9696d3e5143c50b2050b6acd3ea2f8b670ef0e5f4bedf01705727bf9e64ae859214abe6ef497163f0236":"bfb0931b05a3fe232614e1b1c3060b3b07fb75d23ac10190a47a7245a6ecad5f3834e6727b75acc37e9d512d01a4a9cef6cb17eb97e4d1d7c1df572296972f0437a89c19894f721cbe085cf3b89767291a82b999bf3925357d860f181a3681ce":"0b5dc1cdfc40cfdc225798da773411dc9a8779316ceb18d1e8f13809466c6366":"843eb7297570e536b5760c3158adb27c0c426c77d798c08314f53b59aa72d08b":"1e703f3122455a40536c39f9ea3ceaa6" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #8 -ctr_drbg_validate_pr:"64b155fd4b8634663a7e8a602e2b9fe2477be74692643ccfd0b316a025ea6f1fc0dfd0833248cb011082be36cba3c5d1":"a5b15cb1e039d7bbe2db80a32d4f402c7d3c59a45b05255401d1122770dbdb9894841964d5cadc9ae9af007d63e870d0510078885ca402bd222f16d2d27892e23292b65cf370b15d5e5a739ddd13e3e27f7c2e2b945f8e21897c3bbf05d8b043":"aea2fe995be77dfdca6ebaa1c05ba4c84d0e6b9a87905c398a3dfe08aeb26d38":"f4e9e7eb0eea4e2d419de6ad2909d36ec06c79097884bf98981e86dedae366ba":"4a28955dc97936b1c0aed0751a1afed5" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #9 -ctr_drbg_validate_pr:"e6c08e8b8d8e418477087911610096f7e0422083a376a77198e9c60fb2dc8c14aff33d7835878b65322f1561738b1ebb":"d4e0347c2158b882eb1e165f7f2aa1324d6606fe259ca730b2a3367435cb93b89108e49bd97355215063f63e78e8926b264c8a97571fd4d55882364915b7bd544254c25c2b67cdd979737c7811bcdeef5b052d8fe05a89b3291ef669d5579a61":"6607541177bc0c5f278c11cb2dcb187fc9f2c9a9e8eefa657ba92dee12d84b07":"7a439c8593b927867cfa853949e592baea0eeb394b0e2fe9ab0876243b7e11e2":"420888122f2e0334757c4af87bbc28a4" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #10 -ctr_drbg_validate_pr:"4413ff775c9b7d9a3003e0b727e34554e0f615471d52aeb4a059777b372d60332a1a4bcaf906e598581bc5a369b2c933":"a21cf567362fed0edddfd0b1c2d85ff6d2db5484fca8bf90a82da2ab76efcac9286e417628496f37effda150ef4912125aac68aac72e6f900a70192d4ef0b4cc4e9419c93ffb245965ae30c5f8abe20f732d76080bde5a1c6b3f075eb35622d1":"b924d145fc3ecd76f000f12638ef0a49a5d4cf887aa93fc9e5c536febc454f2d":"73dbb40b257e6598744f9107c8e7ff51a080407fc9e80d39d9a4db94f167c116":"84457ea753771ad7c97ce9c03ab08f43" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #11 -ctr_drbg_validate_pr:"5e409d56afb6940f9ffa45e0f92ef4972acedd3557b8e0f5418e302f2720ae5289294176045ad3096ea68db634cf5597":"c5a63c886af7ed7496473a6ae2f27f056c7e61c9aca8c5d095af11b2efe1a6b43344f92b37c7b6977ddbef1273e9511d9305fcbe7f32bc6a62f28d34841350362d2717dd00467224a35985b9fecc2739acd198743849dbfa97f458e2e7d6b1dc":"7fda133a23e929b17548a05013ff9c7085c5af9c979057b8f961ba7514509ff3":"bd061292b6bc3d3e71ed01af091f0169f70f23862efccd9e76345ff607dff3ec":"75b35dab3ad5e35c10ee39529a7f840f" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #12 -ctr_drbg_validate_pr:"ed2a52169791d7c7d332cf258ea4847c359335f9a6839ee767a8f76800ba28e94858cc9b7f526e62a93603fa2b1caa6b":"0a6155ff422ff6ae9814f81bf353bd3454d0c9892f9f3d730dcd8c87626f813cbe1dff1922fe73e4a319be53f4ec05e965c27f239b1e51869069a7e7cdd916fc1fd6f640bfe4b761a8040f8db37fb5ee7508e7d226c7695fb2a8bd791fe49ef2":"14073a1b4f07f3b594fa43d0c8781b8089dd2d9b8ad266e0321aaa6b71a0d058":"4247fc6886e8657b84369cf14469b42aa371d57d27093ee724f87bf20fa9e4e6":"f2aea2bc23e7c70f4ee2f7b60c59d24d" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #13 -ctr_drbg_validate_pr:"f0d3a46501da7ab23d8688725f53f4289ce3bfa627646fe301533ec585f866caafb8131e95460566270f68cd25e1f153":"223d49f99a56cfcf2eb8cca39a8a82ee306c6272d521257f3d7d2a87699111e442fc55a399994d57373141f2207d43a8bbc1e086d67343b7dc2a891853c860fe43fb6be32cf035aca582bf5590cb5001b09b4976ea617fa7bd56da81fdef2df9":"7d12673cad5ad5003400fb94547e2b987e934acf6b930c0e7aec72634bfb8388":"e8583b9983b3ac589a6bb7a8405edfc05d7aa5874a8643f9ac30a3d8945a9f96":"ce72c0ea0e76be6bc82331c9bddd7ffb" - -CTR_DRBG NIST Validation (AES-256 use df,True,256,128,256,256) #14 -ctr_drbg_validate_pr:"1e4644df1d01f9a0f31d1d0c67bc9fb9a1ee2223fbfb25520d3881cde2b183b73fe1a8cc5f17796cf22aaaed57607420":"cdac62b5e4ccee8609b1f4b7a8733e69068c71219b6292ecb318b9d3479516807af280cfa20e455d5e96eb6794a3b963957f3c099fd1e1199706d36a06011836af890f3b7b15cda6346a06fdd0f194de40bfbec12b021b02eeabaa34d35b30a3":"8169251ea55cce534c6efd0e8a2956d32ed73be71d12477cea8e0f1ab8251b50":"865d14cb37dd160a3f02f56ac32738f9e350da9e789a1f280ee7b7961ec918a7":"ff11ba8349daa9b9c87cf6ab4c2adfd7" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #0 -ctr_drbg_validate_nopr:"1b54b8ff0642bff521f15c1c0b665f3f":"5a194d5e2b31581454def675fb7958fec7db873e5689fc9d03217c68d8033820f9e65e04d856f3a9c44a4cbdc1d00846f5983d771c1b137e4e0f9d8ef409f92e":"":"":"":"a054303d8a7ea9889d903e077c6f218f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #1 -ctr_drbg_validate_nopr:"90bc3b555b9d6b6aeb1774a583f98cad":"93b7055d7888ae234bfb431e379069d00ae810fbd48f2e06c204beae3b0bfaf091d1d0e853525ead0e7f79abb0f0bf68064576339c3585cfd6d9b55d4f39278d":"":"":"":"aaf27fc2bf64b0320dd3564bb9b03377" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #2 -ctr_drbg_validate_nopr:"4a2a7dcbde58b8b3c3f4697beb67bba2":"58364ceefad37581c518b7d42ac4f9aae22befd84cbc986c08d1fb20d3bd2400a899bafd470278fad8f0a50f8490af29f938471b4075654fda577dad20fa01ca":"":"":"":"20c5117a8aca72ee5ab91468daf44f29" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #3 -ctr_drbg_validate_nopr:"911faab1347ae2b3093a607c8bc77bfe":"2f044b8651e1c9d99317084cc6c4fa1f502dd62466a57d4b88bc0d703cabc562708201ac19cdb5cf918fae29c009fb1a2cf42fd714cc9a53ca5acb715482456a":"":"":"":"aae0c0ac97f53d222b83578a2b3dd05d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #4 -ctr_drbg_validate_nopr:"f959f1bc100ae30088017fae51289d8e":"77d0f0efbc7ca794a51dff96e85b8e7dfd4875fbfb6e5593ae17908bfbddc313e051cb7d659c838180d834fdd987ae3c7f605aaa1b3a936575384b002a35dd98":"":"":"":"5d80bc3fffa42b89ccb390e8447e33e5" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #5 -ctr_drbg_validate_nopr:"45a8bb33062783eede09b05a35bd44dd":"6bb14dc34f669759f8fa5453c4899eb5ac4e33a69e35e89b19a46dbd0888429d1367f7f3191e911b3b355b6e3b2426e242ef4140ddcc9676371101209662f253":"":"":"":"0dfa9955a13a9c57a3546a04108b8e9e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #6 -ctr_drbg_validate_nopr:"0ada129f9948073d628c11274cec3f69":"b3d01bcb1ec747fdb7feb5a7de92807afa4338aba1c81ce1eb50955e125af46b19aed891366ec0f70b079037a5aeb33f07f4c894fdcda3ff41e2867ace1aa05c":"":"":"":"f34710c9ebf9d5aaa5f797fd85a1c413" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #7 -ctr_drbg_validate_nopr:"052a5ad4cd38de90e5d3c2fc430fa51e":"98482e58e44b8e4a6b09fa02c05fcc491da03a479a7fad13a83b6080d30b3b255e01a43568a9d6dd5cecf99b0ce9fd594d69eff8fa88159b2da24c33ba81a14d":"":"":"":"3f55144eec263aed50f9c9a641538e55" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #8 -ctr_drbg_validate_nopr:"004cd2f28f083d1cee68975d5cbbbe4f":"6238d448015e86aa16af62cdc287f1c17b78a79809fa00b8c655e06715cd2b935bf4df966e3ec1f14b28cc1d080f882a7215e258430c91a4a0a2aa98d7cd8053":"":"":"":"b137119dbbd9d752a8dfceec05b884b6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #9 -ctr_drbg_validate_nopr:"f985b3ea2d8b15db26a71895a2ff57cd":"50d3c4ecb1d6e95aebb87e9e8a5c869c11fb945dfad2e45ee90fb61931fcedd47d6005aa5df24bb9efc11bbb96bb21065d44e2532a1e17493f974a4bf8f8b580":"":"":"":"eb419628fbc441ae6a03e26aeecb34a6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #10 -ctr_drbg_validate_nopr:"100f196991b6e96f8b96a3456f6e2baf":"d27cbeac39a6c899938197f0e61dc90be3a3a20fa5c5e1f7a76adde00598e59555c1e9fd102d4b52e1ae9fb004be8944bad85c58e341d1bee014057da98eb3bc":"":"":"":"e3e09d0ed827e4f24a20553fd1087c9d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #11 -ctr_drbg_validate_nopr:"88f55d9ba8fef7828483298321133fec":"16f9f5354d624c5ab1f82c750e05f51f2a2eeca7e5b774fd96148ddba3b38d34ba7f1472567c52087252480d305ad1c69e4aac8472a154ae03511d0e8aac905a":"":"":"":"07cd821012ef03f16d8510c23b86baf3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #12 -ctr_drbg_validate_nopr:"126479abd70b25acd891e1c4c92044f9":"70afbc83bf9ff09535d6f0ddc51278ad7909f11e6f198b59132c9e269deb41ba901c62346283e293b8714fd3241ae870f974ff33c35f9aff05144be039d24e50":"":"":"":"0f90df350741d88552a5b03b6488e9fb" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #13 -ctr_drbg_validate_nopr:"a45f2fca553089fe04e7832059dc7976":"5e5a9e1e3cb80738c238464ede1b6b6a321261a3b006a98a79265ad1f635573bba48dccf17b12f6868478252f556b77c3ec57a3bf6bb6599429453db2d050352":"":"":"":"6eb85ae2406c43814b687f74f4e942bc" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #14 -ctr_drbg_validate_nopr:"52dbb43241002415966eaec2615aba27":"31cfe60e5ed12ff37d7f2270963def598726320c02b910b5c6c795e2209b4b4a95866c64cb097af1d6404d1e6182edf9600e1855345375b201801d6f4c4e4b32":"":"":"":"2a270f5ef815665ddd07527c48719ab1" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #0 -ctr_drbg_validate_nopr:"176200bb44808b5400b24e1b5f56cf73":"f84d395b1734eac4600dbc36f6b1e1599bc7f2608dc8ecb3a55369d7b1b122a09f5ac9c16d9a2be37d2ff70a9bba732fc3785b23ff4ade3c8404da3f09f95a8f":"aef28c9169e9af74c73432d4aa6f5dff9ea4a53433de2ecb9bf380a8868c86e1":"0626ae19763c5313b627a8d65cf1cfba46dfd6773242738b9b81fde8d566ade1":"63c160ed6a6c1fffd0586f52fa488a9055533930b36d4fa5ea3467cda9ffe198":"e8f91633725d786081625fb99336a993" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #1 -ctr_drbg_validate_nopr:"19c3d16197ac93bf58c4110c9e864804":"50755cc0178c68ae70befd7744f6f1e3f6a59b3bbe484a744436079c7fae8d83c4965516fb952c63e1d0561d92cccc56037465815c9e549c9adce4a064877128":"5cb82d2c297404f3db1909480c597dd081d94ca282ba9370786a50f3cbab6a9b":"96d130faf1a971920c2bf57bcd6c02d5a4af7d3c840706081e4a50e55f38bf96":"1b0d04f179690a30d501e8f6f82201dbab6d972ece2a0edfb5ca66a8c9bcf47d":"4628b26492e5cb3b21956d4160f0b911" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #2 -ctr_drbg_validate_nopr:"4b1edd0f53bf4e012def80efd740140b":"e50c31ebbb735c4a53fc0535647ae1fff7a5ac4fa4068ba90f1fa03ca4ddedecd5b1898d5e38185054b0de7e348034b57067a82a478b0057e0c46de4a7280cd9":"e7154ec1f7ac369d0bd41238f603b5315314d1dc82f71191de9e74364226eb09":"9444238bd27c45128a25d55e0734d3adafecccb2c24abdaa50ac2ca479c3830b":"ab2488c8b7e819d8ce5ec1ffb77efc770453970d6b852b496426d5db05c03947":"a488a87c04eb1c7586b8141ed45e7761" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #3 -ctr_drbg_validate_nopr:"1f89c914649ae8a234c0e9230f3460f9":"5e029c173dc28ab19851a8db008efbcf862f4187fca84e4e6f5ba686e3005dba5b95c5a0bcf78fb35ada347af58ec0aca09ed4799cd8a734739f3c425273e441":"b51f5fd5888552af0e9b667c2750c79106ce37c00c850afbe3776746d8c3bce1":"9b132a2cbffb8407aa06954ae6ebee265f986666757b5453601207e0cbb4871b":"f1c435e2ebf083a222218ee4602263872a2d3e097b536a8cc32a5a2220b8065f":"a065cc203881254ca81bd9595515e705" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #4 -ctr_drbg_validate_nopr:"0ef2be2d00a16051404fc2a0faa74fdc":"b66c882ae02c5215ed3bcd9e9a40934b09bf48a15fe7558c9d9ceb0ebec63625ea18f7c3ab341d9f7edd8e1d8816edecb34dbd71ae02771327b5ebc74613dadd":"1ebe9893957a5c4a707793906d31bb201e88d88a22abd6baa6461fc61def7ffb":"f81e26744834413cb95af8d438d0050c7c968f929a33e35ee5c6715a0a520950":"687a848b2b6c715a0e613b3f3bb16cf2f056543eb9dd6b8aee8de8aa6fd8a1e6":"a6c4a7e99d08cc847ac0b8c8bcf22ec0" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #5 -ctr_drbg_validate_nopr:"eb2439d156c4f51fb1943c26f27de8af":"ad153fd266d9f73b21f4e5e88d3d13ba8325abdec427d5d8f671cfccdbd3510e9774d59a14d9b5472b217b7bcf355436a51965d2dff7c4ac586ab812f20d326e":"e24bd6b69a40fa0a02cefbbaa282f8f63a80e154be338d1b913418d4ff7a810d":"fd40baf11d7cdd77641a2b46916cb0c12980e02612ef59fb6fe7dabbbe7a85c0":"a40019e3b85d7d5775e793dd4c09b2bdc8253694b1dcb73e63a18b066a7f7d0c":"7cd8d2710147a0b7f053bb271edf07b5" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #6 -ctr_drbg_validate_nopr:"b23796d88ee5ae75ff2ba4fbbd5e2de8":"b249d2d9b269b58c5355710aaae98be12d8fb2e79046b4e6deeec28adad7e789999847e20de11f7c3277216374f117e3e006bdf99bb8631aa4c4c542cd482840":"79f0214b6b0c5ffb21b1d521498b71d22c67be4607c16300ab8dde3b52498097":"582be1e080264b3e68ec184347a5b6db1e8be1811578206e14ad84029fe39f71":"f5e9c3356810793f461f889d8c5003b1c0b20a284cb348301ce7b2dd7a1c7dd7":"1aa8cf54994be6b329e9eb897007abf0" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #7 -ctr_drbg_validate_nopr:"081db0b1620a56afd87c2fd2bebb1db3":"3f1e90d88870a0bd03364036b655495e3e7d51bf67fb64ba0cbf003430af5585f5936b84ab3b8a55c02b8b6c54bea09cf2d77691858c5818991383add5f0c644":"5b98bc83ae8bed5c49cb71689dc39fee38d5d08bdfa2a01cee9d61e9f3d1e115":"aad3e58fdd98aa60fc2cae0df3fc734fff01a07f29f69c5ffeb96d299200d0d8":"bad9039ebb7c3a44061353542a2b1c1a89b3e9b493e9f59e438bfc80de3d1836":"8d01e3dc48b28f016fc34655c54be81f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #8 -ctr_drbg_validate_nopr:"a8427443d9c34abcdcca061a2bbcff52":"b0e9b2192adc8912653d90a634d5d40c53ca4383290a8764bdf92667f859d833c3e72ad0ff41e07fe257b1ead11649be655c58a5df233114e7eda2558b7214d7":"c6cad9fb17ada437d195d1f8b6a7fa463e20050e94024170d2ffc34b80a50108":"be461a9c1a72ebaf28ee732219e3ca54cbee36921daaa946917a7c63279a6b0e":"b6d110d6b746d7ccf7a48a4337ba341d52508d0336d017ae20377977163c1a20":"16ccd63dbf7b24b6b427126b863f7c86" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #9 -ctr_drbg_validate_nopr:"86bd02976e6c50656372b8c212cf0a7a":"89900b0febf6b4e19ab8fc5babb4122a8aad86d658d0c2f98988c99fbd8530ff4ad365bd5fddaa15f96537bd72deb5384405b610e6ebae83e848307051fd6c82":"41bf3794ee54647a48a2588fdfdea686f1af6792e957d42f181f2631b207ac0c":"c4478afbea4eecb225448f069b02a74c2a222698c68e37eb144aff9e457f9610":"41a99e0d3f5b767f9bedcb2f878a5d99d42856bed29042d568b04e347624bf7f":"863337529aac9ab1e9f7f8187ea7aa7d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #10 -ctr_drbg_validate_nopr:"e809ef8d4c3d82575833d51ac69481b2":"3e831b7715ce202c95ec85337e2c0061d972169955bd96fbe1f758508c0336b3226260ea5e66f943b538eb115ffe4d5e534cbe58262a610528641629bc12fc75":"4d40c6a961168445c1691fea02ebd693cb4b3f74b03d45a350c65f0aaccb118b":"b07dc50e6ca7544ed6fdebd8f00ed5fa9b1f2213b477de8568eb92dddaabfe3f":"cbac982aa9f1830d0dc7373d9907670f561642adb1888f66b4150d3487bf0b8d":"2814be767d79778ebb82a096976f30db" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #11 -ctr_drbg_validate_nopr:"ad71caa50420d213b25f5558e0dc1170":"6a3fd23e7dc934e6de6eb4cc846c0dc3cf35ea4be3f561c34666aed1bbd6331004afba5a5b83fff1e7b8a957fbee7cd9f8142326c796ca129ec9fbacf295b882":"3042dd041b89aaa61f185fdda706c77667515c037f2a88c6d47f23ddadc828ae":"9b1e3f72aaab66b202f17c5cc075cfba7242817b2b38c19fe8924ca325b826ea":"8660b503329aaea56acdb73ca83763299bac0f30264702cb9d52cbaf3d71d69d":"c204a3174784d82b664e9a1c0a13ffa6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #12 -ctr_drbg_validate_nopr:"5fd6606b08e7e625af788814bef7f263":"baf8750e07194fc7172c736e0fdea0a632810d45602dff17ce37adf106d652f87e31b6bd24d21481c86444d8109586118672a6f93731b7438a3f0f39648b83a3":"3c37193d40e79ce8d569d8aa7ef80aabaa294f1b6d5a8341805f5ac67a6abf42":"c7033b3b68be178d120379e7366980d076c73280e629dd6e82f5af1af258931b":"452218a426a58463940785a67cb34799a1787f39d376c9e56e4a3f2215785dad":"561e16a8b297e458c4ec39ba43f0b67e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #13 -ctr_drbg_validate_nopr:"08def734914ecf74b9eccb5dfaa045b8":"6697f889fcf6dae16881dc1e540e5c07f9461d409acee31842b04f93c00efbba670dfbf6040c1c2e29ad89064eae283fd6d431832f356e492bc5b2049f229892":"a6ac87af21efd3508990aac51d36243d46237b3755a0e68680adb59e19e8ae23":"0052152872b21615775431eb51889a264fed6ca44fa0436b72a419b91f92604c":"ebadf71565d9a8cc2621403c36e6411e7bed67193a843b90ccf2f7aa9f229ca2":"c83fa5df210b63f4bf4a0aca63650aab" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #14 -ctr_drbg_validate_nopr:"6437862e93060def199029ff2182f1e5":"719d1afcb6dc8ca26cba6a7c10f59cf82345b2a0c631a7879812d6f2d2663b49f9e92daecb81ff7c0790205d66694526477d6de54a269f542cb5e77fe4bc8db3":"5c961db0ac2ea8caf62c9acc44465dcfb4d721fcb2cd3e1c76cdcb61bfaa7e75":"24eabd392d37493e306705d0b287be11a4d72dd4b9577ac4098ef0dae69b0000":"9e4f05c1b85613e97958bc3863e521331b2bd78fdf2585f84607bf2238e82415":"21aaae76dc97c9bf7cf858054839653e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #0 -ctr_drbg_validate_nopr:"cd7a1981c1b7079c1c38f5aeee86db22207cb9faed8c576b1724ca7817aa6abfb26c42a019eb4c2f4064f0587ea2b952":"7f88c3805ae0857c5cbb085a5d6259d26fb3a88dfe7084172ec959066f26296a800953ce19a24785b6acef451c4ce4c2dfb565cbe057f21b054a28633afbdd97":"":"":"":"76c1cdb0b95af271b52ac3b0c9289146" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #1 -ctr_drbg_validate_nopr:"0ccdac2fd65a86bf8f8e9ddcabffb9d29a935139f627c165a815b23137eeee94cbb21be86ac5117379177d37728db6fd":"6f61703f92d3192cd982b2e52a8683e0d62918d51b12e084deae06c4a8e08ecfb3d2d30a980a70b083710bc45d9d407966b52829cf3813cc970b859aa4c871fe":"":"":"":"e6c73e159d73c2ba8950cd77acb39c10" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #2 -ctr_drbg_validate_nopr:"fbbcc4abfd671296de3e0dcf409a139e35deae126c1941bf1afcc8d3da3a2d65f54a6d317bb6d683a3a77f6266b007ff":"c662ed723e7041877542fdcf629533d4a74393eb4dae4f3ec06d2d1c0d37ed7f519609a8485cb8deb578ae4cbb45c98ef7f2f2e677363e89fb3744286db6bfc1":"":"":"":"9d934d34417c6d0858f4a3faacbe759e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #3 -ctr_drbg_validate_nopr:"1b824790b6b22b246bcc1bcfbbb61a76045476672f917b72e79cca358e650eb29ed49fb0a5739e097f5f5336d46fc619":"c57a5686486ebacc2422236b19110c754795a869a8157901cf71303de1adc6af16a952190a395d6c20e155e690f41922f6f721dc8e93da81afb844f68714cba7":"":"":"":"13e7bf23d88f3bb5a5106a8227c8c456" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #4 -ctr_drbg_validate_nopr:"2ea7861e374232cb8ceecbbd9a18fc1f63c31f833fe394f1e19c8ef61092a56f28342fa5b591f7b951583d50c12ef081":"6a0873634094be7028b885c345cd5016295eec5e524f069de6510ae8ac843dba2cc05c10baa8aad75eac8e8d1a8570f4d2a3cf718914a199deb3edf8c993a822":"":"":"":"c008f46a242ae0babad17268c9e0839a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #5 -ctr_drbg_validate_nopr:"39caa986b82b5303d98e07b211ddc5ce89a67506095cad1aeed63b8bfe0d9c3d3c906f0c05cfb6b26bab4af7d03c9e1a":"f2059f7fb797e8e22de14dac783c56942a33d092c1ab68a762528ae8d74b7ad0690694ede462edbd6527550677b6d080d80cdabe51c963d5d6830a4ae04c993f":"":"":"":"202d3b2870be8f29b518f2e3e52f1564" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #6 -ctr_drbg_validate_nopr:"a4e25102c1b04bafd66bfe1ce4a4b340797f776f54a2b3afe351eede44e75c28e3525155f837e7974269d398048c83c3":"0a03b7d026fab3773e9724dacb436197954b770eca3060535f2f8152aa136942915304dede1de0f5e89bd91d8e92531b5e39373013628fea4ee7622b9255d179":"":"":"":"be21cab637218ddffa3510c86271db7f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #7 -ctr_drbg_validate_nopr:"6de33a116425ebfe01f0a0124ad3fad382ca28473f5fc53885639788f9b1a470ab523b649bad87e76dee768f6abacb55":"d88312da6acbe792d087012c0bf3c83f363fa6b7a9dd45c3501009fb47b4cfcfeb7b31386155fe3b967f46e2898a00ecf51ec38b6e420852bef0a16081d778cc":"":"":"":"2c285bfd758f0156e782bb4467f6832c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #8 -ctr_drbg_validate_nopr:"b8ab42fd3f6306426602cae0c48eb02ffa7053940389900c17846e1d9726251762095383f2ec3406b3381d94a6d53dd8":"6a7873ccb7afb140e923acbec8256fa78232f40c0c8ba3dcbcf7074d26d6d18a7e78fffda328f097706b6d358048ee6a4728c92a6f62b3f2730a753b7bf5ec1f":"":"":"":"13504a2b09474f90d2e9ef40d1f2d0d5" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #9 -ctr_drbg_validate_nopr:"042b524444b9903c1ecb80af21eef0e884115561a15a1ab2f9f3a322edcbf14174f54d315196a632940c2c6f56612c09":"31ba5f801aeaac790f2480fbd2373a76ba1685ebebc5ae7cd4844733ec3cfb112634b3899104dcc16050e1206f8b3fb787d43d54de2c804fd3d8eb98e512bb00":"":"":"":"0a0484c14e7868178e68d6d5c5f57c5c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #10 -ctr_drbg_validate_nopr:"632758f92efaca39615862177c267906ab0424230d481ee0a5aa1a5f66697d3918d4aab3f310b72a7f2d71c0a96b9247":"46dc837620872a5ffa642399213b4eebfb28ca069c5eaaf2a636f5bd647de365c11402b10ecd7780c56d464f56b653e17af8550b90a54adb38173a0b2f9e2ea7":"":"":"":"90432ce3f7b580961abecde259aa5af6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #11 -ctr_drbg_validate_nopr:"7b389118af3d0f8336b41cf58c2d810f0e5f9940703fd56a46c10a315fb09aafd7670c9e96ffa61e0cb750cb2aa6a7fe":"76e92e9f00fc7d0c525c48739a8b3601c51f8f5996117a7e07497afee36829636e714dbcb84c8f8d57e0850a361a5bdfc21084a1c30fb7797ce6280e057309b7":"":"":"":"7243964051082c0617e200fcbbe7ff45" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #12 -ctr_drbg_validate_nopr:"e50d38434e9dfe3601e7ea1765d9fe777d467d9918974b5599ec19f42d7054b70ff6db63a3403d2fd09333eda17a5e76":"c9aa4739011c60f8e99db0580b3cad4269874d1dda1c81ffa872f01669e8f75215aaad1ccc301c12f90cd240bf99ad42bb06965afb0aa2bd3fcb681c710aa375":"":"":"":"28499495c94c6ceec1bd494e364ad97c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #13 -ctr_drbg_validate_nopr:"3253cb074d610db602b0a0d2836df1f20c3ee162d80b90b31660bb86ef3f0789fa857af4f45a5897bdd73c2295f879b6":"b06960a92d32a9e9658d9800de87a3800f3595e173fdc46bef22966264953672e2d7c638cc7b1cada747026726baf6cea4c64ba956be8bb1d1801158bee5e5d4":"":"":"":"b6608d6e5fcb4591a718f9149b79f8f1" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #14 -ctr_drbg_validate_nopr:"83e4733566f90c8d69e6bcbe9fb52521ff3e26f806d9b7b86e9344cca0305dbf106de855240f1d35492cc6d651b8b6ae":"0e0105b12af35ac87cb23cf9ca8fb6a44307c3dcdc5bc890eb5253f4034c1533392a1760c98ba30d7751af93dd865d4bd66fbbeb215d7ff239b700527247775d":"":"":"":"68d64d1522c09a859b9b85b528d0d912" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #0 -ctr_drbg_validate_nopr:"a94da55afdc50ce51c9a3b8a4c4484408b52a24a93c34ea71e1ca705eb829ba65de4d4e07fa3d86b37845ff1c7d5f6d2":"a53e371017439193591e475087aaddd5c1c386cdca0ddb68e002d80fdc401a47dd40e5987b2716731568d276bf0c6715757903d3dede914642ddd467c879c81e":"20f422edf85ca16a01cfbe5f8d6c947fae12a857db2aa9bfc7b36581808d0d46":"7fd81fbd2ab51c115d834e99f65ca54020ed388ed59ee07593fe125e5d73fb75":"cd2cff14693e4c9efdfe260de986004930bab1c65057772a62392c3b74ebc90d":"4f78beb94d978ce9d097feadfafd355e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #1 -ctr_drbg_validate_nopr:"e8649d4f86b3de85fe39ff04d7afe6e4dd00770931330b27e975a7b1e7b5206ee2f247d50401a372c3a27197fec5da46":"78d7d65c457218a63e2eb1eba287f121c5466728ac4f963aeaabf593b9d72b6376daea6436e55415ad097dee10c40a1ff61fca1c30b8ab51ed11ff090d19ef9a":"cc57adc98b2540664403ad6fd50c9042f0bf0e0b54ed33584ee189e072d0fb8f":"ab2f99e2d983aa8dd05336a090584f4f84d485a4763e00ced42ddda72483cd84":"0ecd7680e2e9f0250a43e28f2f8936d7ef16f45d79c0fa3f69e4fafce4aeb362":"08e38625611bb0fb844f43439550bd7a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #2 -ctr_drbg_validate_nopr:"6c79e1556889b3c074fc083a120d73784b888c5acb877899f17ce52e424b84178d144441aa9f328c730a951b02b048df":"c78ff6b9fc91cbce246c9fcc2366d5f7dd6d99fb1325d8997f36819232d5fcd12ccafdcbefd01409d90acd0e0ffb7427c820b2d729fe7e845e6a6168fc1af0b5":"60cba10826de22c5e85d06357de63d6b2ff0719694dafca6ab33283f3a4aacdd":"8943c22fb68b30811790a99b9cbb056e1a2c329185a199c76ba5aeceb2fcd769":"70671a50e8387bf232989d904c19215c7535ad2d0c5dec30a744c8d2706be6ec":"f6b94b671cae8dfa8387719bfd75ee84" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #3 -ctr_drbg_validate_nopr:"f5ab77b2a8e370548b88febfd79772144cd5fc8d78062582addd4ff1e5c10094b390e66b3c4efb087510de1b9d25703f":"21a21c9314b37d4ade4a50a5d85995e0be07e358ed9bca19daa867a8d47847105dca7a424f32f715adb8fea5d3a41cfe388872a42ab18aa5cbcd7bde4adc3f8b":"023d582569a7ff1405e44cf09ceebb9d3254eef72286e4b87e6577a8ab091a06":"39597519872d49fbd186704241ba1dc10b1f84f9296fb61d597dbd655a18f997":"3091c9fe96109b41da63aa5fa00d716b5fa20e96d4f3e0f9c97666a706fa56f1":"1fb57058b3ba8751df5a99f018798983" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #4 -ctr_drbg_validate_nopr:"f0b79e292d0e393e78b6d6117e06d2e725823fe35bde1146502967a78d99d6bca564f0e2f324272f968be5baab4aeb29":"192054dddac02157a35eb7f75ae8ebdb43d6b969e33942fb16ff06cd6d8a602506c41e4e743b8230e8239b71b31b2d5e3614e3a65d79e91d5b9fc9d2a66f8553":"b12241e90d80f129004287c5b9911a70f7159794e6f9c1023b3b68da9237e8b7":"59e9c3c0f90e91f22c35a3be0c65f16157c569c7e3c78a545d9840f648c60069":"089a59af69f47ddb4191bd27720bb4c29216f738c48c0e14d2b8afd68de63c17":"15287156e544617529e7eede4aa9c70e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #5 -ctr_drbg_validate_nopr:"e3f33843aecb35d01001ff92ab9a0f1a5431ba9de3e4f3247cda8c62acc86f7066448f639d8ba8b5249337f8c353bbbd":"ef081af1f62400a3d193969d689a40234998afb646d99a7c4b9cbbf47e650cda93a90e754a16fffa25fc2a2edab09720b4520c47309ec4f6d9f76f0162af6cae":"e7cc55b72862544a8661b5034e15587b1e5a45eb5dc744f5fa1db9b267f1c3ff":"882d30c888eb8e344b1d17057074606fe232ceb42eb71055264ede7bb638f2a2":"9ce65e95c1e735fe950e52c324e7551403d0ef70ad865bd31fef1e22b129fdd6":"205e3a53367c4a5183be74bb875fa717" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #6 -ctr_drbg_validate_nopr:"f30a18d597d8591a22dee908de95c5af74884b025f39b4f6707d28447d9d0a3114a57bc2d9eed8e621ec75e8ce389a16":"fae3d554d12a14e29de1b622922f27559559ca1518c9f800375a37a212e8b9a653cc3700223e9404d5bf781d15fccf638050a1394592caba001cfc65d61ef90b":"54240edd89016ed27e3bb3977a206836f5ef1fba0f000af95337d79caca9cf71":"250611e51852d933ff1a177b509c05e3228cb9f46dfb7b26848a68aad2ce4779":"f8b602d89fa1a0bfb31d0bd49246b458200a1adb28b64a68f7c197f335d69706":"7b63bfb325bafe7d9ef342cd14ea40a4" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #7 -ctr_drbg_validate_nopr:"c8dbc3d39beb612811c52e2b46ef76d2b7bd5d3a90ceddf9fb864fe6f44e36687d88158d61014e192f9a3cd474338e13":"8e60115b4af9c8e5606223792539e9ba87e9ef46cd16fcc09046db1ef8d3c036241cae5d61141711818e9e861dbd833632069ebf5af1bd6d4e513f059ab1efd3":"9b56eba0838457f736fc5efa2cfbe698908340f07d4680e279d21dd530fdc8c8":"62c47ece469a7a409e4b2b76d1c793aaf11654e177cc8bf63faff3e6c5a5395c":"4251597013d0c949c53bbd945477b78aa91baa95f1ff757c3a039ccc4e1f4789":"af2f37160940f0cc27d144a043ddf79b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #8 -ctr_drbg_validate_nopr:"a37f9ed6c4e8f74ff16046b0678ef7bd24fcdca247b771ea1ce1fd48e3f5d2067e38aaf64ec59f1f49d96fa85e60ef03":"95da91f4185b254322ef0fc852473a9b9e4c274b242ded8a4eae6f1e2badde0664cf57f2128aa3dc83e436f7e80928a01d93bf25011eedf0190d0bf3619cd555":"b4a22f5598f79d34f0b9600763c081b0200ba489da7028ad0283828545c6d594":"fa3edc0962b20a9d9e1d0afcad907c8097c21d7a65c0e47c63d65cea94bf43bd":"49ba791a227e9e391e04225ad67f43f64754daac0b0bb4c6db77320943231ec3":"32f313ded225289793c14a71d1d32c9f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #9 -ctr_drbg_validate_nopr:"87f85b9c19eba1d953b6613cf555c21bc74428d9a8fee15e6cd717e240506f3e80860423973a66c61820d4ce1c6bb77d":"f22dd3517350176e35e1b7ecc8c00bea4747f0ac17bda1b1ddf8cdf7be53ff8c326268366e89cf3b023a9646177a0dcca902f0c98bf3840c9cbdf5c0494bee3c":"611caa00f93d4456fd2abb90de4dbcd934afbf1a56c2c4633b704c998f649960":"cba68367dc2fc92250e23e2b1a547fb3231b2beaab5e5a2ee39c5c74c9bab5f5":"f4895c9653b44a96152b893b7c94db80057fb67824d61c5c4186b9d8f16d3d98":"a05de6531a1aa1b2ba3faea8ad6ac209" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #10 -ctr_drbg_validate_nopr:"9670deb707caabc888a3b0df7270942934732e02be728a4bedb5fc9ca4d675b2f3b47c7132c364ce6292cef7c19b60c7":"bba34e6f4ee27e5d4e885e59f8bbb0dc7353a8912e66637d7515a66e5398d9a8cbd328fed32f71bdd34c73cdf97e0d211be6dabfb0144e1011fd136cf01ea4e4":"9f55da36babd6ea42082f5f5d4330f023440bb864f8ad5498a29cf89757eaeab":"8013a309058c91c80f4d966f98bce1d4291003ad547e915777a3fce8ae2eaf77":"c83106272d44e832e94c7096c9c11f6342e12ec06d5db336424af73d12451406":"bc8d4d00609662c1163dca930901821d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #11 -ctr_drbg_validate_nopr:"6d984c8ab923a7e118447fd53ad287b8f01d1e6112cff12bfb338ecd3ed16bafdd634677c600bdd68f852a946f45c3d9":"ed0e524ed2990ef348dbb15b3f964b12ad3109978d6952ae193b21e94510a47406926620798e71a0ffcbdd2e54ec45509d784a8bfc9d59cb733f9f11fc474b5e":"0a3a32260d04dd7a82fb0873ecae7db5e5a4b6a51b09f4bf8a989e1afacbda3b":"3cbcabb83aab5a3e54836bbf12d3a7862a18e2dffeeb8bdd5770936d61fd839a":"f63b30a3efc0273eba03bf3cf90b1e4ac20b00e53a317dbf77b0fe70960e7c60":"ab9af144e8fad6a978a636ad84e0469e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #12 -ctr_drbg_validate_nopr:"2c59520d6f8ce946dcc5222f4fc80ba83f38df9dce2861412eebb1614245331626e7fb93eedbad33a12e94c276deff0a":"2882d4a30b22659b87ad2d71db1d7cf093ffca80079a4ef21660de9223940969afec70b0384a54b1de9bcca6b43fb182e58d8dfcad82b0df99a8929201476ae9":"d3c17a2d9c5da051b2d1825120814eaee07dfca65ab4df01195c8b1fcea0ed41":"dcc39555b87f31973ae085f83eaf497441d22ab6d87b69e47296b0ab51733687":"9a8a1b4ccf8230e3d3a1be79e60ae06c393fe6b1ca245281825317468ca114c7":"fba523a09c587ecad4e7e7fd81e5ca39" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #13 -ctr_drbg_validate_nopr:"1c1207f50b645aaed5c16fe36f6aae83af4924e6b98a7e2a2533a584c1bac123f8b6f0e05109e0132950ae97b389001a":"8ae9a5903da32a38b7c6fed92dd0c6a035ca5104a3528d71a3eacc2f1681379724991a0053e8dac65e35f3deee0435e99f86364577c8ebdba321872973dc9790":"568bfee681d7f9be23a175a3cbf441b513829a9cbdf0706c145fdcd7803ce099":"e32cb5fec72c068894aaeabfc1b8d5e0de0b5acdf287a82e130a46e846770dc2":"d4418c333687a1c15cac7d4021f7d8823a114bb98f92c8a6dccc59ff8ad51c1f":"194e3018377cef71610794006b95def5" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #14 -ctr_drbg_validate_nopr:"28254014c5d6ebf9bd9e5f3946fc98e55fe351deee8fc70333e4f20f1f7719a522b3ea9a4424afe68208d1cc6c128c47":"98a0db985544c33990aee0f69655dba7198e6720ce56ff9d4662e26f0c6b4ee7ab599932c05295f6c5a4011085c5b2c861a5a8ae4f572ce614ff2dafc0fddb34":"64215cbe384f1f4cf548078ffd51f91eee9a8bae5aacdd19ca16bcaaf354f8ad":"2e21df638dabe24aebf62d97e25f701f781d12d0064f2f5a4a44d320c90b7260":"7f936274f74a466cbf69dbfe46db79f3c349377df683cb461f2da3b842ad438e":"25c469cc8407b82f42e34f11db3d8462" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #0 -ctr_drbg_validate_nopr:"e26c8a13dae5c2da81023f27ab10b878":"fea104f90c5881df7ad1c863307bad22c98770ecd0d717513a2807682582e3e18e81d7935c8a7bacddd5176e7ca4911b9f8f5b1d9c349152fa215393eb006384":"":"":"":"fd87337c305a0a8ef8eef797601732c2" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #1 -ctr_drbg_validate_nopr:"8d7dda20a9807804bfc37bd7472d3b0c":"1d723cbc2ff2c115160e7240340adbf31c717696d0fdfecf3ec21150fca00cde477d37e2abbe32f399a505b74d82e502fbff94cecac87e87127d1397d3d76532":"":"":"":"7221761b913b1f50125abca6c3b2f229" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #2 -ctr_drbg_validate_nopr:"c02e3b6fd4fea7ec517a232f48aaa8cb":"0820fc21cecba6b2fe053a269a34e6a7637dedaf55ef46d266f672ca7cfd9cc21cd807e2b7f6a1c640b4f059952ae6da7282c5c32959fed39f734a5e88a408d2":"":"":"":"667d4dbefe938d6a662440a17965a334" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #3 -ctr_drbg_validate_nopr:"9aee0326f9b16f88a4114e8d49b8e282":"ef0aae3f9c425253205215e5bf0ad70f141ad8cc72a332247cfe989601ca4fc52ba48b82db4d00fe1f279979b5aed1ae2ec2b02d2c921ee2d9cb89e3a900b97d":"":"":"":"651ad783fe3def80a8456552e405b98d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #4 -ctr_drbg_validate_nopr:"1e7a4961d1cd2fd30f571b92a763c2c5":"a9262ed5b54880cc8ecd4119cce9afe3de8875d403f7ca6b8ed8c88559470b29e644fddd83e127c5f938bc8a425db169c33c5c2d0b0c5133c8f87bbc0b0a7d79":"":"":"":"1124c509ca52693977cf461b0f0a0da9" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #5 -ctr_drbg_validate_nopr:"ae0b0d2e84f48c632f031356cdea60ac":"554cf6fad1c376ad6148cd40b53105c16e2f5dd5fa564865b26faa8c318150bfb2294e711735df5eb86ff4b4e778531793bad42403d93a80d05c5421229a53da":"":"":"":"1212e5d3070b1cdf52c0217866481c58" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #6 -ctr_drbg_validate_nopr:"16b8c7495d43cd2ff5f65ad2ab48ecef":"7cffe2bef0d42374f7263a386b67fba991e59cefd73590cbcde3a4dc635a5a328f1a8e5edd3ada75854f251ee9f2de6cd247f64c6ca4f6c983805aa0fe9d3106":"":"":"":"d3869a9c5004b8a6ae8d8f0f461b602b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #7 -ctr_drbg_validate_nopr:"a2d5eff6f73f98e5b04c01967dffa69b":"59759bb91b3c4feb18c0f086269ec52e097b67698f4dfe91ebe8bef851caa35cadb3fd22d1309f13510e1252856c71394a8e210fdbf3c7aae7998865f98e8744":"":"":"":"a1f99bd9522342e963af2ec8eed25c08" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #8 -ctr_drbg_validate_nopr:"ea1f47fe5e281136706419ea9b652967":"0ec7c617f85bec74044111020c977be32ab8050b326ebc03715bbbffa5a34622f2264d4b5141b7883281c21ea91981155a64fb7b902e674e9a41a8a86c32052b":"":"":"":"daf75b8288fc66802b23af5fd04a9434" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #9 -ctr_drbg_validate_nopr:"6f072c681a82c00dcd0d9dd5b7ffa2af":"cd7ce90f0141e80f6bd6ff3d981d8a0a877d0ddae7c98f9091763b5946fc38b64c1ef698485007d53251ad278daf5d4ae94a725d617fc9a45a919a9e785a9849":"":"":"":"39c0144f28c5a490eff6221b62384602" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #10 -ctr_drbg_validate_nopr:"9d730655366e2aa89ee09332bd0a5053":"854766e842eb165a31551f96008354bca1628a9520d29c3cc4f6a41068bf76d8054b75b7d69f5865266c310b5e9f0290af37c5d94535cb5dc9c854ea1cb36eb7":"":"":"":"baa2a3ed6fdc049d0f158693db8c70ef" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #11 -ctr_drbg_validate_nopr:"3363881611bfd5d16814360e83d8544f":"6abfab14cbf222d553d0e930a38941f6f271b48943ea6f69e796e30135bc9eb30204b77ab416ac066da0a649c8558e5a0eac62f54f2f6e66c207cab461c71510":"":"":"":"5be410ce54288e881acd3e566964df78" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #12 -ctr_drbg_validate_nopr:"14e589065423528ff84a1f89507ab519":"0d2e446cad387a962ff2217c7cf4826dcabb997ab7f74f64aa18fbcb69151993f263925ae71f9dfdff122bb61802480f2803930efce01a3f37c97101893c140f":"":"":"":"fc2d3df6c9aae68fb01d8382fcd82104" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #13 -ctr_drbg_validate_nopr:"974c5ae90347d839475f0f994f2bf01d":"aa04d9fc56349fdd31d868e9efc2938f9104c0291e55ac0aa0c24ec4609731b8e0ac04b42180bde1af6ad1b26faff8a6de60a8a4a828cd6f8758c54b6037a0ee":"":"":"":"3caec482015003643d5a319a2af48fb4" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #14 -ctr_drbg_validate_nopr:"b3a110587a16c1eafe51128a66816ecf":"203bba645fb5ccee3383cf402e04c713b7a6b6cca8b154e827520daac4ea3a0247bbdc3b2cd853e170587d22c70fb96c320ea71cb80c04826316c7317c797b8a":"":"":"":"9af4f67a30a4346e0cfcf51c45fd2589" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #0 -ctr_drbg_validate_nopr:"55546068cd524c51496c5fc9622b64c6":"951e712d057028158831ca8c74d4ae303c6e4641c344a1c80292260bdd9d8e2f5b97606370e95903e3124659de3e3f6e021cd9ccc86aa4a619c0e94b2a9aa3cc":"2d6de8661c7a30a0ca6a20c13c4c04421ba200fbef4f6eb499c17aee1561faf1":"41797b2eeaccb8a002538d3480cb0b76060ee5ba9d7e4a2bb2b201154f61c975":"b744980bb0377e176b07f48e7994fffd7b0d8a539e1f02a5535d2f4051f054f3":"65b9f7382ed578af03efa2008dbdd56f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #1 -ctr_drbg_validate_nopr:"a0c92565640a3315cac8da6d0458fb07":"6e9b31755c1f45df7d685f86044ab3bc25433a3ff08ab5de7154e06b0867f4e3531ed2e2a15ab63c611fc2894240fdac1d3292d1b36da87caa2080d1c41bcf24":"c6c74690bdee26288d2f87a06435d664431206b23b24f426e847fb892d40d5d5":"4e7dc1adbc8bc16ba7b584c18a0d7e4383c470bff2f320af54ad5ade5f43265b":"c6fb8ee194a339726f5051b91925c6a214079a661ec78358e98fc4f41e8c4724":"c3f849ee7d87291301e11b467fa2162f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #2 -ctr_drbg_validate_nopr:"63e143bd6a87065a00eea930593f9b29":"62c2c790cb56518ed2d8d65952bbd4ab85a56463495c940b94f403a93338bdc96129feea9335b1a3e0ada7cf4c207f4732013bc6a52db41407bf5d6fe9183b3c":"7b4e9ff0c8f8c90f8b324c7189226d3adccd79df2d0c22b52fb31dbb5dfefba6":"49e1aecf2b96a366325dc1892c016a5535dd2480360a382e9cc78bf75b2bba37":"f4ce1d27e759f3ba4a56aaab713642b4c56810c9995fbfc04ce285429f95a8f4":"513111abaae3069e599b56f7e5fb91d1" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #3 -ctr_drbg_validate_nopr:"98dc16e95f97b5b9d8287875774d9d19":"2fab4a629e4b21f27488a0c9ed36fc8e75bee0c386346c6ec59a6f045975e29818440a6638eb3b9e952e19df82d6dc7b8b9c18530aef763d0709b3b55433ddc6":"2e9d2f52a55df05fb8b9549947f8690c9ce410268d1d3aa7d69e63cbb28e4eb8":"57ecdad71d709dcdb1eba6cf36e0ecf04aaccd7527ca44c6f96768968027274f":"7b2da3d1ae252a71bccbb318e0eec95493a236f0dec97f2600de9f0743030529":"841882e4d9346bea32b1216eebc06aac" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #4 -ctr_drbg_validate_nopr:"5dbac5c313527d4d0e5ca9b6f5596ed7":"c00b28c78da4f9ce159741437fe7f90e4e23ecd01cd292f197202decbbc823d9ce46b8191c11e8f8d007d38e2ecd93b8bd9bbad5812aaf547ddf4c7a6738b777":"460c54f4c3fe49d9b25b069ff6664517ed3b234890175a59cde5c3bc230c0a9e":"bf5187f1f55ae6711c2bc1884324490bf2d29d29e95cad7a1c295045eed5a310":"28fd8277dcb807741d4d5cb255a8d9a32ef56a880ccf2b3dcca54645bd6f1013":"b488f5c13bb017b0d9de2092d577c76e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #5 -ctr_drbg_validate_nopr:"254d5f5044415c694a89249b0b6e1a2c":"4c1cc9ebe7a03cde31860637d8222faeefa9cbf789fab62e99a98d83084fef29eafcf7177d62d55435a1acb77e7a61ad86c47d1950b8683e167fe3ece3f8c9e8":"71af584657160f0f0b81740ef93017a37c174bee5a02c8967f087fdbfd33bfde":"96e8522f6ed8e8a9772ffb19e9416a1c6293ad6d1ecd317972e2f6258d7d68dd":"3aaa5e4d6af79055742150e630c5e3a46288e216d6607793c021d6705349f96a":"66629af4a0e90550b9bd3811243d6b86" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #6 -ctr_drbg_validate_nopr:"b46fceed0fcc29665815cc9459971913":"ff62d52aed55d8e966044f7f7c5013b4915197c73668e01b4487c3243bbf5f9248a4fdd6ef0f63b87fc8d1c5d514ff243319b2fbdfa474d5f83b935399655e15":"994d6b5393fbf0351f0bcfb48e1e763b377b732c73bf8e28dec720a2cadcb8a5":"118bb8c7a43b9c30afaf9ce4db3e6a60a3f9d01c30b9ab3572662955808b41e4":"bb47e443090afc32ee34873bd106bf867650adf5b5d90a2e7d0e58ed0ae83e8a":"1865fee6024db510690725f16b938487" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #7 -ctr_drbg_validate_nopr:"e1a5dd32fc7cefb281d5d6ce3200f4ca":"bf1ba4166007b53fcaee41f9c54771c8a0b309a52ea7894a005783c1e3e43e2eb9871d7909a1c3567953aabdf75e38c8f5578c51a692d883755102a0c82c7c12":"32e9922bd780303828091a140274d04f879cd821f352bd18bcaa49ffef840010":"01830ddd2f0e323c90830beddedf1480e6c23b0d99c2201871f18cc308ab3139":"f36d792dbde7609b8bf4724d7d71362840b309c5f2961e2537c8b5979a569ae8":"7080e8379a43c2e28e07d0c7ed9705a8" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #8 -ctr_drbg_validate_nopr:"d1b7be857a422b425ae62c61e90a192a":"6ac34c4ce22b644632283ab13e294df2093e939d32411340b046c26fcc449d0fd6d14132c7205df303dbb663190e6e86ad12e14e145b6603308241f38d94eb5d":"aacfe8553d5ffef6abc3fd8f94d796cae2079ff04f7ab1b41982003f02427c7a":"01d2d1bc29d6a6b52bb29bd6652be772096ca23c838c40730d5b4a4f8f735daa":"27af728ee07d3f5902f4e56453b6a9feb308ef14795eb5630b2651debdd36d5b":"b03fbcd03fa1cc69db0a4e3492a52bad" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #9 -ctr_drbg_validate_nopr:"a2c49aa6f3f92e36266bf267af5877ed":"5684c3eb99314127078484959314d52b3bc50cb3615c0eef6b48850d98aee04c528b0693be13ed1bb4040e8e96cb13c316143f0815cd68d1bb7931a3d9b88a3d":"566522085426b76bdef152adefd73ef0f76eee4614bc5a4391629ec49e0acffb":"30ef9585148dd2270c41540a4235328de8952f28cf5472df463e88e837419e99":"adc46e0afcf69302f62c84c5c4bfcbb7132f8db118d1a84dc2b910753fe86a2d":"4edc4383977ee91aaa2f5b9ac4257570" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #10 -ctr_drbg_validate_nopr:"43852c53041a3a4f710435dbd3e4382b":"ab7bca5595084bccdba80ade7ac3df2a0ce198fa49d29414c0249ec3d1c50d271ca74ba5c3521576a89a1964e6deded2d5ba7ff28a364a8f9235981bec1bedfa":"c5612a9540b64fc134074cb36f4c9ea62fff993938709b5d354a917e5265adee":"eee2258aba665aa6d3f5b8c2207f135276f597adb2a0fbfb16a20460e8cc3c68":"a6d6d126bed13dbcf2b327aa884b7260a9c388cb03751dbe9feb28a3fe351d62":"e04c3de51a1ffe8cda89e881c396584b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #11 -ctr_drbg_validate_nopr:"52628551ce90c338ed94b655d4f05811":"b3a4a3c4d3d53ffa41b85ce3b8f292b1cc8e5af7488286d4c581005f8c02c5545c09bb08d8470b8cffdf62731b1d4b75c036af7dc4f2f1fc7e9a496f3d235f2d":"f5f9d5b51075b12aa300afdc7b8ea3944fc8cf4d1e95625cc4e42fdfdcbeb169":"60bccbc7345f23733fe8f8eb9760975057238705d9cee33b3269f9bfedd72202":"c0fa3afd6e9decfbffa7ea6678d2481c5f55ec0a35172ff93214b997400e97c3":"5a113906e1ef76b7b75fefbf20d78ef8" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #12 -ctr_drbg_validate_nopr:"0e4873c4cbcde280abc6711a66dbb81a":"1ab7c7d8fe8f505e1dd7ddb8e7cda962572f7004b2a14c7a7c5bcf24bd16616e2c42c50ae5db9981ccd7d0c79062ac572d3893486bd0ae1f99cbc1d28a9e4c1e":"e4b89e28663e853f8b380c8a4491b54121fe6927340a74342362c37d8d615b66":"619775878879eff9ee2189790ff6f187baed4ed1b156029b80e7a070a1072a09":"ba3d673e5e41bd1abbc7191cc4b9a945201b8fef0016e4774047ee2abf499e74":"4758fd021c34a5cf6bea760ad09438a0" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #13 -ctr_drbg_validate_nopr:"0684e8ef93c3363ba535c4e573af1c24":"748a5f5fde271c563a8f8d15520d6818f7ed0efb9b434adf2ff9471b391dd225b37868179ffa9a6e58df3b1b765b8945685a2f966d29648dd86a42078339650b":"e90c82153d2280f1ddb55bd65e7752bf6717fbe08c49414f6c129bf608578db7":"c17e97c93cfabe0b925ca5d22615a06430a201b7595ad0d9967cc89a4777947d":"3d554c430c8928dcdb1f6d5e5a4306b309856a9b78c5f431c55d7ebd519443bb":"d3da71af70e196483c951d95eb3f0135" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #14 -ctr_drbg_validate_nopr:"89b885ddb12abc4f7422334f27c00439":"e2366eec626bfd9cb932bcaa0569de6a7a37cf1dfde1f25d00d1a0c89fe25fea592cbd2af7c8202521fa48e15f7cc7e97e431b222b516a3ad2bb7b55b7fcf7f4":"c77ee92bd17939efe9bee48af66589aee1d9fe4cd6c8ae26b74b3799e35342a6":"23e80d36ca72ecc38551e7e0a4f9502bed0e160f382d802f48fb2714ec6e3315":"6b83f7458dc813ce0b963b231c424e8bced599d002c0ef91a9c20dcc3f172ea5":"81d13a6b79f05137e233e3c3a1091360" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #0 -ctr_drbg_validate_nopr:"ff568be02a46343113f06949a16cc7d9da315aef82f5681f0459650e5e180e65d1d77b00e5ce3e3f9eb6c18efff4db36":"77de4e5db3b308c38c814228583dfd1eb415771f4ae30f9cc2d35b48075286a4e8c2c6f441d1aac496d0d4be395d078519e31cb77d06d6f7fd4c033bc40fd659":"":"":"":"448ac707ba934c909335425de62944d6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #1 -ctr_drbg_validate_nopr:"6f092b85eb9f96427642f69467911172cba6df86e0db08d04e824cde6fb91d9b9af2cea53f42d53c45ee3e69a2327172":"667d3ed9f41a154ea33b55182b8bee4d7d46eff8e890c7036cf7c2665d44c28f9e3a8cff166dabfaf262933d337e729e0b6a60a51d00ba18f877bdc9d0cc659e":"":"":"":"16a200f683ab862947e061cddaac5597" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #2 -ctr_drbg_validate_nopr:"26e635a6a2b6402b968c1eea13c6a980a0ee9b8497abc14fccdc5bf8439008861f74de2c200505185bf5907d3adc9de2":"80e56f9893beb9f22b2b03caa8f1861d5b31b37f636f2ccbc7e4040ad3073aa20f2f3c6bfefc041df8e57e7100794c42732b6d4b63d8bb51329ca99671d53c7c":"":"":"":"807586c977febcf2ad28fcd45e1a1deb" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #3 -ctr_drbg_validate_nopr:"b239c485d319ce964d69bd3dbc5b7ab9cc72ac9134a25e641bcd3c8b6f89e7e08ef2d0a45cf67667a4e2e634b32d73ff":"c963e17ef46b7b2c68756019704ec7435ec093c423600b3f2f99dd8989f8539a11b1b0598e93e84d50b65e816e794421ab546b202e4b224a8494538dda85da82":"":"":"":"2a3218b4d59f99bd3825631a6eefb09c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #4 -ctr_drbg_validate_nopr:"0239545a23735b803ae7cb7766194917d6cce164f7ec4f65c6ccd5ec1db5297722d4b7466589da4d39f4585856bc1d7e":"71a440b70a2b5ce41b85de27d987fa2a0628d7990dd7cd1460fddc5410ce6e9bb0ae4f90231f45bc71188fd94e4170389a8bbe4a7e781c95c9a97ad78ba7d07b":"":"":"":"9dafaa8b727c4829dda10a831e67419d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #5 -ctr_drbg_validate_nopr:"237e8916eadd65e3422fe59ab257b7e6957fe24f760b499fbd052241879e8294b01d2169ec2b98f52660d9f5170dee22":"d8908cfc1ea8518c1442e46731f30fdad85399894db262b8f4fdc0dbcbf11b60b60b25d3108f4b169fcbef621a14c635525fa3af8ccef6b91f808479509967f4":"":"":"":"593c39c56bb9e476550299ee8d85d2fc" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #6 -ctr_drbg_validate_nopr:"28b6639b415c79012c749dc2a0d18433ec36eda55815f0841241453fa11b9d572b7c29208e01dbb0be91e1075f305d7f":"6767c3eb6ba1b19412c32bfe44e4d0317beba10f3abea328cda7b7c14109b72046c8691c1c7b28487037d381f77a3bbc8464a51b87de68bdc50ec9c658f915ab":"":"":"":"e390806219fa727e74a90011b4835ed6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #7 -ctr_drbg_validate_nopr:"ce735a8549fc3f9dfc7b96bf0d48936a711439ac7271d715a278718aca9e2fe3c801030bc74b048ac1e40852345e87cc":"510b0dc06e84ceb901c7195c2f00ad7a04bdd75e0ab52b3d2cd47ddfcd89248dd58e3f1aa8c1ffe306f493905f65369eaed2a5b337dff8ac81c4c1e8903a6ad5":"":"":"":"ba871ba5843083b553a57cf8defa39d7" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #8 -ctr_drbg_validate_nopr:"841ea92fa42c06769c5c52fe152d07837b8ff0048392caa5dd045054353d363b25439eb5885e96771dded4005f2baf42":"97511ae52590a0b64b75c37e10b89671880d2d6e8f90780ac27263dbc0e32d0824be5e80a88cf8fc3d4c607eb873c0322d09b9ca3498c4015c53ca6fee890093":"":"":"":"a8fb31362bd997adf4d9116e23dbaf10" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #9 -ctr_drbg_validate_nopr:"55cd76fa5f004b97bb8e14170f79f52715d18c60f142b06d16e8e06c274798190a79c8b325163989d86323c03dbe0d68":"bafc0ba64669c9a36514bde6169034101f29e2a0a4b9a55c0aae7dff0c5aca2371b523e26dc44bf75493bdaa023d1555294178288b70f1ae72150d9f7265b4e6":"":"":"":"fa16dbdaf01b3c202426adabf61fa64a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #10 -ctr_drbg_validate_nopr:"ff3f3098fa3d2b23b38ed982e7afb61d46b4848c878b9280f8e5ed6bd81176e76f0a2a85071a411829cf84421c22f23e":"92194e2c700fa724489683d0b6ddcf72c89b9c3f3ff584e802ae426be4908b1ade093bcf9baf7738b988dc0fde1739498a97c9610da853a7c83981c6a7b68096":"":"":"":"f85490426dc243ba09f9719bff73545a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #11 -ctr_drbg_validate_nopr:"7242c1020a63770cccf6f8100970990232a9d11d61c9b0d38fe5e7a568a86252a66481212e5d53c868561298dd5bdeec":"7c3806a32ccf3252ac27a92a07209cd7000b160faa70b9024420b903587d1d77f002d3abe28b563d32ccc502b88f83bc5996f3dbbf0f57835839eadd94563b9d":"":"":"":"2232181f08c1569efaad1a82bcb5f3ba" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #12 -ctr_drbg_validate_nopr:"a2e445290fed8187df6d2a57e68385bb62d700cb8f140410766b53e69e6a0f2939bbfa7ce091525c9051f064e383a2e1":"fdae5f1ea253108fcb255d215a3ce1dc1d101acf89de4423b75a74619e95f3feaa35b5e0bec430b0ad9567df818989c36c77742129af335c90ceb6dd79c7d2c4":"":"":"":"3841e2d795b17cb9a2081d6016a1a71d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #13 -ctr_drbg_validate_nopr:"bc885454e385d911336dda9b7a609a6a7079a4a5a860fcd704161c34658bd98685bb03418b7f24f2ed9475eb8ceb232e":"77bef884a91126564b3214029ac6842d86e4c1fa283e33d6828d428377416f66947e39a4a6708e10bfdae8337a6f302420a6649fc109d0f094c18c1e9361375a":"":"":"":"ea20780ed280d8109f811a6a398c3e76" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #14 -ctr_drbg_validate_nopr:"c1825cf00cdc2da93adb3e7a33c1f3a76c49166887883744ea2683ddca23f31900f25c434364c992a6d913f753a9c42a":"56940a6fc4823c9e42e8ffed63fc3cf46d0a2b305c236a511b0b5ec7005ecd8989bf2006ebe52ed55845f7cc25d3d0086cece95f0bff6fa7e17ddf474704abfe":"":"":"":"b037c7f0f85f4d7eaeeb17f4c8643a74" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #0 -ctr_drbg_validate_nopr:"19b83c0deea6463a3912d21ffc8d8041a5b30640352abc9652770cfca99dc53c9c09942ddd67b91f4da50a8615462ce4":"5d85c56d0d20ee39958a90f301d2f8bb136fa34d09b41a0c9375114a0df9c1dcdb2a62c4be398d9eaf2440949b806f0e5a977da608eeb652a41711d1e9b72655":"9c1db928b95c84cb674060a6d2f6b7a6a5d43e9ee967e9f821bf309ca5f8821f":"a3111cb57365c617df0b0bb3a1aada49ca789bc75903eeb21e42a7d3d0dd0825":"ce7f557c70676987d13aca60bc4585147efeed97be139871a1b29caa1e180af9":"4a49430277d64446e2fa75763eb79ec6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #1 -ctr_drbg_validate_nopr:"239f21be6cda23e8660c8a5e04c79f6dad6f363ac6dcffd9228699ae43fbce5ac3c51645500cb3eae68f0b604dc4472c":"2975a099f7e6530e5576534c25171f39131d6bffb99259f7f2bbf7d77de9fb1e829052b54a9631a733113021692eba1097438347c6de82307a0c2bb308edf065":"d451a54584e6d1d634217379e7e60e67303e19dd4ba63b097899c7349a5a7433":"a33dc24c6a656eb26275415581d568b7c2424a9c5fb9e2944ca35ecbf641f713":"8dfccc62379af46844df136122b72a878d9d61b40ccaa029b09e6b9f0b4d0192":"005e91760d89ecb64b5fc3b0e222fca3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #2 -ctr_drbg_validate_nopr:"e326abbe1db3ead3738d2ca4d9f1d62080cd23ff3396f43a0af992bed2420cec6661dfaac83c3c4d83347ac840f7dc14":"37c94d11ed0e93b8199d43d6eb242165dddd12fe39c0bea4cdef6bcfeb5d17bb866f080a9daef128f685fb3bc59c945927fb0aa3e17068515c3c92fbdf04a228":"1ff41405dbb3b12b8ddc973069edc2d2801af0e0dc9bde2cdd35c5b2d4091509":"138b6d2eabef4b32174afb0156ad1df570cf6e5f6ebde5d19cc30daffd9ca4f2":"f27cf7422808c54c58fcdde1cece92f5342c7a10ac43ab3b2e53362b2272e3ad":"506d6fae6fff9f222e65ac86df61a832" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #3 -ctr_drbg_validate_nopr:"cb0229d2bb72d910b0169e8f93318905aef8dd93ed91a2f8388545db32db3f2489e7988b50de64c49a9f7feb5abe8630":"514ec8c02439290853434e75e3d0bd159eacd5ac13b8f202cfd5c36cdc0fe99b53a1b7a1619e94eb661ac825a48ea5ef8bb9120dd6efc351e39eb7cc5223f637":"a6ed69c9216c551793107f1bdaa04944f6d76fe4474f64bb08b0ebc10a18f337":"e0bc1cc56fdfeef686e0c7ec359e2e8bd48d76c8643c40d12325328170bbf702":"87c5b23aa3c100ff9e368fc47534ff8fa2f9e2bfd3599519ee6f60164485cf6d":"bd419968f636e374268ccdd62403f79c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #4 -ctr_drbg_validate_nopr:"bdd156ef3c4e09b77fe8781c446eac55b562e4ee1b7d15515a966882d4c7fadb0fc7b37554ba03908838db40499ded5b":"9facd9f4587819acb358e4936d9f44b67ddf82616e79a44ffd6a2510f652f6b9cebc1424b5c642362b19f63c615f49686df66a8f80ddffb56ce0c0d8540150fb":"35ea316fe302786f626e3831530622b62eb33a3608d4af3384ecfcbd198f3f05":"8d4fae22290b6ef8618ded1c3412e85fab7b8d17fb9cbd09dbc87f97279cc72d":"2f54928372e4ce447201427a3ae05769ae1c54b2e83bdc86d380a90b07f2890c":"8045e8da88b1bc126785c8a771db5354" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #5 -ctr_drbg_validate_nopr:"154876298a1b63334624b367da984eb31d7260abe79ced41de35ba68a716233a5df0937b90f89dde7fd55a9693c9031f":"36895f574e9e9d08e6c885d305eb4764c1e5689d1f99c2462b3ebdf659e8ce43818dfc886ec797843bfee361b554cd5f969b0c7b0381b53f4afc1bcadbf7eb1c":"c3a46105c50a167a5b0391053f3814a06c90cea2c1fa9329d97fdbc62887ff6d":"54c7d66c65dbddb4665981bff0f503de37d724362aeb67abce6a870fd6a7398a":"58204ca953cbd46dd6c8870b358cba77c436870db49bcd3e2f92697bb580b460":"cd903c0f11ea701214f91715cfec11a3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #6 -ctr_drbg_validate_nopr:"94e273fde1e699f84aeef343eb0277c50d169bb5496575301021a2be50df6a555d1422ea88e0e4d905158e93fd8d0089":"1cd97b6e6e7f19401e409aea7b3ec33a8faefd71402b8f34a73c1cb1af215e0e87debe68bce590d41c1f90c6ad9db3d30b3901862e076d765ffdf58776e5fb7e":"6ee75e9f9aee6ac93e20f742f20427e5eb9b4ad2ed06fbba8c7b7870a96941ac":"0ba60399893ede284372bc4e0a37702a23b16aa8e5fe70ea95429af87ff291aa":"94bd2b51c32d29cd14e2123221e45ec0cf1f38766fb6bb0716856d0138f6fa39":"831793686abd406f7b385cd59e497b18" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #7 -ctr_drbg_validate_nopr:"5a699113ebf98bff9cb780ce29747a61ba2d7581a5716065d018c89348d7c2ed3f5bba32442cd192c1e37b77b98f5791":"de6d2a3b6ad9af07058d3b1d1976cf61d49566b965eb4e9b74a4cad8e286e7a40b254b860e2e209a8cb4cff3a8e615b84f5ae7505957a758e266a4c3e915d251":"ed18c16a61ba5ecc0755f94c286390a6d46e6e26439dadd36c83ebdee42b4b4c":"7c4550d058b85580be2053fd9d933c87041c5c3f62a5b6b303259dafc90d9041":"ebebfcb9b4b3595e516939ca0688422bbdfc4b9f67b0d6619757cb315b7d7908":"1a5a496aa2268483444b3740c9cc4104" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #8 -ctr_drbg_validate_nopr:"42450f2689b87a3dd940f3b9e3b32d4654c725a24ddd2c22f006694321dacf1980b50f7ac0401626453ec836039bfdc9":"4765399ccbbf3d33433bb992ee29e4381f28d800b05431f1c5b3e949c5db72c582bfe8ba08db1575b866816cabbe5e1d31d8a870ceed49fb75676c97020d1f22":"6ee5a7613c25ecec263a2fd2288948b2df9a05d50040c4031b0653878fdb067f":"68a1038481be7412d6a7c8474d4b2a2535c9b55ea301ee800d5a846127d345cb":"7a1915cf78e6da2dc7840cba40390d668d07571608b77857d2224c4531c17bb8":"80a6c622e64495f9a391f5a8a9c76818" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #9 -ctr_drbg_validate_nopr:"873869e194201b822b140bdd7797dd1ed408f2190b759c068b7019e6707f60751e101d3465c4ec57dbf9d1ea7597fa44":"d2f92706ca3fb9ced8183c74704440d7eedee1542c2e812f65afc83f4b62dadf1c51fa68f8d5f457a893211c8afc82c93e6a1e15822eff0d4ada6efd25d271a0":"8d0393d2a1ae8930ea88773adfa47b49060f0bf2d3def2acc57786bfbd1e2d6f":"5bcf5ff4fbd9eaabf8bf82ec7c59b043fd64b0025ad1ab2b384e399b9e13147a":"6e2d05e286c90502a3abf2ee72ab7ffb520ce5facfb27e095787a09a412abec3":"e1ceda71b8feb4b0d14d35bbb57a79a2" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #10 -ctr_drbg_validate_nopr:"1fecb5fe87c2a208b4f193e9c3ff810954c554150d544baea1685fb4774320315d5cb651be493ef120ef6966e3e7518c":"34bc292809674352ffb60786dca59ec799188aa401b366a48cdeddf37c12ee4c666f8fb3a0d53df4cd7191166d50ff01d992f94cd92da7a385ffe5795b197ced":"38249fed34a907768eac49267c2c613a65154eec5b73b541d7d7b314b5080061":"115be9cb914b50480fffe078d8170870b56129a0a74271dee063f8b2049e1be3":"69fa6faf7223f5bb1b55f35a544f78181579b1745990053357916fe507e51db6":"60cc92d3ba3ff0715f5627182334ed1b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #11 -ctr_drbg_validate_nopr:"4d283eb5ecd85a1613c975e24832770643613c9a5aee0d8649bc0d68c89cf1ea6ec3a1a22eefd9e212d602c338d64c6e":"4aa6917a5c9f370590d70536fdd89c916fec5e5bcbade8c6a6cfcf5b232c98a6b3e6b79a2dfb0778fbc3f1da7b06044d7b0fa2c04ffc3b71324aca1ee19f936b":"05a7092a684ba7a7fbd33533f9be58a4140a3855d4c5f44a31d665a0720c1739":"557ef1bedc890d1543de6cfeb25642782683d77a46bc8aa0836b07157599c7c3":"e87e45073ff8e36c38b128cd2275a160e431787b5e81f6c2fd7a37909eb72ea5":"31ecfb1bcf3253ba5f71b185a66c7cff" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #12 -ctr_drbg_validate_nopr:"a6f488104a6c03e354d5d1805c62dcd3016322d218747fa83f9199e20f6ab1cfbc2b889536bda1187f59b7294d557ff2":"22f8ad57a2dfa8010e2865ad6263823652917b84dfea61f639efdb0fdbb35c6341ca7721095d69686212dffe78410c0d0db94f04756d52e7d76165d5a1d516d9":"fb9951d563f7aa88db545874b1a3049c5f79774d486e7a28aed1ed75f59224a5":"b1ea7c6b53e79e4e947e63086dee32dcc17bc4f27fba6142f8215ec081cdd5c9":"0d12cc0a39bfbf87194e4070f6b54caaabbe48fa192b96cfed2a794d95fa299d":"62a1c5678e6e8fc738d375e2ca48751f" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #13 -ctr_drbg_validate_nopr:"9d67e017e0abdd7c079bc0354f33dab696ad64146802f06d6cefd9cdefbf55b197f5899e5efaa269cc0432c87648ce18":"d8be0ec1119ff959c32c9cf29914e3f7bf2b01bdbf806c2d9ba119ae2a2cfb565871762b02ee7bf68f1d280532fd7ae7368517f6f751739b228d23df2f207f35":"74a5e24477e8759bedfbaa196f398777108392efb8c64c65c0c9ecd6cd3b5f04":"70cbc6cfe1d6ab4bc30d66fa162d5d4b3029e4b1b9d759f3eae17fb508e91a46":"d3c538e042f0eb796b4af9b4e65cd850425c72e2c896fcea741c17172faf27d9":"559a5e04b75cec250aac2433176a725e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #14 -ctr_drbg_validate_nopr:"10914608a6d373a26c53ab83014283b678d73dfea65b4a3540af17f2fafa3b3cf698925b423edb9f946b906f43110795":"9ded87d289412dfda8935e5b08ec66b68abd1bae1fc5363e4341f58db954f1f9bc4b681c0d930ba080f85f8fd04c173cb2b77723ce67692efa7ade48b82b6926":"225159b4c679094f277516b2335b1e8b7d0a7ea33fd56822906d481fe412586d":"4967cd401cd466aba0be5f55615ca0d9fb8adbde5cb4e6ae3a0159fcd6c36bf0":"fec14f325b8b458ddf3e7f2e10938f4c2d04c8d9885bb5b9277bdc229c70b354":"1cd5c0bdeb87c79235bead416c565d32" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #0 -ctr_drbg_validate_nopr:"b023f6a6f73d4749b36eb54867994432":"2462ad760ddbca4e013688bf61381f190c7b2de57cbeeec81d6ab7b6f067b75adc3545887f8d2aa5d9b9dfcbfa425d610faa9c247eb5d71145f302918e908ae5":"":"":"":"c0620c68515a4618e572db6e4c14473d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #1 -ctr_drbg_validate_nopr:"7e0fcd953c1c8bb8d03d7a0e918fb59d":"56b2e11d5c2d87d2c9c90c285e0041beb4594a6efdd577580095612e50cf47c0b76208337e1e18453082d725629667d86226ab22944bbfb40c38b7986e489adb":"":"":"":"7194eee0d333fa5282dc44db964ecf5b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #2 -ctr_drbg_validate_nopr:"0130217d4a3945402ed99d7b8504fe4b":"28e592fd9db72b40ae4888078aedde260f6de4f0472a7601258e694d7bb6af6810ff4eabdffb332932765fa1d66650fb78cc2be484c0ba803eb9a2502020e865":"":"":"":"4652f0545385fdbe02d05aec21668608" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #3 -ctr_drbg_validate_nopr:"07854447e33521d2d997d90c0887f42d":"c561ab6acfbfb98879982ac7add92b80471e0154b77ccc9fd98e7c2013c411e8075948e97ab4db7505797a99d456e54e6585042efeff7e3970e399ea0d27537c":"":"":"":"1a14a810c11b4f0af23c6467c47bbde0" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #4 -ctr_drbg_validate_nopr:"68a8ec01581d6066391f3e5977465026":"747c7e9aace6d4f840c7b5261e0af796c516477421d52850a7072a0ab2c768fcc80c9ba8d18b228e77a7f6131c788a76515fe31aef4ed67376568231a4700fac":"":"":"":"a5723c43743442fae3637bb553891aeb" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #5 -ctr_drbg_validate_nopr:"1459038c60b70bae7af0da6cfab707a2":"9f7d839310846bd452827a185539c0eb0f106acc7bc4de80d3521a970b23483d57826b1484d329a2d1c2ecfeaf8eeffbaa6e1a305e3f1e47b96ad48a711ad1aa":"":"":"":"5fcd6bf108fe68b85f61f85c0556f5c0" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #6 -ctr_drbg_validate_nopr:"a3357db173df98da4dd02ee24ce5c303":"f1ce08587ac0338b4d0b8e075b42b6501e77758b30087de028a8622fb7abd7f65e3b4f802d1a472dedb9c1a6dc9263c65918d8b7fafd0ae7e9c39e2e8684af3f":"":"":"":"8a5fa11d8e78fbf1ca4e4ca3e1ae82b8" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #7 -ctr_drbg_validate_nopr:"212f4c80c7e9287c8d25e3b965f91a3c":"bf1d715b3f56c433827c9cb429bee5ca61c80a8d9b2fd4498e1c86ce703637f8f7f34056ab0039e0baa63320df0ec61de60354f2ece06356d9be3c6d1cdcc4cf":"":"":"":"04ac2f969e828f375b03ee16317e8572" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #8 -ctr_drbg_validate_nopr:"46e85752e0af82fc63932950120e4b5d":"ae4316424fa765179404188eb8839ce84ad8db92cb12f39089a93a2dbdc371e2fdbef1ad080eb354eecdda3a10ea66ef647aa095afa1786c01bd1c9f70d8da4f":"":"":"":"de576284d8ad36b31bd4f8f3da633e36" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #9 -ctr_drbg_validate_nopr:"ec2459b1dd7f50df63e14e40aa4a4e66":"b964a24bf98264327c0b9e2e1c99ed1b35f534be801c996f318bc2074ed2500ba8488c4feb442b507c3220523c0041c9543133379365e65e092850a5e3f96cc9":"":"":"":"4d466e2f388aae40d1b31ce1f8ddc5e8" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #10 -ctr_drbg_validate_nopr:"acf480d54f4c66d611519b72f2c0dca6":"d5b3277cf8badf6be86af27dd36f23ffc580847c5fcb56c4d8a42339336f185c38ffb86f4d8aa7646c1aaed6c2b0c7ae7e4d435f481d62bb01e632f6bbb2abf9":"":"":"":"746aaa5423ef77ea6b1eda47410262dd" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #11 -ctr_drbg_validate_nopr:"edb80fddc595b234e3c5c03b2be3d721":"94aad8c772201435543efd9013c9f5f022038db6864e9ed4141ea75beb236844da6e6a17109262bc80f528427b37d9da6df03c7dd25be233774384a7f53197ea":"":"":"":"511927f10f800445b705ea3cfe6ec823" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #12 -ctr_drbg_validate_nopr:"c7790c9888b0e731ca6ccd60c32bb98a":"967050c11050a6d99a5da428d1f0fc8068b29ba4c66965addbfd31b745cb07d2439d268ab32a5fa2b1934bf277ff586506a941768468905ed980537d8baa1d07":"":"":"":"978493f0cece6f94d21863a519e06dbe" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #13 -ctr_drbg_validate_nopr:"58c75625771df61c48a82590eeed3378":"be3120e8515a98701b4b2fb0667de2bad3f32bcbf10fb9b820956f9aa7ffa1bbbafb70002a9c7fdd1cf7e76a735261798dc60a1163919d58e39ef0c38b54b27b":"":"":"":"90f5c486e7efe932258610e744506487" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,0) #14 -ctr_drbg_validate_nopr:"d3f64c11aa21bb2d12278847547fb11b":"855c0e3a7567730b11e197c136e5c22b1dc7271d4dbe04bcdfd2fc0ef806b3c05b4264ee6c60d526506622ebf6130738dba4bf35c13ce33db19487312ee691fe":"":"":"":"33ed7089ebae738c6a7e6e2390d573e4" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #0 -ctr_drbg_validate_nopr:"132ad1c40afb066620f004f08409c59e":"2e5beadd89b663b3903d3a63c3ab5605bfb1a0045a42430e0220243c51a69f7ff7678c2f8edb7bb4a29b646f3edfaca2463f9defd342da87d22b1b8fdb012fd5":"150deb841d1a4d90e66e85b036d9f5a7efca726b907ae3e8f05e1d1338cdfd32":"fb199beeeaf3939be2a5f9e6ba22f97cdd2c7576e81eccc686facbdf8bb4f2aa":"4293341721f57e4548ce8c003531d38622446c8825904e1b868dcddc626c5164":"66d8f3bfb78186b57136ec2c1602e1ef" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #1 -ctr_drbg_validate_nopr:"1c1502ca97c109399a72a77c8d6cc22b":"1d33b1b257a3ae1210fa2099307916a73dd92270769697ea2d7901f56865e3cae1be94b5024d0da3880bce06f0b31231c5a889f8ba3d92a20844b61009db672d":"23eede46eff4a04b08dcc2133e4537b332351f8469630f11b0c8853fb762a4bc":"6fd9f9da108e68aea9d1cecd81c49bcd0e7bedb348890f2248cb31c4277369f7":"76bcc11bd952123f78dd2ba60dd932d49203e418bb832d60b45c083e1e129834":"a1eee46001616f2bf87729895da0d0d1" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #2 -ctr_drbg_validate_nopr:"c79c0a1db75e83af258cdf9ead81264d":"5e8cc0fdadc170ed0f5e12f79a6b9e585f9d7c2926c163686a6a724495d88fabcec940d752545cae63f1792dcb966a7325f61997ba8883559ad6f6f8fc09898a":"a2cf6c1c9e4489f504e17f385f08aa82775aa2b0a84abd0b7ee3c6b393d7fd50":"c7529b874e07d4b876196786d510cc038c9e1ab93c461df2474eba484ae6876f":"63c6e7f3548529386c9f47c5aece52ce8454da5db9a807a1b960f7730a61582b":"43b7931e0b3b3769ef8972d0026896a3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #3 -ctr_drbg_validate_nopr:"b44d1dd914e88840bc65a94ee199b3ac":"c3dae1863d323cc78f43ccb3f632fde29130e6b23b843ff5a8d79fddc3c1f92b55cd3dcaf7848d40d189c0de7790bebb889e01be05980dcdf30d2b3333426c50":"41e2fce9b48642a1b9bd1695314adcdd38e1a8afe4891e633c5088c6753438a2":"1eb3f8bbacb0c6b901718bfd7eba29f6f87e1fe056ad442d6d38c1351a684e1f":"85570db773f3f5202967376f91a0a9c09c89cd4eddd58cdc6210335fd5e7acef":"bd53036538d9ed904a49966b5428a2a8" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #4 -ctr_drbg_validate_nopr:"5ef97f7af7df5cc6fa94f8428ec7be5c":"be67434ac4d77f0f50ec5bacc8112d1480bd9f20d6b4ea768d9b51bb69c1dffcd8c30e4412127644aaa6fc453e59fb633f6a5a8c2f69e40d1863e35d4d4c0227":"a64195b1e56cf97fd81e99fa1833d191faf62f534c874def4b8bed0ae7195ac7":"353cd3a8d9cd92bce82cd8d1cc198baa9276db478b0cfe50249e30c3042ee9db":"393ab4726f088fdfeb4df752e1b2aec678e41fa60781bc5e914296227d6b3dfc":"24bdc2cad5dccd2309425f11a24c8c39" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #5 -ctr_drbg_validate_nopr:"567130da4e7ecc4db0f035d7ecb11878":"cc070df6aa3623f74afd85b59d1bef2b1fcd9c8093362512ff109ebfe992ed75bd58b5ae1561d702b69065eb3cc0bd328ab698d4c6ca274e96d673309b5df5df":"42033054cefa1f20b3443f8ab7d9635ae8f047b833c8529245ba8b4aa07edba3":"72972fb947bff60df291888ddbfd91e698e0c1c26a346b95fc7c5dac596d0073":"af29b6a13602ba9c6b11f8dbdeb6cb52e211f9cd2fc96e63b61e3c1ec631d2ea":"b0849f8317e043271a3fc5f2eaaaaba2" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #6 -ctr_drbg_validate_nopr:"2c20ae36f1e74542ed8b0a177b8050aa":"c4bf7a39caf26dc3f61311f54ab3095493c626a988f5abee2826c67a4f4b4d6a02329c99a6bcb5e387fa160741c871acc2929c1cc07f2f0a7ce1619eb7da1ec4":"97c148dd10c3dd72b1eaaafbe37a9310ed15b23872e9f2b62d1feb91ea81ffe3":"23df0c30c68bf2eeb55d273a596f1f54ed916271595b906e4f7793b7a52f2573":"22f120fa09215105116919aaf8eebcb69eccd5da42feb737018a05268bf08e46":"b7c73b9ceea2e6ca0be6a3773cdd6886" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #7 -ctr_drbg_validate_nopr:"2076f9e116a2648e1e664b815b1b3674":"979b5aeafe555aeba152ed66e32e30e110df20ee1f227932a72acfb8218aec767941efaefa091c0128dad9b93b06b28fc76e01f275e8ce1c02f0eb567c914f89":"d12fb10b9fa6d2fd0f39cf76294cd44dcbfa80dca7c2f8537c75453d985ef551":"4228a99faf35547a58c1a4d842301dca374f1f13c6fd067b7c1b815863b73158":"a3a7d5f1e2dcf95a90715ec5fd32e7f88c38b0a452b6ccd1f107458db4f74fd6":"8a63a5002a3636b241f0bec14fd9c2ac" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #8 -ctr_drbg_validate_nopr:"a71015cf06ddd0a6cd72fa014cf0aee6":"c810cb9db0f169dbc30fda85ccb6d4c40db68d429eeb3653070db7641fbbaba60ef0ff970eaf40887b7e154e2ecd5331de7004689ec604e69927da630a8dd7a7":"5f99f45d8770041703e5a14521c501904fd05ff3340835ac0c41b86442e4939c":"eb7efa6e46ab926ea04c87eb9ce454f5b10717bd9d85305f27d71bea1bc991b3":"cbc80c6171d098fc81023486d327efe2415a0f32e5fa6f6793ce1d0e98783258":"a353f6b350404f3f7b4fb724f84a948a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #9 -ctr_drbg_validate_nopr:"395931837614c322d8488ec6a2c4c919":"831fc8d63592b6ce358c08aeac39d67c3e48b4c2617735b6fe5e9fa44d7aee9d60f2fcf549db239d5bed9c608c94e8f8c23b32901442ac53442127377bdcf205":"eb261c737c0a17c8cb1ae055c143f701b74c96c852e4a76ca3ea045e7efdf5ee":"153276007b3843a897efbf022bd1bcabcf655c7eb8acef9baac710b339ecfd99":"a8a5cb17a2945e5b41ff370cc88ac498389b89b6cd82bb3bbde81c212f7c17d4":"537fc2b73183d2c0c106886937a6609c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #10 -ctr_drbg_validate_nopr:"9a1983859dd6c4cb602970d705952b2b":"68c5cf31f7959ffaa83af9dd55a75ec001befbf835e42a789ac42d39d96128eb6d9b3f07ced15e57e39760390c065fb4425c19ef7184635c18e5ed28256937e1":"e06497a181a5362980579c91d263f630ad4794519a64261ede8b36cf0ac5e713":"714e4fc52aea763e23a1f5b18949ab8fd949f1768560559bccb49d78d51dfab5":"6b6b7f65fd472ad428df2bbb86b85067d0a6f89d9233eea92f5189a9163d0419":"e32af8a81c59dc44540ed8845b447fdb" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #11 -ctr_drbg_validate_nopr:"230576e9518fb9a6a8391a84919b0d97":"6193f0e7b33ce19fde922aec9c93f1271ebcdd296d9c8c77029b59afa2064e3159088e07e91c14a4a3dc23b6005dd8ef1425d7d2ae8282a5b30b7498b6754234":"ffaca30a256d18836a0d49bbaad599a28fc7821d71aa91b97158a492d84a6280":"a3da13852d0717afed7c58c52530d2ae047b645a5e7aa8cfabc11478444151ac":"e15fdaeea31c95555fc509d2a266abf78d86ca11aa2f87ce1041142eb9f82bae":"7906f8da1e140345c191dbc2de5ead1b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #12 -ctr_drbg_validate_nopr:"e08a3a33adb4399a9be72fead224155f":"cfbe8b1464b00bb9e0d18b04d2040ed9bd822741188812b98a440fbc66ff018ddf6c0ea20c62d01b8237bc7c3da9e3f9fb874fca79a360b4f0f967d8d02083ba":"56f975849197e2eae5a2e6fb445a93c1fadf57280ac27e27c7cbea2cb00c10cc":"0a6d9e2d6e181addab0ea1ee89c65ce557e10fb8e8d43a24cdd27033d3fff507":"823e9400a9f563cc1fa5daf10f4ff1ab8affa18d8371f9cd0e067fcddce8caed":"5ded298f98cffb2e7f5ea97bd50c7e3e" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #13 -ctr_drbg_validate_nopr:"11c13b917d9f94fd7a008566d8598e89":"f53343a5a455132df3d1b03db39e44d933855b375d7422ad0d07dfdfb352af28946eb29980793456ec8634bf113e75783246bbd05aa8a7cb5886d372fa012f58":"ff1d8d33083023ffbe28f153bddfa9d9f3c221da16f8f20967d2508fa7752b55":"66a98c7d778d798617e1d31d4bdfabf8d381d38b82125838ddf43fb7f5b27dc6":"407c72d7c890c00b249be00a53ae722e5d8033c84b1e1a6a69d4b278ba5db9eb":"67ab88156f20d03b3a1bc363daefc0c6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,0,256) #14 -ctr_drbg_validate_nopr:"7b95343a4ac0f8c8b2645c33757a3146":"3d7e2987860cbcba14a12594e1a394ee754c9a7a65cecc990bc79b5e86e672e12f8c144d843e1abca46b4759a11b3d29f4e219077a8696efadee618f254cb80a":"16297534a79c4ae7493178226b29e42a6f1e0066aeaee8b5af65bcefa2ee3ebb":"b429ee986f16fb35fe2c47c03c0918870b4560f4ec4678f9df471cbd7ca6a887":"2b14d612eb00c7fba0d8e23bf91df91daef6f8e279e0050d5497ddf0f3466c76":"8f72c17405163090fe0bd795b65811c6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #0 -ctr_drbg_validate_nopr:"327290da2e9a19c840de8d33e425efaa5aa7a7afa4e5a812065965478d640f78520cf3c670b098943fec1914d4c8c411":"80bdf18288cb8adb6e3dacb09c553af2e7317c194d37f433eec27e324a0bad752899bda91fd41e5a08acdfd76007aecabc19c95a8bcede310f7320ce97aaad0e":"":"":"":"c26222662ed3a649a1745dee5df4eef0" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #1 -ctr_drbg_validate_nopr:"be14f473472db07a43b7f9a517735d7f7ede2aa70dbdb729bc4f578a0dce9d7fe9fd97939cd1ef731262417b5213bd7f":"ac71ff53140c1383eb379e5311e37637af933db494e5e689d065661e9095b8302e4174c392f324fac43695d9381e3cf4626a5347938ed9e21502cbd789cca363":"":"":"":"4bab95f9f05fc36a337b6f2582c2ce98" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #2 -ctr_drbg_validate_nopr:"88c31e24f4f859b668946ce73f8600621a70731440762b3c267ceab52a9d77a23d6f70ddba0e46a786697a906ccb18a3":"bf9bf25a949d447274a8c72f1ae51399521f8aca39b1b37bb7b4d5cf3c67d55ef8dbacfb71aa9c5949416e2868b968883e517215bc20292894f8406ab39c1ea1":"":"":"":"841aaa0b171d1526ef365b9201adbff3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #3 -ctr_drbg_validate_nopr:"8545a0de5ea028c8e5976d5b58fa50079b20ba716f0856cc1af7b98537c895f0266b956542d2b8ca661aef5da1f7f8c5":"686f4f9ee74c3402845fbad9353d7dfeff727584d892eb64bd84b764110cbe4ac8581e7e23acb95caf12979983e8947c570264aec292f1c7b756f7184007dcba":"":"":"":"f6d6ae6449b2984df8bcb69584fb16f3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #4 -ctr_drbg_validate_nopr:"d6cd4b4fb9105374605deac7bb49ad792eb225daa560f2a86f66269bf9afc2ea01b6ee6f0eb4926d2f09329df6e90d79":"5d1b8fa0ca2ee127d1bd41423c17b9a8c736715cc2906818e9216dfd81b7637b66c89b772b55ae707c6effa2d9ce7425df26f966646ab613d5599143cf51e5e8":"":"":"":"c36ab451116d733eb4377de3511db5ce" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #5 -ctr_drbg_validate_nopr:"e73ebae0d0834fdff1829ac3d9722fe9f1bc65b5f652fae5f7615af116440e3d5709b5cddd6065d568c246820de46b09":"2026cf7c1b1fe9645ab8759958ac04fb1d8938b9913c3b7f22da81e398b2c00b1921e1d4edb5d21c4531515cb0f9644fe8068685b9fca813176e6780796e8ded":"":"":"":"98d1dce30593de8a8d5b4d956f6c684b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #6 -ctr_drbg_validate_nopr:"a53c1813c06b609eff9ddc77204b085ca985f22170b8ecfcbbf45ea11c45c24fcf25bc33150f9f97ce48244d5beb685c":"1d0dd1a87d59c69f28e118e1083d65f1ee0df31f6308a92dcc47503ec4d20a018d9821c6a7d64385724f0e941231426e028efe6d75e53ff8edf095ef1baf2656":"":"":"":"035cec3a24ba7c44e5c19436c2689a75" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #7 -ctr_drbg_validate_nopr:"16d5b8290693a5c40c5a526dd6d653ac54cabb5608d77bb2cb7d6270b96c2fe2de076716ae8cf0a5c781edbde861dc70":"aa82a5ea33439d0c16a1cc13cbae53b169f4d369bcbdae81a9a38129c65ae0ea4f720576c012f8d7eb1c0202003c39d28453a22e502b4949cf5ba23a727721bf":"":"":"":"de4ed9d163d11e9b52470d078df4c869" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #8 -ctr_drbg_validate_nopr:"68bfabdbb821cb978527ff18ce37c96c79ad751756551f36b6991981285a68854ec7f72f548c3395ad3ee40410064d4b":"3da9e9518eb1f1b6268e4597f158844ff672ddb414f7ec23fa66d6c86b90a732a7b3016a3387ec3dbed34eb479413d017932ebf9f2a2fea0b35d2bf4e06718f9":"":"":"":"ec4e3e2b6b8763deb17b8611d1fe7953" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #9 -ctr_drbg_validate_nopr:"171a74ab694a7d7c2baa3ccf103ad94f11094e07a955ae9ac3bad370f1448753e99b63cc23d1878ab66f94136ec2ecac":"72ebeda7342770d03bc0e531754f946ca5cca684c41f9d089fe9147fad93b6154919c5cb2e6d162fbfde7b9ff0aa590a17993ca6c80bd59eee4134fc2ce944d8":"":"":"":"582ab4f105c3e1fed9593f58fc335fc3" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #10 -ctr_drbg_validate_nopr:"caed30015b34064762591eba9a59f440566a6621832f650572362229e8a38cd0f5d6d322afd8444132056690d6fa5540":"8e27f0dbeae4613bcf0011105f824ed2ecb150a83a0994f8f6607833755216e016fb175e51d42370afe27b11c18477886b530c95bc31bd1c0f8fe00f61fc15a0":"":"":"":"d42787e97147d457f1590c742443ad92" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #11 -ctr_drbg_validate_nopr:"c58d62f8145622cd86cfbda66bc26d2ce4c5610cd9cd1c326b99b60355a6fe751783c07f2cc21ba68f1f20ca70f0ad31":"38a8b685e6bbab67824f4cc72995043ea2854f067f2afaec762c9e78ff9d585a25bc63c8d0d075d06d43f3f694733982d26cbe0648b2d0cf8053918b912c303a":"":"":"":"84001709f15a2fd167c161b5d376d86d" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #12 -ctr_drbg_validate_nopr:"dc9719050d5257152d8a7d60d3ef1fc5b8cb1700bafc7de863c019f244779c464b6214f21a2f6d0aa3ca282007615ce5":"f188a1ba21b1791ebf8a08d8ba555e49423d9178a561bcc1672539c3a7ba1d856eae9922c4d96c181ed045d6f1d15e855690cdae451edac60f1ca2021f1fec57":"":"":"":"7540fed313c96261cac255bf83b5ae99" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #13 -ctr_drbg_validate_nopr:"ff057781af4a4a1eefeb26ab38f82a2efb6f065de290ebf225bd693dfb1f97455b49143bdb430324c9d945c48824f6cc":"0ddd0f4a43a7b54d9abb0928a2242c378db7a95a0b206baa642afe5cd55108f412f1d727fd591bca2c76355aa62aa8638cfa1916739bc66e02b9459ccd0881ba":"":"":"":"8b6e74a94fcac0d2f212d3594213fbb6" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,0) #14 -ctr_drbg_validate_nopr:"ef027327e47fc5875c01cb17d798fdc2b27a5c78000727842f8a516f4e8dd34afc167ae145b1e763bebdca51e2f461a7":"128566fe6c5b5595742190519445c25db85ee0ce29371f4cab213400d479d2bfe27655155be0fa237173abb214f0226a2f1770802dd69485adb25e6d837485e1":"":"":"":"76cd1553b2b73d4ef6043a09fb90d679" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #0 -ctr_drbg_validate_nopr:"8e1a59210f876d017109cb90c7d5dd669b375d971266b7320ba8db9bd79b373bcc895974460e08eadd07a00ce7bdade9":"23677c04a2d6ab446b7b3c582a8071654d27859441b10799f08b788378b926ca4306e7cb5c0f9f104c607fbf0c379be49426e53bf5637225b551f0cc694d6593":"19e914ffbc6d872be010d66b17874010ec8b036a3d60d7f7dda5accc6962a542":"bd7a0c09e780e0ad783fd708355b8df77b4454c3d606fb8de053bffa5ecf9021":"d284dc2caf6d214f8909efc9a75297bccfc04353c2788a96f8b752749c7fec0c":"129d256e7db6269e5a0a160d2278f305" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #1 -ctr_drbg_validate_nopr:"00674e633670c9971be7af789d37d5a4ef567b3ca4766722cd8f67e09d21cbbfa08d43ea1aa259999c6a307ae6347d62":"ec47b029643f85ea19388b6e9de6ab22705b060ae10cee71262027d0bdff5efd7393af619bc6658612fabc78439a0bd5a01255563a96013fa130dd06fd0f5442":"5b92bce3f87645126daa4704fd7df98b880aa07743a57399b985ad1a00b1f2fc":"8199de1338c688234c77262ef35423f4695b277726c76d8b5f426399c14d83b5":"eb95f5a4d8400cec2d4e0f548b6e92636b5e284fb6b61766a1f35bb9cdc5df0a":"9fbe95817578eb272aa9da2f509c2a06" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #2 -ctr_drbg_validate_nopr:"2553423c3cb0fae8ca54af56f496e9935d5af4738898f77f789a9bee867dfbc6010c4e5bc68da2b922cdd84eea68e1da":"a9bebd13711c0c22c94b3252654854515a9dc015fe69e688fbac9676b3d77ab67e19b020cd2427ac789ca17f656e499be3ba3ab2075ff95247c6355157eebc79":"e74e45fa28697a06dab08545fde0cc26e7eca31c40aa68ee41c4de402fdcc961":"5aa8abf7062079929d6a131cd3844a5fb6514c07061e25cad67677d867297685":"84819109b2e09b46ba3f5464c34b28ce25a186f0e0fd83fe5fa0ab026c01292a":"3846f3406e49040c48b5cfc9cbc75d1a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #3 -ctr_drbg_validate_nopr:"856f1371454bb9aa06be897dcda9b295817c6eeb865a9acb3a89d145bfe29ce5e1b3b12b714571afdfaca7951cd47e33":"a691b8bf6a407c93a36d18aeced4c75f76d8397d4ecbcd4e8f820cb393186897f05c1ef668b027fc78ba6da9bd554cc31a467d47b5e534b5340c7799383ec05c":"2c81d1e94b33164a177d0183d182fe7d23ef4f88444246464e58bdd0de38d82c":"1b5dae81c96771bea091521c0973c5af76a03e3624160e2511e57ff43a1d32a9":"bf5878e2bd139f8f058f3d834acd771514da6d4c5b9ef84466e5a4e0e4b2eaaf":"6a5ea73aad476ce201e173d4d5a7ffcc" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #4 -ctr_drbg_validate_nopr:"0436075cf8cf62ce623c2301ebd45203c98282611cfa5a12dd7c04525ffa7eb343a607af2f57feb7ce3af97e0abc2285":"1ab9ada5eeebc3fc8e53f358b643476fcfd4dd9f092f21d2bc1c4bb1ffd01a0c5b207aaa09ff76a9cab0aa6ce62b6a65b2650ab448b8bb2e8696a7aa4b6f4e8d":"62f07d1f49e40f7f472985947ac4d8ef2d58216d918f7942b9c70f43daff8972":"37ae758141fbc890ee7e1d0854426b2984fb1c094677e6a61546e9315bab0898":"353d1dd0c8d8656bc418a6a3ace138ecd62819d4e21b8bd87694ea683ec0cc37":"bfee6bb4afc228da981bfe7f0d17578b" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #5 -ctr_drbg_validate_nopr:"d004a0893bf326d50ee52e04cb3e64409f204f4e9af780d5dd092d04162d088385b1f243000914c62cba3dadf9827c81":"c36004075f5fd078137ea08de6cb15f71aeb9eca21c891cfdf7a8c0d21790c94ffa93be5fa06beb5e82d9fbf173ef9b29c18511fee2455dbbe61d6b01baf024a":"7d313ada131650c7a506d2c194444ed202d568544caa75bbc60e57a0b74c9a10":"791d60238677ff53150cf7074061eac68335c0a7cec7de43ea63a5df0f312cd8":"6754366be264deb9e94f39e92ac2894bd93c1d7e1198d39e6eddccb0ea486f4d":"1c29795f03e3c771603293473e347ab4" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #6 -ctr_drbg_validate_nopr:"9a8c79b48ada409183f7260aa1415c9ee4e0b662e0fb81b5c56f85d76ed75efac5751dd4de7e7f8b53a36ee0dce2bc9e":"c4d68b76dc0e785823be2da9d339dc900132f12721e8a63ebe92e36d740c5a5e5564c367bff4a52bc70b1c60c86f0bcb7c1d99c414956a259963207184f01246":"04c7060f36569a5d9578c718627fc2695e8d783c0c8aefca2744da6664e67c8c":"1d4b7d587421dea4f7f3e77fcf997607ecfeb6e665a9a184138eb5736b16f516":"8cb8daf9cda230d8d39b829b968aaa5f5d3e3106d8b693227ab1b6201b78a7b8":"faa146098526546927a43fa4a5073e46" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #7 -ctr_drbg_validate_nopr:"a0736a5a8b0a394625d8985b05e3a9f277c7ba03b253c0e783359a8c4c086121cb46ea469c7756d5f099f5ee8ed16243":"ea7a046fa1760866bcb37fecf9ade7bcea4444662ea782d6f2820b22a96bab97b4c5adcb0a50ced885121b6b85a5074444b1555d9655f4f6ded31fe15281b30e":"47f3655dd05c42454fad68e330aabca49f27c76ba05ef07b6d77fba41153c0ab":"a5d07da3e399cc51d136096599fcbd9779e839b1fd86f21d7d1e23acd91f9fa7":"150b028b64a988fc1ffdfc9e66b4c8dfe4fcd8538ee976c89923638ebad33802":"6ffdc685169b174ad0dd84cdeed050a7" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #8 -ctr_drbg_validate_nopr:"d445a3d9332c8577715c1e93f119521bd31a464db08cdbd73d50080d62d5a48fba4cef2dd097ec749973037e33e8d6fa":"da5f9b2db13d0555846c00da96115036bb75ace66d56fc582d6cd0171e3e23335c5c2b8691e58af8899ed0204316479f849ca6f47309cae571ccb42d3d35c166":"79346394f795f05c5a5199423649b8b5345355ef11eb4239db1c767c68afa70a":"c22810de9987b228c19680eb044da22a08032148a6015f358849d6d608a214b9":"7747d68ca8bcb43931f1edce4f8c9727dd56c1d1d2600ad1fb767eb4fbc7b2d6":"f5c40babbec97cb60ba65200e82d7a68" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #9 -ctr_drbg_validate_nopr:"2728be06796e2a77c60a401752cd36e4a051724aa3276a146b4b351017eee79c8257398c612fc1129c0e74ecef455cd3":"d663d2cfcddf40ff61377c3811266d927a5dfc7b73cf549e673e5a15f4056ad1f9733c8ed875ff77928284dc1cdb33accc47971d3626615a45b9a16d9baf426e":"62349efbac4a4747d0e92727c67a6bc7f8404cf746002e7d3eeffb9a9be0bbdc":"381c0cffbdfa61a6af3f11ccd0e543208b584c3f520130e33617564ec7a48cf7":"6974043362f834fd793de07ceebd051599163d50489441005afc9db09a9ab44f":"df7894746c599e02d985b195ca3b4863" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #10 -ctr_drbg_validate_nopr:"2b65b56de410ee82e55bd2bf80e6cee356a37c3a3aa7042df45fa750a74e097b071fc18d6eed96523dd4fbb677b8c729":"bf03a6b3e8e23ff53369b971217dc3d3f4c1211329c94847347b3aa77dc7a3e0670381573527844a1ade786f18631944558defffb9a00900ca55f97ec726126b":"59255e5cd2221316c945bd614471df76d5b2f394b8829de82e5c30bc178565e2":"5739bc14f0f2ef9d3393928aee67b0908adaf587650928916d8ae78b0077a3b3":"6b236cf0ee0dba0c92b26c60235d3868715a80c0efbc0c898b6f0b1ace8146e9":"8374b571d7f2d94ce2bdadeb9d815397" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #11 -ctr_drbg_validate_nopr:"8756ee2c5e381c7c1dc530748b76a6274ef6583090e555d85210e2356feb2974a8f15119a04e9b481cd3bc557a197b8e":"19705743eaaaa0e8890a0faa2e0df37c820d556c7a45f04d76276f9f9ce2e7c133258ae6d1ba9cdf7745d01745763d18dcd1af2c9e9b0bed2806e60f0f9b636c":"2b4a92b682e9a557466af97b735e2ffdbac3bfc31fd5be2cd212cfbd4b8d690a":"e86504f10317bbeab346f3b9e4b310cbe9fbd81a42054f358eacd08cccab6eff":"19ffad856a6675268cc464ca6fdb8afd0912143e552668528d1484c9a54592cf":"f347fd58aff2999530e258be77591701" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #12 -ctr_drbg_validate_nopr:"f58be57e5035d5c455b17a41ccf7542ffd77f5c009e0a737118ed6c4188f78fcbdbe946bf82e1fa50fd81691de82dcf3":"f9939592ab2b31d92ac72673da013a588ea17bbf02cfd6e79d79f8296601633d04ceb005110f266e6100040ef33194858def8b535314c73caa0e48fc4d2f6e2d":"bb1cb21a316d4b88093cbfc7917d614dca97090cdc8bb340d864547cb3e1fef6":"7e42d5439d81680c8edf5c571d548699730cfada33b650a4d510172a42b298bb":"e9e3cf180f72ba2c1a45d0a94b822943612143e0b642398796b0428ae1af6cf5":"d0c83a4bf3517648b441d411ddcb808c" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #13 -ctr_drbg_validate_nopr:"898064243e44ff67151736ce8bb6f1c759cab4aaca9b87543a1ac984ef955cd5db76c1aa56aff83f1f6799f18fe531cc":"b8d6be3036eeb5657fb10766354d4be897bd27973b3530270ccc02a08169a2e437b30a3635eb6ccb310f319257f58d8aa030c8aab616418e0914a46131306a0c":"37572428df5826e6ae5ce95db4ef63f41e908f685204a7b64edb9f473c41e45c":"28beda0e0e346b447d32208c6b4c42dcd567acfe1e483fb4a95ea82cb8ce55a5":"7a0fffa541d723e16340eeb960b1b9c9aae912477e0ebfac03f8f1a3a8bdc531":"611c9f6fc5193dbe3db96cbcd276168a" - -CTR_DRBG NIST Validation (AES-256 use df,False,256,128,256,256) #14 -ctr_drbg_validate_nopr:"50de72903b9d99764123ffaa0c721e14ad1ab5c46a34c040f25324ba1d937b8ef10467161fcf2978c2a680ac5570c6d2":"5c9954fd0143e62c3bf2d5734052e3c9370f7b9d75c70f58fe33b12e3997ee2c8db84f8467affd7cfd9a9e7ec60da6f31bf9bf32aedf644e4934bd1fc916bc8d":"d5dc4c9fc7171fcbfdaead558a565ffd55d245a58b22ad1666ee05131e33f49e":"ea3114e92e6a19f53b207a0a54cd363a6d053fed0a827f92556f0a8580f7a342":"53686f069b455af4692888d11fac15cf7b4bd38e198de4e62b7098f875198a75":"9fb0df053e0345e5640aa97fedef50a6" - -CTR_DRBG entropy usage -ctr_drbg_entropy_usage: - -CTR_DRBG write/update seed file -ctr_drbg_seed_file:"data_files/ctr_drbg_seed":0 - -CTR_DRBG write/update seed file -ctr_drbg_seed_file:"no_such_dir/file":MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR - -CTR_DRBG self test -ctr_drbg_selftest: - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.function deleted file mode 100644 index b7d2bece9d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ctr_drbg.function +++ /dev/null @@ -1,193 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/ctr_drbg.h" - -int test_offset_idx; -int mbedtls_entropy_func( void *data, unsigned char *buf, size_t len ) -{ - const unsigned char *p = (unsigned char *) data; - memcpy( buf, p + test_offset_idx, len ); - test_offset_idx += len; - return( 0 ); -} -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_CTR_DRBG_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void ctr_drbg_validate_pr( char *add_init_string, char *entropy_string, - char *add1_string, char *add2_string, - char *result_str ) -{ - unsigned char entropy[512]; - unsigned char add_init[512]; - unsigned char add1[512]; - unsigned char add2[512]; - mbedtls_ctr_drbg_context ctx; - unsigned char buf[512]; - unsigned char output_str[512]; - int add_init_len, add1_len, add2_len; - - mbedtls_ctr_drbg_init( &ctx ); - memset( output_str, 0, 512 ); - - unhexify( entropy, entropy_string ); - add_init_len = unhexify( add_init, add_init_string ); - add1_len = unhexify( add1, add1_string ); - add2_len = unhexify( add2, add2_string ); - - test_offset_idx = 0; - TEST_ASSERT( mbedtls_ctr_drbg_seed_entropy_len( &ctx, mbedtls_entropy_func, entropy, add_init, add_init_len, 32 ) == 0 ); - mbedtls_ctr_drbg_set_prediction_resistance( &ctx, MBEDTLS_CTR_DRBG_PR_ON ); - - TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add1, add1_len ) == 0 ); - TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add2, add2_len ) == 0 ); - hexify( output_str, buf, 16 ); - TEST_ASSERT( strcmp( (char *) output_str, result_str ) == 0 ); - -exit: - mbedtls_ctr_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ctr_drbg_validate_nopr( char *add_init_string, char *entropy_string, - char *add1_string, char *add_reseed_string, - char *add2_string, char *result_str ) -{ - unsigned char entropy[512]; - unsigned char add_init[512]; - unsigned char add1[512]; - unsigned char add_reseed[512]; - unsigned char add2[512]; - mbedtls_ctr_drbg_context ctx; - unsigned char buf[512]; - unsigned char output_str[512]; - int add_init_len, add1_len, add_reseed_len, add2_len; - - mbedtls_ctr_drbg_init( &ctx ); - memset( output_str, 0, 512 ); - - unhexify( entropy, entropy_string ); - add_init_len = unhexify( add_init, add_init_string ); - add1_len = unhexify( add1, add1_string ); - add_reseed_len = unhexify( add_reseed, add_reseed_string ); - add2_len = unhexify( add2, add2_string ); - - test_offset_idx = 0; - TEST_ASSERT( mbedtls_ctr_drbg_seed_entropy_len( &ctx, mbedtls_entropy_func, entropy, add_init, add_init_len, 32 ) == 0 ); - - TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add1, add1_len ) == 0 ); - TEST_ASSERT( mbedtls_ctr_drbg_reseed( &ctx, add_reseed, add_reseed_len ) == 0 ); - TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add2, add2_len ) == 0 ); - hexify( output_str, buf, 16 ); - TEST_ASSERT( strcmp( (char *) output_str, result_str ) == 0 ); - -exit: - mbedtls_ctr_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ctr_drbg_entropy_usage( ) -{ - unsigned char out[16]; - unsigned char add[16]; - unsigned char entropy[1024]; - mbedtls_ctr_drbg_context ctx; - size_t i, reps = 10; - int last_idx; - - mbedtls_ctr_drbg_init( &ctx ); - test_offset_idx = 0; - memset( entropy, 0, sizeof( entropy ) ); - memset( out, 0, sizeof( out ) ); - memset( add, 0, sizeof( add ) ); - - /* Init must use entropy */ - last_idx = test_offset_idx; - TEST_ASSERT( mbedtls_ctr_drbg_seed( &ctx, mbedtls_entropy_func, entropy, NULL, 0 ) == 0 ); - TEST_ASSERT( last_idx < test_offset_idx ); - - /* By default, PR is off and reseed_interval is large, - * so the next few calls should not use entropy */ - last_idx = test_offset_idx; - for( i = 0; i < reps; i++ ) - { - TEST_ASSERT( mbedtls_ctr_drbg_random( &ctx, out, sizeof( out ) - 4 ) == 0 ); - TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, out, sizeof( out ) - 4, - add, sizeof( add ) ) == 0 ); - } - TEST_ASSERT( last_idx == test_offset_idx ); - - /* While at it, make sure we didn't write past the requested length */ - TEST_ASSERT( out[sizeof( out ) - 4] == 0 ); - TEST_ASSERT( out[sizeof( out ) - 3] == 0 ); - TEST_ASSERT( out[sizeof( out ) - 2] == 0 ); - TEST_ASSERT( out[sizeof( out ) - 1] == 0 ); - - /* Set reseed_interval to the number of calls done, - * so the next call should reseed */ - mbedtls_ctr_drbg_set_reseed_interval( &ctx, 2 * reps ); - TEST_ASSERT( mbedtls_ctr_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( last_idx < test_offset_idx ); - - /* The new few calls should not reseed */ - last_idx = test_offset_idx; - for( i = 0; i < reps / 2; i++ ) - { - TEST_ASSERT( mbedtls_ctr_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, out, sizeof( out ) , - add, sizeof( add ) ) == 0 ); - } - TEST_ASSERT( last_idx == test_offset_idx ); - - /* Call update with too much data (sizeof entropy > MAX(_SEED)_INPUT) - * (just make sure it doesn't cause memory corruption) */ - mbedtls_ctr_drbg_update( &ctx, entropy, sizeof( entropy ) ); - - /* Now enable PR, so the next few calls should all reseed */ - mbedtls_ctr_drbg_set_prediction_resistance( &ctx, MBEDTLS_CTR_DRBG_PR_ON ); - TEST_ASSERT( mbedtls_ctr_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( last_idx < test_offset_idx ); - - /* Finally, check setting entropy_len */ - mbedtls_ctr_drbg_set_entropy_len( &ctx, 42 ); - last_idx = test_offset_idx; - TEST_ASSERT( mbedtls_ctr_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( test_offset_idx - last_idx == 42 ); - - mbedtls_ctr_drbg_set_entropy_len( &ctx, 13 ); - last_idx = test_offset_idx; - TEST_ASSERT( mbedtls_ctr_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( test_offset_idx - last_idx == 13 ); - -exit: - mbedtls_ctr_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void ctr_drbg_seed_file( char *path, int ret ) -{ - mbedtls_ctr_drbg_context ctx; - - mbedtls_ctr_drbg_init( &ctx ); - - TEST_ASSERT( mbedtls_ctr_drbg_seed( &ctx, rnd_std_rand, NULL, NULL, 0 ) == 0 ); - TEST_ASSERT( mbedtls_ctr_drbg_write_seed_file( &ctx, path ) == ret ); - TEST_ASSERT( mbedtls_ctr_drbg_update_seed_file( &ctx, path ) == ret ); - -exit: - mbedtls_ctr_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void ctr_drbg_selftest( ) -{ - TEST_ASSERT( mbedtls_ctr_drbg_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.data deleted file mode 100644 index 59a2c6b562..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.data +++ /dev/null @@ -1,64 +0,0 @@ -Debug print msg (threshold 1, level 0) -debug_print_msg_threshold:1:0:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n" - -Debug print msg (threshold 1, level 1) -debug_print_msg_threshold:1:1:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n" - -Debug print msg (threshold 1, level 2) -debug_print_msg_threshold:1:2:"MyFile":999:"" - -Debug print msg (threshold 0, level 1) -debug_print_msg_threshold:0:1:"MyFile":999:"" - -Debug print msg (threshold 0, level 5) -debug_print_msg_threshold:0:5:"MyFile":999:"" - -Debug print return value #1 -mbedtls_debug_print_ret:"MyFile":999:"Test return value":0:"MyFile(0999)\: Test return value() returned 0 (-0x0000)\n" - -Debug print return value #2 -mbedtls_debug_print_ret:"MyFile":999:"Test return value":-0x1000:"MyFile(0999)\: Test return value() returned -4096 (-0x1000)\n" - -Debug print return value #3 -mbedtls_debug_print_ret:"MyFile":999:"Test return value":-0xFFFF:"MyFile(0999)\: Test return value() returned -65535 (-0xffff)\n" - -Debug print buffer #1 -mbedtls_debug_print_buf:"MyFile":999:"Test return value":"":"MyFile(0999)\: dumping 'Test return value' (0 bytes)\n" - -Debug print buffer #2 -mbedtls_debug_print_buf:"MyFile":999:"Test return value":"00":"MyFile(0999)\: dumping 'Test return value' (1 bytes)\nMyFile(0999)\: 0000\: 00 .\n" - -Debug print buffer #3 -mbedtls_debug_print_buf:"MyFile":999:"Test return value":"000102030405060708090A0B0C0D0E0F":"MyFile(0999)\: dumping 'Test return value' (16 bytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\n" - -Debug print buffer #4 -mbedtls_debug_print_buf:"MyFile":999:"Test return value":"000102030405060708090A0B0C0D0E0F00":"MyFile(0999)\: dumping 'Test return value' (17 bytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\nMyFile(0999)\: 0010\: 00 .\n" - -Debug print buffer #5 -mbedtls_debug_print_buf:"MyFile":999:"Test return value":"000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30":"MyFile(0999)\: dumping 'Test return value' (49 bytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\nMyFile(0999)\: 0010\: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................\nMyFile(0999)\: 0020\: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f !"#$%&'()*+,-./\nMyFile(0999)\: 0030\: 30 0\n" - -Debug print certificate #1 (RSA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_BASE64_C:MBEDTLS_RSA_C -mbedtls_debug_print_crt:"data_files/server1.crt":"MyFile":999:"PREFIX_":"MyFile(0999)\: PREFIX_ #1\:\nMyFile(0999)\: cert. version \: 3\nMyFile(0999)\: serial number \: 01\nMyFile(0999)\: issuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nMyFile(0999)\: subject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nMyFile(0999)\: issued on \: 2011-02-12 14\:44\:06\nMyFile(0999)\: expires on \: 2021-02-12 14\:44\:06\nMyFile(0999)\: signed using \: RSA with SHA1\nMyFile(0999)\: RSA key size \: 2048 bits\nMyFile(0999)\: basic constraints \: CA=false\nMyFile(0999)\: value of 'crt->rsa.N' (2048 bits) is\:\nMyFile(0999)\: a9 02 1f 3d 40 6a d5 55 53 8b fd 36 ee 82 65 2e\nMyFile(0999)\: 15 61 5e 89 bf b8 e8 45 90 db ee 88 16 52 d3 f1\nMyFile(0999)\: 43 50 47 96 12 59 64 87 6b fd 2b e0 46 f9 73 be\nMyFile(0999)\: dd cf 92 e1 91 5b ed 66 a0 6f 89 29 79 45 80 d0\nMyFile(0999)\: 83 6a d5 41 43 77 5f 39 7c 09 04 47 82 b0 57 39\nMyFile(0999)\: 70 ed a3 ec 15 19 1e a8 33 08 47 c1 05 42 a9 fd\nMyFile(0999)\: 4c c3 b4 df dd 06 1f 4d 10 51 40 67 73 13 0f 40\nMyFile(0999)\: f8 6d 81 25 5f 0a b1 53 c6 30 7e 15 39 ac f9 5a\nMyFile(0999)\: ee 7f 92 9e a6 05 5b e7 13 97 85 b5 23 92 d9 d4\nMyFile(0999)\: 24 06 d5 09 25 89 75 07 dd a6 1a 8f 3f 09 19 be\nMyFile(0999)\: ad 65 2c 64 eb 95 9b dc fe 41 5e 17 a6 da 6c 5b\nMyFile(0999)\: 69 cc 02 ba 14 2c 16 24 9c 4a dc cd d0 f7 52 67\nMyFile(0999)\: 73 f1 2d a0 23 fd 7e f4 31 ca 2d 70 ca 89 0b 04\nMyFile(0999)\: db 2e a6 4f 70 6e 9e ce bd 58 89 e2 53 59 9e 6e\nMyFile(0999)\: 5a 92 65 e2 88 3f 0c 94 19 a3 dd e5 e8 9d 95 13\nMyFile(0999)\: ed 29 db ab 70 12 dc 5a ca 6b 17 ab 52 82 54 b1\nMyFile(0999)\: value of 'crt->rsa.E' (17 bits) is\:\nMyFile(0999)\: 01 00 01\n" - -Debug print certificate #2 (EC) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -mbedtls_debug_print_crt:"data_files/test-ca2.crt":"MyFile":999:"PREFIX_":"MyFile(0999)\: PREFIX_ #1\:\nMyFile(0999)\: cert. version \: 3\nMyFile(0999)\: serial number \: C1\:43\:E2\:7E\:62\:43\:CC\:E8\nMyFile(0999)\: issuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nMyFile(0999)\: subject name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nMyFile(0999)\: issued on \: 2013-09-24 15\:49\:48\nMyFile(0999)\: expires on \: 2023-09-22 15\:49\:48\nMyFile(0999)\: signed using \: ECDSA with SHA256\nMyFile(0999)\: EC key size \: 384 bits\nMyFile(0999)\: basic constraints \: CA=true\nMyFile(0999)\: value of 'crt->eckey.Q(X)' (384 bits) is\:\nMyFile(0999)\: c3 da 2b 34 41 37 58 2f 87 56 fe fc 89 ba 29 43\nMyFile(0999)\: 4b 4e e0 6e c3 0e 57 53 33 39 58 d4 52 b4 91 95\nMyFile(0999)\: 39 0b 23 df 5f 17 24 62 48 fc 1a 95 29 ce 2c 2d\nMyFile(0999)\: value of 'crt->eckey.Q(Y)' (384 bits) is\:\nMyFile(0999)\: 87 c2 88 52 80 af d6 6a ab 21 dd b8 d3 1c 6e 58\nMyFile(0999)\: b8 ca e8 b2 69 8e f3 41 ad 29 c3 b4 5f 75 a7 47\nMyFile(0999)\: 6f d5 19 29 55 69 9a 53 3b 20 b4 66 16 60 33 1e\n" - -Debug print mbedtls_mpi #1 -mbedtls_debug_print_mpi:16:"01020304050607":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (49 bits) is\:\nMyFile(0999)\: 01 02 03 04 05 06 07\n" - -Debug print mbedtls_mpi #2 -mbedtls_debug_print_mpi:16:"00000000000007":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (3 bits) is\:\nMyFile(0999)\: 07\n" - -Debug print mbedtls_mpi #3 -mbedtls_debug_print_mpi:16:"00000000000000":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (0 bits) is\:\nMyFile(0999)\: 00\n" - -Debug print mbedtls_mpi #4 -mbedtls_debug_print_mpi:16:"0941379d00fed1491fe15df284dfde4a142f68aa8d412023195cee66883e6290ffe703f4ea5963bf212713cee46b107c09182b5edcd955adac418bf4918e2889af48e1099d513830cec85c26ac1e158b52620e33ba8692f893efbb2f958b4424":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (764 bits) is\:\nMyFile(0999)\: 09 41 37 9d 00 fe d1 49 1f e1 5d f2 84 df de 4a\nMyFile(0999)\: 14 2f 68 aa 8d 41 20 23 19 5c ee 66 88 3e 62 90\nMyFile(0999)\: ff e7 03 f4 ea 59 63 bf 21 27 13 ce e4 6b 10 7c\nMyFile(0999)\: 09 18 2b 5e dc d9 55 ad ac 41 8b f4 91 8e 28 89\nMyFile(0999)\: af 48 e1 09 9d 51 38 30 ce c8 5c 26 ac 1e 15 8b\nMyFile(0999)\: 52 62 0e 33 ba 86 92 f8 93 ef bb 2f 95 8b 44 24\n" - -Debug print mbedtls_mpi #5 -mbedtls_debug_print_mpi:16:"0000000000000000000000000000000000000000000000000000000941379d00fed1491fe15df284dfde4a142f68aa8d412023195cee66883e6290ffe703f4ea5963bf212713cee46b107c09182b5edcd955adac418bf4918e2889af48e1099d513830cec85c26ac1e158b52620e33ba8692f893efbb2f958b4424":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (764 bits) is\:\nMyFile(0999)\: 09 41 37 9d 00 fe d1 49 1f e1 5d f2 84 df de 4a\nMyFile(0999)\: 14 2f 68 aa 8d 41 20 23 19 5c ee 66 88 3e 62 90\nMyFile(0999)\: ff e7 03 f4 ea 59 63 bf 21 27 13 ce e4 6b 10 7c\nMyFile(0999)\: 09 18 2b 5e dc d9 55 ad ac 41 8b f4 91 8e 28 89\nMyFile(0999)\: af 48 e1 09 9d 51 38 30 ce c8 5c 26 ac 1e 15 8b\nMyFile(0999)\: 52 62 0e 33 ba 86 92 f8 93 ef bb 2f 95 8b 44 24\n" - -Debug print mbedtls_mpi #6 -mbedtls_debug_print_mpi:16:"0000000000000000000000000000000000000000000000000000000041379d00fed1491fe15df284dfde4a142f68aa8d412023195cee66883e6290ffe703f4ea5963bf212713cee46b107c09182b5edcd955adac418bf4918e2889af48e1099d513830cec85c26ac1e158b52620e33ba8692f893efbb2f958b4424":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (759 bits) is\:\nMyFile(0999)\: 41 37 9d 00 fe d1 49 1f e1 5d f2 84 df de 4a 14\nMyFile(0999)\: 2f 68 aa 8d 41 20 23 19 5c ee 66 88 3e 62 90 ff\nMyFile(0999)\: e7 03 f4 ea 59 63 bf 21 27 13 ce e4 6b 10 7c 09\nMyFile(0999)\: 18 2b 5e dc d9 55 ad ac 41 8b f4 91 8e 28 89 af\nMyFile(0999)\: 48 e1 09 9d 51 38 30 ce c8 5c 26 ac 1e 15 8b 52\nMyFile(0999)\: 62 0e 33 ba 86 92 f8 93 ef bb 2f 95 8b 44 24\n" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.function deleted file mode 100644 index 98f98b061b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_debug.function +++ /dev/null @@ -1,198 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/debug.h" - -struct buffer_data -{ - char buf[2000]; - char *ptr; -}; - -void string_debug(void *data, int level, const char *file, int line, const char *str) -{ - struct buffer_data *buffer = (struct buffer_data *) data; - char *p = buffer->ptr; - ((void) level); - - memcpy( p, file, strlen( file ) ); - p += strlen( file ); - - *p++ = '('; - *p++ = '0' + ( line / 1000 ) % 10; - *p++ = '0' + ( line / 100 ) % 10; - *p++ = '0' + ( line / 10 ) % 10; - *p++ = '0' + ( line / 1 ) % 10; - *p++ = ')'; - *p++ = ':'; - *p++ = ' '; - -#if defined(MBEDTLS_THREADING_C) - /* Skip "thread ID" (up to the first space) as it is not predictable */ - while( *str++ != ' ' ); -#endif - - memcpy( p, str, strlen( str ) ); - p += strlen( str ); - - /* Detect if debug messages output partial lines and mark them */ - if( p[-1] != '\n' ) - *p++ = '*'; - - buffer->ptr = p; -} -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_DEBUG_C:MBEDTLS_SSL_TLS_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void debug_print_msg_threshold( int threshold, int level, char *file, int line, - char *result_str ) -{ - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - struct buffer_data buffer; - - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - memset( buffer.buf, 0, 2000 ); - buffer.ptr = buffer.buf; - - TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 ); - - mbedtls_debug_set_threshold( threshold ); - mbedtls_ssl_conf_dbg( &conf, string_debug, &buffer); - - mbedtls_debug_print_msg( &ssl, level, file, line, - "Text message, 2 == %d", 2 ); - - TEST_ASSERT( strcmp( buffer.buf, result_str ) == 0 ); - -exit: - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_debug_print_ret( char *file, int line, char *text, int value, - char *result_str ) -{ - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - struct buffer_data buffer; - - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - memset( buffer.buf, 0, 2000 ); - buffer.ptr = buffer.buf; - - TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 ); - - mbedtls_ssl_conf_dbg( &conf, string_debug, &buffer); - - mbedtls_debug_print_ret( &ssl, 0, file, line, text, value); - - TEST_ASSERT( strcmp( buffer.buf, result_str ) == 0 ); - -exit: - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_debug_print_buf( char *file, int line, char *text, - char *data_string, char *result_str ) -{ - unsigned char data[10000]; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - struct buffer_data buffer; - size_t data_len; - - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - memset( &data, 0, sizeof( data ) ); - memset( buffer.buf, 0, 2000 ); - buffer.ptr = buffer.buf; - - data_len = unhexify( data, data_string ); - - TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 ); - - mbedtls_ssl_conf_dbg( &conf, string_debug, &buffer); - - mbedtls_debug_print_buf( &ssl, 0, file, line, text, data, data_len ); - - TEST_ASSERT( strcmp( buffer.buf, result_str ) == 0 ); - -exit: - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_debug_print_crt( char *crt_file, char *file, int line, - char *prefix, char *result_str ) -{ - mbedtls_x509_crt crt; - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - struct buffer_data buffer; - - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_x509_crt_init( &crt ); - memset( buffer.buf, 0, 2000 ); - buffer.ptr = buffer.buf; - - TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 ); - - mbedtls_ssl_conf_dbg( &conf, string_debug, &buffer); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - mbedtls_debug_print_crt( &ssl, 0, file, line, prefix, &crt); - - TEST_ASSERT( strcmp( buffer.buf, result_str ) == 0 ); - -exit: - mbedtls_x509_crt_free( &crt ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_BIGNUM_C */ -void mbedtls_debug_print_mpi( int radix, char *value, char *file, int line, - char *prefix, char *result_str ) -{ - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - struct buffer_data buffer; - mbedtls_mpi val; - - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - mbedtls_mpi_init( &val ); - memset( buffer.buf, 0, 2000 ); - buffer.ptr = buffer.buf; - - TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &val, radix, value ) == 0 ); - - mbedtls_ssl_conf_dbg( &conf, string_debug, &buffer); - - mbedtls_debug_print_mpi( &ssl, 0, file, line, prefix, &val); - - TEST_ASSERT( strcmp( buffer.buf, result_str ) == 0 ); - -exit: - mbedtls_mpi_free( &val ); - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.data deleted file mode 100644 index 3eeb69545f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.data +++ /dev/null @@ -1,251 +0,0 @@ -DES check weak key #1 -des_check_weak:"0101010101010101":1 - -DES check weak key #2 -des_check_weak:"FEE0FEE0FEF1FEF1":1 - -DES check weak key #3 -des_check_weak:"0101010101010100":0 - -DES check weak key #4 -des_check_weak:"EEE0FEE0FEF1FEF1":0 - -DES Encrypt OpenSSL Test Vector #1 -des_encrypt_ecb:"0000000000000000":"0000000000000000":"8CA64DE9C1B123A7" - -DES Encrypt OpenSSL Test Vector #2 -des_encrypt_ecb:"FFFFFFFFFFFFFFFF":"FFFFFFFFFFFFFFFF":"7359B2163E4EDC58" - -DES Encrypt OpenSSL Test Vector #3 -des_encrypt_ecb:"3000000000000000":"1000000000000001":"958E6E627A05557B" - -DES Encrypt OpenSSL Test Vector #4 -des_encrypt_ecb:"1111111111111111":"1111111111111111":"F40379AB9E0EC533" - -DES Encrypt OpenSSL Test Vector #5 -des_encrypt_ecb:"0123456789ABCDEF":"1111111111111111":"17668DFC7292532D" - -DES Encrypt OpenSSL Test Vector #6 -des_encrypt_ecb:"1111111111111111":"0123456789ABCDEF":"8A5AE1F81AB8F2DD" - -DES Encrypt OpenSSL Test Vector #7 -des_encrypt_ecb:"0000000000000000":"0000000000000000":"8CA64DE9C1B123A7" - -DES Encrypt OpenSSL Test Vector #8 -des_encrypt_ecb:"FEDCBA9876543210":"0123456789ABCDEF":"ED39D950FA74BCC4" - -DES Encrypt OpenSSL Test Vector #9 -des_encrypt_ecb:"7CA110454A1A6E57":"01A1D6D039776742":"690F5B0D9A26939B" - -DES Encrypt OpenSSL Test Vector #10 -des_encrypt_ecb:"0131D9619DC1376E":"5CD54CA83DEF57DA":"7A389D10354BD271" - -DES Encrypt OpenSSL Test Vector #11 -des_encrypt_ecb:"07A1133E4A0B2686":"0248D43806F67172":"868EBB51CAB4599A" - -DES Encrypt OpenSSL Test Vector #12 -des_encrypt_ecb:"3849674C2602319E":"51454B582DDF440A":"7178876E01F19B2A" - -DES Encrypt OpenSSL Test Vector #13 -des_encrypt_ecb:"04B915BA43FEB5B6":"42FD443059577FA2":"AF37FB421F8C4095" - -DES Encrypt OpenSSL Test Vector #14 -des_encrypt_ecb:"0113B970FD34F2CE":"059B5E0851CF143A":"86A560F10EC6D85B" - -DES Encrypt OpenSSL Test Vector #15 -des_encrypt_ecb:"0170F175468FB5E6":"0756D8E0774761D2":"0CD3DA020021DC09" - -DES Encrypt OpenSSL Test Vector #16 -des_encrypt_ecb:"43297FAD38E373FE":"762514B829BF486A":"EA676B2CB7DB2B7A" - -DES Encrypt OpenSSL Test Vector #17 -des_encrypt_ecb:"07A7137045DA2A16":"3BDD119049372802":"DFD64A815CAF1A0F" - -DES Encrypt OpenSSL Test Vector #18 -des_encrypt_ecb:"04689104C2FD3B2F":"26955F6835AF609A":"5C513C9C4886C088" - -DES Encrypt OpenSSL Test Vector #19 -des_encrypt_ecb:"37D06BB516CB7546":"164D5E404F275232":"0A2AEEAE3FF4AB77" - -DES Encrypt OpenSSL Test Vector #20 -des_encrypt_ecb:"1F08260D1AC2465E":"6B056E18759F5CCA":"EF1BF03E5DFA575A" - -DES Encrypt OpenSSL Test Vector #21 -des_encrypt_ecb:"584023641ABA6176":"004BD6EF09176062":"88BF0DB6D70DEE56" - -DES Encrypt OpenSSL Test Vector #22 -des_encrypt_ecb:"025816164629B007":"480D39006EE762F2":"A1F9915541020B56" - -DES Encrypt OpenSSL Test Vector #23 -des_encrypt_ecb:"49793EBC79B3258F":"437540C8698F3CFA":"6FBF1CAFCFFD0556" - -DES Encrypt OpenSSL Test Vector #24 -des_encrypt_ecb:"4FB05E1515AB73A7":"072D43A077075292":"2F22E49BAB7CA1AC" - -DES Encrypt OpenSSL Test Vector #25 -des_encrypt_ecb:"49E95D6D4CA229BF":"02FE55778117F12A":"5A6B612CC26CCE4A" - -DES Encrypt OpenSSL Test Vector #26 -des_encrypt_ecb:"018310DC409B26D6":"1D9D5C5018F728C2":"5F4C038ED12B2E41" - -DES Encrypt OpenSSL Test Vector #27 -des_encrypt_ecb:"1C587F1C13924FEF":"305532286D6F295A":"63FAC0D034D9F793" - -DES Encrypt OpenSSL Test Vector #28 -des_encrypt_ecb:"0101010101010101":"0123456789ABCDEF":"617B3A0CE8F07100" - -DES Encrypt OpenSSL Test Vector #29 -des_encrypt_ecb:"1F1F1F1F0E0E0E0E":"0123456789ABCDEF":"DB958605F8C8C606" - -DES Encrypt OpenSSL Test Vector #30 -des_encrypt_ecb:"E0FEE0FEF1FEF1FE":"0123456789ABCDEF":"EDBFD1C66C29CCC7" - -DES Encrypt OpenSSL Test Vector #31 -des_encrypt_ecb:"0000000000000000":"FFFFFFFFFFFFFFFF":"355550B2150E2451" - -DES Encrypt OpenSSL Test Vector #32 -des_encrypt_ecb:"FFFFFFFFFFFFFFFF":"0000000000000000":"CAAAAF4DEAF1DBAE" - -DES Encrypt OpenSSL Test Vector #33 -des_encrypt_ecb:"0123456789ABCDEF":"0000000000000000":"D5D44FF720683D0D" - -DES Encrypt OpenSSL Test Vector #34 -des_encrypt_ecb:"FEDCBA9876543210":"FFFFFFFFFFFFFFFF":"2A2BB008DF97C2F2" - -DES Decrypt OpenSSL Test Vector #1 -des_decrypt_ecb:"0000000000000000":"8CA64DE9C1B123A7":"0000000000000000" - -DES Decrypt OpenSSL Test Vector #2 -des_decrypt_ecb:"FFFFFFFFFFFFFFFF":"7359B2163E4EDC58":"FFFFFFFFFFFFFFFF" - -DES Decrypt OpenSSL Test Vector #3 -des_decrypt_ecb:"3000000000000000":"958E6E627A05557B":"1000000000000001" - -DES Decrypt OpenSSL Test Vector #4 -des_decrypt_ecb:"1111111111111111":"F40379AB9E0EC533":"1111111111111111" - -DES Decrypt OpenSSL Test Vector #5 -des_decrypt_ecb:"0123456789ABCDEF":"17668DFC7292532D":"1111111111111111" - -DES Decrypt OpenSSL Test Vector #6 -des_decrypt_ecb:"1111111111111111":"8A5AE1F81AB8F2DD":"0123456789ABCDEF" - -DES Decrypt OpenSSL Test Vector #7 -des_decrypt_ecb:"0000000000000000":"8CA64DE9C1B123A7":"0000000000000000" - -DES Decrypt OpenSSL Test Vector #8 -des_decrypt_ecb:"FEDCBA9876543210":"ED39D950FA74BCC4":"0123456789ABCDEF" - -DES Decrypt OpenSSL Test Vector #9 -des_decrypt_ecb:"7CA110454A1A6E57":"690F5B0D9A26939B":"01A1D6D039776742" - -DES Decrypt OpenSSL Test Vector #10 -des_decrypt_ecb:"0131D9619DC1376E":"7A389D10354BD271":"5CD54CA83DEF57DA" - -DES Decrypt OpenSSL Test Vector #11 -des_decrypt_ecb:"07A1133E4A0B2686":"868EBB51CAB4599A":"0248D43806F67172" - -DES Decrypt OpenSSL Test Vector #12 -des_decrypt_ecb:"3849674C2602319E":"7178876E01F19B2A":"51454B582DDF440A" - -DES Decrypt OpenSSL Test Vector #13 -des_decrypt_ecb:"04B915BA43FEB5B6":"AF37FB421F8C4095":"42FD443059577FA2" - -DES Decrypt OpenSSL Test Vector #14 -des_decrypt_ecb:"0113B970FD34F2CE":"86A560F10EC6D85B":"059B5E0851CF143A" - -DES Decrypt OpenSSL Test Vector #15 -des_decrypt_ecb:"0170F175468FB5E6":"0CD3DA020021DC09":"0756D8E0774761D2" - -DES Decrypt OpenSSL Test Vector #16 -des_decrypt_ecb:"43297FAD38E373FE":"EA676B2CB7DB2B7A":"762514B829BF486A" - -DES Decrypt OpenSSL Test Vector #17 -des_decrypt_ecb:"07A7137045DA2A16":"DFD64A815CAF1A0F":"3BDD119049372802" - -DES Decrypt OpenSSL Test Vector #18 -des_decrypt_ecb:"04689104C2FD3B2F":"5C513C9C4886C088":"26955F6835AF609A" - -DES Decrypt OpenSSL Test Vector #19 -des_decrypt_ecb:"37D06BB516CB7546":"0A2AEEAE3FF4AB77":"164D5E404F275232" - -DES Decrypt OpenSSL Test Vector #20 -des_decrypt_ecb:"1F08260D1AC2465E":"EF1BF03E5DFA575A":"6B056E18759F5CCA" - -DES Decrypt OpenSSL Test Vector #21 -des_decrypt_ecb:"584023641ABA6176":"88BF0DB6D70DEE56":"004BD6EF09176062" - -DES Decrypt OpenSSL Test Vector #22 -des_decrypt_ecb:"025816164629B007":"A1F9915541020B56":"480D39006EE762F2" - -DES Decrypt OpenSSL Test Vector #23 -des_decrypt_ecb:"49793EBC79B3258F":"6FBF1CAFCFFD0556":"437540C8698F3CFA" - -DES Decrypt OpenSSL Test Vector #24 -des_decrypt_ecb:"4FB05E1515AB73A7":"2F22E49BAB7CA1AC":"072D43A077075292" - -DES Decrypt OpenSSL Test Vector #25 -des_decrypt_ecb:"49E95D6D4CA229BF":"5A6B612CC26CCE4A":"02FE55778117F12A" - -DES Decrypt OpenSSL Test Vector #26 -des_decrypt_ecb:"018310DC409B26D6":"5F4C038ED12B2E41":"1D9D5C5018F728C2" - -DES Decrypt OpenSSL Test Vector #27 -des_decrypt_ecb:"1C587F1C13924FEF":"63FAC0D034D9F793":"305532286D6F295A" - -DES Decrypt OpenSSL Test Vector #28 -des_decrypt_ecb:"0101010101010101":"617B3A0CE8F07100":"0123456789ABCDEF" - -DES Decrypt OpenSSL Test Vector #29 -des_decrypt_ecb:"1F1F1F1F0E0E0E0E":"DB958605F8C8C606":"0123456789ABCDEF" - -DES Decrypt OpenSSL Test Vector #30 -des_decrypt_ecb:"E0FEE0FEF1FEF1FE":"EDBFD1C66C29CCC7":"0123456789ABCDEF" - -DES Decrypt OpenSSL Test Vector #31 -des_decrypt_ecb:"0000000000000000":"355550B2150E2451":"FFFFFFFFFFFFFFFF" - -DES Decrypt OpenSSL Test Vector #32 -des_decrypt_ecb:"FFFFFFFFFFFFFFFF":"CAAAAF4DEAF1DBAE":"0000000000000000" - -DES Decrypt OpenSSL Test Vector #33 -des_decrypt_ecb:"0123456789ABCDEF":"D5D44FF720683D0D":"0000000000000000" - -DES Decrypt OpenSSL Test Vector #34 -des_decrypt_ecb:"FEDCBA9876543210":"2A2BB008DF97C2F2":"FFFFFFFFFFFFFFFF" - -DES-CBC Encrypt OpenSSL Test Vector #1 -des_encrypt_cbc:"0123456789abcdef":"fedcba9876543210":"37363534333231204E6F77206973207468652074696D6520":"ccd173ffab2039f4acd8aefddfd8a1eb468e91157888ba68":0 - -DES-CBC Decrypt OpenSSL Test Vector #1 -des_decrypt_cbc:"0123456789abcdef":"fedcba9876543210":"ccd173ffab2039f4acd8aefddfd8a1eb468e91157888ba68":"37363534333231204E6F77206973207468652074696D6520":0 - -3DES-ECB 2Key Encrypt OpenSSL Test Vector #1 -des3_encrypt_ecb:2:"0000000000000000FFFFFFFFFFFFFFFF":"0000000000000000":"9295B59BB384736E" - -3DES-ECB 2Key Encrypt OpenSSL Test Vector #2 -des3_encrypt_ecb:2:"FFFFFFFFFFFFFFFF3000000000000000":"FFFFFFFFFFFFFFFF":"199E9D6DF39AA816" - -3DES-ECB 2Key Decrypt OpenSSL Test Vector #1 -des3_decrypt_ecb:2:"0000000000000000FFFFFFFFFFFFFFFF":"9295B59BB384736E":"0000000000000000" - -3DES-ECB 2Key Decrypt OpenSSL Test Vector #2 -des3_decrypt_ecb:2:"FFFFFFFFFFFFFFFF3000000000000000":"199E9D6DF39AA816":"FFFFFFFFFFFFFFFF" - -3DES-CBC 3Key Encrypt OpenSSL Test Vector #1 -des3_encrypt_cbc:3:"0123456789abcdeff1e0d3c2b5a49786fedcba9876543210":"fedcba9876543210":"37363534333231204E6F77206973207468652074696D6520":"3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D4":0 - -3DES-CBC 3Key Decrypt OpenSSL Test Vector #1 -des3_decrypt_cbc:3:"0123456789abcdeff1e0d3c2b5a49786fedcba9876543210":"fedcba9876543210":"3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D4":"37363534333231204E6F77206973207468652074696D6520":0 - -DES-CBC Encrypt (Invalid input length) -des_encrypt_cbc:"0123456789abcdef":"fedcba9876543210":"37363534333231204E6F77206973207468652074696D65":"":MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH - -3DES-CBC 3Key Encrypt (Invalid input length) -des3_encrypt_cbc:3:"0123456789abcdeff1e0d3c2b5a49786fedcba9876543210":"fedcba9876543210":"37363534333231204E6F77206973207468652074696D65":"":MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH - -Run through parity bit tests -des_key_parity_run: - -DES Selftest -des_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.function deleted file mode 100644 index aecd419e54..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_des.function +++ /dev/null @@ -1,367 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/des.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_DES_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void des_check_weak( char *key_hex, int ret ) -{ - unsigned char key[MBEDTLS_DES_KEY_SIZE]; - - memset( key, 0, sizeof key ); - - unhexify( key, key_hex ); - - TEST_ASSERT( mbedtls_des_key_check_weak( key ) == ret ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void des_encrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_des_setkey_enc( &ctx, key_str ); - TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_des_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void des_decrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_des_setkey_dec( &ctx, key_str ); - TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_des_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void des_encrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des_context ctx; - int src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_des_setkey_enc( &ctx, key_str ); - TEST_ASSERT( mbedtls_des_crypt_cbc( &ctx, MBEDTLS_DES_ENCRYPT, src_len, iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0 ) - { - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_des_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void des_decrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string, int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des_context ctx; - int src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_des_setkey_dec( &ctx, key_str ); - TEST_ASSERT( mbedtls_des_crypt_cbc( &ctx, MBEDTLS_DES_DECRYPT, src_len, iv_str, src_str, output ) == cbc_result ); - if( cbc_result == 0 ) - { - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_des_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void des3_encrypt_ecb( int key_count, char *hex_key_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des3_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des3_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - if( key_count == 2 ) - mbedtls_des3_set2key_enc( &ctx, key_str ); - else if( key_count == 3 ) - mbedtls_des3_set3key_enc( &ctx, key_str ); - else - TEST_ASSERT( 0 ); - - TEST_ASSERT( mbedtls_des3_crypt_ecb( &ctx, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_des3_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void des3_decrypt_ecb( int key_count, char *hex_key_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des3_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des3_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - if( key_count == 2 ) - mbedtls_des3_set2key_dec( &ctx, key_str ); - else if( key_count == 3 ) - mbedtls_des3_set3key_dec( &ctx, key_str ); - else - TEST_ASSERT( 0 ); - - TEST_ASSERT( mbedtls_des3_crypt_ecb( &ctx, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - -exit: - mbedtls_des3_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void des3_encrypt_cbc( int key_count, char *hex_key_string, - char *hex_iv_string, char *hex_src_string, - char *hex_dst_string, int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des3_context ctx; - int src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des3_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - if( key_count == 2 ) - mbedtls_des3_set2key_enc( &ctx, key_str ); - else if( key_count == 3 ) - mbedtls_des3_set3key_enc( &ctx, key_str ); - else - TEST_ASSERT( 0 ); - - TEST_ASSERT( mbedtls_des3_crypt_cbc( &ctx, MBEDTLS_DES_ENCRYPT, src_len, iv_str, src_str, output ) == cbc_result ); - - if( cbc_result == 0 ) - { - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_des3_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */ -void des3_decrypt_cbc( int key_count, char *hex_key_string, - char *hex_iv_string, char *hex_src_string, - char *hex_dst_string, int cbc_result ) -{ - unsigned char key_str[100]; - unsigned char iv_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_des3_context ctx; - int src_len; - - memset(key_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - mbedtls_des3_init( &ctx ); - - unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - src_len = unhexify( src_str, hex_src_string ); - - if( key_count == 2 ) - mbedtls_des3_set2key_dec( &ctx, key_str ); - else if( key_count == 3 ) - mbedtls_des3_set3key_dec( &ctx, key_str ); - else - TEST_ASSERT( 0 ); - - TEST_ASSERT( mbedtls_des3_crypt_cbc( &ctx, MBEDTLS_DES_DECRYPT, src_len, iv_str, src_str, output ) == cbc_result ); - - if( cbc_result == 0 ) - { - hexify( dst_str, output, src_len ); - - TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); - } - -exit: - mbedtls_des3_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void des_key_parity_run() -{ - int i, j, cnt; - unsigned char key[MBEDTLS_DES_KEY_SIZE]; - unsigned int parity; - - memset( key, 0, MBEDTLS_DES_KEY_SIZE ); - cnt = 0; - - // Iterate through all possible byte values - // - for( i = 0; i < 32; i++ ) - { - for( j = 0; j < 8; j++ ) - key[j] = cnt++; - - // Set the key parity according to the table - // - mbedtls_des_key_set_parity( key ); - - // Check the parity with a function - // - for( j = 0; j < 8; j++ ) - { - parity = key[j] ^ ( key[j] >> 4 ); - parity = parity ^ - ( parity >> 1 ) ^ - ( parity >> 2 ) ^ - ( parity >> 3 ); - parity &= 1; - - if( parity != 1 ) - TEST_ASSERT( 0 ); - } - - // Check the parity with the table - // - TEST_ASSERT( mbedtls_des_key_check_key_parity( key ) == 0 ); - } -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void des_selftest() -{ - TEST_ASSERT( mbedtls_des_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.data deleted file mode 100644 index f2cdeffa50..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.data +++ /dev/null @@ -1,17 +0,0 @@ -Diffie-Hellman full exchange #1 -dhm_do_dhm:10:"23":10:"5" - -Diffie-Hellman full exchange #2 -dhm_do_dhm:10:"93450983094850938450983409623":10:"9345098304850938450983409622" - -Diffie-Hellman full exchange #3 -dhm_do_dhm:10:"93450983094850938450983409623982317398171298719873918739182739712938719287391879381271":10:"9345098309485093845098340962223981329819812792137312973297123912791271" - -Diffie-Hallman load parameters from file -dhm_file:"data_files/dhparams.pem":"9e35f430443a09904f3a39a979797d070df53378e79c2438bef4e761f3c714553328589b041c809be1d6c6b5f1fc9f47d3a25443188253a992a56818b37ba9de5a40d362e56eff0be5417474c125c199272c8fe41dea733df6f662c92ae76556e755d10c64e6a50968f67fc6ea73d0dca8569be2ba204e23580d8bca2f4975b3":"02":128 - -Diffie-Hallman load parameters from file -dhm_file:"data_files/dh.optlen.pem":"b3126aeaf47153c7d67f403030b292b5bd5a6c9eae1c137af34087fce2a36a578d70c5c560ad2bdb924c4a4dbee20a1671be7103ce87defa76908936803dbeca60c33e1289c1a03ac2c6c4e49405e5902fa0596a1cbaa895cc402d5213ed4a5f1f5ba8b5e1ed3da951a4c475afeb0ca660b7368c38c8e809f382d96ae19e60dc984e61cb42b5dfd723322acf327f9e413cda6400c15c5b2ea1fa34405d83982fba40e6d852da3d91019bf23511314254dc211a90833e5b1798ee52a78198c555644729ad92f060367c74ded37704adfc273a4a33fec821bd2ebd3bc051730e97a4dd14d2b766062592f5eec09d16bb50efebf2cc00dd3e0e3418e60ec84870f7":"800abfe7dc667aa17bcd7c04614bc221a65482ccc04b604602b0e131908a938ea11b48dc515dab7abcbb1e0c7fd66511edc0d86551b7632496e03df94357e1c4ea07a7ce1e381a2fcafdff5f5bf00df828806020e875c00926e4d011f88477a1b01927d73813cad4847c6396b9244621be2b00b63c659253318413443cd244215cd7fd4cbe796e82c6cf70f89cc0c528fb8e344809b31876e7ef739d5160d095c9684188b0c8755c7a468d47f56d6db9ea012924ecb0556fb71312a8d7c93bb2898ea08ee54eeb594548285f06a973cbbe2a0cb02e90f323fe045521f34c68354a6d3e95dbfff1eb64692edc0a44f3d3e408d0e479a541e779a6054259e2d854":256 - -Diffie-Hellman selftest -dhm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.function deleted file mode 100644 index 002c20bf4f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_dhm.function +++ /dev/null @@ -1,128 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/dhm.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_DHM_C:MBEDTLS_BIGNUM_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void dhm_do_dhm( int radix_P, char *input_P, - int radix_G, char *input_G ) -{ - mbedtls_dhm_context ctx_srv; - mbedtls_dhm_context ctx_cli; - unsigned char ske[1000]; - unsigned char *p = ske; - unsigned char pub_cli[1000]; - unsigned char sec_srv[1000]; - unsigned char sec_cli[1000]; - size_t ske_len = 0; - size_t pub_cli_len = 0; - size_t sec_srv_len; - size_t sec_cli_len; - int x_size, i; - rnd_pseudo_info rnd_info; - - mbedtls_dhm_init( &ctx_srv ); - mbedtls_dhm_init( &ctx_cli ); - memset( ske, 0x00, 1000 ); - memset( pub_cli, 0x00, 1000 ); - memset( sec_srv, 0x00, 1000 ); - memset( sec_cli, 0x00, 1000 ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - /* - * Set params - */ - TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.G, radix_G, input_G ) == 0 ); - x_size = mbedtls_mpi_size( &ctx_srv.P ); - pub_cli_len = x_size; - - /* - * First key exchange - */ - TEST_ASSERT( mbedtls_dhm_make_params( &ctx_srv, x_size, ske, &ske_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - ske[ske_len++] = 0; - ske[ske_len++] = 0; - TEST_ASSERT( mbedtls_dhm_read_params( &ctx_cli, &p, ske + ske_len ) == 0 ); - - TEST_ASSERT( mbedtls_dhm_make_public( &ctx_cli, x_size, pub_cli, pub_cli_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_dhm_read_public( &ctx_srv, pub_cli, pub_cli_len ) == 0 ); - - TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_srv, sec_srv, sizeof( sec_srv ), &sec_srv_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_cli, sec_cli, sizeof( sec_cli ), &sec_cli_len, NULL, NULL ) == 0 ); - - TEST_ASSERT( sec_srv_len == sec_cli_len ); - TEST_ASSERT( sec_srv_len != 0 ); - TEST_ASSERT( memcmp( sec_srv, sec_cli, sec_srv_len ) == 0 ); - - /* Re-do calc_secret on server a few times to test update of blinding values */ - for( i = 0; i < 3; i++ ) - { - sec_srv_len = 1000; - TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_srv, sec_srv, sizeof( sec_srv ), &sec_srv_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - - TEST_ASSERT( sec_srv_len == sec_cli_len ); - TEST_ASSERT( sec_srv_len != 0 ); - TEST_ASSERT( memcmp( sec_srv, sec_cli, sec_srv_len ) == 0 ); - } - - /* - * Second key exchange to test change of blinding values on server - */ - p = ske; - - TEST_ASSERT( mbedtls_dhm_make_params( &ctx_srv, x_size, ske, &ske_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - ske[ske_len++] = 0; - ske[ske_len++] = 0; - TEST_ASSERT( mbedtls_dhm_read_params( &ctx_cli, &p, ske + ske_len ) == 0 ); - - TEST_ASSERT( mbedtls_dhm_make_public( &ctx_cli, x_size, pub_cli, pub_cli_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_dhm_read_public( &ctx_srv, pub_cli, pub_cli_len ) == 0 ); - - TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_srv, sec_srv, sizeof( sec_srv ), &sec_srv_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_cli, sec_cli, sizeof( sec_cli ), &sec_cli_len, NULL, NULL ) == 0 ); - - TEST_ASSERT( sec_srv_len == sec_cli_len ); - TEST_ASSERT( sec_srv_len != 0 ); - TEST_ASSERT( memcmp( sec_srv, sec_cli, sec_srv_len ) == 0 ); - -exit: - mbedtls_dhm_free( &ctx_srv ); - mbedtls_dhm_free( &ctx_cli ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void dhm_file( char *filename, char *p, char *g, int len ) -{ - mbedtls_dhm_context ctx; - mbedtls_mpi P, G; - - mbedtls_dhm_init( &ctx ); - mbedtls_mpi_init( &P ); mbedtls_mpi_init( &G ); - - TEST_ASSERT( mbedtls_mpi_read_string( &P, 16, p ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &G, 16, g ) == 0 ); - - TEST_ASSERT( mbedtls_dhm_parse_dhmfile( &ctx, filename ) == 0 ); - - TEST_ASSERT( ctx.len == (size_t) len ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &ctx.P, &P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &ctx.G, &G ) == 0 ); - -exit: - mbedtls_mpi_free( &P ); mbedtls_mpi_free( &G ); - mbedtls_dhm_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void dhm_selftest() -{ - TEST_ASSERT( mbedtls_dhm_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.data deleted file mode 100644 index f7119de416..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.data +++ /dev/null @@ -1,39 +0,0 @@ -ECDH primitive random #1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecdh_primitive_random:MBEDTLS_ECP_DP_SECP192R1 - -ECDH primitive random #2 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecdh_primitive_random:MBEDTLS_ECP_DP_SECP224R1 - -ECDH primitive random #3 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -ecdh_primitive_random:MBEDTLS_ECP_DP_SECP256R1 - -ECDH primitive random #4 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -ecdh_primitive_random:MBEDTLS_ECP_DP_SECP384R1 - -ECDH primitive random #5 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecdh_primitive_random:MBEDTLS_ECP_DP_SECP521R1 - -ECDH primitive rfc 5903 p256 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -ecdh_primitive_testvec:MBEDTLS_ECP_DP_SECP256R1:"C88F01F510D9AC3F70A292DAA2316DE544E9AAB8AFE84049C62A9C57862D1433":"DAD0B65394221CF9B051E1FECA5787D098DFE637FC90B9EF945D0C3772581180":"5271A0461CDB8252D61F1C456FA3E59AB1F45B33ACCF5F58389E0577B8990BB3":"C6EF9C5D78AE012A011164ACB397CE2088685D8F06BF9BE0B283AB46476BEE53":"D12DFB5289C8D4F81208B70270398C342296970A0BCCB74C736FC7554494BF63":"56FBF3CA366CC23E8157854C13C58D6AAC23F046ADA30F8353E74F33039872AB":"D6840F6B42F6EDAFD13116E0E12565202FEF8E9ECE7DCE03812464D04B9442DE" - -ECDH primitive rfc 5903 p384 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -ecdh_primitive_testvec:MBEDTLS_ECP_DP_SECP384R1:"099F3C7034D4A2C699884D73A375A67F7624EF7C6B3C0F160647B67414DCE655E35B538041E649EE3FAEF896783AB194":"667842D7D180AC2CDE6F74F37551F55755C7645C20EF73E31634FE72B4C55EE6DE3AC808ACB4BDB4C88732AEE95F41AA":"9482ED1FC0EEB9CAFC4984625CCFC23F65032149E0E144ADA024181535A0F38EEB9FCFF3C2C947DAE69B4C634573A81C":"41CB0779B4BDB85D47846725FBEC3C9430FAB46CC8DC5060855CC9BDA0AA2942E0308312916B8ED2960E4BD55A7448FC":"E558DBEF53EECDE3D3FCCFC1AEA08A89A987475D12FD950D83CFA41732BC509D0D1AC43A0336DEF96FDA41D0774A3571":"DCFBEC7AACF3196472169E838430367F66EEBE3C6E70C416DD5F0C68759DD1FFF83FA40142209DFF5EAAD96DB9E6386C":"11187331C279962D93D604243FD592CB9D0A926F422E47187521287E7156C5C4D603135569B9E9D09CF5D4A270F59746" - -ECDH primitive rfc 5903 p521 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecdh_primitive_testvec:MBEDTLS_ECP_DP_SECP521R1:"0037ADE9319A89F4DABDB3EF411AACCCA5123C61ACAB57B5393DCE47608172A095AA85A30FE1C2952C6771D937BA9777F5957B2639BAB072462F68C27A57382D4A52":"0015417E84DBF28C0AD3C278713349DC7DF153C897A1891BD98BAB4357C9ECBEE1E3BF42E00B8E380AEAE57C2D107564941885942AF5A7F4601723C4195D176CED3E":"017CAE20B6641D2EEB695786D8C946146239D099E18E1D5A514C739D7CB4A10AD8A788015AC405D7799DC75E7B7D5B6CF2261A6A7F1507438BF01BEB6CA3926F9582":"0145BA99A847AF43793FDD0E872E7CDFA16BE30FDC780F97BCCC3F078380201E9C677D600B343757A3BDBF2A3163E4C2F869CCA7458AA4A4EFFC311F5CB151685EB9":"00D0B3975AC4B799F5BEA16D5E13E9AF971D5E9B984C9F39728B5E5739735A219B97C356436ADC6E95BB0352F6BE64A6C2912D4EF2D0433CED2B6171640012D9460F":"015C68226383956E3BD066E797B623C27CE0EAC2F551A10C2C724D9852077B87220B6536C5C408A1D2AEBB8E86D678AE49CB57091F4732296579AB44FCD17F0FC56A":"01144C7D79AE6956BC8EDB8E7C787C4521CB086FA64407F97894E5E6B2D79B04D1427E73CA4BAA240A34786859810C06B3C715A3A8CC3151F2BEE417996D19F3DDEA" - -ECDH exchange #1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecdh_exchange:MBEDTLS_ECP_DP_SECP192R1 - -ECDH exchange #2 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecdh_exchange:MBEDTLS_ECP_DP_SECP521R1 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.function deleted file mode 100644 index 4c6a97baf0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdh.function +++ /dev/null @@ -1,160 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/ecdh.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ECDH_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void ecdh_primitive_random( int id ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point qA, qB; - mbedtls_mpi dA, dB, zA, zB; - rnd_pseudo_info rnd_info; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &qA ); mbedtls_ecp_point_init( &qB ); - mbedtls_mpi_init( &dA ); mbedtls_mpi_init( &dB ); - mbedtls_mpi_init( &zA ); mbedtls_mpi_init( &zB ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dA, &qA, &rnd_pseudo_rand, &rnd_info ) - == 0 ); - TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dB, &qB, &rnd_pseudo_rand, &rnd_info ) - == 0 ); - TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zA, &qB, &dA, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zB, &qA, &dB, - NULL, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &zA, &zB ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &qA ); mbedtls_ecp_point_free( &qB ); - mbedtls_mpi_free( &dA ); mbedtls_mpi_free( &dB ); - mbedtls_mpi_free( &zA ); mbedtls_mpi_free( &zB ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecdh_primitive_testvec( int id, char *dA_str, char *xA_str, char *yA_str, - char *dB_str, char *xB_str, char *yB_str, - char *z_str ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point qA, qB; - mbedtls_mpi dA, dB, zA, zB, check; - unsigned char rnd_buf_A[MBEDTLS_ECP_MAX_BYTES]; - unsigned char rnd_buf_B[MBEDTLS_ECP_MAX_BYTES]; - rnd_buf_info rnd_info_A, rnd_info_B; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &qA ); mbedtls_ecp_point_init( &qB ); - mbedtls_mpi_init( &dA ); mbedtls_mpi_init( &dB ); - mbedtls_mpi_init( &zA ); mbedtls_mpi_init( &zB ); mbedtls_mpi_init( &check ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - rnd_info_A.buf = rnd_buf_A; - rnd_info_A.length = unhexify( rnd_buf_A, dA_str ); - - /* Fix rnd_buf_A by shifting it left if necessary */ - if( grp.nbits % 8 != 0 ) - { - unsigned char shift = 8 - ( grp.nbits % 8 ); - size_t i; - - for( i = 0; i < rnd_info_A.length - 1; i++ ) - rnd_buf_A[i] = rnd_buf_A[i] << shift - | rnd_buf_A[i+1] >> ( 8 - shift ); - - rnd_buf_A[rnd_info_A.length-1] <<= shift; - } - - rnd_info_B.buf = rnd_buf_B; - rnd_info_B.length = unhexify( rnd_buf_B, dB_str ); - - /* Fix rnd_buf_B by shifting it left if necessary */ - if( grp.nbits % 8 != 0 ) - { - unsigned char shift = 8 - ( grp.nbits % 8 ); - size_t i; - - for( i = 0; i < rnd_info_B.length - 1; i++ ) - rnd_buf_B[i] = rnd_buf_B[i] << shift - | rnd_buf_B[i+1] >> ( 8 - shift ); - - rnd_buf_B[rnd_info_B.length-1] <<= shift; - } - - TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dA, &qA, - rnd_buffer_rand, &rnd_info_A ) == 0 ); - TEST_ASSERT( ! mbedtls_ecp_is_zero( &qA ) ); - TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, xA_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qA.X, &check ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, yA_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qA.Y, &check ) == 0 ); - - TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dB, &qB, - rnd_buffer_rand, &rnd_info_B ) == 0 ); - TEST_ASSERT( ! mbedtls_ecp_is_zero( &qB ) ); - TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, xB_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qB.X, &check ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, yB_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qB.Y, &check ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, z_str ) == 0 ); - TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zA, &qB, &dA, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &zA, &check ) == 0 ); - TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zB, &qA, &dB, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &zB, &check ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &qA ); mbedtls_ecp_point_free( &qB ); - mbedtls_mpi_free( &dA ); mbedtls_mpi_free( &dB ); - mbedtls_mpi_free( &zA ); mbedtls_mpi_free( &zB ); mbedtls_mpi_free( &check ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecdh_exchange( int id ) -{ - mbedtls_ecdh_context srv, cli; - unsigned char buf[1000]; - const unsigned char *vbuf; - size_t len; - rnd_pseudo_info rnd_info; - - mbedtls_ecdh_init( &srv ); - mbedtls_ecdh_init( &cli ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &srv.grp, id ) == 0 ); - - memset( buf, 0x00, sizeof( buf ) ); vbuf = buf; - TEST_ASSERT( mbedtls_ecdh_make_params( &srv, &len, buf, 1000, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecdh_read_params( &cli, &vbuf, buf + len ) == 0 ); - - memset( buf, 0x00, sizeof( buf ) ); - TEST_ASSERT( mbedtls_ecdh_make_public( &cli, &len, buf, 1000, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecdh_read_public( &srv, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecdh_calc_secret( &srv, &len, buf, 1000, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecdh_calc_secret( &cli, &len, buf, 1000, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &srv.z, &cli.z ) == 0 ); - -exit: - mbedtls_ecdh_free( &srv ); - mbedtls_ecdh_free( &cli ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.data deleted file mode 100644 index d9640765ee..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.data +++ /dev/null @@ -1,252 +0,0 @@ -ECDSA primitive random #1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecdsa_prim_random:MBEDTLS_ECP_DP_SECP192R1 - -ECDSA primitive random #2 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecdsa_prim_random:MBEDTLS_ECP_DP_SECP224R1 - -ECDSA primitive random #3 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -ecdsa_prim_random:MBEDTLS_ECP_DP_SECP256R1 - -ECDSA primitive random #4 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -ecdsa_prim_random:MBEDTLS_ECP_DP_SECP384R1 - -ECDSA primitive random #5 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecdsa_prim_random:MBEDTLS_ECP_DP_SECP521R1 - -ECDSA primitive rfc 4754 p256 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -ecdsa_prim_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"DC51D3866A15BACDE33D96F992FCA99DA7E6EF0934E7097559C27F1614C88A7F":"2442A5CC0ECD015FA3CA31DC8E2BBC70BF42D60CBCA20085E0822CB04235E970":"6FC98BD7E50211A4A27102FA3549DF79EBCB4BF246B80945CDDFE7D509BBFD7D":"9E56F509196784D963D1C0A401510EE7ADA3DCC5DEE04B154BF61AF1D5A6DECE":"BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD":"CB28E0999B9C7715FD0A80D8E47A77079716CBBF917DD72E97566EA1C066957C":"86FA3BB4E26CAD5BF90B7F81899256CE7594BB1EA0C89212748BFF3B3D5B0315" - -ECDSA primitive rfc 4754 p384 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -ecdsa_prim_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"0BEB646634BA87735D77AE4809A0EBEA865535DE4C1E1DCB692E84708E81A5AF62E528C38B2A81B35309668D73524D9F":"96281BF8DD5E0525CA049C048D345D3082968D10FEDF5C5ACA0C64E6465A97EA5CE10C9DFEC21797415710721F437922":"447688BA94708EB6E2E4D59F6AB6D7EDFF9301D249FE49C33096655F5D502FAD3D383B91C5E7EDAA2B714CC99D5743CA":"B4B74E44D71A13D568003D7489908D564C7761E229C58CBFA18950096EB7463B854D7FA992F934D927376285E63414FA":"CB00753F45A35E8BB5A03D699AC65007272C32AB0EDED1631A8B605A43FF5BED8086072BA1E7CC2358BAECA134C825A7":"FB017B914E29149432D8BAC29A514640B46F53DDAB2C69948084E2930F1C8F7E08E07C9C63F2D21A07DCB56A6AF56EB3":"B263A1305E057F984D38726A1B46874109F417BCA112674C528262A40A629AF1CBB9F516CE0FA7D2FF630863A00E8B9F" - -ECDSA primitive rfc 4754 p521 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecdsa_prim_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0065FDA3409451DCAB0A0EAD45495112A3D813C17BFD34BDF8C1209D7DF5849120597779060A7FF9D704ADF78B570FFAD6F062E95C7E0C5D5481C5B153B48B375FA1":"0151518F1AF0F563517EDD5485190DF95A4BF57B5CBA4CF2A9A3F6474725A35F7AFE0A6DDEB8BEDBCD6A197E592D40188901CECD650699C9B5E456AEA5ADD19052A8":"006F3B142EA1BFFF7E2837AD44C9E4FF6D2D34C73184BBAD90026DD5E6E85317D9DF45CAD7803C6C20035B2F3FF63AFF4E1BA64D1C077577DA3F4286C58F0AEAE643":"00C1C2B305419F5A41344D7E4359933D734096F556197A9B244342B8B62F46F9373778F9DE6B6497B1EF825FF24F42F9B4A4BD7382CFC3378A540B1B7F0C1B956C2F":"DDAF35A193617ABACC417349AE20413112E6FA4E89A97EA20A9EEEE64B55D39A2192992A274FC1A836BA3C23A3FEEBBD454D4423643CE80E2A9AC94FA54CA49F":"0154FD3836AF92D0DCA57DD5341D3053988534FDE8318FC6AAAAB68E2E6F4339B19F2F281A7E0B22C269D93CF8794A9278880ED7DBB8D9362CAEACEE544320552251":"017705A7030290D1CEB605A9A1BB03FF9CDD521E87A696EC926C8C10C8362DF4975367101F67D1CF9BCCBF2F3D239534FA509E70AAC851AE01AAC68D62F866472660" - -ECDSA write-read random #1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecdsa_write_read_random:MBEDTLS_ECP_DP_SECP192R1 - -ECDSA write-read random #2 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecdsa_write_read_random:MBEDTLS_ECP_DP_SECP224R1 - -ECDSA write-read random #3 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -ecdsa_write_read_random:MBEDTLS_ECP_DP_SECP256R1 - -ECDSA write-read random #4 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -ecdsa_write_read_random:MBEDTLS_ECP_DP_SECP384R1 - -ECDSA write-read random #5 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecdsa_write_read_random:MBEDTLS_ECP_DP_SECP521R1 - -ECDSA deterministic test vector rfc 6979 p192 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA1:"sample":"98C6BD12B23EAF5E2A2045132086BE3EB8EBD62ABF6698FF":"57A22B07DEA9530F8DE9471B1DC6624472E8E2844BC25B64" - -ECDSA deterministic test vector rfc 6979 p192 sha224 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA224:"sample":"A1F00DAD97AEEC91C95585F36200C65F3C01812AA60378F5":"E07EC1304C7C6C9DEBBE980B9692668F81D4DE7922A0F97A" - -ECDSA deterministic test vector rfc 6979 p192 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA256:"sample":"4B0B8CE98A92866A2820E20AA6B75B56382E0F9BFD5ECB55":"CCDB006926EA9565CBADC840829D8C384E06DE1F1E381B85" - -ECDSA deterministic test vector rfc 6979 p192 sha384 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA384:"sample":"DA63BF0B9ABCF948FBB1E9167F136145F7A20426DCC287D5":"C3AA2C960972BD7A2003A57E1C4C77F0578F8AE95E31EC5E" - -ECDSA deterministic test vector rfc 6979 p192 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA512:"sample":"4D60C5AB1996BD848343B31C00850205E2EA6922DAC2E4B8":"3F6E837448F027A1BF4B34E796E32A811CBB4050908D8F67" - -ECDSA deterministic test vector rfc 6979 p192 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA1:"test":"0F2141A0EBBC44D2E1AF90A50EBCFCE5E197B3B7D4DE036D":"EB18BC9E1F3D7387500CB99CF5F7C157070A8961E38700B7" - -ECDSA deterministic test vector rfc 6979 p192 sha224 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA224:"test":"6945A1C1D1B2206B8145548F633BB61CEF04891BAF26ED34":"B7FB7FDFC339C0B9BD61A9F5A8EAF9BE58FC5CBA2CB15293" - -ECDSA deterministic test vector rfc 6979 p192 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA256:"test":"3A718BD8B4926C3B52EE6BBE67EF79B18CB6EB62B1AD97AE":"5662E6848A4A19B1F1AE2F72ACD4B8BBE50F1EAC65D9124F" - -ECDSA deterministic test vector rfc 6979 p192 sha384 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA384:"test":"B234B60B4DB75A733E19280A7A6034BD6B1EE88AF5332367":"7994090B2D59BB782BE57E74A44C9A1C700413F8ABEFE77A" - -ECDSA deterministic test vector rfc 6979 p192 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP192R1:"6FAB034934E4C0FC9AE67F5B5659A9D7D1FEFD187EE09FD4":MBEDTLS_MD_SHA512:"test":"FE4F4AE86A58B6507946715934FE2D8FF9D95B6B098FE739":"74CF5605C98FBA0E1EF34D4B5A1577A7DCF59457CAE52290" - -ECDSA deterministic test vector rfc 6979 p224 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA1:"sample":"22226F9D40A96E19C4A301CE5B74B115303C0F3A4FD30FC257FB57AC":"66D1CDD83E3AF75605DD6E2FEFF196D30AA7ED7A2EDF7AF475403D69" - -ECDSA deterministic test vector rfc 6979 p224 sha224 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA224:"sample":"1CDFE6662DDE1E4A1EC4CDEDF6A1F5A2FB7FBD9145C12113E6ABFD3E":"A6694FD7718A21053F225D3F46197CA699D45006C06F871808F43EBC" - -ECDSA deterministic test vector rfc 6979 p224 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA256:"sample":"61AA3DA010E8E8406C656BC477A7A7189895E7E840CDFE8FF42307BA":"BC814050DAB5D23770879494F9E0A680DC1AF7161991BDE692B10101" - -ECDSA deterministic test vector rfc 6979 p224 sha384 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA384:"sample":"0B115E5E36F0F9EC81F1325A5952878D745E19D7BB3EABFABA77E953":"830F34CCDFE826CCFDC81EB4129772E20E122348A2BBD889A1B1AF1D" - -ECDSA deterministic test vector rfc 6979 p224 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA512:"sample":"074BD1D979D5F32BF958DDC61E4FB4872ADCAFEB2256497CDAC30397":"A4CECA196C3D5A1FF31027B33185DC8EE43F288B21AB342E5D8EB084" - -ECDSA deterministic test vector rfc 6979 p224 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA1:"test":"DEAA646EC2AF2EA8AD53ED66B2E2DDAA49A12EFD8356561451F3E21C":"95987796F6CF2062AB8135271DE56AE55366C045F6D9593F53787BD2" - -ECDSA deterministic test vector rfc 6979 p224 sha224 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA224:"test":"C441CE8E261DED634E4CF84910E4C5D1D22C5CF3B732BB204DBEF019":"902F42847A63BDC5F6046ADA114953120F99442D76510150F372A3F4" - -ECDSA deterministic test vector rfc 6979 p224 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA256:"test":"AD04DDE87B84747A243A631EA47A1BA6D1FAA059149AD2440DE6FBA6":"178D49B1AE90E3D8B629BE3DB5683915F4E8C99FDF6E666CF37ADCFD" - -ECDSA deterministic test vector rfc 6979 p224 sha384 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA384:"test":"389B92682E399B26518A95506B52C03BC9379A9DADF3391A21FB0EA4":"414A718ED3249FF6DBC5B50C27F71F01F070944DA22AB1F78F559AAB" - -ECDSA deterministic test vector rfc 6979 p224 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP224R1:"F220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1":MBEDTLS_MD_SHA512:"test":"049F050477C5ADD858CAC56208394B5A55BAEBBE887FDF765047C17C":"077EB13E7005929CEFA3CD0403C7CDCC077ADF4E44F3C41B2F60ECFF" - -ECDSA deterministic test vector rfc 6979 p256 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA1:"sample":"61340C88C3AAEBEB4F6D667F672CA9759A6CCAA9FA8811313039EE4A35471D32":"6D7F147DAC089441BB2E2FE8F7A3FA264B9C475098FDCF6E00D7C996E1B8B7EB" - -ECDSA deterministic test vector rfc 6979 p256 sha224 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA224:"sample":"53B2FFF5D1752B2C689DF257C04C40A587FABABB3F6FC2702F1343AF7CA9AA3F":"B9AFB64FDC03DC1A131C7D2386D11E349F070AA432A4ACC918BEA988BF75C74C" - -ECDSA deterministic test vector rfc 6979 p256 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA256:"sample":"EFD48B2AACB6A8FD1140DD9CD45E81D69D2C877B56AAF991C34D0EA84EAF3716":"F7CB1C942D657C41D436C7A1B6E29F65F3E900DBB9AFF4064DC4AB2F843ACDA8" - -ECDSA deterministic test vector rfc 6979 p256 sha384 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA384:"sample":"0EAFEA039B20E9B42309FB1D89E213057CBF973DC0CFC8F129EDDDC800EF7719":"4861F0491E6998B9455193E34E7B0D284DDD7149A74B95B9261F13ABDE940954" - -ECDSA deterministic test vector rfc 6979 p256 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA512:"sample":"8496A60B5E9B47C825488827E0495B0E3FA109EC4568FD3F8D1097678EB97F00":"2362AB1ADBE2B8ADF9CB9EDAB740EA6049C028114F2460F96554F61FAE3302FE" - -ECDSA deterministic test vector rfc 6979 p256 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA1:"test":"0CBCC86FD6ABD1D99E703E1EC50069EE5C0B4BA4B9AC60E409E8EC5910D81A89":"01B9D7B73DFAA60D5651EC4591A0136F87653E0FD780C3B1BC872FFDEAE479B1" - -ECDSA deterministic test vector rfc 6979 p256 sha224 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA224:"test":"C37EDB6F0AE79D47C3C27E962FA269BB4F441770357E114EE511F662EC34A692":"C820053A05791E521FCAAD6042D40AEA1D6B1A540138558F47D0719800E18F2D" - -ECDSA deterministic test vector rfc 6979 p256 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA256:"test":"F1ABB023518351CD71D881567B1EA663ED3EFCF6C5132B354F28D3B0B7D38367":"019F4113742A2B14BD25926B49C649155F267E60D3814B4C0CC84250E46F0083" - -ECDSA deterministic test vector rfc 6979 p256 sha384 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA384:"test":"83910E8B48BB0C74244EBDF7F07A1C5413D61472BD941EF3920E623FBCCEBEB6":"8DDBEC54CF8CD5874883841D712142A56A8D0F218F5003CB0296B6B509619F2C" - -ECDSA deterministic test vector rfc 6979 p256 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP256R1:"C9AFA9D845BA75166B5C215767B1D6934E50C3DB36E89B127B8A622B120F6721":MBEDTLS_MD_SHA512:"test":"461D93F31B6540894788FD206C07CFA0CC35F46FA3C91816FFF1040AD1581A04":"39AF9F15DE0DB8D97E72719C74820D304CE5226E32DEDAE67519E840D1194E55" - -ECDSA deterministic test vector rfc 6979 p384 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA1:"sample":"EC748D839243D6FBEF4FC5C4859A7DFFD7F3ABDDF72014540C16D73309834FA37B9BA002899F6FDA3A4A9386790D4EB2":"A3BCFA947BEEF4732BF247AC17F71676CB31A847B9FF0CBC9C9ED4C1A5B3FACF26F49CA031D4857570CCB5CA4424A443" - -ECDSA deterministic test vector rfc 6979 p384 sha224 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA224:"sample":"42356E76B55A6D9B4631C865445DBE54E056D3B3431766D0509244793C3F9366450F76EE3DE43F5A125333A6BE060122":"9DA0C81787064021E78DF658F2FBB0B042BF304665DB721F077A4298B095E4834C082C03D83028EFBF93A3C23940CA8D" - -ECDSA deterministic test vector rfc 6979 p384 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA256:"sample":"21B13D1E013C7FA1392D03C5F99AF8B30C570C6F98D4EA8E354B63A21D3DAA33BDE1E888E63355D92FA2B3C36D8FB2CD":"F3AA443FB107745BF4BD77CB3891674632068A10CA67E3D45DB2266FA7D1FEEBEFDC63ECCD1AC42EC0CB8668A4FA0AB0" - -ECDSA deterministic test vector rfc 6979 p384 sha384 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA384:"sample":"94EDBB92A5ECB8AAD4736E56C691916B3F88140666CE9FA73D64C4EA95AD133C81A648152E44ACF96E36DD1E80FABE46":"99EF4AEB15F178CEA1FE40DB2603138F130E740A19624526203B6351D0A3A94FA329C145786E679E7B82C71A38628AC8" - -ECDSA deterministic test vector rfc 6979 p384 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA512:"sample":"ED0959D5880AB2D869AE7F6C2915C6D60F96507F9CB3E047C0046861DA4A799CFE30F35CC900056D7C99CD7882433709":"512C8CCEEE3890A84058CE1E22DBC2198F42323CE8ACA9135329F03C068E5112DC7CC3EF3446DEFCEB01A45C2667FDD5" - -ECDSA deterministic test vector rfc 6979 p384 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA1:"test":"4BC35D3A50EF4E30576F58CD96CE6BF638025EE624004A1F7789A8B8E43D0678ACD9D29876DAF46638645F7F404B11C7":"D5A6326C494ED3FF614703878961C0FDE7B2C278F9A65FD8C4B7186201A2991695BA1C84541327E966FA7B50F7382282" - -ECDSA deterministic test vector rfc 6979 p384 sha224 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA224:"test":"E8C9D0B6EA72A0E7837FEA1D14A1A9557F29FAA45D3E7EE888FC5BF954B5E62464A9A817C47FF78B8C11066B24080E72":"07041D4A7A0379AC7232FF72E6F77B6DDB8F09B16CCE0EC3286B2BD43FA8C6141C53EA5ABEF0D8231077A04540A96B66" - -ECDSA deterministic test vector rfc 6979 p384 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA256:"test":"6D6DEFAC9AB64DABAFE36C6BF510352A4CC27001263638E5B16D9BB51D451559F918EEDAF2293BE5B475CC8F0188636B":"2D46F3BECBCC523D5F1A1256BF0C9B024D879BA9E838144C8BA6BAEB4B53B47D51AB373F9845C0514EEFB14024787265" - -ECDSA deterministic test vector rfc 6979 p384 sha384 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA384:"test":"8203B63D3C853E8D77227FB377BCF7B7B772E97892A80F36AB775D509D7A5FEB0542A7F0812998DA8F1DD3CA3CF023DB":"DDD0760448D42D8A43AF45AF836FCE4DE8BE06B485E9B61B827C2F13173923E06A739F040649A667BF3B828246BAA5A5" - -ECDSA deterministic test vector rfc 6979 p384 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP384R1:"6B9D3DAD2E1B8C1C05B19875B6659F4DE23C3B667BF297BA9AA47740787137D896D5724E4C70A825F872C9EA60D2EDF5":MBEDTLS_MD_SHA512:"test":"A0D5D090C9980FAF3C2CE57B7AE951D31977DD11C775D314AF55F76C676447D06FB6495CD21B4B6E340FC236584FB277":"976984E59B4C77B0E8E4460DCA3D9F20E07B9BB1F63BEEFAF576F6B2E8B224634A2092CD3792E0159AD9CEE37659C736" - -ECDSA deterministic test vector rfc 6979 p521 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA1:"sample":"0343B6EC45728975EA5CBA6659BBB6062A5FF89EEA58BE3C80B619F322C87910FE092F7D45BB0F8EEE01ED3F20BABEC079D202AE677B243AB40B5431D497C55D75D":"0E7B0E675A9B24413D448B8CC119D2BF7B2D2DF032741C096634D6D65D0DBE3D5694625FB9E8104D3B842C1B0E2D0B98BEA19341E8676AEF66AE4EBA3D5475D5D16" - -ECDSA deterministic test vector rfc 6979 p521 sha224 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA224:"sample":"1776331CFCDF927D666E032E00CF776187BC9FDD8E69D0DABB4109FFE1B5E2A30715F4CC923A4A5E94D2503E9ACFED92857B7F31D7152E0F8C00C15FF3D87E2ED2E":"050CB5265417FE2320BBB5A122B8E1A32BD699089851128E360E620A30C7E17BA41A666AF126CE100E5799B153B60528D5300D08489CA9178FB610A2006C254B41F" - -ECDSA deterministic test vector rfc 6979 p521 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA256:"sample":"1511BB4D675114FE266FC4372B87682BAECC01D3CC62CF2303C92B3526012659D16876E25C7C1E57648F23B73564D67F61C6F14D527D54972810421E7D87589E1A7":"04A171143A83163D6DF460AAF61522695F207A58B95C0644D87E52AA1A347916E4F7A72930B1BC06DBE22CE3F58264AFD23704CBB63B29B931F7DE6C9D949A7ECFC" - -ECDSA deterministic test vector rfc 6979 p521 sha384 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA384:"sample":"1EA842A0E17D2DE4F92C15315C63DDF72685C18195C2BB95E572B9C5136CA4B4B576AD712A52BE9730627D16054BA40CC0B8D3FF035B12AE75168397F5D50C67451":"1F21A3CEE066E1961025FB048BD5FE2B7924D0CD797BABE0A83B66F1E35EEAF5FDE143FA85DC394A7DEE766523393784484BDF3E00114A1C857CDE1AA203DB65D61" - -ECDSA deterministic test vector rfc 6979 p521 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA512:"sample":"0C328FAFCBD79DD77850370C46325D987CB525569FB63C5D3BC53950E6D4C5F174E25A1EE9017B5D450606ADD152B534931D7D4E8455CC91F9B15BF05EC36E377FA":"0617CCE7CF5064806C467F678D3B4080D6F1CC50AF26CA209417308281B68AF282623EAA63E5B5C0723D8B8C37FF0777B1A20F8CCB1DCCC43997F1EE0E44DA4A67A" - -ECDSA deterministic test vector rfc 6979 p521 mbedtls_sha1 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA1_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA1:"test":"13BAD9F29ABE20DE37EBEB823C252CA0F63361284015A3BF430A46AAA80B87B0693F0694BD88AFE4E661FC33B094CD3B7963BED5A727ED8BD6A3A202ABE009D0367":"1E9BB81FF7944CA409AD138DBBEE228E1AFCC0C890FC78EC8604639CB0DBDC90F717A99EAD9D272855D00162EE9527567DD6A92CBD629805C0445282BBC916797FF" - -ECDSA deterministic test vector rfc 6979 p521 sha224 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA224:"test":"1C7ED902E123E6815546065A2C4AF977B22AA8EADDB68B2C1110E7EA44D42086BFE4A34B67DDC0E17E96536E358219B23A706C6A6E16BA77B65E1C595D43CAE17FB":"177336676304FCB343CE028B38E7B4FBA76C1C1B277DA18CAD2A8478B2A9A9F5BEC0F3BA04F35DB3E4263569EC6AADE8C92746E4C82F8299AE1B8F1739F8FD519A4" - -ECDSA deterministic test vector rfc 6979 p521 mbedtls_sha256 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA256_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA256:"test":"00E871C4A14F993C6C7369501900C4BC1E9C7B0B4BA44E04868B30B41D8071042EB28C4C250411D0CE08CD197E4188EA4876F279F90B3D8D74A3C76E6F1E4656AA8":"0CD52DBAA33B063C3A6CD8058A1FB0A46A4754B034FCC644766CA14DA8CA5CA9FDE00E88C1AD60CCBA759025299079D7A427EC3CC5B619BFBC828E7769BCD694E86" - -ECDSA deterministic test vector rfc 6979 p521 sha384 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA384:"test":"14BEE21A18B6D8B3C93FAB08D43E739707953244FDBE924FA926D76669E7AC8C89DF62ED8975C2D8397A65A49DCC09F6B0AC62272741924D479354D74FF6075578C":"133330865C067A0EAF72362A65E2D7BC4E461E8C8995C3B6226A21BD1AA78F0ED94FE536A0DCA35534F0CD1510C41525D163FE9D74D134881E35141ED5E8E95B979" - -ECDSA deterministic test vector rfc 6979 p521 mbedtls_sha512 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED:MBEDTLS_SHA512_C -ecdsa_det_test_vectors:MBEDTLS_ECP_DP_SECP521R1:"0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538":MBEDTLS_MD_SHA512:"test":"13E99020ABF5CEE7525D16B69B229652AB6BDF2AFFCAEF38773B4B7D08725F10CDB93482FDCC54EDCEE91ECA4166B2A7C6265EF0CE2BD7051B7CEF945BABD47EE6D":"1FBD0013C674AA79CB39849527916CE301C66EA7CE8B80682786AD60F98F7E78A19CA69EFF5C57400E3B3A0AD66CE0978214D13BAF4E9AC60752F7B155E2DE4DCE3" - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.function deleted file mode 100644 index 88e07a9e6a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecdsa.function +++ /dev/null @@ -1,194 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/ecdsa.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ECDSA_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void ecdsa_prim_random( int id ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point Q; - mbedtls_mpi d, r, s; - rnd_pseudo_info rnd_info; - unsigned char buf[66]; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &Q ); - mbedtls_mpi_init( &d ); mbedtls_mpi_init( &r ); mbedtls_mpi_init( &s ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - memset( buf, 0, sizeof( buf ) ); - - /* prepare material for signature */ - TEST_ASSERT( rnd_pseudo_rand( &rnd_info, buf, sizeof( buf ) ) == 0 ); - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - TEST_ASSERT( mbedtls_ecp_gen_keypair( &grp, &d, &Q, &rnd_pseudo_rand, &rnd_info ) - == 0 ); - - TEST_ASSERT( mbedtls_ecdsa_sign( &grp, &r, &s, &d, buf, sizeof( buf ), - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecdsa_verify( &grp, buf, sizeof( buf ), &Q, &r, &s ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &Q ); - mbedtls_mpi_free( &d ); mbedtls_mpi_free( &r ); mbedtls_mpi_free( &s ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecdsa_prim_test_vectors( int id, char *d_str, char *xQ_str, char *yQ_str, - char *k_str, char *hash_str, char *r_str, - char *s_str ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point Q; - mbedtls_mpi d, r, s, r_check, s_check; - unsigned char hash[66], rnd_buf[66]; - size_t hlen; - rnd_buf_info rnd_info; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &Q ); - mbedtls_mpi_init( &d ); mbedtls_mpi_init( &r ); mbedtls_mpi_init( &s ); - mbedtls_mpi_init( &r_check ); mbedtls_mpi_init( &s_check ); - memset( hash, 0, sizeof( hash ) ); - memset( rnd_buf, 0, sizeof( rnd_buf ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - TEST_ASSERT( mbedtls_ecp_point_read_string( &Q, 16, xQ_str, yQ_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &d, 16, d_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &r_check, 16, r_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &s_check, 16, s_str ) == 0 ); - hlen = unhexify(hash, hash_str); - rnd_info.buf = rnd_buf; - rnd_info.length = unhexify( rnd_buf, k_str ); - - /* Fix rnd_buf by shifting it left if necessary */ - if( grp.nbits % 8 != 0 ) - { - unsigned char shift = 8 - ( grp.nbits % 8 ); - size_t i; - - for( i = 0; i < rnd_info.length - 1; i++ ) - rnd_buf[i] = rnd_buf[i] << shift | rnd_buf[i+1] >> ( 8 - shift ); - - rnd_buf[rnd_info.length-1] <<= shift; - } - - TEST_ASSERT( mbedtls_ecdsa_sign( &grp, &r, &s, &d, hash, hlen, - rnd_buffer_rand, &rnd_info ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &r, &r_check ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &s, &s_check ) == 0 ); - - TEST_ASSERT( mbedtls_ecdsa_verify( &grp, hash, hlen, &Q, &r_check, &s_check ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &Q ); - mbedtls_mpi_free( &d ); mbedtls_mpi_free( &r ); mbedtls_mpi_free( &s ); - mbedtls_mpi_free( &r_check ); mbedtls_mpi_free( &s_check ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_ECDSA_DETERMINISTIC */ -void ecdsa_det_test_vectors( int id, char *d_str, int md_alg, - char *msg, char *r_str, char *s_str ) -{ - mbedtls_ecp_group grp; - mbedtls_mpi d, r, s, r_check, s_check; - unsigned char hash[MBEDTLS_MD_MAX_SIZE]; - size_t hlen; - const mbedtls_md_info_t *md_info; - - mbedtls_ecp_group_init( &grp ); - mbedtls_mpi_init( &d ); mbedtls_mpi_init( &r ); mbedtls_mpi_init( &s ); - mbedtls_mpi_init( &r_check ); mbedtls_mpi_init( &s_check ); - memset( hash, 0, sizeof( hash ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &d, 16, d_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &r_check, 16, r_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &s_check, 16, s_str ) == 0 ); - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - hlen = mbedtls_md_get_size( md_info ); - mbedtls_md( md_info, (const unsigned char *) msg, strlen( msg ), hash ); - - TEST_ASSERT( mbedtls_ecdsa_sign_det( &grp, &r, &s, &d, hash, hlen, md_alg ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &r, &r_check ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &s, &s_check ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_mpi_free( &d ); mbedtls_mpi_free( &r ); mbedtls_mpi_free( &s ); - mbedtls_mpi_free( &r_check ); mbedtls_mpi_free( &s_check ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA256_C */ -void ecdsa_write_read_random( int id ) -{ - mbedtls_ecdsa_context ctx; - rnd_pseudo_info rnd_info; - unsigned char hash[32]; - unsigned char sig[200]; - size_t sig_len, i; - - mbedtls_ecdsa_init( &ctx ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - memset( hash, 0, sizeof( hash ) ); - memset( sig, 0x2a, sizeof( sig ) ); - - /* prepare material for signature */ - TEST_ASSERT( rnd_pseudo_rand( &rnd_info, hash, sizeof( hash ) ) == 0 ); - - /* generate signing key */ - TEST_ASSERT( mbedtls_ecdsa_genkey( &ctx, id, &rnd_pseudo_rand, &rnd_info ) == 0 ); - - /* generate and write signature, then read and verify it */ - TEST_ASSERT( mbedtls_ecdsa_write_signature( &ctx, MBEDTLS_MD_SHA256, - hash, sizeof( hash ), - sig, &sig_len, &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecdsa_read_signature( &ctx, hash, sizeof( hash ), - sig, sig_len ) == 0 ); - - /* check we didn't write past the announced length */ - for( i = sig_len; i < sizeof( sig ); i++ ) - TEST_ASSERT( sig[i] == 0x2a ); - - /* try verification with invalid length */ - TEST_ASSERT( mbedtls_ecdsa_read_signature( &ctx, hash, sizeof( hash ), - sig, sig_len - 1 ) != 0 ); - TEST_ASSERT( mbedtls_ecdsa_read_signature( &ctx, hash, sizeof( hash ), - sig, sig_len + 1 ) != 0 ); - - /* try invalid sequence tag */ - sig[0]++; - TEST_ASSERT( mbedtls_ecdsa_read_signature( &ctx, hash, sizeof( hash ), - sig, sig_len ) != 0 ); - sig[0]--; - - /* try modifying r */ - sig[10]++; - TEST_ASSERT( mbedtls_ecdsa_read_signature( &ctx, hash, sizeof( hash ), - sig, sig_len ) != 0 ); - sig[10]--; - - /* try modifying s */ - sig[sig_len - 1]++; - TEST_ASSERT( mbedtls_ecdsa_read_signature( &ctx, hash, sizeof( hash ), - sig, sig_len ) != 0 ); - sig[sig_len - 1]--; - -exit: - mbedtls_ecdsa_free( &ctx ); -} -/* END_CASE */ - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.data deleted file mode 100644 index 1a772a9658..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.data +++ /dev/null @@ -1,230 +0,0 @@ -ECJPAKE selftest -ecjpake_selftest: - -ECJPAKE round one: client, valid -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51620934d74eb43e54df424fd96306c0117bf131afabf90a9d33d1198d905193735144104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb12":0 - -ECJPAKE round one: server, valid -read_round_one:MBEDTLS_ECJPAKE_SERVER:"4104accf0106ef858fa2d919331346805a78b58bbad0b844e5c7892879146187dd2666ada781bb7f111372251a8910621f634df128ac48e381fd6ef9060731f694a441041dd0bd5d4566c9bed9ce7de701b5e82e08e84b730466018ab903c79eb982172236c0c1728ae4bf73610d34de44246ef3d9c05a2236fb66a6583d7449308babce2072fe16662992e9235c25002f11b15087b82738e03c945bf7a2995dda1e98345841047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b4104a49558d32ed1ebfc1816af4ff09b55fcb4ca47b2a02d1e7caf1179ea3fe1395b22b861964016fabaf72c975695d93d4df0e5197fe9f040634ed59764937787be20bc4deebbf9b8d60a335f046ca3aa941e45864c7cadef9cf75b3d8b010e443ef0":0 - -ECJPAKE round one: role mismatch -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104accf0106ef858fa2d919331346805a78b58bbad0b844e5c7892879146187dd2666ada781bb7f111372251a8910621f634df128ac48e381fd6ef9060731f694a441041dd0bd5d4566c9bed9ce7de701b5e82e08e84b730466018ab903c79eb982172236c0c1728ae4bf73610d34de44246ef3d9c05a2236fb66a6583d7449308babce2072fe16662992e9235c25002f11b15087b82738e03c945bf7a2995dda1e98345841047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b4104a49558d32ed1ebfc1816af4ff09b55fcb4ca47b2a02d1e7caf1179ea3fe1395b22b861964016fabaf72c975695d93d4df0e5197fe9f040634ed59764937787be20bc4deebbf9b8d60a335f046ca3aa941e45864c7cadef9cf75b3d8b010e443ef0":MBEDTLS_ERR_ECP_VERIFY_FAILED - -ECJPAKE round one: trailing byte -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51620934d74eb43e54df424fd96306c0117bf131afabf90a9d33d1198d905193735144104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1200":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: no data -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: length of first point too small -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: length of first point too big -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"01":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: no point data -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"0104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: first point is zero -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"0100":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round one: KKP1: unknown first point format -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41057ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round one: KKP1: nothing after first point -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: length of second point too small -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: length of second point too big -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b01":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: no second point data -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b0104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: unknow second point format -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410509f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb516":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round one: KKP1: nothing after second point -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb516":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: zero-length r -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51600":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round one: KKP1: no data for r -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51601":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP1: corrupted r -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51620934d74eb43e54df424fd96306c0117bf131afabf90a9d33d1198d90519373515":MBEDTLS_ERR_ECP_VERIFY_FAILED - -ECJPAKE round one: KKP1: X not on the curve -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"41047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2a410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51620934d74eb43e54df424fd96306c0117bf131afabf90a9d33d1198d90519373514":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round one: KKP2: no data -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb12":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: length of first point too small -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1200":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: length of first point too big -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1201":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: no point data -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb120104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: first point is zero -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb120100":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round one: KKP2: unknown first point format -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241057ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round one: KKP2: nothing after first point -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: length of second point too small -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: length of second point too big -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b01":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: no second point data -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b0104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: unknow second point format -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410509f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb516":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round one: KKP2: nothing after second point -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb516":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: zero-length r -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51600":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round one: KKP2: no data for r -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51601":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round one: KKP2: corrupted r -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2b410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51620934d74eb43e54df424fd96306c0117bf131afabf90a9d33d1198d90519373515":MBEDTLS_ERR_ECP_VERIFY_FAILED - -ECJPAKE round one: KKP2: X not on the curve -read_round_one:MBEDTLS_ECJPAKE_CLIENT:"4104190a07700ffa4be6ae1d79ee0f06aeb544cd5addaabedf70f8623321332c54f355f0fbfec783ed359e5d0bf7377a0fc4ea7ace473c9c112b41ccd41ac56a56124104360a1cea33fce641156458e0a4eac219e96831e6aebc88b3f3752f93a0281d1bf1fb106051db9694a8d6e862a5ef1324a3d9e27894f1ee4f7c59199965a8dd4a2091847d2d22df3ee55faa2a3fb33fd2d1e055a07a7c61ecfb8d80ec00c2c9eb1241047ea6e3a4487037a9e0dbd79262b2cc273e779930fc18409ac5361c5fe669d702e147790aeb4ce7fd6575ab0f6c7fd1c335939aa863ba37ec91b7e32bb013bb2a410409f85b3d20ebd7885ce464c08d056d6428fe4dd9287aa365f131f4360ff386d846898bc4b41583c2a5197f65d78742746c12a5ec0a4ffe2f270a750a1d8fb51620934d74eb43e54df424fd96306c0117bf131afabf90a9d33d1198d90519373514":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round two client: valid -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c820ff724a9a70b88cb86f20b434c6865aa1cd7906dd7c9bce3525f508276f26836c":0 - -ECJPAKE round two client: trailing byte -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c820ff724a9a70b88cb86f20b434c6865aa1cd7906dd7c9bce3525f508276f26836c00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: no data -read_round_two_cli:"":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: ECParams too short -read_round_two_cli:"0300":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: ECParams not named curve -read_round_two_cli:"010017":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: ECParams wrong curve -read_round_two_cli:"030016":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round two client: no data after ECParams -read_round_two_cli:"030017":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: length of first point too small -read_round_two_cli:"03001700":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: length of first point too big -read_round_two_cli:"03001701":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: no first point data -read_round_two_cli:"0300170104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: first point is zero -read_round_two_cli:"0300170100":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round two client: unknown first point format -read_round_two_cli:"03001741050fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a6":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round two client: nothing after first point -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a6":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: length of second point too small -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a600":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: length of second point too big -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a601":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: no second point data -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a60104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: unknown second point format -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641055516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c8":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round two client: nothing after second point -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c8":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: zero-length r -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c800":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round two client: no data for r -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c801":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two client: corrupted r -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a641045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c820ff724a9a70b88cb86f20b434c6865aa1cd7906dd7c9bce3525f508276f26836d":MBEDTLS_ERR_ECP_VERIFY_FAILED - -ECJPAKE round two client: X not on the curve -read_round_two_cli:"03001741040fb22b1d5d1123e0ef9feb9d8a2e590a1f4d7ced2c2b06586e8f2a16d4eb2fda4328a20b07d8fd667654ca18c54e32a333a0845451e926ee8804fd7af0aaa7a741045516ea3e54a0d5d8b2ce786b38d383370029a5dbe4459c9dd601b408a24ae6465c8ac905b9eb03b5d3691c139ef83f1cd4200f6c9cd4ec392218a59ed243d3c820ff724a9a70b88cb86f20b434c6865aa1cd7906dd7c9bce3525f508276f26836c":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round two server: valid -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d200f011f19483535a6e89a580c9b0003baf21462ece91a82cc38dbdcae60d9c54c":0 - -ECJPAKE round two server: trailing byte -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d200f011f19483535a6e89a580c9b0003baf21462ece91a82cc38dbdcae60d9c54c00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: no data -read_round_two_srv:"":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: length of forst point too small -read_round_two_srv:"00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: length of first point too big -read_round_two_srv:"01":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: no first point data -read_round_two_srv:"0104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: first point is zero -read_round_two_srv:"0100":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round two server: unknown first point format -read_round_two_srv:"410569d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round two server: nothing after first point -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: length of second point too small -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: length of second point too big -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee01":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: no second point data -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee0104":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: unknown second point format -read_round_two_srv:"410569d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECJPAKE round two server: nothing after second point -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: zero-length r -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d00":MBEDTLS_ERR_ECP_INVALID_KEY - -ECJPAKE round two server: no data for r -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d20":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECJPAKE round two server: corrupted r -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ee4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d200f011f19483535a6e89a580c9b0003baf21462ece91a82cc38dbdcae60d9c54d":MBEDTLS_ERR_ECP_VERIFY_FAILED - -ECJPAKE round two server: X not on curve -read_round_two_srv:"410469d54ee85e90ce3f1246742de507e939e81d1dc1c5cb988b58c310c9fdd9524d93720b45541c83ee8841191da7ced86e3312d43623c1d63e74989aba4affd1ef4104077e8c31e20e6bedb760c13593e69f15be85c27d68cd09ccb8c4183608917c5c3d409fac39fefee82f7292d36f0d23e055913f45a52b85dd8a2052e9e129bb4d200f011f19483535a6e89a580c9b0003baf21462ece91a82cc38dbdcae60d9c54c":MBEDTLS_ERR_ECP_INVALID_KEY diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.function deleted file mode 100644 index 8d867b7364..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecjpake.function +++ /dev/null @@ -1,190 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/ecjpake.h" - -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && defined(MBEDTLS_SHA256_C) -static const unsigned char ecjpake_test_x1[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, - 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x21 -}; - -static const unsigned char ecjpake_test_x2[] = { - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x81 -}; - -static const unsigned char ecjpake_test_x3[] = { - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x81 -}; - -static const unsigned char ecjpake_test_x4[] = { - 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, - 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, - 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe1 -}; - -static const unsigned char ecjpake_test_X1[] = { - 0x04, 0xac, 0xcf, 0x01, 0x06, 0xef, 0x85, 0x8f, 0xa2, 0xd9, 0x19, 0x33, - 0x13, 0x46, 0x80, 0x5a, 0x78, 0xb5, 0x8b, 0xba, 0xd0, 0xb8, 0x44, 0xe5, - 0xc7, 0x89, 0x28, 0x79, 0x14, 0x61, 0x87, 0xdd, 0x26, 0x66, 0xad, 0xa7, - 0x81, 0xbb, 0x7f, 0x11, 0x13, 0x72, 0x25, 0x1a, 0x89, 0x10, 0x62, 0x1f, - 0x63, 0x4d, 0xf1, 0x28, 0xac, 0x48, 0xe3, 0x81, 0xfd, 0x6e, 0xf9, 0x06, - 0x07, 0x31, 0xf6, 0x94, 0xa4 -}; - -static const unsigned char ecjpake_test_X2[] = { - 0x04, 0x7e, 0xa6, 0xe3, 0xa4, 0x48, 0x70, 0x37, 0xa9, 0xe0, 0xdb, 0xd7, - 0x92, 0x62, 0xb2, 0xcc, 0x27, 0x3e, 0x77, 0x99, 0x30, 0xfc, 0x18, 0x40, - 0x9a, 0xc5, 0x36, 0x1c, 0x5f, 0xe6, 0x69, 0xd7, 0x02, 0xe1, 0x47, 0x79, - 0x0a, 0xeb, 0x4c, 0xe7, 0xfd, 0x65, 0x75, 0xab, 0x0f, 0x6c, 0x7f, 0xd1, - 0xc3, 0x35, 0x93, 0x9a, 0xa8, 0x63, 0xba, 0x37, 0xec, 0x91, 0xb7, 0xe3, - 0x2b, 0xb0, 0x13, 0xbb, 0x2b -}; - -static const unsigned char ecjpake_test_X3[] = { - 0x04, 0x7e, 0xa6, 0xe3, 0xa4, 0x48, 0x70, 0x37, 0xa9, 0xe0, 0xdb, 0xd7, - 0x92, 0x62, 0xb2, 0xcc, 0x27, 0x3e, 0x77, 0x99, 0x30, 0xfc, 0x18, 0x40, - 0x9a, 0xc5, 0x36, 0x1c, 0x5f, 0xe6, 0x69, 0xd7, 0x02, 0xe1, 0x47, 0x79, - 0x0a, 0xeb, 0x4c, 0xe7, 0xfd, 0x65, 0x75, 0xab, 0x0f, 0x6c, 0x7f, 0xd1, - 0xc3, 0x35, 0x93, 0x9a, 0xa8, 0x63, 0xba, 0x37, 0xec, 0x91, 0xb7, 0xe3, - 0x2b, 0xb0, 0x13, 0xbb, 0x2b -}; - -static const unsigned char ecjpake_test_X4[] = { - 0x04, 0x19, 0x0a, 0x07, 0x70, 0x0f, 0xfa, 0x4b, 0xe6, 0xae, 0x1d, 0x79, - 0xee, 0x0f, 0x06, 0xae, 0xb5, 0x44, 0xcd, 0x5a, 0xdd, 0xaa, 0xbe, 0xdf, - 0x70, 0xf8, 0x62, 0x33, 0x21, 0x33, 0x2c, 0x54, 0xf3, 0x55, 0xf0, 0xfb, - 0xfe, 0xc7, 0x83, 0xed, 0x35, 0x9e, 0x5d, 0x0b, 0xf7, 0x37, 0x7a, 0x0f, - 0xc4, 0xea, 0x7a, 0xce, 0x47, 0x3c, 0x9c, 0x11, 0x2b, 0x41, 0xcc, 0xd4, - 0x1a, 0xc5, 0x6a, 0x56, 0x12 -}; - -/* Load my private and public keys, and peer's public keys */ -static int ecjpake_test_load( mbedtls_ecjpake_context *ctx, - const unsigned char *xm1, size_t len_xm1, - const unsigned char *xm2, size_t len_xm2, - const unsigned char *Xm1, size_t len_Xm1, - const unsigned char *Xm2, size_t len_Xm2, - const unsigned char *Xp1, size_t len_Xp1, - const unsigned char *Xp2, size_t len_Xp2 ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm1, xm1, len_xm1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm2, xm2, len_xm2 ) ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp, - &ctx->Xm1, Xm1, len_Xm1 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp, - &ctx->Xm2, Xm2, len_Xm2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp, - &ctx->Xp1, Xp1, len_Xp1 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp, - &ctx->Xp2, Xp2, len_Xp2 ) ); - -cleanup: - return( ret ); -} - -#define ADD_SIZE( x ) x, sizeof( x ) -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED && MBEDTLS_SHA256_C */ -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ECJPAKE_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void ecjpake_selftest() -{ - TEST_ASSERT( mbedtls_ecjpake_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C */ -void read_round_one( int role, char *data, int ref_ret ) -{ - mbedtls_ecjpake_context ctx; - const unsigned char pw[] = {}; - unsigned char *msg; - size_t len; - - mbedtls_ecjpake_init( &ctx ); - - msg = unhexify_alloc( data, &len ); - TEST_ASSERT( msg != NULL ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &ctx, role, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, pw, 0 ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &ctx, msg, len ) == ref_ret ); - -exit: - mbedtls_ecjpake_free( &ctx ); - mbedtls_free( msg ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C */ -void read_round_two_cli( char *data, int ref_ret ) -{ - mbedtls_ecjpake_context ctx; - const unsigned char pw[] = {}; - unsigned char *msg; - size_t len; - - mbedtls_ecjpake_init( &ctx ); - - msg = unhexify_alloc( data, &len ); - TEST_ASSERT( msg != NULL ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &ctx, MBEDTLS_ECJPAKE_CLIENT, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, pw, 0 ) == 0 ); - - TEST_ASSERT( ecjpake_test_load( &ctx, - ADD_SIZE( ecjpake_test_x1 ), ADD_SIZE( ecjpake_test_x2 ), - ADD_SIZE( ecjpake_test_X1 ), ADD_SIZE( ecjpake_test_X2 ), - ADD_SIZE( ecjpake_test_X3 ), ADD_SIZE( ecjpake_test_X4 ) ) - == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &ctx, msg, len ) == ref_ret ); - -exit: - mbedtls_ecjpake_free( &ctx ); - mbedtls_free( msg ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C */ -void read_round_two_srv( char *data, int ref_ret ) -{ - mbedtls_ecjpake_context ctx; - const unsigned char pw[] = {}; - unsigned char *msg; - size_t len; - - mbedtls_ecjpake_init( &ctx ); - - msg = unhexify_alloc( data, &len ); - TEST_ASSERT( msg != NULL ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &ctx, MBEDTLS_ECJPAKE_SERVER, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, pw, 0 ) == 0 ); - - TEST_ASSERT( ecjpake_test_load( &ctx, - ADD_SIZE( ecjpake_test_x3 ), ADD_SIZE( ecjpake_test_x4 ), - ADD_SIZE( ecjpake_test_X3 ), ADD_SIZE( ecjpake_test_X4 ), - ADD_SIZE( ecjpake_test_X1 ), ADD_SIZE( ecjpake_test_X2 ) ) - == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &ctx, msg, len ) == ref_ret ); - -exit: - mbedtls_ecjpake_free( &ctx ); - mbedtls_free( msg ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.data deleted file mode 100644 index 1c858b5f78..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.data +++ /dev/null @@ -1,338 +0,0 @@ -ECP curve info #1 -depends_on:MBEDTLS_ECP_DP_BP512R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_BP512R1:28:512:"brainpoolP512r1" - -ECP curve info #2 -depends_on:MBEDTLS_ECP_DP_BP384R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_BP384R1:27:384:"brainpoolP384r1" - -ECP curve info #3 -depends_on:MBEDTLS_ECP_DP_BP256R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_BP256R1:26:256:"brainpoolP256r1" - -ECP curve info #4 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_SECP521R1:25:521:"secp521r1" - -ECP curve info #5 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_SECP384R1:24:384:"secp384r1" - -ECP curve info #6 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_SECP256R1:23:256:"secp256r1" - -ECP curve info #7 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_SECP224R1:21:224:"secp224r1" - -ECP curve info #8 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_curve_info:MBEDTLS_ECP_DP_SECP192R1:19:192:"secp192r1" - -ECP check pubkey Montgomery #1 (too big) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -ecp_check_pub_mx:MBEDTLS_ECP_DP_CURVE25519:"010000000000000000000000000000000000000000000000000000000000000000":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check pubkey Montgomery #2 (biggest) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -ecp_check_pub_mx:MBEDTLS_ECP_DP_CURVE25519:"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF":0 - -ECP write binary #0 (zero, bad format) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"01":"01":"00":ECP_PF_UNKNOWN:"00":1:MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP write binary #1 (zero, uncompressed, buffer just fits) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"01":"01":"00":MBEDTLS_ECP_PF_UNCOMPRESSED:"00":1:0 - -ECP write binary #2 (zero, buffer too small) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"01":"01":"00":MBEDTLS_ECP_PF_UNCOMPRESSED:"00":0:MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - -ECP write binary #3 (non-zero, uncompressed, buffer just fits) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":MBEDTLS_ECP_PF_UNCOMPRESSED:"0448d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc99336ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":49:0 - -ECP write binary #4 (non-zero, uncompressed, buffer too small) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":MBEDTLS_ECP_PF_UNCOMPRESSED:"0448d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc99336ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":48:MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - -ECP write binary #5 (zero, compressed, buffer just fits) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"01":"01":"00":MBEDTLS_ECP_PF_COMPRESSED:"00":1:0 - -ECP write binary #6 (zero, buffer too small) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"01":"01":"00":MBEDTLS_ECP_PF_COMPRESSED:"00":0:MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - -ECP write binary #7 (even, compressed, buffer just fits) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":MBEDTLS_ECP_PF_COMPRESSED:"0248d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":25:0 - -ECP write binary #8 (even, compressed, buffer too small) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":MBEDTLS_ECP_PF_COMPRESSED:"0248d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":24:MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL - -ECP write binary #9 (odd, compressed, buffer just fits) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_write_binary:MBEDTLS_ECP_DP_SECP192R1:"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"93112b28345b7d1d7799611e49bea9d8290cb2d7afe1f9f3":"01":MBEDTLS_ECP_PF_COMPRESSED:"0348d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":25:0 - -ECP read binary #1 (zero, invalid ilen) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_read_binary:MBEDTLS_ECP_DP_SECP192R1:"0000":"01":"01":"00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP read binary #2 (zero, invalid first byte) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_read_binary:MBEDTLS_ECP_DP_SECP192R1:"01":"01":"01":"00":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECP read binary #3 (zero, OK) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_read_binary:MBEDTLS_ECP_DP_SECP192R1:"00":"01":"01":"00":0 - -ECP read binary #4 (non-zero, invalid ilen) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_read_binary:MBEDTLS_ECP_DP_SECP192R1:"04001122":"01":"01":"00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP read binary #5 (non-zero, invalid first byte) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_read_binary:MBEDTLS_ECP_DP_SECP192R1:"0548d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc99336ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE - -ECP read binary #6 (non-zero, OK) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_read_binary:MBEDTLS_ECP_DP_SECP192R1:"0448d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc99336ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":0 - -ECP tls read point #1 (zero, invalid length byte) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_tls_read_point:MBEDTLS_ECP_DP_SECP192R1:"0200":"01":"01":"00":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP tls read point #2 (zero, OK) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_tls_read_point:MBEDTLS_ECP_DP_SECP192R1:"0100":"01":"01":"00":0 - -ECP tls read point #3 (non-zero, invalid length byte) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_tls_read_point:MBEDTLS_ECP_DP_SECP192R1:"300448d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc99336ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP tls read point #4 (non-zero, OK) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_tls_read_point:MBEDTLS_ECP_DP_SECP192R1:"310448d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc99336ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"48d8082a3a1e3112bc03a8ef2f6d40d0a77a6f8e00cc9933":"6ceed4d7cba482e288669ee1b6415626d6f34d28501e060c":"01":0 - -ECP tls write-read point #1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_tls_write_read_point:MBEDTLS_ECP_DP_SECP192R1 - -ECP tls write-read point #2 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_tls_write_read_point:MBEDTLS_ECP_DP_SECP521R1 - -ECP tls read group #1 (record too short) -mbedtls_ecp_tls_read_group:"0313":MBEDTLS_ERR_ECP_BAD_INPUT_DATA:0 - -ECP tls read group #2 (bad curve_type) -mbedtls_ecp_tls_read_group:"010013":MBEDTLS_ERR_ECP_BAD_INPUT_DATA:0 - -ECP tls read group #3 (unknown curve) -mbedtls_ecp_tls_read_group:"030010":MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE:0 - -ECP tls read group #4 (OK, buffer just fits) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_tls_read_group:"030017":0:256 - -ECP tls read group #5 (OK, buffer continues) -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -mbedtls_ecp_tls_read_group:"0300180000":0:384 - -ECP tls write-read group #1 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_tls_write_read_group:MBEDTLS_ECP_DP_SECP192R1 - -ECP tls write-read group #2 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_tls_write_read_group:MBEDTLS_ECP_DP_SECP521R1 - -ECP check privkey #1 (short weierstrass, too small) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_SECP192R1:"00":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #2 (short weierstrass, smallest) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_SECP192R1:"01":0 - -ECP check privkey #3 (short weierstrass, biggest) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_SECP192R1:"FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22830":0 - -ECP check privkey #4 (short weierstrass, too big) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_SECP192R1:"FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #5 (montgomery, too big) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"C000000000000000000000000000000000000000000000000000000000000000":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #6 (montgomery, not big enough) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #7 (montgomery, msb OK) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"4000000000000000000000000000000000000000000000000000000000000000":0 - -ECP check privkey #8 (montgomery, bit 0 set) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"4000000000000000000000000000000000000000000000000000000000000001":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #9 (montgomery, bit 1 set) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"4000000000000000000000000000000000000000000000000000000000000002":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #10 (montgomery, bit 2 set) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"4000000000000000000000000000000000000000000000000000000000000004":MBEDTLS_ERR_ECP_INVALID_KEY - -ECP check privkey #11 (montgomery, OK) -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_check_privkey:MBEDTLS_ECP_DP_CURVE25519:"7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8":0 - -ECP check public-private #1 (OK) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_SECP256R1:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ECP_DP_SECP256R1:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":0 - -ECP check public-private #2 (group none) -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_NONE:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ECP_DP_NONE:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP check public-private #3 (group mismatch) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_SECP384R1:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ECP_DP_SECP256R1:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP check public-private #4 (Qx mismatch) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_SECP256R1:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596293":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ECP_DP_SECP256R1:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP check public-private #5 (Qy mismatch) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_SECP256R1:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edfe":MBEDTLS_ECP_DP_SECP256R1:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP check public-private #6 (wrong Qx) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_SECP256R1:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596293":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ECP_DP_SECP256R1:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596293":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edff":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP check public-private #7 (wrong Qy) -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_ecp_check_pub_priv:MBEDTLS_ECP_DP_SECP256R1:"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edfe":MBEDTLS_ECP_DP_SECP256R1:"00f12a1320760270a83cbffd53f6031ef76a5d86c8a204f2c30ca9ebf51f0f0ea7":"37cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f76822596292":"4ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edfe":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -ECP gen keypair -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_gen_keypair:MBEDTLS_ECP_DP_SECP192R1 - -ECP gen keypair -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -mbedtls_ecp_gen_keypair:MBEDTLS_ECP_DP_CURVE25519 - -ECP gen keypair wrapper -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -mbedtls_ecp_gen_key:MBEDTLS_ECP_DP_SECP192R1 - -ECP mod p192 small (more than 192 bits, less limbs than 2 * 192 bits) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP192R1:"0100000000000103010000000000010201000000000001010100000000000100" - -ECP mod p192 readable -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP192R1:"010000000000010501000000000001040100000000000103010000000000010201000000000001010100000000000100" - -ECP mod p192 readable with carry -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP192R1:"FF00000000010500FF00000000010400FF00000000010300FF00000000010200FF00000000010100FF00000000010000" - -ECP mod p192 random -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP192R1:"36CF96B45D706A0954D89E52CE5F38517A2270E0175849B6F3740151D238CCABEF921437E475881D83BB69E4AA258EBD" - -ECP mod p192 (from a past failure case) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP192R1:"1AC2D6F96A2A425E9DD1776DD8368D4BBC86BF4964E79FEA713583BF948BBEFF0939F96FB19EC48C585BDA6A2D35C750" - -ECP mod p224 readable without carry -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP224R1:"0000000D0000000C0000000B0000000A0000000900000008000000070000FF060000FF050000FF040000FF03000FF0020000FF010000FF00" - -ECP mod p224 readable with negative carry -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP224R1:"0000000D0000000C0000000B0000000A00000009000000080000000700000006000000050000000400000003000000020000000100000000" - -ECP mod p224 readable with positive carry -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP224R1:"0000000D0000000C0000000BFFFFFF0AFFFFFF09FFFFFF08FFFFFF070000FF060000FF050000FF040000FF03000FF0020000FF010000FF00" - -ECP mod p224 readable with final negative carry -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP224R1:"FF00000D0000000C0000000B0000000A00000009000000080000000700000006000000050000000400000003000000020000000100000000" - -ECP mod p521 very small -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP521R1:"01" - -ECP mod p521 small (522 bits) -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP521R1:"030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - -ECP mod p521 readable -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP521R1:"03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - -ECP mod p521 readable with carry -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_fast_mod:MBEDTLS_ECP_DP_SECP521R1:"03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" - -ECP test vectors secp192r1 rfc 5114 -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP192R1:"323FA3169D8E9C6593F59476BC142000AB5BE0E249C43426":"CD46489ECFD6C105E7B3D32566E2B122E249ABAADD870612":"68887B4877DF51DD4DC3D6FD11F0A26F8FD3844317916E9A":"631F95BB4A67632C9C476EEE9AB695AB240A0499307FCF62":"519A121680E0045466BA21DF2EEE47F5973B500577EF13D5":"FF613AB4D64CEE3A20875BDB10F953F6B30CA072C60AA57F":"AD420182633F8526BFE954ACDA376F05E5FF4F837F54FEBE":"4371545ED772A59741D0EDA32C671112B7FDDD51461FCF32" - -ECP test vectors secp224r1 rfc 5114 -depends_on:MBEDTLS_ECP_DP_SECP224R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP224R1:"B558EB6C288DA707BBB4F8FBAE2AB9E9CB62E3BC5C7573E22E26D37F":"49DFEF309F81488C304CFF5AB3EE5A2154367DC7833150E0A51F3EEB":"4F2B5EE45762C4F654C1A0C67F54CF88B016B51BCE3D7C228D57ADB4":"AC3B1ADD3D9770E6F6A708EE9F3B8E0AB3B480E9F27F85C88B5E6D18":"6B3AC96A8D0CDE6A5599BE8032EDF10C162D0A8AD219506DCD42A207":"D491BE99C213A7D1CA3706DEBFE305F361AFCBB33E2609C8B1618AD5":"52272F50F46F4EDC9151569092F46DF2D96ECC3B6DC1714A4EA949FA":"5F30C6AA36DDC403C0ACB712BB88F1763C3046F6D919BD9C524322BF" - -ECP test vectors secp256r1 rfc 5114 -depends_on:MBEDTLS_ECP_DP_SECP256R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP256R1:"814264145F2F56F2E96A8E337A1284993FAF432A5ABCE59E867B7291D507A3AF":"2AF502F3BE8952F2C9B5A8D4160D09E97165BE50BC42AE4A5E8D3B4BA83AEB15":"EB0FAF4CA986C4D38681A0F9872D79D56795BD4BFF6E6DE3C0F5015ECE5EFD85":"2CE1788EC197E096DB95A200CC0AB26A19CE6BCCAD562B8EEE1B593761CF7F41":"B120DE4AA36492795346E8DE6C2C8646AE06AAEA279FA775B3AB0715F6CE51B0":"9F1B7EECE20D7B5ED8EC685FA3F071D83727027092A8411385C34DDE5708B2B6":"DD0F5396219D1EA393310412D19A08F1F5811E9DC8EC8EEA7F80D21C820C2788":"0357DCCD4C804D0D8D33AA42B848834AA5605F9AB0D37239A115BBB647936F50" - -ECP test vectors secp384r1 rfc 5114 -depends_on:MBEDTLS_ECP_DP_SECP384R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP384R1:"D27335EA71664AF244DD14E9FD1260715DFD8A7965571C48D709EE7A7962A156D706A90CBCB5DF2986F05FEADB9376F1":"793148F1787634D5DA4C6D9074417D05E057AB62F82054D10EE6B0403D6279547E6A8EA9D1FD77427D016FE27A8B8C66":"C6C41294331D23E6F480F4FB4CD40504C947392E94F4C3F06B8F398BB29E42368F7A685923DE3B67BACED214A1A1D128":"52D1791FDB4B70F89C0F00D456C2F7023B6125262C36A7DF1F80231121CCE3D39BE52E00C194A4132C4A6C768BCD94D2":"5CD42AB9C41B5347F74B8D4EFB708B3D5B36DB65915359B44ABC17647B6B9999789D72A84865AE2F223F12B5A1ABC120":"E171458FEAA939AAA3A8BFAC46B404BD8F6D5B348C0FA4D80CECA16356CA933240BDE8723415A8ECE035B0EDF36755DE":"5EA1FC4AF7256D2055981B110575E0A8CAE53160137D904C59D926EB1B8456E427AA8A4540884C37DE159A58028ABC0E":"0CC59E4B046414A81C8A3BDFDCA92526C48769DD8D3127CAA99B3632D1913942DE362EAFAA962379374D9F3F066841CA" - -ECP test vectors secp521r1 rfc 5114 -depends_on:MBEDTLS_ECP_DP_SECP521R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP521R1:"0113F82DA825735E3D97276683B2B74277BAD27335EA71664AF2430CC4F33459B9669EE78B3FFB9B8683015D344DCBFEF6FB9AF4C6C470BE254516CD3C1A1FB47362":"01EBB34DD75721ABF8ADC9DBED17889CBB9765D90A7C60F2CEF007BB0F2B26E14881FD4442E689D61CB2DD046EE30E3FFD20F9A45BBDF6413D583A2DBF59924FD35C":"00F6B632D194C0388E22D8437E558C552AE195ADFD153F92D74908351B2F8C4EDA94EDB0916D1B53C020B5EECAED1A5FC38A233E4830587BB2EE3489B3B42A5A86A4":"00CEE3480D8645A17D249F2776D28BAE616952D1791FDB4B70F7C3378732AA1B22928448BCD1DC2496D435B01048066EBE4F72903C361B1A9DC1193DC2C9D0891B96":"010EBFAFC6E85E08D24BFFFCC1A4511DB0E634BEEB1B6DEC8C5939AE44766201AF6200430BA97C8AC6A0E9F08B33CE7E9FEEB5BA4EE5E0D81510C24295B8A08D0235":"00A4A6EC300DF9E257B0372B5E7ABFEF093436719A77887EBB0B18CF8099B9F4212B6E30A1419C18E029D36863CC9D448F4DBA4D2A0E60711BE572915FBD4FEF2695":"00CDEA89621CFA46B132F9E4CFE2261CDE2D4368EB5656634C7CC98C7A00CDE54ED1866A0DD3E6126C9D2F845DAFF82CEB1DA08F5D87521BB0EBECA77911169C20CC":"00F9A71641029B7FC1A808AD07CD4861E868614B865AFBECAB1F2BD4D8B55EBCB5E3A53143CEB2C511B1AE0AF5AC827F60F2FD872565AC5CA0A164038FE980A7E4BD" - -ECP test vectors brainpoolP256r1 rfc 7027 -depends_on:MBEDTLS_ECP_DP_BP256R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_BP256R1:"81DB1EE100150FF2EA338D708271BE38300CB54241D79950F77B063039804F1D":"44106E913F92BC02A1705D9953A8414DB95E1AAA49E81D9E85F929A8E3100BE5":"8AB4846F11CACCB73CE49CBDD120F5A900A69FD32C272223F789EF10EB089BDC":"55E40BC41E37E3E2AD25C3C6654511FFA8474A91A0032087593852D3E7D76BD3":"8D2D688C6CF93E1160AD04CC4429117DC2C41825E1E9FCA0ADDD34E6F1B39F7B":"990C57520812BE512641E47034832106BC7D3E8DD0E4C7F1136D7006547CEC6A":"89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B":"49C27868F4ECA2179BFD7D59B1E3BF34C1DBDE61AE12931648F43E59632504DE" - -ECP test vectors brainpoolP384r1 rfc 7027 -depends_on:MBEDTLS_ECP_DP_BP384R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_BP384R1:"1E20F5E048A5886F1F157C74E91BDE2B98C8B52D58E5003D57053FC4B0BD65D6F15EB5D1EE1610DF870795143627D042":"68B665DD91C195800650CDD363C625F4E742E8134667B767B1B476793588F885AB698C852D4A6E77A252D6380FCAF068":"55BC91A39C9EC01DEE36017B7D673A931236D2F1F5C83942D049E3FA20607493E0D038FF2FD30C2AB67D15C85F7FAA59":"032640BC6003C59260F7250C3DB58CE647F98E1260ACCE4ACDA3DD869F74E01F8BA5E0324309DB6A9831497ABAC96670":"4D44326F269A597A5B58BBA565DA5556ED7FD9A8A9EB76C25F46DB69D19DC8CE6AD18E404B15738B2086DF37E71D1EB4":"62D692136DE56CBE93BF5FA3188EF58BC8A3A0EC6C1E151A21038A42E9185329B5B275903D192F8D4E1F32FE9CC78C48":"0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42":"0DF213417EBE4D8E40A5F76F66C56470C489A3478D146DECF6DF0D94BAE9E598157290F8756066975F1DB34B2324B7BD" - -ECP test vectors brainpoolP512r1 rfc 7027 -depends_on:MBEDTLS_ECP_DP_BP512R1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_BP512R1:"16302FF0DBBB5A8D733DAB7141C1B45ACBC8715939677F6A56850A38BD87BD59B09E80279609FF333EB9D4C061231FB26F92EEB04982A5F1D1764CAD57665422":"0A420517E406AAC0ACDCE90FCD71487718D3B953EFD7FBEC5F7F27E28C6149999397E91E029E06457DB2D3E640668B392C2A7E737A7F0BF04436D11640FD09FD":"72E6882E8DB28AAD36237CD25D580DB23783961C8DC52DFA2EC138AD472A0FCEF3887CF62B623B2A87DE5C588301EA3E5FC269B373B60724F5E82A6AD147FDE7":"230E18E1BCC88A362FA54E4EA3902009292F7F8033624FD471B5D8ACE49D12CFABBC19963DAB8E2F1EBA00BFFB29E4D72D13F2224562F405CB80503666B25429":"9D45F66DE5D67E2E6DB6E93A59CE0BB48106097FF78A081DE781CDB31FCE8CCBAAEA8DD4320C4119F1E9CD437A2EAB3731FA9668AB268D871DEDA55A5473199F":"2FDC313095BCDD5FB3A91636F07A959C8E86B5636A1E930E8396049CB481961D365CC11453A06C719835475B12CB52FC3C383BCE35E27EF194512B71876285FA":"A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F":"7DB71C3DEF63212841C463E881BDCF055523BD368240E6C3143BD8DEF8B3B3223B95E0F53082FF5E412F4222537A43DF1C6D25729DDB51620A832BE6A26680A2" - -ECP test vectors Curve25519 -depends_on:MBEDTLS_ECP_DP_CURVE25519_ENABLED -ecp_test_vec_x:MBEDTLS_ECP_DP_CURVE25519:"5AC99F33632E5A768DE7E81BF854C27C46E3FBF2ABBACD29EC4AFF517369C660":"057E23EA9F1CBE8A27168F6E696A791DE61DD3AF7ACD4EEACC6E7BA514FDA863":"47DC3D214174820E1154B49BC6CDB2ABD45EE95817055D255AA35831B70D3260":"6EB89DA91989AE37C7EAC7618D9E5C4951DBA1D73C285AE1CD26A855020EEF04":"61450CD98E36016B58776A897A9F0AEF738B99F09468B8D6B8511184D53494AB" - -ECP test vectors secp192k1 -depends_on:MBEDTLS_ECP_DP_SECP192K1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP192K1:"D1E13A359F6E0F0698791938E6D60246030AE4B0D8D4E9DE":"281BCA982F187ED30AD5E088461EBE0A5FADBB682546DF79":"3F68A8E9441FB93A4DD48CB70B504FCC9AA01902EF5BE0F3":"BE97C5D2A1A94D081E3FACE53E65A27108B7467BDF58DE43":"5EB35E922CD693F7947124F5920022C4891C04F6A8B8DCB2":"60ECF73D0FC43E0C42E8E155FFE39F9F0B531F87B34B6C3C":"372F5C5D0E18313C82AEF940EC3AFEE26087A46F1EBAE923":"D5A9F9182EC09CEAEA5F57EA10225EC77FA44174511985FD" - -ECP test vectors secp224k1 -depends_on:MBEDTLS_ECP_DP_SECP224K1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP224K1:"8EAD9B2819A3C2746B3EDC1E0D30F23271CDAC048C0615C961B1A9D3":"DEE0A75EF26CF8F501DB80807A3A0908E5CF01852709C1D35B31428B":"276D2B817918F7CD1DA5CCA081EC4B62CD255E0ACDC9F85FA8C52CAC":"AB7E70AEDA68A174ECC1F3800561B2D4FABE97C5D2A1A94D081E3FAC":"D2E94B00FD30201C40EDF73B137427916687AEA1935B277A5960DD1C":"DE728A614B17D91EB3CB2C17DA195562B6281585986332B3E12DA0ED":"B66B673D29038A3487A2D9C10CDCE67646F7C39C984EBE9E8795AD3C":"928C6147AF5EE4B54FA6ECF77B70CA3FEE5F4182DB057878F129DF": - -ECP test vectors secp256k1 -depends_on:MBEDTLS_ECP_DP_SECP256K1_ENABLED -ecp_test_vect:MBEDTLS_ECP_DP_SECP256K1:"923C6D4756CD940CD1E13A359F6E0F0698791938E6D60246030AE4B0D8D4E9DE":"20A865B295E93C5B090F324B84D7AC7526AA1CFE86DD80E792CECCD16B657D55":"38AC87141A4854A8DFD87333E107B61692323721FE2EAD6E52206FE471A4771B":"4F5036A8ED5809AB7E70AEDA68A174ECC1F3800561B2D4FABE97C5D2A1A94D08":"029F5D2CC5A2C7E538FBA321439B4EC8DD79B7FEB9C0A8A5114EEA39856E22E8":"165171AFC3411A427F24FDDE1192A551C90983EB421BC982AB4CF4E21F18F04B":"E4B5B537D3ACEA7624F2E9C185BFFD80BC7035E515F33E0D4CFAE747FD20038E":"2BC685B7DCDBC694F5E036C4EAE9BFB489D7BF8940C4681F734B71D68501514C" - -ECP selftest -ecp_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.function deleted file mode 100644 index eee648693c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ecp.function +++ /dev/null @@ -1,512 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/ecp.h" - -#define ECP_PF_UNKNOWN -1 -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ECP_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_ecp_curve_info( int id, int tls_id, int size, char *name ) -{ - const mbedtls_ecp_curve_info *by_id, *by_tls, *by_name; - - by_id = mbedtls_ecp_curve_info_from_grp_id( id ); - by_tls = mbedtls_ecp_curve_info_from_tls_id( tls_id ); - by_name = mbedtls_ecp_curve_info_from_name( name ); - TEST_ASSERT( by_id != NULL ); - TEST_ASSERT( by_tls != NULL ); - TEST_ASSERT( by_name != NULL ); - - TEST_ASSERT( by_id == by_tls ); - TEST_ASSERT( by_id == by_name ); - - TEST_ASSERT( by_id->bit_size == size ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_check_pub_mx( int grp_id, char *key_hex, int ret ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point P; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &P ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, grp_id ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &P.X, 16, key_hex ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lset( &P.Z, 1 ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &P ) == ret ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &P ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_test_vect( int id, char *dA_str, char *xA_str, char *yA_str, - char *dB_str, char *xB_str, char *yB_str, char *xZ_str, - char *yZ_str ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point R; - mbedtls_mpi dA, xA, yA, dB, xB, yB, xZ, yZ; - rnd_pseudo_info rnd_info; - - mbedtls_ecp_group_init( &grp ); mbedtls_ecp_point_init( &R ); - mbedtls_mpi_init( &dA ); mbedtls_mpi_init( &xA ); mbedtls_mpi_init( &yA ); mbedtls_mpi_init( &dB ); - mbedtls_mpi_init( &xB ); mbedtls_mpi_init( &yB ); mbedtls_mpi_init( &xZ ); mbedtls_mpi_init( &yZ ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &grp.G ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &dA, 16, dA_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &xA, 16, xA_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &yA, 16, yA_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &dB, 16, dB_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &xB, 16, xB_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &yB, 16, yB_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &xZ, 16, xZ_str ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &yZ, 16, yZ_str ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dA, &grp.G, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xA ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.Y, &yA ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dB, &R, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xZ ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.Y, &yZ ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dB, &grp.G, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xB ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.Y, &yB ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dA, &R, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xZ ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.Y, &yZ ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); mbedtls_ecp_point_free( &R ); - mbedtls_mpi_free( &dA ); mbedtls_mpi_free( &xA ); mbedtls_mpi_free( &yA ); mbedtls_mpi_free( &dB ); - mbedtls_mpi_free( &xB ); mbedtls_mpi_free( &yB ); mbedtls_mpi_free( &xZ ); mbedtls_mpi_free( &yZ ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_test_vec_x( int id, char *dA_hex, char *xA_hex, - char *dB_hex, char *xB_hex, char *xS_hex ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point R; - mbedtls_mpi dA, xA, dB, xB, xS; - rnd_pseudo_info rnd_info; - - mbedtls_ecp_group_init( &grp ); mbedtls_ecp_point_init( &R ); - mbedtls_mpi_init( &dA ); mbedtls_mpi_init( &xA ); - mbedtls_mpi_init( &dB ); mbedtls_mpi_init( &xB ); - mbedtls_mpi_init( &xS ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &grp.G ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &dA, 16, dA_hex ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &dB, 16, dB_hex ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &xA, 16, xA_hex ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &xB, 16, xB_hex ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &xS, 16, xS_hex ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dA, &grp.G, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xA ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dB, &R, - &rnd_pseudo_rand, &rnd_info ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xS ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dB, &grp.G, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xB ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_mul( &grp, &R, &dA, &R, NULL, NULL ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &R ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R.X, &xS ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); mbedtls_ecp_point_free( &R ); - mbedtls_mpi_free( &dA ); mbedtls_mpi_free( &xA ); - mbedtls_mpi_free( &dB ); mbedtls_mpi_free( &xB ); - mbedtls_mpi_free( &xS ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_fast_mod( int id, char *N_str ) -{ - mbedtls_ecp_group grp; - mbedtls_mpi N, R; - - mbedtls_mpi_init( &N ); mbedtls_mpi_init( &R ); - mbedtls_ecp_group_init( &grp ); - - TEST_ASSERT( mbedtls_mpi_read_string( &N, 16, N_str ) == 0 ); - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - TEST_ASSERT( grp.modp != NULL ); - - /* - * Store correct result before we touch N - */ - TEST_ASSERT( mbedtls_mpi_mod_mpi( &R, &N, &grp.P ) == 0 ); - - TEST_ASSERT( grp.modp( &N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_bitlen( &N ) <= grp.pbits + 3 ); - - /* - * Use mod rather than addition/subtraction in case previous test fails - */ - TEST_ASSERT( mbedtls_mpi_mod_mpi( &N, &N, &grp.P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &N, &R ) == 0 ); - -exit: - mbedtls_mpi_free( &N ); mbedtls_mpi_free( &R ); - mbedtls_ecp_group_free( &grp ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_write_binary( int id, char *x, char *y, char *z, int format, - char *out, int blen, int ret ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point P; - unsigned char buf[256], str[512]; - size_t olen; - - memset( buf, 0, sizeof( buf ) ); - memset( str, 0, sizeof( str ) ); - - mbedtls_ecp_group_init( &grp ); mbedtls_ecp_point_init( &P ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &P.X, 16, x ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &P.Y, 16, y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &P.Z, 16, z ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_point_write_binary( &grp, &P, format, - &olen, buf, blen ) == ret ); - - if( ret == 0 ) - { - hexify( str, buf, olen ); - TEST_ASSERT( strcasecmp( (char *) str, out ) == 0 ); - } - -exit: - mbedtls_ecp_group_free( &grp ); mbedtls_ecp_point_free( &P ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_read_binary( int id, char *input, char *x, char *y, char *z, - int ret ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point P; - mbedtls_mpi X, Y, Z; - int ilen; - unsigned char buf[256]; - - memset( buf, 0, sizeof( buf ) ); - - mbedtls_ecp_group_init( &grp ); mbedtls_ecp_point_init( &P ); - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, 16, x ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, 16, y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Z, 16, z ) == 0 ); - - ilen = unhexify( buf, input ); - - TEST_ASSERT( mbedtls_ecp_point_read_binary( &grp, &P, buf, ilen ) == ret ); - - if( ret == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.X, &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.Y, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.Z, &Z ) == 0 ); - } - -exit: - mbedtls_ecp_group_free( &grp ); mbedtls_ecp_point_free( &P ); - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ecp_tls_read_point( int id, char *input, char *x, char *y, char *z, - int ret ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point P; - mbedtls_mpi X, Y, Z; - size_t ilen; - unsigned char buf[256]; - const unsigned char *vbuf = buf; - - memset( buf, 0, sizeof( buf ) ); - - mbedtls_ecp_group_init( &grp ); mbedtls_ecp_point_init( &P ); - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, 16, x ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, 16, y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Z, 16, z ) == 0 ); - - ilen = unhexify( buf, input ); - - TEST_ASSERT( mbedtls_ecp_tls_read_point( &grp, &P, &vbuf, ilen ) == ret ); - - if( ret == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.X, &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.Y, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &P.Z, &Z ) == 0 ); - TEST_ASSERT( *vbuf == 0x00 ); - } - -exit: - mbedtls_ecp_group_free( &grp ); mbedtls_ecp_point_free( &P ); - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_tls_write_read_point( int id ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point pt; - unsigned char buf[256]; - const unsigned char *vbuf; - size_t olen; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &pt ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - memset( buf, 0x00, sizeof( buf ) ); vbuf = buf; - TEST_ASSERT( mbedtls_ecp_tls_write_point( &grp, &grp.G, - MBEDTLS_ECP_PF_COMPRESSED, &olen, buf, 256 ) == 0 ); - TEST_ASSERT( mbedtls_ecp_tls_read_point( &grp, &pt, &vbuf, olen ) - == MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ); - TEST_ASSERT( vbuf == buf + olen ); - - memset( buf, 0x00, sizeof( buf ) ); vbuf = buf; - TEST_ASSERT( mbedtls_ecp_tls_write_point( &grp, &grp.G, - MBEDTLS_ECP_PF_UNCOMPRESSED, &olen, buf, 256 ) == 0 ); - TEST_ASSERT( mbedtls_ecp_tls_read_point( &grp, &pt, &vbuf, olen ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &grp.G.X, &pt.X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &grp.G.Y, &pt.Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &grp.G.Z, &pt.Z ) == 0 ); - TEST_ASSERT( vbuf == buf + olen ); - - memset( buf, 0x00, sizeof( buf ) ); vbuf = buf; - TEST_ASSERT( mbedtls_ecp_set_zero( &pt ) == 0 ); - TEST_ASSERT( mbedtls_ecp_tls_write_point( &grp, &pt, - MBEDTLS_ECP_PF_COMPRESSED, &olen, buf, 256 ) == 0 ); - TEST_ASSERT( mbedtls_ecp_tls_read_point( &grp, &pt, &vbuf, olen ) == 0 ); - TEST_ASSERT( mbedtls_ecp_is_zero( &pt ) ); - TEST_ASSERT( vbuf == buf + olen ); - - memset( buf, 0x00, sizeof( buf ) ); vbuf = buf; - TEST_ASSERT( mbedtls_ecp_set_zero( &pt ) == 0 ); - TEST_ASSERT( mbedtls_ecp_tls_write_point( &grp, &pt, - MBEDTLS_ECP_PF_UNCOMPRESSED, &olen, buf, 256 ) == 0 ); - TEST_ASSERT( mbedtls_ecp_tls_read_point( &grp, &pt, &vbuf, olen ) == 0 ); - TEST_ASSERT( mbedtls_ecp_is_zero( &pt ) ); - TEST_ASSERT( vbuf == buf + olen ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &pt ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ecp_tls_read_group( char *record, int result, int bits ) -{ - mbedtls_ecp_group grp; - unsigned char buf[10]; - const unsigned char *vbuf = buf; - int len, ret; - - mbedtls_ecp_group_init( &grp ); - memset( buf, 0x00, sizeof( buf ) ); - - len = unhexify( buf, record ); - - ret = mbedtls_ecp_tls_read_group( &grp, &vbuf, len ); - - TEST_ASSERT( ret == result ); - if( ret == 0) - { - TEST_ASSERT( mbedtls_mpi_bitlen( &grp.P ) == (size_t) bits ); - TEST_ASSERT( *vbuf == 0x00 ); - } - -exit: - mbedtls_ecp_group_free( &grp ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void ecp_tls_write_read_group( int id ) -{ - mbedtls_ecp_group grp1, grp2; - unsigned char buf[10]; - const unsigned char *vbuf = buf; - size_t len; - int ret; - - mbedtls_ecp_group_init( &grp1 ); - mbedtls_ecp_group_init( &grp2 ); - memset( buf, 0x00, sizeof( buf ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp1, id ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_tls_write_group( &grp1, &len, buf, 10 ) == 0 ); - ret = mbedtls_ecp_tls_read_group( &grp2, &vbuf, len ); - TEST_ASSERT( ret == 0 ); - - if( ret == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &grp1.N, &grp2.N ) == 0 ); - TEST_ASSERT( grp1.id == grp2.id ); - } - -exit: - mbedtls_ecp_group_free( &grp1 ); - mbedtls_ecp_group_free( &grp2 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ecp_check_privkey( int id, char *key_hex, int ret ) -{ - mbedtls_ecp_group grp; - mbedtls_mpi d; - - mbedtls_ecp_group_init( &grp ); - mbedtls_mpi_init( &d ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &d, 16, key_hex ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_privkey( &grp, &d ) == ret ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_mpi_free( &d ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ecp_check_pub_priv( int id_pub, char *Qx_pub, char *Qy_pub, - int id, char *d, char *Qx, char *Qy, int ret ) -{ - mbedtls_ecp_keypair pub, prv; - - mbedtls_ecp_keypair_init( &pub ); - mbedtls_ecp_keypair_init( &prv ); - - if( id_pub != MBEDTLS_ECP_DP_NONE ) - TEST_ASSERT( mbedtls_ecp_group_load( &pub.grp, id_pub ) == 0 ); - TEST_ASSERT( mbedtls_ecp_point_read_string( &pub.Q, 16, Qx_pub, Qy_pub ) == 0 ); - - if( id != MBEDTLS_ECP_DP_NONE ) - TEST_ASSERT( mbedtls_ecp_group_load( &prv.grp, id ) == 0 ); - TEST_ASSERT( mbedtls_ecp_point_read_string( &prv.Q, 16, Qx, Qy ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &prv.d, 16, d ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_pub_priv( &pub, &prv ) == ret ); - -exit: - mbedtls_ecp_keypair_free( &pub ); - mbedtls_ecp_keypair_free( &prv ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ecp_gen_keypair( int id ) -{ - mbedtls_ecp_group grp; - mbedtls_ecp_point Q; - mbedtls_mpi d; - rnd_pseudo_info rnd_info; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &Q ); - mbedtls_mpi_init( &d ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_gen_keypair( &grp, &d, &Q, &rnd_pseudo_rand, &rnd_info ) - == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &Q ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_privkey( &grp, &d ) == 0 ); - -exit: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &Q ); - mbedtls_mpi_free( &d ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_ecp_gen_key( int id ) -{ - mbedtls_ecp_keypair key; - rnd_pseudo_info rnd_info; - - mbedtls_ecp_keypair_init( &key ); - memset( &rnd_info, 0x00, sizeof( rnd_pseudo_info ) ); - - TEST_ASSERT( mbedtls_ecp_gen_key( id, &key, &rnd_pseudo_rand, &rnd_info ) == 0 ); - - TEST_ASSERT( mbedtls_ecp_check_pubkey( &key.grp, &key.Q ) == 0 ); - TEST_ASSERT( mbedtls_ecp_check_privkey( &key.grp, &key.d ) == 0 ); - -exit: - mbedtls_ecp_keypair_free( &key ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void ecp_selftest() -{ - TEST_ASSERT( mbedtls_ecp_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.data deleted file mode 100644 index 833eef565e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.data +++ /dev/null @@ -1,41 +0,0 @@ -Entropy write/update seed file -entropy_seed_file:"data_files/entropy_seed":0 - -Entropy write/update seed file -entropy_seed_file:"no_such_dir/file":MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR - -Entropy too many sources -entropy_too_many_sources: - -Entropy output length #1 -entropy_func_len:0:0 - -Entropy output length #2 -entropy_func_len:1:0 - -Entropy output length #3 -entropy_func_len:2:0 - -Entropy output length #4 -entropy_func_len:31:0 - -Entropy output length #5 -entropy_func_len:65:MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - -Entropy failing source -entropy_source_fail:"data_files/entropy_seed" - -Entropy threshold #1 -entropy_threshold:16:2:8 - -Entropy threshold #2 -entropy_threshold:32:1:32 - -Entropy thershold #3 -entropy_threshold:16:0:MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - -Entropy thershold #4 -entropy_threshold:1024:1:MBEDTLS_ERR_ENTROPY_SOURCE_FAILED - -Entropy self test -entropy_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.function deleted file mode 100644 index 3b739cce9e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_entropy.function +++ /dev/null @@ -1,180 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/entropy.h" - -/* - * Number of calls made to entropy_dummy_source() - */ -static size_t entropy_dummy_calls; - -/* - * Dummy entropy source - * - * If data is NULL, write exactly the requested length. - * Otherwise, write the length indicated by data or error if negative - */ -static int entropy_dummy_source( void *data, unsigned char *output, - size_t len, size_t *olen ) -{ - entropy_dummy_calls++; - - if( data == NULL ) - *olen = len; - else - { - int *d = (int *) data; - - if( *d < 0 ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - else - *olen = *d; - } - - memset( output, 0x2a, *olen ); - - return( 0 ); -} -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ENTROPY_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void entropy_seed_file( char *path, int ret ) -{ - mbedtls_entropy_context ctx; - - mbedtls_entropy_init( &ctx ); - - TEST_ASSERT( mbedtls_entropy_write_seed_file( &ctx, path ) == ret ); - TEST_ASSERT( mbedtls_entropy_update_seed_file( &ctx, path ) == ret ); - -exit: - mbedtls_entropy_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void entropy_too_many_sources( ) -{ - mbedtls_entropy_context ctx; - size_t i; - - mbedtls_entropy_init( &ctx ); - - /* - * It's hard to tell precisely when the error will occur, - * since we don't know how many sources were automatically added. - */ - for( i = 0; i < MBEDTLS_ENTROPY_MAX_SOURCES; i++ ) - (void) mbedtls_entropy_add_source( &ctx, entropy_dummy_source, NULL, - 16, MBEDTLS_ENTROPY_SOURCE_WEAK ); - - TEST_ASSERT( mbedtls_entropy_add_source( &ctx, entropy_dummy_source, NULL, - 16, MBEDTLS_ENTROPY_SOURCE_WEAK ) - == MBEDTLS_ERR_ENTROPY_MAX_SOURCES ); - -exit: - mbedtls_entropy_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void entropy_func_len( int len, int ret ) -{ - mbedtls_entropy_context ctx; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE + 10] = { 0 }; - unsigned char acc[MBEDTLS_ENTROPY_BLOCK_SIZE + 10] = { 0 }; - size_t i, j; - - mbedtls_entropy_init( &ctx ); - - /* - * See comments in mbedtls_entropy_self_test() - */ - for( i = 0; i < 8; i++ ) - { - TEST_ASSERT( mbedtls_entropy_func( &ctx, buf, len ) == ret ); - for( j = 0; j < sizeof( buf ); j++ ) - acc[j] |= buf[j]; - } - - if( ret == 0 ) - for( j = 0; j < (size_t) len; j++ ) - TEST_ASSERT( acc[j] != 0 ); - - for( j = len; j < sizeof( buf ); j++ ) - TEST_ASSERT( acc[j] == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void entropy_source_fail( char *path ) -{ - mbedtls_entropy_context ctx; - int fail = -1; - unsigned char buf[16]; - - mbedtls_entropy_init( &ctx ); - - TEST_ASSERT( mbedtls_entropy_add_source( &ctx, entropy_dummy_source, - &fail, 16, - MBEDTLS_ENTROPY_SOURCE_WEAK ) - == 0 ); - - TEST_ASSERT( mbedtls_entropy_func( &ctx, buf, sizeof( buf ) ) - == MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - TEST_ASSERT( mbedtls_entropy_gather( &ctx ) - == MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); -#if defined(MBEDTLS_FS_IO) - TEST_ASSERT( mbedtls_entropy_write_seed_file( &ctx, path ) - == MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - TEST_ASSERT( mbedtls_entropy_update_seed_file( &ctx, path ) - == MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); -#else - ((void) path); -#endif - -exit: - mbedtls_entropy_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void entropy_threshold( int threshold, int chunk_size, int result ) -{ - mbedtls_entropy_context ctx; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; - int ret; - - mbedtls_entropy_init( &ctx ); - - TEST_ASSERT( mbedtls_entropy_add_source( &ctx, entropy_dummy_source, - &chunk_size, threshold, - MBEDTLS_ENTROPY_SOURCE_WEAK ) == 0 ); - - entropy_dummy_calls = 0; - ret = mbedtls_entropy_func( &ctx, buf, sizeof( buf ) ); - - if( result >= 0 ) - { - TEST_ASSERT( ret == 0 ); - TEST_ASSERT( entropy_dummy_calls == (size_t) result ); - } - else - { - TEST_ASSERT( ret == result ); - } - -exit: - mbedtls_entropy_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void entropy_selftest( ) -{ - TEST_ASSERT( mbedtls_entropy_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.data deleted file mode 100644 index dec5639ee0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.data +++ /dev/null @@ -1,21 +0,0 @@ -Single low error -depends_on:MBEDTLS_AES_C -error_strerror:-0x0020:"AES - Invalid key length" - -Single high error -depends_on:MBEDTLS_RSA_C -error_strerror:-0x4080:"RSA - Bad input parameters to function" - -Low and high error -depends_on:MBEDTLS_AES_C:MBEDTLS_RSA_C -error_strerror:-0x40A0:"RSA - Bad input parameters to function \: AES - Invalid key length" - -Non existing high error -error_strerror:-0x8880:"UNKNOWN ERROR CODE (8880)" - -Non existing low error -error_strerror:-0x007F:"UNKNOWN ERROR CODE (007F)" - -Non existing low and high error -error_strerror:-0x88FF:"UNKNOWN ERROR CODE (8880) \: UNKNOWN ERROR CODE (007F)" - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.function deleted file mode 100644 index c99b1fd15c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_error.function +++ /dev/null @@ -1,21 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/error.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_ERROR_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void error_strerror( int code, char *result_str ) -{ - char buf[500]; - - memset( buf, 0, sizeof( buf ) ); - - mbedtls_strerror( code, buf, 500 ); - - TEST_ASSERT( strcmp( buf, result_str ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_de.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_de.data deleted file mode 100644 index 6eaa711b9d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_de.data +++ /dev/null @@ -1,675 +0,0 @@ -AES-GCM NIST Validation (AES-128,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d785dafea3e966731ef6fc6202262584":"":"d91a46205ee94058b3b8403997592dd2":"":128:"3b92a17c1b9c3578a68cffea5a5b6245":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"aec963833b9098de1ababc853ab74d96":"":"4e0ffd93beffd732c6f7d6ad606a2d24":"":128:"e9fcedc176dfe587dc61b2011010cdf1":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c4fb9e3393681da9cec5ec96f87c5c31":"":"845e910bc055d895879f62101d08b4c7":"":128:"99fb783c497416e4b6e2a5de7c782057":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2a930f2e09beceacd9919cb76f2ac8d3":"":"340d9af44f6370eff534c653033a785a":"":120:"0c1e5e9c8fe5edfd11f114f3503d63":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fe71177e02073b1c407b5724e2263a5e":"":"83c23d20d2a9d4b8f92da96587c96b18":"":120:"43b2ca795420f35f6cb39f5dfa47a2":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b02392fd7f228888c281e59d1eaa15fb":"":"2726344ba8912c737e195424e1e6679e":"":120:"a10b601ca8053536a2af2cc255d2b6":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"21895cbafc16b7b8bf5867e88e0853d4":"":"f987ce1005d9bbd31d2452fb80957753":"":112:"952a7e265830d58a6778d68b9450":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9bb9742bf47f68caf64963d7c10a97b0":"":"34a85669de64e1cd44731905fddbcbc5":"":112:"e9b6be928aa77b2de28b480ae74c":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4e9708e4b37e2e1b5feaf4f5ab54e2a6":"":"1c53a9fdd23919b036d99560619a9939":"":112:"6611b50d6fbca83047f9f5fe1768":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"82fede79db25f00be96eb050a22cea87":"":"e9c50b517ab26c89b83c1f0cac50162c":"":104:"d0c0ce9db60b77b0e31d05e048":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1d98566fca5201abb12914311a8bd532":"":"590aef4b46a9023405d075edab7e6849":"":104:"a1cfd1a27b341f49eda2ca8305":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3038771820c2e1319f02a74b8a7a0c08":"":"e556d9f07fb69d7e9a644261c80fac92":"":104:"4d2f005d662b6a8787f231c5e1":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0fb7eef50de598d7d8b508d019a30d5a":"":"a2a2617040116c2c7e4236d2d8278213":"":96:"68413c58df7bb5f067197ca0":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8cc58b609204215c8ab4908286e56e5c":"":"fb83ea637279332677b5f68081173e99":"":96:"a2a9160d82739a55d8cd419f":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"81a5fd184742a478432963f6477e8f92":"":"da297cbb53b11d7c379e0566299b4d5a":"":96:"200bee49466fdda2f21f0062":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f604ac66d626959e595cbb7b4128e096":"":"269d2a49d533c6bb38008711f38e0b39":"":64:"468200fa4683e8be":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2e308ba7903e925f768c1d00ff3eb623":"":"335acd2aa48a47a37cfe21e491f1b141":"":64:"4872bfd5e2ff55f6":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1304e2a5a3520454a5109df61a67da7a":"":"dbe8b452acf4fa1444c3668e9ee72d26":"":64:"83a0d3440200ca95":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ecf1ec2c9a8f2e9cc799f9b9fddb3232":"":"ddf0b695aef5df2b594fcaae72b7e41c":"":32:"2819aedf":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9ab5c8ca905b5fe50461f4a68941144b":"":"96dd3927a96e16123f2e9d6b367d303f":"":32:"6e0c53ef":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b5fc7af605721a9cfe61c1ee6a4b3e22":"":"6b757d4055823d1035d01077666037d6":"":32:"e8c09ddd":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"03c0b4a6e508a8490db0d086a82c9db7":"":"ac52f6c1a05030321fa39f87e89fdb5e":"33316ca79d10a79f4fd038593e8eef09625089dc4e0ffe4bc1f2871554fa6666ab3e7fe7885edef694b410456f3ec0e513bb25f1b48d95e4820c5972c1aabb25c84c08566002dadc36df334c1ce86847964a122016d389ac873bca8c335a7a99bcef91e1b985ae5d488a2d7f78b4bf14e0c2dc715e814f4e24276057cf668172":128:"756292d8b4653887edef51679b161812":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b228d3d15219ea9ad5651fce02c8374d":"":"5c7eafaead029c3fe3cf3835fe758d0e":"8c35dd805c08686b9b4d460f81b4dcb8c46c6d57842dc3e72ba90952e2bebf17fe7184445b02f801800a944486d662a127d01d3b7f42679052cdc73ce533129af8d13957415c5495142157d6ce8a68aa977e56f562fed98e468e42522767656ce50369471060381bb752dd5e77c79677a4cadffa39e518e30a789e793b07ea21":128:"a4dde1ab93c84937c3bbc3ad5237818d":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"776afcbabedd5577fe660a60f920b536":"":"5bbb7f1b14084e520408dd87b97705e9":"44631fc9d4a07416b0dfb4e2b42071e3e2be45502c9ddf72b3e61810eeda31a7d685ebb2ee43a2c06af374569f439ee1668c550067de2dece9ec46ee72b260858d6033f814e85275c5ae669b60803a8c516de32804fa34d3a213ccfaf6689046e25eeb30b9e1608e689f4d31cc664b83a468a51165f5625f12f098a6bf7ddab2":128:"a5347d41d93b587240651bcd5230264f":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"20abeafa25fc4ea7d0592cb3e9b4d5fe":"":"3aba79a58c5aa664856b41d552c7a8d3":"98cfecaae9eb9a7c3b17e6bc5f80d8a4bf7a9f4fa5e01b74cae15ee6af14633205aafe3b28fb7b7918e12322ea27352056a603746d728a61361134a561619400ff2bf679045bac2e0fbc2c1d41f8faba4b27c7827bceda4e9bf505df4185515dd3a5e26f7639c8ad5a38bc5906a44be062f02cc53862678ae36fa3de3c02c982":120:"2a67ad1471a520fe09a304f0975f31":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2bc73fba942ff105823b5dccf6befb1c":"":"902c3e3b69b1ef8395d7281ff74cce38":"4adec0b4ac00325a860044d9f9519daa4f7c163229a75819b0fd7d8e23319f030e61dfa8eadabff42ea27bc36bdb6cad249e801ca631b656836448b7172c11126bad2781e6a1aa4f62c4eda53409408b008c057e0b81215cc13ddabbb8f1915f4bbab854f8b00763a530ad5055d265778cd3080d0bd35b76a329bdd5b5a2d268":120:"ebdd7c8e87fe733138a433543542d1":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"356a4c245868243d61756cabe86da887":"":"b442f2ec6d45a17144c258fd59fe5b3b":"12cccc3c60474b0a1579c5006c2134850724fa6c9da3a7022d4f65fd238b052bdf34ea34aa7dbadad64996065acee588ab6bd29726d07ed24ffae2d33aadf3e66ebb87f57e689fd85128be1c9e3d8362fad1f8096ee391f75b576fb213d394cef6f091fc5488d9aa152be69475b9167abd6dd4fd93bbbc7b8ca316c952eb19c6":120:"ed26080dcb670590613d97d7c47cf4":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"dfa7e93aff73600fc552324253066e2c":"":"c20001e93f1cd05253c277a9445d61e4":"a64d1e20058a1f7e698622a02f7ff8dc11886717ede17bbdc3c4645a66a71d8b04346fb389a251ffb0a7f445a25faf642bb7e4697d2cacf925e78c4be98457996afb25b0516b50f179441d1923312364947f8f1e0f5715b43bd537727bf943d7b4679b0b0b28b94e56e7bbf554d9cf79fcee4387f32bb6f91efdd23620035be6":112:"6ba5e4dace9a54b50b901d9b73ad":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2ecea80b48d2ecd194a7699aa7d8ccfc":"":"8b4db08bafc23b65ae50a2d20661d270":"efc2ca1a3b41b90f8ddf74291d68f072a6e025d0c91c3ce2b133525943c73ebadc71f150be20afeb097442fa51be31a641df65d90ebd81dcbaf32711ed31f5e0271421377ffe14ddafea3ca60a600588d484856a98de73f56a766ae60bae384a4ae01a1a06821cf0c7a6b4ee4c8f413748457b3777283d3310218fb55c107293":112:"246a9d37553088b6411ebb62aa16":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d38fee3fd3d6d08224c3c83529a25d08":"":"a942ccb11cf9468186fabfc18c899801":"1c92a4ce0a1dae27e720d6f9b1e460276538de437f3812ab1177cf0273b05908f296f33ba0f4c790abe2ce958b1d92b930a0d81243e6ad09ef86ee8e3270243095096537cb1054fcfcf537d828b65af9b6cf7c50f5b8470f7908f314d0859107eed772ee1732c78e8a2e35b2493f3e8c1e601b08aeab8d9729e0294dca168c62":112:"803a08700ec86fdeb88f7a388921":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1899b0cbae41d705c6eed3226afb5bc0":"":"82d0910aa53e300a487d880d018d0dea":"6bf5583cc1007d74f3529db63b8d4e085400ccf3725eab8e19cb145f3910c61465a21486740a26f74691866a9f632af9fae81f5f0bffedf0c28a6ce0fd520bb4db04a3cd1a7d29d8801e05e4b9c9374fd89bcb539489c2f7f1f801c253a1cc737408669bcd133b62da357f7399a52179125aa59fae6707d340846886d730a835":104:"c5d58870fee9ce157f5ec1fa8f":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8b95323d86d02754f4c2874b42ec6eb0":"":"4f76084acbdef9999c71dcc794238d7c":"ebc75788377c0b264818a6f97c19cf92c29f1c7cdeb6b5f0a92d238fa4614bc35d0cfe4ec9d045cd628ff6262c460679ac15b0c6366d9289bbd217e5012279e0af0fb2cfcbdf51fe16935968cbb727f725fe5bcd4428905849746c8493600ce8b2cfc1b61b04c8b752b915fed611d6b54ef73ec4e3950d6db1807b1ce7ed1dcc":104:"c4724ff1d2c57295eb733e9cad":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"30da555559eb11cf7e0eff9d99e9607d":"":"7799275bf12335f281ec94a870f90a0b":"e735d556e15aec78d9736016c8c99db753ed14d4e4adaaa1dd7eaad702ea5dc337433f8c2b45afdf2f385fdf6c55574425571e079ca759b6235f877ed11618ff212bafd865a22b80b76b3b5cf1acfd24d92fd41607bbb7382f26cd703757088d497b16b32de80e1256c734a9b83356b6fced207177de75458481eaef59a431d7":104:"3c82272130e17c4a0a007a908e":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ed2ac74af896c5190c271cfa6af02fd2":"":"e0226e2d8da47badad1fb78b9a797f27":"8f11353ae476ff923013e6e736ffc9d23101a1c471ccc07ad372a8430d6559c376075efce2e318cdf4c9443dbf132e7e6da5524045028c97e904633b44c4d189a4b64237ac7692dd03c0e751ce9f04d0fdbd8a96074cd7dfa2fd441a52328b4ac3974b4902db45663f7b6f24947dba618f8b9769e927faf84c9f49ad8239b9fb":96:"db8af7a0d548fc54d9457c73":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0225b73fe5fbbe52f838d873173959d8":"":"02a048764f48d9aed1147ee922395bbf":"9b46a57b06e156c877e94c089814493ead879397dab3dfcab2db349ef387efcd0cc339a7e79131a2c580188fc7429044a465b8329d74cd8f47272a4ed32582b1c5c7e3d32341ae902ea4923dc33df8062bc24bb51a11d2ecc82f464f615041387f9c82bd2135d4e240fe56fa8a68e6a9a417e6702430a434b14d70cf02db3181":96:"e2c2ce4022c49a95c9ac9026":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"89ca3771a0ef3287568b4ac036120198":"":"7e83d2ffa8af8c554cfd71a0db56ef5b":"1bd7a9d6262882bd12c62bd50942965b3cdcadf5e0fab2dc4d0daf0ee4b16e92c6e2464c0caa423cdce88e4d843490609716ec5e44c41672c656ac0e444d3622557ea8420c94deae3ad190ddaf859f6f8c23e4e2e32a46d28df23de4f99bd6c34f69e06eddfdfa5f263dbe8baf9d4296b2c543e4c4847271e7590374edf46234":96:"06b2bf62591dc7ec1b814705":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a41a297bd96e224942998fe2192934a1":"":"6827f2c5a0b7ecd6bbc696abb0adf556":"f32041abd8543415cbac423d945dda5378a16a7e94d9ab5dbd2d32eb1c5048cc7c8e4df3ca84ec725f18c34cfdeaa7595392aabfd66d9e2f37c1165369cd806cd9d2110def6f5fad4345e5a6e2326c9300199438fcc078cd9fcf4d76872cac77fc9a0a8ac7e4d63995078a9addecf798460ff5910861b76c71bccfb6b629d722":64:"49a4917eef61f78e":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a9372c058f42e0a1d019bdb528313919":"":"8d03f423230c8f00a5b6b712d426a2af":"cfef4e70fcc1821eeccf7c7b5eb3c0c3b5f72dc762426e0bd26242f8aa68c5b716ab97eded5e5720caccc1965da603d556d8214d5828f2cf276d95bf552d47313876796221f62ccb818a6d801088755d58cfb751bfed0d5a19718d4e0f94b850e0279b3a69295d1837cba958a6cc56e7594080b9e5b954a199fdc9e54ddc8583":64:"b82cd11cd3575c8d":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6302b7338f8fa84195ad9abbacd89b4e":"":"e1bed5c53547cbc85f3411fbb43bb08b":"bcd329c076e8da2797d50dcdcf271cecf3ce12f3c136ed746edc722f907be6133276ee099038fdc5d73eec812739c7489d4bcc275f95451b44890416e3ffe5a1b6fa3986b84eee3adad774c6feaecb1f785053eeda2cfc18953b8547866d98918dbe0a6abc168ac7d77467a367f11c284924d9d186ef64ef0fd54eacd75156d2":64:"5222d092e9e8bd6c":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"78b5c28d62e4b2097873a1180bd5a3a5":"":"c93902c2819ee494f0fc4b259ee65dd8":"e6b1192674a02083a6cf36d4ba93ba40a5331fadf63fd1eb2efa2ee9c0d8818472aaaf2b4705746011753f30f447c8f58dd34d29606daf57eadc172529837058cb78a378b19da8d63c321f550dfa256b5fd9f30e93d8f377443bfcd125f86a079a1765d2010be73d060f24eebae8d05e644688b2149bc39e18bd527bc066f2ba":32:"eae48137":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3d84130578070e036c9e3df5b5509473":"":"3b9b4950523a19c6866fd2b0cde541fd":"a764931e1b21a140c54a8619aacdb4358834987fb6e263cec525f888f9e9764c165aaa7db74f2c42273f912daeae6d72b232a872ac2c652d7cd3af3a5753f58331c11b6c866475697876dbc4c6ca0e52a00ba015ee3c3b7fb444c6e50a4b4b9bbe135fc0632d32a3f79f333d8f487771ed12522e664b9cf90e66da267f47a74d":32:"79987692":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"08428605ab4742a3e8a55354d4764620":"":"128f5f4a817e4af04113847a223adeb0":"464b484ed79d93a48e0f804e04df69d7ca10ad04ba7188d69e6549ab50503baaec67e0acba5537d1163c868fd3e350e9d0ae9123046bc76815c201a947aa4a7e4ed239ce889d4ff9c8d043877de06df5fc27cf67442b729b02e9c30287c0821ef9fa15d4cccbc53a95fa9ec3ed432ca960ebbf5a169ccada95a5bf4c7c968830":32:"3eb3e3a2":"":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0dd358bc3f992f26e81e3a2f3aa2d517":"87cc4fd75788c9d5cc83bae5d764dd249d178ab23224049795d4288b5ed9ea3f317068a39a7574b300c8544226e87b08e008fbe241d094545c211d56ac44437d41491a438272738968c8d371aa7787b5f606c8549a9d868d8a71380e9657d3c0337979feb01de5991fc1470dfc59eb02511efbbff3fcb479a862ba3844a25aaa":"d8c750bb443ee1a169dfe97cfe4d855b":"":128:"a81d13973baa22a751833d7d3f94b3b1":"77949b29f085bb3abb71a5386003811233056d3296eb093370f7777dadd306d93d59dcb9754d3857cf2758091ba661f845ef0582f6ae0e134328106f0d5d16b541cd74fdc756dc7b53f4f8a194daeea9369ebb1630c01ccb307b848e9527da20a39898d748fd59206f0b79d0ed946a8958033a45bd9ae673518b32606748eb65":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"43b5f18227e5c74288dbeff03801acd6":"f58d630f10cfca61d4644d4f6505bab629e8e8faf1673e64417f9b79e622966a7011cfb3ff74db5cebf09ad3f41643d4437d213204a6c8397e7d59b8a5b1970aed2b6bb5ea1933c72c351f6ba96c0b0b98188f6e373f5db6c5ebece911ec7a1848abd3ae335515c774e0027dab7d1c07d047d3b8825ff94222dbaf6f9ab597ee":"08ee12246cf7edb81da3d610f3ebd167":"":128:"82d83b2f7da218d1d1441a5b37bcb065":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9a433c612d7e1bdff881e4d63ba8b141":"ce10758332f423228b5e4ae31efda7677586934a1d8f05d9b7a0dc4e2010ec3eaacb71a527a5fff8e787d75ebd24ad163394c891b33477ed9e2a2d853c364cb1c5d0bc317fcaf4010817dbe5f1fd1037c701b291b3a66b164bc818bf5c00a4c210a1671faa574d74c7f3543f6c09aaf117e12e2eb3dae55edb1cc5b4086b617d":"8b670cf31f470f79a6c0b79e73863ca1":"":128:"8526fd25daf890e79946a205b698f287":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8e9d75c781d63b29f1816859f7a0e0a0":"a9f1883f58e4ef78377992101ab86da0dafcefa827904dd94dff6f6704b1e45517165a34c5555a55b04c6992fb6d0840a71bd262fe59815e5c7b80fe803b47d5ba44982a3f72cb42f591d8b62df38c9f56a5868af8f68242e3a15f97be8ef2399dbace1273f509623b6f9e4d27a97436aebf2d044e75f1c62694db77ceac05de":"748a3b486b62a164cedcf1bab9325add":"":120:"131e0e4ce46d768674a7bcacdcef9c":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fe6b8553002c69396d9976bb48d30779":"786f4801b16de7a4931ab143b269c7acc68f1ed9b17a95e8929ccec7d53413059fd4267bedbf079d9d69e90314c1345bc9cb9132f1af69323157ddf7533ced42b4b7bd39004f14d326f5b03bc19084d231d93bcab328312d99b426c1e86e8e049d380bb492e2e32ad690af4cf86838d89a0dfdcbc30e8c9e9039e423a234e113":"595b17d0d76b83780235f5e0c92bd21f":"":120:"8879de07815a88877b0623de9be411":"b15dc7cd44adcb0783f30f592e5e03ccd47851725af9fe45bfc5b01ae35779b9a8b3f26fec468b188ec3cad40785c608d6bfd867b0ccf07a836ec20d2d9b8451636df153a32b637e7dcdbd606603d9e53f6e4c4cc8396286ce64b0ea638c10e5a567c0bc8e808080b71be51381e051336e60bf1663f6d2d7640a575e0752553b":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"14898c56009b459172fef9c17993b54f":"e7ba6ef722273238b975d551f95d3e77e9b75b24c547b86eafb457d409803bdf6e1443839d8604ee497020e1a3dbd687a819b17fdde0fcf240ce2129792792a58bfcd825773001ee959bf9ec8d228e27ce1cd93d7fb86769a3793361b6f82bf7daf284afc1ece657a1ee6346ea9294880755b9b623563ad2657ba2286488a2ef":"0862f8f87289988711a877d3231d44eb":"":120:"36938974301ae733760f83439437c4":"3fd56897a62743e0ab4a465bcc9777d5fd21ad2c9a59d7e4e1a60feccdc722b9820ec65cb47e1d1160d12ff2ea93abe11bc101b82514ead7d542007fee7b4e2dd6822849cd3e82d761ff7cf5ce4f40ad9fec54050a632a401451b426812cf03c2b16a8667a88bb3f7497e3308a91de6fd646d6a3562c92c24272411229a90802":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fe5253d4b071793b081ebc122cc2a5f8":"b57a0bd7714ae95e77fa9452e11a7ed4a2bec60f81ad6ddb956d4b1cb5dfc277dcb4034d501801b26733b5e08c710c3cfdccc1b208dc7a92cd7ebe166320582bcaff64cc943c36fbe7008f004e5db70c40de05fa68b0c9d4c16c8f976130f20702b99674cd2f4c93aeaeb3abca4b1114dbc3a4b33e1226ad801aa0e21f7cc49b":"49e82d86804e196421ec19ddc8541066":"":112:"e8b8ae34f842277fe92729e891e3":"c4a31c7ec820469f895d57579f987733337ec6547d78d17c44a18fab91f0322cfe05f23f9afaf019cf9531dec2d420f3591d334f40d78643fd957b91ab588a7e392447bd702652017ede7fb0d61d444a3b3cc4136e1d4df13d9532eb71bcf3ff0ae65e847e1c572a2f90632362bc424da2249b36a84be2c2bb216ae7708f745c":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b3502d6f0d172246e16503cdf5793296":"09268b8046f1558794e35cdc4945b94227a176dd8cb77f92f883542b1c4be698c379541fd1d557c2a07c7206afdd49506d6a1559123de1783c7a60006df06d87f9119fb105e9b278eb93f81fd316b6fdc38ef702a2b9feaa878a0d1ea999db4c593438f32e0f849f3adabf277a161afb5c1c3460039156eec78944d5666c2563":"6ce994689ff72f9df62f386a187c1a13":"":112:"21cdf44ff4993eb54b55d58e5a8f":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5fb33dd73db309b9dfd3aee605cd94bf":"f4e011f8c99038c46854b427475f23488077ebf051c4b705a1adfdd493a0a10af7a7e9453965b94f52f61ae62ce9243a82a2dbf9c5a285db3fe34ed34ed08b5926f34c48171195f7062d02a6e6e795322a0475017371cb8f645cdcac94afc66dc43e7583bdf1c25790f4235076a53de6c64f3bc5004e5a9ce4783fbf639fad97":"3f6486f9e9e645292e0e425bac232268":"":112:"7ee5e0e2082b18d09abf141f902e":"0503cb531f1c967dae24f16dd651d544988a732020134896a0f109222e8639bf29ff69877c6ef4ac3df1b260842f909384e3d4409b99a47112681c4b17430041ca447a903a6c1b138f0efbb3b850d8290fceac9723a32edbf8e2d6e8143b1cbc7bf2d28d1b6c7f341a69918758cc82bbab5d898fa0f572d4ceaa11234cb511ec":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a958fe3b520081b638d9e4c7d5da7ac7":"dfa9487378c7d8af9c8dbd9e533cd81503d9e4e7dab43133bad11fd3050a53a833df9cc3208af1a86110567d311d5fc54b0d627de433c381b10e113898203ac5225140f951cdb64c6494592b6453f9b6f952ec5ece732fb46c09a324f26b27cdad63588006bb5c6c00b9aa10d5d3b2f9eaab69beeddd6f93966654f964260018":"c396109e96afde6f685d3c38aa3c2fae":"":104:"06ca91004be43cf46ed4599e23":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ec319fb143eac8215b51541daec268f2":"d298d988e74927736237eb8ab09d7a86b854fa2fd1f7f3be83b417ac10aa9291f4af5b3fbaf75a296ac32369ad57ded3984b84711953e477de3035ba430a30ffb84c941936e6c8d2cae8d80159876f87dd682747f2dccc36d7c32ab227032b8ac70b313fa4202ea236e3ec4d9e4d8b48cf3b90b378edc5b1dbeec929549344f8":"8a4684f42a1775b03806574f401cff78":"":104:"e91acb1bfda191630b560debc9":"27ce4a622959930f4059f247d29d1438257093cc973bf1bae4e0515da88b9a7e21ec59c7e4d062035cdf88b91254d856b11c8c1944865fa12922227ded3eecccaa36341ecf5405c708e9ea173f1e6cdf090499d3bb079910771080814607a1efe62ec6835dc0333d19dd39dd9ea9f31cd3632128536149a122050bb9365b521d":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"14a3e69f351ac39b4297749a90c1365c":"051224f7b208549dcfda5f9d56ce5f0a072ef1f23f3810c693516c92622be6ed4d7a9e0f9450980ba490b2e9e3468ea7eef10bc9ebd673d91f32b748c1bf2c50cc4ebb59fc409c6d780bba00700d563ce1dc9927a6c860095a42ed053f3d640debfbfa7a4e6d5de234af19755000d95e7f414f1f78285ee165410c020038286b":"eb1c6c04437aa5a32bcc208bb3c01724":"":104:"e418815960559aefee8e0c3831":"797310a6ed9ce47cdc25f7f88f5dbbf6f8f4837701704d7afced250585922744598d6f95ba2eecf86e030cc5ee71b328fc1c4f2d4df945d1b91a2803d6ae8eba6881be5fe0f298dd0c0279e12720ede60b9e857ccca5abe9b4d7ee7f25108beebbfe33f05c0d9903bf613c2e7ed6a87b71b5e386d81b3ae53efd01055bbcccc2":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c34827771fc3918d1cee09ba9401b832":"ce79701b661066e53191c9acdaf677ad41622314898d7216e3f113e2e6e215d26d8bd139827f06ab3ea5c4105694e87db1dd6cec10e1f86a8744d4c541f08e40319e22ab42fc1a6c89edfd486b6f142c6bbbf84a73912e0b2e55b79db306ccabf839855afdd889e52ae981520c89e7dc29bb2adb1906cca8c93fcb21290a095b":"2379bbd39a1c22bc93b9b9cc45f3840b":"":96:"26e1f6cf0d9e0f36dfd669eb":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b1f9bd2006ec550b7b9913d383200b5d":"6d9fc8f586d50d6e0128172ae147844e80136905d3a297497a9566ca7c7445029028f14c9950acee92a5c12a9150f5e024e01c7505dd83937542b0b1288de9c292ae8ad918a09b2edf8493540b74c73d2794f2eb6eed18eba520ddea9567462c83330f33d7892fcde0b10c73a4e26ab1bef037cec7e0190b95188e9a752fee6f":"ca28fa6b64bb3b32ef7d211f1c8be759":"":96:"c87aac7ad0e85dbb103c0733":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8b2cef1a92aa0af2b00fb2a99855d5bc":"fd09525ef3c65ab5823e1b6c36b4a9449a3975c5d3a9e7e33c61fb32edcbb8e8c915b6202e3fbce87d73cc3b66d83d9ea7e1e353cc7468f08626932cf0235563e2a28953ee5a0afadb1c3cb513b1f1fc9a8a6cf326174b877448672f7731dd6430a51619da1a169ab302da5af5b38802f8bbf5890b5d9b45deda799679501dc4":"08d87b7acee87d884667f6b1e32e34d0":"":96:"3bd7685318010b0c5fe3308b":"583e64631c218549923e8ad33b728d07f23b0f19d2aff1ad7e20d564c591db0e117caa8f21e3f3345e3d84f0ccbb27274cddf9274410fc342cb2a5d4aea4e925d0dd5350389ee0dea23a842ff3f5c1198374a96f41e055f999cfbc2f47ceaa883da8eb6ff729f583eff1f91bd3f3254d4e81e60d9993b3455e67f405708e4422":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"175c306f8644b0c4b894ae3d0971505e":"fbe7ced7048f83e3a075661c4924eb77da1b4d6019d504afb942d728b31fd3b17557bd101c08453540a5e28d3505aeb8801a448afac2d9f68d20c0a31c7ef22bd95438851789eef1bebe8d96ac29607025b7e1366fecd3690ba90c315528dc435d9a786d36a16808d4b3e2c7c5175a1279792f1daccf51b2f91ac839465bb89a":"9860268ca2e10974f3726a0e5b9b310f":"":64:"f809105e5fc5b13c":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"08c0edcfe342a676ccdc04bdf854b4b0":"1fc8ef8480c32d908b4bcbfa7074a38e915c20ed7a1c608422087e89442d7c5af6fe9c9a716c55793248062d8e6c6e8e904e2804da3a43701e4c78ecdb67e0b25308afc6d9b463356439cd095cff1bdf0fd91ab301c79fd257046cba79a5d5cd99f2502ad968420e4d499110106072dc687f434db0955c756a174a9024373c48":"4a7b70753930fe659f8cc38e5833f0c7":"":64:"9ab1e2f3c4606376":"983458c3f198bc685d98cea2b23cf71f0eb126e90937cab3492a46d9dc85d76bbb8035c6e209c34b2a7187df007faabe9f3064dc63f1cb15bf5a10655e39b94732e0c6583d56327e9701344e048887a81b256181cdfa9ec42ebc990875e4852240ddcb3cbc4ea4e6307075fd314f7190f3553267bd68b19e954e310ec3f8dbab":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"241067a0301edf0f825d793e03383ea1":"6984bb9830843529fad7f5e7760db89c778d62c764fcd2136ffb35d7d869f62f61d7fef64f65b7136398c1b5a792844528a18a13fba40b186ae08d1153b538007fc460684e2add8a9ed8dd82acbb8d357240daaa0c4deb979e54715545db03fe22e6d3906e89bdc81d535dae53075a58f65099434bfeed943dbc6024a92aa06a":"a30994261f48a66bb6c1fc3d69659228":"":64:"36c3b4a732ba75ae":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"03cccb5357bd2848332d1696f2ff90cb":"5e2f18cbc1e773df9f28be08abb3d0b64d545c870c5778ac8bb396bef857d2ac1342ae1afb3bf5d64e667bf837458415d48396204fe560e3b635eb10e560e437f2d0396952998fd36e116cd047c1d7f6fc9901094454d24165c557a8816e0d0a8e0ce41e040ba6f26ca567c74fc47d9738b8cd8dae5dfc831c65bc1ba9603a07":"e0754022dfb1f813ccaf321558790806":"":32:"c75f0246":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4e5e53c84a05d5a5348bac7b2611cf62":"489c00c05dec06f282924c680f621ab99ac87f7d33ebbb4ca0eee187ec177d30d2b4afb4ee9f0dc019cf1a4da16d84b7f5f5c7fce72a32461db115b5a5a433024fd5ed3d47161836bb057a0189ed768f95e45fa967d0cc512fc91b555808c4033c945e8f2f7d36428dcb61f697e791b74e5c79b2bcb9cb81bec70d8119cd8d76":"47e40543b7d16bc9122c40b106d31d43":"":32:"81eec75d":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2c94008bf377f90b7a1c0d2ea38f730c":"7b3d619d115de9970b2df4e1f25194940b3f3da04c653231e8e6946de9dc08ae5ba37e2a93c232e1f9445f31c01333045f22bd832e3b5f9833f37070fafb0ef1c44cc5637058ab64d9e07bb81b32852d4cf749a3ddbfdb494f8de8bb4e31f46033f8a16bc22e2595d023845505ea5db74dd69ab4ca940078b09efb4ff19bdb66":"abfe92931a8411a39986b74560a38211":"":32:"47d42e78":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"69eedf3777e594c30e94e9c5e2bce467":"5114e9983c96fecec3f7304ca42f52aa16cb7c6aadfb62ad537c93a3188835ca0703dad34c73cf96435b668b68a7a1d056931959316e8d3ab956bf64c4e07479c7767f9d488b0c0c351333ccf400b7e0be19a0fd173e3f2a1ae313f27e516952260fd2da9ab9daca478ebb93cd07d0b7503b32364d8e308d904d966c58f226bb":"a3330638a809ba358d6c098e4342b81e":"df4e3f2b47cf0e8590228fcf9913fb8a5eb9751bba318fd2d57be68c7e788e04fabf303699b99f26313d1c4956105cd2817aad21b91c28f3b9251e9c0b354490fa5abfcea0065aa3cc9b96772eb8af06a1a9054bf12d3ae698dfb01a13f989f8b8a4bb61686cf3adf58f05873a24d403a62a092290c2481e4159588fea6b9a09":128:"5de3068e1e20eed469265000077b1db9":"208e6321238bf5c6e2ef55a4b8f531cbbfb0d77374fe32df6dd663486cf79beeed39bb6910c3c78dd0cc30707a0a12b226b2d06024db25dcd8a4e620f009cafa5242121e864c7f3f4360aaf1e9d4e548d99615156f156008418c1c41ff2bbc007cecf8f209c73203e6df89b32871de637b3d6af2e277d146ae03f3404d387b77":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"45cc35311eedf0ba093bf901931a7036":"5dc8d7525eaad035c19714ae1b1e538cb66a4089027245351e0ad9297410fb3a0c1155407c10a8bb95a9ca624a9c9925dac003ee78926c6e90ff4ccdba10e8a78bda1c4478162a0e302de5ff05fb0f94c89c3c7429fb94828bdcd97d21333c2ee72963ee6f056ce272b8bab007e653a42b01d1d2041ba627f169c8c0d32e6dae":"fed5084de3c348f5a0adf4c2fd4e848a":"6e210914e4aed188d576f5ad7fc7e4cf7dd8d82f34ea3bcbdb7267cfd9045f806978dbff3460c4e8ff8c4edb6ad2edba405a8d915729d89aab2116b36a70b54f5920a97f5a571977e0329eda6c696749be940eabfc6d8b0bbd6fbdb87657b3a7695da9f5d3a7384257f20e0becd8512d3705cc246ee6ca1e610921cf92603d79":128:"266a895fc21da5176b44b446d7d1921d":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9edb5231ca4a136b4df4ae22b8588f9f":"493df801c57f8bb591955712d92d3fc34518f0599fec8533b2b4473364e1df4f560c12444cf50eeb584676b7e955c742189de6b50b8e012dfa6642f3679fb02bc6d8e08d1db88c8ae955a7946263e06494e17f8df246b672942661e5563302252208f2e00a0d77068a020e26082c291a75a06f63c41e2830292a418b2b5fd9dd":"c342e9bdabe7be922b2695f5894e032c":"a45c7f8032ac5144deef8d5380f033aea2786b0592720a867f4831eaccc6b85d3fd568aedc6e472e017455b0b5b30cf7a08ea43ca587f35e1646ecd9b4dc774d11e350c82c65692be1e9541cbd72a283bdcf93dc7115545f373747b4f8d5915ed0c42fbeefd3e9bd86003d65efc2361fde5b874ddabcf8265e6b884615102eff":128:"5ed3ea75c8172fa0e8755fef7b4c90f1":"56696e501fac1e8d5b83ef911ed11337d5d51ff5342a82993dd5340bb9632e6606eef68ec5fe8cec6b34ebbc596c279e6cbc9221c4cde933f6d93ae014e3c4ca49593f35eaa638606d059519bac3a3373519e6184e7227d2aa62170c36479fe239cb698bfca863925a4c9fb1338685a55a6dfd3bd9c52d8ae12be8551fce6e1a":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d5fdcb8f5225090e63fae9b68f92c7cb":"d39b9cba95e3a3aab9bc1d03ff475c04faeb5b7f0510777f39e5a05756606eb7ddd154aac035d9ddaf3535629821dd8f014dedd52cd184f52fc706e3c89a3a271398c9125d9a624dafb297a56022ca2ea331ea7359ab5e65f8e14814788e64e0a886a9b1a0144bf268fdcf9d94c3d10a0452f40111da9df108252e9039eacea3":"581c818282a0905df5ffff652e5604e9":"f1ae6cd7b07f261105f555cf812a1d5bf8dd9aac07666318acffa11abb77d0238156663acbf7543825b45c6e9cddb481a40995ecd78bb5f4cba5df7c7efb00fc19c7f45e94d37697aca8ef368b99165393b6107f900194c797cd3289cb097eb5915f2abfd6aa52dd1effffdde448e30075a1c053246db54b0ec16eadca1c0071":120:"827e66b5b70dce56215cfb86c9a642":"cec11a12e47fd443f878e8e9fe23c65f29dd2d53cec59b799bcb0928de8e2f92fe85c27cec5c842ef30967b919accafe0c0d731b57f0bb5685d90a3061cb473e50e8aeca1346d1f47f7db06941f83f21ba5976d97c28cab547d8c1f38387a04b8a0b212da55b75fbaf9562eeeabd78eadcbab66457f0cd4e0d28133a64cb063f":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"036198cd3a3ab9319684d0f811cf2992":"6b95b9e82a695fb7b466ce3adb536f525d8314f95eada39efb49baf121093ce7d5439f0d8223e03530b85accd388a70650ca9f7e63eb32afecb7b1916ed9b762128cc641caf3e08e027c3d88481d653b6b15172e977dfb9b3f88465911aee162501cbf8501ce2b66ee151bbfdc23225f638f18750c239d62471663e5ee2a5856":"47dffc6b3b80ffef4b943bde87b9cf3c":"ec4de476cd337f564a3facb544d0ff31cd89af4c3d9a28543e45156189f8eff8f804494dda83a1fb2c30ce858884a01ec63db59268452b1eea0f0d48280bb7340eaacc84509469dd94d303774d053d7ab4fb5f6c26581efeb19165f8cb09d58ec314d09ab8356731e87fd081f661e7b2d1a7c3aa4af5448a12b742e7b210b0b0":120:"6cf68a374bea08a977ec8a04b92e8b":"5c2f7c408167be3d266ff634e1993fe291aef7efae245fa0b6b5bde886a810c866ae6a078286684d1b66116e636e285f03646e09f3c4ed7b184e7c171ba84f3bfd9500c6f35964a404892b4cdcdd3f697fc5b01934a86019810987a9fea7efca016049873f1072f62df3c17f57ea1d88ccd8757f7e3c5d96e8a18d5366a39ea9":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c9fbbff8f25f951ba874dfc5ff38584e":"ca401071396da00376add467490abc6e6a7d8a85852026979f7013a09cf689113c8d833560cd6c5b8fdaa8fdd818e773ac13954839a0a2c91efeaf4e0e14de43308419a8b86fa2ae600a88a6bd39dfaabc16a3c7c1b77a5c2aab7f7caceb2f8595324125efbb7c96ba16c47d0bd10568b24bf445d72d683268466e68e46df500":"1c1fc752673be6d4ff4cc749fc11e0fe":"abfde0b60acfe265b62ed68ebebc1f5f725f155c4b8a8aeec8d704701c51ff7817060c1b0ce6b80d6efc9836c9ea2bc022ec67db4cd34e945e3a1b153fd2e0f7ac84bb4b07e04cbb529ee24014b16067f9f082b940c9d5e54024d3e5e910310457478560721587da7b5343d89eec5a8fce389c01185db15e7faa9a3fa32e8ab9":120:"ff0b2c384e03b50e7e829c7a9f95aa":"239637fac6e180e71b2c9fa63ce8805f453d81499623ec2deba9b033350250662897867bffaf0c314244baf9e1fe3e1bb7c626d616bfbf3e0ac09a32aaf718b432337c9dc57c2d6fc4a0a09bdc05b9184d1b90c7193b7869f91e2caa8b3b35c10c6621ffae4c609bdf4e4e3f06e930541c381451ef58f4f30a559d2b79b0e6b6":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3a314ec178da96311e42334a616fb38b":"518b3f5384ab54f80497d55be7a5d6902bc7718386212c2ec7537db331514b3838f104bf9054e03039a4cfb73f41e5d0a9648e569ed738cea8d33917430dff6afa8f07a75e324b9262fa196a4439dcd66b0535ee5bea0d292600227c2a79ed03be0671740e5cb7b306d855612bd3abcbf02cf7e7cecbb6cdbb33d57b4e3234a2":"d7ea27c819e3eb2666611bb1c7fc068d":"db8dcc31a5681f13d56abd51bd2dcb0d2b171628186e215a68bf16167b4acd00c3441973c3fa62fa2698ee5c6749fc20e542364d63c40756d8bcff780269e5201bafdced3cdc97931d8203873431882c84522c151b775285d0a3c5d7667254c74724ff0ea9d417aa6c62835865dfded34edd331c0c235a089427672c5a9211c9":112:"1e774647b1ca406e0ed7141a8e1e":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e818372a63b7e2c23b524e29ba752bdb":"c1bf1b702a95ceaa6b48a1cdd888ae51f58a9fc3232bd6c784529a83301c6d0cdda6e605ad9a2563f54a8d59f624ae7c589e48b85041a010dcb6fb8739d43e79a456fc0e8574af086df78680460c3cdc4e00dc3b9d4e76b0de26e9aec546705249fa7e7466c01001c2667eaf2813be1f0f116916f34843a06b201d653aa1b27e":"36e617e787cb25e154f73af1da68cb06":"71801d69796c2ce36b043c157aec9fd2e06fd1ec596126d10c26b6d44e3dc36c4fa30a030d65c382b6ddfd958e71fe9c16732e595137a3d6764c15480fc3358e9a113ba492b31274663f5842df5d1cc6bad70e83b34675a4411e2e70755aede0ff5035601be130562e27a20283d6f144ff1bdb5276dec05fad80d51b28d50688":112:"3744262bc76f283964c1c15dc069":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9a04f16882ff45816739d1b6697ce8b7":"6a4f3dbb3371f64258fd1f831349e745a4e19a33aad794b1de3788729618beed619586092120e9e5dc3ac6e0d52f991f7be61afbfaa4399ac716ad79a2734827254b1627791dc92a128a6f43426b8085dee94242e83176a3d762658f18ecc1e37e3e1531648c9caed212ea2cf3b3843cb92cb07730f30fe2dca3925470fadd06":"66f504d9a9128ad7fb7f1430d37c4784":"f641c53c83c4fb1ff8044bfa97cdf63fe75d8159d65b3e5ad585b89c083a53cf4a2f7a58eaeaf45fa71f2c07bc5725a6b03307d7f32884a133a4c803700bf1e12564b98b71f63b434ddf13ad2c467dda25ffa6effcafa72452b20c34cfae71e47096f8745b487e9f1945f5bec83f7ec2709a13b504d92315b1b727a78902be84":112:"fbb37084396394fecd9581741f3c":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"38cf029a4b20607030586cd2d82146e6":"f4c9f4476561c9ebdac71b282ae6e2f9f03547da98e66d4d857720db2fcc9ed1f363858db34c9dcaca0109d7c81db24150493115f2bb6985efa8686e3d2ab719d33b230aa4c5c70696bf42f225fb3c6704711c054a882d89b320884a78cb59cd2100496edf4010487597fb9135d8ca79693a43843e9626fd6c64a8722b3a27dc":"6330084319e2bf32cd5240f4826944bc":"80746cfb0127c592f8164d751b0e14a5b379056a884cece7ee4e9b80538d7ff6be56a3b19c135786722aaf315123b47672b0251e87ea45f0fd3601cf93f9efa6cbd9ad537f54d57f1e187f821faac24096ecec19d137c9f4cf145c278af4cd8de01c7758784fda06f1cc62d92ae1977786f3d0645714ab4ab6f48c8794b12f73":104:"7b021de5cda915ba58f90ceef4":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cf4d81fc5997c744a572bed71f4ae609":"f3d65d70326e641fbe7fd945fe9cf66c74f17d0d1020ae8ac488f39b7285c99d8632bc2201960f3d77daccfecc04428abe0853aa8d82b90a93127c72b2d2af53f7f1bd0afb99d50f0b3b24e934ec98eddb278b2c65866442cebf10208c7ce1b7ecf764858480b2a269b106fa6d2428d5ad17612e53e62ccc7ad1184663aeb9a7":"bc4e20c56931c967ce8e3b8f5f1c392f":"b6b8294abf7da5703f864721f7904d3821f5568bf4b269e44edef4f1c95ddc172d83a06c0ad9f7f1fd2e292c17a876392bc5bb705d370b2f16ff721bef7648f423346fd3a4d762676e6fcf2d690553a47224af29afed0f452d263be90eb8150a13d720f1db6f1abc1c2ec18cfbf93b8ed3c5aa7cfc1dcb514d69f90409687a4d":104:"0a86142a0af81c8df64ba689f4":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d88ad40b42ead744f1b7a36685658be1":"e99d2566fe6bcb2a04d167605db7c0f1e5567ff2d8d3292c15bbccc5d1e872bcb15a30b3bb8b1eb45e02fba15946e6bca310583a6740845a0f74f4ebfd5c59ced46875823e369e0447cc3e5d03dae530adf3c9846362c94e7f9d17207bf92d4d59981d8fd904eb8b96a0a23eb0f8d7e7a87e8e8892a2451524da6841ce575c27":"52c3158f5bd65a0a7ce1c5b57b9b295e":"dde2663335c40e5550ae192b843fa9fb4ef357b5c09d9f39dafda3296a4d14031817ee4dc1a201d677597d81e37050cd3dc86c25adbd551e947a080b6c47ec7be8a927ef7920bd1bb81f2c59801a2b9d745d33344cbe4838bcf2eb8dce53ab82c75c9bbab8e406597f6908aaa81fbbdef25aa69116c8f7a8cdc9958435aa32ac":104:"7643b3534eb5cb38331ed2e572":"6f87f6be2f4e7421aa26fe321045d1e23066a02158634bef35890581c92367d0bc232940de30974c70a66c60137a9f3924d12db1e5bc1b0e7131ea3620a25eb805b7d670263b82c8bbfcd6839305025390fc17d42d82daebe1b24f73ff9aa4617e3866785dded88f8b55ef89b2798ea2641a592a46428d9020f9bf853c194576":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c3ce86a212a30e724b4c624057db4e79":"3582ef7a9565c9a8e4496750ee5ca3e3a80df6238f7b7608e3394ec56d1360777921da039ede34abcedd01081babd496ba4de74a7de501181d6bb2022a6cc7f79d89a4c6a97676fb0f2b42f70e2d0bc1eaac364c3646df4f611c1d6b09737451b81b5a4da73c05fb58391c74e44498b80b26f1c29562d23c39b5d3f086b280cb":"9e03f0dd4cb2b3d830a6925e4400ed89":"92c48a39d93ea3308f55f6650d33fdf17a902076d582a94a82ac99496de9f62312292b844bbca5a683ef0f0710bbc1c7f89cbcca8f9c0299f154590d32059bd99fca5d78c450ede0d11d55075947caf2151218ce7a06c1e81985a7781a3444054170b457fd7ba816026310112abb47c8eddfd3ab7f679a0f60efc6c6dd3b759e":96:"3230fe94b6ccd63e605f87d0":"052347a4273cddba65b2a0b961477f07edee440a9117ab204359d2dd45ad2a6dad3b60ead891e7da6d79f3017ac90f95725a0089f04d25ce537bf53b7ea8e1ea58692d34c221db141e2a9fd7211adcee03ef8b5bf3c5d36311d20bb3d81f70f7e7272d0e2b6d12293b1a2c31b70f140a8f08d98c6231a3c429c3d0a10b2e1c1c":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a0155360b84420b5bf4fb410ea02f31e":"ecdb51522fc440f7471ea6a31f7c1ef1ec2153e5bcf6303297dbf8ddb3830b45ed9866157375ce4bdeb5e32fcbc6607984fccd7e6552628736608ab13072856d432ceccd3e90d1bb52ca9ada9cee90eb89ac10e887a1978fd0fb3d7bb20caaf35539e150be8044b725b8427c4c4a910f79980865d36344a8784bcc3d58460acb":"46f0386be7363887e7e357376305eab5":"611bc290f91798ad84f0a5ecb5a7cb8fa35e9ab6a5a51c9869a68a076e96f92c9c117595f92cbac5d33343fa2accd2541473907cbc54792c5e215ae857424c921b04ca4b81376bbedbfcc0e565c118f2aced08f247698eed5e2d202c48245161cabeac9fa195219f9799fa253e339561e13012167f1d02b4012b7791b7c863ba":96:"ac5addcc10cae6c1345520f1":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"694f621f594d96b16c32254ff06f3f9c":"e61476b8b7f101ca6005f25af2b9bee795d62720bbbf59357057ca7cd473e00f0d465255fce8d6164657603323549fb4e3d33fa51054b1a70cc7e492916dea85453e9107fe781bfeb4a622c5b2306a8dddef99386dc50745003aa7220cd7f32fb0a060fa7682576769a48f9169c7d11fe0a8a61b95f5d6dfcf216f7d0c652a84":"542db4e107485a3cd24c7ad337a4f1b5":"27b7bfa5eb34ba376e515e58ab8b6556c396820d0074a1fe3b984945dcf5251ca450456ccb4bb66ec739b03fdc5f72d24553e843255adc012d1f1c95aa3cdac5d12926465354217203052cbd4869a8b5be2e01d0fe66b5a6a8da0a2ce351557e2991ce77baa812b9c67b8e1c5a1fc348710e1a73a0fd49acfd538b7db6bef8b3":96:"0bdef4d771a1740381e7db97":"8b27a338fd2153d304f04655e09bd9bdf4468890ecce1e3b51de2c9a25a8d9336a9acd753ce270b1fe8d50196feac68145e0fd59c9cb3aa7c1e8af03494bc4279c6e287c849f3c775ada584ae173100946ae6921ef7c96bbc6f216093548702cf1867bb1bf1f4c9e90a34230a2b2aeb584622dd615023a43a406e64428bd9170":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"78826a5215a1d5e1b39cad5a06861f8f":"0fe2c798d7015d3e2f8725648d95729c45d357dc0c89fc63b9df5a68d3e65419540f663e9190793a29c58c495d5c6a731782acf119e2df8a96fb180ad772c301d098dbc5e3560ac45b6631a01cef7eed6db51f223775d601d2e11b9baa55e2f0651344777e5a03f6738a2013626a891b5f134f07b16598b8cbe3aeaefa1c2a26":"feb9d740fd1e221e328b5ef5ed19eff5":"ca9411b368d8295210d7a04da05a351d287f2f67d978ef1bb936de9f8065473f6fa11495da2eab13a1002231c86411d5409bbc718e2042ee99e013b1df1ef786e9fc1f2d43293c854128184efb9317c4ef82a002eac8b28fcd91d8a714a3aa25fc3c0ae4af9f4bcf5ad19a30cd8ec4b1785df70aa92074da419abe433dd4c435":64:"a724bbb295a02883":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d450f5253251121606e56687952bf2f1":"479b4f421bd8ac7f615c4a507da187cb5d4b1f1e2c6113d1f9678c1ba92dc5e17c5b525d7f3208733223eb82af0820b8476e9b08ca714ce044417b24d2238720cb8ffdc69db558cbaff52e3651b400e16c9d5ac8ed8949a19c35516f80394a04bd1cfdced7b204f779d792086e00b2ebca2f55a1140e85f5ee9ac7cfc5a31747":"fe7ff90b020fc77d7fcd90bc583850ac":"a3bca9ff25a60006eb18f993dcdc99681e414e27605264dfd25652195d7fe1489550afd07fc7346b88d93b59eb6642913646e93bf50ee1db5dd30106cf181124d8ad01c72ed99038c9798620abdf5c78c419b08c97f982b34d9e9105d9aa4538afcd37f62e2412f14f7a248fcd60abaf2b66cd4554767f99030f1a495d56a5ae":64:"6446398aff73ed23":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"90a59f6b0abf932311f0b65623c17740":"be5a948a771a8df12adaf74d702f064a75f6483c03203365fbde7d184844fe6dee0b84cf344be05b1d163817ba1516fcb87b9167ed81f884ada73b0058e2b38cba515bbbe462f4c21f8de1d41bca2cf4340aa659f9f07886c2bb620d9c3295318c07fa3c17fe8242409359c08bcb337e5cf268880839b6a20f4ee4b3f04e7024":"20778bea82a6717038e7064f48a31981":"4022d04f1454a72d2efe57533bd32757595220b20f3a37d166cec0412fb1eb2588f939ecd906c805f4827338669888e9f730905001eb1b136b95e306edf70d9ba1e5cd0aa13a25a1f28ab55cff36f9cd7036c735e3b285d26002ad2ed1074b566e252ea3ec8a9ce10882375dc3f1d9676e301dcb179eaae991120b796cc35648":64:"dc77c1d7e0902d48":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6be4ef629f0b38194c74f7b66418922d":"b67ea20a320f4ec0e4185c62a4ad79a3c97a8189a5e4d1deff9d3edff0f9a9323532853c1a2a2c1e62e4d1afebfcdf1d8461921ea601750380e63b912d8b7389198f976851d88a19f1aa32c97143668ad00838d98da1c4f2be0e6e2dc964d170d7f7ad2e2997982e5ca110e744b6e10c24ca18eadff6b129b1f290c8a7e0a593":"fb77a4b9b246271abfc656433f87628c":"e5d5227725a19a3050fbf2a97a6e854bc1218b94a4a3403b721ace3447daff68fff5553a26edd41219e68fb61fb9e964d0a3c29796251ae4eb942187cdc55d13a09dfb487e93d9e2072d7271456a77c6ccb81154443eea176314d6e3a08619b52cd880f1c28ae5214ac0090a3855dbd74f87389fe8afebd464330fb683dff81a":32:"3d8fc6fb":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c50e37244931e8debc12b3d561c83ba2":"b9abf0796f2d2f774735546cf809030f65ed0c7f6bd469ef2fe0ef32aa0225b57fbce07c36017bbc1806a81ff1a429278160a07643f864485b4e0e35d57553dc1a131e32aa10f1f91d663b10f0a418f472ed7b4bca54fd7ffdbb22c4d7764d94a7ffd04730614459431eb64335b9b65363de292c04275d40a7b968c0f5c486e9":"6c0b1fd7ab424a6883c36457d1b5521f":"516dc25f6452ae169ce293c5cee440de47353ca5ba770dca0f04175950e87a2d4c3f84fbc6eeacaac436853492929680066f959e74de4b736ab924d8367b90aaa6e9492561ad4b5aa78b6737d562e960edc3b983e2e01a186e9f22896f48d8dfcfb6a42cfe2c6006c687a27772820a1e8875bdf09e8104248ce4db883376bc04":32:"7d4393f0":"962509e494f10269b70ebad02b0cd799d1d41191a734863ef502aff3d3ba48dc2acf9da9a3fc3f40be4d210dc5e128bc00499aec57aa0a4669863165428687b88d46fad41e36af8ea6605586eaa5c0736d0d53b9d523e0cb5a0b285048e060a73cbf4b587d2cd787debdb2b4c8cda731a61a15b19fe8b561fbdd3a7373853ae1":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8531ddb03977383405baf2ee9ca7d64b":"d90c9e26509bdba9b1dea8d2b94f2b1881d22c2bd756ad23cd61944710a1c1f2807170ed47a6870ae654e44757fcb3822ef28b37946cafc07284f8a0c22ae3552954f0d87b8d8c825bd546935b494cacb4262d9e2a88f254f200ad31367d8b3715afbabea5f34214ffedb14d7c84806022aba2dc8f88a314ffbb24017d1a9b9f":"baf623867d6a25fd85d1f08e599c0566":"18f92cdd37dcd7f99b06838f3f68748aba367baabaebd0da9ee787d70e752fa07dea553a43b643b8d8f460175c0746675205e20a7a98acfcac864d7c4cf5ab4c41c031738c76882acda003c5af47b1c4df8894a827a317935d970d4afaee17715c9cfd1883e8c345f19d1f89e229b8edba6b4f53b86d8da1c0f159afb83b6b33":32:"2fc9de46":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"862dd5b362cfa556ca37e73cff7f4a0e":"":"81530a243655a60d22d9ab40d2520447":"":128:"3b9b2af54e610ed0b3dda96961dd8783":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3452b7bc100c334292e08343f139b9d0":"":"8f92739a30fe4ba24079f5d42753d6ac":"":128:"0eeca69f8b95e1a902cc3ab1aaa8e2af":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"31a0cbaf21b943f8badc939e94eac7eb":"":"d5bb2c4eaec47088230972ae34fcda9c":"":128:"580e728512c8e44fbb3fe2c498e05323":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9e8fca537746e7cbff97f1dcd40a3392":"":"43e9f2bf186b2af8cc022e7c7412d641":"":120:"4465a3f9d9751789bcef5c7c58cbc5":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"35b5854ca83792ad691dbda1a66790fb":"":"cff61cf9b32ea30cf7e3692aa6e74bed":"":120:"726793199df533dd9055b0ac7c939d":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"07259267c1c6a015437a5d8cfa92f9e6":"":"18b9cf2ad7ace6ec1c8366b72878cf20":"":120:"4340f6263f0ba2d82c2eb79cb0cc7e":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fa1df8955aa3ef191900b06e7c1b7d46":"":"6928c138c98a4350c318fbdccd3f44ba":"":112:"7c89d9e77515d271b6ed54c9c4e3":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c04200ce41ce77d772babb206315ec7d":"":"a885d58f0f38f9ff26d906fa1bfb12f4":"":112:"9ee0d025421f2bf18caf563953fb":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"650df049461be341c3099bd1613dcead":"":"8a4ff6327b49d297248ce2d5bd38afa8":"":112:"13f067ef0d7b448d56e70d282fed":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ee61b5bf5060fcc637dc833926898508":"":"b2dcf21f9ffa4a883044d29f087f9b85":"":104:"9ab1d66666d4dea3cbb5982238":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"01cc56ca7e64db7fbef66236a5c49493":"":"8ea5b63004189792cc040ef18b37e550":"":104:"d685aeb54aa129a21bed17766e":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"134dd72ac8e28ab46720c2f42284a303":"":"c6368e4c0ba0ec90fa7488af9997a4c7":"":104:"4ad9cdf19ff7d7fd7e273efced":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"180c04b2bde6901edcda66085f73ecd9":"":"9193b206beade4cb036f01a9db187cb8":"":96:"530f5e9ed0879ccef3a7b360":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"aaac85742a55ffa07e98106d6d6b1004":"":"630cd8ab849253c4da95ac80324ecc28":"":96:"37911820c810e3700c3a9321":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ab663c4f8f2fdc7d5eabf6ef26169b4e":"":"86e6100669929e329a1d258cd3552dc9":"":96:"958d6141f7fb2b2dc7d851a6":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0dd756d49fd25380c4026ea03cafc2da":"":"6a6f7e39b0d730ea1670e13d16c12c28":"":64:"872ef05a28da5ea1":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"bd8a834b288bdc7578b6c6ab36f5d068":"":"aa77de0af5fa4dd1ed2ada5cb94813a0":"":64:"c5c094e83755f2b6":"":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"020d280dbd06939bbb5e6edc6f6d39c6":"":"09aea6f0e57598452719d6f63b6fe5a0":"":64:"05d6c56ba601e85b":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e47f41a27a2722df293c1431badc0f90":"":"227c036fca03171a890806b9fa0c250d":"":32:"86c22189":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9d3e112114b94e26e93d3855d4be26bd":"":"99b98525160c4bb2029da5553ff82b59":"":32:"33bee715":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5b4b7688588125349fbb66004a30d5d4":"":"b4ae363edb529d8b927c051cf21a2d9d":"":32:"6a920617":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c4b6c5b8e21c32f36b0ae4ef3b75d5cd":"":"3d1036bf0000e6f1b77a799f2ef32dec":"1cf2b6cbe86a87b4b5bb3cc50024aeb27c48143658d47b41f2f20b87ed67bd6fc3b85a3a803f66d3576608f5d6ce6cad11e02fe12de5390722dccb8242e1dd140051bef51aa9716c860d45d45bca6effbb1a4797e6e7406a04db5d823766c0f011ebc28e9a8cd4446ec8a75ea8bdc1b2fdbb5cc364fa9877886e30404593df34":128:"a49725014c214ef7cc2d28b9b2b53da7":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"63c3f81500746eaf383fe3975d84f849":"":"0799d4152fd73c1604b4610cf7171fe1":"cb8248e5f904cc9ccccf6f273fe621eee1b4d7ed98480f9e806a48b84e2d6a733772ecf8fb7fe91805715cddab2b462b89f6e6c7cf873f65031f13c357d5f57b00b7c391c39e78ad1ed94be236ca0ae316bce11bc33c5d701fdfc58abbe918b9c42f7b3d6e89d46f9784b388a6e6daf47730b9fa665d755a17e89932fa669c44":128:"c53d01e53ee4a6ea106ea4a66538265e":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b0c88b191ce6e8e4a3941f7960b7eae5":"":"e2a899961c332c815685c553351fa519":"308bf10570af48d632911f3641dea60d78046211c01a63bb8e4e5cbddfff8841d2f2b11e18ccb2170805ef4cacf7804d64e0feef40731a1704907f33b77788c18ccf35b224ec3046a67664ac9a3481d2385b6ddeec6da4f32423f94ea9663a5c51cc388cef33744a8159b4fb654dfdb5092718bf926c824be31197f07f276b5f":128:"92604d37407aff33f8b677326cbb94fc":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c818dfa0885a09f65ef78712f5ce6609":"":"ca279284723530fdd68ae880e0ce775c":"2a562abdbb483ca5f355f9cc1c5e607bdd624a078a76b717ce0f8f35d0d4c54b629f372f15d20c848d01420c6af5a7040d42063704a17b46259dcc53723caf2d4bf556143ff9117c752fa4f22c9c155c99b7bf5949d089cdafd562165b9cbf53ff51cec21f49128c8a599718bbcdb4a5d705d20509c44c8945e2a133164b9942":120:"20e9a3a98d71d460743e1efaab13c6":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2354c6b6afaa883e7ce91faca4981f8b":"":"604f2730c756c8c39a0527093bc2feb5":"959b4b0b9ce2e9120b327d2d090117553999ee10bdd384a546fc6de0957ef4b447daf07b3d07ef7dbc811f36b0fc09a175d26e4d1263cb5e21eda5ecab85d763807bb20b3cb6ac3f31d548dff00aae058d434ebcf6f7e3a37f11324134f453dd0ea7f51094863486426ff1706129a5a93c53d8c5ccb56cafa5881981fe233cb0":120:"3588c9aa769897dfa328549fbbd10a":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b0af48e6aebbb6ff5b7c92bd140b085f":"":"d210d6502a5221ac1274a9c7f5a81725":"d725311ca10eb4b4aa24e6dd19c5e72dc34fc1ff53feb25d924a9b7d8d72205790ca4b1275bd93ad60c27a5587a45659bca07c111e9748fb683a03465153ffd735b7d134b479674ab8596f0596496fe2090f623fd1e4dd730c5283d8b172db8a25df42d9b34f388ed32676a56b8ba03347e47379702654508ccd0a21ff03516e":120:"e6222f068a1e18f09ba6c771eabd86":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a05fe482fe164b2eca7f6c3e377b39d8":"":"145327bcc10335fccb93afbf4b17e6e7":"ea6f2e93b5e1bf127d40440b8d6397405246b1b48eebe16964f18928f6b4b8ee2c36322d7126905c1a5b816996e340404b586edc2d77afac11a6c1266511f9eff1a320b035442d4078f8e42ca63cf26d12a971a7adf4645d1bd9a8e4d0a20722f7c2d529beaecc4033f7738075e1cdc6d8a929da5582540678935b82e7b7ba68":112:"3900bde9fa9ae2cbeee54d04f224":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"dacbadf819eb16a63f6f091d13ed04d4":"":"b9ebce724b0dcb0989ac2d8e7ff8aaec":"7dc6e2189d8a96f3507e352e05e8fd1b4bab988c2f1c706115887119f63b78084f015d85f6b460901a02880103e4d36e8f6527dfd74e4a3acd3f578c0cc726b528875f701ff8b66e5c11b4689c346a098e123bebfa253362cb86829be73c2b85a6881fa976aa730fabb76775027feec7fd920a6c8965a4a509ea812d7c413a95":112:"8988fca83c8cfb1f8feefac46f04":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"969244c7444f3f3bf193b28f8e8e96dc":"":"49b2845a1a1c87fa66eb8f78c05ac029":"1414a07e86d8b61d1eff43e1ff4ab42c1c95e159058b74c731e3007d21a5eb78bc17b7e920363a3974aeb8608813dc9a4655199b6703ed337450702d8ab16a89776831b2c7c811fec3acc23598a0aa01680a7bf42a4e258145beb08c9f0eacf2bb5f56d26bea3ad11e1a956a630b80f3d22bf35592b4704f7c464b08b06dd7f8":112:"a291c7527385f037f62e60fd8a96":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"525abe490c8434802b69439c590a5290":"":"141f79f0501316e66451c41c7af0f0cd":"be440db66d3f81be467605a7b2805ec1df5e71e1b1b04bd7a4d05e912f5aa1912ba08de72df18613b32b7edf78963c48c80c25178b3b19262b85bb829f5377e0b368b500d6d3b442f54172d4ca4500eb5b4d478b602e5dc11d090539455087ce1e5b9ea74355fc06e9b60cbf25a9804d3f8c623fff130abc48bc2d8d116b8366":104:"038c7e95f790e6ca5ce73f9551":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"51644e025659de983f5c8156516b812e":"":"614837c743d0974e9cca497f13038c02":"60c5d062ade2c5c2dec68b734dd3e58ec474a586d1c4797fdfa2337800510134cb27a10d501927632af3c1febc275010c0d2e5abee630cd2bc792963fa82a42286ab047b934a261927311b40f5f953bfd661427921147cac7613d95ee86e16326ef67c1ed097e8fb87a78753d785de34e03a182232786079cb6be00182e41c9e":104:"77e3deba2c7f9386f85bc4a801":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"08566ca7310302dfb84d76ea0525ba20":"":"5f20ec9c35c08aa7f1c0e8a20fdbd2b3":"5d84e32768b8d1e7e3c426b3118d48e35491bf1bb454b359c8429220216efd8826be94fe1919409a128ccd8125a594f1691c9421fc3dbbb3f757bf2355bb0d074ceec165eb70e26eb53fa2cb5d84dfae06babb557805ef7b8c61c1bc76137571bcc5e84bf5987dc49013831d78bd497ccc49cde7dca2cb75e7ab967da8c6ce81":104:"873f037fc05252a44dc76f8155":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"dfb54db96383fa911bf5b4fa1218ef9a":"":"7e849e24983f63f1194b396bbd2d55e0":"d3fb689c5818810dd104693f3306a10b27178444af26798a194f7c2ab31ff3a172904b951942b1a26c8ae5b5b1ee2d86dc78bb72a335fde350766d7d9aef6f549871dd46b04b2cc319fcdd47be437d431ad18cab82d51ca9fa57f4108a8de622a92f87d28c0349fab27757fd773413f559a8c00d30e258c1f6cd96f9759bd957":96:"dada7fc7fed58db462854ef6":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"389cf888474e9403e5f4d0e22ffec439":"":"ef57794cf6fac9f9cea3e8499b53b1d6":"7ea7f7f4763ad208eb6199285b6b2819756c4e3caf2d0ac6f5076ae6785fecdcc4b138a51860ff8b87aaac3a18c2df778a4818308d458dba28f5017513e1454f60be20dae68736ea6d48b1f9deadb517df63140acbd329fbfbc9b82f3ca1862c9e998f0faff1d3ae60b005bf66829f5cf0c5fa03efbdd92d39351e3954be0257":96:"92726d90ad26130e65f2beb4":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e55abb2ca36c822bf2a030ac703cb8b4":"":"d86f7177e8ec90f9e9edf10175d5012d":"777a9d93091de56324c10712243f5541722e0b27e1f303fef6faa387a8666161ab354dbea6c43c82a24e8623bfec39aab13164add6be0dfd55d23204c0975b4ba6fbda51363befde482a9ccc1eb9f151e6ad59c77a1e24dd268389e4686f198a936dd603044a3fb653d63cff80597f5a2913c8a2ec1b7d9dce5728dd56c78c2c":96:"65025250343ed8c09b3fceed":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"586114f3b1dc087e1b2739b28c592dfe":"":"ae5a38ddd455505284434a4bcfe81ef2":"531ff8c285e532d961f49bd210a5523cd9b19a697a3a3fb26db940a496f253862405b1e825daeda7eb0445c98022b8342c8f8ea20301618483f8ab04b6ebccd7e7fc57878fb544a5bf78fa896f50ac30126ff8afca8a86388666b64c643d16812729bfd7e5c03ba52f7e6ea4c6a685404f7bcbd956964417fa0ea9a6d7290c41":64:"467a815610faeb82":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cbfe806bddb7f06b3826b097550c68f5":"":"04c1b6c9fd2ab76fc2adfe15d3421bbb":"cfa86d02599652cb4ffff027b9c6ef2336dc9fe946f64fa5ce83f624e144563d4738381bc5371c3cb55cf41ceda07e62cb635ff37246bfa428785229c6e869d5df69d7949a8577889a29e3d05b788ddd43608d9c14e3f1b51ce2085b9a976fe843e3396a74922babe6797d5f01c37ead623b5b582505bcd29edf8a6ea36b0fc7":64:"0697ac372a9acafd":"":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"96ce3a095a91effdd91d616f1f02ddcd":"":"579d6633ec6687afa24ef874899b58e0":"3ff3c0038148ed391b6a10aad623a82fe9209c5ba74482f11506d597b5fc7af977235d8ee9e28cf2160346ddd0e33a5bd1fb67b87dad7167fdd4b2b4000d8460ef7b3e1b59b9d61d06cfbe7945379ed6b650de86f396a38cc70d47b8a349f067d00144c903c276b323be6a929a7d7dd8ae7d254d640cdc1176f98e01a1d8c82f":64:"55a0f61032e048f3":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"24ece168c2971cf2b404ea206dc9e29d":"":"e9db62a42491664a6c46cbb0b2bafc92":"3579f6c0cb3d2a5d0c4548855c7c052d36b6a8dfc60f4ca1b4bbe28ed87306119e71982dd84c4205ceba918d675472753df1b5192d3693dbf6a061c6056e312135ffc5ff426895a7e30f7f675d2cb21de06eea5e3761b94deef7537b985d324864c9ff6ab6e230a1006720f98c958912b604a6d03e3979887c07be3ceaafc78f":32:"d2b15a23":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d3c3cf993f6740a019e61ce13c29955c":"":"af900ac348082ff32d2e0ab886079516":"2ddd0e8c99661f0757f04aa79a1ffa24ad48fbe5da68b9e71f7a0cf1b4f2ca9b757695900b7549d48847ae49950dc9b270b1569d29dcbef412216737bd83509c17ae41c34ccda318939cb37a0a380762993a7568c0b07794e78746173dd5c0d921cd50de4b548c1589e142c3dadbad42161aaeda2310f3c6d5c722d9ac69e96d":32:"f2d3a6ff":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5f1e5bd45ee8bb207ebbd730510ff218":"":"8846424a194f5de858556e6be5b65d7f":"e968947fc0e49136e730b97f6b16e393d5e4fdf3e4803a23af79211ef59f29167c60ead72fd489da32d2ffa43b2bca2074f9d1b4f5396ca65004b0806cb7c6dfa751fb6afbee3e443f3c9b0e3df6722e0d1320441400c5ca508afb657c2b7f1669b0de21761dccab9a40fc513768bd1f552692626ce35078a2e0e12f5d930647":32:"0d6c15da":"":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3997050377cfbb802cc438d973661688":"b02f0dd373e42c65e8e1db2dd76a432e0b2bf6e630c8aaf0d48af51b3709b175de9a19b3245ae75818274c771c06fae225c4f8b002236712336e805ab006449eb29cc5e29abd82b06c32d4c36ee99acb9a6d7d9eae6ec6ec263c002a22c4a898c74f6abd6d92112367ca7ffe82787c5b39e7012ba22825d3612af3d41e8008a8":"c95c84c263bdfd5f1de66e7e616cf3fb":"":128:"b35b3cf6ed59ccb69dbc9b47a3f284ae":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c58583f6479d9bc9f1bffddefee66e59":"564a9f700cbc1f895e4f4fa6426f73b4956896a15e6127e7560d74e3fd0b980d2ee45b7a6a3884fa613d91d13921e3f90967d7132bdafcd146dd8ff7147ed1964c2bdb3e12f4133d3dbbc3bf030ff37b1d2147c493ce885068d9ba5bebae24903aaac004aa0ab73fe789e4150e75ddc2bde2700db02e6398d53e88ac652964ac":"cee448b48d3506ff3ecc227a87987846":"":128:"361fc2896d7ee986ecef7cbe665bc60c":"9cce7db3fc087d8cb384f6b1a81f03b3fafa2e3281e9f0fcf08a8283929f32439bb0d302516f0ab65b79181fc223a42345bad6e46ff8bcb55add90207f74481227f71a6230a3e13739ef2d015f5003638234b01e58537b7cfab5a8edac19721f41d46948987d1bb1b1d9485a672647bb3b5cb246a1d753a0d107bff036ac7d95":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0bc2bde877e881aea512068105694968":"1a6369a45e8ef2846c42d54f92d0d140a94f9633432782dcbf094f1444a1d006acd07ef6076cd0faee226f9ff14adc1fb23e3c63ed818c9a743efbe16624981663e5a64f03f411dcd326e0c259bcadca3b3dd7660ed985c1b77f13a3b232a5934f8b54e46f8368c6e6eb75f933196fa973e7413e4b1442b9dee5e265b44255ed":"05f0c34ab2e8e8026b0a23719344b71f":"":128:"46bab9fc2dbe87b8f6ca0ed4d73e5368":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e14f45ba5d1eb52e0412240da5d7b5f9":"9a85fda19ce923f093a0c25b0c52f5d9534828af7c7687d22307004ae2d10c4592242c0f2704070307ab55b137780d1e2013a19396ab43ff6a295b63fdcf323456d149758f9a2bb37f1418d62ea6368b24d5067b9c63d2968e06d6586c7e3275faffa005f7c7bfef51303e4c2b2ed4564acd17d50efac9f5e3e7f16ce589c39b":"d7f8ef12f66f8b7c60aea02ef6ff688f":"":120:"beede05e4928c808bc660f3de95634":"4ad5b9ace0c0c7c07df2900faf37a902899471e7aa4a0a1ad5387f8f56d73f78f619be79a4e253f95b15d52895a05bae9ecffa916d35efacd8baf1c704d2aa4a38c234efc4dcfb191ec0fa0b522328fa5b5dff55e8c443fee660ebe3d8ad85de157a889aefc823720030a4cd6ba94a6309dd61806f0abb27772432018bc61701":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9a64579f3601b0022d357b601cd876ab":"88be1f4bc8c81b8a9d7abc073cb2751e209ab6b912c15dc094002f95a57a660b9f08b1b34f5947223205b579e704d70a9ecb54520ce3491e52965be643f729516f5cb018beeedc68a7d66c0d40a3f392ec7729c566ce1e9f964c4c0bd61b291ccb96e3d1fac18a401a302f3775697c71edb8ff5a8275a815eba9dd3b912e3759":"515efc6d036f95db7df56b1bbec0aff2":"":120:"13ea92ba35fced366d1e47c97ca5c9":"7fc8565760c168d640f24896c69758355b17310dbc359f38b73fc7b57fe3f4b6ecad3f298be931c96a639df3c5744f7e932b32d222f5534efb8eb5d5b98d218dce3efef5c8c7ce65738bf63412d0a8ed209071218a6fa2f7be79b38d0b2f5b571ec73f1a91721bd409b1722b313683e97d53df19ded95fd471124fa5f294a4bb":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1bda4acfd10ab635f357935bb0ab7020":"c9ac8d4ef7d83848fdc03664957c28b9b76710797d5db1c21e713e85eb0898892223e52be1644fc7362c95026ebb9c9ca74d7d3739eff10cab1eda00c36628dae0b98d119a14635800e37cd340faa6fbba9c3d41d52722cc3969612b1a8c5ca9a68773f5ee654506cb88ea65fb1eddf5ab6312d0170dc03324e483342448b854":"48b77c587616ffaa449533a91230b449":"":120:"8325e4394c91719691145e68e56439":"1287ad3719508a9be70c19e3b134a2eaa4415d736c55922e9abcfd7f621ea07ffb9b78d8a9668c74bbd548b5e6519ea12609d2d6197c8bd3da9c13c46628f218e7ff81884ff7eb34664ab00f86e09cd623bec248d8898ef054fce8f718a0e0978e8b5d037709c524114ec37809ac3fd1604e223e08f594e7aa12097f7dc1850b":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d21cf24bc5bd176b4b0fd4c8477bb70d":"2e7108fd25c88b799263791940594ec80b26ccd53455c837b2e6cf4e27fcf9707af3f0fe311355e1b03ac3b5ee0af09fb6fb9f0311f8545d40a658119e6a87ba8ba72cc5fdb1386bc455c8fec51a7c0fec957bed4d6441180741197962d51b17c393b57553e53602f2a343a0871ea2dc4b1506663b2768ce271b89c4ed99eec6":"208cb9dced20b18edddb91596e902124":"":112:"7edfb9daf8ca2babcc02537463e9":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3d02e2b02170986944487cba8448f998":"bc1d7553f4a28754cf59ed6f7a901901f04ce62a449db2b45ad60329d0341bb9ba421c783c28a9200b41da8ab6328d826293134a7d0c9a5775dd2735e7767efda4ad183566e0847d6d978abd1a8ab13b16b8323acef05ced3b571631e1e24ad44d65e6ffa64e03c9970e94bacb9f721aba06cda6a08806a3be63dddd8029301d":"6336077bb83eff1c9ea715de99b372cd":"":112:"0466bb2957281f64b59eafed3509":"5f395958f2f7acafb1bca6d3a6ec48b717f2ceeac1b77e1b0edc09a09e4a299d2ec722cc7daf34c8f4121a93c80b2adb20a2fc95afd09320f91085c93c8b082dd703814c9777501d23bf9b328f07f04652592dc5a3f4321626a695b8db8e65c8617c809eb2978d8c9a882ffa82a4bb707c1a8f9a965bdacce5c041bafc94a1c6":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cd1ad1de0521d41645d13c97a18f4a20":"588c2617517329f3e1e7ba6206a183dc9232e6a4fa8c8b89532d46235af1e542acaa7eae4d034f139b00449076ba2ef9a692cae422998878dabdac60993dce9880d280bec1419803ba937366e5285c4a7f31a5f232f8d3ef73efe7267b3ef82a02f97d320ebc9db6219fbdf1c7f611e8e5164e9ecf25b32f9c07dfa12aa705af":"413873a0b063ad039da5513896233286":"":112:"d4dbe9cae116553b0cbe1984d176":"bd519b7e6921e6026784cd7b836c89bc1fa98e4013b41d2bf091ef0d602e44a70df89816c068d37f0c6377af46c8bfa73ec0d5bc0b61966f23e55a15a83cea49f37cc02213b4996f9353ee2b73a798b626e524b9c15937ecf98a4eded83fb62e6deea1de31e0a7f1d210f6d964bc3e69b269da834720fd33487874489b8932a8":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1cb120e9cd718b5119b4a58af0644eff":"4c8e8fb8c87ff6b994ae71bfbf0fa4529f03bad86edf9d27cf899ea93a32972640697e00546136c1dbc7e63662200951b6479c58ae26b1bd8c3b4f507c0d945d615183196868ec4f4865d1d00bb919a00184e9663f6cb9a7a0ddfc73ee2901f7a56ef2074d554f48cef254be558fca35651be405f91c39e0367762b4715d05fa":"5a7087989bfe2f6eddcb56fde4d72529":"":104:"95d8bd12af8a5ab677309df0fb":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"315b206778c28ed0bfdd6e66088a5c39":"6186f57a85b65f54efbf9974a193012b1396fc0ca887227e1865f1c915ac2af9bbd55969f7de57ce9fb87604cf11c7bc822b542f745be8a101877a810ed72bf4544d0acb91f0f9d3c30b6a18c48b82557433d0db930e03bcecc6fb53530bfd99ee89f9e154aa1a3e2a2c2a7a9e08c9aed1deab7fae8ea5a31158b50bca2f5e79":"7ec6f47ec56dda5b52bbdaa6ad2eb6da":"":104:"930750c53effc7b84aa10b2276":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e886de1c907c97e7db8ec80a79df90f8":"c64cc9596d7c738746ab800f688eec190a4c802c55b2528931d74d294496892b81f53d3073d48f9bef1d58ce3be26547474cdda2868abeab71aff566fff613b4e5bfed1be1d2fff35d8ffa33302d3da1c82e421aa3a23848f31e26d90c0cb2ac2ae136ada73404ed3e0e1d3e7cb355a11cd2a4f9393b4d5eac988104fe1cf959":"612cacbf33266353d0a29a24532f3c0c":"":104:"76634e58d8f3a48f15875ac1d6":"7001d7395efb432e2804cc65c0ba5d4719ce84177ce46292c4fd62a5596bd2bab1d5c44217ac43235bd94489c43d01618a11f047d2e247062c3b88d6e59adaa1f46514fb33b7843483920bee60a41f3cb312322c305d25251b4704fb66da58637c95a9d539731434f60ef44fe3cd6d37e2c8e7089880a563938dcc98b43f08fd":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3b936e09a6477f3bd52030a29df5001d":"65cf11d1afad19b34f282f98f140315992392f5d4eed4265085b29e1e5553f4783fec681ba2d368486ba6a54c00e71c82c08ca3d097904f021ce4b0acba2d2a7005e28e5f8750ea3d18a4f78363c37583e85104234498942c639a0564b0d80055c21cb7735dd44348298291ab602f345b1d74d624750c0177fbd5cca6f99223b":"f93105be83fa5e315d73acfdcf578de7":"":96:"91b55bb5e3f3f1abcf335db5":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"dc9e2095de7b1b48481b56bf6a3604cd":"ed61ff94a3f84c72147faefa615e2df00324fb01790cf9764c72c1b8ba47f17866a1fd64ee5c2f53865d1bc24ec93165a6774466a59603199ee476c1f2da7d932c8943d126aa172d532d8475a484d42bb45fcf92766feafd7f3e2e3d42d22f6f84a90e7e688232f799d80cd2cc152ddd21ecfb137701ecafcb2b65abe2e4e6f4":"9e5268db19a1b51c0496a160ca76f8f7":"":96:"0fa9588536fca71bb44260f7":"ef562e301fcf923ff1a1acd3aff9b1c963058228655fe8a66cab01396547dbd2aa1f79a22eefc62944b86d1a31ebe2d17130175b8c003d6755b0eb8b79895b0f7f8046c5ae888a067ba17bc8e11a8f6e5023a9cd42f6461966c28e505b371c0f72a2606bff430a58016e99713d25ce11f10391fb4a922e27989422c6a64f9107":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3f93901fd7cc88db3ba76a158d658c7b":"16402fded879fcbfe9405902aa63ca2a520889e0045f687455469b7bb867829a01208b8dc5dcc852d8ee478993c30e6d9ec6408773b367821310a0ae171d38d71e06981ff6e845acffbc794142b87c748e12484c0636419d79be3d798cde59e9dae0a4a4a4346596427e6b235ad52e6a1b02d6f4df0c7de35fc390cae36aef14":"7e98de461e6d96c0ce6c8d8b3854cf49":"":96:"86c9a70e4bab304ae46e6542":"1b4c09569b42c469b3ab6b39312c214502ec09f5fe2fed1d1933d13cdc6a7b77a5d135123fa69d9207d6844b0357b26b7a2f53b33a5cd218dacda87b78b09cf259e48e74076812c432e2d0833fb269721f9347c96e158500f9b2283342a35c8de0a022edce711118d72d8fbaa354bfb0ffee465844ef2d37e24ec2cea8556648":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"42289f3d3cd5838e250ef54b128e60d1":"3edae1d554b67d2036f5fdbdb2945cc112f100adc1b47009c2e23f6a2eaee78d1f39ce8a98f715853cc29fc793fb6981ec3036834188dea7d668185ccc8642071b15de1332f6a59c8a9b4399733eb4b3d8f224af57ba6b4a8e64494bb6630b9d28e7ec3349064350febcef6a3ad1d6cca1b1da74f3d2921c2b28a2dd399c3416":"e557389a216ad724aafdab0180e1892e":"":64:"6f78bc809f31393e":"25c476659cc7b343a69088baf868a811ba37daca85c4093105bf98235a90aeca015ab034da008af0982f9b2e80df804c186a9b2e97f74cffd70ebb7771d874fcaf12f6d01c44a8b0ec2898cf4493cf09a16a88a65cd77909bbf0430c9603869bd5f20d56cb51d8a3f0a032fc30d925c96599d296b1ec41c2912bda426adea4fb":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3d772eabb7f19475665ca2a7e693bcfc":"e9fc4d86f5b857fa6057b73f967351e06f87288c40a95b9e378c84f1a4c0f4b80ed0a0b44ff90a8973be4199c0c4006fc4f5ea19d5f1fe8b9c8c01f4675ab85afab0592bb3daba36bb4fc7ed9eea867e9d8cc50c19fb62a5a57956e9efacebac5e9f849649d35a329bd68de97bb6e5ff7bef477a86765c2c9ec15e24cbba5c6e":"0747cbb486a013453fde1ca6abb11dbe":"":64:"8e761ffaea68f967":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fb7fd753ee6eaaf283a42a121dab4e43":"fd5cecb2c0287cb8229e97d9cc4b9885f428710528884ce663ed1728cd44cb2df93e56ef17ace0678d1e341366c652f4ba7ee45797d39be4a05c1151e5cde499e13e5d45549b5d95a174d03616d06ef96e9d7b2b6bb0d79a726b253dd64223a5f09611671b234ccf9b383952f8888814b2c167e774cfbf54e9c6b99a753f4fa9":"8164929fb54485377ecccc9b9621af5e":"":64:"40a2fa7f4370afb2":"6208d068be60f7b04b80fc611062e6caaef9a5cf59f850d174b7446c78c039ea9aefe4885e19c2b33911d32ce1fe3c48ddffa4b03e450fd35da03f40c4e7c5bb3b1c3f3049dbfad3ac81ca1b79cafbaa172f4900e3829d38edea3b64000f93924a801259bc4b2523445c64bc23bfee190b952468507fa4baf6dc2bec66fcf0d8":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"30d757fd73a0fd5fa49159ad0653296d":"17d485b258f80d8924e35291118cfdcffd86c47851b65f0b06a7c1f5202de82f3f460fc61b1aa38fdba7c8ded375c92cf005afe63e59d362c0960044af39241b81ca24e85c5faa43903229355b7313fee21b992ef3931d9d2407b32b3cf72dd7acbc7948395eb513cb2fd428b215ba2bd1e29c62f45d0ce231884f62480c6d8f":"b35b8df0aebd0608517f2830e0e70cd0":"":32:"954c0e99":"022618d2598f79104e918a09c937a82b3db59243b5e13de731fcb912e4366105797ce47f6dce7f08073f2f41e5c15fd6b1ec4b5861469a4880c3b0bd769b78c696ff29c28c9349d5a46a6e5ad9211bd4b708a8c0b6928ebbb0dac1c0a5f5ce6b05de6a50073128566a23f09cc1b826aa5803f9f750aa4debf59f24ae9f98c9b5":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d9d3cfd5900de5d5e2109e7721cfeef6":"e4243cc37cc32dfcedf9bb76890e706af6ab1e06b290b8ccfe2a55e5dabe68cb390f7636dc9676b431d4dc8ad3f6d989e510194294ab7ab0556789046743cf374d8b6462f5f95a17f3f44337d6c69ee47b0e1ad7e5ce6f9b224c54099a104e70d2d06af869b921ea47febe08f90c591ed49c1f12003afceabd2c7bba458a0111":"b4b9dfb013de6f7c44779e5a9daaf5e5":"":32:"2b81e8ce":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"68dc138f19354d73eaa1cf0e79231d74":"ce345567a76bc30d8b4fd2239788221cfa75e1a310aeeeb8c355f8eea57d80967f3047fbd4e6173fac5caeb22151fa607065953c4c35e0537b9e3788cc80de9eedf2a340698bde99a6a1bdc81265319da3e52f7a53883b7f21749237fcfd3cd4f149bb2be7a4ddd9ef0544cfe0789040d1dc951b6447304942f03ab0beae8866":"e7147749560f491420a2d893c075bb76":"":32:"70a83f6f":"64b021612c78b3e192e8349d48b77d02927e7fd70c7160d37cb8ef472f6bcd9df9d93431627c1c80875e208724ae05f94fdd2e005e9707b78a1bf3bbca7beec4b03ddd4d9de6235ffd6d84a8b9a1842e104c1e22df4566f6c4d3d4e3d96a56b9b8a5cdce9da70aa236109b289266036f285564060b204dfd7ac915eea0dd0b1e":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7362c86344e0aefb0cf0d04768f9c05d":"8baffc7836004deb87c0111d47c182512bf861874021ddfcd559acf2c4a51cf5bc4bfdee2d039b9c005b6af95a2607643dcf4d9cd9d62412f709334556db22fc91d7b40438505d6806ccb2f2c21ae731bc1f1c825d28a71ab27095a39985e96ccd07cfb2e75243ccafd474494a2338c324ef533ca5f17d2ac1b1883140342ced":"7e8d12c2f0dcf4f792247134234ac94b":"86d2b5debc3b10495da353d6821f6cad380776d805bd8660b08dcdb1acd87026e4f344b547a4db47b5f44cded314bec4ce9a417ce40a2acd5a21460c42dfcd27483abf3f38dd8cc5fa523b6768a26513df5896435baa97781cff1966e2e3d6ec6d0a9cdc013de5a50e4d46831667055bad04f784024a82f9cd087ae4cd37dd64":128:"9594da428fd8c1b13ecb23afa2c1af2e":"e2c424f42aedd56f0e17a39d43ad19c8e2731efc7a25f077aef51d55280b10e667e338bd981b82a975ef62bf53bc52496b6995d33c90c7ae14767c126826e3f32bd23f444ddcfd7a0dd323b0ae2c22defad04ce63892b45c176bd0b86f5fa057a3dc371359744cb80bbfb4a195755136a0ea90b4044a45bc1b069f3cb3695c04":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"58748bb204ccb7bdafdbf739b6c19a3e":"b72902c9ebb72a86be539b19a52fd9af00aa4de081d90c0d8ad580ebb5900177a036f40a1e9b43e3a07d715466526d6d7544e5a5551805b62463f956cd519fc99182c2d54bd62fc7ffc6e5ebf1503859b706da11a1b6c707a67a70789dbfc10ef726bd360f9f2347326e068e757c8443ddc9308a171e682359ae1bfe87194ab5":"93ac298c73c88e127a4d9dd81bf24e3d":"8f168fc4d1da13bdbefae3f9d6ac1d8cb19fcec1f43f727951af0a466d8826649a46c3cb50c045ea83849fce0eedbc042a1a435e6d9d59017997a2d5459b940078b8a7f3b6b0ff279ff8c560248296a17240ff1b0643d1f436b6e3f2079363fc49fb45f410debbdde083b92057916368cb807d603cb82e2c0dc01658bff7f1ab":128:"efba4589d4a03555766bbc3b421dd60f":"d5c97a659f016904ff76286f810e8e92da6f8db2c63d8a42e617760780637e32105503440cdf04d1fe67813312f1479fda8d746c8b0b080591eba83850382f600e9d8680516c6579669f0b3d0a30323510f9de1c92512790b8347751994d022156cae64da0808a649d163a0e99e869fdf224b7c1a6a8fbc613d5917eca8ee08c":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6cc13cbd62428bb8658dd3954fe9181f":"2c9ec982d1cfb644ddbc53c0759b10493206d5186affc6882fbb2ba3aa430f9bae1209db2d78dcc125f3c909a54dd84fdff96c71e678216a58390ef4308bdd90f94f7109c4edefa76a74fda64b201b7a435bbabc27298f3eaa4c2d1393bd584f811fff52638f6ad2f6d86a8c3c9c030d9d4264c8c079592a36178d25991cff09":"86740da7ce4efbed70af55e1d6c10fdf":"be561ac15e3cfda624b422af97c26719c140bb50e4a993d636efe9c7f1963fb9047a0762169b571a698ff310bc417e34d4039b7562a95af710ccc1b197964a376c986fd2ed8ac4b0c7b4e843c37a41366f2f483c821a1823f317416c7e4f32eed9b9dc2ae1a2f3ed32c4b3187358a2329aa42191b7c2fe87b6e27ff20303cb29":128:"76b990a1e010e5f088f6ae90bec40b32":"0b9a5f5d2e6852b75b9cf26c1b310b2200e56dafcf3c941478862cdf9737ac8e2cb9b38d41bd4a1872ea1b4cfd51a1a0b9b743aca439eefa10de8459a0a7a221c5429b3dee393f17031ca6c399df8e05657c3db55be9c9dd29e690042a4ed8db732efce7c58d6b20a2a0f7c79e42e5ada43b87ab00f481c20cac1b35514dcdc9":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"286d3f5080cfe88538571188fbeb2dd5":"55135928997711360622eda1820c815aa22115204b1e9bb567e231ac6ea2594b4d652627b6816bdc6c40a4411fd6b12fab9a1f169d81c476dbf77151bff13f98ca0d1dc0a68ea681652be089fadbc66c604284eebfc8ce4cf10f4ca6bda0e0f6634023db6e3f0f1de626c3249a28a642ecc9ec5ff401e941fa8a3c691566c0ae":"da6140bd4dc6456ddab19069e86efb35":"5d350a04562a605e9082ebd8faec6c27e561425849e7f0f05f5049859c2c1bd2c4682ebf9773fab6177d2601fd5a086cefc3adef5a2f8f6b5dc9e649e98dd0a3d1a2524419f01305bd0fcfff52d84a20d1b14dea2138dcc54eea2bf263c6fe27c3e7255f1f359d0d00fb1b350d7a04965af30027632520197e85eb41de6bb286":120:"d90d34094d740214dd3de685010ce3":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"726ae113a096769b657f973ea6d2d5dd":"90636012ba8c51d16f8f6df3d3bcabc3f09aeffbe2a762f62e677913188045b861b2e7d9a7bd93dcee46e9e4832e497a6f79db52b4e45c8dab20fa568ff9c4ace55be3216f514a3284768a25d86b1c7da5377622f3e90ed4c7bd4571715af4d0a2ab5181d0475f699202e4406bb9cfdbd4fa7f22d0dd744d36b3223134658496":"2f9900226c97585d200dd20a279c154a":"761663c3fcbf1db12bc25546b2425b8229b3153e75f79fa63958819caee3febff74603d99264b5a82ef5980439bef89301ae3206a1d01a3bbd7a6c99d27d1e934cc725daeb483f826c2c9d788fd1f67a627864cf8b5f94df777bb59ef90cb6781a2000e6f0baa4f1ea4754b47bb7cbd2699f83634e4d8ab16b325b2c49f13499":120:"d095bfb8990d4fd64752ee24f3de1e":"9f7759c6d24fd9aa0df02a7c0cc5f17e61622c63195f85dfafa5d820d3ad218c7288ec017821100f1fade10f9bb447a4a01e3698b045548c7619a08f2304e2818a9bf55e70b40f8b994b7dcf0cb243848cf3f6fdfec3ebbb147d01df84a3ec62cd8fa5d78ad9f2f28cd288a35eb49a5172339e9872e8e7e3350b0d69f59acd07":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"73a9eeda721c6f292e6b399e2647f8a6":"215fc7e52abe4c751ca2f7f9a5cbde9ab8b44b8d4054bb62dcea6df5b936145ca6ec83a2b78b070638fd6e5ea3bad5d0caf1b8f755f391c3e0962a92337e3eba575585eb83680075fc818860388c587746af78d5fc75ccd0a63f1612abb1ba0f04a2228ca27fbddba4878f9b2683683f516b6d6fe4f6622e603bd3c5ad45e332":"c1e80eb723960049cc4448b66433f1cf":"fb2a0b1f817404e74aee0a6ec8f2cd86f0c9114ed367b2690c44ad80f9d3377d7fd5066beaf1daa739d27ed3fba98379188016b1fe901204a174f9ffca370c181aece5e5d40939a0d460913b40b895e78a3b80ddf3d613c05e4e27bfd161ea2ef42271a2679f2cdca5b728ffb2319781c946a4f3ecacf486b754b30bb04ea60b":120:"e08161262234d0d5be22f09e5646bf":"b5e286183f16dd9403bec6786bd4836cc6add47947ef111fb1d5503c18c333c8fe60959502f58390d0e0f69fbe5fee13c72aed65fe6e32f6ea45877fe44f8a556aa5157b112e572197c1c350b7943c6cf2e9146018599524d27599f09c86027f2c5927e4a20c63833870e8369baa36ecc07cdb3ced520b5ae46869ff357ca089":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"90dbda7397d8fc46215a1218a6ffd0d8":"4f82a1eca6c9184240f50f7e0cfec07ec772cad5276d93043c462d8364addd9a652eed385ccc6b0faa6ca679ab3a4c3d0be6a759425fd38316ee6a1b1b0c52c1bb3b57a9bd7c8a3be95c82f37800c2e3b42dde031851937398811f8f8dc2a15bfd2d6be99a572d56f536e62bc5b041d3944da666081cd755ec347f464214bf33":"7be477d14df5dc15877ae537b62e1a56":"7358ddf1310a58871a2f76705f1cf64223c015c4d1574104d2e38783bb866205042f05c86e76c47a2516ce284911f1d2cbee079982dd77167e328b8324eec47c9244cc5668cf908c679bb586d4dd32c6c99ed99a6b571cf18b00689463e7a88cea6ea32d288301a10a9139ed6092ffe298e25b8cfb6b4be8217f16076dcd0a90":112:"776d871944159c51b2f5ec1980a6":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0c85174d428fc1c7c89ca5d1b8aaba25":"3735cbfb8000260021d1938d2a18e7737f378ecddb11a46ce387bf04e20bbfcc902457637fd152ab87017185601f32a7f906057123b6c2da31a1069c93e3cacc59a359aebd3e31b302e1a1f7d5d8f1b2917a8fe79181fa633b925ce03a1198dac48f4c959076b55bc6b3d50188af2c6aa33d83698aa8db22649f39825ba54775":"b3c9dfa4c55388a128fbf62aa5927361":"3f552d45b61cf05ae2aa92668e89f3338a15ec7c5b7113b6571cfcd9e4c4a962043ccd9323f828dd645e8a91b007ce2112b7f978ad22ee9821698a4f2559d987ae4421452ad2e8d180953297156426d4540aff2104d8637b56b034a3a1823cf962bffbc465fe6148097975a8821ca7487e6e6c7ff4ee4de899fe67345676bb1c":112:"1e7dec83830183d56f443a16471d":"3d98cabca4afb7c1f6b8eeed521f4666ae252ac12d17ebf4a710b9a22d839b69458387ba4bbec2f6400e0cff80fbe4682c24efcd3b8c594d9b515ca7842c9d5988c42b59b6526c29a99256451e2927f5b956ef262f97c733dfa8bff73644473b9a8562bdfca748f4733ddce94a60024dfbfcde62fb3cbd7c3d955012d5338b91":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d89f06eb07744d43d44734faf9751d07":"36cc3b2f563305208a03378f7dc036119f7de3fee77cefac06515853d36609a622382ed026c59783fbc0d9910767874c516e10c7bf3e3d104f73b3463c8d93a63418c76cb0d05e62e9c8642cb4f32caced2620912cb6c79e5110a27d5fba1ef3b4d0578077858526c5e4254365f2b2ab47a45df4af08980b3b7a9b66dff5b38c":"185f8d033713ee629e93561cf8d5acb8":"743bcb671d0aa1c547b5448d64d7c6b290777625ba28f25ca0fbf1fc66495a2fde0648a8db51039b0e7340d993aef8afb48269e660cb599837d1e46f72727762d887ee84c073d6136d1b0bc7d4c78f5673a4a6b73375937e8d54a47304845f38ca6b4f51cf14136a0826016535dc5ed003e38c3ac362b9d58ba8b555a05a1412":112:"fcad48076eb03ebe85c6d64f6357":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6150f14dc53f391e815acfabed9f9e20":"fd8f337017e1b60d6618e6e4ad37c1f230cdeb78891579c2c63d4e6a4f7d2cb7252e99de333c73db45958808c08e91359c885a7385ab6f9ed98a27927a5b83c3a456ce2e01869712675e527155ba1e339ac14a3ccd7a4b87360902f2b8381308fe5a4eac5c90d0b84da4bf5b907de6ff3139cffd23b49a78750006100183032a":"7e92dd558bd2662c3a539dfe21a352cf":"9b4624e9118e6aa5dc65b69856638f77fd3f9f562046f50ba92a64e988258637932af7979f000505b84a71ff5dd7b60bad62586b1a8837a61c15a1a1ba7f06668272c28169915d7f06297b6c2a96c8c44203a422bfd25500c82e11274ffe07706365bfd3da34af4c4dd8ad7b620de7284a5af729bea9c4ed2631bdcba2ebdb7d":104:"922a7b48ad5bf61e6d70751cfe":"f272a3ee9b981f97785cc6fad350e516d72d402dae0d8a531c064ec64598b2a5760f9b279c10aa1ff71bec07300ab0373187138e7a103fc4130105afa6b6346f3d368b40d6f542375de97878ad4d976d64c5c4968a17be2b1757a17c03100231c34721250cd37cc596678764083ade89ae3b1a2151ff9151edcd7ba0eb8a4649":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3e8216072ed6fcde0fe0f636b27ed718":"3b50f2a8dca9f70178503d861d9e37f5edfafc80ee023bfed390a477372986e4794175ec22ac038c3461aba50c9b2379cab48512946efdfe2cb9c12a858b373a5309324f410e6a05e88ba892759dbee6e486dc9665f66cb5950ea7e71317fa94abbebd67a3948746a998173fbbb4f14f9effbdf66d3b6e346053496a4b1934ce":"23a122cf363c3117b8c663388c760ee4":"28ce0b4a44fa83323e060f3ff6436b8829d4f842090296bdc952b6d4a6b1b1a66be06168c63c4643e6ac186f7ffd8d144f603b2d4bc0d65be48121676f9fa1f359029c512bebfd75075ff357bc55f20fc76d9f2477c9930f16408f9f09c5ae86efa2529d2f1449ceeb635b83ca13662860ef9ac04a3d8ab4605eccd2d9ae5a71":104:"531a65cc5dfeca671cc64078d1":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1af434b73a1210b08595ffa686079832":"13f6c1c2d4edcf1438a7b4e85bcd1c84a989831a64d205e7854fce8817ddfceab67d10506ccf6ed9ce50080ef809e28e46cba7b0c96be6a811f59cd09cb3b7b3fe5073ee6763f40aee61e3e65356093f97deef5a8721d995e71db27a51f60a50e34ac3348852c445188cfc64337455f317f87535d465c6f96006f4079396eba3":"ae318f3cb881d1680f6afbf6713a9a2f":"3763c9241be0d9d9a9e46e64b12e107d16cca267ff87844c2325af910cc9a485c7015d95bbe62398864d079fb2b577ba0cfad923c24fa30691ad7d767d651eed4a33d0be8f06fed43f58b2e0bb04959f10b9e8e73bd80d3a6a8c8ce637bfbdb9d02c2b0a3dd8317c4997822031a35d34b3b61819b425c10c64e839b29874ddfb":104:"2ae7350dd3d1909a73f8d64255":"3cd2a770300ce4c85740666640936a0fe48888788702fc37e7a8296adb40b862ec799f257a16821adaa7315bd31e8dec60e4a8faeb8ba2ee606340f0219a6440e9c1d3168425e58fac02e8a88865f30649913d988353ab81f42a5ad43f960055f0877acda20f493208c2c40754fbf4ccee040975aa358ea3fe62cbd028c1611a":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"04036d2f5273c6ff5b8364aa595359c9":"acf79b6099490af938fb5fd8913255b3daa22786b03356cdf3e0ffaf570f9f866047b8e15c9953f893d97e7098265297396868ebc383be8547e8ec9d974b6a65b5dc5147cdadef2e2ad96696e84e44f364c2ba18c8aabe21f99489957b2b5484bf3fb4fecaf5ddaa1d373e910059c978918a3d01b955de2adb475914bf2c2067":"edc433c381140dff929d9df9f62f4cb6":"404acfeeea342aeea8c8b7449af9e20ddf5b85dc7770d2144a4dd05959613d04d0cfece5a21cbb1a9175ddc9443ffacd2085332eb4c337a12a7bb294c95960e7c0bde4b8ab30a91e50267bbd0b8d2a4ed381409ea2e4c84f9a2070a793ce3c90ea8a4b140651b452674f85d5b76d0055df115608bf3a3c60996108023ebabe65":96:"71f818f1a2b789fabbda8ec1":"4729cb642304de928b9dca32bb3d7b7836dd3973bbccf3f013c8ff4b59eca56f5d34d1b8f030a7b581b2f8fdc1e22b76a4cbc10095559876736d318d6c96c5c64cbd9fbd1d8eb4df38a2d56640d67d490d03acc1cd32d3f377eb1907bbd600f21d740b578080ba9c6ddc7dc6c50cdcee41fec51499cb944713c0961fc64f5a70":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"59fe44c6e28d025b2ad05e6e867051ab":"20e66bae1215de9a87a0b878d39015d17e0d4542a1aaba2000cefbd5f892c26a410f55f0d7dc2f6b66690f2997032985e5516e068bfc6ec8a3669f566e280b0cefded519023b735ee3bcbfc5b6ce8203b727933a750f9bd515ec448c1f3a030aa0f40e607727a3239ebbe655d46b38a3d867e481ccf0fadbf0d59b665d2ed6b5":"eb0c30320029433f66d29b3fd5c6563b":"49b7418b87374b462d25309b1c06e3132a3c8f4a4fcf29fed58e0902509426be712639db21c076df7b83dcfcc2c2c8fcc88576f4622a4366eb42f84ebf760e3eb22b14f8b5ff83f06a6f04a924eaab05b912e126e80da22461abf7f1925fd72ebdf2aea335a044726e7c2ebbb2b8aeebab4f7de5e186b50f275b700794d895d8":96:"296c4cdaeb94beb2847dc53d":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c314264cee0e6db30ebe9b2f6d4991b2":"d436ff9abfb044a332c4e009b591719a67b12a5366da0a66edf19605c34daa37588e15dd3da0d1a097215e469439de79cca74e04cd4904e5b4a6cb4e0ea54e6ba4e624ed6bd48be32d1ef68ffea1639a14e91a5914c2346ea526df95cbd4ad1b8ee842da210b35b6315c3075ecc267d51643c4b39202d0ad793cbb0045ebdc19":"4cd4431bb6dea8eb18ae74e4c35a6698":"0eeafbfd04f9a0ea18e5bdc688c7df27183f346187e9574b61222006f2b3e12e8d9d9bf1f0f15949ee1a7ee8e5c80ee903b8ba2860e15ccb999929f280200b159c2adca481748d0632a7b40601c45055f8cb5126148e6cbab2c76f543537ab54eb276188343cea3c4ab0d7b65b8754e55cfe3f6a5c41b6ea3c08b81fcecc968a":96:"fda18d2f795d900f057fe872":"cb9e0fb0ac13ca730b79e34745584b362d0716c344e4de90d8352b21117471ba12c97f193150b33774baee5e4a0f11b10428eaf0106c958e16aa46c5f6f3d99eed93d1b9ba3957bed05a8b9cc8c5511cf813a66dc7d773cb735b0523d8d6b0b80639b031ddc375f714c6dd50055320cd7ed44a471c8d5645c938a9005d0b5050":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"26072018bd0bda524b5beb66a622c63e":"91c524b359dae3bc49117eebfa610672af1e7754054607317d4c417e7b1a68453f72d355468f825aeb7fde044b20049aed196ec6646cce1eeeccf06cb394286272b573220cdb846613ebc4683442dccc7a19ec86ef1ec971c115726584ae1f4008f94e47d1290d8b6b7a932cfe07165fd2b94e8f96d15f73bf72939c73f4bd11":"c783d6d3b8392160e3b68038b43cf1f4":"8ae7c809a9dc40a6732a7384e3c64abb359c1b09dcb752e5a6b584873e3890230c6fc572b9ad24d849766f849c73f060fc48f664c1af9e6707e223691b77e170966ed164e0cc25ede3fbc3541c480f75b71e7be88fe730d8b361ea2733c6f37e6a59621de6004e020894b51dfb525973d641efe8d5fd9077a0bbc9dc7933a5de":64:"edffe55c60235556":"FAIL":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"201751d3da98bd39ff4e5990a56cfea7":"2965af0bde3565a00e61cebbfe0b51b5b5ee98dbbfff7b1b5bf61da5ba537e6f4cf5fa07d2b20e518232c4961e6bc3ae247b797429da5d7eee2fc675b07066ac2e670261c6e9a91d920c7076101d86d5ef422b58e74bdc1e0b1d58298d3ee0f510ee3a3f63a3bbc24a55be556e465c20525dd100e33815c2a128ac89574884c1":"6172468634bf4e5dda96f67d433062d7":"ae2d770f40706e1eaa36e087b0093ec11ed58afbde4695794745e7523be0a1e4e54daade393f68ba770956d1cfb267b083431851d713249ffe4b61227f1784769ce8c9127f54271526d54181513aca69dc013b2dfb4a5277f4798b1ff674bca79b3dec4a7a27fcf2905ae0ce03f727c315662cd906e57aa557d1023cce2acd84":64:"66c247e5ad4e1d6a":"efd064d4b4ef4c37b48ddf2fa6f5facc5e9cc4c3255b23a1e3765fabb5a339fa0eda754a5381b72989fc1323ff9a6bbaecd904eb4835e5a511b922927574673061ed8de23299ea1456054e7ebb62869878c34fb95e48c8385b5ebceecb962654cf1586b3f54e7887ce31850363e9a22be9e6fbc22e694db81aa055490495dbf2":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3bc0dcb5261a641a08e6cb00d23e4deb":"d533ad89a1a578db330c01b4e04d08238b020e36aebe87cf2b0bf0b01f1ce4197be8b0596e475a95946918152e8b334ba89f60486c31f0bd8773ca4ff1319fe92197088b131e728d64405441c4fb5466641f0b8682e6cb371f8a8936140b16677f6def8b3dd9cbf47a73f553f1dca4320ad76f387e92f910f9434543f0df0626":"16fa19f69fceed9e97173207158755a5":"92ddd3b98f08fc8538f6106f6434a1efa0a7441cc7f6fd0841103c2e4dd181ea0c9a4811b3cb1bad1986a44d8addabc02dd6980daf7d60405b38dadc836bb1d0620ceab84e0134aca7c30f9f9490436b27acfd7052f9d7f0379b8e7116571017add46b9976f4b41431d47bae6f5f34dc42410793bc26c84bfe84fb53ae138c85":64:"f5289e1204ace3b2":"be0c30deeffbe51706247928132002b24d29272eee6b9d618483868e67280236632fa1ae06f3ef793f67bd01b1b01f70a827367c1cd28f778910457c7cbd977dfefff1f84a522247e19b2fd01fa22ce67cef9503d45c80a5084741f04108f2462b7cdd06a8f1f044fea2b05e920bcc061fbc6910175d732f45102a63c76ae48c":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"239c15492d6deec979e79236baca4635":"d64886ce5f5b4adb7fe8f95904bc1461749c931655b02819ffdd0ae31bad4175125aa68962f8e36ec834a7d53a191a74c937e81ec93ad9ce0d3b286d3c11ff1733c0b7780130768c120b1833933561cf07399ca49b912370ae34f0e49b9c8cb9920eddc6816ab2ae261c6d7f70058a9b83a494026f249e58c4c613eefafe6974":"916b8b5417578fa83d2e9e9b8e2e7f6b":"b39eb732bc296c555cc9f00cf4caaf37d012329f344a6b74a873baf0d8dde9631f5e57b45b957d6aec0f7978e573dd78b43d459b77756037cd64d10d49966eb3a2a08d0f4d5e4f5dcb8713f4e4756acdf9925c5fc6120c477f6dffc59b0b47a3d5efd32b8c9052b321bb9b5129e5c6a095d8de563601b34608456f58d7221f2d":32:"fc08cbbe":"95c169721ea007c3f292e4ec7562a426d9baa7d374fd82e1e48d1eaca93d891d5ffa9acf5e3bd82e713ac627141e26a8b654920baffab948401cc3c390d6eea9d7b78c4fcb080b0aa9222e4d51bf201ccfd9328995831435e065d92ad37ee41c7c4366cc1efe15c07fc0470608866aeea96997772ecf926934c5d02efe05f250":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"db68a96e216b0dd9945f14b878487e03":"5634196a32d4cbfa7a2f874a1e0f86287d2942090e0cc6a82bd5caf40136a27ddf524a17713ce4af04ca6cb640a7205cce4ac9cb2d0ab380d533e1e968089ea5740c0fcbfa51f2424008e0b89dc7b3396b224cfaed53b3ac0604879983d3e6e6d36053de4866f52976890f72b8f4b9505e4ebdd04c0497048c3ce19336133ea4":"8a1a72e7bb740ec37ea4619c3007f8ae":"1b4f37190a59a4fff41d348798d1829031204fd7ac2a1be7b5ea385567e95e2ace25bf9e324488dd3ab8ce7f29d4c9a4f4b1a8a97f774871ee825e2c17700128d3c55908d3b684a1f550fdb8b38149ff759c21debdd54e49d64d3e8aac803dfd81600464ed484749bb993f89d4224b3d7d55c756b454466ff9fd609019ed5e83":32:"9251d3e3":"0c6bb3ee5de5cbb4b39d85d509bcacb3dda63fa50897936531339882962e8dc54c285c8944768d12096d4a3c2b42ffa92603cee2da9b435ec52908fca6d38ed74f898fe0ffa761f96038ff7dfeccc65bb841c3457b8de1e97d9bee82e2911602ee2dc555b33a227424dea86d610d37c447776295b412b412903ad2cede5170b6":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"659b9e729d12f68b73fdc2f7260ab114":"fd0732a38224c3f16f58de3a7f333da2ecdb6eec92b469544a891966dd4f8fb64a711a793f1ef6a90e49765eacaccdd8cc438c2b57c51902d27a82ee4f24925a864a9513a74e734ddbf77204a99a3c0060fcfbaccae48fe509bc95c3d6e1b1592889c489801265715e6e4355a45357ce467c1caa2f1c3071bd3a9168a7d223e3":"459df18e2dfbd66d6ad04978432a6d97":"ee0b0b52a729c45b899cc924f46eb1908e55aaaeeaa0c4cdaacf57948a7993a6debd7b6cd7aa426dc3b3b6f56522ba3d5700a820b1697b8170bad9ca7caf1050f13d54fb1ddeb111086cb650e1c5f4a14b6a927205a83bf49f357576fd0f884a83b068154352076a6e36a5369436d2c8351f3e6bfec65b4816e3eb3f144ed7f9":32:"8e5a6a79":"FAIL":0 - -AES-GCM Selftest -depends_on:MBEDTLS_AES_C -gcm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_en.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_en.data deleted file mode 100644 index d8bee9d561..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes128_en.data +++ /dev/null @@ -1,675 +0,0 @@ -AES-GCM NIST Validation (AES-128,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1014f74310d1718d1cc8f65f033aaf83":"":"6bb54c9fd83c12f5ba76cc83f7650d2c":"":"":128:"0b6b57db309eff920c8133b8691e0cac":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d874a25f2269e352ccdd83cc2d4e45b7":"":"9717abb9ed114f2760a067279c3821e3":"":"":128:"0e09e53e5fe8d818c5397c51173eda97":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7dab77e23b901c926454f29677eb62d4":"":"8aaec11c4a0f053d7f40badd31a63e27":"":"":128:"cec2e3230d8b762acee527e184e4c0db":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2397f163a0cb50b0e8c85f909b96adc1":"":"97a631f5f6fc928ffce32ee2c92f5e50":"":"":120:"3b74cca7bcdc07c8f8d4818de714f2":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a7adc0d3aacef42397bbca79dd65dbdf":"":"c6d3114c1429e37314683081d484c87c":"":"":120:"d88141d27fe1748919845cfa5934bc":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"10171805d7f7a6d87b64bda57474d7fc":"":"fad65b50c1007c4b0c83c7a6720cacb8":"":"":120:"c3d3f240d3f3da317eae42a238bcc1":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8aaa0c85d214c6c9e9e260e62f695827":"":"84e25c916f38dd6fdb732c0d6d8f86bb":"":"":112:"a774815a2a8432ca891ef4003125":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"def8b6a58b8e582e57700bab4f2a4109":"":"3615439e9fb777439eb814256c894fb2":"":"":112:"537be9c88d3a46845e6cf5f91e11":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5894231d743f79638687c070b60beee1":"":"e34cd13b897d1c9b8011a0e63950c099":"":"":112:"d582c4bc083a8cf1af4d5c2c9b11":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6b25f9cbdc3bcd27fd245a1c411594bc":"":"a6526f8c803b69dd5f59feca1cff78e2":"":"":104:"c7e19e08a09a9c1fa698202890":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b3235422897b6459798a97ddd709db3d":"":"96679e9362f919217d5e64068969d958":"":"":104:"44ed41bda0eb0958d407b7b787":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f65bc795434efba3c5399ed3c99ff045":"":"2e727c19a89cba6f9c04d990245fceed":"":"":104:"64830ed7f772e898800fc9ae2a":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c6c66d50f2f76c4e911b3b17fcdcba1d":"":"77b42158a4ef5dc33039d33631bb0161":"":"":96:"1bce3ba33f73e750ab284d78":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"13558db9b7441c585d381ffc16b32517":"":"addf5dbe0975c5ad321e14dd4bdc2ad2":"":"":96:"f413c3bf125ce5317cd1c6bd":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"74638628b1361c2954ce0ac5456a1155":"":"c5861507c879e6864d7cb1f77cc55cc6":"":"":96:"8a514fdc7835711e4f458199":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7815d22c5c081df9ac2114aaa2c0cbf9":"":"822f83cd9f249dfc204b5957f0b0deab":"":"":64:"aa1f69f5d3bb79e5":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1a847a47823cb9c298e4107c6aaff95c":"":"39348f80c6bc489f9315be7a6fcbb96f":"":"":64:"c3b3f31e56cf4895":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"16e67ea248ea6db08af1d810cb10574e":"":"50386e2075eb15ca3f3e6db6bff01969":"":"":64:"3d4f3b8526a376ae":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"26a8301636ba93e7f56309143f184241":"":"c7e32b1d312971bdc344aefaf45461bc":"":"":32:"25f1b41c":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"130a07c467067148da2790f90d73ff32":"":"800b81c9d2ff3a8e15690ffb4117e211":"":"":32:"abcc8d71":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ccfaae59c3196b8c403716424ea601f5":"":"f9b059de0efa4e3f364763d63d098410":"":"":32:"8933444f":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b5beefbdd23360f2dd1e6e3c1ddbfebf":"":"81a8494f85be635d71e5663789162494":"f9ebf242b616a42e2057ede3b56b4c27349fed148817a710654de75d1cfc5f6304709b46ef1e2ccb42f877c50f484f8a8c6b0a25cff61d9537c3fd0c69bbc6ef21cbec8986cbc9b6e87963b8d9db91b7134afe69d3d9dec3a76b6c645f9c5528968f27396cc9e989d589369c90bbfefb249e3fa416451bc3d6592cc5feefbd76":"":128:"159a642185e0756d46f1db57af975fa3":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c465aa8fe5d534c912e654f5aaed5857":"":"5c155f7194b0d0a17b9a0c234d609443":"a3f8d705b233b574399f72350b256cb4893e130688913ce3def8e44687688c0352ff987aea35dc53bc95cdb9cdcc6e6eb280265d9a1af38d526392ab63c9b043c1b1b43e18321e84eb7e08884f2463c32b55eb5859fb10918595a724a61cfdf935e4f96d0721612720d46a946487b525779f6ce0abf04fc5608351119b7427d2":"":128:"9595a6d879cd7a949fa08e95d2b76c69":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"744b9e1692d8974d7dec349ebd7fe1e8":"":"62ad4b09fd554e0d6b3937839e693e5b":"6f9978f7078f0030c45caf49128ff72943a208a2398d08d132239f3ab5c184708e4222ec9ccde69dc86d1700c2fe0af939454bbb3962327158557860b6fa492ab8201df262a6209705c7e3129419bce8b827320893c1579ca05b32c81b3963b849428f71fe7528e710557a272117199163a35ebfbaba78f7676f7e566b16311a":"":128:"634f6fe9625be8b1af9f46bcc0fa3162":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"097c059535037c6b358dbb5a68b5f2b1":"":"00caedfa078c27e3d9551e3fb8d98d77":"6c4bde11129a959fcd6a482cb19f5f1c582c042b314f7997b0450242f9e669dc1cbb0a3b7a185bf8b035267e6f03206268008e2b97864d44d6a9c6b1b4b067d623c4b4e9c608042ea9120aed3bee80886352683891496d8980e40b8480c98c2fe08f945aa1ef6007c65220319dd8678184ab54e81083b746ec6441e87a568e0c":"":120:"5075ef45c6326726264703f72badde":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d25db5eca46c16490294423ca0c35660":"":"6f37f15d6c7ea816278ab977c29fa45e":"bd76fd431cea72a288e5d7289c651c93b5f429a54f85249021d6b595eb9ce26e18914a381a6b0299acc3725431b352670f206b731be718a598ec123dce0a2c5ac0aa4641b092e704da9f967b909ca55c2722298365a50dcb5b5ec03a1d0cbb67b8de1e8b06e724af91137e0d98e7dc1e8253887da453cdcbd2eca03deacaabb8":"":120:"00510851e9682213d4124d5517ebaf":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b3c6258a726aff94a7bcc41646c68157":"":"7f5b3315afe5167a7e9061ab8b005588":"0ef3384862c7e00c2912e7fde91345dc3134b5448e6838f41135ba9199c03a7f208887e467563b39a6c1316540c1401e8ff148386c50fcf15724a65d3210b17832d63cdce76bd2b458348332b0b542122a57e381475a59440f280db6e1f4b8d0babfd47e3db11a9ef89cba5f334f0e8e72be30afb2b1ef2df8eb7f8d3da033c4":"":120:"180489039ccf4a86c5f6349fc2235b":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"73cd0a1e2b6e12fbaa7cbace77d5119c":"":"d897681764bcc3b62c26b4aaf407cefa":"8c773e14a906c7deae362d1bf3d7e54c6be4c74c691b7f2d248693b2619219fba6eb5bc45f77af1cf7c05d3dd463158f884fe82290d145135889fd851b86ee282aa20bbdf6af78c7f9db6128b8b99e7f9b270fd222efa18f7aca6932a1024efb72113e812b3f9d2d4ccc7c85f5898ddacccbf1b441cd74097740dd922b57bade":"":112:"d8811a8990191f1e5bd15be84995":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c1dfddafe076d0ceebb0f37bb25bc0b1":"":"29c56db10cea802c19fb6230227ab2bf":"287b73cdc62ce058cdceff8e9af7afc321716f69da9eef60c2de93630ba7d0ed0a9d303cd15521a2647159b8478593f3dd3f5b7c52081e5154e55ccbff371d7e5dfc2d05e14d666a01ec2cc6028aacadfd78dfc73bf639fc4dfa0a0c46415902bbda2443620fa5e0ce4fccf1b8591e3a548f95755102a8438300753ea5f61b9f":"":112:"309fedad1f3b81e51d69e4162e6f":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2c4087ccd28ceda147d2fcfc18579b1e":"":"9cbdd67c79ab46bcbcfa96fa2c3d7e87":"35088d18dff0a9d3929ce087668aae1d364b37a97102f3f43e11950e6ec8296d0c99b00cd1c5dff53d3a38475e7da7b9ee4ce0c6388a95d3f8b036414e4b79cd02b5468cbb277f930e7c92432a609db1effe65f60f1174b58f713e199491f9e0c29ba1f2e43306775d18c1136274af61488a2f932e95eceadfe3fe4b854fe899":"":112:"b7e83207eb313b3ceb2360bc8d4f":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bb66584c8b18f44c11f3bd7180b9b11d":"":"39c82aee03ce0862ff99f8812cdbdcf0":"45ec858e0a5c6d81144ba893e0002818a70e9a19002a5471993077241b3fcfb4fd984f2450803293882d1c7ecb654e611578fe7d258f9a2ca3b5f0c0f0d0ec4828bdeb9299914ff2ac4cc997cf54fa908afdb3eae9f91d67c4637e1f9eb1eae2b3f482ddd5467668bc368b96bbbfc33b9ae2658e4ca43fcf4b66ba2a079d65f1":"":104:"24332fd35a83b1dfb75969819b":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7b2a230c8978d4e38fa5096ddc19d6f5":"":"cd25e744a78af858e825e1fd070324ee":"628baac336862573cee158cd3935c34df3055dadc9c1695e9ea18724f6457f0d1833aab30b85a99e0793e56000de5d6d5cb2327a4cc8bec40cd198459e7b93617713e63bbd15381a066bc44a69c9ad3dfb1984f8b33a9429eda3068d3ac5fbbaaee2b952a486e58d674ffca641d9ec1d102600af11641fd5fff725204e6c34a8":"":104:"68d49d495ff092ca8e5a2c16cb":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"73aa576e1dfad2c993afcc088bd8d62b":"":"712e665a0a83e8ecad97e92afeb35706":"314e5fee776e9d5d2a1fb64ceb78e2c9a560a34724e30da860b5588fe63d50838cb480ff8ac61d7958b470b1bfd4c84799af6cb74c4a331b198204a251e731f7d785b966da595b745d01769623492c18b9dd8bd3c75249effd2032658c715906a71dbbed847027ea75d647f9803296a41906e0915250854597a163035a8d3f45":"":104:"a41f5c9c7de2694c75856460d4":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"83f7631c4d4c466c9246cbc48e2dde6f":"":"f5d6c8c252cb687a931c38f58f74943c":"1f35e94a35d0f424bf690a15038126a41502593612efe6333cf94ea0565ca6acdefae8d74dae62df95e9261c6596c3397220e044c5b08cf39cccb27315d9b795da321204910274a93436bc0573fdba04ae6bb14c6ca955cf8b9e193a12e05796d7f4b397507614dabc457f1cd3ce19e439b6e62703f2189372938b29b7a542b9":"":96:"bb85dbd858ab7b752da7e53c":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"784e023b2d4c978151d05ee71533c56c":"":"f16d041b9f0f454db9985c8558ef8a61":"91f6e108c294640c7bc65d102d3d25a7bfbbe114acec9b495636689afd65fff794837946602ef04de7d4304a81809e0f7ddc45c476c29fd5286fcf4dd1ba76ed3ce88abdb51cd21e7aaeecb13238ac031da87ab96b2a13157278bf669d0efae28852ec3585d520d54502881322f7977d03954e17e7c0c0d8f762e34f59ca141e":"":96:"59699c639d67be6a6d7c9789":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d3a2ec66e4a72cb3540e87f4e67c7e58":"":"07a9cf9f44b07e3067d60e276322e9fb":"d7e722b82e8607a64fbfeefc7887009298f06a637fe937277e3a76e8addaeeb460ba0743912c07b500b4b51e9fec2b7eddf691d155baf689f75968160c19a8330e254220142ae843bf0687aabeb74ab607227b0a7539ec3cfea72a5c35f236623af78beffaee6e7b1adc2895732ffedb3f8520710f04eb9c2ce9b2cae215ed5c":"":96:"f29aec72368bfcfa9ae815fd":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"83f382a90146544ef4871bde891aed22":"":"c6f664f5ccfd1aaefb60f7fa3b642302":"656a2f221a1339d8f5c26393a08fa31859f626eec9a68afb6ee30e5b6859d1cbb5ed7dea6cbc4a5d537d70227d0608185df71a0252fa313be4d804567c162b743814f8b8306155931fdecf13822a524868b99a27fd2ff8f98c16edccd64520e2dce1ad645fd5255c7c436d9b876f592ef468397b00857ba948edf21215d63d99":"":64:"09df79dd8b476f69":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"64334f10a62c26fef79d9024d4ba7c5f":"":"7b85251554d4f0ff89980cf3568c5caa":"dab2892262a1832a473cd3481acbd3d1820f14361c275514ec693b40f2170ea5ff82c4f7e95a7c783ea52c43a0a399c37b31319a122fd1a722e6631efa33f8bfb6dc193986580f0344d28842a3a4a5ca6880552557f3915a65501f6ee0c1b68a4c9040f0fac381cbccb6a6e9bca23b99f2ef1abbca71c69aa27af2db176bf37d":"":64:"3e8406900a4c28bc":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1c98ca4971c3a6333c18b88addf13368":"":"7f617f08e826a3c61882c3e00c203d4b":"ab1531fce0f279d21091c3334bd20afa55c7155bfc275330ed45f91cfc953771cbde2582f4be279918ac8b9ae07cb3b2efd14292e094891d4841be329678ad58d714fc8ce4bffe51f539f4240c14ba883b95cdc32cf4a9fd6ba4ffeafa0d6718989c46483c96cfca3fe91000f9f923d7f96725e966de068b5da65546fe38f70e":"":64:"58cc756d3bf9b6f9":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"247d3abeb807bde959e68b40a3750045":"":"3f5390cd7921fcb42c59f0db05a8a62f":"81abf375da7157a1a56068d0918037fecb7296d9b1771c54ae6030abda4b9d76feff818de81747980b2c1b005e36b3be36afbf1092edef6fd875d2903d73612addf206a6ae65886421059c70990a6ee33197f92bed649901fed62fdd20c30d81baf6090f50d9f59290528e58a0b7412ace0a293369f2b4c8d72c2fb0e1c432f5":"":32:"37bb4857":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"622be8cd3c757de00fbb7ab4563ce14f":"":"16c53a843b1549716d7c06b141861862":"a15d101580d549f2401bf0f36be0f83724875205c9109d2d69d2609cbf67504b918f0859303192b4075f952454f3e7152f898f997b36afc0356712fc08db3343054b20e88ad1274e019bf8fcc3c921d3bc8f9c1d1d24adc61f6033a83ef46a84762304f1903553748b13b1647c96eb8702ebb41ccea4d9cfebcb177c453277f2":"":32:"35778596":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8a660aa0191f9816261387d5aeb262f6":"":"c720cb31e841480da5ba656e9b93f066":"d979affe395bd048db26d26908a1c2a435905299086cc55bb65ef782f5aed99c41743c3ae252ea087f5453bdc605abd784b337b60960946358da2218b076826659a1fafa59124a00a3424fce0d00c38eea85cfb3d1e01bcb09d9870d5b3fe728f394e0e512f5aa849d0550d45a7cc384f1e4c6b2e138efbc8f586b5b5ed09212":"":32:"cf7944b1":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ce0f8cfe9d64c4f4c045d11b97c2d918":"dfff250d380f363880963b42d6913c1ba11e8edf7c4ab8b76d79ccbaac628f548ee542f48728a9a2620a0d69339c8291e8d398440d740e310908cdee7c273cc91275ce7271ba12f69237998b07b789b3993aaac8dc4ec1914432a30f5172f79ea0539bd1f70b36d437e5170bc63039a5280816c05e1e41760b58e35696cebd55":"ad4c3627a494fc628316dc03faf81db8":"":"0de73d9702d9357c9e8619b7944e40732ac2f4dd3f1b42d8d7f36acb1f1497990d0ec3d626082cdb1384ec72a4c1d98955ba2a3aae6d81b24e9ce533eb5ede7210ae4a06d43f750138b8914d754d43bce416fee799cc4dd03949acedc34def7d6bde6ba41a4cf03d209689a3ad181f1b6dcf76ca25c87eb1c7459cc9f95ddc57":128:"5f6a3620e59fe8977286f502d0da7517":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"81371acd5553fdadc6af96fdeee4c64d":"940806fd5ddcab9937b4ba875e46bb4b7e9688d616d17fd24646f1ef1457819f55887f53bd70039bb83b4d346aabe805288ab7a5756874bdc2b3d4894217d3a036da5e9e162fa2d9819ceb561ecf817efc9493b9a60796f6dc5e717ac99bc4ba298eee4f3cd56bbc07dde970d4f07bbfa1f5fe18c29a3927abe11369091df28f":"3262501ed230bc4f5a190ab050e1bcee":"":"ffeb1907bdbfea877890a6e972a533ae661a903a257b3b912c7c768cc988e05afd71a9e6117d90d1e1b54f55de9b10cbce7a109452567483cc8d6a68b9e56da10802630591fdd8d55f9e172f0f58a7e0c56a73a1ae3c3062f0997b364eb0885d48e039b2ba1bd14dbb9c74a41cbd4b52564e470d1a8038d15207a7650bd3f1d6":128:"227d422f8797b58aa6a189658b770da9":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ef5295e9ae74729e222df6dab251158d":"59372848432f86f5740500391d2e5d5fbe1f80ea876a0ecb9a5b298d9ea7cdc28620aeb2fda015345ae476f265351b2c6b6fcd66bc8aae4dc8a95c1350cda204da3d2d2fc5e6e142dc448296d5df0cc349d1eba2fa98d2f468662616274a147fbe07927440afa3967ac09a03a8de0b03f3036bde5e272e3c4c5ff169dd730238":"194d08fcc3c08ab96fa724c381274d3f":"":"fdceeffdc8390bde6b910544db61db2f345eba0664f78f65d94b90e3e2a5251be374b3c5d881460cfff3549a01f84eb9d54087306a20f5156cd555e46bd2173386c90ea47983320fcbf24e09a05f2ec4b2577287d05e050b55b3002b753de49abef895ee97015810c06d09212b0c09e4910c64ac3981795a1e360197740360fd":128:"e94603dbd8af99ab1e14c602a38a0328":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"26db035f2ddd9f5672c6f6af156838d7":"92c315936847649756b0b1bb4a3453e6e6da866f8088d96da44412d9f47a22dda0cd817287ba42163be59a69f73963059139fb3ba44bc5ebfd95b6742546dfb4fe95608dca71911d1347be68179d99c9ebf7ee1d56b17195f8794f3a658d7cad2317ed1d4bc246cd4530e17147e9ecdf41091a411a98bb6047eee8b4f1e4a9ef":"3686d49bb8c7bd15546d453fdf30e1f3":"":"1ac98e9ccfe63a2f12a011e514f446c4c0e22dd93613b1b9b8f56d148be8a24e3682dfc1cde2b69e72d200b516a99e7466dae8cc678c6117dc14b2364cd2b952aed59722056d7dae4cfdb7d9c4f716aef2aa91a4f161d01c98d92d974247bb972de0557e175177ce34361be40c30ab9ac46240016e5ad350c3b7232c5920e051":120:"b744316880b0df3d4f90c3ffa44144":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d5c63757197a132cbb33351fd2d81a46":"e970b62ce5f06b15f8448aa2a095c2b3c8adf535e110e7f374411ed51fa19f9c4926045f796b7cd8a942b6a19811b7aae59fce37e50d6ca5a4a57bfb041a5b51c1ee82b54d03be22d9dc2bb9a2e708503b85e2479b0425a033ae825b4f232ca373e280e3cc97cf0d79397a81fb30d3b41cdaa3e788470cde86734e10a58b1e3a":"a669a4d2f841f9a0b9ede1fb61fee911":"":"522ba7220d0d4bea7ab9ca74ad8fa96ba337f7aa749cd26186499081ba325df6d6b90a81bd1c7adda0cd1ca065894f14a074ec13eff117b2a00042038aea55850056a63adf04f58fcd7269085f5ad1ef17ce7b6c40804127f14747a2ad93ec31fada83663af025a3b90c20a4ae415b1c960094e5fd57db0d93a81edcce64f72d":120:"7bfce3c8e513a89a5ee1480db9441f":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f380d3bf0d55a1cd56b7e78359eb6c66":"c0e977e91c1c50ee78d4a56c527b2d31a1a14f261aa77e52d910f8f230de4908b5cc6943e28b8c6e7ac61eebe270dcfde48d140ec13792371932e545b6ef4b52d1dfdf54c60ff892b74095a3f4a2b9000acd2cac04666a2305343b8c09f89dcc0c25bbe2a39b14624118df025962edec3dfc58d36fcac531b291ec45b5159e22":"ba3300f3a01e07dde1708343f01304d4":"":"752f09b518616a91a802cf181532c7ec65b54c59c1bab3860f0ad19971a9e5bc8843524c5ffac827067b462ebb328e2eff4dd931728de882055129997204e78717becd66e1f6c9e8a273c4251896343604ac289eb1880207a8ea012626e18e69ad7573ef73071b8e2fb22c75c7fc7bf22382d55a5d709c15e4e8ff14e2bf81e4":120:"fbf8818aee5c71ebfd19b0bcd96a7a":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"47c807cd1cf181040a4e3b1d94659db8":"c4a52c1f1f0d32c21fb85fba21d1b358b332efa066c7893c566b2e859efdde99fc67bb6167cdb0485a8ed53dd1068d90bc990f360b044039791be6048ba0ee4ce1090c9fce602af59d69069f5bff8b6219aaaed5a9b1bfc8c5b7250c5a6cfe86586fa8064124d551da38d429a17696eb1a7a0341c363f010eafd26683eecdf82":"9963a3fb156beacd6dd88c15e83929df":"":"e784ab006de8a52de1d04bc2c680d847c5decdd777cb2475ad4ab1dc529882d9e51cff5451b14ea5ff9a9bab5c5474e8a331d79564acdb2ac8159e0f46e9019bf80650c481fdaf1680cadcb8c5de9f924760b376ce5736cc4970cb8715b5999f577436283a4c21469306840af36d1e069616157d1b9ce75de3adb13d201cdf1b":112:"51e8ce23f415a39be5991a7a925b":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a0b033d14fe902aa0892b0e87f966c41":"1cc751d890cd102486d81c618c23fa335067ac324ef11f7eddc937853db6e16d0f73727725a5a5bd580705416ecd97e368464ed0aea923ffb71c23c37f9cf9c8bd81cdbdc3d0ac34a875db3167ec1d519004d4fa4bba041af67af1ed3d4e09c32b3e8e10abd91f46836cec74b1f9c5b06c05f3b18caa78e7ff185db212b52ce0":"ad4dee18e6c19433ad52021164f8afb7":"":"a30044582dacf57332b04402e993831df0a4c1364a83c9bce7353979fb444cd1b3fe747e2c933457ff21f39e943a38a85457bfe99dc09af886734d6e4218fc65138055ad8eb5d3044f4eed658e312b6165199e682ffa226558dc4b516f8d519f149bb5a40d2bb7d59ece9e5fd05358c89e635792ad20c73c174719f9b28c7358":112:"6a18a4f880ce9e6796e1086ed05b":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c4030ca84f132bfabaf660e036f56377":"a8fe98e2b4880d12c99c9d5193b3537b3fbc5165cc1327395174d989be5741f867332271cdc52ddb295ddbeba33698073054c6d2416fafaeb0a76aad870a6fb6097a29fba99f858d49418572c8e4dc0d074ca8af7727c773c8617495b1195d6b2687a2e37fad116dd721b60bcb5471d548c6dafe3ecdcf0c962e4659a61f4df3":"975df9c932a46d54d677af8a6c9c9cc3":"":"86b20fecebc4cf88a6a382d693117cd2a3c9eab747bf5df5f1d35e341d204d8fea6694b92552e347da676bc8d3353984e96472a509f5208ce100a2a9232478417947f85f10993c9d6939c8138bd6151aef8e2038536e8ba1ba84442e27586c1b642f9505455c738e9fd2c1b2527d1ecd3a2f6ed6e3869000ef68417ec99ff7a2":112:"3516909124c0c1f9c30453c90052":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6e210de363f170a7ccb1b9cec8d34737":"89853fa002985a45651f2a7db2b45b7e7a7d33ce6c438ec4533c7fa257e1a384130369a68184a807fd0d92a70d91d7ddc56e5c5172c872257230d7aeb9293d785b1b8835dcde753798caff4abcd8bbc5378cd505dcf904aa69902e4f38699be972099adffc8778bd844a9a03e6b58a721a73324d956f20f2ffd00d3491f72f42":"39fe20b051ba21319a745349d908c4bf":"":"ac9d74f8f405fd482287a4a7fa359caca095c0f1b46744f19c3c11e13b0c605b9857c8cc5a1754b95bcc658416f463bf8764f373205941885948259916eaabd964f2d6c2d784f928dc5eefe331f6c04b4862d4c8e966530de6bf533a10818de852de3af7f521b167cb4eb7141ba8ae8a17be1eb714fd26a474bbbbe870a659dc":104:"7a2dfc88ad34d889f5e344ee0e":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6bbfeda23ea644fb37666b05dc47f590":"a85ec4c2c160deda7e3de0ae449eea6ed1d24e2c8f3d5151f2ac0fd869f5a763981733b68f46c5197d76c26cce7ddc8afc6cdf4536d771cf3e9cef0098e270c5e1ff72cb0ad7f84abf44b726e0eae052d0c1553afc67c7289a43851a4d04c2856cc46b4039380436465a3b19deb56e41b859aecaf22b90578a23288d5f7d9b0e":"9d154f3cc2c5b0bdd77e86e351220960":"":"dbe575ea04b58429e68c733d99d7fb3a57e5604d6fc3baf17e0c6f981d78c070144702861316f892023515f20b697a8f3a40d821162dc9255d4775e7578285acf2cca67e902c060f80eaae29b9c011b6c110371409d914782e1e4115dc59439a2823507330852f10436b121538f22a3b619075610f1da87b6035138d78c75a79":104:"8698763c121bf3c2262ba87a40":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ce1407f666f2aa142ed4ef50eb2a4f64":"585fc1e86809247826f87424741f6ce2ce7c7228fb960803be643acd28332b2036715e2b639fe3f8de7e43e88bd8e65a6e2259391360aaf534ae7566cbd2b3961c874d08636fca117d4123b3063931d7a161d00220014339ae9f447f31b8a2d7d5466fb1ff2508397b5fa71f9b4cd278c541442a052ae4367889deaed4095127":"1225a2662d6652e3d4e9c5556bc54af4":"":"8bc13cc1cb52fbd15390cb5663ce3111c3fb943f8ed3c4f07b7aeb723649fccb90895999ec5dbdb69712d8e34ae3f325fefa49ecc7c074de8bb2ea01fa0554d7adbf49498f2f6e78aa0cd24620bab0f11bf9b2c73ad0eff780eb6c03ee9c4538952af754c566aba7c717d1ee6ac2f5ffe21dab9afd649cd65313ee686596fef0":104:"9a1f1137f9ed217815551657bf":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5ecea1da76d6df90fd0d4077ef631b17":"d87e9a0c6a9796d60ed78924f7a8c408d5b9fab03fc76790e74029f13358fcae0035bd971a400845f508c2c2cdc3949be498193afcca6d75f8d21521ac673bd41a936a133fb5ed61098f3cb89df5234c5ca5ad3dbbe488243d282412844df0d816c430de3280ab0680a2a5629dce53f94e8eb60b790f438a70fafb8a3ed78a1b":"7d7ae2ed1cfc972f60122dec79ff06fc":"":"1eb19da71857854420c0b171f1f0714972fe7090db125d509aff6d92e5192353187f0906e3e8187f73709d1a60e074af01e83d1306d582a82edbdbebc797a733d72e2d4208675ef98ea4eaaddae2292e336fcd3fa85cdc577f4b8d3f324f0c5cf3919701208d6978f83466a02ae6cc368f57e18b9ee16e04cf6024b0c7fbad33":96:"f74b3635ec3d755dc6defbd2":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6d6de51c30692d7863482cbbaa5ccbc3":"9f242c230ae44ad91cb0f4fe259684883968f3ca4f57a3e0cc4b03ab063a4eacdf63f9e7900a98073e345d1b497b985887e1ffb5fe7d88cefa57dd41076f2da55ce7ab0899bdc5799b23773f8f7a4dfbf1861cf4de377281fae9763dd4ea8dc7c0d632b874c86ac8e4c90339ec3f14cc51bf9241660ab828605cc602984a0f10":"c6c0fa3da95255af5f15706274fa54ee":"":"55e75daa3df3b13a33f784d5adacb2ff6861cacb297d5eaa61693985b6a0f82e9e0b3a28d10648191c6e62d6260d8a8bb471e6b37aca00dafdb2fb17454660f90c2849a9ad1733d7bc227d962b3cd86ab32d5b031eb2e717e4551cb23d448e06bac7b2a4cadb0886fde472d45de39eca2df474ba79eb58504318207325c81813":96:"8eb9086a53c41c6a67bad490":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"76b7f2307e9cf9221c8f3ff7105327f9":"bc076bfd1ff7a9fb043a371e5af7112bb0c9c442be44ca648567937bcc091c127f02ab70b81ce51b2f7a38954dca3d94b3716c6114f0ba349d6f87f5efd84506ed289dfe8a1277a5d1821c56f9f297cb647cdf36d308e6ad41c55d68a5baaa520d11d18f5ddea061c4b1b1ec162b2d5bcf7c7716235dd31eda3dc3094cb15b26":"3cdaf7932a953999a6ce5c3cbd0df7e8":"":"88c70d3cf5817f9fa669aadf731c0eb03c3d8e552f2dc763001ac94837353ab75b0c6553bb8ba2f83ef0556f73dae78f76bc22de9a9167d7be8e31da6e68b0f0bdf5566059901726b6f2890ac8745ed14f8898a937e7d3e4454246185124f65cebd278f8c11fb0de22da7248f33ef6bb82cb1c08259970714de39ea4114f85af":96:"6006fe48f74f30bc467c7c50":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bac83044f9d8fefcd24766644317c533":"a72daba9de96bc03b5cd7449c2e97c858385475127b9614e37c197225d5789535b69f9123993c89a4815c1b4393bfe23754ddc6c01fc44cd2009b5f886988dc70a8cebb12664fa4a692db89acb91de6a9eda48542b04459149f59537e703e3e89f6d683ebb797fce3874c819d08676d926bf2da2f83a22449b89e204b5ece58a":"1307cd0e6f9ba5570e9781fca9a4f577":"":"479cdb5f65b9baff52a96c75790e3b7e239125f94525068cd1d73a1b8475080f33451ec83789d7189f5ad6a9130e7aa4df10d71ecabb5ccd980d84d0fbfb342506edcf7298ccb310c0e297dd443ded77cf1d96fc49055534439f1af583217a5de36e4df036a3b640d0212658399b629193080d38aff0d4e8aecd6c8d8f48b44f":64:"ca192f8153aa5fb7":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"627776b20ce9bb070a88f1a13d484550":"1da4a24fb12538a724f62b277410d50e918bd6224d4a61df6fb7734300643198debea71686e018bcd8455c2041265d11f7f5dcec08c31fc94784404423bcf1dc8e615227d2b0840be123a1efb8201aaa15254a14a2d76a6ddf536701cb3379d3c6b1b0d689e5896186c88d4a2c53a70bb422ecc8e0a5c3b9f3d89ce40676e4f9":"57f3f9388ea1e2c1c73f60b7d711f6ea":"":"f8a06eea528dad12b11ead51763aa68ca062f9f6c1c1f740fb910974f7ad9d2ac87c16fb74d07c3bd3b45f2e26af417e00416bdfee7ed0b69274ead70a52201c1fc05937438855f5564ec3e824daa0c59da1aa6f6cb8a44ab5f73d661b219766b80656cd3ff1e2d6909c6ce91fb14931af8580e859e9d7642678c1c35d9435d4":64:"05b432826dd9b044":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8954e2c0a7ea80fe3c8e75246f75bdbd":"d77e11a837eff95c77dd56e9cd97f0ffcee0adcca4a2203d23ce74c804a75cef1bdd69b16228472a2395118dfce636b8916372d6a24106f9a168055c6d4b44264674ce3905b3b30f5108ebf939f3fa8f55c12e001b457b73669acd23c1dcabea05aaba34e2d0f66a4d1c9162764228ebc4d3974fdb38b1a61a207788c5deb878":"2b5f9420b3c583403d92d76a2dd681c3":"":"35b8a04d6557426def9915eb798312a7572e040a65990ce15a8a6e5acd6b419c3fa26828b6efd2f1f50f91f672fed0feaa09a6ca6b4844fac5d3db571db8bbce250086b8c89aa6fa07bdca8dd0e1fe76e0f5a821145bafa11f3a9b0b003ad09de73ad71849ac58f7fd50851aa0fbbed17d222a0a5607f9f75dd3b0d3fa45a135":64:"96511adc097838e6":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7d0f9109dd846c47527a429b98d53301":"506efc29c0f02910cc9f5b2e677bb811e366b9e4910c00b36e48e5d5b42718f3b6d1a08a2de9c6d4ce44fce00fb7e10cf89396a88bdb38dcb0dba69449195e19b72ff989666b366f03166dd47cf4c7bf72dba3048fa34329ba86bbbf32934a0992d72c463fffee94653379d23b8bb4dff03fd86cfc971a2f7cdb90589bbbcb28":"f58a5bb77f4488ee60dd85ca66fad59a":"":"2e2760c649f17c1b4ba92b1fc9b78d149a9fc831f0d0fe4125cbfc70d52047f32a7f25c716533d199af77ed05e259cc31d551187dbc2e7d9e853d5f65ab8a48840f22391072cbe29e8529cd11740f27d11513c68ad41f4acc6fb363428930fe3d7c0e698387594156e6cc789d432817c788480f3b31326fa5f034e51d2af8c44":32:"6ced7aac":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"034c805b5e83b59ad9d6a65ade3940a9":"efbec09f8189404f3dbe569d3bab9b8bfabde419fc80abb3b21a07a5fe42326d23d022406981abd558e94f4debf38f2c34c3c315cb1ae1d5f2d48eae1335b50af9dd05b60aee724edb7d4e12703d5ec8873c55e3a3d6d8d5e4daddd5240fa3ec2d1f32442ce32cde66dfac77ed213207dc4838ca9782beb9a98d6dc52838831b":"b0c19448b9f2a818fd21ba6489c34fb0":"":"a45ba5836011fc65882ba8b1d6bf7b08b17f26b9cd971eece86fbb6aac5cdfd42790a7c7390099b10dee98cb8e4bd8b3ccb3ca5d0b9d02f759431de640ad7f5dffb919a8aaa74695f94df8eff4c7cb242d643c55d6f9c8323006f3be595aa8cdbfb0d9260ad2473b244ca65a5df53d2edd69f47df608e22a68b05623150b5665":32:"43e20e94":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f3bad89e79691ae72f53964b928a09f3":"01913e4ef10226d80c5026ba9243fa41edaf5f5c232d17c034db4c0c8369f48d89a1d58b3b2dda496506c30457365bdd76710173a97022d647276a4a8ac73f0e9e211cfd7d64849409ef61cce618675eaffe88b3f14496e5eb013c0f8a122dbf16f2c675edf7f813abe9c56101e570e208e651fd956e710dc09f13ebd22b81ab":"aabf77116a75046e7ecc51a468aa21fe":"":"f7453670604ff6287ebdaa35705cf7553410452fdb1129a7fcae92565a4217b0d2927da21f3d1b2bd5ae9b7d4dcc1698fb97fc8b6622ddc04299fdebaba7f7090917776b86b2af4031fe04fa1b62987fa9ec78fbbc2badc3a31449be3a858ac7f277d331b77c0e9b12240bd98488a131dbd275b6a0ce9830ff7301d51921ba85":32:"15852690":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"839664bb6c352e64714254e4d590fb28":"752c7e877663d10f90e5c96cce2686f4aa846a12272a0aba399e860f2838827c7c718365e704084fbe1e68adb27ad18e993c800da2e05bcaf44b651944bde766e7b3ac22f068b525dd0b80b490b3498d7b7199f60faf69fee338087f7a752fb52147034de8922a3ed73b512d9c741f7bac1206e9b0871a970271f50688038ab7":"5482db71d85039076a541aaba287e7f7":"4d75a10ff29414c74d945da046ed45dc02783da28c1ee58b59cbc6f953dd09788b6d513f7366be523e6c2d877c36795942690ce9543050f7ab6f6f647d262360994f7f892e9f59941a8d440619fda8aa20350be14c13d7924c0451c1489da9a0cafd759c3798776245170ad88dbceb3cacde6ba122b656601ccb726e99d54115":"c7ee1c32f8bc0181b53ce57f116e863481db6f21666ba3fa19bd99ce83eee2d573388a0459dfede92e701982a9cc93d697f313062dbea9866526f1d720a128ab97452a35f458637116f7d9294ffc76079539061dfeff9642a049db53d89f2480a6d74a05ff25d46d7048cc16d43f7888b5aff9957b5dc828973afccff63bd42a":128:"63c8aa731a60076725cd5f9973eeadb5":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5f2af1b14ca9598c341785189ac6e085":"790bc975865f44e3a1534e978e90b064530321a2280a9172dc7f3451773b01d4a56c1857ad0474350b945e4f34cd677c22ca89445a564b47a8526d31d18160c35d2be1e89428c3593b53877cea0d88d85b2a7ed0552e39a0e96e35ae0384a5d7868243045dcbfc245a3eb3ff99f4dd86c0a314f68d1971e773caf9c168b0aa0b":"bbf23307ad2718398b2791c16f69cc45":"26b160695de2ba40afca6bd93f1c2895f92ca9108847a8ab71ad35cac9f9c9f537ef196c5d41b10e3777c9a02ad3c73cd299a85f60e5d02794c3be2643c3e63f105b94d32cb4e3eb131d3f487fa5d1de1a4ad80cad742704ed5c19a7cf4e55531fa0f4e40a4e3808fb4875b4b5feaf576c46a03013625f04331806149e0f6057":"52c373a15e1bf86edfb4242049f186029b458e156da500ce7a8fc7a5fd8a526191ac33e6b4b79b36fda160570e2b67d0402a09b03f46c9b17317a04a4b9fbe2ddcfc128bd0e01b0be3fe23e51b69c28bcf8725b8e4208aefb1cf34fe91a2bb6d5bef7b936bec624a8f38c9cd4ac51a0187635138d55da1fb1791adfbf8459d3f":128:"db3bbdf556c9c1be9b750a208fe55c37":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"02980dff205bfa5b18037486618e1fbd":"f037ae281e45c50c9fa875f0ec9eb43251d3ae1b6acde27cb5edda7a4e384f50301a68bb6f4caf426adb31457c5eeaa789edc84fd902cb82e00dccbebe272d90cf690ca82ee748885f02daf377970e985d55994fa668fc5e3e06763e6829059fe0c3eb67033b3f5223cd4bb654484c57370d2b856d7117e32ead3d179064315b":"27354e68a004b255a380d8480dc9b19e":"37eed8620136842938ee3c3c08311d1298d3fd3f0456c056e0851a75d844fe6c61aeb2191c024ffce38686c09ab456f0ec26bd76f935d747002af9b47648502713301d5632c2e0d599b95d5543ac1206170ee6c7b365729c4d04ea042f04363857f9b8ea34e54df89e98fef0df3e67eaf241ed7ebbc7d02931934c14bb7a71ad":"f8090d0a96fc99acb8f82bbbe58343fe227d3f43fceece5492036b51ac2fa6db4bf8c98bf28b40132b1ab46517d488b147e12ceb5e6b269bb476a648d8a1133d5e97d4f4fbdfa3866a04948851cfb664f3432de223f3333248a1affa671096708ce6e2c9b4f8e79d44c504ff3cd74e8dffd4ddff490bcba3abffbade0a4e209d":128:"b5762b41241cbee4557f4be6d14d55d4":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1fc9bcc5aee350f1ef160346b642cc20":"e0fb08cf7dc901bf698385a38e1a81acd4118f083e52aa52e1ded16ab1e840cc49fa1ead3292ce21096cc75c89dc3701102b0982fd3a6bfa55a7799e579aa7336edf365574a904bad924ec080b093a604994db4dcd8323d7d39c3c35750b0741b170481539d22551871d6a0e2ea17e4bebe8ce19ec3bc3bf4f6edae9cd7ab123":"910a81a5211ce0f542f1183c08ba96a7":"2dcf7492c4539d6abc3d259ba5970033ebc2e7ddfa1af8be11f81b459d7477f310be2171290bec2f2ae2cc51266f46e98c878dd2444afefdbdb73a417518f5fd4c116547bf442fa9a8cb2300c5ff563117b2641dcd65018081e62a7ce5c4d822563824e5eafea90cbceee788ed44e6c4f23fe8926603a15adfdb556f11a0be9a":"514d27f8413d7ed59d96c14e7e74b9f3d4518486876c469b369f8c5734145f4aa52506c8f832d4811e5f981caadedcf09875033c5b28a00f35605d773c7f9e1af7f0c795e3df1fa9b5a524f1f753836c1e2dc9edf1602d37ac120f3d8a5c093a5285dbe93957643a65f22995a2782bb455d23318f01bd18ae0d0813b01d233e5":120:"feb7a25a68b5f68000cf6245056a1f":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9cf329dc10bcebb484424c77eb785aa2":"92728a696b07704fb1deb648c5036a1c8602b4006fb2fd2d401c4b6692e252c7f66918078542cc0b1a97486964276d6e6c77bbb88a9fff0285aef70783d9f2be3b7b22f8a8c02771492150122fe022722bf64263f5d2406884108d8d608273bc02a9127fe4dbcb321ac44a7d2090cff7017d59d73ecf927b8b05968675a63ca0":"a430b979168f5df5ba21962d1bd6dd15":"4d94b7650297c66b43210c84e6e7b09385117ed8fb91adf643b2339f39a5d8dd0b0d75a793e2a669e42c5ddb0873714e01cb65da9eb73fd976a49ae9a4762bcbc06be5052f750d110a407764280b510da5fd0fdce969f86ea6bf52ad4fd9e2d81ec5cb84af0a1d406504a34c51c751daebb4421fe1994bf6db642e64bd471d9a":"c13dbfc60b34d75f8a84db1f6aa946dbfc19479d63900450389756cd1ada8f6d2d0776607f7053db6bfa6752c4b8456f0ace314ff3fd4890d6093a4a5d47dd8fbf902e3e3000f5e02ba93a00985f29ad651cb697cc061d8f3cc74e6d8d0743a1988947c9dc2305e2b7c5a78b29400d736acc238131700af38e72d8c98ba007eb":120:"82f1dd58425eb9821fcf67a6b35206":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cf43ff6a1ef35c37862ae3b87171a173":"a1e670b3fd62039cf29edb61b26555bcd0f9184be4593bf6b20ceab263bdc76cdef34992fe0ce4d43bd93bd979b78bb252c120fbaafe4947fc0ec05cce4358a5089a841c7476b0ebfca6476e690cb9ee0b73c6700aa82aa8f4050f2c98500052a2d3274b30b0be67549d756efd163c4369b6df0236d608bfbecd784467db2488":"6c56540b3a9595f3c43f5595ace926bc":"5c0bc6e44362299642f3756acf09878bb05549eb6cd6c4942d39fe586ceac228d2aa9c92f8393e5017e73ee41002e60aa8b993c48a7638ce2ae0ae0eaa536bd749b07a8672fc620a5110af61232b6a3d527b36c86637cc1fa92c84008465fd861920884d8a784e194ec52fcbb767a68ca6fabb64ab0a0d680963140d5cfd9421":"8ad36522e4ad47d4a54c5eae0a8b9ff4911aa5b9b13b88b00488a7b678f63cf85945b8d4998d1007e27529b56f50b9e3b373bb6fd861a990514743b9707d535b40d1bdbc3f58a63b8ca30dd7934ee98ec3325d80afaa37e38b4e82d8851166589027d91347727b314e02ed08a7846e29fcd0c764834d12429d9f568b312081f3":120:"f5bf21d5eadeebdef3104d39362b85":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a0ec7b0052541d9e9c091fb7fc481409":"5431d93278c35cfcd7ffa9ce2de5c6b922edffd5055a9eaa5b54cae088db007cf2d28efaf9edd1569341889073e87c0a88462d77016744be62132fd14a243ed6e30e12cd2f7d08a8daeec161691f3b27d4996df8745d74402ee208e4055615a8cb069d495cf5146226490ac615d7b17ab39fb4fdd098e4e7ee294d34c1312826":"00e440846db73a490573deaf3728c94f":"a3cfcb832e935eb5bc3812583b3a1b2e82920c07fda3668a35d939d8f11379bb606d39e6416b2ef336fffb15aec3f47a71e191f4ff6c56ff15913562619765b26ae094713d60bab6ab82bfc36edaaf8c7ce2cf5906554dcc5933acdb9cb42c1d24718efdc4a09256020b024b224cfe602772bd688c6c8f1041a46f7ec7d51208":"3b6de52f6e582d317f904ee768895bd4d0790912efcf27b58651d0eb7eb0b2f07222c6ffe9f7e127d98ccb132025b098a67dc0ec0083235e9f83af1ae1297df4319547cbcb745cebed36abc1f32a059a05ede6c00e0da097521ead901ad6a73be20018bda4c323faa135169e21581e5106ac20853642e9d6b17f1dd925c87281":112:"4365847fe0b7b7fbed325953df34":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f9ba053776afb01d15915e7f82a04f21":"fb59858421ffbf43d09415a77320cc9250df861e4414817e7b78cab918fa890ea0400d4237f7ebf522d97318ea79f9979a73970296827a1a9690a039e6c605a0a3efc0077156e1b15f14d88685833e09f6cd6f783d0f50579de7a30907b9d8efc4c650ec57dbf7b425ffaf9a900ec91087d470409da4d67cae7328c15a5db1fb":"df26b109244f5a808f3ea7137f2f49fa":"b21c8101ac96c41bad2925b9b6c863f54888f36e4995820ebd51f53e323e46f528d91f4318183be0282312ccde8da075fc2e82041cb41a79e9933012a4cb6e9f89717444bc734da3b7e40e903e58dd0f38bcb115684227ec533c09a93c89c2c2584bbac83a4648f82b4c9207f43b61e5ec470602076ed4731756c87d4e0e24af":"2c306fc60bff58308f2b9f08d52369e87119d7f6de2279fcdea0c46c901c8dc5b4f83578b17a00786014a17d3e380e1af4b9f32fa58b9ac763bdf86ff0c6084afe413a5dcb7617f94d76e59e370eae4829e69bcb70f10545b04ed5fd137e1159f3961b2c01089ebbe2f16a91c782d4f383fbd4d61b66138319b63d79ce9fdec3":112:"d6db5aa539a6e2e70885508d637d":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fbbc406a669b94374c7970f2ac10c91c":"a9f334d1ae7d2960f39da4f1df85830d27c0f13fa0bd23d607ace4cf58b359584120e7c90d3062b1b23b1a9e85a740c9063ff80423b5846257e4426c174e8cd77a3dbcfe12970ebddaaa00a8ffb554b2a80decc81f9917f5a1369e8bf7288ed868457993f480d8aff0b92b3db2fda233e32fabec1a4514715364d4f70f98d62c":"46152f5a68c03dbe2f28e69f5b52e2fc":"1052f8b2d3e11da53ba9efe02ce985098d171dff9b98cbc2f6755fd88214ddb8660225a63a1c8bcaf43ff3930e239824ae8e122068b89d7fe73c658ce030cb51dae9836aafb68fad77b1cb5bff8d7d9c920ec449181e10ea643cc73abb9620dbdfa32e06c29cfbd8c7cb8b1103763616ae6f9b19c4a6e1eed88c3971c4778c2b":"7b16424c508da3fed14bb53462d1805f0f9d09f803d4e166fdadbac76f9fc566665554317431642f6e527123ea6c1c0ddcf45005213b0f2747321fa112d7b893cdcf4c1a59e8bd1c48b7d77881c6d79de3d850bce449969305797196d187196d0d81dc3423295f552d3c27d6d70e42c9a1a744a039181e733450c9985c94ae94":112:"b51dca8e00988af0987860a663ad":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fe96eab10ff48c7942025422583d0377":"194c8bbbfae4a671386b8cd38f390f46f9df6b8661b470c310921a1c858a938045834bb10380037fbf5f5e00688554537be0fcafe8270b9b59068fa056ab1268fc166c2d729243a06650a171c929c7845c85330c04568d62977eedf3b1ba9dca13bdb8f9522817c8cb99e635e37465ec1c9f6f148d51437aa9f994a62e1bd013":"97ce3f848276783599c6875de324361e":"127628b6dcbce6fc8a8ef60798eb67b2088415635119697d20bb878c24d9c6f9c29e148521cb5e0feff892c7855d4f1c0bfb32ad33420976714dce87a0bbc18e4378bd1ef35197d0ca73051148f1199010f63caf122df5f71ad8d9c71df3eb2fbe3b2529d0ba657570358d3776f687bdb9c96d5e0e9e00c4b42d5d7a268d6a08":"12495120056ca3cac70d583603a476821bac6c57c9733b81cfb83538dc9e850f8bdf46065069591c23ebcbc6d1e2523375fb7efc80c09507fa25477ed07cee54fc4eb90168b3ef988f651fc40652474a644b1b311decf899660aef2347bb081af48950f06ebf799911e37120de94c55c20e5f0a77119be06e2b6e557f872fa0f":104:"6bac793bdc2190a195122c9854":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f2956384a65f9627dccf5126141c7bca":"89dfd185bc33adbea0c69b55d37087de3fa7fd69a9fa76aa1568ac363c5f212ae92d202b9338ef397266dd8bd1ef36cab6d1368feafec69a4e3e11e1bf1beba35d96e040d91e9d3a838966bae62a15b18d621f33efd9ec511de4bd287c722cd39b4ba43e7a6f8c8ab672d69eac6b21a8d3544ab1d64f9de31956b93b1104431e":"2f61f76bcf074a3d02f51816c0411052":"bde1508823be7984d5921db4cab1ed3017c0d73cb9bff9874f39a6f5bc449719c1c43d8fb4e76f6813b0985d4b124517f9e4e2d3c552b2f75876563c93a44c18fb6523ee732ea5b6d13417db45120653df3820a32ebdb42d544768461b1d0b55b46b09f688e47240880930fca7097ddfae35f854891e21891dbad13f661a2534":"023a9c3ab3ed0181ec8926e4bfbc0fa63e38ec8980eabd2ed75e29b681b3ec04cc8b27fad3a7ce6dc1efd680479a78f02de7ba92f45dc03de02852a2e67b35bb1dd154568df7acf59081dfc05aca02c0aa9f3f7b4fd4dbdb671b1b973a48af0c325a23467ba5cb59183540f6edf4c00376be39a3a672feb9e795d1bda96f0017":104:"613eeca3decbe09e977e0beeda":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2e9bb30ea25f50b3e7711fac05f9d44a":"17a52f4faa608dc9853d4511feb3dd9d2fb92d7a3deb3f8a7a6df3fa2a909b7db30babef12d9da71aadfad16bfd2bcb5706ef2addc58eeb8d8d13f31326f7ab1d0aabfe5525014f05cd8fb80e1ecb0654e62078440157df66f618f078cdf2b322b0f8878bcd924609c33e42059aa69fe0ddca659aea42ab907b483aa55aacc63":"9668e8b1ce9623ad52468431dfbed632":"f776c6e892e373ec86ccf706704d47cd89fa45c2abdeb0f9f6f32cde88c22f001150cc66f0fd83e9b75b97bceb98913cf143cd8a68bf06e1125031e3e7f09dfefbcaef4f04d7bf28aca1992a7e4228fd4017a5b32fc48101c8f5a609eaee9489d02200e8a13efeda60b57df53ccf2fe26309a1c1e1d40db6eb8431dbfe8d43ea":"407171db1dfb7ff20d5c97407375574220534ef75ba18dc616400e5e967e72db23783a6eb9506b611d0c67a83f5c423380ceae66d5dcdffc31e31239357b91794018e9c4c36c286f7b17ee911136d9cacf564baf5f9b9831779375e63aaade8734a91bd4000e53e5e412b3f92f8b68e0b7ad3bf6f274744e2c5a635894bf918e":104:"2741ebc33a4d4c156c21385a23":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aa705ee70297e9212f70585d92f42aa4":"5e4b47d986d55f49708cb3e4d27072a7e850936b27b24723856acec7b2e03caccd98c2a002a2dd1d3f4dad8827a5910b42986cb00be7bff47eb401be5f324cd2cd3ea2fa41f4ef61f9771a4c0184d85d6023f37f3f54bb9d7cd621fe36ce11a82678a0754a33049106be597c53f287692ac5a42e59f09a2a117fad6c034a91b9":"89822c9db69229d1e4880afd19965908":"fdd655584a92e29a14a368f28a73f9dc608e5c2ffd308d4aeff7326bbef5ea58f84620c9ad43c0b598c271527ae60dae6db4ffd3f590e503ae7057d8c48e9b1bd8f8a8832629bbfc1391b954a4fcee77d40096eb5dcec5e0439375ed455378d716ee8f8b04ccde3291e580068dd7dbef4ba3685b51940471f24859f8e93b659b":"0f34bb4e2a4016ba41eb23e7688edd455f2d46a5097236d9a124ae0bd47349876319976aa4c3aa41680a63cea85f433e3a1b4376f79d004710d486a3fb5afbb7db2c41aca400e04f75ba91660bb68354029defeaae1853447f8fa0d470b25371da73c9e8ee841ba95fc273f88c2e4604ff29a131a7d73e60a00340e886df5359":96:"a247e88acbd4e354d7c8a80d":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ddeec78a0c23e8c5c32d3d4f9830f927":"134fd6be1a934053a539398aeaf5d3aceda3ef722a6b3568af6958a4b1207f7e9b9e835cfd46a7f3d4faed829ad23554fc7c0d1a9b32bad9477d9dd397a259cfb0bea30268aba7b8cf4a35dbf99a6b2ca968649847f717749bc5f41374e1574ad6c357f7b60b0cffcb822bd3924208d0472a973ae97550b921338792ca88fde6":"ae428ebb974ccfbbdbcf6203105724f1":"e3d5ce768c688e881e72f036341b2d91947e02b7327eb53240c85b0b93a40eb0f3346817e2c9e126209b31b57633c4384f7af46846d9bbe6fd0d6babc57b84d0f5be2a8a7b146b38914a4cea70273d5461126cfd7527ab397510176e790300a06066655907d499bded79f5bb39f6fdb03f85a415c2cc2ad1f25078f0da7df215":"865d6148c9820b67c08c17c9214de612ada6e24ed67933d13c3b3ec43637fa305673d8d52d15a195b27a6b2563682a9f98912908668e3335192b1daabf26e1e73d7d34764af006b0c14a0ffad3b6a0def59964b11eb52e829ad790069997931d09be88b8d60aef90e39dfcb0df4fd54b71597b8ac64670e703e7cb83efa3f2cb":96:"64b2458a6eaa6f12937a8643":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"829008339e983918b8d142091f84ee28":"6f30604d8c2fae216b1ed3d67485631eaada68fe89a7020d6e29f42b937e7640fc1f23c00ba48bf239740f6468289ed211ba81e809cda55fe067bdfa198bf0461daf86d4a7969de9a629513809b358630ce7eb50a783b8c98ec1bd5e56cb47032ee8fc64a939dfc4a870ea9419b16178109f1966ab964da34debcf00cc49f57e":"dc62cf12b6d0439578b457e516d8205e":"e700cd917923b16c968712b2fdbf08be1b5c3b5d9e42cc45465549898daa07c44b4cd321ba16a38aeb6720e217a58428e3a4cc125920cb3fc92f039b66716543bab71b64ebedbb1e5e3e8fbbecff3385ab0ab16b7f6554b7fbb3b4c92307c654361f984d5a6cb69b8708684d90bb1fdfabc0cb59f42c2b3707b3755a8c7abf34":"adf60c4affb2ac76cce20cf9f302b909bfda1bedc60be21b53f65d0b81bff08f7e90ecaaf12ee1f9d921926b75e244b7e8357c1cfc26013a6d1c874ed2e5cd0cce012bbfff0dff85b372d92c18dce887c1651b6467f173a67ac8cea194a6c41e77842675f60cacfbc9c81597a08959d19af632d3c191bf69505620e4290bb040":96:"6209c09dd1b7ea85d02eb9fb":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4aec55c7e4bb36c32cb543b57cfba3fc":"4cf1443a5448fd09e09e91b7cc5f8e00f53f0b75a6b17db5ab9a721167de5f7bc5de1fb711accdafb7f3f1bf6b98393e5f09e9091e26d1340122edc91f7e60f62caa218f1927c8f0032be0752520aa650f6f1ddf40412c96d49dcc2287ee17834504f1dda3f4a723e2fce064f0b8dae0789ec455922a14488623e3ac10b6e312":"6669c3022e0820634a95efa2b5578e93":"f6ae9b1aaba18acb741c9fc64cfba3841f5127b1cda5cbcd48af5987428daa5782d2676bc3e2ef23936ec29a80d6b5310282b39b77181dc680799ac9c8125fc48afd185cba2ca8900bd9a0039787b4f3a6846f3edf5f7b921dec2608fd3df67600ae0aba9378da0015bd57d66d2999bf751806d1b89214332bac50f721ca9474":"720c32b0d454f086af36a32cc7274e2f2fe08db9cf1cefecc14b42b3e5c573aefa7e9e1ee0042eee21104dc3e4d19b012099280c5a53e40a0bf662d8295dde743143a28be7305729767a37cbdf08fb3c87667939a8ffe44c96ad272e30b75aafada2963bb9636f189c37d976ed1c458295fe85ed19662c463d7c8155e9f04115":64:"4b3343b627095f60":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8629e8064b3ba2b95bc20dd075f8e931":"85896de4b6454acf8568ccf95ab68a632330ce71ca8b4e7bfe26ad8d7e2e6b63f2032e2cd365999ffd24ece0df16904d749d06e829a291f3d07fccee27d9c6f3ff3a139d9e33f0660803de8fe79dc6ad291fad47c93543522a1c38e40697426a9855255e3e0abcb84d474ead15341c6b235ccd755e58fe6e87898d216d65abac":"dc4bcefe284cfc606f39b057b7df411b":"abfd0cb6fee8588aa68606b7e487bb9c0d2bd11205611a6f30a78d9ccf28e827cef4e966fa245e4b7b39533a4bd00176ce3c97858b0c8abdff4c548c835bf1962a6115c4ce7c05b1ce5aa29b412e816abc925b8cb998eb4b69c43a7dda1b3cf0d728072d42cb5a489db521698c5daffc3013537bbf622ef76a2e96089b7d4b96":"b295ca0d7707892fb08537f42d28a844f5877177f136b4620f69b05c83f43bf2e61323e80076c88660f5385060228bdb91d866686e691cc7e96fdaff41f2ca5f5b5d93ecec7bba82515a6e0bd604c99ef93d3ea013d899464558bc822bd765eb1ca2b8b8a7d961a6a316bf135c22d2ee552e62d8bbc5b60ca31bb53cde82fb5f":64:"d26cba11f68a5e1a":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4d901e59a491c86bf538f7b38247bb21":"4c370a9f316d25702195409d8e73bbfa40aa15c2b0ea55db9257a9ae4e8dccad14589718741a78e5a74c26a801857e388c9f141ef7df08bc01384b2b2338c38abce51d547056f4bbaf7484f9edc96df122e71f132b7bcb6484228c3ae2f741a2c8b9b208b6f49b07081334b93c501938808cdbd2e40cf95ae4f27a29e1121480":"39e2788c9697e82cae0e222a9e413d8f":"48d7d20e424df3c3efced29e860771647ae01312a96e68d33f982c540e74160a7fbdb623d4b19abb1871d74c6dadc56038954b154389b752bebc40cf4ee1505ec8d844e1a04dcae430befdb081cc84252e0840f5f5146ffe5b9594f856afc2edb33b3c6f9041c9631c5e3d812959c5504938635f72c6fe29a25bbf66a4ecd211":"262718671dd0e2c9a40b9d7297c7f6a26cd5fe4f301999a32059812719896d3a2f5350f6ec20d999fc80b8d7af5a421545b325de9180f14505f0c72250658a5014768fed63ab553de0fb01ab1368356043f6d1a6c9950c80e3d9d4637bbeea44c9d58a4148bb10974d507c62b67cc4e37eaebd7eb8e67077856cc5d1702f8e2d":64:"bd814b4584941681":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2f54229167862034ef6c5ff4a1246697":"af2c89d3600329779abfbcf5be8bb83c357d4d2435fc8f4c413b956b898d22a8a889db9e2ff5e7229d7495576989695a0b52d796f9a23e9570b7caec6b46059749c29a293d31a6224baaf73711bc0e4a587abe9d0379adec6de04ce444676dfd8672e6660cfc79d7ee2e7625ce57dd4681bad66aa29bea2baf936122c3db17e7":"8168ef8ef278c832fc0ec846bc9f62e9":"abb9ed24137915265bddbd4b63f1d02efa2a99c8c373f19077c7e1c389feae36a7af42c661b0adc5dc8e4b5520d334e8e0e112d42c2977fa23485c0a85aef83f1e52d6749bd29cbebe14aea6ee1c1098aa96c6360b0192894bb2001c7c0fed7f00bb84953c23bfdda00818d1568fb94c1bd971982d6c01c12a35ef7af34f947f":"cd6dede25433fd3da6137001219b57aa54bdf6039a5a8d66138171b006194fe3e13d484e5cf57a1acdaa8e76f001df7bf41cbed2c5561a37a32113fa116d0918167c29dd9e7d46f7c18d9db33d7f1bc33ac21d159ddec57a2e158f0c0993c16dbf50582371100a8d7c55cd47c03473c5770ad562240f754c99d95ec593dca284":32:"4ab63349":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b7b52fe74c5c3266edf731578d28a72e":"01a4b7da57c0f7d9aea51283004b23f899669dccd6dbaec9cd6e747c7adb52432c7c29d1411ec1df4e5e33311ad84218075dabe17f73c95511ce7950f08b618feff56bd452b33455a1a03caa8371dc7fb9aebedb3cb652d94e06bd00a98bb06d30b506d41cb516c759f6d7f793472e6d6dc9ae50cf3dc8b1ad3d0517c4f555a3":"a005750e9f8c68ae238668f0a8f015ba":"805cf3635f9d84c7608c242ee23a4837dd3f260de9afd6166b08164a0256200be9b52e5259a4a54186ec067ddfad90f5c4f92afd1c7e4f2d8443312ba3c4818b664439a02644e55467045071aa2cc7939a940e89cc52c8a53623bc6473bf843a4e0f00149b2ce1543a6540aa0d9c2c5b68ba2bd5791078deed1de3b5f48257c5":"d6124da0896d99fc7f2c3688fbca164f8fecd75b6260162c4dc2d2773ce75cf41a8c7a57998e0a7e49cc71e5ad6a04c7415f8d4fd11f1035d3a02ed744345d74ebc9c4f202f65bfa88d55c747fe777225e218f2149da22b53e6584823dbda42cc2dda56fc72b753f3923c443eb5c656515dd824d8c08cc78152226ed8c1808db":32:"60d86287":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7a3501d9fbb86ab80f5faeaf8876b7c1":"4f0dfbd2aeab70c80814a1f261a1fe442eacff5d267fd0c0f93757919810f6610113f1b442270afcc47f2fa01ab01797683ec9267691a0dec45033c57f5cbdfcafdf154fc99e6140176eea92503b3f6fee5dfa5aad05f802e08a08f10e49a8b32a50c028f2bc7aa451be3747d10b96b3a1105c67c5167eccdc18b4a9b0612d03":"6d59be1833e75ce7f54ddc91ad6f5187":"3e556b1b33c42f1ad6cca67dabc6ff79d6cb667527335858e26cb4f6a3d8503ec415968ba97d2d79a3f80c1a10d75174eb5294cce8b89224eba7dfb258fb17cb5c5db7a914ace06e94cd2f2cafe3febc8adc4c2264afa2db2c6356e4c3e8667393a77a0afc36be678d5c0a4b63ae82d9922bbbc60559f331ece9947b67469469":"615ea4535f1e579d7aa45c011018f272c2e234c3ea9e2d102cfaa4a437c41e64bdef7a211ea4d858bdb656215e600911435ef9c8da68e8239e4782ced7e7add063f33f5bc62b85d9ae44ed1b139580118c5fc054ead08257b0a97632e8c503c6219294af423f0deb36758e05857ebb05c6835972488306ebfedd2ca4ce3b2c48":32:"74c6bf0e":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"195ddad2b0da195ea54a9dad0f86c161":"":"265ab1995fac4fca7c2b26c84e4a2dbc":"":"":128:"930f719034b76c232619ef2792fe6e65":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"12be48e90c849063637b1c2ab0f2b467":"":"0020c3dff2f6f3acaaae982ce38f63c3":"":"":128:"c8891f32b8015024ca42536d633b1863":0 - -AES-GCM NIST Validation (AES-128,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8e792fc91675d5efd4d80d5a06378d24":"":"15ad63b969f8e313eac3c717ff9a994d":"":"":128:"de9a04b030954b0141dd78ffc67323d6":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a668cfd45b6ef8b766a4bb187d0824d1":"":"a111e94a6426ad9b4362132052eadf4a":"":"":120:"3a3331e6a41cada2cca8e856135549":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f36e07f2689832b914e0b817010c528c":"":"654104f9d16348231e6ba6fd30c1f02c":"":"":120:"be897583bae073f42138d64e622c35":0 - -AES-GCM NIST Validation (AES-128,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"25d839a709d98ef9c0c9e78ece961eba":"":"b64537609040790ff648d51406710b9a":"":"":120:"4d5854c69cc973be8de41d5584407c":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"957dd619f9f19445c374ceda9e9ac082":"":"34887be03b4d4ca8ea2261b600ab0b0e":"":"":112:"60e2d50adff707d8b279bdedb277":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a5c9a2dcaf576e67828e806082d8e780":"":"f93732aac9448c4a427e634089d7edcc":"":"":112:"f67ed1c98bd2c5f3a738e75f15ac":0 - -AES-GCM NIST Validation (AES-128,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0a30a816e8d4d85d40c8e4d7c93b777e":"":"bf1f332aa19682d05cf95f2b03d26af9":"":"":112:"acfb2f7884bc496f3089e50dbf42":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b45a16bba5fba362704149dc56ba8a13":"":"64cca850412091bf4e120ccd612df353":"":"":104:"7b1adc23af9be185e5ae0b0f0e":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0cbcbc1c72aa90e3ea7e2fe328d79723":"":"2fc5fd964b45082546636ae1e208a937":"":"":104:"fe091a768c731e54e2237bfdc4":0 - -AES-GCM NIST Validation (AES-128,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"94297a1ad3f0c333cd9b087b1efd43c0":"":"52ec9dc82131d7b1c69c01fed6aada10":"":"":104:"5c927dda855b76ab8fc077203b":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1e8cf32008bdf867f0ff76e7d7ec21bd":"":"3854b7412de72fefcc4b0c2155f6910e":"":"":96:"cc8e7eccc056b06cffc307e0":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2ce1a9bd93fdde2adfd8c2c16a395b95":"":"64072313ed36eef8209f079fa622d7f0":"":"":96:"cd9e8ffc1423270015bf8e8b":0 - -AES-GCM NIST Validation (AES-128,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b15354ad3d874fe472719ebccd45f123":"":"1b2013153290edef60a6a438bd7517de":"":"":96:"f65a841ed510becf52b1eae7":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"14ef129784776647eb3fb8897915ab9e":"":"f7bbe9f699156549935f2b92c1dda163":"":"":64:"dd10fa64fd51231d":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5d4470053c46a577bba7000075e9bf2c":"":"854b768fdd7492c21618ca716bc8790d":"":"":64:"1f3c73722006023a":0 - -AES-GCM NIST Validation (AES-128,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ea87d675a0d406c57f78a2531bfc0c9a":"":"0907503fcb06ee384526f7206180a080":"":"":64:"65d5466392b63bf6":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d3e8e27568e6e17ff807cc207e5d4eea":"":"18e51cdfb4a3a5ebc7b0d7b17727aa95":"":"":32:"a7e3f637":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"596a602164b1a0bb50ef91bce3a98796":"":"2025e72bd6a511980a8ddce34565d16a":"":"":32:"f84f92de":0 - -AES-GCM NIST Validation (AES-128,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d0194b6ee68f0ed8adc4b22ed15dbf14":"":"32ea8970a8cb70d6ffb3972a146c6984":"":"":32:"eef4b97a":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"869ce65e5e5e12c620076365f149784f":"":"317bf07e83c2e9717880b7d080957fe1":"ee185d738260de67f1792a7d548ea73267fbbb6543bc081fac43e00e6cca92d7d646f27054894664ffdcbe635e34cfa800912b59fdaa624b36c44c9ff4f193d3be2f97a7820a6d4ceabe967091ef672098baf82dd3b671cac4fd4f4b14e4ee388fbdaafb4dab2385df4fca23a78d31f11bca15eedd7cac778484258778106a07":"":128:"add6c89153c4c0eead03df44487742a0":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0a05baee927bf23dd2f4b57b90fb6434":"":"8147e99dc9e462efea9c1d7f30bdf45c":"6424ca7fbf24c6c3b0b5eb9d769b26a9792c96a8585dc596208ae6cfc0b265bd8d26af31027f278bb92a9e3b365beae8d964ec7a4096513f84fa73f8739fa7e11d54d678bed19546d2b71b3d0166b25b47ad7cfa69d74057d889258a796a65f2bf8d3bb151f4e721d398e74594a186e6182c16fe4c8813dfec67215b3c4a94c0":"":128:"05fac5520a99ad7fb407c48995a2c331":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e28c435211743a7872e4a0bd7602336a":"":"2ddbee94fcbfacea080ded468f67180c":"63190ef542656cc2b69a9b0daf8dbd2d38cd75f17b92d6d891c17b0337ad4fe4539d9154722fa430782a1d79620e974661918166e39c453c5a98759a13d2766138c7750e6cbdc7b6d7cbe44f3f4de7bb562d9bce6e6e2e815444842b89ba8b73454218c483e574ca886a84e8c9aa6f56dd1541a7e35a4a5b8f6a05ad5bb013e9":"":128:"2ce6d74cda466354a736636bf18acfc0":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2b2bec16c7d326a35a8e4c0b8c2e3674":"":"4573eb54491ed91bfa2185b762115bc8":"7a4a6b3114dabc50b201472c5cb13a79430f78eedb2ba8492c01ce10a74d08565b9bf9874bb8fb72f694a23babdd08684cb68d7e09e65813728aaa5c41f9c2b10d921f8271e200e0c519c7c46f572bc9fe3f27e13d1e6d7bda4bd66c1c4b0fec8c68a1b0ed7b0659009dc894ad55e0712ddd0837315734f2bc3b757241af35ba":"":120:"5f5d4695795b8580b0bc414a81b002":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"886fb12554b075dd9663efd076acbe56":"":"7e7a73542868fc27a01865c3aa635ad5":"cb25c2f029c7a877a0aa565c7f7347b317ad534821edeeea838996dfc42b13787e5bb237525ac926ca8a6c5078210f4a27863e8114c728d09653fa93ae990e99f0c856bc8097c2cd33cdca1a407897e2f495d2e75356aabd891702f25ff20e6b6c8a785d74b78a734e311fd236f9e970202674004ee4151879d59340b20aa23b":"":120:"8255116ee1e3cf936633017c4dec3a":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"920fdf4b39c63947d57a07eabbf3f2f5":"":"77431ebaad53e42ca7eead0d45e5bd18":"11f82f9ef7c2161ba73cf7da82c5397da5e8278da180a976f43222402e983b057171f793641a8343d6366d6cc9260dfe8becb8396b5bcfa0f46908bd809bdab61126cbb8d63f601965fb9e4b3afd66c594dfd394d4cf06f79f361771a85dcead6f45dc7df10fa434736eb109a76fe6cda32c5773d4db6449494f2a3f6c884bfe":"":120:"1291cbea1a9f8b166c7306ff9eb281":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"114060534f526895f30dfb4007356ea7":"":"5ed7fb59618ec3d081e60d8259a3f184":"a56566a98d9d4fdcebc932adc405e0b8190d537f931983168283d0431e7589333d42f2a3d6e41f268e7b566cf48694cdcfe01fbb9198804ad39e7d387039575c5de787610a23ec265505a448c3a64ddac1b0d8c567eefe5c3c2dc1bb15af45b4bd8fc2e1506ddeb2e39e04f72fd24a64cbbbc929800e0687b53eb89b3049f271":"":112:"62f770b3985388ac37e14e8d4696":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"697ca4e9de580b525d7149e8b69e8093":"":"e844153734eaebd86983aa3bf50068df":"cedcd5ffeb7988837c38a0be4234ab1b03f14367a1a3854b6dc9f33eb9a87c411326e5cb7d12dc730cb6f363da2ba68affdfb651fe497942e0dd59668f56c23dae80b7bbf905d36b501ff037fcdffa472efa4bcc1c975b67e5d7f348db73e0ce648b44ecc5b5bbbdf3101bf32ea99e3c8e8991c94fa609c93d4b375a4389023b":"":112:"95becb04cd39c868c9dbd1d4e59b":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2fa92cc97ef469efeb2c25838193435a":"":"07e6492f2377c04a85045d24940fbe8f":"0f021fb787c6de2be054bdb2741aef82ce35d951de2986c86c3dac77ee0804dfbd010d33a5dcc109769d4b8ff1471eb98fe917c7b0b374e80539f2f4432f92aa55d8398a71510c2acf85c54975fb09ff5638b936283efa3c1d3b054865f97685d6bfa0dfcffde3a20525b5324573b69dde230ea87c685e4f6b5c3c4c55828a86":"":112:"397b2b0dad7f1926bfc25a3ba0ca":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a61f8a5777ec3da0c3e257d421286696":"":"14894cc4ff71e249f0053bbc1680331f":"9df46dde257054160854248e70625183bf957ecec36fa4f5a79a1650e04b500f7f2fab4bb873f0e813f0d6b17610bde0de95427a8e2d1293dcdde053f5b1a5a81af25d553289e89e77e4ad7d0a1190151724730149050bd021ec61a08ce2271390161c752df8b5f61c33ee39366de4c1db41d085ab9dd88e170e8c41c571e2cf":"":104:"e062ab7984221ed226be353731":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aa2d04f4f5258c6363b1210c91aff7d1":"":"6b24c03273dcfd508cead2df0c65ef2d":"81a1b326f8f22bfecdf1f386bf8fe678a427e3886801b823a37860b9a832356724b1d352d6250cf8e8f89d0bf2314fd11464c3b4871478f0bc290ee1096c8f6cb5484176d70762289b44309d6a88e4750185abf30901bcf8d952da9abaaf9807c0c0ee8be2b247dbbfd182b83f9bfa67ca3bf448c3f5a3de3c31b058c3f944a9":"":104:"80dee09fed5183d6405beeb268":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cf221e6cade9f6cf509afa6979cc1fb9":"":"d35433be41a259dfaf58aac1d82af462":"b31c477490e5624c4aac8e590725bfa8b3efca618e2369e9b980d6a463a014d55aa8317a9e70ce6de7c574cd15242cf4eb3eb078cd2f49fd82d1a56c6c4241342e62a2e9d94f0aaa024055cb441d650f0a6ecabfe9ef563d6bd87d4cb1bed348aee42487c13b73e52fb70f0ca6ed81924fd519806e04babfd08df1a00191caa1":"":104:"f1776b1ee7a3c49f99f34f582d":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c98eb634c7caf52d3f3d9f344e141988":"":"a0e58176826910a69c2d68ae1c6a05c0":"6e559278bc469cc670c4d9105c3c2f8fa308e11b4a60f75664a9bfaff4f0176175ddd3c6c17ff91a208dbbc7c49efff099fa873f60849ffaa3a3003419cadaa06b92a678b80bf6c952bbbe596dd0a2eed35507c55c48a9e6131bcbda0621cff87e02be5d082944f2c8e27211527717272839601b0e26cb5aa2301afd05ae1b35":"":96:"3d8617b2db536ba7d367013c":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c5018f4a8e2a850979b006d0498dd0fe":"":"75e4bebdd170159cff59f895ebdeb118":"25ed2831fef205690381c73e925ef7ba20d5f2e3a4b5d7beabd749fafa08a6941acb1385aed977ea824322d378649f646a812e6c87ded6ae437c68ffdd4fae937a8498ae825d7523746730af84d56380be8f575c60e7f836a862343916e98cc2aa5a27cd63cd92df63b8bb47c81fa6a53740a125bb9cbb247c916363e60f5f65":"":96:"0aa5aced93e0237bea9a0015":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cefd40aeac28fbea6e3343a125fe1c9a":"":"324b9722166edc3831bd19c1db5bfbf2":"72b7a4289bf7f5a752665839adde8f79644424839db059ce40de326414c09691d5c7071e43722104a94e430e263bc974b98f167c50b97490bcd4286b502f607ddcec5387695463154bd9598ce8ffb6104d1f7010bc196ea2dcbfbf452d6257b1da00271fe1e6fb56c43656d5570b965e0369502443536cc46d4c05b1e863ed8f":"":96:"0c6b28de22e02fe6a4595d5f":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"58cb7cb58518ff3fecea4b44ad9fdef1":"":"fe619efb1c9502c03cb8a70792f9e046":"1a7c444a84267f52c36f3c09f8c4a88b6ffe3309b8edaad93a08d3961af28b7c2baba5165f0a9efe13fa6a0ac595da156741dc7f728c11edbd8ab02f03e45716be504778a75374ee882af488bfbc6cdd58fd81d3ac5f369f85ba42c6fd7f9df4b25fdd2fd32607ea800047e06058388c4f71a5eb4d825e8578106041c84c25a1":"":64:"8243f32002d33cdd":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"15cc4cb979a343f4adfb821d6f6e9c66":"":"68464e7eb64360c7c0a8540ac3473513":"d69f4a9595a48a50ec33ac1848df3d994eff838b28ea7c8b2c42876dadd60a3f9769bd4f61d8007c9dd4fde55edcec8f5ac3bf23b1a958fa714dd88cd5261edb69b7b086ef0f442179943f0871a6253aae99d31fdca448bc3efef353b5cc55cfc576e4a7fb73a5ab6b5af58dbd381bf7f9d69a5c2bfc902901fd485967b23bd9":"":64:"c0f4302d8276c3d3":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6398de910ff8f3acdc2217811a1da2a1":"":"fc69b21ec18195901ffa62260fa20454":"021f225240cc9a68c4886824d373f3a70fa32b3a926c78164642450287d269d39dbd49c8c71ce7b914f83e8b53bc61c6773f98318557b45f0cc2ef2539939df7a1e6765117f75631dc5640291d20e6402d22cd2e231f9c2c67cb24ab5d8a69933c49b89c9fb2ea57136a6bf1bffe8e04d8d6c813040215f051c654d93224edfc":"":64:"314d1a332d3c590b":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"382d86868ccd08d417d94f3b73729e09":"":"069069c377958235171437b34e0fce76":"049af372e34ef7a92d0d49cf2dd03052dabacf2982eae6a817e6146ad799971be239ef5810ec3f6cc6990e9641a7b696392ad3faee38bb50746c1e93913c02dbbcbc6bf54f0d062f176779b7c0dd5d7ec7752601c9812fa80508a78bbd26922bed4f64b1ff2a8340ce1c01e317e3526cd8218ac24af87b07f8792849f6479b8e":"":32:"ffa59fa2":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"21052b2fc7bc7a662aa9dc4b6a04f25d":"":"d7e5432def6a24d486a608e5c5c919a8":"1970ed40003bccabf7f3c57bbe5ba27e4254c1511413ed421cef3a6ffb9f0192987de83ae965478c3e9979637f8b3fa5d10d69b916f03fdc92ace7736f171660156d880114aefdcc164adb6f8c03940d9b43ce8881441b41cafee3351a56fcb632aa4b09ea81adea26fb0d8c6e1ae380df922a429ae1f5b82b38d9bda4323c51":"":32:"ff342f4b":0 - -AES-GCM NIST Validation (AES-128,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b6c53aa91a115db64653016375bd747e":"":"8163a4fd9c2c7010bc85c86177b194ab":"93cddd318b999262c7cde2838cb5c4d78f3eb1e78d305e5f808fa5613526d724e84a0188ff42a2c34bdf3b5fff70e82b3c30346e179fb3faf378bc4e207e335a44da53a5ae33770104b95397fb5acb746e6418d0dfc7368b035af53b470fc66bd0c210b68ce1b276820b621e919f044e5cff5ced7e07dbb8825bca6b4ddd8ee2":"":32:"50b8acce":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2251815f5bdfe1111c7f9ca246662f93":"2247e781763edb1349db2cda53e5853b726c697b34497761373c3b6a1c44939207e570e14ea94bd5f9bf9b79de9cafedeabc9241e9147453648071f2240e10488c6e3d7077750a6f7ede235d44c5a96392778ec51f8aeb1a17fabe9b6c95fbc479fff954a676813ad3d2f71c76b9d096a0527f2e1b151aa8972147582c0fd2bf":"58973280c2a7122ddfcb25eb33e7270c":"":"b202eb243338849600e2feba7f25a05fe98323bd7cb721ac49d5a8136422564391462439fd92caad95fc8cdcaa9a797e1df3ef6ba7af6c761ceaf8922436dd5c8b1b257f801c40914c1331deb274c58eed102fd5fa63161c697e63dc9dfe60bd83cea885d241983a7e5f0d6a8fd02762084d52bf88ec35f156934e53dffc0395":128:"c3701ce3284d08145ad8c6d48e4ced8c":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3199b70e7115c74e3aa3745c18fce8d1":"4fa0b090652d5a8dcd9b5f2ceaaa2dc87a40b30e2d59bdff09e1f204d1b90371de70935c385cf5b4d7e0c4e88661f418705370b901b97bf199b366e669bc727882d4aedf8171a8c39431f11af830358cd0d9e110da1a0cc6ef70efb255efdac1dc61e722a2d8b7fb4cd752c6350d558ae1ccd1c89f8ba44ab697df96681ee301":"808a019f7fb761e9701c0c4f1a1690e4":"":"8d5ed4146fb491db9456e92f753aa4f688a9bc276e6aebb782a0cdf7fe578d74ca3946fa7b7893eff6345e64251cb1b146442acb64041324e2847481fd4388b17f83206948e67c1e66b894d5d40ecac0bbe4db0c6f58b65a1f19f29429a9e76f78ef5dba0c94d88dfc06e6222a506f004d24cdb3fe26d6eb6e08e4fdf6289651":128:"908806d668451d849ba0268523eb0e4a":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"63805cef84ca7fcf281b226c3ae37230":"543fd64d1454ef6c007ee96b3ff5d2e4b7f5d15c23e7548dfd1dfad4da7774b8795e817fab3be7fbf8e4d0d351a743ea793d9d01385a552f78ede054be079aebd1511013de2096456e9fc1b83457fa1240cd39c17440d4b55c4e390119a759055ac851a02ea481eb83e294922d35f687a56d801eed638d289350e141116ffba8":"1aa9e75d7854509a85d995ee482b8eca":"":"98db9e8e3ff23f09e585e5326f525e4f8350a1f233a0aebd60d5951583eaf5220f1690ee3607ba98cf8cc99a90efb7197835957f2bda918a32e528f55d548e3c83d65910b956634224cd5415ff0332c165d1241f7a93976649ebed2cc7e62addb76231bb738ee8a291b62365965392aeb72acc5f0fbd2f88f5613fcf44a1b074":128:"9b1baa0b318e1f6e953a9f90b21cd914":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2ec9245e8f567e1cc8795bbf72f2999b":"f266d0060d290339def5f6d8dbf7d120a4c645aa90470e168b4f35342a00b8c7b7230003657d377d8568d252765df142e97a9dbfb9711d9ccf396f3d51bd91673f129d58efd80ab83a0678303e29a0dbeb1fa9fdb7fbde586a17ace65e894374ec8da1ccd3e21851ab998534de46cb43b38e241edc04b5c571dfc0aa0074d4fa":"413628d9ff3e4067d840b0abc2cda0eb":"":"145d83092a269c8afea604e9192b8bb550b9bea85f842fcc4997c2b00c6f3ca46100e814e82389f27a69a12d29340c5827e607657a00fc72c4de30079e23760769e800ee4ce46957f82d61935d07d1c70dca836c19969dfd0fe0ea740a52e2d09b1c9aa137b5e8527756fb2c2298f8400949ba24a8351c1093626723a68a79f5":120:"ad174d1edc713c187a5859a390fff8":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b08df4acd253f9dd4abc52c4be488015":"82f665910d853fd2b775bf66a1707935443574c90483fc33ba02d6479fafd99c5f816bc58a1393a44fb32711fbeb0d6936efeb3580f147c3019e9f2e2ef48b202bdd369c277791bce524f3b22ceb74c664143c4b1da819b229a5b480aa954be110ca006615d9cff5a158342a47cb6d04fbb817ae4ddff6d4f86b74205799c9c0":"e1c27d35520ea527f9a2cd9b0f717841":"":"f5b0fcd812061be999901595b3547e70f7144cc9e0b0098262be4c440e8637af782f536f571534a658ad1fb44360d9c454d1000d6957f261401e09c0f19f5146ee5433e378423f9c94a90af2185d38cbe2940a459d8409d987d04a1f3e686c2b91d4fae1f3e3bdc5a30569838201b7d30c7320d7cbd787bfd6cd40e7e2d071a1":120:"fa31e58fa32d1208dd8a67fed44033":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9c08d6efb167beb035f71554f64c12cd":"704f59d5202108b949170532ac1e78edb0e06fa323c1c69202d7d22dea4d7342199cebe949e980a21ff0fac282b868cc31ff4f6674c393c0f2cae2374664314afaf7791974b6bd6af26ade7fc266a6cd2de4f3c1f479f895ff597998cc8b929c1f05db13d9b9a4d98c9bc606eee32915bbdaeec6576e1fa6e8b22e0bb1098074":"608d56f6dea2fdf175eae189d42a85fb":"":"2c7d2618808adcf8edf5a54119471b930e07488d5fac3dcb53f4ade43674d162881bee1f27dea6d158b254d4b432e17f211515bf595a9874d89f8cf748ddaf2324078029c6463312ad32eb0aa5ebefc31c7fbfd04b37ba6b766375952c211d160b943e9d3c5e144b581157bff9071d31cfc082b55c4a0fced386ef2fc75e1a7b":120:"7a1ae03e2838294e286dca4fbbd9f1":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"192dbfdf86e48bf18710e706dc90e356":"1d7c45c8ef6f9f073c7f186e4c876c2b8fbf22feeecdc111a19071f276e838ab0572c9a68e9ad464fa88ba8d8a162e9f5ee1c4983395a890990357673467988c057eb8a0342c41867baab41456edc3932531d1c4aa0b42ce2b388d2be579dfe332f40a9b864c5e33e2b3cfd73b68d65c4db9ec46d3ba1587a56cb7887dcb3c5e":"1a511f85e0e138f4241882c20689f881":"":"3e50e821fbf83433155de7b4eb3c9a2c148b08d9d3998a3486f517fb5d0a1338faabbf95e85fa9186385bcb9e26aaa5e473d3cc7af869872e4fb36ad16c5468d994e9c71a09dd2868977f3f9064664f6ffcbac1bd313a7803c304273d69ad20369bad36adeb38480563bc6db9aa0d11a0e03d09731171c1229a756037b2c285c":112:"9393edf0934796eb97a8c513bbfc":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"daf9455bad8bee905c6cd464677b803f":"af04226cc6eb84f8167a68c2cfde33a1521dcbe781e7b97a3fae732bcd8c0616a588200328902faa5a65a27e769a720d7ea23333cc1c66c4d4e4c53facca5d6af06aea7fb49b12b04cd6ae38fe28d71cd66f769d640beeb07f508a0e3f856902cbfde6919077de378cf0486cf177f897cd0a56b69db3a31b448ebbf8fdf63736":"6cfe8490e892f5ddba8bbd1cd522ba0b":"":"e5622ca7360272a33e30f7fbeaa00956e8af0d871c433c070c8854d818eab9717293e845106770ec07da372c75266239a225ad74465e255520218c6736e51070477d70976aa7d449c32a5c85bbd6931c76e9e4355f9697bad2ea3bcc0be005da15c62db219b074b71fe4a5512157143df2c1f70bb17c6d3740d8d20eef88535f":112:"25fe6c9b2303b40ed31d1beea39a":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"82d166dddcbf4f7f66aa5ac6b12516bc":"7883f4f96c0ef7f6d9fd7c2eaad25995943078559eb24a3e6650126ddaa32301b04f737dc27b648d6115ce08feac862cb888073b22aa648c752934bb7f9c566209a97499236f782758d6f6f9a012a2fb6885ca91858f9779cc93950baa731f1874629351e6186935475a20593f66cddefff89be0fc0f9b57695b147d9acd8157":"540c2a07689bf314bc8ede71df3f4358":"":"44806e76a40bbbc2de860cd36e93d64c9f4c11994f754db6a279d6eaecfdf19966512de5223d8332a407381114d50fadb03e33e347a5f4d87c3fbf35f2d5967ba295003a2c6c12fba8394aa5b7a31365791c630734a6b2ef84eed0738cb4bc229e93c4e8529aaeadecff7ab93887b9fad5f05a88a5ba9fb449053ce4c6375d1f":112:"756d65c1b8a04485c3944e2a3cbc":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"81c1fca371968513a68ac09a7459042d":"182cb89c94171b685016bad76c445cc4561aff8e3170dd251f62efbd44910ddf8eba8a67dd1a237f2f7336f436edcfbdf9928e94c3488189110d672488c6c4e0dc4a1fb6e67dee9a1bfc3f49d2f934f305f139e98f0ba9c1ab56b5ce9ddce4ab54b6970bf6499e5e825abbb23f9e320ee05aaf0d712c09b0134839c5609e178a":"7c962a92b8daa294b4962cc3020dcd0b":"":"f91e36c79db6789a3acec9e82ec777efc1958e7e5634d30a60239eb7cae1b48f40557965e8a6f6993db3f4ae443ba167753c89f52f610ab69159ff60233310c1bb2baccb936433270f8839758bc85c53604e771e3ab0df6d6bb02e860d0eb27f425c7d30fb7566aff982d289228da5ce5a45842e10ffbe9016c9e926d7f69863":104:"0114c2de8f733fc18f203150a0":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"09ce73e733e880c6d7be92be3144db40":"a283e20adb6efedc5530f4efd71840d5fe61c902a7511cdaa939f5030880f3675959ee96e39abe082a66eba2a5a93214b22c249d7167b7a0fda360d02df855d508c7ebae7016137e54290904909b2d41a59942abec76612b17ea76ffd1ee715aa2b05b1314c0ab28631f3934d0e9efe2aef0c711e75a5c62701b3358a414958d":"f72a2fc910fdeeefe8743f57290e80af":"":"fe9a7f59abc3720706c33fa40e106663d26c0f8da0d25deb90ada8130b6f95aaec07f4a7db342b678d102b2c81464e4ca9458732783cdc3a9d504232f44e2878b0aaeec0f88efa5d7e5fb146911dcdb4569de7f114e1854ad7a95894561bd0fc4d9a5b58b5164872833283ed88fdb4900b2a596db4e8379eed4e3a5c08d5fadf":104:"9de97bfec1325936bd171c996a":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e61d415db78d9f2695344350e0a8291e":"730c3fa9e07eea73a734b17fcbc5a969dc2c04f448f44c7f6276e32ae3504e9b15fb664908f530e83a74e25a4525f74d315ab85d7b85005401370dc50fdb86e97baf3e7acb403e476193527a1a5d642ffad6cf2555d16d28cf4c4127189056389368b76aea806906b0a38b808cb02378eea48edc005cf2c21e6547502e31d2cb":"e09dee93466a3f35605b647d16b48452":"":"ae87e754c1af1175b474b0718e3560240f55194d946d101e7c0bc7af18d90a50fa41d68516e45dc2a4dba48d457ebff18a657a873e15620ed7cf6ed3a26195b9d354ea279b24ec7802e4e95d3f3765188a64d7b8d4b7c215e7d67385efc6288724a33a1a7994f21e0dc2970076af7cf31e9ad1098537543052a2b0f62e4e8a87":104:"5de3c5716735d7d1b859debb6e":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"19bf00b228ddb6e8f1fa4ba85f866475":"10742aeda590024bac2696af8402580d2ec6ba3f51cc6f79b6cfbb3057634ced6033fa43dbaec9af8ce7e9706ca699ede88d89caed89ea023d14761bec49da724538b4f9672163a5bb5dbf92f5278fc0014eafce402cb408a1eaad6bc17ec0e835d6b80f4701f946661757b9b2d54d1b137841519dd38d72835893ea6d52a27f":"760c5b929ac3d33bee4dae0088a894f9":"":"b03d27bc7f4c9d48d555a38091347f371d0522ad4c347b4a23194c234c7877cd3621ce5a7c2fc26b38c7e6f1c2bf228ccec491f5bc352556c08e4e19ddc4e4b2c036f45a42aa425a5ff9a2e9c9e5580b538ee56fa804a86d9b1b59b6fb0d00216a96936755462979dc14990935919026fb51cdfef05b8dad03320a8112b7ada5":96:"2f1cc79408c85a9867214061":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"65bd9e7d9009dd6110dca657ccfe603e":"c1b539324a001901c2461b9747f605a2f4043b9b0f54d1357049fd1819de06df6e29880d62ef7d91f9cdd1108f3cce323f6c32cec16f7bd434e539fd00ada476ef41efe7c6907ad1cb726717ab56d6e2d32042ee2df3f90d15e1515f0a15a5f06703e06e14229d18328116148b3cc39683918e42927f62aec49ee9bcc19be38d":"3fddf7e943326e431be540c49bb917c6":"":"2813d6eef070cbdee9d5d71caa8a88c631f0b71c41813c6219a765e4fb3e6eff9afe8f8f4394fbd5646fe80bab78806eddf7549d6ca3d0d16d47ef63db93cb5620e3814efd86be151b338ee6e2c681bd37be4039b2ea4a190feccd7d65cbd56ebda81f4b66ce12cc3e2cece731c37d4237a9dd0a2c1a7697bae42176a673d62a":96:"96200bd3e64d5eea746693ba":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b9b8ac9215289aa003cecd53a90e0407":"8a6fbd067144b6d50ea73a2a7abba3ee9677bbf00312c70d808fd124541ab936229d59842c8846569a063fecb8bd1945882abd987a936991d5cdbec087937f91c4f5513feffa1984a6b8d04a7b69eb4e93e90b6825778cd2ce9a0ce54d4a468c93884619f851d2294be0bbbeef5fc0c05d2384126289283d5ddaaccd89711d73":"27d367f3f0c60acf921f8d8b228a0b2f":"":"42d98ecfb4f707ec233c7f990b0cad8f39546b861b11d8cb9d939b29ff5ab315229d946ff55927dbde82c03aa73fd7857b2ad38fa55a827dda54d2726bcee66347ce42c9cfd13ba1507d209ff2388c0ea2474e17e31d8056593b722d3c2a302a716a288592b0a36547c7fd47f7595fee9d30f5bc09a9555d7f3169e26a924db1":96:"d66974c95917ae1bf79b6685":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ccbcc39512425bc32350587f0fc3e8fd":"57d6ccda317b7ea150b18d9558b39fd78d9cb52509aa5c095c5b46da89b79918c85d469ffac7226caddd670ac8f5add47fc382df1f32b4de9cc1b2ca7c2acfbdcaa08429b97e77eedea55c8ddc7814fe4c3cc1e21f95d94301ab77b4df7572d0b8778cb2befc0f4c4a5e93429ad52d6c2a75481f38d92edb1dac563154bf90b2":"0862ebfeb40ff24bfc65d3cc600f2897":"":"e6a77e90750cf0e4c276c50c3880b3f6fa357179cbd84e22f5b43cd10abcbe04b43f191ed3fabf83eaca886f4a7f48490fb1fd92ebdacb68c5158e9f81243f7cadc7a8ba39721df68dbf2406fcb5dab823202ceea7112e5d25952de1b922beda271e7677421fde25f8cde450c40667387e5abf8da42dfe891c52bdd9f5060dba":64:"927d13cb90ee5f44":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"396b53a694b28b717c104111c4752074":"bbc3b818f4ff10b6822ea41f63ca53c27578a8126f5163a5014c60e1bc8c1a9bba67a3808c8aeee09ba9e584a3584e9b86895a3f0db2e64e71bb18b843b12f4ebbfaa1dff3734196f70c5a6d970277ab5337e8b940ae7c957646f8e96c6b5d84e9e97b620a926e655850d09bc2d94678704aa45d1788e7c23ecf37e2904a0786":"0981a151c6f6867d3830c1f9ef99c433":"":"72a5587076a1050b2b514f047ccdf7176c118db9236c0f72091513da39d7416734ac50e0a35b2905420214be8426a36e86863c9957693292bfc5bfc2e93d234a09e80f517edb7cf8e5d21d5ae6c2362b779a9b62b4c66202894d369d219ef0e4b52a342b71f248c18ffc345dc7eb0b47b3bc83ffdef921eb42b6d51abd889ef4":64:"af99f8797495dd16":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"af090618cb454324a82a75a91944dd6f":"3ebca6ff138c527b851b27b9e3917bb9a07282197868351dd599b74b332610bd634422911393171305caa4fe3f6e89ab6c033ca759e118c2d8684b903966999125c748e04312ecd2c1ac3135c3be2df9c8c67be4d8303ac7aa6c21ca7b7c20b1108f5622d8e6079f41e4be4abda99f782ad35a085b7db83482dc71b8e5d8e71c":"3380a6f20875b7d561c4a137519cccd3":"":"6be8eebe7af78c062812513785e9803f302c771e8215e4c606fc5eddc3efd8b12c96e029b4287da55d8626583e58ce0e50c4ac5a39a1b0f309d5803386738397376c0ae155087f36fd86fdda4b5c8dd079011fa9a134ca8a76de570ef165b20d7d803544cd2f3a0ffede9b35ca1c982978bf95ac100af755553fdac38d988fe9":64:"3e869dcac087aa6c":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"041cae51d9e631ef70115be58f8818ef":"f6748f4a261d876e37fe44a419cfe965888aa5ee195ae12237322f6e7ac4bfaaf16e8e29be507e2978339a1855ab918485011fd52f834bf0876ba8d89dfc01927e0930d03c0ac7dc7ba1554a879a2051011bcb34a5e4c7cea4d4fb5ed53b41ec8d17bd52b2e1b9dd417a84ac5913ce3f9fb04daf4d14be65f49d0767b9431b47":"c32f227659e0566faa09eb72d99f89c2":"":"f30fe6c8765c8c0af579c95bc2d182ccc346e587a57aa226eafb692675377a85e9ee08339a047b9cb674dabf5a25301d2c8c264bc06573e36e55ceaee39239e367b8f1a3d781a2020e548001f9f98850994c3aa79b13dfc93c1d7291befd91e044b2f5d2583d1a9f868fab4afecd46fec7d315b0cbf8a7331ef8f588d75f97e2":32:"5629e1a4":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f0577d9a7dbf7b4ada5b9758eec4c847":"5b559738634825921b5cb620b5b9f637f8b7ce33998cce1ed1a23ff01f84e58255d852a02e59e4394752405ecc15248f7616a33e64936f726de6fc6d10c3fce9ac0b3fcffbd755f16bff8462b3be24f7cf342c8d0bf1ca79b1cb4ea88d690644998a8ac3cafc8c18c8cb737e38a681026d46966b89c7d6c7a4ce7a1e1faecdd5":"b432473ae67205bc7a99f5ab2a2721e6":"":"ddfe664e28c5face3761deda1ab2dac6e36cfed538e3faf9d79c54e3c85b4baea9eedcef7f8f28c2feedec72ab2cc6aaae101b99512ef18e759b7828364e4daf9a572f8c6ad88eb82f7304989345aa4985e498dfebc58cbc45aa31c18c0dda5b1991fd998901c65807c8cff6058b1d5dfd583297da8451cef13f246547ad11df":32:"ce55ac00":0 - -AES-GCM NIST Validation (AES-128,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6ca1d6ae9b5ddd6e3d68656c508df318":"d160740aed955e30c1f946088b5bc5bbaf5c84f282c32f65d099509993628ba5a51b411c6ebf57d58e9176b490ab90fa8db8a3cdc67a5f8322d06d719d91f00ca07aa2a3977dd0838487f2e9d4dd285067a1f72bb8a6c9dfca107acf1f404995bb68ed9d7e12423efe570f144e0533fa34b8d0b7156112b85c94a8fa33d7a6d9":"68a494c9002dadf4f0303dd0ebd600c0":"":"276e362cb73b405b10a98731333f6accf0d19cb96c21419d6d56b30dcf73f7208906b0e3eb103b721cdbb7eb1d4ff29ec3b7e9d433205bd9ec48c59d0075a1507ddf09275426c0ce9a58b973e06d6fceee7054ba92b1df771011ac73e39e451d9ac3375c595631090a2296d423e3ef806ac20770abf78ad04114f65661804fae":32:"8ff9a26e":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5a3e577743b4581519b84b7538fb32e7":"172a0a14820448e5ffd017c18ee02219906f721c915c4f0ff13b7b7889812c0edb89f28be0c22deff76bc975d1ef8ef3fc40b10cce0d78933aa22e6adf2d4b7ee4ed6ef487eaddb666afd8671427f7525eb99af54a55d98159fc5d651266c65ccd915cbba60fb6e2c408ef177d682253c0b5410d77d08be1d8f175ca360becd0":"1e155ada52e250cee145d69b4a307bc0":"b9be2145b842d2f5c3d15ac032010400bffe31856441cb484d5c93e6710194b13e14077e132cfe03985d4b936bda9383c22c392968c748f7265213a8eac584aaa11eea35589e3536e39b3e4418248927fa9fcc027c5516e402445068ef793d349eb778b77fb0b37f51bfcc3c21df9999ca9985cc5bec6502445b068c2d061f41":"b5bd224140d6b826062e55754299a43a87cbe861360334897e82b7a6023ab0041736479c9aaca7c73f27e239a63e7433e048a8d2c2d26f0b18476aca7ac20837affacdffb57c618ce5982ba61fe1792c8a3a856970c095b0c4695dce961a354135075e0a786192d5875d16793a3ad0e3572a81efa24099f5ed9c92df55c15dd1":128:"74df58fd4a2a68657ce35a3ef11a9c0b":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"deb0ab6e8b0f392af6b89d253e923f1a":"14a86c431bde5c0861e6bd2cb748a13b9bfb2a4a67a0bcf067960b3a9c7a75fc7ea321863c83693c70076462ec3179f4d82ed4a1155a4b5004842fb47482bd6a83804a05af2504f6f535eb9bdc95a9a2eb80c7dcd7dff54e3c00437e4da9c433c88f6d248e4754656acdf8ea7d68106b04ebb2f1cdb247fddb0bca1f8e9ed6a5":"c1bc587c3440f1f5dea5b0a4b5ee8dfd":"602cfb09e8bf250c3a2c248c4e91234629a4fe9a18c5f8b59df215e97dd873a7c1204bd0695796908daa28b77353e0e5b37877a7441d35633119c0aee9aa82c3c18a7f577d09293fafce1895dafea42f97222a33b001907b978f11471cc0adc46243e8f7fce94803d4d0595bc9fccb9b9396b52deb943280eac2c4eda54841bc":"a72d27136d0b4efc0aa2126a246ae4946e2c62cf5055f7bde263e7516ace2b7e12179980f8dcff18dc4fcd662f38d3b9dc7f8a057827ebf27e5dab85264d9325e0eea3b12f8e9e39ad686263df75b0758cc8af0be89882bb159c95b8de392b3e295c039a520d2e56b50a6370afa57adc967f7e4ff670dab471a57fb6c81401eb":128:"eb26cdf879e0cb1320d786a642c4dfc0":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"adf6006fb1cfea0f9641a4c35b864101":"d21777e1fab632bffd82a58cb732794f112cd88bdda5a7a8d19c68ace343fd786e5e512013887105c21299f2d6ae23cae4f03047c68f019d98e76d2aa1b3a204f13f4cba13f5a8957b9aa3ebb44b8024b26cb6139a3bca3ada0520a68b8571ae89501b212a1f8ede5753d557ad2f38d9465dbb09b555300b13194bf7817321f7":"a349d97fc677d8ba6f72e8cc7191ab78":"5717bee8b31640f3999efda463d4b604c1cef62fc0dcc856efb4c50a8c6b902019c663279e1bf66fb52d82f8570b9a314647f4b1ed86eb89f4be8981225f94d4285f5ca9167434a1569b520b071ee4448d08cb8623b4cda6d1f7ad28e51a2df980b5a999025e9ba646707075a6cb2464c2a0d5fc804c98a79946fae0b4fa61fd":"345af0d804490586c9ffbada0404176f4cb1331fc77705175619f27d107512d3e6068323b276743284feb938c5718a5b013305fb42282a89e270d24585236fa18265dc7e8ddd2b3efe93a2ea05ab359323c75211f2133aa97022c9a937a467af37c92a795c682a30f2ba1c4ab2dc45e63c56cd3b29b0efac2caa3150e6a72aa3":128:"ae7d2827c4f1422b728a9fd31d8d1918":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"97c83d4628b65d94341984bbc266dc7a":"e998cc0b7677fa2e504994e99cf7bbd84ba7e356d7da178f8ff40dddc046c70554ddec1d28aa23f9c4e6fcb9effeb8e28a883ad05bd0a6041b8a24d0fceff200a4e33996e279cbf029b11d58185adeb5e5e797a74d0d8b17adcf06dfbe3ee11d8e6bc3b6a8434de6e0ddfa0fd08c913f9fb911cefca72bc3f616b4ac9821f53c":"671dcc5001c2146bf8a4e522ad702bd8":"9eb12a42d2ca06a7da37fbc23d213f5e3f5e15580f01b0ea80eb4b6bd283e307dec965745ea3b3509d3269cf25808fc6a923e97d87d0c1a30b447a5a27a06d0c88a96cd90d990bf208f1abc4934f6a0ae34a694750a74ffb27f4bb66bc799d43570b01897b98b00e6a01b95b356b11d33e852b2010da5785a691246d0be2bcfb":"5a6d8930e473e292e67425748e8618569b7a478f1e183ba4e4a64385ac4b75d3d42b1afc34cc6daff341f10c1ad8f03d77179f52a7239ab3261f5fcd5a0b4282d26fa4d08bf0c8a5c96782c073ad63ad233dfe3aa0290a03d73de14d445b9ce4ea0e3b10a4aef71c5919969b7086353c942c479a1c052a749afde2325ef46f7f":120:"b81cb7bfd0aaf22b7233bcfe363b95":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2dcd5c974c5d78cde0d3a677d0b1acdc":"21b61035ca3c149d66608d77edd9770411e0ef73a97d4be9dcde95ed7997ba97117ae6c1979195a5d916ff7a1d43ddced5287004fb60a2c81c82b5f7c8a336a603c3eb7cb160bbf21b454f810681450d65deb64e7cd229333fc5e85dc29040d7da48511b6b2524f02eaeab422b5ca817796c47b9f2d7d498abc619b2ce2912bf":"7455fea1bbbfe9479830d403e33c9d1c":"d684d38f2b12111197ca512c54c8e29ef1c3b9b089a6923cdb327c763f0ac8c2ec0900c716e211e7cba1d7c13a60fe87f5d78e5d5215d92e57a0645d9b2eab4b11870b5f7bfa9f2c9e4b9fcf7596e7719b7d0c0e6cc16efe71d8bc92e16a83d4782f08e9b97dc85a18c435b51c940189a3c2608379a21a8c46633020b9b6cd10":"eb039d8cf0bf217e3f2aa529ba872c385f2770ede6ca4ed32fd22cd3fcbfddfb92d681f00df6fbf170a5dad71c9988d556cd74bc99e18a68683e0ea7b6ef90b21ff42cef8c4627e4051bff0da00054390e10036f430dbe217e5bd939295d9c9f64c2614d42ba62efe78763cc427027edbd0b7f72eceaa8b4776ba633f2c3d500":120:"18e7b50fcec11c98fe5438a40a4164":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e5b132bb7aca3e01105848f9b37ff516":"3b6d1a432b7fdb4022fc35d6b79ea03b6aa14d4ddf60a160e976909ca069242fb2e7d414d4e34ffdf9416823c4b3f4e018ac8ca689446647eda6a12029f886bcc9d18be150b451d78fa72b9c4dc13314077a5b04cffeb167005c7e8379940e6b998316bef9bf8b5a742e337663c0ed91d88d09d0c3ebec37aecaeb8277b13661":"24c1ba77d37f99253576f4963779fd59":"dedf78f05957bde906639bd35eacd8fba8582d288c9f14a25eb851a0a34c82fd91f2b78614ff46ca17fe7781d155cc30f3a62764b0614d57c89fddfdd46af4fa5fc540b9ee9076805d4d121aa0dad2449d228f1fc3c07d466c051c06db6846b9012e8d268c6e1e336121d272ca70d965389a5382fbfec0a439e979f16fab0283":"9976d2f3e16485b6b3699a541b6df386562b5ea4f6f9ff41d265b16e2d7d3c5f131bb5874cdffa87e704ae3cc24f1dccb62bababdcdedf8bac277a7277ca53a4d38fd31f9fc83f86a105663f045b70dabd553137b6d6222abb334b7be7689a4afa28103619f11b8b61aa92a63136ad5639f11bae64b25f09f1e2db701938fa5e":120:"29d1b8a68472f2da27aa84be714108":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"63628519a0f010620cbae37f8ad34570":"6db2919208b09a8abe5e95dcfe0f957dce1ae0e5b29f06bf321dc815ceca094f38c5c812f591aedbc9fc28cc0317bd1d89d4a3ba14f7b3e5fb2e03778990a6006e0ec2ceb47c923f3b17473f99521491a4cb2f9bd435e3133dc90e129ded9d15d78e75bfb3492458ce0964d5614508ef2a38ea02ec8664ba901891a7cc86a62b":"ce0ad75b94ab2d3918abf255c854ecf6":"c29384bd7cd013fa02487867595d739d99886a3bbed7fd5acd689f3a74f240f14c8fffd0bdea1f83bfef7b58ce512849e3a986f37afa54ddc11719169a49bd7e7138a745053417ff80cab1a32ae9be476ccb61ae055b319fdee5dcab629bb237aeb7d998ce36dd9c6908451c3bca9d3582f7fd60e69f6298d43a3b958341b611":"6205d37d720cbb628dbd5069f38ded8e566030eadb7fbdf2ed827d5f5a0117a21c75ade89782b3dc4e7307d9a7ae406ead0145aea1b6cce286103a55ce195999214b84bc25281bd7fe511868a69944d483e05ea6b39b11558ab46a33d227734eb3a386e30d58c3029ef0cb4046c0856078d57a6df194aa8c0e10f9b6ed8fb40b":112:"423fd542498825cc54501cb42b2c":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7c0e1c6bde79315f79f22ebc77107228":"9cd56b16aa4e130c3dbf30e701e8784ff39f866031e778e9ab72b858c3e333e9589b4b6cd89d6546e52a478d92bd59d0e4756d6b5037ab1873d88242ef31be643745d26395385b71034f6f0c0c84816f0c6755965fc8a7718f891d618f226684bcc77f87fe168e178b330d4b4c0eb4791028017fe6c42e68b0e195654a5d65e5":"9011dee57c3b8e112efa4d2b816cf189":"57bfcccc6f00c0abbc5f30589dbb47597838fdd50dd622eeedee33824e63ba78753c05d2543687f60dde501757b6fb74c17fe34b3e9c455eb38cf078c8c77eff68d3e3b8c244cde70ddf61703664d34159a11785cc6626eb1cad70ab94405616fff52c0f781ee6b43ef2a449924a76b762035ff479cd6006c21a62a56a14650f":"2c1ef998747163104e5a7d2a440a1a1cc2c20446a9d0cf5f138f85c1f5afd90fdc3fa4932845c150518f40bfd56569a5479126c49061ef350b4fae895170b4eb94dad7b456890a822e1bcb57f9bde5bea747d17be3d18ea201cd99bc46fee21132c6918ffb0117744f6ba3f25bc8a50f9719854314b934c3a3230f4757a49113":112:"4ef9aebb721dabe2d09101037a63":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"93f3fa85dbdb2784fb078a34b1116eb1":"e7a0fafda0b90cada671f5e2adfd2e2a5f14e4613ea76aad57e79e2cb532f655210614e2036d7ac005ed5e516814d8667ed71e0f29b9c7b470f4722327407cd6ce6dbd298cee37bff33c35e34cdfebbbf33934673469d6b98becd6d26868977e69e06deee99c118fd4da3530d367d20d15107c03efe0d7e7b38710231e0dcdf0":"f5a7b0b26d1e86f4fc69f81c9eeff2cd":"3d2a1dadccc597b5e7b6ce48760150dee01c8550b525c587abcce8c2c7fb6291683a58c2e42e7b7ba6a3c2a117ddb7e67ea058a78989d67946fd9551e30fcb52618dcb9fae079ca56b74572d7b6a7b6a5c60e906e9639eac5ee1a5a2db864721119da2c4c5110c2b8d487e792cf6929600f1587cb2d48efe6864019afc32af6e":"60da3f4b3a263bc0178379646bce391bf552f60d2833261962375d2960c629dedac681d86f7915ea3cffdad0f37e409668f923d7c860525b994b325396531994a2fbb2d4e909d0b1dce322e078b4b8cd99820a39ffd7b468bd3e73b418b9a2cd5757b7d45f0363574c925bc22d66645abd95a6b29ea6366d8c2252d1c5710d45":112:"833d2c55f5ee493060540d6b5349":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"163c05f69cdc4e518ff6445911d1ede0":"84d8a1855423293de37ebfd9715a9b46b175bc6d44e94ac8a3e7d409e8a227a57a6b85144a8ee23564fadc28742b69e89c0d4aadf0a786f9a5d5f9198923643ffc0bfd0f96e43b08f1435d4afc0e49c0e2241d938780975bc7a31cdf38f30380753bdd66be72b4dff260a35dc10b9ba35059ba61b0beab16e35068721bd950e3":"4b16188249096682b88aa5e4a13f62c1":"a238d1111efb7811f6838c3cb6f3bf3e0ecee6d8efb26845391f8adb51e497e840ea40318bf8e3cf0681c3b69951c4f03d5a4b5edf7119a150eafe6dc16b68f3d2b91e1454637135148f4fec132bfd96ca088169a35961d4c663535b9852f12a00ec4c08082553a09ea046379ce747c717036154d063d876a2b95cd7bdb42daa":"3bf751cf63bc1b433be6075303986ac1d0592dee400774d0bb7a9e72224417639e1e83e69f34226b873365f41fdac925628f32ed4b572b374310edfd892c5e0c3197e59efbc22ee11f0d4a66bd73a6f5b0de7c1cbb0612a63a262af51d418577a9bae0a8577e547382878f13047a92f51a867f8b7d283d2099c34c236918f718":104:"0d778299c4dc0415ca789dd5b2":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a2ff7cb9fe33b04a087d9ee6db58ec0e":"ed7c22218009ceb5b322045fecc1fd748f27655397a09c2c29813eba9a5cbeebe88d4a35dfd741ef0ac1d11c4adbc6bfae824af88e3ce09f68d8ca7671de91ec9e2bd5f790d1cb1748e34b3560c9b10726ea4b85b127731d8a7fdfd0ddbed11aaf181799f71a68e542b43ed9889237d2fffe370f41064b810c2e14d1ab661517":"6c58eb8f1f561b180f07ede0d3ae3358":"00cb63fa0cf526c6db37e33cf092f3f421fd258d28446c9a7c687b941c7eb5e1c5be267db992d0d93ede0b09030f979d451ecbdbbbb386cf1d74b23d55b74f5f4d520c000c9a41922f54567ca7dfcd84c68883a23c7acc3db3cd8d340217ee7c5ea39b41cf2c0e58c270a19ee9e146d2dbfdaf8ba3e24fda7f2c5e4ba6563ef4":"f0f119bddf5ddf147fe06da9d4510d97369d8e345519df2188b8d2dbaf8b7d3e01f3c26475141aae224e5ce1b131c8096f0e2a17c4c2df62f76f009cfc8aa20ddcd75a6a4281cfa2225485ca22aabcb60ff11265acb92a19ed66797fc2b418ae4b8c70fbecf0fd63f6c22ad62bfd6f40d8d0e2abeb620b7b4f5d8b3e041a53e6":104:"7885ca22c4afd7dc6cb440ea35":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2e739a485b6293b43535379e3b309fe8":"699b9a5668042c48c63ffb323c0fab18446546417b2f33a69addce6178f9d5b7dfa891ff2004eb57a98ca012c2668e0614276d89b21b7bfa436b2aa1582daaa81a6a7722186e99dd16a5786fd0e8b09b194746232fd413984484524793a379112e297d733dce063408fe59367f5929c5086bc2191a8fdd60a346052c0d109d57":"c4deca3eeea80352624c93523f35e0ae":"704aa36a82d02c56f4992469bb7e8a3f7dda1326068bf6017e4a0c810352b476aea129c1ba1d4974bc0d0503dcf816b89c0dc8e6d066774ce97cea65b5fb5c7b5a7f93e5e2c7126dd3b241b958e47d8150b422bb91c4afc47d53cfc2d20176c2ea0c85b376dc46a86bbaa53c584aa561f6662d11de4e39e50f1a095b8555137b":"30b8fa2e52577a7e5cdc12a7c619615b134ad4b41893ba9120651cd35c6f2d48ec6b8b9fa99366c4d60e643a8ccb2cbb3568f7647f4ad1a12d14deb8aac00dc4ef780133ee8df8f494675deb7f678fed54e70d6bf43476854eb0286a49cd322cc18daa238d4580ee665fbc759295a3e12567beff3e823811093cf0f02d00820b":104:"ff89ee52fa4eaeb748c8676490":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6bbb12361c95953a8d757bcbb92568eb":"c3fccc5693abe53a13e5209f80611fad1e81e7ce19a4612666d954b4b6d2062bee764181716d5fe0fe1de485bb739d6e8625d5b6cedcaaf6e4e5ec350bc2168c24d7764e75b0cf079d7ad1b5fc24dbed14c5ae4714734f424b3611de0f70a0a8d752fb143e1b7e51ebc965a06021de3718af30b067dde270d804fb5b87ffb29f":"48ca821e5e43fd58668380491d58cdfb":"e97280fd78eb8bd695227fc79420971081de8f24bc95d9a1794ed2bebf5b68d8b43ae8288eb5ce72db0740334ff9bc9b4e660418d3cff8c344e50c7962c367c26247806d0b5c2ae0420a724203dcf4fdefd6513f8263d995afa4780a9c4e92c25496106fec370d0450d907225190ecccfae634f11f8f74f6422a652b2b9af9e5":"61cfc5a6ab6847bf0127b35ce0712cbfa9cd28dfb3f0b4cac2624c52cf55f311e55e9abff2d4514c6feff801ea8739f874ded2efce4a440f2acd95eba6c75e09bcd91b898c98563a26b3df415658c4d04a6aaf547a90b03d1789bdf7ab8f09f6d9f222f567461380372a976240b7b180c3fa7b4507e53815af3f6b4a46973806":96:"f86d5374d1ad269cc3f36756":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1a0a9b2dd1ae31b3e47b6df979dd2fbf":"353786f96620ae7dfa7aee163c7bb30384bb324b516cad13872f48e7251f6f4c5906748bf2a2f6167bc14453b2b2f513804308ba92d69639beac2f25274bd5477744281b7ef7d0661b3672cd45abd5bd30d98deac4ad0a565308c0224dff59e3190c86df6a5c52055f8e0f73fa024f99162219837c999a9c0a12c806f01227af":"b39c8615fa062412fd9b6ac3a7e626f6":"dea75b17cd13dd33b5016de549c44fa9c88baf424ac80c4835e868acb58082ffc4255c655878a1c627a44160d5e5054a0a04f65fdfb542cd342be2aa2e000117bf8cd67b02f3a3700755508f9af8379c226aded404117a5ca3fa70968495eab287064ee584b4ce596612f2c465d997518c6995518e3bb881967ab6b99d7f62d7":"8430b8735f0b002e098d513eec7b3a8431a3fdac2b7faf256a7bcf08f3dcd6fa549f029240acae4dbd4ad54752ba358c14893aaa67a003261c252020d14b521906b23c37dd80af703c2964ce13773dd72fa56c389768c6efbd485953900b56f6bbaa837f1668f478677621a297d4b5a2c1a86f689d8644caec51435b0dd66c77":96:"f000f2d398df18534428f382":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4da736fba2b7202ea2ba60793da3344d":"4f004852edd5dcde13507252ed8c2b20a093ac9081ce2a8133c48d2807e5f968c04a20dd52c070d6c43c704b8650da7f94e5450e0d34cfc2b2d2ba7cb5343e6b4281633c6c065dae27fab18ca71bea018eba94d20e78c5e3223c70f50cb77399c1a89436f1e7213673ae825d4fc5523645031696df10f9b5238c03f733b4dfcf":"8572af442c9af9652a192d893c18b8c3":"429915c3309fba2a42b8e89f42a9376a2f329805a4d6daae11e9a20c2f982671ef8a7539a9657777d03cbf755ef93be0d8e426ed00899a59e8b963fd44269d64692ed07b231cde93e85397cf125a75032ca3726ea1ff1b05d79f2040c1135012b90597186c1db2e16cd128d45a7b9d934ec01341d9030e9721c62f62003059b8":"ff4e46c4236304b8d52ba2d6db269f95d2cd5fe4318ce930d407051469c7e36e44bbcc909c4966276f5a2ec70021982fecbeae34df235a3e9e0370afa5a269ca8847a84b8477f7ddd6055d0f800ff4d413f63db517c96d15dbe78655748edd820f2ee79df5eca31711870022f1f5394b84f05bfef97f99cbd6205f8e522b3d5e":96:"624b0b5b6374c5153835b8e5":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5bcc874114b9d78c3eb748a783d1448c":"7d57418bcea007247f5e18c17a2e4601c3eb8c89f61ed365d5aebee7593cdd63871d964a25fc9d723f291d39e0c4f75012471faf8e06db60c4ad8a26cf434bd82a29a8b653fdda1b86a7e4800c1d70cb5d8b8a1d1af52894082bb282ffdde8f0128a4abb68aedcfcb59160f6b5aaf452812f4d00472d2862a8b22480e71231b3":"5f4fde440faa9537d62e62994ab20fb5":"b5dfe0d971f2920ba4c029d4c346a49788b499faacdb18b8f905f1457a8b9fa48709893516a7b48bc601710bfd73c12da094c29df5776d491c9978f8ab237f605785b0304488f1c20bf5a767ba6d5e1e2961957aa107bdba2358b81ef1e06576db985b3ef8194725b75d49de1de3a57f161dede508e37ad3356134fa0a1aa48e":"6bc0dec98bece6c4e245fe978f6db113deca75e1b475bc31f1da0c7457a85ee7aac8be5f2121c0610b99a2c64519fc2514b643c379b4f53c5432b9729aea9fcecb88a2e2d0a6e74be04859a66f55fb2af1598bcb039108ef7fcfd99d94e79287ec1f62bd1bf5ff9dd51ab12fae4f6e21b95ca50032f9a65bd85f9a1aa0524950":64:"354fb8bcd38f2a26":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"427c89146eb7d76578dc173bd9e15cda":"1d39249130404d60ed40241cf3354458e06f1474b3723569d88235f03098053fc99010f39435620acc710a4e386b2ecbf9b327a8dcfbeddc084353fff029d24787ce81e74a5e1ac1ef096e0a2ae882a669ca168275806bb7f462e66c941fffc6ed44b9628450e03a5032676c1ee4aedfcb1767150d56c7d73a8a47f6d19854fa":"0092e76cd8882e5f77f4c8514491705d":"0ac4631358bb9375e07756692bde59d27012e921f054fdfea0ddb242c43421f4c7241cb210cb5c172d053de2763efd565f1138fbe7f9cd998d825ab800df900843474ebf857b3371c555b89670e86354fe430f715ebbd0ecad974fea34e3bbae43d3ca3ca178f3361f0a11fd75f60e9140f44364b02a073dcce8339fa28cb5ad":"2b385e9df4ed41cdca53a4ac8cb3e0af75eddd518b6727380712950d96c34bc6a0a6ac02184c1987548932b116ec9ae7abf01157a50e422b3e6aa62deb0cb2d81bf7fe0c25041a355ccaaeb049abb0393acfe90d869e9edfdfb646971bbb1ba9e5983cd0e2739158fab31be26cfdf9286d347b58b00f75d9f48ece1353308a91":64:"905cdf228a68bebb":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2e09660909a9aa0a50958016c3e07895":"d7b2ceb182d4a8ed57572c4237ba99bbdd589093db0f71732f9e67559d3054fa1af195aa4864fde413549d27468ffe7c5c23e242cab4ae4bb9e2657422dc3fc78fbdcde892ed202be1e47f095b09cfc53cfe86cb16e2e95444492ad5d0eef053178d6b0485731be7a5193563bf56f63cc0687fc01679254d74e9ed788645004c":"c4f865be8b5062e488b1725749a87945":"26f50acdefde4d585fc6de6c6234c9ead40684349a2bfd022df93d9774c9f5b8f50474032a417bdcc21a74da72c0297437a0cef8f527c9205797f77b4227c272e08ad0b120a2a31ef13e372cad2387ccc1bcefc88dd58899821d68f3be6a4b2cd08697d1897efcd6ed3a0d7849f6cbb50e46800627cfd26964e2cfe9f36624d9":"321f6d79a6658c7c2b67fe3c932237593a6ec7e6fd8198abc6b0b6ba5d4dac9e0695f0c64dde1c94c0383839ee37f8bbfcc516f24871fd79a9b9135ceef841e4c8ddf6b57962c0e8ad7aaf210e97a43489097270756404fddde637de461b8644fef244142820e1af12b90f16748b0915a6b773dfbbdf6b16f1beaccb4cd5edba":64:"b294db7ed69912dc":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5e45d57981f65a6b170efa758cf4553d":"bc8d4c418442743f2fdbaf95b8f87b7c15a3176085e34addf4cf0fb3c2df15587526691b07e6407ba16999b72382635a2aebb62d05c1547a7d074c857a23107c7577864e7f7bcdb5b6d1fb50136391f89c42d3f02754b0e4ed0fcb0c03576b986af5c12cf9bf5e0c585d6aaf49d0c6fb2ec30eae97b2b850a35474bfb9a2c069":"b43403b627fe9e0135192d1a048c6faa":"7a27ea26c7607e4e7e627f3161bdf15f21f3d62dc33df14951971712f960d3b2082d75395c5008e5ea00d282d350f86dac8c61f5c0f90e7797a5b61ee96f7e332ec5de51cb1377e47c641f326d1e58817c8c95feb5b2923758e33b279191d0a9ffd09b7619b0318a70775e36abf5f7ab59422ff68914e7b478c448a7b141c4bf":"90d8a6218da063c38e0f06d548a3d5685fd3e0fbaf609c77bdd573bb9c63f30590eaf8b181a2feb81c8b3f5f34a94dc94b905036a6c69b97263302b8674d9e09325065588e97c0b5b33116981f1f362a7c5bb1e996c126c31fbd63791772f4d594632f408fdf011b3f2cc750b060452c181e8e09697c8662c00c8d4f29d875a7":32:"611abef7":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"00d4bf20509a61bc76430ffa5f013589":"036a191a388cf3c57c9e6f0e2f5c8bc3d5c25ee8e2fedfadb7b7433155c7e79304f0905ab2a17e1f04f2f2dacd4a41521d6ce213961df9dc9101d41df4e44246488fbedb75a01256fbc7784769eb8f99d44d5eabf93cf667ebae2437ccedc79efa58c075183d46a5c20bf4c81e0f9754ad35af65f7c8aafe7daa3460c6892b1a":"25b1026a009470a5ca8caeeb67200792":"fd75acfd5aa25fb8bccb53672e5d6a8080081506cf03df2bab0746a353510996e0237d6354ee0210a41f20f88ec6569f2b200b28c6a31464a0533a6bc45afef3ae381425a3606de2866dba694124d96da9d0a2b061b787524ee6e5d3b1ef5c4bcf168810aa177660b7e1379ac8a480ce43d73dfcc696873cea2df419f372651e":"cab80615b666c47fcabf0d9805842ab2805150abad4de0ae8b12306bed504d4a7f91f52379df65cb9587577e59dafcd4203d2ed2743d35472285e9522db0ce3dd027a01c79ac64caee29ef3752a077254b0dca269f6f206f6cc575e8fedb0ba525dcf6252fa6f7b688556933f1dee84b2ad36a266695ce8672229cedd82f20a1":32:"3287478c":0 - -AES-GCM NIST Validation (AES-128,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fe481476fce76efcfc78ed144b0756f1":"246e1f2babab8da98b17cc928bd49504d7d87ea2cc174f9ffb7dbafe5969ff824a0bcb52f35441d22f3edcd10fab0ec04c0bde5abd3624ca25cbb4541b5d62a3deb52c00b75d68aaf0504d51f95b8dcbebdd8433f4966c584ac7f8c19407ca927a79fa4ead2688c4a7baafb4c31ef83c05e8848ec2b4f657aab84c109c91c277":"1a2c18c6bf13b3b2785610c71ccd98ca":"b0ab3cb5256575774b8242b89badfbe0dfdfd04f5dd75a8e5f218b28d3f6bc085a013defa5f5b15dfb46132db58ed7a9ddb812d28ee2f962796ad988561a381c02d1cf37dca5fd33e081d61cc7b3ab0b477947524a4ca4cb48c36f48b302c440be6f5777518a60585a8a16cea510dbfc5580b0daac49a2b1242ff55e91a8eae8":"5587620bbb77f70afdf3cdb7ae390edd0473286d86d3f862ad70902d90ff1d315947c959f016257a8fe1f52cc22a54f21de8cb60b74808ac7b22ea7a15945371e18b77c9571aad631aa080c60c1e472019fa85625fc80ed32a51d05e397a8987c8fece197a566689d24d05361b6f3a75616c89db6123bf5902960b21a18bc03a":32:"bd4265a8":0 - -AES-GCM Selftest -depends_on:MBEDTLS_AES_C -gcm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_de.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_de.data deleted file mode 100644 index 841c6fa367..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_de.data +++ /dev/null @@ -1,675 +0,0 @@ -AES-GCM NIST Validation (AES-192,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"806766a4d2b6507cc4113bc0e46eebe120eacd948c24dc7f":"":"4f801c772395c4519ec830980c8ca5a4":"":128:"8fa16452b132bebc6aa521e92cb3b0ea":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0c2abdcd2e4ae4137509761a38e6ca436b99c21b141f28f5":"":"335ca01a07081fea4e605eb5f23a778e":"":128:"d7f475dfcb92a75bc8521c12bb2e8b86":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"eef490a0c2ecb32472e1654184340cc7433c34da981c062d":"":"d9172c3344d37ff93d2dcb2170ea5d01":"":128:"017fef05260a496654896d4703db3888":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fe0c3490f1f0dba23cf5c64e6e1740d06f85e0afec6772f3":"":"f47e915163fa3df7f6c15b9d69f53907":"":120:"14e1a057a2e7ffbd2208e9c25dbba1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4356b3b1f308df3573509945afe5268984f9d953f01096de":"":"a35b397b34a14a8e24d05a37be4d1822":"":120:"e045ecba220d22c80826b77a21b013":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e2898937cc575c8bb7444413884deafe8eaf326be8849e42":"":"169a449ccb3eb29805b15304d603b132":"":120:"3a807251f3d6242849a69972b14f6d":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"75683c7df0442e10b5368fcd6bb481f0bff8d95aae90487e":"":"538641f7d1cc5c68715971cee607da73":"":112:"07d68fffe417adc3397706d73b95":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0724ee1f317997ce77bb659446fcb5a557490f40597341c7":"":"0d8eb78032d83c676820b2ef5ccc2cc8":"":112:"7da181563b26c7aefeb29e71cc69":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"be2f0f4ae4ab851b258ec5602628df261b6a69e309ff9043":"":"646a91d83ae72b9b9e9fce64135cbf73":"":112:"169e717e2bae42e3eb61d0a1a29b":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"583c328daecd18c2ac5c83a0c263de194a4c73aa4700fe76":"":"55e10d5e9b438b02505d30f211b16fea":"":104:"95c0a4ea9e80f91a4acce500f7":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b40857e7e6f26050f1e9a6cbe05e15a0ba07c2055634ad47":"":"e25ef162a4295d7d24de75a673172346":"":104:"89ea4d1f34edb716b322ea7f6f":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"627008956e31fea497fb120b438a2a043c23b1b38dc6bc10":"":"08ea464baac54469b0498419d83820e6":"":104:"ab064a8d380fe2cda38e61f9e1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8c386d67d7c2bfd46b8571d8685b35741e87a3ed4a46c9db":"":"766996fb67ace9e6a22d7f802455d4ef":"":96:"9a641be173dc3557ea015372":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"711bc5aa6b94fa3287fad0167ac1a9ef5e8e01c16a79e95a":"":"75cdb8b83017f3dc5ac8733016ab47c7":"":96:"81e3a5580234d8e0b2204bc3":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c74620828402e0bdf3f7a5353668505dc1550a31debce59a":"":"cfbefe265583ab3a2285e8080141ba48":"":96:"355a43bcebbe7f72b6cd27ea":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1eb53aa548b41bfdc85c657ebdebdae0c7e525a6432bc012":"":"37ffc64d4b2d9c82dd17d1ad3076d82b":"":64:"34b8e037084b3f2d":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"50d077575f6db91024a8e564db83324539e9b7add7bb98e4":"":"118d0283294d4084127cce4b0cd5b5fa":"":64:"507a361d8ac59882":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d9ddca0807305025d61919ed7893d7d5c5a3c9f012f4842f":"":"b78d518b6c41a9e031a00b10fb178327":"":64:"f401d546c8b739ff":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6ed8d8afde4dc3872cbc274d7c47b719205518496dd7951d":"":"14eb280288740d464e3b8f296c642daa":"":32:"39e64d7a":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"80aace5ab74f261bc09ac6f66898f69e7f348f805d52404d":"":"f54bf4aac8fb631c8b6ff5e96465fae6":"":32:"1ec1c1a1":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"23b76efd0dbc8d501885ab7d43a7dacde91edd9cde1e1048":"":"75532d15e582e6c477b411e727d4171e":"":32:"76a0e017":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"94c50453dd3ef7f7ea763ae13fa34debb9c1198abbf32326":"":"1afe962bc46e36099165552ddb329ac6":"b2920dd9b0325a87e8edda8db560bfe287e44df79cf61edba3b2c95e34629638ecb86584f05a303603065e63323523f6ccc5b605679d1722cde5561f89d268d5f8db8e6bdffda4839c4a04982e8314da78e89f8f8ad9c0fee86332906bf78d2f20afcaabdc282008c6d09df2bfe9be2c9027bb49268b8be8936be39fa8b1ae03":128:"51e1f19a7dea5cfe9b9ca9d09096c3e7":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c6a98102af3d875bcdebe594661d3a6b376970c02b11d019":"":"bea8cd85a28a2c05bf7406b8eef1efcc":"f2f80e2c042092cc7240b598ab30fad055bce85408aa0f8cefaf8a7204f0e2acb87c78f46a5867b1f1c19461cbf5ed5d2ca21c96a63fb1f42f10f394952e63520795c56df77d6a04cb5ad006ee865a47dc2349a814a630b3d4c4e0fd149f51e8fa846656ea569fd29a1ebafc061446eb80ec182f833f1f6d9083545abf52fa4c":128:"04b80f25ae9d07f5fd8220263ac3f2f7":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ec3cc45a22fdc7cc79ed658d9e9dbc138dcc7d6e795cba1a":"":"b10d9c70205e142704f9d1f74caee0f6":"714994017c169c574aaff2f8bad15f8fa6a385117f5405f74846eca873ca4a8f4876adf704f2fcaff2dfa75c17afefd08a4707292debc6d9fafda6244ca509bc52b0c6b70f09b14c0d7c667583c091d4064e241ba1f82dd43dc3ea4b8922be65faf5583f6b21ff5b22d3632eb4a426675648250e4b3e37c688d6129b954ef6a8":128:"d22407fd3ae1921d1b380461d2e60210":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5a32ebc7a2338038ced36d2b85cbc6c45cca9845a7c5aa99":"":"9afe0882e418c9af205eeb90e131d212":"61ff8a8bc22803f17e8e9f01aff865bc7d3083ff413ce392a989e46ebed5114894de906f7d36439024d8f2e69cc815ac043fff2f75169f6c9aa9761ff32d10a1353213ac756cb84bd3613f8261ef390e1d00c3a8fb82764b0cda4e0049219e87d2e92c38f78ffac242391f838a248f608bb2b56b31bbb453d1098e99d079ea1b":120:"fcbb932ddb0128df78a71971c52838":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9bf22885e7f13bcc63bb0a2ca90c20e5c86001f05edf85d8":"":"99dec21f4781284722b5074ea567c171":"9f4176dacf26e27aa0e669cd4d44bca41f83468c70b54c745a601408a214bf876941ae2ae4d26929113f5de2e7d15a7bb656541292137bf2129fdc31f06f070e3cfaf0a7b30d93d8d3c76a981d75cd0ffa0bcacb34597d5be1a055c35eefeddc07ee098603e48ad88eb7a2ec19c1aefc5c7be9a237797397aa27590d5261f67a":120:"18fd1feec5e3bbf0985312dd6100d1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cfd75a9d3788d965895553ab5fb7a8ff0aa383b7594850a6":"":"a6df69e5f77f4d99d5318c45c87451b2":"041aeb2fa0f7df027cd7709a992e041179d499f5dbccd389035bf7e514a38b5f8368379d2d7b5015d4fa6fadfd7c75abd2d855f5ea4220315fad2c2d435d910253bf76f252a21c57fe74f7247dac32f4276d793d30d48dd61d0e14a4b7f07a56c94d3799d04324dfb2b27a22a5077e280422d4f014f253d138e74c9ac3428a7b":120:"fd78b9956e4e4522605db410f97e84":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b0b21ae138485591c6bef7b3d5a0aa0e9762c30a50e4bba2":"":"56dc980e1cba1bc2e3b4a0733d7897ca":"a38458e5cc71f22f6f5880dc018c5777c0e6c8a1301e7d0300c02c976423c2b65f522db4a90401035346d855c892cbf27092c81b969e99cb2b6198e450a95c547bb0145652c9720aaf72a975e4cb5124b483a42f84b5cd022367802c5f167a7dfc885c1f983bb4525a88c8257df3067b6d36d2dbf6323df80c3eaeffc2d176a5":112:"b11f5c0e8cb6fea1a170c9342437":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8775665aba345b1c3e626128b5afa3d0da8f4d36b8cf1ca6":"":"cd17f761670e1f104f8ea4fb0cec7166":"2ee08a51ceaca1dbbb3ee09b72f57427fd34bd95da5b4c0933cbb0fc2f7270cffd3476aa05deeb892a7e6a8a3407e61f8631d1a00e47d46efb918393ee5099df7d65c12ab8c9640bfcb3a6cce00c3243d0b3f316f0822cfeae05ee67b419393cc81846b60c42aeb5c53f0ede1280dc36aa8ef59addd10668dd61557ce760c544":112:"6cdf60e62c91a6a944fa80da1854":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cc9922299b47725952f06272168b728218d2443028d81597":"":"9b2f1a40717afcdbb6a95d6e335c9e4d":"bcfca8420bc7b9df0290d8c1bcf4e3e66d3a4be1c947af82dd541336e44e2c4fa7c6b456980b174948de30b694232b03f8eb990f849b5f57762886b449671e4f0b5e7a173f12910393bdf5c162163584c774ad3bba39794767a4cc45f4a582d307503960454631cdf551e528a863f2e014b1fca4955a78bd545dec831e4d71c7":112:"dd515e5a8b41ecc441443a749b31":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5a27d718f21c5cbdc52a745b931bc77bd1afa8b1231f8815":"":"59661051912fba45023aef4e6f9380a5":"2b7ce5cea81300ed23501493310f1316581ef8a50e37eaadd4bb5f527add6deb09e7dcc67652e44ac889b48726d8c0ae80e2b3a89dd34232eb1da32f7f4fcd5bf8e920d286db8604f23ab06eab3e6f99beb55fe3725107e9d67a491cdada1580717bbf64c28799c9ab67922da9194747f32fd84197070a86838d1c9ebae379b7":104:"f33e8f42b58f45a0456f83a13e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b83e933cf54ac58f8c7e5ed18e4ed2213059158ed9cb2c30":"":"8710af55dd79da45a4b24f6e972bc60a":"b7a428bc68696cee06f2f8b43f63b47914e29f04a4a40c0eec6193a9a24bbe012d68bea5573382dd579beeb0565b0e0334cce6724997138b198fce8325f07069d6890ac4c052e127aa6e70a6248e6536d1d3c6ac60d8cd14d9a45200f6540305f882df5fca2cac48278f94fe502b5abe2992fa2719b0ce98b7ef1b5582e0151c":104:"380128ad7f35be87a17c9590fa":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d2f85f92092385f15da43a086cff64c7448b4ee5a83ed72e":"":"9026dfd09e4553cd51c4c13ce70830de":"3c8de64c14df73c1b470a9d8aa693af96e487d548d03a92ce59c0baec8576129945c722586a66f03deb5029cbda029fb22d355952c3dadfdede20b63f4221f27c8e5d710e2b335c2d9a9b7ca899597a03c41ee6508e40a6d74814441ac3acb64a20f48a61e8a18f4bbcbd3e7e59bb3cd2be405afd6ac80d47ce6496c4b9b294c":104:"e9e5beea7d39c9250347a2a33d":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"de7df44ce007c99f7baad6a6955195f14e60999ed9818707":"":"4d209e414965fe99636c1c6493bba3a3":"da3bc6bdd414a1e07e00981cf9199371192a1fb2eaae20f7091e5fe5368e26d61b981f7f1d29f1a9085ad2789d101155a980de98d961c093941502268adb70537ad9783e6c7d5157c939f59b8ad474c3d7fc1fcc91165cdf8dd9d6ec70d6400086d564b68ebead0d03ebd3aa66ded555692b8de0baf43bc0ddef42e3a9eb34ab":96:"24483a57c20826a709b7d10a":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1dfa5ff20046c775b5e768c2bd9775066ae766345b7befc3":"":"2d49409b869b8b9fc5b67767979ca8cd":"e35d34478b228bc903ea2423697e603cc077967d7cfb062e95bc11d89fbe0a1f1d4569f89b2a7047300c1f5131d91564ec9bce014d18ba605a1c1e4e15e3e5c18413b8b59cbb25ab8f088885225de1235c16c7d9a8d06a23cb0b38fd1d5c6c19617fe08fd6bf01c965ed593149a1c6295435e98463e4f03a511d1a7e82c11f01":96:"23012503febbf26dc2d872dc":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2df3ee3a6484c48fdd0d37bab443228c7d873c984529dfb4":"":"dc6aeb41415c115d66443fbd7acdfc8f":"eafc6007fafb461d3b151bdff459e56dd09b7b48b93ea730c85e5424f762b4a9080de44497a7c56dd7855628ffc61c7b4faeb7d6f413d464fe5ec6401f3028427ae3e62db3ff39cd0f5333a664d3505ff42caa8899b96a92ec01934d4b59556feb9055e8dfb81f55e60135345bfce3e4199bfcdb3ce42523e7d24be2a04cdb67":96:"e8e80bf6e5c4a55e7964f455":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ce0787f65e6c24a1c444c35dcd38195197530aa20f1f6f3b":"":"55300431b1eaac0375681d7821e1eb7a":"84a699a34a1e597061ef95e8ec3c21b592e9236ddb98c68d7e05f1e709937b48ec34a4b88d99708d133a2cc33f5cf6819d5e7b82888e49faa5d54147d36c9e486630aa68fef88d55537119db1d57df0402f56e219f7ece7b4bb5f996dbe1c664a75174c880a00b0f2a56e35d17b69c550921961505afabf4bfd66cf04dc596d1":64:"74264163131d16ac":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3a15541b5857a668dc9899b2e198d2416e83bac13282ca46":"":"89bf8ab0cea6f59616eeb9b314d7c333":"4d2843f34f9ea13a1ac521479457005178bcf8b2ebeaeb09097ea4471da9f6cc60a532bcda1c18cab822af541de3b87de606999e994ace3951f58a02de0d6620c9ae04549326da449a3e90364a17b90b6b17debc0f454bb0e7e98aef56a1caccf8c91614d1616db30fc8223dbcd8e77bf55d8253efe034fd66f7191e0303c52f":64:"8f4877806daff10e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b61cdfd19c136ee2acbe09b7993a4683a713427518f8e559":"":"4066118061c904ed1e866d4f31d11234":"153c075ecdd184fd8a0fca25cae8f720201361ef84f3c638b148ca32c51d091a0e394236d0b51c1d2ee601914120c56dfea1289af470dbc9ef462ec5f974e455e6a83e215a2c8e27c0c5b5b45b662b7f58635a29866e8f76ab41ee628c12a24ab4d5f7954665c3e4a3a346739f20393fc5700ec79d2e3c2722c3fb3c77305337":64:"4eff7227b42f9a7d":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ce175a7df7e429fcc233540e6b8524323e91f40f592ba144":"":"c34484b4857b93e309df8e1a0e1ec9a3":"ce8d8775f047b543a6cc0d9ef9bc0db5ac5d610dc3ff6e12e0ad7cd3a399ebb762331e3c1101a189b3433a7ff4cd880a0639d2581b71e398dd982f55a11bf0f4e6ee95bacd897e8ec34649e1c256ee6ccecb33e36c76927cc5124bc2962713ad44cbd435ae3c1143796d3037fa1d659e5dad7ebf3c8cbdb5b619113d7ce8c483":32:"ff355f10":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5f659ed236ba60494e9bf1ee2cb40edcf3f25a2bac2e5bc5":"":"ad49f12f202320255406c2f40e55b034":"6da62892f436dfe9790e72d26f4858ca156d1d655c9cc4336fcf282b0f3f0b201e47f799c3019109af89ef5fd48a4811980930e82cd95f86b1995d977c847bbb06ecdcc98b1aae100b23c9c2f0dcf317a1fb36f14e90e396e6c0c594bcc0dc5f3ebf86ce7ecd4b06d1c43202734d53f55751a6e6bbda982104102af240def4eb":32:"cb4d8c1d":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a73f318b1e298ba4ac0ab2aed74f73543b1017cccbd1b240":"":"abe33b7e8d88bd30deb96d1e90c4e951":"6de616b000047b14b6759015183dd753c61499c0e665d06a89e4fb0cd0dd3064ff8651582e901ef5d0cdf3344c29c70c3aabc2aaf83cb3f284c6fe4104906d389b027e7d9ca60d010f06ef8cd9e55db2483d06552ddbe3fc43b24c55085cd998eae3edec36673445bf626e933c15b6af08ea21cbace4720b0b68fe1a374877d5":32:"4a28ec97":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"73d5be74615bc5b627eedfb95746fb5f17cbf25b500a597f":"fc40993eb8559e6b127315c03103ce31b70fc0e07a766d9eecf2e4e8d973faa4afd3053c9ebef0282c9e3d2289d21b6c339748273fa1edf6d6ef5c8f1e1e9301b250297092d9ac4f4843125ea7299d5370f7f49c258eac2a58cc9df14c162604ba0801728994dc82cb625981130c3ca8cdb3391658d4e034691e62ece0a6e407":"eb16ed8de81efde2915a901f557fba95":"":128:"804056dca9f102c4a13a930c81d77eca":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a249135c9f2f5a8b1af66442a4d4e101771a918ef8acee05":"c62b39b937edbdc9b644321d5d284e62eaa4154010c7a3208c1ef4706fba90223da04b2f686a28b975eff17386598ba77e212855692f384782c1f3c00be011e466e145f6f8b65c458e41409e01a019b290773992e19334ffaca544e28fc9044a5e86bcd2fa5ad2e76f2be3f014d8c387456a8fcfded3ae4d1194d0e3e53a2031":"80b6e48fe4a3b08d40c1636b25dfd2c4":"":128:"951c1c89b6d95661630d739dd9120a73":"b865f8dd64a6f51a500bcfc8cadbc9e9f5d54d2d27d815ecfe3d5731e1b230c587b46958c6187e41b52ff187a14d26aa41c5f9909a3b77859429232e5bd6c6dc22cf5590402476d033a32682e8ab8dc7ed0b089c5ab20ab9a8c5d6a3be9ea7aa56c9d3ab08de4a4a019abb447db448062f16a533d416951a8ff6f13ed5608f77":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fa832a4b37dcb3c0879a771bb8ae734f0d88b9be497797a8":"0f1105f9ec24121232b60b6ef3c3e8ca9eec1a3d7625004b857d1d77f292b6ec065d92f5bb97e0dc2fdfdf823a5db275109a9472690caea04730e4bd732c33548718e9f7658bbf3e30b8d07790cd540c5754486ed8e4d6920cefaeb1c182c4d67ebed0d205ba0bd9441a599d55e45094b380f3478bcfca9646a0d7aa18d08e52":"70835abab9f945c84ef4e97cdcf2a694":"":128:"a459be0b349f6e8392c2a86edd8a9da5":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"dda216287910d1f5c0a312f63c243612388bc510cb76c5ba":"d6617d583344d4fe472099d2a688297857215a3e31b47d1bf355ccfe9cf2398a3eba362c670c88f8c7162903275dfd4761d095900bd97eba72200d4045d72bd239bda156829c36b38b1ff5e4230125e5695f623e129829721e889da235bb7d4b9da07cce8c3ceb96964fd2f9dd1ff0997e1a3e253a688ceb1bfec76a7c567266":"7f770140df5b8678bc9c4b962b8c9034":"":120:"9823e3242b3f890c6a456f1837e039":"b4910277224025f58a5d0f37385b03fcd488dfef7580eb5c270c10bd7a6f6d9c7ddc2d1368d68d4e04f90e3df029ed028432a09f710be1610b2a75bd05f31bae83920573929573affd0eb03c63e0cec7a027deab792f43ee6307fd3c5078d43d5b1407ac023824d41c9437d66eeec172488f28d700aa4b54931aad7cd458456f":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c5afa1e61d4594b1c2fa637f64f18dd557e4df3255b47f24":"5c772cdf19571cd51d71fc166d33a0b892fbca4eae36ab0ac94e6164d51acb2d4e60d4f3a19c3757a93960e7fd90b9a6cdf98bdf259b370ed6c7ef8cb96dba7e3a875e6e7fe6abc76aabad30c8743b3e47c8de5d604c748eeb16806c2e75180a96af7741904eca61769d39e943eb4c4c25f2afd68e9472043de2bb03e9edae20":"151fd3ba32f5bde72adce6291bcf63ea":"":120:"f0626cc07f2ed1a7570386a4110fc1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"febd4ff0fedd9f16bccb62380d59cd41b8eff1834347d8fa":"dc971c8f65ece2ea4130afd4db38fc657c085ea19c76fef50f5bd0f8dd364cc22471c2fa36be8cde78529f58a78888e9de10961760a01af005e42fc5b03e6f64962e6b18eaedea979d33d1b06e2038b1aad8993e5b20cae6cc93f3f7cf2ad658fbba633d74f21a2003dded5f5dda3b46ed7424845c11bab439fbb987f0be09f8":"743699d3759781e82a3d21c7cd7991c8":"":120:"1da347f9b6341049e63140395ad445":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d280d079110c1c826cc77f490d807dd8d508eb579a160c49":"a286d19610a990d64f3accd329fc005d468465a98cfa2f3606c6d0fbeb9732879bad3ca8094322a334a43155baed02d8e13a2fbf259d80066c6f418a1a74b23e0f6238f505b2b3dc906ffcb4910ce6c878b595bb4e5f8f3e2ede912b38dbafdf4659a93b056a1a67cb0ec1dbf00d93223f3b20b3f64a157105c5445b61628abf":"85b241d516b94759c9ef975f557bccea":"":112:"bbf289df539f78c3a912b141da3a":"b9286ab91645c20de040a805020fed53c612d493a8ce9c71649ae16bd50eab6fb7f3a9180e1651d5413aa542608d7ecbf9fc7378c0bef4d439bc35434b6cf803976b8783aecc83a91e95cea72c2a26a883b710252e0c2a6baa115739a0692c85f6d34ff06234fbdc79b8c4a8ea0a7056fb48c18f73aaf5084868abb0dfaa287d":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5e80f87fa2156c62df7be2ad16c4890de5ee5868a684fcf9":"c829073efd5c5150d2b7e2cdaeff979830d1aa983c747724ade6472c647a6e8e5033046e0359ea62fc26b4c95bccb3ac416fdf54e95815c35bf86d3fdd7856abbb618fe8fcd35a9295114926a0c9df92317d44ba1885a0c67c10b9ba24b8b2f3a464308c5578932247bf9c79d939aa3576376d2d6b4f14a378ab775531fe8abf":"9769f71c76b5b6c60462a845d2c123ad":"":112:"394b6c631a69be3ed8c90770f3d4":"f886bd92ca9d73a52e626b0c63a3daa138faaacf7809086d04f5c0c899362aa22e25d8659653b59c3103668461d9785bb425c6c1026ad9c924271cec9f27a9b341f708ca86f1d82a77aae88b25da9061b78b97276f3216720352629bd1a27ebf890da6f42d8c63d68342a93c382442d49dd4b62219504785cee89dffdc36f868":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d8a7b99e53f5e5b197364d4516cace4b928de50e571315e3":"d0db0ac5e14bf03729125f3137d4854b4d8ce2d264f8646da17402bdad7034c0d84d7a80f107eb202aeadbfdf063904ae9793c6ae91ee8bcc0fc0674d8111f6aea6607633f92e4be3cfbb64418101db8b0a9225c83e60ffcf7a7f71f77149a13f8c5227cd92855241e11ee363062a893a76ac282fb47b523b306cd8235cd81c2":"4b12c6701534098e23e1b4659f684d6f":"":112:"729b31c65d8699c93d741caac8e3":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c874b427b7181b0c90b887147c36f242827149324fd5c945":"bdd90190d587a564af022f06c8bd1a68735b6f18f04113fdcec24c6027aaf0271b183336fb713d247a173d9e095dae6e9badb0ab069712302875406f14320151fd43b90a3d6f35cc856636b1a6f98afc797cb5259567e2e9b7ce62d7b3370b5ee852722faf740edf815b3af460cdd7de90ca6ab6cd173844216c064b16ea3696":"4b8dda046a5b7c46abeeca2f2f9bcaf8":"":104:"fe1e427bcb15ce026413a0da87":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"56543cd6e2ebb1e3dc136a826bfc37eddb12f7a26430a1b4":"d541dd3acec2da042e6ea26fb90ff9a3861191926423b6dc99c5110b3bf150b362017159d0b85ffea397106a0d8299ec22791cb06103cd44036eed0d6d9f953724fb003068b3c3d97da129c28d97f09e6300cbea06ba66f410ca61c3311ce334c55f077c37acb3b7129c481748f79c958bc3bbeb2d3ff445ad361ed4bbc79f0a":"927ce8a596ed28c85d9cb8e688a829e6":"":104:"3a98f471112a8a646460e8efd0":"a602d61e7a35cbe0e463119bb66fd4bb6c75d1fe0b211b9d6a0a6e9e84b0794282318f0d33ec053f2cfba1623e865681affeaf29f3da3113995e87d51a5ab4872bb05b5be8ef2b14dfc3df5a48cbc9b10853a708ee4886a7390e8e4d286740a0dd41c025c8d72eda3f73f3cec5c33d5e50b643afd7691213cccccc2c41b9bd7a":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"caaf81cd380f3af7885ef0d6196a1688c9372c5850dc5b0b":"6f269929b92c6281e00672eaec183f187b2ddecc11c9045319521d245b595ab154dd50f045a660c4d53ae07d1b7a7fd6b21da10976eb5ffcddda08c1e9075a3b4d785faa003b4dd243f379e0654740b466704d9173bc43292ae0e279a903a955ce33b299bf2842b3461f7c9a2bd311f3e87254b5413d372ec543d6efa237b95a":"508c55f1726896f5b9f0a7024fe2fad0":"":104:"3b8026268caf599ee677ecfd70":"c4a96fb08d7c2eebd17046172b98569bc2441929fc0d6876aa1f389b80c05e2ede74dc6f8c3896a2ccf518e1b375ee75e4967f7cca21fa81ee176f8fb8753381ce03b2df873897131adc62a0cbebf718c8e0bb8eeed3104535f17a9c706d178d95a1b232e9dac31f2d1bdb3a1b098f3056f0e3d18be36bd746675779c0f80a10":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2fc9d9ac8469cfc718add2b03a4d8c8dcc2eeca08e5ff7bc":"bc84d8a962a9cfd179d242788473d980d177abd0af9edccb14c6dc41535439a1768978158eeed99466574ea820dbedea68c819ffd9f9915ca8392c2e03049d7198baeca1d3491fe2345e64c1012aff03985b86c831ad516d4f5eb538109fff25383c7b0fa6b940ae19b0987d8c3e4a37ccbbd2034633c1eb0df1e9ddf3a8239e":"b2a7c0d52fc60bacc3d1a94f33087095":"":96:"0a7a36ec128d0deb60869893":"fc3cd6486dfe944f7cb035787573a554f4fe010c15bd08d6b09f73066f6f272ff84474f3845337b6e429c947d419c511c2945ffb181492c5465940cef85077e8a6a272a07e310a2f3808f11be03d96162913c613d9c3f25c3893c2bd2a58a619a9757fd16cc20c1308f2140557330379f07dbfd8979b26b075977805f1885acc":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"81ff729efa4a9aa2eccc37c5f846235b53d3b93c79c709c8":"3992ad29eeb97d17bd5c0f04d8589903ee23ccb2b1adc2992a48a2eb62c2644c0df53b4afe4ace60dc5ec249c0c083473ebac3323539a575c14fa74c8381d1ac90cb501240f96d1779b287f7d8ba8775281d453aae37c803185f2711d21f5c00eb45cad37587ed196d1633f1eb0b33abef337447d03ec09c0e3f7fd32e8c69f0":"1bd17f04d1dc2e447b41665952ad9031":"":96:"01b0a815dc6da3e32851e1fb":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"068500e8d4f8d4af9035cdaa8e005a648352e8f28bdafc8a":"98e32428d9d21c4b60e690a2ce1cf70bee90df31302d1819b7d27fd577dd990f7ffe6ba5ef117caac718cc1880b4ca98f72db281c9609e189307302dc2866f20be3a545a565521368a6881e2642cba63b3cf4c8b5e5a8eabeb3e8b004618b8f77667c111e5402c5d7c66afd297c575ce5092e898d5831031d225cee668c186a1":"5ea9198b860679759357befdbb106b62":"":96:"d58752f66b2cb9bb2bc388eb":"2ef3a17fcdb154f60d5e80263b7301a8526d2de451ea49adb441aa2541986b868dab24027178f48759dbe874ae7aa7b27fb19461c6678a0ba84bbcd8567ba2412a55179e15e7c1a1392730ac392b59c51d48f8366d45b933880095800e1f36ff1ac00753f6363b0e854f494552f1f2efe028d969e6b1a8080149dd853aa6751e":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7474d9b07739001b25baf6867254994e06e54c578508232f":"1cbab2b6e4274caa80987072914f667b887198f7aaf4574608b91b5274f5afc3eb05a457554ff5d346d460f92c068bc626fd301d0bb15cb3726504b3d88ecd46a15077728ddc2b698a2e8c5ea5885fc534ac227b8f103d193f1977badf4f853a0931398da01f8019a9b1ff271b3a783ff0fae6f54db425af6e3a345ba7512cbf":"3ade6c92fe2dc575c136e3fbbba5c484":"":64:"67c25240b8e39b63":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d50d4c7d442d8a92d0489a96e897d50dda6fbe47ca7713ee":"b36b4caf1d47b0d10652824bd57b603ec1c16f4720ce7d43edde8af1b9737f61b68b882566e04da50136f27d9af4c4c57fff4c8465c8a85f0aeadc17e02709cc9ba818d9a272709e5fb65dd5612a5c5d700da399b3668a00041a51c23de616ea3f72093d85ecbfd9dd0b5d02b541fb605dcffe81e9f45a5c0c191cc0b92ac56d":"41b37c04ab8a80f5a8d9d82a3a444772":"":64:"4ee54d280829e6ef":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"38f3ec3ec775dac76ae484d5b6ca61c695c7beafba4606ca":"49726b8cefc842a02f2d7bef099871f38257cc8ea096c9ac50baced6d940acb4e8baf932bec379a973a2c3a3bc49f60f7e9eef45eafdd15bda1dd1557f068e81226af503934eb96564d14c03f0f351974c8a54fb104fb07417fe79272e4b0c0072b9f89b770326562e4e1b14cad784a2cd1b4ae1dc43623ec451a1cae55f6f84":"9af53cf6891a749ab286f5c34238088a":"":64:"6f6f344dd43b0d20":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6db4ef061513ef6690d57aef50d8011e0dd7eb4432d82374":"b7f9206995bc97311855ee832e2b40c41ab2d1a40d9263683c95b14dcc51c74d2de7b6198f9d4766c659e7619fe2693a5b188fac464ccbd5e632c5fd248cedba4028a92de12ed91415077e94cfe7a60f117052dea8916dfe0a51d92c1c03927e93012dbacd29bbbc50ce537a8173348ca904ac86df55940e9394c2895a9fe563":"623df5a0922d1e8c883debb2e0e5e0b1":"":32:"14f690d7":"a6414daa9be693e7ebb32480a783c54292e57feef4abbb3636bebbc3074bfc608ad55896fe9bd5ab875e52a43f715b98f52c07fc9fa6194ea0cd8ed78404f251639069c5a313ccfc6b94fb1657153ff48f16f6e22b3c4a0b7f88e188c90176447fe27fa7ddc2bac3d2b7edecad5f7605093ac4280b38ae6a4c040d2d4d491b42":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8901bec4d3c64071d8c30c720c093221e05efed71da280bf":"7c447e700db7367260dffa42050e612eff062eb0c8a6b4fe34858800bcb8ec2f622cb5213767b5771433783e9b0fa617c9ffb7fde09845dafc16dfc0df61215c0ca1191eabf43293db6603d5285859de7ef3329f5e71201586fb0188f0840ed5b877043ca06039768c77ff8687c5cfc2fd013a0b8da48344c568fce6b39e2b19":"9265abe966cb83838d7fd9302938f49d":"":32:"6f6c38bc":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2c57eb763f886154d3846cc333fc8ae8b3c7c9c3705f9872":"9fe7d210221773ba4a163850bab290ba9b7bf5e825760ac940c290a1b40cd6dd5b9fb6385ae1a79d35ee7b355b34275857d5b847bef4ac7a58f6f0e9de68687807009f5dc26244935d7bcafc7aed18316ce6c375192d2a7bf0bee8a632fe4f412440292e39339b94b28281622842f88048be4640486f2b21a119658c294ce32e":"9b3781165e7ff113ecd1d83d1df2366d":"":32:"62f32d4e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"307d31a594e54f673bea2f977835670aca4f3d45c9c376cc":"d7385a7bd0cb76e1e242fa547c474370bcc7cc7cf3e3fa37b00fe08a56383ca31d023d8c493f6d42e482b0f32e4f244dd100ea08eee6535e5bb8d27f76dbb7eead6ba8e031ccd0eaeb649edee92aeaf0f027d59efd4e39b1f34b15ceb8b592ee0f171b1773b308c0e747790b0e6ace90fc661caa5f942bdc197067f28fbe87d1":"0bdaa353c4904d32432926f27534c73c":"aa39f04559ccc2cae3d563dda831fb238b2582cb2c2bb28cff20cc20200724c8771b9805ef7464b8fc06c7b8060c6920fd2779fbc807c2292c8c1f88f8088755609a1732ff8c0b06606452b970c79997b985889404fd907c4668a0bcc11ba617175f4525523494a244da60b238468c863055f04db20ea489adf545d56c0a71d8":128:"2ddda790aae2ca427f5fb032c29673e6":"0b92262759897f4bd5624a891187eba6040d79322a2a5a60fb75c6c6a5badd117abe40c6d963931bbc72dca1a1bf1f5388030fe323b3b24bd408334b95908177fb59af57c5cc6b31825bc7097eec7fec19f9cdb41c0264fd22f71893bcf881c1510feb8057e64880f1ea2df8dc60bb300fd06b0a582f7be534e522caadc4a2c7":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"23c201968def551817f20e49b09dbb5aae0033305bef68a0":"77bc8af42d1b64ee39012df5fc33c554af32bfef6d9182804dcfe370dfc4b9d059bdbc55f6ba4eacb8e3a491d96a65360d790864ba60acf1a605f6b28a6591513ea3cfd768ff47aee242a8e9bdfac399b452231bfd59d81c9b91f8dc589ad751d8f9fdad01dd00631f0cb51cb0248332f24194b577e5571ceb5c037a6d0bcfe8":"bd2952d215aed5e915d863e7f7696b3e":"23f35fac583897519b94998084ad6d77666e13595109e874625bc6ccc6d0c7816a62d64b02e670fa664e3bb52c276b1bafbeb44e5f9cc3ae028daf1d787344482f31fce5d2800020732b381a8b11c6837f428204b7ed2f4c4810067f2d4da99987b66e6525fc6b9217a8f6933f1681b7cfa857e102f616a7c84adc2f676e3a8f":128:"bb9ba3a9ac7d63e67bd78d71dc3133b3":"17d93c921009c6b0b3ecf243d08b701422983f2dcaec9c8d7604a2d5565ed96ce5cddcb183cd5882f8d61d3202c9015d207fed16a4c1195ba712428c727601135315fc504e80c253c3a2e4a5593fc6c4a206edce1fd7104e8a888385bbb396d3cdf1eb2b2aa4d0c9e45451e99550d9cfa05aafe6e7b5319c73c33fd6f98db3c5":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6baec0669add30acb8f678ce477a2b171f89d1f41935c491":"5712b84c4c97d75f84edd50561bc1d3f1ba451cc3b358b2403b5e528290954348cf7a235b4dc11a72ddbc503191204e98a9744d85419508c8ca76438c13305f716f1e239a6d9f6423c27217a0057aa75f6d7e2fb356e7194f271459ab5482589ea311b33e3d3845952ff4067dd2b9bcc2e8f83630b0a219e904040abd643d839":"b1472f92f552ca0d62496b8fa622c569":"5ae64edf11b4dbc7294d3d01bc9faf310dc08a92b28e664e0a7525f938d32ef033033f1de8931f39a58df0eabc8784423f0a6355efcff008cae62c1d8e5b7baefd360a5a2aa1b7068522faf8e437e6419be305ada05715bf21d73bd227531fea4bc31a6ce1662aec49f1961ee28e33ae00eb20013fd84b51cfe0d5adbdaff592":128:"29a2d607b2d2d9c96d093000b401a94f":"beb687f062ae7f5159d07609dd58d7b81c478d180bc0b4c07ae799626ff1da2be2e0d78b2a2a1f563257f161491a5ac500cd719da6379e30d0f6d0a7a33203381e058f487fc60989923afbee76e703c03abc73bb01bd262ff6f0ac931f771e9b4f2980e7d8c0a9e939fa6e1094796894f2c78f453e4abe64cb285016435ef0e8":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7b882a2df81fdb9275fb05d120f32417e8ffedd07457e938":"0aae7213da279b34d6dcf2a691b2d0333112ea22de0c3c68d47cf9f9f4ed8ad4e03d4a60ec18c3a04ac9c2abb73e1023051029b5e8705bb69c4c50afc84deb0379db5077be1f663652f8bd8958271af2c1ac4a87e08cb526bab8a030652f2a29af8055d0f31e35475caee27f84c156ef8642e5bfef89192f5bde3c54279ffe06":"5c064d3418b89388fb21c61d8c74d2c5":"5bfa7113d34e00f34713cf07c386d055e889bb42d7f6c8631ffce5668e98cb19bed8820b90ecb2b35df7134f975700347e5514287cfef7ffa2b0ff48b1de0769b03dca6610995d67cb80052cb2e5914eb4ed43ef5861f4b9364314fde6ad2b82fbba7fd849dfa6e46ecc12edc8cabfff28d9bd23c2bcc8ab3661c9ba4d5fee06":120:"0943abb85adee47741540900cc833f":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"51d94d21482c00bb5bc7e7e03aa017ba58f5a23494b72c2a":"3a9c69c1ed2340bfde1495658dbf4f54731a19b3922a1d535df8d0b2582f5e803b5891e8ad1aa256c923956dcda2430d0c0696bce63295fb61183e040566e459338f908d23ae51f64020c1ef3d192428f23312b285fc4111d50d1add58f4a49008a22c90d3365230e9158cd56f9d84f079bdd673555d4dc76c74b02fa9920e7d":"fb21cd763e6f25540f8ad455deaccdf0":"019d1db5569eeff83306f65d653b01064854c1be8446cd2516336667c6557e7844fc349adea64a12dc19ac7e8e40b0520a48fac64571a93d669045607085ac9fa78fed99bbf644908d7763fe5f7f503947a9fe8661b7c6aef8da101acca0aed758ca1580eeb2f26ae3bf2de06ce8827a91a694179991a993cdf814efbcc61ca5":120:"a93bd682b57e1d1bf4af97e93b8927":"7093f44703f2cbb3d12d9872b07a8cd44deb62dae48bc573b11a1ee1c9f3105223423fac3181c312a8a61757a432d92719f486c21e311b840aa63cf530710c873df27fecda0956075923f1ecc39bffb862706f48bde2de15612930fc8630d2036e9e4cfc1c69779171bd23d9e1d5de50a9e0a0de4bd82ed3efc45299980bb4cc":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e6756470937f5d9af76f2abe6df2d0bc15ff8e39b5154071":"afae92bd56c426c095d76633701aa9bea5ce05490482c6c64ac24468c3e1af6e6030a6bb6649745b011c6729bde985b9242e22105322fbb8853dcabbd00165d0b07d7b499e0238b6513bf6351eb40635a798f7e6e2d31125dda45ffe8964596fdbff55df22d4e9025bd4f39e7c9b90e74b3ee58d6901f113900ee47a4df5afd7":"4500193711a5d817a9f48deafda39772":"92fa22dba0eee6b1de1ddd24713b1be44c7105df90e6e7a54dcbf19025e560eb4986ee080cf613898a1a69d5ab460a3b8aa2723a95ac4a4af48224b011b55fb7582ae18f6746591eab2bd33d82a8dbbae3f7877e28afef9857a623530b31d8198b2df43f903d6e48ddae0848741f9eaae7b5504c67ad13791818f3c55c9b3d1e":120:"7d9f97c97c3424c79966f5b45af090":"62258d60f0138c0405df4b2ec1e308b374603a9eace45932fdc2999e9e2261de8b1099473d1fc741c46c334023aa5d9359f7ef966240aaf7e310d874b5956fd180fb1124cbeb91cf86020c78a1a0335f5f029bd34677dd2d5076482f3b3e85808f54998f4bac8b8fa968febceec3458fb882fc0530271f144fb3e2ab8c1a6289":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"30db73d46b518669c45b81bc67b93bed3d0864f7e9e8e789":"750bc1d2f91d786bb1e621192a376f552538ba8c07d50d9e10b9345f31b3e5f9d8ad7c719c03d8548a3b184b741cd06c49d7fb6fe80258d60c01c2987c337c823211cee7c1cf82077266889bc7767475e0eeabb2ef6b5a1de2089aaef77565d40a1c2c470a880c911e77a186eacca173b25970574f05c0bdcd5428b39b52af7f":"5069e2d2f82b36de8c2eb171f301135d":"ef781dce556b84188adee2b6e1d64dac2751dd8592abc6c72af7b998dfae40cbe692a4cae0b4aa2c95910e270600550fca1e83640c64efb1eb0e0a90a6fc475ae1db863a64ce9cc272f00abac8a63d48dd9f1c0a5f4586224befed05be4afae5bd92249833d565cc6b65fd8955cb8a7d7bd9f4b6a229e3881212871a52c15d1c":112:"a5100c5e9a16aedf0e1bd8604335":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"209f0478f1a62cb54c551181cbd4d24b796e95f3a06b6cb9":"66db7cc97b4a8266c0a2228e8028e38d8986e79fcbcc3caff3050fdd2de87b7ff7a6895b988b0bdb7fcc4d6e2d538dcfaad43ce2f98b6d32500f5a6e6183d84cb19157a699cdde1266d6d75a251ee1a2eb97bfe6405d50be2b17a58ba6eafaee0a023a28d568fd1c914f06041a49c79b9df9efe63d56883cbbbeaba809273d2e":"7be1768f6ffb31599eb6def7d1daa41c":"9cb49357536ebe087e1475a5387907a9e51ad1550697f13c6cc04384ec8a67dea13376bdd5e26b815c84a78f921b506b9e2086de50f849185f05ba7c3041e49e42c0673df856da109a78b8e0ce918c25836f7e781e6b16168e4e5976d27ebc83f20b7bf4beadecb9b4f17a7a0d3a3db27fc65288a754b5031a2f5a1394801e6e":112:"4d2ac05bfd4b59b15a6f70ea7cd0":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1bfa30b315e7b908263330140fa2d66ed57104784a43cc70":"8eeee9865e23fa51dbbf197fa41776b7edbdb9381a22c935299cd959a46190788ae82f4e645b0362df89bfc00241964784bc7ef70f6f97e81687d52e552a33af20ae34a3005e0a7b85d094368d707c3c4cd3ef31c0daf3ccaa1676609ed199327f4139d0c120977e6babceed28896d2cb3129630f3ee135572dc39433057e26a":"b7081a3010b524218390ba6dd460a1ec":"8c1f42b5931d69ae351fcde7d2b4136d4898a4fa8ba62d55cef721dadf19beaabf9d1900bdf2e58ee568b808684eecbf7aa3c890f65c54b967b94484be082193b2d8393007389abaa9debbb49d727a2ac16b4dab2c8f276840e9c65a47974d9b04f2e63adf38b6aad763f0d7cdb2c3d58691adde6e51e0a85093a4c4944f5bf2":112:"4da85b8ec861dd8be54787bb83f1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fc47156a693e59a1dea0618c41441fe669fc65dcfb7d0726":"3e4f0a586bad532a08c8863ebba01fd25014baa907e6032ee43d4a7dfc7c3171916dcdf9faee0531f27527872ae4e127b6b9aaee93f5e74d0ab23f3874aa0e291564bc97f17085dd7d5eb9a85d9f44574e5952929eda08863b64c85dd395c91b01fe5bef66e3fa8f9ee5bf62c25d80dc84fbe002ecfd218430b26f3549f734a1":"ea1935ed014883cc427983d7962d9992":"0d85b8513becfe8c91d0f6ffb65ec31f2cf406c51c0da88893c43d1327fd8ad1f4bab2d7b5e27438d643397034a72f8666bf641b6781bc90f764db387eae6720b5723d510194570ccd773e1b3bebfc333cc099d078583e8dac60d174d332925a24a45110c8d2abe8924ea677ac74db66ea789e2838efc96c78bceaa6236c0a67":104:"8781b045a509c4239b9f44624e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b5fcd780a03ba80341081ef96b440c0e4348afde4d60c1d5":"6316f3beb32f6f3bf8f2ff6a2c160b432bafd3036d3eefa1e4ec204f24892e37dc4d75c7ce9a24b5c49fb4df901f35ef9d5955f7dc289c56cb74753f4d6b2982267d5269d12237e21202a65061849c65e90e6702dda03a35ace3a3a098d16b4bfbb85b7232404baee37776a9b51af6b3059a5f170f4ebe4ecf11061ca3c1f1f3":"ad20cce056e74ec5d0a76d6280998f15":"28f8fcf23b9c1ba40c19ffc1092632e35f234c1e8b82bcd5309d37bf849a2ce401413d1f242cf255ed597f9a93a1d6e50676997f95aa612e580d88234a86ddc404292746f0b2f5cf15abebcea6659f998ec6a1cb5a9914fee5aa1aa5d04b3c20914e45095e4141ce9c173653dd91c3ebe4ed4a9a28f3915d7b2edba34c2a58d8":104:"2ad4520ddc3b907414d934cc1d":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4382507dddccf1385fc831da8924147563416d0656e168ec":"e5c5430b960aa35dc8540215c2772d66811270859e33dd4477904759e7e5eb2986a52a4ccc9f592e614147b5ea2ead6636a15c6426336b2995d9a31ab36d76578c3540bc6693842a4bc0491c7963ee9cda2317951cf93244bd30bcdfec69a4767004636fe7d1be7300c35e80627bab9236a075a803e9e1080b9159060c643a78":"a37687c9cd4bdc1ead4e6b8f78bee7f5":"fa9ae30509cbb6fe104c21480ae7b8ec9f12f1afb17320d77b77cdf32ce8c5a3f7f927e501118c7ccd6975b79225059cef530a4fcb0a9719f5e2d3bebe7bb6ec0855e495a31e5075eb50aa6c1227e48b03e3fdf780084ac4912eb3a5674cca9dd6ac037366b230ae631a8580d2d117942dee5d5ddbbb2233afeca53289cc4f68":104:"4221818d4be45306e205813789":"b5b36719bc4d13a5fbf37188ea814cdf3c97a430784330540325c899570e15482300bc82c5b8163074e0544c5132e3ce93bba68bd7a8d2db81d1431b424b697c1158c4d70625666d5ff99145ca34856815c905b5a0fd95806df56b9cd5b384bda3e394b409048eb1037144cc071539c02397e931da28a43cc354d584643afd4f":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7a66db3450dac9a1e63d2639f34c5c6a3fbfb3c8e8230199":"6463a7eb2496379bc8a5635541525926a6f9fa718e338221952118ae4cf03a85f2074b4ebaf108b9c725809be1e6309c3a444b66f12286f6ea9d80c3413706b234b26372e8f00783819314a994c9e3ecf6abdd255cbfe01b3865e1390a35dcd2853a3d99ed992e82ec67ba245f088cb090adade74bdbc8a1bad0f06cbea766a6":"21f8341529b210ade7f2c6055e13007a":"1699bc8c198ab03e22d9bc4f3682aad335c6e35f3f616bb69769a9d5a202511797e770ae0d8d8528ef7b2bb25b4294d47427b43f0580fa71d93fdef667f4f4196f84e41c0b1978796d0de74a94420fb8571bff39137fa231c572b31be9ae72338288bef5f8c992121dc918538551f346e279a9047df14ec9fc0fd399cd3bd8d8":96:"4af02b81b26104d1d31e295a":"53fe6a34d280f2c96d1ae2b2e8baf6abd67cedf7d214312f75dd4a1bec28a641dda3e71aa398726b2b0b1f515e1f4259ee97acaf17f122db9ec7814c2de6a88d36c3ac106396ad03d337c2cd2d2b9b4b7170e23a5848ca7ea129838f967dfdfe83b45ff2a9be699bfb2346115465d59f074f09e24d8fcbd9ece0018c92776c43":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1f5c818f24d201f9fb23fcca211b0545eee5c5c9b440810d":"9a7566817a06f792e96a6a2ba8e0a01f8837e2de06796e68b0782cc54ed0b04fc5e24a1ad37d5ffb035548b882d88150e89915b89f57cde2bf3c43ab9dae356927daef6bd61cc9edd5e1b7a4abea2f71313677f1b2fdf3d8d4a7e9814ea820fbc3e5c83947db961839a985a57ced7f5e4a1efffcfd17a2c806d4cdc1e79162da":"3a163067bdd90fce0406d1c198a88771":"a5e94e233d04fe0c4b6c4684b386902fe05096702237dfbe76f73befa69b6f30394cf9fe3358997942df65842748fb4f075a3dc06e147bd8d67fc4371113a4d75c70219257c650a6f38a136659e20a1cf3a119397835c304e0fb2a33aa3c3019175c86463043d5edc6992874f61e81cd0d26af8b62cf8c8626901d4f16d84236":96:"b124eea927e2a62a875494a1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9a301f7edf83da63bcf37216a3a33d7613331c3210281dd7":"e09cc8543db7804870004706a26e94b457c125bd648b581a196f962f2ae8fa55d9bc66530ba5020e22d282080b4720dc9a2096a11c0fcc3d9a67cd1cf95cd7cd2417ba308c761e64be24347a14c9423447094a5c72a0043c288b35e753ba0aa748f208381249fb1c8d195a472192404b6c8172663ee4b4d4ecfa426e1fb003f2":"d73a546b0fa307633ac89506fa86138b":"f57fe548cf4a551a216ffb24a1dcf1b79c95f9abf06443fd58af042d287c2165db373c82a94172db517840f22e45e966e3ead91ce1ddad132bcb844e406e84b76a0b5b0ee23064b66a229f32a2d3b9c71103f020c4ba57fc0f0608b7114914cf2ada0c5a9bc4afbfa9ce5da320f34beb2211d569a142f53bfd262f6d149c4350":96:"f536a3b8c333b1aa520d6440":"124a327a8c22b7652886dac2c84b8997ca8a6f61c9ba9c094b5aea41eaa050a6df6cbf280259e5466071bcfa53b4ebc76c3cc4afc8c0385189a5382933aa57c89aab78dca84331e0fe8f0aab3a7857d3e13f08dcd90ec5f0684f82088ef8eb7fd67e75de43b67afc3a0beb458f5ebd61b2c779e6c539d795c667bb7dcc2b762e":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fd40e8226fd13cb95ba50b7cdf0f07f7ab7037cf8705ca50":"75aa7df5c3c443d48ee998064b6fd112c20d2d90c98e00d025ef08d1ad3595385be99de47fa627549b827c48bc79eb1dcaf2f1be95a45f7e55755b952aee5ae0748e68bee1b014a628f3f7dc88e0ebac1d1d00e268355f5101838ce125c57003aebc02a1c9d6ae2cd6e2592f52c0be38cef21a680ae35c909cab99dce9837aef":"3406e70cbe16b047fedaa537eb892279":"390b18d22d5ecc0b5a524ae9afac6fd948ac72d1360775a88b385aa862cce8a27f3e4b420e539bec6e8958f8c1b5416c313fa0a16f921149a2bfeae29ad2348949b29a73970e5be925ec0c35218b82a020cf21bb68c6931f86b29e01b85500a73f3ee7eb78da60078f42550da83b2e301d151d69b273a050f89e57dfc4787cbf":64:"69e06c72ead69501":"6e8d661cd320b1b39f8494836fcf738b0ab82873d3903c9ee34d74f618aea36099926b54c1589225ec9a9d48ca53657f10d9289c31f199c37c48fb9cbe1cda1e790aaeedf73871f66a3761625cca3c4f642bc4f254868f6b903e80ceeeb015569ace23376567d3712ad16d1289dc504f15d9b2751b23e7722b9e6d8e0827859f":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a85ab87563b809b01725764d64ba4cc6a143e2e0362f0c52":"ef43629721b50bd3656b7ae31b6e4b4ba1cf2c72ed0460ee7d9fb416631ddc597e5f9aebbcf4442b95cc46e28476a464dd87caf9c1c1d6c99d3e3e059dc23f8d2fe155ff5e59c50d640bc052c62adee3aa1295b38732e3458f379e98a8dbdfed04c22a5761792e87fa67ecbcbf3b90eb1bcd1d3f49e60132452f28afece83e90":"9f991ff16a3e3eb164a4f819c9f1821a":"df289511f78d8fa2505afc4c71ab1d7c31a8d15d1e5fcbb29d70f0e56f89c4d7b30f1b3b4745b5d2cc7af34fb4c95461372bf516ec192b400dc8fdb0ca9fe1f30f5320d0fadf20155cfcddcf09233c6f591c1c89917e38a003f56b94a1e2429d1f2b6297db790d7dce84d9fa13d2d86a0e4d100e154050b07178bee4cdf18126":64:"dc4c97fe8cc53350":"ff0e531c7344f0425d62d5fbedf4bc8d3d5cc80647e67b852c1a58ad1516d376d954cb8dda739f6a4df3cf1507e59696610bcb6b34340d6313028e00d7197845d392e73331aaf168b474a67364d8f9dab740509fabf92af75045f0afabc1b5829264d138820952bbc484d1100d058a4de32b4ece82746b2b4a85fb2993d4add8":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f4f1e03abb927ffd0b081b9dce83a56a6dd419a6313ac34f":"0e70421499bc4bcb3851afa34cdf5be374722815abdd9bcee5f332dbe890bdc1c0210ab10667e5bb924bf3c1120e25a0c074da620076f143940989e222086d1b34a1200d09aea1f810ef6de7d8520c65eef9539fde5a6422606c588fce6264e5f91f934ede6397c4b307d2d7e07a518fce577a427fa92923cbba637ae495afad":"d1e29bb51a3c4e871d15bb0cd86257e2":"ae2911cdaaad1194c5d7868b6d8f30287105df132eb0cecca14b6e23ec7ac39cc01da1c567a0219cca7b902cc2e825e30f9524a473eb6e1d4d1beff5ab4f29103b2c7522a33dd33182fa955c4f09a75196b1072a6f0340fc55a802d29c7067f05219c21857ebff89ada11f648c1f28dfbfdaab56028f05509de17e2381457ebc":64:"44f760787f7bc3c0":"2199fa5051461b67581429ab19de2ccb50b8b02e12c0e1d81a8a14929f84e09d9715b7d198e77e632de4af1c08c5041276204a7ed76646385e288e96e1a4b0b0f2b1a9df7f0892beaea3cb58d9632720158f6daa4cbbfc0ebdc56ff6a5175768ff2abd24cb7669bc3fe40f8aba7869d2dd7dac86b6ebc4e4ce261edbec88db17":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"33efe20433c6a1ad261a1fed494961749e5bf9d35809b59d":"cfbeb61be50def25f513346498f75984bfe797a8ad56be34f2461e2d673f6ce14e7479a59777267b75dadc6b9522599ebe5d7b079495a58ca187ec47796f6ee8c322278ad7451b038c938928adcff6105a8ea3780aedc45b6a3323d3ae6fbce5da4fb59ca5ec0a16a70494c3c4859672348532505e44f915e0b9b8a296ef5225":"dc94673b0c49c6d3b4611e278212c748":"919f7397a6d03836423b7cac53177fcfbe457d4aa4348646f646aae1bc5a15568cdb8c96fabef278ace248aca531110a4f4f9e8ab0c32525ad816ae3facf03175232dc84addcd6065f9cc1f513966b63fd27e91a09f1921b95d6bd8f08f1dbce073bcf827847f774514b478b9d7fb5426847dd4dee6f39b5768c1fb729b32d03":32:"c5098340":"c5e47d8c60b04df1974b68a14095d9bc8429a413d21960b15bae4fd7356bf7872e0da0a1a385ca2982d3aa3182e63ea4bb8ca01410cd4e71ddad34aa1f12c1387902b3d56634f89c619a2e6756648ab3bf90e9bc945afc9140eb935b633bae96bb067e9ee421697bcf80b14b1b88dbf13e010b472a7ca5411db36848b9c7a37f":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3ed5dadefa0f6d14fedd1a3cdbab109f6660896a952ac5ab":"aef617f69724e020309ec39d9587520efda68a8e303686c3a41ef700cba05b7c6e43e95aadb1a566f61650c87845835e789eb2366941e3bfef6d9846af0e0dbc43249117ad6f299bbc40669ac383cdf79289ada6ccd8ccfe329a0dc6a38eea1a99550457102d10f641cda50c21f533b1f981663f74a0a7c657c04d9fc6696ff4":"553a14f1e1619f9d7bd07cd823961f25":"eb8ea81d3e328a1113942cd5efd0f2b5e7f088791c8fc05690a34584101c4d493628ee7d0099a2865ac194b9124c3fb924de0c4428d0a1c26ea3ad9a0bc89187a16673e3b6f7e370dfb2dc26e8a56a9cf91f9c2088c020a766efe0d0c91689743a603f2cd1e300a6a84828b3b515a4b9a06e6bb20457bf124cd6ce4ac8b83d51":32:"dc413c4c":"bc1f34991a48aabb0fea513f790f0d223e9feac4c99fa1e8427f01ab8b4b2827cfaf239342de36051a846af0306a3f82e7aed98dd0416fb078bc7f3b617b00ceb2cea4ddafc22dd022efa8303e9804510e0e888065d8427345156d823f796f74130c06db9f9934435552b4fefd051953e20ecba3a4514ac121d7d2097d597439":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6d97e8bff3923a778504fb917dbc1428a1328587047697d9":"dc1a81efd51e967767f5bdd7e2e425732c1d28451f2bf5bdf3f5a6492279330594d360dd8a193e5dbde1be49bf143a35c38bcd059f762ada65c5119e097f0976891347f4d829b087bd72daa3494b344cbd3370c4459ca243bd57aeda4cb86cdd0bf274f07830cdbf5e5be4eb9b742ddffef8aa35626d2b9ea0a29d3c3d058b28":"0c28dc4cd53725091c2fb68a476c2e40":"f3932f5e82d75a1e3eba1591c17769e1a45819ccf057c31e76fa810b93678766d25905e859775c244e96bcafbc75c4a2d95e7d02868ccb2f65e49276f0b645ac8cf6e3758402304a3c25ce2de0a49f401b1acadaff8b57589b45cc79130ddc8387f41cc383e33ef38eec019152051c756198d6f782ccf56297b9fe944269a65a":32:"e6d6df7a":"39327836e9d8cfb59397adcf045a85644c52c3563290795811f26350c8bce8f55ca779cbcd15479efd8144b8a39ef611153955c70bf3a7da9d4d944c2407a0d735784fcb68de1083eebf6940ebc9cf92f9f139c01404b503ff64e61126a94e881351473507884357040fd32714b872c254349071069644e2bd642905521b944e":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2c78e29971e90a01bb65973f81260b9344fa835751f5f142":"":"f1a23ce6e2bc9088a62c887abecd30ae":"":128:"d4d5c22f993c8c610145fcbe4e021687":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8c582d5b6a40ef0e4048ec20f0263572d7cc82704e380851":"":"ef221a1c66fda17906190b7c99ab60b8":"":128:"6327dcb46ffb3d0fd8fbf3d2848a8f01":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3a58abadd29e946e23ca9eb09af059913d5394971bda6a4f":"":"7c29b3196d44df78fa514a1967fcd3a6":"":128:"fc123944bbea6c5075a5f987aed9cf99":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"04bdde4c35c385783715d8a883640851b860ce0e8436ec19":"":"783f9a3c36b6d0c9fd57c15105316535":"":120:"23e21a803cac5237777014686564f2":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4ba5fba0c22fbe10c2d1690c5d99938522de9c5186721bac":"":"2acc2073089a34d4651eee39a262e8ae":"":120:"7ac742c859a02a543b50464c66dcf5":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f12890b0a8819faa5a8e0e487f7f064af42fa6d5519d009f":"":"c937615675738f4b3227c799833d1e61":"":120:"88300bd65b12dcb341f1f6d8a15584":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"51878f3630298a81297f4a21514fea637faa3815d4f26fae":"":"1f939226feab012dabfc2193637d15b1":"":112:"eed5fcb7607c038b354746d91c5b":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ae596e74840a600556a06f97b13b89e38f67c152f1a1b930":"":"e2076e1050070d468659885ea77e88d0":"":112:"b4586bdbd4b6b899648f2333eee0":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fd33b7a0efae34339ca987b5eb8075385fd1276e63cc8530":"":"2d07bb8616fc0bbb71755a1bd256e7fb":"":112:"6b60d645220cfde42d88296ac193":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5685b12a6617d554c36b62af5b8ff2239cb3ffb1d2c40e14":"":"6c31194df99d08881fa5b1dd33b45a92":"":104:"69431593c376c9f8052bf10747":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"036ae037410dae9f0741608516d03b855c9c1851df8c54a4":"":"73599275f8237f14c4a52b283c07275d":"":104:"6f7249d25c9f273434c4720275":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ac144f39ebd6124bad85c9c7fb4f75bff389ece2e8085d83":"":"d0871bfc3693245be478e6a257c79efb":"":104:"5a99d59631d0e12f58b7b95ccd":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a8a541ff11a1b8548e832d9e015edeccc94b87dadc156065":"":"c72bb300b624c27cded863eba56e7587":"":96:"ea2528e7439be2ed0a0d6b2a":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"30dd8f400335e9c688e13cc0b1007bd21736a6d395d152e2":"":"28899601fa95f532b030f11bbeb87011":"":96:"35625638589bb7f6ccdb0222":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cb8f672b04d706d7d4125d6830fff5d2ec069569bea050ce":"":"375d4134e8649367f4db9bdb07aa8594":"":96:"70610bf329683e15ecf8c79f":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"bf71e5b1cd6eb363ecd89a4958675a1166c10749e1ff1f44":"":"9f502fb5ac90ff5f5616dd1fa837387d":"":64:"a4b5138122e1209d":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5b9d1dfb2303b66848e363793bdca0e5ada8599cb2c09e24":"":"2ee96384dd29f8a4c4a6102549a026ab":"":64:"3b33a10189338c3b":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a35ae271f70ebacb28173b37b921f5abcad1712a1cf5d5db":"":"8d97f354564d8185b57f7727626850a0":"":64:"813d2f98a760130c":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9bdd0cb826d5d28c2ab9777d5a0c1558e7c8227c53ed4c4f":"":"daf13501a47ee73c0197d8b774eec399":"":32:"a6d108c0":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"81b4d5ee4e1cbee1d8966fb3946409e6e64319a4b83231f5":"":"bc2f9320d6b62eea29ebc9cf7fc9f04a":"":32:"a47cdadd":"":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5813627d26d568dfe5a0f8184cf561fe455eb98b98841fe0":"":"817199254a912880405c9729d75ed391":"":32:"d81d9b41":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"94f160e2325da2330fbe4e15910d33c2014f01ace58e5b24":"":"80a1b99750980bf2be84a17032fc2721":"066fdd980cf043a732403ee5f65c82ca81e3fc858ad3cfa343014a8426fd3806770f127e2041efb42e31506ce83390ac5d76de2fe1806df24ce6e4bb894972a107ef99e51e4acfb0e325ab053f9824514b5941ab1ec598fbb57a5d18ed34d72992a19215d914e34ad1a22326e493d1ff2da7bc271c96ad3ab66d0c32bd711293":128:"dd153cfd7aa946280660c445f586fa28":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4785846f7c0524e78f3eb137fd433e1808af64549af69183":"":"5334476a5fa3fa50dcc4b12f8ac00b51":"e70f82d1e3361ac5a5c9a087e47984d5533ba296f9b7e4a192a4ab28a833cdbbd5cece3415cf6fbb2f8055560b5c31c98d83d139954e1c03a464739f1eb5ad982c4371cf20b8984bbd97d5f40b336f5e96df3d272b95f7547be15c3bc05b3caac7d08c5eb5de8bdd246e74f6caa6bff76ea0417730ce72b911867f88fdcf73a0":128:"c59231ddaae98e0e8db6b3fe8f4d3427":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"49b085fe1a8e1ae769ed09fc585d29eb24d589689992e6c5":"":"899878b0684fb865d30190821817b88c":"f789eafe3d02826b619ca4fbca7bb1919e5c6f7c33824a2f7f815dc50e329979705f7ef61e9adf7899d34f1b8840384ff62ef6d29eea38c45d12be9249aca69a02222cd744d81958c6816304ff0d81d6714a2023b3dd9d940db5c50afd89c52774d28d6afde2b6c68425b6acbe34682531a2e57e2b9a7729b3e8d96a729b15cc":128:"2c84bf7a8947ab93b10ae408243b4993":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"75847588760ecb6ca548747b743914c89fea367a5ccb81b6":"":"7d8a9fd254e2061c01e39eb574951924":"b03c57dfd49152401a225357f1d6e533f3a423e5cfce07b8ae7ca9daf68645e5bd67b3ca2421eac447530b27c6dc6bd9c7f1b22441b8cc8c4ac26cec2c9c0d665a35b66d779a3772d714f802d6b6272984808d0740344b6abdb63e626ef4e1ab0469da521c7908b2c95a0fd07437c0e9d4d2451ae189ad61ff19f4efb405127c":120:"e8aac14b53cdbc2028d330fc8d92a7":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e3a18a96d2e45d2f60780dc39cee7160e28cb810bf09858c":"":"26a4d659665ded39b7a1583de756d0ad":"83f8d9c58169b4c68032321197077ff5c8ee4ebb732b040748e1b55dcf53375ae86fb9646a672b5c5bc805a92c475cbb6d0ed689a58abdf2230250a7d3fbd8cfab07835fa85e738a7f74bc3e93616d844b1ec61b79f23dfea62e1815f295d43f61d7b5956103b31ca88afb0b3d37eb42cf77232dbf2258065232971c397dcbcb":120:"dc034564d4be7de243ff059b5f9160":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7be3909170ea7a2ff76f9f28241d8cc48ddeafa8517c6f8c":"":"8dee7e29350c60c5bcfec89da6617d2e":"f6e9e7a7f9716760eb43060d5c80236a0f118b0f750ebd5df01fd2dba95c556ecd2e54a3f337767321abf569c8137a8e48c5b44037ba62951e9f9f709e6e4540a36d769f3945d01a20a2ed1891c415a16d95cab7ddf9bcebf18842c830067509a2a5d49a9684324c433d53824d2f8fd326b149af17f40e5bf5e49185738fba60":120:"942b52277e9dc0a30d737d00f5e597":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1fe413bafc4753e1511b580c830449bee56e0e5b9acb852c":"":"e30829f64f3eda13bfb2ac572aceb3de":"6c772d08b4d7507e35804572fa697c646c77301954cc5c160941e49e230697ed8c23338b9f30c3ead69b1c1a2329ff025dcd3c0d0a9cc83fee4979448aa71ddb9d569bedc8c497a2a4ac3b60d087d7872f0a110bf90493ae7da03b0953734223156cd2d6c562e4a978a6dd5cdb229dd58dd4d0f50ac015f2f5e89dac4aa29a19":112:"87737873b82586bb29b406946cae":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b4bc4378d423931f9b320bb57df584c641406c1daa7448ad":"":"eca70e10c0358838a3f4a45c4b016ccd":"68d1c045c1604e3c3dd4f7c7543240aca8dbc5266dc18c5a8071e8b09e3700b7cf819044b2722d8db92021f42a0afb295d7b16ecf4e4704a50a527a2e72d7f53617c358e3b7be3d7fecda612ce6842fcfaa68f2d1b8a59d8b8391779f2fab99f820862c94029f444abe62367c5de0a4becc359660e4a5366f7d482bdc362b866":112:"06f95ca69c222a8985887925b15e":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1cd4414ffd24e830e2dc49727efa592e430a6a75391cf111":"":"a08e32ad7d63f975de314ad2c0fa13fc":"20a271f1f4c6bea8f1584ab39a7179ec448650e2ff67a7338d1bc9fab7f73b2ce5222cd07ded947d135d9d0670dc368f0a4b50ece85cbf641877f9fe0ac6a7e6afb32fdb1b3cd35360bb80cfffc34cfb94dbcbee9ca5be98a0ca846394a135860fba57c6f0125dcb9fb8b61be681ada31a997638ee172525c03dd13171534a91":112:"c68842cafc50070799f7c8acd62a":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9e0ef9ed5e6f00a721a9893e1f0d9079c5aa667a4cdd2a52":"":"5f015fd556e87ff0d0df586fb452306d":"b82986135e49e03f6f8f3ce4048ded2e63ee0c31ddc84929e022ee8561159179b3bb4403ebdafdf6beae51ac5bf4abed4dbc251433417ece3228b260eca5134e5390cba49a0b6fcbbbabb085378374e4e671d9ba265298e9864bfce256884247c36f9bddceb79b6a3e700cb3dd40088ba7bb6ab6aa11b6be261a7e5348f4a7d1":104:"ec9a79a88a164e1a6253d8312e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9bc8f15d98e089d60d4db00808700053f78b33c31652c3e4":"":"5cc0ff9bb7d5b9b2aa06f6ecf669d5bb":"24ac95a6ed2f78853f9ab20f53de47e7f662f72aea454141e2131aace7ed2daeb395bbccdbf004e23ce04ad85909f30151b6526c1ce7934726f99997bbab27055b379e5e43b80ad546e2d1655d1adad4cbe51282643bb4df086deb1b48c1bd3ac3b53c4a406be2687174028ecf7e7976e5c7a11c9a3827813ade32baef9f15ec":104:"9779b7c3ece6c23d5813e243ec":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"19afc43a4481f796d77561f80b5b2e1514c96c5d1d86e64c":"":"d4c06595fefd4a81bbbd4b40c2e1989d":"98fcca51352998d0126b5539e3fb9a238ac31c05954fc206d381909aee70983b6ab99d3f3efe8530a1c3cfe3b62756321b1d0771a5940055eba1e71fa64f29291aa5e5b0af0fcc8e6f5a02688d9e93417225eded791a35217822ffb346d3fa2809b65abe729448316be30cf661137d3c0e49846cb0df598d90eda545afb64a5e":104:"ca82448429106009094c21d70b":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b4fc31dcfef6203fdb296cc928c13b7df56bfe6f32583057":"":"6308a78dc8f3c90442dc52196649c38e":"2567d80c253b080c0158102558551445d8ce4d5ddee2014a2be5cbad62e1717a0fd4d2059447c3151192951eb11a4a7b19a952f6ba261c87f10f4c9032028de3cc5a2a573a4e993a690fc8954daa3ec92743e7343e75b646c4fa9cbc3fceb4f5d59bb439c23754c4d9666fbc16c90c0cac91679b6ad1bfe5dcf6bd1a8a67c6b5":96:"9d1603799e2485a03e7b05a0":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1c2d9412486c381440213e1588b6bb58b0da53300b9d3089":"":"727ed8846daab874d5a9918b47d016f4":"656430f0c1423018b5e2efbb1e32a5385c1a9a1779c4dbd585dea91edc39ea8752ebfc2d8064251a8a5ae71e1845f24a7e42c6371c2ecb31e2229d5f4923bffc21d4804575a84836f3cf90ec6047bb360b558a41a975ece111b5284dfa2441705a6df54fc66ca6cc1af9163ecc46902fac337d5f67f563fde8e8e7e64b8588b7":96:"05ee6ce13711535864674a5b":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"abf7a97569427225a4bd5143c716a22e62f84c145bb51511":"":"e255088cdfe8ae5c9fea86d74d2f1b7d":"b850993300f54d078f83ceb9aef7345bbf758f92365b6625c210f61dad4f2a2319f51d883a383a706392d3dfca1706eba585a6fac8bd4294c0bb2cb3f6b454d5c97819e8e5c926754840261b07ec4ef1f87cf281d75c187839689944230306e1903047915e086043990745864819ad713d34a244aa4e9d755fdb137105d7eed8":96:"0c9c17388d0610f99d0a093f":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"45a6df655e88bc880acff41520aafd0cc8aa8aeb8952fd06":"":"1125e1de94970c9e7be70e58e7626ef4":"fe9838a445b8edef19b3e9f33c8c0c265b3a12c97b8ec57ceb94f65ae5227177de38f1e338dccb2b24e5bd0f0eb8127f83eba0f1ddfa55198789df0cdd1d977fcb985ad9c7d51b96e749d2cf3cc7a1ec4dfcbc641a1a022d55def328e081af890a7e699f2dbafdf506389e045aa1219239d5868ba675a3925602b6fb6f6e6d37":64:"1c3bd1e0d4918e36":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"279f4f2ab4b70778fdb9ca7800cd20e323601d7aa2c75366":"":"0f7b402560735cf03d5da58de5b6c685":"7dd9a8c848bbcf5127161c8a419a436a0dad559f7c1613cdf41594e177016acb1ccf44be852185c42e7120902a42efe83855995ab52cf5c190d499fcfd698c671fd72949dc3ea7ddb874e586a3aa455a021cec7b5f8608462ca66f926aba76e60a5846d4eb204155cd3c1328da51ba35c3007b8bb394f34e3a8b81ddd2ea1115":64:"dab612351f75e2cb":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6716ab937755684af7403e6fba5452c1b11568a9047bb50f":"":"2fd5a446dd564619ef75b6e00905ffe0":"20d261d3192996c21da69e979c26f5f937e6ea4cb7b05c6ef556ce4d86ca0fe85ec2425d274c43b5212fe9d27bb48b04e887461a9f45f524059b87eaea2e287a8d4537f338b0212012a9d4b6610e8c97dd554e0b3c3133e05c14d0ddab3524c93fd527e223b1996b4cff0a4a7438f1d54890bf573cd803941b69e5fc6212c5d2":64:"f1d743b7e1b73af5":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7dc94b5bbd6315ad8d2b67f0c683d10cf456f822a3ebb024":"":"6f3eedeb57dcf12bfb3cd80849893c90":"ee1ff367f4b23c156e3dccff84ae4bf2b8ecec1fb5ffd25ccaa93b6c6834389bd79655bd4bac75238eb0f65d3603ecc57c8774798309e85b6677e78ed2077b712cf28795d0dc8fee994f97373a82338ef67c62378136a79a990ecbcd6367445e805efa98f9168826e57cb8dd7e7b1d5c89ad98358646fa56dd2a71c40e0275a1":32:"4dc74971":"":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3bbe223e253bf272599e28af6861013ecd0c88710947ed41":"":"4fbf09ffaffb600f0de38fb12315cab5":"5388146f6479f7b3b280f45655a95b847ee27c734fb2fd91f6c009b1ab1810c772c7435d3221069f9490d251b76e740147906ac1db1c209c175b21aa10881c44fb307d4d2900aa3b1d56fb0edb9f2a58505653a17fee350e12755b9656bc65c78c1593d5cb7178e29f82209caf53e60fddf725f6957cc9718bf410c4a0229ed4":32:"fb845ab7":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"461877813acfe6e9979eab729b52e3d192b3236758bb6563":"":"6985cf77b75a47a3978dd6412d59200b":"385551854a89ab37063ba0ed911501b3d632153c5c2992e154c0a334bc36620476f11495437b842409e0954f7352cbf288d158bdbbaf72621ea2ce75b708bc276f796c5aa7fd0071e522c5f175a9e7787deef79f6362101aa3607b4588f2e1df7127f617c6073593a1c792b959e201e4a7a43ea8b1c3af026376439ef629266c":32:"c840d994":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"09770f9114120a2c1c3cc416fe0eb8699e07141158a5bdff":"875e2e5b5c02e0a33e71b678aa29c15ce18ec259cf4b41874893ed3112daa56ff2a7475681b8b3d9028ef184d30658e881c908f3588f69899962074db4ddfc0597f8debb66c8388a1bccf0ffe2cf9f078dc1c93f8191f920754442ad4a325985c62de1a57a25de4e9ed5c2fd0f2c8af33f3b140bac12bf60fdb33e0ec557955b":"cff291d2364fc06a3a89e867b0e67e56":"":128:"81f1eb568d0af29680518df7378ba3e8":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4fbf1c785c087ad06b43d4163cf9b9396deffd3712856379":"96a690e5319c94d94923988025307e543f16fd970aec24524cf9808dc62b093359287251503f4231bf52cd1a16a80bfa82d8f585d96855dc1932f4919a92da2618d6448fc18a234f9acb386ab4ab4a9e38ea341e7c54faceff38c162d74e7fabbca13aadb71e9c8ae6072e7bef4073cf08aa7faaa6d639f98d15bad4ed183ced":"1c8f41424acaf009996ceaa815b24ad4":"":128:"9f3c0349c5a4a740a82d6d63bf00fb17":"6100b091e52366fb422251d9b68974b6c666a62a8bb77a1ffd7c7d1ae586a6ee763b84dc11aace02a25af91d194b70b3265ec46872fded54275b7ddb26ee1f20c857328f46a694fb1dce68bcaecbd587ece5b505d658d57d50333e30b639eea1f6537b37c175f62497c6c84e3cfddae214285d2d68d90dd5cd8ce2273d25c8ca":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3e0ce4fb4fe4bb2fdf97b23084ff5671b9b899624184acef":"df89974b1534f0ba262bbea5efe39d8b72820cc8a720cc99520fedbf667515c3f6d8c3e25c72c48c1cff042171df58421741aacb2a49f23167257be7d7004d56b14901b2075eaca85946e9fbf1bbf4ae98227efc62bf255a25dd0402d37c67ba553531c699dd89ff797e7a5b5b9a9aa51e73ca2dacfda0f814152aa8ed8c79f9":"a950ab0dd84115e3829ab0ad3bbb1193":"":128:"25cfde73e7a29115828dfe1617f8b53e":"847b54e176ccc83081cb966efc4b4a3bf7809ce0b4885009f620f61fafcaa78feee91a835ae6c1a942571811108b1e81b4c4ddac46aaff599c14988c9a1fb9f387ab7f1357b581568b7b34e167ac2c8c2b2b8a4df3fd7ad8947a363c1c0cb782ec54b1901e928821cf319669dd77eb37b15c67f13ad787ff74312812731ca3e6":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6be3c66b20e5e66ababbfba1b38e5a716eafce23a1767b69":"de1cd978354a499415176f260021abe0a8c5bc34d166f53d20e02e413e1377ce4ef5d7f58337c62251a3b4ddea0dea23c40e5de037fd5dd8a558eb53bffa4e8ce94899afa8284afab503c1a485999a154d23777f9d8a031b7ad5c6d23d6abbe3b775c77876ad50f6bed14ac0b2b88fb19c438e4b7eb03f7d4d3fcca90dd01260":"3a2acf69bba19f5d1d1947af2cfda781":"":120:"f826d212f7c1212fb8a8bf23996826":"fd1f7b56e5664cf4c91e58f7c50f6c5e98e42ca2e4adcc00348cee6f662b382ad4022da54a47d8faeb9b76a24dfc4f493c27fc0bc421a4648fad7b14b0df95d8752013feb033b1fd971daa2c9a5df898bece6a3b8fa078dd130071df20a68cd0f394be25dcbb3e85bdfa0df4797fa6f01f5f0da7a6e86320207ddb5b3be53ae0":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d16abb9f5b38d7f5abba9dc36995ce6ce928ed822a07b7c4":"e72f29b1fc1dbfc2d93a0f3b79ea4b9806ce9b2c4d490ac5c0c3c793df9dc7df5471e834b84d18afa5a7516f9a6a813a9b65ae2f083a854730547e28a1f60fe97d8dba1d2d433e11847b9bffd8873ec634e64365530c905dd6f274e45c9795ac127a6f356f63cc6c116c5dd8c628e7e17e1fadc58f8452bf21f53c4133198118":"3cd95429c6de1d327b9eb3c45424a87c":"":120:"13521236f190f78e75c0897c5fb237":"cd8bb97c28df092b6783ef653fd26f2bdc27c442bab0a4c7bee2789f389dcd1b280c0231672721bfbbc939a0449557678ec61ba0afb2e5817e6f7d94387f84ecafbfa1216d65e7f5025f47b0d2905cff7c99adf8306a3d9850c5908be05f87cb1d36a4837dba428aac97d7fbc18e3778f8d81a319259504c87fc94bd0766ed93":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0bc344b1a4078807e5f53a6e7e1e36fa83108473ae2fb4c2":"8bd73f94c71e3765bc7d17fdc90a9ba6aff9648b46300e4048985fbbd7c60c39c3766f7c524780bfc2296dc11e1132134921760a373104edc376eab6e91e9a60a5c4a5972935df12eadae074722bdc0147c3caf6a62fd449ef37d76b65f6d210283c94ac524cf13186e444d80a70b01e4373cc0462546f1caee6b49e738a742c":"bd505fcba464e6e2c58fdf29f5695fb9":"":120:"8510fff71bb879f56ea2fe43f6ff50":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c8097398fc21f93eea6a95aa93a3231096817b65520bc549":"80b0abbaebbd537a0810ed75cd172d29d50f5982e4d01f8664ddb2dfda8f57fa0ed87e64a779a1d7f5e568b6acfdc739572a7176752307b430fb1fa1c3c2c346477cebe7d01b16745ca6c8929a7f446c03ad9a9e8a5a935de78ca6c701e8c1c5e6d2550c42949cf5342fb5ef4c6ab9bb02ace8388b16edf72a1237e5d1d0e820":"776248381941e16908f52d19207881f5":"":112:"7fc4388b2f8eab0f0c2d6a08527e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"76d4bb5694faaf344db83bc6d6c47d56bb6ab52700826f2d":"9e31fda6a171f0d4a5f2af2c4f827b1312d9dda5d78fa329b8f1b6373b9b29be358601e5bb0d0c615aef4b9e441c811219f1f2ff2d0ab23e0cd829a88b5b615ee72e5e3ea604fa26cc6438ec4c30e90f7348e9116adf8e8efb7498320d2da16679fa546b1aa9afc7720b074c4e48e06862d41428c9e71a4772c2e195a6f36978":"603977845d82faccb401817ecce6e2fe":"":112:"c955a3bc316841be07e406d289c8":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a3e5020695587984074d78d9c98b8e1a5719e5f88372740e":"c0bfe3b2dc4dad17ec5a7662d86847fb67e582cc0baf469bc9baa7a075d48a8b97521a1072c2798bfbdae5ca3752eda1cb96fe5cf24af989eb77a2948aae3d8b70d83d93f84c49347f788480f34051621c358c03cf8159a70fc72cb8bc02876234ffe76b181da8b22b8796c87b0904da1af46de519c20d8d1b1dc7cc24e39ba5":"4cd56de54e5140a587be7dfd02d3a39e":"":112:"1a29527a41330259f918d99d7509":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"afe986ead799727063958e2ce13ca846f76c51605439f839":"7c1b354a5bb214bd95147e32d81e658705089c38035d0ea423eb1a5c82f97443c6903d2cf1ba7a007eec7c8ff98b8f82b073d9636a79bd47c7f2f639a8eb4e92076f9ed615766f43ac3a4f1687301ed7d507766605e0e332880ae740ab72e861a2cb6dce1df1ff8be1873d25845ee7c665e712c5bbe029a1788634bce122836c":"f85a95ed10b69623162ab68d1098de94":"":104:"3cf1cdb4a4fdc48da78a8b4e81":"a7f252ad7983e7083260598051bffd83f40f4d4a8b580cc2388d720a0979dde71549ddcb86b0a62c4964fca591d0982f3a203f2f8884ff4991f17e20f759ea7125ba2bb4d993722f23938994eb2709c850f33ed9889e5a3966f9d7b76add46aedf230e8f417425f9db79ccd46b5660361de7c5d87f71a9d82c491c0c3daaf56c":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2cfaa215841826a977ae6adfdd993346210c49dd04d5d493":"e8eb3b6edd0ca4201b49a6a83036445aba1a1db040f3e74511363bce769760a9914e05a067f555ca15a57c6e02e66fbe4e04dd8c8db8d6d14ebc01cc7d84a20ff0aacb69bb3679d6b7d9d2e07deda7c2d4fe4c584fe1166e78d21dc56b9cdad93709c03b9145b887f87b4f605f24f989d5e0534fc71a58e8a8619ee99f69e5f5":"537a4ee307af3072e745570aaaadce34":"":104:"df01cffbd3978850e07328e6b8":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"128ddc83d2170c403a517615056dceec0d19d6fd7632e738":"cfe9f7797ee37bfc4f564419bf2268c964479efa7435970874154432930f3b2736438da4dc9c76200009651340e23044bc9d200a32acfd4df2e1b98b0bae3e9ff9d6e8181d926d2d03f89768edc35b963d341931ac57d2739b270ce254f042b64ceac4b75223b233602c9a4bdc925967b051440c28805d816abe76fc9d593f5a":"5124b410c43d875eca6ce298c45994a7":"":104:"56ad9c1653f11a41fd649cccd8":"cf91f087fd7faf362caacf4a68cff51ec57b3075563e4ad0955df20b366e92bd75c3762cf4a6f0eb859872667a5c55aa5d94f5ac9479b1b9c9345b50f82379d551506a2ab02b0441b14b28b78a12b38500d703a8c19888fe612d4710eec7cd18c16d6a4b55d3c69760e2bed99efc8b551dbe2ac9b9b64715f87180b8e14d1795":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"98581c28983c4da321ce0c419cc0d476d539e77da513c894":"bdef5b65b5111b29e781a6b71a0160179c52b5bccb1ac5c0377b26cf3f61432f3ccd67633a836357c24b5099db0510a7f8110f59e8227cacd11f17ea1798b5d4d68902ca6c6eccd319fef14545edd135078b38d43b61c9af269fc72f7a209ba7897e4c6dbd21bb71d7e93d2d2426ffa1557cae28e74059d3baf06ba419a47b39":"ff10234524433b871202c2cca6acb194":"":96:"984943355a7aef15c4fb8033":"808e28bfd441cb8890416a757d252c986daa8d607ac9cadd2f4fd29eddbcf3b859ba298e14a4ccefe2c2752b123f87b98d6708fde48faca4bc7dd818a7ea76cfa4357932e59cb6be0e9283bdfb49454b86b9fd04aa8cdef503c65d13fcff42e9cd8f142f8c06cf7daa6d8ef8b9c9d69c39e8afd980048fecf731fd674b2a814b":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"167b8b6df8014c8f3de912b77f5a0c113580aa42d785298f":"4f787de12ba907a589edf74c8e7a6cdaaabebddd465a86e170e1efc289240298b516fddc43c7fd9bb1c51720a4455db4dd630b59aebaa82bd578eb3cb19f8b23ee6897c1fefaef820430efa6eb7d6ff04de4d8b079605fb520b0d33e96c28f0cd71983c4ce76c0ea62fd7209d21ec7b416881d545824a73d1f9f8d3323fdb90c":"49da91e926091a448d57d521cc90f3c0":"":96:"99198f55f9fa763651bba58e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"71f5f8505fba62f08fa0557dd5407fc83a852c6007ccecc8":"3e19ec02365e450e946123a3362f9859352eb52902a6bcb8a782285dfac9d2b282f56302b60d6e9f53fddd16bbf04976cf4eb84ef3b6583e9dc2f805276a7b7340dec7abde4916fb94b0ed9c9af6d4917b27e44d25f3952d0444cd32a4a574e165a23fa8c93229ceb48345171a4f20d610b5be7d9e40dcf7209128f029fed6bf":"b5efb9feae3de41b5ce9aa75583b8d21":"":96:"9604d031fa43dcd0853e641c":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4cdb38f8185a4186fc983e58a776a6454b92ecf0bffefe98":"1ca72c50a093076e9a9dfa09888b9c89eb36a942072fc536a81713f05a2669b39fdb2871b82ca47dcaf18393ca81dcb499aafcc4ed57ea79f8d4f9bd63540610215b2c65481b294638cec41264a7fdca4230df5fe1e7e3d8d26dcd0c435fec8e9bf778f9e6f13482157a9722761601e08425f6160d3bb626ae39ee1117b0353c":"aef257dd44d14d0bc75f9311ef24e85a":"":64:"d951becb0d55f9fb":"2eaa7e922dbd8963e2078aae216636276f3f7cb5d7f35fa759e91bddb6e247a93c388241ba1d0d37040c0b9e447c67d35b4991c1acce97914f3bc22ee50171bc5922299983ee70af79303265bc1ae1e7334202460618b4a8891d1a7eaaac5cac1e4dce024ce662d14849993f89e771fb873644b552120fd346250df39aaaa403":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ee8d3aced3aa3cb2166aa66c4a252c12dc0978830d0bc75b":"ee69b2421d43a9f383d99f9802ba4d6cf1c537b42041c86cce681049bb475e5098d4181f1902b0a49c202bf34ef70ea7b787fa685ab8f824fcc27282146d8158925bfef47ccba89aa81c0565eacb087b46b8706c9f886b7edf863701003051d6fb57e45e61d33412591ec818d016eec7dee4254636615a43dacb4f1e6ec35702":"c15c9c0b0b70c7321df044bfde2b15fb":"":64:"c5c9851a6bf686d0":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4a8538d609444e3197ab740cd33b66db1cf53600096b94e0":"8c2b8fb775d1b21c41a3dcf48ad6d68ab05be3879f9b94b305a6ce4d799e3a992c1c3a65a3e4eab563edb57424927c90c76e49386e29dd5e7de2800fcc0eefbc8b4f977f71be3754c006ee93dc09b1cfa59c424b6b3987aeb56feefc21004c63e8284b6845e395bc8843cca0917267fb4a8f2db1f7daafe7a9da95083a44de70":"0bd64d222532dae8ab63dc299355bf2a":"":64:"3477cad1fd4098b2":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"447f0f065771b6129952e52206a64fe0844658ed685e39cd":"fea5d227869e527882c63a68a6623f4a699df82b3dc715c7260a5554336df8376744c05ae89ec27d40da02d9f1c5e9e29405579fd4132143cb21cdbe3edfaaab62128ecc28018725c8dd309d2376223d2e2edfea9765699b2630ff5d9fe9bec416c0ca6418b938d195d31a08e4034c49d79e3a249edd65f985230b33c444dd02":"37e3a300542d9caf3975c6429cb8a2e8":"":32:"06bfca29":"e1bdd1c212b159b87e41a5f64dcba6b27aa0f5c8871fabfb588df0e06bd7730ec1beb0e3388f96c992a573ff69b34870f83c53fb65b420c1c6f92e2aa6f03917e8203d77c7f5ee08baf9fab12f9d38fc0ffb83807ba781c3dd7b62edca2121f68ef230b42b8adbd4cea072209d02713789ed559b83739a54cfde69e68bdc4128":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f465e95f6fc19fe6968b98319b547104d0c01c17105f8fc0":"2426f108368a00d2a49670a3b64b4f0569c6da9660163e7b209ec3f8d058ee11f7818a8c5030c5f4ce6e1e5a93faa3e5ae3d0bd5d712fbc891cfeb20845707edcf5e29719a5246a3b024fb12d37bd1b81df3812fd50b1dfb3e948ce546dd165cc77f903c07fe32bc7da7fbc25036679017317ce94cd8a00c1bce7379774f1714":"6cba4efc8d4840aa044a92d03d6b4d69":"":32:"92750ac9":"2e59b104c1a6f6d651000396adbfa009bf4cf8cbf714da8e4d3b4a62bd7f522d614decf090c7552a4b9e8d7ee457ba642d5100c0c81c14cbba8c8ff49b12827f6ebd41504ccb6dfc97cdf8532d1f7f7e603c609efa72d2ae0dce036ec4ab36849a0c06f8737d9710075a1daaed3867ca0a7e22111c0e7afae91f553b6fd66c6e":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f08e3e9f7b3a20ccdc4d98b56f2b567399a28a6b3908deab":"a986e816f1eafb532c716a555cca1839a1b0523410134ea0426ab309520b339fc1fdeb40478ae76823cee4e03b8d3450e6be92d5ff17b2f78400f0176e6d6a3930bd076a7a3c87c3397dcc0520c6b7b4ff9059ea21e71c91912a74aac2ca70eec422b507cc5c60860bb8baca01eec2a3003970ba84011efe576804b2820e306c":"4f4636d1b283bfa72c82809eb4f12519":"":32:"16c80a62":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"87b5372571fb244648053c99405999130f87a7c178052297":"ae078d1554fc6a14447a28c3dd753e790f7ef9b53e35c3e0fe63a7b1b326bc56034847f8a31c2d6358049aae990bfe7575b439db370aa515e225e0ec730488c700a7b0a96a7b8e4e8e4c6afec20decd16fe3c0f3f8d7a6cf7a8711d170829d14c706cceb00e133b8c65c8e08cd984b884662eddd2258ce629abf6b9dd28688c9":"a1cc81b87bd36affe3af50546e361c9e":"684ce23f59632308d7db14f7f6eddaf4d83271fb0c27401b09518a775b36252540f14305f0dae13ff6c0dc565c9e570759e070c8ac73dfb97abd3285689a7cdcfc941f6271be3b418740b42ba4a114421065a785be3dfa944c86af56da8209779e8736e62529c418b507c6d8ae002cbc0431747722afd64521734f99273de455":128:"98177b3428e64bc98631375905c0100f":"8be7df33a86b1162464af738de582a357d0ce8e213bba1b7913c0d13ad759d62c3bf4366f5130b3af2b255b7ad530b4977627f9e76b07e360c079d0f763dabbd22e976b98cd5495c6182f95bc963aad4b719446f49d3a448d11cac5bfcba4b675b8e4d88a389e2580e8f383f95bf85c72e698680d2a2bc993c9ee1ce0d1f1ac3":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a2d069b826455d5e79e65db4f1d2b6a29ae9f401bc623917":"acd6225dc5b9109d56ea565ab38dd4db432a7ec08f0db04f1c6b691c96d2eaaa6be62da7cc7fd75f931716c7f39705ea7cf828f1a5a325955e9b2c77e7fb2d562be6a89b3351b1b3d1355b43b73ed425049430314c16bf0836ed580e9390a3b8e2a652fddbfa939ca4c3c99765b09db7f30bf2ef88e1aa030e68958722cb0da3":"6d40a0c7813bc0410ff73f19bb5d89c9":"9960376b1898618d98c327c1761959d045488cc6198238bbe72662f276d47b41e8aebc06dbce63da5adcb302a61ade140c72b9cf9f6dfad6ecedd7401c9509fae349d3c7debe35117776227ba167f2b75921d7321d79f4ebca13d20af1638a1567043365f179f4162795fe4fd80b5d832e4ca70e7bf9830bc272b82182f70d2e":128:"010195091d4e1684029e58439039d91e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f3252351fe8e7c628c418c1a49709bf1f8e20add82539948":"7e8d2816d280c91d232bad43b6610e2d0532a9f670f221a3a975fb16472c2e83b168115e87a487bcd14b37f075e1faa59c42515c353cdefc728ac617b7d273fa96778e3fb5f7a1132f8e2add4a57015b15d1984338b7862356243d1c5aa628406f4a507498eda12d2f652c55e8e58113ed828783b82505790654f036b610f89a":"eacd2b1c3cf01bf4ea7582d8ee2675d5":"141cb39a2fb8e735e0c97207f1b618a4b98f6b9bf8c44a1c8e9ea575a7759cc2a02301274553e7744408b2c577b4c8c2a00e18f8717fd8a6d2f46a44eeb05d685fbef7edeb4229e7ea9b8e419ffcb504d33583b3ae421c84caeca9f9789047dd7b1810318d3765307233567bc40e003401c9f4e1b07a2a7162889e1a092aedc1":128:"63a310b4f43b421a863fb00fafd7eac4":"699c146927ae29025e5b20088b20af27bc75449e4725ee6b7d5dc60b44ba8a06f7d265330c16060fbd6def244630d056c82676be2dc85d891c63d005804085c93ce88f3f57c2d2c0371c31027d0a4a0031e3f473cb373db63d4ff8f65be9ebe74045de813a4e6c688110d000f6b12406881c08085c9348e1f0315038907e33f7":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e462957f2c500bf2d6bfa9af97938fdd8930e360ea4175e7":"82a7a6dd82a5ea3d9a8e9541d854978487eda298b483df02b45c76b8b38bac98ffd969dd160a2765595b19d4ea3e64351ce95764a903f595dd673d13facf5a5594e01be1d60a0c6d28b866a1f93a63a74fecb6d73ac6fb26b20c008b93db53e9dc1d3e3902359fd47734fe22a5c6958f97e9001cc4e8b6484d9542dbbdfcfcdc":"b380584a3f4e0e59add4753c282f2cf7":"682b0af6592eef173e559407e7f56574c069251b92092570cbb7f5a2f05e88bed0af48dcda45b2930b1ee7d5da78dc43ec3598a38593df7c548058eda3c9275c1304489aff95f33a6cd79e724e8d12ca0ae92b20273eb3736efcd50dc49e803ad631dcbf64376a45a687eb4e417aef08a3f5f8230d3f0b266ea732c21ed2eed7":120:"28a43253d8b37795433140641e9ffd":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4a62ddd87f41c6df756e8da0985dcd8c91e73ba395b3d79b":"37a83ee6dbdece212446739ea353cb957b9aa409c88bee042bbc3a6e5199aeb28f2b4b00ff433c0c68d6db5a197566019db8a4c7a792e2839a19a302ee02bee046adce04c1fbbd5b0c457d7cbe277992ce2c153d132269e2d1f12b084cf3026a202b4664bc9d11832e9b99c7cc5035dcfde5991dd41aeb4fbf8bec5126a9f524":"1d1843e2118772d76a0244a2c33c60bd":"028b92727b75b14cb8dfeb7a86a7fec50cd5de46aa4a34645754918b8606819d4bf8a2e7531a05ae5505492ca6cbc8c0e6d6ab2dea23bff1fdf581bb780b4a3312aa39639383fd10bcf92489801954733f16b021c2e84809345216f8f28a99773341e40c4a64305a2098eaa39f26a93bd556c97f02090e1a6c181a4e13e17d3a":120:"ab738073228bdf1e8fd4430b5c7d79":"e702f1bb9a1f395c74fca0ce9cdf29e7332c14acaca45200cd432a5767be38929ef8de43d0e1a5e7300c1eb669ac1ab997b31cb1403af8451e77e63505920af0f8c3abf5a9450ea47371039ba1cf2d65a14fa5f013b7ce1d175859404dcf6461a36e8bc260e7abf739d8951ddf1a3754e2d65e0aa31320a5ffca822023bc0906":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fc46976d38a581a7042a94ea4b5bfe3587ddc65d1162d71e":"4b9e858fc8f01903e426112192d4ae4686b1ae4d683b75afb2b8c63590275943d0d6d6a23b6d35796a2f101203acba107474ca6f4ff6dd87d6b77785ad1d160ef2755d84092dc70c86db5e639b689943b15efa646aff44b3f51f5d3f4cf6c8f7fc5adfe7bf2d72f75b93b8ee94ef3fa69ea0fc0bb77b3983901fdcd30bcd36f5":"b5e92563dd0339df00b7ffa2239d21bc":"7b6f6e104acbcd7188161477d8e425ff99add22df4d22de7f28d0a0075ca4ef848f68d07ed22d3165c08e40890ce04d1bd05b1a6ccb2fec8193d5f7dffc93d97a0c036b3748f708b011b68247a0249b9e1a60b652164e5c2fd7210377de804ac010c8aa08a11f40af97e8370a59f936cd14c22ea7a236d904145adc04a241fc0":120:"d4356cb417953b01f7b1110c8aa3eb":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"403e49feadd4db763652ed5c4b1e12680cfe0abc30f4696d":"221c61d769febce3913bfead9a201a805f11005ddcac185cbae00ce749de9c4362889b1b0d9546e91598e0ddedb88b673a90acca65d7e71a85636be052f361839a646dc8b834c02f3e2261d370e6bac9636b7536225b5ea77881200c8a3450d21bfd1e11afb3a470e178ecfe944a25a7cd0254e04a42b67723aac8afffd56fee":"1a60258a56e15f92814b4d372255a80d":"a4ffa9e3c612103224c86515dad4343cbca7a7daf277f5828670834f4d9af67b9a935c71b2130dfbc929c4409bffb7974ffa87523b58890770439c33342880b33319c626bf776c1c0aeb9c2a348a7681572f4ff711d94c192f3450e8b1275f9d02c742a2c9f1da316e9918bf787f22699172986cb9b10fc56d5f6b8392ff92b8":112:"62646fc8bfe38b3ba6d62f9011e3":"5c76c90dea7d659804ad873960906259fbdda3614277ec575d9eec730e747a2e7b9df6716b4c38d3451e319eeecee74d1f4918266fc9239de87080f1ad437b47c6904ed2d5514161ad25e3e237655e00e53fe18d452576580e89b2f1f0f6aa7e40a337fd8c48d690fe013a67264a80e9b5dfd009a9152d559aa02a68f401a09b":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c3471259512d1f03ce44c1ddac186e9a56c1434a6ac567c6":"dd5b98b3b3cf03fb92be579068a885afd984630692eb5f155fa6b49f2b1690b803d34b90e8de3cc39c2e61650ffffb51e7ef36d35ad17dc4d91f336363b0734996b162b509c9954cab3dd959bde7e437e9100d84c44104c61e29dbe12492a0272ce6eea2906d390de7808d337e8c650b3301af04a9ed52ab9ea208f3c7439d6c":"50164c63d466148ab371376d5c2b6b72":"11d1f523888bea1fbc680d34bc9b66957d651efa59e788db3d3f6f50e72184b9d14e9ff9bc05fb687520cf423d681812e007025eedf0e78e7e8191e6b62404e8eb400cf837d762a31aa248553367263d6de091fcf7abedc3e69fc118b7efb0594c89b96c387b7c28ed9a7b75db60b6b5133949b891ff81eca5790a265f12a58c":112:"6c5f38232e8a43871ab72a3419ad":"50438ee712720abf2089331e4c058b30c30c3d17834c507c0010ac3f974a256d01b14a45e9ce5193c5cede41330cf31e1a07a1f5e3ceca515cc971bfda0fbe0b823450efc30563e8ed941b0350f146ec75cd31a2c7e1e469c2dd860c0fd5b286219018d4fbacda164a40d2980aa3a27aa95f8b8e2cd8e2f5f20d79a22c3ff028":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ec326a1e0fe6a99421398df4fc7d8fea67b67e5f5fcd50ad":"6d5016c434a0f4b4a5d9e0b6b8e2d848a94f132f055d2d847e54601a4c9cfc5966a654d696f8a3529a48a90b491ea0d31c08eae8ef364f71f8ec7ae7f7e39bb9c331137b2578362ff165628099944ba8deb0d99ac660d5ed2215b9a7626ff1fa6173cd8dd676c988d16c9cf750a0d793f584c3c8f5fd5d167bc278f4d77a629c":"c94aa4baa840a044dbd5942787a0c951":"f8401c578f20d9c250ea86eb945184e007a0190462c7abddf238ce1ceddcc230756aa222386d8ba66ebbba13de008ced140896ac55bc47c231cc81370ca9feadc225e017d59890e6291cc4cca27db3078c0cd6cbb51afb62210226a76837c5454728cb5ce3afe7352e7fe75421f94986e6b7b26321bbca15c75ac7c13dc15f50":112:"3269922affb9d767f5abe041cc8e":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a7ef81652f604e88a72416924c53979dc73cadd3575eda1c":"9ecd19a8eba9fba843486e1bbfb8d9053c5e04b24e30174d4aa89d8307439d653f8630edddafd51719c744bcb4bce3e444847567bd2cdde2995870d0634cc0ba2bde4b6bc2bc583062fb83874a1c25b50aeb945bd109a151772c077438c4d1caaeb5b0c56390ac23c6d117f3a00fd616306fc2ffc4c1e76f934b30fbbc52eec2":"0cc9ae54c9a85f3e9325c5f3658ab3b2":"d0195b744351aa25a57a99df9573dfa3cebe9850139149b64f7e4af37756a430dda8af98e4ed480e913aa82821c01c1f75b187e105a8f39621757d522c083a8d81d7d8bfe6cf15c439d0692b6affd655a11bcd2457046fae996a1075c66029867b88cd23c503ae04037dd41f27bafd5000d1f516002f9fcc0f2500e8c1b27de0":104:"22c2efeddfd5d9cb528861c4eb":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"605271a41e263c92dc14fe9df5203e79d58cc2d1289dc361":"2bda3448a283ecba31e0299c0a9e44628cb2b41fa7b1a41107e107cabc381083bdbe048f2804568fdd5fe016f4d607f694042a459ba03a2deda4cccc8cbe4612d8ed0d4575e48bc9f59843369dbe2af6d048e65ff4250e1eef61d7b1b378fe2f3305b133ddc7e37d95ca6de89a971730fc80da943a767ff137707a8d8a24329c":"7f128092a777fc503adc7f6b85eb2006":"aef9f984fb645e08d5f0aa07a31c114d2f8e9eca047e4a8d5471378cfc2ced1159dc093d174788e58447a854be58942ed9a3fd45f3f4a1af7351e087369a267797c525f134e79709097e733b9003b9be0c569fc70ee3462b815b6410e19954ce2efac121300c06fd9e00542a9c6a5a682fe1010c145acbbb8b82333bdb5ddfd9":104:"673afea592b2ce16bd058469f1":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fa076f36cb678e2275561e9553ebdf397360e5a5e44791c4":"513305e86c0cb046c5d3720b25a406392766bd1fb7de2758de370ff2e68281e211922890c61f3659460f22c45a57895b424441262a3ba0606df4e2701f38281fd3436a4d0e0f8efecd231808a9ea063dfb725015a91f27cadfe7909a0ee109eac391ac807afed1767ae0515b9c1b51ae9a48b38fe7fec7fe0ddee562c945e5ae":"1ecd53d94fe287047ff184e8b9b71a26":"5ff25f7bac5f76f533f9edffdfd2b2991d7fc4cd5a0452a1031da6094cd498297fb2a05ae8db71cb3451e4ac33a01172619035a9621d2d54f812ef5343e14b9dedc93838e4cf30e223d215b4d2476ea961a17ac7295069f25b2a12d6e2efe76d91f45632c6d4e61ff19a95d5ae36af960d95050ce98b5791df0b7e322411c884":104:"079e8db9c3e6eddb0335b1cf64":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ce9dafa0e7e53a8766fc0bc38fba807d04e14e5ed61bc234":"b585b8bf634757dac015f2f69f2ae674372a664f2115ad2d03bd3e0c335306b02d0947d3cda5991f5c0c25f12ead2c3cc2d65d575fd67091c70bc93ddb4b1e21f7b0fc6e6ae652dea93a6564ff13489f927942e64dd94bf8f821c7ffdef16df58bd8306a957821ac256da6f19c9d96e48eee87f88acb83bae05d693b70b9337b":"fd0751af49814ee98b2b0cdf730adaa6":"1cba488a0fc8a012f9a336cc7b01cbcc504178eeb08237dbedbc6c7ac68fdf3a6742751a207e43d43068abf6ef4e12a5e3c17e5a2f9398fc04ced67377cbb858fd6020fad675a880adb249e4aba94b96efa515d1cdf5c0c3071a27a3245968867ea94b2bfc2028a67be34c84c3f475944497aa8ca1ab009f8e4b11c8308c1996":96:"e5dc92f4ad4000e9b62fb637":"95f4324b0656bef19eca5570548fc6a7a9923f4e2a7e42066891bc132fd73bc1c9089755d996756de0072824e69c43f2db8ba2bf6f90d3c4eafc0721ceaccce1af896f9fb15fb19c4746979b6d945f593fad61d550f81d12b5945ed728c02931d7f8d917285c22a3af748d75a6bf163fddd84b941d8564c1a63192c816ad6d6d":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8a328554fed68dc4838fbc89fd162c99ec105b36651abbc9":"75986f56972c045c850ed68aeb229f203b228fdfc36cad6b16d9bd12037c48700d20d8062a983ffeca76b8d36a67ef51bc8853706e83a34e4e23ff4f4a4eb943f19dbe85e454043d7906be6587a85079f9ccd27962d2905117d2dbeaf725d6ffe87bef52b2138da153ef29b18065b3342b3f9d07837d57b8bc5f2597de06c54f":"e4f7c69a1d026eeebfc45e77bd7b3538":"e349dcedb0bfcc771c820f0d510b80cef32ae3326484e25aa183015941e7844bc46f617d5e61fd64fa71759e90fcb72ae220bcd507f0fb389b689dd3fa29b3b937eded85f26ada9e0f3f5109f82fef47c7eba7313049750ad17969e7550c0d4093ed18ee27843d082bcee8bf3fc7833d569b7723998595a5a1d871089fd238da":96:"8e8320912fff628f47e92430":"a1ed65cfc7e1aeccd0531bce1dc749c7aa84451ec0f29856f12f22c4105888c7d62e2e2fc8ad7a62748610b16e57490f061ad063c88800037d7244ee59e109d445205280473390336d7b6089f3a78218447b1b2398c4d0b3aac8b57a35891ad60dc1b69ad75e2e86248ceac7bb4cf3caade4a896e5ee8c76893ef990f6f65266":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6e7f6feb4022312de5c804ed1d7a37580d74499107f8cc8b":"4f5bbdf575ab8f778549f749f2265e17dc7225713e73ee6d7be163ff7071557dcc2240b0705c079008605f81396414ac64f06b1b637876e04c3fca8d0fa576cef4dd3dc553fd6808eaf120f837f9bb1d9dbbd5cf67ed497167fc7db89d3a84151b81aeab0e921057f121583df5ed7f976b206ece17a913f23485385f64c462a8":"6ce13485ffbc80567b02dd542344d7ef":"c6804a2bd8c34de14fe485c8b7caa2564adaf9fcbb754bd2cc1d88ba9183f13d110c762a3c5d2afc0fbc80aedcb91e45efe43d9320075420ee85ab22505f20e77fa4624b0387346c1bd944e9cd54055b5135c7fc92e85390ecf45a7091136b47e3d68d9076594cfad36c36047538e652178c375a2fe59a246a79784577860189":96:"974bd0c4a8cac1563a0e0ce0":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"46d6e982feff0e7d04a84384c56739b69626dde500e4b7fb":"a5160fb2d397b55a7eba02df33a042404188f02f4492d46f4edc03fc67723d64f5f7fed3a60728438703c60454a30f473ac918ffc8f98be5c5e9779ee984415e415ce3c71f9acc3f808d215be58535d3144cebe7982b9b527edbe41446161094d6fc74dec2e0a1c644bbc2cf5779a22bd4117a7edb11d13e35e95feeb418d3f0":"71a6d1e022a6bdff6460c674fb0cf048":"67a8455c7d3fbfdba3c5ec5f40e0be935fbb9417e805771832ffad06ba38a61b8377997af1f586dc0fa1e3da0b39facd520db1f0ec2bdf1904a3a897f0b507c901fab30a85de51effa9f7d4703ceeb2ca72abe0bd146ba0bd3ffdee11628310db7d65ea1343b018084ea2414995f86fefb45ba91a9dc2236d92078b4305671b5":64:"84f1efd34ff84e83":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"991dcaa2e8fdad2b4e6e462a3c06c96067ef5e9fb133496a":"9cd0c27f0c2011c1ab947400d28516c7f46d22a409a18fd35c1babf693b8030dfd7822d9ba03bb8fd56a00f9c7149c056640dde690889d2f23978eeeb28ccc26e2fc251220a3682c963f5580c654c1a6736cccb1b8ed104ec7390021d244bd9f92abde89e39a4b83eff8211c8a6259bd6ac2af1da7dfb8cf1355238056c60381":"978913d2c822ba7cc758041d5ee46759":"5a94dc81af011a8af263318b60215b9752292b194b89f6fc013b0fe8e29133de631d981862f2c131ee34905bd93caffc3b8f91aeb0264b27a509e5c6a41ae781209f8c5895d0d35b3c5e1ae34a1a92a2b979e0e62132051394940ea4d9bfffb8d89ba1e8331b15bdf05c41db83a57745a4a651a757cc8648acdcf850a2f25367":64:"15d456da7645abf2":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f29cff00781f5916930f125489c87d21f6593324d1506f65":"a3e8595747b7147d471ac4fe38014bf4a409931e3f419ff88ae249ba7a7f51bd0ede371bf153bab4b28020b7a82a8ca30b75f1e3bcfee3c13db813cbc85138ef05874dedb14a6e5b6d06d7589a83bd5e052dc64433a8e24c1188b9470ddb2536d13b4b7bff0c5afcfaa9aa0157c3aae3b1774df2df14f965d6dee4332edba67e":"50db7ee25a9f815c784236f908bfd7f2":"ec1482e18692bcd6894a364c4a6abb9c3b9818bb17e5e1fc9ec0b41702c423f3a60907e94c888fad8e78f51e1f724b39969ba7b11d31b503504b304d5c4b4cbd42634f4ec5080a9fe51c82e121ae191270dd2c307af84c82d892d982413a50ccce33698054f761a3fa93da9a1fca321296b378a50d458ba78e57a70da4676150":64:"a1e19ef2f0d4b9f1":"eea18261a4de31d8619e77005ebbb3998c5dcfac2bc120ae465e29d6b4c46de7e6c044c8b148ffe4eda7629c243df8af4e7ceb512d5751a3ee58defb0690b6f26b51086dedfde38748f6f0bbe6b495f4304373188e5d2dc93461bd51bf720149a7d3aa543623b122b9af0123b2cdc9020136b041a49498ec4aa696c2d3c46d06":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2087e14092dad6df8996715cb1cfca90094f030328080ffd":"6d039513061980fb195bdf2f7c7079ca4b7e0fdd50d948cbfab5ba10b99e3aea27f08abd000c428851de82cacb0d64c146cd9567e9d55b89819876d6a635bd68bcaf47ffa41e02d9ee97f5a2363bfe6131ae7a21ea5130ae953a64d57d6cbfd45260c5f1946388d445ce97d23ab7ba31a5069a4896bc940a71de32bde02bc18d":"d30504afb6f8b6ac444b4a76115d79d1":"d95845d268c8d8f9135d310c39e30f55f83ef7ffee69e6ba1f80d08e92ed473b5ac12cc8f7a872bfc8b325e6b8e374609c90beaf52d975f71caeef5ee4c13de08dce80d358ee1cd091faea209a24e3392adcfe01aeb2b2e1738bc75d4a9b7cd31df7f878141cf278d150f6faa83fb3a2fd1225542a39c900606c602f15c06a4f":32:"5412f25c":"1e81a4c10a3440d0002ddc1bfa42ebb08e504fcc8f0497915c51b6f5f75fee3f0cd3e9c5a81ff6528e0fecd68a36192114f17fa1a4cfe21918dac46e3ba1383c2678c7a6889a980024ee2a21bcf737f7723b5735e1ebe78996f7c7eace2802ebb8284216867d73b53a370a57d5b587d070a96db34b5b4f5afe7f39830498c112":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3fc76d627c775de2f789279dc7b67979a9f1cc23c8dcabc9":"92a60d38fc687b92d44635aafee416a142d11a025680e5aa42e9ba5aa010462991ad3dd7328ca4a693673410f9bba37f05a551b949ab0d43fc61ef3b8996dd3fc1b325e66eec6cc61ea667500f82a83e699756a139d14be6ca9747ed38cd9b1d9da032ece311331bdcd698666ddc970b8be2b746ec55fe60e65d7ae47c6f853c":"8f6fd53eb97e12dcd4d40f2843e25365":"e56995df73e52606a11de9df6c7bfb0ef93b86bf6766e319aea59372060294b0e1b13c6288c2310a4bef725a2dddb174f3e1228649861757903c4497a0eec9c141454fc75f101439a2150e368857c4f0f6e5161c42c77f632bf1c229a52595cbf16e9018de9a8f6a1e6b8b18bd244f93f001eb2eb315405d223c0d27ece9d4d9":32:"613ba486":"FAIL":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b10979797fb8f418a126120d45106e1779b4538751a19bf6":"e3dc64e3c02731fe6e6ec0e899183018da347bf8bd476aa7746d7a7729d83a95f64bb732ba987468d0cede154e28169f7bafa36559200795037ee38279e0e4ca40f9cfa85aa0c8035df9649345c8fdffd1c31528b485dfe443c1923180cc8fae5196d16f822be4ad07e3f1234e1d218e7c8fb37a0e4480dc6717c9c09ff5c45f":"ca362e615024a1fe11286668646cc1de":"237d95d86a5ad46035870f576a1757eded636c7234d5ed0f8039f6f59f1333cc31cb893170d1baa98bd4e79576de920120ead0fdecfb343edbc2fcc556540a91607388a05d43bdb8b55f1327552feed3b620614dfcccb2b342083896cbc81dc9670b761add998913ca813163708a45974e6d7b56dfd0511a72eb879f239d6a6d":32:"28d730ea":"dafde27aa8b3076bfa16ab1d89207d339c4997f8a756cc3eb62c0b023976de808ab640ba4467f2b2ea83d238861229c73387594cd43770386512ea595a70888b4c38863472279e06b923e7cf32438199b3e054ac4bc21baa8df39ddaa207ebb17fa4cad6e83ea58c3a92ec74e6e01b0a8979af145dd31d5df29750bb91b42d45":0 - -AES-GCM Selftest -depends_on:MBEDTLS_AES_C -gcm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_en.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_en.data deleted file mode 100644 index 18e56e79c0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes192_en.data +++ /dev/null @@ -1,675 +0,0 @@ -AES-GCM NIST Validation (AES-192,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f8022b8988383d5cfd7d9e0e208146e7868d3d714fe85744":"":"5fccd8cb551cfc9c20998da4cb981d49":"":"":128:"1b5c6c9a28f5edfa4cf99176b0f14077":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a7d4456b8e16b82283b677bd8c4b1f56dc7f153b5cfa746f":"":"081de4a3f71f5d6fdf7801ff6c667f7d":"":"":128:"90c2729c5ba04f8f5c73726c910640aa":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5779b60b536b096c9348cd8dafb3451280791e319b7198c2":"":"62f8e195bc79957ca8ce99a88ded1a02":"":"":128:"699d71bb63c668b533c357662f861513":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"966cfb078f695c8ad84ede2fb96fb89488fa271dd3b50346":"":"4a7b709d45745d94c5433b01fc9d57fb":"":"":120:"4a9bd213420629a5f6e471650060e0":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cc69ed684af2c2bd2b3e2d2f9faf98acf8071a686c31e8e3":"":"0bd4197e5ab294ab7ab1e6ec75db2ac0":"":"":120:"6632b618b4cab963dd671fd53d2075":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"99deafc5ec6155043b53a86d466c2b652d59b7274bb844ef":"":"09d18e85e5ed38f51e04a724faf33a0e":"":"":120:"90bfade2f07f38b2192e24689b61cb":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5c0c706a1fd48005e0fd0ed91b4d9f0028c500dccb28ca73":"":"595716e15498454577d3581e94f5c77e":"":"":112:"8b10eacb1f127f4c58cbb8c3516c":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ae8e125507ea16d5282fe8bac42d3cb4908b717f345e6a38":"":"0a7f64edb8cd8052fcd5b92e20c0bc2d":"":"":112:"467a2c0ba1d24c414f758200b8a4":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"02176a5a5d8cb8f5ccee3f66a22181765ce730751c135198":"":"c19ed1f52f5ebbcf89ab1907b9ebc7f7":"":"":112:"6525beb5856d6f29105777e31457":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4434d6bce3a33551733d7afe8cd477a79be8eeac19bc0a05":"":"b0eafdf326886eaacb750dcf2c104abe":"":"":104:"ab9f7923a3b9228cb9ecd7f907":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"39994c2520a6196cc3f3e8c6e4833286ce37399e0379563b":"":"dbf9c40266d95191d70739e932cd8572":"":"":104:"b29acaf5addd6b379315535375":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1f27d054114a264b37ee1821a077773750cc79d28594f506":"":"6739d43092620f44b57e65035ce14565":"":"":104:"25e0434a3660704eee4bb82962":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0e97d15f4992a6354e43944fd346da65ac1f0f1229189442":"":"32a64e826b500d7e85f4c42a784f7c19":"":"":96:"da8f3e0a6f156ec260aa34fd":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"27504fc47a9e9a85eaded3782cb5b088359ea1c0abbf2730":"":"c55c8dc3d6d2970c81659f2f87bf849d":"":"":96:"113e637538de291e2463abcf":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d5fc67f73de736768e5c64c37459c5eec3d27f7e337c346c":"":"2691432d3935d4ea8cb8f7c17bef3558":"":"":96:"c0af76d6f62430106ca54928":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f28292ee2c54119511a67db0d2317433abaeccabfdd5d1f1":"":"cf9331a1bb3851b2fc3aeed2d1a33eb8":"":"":64:"8e14b869a95eb12e":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2042f9244079736291ba7fe1f030cba99672a97ce361dc14":"":"aadfa619bafb21b5c738b65d632bb8b2":"":"":64:"ad6f52f25aea1c55":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d9b4eb00ac03fabb5304ac38414f7782cb0186436a4b9036":"":"809939260117b759d8dac1a69c27c12a":"":"":64:"1f7d0b3104aae50b":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b5128f4cf91d53b3a50e9b76b0b27da33cbd4b9349d89413":"":"644909f5fbcd61d850e43fbef1fb454f":"":"":32:"2ddbf709":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3ac7ab2ade7a8e397d66be6dc7671f19cd39ad65490f1712":"":"d152359d765f41dd9cabf5c8f37cfd8a":"":"":32:"a6e4e30d":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f9c2de7e3c74b7e318413a32892d4fd070de9882158bbc82":"":"63410c83fa363a63fa78303b9994b6c6":"":"":32:"49c514ac":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"66ebdc2332276784a69b6bb137161210bac9f1d6a36d6a4c":"":"647f41b60c6a579086ba8854d043495c":"da26eebd04c27bbe7fa7b54b87d3b7227f056dd9c085fabfcb59ec665a257c6de68fd2c1c51aad5e6188e02a56f70aac49ba489802247ca327de57ea3cfa87e72cae7dd82b50341a2133b03cd0027216fcd94cf43ec8a48e1c04145b597924b37f7977db3ff23b8edc913357037d0fe02afe2bba6b91e27554edbfb77f51cc41":"":128:"420b320c2d616a0b11a7605a84f88e26":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"26b04d8427582b04318fefebac2a2298ec3ce61146f39a35":"":"99f3449c8538414e7ab595b92a7e6e10":"edfc2aa8ed91cfc0e117fc9e2d1bfe843c7cf365a2b6cabd4259686cd7aede9c7453623967a30ffbd52b30fc205208bb346ffc70584478f5f39a79d4971ed71cc3dd0200a89aef6aecda0a1f3a4bf2929b7b9e141be0ddd3671f727e5e793ef085f52ecb77a266b9a02a2c700b63d8c43da0b569510285e98b530abcdbf7739d":"":128:"091cfc38b248460eafb181ab58634a39":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"82c8197e6641d0832639e2b1d7691fbac79618b2f5db45bf":"":"69e1a3e5eed54bedc941646e3ad25a6c":"d0fcb4f4d764efc0fb52c8108e61b67a1386f1a13c1761941cc9a28c6ad15e78474cd2a65ae9475d70d9c845f14bf4d2bd2bc46c29e507a347391829e0f24495b026f681c387b3e6aec8acfa5ecaf4c3cfe796c22469478ee6744cf04a22e6aec82489f53109551f58cc6602933d1780b8b45b933f76a94ef652a8ce8bac2cc6":"":128:"8e74343ae8cf1cdda4969c1a94aab5cc":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1a349ba960b2c8f49b7e5314911ba8de358f2e74ceddf126":"":"f5998a62ec507c5fe5b280f9c57ac626":"78445eceecf2e6d2ecf2589fd24e854bed3aecc63aef934aec9aea93dca95d58629002a4ba91e9bf6d12e13f0a844977b3c2700645281db5de381adbccd34a84346a99f34889bd46c75b1956e21aa9f87684af55d7fd0de6da07e856d9b791c0a45e9e37881092f6040a9ae9d87757142d3c9c7fc6f25db0e5b5d377865ec4da":"":120:"4d7eab0a3719fa53e552b9e5a85bdd":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"019af03d23342f7916e329b6843161e566aa859402cb07ff":"":"c5fd96765fcf6d51e23ac6d206744af0":"f9808af3403051a52b6652df03b6b37d90a471bc242c436cab6ba699139eaad16847665093798731b9969709287199233c5e77351c5e42b15453b4171237a6d16aee63773c8c0d736b3a8bf38ccf922e561c456682fbc2c7161da3b89526d9de222351bbd04ecd4e8680f26d70fe57d577ea287b199be1bbb8b76328ddee3d33":"":120:"fd36fafe4f5571fafb6ece59b77381":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fab39ad2946b2a343d76b1ccc1939cce7ae3cd7b6ea187bc":"":"247bc71446489dd3495c4dee8a071c76":"cb2c06fa5aa54ad079741afc56dbed79061a02045b6c099d0ae2d7883b78c5fe09636cc8a5dbba0c0c76ebfdb81217526afbbe04fa4b2b78f3357025930b0f9488369bf3aa088a2107bfb6c4ba714f1c26d0380d647ada5852d2c539300a4779295412b202c3cb977a7b94c24c4dd2a891a2035f388257b84e5b31bdc895f062":"":120:"65e1aad214f49881a067d8b372ab6d":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"57b52697f72ae2df6354410a69dc3c5f28b31e6617bd78c1":"":"0d96720526491d196eca66457e3c9e71":"cbdfdb3cc73aed4297ff9aba76dd8ca4d8efe11b0f521fd7170f07461c7885252874b2ff8fd05a3943ecdc824ffcef0396980ebbddc0a53c6c99086c14fc806d90d35347d45e556e9a55ecc3a9fd74c8e5dbd19ed8b452eaeb673818ddc0695f56ddf3b139a3df378fcfe5b6ccfa358f5a5bcd1550f1d9d5f325f15f9dcd007f":"":112:"f0c49960e60fb63edbb50bfebd98":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7bf69ed06271107e11fdf016edc4aafb0e2d2ac05bdbc46f":"":"50e65aa338cfe856c80cbe1331b46abd":"a7cab4e1e56f4b9fccca08d3791560e4b6c7ceb40a10adec0536861c5c46fc3fd06c0a8eb32c9f18c40463b0f06cd0053e615dfd7caeb2b353b08ad6da1f8a23ebddf16524d2eaed70d4d7e565412dcc9598df7e107beb464b103cd8de9301cafe8b0420f0c156025d72b73d6e015ed2312535d35899aed73aa54374674d7f02":"":112:"d7fb9d78fede77981948eb013ea1":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"caa781bbed41d7a1c56d47673f74d4310a3bf8b1275031d6":"":"7795dc04261d9433367f51c3b87bf18d":"f44d77bd541e02a737c693ff3ea0adc091fff1966a593524e68954a2d7d66a48199366a5a600331cf392965b5ebedbf949203975fa9db53b72586615975e8a7b84e0633c6cf69caf482dd72b26b0a5687ec71667e7f6e5abea89c3d69d2dc42a242ef959e4039ba5b2d22a3e48424a431a77e816604769d13b7f892e2b33fcd2":"":112:"386930ced9a46097c0d1f6e65c62":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1b268de4ff644cfa4361f8014656d5d4decbcf9cede8605c":"":"4009bb00afad026cbad117c6047f4ed8":"140c5a93293598fab85b3948b53e0ba15438a0b948e91041a13104f0ad263c8a10613e20e87ef261999a54d469ba6f1abe56ec3979623df8520a0476801987c15410ec24f5a9be72acfca71e8c5904e2ea5f8b22b8cf404b9fd533aa37e33b3d4cf91599cbb3b85ecda4aebaa27ac0365df8312c399ba1767c47fe0923f2c53e":"":104:"af36bcee7561cd7d0861085d55":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c2843bd689ccbba60ce961b7dd50619a59234dad97567e39":"":"55a68cbaa5755d8c67bf26f03c5863c6":"d7980ab86ceb9b66ab265b68e078deddf7ba084b8967c3227839e8f31cdcfbbffa004953f3582ea9274dcf46e3ad7e7744a576dec37e0cb36fced2b2c2fcf4328f506302f5741e696ce25c49492e33c6a0c8aed5af03cdc1a266352623c6a52a555ce906f684bfd597b5e37f60b5175a981088b9d8b8b5493e4fc1bfeca64f95":"":104:"66cccb7d28d3fa70bce2900a84":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f451c5edf9849a390486dfecad437cb809c33d31f6898ba0":"":"9e2dd52c04651ceea88caf4adfb2e8ee":"87b804d4a81dc203d67a92b4fdeab959c2056dcedb28d29f216f9172817bcfb3d2256bc1c8aac23feb22b71f1fd02ea28cdf91785931750ba4865d672345b5001b1aade4f6acc7edb03758d2540e6472aff50ab3ea61a0b9ff37ff7a87b91013b14867c3e43cb097a923e6d8ddb1f52e4bd940b60d500a4e35bfa91935065f26":"":104:"e192a49f5f2b22fa39dcfa54c8":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bd02ff8cb540ba572af3431597bdf3f23e61665f96a19b4f":"":"7198af3f594a4f0597f45fb592edef50":"ef06de48bd34f362fdb425c6e35e37d0dfa1ea874df7d201b6a1c25b736c96e3cc8ed0915807fb7ed759482ca701d28c08cbf955be244bf887df37394d1ca4d2e7eace0dc61c807b714f3161f9d7f554c9f87ad674849c136108cfd8f777997656489d3e993aad4a51b68616083876832b3085a5f8f154b83ea44702c70f2980":"":96:"43298281cd27a36e5cbac4b9":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9ecab4a4a9dda43477c993d6388387443c66ac253071c504":"":"9523b2722b927dc3afcc5f7dab2bf033":"fb84e38a84225c8ebb307df88325d020a5853bb05ac7a75ee38552c40c302d263181081b05918775cf9cd6905b9982b2ae9ef7993f28fd8714e878c9a4a8101c08e9f13581dcf4f16dabfcb9d3c471c0056805f51e67e9b75572639c3d6ce62d2f8abd64e1e66ffb292360c20155e4d528374a5a22d845340d6f1ac68d33040e":"":96:"696bb674e43cdc7d69346555":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"733df8c42cc2e70ac195615d4911ffbecbe2712230c5c292":"":"f76135eab5d42e82aedff3090a1ba606":"0c8aea747cacf2f0fdfaf368cf32b12dc49f5da9a29bee380d2d64035b73efb56fef13aa20c0b612d9615cefb94f26978fa0b371a47dd20051a1605b9f5e133b52dc514577c53319c9e2bd4ac7cdf37d56a9e715e27860a09d86cc21d0b9f0f302f6acf06f2ff00cc6c878dacb8bde51082f701314de7efd36a246f80f8a8fb6":"":96:"82e6d0c076c7d8ac0839fe18":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ba33c24c41bf9836607b6dd05e66a3d16298c897dd1d70ae":"":"4b30423df6de76dd684274afbea089d8":"71f5f6ee7bbd774fa691a3d7e0f694a6c8dfe8aaf9cd720e163ef6d5cd949c798f9e9c993adb6d64e7220aa0f17331bfa9a43b659be101726a80e5529e827c3e4b05cfb4d78db9952e58eebe64dfbc0d1baf20e7e48902215277a49ee953108526a70ee150eda85e6a0e49955f8c6323766ae10e13ecfdbe4815f4bb4ba43786":"":64:"73e80018235ded70":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1711553980e3fc5c14c98611ddbdf426463f82c66df83a70":"":"3396bd96b83ba611ed22e12e8a5ec911":"9506f34c90611acd6ecea385a782a5739f88b4fd13b77570c4d7e0617283e7b21568e32c42ada1cf6aca1a2e2ba184d4101306ff21c9d03e0ffda4854773c26a88a5173d52960286c18753df17361bb7046d2884ee600f58775304f49cf4e782ac70cb00b3d9c345cfcb38e3880743034640bbcae83112543cd1622ebaedb221":"":64:"5d51a0868a2161a5":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5d69dbec7ebe80f2b5b8f61fdff1f4413f5f6624010fb795":"":"a2eb3ba50dd93fa375cf682db7b2bc7b":"a0f9c0de86b54d3c176ece3305463237e1f70be3c52e2ab1c773a9d27d6fc5dadf61ce7a3d10dba8730d12c306fca8952403983bf242fc1b6efaaa153ca446a07d16a70af4cb1aa4d4c0c93d646dc3a5630f5a610aa9e6eeb873f9a06d3234642bc86b03c596235ec03019e762458abe17d37409a18ca5b7e0e0088391dd3acb":"":64:"1a827855ee98d679":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7aa732879f290aa442217212156920c69457b8ec41eab153":"":"cb593221c59846dc82fc0d0cd04af3f0":"15d7ebf94985c34b72b6675d7346f0b05bdb8fd3a278555939d2999028e4179e69352d398a5dd0e5b370bdd9cbd24d576b89709c98b6142f71f5b1ba224222afb67599fc58fe043d1a91d7ea95b56dbd086db8e3a061b1bfc6e82dc9ac728174fd3669d65db62a06380a5f72c3d091b7a1b6998041d5501e9fba8bf91a7d278c":"":32:"55b86d22":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"961a3e78f6a75944455f9d9d0345e08f4669972f3d5c202c":"":"ce43a19ac648e62ddc49d243fb34e29f":"393736558133078a0367b8248bc18c8352f92a9212e90318a5b63ad3c422ccda7c181c565629acf4fc73b2de85bc9cf38310fe703a877b3e7d3b2d416aeb962f1027077232cfa39c5e5284a1b323264175546ddfb250ce693e2dc78a0479bd89a7ab44b63e504866d2ec6b5153cfd51f29a91cd4fa2b8e09878747ae53981875":"":32:"ac701373":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c4d492904becde4e46c2557ac833265c715bb57f18cd040d":"":"df41b22b92d43a96a7504514b92e644f":"c4dd46ce3e486d89903482de247c1e7df05809a247302db3ca8457b93d6886c0a3d1be40a90f6502ec58d0ddd715896cee37322d48ec3f0c3ad716f1bb679afdcc0e4c79e5e2e346702d349ec7b391ef7eafde618bbadce5d14d22123de611c065780a4d05e928e87d12b749888d6004224c3e457aca0190bf1a7fba2453680b":"":32:"7a259bda":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"316660f013ced78a16701b35479ffb1f7c8c4e964c1b52b8":"d262c15d08aea46f614c7f8f6a54631289e54ca97d698777388e137f431bb783601e7999e7af98775d7b87ce061d9ba56570ed8c58b6bbac5f12f751fc376ab0f14b36b40b2b5533727be3bbc9a51183405d5fd0121201ff592817d06613b504a3440b0e1a57e9ed1771766a9a5b789054f7032d20b23c5c37d77f293c677fd8":"919ceb172d2cb460bdb3b3e58debe889":"":"5f5128f7f948f0cc9fb248a24b07c54247e40080a992acddb2615d90ef9328a17bd5e9a698b00103855738aea55c4944cde4a9148bfa8db12233231861c455e52c9889119ca402eabc8f41b27000156dd29b901024336cb2b7088eb5fd534ba58f23caf140a8b2549486074e4edbfc262ed9c7c7ccaae24be8de873ad43cd13e":128:"ae22ec4c19e7616a5b877f168febd202":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1bdb707c328304809bf0608874c9db373df3c7104a5a7049":"ca243caa145124997f5e2e6bb25d021a38d58d0ab1bbf06d086c2416c08e3512aa887cc215fdb34d0f2d78f6a45885767f15fc00b68a4df1130587de777efb9cfd59cafa077477e97edabf2bf04c9a6ce029c230385ca5f9928bca7fe5503b18774849199d2a39a378a2d3144aef4416c1718319ff1bed8021dd77a07f61eaa6":"b7e7fc0d5adaed1632c5f7d1f56458f1":"":"91c7954bdd6a49360fdce11c1bc710512bf5a57bcef241fb63e5ceabcdc9699d0c0ddb025c75195ec25e631507f13e18799e6be9798e5639ad8401f6244c5b0ace3905ae0de08e2d0fcd19d193de83943fe449af4b503a454c248e677d2f51100fd9b8b7e5388d5091089369a7c2ff38bd353e9757ef873a87f15f30232bafb4":128:"72337bdb2bfdd1f1ebe0dba6f9b7b649":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a6dd0d7e9d6ad1ad7c7394d53e9e081c436d34c8158bbc95":"2d95d64ed3be857a5c79c7af20aee00f142557e10d780383fef2d45f16c7e2823ffee495b220c87971610e5650f7c3e8d296b3f03fc883c00351df48d97717427101aa0c08a23c408b24511621b640c210b316cf17e3dfd714f0c9aa9ddd974692d1c2ae27b9bb0fbb428e7a9da3b3cf9bd869e730ccaa3aa4bd08f01f84039a":"60b4b9c77d01232c5d3d4af81becb0dc":"":"4494460ee73d3513814e1f779bfe3a229b49348d7641e9ed4dd959b582960097ef08b91292bb9db87b4e728d01b92683f4cdc81151a69bed2096bf6fb2e45d0148404420ea16b631b421e6f4c6665fe33c2d11e7b22b6aa82b610b83214ae4d17e681972e3a1f77306d3c54d96c47d8be1fb2c8cae8300ac9db99013f25a65a1":128:"d40a246c18518ea9f8d733b42181123c":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e9ed78cb5c10df05ad00c6f1fb35b4d28e6ddfcc16456807":"e465e57cbac0dcd1e8ccda22042abecd9d89c4ac91b0e82a41fd51107a792099e63f7cf23a889d8c04edae2c2b3a9e51dbee6c3b71ace3de08ab354a295888bb99ae0fe428dd69bc013d49a70511ef60524282347787a542fe9501b6452b5faad2f129a9795c2c4cc0881ec4af8f0e0d2d4a7a628cb051055fe831b51e250608":"3a8ad989c621ae1e82b8d255a3c95028":"":"6855e4702f1ea593bfe30ee65b3fab832778d6b11a0ad902dd37361b8d85ab76d1f2ccf7927d695eb3129286c26737b9573e26bf64b31de26f97525f84345f73bda2888a1f53c9b405ad627bbe5dea123c9fb0a4b7f193cd8fbc8fa4a5e5f64e9c083f5c048d61fd1d347b49afdc69e0ca6a82e3b064c49d5bffa2800b5cfcdf":120:"9661f5c3b0d99d4f762bdcabd48df2":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"76a5bc9a8d7c6e2822456156cea7d493702d61e7d504e3c3":"0a7fbca875fd620c3d8de788e5c27534160f68d60d70fa4167adf0c18ea25fa1f2cc551fdf447aa16678d3f82193cf421a6fa953532a3765bcb54183bf0e96527ae5e695ed3bba5d9911f36c1aa73132cd43b2698996eb43ff84420e315a06d7db02aee815461892c7ab9026953c4bc25f47153d5cb7b966b71b24dad69fa565":"09b681de6683751300c2ada84a214d02":"":"dd66e08fc500426feb497c39c5853b26376272dfabb82ab5978167faa91adb025a6ca0e8fe3d04a0d97062eee8ca6530c3788bebe4436ecdd3d9eab96d38a0cf9b8cc6a584a0facaea33ec2f4a6e61f780c3dad524df902f421e3204cec7c9a4bb3f0860e017eddeb939cdfbe6f924e1eebfbbf8ec63c55b62137d9f8845f38f":120:"4acc40a4882d7733d8f526365f2560":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f5cb564cdd6974219e87f93a030fdcad35313d4adf9d7a97":"210a799d480b4933e16fcbed632579beb6b00aec74c205dbaf64e2cb152c12f9b6969122f296efcfe328f54202446514066594848f42a3031425020b56d065d6eaf2caf507d5f51df493c11514400b889f33d0b996e721eb613569396df0528aa14eaed117dbb7c01d9c3ac39507e42a158413dab80aa687772475105eabcbbf":"90f91da5239640a70eec60d849d9ae70":"":"69a3dcf5b94a507a53fa5e62cfca269453623ccd3a537d971130a21bee884cf271b9833dec19862ab0dfe7052e7dc07b20f34aac42bc39bf1d495360c1d701ea53a9bba64b02962b4ef64fb1c90a1a2f3a6f81a6ba781d5f28b786efc365ec6a35c826544aab94b53b96613fddb65660dd336acc34a217960f6c22b9fe60dde1":120:"b67495a863fffcc773021dc7865304":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dc2c5a020d3ea731362c29d559cb14aa4f8e3f6a554a5fee":"8cf098cb6ad79e0f0eb4ca888da004dfe6431b5982bf1490c5f2d1486c288b5d50ea0a5a63cf9d097a71348632391b4bf962bf464419c2c971e76c03eedd09d069a070c86837e16a2c39a2cb8de3e2d3f274e03998a874fa98de0933b0856e076e7f575f351d7ecd024753781f51ef600405b304e37f326846b84692448d3f2f":"bd4d45d970085e0b2bfc9477f5cd0244":"":"d44a4fd303e657670632da8dddb6a117f3e35d8afce245e7e6576711c663f36806b813ba6421ef9788681d9717a36d3eff4ae1789c242f686d8cf4ae81165191220e338bf204744c9fc70560683ec07c212846d257d924d5fc43a3d4297ac54428a32c8bb9d5137e0f4aaa42df8dec37793f3965ca658f22c866e259c80bcc59":112:"9c1d6c70e1457a8d67f81cb3dc8e":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"167cb184ab6ad15be36536f505ea5447fd996b1d9a092ef3":"0b6ec08685b5a9d32346a5fa25d208136433204f3b86182bd1d9578f0634dcbb5b59937fb87df0679334d7f41eb8bec60ae1b87994ed2cfddcb56e95a6fb4e3ab7845b0294e4afa5ad46eb5a431cbd7ad0eb0473c42c06f3f62de03d10ddda449d41137c8010af5c7c0eac7a5fde5a39b5437a2382639fe3388ce029a7d4465c":"b5cc89a1c10329bb417e6b519091cee4":"":"7ebe4a9547fb115b39b09880d6f36f8cd402bb798c6d9db036b1ebd8b87a8e9d56fc23b7ae4e8cac3500bf2f73952c37a068f1e472369b62319a8b1bc085a51fbe47e1c321dd1ba2a40692ecd68762a63467d5ecad66a3d720a8a81e02dac0ebe8df867e2f7afa367aa2688ca73565e55cf2b0072fa3681750d61e8e60275aad":112:"30454dae78f14b9616b57fdc81ba":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9bc7aad4f4bd73acf756311ff1b72b41631344b9b57cf447":"7cdf07e17f667227edc986827d55bb803c6e51f93e72d98a1cbd161b58155a1c14ca54d52254e5f88f2a08614df68cc37f6e9fac88895b53090f69544b18aee4cc03763d35e7dd94ed82d1435316e7e02367b1c43506b3ccd31e248dce81fe62fdaea3a0bfba03477d5c151b0f76f09799048d8b23699d000a9da11281efffc1":"ffa8e719f29139d12f741f0228e11dfe":"":"6ab304cb9d1ed675383ff95f7f61ffc2aa73ab1b9a691bb84777b14c7014e986ffb91da6847d3abc0349a7aa09ed1d86f2dabc09e0e25a05800bd5d616c1a665bdb119ef71bae065ed019aed20ad3b13262a902f24ccb4819dc71419994a8b4774a3b9f4f672d31aaec997cfe340d2abdc3958c41373d0315076d22189eb5065":112:"260cce7d5ed6a8666c9feaad7058":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5bd47bea08eab8694defc2b66e60da1be40fc1e398224f9b":"083ad3fe9273b8063e144a03f88fb179b18327aba37259d7f8532303306ac9d18cfcb746cab3f9385b5bb685fbc4a252dda268044642f5dbe33ea6e1634445311e440c5507fa6beaed343c83aeb0ffc4f1cba21b39f0ff6edfff961aed3ae1796f8bfeebcd3392d92e26dd26a19a7b7c2e5910f22557fad600f8cca8aba988d4":"e45a52c5e5ecc87b4320864b38683777":"":"8fa3cd91fb93a346e1f9595088c5503a840c7d7c33aa1be147e484e2aef2a8bda77275348ca59810abef6e179888f6781862990ba8e6d96af70febd2f671a3a8d6dce9be46c1cc6dbfaae35c35a7073205411cc8ab4ddd266b31b64edab4ffea076b29803149850cca41c857b05c10148182f8e7252e67069e7517da5fc08ee1":104:"9fa3372199a2484f82c330093f":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"850a811ca18044dee4487729e619cca71f05a5b164dd1250":"6ee76712d0b1fc00e43c2312743a881ed95a0b06276c5a4d93e3d56732af6b12c7c0d1aa6ffaec562229b6443e576caecffeadd9a65b91efa1bfe48ab1ecc63c381d00fe8dc7f11365f2b28945e844e7c6ca60972f733a96f29cc12e259c7cf29e2c7bbf8f572e158782a46093c5754656d0f2e1e1ea2a0b315b5fa02dadf408":"6f79e0f62236790c89156c14bd9540a9":"":"eb1ebd78d7ac88e6f927e09fecf7feb1aa64d7435aae76cc917edd9e0624a96e945df67648c187e397954da7b0888005f7a0d05d09de424c1a0648b56707b90da4021d5a36175500337e7341d1a474fbaa94e56d7ea52155829eb6bb9d95457c138875f0738034924d59681e7c2dfffb7dc0959697468ea2b65a884c897208ab":104:"91c74a30e5bff5b2585ac7699e":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"91469828dafd30de415067236d5f49ea14e813637f1ee0c3":"e3aac00bd05ce3c9b87720db82104364c8ef6ef25d6f3c8bcf5f73f1a26f8619e831bf7bb28c4dcbac7013dc6282d07cc225bd969c582a26accd7cfffe878a3159a5ad3cb6c8b89131aada61e2960cc5431f4ef94394634e4c8b2938409bcd2e7668986c7c5cd2ed5f2c525fa0212996960ab842a43869ed430d3291799a2a1e":"cb5409aad9d227a3cf0e2c5f1031873e":"":"4aa82b1c81a911cbe84231ce7afb95188f2177b539fb77de68f3d4801a2bd09f5ee2f7e59b5d9e79be5f7a23f0612ae39d59259dabc8b1bf7dbd4adc0db520bf7e71b988fa96d6b4dfc76afdc22ea31f64c64388dd93b27518b3263b0a19007405fc08645350a69e863a97dd952c8d886b5e0f444a6e77a9ef7c7de54f405a04":104:"2a6b14c78bcb6e2718d8a28e42":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7b6907853b7d4c4a19468111d96c5de048200b5441b9411d":"3622ba252c067ce7d6cae1d1f5068e457a0cf93be01fdce6dc8652a53135d5ed445388679e3f388ee6a81220b19356b275878fbcc2a6751bee7e2a50adb7c430e4c8cae03e88465f97bcaeb151d4f0007bee6bb9864b33020717adc42d6f8a283a20f6b62ec79fb8060e3e5ecc1e91a2eaef57e9dabd3b3634236f12d4bff475":"a66ee64c15094be079084c89cb1739c1":"":"2b8c1490e13881ab3bac875cbdb86baabe7fa30445bcb39315d057171e80d02aa8471355e80ba891b26d80b375508ba2756162cc688578be313a50096d7cd6253a8094970898fb99cd2967e78a57d12b8b3e3c10502634bead5bfe2c9dad332fcbda0c1bca16fd5cac78ebcbc7f15aad8b28abf3ed74a245a8e7a85cfaa712ab":96:"e52af33988855d1a31158c78":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fe63e247e8de838a197a9e937e34c0f5a0b282533d445015":"17c5d748b8596901e97df660ca94fc970f7ebb769aff88f60acc425f50ebfb6744c6d8778c226c5d63653d9388d3fa0d4d630f94d668f3478c89e2708501edb12307a9b2189576cbc79388d291354cb9a5d1eace4ca1d9f734fc78e55ecbf86338a31ebe583cace752e8bafd0a820384136963eb2d2f4eea7b2f69597737a1ca":"8e018305675c287f802f28fe56ae5c4b":"":"c3d34e2cf1c3ad629490d70a0fec1a63c88d025ffed46ff8f5d8c0879c166ad716b702682cd0a437bdaa03a9b2e69a32fb7259b0fa930ca7a344aea37886cc9850e44de0aa049b8bc300caee82e26b2a1e5ab45c4c7cc6a15f5f595199999a0cacaa59da1b2be2a204fe13005b92ce722a000228545ae8a61b2c667a386f431b":96:"d7a6a917a286d8edf1289183":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c739dae83a5e64bd98ffaf68b5bcbcd0155d8109e9ff2518":"56dafc06b354e84ce3ce31b7f88193124ca7e7049272beb93fbedcb3ede8e017bdb9ee5d314ec5168443fe01258d9abc4c4c27580f6299b20082b4ca87eb2589bedc459f132dfaefafffdd13f82e153a2165dcab9a9b6c10f1d0d13b127312a6f5f3d65a73b8fd057f1d88038c5137254111f7aedf21af07a35e34cf4d2166d9":"d80ac4dacb0f1441839e2068013dde3f":"":"9ae5107f4394c9050f8ca8ae6d1eb66099ccd0166f38e45c1cbc17b30e218fcf6015ac92dd7ab48bbb095a0523904c72710a86e50518d6aade269c82bc5ecdfa729802441e09aeb939abb43f5960542ad87961e2141f967d12f7190b07de99811b264dc62cb8f067872f84d21b661558ceeae4922900ffd76084e450650de79b":96:"6a180ed4f3a9d5739e559d00":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4c23ed64375d42c3a402fdadd143336d2f6babf4d4ebc176":"5541a219108ce3ce593cca8c6aa6504c84983a98851bf8610d71f79a38bdc21d5219266ad56e10ccba4898ea969815ed0d6df75312d657631e1e22e46f727a499696399a0955d94942a641383cadebc5328da2ac75bf0db709000ba3277581e1318cb5825ba112df3ea9c453ad04d03eb29d1715412cc03dbce6c8e380b36167":"daa6f68b3ce298310bcc2a7e0b2f9fec":"":"2a4e04101d4c822eba024dcea27d67eca7ba7f0ea6d5290ced9376049ae085ccae3ecb624c03eb5b2808982c88f0a5c4363a7271610b674317bbdf1538776f1fa2454c249a1b0d6c3e64bd4a356ac2aa2fd601a83d4fa76291f3ef1a9bfc858cc0aea10cff34ab9eb55411efec2a82a90af3fc80f3d8e2b56181630230890acc":64:"d408209fabf82a35":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"695dfde34f0af192faa50244ab95a6059e2e637e237eb60d":"33ca2c61a04467ad2bbd2ba8144573f0c2504a4e9945fbae250385406ed1757adb70534bd6ed854f227d93eee57c73a314f5955208e1ba5af8cc1e8b5bb07cb63030e3ae5f0ad287536f49b576418bb1d2dec40562f6bdda59c373d6668aaa9b791285716325fccbda2180e33955c8be19d05e389820ed69258c9b93e3c82e96":"a6a57792b5a738286fb575b84eea2aaa":"":"b2ce449fc806dfb93cd7c97c018c2ba7d702216ae29a530a8f22d07279c7570c6288fc01fa9915b42a6be7a7d9569f71b8fc2411dd9747b5c9c7b5c0a592bcd7e8f4530ebaee37e9c7d48d7a56be7e2df1d91cecfd11bec09bbca7ce7106942989594e791e00e23557c843acf5164f3863d90f606ad8328696f4ca51fd29346c":64:"050bd720de1b1350":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1a89a516204837bc780ad9b26717e51ccf42591bf58c75c1":"c72a1b8707522442b992cb21a7526dfd341e27a11e761f594abbfacc2ac26ea48523d0113e38adbfc06d4af8809cb606454467fd253ca442241e8921b906d6c007dd09e139e568194666d5da0b33c7ca67876856cf504e8dfab4a5b0a77cfb1883d532ef7c70b35b0838882f144991c25a2331863eaaaa2059401f61378750e5":"a9b1ef7744075cd6cc024f8c7b3b0b6e":"":"0ec50150590bb419df0d6c410edfc2f8805a602ff247e3b50881ad3efb598ed053d8dd1deff86460db0081c0eb3effe9ea94564f74000166f08db24da6cfcba91a9ee1e98b8671db99edbe8fde11d0e898bb130e1b27358fc42be03fb3348af7de9376af495c0ec71aed56d680632195539b2d1d5bf804328d0928a44c9731ce":64:"6c9f55e67533828c":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4107d51f7d6e24aa605959d5d46b4c7e1743b7d5e3ae07b6":"e5074ffbaf5e771e12f9e7cc8e7701b970aa7897928681383ea0f91bce8200ec6782dc9618e065e142c4ef2f7019791e74edfe2040b08bdf328d7d9658e7473beab65359d35ed168a2bb39f3c3f59890353405a82f48e16d388eb8f2145ed9bff016e725791cabca913813e7485f387223711c1ad098ffa0f72f74a048ec17ea":"94a88f6872995b26da39efb5e3f93334":"":"bf32a717c945e1e2fe91fd38f3c7084210a7966cb83235d28f701ebcae6b2042226e932e4601eb3ed4728ca32bf7065fcdc98017dabcac23f0f80c65e92518db6c78bf4cd91f817b69f3c3a8891786d433f6c3c1a025c1d37bd1c587ba6004085571245591d615906f5c18994f09a03f3eef180d7af34f00ecfe153d5ab73933":32:"8d43426d":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0fa6270a44c8d14937cc3ff4cc2d2c997254a42ca8a09eaf":"2252d1c4706cc46ad3e4f8c49a92cdc7d1af24deaf7b08ab7304ef804cfe261acc3a202bec0d8df42cc36a5a3ace9ed7a9465cdec3513d31de9ae7821f9444226439c8f98a9a7d99b36b91b1b00eac71080d7eb550209af5fb7b3f28d09f5060070da73a40456d60c0470773af95d16c0b33d0b5327d44188619b950590ea862":"b5f3fde841156bc408ec3de9ef3438fc":"":"4fcfc56fa722af32e804dee0f4b67f5fea542b381bc47c41451844c82e5427f6cd90c37e088dbaff722d8700a11d5dfb4282e565f32e055324e5069931c86b62feb2cdf82ca1f62aee02a70e4e274b2b957650a5cc772be86c1b1cfc41b01d20d9be8b05b9e3ff65413520789ca0f198fe00d83483a1d85aeb13094c9a827e7d":32:"1ae8f9c3":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"104c18bd2a0641fd46c2d7590d60d6d8eea74a2758ed0f4d":"4434cf5d12d07614227cfc12716a8adfc651ffe5c6476cf4489afaa698d9d19947016bdbcb5b625773252745dfeaf9b10021a5b38f742ea8a0fc5f926c80cef6568ab8639cddcf8fee9678d45ad4937d6e6b054b65512f929e897ed5f965cd14cad939732c53a847bb2758d818d5d131977649db5b59a0c5ebac37db961f9d69":"2902faec60f754f0fbb1981aeba277ff":"":"1789524845a1e36322c44dd1e938ee5d0fe6df244b751f3023d5d64d40a72598d352d9d2faba68be4e035c258b68782273925a94527fcdb977a41c1e0a96f53119b5909b23b0327c820e8f6da049a5d144a98019c4953aafd481190117573869109c265012a42f76bb4c3353f6613ccbc40a4af2f9e148bf0a0324bb43337fb7":32:"d36d2d06":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"263451f187b6dcab9d8dc4364217a483dd80c1d75f24fcea":"5e236c282eb4646fbd16a95eff2b27873f625a7e919237d75989a8a112ea80ce8db0b4aeaf5da59c3b22649dabb584284ab9673ba7edef59043eb8e99763643941a4788e7cf11bad63e13c9ef08644044b76beef68928dac22975481da4afc723b3ab3b498189542cbdffbc3f467d190cd02e9b36b6981122aa80cfa3aa3561f":"6c4552b3a03152aa464e88fd5b14356d":"435453a304fcd3c4bd6ab90d6ed8c54e6d21f75b9e56c9d48030499b04f6754cff628c4c9216f7d8a0abed5b8b7ca128c099a7deab74ecfe2c4a494b30d74833f837d254aa00d75aa963ce9c041f1916eb63d673a4af3f88817c65d4c86f5a3c28a67de2aaf75f08d1b628af333e518a7e99d980571db608407d3f447563f2df":"12dea5ea9b54957c689c7c9c6a711e2880645109a4057fafe3b32727a60ee1e24f8450310d6b8402c26b307bb0bf3cb7c6407270d95590efb938e6d77359666b11a7a3833a7122697e959645d8e9d835e0bd39bdc30397115b4c348ea825c850c1e54a60a2522a6321e4b99fa2ad9215205628c595b07c6ffed939c779d23ab2":128:"585677e0f37ae13d886c38202c3860b7":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dbcf735d7c8701f537090d3dcf914c741ed783c24bd8265b":"18eb70dff73341298ce33ff4049fa631f2c72c158fcdea55d1231c46c95ba4013012b713bc95ba25a2114d0380c297acd05c323696db466874083e18bf544dabffbc70be4649cfe7e8bf449aeb9789d6fa412a1adf57ce732702ab962561f9e1fa850733c97b8a4158786e8ccf32af0fc2b04907124e731ffaf3fa7eacaa64b2":"09ecced8460af635e46bc82450352be5":"cc5b8f82fce3797009fbd38dfad7055a5e2ac241363f6773191d0e534e2b4592a6805c191daad377245c414df8edc4d3d9ecd191a50cf9747dde65187484802e15797d7c7e1db49ea4e423e94d9ad3b99aea6bf2928ce6addfc00848550b4d2e466e85a282cc022c7c4469d2cb16151e81bf63df378e0c676036197d9470f42a":"8298f796428faffa6085e458f149675d6c6e2cdfbc7994ee6f19af40fe8926c28904fd5ac0b9bdbd2de3f1614500a3eab1f980f82ac23cae80f3e6ba71539d1723e9f3412df345536f7517d847aae79a83ee9ad5fe38d60c6618d870cb1f203a3e1847d14d8de5295209c0e05aa196fec0eab8389e4eb66bdf3dd49d0800ffad":128:"e53ca266dd93def5bee5daf70c953dd2":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5f8d84908a8b7f5e118482bb867102a244bcbf48b7229115":"9cd2a4e2acbeea6a73b5bffc1191d8045f63f3a14aa762eb776f35518f72bde4f9c8decd61a9319e3dfca82e682910a43de2719451e1a32839b29b27c3eb1c8f6118512d6a19cf189e2d04cf4e22459397936d60f7551244387294a7994320546f070e54f166cd7c243d13f3017b786f7df6a7fa4ece05a2fe49fc39e2225b92":"5ba986f5115d40c2cfe404007a1e2403":"06f98d4807efecfc863309f3bc64b0f04e4c16c32675ff97a3295d5657d4443f6c8b0a394d3f942705bdc19c22b8ff58e9b7c209b528b745fa0424d5898ef0e42e0909aa5ad0b01f8549e3674102ddaf4784f0ff8908cf9f9a25e7e4dd9af4da7bd13ae0cd87b6aaa6b132dc518f4a95af403e612edce63e1424dacf8e349372":"2f168fd1c819b159739a7cc783ecdb0ef9639b7965918e343e2a55f196daf584f7f14bb6e42d37b504bfc2cc08c218c5b841b2d2abce05bbf15315f471e56f04f7d54d6f1dc7b7a68b8bc7026a1441105015bcee2c39d83be35d25f0d514bd1ffe75411b32867ebf2d532a766f9bfce9e55ea3e0240d2a3713ddc2ba790bad21":128:"7f121ea36b36449e1db85e8a91ab16f3":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f6c3037a59e98a9a81094d65ca52752ad92f93bcfa671821":"26647f8f4092f80fc19f81f029c354c582b582516e8e27e97d50866e8ff755f50a8ae6422f4e996f0cf50826a68c007a5b16fd59002d368ed3285bbd04f8f9a5a524243cb8d5b3ffa184ba7384771bfc508f2e93abd2a1e7170d694d35cc0ff7f247e84ca8889efc820c3f6d9cd40afd56c5799972d7556c91cde50ac808652c":"43b4f15bbe525913a31a9adf23d1971e":"60826c97f0a99b88e7aeab774a3f2278f9d35b6c1a5fce49d9389a421543c99f68797224535dca4d7040313340da73982220040a063b045843a14f5d38763f95bdd26ef818f6e5171c8d5b47f183589afd6acd36e59b9946c1edf038ae285f500171e9850603cda36043c29860e75bfe03c21e0ef11a9aecc5d5c51bb2201d29":"e58df99cce5b2548cf39684df6a26b8f9b7969168ff21c410bc40b763842ab3b30cbb3c82e0b420c8100da61c9037a9f112db9563a3d069cdf2997e7f4dbb0b5d79b56f0e985cd8cb70355366f7afd211bd9909c48b142c6556326062d27f7f82d76b83c433f00f1716ebc95038cb57c550b5810b77788c8bf1e686a8a14b610":120:"ba6aa6d68a560642c266bf4469eaac":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8fd9b08232a1d3fbe319d0897c74098f75b3e801d10e183a":"a677a13ae26b7a05cecfd153aaaea02ccb50db601221a3df545164bb5fe638f6ed276d4bd172b9e740a82a690aec4f18f4f3a0afb80c9a32188958e1cb3651064f55ca1211647903f63013e46b46c7f4f95589012eb4ccd2451d8e8dacc3cd066281f1f0c71f69f1c49f3f94136a522fff0d02427e4bccab056e615ff6fde1d6":"304c759800b8e275dfcfd3e5e3c61a7e":"5d2dffb00a25788548ff1b2c94745e5bfcc05eeb11e63501007335d4bd06bfb3223d4682e7e83eca0e163d1a8f2a76096ab2839ad14b45eb59ea9b29feb76f40b0d8dac55247c65e5dbe6bb2d5155ddcf2b2f924c48e1c16c990b69ac48ef2350873c1ed524ce1b8ef6c92a11c8e461303f7c32b5d65b57154197e45f1c6b792":"0779e5050dd17837d40fe3427322e717f074312f160c1951e5560797c13e4fbe47f320dc8053a39d2def4d3cc20e215978647d917ddf93fdf9eee5e54a974060dbac2a478afe5f5acbf65af4dccbd3942d130dddfd90cfc969da0c7f4b4050e34ce2e049c3bb004782abf4744c9a3ca2713ebfc5dfa16d011bc0b33d0368c108":120:"54c8a1dddfaa1cafbcc1883587b4cd":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"19d38467c1024611433a0b2780980538d88f3e8907a86e42":"2623cd0eb46a7366877149ce0204d7dc08a5e64a1adb3b6759178c4eab26ca1806fc25fc0fc99dfc77d1811e61ac1e04ee82eb69ef7527962df1707734e4aca970b8a499eb70c2b0386942906945abcd9234b92e7bec33009e70786c39bd241da3905d961473e50367cb7726df8da2662fb32101d13b75032838f01ad7946670":"8d56a9e4bed67a7eb0f7b8c5e6bbf04e":"1c7d2744a56f5185b9cdf14eb9776ffd315214540daffc69c217dd64c7d0fb4a9f7b1ccc4c1e325fc046eec4feb8df35d32f492a28d35858ad1e9bfaf95211f111473c2ff799a124b308fba996b08f185103607605922bad319c6b7fd211f97c861565bea34948bfd751e4ce2591ae777ab1df8dc9e820cdad13066ed74303c6":"edfdfa35b41c5642e5b4dd1769b635811a48ecf21915cbef3c9e2f8230953f2ed4fda8903ec7634f10d55aa58c975a6c6133a173c2aeb83d6d7fc6534ea1781dfc62408e7a17d255a983bd1c33d2f423c364893db8128a599cd037b2db318f86f1fbd895a64a9fb209490b7e9a30db8cdf42e348cfcfa7984e15c17db810ec19":120:"17dff78f61d21de4c0744e57174f70":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d69bdc9d35589e33ea9c2b956780cd9618e0df79d1083e69":"d8a75de22fd3e2d50127c6fdeabc09fab1178875998319e1ea83c9745a1d5833c6ba9df08177c349dfa412e13e1927bbd4cdfb54a21c86c149be1feb4d9de99ffd590850875a3d9c8d9306971a9802ad4ca48f73d0517322525ac8463e3d59ae9895c9b363b6f0728d7585de78cbb49757bd1919ba2f2d6ba042d0781e7a79d7":"abd4b94362501b8f307fca076fccc60d":"1ad9aa99a4c8158ec08d21ebfb62604a043fc0c248fe08daa15a89f4a7855916af8aeb681ac6600c0268ade231f918fe508f48c9cfa998effc350fa117e2772f04839f8fa1a53bca00693ecd28db27c6507750404bd89af07451d66fb7dfa47065e9d3fe24a910eb27911591e4f4e4746b35359afada4356676b3c7331c610ab":"52e88b54b410dbfb4d88092df52688ba9502b906752b4802aca5428437d795de0d3539945bebdf2bab070df4a7e630469b92fe2dde0998d44094cae7f21f84ea7806637fa5c73b138e87d04005ef1206ddf30a21f46c0aa718665e809ffc0b42b5250143604b20225ec460defaf554a8bfb5f69ef4244e02e9563c374a44f0a9":112:"1024f8e9997f5fa4684930d17431":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6960be8fe82061e9cd783cd1c03f63a00d60ce9fc47ea496":"e0f574ddbb04831b5a86f40182f5f10d8667fe13c7065b471df157f67230c41b8c069c0218ceab93d63964be8ee853c567add2c3eab1670b03a51f9175e8e763be778ec43833cd716e1c8fe5cfb1d663149b21e06df772a3973fe1297d65188201cdb0c3533f5e9d40bb0664a97db60fc99d7e48eedebf264024006ca36361ac":"672f4378862c82738055273c72555b39":"e3a4dbce87edac519ce86349eed2dba0d371cef0d8f20b4dda3e1cd9f5799c9fd0b7494daec5bc995a6936c501212eb957ccc9ddd4c9b8a205cac122ba87b5c5a0eeba6b2af2cbc2326d953d61d089b6334ce03257203072f8e06b8c6f37692748a13e681082900fd32f0df6a3072f3a8b9bbeb3ea558e97a43d6656093d7c75":"2a3c4b79bbcfa4af04baa8413f6f1d18c9c579060ecd0cc359fcdcfc0566697ff834f7dffec84b2292e8583ecb59c9e5e5d87913a6ccaacebf371f1fff67f0be749d4ea5f5c6f4c959e9d932414a54a8e25bf2f485ecce9e70990bbc4e621ce2c8fcc3caa66b0730c6639de1bfa0124afe351912279bc3ca363f4e6013496cf1":112:"dbdd6af194f2578a0d0832d0cba1":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2b7d0115612c56a1f28c6b3cb3d51c2b4bbd4cd36ccf3dda":"3a88efa524a90b31873cba177a7e6e050dc59f42c934923db1e75fec924908370ad0c9c3b0b3c05adf12c6ef2627d8d16f832071c055aef5f581a39a8e7d9bed2629e26d5e3ecaed24048d744fba08d8d12132def62059f1a549044c1db121f47f10b3dc4a02849150aef53bd259d6814162761cbc9e1a8731d82101696e32d4":"317a60c3c29440b8ba04daf980994c46":"80d816bf4008ae51b9dd9a25c30cd7482f2289f5616c41d99881aa8f78b5efff84efe307a822174f3a5c08b381bc99b169b92057627f21dddc367723eaca2545ce3a4fba2b4633fd99459fb03e85d6d11ed041b63185f3b94f6004bdce556e2a0aaf811faf0153b3974d0bae3eabadccfc95474c940ecad5b4d5ea88f88b8c4a":"f193303bb781164e42b3d4d25569a446c86646bc0fbc93059603c0b46ec737ddfcd55df8c90e6d806bd9fef90f2b122a1758bef5c75fcdff95ce44217d9b6b0e75e77656cc7f8a8cc47729c74faf43cbf08202e9ad16c7ef8c832ce5f97f51153e178ccc3c168928f3c328cd5b4c341bb0482f6a292cfa2fa85e03d95bcd4cb1":112:"42308ffc76cb6ab3c770e06f78ba":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"75737e01a95c2ad9c860e72a57da646e01c2286a14dfec75":"fa749799afcf2242a6000c4fe1e0628db53933dde99d672e3c7b24b0cd6533b8002bb7aa8633322f4ee2e343db3a0067ad44edaa398cd90ebdb50c732e8bf95aceb4aaa4dfd1eaca617c30c30c1a18761a6d24c2de0790f54f73e0802eb82ffc0124517ddafe8336f4ec6197219346deef4ce930e8ae20117e6ebe49a2582346":"1060d78543be384e7a9dc32a06bcd524":"528a6c34c3cb3aba402b856dd7c9677d0d88821686edd86287e7484b72248f949bbdfb640df27e3d1d6b6dc1293ea6c84be72c85e5ff497f5da74d796a21f2513385a177f29f2154b2362d5ac83c3897f368d06513333f2995b701fb3e5aabac559f6018fffd02cd6b65eba9cdc629067f15d1ae431d6a22811508cd913009f8":"7e8774cb73468ad9647f6946aea30e9468fac3850b5ff173c7b346891ecda32a78b58df8d835328615f36a12c18370f3abcf021ed723830b08627767272f769a2105e4786451db0512027ce0e3f770fbb0ee0e1850a5fc479df4ad5ceff4fa3b2b9124c330c2e79d770e6f5e89acdc8d0ca9c758980dfefaaac41aaf6d472f8a":104:"6bc6632bb5b3296ede9e1c5fcd":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a326226b24222b3389d793b61b723e9ac7059495a1b597f5":"1cc26e453a54c94c1cf902fe12307cce2fba4d5f0fc3bb63cdbac0dd0b5ba31d08dae2b4f054c86f3a3ee920d8b9f7ad8ae8b4eca090c8783cf35db5de3b95889a84f09ff3f70263c61681f00a454b0813813f0fe3ec38a6d30cc3c6a93c91a422743e7a72340cb012718b8a4a3b66a75f13e0165aa51ee4b00046cba12e966d":"327972d0c2ebc20ed5bdedc8a3a7aee5":"2edb1455bf4573a54ab921d31b7fc9e534bce0870eb6e973afccc3b1f93dd2c1a476dd88e705919caeb5d4f4a8516a718cff8858eb443ca7785579036cc7273570e7bf2489ce71a52ad623bf7223ce31232d8c9b18e52a2dd4519bb08d87301f3ae69dcc36c6dcb3b03d8fc39b6621f6b4471092e941ef090c9821a05df8575a":"5a219a0d997e879ffeb548d43de8e4f32a9ad196dc425c83f766134735ad2c9ff5d9665bd54ac3efdc50bb4a7a04ba59825f31a0f3e530aef45bba00cd6479efaa19c85edb4734f91fdad6686e50f9cc531fcabce9e8397381b4d691da4a27b7c487e93de3e3a9e769e831c69b07697e4bab470ebff628e710efa17e4c184e0f":104:"2b9ac273c059865fab46f05ae3":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cf5f2d843042ab94fc4519d57d9229ea7e8172acf515fab7":"0e20f5a2afffa4a5f9219320716c8a26e35a19c525dddd528e5f5f06f0da082f43272361f07cfdf57423f67ad3cfdda9cf1747c602a93747cc571adfabcc9d1ec1a8128908df45fe0ede0e14ff40169dd1ecbff7f4062ee7be0a1afb370c9d5103132c1fbee9262309cb05ea150fa862d6303af71677d2de9cafdb4ecdab8d5b":"95b06c3ce1a3de73cf51e781b941097a":"765c3fae74b6fa4b6ed4ca7ab9b829d76a7759c50874a38d2ecfddaca2365f7a143c9584e255608be829950393e5f94131caf4caa04aeeeb9d595e39ef3f9830246d6066995b2d40438f7eb0944bd452ab493b422e93a3e0dc3c0fc2a4b83711ac6693f07f035fd9d031242b6ea45beb259dc0203f497a77106392e4da93c285":"f43628a227dc852e0ad931e23548fedfd57020a26638ceb95dc5601827a0691c44209d14113da56e6a1e44c72845e42ebbc7ffbbc1cf18c1d33ca459bf94b1393a4725682f911f933e3fb21f2f8cd1ac48bc5afb6cb853a09e109dadcb740a98e5e7ec875cea90be16bcdfec5f7de176eeeb07a3768b84b091c661f65e2b905e":104:"77964b5ce53209ee5307065d49":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"11cf18bbbc1d8778faf40391c30ca417739ff8e2a521926c":"a2e11ac093ab648118759183cd52ca7d5728ca87fe2f31eca28cfb13325e3e6e95974456857866dda78359023e2c998d2c93c6dfe8f72c6d4ac39ca0585a53fc074bf1124c3ada92e78462a445da23e650bf52e26b782ff50312ee2beb7410e93c8435f7b88dfb0ed63d9a3823992d796bf3ab147c33593c5e6193ef32f7a620":"bdd9a2b70e4ee0cc501feca2a5209c3b":"051c68fe0cd81b52fede137d0105e69c74771b770ea9b573ad92ecae86f420953f459755597f68c29f6fca39a27239faa940ce6c949ccd44c9f12a0160cf74a575753310f52ec5c5bb9c4474b85266494e63b6810ddf7a6abd1cf8244cebbf69d3198c4a09e8dccbc9429f81791f5c02628e9477b988e2bd10f9bd5d6731ad01":"ca899a00654730d68219ca2ed9b23058a5f40150c237143b24245de1e440329e513690f00c0c52bbd0de8074fe5d7a50fe420470249227f967340efeeb64c424881c7f3a20c405d58ea81f2309c7f74ae572b30313e2d4b419fbf5f2cf90c6706a1ae1a800a883e8b00fbbc9dc28bf5aa4a329246bbe94df5c2d4524f57370d9":96:"dd45503cc20493ec61f54f01":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"812481f8982b42b2fb86297c4b7c739652908dc498171c69":"32b27127582ceac21f968f5418e24ec8b84617f4daab0eb007f02d45812e81d486dc50909d79221c438def535b8a55946f50297963139a6b21e139e810d19bc1566b374d080a387a646bb582dc738c44156eb6c8dad613586662418edcbb18fe688d271108318de71734cb571d442e4d9537b0fcb2f5c763b3fbcac010f5c4e1":"0dad658c73c9c88dd927a502d7b14e8b":"af44f747d77a83ef0944f3bac8e835d752bb55772a7fbd3c6af27ca0eaadd122c9af1e2a9f37c2ba42779ed8cde2199125378fc88c7d6d58edc01c65491c5efc6bee58e7e8bf72f1a69d3dba47b38a50077130cbd71accd3dd4f193a53c6f2d1df694476767f79f8b71fd42745ee5bd41e90a7dd50a1597445251b32de303169":"003ae4798f6a0b97990d41373623e528618f9299cebdb0d23e3799f62bb063e5530eef7fc40c06af16965ff6895f675ffb81c004d826cbd36b5eec9bd3d90d785af03b64d12d311b6f90bcd75a40497d0fad5e54f829a097b25f7a9604f6fad475c9239a0f8d5589b8a76c6f7bc852a3b820734b426f59ee845ec3f09dd7d3d1":96:"b80bbc002cbebfb4ec5d48c0":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a6657a7a9ddc6b4595df94d7c6bee9d13ad231cdc46ae5b4":"36857eccb5b3c220265a40980e8949135e840ef270602940d3394f3f679aed55217c1de175f6b48a16f7b394ad7d288bc425762f971b752d1372b369fb1c3a64970c8d18ad6de2e1a9a561a749e3cf9a8524e239f3121e8643bebee471e55fb5d54a3453c51b1747defac98ead8b25854ed1cae7ac44fd28cf4b1ed8988875c1":"68621ea7c6aaf1e86a3b841df9c43aa8":"bc25c38d3a200fc17f620444e404f3b3999f51ed5b860c04186750f55cc53c6423c44d0eee02a83af27d16b9652a7cb3d34a5cb19694e5399a272dacd56c4b17872fd23fdca129a4299b9c87baf209dd1cd1f355088e3f938e6d5053a847b5913f0b9135d6f290e365508bed73c61160a11a2c23aaed7551b32882c79a807230":"de8bb8e69f9ff1322f0a6c30cba5a6fccd7d17a2173a86cff5478ac8ea4ad6f4e99ddd4149e6a9b24865cc8fd6394066e24a556f3f6d48c599592c56f06a946c6b3414e2fb47e14d1f128ef26b385912367f35082099c1f3d4ea86687f19f059c56dac21923e9a151567299416eb311f5bbf9a28968b080b0b200044668f0919":96:"065f6c2b86891c719ea76984":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"20cf8c2c47cd583286157b45b575d4d69c793b4250274fe4":"a64c2131c94fa827c3a510b23b20fb6d04579bc292d2ec33efc9eb31459115da143f73fba9bd8b03b67e591497d108f900a7279542b480bd3a13ea588a29efe66688b52c3fd58598c66d8595888e87b27734e6c5b2796cc60ab2aa3dd06a29c577de5bdbf0b6c69c7034f0181050f286b9300d214f549165a0b5b56ba8e40641":"ab58d2e18eb83c20df94cd6b569c65fe":"93ff6057eaaa9559d87e3276d4d900888cb1f56434ce2677ee1486a0aa8f4e8d02c47d06e6841f3fbe5bd72dd37fa9d81bbef807dca6961910844eb9611419936310d717e1843e7b278f48ae44a57c1f227a75fa8cbc7fd57c8cc3b101e036c8ef3043642c81f381561b61da7c9d79b6da9ec46f7cf093c29c1930b27c14f991":"a3f621261af17ec4756245414280017fd36133f2f9ff89eb8979d4417b8f93892bbf7b08bab785341bf0c7b5e3643f0e33f036633e5ebeae7a750ffdfcfbab690291731e92238ba6b45859b309629224fa7efc72298d3cf1ae3b6a9e94797552afc4e3a46205f9bab7eb64e4a41aee0e45289704a97221b7118d209e0b267a68":64:"ae53564271d5de5d":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8a311bf356cb1d1f58eab411b45b8d78b88052f3c8ab821d":"3e915e92f186fde05ad55a2597ceab81495abbaa0be107dbf6a375525d1157a322b1f65460dce0c3aa2bc08fa89f777dac4d2fc3e5f7f20a0d5e33373c7f1c3551369737124c702928726bd9db96a33bacb56f1d645fa02ca1d88629c547c0eaf9585ee23b530ea971bf439c67e3b752af882668ebe0c739b26c837887b9d2be":"0569d05f3825d16aaa89e86812f80628":"28494a12026eb89b46b6139573dcda0836a617e00e25e2daa92f9372d86c3c162cfec34d634ea48294c784825615f41e06e555cf916983931e3d6a7ccbb4448670139616e3bbf7109387a852703b0b9d12c1fbd966f72bf49a7e1461ca714872ccdc59dc775c24a85e9864461123710fd8dcc26815894ee8cf2ca48a4ec73b3b":"9ba776653e8d9d240d9c1ec355027a18731c500928925e7c50ef83c6f36957073a8386ecbfaf430634cd557b1da1bf122f37456fea3e9b58a6e99413d9d16a2f1b40dff843fe16a2fa0219ad5dd8ae4611de53d7aabbef7a87ce402e62276addc7f44e09ae9e62c5cce4ddce5695db987084385ae9a98884ec97e67b549ad440":64:"c669ca821b6ef584":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"82fc47638cfb361ecf7924c03925d6006cb99459ef5691e8":"d14a550d419b8e03762429a7abda3b17ad7a1305e5fc639e71538285cd70d78fa30e0c048e2c32d2a7fd7f82c874d63ae922db5a77111b46caefbfe4feef4df19786e5fec6a4df84f76df412b1f06bea149f1996b41b117d00d422bba5566d3af5289ca9377f325ca1e72f7d6a32df6607bde194cf4ac52c28e8aa1e8f1c9a67":"2a8e1cadd2f264f2ad7be9e7bdfa24a2":"8088358d7c3ca8951d7e8cd6cae15844edabccc8d0fcf8f169a48cf434d4814f1d7d9ae410e5581d414f952f52b852eb10fcf0f2a67bea826ea2e28331f0597152e624e148462d5952f10fa363666d57ebfe036695e1e68f79161b991e20c8ae6095232e63fde073c79603135849c62f8d98a1d80608fc081171114db41883f6":"e54cc95e845f4d1b28885e9b90d1d9d3cc51fd9d8fec9bce57de8781a28b4e5b7ab446074e84471d7a9a23748b689c354e402be77f9890a9c52a2eb9022a6a415e01285db1c6eb66d5e15f4216a4f3f45782677b6ccbf20ac7b35bd153f52a599712d09712ef1454ccf72ee48cca967f4917f1aeaeaa6eaaf8493ec7ff2dc1d4":64:"093343e49b70c938":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d3180703e1ec93b20d1ac4d64e85d5461d75f783bcd2f4fa":"b7b350db6fc0796e9fd0cb239f561bf7e27b2aa26b8e3e76d8b737caa1c1c5ad624a32f5709e4b751f8c21172d4d0f4ba38ca4d1d0e2570c084cabdd0e8880b35140c84f775c3c301a9b260825e1fd75f9835777d6c0e23d359af1a5f7caef934b91bee521531582b639be2cca87c2991f5525f4a2f64c30a1453013d73c16cf":"916d72d515d3247ba48828d4113bda3b":"1002513035cb1d7e8b2710ff8c93cec55e2e2c2b56000d4c1182b5286736acd2d6f2fc9b82f71156dba6f77463805627e4bc38c96e091ecd945df7e996e7fc3bbfdae3d85ef1337fbce960fd1d60d06962a1669e9e8d20be151f6323cb38ef68ab5e838f02a0f379567f518f15d81b192cb25a42356807c1b9c02bef8309ff44":"d590f2afcd64c574ece12c675f509efdffc01e1404cbafbc923c4b44390eff66dd839e6d800df67bc06f49f76911df3cec36a3a1521762d6d4a8ee602ebefde0178863443f918668fcde8a531f3b5ee0e4c379ecf3e75e7c59f753e41f4e39811bd3e7dd3d6bbaa1e81fdbf8bd976384a6c4505f7e4270321c7329bba7f15506":32:"22e50ed0":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"02bc0a8ab5468123009b2c69aaffd0a20a1fb082b55a7ecb":"8bf32af1632a7903f00e801ee6e5c690147c021be6886cf2462b2172786ab296e0feb96648e4a602ae6dc45e2aa60e6610356cde26b1dde3aa114c5449216a467fcde18332a6d482d24a1ee952379340d036a48b63efa092db4c30a95f402d57b9c837183e900b47805f170cfe9e69baea2b939799e983f7470bb1297f937bbf":"bcfc15308e891f32506a50c4ed41bff6":"01bff5e606a536e951213b23672db9074fa8bbf947e815d32cbfe30adc1e736517f86139840a4aa0a671b4e9bbd6a59d292db34cc87742c0dfd2d658ef157734c5fdebb3e5772d4990ad1b2675c23ddf1472e892dafe7bf140d614c50cf937923491662299ab957606f4ca5eed2facdc5c657784bac871fab04d6cd3ccb18332":"b8dff03141832970c925e7ff0038394a0df7f35add3046cc56f73e3eff59e18932aac697456107b6da7da3249049c3be5c098dd730cd4bf68cdf798c3a932b2c51f18d29e4386cbf1b7998a81b603372337784307b0beb59235eba4d3e4810899f6d71a994ba9742aea1875878ccef1bf674ee655a0720bd37e44b33cafe5742":32:"bd0be868":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7c07d5ccaadb9e3ba5b5ddf380a7a2a175522b98e31e1d34":"04d3e6bcd5ebf696fe84a702ffd5f76dcbe9679c909b36d41ce6362f229304aeb19896c6376cb3c25081f709af57d36f39f421ecdb70bed9f829558bec6e78823275fc11f9a2d5f773d27136d903ff08e5926338dfdcbc182825794e5f739efc1f0ecda8e53751edbe0d08963471fb5099f2ff31f76b479677bd6d186a409525":"e4db5c6403a03daa703516763052bce0":"b747d97f263d0ff6119df1b5332640d2e4568813adc12ed76175fdfffafd087456748abb267195688d2db41caef301117979dfd2db9714b352398594005bebb449ea20415fcfb2671253f69bf6467ce7f5bce350a834c4586eb03e766c1930e7e6ccf01283ea31b8c73d7967cde0f2a53cc46b1b50c48649044d6f753f1d54b5":"f5faf7bdd99c62ec87f93da2ca3ce31e694df0a0fd04d61914f9a7a4235de20e0a406e297ba1099fff8c14e8fd37a9d6cbe2c5c572c988cb1ff87ffe7825e1947ea3da73b8b3633721fb4e08deb3f8fcae2407d73bd4c07f32b4f9ad0b1364003b11f84037a28239e96c3996874ba8e4ec7270bf0441d648f52f3730d30e3536":32:"e0820c4d":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dd01d48789ef7f07f80a7385e4d1b1734903bc6ec768c9f2":"":"944ed7743be9ce370cba7b7c9b7dece2":"":"":128:"dfa0ab389c3a780f598af80200c84da8":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0383849ed0db3e52743aa82fe8cd9173b457755be8bbd46c":"":"c6b8518346ec52c001697b7bd38dc795":"":"":128:"48a1992549b627c8621e8fbaadacb16c":0 - -AES-GCM NIST Validation (AES-192,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"936388053ee0116b3f783ae34f000d5fe2c5d712842d46f9":"":"c5426b20c014e472c7b85be2ed0f64c8":"":"":128:"4cf0f6a45f3544e3d391375c8fe176b1":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"40dfcb3151a8dab1cb79a6a1e6a24fb55024d0e256bd4b07":"":"b8495cc54653e7ad74206153ea64c3cb":"":"":120:"1d3786412e0ceb383de3898ef2cffe":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"83ca41d8b33c6134a14d8b30b0c36d5b799574dd925f3b8b":"":"fb9aca5b4932035c65b571d170fdf524":"":"":120:"9787f7d68d2648963cb49fd7459121":0 - -AES-GCM NIST Validation (AES-192,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"886e646688d573c2dcc8ca229a11b394b3400408dd801503":"":"c0744685722cb87717c76fd09a721dac":"":"":120:"794fe4df0084c21ffeaf959e5b0382":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0b845dc2c4e9e5a94bd3e8969300b16b45d3ad5eadb2e80a":"":"0900b3fa3cc9833d702655d285f904ed":"":"":112:"dc670518e150d326921bd5f43e80":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ac9fac2e32ab44a0774949d53a62c1cda04b132a3b07a211":"":"8cf6a81bfa21633ad95ffc690c737511":"":"":112:"4cd7a6e4f3ec3d41d086e6abf14c":0 - -AES-GCM NIST Validation (AES-192,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9f9721ef784980d03140490f760313cc8a56424affb01672":"":"c104bd8482e3fe7359c85e0e94fd4070":"":"":112:"3f682fc71989804ba74bdad04a97":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f7c935f56970678ab89f6d97315a33efae76148263e95f1e":"":"1a91965c5458f4a1fde309cd42a3f277":"":"":104:"ce266c6f0447623a3ef1f6f57c":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"30ecea6cac70a9de4f4f7f441d6b9b5608cca39d07c0ded5":"":"361e5cd21c670de39b5f0b2b89437f99":"":"":104:"48a9621522a98bc6c0acf03429":0 - -AES-GCM NIST Validation (AES-192,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4fb80c4fd026c3f68ab8fcb8e28e144fdb3ba00d70295ebf":"":"ee552fb94a527d18d285d6c195ca7b2f":"":"":104:"5ec97630ce593e9d560136774c":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c0261023ee9f682789ce9ae970fb7601f07551259ef91945":"":"bffe4af76db75bc4a3d42b57c73c51b6":"":"":96:"bf827b4526da77ab2e21908c":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4fb4ab2071bff4ec239ac05c04800806df2c256a4845b13a":"":"3ee0e2e72eea437e46a873bd659b1c4a":"":"":96:"572d3ec2650ad57eec84fe00":0 - -AES-GCM NIST Validation (AES-192,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"193d5ebeb466d3fe68754bba413c65112ae29c5ca5e450c4":"":"04e9d31b3b1205cae37c435d5a5579df":"":"":96:"71004356f266688374437aef":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9a455ea1d9a78425a41d43e293e88de40dd6ad9ab2a63ef0":"":"c108c56a1b3261042adc89046ad1ecf8":"":"":64:"213d77ed0534cc20":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d6fff8797db2f1884b7d71e3ef3e5983234a837dbd0c2cd6":"":"6be4417d7c00fe9c731e0932a7037a71":"":"":64:"68b6c28786a017e7":0 - -AES-GCM NIST Validation (AES-192,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"86e6c451ea0ecaec9e365bc4831e7a6c092b65ee9bcf1b86":"":"6258168da407ce43cc18d6931497c1f3":"":"":64:"cbf20172e75a6316":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9295cc6458d907da5e7c356a7de51eb8e8d3031f72a05fb7":"":"c7eaad3389fc24a4ef96a711ffbfff9e":"":"":32:"12508e37":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"308b6ee958f81a7fbf3bc386e167459206df9c1cb999d904":"":"2c61b991ce478d9aac818d7aa75ada36":"":"":32:"32ead170":0 - -AES-GCM NIST Validation (AES-192,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"873d033773218387690c2871448578d8440ef36553583928":"":"02072ec745c856c6e86873a0523d603a":"":"":32:"e6a5726b":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cfd9c1375dfd19e64b5e4b75022fabaa049627d5238cba3a":"":"0a745c6910b23c78b1b44c02f1ce11b2":"0cc6724b9f3675619fbc70117bfcfb5871e903b0f01382e404793c1dfaff5a5b4131a7fc3041014941dc2c53871bee3ff18c08e9abbb13a8ea220cb89cf65bea1581eb8ac43d148203532dad8854616210ed7f1f9467e6b22071ccc8bb7e3bd89a0ed02a7058401aa4f2b5d0ce050092b650591282e66ee789bbf032dc105503":"":128:"8ec41e9c76e96c031c18621b00c33a13":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6c9f16c5dff4bd8d1855995dcad1c4253759b6e2a833995b":"":"3f25e3210d6d9caa8725eb55c6813cef":"7c6a66d930c95ce1028310cfa3670b77ffeb5e9b627a667859665c1dee8e69930c287fb1f1a3706ed1a0d35eb6d1becb236352a226a5b686bc27e1e1dce4ac6d5974d88b9812b39ba289b2490821319b5fd677da23fab3adbae4fb3630e2571ac887ed951a49051b0cc551e7ebe924c0cbb1c516f71db60e24773430dc34f47b":"":128:"5e000478b55ecb080c1b685f24f255a9":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a8e393e00714cd94de0347351b924ebd555003f3a297493f":"":"9c7eaf730fa8074acd372fdc53b726c0":"ce4cb46e67d85c5e68afe61ddecb1a36da4de42774d45250d0d52b328834385ce1ceba96f703daab81d7a981cd80c469855e14d834df41e4c0c98873f3dbb777fc0562f284c466b701a530f27fc4e6838cecbd162db34b8e8a23131d60d1f9dac6c14d32a2141173f59f057f38af51a89a9c783afd3410de3f2bbd07b90a4eb2":"":128:"66bb46adf7b981f7c7e39cfffc53390f":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bd356a8acd12b06de9f63825e93664cab1beae7f4112cc70":"":"72eaf459b8af0f787e91d117931e3cdd":"9295b227be3e1faf4e969be6c7f20d507431cf5da9e2a577c9b31538058472683bd52f0ad3f2fa9f68159c1df88e7dde40d6612f8abb0f11a0078419b34b558d9144ea6596a09e5d5548b275620e5a3096dceb2768d2f77a0b79e0b963387d3016ecc2f155d9182e3209d97c76329b830bb62df195cb2be11223565f496e751a":"":120:"2ff4aecc90e2de9a7d3d15eb314cc8":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"80ecc9587bc2cec1ba87ab431c7ed03926169c01eba19729":"":"5a65f279f453572e169db33807d9b52d":"29520d9020efa1ecf514e39a286f398c7225b945608d4b57ec873ae8bfbdd40e4cbd75b9b535c9f171cd7913ed4b21e09d6bb030eaa27ca58b08131817113c852b6cbdf550d94dddfde8595e689470cf92f9c20960b936ac0692171158e54041155482f29e4acae41565d87f5641d1aac96b8cb763b7f1267ccdbce234d067d4":"":120:"83dec0fb36463b86270656681455a0":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"94345293fb7733fea9c8b94be2f4fc26f8c3655f583e2b0e":"":"8bad4f3f289b9f4063ba39622ba2b7ee":"7e2b6520d7a554e612d01f462606c0e6d0181bafece1daf54f4316d707483a5dcd4275a08caecc1c20f3e32872fe3e57fa62d598949f5e49ef0efd53e918617e0a140338c007025493f2e0f8dbe5fca4a57d1db6333551bbca79243a73ae8a68dafb3089998359159df916ee6ba4f928a6a173390f15f2ee6045d578dd757bb1":"":120:"da305181a12517420c6f0d71fd3ee1":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a3915523031c3caa58ce02c2b1e6ee2eb42cdaf31332432c":"":"d5416986beb3131afd6b7967836d243b":"ba4e883147c8f07afc08735e6e439798bec60e00ed3f5982f66d6b82a9af7580934112a9858f83abbd71193190298f0683453d3f8388c475fbbc8f9b6a3d2c77046b73986a54cc4559c57cbb86330267e04bcf5fd583c6d2968a7971da64c99d98623676154b0ee413ba531ebf12fce5e06b4ee0617e43bdaeb408b54d1b4445":"":112:"f273fe664e5190a506da28ea8307":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"799d3ff266644128f330ceb8c028297991b2a5593e4afa3b":"":"9d27061dd9d50817b3086f453f1f401a":"d3b5c420ac597daaac7503cd17f580e94ad779fae0d4199ada2c7da7c4a611228752375647a03241f29f810d3a6a74a140ef9651e4a6099259f7d41ec4e51a02917e8cc35edf7f60ffc473805f56f0ad51fcc767670157c050c3214d36f831a54bfeb7ab2039cb10f7919b89b0f623a572aaed313983b105fdff495d979b8a84":"":112:"e690c9afdecea2494b6cf5a576bd":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7480905cee8be7f42b9490936041a19b060331712882da55":"":"27500a09506e0133c88f65e77721b547":"52832d4118fddf182b21513db25d54a19220335f8676ea35c0941d2a38a3aa536b8c9cbf093de83c6b24da3372baba2826289bb3cac415795b9bd3ea62bb9b48450978e79b936cd70cd551e580a6de3418a2be0f4c1f062954aed6adc94d805e59ff703d239fc2318b80cee45c57f916977b319a9ce884d7e02726fdb71c3287":"":112:"52a5721e98ba1a553d8e550f137c":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"042db3f8af95ad68966bce9ca0297ed41b608683a37457f5":"":"32d3e97edd3f393da5abc3827cae1e67":"4d7c2ee6e024e95a6e684ded9898f5c7fae7da8658bdb40560dac6495e46a691e97c047e66046b55e8cf9b02d31d3caeebe3a9f8aeed756d6b0da1ac5d4ba2c5e7b54add22f681ab1d5a2ac1463e8447e08592e0c2f32605bd02f2f03c925a2159e5bdd880323f4ce18a826a00962ce418dbbd5c276e3ff30f1cbaa4795d1ce5":"":104:"e2afbb95a4944353ed21851f10":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7f5ea90f99fc76594f0f06448321bd4bb5e494a5e351e41b":"":"002a5da3c543ca56dd7e5b013b094f70":"b8150b50e36de85158a96d2096678f31f179c8765ae6ba5723ca655e890528eae96d438f9d9365575dadea3cebb4d7df3a9d5323f93696c40781a6661dd4849531e672f5cee7cdfc529416c9c3faa889d0f66ee4049c949c3c8459680f490bbb0a25e50af54de57d9e3241e0dff72604af55827b9c4d61b7d1a89f551cea2956":"":104:"db9fd90a0be35a29f805989410":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"da287d34379d56f542edb02ea673bac097150f87648a57b9":"":"6696034b1b362927b89ae1b7ab5297d7":"45818b7b69b05a121fe5c573c9903cb11477873b24a544ba919baec78d1565f4ad0766da58bfabfaa17ac3c628238a4d38b5c0b14b52e397bcac991408dd7b322ff614bd697ce2b5b94ca155a4442ddd9e502c4a5f81210c32dff33481f4211897db38f619b308f3708d554bdb6c7b8a4d2a80ccdfd5f70501c83502a312ca8a":"":104:"8e65d86edc071446454a1bef34":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1782ac334cbffc92769a170c3cd43915f735b4423ebb4dc3":"":"736f2f24cd04e26d38e69c55b38cca7a":"5827d391efec2f8f102e5f053ac496e2910248a0eb72e8a0b3bf377c6349df02ab0410a3d28bc27abc7cbe582a03000db57843565e4fb06c4078de75c3f1a21130d55befb7ecb919ad789a4de2816c3a42d4e9b32e38d980c06045987d03739cbe7710d839c42f04f5088072c1a1044c3b89809b780e74e54ec135fbe4129ee0":"":96:"c6dc3c4ae52f3948503d84a4":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"20529c374f21c97b0a8f96f7bd5bdeb3fcd2b12db30b3ee4":"":"e6e45b7c28f7fbcae658acb533614e48":"b41290031906709ec8048f450a940eff0422a6ebc7b44666c05f17aec9debc1bfecce62d896d5df4618517fb57ce7b04ef1579ebb2636da0eead063bc74ec184b0a69ca3eba675fc7107bb52a49f93783608677565205ada7bf5a731441e44cede781120a026cc93cfe06a06fb3104a521c6987f1070823e5a880cbb3a8ecc88":"":96:"e9ec5ad57892ce18babfde73":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5634789b29e373760ecb9952f4b94ca76f40dda57ba363dd":"":"7cd1d2d6beef44a6d6155181dfca3dc6":"0130a67935e2df082a95d0bc6dab17093fb08746a809cc82da7893c97c5efc0065388bb85c9c2986a481cc4bbdeb6e0f62d6cd22b7785a1662c70ca92a796341e90a538fe6e072976d41f2f59787d5a23c24d95a4ca73ce92a1048f0b1c79e454fb446d16587737f7cc335124b0a8fb32205e66b93bc135ad310b35eea0f670e":"":96:"4006685e2d317a1c74ef5024":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f0072110572321ad9804efb5bcbc2ae7b271b1cbb0f4897b":"":"604ed8056666b17fd27b111afd419375":"97f68c00513b2247bc88a331a3ffa1208038736d6761b3b080884a8dd46e0596f2c00c1a93bceeeee814210e57d7f1cbdb4e0c2ea6a0834baf716945af9aa98e2826ae0eb5717b241ede2b9e873f94c1db9eb5e1b25f75827c25849a2c7b92098b54845ed81f52871a2b0d12d317846cec34defaaafc3bd3cc53a6ab812bd250":"":64:"64881eaf78aeaa7d":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e91e8c2d6928bbaf870e141ee34d3a56d00dacc8c7e50514":"":"6f3d661a3e321844d1fc12d5ec2becf6":"fc8e5b45ad1647f9dbdbb6b437abecf0a8ac66065d0e250aa2ae75525455ee13adce8c59d643b96de9002d780db64f1eb9d823c6b9a4238171db26bf5d05153d1e3c839b93495084363b845fed75671ace0c009800454596674217b19832751252f051f3995776a89209c1636b4f4b28a364bccdedb78ad36876745c1a438406":"":64:"1f4f495adfed6c1e":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"138ff9c8c556ffe7637f7602cae428d7e20dff882d44ddc3":"":"38d7005fadee55b5a0434d924d971491":"3facceb047e486998c945839ee5eddd67054bbb28308365b2909dabaed29fd5b7b34644043fa443165e07b20214710cd652fecd816d9273c700d6828d216db8f3ceaa9eed0e251585f4ee5ba4beb3c0582b8128a3ecc01f4b29cab099ba2a8931e56120802fdf6004a6c02e6dd00257a83adc95b3acb270e8000fd2126b8eb83":"":64:"fa8aed1987868388":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1187a34ccb75fc06dafeca0235186c64ba929adac6cf6e49":"":"9dd515d3481f21efbe43198f623b34f7":"8a1b00ea5d1f4e451cea71b3d2fc9bb03b9790a8ae8ae262b3e97ebf34911f9d865c8810b9fe779fff701c72f3639654e60898d1f57eb93381749f0e2cecb4ee342f5f34473215d5c46818338ff688637217fdfa8b7ee552db01973fdb6084c3c20b530863eeb1ce798046890994f5625df2a56042d62742097cc10d512a543a":"":32:"83f45529":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4c1052610d05fb77543b6b517eb64b487ed902f9969a420f":"":"90f4c93301371158271a8f46df1c86c9":"83d009a1238f8aa40e36cbddf08a5f3d96403a03f7d079359cd6d3d0c719bf79c908654882919dbc6c27db34007b6732cb344a0f4babd26b1209ce6b134a8d2318f9a38af034b265562097b63794d7efee306e97c6ac0a991b3764ecd936c87000fa58e6689e302f12c2851b1ffc950dad7a553c8c67e01a2270e1e5e9caf30a":"":32:"30b3fd85":0 - -AES-GCM NIST Validation (AES-192,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3dc62e54957bdd1968be71b7d205fedaa291349d69f2854f":"":"b8bce0f9263688ca41c4cefb26e79453":"22b6d92d8908bbdbcd0ff35299eddaf0cfb039befa2d2d83c896f373b92091d145f1771c58d60f94d3548d0cbbeabeb796d7632b5da3c66ef75cb41a35e7d1b032ccfbddbb9423e0ee054bd56b6288bdf1b616492c85393e4134ff9c066b23f3f626eac63a5fe191ce61810379c698de62922d3bdbe30697a3e3e78190756c3d":"":32:"67887aeb":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f170a6a761090355592968d67fb3514b8bfdb41cbf121341":"a050f858c87d56dfcba3ac1ccf5ba60628b3ab1b89845682a95b7f291c80f6eb1cbced4fa21e3584e21528746231e7311ec319a0fcecc329e1a7aaed0a8548e613e51db78c86c8d0cefa15e30b745b952809f87d8a4a7bbefc76a8eb824827d4334201bda7743dc497ef5fffa2812e67f2a04e5c10bf464179c6178db932ecd3":"e02ef73aee414041b137dd3cae8f2765":"":"c08c9bccf298c8a352cd72e9174f57dc9bf64d65191a9e97b43ce70afacfe76feb5b2695d72ea4635fa94144de02a54333a77c7d4adcde17c166b303f1d664e6edb081a85433a7496f91ce640f113935cdd4e7ad14c95247506ddc6620913b5c67422f599ca00b95d62a9371e44c5af5295bf96743d0f1228c96e95af3b4d366":128:"d64d9ac91548dc1bad618509633e0c25":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2ce5a40618b8bb2d9fc1d87a3333a9cd4945cfa838c8e0c6":"4ad4d103da3fb2ef8adcd1e0e823f4a857f1d6fa6273bb66574033c18ba2f760951ee0fdbe06c5cd3a0a30bd11142450f2d7e71af2fa7b9556b663fc30766508aa24e1fb2219f30ec23a6cd48b58944541d1f3e3fbf596e2ef263bddf789e7a666a68638081f0ec1a6cb3cb7feb0fddbe323b307675324ebceb25cba6d9002d4":"0c4b6c940d091efee98bf27fad79b04e":"":"ad611dd6ebaeb5a634d4bfba9f965948ea79d16294b976b7c8bb57240c5d13e10a9fe7a5b5d39143000b4f24fc331cc4988685c8d6401593a420c12e6cbd7cded06504d6a1034f70153f7b5019084a66ce818761841cab52d5bcb2a579a4acd9df50caf582bc6da2b94d4b3b78922850993ccec560795417016e55cfab651473":128:"317596eefdc011081f1dda6dae748a53":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f71d789a63213bbe17aa14f2956e9da2496a1efd1a63f6a5":"f5bf20dc6a11ce5142ff34d6c4771dbee4e74790c4ccd3cb5af408a5c7bd706bac550d7ed56805f550efc7648ab501fbbc63a1070402626c5788f076ae40e6bef2b9aab9a4bd8550fe38f7cdb0fcca2657ca26f1f729074326f45ae932182905d849b1534d3effe20dbfc3fc26dc6453d6544d481e58891405dbf876d0f254e8":"17327996f18c7096fc5b8e375ed86f47":"":"fed961a497502b2e49043ff29b9426a1e864a7fe0a88281a1572fbe62203f071710ea1d77873906369b195919a7bd5b44cbabab6eee23c3692cb8b9e4db7ee595b8d4b063d209b11d64150c45545b7eda984144e1d336a3bd3f187834bbc6950b3e7cd84895a3a5e27f8394a9aa9b657fba77181c9040b741c12fc40e849ba4b":128:"9dba8faf9d12905970ba0e29bc7e9dc4":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"83182ba753ac16554e873281599113b7620bdb042704bce8":"6915d46189fcb0f9ab9b838da2124ce06398d638fec9c1c53f07a43fa0ea09feb2bf868fd1dd521f301f9f38e2e76716038f34cc0d18ab9bf27ac282dc349002427ca774e211027baacb9f6bfad6fd7885a665e508f654bb018f0323215153cd3a5b3e7b83482c08cf07ee5ef91d64a671b3ef22801ff21cfae95d6843ccdc16":"805c6b736d62f69a4c2cd4aa3745a615":"":"76dcefca6305ded697be4488513cc3fd3d9f08f06a7c1a9133b9b3fb0f44badf5c7544881b5babcb873cab912cc8a00337fc36100e6a5ad998eac5d8568795b41166377c5114757044b9b73206d19fc34b6378a06d55b5d5e9498c7693e818dd962af9b9da2345f4ebf152f33fe85f3398a65ad7dec823a1b1155c38cf67df84":120:"746c9972aa8481253d0d54db77398a":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b176e7a68da4c74aeb91760448c0257b1e17101299e1405c":"691c436811f82e747468571f80fa8502ef5f25936fca58a8fb6b619a7a95f4938da558a3b26a2f09c8fc1f5bd347c7724d9fa377d0a52094bfaac88f3fa9b3dacc2f56d880e825809533da5980a63e01d6199fbea07f3d070e29c5d50e1013224f0ea86e7c008e3a2e63df394ef6ad93ea97d73fd4429feee495b144ef3a0d6c":"42e2e70b0096ebd489bfcf4d6ac0f2a4":"":"81f9c34c5b0668fd58ec8822c6ba75bd7eb0d1741260fad6ad5e637903aa29d5f5facaccb4b885f62e10b7371f9b6b43e3aeb69bc5093bcccd49f3ee744e49f87cd2a2c36c808c47e4687194cbfd4faec4da66b99e3d4ced9cb8ac6ffb94d7fef3ae2b92b9f613f2bda3ca6c8efa9c6df8bec998e455f6eb48519e8f8ce4e526":120:"26d0921dbb7987ef4eb428c04a583d":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8bab5bf1cd8f259129ce358cc56ace2bbbbaefa79727f66e":"57385955b9909a0856bf54ad25d00779cd7d3dea78e1ae8965c4b7a568934d15ba1a7b2ab899f69fb1b864bd4d529319b51bf85a9b63de9cd51997ee4b2f015307cc42be9257e1b0a84e1c9e55a370476bff0a5325b21850f5b686a3bd4f1599f36d0772c406047b8ef29245c42ade862cb9d25b1e108db4f33a42dccf45c985":"ca5beea7dac2d9d24d548463977d5956":"":"67deff1accc4f279ec2eb4c2a515c17886371bc4847bdaff4aa70e170775b64855a6fb0d347baf39bb53d7239b7a63ce451effc69e8d8c3e544b77c75170a68cbc45dc96ad238aabeb5ebec159f38089b08dfbbe94e1d3934a95bd70f0b799fd84a8f563d629a5bfbb4eb3d4886b04e7dba5137d9255268dac36cbb5b5c8d35a":120:"f212eaad0e2616a02c1ec475c039e0":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bd0e0d0c7907bdb4b4e60510f73d8ab2a30700349206ce22":"e6835a650047033a4940f72029857fae6fff2773f2aa0e4f7cb0a4abe86b6e8cb0c3e468637057f7eb20d1d30723e3c3107d0f579e31a4c3e6fa8133e1b1b51fd21a8aa80ec657c4f674c032bc4a2d3e1389cb877883317c4451ab90692337bd8aa6e9312388a0acddb508fa477cc30eb33a886e8fbced97492c9d3733cf3fc2":"1f183eea676c7ed2ead9a31928f4df5c":"":"9f1a3017d16024dbfea4ba9df5154a6a2c794f00da070043c17f0204f06f637c8fffc760424187dce4fef044faccadefa1b1bd818522915e389d307caa481af0f1f767c38216fa048f621d46880afca5c8fc582853dec95d19d19cc943e9a1861597c99041c59e8bf8e7245f9e30b1f6607843a978d0ae7a4e0f716dabc9d9f6":112:"4ceea20bf9616eb73cac15fe7e2f":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d59c476dcef60a45be253d5cfbb24742de9e3879bdfe6949":"144696d85126c682f8446fcc2724fabe4b8840d46f3de6ae2ceacb2f06a1a80fed430e3a0242f4f7c308611c802c8b8e9c992b78a5cf401fe7a4671bf081f97520919f02b66e8bffd4fe3f4a69cf3d16667e7724890cc4b66c6ae487d2d987bfacec424fdc9865af4474b04cce03fffc828b2df66d99087e63f35eca52abe864":"9bca808f02295477f2aa7f6ac1a7bfe5":"":"9d23989edd8dd9911a3f5a80de051ec7812c6ce018e683751380ff990a079f3502ec0fabfcdacf6c1fb2503094124c39ec531b5d29ee8e4e46c324fc10dbe0f31e9aa56522bcc7085ccf768425227cbab6db4127671a4cab7bc65dc1d3d9d81469493329e29a9a1cb7e5e088e84eb243493cdf1a49b16fc8d4ea2f142aa9ad23":112:"d8b20d72d95a44dfb899bc6aea25":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2f1594e840375405a682dbc1836344be8c6b3f3199ee7fd6":"9bc6b715c65347a383f77000b3efb33b16019d01605159e09c116ded52d20721bcdde3796b6f4dc33cb29ce1c48438e95d4db6102465440cecaa50ca33ebce470d8986663652e069079f9d92ff167b3f7ae568218fc62ff5a7be50b3b987dab4fc7979e5967bb0574de4bc51e774ba05f9780a49ac7b3ea46fdf35804e740812":"7f1f4a80210bcc243877fccd3e7cd42e":"":"773d6901ea64d6840ded9a05a7351c0c74737ad27e7c3dbd38dedcdede94722ae67e88851ee471aefc1f80b29a7312fa2a6f178ef2c9dde729717977e85783e2e49a1fa2e847d830fac181e95fe30077b338b9ac5d2cfa22ff9348a0771054322bc717343b9a686dafda02d6354cf9b53c932da1712b9bb352b2380de3208530":112:"fc3e0ca7de8fb79eb6851b7bca16":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"88a6d441c1b7472aecf92c294f56f3c1da1702d174eff431":"eecc12fbd00c636a7ff897c244593239d2dbca9d1f370660c9bf9759cc41dc6e95075516f8d7fc06fa91ff68701777725171c2dc0767a1953fac13008d77065cce8ee329283d3f64adb8a298aa100c42e75d62e47fbf5134a21b826fcc89ebb18707c0f4d54f6e93220484706a23a737341c601b56f6a28cc8659da56b6b51b1":"058a37eaee052daf7d1cd0e618f69a6c":"":"0f5e889deff370810ed2911f349481dfb34e8a9623abd657a9a2dc14df43dc8917451ddeee5f967af832296b148d6a5d267be4443e54cef2e21c06da74f9a614cf29ead3ca4f267068716a9fd208aefa6a9f4a8a40deee8c9fa7da76a70fcb4e6db8abc566ccdf97688aaad1a889ac505792b5ede95c57422dfec785c5e471b0":104:"5fa75148886e255a4833850d7f":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"abb4c4f8d3c44f07d5a57acba6ccf7852030daa84d09e13a":"24d82903e5074beb9a769f24a99b18c7b53c160a3c3ae4065335bec1c4170aa4c656bd7c87a8a13c0ffc6653c045445bf8a135d25a13b2d44a32c219adc6ea2695fb9e8c65f3c454dc0e2772f4a4ce51ff62ad34064b31b0f664f635de0c46530c966b54e8a081042309afb8cf1f337625fa27c0cc9e628c4ae402cbf57b813a":"c9489a51152eec2f8f1699f733dc98f5":"":"3e5528ab16aed5be8d016fe07f2ff7ac4d393439c4fe0d55437a68967d685815e359fdb8f77d68241940ce7b1947c5a98f515216254ac29977cc2a591fc8e580241442d08facbdbee9a9ff7cfbde7004346772b4607dafb91c8f66f712abee557d3da675bb3130e978a1e692fa75236676b9205341ead5277cc306f05e4eaea0":104:"fecca951ba45f5a7829be8421e":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cbce5e6d0fdcd3ab08ccd86115149b5569584dfadf40256d":"3974339a1b90b19fd3857d812a0e59dcf43f9b0f360839940b99834ddedead79785396ab8fd0fc0e523c06f0555371fd5bc857a95c3ead26536e6deb1faabdc776ac7cfec4b60d9c24b0856ecf381efd98f941d5b2a38108922d9cf1113d1e484354b55f9c0f09d95a77fd30ec9cc04d19199931e187c56fd231f96fce5e1eb4":"ae3a25be73876b6e9dc88573d617653a":"":"4f57be0de00ca2c7c52c54b931c235fecb4ee1e5a30e29bf68f57248bafad87e484cc68465d9f64bbf502cefd2c84e5596c3c8e58a9fb51a8c8b132579a94bc32e92f7c7247dc5f69fda98727c423de5430f01b37d77e3ae6bcd06eaf5625e5c7c9c228b9dca5aad8f571369fe0964731bf1f143f2f709c7ed51641ecfc88ebc":104:"33375e21fd8df9f0196198b4b1":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"96779eaa8699469e2a3bfae8a03fd4bff7abc62d427ff985":"a343fd32fc513e0e9772acbf99feafe9de4b54e404807999b02e921e0914b2d64d0d402ef06f31e1db852899fb6db231ad4465af015b0c16407fa3666ef5c2a6d52d5b4f60b0f7fbcb13574b2aa5183393f3a91b455a85b3ed99d619bc9c5c2dbcc4f0a61a7b03e5ab98a99cee086be408ce394203f02d6d23a1e75df44a4a20":"cd7dca2969872581d51b24af40f22c6f":"":"74422abbde6e4ab674025735874d95d9fe3015620a8f748dbed63ef0e2271063b6c0d65e00d41bcf4ea86ac8b922b4d475f904c0724f0adebc2eef4a3abd0f9efd75408cc054cbd400436e0545e09e6b0bc83a9c7d1c1717589d180c7b1d4fe4ca18bde4d9b6bc98481b7971c7eb81c391ac4dd79cdefeabb5bbc210d914d30c":96:"b0e425435fd2c8a911808ba5":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"39bfb4cf533d71c02932e1cd7b800dca9ce9bca843886962":"de76f63ecf9c8d4643599f4dc3f9ed837924915ce4216759013cdb46daa0a508e06bcdb77437b0a58c40a0bd30a05ca41433218c6869f1ecd26318aff27999a2ebbb651de8e03061b8ffe3e14060720eb35a8e4dfd8c870aa4562291e3758cc1ea6c4b0fafcf210e10b31f8521bb0f6b29e8450b0cd6f8c8196ca2f7acb807a3":"d2b937bb5d2ea7d54d2b96826433f297":"":"0b0b4c92f06b17103ed581fb32d46e874fea2a2171d32aac331daa4d6c863f844fbbad72e455cd5a3ef941d8cf667fed5855da6df0ccd0c61d99b2e40a0d697368138be510a2bf2e08a7648850d2410e4a179a6d0193e49a135524092ab1f842ed4057611daaeb93e7aa46e5618b354a1091a9e77fb92a8c3c0e8e017f72deb3":96:"a188107e506c91484e632229":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"41b7d80ae487ac35aa498e5939a0f27baeedf48a494c8e91":"c26d4b918a0c967141fb5712a28698d16640d200b2934187b81ec58486b706ea1caaeb654e5fbbc0d078215aceed7d66939e0fb54d6131d8948cf58ec9571646ca75a051c2b5c98fe16f7733d42e5897b0263272015042f3134143ea3b08bc65292d8d31f30f2ed9830ccbfca2d33d290c28f4dad07c7137a4ca05f432a457c2":"626e1d936b38cf9c4c3a44ee669936ed":"":"8998e799985890d0f7e8b0fc12a8a9c63171e456ef5cb211f836a2dc7c9e3f4d1cd6280f9b0c469b703c55876b57cd1d8cef70dc745e3af8438d878cb2fe9fb1c5b2d9a2d90edf3bc5702ef3630d316574c07b5629f0db1510460af8e537dcf28d9c5b5cec6996eaa3dcde3354e39f60d5d896d8bb92718a758adb5cb9cc17d5":96:"69901cbafe637de5963e7331":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2ecce8fb50a28a085af744b44bc0ea59d6bc2c8ff1f2ff8e":"54300bfd55b227b4758cf64d8a3f56cb49b436adb4b927afa8c4b70d2584a6cba425af4fbc3840dd6f2e313f793cbc7aca8219f171c809cf1eb9b4ae8a9d0cf1a7aa203d38d67cf7719ce2248d751e8605548118e5bb9ce364349944a2205e1b77137270b83555d5d804edba2f74400f26d2d0d28eb29d7beb91e80ad66b60be":"b7e43d859697efe6681e8d0c66096d50":"":"45dac078c05e6a2c480543d406c23f3dda63f2b616007d08fbfb075a90eefab8dfbc26d334266f5d72fbc52800cf457f2bbc8062a895f75e86df7b8d87112386c9bad85573431ccfcef6a5e96d717fc37b08673bf4a5eecedf1a8215a8538e1ddb11d31a24cb1497c7b5ba380576acb9d641d71412a675f29d7abd750d84dfd1":64:"2dfe162c577dc410":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6773e627f6c49a1687a3a75d2ee6754ebfc2628bdfceba28":"eb0a64ad510968c68a816550d9fe2eccab3bd8409ab5a685a8638f81b4b50a9a96318bff4e86f7f6e9076960be8eef60e72cee4ea81f3ba269d8ab4c9581a54638421520a6411a83e9dc83b6981a9dcdd9e4a367d57f156d131cf385c01a736b327218e6b6468d317ff78a01f1588c359a3a9b188bbe5d3ffad6b57483a976d0":"ad85becb03a05caa4533b88940ca141a":"":"959658fdff5fd802fca5c5a79d59536ba8ef1359ac7bfff81264c7827bd31b8f02ecb54f309b442a54a5a57c588ace4b49463f030b325880e7e334b43ab6a2fce469907055e548caffa2fe4679edbe291377c16c7096a48aef5659ad37702aed774188cb4426c3b727878755d683ed8c163a98a05f069a0a3c22085600759170":64:"4c0f4621b04b5667":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1c086f7404c14160f33d6efde231eda610f92fa55ac147b4":"fc8e5cd81755e489de7e3ddd2b587149ee013bffa2ce198c514641b0e1659261edd60bdbfd873e30e399869748bfe56ba543ceb9bf5fd0e7ba2b4dc175c52f28a8a02b4816f2056648e90faf654368c64f54fd50b41ea7ca199d766728980e2ebd11246c28cfc9a0a1e11cf0df7765819af23c70f920c3efb5e2663949aaa301":"71f154f1dc19bae34b58f3d160bb432a":"":"6d60da2fd060d2aec35faf989d8df33f2413ba14842b0406e38a6a847e191eac9f4570cea647c3988faaa5505ea20f99132df2a8799cf0543e204962da1fd4f60523d7149e0dee77c16590d7e114ac5d8f88fa371dcdd254eccaa8316ee922ba23a0a07b289739413ddffc2c709c391afee9289252ddf3ddb62a4532a5515e35":64:"f47bae6488f038fe":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"bae1b3eef91ba79032117c60fb847d46f18175565d0ed10c":"9b71eeccdc91cb5f7a567a9189774f4c30d96477b88ac553df66b78a56e5c9e0986a17d80c811116d31985acfbf9d7a9bed291aa2fb6329457a836b3f8f11c16416f0a3b86dd9c717c8a050c6ceb5c27d8e2ee0dbe63f3e1e4f0aff4809e1f6f6ed64d31d494b7399cfa0dd9446321bd4256a49d0793a10a670e3f086408428e":"cec8b66a657e4bdf693f48ac52e60770":"":"015a318acb6198189ce908ab1af28578a37a48beeed772c6ed4dceb0a3bcb092df85f653234c56a25c075c8e028d4a8d90d974fb0477834ae2de8d5df53d0d03a979450b6e7a66fdc9b11f879ea9072699837f2de7192156f8e5d9411fd83d97d31fe63ece4e4326ff50a24fc75004a5ba2bd4845b29e0794696943dff1e5d6e":32:"9cf6f90a":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7c1582240ad301f831902c66334546dd681c12308add0870":"d4b716b49858a23aad478581cbb6dfd015ae550d76497229b5b1776e83f2ded8542675c63ca6a007a204b497ed2ef71ca125d91f386be9b4213cd352a797a5d78a1373f00916bb993de14e1a0af67524acfcc9fd71daa32e5def9a3f2dab5b3bba4d2f9f2cfc5f52768b41157fe79d95229d0611944e8308ec76425a966b21ec":"b6f4f3959914df413b849d559dd43055":"":"79964f8775c78009bca1b218c03056b659e5382e25e43759c8adfa78aec48d70b32ffd56b230fc1ce8c21636a80a8c150e5dbb2bd3f51607d97ed097617963dc6e7653126fe40cb36a7f71051d77e4f3b768a85ee707c45d33cc67473f94c31da3e8b4c21859002331b5f7350e3e8f9806209255ceac7089176e9d6b70abd484":32:"79e5a00b":0 - -AES-GCM NIST Validation (AES-192,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fd55a356943824d20630b1539627ad1a9dcd8ee2cb4dbf49":"b8d8d6dd0631f9183ca858033a31dd583d3ee3b9510fcc69d8cd412016bf854b9edcf65c2831e63d72f4cb61a99f6f4e6dab0c2ce9c5a8cdbc179ae93aaca2c8a5b848a15309be9b34e5226aa9a5908f543fdda983fec02e4073edcc3985da5222b53f8c84b9c54c78dd8b2712b59209463595c7552e28f2a45f51cb882c0354":"aa89a122c68e997d0326984fa5bef805":"":"107a9ed561e6c45c375d31dea321c7b4a4b7641024d2c9eef6a103a750ba15e1acacbcae121510b4f56f19d29e6fb3e6fc06950b1daa521528f42284130a40e5a6c1b58b3b28003673511abcf59a4b9df1548a00f769d8681978b632f75e5da2cf21b499a24fbdd4f7efe053d4a1b20b240856d3ae27948e35098aa617def5bd":32:"7f9c886a":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4cddc8f525640fc0a0875c65b788ea75c673f84f4aacaed4":"55e3ccb855c1fd6d33e28d308485fd85abbd8ade1299936996851d44dde063ddc37962f9f67e95df02eaf3d877516240771c469be2abf2ef6c8dcbb79eb1976f825b109f752079957a7c981faa2fcea599cc52e262b84f4c2031821619f0be6fa3c38d660e9eb3e0d5de2da6b83de9866eb3efbc6a2dff27e52587c6f79e1c26":"1b883a89413f62dd6d507cd70c048855":"eeaf21bc317660b0e2afb9cd5bd450ff0bfa6cfa7e49edad600f71b971347e93b9712a6e895540c665a1d8338f61b51da9e0a4a9122409824287ba4bc06bdbba10290a40b31b5eae9dfeb6471f4a0a0c15c52a2c677c4d472630d4078ecf36dc6008faa0235a688ebbe2662e46a49b1dd58cbee82f285f3cdebda1dc54673195":"18d11513661296035f6f42d264e0b4cc7ec47f43b758c6dac95e5e3b3834362eb64447d923e107a60cd66ac359cf3a203f9070eab9fe61ae64a86606c9b50a97a19e12f731de28719fe178c9713edbb4525b221f656a340c867405c41bed3bbcb9c6da5cc6a4d37acd7a55f251a50fa15ea8f9b8955606eaa645c759ef2481e8":128:"dec3edc19fd39f29e67c9e78211c71ce":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3b8c31830b1139a60425f6a34387f5ca2be6f5a5074adf13":"95f4ea90729de0f0b890fdf697948053f656bddf57e3d461e7ee1770161904bb2cbc8c2f801481bb54145af760e91c8b30cb22faa87efcc6f01e3f798af0bd460475754726514d53f419af2f2c373c76f05bf57d3fc1b763f72ba0fd2682d9d1d76f6ce8d55b56fc7ba883fad94f59d502244804bb87bd06f1217a4a6c5055b5":"ab5bf317ad1d6bec9cac8bc520a37b1d":"5a47d7474be6c48fa4bdbb090f4b6da494f153a4c9c8561cae4fe883000b81769b46cd65f4ce34abc3e5c6880a21d12c186974b0c933a16ba33d511e79b5f994c38e383b93eea1259d38f9fb955480792206461dd29d6d3b8ff239ea6788c8e09c15be99f094d2d5980c6c1a8efe0f97f58f7725a972111daeb87d862a90a7d0":"1d0211d7d7bc891e4fba1ba7d47ac5a4f3b7ba49df69fcfde64bf8689b0eab379d2f5567fcff691836601b96c0a3b0ec14c03bc00e9682ef0043071507988cf1453603d2aa3dc9fa490cdb0dd263b12733adb4d68a098e1ccd27c92fe1bb82fa4a94f8a1cc045a975ac368e3224ba8f57800455cc4047901bba6bf67d6e41f94":128:"23681228c722295c480397fc04c848a1":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9c2386b948f59ce651888451021772287f14a92d807d88a8":"44f00c8a7c84e8207ec15a7be0b79c88fa347e2c3d5e8d07234536d86513bc39bebfff02efb9ff27280eb37f7e8a60a426538bc1e3830bca0e76faa33b30719fab51578d15df77893bce8740f50c491b8b9f1739a695c78406b5ee4d56f80d8d564b586b0f22ffa86eca46a9d8134a9507c5b9ad82757ec51b18741abc61f23b":"7a1f7d0be4c7f8869432cb8b13527670":"f76ea9d6e976616689709700a9638204e616f4c1c3a54a27fb0dc852990d81dfd6787aa5a83b9be5087d3f7dfcd522044911fa4186511de1957b80338025c6c4aa72058aa3160047cf42166aa0089e2ec1ac8ea6d9f5f2c057f9f838a72319dbd7bb4948da3bc87fc2036a0e7b5e8cee7f045463152ff80a1711ef1096e75463":"666c4d6d3f1bec49ba936eea90d864e8ecbe0ccc7b23872a4ad7596afaec628a8165a70397289a10c67d62942e1c158f1489a9de44443ac4181e74ebf2562995c9182b57bc960f4b5d3e33fb7cf7a0c32a59c716de23639de9bc430712524d74a087647e27ff1af87a2aa0cf0b58978ad8ed616b566225d3aef2ef460be7393d":128:"53d926af7bbf7fba9798f895d182b09e":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5852b4bbfa623e5e2f83b888f5eb6cbe06b57299e29a518c":"8cc85e520b45a85c69cd80072642ef1500b1e0a409c435d685544a6b96d3224cc40e5fe8a21c4959b2891d4a53bbff03db9939c655e6e92222c6b44c95204827bd800c74666db64907894bc4e3043fab318aa55a011ab9397592ced73f07a06282c22d9a57dd7a37eadb02f59b879b030d0a5005226c461281ce3061bf26de56":"b96f4bda25857c28fdfa42bfe598f11a":"0bfdc1b16eeae85d550a97a20211216a66b496c8c19030a263f896958e4d1decc310b955523e314647edcbe3f69970cda8e07f8b81f9074434fd86b8ec5b3fa8b155377ad28050b50523d3d185e5869bc9651d97c56ec6b8047c20d671f6dc657f4cdf73fd7d3caf4b872f3fb6376eda11b80d99cf0e85c4957607a767642da6":"b148312074ecfc8f118e3800dbd17226d55fc2c91bcbceeae2a7ca3b376f6d568dd7fcb5c0d09ce424868f1544097a0f966d354455e129096ec803a9435bbbf8f16432d30991384b88d14bcad1191b82273157d646f7a98507dc0c95c33d22e0b721c046f1c13545f4ed2df631fd2b8fc4940e10e3e66c0a4af089941a8ad94a":120:"e3f548e24a189dbbfd6ae6b9ee44c2":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2bd897e969ccee405ba9becf24787a1e1be17a571442c6da":"50b8ade5e6547c350c3f43a35a3cb641459c5ef902afc706ce2fb980b275fda62e8974d1577ef65ce9fd854d88caa10295d1045ed7563e9391d60700b5d2a4a7ba5f3de7a7d1541780b95a08eb3f0996d96aac7ee838b67ee869447617684c08566647a4991e31829907ebe4b32cfa46c0433a64f864b8b9316cb0ec2578ccee":"fef6a08d92b5b9bdae4c368fcd0cf9e8":"fb3144ec6d93704d625aa9e95be96351c6e25bccf1eaaaf9a1d405e679efe0f2da07510ab07533295a52cdc1f5a15ef5bec9e72b199625730e1baf5c1482f362f485d74233fbf764d0b6363075cebd676920a0b315d680e899733d6da05d78765db159c4f942a31d115d53f1d89cd948bc99c03adad1eee8adcef7543f9dea39":"e65ed5b6d0f51f8876f483f3d8ab8fed78ab6c2e1cf50693c8511e1cc9823e1030740ac33f05a5aa0d88205bb3071a087655f28eee7d0a07945d25e3dc00221a1dade4170cab9084c47b82376d5d439bed99150811843b176543f7944b1dd9684fa9a52117c2335dda750d9de0d9b3ef718123b6534cb012080f6ef8eda8d4d6":120:"468546d4199b9d923a607a78fa4b40":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"12141d5834b8ca48b57e0892b6027c997669dac12fe60411":"cf475b50672fd8cc4ba84d17ab1b733fee2073a584d5427155f144ddd945d4901d5a9d76e3d6ae55ab3f9514861c83bca7d53868f35bdc8606a167ac83591be30ddb954ee173ee172e8d7742a71c0fee04ccd16fb5d54a45820640405209e20f8494f08d791a2a15f5cb848df689296a04e4b01e2c19bd8d9ca8b4525853549a":"b6dcb39939a31df176dcec87eb8db90f":"daf4e0cd0b29343defb65562594b2b6fd3f005e6255500330f77a0550c1cfbade5f5973e836ce7046bc2b2ab8bb7983830ce6ce148d0998116183d1aed320d28adef9ffab48e0f6d6451c98eb83fafc75fb054991d123965dbddcf74a2c01c746bbbc8276b77f6732cf364d8a4a5dbf5aedbbe16793e8c406ba609c90f0e7669":"4c2d979b9c2dc9cbbd6d4ed04094285a44df92e7ebcdee7feccf04c66c45137a7df12110b8af805f5cae9b4a225c3f8dcfd8f401e05c6ce937cbfc5620acdf3a4917c5b857bff76f3d728cf6a82a5b356fb95d144125d53e568b313cef11c11585d310ca0f7f1234090b1b62536885e9e39b969060ad3893e476e88941fe2cdd":120:"99cec94a68d3e2d21e30cb25d03cd2":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"14b9197b7980d95b71ce1a1de6577ce769d6af4cb45f7c8f":"03b37942f12435f1c19dbcff496738207dc92edf1ab6935b564e693da1865da67fb51e8a838559ae1640da441f22ee79787f1e909cf3c32187b41a48fbc595df1c097fb37881b329fd7b30dd1e05d6052fe81edf2e10786acc8aeeb4fac636aac9432c3be3dafb55c76ec85cc13881735609773350b95eedbdb695b2de071a03":"cad0cfa7924e1e5cff90d749cfadf9f8":"283c8a38c7fc9dce071d4ff9ed79002a6862f9718678b435534e43657a94178353b9ec7e5bb877db5e4f62a2ca6bd557562989363c6fdedbd7f0f3eeec5445c41a2a8bc98117a1443ad4d5dd63a07806622cca8ea6f9f6019bd511634db28651b916e2399bbd84b03f8ec696ed5846f30320adef22ae6d164aed09edcfa25027":"83940097301e9867623c107d4447b250bf6db7d06f9e07b8d8bc6b72b079b725ea1f4b5f79bb80c518bc69a2bd73cf3aa7b88162773ac5b27a2dcccecce66e158ec0875937910e0b6f396cc7d7cac5d53b0fddf3cd70b570a647245a5264927be1b2d9c46fbc6a630b21fead46c4f35af1d163268e49a16083590893e6df4671":112:"3e3f677e68208208e5315b681b73":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"80e2eaa70362203b7561b135db581cf32e9cd816464f0b2e":"62cc2db32584a8d90f348be32224bfdcefd1fd25c5cb05c7e74becb4b40ea09d6495f73adc1fd23d148c11849bd825efdf15e144587f785770d2aef2788b748c338373a0ea43882141bc9f7c693a291c512cdcdea6d5defb2efa2324736df7fc4b434d7f4d423fb1b8853ec3fdf2c1c2881610a8d81da5de5e761f814ed38e35":"3d7e99ddea0baa45e2f9f2289d2182a3":"71663fab717ec4d9da34d4851437f4504dbd71b65b0d04eccc513282c351925c23892958b4c9dc023c5a34944ef507e0b40857d8b508ab7104d13c2fbfce2d086d466291aaa449ad36977837216a496ff375959afe4dd50dc2620a062c926b939ffdb144a656bc04bcca8d1d4fa0a9cb0a5d713721accef2d2c9688a77bb42bc":"1c56b492f50fc362c5bf70622f817e1814ae0b69db7e3055fc9e690d2adb940f9a78cfd7e08044671913baec663d9f9af6dede42fe16d200e8421d22066009535704b05b3775ac41359d7c2697e2f4bec40df69b242392eb30e2d8a664d84cf95ec21797f1ccddb72926cfdff22848d14e373f5e6c3dd349196464c98dc38365":112:"e0c1b140cd7bc4ded916aab8780e":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4b7aa649cb1488a658b4387451bf59852e845ec7d2273c69":"245251595d10d719d8d00610d391735fad377b60d7430c7db488488c1ec25c12ee0dee3aac3d7dc19aa602924a1f27a2cfa8f6354315db93b5e4d2b6e8402c4254921e683ca681dfb3c7f433a97f119e01f2acb20988dced8494e086395351f2af356b11832472cbcb109c13ff92f10a4c8fe69bd264c8933cded19a980bdbd2":"07b50b1aacdadeb03e7488458db03aaf":"2a7970ee97d612b63d2a0c29e5045ddfc6621c237bc270b3147fc0191de199b6923947e3bd3750de5155e1df29caf96ac702f948c38619e218138945595156cc5f1dcfde0d1d6a5aec48ff37c9ff2b2209a904c59593779820ea68ad95898c7ca0d0d81583c44feb0fec30665cc56620a8c9408e4275e60f5284ed7c0e58285d":"6bd53e4415765f387239c6664f837371b39f6d7ff22453211e91de5dd14272784fffb4f6b2c0bb8c6b7d1cafc55133aa0d54d410ae383008fdd87645655062322fbaa06df0a2d7ccf4cc170d1f98ec6a7ad524a3e5b07761f8ae53c9c8297faa5b5621c3854643e0085410daf5bf6c7e1f92bbbfc3691eeff1c5241d2307bbc2":112:"78d37215234f9a32571d0d8b1e51":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"512bbb490d062fe5ecc8e5ad95920a9e9b78bec6a7694dc2":"862f2724ad82a53e0574c0a2a0515bd86c5ed0b5ae92278a78ea1a90c03059d08a91d1a46678aef862b56d0320e970b7f941b784841b4d8a38d056f2bd352d48c0028086a36426bbc1436da9e021dcac705b6e03649b426cebd7a235f6d060ab6302d777fc9316db4a85e8c1387648a8f5ce2398a247413cb9374124449e498d":"2d14fb3e058f97b7c9e9edd1d97cac7e":"290078e63c81abfe99010b8344ff1a03dac095e2473d7a31888102e838768892e8216439dc3355aedd073892f4449d9d4d3ea6c25a9152c329d24cc73eaa0004832691740e60f17581201c8f7f4023d8e55faa3942ad725d21dade4c03c790b5370d4cad3923527c20ca925a2ce534a652ed7e032cb1c7906aebbdc24e6b39a4":"44e78cf3a2ce4a5e498315cb8d5e841f926408921f3665d533caebe0a7fa6c164b3d2c0b21ff3a608a7194e3194fda165ada8d5fc2e924316aa4ce201531b857877c5519f875eb49e5908d8d81b69472d03d08c785ee374c5fe91b16aee173761af7ff244571fd40aadabb360f38d301463e9da8cf8dc44d20848688ab3be47b":104:"6037cb18f8478630bc9d8090e2":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d3964ee03ec5e500f2f8c05313b78615420183fe2950be32":"b9424e4a79a08a7937da1da15061c1eb9a873748691ec9c1fc76aaa164bd34873d07437d203c92c0e89c0c5befedfbb17f721f576473253617547206fb2b340945536cd7a049864d099419cf3f7a9154c0ac8d676b0e9ec02947caa4057560af347ddb46002703f3531f27b2197790ba135e3d3c0709c86f4781890deb50f3ba":"d3d4e5fdf6e36ac75b4d51c47ce5b8f9":"6146a97a2a1c709458bef5049088fdf339e4fe29cbdf519c93d525b71c9fb501c4b58bef49d43cc7699b18fc89cee1a4a45834f517214a77fb3b91d741977308e1585c474245802118d0e2c7003057c4a19752a143195ec2a57102cb2a127d2dbefe1168492e072e74c5f6ee102a0c371b1fe2ddfd8ecbc04c6f42befecd7d46":"a2ae334bac969072e754c0e37765ca6253744941a35587bb4feda54233a7a59f037e971d254c67948b16e4c35f306c0984f00465399405ce701ba554419a736cdff5a1b4ae5ab05e625c91651f74aa64c96ab628243d31021ad56f535eae33a885b45730268f900b6df0aff18a433e2823ddb0628a7026b86b3835160e5121b0":104:"817be7dcf7adef064161b6c42d":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7a8049f521fe9a00f7bf566369e540a48ab59d83305e2829":"67243a336a10b82a0a8638b35dc147c14ac63b20977922a13de459ae2cfbdb262a79004c3a656dfbc073ec8878595e24998dc44b9435439af117c9635c479676f6edb8f522cf01571be5aa5b5bc7d1cc3264436566f8d3c684973d1e88d46282b53836a1ab5a698560e5bf7629ec12cb141867f684b369546a1d8bf48315b6c7":"e4d81f71e1de8cf4689bfe66a4647f15":"4cf6733482c218af832e99970d0717ac942ebace0fed4ce4dfa1f710b9e131a21cc03dd3ced25b78bccd1991a30bb53b463c1440b6543b19af91e31c18866c2acebb78c2a340b930518e61a63ff8d6a6e8e7960523de40a178614dad4ce5ab253e1090a097f8ec00dfeecb46aa0e8f772f01c4e706de7e824386a13944600542":"cfa8ba247ada9e6b3e5ab7dd0a7108574cc811c2986cad951168559ff697b77684880ec266f0b7d87a2ff559e368a85846becee312bb2991692d928a7c191cfdb7f1468f8b84be4bb592ea640743443bd4941a8b856c57be21eb22fcb3f6c0a80728ddc9dc5fab1c77dfceb91699009054c5a4eb0714a10b74cf0e09fa630299":104:"1dcee251cda10b2ea8f2bfe6a0":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"657567a56e585c84e4033268f08f712aa280015b77cd657f":"96d889651c4f3f5120bee233f6395fa0bbba1f6548b109be568ff96f11d24e34d67beb6c20268feba89240674b0b4552d0a6455d43e8edf943da3d8d785a5221df8ddb3a98d2fc611ac7362aef71f8f004eb455a16d1dcac488ee83d4f11c4a00c29d9990c5a2a97b897d67e51faa40999b1e510ac62fa4859123cdb37d202ae":"94dc757b6bdbfe925b762923cd0a08ed":"a2c54e8da7dca49c73550bd1f5e68449295f062d5dfe5aa4201bdf353a2a1ac9c3c61f2b5482184cef481fa378a1ea990ce203c2c7d76993c62b415ece06b9b7caacec0c4147c0cbf292e528d97c1a176fcb1ca6147cfa4bcce92cbdfe617738a92273282c7a65fcb997bceb867ce01ec74541582d3961dddf3a2af21cad3ce6":"55a5d07a77fc37090c4206f19483aa3cc03815194ded71c2b2806ad9563edfebfcf962806ba829373947e3e93f4f39794514ad7b6dbc626e29fbc35f90f573da33ab6afb5c94383fd0fdd1ee074d650d192f6d08fbd1e24a6966a81a2ffd83fab644ee914952de77e9427262314ac47c11a44bf7d2890f9b9980499bb6a1f692":96:"41c72043f6116ee6f7c11986":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"61159242d48c2ca0c30377ec2ad701135adb62d113c9f9ba":"8ae40603f6cdae4b63ac7b18b4bcbb83c65867c2ae270102efb6f00aa8af5d0400dc95085910a50a16cbcf71f06c3f3eab71345d59c6054aaac02971111c7146add8c072158e0b374d481bb540036a136ccb91523f96f24ea237940ab011ad38f2a3095c0785df91604be1fe7734cc4119b27aa784875d0a251c678900334a0b":"4fda7236bd6ebe0b316feeea31cb5ebc":"ed28e9954634ec2c9e2df493062abf3ea3e199299053a15ce8d6fe051d1076287e4e7c0b2bab0a599b763a29d0aab680626f280c4f5ad94b7792d9af532681f6e4eb2672781f2342304daff902d03b396853eaf585af4d3bf5078d064e9eea6e94e667722f15c004f4cf52253a5c65b75319b07ba539558d8a2b552390a21577":"dba251e35422f60f902f594bb58dce37131e8ae06b5f40ad23c4a70a5e25fe24c76982c9bc11a7f4e3cc62d8c1326170432633eba1634972a9bcd093b08e1c63ece07c4be79cadc888b0408e40c09636e1cf1e5e9a6f2ea44eea5409a2ffe9c3ac9a18ad7aa9041f08eb109c01ed90732a8afe0694319ef98a0269685b4d16b1":96:"b0feebfc8324fd1e9e40f7f0":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5b4c37150f8bf0e14e0bfd37ac14e606dd273577007f24b4":"48c6486b2691b86f5f107e8fe0122a821248206d2dd3ce898a2bb3772202ffe97292852bc61513529ad95faf6383b5f6c5a7c16c4cbe33cb02e5e50f32db95ee2962aae1c9c0f5470b3baa216cc19be5ab86b53316beef14397effb8afba5b5159074e26bf5dd3b700f4ea5abd43e93ca18494e1779b8c48fcd51f46664dd262":"664f553a14dcd4dcba42f06e10b186aa":"4386e28ebd16d8276c6e84e1d7a3d9f1283e12cb177478ab46acb256b71df5a2da868134ed72ef43f73e8226df1f34e350b7f936bd43caff84a317b1e5b2e9a2b92ccab1e3e817f93222dd1e2cf870d45a8458e57948a649360c6e2439bbcc682383b50bcd3d8b000592c3ca599e598a03b9953af485f1ecc22501dcacb7110e":"05fdbb5ad403d64011e15d27cd6f5a2247e018e479e58ad3fee1e0e8ddd9e114c0e82f2c947ff9af525ce752f4aea959463899542b85c9b413d065ea175103c3b3c35f56eea52af2c54ec08a1d5b7cd5ee4f59de8be86512b770e42ab176b6b70ccbcd264d6d5cfdd2e52e618dc24251ac339ea38cdc446c778d2db3c7c3e93d":96:"77f32401db21adb775e7f1d0":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"531a380b109098eafd997bd25bfde4868d2a1ca781795e9a":"466237db78d4c770a658b9693420a2e087c978fcc434c9ac82f3e2447b2fa08be32d2ce6da25846555ffe5764234b07b35dd1d1bcb710e8a49f918f2c873681f32765b092a836e9418faba61dc59a254c923159be16f585e526616fedd3acfe2748ce19ee03868ea9836bee2c6acb1b821e231eb2d30d300387c93390d51e3a5":"ad079d0b958f09732aaa2158f6215573":"09e002c2c48beaf1122411e8624522a9e90cc3f2a040c52ffcb91136519277c39fd6a79292b8835e0fbcaef2279218106aaf75036590f8a46f6b6912053a3b391849f7e204f096288d6141d5f80c7f91dd2f2b6ebc1ced6af8216e0a594814b56bd592df800299b29e26ed7461ba3f6f3cf151b9c10ad634a01d9c5e578aa372":"d1f49f94e6fbef7e21abad23e16c06fcdfa75a8c342be67baea8e0e57dbcd2971276e993faa124ac81e6be18f68af303518efd926513cee9dbcc5ef6cf5e9c068a1210e53fdd56776148d51597e359dbaa0570b4fe15476ccc9aa79f7c765755b6f694af4269b9e18fc62a0d47708bca67dcf080e200718c22bac256f641e7a2":64:"01ec395c99a17db6":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fbd7a92120ff973ec69b6a8189c6ea827ca20743a8781518":"1583c1578a8c8d272a970f05d875f199e497c55f03f10f7bc934fee21c30379dad3c580b3f99304a5747b61fd43428506439ede2c57f5229e13da9cb7cd6174cccbb397e98fb90455ccf3ea3b1304f432a070a2eb5205ed863326b3b86d4eb7f54ee2ffcd50ed6ef01b3ee216c53f4f2659a88fb6343396b2ded0b389c6266c5":"57658c71b2c45f6ae2d1b6775a9731cf":"45ca8a168ecca7a42847b779ef152766b902192db621d2770b56c7d592207afaf52d19a6059feb76e96b90628995bd6517af3f114e97af8d602a493b77405e93095fee6761877dc292fab696a4303102dece60951cca20cacb171abdcfd0ef6da6c90b44edba63b9b6087d876b3fff24dea909899ebd0d0371c424f51a9a84b8":"58a290cf0e774293d1b55f5ef8a305f68605c0c81668b8a1ba95fceeaa65229404e18fa54dd811a6af085c98b8854d0f956adc2aaad742cafa9ed53d7cb445451ee7a4dc1e8399ec7e5b4d004ecd22496565bf444b2e3d82ddf6a6d5e6256c5095a699d7ff3f8cf2addec73e21013ee6f3dfc0a3abf316ea5ee1d6943bc394e1":64:"af737ec3512da2b4":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"54bfc8379e0a8180b931c5188c95ab3ed3461d6e9004d182":"93327664eb576bbb64e4ff061874346b4e80a779cdeb1fbe630bf5e4307d4f2c5d5ecc94aa8bdea755c1af165fc8925bfcdf128c1ee6571e9f8344b22dfc90ed893316031661a9438b305396f3a80452c9b11924163b7fc4422b00dc58ee0e674710239975a2cf3253bf2601cd155e09547a5f3be1adda84a4b29631a8e13161":"9d15df8de4150f44d342f2031de3611c":"63331936d2972abd44c1c9f62e42bfa932dff8cc75d9f555f5a7847d08558e76f5393e08909760edbef8d2922a7ca8e1c0c505ca627c02af73253791bb35ff080b4db7dddf4c8b304999ff645227cd79f13ac87f9c963b93a79a0e946e5781cdbf1b4b1967a75314f19c7219e3b69dc2c24ba09fbbdf7184278f82818bdd0958":"18ff87dccbc24c396190c7b37c4a77f86e609db7fb2b326802714d0f196b00b84af887f1b3bd30ee0b0b192d0801ac4e59ac40e5c652b3da32aa024da3acf648da0253674c391d260c0674853c7821861059772c9a7f2775a7ef77d1d31a6ec1c51c5f3089bb516f8cf52d5a15724281086abd92a74d255b7cc84b5051be4e5b":64:"bf0f7f8084e79da5":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"21b775ef8c40a5387d6c8eda4e90d0a00c795681a2887dfc":"6346f84301d6d83e1c5bad44fa7e0821f35723713ee8d4a9e2bf15abf953425b09bd77b2360f4e62e82bf9e14e2b56be51d032aa8a96e894f19f3e84630f9eae831b329f7638b09de7210cd29778059ef1d0bc039c1e10405f3ae5e4ca33216adcfc21869d9f825344d62b50bab03f7aa7b92fdb94951a68acd01f1dee75e428":"9763e6187d4b96b1801d1f6efe7e80a5":"3bd523c16a0022b780ae8318a28f001502120bb26e2f65f4fe94019686f9d1df330e70cef1b2ba4b6ce1f7ef37750f47e602843cbc5f13ff2ceadc5091eb3601604b70bd4acad3d61950b9dd2cbfd83a391223c8e09fddd4020c0f8a8a7057139fd92f3bbe034f03cc48afdde064c8b13ea942ec0d621db959ec9d5fa95afe45":"f25408848bc27ab087b3ea053762837a534c3702dd8be01d79f075f61d76ac1d6557d392e1fab475cc7d13a5f6be6f0718bad71c3c85b5996bd3c0159e264930988e3ed506bcc94fabecfb58caaf56e2e4315bb50817cba765636d1faa91147b3880815eeb90d0934180e49132833abfa6279247d9dd4048dff851e9a551ee1c":32:"d1fb9aed":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8a7d8197d9ceebd8e3f6b3bfb74877ccf649ac91d7057af5":"37b01df357561f5aa43b5b4b0081148213f7b74babc80f4b3c6dd78ad17687f11443cd4a57f8d7a74ca3080e2a229f78d8e6db276c1142d5f4ee764eaf09cfd70c596d7a2cad5360c2de20d5e17ec6e06a9b049bb10f8742a30a94270cc6d7709b2f09f3cb8347e41117b7ddb99e4a939f3094c016330a8f170ccccb9d3651fb":"db5144951a9f1721397b7321713a723e":"ad72fa5a05adc40fb38245da019cbf50958ccfe26abf67dfdd49f4c4af6bda8bfc99d557913b2634c5c65d33ca909360adf598b703db1dbcc29481b17ca42fce3315ea1454693b5843e751fafd78158fc040c1cbe607063ba9c0ac02ae4b88989e3cc63adda8427032c70560349e1a8ec847906a9a7b0422a694a1f9eb2b3b72":"6985ec525cfe869e1709751eb6f1ff0aabcb39ae3aa708adc452ce1a8cad8ab4f1739f660b2841566f1f5c9e15e846de7f86ca1dc085188fcaa4a3f839ab2a5f0cfd36e36965ae519fe14f98899ccb07a3ca15ec705e3160df6dbc37ab89c882012eefe51e4da8d6d6b84b3144ca87a90864ff5390abfb92992e44c46807b3c8":32:"c51604f5":0 - -AES-GCM NIST Validation (AES-192,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"713358e746dd84ab27b8adb3b17ea59cd75fa6cb0c13d1a8":"35b8b655efdf2d09f5ed0233c9eeb0b6f85e513834848cd594dba3c6e64f78e7af4a7a6d53bba7b43764334d6373360ae3b73b1e765978dffa7dbd805fda7825b8e317e8d3f1314aa97f877be815439c5da845028d1686283735aefac79cdb9e02ec3590091cb507089b9174cd9a6111f446feead91f19b80fd222fc6299fd1c":"26ed909f5851961dd57fa950b437e17c":"c9469ad408764cb7d417f800d3d84f03080cee9bbd53f652763accde5fba13a53a12d990094d587345da2cdc99357b9afd63945ca07b760a2c2d4948dbadb1312670ccde87655a6a68edb5982d2fcf733bb4101d38cdb1a4942a5d410f4c45f5ddf00889bc1fe5ec69b40ae8aaee60ee97bea096eeef0ea71736efdb0d8a5ec9":"cc3f9983e1d673ec2c86ae4c1e1b04e30f9f395f67c36838e15ce825b05d37e9cd40041470224da345aa2da5dfb3e0c561dd05ba7984a1332541d58e8f9160e7e8457e717bab203de3161a72b7aedfa53616b16ca77fd28d566fbf7431be559caa1a129b2f29b9c5bbf3eaba594d6650c62907eb28e176f27c3be7a3aa24cef6":32:"5be7611b":0 - -AES-GCM Selftest -depends_on:MBEDTLS_AES_C -gcm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_de.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_de.data deleted file mode 100644 index 0fe8489788..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_de.data +++ /dev/null @@ -1,675 +0,0 @@ -AES-GCM NIST Validation (AES-256,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2c186654406b2b92c9639a7189d4ab5ab0b9bb87c43005027f3fa832fd3507b1":"":"3a0324d63a70400490c92e7604a3ba97":"":128:"4c61cd2e28a13d78a4e87ea7374dd01a":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"747d01d82d7382b4263e7cbf25bd198a8a92faabf8d7367584c7e2fa506e9c5f":"":"7156358b203a44ef173706fdc81900f8":"":128:"9687fb231c4742a74d6bf78c62b8ac53":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1cbe30216136b7eaf223e6a7b46c06625176d9a08182fa806a63d8b143aa768b":"":"4fe6ace582c4e26ce71ee7f756fb7a88":"":128:"d5bdf8ec2896acafb7022708d74646c7":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f31194c83bb8da979a1eabb3337ceb3d38a663790da74380d8f94142ab8b8797":"":"404efd26b665c97ea75437892cf676b6":"":120:"e491075851eec28c723159cc1b2c76":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"daeed52ae4bf5cbe1ad58ae4ccb3da81fb9c0b6f7619ca21979313ad9d3e83c1":"":"4037eadb11249884b6b38b5525ba2df4":"":120:"360c6ef41cbd9cd4a4e649712d2930":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3ad81c34389406a965c60edb3214663ac4a6bd5cfd154ae8d9dc86dae93def64":"":"cebbce06a88852d3bb2978dbe2b5995a":"":120:"bd7ca9f6bd1099cde87c0f0d7cc887":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4c152ba30aefa5b2a08b0b4d9bf3f16fc208bb0bc4c4eca9411dc262d9276bad":"":"008d040fbd7342464209f330cf56722c":"":112:"c87107585751e666bedae2b1b7e8":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9aed4ae6b1d857fdcbe5aec6db38440613dcc49f24aa31fba1f300b2585723f1":"":"947c5f0432723f2d7b560eca90842df1":"":112:"7d331fedcea0fd1e9e6a84385467":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cc80bc031676eff5f34dd076388a5130e985f9e06df4b4bf8490ff9ff20aae73":"":"51f639467083377795111d44f7d16592":"":112:"02d31f29e15f60ae3bee1ad7ea65":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"db7a40213b5b4b07e9900dc28f599403b0579cbce13fcd44dff090062f952686":"":"aea6f8690f865bca9f77a5ff843d2365":"":104:"7f2280776d6cd6802b3c85083c":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"299b874eaa8b7baf769f81f4988a41e2708ae928e69a5ba7b893e8e6b2db5c3b":"":"2aa04d85d2c0dc6f5294cb71c0d89ac1":"":104:"ea01723a22838ed65ceb80b1cf":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a6c7b4c8175db4cf23d0593ed8ea949043880fc02e2725f0ab90ae638f9dcfce":"":"ae07f8c7ac82c4f4c086e04a20db12bc":"":104:"1132e4fff06db51ff135ed9ced":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b98e1bf76828b65a81005449971fdc8b11be546d31de6616cd73c5813050c326":"":"929b006eb30d69b49a7f52392d7d3f11":"":96:"33940d330f7c019a57b74f2d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"09ccef64ae761a70fe16772cba462b058a69477c91595de26a5f1bd637c3816f":"":"e34b19381f05693f7606ce043626664d":"":96:"2adc2c45947bfa7faa5c464a":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"654cf46598e5ad3e243472a459bcd80f1e026a65429352dbd56e73fcc5895d1c":"":"a56f27709e670b85e5917d5c1d5b0cc2":"":96:"177b9a5e6d9731419dd33c5c":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"84bca1b2768b9202bf194f2d5e5a0a5f51fd8bb725f2bab8a3fccbdb64a4ea70":"":"c45b2708c5bdf65ec6cc66b6dfb3623b":"":64:"fe82300adffd8c17":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c8ae011795c9a60ad7660a31fe354fa6f7e9c2724d7a126436291680cd95c007":"":"1bd9ea6186450f9cd253ccfed2812b1c":"":64:"35214bbc510430e3":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"df2f0a8a3849f497d12bda44e12ce30a6957f3febcd5ec9bc134171326ca66d3":"":"728cb9608b67a489a382aa677b1f4f5b":"":64:"e2ef5d9cc5791c01":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"78e8a8ad1ecd17446cf9cd9c56facfd4e10faf5762da0fd0da177f6a9b9c3a71":"":"f169ce6f3ccc58f6434ae2b8ad1a63a1":"":32:"0fe57572":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"02ca6d8a862e25db9d68e4404abc107e700135df4157cfb135ce98eaa33151c9":"":"7b722fdd43cff20832812f9baf2d6791":"":32:"72dea6cc":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9a2b709dbcc3a4fb15b3ad541fb008c381b7e985b57df52f07ca7cd26ab1ecc4":"":"729baa4c0ef75ed8aae746376b39fe3c":"":32:"2a0d607c":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"449d39f863e4909984b37f2e5c09ea4d4b3e9fac67bd57c299e4e1d1f084aaa3":"":"d8e9118f331bb5a359f0aa8882861b72":"4ddcae0bc24d622e12bdeaac73e8d1ab7957af051d27dfaafce53aeed4cdd3f989ea25989a2f41cfb3c38dbd841c5560b0b5ab1861b1fbcd236865d13da55b50219462e021f8a21848a64a85326031fcec8fe47a6ef4a435dd2b2fff637644ffcf3914ef2dfa5dd556421bfd297be150b31db039f0f2cc422b282e659e70cceb":128:"c595b9d99414891228c9fa5edb5fcce3":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3e70e66813fc48f984dcda4d1c9c24f1d5d1b71ecfc8bb9581782e7cca5a5cc6":"":"d804f1051e72c9b7117002b862eb45ff":"0b1ab2b7a87cebac668c7a532fa8fa56a22cabf0c41fc1e6744ffe07c857c6865d623f508351f98f3f0c577d1eb94300a30a445472218c8ac626b0bee7d4c122d33f8130436a89add341e8ef7e00694afb4ad80d314d87ad3f921c7105eed05431b8151df7cff2c8e3790efd4acd3f60332dc7f34fdd90beef70f9093361d65b":128:"c09c2e3fdfefa222f7345ae4efb978fc":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8e534041090b45b80f287dc5fa20ebda017ad81b0530e680f62c6280fd8881af":"":"ead675b019ef5c6bbf4985f2a382d6c1":"b1db220052c4bebcef27eed6db0dc91be481179d71160c5a2ddb2fe497a05484840b04cce48980057d770fbbd0d5f3d5c633b55470617ad2cab5767188283310337825c4b0eafe13b5b11293dec230dad43b220885105767938c7ec4600fe063f98aa14bc6afb886fc874c10546749da295f571e696305bd9165486e29f43f52":128:"9aa0cdad5686ca515cd58aed94938ef4":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2de18874470c09db683cf45cd752bdfa8bf33e7967220b1a69f41f2a02da1d80":"":"af30eb2d0a0c2a50ea413f3285aa88d4":"22889b868d8ccc9f488406813caed199b23091ddd796c8632f564e7cf5a39dfb725266a931fec958659b6fc5b6b9343b8217edb0acb010afc9416601155262b57bd398d62f555953f0e15958e19ae004fbc9cb25e0269a9eaa38a4635a27bfa719fb249fa49337796bcf5f416bba87fbf3b19f0d8c11290c25ca50bbdc822f01":120:"646bbc9b14681af65b0d1c4c9f1d0d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1a1bb9122e762ecd7ff861a1d65e52607d98e7ae5bd1c3a944e443710f3b0599":"":"32f99ea4cbf52c2701c2252e5e6c863d":"91b7a70c3a06c1f7f2ea584acb5dd76177ba07323c94f2e8f7cbe93fc0bb7c389c3c88e16aa53174f0fc373bc778a6ccf91bf61b6e92c2969d3441eb17a0a835d30dcf882472a6d3cb036533b04d79f05ebfaadf221ae1c14af3f02fa41867acfdfa35f81e8a9d11d42b9a63288c759063c0c3040c3e6ee69cf7c75f9c33fea1":120:"a8e29e08623a3efdbbe8b111de30a4":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3bfad1e8f9850577f9ba3f290e9a5e91b494c2d99534220362e171a7543177ac":"":"8410886b70c57d7ded8596443bd1b157":"ca801c83596795515ea931edba00e06e332bf84246b7036e10b317e2d09a51b2981fcb664ee3bf4180bb0b12ed1cda221abc6790b27c26914f5ef9cea9536e2453cd5b247cb054e295c2687b725a97cbc484b8eb86c6ceee03bd07a54a9301a3ac0ddb23aecb825a238252e7575329058b40e75575a7f16439edf5be163ce5f5":120:"e3645db0c600dba52044efcecfc331":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"65debdf2f2191a6cd8de8ad4d5d4d0d8f731f67744e2545df6b2a7cba89c1ee0":"":"fdab2ee547dd8b6f5a4ea2dd19697b3e":"d2b0a0438ee0f145aec9a7ca452b788ecb473152b78fb75f6ace721afc7b0ae1942049b790f3a5b6221a8760295659756d35347cc04029be03459f3e23a71209b4e0bbe13a253a888c83db23376d3a6d9a539f7c9fa4a12dc64297e7c93dfa0ab53ef76b6e1d95bf6f3d5e6ee8f08662fc03ec9d40eff0a43f23ac313671bfd9":112:"c25fc157c3f2474885e2eea48aea":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"496ae810380460d40cd2fdae8c0739f16b87205cc7f57db0a71a473eb361d570":"":"77233de96f5e1744337778212b411bd5":"85f5b54b4c4af5c808120bd28d98e44e96f4126623e57684957e9fc4fd1a2d0583940b8fc8314a249325476e8d05247831b04709580ae714e8187cd38f9559419e14c9fc4f8c454ec191b8ef2a3610988fe3339d0dc6b72f5978f9eff9d596dfabf27056e3a908c6497267461386e860f6b9d65526294bcb92908b5661b06b5a":112:"4ed91af6340e70b0c2b94ab6f82e":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"aca188183b46139cc7cffc82a6aaaeb2fd73cecad14e75c663bd62daf1ec711d":"":"7bbf7fb55eb70cce94cc6a2b67de55ba":"015cfba90f069545fed60f31992ff3d3c3592eb91e7a53df5978ded64291954cb99a57de82d5398ce782b68d14ac04a8b425395bd076ead59eb445721bdb2f45e19fa089117800cbbac7b8313fb165ccb1122acb654e1242dc7fe6885ea1cbb7281b1270cfa1549cdfe9b47caf47b4ac3807e562e48c066566f5e606b5023b47":112:"3bcb5c2a4261d75bfa106fb25ee1":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8cd6815f6ec15f03b7a53f159e877a5981e0ab7f6e6c261ddde4b47cbb2f2366":"":"c431c07d9adf5f61204a017259cddd75":"4e1a835402bde4f5227e64b46a1f8d0f23a9434e189377fcdf1b9621ba1987eb86a7f3b97ed0babfd674e74c5604a03dd016d71000a72bbbd00a7f7fe56ad0fcb36a3e24dd0fdb63bd66d4db415f35012416ed599796ca3f678df7eb5a1b17f75abb348ddd3b366369a7b362c9488aedab836b61f9a158f0b129c8ca0a53a81e":104:"0e463806ff34e206f703dd96b3":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8f0a72abcda104aa7fae501f9a3b686d00d3f6fe984731db8a2865bfec587073":"":"ab8acd063775d1b1314f14e90fddd1be":"02c6d426e7f20b725d8cde0a6382e49b029b52126889013ef45251f27b2fadb95ca4a9a3b16ad06999eeca4a473e813045db4942e9b9ff2e5a5e429d9bac298372344d1b781d5facabf6d779643f31ada6124eb50aad599044b54279ec9b25714ac8a3b9ad2487cec7f4b1ee245d7be3d496d6af1d4cbee1c8201312541f3064":104:"3f0ccc134091e0c0425887b1b9":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"417135cad74280e6f8597dc791431c95cb8fa63bbf7197e3ab37c4b1d6d9438a":"":"0fe22d9ba1d0e32656e3a9f07a517a27":"a0b2712e81d329d5b076a4be2ad6823cee6dbd17d9a592d065bdebb92b1ff37a56bf2f5e5341f39c574246ccda19e5f35fede49c9ba958f3920cc5440fb404fab7846884ca0c2a3af5b51f4fe97a1395571319cc5b40f8aac986d77de280db82343983982638326ef003e0c013af19c34672975dc99ccc0853a1acf7c617d965":104:"888b836c9111073924a9b43069":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"304824914e32ea0efd61be6972586093349bd2cc2cf0cff44be943682b2dbff5":"":"b6d927a71929029f6766be42746f7cb1":"7281c81c7514f4b17cb125c4649006ef8959a400a1e4d609d277e363e433725fa32346a10bcbd826b6afc8222158920d0a2db1e6fc915e81231c34c3941ecf3c6f94ffe2136190cae3dc39a4277acbc247f36291b5614a8433b1a0780434a6c50521b72ec25145bbd3b192647155d5dd9df9e66762d39592602ea99bf9bfff49":96:"b6044c4d7f59491f68b2c61e":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"8a10e9abe9389738e12a4bb6f553ae81e8bd320e0dfbc05fbae2128c1fde7a23":"":"6da44354e198e3beb54792718becbcc1":"199d754630135b669bf2ec581d3027a569412ab39a78dd9d482e87b778ec65c6473656260c27827e00e566f1e3728fd7bc1853a39d00e43752c6f62c6f9b542a302eea4fd314473674f6926a878ec1e4b475d889126ce6317115aea7660b86ab7f7595695787f6954903f72361c917523615a86d6ce724bd4a20c9257984c0c6":96:"5c5683e587baf2bd32de3df5":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d164ffde5dd684becaf73e9667e3e6acb316682c41aea247899e104a54dd7a7f":"":"1d388e19e9d7a9750e2fc1187d4b075a":"f166a5b6f91261cda56f1a537f42ffb8aed10af5e0248f8910034b92dbc58d25953f1497f571d31fbf5ec30d92234b440161703851f0e43530418147ce6270fbcb5db33ab819ba8973051908704b6bea8aaca0718947e6aa82498a6e26a813981783ed9bf9d02eb1ea60927530c4700ff21f00179002b27903dd4103bbc5c645":96:"52e10495105799ead991547b":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2854188c28b15af4b8e528ab25c0950fc1384976f242716c91bddeec06f2fdea":"":"075af9c31f5252b8920092cbd999e7a0":"e9452f71093843a025bb5f655eb6a4e8316ab5946484b11818f22b62f4df75d5891fa3397537093a261dc9a7648b7477ea1f5fc761716e302763364bcab7992595edd0fc1c7f7ac719c879e6616e2007948eb8530065a6cccf73d0fe4a0598819b471b0856e6d90ea0fc0e5d36a30ee925b6b8e5dbf40e77f01efe782c0bb4f7":64:"6ff8fd87e5a31eb6":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2bfc445ac0365ae6c3c3815fd18bbd0c60ea224f6620d9b6ac442a500221f104":"":"43c5f3367a9955aaee1a0c4d4a330059":"db0bae8ce7c66a8ba2fedec22f236212e9a7ad72b371de285c7dc6d2f6c22df0ce4920e0f03f91eb1653c4490050b9f18a2a047115796f0adc41707d1ffcbf148aed5c82013f557e6c28f49434fc4eb20112f43566f212c48cec9894ac40772fcd9b611ee9444df7b73e35b8a38428ccb064c9c50491d2535e0b539f424db83e":64:"49aaa806cb2eeadd":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7b828f99aaf751bf22d993ed682e488595617a607ed74aaacbb6b60457453080":"":"d48dac1d8d77e245420feb2598812418":"f50f785f4e7c848a55a616ecf4b6b1e1ca85e16de7100c7e4273d411bd95c1380ee157ba501ba9616980195f34e39f43e335f33253342feb8ed64443483c721b85241a0320b3cac83104de2db47188c61a373fba592ea16feeefdee1f2bb43927396f58151418672ebb74afff5c029503a0d0be81430e81ed443e08b74c03183":64:"a5b71ecf845b25d0":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7b6da11d69fca3e4c907628d3eb63d95c7e502fc901372fd097e064e70831432":"":"6fe2148f250ea178d4c8ca8423ead87d":"a8097bb74ded776f578eb7588f5ef8915db9bfa7262af700c8e76ee114e07557b6786dd5a60a66b2703e7c9de5d6b42aca92568aec5d1ecc298dbd0edb150b8cc13c9a78698f7674caa94da6cacd1f3ef4ca4238c59830ea725ab3a6284e28966c8c32d9bccfb0cfd6583a5ca309debe86549a6f317d15c5f928cbc7f473310c":32:"e9cdbc52":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c5ae9328be49e761064080fc213e53e373fd86359a09d0355e2d438d9b8e68f1":"":"a7e3f8660ff925d5c88c5aceffbd7026":"2ddddba7a56cc808aec4602f09ae9bd78887827bf0315d8dbe16821606ef9d117746dd138bf1f23565d1ab8f4cee36d53fe3730632c5df9f12109b16edbeae285bb49dfdd155f5dc97b319a85362d53cc86817b7c1c31e5e87c9f37422f133d00dd0776bd92ab05ce6860573cd911645cfe3fbe515e85f744899a447fe443653":32:"e35dbac8":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e4f8ca13ba86c658cc7f42d4f029422209efbd101bc10a1df81a42cfb3a0f79f":"":"1a362fa0e4054ba11e4b06d59c8bc9cf":"e7ad5c75aa13659f8ce4b1650c46382645ec67418199b84ea445b8ceef619ef3fbde59ed3d313c459e36fcf87d26ef2b453409b32f1086934c3072c1ef0aac83762d28b1193b9afff2c083ce4300b768b0ae23ff9d3dcf65bc1693f1350da65180620aab205aceacfc683c8be53a332e2d0337a7518d2a5204f9c8d7325a4799":32:"e7a37f15":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"00050a21ca1e72cd0924be31b943c60854be6744577de3dd9d1f4fada4a19ea6":"693ffd3d92294857a99c702a0799eeca28ab066dd90917b9ea5ef8f6547f1d90b106cbec8ef2c22af9f8efa6c652f2f97c2baf33af14fe9def230d49524bd65909c3df1490f637f99e788dcc042b40e00bd524c91e2427ef991bf77e7b2f770cda6e90076c5dac4cac7ee3958b53ff8ce846c3a96281f53c2c52f5f3e523536f":"2fc1afc1395d8409919248709f468496":"":128:"e39b6a7fd5ac67a2a1cc24d5eb9d9c74":"cfcd6b9ff7641829cbadeaa2e56f1f150a099eccf3e378fa4da59794dcc4490aa4f9c5db0ab245bec36a7d4557a572008e42f03bc1baff3c946f23f54a4dc9828f106cf4264e4ab40165839d1085e7795b1ae0950f0ee4a08e46ada501b6b51dee0e518129c9426e5bd44c66674a9f99cfe676f002cfd344c5bbd22d3d91e600":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f10965a66255f0c3515af497ccbb257a09f22ec2d57c5edae322a3e6d2d188ef":"91598690edf2de8b27f9bc7461a84e80811cee544f0542923898328cf157590251f0342cb81d359b5dccc5391a12320d1444c26f24178977dd6705c2b365dc1ece0152c42e2f0ee3162cf886ef5529f4f16a77f3bdd2aeccd405b59addf098521d0d38cc25f1991e11be7ecf24caedb48a2a286d2e560a38fa9001c5a228c4d1":"c571ce0e911de5d883dc4a0787483235":"":128:"6d9d3a5dbc8dce385f092fff14bfffda":"2867996e389e09ec0da94d42e77b1e436b50065b09ca4adf1cd03240444ee699dbb7b3fc081a1869ca607d77d5ff9754fc3c997ff0a4ee17543a2ba77886b88a7128bcc51d3450df58ff3a26671b02c1d213df6adb6f7e853080eb46b504517cbaea162710a9bbc2da8b552eb6b0e0cb98e44fcab0a157312be67974678d143e":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4437ee7d16d8c3ca1aa01e20b66749efa901614d4bb4bee786ad5a5f1bfde2e6":"ff80727a3485cdbc7fab4ee9fadfdc621c538e2055706629046078f1aa3fb687fc728d3a7ffa52ae457b7b5649613eab7bafa464bb435314c49e5900750f7ad39ca9b75df6b2eaa755439e101f67b7ae4cd80dc4a9dea0027048253f2d0a6014056ca69b8c85605b00cf75fa7634a0ddf464270a8c79ce1a1324c4a4c513b24b":"275393276745bc43bae4af1e5d43a31e":"":128:"a82ff1e87d26e4d6e417b60fb2d3ce23":"88f994d276ed20be3932d16f551c4b7e2ed80411f2e72ce098fa0b70c22157a59edab30649fec447dd63f0c87dceca7238ef0d9561b58489ba7bd86f2892743099f40af63c432f78ac0ad0b5c2be47b9e3045e7237b096ee400f430af63a6f309de785caf190f3f4aabbe79f727a741590de542bd343df68d13db55a5f8bab41":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fe4ec037ce563dadee435cfcb2bf090f1f7ccc7d1b5b4fab2f1b738348f8ed2f":"64eb8a4bda9804c09b04cfcd89094928c21480908b81ee19d6c29c2a3631b1a5bdc8e7f8ea56f7b8b8e14a5208296026785cac3a6afa54be8af4d5faedcd12b6621bde0f8ec5a2635fe72a89468ca7704c73aa40cd2ba97aef08886b27a694d339b00e7d12a31308672f87c06a7388a1432f869eb4cc1da864140b1b33931925":"47f5264f7a5b65b671892a05fa556f63":"":120:"660462b4088f6628a630f2e4170b21":"4a310e035361f98b8c54fb4cef70b1a9c910552ece056ca8fdab54c52308ec0ad7fe9dd1dae92badab5010577de522088768fa6466fbccce22e14c51ca7986c4063d0f06bf578dab16a91856713198a7138395c49c78b6314b57ab72fd079028c8dc351952d90b04a7cd2b245df0c0522447cdb7d3329fd9425fe5cb40a8e7c9":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e6e1ada628ca76eb9832cc6b5efc5c9d2686bb587366a6de2d734233fa95279e":"a0ac738e0fb35246b84a6fbe319f827039515df25d0c0fc6de7c048253ae63d3c561e44a12672ffeae1cb925610b482aa422bbee0e1784fc69baac3a97d69f51e6d2a17957b44b318624ea7ec680a559f4d3f2761d09bee66efb3a312ae6b3ecb673e756b2a0f654671e82500e7ace91f2be2a74bc3bc1ec1a4b6877a53c27c8":"5a100b451e3a63a3e6d4b8a9e59c6bce":"":120:"88df9a1ea54e5bd2ef24da6880b79d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cd5c1e90d78213155c51767c52c290b3d657db8414ee0a7604a2ec7b48105667":"8e987693da0fb77b6d1282eebd3a03e05d9955ff81929b1a2c721574862a067ddee392c7ece52ca1451f3e6e321d7208882d97b4149af6d78d65c054e1bfcdfa62bd2202de32dea8363f8d7f041891ce281840f3cd906ab46ca748e5b3b11890b4014bf0271c9427c874097782d1c13dbb40e78fc8276fc134f3c29923a43a01":"4e022d8d86efbd347e8cbab7e979771f":"":120:"e7df79af0aef011299c3b882e3a45b":"3b20473d9b5018d089e7f74d3fef22ec2805948a9e07689831973c704a6d8db4d090af88d696ab8c3aae9740a2bbd7f03e0b18b2b591e59c335c1043a2578a89b1a9f20fd0dd53f12e00e9bfdb27de8caac772bbfc4de9e4a255a5d1b04e59625a87b8279babe613def58d890d5502abf2f709aab625dcc20c58772832c7bbab":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6e3dfc07003bb6a2d82bd5263b2832f47db4e73279266c7a9ea21f4f18eddf83":"a960da222af9d4da5797e6957d59b00f6d3893599c70e95c0984b56eb3329b191703c2532f3288b15ebf655b9b5ee4617484e5ac9c39bb06731d03ebe4fef9495d003b0ed694cf540b4dc759d32629e55512680badd81234bd71ffd55fcb5e6a85031c1dc31ee1ed198939582d8336c905717cc87101dcfcf9d833fac815c8ea":"7c0f49fb54f5e68c84e81add009284e6":"":112:"b2ec0f3da02a9eb3132fb4ebe3b8":"a40b6f70f0572fe0bc70d83368e7c154f7dbd501f52501630a2e523d18e216e07368521f6040d806299397722b99bcf7f85d36b8bed934b49aa1fa76d38783e6a2e392d6d0786d467f7bc894a739ecf94f0fe884a9c391154f8326bf31ea5242a18aa263d04da4b63b11de23b42d3e10a2d5460cb32700cdf50a0d89165ba22a":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4103b1ddff87a508a219c808a04ad4750668688f4c2ee75b92d28d70b98a2c94":"a00a196193ff07006b7df524824bd0971d63f447a3a7bb1b75c1e2d11789482c115cff677b54948d36dc4de34200bce97be0101d88cee39b177857dd5da3cb0d2f9d6e1150f72a3bd655e0bace1d25a657ba9a7f8dff082b4460432075afb20173da22b49beeb6a030d72ba07869ff4389fc1c28d87018d7c1a9829c21932197":"5cea906737518c2cb901016e30206276":"":112:"3a3a771dd5f31c977e154ef5c73a":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cd8c2f0c330d5db316dae7a16b57d681ca058864f7bd60f3d0de174442283f77":"e2a5ad295d35031535bf13c2993bd0b292e8a9465b9dab738e59ba03670248a1ecc92b38a55bae34729162271cc1572c35fcccb27417b48dfcbff852a7a8845cc829a4461061b558ac8b5930a5c6491ffba04a9d0dff220b3cd5e4fc2e0f3db3b2ddd90328f2cad819573a7856299620b02f5ee0267f3b56981afbf1b7d9e3e1":"387ee8c1e7f047e94d06d0322eec02fc":"":112:"62356850d12b54e39872357cfa03":"17b7f6bdfc1993c56dd9bd674cc276a55a46fdd9fd5fe435b9e4b7ebc7052a9dc76a99e4e43aba7d486603189c90d10a21ad3722c86bf5bc856a0f930ff5bca65be708b76bb8a29105da67f31eebcec81f28aaf526d2f8f0feac393a24959dcd612e2b93b4463f61957d2b3046bcdf855e346601e4c7760c0ca618ee7bf55381":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7e19e400872eed721d560202cd757d3eb99729496b6e3a6d38dd8afe1066045a":"3fb9abc7aba654dfb174e8899c17db222ffbb387b7260fc6f015b54f1cd74284c516e21aae3b72338e5e8dc643cfafca0678f5bda3a7539f1612dddb04366031b5a3eda55f3232c1b176cc9be7cc07e0ebca674a272224929c401a2530efc6d4eed0087b544b12d172a01bc8340d9c2a2ebcb5af8b07d96073a879fda140c196":"d2b277f78e98f1fa16f977ce72ee22a7":"":104:"4c81c044101f458fdfac9ca3b9":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d0653934a16fd36c27d54488a1829302b931bed6e26ca26047242b85b50bfb61":"c02347e1add9178d830d8baaad9aeee37e958bedf2cc846e2561fe8c83481d0a8a85911e7f1f6e444b28f30bd96c13c390e80f616feb6844ee6fa486543a2e3f38c138f45b4405e3fb331b64648219aaf1d574be948ccfca6afc18d12488db19c35b05601e47c0af5d49a93a5dd4420f38585c1eb033e173376fa390d3f948df":"94886a1845aebba5ed6b86f580be47f9":"":104:"4be34ff42085ef4443c8b6042d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d0f0ccb88c7cec9496f26a59ddc67dc59ebe49ae3dd89ef3be008598727e214c":"7845e155f4f28021291e7c814a1ace8f42b239990831aa82758fc1e376cace0b6f668f7f2f224dede1ef5b1df7ae74b2c01483701044acbbb72a9216eec6b7ef0190f114b3c73c6985c4653f11601c774d10b7f9df1f1e1f3ff4fafa20d6525edb37d9e5acfafe6d3468ee068d407fdb56dc718c98425926831253978d727854":"e5ca84b907ac761a5e68a9080da0a88a":"":104:"c8f78e4139dd3eaf2baef8aafb":"0cc3ede50b0d3fb9ada11300a3239a383c98f968ad65266d57a195bb18d3e568fe6cabba258da4bee9e923c7c838e06dc887a6c49cc1453ea6a227c6a83e651a8742e0316cad5efc93739393e3603446b5c920a206db1434adbb8ebde4d1a7a8699c7f6c61b2d57c9709b564338423b4f526d6c157647a6c45da9dd521061f05":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e35dcea17cbf391491ae5ba6056d0dd13b348183474dd4b614742751bdebfc32":"5213542beb044910d7fdeec8bb89de93f350760e493286eaef1140485380d429f74a4279c1842a5c64f3ca3381cb5dbb0621de48821bded650cb59703e0ca88f4e9c3d15875f9dc87d85ba7e4bae9986ef8c203fce6f0ce52c28e3a93befb4cc4ba3d963d2283cd30f9bf6ab99d92f2f4f3aff0b022f1751b89d43ea10bbb28a":"fa549b33b5a43d85f012929a4816297a":"":96:"afa61e843cee615c97de42a7":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"844c50ddc0ac1d9364b21003287d6ae6360d12bbb17a85351362420ee4ca588e":"3a3bf4ccaf05f7c02f5e158dd2c5cb08c6aed4b1ba404a6d8ef9a0737fe2f350b3e22188fc330ea63e35df82f996e3cf94d331c4246cdb25bb2c409762e05ddc21f337edee51b64f1766ad18f520b3f34735b24278d9d647c533a743e0c1e9c81e9dee975cdc47e8582113fd250ef59353605b64acb7c025a97854c1a5c03237":"2f8512bb7e214db774a217a4615139e1":"":96:"f1da1cebe00d80eb4e025feb":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2aae1aa047a20ed2d6d8336d923864cee9404f924031ae327fbfe2d293e1d93c":"8e5b6b9e4e7d01de9a919dd33c0c1eb94dcfebf28847c754c62c1c00642d9e96f15b5d28ad103ff6969be750aadfd02fc146935562c83ec459a932a2fd5fda32eb851e6cff33335abd5c2434ae4f5524d6bc74a38094ced360f4606a1a17096ff06604952c8ca94a9a6dc4a251e13b0e0c54bd8a6dff5f397a1eb1cf186fa518":"3da9af3567d70553ca3a9636f0b26470":"":96:"e1026b3d15d261b2fb47632e":"58c52ea9f3b162511160eed1a68b6f52b3c4f5834af728de97a3d9e4ba337b29aad12636003cf5be9ffbeae0f383f7cf32f645a8f6fc5cdc1cde91c625c69a92bc434ed671e52a0044a48f3fce55cae49a7d065c2a72603a7efe58b5a7b18ac500d1a51420e820357e7a439b1c02198ebe3d4e62d5573a3aa5f40900a21e3b41":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f3d69208cb0d27474e9a231cd46eac7c1574fff950c48bbd1ba03fad16f563df":"0d1f06eef5e8f2c81d1a73bb1dca93c22cfb6e40e9948bc75b0d84830fb9216330424f580b89050c3fb3f620eca8f9fd09fb86d2e8b3a0869c6022d8a705fc280d66fd16d3aba7395d6be4bed44145d51d42d56285f3675726d62d94c081364a6d440511de83a613c598b03078e2ec7648c6302defbbea66aafd33e1a4b1686c":"b957f05921d21f2192f587768dc12b4f":"":64:"322374fbb192abbc":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cb2cdeb17fa6bcb006c7fc60858a12a411804464458db351957e8caf42f1ee6c":"296504131354b2c1928982f12d408ba2377f2d4bbe87e4c69f92a15bf6003910a43bda6c8929df66b3ab1d202a5258cad199f32f36cc30d2dc06199c2a52f7ccadad1fce50123c5f8434dec57cc60cc780263d7aace8f59cc8a6c54bddbaded3adb12ae2ee0bacf6a8da635ff85b51a4e8a1b3dc404863b90059de4ad0f158dd":"31bd7c971a6d330b566567ab19590545":"":64:"efc5a1acf433aaa3":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f94170790fadab3240df568197f9d6f6855afaed8d07eceeaa2380121872529f":"ed231b78db082f652bc6310c396993b52de804a82464fa3fac602a1286535f59c67fc2b1b420c7321eb42b971edde24cd4cb9e75c843f2ac6fb8ecdad612d2e5049cf39327aa7a8d43ec821161c385f3fdc92284a764a5d1cbae886f07f93017f83a105bb7c3cc4fc51e2781516a2471b65c940ddae6b550ad37b35f53d7cc64":"2f9c0647a4af7f61ced45f28d45c43f1":"":64:"ab74877a0b223e1c":"1cb5ed0c10cee98ff8ecfa5a1b6592391bbd9f9b1dc1ff351e0af23920d546b5e27d62b94daabd32f7f96a2632dc9fd7c19bf55f3b9b7cd492e76f4d6b0f5b437c155c14a75e65bfc4120bef186da05e06a2fd3696f210292ee422ddbce6e63d99ee766b68363139438733c5e567177f72e52ef2df6a7dd33fc0376d12ec3005":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"797c0091ff8787fe7cd0427c02922620e7f6fb71c52ddcc03a9f25c89ba33490":"2d3efc8900315c3691a8e3c9de3319d4deaf538fcf41aa0e295b861d0ac85baf56d149a6437747dd6976f44016e012b88de542fb8e5b9e4ad10c19deec4b7c0b69bc1b2e33d44a981ded66127dea354b072010b8dc24b85ed2ffeea3b9c0e931619dbbf22677691f0d54fc03eaa162e0ab0d760ad41021f67057c0d6ac19ca8f":"69d81c73008a6827a692fa636fbab8bb":"":32:"be2dda5c":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"90ce1afb5500489b9edbad987f4009509c847b3e55cdf0c764ef2fb085e3d033":"98482b54edce2bac1cd64d44917dcf117ebfbfe26ad17a9b263447028304f1cf5a69559c05b5d833420f4fddb6e308277d01eb4b3235f1c4b47d33d3899325b55e7be19d43187a5b1b1354ce02a529b3df1c13b4883902ae9fc565079dee825e705f3e580371e4fd86c3b0d31bae98adb529901f346ca07127314152b4370edd":"e119e166471ecf44bc3a070639619931":"":32:"b2f54b3a":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"29264a90f114a800c0fc3247b3bda00981a12a8f85cf3a19ea4c7ffdd005f4bb":"587c8e53ab5ae8c31e16160b4a41d88798e27f4ad61c573c023c62d4dbb3952eef5026ad7b453fa9e0694347ab8fe50a6cf20da566202b81e325cee9c07ab2d4d53ed45b3ec2d2135936515f8a24f2a8116807dce9df3c44edf64c32647145152ff241d9e018e4101e400af070192dc3b498b5a213d265b4cfc8c8d4d7deccb5":"cf296aa43cb7b328e09c8975e067404e":"":32:"56015c1e":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"84ff9a8772815b929d55f6052c0354cf3e02bcc8336fcfe5794952b4c45d5d96":"a87de56d49725a1625baf12fd15931fe1a6783dce5d1e744eba108f45e0c105d8141dc027d0e33ad7efb6752b43729715e2f3e2c42ebdab4d5f72f886bd821c4372244699ddded99a63dbe7763a5a3bc21cbfc253cdc2514eba2a4f54e24dca7c207cb3f6ae80153d77fe0641f357d5a073dcd425c38deb77c45f27427345516":"5c044a66e488b853baf479f7dee2aadb":"00304e3d40cbc6d2bee0778462884f4ec047a8c74bb3dd7e100f2b9d0e529fd24730063986117b56ca876b208a3691425ac63afc3d504ccb499c76622eade09717023fcb7d956b01ce24a3e53cb5da472be3fcf5b278b5d9e377de22fab75bc74afa9670f5fe9691aa0ed77e43f6abc67a61ec409ec39fd66ac0307bf195f36f":128:"72ddd9966ede9b684bc981cbb2113313":"aadb8537309940422f67ca393aa6182d67fe7c52092538a15e98a4254f0a9087c7f10903d5e78078c2e55de914dec8b6b35cb720e3e55963c0ac9901e44b83a0e7c5b2d3f002aec0a4a08354febe47b2abb955f2a21107626ef0b8e1e099650812a6fecf36908fce2d078c2735cf7c2b970a309e5c6d6ff29c26a05720c57105":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b5ca3991d0160b1729ae1a622dcf4b03b1f4ba86150bd66bf35cbbee9258af10":"62aad5854a238f096bdde0711ac6f5763e7fea29db068ea8c911f17ba91e6d7807883e6fc5ba7db17af33da2b00973008a3425e65cc786ce1b97360019ee2cef74563d54752be436b905705b507c3d62689df4edf0356d26b693eb43d8a2a927a9f3866b7e0e19e84a90447bd6f47e31070fa7c2a71e3f78229ee19fa47e848f":"f8402184d1cc36df07b68ecb1ab42047":"d378cfd29758bcbd21e26a324239c42c992941b3ad68d9f2b3d2def3a051fd172ee882562970ef59798ff8d9eb5f724ff17626156f4cf5d93e41ffef6e525919af6194ea9bbb58c67563d3ffd90e5a6e2a3a33bd1fa3d55eff5dba7cd439d571f7e08014c4780e3d10904ef22b660897e78258da20b2600e88d71c35ecb6329a":128:"9e8b59b4971130557aa84ec3ac7e4133":"556dd32edc0af3c64186fe8c000ddad1516cd14721c93c228e379d4f87e32c79e734539cec930322048f34a2b34931c585d44f09966caf187ec4b9244c991a8a5f263e9da1d08d6086e52535afdb36c7662307521cbceb9ecb470a76970243723fbc1613b6ebbcae261ac2f1936e66ce29ec7350b2e6b2f73a910ade645154f7":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"df867d1dd8a287821a54479cab6f88636d2aca30e1bf01a5dffc735e17590356":"6517272cac85d7f38902bcb4b96a0c59c4bdc46bfefa6ebacd7f2fb1629b87ca91de2ffefc42ce3cfd34dcbf01b3f7cadcea3f99e6addf35d36c51f2ceb1f85c1f56a04ec9c9fff60cd7fc238674992183ea3de72ef778561b906202b7b83fe6562a0bca9c1e0a18638e8685b998b4192f5120435809ad6e93a0422d00725262":"35019826c51dd1ef07ff915d9ac4ea96":"0375ed93f287eefe414ab2968844bd10148860c528dbf571a77aa74f98cc669a7fc317adc9f7cf2d80dda29b19db635b30a044399f3665b6176ed669146d28f5ada03b3d32d53fe46575a8afcd37f20386d9e36f7e090b4fefadfab7f008e02f1b5022c0eeb81d03443a276eae48c038ed173631687d2450b913b02c97243edb":128:"e49beb083a9b008ae97a17e3825692f0":"723be39bc13adbc48c861b07753f64fac1ae28fc8933acba888b6538721df0a8b91c040a26522fe0dbb7335d8f63d209e89f7cde23afa9ca3c584b336d63a91e07fdd8808b14c3214c96a202e665bbaaa34248ff30348f3d79c9f16e66ad6c5903305acd887a89b6244eb7c2d96e18b13a686de935bf3821444ee20f48678be5":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0e8e9ce6294b7fbc534a96bdd060120976a6e08315d2ea73ac61d085cd462a44":"9855f186b51358f0e2111c06bfaaeaec9bf95c55e246375c614fad9883d86c82a20c86538dc5f42a0ea69677d59a20c5112d15d2a8396f12096242ad5d7b838d16ee0679fc4017af75bc15e8ad2f77b0e802c864031cbfb0bacd95c828d1db4b7bab0713619e9e5e8fe6902aac7a9e6c42eb05f5b156f7e663ee43e6fdb62480":"4edc6be20f904b4789e5bee0a80a3fc8":"db28ce076b360816cd1e04b7729f8ab080e0a07f35204350f3bd056945aab8638c0e8311ab056f3e5debdbfbb03fae700770264faf73e0f3a05a5812aee84ab613c82f4a76da276250675f6a663f85e2c26d4f4a8666a7f4cedaffc1a7218dec11ca4e72b8b5d5b620d1efbd3d3b94a5ae0d118b9860dfd543b04c78d13a94c3":120:"03cfe6c36c3f54b3188a6ef3866b84":"e10142f852a0d680c983aad2b4609ccbd35ff61bb3eb66442aee6e01d4cc1cd70f45210acbd506395d6ca0cfebc195a196c94b94fc2afb9ffa3b1714653e07e048804746955e2070e1e96bff58f9bc56f3862aaa5fe23a6a57b5e764666ddec9e3e5a6af063f2c150889268619d0128b3b5562d27070e58e41aadd471d92d07e":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"886c77b80f5f3a21c01932685a540b23629f6d41d5574fc527227ed0bdf2e21b":"53a17d7b69f607f08676d6f6dd4e8db08e01333a8355d8c87616e84cdf10ef5b041fc6ddc3f6a245c0f534c2b167064af82f45e4702a5e8dede59579fdecf6713353392433950c9b97c38d9ee515ac97d0970ccf03981954540088567a30941bb2cca08cbed680500f8342faa7aebbc6c143e2ea57ba6b4ac1fd975dcc5d0871":"5ec506edb1890a5a63b464490450d419":"05b8d820c9f439d7aeae5c7da0ee25fb0dad47cc3e6f3a47e8b984e856201546975f8214531fc3c2e504d2ac10fa49cb948596b9a8fab01b95c49d6f04d1589f93b77b899e803dd20e1f00a51c0b5953e85be639109b14b100e35ca26d84ea629964b0db8260dfa5a150a66261bf37e79de2ec49e9f1b082a7c58ecd3d39b6c9":120:"ffdf56e1c1a7252b88422787536484":"79ee27adfa9698a97d217c5010ec807806feda37db811e398c3b82abf698aece08561fffc6c601d2691738e279eeb57e5804e1405a9913830e3ba0d7b979213ef40d733a19497d4bb1b8b2c609a8f904e29771fa230c39a48ebb8c3376f07c8013fff6e34f10fe53988a6ec87a9296c0a7cfba769adefe599ec6671012965973":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5231ca6d772edd9ea2d251e22d7d455928c22474b4b44130dad57e6511fed6ee":"2767c808410ee132291585ea74a48ad3102f883f07d060c91c5f10abd37fe0996d2210dc490260238ae15f5d74c7be2a1e15d80db09079c520047f88488a7802857a3fc3b81d85a96949997430a880177880a31d4d0c9c9045247804f057a4f2756d6e40375a4a3187c4376d6bf573ce334cda1ed88d8a50db499e7cdb89d8db":"048698a4a0feabc1f336112e2794795a":"3a81b6b0b722899ff931cb73c39222d555b83ae3f8880b982593cbc1ab8be90d1ee32fd7dfe697cf24c95b7309d82c3fed3aa6b3d5740cc86a28174ac8f17d860ebb251ac0d71751c2ff47b48bfb0b3beb4f51494464cda34feaecddb1dbbe5fa36c681ada0787d6ed728afc4008b95929a1905787917adc95f1034fedcd817a":120:"ba61edeb7b8966188854fc7926aad2":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5a3f516a7898e04e5da4efd6c7c5989b77552d195464620c2b35b9a4fda29cce":"5cc28b61ae97557774bdcd7ff653f4aa349df68d53c7e5a65263883ef1fe224ad40e86bffc2d38f28a2ed9ae1fc08563e2a1e46246106546eb8e6064c06baa0046fa137421734b7f0f94656a4f459d9d981717557d843700d116b6e5e2dd3af5f67c34edf31b40b71fd3c6f2475f9310feb70bcb973be52d41e86792c49d54c0":"9310af6974890c0a0364231f9cc8103d":"2103af8356bcb9dfc2a4f1d4ed09cbcd8e1990d23865605e19f87feb50bf8d10d0257740e5557a9297f0499c01e29a1a513ca18e6f43f7406c865cbe3951a7771128f3110c8da3bd696368901944549552842a1f6fd96cc681b45da098f3c1acb3d237d2363285f520d0b6714b698790b7660c52ac84a42c9721ac7e9d38a2ef":112:"993fc8e7176557ee9eb8dd944691":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"59c9258554363d8a885fc0f5d112fee08eadfc7ce52a0e7e73e3d0d41d9a0290":"79c491411402ea7878e480519fd984dde44bce6459303bb76d4eaf97d4e345d1aafaa68ceb0590b41cfed0f411b675d9344c7e888cccfc9eb6fe6b229d198f94ba516ee850ee7f078a4f5f32a23f92f72264e3a76a31ebd042564315ac4f2ec0bb49ba6d08cfd2d3a6308688e39f28e3ecd669c588368cee8210edf5dbefb925":"77e51e89dc47bbcac79cca21e81a61de":"25a6f8800a9b914c0ebf9a45d72355c03ee72a138eb81b2980f332645ce1d7aa4659805821866aee2b276e2c032776b4eaf36f93b5f9a72b791be24e31eff105ca6d0700e3069ee327983dd7fe1c7465d6c6d77837aff69055149988e7199847fad98605c377d997dbd40f3e2ff1a4f978a493684e401249e69540fbde96323c":112:"ee6d85d3f3703b45adb4f9b2f155":"44ca68deed5478074adfddc97f06f44c08bf7bca4dee8707d621fc7396fe2efcdad0a167d1708a9ff59ce4cddb86920bf1dbdf41b2109a1815ffc4e596787319114cad8adab46cf7f080c9ef20bcf67a8441ba55eac449f979280319524c74cf247818a8c5478ea6f6770996026a43781285dd89c36212050afc88faa56135fb":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5e9eae594cb54c8089330e4404ff79abb1c0841b0be5347a14633ad1e1ff44fa":"32abc1eb6077555a85a0a6fd1c78cccca6c8b375842e2eb8eee45ee6c38dc0837443d16c647252e8124639dd01c808ac5e857a25d927c2a75e2fa8955cad5beb5c206fc050cd933fc4621f5718936f01f39dd700ae1aee7537cc595df8789c5d1a6e1e87b1c7a60e3ce5d57c80dd65dee3801798e1481b1963bcc78cc69f8c50":"0917b486da754f48bb43ecc8766a7ce3":"2aa1ef2f91aeba5da10b48a882dbd4574df4e9157a18abf8cecd03e4176712ba171b6ecb0e745841ff84e35063e47b08101afc44cfd9cededb913a82f00b9d4bac922f23a22f200642270399896405d00fa5271718eefb4cd5fe7e5f32097766ebff36ff1898a1c8a1a01cc18e6121e470805c37ff298fc65ef2fb1b336d09fd":112:"92282b022e393924ab9c65b258c2":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"aaf03c3055a35362212b9b059931e7a24fc71e32bc9a533428c9dc31077f2ebc":"c0e12cdd8233878505e025d52427536be7b6bf1887d2dd20eac7092db80b22417a3a4ca83cdf5bc5e36161be1ff9b73f7ceb297c6d07c9cb2a75035a5dc079e48283daea60596f4b356ca28c243e628cbe459f069709fe193394c9b1a31d8ccc5a3a4eba30056c415e68571a2c34bb5c32efff12e9aa483c4a68be5e76aba4cd":"7dfccd077b29e6ed5720244bb76bde9f":"21edd1c6056f51fd5f314e5c26728182edcd9df92877f30498949098dcde8089eed84e76d774ef8874d77125669a302d268b99dcd66b349d0271dde6f8cc94dc4f2df3787887b1173cad94d067e346846befb108005387102854d9387d2c0fbc9636cdf73a10d145f4b612c201b46e1ff4465f6a7654ce3da5792daf9a27fb35":104:"6154c6799ad7cdc2d89801943a":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"60c775971a9eac7950ed2bdd85bd60fe948ba04c419f6743fb67f37557e46c6e":"8abb2e66a4d08074916056bb8e925551372f737f0e1b597c5d08ee102989743a273b29d7281013f8b3aee2934399cb427370d70370ee86eb41584b653660c633506a53cae747826bb7d93909f069d5aacf058b7f2bbdc58ea08653db857bda83a979fc22a4f126dfef7aac45177f4cdb802fab0c812fb35d12a8176ec21336d7":"9b92ad7079b0de09c94091386577338b":"1f6a84b0df75bd99a2a64849e9686957c6a60932ebe898d033128be9b757e9890225925d856bfdc33ff514c63145f357730bb0435c65342bc5e025267b410af6fd388a5eca01b7efc87fd3b1b791df791bd47dfab736350d7b7f368b4100e04c939d5af957bab95ed502dac904e969876674602a0f0790da2d7351b686e46590":104:"1d6cd4ab3914e109f22668867f":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3b426e449337a14bc0663246ab61b671b523c9a3130c21ed59c93fa6a5aa5ae3":"291bd5a00d71eb7d547b7c94e7030ba4a947418eaeb378a3bacd304b08c6f92f6958eaba968ac6aa23e0512a2a8ad7c1ca2f8fcf623bfc1281f5b7b598c08d2aebcd447668b23238c5e338b4c2ac7f8fd381714c596ea3e0c17aca4317a08563e58f0f52a8af08e078dc242ae54ee0fe3869f8c9687b004a4ded0aa27d8f4c5d":"e6efc96acd105fe4a48d1ac931eea096":"0902cf7a0685444126369712ac47962bc2f7a3a5837f1b6190d9ab1adb4cd35e7f0892eee628b8e07fcf2b598cebe1ec07d8c4823172ae66a135bb51cc71590707b691a66b56af1ffe38772911d11685da355728eaddd83752d21c119d7b59f4c17c2403629fa55cd70cd331aed7b0de673c85f25c2e9e0267f53f0b7480c8ca":104:"ca4bfeedcd19d301d3f08cb729":"bcef3f2fd101b828d36cb38530cf9a0a7a285ac1c55ee1069cc78466327e85887534c98a8891d579effd832c0f7d6e7e822fb1eea85a39317a547591def4aeed6660872859fc9d1df9725d3c40e9ccaa900e0f1426a55d20ac4f2e8e07bd3bbc687f8e059ab93e7604c97e75ac94be1c8c24f4c4da0080a4d77953fb090cbb62":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ceaf204ff504ea8e7fade1a2097f2b527a44766860447322fa5ad346cd810217":"1c8e4cf6018211518494d46c2e0607fa42e236abc28d58f8175c530f84b1f030572f5f6a74cb5517e1fb999a637d352afcbeadea9121e695675859b66b499a3a351ecba5226e58ebbb59fe12e359e4c89cd51c8703d4643c49921ae495801c73627df404b91e828e1d0e03ae09a39defb5aa5f2c8106953772ba0713d3261329":"cfdb8183251f4b61c64e73243594fdc6":"a60f3969fd1b14793dd1425aa0b1f742a4861e0b50eaffd1525cd209ba6d1252176763bb5bee59aaa55f92341cdc0705899aba44cf0ec05cbf80274ebef65cd9507fd4224b25cac19610968d6a37e2daf9ddf046ef158ef512401f8fd0e4f95662eebdee09dd4a7894cc8c409be086d41280bd78d6bc04c35a4e8cd3a2e83be3":96:"9e45029f4f13a4767ee05cec":"5cdc66b587ed5eebb04f42b83a6ab7017093514881c598cce332d74fa3fab927493ac15bff26835296e080b5b45ef907c0529fc2f4ed2fc09db179ef598e5d193ea60c301d3f8d823404814e3e74de0e1d2417c963e9246c353201c7a42659d447376e7d05c579dd4c3ae51c2436407b8eff16ec31f592f04b8013efcfd0f367":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"15652abe38cd09777bba21d0db04637f5737d3cb3922181b9f2d07bfdafd327a":"1d6c153dec3b4738a09c9fbdfe31a093eb7ea79b8fa49f83e5e1f46893590f074fb171fb66e30ef887767014e3a10a3aa05da2bd50dd7b7936e1d7f6f31af9030e31e76bdf147f4396464db0f6a72511c4885c6c2305d339906e3c761a3249d7ebea3bf463e8b79c3706e684575550e964b8047979f7aed6ea05056c4b5840b1":"3a5e0d223ae981efb405566264e3e776":"cd755437cb61b539908e0cfaaa36c0123f8f17d1e6539783cb61d4b56cac3bc1e971c1ea558b12669b025cb6b9ad55991c6e2f8ee8b0b7901790193e226a0fbbfff7ff0bee6a554660b9f32e061b6c04bf048484ff9ebd492f7e50e744edd72d02c8fd32f87f9421bf18a5a20ebb4d9dbe39a13c34b7296232470e8be587ba09":96:"01a573d8e99c884563310954":"162430c23f7adcf98575a2d9249b4b5cec42efae33776360ebfa6a19c8eee4bd6b07cbd274deadc3292b7cdbb7803e99d9f67ccc5077f3ad5808f339a05b3213dbfd11377673d4f9b486a67a72a9ac8ea9ba699861dce0de7e2fd83d3ba2a2ec7fabf18b95a2bbe2184ff7bddd63111b560b3afe7f2c76807614ba36c1b011fb":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a43f6d07042a15cd49f6f52a2a3a67c6c2ff420d95bb94b9fe03b287c3abcaf8":"b67e58c8b608724fd20aa097ee483bc4c804490cc79de635170944af75c87ae0ad8261365c1dc80d852553bcba18da9fbc3fbe61d27550a03003ef0c60202054626655509a9e1ab54677e537a4e761df011d6c6dd041c795446b384161ae9eab441afd24d19b58eb4fe5116cd7b11b751ebbd0a2adba7afc380d9d775177099a":"3b6fad21f0034bba8b1f7a344edf7a3c":"2e01c0523c8293fc51388281dccdb8d0a2d215d729289deb327b8142d716c2bb849e9476545b82f3882ba7961b70c5da2a925ba18b6b121e9215d52ac479c9129c9cd28f81584ff84509d5f9dcb7eaae66911b303cc388efa5020ac26a9cd9ea953f61992a306eb4b35bcd8447eea63cef37bb0c95c1e37811115cf26c53e8c5":96:"43470bc3d7c573cb3a5230f5":"e1720d451fa7ab9db4988567187244b15b6fe795dd4fef579fb72e41b21aaa436d2e5d8735a4abd232a3fb9188c75c247f6034cdebb07fd7f260f8e54efefa4f2981cafa510dd5c482a27753a7c015b3cae1c18c7c99a6d6daa4781b80f18bbe6620bfc1518a32531017a1a52aadb96a7794887c11ad6bdd68187ba14f72a4b5":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1f0f0191e18db07c0501dbab4ed952c5603a4cd249d2d8d17e62e10b96ae713f":"aad40e7866c26e486b6f6e8eb14a130d5f88891bf0d09aa8fe32f447ab8dea7bee5d3eda4499c0103a010483f2b64fdf1155499d31decf528c77dd7627884f9995c213cf7402143dbb7561d69c86886734260ac94ffac7eb33598d25714228ef43f744ec1af2a87e789f1e5d6fff0fbd5082dcc49328f194e8f8a14a5bfc962d":"ab8be16b4db809c81be4684b726c05ab":"a5a6e828352a44bd438ad58de80011be0408d410f6e762e3145f8b264a70c593476b41bb87875746c97de7d5fab120bd2f716b37c343608ee48d197a46c7546fafcdbe3e7688b7e9d2f5b6319c91d3881d804546b5f3dbe480996968dd046f406c11f0dc671be0421cbc8b4ea6811dd504281518bb96148dddf9f0dc4e2e2436":64:"d8bd7d8773893519":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a6cf7d83137f57f2310ee6bf31e8883952bb07ccdc12f516233ed533ea967e5d":"83ab20698fd7573fd121976a72b45a7f03aad84702fc8ac73d6926eabd8a546895aeffe4ba81d117507e2cd37d58eeff71cc3afa8a4449be85f228ea52f6dc6395bb43c1c9f795343720841682d9b2f00602eafa4d4cbe297bfc62467e526b9d823cc8eeecd9e5f8dbc2f65610663c6f37b3d896651b254bd60215629ade3b2a":"f17e37e73a28c682366bfe619cc673bb":"0f4dd201b18e20230b6233e0d7add6f96537dd4e82d3d0704c047fab41af5faf6bd52bd14fa9a072f81d92a2ce04352f0b66f088c67102d2d127a9850b09ff6087f194a6e8ccaba24091feb303eebb65f1203b2d22af44e7be4de71f03e6f6cbadf28e15af58f58eb62e5bddfae06df773cc3f0942520de20078dda752e3270f":64:"74110471ccd75912":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b0c85ac6b3887639838ddca94c5c69f38115aa00122322c8114642d12ea1b8fe":"0210fce418e7e2199cb8f899c81b9be74a630d00269755f882fc4db27632e99685cc12c426a7503473646df1288d0ede28408be9add5713628700f8e2b2e27d7522520ed00ac47239084651eb99e7d03e1520aae137b768f3144232c16b72158fd5da4a26a2525b9b27791bf06d1eb2e671c54daf64fddc1420bc2a30a324ba5":"14f68e533ecf02bceb9a504d452e78c7":"796a46236fd0ff6572b1d6257c874038f870aa71cbb06b39046d0fb6489d6ae8622b5154292ae5c4e1d5ff706daedb2e812533ae3a635d339a7fbe53780e3e8204924a5deb4b6856618f4c7465d125a3edffe1ab8f88b31d49537791c0f3171f08dbb5ed1d9ed863dafbae4ecb46824a4922862fe0954ee2caa09ab0e77ed8fc":64:"6fb0b5c83b5212bf":"5e6c362f7587936bcb306673713a6f1fb080783a20e9bbb906456973e529cfa0298206184509c30e1d3793eaaa5d564edd4488f04311821eb652e0a1f4adaf6971505ca014788c8ce085ceb3523d70284ed2bb0aebeba7af83d484df69c87f55a93b3d87baa43bd301c4e55eb8c45dcf3e4612535ea1bd5fdb4c3b9056d0cae9":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e61b1a6b40e2ab1245ff65dcfb9948318ac4fe55e9ed600cec301dae32ae0e93":"8d67fa9fcf078e421cb63abeb25dba739ab0e09a091dd06b0c616e1e888f350edb2d73a42f57f115266ea20c7f8fc143ac746649612df06a5e29b4a15934dc049be1ab49d018ab86c4f37d8c3d9c714f038029e74d8ee3dbe61d81adc63712ea413b37f7604da12107aa1695d9b0981e5a92cdfaa5fbda0e31b22c6fd6f3b499":"c356244b3034d288e4d4fe901b8e27c1":"bdcfeb09d5b97bab05a7acd9849e7de2c5beb7a4dc573c7e1c1d0c0409245a6584023114fdcc6413c800ca16847bde750b27c4d590248e2ce457c19b0f614f6aff4d78d4a19b3251531e5e852fbb05d09412cc1ff8988d1955ca6f5fe2d820f20a7642e3ae69e8122b06ba0918e806400b9b615e1abe6fdd4f56a7d02d649083":32:"86acc02f":"7c73182eca97d9617abb478a6ce62e3491a7e9951981c89c3071b161a4c80440614c3f24d0155073e28dcccee96bc8303dab4901ef77318df522d16d9da47770ef022395d6104cd623d93d67090a27507fc8ca04157e7939e639c62cd0e7d8a472314833c0eaa9ba2fd54a25b02854e3bff25cccd638885c082374ae520ed392":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4f5a02e9843d28c8c226ed70d44b8fced8fb757ab6ece4d4f06e3c3cec79e44f":"3ec13950d329f24074714c583bdc35686b811f775b76b0a8fcfa66fc56426c9d022f8ab0af38f8d2f71a068548330cdbe891670181ed7491bf40c739ef4dd93689fd35929b225089d2b151f83d9b3cd767300611144586767354c0491112c205409f3168092d27f9b9f433afb79820a2811984d48e70c1fb2a13bbb3ddbc53fb":"099e5d9aae89fb6391a18adf844a758e":"ad93e8662c3196e48cfdb5aa3bc923cd204151aa980cbec78f0d592b701f779c1c49f9e8686d7e2385a4146b21a643a59c18c8b82214f42560bcd686fad7c7c8e8c1944ce6b20ec9537dd14b6cf2592740ca112f4cd582250d69f240d3e957040e1f7e19c60b3c8f2bd00cb666604c38946eb9b2f17336d281b4794f71e538a2":32:"30298885":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1cdb218e0bd0e02156e5b48182990f778889793ef6018a8928e61164ac047c8e":"4d039618a0eb640329f90fe97de18bc928fc3fc7a0db42c97774bec2e882e872fc1097c8319f7837a16516bf387b1bae321c565e8fc1cb8480f051158e4685f0adba310d2c6253bc1300403cbd3f7ddcb2796a69f8bf9e73d47aada9a02673c1a3d5ecdac838abf22b385906236529a1b7dd5b8af2611a04cf4f83b15ba41cfc":"d2ffbb176f86bee958e08e5c7c6357c7":"bc580c4223f34e4f867d97febf9b03629d1c00c73df94436852cafd1408c945c5474c554cb0faf2bae35d3160c823d339a64ebd607cf765fa91f416fc6db042bc2bd7445c129b4a0e04b6f92a7b7b669eb70be9f9b2569e774db7cb7ae83943e3a12d29221356e08e5bf1b09e65f193d00d9fe89f82b84b3b8b062e649163dc8":32:"1997daa9":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"dc1a145c18bdbca760f35eea0d4a5992de04a0615964ec8b419c8288ab1470f0":"":"7f8368254955e1b6d55b5c64458f3e66":"":128:"8ddaa2c3ed09d53731834fa932d9d3af":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7b4766d3a6615ee58b390daa228ae7a541c46ce80a1efe227cc43cb777df3232":"":"274367f31ec16601fe87a8e35b7a22dd":"":128:"5f3a757b596e06e9b246ed9bac9397f9":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d19b04055bf6e7ff82e89daef66c9d8319ab25f9197e559444c5729b92c4f338":"":"796efaff4f172bef78453d36a237cd36":"":128:"3b445f38bf4db94f1a9ec771173a29e8":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7ca68e300534a90a7a87ca9906e4ac614a6aa51f769b6e6129753a4f83d10317":"":"45e6b23f8b3feefd4b0ea06880b2c324":"":120:"6c0a1c9c2cf5a40407bfa1d5958612":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a2b7cd693239bbc93599d3d12c9876e7303b227b8ae718e2c62e689e1fd62903":"":"548c9c8fcc16416a9d2b35c29f0dacb3":"":120:"3aa21f221266e7773eeba4440d1d01":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"156b854beb0c276a5e724f5da72f0d1ca4ae7cbd5f93a2257d95c2e5bfd78ad4":"":"a5129e2530f47bcad42fc5774ee09fe7":"":120:"6bb09ed183527c5d5ed46f568af35f":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d824330c60141264e1f709d63227a9a731bcc42b4adec1d8f0161b10b4fdb2ab":"":"c5afaa45312c64ab3c3cf9d6c4e0cc47":"":112:"55952a01eee29d8a1734bbdf3f8f":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b5517589948d8aea778df6fd66c17a170d327f69e504f0a4bd504c4286a9f578":"":"6404b111c6289eefa0d88ed6117bb730":"":112:"637f82e592831531a8e877adfc2c":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"f6137b2bcbd327fbcc7f313efa10f6ffaed30e4782e222e1225c87103fcae905":"":"3b87b08337a82272b192bd067e3245ec":"":112:"1f2dda372f20ffddd9dd4810e05f":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b5e70d1b78e931abf44bba3f937dbc344858516a8a8afe605818dc67d0c3e4c4":"":"58e70095c6f3a0cda2cdc7775e2f383d":"":104:"1763573f7dab8b46bc177e6147":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"90de0c047d1dd01d521f2dedec7eb81bc0ace7a5a693a7869eaafbb6e725ad7b":"":"d565c9cdfb5d0a25c4083b51729626bd":"":104:"78738d3e9f5e00b49635ac9a2d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c43e8dbeafb079692483a9fcbab964b76fccca6ca99e1388a1aa9bf78dfd2f02":"":"f2bd4fe0d30c0e8d429cac90c8a7b1c8":"":104:"ea7b52490943380ccc902ca5ae":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"13540919fdb95559e37b535a427efeee334309e34c4608459e204d931b8087e7":"":"c993c1802df0f075ce92963eb9bff9bd":"":96:"edfab013213591beb53e6419":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2a7b2e07c148ff0f627ae28c241a395876bbed0c20f3fd637330e986db025714":"":"8f7e1621c2227839da4ea60548290ffa":"":96:"f9da62f59c080160ec30b43d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b3e7837a75b38ae6d4299a1ae4af3c2460dfca558708de0874d6b1a5689b8360":"":"05d363b2452beff4b47afb052ac3c973":"":96:"6b4a16d1ea1c21b22bdcb235":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9df3ccd95f7570f6ecf5e5329dcb79bcd46cbcf083fe03aa8f5bd0f645c6a607":"":"774f4e70a7577b5101c0c3d019655d3e":"":64:"98ff89a8e28c03fd":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1c7123e2e8d3774c8f1bdbb2272f19129e04f29b4351ae19c3b9d24e6ea1fe87":"":"99f25cebd6cfa7f41390b42df6a65f48":"":64:"8e14a0a4853a156a":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"490090323e9257517e2453469caa3414045cacb4d05d5cebc6b9c06fa6d19291":"":"c1beff1ff6cdd62339aa21149c4da1e6":"":64:"f998d7c08d609b3a":"":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"360e48dd38d9e7f5bf29a2994ab5b3c9c70247102d94049ae791850807a4c845":"":"88126c350dfc079c569210ee44a0e31a":"":32:"f2ebe5e4":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1562b32e4dd843edaf4474b62cadd8f46d50461f5b22c9f1a8eae7367d35d71b":"":"af29fdb96f726c76f76c473c873b9e08":"":32:"13fd6dfd":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d5160d0c98ffcb1c26aad755f67589000e2bb25fa940e6b1d81d780f421353d9":"":"1552604763453b48a57cea1aed8113f4":"":32:"660c5175":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c3a3ea3a097c0c2b3a4cb78462d87fd5a8f348687c4150e9d3354b388ab13d17":"":"f77945979241fb3a454d8e3da193e169":"a69bac31241a2c07d3f7e331b77f662b1e67ccb81c07f52578b01f5785de9437f02eb7627ca7b9af09c1cb428fe93d6deb31f4d6dd2f0729f87480bdeb92d985de1aaad4bcebc6fbad83bede9a5dd1ca6a15bf5d8a96d4edb5bee1f7d195e9b2e5fb2221a596d69f257c18a143eda870e22d3f2ed20c9b3b0d8c8a229c462fff":128:"6b4b1a84f49befe3897d59ce85598a9f":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e1626327d987342cba5c8c63b75b4ed65463a2b9c831f4f9f80325fa867d1d73":"":"4e25800deab7ecec2a2311f8fb44eb7d":"ebaffd558f24dae03117c69ac4b2b4aaeaffe7e0e7599eaba678bfce23a9914dc9f80b69f4a1c837a5544cba08064a8f924064cba4d783623600d8b61837a08b4e0d4eb9218c29bc3edb8dd0e78c1534ab52331f949b09b25fbf73bece7054179817bc15b4e869c5df1af569c2b19cb6d060855be9a15f2cf497c168c4e683f2":128:"8faa0ffb91311a1a2827b86fec01788d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"938da64b837275b0c80c442bdf2301aa75e387fe65a775d10a8ec840f62ff429":"":"dec6adeb60216cbb8a6c3afba49fa201":"4ac144bd95f405649444f01ab67ef3e4c0a54fdbd933b6ba00518c79db45c22c90030c45aadcfdb53ec8199be0cbb22dbb9ab938a871f4b3b0c98ed32590a051abb946c42726b3e9701f183b2092985e3457943a6350fbcaece2e6b111b179ea3fd10ac080a577a1481785111d5f294bc28519c470ff94392a51a2c40a42d8b5":128:"2211ca91a809adb8cf55f001745c0563":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e2436484ea1f454d6451ad8dbd1574b208d7a3ab4fa34869299b85c24348b43d":"":"97040d2ec094fe1c64fa35b35b7451a7":"bc198677513ce0e66697dfe52b22315fa5d8f92042f34cc9f373a01f94607df1a599132f60af010ed9b5e52162dd7b162912b68b11700e08f5fdafd84d10f760fc05ec97c05b83e55155194f399594015b90a19c04fb992e228940fe1b54ba59c4bb8318b33cc0df1cb1d71c389473dfb3eefabfe269ca95db59a7bc0201c253":120:"2e080ba16011e22a779da1922345c2":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7fb3fc72eb8a3aa5b102f90039f852cc3fd64f46915f5e49f1d9e02fe9cc13b1":"":"f6120fea313362524917c53d90bafb4f":"60c2be7fbd15faf895fd19a9ce775fe2b183b45cffafe4fcbf50d421bea97347e41a9418cfa129b2dda63b889a70063010215dbe38c37feae18bc31b34f31b726f22177f2b4b9d648dd4aa80edfd12dafaee10baa83224354432d1cb62ccabe38bb8448d162cd0d30e988d2e1a2458ffdafaacbdff928756390f66dc60d7ea45":120:"83de3f521fcfdaff902386f359e683":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"697c96d80d0a3fa9af35b86f31fb71a17aed30ce841c79896bbc8863b3b3ee04":"":"3a5163ec7e007061838d755ac219855e":"de50c12da63232768d5eb9920d49683b5b7114cb77448fa10b9d63552ec5d9c2eac94b375d11f944959f903bb20c696639b6e7f108ec1e873870098c631ddacb2c25268cfc26d2a4cacfb7dda7383374c5456bcf4daa887a887f4293f8caa14419472a8bf7ffd214dfb2743091238b6d1142b116c2b9f4360c6fe0015cd7de81":120:"cd4542b26094a1c8e058648874f06f":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"66c1d9ce3feb0e966c33e3fd542ec11cc32f18c2514b953103d32abcdc72633a":"":"46fdb88fdde9b7d74e893802a0303256":"55d2f263d2e3cf0b390fce1dd1ebd5f666086f26e1ce2f08002bedbb810ada3922c6bfcf6a6adaa556e9e326c9766f02b3eb6e278da2fa3baa7dbdb6373be3c6ecfbe646b1a39e27c5a449db9b559e7ea3496366b8cdbca00ee7a3dea7fdfbea1665bbf58bd69bb961c33a0fd7d37b580b6a82804f394f9d5d4366772cee3115":112:"96ca402b16b0f2cd0cdff77935d3":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d7c949420dc9497232cd5810f316d11f9e85d36c430b5943ba79836d88c1eb92":"":"7ef9788ff09cbeedd9569d49083a4097":"ca1de5cc3fcde2638eb72210e551e9c0e0a3f5570d5be83a9a4406b545d854bf17e75b9cd0f4c45722fbd71319a317b72a8798485e9316a1c8102432b83bc95af42f6d50700ba68f6f2e19b6af609b73ad643dfa43da94be32cc09b024e087c120e4d2c20f96f8e9ddfe7eae186a540a22131cedfe556d1ebd9306684e345fd1":112:"8233588fca3ad1698d07b25fa3c4":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6fe7c70815aa12326cdcbb2d2d3e088bbaaef98b730f87fe8510b33d30e12afe":"":"e0253bd1f19e99a7f8848206fb8ac4a4":"397897eca4856f90d14c3cdfe1ad3cba47e23174ae2dab7d2a6320898584e03bffa3ffd526f416d7b3c579b0f3628744e36eebb5df519240c81d8bbbf5c5966519c5da083ab30a7aa42deae6180e517cdd764b7f77d19cc1a84141817758887a8d7265e7e62279b9d33cd2f1ba10fd54c6c96d4b8a5dbe2318fef629c8e2af0f":112:"477b0a884d788d1905646bd66084":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"cbeefb3817cb02d617f385cf2371d52c8bcbc29e5e7a55cd2da131ca184c6e89":"":"f74156d6400ae46b612531848bffe18f":"1abe2ab05ceccf2391273126fe4a4426b94d2c3b97a7f1cd2ee6bb952bf4a546e972b5a1701d5ddb0e5bb7a248fcb47107a9fc77e4b9806b68a11850119aa239fa8be1370e3a2e1a8b168f7323afdfc4b8917d92570167848a56132d68876abc386c258a9233dc8a9eb73443b052e842c3d63e8b5369acdd038404e4e9a4b038":104:"0cb67cec1820339fa0552702dd":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e6f5f65ce2fc8ec3f602f5df90eb7d506dd771337913680ac16bdcd15c56583d":"":"9212a548c597677d1747e98ce6fb18a4":"55ca486c0183d0134925880d2e21dde0af51c4c77c6038a5a9c0497884e0aa4715bdb5b4bb864acc708ac00b511a24fa08496df6a0ca83259110e97a011b876e748a1d0eae2951ce7c22661a3e2ecf50633c50e3d26fa33c2319c139b288825b7aa5efbd133a5ce7483feecb11167099565e3131d5f0cb360f2174f46cb6b37c":104:"08d7cc52d1637db2a43c399310":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0e9a0391435acb57eae2e6217e0941c79a3ff938ec6a19b8a7db2ea972e49f54":"":"27cd1d7af7e491e30c8110cc01392529":"79140d32bb32dace0779e2d37a0f744d6d973e99a279962b43a6c0af63772e8a0a21d5d9dd3c33d4b218cb2f6f24dd8d93bb4e1e6a788cb93135321ecfed455e747fa919b85b63b9e98b4980a8ccb3b19d50d735742cb5853720c2ad37fa5b0e655149583585830f8d799c0d2e67c0dc24fc9273d9730f3bb367c487a5f89a25":104:"fbb477dd4b9898a9abc5a45c63":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"55a12eeca637654252e3e40b371667e3f308b00f2fd2af696223e4cd89e3fd4e":"":"8a3793b6441258360f7f4801b03d0b26":"f5810dc5f25e49bd6d94bc63c2494aa7a579a4056a25f1dd9b2734d0b8731ee52523edd54ff475651d45c213e1bf254327fb0e2c41a7d85345b02bcc9d27b08915d332e1659671991a4bb74055967bebbba6ecceb182f57977130623d5a7b2175fa5a84b334868661c1f450b95562928b4791759796a177d59ed18bbf141e2ad":96:"99230019630647aedebbb24b":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3d353f870a9c088de5674efd97646b9c5420b2bcdfcffefcadd81682847e5331":"":"f267fa982af5c85359b6447f9b7715ea":"7cf55630867af5dff747c8dd25bcc531d94a7730a20b6c03d46059ea93fcaa00d07ee17dad0e0dff814b02dfef0cbe00b37fd2f5f95ead7c72be60016f2934d7683fc1e47185c7211c49cb03e209b088edb14e533dbcb792ab7033728904f7ff12381a236dba97894ec1fafcf853ab15fff343f9265d0283acef10168ffd1271":96:"9553b583d4f9a1a8946fe053":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d227c9ff5d17a984983056fb96f3991932ae8132377529c29238cf7db94a359d":"":"b8f6536f376a7efe0e684acf350bae70":"1cc25da31f90de7fa47ebce92754d3faa99f88d4e25ccab45645c1acdf850d55d7f02f61a0bfdc3125f29259d7da8abef532fe0966c63d3486753c8a2cb63a39349a0641b2f2b9526a03b97d58ca60fbb054c6c164ff2836688b0cad54df2b165bc082eeae660e768dde5130e30f8edc863446661c74da69b9e56de8ae388da0":96:"44b95a37fab232c2efb11231":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b2a57ef85ffcf0548c3d087012b336c46f6574cf1d97ca087bfad042ee83eec2":"":"3d580402d2a8dc4d7466e5dcb456be7a":"c2b9e95c16e55028794a63ef82d11fb83a2a75dc34a81f238e472c33264534bdd54cd07d02a0ecf9019ad1a6d6c779f339dd479e37940486950f183bade24fca2f24f06d4037b3555b09fc80279ea311769473eb0630b694a29823324cdf780d7d1a50d89f7a23b05f7a8c3ad04b7949aa9e6a55978ba48d8078b5a2fd3c1bbb":64:"072d4118e70cd5ab":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"63889ed5bf2c27d518a696b71c0f85592e3337aae95b5bf07289e4c5dfdc088d":"":"1ad534280a0fac7dce31f2ae4fb73f5a":"be1b9dabea33bb9443e27f674b27931c0fba699a33dc86fab29e50b76a9441030444b465317bbf2949faf908bc1b501d11a5ea2042e4b460a85f3be5836729e523d99b56ef39231d5c6d8ae2c2ab36ef44e2aa02a1f2c559c6e333216c7f9ed5f9b880a88e920219204c99a3ae8f90afd1396563bc59a691a93e0070b0b5fd90":64:"1bcea0ac2c1a0c73":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"94e3e2c17cfb6f52d4fdba3ba6d18bba891b6662e85df14d7e61f04adb69e0e5":"":"8a80efb3bfe220526997543409fddb4d":"05da1b0f7ac6eef488d3f087ecae7f35abe3ef36d339709dc3fcb5b471979268ee894c3b6c7f984300d70bc5ea5fba923bfb41d88652bdaecc710964c51f3e2ae2c280b7d6c8e3b9a8a8991d19d92d46c8a158123187f19397ad1ad9080b4ffd04b82b5d68d89dacd3e76439013728c1395263e722b28e45dabf1ef46b8e70b5":64:"faa5c13d899f17ea":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"fe5e479ad0d79dbf717a1f51f5250d467819e444b79cb3def1e0033c80ddadd8":"":"47ce838083fd070d8544c0ad5337cdc6":"98476bf05a18c4ff1b6024dd779c1ac06d838705a0a83fe42bee5fc6ebf3b2a1a5049b67f4aabc8239cd6ff56504bcbad1e2498c159bbec2a6635933945f6ea49e5bc763dcf94f4b3643d3888f16105abb0965e24f51cb4949406124145e9ae31cc76535b4178492f38b311099df2751f674363ae7a58f6f93019653b7e6a6f0":32:"a3958500":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"27d4dedb71a8f68ca5ce2b9e56da772bf5a09b7981d41cd29f485bd2d1adb8d4":"":"7e6f0343c54539717a97b6c8b9f7dec4":"d386db78043f719b7e137cbf79a7f53dda2fe3baccbebb57d499f6eb168e5151f10081d76b72ae0f30165efbdda469e826f9246e59dbcad5c0b27691c00d6c192c24073e99c19cf8c142087c0b83c4ce2fc7ba1e696394e5620ab2d117d5dcd2ac2298997407fd5de07d008de8f9941a4a5f8074736a59404118afac0700be6c":32:"50fd1798":"":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"5a7aa836a469d28542d0d24d3232fad266da8fc889c6b6038b726d3da25f7b20":"":"9faf7cd805803e143ec8f3f13475efd2":"1006c707f608728b2bf64734062b12a5625062bcdcb80a3ce2058352a2922d5e6fbe19681b4f0d79ad3c837f81e72f2fbf8df669894e802a39072b26c286f4b05188c708f7c6edd5f5bb90b87ffa95b86d84d6c1c4591b11d22c772a8ad7f2fe6bd8b46be0e93672df2e8bff8ba80629e1846cfd4603e75f2d98874665c1a089":32:"07764143":"":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a9444fd176acbe061d0221fde3ddfcc4ff74e995d981a831297c4cbda51c22a1":"c146ff5a988496cad7eced7a2ea471e0117d5d6bd2562c23ce9db4bf36d83ba3fc22e90486ec288a627d208e0b2fd3b65f8301cf7fc41d97959981a95cd1cf37effc46db99b94b21c941c3613c26a10b1a6b7793f467d58ff5134612230f1c49d7e1fcf664fe52fc6eca46273982f6fe729b009d90eb8d8e4a0b0dbe907b76da":"5714732145470da1c42452e10cd274b5":"":128:"db85b830a03357f408587410ebafd10d":"a3cad9a57fa28e6f6aaa37150a803bf8b77e765f0702e492c4e5ebb31ae6b12d791149153e469a92bb625784a699fd7ca517500ee3f2851840ba67063b28b481e24ba441314e8b7128f5aaccaf4c4e2c92258eb27310bf031422b7fc2f220f621d4c64837c9377222aced2411628018a409a744902c9e95c14b77d5bb7f5846b":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"686d3bd071e3f46f180611bc4ec8d7726fe72b6c617e7d42b3339f53918c9e36":"21983ad66449c557263aef299da6eef8f31d576fc17ed2dac3e836f7c2ceaff3094b2695452680e188df10c174810efd1fbaa6c832baedce0b92e4c7121447f6461ac909b4302cdf658095b1de532b536faa4fb38cfdf4192eb5c3fe090d979a343492f841b1edc6eb24b24bdcb90bbbe36d5f8409ce7d27194a7bb995ecc387":"a714e51e43aecfe2fda8f824ea1dc4b7":"":128:"cd30c3618c10d57e9a4477b4a44c5c36":"9610908a0eb2ee885981c9e512e1a55075a212d311073bbb2fb9248cce07af16ee4c58bdc8dbe806d28480f9065838146f3e1eb3ae97012cfe53863a13d487f061a49a6c78ca22a321fa25157dbe68c47d78f2359540cc9031ee42d78855ed90e6b8ea3d67725bfffcb6db3d438c982b5f88d9b660f7d82cb300c1fa1edebb6b":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6fe81f15a02e2ecf46e61199c057102d160e6b5d447d4a275972323fff908c3e":"0b4ee0385e6665da8fd2ae47f2d0cf1c5bd395a3bb447047ab5a3ae0b95355bf83d0381119a8d4c01acbe60cd7885da650502f73498a682fdc94f7b14f4c753226064fa15e3a90a6083e053f52f404b0d22394e243b187f913ee2c6bb16c3033f79d794852071970523a67467ce63c35390c163775de2be68b505a63f60245e8":"91d55cfdcdcd7d735d48100ff82227c3":"":128:"cd7da82e890b6d7480c7186b2ea7e6f1":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"4c2095e1379389dc3810e8819314f5a2f87d1494213c5b1de1a402f7f4f746c4":"26ec8ebac0560538a948afbc18fb730e9a91f21392bde24b88b200f96114b229a5b57fa9d02cf10e6592d4dfb28bf0f00740c61157ce28784e9066ea3afd44ecf3a494723610cb593c0feffc6897e3435c6f448697ad3e241685c4e133eff53bdd0fe44dd8a033cfb1e1ea37a493934eb5303ae6ef47ce6478f767ef9e3301ab":"19788b2e0bd757947596676436e22df1":"":120:"f26a20bea561004267a0bfbf01674e":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"be5351efc0277afc9759ec2464a22cb4401f7a17efd1a205e7af023c7ed30ee1":"1eca91406f338fc09c2988b1d7dc8c409d719300c03840a497d7b680cdd5e09b144903477f7116a934e1d931cf368af1fc2a0a0e7caa95475a3cd7bf585a16fda31eb3f8201db0216b37a1635c1c030836b3dd05ca5b0194388fa198e717822131d5d4318690ef82d35ac80b27fff19aec8f020dc6c6ce28f0813bbbf8230ad9":"c6b26117d9dbd80c1c242ad41abe2acc":"":120:"61051d6c0801b4a6b6ca0124c019f3":"95447aded336d6c20d483a6f062d533efed0261ad321d37bf8b7321b98f55c0f0082ce7f3d341b18fea29a72fc909d30cd8c84a1640227227287674a9b2f16a81b191ecf3b6232d656c32d7b38bea82a1b27d5897694a2be56d7e39aa1e725f326b91bad20455f58a94a545170cb43d13d4b91e1cee82abb6a6e0d95d4de0567":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"814c2cdfdeecf39d43bb141fbfc62dac44f7552c5e5dac2d4913303fc860119b":"0d3013a1d7132f685d001420daa6c7b643bc36b887511acc4588237d3b412c79e4ebba29c08248ad46c7239e8daa232b7483c9c4e3d1c0bbebc696401efe21f7fd6fc0525a4ab81bd9a893d5f7ab23b70ed07c00f33649b8a996a006de6c94f7793f72848793f4d5b31311c68aae1e715b37409fbe506dac038a0950f05fe82b":"0db3ade15cb0dea98a47d1377e034d63":"":120:"e62f910b6046ba4e934d3cfc6e024c":"374d03cfe4dacf668df5e703902cc784f011f418b43887702972dcc3f021bcb9bdd61ed5425f2975b6da7052c4859501eb2f295eb95d10ba6b2d74e7decc1acacebf8568e93a70a7f40be41ac38db6f751518c2f44a69c01c44745c51ad9a333eda9c89d001aa644f1e4063a8eb2a3592e21c6abc515b5aacaec8c32bcf1d3c4":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1ae4541110f2bc4f83cd720b5c40c8315413d896e034b75007f172baa13d29ec":"5ea811e7fbfc0e00bf2a6abfac50cad9efd90041c5f7fb8f046a0fecbd193b70a2de8a774d01dd3cd54f848cb3e9f5152ee1b052ba698bebfba1fbbdae44a260447d6e6482640ae4d01c9cac3d37d4ffe9a0de0b6001de504a33ef7620efe3ce48ecd6f5b1b3a89185c86d4d662a843ff730e040e3668d6170be4cced8a18a1c":"83f98eec51ee4cae4cb7fe28b64d1355":"":112:"df47eef69ba2faab887aa8f48e4b":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"20c9b662ec4bd13bf58d64cb0a7159b0e7fee4703af66292bf75c8bd6e42e8dc":"45b64f2ed5ac707890c0c1726adf338770ce6a728fe86bb372c4c49409a32705f881bc4d31a27c455c7c7df9dd2c541743523e7d32f88930d988857847f011be5f5f31a31e8812745147cbff5c1294d0fd4a7285db4833f22bf1975250da99c4d0dd2c9688d7f8001bb6ef2bc898ce4d42c5b78e74645b56ce992338f49d4183":"2bc0847d46f3d1064bbf8fe8567f54a2":"":112:"5a1bf25aa8d5c3fe5cf1be8e54a1":"9079d6275db076625e8474c2914fe483d413d5339202f98f06c3b0ef063d8f3d31029deaf7f9349bfec57e5cf11f46f02d5a6520c7992efc951adbbea6d08e53faeb10dfe8b67ee4685da9ea4fe932551a65821147d06d4c462338e6ddda52017c2bc187fd6d02b7d5193f77da809d4e59a9061efad2f9cadbc4cd9b29728d32":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0a1554db37f2e275732a77e521cbd8170729d8677a85db73feacf3c66a89d689":"5421d93b7e6e0091978c673df4f3a406aef5f13eb5e6f95da19b0783308cbe26d4fd6c669cc4a9f069d7e62e4c6fad14b80e918fe91556a9a941a28b3dbf776a68ac7c42df7059b5ed713e78120aec84e7b68e96226c2b5e11a994864ed61b122e7e42ef6cfdae278fadbae1b3ea3362f4e6dc68eef6a70477b8a3ffcfba0df9":"b9194a4d42b139f04c29178467955f1d":"":112:"05949d591793ca52e679bfdf64f3":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"3ab1d9bb571c4bdc9f3ef340914bddcfe0c8e7718d4a2530334372cec86e5fcb":"80bcea307e009745724d5f15d21f3b61a5d5a8401530346b34a2adfa13e3e8c9c9327d6fad914b081e554fbe6c1c6fe070b566620e559555c702c0ab5becf61ea1d9de64351ce43b2276ef4e20b5af7ce43db6d21286af4e740ef00c6d790705afcf0ee4850fffc12c662f2bd8212feb21db31065ab8f717a7509c213352b869":"6a5335901284dd3b64dc4a7f810bab96":"":104:"04b8e5423aee8c06539f435edd":"36b9602eee20b8f18dce0783cd1e01a799f81ae0a1ce6d293a26c62f47e7dad85c8446697cc09c81d3d9ead6f9e55c4147211660c8aea9536cc5516e9883c7d6854be580af8cd47ba38fa8451f0dad9c904e0e7f9997eff7e29bf880cd7cedd79493a0e299efe644046e4a46bf6645dfb2397b3a482a346b215deb778c9b7636":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7dddbd5657e22750bfe6baa70a1f4ac46c1ef8bee573a57cfcef50b66f85e593":"2bf5aba83a8161b9d21ff29251fb0efa697b1ea9c1b3de8481d5fd4d6b57afda0b098decdc8278cc855f25da4116ed558fc4e665a49a8fff3aef11115757a99c10b5a73b1f794f9502186c13dc79442f9226bbf4df19a6440281f76184933aeae438a25f85dbd0781e020a9f7e29fb8e517f597719e639cbd6061ea3b4b67fb0":"fcb962c39e4850efc8ffd43d9cd960a6":"":104:"1d8cdadcf1872fb2b697e82ef6":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6916b93b2712421f1f4582de7ec4237c4e42e2b32c7dced2f8bb5bd2e0598312":"3739cca20279a36ddb857ac22beae901a49529b3182463ab81a7c46e437eb0b0571e8c16f7b626ecd9f2ca0cd83debe3f83e5d58ed3738899f4b616755eb57fb965208f261736bdf7648b1f8595c6b6a779768115e3077dfee7a42d44b555a51675fb1ce9961d0e21b2b9b477c0541184350e70decf7c14a4c24b8a6cd5fed8e":"b4d9248bb500e40de99ca2a13e743f1c":"":104:"090d03446d65adcc0a42387e8e":"0255be7ac7ac6feb3a21f572f6a593cc8a97f17af7064c80e478f4a6c469cf94d604bc014b003bf284d216161a9c8a493af43c6a0d8caf813a9e6f83c7ed56dd57543876b11f76aa2be80dcd79d19ac61f00fa423ac2f52fae7a8327cd91494ca4116feb735980ad0a4b1445cb7f38cc712b8aee72179e65b97fca38694e3670":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b751c8b724165009a8bd97a9d2a0e22cae5a95c4743c55eeeef0a6fe7d946bec":"e8546a5af1e38114822e60e75563a9399c88796f303c99c69d1f3c50379da81e1cd5b5a4a721e23c59da58ea4361b7ff58408e506a27fea24f9a235c6af7f7a5bd93fa31e90edfc322821c08d6324134830b7fe160b4a3e6d27866a10e6e60762a31618ef92f5c67ccb1deb1f1b188f0e687165e7c366c7418920df4f4fcdcae":"160c50c0621c03fd1572df6ba49f0d1e":"":96:"9fef9becf21901496772996f":"175fa6b7cd781ec057ff78ba410f2897a920739b5fc4f04bc9b998fbc7cc18e327ad44d59b167e4627256aaecd97dc3e4a7c9baaf51d177787a7f4a0a2d207a855753c4754d41348982d9418b6b24b590632d5115dc186b0ba3bec16b41fa47c0077c5d091ec705e554475024814c5167121dd224c544686398df3f33c210e82":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0faf32c22c2a4ee38fe4b5ce08f98fdf6f83b5038dcba5ec8332b3eeb5c710c7":"8a556cc30075753c6e94c2f669bca2058ff6abcbffffc82da7cfca0a45af82dfb4cf487ceb4ede72be87ee4c8b72db1e96459de1dc96721464c544c001d785f2188b9fccaec4b1a37970d38b326f30163d2fdfdf8a2ce74aec55abcd823772b54f8081d086a2e7b17b4086d6c4a5ea67828ef0b593ea1387b2c61f5dfe8f2bb0":"04885a5846f5f75a760193de7f07853c":"":96:"0c13506ed9f082dd08434342":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0dddc3d2f82bdcdbc37648a6b9b416af28753740f8e998cd1a52a0b665369f1c":"07bf84b15b21951fd22049be6991a672503ae243b8d285fb1e515e1d2c36bfd5b0d0bcce85791f2cea8f616aed68a7d9cf4eaf76418e8b1ec27751de67cbfd9d9f7905b2667904f10d598503f04c04ea00a681ff89a9c446d5763898430bd7a9dfebfe544e3ed3e639b362683a651e087626ffa63c0c2b3e0dd088b81b07f75e":"0a93b883cbd42998ae2e39aab342cb28":"":96:"5c37918edb7aa65b246fd5a6":"ff7b7b2f88b8c6f9f9bad7152874e995eea0ff1ce1ecd9b8d563642a37a31499f14d70f0dd835b7adf80928497f845fd8c2786cd53af25f8c9fe1bba24e3c3860162635bbed58f06cf6c9966bb9b570987a48329279bb84afb9e464bb4ad19ae6600175086e28929569027c5285d2ed97615e5a7dada40ba03c440861f524475":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"a0b1a62e46e7712277fc711e19d0c0c865ee77b42ac964b7202dbcaf428086c2":"7dd7c0787fdbea4aacf929341659dcf4b75cbca8f92001e8b62a4d7b40272c5755fa9c445857db05328dc11ce5221f044f4b3dafbf0e2d72a1ad0d3e4c804148db578218690ccc620d8b97b4450ff83400a6caaa959617611446a6627138a4067be9ea410d4b0581022ab621928205b4a4480560fc4c2c3b39a2805684006f35":"e20957a49a27e247d00379850f934d6c":"":64:"c99751516620bf89":"9307620479f076c39f53965c87d20c2aff11c736c040dba74cd690d275591a5defc57a02f6806de82eb7051548589484364f6c9b91f233a87258ede1ee276cb2c93b4fc76f4d7e60cbd29ba2c54cb479c178fa462c1c2fb6eeb3f1df0edfb894c9222b994c4931dedf7c6e8ddecbde385ddf4481807f52322a47bf5ff7272991":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ffcc1c88fba1723b3ab57b458d9bffb98b878c967fb43b9db2ae0753d32a3bb1":"19b6dec86d93c466307de3a36c0791ed1010b1b9cf8d30347ae46e0f9283c9fda43da8cb491dd17cc4298b1f0b876d6a0f4bcbc9667fe34564bc08f8f7b67045057d19f4bf027bc839e590822fa09a5cef1af18e64a0116aa2a01a3f246c2b5272c18c9aa23efe674ba53d533ae8f0695cb78c1155cdc7a9d7fae2c4567dc07c":"d533c2170c5dc203512c81c34eff4077":"":64:"167ec8675e7f9e12":"0539287ac546fe5342e4c3c0ec07127dcd22899abfe8cdd6e89d08f1374d76e877bec4844d06e0a9f32d181c8d945ba16a54ce3725fae21d8245c070a4da0c646203d6b91325b665ab98c30295851c59265b4ab567b968b6e98536b7850738d92e9627b4c9c6f5d9ae2520944783d8f788a1aa11f3f5245660d41f388e26e0a1":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"55e94b339c3bafe068ef9cc30787cc6705850114976843777c92b4b331801650":"147cc7bc4008dadf1956520b5998d961499bdf3d8b168591adbfd99411ad7b34eb4b2a5c1bb0522b810fec12dd7c775784d7ecdc741e6dec8191361e6abf473b219221801951b4d5ffe955ab50eef9cffdfee65ba29ddfa943fb52d722825338c307870a48a35f51db340aa946c71904d03174b1e4a498238b9d631a6982c68d":"2e2b31214d61276a54daf2ccb98baa36":"":64:"5266e9c67c252164":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"13c9572bdef62510d84f2d415cc481cd1e71b9c1132b43e63b21ba4e16de9b39":"7c78e634dec811173ff3c4a9a48ae3ae794fbd2aefd4b31701777ff6fcb670744c592a1d298d319717870dca364b2a3562a4ffa422bf7173c4f7ea9b0edf675e948f8370ffd0fd0d5703a9d33e8f9f375b8b641a1b1eecd1692ad1d461a68d97f91f9087f213aff23db1246ee16f403969c238f99eed894658277da23ced11ee":"a8339ba505a14786ad05edfe8cebb8d0":"":32:"df3cab08":"91f9780daefd2c1010c458054ac6e35baa885cdd2c95e28e13f84451064e31e0739f27bf259cb376ab951e1c7048e1252f0849ccb5453fc97b319666ebbfbc7ef3055212a61582d1b69158f3b1629950a41bc756bded20498492ebc49a1535d1bd915e59c49b87ffebea2f4ad4516ecdd63fa5afda9cce9dc730d6ab2757384a":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"30a14ca53913acbb215b4e4159083106db3fff83cbedd1e5425f65af1e94f5dd":"8c5f73ee1544553b712ad7a14f31379c8d54a4e432fb6c5112436988d83c4e94954b0249b470538fb977b756fbee70b811d4dc047a869e207bb0b495f1e271d0034e912000e97594033e0dedde0591b297f8a84bafcc93a46268a5bba117b558f1c73513e971c80a7083e1718fc12d0cc0d996a8e09603d564f0b8e81eea28bc":"4f23f04904de76d6decd4bd380ff56b1":"":32:"18e92b96":"bb4b3f8061edd6fa418dd71fe22eb0528547050b3bfbaa1c74e82148470d557499ce856de3e988384c0a73671bf370e560d8fda96dabe4728b5f72a6f9efd5023b07a96a631cafdf2c878b2567104c466f82b89f429915cf3331845febcff008558f836b4c12d53e94d363eae43a50fc6cb36f4ca183be92ca5f299704e2c8cf":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"e69f419140289ac25fb0e2ef9cc4f7e06777ac20f7d631918d1af0c8883b7d6a":"ff8dfa4e70490ea9c84cb894dc5d7e1b935ebcdea80a39c4161d4db42cbb269cc86abd381af15ec9a4a42ed18c1eed540decec19722df46f22aa06883297cb393fb23e4bb31a817e88357aa923c7ecbcf24c28a09f622dd21fa70c0a02193024fdcefeaa96cc1b50f81a65dfa9e1bb5126f0c9766a861eed096ec15fb07b0f81":"531248afdaaf1b86cf34d2394900afd9":"":32:"c6885cdd":"f75299e0ead3834fc7ebd4b2051541b598ad57cc908fdcd4324cf4ccf7dcf7b3f0737ad6c026399a8b1b6d3d50011b3c48ea2c89833b4b44c437677f230b75d36848781d4af14546894eecd873a2b1c3d2fcdd676b10bd55112038c0fdaa7b5598fe4db273a1b6744cba47189b7e2a973651bfc2aaa9e9abea4494047b957a80":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"404a5d1ac9e32f9caabffbfa485ce9c27edc9e5cde0f2aab4f32ce3121449b88":"b63ec4d28854b7fe2d4d13973f5bcb16f78494ce25cc2820de9d0dc1d8d91db1f19bc9e01cee8418c9e88a69b2f30cdbb0dbdbb50be71e1e666c111c126f2b7197c02f69a1b2ec5e1bf4062b2d0b22fb0fa1585b4e6286b29f6ac98d1b1319dd99851fa6921607077d2947140fdeeea145b56ea7b6af276c9f65393bc43ede33":"b6e6c078e6869df156faa9ac32f057c3":"6ebc75fc9304f2b139abc7d3f68b253228009c503a08b7be77852da9e1afbe72c9ab374740b0dc391fa4d7e17de6a0aa08c69e6f5c5f05411e71e70c69dfbcf693df84c30f7a8e6c7949ea1e734297c0ea3df9b7e905faa6bbdcaf1ff2625a39363308331d74892cf531cb3f6d7db31bbe9a039fca87100367747024f68c5b77":128:"94c1b9b70f9c48e7efd40ecab320c2d3":"56a0ac94f3ec7be2608154f779c434ee96db5ed4f5a6e1acfb32361ce04e16e1337be5978df06d7c4f6012385fb9d45bb397dc00f165883714b4a5b2f72f69c018ffa6d4420ad1b772e94575f035ad203be3d34b5b789a99389f295b43f004de3daaef7fa918712d3a23ca44329595e08da190e3678bc6ad9b500b9f885abe23":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"b56f0c980acf7875cf7f27d53ad4a276adc126d0b93a5774ac4277eecad4309e":"2c94299e36b7c4a825ecbc5a7809061e0a6761764a5a655ffdb0c20e5c3fcb10f4e93c68aa0a38c2acc5d06f2b7c4ff4fcf814b551bfefa248dbe06a09a0f153213538a31fa7cf7d646b5b53908d8978f514c9c4d6d66f2b3738024b5f9c3fd86b6da0c818203183f4205f186ea44a54edb911b1a17c424c95852c8d271b2e93":"b004c049decfb43d6f3ec13c56f839ef":"b2045b97fbb52a5fc6ff03d74e59dd696f3f442c0b555add8e6d111f835df420f45e970c4b32a84f0c45ba3710b5cd574001862b073efa5c9c4bd50127b2ce72d2c736c5e2723956da5a0acb82041a609386d07b50551c1d1fa4678886bac54b0bd080cc5ef607dca2a0d6a1e71f0e3833678bf8560bc059dae370ec94d43af6":128:"fce7234f7f76b5d502fd2b96fc9b1ce7":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"1c5027c36e6caa1b3e5e45fead32b5e3126ac41f106c491b0b3a7c16502f4fe6":"58f0ceaa31c0025d2e6bb58720cce4b64f5f6c657c847ae42936eb1e343fea397c8a8cf2f5ef02ffaec25f431900dcb0910cf32cea9eca3b78aed1c451c7af51066489f87b2a5f8cf28d6fdb6ce49d898b6167b590a3907be7618be11fb0922a3cfd18e73efef19e5cdc250fa33f61e3940c6482ae35f339e8c0a85a17379a4e":"3ee660f03858669e557e3effdd7df6bd":"93e803c79de6ad652def62cf3cd34f9addc9dd1774967a0f69e1d28361eb2cacc177c63c07657389ce23bbe65d73e0460946d31be495424655c7724eac044cafafe1540fcbd4218921367054e43e3d21e0fa6a0da9f8b20c5cdbd019c944a2d2ee6aa6760ee1131e58fec9da30790f5a873e792098a82ddf18c3813611d9242a":128:"ac33f5ffca9df4efc09271ff7a4f58e2":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"34c3019810d72b5e584f0758f2f5888a42729a33610aafa9824badade4136bbd":"22deef66cbb7db240c399b6c83407f090d6999ba25e560b2087fed0467904bb5c40cbaa05b8bf0ff5a77c53fa229478d8e0736414daf9c420417c391c9a523fd85954533f1304d81359bdcc2c4ac90d9f5f8a67a517d7f05ba0409b718159baf11cd9154e815d5745179beb59954a45a8676a375d5af7fae4d0da05c4ea91a13":"f315ea36c17fc57dab3a2737d687cd4f":"f33c5a3a9e546ad5b35e4febf2ae557ca767b55d93bb3c1cf62d862d112dbd26f8fe2a3f54d347c1bc30029e55118bab2662b99b984b8b8e2d76831f94e48587de2709e32f16c26695f07e654b703eba6428f30070e23ed40b61d04dd1430e33c629117d945d9c0e4d36c79a8b8ab555d85083a898e7e7fbeb64a45cc3511d99":120:"0bae9403888efb4d8ec97df604cd5d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"29397d98fc5a7f04b5c8b6aa3a1dd975b6e4678457ae7f0691eee40b5397503a":"0bbf1079cb5569c32257bc7e52371db46f3961b457402b816588243b4523543430d5ca56b52de6632724c51e6c3af310b28822c749a12bdd58dee58bbc3266631562a998ec3acdc8a2567a9f07f7f9759c3f50b1d1dcdd529256b80c0d227fc1fe8b58c62d1c643f1ac2996809fd061afcf4a9af184c14db9e63ec885c49de61":"885543a45fd1163e34ef9276145b0f8c":"d88beaa0664bcef178cbdbfab17ff526b5c0f8ad9543c6a312d93c336707fbf87c0448b07a550580953279f552f368225cc6971f1eecc718d6aad1729c8d8873081357752bd09d77075fa680cb2dc4139171e4a0aaa50b28c262c14fd10b8d799ca1c6641bb7dfdfdf3dea69aa2b9e4e4726dc18b0784afa4228e5ccb1eb2422":120:"7b334d7af54b916821f6136e977a1f":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"7555dfcf354da07fd70f951d94ec1d86a635edfdb7929460207b2a39cc0cf4a3":"a1351cfffd1b0cbf80c3318cc432d3238cb647e996b7b53c527783594683f535950cd08788687c77226b2d3f095955884adc2e475ca1e1eab04e37d5e901ae8934a9d3a0cb37b80612ca25d989856dfa7607b03039b64d7dcd468204f03e0f2c55cb41c5367c56ca6c561425992b40e2d4f380b3d8419f681e88ebe2d4bdad36":"e1b30b6a47e8c21228e41a21b1a004f0":"bf986d3842378440f8924bb7f117d1a86888a666915a93ba65d486d14c580501e736d3418cebee572439318b21b6e4e504a7b075b8c2300c014e87e04fa842b6a2a3ebd9e6134b9ddd78e0a696223b1dc775f3288a6a9569c64b4d8fc5e04f2047c70115f692d2c2cefe7488de42ff862d7c0f542e58d69f0f8c9bf67ef48aea":120:"d8ef5438b7cf5dc11209a635ce1095":"95e8db7c8ecab8a60ceb49726153a7c5553cf571bc40515944d833485e19bf33cb954e2555943778040165a6cfffecef79eb7d82fef5a2f136f004bb5e7c35ae827fac3da292a185b5b8fc262012c05caeda5453ede3303cfeb0c890db1facadaa2895bdbb33265ada0bb46030607b6cf94f86961178e2e2deeb53c63900f1ec":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"bbeafe86c72ab0354b733b69b09e4d3462feb1658fe404004d81503f3a6e132f":"a033c2051e425d01d97d563572e42c5113860e5dedcd24c76e3e357559ba3250f1fc5d4a931a9d0900ac025400f0158621f0b1215b2907467bfc874bcabbb28e28de81fe1ee5b79985261c512afec2327c8c5957df90c9eb77950de4a4860b57a9e6e145ea15eb52da63f217f94a5c8e5fcb5d361b86e0e67637a450cdbcb06f":"ee1caba93cb549054ca29715a536393e":"e44b0e0d275ae7c38a7dc2f768e899c1c11a4c4cb5b5bd25cd2132e3ecbaa5a63654312603e1c5b393c0ce6253c55986ee45bb1daac78a26749d88928f9b9908690fc148a656b78e3595319432763efbcf6957c9b2150ccabfd4833d0dcee01758c5efb47321a948b379a2ec0abcd6b6cbf41a8883f0f5d5bf7b240cb35f0777":112:"a4809e072f93deb7b77c52427095":"e62adf9bbd92dd03cc5250251691f724c6ece1cb89d8c4daf31cc732a5420f6bedab71aab0238ba23bd7165ed1f692561ef457fd1d47413949405b6fc8e17922b17026d89d5830b383546ea516a56f3a1c45ec1251583ae880fa8985bd3dcc1d6a57b746971937bf370e76482238cc08c2c3b13258151e0a6475cc017f8a3d0e":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"6ad06c88dd4f3becf35eed95bb859be2406a1803a66e4332a74c5f75c09b9a01":"2219c11672884b93d0290b6a7140feafe416461f1cdaf0b3aa64693d7db2eb10feae46aac7af549fa1b0abc78c11f8df7ee803ef70310fc3e67769f8b4bc64f81143a6ebf8bee9d386a8ede5d2cc0ed17985a3b7bb95191ef55e684690ccdc5ca504bc6eb28442b353861a034a43532c025f666e80be967a6b05b9dd3a91ff58":"07d8b4a6e77aef9018828b61e0fdf2a4":"cca1fd0278045dda80b847f0975b6cbf31e1910d2c99b4eb78c360d89133a1c52e66c5c3801824afc1f079d2b2b1c827199e83f680e59b9a7de9b15fa7b6848b5bf4e16a12ac1af4cf2b4d7bb45673c5e1241e9996440860a9204fc27cae46a991607bc5e7120d6c115ddcbdd02c022b262602139081e61eee4aba7193f13992":112:"e3ede170386e76321a575c095966":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"87bbf7c15689e8c99a5a32a8ba0dfebcfe1989159807428cdd1f382c3ea95178":"b77d3bf3b30b3e6e5c86cbfb7e5455f6480f423cc76834b4663d28d9f1eb5c40212634e3347668427f7848352ab789886f96682a568260bdaeb7de0aae2af36f5ae04f06c332b158d923706c1c6255c673feeadb6d30bfc901e60b92acd9ddd83ef98686c4d492f4a60e97af2541d470a6a6b21903441020ea7619cf28a06986":"2f19aa1f3a82a7398706953f01739da7":"590dbd230854aa2b5ac19fc3dc9453e5bb9637e47d97b92486a599bdafdfb27c3852e3d06a91429bb820eb12a5318ed8861ffe87d659c462ef167be22604facfa3afb601b2167989b9e3b2e5b59e7d07fda27ffccd450869d528410b0aff468f70cc10ef6723a74af6eebc1572c123a9b5a9aab748a31fa764716d3293ff5de7":112:"5c43fc4dc959fabeebb188dbf3a5":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"24095a66b6eb0320ca75e2ab78e8496a45f4b000fc43436904c3e386fb852ed2":"4690edc843e23d9d9b9a4dab8fa8193f8bf03897d3d29759e9dc9e0f8a970c0f5d4399b9f60461fe5cf439f9b0d54bbc075695e4d76b76298cc2b75bb3e0b516ee9ada93f77c4c002ba9fd163a1e4b377befb76c1e5ab8b3901f214c0a4c48bd2aa2f33560d46e2721a060d4671dc97633ff9bcd703bb0fbed9a4a2c259b53f3":"0955c1f0e271edca279e016074886f60":"f5160c75c449e6bb971e73b7d04ab9b9a85879f6eb2d67354af94a4f0ca339c0a03a5b9ede87a4ff6823b698113a38ae5327e6878c3ccc0e36d74fe07aa51c027c3b334812862bc660178f5d0f3e764c0b828a5e3f2e7d7a1185b7e79828304a7ad3ddcd724305484177e66f4f81e66afdc5bbee0ec174bff5eb3719482bd2d8":104:"75a31347598f09fceeea6736fe":"0dd2dca260325967267667ff3ccdc6d6b35648821a42090abba46282869bac4bdc20a8bee024bea18a07396c38dbb45d9481fedcc423a3928cfa78a2f0ae8eedb062add810bdbee77ddc26c29e4f9fda1ab336d04ef42947b05fbdb9bc4df79e37af951d19d6bf5e5cb34eef898f23642a9c4a9111ed0b7a08abeeefbbd45c23":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"086b77b5731f971f0bf5b8227361b216746daf8b08c583ad38f114a64aa7877b":"629317212ff8bd8a7676e4c00b81a9577de6397c832f99ac974fa2bbbccb6e3b8aa776db6922eed0b014bf3923799da7d9d0854c8817470e1e2f7fc7a572f9d0316ee60cde7ef025d59b897d29a6fee721aeb2f7bb44f9afb471e8a7b0b43a39b5497a3b4d6beb4b511f0cefa12ce5e6d843609d3e06999acfbee50a22ca1eee":"164058e5e425f9da40d22c9098a16204":"6633eae08a1df85f2d36e162f2d7ddd92b0c56b7477f3c6cdb9919d0e4b1e54ea7635c202dcf52d1c688afbbb15552adda32b4cd30aa462b367f02ded02e0d64eeee2a6b95462b191784143c25607fd08a23a2fbc75cf6bee294daf2042587fdd8fe3d22c3a242c624cf0a51a7c14db4f0f766ec437de4c83b64f23706a24437":104:"2eb6eb6d516ed4cf1778b4e378":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"0f9e806b0d937268561c0eafbbdd14ec715b7e9cef4118d6eb28abbb91266745":"2ae4baef22ace26f464a9b0c75802303f2d7c0f9a1ed1d0180135189765bdd347fea0cc2b73ee7fbbf95ea1fda22597b8aad826f63e744069a9c349488b2cc1cf9372f423cc650302082125724730ae5a4d878e07385ddc99034c6b6b46748f02c80b179fe6406b1d33581950cb9bcd1d1ea1ec7b5becfd6c1f5b279412c433a":"8657996634e74d4689f292645f103a2e":"2ca253355e893e58cb1a900fbb62d61595de5c4186dc8a9129da3657a92b4a631bbdc3d5f86395385a9aa8557b67f886e3bb807620e558c93aea8e65826eadeb21544418ee40f5420c2d2b8270491be6fc2dcbfd12847fa350910dd615e9a1881bc2ced3b0ac3bde445b735e43c0c84f9d120ca5edd655779fc13c6f88b484f7":104:"83155ebb1a42112dd1c474f37b":"87d69fc3cbc757b2b57b180c6ba34db4e20dde19976bfb3d274d32e7cea13f0c7d9e840d59ce857718c985763b7639e448516ddbbda559457cd8cb364fa99addd5ba44ef45c11060d9be82b4ebe1f0711ac95433074649b6c08eeab539fdfc99c77498b420427e4d70e316111845793de1f67fb0d04e3389a8862f46f4582dc8":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c24c17911f6db4b3e37c46bcc6fa35efc1a55f7754f0bb99f2eea93398116447":"0bd92cb106867e25ad427ff6e5f384d2d0f432fc389852187fcc7b0bf9f6d11a102a872b99ed1ad9a05dab0f79fa634745535efed804ff42b0af8dad20ba44709391fb263f245e5a2c52d9ce904179633282f57a1229b0a9c4557a5c0aeda29bbc5a7a871fa8b62d58100c3722c21e51e3b3e913185235526e7a5a91c559717d":"5098cc52a69ee044197e2c000c2d4ab8":"9ad4dee311d854925fc7f10eca4f5dd4e6990cb2d4325da2ef25a9a23690f5c5590be285d33aaeba76506c59edec64b8c3ff8e62716d1c385fbce2a42bc7bd5d8e8584de1944543ab6f340c20911f8b7b3be1a1db18a4bb94119333339de95815cae09365b016edc184e11f3c5b851f1fa92b1b63cfa3872a127109c1294b677":96:"f7930e3fab74a91cb6543e72":"6124ede608d416baa5e653a898ca76e9f47f08403c1984feec112e670ded2226e0073f8881ab2161cfda541dccae19691285f7391a729f07aba18f340bb452c1da39cbe83cf476cfc105b64187e0d2227dd283dcba8b6a350f9956b18861fa131d3f00c034443e8f60e0fdfcfaabbed93381ae374a8bf66523d33646183e1379":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"d267a8379260036ff3d1ec07a7b086ff75706bad12d37d9656f04776f3d8b85c":"80c68a330ef50e3e516681f1e535868b03466e7edbb86cb385d01db487da3dd3edad940fdc98d918b7db9b59f8d61369eee2928c88557306c4a13e366af0708d94cb90a15f1c3bc45544bdb05ff964da5e06c5ae965f20adb504620aed7bce2e82f4e408d00219c15ef85fae1ff13fea53deb78afa5f2a50edbd622446e4a894":"674dc34e8c74c51fa42aacd625a1bd5b":"6a9a8af732ae96d0b5a9730ad792e296150d59770a20a3fdbbc2a3a035a88ac445d64f37d684e22003c214b771c1995719da72f3ed24a96618284dd414f0cac364640b23c680dc80492a435c8ec10add53b0d9e3374f1cf5bfc663e3528fa2f6209846421ea6f481b7ecf57714f7bc2527edc4e0466b13e750dd4d4c0cc0cdfc":96:"bea660e963b08fc657741bc8":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"c86cb637753010f639fa3aa3bff7c28b74f012ad6090f2a31b0801d086f183ad":"6b7858557e0fd0f957842fb30e8d54dedbc127eb4bbf9de319f731fa28a606df2c046a0bce8ecda4e75d3596e4e988efd6bc279aa005bc52fad92ba07f5b1dfda4cc417029f9778c88d6fe5341a0fd48893dcb7c68d0df310a060f2a5235aee422d380f7209bc0909b2aa7e876044056f0b915dab0bc13cbea5a3b86d40ca802":"87ff6e0bb313502fedf3d2696bff99b5":"2816f1132724f42e40deabab25e325b282f8c615a79e0c98c00d488ee56237537240234966565e46bfb0c50f2b10366d1589620e6e78bd90ade24d38a272f3fff53c09466aa2d3ef793d7f814a064b713821850a6e6a058f5139a1088347a9fa0f54e38abd51ddfc7ef040bf41d188f3f86c973551ced019812c1fc668649621":96:"7859f047f32b51833333accf":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2c31ca0cac3efe467168198f06beacf39565a6f57f82e1048a5c06a231315882":"65261d6e29b2369b1828a7cef2df9873d6e6057c499301afedd6cb65b5036ddb95f9e353fbf38e54c4f46f88164325b33620ce183beb2e411fbb89a0e0002e542fc161cad32a61ee6f1e1717e0b4dcd0340b116f795bc1009dbbc65bc31c9b549bf03c40bc204cd0d02ec884be907777ebeed8b527ec3af7cbb508193c0745de":"95cae6e85f33f3043182460589be3639":"67523751a9b1b643d00de4511b55e4268cb2d18e79e01a55fc7b677d529bd6400940fb25ea6ae135c1a816e61b69e90b966981aeda685934b107066e1467db78973492ad791e20aef430db3a047447141def8be6e6a9a15089607c3af9368cdb11b7b5fbf90691505d0c33664766945d387904e7089b915a3c28886ba1763bb5":64:"21309d0351cac45e":"1d5f2cb921f54aeb552b4304142facd49497837deb1f00d26fbeddbab922fd80b00dba782961f8fce84f1f7973e81eed6ee168b1760c575c891f40a1dae0fa1a08738025d13ef6e0b30be4f054d874f1b8a2427a19ebb071d98365c32316a88a68c2b40daf1ea831a64519ac3679acb4e04986ecc614ec673c498c6fee459e40":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ca9fa36ca2159dff9723f6cfdb13280446eb6bc3688043c7e2e2504184791596":"ac04c4293554cd832aa400c811cb202d815d6178aa1343b4628592b7f3ae45dc5f12ea47be4b43e1865f40b06ab67b3a9fb3644248a9b3efe131a8addb7447978bb51ccf749e75574fea60e8781677200af023b2f8c415f4e6d8c575a9e374916d9ec3a612b16e37beb589444b588e0b770d9f8e818ad83f83aa4ecf386d17a7":"d13ca73365e57114fc698ee60ba0ad84":"2aa510b7f1620bfce90080e0e25f5468dbc5314b50914e793b5278369c51ac017eace9fd15127fca5a726ad9e67bdee5af298988d9a57ec4bbc43d4eb849535eb10521ac7cd7ed647479a42876af2ebc9e2108b539febdaa9127c49bda1bda800f6034050b8576e944311dfbca59d64d259571b6d2ed5b2fc07127239b03f4b7":64:"2111d55d96a4d84d":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"2f802e838250064c15fdee28d7bd4872850355870847701ad9742b2d6eb4b0c0":"e2ca8c8d172ff90232879f510d1225af91bc323bdf636363c2903fcd1790692c8bcb03a1cccb18814678852c6b3a441552e541b843ee5e4f86a152fa73d05aea659fe08aa6428bb257eaa2a7b579fdc4022c1dec359a854253c1aefc983c5ede8c97517ea69fc4606e25f13ffb0f5f49160691454fbb74e704326738353525f7":"2dd550cfd97f8e1d8d31ba5537ae4710":"72b9630dda40306e785b961934c56e20948f8eac0e981f49787eb3dbd6e4607f7d08d10ca643746bf1efa7e5066993683d527a90f2d45ec9cf73113f1f17bb67958be669acd4e2927f1dacfde902cd3048056d7f6dfdd8630ff054efce4526db7c9321d6d2be2236f4d60e27b89d8ec94f65a06dc0953c8c4533a51b6a29bd2c":64:"bd6c8823c9005c85":"f6dd0b5f3d1a393a1837112962dba175a13c2d1e525ef95734caf34949d8b2d63b4fe5603226b5f632f2d7f927361ba639dc0e3c63414f45462342695916d5792133b4a24c7c4cbe2b97c712bf27ab62d3d68b3875d58ffe4b7c30a8171bff1a9e2f3995768faacda2ea9213ff35798b9e4513f6a87bd3f5a9d93e847e768359":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"84dd53ce0146cb71c32776033bb243098d78a22ac17f52a62a122f5653fb4e33":"68222bffa782dcfe4f328fc20eb520e75a9a5fedbe13ec7fcf0e82fba08bb87a8a8e02902638e32fe0e2294344b380797f8028426ffcc0531c739c884892394c48ff0779c5f5edf0a36a3fb8aa91213347774ec4bf0fe1049bd53746b13beef3c637169826c367056cb1aa0a3868e23f886a9c7b8015c26af9e40794662f6b21":"f0c90a1bca52f30fab3670df0d3beab0":"a3ea8032f36a5ca3d7a1088fd08ac50ae6bdc06ad3a534b773ac3e3d4a3d524499e56274a0062c58c3b0685cc850f4725e5c221af8f51c6df2bbd5fbcff4a93ba4c1054f7f9c67fd9285511a08d328d76a642f067227d378f95a1e67587b90251f9103ed3cacdb6bf69e0794e366d8b92d8de37b4e028de0778841f356ac044d":32:"b1ece9fb":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"9bb36fe25e966a075ae2c3bb43b5877679ebc379d5123c8eda3fa0e30b95cae0":"fb3a4be643c10343251c6f0745aaa54349463f622ca04a792e9b4780866844b30aeef3269fc60cac0ea031c5f3780b535e15154f7c76eb4a371b8ae368550f3fa2ce693c34511ec96b839cac567f1b0de0e7e3116d729b45d1b16e453703a43db73f5d0c3e430f16b142420b5f0d26d72ac3dba543d7d813603b0bfdca3dd63e":"59869df4ef5754b406478a2fb608ee99":"ecd125682e8a8e26757c888b0c8b95dec5e7ed7ac991768f93e8af5bcf6f21ed4d4d38699ee7984ed13635fff72f938150157c9a27fcda121ffced7b492d2b18dad299cb6495ed5f68441aefc8219d2cf717d15d5cd2dbce4606fcf90fe45f3601127cf6acee210bd7df97309f773974a35bef1d33df984101c2fc9d4b55259e":32:"cb3f5338":"FAIL":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_AES:"ca264e7caecad56ee31c8bf8dde9592f753a6299e76c60ac1e93cff3b3de8ce9":"8d03cf6fac31182ad3e6f32e4c823e3b421aef786d5651afafbf70ef14c00524ab814bc421b1d4181b4d3d82d6ae4e8032e43a6c4e0691184425b37320798f865c88b9b306466311d79e3e42076837474c37c9f6336ed777f05f70b0c7d72bd4348a4cd754d0f0c3e4587f9a18313ea2d2bace502a24ea417d3041b709a0471f":"4763a4e37b806a5f4510f69fd8c63571":"07daeba37a66ebe15f3d6451d1176f3a7107a302da6966680c425377e621fd71610d1fc9c95122da5bf85f83b24c4b783b1dcd6b508d41e22c09b5c43693d072869601fc7e3f5a51dbd3bc6508e8d095b9130fb6a7f2a043f3a432e7ce68b7de06c1379e6bab5a1a48823b76762051b4e707ddc3201eb36456e3862425cb011a":32:"3105dddb":"FAIL":0 - -AES-GCM Selftest -depends_on:MBEDTLS_AES_C -gcm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_en.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_en.data deleted file mode 100644 index 23d1689cc7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.aes256_en.data +++ /dev/null @@ -1,675 +0,0 @@ -AES-GCM NIST Validation (AES-256,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fb8094dd2eddb3d8004bb79134023ca2be4de9b668a9e4608abdf2130e8becb8":"":"491a14e13b591cf2f39da96b6882b5e5":"":"":128:"80883f2c925434a5edfcefd5b123d520":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"725313f4cb3f6a0d29cefc174b7e4f43cef11b761ef75e1995cb64c1306795f1":"":"27d1ed08aba23d79fc49ad8d92a2a0ea":"":"":128:"d5d6637ba35ef2ad88e9725f938d3d2d":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4e766584ce0e885e1bba1327e5335796de0831a40f74a5cec178081dd15bfd10":"":"cece0dea024ff47851af0500d146cbfe":"":"":128:"1abe16eeab56bd0fb1ab909b8d528771":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ce7f2207f83a952451e714ba3807ddb3ed67c2739a628980411aa68366b1f2f5":"":"652fd951ace288db397020687135a5d1":"":"":120:"985227b14de16722987a3d34976442":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"855f8fa4ec6a1206173509d504d0b29dfbfbfa9aa528254b189cd72e6ebc1c1f":"":"1ad1507e6463e4e2e1a63155ac0e638f":"":"":120:"693146a8b833f324c1d4cbeeb8c146":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ef8dd1294a85dd39e366f65e1076d53e046188c06c96b2c9e84ebc81f5c9f550":"":"9698a07447552d1a4ecd2b4c47858f06":"":"":120:"b00590cac6e398eeb3dcb98abe1912":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"25896e587570ff1823639e1e51e9c89192d551b573dd747e7c0c1c10916ece4c":"":"f0516457c09c372c358064eb6b470146":"":"":112:"5a7cadec600a180e696d946425b0":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"02fc9cfffbe72e7954182993088e09d24ea8cad91a8ca9a336d9f1fe4156486d":"":"0e189e162e097eb2060b30c46d9afa70":"":"":112:"7d3d5cc55e6182ec5413ef622d4f":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f24e3d631d8961d3d4b9912d4fa7a317db837a7b81cd52f90c703a4835c632e2":"":"510740bfa2562ce99ca3839229145a46":"":"":112:"1402ddc1854e5adb33664be85ad1":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"720ab5aceb80ff1f864379add9b0d63607227f7c3f58425dd6ec3d4cea3fe2ea":"":"58f2317afb64d894243c192ef5191300":"":"":104:"e8e772402cc6bfd96a140b24c1":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f57dd16fa92a8f8c09d8f13cb5b6633a43b8762e90c670232f55949cdfdf700c":"":"3b7c14ee357b3c6b0dc09e3209ab69f2":"":"":104:"43e609664e48ad1f5478087f24":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"87c17ab919a4bc0d50343c0bb282a969283c2ada25f9a96d2858c7f89bc5139a":"":"02813d3faf30d3e186d119e89fe36574":"":"":104:"d1a1f82a8462c783b15c92b57e":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dd8d5b6c5c938c905c17eab9f5ab7cd68d27f3f09d75177119010d070b91e646":"":"1df1c3ad363c973bffe29975574ffdf6":"":"":96:"749ac7ffda825fc973475b83":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4d60a14cb789099c77b8991e7b0b40f787d3458f448501e8108e4d76110f94ef":"":"ca6b3485eb5dcd9dbfa7cffcdb22daa5":"":"":96:"3f868b6510d64098adc1d640":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"405b690717de993ad945d80159c2800848060de0b7d2b277efd0350a99ba609a":"":"63730acb957869f0c091f22d964cc6a3":"":"":96:"739688362337d61dab2591f0":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ab5563a387e72d7d10468c99df590e1de25ec10363aa90d1448a9ffcd1de6867":"":"c511406701bad20a2fa29b1e76924d2f":"":"":64:"390291ed142ba760":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"abef7c24daaa21f308a5af03df936ba3f70aa525190af0d959d6e50d836f4624":"":"e9f15950130b9524e2b09f77be39109a":"":"":64:"db2fb2b004bc8dc4":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6ca630b0b6779a8de7a19e5279eac94bf29f76f8b0cf8ecf8f11c4f8eb04aa0d":"":"7373befc2c8007f42eef47be1086842f":"":"":64:"e2b8620bcc7472a8":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"acea7818a71df2c9840aef1c10ecbe2bac7e92216388416a2f36119a0745d883":"":"6d46aa39fb5a6117e9adf7ee72bc50ff":"":"":32:"fd5ff17b":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b301036d4b2b28b8a4502925986861eba2b67c24cb0c79c63fd62195d9b67506":"":"bb6f398e5aed51590e3df02f5419e44d":"":"":32:"47f3a906":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"89576d2aac554c8982c7df0053be9ab19f4bd80ba9f3dd433c1c054d68e68795":"":"aedbd482a401a7c12d4755077c8dd26e":"":"":32:"506fa18d":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"43c9e209da3c1971d986a45b92f2fa0d2d155183730d21d71ed8e2284ec308e3":"":"78bef655dfd8990b04d2a25678d7086d":"9d8c6734546797c581b9b1d0d4f05b27fe0539bd01655d2d1a8a1489cdf804228753d77272bf6ded19d47a6abd6281ea9591d4bcc1be222305fdf689c5faa4c11331cffbf42215469b81f61b40415d81cc37161e5c0258a67642b9b8ac627d6e39f43e485e1ff522ac742a07defa3569aeb59990cb44c4f3d952f8119ff1111d":"":128:"f15ddf938bbf52c2977adabaf4120de8":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"fbe2d52b7f50bf23a16ff8cd864215034fdfbf4d1506ca3c1ffb015653efe33a":"":"b155f8ab1a8c0327789cfb8310051f19":"ed8d14adf1c362bbaf0d569c8083278e8225f883d75d237a4abcd775a49780603e50c00a1b5b5946c085e57a749b4946f6aca96eda04ac9944a7d3d47adc88326ed30a34d879dd02fb88182f9e2deefaeee1c306b897539fa9075bda03ba07b4ffff71ce732ef3c4befac0f18c85a0652d34524ccb1a4747ab8f72ed1c24d8fc":"":128:"c5fe27ca90e5c8b321cc391ee7f1f796":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8e888721514fd01fb67513cb56bfd29af67a9ce525e3e697af47450f02053161":"":"9f6bd4a93e4f3f2f5f4a7c2c5b4790bf":"867d50923967535ce6f00395930083523c22f373cfb6c8817764f5623cd60b555572404e54f2fe7083ef32b9a4593a1f70a736d6e8fe61b77def51f3b1d8f679d3a8d50d0aad49e51ec1eb4d4a25f13d14f3e5253555c73eac759e484c6131cc868b46c18b26acd040c3e1cb27afecba7b7fc3f5ff4883f4eafc26c7f3084751":"":128:"ea269094330b6926627889fcdb06aab4":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d8f82b07e7319ca607c9aa0352070ca883dd7b32af370a774f63b0270f44835a":"":"e89e4484497cb728f86585d8918b7fae":"42340d96e1852de3ed5e30eb4a05e1fb222480b450e2bf4e2cf0fb2a525eb6602ef43a896adc5c52ea5381c642b2175691c014e7a6dae91fa6ff5b95c18a2dd2e8838d3abd46ace0b305f3f22d30a0bd82a81bbf6753362b54b0624c76c0d753e30eb636365f0df7e1bf8bf130cf36062ec23f58a3f7ed0ae7bfbbd68460cd76":"":120:"b234b28917372374e7f304f1462b49":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b49b04a54a08d28b077ea54c18bfa53e916723e91453b47f88e399046b9b4dcc":"":"6276c577c530f91b434ce5719e1c59de":"6b73f996c49e368fc4d21816153aefb081509f9dc0916dbe4fdf77f39867a2bd617b8a75f39f515b1bc1454009d5247efcd90ba0d4a6743c6f12a929b666584f3b55254c32e2bab2321f94fa843dc5124c341dd509788a158191ee141eb0bc4e1b96f6987bafe664a0f9ac6d85c59cee9564a27bcc37dffae80c57fbf7e748ce":"":120:"69dd5bdeb15fdbc3a70c44b150f70e":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"398bb37bb991898c7dad7bf5930dbad20d121f68d5ec6c56ffe66f23c0c37f8e":"":"0c3bd55b54c1221b0cf25d88ea4dfe24":"4c48b929f31180e697ea6199cd96c47cecc95c9ed4c442d6a23ca3a23d4b4833601ac4bbcdbc333cd1b3a0cd90338e1c88ef8561fed7ad0f4f54120b76281958995c95e4c9daabff75d71e2d5770420211c341c6b062b6c8b31b8fe8990588fbad1e651a49b0badd9a8d8042206337a1f2aa980b3ba3b5ee8e3396a2b9150a34":"":120:"8528950bd5371681a78176ae1ea5dc":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8e8f7c317b22dea8eabe7eaa87413a98ff56570720985b6743a5f9af56387cca":"":"3a9a5a839045723afdfb2d5df968bfcb":"a87d95f8f47e45a1c7c5c58d16055b52b3256c52713fd092bcd6cbc44e2c84669f23ca2a19e34163ee297f592f6054dbc88863a896c2217e93a660d55a6cd9588a7275d05649940d96815c7ddfa5fc4394c75349f05f1bcaff804095783726c0eceb79833a48cefd346b223f4e5401789684e5caeda187a323962a1f32f63f02":"":112:"faad6a9731430e148ace27214e68":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"67c95e57197f0e0bbaaa866d337fcc37f3a10dc55a059f5ea498de204d2fff61":"":"5f171d203c653a316cac43df99f4033a":"84f281b388ca18bc97323657a723a56260731234720b02b6dde00ea134bd84a1893bec38af80214c4da01b93958ab00f3b648c975371e565d5b6bf2a8f63c0f3cfcd557c9f63574390b6ae533085aca51fa9d46cd2478b7648b6dcbbac7e61197a425778debe351ac2110ba510a17e2c351ba75d5a755ef547cf9acc54650222":"":112:"9ea9c716e06a274d15a3595a0c41":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9143f00e31c72bd9fced31585d047f67f1004e6244c3d9c10c8ae005feeabc84":"":"e49cd6af9a2f0da2a7198317da92ab2f":"ab9193a155140d265aabfe2dd5efca7d3fa6129498532bccd77f09fa1a480702620b3ab53df91b01262122f1a6fc387b5fc55dadfcdb99ada83d4a5b0666c8526de309f41eb54d69b52595c43550a6bf7b4b8f0e0c48311b521762eaa567744c4c4704dd977f84068b59db98a67e33cc65302ba59360d600a22138c5ad3317f3":"":112:"8293e361fe0308a067f89aea393f":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d0ba180075c373116bb037907b512add00ba9a4693a8ecc14ca0d79adada90e3":"":"5c1501b19cce5404dccc9217ac8253b7":"3a161605ec0055c479dd48cdaeed5981b8b60fb7b7781cc4e580218c7014c3060a9f706e6e16cf4021e4d38deb512534b484ff23b701975bdf901146ccaece9c3ffbbeeb172cfb64a915ae0dbe7a082b9077776a387b58559a881b9b79b90aa28ad1ac0f2bece314169a2f79ea4c08389f7f7dd10ee2d9a844fee79e7bf38bcf":"":104:"0541262fddfd5d01ff0f3c2fb4":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c975c7e59133c231d1b84c696761c413ba20aff7fb7d854c6947e65db3cc57b4":"":"d8fedda4cccaf6b0818edcfa7b1f03fa":"cb4cc9171367d6422abfaf2b4452da267eb9ccf1c4c97d21a0a125de486997832d16c7e412cb109eb9ac90c81dfe1a1dd9f79af7a14e91669b47f94e07d4e9bd645d9daa703b493179ca05ddd45433def98cf499ff11849cc88b58befbdd388728632469d8b28df4451fc671f4a3d69526a80c2e53e4fdee6300d27d97baf5f4":"":104:"77ac205d959ec10ae8cee13eed":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a86ec688222c50c07274ed2d2c8ae6f883e25f8f95d404a7538fd83224199327":"":"99c73fdb8f97f225f7a17cf79c011112":"cf5f707de0357262c0997fa3ebfe6e07192df8db5f029e418989e85e6b71e186b00c612ecedbfe3c847e58081847f39697337ae7c815d2cd0263986d06bf3a5d2db4e986dbe69071fd4b80a580f5a2cf734fc56c6d70202ea3494f67539797252d87cd7646296932959c99797a0446532f264d3089dd5f4bcceaaa7289a54380":"":104:"c2093ad4705e613b09eee74057":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d3981f0aa1ed8cb369d9b0d7b0e529ec6089ff2d226c542885b1bff55276e891":"":"7331f91bd1a67c21c9dd336a2a922839":"406d9cf45fc8618d564154241dc9c006ecdcd847406e5a6e7127ac96e7bb93f4c339ff612c514b6f66df95a0845035d7535212a2aaeeb0ee512d1f4375c9a527e4e499389c2d7f7f7439c913ea91580e7303767b989c4d619df7888baf789efd489b08eda223f27da5e177cd704c638f5fc8bf1fecfcd1cab4f4adfbc9d1d8ba":"":96:"dbb7ec852c692c9a0e1a5acd":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8436967f97c59ca73b760b73c6e088d1da4e76b712188ab4781d8d849505ae47":"":"9401dd0998914645668d06d518bfe7d7":"a5f40906177417097c19a0a21dbb457a694e173141837f695b09c8eb58ac2ce28aace4e59275b6266da9369a9905b389e968aefc64d78c7e1d2f034ef413d3458edcb955f5cd7971c28cd67dc9901ef3a2abc6121704bb5ecd87a6568d0506abbc87a2f10205dc8eb0cd1b5109158d0e743c2c3a342d60b8d55bbcb8d8507ed1":"":96:"dd6d988d352decc4e70375d8":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ce6b846bcedc6ae747e66e72cd9f7664e6cad9627ba5f1f1923f3d3a6ed590d1":"":"ac865ff8a6255e501b347a6650510d05":"1658b9f8469af1dfa60458cf8107db1edd1e4bba70a0bd23e13e1bba0d397abf51af8348f983fcdfcc8315ef1ffc9a26371377c62ddba08363bd2bf0ff7d0c3b603fad10be24ecee97b36d2255a8b2efc63f037123cef4bb4fe384aa0c58548b2f317c36ef3ef204b24769de6ba3e9d89e159e2bf1f9d79aeb3eb80c42eb255e":"":96:"7ee87acd138c558455fff063":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0038ecf1407bbf0d73afa5e010769b71e8649c4249345dcf923ef9da0254c6af":"":"74c6b98fc6ced3a59bd9c42d31d71095":"467f483c71c3404fe7f09d6f6b6b64c3b7613a0dd32470cf24bc590d3994a48f3e8cd5dc19ea8ca7d5366ad7c5ad31cc9612dafedaea109dde2aedfe5fc2a0db2c903dd1dc1a13949720a10babf37fba5a0ed7cb5f3dc9eb5a4d8331f218e98763e7794b3e63705d414ef332160b0b1799f1ff5cbe129a75e5c4e0a4ed35e382":"":64:"62fe088d9129450b":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"19fc4c22151ee8515036c38bc5926c0e0bbd93db5d0fc522b2a6bf6298fed391":"":"9547f056c6fb9ef72b908f527cb500c1":"511b15c25b2a324159e71c3b8e47f52d3e71e5bc35e774c39067250f4494c9c4eb184ecbe8638de9418672d9ae2c6a0e7f54c017879ffb2a371de1639693d654a43cb86e94a7350508490191790d1265b99e7b3253838b302aae33590949a8761a3bb2aeb1ba798cddeb00a53daad05a33389d4a19269d65116a84f12dba5830":"":64:"04623912bb70810e":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3b5d3b1920b5a105b148153ae1f1027c6d48bc99640ea853f5955fed4eb3d625":"":"9a4091c2eb7e88759bd9169fee303485":"aa680d07143ba49a9099d555105fc3cfcb898cec11ade96776dc9778cc50fe972e1e83c52c837b71e27f81d1577f9bd09afe2260dfd9a5d9dfbd3b8b09a346a2ab48647f5dd2ff43700aecce7fa6f4aeea6ea01b2463c4e82ec116e4d92b309c5879fb4e2ca820d0183a2057ae4ad96f38a7d50643a835511aedd0442b290be3":"":64:"033bfee6b228d59b":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f6c4ad8e27764157789252f4bc4a04145cb9721955330a2f6a2a3b65cacf22bc":"":"3de136cbd75061c888226efab136849d":"0f6951c127d6bc8970e2ad2799e26c7fb9ca31d223155f88374984b5660626c83276ffa6c160f75e0e1bcfa96616188f3945b15fc1b82a4e0ee44000a684b3c3840465aebe051208379ef3afe9f569ee94973d15f0a40c6f564fa4ba11d6e33cf8ae17854a9e12360a2b8495e2cceec463f5e3705c74069ba37ba6d725f458c0":"":32:"f658c689":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"30cd99fed9706c409e366d47fefc191f79bcc47a28be78f9890fd90d4864eb85":"":"8c7ce34691503bf14c776f8809f24e61":"4b6b10c2e2905ab356769b6453dd160a08e8623b0878fcc1c1d64822f0aea1f4f5b4698ded5d23ebafa11bc1e4ce9e5cd7d7c7b13de02d11a945ba8361b102ba49cdcfd6a416e3db774cd7bda024fccd1ad3087560dc15bbfe9b1a5c6c71fae17a329f104f6c2cba7eb6a7459535ca328146d0ccc0a9bd28a3d1c961947a3876":"":32:"7777c224":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9472f2452933dcfac4bb22831ce83c6a1ddf25ef8d2d3ba59d72b0d173a986e8":"":"18fb2c34b0955d712960009617d300ef":"d283dd75cd4689c266c8e0b4b6586278aa2583c7c41bf12bd1cfdef21d349acbbabc0a2204dc4130f922949206c4fbdce3786ab8614e32908838a13b6990453abf14b84f5812e6093644accdd35f7ad611ea15aefae28b3cf1fc5da410bcea4f0a50d377fdcceffe488805bc5a71fab019b12fa8725d6e7c91e6faf12fbaf493":"":32:"c53b16a1":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e06d5319210f4107ea7267fa2e8183fcbf74fd3b0579b856577177d9cb307d42":"2b9179d21cb884581b0e4f462455167f1f7899717245d4aed3d8db5983daccccebfc2130a20c284563bea5997cc0438c83d8fa7bb9e3588efed285a0fcc31456dc9a3122b97bb22f7edc36973475925828c323565e417ec95190db63b21881016b5332f2e400bb4724c86a8ee0247149370ee5412f743dc6bf7ca5bcc31afa0f":"f2b0564705430bc672964b049115e122":"":"3fa342a76cb5d501e6a6fade14aab54a76620e4ea2287147d4ca2b9d62d2a643591e5df570ef474ee88ad22401c1059e3130a904e9bf359c4a6151ff2f3e4f78ef27a67d527da8e448b0ef5cdcfec85f3525e35f8d024540387e4cdcb1018c281a1af7d4a3688a0fec4d9f473c816f7d4c4c369f70d7dfe8f1b7fa4f581098a1":128:"18f186ed1ee1f4f8b29db495587d0ab0":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0dfa834e98b6c51ee925dd9edc9be72c209ddcd9099ded57b533f2236895a229":"7f4e4f11091bf51976c0fc71ecbcd0985cdad2135549c818c09567801d8a9a42c719aab7dc2cb58a10b5067d14c52cabe6bb9b939e7b9cd395eaf10ba6a53fd2e6446e1e501440134e04e662ef7ebb1c9c78bbd3fd7cb9de8b985418be1b43ebb5d7902ccb4c299c325c8a7cc1de9174f544bc60828c1eebad49287caa4108a0":"a101b13b238cfac6964fd6a43daea5a7":"":"bc60d2047fd8712144e95cb8de1ffd9f13de7fda995f845b1a4246a4403f61ca896bd635a1570d2eb5b8740d365225c3310bf8cea3f5597826c65876b0cbcfa0e2181575be8e4dd222d236d8a8064a10a56262056906c1ac3c4e7100a92f3f00dab5a9ba139c72519b136d387da71fefe2564d9f1aa85b206a205267b4cfa538":128:"c4cc1dbd1b7ff2e36f9f9f64e2385b9e":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ce59144b114ac5587a7a8079dc0e26f1b203338bb3e4b1d1d987bddc24150a82":"bc7aa1b735a5f465cffeccd8dd4b0a33a571e9f006dc63b2a6f4df272a673bb2cc00e603248ab6be5627eebc10934fe4d1dc5cd120a475936eefa2c7bddea9f36c6c794d2c6bd2594094e56cac12d8f03e38f222a7ee4fc6c2adffe71c9c13003e301c31ff3a0405dde89bb213044d41782c4bb4eb3c262595d1c0e00522047c":"fdc5a40677110737febae4465b1a76cc":"":"084c31c8aef8c089867f6e0ce6e0aadafa3016c33c00ca520f28d45aac8f4d02a519b8ebafd13b9606ab9db4f2572f396091bc5a1d9910119ca662d476c2d875a4ab62d31ff5f875678f25a4775fa7fc85b1a3d442fb2c5047a3d349d56d85f85f172965e6477439045849a0b58014d9d442e2cae74709ed8594f0ec119d1d39":128:"4c39e0d17030a5f06ecd5f4c26e79b31":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e7a6b459a5370ceec4d429bba9472a49db07697dc66dbc2f294d3e62ffc8aac1":"cb959e5611a636317feb5265d33b315c2f5af64159029f0032e338babbdb0a525ba6b92cb3be7db9f0077561e6cffe1247bad32dea8918f562dc3cd83225cdbcaed652b87c62fea8eff153638a3a14ef9f9a88bcc8c9a6b65fa9dcc53f63d1b14fb9bb0baf17e7bfb95690c25cca2c3097497e41f7e2299a8518d5d1c5f6264e":"92468d42ad377affa7e808d95d8c673a":"":"599dbc47e2f2e3b06b641c510b238417b01869f0e7d08619752f6d9f4b08585731deaeb439ff26e02d7e51b45ca5e3d4a779fe4cfc9572d1d6407f98de69a8fca60bf01d1a769130bb38a67933a2be3aa3ea1470d8f32a34dc863dc800feb7ef71588edd9489bd59a23685ff5358f9b562fc0bbad9e11db7a6fedbd79225539d":120:"e853262ed43e4d40fea6f3835d4381":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9818904a99e3d80c95dc71a16483ade1b9b8e7df638ce6a4c1d709a24416cbe9":"2c073cdc11a8d58fb55e1dadbbc0372dde86c387fa99c9249bd04cb2f2d239de01bec8c8771a9fb33664ee06ea81c37a824525664054173b63a2894d8d7ffc60b9e93052802478a189be5835d979a28ce7025b219add0622f97c9bcf3ecf629b56408ed002a141061320400409345e94a7a7e3906611305f96f2abc9d62cc435":"96a301ab6bc0309be9735bd21cc9e10d":"":"4876e449b0cac09a37bb7e4b8da238f4c699af9714ec4fcf21a07c5aee8783311a13149d837a949c594a472dda01e8b6c064755b6328e3ef8d6063f8d8f19cfda3147b563b0f5fb8556ace49cb0f872822a63b06f261b6970f7c18be19372a852beadf02288c0b4079587c0f8eab1858eeec11c6ba8d64448282068fddd8a63d":120:"e1e8b62ce427e5192348b1f09183c9":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9b34f137e3f37addad8a6573b8b6dac9a29e97db53c0a7610f37c72a0efaebfa":"c1e09c432c68a2c119aeb3b19c21180e3c8e428e12033f416a92862036f5e8a39a8893b10fe5476e388d079143ee0b79b183a3400db779cfbf1467d69887306b124a8578c173cd5308d4448eefcf1d57f117eb12bc28bd1d0ff5c3702139655197d7305bda70181c85376e1a90fb2c5b036d9ea5d318d3219132ea6c5edf7b7d":"50dddb2ebe4f8763509a63d07322277e":"":"793e1b06e1593b8c0ba13a38ff23afaa6007482262bc2d0de9fb910f349eff88d3dd05d56eb9a089eed801eae851676b7a401991b72bf45ac005c89e906a37ed7231df4aeeeb1fcf206ca1311117e7e7348faf1d58acc69c5702f802287083d3ed9e16cf87adcdfa1bb0c21c40c2102fd0def91985f92285e6ea1cdd550e7f50":120:"b3c6ae17274faaca657dcb172dc1fb":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"66b40e2e671bdf244b45644d1a5adc63011b32156ba9f5e03dffacc1a9165061":"985546ee12ba89d95988ad8a4153c4f9d3c91c0e3633a95b4f9b588bba0032006c93210514357c91d574b436da13dc9f68194a981e7b65eb79e56be9cf1dabfdf531407727c034a3c7743bb22aa02b26f159c2eff3c7ed52027de2e8b8b2fefb72c04fbf20a1ffe10d6dda790a9812cdbe9f2ed6706d7a2639e851a42870efb8":"4e090871e889b4be36db5e1df1ea283d":"":"f93eebffeddfd16b4618b893d57b459b704b894b38a5eaf6cce54026c80090be8328e12261e1b10e81c73ac8261c2982bb25603c12f5ffff5c70b2199515c17200db2d950a3f2064d7b362607adbf3686f27420ec15e18467e86faa1efa946a73c8888b8fdc825742b8fbec6e48cdabbb45f3cd2b6b6e536b6fbf3429aebe934":112:"ed88c856c41cac49f4767909ac79":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"18c5105a9651144ce965b4270398b982120b885850114571ef8e2cbc5d2f5e04":"00c5ea3d91248bfe30c5a6d26dbdf0609f977afcfa842b603c1061b2a473c9a79b421b2509550309e4be9c5015c51c6def9ee68c242f6e206b3027ce8e58b7ab96aaa50ced1d78c2dfcbc2589575bec2ce3b6a5066276fe7dca4f1118808d1e5cac062667053c15350289da03cd073377c2d66c01e3098ed01b75788c7e1f9e7":"a3a5f82748acc887e33328fd7f4ce1fd":"":"d91ed6886a269dc1eb0745dc4b97fc54cbea5e6857d10a303a3caf828b4e0e20bb742bca17021b7852d09a6d7d3a56ad82298c15a2082fed0e0e326bb16dd677ee262ead93a24147de3c07eb8a95b108abf17357155f1de79171689407b6545c9fdf8ab4486576490430c0e043e21e7c40ce88e752cb006cb3c59479a7e56cf7":112:"add4e086d612a119c6aae46ba9e5":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4667cabeb3a644e371cbbe9195413daab025cc6efc12298bfaea0dd9bc028f9f":"9772ec47f3cd26f091bf117e085f2394db258c2c460dc3b1402edcb60a8f70517f82aa669607b78c2ad79c662c3b376cee1b9f34c4ec5d15319c33de78a440e7f2a4108c3c9da51604adde2025ff1dc336c49279c13a7153931df675df0e78f17a4d72973311af74fe755c85c7869baf3896bb738925942dc67f1b6e690c9d48":"7e8927c69951d901494539ab95ac5906":"":"5d62fa69cfbfdec30193408dad15cf983ad707ee921068b817676eca9f70f9ca4623a8c113df5fba86131415f4ec546c7f1a94ff9d02cb8ddcf421c7cc85ed87ce712fcd8d5f45460749ced0d900fe0368c59b1c082bd5811c1a648a51768d5e4bfbc23cada3791f289d8b61fd494398be1ad9ee9ff471abb547000ac2c1a5d1":112:"0ae6bd5e8c25d1585e4d4c266048":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3d58cd514de36ca7848aad1bf4d314b3b3415cae1ce9a169021ae84a67d4ab69":"e1c2e79e3f64c5c64f853ac9ba1a853fbf1bfd3001d48f7e73e0e97aa1b8ed1f1a7066178e75df688c5edb1c42e270ea38ab0e246c6a47fde4c3141436fe4b34beb9033ba7eebfc53cf1f6c8ae1794e9bb536152d196e1b96803316a05f1dcb9016c8b35bf4da06cd18da6243acc3a3dc641d3a1332b1915932ca89937cb0327":"4a1c2e7a3f9788c3c2fdd0dcc0cfe84b":"":"50d63c660a2b4f8e87276c5f58556cdf15d0fbb2c8ea5e3266d28c515643109aa7fc950d6d48f504dad52457e16576b581d37574574cd8b7ac12b7d59b819992c941a27e23ef9f257ed0c4ea4eda6c1f3b28b44decb63a92fae84c3556dcb9d6458e729dad6a7db9f7411690fce971b3b240f8f9979ed992f87d76e227fd7384":104:"ac842579bdd1ac77c84dffac2d":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b7e4cd80f03a7ed092c776b243dfad7776d9caf3e679939038e33ac94d8931de":"102e2d2c0d01dbc69733d2451d1ac1817d60418685d4ae8aa44e1ede1c1e08d2f71f0aef41a72bd9f052ea4a9a057330c95d964f8c3679b80fc9c0952b46f38e2ef055cb33703d686757400210fa5a39bc7e3bb9b8b9cc20c95d5607e2f10bb5501507680ef3aaad96553333b1d27bf2f7ac102c983eede2262a5c6237c1d754":"af160a983d674b7d19294f89c3c9307d":"":"6bdfae299d796ef36850327b091ba7bb02e29b643ca4c8bc199eb91ecbaf88426412cfd5570e0042cab735cc46ec648b0877955b3f9a5707d56c478aa77ae5510749beb1e44dbbb37791f18477123436a985e5e9f79fda0a057504847e4ecae841f24e1b53076d3efc6bdea2ebb336ee0e4b5e6ea973e3e50a27b5c2e6fee3e2":104:"fdf21e2ac356e507745a07fc96":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3a0c46eacfe85cbc0c5f527b87cd075bdeb386d0ca6de816a87cfddcb8a87ae8":"6d1203dc8395e35a35e234203625ea9d37d1c009db2ac8b1d5b29021997b5421f1d172f4c9a7eb7dbb67f0002720fc412f5b1550c739a2d7ba4387a1f978bd548fe6169d9473893782b10fab99198cb8b4553dfe27583c017136fd8c95070d8d7f9a602d15248d38d728157a0b26404e662f9a5554d3e1582bc0e12f0054792f":"b1cde63ad2ad4b8a7bfb36ab78385c3d":"":"9de3a45c976d32ed2af5074ef13b1f86f35b1689b1c698b2e427d5dd62556eb14439f77cd8fcbe686a9a08a922e3f54a78e86fd284de493a740586360b63da09bc1d001777582969c679db54a0ddb8d7dfdb46750edc882804a1c00e417912b72b4cad54dffa1897eba6188b3e61ebf0c3dfab292c2686dcb9db3012e0788c7f":104:"641896daab917ea3c82524c194":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4d540e0ba27103667eb4511ce9d243592bccb8515ab59896c9922cb5f1b47a02":"d79f9b1c74e3141f188704c8d5bdaaf6083642be50d00f20c97b56646863895250d131e00db0ecf4f035d42f08cfe20f401c2d3062a38daa0b9e7c19fa7c5d344680aff48d506daa181451f6b34ed9099b9a5b39c0166e93ac4463c9ad51f48e3063b1c16793615336f55d516d079f6c510c2891b97aaa95e5f621e3b5202620":"a2ed37daa797522a39b01dd206d06514":"":"6a891bd289ec05990424a2775287f4725aecefe1ab21fa0ca643f37829cae9fcbbf805b883f807102ff12f1a85964df818057daedd41c7349ef32b24642186c45d2858c3260d5b90594969e26b691963ac7fbd2eb4eef466ae690ca274d9194dfc4df1c3baec02abc38fbfc0e2c7c4fcafed227d4f6607329f57ee439435c714":96:"9074ecf66bbd582318495158":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"151d7e4db9e21c87bef65c2ac6aab5b6b045b7dadaf6424644a91e04ba810585":"0984c5d3f68beba1db4e6ade429cb8954cccaba9fcf4d852897ef69f8483428932c8f18a891f54b68f7d49a03c57f7144d802eb996d233cec930d5eb19f43d0faf9c94a2d7aaca40c8066a2882481f521bb5f6ba15b213810da373817eab3d52b5dd143a1521239482fbf4a07fe68c3d35c90c6ce27b55e40abcf432a261dc58":"49e0e0d089e3574fa5a33c963b403ccd":"":"6938d8a7625d1291f249ef1e086bb030ccdc844a9271fee16db60e7acfe4aedd720de76345109d5e6849fd1576c0fe0c34e73dca4011f8565cffccef427198c927f19f63b821f43844d008ceee0566f0d8062d7860e92ebdf21dcde80039a04504cd8ee94874b2eeb038962a74ac9902d9d7ce09afdac7aa706bf3892de19531":96:"48d3a8116213f92bfbe86bfe":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3e9615515ca45109316cc02bbf3a23406eeeab2092dc6614db76e4e047a3b023":"46c4c6bad0f21172094ae07a47fd76477b69ca75cc08970e8dbf7b8644d4bcdce96f9d15dd3fba5fba3f851af145652ad004ee525d180d2f3e03bc0ec1c0e8ffebc1474c342732b7247f657ba87ffcef9333857123f29c4976b048c89c24107529dc5dd69004fd176eb0ca6ddae1df7be7d28b3b9da976413588f20c1fff488a":"c1facf73da64e16e4acee3fdc3cc6b10":"":"4415dc96d3daf703d392ba1318254143a58870e691570ca6b1be6074dd9c1feae12c72f9314fc3d19b6affb59b642ade6c4e64b7c99f850bff781de193cc0a321a29356addcb0918a282e53801541b5b01383fa7624c36d1f67423f02d2b54f58deca582b7031d192a4d32bc154ae1149cb3c5b48538c803a8d01fa7cfc1683f":96:"322d8d1b475a7fd3d0c45609":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"52c1a14b4ed57cbfa317fe0db87528f4c5551deb9ffc88932589e3255b1d3477":"eb9081e19b63c94b5f3a696c5fc2c0b7f434e1574394d0b41dd67dfac28a73d4ba26c86b3728b2802fb9d0930c89586b09602900d33eddc5a00a4e98881b5acd5597aae9b80b1569ede74042948f2cd66c3eeae227ae10241df001c85dfe8a5fda0aa21142ecade76290dfdd4a27b6ff3a932dacc0b5f461501239ae8d6d5f41":"36d02604b5b24f49b08bb01053a23425":"":"12fbea9e2830ba28551b681c3c0b04ac242dbbde318f79e1cb52dba6bdde58f28f75f2fb378b89f53cef2534a72870a1f526b41619c4b9f811333e8ee639be1250a5c7e47ecbee215b6927ecffaf7d714327b2c4e8b362b1a4f018ff96f67557ca25799adfac04dd980e8e33f993051f975f14e05be8b7342578d0c9d45b237a":64:"01e6af272386cf1a":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4d08a07b3e94025523a4a6415029c8f9e11fbbfd72564964c53b8f56f865af0d":"4ac7c27b07a4aebe5caf1de0538d13a56e8c11bc73713bf78c7abbad3b9f6d690e00487267da108e2f2ae67c24b4657e77bb83e2d5e4b244cf34e924cf7bdb443f87ac8cdb374147449f8d06eb517a25dc86f03a389f34190aed5a7faace03ebf646fec2b173b2c15fd5cbe7c5affb6c3ee6d1cace8b00dd8f668a2336da5bfc":"98b745c7f231ba3515eddf68f7dc80f4":"":"337693c5c746d8fcdf7cd44d8f76a4db899402b891176e85b4c549c366ad709322874e986d6b939a350d2a0e3b77924d6d15454d882d1d3c94469d749a20d8f0116504cb31888a1e81d3abf25dbb7a7f9e7def26b9151ee649c059da1955f1716423c734dcd26a548844abb6b64c44383ec698e59361b6582c6883b77c338342":64:"7a9266c4e5ae48f1":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b9d9fc42b58deafe9bc9734f4129dcad34a2e55ee5ad8abcc3f7bc42dd2c0e05":"11dbcd6cd53d2af766a1b6e4af2bc8bac2811ef818da2d1f81c140ab6e0298e958fef033736bc6e0dccd660b9a3e4222bdf3f89a95b206785d22852201e6dd00b44232ef3c03393893813dccf1960410b50cf50602ead8bd246fad88e66c88b50821578004779b6c45c13d8211df1cfc0fb2d7a342f58e4f2f3623fd31b12c30":"67931493096f4550633c322622bc1376":"":"66ab6e7a547705d8ae8ac3cb9bc5fbbc18cd220f89aec7dfbf4f72e7bc59b483c50c9471523c3772efc5deee3a9c34c96b098842cc42f9b7d7c0d2530f45900eeb9502e4dd15363b0543c91765121fd82fcc9db88fe6a531b718c1fe94b96a27856d07707fced3021cca9cf4740833d47091797cc87f57f5388b48e2296ff352":64:"0de60d4126733404":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"97e736a63870546ec9c2325a8e367c8ea17a7ffa71f6cadd6909a5bb9eb12814":"608280a9dcbd6dd66100a9fdd00e6dac2183e32c945b2b4d255c048243bfea15aad1a10ff3eec0ba79c531239b489a5dc155dc2775519f8d3d2ed82fa7ac653fb7c77e0dfad1c175b6c69963f5c12ff9840f18e0202502e9d1e3b170965cd86ae411af20e6d69a608c99ca8dae3cb3bcce666841132a99429bcde490d9f0b6b5":"d35192b4d233507b70c6d32f8e224577":"":"568a0d584fc66c876b7beb9ef8709954a2c426fb8c1936b9024181ca2cd3a7684c412715c11eab80a181be0238e32a2b689e9db36a2ac87db651058080531e7b1110938dcb09615e385d7b224b11222469145f6fb5f4c0e87b08bb3006bc5b6d2ce0a15be7fc29b27c10c645afd9d8253c094fc0f775086bdf2adac265b474d7":32:"af18c065":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6d05193cc0885f7b74057ead3a0738b74eb3118b1a7e74c5c941ce0011197122":"c58f51bad815a43a5705c311de4a846ea2a70cbdd2c30d709a2ae0ddf82b7c889dc599fb6e0328fad21555a99530be6deeeb5b1beb333322c2b747288e52fad008513f8040a4735cab3c8cf32c4e18bd57339c85cf5dd71e382067bee7e9ccaf68e767d77fb005a3b73a51acf942fc3b2c5c9eec6189d01a26c6ffb070165874":"5160b65bf7a2ccf77fa2e3e0b3866f26":"":"64dc5834a63be414c3714f1b34feddbacd568c6466cbd06f665aa269187a160db79306a53b629fedc1247bd892998fe3208b3105f6273676bbdbff6e254de332d02bc8842ef98d6b79994792eeb5be3a807452b14ae5b5027db81421cc22936ccaa7ae1b77a145462634e424ccf2dfaf001ed4477b804e204120a1416b449b8c":32:"364ef0b5":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6e8006983712ddfedfebf95e6cc3b0aadc23077055e500ae49fae7705787f2e3":"e3ba14c4e39ebad925997649872b8331f1700c8f98f80e58d92c85a84f2a427094d9d771b276a0d35b17c0c030734399070a57345d4dcf082b96c7eb580618f7af8bdf036296e20379e74e29f905b52a0c46fe7d46201a075e7de7e1a523a0492c1f228102fdb89f019bcd4571e041c5d37159dc487ec139fa37d33142fc8082":"e36e39d787394f1401fc4b173e247db0":"":"4d5db4b65a1ca31f3d980cc30037b5d79d28280a31cc5d0274be77dad70dcd37f652f2ca999c9aecf08fd2a02d382457a277002a1a286ab66f9e437adee00c3bab04f831dd52147005a989606171b6017d28970c8986899fb58900e23d1bc6a9ac0bd4d8b5d6e3fcaebc9903923e68adae7d61cf929388e0e357c7223523d1ff":32:"d21637c0":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cd8ec237009eab590dbd9b31e76513dfa3501701b1a706982944441d996e1839":"9eef7c9a0fa3e9a7fcc4b2f9d210a97d6653ded7913f2fb2de825a0dfd78ae1cca68c040f2328009fffe62937d630ee9d6e0e67bc12c38c0b3d035697d4c2311371aacf41cce0d523016ee436a47d93af0df77011131856d072c718c310f0995b71530d70a3da881481f46f21dda62e3e4c898bb9f819b22f816b7c4e2fb6729":"a3cae7aa59edb5f91ee21231002db8e2":"45fa52a0e8321d82caea95bd9506f7331923e2aa95e9238908f3ff30e17a96389dfea75e225e34e1605354eaaf999a950f469c6e2e8722da5ad9daded6722baca00e5d1b8e63266ad1b42cae161b9c089f4ffdfbbaa2f1fb0245d1a4c306d46e215e8c6c6ae37652a8f6016f92adb7695d40bde8c202ab9c2d70a96220b4b01b":"833d58f0bbd735c6164ecaa295e95ad1143c564d24817d5f6dded5d2d9b2bed2dc05da4a8a16e20fdf90f839370832f9ddc94e4e564db3ae647068537669b168cc418ea7d0e55b2bb8fd861f9f893a3fdba6aace498bc6afe400fea6b2a8c58924c71ce5db98cfce835161a5cf6187870aa32f522d406c52f91c30543ea6aa16":128:"c1df4ee60b10f79173032e9baaf04d3f":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5f0b24f054f7455f5821fdc6e9ca728d680e8004fe59b131bb9c7cddb0effa51":"d406138587fbcb498e8ec37f0f3d7f6b2faa02e6880424e74cdba67ae3468b6823d37fd917a7fede6b34a2f0fc47c520e4088766ba82a989f0d8051a3a80cc8b1e3e1e2b1c6620b90e99b27e65951aeb3936263fc2f76c1c8effa742f53987f8a38c731a411fa53b9f6c81340e0d7ce395c4190b364d9188dc5923f3126546c3":"f52f7a2051047f45ec6183b7c66e8b98":"756cf485b6a8e672d90d930a653c69fdbf260d3ea18cd3d0c02175d3966a88b70ab8235d998b745a0eb6a5c92899f41e8c0b7aa4ec132c8cbb1bac97a45766a03923c9b93c2a055abd0127a83f81e6df603a375ca8cc1a2ee0a8b7fd226226b0b19bd2e81f73c34dfafa4fcea08dd93dd4ab7e4b437408af91bff566068a5f34":"e58a03f664003d0ef5bdb28931afd16e7747cff62dcc85bf4eed6e573ea973cf615e4ebee40f35d44e18e391b391e98dca5669a5b0abbfa67834836b122d1909b53acd50e053d5ca836894414bb865b1fb811d8af68b88b4a302fdedf27fdd27456e9aaf34a8d53c9c8587e75843e09776392dbb0501ef41359c01e8980e5221":128:"258492b9f549d1b90555eafbe5292806":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6f50efb3946f6a6dfe63f12780f764bb6ebcf2127d3804610e11f0bd9b68ce0f":"bfc89d5049a5b4015c9eb64fdaf9fe9f4be7229e67c713a7b368f0550b3a5e12ba3a4399c64f60b7157e1b289b154a494deadecff0d0686ab44fae2a34ae4cb120a7f00268ab551f41c16a05f8999157be1103464127a8a9bccf736c32db045124178c90472e664d8e67a2ade0efe9a3b048c453d2fb5292dd8d29e62d52c5b5":"63c1192ab7fc75c17e7812fd960f296e":"335cc5c8fb5920b09e0263133eb481fd97f8d9f29db8689fb63034bc40959a176ccdca6725e1f94f822e4d871138fc39776fbe062f07bf80e5c8891c2e1007efeb77c158ced8d6c002b04442ed35c40a2187a59c02339c05762942208e3be964736a431017f472dfd5fdaf8fb8c645cdb684f9632057b9eb755253b4b75e3688":"ca974942ae0f4955ca0736218e4e356145c1ef42135b1142b55ccb3fc5caeec630eb50e69b5a6f97c11d4b604189b27496623bb0365ae69f4150e201e72bad8e7b883185588d0a31c44273bae87194b1610114a83ec47ba68a02e29891de43204977fcd0d551778335fc77fcfdf3fd63e9e5e0c02930a0321ffb093c521cd0ed":128:"2f11a01cb0ef8dcefad9233bec44d6f0":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ec566324ad9d4cd015821e2cd4ed4d3d507bdb3c65bd50acc85f690ef06740fa":"348d35768d7192415cbb92c5625f10edd79f24c56d4b821aaf80d7dc83e901ede6be94d1efe11a3acd16ac00aea8d0d4875c47522332fed11cdf0816b26978de431c89d2fe6d122b2d4980f1d53a97edc15e490a44e73cba9394ca4bbb871675c729c39de80d6678c71b1bd220e4647bfd20a7ddbefe2b7eec7276b87c92ba77":"95c8a544c4b94e9fbfd76e66f40bb975":"fa6f38f8e562a54bb2281dc9a7cbe0b981292fb00dc0053185550a300661852179d0f2beb4e7759b81316fbfead5c858e6fce73f3cd2c2462925dbb199a4e6c121d051b1b5ebf60e16d1e30f6973b19cf31830da30588fdfff6115a4a1f6d977a72583379a56055724581be5232b0d1b0ae88bab5d4a031b058bc8d03078dcd5":"8b4da79f3ae1ea35a80af2f52fc640055e6a3b92617ddfa79fe5d8a49f28ddf36a82a17ca0b3cdf1726700f7ffc09ae5b412d064fd52a90a76bacc74a0b89e38dc474e880a2b768ffa91fef34c47759a7b8fd7faa32a4fcb258349495e4438c7b2055a8f462729fa4e7223aa9b47087695e3aabf43afb32e272d536b257b748a":120:"b1faec277697add8f756391dd9c7f4":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dd6aa4ff63efad53772e07e0fa7d6eda5e73be167620fd7c9f3997cf46cd25a9":"592b3a6f09841483770b767bed73498c286896d2ad3d8bd91f83f92f489b1e83b0456a54e067a79e1bf59eefc1d3bd35cecfba940811d06a06e9b8f774bfeff557bd7e3f0864cb6bd3f867efbe3f040d2384ae8e1a0e20ed38caa668159d3e33c4669478d00963a1152305aa2037a5e06cac52d84021234a7f5d46ab060bd03a":"6386e03bcb6ac98140ee0706b54c8492":"0ccdaa4f54cfea1026a4d26338b1e6d50a70b00c46147fe906c95f0a2fb5d92456ca3aa28a257c079eceb852b819e46646997df87b873bc567f69a2fae471df03b0e5b94511189eaeedd238a991b326963c46d53080f420ec9fd1a74145a0b155cbcc0b5e47fa69450c7eb447080e34868d640f923923b91a9e13a05c73550ca":"c1be540448f1e3f432a10b3cc1a913cc4046595f5a57bf57c9d856cdf381832e914088d3388199018ff26327e3001678ab363da9457ba2084f5aa81320f1a0343491e0b44424018765861c5db917ce14e91a77f7e805d7a97a17a288ee66567c5c01ee61dc46a9aa8b281438ed377b792e9539e311676f81c567339cf92b8e1e":120:"ce7e361713630ecaff81866c20fce6":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ad3990cd57ce4e95342cdca4f07d7e35d575eb19f224a7c821b1f5a8c54d4bc3":"732809c29b5eeda974039b122b875aec2823e082ef637294658cc54f9bca88eb7eea87a366234f89919975d0e7dd2f8ea83198d5a6e349149a016a4b177ba43df2f3ca28e27b8566591d225ac25dfd9ea431cf1fb3ea530d65dac93aad47764a6aef8ec6903b6d145ea9a2663034d2a320690b92afd8032084b754be97604382":"fd4ed75d861da2cc14fd1054976c8566":"ab44689839fdf47e887b70fc1b0422dbbe5c1b50f4e704f9a435967ba8b70cf1e144a025d37292f628f9f7dd9d05557b65340090503201e8cf2cea2d6a73ea4850bd0931b90fd4a4306ba84b8aec99fed47ca1b16daee6c95c97e4ba0dd1fb130cd13f5ef77c5af96f61fa05305a3aca3775e927f72f08fc34bc994e69abaad8":"f48721b08101b35cde1c4ce08a8ba0049185b9dd48b66ab9971fd67dee24f89b456e9ca19ac8a9b5b3b088cbd53898a8c2ac1129752fb7fc55a0c3e2e7266ff40f7a9d63ebc4ab65f47422fc17cbe07fcfda582fd1b8f50e840ae89837e84add8be17d4cac3d2be26bef4aa8438daec9d2b139e442f99c32f2789378c8029ad9":120:"da6da2af0fc14b591a86359b552e20":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"30823396ac90db573b6587676564d09fa680906bd6eaa6b8597e2e7549c9d848":"c55be5a0b8559e02de4667ba5656f7e46f5627af13fd34d327f6fbfc4f3a9273036fce2fb21232f8e2ed115b39b0ecb9a119c8fc17070bbe4e34d3544d7117ffda5e1ef05e063b5a8fceb23158d7824d6a1eb4d90a1d0360c6bd78fb24fdd4cfa35924beb4e090891d06f53fc52cdcaa6b8bba6772d549eb95b64ebf3756ae45":"496ac734afadcd54f1a4372ceb5645fc":"2d582131f7071e80cde1b11106b7d79bb208743de759d40b897efdab018f4eff1f91d2fe67e27af25a13f201bbe4446f20ac6b942ff7b32cf10ad1cea36945b67ac08b114fc616175a87437ee05f3a8b6566e9edfbc1beec0ed8696b5d5c41a25ac43bf3ce2920dd262233ab3405d46f523894dcbfb6c90b6e911ceb93bb7fa6":"c9da3df66111dcbabf731c6891eb698ac3283780f526e81383e201244efe4eca7a1c84a3bfa9ba5616afb15c1f1af0f3af2e071df6c1d34a343c3e3440f1a3e1b6620243d9e7d9a4dbda5981c3e876fd07f392d44bf3e0a4edbd884462ec2f71d36bde4a1b5792629da09a1fb01bfdbd532fbac71887a05a7077fc119a4638d4":112:"cec973a27c42e31b779a6a91aa34":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"815f2b2f0b1621aa198eef2761380f10ac9872a5adbdf6286bdf3386e56aae4e":"d16930c570414bb620e0eaa2e9b5d96e4424127e16461aaa5885c616a02ae974fb2890e73bade9ffa5066eb88a46ac7fcf258d55733d315951b1b71c5e3c13d78d60344ce921966297a0f6361cfeab03b346a7fa4f83a7a0eaf37576fa33a496102446f9f31b06ed91b51672c879cb18d4e38fa86e156d5b1dbff27925922470":"0843984bbaa565ca24f148e57a7d9c57":"1514b99c0ad3493c36fe1216d1a887a69ea0340101aebb03f60d7ed26893119e81e8b8c3f0bb4af5e10a3bf4edcf257473be9dcebb44a9d912f04d97a556ecf020c0bed7ccef2bfd5580f1fc74b706fea45f8c63d8de6f8deccc47a02dc86d3f0624e52f6f1dcd09de8000f2d98a4cc0896da6a564b92263673adf390ed909fa":"7506175acd64224b39f890e498ee5013bb46fc571dc2b125ed5891b8ce8bcf42342f015fd2df5f4b9cc220aab52386bf2247d4163951e86467633f96c28bdda166d778855a7f60465dd2983232c9e53d5f89432407807b0402a10f155f80055c339451a106ac54438ae4a945e60d5320eab0adad9a1e66d59b9d3cc53887811d":112:"28d9d780052b36dbe80a25d41d5b":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d1325ecedb8fc0fe449de558fbc11ddebef660e47aabb84edfe69837a6a9066c":"f9a4f7029feae5cf5bdb8385d6ad7d7da6a243c5026818e5a794c6cffb8dad3227964501c5a049b5a94a7ea2e24434e086800094118444c5a971bbe575324fb6b51c5939f81e78bb11d85d324742b462ce8d13584b3882617d0c94776f328a554f9d532b6515ade9fbbd2de1c12ab53671b7f7edaa7e20223f4c371c1f229568":"8aff702c40a8c974cf24bf3c645169a5":"9ec2e851dee3834d4843aafa740f3aac4cfb1e4d3a7e3e77349113f5200768c3e9dc37481d6292ebeebd2372db02ef8ac7180830c7187995c815d1d1520c3e2f8cf2a94993b18c828b53485073c8a845066772615b26d7a3d7d3e7d81ad1725797153f7ba5e313bdec582c5482adf76b31c871cd42a313018f40d7e23f1a7f33":"3a93663aab93c6cd236cba4db2c03942d9ebc669633936370c2834357e76f6555c34d40dfaab1e78a105da9092acdba8be89e2dbf72e89518d55e09eb2fa1ea7da505484ad4531dba3eb853d1ae1a477355ea9448067b0adbc782d64ec342c7cb781d9dd8dc2b14dc1c9ab5542b679782b8bb9b45ff6a4e36c513df169c8eddc":112:"7e682b0ddbe6c55091838616c352":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4b92242268e598ddcf3a5a0de26d74356693c4dbca354e44be401f3d6804ea1e":"72dc75bc4c8f5bbbd9c639fbdb34afbb84706404c9e67eaee1959aa4b51eac0db4f975cb3ed8d8ca27f72f61c8562ec953a7b8745826121a7016e60e877dcdb046f236af3826c1ddf5b929c5bd9a92b0d5c23cf8983bf2459ced6595882b3dd0cd25da7eba981bba122623dae22dbdce05cf4e5d82d2cc54eb4f68e9e8eff02b":"3c292bbcc16c94b0a263f4d22f328915":"167dfab08aac8350574693b31210138f6b99cfb61ba7ade2e2abffe2255837a913c9afe332e8fc4b2463310df46492e7d982dcb70fdda2a8b03911e6be9a5c5621d0ae8ecd1cb390910b6702aad33394c25d1160b86687e25bb6cdc4811e3158bb85ba75548329dacc19287d9c004a0473029b77ca290fc47c1f96d9583bcd67":"c2dd42ab9bf3fda78032f73cbf7d28dd8e32c582a3b7ee79795551f133234d62ea6571a466b8e1af0b3d354b71a6582c9c8013d5f8a2c34eb3e848360adac1d5005cede58eae7784f32a31c40eec5a3f03cc1e7263d8515b36225b3515ebcf8dca2a77172c797d347ed3921ca0bc73e8ae56347134a6a2a06ae084f1ebb7b0fe":104:"02fb002d8e4a1d11bb0f0b64d7":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c5c50059a61692a8f1ffae1c616158c67d276dcd4a029ce197ed48567e5ff889":"ab7e13923e66d0f600accd2462af74192c3de6c718a27052ef7c1302239c7fb2413df7c662657ca18228575ed138bc54f31663df548618e98d64402feab529d5bf6a678431c714df1fe24ea80017f455a8312bb5b710df8dd3571970404a806ec493dcb1f3f1ac980663f0b9c9823e0d0304ed90689f70d4a24da7d8504c5b0b":"920d82c6b97a7bea121f64f83b75dc65":"a9bd57db2bbe83177287e5f614dab977071abfe0b538067f7d0c5acd59bfba95dfb725b8e1af4573ff10ce135148a3bab044552348378d5ff0c4f8be1aef7ed60bb9a374a6c7b8097d7c1804fdf078f212e63e9f11d7404ad0d1a9cb28d5ba199aec3a6c41b9e523b541ad38cea763159836ede6371357ab1aeaedaaf4481c29":"8f7e87e3ff4f7ccd1cedc1df125199cfb588339119a5ea5f9bdb918f89ca35f9dc16c6465fb25ea250eaaa8e7f00aca2199f92a2c244642bd15cbc9b62caa58115ef01d0b4a9e02527e035744b20892f79b07aa47b6c6db1332f82434764c43124b27148f2f611766781df8e4cc0b5ba99b858c13c233646dcb2b8749a194f08":104:"65da88676d2ab3f9c6d590eb80":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4c7cc3588436ad9e877de72578d30026d32746817ca7a8fb7df9870650aa48d8":"00c2845fc495b89f870bce714f8604a7e7a96ede92c4b9bdcf044c9a176f66a28761089c083d5e2d613c746711238477c0efdf475e18af99e88cf76d04d4e40495ea16c462801443cd7f69c5d36ac9f337e828c308f1d1938b1fac732274459827cf9806c1661a247167948a93eb6e998a4cea76bb825baa27e4180e52633bb3":"5e82285a3b332c693e427f9410564489":"9971b8e234fc3e1e9644545e383eb065e1866e2faa6513278d3972add5ec0e71b1558329fe1ee038a27919e43bfdac8cf08141ab540528f74f9d5bc8c400bb6ee7867e4dbc2aa081d9126ac374dc62b10004d0e233dc93376b93c0da415e7d3e09851f2084a99feeb25939e21893056870cefe7cdfaf49f728a91ea0eef605af":"ab7bac4ddede796576e1fc265c3c598055827be74dc7ed8ef172d00a648da56727767d68fcbe6c44e7272dc8cb15f03a26dc439178849b0e9ad6c7410dd4cca3f9ef40ec7c280042bbc199155c7341e88d35e5e8d0b42856e618c6c30e43d49506ccc3518585c951a3898409315e8b3b4d0adccdb561ddcf1b9d3b2cf3de9750":104:"2474c830c6ebe9c6dcb393a32d":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9d73aec506e022c0692892f6dbc3b4d41e86b97fb377c1956ee27b9c9ab3b32a":"f02bf60f10ed876a803a96e75f3fe17b4e355246135a0cd5497baad2a40a523c27e27bf848f0cb5d0c6428d08bec9590b17fca5e697990d2a6f7d21080ab614f378a07461e7a6207229e0a087e285841ef2f119cac7d8a2d3abbb1e7272a0d7dd493c8c4f797e160c36e086227ceae4923658365b2d3a3fbea11aa2fab3499cb":"bbacc081a6107364dcdac83abceddbfb":"77e1da090e4d3a892baf1afbc12a56201a4362d8f09cda5e9bdb23411e6908915301d66403acb3524898c1c51d6970a71878accd0048cb6cfbd4bf941c174ee05eca2c4a29f1c24e936d3a63cb6cfa710617af1bbb41d755b2f79e135db914a7dd00c590cf741078eb72c3ab559787213202dcc0a4734bdd612b917e372f0e61":"d78fa4024b8d073899ac09b8151c29b10a37793b76f04921bdc7dd3d2ef530a831e53cf6a7ddeec0e033ceeabb525bf5ef57bf9b3661ffb57d3bd4024252fa11dd569102c787c2d8489a1ad1290dca2e8edf82fbe6b5f83bcc0e888045b895e20c8556ee80430cc8640fc070491d2bb81a1209428938cd8e7a27e0e858029421":96:"2235d00a47d57cfbd383b69d":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"73198dfd92d26283637e451af6e26ff56e3b7d355ed7ab8b2059c1022e0ea904":"2471b3c4cc1d6884d333d1c998c7c441808ca884cb88173a225569e1689ef39e266e9ad381926adeafc2daccbdd3c9457ea1bdc3bb05168ef1eead1504d1d44dde34f96e1a7f2a5d3fb33cf5292d52fa9412800419570db0eb24fb74d55de202f5df74073c5a2eb9eb726393996eaeb32072bebb00593de41b97ecbab2554186":"e36403ce1acc63bf50b47387250ef533":"cad023cfb73d08e5b082c3061f3a6502a1c1d53038cfb19074d0ec26c9b272db93094147ef0ab2bdce440a2b3233bb0429add47601f011df679698264c0f81444aba14576a1a565e5c169f967c7571bfb32a2a4d7fcae897863d78964c5b1a040cc845494c0ad8ff4353317b28ca3798e6252d5015b58e99354ce6dfbe8b7a95":"32afd6d6fdab2019ce40771b5298aaadf753d1c4cb221f01e4dfc8b1968f898188fa4d448d8364510a7e68c7393168efb4b4ead1db1c254c5cea568a84a997a76dbc925a6c19a9092002629f1d9c52737005232e5c7620b95ed64741598a65a9ec95f2c97b6b78bd85380811c11386074b1e1e63b9a7e99d1cb2807bfaa17f0e":96:"e22deb1276a73e05feb1c6a0":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1dcbd278480434135fb838ffcdc8e7716e95ea99a1cc36d544096dff9e9aeba0":"da3b8c9e4aa8443535b321c3e9bde3c6742cd9f228c971257430b27293ebeb635917d6cba976c81934c3077902911169e8c6197b2d56a046b7ff03b482c38172accac98aacc90076370df28bc8a2044c393c7541b7b69b0fb852746dcf3140ace4e76861975814d2b5966f7714fb6cfe3e4299d79182fc63a345067a0aa54d8b":"b737bcdee4ef83aa83f124cf7208a671":"49a544aae76b04e62211428a2cc3719e4451f3dbf9a23b6ac824fc472e95e38386d267415c1472a8b0707b0573b9eb2a39a5d5a13464947cc3a7a7dd3b7196f11e87ab5233944f7cea3f4d62b088febf8b82a44d4ca6148be1ba24905432b7ac2bb4ebaf22d3bce97ac2bd34158b6011fbac77ee1fa96ca0c9c9e0207044fbbd":"061b491b73f9250798a0fb1fdcd72a70eddc9cb48c1f10119387d45c50d5fbb8b85592a7977487e45342fddeb8d481eef3b99463972f66acb38fe04953c223c5f3e02611c8f33cb9ad7466860895fae585d40bc78ec14d1cf17b4c5b75e4d8c6341f1eaf80da4a78aaaa30d3bc8bff15f234aacbee4067a947e42275b12e0bdb":96:"b897da3061c77aab5eb54622":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2e00467f18536ea6b4d582b2480ebee883e4f56bd91af3ad7a47ceea3ece9acc":"d5334398318ade59e6bda5cfce8e11b25c9ccefa2f651eb16f66c03d84dcc900dc7c85e6d2b778b155ae4591af0698df7f3b8b9f64d4442ecc82035f7d8e71a5f61c515a963f2fba077f3cb8276e91b31b3f8aa193988a16a86ccaec4a688ad68b5146925ec21d55ded407709d34d140f37e1f87d955619453c3704e83918088":"aa6716e6b7107876a3321d807a810e11":"5606a0b77cc9020955c7efda33b7080e9c0e9fd374c4201b4324b3e6523b0407171141e8246d01292a34dc69331f7177d6b7238e16e0303e85741f9cea5698e42fc79217d9e141474068d6c192713c04b1ba3573e93480f69e4cbf72090d46d62d5b52e4a7613af8fcf0010d0024ea11c19cb04571c6d7045a1157cf81df18d1":"249119ace4e292ffdfebb433d5b57fa1518af3389eb832146c3adc2dc62fcc9121d7f6461a53ee107ce7edf362b365d8bc18e50cf9c328cb7c7aa7b4e8bfa07c34dc81c38fe0982bbc3b543485ea4b0ce5a76c988cdfcd241911cd66f5a5f9e0c97332bb0f3926117c0437470717c63957aeba1c55d96b1ff0f4d6045f908cd4":64:"70e986fced03ae67":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a18240f6135e7b6eac071546ee58bb52394bc34ad4e91ee678b72e4514fddcf7":"02f288eea5588e7a011f4d91eca232af70f60ae3d9302cae5a8a58798c1b4e973e3b1d07695934ae871201682554ef6a5b94976c6a1aa73d354f1d65e3f025bb2a3f1e93009e822a87590dbfd1965904223049c5ac0da8596955199ff767b92df10d1f9c05c40bd8204846c719c5594000cabd87342f0447e4e466c3788723f8":"149da8186ca73941582532ede16edf3d":"4d46e1e87322ca84d5bb92d58670f644083db06bdffd99fab0055a62b64a30b5a5673a108f0b9f114d379d3fe63a1f63407881c5b5cb03142109c158af42a00eb24d3b1873edd2284a94a06b79d672bc8f13358f324af2622e9aa0da2b11e33567927e81aea24f3605168e602b532fa2cf9bde5f8cc0b51329e0930cf22e3752":"36cddac99e2673588ba783d3c085b9935626687a2dbac9ad10deb4867c577d6f80453266b2400afd773e4edeb743c32562e85f7f8f43dfd87b10a2dd79eddf6e580aeb4cea92ac21cf49ca97398cc23c02b0ca59257643fb2bc6462b9cf04658352d53c2ee50d87cc5ca2ecb722d950f0daecfa0b7c33aaa2c91dd8b093916cb":64:"73cbe40df3927e80":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4b64bded6c658090a85b5d889679c6a00579498aa82be1e3a628a1cd001e52a6":"182cd59dc1934199d2d2a2712157438c347e286f66b5a2b8b5149aa41ff7ba82adc3751be379741124dfcf05c531416a64f25f0d28abb6f7bf98c80762f0fa363da679437621dcf61bce43ef4d63178779d1a3ebffb82044d427ef522cbd2643cf1f5617a0f23103cd2a164a59f182b151f47b303c4eb7387ee5cb97cabdf985":"99aa6f359534da409a18540d82fb3026":"f55fd6255d8a188ce9a4a2727699ce16c8bc5c6adba88d94106038b74deb79c9d43bfaa47375148d843a5ce248d70193c8017196941b2d9e2dfd4375a3390c19d2f833b0b265dab30f26adee07ab0aeeb930dc3a9fbcf719a707fac724deb28dee2a6788b17fa3505290c2797c6dbf930b41eca1f6d54d75b820e62ec7023e93":"5a1211218174e60690334856483a3066e2e8d996fe8ab86d0f8fef09aba9ef0acff9d3e1e5cc27efb5464bc23bea9c778fc74206ae3a16e5fdbf99694ab7096f23c4b395d7a7b8d6675e56b5505ff62f52bf183bcc4433298296e41662d6519d9c1f0a5fb3140376c8890547eae72afe75c338ba97fad9f0184dd311bbdaf3cc":64:"8dbdc0746074b486":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"cadef353122cec1fdbc236c0ab195fc4d732655cef444c00b6cba5c61e01c614":"a3d5e55fa3110a268cf1414a483adab6d58ec8762a6e6be81269c0369e8840333503bc3688c7be001cdb84d163fa1dfb05f3b01ffff31151f1af780c796822e3d564f785964a546bcc2a320d81a2bc61058652a8594ae9b9b0917400e08d4a99fa161376ac53cba54c92889fd3497e233aff4e12cd85d57375c7c89e92cdf5f5":"d765b5954e5b486885dc78ce6801516e":"ba0405745971eaec5d337fd22e0ad287551e7084f1c9c38231d675719e3980356e183a99a3c760ecf7a8ede5e0dac8d2bc13e135570ff6e91a854ea3b457263b0e77896fdf7bdf0b53c8276cfd1ea3e8e22450ff2665eacd24e5fb2be89373349fc9e2967763d43cbd7adc9a376b1b4ab956ddf8b1a56d9385fb7e861bc34df7":"9b99f984ae26f9cad5b3c8058757a0a5caef0fb86b8ecef0c1bca6b99bc72b0d5345a00ae75e37d4e651008bb733105d2172edaaf5bda4ad950a49de55a514e882a470dca7c7bbfddde40d38fef4e1f3864fd7e212bbc0383d0bc29ab2303c8935d49c35d7d73df2fba0daeb5f37f9ab0d541766da71b33da1018a3f287ba312":32:"c374cd77":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0cfc42773fe2d16a59da52234af5015271332344448c214a2b4a0bb53b07a0a0":"dfbf9eaa46c368b28ef50227db97f29b5d9ed599760bb83f5d52f92ef5522815d6952ebb0d9b4efe8844216d37510746caf8c775d2c862bad8d67effe109a0cbcdd14ba8e31fa420a475e55ac6b02908346ad1b064d5b6b869503e08d057ae65e9dc2a2a26345917b18d1b715a2372e8e114a071eced0c29cc9966d7205ae010":"45afb3ba2db9287f06cf48405764a955":"16d3ad553cc0fde3f32112bdb478450c65c854927b198914649a2820a9e3d01131b693765d40bd2bb74a50eb4cd7bc8dd8dbac9c6a61acaf5e4cf81570814b30a6a11877a8f9c5df342f70008cbf0576bd27a50bfaf6e22a40bd77435da16b666a06d172aa981bdcae0d25b8ab002c6c1994a356d3c3b7e4dd7b99892b0784f6":"e29db2c4bccef2dda828ce652791d424a86cd5790e6ece67bc029ba9520bd8f35a214a73d8b86564df0eccdb60eafee4170da2694eb563e5a854b25d7ba0a4c53465fdc15c6e267be2e54263f97aa3edbe2358f3d9b8d28997388a57aa427a239a74534393593196253de1c2946b7a437a00480ecb2eb08dbe55ca2b3641c36f":32:"39e01fa0":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2a840df4be22c70786c873058d2a6e16dd9895cbfb55b9c9e98f958cfe62e65d":"313eddc53f3986927a261f498283b6dc4a39d26f98c7428127237d79a11c5e626e2e9cdb68f72aa3168ab23dfa2f5e03bc65a68d781f23fb9e295909cd9f0f3e5648cf82f3f6b3b509b0a333cb7d9f2b6e444c351a318f8f200a921ccb409def21b87bc55ec211a76a518350e6ee21d7379edd004b3bfd1ce9086b9c66d80ec1":"ebf155f7cf55e6aabdc1171c95c45293":"8abb8843de1766cfb8d6474496acda2f7a14e78a5e4c787ac89e6bc06cfd42173c35b3a75ddff644f4a58aa7502fedada38a7156457365b4c3c07bc12a8f9061331139b9a2b8d840829b876beb84f27d5a64093c270fe6c310ca3afe987bbc5ec4dc06358d5bf77c7b4e4fe4078c6d3ec28e9a281318da88949c478094c0065b":"769869a55754eb5d6d42e22a2b5271b38533fc0c79642e250347d34566eeca732e0565f80672054bd10cbd3067730dbc567039c730d8bc32a2bdaad09885651533a4f03174d4e6510547c1e1dd51be6070ab0ca0cceeaccf64a46d0ef87c0311bd09973f3b588a4dfb39c85086ea5d67dc531c287b83c161dcb25e07b671343f":32:"c364c089":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"461566cac74f9220df97c1ab2f8bb74189a634bc752f7f04526923d30506949c":"":"546d821e437371061cf3207f3d866c15":"":"":128:"44193072791c435d6e8ea7756a0bd7bf":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7736dbb38f1fe351a7fa101d91da62124c22ac02ee06b9413f56691067572f73":"":"5f01779e5e4471cd95a591f08445eb5b":"":"":128:"1a1f08c8f40b93e7b5a63008dff54777":0 - -AES-GCM NIST Validation (AES-256,128,0,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"eedcae924105c86190032650e2d66cf6927dd314de96a339db48e2081d19ad4a":"":"a39d400ee763a22d2a97c1983a8a06a6":"":"":128:"3b4294d34352743c4b48c40794047bea":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"714df4b69dc00067c4ab550f37ff72358b0a905dea2c01f00be28cec130313c2":"":"c46d63d6fead2cee03bd033fbc2e6478":"":"":120:"2a0271b0666889d2d0b34e82bf17d8":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"454021ece9a87a9543a1626820d39edd1eff3dca38a287d8fb68bd315a7a2677":"":"51de54b633a7c9f3b7b2c1e4b47d26a4":"":"":120:"114708102a434e3a30088b5944c272":0 - -AES-GCM NIST Validation (AES-256,128,0,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d7e90b539c99e8c2187ed72823258c1149890a69a9c0081ff8c66e1cdea9f2f6":"":"6dba3273560f30f118a2e0251f7b7d76":"":"":120:"5f45e00181cd2d7feb4723e0cdca24":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2948233eec9bf8adf7250b20d62df9219d30e314c5932383203805ff9f3dc5cf":"":"d6b8e723272e26922b78756d66e03432":"":"":112:"14c9a9a217a33d4c0b8e627641fe":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c73fb5e732ebc1dc7c91ac25de0d01d427de12baf05ff251c04d3290d77c34d1":"":"c31220835b11d61920ae2c91e335907e":"":"":112:"9eb18097d3e6b6b7d5e161ae4e96":0 - -AES-GCM NIST Validation (AES-256,128,0,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a46aff2121825814c603b258f71d47bd9c9d3db4c6fe0f900e0e99d36c8f8d66":"":"7cb5550a20d958490739be8a5c72440f":"":"":112:"8c76eebda0f1fd57f05a62c5f93d":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"61a612c76de551f794a146962d913f60fbd4431365b711217aaa4beaa115f726":"":"2d25462c90ad9a21073729e5efc99957":"":"":104:"e4d3b277dc9a107c0392ca1e5b":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4b233480239fabd2035a7c9207a8e1ab2da45a90a472b30848fe4b4757c628db":"":"50d45096afd0571e171e1ab1ffb3720f":"":"":104:"5393bc06b8c5ecef1264fd6084":0 - -AES-GCM NIST Validation (AES-256,128,0,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dc051ac63e6b051594158399291ed101a3efbb1701b98819c4835a4863734371":"":"1f304d4d7f84ab560366215649b0a064":"":"":104:"1081dda9e0a793916dc82f7848":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"75f76df772af8e3019a4c1588a7d59925f80ce0d5647030f29548374e7bcc9e8":"":"d407264e09fbc853b131c8a9f808f1de":"":"":96:"d515522db52bb872a4d3f9d1":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"608d7592c094322b31d4583a430986bdf6aa639cc4b4a0b3903e588b45c38d38":"":"6a631952e4990ae6bdd51052eb407168":"":"":96:"eb8851cfdd4fc841173c4985":0 - -AES-GCM NIST Validation (AES-256,128,0,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"86a90631e5341e67dfa55e68b07522507b437fbab7f3e2e26cfc6e89ef9d2410":"":"67763ee1890e4bb430ac3c0dbc2af997":"":"":96:"c6d11901b53cf6b13ac03cc5":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b8d12783ba2548b499ea56e77491d2794057e05fd7af7da597241d91d832b33a":"":"0365436099fe57b4c027c7e58182e0b9":"":"":64:"41fc42d8c9999d8c":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"eb17c1bbcd356070ca58fc3899bb3751eea5b9f3663c8e51d32c1fc3060b7ac2":"":"aca76b23575d4ec1a52a3d7214a4da2f":"":"":64:"fbcfd13a2126b2af":0 - -AES-GCM NIST Validation (AES-256,128,0,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"916aea7c3283aadb60908ec747bcf82364c1827ec29bedcbadacbb9b935221c1":"":"e4aefe6f81872729ff5a3acf164922aa":"":"":64:"2035a7ce818b1eb4":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"47b4b7feb91582a2f6121d12fd465967352e58d9f3d1bf27478da39514510055":"":"137bc31639a8a5d6b3c410151078c662":"":"":32:"822955ba":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8955cddce65978bd64ef5228308317a1ba6a9fbb5a80cf5905f3aed03058b797":"":"1370e72b56d97b9b9531ec02e2a5a937":"":"":32:"b2f779e8":0 - -AES-GCM NIST Validation (AES-256,128,0,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"7795d631f7e988bf53020d2b4607c04d1fab338a58b09484fe6659c500fd846b":"":"f3f5cc7c1ec0b7b113442269e478ed81":"":"":32:"e4e6dfcc":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f9aab5d2ea01b9dc35c728ae24e07c54e6d1452e49d9644776f65878199bc5e4":"":"96ec2252e51ebfb731b680729be73297":"983a102a67359f4eecac465b0d65908a487c98c593be89494a39b721728edc991726e1fba49607eed1f8ba75ae9ab82a1a95b65ebdf48d7ee3c4a2b56832f21a483d48c8400dea71537f4c459d1cfcf9d2cc97b32eb7c5146cbf44d7e5ac779e9be0ae758eafff2138d4c5370b8cb62d70ebb713dfd2fd7772fa250590609844":"":128:"766b6dcf491a5836ef90f47ac6ab91ec":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d713b33af57762f933d6abfecbac7fb0dc1e545dd7c01638b0e1510af719769a":"":"5da52833b6fc73c0e4b1403e1c3c10a2":"374dd4ebdfe74450abe26d9e53556092abe36f47bbb574e8184b4e0f64d16d99eaf0666fa3d9b0723c868cf6f77e641c47ac60f0ee13dd0c1046ef202e652b652f4b5de611989223b0acf1ead9b3537bba17ccf865a4a0fda1a20b00e3c828b9726bbd0b0e92fa8ed970eed50c885e6d69604278375af7b9ae47fbce4fed7d03":"":128:"6151956162348eb397e2b1077b61ee25":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"77a1e4ddfbe77a0ca3513fc654e7c41609cb974a306234add2fc77770a4a9e16":"":"30d6ec88433a6bdd7786dc4d3693bde8":"69beef4dbdcdf4e8eeb9bf8ae6caff8433949afc2ffef777e2b71a99fde974797dfed2254b959430ecc48db72cee16c7ef41fa4165ce4a0636ad4e40875d193a3c6c56a6bca5a55bce3a057a2d3ac223eba76e30e7415f00e6a7643fda9a1bf4d4b96ce597ffe30c3f780dd767cb5681bb7a3fd11668380e272bdd70e66f18b6":"":128:"d4a3c91e02a94fd183cb0c9de241c7d1":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"303930b8ba50f65a50c33eccd879990d5d87b569e46f1a59db54371fcbda7fd6":"":"2b2b28d8a5c94b6f7ee50e130268a078":"c2ff20441d96bae4d2d760dcbae636ca7e01d263c28db5faed201bdb39bcacc82ebdc943968aa0accd920d258709c270df65d46d3f09910d2ea701c018ec9a68af7fb3d76a9b360de266b2ac05e95c538417fec59cec1f07d47c03511751978baebd2e0e4f7483f7351b5e61c2a60138c97b751f6a8c8323970f6be05357aeb2":"":120:"b597491dfe599eaa414b71c54063ed":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1e3b94f5883239c45ed4df6930c453c9ffd70b1c6cee845bbcfe6f29a762713b":"":"61155f27c629dcb6cf49b192b0b505d6":"5b7482e9b638cb23dba327cc08309bdb40d38100a407c36091457971bad3ab263efa8f36d8d04fdc4dea38369efe7ae5e8b9c190dad2688bda857e48dfd400748a359cfe1b2a3f3d5be7ae0f64a3f44738a7c7cf840a2e6b90ec43f8c9322c60dd91e4f27fa12197fab7ed092990879e964ce014f6be2a1ef70bfefe880a75d5":"":120:"7003f04d6b6d9dc794be27b9c5d5e5":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9080effb27994ef831689da10600e7a219db93d690647457702c217b08057eb3":"":"f45514696ff5ee1e6e5797f7bcff05c0":"5251f800f7c7106c008c0122971f0070d6325b7343a82fc35f3853d25c878215e7a929bf63cc8996f0ffb817174a351b71d691f23021f58777f962fd1d45ff849e4612e3304ae3303ace7b8ca1a43f54e662071c183a1695873f5567397587283433d1e76cec1103ee76f8e0472814424b8981caea1f624131fb7353afcd2cd2":"":120:"cfb6d9bccf0378fabae08fd230edc1":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8c291f0ad78908377039f59591d0e305bdc915a3e5bfb0b4364e1af9946339c0":"":"a9830d5663418add5f3c0b1140967b06":"e43c04e1f7304c1d83235120e24429af8dc29dc94399474d06047fd09d61ddc682684776c81ef08d97f06db6e4cfb02daea728ec6ac637e1ecfdb5d48f0440d8d8ffee43146f58a396e5151701b0d61d5f713b2816d3f56d6ee19f038ccc36493d9ad1809a49aa5798e181679d82cba22b0b4e064f56af5ec05c012b132bda87":"":112:"275480889efe55c4b9a08cef720b":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"96c77c11a3336a41b61ffdc1724a80735bbe91dd4c741fdbcc36e21c53335852":"":"655502d70119326405d8cc0a2c7a572c":"c01034fc6b7708128fbf4d6ffa4b4b280a1493b9e1dd07079f509479b365f55ae9290689f1c4bdfa439344e3abb17f3fd3d5e2f8b317517747714a82f0a9ace04938591d3ade6d6095491a440322d347e8634008cc4fd8add7c1c4764afdb2b098b3f5604e449e8049a46b6192647d19cf88fa5ed1abab7f313b4285560cba44":"":112:"b4d581464c4bb23433699c418ddc":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"e2a3957393669278f052ff2df4e658e17f2fe32811e32b3f62a31a3938930764":"":"a6f5a1f1f1ac77a1cb010d2dd4325cbe":"ce9c268429ca9c35c958ca3e81935ec60166aea0be15975baf69103251efafd54cbcc0bed76a8b44a5b947199cd3c2dee6878dd14a5a491a4a3d45788405d0129354e59c047b5367f1158bcf4e066a276951d2586bafc3c11f8a982ca7c3ba4677a938498bd51171552ea032fe1bd85cfeaeb87e87168f7a28e979b08358f841":"":112:"cd5986df8e9761d52cb578e96b1b":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2b17652f7f04073afe9d9eb8b2615c7550968b9776b139fcc4f9b0300912cbdb":"":"9a8ac23ea74b292b7386138666a0fb60":"2732107241e6136f1dd28d233373079d75d6ac13828ae7afc751b6f9c57e77268c52ae91f4ab3016af2764597994573cd6b41f72e21b60ffbb3aafc9487ac19d0ffe8db2ae2c7505ae5963b032d1ee1bffb4c5bd88bb0c9a350ba26ee3eb8dc0a157955333e4f28c5ec7349c39229dff9f440da72909f2870aea873a76545ee8":"":104:"f7b94229439088142619a1a6bc":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"16fe502e20d6473ed9a27569b63a768ecd428738904cf0b337df510775804619":"":"431a8d78b91414737e7c6188328a6d37":"934bcacbac10ea4ff6ee94b17bd7379b88489fbf123bf496c78c9b6b02ee97dd62eedd05b8f44f4912764920129e711701628991a0009ebc7017a1a19b177ec9bc3b0f280eeefadfa310708dfe214428a184147b4523e66f2d62630d4a12fd3e366d27c3b7d1566553c9b434ed193db083160da1f241de190bcbd36f435e30f4":"":104:"1dd3e6d610f359cc4e98d36244":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ccc545fd330cf17e27d75582db28807ec972b897f812d6ed4726d2a18daac76a":"":"caf2f56584a59c42a51fdbfe4ad78f3c":"e85ae6b27778893f36f130694af0b40f62a05aa386b30fc415e292761cab36fdc39bf5687a513e25ed149414f059e706d8a719b7165044fcbd48c773eae546380b8e667b56824e23685173ad9015a9449bc1cd0b767981efe09da43a07bf1aeee08ba05d387b8a00199e18c874fb3a91f77ba448c3bff971593f94747fce9cbd":"":104:"5cf5c7ca6fbfee63854f3bcd15":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8340d604770c778ee83d0fdd5703b1fb304c3bffeb6f4c65e2dd0e12c19bddcc":"":"c0a580465b1b2e8344f795a6578a5151":"799f228962ef87865dfcfa0addde7366de2e4aa78029dbc8d57d7e50fa7c74343458df3465103556a3bfc5ce217fbbb5b2835c9f76b70240b40fd605bcfa6b790d5985a8ba54354e0625263c628e8746c451504fc58a179f90f77f2b293d8dbf5582b031082025c806e60143da9ebb6133ac8367376d0572b32569ee799540ae":"":96:"318f56bd0f3832d043ef700a":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"74de45262fe09e12c9ee7100030352112a6532d1874cc6792b4da6950677eb2a":"":"9f7fc7367f9afdb67fd1afffac058e2a":"289ac6f5beecbbcbde5cb3b0fdf4a27ba237fca33719f774ed33a5fd35d7e49f76d3e88c53fd35561655c35469f3eefb5b2f776ff2799aab346522d3f003154e53f4ef075f016aaa500c76870e6659a5f9af197c9a8f5b9e0416ed894e868463cc4386a7442bb0c089a9ab84981313c01fec4fc0ba35829b3cf49c6447f56a4b":"":96:"bc1b8b94ff478d9e197551cd":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"441ec8afce630805d0ce98b200e59f5656a5ce19e5ef58241e6ef16cac7646b9":"":"a1cbeffaf55708c375dcfeb496b21f4e":"5a6ba5d3f5a7a4b317c6c716564c648f0e6bc6b0f9a4c27affca6d5af04b7b13d989b7a2cb42ce8eedd710be70c04c0e40977ca1c2f536aa70677038e737064fb0e23d3dd48bc00ebdd7f988f57141e164e3c18db81e9565a62e28c73770666ff3bfd725eebd98946fed02f31d500b0b7ab4dafeb14e8cc85731a87f50d95fae":"":96:"aa4bb3d555dabaaeb4d81fcd":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"d643111c973ffb7f56bfbf394eedac54be2c556963b181cf661ba144f7893a62":"":"4575b00b9af2195a0cc75855d396e4e8":"b2c53efe59c84c651979bcc1bc76b0bbf5e52b5c3115849abdbc469a063e2b1699bd292e5fcb3476e849c9edbe6ea14c2ab948ed7d21a21f69406621d3d412b043eaf813be722d92739a33a361ed8081c0eb00400c3c7d4e329f5ba4f7b75d534500f42f178048cf2e95b768ffed79c350f2ff72cb355abdb30af0a1363c0b4a":"":64:"9d1d182630d7aeee":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"91301ee0ca694ae6971ee705f53c7ec467f4c88257d6466f6f8159a8970384b9":"":"345fb57e88124a414828730a85f57871":"c13623824a204385f352388098f5e2db23426f00a73c60c1bf1047ce2c7cdf7f7cc8475781fe7075d1226ad18871e12f0156f35e6ce7032efe3bade1c807f9eedc720fff7a27a2f4690f904be9c99b54a65509eab60e97c4283596eeefa2b2517e95de7620382e3f780efa1dbf5d3908373adfe784a4faf298681e171bade4b3":"":64:"325d08c5b96068c1":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b6ba5c11daed7f868da9bfd7754d555a147a1ffd98c940c1cd5d136680e05c10":"":"b0c92b79d78547496d770678e1ce1552":"5b1ac8ff687f6fd2429dc90a8913f5826d143a16a372cca787845cea86d9b4778708bc0aa538f98e1031850f7c1d97fb64fe29adce6e1d51ca7f5203fc0358fe0bc54347e777dddfe04e3d7a66a1d1e2bdb8b8929e2100daf073845db5dc0b243819754c4c08f4fc3631d1cbd79ac7604746d677ff035930fcd6bd652e7864db":"":64:"b1819b6f2d788616":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"5fcae1759209e784dae5a8278b267c414a03ce7c803df1db7815b2910d10ce19":"":"24c5c349b3effebfd076c88a591b8301":"ca2778e39fffce7fbe8f912e69d55931848dd5ab0d1bd32e7b94af453251a47f5408ebacd7b50ddd1103fab1c72acc0a02f404c5661d8450746d781e2c0861b6974ade9ee2515da88b470f16d5f06007f35ce97cfc17fd015e438af39ca6127db240babe9c42ed5717715f14e72f0ef6ff4ce512de95a179e60d6393e73f216a":"":32:"8e59f30b":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8d71a70fd58125b0da8dddf8d23ddbe0bc44743753bdf259448d58aae54775a6":"":"d15b02572dec98398ba9e68e1a463738":"81313be1eda9f27e01b30877ca90e825f55ef60b15548c45c786c44b024e7198f333be7ddd2c3f593a9b77b68e6a7ac4cfc015aeec66f4823d9be7152f02a533f375554309a4db0fea8e76255144458e488fd19106d9a9614e828ae306fe82af89e7981369b2259c49bae77f8ec2b1f169ef0449ad083d11907234b72ed2e464":"":32:"99df1b8d":0 - -AES-GCM NIST Validation (AES-256,128,0,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b52398c7c75e1b146cc9998eb203159925cf6fc0b1c993ba46528e2f8e8087f0":"":"afc9a60ab8448b77fb05e8410d0a26e8":"770b3782f0e3a19d7d6bb98fa3eb0b916928a2970701c0f4a372a0ecd63499444ae02fd269ddb7d92e11a9e11d0e0b8bc60096a4be79a1e063174b710c5d739d8d05ab5c8ba119ff40843cf8c5dc4e1bd6fcad8389de3b606284c902422108d85eb3589524776641b175946c9ade1465e0d1064c5ae073be90e3261878a9af98":"":32:"32d6b756":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"6793869513ac886ed66e5897bcfa263877d8465fc762b1ed929ba3d08615fdd5":"cda45e29f487f21b820e1af2c8e6d34a8bdf3f72d564a4625a6e06f9bae1c2eac3bbd5c5958fd75cf389a1a31391211745029dcd4cb2575f40ab04710a909b88c2d430cdee279f54cf7c0ff6638d1e0e631f526ee198cfd6e5cdf73d1a11b69de01d640f385fd829616cd2c0e78f09b5f64012e42dee9eb0245b72aba1404e0c":"a43de15dae25c606da1e7a4152f0df71":"":"385834c853772af70675b6be2d5087df84f88b6a303ea594a170e6dd0398ae270fcec61661ca373f4653d8dcc9e71767568c0fb03023b163bdc9ae8a08ea858cbb03b8182b4674147cb35ffda14a2f50ed9eb48d5351f00eb2fa433fdfed6f94833bcf656a7e350eb978a0aaf7a91674145f28f64693197a116b21328e273dca":128:"159ffdb05615941e11f0db46ac8f23de":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9f77c141b234907b38fb45f1b3602f3c29de1ed839bb7ba51f6192aa8baaa287":"96dcb74a78e99676a71673e3c9f94c34b34dad2748a6e42cc70ea50e41ef8b86b5992295d2cbc8d621fefce09e8948de7e696b9788377d598796afd002a82b628d9890db78359e1edc075cbc0d3f11d544bfdf5c8a838390cb856735942dff260189c00accfabf720e5fef1d9b7131a6b2b769f67374602d1a7ed9b899b2c398":"1b49005788148665cef20d8dcde41889":"":"b4ca59caaa94749317789b92257f2ef1dd3d9b1f4ee9540927a6ae7bf5bb0b348fcf25ba8ddda79a89d3174ac1713421291910c8926cfbb4ec1e59be7dd50e816ff586f165c605371ee6077ba4ac0ce10499f9a2a44866ce6319fce22652226164cc0a813c3147c4461dd0410e3701d4647d5a003090082e367cb9249cf1be47":128:"8048ae0c35a656fcaa2f4c1b6be250e2":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2419fd9dbe58655122ac1022956a023446b7f4756163769fc1b99eaf8fba1474":"93bc33dc647c7321152b12303f38937bd191ab3ce3b3a43a29f6853b33e415667d97192fcab2d1baa017042b301d03bae2f657505cc58e3aa4bd849d1ce85ede0e192a373a3894c41c54edbae29a209e16c87c81445d43968595297b50b55659f8b92d7282a2b3ca85e4b5d4ac4ff5062635103f2c7806fcc7378d5c2013be72":"94ef13dbfe9f362da35209f6d62b38a4":"":"3db23c161cf352ba267dab6a55f611eb5fff78a75288779a167cd0e4db6e75d21f11f4ff2928abcb1b46d82c2a0b1f647c60da61f9a72565f629b06a7b3fe96e4141a6886436859f610724bbe43fb99fac9b78b1e0138e2d57ce5fcfac1599bdba5701cb424535fad9ac482ab381eadca074e7376101b4b436f9c43ed760a0a6":128:"ecd4a7370096dc781c3eb3f7e5985ef1":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"08e11a8b4b24e63060c5002713725bb5b4a412f1d76eac13989738ce94e19642":"d5598f4e37274f3b617aa4f9cf6b8547b4eb1e0eac79f6eedd6cd5364f8891f66b8d0cb09f54777d461bbf92d6fd74b3fac412b77f2c48e1024cf09b83c1e71bb86f0a20f82d296883ffee62a4a192b184bc6d7ba0448c1519310c83b18c00e71153137afad14f096b43d454f205ba6b6c2ec162aa992cebf50735dd9bb37c7c":"c6f1e6a39cabda1089048b536e39cf67":"":"1fdaf0156456b6b2a68d66091bf2260792748acf3e7bbb7906af8e0df3b569a7c03ee3a48bdfdff7ccd52433d0bbe8c5fe30d93633bb9d591dfad7d81bf8efd4d4a3c5c0bf2ac9832f0a8687f16be640fcf9b19169c251f46b97167d95115acdee3d4443df416275f5597a52c17a4b8c4b723d4b35a7fd0b380fdebd44df8bd5":120:"cb9f4d4610c67acfe612af5508bb8c":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"da2dae0107c284ec2aaf6e7306959df1e92d3932b88954f119ab677c6b9dcdb5":"277675044caf1713109d4d3abf50c6fb67dc67f7fa584fb1a41c833feead03177cf4b42edac139807ede16eb1d9bed27db741f9542d437781405608de18418c9f7269ab3fd88f6a922a31eab5a3b8b2aa75ee4315fcea80c4954ea6613b1360b1c7c6b6da815e3f6e50f72b7e69c3b6cb3d154855e3f83cbd1947eb54018155a":"2005f79d55b12e6dfbab7fedecc50e2d":"":"c2aaab524d1738b5244af642bbd16b32ba954e69ae51acc804a6b0f89f6cb77ba2db2b0e109cda6036786f9cec5587b01e306ee8b3d588748c61ad7fce1266165729d0153ee189746b107ce15ced667279a484294725e120dc1803d2c751784436ab8ff1d5a537628ee35742d1917dc51f8cb46c2d6b983bdec502e99b85e5b5":120:"52b4d7f2cc44f0725ee903551f681d":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"637807b3e472e2287b09d5a3ee62f791a416419ba35e11c49b24dbadc209f0ba":"e91a0a7320329dabb0d0fd7f099a4d313724aeeebcffe6fcea5b00af27d258cf9774845d29aaf5dad634c6f087c3311b1c92775fda8df8820c91186da30dc79747be6ec6230f2c261063143f4fc89d94c7efc145e68bfdbd58fb14e856578ed57ee5b3cba2cc67dd6497f05d1570efa496b46f5bcbf82ff9c6a414f76fcf3f5c":"46909d8dba6c82b86c7a2aca3c9e71e0":"":"13b4ad9c51063a7f697f3fc68030144aee0aeef0b5a52c9d4920a7185b0452159cf13e64ca216ff16637d0946a75fb5da283fcd263dd7ef2c8f14cf75537742d1f0e48846fcdbf03bc343203f7c31cf61b36374033462a7b813f4dbe9386e57874591fde606fbc150d4916c339f1950b09b1911b1b9119c3ff4053e05910ffb2":120:"6a5c83f807401d1a9a3a2688289f61":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"33613dc6e029df0f3ab9ca66fa96cdeaa84c1261dd586723b1ce873545565f7a":"775862b39c2a509afd3470a56891fbb79bdb7dacfdb9ac72ba4730cb936d364e1aed3c92c01a018cfcd7953f751003934c15bdfdf2826e9947ea8e521f55fd2a04c75156e4910f38932c9732eb3e60423e849d34c55e3fd00b48d83028e3b4f35686016126ff16c942ec859d3c3aa2ee6d322a92dc9fa9b0247423416f5a4b47":"59484fbc27cdbd917bb55f815f9faab6":"":"069f80826dbee03e6a3437e7c6d16eb6022bd14827b8e45bd440d9b1a8ddae09999388ba0b1be0a6bafdb96f26dad523a3592fa610d5091f68380f4c1c3fa9ef7a0796ab183e8a82c2bf1f76300f98ce983eab7a93ddb18f1c10534fdb61ace83cae37e225930ab870a46285e733788e907255ca391945d409d2e53dd8a28390":112:"9f31f8f8459eb03dc3654caba5c2":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"75d8132f70ef3f2d8946d296c83014683eb2a4a58b555c0f48e4bfa5774d6672":"a5be88fd43dc761838f3a9c7d62923c38414fa61b3678313cbc8fa9c2e5effb6cad7d5be5f39a71a28ff327b68a69f7e6a6bcb90eccacaf3a8659aeb905dd3e38efe57f2bd0d19daacae238baa01a7051084da6598fc5a3783a18decefc8efc8d46c7b1887f87d6d70c909df49340bcc680832faac3dd23cab5bcd80553dd485":"5ff41f3e75c25cedda1b08a41b89c4b4":"":"959396b86913337f2b1fb19767b787c18f00661c5d601bc65e884e15ac8043081459e889453e906ee267cb5d04fbaf250144a56c820eca34469967c73daf50796184ecf74f3c054bfa63bdd0c32425a8e10546ac342bb8e38a186e42a403cb80110aefd5f2d0bcdd353daa4430b8e7ec2134925c454745e2f708cd0b90d9d672":112:"ca0889a0eb12995079cf9ba77019":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"8d44344d2ff9a02b1c75785bc84f16e4d23614bf43b2b9a87798b418e905c532":"e5689cef9f8258a748a615070fcbf40ed0b24c077e2f9a362cb536737ffbc5383bcafed278d4c5e0f3c83fdd5cde79483c2c178f6fef05ab50f2b8db680027a175bc6d702d249efcd6cbc425b736f1905307c9303a4bd8aca620b57e3bb4b68f2a515259b06cf5365b675edff3457e2e915d7da1e0802f7300b3d56c4644f4ad":"256a983cd6d6eb4e80b5c1d1cd2a9f21":"":"13eeadbecc4c9991e2aa0b1ca819572ef28517528320db970739a16994f82cd8b5bb53d889f298f65c63dcc07089dbf7e9d00612d2cc8220b5630ca0262a698836d906256896eea446f6de4506e558b4f20950528c8c397b6b5b04890204b77a163e46c80c96b3e268fd2754e0380e7330782d606c771d6085b34200a80335f0":112:"b33ab1e4029998e2566583dd550d":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3999a6a394943be3d6e5732af5faf26caf483a3fd42c13b7f4f02132e93a990d":"8907e8832553264d7e92afa1595842ac661ddfec3f4294567faa0af61b3d0fdf76a922a2f3affb36b3b3b97f18d5172aec0b8f6f01239bb750c0fdd5da1e1244473cdfade83797037ca46d83123e6105c5c54071971f190da0c59821b0bf87242502bd19d19c7f463145bab0e687a18ffb2216c4a2ad2caf9488801c33c78c03":"76e2a5141d094b3a77765ba328f33576":"":"995189a396486b451db0167cf6990557287074def46eef872e6cfe1a297e256bdff2b71668ff0184eedf00ff1a3ec91358874718f0af88acf2bdb191e97332dc544d940412363840d4c03c7b2231852393c62d625093011ef314e4f755b1d0ee37690b4dfb55194a1465714cc3cbcdf93af39e666be0407508b8764f7ee95d3c":104:"87c8f61f459fd4a09d9ee8b331":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4359a62d54c43770c3a0d51da25cc32fd985d9b41c282887299d2e348aa25a36":"f020c9cafba399009bd920c3ffc165d4db47a9ee15ca8c1f51c65e306ccccd3f1d694071a3c765b5255eba6ef6a280f6095f8c195ebdfbee6968b57366e62e16d05b1768825ab7fe66300941270aa121b4fc02ab970ca6e32170cdbccb46fc548620fa1777049343b1600bfb1bdecec6682f0aa7244a0852adbc7aacedfba446":"5fefa85c958417b6bc8a61b5496fea93":"":"3b8f829aa1cc1532a434bfbbd25f42480311657215946b9216846704fd5da5e886ca9d130df466c3b58f5259102ea6b9ad756e9f484a38dd0ed289fea083ab99fefbc2747100071744f10e362351d4ffac6c7c1f5a49ef3c78e2dc667f6b3bfd0fec454c4e3139443da71e514540d7a228db193a4c35d639ec13c1198ee7f81e":104:"591db861b9060869edb228a324":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"0d798a357de5a686d06c329e451d7384bfbd462063fb8ea7d77a13dfa1f2aac2":"d920785bd7d7b1a2c9c20139380a6ac5f27a11b614ae110da14203146c2615d81e97649e95edb0eda71a0fa1589244ed42fd9449962a92942e38001ac64b212c7e06c113129712a01556577ae02325a26eb92581c0a690a894225e83ff1e36776f22b600508d6d96a0d1c55316b518df8d09769df5e8340cbeabaa0bf7752870":"50a003c0cb50ae8a3183cd640ea4c6f6":"":"9af6a5341cde4b7e1b88346ec481024b40ad95a51533cdd8e09e4809a20684f18eaf243e1df56f02ace9667264cc1c6af6b0914f154b332234f6468cc471ecb2078a9f81c17f4ade83d326b670795458d110e4c4b4cd7fe7f9f5f4d4fb23a038969e4ff4f74839b1edc270fc81fcdc8a0b15b9c2f0561567c471b783b4322ebf":104:"6c2f01264f9dbf29962122daff":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"29b01b6d15f6e68fc2e7079429dde5363888a6410191d603941bed272daef7ed":"123b6da306978f745d1dd86d7df32d9421523a7f329dd29ad98d2c309145844010295ef443a18d37ffe093080682fb96ba9c2c92105d35d77897b589e2abc7269aba8752c2a48c843bebad2c0fa281015ba85f5f709f6aee9b1d49236d5695f7f7d01554b193c89adcd1a91749138952cb3f0ec8b5f046328b3113aaa0715ef4":"cb4ac8373bcbf1b14cf2a6a6a16a422a":"":"caf71e09395d596d5a7b091c9e87ba6d522e974451e41f33f3e7ded554f24daa9da719e87793424eca9a3eb3972983354041091ba4b16c5c8c14913e1f6cbda09779188e9b5512917a0adf4b4344f119736ba6328897726a317989cddc66f16bab64707564bb0064fe6ab7b2b5cce143e94d4b6d739f58c47b6d4850697f8101":96:"f635ff3d8bfbfb49694e05ec":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f96d8cdcc21884e050f762c049930d78360b56cef5b99ae232c9a8c6e8fa89f7":"9cf05e5065531d2539d92ae76a43da1fa3614ffa4b1c73ddc2358f8d71345c01260060239edf629efc3650e0d13174af4294b6da0f39cc7fbecfa324afff89dd7d203416bd144c5e03df60a287fd4a8d54ef9b4b44b3d6de1d9de07418b8a34ec5c28cec3c5b2fb861583178a68ea0af89f2dfbfbd86f7cf1e572e1c8d4b0675":"5a7eb964b6bc9e75450b721b4d1f8f92":"":"566abaa23b8d464d6f107699453740e9e189254145c5132fe46989a6654de297398913daacb4083b29f7b31832079616e9a43c9c2878df1df451e49f1e629c8b9de2fb0e4ae9df48e3e8880f3f1ff5ace8842d2695e702dd1b7bfa7c25b0539b8c80d31ac91856796beced082c213e8be56efd646dae932f5bf503af46f491d8":96:"c049cce29c401d3d198773b6":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"253234c3dc9cb3d50a80598c5cde0e37b6b13bf834f3595a9458dee698a6d19b":"686ad2740bdad507ebe97aa5bdbef25b8b030c4cdcaccb0d3b675ca91279db3ea75aa222c0ae98f86c24b10038cbb4fe9f897e1145b2f58cd3e9120f9a5620f38aa1e1f63906f557ff4a4c3223f5bb13dca34f8a1c6419e24ea57d114c62fec6fb9eee58a16b9e6a6bd930aa6fedcfc591311250e7167d43cca5916d5beead27":"9d156414acb63d11cb34870b937c837d":"":"96abd56d2f8aefe6c687f035df46c3f952a9933b8a51698e47d973b7d47c65ca3ba2474cb419c84a4c3cefb49e78cee1443a8fbbdaaecf73e9059ef34ac5a0df3fc152ecde2286da8840ad4617fd6ebc1e126314204bdc0a17b958430eb9f727498ff1db17aabbdaf43acca0945342d2ba9346da5373b2372b3081605e895c99":96:"3d998e5be9df433da001a686":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1054d48d52693d2797c80d3f10509d1c808f36a4d65e8fd968e5d56239f856bc":"a708e9d2d27ed4228e5b23d358561a77d684d855db9827be2bc102f2278f1961d3f056fb76f76204b2c96b916eb5e407f98e58edfed06de2388521832d97211d851d3e29658df738e3a15593b9db016d9e46fe9df98ce972d59f7058d484886ffaec7b9fd973c55644831241c1ce85bb478e83ccefd26b9718bfe910ac311ecc":"87611b936873b63abeaea990d6637a22":"":"94473e84659bc18eddcebe3112f55426f48ca4d670291fdedd42cc15a7415aa6795fb75b39434884eb266677e1fa7f530c6f3aaa733c0d9c06291bd7dff4c4e5857b2ee9e9f1f61a85571ad32dc9a3259017abe9eb5111e56df2913535669f3b2d722bd35fcdbd6541918885d9677cccaa902b9d3599cd4f0df1f35f4d11b8cf":64:"9bd7cfe1023448ac":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"a95dc5127b9cb1c82d558d5b24ae049e24447fd676a49350089951afe01dc797":"45f81fa4780a256c40a0efec9547310406904d8991bcf964aa35ec9af457e2a642c1343827839f1f4b42f2b226da351731f416a4b4151f07927c278b371404f027bb2058e1765b367f5433a43fa4153883351041db3f066ef284a3eabd584d1d0b1d594b4ce7b5bca1708fbc661d95a9ac0d77dc29547f022eedc582fc7158c3":"0b177d01993ec726fff082ec88c64a31":"":"16c77b7f541d2dc4e8d31da23e04f18f4254aa283e8cee5b776f3d9a27584f459d0747955efff8945f807209ddaa6421846647d4198534b244498fe13a9073d372171d1b2fc38af66204f3de04000c093ebe659173b8d78dcfb8ca9003d2cd44ed168e6aaf55a06f29e83ceb32b98bafb59f109599f88b5c0f0557bd2b28f03f":64:"19eb5f808d65989d":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"53d6393dd7ecc40f2d52460ecdb0607133ad843ef53f380cd3a2755bfa567abe":"72199c54dd5efb28c104e3b7210855506f6577d15c4eccdaa6a621a572e15f5845d648cf71b9fafef3411f6c1a664c7974fe71126a5cbab907e2caa342d8d7a05bc68a72c824896ec40e520e90b704dea441d22c5918f98803a88293384f64f92f11650c2cf4d3b062d30e14d149160742f59a473faf8fe00f4bdab9128c3281":"db7e93da21f0c9840c54c56e9c6ceba3":"":"5e83f559fa54926b731334f815783914530bbcc472d4bbd5e65908fb1c421442cb4c57329f2e4ba3d146a6499f34d8f1ec6d43e0cf98bdba923f404b914700edb235b08b0330097ea4162fd0baa1b7177ef0b29d5a6689bc56b8f975d6b6067ade4b8baf1d47a2eeb5b2ed28ebeded381d55d280cb2fb65ce4d82b69cce0594d":64:"4e65dde857a0f5c7":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aa4a53c7764a254b06e1d8003810300b70f5729306effba9fb6210f97648a499":"19f3a8c298478d6868bf3b31785eb62e844c37200672e6ef1ecc05c616d981e02c333dbc3f86dbb7ab9ba40e9e57e133e6d1d595fcc6d8e9886a84517212669d5d7ce0f1383cb58681b92dc180c06caa1a7ac1ec974dcd7f2bca7ad2ab2789c9a3a487d64c484319bffa56d854a6d40c62b02d0c7898f641f106ff50d22a12e7":"c32288f97af9b6e31aa7e40d9ef8d016":"":"1fa6aec7a28767c8961363dc4264e6ab97014264f6fe1dda7e9db8646ce9a5463f69e91aad2fce696f9b641d75635bfb0f97ed2d7beaca944cf8bd9dbfffe77b5ae9fd032575e5333c7ce27538c609922843de87b960ebca7c2a2ef9702dd0c32f787b4d7df248fdf526d594a90bad0d6a8dffe212246c36db71e2d348326624":32:"1699444e":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f420b6ef96d9bfe46dcf18246ee230790a6fc854e730f1dd2d1ffd0e8b5c4776":"658a954d6c61d0d6f0e81a3c1cc65684483fdc95f280b6d4c964358596c25ca41c389932d74a1a3a17d041e89b7110ea315fadb3128c2c469c350bf9b4723aa9c8abd9065ebbd12c317bfb7090f09633f8c1184f0c4fbe10f5486dbfb847536c886f7d144ed07272a7e62fb523a04111e5ea9e1ab415fd17e72143006db14e9e":"4982f502a37eea8bcf316ced466c9fb1":"":"8630aa78aabe35d9360a44bb2094209b6f70d46d71e3949803cf54e33dafd54c6e49eda9e26dc5c0c1e34908f5281c8cb2a1aeee81186cf45d3eb22f486320c7ee0fb7bf3c211b232a8426e7e82f3e05881bf7d9454cddec7f28e5358cd0e9ea2e9cff938be044c1b21911d50b2ae23ab1aef377511ea657adcb560c34209f8b":32:"3aa91b73":0 - -AES-GCM NIST Validation (AES-256,128,1024,0,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"50f3b822dfc70382d8695811e6b0a2896ea2bcd4d5268778cd484053c8a19288":"15bfb3a562ced63c92561a78374af40c88a08ce02392419e03d7543365c5b6525951ef2dec5927474a0ef85f519e5ef795881db3eafa765ec38e6be7b565a878c13d90c02889dc50cbe87081d9225a515504c7be15bf97f5d72a4d81f218a148a46fbd42983ab002fce0a54719bfe301bb761753cb330dc25be517b87d0428d9":"980810c11abd3aff43408ec9a69abcb3":"":"12632296f27eb2439009f6032a3f648370303dcebaac311b684de2496f399b271347b19e045c1060802f3f742b6c780d20b9d589cc082d7d0d580dfb7231171cfb612227fcdee7feae4f8defd34c89fb0d68570e782192a7bdd9a5464f35dc6a4282cf9cc3fdfac988d129eddf8e0795ccc24a113f872ada88834c974df8bc69":32:"32c1c4c5":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"29072ab5bad2c1425ca8dd0ae56f27e93f8d26b320b08f77b8bd3fa9d03edc6c":"3c7afc5cfc5a1e141587e93fef8427d4f21d892b983b7c9b6e9de3ee168837a1533847c8a2e2ab0706ac1474e9aa54ab57e7860bca9ebb83bd6d3ae26ca5387abdb9a60c4a9928484742a91294b13ab8f51eb4f599a30e9cb1894aca32a62a4c2793ee6793df473f43234c9eafb44d585a7d92a50aebef80c73c86ef67f5b5a4":"0201edf80475d2f969a90848f639528c":"4c8ff3edeaa68e47bbc8724b37822216d42e2669ca127da14b7b488fde31a49c7d357fb9aecc1991b3c6f63a4ce43959a22de70545e6aee8674d812ecaaef93ad03b5d4c99bdef6d52f21fc7fdbeb1c5629a76df59620aaefda81a8e73cebe4c646beffd7f4a98a5283cc7bc5e78b2a70f43e0cab0b7772e03a5f048ec75081a":"f3755aae6813e4e4b84a089ca1496564676655ba3c94e59c5f682adbbfed21e76aed0db78390258cf5fbf15f06c6b6468414cb6493c8b9b953b4954ecaf07ecaf8586ae001710d4069da6d21810bcdcbb831f7041cdbb984b7c55878598a6658883178dcc0fa03394519b8b9c3bed0e5c073429f5dd071a9184b015cbbbc62e1":128:"0549dd9f2a123bd6d58e5cd16c0624a1":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aa9999af53720d0c1288fd3fe307a471160635287eebf41dd77c82d1f9cc9d61":"6ce6f2dc202750219e15a24e1ff0678ffdde55b27cdcab6da188bd5235a3bdc677f72f106579d02c2970d4542e4e2372886e1a6d74c596ce735f51f2ee6aff4d62bd24112ec7cd1adc7c660561f163170cdf047c241c53b8a5b2e03fde48c249a319bb90c2693c468c9dd136e94e05f067cd1d68244ce50be318ae0464b79acd":"6299d651a032bdf3a7e6b25ace660e30":"afab0a3d1960ac973ee2f4461dacd10d189412b37e572cad7888bb4d2453f1eefbd6725aadd5f982393dfa59c3cf1ee342dd91e1fbfab10a802e3a0eda226fde2686e7db1015405a3d33c921e5aa857bfda53ca3aed3ff0e18c289406740a7c5d9f86ce43db40c9032e98ab126c7c0364e2efc008312b7641d36503d183fa5a5":"a8059fe6ff711616afb591b5e5de497b3b7813f9de658c7b47cc3e7b07d0805c1ba05856d98341869b8394f3b5df2876ae19837edb3931eebeb0f26eb6c4a2ea78003d82a98111305208ccaceaf77e5d71996cca4f9a5eb712dd916b71455f741ec2dde51f56828667b7a2da015e1886fba71e496a542d94a38efbcb5353fb89":128:"2ff4d8d00400ad63a6ae7842eefb16eb":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,128) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"31721e5e3a748a7f7369f3dffc1cbb570ceac868ef9d1f29b944b7e86a26d273":"6afc1d22233a60c3e6851447de89152a0dbadcd87e35fc947ca4bc886f1f87549ea106b097e2655136833d06dfb879a85732298860c149c5e5ff03bb2a95d9cd3deeb8ffdf951ea5f97e32c1ed75271d2ea58d158ae6d568bf197d69130977e330ebfef33f222bfd5b56bc6b0382dc99c4f0e42b0aa7a117b43f96d43f6e02dd":"523247d56cc67c752b20eab7a28f85fe":"11eb41aeae3611f0de77bfa1221ef5b7d254faf893dbdaead926a61605f8a86f20f1fb84e0c5acd195143bc5a4f297bf729129f898a2013175b3db7004115a6120134d8e354afe36699a6c6618d739c805b5b91739df67de7667729f1d6eae1a0609897999d474be4d8b826df901c6f39d522570d38d2d1aa828382932a177b1":"39e7f32bb3e8436d97a1d86a22750768001fe3a805516d3f800352323afd221991105d12da69ce7430402fa7923958ad5ed85506b968c4dd89516d6e3d02e722db3954ce098ec3299ef4f2ed4a89f383408dceca9dabc6f8eefe5a1f80093961c29a94b222d1a04d2c1e453d2e02977f3dd77a4659e2bde2fdbba8e2829db4f1":128:"506883db674fa0417e0832efc040227c":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"100bd2bf9c8b24cc2e8d57697cd131c846b55ad6ff0b214c0de14104b465b58b":"81c3370da989f774c1962f60c57299747481bea0e6b91df846e6ef93cada977bc742ee33ce085ae33eb9f7393a0943b647205a7e1ffb2a6a803a1ce7a88902456d66612362962b97c7152b57f1d54de94a39f07c1a8098da4ea5e498d426b7036c642fbeebefda50b8c421a7a33b1a8499dc35011d80a51d34285824d6f01722":"363e8af6f38307ec126e466e7056cc45":"471f7e9a0b505b12996747ec9e32731f11911ee95d70795bbd1bba34cf782d4100ce30a85b23f9f817f30e8f314e1a23e101201c920ce12ce732cc3fe01c74a9ee8d3e1599aa22f2398c3265d4dbda626a8ff4262889009e087fbef6babe33d7300e5cfc4c0056f3562a913d2594fee8e44959cf728599a9d3e7ee4a9ecd6694":"9494d01966ac887b8295bde61f0e7d006ea7b5c984a29cf5d849194f35d7b0f6ddb3bbd9646d7b9b961c515179901d2b04cb7cf7b6c8736d1d472ae8bb9a6dc9194b03b3f5373551a5ae0c0f023967669c873f0acfb02c0ae3a384e70f7a7ca05861f257f36a2ad5fbb591473dfc3ae1264dca0e889e0ddbf93dadf75db2059b":120:"5c78d914cac78c514e275a244d0ea4":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"614dd1762deb5c726eadf0e6587f9f38fa63d16bca1926955404f1b9f83e241a":"1ae828a1693d3c24651ab8ba59fb1185d08e6cc4a964f30dac59cd81ff4bdfce8023ab1b6dffb594a4250d25f611763efb4152cd35b937ca11373d237f1f8b3c0e21b942beb1f4ffe5014198c9ff59896ddfbb55e69963e3ef6b03d3fa134977870cd6f3ac10bbf59bdcc9f103cc2d58f294ef5f007a9f903c7bada08cb454e6":"10d079a86894b0c17bfcc8ffc4ecf7bc":"c4035f80b6d2ea288afd4ddaec1eb232b78be5a86583fa85f791d546102c97ace9716c2702483d762c8e4eda12f3dd10a9a49a2d72cd4694fa794477b54b4367be6b548675aee4c351e3f66c7e113aecfbcc57b8bbab4a039f28488237c75313e62612847b915ef9b582e146b2bfabbfce576a984f5ce4be0e6bff5480584fc3":"bf5fb0445aab46aba504801d5356455f28c98f300670a731bdd0c901a1d5564aa31f5d467e5f80dadbfeca61d2bf72b570f3935ba04c45a2ff7994bac6cabf84db2a42cd5db2a4f160c97c76817cc5cb62d4006d895fcdb218c1464b5caaadbd1f61779938e9a84440615eae050cd6f1713cfbd695d78818b2af78157339e9d9":120:"6d815ee12813875ce74e3aed3c7b73":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,120) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"12e97fafff7d397ea34efc0a8528afcd51c1b2ccda680ae9049edc8359b78ec0":"9fbf0141cd50bd1b3ccaf137b808b698570642ab20c32120901622b34173d7ad119abca3c61bbf1e6dd5cb182a079f3e01b0e5263d984c6186f01792125dd6c47c30033008ca2e0377f990285094f652c55a348242dfaa59f76989fcf86033c8d9c0b2a526bf46cca207e055e1dbc7cf3d0b7a840c8fb5f85784c9e4563f71de":"8eb11abfe350c0d5a6b02477b44867e9":"0a830029d450e20aaef484d4abee9dadeabbd6feaf800b3a693b4746db059efb7d110405b45e45a9e5acf90957c154674dfb2c1cd787af371e01bafc4e8475d0268b969d25756a1121a519afa61f3d6ecded4e0640f0ddd471f5b8e82029fd2887df4e65af9580390b6924022e39acfede7530e5f0e54f0285ba565ff49af542":"067cd6ff8461ac80217ef70a91dcf6edb2fbdd31856815cf356fffa63ba3f5cb293d7f1ed32ae40248693617f27839a34e871fdde635c04d1e66743f730a06e2be25cafe1d67d804879fe38e009268ec50a0294da445c795742ff1e924170e4c2e0e9ef3bdc26c251f5537218d295d93d57baccc4dee6185c235d7ec5c9926a6":120:"931f44f10993c836e534a59c1aeb98":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c732da000262de558bd3ea65e66e20e11605170c90b67708bda43f40abed74fe":"7d6c981c30ef87a46f53aecb4c97124fb94b45057635d5bf1d4f3a3bdb534e9ab62b4a425de9dc52537575ed9ff406cfbf75403d3d9cdbd9fcd520d62065f81483427fa27964642cc1a07822da0f6234a689eb30e8425d7709abfd18666c76c963eecef20503ee77c96802c120abea1428cc64a08fc20860527854fecc571a6c":"523dd34ea263c31c2215053986626d02":"f170556ac5d38f0661bae33e0826356c8488218903eba1bfa49b16882537ef78283fd9351f37f44a7687049a608c3ddcc82817d4ba96a40d05807a38ee3f2d5cb8b1121db61318fe22bfd3afb319e84c4e2f94570a92433db29bd2193485449c719a2c6030696f53ac729df90678eb018783b25740d806d1ef6980e10d396595":"3470d4544f7bfa3ac0627a56e66c56fa062188440834b9238bd20e89dfc701fe6cfe0bf4ea2387014bd83c63ab7c912e1c0dce7c2d92eaea155f886b574bc94a8f4f275dffe2d84173a05b99d8029c36dd3c35c12709d33f55c3bcd96e9a815f77a4fe8e50639d8f195a526486f1209d7bf7e86ac3dfc4a1d2cbddb6d330e5db":112:"5924f3ceff0207fc8ba8179a9925":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"2684bccf2b845314a0c4b8b5a780f91aa7ed1177539122dc8717c14bb50e2dff":"1a4174d4e18ae0b6434f35dcd9c86cf158c42ce00ceb12f4356ec118d659820518c326a1b2ab92279d949f74c45219c660cb84fb6b10b14d56a501173fd3b129ac89db0de22874d92bec724e94751f91a817a42a28e8e15672172c0b0db4ead46b14d4bc21ad8f5ba1f9e7e0fcc867700681349b8102a208d76ae4ef7df5b56e":"8433b59b41fe0cdc5b30e4e87c5028ec":"280026eeebf05e26e84955e4a36352d4f97f3193dce0795d526d05645bf5d2eec4b92ee8dce54d78fd3fc3e36bc79d5bf9ee3b2699310a75dbc5007bdacb4dc88d06515995f8f5b1aa90cb8fc036b763a5e819db70c091802fb7f24b9c2a68ff194032fffc4ef798936aabccbb43f22a2bbd7e1ab9d0434d443dac4929b84193":"cc155e04472c0872d5ccf8910d34496f380954da7653a1e1d3c460fbbc791c9b82e35176e938b7e21eb4690ed9fca74ba45a03dac4abc4f625ffdfad02e1acccf18b5a1878f911fb6f6e09ce0d4c6a0bb87226e914879a1b3085c30e8328aa6e0d1c49c21b760b82e469981b40ea102f3998c81dd9799f484ab89b19396ab7e1":112:"5a80008e6da40c71b316b84ae284":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,112) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"484a33ba0b97c2887a86a1476f274e236eb37a72e05f9e74348248877ea99e98":"4d81cec14b398257a31ad1e3581c00d05e12b37b71260bdd95bc0b6981b614598ffbbb3ec4bb7deb5673a1020139877122f88504c9c53265706fe76623a9b488a3dfdd4cbc1b7b46c7fce9d7378e164964c0a377337a5c172e5e4de6206375164cd7beb0305d7a90f5c73e12f445326e1bc9ac5acd1bd4bcbe4662524891a2e9":"c3a5cc19aef6d64b656d66fad697b829":"30f276f96a50e17b452dcb5e1b4ab666dc7c4c72d0d9ab2abaf77eae2e3bab7dbe5ac005d7eac5480e1bae13646b59155528abdc148b3b71f06d017c4b12d64aa3990cc96941eaac14b60eb347e0be873de2b6fe2b86e2c2fc063b29511b70144ecd315b9491001b122701b9c8cc1d85427b6c60663ccd9d1fa84e1c2f609f36":"579fd8fb50d795b5b208c2d5b0a8b1804f754a30a1003025301655aebcda2d2ff30d29a16d0fb17a28401127750fc87c9e3aa08540817228b049c387253ea2359035b8063ab4bf54504ca5ad93b54b8ac5bd0c1ef3c6769fb1ed239bb76f3e0bc51d356aa91b494d22749c8e4cdb1629e93f7c6e46ff9145916c1275669ae5ba":112:"1c39aac1d5ffe7916a08ab2ce279":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"4a5f5321b515cfcde493148ee4c44c693b1979b3a3ba522a2a80e5d27c93fd1b":"962b8504feb57ae73e93c2e8962c9562f409c908e51f9904df1623eaa0c6b998db6ee8919d805b6ffcc37da51300c1ae16bca21f8f6f63af989a813ae8fe28c3fb012f003dab7e71b08d757799208806062d62b4ac937712409f9fafff3e3579a4d92d4437a6f0b263e1da7e4651e0a521be5f6f49ff5a0778f07bd5d3dac696":"c2cb0166046bad0cf0a107af83921d7a":"e48abfb657ab33f58eeda8c58a20e7e299bc3e7481f704c326529408580f9a5130cf6f7368502d20b03ba6c3b8f6f28c076a3ef7b8e987750dc972be953e712483e6f328da57e4b5c501fa7c720593eb89ff9644fbdc45478f80ee89f096694dcb44a9b3a6aca0904d4aa4e475b4b24771df9fd6ef9557f4f5c842ac241b212f":"11bd55d969603ff3d46355cb19c69557b99825a4c23eeafc8eed8422dab537c0fa9753191c49a6fd9e0d6760ed816a49e7f5704b5936a498544e2bbba7875c513c031f11527ca1b9b579960be6964fba9119dcece8205c174be07ebffada83375678de76fc012b0ee179787b4aa9fb6e2b459575260eb01f23786dc24d1d45ef":104:"36853a029b5163ca76c72d4fec":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"c8f7b7e6295fc8e33740bf2807caeaf4b90817cc3ef3d9f38f704d9f6164e41d":"4c26e489069b487ce9dc0e295d5e89760401185374041b0efca5bbf758e7d010ccbfe5999e2a817776aa8f49c1e5d43bcdade2989fe5be635dab54cb0e390a21b832b30f688857b9e09c346bcc5397e51cf71acbe1bfcaa1ecd7e87fe5dfde180d951922e60dd8203ff210c995eb54bb981f7e931f0b1f52dce0cf1b2eba503f":"903b2eeb9d0b3794acb7439d341cfe0d":"83e99497bfbe9393b065b0b18c13f99b67f1fdd724fd5d70cdccd2b8dd658499cb9f57e1a1fe39634ab0869182de085722a79eaabf057aac7b3f3230f51a2f9b48b49d592f02246dacbe915ff9d9a53f7e5332f7a9d89649050b075c07e5e74f281ca1a0dbe632c0aecf3b1911cd6ec4f8facc2777d0d14784bf5951a1c62c33":"63e2941bf4a13374627be66bdd4e57119149f81f4c1a8a321d27a4a79e7d61e2dcec9d7b13fcccf12f5b059cc209f8414ae81966462a266e92b4b3c25198ee240e0bc6f6197df1e24e8d4379fcae89e6240a7f9c7bab886e79990b846e98e4bacb8b3b17422249943e9973de42da5e38e4eb52830b1facce766b3389a5312476":104:"6e31c5db3146ae45ef5d50485e":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,104) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"dec062efc1bd2556b87a81143d025abbaa532c586d5ebb065859a2071f8f07e4":"02191bcb060e61827dbddac6c2961dbab8812cdc2ac77bf0275628e8e36bae18ad4deb77b2682ade0aef76afd4592173ba29dae4d0735963c803856eaa6f60a6c21785358e87f3c4a91e321c59e04c150297de873679194ba5ca857f7d91ffc358e73810d555ebd4dbd1fe4fbc4ffa4ff38e4b41db9af0a84fe9828708631469":"19abd0361443c3ac2a46f2606eeb1a69":"c3785e7c0095726fd1f3ca842057b0ea2baf9c3fe1119c2147609158a2039f26cedf8a44e046955ba7e7cad9f48cb49274fc53b109d7897e080af252e7dc64807c276bcf668d2cd505c9ce8e584609d293ebd2a4515bfbaf78c413d6e29dc90974db38b564ffe9a40d3955dba9f19b6f39bf942669cf80e4676d6c10df566ca1":"91a16c7fe029e3fddacf0809dde7d041c438977b89192e6fed7605d0133f3d9e810355d186432f6529bd2c4cb9dadb4fedf5128cb45e25a3a46bf74ed93f31349f64a69dbe86592d76e437947f1c1d7270d1cffe80afe10ae8523541961eacee1838c168a2ab76703ea4674a68a96b8a298a672ffc140e98e452d501fd57f000":104:"5b4071a4be0543aaa59b56de35":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9b7b700d978e33ae9311b206347f488e2832fad5ce7e6026ad5e24fb47104fcb":"37aef6e4200c6abc3d161daaf9dd6ede002ce8c63d9ed54e8ac56bdc8d36906bea663d2857d8d543166ba150827735ec78e37f92e682275e268d377b1880970df232162e55c9311882f889e7d183e5cf4972691c85f81c47e1224b9c97ee3963d75c6a032270ad6d713c999913f0b58a2d4f42b85a3b0b40541a31398cdfb4b0":"d0bbc284af767af9a31b863d66cb6138":"dfb87a65ab2d99d7d753042aa47448ad830e546d298d6ad52b85207bbb0cbe8cf3cdb12b3544f1fc228fdae04a241abf9e71de8ae14f2de2c261469c383c682e13582e07cddb1ed9bff1fd2aa0be7978096a914676dfbe7bec6edd927362f656ce1de86229bc511cfec4cda77a1e761e7ab8664e4df08cb820ebdb604c2cdbb0":"dcd5575d94fffc647d4c081e3ce03928651419a32ada2af02de2f58d68fa98eb1fd5ef671875719a9c65b9ecc69513408a79a0a5d57cabd04f8e651f5b8fc1ff42ce58d8a212ac2bcb83c5c53c542c282553a62b4e3d7d4f049ab13172739a0f46e0a2fd9aec54eb0c84141c6b341783754372df69d39e48cc24eb3d9ddb21a9":96:"4a7ac79db94b27469b92343a":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"ce15e61edd9320ceacbf3984d87c707159caa738e7e76285be00b5a95954b523":"8af4a7d92441ce931815fa4e24d69f66256fec7e62f79a029b684b5db304a46b2a3d3a7ee8d6b7ae38caa7de526d5c0f28dc65a0913a383b7ee1640cbe24997ba95b9b12fa1e9ce9f9100d883c16b6286dce17e381af15113f56197c97fe6b45be00a3df05045f476829d7b303211ac97cf989a18c16e27fbf23570d9d18f04b":"b1269c8495ea1469ff41d8154ae6765e":"0ad26a08a5cc2ec825347d7ffd5aac795eb68aa7e22970d991c863fa6d1fa720137aa5cde4e382625a0038e6ed72da3b5003c1b2a953c2b2138e0cf870cca4afb595c0451aa793fb0a2bc43834a0aca1e760590cca765ad672ead975993f82ae6765c5afbddc6062d7c4babebf650ab097db1a1d9a2a99e8fd2e0eb8a7b916f6":"ad0ab4e77257866e4a57cf44fa4049428e56a6e8b8fd47b4cd00bfce84fa8f5a43f1df2061b0a37311b4a1436bad0d61d52ced5e262ed41a7eb125d61cec2e3fbaa95e533b43f318048096ebc8466f0cd609bb5e7c3fc6e5701aace546618a170f88c0b7ed76b63759ca4e4b931a86ac379dd12ad2cba7d47a19a3ae7c242fb0":96:"fb1e988f9c97358a17e35e6f":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,96) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"aef24b8205d4085d978505f04724293c2819ef9f3f03a6c758078690fc4bf7c8":"db26453170db2f984312e0cf961d1a7df1154f0525c31f166be5c9f516736501f9f2dd8096a69b6441888ce27aaceacb0b365a38e4e01e2e34027c023206e814f22d46fd2fa69f87509ddced4b8852a76b2532b92f069b8c922ac13b2b7f19cb7c524657a4ee6e989cf2598bef674aa31576776853fb7f9a2704d6b3ee7fbcbb":"81456baa337c3dfd162d9c5f72a2e216":"484a5f4772643cf74ccdced0e5d80862f9300f26ae3139968649d3d7bb761b313f2ba63798b2040d397c3d1569285fee8498fd9254851c15b98af5bd351fa72e7d574c62ede0d728e1279e8b4e4784fd63ea7851e99d1d2356bcbf868528f8d0a90fc3b884ece631648d916ec97abadca1b0dd7670e6ad42245021570582ec7c":"da95c61cd2bb88fea78c059c254d2b949d4fc291c73ac178ace44c1e6a339f64931c857d3a7cb276a04993620adb6918dfd3f9083edad384a8e6c1d4799d526a1c969d8deb0e2667d6d06f559baf914b49fc463244528aa6522d19699065438d939521d7d7bb149835298f2054bcaae6d786f6dde133b640697a3d37c697579a":96:"bc1c1cbcad2e1a66ace079a2":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9685aea9aaebbd691e679779034729306d5887bee4c1f90f6ee3a397a0ff3ece":"ae3b2fa1e209f72c167eb16bc15b7669b87d4ab516e428157810b87a83e90d56e267bd4996522b5b22c2a349d3765ca27ea27057dd71f7c18ddd053033bd780b6cb689f48c383e9c717b9b265cb9e32c70c4a7d8fb933e986d996b5ad914cd645b74c47ac3a0de952ee3fc73ada83d896da7ca0b2a0b10e4f701fa13cba9ec50":"b1bc140531ae8c69e2ffc784e0988038":"294ff858fa6efc82ca3be4d05332bbb951a71a7ddfa4b78472e1582b445312eec11793d8d6e1e858d9cb078b5fc9083ac8a3e3bd82964cb07c08450567922299f68fd47663c7a77c29f2b5347f229301433d5a75263158a0d80095859e7e45476b99b23412046bfbe4eafff9f7820ba49919d2c987cf00c286c784e7669d8fe8":"6575128b576e68f7b3709e325b3d616783b42ff7f7631eb62b90cb0c8a86bd324756f43af53c33cbdaf9cf64ea94cf1b7fab5003f00c1d07f3fc8eb1931d759f9c43477ba22311a111488092c42b7786facf42b861a824cd1bcdc603a77d11253f15206a929a3e16e8737d080b8e5f0da8896226989a9964d72e491187250472":64:"f78c4dd37c06b197":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"3adf0da24394a98c7beae01d28f261a9cbd887aeeecc0c29e84540264d5a6bad":"8cf023d717b0f82f2b81750b53fb665c1c90f4740af4a3534b36b847df33ba5eec19eb24ead70a4b613a82572878216181d59b0c4c4df99be08d021cf182724d8ff5ec4e85884d0f69c16238fbbdbc5529ffcc4e418405e4e95139f79d3115a1ac56820cd39fc413ab72f7d447f947cb0541fc2be261f1246c0a786199013b22":"ad41288817577316df2d881ac93fcdef":"ad33ce922372fbe3531c0dece69f85f18eb1bbfb09a178403832308de0e54b1010db2636c4b7d9caa478138f61db5149c9fd7f3b45b7a1876729fe67622a37f0b322ef9cf6043b301a5d4c81e6f347d22bd3e40722059d3be945845c6b0629fbcfcaf885c7f393aa81f242c48c61a439574761ef6b671972cac664403250750e":"9d465e9c4228323946b1261892243d8455edb9eb8633d026d4033fa3965d20730979ba6952c0f6f2c5768f03c19256b64bc759d2e7b92424bbc668308504ba34384c2bb37baaf91a3a4f0952a050a3d69853141b49e86eda3bf0c4db4ebcd1c41e7f13eca20bf574a47ec45b8c98def17c0741805bf8f37923ba2b5221428578":64:"507618cec6d03964":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,64) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"9ef64b4132db54668568e2ae66ab61f62a820c7002a67a7e42006280a373feba":"4b96dce753273188c4cca3386a7415d5d9263757376e1f32797df47992e92e1bc0ab0833363b3acffde22602d4e47307bc8f252944414a15e1398693fd3b8bf4d8101cdcf70ce2c9de8cb7f5bb17cd83f09b1bc78ba07c34b9214e250c5940e9794199cb392309027d5ab4f32b51c533db6732024bd412f2cb0c5178d5296aa5":"07a86dbe2cce040eccdad79b3d211ecc":"af7a75748ee293015b600ca82ccc7718f4ecc20c3a2357ee02fb726330a0d79ca8bb97979bc0c89f4c60d7154f8bd29ba6ec5f2f4be286ea8a258cf6bd39b4f42d6db8e70c99ec3af26bb4d8003dc6fd0fdfbbc620d511d4d5f09ddf975a1663ac2979ae0978b0bc1e7bfcd660ae4ac7f1a8f6d8ee35752ed59a604f07dfda53":"e3e862146b6fb48b01ababc462dd560298eea7bfe5f3248e28a908d1de08c7e91fcf63922c394e7a51b64f4382225093e78598c050e588ff4ad38f3e83dc07b77ce569c6ab8f8a9cb0056b3155aa1503cebeb64c86d6d9cdbb178ea9a01a8ba33a1c48beb92ee4cf60e7dedf986019e19089cd186c98c229b0ff42c9e1aca571":64:"8614c216055c0660":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #0 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"f14ac79f35bc5a685433eea5bb7fd69fc959aabda24cbd8b7795fb2e41f90ab0":"8a20da14819079960b77ed5e548d0aa0bdcffb752817c1abe4195e612cfbb58c8e5a8af69f75bad10ee8afdf0b0d5c46c4dc11c32bff16d5e7e82e77fd80e475c6a5a0be36718af232697ab22314306b8ee32484b3461da657710c06170e80a6a8844f898c2be29366c8430f2392d100ffd419603cbce406dc7315577e6e9ee2":"353e1d08edce44c966430513cb7a0383":"cb1dde4ff5a6867038c170192fc2d292f5bb349d5b9a903cf3d88c09ce78fb1f4a776ff7588a25abb5e5f6a44791d7296afef3f32ed31db1def37dd25be0570a204955121f9c65b79a3ea88fc452dbcb82719243c11bc27e3408adf802b6e8b4e701ee4e9dfd140cb3277bf605bd5fb757d2325f7805fc6f0d1ea5a6207fac5f":"49b5e4ea0421034c074cde67dd39a0310c3f31e8138672ba2ecc0777be542f1c6529836d5206b79dac83d96aab56787a35c584b31228f007f11630328c3f40a57be37487689ee5babb576e7d14ff0f1f1ba6e4be11637352a4336327681058b99df2e44f9772de4e0e456d2e34dec5eeb335b238e862841d166e0612cc0f18f3":32:"88aed643":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #1 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"b55ac909e73989e310ae37d13c54bbd5a126f419a3b01a2ad8961d89bd247f81":"8a663e8b21a027c4a9545d145d42d9c67b4fcd5d0e39aa68822aedbd609e2c681f60e6315035321de739858b2b082bc05551fe9b8456c2e89c6151282c6068b915eae5762e4d6d765d667de58a315e061b3d60035ada50f59258eb6e2a1cd6b52eea7eb9d404fd96e71f19feff65b74a4b4f07061adf7c1b0e54e2ece7a2cd49":"9328abab0d3f63c75ddafd8559d96b4f":"cbae20aa1996abb62471aac91cd78080953fbe3b165d4c9435832ef1106e7e3424db8850f44a431c289ab4f2bbbea9e5c0c7aaf2e8de69c0ced176283662cadd280d8fda0c859551f0f90893ca57695c95803a1546826922ac78703d7ccae285b7ccd4bbab551756cccc6869dcf34b6af8d8b80c25c6fb1d2caa7f28161fb854":"457e13ff4eeaaae75d14bbf1bff91706c3168b9b146aed29dbe31b12ad90c1c158833be95701229ac6e4a13997e0a2d961d4a0021c4d8920ec54a9a935e5ea73b17e8fa60559df76bd07d966dfa7d86d1a77a313228b2ae7f66b5b696726c02af2c808bf75e0b9591a220e762f57c680ca68f20b2b5413b07731bbd49de039bf":32:"5de0434a":0 - -AES-GCM NIST Validation (AES-256,128,1024,1024,32) #2 -depends_on:MBEDTLS_AES_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_AES:"1477e189fb3546efac5cc144f25e132ffd0081be76e912e25cbce7ad63f1c2c4":"7bd3ea956f4b938ebe83ef9a75ddbda16717e924dd4e45202560bf5f0cffbffcdd23be3ae08ff30503d698ed08568ff6b3f6b9fdc9ea79c8e53a838cc8566a8b52ce7c21b2b067e778925a066c970a6c37b8a6cfc53145f24bf698c352078a7f0409b53196e00c619237454c190b970842bb6629c0def7f166d19565127cbce0":"c109f35893aff139db8ed51c85fee237":"8f7f9f71a4b2bb0aaf55fced4eb43c57415526162070919b5f8c08904942181820d5847dfd54d9ba707c5e893a888d5a38d0130f7f52c1f638b0119cf7bc5f2b68f51ff5168802e561dff2cf9c5310011c809eba002b2fa348718e8a5cb732056273cc7d01cce5f5837ab0b09b6c4c5321a7f30a3a3cd21f29da79fce3f3728b":"7841e3d78746f07e5614233df7175931e3c257e09ebd7b78545fae484d835ffe3db3825d3aa1e5cc1541fe6cac90769dc5aaeded0c148b5b4f397990eb34b39ee7881804e5a66ccc8d4afe907948780c4e646cc26479e1da874394cb3537a8f303e0aa13bd3cc36f6cc40438bcd41ef8b6a1cdee425175dcd17ee62611d09b02":32:"cb13ce59":0 - -AES-GCM Selftest -depends_on:MBEDTLS_AES_C -gcm_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.camellia.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.camellia.data deleted file mode 100644 index 5f739d5464..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.camellia.data +++ /dev/null @@ -1,215 +0,0 @@ -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #1 (128-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"00000000000000000000000000000000":"":"000000000000000000000000":"":"":128:"f5574acc3148dfcb9015200631024df9":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #2 (128-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"00000000000000000000000000000000":"00000000000000000000000000000000":"000000000000000000000000":"":"defe3e0b5c54c94b4f2a0f5a46f6210d":128:"f672b94d192266c7c8c8dbb427cc989a":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #3 (128-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":"cafebabefacedbaddecaf888":"":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f8260614bab815":128:"86e318012dd8329dc9dae6a170f61b24":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #4 (128-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f82606":128:"9f458869431576ea6a095456ec6b8101":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #5 (128-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"28fd7434d5cd424a5353818fc21a982460d20cf632eb1e6c4fbfca17d5abcf6a52111086162fe9570e7774c7a912aca3dfa10067ddaad40688645bdd":128:"e86f8f2e730c49d536f00fb5225d28b1":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #6 (128-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"2e582b8417c93f2ff4f6f7ee3c361e4496e710ee12433baa964987d02f42953e402e6f4af407fe08cd2f35123696014c34db19128df4056faebcd647":128:"ceae5569b2af8641572622731aed3e53":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #7 (192-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"000000000000000000000000000000000000000000000000":"":"000000000000000000000000":"":"":128:"ba9ae89fddce4b51131e17c4d65ce587":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #8 (192-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"000000000000000000000000":"":"8f9c0aa2549714c88bb2665e8af86d41":128:"783cff5c5aca7197320658a74279ab37":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #9 (192-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":"cafebabefacedbaddecaf888":"":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6a60bb2e9":128:"8d645a0b0e48d3c3b60a014157cb49b4":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #10 (192-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6":128:"01b15bb5ab6fac0c422014e91eacbf2b":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #11 (192-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"678b3dcb270faa206dc5f6fbb5014996e86d6f3e35cdcdfeb03b37b9b06ff4ff2682248823bd3c84124dc76af7bde3dd440c228b5efbc795dd80dfb6":128:"f876143d933214a5035ff0bb96ff650b":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #12 (192-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"9733ea567c3bad2259ccd63ef7012f5de709e50b1fdc31f1a16db02ede1b66f11dcc4d953f2d4d4671587b65882afbf9545fdb6deab22413d091b703":128:"4b72e520b2521e63d240ed5c903216fa":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #13 (256-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"0000000000000000000000000000000000000000000000000000000000000000":"":"000000000000000000000000":"":"":128:"9cdb269b5d293bc5db9c55b057d9b591":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #14 (256-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"000000000000000000000000":"":"3d4b2cde666761ba5dfb305178e667fb":128:"284b63bb143c40ce100fb4dea6bb617b":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #15 (256-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":"cafebabefacedbaddecaf888":"":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b776549e092":128:"c912686270a2b9966415fca3be75c468":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #16 (256-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b77":128:"4e4b178d8fe26fdc95e2e7246dd94bec":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #17 (256-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"6ca95fbb7d16577a9ef2fded94dc85b5d40c629f6bef2c649888e3cbb0ededc7810c04b12c2983bbbbc482e16e45c9215ae12c15c55f2f4809d06652":128:"e6472b8ebd331bfcc7c0fa63ce094461":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #18 (256-en) -depends_on:MBEDTLS_CAMELLIA_C -gcm_encrypt_and_tag:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":"e0cddd7564d09c4dc522dd65949262bbf9dcdb07421cf67f3032becb7253c284a16e5bf0f556a308043f53fab9eebb526be7f7ad33d697ac77c67862":128:"5791883f822013f8bd136fc36fb9946b":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #1 (128-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"00000000000000000000000000000000":"":"000000000000000000000000":"":128:"f5574acc3148dfcb9015200631024df9":"":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #2 (128-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"00000000000000000000000000000000":"defe3e0b5c54c94b4f2a0f5a46f6210d":"000000000000000000000000":"":128:"f672b94d192266c7c8c8dbb427cc989a":"00000000000000000000000000000000":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #3 (128-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f8260614bab815":"cafebabefacedbaddecaf888":"":128:"86e318012dd8329dc9dae6a170f61b24":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #4 (128-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f82606":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"9f458869431576ea6a095456ec6b8101":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #5 (128-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"28fd7434d5cd424a5353818fc21a982460d20cf632eb1e6c4fbfca17d5abcf6a52111086162fe9570e7774c7a912aca3dfa10067ddaad40688645bdd":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"e86f8f2e730c49d536f00fb5225d28b1":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #6 (128-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"2e582b8417c93f2ff4f6f7ee3c361e4496e710ee12433baa964987d02f42953e402e6f4af407fe08cd2f35123696014c34db19128df4056faebcd647":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"ceae5569b2af8641572622731aed3e53":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #7 (192-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"000000000000000000000000000000000000000000000000":"":"000000000000000000000000":"":128:"ba9ae89fddce4b51131e17c4d65ce587":"":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #8 (192-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"000000000000000000000000000000000000000000000000":"8f9c0aa2549714c88bb2665e8af86d41":"000000000000000000000000":"":128:"783cff5c5aca7197320658a74279ab37":"00000000000000000000000000000000":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #9 (192-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6a60bb2e9":"cafebabefacedbaddecaf888":"":128:"8d645a0b0e48d3c3b60a014157cb49b4":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #10 (192-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"01b15bb5ab6fac0c422014e91eacbf2b":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #11 (192-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"678b3dcb270faa206dc5f6fbb5014996e86d6f3e35cdcdfeb03b37b9b06ff4ff2682248823bd3c84124dc76af7bde3dd440c228b5efbc795dd80dfb6":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"f876143d933214a5035ff0bb96ff650b":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #12 (192-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"9733ea567c3bad2259ccd63ef7012f5de709e50b1fdc31f1a16db02ede1b66f11dcc4d953f2d4d4671587b65882afbf9545fdb6deab22413d091b703":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"4b72e520b2521e63d240ed5c903216fa":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #13 (256-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"0000000000000000000000000000000000000000000000000000000000000000":"":"000000000000000000000000":"":128:"9cdb269b5d293bc5db9c55b057d9b591":"":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #14 (256-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"0000000000000000000000000000000000000000000000000000000000000000":"3d4b2cde666761ba5dfb305178e667fb":"000000000000000000000000":"":128:"284b63bb143c40ce100fb4dea6bb617b":"00000000000000000000000000000000":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #15 (256-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b776549e092":"cafebabefacedbaddecaf888":"":128:"c912686270a2b9966415fca3be75c468":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #16 (256-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b77":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"4e4b178d8fe26fdc95e2e7246dd94bec":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #17 (256-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"6ca95fbb7d16577a9ef2fded94dc85b5d40c629f6bef2c649888e3cbb0ededc7810c04b12c2983bbbbc482e16e45c9215ae12c15c55f2f4809d06652":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"e6472b8ebd331bfcc7c0fa63ce094461":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #18 (256-de) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"e0cddd7564d09c4dc522dd65949262bbf9dcdb07421cf67f3032becb7253c284a16e5bf0f556a308043f53fab9eebb526be7f7ad33d697ac77c67862":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"5791883f822013f8bd136fc36fb9946b":"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #1 (128-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"00000000000000000000000000000000":"":"000000000000000000000000":"":128:"f5574acc3148dfcb9015200631024df8":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #2 (128-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"00000000000000000000000000000000":"defe3e0b5c54c94b4f2a0f5a46f7210d":"000000000000000000000000":"":128:"f672b94d192266c7c8c8dbb427cc989a":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #3 (128-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f8260614bab815":"cafebabefacedbaddecaf889":"":128:"86e318012dd8329dc9dae6a170f61b24":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #4 (128-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f82606":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"9f458869431576ea6a095456ec6b8100":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #5 (128-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"28fd7434d5cd424a5353818fc21a982460d20cf632eb1e6c4fbfca17d5abcf6a52111086162fe9570e7774c7a912aca3dfa10067ddaad40688645bdd":"cafebabefacedbad":"feedfadedeadbeeffeedfacedeadbeefabaddad2":128:"e86f8f2e730c49d536f00fb5225d28b1":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #6 (128-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308":"2e582b8417c83f2ff4f6f7ee3c361e4496e710ee12433baa964987d02f42953e402e6f4af407fe08cd2f35123696014c34db19128df4056faebcd647":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"ceae5569b2af8641572622731aed3e53":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #7 (192-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"000000000000000000000000000000000000000000000000":"":"000000000000000000000000":"":128:"ba9ae89fddce4b51131e17c4d65ce586":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #8 (192-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"000000000000000000000000000000000000000000000000":"8f9c0aa2549714c88bb2665e8af86d42":"000000000000000000000000":"":128:"783cff5c5aca7197320658a74279ab37":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #9 (192-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"ffffe9928665731c6d6a8f9467308308feffe9928665731c":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6a60bb2e9":"cafebabefacedbaddecaf888":"":128:"8d645a0b0e48d3c3b60a014157cb49b4":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #10 (192-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffbb4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6":"cafebabefacedbaddecaf888":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"11b15bb5ab6fac0c422014e91eacbf2b":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #11 (192-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"678b3dcb270faa206dc5f6fbb5014996e86d6f3e35cdcdfeb03b37b9b06ff4ff2682248823bd3c84124dc76af7bde3dd440c228b5efbc795dd80dfb6":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad3":128:"f876143d933214a5035ff0bb96ff650b":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #12 (192-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c":"9733ea567c3bad2259ccd63ef7012f5de709e50b1fdc31f1a16db02ede1b66f11dcc4d953f2d4d4671587b65882afbf9545fdb6deab22413d091b703":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a328a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"4b72e520b2521e63d240ed5c903216fa":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #13 (256-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"0000000000000000000000000000000000000000000000000000000000000001":"":"000000000000000000000000":"":128:"9cdb269b5d293bc5db9c55b057d9b591":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #14 (256-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"0000000000000000000000000000000000000000000000000000000000000000":"3d4b2cde666761ba5dfb305178e667fb":"000000000000000000000001":"":128:"284b63bb143c40ce100fb4dea6bb617b":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #15 (256-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4949d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b776549e092":"cafebabefacedbaddecaf888":"":128:"c912686270a2b9966415fca3be75c468":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #16 (256-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d447758dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b77":"cafebabefacedbaddecaf888":"ffedfacedeadbeeffeedfacedeadbeefabaddad2":128:"4e4b178d8fe26fdc95e2e7246dd94bec":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #17 (256-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308":"6ca95fbb7d16577a9ef2fded94dc85b5d40c629f6bef2c649888e3cbb0ededc7810c04b12c2983bbbbc482e16e45c9215ae12c15c55f2f4809d06652":"cafebabefacedbad":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"e6472b8ebd331bfcc7c0fa63ce094462":"FAIL":0 - -Camellia-GCM test vect draft-kato-ipsec-camellia-gcm #18 (256-bad) -depends_on:MBEDTLS_CAMELLIA_C -gcm_decrypt_and_verify:MBEDTLS_CIPHER_ID_CAMELLIA:"feffe9928665731c6d6a9f9467308308feffe9928665731c6d6a8f9467308308":"e0cddd7564d09c4dc522dd65949262bbf9dcdb07421cf67f3032becb7253c284a16e5bf0f556a308043f53fab9eebb526be7f7ad33d697ac77c67862":"9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b":"feedfacedeadbeeffeedfacedeadbeefabaddad2":128:"5791883f822013f8bd136fc36fb9946b":"FAIL":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.function deleted file mode 100644 index 9d841dc12a..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_gcm.function +++ /dev/null @@ -1,124 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/gcm.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_GCM_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void gcm_encrypt_and_tag( int cipher_id, - char *hex_key_string, char *hex_src_string, - char *hex_iv_string, char *hex_add_string, - char *hex_dst_string, int tag_len_bits, - char *hex_tag_string, int init_result ) -{ - unsigned char key_str[128]; - unsigned char src_str[128]; - unsigned char dst_str[257]; - unsigned char iv_str[128]; - unsigned char add_str[128]; - unsigned char tag_str[128]; - unsigned char output[128]; - unsigned char tag_output[16]; - mbedtls_gcm_context ctx; - unsigned int key_len; - size_t pt_len, iv_len, add_len, tag_len = tag_len_bits / 8; - - mbedtls_gcm_init( &ctx ); - - memset(key_str, 0x00, 128); - memset(src_str, 0x00, 128); - memset(dst_str, 0x00, 257); - memset(iv_str, 0x00, 128); - memset(add_str, 0x00, 128); - memset(tag_str, 0x00, 128); - memset(output, 0x00, 128); - memset(tag_output, 0x00, 16); - - key_len = unhexify( key_str, hex_key_string ); - pt_len = unhexify( src_str, hex_src_string ); - iv_len = unhexify( iv_str, hex_iv_string ); - add_len = unhexify( add_str, hex_add_string ); - - TEST_ASSERT( mbedtls_gcm_setkey( &ctx, cipher_id, key_str, key_len * 8 ) == init_result ); - if( init_result == 0 ) - { - TEST_ASSERT( mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_ENCRYPT, pt_len, iv_str, iv_len, add_str, add_len, src_str, output, tag_len, tag_output ) == 0 ); - hexify( dst_str, output, pt_len ); - hexify( tag_str, tag_output, tag_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); - TEST_ASSERT( strcmp( (char *) tag_str, hex_tag_string ) == 0 ); - } - -exit: - mbedtls_gcm_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void gcm_decrypt_and_verify( int cipher_id, - char *hex_key_string, char *hex_src_string, - char *hex_iv_string, char *hex_add_string, - int tag_len_bits, char *hex_tag_string, - char *pt_result, int init_result ) -{ - unsigned char key_str[128]; - unsigned char src_str[128]; - unsigned char dst_str[257]; - unsigned char iv_str[128]; - unsigned char add_str[128]; - unsigned char tag_str[128]; - unsigned char output[128]; - mbedtls_gcm_context ctx; - unsigned int key_len; - size_t pt_len, iv_len, add_len, tag_len = tag_len_bits / 8; - int ret; - - mbedtls_gcm_init( &ctx ); - - memset(key_str, 0x00, 128); - memset(src_str, 0x00, 128); - memset(dst_str, 0x00, 257); - memset(iv_str, 0x00, 128); - memset(add_str, 0x00, 128); - memset(tag_str, 0x00, 128); - memset(output, 0x00, 128); - - key_len = unhexify( key_str, hex_key_string ); - pt_len = unhexify( src_str, hex_src_string ); - iv_len = unhexify( iv_str, hex_iv_string ); - add_len = unhexify( add_str, hex_add_string ); - unhexify( tag_str, hex_tag_string ); - - TEST_ASSERT( mbedtls_gcm_setkey( &ctx, cipher_id, key_str, key_len * 8 ) == init_result ); - if( init_result == 0 ) - { - ret = mbedtls_gcm_auth_decrypt( &ctx, pt_len, iv_str, iv_len, add_str, add_len, tag_str, tag_len, src_str, output ); - - if( strcmp( "FAIL", pt_result ) == 0 ) - { - TEST_ASSERT( ret == MBEDTLS_ERR_GCM_AUTH_FAILED ); - } - else - { - TEST_ASSERT( ret == 0 ); - hexify( dst_str, output, pt_len ); - - TEST_ASSERT( strcmp( (char *) dst_str, pt_result ) == 0 ); - } - } - -exit: - mbedtls_gcm_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void gcm_selftest() -{ - TEST_ASSERT( mbedtls_gcm_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.function deleted file mode 100644 index 3cc96421ea..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.function +++ /dev/null @@ -1,319 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/hmac_drbg.h" - -typedef struct -{ - unsigned char *p; - size_t len; -} entropy_ctx; - -int mbedtls_entropy_func( void *data, unsigned char *buf, size_t len ) -{ - entropy_ctx *ctx = (entropy_ctx *) data; - - if( len > ctx->len ) - return( -1 ); - - memcpy( buf, ctx->p, len ); - - ctx->p += len; - ctx->len -= len; - - return( 0 ); -} -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_HMAC_DRBG_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void hmac_drbg_entropy_usage( int md_alg ) -{ - unsigned char out[16]; - unsigned char buf[1024]; - const mbedtls_md_info_t *md_info; - mbedtls_hmac_drbg_context ctx; - entropy_ctx entropy; - size_t last_len, i, reps = 10; - - mbedtls_hmac_drbg_init( &ctx ); - memset( buf, 0, sizeof( buf ) ); - memset( out, 0, sizeof( out ) ); - - entropy.len = sizeof( buf ); - entropy.p = buf; - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - - /* Init must use entropy */ - last_len = entropy.len; - TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_entropy_func, &entropy, - NULL, 0 ) == 0 ); - TEST_ASSERT( entropy.len < last_len ); - - /* By default, PR is off and reseed_interval is large, - * so the next few calls should not use entropy */ - last_len = entropy.len; - for( i = 0; i < reps; i++ ) - { - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) - 4 ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, out, sizeof( out ) - 4, - buf, 16 ) == 0 ); - } - TEST_ASSERT( entropy.len == last_len ); - - /* While at it, make sure we didn't write past the requested length */ - TEST_ASSERT( out[sizeof( out ) - 4] == 0 ); - TEST_ASSERT( out[sizeof( out ) - 3] == 0 ); - TEST_ASSERT( out[sizeof( out ) - 2] == 0 ); - TEST_ASSERT( out[sizeof( out ) - 1] == 0 ); - - /* Set reseed_interval to the number of calls done, - * so the next call should reseed */ - mbedtls_hmac_drbg_set_reseed_interval( &ctx, 2 * reps ); - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( entropy.len < last_len ); - - /* The new few calls should not reseed */ - last_len = entropy.len; - for( i = 0; i < reps / 2; i++ ) - { - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, out, sizeof( out ) , - buf, 16 ) == 0 ); - } - TEST_ASSERT( entropy.len == last_len ); - - /* Now enable PR, so the next few calls should all reseed */ - mbedtls_hmac_drbg_set_prediction_resistance( &ctx, MBEDTLS_HMAC_DRBG_PR_ON ); - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( entropy.len < last_len ); - - /* Finally, check setting entropy_len */ - mbedtls_hmac_drbg_set_entropy_len( &ctx, 42 ); - last_len = entropy.len; - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( (int) last_len - entropy.len == 42 ); - - mbedtls_hmac_drbg_set_entropy_len( &ctx, 13 ); - last_len = entropy.len; - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - TEST_ASSERT( (int) last_len - entropy.len == 13 ); - -exit: - mbedtls_hmac_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void hmac_drbg_seed_file( int md_alg, char *path, int ret ) -{ - const mbedtls_md_info_t *md_info; - mbedtls_hmac_drbg_context ctx; - - mbedtls_hmac_drbg_init( &ctx ); - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - - TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, rnd_std_rand, NULL, - NULL, 0 ) == 0 ); - - TEST_ASSERT( mbedtls_hmac_drbg_write_seed_file( &ctx, path ) == ret ); - TEST_ASSERT( mbedtls_hmac_drbg_update_seed_file( &ctx, path ) == ret ); - -exit: - mbedtls_hmac_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void hmac_drbg_buf( int md_alg ) -{ - unsigned char out[16]; - unsigned char buf[100]; - const mbedtls_md_info_t *md_info; - mbedtls_hmac_drbg_context ctx; - size_t i; - - mbedtls_hmac_drbg_init( &ctx ); - memset( buf, 0, sizeof( buf ) ); - memset( out, 0, sizeof( out ) ); - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - TEST_ASSERT( mbedtls_hmac_drbg_seed_buf( &ctx, md_info, buf, sizeof( buf ) ) == 0 ); - - /* Make sure it never tries to reseed (would segfault otherwise) */ - mbedtls_hmac_drbg_set_reseed_interval( &ctx, 3 ); - mbedtls_hmac_drbg_set_prediction_resistance( &ctx, MBEDTLS_HMAC_DRBG_PR_ON ); - - for( i = 0; i < 30; i++ ) - TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) ) == 0 ); - -exit: - mbedtls_hmac_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void hmac_drbg_no_reseed( int md_alg, - char *entropy_hex, char *custom_hex, - char *add1_hex, char *add2_hex, - char *output_hex ) -{ - unsigned char data[1024]; - unsigned char entropy[512]; - unsigned char custom[512]; - unsigned char add1[512]; - unsigned char add2[512]; - unsigned char output[512]; - unsigned char my_output[512]; - size_t custom_len, add1_len, add2_len, out_len; - entropy_ctx p_entropy; - const mbedtls_md_info_t *md_info; - mbedtls_hmac_drbg_context ctx; - - mbedtls_hmac_drbg_init( &ctx ); - memset( my_output, 0, sizeof my_output ); - - custom_len = unhexify( custom, custom_hex ); - add1_len = unhexify( add1, add1_hex ); - add2_len = unhexify( add2, add2_hex ); - out_len = unhexify( output, output_hex ); - p_entropy.len = unhexify( entropy, entropy_hex ); - p_entropy.p = entropy; - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - - /* Test the simplified buffer-based variant */ - memcpy( data, entropy, p_entropy.len ); - memcpy( data + p_entropy.len, custom, custom_len ); - TEST_ASSERT( mbedtls_hmac_drbg_seed_buf( &ctx, md_info, - data, p_entropy.len + custom_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add1, add1_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add2, add2_len ) == 0 ); - - /* clear for second run */ - mbedtls_hmac_drbg_free( &ctx ); - - TEST_ASSERT( memcmp( my_output, output, out_len ) == 0 ); - - /* And now the normal entropy-based variant */ - TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_entropy_func, &p_entropy, - custom, custom_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add1, add1_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add2, add2_len ) == 0 ); - TEST_ASSERT( memcmp( my_output, output, out_len ) == 0 ); - -exit: - mbedtls_hmac_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void hmac_drbg_nopr( int md_alg, - char *entropy_hex, char *custom_hex, - char *add1_hex, char *add2_hex, char *add3_hex, - char *output_hex ) -{ - unsigned char entropy[512]; - unsigned char custom[512]; - unsigned char add1[512]; - unsigned char add2[512]; - unsigned char add3[512]; - unsigned char output[512]; - unsigned char my_output[512]; - size_t custom_len, add1_len, add2_len, add3_len, out_len; - entropy_ctx p_entropy; - const mbedtls_md_info_t *md_info; - mbedtls_hmac_drbg_context ctx; - - mbedtls_hmac_drbg_init( &ctx ); - memset( my_output, 0, sizeof my_output ); - - custom_len = unhexify( custom, custom_hex ); - add1_len = unhexify( add1, add1_hex ); - add2_len = unhexify( add2, add2_hex ); - add3_len = unhexify( add3, add3_hex ); - out_len = unhexify( output, output_hex ); - p_entropy.len = unhexify( entropy, entropy_hex ); - p_entropy.p = entropy; - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - - TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_entropy_func, &p_entropy, - custom, custom_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_reseed( &ctx, add1, add1_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add2, add2_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add3, add3_len ) == 0 ); - - TEST_ASSERT( memcmp( my_output, output, out_len ) == 0 ); - -exit: - mbedtls_hmac_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void hmac_drbg_pr( int md_alg, - char *entropy_hex, char *custom_hex, - char *add1_hex, char *add2_hex, - char *output_hex ) -{ - unsigned char entropy[512]; - unsigned char custom[512]; - unsigned char add1[512]; - unsigned char add2[512]; - unsigned char output[512]; - unsigned char my_output[512]; - size_t custom_len, add1_len, add2_len, out_len; - entropy_ctx p_entropy; - const mbedtls_md_info_t *md_info; - mbedtls_hmac_drbg_context ctx; - - mbedtls_hmac_drbg_init( &ctx ); - memset( my_output, 0, sizeof my_output ); - - custom_len = unhexify( custom, custom_hex ); - add1_len = unhexify( add1, add1_hex ); - add2_len = unhexify( add2, add2_hex ); - out_len = unhexify( output, output_hex ); - p_entropy.len = unhexify( entropy, entropy_hex ); - p_entropy.p = entropy; - - md_info = mbedtls_md_info_from_type( md_alg ); - TEST_ASSERT( md_info != NULL ); - - TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_entropy_func, &p_entropy, - custom, custom_len ) == 0 ); - mbedtls_hmac_drbg_set_prediction_resistance( &ctx, MBEDTLS_HMAC_DRBG_PR_ON ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add1, add1_len ) == 0 ); - TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, my_output, out_len, - add2, add2_len ) == 0 ); - - TEST_ASSERT( memcmp( my_output, output, out_len ) == 0 ); - -exit: - mbedtls_hmac_drbg_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void hmac_drbg_selftest( ) -{ - TEST_ASSERT( mbedtls_hmac_drbg_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.misc.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.misc.data deleted file mode 100644 index 64bce03b3e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.misc.data +++ /dev/null @@ -1,82 +0,0 @@ -HMAC_DRBG entropy usage SHA-1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_entropy_usage:MBEDTLS_MD_SHA1 - -HMAC_DRBG entropy usage SHA-224 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_entropy_usage:MBEDTLS_MD_SHA224 - -HMAC_DRBG entropy usage SHA-256 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_entropy_usage:MBEDTLS_MD_SHA256 - -HMAC_DRBG entropy usage SHA-384 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_entropy_usage:MBEDTLS_MD_SHA384 - -HMAC_DRBG entropy usage SHA-512 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_entropy_usage:MBEDTLS_MD_SHA512 - -HMAC_DRBG write/update seed file SHA-1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA1:"data_files/hmac_drbg_seed":0 - -HMAC_DRBG write/update seed file SHA-1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA1:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR - -HMAC_DRBG write/update seed file SHA-224 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA224:"data_files/hmac_drbg_seed":0 - -HMAC_DRBG write/update seed file SHA-224 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA224:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR - -HMAC_DRBG write/update seed file SHA-256 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA256:"data_files/hmac_drbg_seed":0 - -HMAC_DRBG write/update seed file SHA-256 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA256:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR - -HMAC_DRBG write/update seed file SHA-384 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA384:"data_files/hmac_drbg_seed":0 - -HMAC_DRBG write/update seed file SHA-384 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA384:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR - -HMAC_DRBG write/update seed file SHA-512 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA512:"data_files/hmac_drbg_seed":0 - -HMAC_DRBG write/update seed file SHA-512 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_seed_file:MBEDTLS_MD_SHA512:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR - -HMAC_DRBG from buffer SHA-1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_buf:MBEDTLS_MD_SHA1 - -HMAC_DRBG from buffer SHA-224 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_buf:MBEDTLS_MD_SHA224 - -HMAC_DRBG from buffer SHA-256 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_buf:MBEDTLS_MD_SHA256 - -HMAC_DRBG from buffer SHA-384 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_buf:MBEDTLS_MD_SHA384 - -HMAC_DRBG from buffer SHA-512 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_buf:MBEDTLS_MD_SHA512 - -HMAC_DRBG self test -hmac_drbg_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.no_reseed.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.no_reseed.data deleted file mode 100644 index d7e62a1200..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.no_reseed.data +++ /dev/null @@ -1,1200 +0,0 @@ -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"e91b63309e93d1d08e30e8d556906875f59747c468b0d0da":"":"":"":"b7928f9503a417110788f9d0c2585f8aee6fb73b220a626b3ab9825b7a9facc79723d7e1ba9255e40e65c249b6082a7bc5e3f129d3d8f69b04ed1183419d6c4f2a13b304d2c5743f41c8b0ee73225347" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"d0c57f7dc0308115b1ea30e2ea2f770289cebdda617d132c":"":"":"":"b797615a78d1afe74ebedb9d8948d82cf2bb586ed80146b96d41a709f689178b772dd342d29af5449694bf8eaf33a664a24c0ad29a12529eeaba478a799917ab4666de1b6eb2c7332017d67eea6fabd8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"286e9d9e39e4024dea0c885fd6f7f107586b6a1a8ac3ac0e":"":"":"":"ca25aa9ef286a3cd52d101db01cdf0ce14c7add124f1b6a9a8b3a48c74989baf01f6ff704da7c5d5785b6e9c21914892102313e7a15cb2f9977a513ada0d3f242819aef2c1699b72cbd358c59435101f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"6b20dda65a96f564fc0253d38dbc290b813e538d040d8dd9":"":"":"":"66b6ef57a3282838dea05d122ccdfa842dda19333ded2015d381394da38c8309a6e9703ec065335b116efb97daaac9c53ceb7a218ed0db61c3ba969dc629b95f5418eadfa43c58714fb02176bc0b17ec" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"32339fc82b655051042e3038e3161c4fb252e495ff396be2":"":"":"":"e95e4551a37e338faae4419e3a70e4c1e3d516be7e554cabb00007c591ba7cb6c3247889a9b08e46c6619f166d996e4e34bbf6cd8a354de9964de906041f73f2ade2eb82c6e82627d3257738c2821fcb" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"deaa9d0c2ca7a05cba12eeb7db24277e1605e1d030d76ddc":"":"":"":"bab5be6001da5951c1e7873f4e2be318e879370eae8a51ed8424ed6f12b2d294b45d006b1c2cd8c1ce047fd16f2fbbc09954a8b464cc986f23e86e1d9398d20780190aa5be0505cdfc826c7a01dcab99" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"589766be3c03b0a351a81b1203f944e2928e95f8a3bc7452":"":"":"":"5bee2482667220462ac6d3c234f7333703c5abced2ff2ad91d52193e86a61cfa43be0b4f7e831e1e563e260178f23976b2f3e132356ab54567b37580bf9d751223fad7793f0ac11fc450817536116b1f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"07cc4d22b010335045cca142d91494bf4d5e842af4155d17":"":"":"":"8e13a574d17dc8b44382d3b263e857f50816755917603a07ca4987fd40340042a1e6a82a227647130304d73d8704fd9ad4db3ae42daaa55b1f93948e70c451a12724fed870e02a1a8ec4eeab716c6854" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"6425624a98ab3018eb4ef827f5a4fbbac1022d70155ef375":"":"":"":"16fd6abb10dba1659ed56d4296b65fe3f2449996bdb8eee5c94b249f04808cdd9563569a4152bd99a32592d35d6a4cc806c228284487fc1e088b178d4c8ecb6b0e3cfaacd7d39d754d8bd4e6662f44a4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"01d11d2b631be240de2f41d10bdce47c89fa32427410cc61":"":"":"":"4640a063e65ef0c0de97f98a39297219e2a1eceed7e6426199719911edbb3d06fbde6fbab83878e9ba9fa8e1d044f7a40f3627d7cfc49d17f101ee64f6b8c6e6154a01b4d39fb9ba6b33ca2c27f9fd52" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"5e0a89b3aba1cf5ed94756083726de8db5d79162f73a5031":"":"":"":"cae7b2c25dce1c12e2c4f61b3e53155b9177e92bfb8faefc425d1cbb507713921378ed880986709bfbd7cda66d18dbe0732137a86d47b7e8223e345af0cd9a0219ba290040bc6ff44c1de5b16f32b933" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"3b76d32d5982daf6e2164340941a1707441bbb99a2668ba4":"":"":"":"63640e406e16b3b82723a6cb3830657b756fe61cf2ada96f667e0f2df0c9d33c6f164ee78d4976281a84d3024ff67074acecd65391a84aafaec9d6b088bc33616543b61a4c603e5a21bd39e2a72401c8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"45fcafba2278bf8e6d437396f60f0e84654de44e0bd6cb8a":"":"":"":"7e2325cb2ced372b640c2496a3970cb7771fd494e40ae17239bfffd9ea2ab0ee74c2d3c369328a3b465e67bcbea86f50a32f9ff820505df5adbc032d3adb83581443877f85c60b3b701f59b1fc38c063" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"4201db977ef90d08f017c8e38204c2995bbb47efe9fa4cad":"":"":"":"101c7318e26693bc11d64b780e9b32d4d958c7475ab99fdd6fe86554dcef54ccdc2ca9f4ec355eb25d7b3f570ff95ec7abc2e9e2fb879bb045debf6c8a98ff46668c0de21bd8d4d18fb9e11550878e32" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,0) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"5d80883ce24feb3911fdeb8e730f95886a63c01478ecd62b":"":"":"":"9e351b853091add2047e9ea2da07d41fa4ace03db3d4a43217e802352f1c97382ed7afee5cb2cf5848a93ce0a25a28cdc8e96ccdf14875cb9f845790800d542bac81d0be53376385baa5e7cbe2c3b469" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"32c1ca125223de8de569697f92a37c6772d4cc4f0544d409":"":"9e98cc8e0f8eb84d1911c1775a5703bb":"593aa3a300e5c907a011dd5a3dcd77e2":"942909a9d380aa5d4e3af69093a8fa513ee545b9bf9e1b81c5f30966db3e5cb52f8b1b6fe440d592e5fe4a972c36aa498035e2442f82910c5cd095c7f4b4c7e7555c4669cca481cdfbfda167b5d6f8d5" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"172a2d24ef128dadc93e0b74f277e7c3692f86e6ca5e1117":"":"93b4a1fdbf9dd30996298804dd86c0f7":"69d792dc9b6fe1601f31a68e4d007187":"13f30b4698d6e973556c3f92dff6241bbfbde300ed58d07fd5f64efdcd0c1b62ca3de6358d505dcf972fdce20f7b891c4cab493721d80cb108fcee915835b02dea33041b38e28252c30a71fad85878e6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"4a17b8069ae3a74d77c9c94514ba90cd2abfac0002d2c5da":"":"cc39d1a2a425f00e220d721fbfd5b6e5":"1ccee25f5868e863a05b72d744e64aeb":"d787b355629779ff2916397d6094f44dec06337571ccb0abf5a17b6cfabe00557894e9ddab8caafef467faa4514582b5073e7d1d9fdd6fa34c565d1aca23742ed4e87133253a9664ec085bc6c76965f4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"d60c4860d9ba3ebb64e2095231e07792ba6b5e9e22e14043":"":"776273bb22f5e62a793692127bcbd785":"8795e45f82160cb1096a509fd3572f92":"3122c1d3a6de8b25fd180b159731f975f78601360155e43f694b289822a25948d2c20a673f181be06b59c566960339f25015d2acbf5c7d3f68a2bade779e00faa24623c1313da888dc8cee901fa05573" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"494983c04581b811e0b2b846c54bd31824bd70fd182558f1":"":"935200a7edf1e2903581fedb7c04533d":"49c0133cca2457fa7cbbd4c68cc5e78f":"0fd2ec47fa2e31326ee9b894fdd6224818190168640d91a2a0c247b1e27ccfa343e9370d182d95b2b5bd74b4b09c44d04094364a6fd02ba70ee2c55e04d65ad9c6da65b9c0742f9fb5ca95daafa48df1" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"77ea86ce59f2466e55ce2057e7855035c09295c02f1c51cb":"":"f36d65f22b5afd3f51e13ea38dcff555":"6b613b56e470b5c2c30c30aab9a772e1":"41cd8ef82609012d33b4e5b51a39ec17eda4317962627796f7845045920becd7caef56d4a2c3a8e849e299babe92367ef34a8910bebd498248ccc2b3f5f63920b31cfe856973e15e48b060871a9cf9a7" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"2dffb03703023f65b757b7ee87899a14a9c8ce788fb2bddc":"":"da42b213071252adb755a6cb24094c17":"c83fc2beb60a7ee9b374f3fb7bfc8900":"8f54271e3578e60e8989e49f5b426e1a0296afbfcc7da0ffbdd5dea71ec6b339b6d866bd3756ba745e42c8cddf997cac5fed72b33ac81e5f4d6f2d15f030a41c684552fc94d48c0d97323ef7eb656857" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"890e7323502313bc7d617805360d5968b6c68c0280cef5ed":"":"257f1f60cf2d36924c3e7b6e4cc35135":"89235cc472c6e2e1e92c70324459a9d3":"55283453e82662c8d92f54cb4a5d784e83b1b3527bc5e71a53f04508172eb5156ba2a9ba92116cdaceed17118c7637af4b574d364187a52cf0c20d768da518021c3d95cb5ce6bc108b1bef19bad66677" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"167ce6bad165eb640eebfece7ca6690ec5c6b5f8c7fa9304":"":"c0e7ef13138ec4a7d52baf8592484ca0":"472a47e3fc098c7cb92fb953a26e25c6":"e2aa2650c84be79ec410ff9bac93e5caff8a46a8c39495856ff64c8c5399e81654ba90c8a8b26cdca2810ce68e4ab646e50a1f6fa7a829cfd72c9a61e1a0b415c031067dcd417baac9553cf7d84a7742" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"6b8aeaf70460e83a124899d705dc0900acd811698669fcee":"":"94a53808df5ebaa7693934d7fda92b95":"4d4e7d88f44fe556c5ccdc56f8b2f098":"165aae6bcdd799fe325ddafce3b645900eabc87552c0bb47ee2eb6ad51462a8a4f4498c4bd24fcfc46de5d12351143d5a838060f617258c218035a4f29fb34a54673205b2e1b362991693d7b99972954" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"00f30f92bd44a9b2b04a6cae67533ed85b4ae1335b98109a":"":"77ec4274fe5f8f22dbb4a1ed6050811e":"ef041b6516825d51bf76d2f651a55576":"8c664357b01425668ea5daf07a2b5b8c50dbbd71d9f48c50f275a02b6cfc4717eb7db286fa49f17d05d44230f7d82c251a6f0fe0a2add5d2cc9a92a527f63a9bd3c8ec93e9a404e0829629c5eeb997b0" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"2eafeebb58a2fb54474280112c5668d61be2aa4df98598af":"":"389a36ecd687080a5d2cace8a326f03a":"495965bdbbb1bb01ba61191e9dd4b038":"f17db045b0af4913d79f99e018c1f726f4fe02f08477cccc0d6a068a808bfc6ccb797e6022dc3b99ea18086a56428884110c49128a51e10c15f6ecbfe0a5a1e97e72a578fefea6c66c436c91a2b6395b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"b6497197b783d1f493a6430748b45932895ea2a9d8204f5d":"":"ac26665e796d1b00951c725da88d992f":"5f08c7951106dfec5096d90097449cc2":"170b58ac3342a968c96aa29f1ce820debe7934d9db46216c03ae3afd304188cd38b6208e1cad5fce5c26179a30a8771015a99d2902d51899ab0c42e0b400d18f1e89411248db96f9d62b466f828de150" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"4ffafd1f20dd38699bfca029c0558483fbeed3cb29aa0eb8":"":"96abfcee883d8dcad967c071c12dde19":"9fd7cc292cd55d8364862f5fd675c08b":"5e8612c6ce8f5b6838a1e4fb9e14370fb2d66bc885f6fe8a3ff232f16340c2af58eb2734494e0ce920f36046b7a807f4b55caf3a45bdcaefa4bb23f352601c0769749f0257428918b931606c7b395135" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,0,128) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"89a6f070afad5ccf4d117c4e44baa2c7b28941fa7e828c04":"":"7206a271499fb2ef9087fb8843b1ed64":"f14b17febd813294b3c4b22b7bae71b0":"49c35814f44b54bf13f0db52bd8a7651d060ddae0b6dde8edbeb003dbc30a7ffea1ea5b08ebe1d50b52410b972bec51fd174190671eecae201568b73deb0454194ef5c7b57b13320a0ac4dd60c04ae3b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"49058e6773ed2b7ab309c0949fdf9c9ea457cb8ec0e7fd01":"dc477641d89c7fc4a30f1430197dd159":"":"":"4e891f4e281100453b70788929ec743a3c5edd9b81dc798bc93771368c39b612037b6f42f60c5d8924b646848151b0c295be491d4a28d1927deed523fd04d3d2dda95ed42166312e5c3392d22893b0dc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"4ccc7d83009a28db14e839176774d45d9345358f336a1622":"e6db32976d9262b1d3dc487f22e1f5b3":"":"":"5a171e9f0065ece37ba53df81ac3d88054d53d0cb695a901e1a1ca91352420b508c461ac91095ccea81621b800ddcff905020f96dad2a50377d3945047420c3b902e8e361f4525c1d4bfa8af164925d2" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"fc7d0c3ef1c404ada968dae35581b6cd31e0a46c39ce49dc":"14158a65fc9b3bc1ac04c7854493852d":"":"":"918494f47dadda22667dc1d066f44f3ccbb61d3f84b2eeab7d26f4e999aab94e79d282287ab76d4e3eeeef2ef79c2ad571382abdea55d5d8642f604f8f27f3f73a5bc1413dc87bfdf91da1c6045ec223" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"1f0df7933dc99eaf7b284b02ee773ec46461fd762c595408":"abd1d8af4ae46d7e5f1f4e0b71b54edc":"":"":"f1eba7596c6c20118f86017ff86514d745ce7ea02c49719094e5c2a96d3dfa1dd5079b8eff8078ba9793900dba145a260e672837422c351c3f231c201dfaa21e48d3f7ee28bcd08dac680e80bf87ec20" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"09988a36abad74c3cf377db9c9200baf6c27be4e21932166":"17b7a40f4c37894bc948456e37ad482a":"":"":"091e5fb9c6c218f2460c514fa215061460ca90cfb35c1a9f5ea125fc49aa0b2beb42dcb0fed865f8510c3141cd51d1b33216e2e72cebcabd3e1bc0eab201d8e72a0d1de1c2b7915a0cf242708092f211" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"ce1934b6561ebaaa851accf8ceae5b0dc587922ff68836aa":"602e9086f44d03ce61039c2e81fed620":"":"":"441da7552b2d45533fc924ea985fd4b0b95942fc7997a37128d3e96d4c2792b241dbe921d61f3898852d4f93740cc3649cb5279a7f0f09be3990e9ee599fb0717c308e7a939a441b5c3ba0cb8aa19647" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"58f1a9eb935fd08a4c3c894a06ad00ca0576589700a4d50c":"b14f2a74cbe3881069f30507919c6870":"":"":"ae9c6b40d951aab9c2d9cb920a05f3e154898c83e392dfbd7ffcbe2283eb2b75842fa5e7bd9626ad12e814874f1966fea1eb817793d2eb0a9cb9270cc9aa4267118fba0c7b6fcf487a97ebcbadc67496" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"0abf2f845295bb1dd283daa24e75fa08c9e9202793c479b3":"f8742f44932bae2d65a032ada2b76382":"":"":"8847696e8edd2c7b751b780a6fc69d8434a3144593936943217465362b3c3f7b25b75149f7c69d10ecd169f00ed98b53e0e498af6d9f600441ee2c01a9e74ed845d24cdab4543dff7d1f7800a278671d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"0f9bc6935e7baf17d560931ec3e75d9fda7b19214e0ffb9c":"c13bb26e9349a56866f821c10a2ae28c":"":"":"12a849651f310fbae04c4da4680a21a50a9889806194be470b8b111a32ea741794cbe725d98ae9d40c0d60c04c8b7b32917f9dc18c27dfb8c64579a176a2c4b23cc32e5237fa5f904ab1249aafa7cd88" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"79d96ff5ec92af9fee0af7effdc15ce56b9cbdfbbbe5b49a":"23d1288ae41e65e56e7b783f85ae8b47":"":"":"206c2564950995ac6ca6d2ad51e9cacd7540f254a335d6d7eed7ef17956949cb5d7d3f4e197e82aa4442d08d1d0f933e641f703be1be4a9ca5747e524687a7a034761493dcf2e1101789f135de5d3f49" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"94e852ffbff4f20078181221b5fbb8048f3e95de313a52c1":"1841dcabae24c156a17a1d0eda6f8bb2":"":"":"15319b06c05d47deeaeab540e649cc6e2989843de07dcaa966d799a36902f72943585e2773912040185ac1efa060c6edecef800e3116c66ccfeeec9fe7ee70f3dae2ac1c0210310ea164f4c4402d2f77" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"473c743205bb375fad15f537dfeb402d879754b2b4987cbd":"4f88f4db50a6806d6899f71981beec49":"":"":"46b0694bc8afc6d86dcb8b80cf8815104007ebedb06050ae625b890060c4dad3d9e2661042d26a3cfded0383829ddcf616ec84d3f32d307480caf0f87ba9b00e88812f5cb2a4e94e354092d0c50b9bc7" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"20208c9ac4830512786fce7ebde344a82cee0d7d7a5607d6":"2602c5f52c7ee2620486ce56366cc8eb":"":"":"b0bd2c0739ed1608848dd0e9c1db9f547c64268754af09716da40b2682fbc45f56de954cbce0d8a3f53eb2c3afac9e3afeab4038fe042c897786fd3da70f2d6b62b12981630bf30d76dd879e2926ab40" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"3011c31a44ccfd1260ae9e431da41e883b1a6ac9060f2fa4":"6b36a1fcb2a2173fc7e0c120c2627a6f":"":"":"a781d9970c7272e98d941438d311cf7e80d2d56b29eb0b4b1c76d00908401ec5b4bb1c5f159dbf42ab30100933b1628faa92d2e25bd37ead4c3354c823013cd9e331bdf5e2c5c7d11d5bd9f50fd110fc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,0) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"ee6d57635e5ab4b3d73a2652c1443b32296bfe331b6578e6":"4fccbf2d3c73a8e1e92273a33e648eaa":"":"":"90dc6e1532022a9fe2161604fc79536b4afd9af06ab8adbb77f7490b355d0db3368d102d723a0d0f70d10475f9e99771fb774f7ad0ba7b5fe22a50bfda89e0215a014dc1f1605939590aa783360eb52e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"c27f80b1d085dd15cb163f0336d077457ecb3f32a90242f7":"4deb622a31b4c530348b5f08008fb7ee":"5a84f94804e2d04ead773d2a324b34d6":"226d9f4d720f580c2be44d4eaf2ec8db":"6db76a0a003a64dec6801dd3271fae8a43aa8ce2e0d205e3830e267072abe28d2a6f707494d15638559fa4282843760daa90eec5d2865ea11e836e60345160d5112445ab1754b578b55471a1d9caf275" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"517dadbd6e20fd83aeaced197732b1d5ce221a60f8210685":"bd9911bc192da45c00c47d5ee079473d":"33254154ffeb4983d27ac08980ec4943":"349db52f09422883536d11ac4aaaf7ba":"dd7be811d3a9fdd194e8f8f18b35e1d9f1788844c371d811cb898ebc561d000cc285afc8f486dabe37d6c85e614d3d196c544ca560ac6e0337b0700e1ded8fb28903e66329afdd589308d56c50d73803" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"c763149ba95e7d054da52e4d3d06287253bc2f43ae7c9da0":"305d6aa3c6148a0eb2e91b9385de5903":"a36918edaf5add6f0f81d3f991ee30a1":"5c65b09e744317db86d78aaefa66af44":"5560d27fc55b885a29a449a1f8835966549c4956ebb0393ba9fe748e74a5a303f1478bb3e507a9daa1159dd8dd6d171bff2e3830581d7f6fdbccd91a8748d20c1d981cf909c31db6eedf5587722ac257" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"b479a14d125fe4601053989439f85200e198df756aff7543":"8f590670f88d8c2c713d63643f93ba55":"cda7c7ee77e667b96ef0ba330c9ca6ac":"a60fd147f6cdfb408d160e388c20d8d8":"5f088bcebd816551c4b22c3024aeab2f75c906dc8fd0ab0c80055e0445c1dc151a06df81bd39b8535261a7a5dcedc7f9b17c062ee6f120f2099f2ab5aa93f27a08d7b5cf1027e26adf54a520916c2cb4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"bd46fc253e9334d4aa8bdff5e21c12e261515159b01a4516":"1735486e5ea8be74fa158b2fea8e5cad":"c3517d58cdbd0262655174cc1d1eb324":"404f7b8eb461d077368e2ff06ddb4189":"7f1cf172b67ec7c566c9e24c071b79b5a4a135a369ded5e78b8cd2467749e30c401bf176d88cc0e05a587bb2b8ed09206bb314df59009e88a01ef007e61eba2e40093aa003dada48314869c0f3b99d50" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"600a31b8f55c85ce27ece4705e6fe8cd17a01e7827ec2383":"6deef06a079ad2062e77dba21fef6441":"ca5512ab329ee941b22f327fe0dad499":"c1ffc97289d8d363729daa1628a2c735":"a81cf5563940ffbbee9dbdcaf7db1e7e53b427fd3a0e795c35a1b8eb6f6316e43b804690a44897e0f42fbdfa8c9f1777024d2a530eda994ed038de60b90602545cef99b69f371f79619babda9360c665" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"f38b0cd16e9434da916b63e8b7ce1a91883ec208c3baf76d":"534799e3fe51bc370af6568072e2e579":"9520ad24a61d29716342d2b7bd35dd45":"c4e92d6da37a9f6236a396f352c53c86":"5dc0b3bebde5bac6d4d24ec08f1510dc88e1e06c97c3031dc9519f3392e83a09e1a7db99b2148d992a928bb5c1f68265086f7a84e697a7a0aeda4b41590606ed139063def46fa2a625657b17f18845cb" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"06a5e76d0ee90ed0206a07a914dc20796a8a2fb2c0ebbf14":"2a49312af91926a37b5f7c009e8047ef":"0cda72090ebb007ab27156957e64e7bf":"24695b221f42a5be6d4399c6444c4aa3":"2b0aeca45ed44ca34a2fc741c5e4e2091e115a4148e71bd8fa90588e32253ffcf360df213b48a19f6f45186b67dcef6327729ac8f3c08d658de89e71539783fb66ae834455407e7827114317299835bb" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"6c12df5d2ba1f6a6e1e733baae42daafeb47cc188d1b0be0":"f510139561b292a7a1a0292b7de4b162":"f57a0c1dc69eae7473394ad1b950dc61":"9dded4779fab0c8843fa693146837689":"2be15d2ea87099a8c0430ba8e9451208a898379da075169568196f656eadbab59637c1f949b4506a851ae0394e135542137bd0daf1c188decfce92f6ef2396aa5bb125cf3187230ac81c3864632d9234" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"0e6a7843e29e5f16d2bbb4021d6389ae692298b9f62ad22d":"f0434f112699d116cfa7eddad486c544":"146eb042377cdf6a0831558ac17ad971":"b29c26d483fde8489263accafc10d698":"ecf0812aebee7a452339071d9906709fe00fccbb0d94cc101b507646f554ebf3602459a4f20b82325b0e083ca189f59d68c5753dbe942643f07c7afcde99f9d0cc2883923cb80456fcedc535bfa7d647" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"b6bc57d663b671868265fdb756e142fe6da9c07dd0821c6e":"f43c5223bfe726a3164afdcabe931eb7":"ddf419d8e074a4ff2daf06a1adad4bed":"e0862e71c4ac52194cd320d196e446a2":"4f9b9e9aab493571160c732881dc358f73a08450a152124775e559889a9298d034ce1882dd2116f4863f1524393e1a3f1aceadcd9c4163dab7c543cd375c3f4b61ed72475d1812017ac83bf22846d14c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"f5649fc184f33c63cf8484011fa27578c1651fcd1a0780c6":"153f7b2c9bc9494a20ed0bf16b97ffdc":"6106fd4fe0e1d894837ba8624cebbe2f":"fdc2988e6b358929645d27594fa98df8":"49130a750b4758e7e8dec8d82bf66ae771d51181c33cbba9d84093ee4f83f6e3aadd3f40fbcc441fcf90ed83b83c9d9671b9092907a36231ec3e2c56775c5699fce16abad104b291dd13f67ad4e1ff4d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"fc3dfb2f29b649391437aff6920760671e470ebf09e8fd68":"4e7d48fe49ecefebed749979b965d8f6":"ae7405de4957947dc09fb1be2227c763":"3fa22158d9bb1948c64102f3ac00bfed":"ffb49be8c714b502595da9248248fb009eace24ff77d298dfe8b05efe6441352213bd236bdf4b3de34fee35b051747f4e549f69bbad8c729f3b5cf2db29a0ab6aeb590857e0f48babff3a9ea3e4079b6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"32018afb07a6141e9a6badda9b647f650090ba3475d0149b":"fa92f66bb7a06a1652d4084c15d2f778":"13c32c456c799cf0808e00c6de7efce0":"693728213798dde84176dabfb50434d5":"12c9d6683e6ebb5136253db60b39b3203f52607e44d13ae80709cdf2fa61ff5befb0838f544e39e135830b573ac5a31b7535c0a2502370400906658e6b1e9a0f5755f360d9bff68fa55ad628b49a8937" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-1,128+64,128,128) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA1:"3e325daab3301856044f416f250b6161e447e63d85ca084f":"a9d2a53dbd7ef4b9150dd0ed4d002e56":"4de6c923346d7adc16bbe89b9a184a79":"9e9e3412635aec6fcfb9d00da0c49fb3":"48ac8646b334e7434e5f73d60a8f6741e472baabe525257b78151c20872f331c169abe25faf800991f3d0a45c65e71261be0c8e14a1a8a6df9c6a80834a4f2237e23abd750f845ccbb4a46250ab1bb63" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"a76e77a969ab92645181f0157802523746c34bf321867641051ed6ba39368033adc93d4e":"":"":"":"8925987db5566e60520f09bdddab488292bed92cd385e5b6fc223e1919640b4e34e34575033e56c0a8f608be21d3d221c67d39abec98d81312f3a2653d55ffbf44c337c82bed314c211be23ec394399ba351c4687dce649e7c2a1ba7b0b5dab125671b1bcf9008da65cad612d95ddc92" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"65cdaa5ab147d0c79fdd02b24fc94d0e427f59ef9a31f447458c6befe0c2cde5a58c6b7d":"":"":"":"0d164682b5bb552a53a2a942373639d98576450ca632faebc15060691a4219467c5aa106034cd19a214a0a4f31d402e68c4c565f49b33b680d522ef25f541e8202be779730376fdcf5b7b58fd6ac959204a88f91008651d2c02ada82505f914d4d9b9aea7967784e5320e185e1248270" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"650996f1477112af7604386be5ace78232904315d99d87d72a06709d331a6f930b447cf5":"":"":"":"d3341d7767cfd95640a107b3abaed7b4e1855b348e3ae5bcc53a0b0d49d4b4976837ec8f376f38327135578eca7ee583215bd5c79ebf499816f79afcc402ff1e9ffc4ad0f896761c9cff75050bf84baa194c355763b16b5d2648d480a2b48f22662685de39c7cee90aa0b6edf8062e42" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"898640ce467201a53e7731bdfb572977f7eb3e49050bc1e367ca74bf0a27376d339d09f4":"":"":"":"4f5eea927023b4abab5d4d9944e84ca001ee081cbc21d4080e1534ee6d1d8a6f60361029ffa983bcc79b5d65d4aaaaaf98983de13ddde39a739f9d95878fb31f57f96184e5f2f3adf654a468c616237fcbc6b2c194e247178cb90294f631c449a01f1fe09c02587c460305be9fc71b5a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"fe405dd73956bf6ec875515eebd8c5ecd60553643da750914c83dfc93611d57390af7324":"":"":"":"d8ae0eb81913a190c439f8ffa56c06155a73f84b20608b2b2e9eab3061202cebad18ab8b3eba81672152c1c02ef573cd6e8623c392facb6a857425c6795cd7999c1e7f56f3fa9accca018076e0bfc106d075df98f5fb66f28933215e9276777dfc479e71a8d506a66197918d9b0f7a8f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"b06892f6f455afddc8eb60aae35b35a64f63b2aa85a2dae4ef489266f7bc354f72d68b71":"":"":"":"fc10c03fc37d3bd5fba6591a97f6354a9ed8ba2b6806744432851f43a3ce6418e39ccb417b8539e349acea588e2abe5da06147c9825c6e50a31f8589a57ca3bfb10f0da9c8e89fe2e372b5af1cf96e0fbeec5d99228770c41a76e587da7d8764d5f235f5d1d6188d84ae61c52c2164fb" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"9174e174e9e031f62b2e19ae5c0bef22eed7d5598e6e73504759a2c15b05c2473a721d26":"":"":"":"1962f2d473b31a2576dbd78022f4eeb974641fa2e9cb582f03ab741929f51f0f4663129e68ddc242e1c2ceafacec3dccb97e09527aff46b948f0abcea1451699dc3ae4d3fb5e04c84337e17b504af2fb5f1aa6ec0033ddf138a188ee162c497526563a67da8015275d89f0e1e902b2ef" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"eb1d45ba0d8951b7b1d7ce922b7d1f6e94da8b821940126c9da5b0b4382425930743a051":"":"":"":"306b1f733e6f69b6f26b7baa5441af4967a5cad8faad18029440aa989aef6024dbf3ba02dfc2c694dad6496ff760d72ae6914a4dcd5e3a443f4bcb14bf2b64986f35c32449f15e3084d46fadfa2ae213da6b26f787cef89b6a23084a929608a9f6acd8315808c29f8ae435a40202a012" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"78cdc1567caf2ff529ef8e3475c0fbb09a48b687a544f7399f503948621f29686fb15216":"":"":"":"2367067d8ec189b0819eda34602768a0698b4b545c7d5214fad58c9787b89809b97f3af5f9349907d2954f8c0dccbdbe63cc019bde3a6fae10497ae57f33e91ed55b6fc4a83fe8a2463552796d5120da8066f7285a8388958817b1218e006d7fc617f453ad0f9217966a0731ba99f093" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"25f9ee24ee25ad3d29a974f8f552b178cb292b847a6be80694213a6c0b33e25e29fd3ecc":"":"":"":"32fe251a619d164c217365b12a313a942b6a9c3df007751a5fa9f356412d1142c785c292e3dc9d0b1d77e080892e5d39b91c58fd142458c71182061920a0721db453a32fe7ffc8b2c20bf11894fa37d8f0e9463edd43a97f65362295119be03d5e06f617fdff6accaab8c4da72ac8f81" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"0b644221788c266aae00a3b63a87f32ca96a6c32b116cd37caa4f75ff5d7e56be3b4e20f":"":"":"":"dc9245da77502cadd1a8ac4d1cf6a199c8e529deda10c87ab6c69ceea6fdef36d45f4d036021b93fe5b342c52fe1e71d81e617bebc58804af3109bab93dbb2e5c546e108bd0891710128b5e8e4a4f01df2003d038fec8cef426fad7f72dd5e091b4850e9bf4932d60deacb6e9ea3c5e6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"a6677badff70966a3cd2febaad7de7aa5849ba763789b20d0a39b6c569261b826cdb15e8":"":"":"":"e04838c970f5d7208a2a7310da893d65391666a5dc62d9ede71fc30816cfc3e8064ac59cc9aaf30283356078c812676ca20beb044a6d78db6c5ef9718a88559607f225002452c01459944433013cfffea84d6fe404fbbbc2d66bb50a2fa01d8a5d6e4ea9b402dc5256752461bf6fcb7f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"2301d8c053312db04882f4284cf8b47966c1c9b8c49de847d0c11f14c5f70ce19346562b":"":"":"":"b46246526b28f3ad7f6d8732ca3bfc40f005d97a519640a4ce728486d8bf830d661be5a97b11113e89096d9bf15cbef73ec28ac13e3fbeadc9bca500918bbe92ea23e131cc622dbffe2272db16ec5d4ca30e9bd986d1709ae22d10180514bcd11bd6218ea1fbaba101444945a17a4c4b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"78644ea1b0c4c55c4addeb476fc34471ea2c4393697aa4f170726010c443b8e1c4a6b3ea":"":"":"":"ef1b41bd03ee8460d55759db65a4c97758f48e3a09127be04c7ed08bbee5fa5cf119929df42c187e2a347a8df99c502b693a7ae41946f4918d84686880ae29d6d8fbbc4fccc9e295876a249cfa59effd331994e84717b4c76637df36beb960761880daab3d43376341439af2ce8e33cc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"71acb71235e88e3aa6d8bbf27ccef8ef28043ebe8663f7bcf49cb642b3d915cf03b90e65":"":"":"":"144aeb56a11cb648b5ec7d40c2816e368426690db55b559f5633f856b79efe5f784944144756825b8fd7bf98beb758efe2ac1f650d54fc436a4bcd7dfaf3a66c192a7629eea8a357eef24b117a6e7d578797980eaefcf9a961452c4c1315119ca960ad08764fe76e2462ae1a191baeca" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"c5c89c26ac4ca8b1106ba90a8ef4d6d687dfd88743caa5fbafa4745d9c1f8371120b10c8":"":"d3483ae5f9ed97efd3f852e4a6f20f25c947a03f39a4b75c":"2cd523c5958cdf403caa61abe5c4739cdb9d40152f0e769a":"1fef4e6abc2778d1c3e3ce00fdb5eae1ebebdd5cff0a7087644c8565d1e8b876b2c05264ca81498468851fc7b9e5a2163a06f377d2ed754c095adc59dc015a77edd69e4eecbe48d9dc127eedfff5cc73ae38127ae3a518fe7fa5abd1a9c53eeaf144420873341e2efa3d81493c69b04e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"6860e44bf582db9818ffbe4c699d4218965c29f463d7a02fe1f36c8442b0a5d103def7a2":"":"e9f598357109e2a532dc980388b8a5991256166d67c3bc01":"58ebbf7402be041724701e5c0132abe604c11a62a9de1d2f":"52fad34b27113c146595a6740f505bc2d3edf6618975cb9c4a5155788eaf08b96d232610d9b4ee06264fd92f319df5a52b8f9e31b016a6c21d27d31d9d42bbb7588a7142f26ece3ddf211c8cf4530947adee302aa71c0d7fe9060c1b25f1c1f2e053598a7fb72c4db55fb1b02352d60a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"27b9f78ae07821f2b5625c8fc3a03ceec4fc8062be860c2db20403dd88a8751dcad56158":"":"1b6c848fce706abd73612dd3fd421c1c7ce9f4c2d0ecc670":"14a43645c1b6ae394f795af6ca2e9084e7e707f3f2cedd7a":"33c592017af545b3a9cf3419ce1c604e9c7c687ebf6418fbef47ec96e61f1951068eec9b60005d24574313f04ffc16c30872ec83e41e248e3d5c6951930d6a88b8931d5502d1142ce50676b3adf48453d1a008189658db8511d19a06ac97b4d5cfac19b54e8e6b899d501715f401ef85" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"8d7cf5c2e360ef755c1e9f5b7a44a1e29f09cee7ca44e15925ffe9a47b2d55fd7750b356":"":"0e691c9a435939c615f0686eae88e090ba5c4b3f5e6e00c0":"1e3a452295617e5a9e6f78256d2781feeb3812753b4aad9a":"a307569d8adf3f7e6ee4567a5b2bd338badb9234e7b27c92429ffa75e4c56c0529fdc6c15df5d47c46e3d2eeadcf1b9e93a5dd6cde99a82f04b0d97f7a3bfd05c0e1d8370987222310ab18c980ce48b2679361c3d9011dd355a9b06337c054ee37913d5f4dd30d1fc942cd733a0fa5f8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"1a0d2c734918c539c1b306a464eb6b54f92e958e8636032aec23ba8ae817bec48384461f":"":"b8ad9e613a891fd0db89571fddda77827382e406cd3cdf7e":"1e172a708aa4ffa3618ff0d7b1f9ba341f4811507851dfb4":"674df1f3095d6c87bc54dd9b2aaa2c786bd50e4ddc02493745d820dad8552131fb3e389e99b0709478b65d4268f2a3b468a8447dc572a6ee024be6be9be9d428c12cc92894d15dd1c959d6222dc9ec30478c7a0b57f5bd8bd53868b98d7674738b54cf74100ae215693babb6db3b3890" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"95a30a0ca779a4038ea920cccfa4cdd814ca17d560d53a75cf170f4712994f9bcb2efb74":"":"1da6c8726bbfa3c8bee6dcff6f76f2d55d60527c4f0db26b":"595ebd903a596a1f12175080185bd94c2336eb8dd29a387d":"317c19cf4a45b8cf3f645da084ada54d1b1f81379152424fddad22a6dc9bd22841e0c4c5a36bfb7879eafbd1a939121905a938ae034c7fc01afb56607e35f895f46f13e91ce4e8e75b6a87a1e5544e18eb194fd6754b06885ac05e332a05ed436e889965e405e0f2069b04b40ea0f635" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"8af8930562510231a592a72587fa6ad7c234e133046965907642fbc785c0b86cba844f0f":"":"9ee7b221064966582dc836437b82386f5204a302a4179079":"473d917f5b66f0f6e3fb4670ba08c2cbd2ea765b46b10838":"5c2fc9cc7148dbe40a692b3636778eb80188949d198bba3e8355386b78b54bfb963f5f2d9202988da20ccbf336a7c737a66c90149b9e8e306477151c4d912f7c61e872de0d0e47701cbe765864de536d599946b8bd65e4d89d4e61deb53de9974fbbe634501800feea100fea573e2e50" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"2b9554ecf94c7d647a4e117f43326cab54466eba56a09a52741b2445057c491935c067d2":"":"0144be6978dba85aa645d793c1881dc2deb1bd210811ec9e":"1cd265f3812568274b643954c70923a76dfcc9f123360111":"f7459b0c23966dc1a53e0c6406c9e78ebe728e3484224cd88b6b2ea554522e75eb4a1c8a3fdc66561426464f50b8d0ff95b266677d91776b344a820eb4fd7d554678300558011a7cd85d22e92dc8ec2c2fa15c6330ba157c3e71728304447c1ad4d64f3da4fbf26d92e1e7c58a1b289c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"335ede8603fcde78ea9869da2dbcab4a6e72f1b53439f3085d06b856e627411a9ce1c297":"":"ededc73fe268935c10832c463549f8204a29cf0fe00a4d87":"ef1b8a80dd49d2c263999ddc0d5a1d9205c1b1c66239fd80":"05bfe97c398b1e33ee1c547c0edb5b654b7060b76604195440d06dd2f614a398c6c43f1803893c4c8888bedecdf998367cf992301a25f24c263f5d36bbfc6fe8b839cad293b3617c1d2c60a814bda0359e3f717fa80fc7324af8827d438c88642754b39b10d18cf5bf42f11177a0bc6b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"9b0275d861117553ecd3c4d7cfe762f88df22c4c4190dac8e0be5872818e2dd765261d58":"":"cfc0b07082d514425b17ce3cb334ec62bc1b3be0be58ca4b":"d3c70ab5ff7a364a9e6dc75132ac67e0d373fa2df301afb5":"09fb41bcceb016e754795e1cce582f0cae91d7bb50245975eb75274819e1e4dcdfbc5e2f13fd26b9a9f9e945cd807ffec4e275681ea7bd33eae13efd8a01edbe02562e77b44b6312f416c3dd0be64f2bae0ba4b9bb36fc3a44841d21d8b3571c0ef644d88cf3cc3c851b256a15f4d716" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"1981c3f9ca58fd10e8377a8d0eb3cf02102aab6f7a033af3135533d9fd850e29ecb8dc9b":"":"f9978ba41df22894ad5f3849c1bdf21f7bbc0128c782e79b":"b4d57de5e18d393273ee9f3ef9736599c6d639f437239219":"fee23db2fcc71624fb39f573e33a1490efc7230c27e9278188251634f9c045bcb26e79ece6a173491475ae44a957c4269570f5469234ca8b6873cc973c8d97178c58cec658a352bad0d4c6001cae5664258db59ad76eb6304d166267eafb46f4dd536a914fa6d1ac58317e7c557d4653" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"c10d4e521350f7cd1853576d03c4bece3e58c8c740859e4e16979499ec1365fc073736a3":"":"78b245520153baacc66846e7a83a2a925f892d4c2ee63c0f":"c8ca7a33de5991d44d7ef7da2d3368cc2cdb93895c394d41":"f92c15f5833800b28dba2d134d4dcfc41abf72f5a700469551e8ccb83bdb0772d14d6b26ba6978169e3ddbe5f214d57930dfcad719bf10d306749246d2624bedd4a18d327b8ae6bee67cf0bfb5f649824bbd0440f042146b95a83e5845ced69a55ba055d5dfc7183c3bb28d61312d274" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"7608b5617785995a1f7144ee5229e4f9c138e418bcc3b5e061a422e8cf875f58650e996d":"":"961c2d33039e60a2871e1f5b82097f6b1cb03836dba5f440":"b18cb52d3858ac5bf59f216a28c0ad49f3dc88c67b5870e0":"4b0313ae873ce5ebf08aec160416492e4c4c797a5017061ea42aefa0685ab19b74a7af11f019b9fb63072b797f7ea3354efd32c4abd1e866405a319ed2fa13fc81019d61326e70e503141b9c77b4879a45e9f36f101dbfff4359147282ef814888fee81640def25f551cee41d12609aa" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"fef7a43fea2ff1a0f624086985e535778d7a73dbc47bc23e9da92edd5d2f273cdbbc0251":"":"836731a57497a69e31f8db4f729774ad65f31d968dbc55a8":"bcca96d808ba98bb50e90afe58fc88e95dc14c3e90c56004":"4f2c64ecd146689064fbf4fcffce2a2ab3910e72ec4faec277f7b9e9ed510381312b01f21650e175ebe9c45c11e977276f13be015243a0cd16a191abbac6462ba96e4e4a1120b28083da933419e8c8f03099906eb1ee012ae291104c6530f51b5e32e6631cab8ef5aad68c0045255ba9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"00197c70b2f0d3e98e4b387ec42a65c4106a1689ab5de61101ee76f4b5e530e7efeaf964":"":"03015311cddd0961ec7a74cb84d835c058a69b964f18a1c1":"5e0d99e0e7c57769a43ea771c467fb5e2df6d06dae035fd6":"72e8ca7666e440ac6a84ab6f7be7e00a536d77315b119b49e5544bf3ead564bd06740f09f6e20564542e0d597ac15a43b5fb5a0239a3362bc3a9efe1ce358ddd9d4f30b72e12ed9d78340c66b194beb4b12e973213931b9cfd0ccbdf540d2c36ce074e2beac7a4ddac59e06e4c7178d3" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"c5c89c26ac4ca8b1106ba90a8ef4d6d687dfd88743caa5fbafa4745d9c1f8371120b10c8":"":"d3483ae5f9ed97efd3f852e4a6f20f25c947a03f39a4b75c":"2cd523c5958cdf403caa61abe5c4739cdb9d40152f0e769a":"1fef4e6abc2778d1c3e3ce00fdb5eae1ebebdd5cff0a7087644c8565d1e8b876b2c05264ca81498468851fc7b9e5a2163a06f377d2ed754c095adc59dc015a77edd69e4eecbe48d9dc127eedfff5cc73ae38127ae3a518fe7fa5abd1a9c53eeaf144420873341e2efa3d81493c69b04e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"6860e44bf582db9818ffbe4c699d4218965c29f463d7a02fe1f36c8442b0a5d103def7a2":"":"e9f598357109e2a532dc980388b8a5991256166d67c3bc01":"58ebbf7402be041724701e5c0132abe604c11a62a9de1d2f":"52fad34b27113c146595a6740f505bc2d3edf6618975cb9c4a5155788eaf08b96d232610d9b4ee06264fd92f319df5a52b8f9e31b016a6c21d27d31d9d42bbb7588a7142f26ece3ddf211c8cf4530947adee302aa71c0d7fe9060c1b25f1c1f2e053598a7fb72c4db55fb1b02352d60a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"27b9f78ae07821f2b5625c8fc3a03ceec4fc8062be860c2db20403dd88a8751dcad56158":"":"1b6c848fce706abd73612dd3fd421c1c7ce9f4c2d0ecc670":"14a43645c1b6ae394f795af6ca2e9084e7e707f3f2cedd7a":"33c592017af545b3a9cf3419ce1c604e9c7c687ebf6418fbef47ec96e61f1951068eec9b60005d24574313f04ffc16c30872ec83e41e248e3d5c6951930d6a88b8931d5502d1142ce50676b3adf48453d1a008189658db8511d19a06ac97b4d5cfac19b54e8e6b899d501715f401ef85" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"8d7cf5c2e360ef755c1e9f5b7a44a1e29f09cee7ca44e15925ffe9a47b2d55fd7750b356":"":"0e691c9a435939c615f0686eae88e090ba5c4b3f5e6e00c0":"1e3a452295617e5a9e6f78256d2781feeb3812753b4aad9a":"a307569d8adf3f7e6ee4567a5b2bd338badb9234e7b27c92429ffa75e4c56c0529fdc6c15df5d47c46e3d2eeadcf1b9e93a5dd6cde99a82f04b0d97f7a3bfd05c0e1d8370987222310ab18c980ce48b2679361c3d9011dd355a9b06337c054ee37913d5f4dd30d1fc942cd733a0fa5f8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"1a0d2c734918c539c1b306a464eb6b54f92e958e8636032aec23ba8ae817bec48384461f":"":"b8ad9e613a891fd0db89571fddda77827382e406cd3cdf7e":"1e172a708aa4ffa3618ff0d7b1f9ba341f4811507851dfb4":"674df1f3095d6c87bc54dd9b2aaa2c786bd50e4ddc02493745d820dad8552131fb3e389e99b0709478b65d4268f2a3b468a8447dc572a6ee024be6be9be9d428c12cc92894d15dd1c959d6222dc9ec30478c7a0b57f5bd8bd53868b98d7674738b54cf74100ae215693babb6db3b3890" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"95a30a0ca779a4038ea920cccfa4cdd814ca17d560d53a75cf170f4712994f9bcb2efb74":"":"1da6c8726bbfa3c8bee6dcff6f76f2d55d60527c4f0db26b":"595ebd903a596a1f12175080185bd94c2336eb8dd29a387d":"317c19cf4a45b8cf3f645da084ada54d1b1f81379152424fddad22a6dc9bd22841e0c4c5a36bfb7879eafbd1a939121905a938ae034c7fc01afb56607e35f895f46f13e91ce4e8e75b6a87a1e5544e18eb194fd6754b06885ac05e332a05ed436e889965e405e0f2069b04b40ea0f635" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"8af8930562510231a592a72587fa6ad7c234e133046965907642fbc785c0b86cba844f0f":"":"9ee7b221064966582dc836437b82386f5204a302a4179079":"473d917f5b66f0f6e3fb4670ba08c2cbd2ea765b46b10838":"5c2fc9cc7148dbe40a692b3636778eb80188949d198bba3e8355386b78b54bfb963f5f2d9202988da20ccbf336a7c737a66c90149b9e8e306477151c4d912f7c61e872de0d0e47701cbe765864de536d599946b8bd65e4d89d4e61deb53de9974fbbe634501800feea100fea573e2e50" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"2b9554ecf94c7d647a4e117f43326cab54466eba56a09a52741b2445057c491935c067d2":"":"0144be6978dba85aa645d793c1881dc2deb1bd210811ec9e":"1cd265f3812568274b643954c70923a76dfcc9f123360111":"f7459b0c23966dc1a53e0c6406c9e78ebe728e3484224cd88b6b2ea554522e75eb4a1c8a3fdc66561426464f50b8d0ff95b266677d91776b344a820eb4fd7d554678300558011a7cd85d22e92dc8ec2c2fa15c6330ba157c3e71728304447c1ad4d64f3da4fbf26d92e1e7c58a1b289c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"335ede8603fcde78ea9869da2dbcab4a6e72f1b53439f3085d06b856e627411a9ce1c297":"":"ededc73fe268935c10832c463549f8204a29cf0fe00a4d87":"ef1b8a80dd49d2c263999ddc0d5a1d9205c1b1c66239fd80":"05bfe97c398b1e33ee1c547c0edb5b654b7060b76604195440d06dd2f614a398c6c43f1803893c4c8888bedecdf998367cf992301a25f24c263f5d36bbfc6fe8b839cad293b3617c1d2c60a814bda0359e3f717fa80fc7324af8827d438c88642754b39b10d18cf5bf42f11177a0bc6b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"9b0275d861117553ecd3c4d7cfe762f88df22c4c4190dac8e0be5872818e2dd765261d58":"":"cfc0b07082d514425b17ce3cb334ec62bc1b3be0be58ca4b":"d3c70ab5ff7a364a9e6dc75132ac67e0d373fa2df301afb5":"09fb41bcceb016e754795e1cce582f0cae91d7bb50245975eb75274819e1e4dcdfbc5e2f13fd26b9a9f9e945cd807ffec4e275681ea7bd33eae13efd8a01edbe02562e77b44b6312f416c3dd0be64f2bae0ba4b9bb36fc3a44841d21d8b3571c0ef644d88cf3cc3c851b256a15f4d716" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"1981c3f9ca58fd10e8377a8d0eb3cf02102aab6f7a033af3135533d9fd850e29ecb8dc9b":"":"f9978ba41df22894ad5f3849c1bdf21f7bbc0128c782e79b":"b4d57de5e18d393273ee9f3ef9736599c6d639f437239219":"fee23db2fcc71624fb39f573e33a1490efc7230c27e9278188251634f9c045bcb26e79ece6a173491475ae44a957c4269570f5469234ca8b6873cc973c8d97178c58cec658a352bad0d4c6001cae5664258db59ad76eb6304d166267eafb46f4dd536a914fa6d1ac58317e7c557d4653" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"c10d4e521350f7cd1853576d03c4bece3e58c8c740859e4e16979499ec1365fc073736a3":"":"78b245520153baacc66846e7a83a2a925f892d4c2ee63c0f":"c8ca7a33de5991d44d7ef7da2d3368cc2cdb93895c394d41":"f92c15f5833800b28dba2d134d4dcfc41abf72f5a700469551e8ccb83bdb0772d14d6b26ba6978169e3ddbe5f214d57930dfcad719bf10d306749246d2624bedd4a18d327b8ae6bee67cf0bfb5f649824bbd0440f042146b95a83e5845ced69a55ba055d5dfc7183c3bb28d61312d274" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"7608b5617785995a1f7144ee5229e4f9c138e418bcc3b5e061a422e8cf875f58650e996d":"":"961c2d33039e60a2871e1f5b82097f6b1cb03836dba5f440":"b18cb52d3858ac5bf59f216a28c0ad49f3dc88c67b5870e0":"4b0313ae873ce5ebf08aec160416492e4c4c797a5017061ea42aefa0685ab19b74a7af11f019b9fb63072b797f7ea3354efd32c4abd1e866405a319ed2fa13fc81019d61326e70e503141b9c77b4879a45e9f36f101dbfff4359147282ef814888fee81640def25f551cee41d12609aa" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"fef7a43fea2ff1a0f624086985e535778d7a73dbc47bc23e9da92edd5d2f273cdbbc0251":"":"836731a57497a69e31f8db4f729774ad65f31d968dbc55a8":"bcca96d808ba98bb50e90afe58fc88e95dc14c3e90c56004":"4f2c64ecd146689064fbf4fcffce2a2ab3910e72ec4faec277f7b9e9ed510381312b01f21650e175ebe9c45c11e977276f13be015243a0cd16a191abbac6462ba96e4e4a1120b28083da933419e8c8f03099906eb1ee012ae291104c6530f51b5e32e6631cab8ef5aad68c0045255ba9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,0,192) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"00197c70b2f0d3e98e4b387ec42a65c4106a1689ab5de61101ee76f4b5e530e7efeaf964":"":"03015311cddd0961ec7a74cb84d835c058a69b964f18a1c1":"5e0d99e0e7c57769a43ea771c467fb5e2df6d06dae035fd6":"72e8ca7666e440ac6a84ab6f7be7e00a536d77315b119b49e5544bf3ead564bd06740f09f6e20564542e0d597ac15a43b5fb5a0239a3362bc3a9efe1ce358ddd9d4f30b72e12ed9d78340c66b194beb4b12e973213931b9cfd0ccbdf540d2c36ce074e2beac7a4ddac59e06e4c7178d3" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"e4547261c9dda6bafe9fddf435a80ebc96354c7c2c8847c5d26c6e73a967bfc4ebaf8613":"42849dc8eec611eaa49252067fa60d7d7267d711dc35b576":"815f50fc233f157f96ad0627c355bce407b269dca91af661":"775a1c9da6f58d4eb95b27935ecc01dde31ff17ce2e4e65d":"25adb777523a80a6dbb6ac1fd08e02bfc4b4686cec5efe3ae9aa2d4469eae8c9c3693fdc8e0fc107720b7789ef7331e23fe3799412ec86857ffbba515a5af4d91013b2f17669421c822005b4747942790a11a24c4974f27d54de69727b0ed507b6a48a9d6c53f93e2f3d33df73dd643f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"06d677001d9b3c97fda4d09778aee3de131b4123696b109f81bb6b0d7fbcab3c5842bb83":"f99638d2d4365b662cd83ab4e6a7bbb624e6c72b7b38e81b":"20b7d56f6222bafeeeee59dbca1933d8086218891f3a9bfe":"9de4f2847fe239cb1a3df4b8ff64c25d7b0870f3c9ebe3a3":"e18ff19837ce21e68944659321311b8584dd515ed8a6a1f2b0ac06e69009c3d0cf0489af876201efad962cfd1ba54f540b94131d788d3fea797c4bc079593bc7932baa70abb145a355741a98c584f0fa3298b8310b01e1a6debf5359d7d02b1a6c663100acb56975450bec20e91b736b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"abd38c0465cdfe018f36ffbb7a0ee51d67675ab4f0f1d1e93418bb4cdf6499a371af4d3a":"9a07d5571d841e3c1a9eb3fb48cde3b3e080e1c2e0db6a6d":"a392f79022aebbec0c82b981293627d139dfb5232eb490b4":"f5ce1f6b1e6715c49bea42ff439fdecd9b3b7f2e578133cc":"885c54ad25992fc38260498d6f4d8c73d6159af5f7efef06174da03afcd8384cb28690fd9ded1d26e2dff74aee4dd0c47a0d99c6fc1ec8d8faccbdcf6fdb12a528564ad0d8131bcf5222d7e6c69c52da1acba01b721c98ac5a33725111f12f6d8100009d7cc9efb7ad8d7d95ea4e620d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"b52620e58e0b52b8eed0d6a6c5f4ff6c1483c61fc41dacf72bf475b37d068d061d1edcea":"ef0d233de00d24622b7d4ff4215aa720787fe80aaeb65d7a":"81b735acd3dcb13e65231c2d980fb40ca850370581f230d2":"b2302d024d92cdaed4b12f79b0aeb20c98b2321710fefab2":"ae94204670196baf740768f97b3a095134b384afea667fd90a77a16c8ae390a732ff49a3073a27db0f7a2c8ad5d7cb527d334a37abf0472f292a20f2a28e667d7c9e9f7b8fbdd177f36bf92d66223aee3f712b6c9b064e07ab96f6a77613ea55008fb4f8fbcb2f1ccbb0da75316c1faa" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"2592a5ed86ff64b9b4c1fbb81222d1bfbc53f3a639571ecc356084058b8855237da15c50":"a626c51ec99e72431485d2ba027ed9cabcae7b86116abe4f":"c430876552d28776570923c6b74e42c3210f01104006bf11":"fe2ebc239690a4eb18a0b5e75d08831cc2eb07c982c63973":"005045ade7cc15467b5ea784649d9804540a842ffba4db8d44df4f44c69480bd4fe965b645aed09d62190daeb2693a2192aec3d71453a8218e4700201ab922ac35d241d95150b47cc7a051897be4d958f2da5c2ebbfceb1c550cb67b32ff83ce4fd845fd826a0d2469b506f5158765fa" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"376785f5ff8a82ceb0aaeb010533cc1089059ec583c302b14bc47e2cb8c2711839ce7f68":"6d345e248339e893f75696c039ac47e5678696fd489a393c":"b0f3fa1131c3fdd5c7fd2de93931e45a66fa030422ac65db":"c66341e3f9fb82e3ba85f229fcb7d34457e4a6ba8396b548":"b92d17e1be94b0385a8cc3e16189811fef7b284a1b0b6b2520fde79af7826c745e746486a70cd8dd9930b163da75f7eea7c216e758d9ed6c745dcd7bde19bb9382c1f7c37cd15b703b884d7d452c255b25048a836844c5ff28aaacf733a52c28904b36e1b51729d7aed81d601c0872dd" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"2cc2557582c5a90cd2ad0c4a5578eb0bbc9bde41b126e46d8e9c3563341ba238414eb628":"9d2fbb9153e3ffefae0770c79de10db069a5ff9f50e31787":"2e54e32539e27ef76ac1eeae2e30c2385647652e20903b39":"1f4e01255908c3c8049521f8972c01ede7dc76c425c59640":"7d6ccdfab33f322898c470be02d8257e0e952dd10f407b3a8eaeeba47c541d968d79eca29e15541c1505fe4f19a41797c9ca2280c06261fe9d0c58bab65d16f5794b57566b8795c38c7b43d4761c8fd107beb95147a0fe61ae8dc31e25eb2957e44c0463ca7c1b589ea587f0cae1428c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"e670f896326b76034e43cd85f6f6f11fe6582d3471a8eb88d37a2302de010aac0e556860":"5e218091abee1960ef81f4d5a80415e388bd0cc79bed70cf":"7cf84b9ff30dbd0f608fb21646d7c5b542fba50adb38d5df":"c1c4aabe7616a4c97a4dbdadb08a9b63c6e10cef8d463fd8":"d8fbd557fccf31829b5ee11b05d0353e725bff15fdaac94d21ce95d40eff55edd852b264b515ec6384e2d28d014e47a2df0d4f56a4ec79309b06affc62915e231d62d02bfc60220c72b7ca7ba5671f882839b791ef534e707a04e5274c1011f7941fe1075a5d06a47af9fb2f65c1f211" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"0576bb2d4c663b781193509251e2f76b0a8bb792e79449600c2c154feb70cf33ca942508":"ad15e4fce9f4dea43c12ff9f9d50c963b335a01332541154":"3c8a4d6ab96cebf9d02b5663dcb0e0db23699623455cd4b5":"43d2d3a8d023fa1785ce4781a15eb20ad787685a47da08f0":"a68e648cb07da2eb795a8c898c8631e565f33c2fe9c35e686d6f85fef145446cb79bb6d17bdc8224bfe437468a9630ed03c517caf1226c278ae510c869d67d50b6bf1cb378a34035041f290d8dbc123650ab4fbe5cf6074ed0ba90e45d9a8ae08566ea3d3a00ee3741c8ec8f56dcc78c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"f597ce05b9a5b1cf3847bbd4171e5085384cc256f77ac61573b435726cbd538b93de9f55":"573cf859f8fea05f16c6d03cb4e524b91e917f39eeeb1d68":"2a842454870c3f7936f8036b453d219557ca341f261d2519":"7afd8cc269899acd88f5c55af29fb0c4ce678a0d8ebf924f":"8162c16c1ce3d5c6b7c96f0281f4220569a882277935752b86e7d3f54646b276cb77ed96da73799911fca3d19d34c1f0b21068a472afcb77410412eff2abd03c753a009ce02b0e995477546366020294eff0ef0da66f31a413313e2774ca04f09a4d5076e0e85ca97d5bb6faac4c0c27" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"d5b5374fe143035c4fea41667bc8bc7d46000998cc82ab32a0040c705e01f9b354e8f16e":"ed8bb219e67515874c5b9e3f6ae6e4dfa9c42d1e69204e8b":"70f03fe6e78cc34ec1678b2708fcd8ae3300183ea15ccfc7":"9c641d7e73d1a2b819e113747d74a979b74c444ed36b7391":"d50df8e3e17c0f5e19673ba2097d1d0c4cf7a9def7465a5b91ac8d49ae1b6a821fe9efde841ec9064555c0e2d6cdfa41f1089f22a5c27090c5a136660d1af586a1e131a853f19bc3c8f4c79aa09e39c2f22b4456c667ec907e2a4124218665e7cce50399ae1e19ba9c2399f470444839" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"74d7c8c9b170e59e4f128c8df1955838df5c8071a5e85439d71e785c68b37e10efb39c9a":"be3d54203a1078d051519137774d5d851e81be026155eb78":"23f7b6758d79de580ed3eb995fc173da74939837aa8d9eb4":"6f0d5a333ddea0d38362df0dc3ebaa2be2fe5825ddb0ce84":"4462fc32110b25b3797c5cafaad830e8a4346d9270fed98b30f1345a7a8dde19bf5365d6f3788e7f715feb2762af263839c8c8188908c61120743d977d71c51f6324d887bbda380fc07eff09a31c2332e7b1aa1692c59c3379db95fc21cf711c004c4d385fe14f48f2f2a31bcce6aaec" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"eaf27c3f69279fd523c0c3a1da5fc4f01ed64c27ffcfe3c1c596482f5baae1434e8c687c":"b038829fc95dcba8645ce40a306491c893f48139ae30a071":"fbbf7abb8cc2612eeea6d9463efd55c47245e01713332bd6":"ccd7e81f529de1ff4e65fc63d34c262ffde7ee49e6707197":"96dfb7445057633b2f0deb69135d10d0a2dc53faa9cded55ddfb8edc63f5424f8fec7627597a30328177dde7963f76f9e5412b5b440256c6a3f0c7c7fa02ca49e19ea176abac013696e9d529f65e51d4a7348e42dd254bbf19d9632d6c875b8ecd7a4139f1bf020a159d2a30af8d645f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"319cbf2b11b37c831c654b6cec2570dc6d7abeeab185272a518eaef30faa5acf5c8b254d":"9effa141f7466b659eaa50c32c8e683c2640f54027ab6aa5":"63b3acc237588cdf41c0d4bef16c4890cf3d458fcf1de8ea":"573d6a7960aeccc3280a8aee4d72e587e9d196b7b270e329":"8a568086fdd9f01206a5aaee34d253bbc9339112d3170699b9a1392e97062d5d0f16240114dc1789269217c5b4b2974895b20903890f7dacfef46fa4a4d02891c70425ab3b42f53d72f852faf3713ac7b8207dc453279f4df345091b8bfeb54983095c2d190358293ba507bdfdc39b24" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-224,192+96,192,192) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA224:"56f3f5b08da10ead0c986dd2ae5553e4b2eeeb47ad5d22197b12b89b4a871c51c0d85554":"96c8630a1f4187fb0794601cf51e7e333e71756a0421ff43":"875e5bc9548917a82b6dc95200d92bf4218dba7ab316a5fe":"4d3f5678b00d47bb9d0936486de60407eaf1282fda99f595":"90969961ef9283b9e600aead7985455e692db817165189665f498f219b1e5f277e586b237851305d5205548b565faeb02bb7b5f477c80ba94b0563e24d9309d2957a675848140f5601f698459db5899b20dda68f000ccb18dcd39dfae49955b8478fd50bb59d772045beb338622efa5a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"ca851911349384bffe89de1cbdc46e6831e44d34a4fb935ee285dd14b71a7488659ba96c601dc69fc902940805ec0ca8":"":"":"":"e528e9abf2dece54d47c7e75e5fe302149f817ea9fb4bee6f4199697d04d5b89d54fbb978a15b5c443c9ec21036d2460b6f73ebad0dc2aba6e624abf07745bc107694bb7547bb0995f70de25d6b29e2d3011bb19d27676c07162c8b5ccde0668961df86803482cb37ed6d5c0bb8d50cf1f50d476aa0458bdaba806f48be9dcb8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"79737479ba4e7642a221fcfd1b820b134e9e3540a35bb48ffae29c20f5418ea33593259c092bef4129bc2c6c9e19f343":"":"":"":"cf5ad5984f9e43917aa9087380dac46e410ddc8a7731859c84e9d0f31bd43655b924159413e2293b17610f211e09f770f172b8fb693a35b85d3b9e5e63b1dc252ac0e115002e9bedfb4b5b6fd43f33b8e0eafb2d072e1a6fee1f159df9b51e6c8da737e60d5032dd30544ec51558c6f080bdbdab1de8a939e961e06b5f1aca37" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"b340907445b97a8b589264de4a17c0bea11bb53ad72f9f33297f05d2879d898d65cb27735d83c0708f72684ea58f7ee5":"":"":"":"75183aaaf3574bc68003352ad655d0e9ce9dd17552723b47fab0e84ef903694a32987eeddbdc48efd24195dbdac8a46ba2d972f5808f23a869e71343140361f58b243e62722088fe10a98e43372d252b144e00c89c215a76a121734bdc485486f65c0b16b8963524a3a70e6f38f169c12f6cbdd169dd48fe4421a235847a23ff" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"8e159f60060a7d6a7e6fe7c9f769c30b98acb1240b25e7ee33f1da834c0858e7c39d35052201bdcce4e127a04f04d644":"":"":"":"62910a77213967ea93d6457e255af51fc79d49629af2fccd81840cdfbb4910991f50a477cbd29edd8a47c4fec9d141f50dfde7c4d8fcab473eff3cc2ee9e7cc90871f180777a97841597b0dd7e779eff9784b9cc33689fd7d48c0dcd341515ac8fecf5c55a6327aea8d58f97220b7462373e84e3b7417a57e80ce946d6120db5" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"74755f196305f7fb6689b2fe6835dc1d81484fc481a6b8087f649a1952f4df6ac36387a544a5f2b78007651a7b74b749":"":"":"":"b2896f3af4375dab67e8062d82c1a005ef4ed119d13a9f18371b1b873774418684805fd659bfd69964f83a5cfe08667ddad672cafd16befffa9faed49865214f703951b443e6dca22edb636f3308380144b9333de4bcb0735710e4d9266786342fc53babe7bdbe3c01a3addb7f23c63ce2834729fabbd419b47beceb4a460236" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"4b222718f56a3260b3c2625a4cf80950b7d6c1250f170bd5c28b118abdf23b2f7aed52d0016fcaef0b6492bc40bbe0e9":"":"":"":"a6da029b3665cd39fd50a54c553f99fed3626f4902ffe322dc51f0670dfe8742ed48415cf04bbad5ed3b23b18b7892d170a7dcf3ef8052d5717cb0c1a8b3010d9a9ea5de70ae5356249c0e098946030c46d9d3d209864539444374d8fbcae068e1d6548fa59e6562e6b2d1acbda8da0318c23752ebc9be0c1c1c5b3cf66dd967" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"b512633f27fb182a076917e39888ba3ff35d23c3742eb8f3c635a044163768e0e2c39b84629a3de5c301db5643af1c21":"":"":"":"fb931d0d0194a97b48d5d4c231fdad5c61aedf1c3a55ac24983ecbf38487b1c93396c6b86ff3920cfa8c77e0146de835ea5809676e702dee6a78100da9aa43d8ec0bf5720befa71f82193205ac2ea403e8d7e0e6270b366dc4200be26afd9f63b7e79286a35c688c57cbff55ac747d4c28bb80a2b2097b3b62ea439950d75dff" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"aae3ffc8605a975befefcea0a7a286642bc3b95fb37bd0eb0585a4cabf8b3d1e9504c3c0c4310c1c0746a036c91d9034":"":"":"":"2819bd3b0d216dad59ddd6c354c4518153a2b04374b07c49e64a8e4d055575dfbc9a8fcde68bd257ff1ba5c6000564b46d6dd7ecd9c5d684fd757df62d85211575d3562d7814008ab5c8bc00e7b5a649eae2318665b55d762de36eba00c2906c0e0ec8706edb493e51ca5eb4b9f015dc932f262f52a86b11c41e9a6d5b3bd431" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"b9475210b79b87180e746df704b3cbc7bf8424750e416a7fbb5ce3ef25a82cc624baf03599c10df6ef44065d715a93f7":"":"":"":"ae12d784f796183c50db5a1a283aa35ed9a2b685dacea97c596ff8c294906d1b1305ba1f80254eb062b874a8dfffa3378c809ab2869aa51a4e6a489692284a25038908a347342175c38401193b8afc498077e10522bec5c70882b7f760ea5946870bd9fc72961eedbe8bff4fd58c7cc1589bb4f369ed0d3bf26c5bbc62e0b2b2" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"27838eb44ceccb4e36210703ebf38f659bc39dd3277cd76b7a9bcd6bc964b62839cfe0210db2e7b0eb52a387476e7ea1":"":"":"":"e5e72a53605d2aaa67832f97536445ab774dd9bff7f13a0d11fd27bf6593bfb52309f2d4f09d147192199ea584503181de87002f4ee085c7dc18bf32ce5315647a3708e6f404d6588c92b2dda599c131aa350d18c747b33dc8eda15cf40e95263d1231e1b4b68f8d829f86054d49cfdb1b8d96ab0465110569c8583a424a099a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"d7129e4f47008ad60c9b5d081ff4ca8eb821a6e4deb91608bf4e2647835373a5a72882773f78c2fc4878295840a53012":"":"":"":"0cbf48585c5de9183b7ff76557f8fc9ebcfdfde07e588a8641156f61b7952725bbee954f87e9b937513b16bba0f2e523d095114658e00f0f3772175acfcb3240a01de631c19c5a834c94cc58d04a6837f0d2782fa53d2f9f65178ee9c837222494c799e64c60406069bd319549b889fa00a0032dd7ba5b1cc9edbf58de82bfcd" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"67fe5e300c513371976c80de4b20d4473889c9f1214bce718bc32d1da3ab7532e256d88497738a33923aa003a8d7845c":"":"":"":"b44660d64ef7bcebc7a1ab71f8407a02285c7592d755ae6766059e894f694373ed9c776c0cfc8594413eefb400ed427e158d687e28da3ecc205e0f7370fb089676bbb0fa591ec8d916c3d5f18a3eb4a417120705f3e2198154cd60648dbfcfc901242e15711cacd501b2c2826abe870ba32da785ed6f1fdc68f203d1ab43a64f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"de8142541255c46d66efc6173b0fe3ffaf5936c897a3ce2e9d5835616aafa2cbd01f9002c407127bc3297a561d89b81d":"":"":"":"64d1020929d74716446d8a4e17205d0756b5264867811aa24d0d0da8644db25d5cde474143c57d12482f6bf0f31d10af9d1da4eb6d701bdd605a8db74fb4e77f79aaa9e450afda50b18d19fae68f03db1d7b5f1738d2fdce9ad3ee9461b58ee242daf7a1d72c45c9213eca34e14810a9fca5208d5c56d8066bab1586f1513de7" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"4a8e0bd90bdb12f7748ad5f147b115d7385bb1b06aee7d8b76136a25d779bcb77f3cce4af8c8ce3c45bdf23c6b181a00":"":"":"":"320c7ca4bbeb7af977bc054f604b5086a3f237aa5501658112f3e7a33d2231f5536d2c85c1dad9d9b0bf7f619c81be4854661626839c8c10ae7fdc0c0b571be34b58d66da553676167b00e7d8e49f416aacb2926c6eb2c66ec98bffae20864cf92496db15e3b09e530b7b9648be8d3916b3c20a3a779bec7d66da63396849aaf" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"451ed024bc4b95f1025b14ec3616f5e42e80824541dc795a2f07500f92adc6652f28e6ee8de5879db1eccd58c994e5f0":"":"":"":"3fb637085ab75f4e95655faae95885166a5fbb423bb03dbf0543be063bcd48799c4f05d4e522634d9275fe02e1edd920e26d9accd43709cb0d8f6e50aa54a5f3bdd618be23cf73ef736ed0ef7524b0d14d5bef8c8aec1cf1ed3e1c38a808b35e61a44078127c7cb3a8fd7addfa50fcf3ff3bc6d6bc355d5436fe9b71eb44f7fd" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"d3cc4d1acf3dde0c4bd2290d262337042dc632948223d3a2eaab87da44295fbd0109b0e729f457328aa18569a9224921":"":"3c311848183c9a212a26f27f8c6647e40375e466a0857cc39c4e47575d53f1f6":"fcb9abd19ccfbccef88c9c39bfb3dd7b1c12266c9808992e305bc3cff566e4e4":"9c7b758b212cd0fcecd5daa489821712e3cdea4467b560ef5ddc24ab47749a1f1ffdbbb118f4e62fcfca3371b8fbfc5b0646b83e06bfbbab5fac30ea09ea2bc76f1ea568c9be0444b2cc90517b20ca825f2d0eccd88e7175538b85d90ab390183ca6395535d34473af6b5a5b88f5a59ee7561573337ea819da0dcc3573a22974" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"f97a3cfd91faa046b9e61b9493d436c4931f604b22f1081521b3419151e8ff0611f3a7d43595357d58120bd1e2dd8aed":"":"517289afe444a0fe5ed1a41dbbb5eb17150079bdd31e29cf2ff30034d8268e3b":"88028d29ef80b4e6f0fe12f91d7449fe75062682e89c571440c0c9b52c42a6e0":"c6871cff0824fe55ea7689a52229886730450e5d362da5bf590dcf9acd67fed4cb32107df5d03969a66b1f6494fdf5d63d5b4d0d34ea7399a07d0116126d0d518c7c55ba46e12f62efc8fe28a51c9d428e6d371d7397ab319fc73ded4722e5b4f30004032a6128df5e7497ecf82ca7b0a50e867ef6728a4f509a8c859087039c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"0f2f23d64f481cabec7abb01db3aabf125c3173a044b9bf26844300b69dcac8b9a5ae13232b43aa19cfe8d7958b4b590":"":"ec4c7a62acab73385f567da10e892ff395a0929f959231a5628188ce0c26e818":"6b97b8c6b6bb8935e676c410c17caa8042aa3145f856d0a32b641e4ae5298648":"7480a361058bd9afa3db82c9d7586e42269102013f6ec5c269b6d05f17987847748684766b44918fd4b65e1648622fc0e0954178b0279dfc9fa99b66c6f53e51c4860131e9e0644287a4afe4ca8e480417e070db68008a97c3397e4b320b5d1a1d7e1d18a95cfedd7d1e74997052bf649d132deb9ec53aae7dafdab55e6dae93" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"53c56660c78481be9c63284e005fcc14fbc7fb27732c9bf1366d01a426765a31dc7a14d0eb5b0b3534e717a0b3c64614":"":"3aa848706ecb877f5bedf4ffc332d57c22e08747a47e75cff6f0fd1316861c95":"9a401afa739b8f752fddacd291e0b854f5eff4a55b515e20cb319852189d3722":"5c0eb420e0bf41ce9323e815310e4e8303cd677a8a8b023f31f0d79f0ca15aeb636099a369fd074d69889865eac1b72ab3cbfebdb8cf460b00072802e2ec648b1349a5303be4ccaadd729f1a9ea17482fd026aaeb93f1602bc1404b9853adde40d6c34b844cf148bc088941ecfc1642c8c0b9778e45f3b07e06e21ee2c9e0300" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"f63c804404902db334c54bb298fc271a21d7acd9f770278e089775710bf4fdd73e45009ea9cb2a36ba1aa4bf39178200":"":"d165a13dc8cc43f3f0952c3f5d3de4136954d983683d4a3e6d2dc4c89bf23423":"75106bc86d0336df85097f6af8e80e2da59046a03fa65b06706b8bbc7ffc6785":"6363139bba32c22a0f5cd23ca6d437b5669b7d432f786b8af445471bee0b2d24c9d5f2f93717cbe00d1f010cc3b9c515fc9f7336d53d4d26ba5c0d76a90186663c8582eb739c7b6578a3328bf68dc2cec2cd89b3a90201f6993adcc854df0f5c6974d0f5570765a15fe03dbce28942dd2fd16ba2027e68abac83926969349af8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"2aaca9147da66c176615726b69e3e851cc3537f5f279fe7344233d8e44cfc99d4e171f080af9a6081bee9f183ac9e340":"":"d75a2a6eb66c3833e50f5ec3d2e434cf791448d618026d0c360806d120ded669":"b643b74c15b37612e6577ed7ca2a4c67a78d560af9eb50a4108fca742e87b8d6":"501dcdc977f4ba856f24eaa4968b374bebb3166b280334cb510232c31ebffde10fa47b7840ef3fe3b77725c2272d3a1d4219baf23e0290c622271edcced58838cf428f0517425d2e19e0d8c89377eecfc378245f283236fafa466c914b99672ceafab369e8889a0c866d8bd639db9fb797254262c6fd44cfa9045ad6340a60ef" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a2e4cd48a5cf918d6f55942d95fcb4e8465cdc4f77b7c52b6fae5b16a25ca306bef036716440db6e6d333d9d760b7ca8":"":"bfa591c7287f3f931168f95e38869441d1f9a11035ad8ea625bb61b9ea17591c":"c00c735463bca215adc372cb892b05e939bf669583341c06d4e31d0e5b363a37":"e7d136af69926a5421d4266ee0420fd729f2a4f7c295d3c966bdfa05268180b508b8a2852d1b3a06fd2ab3e13c54005123ef319f42d0c6d3a575e6e7e1496cb28aacadbcf83740fba8f35fcee04bb2ed8a51db3d3362b01094a62fb57e33c99a432f29fce6676cffbbcc05107e794e75e44a02d5e6d9d748c5fbff00a0178d65" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"95a67771cba69011a79776e713145d309edae56fad5fd6d41d83eaff89df6e5ebe5b5164e31ecc51ba6f7c3c5199eb33":"":"065f693b229a7c4fd373cd15b3807552dd9bf98c5485cef361949d4e7d774b53":"9afb62406f0e812c4f156d58b19a656c904813c1b4a45a0029ae7f50731f8014":"f61b61a6e79a41183e8ed6647899d2dc85cdaf5c3abf5c7f3bf37685946dc28f4923dc842f2d4326bd6ce0d50a84cb3ba869d72a36e246910eba6512ba36cd7ed3a5437c9245b00a344308c792b668b458d3c3e16dee2fbec41867da31084d46d8ec168de2148ef64fc5b72069abf5a6ada1ead2b7146bb793ff1c9c3690fa56" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a459e1815cbca4514ec8094d5ab2414a557ba6fe10e613c345338d0521e4bf9062221392e2552e76cd0d36df6e6068eb":"":"0a3642b02b23b3ef62c701a63401124022f5b896de86dab6e6c7451497aa1dcc":"c80514865901371c45ba92d9f95d50bb7c9dd1768cb3dfbc45b968da94965c6e":"464e6977b8adaef307c9623e41c357013249c9ffd77f405f3925cebb69f151ce8fbb6a277164002aee7858fc224f6499042aa1e6322deee9a5d133c31d640e12a7487c731ba03ad866a24675badb1d79220c40be689f79c2a0be93cb4dada3e0eac4ab140cb91998b6f11953e68f2319b050c40f71c34de9905ae41b2de1c2f6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"252c2cad613e002478162861880979ee4e323025eebb6fb2e0aa9f200e28e0a1d001bc9a8f2c8c242e4369df0c191989":"":"9bcfc61cb2bc000034bb3db980eb47c76fb5ecdd40553eff113368d639b947fd":"8b0565c767c2610ee0014582e9fbecb96e173005b60e9581503a6dca5637a26e":"e96c15fe8a60692b0a7d67171e0195ff6e1c87aab844221e71700d1bbee75feea695f6a740c9760bbe0e812ecf4061d8f0955bc0195e18c4fd1516ebca50ba6a6db86881737dbab8321707675479b87611db6af2c97ea361a5484555ead454defb1a64335de964fc803d40f3a6f057893d2afc25725754f4f00abc51920743dc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"8be0ca6adc8b3870c9d69d6021bc1f1d8eb9e649073d35ee6c5aa0b7e56ad8a59d1265f7d51fdb65377f1e6edd6ae0e4":"":"da86167ac997c406bb7979f423986a84ec6614d6caa7afc10aff0699a9b2cf7f":"e4baa3c555950b53e2bfdba480cb4c94b59381bac1e33947e0c22e838a9534cf":"64384ecc4ea6b458efc227ca697eac5510092265520c0a0d8a0ccf9ed3ca9d58074671188c6a7ad16d0b050cdc072c125d7298d3a31d9f044a9ee40da0089a84fea28cc7f05f1716db952fad29a0e779635cb7a912a959be67be2f0a4170aace2981802e2ff6467e5b46f0ffbff3b42ba5935fd553c82482ac266acf1cd247d7" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"d43a75b6adf26d60322284cb12ac38327792442aa8f040f60a2f331b33ac4a8f0682f8b091f811afacaacaec9b04d279":"":"7fd3b8f512940da7de5d80199d9a7b42670c04a945775a3dba869546cbb9bc65":"2575db20bc7aafc2a90a5dabab760db851d754777bc9f05616af1858b24ff3da":"0da7a8dc73c163014bf0841913d3067806456bbca6d5de92b85534c6545467313648d71ef17c923d090dc92cff8d4d1a9a2bb63e001dc2e8ab1a597999be3d6cf70ff63fee9985801395fbd4f4990430c4259fcae4fa1fcd73dc3187ccc102d04af7c07532885e5a226fc42809c48f22eecf4f6ab996ae4fcb144786957d9f41" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"64352f236af5d32067a529a8fd05ba00a338c9de306371a0b00c36e610a48d18df99ed2c7608c870624b962a5dc68acd":"":"da416335e7aaf60cf3d06fb438735ce796aad09034f8969c8f8c3f81e32fef24":"a28c07c21a2297311adf172c19e83ca0a87731bdffb80548978d2d1cd82cf8a3":"132b9f25868729e3853d3c51f99a3b5fae6d4204bea70890daf62e042b776a526c8fb831b80a6d5d3f153237df1fd39b6fd9137963f5516d9cdd4e3f9195c46e9972c15d3edc6606e3368bde1594977fb88d0ca6e6f5f3d057ccadc7d7dab77dfc42658a1e972aa446b20d418286386a52dfc1c714d2ac548713268b0b709729" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"282f4d2e05a2cd30e9087f5633089389449f04bac11df718c90bb351cd3653a590a7daf3c0de9ea286081efc4a684dfb":"":"2630b4ccc7271cc379cb580b0aaede3d3aa8c1c7ba002cf791f0752c3d739007":"c31d69de499f1017be44e3d4fa77ecebc6a9b9934749fcf136f267b29115d2cc":"c899094520e0197c37b91dd50778e20a5b950decfb308d39f1db709447ae48f6101d9abe63a783fbb830eec1d359a5f61a2013728966d349213ee96382614aa4135058a967627183810c6622a2158cababe3b8ab99169c89e362108bf5955b4ffc47440f87e4bad0d36bc738e737e072e64d8842e7619f1be0af1141f05afe2d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,0,256) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"13c752b9e745ce77bbc7c0dbda982313d3fe66f903e83ebd8dbe4ff0c11380e9f1a533095d6174164bd7c82532464ae7":"":"4f53db89b9ba7fc00767bc751fb8f3c103fe0f76acd6d5c7891ab15b2b7cf67c":"582c2a7d34679088cca6bd28723c99aac07db46c332dc0153d1673256903b446":"6311f4c0c4cd1f86bd48349abb9eb930d4f63df5e5f7217d1d1b91a71d8a6938b0ad2b3e897bd7e3d8703db125fab30e03464fad41e5ddf5bf9aeeb5161b244468cfb26a9d956931a5412c97d64188b0da1bd907819c686f39af82e91cfeef0cbffb5d1e229e383bed26d06412988640706815a6e820796876f416653e464961" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"5cacc68165a2e2ee20812f35ec73a79dbf30fd475476ac0c44fc6174cdac2b556f885496c1e63af620becd9e71ecb824":"e72dd8590d4ed5295515c35ed6199e9d211b8f069b3058caa6670b96ef1208d0":"":"":"f1012cf543f94533df27fedfbf58e5b79a3dc517a9c402bdbfc9a0c0f721f9d53faf4aafdc4b8f7a1b580fcaa52338d4bd95f58966a243cdcd3f446ed4bc546d9f607b190dd69954450d16cd0e2d6437067d8b44d19a6af7a7cfa8794e5fbd728e8fb2f2e8db5dd4ff1aa275f35886098e80ff844886060da8b1e7137846b23b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"8df013b4d103523073917ddf6a869793059e9943fc8654549e7ab22f7c29f122da2625af2ddd4abcce3cf4fa4659d84e":"b571e66d7c338bc07b76ad3757bb2f9452bf7e07437ae8581ce7bc7c3ac651a9":"":"":"b91cba4cc84fa25df8610b81b641402768a2097234932e37d590b1154cbd23f97452e310e291c45146147f0da2d81761fe90fba64f94419c0f662b28c1ed94da487bb7e73eec798fbcf981b791d1be4f177a8907aa3c401643a5b62b87b89d66b3a60e40d4a8e4e9d82af6d2700e6f535cdb51f75c321729103741030ccc3a56" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"565b2b77937ba46536b0f693b3d5e4a8a24563f9ef1f676e8b5b2ef17823832f4ef3064ec29f5b7f9686d75a23d170e3":"3b722433226c9dba745087270ab3af2c909425ba6d39f5ce46f07256068319d9":"":"":"d144ee7f8363d128872f82c15663fe658413cd42651098e0a7c51a970de75287ec943f9061e902280a5a9e183a7817a44222d198fbfab184881431b4adf35d3d1019da5a90b3696b2349c8fba15a56d0f9d010a88e3f9eeedb67a69bcaa71281b41afa11af576b765e66858f0eb2e4ec4081609ec81da81df0a0eb06787340ea" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"fc3832a91b1dcdcaa944f2d93cbceb85c267c491b7b59d017cde4add79a836b6d5e76ce9eabafed06e33a913e395c5e0":"ffc5f6eefd51da64a0f67b5f0cf60d7ab43fc7836bca650022a0cee57a43c148":"":"":"0e713c6cc9a4dbd4249201d12b7bf5c69c3e18eb504bf3252db2f43675e17d99b6a908400cea304011c2e54166dae1f20260008efe4e06a87e0ce525ca482bca223a902a14adcf2374a739a5dfeaf14cadd72efa4d55d15154c974d9521535bcb70658c5b6c944020afb04a87b223b4b8e5d89821704a9985bb010405ba8f3d4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"8009eb2cb49fdf16403bcdfd4a9f952191062acb9cc111eca019f957fb9f4451355598866952394b1eddd85d59f81c9d":"09ff1d4b97d83b223d002e05f754be480d13ba968e5aac306d71cc9fc49cc2dd":"":"":"9550903c2f02cf77c8f9c9a37041d0040ee1e3ef65ba1a1fbbcf44fb7a2172bd6b3aaabe850281c3a1778277bacd09614dfefececac64338ae24a1bf150cbf9d9541173a82ecba08aa19b75abb779eb10efa4257d5252e8afcac414bc3bb5d3006b6f36fb9daea4c8c359ef6cdbeff27c1068571dd3c89dc87eda9190086888d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a6e4c9a8bd6da23b9c2b10a7748fd08c4f782fadbac7ea501c17efdc6f6087bdacdc47edf1d3b21d0aec7631abb6d7d5":"c16ee0908a5886dccf332fbc61de9ec7b7972d2c4c83c477409ce8a15c623294":"":"":"a52f93ccb363e2bdf0903622c3caedb7cffd04b726052b8d455744c71b76dee1b71db9880dc3c21850489cb29e412d7d80849cfa9151a151dcbf32a32b4a54cac01d3200200ed66a3a5e5c131a49655ffbf1a8824ff7f265690dffb4054df46a707b9213924c631c5bce379944c856c4f7846e281ac89c64fad3a49909dfb92b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"59d6307460a9bdd392dfc0904973991d585696010a71e52d590a5039b4849fa434a0aafb95917cbf8c38fc5548373c05":"0407b7c57bc11361747c3d67526c36e228028a5d0b145d66ab9a2fe4b07507a0":"":"":"299aba0661315211b09d2861855d0b4b125ab24649461341af6abd903ed6f025223b3299f2126fcad44c675166d800619cf49540946b12138989417904324b0ddad121327211a297f11259c9c34ce4c70c322a653675f78d385e4e2443f8058d141195e17e0bd1b9d44bf3e48c376e6eb44ef020b11cf03eb141c46ecb43cf3d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"9ae3506aadbc8358696ba1ba17e876e1157b7048235921503d36d9211b4303429abf7d66afee5d2b811cba358bbc527d":"0d645f6238e9ceb038e4af9772426ca110c5be052f8673b8b5a65c4e53d2f519":"":"":"5f032c7fec6320fe423b6f38085cbad59d826085afe915247b3d546c4c6b174554dd4877c0d671de9554b505393a44e71f209b70f991ac8aa6e08f983fff2a4c817b0cd26c12b2c929378506489a75b2025b358cb5d0400821e7e252ac6376cd94a40c911a7ed8b6087e3de5fa39fa6b314c3ba1c593b864ce4ff281a97c325b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"96ae3b8775b36da2a29b889ad878941f43c7d51295d47440cd0e3c49991931091fe022a6fc0237b055d4d6a7036b18d5":"1e40e97362d0a823d3964c26b81ab53825c56446c5261689011886f19b08e5c2":"":"":"e707cd14b06ce1e6dbcceaedbf08d88891b03f44ad6a797bd12fdeb557d0151df9346a028dec004844ca46adec3051dafb345895fa9f4604d8a13c8ff66ae093fa63c4d9c0816d55a0066d31e8404c841e87b6b2c7b5ae9d7afb6840c2f7b441bf2d3d8bd3f40349c1c014347c1979213c76103e0bece26ad7720601eff42275" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"33f5120396336e51ee3b0b619b5f873db05ca57cda86aeae2964f51480d149926f1f6e9807ba5393edcf3cb4e4bb6113":"3709605af44d90196867c927512aa8ba31837063337b4879408d91a05c8efa9f":"":"":"8b8291126ded9acef12516025c99ccce225d844308b584b872c903c7bc6467599a1cead003dc4c70f6d519f5b51ce0da57f53da90dbe8f666a1a1dde297727fee2d44cebd1301fc1ca75956a3fcae0d374e0df6009b668fd21638d2b733e6902d22d5bfb4af1b455975e08eef0ebe4dc87705801e7776583c8de11672729f723" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"ad300b799005f290fee7f930eebce158b98fb6cb449987fe433f955456b3530006aa2514e4bd114edf7ac105cfef2772":"87ada711465e4169da2a74c931afb9b5a5b190d07b7af342aa99570401c3ee8a":"":"":"80d7c606ff49415a3a92ba1f2943235c01339c8f9cd0b0511fbfdf3ef23c42ffff008524193faaa4b7f2f2eb0cfa221d9df89bd373fe4e158ec06fad3ecf1eb48b8239b0bb826ee69d773883a3e8edac66254610ff70b6609836860e39ea1f3bfa04596fee1f2baca6cebb244774c6c3eb4af1f02899eba8f4188f91776de16f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"130b044e2c15ab89375e54b72e7baae6d4cad734b013a090f4df057e634f6ff065fd6ac602cd44107d705dbc066e52b6":"f374aba16f34d54aae5e494505b67d3818ef1c08ea24967a76876d4361379aec":"":"":"5d179534fb0dba3526993ed8e27ec9f915183d967336bb24352c67f4ab5d7935d3168e57008da851515efbaecb69904b6d899d3bfa6e9805659aef2942c4903875b8fcbc0d1d24d1c075f0ff667c1fc240d8b410dff582fa71fa30878955ce2ed786ef32ef852706e62439b69921f26e84e0f54f62b938f04905f05fcd7c2204" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"716430e999964b35459c17921fe5f60e09bd9ab234cb8f4ba4932bec4a60a1d59533b711e061b07d505da707cafbca03":"372ae616d1a1fc45c5aecad0939c49b9e01c93bfb40c835eebd837af747f079d":"":"":"a80d6a1b2d0ce01fe0d26e70fb73da20d45841cf01bfbd50b90d2751a46114c0e758cb787d281a0a9cf62f5c8ce2ee7ca74fefff330efe74926acca6d6f0646e4e3c1a1e52fce1d57b88beda4a5815896f25f38a652cc240deb582921c8b1d03a1da966dd04c2e7eee274df2cd1837096b9f7a0d89a82434076bc30173229a60" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"7679f154296e6d580854826539003a82d1c54e2e062c619d00da6c6ac820789b55d12941b0896462e7d888e5322a99a3":"ba4d1ed696f58ef64596c76cee87cc1ca83069a79e7982b9a06f9d62f4209faf":"":"":"10dc7cd2bb68c2c28f76d1b04ae2aa287071e04c3b688e1986b05cc1209f691daa55868ebb05b633c75a40a32b49663185fe5bb8f906008347ef51590530948b87613920014802e5864e0758f012e1eae31f0c4c031ef823aecfb2f8a73aaa946fc507037f9050b277bdeaa023123f9d22da1606e82cb7e56de34bf009eccb46" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"8ca4a964e1ff68753db86753d09222e09b888b500be46f2a3830afa9172a1d6da59394e0af764e2f21cf751f623ffa6c":"eb8164b3bf6c1750a8de8528af16cffdf400856d82260acd5958894a98afeed5":"":"":"fc5701b508f0264f4fdb88414768e1afb0a5b445400dcfdeddd0eba67b4fea8c056d79a69fd050759fb3d626b29adb8438326fd583f1ba0475ce7707bd294ab01743d077605866425b1cbd0f6c7bba972b30fbe9fce0a719b044fcc1394354895a9f8304a2b5101909808ddfdf66df6237142b6566588e4e1e8949b90c27fc1f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"5d3286bc53a258a53ba781e2c4dcd79a790e43bbe0e89fb3eed39086be34174bc5422294b7318952ace7055ab7570abf":"2dba094d008e150d51c4135bb2f03dcde9cbf3468a12908a1b025c120c985b9d":"793a7ef8f6f0482beac542bb785c10f8b7b406a4de92667ab168ecc2cf7573c6":"2238cdb4e23d629fe0c2a83dd8d5144ce1a6229ef41dabe2a99ff722e510b530":"d04678198ae7e1aeb435b45291458ffde0891560748b43330eaf866b5a6385e74c6fa5a5a44bdb284d436e98d244018d6acedcdfa2e9f499d8089e4db86ae89a6ab2d19cb705e2f048f97fb597f04106a1fa6a1416ad3d859118e079a0c319eb95686f4cbcce3b5101c7a0b010ef029c4ef6d06cdfac97efb9773891688c37cf" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"c2a566a9a1817b15c5c3b778177ac87c24e797be0a845f11c2fe399dd37732f2cb1894eb2b97b3c56e628329516f86ec":"13ce4d8dd2db9796f94156c8e8f0769b0aa1c82c1323b61536603bca37c9ee29":"413dd83fe56835abd478cb9693d67635901c40239a266462d3133b83e49c820b":"d5c4a71f9d6d95a1bedf0bd2247c277d1f84a4e57a4a8825b82a2d097de63ef1":"b3a3698d777699a0dd9fa3f0a9fa57832d3cefac5df24437c6d73a0fe41040f1729038aef1e926352ea59de120bfb7b073183a34106efed6278ff8ad844ba0448115dfddf3319a82de6bb11d80bd871a9acd35c73645e1270fb9fe4fa88ec0e465409ea0cba809fe2f45e04943a2e396bbb7dd2f4e0795303524cc9cc5ea54a1" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a33288a96f41dd54b945e060c8bd0c094f1e28267cc1dcbba52063c1a9d54c4d36918c977e1a7276a2bb475591c367b7":"6aa528c940962638dc2201738850fd1fe6f5d0eb9f687ff1af39d9c7b36830d9":"37ee633a635e43af59abdb1762c7ea45bfe060ec1d9077ecd2a43a658673f3c7":"2eb96f2e28fa9f674bb03ade703b8f791ee5356e2ee85c7ed5bda96325256c61":"db2f91932767eb846961ce5321c7003431870508e8c6f8d432ca1f9cee5cdc1aed6e0f133d317eb6990c4b3b0a360cdfb5b43a6e712bd46bca04c414868fab22c6a49c4b89c812697c3a7fbfc8ddf10c8aa5ebf13a09fd114eb2a02a07f69786f3ce7fd30231f22779bc8db103b13fa546dbc45a89a86275281172761683d384" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"5f37b6e47e1776e735adc03d4b999879477ff4a206231924033d94c0114f911b7d12d62c79c9f6234ae0314156947459":"92d4d9fab5f8bf5119f2663a9df7334f50dcde74fb9d7732f7eba56501e60d54":"c9aef0d7a9ba7345d08b6d5b5ce5645c7495b8685e6b93846ffcf470f5abd40d":"50d9d1f5074f7d9f1a24a9c63aa47b94da5ba78db1b0f18e4d4fe45c6875813c":"20d942bbd7d98700faa37e94d53bf74f2d6bd1d8c95c0b88d842c4857797d59e7c8788aeeac29740122f208f703bf35dc32b0035db0648384feb6aa17a3274bc09b2d2b746c5a06fd82f4469fb86131a49482cb7be7d9b4b95042394cfb18b13f333ec0fe5c227bf1d8f33ecb2e42e358b6c3e034cb585331bd1d27f638029b9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"2311c5afd64c584484b2729e84db80c0b4063fe9ca7edc83350488d7e67264a06a6dfd975a0dc7b72df1f107c4b3b3a6":"2abd870ec5fe26ed14dfa57a3309f920131b70580c3639af2645cd1af93db1b1":"c6e532a3b25653b6002aed5269cc2118749306e736bde039d4d569d4f967773f":"5e7d26c4da769c373092b2b4f72b109fe34bdb7d169ea38f78ebae5df4a15759":"cacaeb1b4ac2305d8714eb50cbe1c67c5a2c0bbc7938fdfdcafef7c85fc40becbf777a4cfb6f14c6eee320943a493d2b0a744a6eb3c256ee9a3763037437df9adce3e2260f0c35e958af0edb5a81debd8bdaf2b8bb2b98b9186e5a222a21609ff58df4cbe1d4898d10d6e7c46f31f5cb1041bfd83a5fb27d5c56c961e91403fc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"362ece9d330e1172a8f9e50258476d0c79c3ee50346524ba12d970ee3a6ef8c5cf11bcb4d9d51311ceacfca8705e833f":"abb5a8edde02e526449284ecc31bc713383df3ed085f752e3b6a32f305861eed":"746302ab1f4a86b17546bea762e929360f2e95c7788a63545a264ef997c8c65e":"b907c5b2a8833a48e56e819228ce9a050b41b3309f5ca37bed720311d92b33af":"73c7131a558350590053580873ef956ff952f2aa6ff1bea452e013d1bc2afddea2311756dbe756e63ba6258480c48f3f6c1319b5f572f67ca530af09e39413d1d432bea8f89206619618cb0e7c88e9f2033639d0eb0efc20616b64f940da99b88231984c3fb23f19e890576f555fde394dbd4351f17a7ffd5c369379001bda03" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"cf614bc29946bc0095f415e8bdeda10aab05392f9cc9187a86ea6ec95ee422e177fb5ec22dc0432cc13f4693e2e3bd9a":"e4ce77914ffbc5fddf1fb51edfafdc196109139b84c741354135ec8d314c7c43":"e1e83ee1205acaf6164dc287aec08e5b32789e5be818078db39e53cad589db51":"4e20c0226d5e1e7e805679f03f72452b5bea2d0ba41e0c12329bf60eb3016dd1":"838fdf1418a746aa52ae4005d90c3fd301f648c5770ffef2a9f3912e37a93850cc4b8bfcce910aead0cb75958823b1a62e283901c5e4a3980e4ea36257458e2e4953555819b8852a26489b1d74821f80c9908469b43f124ff7ea62497c36159a47353098a1b9ec32e54800d6704371cc37f357ad74aacc203e9b6db97f94d0c4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a8da1d3e233f393fd44d204c200202f7d01896e72c5ac652940cfd15b5d4b0bd0a112b4cb0890af0a495e0f49fcf6874":"d2e32799bc822b8d033299bdf63dc35774f7649e935d25be5b10512c430d1bda":"920a82d76fcd2cd106ada64bba232b7b2344f3afe6b1d1d20ee8795144571009":"eeaac5878275372025f8231febed64db6a11273c3c00d625fc80a95f18ad7d3f":"5f6dae489b53d89027b2cc333c700f090152d77b3eaf01d47f56ce6eca9893ef877b4cb560fab0fbdb34e3d1c6cd8480b33c053d2661a10aa531df4961b97d659c7492584236582b3fe701055efa59c328194cd1e07fcffd910d9ee01b7b9e8c8fda7f7ac01a8e203b8b26eb8078a9b9a5021562c44af24089e3ef84c1d5a6bd" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a77b1ed4ecaa650374e1052c405f1d88881c25c87d13dbe1334d8c1a847fa76b05c143e2f145db216fe7be9ed23635d0":"b5c750968ff09ed251d4a1c05342ac843db5246b19045728a634fa4f6e752e54":"ff5937bcd01a363696bf8e40adc8e4ab3e56dbf7e7d09451c99e538785fe6697":"4acb34eea8266badcf8f6557a0eecf3eb4d7a295c876d6175598cb66a388efb8":"ec13eadfcc84e77d2a2efa1a2cd8b1355587cb27feb3d19d75b37f0446333ddb8236e751c63b7a6e595ec24a25051a696dbe8c062dd8896d1446db228a2f10e8094ee07e7ee648ed6bebb2f5ec5aae24c9c640665c28355cc11c116795ecc070790f7fdfc4398900311b6695d5da0175091ed1828d2731085bfb4a20bd86cce0" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"491686c781e83eb4e21d9989e8d718100b0d21a2c56295888baef1a65f219651499085296d21065feabf3106101c8d6f":"d208a72f9ae34f0817669fb04f49239dd31700f3dc9a93db8d75fb79f9b686c1":"9ffc61893a293a864008fdd56d3292600d9e2ec8a1ea8f34ac5931e968905a23":"4ff3a397dfdae0912032a302a5e7a07dceca8d9013a21545689319b7c024cd07":"3c258ebf2203fca3b322ad1b016e21c7f5c148425f81e4fb0a0e462dce9dfa569c37a006527768297a5b68461b08912642a341b88c85597e30e7561206886098c4e2d861f11513f0ffdbbc78d3a2dd60c105abbb33c5e05ae27081b690fb8b3610917aa9bf1a4ad74481b5ff8334f14e5ad6a6a1eb2259476078076fb7e3a992" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"36a5267eeeb5a1a7d46de0f8f9281f73cd9611f01198fdaa78c5315205e5a177b66b5337970df36219321badacc624eb":"c2a7b164949da102bece44a423197682ff97627d1fe9654266b8527f64e5b386":"a977e2d8637b019c74063d163bb25387dc56f4eb40e502cefc5ae6ad26a6abdc":"c5c9819557b1e7d8a86fa8c60be42993edc3ef539c13d9a51fb64b0de06e145e":"b471711a4fc7ab7247e65d2c2fe49a50169187187b7978cd2fdb0f8318be3ec55fc68ed4577ad9b42cbb57100b5d35ac86c244c4c93a5b28c1a11c2dfe905d608ec7804dec5bb15cf8d79695534d5e13a6a7e18a887ec9cf184da0cbbc6267f3a952a769403bafcdbb559401be0d8b3300ea7258b4026fc892175efd55ba1a67" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"a76b0366df89e4073a6b6b9c04da1d6817ce26f1c4825cad4097bdf4d7b9445e773d3cc3290176773847869be528d1a4":"1bfd3bcfb9287a5ad055d1b2b8615fa81c94ac24bc1c219a0f8de58789e0404a":"edd879fa56f21d93029da875b683ce50f6fdc4c0da41da051d000eed2afefefa":"f528ffd29160039260133ed9654589ce60e39e7f667c34f82cda65ddcf5fff14":"39d1ff8848e74dd2cdc6b818ad69823878062116fdf1679942f892c7e191be1c4b6ea268ecdff001b22af0d510f30c2c25b90fc34927f46e3f45d36b0e1848b3a5d54c36c7c65ee7287d325dfbb51b56a438feb6650ce13df88bf06b87ac4a35d2a199ea888629fb0d83f82f0ea160dc79ed220d8ef195b9e80c542f60c2d320" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"46571e1df43e5e141235e2a9ec85bb0faf1dc0566031e14d41a2fbd0315653ecb60ef6a3347967519aabeaf748e4e991":"759fd8593e3688b23c4a003b655311770d670789878570eb3b155a8e6c2d8c45":"033128460b449e1accb0e9c54508759ddc2538bc64b51e6277553f0c60a02723":"a5e4a717240bdeac18a0c0e231a11dc04a47d7550f342fa9a7a5ff334eb9327d":"9d222df1d530ea7f8f2297a0c79d637da570b48042ecddded75956bba0f0e70b271ffa3c9a53bada6ee1b8a4203c22bfde82a5e2eb1b150f54c6483458569422c1a34a8997d42cc09750167a78bf52a0bd158397af9f83caabe689185c099bf0a9a4853dd3cf8b8e89efebb6a27dba873e65e9927741b22968f2875789b44e01" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"d63980e63bbe4ac08d2ac5646bf085b82c75995e3fdfc23bb9cc734cd85ca7d2d33ed1dcae13fb634ba08272d6697590":"acd0da070072a5340c4f5f4395568e1a36374e074196ae87f3692ee40487e1df":"f567677b5e12e26f3544be3da9314c88fc475bf84804a89a51f12b191392c02b":"c01cc7873e93c86e2bfb8fc984cfc2eab5cc58eeef018fedb5cba5aedd386156":"b133446f633bcb40724bbf9fa187c39a44b9c094a0a0d40e98977e5466dc2c9adf62a5f4551eeb6406a14658de8a0ed7487c3bf6277e811101284a941745ce16176acc875f1435e14161772fa84609e8123c53dd03cbb868030835c0d11d8d6aa04a1b6f908248b028997737f54735ec4ed7a81fc868199ffb61a779d9340334" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-256,256+128,256,256) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA256:"3d99f9b7ac3a2fbe9cf15d960bf41f5588fc4db1e0d2a5c9c0fe9059f03593fb411f504bb63a9b3afa7ffa1357bb48be":"0bb5ebd55981a25ba69164da49fa92f2871fd3fc65eb30d0f0d0b8d798a4f8f2":"288e948a551284eb3cb23e26299955c2fb8f063c132a92683c1615ecaed80f30":"d975b22f79e34acf5db25a2a167ef60a10682dd9964e15533d75f7fa9efc5dcb":"ee8d707eea9bc7080d58768c8c64a991606bb808600cafab834db8bc884f866941b4a7eb8d0334d876c0f1151bccc7ce8970593dad0c1809075ce6dbca54c4d4667227331eeac97f83ccb76901762f153c5e8562a8ccf12c8a1f2f480ec6f1975ac097a49770219107d4edea54fb5ee23a8403874929d073d7ef0526a647011a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"a1dc2dfeda4f3a1124e0e75ebfbe5f98cac11018221dda3fdcf8f9125d68447abae5ea27166540515268a493a96b5187":"":"":"":"228293e59b1e4545a4ff9f232616fc5108a1128debd0f7c20ace837ca105cbf24c0dac1f9847dafd0d0500721ffad3c684a992d110a549a264d14a8911c50be8cd6a7e8fac783ad95b24f64fd8cc4c8b649eac2b15b363e30df79541a6b8a1caac238949b46643694c85e1d5fcbcd9aaae6260acee660b8a79bea48e079ceb6a5eaf4993a82c3f1b758d7c53e3094eeac63dc255be6dcdcc2b51e5ca45d2b20684a5a8fa5806b96f8461ebf51bc515a7dd8c5475c0e70f2fd0faf7869a99ab6c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"067fa0e25d71ea392671c24f38ef782ab3587a7b3c77ea756f7bd496b445b7a3ce6acc722768ca0e03784b2217bc60e4":"":"":"":"16eaa49510ffad8cc21ec32858640a0d6f34cb03e8649022aa5c3f566b44e8ace7c3b056cf2a44b242de09ae21dba4275418933611875841b4f0944a8272848c5dc1aad685935e12511d5ee27e9162d4bb968afab53c4b338269c1c77da9d78617911ed4390cb20e88bf30b74fda66fe05df5537a759061d3ffd9231d811e8b34213f22ab0b0ddafff7749a40243a901c310776e09d2e529806d4d6f0655178953c16707519c3c19b9aaa0d09fb676a9d23525c8bc388053bfccfbc368e3eb04" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"9f76503e84727297bc7056c7af917a1c98baa725295457db4fcf54ed09af7f15f39c46142b85a67b4b323594b7e97bde":"":"":"":"7d6a8bc5a7f057ceed6109bfac2486f80f81373b6b31d062aa1fad6d9eda5874867b9ef007ba5a92ba8f3fca624bfd9f7ee5770bbeb0391394fef783c16a7f003c06e5469bab03445bb28a2111def415d162e40472d3e5ae628c5c63170bb19f741c79a5331c883c12bca429f518bf71b14683a071b6c6e1e55d8c7a0f3942bc12a103556c49ca173e498b3b4a15027145cdaeb195bc8a7e1aa82ebdf6ecd516481a4d21f400d0d71b5894545888fee8beed80d3251647947f5abc4735b47fd0" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"e242e5b3b49d87289fe02840dc742a2a6cd9490fe2cce581833dddb1edc0d103f987f5de5c68cd345c81b032ea55f36d":"":"":"":"3a858345dfaf00defdf6c83114b760ef53b131fbf14bcc4052cd948820eee78a11cbbd8f4baa308e1d187fced74cbf019c1080d9efffd93fda07df051433876d9900c1f9ad36ea1cb04989bb0c55fd6d01e46923f3bc8887ac00ebd4710212114165355361e240b04232df55a81add3fb363f0d4c9c5e3d313bc7caac7d49dca8517cedacf571fde9686ae93d901fb9b17097a638bb9899cfab0ebc9d1f8a43c2eed7c9f326a711d0f5b9cfc5166c9b561824cbd7775ec601ca712b3ddaaa05b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"42cc17365f5ea5fd22bdc4ade715e293064d6794d82bed5b77c4c107a73de1f76d759e4b191ba01e0ed5dea788ab018d":"":"":"":"de06dee8c8fe453aa03ac2546c39f5cda12412864d52ed5cbd0d4905dd226746d50d1af9fd3e1d90de0f16295cb7f6f4d3271ef00564709df4b05eb9f8adc0f8e8522b05b9f32c37d8526813898b9f71db57fc8328e3b79144482e8aa55c83934d6e097e43ec6d0bc32edaf8c0e6ca449b2e8388b32b286e2d4f85266b0605fb99d1a647565c95ff7857bcab73662b7218719189d792514edca2b1d0cdcd9b6347e132ef4c323da24ad5afd5ed6f96d27b0f879288e962fa0baca3d5b72b5c70" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"d57024a230b825b241c206f7b55e2114461ecc9b75353f12ac1d9ad7e7871481fe401c320f74afdb07f566ea500b0628":"":"":"":"e8930bd55a0a5a6d83a9b3b2cde7085c2ae467ea4a2e65ca303697d492ca878bcb801769eb1b7ec564586ec8b36d350e192c4fbf03a98be0ddecf56d465914ba353ed7734d19a680fc4593d9234c4ac8c23b7dfa1e26b013f590cca43b9fef126121b4842496b11dea3ef5e981cb357341f03f92a546a62609236ded6f7d814456acc0596d555cbdc02cbd47dae2caa1897831ea464225922c6600a8bb92e711653067f83b21e1df054309858948c11a1399736fc8391c5b0fc35629abfa5650" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"059ded79125b2d56d9d52bcc950bf608d1a2373515dafcc81efb6588005a5722d8f5f4181f9f2a316c93fdfbadf50e75":"":"":"":"db65d2000632c3d7009c227e99c210e5897f4d7edae608a242b5a4f17708613f8c19a4dd65d6bc3ca57737c9bfdcca068288eea49440af768d1fc977c32b065bb71aa3d8c4d77c9e8e8a6166f332a247978a6c41ed253a1b68ad934a3416b40344a681de28638f00b0a0ffb75514c3f62253372f809906043de35e4805b8e962e5eb957f04212835f802b2c0b3e76c7cf239c89adf31909cd6224d542d929f9b20a10ab99a7c631e4e6188fe2ba8f552c9c88fdadb528679fe950431641b8f37" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"4630406b475b1263b6078e93e5d4282205958d94eb97d1e66b429fb69ec9fccd0dd9982c338df935e929c42fab66adaf":"":"":"":"5d80ec072f550981bcaac6787c0488cc470406249ec80f4bf11050630227f8b5ac6b3b369db237d7c24a0980dffe8d3abd9b64fd4efa492349bd4eb6902edb94553546110227d7de5a864ddae8b9fed8de9f0df9c596e39de903fda323ee6f788831452eb9e49c5eef3e058b5bf84f61f735a93e042bb9e458df6b25f42a6eb8fb03d437cfab757fab4990c721a757eaa5e9048208abbcce6e52f177b20dcf52f1fa551a92b68bcdb01680855b8f79131266378cd1f0c2a4141c9675f01d1e48" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"6ea9c6f784f12a9707ceac8a7162ee5381dc893ee139f8f4b4d93db266829db4ae92bc52ff860d8ecdc9fc16bd070130":"":"":"":"234366f1591cfe244956f9496cdf446e0d390ba64beaa066945b1b4c5337dded2619dd2bd0133a5d612bab7c251ab79e3951cb134894c422553fc8cc7b3ccb29c20adbf52dda35af779142d7efc735342db2ee067649fda25f3e8a74f8e4f6620cf5a17cb943602609cafb85bdf482873efa4c74928cc0d69444b72aa6bc72694a3a21c6a721aa4e0fccab0a98aef375a37a3e8a15dccad13b6d70b3483581004642d879804aa00cba207b51affca43490bb98f67953265574366ec3829e67aa" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"5c13056be92a7f71236fcfef460298acc8595dd474310727f5ccb9a7acb2254ac7226f86349e20e2aca737068ab0f2ce":"":"":"":"16d415eddefa4dc295a64adcbbcb8c6fe8c8f123c6b09dc08a56d723cff5978cc120fd0a68a2f4c202c220db372d3128ef52385d5786c12dfc6e60ecfc3461a09fa80453e2b1b6365eaeb4df602d192aacb25ab6b4a59689d4bf8d1c4c42a32779f62b06baca6461f154cf40901f5787c1aa2bf67cbfe7546ef5b2bdff20790d8c72d077d48c59c92d1af90a90ccfcdf643dd9d6cee0b1faf5f2f35cfd01d2077ced5e2d013ec1e09336dfab9d9e51ba9a3a2837306213bca2d79abf8dc3282c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"38f08a099fc2d405c32d1e0f867e5450d5ee0d53783c31de9ddeae46d962999da01f13a43320c715612cedb920cf12eb":"":"":"":"079ce7a5b540cae96c2883e95acde3039048a6c45a2d259cc648639e7205392d91fa3ee080e615f1e0741a0e536c9e05844651b93461bfc547fb452fec61f853e1bd6e08eabd0cf1c5f84f85eca9d42b53d1e5bae51be5fd35189e4f1c02b843c6361fccf4ca6648bf30a23ccb8ebc16fcf158746eb39cd96f19d46707c001e11c4e0e8ccbc89fec66c69fc92843b6bb2ee1cc7595b65ba89ccaccd6130a8417faf705e8e203e90ee64ae970c409389b5cd0ca80a4e40b642689741691b20621" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"0863c868c32442a1a64095a71ab6ae2f9e61c119b58dfa4f34efd26593bbbf68bc407904c43300452dd4e61df47fa98f":"":"":"":"585334828cf531828fc7127fee0c926f85b8e71e8522ea921296dc62b83a09a00397cd45e0664d0f26fa24edd3e3d8ecef8fdd77ab22431d4066f0efaf3882c97f179a7060efe9e8cba5d8145bebd502c0e09ee791231d539983c08860d7783edb58440d193ed82bc77c27723381a0da45bb1fc2a609f8b73b90446e39869a5af5038aff603b44db9771113927a5297fdc3450eaa228e313afe43c31b0a95b476c5ca312b4f589f809749481722cea9990c02b647976aa6c6f02ce1e5e6ea6df" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"a41ad223e41e2bb9c131ec945ca310600ab00c51f6e4fcddd803bd9ab9be8af5483373838894d32745a81ba9d6967751":"":"":"":"95ca31a7eeebdd2348cf1d43411d2c35faffdbcaed4052d50cf92f0e9d2e757686b72d631a56ca98b68215e7014cfed943abc1e13441c1d660f13adf2188d0975154e1b42a592a62a43b57f82cc21a428873a92fda83abe420efb5233140e4d6c7852cf81e85961fa5c606c5f33e06077f414b0f814cbbe50cc606bffbd474364e608825fdaaf5e74d862795539be8697e2ce05d71446881e3f65bb54ed95e941586988f6e0c34e1beef426696e9dbd9a214013d826a8c99a2a686d8402c583f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"62a26c1327c0ebf8b40691fb4c8f812e81f5474b0c7db70aa9424110fee3a05e41c0cf2e87210e34d0c6bffc269bf2ba":"":"":"":"6e20a00df1af37e6cc55e580ba21335111eb375395343618df7d630b9dc234496e3964cd45c5de34bda46a28964f6148704c30925feeaecae0574038434cd33c1dd943207a8dbdcd72dc9ecb76a25728b3c2a8ac13c1de3a126d7d43a46e12e0d0ca8991469e582b78ef6aa691b5a0e3e85cba7d7aea3c1e8e031674e85f5af36546eb2a0a28d4ffbaa316a9a6c944fce291cc0c235e8499882eb62b22b548ae07cf9430329e009f4443cb94f7a14e8661166b0d681dcec867205abed48145e9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"fd54cf77ed35022a3fd0dec88e58a207c8c069250066481388f12841d38ad98591f9c02a1d205cdbcdf4d93054fde5f5":"":"":"":"f6d5bf594f44a1c7c9954ae498fe993f67f4e67ef4e349509719b7fd597311f2c123889203d90f147a242cfa863c691dc74cfe7027de25860c67d8ecd06bcd22dfec34f6b6c838e5aab34d89624378fb5598b9f30add2e10bdc439dcb1535878cec90a7cf7251675ccfb9ee37932b1a07cd9b523c07eff45a5e14d888be830c5ab06dcd5032278bf9627ff20dbec322e84038bac3b46229425e954283c4e061383ffe9b0558c59b1ece2a167a4ee27dd59afeeb16b38fbdb3c415f34b1c83a75" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"5e919d353357671566d2c6ab6e1acd46f47d0c878fe36114d7fea9fecb88a3a27efca9e3d1e1b09d7f16832f3af75141":"":"442f17cb3cb1482a19729bfd58f46f6ef16285554892c01b0718968d6e011082":"f9557c93eb841bfd7b5d4b71da928efcbe3f55e1870493ef90d16eb238380d65":"36902134f1989cfe7eb518a56c06aada98997d9bacd04aee21f879a57b515ca3b5e0c2d5fed05ca1a8b054e8c46b389d9d9186feb0abe8e2e60b3a267281cc5b4b7341116ced35a0e07bc2b0330bbfd8b07f07248fa6d8fc5c9df13445324162bdfa22a91ba71453ab123c92f91c70b8bd540b3b180b11ab45ae2c59e57c7c43dab7576594959a96eb502d182267c86576b1846ccee1a694cabdfb42e0c8214192efb502926fa3c27eed020b7cc8866a5af9d838a57e78bf7acd230e1f4d8361" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"7a5d1efc9b7043060cabd67de7fe22740bcd6a8ceb355d69f118829a2b3c92006a5633e613f8769c1114b1822ffb5408":"":"f2ad962d992434468681c644587639901ff74e2bbdd8761961ec34edc4a0c36d":"75aae0d1bca9484c89fc4de3d1b34275ef0656775f3f8c96f2bbc50401aaa718":"5ca21af4b399db38f8b74a406aace69f994691f2765bb9c47b240000152739e059b163cd007de5f28bba17e485fcf9ff6f41f76e93998510e302282cbdbde09fe8b1a96187e57c9a3df94e2e748f20026476ca682dfa890b478f7a21f4927f74f99aedd9ae782ba10fcda1dc34c31b4f784722e01cc4679737276f56df23c5bd8c6985797b83c0ccde2b4c7a65c652745de7fc8a235ad7ed0f456f1e7568b2dad475f0bc46f02a7f35c05cfef9d0e2c773ff895e291a2cfc2424b106096d8864" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"611586ee40cb3ca4a9238ce112a237449bba5422ac9b18ea53480875334d8fa026da9d96c4e87f94b2f9a7c261be3edb":"":"2f835c336a3aa0019b0bf940c24643bc8fca58c9cfa6509aa9241de9e0e1a046":"1911a59c5f2568860ae71e803688889dc44d14ffb0d93e324c39f32d95c1c3ea":"27bf42f50476d8a2cc23f455e9ef477cb8e9c90f2e97c8a483093ebf55b2aee02e0356cff919e2ec9811b42c73498a6c2b96aa5b761ef7e715cbf66ad2e3ff8a6c92419dbf2e653ce70a87b51e26d9f607eb25b45b91f947d0026a38977143c8bbd94076e663b9cee35505b48e453e7cca83e540975ae8a53f26390aa63aaf1e2669410cc83427eea09428776a2d520eebd170602c52dd491c98042018a0372a0b39cb565cbe5e474f927f91515a6a7444fdbe1d89d8ae2c2482a0deb8ff236d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"85b1e5da599efd4a20ffcefd4737fa3ea1d2b14be33861c2a4ac3ac2a49d3947b14cf18f4ff426cb6345f1a7653e9630":"":"cf5bbf98d8577077b0b84475dee0f0e9aa95eedd1d916507b5233b688bcc856c":"b333ec111e1e7d78c9ac916e420704832539d2db46aca3bdc4732e8ce72b5e80":"4773d32a9fba37acc6900f3ac70f6978ff1e40039d6e3286c264fb7fc59f1bfe0188c7979380c8922bdd0e363c8e09a49faef59ea85a9f0e400b94c74a8a50687e4e51e25266eabb86276f22628d0d2e19c5696cd221a9b80f94045d001ca4c20dc916ca0ff22c93a41fc822912dd7e247927fd45982e94d3d1fde77cbe78beecba830b753079326ae33274f13fb7cd875e85fb5e9e703e61cbd41bc4ad47d7b4d14afc873a39dd810ad8eed95adff8dce3adb7659b7c1d4e3f62403767940b4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"50f986f6efb413fba3e8e0beb84d4948c2db0661ab8e064d9fee8b3c2f0a910fc35d37512f88bdfcfde797a21a006e01":"":"37c7b08222ba63f2136bb28f5ec09b9a899b56371615be41bef49a0b640590e4":"4a1e34a5d60ca08e3e6c0f1b86547ba2d12fa293275e7d75f83a0b846daa48df":"e27738c6fae66125fcaf4e725a0881d5a450fb5b02a55057d6cb7babd91d502c4f4a8431a83352f47ea8e5fd7e815f5080d144318a1dcbc755e0b935785cd5397955da22e3ff633b34a64ac72b2e6b7c51e78ff553731e6e8da911d147a6e05b36b74898cac6d3171bc8650e445ffd19ede2aa8218be17671321c186465d852dd80d73290546b88ef7a978b41c4c549e9c7fc6ef86e47084778fb5aed5d41e794ee0e700b77c0314a307b10df69daba605f3fdbe2dec708ba0b20d6b650befbd" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"641dbcbf99b61437c2bf65a13dc3e0324eb940335da123870d9429636dfc82979d0cc913c73e8a6321fc3eb9e973c0aa":"":"72580c11a87ce6b4207908aaf5bcaaa1bd217fce3e8bc0726568c64639b70767":"cf9f4527e074b72be735558dcaa1fc82f26ae286bf944b49649f769bf6faf49f":"345395723d048c2270c0eac990498689bcb862a4996e82995b4e7169e671eb03bb2242c4669c874c1aeaffec58aa653c7d7431abd1650f0cbce8cf5db8316693f3ed501fd9b48c1a44b34f7878aa386d65afc31f94f908a322b03d06c2a1074a03bd2b579cafb0f7cee6d6934588ae1ce9e4ed37b03737c553ca19af4b46b5e43767cee2e459ab91407df6cfd13a6f186abdb148b85a5f49bf92ac6674fb055c7fe123e9355a0d33de281c03a56f91891dd496dabfd6eaa6fff6c9cfb4e67c44" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"b9c305ada943a64a2b00494e869f9a640173eb1c2518dd9be93abc3c93c7e6b5bd0627a199d15f77b188824df00d5997":"":"ffc6760f9af02d35666275c074eda03f53dbcb5690580bb25768a6566b328dfb":"f26f436a820ef71597b75134b8d9dca6e9a6afd9b429222a4c9c878f3b92716e":"e5413a234859511cd837312bb31aac4d31962c5f7f27aec47417f367ca99b8400a4287e60412fc356cb40d96ddf5cb801285ebca42b2f6fe4a711451c1574174c58dccb2cd3342b7092a196ac7d2881a08e7f5de939ccc8f4eedc8f867c81aa88655d96ae50f618279d5009ba2ac4b1df4e63030cc0ec3541b6a94bd9a2ae5d1fcf4d847114a783c997a7c6b9d549010bf7b649abef692cdea3aa8ada14574e0f78b7fcbe17b587ac14980e40264d6de030e429586593d5ce3ae571f95454dcf" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"9875dbf59b760eab9998bf3341847910526d10071dc179f96081dd793a6001936881e7f39075cd382293a1aaa8c845d2":"":"1196583a99afe1d377b344585c8252a0690704b8f7a2b7582387ec91a60fd7e4":"20147a88e0f9f1e8caa8cb14488c9b5c38e5520a36ae913b4703d15af27218dd":"c808f6f296683d26208359a766fe61bc70ee8b6ed9ffb94ce269578fb5568fe2358d603638324b63b29bb36ae71a542e38ee69a2b93ad7e4a887a27a2852cdcd541a5fa6d0c8b087aa1185bd5788256e7d95c2aa2d5c11407b7bf762f416b01d8e747c45298f875200a2e67679d6d5ff7a7c0e50a010690b1920df1baf0afcfaee7ab0862004e23b5aa1ff47b8273d503bd74a54e7b39ac7e6d6fb0a594d30531cab8a67b22783470a65f24faba1c231b3ba45efae9f0be04e2338529cfec008" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"ac92a6c791aba0406d6ea8255c3c0901eb711a424501c2c2c847076d78bdcfc3266b7c3bc578c7501daac6dda8366d4f":"":"13379a77d84a0c4cec95e62ac4c8a98ceede0d89b8bd317352a95300963415ed":"04d47ec89a3e1b7f22580167331225a00ff258da72446241a6c09c517ee4d48c":"c2e6528584c6dbec436ffec4075fd3aebe953fdc0b46b4b225a3c2886e60d21879e6ccce3746d881f6d80e33876afad439ab9f68fcc458492de12811fbd57ac49d868754da19279b4c0a38979201a588884def5677392dec97cafc94bccf8914d9f78575711bb6f2adf4116db91c8b54e36e9ac2f5e01caebd300acd7bd45eada69d20f1b4139013a8a614069315a1c99137a6f23e38f91c210e0c156c6fb498056e823dc41a05348ab43c2f6f4ce188d4e05a13d38f8025731ac1670949a040" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"63954ac7a0f989a458d2b4a6b7013dd66683624584b545060bd03a57b92822ef422764bbbc35fa5d40d34145afe44bec":"":"7b25d875dfb03333cc27b9d4286d00a85ea5921f4b8a4717b957349eb3509053":"8b70d28c5c80086c0cbbd01337ad45297af271d4bafc764b0fc5705700cd419d":"297752e61c4ebc4e1c68391335e2cdb49b0f19dafe359e451f8158fb7958d32a98455a852002d8f05169f438816ae6fccba1eae4d1fdd7a1176b04831d7ce892f711ec825062ea1c6b12144bbd3a0aca7f92520ebb87ac6045d2ac3a4a74fa559926f0daceb59d44fdb39f5fc3b877f34241531e863c153286f3f1b2ba2db4e2c8e2344be40c2a7a8cd01daf168696ce19f83ddb64d50e2313e78c5dfcf077f25e5b4d6f687279119ce856d4131a63ad133cedd020881939bf70f82eabfe46db" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"d0944e0a3f3604a588271c8eb65913ad9b07ee2b29620f8106ca70ec10aeb896bc9b2b519c77fec5fc419e953ceb0be5":"":"d58593f2488f0a292ab552dac006c94b20ff500dd57af32be808921a5ee251c1":"ea9e579c9dca67f07ffd67d2483ec1fac3d2ec22fefff73c7ac9f125888d7a4b":"ae736da6632a7d8bdcc9e279cb7d3f9101a8f7dddeff253277d1d99b45c76a1a5c193334e912c3dfdff1bc389b209c3b29359a4ca53765a1e40cb900c6055d8a285cf63ebec79b46019efe95d5199f215f11961f3319d225bf3d60734fbfbf3593ab105cec2a17e308af469b3220ef7f055675396d289e6f4f8009881c8a2b4e9de88d53ad13e8bed8b38be6d8988f615b4590fde3d91caf50a86eac3fbf29924743145803978d261132b5975a9f108499250314e098e57c56e2f9327307cff8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"1ef53464bc7a441227a27ea7b5c558dbb3f509aaf880213cdef7e8f6a1d287c173cd5b3148d46c48c83c5cad3ccc1f50":"":"b052a66992fd8a8cb02c593edfe4766fcbcd3505af29d698e1f4db398acf717d":"37333448311c2c6edee19aadb8f1036cb60cff2a945c1a0ea087713bff31e915":"4ea7054659cae1cc178ef431aebb64c2c8dda3a965ea940a84c00d9790e2e3a33521395cc4d49038994aa4c7dcaf0b52b44375d93b625ac2281991a85a5acebf3de552355e17b3528faf39d392fed981400f28540f5ca64a4d2eeb952c88856c8f7388a49611810941b46b1000ee4a8aaaadcd39944c4abca9110fd6580093f9303f86a6e129d56b5aeff5422c2261af33523cc6a174e0782e13a026c003c17430b8371bbfc3d51c3e06fbdc30769a278b109238bbe383cd5523053fe589b72e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"14148d69d583d4c1758c307e0eb0b762511165823fc54096f9da5513e87df53b96a7be8d31b8a38f24a82d846b0e13ef":"":"e05f81f6402c52dff5c221a2f191155bb56abe160ce7dc8a6bedfa029195a612":"214777e3faee7d953b5c796675e106d50cdc12836b3114d14447ae91cea3c1db":"eb0497b32af8a91ed3959c31b079b8cc5c39db3100913332fffbb6b1d5ebbcdc97d6e67c934f3336197c9b730d80995a7d7445e36cf3047cab22895f244cac803eabd001eb1ff5d5645a803c41ea6dde6c972b47de0372ce901667d03e2e02aa0a5aea809e0bdc7430440365908418ce6066c24191ace05d6a797ef9b94409989cacbb9d9ec31f3cf0112b72e1420b47e0c184a8aacc214d55a0d5e0869d09303e4014de0430c07380006ea75984e6c32b06067d7d7b931e2b74666b4b569f71" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"27d47020acc3a80a55149fa0ef43f684843ba89fda4bff1c29d20baa2b21956780569b7fa0c4078d9ff71a3790f1be3f":"":"c03ea0b88e2f9b53f902b22746bf4dde09439c190a7a638e3cb990d86739dbed":"3ef05e71487cdbc209b5ab6e808e55f0a93bcc02df766b01c1c1ae5875b1023e":"3ee49e2a58d800d922cfb66284da84bbb5944c85f194d95f1156b673392132a430e47ae74f1ed7c1d0e632d8cb604c88777437d8f37e7d0428b834555a96800540bf5bce6f430328fd328baf4b22b7f8e663c1d8583bc0119248588840510e11203cf47dfc4f6cdf8344170a341fbb7d93999ba86be3fb94d9c03922fd3d75e3fd5b42365aa62606e352676b2a0c51fb030d8d5605e8ac6bac2b4f8417d8e060148e3d4ba67b31e5e704d866bc87741ba877d12b10e8a9b37f3feca908fe1fc4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,0,256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"88b6550d49182ca7321d8015f780121223a93343dabaf21978ee2818e7bce6591d32b48eb4642069adcaa5986224e6d3":"":"809639f48ebf6756a530e1b6aad2036082b07b13ed3c13e80dc2b6ea56e70a04":"3395902e0004e584123bb6926f89954a5d03cc13c3c3e3b70fd0cbe975c339a7":"4a5a29bf725c8240ae6558641a6b8f2e584db031ef158124c4d1041fe56988fdaee91ca13925fee6d5e5748b26cc0275d45ef35abb56ad12e65aa6fe1d28a198f5aa7938fca4794c1a35f9a60a37c7360baf860efd20398c72a36b3c4805c67a185e2f099f034b80d04008c54d6a6e7ec727b1cace12e0119c171a02515ab18ea3d0a3463622dd88027b40567be96e5c301469b47d83f5a2056d1dc9341e0de101d6d5f1b78c61cc4a6bfd6f9184ebde7a97ccf53d393f26fd2afcae5ebedb7e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"2cd968bacda2bc314d2fb41fe43354fb761134eb19eec60431e2f36755b85126e3dedf2af9382a1e652143e952212d39":"59fa8235108821accbd3c14eaf76856d6a07f43383db4cc6038040b18810d53c":"":"":"06051ce6b2f1c34378e08caf8fe836201ff7ec2db8fc5a2519add2524d90470194b247af3a34a673298e57070b256f59fd098632768e2d55137d6c17b1a53fe45d6ed0e31d49e64820db145014e2f038b69b7220e042a8efc98985706ab9635451230a128aee801d4e3718ff59511c3f3ff1b20f109774a8ddc1fadf41afcc13d40096d997948857a894d0ef8b3235c3213ba85c50c2f3d61b0d104eccfcf36c35fe5e49e7602cb1533de12f0bec613a0ed9633821957e5b7cb32f60b7c02fa4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"023f5673dac29f62245510d0a866629c43c64bf35a0bad30f1270050876cfb1ce80b615a5a47ecb51217a46079e11fd3":"a6f797b155d6da01f5d155cb7291442e1b82d4190e93e279fe5b4aaa7d04ecc0":"":"":"507b824443af5db28f746229e03ab00c73cc3ee4956aa14b33eda00dd2b9b645c132dab7dcdbc659c8ba0e1a3575fe7dbc7cf9691f9b714acb1b33bef96943003c992f661e04fe9e8b9f648f4af9a58a45b08b8fa7fa3704e6bdc289abbe14a8c7e1747a52ac916c31ed079de0b900672e658a201279824d0d75ae35dbdd43aeab915653765d83e46f347fcb4fe3321fc28abd2d0d26a662661582ce21b6dc4ea6d1b236e9692a83c8ba0fb299157b80623ad4f448d25d57f537b10e5e30f80b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"96b5bc16ce0d101b90d54da6c4b3d85a70ee19d54cf4cde3d048afb5f758a6b52ea2c10c16feb71cedfab9bfa9e462f8":"2ff415e2432d2e6c4279910a5e56c0f5354a5af0099132d891943b4a8901ca6c":"":"":"ecebe717afe6dc08dbff3ed626bb06de0f9784283b70e378dec19d4fbb50e61b7be48ceb69851b2bb94641aec5027d53d314a96500a9bbb38a87c9aa42ebeb96a23cf29a0fbd5e48b399daa1b24dbdc85223f24b7d77332bb1a137ec709d27c008c709696cbe44bb2fc19fb10a2fad4ffd8a9d89492a939f2268d1557f44b6a64e2a57887830fd8bca1b6306aaedbd7f3f476b827995a1ed121388497edc7e639c87d092f6591a45b5647c6c091c15ed39f594b7fc4ae92331f96dd8e17be970" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"364a833a283a3e0b8a5b681daa50df96d806d4b54828f2b016de5d88597e6287d98cba8fda464d21aa1cfb7b26b9b226":"35b0e7534014dc2d7eb0f20ff78a69d5548d0a64122d4936a6ed177fb3ec66a6":"":"":"df4c799cae37173a81c545d019ffa336ef2c039a5865af425e5b60bc3d7202f4bc1aac5a84022bf4088061abd5c39d0fb047ba80163eb5dc8b9dd515948f16915832c6f76b45acc25b9c01e7f70955c0eb51bf50f00b24bb8e7ff53bd7c051b53d8b1a837a17a00355d7eb21e43b2b5b249dadced37d06e7047c2fd12012705a59d051afd26245ce3a59acb4b996b718c7dc1ae964bf12b1db02fd6c06ac2fec6ee5deb02c2c830110e9bbbd3c778a136b646ce2a0738563555a89409c56b81e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"bb4d38c775acdeed663256abb747ec25182bc16efd0de02cb4b05e4ad4749c92be6f1e856e423a8f3bfb0c0f27ad8210":"21591e796b7e68e7913fefbef4872af9c062f21c8023c0dbf47e040c3aed3733":"":"":"12575776e1b9f54b0fbc39e85a77b6912160bace4f1e9f049e3a1c5bcb452cf9be42ea10c028c3cc249401ac236dd3baa53ff327735435f4869d3289bc9465ccf15f826e4e4fff099986bdde0d09bd12e3caddcf452eed6ca1206ae4561b84770a9cc6e962567304ef79d8d3608529a3b5e4067fa83c8c35a06f1855da5f5ea7eb106e4c60181d12ba00cfbf7eac60bda00571d95c45c9d75c43b42e27a238aa5e0f02bbd96cde59a2e572934a99d05c399ffdf15c65f173748734c51999a29e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"f9d041d24158f480600c3747cbfd868c3f7e9ac7f74b3760eae5320839e4f5130f8477d88b1d914c0d8b375d089a4c83":"b148049f4093f0032c7f105dae219aa9e3f70487ce3a6b6ecd99429f66be5406":"":"":"84c58bf473061da92fa8d56aab3a75598428f18dca504191a51746eb5fcad8f784eafac5ea81d636d579e330baf7db95c8d706432e9f585e84da090c0eb40dcd819bf10e0d5b8600150d186f732af50b431c596c920eca742e6555129fdf5df96b44005083d7a33087b150d63529bee4b6e1ed4189ae2d93cee8dc671d47c0e74ba04218dfe273484a4bb59a57743ea56843d516ff2c72ef9841996d31b0d6c5beef367a6b44cc84cf4d403a06b40406e4c9f47da401e3cf31412694e6164dcb" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"c18f511ffc3479a59357c17c2fb3d1e0e6f0edda4c8b567f2413323c2037f2fd140fb0cf33eb59526d8c0dbd216939b5":"7387aa3b0b3d92afb29761d3d5ea16e32a68297b9ea6751e1d54c8612f6351c1":"":"":"949bf03868563c7d1498c69c327686682656374b2efdef6342e69a388229c580ca2217a9332d3ae77c2d1223f5dedf4b34ec50b79d5baa7283168ed7cbe71c6c3c9193bbe01b76e011c39d2d462017c2c74b7e698fa2140e16886a9ec0fc6c36decbae37537638ccf17777f1cfa49d2c2c7ba3aadd0a1565d61942de94aa6fa16ecafc2dafabc9082f23e75a0e2f8f79d1c0a15ce57fef7655f1a4fc6fc4d4a694bf6ca9e333959f35ad354524f614905c6a52ef8f524cdf01c5fadadf207772" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"6b09295110384eb56726f61474bdc532fdace31ceadb5fc23d587356cfac74338ab6f9d89394b907edb646650865a3fc":"7cafcb4db31ab411c396015b8bbbc990607e08bd1cef3337dfa0e295ae024f9e":"":"":"e51bc5b3a6bb2a2667f5d62c2ff9902dd07b566870b4c14242627da7581449ec985739cdc2bb5ef036033fa798112ce20df06d46d61aad7121b8282fe7556bdd363cdabbf47184e55edd85ee0b7b0be17b9a7f822f4d8906465b525c16385d0899b6c27728ff2a600870aef65f58f9d3777e8987d86e59fdb69cd232e7289fc75cf2174304137f988a17b60c57af84cd8e556aaad458f511fc0b3009516435c0c60098f35fb6a4a90d90bc6071d38000703ef57cbc19d6b78a0f797f3ba044c9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"ec6d0f68240f5c47e822d9088364c6cd03ca53808162b4f06f5956da65290946f4d26653d079e50604f836c1d798243d":"b40b5737cc76c5f6d1df0f13bfbac7e26f92aa933125705b6197d9bedb11f2e1":"":"":"207833cf65599e1406ddaf3452f060c872099cbf7483f1f7f14033490f7258ca5fd7f5339f914498b6e61fa426cb872c880a9fda9b8ba590cd8006b990af7ad412f60c8b2ad969c2f9cb0e9d005943d4dd2dd7af9699046ce89d6405597716d43b9ad54641c2278b04b2bcc5b8ecbcd5e2044e4e6ec5a628605fcbd67249e813bb769d7df01b60404d030e69e9672b4fdeddf82a22042b83ca036578b69f9a0ad9702bcf95fe846705b49b0a0795dfbc4f671e0158ded6242bd8f8fbc2410c46" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"df59ac224e4ba1b6dff348f17bcf9c5a94a3235a54f2799a6cae29d8654b79d18b09b444a28a7d537e1a2bc89e95abd8":"14a0a91e0cfd63ef5fcbe2e8c7a44bcf5769c9f95b6c50bbe9d3b48b82a09053":"":"":"656438e7738d441b9ac116361e9f26adc0e303da7889cf559841b3e44127318edd356051bd0b3ecea78feb2b928227921a0c183c9f56bfd11ef31b28da6c78f3891d8ae1804bc158fa56e8b7a1a46be4954de493ef65a7f9beb46949a323a04e944034db30b19cebd8b70bfc155882ddfaca1bd5acb981c2c1b3e0862c6234d13093ddbcdff15129d586fc24ea2fd20946fe45b467bbbc77a6b6973eb6ea02994607c657eec29e4c4b3915cb730db056babf1779127047b401e25f97f606063b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"8da1ad6810c1d6b7ead210e48f51c370d4520547a330a4d591e61a9847aa043463f69d1b237999fda9b5697f1e7aaa07":"291c536dac72409e31e71cafb1b5f55c14421b2c7a44d792cfdc663dc8f62692":"":"":"c2bff571554c26bbd4442fbb3b0f8eb4db09840337658a7425613e0fd4f96e60da39b250c3a77379a53325a56ec02248c4d67fb9154e3b0eb8972a3109aed531eccc027705b267d2b9c037da79860d76e5e980b5b30b7ea588fa221d24d973f6d4c625de65123e91613a1528cdee59993aa827f319a759412f20aad6c50fa79a3debeb346ad92809470daf228cf344e09f03c839a28d580a2b3d7050685ef51e95649aba7228a2f0c82a2dfd89cae6ce549e8b27fd46f02feb473645765018ef" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"5e8d6571f514519de6c4c0a7cc5b85df616735b8dd09c3bed2377499aaabb296a9b2c94642da10e8fa737cdfb3129334":"6ae29c71b76fc48f14a3d731a0f6f276f73e7672eff631dbb1d22b06463bb236":"":"":"5cadc1264314fb4bc7ed7fa74bfa16aefa624bf2fd60c992d0cba10429c56e0028ebb430b1a1c6662a9b3c7f6de244ca000ae63db9570f1aa3e7ffb1e97a9d848021d8e632fedc037712a29abec4063b9d57c60738f0af0b1aab3844b03f7aacc65d38bec91a11b7c3bf8d970f01e00fed9dbbe9e2e499a21c72a7c5a22864125133ecb073a4c9f6d9fd46024f5c1ee7fa447209afa6ccef1f97ae77ca67fca5959dde209d2597f87af6e154408579cec42c69fa9b7cc075ee3e37ee3d91ad9f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"5c9481b2642855fac8931eccd1bd6c5a05b560a55f96d37e865f057a95812d81fe65c84c96a990eb7a302b58de723cb4":"b6a61b9a31207363d62c0b88f1632290f4f18feb41a6dedb85b7450ff9157016":"":"":"9cc77b68e1ac23fdd2e2a6ff697053f816bb48b39b1162f7aa3fdd2dd1867f68b13980c9e5989d4631b7983248501731326bd7bf6e967b3dee7d2d5625d3cc2e198623af9f77f86103491ebb4aefda5c333b51557b8f643e6d6c593fd7e27e4bccca13140f6129cbd024de076e4688567fd7e41dc7b2bd0bd9b3e966d5d3c461502221b52b001a4d2102894da04172efb900171a0eabab1fd134217580cfc33a0a94edc0bc132af91d048c6f5ea4e34ebc9686a99f81d19118ba4da63ae3df7a" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"c43f883d0adc2b56984d4a497a8ad76813a01df5a0ba22b53144763b65c7bf3f6f722e4ceac59966a6e44ed898e6109b":"769bace2c263edb87101743673724ef67a935e1ae9cace87202b6015d20fd9ca":"":"":"ce61480953190453247d091838dd80117f7f85a7e9a1237c92edf10cfa26b423735788b1e89f33625480d9faae57112ee62c8e4840475a6a738018ad3fd4a77efdd8f15ffb621c429419b6adb20431fd35f9d62fb33d500b87beac4856aa4971eb89710576b609ecfe758f3682dd316e7ee9d6560b444c2446656c8941dca7d6eaa70fdf8a70f18386ee5d4c86738bc261c0e8e5f509dabffd0425a86858ea3c71de5be98570dabd80a37b4f7f954002727c0b712e58693603c23130a45e98df" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"d083f7f8c65374627ddb51582b3a39e2bf074508d5f28ecce25787f386058de8afafaf2ad7e6449308e176be01edbc59":"ddb4ced192f52bdfa17aa82391f57142ac50e77f428fa191e298c23899611aad":"":"":"b978826b890ce8a264bf1ad1c486aaf5a80aa407428c0201dd047fa1b26e9ea9ff25a9149215b04c2f32b65e007e0059a8efe11481926925061c748678835c0066f596352123f0b883e0c6ab027da2486244da5e6033953af9e41eec02f15bebdb4e1215d964905e67c9e3945ec8177b8c4869efc70a165719b8e1f153c41744d44d3c56a15822d522e69bd277c0c0435fa93e5e1bc49bc9d02aee058a01a04580a6cad821e9f85cf764fc70dfae494cbfa924eab0eff7842e3541bc29156f6b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"c2feb900032f2cca98d3f60536f563d8ac9af5fb2e90dba36c371c0a1c58cf5e4a60f2be0fa13b8266b715be8aad128c":"8e6f9be0c692648072d19c750804b10e2ec313c8013abd363de7a467787859f2":"72f54ba3f8e71ad69a040bb8493283acfc8815f17dbcea220ecd68372a2dffae":"adce8157ef60482841dd2ac5ac512bf7649120c1dba81ea75f2a70b7512bb6f3":"e76e4326ac69ddbc6b2408c529b05a96425c65cc65671601191238e9434d2a0147f3a25ce9b6818774f5263c92459bca421d2b492f9a9c2971359baaa1426d6e2c36d8924f39d02ee2fb5502c4e0b206dbe9aeeacd508abe6c055d547b5f9f35de4fdc9c05a2c63ad699a3a7e265598b8f40a8a295d7376b88c49af9edc790b8a5ee221e19877616678e2a5135d7b3756109200439d9ec8bfe0cc5f3c334ca9c022ab9192d5d554dc7ae76af1dc06d814427f46a7cfa2dcc62f4777d07ebde7d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"ad500edbe28b9a4338b55451b81c652797eb48fba753c186ce0aa9ad02a84ea2c995b7ade6de0fb4ec97bcbd61b711d5":"5770c41832a4cdc4039a8c332a4b45e7a7b2dabb678ccd2e56452aabeab14925":"d8d5516d158b41cb9d66566b88064900af78183f765f2f72a19548fb797377b2":"60a3a01a72e6b3f33a0c236db08237e7d656bdf4bab1db57ae23b7305569dea5":"c5ac3df66bc664e8bf84c758c7926992f0e8a03cd3f3f5fb8277c85b4da526601e8131f9d205f35594e101a86fb83ccf4c1e98c8e609062256701ff2132e337cb7287f0ee2e8fe3ef11ae703d7efe52e63cf89119ced05950c55aae6c822b6b0a8e1b91b537e5bb2de165a4b5b43a1c41fbfd65fff9bc5329d303caca84f5d1fc6acacee622623ed5dde36aeda0816749557c924d6ed26cd80e456fd0ae2146477ccb63a203fe16ac1d0eb2d12b6a2cabb21d412422e95f2df8ccdc23b4ef0dc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"51a29bac53961792077e88ed3603d33bd1f51b3fdb2b5cd1ea131c6f643af65de81eb2e260396d2a69b4184c4eb98a15":"72e5285b92c4ea4458e8a2159687cd46e7df9c1f4513d8b72cc88be41c2e1522":"16a69f7aee34c567595f3d362ccbdbb7b9e9372c4b1729fbb80d9a089eee31a4":"825197262a43f6523182f0a91005d70b17d81c2bb692edfd02ab988130c7d5b9":"f63f531c242a295d7796c3b4844fc74821af5a53e0e7ae822cd8a7f9de91e6164164f3448fd7d18feafb97c9500e0625d501dcb3927e6fb39ef65dd9586d157076436452bd3066cb30d1f47dc0a3ffa5f2e9ab4e183018b40a82b39b0d170aa21b05600eefea906838b95456e04cf046808030a56951d2502c5eb6271228905ed08549bb171d6c0408d88250785f42e349ce1d9e74a6cd0360a008ec804e7ecdcb4d1fe24aa5a18cbb65f4de1619a29c6062b409a386ea6f43e60adb9ea3dd28" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"b30ff9c6e5b6bd258f1cea0fd5ef9adb81fbec233ff2fab01e79b7422878b2e950604e10ab80ddceb9d2b968d0d37ba9":"e8acd4b380aace0b27572057eaa947e10e6b49516140139c74a1d4f472221dac":"1d2ded0003521e2ba6a4a3e732e0949c1d858fdf0925fedd9cfd7f603e0e692a":"688ac5e7b4400d962c106fd2ce712a1cda6a0b8ac5196ad727f9b882329a3d5a":"c5208fec1d67517311a42bec07782ceb247e9c818e4f5f3bd160c9e53d462b61884feb278cdc8f64e22f59d27dfa98d3a90da8c7c5ba28ca40bd0d18934595a376553d1a8a19de07a83e2e9db42748c982cbcbf4a975c20084ea9cc6c6a41b571faf66b364e4b7e4d32efc80c30b219da1c02a1ea02f6922adbc31a057f999605a2d827f10907835c2bdde4157d7bf2906a0ad27bb72f113c6ec4f23631a2b8517bbce91b560d90d73fbf0699bab21da23e27cfec513bb5e375f50108197d664" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"56715dcbaa4f5bdbd157bdd950d1c1b46c1f4f8d7818ab321d72c0ff3c0a928064b0439f7bf021dcdc7febf2126e5432":"cd5547991b525f7795e075a59af1701375175bd760db99d316b91463f87f7f3c":"b2e4f02f1c14866f538eddab402356ff3b405abbb9154e88b98483a83be70f7c":"b8db321ab30285eee7f9e377ad62def6caada447d00a4ec882081daafe2ec009":"7ed8c2be58e3553eb65508377d63d7f24518d1a7235dd4c740bd987dd8bc1c1e3ca97a69a37dc9a270ad88989e4868e6cf8e4cf01703c0b1eb6aed8c3f8af431d819e68b6947ae134d360d87e33668cdef0e45e11f5cd79329ff95ed00e4a6952750f1574f489394b5fde3c6f07311a1e5d9c4e070a0943ef9d4a130a9e4b0a80c256e96ca5042961766874898ea0f772b78d1a33e866351a4eb425b822b5ad596cf249bce8ccd6dafb334b71a503fce2c8fa3fbac9943910ce5ff02ebbedde8" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"1c60a31760019e6a571e2987e57e19adbc1accf3edd44e501061cbec331b197eb68d0fa8fa5e3071d6f8b7c9c0a3c35d":"d4d84dc7311096791dd9c9d7f2cd291071f877afd86b9644427482d09ac9df64":"6473f4430398d7e5a2d218bd05e6aedac1e317269df3e4705d56c22d6e7abb0f":"379649b56a46399b9ab5f3880e1a73993a58cf52821d3cac87890aa0e6322a94":"d34152fa12fa341d0326a525aa838558630013857747f02634d24e9deec2da12f52fb405e7f1b973dc2d982d26eb2ddb4b49c35a9308b06809171dc990a4248e6da0c329a259f495247b9fa8c73af06604db7b629168e34081696a043977dd29a3c0362d5895f9aac24bcba58dd74078ef6f8d33eac864f2e6cdc479da3d224bad8099d011e914b6ccc3631a7369586e18c71a4087de0d47a7c29a09c12438c7de2d4b47768f47685b742c25b860e716c31e2afe4ce6d92bc2fb9f34400602f9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"eeccce7f7edc52f0e2559250be36526cd1839151a77c59d527f66fa24ea4d86b3fb298c8d72b6a0a8e191b60259d1fc1":"26d35895723ba3d431991a0e6fb2154ae5bff7e58609c926ee3269afc5cd631f":"227b9a71a6c17ecbf627161fc627f8f6f1a28ce39772b7a3d36064e2cc6dc4d5":"eb59f780c5a955e1355dfe15cc4a4e90a6ec75584e63bd0de734399f47b95070":"78ac77657dc56b23e617a9b38168da945c1cf52b6062c2b10f1d7a3814d9b9efa5545da050b0db5a65a2d2d2e02fa12e97eb970fa8e83c524bc809d675e0db35c9762323f327f1edb9b534ce16d02519750b41ebe51f747e9da43fd1afc60e46c7aba72e15cc7a22fad19ed55189f287a14737483eb6b32d966c3e3969d8198f01f2ed841f20d7d2e156d6285a29e07f6d7fff42bd575806c4092522b03e0d1b8df0cc88f5b82d24a7fd0feff6ada03a60ef2541a4ab041a49aa973c7163bf94" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"86f8104a081c9565dea5652f20145a068dadff125debf818262d8931cec6ba937fd5b51affcebee952fb67f29f197267":"c7ba5ff828855e6e78fa1732d63aac1f49701ff7ac1f3506e97941f998b4e9d2":"6917bca15db53a5359e5c4d30ab4d37fc6a1bc660faaf2e74864cb4aa52e0e02":"eea8db0cfc04f8de14d6053442b5b4f8733f822df4be5966a0de8b0f7d2036f6":"562b8b2fa3bb15cfc3f7e57f309e31b13c790c928ad6b32a005f5431c28576c5706c4ac0dc2c7a4435bebfa06571278f485932bd94382efcf727b300b230da9b9e9f377d2659ac75dd8247351d5ed8185effa0f255a2a2136e63717e0265d561a34c75ecee1c774c25e33fd938696825686acf9a419c1da3fa1ce8f695e231087aa0927dde6ab487dc61291ad4700c5c608fab1a418f6b30ff97b8b8f01ef8164287849a77b21be5d11d82d0c19056e07d59a30f6c576705c6cedcb9f22d3a8f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"0db6f73ab6d31ddf8f78d76961310d68f081c9e6d5985e1883978c2dec48d9f58875ab658b3a8b795bf464af9470a90c":"d886936ad36549a10b5dc5d6e21203abd75ad63f826794b4adaad45a70424c5f":"76993d3bcc32546430efa30e3b30acc34c7672b6e18c7e2e9a1f1cc26f7f7a22":"54c72cf3457e6f5f6b35dc14167fee9383c44c867f233ec9d81f187bce438c0f":"c3523894d273c85d605d39f5b89e3388afad8c20787897b903d8db7e3de7590340174be3abd7598daba7806ab934e0feca02bbe66282d469ec01476bad5ccba59fc14cd9549bf4af49641f4326b1052b179c89194d21bec0501c97ef2c24aaf045fd348b765910fe92c0039612e37baad2445b57d9db6c1e550adf6688a79b117f6b7a37e0209d89f194a1bfe1ff2e3b28f0454b383af8872f32322bd5313a3c9ca48d33eab7c3807bb98f8f402c43b99b2176f0b33be08c7e84c86b26e971ab" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"3b1ffbfae6ec54a175a80a33c8768fb60f2af9ee2b8620c4e800a17fb9241ae47f77da414f67b5d7b24dd100355d2afb":"0d50cf61e2020a909ba6e36ba4d0a394579d3e4377cd4bf0068967e8d0fe7a78":"5d4efb3f6e6503c5d85a1c43398d0441ce8aefafaabe2f6d86988a24e033f502":"cfb6156a1b139abf21c73001240997ee1a8cad91a4bd777c0372c1e8fcfd3fac":"d3ef776c8d77fcc5e947bf53e0be11777e69c7dce138f24c1a3212d1b6b932580371479b7619fc82f029d92969628f810b54a8fdab8eba799e750945f3545f6a96226bc760ad736101516efff5d8581f5864b38c29885d39843a4adca17046e1e388c890542988797b576da64804eb4101638328d3f8bfa398ffaf83cb7290a2cfd39ead13290ae773a8958b33914ca02c8ff6a069aa25ac8b36f6f0f1dcd8f1c5fc838083a64ae7ae11b85be3a9fa80ed83949b622002e91776273fa32d6cfd" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"19767ce1f18aea366539642fad400a03a675b2f3c0b1cfd49925e535b2c2779043c5a1c57ef550acae733729516aa62e":"6bfa882c1e895eeffbb85578182653c022a4703091529780c075cd482809b990":"11236df1dca3de6e3e3a57d2741d1b77f15f45b05beb47cc500100b31188a42d":"98708a88fafae56c4f6fa780c6c0e33ca8f2592983b5ae607146cd6e92204416":"b6514a3779dcef2c9ea0ed7ddfa808d045c5907314c358302ca32b2055987a38ef601637cdcf77b1b8f7eac479f8f18972013c2e1a6dfe612e8a586dc529ece486505534c0ff3dc0b2049a0e46d7ac504a1fdfaa9b08d9fa017c5803415fa391ba7eeb576fd6ddba4404feb46e7cde56e090dd280be5edba7d6df9c5ba7d3454bcbd4d443b08fb51a117c1d5916f225dcd6c1c3fe2b2880f4d42962befe3ab76bdc086e29381dd985206e3e00ce722c9c040af5ff4cd4a8183b446d91b310845" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"f63292bab50668eb14b83975422a0c853fe55714a9edf9d8a817ba0b2f26ec40063a86ee3c79c694273342a02f68ecd0":"3c525956838e26b77b8cfc37f024ec398ed825076dbb749cf49a7d868c201e6d":"d9a41b47c3bf8743099dc8fd228f77dff01ae304761eaf57d751e11cf094bef1":"b790c37dbda20fbeafe9d1339a1151144253bdfbffe17ba87240eae49c606bf3":"3586b63315020b3ba1121314a0fa6c66d57de0ec44abeef7b7325e960832b7944cb0a81a747ee5c5d3163001536d3e5ad2ec869b0e5ceb14aee2e6915073619528c1421b59b80254dfc3cab0584898b0bca72c76ae25f52b7405b9dad38cb2b841e1d6a34fc5b277129db49928b2f6c0dd22900ee786ec128164ed12eb324b502499f1c5c89be2101901476b39c56034cc293e320e63a3e019186d4eaf9a098136e8c0ce7f6326f84ec95992dde2585ad3945a9534aa2954b8c15a48e3324d76" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"3df74683f298ba48648714e384989145c1b84246736dc275636809d64c75ff603056e703c435eacf21c0bb152d9fc2a0":"371217ca2337db03c4d06714624fa11f90d5dc575bdbe12a457c610be066dc2b":"f26b9cac8df57a33e4b5868c36f2b9322994a98269dcbd7956b93d147dd0aa27":"0a6db86c3abdc39878045b8fc2d5f0f77a8e298efdacb4cb9f74762fc23b96fc":"ff5252b7a39460a73094b9d668b53d1932243caa885c0ecd850612fdbe7e46cb275d079bb75a6b050191282ccb11ef255d52cb763618c4b624560d79bb9a5bc99319783de43c152e7aa7c4cd879a75869285320a9b749c897bf07220cc1bef1edc494bffa6ab93dcf839dc15f6f2e508b9e216e2a1786b75abfb01bb7bdeda722b47af895f551670f9562d9f9b78e98ee7ea5c5ca4f836af5bf153925b2aec055eee8164edf3f7b72e24b1203cfae1834705f74cac8c6043a3c2abf6bdf28fc9" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"53d70692f0f4dbda23d78660f0f08c7e70ca94441f1440348f76108874d13ea14652725abd1a94d315364416c90e662a":"6deee916ad660811cf05b5652f32df4e97f544ebb57762617359159cc9a425c2":"acda427eea1c8c6791be6e4d2b60be30302abc84d5c5a13be7d510004b8710c9":"d27d7f598a14205c45788665cd062135b6b65547d3188959e38ab675401d2b62":"f77f9de60e95da3f1d0d67b5dde29b31df59ce980ebdbad7b5e0a0051fee39e1d6fc4311f21efa016039bb05f3b009b223be6f2c007b468388a8a19bb468c7b82cc93dab3e160b2b72fda1240fcceea01c2638e9c8bd2d1ed9ff9b55bf69fba4b6ae8e694c150896ac6233b75567993f9a9adf25ca0f0835b9991ff4b8d3f4f1a3e4c5f9866d98b7a75196804f996492a61dbab5bf72f87658e2300a1b0777ef7f43ffe8962f6b6708d2d91dcdf6b430cfaacb3289f74cb0f67370bcc9af249c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-384,256+128,256,256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA384:"85186650694f742c3f5f228f943788f05602d4827518908fd09a1fb445d8333db2d65f376d48c66eb9e0498999e1ff49":"499928c41841324749143be9cc769899c38d6f6e6933e56898896fabcd802931":"9574ca51f21865c2fb0efc75cc9d90ec5e9c43104979cd64d00ea5544ea01c96":"c0df840a18d7584b62c70b2f057bf824168edb673cb517cd9dac89a0fc80c9b4":"b31e50202f883a8563cf129a0d5f8a33abad79d8ec8a97167ed7fca778e5892480617cdf50b5e51547f7ec1bede35020a311572c61e33e9c82968e8f69586daea3dc19063bea56503f8ca482918d229949acd6f1c52cccdc5f7f4cd43602a72a5375f3aabfd2834ee0494823beada2daeccbed8d46984d1756fe2207ca92186b506115f6de7d840c0b3b658e4d422dbf07210f620c71545f74cdf39ff82de2b0b6b53fbfa0cf58014038184d34fc9617b71ccd22031b27a8fc5c7b338eeaf0fc" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"35049f389a33c0ecb1293238fd951f8ffd517dfde06041d32945b3e26914ba15f7328760be6168e6aa9fb54784989a11":"":"":"":"e76491b0260aacfded01ad39fbf1a66a88284caa5123368a2ad9330ee48335e3c9c9ba90e6cbc9429962d60c1a6661edcfaa31d972b8264b9d4562cf18494128a092c17a8da6f3113e8a7edfcd4427082bd390675e9662408144971717303d8dc352c9e8b95e7f35fa2ac9f549b292bc7c4bc7f01ee0a577859ef6e82d79ef23892d167c140d22aac32b64ccdfeee2730528a38763b24227f91ac3ffe47fb11538e435307e77481802b0f613f370ffb0dbeab774fe1efbb1a80d01154a9459e73ad361108bbc86b0914f095136cbe634555ce0bb263618dc5c367291ce0825518987154fe9ecb052b3f0a256fcc30cc14572531c9628973639beda456f2bddf6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4cc8214cd7e85a76bfa735bbbfce926c0323fc348de6c05ed1800c2c8f58c6b1001eb1f6b29b35242a3f8fa2e90003f4":"":"":"":"1efa15d644e1bdf34eade3ff2f5e9ca45203ccaa1e534ac9b4287a846b71292b03102286d99f2be64b898fe909238f540ebc25f49522f60ef723a4c428ead530a97c62405cd5d9ecc54ac5baa47ac4f6195d637833f462d21a659b4903d9cfa6c9fd4512445f9abb5782899a6bb64592f3c2b3c745b18645301fdb09a6a331e9fb6d9654fc79c14ed83ac1684c755b9cb209885f86ff290a71f08a848b960152f05b1aa8566bd382ddd45521062831d7a0fb3a8bd8e112a91b5960690cd8585c1aa104514e3b9cbf52f6384e84c27bda2802fe9fb952cbf2bd607f869d0aeaa6b136c6a5f6e9b0522b6019b7ba6af6cff99fda612e024867decd8c0c6fde2034" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"d046270e6b7997cd5f4e9ed1193e55382191f78547a660854cf60bb03d039a3950cd147a3445f6d32d14cbfb9da0c327":"":"":"":"cdfa9441aa5eb11fe3ba50528ed731c9ff9e70b78da075d00c52d0e281e3a868f66a53a2a6a272d7e0b1a32b6339f8afd108bb9e66b04c3d6bc069b7e01b69844322df7deac66e605a9e2f43665b7932c67c418a77a4c9a302782d0e735795755613a1c5e90089f759d780fb3a984dee4e06ba3dc5a8c652549587d975e586a98ac6aba6563e2767f1a379261b9dd37992ea9681881ea7933b5c64093234c849142ced85bbe5956f527d46ef091e4d18df2a6102621a91bca51bf7aa4b242414dc16e74ae59dfe560c19dbe315e7f98b11086bc26e336dcefcb91c4828682da90d3921336a45fcd36ea4d1213a13213a132bf20aa1a3991b60b65de7ab9cc656" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"8c7c80b169160c78104c205e4492a9477e6f7ba1c3bb4daa86d222deb6241bfd2d2dcd5c40b46fa553ca6a2f6be96991":"":"":"":"1658a7552e4cc98c228072801f9ba230123e7f1f7dca7ba839f440e5f7570fd29c38b86a2aaca04cc87a56205b41d19e38998b47d0ffbfbd9bb56a6eb31bbfdce8d01e8991b82315c39f60c222298160e8d9f14b1a6038d8eaf15eb7310b180a8e2e8d05ef028782b55d4782d4774160a39896d1a896823f8b92a99abb546ef02cf189200a1a7a2fbb7019e4d8a935224c20d11a18e0d8890549666f6599c261532b036051cf7a65dd33bc0aeab8fa2ac9ed520f6dd893b9dc3cd3b87d02a0543eca0bb52c58b7ac4ab3f00171e21dfd3363229ed362f960d8a5fd06af5caa86018f9dce81ade6234a6992bfb9e2660d08a103dadd7d9ade4c45d691aa3799c1" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"cd394508d86c384c0c998b58cf7017b7124269428e4cf39519b5815cc2d88734fd2cbc87c79063db588d90b9cb1569f3":"":"":"":"7c4de5fa97362e63e52e790fb66d4b067e8cc1742975ba6f9186295832d31c4e0c97b7dffa262b93b109621044a4bc89c9fc82211f5cb763974eb3a816fa7d7853577bee1c36c2c36aabe28559d5bd85691c3e3bd610e61e4c3b76e167526d1331459d8bf09ceb403062cc97e1229eb3a70af6049d291aadb002786e7d21b81c87fa68a51a1b9a89394788bab70783a88c883ca17eceaba455f357c611fb279e38f67e3c27c5ade5f95721fa79fc2da1bd44ca7f304161359da4e45d7b847672bc185ba502123a802535dbd167b2c93bf901626e23fcaba03c4f89625a930caaaa30400645680e5931e094aac6f6467b90b13c2be9c98744f89d113151cd2ffb" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"a14be417001030f6a9c543f829715b075d0efd8fa35acc7eed02a1401c6f59dfc87b8b9255e62fcda6a35e52fa4a6f9d":"":"":"":"ed29a49be56e081f5b6abcd2ca1a16dc096071989de72a39b8bd544d2a2a2db5c886c0c29ce454cf60addb56cb4f28f959ccb7163280ef81e48dd2a02024c34a120301d359f03844d1af01f485afbe7c9b17288cf345172290fdc44e124670c5ca9e8590df6f9f63d60849c62d3921003532dbe3e3e6bdd75d28211365f6c489598a99e605ca671ff91552b5916ea9e12259723c0e1a633be34932d0c816c30b519c79656a70368b28fadaf5eb32eb6e47e00b04f152ace2eafc9a3ebd3b1b3795ad85e0897e46ab57c361fef2908041d365f73180b505ae2426603decd0b7dd33e2f7ac885aced4194999602d4d62a984233d0696fff86f7fa7a6cf993fb7e5" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"b8ceee088f3b13dbd1e7cf230449f246a456f504d63fd4288838a50ab76576a3f400502913cf57cb2341c5e6a63fe9fa":"":"":"":"b4fe3f6caedf4ac7b93fb1c2f316bafa58487f28a37b8400fd1f32c963b04cb3c7eb601d0dd8a7e4538b14030fb0e97794c617366ca827e3afdb0f714983a6a72b261db8bf98d5fc48fb55158661f987d08e952913212717cf204a3e8cf1177f63e2a46d920ffcec4b580a1361253a689bf765200f4e90dc6b34a56e10cfdbf932fbc3b75da1d55cba0c5287f552d883763b83acdfc7fc9d762f79774701f7ace701f0b26c67217e022bf6b6e0602e0d68cb1377b5ebccb9a8e41188dd1dea662663e8aa093787d6490a4e887a34a27309c64c40e4ab2f0acfec4a1b8d419d99fb578aaa82da9166a7d7873e27226db20d313e868bcfa4fe3854d6fb34def7d6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"3c1e8a0199786fc268ee0ca0c0446d7363bd781069cf3a3faef2592cba06ce1e70c7c691af73d6d59addbd6e3f646d64":"":"":"":"06f44bebc2c1736b5cee283e530bb877b28651d70983c272a10efa80e3794ee428644048d67245dd3ca8b769b6bb192c9468a9fcf2b71c417283713d39e800225ba659c3273022f5177fd7867173f457f3bb66ff2c2e7bb2574dfee54438e35c98506c178d35259b04e7c541016f5c2d980074b4ea865203ae2e8935d745a02ab5cce04d233cbc18719b1900f2e7e98229b851d19fac02fa6e5ac1bc973b20a17509739bd989d4ef5a66fd9e19e3ceef2415b498843e93631b2b168167bdbb8db313eef4c9668d5001cb34767ee41db872163987c3bdc144637b52dcb767ffc19bf44fbad487b1eeae7957b497fd59a95f0988315eba73ab7206542f31c49267" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"e8a0925bfce66dee7e6a54fe0311d259bd7f7a22b8576d64840cc51c731212cb1763365deab3ab82de9996e5c8570eb9":"":"":"":"63ddfd70508cfa247408ec231d56df7905f65b62e5e5a8309fff5239620faa0f055d7b8fdbc648ded78fd567c3141e1723d197296c92d43fdc18af0c4a54fcd52613286c78ba7bdfd0fcacc7b11b374739088323ba95f30872d77b6aad21228253133d76d29d0d742ba349956fe71e8bbf3fc7186a3f85f144a9040ceb0529a713583c1fcdee756d0130b38df0964bfc3b669fabb6ec6874d17d9ecda9fa567890e42540185eeb3497ba8db80b803f63803442aec14735e9eda177484ad61bf0c76c2862b7691b4cc74efbe35203f8cf4f24aaaa1d831030f28eef8b49e85b249e6fe835964d53aa74de6a31424ec3c833f4b8b39559934bf5f23d4b1d450bc3" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"c493ad96bb20b2480bd3122b4b1ea51379f5fa2bfd8bc0fed4080995b162c609b6d6197f432c8597163feb9c5439525d":"":"":"":"764d3e4459504b490eb1db7b5ab8e6413601e449750534f4c4f70025026f87217010eb14705eae6e513796c7f20ecace32a063238824b3fd6956810066930bf425a1c585221c8f61ac64aeccfe8a3e33d164d02d5434e9e594b7ff451601874d268a2fd8de9922c36e67d8146fe553889a15f624d499a22f5109896758f30bb98f70eac11da1ad48e99bb4422acc5b97295094324eecf530525c1ba150886d053c84004c265693a4419602e5e59bf120de6ff054d0c7c96bc14e9b5fe1290c08ebebcda21744c04a2e78964cb2b52f8e6a70930fd1ded1f0edbda4deff91a3310019e967df3fdbfa228bec9897412a748201649328b7d784851fcb5ac1251f8b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"1e868c5fe4b59e6d4249854226bf1120a74386ea590e9c35c58d7ccdfad56d71dbf557da684289e96cbdd66cbd9cb879":"":"":"":"2032963be29c0d24c2631b1cd895124b9801a4d5c14c28fb34cbfb1c2467134f499153e2a3ec817cc4b2e4e06068ae78f5696dcee99334b0b51e9f29e56a3d3fd5c65c4cc70e10f9e0cea2572c28ec4afe0896d7689322d3afd931ff836be485f78aa179100d43d910564dd1adfedcd32e3e7e53b06c0a46a90b1173e4a5152cd8aa38f2a7e329d01c0b81e62be6c9fc8d1ff3db08f8c31c1e77c5d7fae619555c0e02c658486e35f27a7d58ce63b9b152b9ff528ab6a6cd9b59240f5a7b6b52dc3f6e47f9daa2cb8cb525d6760cf409ebe2c7641c3c32e330545bcd73da9eda20b7590d84831d4bec807a56994259bcd2fe28105f2d7fcdb3eec523fdef7044" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"55bc1c7358dc334b26412ab472dcf4210740cfa0ea688812d8b1a7fb257b979edbab14240cf59fcc8a7007553ac480eb":"":"":"":"6a9d30d4ca97dbfc2d2852bef044bbfb95ac253b27e588c67fe179f6adb81147cc1cb6eba6a2c4afd6f8b3f1c8d45b51af1435ebf1ba8596830314353c9b4d8aff9620dba0099fe0a1ea417b97fa4c28491fe6d2a619172127f18155840f90456bfbf1e7ff587fbe566d6b8eadd6ce594bfcbabedda37858a7610c8230f594861984dbf1e3ddc9eccc8b9d2ec3cba1306d178f7677ed399b10b995b3ea55586519e5730e52ee8880ef0e63c476f2a80d77c6ba802c47e9174297b27520fb027d134e17cfa6f99d59cc5f53737cdc2e663e1ac59bf74a87ab1064e9acd4811c0406ec5a29a081bd0efd1e557d6b6c9c7fe6131c5c00fae82339a1fb90d3be2b6b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"d894820d9cb243859447cd3a3f6cdd125a9c4faece6ad756d288a15c5d24c39d776c5ea9838c4c34f39f12c1a9df6700":"":"":"":"ba23f7aa0b7f6a93bc0df32e68e78786fffb5acd7fbc2864468568753e3ddf31fc2187b20c229d0d0b261510f6442816d2226024b57306b474079c92c66a00be482fc104cdbccef0450b3f2ce94f6bb6a5125e0774a28a2a083f802d3c45e9d4253295f80ca4bc439f539a7f82eec6fd450bd196ab468ec6902752dced44ab557fcd3f6a72c47c0f18cec6545ac669cf432e2db308d70a7394ec772a34f14f26d7bf7d0bd7e4437248618efa2c08adc7de9231ddcc976ef8bcbd11be54dd17ca9fa515fee6827bf5efb602fe8f1cf5d67078b17601803c5be05c24edccad2837d0be191f918d6dc62742241728a8690db5836c2045ec9f8bfa87b768f4febf2f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"17facdf2fca2e1134674ea8e8daa609b4477f415c6a13a5c157f3fb7727dda6d3c1dd89ad63e781588e4b3f8cb1f2f6e":"":"":"":"f472b4c20bf07c170b3c8eb682469e88680d1fa5561d72b864c5c438c95c4c8a3e61f89fc30d5fb4e843e5ed1230778b48c467fa46ebfb7b56220a610483827f3f7f8ac307f8aa57a68922a06c8fa5de732a0d05835cd48690a2b3f734e4b7e74799ad774579a9eb296112f3e2bb68551af0e9e0e5e0bbb219ccb6c78459dc68a3663987156a50e72aebb219a1e43b5603dbd8055bf1e76a4468caee86489ac9a1a9a66ee7b193484ff3bea84341b62dab124a43e38945cfc99f2c4c15590fe180bb3e6eac544483aef710278213a83da85a38b6d140f33654c9d4f6b8ab3eacef1c57fd2237dbe8adf23b3aef6ab30327ca119b9e1e95ecd068aafae0d07a08" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"2c13e44674e89aa105fc11b05e8526769a53ab0b4688f3d0d9cf23af4c8469bb700ac6a616c1d1bb7bd8ff7e96a4d250":"":"":"":"f778161306fc5f1d9e649b2a26983f31266a84bc79dd1b0016c8de53706f9812c4cebdbde78a3592bc7752303154acd7f4d27c2d5751fc7b1fee62677a71fc90e259dfb4b6a9c372515fac6efe01958d199888c360504ffa4c7cf4517918c430f5640fedc738e0cc1fcec33945a34a62ca61a71a9067298d34ac4a93751ddcd9a0f142748a1f0a81a948c6c6a16179e70b6f13633fd03b838da20f81450b4fdc1752e98e71296f1941ca58e71b73ea93e99a98f58d0892fa16de6a16c602036ac857dd75f9ac2c9185932103db5430e80cde9131e814a0bf3f3e7a2200a7152424472fd27f791a854f29aecc448f8d3fca3f93290266df3193d9e13e08907ab2" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"a3da06bc88e2f2ea5181292c194a10b3db38a11d02ac2f9c65951d0c71f63e36c74e5e3d7ba0193bcd6839e9ae93d70d":"":"dbb7270760d8d262557807ce746ff314fd06598143611ab69bfc7e10ca5784b3":"8cdea882f894e5fdc5f0a0b16b7d9ac8cde35ed17bcaf2665564d4ee74059e29":"cb706b90e88380e5c1864458454027821b571dfeba0da83f712efb107b8752099514ef87b4488fbfa3508a00954bb03090766d2bbd399e71c86c7967a4e8ded57095a29d4cfa01f8d28c97e81a4cd4fc5be7fb32a0d6c230cb8760e656b74fa7e18e2063ebee5787958b272fc5de93f0d6837e55f0c360dc593c88fff30a428cae37ded52f825646e04133a19790c304e4b1f040e10439c5edf454e6f71b23eeb43cdbe7b0634b8e283a97806073f7f28a43de2d0d969b3eda380c185b785b9101dc905025c9cdb499e594de0f0d3eb41922c20994fe2c403dd5bf01e4b2c3ee6654d6ab9cca7d4d5ae59525a796119547eae6a3cbf8ad0e9b1de3c4d5a804e4" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"462cb274b7def1ac0f9db135c8fa2e48599cfe2badf2ae9f6d06886b25dfb0cc250461f0dadd9e23cc6c08ddf4ae12b9":"":"b087ff5e230284aef4c90b5f9c48fec91b486f3d936d422475a2b12ff47a05b0":"150a4ca383c3863d9ae3212de9ab9da7442fcd5367af157714d74c149f69eb9d":"12d4740dd0c5356fa76cc441f9088e361d3e636dc7b1ee27a26e28218eff470e28f51b76540939d624cacf2e3facf0967e7396a42017f68789e53f4b1d216fbae675801b8869b06d173d42126bf88fbbfef60aea6c4ba15538b2d64f8f22f389ee35e01e4ea88fd7c9e4d10c145a5f6e4dd33a55f2cafbd5f56856ea945b3b596b4900cf78936732bda49a52bc5a648c6561f48b820699533d48ff04eccd81aaa5bd25fa277ef314026effe2e65a9c38d45832cbb89579535782bf6299327339591a3e66d82aef6fcfa0a21b6b50a398b737a83a6a9b34dd46f3d15162dfa488fcadd18dd06f856f6d6c4cac2677eca641bd4e044ef4cddf6c95f1725fd8c606" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"727337765db704e7b9d23dd139e63b5ac97adea990b7d04881b6b2de045c974a0265210aa4e336ac32f4b0a428ff272a":"":"48b452cbaeb990b6ca4ba64ae8f2a91d792ab83ad499093d9c4566ed8c7cee9b":"e7e32096873180e03c9f7bb33c5af4edc3fb9a36113275839302d40f0890dbad":"21c7d4c258778dce67f1a134670b8595dbbb0e036ae78484d7953f280f1faa5fb3bd213a54132a089a9d6f1376ca8b7064402409187acbd5de7e4d7146c1f02f73087a6c62ca6a7e736900a9e4464af0351bcb71b2e1f1cc07440cd74f50a61757f0b3bbb91fde9c898e62a9cec3dcaca0c94d5d0a8edac0f82b3c99b65d736884ffdd23fff1d9d6e8199254e784514fe3c34db51a86eeb06ef7dffcfba9f195c52cc4b2db53e0a6b1bdbed68d85822c6c03571482fdb6535eee1b6e26ce7d33433d3a1271c5b93ce9a31c9d7c805e3635e79682fa5f8e7894d8d16ead32e3fe8c625174a12a7b8623c0000a75c506cd367bdbc4e3da3b462938875050ff2271" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"8ce3f77c4ba4f40d4eb3e80d03f9b138bea725d44f7a47f4a1f7ee3afb45c2a0e8fa75683ba03964a8e3312ccc6e1b66":"":"83260430843b586cfa50ab51120ea5675d63402074d45b0bf80dfbbec74fdc63":"0640b6427bdd6ead525962b228392b3c28abe131719feb0c0f738288ee87acbb":"d0a402dac648f7a53b5ffbebb1f5e6a12998c999809007f357dc568d7c653bd3b4da793d6d7ef802338eb36c7e4745655001f700c4ca68cda07d726dd088ed9948b2d49d8b50a72530dc9daa3387cd69ce32ca49dfa6cfca98f8a8b641c929f84c5f4045579dbfd3fdcd997068bb0f905f9a4a00accf06a483282e2eb99b94d78be46e07dc87903208bac0fa75323920997d9c4f9c0fa4cca5e6b1d69fdbfae8dbb52d659028387472c1a54283d074954094ae11bd3aa97360073ee033d7008e63b89e0efa4788eefa96ab726af4c2422b7472fa1efb7d95bec93fccb7351768625de30d9f5377610026b6f7f9568a9659644c7e68483672ca9ac8d0994efd68" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"96b0d3b13a65ae1010bf40e6e2dc6e6585db8fdb8fbd2b272611e51c62e1111ae93babde207a42980c9ac9018ab01153":"":"b67c2ecbc4d4c46c3573883b61311a2655cdff0e01a12a20ea0cfa4e91034c2b":"9ca69103d5af577da056d4d5e95f53be87aae4689918bdf0d011789f2ccba9b5":"63f05a9815c2671298e9caa06b0746767fdcc00884eb1b30e53b16593508bb75dcaff9932230913f9b62cd0361af168993ce7b6b967114e2612c8f9c376104633ad4eae2e968e455b96d1d5ed6928eee9acb21bb8fdee7bf525f143dcc624a66ad42f1bdbafc19b165284f2c771edc57dc9092ffae6ef8acb9f8fdba496607c54b07f3ff4d1721f45db43f8ed5c695716b405b57034cf4f87ab487a01057ed449bd918093c532fe85015f0c5856cbd7a440c33c7968dd25330f78b66248873959967e307f9c9697803e8b0939fae51870ec533ef7d17e227dcb68ccf270299e65ed8483b9077831e010e9dda3a50ef7b008a0762c8ac5ef42b7e2ecba450d7d6" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"49913e04b653d82abc54cbddcdf898c409819dbdda4af93bc97b434dd1e319706504b1c76f34ca6d9dfb181c7057ed8c":"":"68b8f6f749ad588ff2c7477fd7c55be648134d57be6846674f2659d75785c39f":"cd7b2d7b24070e501843f0caa20666fbf963760893f4e277d944991ec965fbe3":"67ba01fe694d8f9621d47be0dd9119b8654d028e4c095347629afd02e96fbe6e4535d1666ee0331a6da79e703571ea0983a0d02051bd95dd130c7733012424b79a0bdfbcf72c9cb0c6d6ee408e2f0de45cb084d8182d1b8b4d389b78d0e3fbb7f3c8891ef522f077851b2463bdf1399d178dae3299a43b00f48cd1068e17f42615bd506878eef5fcd5951c24641b58f7a563240abbab5779db1e44bc2c66dd48ea7e746660042bf92b727d622bafebc05de309c24824ddd1d9ae86034a8694ae5962f61ab6e76b435c9dc8b370d708adc4d6fbbfc44644da3f4d4f24d3c95d958de143531c84b188445b6840775726c87b1b058dd8c14e4648973d5a91a152ba" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4687135763568418f6f30af400d37d794f712b10a42087fd832d840b9e8b1f818dadd1aba09e78a1925ecd9ee0d106f2":"":"ac00dc729c5526698fb80f685ffe93e9c25bf93b22424c15c20043e1fcafbc7d":"948555d8a6e0473a769b7019e6909a8565e386a624a47a1f9c96ff5e6609a894":"4f09384ba8a34f819a0d4473c3387f74299753fd16e386be51a5ee70d1b164be6fa53a3face06379da2d961bfd6ba21eb437bc77b527960352790bbc978217549006e7409b86ee97d6a042957d27a02fa5f04de94791bcd7d02cc6798bc66d3b6cd887f2a984224b3c279382558ff64459703d93b40fcdbaa7abe1bcdf0b95f4c6ec6583a86a41f837c6cbdefee3de4767e330cb2f4a0d8915f192f02c1ebfc78345f80d5e0f21185c647376d588991486ca9a8fe5c68d0b71a5f81b08bb112c56f69c89412f0282eb1bed0d05c959608d1eb6b1eb4a76a76ae927cfd8d651a651fe83668f24bc0d19e5de86813b16bfe8c771dc9f16a7d6d0441b3278de136c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4ccc3c6cd73101efb7833ce1195b28b3aa3e5628db02be166f2a7f6bf7e8efdad5ff3f1c375ef981336af28252756647":"":"8396edacbe629826be44543bece17ede600f7f877d1138af5e83c3ec44b8b0de":"98545ad6268e604fedeacaa10b727ced0b0e284a00c29081a41c0d2e3675bacf":"c37ef92675ad963cf41ee5c14d882698082e8dda5a0ce9d50b8409c9f0d30d3294c7c625ef29c33f395de140405a6f9cd9d737a29d892b67e90427af24e200bc9cc7b5d920aa8a93d8ddd0b6f69cc98e303ca3a512b3d883ec542403d58bab1b4232c31696e72a764f2dc7b278bba02efdbd5413a08563833ef7a283aa6e5ab221d1ce5c7dd14363ecbeee879d157b6aefc8bfd2acc004d19eda7cb4b382e54bb725705b3f52ca5be08df445d8f6eb46353ef26217bd3c1b508f049e810fabacc0a75d717b2bea9f63cd8d2fdffc27322eafc98e7de18a911ff44cd0e5864e0897f0550e3c48674d11dbecc9d6d4c42f7592fba440608ad479ed296a6ea6b1b0" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"85ef33038e0bee3e40ce8eefd3648e89c521ad537b0c8003617824b08a154b75c89f036845a6f24fb9a15513ed28eda2":"":"2c675110a2bbcee5c6096cfd8f363441e3473664cf09577a95996928519a9292":"f1db097abed76cdbb1fe6aaba94bb51c2af8f43c5cdd2eafdf6b40a234d3897d":"beda7162fb3e07d96a5796f091388995894f69a59f06a0c7c8eb704b5dfcb82f7171d34628b116e1ceb0b180e6052d01fcb13510edd4050e15d6a8bb27a5bbac46d8847972f2638967d53d5b7752452bbf0bebb953a4e40212ab587b8e74a9599021c93071ac55a08feab70ee040c3cf32246857167f13473d20a38c8d6d364da4d1f043e24a65b2dc58ae2a56215a34081fe91bd554edf86a7d582b227316662dac6a71693806545760060fc1a204df40f1b5df92c7b0561507ecd95609fa5317bc43b1e9a40880a230fb4deb79cf4a7a2b97beeb9cd4c8c841d4ef2668d870eaa11f2fbfa0fb899a424f1600bd46778136dedd147f124dde4d64693233462b" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"77a48fcd8cbea1be145a65c9e20cbc4e660dd439c7ec7e2dabc6f0430c5ba716182f05e834e84e89565714fe8ccf0de6":"":"1b838d460961b8f1623667fb316772cf50aa462ceeb58c36e2a6482ce7aa9f9f":"ccd4048bae7f8166c35e932cf3a09feb2f97dbb31af61a3fe5e4edb881ba6930":"af5afbb8d60d77c36c20a8f4c20b68ccd7fddb703d1ae83b5981605c4483e4f092329bd75aaeeb6fb4e6552540bd772edba5e5a96dd227acef73241257fe8774f757c673dc3370423de5a85b9118b5aa98682db6a89f520174a25e8e4b71f83ef432a91ddd8f69c1431c40d282d7e789427f18d9c5673131d5d3797d1335ffda64319d642f5ea5c1641092893a4008f076b649170916a03e06f0854848607c6c44a9f27bd3b17b293a914a86139e9a1b11c8652eae3757162f9f7161a2ee6f412a40002781e8fc8b80242331528225e70b9b23c6b2c970db12eab61bc290fec9b4c6c13d6454d7336f439d9b4b1df59248ab84e3a79d7f37df07e88c20f9ed92" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"71cea1ba7a7dc792ca33288ccfb67570d9b1eab34e35296209db20c6676f174df4e062d1f660522881aeb11a651581f3":"":"c9667d28614fa05f112ec31487cdb3d925f2cb312202f7d85695a8f7336573b9":"6363dc485ddb9bdd61db33fb1beae9bfe2d0e7788a86b50774f8658bac094214":"e62486e1dc854f90b803635c1718f075cecf7fd44d1d304d0127979b83bee5e4abdae9076fc5ef89f6435e4b72cee056372c603f16beed39a2adf6ddc2577b32b29396db81e9ce57fb67c2525c2a59dea259ace4a7b6560ee20ca8e3f476786c34466ff5f6b45ccc916477f6fe96e7e4be23867a9ff9fa07609d9d8a5db7f5e1a068ba9b9c82bf72e76d17f73518affd5c58368232bcafe65096962c561617f489c8d978cb28676d8932a3c3489eb0f2f48a193826ee785dc850e41b0ced359ecd2636d96e83fdf8996617e6a39e141c124ad1e2e5fdad27144e60b56ed70d91543f3046acc831a6d56926ab1635de7e04a149958c9365a53c144903d7ea392c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"3a23653a34334db7d3abbf747d9d47d6b18589ab3516b0600bc93517d206a1a9c74a51766beec0563db655273d5dbcf9":"":"89922f45e6637e7fcae0a98d7ccdcf36650bbf7fe3253b7716014047a0983e98":"5d7519b3f442e1246185e1e7a56fd37473f18824f3c9d21656f54f1fa8d2947f":"fa40b69397e13d5f1ceaf294fb1d3a15db8b345286e5359bbffe5cd743ebab412845a9f5e4ed8481cea178d7b647019a7729c264220991c3ae276f82d6c33402f061aabd2e28cfed64565cc2d7f1774e26281d0808b2857d1c144d5aa36944a38358181b28b9110470601204076c02ed44ef411cd6a75fecf55225eeb3ef4f1717d3f5cdaec83f5defe835d2a236eb1a8f00167a727329163eed34b3b34bade7896e2d0de1db1b15c7c2b173ee8d4f0bf77f8e8a973be61e107daf240b9b7edbc599469b5f40e98c0d2d40b048ce4462cdead7e8f85d175a1f39f8bac61ec00f4cb4c8081201ca6319984264adca745b1d0feb471b5d8fa35bded03357fcd7e0" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"24cd11e75f2b0ab60c5b7a35020d716cea2e4f5b7748327c0cf355b11805189334889dc3198f13c36cf7beb42b2a1a6f":"":"cf9571fecac5d79d65617a885815703de3459cf739db097f8ff2ee557d0b0745":"2282cbdba64ac2a4053c070efd1dd0638fc31dff97dfa15f76bc077bf173a821":"1b0466ae577c0b9e943616437c24b9d32ceeaec15bc83841843585c6255534a4a71ac96698f628d907255894f6199f6d7bf405afb0e46359ae0dec788ca52111950f8adf88d324f5b9a76d79e67c3581b0cf0318901332883794398e6aea0f7da1f55f30ca34b11127e885e86d787f8f8b3a1342d71f3738c8445707e0dea687baf759b261eceb4d661ec9bb006e9f08aeb1cc0357cd8df526943d71a6d73c9ae80ca69fcc3004b91dfdb2b6b8d0424c1cad81677d510ac7a51c1ce6f02b9ab41466e37ae0c2adfc63b31fc2e4693e467d3384fe359e9f0fd0f4d08f4a9037f3fd5495d895b6ed4121cca037c6aa87a5ccc5b856ee6151a900459ff0ea77550e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4931d76a7ceb2238c1f0ed76be24d2fe1a925d1084a392fc8c43d93535da0e9351e52abb58a9bc34c46f254b8313d387":"":"92a8eb05034555680bc937d0d958e820b09785009e5e05739f29d9af17a63976":"d37465a30f837fe05f04f6b7ad4bb1c83bbae83f9c78f027b4831f5e2ad2dd78":"a61894d3c30081c7836dee8506cb97bf7bb4e56a8a94c72d9c8b6900b69ea68b30c41ad33dd21554361c171cb959c555bb668436293e3f1c103bb72509e43f2baa19742ed8c2d3eb9d0790c845097a7f0b2715b3d127a7f043c4b265b4d6fb4b9af9edd12427e1b5c8b680a135a315761aa4a9ed598a7620f335fd595c40c933696cf95b7eca55e8520e9154f69e3446ea4fc3b69f36fa1ae7eb456b350c93a1ebde342bd4578142d8338268af1c240c94457888d045d73196347318f89e281865b826837ca79da5a6dbc81569c42da475d97ab5501a1b13e99058c40840958331bb73c78e5ec90aa0464b9f603f11bc4baddc28b71c42282176654458d2fcaf" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,0,256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"ffa596ed725daea92273519c279d0a26be7f77cee1fc4fca44dc99b97ad8125a3172e5a36ebc671df1fcaaa54bd7218a":"":"6cfccdd8253cc5b284701ef8d16f8888f79100373a7df50f43a122591bbddafc":"5795ae5be47a7f793423820352505e3890bac3805c102020e48226deab70140a":"4a398c114f2e0ac330893d103b585cadcf9cd3b2ac7e46cde15b2f32cc4b9a7c7172b1a73f86d6d12d02973e561fa7f615e30195f7715022df75157f41dc7f9a50029350e308e3345c9ab2029bdc0f1b72c195db098c26c1ab1864224504c72f48a64d722e41b00707c7f2f6cdfe8634d06abe838c85b419c02bf419b88cde35324b1bfdaddff8b7e95f6af0e55b5ff3f5475feb354f2a7a490597b36080322265b213541682572616f3d3276c713a978259d607c6d69eec26d524ba38163a329103e39e3b0a8ec989eca74f287d6d39c7ceda4df8558faeb9d25149963430f33b108dc136a4f9bfa416b3ceaa6632cd5505fe14fb0d78cf15f2acfa03b9c307" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"e97a4631d0a08d549cde8af9a1aae058e3e9585575a726c76a27bc62bed18a4b227221d5fe5a5db9810f9afe56a3ee78":"94084b11d55e0f9c2ef577741753af66ad7a25b28524b50ea970105c3545e97d":"24c81d4773938371b906cf4801957ac22f87432b9c8a84bc5ac04ad5b1cc3f57":"c8c878451e2b76577c36393ca253888c1038885bbfdacd8539615a611e2ac00b":"761422dea283262998c0ffffefc77de2d395c818b9cf1ac2bcd1153235e0d8b63199c51e195135a75f1f87b454484ecc560c532c7ba5923c9490a423c177453459d81efc38ce2939226043cb733062eae303a009b48ee0cf3c7e40abe2b57a70a6062c669a9fbff20b4c94b4ecbc5f744a80d7be8134359581d441da921737b1329470b214f3e679fb7ad48baf046bac59a36b5770806cdef28cc4a8fd0e049b924c3c9216e00ba63c2ff771d66b7520dd33a85382a84b622717e594e447c919926a5b2e94d490ee626da9df587fed674067917963fd51d383e55730c17a124555e2e46e1395c9920d07dae4d67ffee5c759b6a326eec6d7b3ba6dee012e4807" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"5c96609e9de807efed31d3c2d63e284be5c44c1b5ab84672664de8d8d8e2f8181b95a5290fdafeb05dc902a9a7bd639b":"135aafb3bbc89ef1e00a2a35ef32f122b7511cc55d86e7822a34859b630b4d29":"115774904a953af07936e3efdcf6054b4c534dc8654f563bb10610444d30625f":"4705ec7525e63919f7483fe76cdf7397b19f22d2a9d54b6cf0ff9abcf0a7c46d":"ae2cfbb29fde23e8c22d77d7a50ba66798da93be4e49ef78b38c9be2411e2d8a9954eb29fbad0a967c51b26d8d746801539aceb32e2459d07baa994869d3b6db2c88fb9d7250fac00de8f79990d501ad985590031f7c45a00cd9b6d1b5531b238f3a31d33237c40a3da31356171cafd52cbb7929e32b38fe523d8212de801f554348a3cc468daca70e05affc9af97f172aba00b2acc50d7dcb5f0ecbce741c71a65c657e9d0f250c44f73865962b1a0d19738e9ffe9f17c3e03363bedf5312c444375529fa8df9dd72b7c09f20c2ef37abb93e6fa57cadbcd7b23036bb9924fcfb9bf83b09ea360fd3988639151b1ab22939e9ea1cdc413f7a2cf04cf2778345" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4cbbd0538535994cf00354ff8609ddfd04e80dc4174b9542cdab52385dd968ddbef8157a6e3f26f040229a450f8e564f":"ed81729d1aef522f7bf9c127207d8a680ce4432964ed4025b5bbb12964374f3e":"1259073b57358935b7149fa4349793c5ff28d3ce98b483ec48986aa285451abc":"b350a4e931bb5db50a866aa3c01ead7d48d5859bb97b675e77ebb844ac832eb9":"215cca589f737df48d60360c4806ed548d44938c2bf5b1707310df987edda51e5092a7d9ca4955303ac59bfa980ba6e1819ed1141978c3d7df1125f5c4abec5b15bb8f5fd0edb1f26bcebea5aa7c8d5d32e8a5b608f609d9dfd765074b23cc524596a91226b726d899e42bdee0321eeb2dbaf63d33cced6890c19b466636df05072f007ae60a2364dde7f82315e3e30e63258b8abd12f18b6ab3d384cc9349e56dff00c3f53a86a301aa7205394199d32382096f6cd9db9646a92e73c3fd1e53c28a91683031c1ac72bb85af50be669d0e1d7b05a3bf1fc9720025c1e39e1f09d18d2e9247f726ac691a1c2321a667e6bacd7d77a57ce46397db1a91e7908ad5" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"9b2bb0f34e6f0a31eff00e6604e6ca77643f69895877f77197a06e2b42bf047b3c1ee55a2a28fb3579324a54458310b2":"895e7060956784e5ea113ca785214bcf608e2a53c175e6edf5b78f1ad90e67c6":"c0b1980d57fb797c4907aad1fb5662bcc8d6ee30f6bed951e77c11d1893346e9":"af3357fd21fc04d1d1bd162b94bf129c45d41fee90366a180d98d41325336b5c":"50941cc105c694dd26d5bc73c08399168a270428ef594a6968fde834e889cfbbf0a80d7dad65d2fca21ba8019f1011313fe86983a555fb3ccb643bb771724e04114f3266d72c2e1a75363aebda9871c3bafcee3f389ff4c6f1f1bb5e6da5389e04f2822da800cb058da9cd698c65d54b16e7562c83506b632e4b5c7a78d6e36ec307e48cfec4fbc3ca3dd67ca95f9bd7f1d609e0a6d8b5bd3feef00e0c4165e77da84f989210c78daf633aef657855fca26b832994000f980c21d355db10f71f9cbb8079c48aeb673c5ba097a325d9a89e05bbf960fed4f8eb097cf37f61900db8171685107d53f85bbd8c1a4a1c7045c8b6e3a8a2c4114542292555585a090d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"9c8306c6941098408c56518a44d3075c22e02f19a6041d2e9c4e296fda435db917c99d538ab65f6f1bfab0d479a1833a":"3a80e9f5b71b242ae07ce7b617057dabae189c5468da2cf049b5b529abc877d5":"3c151e92dd3121a8d2d11604632df00cf90706d3e843737445de0f2fde1ea924":"f53cb5fe673201f5eaf4115382d48ba45be405b37a31a56e41d1d76202038b06":"9bf31156e54d7142490e620afec2217931fb2389215a3609b384b0551bb3c9d90c3b3053054046a324db9b34633e41b66114bfa7ee86bbd22d08d53e349a4dc875265b32151d3e475df348a22d5226478184f372b0ba3be92ec1b284fc66dfa3609463214b6b468b29478acb0c55e1d4674882cb75e3eaa3a66ea0f4d7b1a571206a761d636bd3519afb6f05a0f1b6bb38c00bd68530a6c9b445b6b4a9c7457a055627b606f4508ed676fb5ba0d27589b7f464271c3e561215905c50ec48f5ddd1b8549e8d163453083db96c7ec8eeedaf6804369e76760b08abcca937c497900be385db8804b443e8a1489b8f3e3e4cf367dac3e15cb8e95cdabad04f08856c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"87a8fce521df0a2e26f1b1f9c7ec9e98968474915a085a95cbdca7d8c669e08a69b8c3c3df07f9ada368be448938bf92":"b1bfaead04743bdcfdb193d32260918ff803abbcc0d5ddc50439bd01f6e42a3c":"12a07384e9c74fb3f33df1a089dddb7d416151a0270d0c0216e085f1ec4c249b":"9b42567093112cb5889703b77b4b372276b5bbccadf86eeb9ef6d3cd395b2acd":"5ba662260aa0f743a33a9b552ce41d93335a855a55df11b870efacb7f75e39c978e730acce3664c814ac10fa10989fb00a39b584bb14cad2c02c309703c8ea8768d479d9b4e17402ee38cb82c5f4d80125f3e674ac1adb919cc8a988f79f531b08253fbad0a1b27fb1997a4e2c7bd5ff3abf66281e8b60987587327a9101b76cd13771e23ee2f02dc339589b9aac4f5af740afdaf494021c3504fdda8f93f77cdd8262df7d4c48f85b6eb03a7e5279db4d18f645a63eb6f53f9fb123c53a78686f0113a209b6eeef3b10cd4489875a07af863c467f25b69cd13b8e72847465fba025e25fe7bcb41745369f255df0eeffc3e5f066815ef7715680b104e20a7e9e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"69d667bde79e41cb78742426ca5ebd48086cf1ded5cad7293fcf910e5ab23cc8cad75bd989c3ffd05817d1aaa5493c05":"5f72346eb50ea82cb111d5b3c91dc9b7c61c92fa1a062177d513fb616b1226d5":"0465b8aa89d9cbbe8e1cfa2e64e64b8d1f5dbec7f710a6d37fce898e3f81e57b":"173135f31c2320cccf513e88a21f2d207e00cbe4330d2f550e0be77405eef47a":"34a08d7a564515a918bce93cae084f27a558f6f214c4bc9169dbf507c3f11d02ec97bdfd777960f6b4c4543c1e14456d0079215320ab607e04b7519090ebaf3a5fbb0d7a3fda1af6cd8c5d785524bdba75abbe50e3d58e5f05f8f6b2c2570f1178acd2f4c11a7b1b8b4ebe4ddb71a85bf19bb2fb25241374530cbc6c0605066e1129a2d398356cf2ec2f7a286c5b869c702aced63f4e12f39b7ce250547a922872c36268a3a4649f6641987bb7c6baf1a3e82cdf04d11160ba11c5a002cfbcf4a8698286ff318ec01fc2c5f6664e50561991a533ad183a21e7b97e0052b0350d213738b0c6e5421a524845a861f539930540cc40c6ed78c46be9c122e7974d35" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"f1f6e5a55fb2180de436d48115aa1aa38a6242eeb0959de3690f259c1d8395a5862d1ac4843404d25215c83bca90f44e":"f467ef083c745a1bfc9be44f1d468b2518e3ff1c0cee6819fdde354d4071b17e":"fdda9f0888c4439cded15a768300d163c1e326ee5571c22ab95ab3e44b1676d2":"6b8d60c565604c8fa8d7adaf0b07ed268a491fb79794d2770356e191daa1cb50":"55d0788614b770f4b8c3d3ac0bbf628f294ba2fd16612b65d0f469ded665e3c8b82c95db80cc6b410b5a6e624151fc50bf02f279ffabc19dd094cffb17ba44b11209b923df326db14eee35a8bf1eca3807afae918206e844e517eb32c207342008a0da742e734433867fd86fd89d27ec6e51a9db3ad1adea645fdc57179c4b71de8b455ae00efc09328a0bffd8c61e3880c007915997daeed4adba61b44040f6f9b6c6427e1c23357c8f7e18b5c974b3c34a2fd5cb5e70f48df2d10c1deabd987f8390bb33858d9a5133a7bd798b1c7741729b8562fecb3d4831e9ce101de192d64bb5d757cbb21090d669afc5566c1d6e25586678b5f2fc7d6c6113ac4eb54f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"0db9d437153149e101d5818b263b975735994dfc33d8b3f158a05760867757ab438a5024e1d43006226018c378af55d3":"275bdc5fc78b0d8afb5c8aa5f7854c319a81bb8cc9300210a9990fb7933a352e":"809da54d1830545672f180fa3e0441a0d3fe472e7cd7a6d707fee5af7e9b21c2":"ebe66cee6efbf583c881a25e346ca7d99741dacfce0d8785c659e92774e26ff2":"878a3d109d814ff4a4935689ca96b3d444bfcee9edfcd9031255ad2538871027273bad5225864e84f3c2afaa22a40e7f6793abbc49c8b0ddc7b30d9dc7b408888e6b98f4bc79e08775b599661ea4b50669132c21272f8d17fec9d1e5310335b0e6480d7075c830a44ea528900f99de61191b5a006ca4340356dbf20c62e8ffd0577d623146b12937e84a6e17c0ae08efd339c9aa979c7e21e9c56e019f7e4f375bb601b1a83c21f27a554ec05191794befe514dfbff5a3c9a0a9c80bfe9b6adc7deffd31c70ba13fcf170abd6bf3d384381e0a31fa9c81b1bd207ea2e0b4153b6a1252a9f73f19f6f099fda0f87baba99b9711a00b5f50ad88d3bc1c4e806467" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4106f6ba6a291fa54e4ecfd9fa61b961554e4e8e03e19d9bfd82bd35c3471e8bc5bdcd2f810079c1bbfe906929e88d27":"5a7e61b86ca70939e64af613a667695c7c915e667c79998e76e55eb33fef6d86":"86c7d5883aee568aa74d25782019fbd6f5acf4196752ff3d1dd96ec1e7436424":"3a5d80e739f5a30e6bb507d82b60ff987d5bd9cbbff4b47daff278a3252db3ef":"fb146146f828e880c6ec7ab5a65fc8ec4e4d7d975c6d7c0a9bc7ce041f49799b11e235d7ac5a4ec4eea721c3323448e686ae96579233ad698a9d6fe3f5b37d87ccfce640192dcdb51c7bf35404c90b705bd97482d95d1c3e3a40152c86ab923588842ab02f4d922318a7fb84453b072c749a7f54e8ad005c29c48af6f01ecdd8fac13295e42b2077c70c7bf54e214317f98003e4cde07755e95c91f1953b29b3eecd49dc753e74aaf2b1c83feae87428be6a5aaa3261f0f65491e04c1fcdfd5481eadab68f057df3c83694c7451fded86a18470b06f1779c38efcac54b576e99eced3b5581eb5c9f7b3340ad5667d1f0d3fead8b9484a032d5f74d900fd64d10" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"5d1fcdabb70dad1428c8be291720c92b8565f331ee3438d79bcddc968efedcdb9319f5ee91124b93b965d504211fef04":"6c8c8a066c6208dbc18a40a30b9f689048877e038bf76d65acbdde7ae4c566f8":"bfa2e9ebe0d70d3b62cdbd78c775a62e0e22fa75f168123a336b66b9a2b68c06":"e48b5245ea241baeb7f665a9daaad662d7b2422c3e3711cfbed81d73691864ee":"1586e0761c4a39013dcb552a0e363e709f4303c0e575653c9b240be7449ea26e4bb1dc93f06ec958b6c06217757fc550b356c135063c00fce9d856aec0edd20735b46b7c9a8e7df780db3072fc2b314fa5cda653ba3690132f10d30ee94c8458846be75659ef3868086bcf54ff55a8db1ea65c3e747a8ddab3f2304738e0c75adfc10c23ba651ccf0de64a39cab3beef667f466391a61a87a981afe883f09c4edbd3eae98d51cd3e7b31ee179f8a4e10feac96ea210a4b8415c9f2cfeb2bc8bf51f13801dc542ba1badda1c30141d72abb1bbb35c9bb481d91db5691c44bf3526a02d0bf776304a951858aa2fcf3f45bc656abcaeea94cbdc851a914b4b3a3ea" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"9fc58d0785adbf033ce6642dcc9a861df44a35e89d06b346b165074a048b500994b4c0b3e27306b8c805c97b0ea14bb5":"e02f7a856266195fb5f4810232cd5c71a4465e1d95625c01e8e7eb69c63f6796":"7cd18b8d035b57bd01464280abe891b7faf55f9ed9910d9a148b030340c67cdb":"918c4d43fecf993227f7c120d239a30d3c315602800d6d58b9e9e0715964cfa3":"b8a3581eb4a208d1ab8f0e84e9ff3d2e0ba57703a7b5be2e4f3a3ede2e2519f5e6068c28c41171446cfbc40b48a97bc7a9a1e4d3b02f48fbf55b1d63da7cbc5b7a95f354afda273dbf5bf099961db4a4c5f296286dc0a51091a522398973d5527b2e55e0523c21fffdd0dd38527bc45959d5a711d541634e3139577312d678421eb37553c127beec64422316e48542a906cd7efe0d96eae3c4f2db7666083d9365a76cee4a207d712ddb04bf775be29ed9f030eade4537961737e3939a19e0769a3a8b96d055120c49925fe1ebc4a2ad54468421dd5465e8761b3e2e384373a971e408dd3a54907538a7d887986677eb192761959a4293523f81647a657aaeea" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"d43927d1e633fc3433536cd03617a97a3a10a7ecad3f0c781602829f8ec7feb2dd5922f2a2dee51db93bcf35100a8364":"3335a02aba1ea28d2e56973e21109e0adfb5068613c447e625fd83a8d0e34494":"bfde33c52407d3137123812c4818ca1e4b61878b8f9dbaec47935e3948a88d0d":"42597cf03bbee0e003d8677159918f5318402f7329f08e1d93c850e2a2a2f1bb":"e53c7d0b376a94809f472961acff314079014958935cd67acc476abdd919a43cd3f7d1462d0d6e628ef5d0c8e04a6d243838c61ea36b015e84d7ad59e49b45c9b04f6ec78687ba47156e429b2fb6dc2c0da4f5677d1f689cd28612cfa6d95628c26b5b3e01186153a1c25c02f5ce5fc287623358687d2034347b2433ffc1445a2d93cb0103ccdaf0c585f7f4e7d41aef310be127208b3da90523aceac5fa13ffe77eaa4d1fd058957c8dd2f355cae7f9e3d8f29ec7099599ba6c755689d53d6ccd84e33407a066506d97decd7e306d22ca6e0faa7b94f91f4eb004422ddf9dd6b1f49b6400ea55d40e25c67103ab50bcc92d100e89ba569b6d51aacddf02daf1" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"0bd69ce9a0a66dffefba83ae563e8df0fc6c7d7bdf491bf52cbf3f3777025cdf92b32217f550a1fe735b8519b44b040d":"820da3187bc879cd1f40476fd9677f3b67e02b35b6632ab68891e25f10555b69":"903b882de013695b4683316ffbd7c7809288d54c72e369f70cf172bff85e5629":"cfb5f494e76486ceef12dfe1bafd6ccf9b0754d8d2306fb0c41c0f4e921317ef":"ebad5e5a358ceab806ae5590d80bc0ba5d4061f49f4cb79a8a9da4fd1e8cb8f41cd8edc657c5180d18e62da2b53a50085b7e18b957eaf4edc975ca9d43e380434f51542dcfa947c322c708f3d3593c520717230df17f9341f02a5596b2058a27ba23f72a862b391be884570b22e20c80dd20d0a935f068465d554c8291fcd88eff608e92200f90cccdc82cb5697f0406654d9582e8db54225aaa28697bf2c4f47eba086a575298b991098c212c9e8d95bfa48f7e500c7223d9cbffd1df6f725909ab6e9aa837ff9e69158af434d18e5a7f99d1aaf10931f380d88344ad841064130cae50edf8687615743735f80457a228475bab7559015c4f45f91bdfa31d87" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"45784684d6004731689e33e45b344d7b68dc4fa841133cb2dd65c4b326dffa901109dfac2e48bf17f2fea33b412dc653":"7c6f4675f7a0b8c424d5be9e809efa305493874d9a950cb343afdfb64e77ecb5":"2b2dbe3834d8be93f1396b19be83bd96823dd82740da71c5eeb7b21865021884":"49c322fc1bec86d3e20628d9bdc1644e6f5e0237c7c694746bfee32a00145696":"9110cec7d07e6e32724bf043e73021b3ca0e4516b619d036ac9a00914e12f01ece71989f55c1caccd542c60a9cccffb91e203fd39dca2d92c8eb03ee7ee88abf21dc6891de326c3190f25ee9ab44ca72d178db0f846969465b25a07dcc83777e6b63a7f9f1a8246dd31ce50cd9eb70e6e383c9ad4dae19f7cec8bfe079b36d309c28b10161c28b8d66c357c7ee01f07403a596366725fd5bd3a5de3cb40dcf60aac10635615b866ae633fbdb7ece41695d533757d9d16c6d44fd170fae77c15b7426ed6ec8c9d6e9245cd5e19e8dc3c8c7e671007ce8454413bd07407e8a2248bee95a7669db6ee47377b4490a6251abb60cd4e2e404ab88aa4948e71ecec50c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"e97a4631d0a08d549cde8af9a1aae058e3e9585575a726c76a27bc62bed18a4b227221d5fe5a5db9810f9afe56a3ee78":"94084b11d55e0f9c2ef577741753af66ad7a25b28524b50ea970105c3545e97d":"24c81d4773938371b906cf4801957ac22f87432b9c8a84bc5ac04ad5b1cc3f57":"c8c878451e2b76577c36393ca253888c1038885bbfdacd8539615a611e2ac00b":"761422dea283262998c0ffffefc77de2d395c818b9cf1ac2bcd1153235e0d8b63199c51e195135a75f1f87b454484ecc560c532c7ba5923c9490a423c177453459d81efc38ce2939226043cb733062eae303a009b48ee0cf3c7e40abe2b57a70a6062c669a9fbff20b4c94b4ecbc5f744a80d7be8134359581d441da921737b1329470b214f3e679fb7ad48baf046bac59a36b5770806cdef28cc4a8fd0e049b924c3c9216e00ba63c2ff771d66b7520dd33a85382a84b622717e594e447c919926a5b2e94d490ee626da9df587fed674067917963fd51d383e55730c17a124555e2e46e1395c9920d07dae4d67ffee5c759b6a326eec6d7b3ba6dee012e4807" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"5c96609e9de807efed31d3c2d63e284be5c44c1b5ab84672664de8d8d8e2f8181b95a5290fdafeb05dc902a9a7bd639b":"135aafb3bbc89ef1e00a2a35ef32f122b7511cc55d86e7822a34859b630b4d29":"115774904a953af07936e3efdcf6054b4c534dc8654f563bb10610444d30625f":"4705ec7525e63919f7483fe76cdf7397b19f22d2a9d54b6cf0ff9abcf0a7c46d":"ae2cfbb29fde23e8c22d77d7a50ba66798da93be4e49ef78b38c9be2411e2d8a9954eb29fbad0a967c51b26d8d746801539aceb32e2459d07baa994869d3b6db2c88fb9d7250fac00de8f79990d501ad985590031f7c45a00cd9b6d1b5531b238f3a31d33237c40a3da31356171cafd52cbb7929e32b38fe523d8212de801f554348a3cc468daca70e05affc9af97f172aba00b2acc50d7dcb5f0ecbce741c71a65c657e9d0f250c44f73865962b1a0d19738e9ffe9f17c3e03363bedf5312c444375529fa8df9dd72b7c09f20c2ef37abb93e6fa57cadbcd7b23036bb9924fcfb9bf83b09ea360fd3988639151b1ab22939e9ea1cdc413f7a2cf04cf2778345" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4cbbd0538535994cf00354ff8609ddfd04e80dc4174b9542cdab52385dd968ddbef8157a6e3f26f040229a450f8e564f":"ed81729d1aef522f7bf9c127207d8a680ce4432964ed4025b5bbb12964374f3e":"1259073b57358935b7149fa4349793c5ff28d3ce98b483ec48986aa285451abc":"b350a4e931bb5db50a866aa3c01ead7d48d5859bb97b675e77ebb844ac832eb9":"215cca589f737df48d60360c4806ed548d44938c2bf5b1707310df987edda51e5092a7d9ca4955303ac59bfa980ba6e1819ed1141978c3d7df1125f5c4abec5b15bb8f5fd0edb1f26bcebea5aa7c8d5d32e8a5b608f609d9dfd765074b23cc524596a91226b726d899e42bdee0321eeb2dbaf63d33cced6890c19b466636df05072f007ae60a2364dde7f82315e3e30e63258b8abd12f18b6ab3d384cc9349e56dff00c3f53a86a301aa7205394199d32382096f6cd9db9646a92e73c3fd1e53c28a91683031c1ac72bb85af50be669d0e1d7b05a3bf1fc9720025c1e39e1f09d18d2e9247f726ac691a1c2321a667e6bacd7d77a57ce46397db1a91e7908ad5" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"9b2bb0f34e6f0a31eff00e6604e6ca77643f69895877f77197a06e2b42bf047b3c1ee55a2a28fb3579324a54458310b2":"895e7060956784e5ea113ca785214bcf608e2a53c175e6edf5b78f1ad90e67c6":"c0b1980d57fb797c4907aad1fb5662bcc8d6ee30f6bed951e77c11d1893346e9":"af3357fd21fc04d1d1bd162b94bf129c45d41fee90366a180d98d41325336b5c":"50941cc105c694dd26d5bc73c08399168a270428ef594a6968fde834e889cfbbf0a80d7dad65d2fca21ba8019f1011313fe86983a555fb3ccb643bb771724e04114f3266d72c2e1a75363aebda9871c3bafcee3f389ff4c6f1f1bb5e6da5389e04f2822da800cb058da9cd698c65d54b16e7562c83506b632e4b5c7a78d6e36ec307e48cfec4fbc3ca3dd67ca95f9bd7f1d609e0a6d8b5bd3feef00e0c4165e77da84f989210c78daf633aef657855fca26b832994000f980c21d355db10f71f9cbb8079c48aeb673c5ba097a325d9a89e05bbf960fed4f8eb097cf37f61900db8171685107d53f85bbd8c1a4a1c7045c8b6e3a8a2c4114542292555585a090d" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"9c8306c6941098408c56518a44d3075c22e02f19a6041d2e9c4e296fda435db917c99d538ab65f6f1bfab0d479a1833a":"3a80e9f5b71b242ae07ce7b617057dabae189c5468da2cf049b5b529abc877d5":"3c151e92dd3121a8d2d11604632df00cf90706d3e843737445de0f2fde1ea924":"f53cb5fe673201f5eaf4115382d48ba45be405b37a31a56e41d1d76202038b06":"9bf31156e54d7142490e620afec2217931fb2389215a3609b384b0551bb3c9d90c3b3053054046a324db9b34633e41b66114bfa7ee86bbd22d08d53e349a4dc875265b32151d3e475df348a22d5226478184f372b0ba3be92ec1b284fc66dfa3609463214b6b468b29478acb0c55e1d4674882cb75e3eaa3a66ea0f4d7b1a571206a761d636bd3519afb6f05a0f1b6bb38c00bd68530a6c9b445b6b4a9c7457a055627b606f4508ed676fb5ba0d27589b7f464271c3e561215905c50ec48f5ddd1b8549e8d163453083db96c7ec8eeedaf6804369e76760b08abcca937c497900be385db8804b443e8a1489b8f3e3e4cf367dac3e15cb8e95cdabad04f08856c" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"87a8fce521df0a2e26f1b1f9c7ec9e98968474915a085a95cbdca7d8c669e08a69b8c3c3df07f9ada368be448938bf92":"b1bfaead04743bdcfdb193d32260918ff803abbcc0d5ddc50439bd01f6e42a3c":"12a07384e9c74fb3f33df1a089dddb7d416151a0270d0c0216e085f1ec4c249b":"9b42567093112cb5889703b77b4b372276b5bbccadf86eeb9ef6d3cd395b2acd":"5ba662260aa0f743a33a9b552ce41d93335a855a55df11b870efacb7f75e39c978e730acce3664c814ac10fa10989fb00a39b584bb14cad2c02c309703c8ea8768d479d9b4e17402ee38cb82c5f4d80125f3e674ac1adb919cc8a988f79f531b08253fbad0a1b27fb1997a4e2c7bd5ff3abf66281e8b60987587327a9101b76cd13771e23ee2f02dc339589b9aac4f5af740afdaf494021c3504fdda8f93f77cdd8262df7d4c48f85b6eb03a7e5279db4d18f645a63eb6f53f9fb123c53a78686f0113a209b6eeef3b10cd4489875a07af863c467f25b69cd13b8e72847465fba025e25fe7bcb41745369f255df0eeffc3e5f066815ef7715680b104e20a7e9e" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"69d667bde79e41cb78742426ca5ebd48086cf1ded5cad7293fcf910e5ab23cc8cad75bd989c3ffd05817d1aaa5493c05":"5f72346eb50ea82cb111d5b3c91dc9b7c61c92fa1a062177d513fb616b1226d5":"0465b8aa89d9cbbe8e1cfa2e64e64b8d1f5dbec7f710a6d37fce898e3f81e57b":"173135f31c2320cccf513e88a21f2d207e00cbe4330d2f550e0be77405eef47a":"34a08d7a564515a918bce93cae084f27a558f6f214c4bc9169dbf507c3f11d02ec97bdfd777960f6b4c4543c1e14456d0079215320ab607e04b7519090ebaf3a5fbb0d7a3fda1af6cd8c5d785524bdba75abbe50e3d58e5f05f8f6b2c2570f1178acd2f4c11a7b1b8b4ebe4ddb71a85bf19bb2fb25241374530cbc6c0605066e1129a2d398356cf2ec2f7a286c5b869c702aced63f4e12f39b7ce250547a922872c36268a3a4649f6641987bb7c6baf1a3e82cdf04d11160ba11c5a002cfbcf4a8698286ff318ec01fc2c5f6664e50561991a533ad183a21e7b97e0052b0350d213738b0c6e5421a524845a861f539930540cc40c6ed78c46be9c122e7974d35" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"f1f6e5a55fb2180de436d48115aa1aa38a6242eeb0959de3690f259c1d8395a5862d1ac4843404d25215c83bca90f44e":"f467ef083c745a1bfc9be44f1d468b2518e3ff1c0cee6819fdde354d4071b17e":"fdda9f0888c4439cded15a768300d163c1e326ee5571c22ab95ab3e44b1676d2":"6b8d60c565604c8fa8d7adaf0b07ed268a491fb79794d2770356e191daa1cb50":"55d0788614b770f4b8c3d3ac0bbf628f294ba2fd16612b65d0f469ded665e3c8b82c95db80cc6b410b5a6e624151fc50bf02f279ffabc19dd094cffb17ba44b11209b923df326db14eee35a8bf1eca3807afae918206e844e517eb32c207342008a0da742e734433867fd86fd89d27ec6e51a9db3ad1adea645fdc57179c4b71de8b455ae00efc09328a0bffd8c61e3880c007915997daeed4adba61b44040f6f9b6c6427e1c23357c8f7e18b5c974b3c34a2fd5cb5e70f48df2d10c1deabd987f8390bb33858d9a5133a7bd798b1c7741729b8562fecb3d4831e9ce101de192d64bb5d757cbb21090d669afc5566c1d6e25586678b5f2fc7d6c6113ac4eb54f" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"0db9d437153149e101d5818b263b975735994dfc33d8b3f158a05760867757ab438a5024e1d43006226018c378af55d3":"275bdc5fc78b0d8afb5c8aa5f7854c319a81bb8cc9300210a9990fb7933a352e":"809da54d1830545672f180fa3e0441a0d3fe472e7cd7a6d707fee5af7e9b21c2":"ebe66cee6efbf583c881a25e346ca7d99741dacfce0d8785c659e92774e26ff2":"878a3d109d814ff4a4935689ca96b3d444bfcee9edfcd9031255ad2538871027273bad5225864e84f3c2afaa22a40e7f6793abbc49c8b0ddc7b30d9dc7b408888e6b98f4bc79e08775b599661ea4b50669132c21272f8d17fec9d1e5310335b0e6480d7075c830a44ea528900f99de61191b5a006ca4340356dbf20c62e8ffd0577d623146b12937e84a6e17c0ae08efd339c9aa979c7e21e9c56e019f7e4f375bb601b1a83c21f27a554ec05191794befe514dfbff5a3c9a0a9c80bfe9b6adc7deffd31c70ba13fcf170abd6bf3d384381e0a31fa9c81b1bd207ea2e0b4153b6a1252a9f73f19f6f099fda0f87baba99b9711a00b5f50ad88d3bc1c4e806467" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"4106f6ba6a291fa54e4ecfd9fa61b961554e4e8e03e19d9bfd82bd35c3471e8bc5bdcd2f810079c1bbfe906929e88d27":"5a7e61b86ca70939e64af613a667695c7c915e667c79998e76e55eb33fef6d86":"86c7d5883aee568aa74d25782019fbd6f5acf4196752ff3d1dd96ec1e7436424":"3a5d80e739f5a30e6bb507d82b60ff987d5bd9cbbff4b47daff278a3252db3ef":"fb146146f828e880c6ec7ab5a65fc8ec4e4d7d975c6d7c0a9bc7ce041f49799b11e235d7ac5a4ec4eea721c3323448e686ae96579233ad698a9d6fe3f5b37d87ccfce640192dcdb51c7bf35404c90b705bd97482d95d1c3e3a40152c86ab923588842ab02f4d922318a7fb84453b072c749a7f54e8ad005c29c48af6f01ecdd8fac13295e42b2077c70c7bf54e214317f98003e4cde07755e95c91f1953b29b3eecd49dc753e74aaf2b1c83feae87428be6a5aaa3261f0f65491e04c1fcdfd5481eadab68f057df3c83694c7451fded86a18470b06f1779c38efcac54b576e99eced3b5581eb5c9f7b3340ad5667d1f0d3fead8b9484a032d5f74d900fd64d10" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"5d1fcdabb70dad1428c8be291720c92b8565f331ee3438d79bcddc968efedcdb9319f5ee91124b93b965d504211fef04":"6c8c8a066c6208dbc18a40a30b9f689048877e038bf76d65acbdde7ae4c566f8":"bfa2e9ebe0d70d3b62cdbd78c775a62e0e22fa75f168123a336b66b9a2b68c06":"e48b5245ea241baeb7f665a9daaad662d7b2422c3e3711cfbed81d73691864ee":"1586e0761c4a39013dcb552a0e363e709f4303c0e575653c9b240be7449ea26e4bb1dc93f06ec958b6c06217757fc550b356c135063c00fce9d856aec0edd20735b46b7c9a8e7df780db3072fc2b314fa5cda653ba3690132f10d30ee94c8458846be75659ef3868086bcf54ff55a8db1ea65c3e747a8ddab3f2304738e0c75adfc10c23ba651ccf0de64a39cab3beef667f466391a61a87a981afe883f09c4edbd3eae98d51cd3e7b31ee179f8a4e10feac96ea210a4b8415c9f2cfeb2bc8bf51f13801dc542ba1badda1c30141d72abb1bbb35c9bb481d91db5691c44bf3526a02d0bf776304a951858aa2fcf3f45bc656abcaeea94cbdc851a914b4b3a3ea" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"9fc58d0785adbf033ce6642dcc9a861df44a35e89d06b346b165074a048b500994b4c0b3e27306b8c805c97b0ea14bb5":"e02f7a856266195fb5f4810232cd5c71a4465e1d95625c01e8e7eb69c63f6796":"7cd18b8d035b57bd01464280abe891b7faf55f9ed9910d9a148b030340c67cdb":"918c4d43fecf993227f7c120d239a30d3c315602800d6d58b9e9e0715964cfa3":"b8a3581eb4a208d1ab8f0e84e9ff3d2e0ba57703a7b5be2e4f3a3ede2e2519f5e6068c28c41171446cfbc40b48a97bc7a9a1e4d3b02f48fbf55b1d63da7cbc5b7a95f354afda273dbf5bf099961db4a4c5f296286dc0a51091a522398973d5527b2e55e0523c21fffdd0dd38527bc45959d5a711d541634e3139577312d678421eb37553c127beec64422316e48542a906cd7efe0d96eae3c4f2db7666083d9365a76cee4a207d712ddb04bf775be29ed9f030eade4537961737e3939a19e0769a3a8b96d055120c49925fe1ebc4a2ad54468421dd5465e8761b3e2e384373a971e408dd3a54907538a7d887986677eb192761959a4293523f81647a657aaeea" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"d43927d1e633fc3433536cd03617a97a3a10a7ecad3f0c781602829f8ec7feb2dd5922f2a2dee51db93bcf35100a8364":"3335a02aba1ea28d2e56973e21109e0adfb5068613c447e625fd83a8d0e34494":"bfde33c52407d3137123812c4818ca1e4b61878b8f9dbaec47935e3948a88d0d":"42597cf03bbee0e003d8677159918f5318402f7329f08e1d93c850e2a2a2f1bb":"e53c7d0b376a94809f472961acff314079014958935cd67acc476abdd919a43cd3f7d1462d0d6e628ef5d0c8e04a6d243838c61ea36b015e84d7ad59e49b45c9b04f6ec78687ba47156e429b2fb6dc2c0da4f5677d1f689cd28612cfa6d95628c26b5b3e01186153a1c25c02f5ce5fc287623358687d2034347b2433ffc1445a2d93cb0103ccdaf0c585f7f4e7d41aef310be127208b3da90523aceac5fa13ffe77eaa4d1fd058957c8dd2f355cae7f9e3d8f29ec7099599ba6c755689d53d6ccd84e33407a066506d97decd7e306d22ca6e0faa7b94f91f4eb004422ddf9dd6b1f49b6400ea55d40e25c67103ab50bcc92d100e89ba569b6d51aacddf02daf1" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"0bd69ce9a0a66dffefba83ae563e8df0fc6c7d7bdf491bf52cbf3f3777025cdf92b32217f550a1fe735b8519b44b040d":"820da3187bc879cd1f40476fd9677f3b67e02b35b6632ab68891e25f10555b69":"903b882de013695b4683316ffbd7c7809288d54c72e369f70cf172bff85e5629":"cfb5f494e76486ceef12dfe1bafd6ccf9b0754d8d2306fb0c41c0f4e921317ef":"ebad5e5a358ceab806ae5590d80bc0ba5d4061f49f4cb79a8a9da4fd1e8cb8f41cd8edc657c5180d18e62da2b53a50085b7e18b957eaf4edc975ca9d43e380434f51542dcfa947c322c708f3d3593c520717230df17f9341f02a5596b2058a27ba23f72a862b391be884570b22e20c80dd20d0a935f068465d554c8291fcd88eff608e92200f90cccdc82cb5697f0406654d9582e8db54225aaa28697bf2c4f47eba086a575298b991098c212c9e8d95bfa48f7e500c7223d9cbffd1df6f725909ab6e9aa837ff9e69158af434d18e5a7f99d1aaf10931f380d88344ad841064130cae50edf8687615743735f80457a228475bab7559015c4f45f91bdfa31d87" - -HMAC_DRBG NIST CAVS 14.3 No Reseed (SHA-512,256+128,256,256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_no_reseed:MBEDTLS_MD_SHA512:"45784684d6004731689e33e45b344d7b68dc4fa841133cb2dd65c4b326dffa901109dfac2e48bf17f2fea33b412dc653":"7c6f4675f7a0b8c424d5be9e809efa305493874d9a950cb343afdfb64e77ecb5":"2b2dbe3834d8be93f1396b19be83bd96823dd82740da71c5eeb7b21865021884":"49c322fc1bec86d3e20628d9bdc1644e6f5e0237c7c694746bfee32a00145696":"9110cec7d07e6e32724bf043e73021b3ca0e4516b619d036ac9a00914e12f01ece71989f55c1caccd542c60a9cccffb91e203fd39dca2d92c8eb03ee7ee88abf21dc6891de326c3190f25ee9ab44ca72d178db0f846969465b25a07dcc83777e6b63a7f9f1a8246dd31ce50cd9eb70e6e383c9ad4dae19f7cec8bfe079b36d309c28b10161c28b8d66c357c7ee01f07403a596366725fd5bd3a5de3cb40dcf60aac10635615b866ae633fbdb7ece41695d533757d9d16c6d44fd170fae77c15b7426ed6ec8c9d6e9245cd5e19e8dc3c8c7e671007ce8454413bd07407e8a2248bee95a7669db6ee47377b4490a6251abb60cd4e2e404ab88aa4948e71ecec50c" - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.nopr.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.nopr.data deleted file mode 100644 index 782e584e26..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.nopr.data +++ /dev/null @@ -1,1200 +0,0 @@ -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"79349bbf7cdda5799557866621c913831146733abf8c35c8c7215b5b96c48e9b338c74e3e99dfedf":"":"":"":"":"c6a16ab8d420706f0f34ab7fec5adca9d8ca3a133e159ca6ac43c6f8a2be22834a4c0a0affb10d7194f1c1a5cf7322ec1ae0964ed4bf122746e087fdb5b3e91b3493d5bb98faed49e85f130fc8a459b7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"ee57fc23600fb9029a9ec6c82e7b51e43e9721e4393ef9ad841d276ca9519061d92d7ddfa6628ca3":"":"":"":"":"ee26a5c8ef08a1ca8f14154d67c88f5e7ed8219d931b9842ac0039f2145539f2142b44117a998c22f590f6c9b38b465b783ecff13a7750201f7ecf1b8ab393604c73b2389336609af3440cde43298b84" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"ebfdad13c8f941d279dbb4de8d7706ddfdaa279f5e4428d6f785c5b2f833b69b09b71a57cf5701d4":"":"":"":"":"66e35f9b8e05a861a0b3d01c66c416d5e8b77d4d21328c625cff9163ffc92e753015aa9d7f36ae3a961681d39f271d0b627787868cec3dedc520ecb303f96a43cec67369117af268a19f5284880cb3be" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"4fc0ec777ec5a5f3b9ea06831a36acbb9e9add057dbb73a83367ba7c163f7b99a56ab64274ee64cd":"":"":"":"":"7910a801b68a20570ab0e593bd565021c8a543ba3942bd726021a7198f1d84c8806a6f9cc12d196e1cbfebf325d0e1971746921b4d55483fc366d2ca837c4fc9751fadea7b04c0a47d1e37649f7beb6b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"85a41bafaa923240dcf613a53e28d8535474e05fb59ba1eaccb5e28b1f2493675cc4f63475a69b0d":"":"":"":"":"2735fb69bfcac5b2f7f64e747c27d9957fc6a3cd0b3eee984641b2677655606e6b0ad6c875c7bf1333ab1f9b15ab1d522968059f78eaa05a70437c6974ec8e29c8ca5a0eae5464b32e9474e4fa5d4236" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"b64416ea406772f955fbd7da30c67f6a42e0b9a889d55454e03a88205eaafdd584dd54a40ea5c7df":"":"":"":"":"44bc26482a49da5249e8785a4e44d91ccdc6103fd666b480350ea3a09d8a8cf9e30c103f53559cbf55e13078b7c6949e4e90e1ef79ddd234166981f715b8649834c27b17bdf0f0689ed18eb850b43e85" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"b3d4041201f4345e0a818de136c6aa7e6b0612e1ac6b3f2f26f6ec328ac7f8966dca90e162c297ef":"":"":"":"":"d9245a4a0ab0ca97e747c0d29098979e8248e53f0ec6b91678972f3b5691e7995ad2eb99640d3e9a8364891d0ff179732d633f762d6592a4d49c4e667c699b2678929c81d9bdfc74d6575f5b727f4d65" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"06dbf57699df40ff67287ec11573b75b47e40e643c47f4db89bb41a3cb66446449b503b38a1e21fe":"":"":"":"":"0d06c663f9105198a34229b0e3fcffd0de9a445f4fc5d5bb58b55e43cacaf0c27c07e5a9c3734e8a8e0885dd78cd1bde0777e3330d2fb3b04203f6c2749a45cb96bafba3bf9d1875dcbc46b6af558228" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"cc1ca95eadbd1bdb2459f44c6653c441f225685240438aff26a3447e8f504be4c42beeeffd884455":"":"":"":"":"e8f3cbe8e1f8738b4fef6ae67662524c99cefdf7b416eafc15750054ffd7c288af1c13ee9a61d19f7163aa21f92207b66348228b56d64438ad7eec55670860fda3da9bb0773f5647c2bd03378d795c71" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"e68bbe5c6bb3a37207e6742ddb79c0b1640fcd3512909acd16aea846c8db1d76ede51d5562f20639":"":"":"":"":"5cfad20546a1cc19922f0be7b7d04ba7d8335684354541b1ec8ce0adf3607446c8742d7737a566c92fcf3b2fde205197e9aa95c739d677631e28403eafed1cf45f22fe29d3979126eaaa46a4040a4c55" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"ac79be87bfbab344797fa6da775516be0923da6ca517407e790d1e3cb052983146f9a757fa910ce7":"":"":"":"":"5b4444cb58df47502374fd6bda064cf1d70d253b994f1a6e5d4e62741846472d9f1cf14a2468aafd4ca7875b31987b8ba0de9144648a82602c19e293f2668c9519be3eb8a12f15543395348aa51697b2" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"cddc43355e651255dedf171c9aa1334452e3e830cc4c21605e927085657e7422b68bffab74d8f78e":"":"":"":"":"e57f32e6a8a847f033802a92e6282c967eb18f3c9837b8bbe5f5e8d9d6fbc4d571412b873944d20bb8a354f787c3004d0b5dd5a92bdbab600f55d1ccc52275715df239a1e2a79040862680f34f5cd4f1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"eb1a31c96683124985c9b412d16dd899d5da8c43273b3173417ca1a9392265b273221bbe87831466":"":"":"":"":"59e4d915349514f4aace3d9eebfd30b58e8246c7dce23bd4c4e47bb9ac8c2696441d5b5bb2fbb2a1b585373ec5ee55071f2ea868b2df342b5f2df48cd026ddac9114f9142db999fbcde7a0c23403fb37" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"6a086e671327087dde91396dd73d5400d59a4fc5b26c0558b7d5321e4f22584409b7e6e014e7d062":"":"":"":"":"70e17ca71ad75e40ed31629cae3fa9c23374f78e020c56e551907f2252706bd4cd4c47d099dbc072429ae53e34ed208fdae5e6ec13e5cd9b435c1b25dcbd099132570491e7c3544cf8ff2fba553c197d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 0) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"8b7086efac1e3c3c87c3798471d4afd028b8bab0217d403fb61206715d219a93505b62cd619be51b":"":"":"":"":"0dcd502c6e884a366b50f208a1b8c59ffb85dbcd72a6e2d75aea94c9692a55a45fa7c2900a277dcd38b79cf463ac8961fe54df47bcfe5a60555ee4ea2be76faefedae3ce65db4b3f04301cf5c43ada43" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"7d7052a776fd2fb3d7191f733304ee8bbe4a0ceedca8020749047e879d610955eed916e4060e00c9":"":"fd8bb33aab2f6cdfbc541811861d518d":"99afe347540461ddf6abeb491e0715b4":"02f773482dd7ae66f76e381598a64ef0":"a736343844fc92511391db0addd9064dbee24c8976aa259a9e3b6368aa6de4c9bf3a0effcda9cb0e9dc33652ab58ecb7650ed80467f76a849fb1cfc1ed0a09f7155086064db324b1e124f3fc9e614fcb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"29c62afa3c52208a3fdecb43fa613f156c9eb59ac3c2d48bbd87be99d184165412314140d4027141":"":"433ddaf259d14bcf897630ccaa27338c":"141146d404f284c2d02b6a10156e3382":"edc343dbffe71ab4114ac3639d445b65":"8c730f0526694d5a9a45dbab057a1975357d65afd3eff303320bd14061f9ad38759102b6c60116f6db7a6e8e7ab94c05500b4d1e357df8e957ac8937b05fb3d080a0f90674d44de1bd6f94d295c4519d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"0c0d1c0328a384e697678ac87303dd62c8780b4ac33f18674ea4dce5b190d4e381eb7a5b5e12b4f1":"":"0557bc052aa8eabab0baa42ca38fbbe9":"985865c180e0bfb7cdbed11b58b5e509":"f40452f8c5b8f4cbc1675f70bb803740":"4a1f442eae6c861b622014b079dfd47543176b82bc60826cfa02d3923ef0563f8deba8362c8d1950a70e80d67189fb4d904b855ed0ac39942aa8673e0951b4876354b849a6c1c51d0c35a3f4ed4e2f22" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"7cad65e5cc2888ae4e960f5d143c1425fc0785db471cc55e66451d29cf65d899a281905ff9b29e87":"":"800d583b2560d2a2300132ee2d13f19f":"42eae705c2225d212fa0554ac6ac564b":"72081e7e70200f1982c3ad9cb1d3ddbe":"953e92258be7ff61b97077252ab9835231e366dfa5b635fb889c337562a2641d3aa9e46feeb2a4ea03cb73f1f801594c3cc71d2945c11a52bb0e93419df5d0854ad5f2e36d223c119e145cad507495a7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"3084c8811564168bf7834d9a6c9d0ad0821b13a0b66dddc5ec2c90278236c08b6f657611a16636d7":"":"9a7665b3883bed37a48b07f98efa4b8b":"28bfe9605ba856073ee69145ccdda4e0":"c26d7c962574aa587b3eb7a8c29b2e08":"36908adee4c1e7ea4e2f266b65aa7d7b5113e4b4377adadf4406bc573e04374a7e8b9b9b36eb0384e9336a9e7b4f308b463bd7aa9476154ab13181da5c2da9675a376b9c82ace5391e378fdd0cd4ef28" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"a0410a32703720abf2e28e252b5b9176cb96935082bc9ef4ca7bcab78fce7da97b0158379041bd6c":"":"b70982af7b5e337cfe989703bffc09e9":"8df8b08f648518f7526c24bb95df1e44":"6775865f451ee055ed2242076debe237":"548f66f0acd9ed887ceb7f95d1c9a0c29e2f6007b92c581e615139256bea63d0fcd7a9b950e3e89419d2142c5d8f5bbcc2ba5b0dd67689b7ade01d984e303a529165dbdd140edd69c3ec6a4ddd63e091" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"c2e9a6e2e29f47dee0e808660c446a4faff465073a97862c2ab6787095e944c5276d29bbbbd7a777":"":"358ffeab6a24f932abd4c9577f84cb13":"37578c2d9b68d43d6c83164a4c43ce37":"02a7c9575d9527a33df9fb566373db3a":"fcd318c83563f72e5a21d4a93a84254e0c3bb6d3ded55c3d5939dbd5d1525062fd587a422012437aeb88589e669e5a5d57f7ebb16e30590f6debd0eced84f8e57d47a3d123a52361145a8fab258ed19b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"c93859e7fed1163b070bbefcf5ffb0a66a6f5b986116adbd959d37ea3b79a197449169bb01e0143d":"":"c62840816ae06eb725be9dd3e2954cd5":"5dc60578a6a309fae33ebf162c22fab4":"00d0fac12a9b66b7ea936411f1645d4b":"ca2eb212b29d5a38cf72409cd8cb4bc401eacbc6e59c84551cdfa12c1c8fb39c29c9d49905b25953f727ac24453ccf1c6f20a4c3fa7c33b052e4e82c7fcbab70ade865d249b6a27e0b5eddccf0567d6d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"237a566e4a46994fb13af5b2d4321a03fdf5cc54f461daf30949f86b7b223fc341ddbe525c533339":"":"bc252901f8f5c9357722a424b0af1bb1":"6020d93df16b10c31d8802f6bb9ddfac":"f9104117190d905a30c65c0a76148c7a":"70e0611f1cf70ba93e3cc53da83fc3d6064b293e90c117ec12cc79c5e4edf845b6a5e2c4ce75ffce5d18a75e24bf51300bae6443f04a71047a8f522edb370689ef1b2cc13769865b69dc232963d90419" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"80c2b6fbd576cd57c38d1d1197b9e7ad43216111a1ec8b5f31dfc1a4e05c15ed96288386d0768951":"":"1af215d9b991e4f7ddc2a89fe23388a1":"d889e43410eeb2a83cb6982f38077756":"c77e7bb93115c10a56db1245e610e8b6":"af9f8c34654f44f42914070dcf1e971884902b428c7332913ddf2e342e776e01dc2fc73cd803b3a492edb15e7cc755babc23d8a5007bb0bebd7f02bd168d055948e6a5b66a3016951697617eaad371a8" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"d8041e31215f7c843effaec3ab722e1d271753acf2ec9ace8b5730e21c0c30f9daa98580695c4572":"":"347fc86229e2e6f6af2ead186248c2f9":"a09c1b813fd11102df392d116f127de1":"0ab6c5c7f689bda8a3a7f406bf6df33d":"e09414c8f5ff2d8d6b6523729556dc1b4bba6e4cfc7a929e4561cfd32e5484918c7f21e0b533c3e3827bb8e115cc6a2aa5def3d946001564eda8cb36fa5aa771651e4837ae60beba32e01f5d59c0be0c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"b0f69a20531c5b186bf8c16b25fa1de8d6817ba362a9a00ea3aa59b018b7ce8648b7f84ab925050f":"":"2905e4b0803d221ccfba43bb4f1e3338":"0460c4ba1738dd7c662e0f4337a454c5":"b5a7870dc99f5c2ead93dae773ab55c6":"a542a3ba51f4024d3876a32fd6fdaa136c024ff36b9662ed82cf580bb1d33b531b124c0e28fd0b8ec06e50dcc11132062a55bdb961a908688ddccda12be8f1242f8a5ada53939e32d8c0381250134686" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"188ae42fbe0f4e9e17c7b0432712aaefb1667157132f8d6240fd9d19ba9f5f56f58bd08e9842e2a1":"":"88560712277f73d457f62b3769189381":"892957bfbacc684af6d31c8befca8e4d":"a9e8986ff89479fa506780b07b09c2c9":"e77187930ac661bd1a422e29cae4c67370d9e8ab0e44ea9dd86b11b2a1c5271162513587ed02df4c91b0e04158406763e72a443a196b6a2e22af72ef2732e3916cabf518fa58ab89fea5528153818a6c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"ad490819bbb9e937e0d0a749eb83465470fe146ad9f3ae0b104810bbb28773e538b466319bef5d6a":"":"e01882c8b9bc52d584274912d93367e8":"20a03700499444028da4c8fc5ba42d8f":"6574be269d5ccb5d10ad5fd6add77e2d":"5662845711b5a6c04715dcb3293f091709d87703f1a449858f074858958260ccd833d9699fcd0bcba7956f9036808984828a3a9db2041556c77b1644a7566bd8892ed53e418cb74bca1a8d65f545c3e1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 0, 128) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"aa4ea001160441917ac60f6231468f7da993e136dcce82083cc6c81b69e67ead392721ea79b63e97":"":"50f89606e793786a14ed11b3026313ce":"2445d7b670fd77bb62e0c1db75671863":"32b79488b44093ee7fdb4441bc302b70":"1b803314c8ed124bf6550bc63babf09f189e59df3d8d4103567c442b6783c32b236a107d4accd7ab3e465d29f6216349baa298ebeafd3c5cc198f0880868b8c9b67d94fd53626651200f5dfc939d4128" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"11c0a7e1472cec70fa8c1ca15759ac5bb1c73c22db39cd7bc6ab59ff708a5c1f598e75df060e1981":"b24e392cb1f3c18af2cb50feac733e32":"":"":"":"070e603cd48d56430a5ab461a751ec2a4a6aa6fb6ee52efe9a41e4611eafdfc957184b47bbb017e484ac34c7de56cd7813feb301b5befce573ad0a254e6cfe35b77c30be6b7cb5e7efa72813c7546ba5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"e05141adb678c297eebd8136885b67345b9c0c54a0ff74d826e26c9323a3da3af6e5a5a1f351cb54":"4814ea71a8e11845716b22085cc65f2b":"":"":"":"5ef29a2e7e821d529d1928e6bab16fb80d6491a98dd53695473dadead4e5142c146f1e29b101c6b1a57d8315ce34db17040c02572c6455d902303dcfcb2ad3052166de790ce0c94af78a51864efd4b12" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"9747f5a2a27c65b0bd9202f0743afbfd247b3b05fce7d31cd3e34742cffe1c6d55f8f98dfc57953c":"c3fc8430972dfa880e2bfa66862bffde":"":"":"":"92137ebf7518354bd65d87235a81c79e13cb53e46b47fa091cfe342f0253e5ee4634e8fe5fcb967bfcdbdfaa60614bf96826875608c0f1b55967619db6df24efedc86498cad733e29ee9d9e3d6277273" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"a9a8a0a7b8a58c239e083fa1cd2a8c968cfc5f074bbc31473cb71f26b82cdae4223fa32702f57ee3":"3fb4c2f37714039a1a2e6c68e4818eee":"":"":"":"1b5986ccdbac7da7fe7e792ddd445ca894b6ec08424a17fed5385ff8bd03ba782b42bc5a9676acd5be8061d535930a487902923148710ff17908fcb03db7ddc0e4b10be16c0a0365db387529a2398552" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"99d1822bc16f2e7bbeb6556c5215489ea6039f54a175ae86aaf4cef7d80ffedc37e3c68c7de03ddd":"e80fa03bd7c8f5acdda5754ef00cdb5c":"":"":"":"2236568252a384a7e75cefba04a94381941035b28de764d5b2518a98ba4e8f1d50e8230953df40db602b8959ee8f1b8831b29516f937aaf561679bac0ffb11207030ef33b26da28af93ba552c08bff97" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"305a4478bb85b0cdcb99618d8753494beee617d70aec26501eef2f751cad0b1cde509806d4064422":"c3fa490a01511e8410577021a307c31b":"":"":"":"f23ceadb881b945029b78366a173c20af93e43fd8c3be0588f811af31a7ddd653610cdfc3cd875a0f114fc1b887e4fe5042eb0dc0c36746961b1b7126950aff4c01245c215156715c7efd14c76539a0d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"15c178375c839866ab31b38b900ba889325baf19b84c8fadf2f78da359af10da64c42130f79f3054":"a4d50496711dcabde8e0ff21d3da7535":"":"":"":"3f38257370353677dee9127862305158b1c5b607741d62906cebf8babee4fc6cf1dee3f821d1d750c69f3ff5683d266df0a669d291f6816d86cd222b56a351c240afbb443e886ca194994b4deddc54bb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"7efb63ed1e07cf853fce80468049dd5ed5e55a8b58bbdd32341f137867c451d8d4e327733de89c94":"d89028d21cee2b223d634a9927ec036b":"":"":"":"477a1612c19b1c2fee232385ccdb5b2f32c845c07fa216ee410cca20245239d3220ac48770017c4d52f99a267d53e0acdf69e8f4bd1d76d463e9bdddc16bef7faf9d9baa9b9de3d397d740d685c158a0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"c7209755b92bff93a059db79883b2866b51bae337aeec9e58c87e68de33545fa20870e5e70a190f6":"34aee961eccf0b92b833f2448720bdc9":"":"":"":"285692468053547638e65dfb7c8b69aac43e16be5a4ce9898ae0d0c8f567dc27945ef6e21f36d456ca248577829b90f96a887f96e9c2a6ff2616e21c7ec93093d68f60d2cb99f2c7632f856e33ea8ff4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"1ceecebbc42f9ea1faf7494076f7937ba827b4666d0433ecc028ee75d4f55de2b223e92625e399ad":"b431a36c996ccdb5e936da7ebd216c20":"":"":"":"64d4bacdf185dd8f6eba35dc8f79fa2cab155113e020d1f12b32bbc4bfb9c85881692a5d8933a40d9fe8f6629f74bba8a99e8db0228a13c8d7776459f73dba8e59e9820ae72f8c425ac3044079c1ebfc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"d5b264cec1c7acd78b902dc14a457d30b79acd3e06a12f57cf0c3e1b8fb1befb5abb9af1f58cc9ee":"12e4101d6d4505cd43710b05d52a9194":"":"":"":"b53d3bbf4a9561904ad9e100b2601db2660f415fc5caebbb1a628b7095e6de4a3895ac5da6f2c1e1c6655d76fa5b8f75f52de41564d79b09c9d2c76c1c486f462a7164ecd76f0dfa7b5f53c0c25b7730" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"f440671bcbbb1bdafb22c06482ff670374cdbd69535d07980f43cfaf10aad2453d884ce5852dbb32":"8a69144ebeca59c330c9a4e0e644a7ab":"":"":"":"a5b42447f4d02504536df9e0ca8d98642a21b64a6b84bde4b2bc186c28b0f740ebdf2d60c664d4d89a867207bb8d4c62f1745cb3c971b4b2622423a4291e1cc97fce7128e3ecb3ec13ce08987f59b77c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"bef3995f0d2b1051554cf7b3235809fcd2989cafbad081630c538a7ba0695ffd95f3abeabf2a867d":"e807cfc52494119188f86bfea878f2cd":"":"":"":"527bca6b945db8f2cda7f795763eb5767cfa1a4195a9d9ae70dd8129158138e687a056b64f00d29e11c37a9740d19fbd16429ce4dae79029018b984a22c1a2b2b988558b133651234b35f21ff42edcb2" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"5fc1cea988adf1f7c090b14370ce169300a008a687475c464eab4611cbf3ea5583a967ef0c0ee2e7":"7fed039d998bbfa3ad62aab86c176d6a":"":"":"":"f096f7f631882f5e5a6e708d71534c19eea20a57fc210155d49fe9b872b18cc04a73cb652a03ecfa0c6dfbc174811efd0897f4bd92c916a5c835bdfb5e126048f7c17daf00a845ff024641499047097d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 0) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"9c88099af48f9053abec455b7bbb015364fd593a0f40175d9d7b6301d86b259606fbca7de73ce63a":"79e501b77f967a676fe398eb7c81cdde":"":"":"":"e8d53bd119d23cc57245a8b9b2d111811dc661555e389180e367e41f8c815ab4e7aaf5a238479117402ba17ea41c1104f475e11bb97cdc414409ac516b3b28b62f284c7d4093975279d3c31320c61061" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"03e7b41c95818eb0b667bfa8a175a82466a1e417a9b6b92fd17e98c2e50ee0db00d25c3364451e95":"126dded5eb0bc81be37c10bcd9d5f793":"dc596d188e2343802240bc7f5cc60516":"14c8ec10f5bdde6b9e75898d7f9f03d0":"31aa842afcc1daa94098241a87d6ddfc":"4739b1bcf87404a2290829bd7a61f0b391a794c71c055c7cc513b28dcb5fdc88645bc9cb490f41fab134c6b33ce9336571762754343961de671b02a47960b4b4e23c5bfb87dcc19b260b3bcb921ae325" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"5810043ca63ef5e573e118abd09d5e9caa873d3a2a2a1c7eb574167bab56e4d1ab5c1725421be3aa":"0ef00fe3e9126bc53dd61b8d2cb9a2a4":"4e19f01001d1f550ce0dd0bd4cd3e216":"684183426fb6d102f8e2ce55c599b740":"1a80710e25c78cafb81cc119adb0a2f9":"eb4c7059612d0ab63c0f28ceb7b8f89760c3d2b508f98441412bbe0ac133cafa7e2981ac2750272ebe503622b477c67e86930c9198fe21f7288394b2e11a5302e3db03b59780c49907ef720199ea1362" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"c27d1abc5afd30a3025d42bf9efeb8a6f2608470db9a90f8ec4ad2a126b799402ec8a1f210d708d1":"804004607012ed7b40ff0ad8f5ca085c":"eb2393df0be0ff471d354343c43bf2ea":"92618320cace6c075dcd69a634e76666":"da54736df5d2e0daef664e905864cc1b":"eeff317050aa3bda57bdfef2d46408b3fb2e64d34d4696254c9d8a09fa1b325bb3e3a973efe7918eb03489865f5e13e9a28a0bbb43822b9ca3b209ccaa1cd5bfa5139fe59e16248e1f468f944a0228cd" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"3f34680939ba128c07c5dc5aa161a8703a45440ca68c8d5c2b706e7af101ae4a669b46dfa262ada2":"e423dd11cf92c537509499eb891ef5f3":"cd32c88c56858cc5f6d39199abaf4543":"2b24bc6db1ece7a32cfe57df3f6ff74c":"3c6dc6fb353ce7e131f8d09635465d2b":"9dce0b5b3c8201c98f54501afce1595eaaa6e3e6b89abb6f6112b5bd5d1fcf549bd13e51fee87f0aab345571cfe7d7b61069660bd8cb8ea33406b6026ba28d02457e2bd3ecbe836829a4d91481fc0f75" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"94b31b718bc40b28cc5a67ea5e891c14e1683d0e243c4868db7a613beadf1433550003dcedbd227c":"5dd27ab3ea94ac5c04f4f8c13c767354":"fe1fbaabe7a2bdf4ffdcfac0e7e214e4":"d71d9f2a6887681bef91f5c1aaca50b8":"06cfc99087437ab7754c5d626ba07083":"4186f2a9518371d123473a4c96d23a44c89af9bafe17eb2ea702902b5a955a42b05188b8daf7ec7baee352b365f46a3b880810af5c9678df5503b5e2cf9d02897be81e409145c0cdbfb83949ef327f4f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"6b90e0e1496de9735239ab6ec28766669c65e1a4bc0f5c04e446388a90d86a1f060ad436666204fa":"99455a5df2b13410dcb912f37c266093":"a47f245fa6f0d928c17ed8956d1535a6":"a88cdbf82362f1a2ea78ef5bbcbec7f2":"eb8da8a49c4917d71df7facd8e9399c4":"99b09a0bf4d00539f7c1f3c28b60cd86b47a33961da7a649e810a97c1388bbd712c6eb0f7df4b68cccc01b25defbec42b67f4a341c0460e7b20ab67abb34cc2a3ce5b5d7d06a186f48d95a7607ba0510" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"05474cf1bfa15e12bbea7cfa9852d152ea29f8442291c64a8c9dda22ca653f755d5a5f128972d4a5":"70d00e37a88b30c450580eaed5d4d60b":"651f8ad6d3ed2bf04262dc79ecf164a3":"3e693ddf993d63cd4c9d464f2c84c8a1":"53db0c0c12363bab7b1ed57d420998ac":"590e747956e6d01eadd1c9b7b1387bfb5c20693dac84f70e2c2931459b3ca9534325d84eeef1b245d17b8cd059e05a3bf998ffb517feba0b047553633dad642e8cce5c4b7110bf57aa6416edd204f780" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"7e9a4732f5841617395ee04ade213b80785d2e4fef267d51fe13973b675bfac30716d753cf2f6232":"0e725f5e2e3f5b9cb5ec36c4a4f99e0a":"02592ab8e4e2096733e6b300eac278ca":"2f3f8e2504bfe008aa1fee1150b47f05":"2491177e84e06c3c6b48235b29c316c4":"ca50da0839de54bd9fec1a4b1d6edba1e68b47970adc36fbf88e7757af6962d9b8ead266f8aad696f920a1bfc702d8ca43c4504cfa42d7a603a55fa524c62fe49e698f21eda7025c9b840ec1b9795066" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"fc16d69df6254a9b7743ca43a64e9d1f5986d771b6cb069a65484fb4311a80479a4d00a42ce16cd6":"82fdba5fb4c04bd550eb5a8e2e4b0a31":"998b27a8e314b99b4ca06593bf9d4a17":"b97706d6068cbf8df35b28a2bcba3b55":"c24e22cf478a61f1adf5beece947e16a":"29573d54e80e43625024d149e6ea55cce5728bb456e86b75175d38ad95aeb4ae5c47270ae774374ca44e2230c5d1861ff954f9fd432a5e8367abe49a88ed8eda504b991747ea9c4cf448ba504cb7de14" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"e917537e534f9433e40f8271a799f859524ce9bb84a53caaf9eea9984d8ebff701eb7c5f627074bf":"682088f3ce89ee635f5c8ec25ea8c8c8":"085a9d20a2d017c4d3e57d20cba52714":"b07122c8eeb299295858a2fd1d3b6098":"1637261b4b3e7761b5923048a46d1eb0":"be40786139aa3966fcb85198d861f5239cbf8886ae8e814571217dd4454c8646c4c8428558ee3d80c5297add64d6d1a991c4fdcd72cf42f82d73a89b8bd2364cd119821b1bf54f69acd01a7586c53925" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"85ed8611ac58af2d6b878ebca74256d3f2f20a7a4f174822de6ea8d0cd0bdf18d395785f0797d371":"f2612085c5d8338c9b77b9b1eb8092af":"f414629fe7ae0a21b211e09fb66512b9":"b943191d1882a390032339bdefd19351":"4adac9816998cb105d1c4f7cd3d53764":"dd79426f61e81d86561a98853b7e187eff7db3e8958944cc10a74e7b12db3b08bb4436bf64694c5b8bf1857e791ae7194554aef6b48d2b33ad6854bd2e9771bbea3e08c2c083a82cb07d7242ce22db2d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"6652b1c0403ef16416db88e49456119115d3901cd7dce343c718324222094c25d85c33857daf5b28":"a580613da8ff7b06580db9a42bc0cdbb":"923014039cd117f924900cd330607d0d":"8b42f93d2ccdfea272f7a03bf37b831d":"28ce97668d6cc92da8ee25077cb25de9":"d31dd59237b3c8b2885838840261727ac116bae673b554fe9c8b0c64b1573a25bc4a14c1942d80563fb4165c57e1aef5c94c1f6b1f88ec6bb2bbc10ccd8149d175e4965d07341aba06a9426df0d0fee3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"f297186aab4f63f6fb85c4f29d659d6e48fab200424d67dd52fcacfe725ad65c0a47de25690c0ac5":"9414f702fd050f7edb9a648cd833f8c9":"91d5eb7962ec1051004041f5d23ffc34":"94afc7023650c2edcd8c957e320b04f0":"b6b79df82780297261e00ef05389b693":"ebbdde904350c6d803fe258a3aa7a63622f2e9540f03b1cf687e20ef35fc5ba6b616254710cd4515eaf69abfba0ba778b87e4ce1f9f1fef34402c6e8d23efbdeb7da53a3db733e69527d36f24000251c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"90899d2da97759cc609f956f5f391a0edbb422f45afa0c7274a2ef5da636fec70c6d926b2670b88d":"23261c0e7226d749a0d7d0166e92dae9":"8ea2e411827c5d8b54b24da8ab41a841":"b9ee1c9923240523e7e4745ef93581bb":"bb0f785972cf68222a5eff4c7dd3e28e":"2af35b1fba0c62aae991c12d50c86ce2cc633224b158b157459c41a5444072e918b4c777bfc84f8000aa238a46c5d5258057866f2484971d2708c33497191a2686f8ee9e3657616e00dfca61e0ffb8ff" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-1, 128, 128) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_nopr:MBEDTLS_MD_SHA1:"4e8227e8422d674cdb79e52cc30b7b84f81cc05b03339704dba3e731fc81949e679a4257c5fd68a7":"2d6e4af02acaf230bf746157ec624ba7":"deebb368a79c1788528b589056b1194b":"1dbbc7a131e98344fd748edc6fec11a0":"0266e8a066dcabaf6991c7a91e1c6e56":"e51fc833a60b099e56996a66820368f5332822c8f9dffe8459c80d2512d451e1669ecf6e562a1c295fa6981fa651fdd3d8d936c18f88d5844393a2a371aaac8f485cfe92926f1a54980500edc43a0a6c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"09effa3906a5e93d05530edc71e62b39c5e4da020537176c23823da52dbdbae8307656cdaf8f861471dba14533c880505874098917e338f20ef8d8a1":"":"":"":"":"d5de8a3388b11e45085f6d9a009462947631c4e74523080ccd03a0196aa56b63a93a2939f490e9456e9fce3e9000e58190991b9aed6d145ac18f65cf2b1c17eb021acc5256eb6a7e9023f62aed87d15ea4e4b328f265cc34adbc062d54524365cc9c5073a8371f35dc2f459e1d027515" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"29a7071e686936e60c392061f71b68500dd6f11c563732fca9dec3b2f859e06a857fd94e3ca1817872d94c2b7c2f283a0d2d12a6443e95f7e700a910":"":"":"":"":"72c0f3cb7792bfebbc1ee6f65d40d118a6a1c4e04e589c8f70273b4c7b718c9df383658572b894838a311fc0aa2aa6258758b33783e192b0c3c1d322809375dc925a05605fed8c7e8fb878fb63c84ce639fd277d9955f91602a9f4777b7c3b15404c4e761ec8d466674e32136c7b8bdb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"abd3dafc85b23025792bcdaf9f410829d3201c1e8ca450e217e13ec2e3b744e8c54107174a6e69ad05f643ee5cec49cd47ea88c80b96a0944154b458":"":"":"":"":"152333e16b04283dfb8c43dbb3be43b5db2ec49a399facb65cebdf7ca3ed267792ba308cdb0649b0c19cb1126b144d5766b5afeca98036a1f85cd2cfe3b8071011b69b2aec382f8562d9dd4331a554f3a3ee632cff308488b30a7416be8bbdee7e250cd12f371d069a097e9eac43031a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"caa286c160d22af10922ee6088c269d0c963034e5fd2a85d2fc171d0c4ba0833b630a64ab09965f132a744656631bf2dd27430c7c2d1e59cdcf43a97":"":"":"":"":"4d6132b9ce70470dd36f551584ada639e74b85fb9bd3c3e350011d99f2dc0371f874e6b9d92eba3fceafe34e574c1441d0d476c475b704755a28733e31637962cae67e849bed18d77501383cdbc27ab6f60d5d8d26634ef39e2c60fcbb04a9bdda8bcfb9b2d3aeec12a21279ed553343" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"f79156a2321ba930e15109501ead80a3b26c1747b7a9aeb922d1a9d474df64a1fc3483f10e88a7fcdde91dc06940c58bf4d747b5a9cd8cad2c2e9870":"":"":"":"":"1b3aeaff973b2e20cee947ff283277991842a22f45cce9d22c1705daa51a56ab43aaae1b51bad7a7363edc7b548a0cec6b376b925a6e35bc7dc3b4a33a7f3b57d66b1b35256908bd2d8f0495caf2539ba4475d766c21c2c2e4acff87fefb07c662eb344d9c99ed407165f8a09a22816a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"2dfeb70fc433426e23378d048b836f899cbff52d4a92c6d7d218e3aa54c06793339a752f86f03b7fcf89bef725339f16ab1cd28ec85c20594bbdf3be":"":"":"":"":"d403dd8a6f3a914933253db9cd043421e54243a34043f5ee11a3b6a627e25d944434eac22a00172caa607ebf7de55b4c4305c2b93428d5fb4cf0a649451ec7fc5da65c4894cf4d2f3d52e90993544237e5c58745441c9cb2e047513ff81d9cf980d8b12769c21cc8c06f6d583b8be3dd" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"2c6ba987bb61c4131138bb8acd877763c2c7e1f86289a81b6b54d1d8b399b5a5ac7171c0c9c0b5943bd7f54bf72b20307834e971bb637b351a756823":"":"":"":"":"7ff01def84626825fc22a62cfe28f5f95403bb2618eff22529b6531aaf1032100944d5f9703496d165c5756c0aac55b1812a72940aa5317fb6a2944d124e7f65766f231b6bda06100c5ad0d1b37c488e0e9f11a6d8f7e4cf7337e04d094ea9de2db1bbecf40e0cc8d1fc1cf5a01cd081" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"ba08acc3a00b9b40d2bad8cca4909d3bbec5471f78d0bf89a805d839b8b29fb753c9e5d3674365a7055a187a238ea1cd04f482d24d856b67eb54d71a":"":"":"":"":"9ec6ad840270051313c5825295a6f7527a8b1b9b3e7c867e5642a984b11911be60614e5737d3a0d109eea4223f0d2ee63cb19be702291a771b2e2c277f2d4559176fc5adccea52492e3d3ba7d17bad5b5f487d783639467997d7668ce2173ef777f9e31dbecb6ee716b5cedc8bc5098a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"95413345228eadb85b67674b9981af34bd6a4ae04866229921be928c06e6a6a6fde8d31a6a88f24d6a1114ccbe08ded9d7c50c3360bcb8908a615381":"":"":"":"":"d4dc08e36f94e88f8bfb1919c13186139591edc681affb61c421d32dfda69e507d59495bcadd39b73c4036ef440dc598e339473caba60e0770ac4729264b1dbfdaf32ca6d136ef6810a6660fa5cbac91940a28053c0fa405c7b6ca5e3f147b5e0096f36b67da9fce64247cfdaad70fc0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"9b6bb9589f41e8ed6969dbf1a3b3d242dd5e133711f72549334c74190e4efb1d0452016ed4fffca9561aaf219e6793bfb6fd3dd9500bd61e6a62db66":"":"":"":"":"cee02e4fe0980afe6ccbb1b0d80041ba9841461397494f0fae5188228fbe9822e3ffc5397b7caa29950d95536e7000e1249e5bb93a593e659a49689add16d2f5e02ff251c76716dc426010c2961a176bd63c29397f6e36cd4de2f2b11e1260b9f9a00bd49b4b6617fb056b82c92c471d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"f276ba0da08274a082f3b8ad989a713908873b742f96bbbf8c81b4e1a7e4857bc99aeceabe534c45105306b14860883cd56f2438a7812b43f0d911f7":"":"":"":"":"24dd3eea9a8e1f9929ebbbc2a68379caec77fb42531a97f7f3a75d16ad053799ffc25cace4f4553c271ae360eca1f5131ef87bf0390b26785880db0d92bb351e6e22409d600f6dab5cbb2278b8784e67a40be4d8ea6d994115c67b7224d721d1b3c7fc5b24e15f97eb3bbe33798d1bb8" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"fa5ed9189f21d7e94764bddeff23050112868cfe35220b863e8112f691c57e6d6c4a91c752c5f0b37b97d5f3e383480054877f319a568b064e6562a4":"":"":"":"":"55eb5ef1248b5a34c741f2076ea5d568da630ce4720b7e2c86a9dd535b48faece2229866a36024fd4114249be4730e554b772d557ce3f8b9d4d86d91202582213a676a076b87f941351c7606a452816db5d0f8194825d402d2fe7ebb2815532091b3830a9616918bb0e3298faf037bf6" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"d0c5003a6168163f707b25191b51211dc1ae361df1e069d0f284f66967aca4199809dc89368164213ae17285674e5574851582372fcae8cd2733bf4a":"":"":"":"":"24910e1a9304471d053af458bc3fdef527e8796e33133f5af005106b203e8fdefb274f1c0e8ff44e92c63bef3082c6e5607a7981a6076f1a1d15368f4330c7012509d5f61b4349224a87960bce9873725145f187aa931394c449f502d12b60655a0ab2a221134a51786c3683f9ffa2b2" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"bf5b5d1c891f7a6f2dd3f4d486d693fbf67f49584b7f053aa96ddacd9fc0cdea0fab8209d8f4335820ce68bfa04899b63cda15242e9cd3f7acb1f103":"":"":"":"":"710c8b33ab034b50a29de657b93f3c71df4727a5219a474350c88b4e3974ffd0d3452e8c4d26f579e348f39cfe0d20045a70a866c5e16a0c22aa0d69b739f74cbe8b046bc14cf82b86498460bfb26af0771371c2750f7c59320c6f6fe1d04cfb40c048686b6c1b69dc641b8957c2c341" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"525615164dce0dac5397b357546aad049dbe5982da2c215a233557553460f8505a3e7c8224af561190099ee21a06d62f9f00e282b32b486e8d0e338f":"":"":"":"":"3fe96c9b10c4c8e43cf3cd76ced4ad85ae576f32ea6671ef284f7c97491b72152a18a1060145e4f5e7c0c373c396cb4c8c0b6d625c1f0d2ae95b0691cb1c80a3dd5eaa21632a82aaa28e09a2bbdeff7fd8812fae46deae14bbb16da24d06878fc417b3554fb47b0ef9fe18d1b9d4f4ca" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"ca81953d50430bfb09537a318a1a7b90a9200077abb721e55d9ac28946fbf75d9cebc81f11cf6d4db712a3b91d479e00ba30d736a763cbfe40b91448":"":"e50aa8bec96339cf2608bb82cf038d5fd6bf93e65271cb72":"5c5eed0d98c7fc7eb30acddfee002d5b99c965949d4e2095":"a1a7cbc79bfaf4571cd8020da094118d241b3f018ec823ba":"c8b7d9c15624ae018a8612edf6444354c45c6a788272281c16526c689a3dac36679e44d89c4acd7eb58ff40a577c3d1a9f4d0175feef9ac5674c115d5e4cd17f2369e0135e33b018bdc99e4099713ace986a145ef55e868f74846feb3592d44ca3ebba6044a928e9284b5ea75063ae81" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"b96ca1202fa959ef55a683a9021068e14c75376e15d1f0394b1c091a8b6dd6b98b6f63747dae58c29186179b4155b868f5a81ca206a5086a5759b025":"":"a35096086c1fdeb1fb60dd84fa730eccedd53e5b127eecf9":"a3269fa749e55850d4aa9e466bced0beab2edf86b926c2ae":"29f6799f7c78fdfa2d0dbdde8381aec5af249556903f6313":"c63ea73e1ddc9d55bd64a63cf73f730136ab4f6d688a9cd56b945f9875ef4ff48cdbdd8b78b898486a685d8af8cccbc2a834a9804e566ee7138c7dbf488d263fbd387041f835ea46ad27cbd66721428ed5795f6ed044cdb17c8e7e3ecbf61dd68239e8fd644ae85776050afbaa06caf7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"59af1213cfcaeea29e31400ab6b30f108d4a9a77d3b370972d29032cdc612b7c360c41f16b0c9d794219300fe0551e0e66d634a4eec396c50ec9604c":"":"66ed9352bed73224d35508754aab68fcea10aac06d60e888":"198a3526a67a0ce31ad0348bbdfecede4f82d4203d1d5ca1":"03faa2f4c34577cd8b2ed53e10c68c83c1ebc8d877379178":"5e24f1a9083f13274ed1020ab6935222cca644d0920839c2b142e2780983204453d2e6c58518cb351188bc3e5e3b64015882130d745511f004cfb6b64831139e01ae5bba64b74f1a1ede7e220a6d29b1067d7c68ba3543f4dda2fc97a3dd23590c2c18b85662618462ba2c05231534b6" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"e6cc94c72f37999f28b5fe350bff622b433ae19111786c747d954adaecba47abacfea8cdf5eab05e2f750c0a679cfb9c2c2c071461178a054af40967":"":"3032528703dd66e42c7b6b5881483eca41e9eea503852eda":"ce8c03b0a05982ceadb516b1fe513da2403a9e6dcd7a39f0":"3f7ccb55376f23dfac1dc13be617894931f9c13d15fd3dcb":"558656cad7da2ad87a7a29ec5e612addcca96d72ac7b224cde80ce386c6efda12113fe9aa8e511714a42edab53ea0289c75d34b42f2313ac366f51f5dd3f6968bbd4c09ebf840dfd03852dedc1e3b6209d932889cb04062c644482106cf8b7a237d2937840f0c4d752d52725b5590d15" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"cd4dcc8fb50672611f19e0cc8adcf9285f9d76e7e28bcac34e931163f8057b9f86424e5d514a13c0a25bbb49ee485501ec5e21061e006ad1569d2610":"":"24480094a44067b86ef47db38ec3e62914351196358bd9d7":"c6ac3b879adb6c150a8ee44428c333574ed9b0d6806848d8":"92bdc1514d87daaa321655d56c6302878c2bde37700163e8":"21c51a1568aafb56af1fd424f6fa146113d14d6d63e1a24e3168130ebc10dd84925bc4077c41897aa8b3c73aeb5bcf392d496dedcb6487379bfb3e12bc07fcf5c196d59fcc1fa730e55c00edaa2bca7b1e32a40ba06500ed3dd7fcab361995319979a0fa9cdc406a4d20650814e8bfac" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"fdca0039e8485a06e6a9afbde5b07a1bbe49e13659a2164034289639d23dcf3f9874b8fb1a1af8495b6b2129b88475cc529c96271bc1bbb5c7c2ea03":"":"841f765ed5f00be838a270730ce5926659cd7cd9d5b93ca5":"825fa13ed554973768aab55917cc880183c3ebb33a532305":"736e9de931198dd1c5f18a7da3887f685fbfa22b1d6ab638":"dd8596a62847a77da81818dbbeaf0393bd5e135069ba169f8987f01dc756689342cba61d87a79d4bce2311790069d10709c3a53df974c7d6793ae1298253f13ecdbb5680928579b73d73afdcd24a703dc9b391f303d8835ba1129c3d46237ede5e44732a74f8f23b60a3a45ce42f042a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"e246e3f95d89c166768aac69fc95fb49eec49aa633adb938ce1705b68987aeb0fae7f57b7e99e4f3e3e1b1db2d1fedf443bd2618e95193cefd905e1d":"":"130701f88cc1e7545980e6c6f6cc76b0336f089bb66cc347":"95533f4cc247c887d6a7cc0ca753009bf034ba95b7b1d3b2":"464fd16f011eb2986d9982879d79349a3ce4f5905bbfe832":"0d4e6b03af7a648337abec2efa585908af40e88d1f104b3e8c352aa29ac79fe8e448f36b0dfd701a1fc0f1d86dcab7e8a8ecada6ba218d9aaea1c40aa442ca51f3116ced3c9b8ba7546688ed4f3a1378f76b8a29ec763784fc82906dc0f688c5e60d59e6d5284fcd96f361bc5b285465" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"cb0405e58270cecb34a9951adeb694c5513c499cf310f6a99985d4fb3973463e907705740e01aed4ca221d4b03ef30e69fd8dbfb4ea919a913800a1a":"":"0b57e688472e9a05baa3920417a2e8f9a9c12555fd0abc00":"cac05f79d9837c97bb39f751792624983c397fd288dd1d95":"344d2aa2b3bad1485429b66606bf215acb0a65bf2a318f6d":"b2a13d75ad389514149763199d711092a9b0e4f1e50809355cfefc1884a94f4d4a50ac5c5da0b4e9bd7537e413bb451fdd2fa77f1f894444cb5c81e4c43978ebfd96900a2c8986c885d0faf89a2ad5c6ef922dfba1b5219b0f3c4ac2095340c3b8bf0db037171b6545741c76217b2aa5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"e38ea7584fea31e48ab085c44f46b4cf68ff24b4a6b0b25867463e4a46ddc9a4de23f7272af1e9c4e0391aa9491ce7cdb5f96292e0d65cb9a9a4a3cc":"":"afe267e1491de3934054b8419b88b16731217eb4ee74c854":"bd0f3c43229a0ffc9e143e16738111e16d6a06ebf3eaa5b0":"23bd14ef8cf797cff7ff787df8ed8b87684fe7a9a33bf695":"c27a6ee5bab8f8e93783840e72894f3b024c7d3206a4a1869ce6fa8b5674bcbd24d4aab30f9866d797d850423c57684b7697913b9ef7bc0be933d0e21535bd50fea0feeb293985261fb9d4eb1ef97ab5ec6b691a08db4c8171e63745d14fb4c3a03c41f906daaa2877b7622b254f0449" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"71dc625242dcb94e6ba2bd013beb2112cfca576774e102830503b7aeda24c2c9d862f5212975ccc019ad2ea0442595f74d1d37dbcba0719d8ea32ba1":"":"0fef9f0934bb4485bfab2431f8811d963ec7fa7953ffc213":"a6a7501c4a5a93c396ef8cc969ebd93cac1c30b4783a0617":"c58ea233f35a22fd9b01592c6026aa17922070b3604c7118":"a1452d85799b54370cff65fd6dd74b575199606cc8fa64880b26972c913c372010b4c3f4ce9b7b565a8f5305072404c7b9d70f7aef6e2709c1694eefae66ffa80f16eb4b91f8041f4487427e69daa437e183e83d3b9718ba6a23fb90365884899e0d2f0bef56b27249f65e1c00c5411a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"36c1e048d16f9d6035c6b62515afb929633f356fed6a654282663e2284fd4132116d21eef66d29629bc712965d960f18cf3f7dcbf8a3ccd61b5b5fb5":"":"93bb372b7ae1035de6f13b2a36c3ae5682b9a3ea8f444383":"9715b72e4755993762e11a93857f1d50a051e70d094339a5":"2f1e73945863b237f49d6d20d0999a0203f295b9a046dca2":"ca135891b47f27c26ac891df49c80d085f90c13d236a60f1372eefd81eafc5819f4ae5aee5b32d46681be01629b078ae965f67b81a5268ef0b303d09e048f4449f5aaa11af51f80151b4697b13700930167cdcb3b6e8260eeb8bec7f6a67a2050a6ea569c825d61d4858a1cd15f70fb3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"582425e13356e7a840cae9fa435b220af6a96fb53ac91e7ee22023cf6a0eef3923907883ae540be816e0631c894520b86e8c6adb8152e55cb6aed5ad":"":"227762e137f9eec6d2b3c63476b404dc5b0c68613a93034a":"fba72c01a9e51c93ac00c1232c717d32fd4d4c791556e716":"f5258bf318457769a93ef5b3ba95fa2753ad1c5c1b81a785":"c753a84ba7f41af2ab757ac1e4c9c450d2112767ff55a9af8f58edc05c2adcaef7b5bf696e5c64f71d5685593f254a87625065ee0df51ab4f7bba38faf5799c567d783fa047957f3f965571a7b4cb477566d1c434d6b2e22ae16fdf473a6c03057d934a7e25f0ea3537be97238d74bc4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"836f5d7521f26d884dc34af2ca56ab4a752ea18b909085a87cb6d07dba32b654390a25b68ea7ba8fb790271c712f387145052ca46cb40534355c1666":"":"99d9aec334666d7c399e453455ef6ae884c2173e12e31cf2":"d74d20dc22c55c35f0b66a464dfbe8f349616916fc726298":"407b0951404079fb3b54559c0286143d9cb18957bed7fb1d":"809f372d1af60ff972049193fe9f173684a2fc9828b60b32164c1b6738e1ba6aa12cf739287a74c6ad528a3ec00095b590b44705b4975236a0b7ea02c1213f0e830f275f53bb79efd98679c4766cad27738e6fb777e98cdd606b971fa60745289d5ef72a99e1919686a53a241fe36cf0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"e555ed6c7ab344fea68d73c6432e4e6da2e67d8b33ab79e5719a2def258a852d17d93212840583fe23900949c301a29fc92095f4716018144e64583b":"":"5262cccd138256fa8424801435d118f39b9aa1db4d11ca9f":"9b55d76b743bd7fc5700fde8ffca956c0ed6091df1a22aed":"f8c99af8029110c41a6a01fd2d3d12b7103aa39cbeea90c8":"d1ec06e38af7c6e0a70b73ac62bc3556183f99a47bfea0f0c4a59e7ba4b0718df5438e369ba14be84db40d5ffe8a1a5952edfb83f61ee4d984e3d2fa67f557aacc58291cc688fa29be530e66c228e68607e25c013473b4ffbcfeda721ee35f5dfc8809528eaddad8969ce719a411216f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 0, 192) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"12f2cabd3b6f640daaf27ed6cf6bd7d06e2ac372733c6971739e36afe2ba1ebf4e7e5e9f5591480e3fae752fa59bb99a1949bdeccf0c100f6afe886d":"":"7766c36e6583cc8e3c26a8058fa0923bfeb3ee22033f46c0":"63e60d1bba9aa29adc3f3b8a5db53f3b703c7ae69bcbc2f7":"f416f36717ba5f0a78125ca52ccd004b2f4f2dcdd401f595":"6196b2b4adff14a26d64f440b6c160210266d7f5b77d5e292e94b8c67bd9cc774274741e7c0c9a7ab21c31f1194ef4218ddcbbe94059042d22ef44ecfecef214a73db64505d46d5493d7475d0684fc0e431c5265c12b35310d4404b3c4db6029facbaec88b0c0ae9799e5af0aa49e842" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"2c50da90a1f7987d5216950ea22689584b237647d96c1239f9251942f4d13d16f418b0cf7265b91c4ad97a7acbbda065a48bc1bc5c7a9ee1523c50e3":"a74c108fe870b91a2defa971fa1efcb7a209f293d29bb5ea":"":"":"":"8853eb47c4ada94a3d58a1b517784bccc8f831d02dd5239c740fd7caa3869c5ff7bbf522a78be2d510c49c496a6657a09f0ede00daee9fd77061b0f04e7342518dc6ec1f4a7ff99dd7c783882b58f5e8bc467516c6b85985fab65c6761d4fe756ffc27fd62cfb92778391a258d3b0b0e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"4606e3e19a8a53e8aba05d9d1fda1ddf15e7709aa2bae8b54efc4a14e734b45a5cbbad00a749d2bde540258de74ff8fe886d05570300af2086d0b9a2":"23ef5fbde4b270c084a745e0e299a5eba228a37074fd4f07":"":"":"":"8caf86df25de5cbc3749fee4b64fe041cf4ef2859e20704bb01abe126a90ead8cffc427c2f98aac400aab97184846125a2a66888dea9c8aa108e96e03b05bbd30e566fb90c661dc1990ebfe75f73f5b0de7be419c225bfcba3713805455dffbe5d6fcc98141743b59c2cbd70e78f5977" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"08e2e2175fb34e4111179fc2580c05afa16d224440cc7eff24082beb16133a992fc4f4e2762634fbf68177dc3f11c4d057b71661ade56e7768ab9e6b":"0a4af33e2501ba409b132459ba97603888e727aca0a0cee0":"":"":"":"39c60b6d9f85cb69b2128bde86aca2b055e21ffd7716d789f834ecacc69a043893b09459991793571d3d8070f03382a11bd1c1bf38e86fae13a932c6dc82c540fab8c8eff478e598d3295663ab75ee8a56376c0d607fe43b74ac39479b8f694a3a13826b1b96344ec67b9eb0a5858eec" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"b436ebeda1119de3fb2b2e532f7ebf59fac632a4d784d904f844bb73f2cade5a88d4790c8c1d5973fc73f6b7f929303b62d30b6818a25ddf705bdb9e":"07de5589726c49dc5a764de9b41bce74675e4ca3c71769a6":"":"":"":"2099fc754ecd19a19de8afd21d2ae2ce456c32d6ce7772a98e37ed47f54001f44fad8e9b591a70d3bb28f19bca22940321ba17c33193613b7b5be1ec54efa470b70cbd6be2931193c35cc73d80c139bb4e670e1a2cb74d3bedd3610e9d0f9d154372a70b608fef824c346fb16241b301" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"4d3e993c296c66983b9c751d2c0aa2d519f801a764ac9f1fd8d86b57eb226bdd9f69efd9ad29bf16af483e7dc170f8af65c16426c2ab7c0fa9df0175":"52ae4cfe985348408d3678d60259a78369aac02953911e74":"":"":"":"bead2cfc29315133e6f5ba2e85bd7778dcf9908081032ee634f90b0124ed9371c9009419b9e2a409fe4abd6295cad57cddcb6042986cc98f2fafdff99f7cc1185f3ba0d5f1e5f5452ee5f9df03c0e8a4f8426ca246afafe81079c2f0d165b87056e7c8528e8cccac5f49d0bb5ccfbefc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"c7c4e18c56e9191ba43c967cebe48e55bf9aff4d6449c3e6a1f9846bfd7f92d535bb7386c0155cdc5aa2beec888de0d432f695ec79b1c78841ad941e":"c36a381b1b36e6ab00ea80557b5e7451ec9771101dc22580":"":"":"":"da74b23d309fc7cf7670d7feb6cb6ff4da1b763ae2e8616edeec12c71511f5a24b9c466532283f4151a902ffa5ae211d7c1efa84477b93fc393ac95522f3673f97aa9e379e48d198d5929684875150633fcf8a0918d2050551d8daa91887f3d2685737b6456d0c61c0a117413f193346" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"78426f865483ffbcc6330db2ccd65bf8f247706cedf68d4cbcc289bacb1ef32e5caf05f28a21146a9b18e77b3a7ed0d24a0803c9af7264fe4e23d692":"e5026090f9806ff6f158c4a834588f6a39e9b4a44ef2dfa6":"":"":"":"111cd64a9950cc6f20a1b38811fce4a08929ca2654bed66c0cdebab0b81552826c06ef12ce463fc9c91c81a35d2ca0553905922b9a4975fa8fee2c7f9ffa9f2ed8cb2609f4b7d32a44927c7b5baa8f43dda137aba9b49a2b0394f7f67d37b7f71a5e4f4c151db6b96e8e4dd9cd0bd84d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"43ca11d53ad0198e4db5e136de8136bc461851a30ce59521f931ad0596d13365bd8297a68dd42b7dab7f40808b3ce6c12f14d4de741ce451b6637a10":"532b05891fe406ce72421013aceb434581be8a3a13549dfa":"":"":"":"4c42f791dc8322d779f9a1ed9a28b0cf352601a4ef6d74e4e822ee5d9eef06e700314acb7a47dcbb62805babdcfdd236e3022374defd44bbf747764f72fbfccae10893b54b29966aba448435987c22ace4c931d01dc945091860cae7744365bd9b619059b8b646b229878966049cf83f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"ddcb3024b681e30e16e05026d8e23977497fd0b2c0ac24017de2744edcb097d3a104d4e3c6b8adcb554746f9a43671f0692c01a8f89fa98ec3a54ac7":"bd9e41974f6627ac5bbb21ec690eece459e1dcedefb327f9":"":"":"":"741b2a8e82aa3ca9f3a609d05a6e2d570be463ef957f235344cdf9e0f89b3610951aa1ef0b9406785b75e59c2de8349d435e4db82fc2a4a8b94e366f4eb13c432fcf8fac08f0c7fdbe67a44e81706b53b460f78befb8cb6dd2a0ffd13c87df84f8a5197ed47158cee171e5323593df4e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"f81c4ba8605dc14072e2bda2d2ef64e71ad856061056b8d8374fff5a6fd9a54a814fd725bda8944037197492c52c62b97ea02df33325b35b91726839":"217137084f4519d046ec896144cf2c301baf911e1440852e":"":"":"":"14efd71fa13dfbd498bbe13ffa24e646d04ee0ef32c99c11004c3e9d8f748ac2f956f9899a72c8d97ae988d06275855f77a92bc30f1b957dbcfc93fffec3852715c239c5313e765affbed257d302b6d1b74977b8012522b69902adb86efc1ad768d99d657a5375dff720b4cad886877a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"8181fd2cc5f7ae2d4ed2c96b9511aeeef33e50ecf164afc4eddebaf76a96d97bfb40377959e1edc44d24df041749ec6239ff226e40d5a5feccdbeda6":"7d6ca5ab652a37cd79367d84299f1ff2c5a3c2331c77b98e":"":"":"":"5a2cac8110a24e1d8c5f8bff3e82857ec8cfcd469c316fa18b0f65a0d30866e49fed2a228121f50901dbbba561732c4fe82a98f341bbc0a397fd257a5f8a4a9122c991648b1a6507c82f866d26f9b22e0ee7c9a51c4d8e5104f0b4570043c9257bb9dd6f3730f1daf94f80baf8907acb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"a0ad012a978bed2268d05086b823f5d0dc9bb98ee03980d755bce968f9ac81db886a2a05b59df40d8346334a0276b73f528db03a118545acb7f2d70e":"1a8aca3c118f2bc0c2196df81ef22c267d20ed7c607cdae0":"":"":"":"b9dc0eb1e4aeb482dea1b4a5e6f6ef9636366face696811db2d912e9430b303f23ac95d65682694ef9513ac5b3e56a053b2e1a2ffbcb901c375cd122cab47d31fca5a0606daf8cc2e5e6e99b90fc8ab4fa67794caad91985cc92b2187dd2965be0980240d9be2fb1c4bf06e60f58f547" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"f28b143468ab87794230cef4361d047236444180d0cfda58cbb9494cd1ad21be96297ff799011042013789a928f18831ffb0169126dd046c774a4fce":"ea7fc50e1eea3d84bffcbf83b240e921348b532e7b33f094":"":"":"":"5c22e92f25acaf98f55ff06e1bd80d382da754d1d33cffb6fca933583ba758200357551640c439770f77f843e9ce1e9a054f69588d76acb9cb92b7a2fa2903bc51391bd7001ccc1da67a4cce9e5dd08c2d489295c36de2c148ce27311d0789310de1cab2641e92f859b036383a8058a4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"b628cb448e477cb439a2de687861a992e738db6b2b25cc6c27aadfc3a0a640b3411de49c920407303e80abd7a1d4f45c4749980fe1550bff69518210":"d5f4f8266da9b7f17ac97734201544104a5c0acb53c6bf22":"":"":"":"34a834dbb7da0b6a2e2353bd9795bef369cdde4d172b3feae7b1d9fdfb0446454cfb1adeff423d0a143c33c0e0d8e7905bd1720889e8b1121f1ef82cf15443c2f9c8999c5573e7df60b52ef395ca1d1b60e7eb721c012c344d06b336d519fa2b7b6dfbed8383456504bd0b4893bf2ba2" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"5c7c9690a1926a4580c691c2e5327e736d5c3aec0ce8f5d32d4946bc4b607f712a8759428b010ba1b268b0de64fc5eb32d3f7fa9b8d4f20fab45c72d":"0310b2d8b5655cbb0fc2041ad15a248a7b1f2ac78845e29b":"":"":"":"6f8b6df55d9d8acf87dc2af20b7f4512f9425987495f512975de8059135e7ebb8698cb0301a8816e7299e76053cb66051c8b35bd2b00b4695cff4847f168d2d60697495cd9007ab7dd74ee7f61ee90b7827543f624b7c1412bba3d6df1242e6ffd90534ed393341429fc00bd97d9bcb7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"96ae702af50c50c7c38818a5133938bd7ce51197fc78e21815b6c5a7ff9c0395d764159f707d5813e5bf47c1b8232b44a007bf7decfef499d758ed53":"e96554644097e9932585b7f4bb14d101f24c8b0376f38c05":"3f698a5f6f4fe67ef2ddf23bd5a67c1a2df4f3b19425fb85":"fe1f6a90fc0ed396bca21c0d40a1bb583eb63df78c98adac":"5942b56148f27dd5388f00caa47ffd4925e854237fe14454":"150b9260ce9aa419fe1860332ae7c9f42d9ada1649679b53f46bc9d20de3431186a54afb5df7b6269cdc05540a93fdd50a2cd3a862372d862841768df02846b057993dd6aa32f874b7220a5a1fd9cb573d720a54af5715cedfc16f0d9a467735e253b2b1a6e97421fcee1f2d670dec1a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"4834717f669d9b599f0ee526129057b5a7c5680724ae0459ceb0e0d4eda21e5fe92e63fd23f08f8a0b094a85f3f377fdf1018ada0c461b5a05c334e8":"870b7857dae97cd361a005c3005013e4dd55ca76e46b62bd":"522534ba1a09cf9abf29bde66ce1dacd0e273e8954eccafb":"45f54169665f59d92211f266892009958ee515f14d09581a":"4633819c2ae83c71059ec8ae41ed2c68cadf9b2085a5b8bb":"7afd6cfafd9a7bad155b59a8bb2094f76b915b93764e92858821d5c32ff4a29493788d3dc1627ffe7980950394349eba88b9c2f6869ac5086296366b6f4ee37e8529d291c9d962e30662423faf375b7820e0b650db03e3c99791d8042da790cce1a1997ea21441dba4b936bd8b393300" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"f5d1d27eb344b63e907d82a2e57494b25dabcae440ac88738512d9602ac8bca243018f2495599e618dde0261e43ea38d45e7c09ccdc4bf3dd8e5c100":"12ff844e5c5bb3fd871feb37ab796002846ffaca5a741c54":"f642c19602754584afa3083f567d80fdcd1e5c29202ac3ad":"cb6dbad8ce1a5677b4825cca934336b936ccf841ff98d894":"c11fcc157c643a943e54274f1d942d998fd1ea0333e21588":"6f25ae8bf8c26d5f0b9d2a81acaf221790a09241b6e83c9e527c7784881d1f7398c2d7771174f92aab45134b4633ad96430df30b130ae34af52de90b425405959ba24a41685a04d2411e2f0e8564bf5bf3280cb6d75d0b910d06c73a625cd56646eebff14fcff81411c055921cdfb4c0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"49a10569d87a790d34bcc3c8fd77d075a1cef9eff337e8929b51bdb8d6c5df3ad31045684fd1dabb1fe6f052fc9886384fe43c0a7abc7adca043d35e":"34d6ad434a436a690e7644f0dc2207131148192ceb2e91b6":"8707328fc5a1721e4d72b23c2b8ca3c30ddd95664ac478aa":"82c8d83a9f5d5639a6a1ce26d244bd30dceb1cc978627e19":"2a53b0b80b29c7d071983b65ba835e4eda66bcfe7b3d90b5":"08e24ccaae3b44b7248b2d735af985dcadb84f74d202bca726de1cd663bb5ea1bb67c669126ac97218a9ca45491df90beb387615474249bba1afd4534be7a74c61fef308f13661ddfcce40f24b410cffb1cc3cbba2c6d20a5e4c4814d44bef07bb697cfcf1e9932e43349376dc04865d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"9a4232a59cc579867f8330c288a9218251030c00ebe50c9cd97d6cff6e49ad079df509644ec2ebe3ad4e515654af383da265d7b348dd4b89ddd49cbd":"b4498a32f664d4b489c2b47e67845d2d2bed5096e88f86de":"b8471ee87531817d81ee32578d27fa3a190df33561da7a2d":"2e74194aa62ef911599b37a51fa742817e3a4e6c254ec179":"afc7f13ae55e738cceb976ebdd01698de4d103db797f799b":"340c28cb7cf4c3e143dac3e133de864b1f458c76e3d47f3cbb6845f940be174b8819fc539f42005f4485fddc657f064c34873094e25a9bf7ec341a98cb97014a1d694b1694170ca5a8976e86f6e4e41232f526ec8536facd02394f492fbcc7c298ef0eddb3c5a148399ded7677366cf3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"b89744009793d2c118365b1d2f343d6b6c59374b41dbd805e793f27882467c5342015cf968b080a88a15fd6a7be3757b05313528525ab1e2cbd08ffd":"f3c02be0a880e194013c21b09b6703a61a7ccf7a73e8a541":"bca27f10060bb8d16d499b3f6ca05ed8462b51b0b43a1fd7":"eb6fcf75884be9112219d359013f45fcb1959ea971bd0bc8":"50a03bc3652f50cb9ed1167ea70ec1e74f896f81a8090216":"d2a529722365e7ff3e660964eeb27040a0e92a4d19bbe94592cfebad71047414676ca6ca72234f5127f313cb7f5be613b44d989fe141c9a0ec1f0b4d83c36e744cfb1c72c32a02b68c21d28832da008c57664046255ef18488ed750ec5e73b18eead939f932d2809f12939670c3c1033" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"6d2918c15be7871cad99dc9e06f73253ef905d9705c4e4ec38664043b04f9a150fe5953bfa7aebd926be162b7edd72fdc14ff97e67dae6257ad654f4":"489243eaac215f76a573b92f0709d116bd3c817eb95c2c39":"0a84cad7a1cd21a5afe6557d7d2875d9c62183cbbf49a123":"0c14578ac9504902cb9aa654086246d113039f926a87b325":"1aaab1e3a29e144cec825d29c3f42dc945cf2772ed30cb5b":"33438ba4edd0c38db99f2b6a50b35dd89aecb3491990ec4e60460bb32eb0186ff9fdc973b1b0df23ae65da31b8af5a37a69f81ab3e577a4c2c31e51cfcc4e844b044fb597e937524f59a0019ad5120c460329c982fc93e8e7a4b4e1de5619103b23a7a579633fc925d147d8fb856a277" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"1330c4aef54ff84387e0372f7c8d273cecf0af2ceb32ef6edb6a4f1ace802f3b95fa69cf578e2cda1d6060ec2554eb3152507387f325d8e26009bd80":"89d7bf8f5754cedc2e1a249f693e29276170f62c29c5edae":"a6b58f33d57570f4df05bbfb792a00087d331e17417e09ef":"f57fc701e4f8f5cc2181b5357824f932f6e07679ec0d3cc7":"586c4e8c5769156cbb54c025fb01aad0b61aa6238c231656":"0bcb6ad4f2acefb549c46271d5a4ed41d7decc095137e2044b60273388c6c6d79cb89016abcad1d6a138621720b71fc11ef82fae04026e08926e94042694a0c008f99281e03da580fbb6543aca2b4596d39699b97f1fe65ec60a70b88770eb825b716a10ce41383f31db596079a9d54e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"3f0564b9ceee32c8944c8f2bc4b4d2179b38acc880bdb91eed466b881e2cc21df77bc3901ab5ce5ecf029a066784503f80d1857979b09c4563944433":"5d54fc715556c20f5b2d01d6b0992f1c596e5ad77f81da75":"35cb6d07862fbab4f50038097cb463aadf14e519c8834651":"abb21e501e85ad1edc66108e3b88380fddf810b10b883317":"3c690cdd997dfa9c5677bee976fa93cac21f5bbf382f7f53":"bae872c9d221b1531f85c15f466b7a3af3fa9c9c6b72bb8f5dad77f3d12df52d10347ba5d6504cd0a285c3be578bb67f0a9f0137463dc01cdcb847e7853c5db4cbb6a115ebff7b80db0406baccb0e3e68a4a4a95364c2da29466e160fece7b8ddb65dfab000c66cc8109380a601d5ed9" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"115c973d6df41ead464e22572dbe0761dcdb9aad930b2e55a5558075fb7c51c94efc5f8fe5dfe24d30175a89f1bbcf146037a07b324f572d0d4c27e4":"d3079ee3a3c9b2d69ee0fd316a6448bc7d8e3b730948c46d":"2348ee87bd5a3bb45d51a7b6a109043a9b6ee3db011dda28":"937fe1a7a790754bff99ad51782e8ef5b4928d0057b0c380":"3e89899f4aad241a9189ffa127c87c15b5e3bcfd80bc316d":"0ffc883aa19b3cbdeb39039fd3760160a93cd663b8b358e9fbb6300df164689303ee5f2489ab4ab2d522f6a33c93350eab553a2499b15f8ca198303ff45e946a06d8a40959f33a759c5381b3a59da22e68032abf3da3da6aadb410cb41f54b3146ce57f9bb5d28bc823e3e03c0294794" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"c28541425a7cf33e29adaa91f326f216de89976031977f104f44fcbcdcf4579337434613801fe4661642392db29f15f0924566e72b596b23ff7b18d5":"44650a29972aa8521d6fb9dffeb15c00903a283f20ea9914":"43cf4de0276483be1382f3cecc6a803551a40602584cd84b":"03eaa10612895db8f66d50a2210d73d1f563c3ca929d9f54":"8d2b20abc4e8890c772bcaa05cb7b3eb5025ac4cacb5f7ce":"aed27ff8eb54a7d2787e73ed2a51877c1250c0d4eaf10aaddb30409624289a9b7742cdebba54218c7c448b57f209182e214014cd180916a8c125ad438af2e5f5ca5b00f9cf063f0c307560ed4378382b4572b97088f8d24e0bdf0fc3489f64074f1155fbb1163b54c93098b841257c30" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"dfa52082afb4dd137cb5209f6771f04eda25794280983ba1d8cd2f3d7f9dee556ac26d8a5a368d29096ed643089b65e9ab17b5f58ec816570499fbff":"16ccfd20408082829aaf8a818885164581c9a1bd09e9fc12":"abe13d12a9f0133bdebe14785dfef5f08a133a6cb5c26a92":"485dad7804de594356cf3c571d5f22263c0b7cbd4dca1f1b":"5961f8177b6015ae0119d22e0a45a4aa1bcdc580f7e7f975":"ee48e57f1b5bd72c99c911d3353952c2c143689c3cd9b474a46e4ada83811efc67f2557d323723526809825aa338a80e833c95297d6b16490db633ac1f1648071c3ad4cdcea056c41b4eb157ffc83c3454b0cf001f1e01c31e48a61587381e293e6cff97270c1f157b069df3e591c2f9" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"95f3a1aeacd07218a2ccee44c807f790e568e0032a42fdc7c8dc9a71f76bd725aa909ddbdf5457f1dc4e69746426a9c56fbec603867633ee36a7fe62":"658b7326cf6adbf7208d37cd69547805bc3f58fdd874e143":"d44350c7a668e64873ff97c31d79cb23b0f1620aed7c9d23":"dfefff80f10c3143b82de3392c395ab94ac8a2f4c0a30048":"a6d21a762aaaddcdbae9b9ecefbcb3149d514c94fe83eb21":"4f5e544491b72b84a0d0532d7f9ce01ec2de6a05ab5056fc75d8f73bbcac5ffc38e20745d0e8aa1eacdefea6dcbb92475b5cf9ce0a617e5603b7b9fe34f4f4cb04ade2db35cce1fd315140e3e4ab8472216c7cfdaf004181351f210b397c3147dcd279f6fc2ebd96050e996f77ad6ba1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"29a1897d6ea5de66e551f8c106f601e421ddd940812530df00f634682f249aebdaf86938c895c11f9fcb0bd1fcdb183b4f8cf86b3429a5372caafe1d":"d655a179edaf4b8381a9f6a332ed5b754dbf34f650d19867":"31c87be686b6f90f3d1b0ea90c541e16f3430292a5c4755f":"ed49403700cebec30d1057503be7baacbeb45bcdfd9a43a2":"952763380af3243c6c327f23cb74f8368919e0b6b9c25934":"fb29067bdb23c0f0153932523edf32d0e3c18e46616e07f39a4b78091eca90349f636ffcf26b68a4cd0902431f2ada91bcc86dc223db4aa7a42e7cb57a852095704a27f9f07962880a50d2ce16c125be1e8d4f54a0cc5eaf63150c32408db6f39b22fc93b853caaba9e49581f13a8815" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-224, 192, 192) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA224:"387e31bcfffa51323a92d90713b438a1f4ded69707be3aa517e1e72d448abbdf0a17989b3de7c43c621e904f52db52ad823daabff9c10b3fca93acfa":"e08fff320a493d70ea4cc85a4cc604664a0deec8f6c7666d":"969cafc33e99964833c4d0f88f906f5429b5daa552f53bf0":"8d6e6f05301ef5cefba752f3d0ef58a25775d6b69f6c15a4":"72292aaa69fbef6f010fa4d5bb63d6d7a595395d79a8c110":"77ead908484044482da529f9a6f4ca6e6d8d49954d2e2d5c7dc455e03bebf484021673727bbc40adc8812600201b8c2de8e658191422b80d23502329c84c0ca061b212952fdb2ecf3106dd20e6455f1f231e1dad1cfbf2fa019dfe9c162a670ae20b252ae2e5a4ca0eaae1c679a7fd3b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"06032cd5eed33f39265f49ecb142c511da9aff2af71203bffaf34a9ca5bd9c0d0e66f71edc43e42a45ad3c6fc6cdc4df01920a4e669ed3a85ae8a33b35a74ad7fb2a6bb4cf395ce00334a9c9a5a5d552":"":"":"":"":"76fc79fe9b50beccc991a11b5635783a83536add03c157fb30645e611c2898bb2b1bc215000209208cd506cb28da2a51bdb03826aaf2bd2335d576d519160842e7158ad0949d1a9ec3e66ea1b1a064b005de914eac2e9d4f2d72a8616a80225422918250ff66a41bd2f864a6a38cc5b6499dc43f7f2bd09e1e0f8f5885935124" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"aadcf337788bb8ac01976640726bc51635d417777fe6939eded9ccc8a378c76a9ccc9d80c89ac55a8cfe0f99942f5a4d03a57792547e0c98ea1776e4ba80c007346296a56a270a35fd9ea2845c7e81e2":"":"":"":"":"17d09f40a43771f4a2f0db327df637dea972bfff30c98ebc8842dc7a9e3d681c61902f71bffaf5093607fbfba9674a70d048e562ee88f027f630a78522ec6f706bb44ae130e05c8d7eac668bf6980d99b4c0242946452399cb032cc6f9fd96284709bd2fa565b9eb9f2004be6c9ea9ff9128c3f93b60dc30c5fc8587a10de68c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"62cda441dd802c7652c00b99cac3652a64fc75388dc9adcf763530ac31df92145fdc897a0c1c482204ef07e0805c014bbd9bbf717467bf4b5db2aa344dd0d90997c8201b2265f4451270128f5ac05a1a":"":"":"":"":"7e41f9647a5e6750eb8acf13a02f23f3be77611e51992cedb6602c314531aff2a6e4c557da0777d4e85faefcb143f1a92e0dbac8de8b885ced62a124f0b10620f1409ae87e228994b830eca638ccdceedd3fcd07d024b646704f44d5d9c4c3a7b705f37104b45b9cfc2d933ae43c12f53e3e6f798c51be5f640115d45cf919a4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"6bdc6ca8eef0e3533abd02580ebbc8a92f382c5b1c8e3eaa12566ecfb90389a38f8481cc7735827477e0e4acb7f4a0fa72eca6f1560720e6bd1ff0152c12eeff1f959462fd62c72b7dde96abcb7f79fb":"":"":"":"":"d5a2e2f254b5ae65590d4fd1ff5c758e425be4bacdeede7989669f0a22d34274fdfc2bf87135e30abdae2691629c2f6f425bd4e119904d4785ecd9328f15259563e5a71f915ec0c02b66655471067b01016fdf934a47b017e07c21332641400bbe5719050dba22c020b9b2d2cdb933dbc70f76fec4b1d83980fd1a13c4565836" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"096ef37294d369face1add3eb8b425895e921626495705c5a03ee566b34158ec6e2e0825534d2989715cc85956e0148d1b4f7125f472c253837fa787d5acf0382a3b89c3f41c211d263052402dcc62c5":"":"":"":"":"4541f24f759b5f2ac2b57b51125077cc740b3859a719a9bab1196e6c0ca2bd057af9d3892386a1813fc8875d8d364f15e7fd69d1cc6659470415278164df656295ba9cfcee79f6cbe26ee136e6b45ec224ad379c6079b10a2e0cb5f7f785ef0ab7a7c3fcd9cb6506054d20e2f3ec610cbba9b045a248af56e4f6d3f0c8d96a23" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"a7dccdd431ae5726b83585b54eae4108f7b7a25c70187c0acbb94c96cc277aa894c8f4b8e195a47356a89a50d1389ab551733eee2e922f4055e53939e222e71fae730eb037443db2c7679708abb86a65":"":"":"":"":"99ba2691a622afecc9472418e6a8f9f1cdc1e3583c3bc7a2a650a1ab79dcbccbd656636c573179276e782569420c97438c06be898867f628b1c01eb570263d2c0f09c7aab536f6fba7df6aad19e05c236b645674667c03d1b6a04d7fc11177fe78933b309679f5bf26a4632b9a13e314c4bf4532428d3d95c689002b6dc1fbb1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"c286425ecf543a49bcc9196b0db1a80bc54e4948adba6f41712a350a02891fa6957a659a4ec2e0b7ad185483c220fd6108c2129813eea0776fba72788fdf2718759cc3c4207fa20a5fe23ac6e32cc28e":"":"":"":"":"8e1020a4fd84c99e0fc7e3f7ce48de5ed9ec9a5c2ccd624dbe6f30e2f688a31dc55957630357a5d48ca2a456241a28bfb16d8bb000877697a7ce24d9ad4d22b0c15117996f1f270b94f46d7a9bdfa7608fa1dd849177a9b8049e51b6b7a2742623854a1fddb5efc447eed1ea1aed6f02b4b2754ecf71ea0509da2e54f524a7e7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"02818bd7c1ec456ace55beeba99f646a6d3aa0ea78356ea726b763ff0dd2d656c482687d508c9b5c2a75f7ce390014e8cf319bfa63980e3cb997fd28771bb5614e3acb1149ba45c133ffbbab17433193":"":"":"":"":"19a231ff26c1865ce75d7a7185c30dd0b333126433d0c8cbf1be0d2b384d4eb3a8aff03540fbfa5f5496521a4e4a64071b44c78bd0b7e68fac9e5695c5c13fd3b9dbe7f7739781a4c8f0b980f1b17d99bce17ceb52b56866ae02456ffef83399c8cf7826f3c45c8a19315890919d20f40fc4e18d07e9c8ccd16c3327b5988f71" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"77a5c86d99be7bc2502870f4025f9f7563e9174ec67c5f481f21fcf2b41cae4bed044ad72ee822506a6d0b1211502967778100749f01a4d35c3b4a958aafe296877e0acafd089f50bc7797a42a33ab71":"":"":"":"":"831a4da566f46289904893ef1cc1cd4ad19ee48f3857e2b69e936d10afbdc29822e85d02663d346ef3e09a848b1d9cc04f4c4c6e3b3b0e56a034e2334d34ca08f8097be307ba41d020bc94f8c1937fe85644eeb5592c2b5a2138f7ded9a5b44b200c8b5beb27597c790f94d660eb61e8248391edc3ae2d77656cbe8354275b13" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"0ea458cff8bfd1dd8b1addcba9c01317d53039e533104e32f96e7d342e6c7b9b935a4b66fc74c2a48757a99c399e64e36c5f3708e7b714c4ed139b4fa9e8c763af01773484005109a85e33653bb0ce98":"":"":"":"":"373a37af84fddec13645a9768d6a785ae5a2589d64cd9b37980dde2541499210c4f408335de1d585349064f3f53a2b4c5ec6dc2a09591f99ad9fad528ac83474164b45497bf167f81e66fa08463ffea917f6891e48f149fafc20622bb1172f34886feb45c26fd446a4a4e2891b4bc594186896141aaaeeb301b49e7c1a26fec7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"bfb68be4ce1756d25bdfad5e0c2f8bec29360901cc4da51d423d1591cc57e1ba98afe4bd194c143e099680c504cceaabb97caf210e82498c3408790d41c320dd4a72007778389b44b7bc3c1c4b8c53f8":"":"":"":"":"409e0aa949fb3b38231bf8732e7959e943a338ea399026b744df15cbfeff8d71b3da023dcce059a88cf0d4b7475f628e4764c8bef13c70cfbbbb6da2a18aabcad919db09d04fc59765edb165147c88dd473a0f3c5ee19237ca955697e001ba654c5ee0bd26761b49333154426bc63286298a8be634fe0d72cfdeef0f3fc48eca" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"4f6880a64610004463031d67d7924fa446c39138d4d41007e8df3d65691a93676b33b2c13600f4b1df6ca3d1960e8dd457b87b8c8f48312b5333d43b367730c0a5ad4725a16778fcb53fe136d136cbfd":"":"":"":"":"73d0f324ed186e2ad06bd1800e262bdbda79ba54e626761bd60f74f43e3bb62958ec1e2f1d940af163e1cadc124e7ebaba2f72e67efd746c7f6d0cad53ef03d859d93cff778a32ee5be172fe7fdbdc232ded360d704a6fa0f70bebe942e56478345492f49dc5c6fc346b88a58947ad250e688e8c626fe1efe7624620e571976e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"aae352e111843219cae8f70e7b8f6eb9bb53d246cbec1e4f07d42757143295b4b84485dccd1bf93210e322eafcbebcd9f9237f00d744d8fbff21b9d0043c258e8731817e6a5fb7b4bf5011680e5bc642":"":"":"":"":"cfb28b93522c7d61d8d3ce3f080e435e4c83c7e13a9dab788db8fef0407267a14fbc9324e090e24df5491fedfa81116869983938d4d4d7324a310c3af33a6f7938f602c5e4e63f1771cdaabdab0782b5affb54eb53047c109a9606739dd0065bd21eca33132986554878354f5f9f852e674dd690163b0ff74c7a25e6bae8ce39" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"589e79e339b7d2a1b879f0b0e1a7d1ad2474eaa8025b070f1ffa877b7124d4ff0961ed64dbd62065d96e75de6d2ff9d6e928388d3af48c2968527a4d2f9c2626fbc3f3f5a5d84e0583ab6f78e7f8b081":"":"":"":"":"fce6ced1ecf474d181ab331f79c3d2cc8a768ec2818de5b3fc7cf418322716d6a6853733561a497c0c25cb288d2c9fcfbca891bafd5a834c85f3603f402acf1a7b1ea92db847ed5c252a862ad4ab5e259715f1fc81da67f5230bf8be50ee8069758095f7d0e559e03f2c6072290e61794458437609e473eb66580cddaad19b71" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"714277d408ad87fde317f0a94732fce62f1352bdc90936673b4f1daa0925aa26d16582a99f23010b4248b88d86485419bd9fc7cb2fd5063b2c3c0c4f346ad2e3879371a9c805e59b9f2cd2cc2a40894f":"":"":"":"":"62ef7a431288252e0d736c1d4e36cc9ac37107dcd0d0e971a22444a4adae73a41eff0b11c8625e118dbc9226142fd0a6aa10ac9b190919bda44e7248d6c88874612abd77fb3716ea515a2d563237c446e2a282e7c3b0a3aef27d3427cc7d0a7d38714659c3401dbc91d3595159318ebca01ae7d7fd1c89f6ad6b604173b0c744" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"05ac9fc4c62a02e3f90840da5616218c6de5743d66b8e0fbf833759c5928b53d2b89a17904922ed8f017a630448485452791126b8b52ee1fd9392a0a13e0083bed4186dc649b739607ac70ec8dcecf9b":"":"43bac13bae715092cf7eb280a2e10a962faf7233c41412f69bc74a35a584e54c":"3f2fed4b68d506ecefa21f3f5bb907beb0f17dbc30f6ffbba5e5861408c53a1e":"529030df50f410985fde068df82b935ec23d839cb4b269414c0ede6cffea5b68":"02ddff5173da2fcffa10215b030d660d61179e61ecc22609b1151a75f1cbcbb4363c3a89299b4b63aca5e581e73c860491010aa35de3337cc6c09ebec8c91a6287586f3a74d9694b462d2720ea2e11bbd02af33adefb4a16e6b370fa0effd57d607547bdcfbb7831f54de7073ad2a7da987a0016a82fa958779a168674b56524" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"1bea3296f24e9242b96ed00648ac6255007c91f7c1a5088b2482c28c834942bf71073136a5cc1eb5b5fa09e1790a0bedd714329f3fbea1df9d0b0b0d88dfe3774beb63d011935923d048e521b710dc6f":"":"4ef872fd211a426ea1085ab39eb220cc698fdfeabe49b8835d620ab7885de7a4":"d74d1669e89875852d9ccbf11c20fe3c13a621ebcb3f7edeea39a2b3379fdcf5":"0c8aa67ca310bd8e58c16aba35880f747266dbf624e88ec8f9ee9be5d08fdeb1":"ce95b98f13adcdf7a32aa34709d6e02f658ae498d2ab01ce920f69e7e42c4be1d005acf0ca6b17891dfafc620dd4cd3894f8492a5c846089b9b452483eb0b91f3649ec0b6f98d1aaabc2e42cd39c2b25081b85ab50cb723007a0fd83550f32c210b7c4150b5a6bb3b0c9e3c971a09d43acb48e410a77f824b957092aa8ef98bc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"a7ea449b49db48601fc3a3d5d77081fab092b8d420ed1b266f704f94352dd726d11a159b60af8d20a0e37d27e6c74aa350916ab47e8cb5dc843f9fba80639103711f86be8e3aa94f8a64a3fe0e6e5b35":"":"e2bb6768120555e7b9e0d573537a82f8f32f54560e1050b6abb1588fb3441e66":"a50cec9d1ecddb2c163d24019e81c31a2b350ccd3ad8181fd31bb8d1f64fa50e":"591dbbd48b51abced67f9c6269cf0133cd3dcbb5cfafcb6ef758569c555a5773":"0a464abcc8685158372d544635b953fcb1d3821c30aaa93982f9b788935f00f88115aad61d5cee003b3d1cb50f3e961a501e2dd0fc7e1724778b184a4bdf9f64e110dda7446e5544a30bd49a400ea1a5411800e1edfeea349323618afc5dc5782dc4b71d2da4d6a4785f8dd346feb9c8740ffd26bf644e3e4323ff24c30b9f10" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"14683ec508a29d7812e0f04a3e9d87897000dc07b4fbcfda58eb7cdabc492e58b2243e744eb980b3ece25ce76383fd4618590e0ef4ee2bdae462f76d9324b3002559f74c370cfccf96a571d6955703a7":"":"9ea3ccca1e8d791d22fcda621fc4d51b882df32d94ea8f20ee449313e6909b78":"16366a578b5ea4d0cb547790ef5b4fd45d7cd845bc8a7c45e99419c8737debb4":"a68caa29a53f1ba857e484d095805dc319fe6963e4c4daaf355f722eba746b92":"c4e7532ee816789c2d3da9ff9f4b37139a8515dbf8f9e1d0bf00c12addd79ebbd76236f75f2aa705a09f7955038ebff0d566911c5ea13214e2c2eeb46d23ad86a33b60f7b9448d63eec3e1d59f48b39552857447dc5d7944667a230e3dbfa30ca322f6eacaf7536a286706a627c5083c32de0658b9073857c30fb1d86eb8ad1b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"fa261fb230e2822458532ca2d5c39758750e6819a6fcebef10579ba995096959564e1c9fbcb12878df2bd49202cbf821bf7de29e99e7f0e1b9f96f3b1902fb4049c8c6234d20de8316ebe66d97725457":"":"8b7326621f6afbd44a726de48d03bcc5331f7306026c229ea9523497fbeaa88d":"33b00b31623d6160c4c6740363a96481be14b19bc47be95641227284c366922a":"2d812c8203575790ad6b6f2ed91a49d57460de779a3e881bef3be12e8766dc91":"5574e0b4efc17e8ce136e592beabfe32551072bddd740929e698467b40b3991f028a22c760f7034853cc53007e3793e3c4a600d9e9d94528f8dc09aeba86146cdde2b7f71255ae0efc529b49be2205979dba6525bfe155e8819e8e2aeeaa285704242da90b4c4535101cc47d94b0e388a1b2e63ad0cbe158b9e1bbae9cc0007c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"61f1471ced56aa04c57e1b512307d4cb92497d9592d7e9e35356e99d585cab1b84714e960c403a4fac06b2828cc564d97bf97db3c102edc81596d4757045fe6bdc008f35792fc6290b77d889c09c33a8":"":"5b8bdc41f76d98cfa71ed976ea3994706375c8841adb8b6b3b6418e3132e8832":"94c8a8fdf38a6ccb8571c89420d899adab169214bb0dfcd43a04622e289935b2":"8a4b46e0a7a55907365f82d4ab9376509bd44728cab8cbafb0da901012ad8dcd":"933eb159a6af7455b60e40586c064f05f1970f564281b1ebc4662701ac1f299e4eb908c4afcb2e065191281ab576f684aefedd6904bad04d96bd93c0516c62a496c3073a0cda0676a11cc08866b0cc74f62cb9d3db48673b2c3fbeada69f922b4b795ccba22df12ef7125909381f7d681f6b9caba02fb913c5437b98c040c576" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"a1d5bb7d70621dee6b668b28c56d5610c2f8ced30284cc3e0e48de331af0506288a49e3e54c5ea54c98b95de81bcc807b4e2426e98f6eed97a6cdf690a89ee109e84c3dca16c883c26fa4ac671638d8d":"":"5bd1e086ed228cfd8b55c1731fea40c3a63d022599ca2da4bb23118f4821ba62":"b754b53ac226e8ebe47a3d31496ec822de06fca2e7ef5bf1dec6c83d05368ec3":"fa7e76b2805d90b3d89fff545010d84f67aa3a2c9eb2ba232e75f4d53267dac3":"df6b2460688fa537df3ddfe5575fca5eb8abad56cbc4e5a618a2b4a7daf6e215c3a497974c502f9d0ec35de3fc2ea5d4f10de9b2aee66dcc7e7ae6357983095959b817f0383e3030771bd2ed97406acf78a1a4a5f30fa0992289c9202e69e3eb1eabe227c11409ff430f6dfca1a923a8b17bc4b87e908007f5e9759c41482b01" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"68f21d14525d56233c7e263482d344c388a840103a77fb20ac60ce463cabdc7959fa80ae570f3e0c60ac7e2578cec3cb7584b4166530442f06e241dd904f562167e2fdae3247ab853a4a9d4884a5fa46":"":"f6a5482f139045c5389c9246d772c782c4ebf79c3a84b5cf779f458a69a52914":"9d37b1ce99f8079993ddf0bd54bab218016685b22655a678ce4300105f3a45b7":"4c97c67026ff43c2ee730e7b2ce8cce4794fd0588deb16185fa6792ddd0d46de":"e5f8874be0a8345aabf2f829a7c06bb40e60869508c2bdef071d73692c0265f6a5bf9ca6cf47d75cbd9df88b9cb236cdfce37d2fd4913f177dbd41887dae116edfbdad4fd6e4c1a51aad9f9d6afe7fcafced45a4913d742a7ec00fd6170d63a68f986d8c2357765e4d38835d3fea301afab43a50bd9edd2dec6a979732b25292" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"7988146cbf9598d74cf88dc314af6b25c3f7de96ae9892fb0756318cea01987e280bc1ae9bfdf8a73c2df07b82a32c9c2bbc607085232e5e12ccf7c0c19a5dc80e45eb4b3d4a147fe941fa6c13333474":"":"f3f5c1bb5da59252861753c4980c23f72be1732f899fdea7183b5c024c858a12":"44d0cfc4f56ab38fa465a659151b3461b65b2462d1ad6b3463b5cf96ad9dc577":"34fb9a3cdacc834ff6241474c4f6e73ed6f5d9ea0337ab2b7468f01ad8a26e93":"4caec9e760c4d468e47613fe50de4a366ae20ba76793744a4e14433ea4de79dc188601eb86c803b094641ab2337b99d459d37decc7d27473057be45ba848868ee0fb5f1cf303d2fcd0b3e0c36f65a65f81b3fee8778a1f22302e25dfe34e6d587fa8864e621121880f7cd55f350531c4ce0530099eec2d0059706dcd657708d9" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"1c974c953fa2a057c9fc9409a6843f6f839aa544bca4fa11e48afd77931d4656ed7c08285464af7a5dbdc10b944a127078146ad135acb836360d36afc50653dcc36c21662da2a6f6ae05222e75f34000":"":"263c4984c238ded333c86472866353817379502157172cfa51371d82b1efd7b5":"79b591529f9a26a0d7c8f8fd64e354b0c134ef1f757e43f9463b3dbb7a3da1ab":"7d8f7204b0b5401ddce9e88dcf5facb9a44660a9f5f1c862748e7269c29f7964":"72e2ca257b9edaf59b50e05a144f56fb517832fb9ad3489b1e664e3d5412cbf6b2883e891703b2e73aff9ab56da1009fcdef010ab4cdab996795c8f7c47fb1192bb160353997ad39d7d5fd0e2efc9103a7c3f158246afd53fe53ca6782f809698ef5f1f0d85536780a3fd6a8bafa475891c09213088bd1a3dc169257c34a517a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"56216d71984a77154569122c777ce57e1d101a6025b28163a25971d39c1c5d0f5cd148ba7e54f4975ac8e3e0f9b5d06a3580f8ca974626c77259c6e37383cb8150b4d0ab0b30e377bed0dc9d1ff1a1bf":"":"15633e3a62b21594d49d3d26c4c3509f96011d4dbb9d48bbbea1b61c453f6abe":"6068eaca85c14165b101bb3e8c387c41d3f298918c7f3da2a28786ab0738a6fc":"e34f92d2b6aeeeea4ff49bfe7e4b1f462eabb853f0e86fbae0e8b3d51409ce49":"587fdb856abc19ede9078797ecb44099e07aadcd83acdcb2b090601d653f4a14c68ab2ebdda63578c5633a825bae4c0c818f89aac58d30fd7b0b5d459a0f3d86fcad78f4bb14dfff08ad81e4ea9f487cb426e91d6e80dfed436ba38fce8d6f21ca2151c92dd5c323b077d6139c66395558f0537026c4a028affa271ef4e7ea23" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"83eb48bedc1e9294866ab8e5322ef83f6f271f8188e8fdabe5817788bd31570dd6ed90bc692237f132441ede857a6629a4e5e127f992bd5ca79ee56bb8a9bccf74c21814bfaf97ffd052211e802e12e4":"":"84136e403d9ed7f4515c188213abcfaca35715fa55de6d734aec63c4606a68f1":"fe9d8ef26e2d2e94b99943148392b2b33a581b4b97a8d7a0ecd41660a61dd10b":"594dad642183ce2cdc9494d6bcb358e0e7b767c5a0fa33e456971b8754a9abd5":"86715d43ba95fbbca9b7193ea977a820f4b61ba1b7e3b8d161b6c51b09dfd5040d94c04338b14d97ed25af577186b36ae7251a486c8a2d24a35e84a95c89d669d49e307b4a368b72164135ac54d020a970a180dfbed135d2c86f01270846d5301bd73db2c431a8aa10a0a3d03d146e5fafb9a2aa0b4efc80edab06ff3b532236" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"ba2c94203dab2e6499d8c50dca7b5c34a6b4764834f9816631aa21b9f9c3736167db133bdefb25e395085bceee5a0afcfa8984d16d35302cda35a3a355ab9242ec96fec0652d39282d4a0abf0a80df87":"":"b6fed10255a3fea6772ae1ae6d9f6cbb9bfaa34804e58a5b786f9bc60b348ccd":"445e072244edc716d3528f0e0a20ff0cd8f819c0d031736c8da122748f24d6c6":"1f856e403c4fa035bac9aa81a20e347c7d8b213aab699d69d9d6186a06ac45c1":"79f33fc36b3b47d9ac805bdbbe699909a8d0beb689a8b2723c291bd5bf7f3ce61343d4722a14e4add36312dbb0594910c8828aff1abc159915d498106f9ffb31147478d8c9ef75d1536ba5036506b313f6e85033f8f6fea2a4de817c867a59378c53c70a2f108275daedd415c05b61c4fd5d48c54be9adb9dea6c40a2ec99ee0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"0db4c51492db4fe973b4bb1c52a1e873b58fc6bb37a3a4bfc252b03b994495d1a2a3900f169bba3f78a42526c700de6229d5aab356876447e3a20d81c7e3fc6975e2b984180a91493044442999e1ca3a":"":"40b34183b4e72cdff5952b317b3d45943d0fdcfa0527f3563055f7c73ae8f892":"dc94220c99ffb595c7c4d6de8de5a6bb4b38847169e24a557ef6d879ad84149d":"b2376626fd2f5218b3ed4a5609b43aa24d371cd2176ea017c2b99cf868060021":"f0bd6bc4c506d9427a09352d9c1970b146360732841a6323f4cb602c87dedfb5ff7e6964b9144933af3c5c83017ccd6a94bdca467a504564aaa7b452591a16ff6a1e7e94ddc98f9a58016cdcb8caaed6c80671ba48cc81a832d341093dda1d4e5001ec6bf66348b21e3692a13df92538ad572bb2023822072fc95f9590293ffc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 0, 256) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"593845f0adfeffa7c169f8a610147ae8a08c0072fc0c14c3977d3de0d00b55af9e0eb2507342ee01c02beadee7d077bdaefe591697eab678c52e20013aa424b95cfd217b259757fbe17335563f5b5706":"":"cbb5be0ef9bf0555ee58955c4d971fb9baa6d6070c3f7244a4eb88b48f0793bf":"6dd878394abdc0402146ba07005327c55f4d821bfebca08d04e66824e3760ab4":"ba86a691d6cbf452b1e2fd1dfb5d31ef9ea5b8be92c4988dc5f560733b371f69":"00735cbfafac5df82e5cb28fc619b01e2ba9571dc0023d26f09c37fb37d0e809066165a97e532bf86fa7d148078e865fe1a09e27a6889be1533b459cd9cd229494b5cf4d2abf28c38180278d47281f13820276ec85effb8d45284eb9eef5d179ab4880023ab2bd08ee3f766f990286bf32430c042f5521bbfd0c7ee09e2254d7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"fa0ee1fe39c7c390aa94159d0de97564342b591777f3e5f6a4ba2aea342ec840dd0820655cb2ffdb0da9e9310a67c9e5e0629b6d7975ddfa96a399648740e60f1f9557dc58b3d7415f9ba9d4dbb501f6":"f2e58fe60a3afc59dad37595415ffd318ccf69d67780f6fa0797dc9aa43e144c":"":"":"":"f92d4cf99a535b20222a52a68db04c5af6f5ffc7b66a473a37a256bd8d298f9b4aa4af7e8d181e02367903f93bdb744c6c2f3f3472626b40ce9bd6a70e7b8f93992a16a76fab6b5f162568e08ee6c3e804aefd952ddd3acb791c50f2ad69e9a04028a06a9c01d3a62aca2aaf6efe69ed97a016213a2dd642b4886764072d9cbe" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"cff72f345115376a57f4db8a5c9f64053e7379171a5a1e81e82aad3448d17d44d1e971ec795d098b3dae14ffcbeecfd945ec80f0c00cad0ff0b7616d2a930af3f5cf23cd61be7fbf7c65be0031e93e38":"6ec0c798c240f22740cad7e27b41f5e42dccaf66def3b7f341c4d827294f83c9":"":"":"":"17a7901e2550de088f472518d377cc4cc6979f4a64f4975c74344215e4807a1234eefef99f64cb8abc3fb86209f6fc7ddd03e94f83746c5abe5360cdde4f2525ccf7167e6f0befae05b38fd6089a2ab83719874ce8f670480d5f3ed9bf40538a15aaad112db1618a58b10687b68875f00f139a72bdf043f736e4a320c06efd2c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"b7099b06fc7a8a74c58219729db6b0f780d7b4fa307bc3d3f9f22bfb763596a3b8772059a135a6b61da72f375411de269aec4f56ec5e96fbd96048b9a63ac8d047aedbbeea7712e241133b1a357ecfc4":"2ac1bfb24e0b8c6ac2803e89261822b7f72a0320df2b199171b79bcbdb40b719":"":"":"":"0e1f2bfef778f5e5be671ecb4971624ec784ed2732abc4fbb98a8b482fb68737df91fd15acfad2951403ac77c5ca3edffc1e03398ae6cf6ac24a91678db5c7290abc3fa001aa02d50399326f85d2b8942199a1575f6746364740a5910552c639804d7530c0d41339345a58ff0080eccf1711895192a3817a8dc3f00f28cc10cc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"7ba02a734c8744b15ef8b4074fe639b32e4431762ab5b7cd4d5df675ea90672b8a424f32108607c8f1f45d97f500ee12d8f02b59b6a3dd276bc69cba68efcf11ab83ead1397afd9841786bd1bb5da97a":"3ad627433f465187c48141e30c2678106091e7a680229a534b851b8d46feb957":"":"":"":"1fb91186ba4b4459d994b4b9f4ca252c7be6294d6cdb5fe56f8ff784d4b190a1c6456e0a41223bbbdf83ed8e7cfbfa765d9d8bc7ea5f4d79ea7eccb4928081a21de4cca36620d6267f55d9a352b76fc0a57375884112c31f65ff28e76d315698c29e6c4c05cb58b0a07ae66143b4abc78b9d25c78b4121e1e45bef1a6c1793e2" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"9a8865dfe053ae77cb6a9365b88f34eec17ea5cbfb0b1f04d1459e7fa9c4f3cb180c0a74da3ec464df11fac172d1c63275b95108eff1fabe83613e1c4de575e72a5cdc4bb9311dd006f971a052386692":"336372ec82d0d68befad83691966ef6ffc65105388eb2d6eed826c2285037c77":"":"":"":"3c683f6d4f8f5a4018d01633dfee74266aaa68ed6fc649e81b64dfdf5f75e75d5c058d66cf5fd01a4f143a6ff695517a4a43bd3adfd1fb2c28ba9a41063140bedbffdb4d21b1ace1550d59209ec61f1e2dbacb2a9116a79cb1410bf2deca5218080aacd9c68e1d6557721a8913e23f617e30f2e594f61267d5ed81464ee730b2" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"22c1af2f2a4c885f06988567da9fc90f34f80f6dd5101c281beef497a6a1b2f83fafdecf79a4174801f133131629037bf95a0e4bd24f0e2e9e444f511b7632868ead0d5bb3846771264e03f8ab8ed074":"80327dac486111b8a8b2c8e8381fb2d713a67695c2e660b2b0d4af696cc3e1de":"":"":"":"77a7fea2f35a188f6d1bfdd49b569d8c45e2dd431d35a18c6f432c724f1e33ae92cb89a9cf91519e50705a53199f5b572dc85c1aef8f28fb52dc7986228f66954d54eda84a86962cf25cf765bd9949876349291b1aae5f88fcf4b376912d205add4f53b2770c657946c0d824281f441509153f48356d9d43f8a927e0693db8fc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"d0840e3a8d629d5b883d33e053a341b21c674e67e1999f068c497ecfaabfd6f6071de7244ecb2fdf7ab27f2d84aa7b7a1dd1a8b59856c49a388f594c5f42cc2e4a56b3ccb8a65e7066e44c12f4344d50":"90d609527fad96ffe64ab153860346f3d237c8940555ae17b47842d82d3b0943":"":"":"":"7ab28a9b2d3ae999195553e6550cced4c2daccbe7ec9dcbb0d467fabba185b727fbfd9830242cd098f4db3cf4a85e8bf8e8d5974b62b28550922b32ed5bfc1a522b6605cf93bf8d90bdec1c5b9e59c6fc37a817d437068a87254be1f7c4618ada46fbc3a2efb02e44524e21d91be7534cf05fbfd858304b706d6a91ea1cc6ad5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"2e2dd56869104492767a59778652831919e1c8b970f84e824ae4116597a0ab7f01c42a7e983641de46c82fd09b4f2f767306507cd3ca7eec667e640d270cfbb033063d97520b6b7e38ff3cea0e79d12b":"bcd9e1508fcc22820a8be07180fea5045367333b569e111b011cd57dc1858765":"":"":"":"b915726c7b8c5dc3975f1a334684b973abf6a9495d930088cf5d071548e4fd29a67b55cc561ed6949ad28150a9fb4307c1fa5f783a7ea872e8d7c7e67ff0c2906081ee915737d813c25be5c30b952a36f393e6baa56ab01adc2b4776ad7b5d036a53659877c7a4e5220a897d6c0799af37beeed91173fbe9c613c3b6b9bb28e5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"d1aab0f16bd47a5ccd67c22e094daa3735eae21aa57f0bcd9e053d9d0d545cb8199310dfe1b01265b8c0d2b46d6c7c9ff50cabae4e060f3971096b78e550cda2837a26a693d905db2d992d589b268f44":"625b4b8f4de72ea9cb6f70556322dc2a19d6b2b32de623f557e419a084ba60fd":"":"":"":"987e1fdfe004c619cf1e9034576707eccd849400e19c87a1fef5b0179ec51c42a2f8c45d7942d0023a023c89f188b2634362703985695369863322f58619c50a7385a2dc91fc78f94b59f0131dc2b56a0d7c699d427285da1c104b0ad1739da10d8071c23993787045dc21f0070e1e9aa1658fc8e3add73dac7262e80e0aa2ee" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"449480eaa100aff6f48dc6286a5a81b9728b084864f78a9da98f606a00a6a41fe53c6c5ac3da9f4726389a03f97bb64073a6d64e1966ae324388dc12c14544e9dc5ae4fcb331e99d350c456ff16f9aa0":"6b8fedc084d8e28d333aef6db3702b6351f0d24e30908cccb63794282655886b":"":"":"":"a06912d362da7eb25598857f6d65344c3e23ec3deb80c6e43158845b95eaeca241c0bbbd67ac385e24693444455cc1c2c08c1134d956b8bc93b28be9c2d3322b3e09252979dfb8d39d04c94f81bebda5c73110605a237b561216bda9ee9bdee1cc0c7728bcc8304682334ca944e467a27a85313fa5395a9c790e35defd2edb12" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"9a6174166e97aa4981ddf580bc01c96754b9f0ba042750aabfda1cffe56e8581d7512ff6b7db7ce141b2bb01dcd0425e6888b9277e57dc57663d402eba8d03cf56a070dc868e6a128b18040002baf690":"ed75288f23275f9422444da5d3b53ccb3c4ac8acfb659a1e9b7655c2db52f879":"":"":"":"03519dfb2ff88cc2b53eecc48ae2a18ddcf91a5d69d5aefcdda8444e6df790a5240e67b2a4de75b4bb8a31f0f8aeb5e785ffb7a1341bb52fe00a05ee66fa2d44ea9956e055f9ffa6647c3bfe851ab364ade71a0d356de710ddafb7622b1da1bc53fd4d3210407289c68d8aeb346bf15806dbe787e781b94f63da3e1f61b5ac60" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"9c6ae1002ee1b0add0be563ce50f899da936e13efa620d08c2688c192514763afde7db5160c73044be73e9d4c1b22d86bcc28fd58e397f53f494ad8132df82c5d8c4c22ea0b7139bd81eeba65667bb69":"8fdaaeffd64e53f7b4374d902d441209964e12b65d29afec258e65db6de167ca":"":"":"":"021d938c9b4db780c7d8134aeff1053e5b8843370b8ae9a6749fca7199d809810f1bc8dfa49426470c30c3616f903e35fbacb23420a32f1bee567cc32300f704246ddc0217f236ef52c3ec9e2433ca66f05c25721f7661c43f22c1a125ed5db531bd0836eb435c27eefc7424ce9d845e1d4cc4c503097b4ffca788e674a5cb53" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"fe96a85b69d46b540918927bb609dc57642eeaefd46bb5da2163a0bc60294b5822195a410d24db45589448dfe979d3fd09cb870879d3f734214f6a4bd2e08c62a2a954bebe559416d8c3551aafe71d6a":"20f698833a4472fd7b78fb9b0c4eb68604f166a2694c4af48dac2b2376790e1e":"":"":"":"d3e96dbe29e1fcb8ed83b19dbfb240e6f41679fbe83853aa71446617e63e5af78cf98b331d15bccb8c673c4e5d5dcec467a1fe26a6cd1696d0c9bc49f78139d051287df7f3ae0dbb4bbf581cb8211931063c3f4612ced53f59d1b4ebb875729139f5d2a7d60642e8f2835eed888b7e3e49c0dffd012cd746abfa3e1c5c2308c6" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"a4fd693ff0a8af24bcec352d3196549fd0da5ee5d99ca58416ca03ce4c50f38e8cd67f2bf71d4366ce61396642531ff583d2be9a0d74e6a42159ae630acebf4e15271ef7f14f3de14752be0e0e822b11":"368969c15a4849d7593be8b162113b9298a535c148ff668a9e8b147fb3af4eba":"":"":"":"e9188fc0eaec74b2608e21e3a40be94aaf4ae08eb684de8f8bba2d5fd3b073aa5531c938c0fc628da65725c54b5c68bb91d7d326565e96685e0a4e7b220c50e0caf1628edba5bd755b31894f8cb90afa76e88c5eb9e61b4932444c1397dee3e32241a3fb70a3929e49f6da02eea54812abb3d6b5cee18f03af1e0b4958430ab3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"254ff5687a6dad3f1d237dc762f58d24ef2e2c084d0a48d26a3dc81e5490cda3f2ec392acca491e03ce47b95963a49fcb8494b1c1f1752fb6f80d732a89b08115857f7cc96e7dff05ebb822706889917":"f806b9b4a56682c61b55cb6a334caf87ffe135adfea6d0c3fc22b39898fbd078":"":"":"":"0e527e00494d55564f9d9b28e7110f9a61ce36c883b5be2dcb055444164cdddd1a9f2731716f22d6ff476ce413c77abfc0e946871d5481345c2e97b4bfdd12ac03df606fc56bdb99ac7b71a69b5b9160373bbec3e9dde477180af454e7acc6bc58dc0afb4281c0de4354c1bf599054e3800c6d60d892858865b5361f50bfca9b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"cdb0d9117cc6dbc9ef9dcb06a97579841d72dc18b2d46a1cb61e314012bdf416d0c0d01d156016d0eb6b7e9c7c3c8da88ec6f7d5a8e2e88f43986f70b86e050d07c84b931bcf18e601c5a3eee3064c82":"6f0fb9eab3f9ea7ab0a719bfa879bf0aaed683307fda0c6d73ce018b6e34faaa":"1ab4ca9014fa98a55938316de8ba5a68c629b0741bdd058c4d70c91cda5099b3":"16e2d0721b58d839a122852abd3bf2c942a31c84d82fca74211871880d7162ff":"53686f042a7b087d5d2eca0d2a96de131f275ed7151189f7ca52deaa78b79fb2":"dda04a2ca7b8147af1548f5d086591ca4fd951a345ce52b3cd49d47e84aa31a183e31fbc42a1ff1d95afec7143c8008c97bc2a9c091df0a763848391f68cb4a366ad89857ac725a53b303ddea767be8dc5f605b1b95f6d24c9f06be65a973a089320b3cc42569dcfd4b92b62a993785b0301b3fc452445656fce22664827b88f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"3e42348bf76c0559cce9a44704308c85d9c205b676af0ac6ba377a5da12d32449af783973c632a490f03dbb4b4852b1e45718ac567fd2660b91c8f5f1f8f186c58c6284b6968eadc9810b7beeca148a1":"2e51c7a8ac70adc37fc7e40d59a8e5bf8dfd8f7b027c77e6ec648bd0c41a78de":"63a107246a2070739aa4bed6746439d8c2ce678a54fc887c5aba29c502da7ba9":"e4576291b1cde51c5044fdc5375624cebf63333c58c7457ca7490da037a9556e":"b5a3fbd57784b15fd875e0b0c5e59ec5f089829fac51620aa998fff003534d6f":"c624d26087ffb8f39836c067ba37217f1977c47172d5dcb7d40193a1cfe20158b774558cbee8eb6f9c62d629e1bcf70a1439e46c5709ba4c94a006ba94994796e10660d6cb1e150a243f7ba5d35c8572fd96f43c08490131797e86d3ed8467b692f92f668631b1d32862c3dc43bfba686fe72fdd947db2792463e920522eb4bc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"b63fdd83c674699ba473faab9c358434771c5fa0348ca0faf7ebd7cf5891826b5fd204e2598d9626edab4158a8cfd95fadea5ba92f8010bb1a6a4b6fae2caa0b384165adf721253afd635d6021f764af":"2a5dfad8494306d9d4648a805c4602216a746ae3493492693a50a86d1ba05c64":"07c69d8d2b8aa1454c5c48083dd41477fda6bfcf0385638379933a60ed2e0a77":"a14e902247a3d6493d3fbc8519518b71a660e5502cf7ecfc796cfaa5b4ee4baa":"60e690e4a1eba14aec5187112a383e9991347fab7bac7cb2a40a52579a0d2718":"792b47b6ed221623bb187d63e3f039c6983d94efd5771dc9b4c40bee65924513485a6332baeda6a96f9bb431f592d73462b61d9d914a72b56fa9d87597426fb246424ebcd7abd51b2eefec8f5b839c0b3c34015342ace296b5f2218fa194b50aea1c89663460292c92c45f112ddbf6b9406f6e7ccee9c47ed2d90a27be5dd73e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"dab85f98eaf0cfba013b97de4d9c264ca6fe120366cb83e8b3113c68b34e39d5d05108e1028ae67b4ea63bdc6d75eb881794885a64470744198b7d0bc24472ffe8daf3c7eb219df6ddf180e484fe0aa5":"09fed3822f6f5e5b9e575d31dc215de1607b0dfc927412618c2d8f79166dbaba":"8d74d01b582f70b92f53b43468084e1586d9b36465d333d5faaf6911e62fe40e":"ef7f6b6eb479ab05b3f9ab6dd72eac8b1e86d887f1bcae363cae386d0275a06f":"7442b2a792a6a29559bb8a515d56916ee18200580aa02e1237dd358619382d8f":"49d2cbfa0897b7d961c293c1e572fb26f28e7b956e746f6eda90454c1370a29e25303ceadc7837514dc638553b487ef9487c977c10625409178ad6506d103c487a66655d08659d92a4d5994d1c8ddb28fe60f2e49577d6e80cae1478068c98268f45e6293c9326c7f726ec89601351c0a26fd3a6549f8a41c6f58692c86594c0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"0f0aa84ef12e10ae2b279e799c683441862457b9bc25581c2cd3d5b58a5b3246f74f4230c2427a52f01f39e825d250ac5222b26e79f7c3b7066d581185b1a1f6376796f3d67f59d025dd2a7b1886d258":"d02b2f53da48b923c2921e0f75bd7e6139d7030aead5aeebe46c20b9ca47a38a":"d11512457bf3b92d1b1c0923989911f58f74e136b1436f00bad440dd1d6f1209":"54d9ea7d40b7255ef3d0ab16ea9fdf29b9a281920962b5c72d97b0e371b9d816":"601cef261da8864f1e30196c827143e4c363d3fa865b808e9450b13e251d47fa":"e9847cefea3b88062ea63f92dc9e96767ce9202a6e049c98dc1dcbc6d707687bd0e98ed2cc215780c454936292e44a7c6856d664581220b8c8ca1d413a2b81120380bfd0da5ff2bf737b602727709523745c2ced8daef6f47d1e93ef9bc141a135674cba23045e1f99aa78f8cead12eeffff20de2008878b1f806a2652db565a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"6a868ce39a3adcd189bd704348ba732936628f083de8208640dbd42731447d4eefdde4e22b376e5e7385e790243506990174f7f456ac06c1d789facc071701f8b60e9accebced73a634a6ad0e1a697d4":"f7285cd5647ff0e2c71a9b54b57f04392641a4bde4a4024fa11c859fecaad713":"5463bb2241d10c970b68c3abc356c0fe5ef87439fc6457c5ee94be0a3fb89834":"3ab62cdbc638c1b2b50533d28f31b1758c3b8435fe24bb6d4740005a73e54ce6":"2dbf4c9123e97177969139f5d06466c272f60d067fefadf326ccc47971115469":"8afce49dccc4ff64c65a83d8c0638bd8e3b7c13c52c3c59d110a8198753e96da512c7e03aeed30918706f3ad3b819e6571cfa87369c179fb9c9bbc88110baa490032a9d41f9931434e80c40ae0051400b7498810d769fb42dddbc7aa19bdf79603172efe9c0f5d1a65372b463a31178cbae581fa287f39c4fbf8434051b7419f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"bb6b339eae26072487084ec9e4b53f2f1d4267d205042e74c77fb9ca0591ba50c0e7bf6eb07feccbc494af4098e59d30f47fc60afbeb807236f7974d837335bc0b22288ef09ddfcb684e16b4c36a050b":"34aeec7ed0cae83701b6477709c8654a1114212401dc91cbe7de39d71f0c06e1":"e8071ccd84ac4527e5c6e85b0709ed867776f25ae0e04180dcb7105ecd3e3490":"fbac45b5952200ad7c4232500f2417a1c14723bdd1cc078821bc2fe138b86597":"c4292d7dbef3ba7c18bf46bcf26776add22ab8ee206d6c722665dec6576b1bc0":"228aa2a314fcbfe63089ce953ac457093deaa39dd9ce2a4ece56a6028a476a98129be516d6979eff5587c032cdf4739d7ac712970f600fa781a8e542e399661183e34e4b90c59ec5dc5cad86f91083529d41c77b8f36c5a8e28ba1a548223a02eaed8426f6fe9f349ebec11bc743e767482e3472ec2799c1f530ebdc6c03bc4b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"be658e56f80436039e2a9c0a62952dd7d70842244b5ab10f3b8a87d36104e62933c9627455dfde91865aee93e5071147bef24dc9a5aa23003d3825f9b2b00e7dab571ea6ad86415dbd30c0bbdce7b972":"d3a6eb29b180b791984deb056d72c0608a2c9044237aecf100ccb03700064c5e":"047c29e4d1584fa70cb66e2aa148a2aa29837c5eee64dcac60fdba356cdf90bb":"41c4792161b1b00d410cb79cd56bd311a714fb78dc3471c25bdd7479f2e9a952":"cd4936d7bc3ea0e7201bcbefbc908215a97680ca6ce8672360aea600b6564308":"2c25557f6db07db057f56ad5b6dc0427d1a0e825c48c19a526f9a65087c6d1ead7c78363a61616c84f1022653af65173a3f9ec3275f2b0a0d0bc750194673c0eaa6c623cd88abb0c8979baee4cd85bfce2e4a20bfebf2c3be61676563767dfe229e0b7be67ad6fcd116dd0b460708b1b0e5c3d60f3dd8138030404d197375d75" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"ae537f31a28ca14500e759716bc207983bfeab60b25079fa30b77b8d41244cb9fca9e27d8ab84cf9b9ce491ec5d8cb671eb52777be480f05115ae6370f30159a94d50ffcc64454678ab1d1ac6f166fa7":"8c9cb2b19aa3abe83c8fe7da96e9c11648252653a29dcd5bf0ac334ac587f032":"9cdf6f1a2bc07acd4b0f43b5f2b892a1153e2669f237d257923636094fb40b54":"692d512722de6ba720fd23c8994ac63179b5f7e611addf9cfacd60e06e144a6a":"bbeea7b2bea821f339f494947c0b4bae8056119db69a3cbef21914953729cdef":"c0c4fb7080c0fbe425c1b756fb3a090cb0d08c7027d1bb82ed3b07613e2a757f83a78d42f9d8653954b489f800a5e058ebc4f5a1747526541d8448cb72e2232db20569dc96342c36672c4be625b363b4587f44557e58cedb4597cb57d006fda27e027818ae89e15b4c6382b9e7a4453290ea43163b4f9cae38b1023de6a47f7b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"2f8994c949e08862db0204008f55d3561f3e0362df13b9d9a70fda39938f2d331bf3e94ea858160b832fe85d301256f55ecdb1e8fe12260b9bfe12d6e6f161474fa2311e12e39b0beb0fcd92a6737b73":"b46671cf7fa142e7012ed261e1fe86714711c246c7d1c0330fa692141e86d5d1":"3ce9a29f0207d079e6dc81fb830356e555f96a23ea71424972ea9308965786d3":"db950000c0776cc0e049929ce021020adc42d29cd9b5d8f7117fbe6bde3e594f":"fc18ee6dd3dac2306774f0ac36cd789e33462d72a8c75df9057123db33e5f7bc":"8546362cc8af9b78dd6e8eb2c37db96e70708852bfd9380abedc7f324575a167bea18f632f3e19d099cfbf310773f9719eec036d2e09f393a023add8ebdc4fb87af43b2fe6c7eaa4d39f8022ce247aa45fdc84d1b92cacce6eae8252a03ec2ec5330c01f56d113fd2ec3d0240af0afcf13ddde205bb5e7c2d912dcb4aee5dcf3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"0c85e31487de1d7ba4a7b998ac56dc42c6dc0eae7bf5c8aaf1e4e78875f5fb47de878f728f73f83dc2a2f550b96c8b972d5ca8af1a70cfdccd015ee3bf0665dd1941fc6a7317b9d0d06658f5744cfbd9":"9aac37bce1a6a81dc7934e23747991e3cf48c55ffe5a57781c41768a35220a01":"db881e6d0dc3b62793d7da5fe5a18e33be9b93f4a63a00a878dfbecf0d383bd2":"f743ce1b72f3de4c901369eed581c626ed3081ca707e6634fdaff46721ce0878":"cd52da3ec8a839c537dacdea8506a3eeee879de388ff5e513322d6d1bb3ff694":"a5bdd57cb8fde6298e7c5e563afcca60dd472eca484bd8c3cc17f3307be09b601744dd3ab9e8a44107c5868824575f850c0f399b280cf198006f83ede8c0b537e9be227fa140b65995ad9dfa1f2303d560c3b7f59bedd93c1282ea263924469411c2653f87fd814c74cb91c148430481d64bad0fec3cbb3dd1f39aa55c36f81b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"93161b2dc08cb0fd50171141c865a841ca935cfdd2b5907d6ff8ab0348c4ceb05cb9f6e5912b90c3349a50ab881b35a1d8e9be44b5f293482548d4787762ebfb03c73c40e45385e8b98907cd66f493dd":"0dceb4a36326c4df1685df43fddeecb5d0c76f00eb44826694f27e610290f6e1":"105a8f85d6959f3e043ef508cfea21d52123f03b7aea8034c4eec761eaba1fee":"bf781f7e489d9b4b5aa5ee6d1796468af672a8d25f311edf3c4b4dbf433d703f":"c81d6bcf1e5bf37e39dda1735c6f193df115b1a854a12e7cafe060afe4589335":"4306628124d0100fade7eaaf5edf227d50771f9e5f2e1e983800eef9a39fde0b0c280e63c8728d836b5b93ea794a32c1c04cfc54bd5300e3febb5fe2e1023eded8d7cd180279a598f76823e8d5a7dffcc93a09deec5d1f80838e938fba4de9f47e94b99382ae55f116df9c3b3ddf7e50516e203645852a415796f03a86418107" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"1ae12a5e4e9a4a5bfa79da30a9e6c62ffc639572ef1254194d129a16eb53c7165399b3481fdf24d373222267790a0fec681554ff702658122e91ba017450cfdfc8e3f4911153f7bcc428403e9c7b9d68":"8280cfdcd7a575816e0199e115da0ea77cae9d30b49c891a6c225e9037ba67e2":"226732b7a457cf0ac0ef09fd4f81296573b49a68de5e7ac3070e148c95e8e323":"45942b5e9a1a128e85e12c34596374ddc85fd7502e5633c7390fc6e6f1e5ef56":"6fc59929b41e77072886aff45f737b449b105ed7eacbd74c7cbfedf533dbeaa1":"b7547332e1509663fcfea2128f7f3a3df484cd8df034b00199157d35d61e35f1a9d481c7d2e81305616d70fc371ee459b0b2267d627e928590edcac3231898b24ef378aa9c3d381619f665379be76c7c1bd535505c563db3725f034786e35bdd90429305fd71d7bf680e8cdd6d4c348d97078f5cf5e89dee2dc410fad4f2a30f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"29e20d724dfa459960df21c6ec76b1e6cabd23a9e9456d6c591d7e4529da0ef895df1f837eba47a1687aa5c4ddcf8aaf2a2a312626ca3e20034fc4f28033c7d573f66ef61ab2ea0c7bf0411a9d247264":"3713b601e164b1a51dda1ca9242ff477514648e90d311a06e10ce5aa15da5d7f":"ec68be33ac8ff3dd127e051604898c0f9a501271859376653a0516336180993d":"9935499661d699a00c622a875441b4df5204958fe95892c8ce67f7dfb2be3e4a":"256a4ba9e8f439d5487fa5eb45efcf1bc1120491724db3abe328d951f2739fc9":"73114cb3624d687d4cd49a6e769dfc7a3f8901dc41f6ad1df4ce480536fa82e52ae958d0528640d92b8bb981b755058e32c4733682e5c4c0df41f3505a1643a0dd49cfdeaf7a18adffca88256c6d2cceb838af6c92a64bc21cb7a760a0391291bfe3575e014fc156323f8eb5e86518c669dad8d29ad5fd4ef6e296f4a0764c26" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-256, 256, 256) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_nopr:MBEDTLS_MD_SHA256:"1353f3543eb1134980e061fc4382394975dbc74f1f1ea5ecc02780a813ac5ee6cf584db2447afbe2c8fa0c15575ee391ba60219332a67b95d90ec9de6b8453d4c8af991ae9277461ff3af1b92fc985d3":"345b0cc016f2765a8c33fc24f1dcfa182cbe29d7eacbcdc9bcda988521458fc2":"6964b9b9842aec9c7ec2aad926d701f30eec76fe699265ae2a7765d716958069":"6a03c28a9365c558c33d3fdc7e5ebf0b4d32caac70df71403fd70ced09757528":"a58546c72a0b4d47c9bd6c19e7cf4ab73b2d7ba36c6c6dc08606f608795ebd29":"5b029ef68b6799868b04dc28dbea26bc2fa9fcc8c2b2795aafeed0127b7297fa19a4ef2ba60c42ff8259d5a759f92bd90fdfb27145e82d798bb3ab7fd60bfaefb7aefb116ca2a4fa8b01d96a03c47c8d987fdd33c460e560b138891278313bb619d0c3c6f9d7c5a37e88fce83e94943705c6ff68e00484e74ad4097b0c9e5f10" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"096349506f3a7653d54db7ec1d09e93413edd175b6ddbeb00e56752a520ac8fffc7983b918acadaa71a67e1624f1b5024260a0495fdaba58aae41df82505012d480c8e4f751fd7ebc39f9becd694b2a3":"":"":"":"":"f4c7bec0c26cf3892d214549ac6f3d82f34c6966d4295099ee56166e879a70ecae130251facda351e903d877b6c5eab5153ce87ba6c7cf8bcc61cbd14cfbe34cf1ed43678aee69cd87b60e6bcb6ff48ebd44ce9e31982d8fe20aec34fa51d625f845f61056575969bf785c2ffab4dcc754f13de63423e94bad8d5e166d96a62a602d3ee4045df162028b89cac45e6207d9097f2b3ac0ab17729251985f276f1287f5c56cc9ba1a79fbdbb291f3a945fbfdbd63cf13b82ec91f7b1085b33279e3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"aece2087b713992ff49d3bf404dcda18403e015632ac03735fed29102cfea6ec1b574952687c9bad0e9aedcfc1da568be632162a83c802ab94f32bbd87f6cf4af1f2703f4a02af7d60e22383a770b9ac":"":"":"":"":"c0344807d5e3ea29fef73afb2b83dfe0aae186047fab6b603d8608df49476be18bf1f0f4707198fefa18804404887ea3c598d887e938440e1fbb8ed0a1a330cff84d952cc6405b12e7bf51b0c67d5e4896006dedb44637e393a97925890fd5176252f69d43920043844a91d0840844d89b8715052cec31e257c121d3fc0ee807b84afabee59624a00703f464b0079f12884a6e888ae4959c5423604f8ae2e6b57f4428e10b680cb74cf20417380dd5378449a24ef95d9438b0fee386badee962" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"c39e77d579755aacd454ab7ca6528596c397f28bcd5467cc7e0fb47f398e875da83892a840381c1bc03b7a223e92904a714dff45759124fa33464a97d7f0d7fd2d1c6c21663d31fe80abdad59458c228":"":"":"":"":"10f8ec63a550c31ecdaf2fb1b373f71f18d146ea033dd65cec2ec0b73b55bb6f3fbb7136dd045e09c4073247f093493cf26b6683bc9ebc98025f75fa405fb8deecbffeb0236a33f0ed6c7600d992ce5a268c86085adadf68047178ed89d93d739351f892723d8d6e4f428946e4e6dad1d640a9c11de23ce9b793324e31dfacfd367d86855a28cc544f88b8a91506753fa061cefcb9d77bccc15a23a84dba644089ee03db8374fee91dc23af6672159b0d2db219ffd07390b69879910b5c336a5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"d2e8a25249ac850fd3b01f62cd1eae3dd94d38e724f8e2644b7bb510c37f203890242b11be773beb202e9ee93899b60a00ebf08db1648c8750b14d7b784cdf0a6d4e7cdc816469cbdc3a08d6d32503b7":"":"":"":"":"019f74eeef674ef100ba4a1835bddeb925fe6fffa97113dc00d7d8c0ed486a73e831561ae44c5bd90e189fbe2bb1bfb84f3e82ec8809699ee8c2fad80b464b6b344999c364868300c1edb065ae86109dc29516f2bdfe2a046ebc8725044c382d93990f1cba185f61f71fd22fbd076d727de32a6c1d2f430bed491c9d09eb6ee669a1dc4f8048c7be199c7cbb5aa4f14d1423c8a54763869f5dee947f776ef2543ebb88d3004739089efd86b7b22327ae952747068b35d4b3d86cac1debce3e41" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"cffc6c44279e641856c39f14ed35440ea2f149c77459106f960caf910af21c109067c0f9445320adfc0aaf0c86120a38584747b4049588e5d93569fcecd358c51507bed59f96145bb8db6bfb4ade3a2e":"":"":"":"":"928d6d9f9128b0af64028d5d2e94414af9f8dddd353e4155f42a5d08f3e530930e01ec0dddf25d65de7f49de702791372c71fcaf5f20bdb24eb999752bfdfca28525b16308d46cefb0bc3b260490115778161db2faebbd687b940ba098e3d5be640565b81ed9d434b6861fbb4cf034ba77380562119aa3164dc53653d4e82ec84cf351c35b1b668343faf17f172eb4c0cc3999d7d24aaba58dedf11225336b5bd747825d2ae9100cf6da3276f26cec198e52edf9194162483aa4a45fa348d0cb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"3a1f0474c279548c086de9e12ed754c49a0322e6631f7f441c8024fea654bb6ce245c357b13ae94064d1b41c23e5e0496199e8ac9d535f8d95fcf85fdbd31eb33c20793f35075c412ba7213194a873fb":"":"":"":"":"954b58042d028abd00f7ce3d39fdb61e0cff6c40391ef8629e87101915771b8d0c7e24292751aab1219645743c6f54306866775e28b54818c759a6bf807c4982eddd4be5e22fe35a303cd503d122cc3fc5cffe50b03117457e2efc1fd91a9768964552116811b0e65856e8f8256681c722ea2652deaa2498025e84262a3fdd78bd33bc36c057e198327a33232ecd36501a0acf997d0149b4a833153b710b90c8722b232a574d22e7026a89a4d9cc3506cc9942705a162b34db9f49301a087dfe" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"e5f4fa500982bdf8b023788f9a5532482b29b12e8ae776111adaa617a958ce8977873caee6e82c5098ae77287bde1d8295b8aa125923dd7f8e05df78adc29898836be76df7c5aafba6493b211cbf8b94":"":"":"":"":"5b3fc1a7ea418debe79994bc0a8c86f487ed2f320c34293db950a1a026c239b8da6226d1dea509a0fe76f5a811c9391a622343324c293a0090587c10193a2961e358d1e71c269827e0d44e93d87984f47acf5b4751c8c066156da1c44662af4826cdfb5f7cf98b1f0200d3a0d7b99fea7f1b17dee7acfa5baee8f95ae4e0bc050bee2eeea7c09baa729e6e02ed19476ba3f8f5a8c1660de0353df8723efcd98f5fcaa56f6eda77f2d15c76d26989aa998c4afdc53ffcde47dafba8fe5818e8ee" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"b9444339a8738df6cfe95b6dc28980d02799b2ec5c8dba9ca98fa8075621a04172b0c9e414ea33c8bc4b3beeb536161cdb9a2a516f3e87bcc9f92ebbf4ac1a900559756903b72c4c1b5f9082d8b341f5":"":"":"":"":"09465004f009ed378f440c10fb122a265f464d373e7f1a1719c713f6bf38d28fb5447c269c127a0c10081533a847c0e19f4b640be0b1edf84d95025d56679e5880922f29c942e7284296a9309b4fab1b5bd9957d470db28d3d36a3585fd37573e8e3355d03690241d6f7211d8c6b054a813ba25f9cda76202d3270bf12f66d2e5ba5a946c7d28dd22d55d34a30a040aa9782d1e494603143d436cbb0212fa0df6d1bbf4f19818b99a68d9cb062aaee8fa05636fc60a072ec6e5ef24566c6b96a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"2aa822efa22d4cd65359107c46309033984b8e9c3ecb1b77078a09ad9ec746ef4f64b287bcc3064867b678f81ab209db3ee132a11f8c9246ce0a3d6deb3345f9b15e4cd048289991c64a21afc46ac98e":"":"":"":"":"7b79baf0126782bebf1794fb48633dc69ba88d63504d27a206d974854d446737da4ca1fc5bbc54368966b583dc441b105bb30b3be19f2778ed31564acf333b7c4cb1727480aa985afd80396866e10f6da31287cce07358d6308e56e3bbce8613bbf472aeaecb27e66305e34af593c8631508cf7d2c512df7c9b3ab04a4ede436b9d2e6919c03a525dceba10afbf6e8a641591d09e8a90543f1905b08537b8868337c774c20ed47df32d115a7f3306d808bb82d06bcbdc81042d0a16a3fc8d0b6" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"a32ac0aaaee05d57cb3a626fd26854ef08a3ad42a3c688ec6a9f9b67bbff02f86df150db0de2e3612cf106d9f158fb570901e1efb12252666e7a680513cf22bc0172c4f8c0d8b2eecfa1d471c10c9ef8":"":"":"":"":"8271bd7aaa795b58d8f741bc207332335a68feb66ac9c3bfd5dac72f20807029f555c3bcac629d228c3a77d596d99c5d545a8dcdd0a2fb2a5eed5c3492618dab4f763ecd7c6580817c6a7acca42d81831bfc13f38ed56ed42055877c7f31dfad35a73eb2052f6f9183dfc89b5926680dc2aa85995d42a0c073c881f1ed332794a784553493bfd842225030e0056d76e52810236b17f6f067d1272372395ffe9c2df3145cc65ed2c6f2f121dfc6c1eb8fa6132b44ee0373c7c027af80383d4a7f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"c586e0f5999f107281dd5c7ca1ff88d4617b4fd1bb61313895dd4bede875c27b5b0e6c5ba15e8725eba8fa009406aa3d8b8b66f13e07c8918c0f3f55262debfbedfc641329e1fcd6442c245626cfd206":"":"":"":"":"9d4f4f688406d8e57d96369553ee39267a9df9020d7fa78b39e1f246675b70a8080cac5aa6967e78c55071241e20a9446a82507a215a6c5faa3a2ea3c05c12905558d98a8eef90c8abffe6cf8b874c5ef057e365fdf179438de6a78b4dcc075b41aace875a5dd35a44f2d2b17d6ef6aa91f79354931c4d487142f7ac2120fd78caa6c7ff5298729de16c0e8285d73a3c6a95ada99f329dc9aa0924b0059a6585853296789b7e1129432baef4bbd2240a8ef7b19046fba104a85d43aee0ebf021" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"bcac6c2160455e7db38a9c94ebd329c1ac043b6ff607a9c76a86156974d30251b4f4b14e6cf01d407cb426ad61608d1599a6b7ba9402756bea2709cf3b162cbf040d0f5f38fc4584cb9cf4e6a7bb3984":"":"":"":"":"37d76ebbab0d4c8354086a5c5edd5aa6314a4770749d468b9e5d3454f2dbc9b25432f2d5d9f4b88bea7f9835edb22f8a7b09bd604703870abee1160369d0575bdd3847ee5fa93a9fe9aaaac0d436022f94d1b96655ab00feba1f40202425e51b084e372249fbc37f49410fc9d4d16173a9bc29181b62e342a8835f818d2647c45b6ce6c5b6f29add13d57e80513f767339575671bccdccdc9d093dbd72c91ba07d81c58ab5256b6744a94f0e75482e3848de891dabf384322d1419814cfe1590" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"4b667d35a481779ad919956ca06e07366a974738c09a5685fa23b3fcc1a54260cd39d725a7f2661ea86a2d57cfcd2a91e08419476bdc5534df58c6c3b077d3acd27ace0472f91854c164de7f76a9b1ac":"":"":"":"":"c82e5e2fb08171c233670e9e5403b07c600be4e91ff5b57ae284c4d733139b56ece720e82d3f9ac185e37d0f44d5281224cb5f9d230dbdfcaf1756389fe752575a2764f6ae775d0a82f2eb1d901ab04b59b54b5fadb2acc9b9af3e829ef19571dc416752b1bb0935ea2f3ad69dc452285c2f08412b11794134ba3bda0a10425576e88ea7b069b74b436aca93fe9dd1dafc78da1227b13d70157f60c9bee644451f8765e4c8badddad6c779d6b42d4e8b5ba65269186b04c38db348ab5f7a4146" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"c0db9453f84c2aa74bf93ef21b9e7802bb8995f6fa5e634cd4064ca2a0075319a969bad1345bb5432df63412807a646d2008394d83989cb4a506990f59f8da80e6b3a1df3fb8d726639d59cbaed1562f":"":"":"":"":"120bc268ca0d3f55d5aff5b360ca4d29a4b8ec5cb624f9674ef0a67b90bb70c238b94b2bf804fe74ca18f8364ff8b1e50b2315f8aa0c3fea663e93c80544284136de1d162e9078e9a074a50b493bcc7e0c83a0047199164a2d32133db57abb05b751a357abd3ad5298773be21c534f98645e94f0935afa53729462acbe55993b7d801bd6b0cbc8eeb5a1c5f0c0d690702f8de0a1a78dcca8862538201fafbefee55cd5be62afa8e5111c89f1f68d0f1760cecc86bf6675cb09b20e097bace037" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"31836d292cb46aad594171e76237a3422844f62fb14d0cdf63ba587e73501051c7cbb280d4b46412e10927c9523bed1beeb5163737db7f910e444e5d5221c5469655fda4ab7218e63e1451f461b4fc70":"":"":"":"":"1cf3b49f28b791e7c81706fb1a870f1af134a0fb0d2aacfcd6e446caf0a91c04dc160f080ebd5503fb7c16ad9229bf0a7bffcaad07329d5bde4576870758a4bffebb6b5c309114688db8e59a55413b4b37689df38d72bc5358291bbcc0b05af487a33934ce626efde918d0ed5f2deb75a17bd8912a31dccd783354477fa850520c3b97b56c6d2b9e4a05d49bc36e6683271f2322c9a546fca88c502187a5f4a2035bf5c527aa312f16c357c37162d722510b52ff8357490a096692572cfd8b0f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"a0c341ddf73d9404177a5fde32cbe21319c318f35cc9afca9ad41a3b06e13491e843cc6afdf2bcd00ce77ff06ce3d8a54772c46baf142e569ecd9131d6185af3575bb62a41cb646bdcae8a7a9fe60cc5":"":"b83491ec1bd89f3fc84acf1aad6fbeb8ef6ab949f41adc6d0dedc53722c171fe":"b76cec3d6300ecc4a02e810296c7e70bd9b4e7121fc5e971cbb94337980fddbd":"2a25cb0ecf913749ad46b585c76097739a14ca7b59f1f3ce4f79bc8a4afd1378":"98c01d4527fd131cc327e9632104d9eee10407cd73ab607228d37b9b72ca2c987aa794804d505d072561ccd5016bd4189ac9e3db9187822877dd533347b5d2071818bb7683312e1e8806e9b73b021777f7f878bb7d304ec58ce92e5e36d3d05a7383dc77f3fe6eb84b615f3f290bf8a43c34ef5478a30a6ad616157c9d7dd046aa66b522bcef61c9d19382c32425d38ed3fc049e73035af1e8b97388de22c4dcba0bdc09fd36ab7eb3f67659cbd92b8d7f6d74b56fc8daf17068c65fb016e29f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"7817fe880c0a4224eaed0da5f3962727e4b3be567021d37d3b6d4cd779274378f1cdab91c4e7c1433dcdcd0afbe4b43c32a2b5ffc520ac3721bfd5352fed023d04439c176288521319b5e315b6e5e85a":"":"c7708c25003e6587fc8c8116c500d37299f5d5ffcad3405349351d4fed623874":"45f88f2df43c4b9c3d829b7cfe61904ddf658c16043271f01c5f06ad3ec7bc32":"883cfd717ad8466035e6d3f3c04813e21657ad62eeaca449785aeb0836ac94f8":"6e0633c532099ebf0b10d4ad35d78a48b82fbce37913e655484ae40e29772a25630a7ab37f1d0ecdce27773a2ce88521b171432c07c02269df1822d2b6cde0d9f768375d9c60e688f497fb7ae262cdd5f7e8b84b84411d619c36529b41576ac456a240ed94d750fa722db874098ef7200c74c3234a3e5f21fcbc2cb5d50c4297d1e70901b8936964ccd242098002f4c8ed7dbf49de8c2a924c737f248d46ac1469f676377ca52cba12f28d9b534504d6e8423b5404b7e14de954b4225bb53551" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"f2bb6edec000982bfdb301d1d88a23ce840e496a4f595a662e4127571264f1d7e9e283c567f11e7e266459fa781c6fd95339015836ebd69aa42857010f44e8a72b81f501c96931fb491dc1192f6f6a27":"":"ecd5ea33146cb74a707eedb8df881eddb1797cbb7b16c16f8d741d23795774fc":"d410d6e2e848f2241ee45c9870064ac0217d97f59a8e80f6b5107ff0e4240bd0":"8a8c58fde3b8c9711757cb17e46587d0c5187f758d64478e9968604af0367136":"990b1f68152b3607f3011f8d04ea33a3e8fc479c8a6eaeb589133569048fe1284ab44d51bdcf4f0cd4c8d64f4c6337cdbe5f4f497ea90ee4204845bebca2ffde7831cf49892829322644c4e20a45a9885ff619bdf5e79ee53c26f47072e20a46d2b108d180d6ba5859a696f472bfaa80b2fcc7eda374a3f91ac0b06c9f13afac1af244a389cab4489d0ee04a0598f9c5168f39b40e7127dad9f20d69ede6cae7683b25ded1cf9d903541fb4b0a804d7c163ab068d22949f28a8f4e853e691e51" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"6968f5b87019b4cdafcc9f3a89321f25ef5d8d70fd0781c9e3bb01b3ada18c8b61d9142b639aa75f5f9d798ca538475d09b121048e8a0cc4b2286efa12fa8b4b959938261a1ec8e607526b7a27931191":"":"fbe6b8af6685422eeeafc32327a99104b45ca5602513aed0a5c6235328e8a7a5":"04f137391e27caffecd4413c775117feda27cad839aa900ff2af47c700034b08":"f185925cc180e556a0703a5956ab6d846121f9d9cff97f65bbed3bc44904cb5f":"c8bbe16192bda74ef89d9859b248ac658896bd40b5491c90e923cab6815ec3d2126c62410370f5f44e01fbf1d1653064aed835604d5fd0633c8b71cdde6c831cd91d69e420db83e6d5d82c26c47a11f2ede616a2885a884835cf2142a6ae4cabe989700125df12902374bcce04f3fd78f034e50398d9bcf463dde6796627820c75a7efee82fe4e16375af57ad3154973042e0a92110ef745f468377f6cbec5fa1a1470eac80408f8e96d37248b100ef8476c2a85cccdfca5696ffefeeecda9e0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"e8e99ffcf08aad8e50386f5d079d79d3db783a74165c6126b42b3140f744a7c723541930c8c772adb62981dbef8d054ecdcf1c30228904bd7ba31798bfbbd64757aa251ac9a1ae8c20a050670feac59b":"":"546e04247d6cb5212a57b62f99e1cca767a5768cf79296f45f0db24732ba6368":"fd45f66c8dede41387373c38674605f3e075c9b7cfc66123a5478b8f8e3ab276":"39911a79c6edbbc805a50d2aa018742094177a8e216d647c64428c00169ab2d6":"871577ddf34b29e5caf132aa82e1d2f1586b76e39aab62acd02f6d4440908a772ac5f6fd48c5f55f1ebe0e76221ac46b834a8a4f5dd9958721ee053ba3aef1574ebd980a5da6a94693662717ee548af0f921421d1afb814e4d1799d351889d2a1bdd57570a913e428e6613b16e158c1cfed038f6578920d60db73dc10a40da9bc363a0206b4e7e49670eccea866efd9a05bc237042cf052f2a4140f9377e3c6792b88ea06323fcebb99c643fc1c3653758d6866cdb148837fb0fdf77de1564cf" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"c7774e199b5a8c0b306ca236163249044ec2153dc89bd1c1459cfd40cc6069fd1921837aaa80f4dff34a97b4dd7e94c0143efa24f34924fa52abb4275a63cae7048a7fbb8b76300fa8d109f9561f1699":"":"1f437f758512071bd23d091c2b1ad8d51b99acc663e1d037fc5421092cbb1a45":"c622ac1071b50e4f899e4760cfed476adc013b6ff95c9b7be671f79cd2487ba5":"f973f45f75fb0d68e0bc5a723a72e722e6c8f3fea08d785141c78786da5101c6":"9475c697af430e94ed396c707bb7d5ee5bff18405131a0e898ed38065abc28ebdc1dc33d767c4dab69c846e3350bb414ef2d43798710958a6ff3e6b55de93c2ac31793a1dd4b07379e364ce72553323b9bcaa8839cbbbd347b4a82010b78967219b84c6fe9f9285ff741a0036aba6bfa7dd0d5a4ffc1936341b0e2a31082123b6d2af6740cb3ff43bb4a87ee74ef7eb06030745453d2ec225c8f31d214f1dead0f29af01ebfe90d2f8a8bf5e031242ebfcbd136b3e3db1f63a46f69a26d6159f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"898963d0237c58e4b7b6e894ab271555407d3ae8c1c4599f5f5490ad5701984a6e5ddd58d311b547f6fd2d4d67addb4ca6b86839b83978baef72b8cfbdd0cf180518af0e32e52ad4a73db460af05e187":"":"cbe5f14445cd310aecc97113232a0121ed2082f2c4152b4be68448f36c91b1f4":"efe0ef028e4179ae10b378bcda3d96056ff21d94404bfe022b563cb6690ad563":"98cf6a771c05f904b53ff9b12709d20bc3f1821385cf27ace7a4a584e73866c2":"5682b6bd667b45dcf16527a817852b52a7f5d0fa8c962f3dd3af63e7e71990da92b75e9fcf5de59b1565f525a734e978ba74dd80fe89a2e527960ce4207b9ca514d933676ad93e6dff5d57314a45889637a623eb7832854c3897faa511ed6dd246d2b8280e7d0524647d4bf7715b5546e0a9a1dec246b1680adea2eecdc354fb3122654102cd0bf94ac9333caef3fdc369e7649653352739783d048e08e8d231b332fa1558745e2ce89dd76d1dc442a71dc3d5eb7d3481558941e261f989b097" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"426bfdd4ead656611ce49bfd9f213843c194bb6863534ebc258415148f457e6e685fcf539922aade348a2af678038610af676246632dd70920d661518d4dc5221381b2fbf1c2f3bfed01cbb930398095":"":"971785b18e244d03e25b9a80c2c2204f5bab6dcbcaec986342450eb9b376bb5e":"5de582cba43a610866578604c9f2a542831f41c277d50b324f4edf1e2e5d498b":"46e4c325d2c45e00a3c17ab35115b5370abbae61337eb2da4e6aa91f951f55e9":"f2e8be2e994b74a4945fedabb167778523865ed27826f9c26ca2b49bf32af1626ae62bfeaab13e9bc52a081f365062a5cdbed0872f6479cfec5a5e79171d97ea898e8d10ed71203882d1d7b7d28c5d59b8872985abc628e73622f616c4c0904ecb1e4518be8b4398662dff8806c3f43750cc9be95aaac2a4730f40323d63af157d13555d043c4d0d7cb53f202df282fdfc5544a234f71121e893814f4bfa926351c5e9427e90f1117a3bce7a16f0e08cd06c3d7c458f9d07ca3269e015733aa1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"ddfb3d1d93e977aecd08efbd71dd48168e67658d93596b742670ed7c8804bd3e730d34a80ca1fb4ad2471ee22461bbda670337d675a17721ac63c3793153830a26b1871b316a3e10e49c555f44719577":"":"390c53a5ec1db52996eb042f9a76e45f0bca76ef6ea31b4642f00658342e601d":"b5436e880c15f03c3bb846d90f3ee5fc5bf5393865a112a4317d724738f5dd25":"d193f932af858698ab086bda36d04dfdbfaf487fae4298b38fef97bccdf63f38":"bdf9e1ba1fbafdb8f4628098aefae4810ee7fd565d0d285ddc3840f8e24a9985c2de57edf5a511079ba6c952c95c626e296fd62f3579ad03db536238fe69158317c9c26d373816343505c60a48e07a00edff8fbfef0ce69ed176e5484d056af02a270bb6fce7bae0b223bfd98ad359d53b159f3295be3fd630a568d2363121c7021ec23b14693be48f5b55e06be3d729c2a80948194b1266da96317bc592362809409a7666d5c168125b99de26da741f17ca52d63685ee8d8260d45764fc78ea" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"457e49a71da81a2a08bb19b97ba8e62ae4b5ad4ae64daf758a83a75506f9251149b2bd7180f69b9217346f8165b7cd8f100e0b1066e2877f5e5da21b037c2bbf178611dae627d9beaee64a9d0186462a":"":"c3181f694695c21405588f600ac33871b519e2b8e3b876424b32753da483d6ec":"68e717410f99ae13712175e402b51058b7625b7da27224414b472f9622d163d5":"f2cf13d05e853a13ed47c5d0eeb9c0416688050342f0d345ac1bb21d5ae675fe":"fc23aad02870885394ca831b72201d76cf736f08f6132b12178e8e3b016fef8d3bbb849e5d935ab732054ca701154e7d3e87d1b51b7392ccfaa19c4ad28638c67bd149ff67a93c09ee1fa5c2ef7bf9d40844baae79169e52e9990c93f099e036b63b000fb8ea67a13167b045c8f9163045beabe0575fef00b89fd90390b0124961698f4ad8884a1e1faf576de7a179c03221402279b31c93136b9436f9a07b5a67b1c199e7c6cbd0b5f53ee5bd0ef845243077c6eda0e021ac9219f6db5ad503" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"79e96cc8e77d8fe72cd6c66becb52753cea28bf71680fa541f345b83be79973db4081201bf23c94d1828e9ca1e825ac18aedc5ceb87a4c1b0c333c88d97e0f12d61b338e5ace5e15f71283d31a1ea90f":"":"4304ccb2666b227c92e2b00659ce0b34dbb53451591e32914a60d6e6cbbbfdd6":"d6e74777c02252b0613357b9a582f4d8cd7e436daf1674a663561b62d8ee7143":"0de123897d5f090b52db88e4c0f9fe736ccf27c134b0f5eac61b200d15e07986":"55a369d136e2d903c179472eebfc45ae236994669c46cd318401bc662f38a1f714f78ac9f15c819d2bd876a7af51e6caecff3c650a3e661e5d137a354cb16aed5b1554545bde08c10baaa5bce22284083b43a6dd9941a37f1a18929ced61181c137e9e38c79d107465a5a12f2a2f37788c8e398ac48b2be944d6dd3562c05922c25569c26a1203fdd244920e6c268028dbcf6807c05bbf1559969981467a479d7117a91f210118c1159749a1dbce4d8a0d5f2f8232c5152cbaa6441865ac3a88" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"b37180874dd4a7e08b1256966ed5845001b0773b5136956dca7194cd12a9d9e1f1dd35534f579307de11c1e64875e9377081de3095d83ced0ea3df2ee8d5be4daee545b431dc908bc10efc04db16ab4e":"":"d3c8aa88cc8d5b59af3685177cf3826cd675854deddcb9b501c40c4288cd9cdf":"6783f5bd86fe178e6a4d303342374ed32853925f143a5ad083c04a9c298feb99":"4774e5d062eda04b680d717f652d87bf5cf635f597287b76fc35e2d5ce593d08":"e478d45fd3eb6f4c398a0ec84f93ea6861f00666753c143506c5e417100077e2c4c9ece450d98c9372d68aeffe9e57ef9176d4084f9c6d02479b516942dd4792a90ffe1e4e49a8156bdd872f1f05facc06e71e581f919cd94fb97208515ba284fcd255ea6f1d1ebb7d351e1ceea1cdee631072d3fc3f4ef9d5fc57a9ca98c88b81003d858cb5be0a3520c34e52d3beeadf91388ec9a495b1fc7ff7a6799ab0af211abf52c15467274c04bd104df14033df000d8624acd253a6c954c0d89b7238" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"2779f20c02d086d30d53dbd6e7396a35e677214650e39f2ae83077fad70c068005faef347e7f73efb53a92f0629e012c7e1246d07b4e1bea7008dd8ecc7546e3f0a6e0e950e083373fde3fd994e114a4":"":"55edb840b85b391d4f1940be52a3e3824119349c780811c570d2c88dbefcea16":"e83ef56f09f82af4dd91a0b887d3f182dccd973435b74b7b3c432b39a61fe720":"eb9f30f2886d0486c5240f43104e426b36aae0006c4b9c64dab1bb713bcef7e3":"68c3feda06172a191184e0bb77a8f3c9096048bf71ed95b20cba1b1726660900d7d9f97b7ac648c76b50b921c28eee3d401ba81c8a46fabf82301fda8ffe9d76bd93cb275638f7c2088cfde88620661eb844cf953cc141b31e946338a0203c8ae67c2af1330a53251818aebef893010f16a519fcf22060a9aa9c597f3409465cf3c9ccf753db8c0bd3b465b028adfc447e37b5129c17ae9e8bd01f762662c466491fe57384825c163ab8a26d67efdda01b053c19d3bc6545c3661f2ad1df1e33" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"71c9fb2eb8cca98860f955a8bb3669c70b6f5374256da23fcbc4ffc2e90bc0a043b8ecbf1cb0c7b65a2cb7a47211541f2675512138964d0db8074727158bfb4f0d3c093f1e2c2bf697a48c2ebd27153b":"":"13b1d552e2c8c84f66961ac8c919166a248bc62fb896cff0b8b001cd7e147bd7":"27d626121ef579d9969809762c77068e4573af44b6e947a2892337a11404c133":"456ea206c38662750af39aed5fe0a39760f4dac85b83d7ccbc335f53a160a0c9":"464aee8af42ae68ee776780113805cade246b83a698c34bf4c92e5d81f28829ecdb808884bc7d784397f2b2f8c76a2e3517b53bcdc7257f44ec9357d014af4e8ddb44df98da72775567356f363fb85885f8f22505e5b5a80c824b4a0bc48029e3419d3d2f161b1469cead730cb123ca8387a2c8276635a91d0dcb2220797ae2702468587ac3a70b927625f3a6e2980d6fae6fddf4b380ca0d91eb4aee37b98644bdeac345f49523a241ca392972da02d70364f9401c21fcf39eeaf414a09fdfe" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 0, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"c9e54bcebbbdf44051e80b91cd10c87dc24267923350b6770406551a5069ea2255201f3f15bc3a2e4caaf0b45510f19db299a41db8d56ce993ade44323c455fb1a3f504124c35a9e907d9765e810c939":"":"2819b3ee279d57145ea1020ebc77c46031d69524a843158192e081f2ac91512b":"269ac853ccd332fef61330af7e80a33791ec44b6cbb83006e5ca0670597b35b1":"fdf031b1e0a8016bdf6a6ebb533dddaae1a3a5b14b9cf52a1a8028cc720b10c4":"a1c4c1d6e72dae5e4714bddf4a1cb8d01cff8a3973b12022011270c0de7ceb85ffb6a6aedfa54d0521ff33d748fdef8f29c52c7c414e692a30dfd0013776b58f58421605369c83d4d891a19c782a2d036f9638aba9e24b0eacdee87d4a8011699b638c287f0a12f11ede86a946be9c00d21a31584a2a0da536dcbf86e2df63be9a7b771999c9c7a6b748de713b7da757de2d731a8d980b75136b0fdc75ca7aef47cd36bb9370c5ca0ef81b9a04fdc78698720f68e5d54e1a777e557a1dfb4c22" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"4d95f31b9606a5f6d04dff1d89b50becfd0882e6cf51c1c5d24ad843bc12d977eba4582c39d793a63eadb63f292568c7fc4270e6c9aec83186a20819a7d35e7f1155ea108794302d593c53ce9d25422b":"43bf6f32b3b5f580b54179e4102d063536e7c47681d6de3cfe88fd8ec66e4873":"":"":"":"e991d000b24ebdf838ba11f9849591b0029feff33604bc4d71acd94301f8d045eeb1f81f3a101a297403a35859113c099939638680d481c86067f54762892f82146f61cce7bc2c85d395348f3ea2aba6bb3e59dbcf8e41a81918b6cab304d44ea1e32573cd6936f38cdc11d3c2f96290cc27b0dfa3bbbafa9394acdf2f4435170b428563427c4b02ed25924226edf8d5a5eca4eec4aecf98ef2e6f75caa70bdd84877df2e637b7fad621c6170ca5bd86e21d0bb01cc90fe2e76353a9d5687bea" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"1378443dfec3c03d36b16bacc480edfcb1a4a509c17cf4b35787dae3bc91ade6c113a1e0df927a4449ff9e2f4f1cd9a27b07f57ccd6777f6d6bbfc9655f0676d7b4f91712efd43315be7c7f30e51da89":"f67cd35afbc96756499c68a5ea19991cd1ad4880fdc13afaa817608a141e9646":"":"":"":"b32d9838b3f45e3c4b3ede1181bf0aadab96d22790d8536f5913fe95c3ec0179dd1c7ae69430bc8c68f4f30105199b785a11adf7abec007d18abcee2e65df5a211adfda35fed8b9389a61d2fad33fe020119e72c782a316f17f8a588239567315bda461f5f4518a1aece4d0ae028c153d67a8d4ce620e571faa0403c56bcaa864822e4d8ae6d14feafefccbe879ce4baeca70d436218e0eb3a62bf15c018fd4cf66a50e3d9d7cc9e4744e29e9c945eabf03a6a2c4ca57e582b60914417da57f6" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"69e9396c58ed867eb52fcd046504922e2e9a9b059234cdd3f0a09eee9fdfd45dedf5d3860b25115f8a3d0e2f3f543890a23a5aa278f836577956944a098d18f05900d1b076d30ea745be745b9efc0dcc":"1b6e1bb613d199a5e6f1b5c2ed041cf6f6633e2ef4d50ecad89b28102bf70554":"":"":"":"ee09f7b24cdc6b51a8212ca00613633c1a5f044fa921bec31baf679f5ba66bfd723721a03e0f260a44ad5cc4c580080667a781427a34c3d2fdfaceb4b040ee675491c4dd0c0d13abbe81336384806e37f2729e7fd080fd57011b54b664d58534c831c90d182d4d955676938d484087b0086d2bf2737a912afb66101575ca2bc5acf845f4970bb1ce4441eb667d5096319d6282714a8a9708ef9964cadf596ac3e7b1ba18fdec7e2e22f5e6352e825e965a494cb880aae78477aa3bcba9428107" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"d2f390fde0b50ea4afe6baf29a75e698fb0275c04c481df03910d238f4e72c6f63a6231df89123c2dbecfe0cb0313db34288f4143694ce2df2484d20884dbca097e35c3fd8ddee5273b53c1149bf5070":"2bc38d852d1ddee2e89b7174032d96c0b97f955e16bc61716c5c64248eb6232f":"":"":"":"e62346c72ef393a2904e982158992df4ccab03142c41d8d29c1454794926c48570eef34bd021d44cc9106401e9cbce6ddbb6c92257e89a787499d7f7a2dd527833307e02f44645ddbcb1303f1da95382c89805c76a2f12eb13d2b0205b7ec0ef21f596c98af608a2f2a2c5e3534e01a23ba25bd5fcba0481482e1ec8138fb1c86840060919d7620cb7b879d1096f64aecae1ea085a793a9f4dd665449ce73cb3036dd5f2a49138ce88c461a0a9e2f0c1fb8338f5eea53ab0a0ca8a8df9c315c4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"0cf86ffa1456c453b53305353ce43ad3ba44ebf4c6943cde8613cdc417ee9f6e759c0bf4676f1ebd05c519eb84dfcd3e379ce61016e48cccde24753878f7d8fd5da72518253b2f836f32e5b594d54ad6":"088c917f84679641f491aaf105eea0f02d0a8ae0b7add69645d1ef304c74b417":"":"":"":"79e71d9a974cb88d9022d35997032bb5fbf8f0daff411467217837a836aa44c493f868a333d1ebf66689895b53c9e01d58019dd1da2354fb966c88d2d6adbe66ac0b8901595a24dddba609478ec36e497f6fb6b4bcaa88b1e9a9c87088f66611446e8c2873e89ee1006b6d92d2eac54714fc6481e7782b38ed4b18d5f9714ae6a544110cb6063c8a9964c52a7026f52af448783c3427092e0339efd7d1a8522848a2faa8aa19c21363a537766c05505cb979269c73ee90679feaef8df13b6506" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"7179c434bffa377d9b6821da9571667c8b962196f7d8aad062e75b6091a34a454e8f4d14a60fb5253ae373cf50edca93b8d2eb2075076ec8c7a42b7adbe7723a6ba8b51a55fadb16fc3a6fe9da020482":"bc1c39e646afc1bb62685b746007148494209a419b733e938c1a5d02e2350860":"":"":"":"3093a2e1f502d44d8be4f35b386774162f0e10870f9cd34e3b9d4e77c7ec7cd10cdfa0bf8228be96cb5741f069440a6b6f9ec155d88ba66b7fa84959c53d3574bf1cf9f1561006c776223b881dd396e9e9830af2c1b5f7457fc45e823b411c5c2ba3b11219aefe5508f75cbdb5e40edf6b1f61453541ac98dad9ed502bf1a8afa79604261c7a89e78cf2941d520e0c10bed18820da6c23a5ed1c0dffbb04cdcc9c3284d400644e9365c995d8c99eebf444f2cb051bb62f231301d31ea815c338" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"b063333128a6ab4f433f151ae8aec4283ab6d1cbf4a69447850fa1a25930ec0f4204da52752a9bdc788c5cee6d8b92e1b8530dbe0c81b1d34037ee53f20758d5750d9863ed60c762ae2a8b4c973acc22":"067708b24df7a34811993d5c65d5348eea73e6c6680293afab5804b4328e7a96":"":"":"":"5f74a1d199f30fa22f2020baf036fc61b1cc2acaa80b48ddff1cf85fe5dd200a9afbd8bc51dd1829636fa335660f36d5d2a516e4c38e8ef0c3cad979e79e7e226b820634ef1d76ae81bc3e3807913eb0731b2e959c43afa83feb1d8da31dcdcb3dc3a4cf8f454c4ec41bbc822e58023f0d797c844bd8f20034b31d99579bff142cf53d2651d7a31b212d2b9d5705b048860d6c4e3f45ef1bf2d5e46433fec593b9f68be8b1e928ea04ddc4ce2fcecb737bb8f9d054c2ba5060fae5e5fc21a650" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"e23fa0c86c8a7b99ba0d3ec3ca47349a57798c07587b666cc4ae1c9eff83b8cbffb49d1910bf05db3c7d0db7e27285ae9f6b4411d84364b27a66398f5b0a897ee2085526d3ac4f65e70800067d57a51e":"7ffdef21683a75484f6ac304801c213dc8cb7e3cf0f94c358a2e1ccc9969e834":"":"":"":"f952956cb8c528efe2c831c67b69e8aa7e79c013161497b9c55415fd40c7fae778a6fa82109a40dd72fb2f4d92e1cbc47f52d055485c99d893fbea1cf28dab35be1f162494cb79ea45c44a63a1685217cd3733dcfa88bb6de65c68f2390e479c0fcc6b398dc5498ac93002e7e7f360535d082c8e46386611075665060845c4f8bdee38c23d2f90d2b1d78217e865ecfb6df02498db837fe581c43382cd1d3a508b6dc052ef7c4d20349679db8d8bf8dedd763da8e5df775d133970be062a9ced" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"4889013333cd1e2b3b8c4365bde690b66e06bcccbea25f04132a0962f13a7d458e823f5ec0ea091a07065593ca44fe49611602d165a35aacb352206844acdf41dc2c88b63b36912ae81875bfd3e098e3":"b4761d82a93e17d8a0a461ec8205932edf218157459a25a7f26ceddb59992192":"":"":"":"72aa3601986e6c970b8c2253118b8381264577e391e48bddff0cceeb5101975391a2c731f5611316b255c2a6c0554ed6cbf8acbbcd8609e3f99c3cec38aa060eedb863563442b7beb78f35221736c608a933aeb0d4a7cc050fbcca351cf780d42c5380284a6163520a80896ee7f71d2961d7629d673791f8fac10bd01d32d95e8efbd65381424c378bbf54b532a70c285d98bdbb559c9f37d6eae889b82d5006fba2892ae16acab103aff1b247711ef92dbc6e516c92e388fda4243808f95170" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"cc32ef3ea3b0db89c69312cad56b1ddea73ba4c302b85ff3c6605d1899a96f49909c6a54d98baf096ea5bd46abc2535309676d9d6bb9917271bf8c86c8852e29bf3ff5b2fe56ac094fa35dcc51547f62":"cb80942bfbcd8f112ed601cb12a5ca52cc0f280522db11da92ac6c76be3932fd":"":"":"":"2c972cfe1537bae42ecc46b1b41a691350f6e63c202245347e91602b93a4cbd5c8829e5a4f63f7ee0e29adb69386e8b659dca2e6000aa03beab132db6dada8dc35ab68433671cf621fe4593018b1eafd3a2191507fe015e2a5694fdfe2c3182fada71d18c5fdeed065089862249c5508f055ebeceb9fcfe5d16e4479dc17e2b59b5a0aa31cf21fc6b5925569b0ca63d1a5cd268a4d409f1039d902556236fb06e61c1c054ed3798cbe4d8c2a7b2d18206212591174cec9da519fb876c583a20f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"142bff9332c48103221359040cda6632baa92cfbd1ae7f8b3d0e33d6a8193939d9d20d17fdf6edd1b3ca9ff600fe965746b0ba1b61e9aa5141edb77ade0f191b87f0b33c0f3620801a755dca02698883":"8dbbcf0c190783122aa6da6e05ec9d82ee29f8e74e59f8fe6eb9492fe410df6a":"":"":"":"2537a8638d5759201cbc225e844208c1d08443b055fafe23329aed5eb2d814703b0fdbd0a89c2d62f8f4ea7746905b9bd90706b734060c96e4e406675576bae84317bf36d8523babab72236b71fc6087dfcfcbe765de13cd1ed316f495e3bd08d780cd6a58849c929ef24b41e9561868158046ffe8d2a89d169ba31331611f0872c6d075b9938e5170a3b8612f9ecff4743c0db5ae365fdc2678ec262eed3b7c337e65dd1ff24a867574ee460bec7c374fc6b3fe9b0eb7bd9f5507ec5988d313" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"821ed44bd793a4af223aebf52413ba5e0e231b2029b3d71475ac028d8c10f86d2382eb9c62bab540be847e22344704d339b798248d0bf2990c0621316e3c98ec07f05bba8887783adaebe8fcecc48fed":"8d2c8cdb2ddd6934271941f071ea47dfab869a5671dff9d424b916c1ccabb02d":"":"":"":"a5fcf13e4a6b9829ac30171920478a7878aeda658803f2e314f9ef8cf42c9c1933cbd8dfe5053abd30df644ca062070662f4b7e7851d28ff801cc4b878523b4610891abb29c095a70665de1199182fa193439665cb19cbdb00aaf3fd0fefaa2278194e79ebf652713a28c36f2cdb83f96c8eb1e85c9969381b52bc3444e8ad5d82c94964544b3e6649ae3f532d25a2e370e9fc8c77753239f130091c43720ffcd2bbcdb70a75223cfd9346091e8c056227f66648941552efaa5a0a369291e9ee" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"977bad4c5d1d16a2439863af8bb6fdbc206ad0bf20c4036c044645962c36e2e853f0d702a54b70421a509c25de124f27e330eba581fc82efca522e43956187c9ee4f58f971e4b91ed51cc8aeea26fdc3":"51cb91cb7ff1b39e18aacc0baad20443522bf869f26d9d7182005b5cb1d018de":"":"":"":"df4acafbe4f28ee47acc5134ef665a50deb68de9b3c7e075b26d5731049f13ffd00cda05f612f20fd901ff127277f269c069607442ed9f7b41892711a72b83ac592048bfb28ab2c64c6b9f5eb4427450f4475b1c04dd4665998b638d06fe8f463e2f07ff46073003132b66a5d4d19a65bd08230d1db0234fbd09a98864f8ca824e7a0ca9f1d1662027a60c7e95382122674d88224fb192cfc129952ed6515912aded9c72a49a39a00f9f9a16abbd361b20a12b5f3c4de54012aeb1b42f6fa3bc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"3116ef07685eafff1c77f185fa840bb5627fb9a5d79f72f8007cdcdfbfefc56bb1769991d78e9e48fca4c97b01d720d1d3ea6fa6ffbe2569da94b6bb36cd34d72c37d0218b3d02c391e0653e286b24b8":"f138ca3ec867cb7ed7d5fdb0868d7470de5f802fdb941dc400ad524d9032e23a":"":"":"":"59f01ec06c97a49cc5de469cc2b39c28db7612029e0e24e3c2b24f92c0af2383bfb9a0dccbeefdaec4bbd2607dc582ee7eaae6a4ffab251404e3c59c95e5460ccc8d8dea4db73e924ccd7528708e1b6a9d62d485c93764686f93df6fb8a9ae86bbda1e038697b5485e27e0bac9a18126bff1e7b104401306cc424e783f55ebe9940176d7123ef58c9460e5fb8311f745fdccd39ce552547adccdcd853bfba87aeb87dfe8ae72080fb7b3e5c4718e743c9f576d7752e3db1fdb29f160bde115f3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"f5ba27c487a40dfe342fe18e7f9c72bebc1ea229c7634cce87defd7aa11448e3f584d1769f3e76a017430e6e9bae6bb6c79170925e1156275311d86d4a03cfe3dfbf85f80bbd70ea98af76220833a0be":"34fd124aad5a10b852b2fe8481cd0ec46dc2d02ed9583f6e282a4c908e319024":"":"":"":"977fa5b70f4ca3c04b6f495de3bfdb4b8aef93bd14c82653e30a00a4678c602aa889766ab7caa434d9c15bd68bd14e66cdc609289a691dbcb391611be66c2056f8e675de5db9b2e2f15e5a330d00a8886eb8b8eed4076306d443ca292d783fb056186aa86e1dc9f18a113e015e535dffea954319cd26e5572f4173766207ed7d9b8b2c42a741340c1850a07139c0b358cab942bec51b159e50f5aa9d8fbe7ca9d1d2127a98fbf0f8c3094bea4e3039f7f7ab083fc9d050e29e7d4cc2d3d44caf" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"c4868db5c46fde0a10008838b5be62c349209fded42fab461b01e11723c8242a618faba54acba1e0afd4b27cbd731ed9d30016b5827dc2bfe4034c6654d69775fe98432b19e3da373213d939d391f54a":"135132cf2b8a57554bdc13c68e90dc434353e4f65a4d5ca07c3e0a13c62e7265":"a0bbd02f6aa71a06d1642ca2cc7cdc5e8857e431b176bcf1ecd20f041467bd2d":"93ee30a9e7a0e244aa91da62f2215c7233bdfc415740d2770780cbbad61b9ba2":"36d922cacca00ae89db8f0c1cae5a47d2de8e61ae09357ca431c28a07907fce1":"2aac4cebed080c68ef0dcff348506eca568180f7370c020deda1a4c9050ce94d4db90fd827165846d6dd6cb2031eec1634b0e7f3e0e89504e34d248e23a8fb31cd32ff39a486946b2940f54c968f96cfc508cd871c84e68458ca7dccabc6dcfb1e9fbef9a47caae14c5239c28686e0fc0942b0c847c9d8d987970c1c5f5f06eaa8385575dacb1e925c0ed85e13edbb9922083f9bbbb79405411ff5dfe70615685df1f1e49867d0b6ed69afe8ac5e76ffab6ff3d71b4dae998faf8c7d5bc6ae4d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"46c82cb81de474ae02cccfac1555d06e5dc44b6ef526e0e28356ffc8bc6c0fd0628d4d942834b94fc977609c8ec0a6392c0693130c6215d55e37da43d67def719051e99871db68128e245217d2aa3230":"5de51e3f49951bab36460724a63f046e75f6f610be7405f55016c93a59f1890a":"5dbb13f5b4eb275cb757513e6b8af6fefd7c9c9e0f5304fdd9b4c0968458f22b":"3ebceff3232e75c6beb79d97c78e93244a257f0772f82e234518c50e322630eb":"dc64e5a1fc7b32f0294db138dc131946e5602266f4cdf00037ffe513a44ff83c":"e3480544036a3684a88e23ff41a4bbd810f827021ca45e800aaaa36ed0b9bffcbbcc99a1ef1f1528b4bfe39514c7a390ba132d1681138c4b1b9f1a0fa1758837dde35d0f6c38683ba47a904937dc5ee3d3b75f909e5fb6311c6cda5e1121edc774e66092aa1dbde83e4680ff95c0bbc2946aa4d46770f247caa7b71bdefac9641ee99700fbd1e560f9f7fbd462ede64e009ced90c44c6ff03b890e16c79c7b8c959a27defa6f062168891977c637ec22ecfe20601d499443f1fb0ecc7d9505b7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"df8053def0260ae71f67e197ae8b547a228e9b67ba7909fc1cb3adca51058b15f6d5951f0b60c972d139b75dc44a3680127a84799fd7672e429f20876c175d135e5f894edc7a4da334eb8b73a334be61":"26890036a9b17d8e805c38568630e1c196091faad546ba8eb976f3aa031a8905":"40ea6bebb0cb94b7e527787e17ef9f7d3efb889fc1e47e49893ac5c4bba988c2":"090271c307b43b951c20ad3f081d2838df0936a4bbdc5eb6f2e16b1db482b1ac":"c203cc1a3af668e45653bab6b1aa39ba0669491a06d00cd39c97b777a8bfd4d7":"0d68d903c85c0172419dc9f782c5d67a0b3367d13cb2f734fed95c7fc082291edbf4fa83354c6588227e40bbff082be2dd276c264823a8f31ba18b00955d7a1fd612a2f37d824bc82cdec972d3f8384dfc78b51dca61e815766c877ef3d2113704c805a250aee7b55b849af048feb3536fe73ec4f0bee97006881d5eed8ea38ba1b8d16a3bcd91fda749b77d688997bff09f104a2d8cd8e133ea4aa764b237787358dadae1c25092cfe09f79efeb8eb6e20c39cafdceed90e602f221fe6b1d69" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"b1a1b468e1d59716a23fb028e295588f17be6a79e589027237681fe9ce354860b1cc33918a64c8be171e595ee6a3b1ef46c2ef21df2815528482ab4c7a32449b97ac75a51dfa1c7e67a763f17e97bcd6":"77e5a3eb6ab38419f84b57997627c6bea79703c95bc1cd24ea73eba2edbed540":"52aa0be951816d21a2ede89f53913f6d5d70cc580a1cda8a49f8e49a6befa909":"5bd8e4ac61bdfe752b5a66cf2e048e812a8aeae8e20c3c8c43f31180e4b18303":"af5eab21e4dd9443b1b16f40413faebdb0e086991dd3c53c8a51bc434348311b":"d477404bcaf0ed53788354705f0fa9f46c4e2bef2cd94932b614b3c34e0b0c7c28d7483075c9745bfbd4e31e587fb1db77d557fcdfd3fea47da3f01e42635ed3fd87cf6c98a2f20aa833a1bb74a15b158e47841cebe53e4d5d8c85cae78ade156e025a7737aa9197b122e73a29ce0a881c7adc8ec228f4c14e56c722acb0165b1595f010266151801812c031efcee4a7739876777816af8baf4d29496912a012f1f33c07107b2db5ebd681722dfd76f3a58e9d7426e7fa75e326eaa416c5d820" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"098b8c107fbf943bcdd2199dfd15f130a20d518e95dc81988748e1f0ecc5c45f74622ca2940807df86fb05f0aab4727525f19d1d3bda1f70825f3e1fcb18d29e8e410616c105fda9324f4617af39f021":"220bbf23394c3cef156f683d05739b76f37538a0d360600bd52f0076425b5f5f":"af88f076ab39db1dd0e7002bae187965cd144382a3d1ca7b1ecd65d346f7c090":"bab9d09dce5073d11fcdf9539501dc998b6fffa8a0716edcf583a7d7385ff41c":"caf8d4e10513e5ceacad6f9f145a6f79e5c245aed4965ae85e2e7c5914f97510":"f556494b3849d78b06ae75571f0b9c8c108885fcb041dbd7892bf639d8ff6c82e19e8ce2d5aeb58e8b964ce4f75976a0a9c7f3ec8373b83150b88d6c58ff9b810124d4ac62d955aa64d194afef2f77de6994642ec86cee40aa7a5591e99a63edbd8bbdb22fc3c2506beee6d507fe34fdb4d4f525dcbe30b5747ff920a13f9e230899ffffbc5615e994ee96a1bfd8890cf607379be1a39d173662d0967c9dfea33b14d78cc8818c2a1956197f85e92bc11133ac4f7657f2db20eceecae8ca636a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"f54e9df92752d30eec01c3756d569bdb39abcdedab80b0aacac76ab406723f480bb359a5fc6c7aeebb6719ab44114a75afd340af202be3ca30e4de794b826237105202dcff5d1291cdaf266673275825":"b69f77d5a08850a13f8e6d06847c4bec181ac0f6b720be3c06c0b67d44843c6e":"40f14c3340e7092b898758ea3c36750943acac7fbb6a83f0df3392f7936749cb":"5bcfb0786c447675032d2a32b304f25737de59cd07c84d3875c45475b15797d4":"656ab204e2c1834f346d89c37a30164db414827d83ca732c71ec71efa8182c28":"6eb8f276a8ff516f789d94d997f33c2e40b227776fae0681c83fde659462b72d37cd48c95899530ca072bf2470986ef29dfb193be7ee9ab3f8cde2317c9bf02a5f901ccb62bb665bc3a109eab7e3910888a522c765eb49b11d1ad0fbcc45abe3841e9bb4fc0e73188497cffba54f3ff82260767d0f70ea1668f45192e6719102e75aa5cc43084c50bdbd1ba491bb61ee9e5175092c1f50d56bfb68977a567e41c1e05d2d1523c198ded737079131fb12dcf847219d71fbedb5659411d7aff2bc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"2cc330b34c976c859936c21e2ad88bb60ff153e41131567f58ad34bff5c9cb418939fed56356af7fe215986a5d0ed8e9a078dcb1d3fcee6b99714eea3bfcefb37a344a69d414965539ddce9df239be2f":"bf531083f35066ebfaeabd67b82d392ef6b121e7d9603a5407c5bc74cd596023":"51f223dc461ac2df1c4877f65ca876d635d50939fa9dd586c176d8ab73c6d605":"ff9d6807d71ded1305d9e2cdc811dac2d73746b001b53ec8a5509c4ce0a07efa":"f5222c8966659974dd8a7244d2cee588b6c9a2700f338683fff9ccc45b6d3807":"981abda0e405c976435ec7f938570d911e5bbb32add52a8b94e528486e9dafae139eb15cc2b56fedfb9e4b2d10dbcaa5e6ab985be16c62b9b75a037684986843a7a0e3baabc34859253df2a053dcb0352a0554fd2d4530de0251b1b852d1d3b6e08548e215902ec8dc46ee89f3fc262c7a35aef8216b3def65bd56f0482a18a329f96863afd951307740fd8653d333f932940e2a87523afbc162c5c1d2bbe16f33a4b0ee0ec75bcfa6aee6d8348265938738be638f78506ab731d3e9ab345551" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"b4e5aad9bf4fb03ded64e4bf40ecc6fe2214049bd5889a5aeea0bf47be8670d329e6ed04538dd6d207767c367406d482ba7ad29231fd944f00b8d9b762935b93819ec62e0ccfd48f619ac40c9c208304":"67826d2bf9651404d5df4db84ea64dcab10697ecb90c68041f421452109af3c3":"67d6983465facf33369eebe0be12dc65fe736969e8f41478e44ec25d461e4435":"65f97c99140c8c9ba2ce37710b06f822cc0eaa03589157a3b575bc9c423afc3f":"19c37886d613d24b0592ea0b3a465ec8f8a9229abde3fb5e0122032e1ac8dfc5":"05777487bc152260a852e1b31a091f8e929ed22d8a652a77e4391abce7efcf0570df3d466d56dc51ef14bbc55309c6831655ba97c6050e563083fd1f2fe65b43d0cf8762ef6598d967b473b68c4143287f70d096a6ea120e3c07f2a95b80b393ffeafac2d0309d349bff017a49b9ea547a5776b5c38b9e981ed0a4825853cafcdf0f17269b9df6189fabc30388a383e3c28949625ef3d59a2c371ef416ace8658adc0e0b0104f1acd4b349b91b660d64412168d3c9e29680a5e324e4d0ab9258" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"27ae2120824f3d416bbea1f987440c507a4f01fed08a1be27e6ec16390c92c4f8dab04203543caa3981373fb991d855340c29baf439f23bfb599a5eeb95ec2059af24dd86c0825957ea8392ce3d980f1":"cd646b0d1971f249f4c4d1eaa17e60c311d813057e0b71819a503aa41e5c6b21":"90ee2d0bf06cb94190e6505a75d12dd77c266497dc99c5f89bde60be6789099e":"7d82b50cdfaab9b5d23fb6618b59dd28cf1a83c77ff2993d9f1edb87ed7bc388":"f7f728d8ef6af8c5e77cef1e837030a6aa5c12bc81423b0ecb07a2db95a32a28":"4b25aaf436eb600a103d3fae8e301d2755132b3de3c8b4c442129a88ebb3ab20c4d3a54078ecc4197994ff04bf0e460919978d47e45c7d10d76a1e63ae34624e2f64125ae1bef304efb1af688f20d8e212f6df4e11243a49177e4b6456010d784d0e4a94e75371a75c4050b27e48359549f8268dd2a2290ebde22282d96b2f38e3f06103dafae5f54f0019bfb013df39a76482ec7f878d26ef0e34c9c21e67fbcc3412aa0739e875da0e9ea1340592144eb232385fc7e605ecd10fee45524718" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"dbd5f508e8226acb957bbc4914ab13810b9b5b2b51a1b55cd4ac60f6b6d4c370963448fd323968c27d97e005b1a079c9e3ba151887006c56593eca7809b23cb768f5b3701b456bdc85fb5672a81db2d9":"0cda5d501072cf482d3c56c49a3c929b423f6e15a3e835888b3a9873647ffddc":"d3f38ca5c0bbcef46976c6a5965a8493f714aa2c8a2c817576cbc0bd6652beb0":"20014421f9af259892f017dd5392cc973f103d4736f3866e66329e5e7704e0f8":"686aba6c9c6c221b2b4a7de766963e4d9880676e7e6ac8e644dd273fcee519bc":"b720c7c56e10c9e436036fa8e1f1d1c0c0b7246c28bd36e5f3e88f988684b95a01127bc64cbcf12b9689f718baa52042b0837fea791391ee2ae42e54acc571239e5b654486a025ac25f46f10280ecdc65ed098e65e07dc3870b17af8bfd58edba026dc12b4ff04830ef132d07dcd7c62f67172caf2620a204869a81e39809db7befa25c5ed8a74b6d306c21cfd3778180d444bd99314a430ff4ef6b7061832df9b82603d6a0f646b398e7dcd8bb33a7926bdfa085a450d3de68c1e8cb2ee4524" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"7093224d6bcf0915eb75360ab4bb789c15834a371baa24deeceb33f86e8bfb46f4e34325ddcbee671f9e45f7887c1481238993ec4a309e10d3f8e3952c840d564644062534f985a6b4e38688d2c800a3":"e7cf1f32ba369cf5545ee672cd6746ea9a336de7039ecbb25419259eabdfa44c":"bb186a460387baae27c11aa8c65d6ee003577eac47b259254a933f82ac683250":"d823535ed974b7ff9f19dc38b9494aa99f88143e3383b5a183ec00c925bdfedf":"56548af797f4a07ec42273f895822d877a311bf1f8dd5c96fd8449732a13a921":"159c6923fb71f9670db4eef12dadd143ee701bec9b0f76b56e9b1b8c473eecc3e38cf06c8f3b0c3d49580e49caeac0fd48da5f53d0d3e9c829c253fac4e4f09730177a63e0e759f043169e91459c9cf959d2230c7b94be168cf4fa02588d78aefbc855d55e444d671a69d274c66ad1851c56c0d880416bcbad08523cefa2fb384dd0f9f188e8a601ce0a92d42faaed0a299d6a9c86958854712427b35e73a0817193b50f3557e66d64ad80fa9ff87427b7de5b7e6312d1d9988ba77be90d4cca" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"ea96f8787458e505f5858e31bb85b6e335206f6d6d04bd9d333029193bd2a04e5f85ad152675ecc090119aff7720739bdbe34551ebbef10e822cd29e9ade1488c21fd9e798369d585d6f58168d509d94":"ba45df1a14e23361201a467d2cfb7a3dce3128069a8a59a9a388b8e31c48efb4":"d551272e5a60aa1232fcb4765e853de2ccec08941acc75188eca37120fa49aac":"c1b34347691ae9f1bf6be396e8b49aaedb38307526627399fc10c48748c3a7bc":"722c0efa445262f5800abf75e43d9daa44e3dcee7a7528f7313ee52fca9f1803":"e2f873758c4e71704d8545dd1eab51206ac11dfdb00dfd1ec9e53bdc7f6b57f5209727049d4d781059b0bc4b6091c9bdee947127b8c8f03f1ee5f3665720a4f6c6777682ef1937719052254aeb97e3a17b6b552bcbc9154551a7ed41d837a27b6c37b426508409b75236cc156dad89d896f25c54467fd45f9698a11c7ce01bfb1fe171e4d33faf73a30c8992c51a838e9c0537354371bf79146a79a6d42d4e987b9773377fbf384979690b2c04c332f22567fb0921c3e33088d3b011921fca6a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"92ac19b133398b7d8ddfba3c6046421b3618923241097b8f68b6c7430b6d232ae9ad8f864f358afa7cac72bbc4fd90f16ebc9c15913c11094bf7aaa510e6241face016a99ca08de6525a570bd1741dc7":"0517ea7410bde64edcc70df48f3c87f578b38b8c7087def16031e52760037df0":"439c97f62d6b7aadac64057c0003a41a44ee549f60afa92797ee7c9aebfc8164":"669d42f9901e029bce7584bbd22a13a74e6f6ba50441a2633773bf5ac745122a":"8bf3c1a08b2d8459df96d6abfa90725f1a735809da78bf99f7fded0230771804":"3b832a7f1df591bba571bf7662914b0e5a3b34d38228e377e4e7dcb4b9cb396ac268d71fbfd2e1a5cff4429feba36f55c7e45cdac49a5fc8a787292011c61f4f102bb9a5d9c8fe1cf047956f21c74987d80968d2e4cfa29bd92a35cb96dd372d9baaed8d31ba3462b42084dc1841a4042311abfe4b3358f56c9e0c69e233638d3be56d0d269cf110d5200759eceb63fdf3b0ad25937857d129b68f038fc73a842046cc7c45292d6ec3766aafbc22f1491774624751f2c50fee830e24a34a27b5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"7a346bd6d853803d07844ca348f3c4837fce3e3a727f712223da248cd82db6ed4a9710cd8b9f2e7b593cca42da7b1a1285a78d0c764b24c3e4b21d25919c5400b4adaf0684c787326c19010728bc6f94":"3e8de39ab206ed166b203c97103059e6a9317d47f7a76bf4511829cc2e27a4cc":"327976aef239b20833d36b7f352e8e6570f8f325b568975a661b54b8ada49128":"9419cdf1c59abc03013d7d443c734aff57a6d97c870a03762c50b459d38f5e09":"f2c9c49c76bd683d42dd9de9d45a97b78710f39f2ee482e877e3b0844647f9e1":"24a83991f9455a0410213cc138696cf4eece7b2caca0a627c6ce023b7f912c115768ab8aad0fb10e35591d370e0372fe020823365b5bbe713417bc2f050cbf86fd626caf91323271eeebd5f2aae36fd0aced63779565604ef2653a0770fe4e42649eceb6089bb7662ca3d744fe178f5ac5bc20ce7a90325497f55ffd9b25c59a6b82f07553c080f0c45fed23ce47d972605a2f603b72d09d608548a04031dd2bbae9ff898201e4460479548d70b176e917ff3e3683e49f3330cfa77a25cc48fe" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-384, 256, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA384:"2d8fb8796d8a1764f8c824c55b880c53d2205559afbdf1cecda3dc2d05bf001e6252076dac013c7094ae72ca80cafce2cab30a160ce49dbd646710bc429c163231d73fe0e121f8cef8c02f70598fa853":"feea8ae0b299d5f79315383d938bcf9b536d11e036b28056bcbbc7fcede21cfc":"1a0fc47fa95cdafd2036eb5314e0f56266e58abb0f03b5e679638945b1fbcd58":"30707f376333df203eafba7fc52b40d8f1d97521a71d579c8b8457ac1328cacc":"f179c19e45c4a4f3cad8b545d116ca29e45f322580b7fc9715313be53f047658":"eaf7523b910b653a305f9122363d96e17fd22ccb9b6158cc42aceea40c34eac73e496827dd5fe4312f102ba6aa7aee934d1f41609bf3e14c29aa3aca210e3cabe70744a09f4c180f3d1ddf8be0b530403c5238761226f2c2c7ae29b24439afd65d6d5a0aa8daa11abce36df02ce61d352ab08965122e16708731d72a9fb5de071c20c6cb039273498ff1588c901d997151edbbd41870031ee337b38233edfd78aab389fae2bd280e4bc85d1bd6655269c3359753b17fdac502c3a2e871149fbf" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"48c121b18733af15c27e1dd9ba66a9a81a5579cdba0f5b657ec53c2b9e90bbf6bbb7c777428068fad9970891f879b1afe0ffefdadb9ccf990504d568bdb4d862cbe17ccce6e22dfcab8b4804fd21421a":"":"":"":"":"05da6aac7d980da038f65f392841476d37fe70fbd3e369d1f80196e66e54b8fadb1d60e1a0f3d4dc173769d75fc3410549d7a843270a54a068b4fe767d7d9a59604510a875ad1e9731c8afd0fd50b825e2c50d062576175106a9981be37e02ec7c5cd0a69aa0ca65bddaee1b0de532e10cfa1f5bf6a026e47379736a099d6750ab121dbe3622b841baf8bdcbe875c85ba4b586b8b5b57b0fecbec08c12ff2a9453c47c6e32a52103d972c62ab9affb8e728a31fcefbbccc556c0f0a35f4b10ace2d96b906e36cbb72233201e536d3e13b045187b417d2449cad1edd192e061f12d22147b0a176ea8d9c4c35404395b6502ef333a813b6586037479e0fa3c6a23" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"8802d43f70294f532d2af0be0852b7a9ef6584e8b1631845306b583ab059111c0a88cc670b8a827e5057b902563840b6ba6f6919295f2206bc8738eee2b4e7b4d3d492b945150c76edf466cdfede4868":"":"":"":"":"caa3a5f9822f497fc3335c3a4262294846cd4a6842cdb290a011a94b6c3c27a83622dfc7e5c9954e91feae5ca8034083e2fcb493e210e5caf31ceb63a7f3d59dcfc3a859dac5c250981f7b663e4ef7222eded353c7f42923c6c6db006e927b4b5f44b73e986ddc4176ac03a5ec619b3ebc923d4a6d9430e5b9adf75a5298e76a110d0a2a4e2f7841f900c4067cf7ee68c356c4f5d13be8885801d1e578ca4d2cc32d48b5e6303a0bc417afac033758f3e812693c49128e0db1bc9ea2fa2f2c45cb35792123af63f42dda3abc7cf8bf5dac17987178cc0a64b0fde5c9ff2012bcf57e93103f08db1e3a9f727e1cf753ea44d62ead2aa5410b9e37812c43d60eb1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"a53adcd8c8ea16ba80a57d9a55955197ce0d957bc92d8a0b548bedca149d78ffa9dddb64710d5dee89f1edd37d8b55dc2f50bd67e4a6ad0f3a01947e3673b10688178710ba2e7bb5f3dbd826c792c9d8":"":"":"":"":"7f89db3d0d6cf7c5557b4599d7f4c8b5235c00c9cc393f734ad7ba98cb8e767ceaa529892dc30d2885f161f47b9c81dc2811baf12f120bb9458096c183ae35e198e1a50fb91f863c5d82b27ed10864dd6fd601f4a1fcb07bc839bda185a9b18ce45d800049bd2f41fd909a12eb2fe8ab3e1d2f0f1187109d61e2af6df0c5cb9fb801ceb319d0aa9fea918ae9991720e4d9d79ced8285774382a4d89001fcfb899a7c3fb864f1ad2debf5f5c39ab04496ffe383e9efda0eaba48325514b09a253640f386fe12fd1b25da3b2373ee14ee9f2ff06fe063f771624f538c0e5620029b9490f33e5e4ff1a9bcaba76005c829e0117d345b73f986d7c8276cb54fd87e4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"edcddc13604e036f16687e36bb576cecd71b20dc78f070033d8b6f1f8125ba2d2d3efdd9f01a93910ec29fc4718420a21385f8798218e1aebb810379a0871b534e067b04d6ec9d523f7cdc8d45bed4d2":"":"":"":"":"df02ec9bccc25feb7aa4787f5f63a92ec05b2cc13fb92c20924aba9e1723436469c87673b8987ef19be99ebafde91d293ca6ec7c1fa4cc8902a57417338538fbf897772cb96085768e893c5a09327354006074992cd6a517d6c57c7af5495a3d645798eb1962c0b56ff0c8c98e18c0963e5a581230909981b301797d779703f31b264f90d6483eabd8a41fec8ea69a57befe1f53d470fc82bc35029a4d089eec7ca3986485a51ad1e56cdf2dea5fc3d39aa997a53a9924777eb6f3bf1056a578fd32aca125a74c8d24acb7b99c37f34081850712edf1b6851f0a5e640ae7193d3f49f3654aad3cd106e41e78f1e93a8a2d01acde0e6ceb3f19e0ab49f4bcbe40" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"7ee0378eb594bd2ef129f35c9c1d87727c71ae472363a596467a2d71871863d8476b636e2ffdc0db70be5f7792ae8a8cd40d3f03347700d3ca515880cfd7962f8ce1dcdfc5ff134daf552f8c2a911758":"":"":"":"":"cc14c0e72f186392e461f65a0c0711e32e4b33a407953215941fc5d06279d08770b3d165d568b2fddb94299de2e7a6df0820a64e8779893390ac173801ef85170a52b9c0334b4fde55fe08e90b79cff1366bc43c0fa8f5f8206cc468987a38123bbe0d27e7ea2d21e6a1f02619b8c270a5e416ed50ff7e42d9faa2f8d383eda55899d85302590622ada9ccf5d144313e5df95688fd1a9c48ddcaf7af03068e11729aadd626761f3be1cd36188c89d08e3d8a090e7ecd7394077bbbd2c7e1766662ec882901941e09be9943a72a34817141611ef84c0f1848efdbcf245215f290427a6247174cf3a08e4110d3eea05bb85484f75e156e2fe5ea0c6723d3f8f047" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"fb35f3ad6b7618735ddd273d95b442a362b6822502a217e893be3e36fd7be4553cfde0edf5d9b5f15be9288ff78fd0c09ebac49e71484169170f343f4b21e244d1391f963112dc061075d9b7d26cd171":"":"":"":"":"6f6814f55c7e226adb7687d73eb4e9b909d47f4b57693ce2c543436318faea92371e951d5d338c06bd95f0e7debd915e2179beeca9878faf3dbeafeabe3c9bc8d6445f863649c66e9c3609b8a3d54080b68ce145b2fd4ecb3c93801c307c554513a210e49dee13828b20dff092de2f312fd60b2aa0af4ed7e564f06adea6b3dfa74636e7ad16deb19e95df71d2860aeee7532aa9ff2a08c768f1086abefb60d860657c8bd7972ec7be3740293b6471cc55262cc120f97c0c08de78b705068dcbb2d0c656ccb8e2c6e3fed199efc888492ec641d4a54152366dee96008a80794cb3b4f5a36a34d832446d03991e4374315c67c336aad317920b99f9c35a493582" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"a8db61234723da2f0883224563a1bc04c7b4d040a7de3b659dea0086bab7f454c73d1f918ff29e2f98cee562e05f5ad6f2781f5786228cf0cbb50d2c8d94a1307383d41229a90c0dcf142b94b704c56a":"":"":"":"":"0fa5fc008c56ca47024692ff55f500e312423818d1eeb77b1a3442058718885479b405767b879943e73fb16956ee2293b23dcb93cfda420a4f37ca5eba1aafcb8700cf6f38f2acac88698f1c0abea975270dd4436292c8ca60576690dfd9137080db2b3a42107ecea5a631ac413384a9329d60a358d2c58647eedcac164df50820e879374bc2e08d971bf5dc65afa33ecd472e5fe9677635a79ad58b489933fe9c1f992429e5d16dc954d2de059b70b8f170decd1f22c36b034e5f175138846901f6fd7fcea1491846984ced8b595c411a9f6d21f3f15fa5a073efb5f829f3b34d601aa91ed8cc433458692f44ec1930f3ac5781ea001a3b79df7c3e82ae5365" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"95d7851bcd43fc71cd9656737a0b05b5f83e55451c4672061230b9b34bff71c025bd51ccc3f4c2a14407d5d569d250b840e24828c319c1b7fe093e5551f8acd20167b2839c8d5ce9710532d69812b8a6":"":"":"":"":"358b36b4b7f119fafcbfdd619adbf9593048ed7364377752def3419b85eabd444e87d1e952c45f7c9bea3d29f845f297dbb48c2336cf44216fdd2e5c164c81ac688feebcf460910ecb8b8f6c3b0150195b2c7f1fb9988eb60c0564f0e089e4c269cd19414f6718120ad3742f96730233dadd3fb7d9e898ce38b5b8244b0af62ddb1e2689e9aaf27017ea28699d08b933f9219676a98f817421c363a526798833f9e763dd19341f56599cb594f274051151b87bf219d4b87b72eee5bf4bc78053a59aa5040ad334e08283e060b7b528a9089f24b287334070853c180021b50595e0fbbde18422127b0ef7efe92b98788d6e85683d97b679861154863fb0d4f9a1" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"ee7a62efc8403a0f988711436efacc44b5098f9a3526dac49ad9343c80c98eec51f064968eb37d1a8bc8604e3324e5a64a99315401a2df8d8935e94fea3fc5990107bae19af886415edd6eccc95ee942":"":"":"":"":"7e3a0a32d6954bad579d54f136594add6cd30628bdd53dcb09baa98884547bcf3c8e84e4c01b0660d62dd8b44ae6ce830447c5480f30942e742bde5009fa769ea8662a8bd26135bb45e5a380439d5b1b0114969f42bafe4d1d7b7c9a7b765573538a7f5917af85bfa1fc57710e10eb4a00062c176b93f4b02255606a110840bfbb9131aa290635fac52b260190e9172cfef947f152113ff3cb3de73e22eedfc44f143b9c23c1670a057cdedaec28b145ac2e699f366d5d695d1cbd258b59d4c88bd8d1062ea578c758d5823c43a85b5fe1aaa8f3e4b68092d4107d6b11eeb613ed058747259ff0eb685bdd42b9dee54c1be9b613a4ef672c4d31ff84a73f553b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"bf02755e4c3db98cd26c0abededb5ce360495c1a2ecf194e922d87decef4173584a3788dad5b308c50e7c0a0a10c7a42f3c7b2a52df2230cb8dc7bd71c35d448fc5b1eb4f903ec6342cde118ac284c2f":"":"":"":"":"ce2806594da7a6f27385593b14669b5c63b6a5b0240d150abf0ea4daf32574604fcdf10c4965a9220c285885ae2d2cc1de8a86796357741645964f102e65150d1106cb5b8c5bebf5fdcd5e64dced9e489c188b619c2ecf96e7f96861dadcf0e7381b4d628165da0ec5b7c90d369afb705c39986e4884adbe05fb7b74a9ba3b354e858697a1db531ae32ae8184658688012aaeaa4f69b85b802f5adae64f049857d1314c7532bd40043e61af47cdc7ec8e85fe61827de39c2f1825fb0253ee73ca2423544bb64f8d2afe84db5cc8ad7694e177468dcb29092b4c85d069ad7b1c41e139642076b8075ab0228f542fcd2a7a6340917f82b7e356e5652eca24b3031" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"a188065c9ee936384c5572b0910360ecd984cd0ea926c86b269f38f1040d41679bf9a91bd4e986f500036cfafc583edfff1170cea9f22a3140e7f4d198630fa353626518062340fd2f5b0f6b4fe7e217":"":"":"":"":"ea19cc91d80d37b8f16388fa62fe8e1f114f32f2a6108140b60c1994432b18445cdc131b21c884c74d155aea2aa7f62c7ffdf128886cdeebb395e5b8819dddc8c7834475d19162cd6a9c037995e3f9381cd582eada424ea6b67ad734c216f8380bfc8f5dc0e7a1d93c406870bd64a190a670a8ca94dfc0c02b61365a1d908a6b980627af6bce02a42dd9dee90dba722cf6bd7ab86cc4200af93ed226cdae14f28e242c6f96db866631b258be010d47c2eb95f01fcba4fd71646e6db54947a0d4dff86a107e226b1e4343d8a1d233369f8b560f78c865426d341f5f0713748b3ac4031d3d84bb057cded60b11de44cb221869e42bb054127388740e52535a11ac" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"58ebcec4539f4af1b32a854181dd0f512b8c704fa47537096a769eff28c59165a18226cfc779efc9550f7be02006d83c230cd6e6909e301d1e99ecd1fff2b2cd00a56c7a684c8907bbb13ce3e9a0cbce":"":"":"":"":"6f4e86f309f69144603961c5366e4f9b16d10c10593ea689a8e7435a327d2524f4468813ea7f3248d8d4bbe17b175cfc40617149983928b267dc0c4db46d2c17fe8bc0764386758af1a824e12eb897feafc1c7ef66f80ffcd993aa016e139991cde8435ee6bb0de45a7fb61eb1a6beb76e012b848ea003f687537e4bd00ced37efdda66333b53a8dd5220c281fbf68bfd9e72285e78197881efc540da4c1ba80a226013a2d7098d34af4112e7b8c865af15409f6901b952fee4a474e4027051e1dce879ddf5e84f3947dc9b94119d67e6b48ed6fd6b1f813c13d3ff30e121efce7918533925f50c8e381e87ea685f993619bacc9efc0aebc884b450646eeaa5e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"acad606154f6ae06738d67f517cef4c8dd8dbb2ea333bac9e69bc0a4cb98877bfca3d906739d442608bfe66ca48c3d7d01f7d410f46764bf2ba4268713ba76bf7026203e35313ee75add608509de867c":"":"":"":"":"f6621bb82d8830707fdcc6f58a7cecc7501a56f44c6ba783f6f8187b21f5f3eafd1f38ae780584ba4aca59466f6f5fdee1e82b28b5f8db4c4dcaa28f030437de407b5fac632c96e43a12d13b54901fb7c112daee2699d8256c6ee26d60bb267dfda2c6d6b61c9c67cd5a5b055a283fa02d06cbb8b9b1c3131d7decce4db61243738af4f6652bf2be23d4b49a1a7bfc711092cdf655527ee785a85e90b58fe478a462b65fd9868f821ffba56080064d74724d8c2f98cebd9eb8fc5bf13399b04cf1586334913e8e9232e13ba10f9f2c365e50154ee91a00d981d4fd7a4d49c3a2cc0988d4d712074918f11c378c40e762b610c9f4df3ef58d728a23dff3e035dd" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"d2715947b420ca136a4cd5c921b8fae20900679d87ffde5bdadc7b0fb532f35e100d8d0b59810bf3222b07fac3a3c334e4ffd96983e51ad04c2c5bb7fea15e8a03e36b92f487b314a191b5ae4862cfe9":"":"":"":"":"75751dd3463cc20d3f27e3ec085ab6fcc37285030fabb2a6e43c0d438c7d213346d218d34e3fdbabb3411be233707257290599bbc69512ad971cec2431518f38022816b9f794e2328b39a8cf6afeafc4d1f408f6e05863b654369dac0867feee0c17034d6d07ef22dd217f5ad0f1ef25ac82fce018573d0a2b0d5a924aebc5fd9c3eb9cbe38ae3d60e0e92ff800c9b108fbd85b2cde1b651e080e6625ecaeec9be684f1f7d98caeec9aa5e1445e5c3de6afb590fb3be3058b403df6c556963e98cdb30460a3c688485bfae28703b38a5c42454d91935fc7519e1e3b311ba117b1bcfd480c015cf8e535af66521cb35833621bf1026139164052aff6aa4e51fdc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"e1d2d72e7907e7214cb266f1ef641395e54b39e8365304661b0bee371f3246528417ffd58420e48ec063de5df4462e39e6cae1b5f3a3a12faaaf39b98ee592c8d4f56b9d4534add5104b357d788c23ab":"":"":"":"":"626a0863321ac75e0b6240ea6a619458634a978245c1533819c97114e63914009c9cab732f1310f60f64f033b00729424228671f33425099820ab108412d460f32c0015b73987e937b9bbdd29e5bfb8dbb6c95d2b69fccbc26b060cf0a5dc0992fb0e76b38bcd64fd7a726714e8c8542d44b2f9c5d2f2f8cb370b95e086b07e88f492f51fe6c288d78b76d0c3a6146c9dfce53e76cdbbd158d2944dd10197247004954d92f6b1df4badeb4bb1c98d7d3da2054e3300f6d8dda8863422e6a042c2d84b2bbed6be88f0704763410771b3786d2f6d968b6c224e0cf535e8d02c178b2e0b90e8a7fca0c431b7f3cf41b0a7c17778fe8c2eeb442c910ba88c7c364cd" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"4686a959e17dfb96c294b09c0f7a60efb386416cfb4c8972bcc55e44a151607a5226543b4c89321bbfb0f11f18ee34625ef50daaf29929047870235c17762f5df5d9ab1af656e0e215fcc6fd9fc0d85d":"":"d2383c3e528492269e6c3b3aaa2b54fbf48731f5aa52150ce7fc644679a5e7c6":"c841e7a2d9d13bdb8644cd7f5d91d241a369e12dc6c9c2be50d1ed29484bff98":"9054cf9216af66a788d3bf6757b8987e42d4e49b325e728dc645d5e107048245":"b60d8803531b2b8583d17bdf3ac7c01f3c65cf9b069862b2d39b9024b34c172b712db0704acb078a1ab1aec0390dbaee2dec9be7b234e63da481fd469a92c77bc7bb2cfca586855520e0f9e9d47dcb9bdf2a2fdfa9f2b4342ef0ea582616b55477717cfd516d46d6383257743656f7cf8b38402ba795a8c9d35a4aa88bec623313dad6ead689d152b54074f183b2fee556f554db343626cea853718f18d386bc8bebb0c07b3c5e96ceb391ffceece88864dbd3be83a613562c5c417a24807d5f9332974f045e79a9ade36994af6cf9bbeeb71d0025fcb4ad50f121cbc2df7cd12ff5a50cddfd9a4bbc6d942d743c8b8fbebe00eeccea3d14e07ff8454fa715da" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"0bfd73a55c96ecbb6104fc1f91d8601e7b57cdf85d6e6b5360920b4e7d1cd02629bb1c55e637fae1608f389d179f4fd2650251a37ad27c2b5264b1605ed5a51df949086c10ece31255701733ee1c8539":"":"15b3816392285fc665572c48a168068a10994cbe4ceaa1955f07075039c73b4a":"374241cf3073e2f82956c76897944ae9c43907fd6781202b10e953c3aab1cfb1":"4d434031e2a2b1e1ac5ec98081be46d05de1b4d25e3b4dbc8f040b627f8a6f7f":"f4283abc7c0f40478bbf0234e2f7656b7c6d1d356c12a3e1f76666baa19e8a05fc1537bdd2fe855adbec4ed4d287fbf571615f415867a2e188ab60b3390053b27bd8bf4745887c93e68d0dfd01608d6b306af273b66db6400daeae962882c4c6a19b363f24d4bd543a8bcc7935f078602cee1cf3c7b30343ae2ae0d5ab111764d719205fc30325b2f938b4ec4d0f1fee2f431e70cb1aa1e7d826d54b7b4fc50560453349d2c52f09d6f5eaac72b5b9ca9b00142d45abc550eff26f1dfb8229bfd1eb21e4567145d7ca47c84001abd7f5f5e7101b9941302929a37f2150620b899907f7216f3e2bb1fd028b196031692bdbc0d2769c448b024880a131ed98612f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"da5589e7fee0a023e01a50aa54987c5b6d70503b78403762cdb53c9ae7ec65f853df14cd7e30ba0eb703b912387469bf7f000e5dd78dd80722e194a4616aa373be2e093d23f2a4e7224b841ef550772d":"":"4c74a4655dcbebd1331b86bc224be30e6c3386ba844716d1a6938447ca7a317d":"6397e8fe13b3ebb08c0b7ce460b5a149b23433e110b881a9c095cf24d236cee9":"6aba359faab473d0d51f21bbe7b2ffef3a03b64364777a48f80698643d9b2504":"49c7ea8e2740fedafd8d31571a240f175ab5eb83b2104f738f3bdce41c160c19edf7b2e2c0603d9e7f4f26f132f6b8bd8c61fb0eb391a5b4b6d23e3db20584e08be87648984d0b9f3b05c763665b110d58fba8d3b7c635a78ed8f56ce05414b8bf4e0985e1ff0b4f55eda8cd516836099ded2b6092c9a1d532bba363e0811cf507a22189cd3d20ac6e66380fc8dde32dca54ec76130cbdc0aa70b5bf3b582ce1405c69dc0e26f65d91644c557d1b55ef9cd893355e7836efcf53dac2d468c4909e1538ec1555c94c04b62448092f44e81be7c0984bec13a53a953efdc16d3497b1ef5fca39231feff486c84fa7756419bc909c8782559951d971157441047b80" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"8a36af663dfcbbece9653be51c8dedd7ceb125d59dbd143ab4c37f21d8cca464920dd161245835ed81ff1ef1d09e367ed43118910c2b62d4bb980d0e4305b07e8b321c5a04b46d4a7dd4611aa328543b":"":"59c96d6ec4e49b8185f275057047153ef626456085dd77a01cb89cda060bcf3a":"1492daff48d8c7c9e9e8f38130b8ab2de6e02c6cdccc25fbcd92d8aff1fdc66b":"d2f40e7dbdface320825d0b766d0317f47c74fb55a5a325d66a5834db70d5eca":"435ed803caf3e5c94bcf6ab61969bcc4e83f1cf7e73e481494d494faa9e33cdd890f112c89bd235d6d1dacbbcb73fb1c9a54a4b282032cc01787bfa9bf855edd91180432c27d98a2f7983933140f63688ca595e7a9fbe38d12280023d383891f0fb8ba3fb07d835a0d48f3f90860040718d341fe5dcc101b51243081563589b00a3e7c2095118c13b8784b387c1d63767c3c655025021b0eaac886d21eb5faae0e35fd073cfef4354c7b7e4ea1386d855e71bce01b30151629a7009b851fbc404731841bd24fac155a912d7b7f7a601bf6559e438367fdd898379b2864c548bc8e2c088348624e33c82990c74f994056d22add18e611665f1b45913a62f90845" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"dda69dd5af052570a7cbc2fd378eeae936cd301b197d23dcf21ce06161f411320566cf1f231111c1ef883a88f356d94f2ba7e42d84574f39ba1946450fe7394e5f3b9a21005d797dd03f27e0477ba74a":"":"0cc796ceee78dfd667c309499dc4ca1003b2d923026c65826f280946e9f3f1f0":"2483640ad6b242e5c6576df18db137a3cf0e4a3eb44bfdeadb9bb650ec816200":"ed978c3f50c3ebbf4b70a75771a940f03eaf7c468e9c4e9af5f8bf9f947a9352":"9bf785c4a1006da21f66ae308e6f23de2d1b01521c40404da9b605e1ff1577ca1d1300f0e47e922d02331c79b7c0b1e060926564979e0ebf77ee3e1f54907770baa80ea8dedb7aed1948df550b6ee95f2f71a28ec2eb5baa76eeaf0062e757500ec255369a9db75c242924d64a391af1536c3a9a6951aa991f02b7415a2ca77582e8d25bbdd023e4d0a0537c0074f5abe3ad34d24f5b98aac29a62c1c2648eb124af18c619dcda701e7a277ff1e00a8a267392419dfc1fdde4ee865c9f3744d92fb86b8aaa872b0142762bfcb7f9a45dcdf5bee93bd631b73e3acf9edfde744e7492b77fe38adbe631e7ffb2d1708f213136483ce6845398409b8550e7467b6c" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"346e27bad2b0c0029148c5db5419a124583d2021fb74677b37b13e8643ee7aa9e9bc52f5c2689ae2bacdb7c8c8d22f5a4bbd2f0ad3479decf2dfe2e9312dbd682d96e199e07f5fd4d22deedd83c77673":"":"65262e1bda7014866794713ce6bc1ae4f0dce523c82ce43e6e0cf9a64983964f":"c68c54bf2cad027cda08a3380f3bd525e354c4288a7beda1a7ed8d62931aac8a":"cbd0049d6546baf0a8df2de5f15b29b77ad07f59b4dfe6a872f0bc1cad71771c":"b8c344a8004072f76582e494f70ad0f7d21fdd13cccc387622ef04ca03a0a14faddbcecf8869e0f23b6f13fe58d9d769f3ac96ab9b9967150fb81cb5d773ca44960e9267e858ec9df23228fe2dc239caaff0f948d189248f5c075c3250270af7031dc0aebb327b004d84d0de699f5b02da1af448df0d13ae19f77586db22ede3f6d3d032d10ef2d7e2efdde2ce66a8bdc07126cd49241faff097d1467d862efc2a2e198e74b2e3293d4a99bac75e328a1dea3477f3f4c95edacdee48b14d26b054b5a268e242a2908449135825faa7b4fc0c9c877ffe7bb90faa7c3f136b2b4c78fad9f44c829bbf7eb8f747d501e150bedcdf4cdd6fcc86fc409a21e6e90e86" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"09587ae0ccf5c580b44e390e68e6a0a6daf45e7162ea0418135828599918ecef9abdecba73d8c6d56bdfe005485be3b1ff284a85b127b00185f2f935356c3f87d076599f6b0fb7f93abf45f0d0bffb3f":"":"4e703f5f59cecd926fc0d94100d1c54fc8b19d165bfef16437d7be92802b38d5":"59ccdafc72e5727e303d2284b80e9224c95ce5ed0edcd816c18a55aef681b203":"36d72751e4d6a7c6cb2ead12eef191254df53622f6c0fd1f33187f09e87880e9":"c1fa1565591a1225e0a61e1caf0fb6e4c17740c1b1088f47b90d91a0f99978068c162f14cf82a1ca936ec3312ecdec2f4b7944129722657ae20055a0c293bb678771b457940df23fedaa69eb1c1d487af7c7790b4359bfc84fc83e9f64b81b78b5617d8074d8c7fbb443d3bc671f8d2bb600c3fff2231e0d363b41f3f558ecec02b0f1d59a63b39f5b82b59bf88a0fc9a838a802875e7bbc06ecd0029bd62796e2047df49139bd5c34ef67dc930b1811428c4b547a6f67404012a5b97f93b2895dc2c2389070220a078d2fcd8244a241caaa98a9c0c7aef60fc856c61a3b8aab46ffd3f0cfd768d6b41e9714969587cf363b3ebd60c8c331435e9cd79430767f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"1ad037daea8ae2b9131f4490ccb453b670596978e097c7b2342c5ad8bda53de10f696e07bf91bb091c21898a1f728bf5873089840b5f022441b355f8e5cee75917400c5ca597d6fdb8f52874cba1ffae":"":"27b4177957fbb40bccb4832fd95be75ed8df2307be3cdd692e8878bad14ca8cb":"c7dd83bc2e99c2428bb243c35e2544b10857620fcdf8964b65b62c58b5069a16":"ba57de1455a25c66dfed3f8d2e3e198fc6ebfd7927f590c702d3a5ae81e80ac9":"76957b10f67a690c33d9a5652514eff7b3b5ddd35acf424d0706725d331411f6cabcc35817e3dd1b51053de30ccb0210bf428caf0fd6e9e798870e2cac024643f5e15f6c5591e921e7531e60c402bec732e79f55f354eeb5ced5fb74513ac8a48cd6dd92a8f72ce26d87de25ffefd511974d629d17048f10a6315d1e06103f58f8d3a04391239d8b1e58cbac3eb7d8ee4fe9daa194cddfaf891a209f7e3f703a4c18fe4734d532d9b648d55d92d6ccf7b1cd5daad9ee400a52bc464ec300e4dcaeeed6ed9d741be4c548e45a6b9c7f73fe4b394ff285b629fcaf031a9ab3593d5358428db60850de0a2fdbc51d5c63f956d6b6625207e2a0e401891a92ef953a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"fd2d1b1f4150cbbf6ee3d8667e7f508b341b3c251c8b0abf3178d2fa5a80ed170a15bf55a6570f979080ead216effa5802b2e7404ad93c5cc41e17eb78168859388738fa935d1cd6b06422867a30b552":"":"8937c389fc1b905660861a4062c4e6542cc2c587284a279cbc86c432edf541f9":"c1f79f883f51e1de95afdea8392e121a9591674063411ba79b098e0869dbce33":"0ef847924d2fffbbdea4f12acd441e52ad39ff291e80c7a24802c4f03f09c8e9":"26a17b546d2dc3b1528efb53b0b0f87e917116f03658ff6e6fc165fb891f483af8ede7fef8ae44ab9ad07961b4a22f50fbdf1714720704de4d80edd1b1fbab4443e961a441ce4e7959bae558e333263f79daff8d8f9e3ab0d73eda9f4d3e31d535c67edba3d788ea7250584694628eeb55df97b01f5c70b051356b5d089b0a368d98bbac36c690e188e58eefc9b5e2b59fdcad05b71bc111b786512d13fc0ad4b9f799287f03198a53b8be4a2183e7096a0b9fde728dc409414753077e436fe1af94a93241021de8778d65a4708102a49875416170b30a6fea290d6882c41ed8c838388cbb7fe881a4775cb323de353032c6e29aa057bf81619e1670823a0ae4" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"d4f64d9c63708f9294fe1b1de82e160274dc7ea857f8ab6f4ed629cc5c4fed94bd2ca16570134810e71a3a7a38fdee4e4aaf3aa82871142efe6b7d7a4888b4f0c745bdf649f6c84fe5a6519ace6336c3":"":"a8acefe33c7d7933ca6fc3c8495bb315bd4edd94668084de3a4f742ac5ca1fa1":"095006f15ac6f8f649ab217dfadd426a60ddab70c114cf7d52f5e6762a47e679":"9f095084b18d6eec18bb6ba7ff6a876344f0d6d7916c10bd510e2e0d546c4a3e":"3d3e2d085a23f3b08c0cf1e49252858855f28afdbfad3a58983b1d815b2643a968de890af8f3d804969d716dbaaf206985d413e2534ec6f2c9e144be0cf097590e3de9d63d5c530669d1b287f99d769e7fb6e2c71973c1ea02caf49d3e400bd31d578313d5c73bb52535a86b28f4252c8f6bbc9770554e294d0181904881d5224cd30bb95d85a952913f63e2bcb2c9e24e9a999a6c7431c5e6e2d76e4ea64480819ef95f40b72dba0f841cffc67bde3c9732aac9bc4dfde6e9789487ab9e2fa87103155411eab4c2e9b640c5ff417307467ab7d9b6036c8e81a51670525f1ca234fa4ec23abe6dddeac0c029a4b58d2fc8c24c3f57e2c2081137c92fdc373d23" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"f30723bc93a3fac546286c2ec8faf54498eea6f8d723c32c7b648265dc75d8dc14634281f7a7d1870208bac4896e22fc72bec353ce3bbe4fe2672c0b9f6266408008d0d1fff6c9c797e93ccdbc72dd95":"":"ebc2b572f365a726531b3ddf7344590cc5f779771134ef7bd7aec4af95bfb532":"0941303cfaba20f7c7c4ee745ec65be3c4f6d217f8e6c9a1f5e6db94949645a5":"6039cc999268f1fdd5ee2979e76b584b85069f144507723e2a47e3af1d8c2355":"eb7797a46743e552e682c0c7ff02e1a06d5aaccbd1a54075cb1a9332e76570d6aa5dd7423dab5f12b1bbfcba8b6396f2bbc5a1bc4c7f1fc306b32037b503a1a26b509e7c736b035108f90e4b3ae880bcb1eada72644119f9ae9a73eada21f9de1d2b1356a90f83c6ff97978bdce08aa6412535b401dda98c4ce72534f6ed75383d51922e0a4763c5903baaf75e5baaa355b3448e101ca3229f5eecd346f450c2f2b11503bbf23bf5d8f79392cf1425ae1cbcdd5bce53ca7ee0b59647a0a4b8cbabde28a7368fd46965ec0f55c8cff034ab3b733d19ceedf2b8f38e541da2bbb51e04cc5506d1ef8ab0ec3b43c34dca722e830d745ce631652976dd6fd9a6aadb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"070a6da7f4f59da9ecbba2daf690ee9ad0c9cad330600b7ce7b95d5c1336c96b47bcbbf8eb4d8918cebe861e959d68d7e5fa7ce34adaa38de3e36f425832e6bb0a23fe21d10c78800506d9054766ce52":"":"3b4d05963c2fb8315371c2f35f375b6e39ffec667303cd96642fdf6ff5f99102":"4189cc93c021bc2f958daa737a17f78c03ca09a1a4a73faa8a74f3f109bf2800":"5da2d3a69f10cf9a2f5276d3d54bbba4ec02826f6ee0440608ff4fd6b1ec962c":"f8d6d5d7aee571a9d75923c6a2ed73f3e77901cb025d3e609c7cbf83b6478899b410756f66546bbf38ac3309f02fc870e056772e56abe76a99a147d12f1fc60ef50cf87baad21f5ccdb43ba43ef0ed777be5de30ca312f814ff05ebb93bd523716b8f8ad0411aa732d2116040d46cffd9bc2e463664433ef1f7fc56105b393915106d8ae860aeaafa934975d446ef95d697e1761017bf102e9e175c7d6d3a3aee0ce877f1ce7709d08c2c84a34d85d17f77e06a5f72269c9f18f94a9d9e635ba1a1b62ca5499e717423ae4bab477eba48143028ea7818d64563bdea3fde587daefd59fe7059f4f6db16a61837876946eebcd846fb5acf07507c38410e2ac3f22" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"09b75284b738d600dcd3322b91d380db45d3efdf2dc8e9fec64cf07d7a606531ab41f05d85e3eed5f62d55c5132c75f151437d4f93dcb41145b2f95125d1daa7dd1f75dad6dc32e9e42a21dfaf35726b":"":"7ebffa04f7f0c939e1bfb4c8686ebe4ffd7a1ec3fb4aa114946a6650f2b449ea":"8d9ccf3526b655cb923ae3e1416e84af5e458a2ae4bd55aa98e900353f8bce65":"d78edf2f7211f49b70db778b0fb0eaa217860f9197ad1242cda264c3ffa3e2db":"1f802d0a9526017a56c43ebeb782c19143571f979b141b644612f0364cb5531f8fcd527578cef89263c6fc5ab26baf136418fe203dfe3113124363c768812d3e60a66b14fe13c43891e0756fdab6f8dd2a28cf9a6341b7b39d996353cf435726b2a02560e0b5f8035c2a50b10de41ffe389f0b0e478d783fe8da8d729f1a7b41e09d3e3cc5f93ce24ad76b5650ae61701035d2abfc05bded61afb36dfd910be47c8788af1f74cd101746207722ee2761e54742d8f21884794fa9b0712645fdd962ca5cf2d3070f4a2c1db6f4c1aadbcd415486735ea1bf6894146e09c6cbdab36d282e20ce0e840871a0b435c3e800bad673754cae50ab4e7855e268d9bccbca" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"773a12318265c2de4d6a80ce936d4c8a13d81b646fb197d7ade8d8dca38988e6bf4fe25d32c137ff50f5e20e987ca8c5c7ca4c2bfc9f68c1a79e8a0f9bf2a1dce0c09dee4134b39f1e51f0bc10359fca":"":"4d995d9addb816122b70226a068c457ed4635e7ac9ce41f1594ff84160c1c06d":"f068497d26966dfdd57d5a8ea1a05c1db2ac2d72248dd59d17bca9c6fff28817":"641d5482fad78093210f7e542f45a8d17fdc856be5860c45465b0775bc45ed7a":"4d47fa06ae54f60102bd242309d5366a953e72a2622d025f9babf6f6343429e4158691bbe3629e701f07a48ed239e734a78a400463139cbfeb45d6515bb690f1211ee03e908cc446abcfed29b955b92e7f9c3aae149195e174d34f10e30333fce99cf362c5a42a79ec907d90fb5806c1d09c9690d4aef060f0fd1b0b1877ccfc377dd675778adae40e87588e5080d3cf3eb1f710f019611267b2249007a01b3e6999a3bab294766c933b09537e99ef7251c588728ee1bf8c64ffc64de6a70a521eb745b4ca6307bd24ce5661def1d7374afb1c44a964f14edeb1fe457465c0b45d62a33c5c5bd1628d528b20154d73a946c44363aaaf20dd41244fbc81dd0475" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 0, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"eadb3322979308075d4bafb69cafc6dff5d55b97c4a73dd9943a0a9e4ac01b78ced5ab91508b9718f6de9da47fd7bd54797cd5a5f6365c28b1a56cd5d74721afc4424a7ca53ed8e97a2c15a727a682e6":"":"8ced860d74040dceedc0fd0f3bd36ecaf36f91e4c56372ed1a54d25d65180d42":"a19980a1c86e9ee4db41f6467144b0dff4c0692141916d46bdb7c2ab79992116":"1cdee366e7c3e7e853caabc4320ca2b63616ae86343fc5ec2a21b6c24c04ec39":"84432c3f00ad23bf1ba4b464ceeed8da0760319141c214d6c31344fead11011ca1b10f19de5a3514c8df0b69fb85e8706db272d0e1e6bfd512cadcb4df7fe745aaaaa8fdd6e194c38b063c030de3da53ae6596834b99a46ad205690511e3aa69cf5bfd9ed78d6d33e357524dcc94278b127e89e189e52db00b426499a388241e9455deefddbcd3974236c67c6207a6f9c4c5d1403c02c828488e705fa4f85fa2771a1f3df7b2d5d4b1bd25788b8e29c679044e557ae4cc5dfa86559b6ec3b5a314d4de8affd2d576c3cb260413403e3ea439ed4df3501acb85dba98306cd7055027c7bc339878998e23f70680a855479060186335217dbcb229cfc54b66130c3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"97aef935ea33717e8e8644bb8c4789f375c48a945ded08771149e828a22dc86682580f51070ba1e991d9803f51fd9a6f63cd91c1ebb2caa15f2837df8f35cbb6fe96df2674a136990a5976cbbab63bc1":"212300f93899ff7cb144f20426028b976380a348253bcc3ff42b528cd1972549":"":"":"":"0e8533f64b60c23a2655827037db218c2fe9ce430fa4ed6ed9be349c4bdc6f40018b42f486fa04288b3b0c62a12812e76e08c76062a510cc60841f165869efaceef90805bdde2fd66c36c38a2ac9c3cb86bfd30406569e0afd245102f2ea2d49e4ee5f69187227a3f0edfbc1259cb6564a2d4e829b3fc3b6996e37546f1d8a16fcd8201d1ad28661bbb0012daad55d5403e833d8a0068d216c879bcebc054df0c9cba14dad4863ee1f75b78bc488662cb0c91ca4fdfce7df5916b4e62580902c601be706dcc7903858e6b9920735bdaa635add5c06080d82265345b49037a32fcf0a7c9ea6069e3369f9b4aa45493efd7318da2ae9b4fc300498248afaad8d49" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"549ada8de63982fcbec1d27162a51764dbd770f1da46d87759b2ced52d0ab2e8d1e8b2883fdeb221380e17ea387b3a065cd6dbb671f1caeb7b5a4bab5b901088f081afcdde5ecea10acd810735b95532":"0e7f0664ee95e3de9ef4f9d8faada0851bd1de3a3a767f85a74ba26f7fe8201d":"":"":"":"c876001855484b73dc46babd570013993413215f6617ce71be7c77a418494f77adc56f5c26b393de340a514b40bf9a0a9e2629b768ed329ca083dd4af5ecd6f45f878a55d5b02fb9bf3fe043ee9e7058acb83d3aaf39ead7e11d82725bdff8272d7a22cdd6efcfbdd60458235e523ba0ec1b490994fc394123fdf65d72ada39215ea6c7f8bd6c8aa4ce947988442c66cf53f196db401e275098d9260e2162f5726f0c73b201b61fe9f7b586057780a87861d31ca5b21ba62eeca6f5387c5f42147d55a61e1c7d39398a82ebbcbf4f153962f6a6bb5461d58476b4811051ccabb00cd9a78debed345c7e854fa064f990a6d0dc827c39c38237bdc5e9b1b44b6a3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"d3f2af83ed1071e6895b1d57d0969ec7fba3d6316df5031e452c26daababdabb58107846a2a6921ce3502614ae6cc94b9d246a8ceeece6a9cead94cd297838ca96b74a88dcbe24000f8eb719f939a3bc":"0d4223285e53c9e7d743dfafd08fa75c81582d0c507c38cdaa6fa1b398e342e8":"":"":"":"9b83018fb5a4b2d2b76cf5e8258e7d3f6943a494a9cf7dfe16f9c51beb6d9b849cddabfd597fba42d6fca4096e458c8c0e353da4fd6af9297583e97a910bcbf1258a83da465d34ad13eeacc0e57f145a8cbe09ad9129302e64a4d6cc9166e3576d256b7b3c64540100ea4b0c6f7f92ff13af732f6fce6516f2ffeccaaa0af906d4efb8b7625cc91c5358e5fd292de159dbac1cc9f0afba62ba7d5733491538d14467f9f242fa66e79b444f38ca9a6e7472e41cbe8a63967b2e9ad0d8fab4dc173a3bb45e3654ad49d8d8d5345146b33fc55c52e201fd404f7ba64c331d92c3109dd8fdb70116d0e84304772217ad8fe65bb0215eca5c842cb10d591c9b887f0f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"43de428b90ddf2dda3280fc3628c289ea7e623b63a0ad5f568c459eb7d62f739c106327c0f3a8f59e5bed661224e433594f78b3604b10fa048e04181eed885db9665c4eb92d0cb82969a1e5dbdf11fbf":"e9cf65c1c1d8d1fb07a0a66821b810fe8893339949b50909fb9b72883a530ffd":"":"":"":"2698a29124c6ac40f2416778a54ea080014a3258211d2136cc82e83e199243e7b6483f363ffb637e3a498ecda6926e91cfc19e61f66f33d3c830f2ce9a9379f3ab5eab90001a06b7713a5ab5c5ed461d1c99824e1a506482fc04b6ff0129847fe84b0e36ec7284dc028f2ae326f39e7b2b17b6cbc21a29f1f0c8ea069be5a2defa5794880fb37ed129849cb4e7bc998a80e6bdbf6ee7d7bd78edd6a7ad415e571da42481f00a857c57308cb7e24efaf3993587d3991ae41aba97439f5e0feb5250013d84619fada910ecbc186e976026b1451b602d20e60679e78c8940b3c8946454cb0409a83c2aa7e2d1f92f548fca8d089e15c47a2c803e7e1e78429fd01d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"af0abf3d221f4af4a4571eae06287c994beeffcd8f5df5da72eab03cf108d67f71b91ff2d70698a8578d058c181bfe715d244f5321660dcec025897d9e9b037bdb406bd97fa9c3ce5e6d01d0840cfbfd":"7ee295c84488c3f5d3b2798777f92afcfcfac175a937cb50444831ca60a58650":"":"":"":"e570a328f4aa705f4060f9a6ff38e16007e59533e1d94d039c274d105d7bc8c2ff77920748579de5c33c1465d4441332ba51d30bd8eefa90ae8a421ca662551957e1875d6515adba50a0d297640248e0a83c032b515520220ed880701650c97727d6b5e5f9980f0eafa4d709bcbca76d31c291750f52b75a165023ae40ddf4ad66f395d4cfb1f5a5873743031d2ea2a093b2da4ea175bae45cdabe00687524a3814f153c514e1c3d50abaa96159516bde73878a021b2e9b889c130cb3d016560aa9ac1ef2e4fedb67abbd2edcab3d2d74de3f8e9fb1120473687902fabb46eb183d74f22e5b3bfcb9dc1d1edd95360ebc1310651efbacd0e603b37845f2a9068" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"54c0128113a4f3e76311736c83581e6c3fa45659c20bc622132ce4f9dcc348e76575da4b0142beddbdcf51904d1febb248a116378bc69acf6d1b4b25d94e9d76145fea73f8bee448964486c39e88034c":"b147253bc1d28e988f99a53a73f5b86868b43c6ca73ec7d559f40f572f2bb74e":"":"":"":"2963b2932e86680bf0eb6907777e88f6cb51c38b36794a0254e984431ec1295aaa26f91d5bbd3874c7733466e04fa4180fdb922b10604280a1e34ba50b4f5867a9fd069028303364566ffa6f7410ae2194ee51bc951b19d7be1cce358e002a4b94085ca34f845bc7598ed5036c23a1a1097809c7421fe0b6bd10e90d1f8ffd1cdcfaf3755bdfdde695b032173861ff3baef7a194b5e46c3b0a3888f4e4696ee5dd2414a10c16eb372f67a7538782d61be0f7574646c7c05f6f3d81eae13b2f5327b8ab94d2c2172ea168a0f2c6b79494b497da375606c7d04bc2d8d41618d925140b835b90ee224ffce041697af669b0a944d342524fb133e193a54f4b528fbb" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"20f4687b717a31f5e818c872952385cd9ac2137abd2e49b9849f01cc2551dcd7f53dddb2449c1a9e793fb8a0447b303dd6da6110768f5d32766e3e3f171305fc68c4948dc6762d3c4d27c66fdf962cef":"0516d63709deee72cc6751191ea05d6aae7ef016dee1ad62159af167a785b353":"":"":"":"82ef3110200f4f322764f91fe5b119492b8627ece211e79e2ed69044e612f60553e5e50abdb1a1144e4a7afe05276c80b7d1e3992b609c4966f61beb02ff8ec889ff94889b69e4e6544be9ec760b260ede7e4b5e96b333fc460392efb1833a6467b175aa7d6602abe175ba16d94151fefa0fd1396960aa8c72a6b778f3f0674c86cbedff250b5a609d30e0b40ebeab2a524ceee7aa861b274bc55541dcbce77361acb8dd39fdfcaa02820950932245bd37986d5c1407098e13b5793666d079969b054589e70712d50be04bba484cb651c07971be722e13b82600358dec86c7f04c0c4e256ba12542f80ae7de745f50bfb07aa28e3857bcb1f371f01d93b12a2a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"ef41067a7ca9b6946155247ce8dbb619795f028d678ccf8f5f5b40e33e8cd15634db8c9141bc2cb0590a545ccd02cef6e1e96fea14fb8a55411d9ebf03633dae0ad449a2121d1c78fbc0e9cd8a78a34b":"7b90a2baa4c139e29c48db6c5b51ccf088fda54e4187611dab44409ce1c36f4b":"":"":"":"2a13126e8947278cfce11cb02ec31acccee5319d478a4937e8fb5e6483f5874fb20a17e9d4599d256b4d87318fff393f999e7f3d8612fc1b6063175a5d070805d53f7506632f03d37aa43b4e77e323ac0d5c241d9581d7e110fad21dec83d1dc9d119d1a0686636acd0846f58b42bc12a4e7e9d5ddbdc051515e8636fd3470a3b4c2efaf9774d78f3d32991f9ca50585f939d21a15c5cae6defb1702f9b606ebfd7308e55e6690310e35dadc48f9aa873f142397f36de90fcfc1dd0b8747496548b4688899df4d9d13857274741290a39c86d5b92d375b79efceb7f6cf2ac0c8c41e6d3c05f7e980628f330b5aad1328fb4b0621278b190758fafc93da359a3b" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"4d1a72a7a7efab609c6ea16e4a1150a8c1f8bcf19ec3225ad2eb10c761268d6d2c9b09f982710768aaff9d5e3337b028596f31842fd23e75a668063bdb03cf1d7e1ff419252d44335712f16720aff52b":"e5c9712ec583b2dbbfe76d5eea90b9e3b6815c2e38782192983c6a02efd91afa":"":"":"":"f4d994662acb2644e389b41c71122053b2a9bc68303f4c77870e426ac38c1b20d12cbd8adaffb611e3a3365defad82cc8c2a27d40f57e8035e16476442ce4c4beee9d8212d230f796fd92b02d7975790120bbf7a6af8115c06457d767c5543a6c1742ff745999f8e815f5caefc92b9540a6fd19ae973c52b321e7d4d7d9b6ab4900d13b7f633a7b8f1abe3e1a0540b5803b89d71b3c4d3a5dc7c4c0751e088f27b748440df9df14fe25096fdcafa1c3e16d49235defba82ed6ddd1fc8a5fe9f5d360bd72e0d19b21cbece29737037832b9ef18b96580ba50c344695d93d07b105f39c17cd91ebc291618c8862cd47459946f735fa7fc778b4489b574d6e77ee0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"5c9f5de1e3bbb5193bbdabc6211e797dd89eac092995a5539ede5ee3f769c4c3e221e65efd6daebaf2b68e4353c23d08bbfe26b69abd8dbda8e41f4f9057ad7148541cca28ab0c3ea512aadcc65eef28":"17f703c54499fe53e688c6d48b4a0604ed9f6c71b1cb4fb9cde37eb8fd2a2ee0":"":"":"":"11c40f20930a9ae087d5ae4cd93c6d8defc073888f4f8e153b163e7ded25a3313a55b341d40315d78527ae87c932c9071ad6416823d266fe23000e1e33463d2f67c73c6883aa301e5f12820640ffb50b680c3aded1f6b93d21c3c1a9ea01ecc9642f1e653551d6e8fa8af6a8ef626def69c65571f4a26a7d8b7bad126d945961797c8147c3ecad4637f915f8a3a73b3ff235aa3c71273f0cc0e023fa26b8a567db56a456d58536807817d5f9b04fbbb99dca16164652526b4e84781f08f1501364a1e3b709894f010693523facd0ec9c61c41ad9847a9ae47f3b5ee57cdd63aa179caf1cc4957b59461aff01f08180a53334ed436697688c55608a12fddf7239" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"c5de35ca4848615697693d839616a4272900db5c894bb13fa3a43afb9e2a714c47a61871bed42c6c2a9d190b946f7201b671991c43e5da4325666b140bf96f0548a7220edf2dbd9bf0bde719061c11e6":"0678789f954ea314dabfce48d090bf93acaa2f89f7e1a92e6ee0f7afb19788fd":"":"":"":"7d4f29fe94ba8748d534f3fbfdd6dd8ca00f362eed4a84b2ea4c0ea83267246343271bc9d48d6e5c0265da7c11ea0a40ba8cef9ea76c649426d9089f0fd81b69a328ec511cf96e7ca79e7cf51b9fce4a62a8fdc568a4ff19604541ba2ea428eb28ae49645dc0451708fd53ee7e6e6cb8ef7607777f959a1efdc172c10e290f2f7f3b2cee2ce5e9a83c3928c55cee180bfa18359dfd9cfad1377cc0fed321ec9d13e4babc23e4efc89754648e9c6ebe7d7f69acda85a56501b8aa8887f9b809b29c7d3b02a8afc8c1ea9bdf26179b4547b480100c9e6f7d05edd620599d3ba85c96549a20dec8084dae4c98dca554a2cff094afed966a1b3109dbbd8ac5c52304" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"cf72dc871545003348cb2e458c6f4fd6df5220ce389a792f854498cabff1b5c88e3732f6aa95eaca2b318a4d29d2d33f3a289ceb1bd858e3c86c7404825c0c0a812064a05325e09d34553a691a601866":"d8df317e505af016e86297f02fba94059b4cd31529d8c1ee1b33107df753d89d":"":"":"":"181851eb38a67d9552c87902d25c67afd377aee587da12386a46148c4cab44ed5b61777c2247d0d39e0991fa6462475da9763d30f1adc9a1d2f90ee3733cf335648706bc7ba06c862ec9969a0ae38b7b1e14817e0d1dd06bba77a7371f60e0867fd7744b0b4b7e36cc1e280236fcb5193c73a2d00cd0c256b44eb6497ecd69d1669ad3eec8a4e4c8b730d85e12d1d9c40070e645020d7ae2360cd0d39d559713b4f010a318dfa91e44549fd85e5ae87bff1547305be5b788b5750ebaf11a60b0ce6d26dd69d219aef1a9a038ddaee0e8135a4428062837af5e0aa1be821af0246c6076ba9ada4e0aa7f74202e10802879142cd109cd27a292d04e6c53e33db0d" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"c89dc15467ae09d5c514a0941f3945b1f4a1670a4df9910d14c68aa6d3c36e8f5bae0abaefd8fe5300b56a7bc38083b55602025c221e1f0d1671f2ae92bb0c86fde571ccfe8b8b5be8a94f3f1d027ee2":"8109ddb29d8395e938aa210852da6bf1f1a3d00be9df74b372e081d538983174":"":"":"":"e1c5d2b4ef29b2bfa498541be087f21075b0b7449ac7fd234d8e6af45680920bbe1dae35850cf27469209162d4175ec42c3d5cd6b7965f95948d9c49eea2db9dca83d1bd8bb49093ea0af12497bddd8cada20bdc94a453792800cc66d01cdf5e0afdfbdef3cead291e5b88b116fb47b82b4b18d6fb363d733718496ea20ca2614caed61d823ca9923fcd2f570a9c03827187b0cfed19bcd2c2e87f58508da8e1096eb9eb4c2ba223cded5064a6a9b5eed8cef6fabe3aaacb88b58fab570a56e80cade1be8c82f3b6918a7e574c91dc4fddac497f1cf26a801d6cf24ce49ed5e8bafbee09eceb39e1f81821ef5477fa0394992c848fd2cedd8f86c4c4a396eb3e" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"1a100ec0da9544326286b38705523ac970b896ef6e6306b2124e283a8851e46d3a4b2bc6a8152ec9b0f88d0e2bd1528b13ea307a3384c10d1fead60b90bf25c305a91558c1537e2a7ac74a85240208f4":"005612d87b6df0204c3d879b5ca30bfc49df4e189285307e2926b367ebac30ff":"":"":"":"01f56c3a325a39a2bc85e6e077b7a2864921a4b223c7fe998ae255d724a759a66971084047b44fc1b8ad013e976ab8b255930337eda87612364d605f241095200f8a8513a612bd847aea116b73078349b7cf60cd2588a8f7431671c3b3c6ab2e4dba9796b1ddeb2e1edd4cb3c4dd67cf722679cf64c5b20c64e28be1ac87f8cd9f17b59ed696f61a4a472fdf37aa90a2f16edd3d54c5abe7dcb0e964bbfbc113e66b1887e0daa2151635b803c0340ba55e3e5817cde2662ad45133c277502400b78272786c7aa40c54219a06b5a32e088baf0613fc535dbef66241befa09722f3730bc85c0434c733ab17dcc7c473d8b9f31651921407d85369b6f6fb609d53f" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"47c42df62b4dd570efd3c2722ad39a2df5f969a13f645fd27b5290877ba70916c591934d4f66000ebf8c508fafc44f75d16a2c72c63580b9bcf156862214533a47b1686c871a0165604fdd00a412a484":"94822903cb5c2003c31c6d072ab0dda435add0de7d8f9d5f08b5cba410d888fd":"":"":"":"f78e61b443b5a97b7e493a8ce35a43545290dd33d15ba4bf0ff78f34a25c46c4ff4cd485964cc96e90fe847d9fc9e42d96e4f5aaccf976a84e3e12100c28b0f7addb1c76f89663e11890f09e4beefe928a1e0b304f1d9dd0414cd115a01b641fd69c7071f2ca7c7f2e53560f4e91010ba11948195bc5deb556686feb0bb92fe61b3171e639ef47418f02be37796efdb6920952f3a8c766b52fccfa757e923e38028a84f9be1b802c1fbbbb4aef825f4c5e4fc1bf6e96f33ab90ea486710718c9e4f3247b2a55ccef5a5d342cac757f0b9f90bcdcc8c2ec3a43149bbd3924c85f0b5b7ae42151f4ded826ee6d47849ef4e8af64adf6863982503c23c4a0514ce0" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"da740cbc36057a8e282ae717fe7dfbb245e9e5d49908a0119c5dbcf0a1f2d5ab46561ff612217ba3ff91baa06d4b54401d61d4d8a41c3254b92104fd555adae0569d1835bb52657ec7fbba0fe03579c5":"fc227293523ecb5b1e28c87863626627d958acc558a672b148ce19e2abd2dde4":"b9ed8e35ad018a375b61189c8d365b00507cb1b4510d21cac212356b5bbaa8b2":"b7998998eaf9e5d34e64ff7f03de765b31f407899d20535573e670c1b402c26a":"2089d49d63e0c4df58879d0cb1ba998e5b3d1a7786b785e7cf13ca5ea5e33cfd":"5b70f3e4da95264233efbab155b828d4e231b67cc92757feca407cc9615a660871cb07ad1a2e9a99412feda8ee34dc9c57fa08d3f8225b30d29887d20907d12330fffd14d1697ba0756d37491b0a8814106e46c8677d49d9157109c402ad0c247a2f50cd5d99e538c850b906937a05dbb8888d984bc77f6ca00b0e3bc97b16d6d25814a54aa12143afddd8b2263690565d545f4137e593bb3ca88a37b0aadf79726b95c61906257e6dc47acd5b6b7e4b534243b13c16ad5a0a1163c0099fce43f428cd27c3e6463cf5e9a9621f4b3d0b3d4654316f4707675df39278d5783823049477dcce8c57fdbd576711c91301e9bd6bb0d3e72dc46d480ed8f61fd63811" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"c2ff911b4c93846d07e0d00eeead3423845c7215c8b5fe315aa638745e63ca26f1062321318087bf045903cd4f5cc9e61a318c2861c6a93948d779ab45f14d451bcef2d43a5ac752995bc0b365bc3fbc":"b62f8ed28a72c28d80b41e016f559bbda0a2a447f8e146eb93a509b302e03c42":"77aa1ff77bf037ae26e60d412f3341715afcc1fcd3bf971a481a15d45c794331":"55ca83dff075f4de57588dcec9bcf0fd1fa267bc280d3c48f1f1f749e1997cc2":"e42e4aeca6716181c71ebd462082309868f6faafb5d9c82357c785283f6d5285":"384383c41b4df205d19fe68e563dbfcd2f6edbd176574248f3d1ee44143b70aa5dea695b87bb6c82378953a714084ebb5619aca7d63e0dfbffc253a336edf80acbd584cd3f916d6126968d564c1dabf7b3479a62e7dfce560b80a5104389bcd771e20138dad4c59f290a4525b00f6798fb2a3c8f44605a247653d24c772d207f0ccdc19a07037429c7e79771c6a6b4ca219a1f8ed9bbad9c4cb27415d18b7278552e50ec6e25617cefa7324ad786aaeca811c3aaa35ae00d2f2152fb6d98dca82ebe579bedbb50a40e62af9e229dbf9b9b2bc6532b5d78e6333cfeb1ad01e192491193c9459b78d4e9c6e8efe69cf0c702298e325f129027145af92170b843a5" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"e1a333ffe4bce7b9f6bbc8dad8787a82ad66ca9b25a64f04b166face945c249b5f45cdd318c0588c7cbcd14846523943a59119683628020e901a0a7fefc21625864ecb1d76ec119a10821b49a3431348":"ce1466063de221c4fa1cc308442db476acfd8ff34b2a0dbbbe0eceeaff210293":"d481e022a80f3e60687bf153524a33bd6fe42c54c39a377a9fc27e047df53f14":"26a88acf67d5ed00184baad664c6b2d4a91d437a121c3cad9eabf3d7e676b0d0":"524e4896a22bedc62820c500ed7da2bbbb4c1ef9f07b5f374d0fb4ae9bbe50e1":"3c3cfdebca060f534a952e4933c2c00f9ee0fcb825a58abb6aebc952e160668f711068881ba8a6817500bba1c28867cf21a12a50e46792abeb9f41bc02322bce1e77d236b7a45a7807fe22b8ea9e2859d2b0164783d364f6ad84f4b9341c576cd6ab2ab249246bd76910e0abf115e4c59e37074de5f4defd03fa61ce1733e33c98849ec28ca61b845035218afa7ee2867b32ba1efc50907d76ccca5a7ba69e9700875b200cec5d1fadaac77a0960c4eb899c06134cd9cb663c62b69446a460bc9e3df7eaf2a34df00fcd838e882f5af1aa701d35dacec0cafbe74cf6dde7893b880071d3f1c9e53b205bdfde9807999e73468264d6172c952a7f5f88a836b1c3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"73cc8caea7f1f2129bd035b77bba2309ca3bec73e9f993fbcce7e3f148670bca656e3f17e5a8ce9bfe3665f4b6ca8ac8111fe051ee0e760b295b73470da27081ff17bfcd6ff9085c5e064ab844927f84":"eef338ebdf4d9399441655090136becbcaf277e5ac73426f79552b3f27819ab6":"2114d320b65a5906d04c5166ee82e727cc53f0ba33ed54a3229ad9592995695d":"e3fce46cd5c90936f20252e0065dee1940c7902198ae105017a8f50d143a50f6":"7ad27ea94de6ec7ad7cc1895381c735f007f6087d688a070b4cdfaecdd2a3345":"858108fe1adf90fb3238363ce3532362675a462563e5c12df97d054267df0b205ed3960d86893c93d2b1997d95abd9179512289297b00cacd1a51202923c4224561e9986d0242f50ea4667fd6402e29d18c184028cc6c85836b1455e2d2e9b389e0d65bcd2c78d5e42ad9e47707c9dd4617e6ef2d64590d0e0be5e4465eb611d91b1a45bca1af04632fc8dd045a5f5ba3ec1fc09e3aaa1d03719181e11c80dcd1c4d1aac3ca69d89b9d2c6ff7575d78843fc4695c1954fc663732418bddba4b20439da03d0428fa047f99a378447f9e563fe405fd8f9c32d580aa6dc1560b9df1530fcc7b337072cb60007b4e2762dc61a08e6511e7c93b91303aa3d46c14483" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"5eedd039764e7af96c3ef7d9e094e861dc0839c2a2642c4082afd09f2761c392a4eb8fb607ca7c5d7d4eb8e871aa995037a297af07ba36a59572e3975138fcfea667e06d9a4bfd2e9c570e61fbc09006":"92a258c0ca5a9c030dd469ca5d8883ae5f3fdaf7d8e0fb23867d150f3d24a0a9":"954a9431a4f9b34f6c28fc41be05fefa3449c8ce0265a19b8a422935690b50c7":"1765c701b279cde38b469bf0948f500b5afea8f7eaac3f100ae5f0b147005ea2":"1f6d382b8a8967efb9feffb8557f1cf40f4f65b5fa7d9846cab0601f5150430b":"bba8f496d47ec97d90533650275243fe76844b606d714c8bdf37db1e3f8045de44482d65a99b6d60ee4aecdaf0d262d96c058dbd704ee96e4ae52bd3ea56e9062b93e2b044124b7e9304dfa237e623d7e7bcedf59bfffee1c581c7e41a401832443ae80c6f4b7643591bd78254996235d011233b18d993b950ccf09bf29b2ae10b85e4cc4feba5503f8e81b0d0e7b50e7eb1a358726369e4af07ef64aa83813e61350068026161a3ccba808a99d11e7de5afdd91137fec9b77de8b59ded6286e590ffab21fde191362af132bac1e8170f36f95d53593e73d1775609a0ef04d9a75a4bab26f97d253b8e00ca430841cb5bba4439124abd37fb43f3510bd5690bc" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"95e33e3e1e5d24dcfbc5a534ad0e6ab6ab15dd6b094b7642e2187aba9a303137b5b7dc3d70253c3a8b446b591fab6950c4f6a33de5257fdc474a46ebbd367465127e6a9eaa97e17851f9a4d55fe4e954":"7080c7d4ddd8e32fda42ea23adddf7a4d3893be2cb87d6c7293bff521c252189":"611ec30b87ddd1096396d539ec973dcb7c408a62e6c37bfbe563dbb60d9f4932":"8a4a0f9eee67c54e3dfd846ea92981cd769a8c7ff4f2646c85e80a03fc556bc3":"05dc36b5d354f4c3b950053f925616c27e2317f886d2af09ec1eb7ac5397977a":"90fe978fec5cb14ad180e1ca8d3e266658efd9b0fc95353d4edd06c4682572a46e918d1bf4269d38f5b005691f4b5a8ded08983d307a0d7de64e681a302ea6d0ff8ddb87bcb5ab0871779b10744d8188f7bf2d6498a4ee998da93d1a2fdf3d3da635c52cc26977b25dfe17a5f5dcc80fd72d066db7cdbeda557ba52554e1ef5a075d7a40ceca83cd83477d99591228f4ae33163d73045d35bdf892cd21083b8d70a3297212edeea57ebfb66baf7af38833e72113001c2489ea4beae57995169a1354131a7f607a1551643d27f56ce8e96143a78b2a19f9fd72cae9054533fdf16825d852c990dbcf347d32529952445cacc55c79a79c55ebdda76f226bab80d6" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"b43301c1af024ba6cd7eadf985cb1c6c303479ec3ab47797392d4220788f4daec2b1f5ac6138bcb83e938be66b3232f7f022f4e548b93e7a8aa4d853fc1b4c42ed9b182ae582f6876beb268ba23c4105":"ad7fcba1f90b243689b85a4ea1dc150bbeca4093dd8b9a0a491a678011ad807d":"0410527589e72024491d4b5328b5659a330d9b167a1a27251363e262f393eb57":"5de8fac62063a676904aa9628046fe71f080ce285ef964acdcd11260734f2d90":"2f14a327bdbb9be4d9a813dd73445c8a8c911a874daf08a551e867f54983de2f":"41d553adcd069c7d2b265798f8891329b1dbcabe2e7c03502542b322d13ea71cd8272eeec65d31520782351a33915deccfb8e10cb64d5f9cd88eb30608f7b136486b5972a68b981e0b9b7298bb670ace568b98c88d35b4a40c25bedec94eff992c0083e539adccc37ca5a4093ac96aa13c83a59c080bbe02e37a81303500224daa4f380d2b88cb84ebaac342bfe5789658585d2892cef2bc9ab6f1ad51fb292e531bc33186e39b93fb67d4ac633a2f4f8c681c7f82a81a47b74905613bf10ebd3c57fd6c8624bc7e55b38e2ad063aea90faa038d671f86c6b17d4341032e11e13c526c4818dfc42cda496ecc060d9a1ac45ae0e72a6e05bc3a8aa851af5214b3" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"837e9048e5564df02e25f7b7585ac5600ce4cd6a6de8311c6b3c6084356ad0f9fcddad47e7bb6ad7ac9f33145de135605866611c2b083fd1f9e5cea98f2725cdcfb0d2ff6f0adb74d6fb61f8a6ca02b0":"1d194d69897c5a7e8c36cc4cd97784312c9b6599274e3b20d022b1349ac45c58":"b6a8880d415cc4b2aadaad6d7d2dc73484b70909345bd209520c05fe7f5cdc80":"31bd3fc264c252bd3f8102529763d5ad3e45a4e068677423e698160db284bf11":"0b845cf842d1ccc15c2fa7224ad121b9b5f8acd1e07b16c143c931da56620906":"7a6dab28ae7231e2dbbd826c4eedd8ce062df31fffbb0c0ec045b0cd0a4e3457ff978bf39425e48cbea4884fc59e95665068361a8ee9175a48ef094806fc146ccfc3c403a770abd0c6bc8439bf68a89f13b0725a79dbaf976dba95725a4399c58d15c4758a515346cd0d6208fb0bccc06568642eb3e0c3a9a1df9567eeaa86924157ccfe5b2f8e8ec946871dad33f40f65847088c9e500faf8e25439be8a1e77df12a2b21b9f73244b82176e4bea4ed33d2671eacfa5c4b591cd0bd93dab7dc62f7231840909ca319278185f873d00820fbc239c3092d1dc1a3cd9c692ed6d37192bc587f8b3ee21c14fb20c520fa7899bcd2a1a53288a42cf70c6fefe7ef7b9" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"f840c75ce0cdb200a3bd980d6cedf1c7321e5f303cd0446c7afd2d2d66657447b215333b15d55326bc9bebae6ae36efea3a337c6fbeb6a979a4783f2b7f0f0dd6d3a9d3747de639a9047248a04a19f5b":"6d5ca4b1edf6c0afbdce02ecb30923b2f4f2b33121e21b2ffee964cc7de1abe8":"f56d2b1584ba2f129c77b29590c4e1dfdab5527b1791e3e445750ca6d4ae3542":"05bd799249411b37b80590d49f3348631b06a2408a61635c70687003a8485302":"12d26ac3b87924cda5d78a3e3c0bd81280e340723643ed1b2ebf2dfd52f5dc43":"b48c13af7a9b6fa6385a7ee5d2ab97dcebf71a715dc465f413cb0962292df84c9c83c4093309f749359b0a0ddcc13162cb4ab8ff7b3a6336351ed79ebf47730f97accb6a960a9c5c25e0920a06cccc3b3f62b616c15ca18d7e0b5c2e7d8ad2518d1ef0bef515af866893e9378b56deec32825fe0a2c5a9729f658915b99ab22a03b7187e83d2d0f41b9467c8326f7bc87189dd8ade18b3a7edf0c0ea462dc22109ec91294cf8ce69c8cd0c129b423edadda8fbd25f4983a70d75001576a26405188bb0284975203694c318f3aa7fe47ec041bc4c11c9bceb1b131f74adcd72fc4d2813564de6d4711017800377be9e4c579e88464d67ea6e457a30f8f652375a" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"c91db86e3984dbaa25ae5d851ef341eb647bd1df0517e171fb86069cf6183c19a386746ccd0a7e81f3557038711db7259926089317ab7142d6ab6050b1f7dfc21080910d43a702cce93cb1d3b155d22e":"a4585c13c83f962df72b58230ea123846df652b2810766bb671f675b96125a4d":"fb31319b4e622dedaa88b64aed93bb108362234c3d3ecefc78f796aeadd9c8e8":"877bafbab3bf9c20b1a85a5f4b3dd11a5c486042b807c39d59fde1eaed89cced":"89a5af332718418758129b8212643750542bf957bf35c64d6b0a276238c808f3":"931e43b1607f43260ca4fec3205bafd90ccf9916d721d9edc384250f9346525c7656cc7b5aed8acf92b8d843108855ac13f4f0903e51aa4ab7846a839ce70b7de88e0d52590ede14437b5493b6c2d9458d221b771107ec166f66ed993739604c487fb4ce94bd795e9cff60b4f8365c758c27fd767135b90b3372570a8e0e3b3a23da37e69382afbb76168ace3ca78852bf99a0d3a7e2bf192d8d929dff5b07730e00a8c5fa5ae243c89e71fd52907eec0b4c49fb86b81394e38a6b0523a89c0fc866c2c3cf76f336e9438d4f773cd5ceea4dd47b3716a9986153f718177d2c8ebcfcb90b986330f817334d29aeb9c93e9da5db30b483f8f434f2807bddec6851" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"3e4c40b9b33063edbfd21bc4e34c5bc1f454d7ed176e4f6edc3ab056a3b0d1a79170479fd91d6e30caf99166842e0175b2941a7186d8c3f54e6f5f9884e47dd22a161a3fc5e00c1c9ca5a744c6a7f7b2":"7a3d7511b93842159162176b7016106e61573aa42c57aca7bbfc97b3388c28b3":"d88781b3afe2e1500b6881aa9cc23dd150054da57be0ca127e101a9fbc4decce":"6231b0f5cf182c6f108491c5b7ebed9b2a015e9698e860623e9a12e691a38899":"bda666c5ac006d6efc2aa0da52e74eded88955f8f064bfaa52d9f2524a195f59":"2d7d62310bfc4a3347122e23655a10dfc54fac51349f0c8d586aad39236a20368f4d96623e58987f7c1184148d586022a4b96976f72636eb1aa92ad221c5866b6c6803cbf6c982e1de12bc89618aeb3f844b2a518a578714e2380075acb828685a57683179753fd1ebd2d8aa1672940446756829d6ac1cafbb21858465789adc024b8fa544bea09cd4f1f3ed35f298d4619a5f92a6e4f712a0032307ed781166d7a6af2a352694be7fd3bc8a151ea848f8b14da8150eb22e264d76e655fdb3638bf250546eb29ff27850d2b5697932c6a876743561e0894a01ce8435cef74800f11e4bf44fa5149a6fa4f4ca43267a47d3841722ae7efd09676f341a54ff1bc7" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"fe4f5247dc405c12133e9cf7fe00483649d0e7b70fdb1b39f8e8ed0a4789a0c9ab78417816b54d47cf98c0aa4246ab0d68028d1e7441ab77c5eaaf9aba0f2ac6e1be2af480026d44d5eec0e46fdd31b1":"5c5a5e517b3acb6d6d75742bc293e4d091d7b0bf37559f75df98d6306bcc2d22":"5f56dc4800297a3fa8e2b38483c29505485628866ff175b19d4abaf4526bad92":"d9bc081026ea5e35a52b9d1868688e03aed785af201e355cf51e6e8cec917c34":"bcec655ee8c482e725c5b915b4085a9d678ea26b71c1ce0a85f741f9fb3c3607":"411edcadb791507f40bfd00f3c764a2c758729f3bea116ba0c820efe09ed379095f7877cdd6c694c436572f4dd1b905301ed6e5fa1360ac8112860307958c7b64372eae8f4122d84ff2d4b690419e3043b8a6183afde8f084fa110c38403adbc878b9b139f6df5cf47adbec2d1f03cbcfeccc412942346fc42f0af77d52cf9127dfb02beae47375aac101baac38d0b47d8f04f83a7eff482ead93723827530869390630379767df1f40b73932789583da327e2f363ba421a253d35d205b00945d9f5521580350f631cb24c7bcdf7cdda7cf28baf625fd9d61134ec7a6d1cf4c80d05441722d081d4aea1074712f37884fe15ddb3cebdadb20e71cf3ab41676fe" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"9d129142ba466c27f348d5949fafb79675e334fc3a1948e5d008ee265076467bfa435596b661c527a82e5a064fd56cb6f17f549c77a0a6a998712ef0e1f41ba4eeb354f77565f7a7627eaeab83ea48fe":"ac23c42315f2bbe54eba535a7299113cfc88216727ede9f154d7bddd88041259":"7f029d2430d49de4909a758a2bda4f219d37eff01c96de7ca2a4071d128a1c9d":"4b6a443312f10348f6aba088d1f81206c696508a75836e98951604e93fa6db51":"bc128051ddc96eef9fbc3a23ff458240d11a229d1a75888d622ceb7519e1db6a":"03bbf9e2c0c1abc1ad71506fe91d483481fc583a73ed2eb4c8834a87118088b20474b78e06366b2f32a5f50e6425be841e1885a72aa106d5a001e3909b1ac2a29940ded83f0724514800aa0dbbb18da6d573aa97c7de470e115e9332179cf8b321fdc83265b4d58ed39c28d09783590704ab9adf007ee44d4d74af437851734d470085d45252588d75448abc608be03630152582e0344e1a7522a87c3daebeefbc79497757835f079dd99260ed7d7e3e00bdf046f4dab3ca84b203f8c93cde99755c2f5b16c00d00f370715f188e80f3f353f2d218350fe1a9f68673ea8e9301333fe5ca7c703d21aa2d0df020db28d8340b5e2c07ce5bfbcde7194399b6f752" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"2fba8ed5b2be9af95fb02183ca8ae0dcca90b209be73511a5dab31ec81e939117e529fca4f95a483bd307838ef0d779dbbfe77df481d807b309da929f319b39287d3ae0994f77ff616f0a763f35d44a3":"2de698d32010618c25ed86cccad2ea4d9fb9adf7b3dc400a2b1b4c975651d103":"f9ffcfd5bc9a08f6f9059f4bb7f49e093f404aa7fe736bbf4018734071c26334":"a309fb1f43a520a22946a6418500929e19d2b3316fb1a8c1aa5d047ddfdb8d49":"c1dbfdb9bdd4a3321074b57e11e5ec6dfc374248a918242fb3e22cc6612b3239":"3eee1bdb63433c55971297e15ac1691cbdfed576b1d2ada27cab33e660a3c8575fe989ef73e13058c9a3777c35bff1dab25e1991b78cc446738ccce723eb02136fcb24a0dd2597c3fd0a75774c4a21409689e9309e962be1e8b096c2dde59ad9dc6750051058ff6a18d57a19ec2775882ea0af65b172ed718678d841fb51437aa3133b2b328df0f4ac916a01d88c740981bf71c4664789ca4e9d3f7fdbe7379231b64683fc891c5222f8b396a446f3b50dde823f95177b7284663402fe5452fe7bdee304abe34d71172170ff3a911782b72b2556f2337d1d23d9d632bf6831d3c173fea3ca8eb5d7993a58a4b9f8f64d5c89319acbc847576b383fae0178a097" - -HMAC_DRBG NIST CAVS 14.3 PR False (SHA-512, 256, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_nopr:MBEDTLS_MD_SHA512:"a9fd18764900768b7909db87dd4c7b87baa2cae6b0f62a8c2ee3e4c550041ca7435c7b35ecc6ef373dde3d989420b92c2bb32f9fc8c766ab840f5d0c73558dcac87e2102c28193e7ffd3381bc30e1d31":"8bfc5a65fa21396081d92c3d7206f92637389c60cd7a14f11811c91535c0083e":"404236bfe24b471ac7df938be6a96b8ebf8bc758787714d226ce727e9d2b4bd6":"8151ae3237ca06ca5b0373039681a9d3cf799e98c3fa2efb576822f1fe0aaa06":"11f0f8a2c16b1bc15fc93ff4793894f22d7494d11c94dde5ead2f0fb09bae6cb":"9c636c3228432fb70d521eaed3ba8e436507e29163de0f5b7e0aa9a5177aa1a3930b95f72fb0561353db7213cde9ebdbd9485a5df93ff416966e09c1e61d8f805e6a082d6372d58301660a9a0181e2ef906a5a8a999c88002eb4b4132b34efd21618871ce28be5e66a65a1782de11e8e11c57a2debc85b0068ab553400b26a0a0f948ccb4e8bbc1173dcdab388c20ef6e2c9ac796d8816572ebc134396d38d71ba8e986eeb063a7baf5ccdcf583a723ba56bec38d4cd3e7bea563b4132f19b730189f559300091e9171a61469460ca82d39b5148e4d288037f6926e96f384eaaa0efdacf2ad93f0da4fdca0bc5ec0f0d7c0e8dadffae4e46ae96a6511735a80e" - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.pr.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.pr.data deleted file mode 100644 index b625ba7fcc..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_hmac_drbg.pr.data +++ /dev/null @@ -1,1200 +0,0 @@ -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"a0c9ab58f1e2e5a4de3ebd4ff73e9c5b64efd8ca028cf81148a584fe69ab5aee42aa4d42176099d45e1397dc404d86a37bf55954756951e4":"":"":"":"9a00a2d00ed59bfe31ecb1399b608148d1969d250d3c1e94101098129325cab8fccc2d54731970c0107aa4892519955e4bc6001d7f4e6a2bf8a301ab46055c09a67188f1a740eef3e15c029b44af0344" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"07bddab06cf3d7f094cc2302abd700a9d67421aeb711f4bbe66f59e28a46794213bf3d0c3a2cbbb09205b90e0ef212c7679b37526a806789":"":"":"":"f76fd2a49d9574c3f90864f35f32253b83098ee04a4c8dba464a8035f665ca165c8a038be5e1b100d56752adcf59bea167e15b1d01c419948d2d0a85be66d19bb40e5e0a66cfd76ba7547eba6276ea49" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"6d283e7705a2aa4b1abfc1ff8559c9e7962df9229000b8e432ac40bad34797345f1ed6d7a0fdea8ec01e7a20dc436aa1d62153813d59d44a":"":"":"":"60ddce57be4563b87bb59e848496f42fcef9ed79799040e0eee68fd89b330109cd3b3f761348fc7036c0cf5d69aefecf91e89a7ae0429590569a88922aeff249ea783f00f795aadca729f96996eef76d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"108a1fa539fc471e0a26a8d39633c88d1e84c26a62894e7dec15fcbeda9dcd1e40619dc03c7d3dd2db39bc8f4964949b1737b9cd69a8ff97":"":"":"":"b0fbe3f6b6667b88e2a48f3679f21ad83f28107675d43d2a5186dd6a0256afc6acaf995b3f07691325543b37ddd5bfb4934f46ff9783597b69c727c9cae1c6b83601a39227c53c99181ec18d5be60d5b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"1db6fe209a51124f9eba3ae7a5690a31c9383b0d62abe0237fa6ce2b34b320b68d24927d9245a10f7216ded701c39f4d10dd6eb4ae912b78":"":"":"":"10e9661bbe14a0c768f09840979233865296fa801ee8ba97106043c067d3b01a5d3a866eb9b21f730c3ec1f11f022820a2a2db4cd07061acb85b0987e33892064b56626c962d1febe1eb97af6b99ac22" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"dac7cb5d659646246a2c3cd6cbb8b7bb9ede30c88355725c16576ca7567f52b51ea3f7e5d456b0e8b7a33faf21150e5b39999ee53fd05b2f":"":"":"":"7117fe0c0a9afa75c078b1641ba637ed2a4501e70bf38465914ea185da5a62048910040e70f279ca9f2fd5e478ffd76484f52afa62a29ca9d649f252f27a8eeca1ec95d7898f705421c92b60493e5c77" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"a422e11d41ed91e458b1dff7844e7a06eb807b042fec7c42da9a7d64aea6ec843cbb5dacf8517c3f7214d02d432fc64766f6bd40f54290c5":"":"":"":"e6e1b59d47aa47ebd862fa2336d50a920f77aff6d42942a293947c24b044756c9777231aa0ce8a67d2916136cf4477dde78b6fa789b4a570460538a3da199c2c64155692bc1aef3fa94ce8ba4a43bcaf" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"8020ccd23e6733f7638a6d68b4954b701dd2e3b33176d5d1a14b6cd8aead4e152e0726dd16b4d76dd9cae60e69023d0fd82b0b69b7cbaf75":"":"":"":"c2b22410ddba0466b6635ab98f7690572d7159d66b4f037fa75869276950ea4ab4a92e3011d7c3d50f921a3988906486590706c8e0eeeb487ac85ca924d8b3a4445e2af49365c10c6e99eb17d93286c3" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"d66ef5d12c778d8b78134704e345b08c6839471eb903bd0480169d4069d73a669a17dff2e1d6fc23f0688fdf7867f72a024ae445969458fb":"":"":"":"91ef2bacbffacbedc11da58d275448692ae26bb9920c0b14d86a42a65a9a79422ed77c3a8f941b428552caf6d15e057c2dd8b5cdee670ee151f674b4a82ff9754cb067c1a1a27302bef2d395379d6009" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"cb4ca0d6e07b341ea0d105e5128bcd6b6fc317bec49394a83c485ce4f8205361374484ac0173ef3f08fd65d0a11af2b3f90ee8bd3fcdc08b":"":"":"":"1727a7f580a267492646fc2c18e3539a131b52fa3d82ac8cb36227ebb94a396b139c0a709301b4f00b49ec63d7f48125e469443b57b16bdab66bdaf0684da425e63a596182de4674416ade17f0cef49d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"7cec0120261bbeddd34eb776464c9b80667da732cc82c365a492b4def218ba2cad59f7b4bc1afaef00861c9b62b581444f79b8977e9fbf8f":"":"":"":"3ad128a75af8144cdf5cace68166dabca9db5d5cac6eeaa0c3d608d99d5da4a2ca90fc080d832e5f97060ab2247dc5dc20bc10be47e6ab03efeb662fc9d52c89d8db340cc4903be59dfd086f6d018468" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"29dc07553bb77cad6f321bcdd5c5c758b6a77588ee43d0afb15c0d981e368cb2482663aea93ded95d82a1a2a22cdbdf8de93695862cd9429":"":"":"":"5e1d53d8db89511fa996ccf513baacee2612da201c21d51e2927dcb99caf3132f6d2ccc3376dbf95520018515b0784e98b4226671cb3f1c7915757d2e59f1c4e843ea9c98004108118b4eb53bef2baaf" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"748777316160fc175eafff578481402ccd5a38508e4ac0603f86281576c970d3316ee58a36f809a8df9ef241861c04093a284d116384d204":"":"":"":"05f179c71691c0c2c64eda58b63a27772210f0c2c6973708a5f84e6b49f547169a839f2e97ce18ac94696337a9d1c1d450bf27b7fdaf1761ee8da9b55d59031a8516eeaebb1bd48a1e3bd070c5fb4eda" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"11e2e3934d23239aa6bf1abb07aadaf8df05892d126cd4be13f2965bdcfcc8396dcb16d8742eed1b276b562702915fbb59c01cafb7044022":"":"":"":"6ec1caa762b5b87ce92ef7d254536f94d41ed5a98696da5c14fa2d29aa95182927b3e2a5ee9e2012c911ecc5e244af1a8200de37cbff2b26d0c2271659bce074d5b3c06743f08d6495286068a1e5435e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 0) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"ec11e1929e7430b914b385285801e27df4aa6783fa1e3405ae706e740dda50209b20acf90dfa8cecb4d4b4bc7cba4daa285ff88ce9e8d451":"":"":"":"74acba48f0216087f18042ff14101707c27d281e5ddbc19c722bec3f77bf17ca31239382f4fc1d4dd0f44c296bc2f10f74864951f7da19a23e3e598ac43fb8bbdd1fca8047b98689ef1c05bc81102bb5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"d92b39ff610db66427613c111c002b75329734372847a88f53c1d289b30d3584d34efb884ce6d1d7174a3c20508ca0171ed9610622d454fd":"":"9980d97c65cc8b3c61b390e48abc6523":"76213356e359e94984cfa7db15220518":"e0b298f7cd1112527a506201e38f7e60d762f591603db72aca3a2cd1b9d115c3ddbc7dcb7643f2f40f53e96e6ca1590ca27abb77a6234754ff1edef86f75fd5f298872ad1544fb88a62936e238f22aef" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"3c56bd6733e9cf9d765f3d5906c60807bd1c9c11f4a1293bb4abaefe6a65c978d9c75a704239e500319d9b4b8f9f121caef7fe3c49f9ab37":"":"365f1612ecb78ad7b1140dc66082ab30":"0e5d2013782191581e4a76e0a2b5bec4":"0e509b7b436d085c1080c3d9e6ee3cc563944bba0fad352d13182c87c8c3a0f0ba71e86676729da0d2f4acc2b57e430b8791c4f30d232a0fe48bf91d5824242fb8e36333837173d702e6738291b57efd" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"91a44f3e412d031bd47ec8907e32f0434a20d784db3f6ffd78b013ca0b00553698a113d75d8ebbe856554c71aa4b0d48af74bbebc97afab4":"":"9f4b3b3f1e2d849753d2cedc8d8c5d17":"64a1f4d2b10cf97a268cae7034ca4d8c":"232ade326de23ec970f66e6a540f306d962769d1b24b0675109ca7514dbc52003d154687f525f4a2220501d6dc92551df9111c8dd398356c560ce44f1959301dedbb197c0161fcad0299a9eef3e799e2" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"fbaa5e65ce5580d774739340e025eac46550b5d3865829eaef9b59ea37d094692b9fd15ca25468fcf7e38f7dcecd5fd85c686057e1ab9bab":"":"f0e722190994c66f64ff725e8a9b3be0":"548ed3bbccc8f9f79c70b2e85ee0e626":"2c07d2994fbf0bbefbbaf60e0dbc712f12f8ddc3aa6d94ea9e9d3083209ec35c4cf3e62bceb9ab042e60050520e0469961dbdaee0787fda6f1c49755855752753b1e87031a6821c04cda887cdedecc55" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"13747421a19855709f3c468a5b1f77c19eb589a0b18c06da3aae0078b85ee10c79d1925f5ab2045eac1f2ffdd850e7602cda7debeb042bea":"":"3c95ff221ccf82f4041fcf4e8a56de29":"3471a7ab4234fc6e8678d3613ee10835":"c346efd443cec6f21eca26eb5289e0bec5eb3f7c3785842e7690d5d35eddc87d79041aa0a9d5e4ee9ec69a4b67b26ccb70eecb59df582316b8f1b945a25c64b861a6decb59adc1447cea219947f6aa72" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"4f72d884628c90261fdfa9b87bdbbce93daaf175d0290ae7f725e8a9f9b8c98807b57a591d4e8b2a5b692a6e310c4851bc4a6d986eba9cef":"":"8b3a7401800ee1bf5fdc76243b313244":"cc199f4f43036b0af63fe3f8ef4ab3d2":"6950a89759b52b6c8416600f9e0d56d19fab12b423d746af9d00a6657f3b8f3a3681c0910343569544b8b537294aa610e89b977c4db21a324317587be8b9232b38d354eb3e4032cacd561dfe42e72d23" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"59c23b4073e7c9d2871d5d882953a33b17eb2a8b0b9b068870c070deb9f1324b8fc29fdb612c52dd300889913ab120536cf9a389485859bb":"":"a6483a9e5113a45a84f6630869291461":"b93bbb79da7750f44e4561081ac4f29e":"6a298856c9b25b20de0159890135beddc415802307b87507d62b2ad32b1883e4ba036308a6669a06246d4afc43a29e183ca141f156f7b1975095bf14cceaf71cd2831fac8870d90fe0e1067434783a5e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"a4b620abe19aff576cddb8f6d1e83b59c26d4ba79fb8346974ca841db33e280d59e28e110cfeafc4f033c6a45f443f528a326ed4c2de5cd9":"":"be26760cfc23c0cad1ad0978c3ec8f09":"e767cc6694242b003d6d3795415389b8":"89d79211db69679c2269dfb2e599740ff646eb9ebd5f28a68b76665e6087d15fb888bbf899e3d16d711c3db63e3dbf9cd9bcaad6984be04afe5b41c2270431948ddf4486272f136f1c5bdf37cd2a70e8" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"994e455c4815ffd4a9ee168d1fccd3b661da827c4e81b102db0b28977c81bc4dd58d06819e2939883983f9ebf1356b0d01e6dc02735596ca":"":"029caa66544f6ae8f6cc5bd3791f86f0":"7f14c05c5d88acafab220aa467e3e3ca":"fde93e19f71fa97fc368f5f4454df8a39b3fce42bd4a801726b296838c3dcc6678bb387687e2c943edab86902e377a619950d36fe78cd7ba3c67aaecafdd9f7faa2076d71fa79646933387bd6bee147a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"2713eb063d3876dd6c3a5903a1ef5774a180c4123eeeea8a4aa472cf07c278ac367a9a490c7ddef058d6bf34ec9db314abb119a1a017a17e":"":"4452362eed6b9c30a01f784a9a06dc5d":"e59780f291461d2665924f3af8bcb6e0":"743f529bee048d0be6f10da0101c63c746fbeed37c6cd0c0ae97854893a00c82b65acc9e6e6ec04357e5e4b3159a4ef3e5e57a38da2e00f0eb3c1538a26ee1a518f71169d59b0d9e8a021f3d623b8fc5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"ff2cb4930d26b0ee75bd9edfb77e09f50c80049f75ba95a5137ea862d086d6523bdfde203bb8c2a9bb588ef2428a173453136bdedec37eb3":"":"a52775c066b6e9f7508b30ca22944296":"5e4ad554e65a49685e8527f923cbc0cc":"4e9134db809bd07a46f40bc1a1f6d830808121eed25d17d7ce3eb81bb88ec660b7dd945ebe9fef8bdccda92139f4770ab8a467e0118f24680c6f6e5b9ad6ee94a086118b6cf69aceb8cd809d91429aa6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"72971d13d6356e68fa61d94ae1d76a91b69d8b39499393fe9eb2889d14d91a7488207bd8ee536d481b37237b0995a218fb56dd1740335992":"":"0e59b74d4ac5ab8bb51c7f4b99ff859e":"232dec60628a43216b75839ac820fe4d":"1f1adb85b8d7d1e022d5a6594ce074242683993ee4d3c5166a2aaf40c239830587b1112af2a4313e363ea4a980b06f20c5ee3207de026aaea9197c95d0e771f4f16a2cab41c0684c15e6462cb7a5a71a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"975c10933f7351262a4296aa6175471fa34e7c9b3437b5c7013e22d2a9002e9e42d27202e0518b53da23016d1f5b7b63c46c1391886934d5":"":"b7063d6ba3740d5c258303d5393f8f3b":"9161780ba6bef05da7290a77416767ba":"b68b4ebb6856af7337745e0a50caa1d34abe27594d56d846794c15bc03973d67d548bbd2680dc749c5171372e27af16900d6bf729a84e6d7626563ef0b4c90c275d9112567b8ca6e0093b34a0966f27d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"e1dfa7999006aee12a2349ae1d580f5ca2a437dc0bc294f449f2670afc55e8fa8152c787a014880f670c585cfca574ea2d13f28e6a0ea677":"":"d77a830f650a3331a72f0a4b1471dab6":"37aef81e729ed0b91bf054ce98df4a76":"c009a692d7e566b58cc54a45f7d6987a48d96c3664f6034ae3ac0dae9ed5c220c46ef0c638c75353ac790124d88ca54fe43797f1a70422604507a2ab458fed576ccf6d25cf521da8d0c3b7bfa16ee6f6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 0, 128) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"310d8d08687545e48493db179e6e92a176cba53ff17cd783ba5d38da5f2e51468b0a9489c88b8db0be4a2c87c875be0e1be01aadf2efeef6":"":"a1824b07e0d2ada0fadec29beb53a9f7":"ccdb3f7d7f6a4d169f5f2e24ec481fcb":"bfcc8f2ece23d22545ec2176aabd083855923ca9a673b54b66a3e2562212aad3cc74c4c8976de259cc95a2f09a85b7acd1f18c343eff0368a80e73a547efdcd954816b38df1c19556d714897e317d69f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"db8128c27eaf3a39d5019785aa35b20c3977437fd75e8032ed340ddbe1b29eb9bedb3048a3fdd06aa957c5cff00eb87549c307400d4059d0":"4f8060506daf40819c7c58630151edc7":"":"":"4ac933b7de803c266461493a19dbb00e9db25ee768165781fc9a70c67c4e8a92db36471e3cb1714fbb65e17d74770061b0abae52be34a604d87e56a4ae1e90c6533cc764aa7419b5439e3efa193934bb" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"87c80a5e334e02a36f59324befb4fae19e5b73aef691d45e8973f58a487b457d73c4312ff890b053472d95de538f1512f6432233b7d9c058":"6cc5553434148499d65f8e4ab7334938":"":"":"5ccdcb3d022eb4d72c211594c916dd2d883d2ecc190f6e78ed76f438562059e6f8800ce6d11b3b8603243f4a56f38d41672935ace8d6fab825cb6978a2d0827aa65c70523c48f7b9a8f6fe43cc2ba927" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"83c113dabd43229d4a7333147c7d84f48fc29ea3d813c0f1d45c5184906a02ea4c6f11b149db7f98812904be3ee96de25ac9a78ccdfddeb3":"77dc45d37d6d401e45c982f2c4960fd6":"":"":"e4f08087eaae11fca94bd7df816980e6608e208032f944f1efc50ac8d47834b9f10c00958837633e61f3ed2351c6885446b72d2634bf6b69f9d7b7a36f3fb8e98294f1e9d92a4a725462e60325dc41ca" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"aec809c1b7eef916569cca247cd9e7b072df669458c8af4d29fecba0c46130ba920fc8bf7d29cfaeda476607f3325566ef52fb69a3defc54":"824b11ac7e13f654ff4238e0f28a2f60":"":"":"514f1adaeb99dd2833f714a53804aca43a99fce45caf5db166b15acb0460f5e7e23c696fdaa8ecd138a937367483dc7bb7a6af51a611aa7b0671559aed14109133738e06bf2190bb85abef3a674e488a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"b2f5cacdf871e742c262c7671b59a74c6a41242b2225f252cba7db3bf77d6619af46532eb9c01b72cde2978ec39e4fe5247ac5f0fea559d8":"2cbfb9bc6c318219df86e08ab11419e2":"":"":"67d393c84d05983f5acfb8883ed44e24406f216efa3d6650807fabd3028fb1f762d6c67ffb0aabe8143fd3ddfda8ca2c7ef13546dcffc4dcf95b610a28f7cc2a25ac4e7ec0944d655c56c110fa931ff7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"54ef54d0425f8cebd127fed0f395884613dc19463664d19d02af6baf06de126b55fbb3d7f114728bb4650839f1335f8c2c3be18ea3beea75":"f0cef260a2f74a425d062bb25c68c539":"":"":"dd8b96a5f3fbd0f5f69477c5b7e71099b2113888fcfa6acce713a13f040b0b5fd55100a3d0d3a344706a31e796d6999f63cc6357f5ba386f38d46bca9c42a25c4a39afdc7db8d843a032ef35bf4b15ef" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"4a1781c483eae07e0a9ddd91b908fb00a21a4f5e1c6e9da58f380f407dbcc982cd0761e5f0fd6d339a646bdc6132addb7ac0cdefb1b91f7d":"c4b7084d73d399c128e0a119217c793f":"":"":"e465cbc1502709493de1d3347a07f855b2dd6435a4ebaaf00e7756c1439219546e5fc67093f0eac1055d221fde51297cdc9ff41121d582514c75e9906870f99d58806f1873f0183277510cf1f067a840" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"36974a7c276e18ed2704eedef6b627f8e57e755d554b80efd0f065c236f78964cfd3b661405b98640631fda19fefa8b5b003e8b752ef060b":"626a8bc0d1fab08c8c6afcdc3dc6ac33":"":"":"6b9ae340e5e75e1dcf6f181589a1fdba3951417c30467be4b41e9ff4ce03073ef1ba0a19d160abc8e5e23ed433bcc421ff1f428780454defb66511fc94794f3ec1c48c014d783bb173db102275b64b1f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"05f934d668e9630a131ac51e2560e45a78ceb8ef6fad7190045cd995039bfb3db624f4687302445fad08829815e7407fc962afe2779589f5":"8536223ee0184eb43e84a07cf71d445d":"":"":"97142414252556f5d5efafd39852d7a84e70316a0aff7985ed6761798eec57621271977bb950187a290dd4dd514b7a801c98103d4fd4012afdfe0f264bfe3f6e584768503831ea0211fe0415a0f59324" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"e2ee5b3970ac4cb83061e5692b349df8643b6100aac55ab296fcaf7a2ef7e3a1aa54c3fb1963dfd93781ca34a95d6fc3250762bd1d31b0b4":"71a4316ea88341dcf3c9280a5cb54b7f":"":"":"bf767ed7e5f11abf1a6aa5c453fa124401297e32f23270c8d78423a98f5e6783f3e8e835aa734b36c2f11be30acf0b598c7a23ac40ce894689a24fd8de3e0812e9a5cc1791091c981bfa9ec2168daf90" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"32bd60df5e2b435c922a9e434f5f99be9c5437ff159c7e5e67b81b82f7b5ecdf6e60ec4789820d37a1071d7b91cf1e3d14f10ef7f34922cd":"c759e4ab6c8fe8a11a1f8472b06eee0f":"":"":"329cc81105343bd74f24c0a59b972892e789ea20e46ead1a74e7af036a836d46c70461c52df5038282e53e2db44143590d6015809db56754b778a2a7278d5050eeec9332fd732c9c714a676563c8c3ef" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"ac524ec09761670b96563803218a7d3589bd8e682b2a5cef64d96b968ec98839a97a4704a7a5b2b859f3ed6c370031f1027def8fa0672a26":"1531a17d3d89c1d0775f3a630ba730b8":"":"":"47e3bfaa2cbe4b085603991aa739363a639b064dd9120e0149cb5ba2ba0539c4147897a34d98538935fe25ab36cf50f6a1c3aa2892e2c06591e4c2bccfa990f6317732d5581944c8d2ef96d0329ac574" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"2c9a43ef1496352ea62ced1c345de4090a9cea6898b8a53abb2f01a435ec6d2050a692b44fa152bfc42ce4ea30ef761297c1ef132839d411":"00bfb2ff2600fe1dc6a2d85642e9eced":"":"":"193d08bfb22121deb22e8079895703e2a518b79bfc3104038c2a220f6babeb8f28f5652d5d1b3a8b468d8a4ed0cb32c69c5519ded85ddc0fea62d77ec5158b6a55caec3bbdf1f6b93e449d6f15cce26a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"0f15ec0c8d3c184d9b2a47bf9ffa20982685161bec91fad2c55808ccafd46ecd18081738cf835e1347e7df7e3f879f3fbb759c2051e34217":"eaef27215467d7878106ba9dae990bef":"":"":"bcf79ad50201f3498cf18288dc30c32dfbf2739490c74862d5e9c66b16195590075cfe094956e2bcba2009b64a5f8b62d144158180835a7f51b706a12884e309ab4ec198f5bd07efffd591d5cc8569e1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 0) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"56a0b6194153e0d2737f49f4e5cb77ba4d8fbf9914405833f324c09f96434ceea7e756fc2f55a0b3f043b6e11fc2f671ec00f4d478b791c6":"81a85cb2b6afa99a1f609f83c3b15105":"":"":"40e87b822b1000441884a38b8776baa69fbea99962571e8a20d8af012d50c8c211860ad579869ec880320ea8057d5cb0de9496ec57d8b594ca8be5b94219eaa800af7205f8a83b66c87e0fee9aa9732f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #0 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"680face90d7bca21d4a0edb7799ee5d8b7be9eeddd0e3b4b7cafe231630aa95a742c4e5f5f22c6a41c0d7792898827948a589f822d1af7a6":"f58c40ae70f7a55648a931a0a9313dd7":"dc3663f062789cd15cbb20c3c18cd9d7":"fe85b0ab14c696e69c24e7b5a137120c":"68004b3a28f7f01cf9e9b5712079ef80871b08b9a91bcd2b9f094da48480b34cafd5596b0c0a48e148dabc6f77b8ffaf187028e104137a4feb1c72b0c44fe8b1afaba5bcfd8667f2f55b4606632e3cbc" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #1 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"b481041a75b03cdaa07784e372b376897fa9e792e1fa5e078d4c7234fb9dc3f9804b4e48a32a5db74990333c4951d02823765f90a0aa8850":"f8f0f1ed3f0bda164e596ebe123b7f75":"3120e329f1d55a8c07e7472ac77e1720":"2b9ff310e63c67b5e0aeb47ff7a102fa":"7d6b3ab84bb6c014dd44eb1266fb3954f1e8ff6c48a4d91514f685f0642497cb1936a0afc40c8ddd1545204e128fd06d4d18bba05d1294e64d57a0593b803a311b37cc2d631487ab03a00fe288e5e745" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #2 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"aef9d310cfced29873b7e2b7be37572b76ed84b043364cca611917f9b12053f919cdf60ac9c0b364909f096204f21b58b0bbdcf38a3be7e9":"67e5aa83fa572ca27acfcd27d4f5e49b":"7ae90f7dc220bf5b387ed44c2425af29":"9d750dc13c19acf3cdba10155d3ca5a7":"892776bfb009fe0b1793c0ebb2ba549cbcc4a29d0374070683990c3f2c622ee08977fe9361c59838f068f6758d7f3f76c383d9f59ded8501f25eff9be4a1e2de3ee484a2e8069c51e886a75a229ae15f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #3 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"b68686b8cf817da9c93cfcd7aae410c02d3a8eaff57c6ecf990f20f70c587166292b5f56cef1ccc5018c38a602f811c7cdc16ed59faaf405":"03cd598585a3a80f9a81e2780c699269":"dc761246e0a74339adb76c729ec1414b":"b2936022922202757eae4e5d59eb29e3":"6e9735b82a9da2074f93b54580aeb76bc75265e525f1b50a8ee0d6851317beb64f477f3b3457ca9c120cd8eab6d37400ae62332bc91cab803b0c44e070666f9389a9d0fbe8baab9cc5c0cd54a397c8e1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #4 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"cb68eb95bb00beb896048d5d323d737942b1a4795806fc6bbcf67d195862172f49bb319e609965feda2937165b8dffa6560e1fd434a5ea0f":"700dc7725321a0a21a70ff6aebe30d82":"d57c3dfbcb18e280cef81c7118a520f2":"6e569776b8a26d8e7d3c87f99f932aac":"b017eb98c5d782469658d47569453b8322a8db7a2abe75b4e68637a395f7c67bee75a42b39def3aacb0b1a03677a0bb4d31257964f467b7b3962d912daf6d8441e5952aaa427c246a1f1a623a8498a53" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #5 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"81e7eccf46acd145d435b80f2a6e72eb1b236d02f12554270c26e8ba13e9306856d6219ad04a8f1be3fa436bf280f579c22b64c91ac700b2":"33a186afbc44f3adec590d7e36bd9905":"bcfd99d6931ea9df679d196d8412c9ad":"6dd61af0f5077df531c151f2dbe2bad2":"41e6ced34a97afee72166239455d82fe020f5464ccbc8e875e06a05875ca844d8b7fa3ec360d31ae57f53245e7c4bed501ebb6f9b4af350ff9cd86a571360804d3a34b9dc11eb4be6427f521bd14f893" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #6 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"1b76bb8a0dc7067afa193bf5dae1cd7c03dcc37b5788d22fe0f4adda99dc6d776fa545aabfb767255001063ddd99c7ef656a16e7604c5102":"b06bb683dc5018f0678c14b97547944e":"87ea4f713562b129079b49956eb88abb":"5650ef281323b6acec34c51795c67160":"afeae028a358702743b14dd64414d3350eb1de78702677e30f7ff9e71d6f9b368c53e79b0a353a43ec06e9020c7234232a07d504c163d7a8a63496bdaf670efcf2597b66bd0dea2b827e0a4ce513425e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #7 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"117ad3f68248555a2b9941cf0a56726ca162bf9b531f26e3416be004bcc6fc35be8362c6dbd9771d42bd6e187868d598f6e2647b536c9728":"16168c2a54d8dd7150cd7f122482a723":"4e4cb0001c5288c1538dccb80be01e41":"8177c1d4def6bde093f27a9894d345ee":"1e407dd8c1dd1436064f2015eab9c5fb9b88b6dd017e1196ce70fd9ec878a8cb02e2d221f4096e7998dbffbf0b392e7f4d97e0d1cdf81755507c04b5a6254086b40d153b10faf0011980bc0911275145" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #8 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"54bada0b89d9f5bbea78aa8c409dccd039acfd7b1645a0ef193b60cac97196e4cf9795fede9d898d082a9731a8ce2168a10420c5d6bd9a0c":"1c8feb149d98faf15b73622167064088":"a71ee8a522d67194bd1756c2e2898115":"669ef07679f336f529058672f861b0f3":"d72d43ff8704248a0d59a111b64128fa6bff265c52bdae38507ce5f302158be902d8380fe247abc0275dbbb502867f7ad1cddde0e404fd9d64ec494daac5d088401b4da696f47a31b4435abbea71c387" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #9 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"8cd407fc7a36315f1cfef1489a2ecdec433b2cbc1fda4ae1d967e192ea8942aecaa169deca4c268246edb421a0092a12091497a5fa159327":"114a4f3446eb3c98aa9c182d329b2856":"f29994a39804004e7ac50642f99c403b":"40782cf3d002aa603026e26d3bbc6dd1":"cf381392567f9e0d1f55c642bc64075699254df6b4b375fff8f869f7a10188046276dcf41076c55990b6b997db182fcc88cbacc4782347b9f4ce39351b77e378931d5cd026d997ab104b8b7787b2f92b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #10 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"dc8d705180e22f8be91aa4bd57a02caa30fe8340a53c64ad2d460e409c3a2db9fdfde9034a4c8f306195fa6653dc29d84d26af5118fb60af":"4b51ded198d1b16f80ba9e536a2a046d":"ceacb5b37ca76de240a9f4dea89a0389":"73c614b8e273ea9203683d1b0cb2d7a6":"6a136d4218255c70913b73af480af86cd8ccb6f319937e075365ef014187c312f9069f1fd05c6e0c44a1b7ba9dd25e948ac155461e425d864cc83b63bd84289b768058f7647a8921e23bfa7c73b4476a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #11 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"1796646b48a2b982fcf7a4f49fee7e3d6be673106a4a29371eb8d3598888d53f59572c63c0e4bb183b17e0f67d81a11cc878ef600d1bb810":"5297aedbca866d1754c4b6af443ab24c":"771688574b52154837bdff6ddcf24d52":"f6c627bc84b2c01a9c055d4632ec955c":"9d1c796a2343ee855859e04ed702fa233da2f73ac9ad632fd17c8c5afe15c5600c6ab2495018f808b1cebc54b14ae2b1f929347be4aed9836e0b45dd2352b23cb28d753045f1ae6aff7598a9a1c350a7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #12 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"c5aa3b0e9d8f916f18e73daa0cb88a447f7510af40f9dd540f8ae4d62be2c5754f6eb10410c121388233201ff9c8121a36ae77e042a98211":"06c35c446e28f21fb1cdf2d40af53dc6":"41015c3ef3adb96edbfaea6eb8e0dea6":"e6b60016bb99415640506851c0fe3fb7":"027ff1ab4c406c048da6a8c24f04d12a5a35a5191b62b496459b750b10066cfbac502b1ac612b58527744f6ac5005d22d3f86c1adeb1c1bf1a26902474d08bf886ed5bb26e6d1b529df0143128b397f4" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #13 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"57c7e29e0305e6a803a568f47acaed60d13e192c1e16bd9bc50ef5ebb52c5493bcc4d7a0e5be64d064b735deabbf67e94395544497e4816c":"89199bb960ac741082c5fe5ea34ea2f3":"53b5b2783d8191ad4eae3ed87bc059ed":"fce4d7f5f0cb2115d4c4be2294deca56":"b98839a962db8de7a17d35c35bda06c4139db3933c4ee60bf1779b16d804d7c600a62f9c57cef93a79ff281989d90481db863d23cd24c4b566d74e1de6596b7cceefcef1f161e5a51d115128e0b23c5b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-1, 128, 128) #14 -depends_on:MBEDTLS_SHA1_C -hmac_drbg_pr:MBEDTLS_MD_SHA1:"567d3f4c0de396ed67569c070d87f2b535ec874e881418983ec42ceb295b7d312e715e46b96f9da5998f9cde45b1dc22db6d2d7bfd4f3930":"43c16ab49ca5174f907d7899ebd242e9":"6c0b479d9e847dfbeae230bd4601d0db":"0d5a2183c9f9ca6941f6a617892f5e47":"934fe82b0951b97dafc5ba16e87b0459691156b42ff2dbbbd8f6ed9b04be952af267c6a17fbfc86de91f9f07eed482a5362b176216a8963af485503ba93b2e82c03a3ee6225077d90cd961e24f6026f6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"f3a709bb47a36838cb998fb6986ff074c57932a669670570ff6cd1b202ee1da014a011f43fc02c51ffcb4048cc060763f2c58de2edd494275da14118c9cb7fd50475c66cc7e792406213a7d00cf7623d931a5947":"":"":"":"bbe3daefa61fe302bdaa6d4d379680acfd0d456b5d35f137c145b72626f2fcf39fdf7f3708d9e88c1710408a3d7ece3b0261ff538846fd5452149960215c0c22beafe6cd24a7c392d5845774b87528912c322119a2adf4d35a0ba61dd36ffc8a7e7475afec58ad4a8cf343afb677f087" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"0f508c6330b9673e94861ae2057e200ae8f2b330b74634d79fe8a4c698211080db07e58b762a2387379f0c0e2d01b2ca40ef82fec35eb81a5493ccef709dbaa0b0e4494e460530062c8db7446bc6af2d852fd875":"":"":"":"583367bde003eb2061cdb6f51db9c6827cbcefbff0497ba823e112edbf7f2066fcffa3e92d1e8c531007783554e6aa8a633bc925690ca6d579fbedbf9cc4d6cb08133d0cf8d4c25fcd3b6fed95f00b1bb17477cf67b97a557e7da933bdc121481755f628fdf0f0b1189a097c7147169e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"9082871e73b098bbc58f324f12f6a83c321360c9f5b400d00a9bb865ef5265083d9309657c40ac94b579995902df0e2084eb4a6410cac605e482ea4abe5c8eb73bc63f68baaeaa56d47f7d74974d940555fd3861":"":"":"":"67c2fd4397af79297782af9baad2a26b993efa48c689a74531417ae102d4ea1d6a82cb0321aee3dc2572ad27299e81a7a77f1cf837119e746988f2ec60bb01eb2ac3d110a948c1c33e86833757e2670cc3947658f3b2d32ac59242f152e889d03d03056f0a265ee759d3a4488b55c63a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"4701f34326930cf93deaeb3a9c196e307a890c8ccf44a55f84593b3388a196238fdd97d201998ec734821998e7d6bef7b31fa2a81343918056c01d65f519c8576e4120a3d6b9ce28ccf57eeabd012d2c14e47045":"":"":"":"b499b86b0a25a0fc84a9a1b902972e2bb5aaf9b84f13804d6180491285b9316218cde0e73eacf722b5c664f4e618625ed35c5facbfca153cc184309754ecaad9c3678ce51ade96dfe3290e125d661e2afbdadfa73240c24939bc31d171712c7c987bfb434f1db6ed44b321bcd237f149" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"a912b6755cd2d677d63268a5203739b0785d7d956738a596e269128a583921aacbba1adb7c6d1714c164143c8f44e76711965514651680235068476ab137d5962e5e5872f3b899d0e9ca5ae8fe71bdcfaef1d241":"":"":"":"0f410304b6d88e52c8d6039ca674a06c49a5fa1094cf341c4034e39990236d9e5bb8ebb6e59849e7df82e2d02981d8df21e4ba3381e606b99c16de62860a470109c0123c69ebaf970603f451f9e6acf83e1c5951c3cb87170ef319d9a791110aea0c0dae5623c287d4c454ec93227654" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"54fb376707de02a1c385a3da78523485111a0a099066206f210ad848f29d3c270d2fd2f668cdd3a57cabed71f9d784c209259d1e4a3eee2046846a55a46965e495eb29725a86bd630dc43cd60ddb4fc93c59980d":"":"":"":"a2e3ab5390b5b79786ec7b434de48e45f590b85513106008479d8a3b7b236c884b0f871d8dee539c712509bd70de351f3881cd87c9cf77c1a9d8879986ff0f6678549c5c6acd15aeb6bbe653a9bc76829df2f194c5f6e8c7dd3058971ce15273a2d559c1ac60a0014e5e32352d6be2a1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"3a0c24b5a6106d28c02957538e76e96b3ececfa80ba4c7d01fe642a88fc822884cc36ac2703e8952ee635948715f78c542e6e3270f2757f1652474df4706490b18e649ffd95dc518a8b4259da193600af5d5bde1":"":"":"":"55dc24206aa59d34ea990ac6b31250f15ac056c8ecd52e159f3464c38e1f28840eec4c6423b0fd9971d11c5ab99225eda5d173c08f9439bb56eb1cc487fdaea934fa816f9c9e0d628f111cbe60a647e03892084f80775248d41cb587617671d99b508644476b66c1c96979e5061e025a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"ae7ff70bb69c964f05c99c0e7868210d567bcb5eb02db7708de162e6bbfd91fa17f30656420dad1ca69d356cbab80456cef922a9206f07d32c3f198c1a68e673c5583674bb1df1f2a69c554fdd3411c81a90c83f":"":"":"":"f1f3f79b1d7f988d4caf7308416f3d02371cc029a28eb4f0247c8625c4680a2dcbe9f3d56d92de6ee4d4031a254bda8a657bc147fb90c2f7783a8e3749b60633e5a921d015b846b3cb38830bc7554308af08ee8219e5acd1b699f1ac538930d257da4ef567ca570a7951bfb236d4d36b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"86704ad0286f88dbc60baebc2ed0571de7b5ab64bc8554ba8645557fa10159ec03cc9f6f299c1c3011c73b2563e571fc24f5b5b50b4bee514d7c808873ca804b147201ba7ed43430d89b066c04b00b0a17694523":"":"":"":"6b1a26d7d21308d217bc8988067ef3e21f5bc10d34e89937f2a89f8da256acef50b6ea7d9ea877bc1d15002b1766e9bc7fea3d681b147e42359ce29d6d4f8c73e7c29b9ec14277fce2f6a0c518d24aeada44990f7f92b0d1184ff96b20c76d506f6f9d963391abec5bc247a2ac6b24c7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"d0b30341b4fd48281f76a83d7de5769d05d5cb9e565b213c8e2bc8d4adcbae90107fc12fc1ed2a19f20beb563de8f05bc5c437637148154a12b1606bff071dbb366458b74a07a1c14114fab487772d436d4ce159":"":"":"":"fe2a7ced1965f013d475724eaa7d31b62740be411d899afa79f9fa6e73f18ebe0907f2f21388b6498cd365798f27f882a2c5c2744a9b25e8d351e77b9fa4471ceb1dd6c72fdef75977e4e4a246e24f56a615189e1b2a8d6782e8c5062b744a65ebe1f7c5fbcab333fdc155bfee300503" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"4a1a697e41537f28b381e05f11ebc905bd66c2c1d905d8c0b78c10c26cdf547a1b6f85ff58f48298a11bba41e3ec015d41a24d9e335e6e13b06b84b9f56b3e803bac569dae2d74c444bb58b3a6344bfbb9eee765":"":"":"":"15060b2bc827dbeefa2170ade633b0f0075a4b9b03fc24f73522174be4e4b08b93b421fa98c7c5a445c3aafed47a2eeeed63f19ef4f67e7726d8ff84bd94daa3338e397d52abea4c7d1191e30f3e8a11864f10ff56b2dbefd860655d34cf63ea22bbb54dfd0c5f64284c303a2ba2f49e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"e80b8c8896557d596e192c3226347c336dae455b50bf32a78c61b9a98c949096be51538e293d338a464eae0eb18f1ab21f9903d07a8b98ea2ad7f41fe7ffdc4b4bd0fd06138a84dc5217cc8fe39b92f9558aa619":"":"":"":"55574491d07db3aff94dcb71f519cffe2f96ef57219262860c3c03f9a5b8a1eb88869e69587f8bc0693c9919bb277dc84fa55187c0dbb20101f0c4e301dcd2fe21664e5a2f0dda3eb4f11df3878c5becddbfc3ca032a17f740d424b99be0a9bedfd99907229ecccbf459f5495533560e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"5c25f02bef1f1319cb6868d836c9cbc182fd8d86ecd87bc5cba41c163710074e80d1a30ddfd0f5d88c6682292cd50c68966d15e6ff95e117d342d974ff074ee872719d15745da624f8503a6141b0ac4b887ead5f":"":"":"":"9c5204d5471c25203f1d9786d38f71081a872f1c56604dc7570caa5439f17cddb7feff01cadaac8e0f35e7a5433cbbcd2dd4f11cc7dd14f6af629fd72a3145db6924d2bdefc262662367b7258cff36172263460f4dd52dd08faed3460bbffe18eb10ff5b3c6a97faddf65b3e21ecc98c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"68b4e1ddfd16a1c1ecb0f4221306e77ad02b07993457eace086f66566afc5f12489633c605d11d53916eee96ed778d6d6518c5681f0fa9b0160da1c71740a94ab33310bc20a18710015af25d3d667c40dc619f34":"":"":"":"5c4c9b3276d546d3b6277a3a2089d4969146d833e0ace3e1ddbd9f79fa2158531f8bb26a28b08dc64bb1e610f13eb14c9fb23559dc2f38326e145ab509b9f69259a0d1a32f471d5abf154a2585288063845f99306f9bb875ccb0d32e9d49b42900257ebaa532e8ec223aea60abc9714d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"d5ee5e2e629ea17487e593914012575daa8baf2d0e9671e1b8aad16524dbdf7d04c11130cdc10e50c630ccb235579a72b6eb4502fe146aabdab62a085c820ea46bb9091054d75a892a83c3850da0a31c15e0d021":"":"":"":"e32c0798b2040620fbc5d2a44ec7fa8038444c1910fd4a24312c8c8eadb57a78606449cf05ac51a3bc4d58ce78742c1be3a0fab6e3f5ebc92b82b5d5d64ce29e8c2787ace0f4e718a7f6cb669a0a43ba1aee0d9aef55cb7c6f5dff57c8acfe883ffd8a496d44afe06803e4c9ff62df04" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"6e531842b9b7fe2c0ee66899a1255135f784a2d5259c93ab3d63a5cb708e2e6cba955897d9b66c7fab274aa388a5db69713c86faa4a19709e9aab04638c670ffaa83806abf79a43e613e62cccafc637e1a1c0c14":"":"e628db057250fbc6fc5aba01b6c8b47062ec5632a8566730":"bd12e61e3d5218efb0c103dc49402800cfb863ec8925e76a":"037650ddf66ed42ea38cf44aaa94884effc5f831c593fb35886b5d601a58f74f868d89f2dba450b9c160e28f69fd24e30fb7a44189810e29afd0d11762d3ef07b4527f4134d6c53bdc9b024cebb6b40fbacd68b6acd4bb4d011d6705ce22f90d910ac4017d2426db7a48db3242161aa8" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"3fadabd2d8879bd2298f53c54b573db2584655e08a83289cb58a4ff5170fdc30d71bb24efbb5a50def315dc69146111462e204289a64ce72767499f299c74c934f0007ddb34bf5183bc1e5afd8c15eebdebba882":"":"742f7022892c2123e62379e9367787302fd18dc3835de0bd":"b60325136fde7c858054983a977262b6390a48419725febe":"3bfa419f9bad259b871703681284c5396fa94a323d646ddbf5339398c4d8314a999c230894ac60bf231762acada672f58154a86f80a8c4e3bbc67132e22ef50c0377193cb0d13c7e2c97cb24ce5bb69c73be2e5cd3a07ca2b000b2d7eea940053156bf55d846181e3748a91c342e191f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"0784a499424dd1c2c13f765e9ed88d752fefa83cec61154f82b3fd645f642ff103db9c8d1c10b5979c56a22d58324669d4ace3994927222fa87fd049558a48adcbd6ad5a2380d2d927be57fffaae037bf8a34384":"":"9f853db57c3da0421914d2f71f9317817580c1de4ca43d50":"27071ad475b8541c1a80234bb2d110637fcf4b4e20e06a7a":"2c879a03bd719595211b526101fe85702161711c67a81184cc42c1f9da5761e853ff4b8d19deb95a2f3323d1cd58a2e066c66e7a30059732eba43a4bf3b22fffa5bea5161fd775160dc53d7cbb4c892bc122e4e0139f8f550219cf6fbccf55d16d8a4d8d7776aa143c00d9e7bd1c847a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"addb36bc9ad134c7b8fa54881db1b18e040de4f253be28efbd36b12bfcf4721b08c5833eb0a97c668c7adbc7f04a9e0299549126172e25b9e624282c8e63eccf358c0ef1a71f8fd0a8fc49451db7757eae344e48":"":"e32540418ef68c3dcca1e7a0546e5dc7d4c5e92019b8cb0f":"327e31a0619305c93e9b5eef87102d447d21e21e2d8c1cc2":"178bee4059af0282854c833e11e7bba923a1e2f1126fe8cd7e1694602c180802d67b845a88ff786147f22a74e6ffb0f8b86d352cec2714ff8f308b1f9705603faf5b04bea3c75c87c91d5e6cf7583b5c45eb5f5a74d2bac490c8415d2fe07726bc334c88e3fb7284058b006f82e89ae7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"412431badcf06f87551ec63c3860baf4b59667cb4753363d0f82fe7c968ea6f8bc5d015418adeae206005725dd9693af6f7060a2d5ba53f66dd49dc148de581737b67acd4bb70ff2f4cf20abc001ae1eb50cb75f":"":"d67f94a953e7e4e4bc0cbd517f963e599d68851cc333644a":"385281961ecf2d8175c0a718347d2132f059964c55f39f57":"357876e78a69cd4bc4e06b2c52ad28434520d54a4a310ee0eb026b87993514ba1442e25eb1ae22a3ce98529625d8db9b0e5b680d7e027523b0ba0184d3f2e4b9cdee027960ac1612295bcdbf570912ed05108541b97e3bb30ae0a122d74cb536e5db34b7d5ee5a042897d5d29fa3c126" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"ae914c3d74acb6e2d9b8487927db7992b838ede73dc918b60bcc94f0f456f454a6d100c90e119342154bc3ddb059f48db3a8d7b7288eb42d0ceb07532a2a357d20506ead28d9bd4a127d437a657a61f5d30b04cf":"":"2afb537c13fee9c4103cc6abb11225046d94df2e9838f73f":"6a9f670cb49cd9ad98a17cc19d00d4766344108f0c86804b":"2ed0c4140420c6e3798a13f917cd998b2ce6f98bac27f0fdb09e2538f573caff16904edb371f98f50964b7de552e997007fcd267b36abed12cd95d9a08852a4ca862872edd32c707e7a60e11fe0a7db4c0d34f4c70ff16e5c75e6f5d7ffaec3be383b8790ef0ff3a0d9f79850c9749c0" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"38a93c3ede148c91eb7f0cd327cbe8b27ff0e569bc5262aaf30b86d31be35f83b4ff50b84b5dfd649908d0c55cd5be7ad36d4f5f7f22cce066d3b589adef804bfaf52253a0e4c6bb03e000d649541e523ae52f1d":"":"e12c05f2bf463d24da9abe89301d2acefb7957dc1bab9ef8":"d70065fa713e2d691bf554a00d063222755e7204a3e53968":"3e5ad7e96c8cee899889640d8268cbea296aee96fca7bb60308bcdc08eed36bdc8a5b3126ed8be900577e60ec0f8b3d3014deec41ac650480e08dd3a425843b37fa5d1d621b5053ba4b2fc1804d407849a84e9eb5bfcf94f27c2a535e2756b8202ede1f18e81f65e3f7f51a064b401a4" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"384d6f43e7d77a381bc6bfbfbfe1a17aa35525bef01be8aaf6c488c46517d9b94380c73d3fb45a4f1b4d70375021c7df78eadb61df5d9efc6e08fe2d81ffa65df33667c23e3cc5c89893988f04be1d3634ced443":"":"a0271fd2552e037568cc857a60a550db050680fc03904fce":"ec095cc9e3bc301071a901d0289b54aefc796bffad6fda8e":"aca2571a9cf6bcd10429e146e6e94d1ae43a00db28bee2b60eb6a1bc1cde3d452dd6e04617aae7a3f813feaddc0f8fd25890004607f45ec995df970e1a3abb17b416bdbf62b6ba5625a80cb100e2b87260a73ffe15d9e6f24abfe9e6f9ba66bdfbfe71380d832418e2a4b460dd7415f4" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"98c8df867d234553e504fcdf807fb8bba51d23ac65dd8b160943bd45181764cf6df0049cad23e6aca490db57d12dc6c631604c943f153927d6d04af042e1da1b225eb8bdf4ee99dd405e3586acf8e44bb0184d68":"":"3338baea79c06f0d48ec2d47004e61c1c1e5056bf8bbecd3":"79007bfce109a682b746df074e87c845eebd665532867fa2":"ba7040193e38c4495971827fb1ddb747ea80cd0bb1fd6aaabf85ec1959c29eba8f818ef55aadadc8c34b6a7c00f210a899092b9704f2e03abf3e5e8fe6d127cac0436441d0a6f1b02a00e5fe948539c66a8c78e70f35cfeb600e1cc68c06553f47ca053b64a0534a028a73d0890034fe" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"6150b7280b3105b86b66c2a39a1f0461cfbce17e746791afb241b298741454e174650ab1e7f08500bd7eb096e40d8114e5a60668636b6ff66d2622154b7d239eaefc9ab2aa3351eda2af4fe51de36e22e70235fb":"":"6ece8aa447d2cf51d8497e303c1a202e39e06bd723c847b7":"21d890666d2c8ce4440bb453f4284c3928650f8cf38576d7":"7554b8cc8e79330ae55575f9157cd10d8eeb58af30eeebe9daa021f4b55ce365fbdf3629be7547a89c78bb9df79d35179e5d2924aa032e60d5a00281f19ee2255c17a69345ed86bf36ecfd694be0405c8b6c077b43a8c8bbea603ddc632a1aea6771a6bc117dbdc365e2714bdaa8b377" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"cb25eef7230ac2da249fe30ea94d3a3332147022bb2207aab4a50822b1564c24a047ebb46d57f45f6680f909629b43129876c75381e3b7c6d06887f68083fc423f06ecba159a90edd394cc0ca9473e9cd0f23c89":"":"2f30b005ea5d5965439bf15220b1c010e6c79306e700e6fe":"9937bf3edb3603cbbe190f3616b021fad652011854e6f6d0":"040a30b82981f71e4607c20c1f2d6e6854824c90b127517f65b6c7da99fd33dee32dc52bd0dbe902509c50492a88e5963b2b6e27d046334b356e5909f85763af2de70e93a89d6a00e2ef81ddd74f4a33d3f8406d05b383fda569a5a574fb5e3c0c86a5096e94174b79b2a4eadebccc2c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"1d7dbe4e83913bad3fa918262ab0f45cdb9e4e61667694f361ddecace06bf352b18dfab4c32bff9a013d3b92a2da8ed698168155ddc492f8ad5d65cda8eed212793cd9aec8acde7e00f952bb5d00c53c5c181e89":"":"f9c51ff8f264cae722734502f6799e4fc5bee773d31e3e31":"6a171a0a8801017a1d924f80fc5d9d6592b8b28a342f30de":"425024bd1d1a66d4527a3e8a8307b3206923bc1d693f5b7f9017f0d5527cd6591016758794ac89e2f682cb2d66f8d28f9a2f5ae2974a75f4d0de17dcd02e93bf29c69175fceba262378bafbe3eb7e3dabe974889306d0a2ebd0ad9d934c37b1ad89ac1fc28493e6b1f6f24620e40eaf7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"a6887fe41ed5a615eb030b31b86315d32d13dd5ad506566ea23ea3b162b8dd621129736c8dde31708a7fa4a4c606dc212b3440617111e94a5c6722c3a729d84d2e5858c23ba8bb249456a11d63dba9d4260a7213":"":"a52036daa8172111e89c8991ca818bdd711095a1602f2f15":"cba427a2b7bb64002e1da3159d643e002516bed279e0d442":"cf0f5881032606c21a8ea20adba6a72e176e968f10b08ab6d08f997b24fc2a24f2c5d44d1b99deb7db4f388dc8ac268f966a34c857cc5f43efc601674bc548ffeaee1c13415df6d0240835832cb75840b60711cb636f509dd9b87b698615959688e9afeffa50671ada05faa564c87ad5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"a563459889ca29b711086adfbf18f284fdd18601ff69916af1ce47510d33f205d4dcd0080f9dfedb2bc1e2e60fa0b9cae094102bc7a705cc223279e0fc3b0020b4facafc2b31b9bca92382f3810d5a4e3ef626a9":"":"5fc83f1f6dc0ad454bbacf2df366c803cc1d2fd46bf78d32":"1a9654667cfd6ad0aad9383be04ec1480a494262b3fee823":"cb45ce96a973728bdade51f91004ac09e155173769063b3fb4712493d8877f088127a3492588e99fef648a101cf1c238fdefd798dd4928b5bb3a851eed693f37d67360a28a2b27c4406e9ddefdffba662529b91a980bbe4eb381cf9734b336e2b64e7482e0328c2e2bf81e39edc30d97" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 0, 192) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"886d098731abf3140d512e0d348a384d25372667fe7e4f0ce713b1d2eca7b2ad939b25af03f78edad75bf0ab95b4110710d0e12e714e03f7df35db59fc4ef2906cf36c6c8897b802200a83e60d16f7fb064abd2a":"":"a4f42d83a492db3fc053d1275c6f264706fa932955c3da62":"4505c0664e59bb4388020470838bb098c4ae1338c268adf2":"4f9c3c60ee32042735cc539b9a23d04c2bc6bcd68db04a58240305f165bccebbb98e0f4796b283a0d78bdaccfcc8daf19f21a72945be07996bbb0b606643c7753f76ee6371292d3e681468b714e16bc32db14ad6d777677137ebd3731186ea72b840b8c4ae79ecb2c61352ea056d2d6a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"a26af93571ba84b58e14e921a6bada73083ec17f21580a152703e1741392fc9ce6046f77d6eda5000f3225ef28425e30cec138a16b0ebd885fef074c6da2a7b126fcd1f056e3a5fd5627368c63681cc10fbf750b":"0627d10b1e5b4f0fff96d0c7e684deb9fb6a4e48959dbc29":"":"":"98d6bc7ec7cd72da4c750d9173518a9a17120fe9af10cd1a7d872fac505d9276c551b821a868cb8b4d8b10eb3b05845827717d2975814b5080a2f4aa50c5b112bd01b8652f2d1b56a88c6c891db5f3f40d1d1f0648d84e6ce2138c2c879884eb4847856198579eac759a065a5d384c46" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"5fd08930ba404d13a7275227660869e7eff10e103548e6ea15f0816ea93b649f6aba408ac710c49eaddea0b4d1e219577e6f6ba4f193386228f6fdf9cdcc50d5bdcf6d1f249e9cae0a097bb341e2ba3581a3f2ca":"7a463958302109d5fb9fef1a232b5aea13ba58a60b70911c":"":"":"a1a5c9d90f9340c807efa2068c6a0b872a4ad51a7cf90e14b4797dd894361712fc9507bd61d8ba984ecf1345fa3cbcf3031e2bc4302354cdf3f615c3a1bf43f60a464698e250726c37a7a9a23e1ff7e8d96df03957e3a0b5e6c4c4fdbdcff487e467b12dbc21e07eb8a7c4cd7f779912" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"625d6a509ec43c55bbec45b4244fa0bce24c74cc270851f2d32e4bb4f1961476af40088b5ea81f7a86efba78abdfb50be09e1a68851899e0e9acd95f77f16e8b0aea5a9bf29bc1a18d32158cf69c794f3f47fe61":"bcfa259c919f6e56c77914a272959cda6d2cafeaff87d91b":"":"":"b5bc1f03099547ce1a359bede1f9f3b76b38e8b9cc781fb3909899144f4d0a4ba93272552bfb0ddcda51165d0ca3eae47d10961a62692bd9edf2a9339c8ad14469f1834eee3c3fc1074cb1493054f84273e4adc73e5eec6cba284c5b7fd8005f10cb67b0fe16ae0b4ff30d50ca245c5d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"bc0c83de31217ff6b22c719de8c6653fcbd8aff7925f04624c76f586ed3bab324b64fa8a1ec14efa8d8d0b41eb6735d517f6c647ef8bedf3036a6ca90fa1d2c528722de33f76f7375711b6b4127b86fe096e72cd":"d7ef6b5dd09c08437313871078ac730c2f85a5abae6d6e24":"":"":"6d415afc0151c3cb426eb3b90c209feb726c01e28785678bb0b8d9143d4b7f31ae07e384816072e2df31350b133a8f4e3ee18f04b154d194513d9b072a695e52bf03eeb4c9a1df85dd6ef98d2453dc39390bc3a17f3ce499d9b182c89d0591dc3dbdb7aecb626b07f0ad2737bf8200b2" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"caca2b8631502fbd8bec33e89066e77b97a57b09d21a92dcc7b65897e50d7a312f287932c529f6a6fd8be6fad5c467f6c15f9bc0f39653a6e4963c0d4c4baa9d6ad39f4ad2a1d6587377ec3898e63e02cc0c454f":"33691da7461d3355659c4ca927b4d3e3bbfd8e775b535538":"":"":"89abe8e656667299705c4c8b208f0fc400897397d15aa3574cf86c0a6415dd30ac5d7d8bc629d8ba52e6e5af63818475874266e98a43ab5d3085d2856950e8d487ea22e01f9ab7fe1862be1fdb9a97cc24eb9ad05beebb202716607e8b164cf63cacb92504e80e68e641af71ad6ee47d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"5d97de97d6f81a858ad6ae0262e58169b27c25adfc2bff506854e6bfd37f3a4d8c4b46cd78d0a76b0dc67e0d3f90fb04c2131bc31239defc8eabe9be0fc589a554a4b77fa79c64c03bbf87a32031530d99bbe397":"a0d8be30a0972002f21ce2d7cf3c8e84907c638e0093354d":"":"":"67536d7352a49a1a49110a1dc1b77dd1924be34123e027aea0ba6064ae0aa051d4470ccbf923e0c96c86f2d440f17f45b67c4c7785a6f5006bf0cadc13269540b2c59bb75f642e9668feb601fc60c18b94d65ebea0dfe5fb284e003a58837f9e9e120481ec2ba972c755c6a9134af683" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"9ca7149b0c5ccb7a0f7ec5399c644dba98c418373460c59978d91db57ff714897ee71caf459c1dc164655140810992fa6cbbb708ba2e61053d5866ba6a1bbdbc639fd21be4383beb4a4d370e86d0e9739ef849ae":"2ade2ffc19de7fc94767193223aa1fb3461cb29d970c8f05":"":"":"b39d6db529fbb3c6a90d6b7057759c26a9fa26024d2b65e3bf459881ff0f88a5b93b87e0779635022cea81db313329b61613742cc82b52fff1a2e6e24ae0eebc0917d5e4573466e4aee3f0ee0053445566eaa080c3e701bc35d40ce5105b4b6572baa7b4c84a16e4aab501e6ef670164" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"cc751171d828dba023f430b3f5a7134f733f4cc1ec76495e98a6dc2a627d97924716d7e6b043cf15c62ce8da1dda2a930c88d6d4d12ca992a501f773dff5d38e42f150f1c55ee358aba1e73cbebf465baf9fd0a6":"4ba50a75424970526022c7351831c58ee75f1e3aa0c47749":"":"":"8b387e55b9c10d0cc336f5445755c0b6dbe971bf69a04682b21c9303a66e093b7dccf33fc685765c6d2bcfa3020892ed09ce6ea3e3355b3bc16741f34d40b5c96bb085c1574801d14b4f71c97cf64e75dcc330fafa1d1e626822609a9af62c894dbdd56307ccf1ebbb7ec09d500096aa" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"1f2ccd29bc38e8364a4beb0e89984b88d61dcd31d48e310ae691c0e146f495b9d8cf443ed12f3ad2da7c59c2a2f6b8df4e0202414791e106c1f879879b7a46ac207f45b5fed69c38309adf15dfd0dd75742c0df0":"e0c49aee71c4c060aac1bab1f438f9e2b0c96d710ebfef77":"":"":"593677f65ca4339c0dd8b1ae9278cc49adaef1cf889760b4631a379d82bc25123dfd2e1436d0b6b890d4155e3236fc1e2cef67d8bc0454099051e220d6925b37c47408fdacdfd54cab7be70f8b3b3dfc5a86f181dd559ff7182f225f7de87dd8bd69143be270ce76d2562c6e01ba4c4e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"f1bee9caecfd0397a6cd76f356ecacf1053981c64d315db4a51a244fe3b22ef997392f65dc13cf30f5b8f5edb7f8f55863a30156722536d02440e5f06e503795d2401775a560685f2ad3c98aaaa22726cd6ec45a":"9d42670ea4113ae02302cdcc660b497f3ffb19b9aca8babf":"":"":"78f31a24cda43acfbc4db7f17c57805a4b53353d668596247358b47e8f8deeaca312a7f9ce78832bc1da2d6b3727fcb847ca4feb1695a2edfd2ab24c486da125be1c1af4f78b749afdb57f97b4a8b892fd87228f116ba10fa739059581256de4fb865d1115c58284cb9850a24e5b7615" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"17b3146ea3ac1afdca446275f3b7539a517766b90e2da2c4c85db4802943efcd8009a9ffdd054440da16edb641a050fce3f3cab3d5f03d550111daeaa8841a9c814def76eec9c4e910788c710562428a39cd0987":"f3831c1bc859fad452a76ce513575a23e8b790c90de4575c":"":"":"c6c85936cd52b5271a6e70410e0b9d960d76f3236b548cfd4fea26504ca8a78e58ee914c6cf248f30d7ee3547eedd3a4d9869b15e326c911aaecb7f0c221f8eb9208a9b355e4b1cc7926380d25bb776f3e89904943b3fdf306012fc95d06b3b7c44ef55c9eee675150b332e2181f2a32" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"fabe526177dcd476be9950233ec56f9122a9b083e589c9264add302d4768c06020cf53e7708bc728582360cbf06a18de38e3da2642dd6751aa686dbf11734bd75a422571c9f2420915d7d79d9efea870e72d262d":"ba5858340e6a82b2ecfe1190215bd8da995ee8ef572eed8b":"":"":"10260dfc2f2322f530192e96a2396694dead62f9b206137108666cd199939184503da75598f54a89dff885a9856140b56687347c2c066a1593bfe02b8bd2cd93e939c424b33683a13678ba5f34df3f2f5f50b2a708d1d5a04683db00a607e2f80e5feb20086e3d64294e9732b0776c51" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"b7c9a1d221fe10552bb0b799e18d12cffd1f76d6a1e6dc79a36584ac7e13c355b9323d0ef2f97fc2d8a26e6c37209a485963788aeab084e923a3794c63713c2ee288ba3a99f2d407adfc1b87ba64fcc5a7f98e4e":"e563f8c8318862c7117af8946823e8570ebc64b3de1b293e":"":"":"100c460c12e5ab12a72bd4351f7b608f5578060b262f21d735fe79d13c942035a76f001adfd39fe93caa22b6274bec282e640469d3f454d108991a1b73d8acb3d392732fc24cafb15fbe248441462bb2c1278883610ba28486ef82ec2ff3d20eb9601866c7dc4eaf44cdd73e5b5ac14f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"78e5d4818964d748282fa8dd386ea9c920c4fc5ddb9d2204a3f6285082b8065dd3944ce193722e973f8300783e37991e6c4a6286a1a0fe3703dd78ae951c88a0ce47b1a23d91e0926358221713670a78732d5470":"fa058586d35f0d74d2c473e005e7f8ddc33a1f6d5bc79d75":"":"":"6b603b098ca74b7fcf3c8f9b42dde5b3b51e84cab4f67f4d87bc6575ad4fa3f1e0ee27085f88e2a5ecf4f57f9ba92638e52941535806d2cd1b5aeb5b7c81b3d44d41cf5b8073b646a9cc1b0a9f7e183b082e9f2270acd928623e8a46b46257e1b827e8b88b55c88a3a3a067cfcb9b2b0" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"50241739e3f08c910baea7f9ba481511b6ee5d69bb1a2dd34f3987a231cc25f39a1a966390e391a33dc21281372589e2a667cdbbe4267710d5244fd342c959b7272b39e5cdf67701d47665b61782541e94aa224f":"6a7d2f2dcfcae8a284802c97d77917e87c6cf8417c2b16bd":"":"":"4402afee12048c1c6a44624d2df026798930ec732884899ffd20d17f1c8d7c221cf5edac8679a21ee11b177ecfd61927d4ccbb175ee6b49cc6f371450904c2666aaf2e6cb36cd55cae3af772beb80955cf67b4e8be1fce11250a39693ecb7f8ac05aa23b949ac74bc9a67060cd60cc77" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"c3005cdc5c5b7b25ed78c9684f3faf6278f9a9c5a9fb202014a29882e50b21e56ec8b7947fe871daec2626f32372123f44a8721ff4339e0a20f978ea27609eb495c2342e9ba719bbd2b44ff503db2322ada1c982":"c4506109937e0f9352fc881b0396b0a103626a15addfe525":"6ee49c76d138eaa3fc10cf411e0b8ad5488d77f74faacf13":"8825122b506dd6f3a58811fe6c9a7e9271a6e68dcdd590e2":"e818887ca1c84717e277baf00913d65ed58a8f90b8728080a03043bb2ab53f55fa605ba0cfab29b4cb694f6aae6594dedcbe6f74e1f7573c2944f3703b89a52789b0170077ea8e66d8299ba5cc139943ab96254065a27abca2098a85162fb01d294d8671b00206b7f784319384e01b3d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"9bf2ab19aa7e9ffc3461522f3cf85b3292b54bd3e1099a42dd6f5349d169d59a152b2dce675874b665fcff802260ea84b358f6fcf8011b511834e8447a73c1f675b7598d836dc9fbf40f1dd0f481f47f95f3ef4d":"38d7a2109c6fad9205abc22b9ff705b7f671c4bde5b662d4":"b46e928cb59eac0cbed65645767e96fd824fa95cb96a1cd7":"532c8d3748205cfaa826fba7f240e9926cd3811da8fd1a5a":"bc367839d1510316ac3ba17fb7bf633a6eb4b61dc0b03cf1cca564db8248ced0b47ccb36e730c0237b0812af30361b5dce662636b23f87d6ace82cd3e34d45a1133b35ff9b8bde8fb29fe82298820c0c87f0e30887ddb15c9644bfb12578f0878a710771ad22fe16935c66681378f5f8" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"a3bfbed559c396b807ffa80409fc4e2c23ba952f64a41c07d3af5e5b78d8ef88171bd5022d3e02efefa644f4fddbe207e59397605a0408b0201f6a882def64d973c0714555d2c7e0a6fddf49558fd1328074ca79":"4c63bef79f71fa82168928619cd09b003aeb2ba2b04150d2":"c85bb368a82d57c70cd5ad6327187c8550f7c10380b2f030":"5d467e9c06ee058ca066dadd6f6ec6b0da59ecbaa4ddd12e":"1ce311c919c67e151b51ce3060384ca95c071a295f01e54349abaa2da8ef497ea1364454133d20f57da28985bfc6d1d2f58f84d144c85dbe3c9fd5e8958ce06f2f5ad5af7e16bf90ddb4a1e2947f78008467fcc38b5a082eb1612d68e36e3c0abfbfb3a321eef3754ac16c41f96bd635" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"1b2c2419e85386716135b3c142d749f1f5bc23edbf8c0a1c53b72f474484c545761b21aeff05cdd35621d104ee393e791737c48c5a6e6b25b58c5c5be28ecf17c410c9c9c3c3aa2b6385f66759f31b61f9fe0286":"b69011f446e50880a15bb0dd00229f765bf77b2a40040109":"67eb63a168aad8712a0e7e0f162af7ac7893e902f1aa72cd":"23bb752e6232144630e3d3a6daaa1e58a5ca315f21fe1d8b":"cd8e6c6b8a1f7f98f5d796023fdd4f1da2d72eedb96a8e85cac661da24dd0a7810fa04be0491c69db7617712582b43ec4bf112d9e2932288f25b64fb7a2a09ac8747b8f71ce75e3c80b854336a0457b8013ec6dc1268b4c7e8f7d3422a4a5d432f8d9705d6a273a09b9f9273f4928c4f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"62d059e3ecb695167e93b3cfd77f96e681985ab5d68f15473a89f9cbc4012e1c090a5a9e65f738be938f44fd6cb157fd9b737d9389e4e56b6903d4d015f9d80d96336730fdf57787296d447ea91de7e686c7a81e":"d8f121b2bbdb8530c6315c63e0a52e383c163c033d3b0854":"830e2cab11331b761aed55db61681fffad3a61a1a06adfec":"c7783d7357ff30e88cfdbc90569daf03d3fec8caf89619ff":"e44c9b35d3b847a928748094ba6754d1c5de3cbe3d90d4e2bd0c0f19dc5aed7228c541044b2b14d7e67dcc148ab04abff7c22a8f1fdbec4d68ad24a7c4b0f0e507bd7f2b4845593363da484b481906fb7207844597238b9d40c14237004e275572aac6a6d84d151fa58abc0987e54e18" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"fcf3887b4505f7a1273ad5b32e064ff51682bca23ed974ca981871a5b7f63e5ceee58131f9a01fa7c37ab14150c9323a03f694e463496c4159eb8e5d3ebc62f41264beb93098a42a3dd406b983e1fb040d108f93":"9b3e97eed077155cf181829233868d27eb773c398575dfb2":"75a75a15c622e69eba698a064b0b41c8bc80ef803df0f29e":"7b6a20a222a81dfa6fd164def816c2b6708bd4c761b2bb8f":"0b3d501f728d2f1d8b0d7dffda0160157b30d0d97932315f77022d1a6fb30d9a0ee4383f2f63377ac6e57b16b0c7480a6f5dd12ed3ec0bc6f104a26c86592daa3f68a499570703306e2c2448e784b67cd6efdb4ae64a2e8ffa5929e74c95b663c9b7fe891633f07d7b50f5f16e9fe567" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"7a6a0774f2cb5ddce6b5242782fd3d7b5c7c7e31cb5fe95367c06f29a5488fa37feb34d689c646cdb162e258ad636a030ff74f6a7ff876417fb08f5c5decdcc98692538bebf9958c627ad8287633f98c587cdaec":"fb16aea72967c43b8803bcdd3e794911f6d53f2cb7946cee":"67d89947396322ca243e2c591a3adc8fd9f1ef448414fca8":"a0d568f4fce862e5e1b22acca29e60d7bc6cdcf6cc277794":"758b4685b0db1093eebde07ba11085a9dcab64c8d5adacda070fd2b292bec49240f25e158fc96cb1d0ecc9ebcccc360b981d140e3cdba54fc697313014450a9af29d9d55dcbc5bb9a38e4f10c6a3e41874d5c6688f22d0c5714301083cbbd0014880af0f7d088dabeb4e84a64f26d2b9" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"19bbbbfcb755cd9dc000abfc03343ef64193141c3d3f43120f55674616e3d96b6086adf47c906981923c98ef7dd0fbb2f7af0ecbbd2de848f2b25cba8651b7e3aeaa0c59b605e6d4710a01406565ea30d0c4f68d":"e77cce9d26d283bb5d6e8300ad0f69df723324d23928c6f7":"0586c76051462d0483071213804385d01a07bcb27db05e06":"1c9363d0b3e9f42b6c722b8d62f9c633066587577fe766e3":"6d458079264d5f3940d098aae092690b7d04cd46d6d5dde753063b7194118ab67d3848459156b8f0216d85b5c583a1bfc000e68111be459743175fd114253cc24db72ecc978ff8620301ecbf18f42fc4697d91150649a8254a9850d5c28f9c4e187e409e496e2a659b2e79c06074c5c9" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"c2b577bfd802b8f599ca14bdd5fe5003ee28ae69ca5c246df4f62d9e21a7793281c48f73ffea15f3c3d444ba48367fde04cdf6d62498b8afb24966a8662461015135cb55034a63571a032d3cd2c1e6cf4a6855ef":"f0de29d4530b4af75b8defe9b3b24dcb7ce0add4aed6f72d":"90ac05703a8e0c6057dd2d8b1a6f16f0059e7c70679919df":"16935f700de9fe529a2bbe811dccad430e27dbc60549c3e5":"56988f9328a91314e4b3ae027bc6f43a01fe471615f3a319afd9bb63f55b13e681ac0ae830d4d3057882fe247ca4decbb26af811282f59ee89ea38642e4ffad9bdfae44bcdbc3a289bf431e0bfc68148c12ced1853e698e74f74e24aa434937390fd41cb4e78f823a262900f2f44c1fa" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"b5c4acc63ae5c68ca404bded2d36a391e8b2e9ef3b32eb598aa94fd6b5ede6c3d9c33ec77a195abb6f8cbcafb6c492a1d78f04439bdc442168d1eccc783d53a92e16b90ccbdb0284b383cb96af04e81728d1cda0":"b3e6df5e9ae10c63da4269de170550b92dde7c6e33af228e":"c9787b641b5c881dae53a69e2b3514ce2ea81e5879765bd1":"e4abedcfc4cc69da45467bf2bfb03d823abc19a746e3c582":"e14f46dcab0ba39965f170f01a07308090b051127685ada6601112aa236093f7a760530f856617d9e027c8279ef33d9fbc4b624ae26a277b9e6077ac71e2d2f101b84ebed007ddeddb4286aa4729cb3b28798387b757d8e99a7b6d2631601fe7ab4caad7983dede59b94f4c920ef1b29" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"7302ea40e214308136b8427e601ad61132d195f870f2a861c7b8ce1f686bf325a155d0aae1211401bb844893dba2909060c76cf9cda757d9e2cb24f5602fedf6a7412f49497c82866a8c9b56e2bbaf912f760255":"58efaa77c9bf446ce8d3f3ce73b7d1f014bdeffea2a2fdde":"68f9eab1893186d7e5cf3a8c37bf1c229344abdceecd9de5":"a0d3bf1de632fb19ca5326d936f79aafe59a0e809b13f10c":"f2c6a717ab10a9cc89f6d3a07bf6077fa33c2e5d67475ebcdd1b895fd0067941ed3fd8f251352403c2680df2319a882f39a91f8ccb7df2c06a13037f057962e23b8ea0654ef9bfc19b6ec982e539ea6afcd1145cee582d27b708691354b4c397a51d004c61687c1c9c948576009002ee" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"48ce334fcdeae603c54fc228461e7173681a8e8387e0c048c2acfdd6a78c955deb7dc25bea4e9924c4a2ae22d9fb6b227452addd0b6eda7769f9ceaaf2ca34568b3c198ebdcf5f6ed11f863097bd56f42d648862":"6bf4c173d264dce03e475fb3bde9fca2474877627bfb0c5d":"2a728f461ce1067dd38896002724b4967c1a9cfececd3437":"2b862cd7a94c1776b26022c27c0e4f2d199ccb782caae6dd":"07f80326ea781bd95efe729867d6c39465213bb698b5e486e6c5f27d3fac4fda3cfb7c831fe6291062d4db2aff59781efb4f4cf428236aad6a55111b969885a6b851d5462278d0863909a07796e5e0e8448fc0d674a4408cd9e91e98e3adcec2064ad37dcc566faa80149519f5ea261c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"b23c748a9c9d206ed4ce6b8bacb6f7e17cacf5649ea8d1e1144a96e977a4cb22c0f37139c3eedbcc8b9024c6f21412f1600fcde1488f95744446df7b6e21a858224b9294a75829a014697cc4b363c3ad0e152ca6":"325bdbd8c14b766d4a7ff0e14128585b21af76de7ca30ff1":"2e002a406bb8090eae6c950944a4d6768c89d43cc0d8bd17":"4828622ff56d0867bbad03bac51b8c939a5dfa33a362b129":"58cebdf4676a21ded5eba4dd19452f5dec909c589751879ea4249a4c9fef834d85dcfc95ada82f7fba1476451774036246d7a496d4d427f37647ebc10fc2e1125b0b71da1fa5f1479c5681e9d7acc9b88b527390734d943bff6a76c4b22bb4f6ac331f7710b95f6806fa35a29a2fa35f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"606f388e8ae35faf979434656144370991e89b7457ca5b55d5bf2b48fe8cb64f549f48a812edbbb4cff895efb21c90eb26c1db239ed72da43504a1e09c56fe144f2d09242f2670dbe2561456d938352125b19131":"5e039f38d6f9a9c4ecc67158f40d3c8de61808fd7476fbf7":"21c7d976da71bcde51a3b4bc1b9a79cc6c4ca51ec992e479":"bac1c5904816c3040eb532622f127ac3e28cd78ba68404a9":"5f951dd774bc1a0818b249ffc51348bf1f36aa4b9d6a3348d36df84b5d3e824adcdf8b87ffecfec13fe36ca354625ae8db8a69722254c3f6e7027b866c529f9bed25360e0cee7ce41f996d50d224a08e965e0e5dd67a77142e2a3de0d559b9dae8919ad0387ba5fdef699e42016d7291" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-224, 192, 192) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA224:"be16ca52551a6a0656c40539e3155eebbc416cbfe212101f8edc2f7118472907ae9b2b9574abe81257533115472610ab401d1ce1f8998884af43fa5776a59ae38c88631a066fa85d24dfc9b2547caae598cd0fa7":"ed000ad2e479513861014e8ff45a481a494af312d2dd5563":"feb295c74975f1e1c738988fc70b9d2603c7da93832154a1":"764705681b7781573af811fa7751dbc27d667af7a1e59dce":"ba4a0583d8d6c5b4216a0875cfad594485858dc7f9ef265d4ed0c0f0fbfcaaf5ae318df2d7fc530301813d9f49826030625f7ea02d0630b3573c486b1fa0ef4269cbfb6fb86675c11fb7c0570cf7ff4fc7affdb00625ac453c23c229a4ea5f540c66f031ab3462f7d12659eec990501f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"9969e54b4703ff31785b879a7e5c0eae0d3e309559e9fe96b0676d49d591ea4d07d20d46d064757d3023cac2376127abc60f2999100f738c10f74792676a3fc4a262d13721798046e29a295181569f54c11d4524c9071bd3096015fcf7bc24a607f22fa065c937658a2a77a8699089f4":"":"":"":"abc015856094803a938dffd20da94843870ef935b82cfec17706b8f551b8385044235dd44b599f94b39be78dd476e0cf11309c995a7334e0a78b37bc9586235086fa3b637ba91cf8fb65efa22a589c137531aa7b2d4e2607aac27292b01c698e6e01ae679eb87c01a89c7422d4372d6d754ababb4bf896fcb1cd09d692d0283f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"371d2d3a50d8fef465b02d57f0f102e820c624b0e11703bb81badf8b0ca1841594b0bd16c1fc0e5e1235dfd414081164c54ffd056c9cdf688284f615cfb4814cf28ac6dac05756e07e6bc9f56033666ae35819ae359d53aad14adc9199ea154e45ee2b064955a8f334b9f62cea23d0b0":"":"":"":"b474ddc66e4cac2fdba195cb9c5ee521f4a3ebc24e3722df281774b7c9acfa87bd5b85c1e4e559e2859f2382ecc3a820d76cacdf10ad559691b7059b4e7f3d9a4453ffa241627a3a258b3439ab7f592e95751c826b6f89c92d1f85fc855d231045c405941b9a8b5101f76e6afed9c2032712eb5c60c16a7ecfc26ba0d47adf04" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"60e5cc3b260a0fdb9e994bb7c7b7fc32ef0117813a33b4f6af13ed81a61edc3c7209beb9336855fe207fcfb77356894b4fba0b7c3a93cf6cdfdafdb4b56cf0938f2cc18ed54a02a3551247ee10e606b0aaa8d30cbe0bdd3781a1b238e19cbd86a2dbdcaa9f94c3d39f9deb8c4a6801e7":"":"":"":"628ad20bad88e5b0ee30107640248a81f7c1ef77f757a40e53927d3b10adc5b734d379d71a28b3fbc0787d6054cfa926a5a74b464b818f8d185430773e7ab055f9647eec01a71dcf680abf7589329e1248ad9df205d10ceccd1bdfe4c9b3f6d7b804c5114c1406db83c921c828df36f5755e989520274669f7f06f5550c97d4f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"5b9320748b1c4c44624b26504e9e9765a136f965c5a8d787585391782c7432e33e5d97a4c05394d570402b908f54b80cafe9be7eba6c4c4424ff53adca50b522a0ec1b51efea35bf474fc6a0d6aa67d44582c01f287f8a8a9caeb571e26f86100990e5633139b56f4c733cd5ad08c4df":"":"":"":"70883300ef578f796d8f85a30cd8b9e4e2c29f84b7b127836450571408c92b5a1b5bb040f83bced508f26d7066ee0b6e6364eeb1c639a5292050f755fc78e828c08054b14e3a9993c2685791e2eb1dbf258cb762ecde1aa2ed41fc004ac989e0fc26e245ec87a96004c5b28c45d8d9e0829bdb696137f9c944f538c28be34b05" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"35a17d1251628f82da8b4b35b979783f50e76b2cd77e03ab2f64d29d26b22d82a7b89cc8ba85c70e10d42adc80da014a11cbac5342d46634dcbb33baea277a67afec23b3f50875e4b965b3565de66e36025e0db252b1b31e45683a9676b55f462abbf6887fcd770599b123f109e5c9fd":"":"":"":"86e2bb0f5ddd938978692ef93d19d34865a04484cf82aaacf4546378e2198a2d8050ddf53ab618fb98f9bc59a614e3d60be06a54eccc7e3e54bce7afaf979a6ff4d7fa19a9d7669656fa21fbefa9a70b134c01844c0b85a86b9f98a14255158ae8f5822ee506f88e81f09760810b19f4129d6b47a10d8837d633671558ec3771" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"3d6c40cceeaca0633c2dc71b7135be9d64d07aa80e6f3a86f43775855f14d3a4f5b702ec622e0c84eb3fd4662ae150ec364d343fd8068b87a8b29e9da7f181b91aa002639980da5489720068816df144ce1c01ea38915b6207374cae626f7199a42d47c9232094d16a04c368f0c11d30":"":"":"":"75eb7a740b6284358f1b2f7c8c1875c027eeb05e0350179f7bfdba23dc823285cbc33cfa6ca22c8e70bba00e903d3f71ca66a1d7081f742574613c2e8854a0d0e59cbac17356b1abb65b533bf563d8169700e196d7d1e25be8e4ed4502298b21dba8ef822c565443c46a8ec08bf3cbe11ac51eb765e53d2b035a8afa29ed1147" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"6174ea125101e34850e11dcbb0e48dfed7834efd45dc9d196a42e9bbebc9f00853467570badf39ac3366084682491479ec5e80af6d5e73e0cea43d1ce15c277ccf5bee254c2d4e57623a17653d48bd82d801b0cab2df27f804e23e4dc1dae0b7eb6160264c8ca4712d775970a8756a0e":"":"":"":"a9d269c3771e1fd3cf2a5f4470c7e6560c4db008cce0f4c0d1ed939157567cbfcc2353c19e5c1b535c02d5601b45ea2a1d8045b42df6508b7389fdf350c107dae05da4e6e1c078a26aec3d0ee5225a680c15c563e3727d352bc257d3a4defda48e6dfdd5c7001439cc587ff033c5afd3b1fb7c618b2113736a362058adf12968" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"6a7df1ea8b6d92fb4f1b66b6014c97466a9b9edfc68de647a8a4c36dcb0f4d776bb353bbd5c18ddc5aa274ff29abecc946eeae7eb7e931673c1ba88ec99d3105059dd1f9a7ba8145e0bc86459e525028dce62564a7bbb5479320d75cafe40b4c7a0daaa2bed5a48a0eaeaaa8d6c76d1b":"":"":"":"32e66872ffbc6d93da7f923f82574e3273c81a289257246d3e69b94365115e2b91ddcb077034914f0bf3b5871b62ab773decd00121c87439ad5318adeac31ac024b46e7b49cee5fe0f1dae93a4b93d4245c016ae6a7ba7e9e9857a38b4c220c3a30903eabaa3210d93a08f703626ead078d59b28a42d76081e9b67d7ab68b366" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"0a9056319735191d4eab3b70f533e59b0a5a70aeeb5c00cdeaa5dd26ba7af09f2e259bd4e04cc9f5ba8b5c8dedf7b155a1ad8112d6b1daead36cdd337266fab65c85824f878219e611d48c4f73ac7c0b96e40762c87d1a78e63e3b266f5fd7b9ce86252b9bf46b0855238602c098204e":"":"":"":"0ea1662f0b95b6c1cbeb82f7b7523eba3f569544b0841f78b1c05809fdffb776eaa6d1c77a8b60ddc680c18eaf9096013d2f4bbd41617e3c482d29aca8d84822c07b55825e46a26abe7c39fe17d2228e399cb88e36e435438ca919b37a0f868fb5243afdc2cccea3b06fd313aba67dc688203878d2be0f4f8864d831622b6f4d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"9ee3fca776f4e7336f5336e426d8208848c854c7b0b271d6ec84dd3e86a86fab42c0825cf2be769f7e31924b34a3a760c94d0db714b2a09ccbe26b2acc8071f083332c3ef50802b2aee1eef195b74e9eba52fa49901d67585a766a9465d3db843d3f0a4a3a9d535dd976dd98aedd9df8":"":"":"":"1c1151e976bdb947bdf7bed108c742428aab2e6f5ac7cbcca6fcf2459d2410bf6ad89636b02337a453a21bf1aa72f393deadc925f9a4dc7ff978ba837c58ea30267cfe61dbca4a366b9ab9904ca6223f76d2d33d8d3deb959c6c57baba368e9e67f2d9d4d3758d072df868d2aebebedfca3bfcc018cdb19ba37b593a0ae80c6e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"1006e3b161fdd1f30442346fc91b3371a29531bc9964f84d3fefd0ea3a340efc06096974bbd600cb644db66b738ffcec05696a981e50c7f6864a8279e83985ddd42a9c74affdfdc8452ac25575def3af3250da95f0182331dcc7d2d50ff71dcde00f92b6874ee902e613779de0789dde":"":"":"":"3bee9fe6d08899fc7eb6e1f0978c68f5dc9dcc76fbfaea7a652d0ad22632396d6e065fef14aafac7d3afb066ea743f0cfba804cc9686405ac966ba7a291f5dbd54dde5d6a330383b2355319e3ef4056b856386cf8378a5e11d9d36b0207e2cd414f9ade2af057c53c8c31e72fe765f0582da5a685eb42a0fd969dbde2642c4f5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"83d0546d20fe18184c5ee79bea6f5818881d158dcc7780c0350baad7662d3b0578bfe5590b9923c3500ccf96a797d9fb246f31e6b2454c6a443233ce0264fcc0ffd41f0a3bdccdd9417d1614aee596880571ea5f2e62fd6c6e555613024262a26a169f17380a19f2e5020ad3359e4842":"":"":"":"0e453a3e0a4d58f418018f09c1b7ee5e3df81d309e54b77567b180437c258b870069c0257bb8db332e9d790ed325633260967e898e7933d38832fe7a677c9484992918421c75d7072b9c04162b202872200e28db3c03d157c8adb077c4c8a661c534ff5c1bdcce80ef047eb197b0bf3939daa8be31d6156e9d573cca4b11008d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"fb09b02011b54f9fa2a30783141a520e11fe3e2dd55b25799c19be9fa7bf3c20e8fbb8fe9e43014516d25c6930865c2727827cc01406aaa1827bf2d9272ebe18a44ca74d63b3b78fd67e61d5d96db509a77c857ae04e06bdcebb7aa491d1b9a99a0ecb8c7dc3d7bc69775721b75289aa":"":"":"":"ef8783f00156c497796d787c018c9c01cfef9357cff2ba8f047109a0d17f719ac46952a7147e7fe8d60fdebe2c744e50522e09aa0d18de258459840ae320d48cb71ba11432169ddcdd15ce081f3ee9719cae4ba601bda1cbbaf9ebe82559b69107111c96e468d23e0268e53c9430cebe7cb02b547d6913b76e4c1643b2a2045a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"07de9e5e57368e7833177066c804575d984bbf9ca4bf03ea3118dce063027b2a1da1e930b356722ea0c0f02e09db6e92f407fd606fbddbcb3e574f0ef548c12b97460e2079a004c1b5f4612ced9f5034d8ed92d5e98eb176db2eba898915f31af7cd0763e7da1e64ba132a08deb82864":"":"":"":"e780aa6744f592da3fef690e78fe8c4fd40c364cf5f1a8be34f23f7324ab387b09aa3b5c126bbb5fb25fdd26d4e536f2eaca8f0ea8c93ac863c1c5d80314480fd9e2382ee1d9b17828b7f3716ee669b9f369655091f0ee23163996c7c815c3f5e705c9e48c25fec05a485eb39f3814065283dd1d0c37cdb7713acf24e3484afa" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"5957069eb143c1526826c15358e0e949096108fc6e09537cf3d6426e155b4178bff8a8b7c57c3cbf8f9c78b52d76509c1ec089e083b29c0adbd7d703b3e0beeb2118a052548fb1e30455b080c111cbda6b4930e8fb7daf431060778445bad7d9c3f78dbf811e6c9c58493844d90e73c7":"":"":"":"2f5b7e172c5e291f68d9f59f0d14ec516e7e80c2eee36d1aa0734e3f819a976c74a565ad03334fbf1c60dacb1a6d150ce1316b5c256ca85c80fcee6ce0c7004a0a0ca8be5dce19a3b68f92f3f6b7f8e9c4a3177b93529b32b78a2d0ca18b27fe80b42546d1211587acee2bd5a63f3ae66b5e5d66a52154b52bea2b71cb05b9ec" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"2cad88b2b6a06e703de46185ccb2ddcf5e0ee030995ebdf95cc4fbc38441f17f32310770e04172c0cf91f6590cce44a4448bfbc5ce9e3b9da3e9642daecd994dfe373e75253e8eb585141224eca7ad7bafb57f69799c0b892b3015990e133698d543aa87829ace868e4a5e9525d62357":"":"ef6da5e6530e0d621749ab192e06327e995c3ac0c3963ab8c8cd2df2839ab5df":"44278b31ed853f0a510bd14650ac4b4971d8b426799a43511d016be68dedbb8d":"4c7dfbe509dc5a3ac26998723c6a44cad20b197fc86117c778d1568ab828923862885e97198f77a1cb45113f5d78726a0f120aec94afc45f57c8dcc1cb092b343480012858ef5bc559f57023442209326ec4a54d91ca3a77dfdf9e75f117cef50e6fd2dc9af6ddce8e6515b4a97357a97b6cd274f68a042fa41bbd7b7261b034" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"b91fe9efdd9b7d20b6ece02fdb7624ce41c83a4a127f3e2fae0599eab506710d0c4cb40526c6bdf57f2a3df2b5497bdaef67509ca77ddfb72d8101a462816a695bb33745a7348e2646d926a219d4944397755353bab4a6b291607179d16b4a249a3466cc33ab0798517872b279fd2cff":"":"17c156cbcc50d6037d4576a37576c14a661b2edfb02e7d566d993bc658da03f6":"7c7b4a4b325e6f6734f5214cf996f9bf1c8c81d39b606a44c603a2fb132019b7":"9cdc638a192322660cc5b9d7fb2ab031e38a36a85aa814da1ea9ccfeb82644839ff6ffaac898b830353b3d36d249d440620a65107655efc0959ca7da3fcfb77bc6e12852fc0ce2370d83a7514b31473ce13cae7001c8a3d3c2ac779cd168779b58273ba50fc27a8b046562d5e8d6fe2aafd3d3febd18fbcdcd66b5016966a03c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"a46367f0ca034a86604003faed2ba524b6c0bba8418fb158ba13a8f730d91ec49b3a7e35c619f0e1abda6d140b08af85e3cfe402b62a2e893fe0244e88b9a489a1035d287947139af7873e5f7d0485e87238bb11d4f631090c34365222eb95baf7b865be5f6410ea0aa0484e3de55483":"":"aa020a1aa92f8a426c5d0d44191c6b46f68c1abbd5dcbcff0df2c8e024a3288c":"38965ad5f163f663b3d90d4f5b67ed2f4db22c90e5878bddcd4f230dc77f4b0a":"6c7edf375281b751383211a3e09e46c61a9c425fe326041063f0f03e1cfc01e8a830f9c4bf77377c4a9946c61a8b7cc664b22973c556437c9f5557b1a1222c45789eb700e1184d5d6e52f597ba5b1deae3dd3cb2d8325ed5b3929946e3fcf9e4f199115eafba9abc87558fcecc63723cd8cdc8dfba48a3c64e8a70995b0c7ece" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"08b9db82f179055872383f58203aab4b9b701c6d7a1cd428bc1860cc70e4111dd5cff962725b20d8121fb4f484a846c8fcae938683cc1602b692ad88b2edb5ec1c8dd408f4c10ee77a460bbc40c8e365d5b0bab8b6c8fb3d6ae8f65dc91750600592d1f0f9ff661d39436329263b9213":"":"88ebaa296598dd71d22ad5cdbd16603e1982d3b00391e0e83862d765148173da":"4fe9752a5a88ec1eba5e7d85b193910f1717d166ed16e12676cf9dd417d96f2b":"b4b02be55fad8dae22716f95038cce34f654c3dceac59a39ee85c55c6a10864e19dfa5710231138efdfcfa73652e99fa3febde8b06ad06af23ded42d78bd7e05ffed6b403df2320de419a08065dd254e5c676c16aec3b82774f014811cb6f32f96bb240bca91fb9f05b57c776d4474d309cb08a730c269627b63858821657e8b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"76b0ba5992daab1aa40ebe377ca2e0f6407eb1729961151d216a9989b49733c2f7892eeee64338d8ff151db27b20e66684015bb1b433a01fd7570e2434bf39d924d19096199e367dcda87af7ac8b9f2a064e8a7bc291a904fc5a40cffb306020d718de11d3cdc5442724f4538d835f76":"":"f8b63da99a35cd63334c7f0f101a80b101990f7646d31eb58bd4cac251f434c2":"46a417f4938d88406d3ac65dffffff7e3c410b0999e9c6dc7787ac46a0b1be77":"d557b0064c6d8feadb23f9752cdaf5e443a295ba97e5fe3db8bdc3a502b12394951e69497638a758e7315323c4d9443ec8f144f9dff421b0feab8d541fdc3b5993dae6db4a732d573d27f4383f825783b8d0b93951719b95ddef703f36c1d95034b4c0b12615aed9314067c35a55a091fdbc3a459a22a75b6d1616e79d551b2a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"e82960489c01468263e8fe59ac341af1cedc5595ef1677c00190f87f10679295b0d64271e860e5e1bc2b7c24c2127c9457ab6db2495d422d24f3560a909513626cc0e0e8d74171ca51d3d1d31777fcd1b771f5b186516d45a270a7c5c96f098c5051cd79ffb04c7981cda36a68eef347":"":"9d544530ee12e9cb06172d79ae291932e17b240f9cd92698b6a2ec061fc132cf":"dd1ad16a1f9decc0cb875ce35c7ad1a3105818679a12b22149b5a7dd0a1b7d87":"9a08d941e9a1bfd9c3e059dd06caf008c636ca08bb2e136d0bdf162c433218045224bfd8d75b8241025f93c4a8203c6ea1fce63c37bb20444c5d4a68b13ee663b262c685630d2a6c40ec224027d75bfd3dc73e1d538400789f2221ffe0ff1bff8f514c0229e684422d77b2b0298c0ba8a2ab02610e880232bf516f8ab507c461" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"a1982c8ea6aa75e5c0486bb26ab8c9dcf3d13034372207bcf103adca982bd902b1388afd3745a00be19abbdeb12225db35ab41471d93c02aaa2414354626246b3ea3d932dd522e5ff0fa81c9bb7bb1f372d851b57043789abc1837d33d52779b638aa2bd1693caa52ec7b0824adb8470":"":"2d0113c4f225e47b5910cbda7d27d98fe2bcc23d7bc293da1028e20848804353":"f6d92fe0603e2548fc13a560f4b1009a2cf63ff91c74b17cb4f256611173ef17":"d26b469920ec26d6891d5243d3c131f129832695a130386511f02a66e92d538bd165d9bcb70ba5e8df479576b4342a27f3ce113584e0262f8eec814f0c97d48988c39ba548e4da78601103abf9c6a47ff3705fcfb7d1a150535d4af2fa219509e94bd8e74f3a90fd0ffa63159b4b62eb533193f9df3c86864f9b5f05249175a1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"feecfb3ecb1b1322b34d90f25fffa2ff0c2af010a942a0467c04e9338832c3c0e5c5876ddf0e3dbdc2d63416fd77daf6170d67fd6b7ff621b1e844914711817ece93e5edf428a6e6325193d42bd676598ef4672cf1e4de4b54df68d0fa8d268868813162fa712d294491d338b65f27f8":"":"d1e3da59674d0ce33cc3e6e56292ef47fc1b3f495871f5a74a8c3f61edeb593e":"74d491697d72689a19c58982621e68a336ba9f7143c199dacc3f37508ef5f3a7":"78de8963019611fde15ee0c8c7b8a35c16a5ea1e86fdb435c422184cf0f7bbce3d6dd7aae11b6397ca213c0aca63188d3982c2451401845d02fa0822ad2f9190022f6c099d137c5a44d9d74a77c75bba2350f1269b6bf90507736d8576b53dfa14ccf7c685ea0acc8484d6a5d310b15bf3941666178414aae3d76d6d5f4aea9a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"1d6bdef15811731f6e30d66c79104224c5ed9d455bf9fa2d3442e8d61395d53ca6e3d5b3862fd0d0b2ecf3577e2ddd124f7e33bf11a7ecebcd2b26a117c3805bc93b98ee0e70b8ed51b929cf76f2fa72b433757da47b1ec92c11fd91921b171ff51a41a996866e8c287ea130f06cd95f":"":"f25347f88fb41d65602b99a370be7c8ce1dd6a29a0a7401b4a3279b3e563cf4b":"4e5c80bd7ffc931fb57632935faff2f28c4f75336fd28f14f7fc27a12c7cb41b":"54a280962af1a839b470b42456a4381eb8cc26f16303bb97b6f709f91a914ed72a8b85d16ad4d26a900c8fec4148cc42f9416dd19f31fd1afd527f5fb266b6aff100f890b57c8a3f9228462d4dd92dbd5af2f9daf05e5ee2843e56f0e180eba8a2cabab36f739a7fd3c04228ec007ef43ebbc25841b7373f2c06fdfbc66f8322" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"294c6459958425d309d4df6617410f34e96efbc1e609178f4105071171d271cbb698b79c7f83851ab0a4e29a756b058584cd5d446a25f77749e4154628c3d6963c369585a7768baeca0fe21cc40b00a87144cbdaeba812bb1dd8a18e4d7e50e810885ac520e44c398d1b3c41fcaf6c36":"":"0e433b8a3920ebe0053e388d0f2588123c6ce644280dba77632bea8de1b6fd9d":"411a39921ad892db7d38f51c51148296cbf510a59fcf4fd2785c2acf310fae6f":"04c64a3c4ef8cd3aa322596cfe08e34b435bb55943c6ba7abf72b549d4a057e3bfeb53fa4e2adbee63c88684bbd5b84c4c1358c9c0ff0ffeb1c8fc972c4e79641c9a4ea0901d9c85fb9ac5eeb5d5dbdd324649c0db542e0946d96cec8a990147be80f46685cf8278b8cf89c9255baa566740c4fd12e6bc163be6e52ab7799c2a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"1940c31637da2a1a4a3ad66826e074a0d5ce69dde50b75a55b5e09daf23c097bb31a4e9d363f3c716cd9e899cd98bbdaf67e6f909077c7051b067d9f2a6ecace36e5053b2e6329ffd364e589403a0be1af2b27d258c90e1cb2d8261bcc7bd5f910f15851a87442cafe87aa42031befd5":"":"0e21b2eae0d946c1da14153d9a3945894f43ae5331ab95a07a727b05bffe9f35":"69646ac749185da00638654c813d45e0dcc842202845cbb0a8158b2609733146":"f5dc9a88bcb19f74101fb46304bfd66fe0e245357b656e751a9ed535bed3a5b47f4f84c01068763a3fead22c29d7def5d18e32453f806424177082d1d65dbe3ee5d9765fd5364a1cf55dc64ee9f3f313697c2625327373298807a60bb4536c3040e76c9995cfc6eef225a122c98849980d40ea0f86a122756d4390096b4d8fac" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"83a44c38f699a883a91ecbbd9db952a62b65cbf75e72a1a2497810a73ea743c4d15ffcba06cd7a3338b3294afb50462b1eb4df21dbe7107a8b4c6a41b41977f38c33b1ada829517d0902a3bc0836bf899c257234f7f63219acdcdcdfa510d284e7380348296eaab4074ccfa9037e6b68":"":"3f6f8f77f3051c945afad9969af764fcf4ba5b567c0a096bec36f712f0405539":"210ab7859b1354f53e143e8b06afe84b12fc1b16aa4e3e818dc56292656eb3f3":"adc004394a5bf98be1ac40123ab1e430bf93046df87d20b04c235d16543c9a2b80f99f841a946e91a4c6f10149f7a703967de651e3af208d600ebc2c6e2c1fbc895760de537a4da2870e128fb10d8fa1f06870d758b9804c49c2ab81f90118042f78a89809b92c2abce87b230587739acbffd082aaba422c88e7ce199691dd87" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"7a45d07a2bec078c06031b79e94ba6b34ea1522504f62df3c7543d6a902a352faea5251586a8bdc562aebfd9f7175a025406525dab022350d8452cf3e187e30cb54320fe9f13a351e003727278fdd12c2ac1bf56556317ad5bffb3c2f89069c7c742be442f64972304a3a97ad40481cb":"":"16384f8c9eb749fb49fed4a667339f2284634a5f791369739d0401a84d435373":"1b81f0d21a3da462ec2f81d0bfda1fc0143673b80bc7ecdbe524ceba9ae96ddf":"a34623e01a14b87c400f681a6fb4ae66b97afbfe040758b99dc807fbac73d22a5cadad262f23ea5d27f726993c8220921125cc78d17a990145bf6845c7719bcbdd195348c40da96fcd60a54cee25af89c3b1312d88635223ea8c27564e918289fd0120b437c42d99a35f198de3e9c092c493a971c8ace8c48ab625a5a92d6fd0" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"646d1c1e7c363c4cbae7e6a4f606c95812a7e0f2fb86e33f178f5b502c6457d3b57644b3bc1ab6ceb09589870c7d54ca19fe763b481308a64667913cfe25103fe738fc0a800920f0afec70ef86cb8a0ea2d9dfd3895cbf921c87e64905f81ef61dc231b6cd7a0135003726451cab95f2":"":"78566b2ffd3252772e3bba71f3445497a2150afd48bc130251baeb4332da8a27":"888b33c6abdcd475586e00eef185a69726eb9b024be447e9298b953fd8021906":"e659d60d17da14043cb919709bbb5b3cc5a203517353c8badc0634ef2f2ea2dab6fb2b327e296ed6341dc4bf431c0c14ec041de50395d25a4a4cd64a6420153a50af886f48a2973523a4ec5baff43526556959a37f3b2452d5753f4d2a3c050b2e8f9f6ac2577959f346ab37404d029ca51a789a5521ee660845f913d2452033" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 0, 256) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"bde2de2b8d3c4b5c4af2998d70da9a21340b98c7630d687d685a71eafccec446e0194d245d2811a54ef522dcfd96abca2ecea6d7892dddaa4dcacf7e5ef3fb345c33b23a3de687ab578aac8e6757547a1b3c127a633e58903e8367a805840020d2ce3f6f0372991d7c7f234c3b31118b":"":"d903a2271f1ce24f20222120f8fee3b8709ce4fc7ba85b77d6ff049e81d7a37f":"03bffe38ef883397cfe53edf6c79e68493b7a637d1ceeed9d569ac6195b8e4db":"cc317f81c3a6cab42933d1733cfc4504dc0b232dc00502d29b8e6fe78ae11d1d1ae4a1c5c6a7f99543a844ec5413b6dc3c22e3bf0cbf12e7b57a48018c75f6ab25fe78b786d2d035de7adaa3a3b7cf1ca564f342fff4f9e6b3c9d2af384cb70f5abcd28c99a5d10f176dd2f702575bfb81a984db2507434b4a3c8c286e3dfc68" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"f7b90c797a4a376cdd9f5c435f5985e77f36ec1df1145a12072cbb2a0da378fcd95202986d45896e9f4a65f2f353fa35130ab64f41a5d49d6a241e0260b4bb8a46a16c6ac9e234c84b5b26cdb518d459f7670e817ac061ac60439be60982492000dc5da8bc6636bdac8b1cab03198dfd":"61535c5c045e784267fd0d85f2861778fa53c8e8586af67cf5c9f21a28ebb656":"":"":"8df4e349f9ea43cc509ecb2b1124358cda2de1f5cc9315edca63610a413478d68b8bb49c2814c82ce571f6e0a6780fa21c4b570610ee0c04d3edb92124f580f962d741330200c19885ca716502223247b728d66fbbeb7c6cc25cfe9866b1450b346227c7663074c8b15d189f1c6edba172a53c733d67c1c69bd7aca7e62013cd" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"135496fc1b7d28f318c9a789b6b3c872ac00d459362505afa5db96cb3c584687a5aabf203bfe230ed1c7410f3fc9b367e2bdb7480806f3e1933cac79a72b11dae32ee191a50219572028adf260d7cd458bd469fcff599595c651de71685ffcf94aabec5acbbed3661ffa74d3aca67460":"64b6fc60bc6176236d3f4a0fe1b4d5209e70dd03536dbfcecd5680bcb815c8aa":"":"":"1f9eafe4d246b747414c659901e93bbb830c0ab0c13ae2b3314eeb9373ee0b26c263a5754599d45c9fa1d445876b206140ea78a532df9e6617afb1889e2e23ddc1da139788a5b65e90144eef13ab5cd92c979e7cd7f8ceea81f5cd71154944ce83b605fb7d30b5572c314ffcfe80b6c0130c5b9b2e8f3dfcc2a30c111b805ff3" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"d78eab5329fe38a26ce2e54efcf8f0c15cd7462a5878537a1e3615d098b186974f48003172c7204fe6dd77c89fa92fbad4e81412c8d167bde3857b9e045bcb5c666d64aa990a7d92e46ca533b93de544238b79b6a9551ea7dc52bfa1557fd973bf6e594ad4bc0e63b651d5955da37f6a":"e934bec18cf8e9b9293029d9ed60ecde1d46621439c322203f7c22c6b2d77544":"":"":"285df697361c284753c94865081c3c25ffcbc77709fc51f37a09624bba67149156a087efa92ae709eff1bd50bed464f4f31c4b66c1cdb71a506779b50645c165a099718d599fc9a166f345abaf8b0b2f9e700c253a454cea49262a334d79a01c208caad5073644b257b2b1577dd973862c6fc7fcc3320e24e1e31063fe6e94ba" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"fad6a0fcddeefb263c27432ecc6470e44f26aeff2840e8db682ca14ab45c31cc89402a698ffd36ca8ffce986568f728afc08bc0077c95ce4cf08bccf50cdafc19004abc3c5ced1cc3e7ce2cfc938c1600a93fd50fef1245e7b9cae2834e7104335f8aeac080d4a4fd3e0c0ef0d67b690":"352270c867c34b3fb297cb2e5d3a807b087c720026576aa44fad577ec82015a9":"":"":"3622977f8aa0a0ca5f8e1235d03b76f92b2f26eb172b88323558e8f3c756c539ce1061de127247ca7553402c3d5c9439b4c9afbb4c419867baee06eafd856af9847a69247ddf6640a09a360c93577bfc353cdec7312e549bc7873f77796e062ad058ec7f3e52dd1ddafb4bb1186b05b5360200e6ea784be27b8f205de80ba145" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"be90a07ae616574d36f8366d39d6bf1408626466d40982d97380e44331f9e1885a27cab08c6a8595894de22a909dc2479cf15973a0f0b71c0ba911951f9b444050825a976c391e621c58fd4b59a7a22a7dd66d8f59a60c0010fa8aaacce99bc2aa1f365653dc0cd57b489edc2349177b":"99b88ac1958d5d62aa39eca8b8f8e598a55c08b49e895737d74b8792ca343a36":"":"":"ee76c5a6b6b4eaf9ce8dc4ac0ee91cad143f0369a2bfdf40b70fcf14e3eb28855e3c59a01ddee684bf9ce4152be5c70d290b8b780784eadb44854b03cd0a32d0aa8b8f0db1bd47502d2aa61a54e3de7fd7bdb5c74c715ae2aadfe328b4d1128bb19ce7d8166c4c1719c98b6bfeb1ce313054d8f1b6a4c5af842cf3cbea17c710" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"31c7b8f0aafa70b4b670f056e24bf141f0bd6683453d17e9b09add3d231cee1cafe818dfd7d7343f8eb1b4100d80c4d9c8e7e4d5afcd3ab82964f121847d4466471df38b849c59630900171580948f53c41425045dc4db04935aa5264891af031b08cd48670b2b1720692cc6bed3e7b1":"769f2b3e30408856f46fc3a3fcfe05295d876415555906ecf853d59badd48eef":"":"":"9b3dc767e1bd9dd67003ec99c334b94dd97c48cccbdbfb2eed4dd5bde96b1e0ea4c24cb0edadcc5386f7bec54ac5ef149374f6225aa7e78466c34b1ea0b286499e4e2a294381e6e065abeab67553c4a2cd0fbda19c59415fee5cc1249692768aebc80ec35c8331f68f1b7245602b3ebff1eaca2fed5898213fbec09acdb60cd1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"3848bad2b0631411f9168bf818a2c3cac10b6d83a82d58011367688c8d30d3fa77fe460dd459c7da7d69a3ba5576b2bc8dc15a0de18f52f79b9120b03a5bd9bb4b45547b94b301cf3ce2442ae5083c5c08b455e06fc3f80be972e2868ea019376fdf04721478289440491744df5cc1f0":"e5a3ebc7d533c214f4cd66d37f1dd4ff718891daef55959915938a177dd97088":"":"":"959bf36092622923e96ef5c038ca318048f9447003626a9f5f0c5082f65daf5c5ebdc7328e090fd68ee5d3c161506b86590e2229a479de7bbc3920852647db2a35272c305e9a309c04da1b8e58ee185183681cca89f1b9534c0e15c188f69cbed87326a83caffcabb800e2672691b7642700659ebccff375f284eae1729edcc9" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"dcd74d5dda3adffcbb54be0e7c48682174b1b460622b52ad4f32bdb2b164032bc32776da1ad3913626d9e61f5b9f9877c8bdbc62d984753560f2c292ec0ece8cf0e369b64e14ecb910997b7fd81a8eec62e9ef78b1d0de6642d8404cc4cb7bd544fc5a3b3588a16c4e342dc5003d6608":"e7aa07cf4a3f90167b486c1c4ffdd5ae45aa59200e4a94caded0b85aaae8fef2":"":"":"f931b0dae43703f7ec20bb6c5667191380e7e263efbf30bf4bd4cf6e3cd5976095eb48ddcfe9f72c299dc05ab2d8846e2259600fe3723744f4ee19c75835c07bfb207e70ceaafa355bb6c6b0a4236d0e0830759cc6673af2b4dee9a3efe496e7020556b4f8ed0c08cbd4cac61831bab2f5a81a8121b240a9c6d374172e5a87e1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"b72d5604401b15477b659a373caae53a8fe983e2199187546756e039e72efb7f2ad472ee90447f616b7ad5bb1dc692fd1b9e1000ee6c8ba65f39a837f27a4e5cde8cbdea58ecf1145d53c219369fa86402ac05e3fe3d52fd54343179f237ae2055277d76d9276bbf83f97901232ba6c4":"c9038b0d468153e8529089c3db418fbbe42afae5613a8eea7c8e3c2a307c4159":"":"":"9c2a9dc2504e2d943d85e1c068f7e578350dfed661cb5d82cd26ce22d083f6e158a39161f303370ee844b4f75723ffb45131223bee8efc32726bbdbb9ba2a0d8177e90e4e1c8f1d3a22e9a9eaef8b7ca4cbaf142aa1da1886d2ef9c1dc3692bb15784cfc906e12b484609403515550cc44e3b0edd42ae9c3f267ae9dd737ef28" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"c5f5e519283f7d3216f2ed7765ae2c0dd1e22596d7762c1f0707ac99ad3f6ba6b920e6d0ec15852186b77c3e9318904b252aa0e2dafc2901a5177449032a7727e523d33d6f4b5f350545e5bf21a2ab6cea23f43c73c2cc0982541c298e05e4b2dcc6fc5d1d507232d735b01ed2536317":"9835ac84c8f8cc00464ce75891074e20f050b162f73c9e91435aad5929b473c0":"":"":"85a747731638e09ec0254e7aa38e08439457e6504de94d00405d417326f3ad47f156b5e211204a83634369beffc128f3614e89e2e288d2de11f7b90bcc2b8d29f149e13a3cbc8d711d24765f480bd6596c8ef605cd72fa64ed8ab1f9a18b2d0b81c0de08a167d537b3d1c51c2a0c9ea9124c6e41613b383f13f1d20e1eaf2288" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"fb912fcad27bbb2538164f75a79a3d7651c42aba547dad64037b492a87e301809e154f0b8b099a2f584643e4e40ab34fa1466679fd0a8a1f82772ae0c8e9de2a461d820cf37b2e9bd77a609dc367b449ebaecfd0aff59cabaf224d5610069c888762f92a16553d82c917553a9e723177":"e3c8eab35fbf90cad2a69cc74a68ac0bd0fc51585231fb9c3eecb49a064043bc":"":"":"09b4a47519d4acfda506d64c0b5536fb9e72cb1b6b408da82b4b80ff794f45beb2070b05de67759b8317f40e798bf37d392cb59cbbfecc3056259c9426415df526bf3cb62f4636542689537629c0e91a9bec2a600ede3dcae82079ceaa3522524fc002e82c280724c4179e00dfdd374effa05a71fc856ceb21542be0bdb62bf7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"ead7fa32dafaec063474693e98230bfdd61ed5ee88c7a93718fdf17db771673f2c3d12d63a08b9acc2ef21531412dcdac37c5828d4ab26c1e365c043aad21c52ef9c144305e917dee8a15dd6cd751c2c45a2d6e146935458fd2ceba68b49b74bceca4329ac5d30c7a67f614d3b93a6fd":"fd3da5bb01ea75d7e32c023eec230f3bacbc163768c1c24216028e82660e1bf2":"":"":"8fc78a425f9e846ec2c757e98f0e1f67085bde0184f9ba9e8697811f6c50928de7ec9767a4fbec8bb099f534cabae4bcde69f2632fe4d1c582cb918e3370cabb2153a1d168fce23fafde95660e6987d2e8fcefbdfeb21398a5074ee76f7315cd7c517d3a4df8af26f1857b0d3e5704b7a3e5c15adc5f3c6745c063d45a2bf1ef" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"5d79c6ccee050b3c2ed52edcc16fc26ea7b6f3fd2b9199fd65c7dc2345d6566e9a0c6e01710e4c71b2820f7aa9203da23515eab85a5812c66756634804e3f5817d32f51dab3ae00443c694c59b72d526f840a166e566b7f633c7d246192ef82419e3cd733a02684d6a4ca091178ccc76":"ee4c3cfa5c79b1ff1dec4b9f9ff4ea45c916e46889130cffd7f137e6579af52d":"":"":"4f53f72462d7e9247e7ad113827d3ea741c35690fa0be027b86660e937c119e7237bbc674e826f42dd6dfa5f54d90542ed2bad21683af4b1f8741ecb75b464345111cc3d383c8b7d088718a353c2d4af93ff59057745a808203d08eba2452a1a9ade75cadd0f49fcd27ac3c024c04c0936c0237fc29dcd061b62fbb73adaa8ea" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"35f9c3b0e5947a74d90609e6ab660b4b46177a12886cc77a19aa9eaee86500a9eaec5de5672c5ee56771d778f5aa963713ffd39fae8e05ec90843505d5832ec8d999f271812d41db4f223a5d8467944f08083a81c29d9a559a960f8349fb0174a8dbcfa171be39a8c36bcb7743c5c5b9":"b4b5fafff369997074a82e064298859ad2775eb5c5979f81d2118da96e840930":"":"":"87afd3147e61c49d2029b88482eacdace56f27ccda2927799a7dd01ff63d6873804e7b5635645ff3f65b00e1bd65254933e7e57b56177db81548fbac37305d3dcb70a5f76a222999d6ba9c73670ae931b49ccc97b4f25203ee95cd68fa79e2824e2ead8bd4755a5bb4658e02788b9ced166ea9ec5373954ad8da88791e8f1047" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 0) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"cd08363e60e17bbc12d57954ef92ea38af1095ffec417a7f305b7c10d44f1e6500649786d5141793f7ee33a913b08f60457cdf6316357035abf57c2e2b19bae6973d01e9e93dac249198188be2f6849e5a9636d6b6bf7d1c01c16c03669ab7b5aea828017989c870cac6857bf327b748":"b5611807d3070200fc6257cc2b13a84f842ad45ce116fc91eda79ff14f3f25f3":"":"":"281e9ceb5a46578dfa2917d9883f1819bbbdc9901d44f3ab48ccfcb807eb596e20fc05060d6a77d92a6f630bd2a012b41232dce411ea046794ab0096b86491d3ca2a59d4405e2831b1f9f69e55542aec89417ee7ecd7a050eb28fd4d7d2739aef7aa6f30fa17c5b2bc1c69ebb10163426b8c6033ec7733cc9ffcae2f23986e63" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #0 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"4294671d493dc085b5184607d7de2ff2b6aceb734a1b026f6cfee7c5a90f03dad071544e599235d5eb38b64b551d2a6edb9b4790b62336fbb9a684b82947065393eeef8f57bd2477141ad17e776dac344a9abe80f6f522f29878bedf8245b27940a76471006fb4a4110beb4decb6c341":"63bc769ae1d95a98bde870e4db7776297041d37c8a5c688d4e024b78d83f4d78":"28848becd3f47696f124f4b14853a456156f69be583a7d4682cff8d44b39e1d3":"8bfce0b7132661c3cd78175d83926f643e36f7608eec2c5dac3ddcbacc8c2182":"e580dc969194b2b18a97478aef9d1a72390aff14562747bf080d741527a6655ce7fc135325b457483a9f9c70f91165a811cf4524b50d51199a0df3bd60d12abac27d0bf6618e6b114e05420352e23f3603dfe8a225dc19b3d1fff1dc245dc6b1df24c741744bec3f9437dbbf222df84881a457a589e7815ef132f686b760f012" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #1 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"c7ccbc677e21661e272b63dd3a78dcdf666d3f24aecf3701a90d898aa7dc8158aeb210157e18446d13eadf3785fe81fb7ba1915b3c04c41b1d192f1a1881603c6c6291b7e9f5cb96bb816accb5ae55b6992cc7787e3b8812efbed3d27d2aa586da8d58734a0ab22ebb4c7ee39ab681c1":"bc55ab3cf652b0113d7b90b824c9264e5a1e770d3d584adad181e9f8eb308f6f":"18e817ffef39c7415c730303f63de85fc8abe4ab0fade8d686885528c169dd76":"ac07fcbe870ed3ea1f7eb8e79dece8e7bcf3182577354aaa00992add0a005082":"956f95fc3bb7fe3ed04e1a146c347f7b1d0d635e489c69e64607d287f386523d98275ed754e775504ffb4dfdac2f4b77cf9e8ecc16a224cd53de3ec5555dd5263f89dfca8b4e1eb68878635ca263984e6f2559b15f2b23b04ba5185dc2157440594cb41ecf9a36fd43e203b8599130892ac85a43237c7372da3fad2bba006bd1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #2 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"20f69bc4a308d1fa40146bfb8a3171e81a66ebf4c83fd46b2c8a3b34df499a6c92f4bc9699bf6d19d5c3f45245bb0fb08310eb7a9ce51883b0c36271b5ff0a1c00219a04a6b571362c7a18cabc48f2fab0cdf3434c9f72cf5ef6a61feeedc94c72e28fb5a99345dbc7939a3b8e277c5e":"882bf0edbb66ebb288ce741997ffcd3380049f5007b30e740ece190a01612dea":"ca1da31810bfa6c02b5863f87d39668d796105430c445db157c41a0152a0d200":"c344b0bfe801da37e2320d36b9e6452235e6f6f4cf3190d414e859f4ee90e5de":"8ecac7a65cbfb7a849604505d403acaec41c6ffda3009f6080bda79e26d1de3bdfd88fc9bb9ca1dd1cd8d49e3d0cfb0f0a2e70ae1834e8f7d7f79382591e8bea0a0386ad40c98d097122dde0dc2f4fd3258d40dcdd804fdcb72d62ef9041518c34fd8a37684bcabe2f59594382767c2633bf255121ac735852fecf14440cb623" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #3 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"0a13da2edd9ed097631860dc29cb2d7eff3519910808e7eb0c6ff1485cdf758d9793ca69779117a63a47e386433f18b882ea8c8d3179dcc1b263fb263bdbf2ab818775a881964a5690a6e9af592db594a39a960e343bd4edb7747d75866e1ca7125797d2bf6a644aed6e3c8443f94274":"48445b1b6807b261d10569ab4b5d8ab5d97ebd3d9e8194088b10463abf11a2df":"6b742d07c45a031795a7771eace89fab782eff6a74555fc2eabba00d1d7b7c15":"cd0493aa84c941c1b7fce37d2e38c199fb8c86ea0c5b6a536118ae423ca7ab50":"fa005c9119a898f2fea35b805a2bd8be88c48cbdaa8582337f1f407ce3e49dee8011bb1e4ae33317ca6d5cb645687a62aed86d5803583a012d96b82e7bbfbebf59fdfc1db0a92586a843f6e57056f49726e89bf98b641ea60a3c91815edbaf415b2c4eb7bb8c56ca5d84a3587c64a945a6e3d625b6763084c2a0917de6bd6746" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #4 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"fffcaaa7ae7787e12e96521a3e29a7c40ae08a7cdea9974cfcb894352955e65a27c8b01490c9fa7593734ec27ae242a20d0371c3c664bdec7f368bf53a930cfb0933de5d50865cd757b63fa350341375f132dd2bf9bf8c6d9d2ca5354e284bbac677c269298e1a5bef536091081446bb":"5b1c1a19b28b09d08bf9cde87b4a6881d38a7961bd7ba6888de06d0c78fbef13":"5ebc76ae5779fe563362c6f99bba35b4b50eacaf7192c68b82a376fb7f2b61de":"95831949170105e9c022a7711803f9f7d617a8a137145b4c2f6ddda7ebcf3c5a":"633cb6696b97f2d4119fe242486e8affdf1b3e25a94e434592caf0270563b210df6a9f9405c2c33cbbb750c0218f718116b67232db874621832ba78b040523b2ebf715082fd23fe7e32599402af95156ebeda98eff2a8f2a4e295b9afb7fadce956cabfc1183f20e4e059d91604fa5d77065c4a006b3fb2c15750206ec936e97" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #5 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"ae8a6a25b266051cd41fd5ecc682b844aa3a09327216eb6ac63390250620113124145033b99896c21f8dcf60271ba681156406ff2691886972f53c2e4b449dc94fb09a2960a3423d2f4ac66f973b4a89f80c00af6fbe4b0bbd430b12a714d40e172e99f909916a27221020fc72259cb1":"0acbae3c085d2e5e760b0631c6ad97d935e96b0a90ed4a9867f626951596ded2":"2d74d07e82a033c0bf65643a6478856c92f33ee55a2682c17e7c42857e8e6fa7":"a1b397cd826af3fb1b949453e96878e59f0697352929b15cd678142453479e55":"c309567edb3d40fd8d828551117964e20041b031e8eb41a8c6e95e25e0f43372585854202c5d5796ca4fd38b7b789b44410ba3e3ab7016cb6793625be27c6c8d39499c402e4d52bf2c0bce21a5f4f16d80d5449d5222aea19b64de25f8f5eb81bea7c491a329ca079a99c9ea00cbf3354b5fef435e8d4cbcbfea7486d379a2a2" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #6 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"e603b02ccd1b3e2cf27a2a5cbbb6e8fd205ed3531ab08ce912f915328ea1c73ba7a075a9dfd9805101ba2f0f6e42ebff7202687e99e1cc914036146e187c16b83999df442f0ff87b9d82fc7831714d820c247f1a2c3eca9d32ef0039c4a2ebb9962d844e0032a58c604d630f12884742":"27e863c2f9f91e9540f0201dba0fc63c3c623ac89d63368093dec2f17b6868bc":"93e967f73929f2be339448735c74b571a8b80c10bda2ea7fbea824b188a7db93":"1ff3a43966a8f64c42dee8889ce2626bb370afef4c0222b926abe1be719427fc":"7ca6867ef568c8c323d216db96b642576de1f5e82d08b84e6a2752000c5175cf49d6096dff7b714a45a72a69e467ee378f4eabb142eddca926a3d01120960cd7aaef1e377f447b0bcf8ee733d961d0c36be901c7f406a1dc81cb2ae2e9f6886f5ba1e481e7c1396d2c89aa456b2fb34f02a91d0eda8784c26ad5a6892ba5ffa3" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #7 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"222dcb4b31c7bc37d8813be78d95e9d8c0f021363862c6bee5b01e6c9dbdba8c2ae81c52b90d4cfeb80697fcf05caa08bf81702a92a6bc90b531b363db5a5fe4f50412621ba390c1cd211a9683c47ec7ed6d15513bd49d10449f0c450183f5a7b16466a37df5fc79a4ddd3ec6bd0c56f":"bcc19eb476ac96567da10da8fb714c2f9fbdff28b7c74a5cbac80ca480e61de6":"46fe8bd4c4789c373707050d0e700e50d692ba10ff2fcba20045c9efff7373f5":"68c956a95f6a2c9cdd06e461805d5270b0df3c9fcdebbeffb30dad1a852fb35a":"8a54fa9818602032762a45c9f67f668860ed605e371a6382082509249330fc24d13c4acf27782a7d2be42721bbb9c80c6338acb57a715ed17c008928166f9a090331db4fe62a11ab47c966bc3c24a8be942e350a2dee7c7e9f620386d89a1e0bd5298d00f94f9a931e50834a2a85c0175308bc74a34ac37ab21305c511866263" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #8 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"787c1fe1498bacca291f020f80d6b556e4f0d4fa5adcf21531c447f28e14266e4f2e9de3e12557756348d8b0c73a1301f43ce41038cbb7dac60d8269495b62ca7452a9c4edcb54e7d477f0c6c6b7af61b3a3784c775a5884cc536f60132e66386dbb911577aef75fc0a68508432e255a":"91f18dd75859c2938edb0d81f9d6095a2bc7565b67403a8777cd059f2631c958":"92d2d8091cc4fe9f5cdf2ded2e358fa05a7d8e4525333b4c00697ab18dd1f995":"2263cbb6e29bb9bdbd803c7224aa039077ba43d1643d4754745f89d8bb6f888d":"620851d2a4c8b6558e18aa5e2d454cec83856d25e619e69928b578ea4d4e41c662a4cd0ae64ee756b184742154d9e7a6283d78bb8b6ce53e2fd2ce93cc12ad78749cab530a7f996c83117df6d217170927d75a0c983194816d2e21f92840791292710178b3f7d9fe1003041d2d9e7c59943b14409abd7956bd5c31190a54ba0b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #9 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"1537f9380d97e98f6e02f4b10182b835f224cca2278f37a8cb1411a1c6cb89eabcf37a8b159cdee3a55329b3816f8c656c7f63835f860b4a5e3c450a2afb5b892b4da708d39614921a82d36cf23518618c9bb0f5332492c1740fb385e969d77d5d7e0aa0a4066cb6bbba4e4c7fa8ae73":"6d89190aebd160b155d5dff8cc4393f095988a1551bb154fae621739a4378430":"04a511f1d8e1994879e2372163b5a45289966df680350bbaf9baea52333e652b":"dfd8c8e467628de6c121c403816a65bdca01dcedd05778b925283f92d3cb5251":"61edfb457546493a43fe1391b8f86da01c1242b3297f3c4ee02e04e37161725f4182b144609335f0183b477744ce3370ff64ae861c728e7526148eac3fb07403a27c3f82fba5ce505233a4e38b8d40c3f44cfe3cc65c6a89127f803b11a3f24397a20409b594e193e443190155da50ff1134c8b1adc5006c7ad201887e6c1ad3" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #10 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"842daa3d64b3c25210cb0ecbb251333c2ee4e090a992138a5d6f9c455a8a5f0d28be9fb51ad223ed196d5c245eeea940f822952bbcf1e2ba7d3dbf526ae44ad7e60e9d99a833b3f372f77adc440850f3fdeecf48941dbcecf6f710d99ae54939f9bf35c3ef2b7b6136d7778b95846af5":"bb9376b79ce2cede150036c0626ddaf8bbd960ec04ade2694be6aea6ce8946e3":"41431b7537968a2ffedd6d7942ee21565f34a5155de6e096646fc7d41302ed96":"946b190e855aa2d4fa7544e9858ec70ca9ac19ad510bd7d625f14d16a80896bb":"b0d45631a104c246a1af31c8bcf7f7bea92cde3c259fc029072c51e662a33c040cfb1d262c705320b7020bd1365288c1ba9b3bde9d0a9df8b9e7275e8637ce9a1896877e34323abe8ca3dd0262d3d75ee3a5af505235e354aab491dcfce11287b7c73dfc4c97c47f0373cb93baaf3def2186a53095fe8b050c94b1cef109c07c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #11 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"aaba29c12aaa011619c07efca75a186714d97eac18d75fdc8b5b36a9ef247bef0f152b758cdbd69256bd8697fce53d2b59ae1210a350319834d6721e9da6b2cc1c0e559a26804d47953e0bd5df66ea2a0c449fc0a8dcc16b9b0a82f5e6f85a218cdddaef40c254c1030a9bfa33214ae8":"02470d6898bcd119cab49242c95fa97b56a495f6d1c5b26d1e877b70b954e3b3":"e4e4293148c31ca6bbd73706e2dd2f36a22d3af3f862ddae40ad35d51dd6781e":"34c6505eebf018676a039f201507fa38338594cd015fb4d962d1577befc63ec6":"e1556a8bca38d5c2087b5c61156ab91566a5da784647e220bf4ea0374e187d4a4bc373ec891472daa31aa0dccdb56a8b42fb2805e74251976ffe5e02b446af8ac6a9f0d6f36d857fe6d3772d9fae7ab08b360e8de2529dec80dd31a5a5468034aa53b10b6a73068fd9e046b70e2f03fded8bd85f7df4322d4fa5338c9cde0471" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #12 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"742fbf9f39f9d8c4279143f88a6d30307492681ccd58e8422277259a0bf87aca24c5d6dc4f650f39c3403fe1eac1ecb079e7b9f363eb44559177701f93da93aa30dc5f4b933209073c825ab2b39b52ec23caf049f760aa385f58983d9af300ec5f831f2449d2508bb5824abb622e00dd":"c2c42e63d43a765c2a49d2b35c8ba98a7a67765a0c453d2352d9f224aeb06176":"794083185e79cf918faa846bd12287e8ff1e620770e0e08b33e8e1da8d23cfda":"ed7b902eb55b7bdb2b8bf70711c1f7a4bc00c4dade92c9d2459db060551336af":"c83af90a8c7879e98b255e9c6b1852bd759ccf8f9c5be4ea5e9a356df4c43efca41303d5a322a7e42ed12b8b0b715e1d23257aaa366bb261e39f19834c38a7a883bf2f01c47a782edb7905cc61742b8166974f5990330a08168e25d4aab6740b96493ff87a424ac6ed447ad655afcfde1d2ec6ab2ba811351385ea0f8b66e318" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #13 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"1437958fbc93c701cdd09fe81a90af55f022195388264ef03758fc08bfd0dd80f63c7bc06945eedd58893df2b5f5f62b222ee423dbcc5491d1a57155891406c79e8ef51fe7575db8074c4e40f50024daf177548eb130a8c248c2b7df99b6626ee062cd5e82048019b32cd6c7319eecdd":"c443f891534c30d8d2b1e2072cb5b824e6d3ddfdd1e6c7757e54372d4420b5ed":"39f7abd306f127baaf8cb832b67c2564287efa433df8ecabc40b9744637e6bfa":"eda6950002c866c61d2e2dfcd9d69e8c5154b45f762efd688e26044adc3957c2":"8fb758b498feb1c0e961a8f86b821bddde387dac221a8191f71b6a64caa2bcc4a475460823996f8261b8e22125dfeac5c9dbda25525dab249cbe469c5e224478964793bf822446721bf5bc85e5da6ef34ddcb7c94f109193c475904099b06e2a7f53ba6dd94480dd5bc9fff90150286c4d3ccea975925cc8ed4ef9830389b9bc" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-256, 256, 256) #14 -depends_on:MBEDTLS_SHA256_C -hmac_drbg_pr:MBEDTLS_MD_SHA256:"ef9292f4a7a67ac4d4eba48936391bb45f8810c2ab02ba424cc8e4add53d1c514611e3233cd8cc8f6d69494dc336cbe1cbc67c17520af442933a235c6aa6b8f98128c66fcdd77843ae32e06b7a31689c9a6a3c540a19081bcbe850278d50adfac3638ec8cf85148a0547d28d0a7025db":"f4a8721a2a873f8fe94e4b3e137e866c79212f9c14f89be156c47a5fbb9aaecb":"b38a6628647a02c0de5b7acb939d0d1896c9c730106c8667d810bd4866ebaee4":"366370899b2a0d6f049e7d820061599a675cba5d3bc82ad747fa731bead8efb3":"1947d468ae4fa4da7f45cfaf32d62a4369796e532f1b03b1495587e6bb95d8330f5b7c962a9b0a2b715d9def79194741870e5c47d15a7308843e10616b891fc9e5cab7db901e0f1efbe1217dd627c71b54c98cec0fe1b25a84caa56f0bde247a9d9183587742a38825234b6b6cc808afde36ef5e17bcdb2c72c7645949289369" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"51ec4987ddacbcf6348e4a891fa571c6e3aec02879eb0181a121a4846344a687cdff9798761875320256e5a59bc94663faab8864cc0bb1e64343c0b978fcc0d6e84d0d17c1c1f4093fac3b4c01837c6b37d189d7608f0c335eb38fe1f43573e0c525093f60ef618bab297b8a4d9d8c16":"":"":"":"ade04730059471b1829bec8dfbb0ec708be7b4e77d688ce7cfba9ddde059a52f969407291440aa79492f827fe1a2f6568989fd36b4fd84e6699152536bff15388af319fb306f07de4309eb92ba3da5f7007948335993698d398bac42029912bec6ba39226c2bf238733b5081aa0a2ca392a719385184be619d9ca56771d8e3716a46cfb339f93ff48abe406ef788db2ada45ab5fcb7f689bd801a5ccad855b52cd4bf1d6e338f2c3eac94ce9fdd0dd06632d01ded3753e87957e8569a67eccad" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"f8dfa70524d46f3545db3c687fe85a8ea35e32eda470b4e14b8b12f4e9c6bbf6c08efa9ae1df90ae6f14b895c342ae07b5e8d563199a141c34e709c6e743260b573f88186f40f800c4c0ec9f9fbeba49f103bfa2d62d7ed8fc9ff88cb1ddc5d4ca4d074e0053c069393d70a5b3f1df3e":"":"":"":"05f4e609b085d28958f5702eb7b99f2e0c7a80f095907abd5b7329628aa6dce2e2f8bdb7a2992261ea414e6434dc98162d02c51936542218a31c6072ed55c9ed83c79698de7ffd3835d5e4d0f3a0c2a70bef2b6c602d1e0cc814c71b2fb1a001fb83a0e2befdec7e4749629693629ea2397b299cdf491415dda446817dd7d28da431f95162de83d917f9e9325774e2f7ef02fe8067cf4bac47e2f61ba235b532af3aa95a6517e9f1286e065ccf9b3eefa6cab4c940c83ee9a11da55ee21c8d06" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"7ab7da47ff7a95ebf2367de0a25c7885d80931447d2f5cc73ae7f66844910e481e05f53ca993b0266b7cde89960d681a3d3c568d9a6e35347cf52d2e0ff7ad1142983fd7d2c848674315ed3e009adb7154fde1f2d90019cac210dbfc06279d48fc7c2e900652b5cb638c1260acd896ea":"":"":"":"f00714df243103f54b4c0c516a7a631431dbefdecc30c09e8e834f09882100c1d0276273568cc6352c3028c156371389078236afe57d00edaa226262f1a7f6e0011ba48d4b8f089cd257b6b7cfe80ca2bbeee99635c277254546d4adbf046935791be21c48a7882ef6cb81f7bccdfcf9bc430d21cef1d788d4f4df6bd6ef5bcbf48e35f116d482d880f597bcbcfbbf68bc77f591bd7346d7a1085fbc1c2707c17bb288ce6bfb0a78a54731421762f18142975b8b3b79dec0d852dca80f1638b3" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"40e83cb1fbbefb44426350916b0995fb6a1c5394f2fd625774459548cfab27f2f92e2e889d3deeb33dfd6c40f610b71b70387af8d70768c52b36bb2a59f3ad9a16be98c726c2d65af457b2f7d81c75fae82523c977cbdf6138b1cbe5a9b3ad402ba197a3009dba459d3f534ea143e5dc":"":"":"":"52cfd4a4741b6575578a1b7aab91a366341cfd483799ca08b851bb0dc2f2bf640e90c1406fd09fbf9166bd55d46aaaef38e0449b7187d019e68a3b98a7dd9cdac63ae9c966db4d901d37cc147835d017915902621216bc1835d70dc2101ae50e0541f796bd6bca2e53260ba3353e6aa4eee56f80aa329173e347d83d050ddeb465d8e1aa5450e6e7eb515a92fbcdfd8530f04fae3d1a41b13151a4827f0634d6e80424c1e934ce0e2077f5f31fd177e9a42acfcaa67d4043fd31a8ec72a39e6b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"39927d4fd0c3eba2044002e65b60d3994c3aad0c705bce2e9e41aca30a7c2f03e7b4968d8e729e868f5fd57b49a4b862b0bd169a4e2d77bd59745e778ca6fd762901ae3c0fcc48a0d6ee22bc8520ec450630055b3b66bdd2dde9f5215d241fa266d24342b50d42e2db5436a478c7ebaf":"":"":"":"96194dd1b6ac5efb3d4787bd1fb4c9cc32c29b67ee34369a7aad9a56f64f53526e9207c1d4c541c6e0df4960c54e10168284891841fe554adaa5012f325b3aea79fa4db8c36e67a0f914d9ab361d8ba0b3d6ca4904103f14a30a90dd6fd7c3f679c272dee7f01110f7229f4f5b6ed152a0149dc5a7185bf637d10899bca417cba8f919a2800d8a72d5575f0c174f98f77a1afad850334204e66156eff4572a6703aab50b850a8df498d1d96b1e2bc1ac34aa4399f3b13e97b4989539ca78e97a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"ad10dbbedf980a0c33576f7606e14785b2a903788b9b7cb4c29cf74a8bbec877999ca28c36c835b60680bab9005d8e4f341b97213fdb6a52e783d19850906cb643bcf48c291cd186ebcbf0a287e459d1795e29ffb0c7c84b0f6dfbe219b4f85d9fb893c0cf9134263a9e6a36c76d02a9":"":"":"":"5db269714c4ab774c2eb14eb95e9b60c6ccaa6e90f9f879e295cc007069dd231894cd8fe0c09bf748e26940160cd0cad75dd2e305ed1f2527ba857c42c3d0662d25cbbcfe342910498ced309cda1894a1186ab935fb614646d299ca56f86defdd0a0f52baee1b9b9be05df85a05c225475a7ce1cc58ebc488a4f57fd1f983881754dcfe3bd78cac529e9945c89383e331f0177e721644b3a8d82deef548d161e085cff59645a345cf7af3f3582bed5b81c7de7a6a216403bb88804f7d16ceec9" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"e9506dd05bac4750f5d5b43e0663ecba6444455ab6f662802897a493ca11ff05f76045b621004f4a88fc6b1ba859ae795e4846f17c3b1c127a8ef16d32381e27eeca77ec062a8a8f811f5dd7f90737147f5fca2b7cc89009b0350292b88d1de5de94e1e82bd5f7bf2e06882a925977ce":"":"":"":"abc3d68bb9b0d29655ee2057a60e59fb84afbaf9c75ac5d146a9856384022e4873a6abb963d8795ded5ce33f8df9275f8ae4c3da0037973487348645415ed51458529bd7c4996128c943ddfa21484521fc645723802318ffd5191e957ec453a8e922d48b1e83681c1463a03c34175a5d610f8f3709b3044f45084f901704547e301f9807a7d92036e08a3eef791f67659816fcb28922b9b52e2a4a2e81cb848f9ae579cba346b0507e91f26b70d199acb6da5d3544b8caea762f6f30178636d8" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"f1f00ebb7cb4bbb3b0a083a290d4d3cc4db53aa9eb3f2feb1d428cf6d8104bdc56b2a30e75782693d7565c5d1ad6edd6cc22967eeb5f159989c2ed7fdb62103c055456f5e1a3163bfa034c502ccbd9aa75385d4777d03a82606a890c89a207494d082becc22efad8fe69c367fa9e3350":"":"":"":"6b75aa14c129d011191b9016b089af15b806a494e8e763a7fe902479155704e1a92eab48ce29fd0f1e9d5a2014757c3cda6e021defdb91c796cbad709658edad6c8f7ab6aebe978d507459198e0719eec49b1926a7c4e33e34e8e366966e0e4e7f3ce0aed6e51d7804d803aab57257ff1250ae8b76bfc48a505d4600bccdd992d564b39c3519db0c7dd26f5dbabdf3c098735688aad1af8525e8a6a343835bed094708b78faa300c08600e638e6f24f4b2b78df0d747ffbb9521cc6786b9c89d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"1f3bade86f64dc0770dafd6a4900f61baf003c6dccec496856b7b08cb99db8f371f1c9606602ad397e0c757f56ec6176c04e832302fd6fbac3519af6d2cb9da5a85ee70efc19c7350145e904a7fa9d3199e1f6213999ee3bbdbcd1200b4dd4e7a8f112f3a37865e494bf8549349e9e78":"":"":"":"1a420c51052534d5d77347ed5751e44817824ed75467791c9717875dadcbceff2ffe024952958d4718b2b4028af83ecf363d57349a36476c0203fcdf4952794aa66b3692e7b0810ce060601817ad0794574b1ce12d6a7b6ec1d0b1e0acb2a6c453be81bf2d17e1fca7dc1c9ac5fe4a64069285a8cb9408051ba5ae4dc0c8897b4a216109b22ec56aace995a453f28dd7d2c38c7d44739b9f09ca0e52d62f204e7f4a09c3e231c8cdaf54f941e8d5565b25155be21cb316417a4c005f7e834d0e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"1b288c94a8aa7499850d7bf82177024f20e8ccd502b7b0f529c47185aad4eb82ca1efc0104f93cc35885e9894671b9d74fa8237f5d740fec09e90b88bc75124e564f1f198081d51c950dbef6a6ebb2b5e1aec008d8a5a4c692f6467c740f5026807bafc0710dc8e9197aee4372b429cf":"":"":"":"3daf72d94056e6c7138787004f40a4a0c81a244c8aa14c332675e977330b63315916d8fe6ba8f0aea5a22def342d4136d1d6c787b3a6c6c05a44ee1cf9b2d8911974974cbf7a14ed5b83fceb8dd8d3ed59194d3fb6cce579a97244091731a4c1ca1d6e4c9d2623a41de665ee3c8236e0da8710208cee948f248329781f40f6f4b4010508c219755b6df752b9523ed0c9644b17250bbc88b4338c688e97e952a924da894fc986f7e807fca4477be94dec993cd6910709d8032fd3a5b97612cd65" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"1e1837b46486b6e65713327240bfac6c618e817787c277b995c92dbe03b9b01de8e100b303ce5bf5048dccfce4d240878ffd5ddcb6754292291d1a79ee1e62b6da6b23d7a83d0fe9e84757dcfa51d05709d54142b42dc876506876b136b6df34b485c0c129581972bcbc674b893ad61b":"":"":"":"23c258b93d4e9943783e88b244a52cde6747d8d7ff28b77e2ddfaa2edcbb29eaf41dc75cdc2c5b581b3a59fe20e705223bdd90e786f6c6498330ec9bd7ca7303e53c0b21abef1497210f8222850ca7f01e0af4fefd36d82e711fb17f581b951e949876a5ef0a212fb73af4d32f6bf9fe8c9e60849fd2311f3b5cb8a4abe856b3dd629fbac41e6dfb502d1894088fc52832cefff807555457c03ba7b7daaf02830d9ff8c9e8ed09ddbb68d6530af0cc5ae9383acd34c89ec189f5a97abbf3ed5d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"67b2a6e09bf31ecee8fe9c719491baf3c6efc0e27519155f99c94667d727420265254ee6d34c6b9c03414452d68929812f1d23aca44adfaf6b02f519dfc3f034bc32c1b763a129a97c7258e5e77ba69d6eb459be2cc96fd6150b6040babcc406143bdc2c1862c7bf6607b4be95f3151f":"":"":"":"d0f71e56e975e443bd7364eaffa9dbfb60a82bd0ea6405de0b1301911449ae6ac0dc8792acd2b0ca3e68c2abb982362eb2a7a8f95d2960579f9932070c9cd7abd57a36759b2c6f12e20dbda8a16a17c29b70f5bb8db0efa9451d9a349b9917b7bc39af6c6be8217e0a6fb52e6a4c46dfe41e6a9cfba84335d0254cad07557fd7aa3fea185c8c88a921ea665e410067395791785ebdf1793038ceef6c590e64af00ac4ce69ac3d0b497feb93b4fee7d55cf0fa40dd49ea748b33f038b5097578c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"379d0a38c8897a6524d6a59df4f09ba975c146be7a398c3cbde8c222fcf998102e98223b81dfca7fb5bc92b164afbaf50f58b8df04889dbd69acd59f7d5ac08f81984910ee20a4d58c51512a3ed893d7b736da894a0b52f75c5208d14f858dfd42290f4181b7aa249097b93fb2bceab8":"":"":"":"166f643609dcb8951161ca15b3660759b69da616b45761b8cfec01a8a7f51a0bb1cf256c9fabe69b29552f8e861cbb3160b905d24845d368a17ebf911a839384c3b3aa6c8dedf1fde12384ec9535ab9d008728978ca58ad88780cdc3d272d1dcf2059b9bdc0d2311812fb1b559e31f8e5a89efcb2b33c705555ee0efb23d2c4d312fe02b998eb78af85e3839963afd98c1c644ed4493c3f1af0cb210e660748cadcfc9ef85fa3b5fafe345756ca34e7b7f88d3aff8783e92da00dbead5d51f89" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"96041c211e97d480d149e75c876886a78fee171e0f395a952a0e873af4dc22b46cdb68a60dd1d5753027e544643c5764cd65e202eb821804300ea618e8ff9785f3bf2fbf1b1048cd4450399e2f642af38bce41df8fde3208055e34d356b1aa1b0180673e8507af2035f75e9fe629f979":"":"":"":"51475ffba32991781b17e38ea58b08bde40f03b64824187b9506153f41c233f34dbdc52b63cfc71b120b4fe6c2866d11e9aaf44f82deddaf998caa56a4dd58a6ea2e8f5e3c4ec7fef73e5620cb6a77313a4bc0b135c57d18085010a4a026059c2abd4b6d2048393c5400341928f5ee6c5a063d679e185eb9be2834a1009d03d298b9abb09f993a8ede54bdc4d9a95c2af5552aed9fb02cf598a18b5cfe6c811d1ca4ed764d0756fdfcb5d03aac1ed80fc86595539c105da6b66a00a91caf44fd" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"423cf6fb44605cf03e3063bceb92c156e38c5badfaac35593139df46d325242c84908baef2f824bf3ea66e74bb4127a0c5650c33f68b5d33502b1f55e06fe2c1169fb34688a09291d1e12e5390a73da125be4cf15692e3e6ad0ab6ffb22cf3f77b00333517ecb2239c9b81e59a72d087":"":"":"":"41f335cf727ffec9ebfe7cb348d11cdb4e5e49a9a047d8342a6656e5d235219a5d80715166698cc1f16e34f743811b820e6ea55c2bdd0db1b97ea2269fbf60c739feed818282f447bfe2bd0b9a7c479144f0016703aff450abbd87a50e5e5af0d2d9469175542737bd116de2a73acbb74d9f0077a227704f271fe0696f071914dcb9c0f0191fee35eb66248eb17991b538649457d5d5f9d4bb9cd81c33a14d2becce003c143c9cfe39ccac51048ef169f6a22143eca721d04f6e147749a44a75" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"0b2307c32f34d3f3c3d6887fb17ff68b01f158ef07438a41cde27d2d6725277f33f60888aa32b9b7406f78f47bd877a1795496f759d693f3f8bbd65cb5b2562c4a8d4a717b6bb8eeabc4d8f56118a97d3787d3065f1e20e6d71a1dee563fdb2d56561128fa83d8602fe0da3e89b019e1":"":"16815bf5482abc969179152f79aa34a04c28d483e6ac81aae14f7e0e051a5662":"938c363df2740ba9ccd39168f9bbcd7d421566955f141e13ed039c4d86195392":"959517e0b27d461d678ba2dd528bfb7e844f7bf14a15fb176efabb3a5200ff2b373c7c0683f095798951dc7ffd62b172ed814954c44087fc7a6695a5a275bc8aecd3a2ca8ed631a9ebf5e1d1c515542c67f31e16fd3ebc7e2333c7dffcf385f0d6ebe16b9ed42994be9f83d0cc1e2b3b5773cd2963639ac74ce64a311ac0726014bcd213818cecf5d562cd1c5e97be4028f64400cff31fcd587a004cf60f03c6f3222e4dabae5c4bdef8819670f77f9227eaf55eba5238f90c4bea4f03588b66" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"062f2aa7b48c983c1c6d00d06aa523a67d4e86e5bd266451bb286dcc5888f0f4940c3b022cc76d68e1706d62fea84d052a019b921335f69ed5dcd902632116759b68e09b531de276c9238faf3a9802806750454a5260bd808b796cb12116354b9a7ab9ce33f8dbd40ae7e74a07cfca02":"":"4a217bf136c3894ff7a3ca07eafafa286fafc8a827328b105b3a8aff28e49d14":"e433460e9414b21fc3d5e2705c08a21a36acde4458e24b78dcc51199b97c7a9a":"5c980247a1fa16ea086d54084281c5fd114777ed21478beee9edb175be7c4066b197065da5f4c15750783039eb4b5e2cd4ccdc2a45c49ce535f03a36657f218fc616b3e8ef0c84b78b0cd1c57477242bbddbbde098be573e20d6ddc76649d706e7f6c7ca3f44c845c2c9c9d316ac8b7389f7264c6f8cd6c56ca5503e5b37f52d19e8d47cc85a04a0196b9387433bca3c18dc30b47030fd297705101826840991eaf5b856a5ab75d2bbb70cb13e0dd1876802fc2bd776a518b9dcb9484c499644" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"0fc79576bdba77a815108bc9cd2d168ee30f9ab76db70600ac95fc40c1f6b724068c12b99cb4928247e64b2ea8e75c728ccb3de18adfebe24ef99e14ad54bc1b3a486891b00b1c55172d16adb00ae58c9d8ae0fa9809245a56c9118048199767d35c026e6664773562af011c2ca7025d":"":"b0c200b6f8548643529fd414c693054d4fe04d8f76c3fb8ccc6992ffc25e6b19":"b91bf188cbaf4b01350d726585c6f3601a26b3654db2e2690a14f1989f83ad85":"7c64e503eea5b3df44dc0eb986188c312a0f5fe1f113239984608a69ccadce8a7c7f3136169e075b0c61812b1e74dfe6ab2e7d6f247f73859da5a1068c92ef8e6aedd94c3904b973ab887ca3c38de70b8b312e32a702710829ddf962f0e08779ed9770975536557e3f912ef0d5c4969202af50252117eca8182c30389c9b84fda95118f8c748f0b1752c1e58b8e0af530376aa34cd874cf49628bebbd7353ab4a5f64bbc8e3537762fd5556c680290b2c523153432a2e0df1658f2a5507a30a6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"ffde7e2726e89cce816ab3e22572fe31434f3181d0578d51161cc77305e2562b755008c7e4ccc8ec62806bdfbcd8508ae418fcb0b57a4d1007469ee3d959a07e949094b0a3e5af69aea3a90a222630978af9139027a656151225a2183b92e980fff9ba9876824bafcf18d63c916fe7ae":"":"bda1741b0b39d9248dd062870334e33cecde5c5f63a07a3030f98b021c6849fa":"1b5336fcbb0ed183e0f80cd31ede4f324997ffb842a83957f41d291612c55e8a":"61d542e4794e9bd4acefef4b325d954c8ec6a29138476ab1bb037507cf52c17edbd511579be5c232a67269ef42364cfb4e2aaefb31d9e8e260a04e51d95c2ed6c5e0f095efd92fbd36edcae4393659af6bb98b0b71b281e91e1df37c353987a6a9e259f2735fd16b8c1277df651b26ac3d9f292c9252be7fe09ab7851f515325a078cd69a7573a4810ab460c4c9e7604e54242ab956fe471e90f86613ece7372f1aa934a50dbd0457033843b887c279f14ad6b4960f401b7fb777253ca5e295f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"7946fe7ada4b545090d7647c99f71594fa094593115c23888146b27a7ccbfd77ce305c1ae4fddbb75a65dba4f0ea18897bb7e9aff3138ba030005a7d1c5802838ebb20848f8e81e7e8018cd0d0dd921243c094aa710f6b0b2ea004bd684799e3caed8c3c8944d5da995b88fa071d7526":"":"b29a506c7bc8b2282570223230664193216dd47f7d20ccdd35943a88c58c0503":"3a4c00cd2f278f0e82498d33fb6ae9e020f4d3793e832afc9864c0b7b6cda43c":"8c0667d913b13866c7eab98471109d966901fdc66fa4dff8996ce81ec5185ce374b118da34e07bd82833f20fa4e44ef159f9b0c47c046307a484b3f52822a596bcfb49b555ec8d481fb30e13dc9898f093d34cbb4d696d70161315c48def73bb1c8b4947c8ddab101d4918f5cc00b890b7450e4e10c17c46ea7f5e0a1df65a1fe74ad2577e592e7bddeadb246fa62cfa5bb8620220b18fff296a19a5a3ae6b833321ca779b7cb5b55658931610d8b7776087c41ee4d077400753681c7da5c5aa" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"5459500d5a709b88bf067b4c390837eef5ae2e5f109c110a84cf32f561d26ddc567c5f4cf0f418cbc2a56d4325b2727f875cb1ceed3167136f0d93940417f616a3843b686ab4f5dd3d808801054c510fca5ea8fa0465f9d1afd8e0c68affa10f5af61e594e66b2bdb2372caa0712bff1":"":"eaec7b75ee03cdf0508c0ca171b005077954e2cec7230b0aedfe32a15cb1c855":"cdafe409b871625ab1b06a93c4d5a1f8196777370df18643f97050d7756adecd":"486aa4063b3840f0417034c65676d20da22c510d281bbf407855cb58a87ac9b33511d692315d88d27bd5d1ad5c35ec8b99018b5ca64897aff48544a5e578124ddc00f785deb60b0a60dc4873fa9a148da4dfa1557baa3aafa22680a40f650e4992d21e35fab3be5458dae13eb2caeddd8704d662b221bda01ac6329e2c451e865af9701a7ccb69c0ed0baeb226e6fbd2b871b99420949570bf5fc61c673aacb58feabdb304f870939d705426aae55cb3a2f3206c33abd453e077c4565c603a18" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"7e74b0a5413ee2ad8de814ea1f556ca5c54c6f11159f1fbc78faa86a74c4871a11658e917fed348e779aae510d383290bc6c4f13391709f8aa9bd79f38f310e2ffbe7fb1be3e6e3aac9d879f1e5fb3eb1fe81675cbdd098cd287f66fb9b28d50e12a64b9e08f28a40ed446fc3a12585c":"":"d152b0aa1946cf177aafc7d47322f8c756831550ec79adb40f34681fd6b3840f":"152229388caf5dc50454c2514d9ff1a4b70e3d1d9b8b29a228d59ce67e8bc586":"a1e2046729e849482bd693e21779e18370a542e2fc7baedbed054476f35447e069bfda33fa2723ad425717c027e8b30d57dd2fca8cf268849358354478cd8bb42e8f9a737c2e3d5490991e4902a52e86d1bafc1751f5908a36afca2b6b4663ccc9f1aa46e857e2ee61e4dc19d154029da48d59519dde64410b1d7daeb5b7b93213cba1bb059637023f928f16e5944e0ed2ca07be3674fed6e0da72313b3cb80b7a2d6533fc8785587366ca1b6769db803d6d840c5d1b6c4589272a3fe9371b0f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"70b5cab63391c5777e4e60516b7095dea3cf26d72b27c19f5a08de6634306d992de4c3f70bf2849a4c3dbeafb163f5d50dcbbcc8e6f4bd973636da95d71d39d6ffc9e67332088bf906921b9c48a7e3de158740a9c0f29a7b69d5545e390030965e305ac1653958360d01607bcbc39fb9":"":"ab042d23accf9a9473b43e82683e30f436fa492ba4a8911e4ed2622d481e0cd1":"b707e2d5a5020d37656009713bb100c55819a98e220fbdfd921c6c0724ba7238":"f3f82b7aa0639bcabecefc7b07b3eecc9962884250fad11b9351226f138e06e3e953e052792d0127618a28aaaa1bf5374a06393c18a326f8d3471010f9840dd16ec997f53fb981aa2b689bf1cdbf265b4ab698f9e8e9c054255147e04654b8fb1d0fd3a0b64d3880ee6e9fa87e0184f6ba307f4d3fea651556e0baeeb75f308fa32925f8c55ae0f355f8db8495ec6c46003763ad4ef36590ec40239b5e8530aadaac931feefc8e392c550ad4d89f5b314a53a0633c7a93bc05b588273e6d1d56" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"c17914dd6b73d65e5af112536f52b046d4963f9c9098c77d9dfe35ca7ee6366d4c0fed576ba4cd14caa3d0c406fffad2f0748362166975f5bcb9a395d568b8dbde3383c5654bd24f26890b21ee1f1cb10f3c93cf2df64cd764187c840590a54babc9c281de88ad1a1dbc2677fa8687f9":"":"4a61ee9349d53f8b3c1af36fe0a9303ef89705fd87e06e5f34b61e1350111279":"a9ad1cad4ca7a5af4bfb83680d4b914c23a6cd551e8b002c50f30be0d8693edf":"9ab30e3729dd8b2af987dcb793d7a3e1fc4ebcfe0a4ac976d91bd3897777effb210c8076e9fd135991e54abb4bb8c7b183a80ef37077692e519d38df4a04304fd83fe1d67d32147fe0a249a6c8bc603d99878039b873588c3781a193437f098094fd8c12945ef99036442c80cd1f544725040df980c548f0a675afaf62a1b7c225c9cdf0703e613c7a5d72c8b00d8ba199b8ecb48b6e0b0d103a3b0f57ff1a4b9189a20dedeac6eb26b1f66ea0c34ddded10af2b0133f4b5b95ac2239dd94919" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"2aa5423270d0859a6e3aa3069a88f3ac4c30eda7f6e52aa891e4f995244a80d73d73f789561b00ceddf721ea59a7eda3157090ec192c578fc53d232c36453c5e8bc3c9c22f3aedb6a93f7aa63975d9bd3369cd518e570f6af0ab162e4c938d17dcd4f3ae46d7cd502ef73b2d40f50e2a":"":"32cae3ff757b79f2305a8b5f5fff5a77afb581faf5a3796c5ed7054d7c048017":"632eb6f1c827cf299f3403bf80af721fe5ff8245331f1ccfbb8f4e61ef5edadf":"1a85c36131a8c271d6c805233098bb29f9104e6254e0680c6e264a76f79ec17c7ac65c8a97610a0a7e5304b37d1ebdbe02cf9daa9e45b81d75d8c613afb974eb38dc49041eafa7462b4c272fdd3d7fd4b05b1e6142305ffd6fa634ddde90e273b51b02c0b68b823c77ddf3e93a2ab9436d0f4801f08a113eefeefefb9592683981423f83235f8e563ecdb4e44daa9afa5e1728204dde1bd254c7985e6d56897c570b0c6307fd49ae4dce18ea55eae846af2a5acaae17a71f8369b64f47b0e54d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"c69c61689d1f7763d43b22b6bc2262c377c62db60835114442fd5bd65c665705b5563b3b6e9e793d0f4128696eefc5ac603b3edb35b705ae39845cefdf8fde23f5479ae4f033442aa958e979c89bc41dde68d92f05b28c3644133d19788624bc970019a10f6b3c6c5b8dd22b0cee3e26":"":"15cd6984fab6ae7db72a4c099a064cdfbd141dce361fab0021872c91b1bb65ff":"86c295fcc7f9c2ec9fad377e0e4d0119334080f59fa68c21c19d7a1212dce03b":"97b971ec13db049ccd72bc597ebc2e33fe4da647d0f74855f242884d35dcf92d0349fdb3527c87c5431c10fa85569285096d3369bd1917c8c7c8650024acb88e5b17c42b50a75419e29757a9e1ae09053cf0b51dac437883cf3f5b1abb40a71f40d279bc9d596d0f59f4c70f81087b4446c402279f4486198ee3294d0a5f72eba7ba52cd552906371aeeedb47122bffb0d5ed27c3cbb86a6fc2d83ab4db7b6e1ee467dd1ec20dc15bcee168f2e200179714cfc04eac651a495a718e1ed985bfb" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"4dcc7427dff46b7db7e2d3273e0605ce85c460cfd4269fce9ca3b10399b99e178b12f28786b9e3df457ac0015004844d6f6bef29ea562856ee82246d24982393f770d0b65d0ffc660d9d8359f10904fd8cbb76e648df60ec43237ff7dc46bc34920bba637a2c1643a53e8a88bb7bb97b":"":"4c0ab67b952186f2f85a0dbd4b2c1b0dd009dd794260ee7f321b2d2b3d994e09":"f5be66009b79f51f6aa0cd1a5a24a72c6a6c4263263cbcf80e8e0d514a2bbb1e":"211ca57a321cae2c6d1ad755ac924c92dd09bb1c6334ecc543ba78a18608479457bebda63f707fc28190b2d56e4cfd96d8c49fd146ace867236c57761ea28326e3d241d1dc35d7ca971df9d292f2563d33c5f32abe86367cf5f2f06628376752b353f72b501ffa94a50f146b8174cb7946ab8c8be382237334f37594418850a233c536d72763f10b06f728e3e60d3b4f0377d51b0de11d110a28b6fcb7c42b77e5f6b771c8e5d713a0f6c4d82ab2311cadf16b7cb441a417b2f595f32ea822ea" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"b72f34bf8209a28168ae7692e4c7d6f19feab9346971b85fb9f377f6e4a77dfb370a10addae744ac03f2f277c85423945f486830cd410f26e22c23a136d41800850113339242e1a0550bef81a239a289a8d020c14298854f0b17abb0bc461ed6d39ab2d9cfb03b835916c2a8e93710a0":"":"e919d983beae4b687bb393d90ad4104146e86564845800ecf82085d5b269f1dc":"abc8b519db05c1de8794248c5741627cc00ee35a972ecdec045a0cc557a2d967":"9777504473adadade14eefc0279f8347bb178a36dbb5fb028f0315b4309fad4ef554bf34b04146ba4bc260a89cf78195ad1c23c6e473a14385c66ba2a1c005cdfe336999245f00ffeaa41dfa3d9e68294e5d676f01f213c6d2d8a69b43e36f2a568999c0a8c07e96d7daf90f3e2e668eb9fc8e5c812a49a39507d193eb7c95b947aafe658a1065efe9370cf81014e4ffd54efffe5f863e6e4b7d875565617d8b72854ecf09263c55d1c3f1a4f4862214fafe7f03da5572095a7befcfd8e6ee63" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"35d5a6cae5aefdbc62f1efb638c15dda387a8f651810bf068a8d92601fd37e0efffd95196c09c668ddb05eef3de339222a0bd0d3b721a27e2f29be84a846c3964eb9a84cf69b214f612df3b414729df499da4d3ad8bf3613bdad3a70c73cae80556c16f8ab83adf0f2bc9391094bfd98":"":"cd603812a8444925993f2c1a0691bb4459faedd872f43852f9970675f579a1eb":"1441b6d4876b050fa4d969f1845d3f119cf5d8720c35da9c489000e6b7165db4":"259828d05b8e735fad69527cd2322f94e8e7ac2791607ccf2a74d070bf7d5574ffd8d6e447cb4e02bb15a87aa88d8f1667edc0905455b116ef7f08ce727d8f266965242e0042810f946e52acca6348d70e012d998322a18a2f3b4c4c6d6b66cfe65385312344e3eed14c6e7277eac9a4d09ddc5dcf8fcce6f79a23d34c80cb78aaaf1347ecce8c13efd450d59506513e62f527179b95b9b5d9df821c32538f8e1ccb17e911826e944ec44943ad8e726d54fa98ebc4d012d34a23771ba497ca2e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 0, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"66abf17d907a134232faaff93bfe361223b5b773980cc261fd19caaca022fd0a081c11efee01fb1f7abd0145b32a51b3237d6ace877ca6392bcae2fd2aa5b865aabfb1d1d1da33f42319a088c8dbed1124a71d39e627d5efaa1e8f3e5f70114bb03b71ce54e4f8d34e838106b2467cca":"":"1e51f2b67538f84440912c6fa20fbf009100fc3008b5b8e1308d95e7ca53b460":"301f91c659f73b618cb46a4343772f1eee9fb4949ec6328109823749bd8b0b11":"34c532082926e6d530b3a58282eb4666ac7374e8befaa4999dfc9f409e40ff966652295d2940db97061800583bc7d47b053553ad29c89ee61803c1089d30592270d2927031353592d4aa71f59a4bf3f2147cb406322367544c38fa5a3c8ccb534bd884355b06145db62161260162091c795874a2e99e01292a2e39e107738818a211750f858edbe0c2ea4734ad14f1c45bcc9f733f027616926558587f7332be55044dfd6fcdb628ff7d7d581820a217bc64aa092e450722686e0cb291eca45b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"37dc21c72dc7c82d5e13c51ecaf5a8ae06402500d92caf96c0555a95069f4f0144a961ead5d6d9bc317afc8206202bddd57fc02a2a500df1fb5c4d9d8837b52a5220fdf068fe2b8b4bcc63fbc9bfc94c8e21d987e8b6cb0f4cd37b144c668f18b7a36ed4e9758ee7b96029aa0ab2196a":"41e3b89347bd035bde510ab8ff83d5fdcc9d5f2de648bdb468a714f2c1083c52":"":"":"a929ee23c5832e5ab93ccaa40bf775593d7d04a1a8411dfa07b4c8a2da2dc91b1bcb9c27a0ba5a7152ce5ded5f76cf6b83c04c0f8a4f6b43383ae3e7d497280c0f944be91b0bca6a56df2d00641bfc1ec549b538898e559407b076164278c0eb7afb6d6f4495a50d4da178c04b259d21bb745692d3bd186edf5bb3da6f66b4418fc3d9b085b0a6c1a5e54696272c305c4b8887595b391dd6ed8da03dc9fdb2728d8c40a2defd8af05ef1c443a72323f2e0b0d268109fb7e7ee70192fa06bc6c2" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"0dcbeb660cff703e059913eebff4f639a24b611a078bae8f01320ea4af5e8e0ed93b8dc4e84d224036b5da645c147359c6123c54cc2367262a7594bc9a7dc69f76549ab803af66de8f253d338d48ab827b2b1918d636d6ec92bfd9123f1f5fb59b6c37eadca0ca7792e2b7932e1ddc33":"1debeed9ba5790437a6c56dd3c9e2f6df0912aa0ce2e57fa8eec9652e2eccfc1":"":"":"5bd815b3c3bb73a45dba72c68457ccc17212af905607d827e8b5ddbffa34a058ec360abbeb6c8ba16c770ae4826135ac7e4faf208da8b5fe3b26c16fa7c7ef4000c3dfe1b8b707dde64b415c671c4615d56e2648908e047ac978a389e346cebe9228daa7bcdf5e341f72c3c7ff74672edd60c7c6341726450ffbf9e3e7a16580e7e602f9ddd3f3556129052de05991907d81a87467ff5842c6e5dcff4543e24ee48149f16e9107a9aa40cbce367d4b76042d77ef1790b0a7701b2f04873d245f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"d9bd99128fe2771918afc6db6b2514eea0b617d9bd4599a238d9d99a7ce18995e8d85542f3f9dd89920b0f79b94d7f551fef4a330e9de24eb197bc75677bc13d8361104997af99ea2c6da03f4e71c89e03191bc5e320f057afee98e98facb99d15142c61ddd71666cdc38146fbc3ea4d":"eb701a9d119cc6dc0d735254067dfe161b1052ba3f93ab0d6bcc19cc0387027a":"":"":"67b86213a84778a9a38eb9913b9db8508b53ac0a81ff85dc78c966d638255f8f7c63ce06d4a66f5d9213ec2b32f7e63ce5dcf01b59d3b30433f0cf4c06c171d839953de913093ec845670b38ecacd81162dd73501b2e4c2d9dc69b97d49bd6d9f6250070ef6b360305fcc5ff392d1adad98d6bfda67d10b725c7cc8ef6b4fc206fde1871712b96dcbc2df4f08d79f1adf7fbb01bfd8f20e76956ed4b9dd1d7e5fb4f922ad2a529bd871490e741843d839e876c4b475e2fa140f28ac8d347a07b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"0de3fed3b363d20ec5018d4aeafb25c8e0e6aa42ee8b56843043f8d9c40b9bdc8ed427d29c469d8976a5b785d050f3d2e5eb287a064c54311bab32dcd5f240682babef59c6ffa602669f3ce4590b054e2550444f249b56666b7b2fbec29b33d1b29ee653e388f9fb54b00635ff526dd9":"82b6a44b0f35f946fa0fd4628738e61a0bdd421a8de73f3d2efa25216c789080":"":"":"1f7b951d147ddbf21fef9d4849044c44b757309da8f0244f71e4d8301e1fd50c5e46407f5bcbed83eaefdf8983c330dd0a67568e866b20b48c2bc97dc63a7c0d3eb60f2488b1eefdfaa7b8dd43132511b4a2ca80bc9e82851584ec4ae463444aadd3c8e6db2d4469ad9750e18a31337613975b3fa0629b9a22bccb235d20157a4427acd619324e881e68f5615c65e59a566a73e4ce9d484fc5b0b29137c4f339be84781cad67d17de03099b1d03ac45106c1f2eb5b380ec84392b7ba5c91df4c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"abdc2ac24ba7d92ed9f518d9576510969f8d22074bed9b7639299d2137532c50faa49b5e843f417693a2eebd0ffd3f27c0ad2d8bbfdb912ed4d1ec85165d4ae577a92b1affab63070e25dca8bb1b035c8bbc5d3a07b4fe094690e4a45b99f9e5bb6b0bfe823f3c2a148732fd43db5e5d":"8c7b18ce389664fb72e777e70b533ced4c04b0c290fdd45b86b6b95708d74187":"":"":"c3d1420055f71a43264ab8da92829fa1b8937346375349d2e256705d933a21352ddb4eeceb36cdeab38cae58da81bcbe6deafeca5d7f018a0514bbc285f436b574ffac2547d26a3f9aef21b66c1e70b45d372e4dc2281182ae94667e442f39e1b9b2fc2aee06ab306095a904614613b513cf1af5a9df12b996cbe88cc3b25401790034ad0622df43af4cdbf9cb681538c79189a8260cf9c35378955f2ea859faa78773854883cd94bde4c0f50d4c998c278e47787e3f74f3dbb98f710366d315" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"d20353e175f4ebd0ef5fe77f7f6fbf5340ba07934828dd296c041a63de841002db0d21ecbfd5eda2bce80bed6f73c23d3f18900bcc02791ba9cae668fc33fc60ba84c6eb40afbbfff18be5c4960ce57ad67dfc8c1eabe61a299881c0f326f7093c1a232c80467772e707dbe75b5558d4":"f38f23461c471181a4179323aed247299df11ce145fbab9834b85b3cb42a10f5":"":"":"76a4994edba3d0d9ffee9ccb7e12a75e79c5ec1213f45ca4c50ad629ac533e5e6dbf58f8fac193755e74f9e7a75eedf89472e91d394e32eaed86efa4fb2f9e7fe4bec1d9c7a30fe9bd17c2cda73d136e752a9b818cee6f1262028031bc09cb81b89156138b571f03afa69dd388a807a8cbe9c4de66cad764114f9a4a6419ea70ccbbbff9dd774aea8a2d6b1d20d0a577c59953661f0a87b4d795c2626a025d733f43bb5cd1df37f5cf542c7c8b6bda061cf4693e0384060e63090415d7470cb0" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"a58ca5154659ba58fc1b468c909c667e1b5087884c01ab15f86fb5a431e982c1c041be0aa014fb310019fff65f40ff13d4469b123223ae44f4f4ac0fb6877a7890f969d39047e39ab23882cd7838e16e64bc361fe18136471dea2e71a86ef2d9f8f7e1d24643d7df292409ff8cba0f13":"dc05980e40f07a02fdb150af580a7d195ba26f4fa72a1fe513ccc2cf6e4f699f":"":"":"6ad4543c218cb6aafe65e6a50c4f9ee9d5c7a3b9a0112bce262f49f5b0d20dab7225fd0acffa25165729d8fbba038eb65f7e72f136e5bb82e8d94698dd9b763c38f3041ccece3b04189aaabed79e4d4213e24218c5fccf5f9a0c3902875564431f4d670e6e60e1dbabcc4642c3ef895c115e28702927cb98d509f9341ac7ae2c6ef6c2dc4537e909c81a9804057b6e24fa63ec5edce835e624969a969e2c47c6dcb7e9bcb2bb8f344d2b9855a43e26c0606466887b28b67ffd7f99d374812d11" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"9d6e99a11d63cab5aabb1462abef66bef31a2886cd172651bbf30f65b16fb8f3b93b5042a908510d8518330538a06253959da557d2b390c6fe0b7ac6b18591e5791d275c7e3d558690719d5967d026a80604a389946e2a55486b5c49c2984990a2e14824aa2922e6a59892c5e6d969fb":"af631e7990394889b84d851920ce8877934e706b780908a07211d45b247584a6":"":"":"9f33ba9083c7f4088c9505622cd5b4937b7189b0cbcdcf352c54ef72057594b8568cd4b13a4bfeb61261d27f5febbf2cbbf902a8d55f6bdf669238ae84b8abc58826841f7f62a0c5bd9f74125cecbf8e3b4c1ec88663114e7c248c41cce92e73b05eb3f826100c1b2683cbba985d2ab694b5de1ed8624628917ec9bb97733f337298c0459f198c7a138f1670dfac0d58f287b8244f0605f97406ef528099aa2ef290db202baa7fb221a8523344ad836c9a2bb25e1ff3fb4dc20f69ebc9f0fdd9" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"df7c57519ae3914c75174b3107b7ddab95df936c5cd7c296b1cb1ea06249915cda22bac19ccf2d522137989d5a42549809277ba155d04b3353520f4b5c2f18120bb4b8442130db58e9d46a1a41f5627c40a6b65a4f9075460b7053202a6e5b12b9e07ae6ee9b4945d4235d0b736e88f2":"10a198b05830cff2fb4f5b0317c258129396edb943769292753095b58bc8fece":"":"":"17b9fc6419c17534ee16aacf32550cbf58ea1f073b8e72fb9ae6e94094e797f216703da428394a1da8236f725b191cbec11531a1f87946c70fb1440a55be7d7d18c9b5085d626dd0cd9b3bd63a9014e5d14eef636beb694dfa7f781e83f3c1b4fe5519ab1a505d1be5b812514f3a39814601db104afe5726086f6bacb61c00ab8210239b2891938e97fc53de069f18a6469999727a904403bc53c6c73c7b3a5f9f37f380563f1281cdaa1b4bb4a636f849717c307848748172ae0191997abda8" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"2e403c307a03d766b61001842f85caf91a5eec97a49934547b2ce63411916495f3e102d333269e04381bbf140a28a2d61fa6a5f2286079619f4f4fafeb5c520c602d0ac3190fd500a3402e7c0647ac76c901e7c58e012cd6b9e83d2a969f0d0ae4e08ed5cb601fc72596a72b4854f246":"ff1d9eed8cf59f5708e41924cf13fd5d30ccb7dedce3062dfbb2c4bb4d36b65b":"":"":"e5e20f2cb063c1587583a381536aecbf0b0cb4400c99a74bbb6aa15f338b3e67187316865cf90e691d99466e34bd6612985575122c6c79848d4e2f26801d98e49c002f4063019394f4b3eee908f2d6b56749c260e56ece4e0431650a8bd9735879ee6c9bfaa5d44c07e7ff6978883c36597c31126386dafbbe035579819068bb060348629f74420bd411f2dc858d46dff0bb4f79946af96046da2c2cb32e0aaded4eb1ebc8748f277317f9ffb9aadac1bf5e6654ae7131d5ee0c765ff3d49d9e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"4b1240cedb84ee3f395317e177efcf03b0fb57be1e01e3c206170877a06ec2cc077e9751b4eec964a4422d010ef1487456fc16b3e6e7ccb8a06230144535274215f00afe175d394cb04518b630ba7255ada0c6676885801a8f503c55c38850de6f7904b40cf03fa195cd16ea2999347c":"9043ef3c775f32dce1902b9efdc481f61f29220eca53bb904155f2aacc3b3706":"":"":"4facd2fff1828b9f4a63f639503cf6533a4d242f316ef7168fba44b52b876056bb0fd040d5e331d2746169cdc88ccef74dcf6c642c1d1a0db4130f8be9ff88555de4c2a7a5824f005cccdfa6074df3385672eca57a45679d69dfec232cc8b1bca87f6f9c6cac2f630498d52449a5d1b328a6d2ac1a9054a0658be589bc277b7750ab5d647a73a15a059d72608f9d299d11f9fb417a37ddc1b52c8b8859c2949e5ebae650b9cf8b4fd771288e582dee38178b154e681eaf74d4d3f35daf00a309" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"c2027d8c084e2c6fc5d535726312bc6362372872cd37bf07cc1c3870f3b59a970c62b84a10d1498b2e02027d854fd84dd615e29e7c204579968569386b6f08393322c4fb36da4398ec4881ca9c17905b7b2fa28722c98d404e93fbaadb165411d41256a0dfc806a19df0f526571c80f0":"8c5c93583dbba016531aecc1da7b010b9559785b2e8cf660ce17022f8d86be78":"":"":"54074cf184040f57716e9eef80ed0e006cd029b99ca568fd7639c4c1b0f7431933516830f5f87b157fdbbb2af7ab57f6faa26323f096c8e86136e49d833665a6cb3a22f7d5d38290c2e9a23c62dea6c51b958460b263566c5c0e4be9adcb1c123b55879f405f11b3c34c24852d33c64d6563ee46cad14ce08d5919ddbffdfaad0bef8d8ed9974f1d95917e2b108d9519b13c4f6929429d2dc44ecace7799839ffcae035904b576e71e92b0a89f39e3b3444b75ee0705419c3b3533c793605eb6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"02ef640b9f087fa48457918d7bd6e910d7379bdd89e1549118ec67880dc3c4be3ad95397b8fc88bfced5aa76941716bf4c26696e9540d759c8c6b8603d5c40df267056c79bd8a3497b77052e498953493eb853b56c41f3286c09f1ec88637f95a1cb7e6e0efd3acb8a8fa4de63d10727":"38e664b930fb072112e6d47bfc5538b0d48672a12769f3eb860243bbc1c5db75":"":"":"c399e8c39ab174fa8cabb7e73845d8d434dcebc21062edc69d02928b0de4471517496365bbd59062a43408215f5b0f35971f4c48077623860206e0e6af8de751e6fe45eb6648a66e8ac5e603043c5365be3015af858fa2709c6c7b1cd22701dbbf4ef27fa45e6d7f9df4e8a558517a38e26bdd82960db9a92a0deee98657ab514913f134cb9362756a78ae4afed3a6c89e86341a8fb20b5cdfcd56933363f83e8c55c69adbf8e8d7199bc4f93b72ae1c4d0939b564d98e7f052c66e1e0988ca5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"2f280ffe3306764839899faa89213139a40462039f4d9c55feaef6728c24cc636819357f6ea65badc8e493b99d5af1d995d14d81e39802711977d0a1c5783bfe3c290bc469bb9af520b0faa06f230fe6c4ba3804e39e3226f0731f09579e105d726b089d1c37c72e3faeb33768d3f20e":"e3d99860e8b1e9297c60b17904be8525be831d71dbd3f454f085d1758ebe7160":"":"":"45400ec700a4cf8309fbea94aa4fcbdd22c859e0f7defa746085a2f4ddb9db16efbb0c2fff798c99ff4e9e11986f4c330f3658e34a146f8d9071467228e3b0ea486cfbc81da3e739a301fe51b620d7d27fe9da0e4b875efe3c2bd0fde31f608015ad71cac9c95bce33e516c62fc45a9fc85a78c142416d7fbff3a83602dcce3add6301ca6b9be565e3cf06ad6f22855d57d9c184ed7214adc1bb014a1b6dafb86989283fa3a4be10c410442d761c98d2d3f94bb0d97ba1d5c8966eb47b0fe6ec" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"8f3ddc4230f8320bd18cf078c04c62e248fcc326980301174617a9e54351c667ba4c31a4c0e7dbd7336c27c0b8a034f6fd947b0a21e580e6c2dbfbd44d01f5fb4a51dcd2199df9f1803f24c5e774f048815302e016aad33254d308c5457f368965c15b6204e191c2a252e4fe88dfb978":"9bfe9bc055b3215560cd285553372c47cca422fca574c0d22d7ce5f2dd40b084":"":"":"34f550231d31c1b3a3db331d341ada3b987120d94e431831eea67e8d208f9cf1800549d445fc7befbdcc2488cc7f4340560d574fcd2396e9ecc9a232f1015cfb26db451623fe47ec8bacee1756573e74e519adc62b23ce86fc191ea5e13da9c7a14496426c6c53dfa7c7ccdb67d6164dbe88cbbe7f48d4971993003ab24f3eff18bd52c2661992e8f8da93bfdd28f01fc32edb439ad130352463084041e9871c431ba26c676ecd7812991833113cbbe687651e93aeb22a6a44cffc7a3fb214b2" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"8b285ce6b4da70c83fd72aab1b4be62101bf9b29e168726ea2f670aab0deaefc5da3404c494c6019ea33679e37cec308dab13e0cb060f66c1c83fc6fba46477d1a3c802edd7594db0b297dedb9ccbc800c817f05658fb9b4c99938ae2140160c4a16d548634a353bc285cb38d0e93243":"723c0f287db4af285c195cebb1104a106f22e8b243fdcd0566228ab5f227a9e3":"881a1874c800db068b5913d195058d0726458de3782ff530af1a761f9628547f":"0c27cf271bd7931d187ec6f56038519674468fa2e7e6f994904c9f1afa346939":"51e042dd56a193908c9018c25f1c1a8b5e2734b055c3b7fde6a8ba9ec2b959349df29295abb0a24b4715f98d31de0a369e6262c2b2cd49c5462b7ae284e921f5ad2ec013edc1611343c228683f4170f34a75854b1b656d226e294172d488c10a415f09dee70984b9c49e8d36863192301d1762145e0d9e94e99bd30ce8490438ed050f418cf4ba0b07fe90a82d1ccf38578d99edf0518c4a758a199db4d3533c4dbc55b1da19840b8f365a574aa01647819032dc0ad641388c2093ebd4ab5d99" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"5b5c670d3e0e97a21cfd5bc3d038f0c3d2578cf3147f5545e5118a04c4eac727b50734939e2fd0aba704932ccaac42af316525e3fc5f1dd224131d65f8d44ff8420891c0af7c78f9cf766097fbf0f8bfdd131db1801275c28081e6063c0c4d6242f96e40fc513608289f378bc4f18518":"4cb0e590a1d575b6a2df9cb0243895263c894a990b6798424bea9ef199761d08":"feabcecf0648665b08a7c690add6ff75744de3916d5573145c35517808605beb":"fe81cf8978798311ee6d1c5d6145b3832d9ad1a1266fdac0f4fa230c631e9ba0":"62aa5e9b8a07bed2a5d3eef0c73bbc841bb8cbf544d32a2889806ba501c6768aca98c19b83fd4fb2cabf120c05716b9eac9b77d561ffdd69682308f80fcf1c78409f3b21749bf71abdb209660716a39c2562e8ae1b3478828bf35ec9d3f9712d95f49a36b9eaddaf1b249f023c36d09ff1b6f3df6d10e4e336763edef9501827d5171c507eec405bae52d56fd62f90f5c58a2f1a7310530df15ca6b7841a2871a37cae583e6b388978c118b9600840f5540af529bce0a24da8f906f601fc270f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"64cf47e52f758df802c2b37a4841c73a3228738d14b439a7d02b13fa3024715c744721e49f25a0e73e821f69786fe2d91ec1cce1d1cbf2dcbe5bdd2371c0a5df050841b6f07b1a2c0d064bc5e06ecf2ff9904928febe0bfaf3626df5bfb79fee1474cc8dfc3ae268570df2811bc3ba3b":"c3f0b0471d5273f40e74ccd71712071fa411b72b0f5a98c9eea9a5f7f176967e":"4df90039bbb54d8753b19ccb6250ffceb7279c05f6d69b5c47801c6fdeb1ddf8":"181d12bb126ea840bbf9e6ff5e68f8ef53f69071d223bff593a63e4e0c65ee1b":"8cec490ebe0b4837f040663de29e2c6dc801d7953cb2416d245ef66173e5d7baafbb77fd2c5ce69b4b8995bfe51f5f33cfffd9e9b1284fb8657bb7a3c26f5aac500cc7d3737fc81418c94d3db1a63f4922ca49803c04fdbc9488e21d9c4bc381c48bd9f7e5cd1ed6c6fa9e889e463dfc3a313812245a66be220266707a5358e25807ccb11f24780e5ef82c84a8803f72dbd21f55d96362d7cd8abbfd9d21f4e3dfac33326a4e538476508afd87e030d92328a91c91ffb16b054740dc3d0a2130" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"690a8be904c75e41342c8e2548abde2e465612a632710179ccb9c1dab76c4615bdaeda1587772638a61747738b96cfc94879325d2cf1cc0269d877eab8aa233ba8d7f1ff44e9118a128bcd8cc687eef58940343d27ba1d800aed9e2e911a8c83b8460f9d72c7b92852cc178d3d0baf6a":"5dd031fb2df56c510b3cc3c02fdcf6cf3ffa4a881e7475a8631073b3ed5e3c62":"a0a861238b2b9ea03582eb4703bc33921b5376c27004710d416ff921d6e6fc60":"3cef66f75aa682ad5430bdf0f01dd1f2c3492fcacc6f80ab351cfacc1c6b6ce0":"92b337a3364059acfcaef789ac1ae09c9ed05fdf69f5d5da7a1c9b6962d3a3c71a4041dc234f7be58fdbb728f8f5fb10404558f21d9b4c818fcadf5d6bac8bcb044e5b2fbd26ee08398dc8904c271e8d3d184bbf61f77c62fd3c8f1cc1ee2f8c4620c513f3abf5e312b431e8608b29cdf528d892ff03bc0a9cbd202b9da1d052ae2bc2dd8723198a1b3017ade2803c3dc8733ac33ddbdcef7a9948d64f72da0716b32dc6eea224bd49a7349a1c32e8e325ac11e5fad8353cf85d9eb4b72b1954" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"0eba7b06309f0dc4e2bfabea57e1d01a5a3e711398320925647008abf19cae194efbff93968c0a7d1c7623ee1e3987cd95c3dbd1b2ba94d0b2d416fe2f2f6faeab46646a378e931bb5daac049333129ce7e20e53117a0f68baf4c86a3ee5e787b02b53b1e0140430e77ca86f242d7f90":"69adc69e03cd113c34ae6b89c7c2fcfbe987e426da865f7c8e052da4bade343a":"729489cc7ba4f3f96f77ff365fd5380cd83cc7b17b150d327c5b7632f1cb0460":"59892fcf99ce719819774539ed4f10edb7cd35cd66969137a88ebe6336da90f9":"565e3e392a9f364df0b575d9444aac262f58ce12312d5ac9832ae6351b6aae0398e0bedd3074f57bd4e9f0e89a50d627ecfe11fe9aea09fce563eb34efd27610a3255f81f953bb3f222b15c019b9d812150f7a1f19126994c505d9ce5c948882a1f6c5cdbc7050461ccdbbb7aae597dab53a12ea6bfaa4d4710188d690fb0a0a34df7fb6bba949fd6a8565fded8e4832ff7f6b08a653a72b8b88782b8d77c1f217e8487163fdbddcc88a83d8bdad479ca75fdbcaf02250db39528456942119f1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"9dea5f271193aef61bd72c76a581d65eadc8002b258a4d548c7ad1cb587a5f681e9709eab5e146833b01a79a34c352aa642a7a376595347c0203a8a0456af4e9859aea62c887166b3483e0c7acdd5b99a1b1a466dc0709cc6ba133abe29ecf3f3150d664d04baef8854fd86a5d8cab19":"895e5039eeb3ea1d197614a683c84d7780ac8724192bd6c35fe81137bc23e4bd":"9e8669a67bf80c695889a7e875a9ad1954b91e4bddd0848313b4efb4b00b14fc":"2e93a8b96ae1966e2a052db0d5c2d5b76cd7cd23494bb1170a33a9ddf39b21ce":"71a0ea8b9884e979f4ed546cee3688ebc399b41be38578f15b99d9621de0da3e671182f6da612334edb8d3a6d5e34c2872e277942854350526c3e000834bbe18cd5f2f336bcfabb42c4aaeb19b8cefa3f7066a89593960fabba244812d15c5fa7a7281067c789745127ee2b63b14237136c54864bf86ab7c377414a7933b829fc3052e8c26c698459a83b1990c093305372aa608c967bfda719e98c4c177764b72d184586f7b63a8e75f78c9e5e1dc045c3eb5b30c7147c69100c2cf910d4f3a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"2b4c85aac528f5cf44e9018795a1e8f810220ce318aa174bed9db372602c00f68ac33625739f299241d1a8381372537bac392411a1d6849aa6610a177743afdf45cc524838fadf1b5feaaa9983ca79a4508b5e4a275514ef4c04c233c3dbbca32a00d0a1628323b91dacbe499c1ba928":"799a4b3c9f62c2f6aa9e91604e742dd06ff9f77b15d3799684e1dfcf029d807b":"1d15f59cb3e102d5ff47ad4c0aae13631ec4d300de4247137aec5b43e5aa4f79":"f43801851946f97208909f1ad0f79d6577eeda70067886b270f55d626d966fbe":"f05e50192528ba1185cb964324141c1d195f6e26c42164052a7b7244797c3084d48bc5e6e1a27e64562cf2fa36b4de30132a082de2f927059731d084e2042eb7720932ae8e1741f05f4c75079586924cc43a6cf3f5525e037b089674121c2741f836372f219a33bfcd910884abb166eeeed1840672663e0455b18bc7c9fcf20967b25dd77eb37e00d8fc40b0788c08280b0bd8878c504d982db4d3d2476f5fe6785b1959d1bfa2762c00efe436cd217b6d01adbf7da08d23254f1be1991d200a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"a716af9e058eedbe937ef79ee21cbaf4ac1ed0e2f4863eef4ca1e3e972f33326eb6ecfa7bc9bacd3d90215a3db843b24343edf7ada9e440a206df7f38f8cbd1d38159b8511f2a93d1f0b5ace8a89c0d823fe001656c3dde659874df88dd60056ced293cc49d64a71ee6b23199c9b20e6":"648aa30cb2687d857d309f702f6dae1f30edc824493d6e83a9e26d94f28948a2":"39c5a6514f3d399ac41b2640fd619312332fe053abf1b2a19472a58c28345347":"c912a1bb84f7aeeef79d73347097e09f6b8fb7ec593176cebbbb56af866bc309":"5387674cec52da2a9743b2556fa9874c0866e579079954cb357f17fc069c2e345c1ca80081040d620fba150c22eb1b8b2c7df082f637855c396ad6417fd383f8e93b7bd91693408e951b7572269c0ae65be8bcc9844f9fd8401e68f6fafdce195162154b34fdd5db8559dc11cfd3cbd3d391a45065761372f60c5182fe4cc162304061f86e666326c3332010fd388626cfa9ce1252982cae7b6eb1b8208c79b7b689aae9084fd180d00962fa4eea79f612ab7ec5fb51394f6f498528ad5860e7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"af405b42f8a67c349bc10d4d0b97f56cce433e1d34cebcc75c2850010d20cf74f61b23e1d2f964ad6c9a8d65c9f87749da279902d5c30fb67207d72be55451337f34aaa8e598b9ef55fd36224ebee4b5524a93f1513fc21fa984f0a76c2bcc98ddf39823d0a87d501b3515e3ee9fd4d6":"1cbd963d49b2553a9711687bc50743d820588049cf097c100739f857b3928fc0":"e0d336ea552a6dbc132f194ac9ab80a34a54f4d331a55a070dde6601d6d9084e":"91e882daaa304874fb0c063718984ac53e1f0716ca8c9210bdcdddc142c84082":"0acb19f2a65bf0e1d9f9561d8731fe0f0c178443f00faf427973ad45f2df4f4d21a4fdecdf96c34be28e389d8caed96b515ecb215ca915b38c715015e1b07949263fb65517ea4bcae361d76c418cd2c58d29010ea79b9420d1cedf937d3aaae7e29c2170ba88c8328664d884ace90e88c66200033d19ffd52f668b00b0df088b7942377c1aec37b3c304521c394ec749efbb252669e0c0415b8b04b995fc224903b0843fbaf0be1ce804c9f14a5e97afa70d0fca9cb708ad20388730aa9de020" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"e9ecd00efafeba4fa9cbab22b1b5288c98a36ff1d6856592a288325968c31d7d88fd2be5c82d79413b33c1dbe972859822ca2c8a92e7812479c14fa292a627a8909c3a953a2758d42f22a18682ffa219aa9908e06f521be8fb59ad58e5651aa9d6b95983e23e54cd57dfc82b2077bf96":"adf1f50a295d88f68e8c07a180897d8e7b49f7cc6cb78a3b25ee10b0583a0f0b":"82de6a73568ade5e5b0d8ae37c40ff25e858a7055346020c5e47feddfef75680":"cd0e15d764d2355ac9f1cbd5ea519ed1756a3bfaa55e3783b738c03bdb42e371":"1e592e5003fc0f3f81a7aef2272527980cc5a9ac7286a621513b9c7ce2ea94fbfa255ef2654d673bb8cd13f3a033a7701304acbbe8d19b82a61d2e77e7251f98b0e28e1a694f9cba2c86c7c8cb20d9c2986e52052f701596e3c837af95b166cd227f2fc00edd3ea62b57f60262712b2f71479569c119cbce9d771f8a2cfdf832aa8d70e0a912978fb2bb33b27a185fb3a4caa3a18913aeab095ac088d14381802117af0cc1d97c06fe9730bebbff0adf2ffac5995d299e4defb0722bd93f0799" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"898a6c47a5cff500ea0f5b18b5f0b4bcf7e75d6d7c92025f9920c666dbc1c5ffc48972e1d519428f8d61dfb5e300b48f2660ff53e1ffaa3950cffc50e17a874182236fbb555d35ced33302ef87b84c0ad31e87441ae365350452a39470567bc009871a3c9785bda4569af33d03d46f08":"9e16568a225b80e9011571f3b55102cf6362e26b8a60fd33680d4e6625738e5f":"b1c65d6e51ba043f63b4251ed58e9a8eebfc289f6285705f8ef44c202c9b4a22":"245ee741a2041eda22ce7053f8576c0a43eae868fd95ad7d58bb921c155b1b53":"b076210688b06ab6b57edf68126dcdfce82b6f9285ddec102ed60730aa7530863076186a3f7affbdd4ef081b7f5a32fb461bc5755ab4f860012631b74ae357fbc3cbd64f0eef8789c6c9dca894a41a005d272b4a57e761f91d221636d0ec7a49f10bb1b4264938604ff4dc7bc97eb799cea9e3e1d7a9b4bd66d88d244e22120bb311f502e66e60c5c9e42731ad320b23d6b06ae92a132b093ad924a1a7e08b5dccdc50e257bfdb63bf5705350588f61e93e4fc5042a2cad1bd6d9fbc82e875cf" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"8e92836dc5e4bbf9598803efb0d3871e5418cf18f379479bbcbd9262558af6cb6d97e73decb8781c30f69b61c1f5c91a5ea1f10fb1eef74b480e583710d9a6a2e57f8cfc9d0215fa73d1ce9c1562f3cc34be187940cd317b69139ab9aa58d064b6bca59ee6460c3db4e8b57fab0186f1":"6d9afc769985218745235e5af280eb45cec81a2e920c284ed5c77105489e8f4b":"711672f2ca12e7d8f32445a87163bc00f5d0f52c2f6799ba513b68c07c350de5":"426aeab2cfa56cd3146c0eb9facfbc048a504eec3273256b5e4db3d66c89560f":"56325373099fc1dd194555c3a1e69358fc7f80fe6610412cb31c14cdc70c73a74d040746c6cf388fb9718e7446888c6162de73ac097c32f8b4b00dd7f115fed1821d3786baaa1f64885cb93c75531e99171f98d3c3576337c1c41c5bfe83f94cef2adebc88c0790398d4c071488699edd599797c1f8f394b3e00e66bc4b68a7cacd209695961713c3bf2c9a5c8589d935e171f775f366217e2634ddf0db5f01ab31760ebd9ed9724292bec89db06d0145fb824a76292a35f39b01a06c43510a6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"a4f1fd83e53a406163862260fb9e2ec64d4af74f5fa41ff56c07c791b6bb6abbdb203670b1849afbf0931206ad6393798ff06fba8dca3318c29d9161c0ec18ec5d7d66847b1a618bb0e4f69fa1331fd1db5d5fffdeec5a2e045c588dc95a5d5eac6d35502ebe2e6a57318f15af53e001":"39dd79397f91a97432e5124e7b9b85928f62c598ecd19626070a81a5a8ed564a":"985724541d44c8b865672759c8d36ded75c2189c2281731888a741b305eb4161":"e2dae75950e417c18f1c3e5fbd66b1cc9fa617aa695c9d03d8768b9e197fea80":"703ab1f6a5332f01fa788cf73922a9f6cf856319772eeab07b4795702562cde350a8cf9395976fd227b08134feb469ca34f675c9b6f176ad684a5b0d02b4c135a7174bf0604a1546e7d8d978ecfd8cb6ae5efce3b228dc95cb413b010732c3e7f9ef8e547a93540e5e4aaaa3b0e5a8f45b83bb11209a03883c54f41e494fcbc66c2d57c01002137567ea2f99f7a1ed6c4c6080bdaa299d18f57bb3b386278a78b2ef23a03043e850bd9fd742527c45308e5b910fc586f9f21de7022d02b1493b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"f331ebcdbc0d2dfbf54758680dd49dd0bd666d0505ef6ba1c4bbfb7dee62edc34ea9063632c8e6719bbe140c3c840aabd66e7702c384700921dc1838c6c5a832c650a474e74270c378abff021d60d1a1884939bbdc51c547c72c929c0c73ca7f78668d33fba197642be8ac2d41cefde4":"ec299e456cd1985a3f1022d5c05f0ef9040cc8b8297ba5e404d92a6d36c3578f":"954f464877f7258f99acbfb9adfe4eedc89da71ca82e3581fb5bad127b2069e7":"515f9e746c7407196610bbae963b9bc15b1658972a30e62be6f78caee1287e88":"5aa30a796d46e789c498352ade179f0cd3336418fbeafae0d10fbf7798917672288b3b2a12267fc0435d88b4e99809c1e3067f0d65c910b12a330334b6a23d6d30910d301438c2c999353e1f78019ba7b20eaf68b499ff1e88db0431312a66f35305c4f3c3a2750c95bbc07ccbdf1e4d123eec378b9be8894b597bcc029c664e59e2b3c23fd72841af0ddc9374ecef21885a0b54d13186dc0a66ed3c3caca9e41753813ae61015a952142bd4d7ebbaa3193598be1267be937745fb0de09aa70d" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-384, 256, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA384:"d99ddbd82ce9937cda083e30b3da47a6e6ca08b8f59f2fc934bb3f78e748bb28cfabddb375efc5f2025a53fd073a89b0fbec391290863ad862aa56fe6d945044e879ca05c3c019313f810dd559fa0e682d6b77ff7e612c7c40cd5231eece4018c5b3c0d8181ab44703f7a04c0a1c7c5e":"ebc2193d4a97b97d298f1305b2f7a54dab466f7c4e444831651cac29a6c5bd88":"6826aad41f8ac29e272884cb6d21300c7b0b3ca37205e1720afaf9f716f337ec":"5a7434648de82a3552e12aff800093776ca3e86565b29c0b3ad6c0bc3180623f":"cfc79a89a0a55dc9c6c6eccdfab5a9935335e806b73bab7f5eff5f9fea6aa3f47bf31f06d987a94e2bc2a4a6144ebe94d6f5aa8fcaabbf86a37c8d412207864322d3057b89fef358740c5962cf9e7c37072847fcaa6db693a5238ef270e8414e2b29448bbcc37dceaa75479c2ac5fee2d6fe9ed68516f6dbd90135ddcae8a12d1c1595e0edc34ea2bf00bee7ae773c240c2bc1ed828b7ff91a676891173eec1dabeecb2184df9186c3bd833e349351481655bda91bc0f4e419fb78e426de6b39" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"64a8afb71975256b6196f3f93038ba8b7a4d7089f7f268134cb3f5926868e4d104c60b44fbf3bc198f4bc58bf1260d123a5aaf8749136a86c4e5aba81692d587133d29d3b7a63fa6204ed84e93be6aebf50472d313ef5797d1a290a7cae086052b57e8d5a20ed22ec7702dd424d935ea":"":"":"":"4f61f6b5d46ea351dc6f8ff55bcb915d998c8e871b5e122dd95196da241c49a1170b1fc16ffa31a6dc4f0c4068ecc6e5cc0fa6966aedf72bcb19e666b191979f22580b6505c09a784e76f58d30af3abcbe840497ad88621a893ffe13af6aef0f8276f9540068943bb6bc51498a465129880df4c517f7fe70ec239c055102a78b8b0f26d36bc2634a0e61a1431850980c258326197cc80d07c3cafc49a20316a0fa2703f850b66ce274e839d6dddba4d3e744306d768b7437ec9c54ed864c7bca4ea8d0987d815e64f685e0726eb4223aa5eac1a0979fb335248ee59819c36c7c94dadf14474c7e2f10678da59f255474ea50c3ed5ccf86a399ba7f54ae96bff0" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"e5b8dbea654b559f025c008c1f3b2eff92fe98932b0271228e3f4efa3303cd4f112660f48057fc56ed0eebacf559cdd14f523a3e948e8037427e65dd25c1eb41560f2f78dee139b3d721ba1c278c3855aeec3fd3a44a5331c8f54396ec3b9ba73c22da8ae1adc9748178d7d21341f7c9":"":"":"":"9bc5a8c111d4586131faef63689d0a7342bf601f04926f18cca7aeeb8edb129e33cae10e9e08fd44065db2aed4480b75878c6d1400d38fa2c9e836e4a6bc1d66df571ffa1dd0a073b89580005a09d1ce81492131771ec4ff987cf8a3260c9f90fb3ec07b82ab1db526b97ae856282ff7c62efeb2cedaacb75fda0b74df5e0e766a3573a829c32f53ef3b16ffb9d4cc1cfefc84e08aa1864f5d0fbe593abb26b488c90e351816e2d1073bcbb599b65b196b33dab9095bb28983172f3a61c992d44345f2947e1acd2df96ccaea3f6bc4c024a4e36868e358e5bfb9047ff11daeb34571051f0823265a15be9e4e4d64f7073bd5dc3b43ad0a4b39a5fb6bf4b154eb" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"abe7121c768208f174ee9e545250014d031ebc647497a60e18e3462517027fea1c0e3854cfe5429bc105916e63a0d5a7585cfba737f887852f23a41039cca6e33de94901cc1aae91ac42db0ca34724b07368b1a3ab733dad24aee03bab50eaaf2acf15c2c700e5e070097132a92ae7bd":"":"":"":"7e082cce6774a3d21ff39db1ef9ed0251a6434462afd29fb8e05458b9ca7bd181a9e362ab4986c19fa1aa9bb1d00f1c3479b2b4be1512b2b5eb94b9ec0493266b6efce73d02d6acc653db9e4c194c7d169781aa78de7839e010adc7fd58efc988a5eec2feb89f2d0dc45ac6a7d4bedf11bc1294b4f312c723acbd664f28f85f676f3feb7d2d2db14b0acca2ac6d83d2877319cedbf816378365dc51368e1686f2e3cb0bd670c125cf484cca7d28cba04a25479dcfc3f80910422a583c35553ac7dd6d5a43c6cec465dd6c7ec33712c9f2289206b0f1e620ed23a335a95a1392d143fceffbc2f43a18c3426de0f2f1716f7234bdc880f61e3a1c1c2c57fe29336" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"07e570fa7cf079e066c5c30b6d24fd37906ab7aa07b1551be605b31f86dbc3cb3e95a0723e9344922d14185824c483bc5dc8341f10d698629736838fad6a190825a24482413b388265fb20b2a8e7c078b91090c97db01e6c6a72d1c067bedd73da1d7b1575b05870b8eee4343bc42213":"":"":"":"3cf6099489d2eaa6bc427cae2bbb4a1b121041bce2a4f8e747a3b4217910905156189420fa8b9698a8a316c537229a42509be9e75f7dbd5241de932475114fc9232c3325ee8d921aaa680078493856c2d0b14e6593bc3f36e0615143fc336054442e196dd152f53634a2fa3e74417aa2dfecf4367cbc1584cafcf583cbddf1283b73b35f9d1f1ecdb7104b80b838f2c1464ede50bca05e960efc6b62f5546a0d02e3420cb857050b49cb1e3b4ff8a936ae4aa7b1d774089c641d96a732164ee5b0cf77f2f729303c53de66e9d1b6f5eabde7fdd55bb7030671a274e3f7a41047d84f307dc1996d6efb671df8a01ca6ffef81950beab98a3e480cdda5241b6d69" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"99fa882ea5aa55ec9682719721a8e79d6afeec5cbb3577f1df7fe97e4edc479040efa1e51f8893210c302f2a2a3abbac2ddb3fa31758c8473a6f7c50d98e423ccf360a2f6a5d94f7ec6af04f656ad06d20e2be7e09f728b64f81d736ac3fb8263b0f7808abd5d7b0bbae1d4b3f445957":"":"":"":"5807f478399eb17159b096f7be7788769cf56beea8cf4604400f77b1035ce0b3c5d9afc256850445397d5c75d087de12f10889649d4e749ca891f30bc397b58a9b3c6321a08b89845e186e9a697377aebe36486886f74ac3bc353f033d458ba5d94634b162086b4b74563860f1f079be32789f8bfdd561e486839996db8e1de25583e2e64be914329bdbb0a42a13d668e47e4ff635d01a1daaaa29ae8459752d04b7c8ff5340fc8c97293f2b7b91c2c8e3f0519878c82a61a32687f693a64c3c1a222b664b83570ebedd96e8722ba6125f04a8ebb079597394de9de36ca42d828f90c7a5fc74d1ab03be73f7c5ffd332b90517aa6ef8c19aefed182de688cf5f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"75336fb0006f7aad995ae01b3f3ec24cef46d3f7ad07798e52f609ec34b266f1cb51865817281103b3be2c2bece85487e979f3a31ba75d6e6e4b357811b4aaf5fc958406721693eeec21e8c9808ceefbd17a0a6d5664162e7b988c19dbc911b6e3b68e90a1e6a3c9c5a4662d954ef5c5":"":"":"":"7e13788c362ebb6e6ae794ec50d39c2cf2bd25d8769ee91df5d210b3bae5021801e0d59ee503ea177dc01b3c606daf67a2fc8afa9f06b2d03759e2191d6dd0e916b5d21125322bbe9802259366a43d64f94c5408e62709d806970a83dffc4d78ff86dbcc7540f34dbf026dd308ee28971ee5e88681b342d15dbbbaff92a51e4b40e4c50e0b1e48d153d5d6e950de8a37326ddaf504382e20ffa85bcc91fb3f7f56130ad67250c7a9f1ee5f76cb265d567d448c50eec4f35c222331bf2dba2b00cc660e7015fc1e6a7161a01ccce02b5800cc1516c330e76f33789fb47ee8e13870ed588d145c016c3f73c6b64892b4faa7dea4fe536c5349fdd171019442680c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"f6d7401663547661563e5b2da208f1f8a4a0c17b97ddf0d4a4c1a17c23ee8c7d00d037839f2d95dde6a96886cd67c9a92fb7fbf77ca088d1e46f2dc386e16fb6f1d178f7c1a3dfe202f05d52ca20fe29b8084a9d597fd6b0e53f41a13fcefbb8aa5d539c7b09d8e7b8f687b3df92c606":"":"":"":"4fe6aabcc40e158316e49160ac523c41d4df8cb041e11549dec0a40cc854fe4b160fe38a1cc22b779789ef07012735f457fcd2a5594b344783cf6661d83b046cc403b1feb96cf81b05038dfdb40d2a027ea4ba93caf77f53fdcabc361ce48abba784fd9feb722c477cb9d9651d9db6d088e097a93e1dbaa2c3db1503d65680bd4b47352b04387f9c15a1c3a434e93ecc39647dad810ed96997f107e5131101ce20d4be82cc67d05309373792e15e2974aaa9aa9bc9e681815e07111f1f980fc8ca882478c32fcc3765b8e422a5369dbf36f72390ac8d3b728b8e5deb3d48e9ea85a31a0432b813471e6b02e4a12ed1aee0ab9dbb3c3e66217c45a174f9b4ed3e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"98bd225cfaa81e2111f83b4b3b2dfdf3507fe18aa97100062bcb5a1f665c091002fba3d84e3886048f67bc7f06750a19a65503d83a48045cd9b128c56c3e474b7d658fc590348bd9c14013fd20d2df32dbe9f9b73d47e43e58a6ecb5f85f93b3546817134746016f6886f6b63be830e1":"":"":"":"05cddb6391c5c2de3db999426f31238b5d3e14a35623272d6a72c73947b3521017cef377415dcdf09ededc0d34d9880b9c44f28099f270844e58f9a97f7388df83717ad48972036968e63f281fc0abe53135867cace0e427ccab04e0dfa8108d87a0b7cf7be14ab50e59e4aec8d367f54805c534a9ffa2f3686712caaead514caa30b1ca06c668b5f271ad8fd84909ef122d2fabde7b524d42b925a068d0bb265cbd7c6505a4c2c0bff7d47068b76f350fc85c745d099c78bc73f9ea0796381903e0d3512283b7fad05850e1bdf63b9cd52eebfed270f1622f057f102d6ab19c63ed59cf2cc1e5876257ab03e20e62f3a77761da32a5e1c2f8c95bcc7534ee00" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"7a324a646b53f28808f7c44303221ab36324d1c97660f7c333b3baa7537d1e1ea038b8ca6c159d91d02f3b206eb927570aac85674b59f419af2660cca8eb0ef996bac65dc33c08a946fb2abb9348dd7ebce4c71cb9de11b8d59aceaee2c9a29b154633df643f3787c2672ea7e789a2b6":"":"":"":"3c09f50bdc35e0ee8bc033da716f68fb71a68a339e26711e63f564723a70a0b9b4b01ae5422c8ce7cea7be0b35f6bbcbea110afc9c448d85e7a87d43c54ce117dba86d4b95a754c77a4c8ef5fbc11c2525173aef82f11f482611c426887643da6daf51bb3bc462bd5efc68b4b5e7e07c7cd991a2fd8672a8a5d8490a451d8df92057df0bbb8a6063489b84bbb0a75813ffcd498b146f11c5f16580dffd38812e305caf60d133679c2b8c9564aba044ae0192a9a5789c99cf5ec40a3c775d5976391d6adf9e4c77ecb0a8f3169bb3cb7e5f2112e18c44fb7505e7d5c4e6c0f425e8e552f75a340923a3186e49d7df1a3dca3df907115c075d39844548dcbc7655" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"59b84cf5a29b45a3f8e0ac384bed20d970f2b6d89661bbe2af90ef073eb061cbf323a13d0643dcdba902df168ded7b6094e18381181d91d3734cfb4e44cd4462de81aae064a9ae9d156bbb14079b78e2f612c2e0965d15b2563d888e2034d06e55f939ac2345c2638443f83b59152696":"":"":"":"88ceb600d0c319c5f22e4e91c5a1319fbc752ae314868f1fbc6a4d1c0aa4b5c7054d64924f841d06392294866ce399d9fa2475a4f53f42853b68f9851db002655dc96cc799fd6ee1d4498f005e25f76efb4c0478957de4b26deb3102c602fa08179c8ef26ee29e9c9e896c122e02650dcaf622fff729825aa87026ed8dfa96e9fb1510d9be44123dca5b9521ef9500f6e3832a7897a5e513e971f18726d32848a6452ff7347d5d8df6d401eca2b83c71a1d806a5374bf6e6a98013beecdeeba9b637f23808ebd39fc726061ad3ce44b02f73b2e6e7c558b74bd4a085c445100c627f2b71c54e5a43b7d36c131274c04a0941fd8cb584dff445037f622f4d69c5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"64688640a1d3f610528eabe2948e2eab2b453a8cbbccf58bb02a72b1bb466b8277f2c2f829fec66872cc8d6c03280b5074136e7f3e123d6fb72786fc29d1b55782b7283285cb53c4185801d2d7333b8ce76c1c661c1ef65864b8dddce781f5db520c666fe07fcbe4bd5ccacc115fbbdb":"":"":"":"a7dea45bfca9c6fe4ce5650369eee402b747034ce93272ffc44eb715e49e6fff83ce884956ed4eac3c76b5e664403040cce0d5343916a93bbc16933fb451432f14891473c93be2e17813f8119f579bf7207348020b2aeb7cf725a186db21fa9c16c27d63ae28b5d5299f163ce8d28739a1d583579a1c462f0f73ab2b6b0eba5b493c2dbc7d9d6e0819d80868a6b001971e8c205cc3b472ab62cbed1e3a1a0c0a6f95c5694f513654d7a240bb6672eabb745bc60024cdfcd8179fd3d5300b878ec93df4da38e00fd66809bcd8f9be8384cb16aead77de833e90c034ce24b18b096a84bf0281e0462e9e3a43497514b8eb283edde2108d425839aadc9e68ea4728" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"d77985d85e130fa02ee13b55cc7372c23565a56f588c70154b7d81dbfb8ef66ee861c781fa258019ef91d101367726ca46a60c705e0e3a305ab6a7c5179e6a14c6e7de93e5c95956660ba7357003f08a25a42e9bfc38fc882a063586285eebead74a78296c7c3e8112062d7fe1adb232":"":"":"":"94307b991cc83f919caee64c25db23bd3f456585b6edbd6c8256cbd9d12b8430d0f3be857d42f1437228be13ad5013e4539bef591a818c5efc7644da270857f61373008c614a06a6fd5fb5895f08d5ac4c84b5060498af63459629ad038d2f436cb5efbf258f9d2f1e491ec6d0bc0450c092939b56a489a89649c1ea700fadfcd9c36b8854320013de6c569234f8ca0ab171b25ae93048fe77e72a0730f6b3edc2fe103c82b78698c497db534000db2410c7945cb36da5a451834abd5035b0d4a6938116eb46014368aab7582352e2788691ade1dd337d7610cbc327f3664415c870a022f75d290c83d917c212ae517339d596c3a1cc4a1cc83cc7a1bd94d6b7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"ad321095c835f2c49f3abdd0f9117cf8ea30b237dc3f1eff7728fa9b08d4c0fc073c82bfae1b5771728917ae78d5e22f4989019b13c5f04a420f134d1cfcf1be81408a143e1372a468c1303292f717daf4f18ccdcb81d8c7ac6562deb4e07a9e146900123f39ef49a91e30e22cdca22c":"":"":"":"be680715dc989f5f1c459695603b2b97644dfe17f305beadf7cd3ff23a523aa61f3074f5c533cf8e88ce74888f95cc5e463de4ccec3aea10498efc0c335692fa648a1d7eb774037b993f7622a43f9fc4c75ef3d1a473c18216746dc7341dc9d78e7431291467af9a8c95d86ff407335226601541da1fc1220b5385d18833f792ee13f11641e2efb56237ae9b7ab9c1a87aa03a442f06cd7a18d8518a029e36e85369c2b52e351d3b435579938a05fee87c44496c4ff044f267f31e6d80f149d54cbbef4cfe5f249a6724c53f0a2082865eec01cb78ddb07667b40ec7391ca77fb48247b31b6dbc15fdefabaa6cc97d0bf8ebd34ef75cc48d5ac47899c89800e1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"67569721ff02c3862cefa68283ecb5b9afbfeb8395ae944c55e5da1b21b6c2270f0100b2cf014cef7a2e85dbf2738e97f8ee97eca692130d6541fa900eeef6b9858497faa2cd47c6874590190da6d5fbd36d2a1e124a94311c8508b9f70f34b97c32df3947aa4a0bf197b1ab35172233":"":"":"":"8543aa086777415188ef995fd4bf5ce52776c6574b7b769aa61d1e83a4c3ac4483bf90b492341443d6c92e14fe7114558d1855826e41772eefd54352a38da94293e317e0a05345a567e30e2299aeddc4980b3e797b7c980b822ff625db3ffed1f0acc314c11e2b62972750b0f448cbeeb08b7dcff21761b17fb63fd1655efadbdd6793e27c47588638c03348ad0fbc8b7772b7f7882b66b9cf4947c93443f793de5c2a4131dcbfe982ed2787a5cb0d99ae001707d12cadf5059eb4f373e7b5e4a99a28ff18841f9edaed7558ac0d062589cb3ccecaad4d9d6dc1a7dbcb35aef7a1738c6c66ba04e08f693d28f7499f57bd8b02d97eb3fb36d8bd767eeee07096" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"b19d6916dd39eab11165ff2066fea53f72488a78eba473a0e141de1d5b13fecd79e678b4b108c65f9c38fb2a2e5c29c4ea9dd450593b6b3c7be76ed2cf8baa1b44794ebef1c1105a445b79aafe471d9f9881be7e81282bec46431b505ca8bc5049da52cd4cb075cc818bb79697b739e0":"":"":"":"abf29caa9bcae107ac382204baa2f46ca2742090a3c895e41b345a6cda8660e44000984173f57e79cc7ab869d8d9f7f2d855b171c3007ff9c82f2a5291d509b6584f04346361de9aa373f587b6ce8cc43d589d876c95e813890c26ceae61bbe0b88072cacd0b857d6b33ad9e562c8e1aa1592ff16cf683e81142caf493896fdb325eef5ab6ef3238cc3eb3baea05825e57533ad8cb707b373d2d0a2c048a07bb40a5a68d14d21a796fa97db06331b480bdc39701bf2298fd3405a42f5f6b76b9f40dc8671db632c588ba89210767bc165ce88accc78424216e357cef52a31e7601d3f1cce1b5b5d71c3d622c9f68092f66787b32d241716996b2392376c48909" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"73afadfdf46ac9c528059ec5e4f940f120c19beda8d5b12ae692c1d3b12526754ce532c291c8ce823aeaf923b3be8c438d8b2a82162bce020237440d3445d4ef91793b983202b0f8532be2d78c34469d2c67fea05495feec67b76615967efa6f6bcde5bcf18285dd3d8f9b97b3463813":"":"7172619bf78c088c4f0d5b358f63cbcc019620c6ea9ffa31e040ec0d51665989":"a0670a6df2033cb19b082a3c83fd2eecddd9b9caebf3aed0b781ae9d4ac8bbe2":"38ebc242f240569f792379afe393a76698fd07dc05d5c86d00791c1b9d1d79f180c4360fc8f2e5332a961198d7486750671e14d39a2b4852aede2ae9745484ca05d7421191571d334cd714b9433ba026a058cab5619208f2e54f2d48286e49bd0b528d05785beb4ff8953fe875cd2c92277494f2e315ab2790a1cd58f02224387470bd7edb3181d2b587e5c319a262c7806f8b75e59f2857871d8a182ba0366cd3a968023c22582ec7bad2a204de0eba3d24566f213c1d88ca2b2ca8cafd8149193949da885bd744323f31b39956fdea7bccb1d64d3f14afd03e1755962d9df1f2507098455584358e951f7ff8619f1aab96e1481ede5289224053f603a98ae6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"cd453c328ae68152e074e18b660f03668cf264eaa4109afb941816f7bf1f73cd4043d4692942472482f44e7d6ba5486dbeea1cf1de6ba6ea1606cac41a92e34839fb26b5a9bee5f4f475558a5d8f673d838247ab81aaeeb2a72be405c3d24a625df7476b1133b56f6e7aeb184f73eafb":"":"c6c23cddded140a30079f35cf9e2dda6bb2b277d8a212d2fca1a83b507808e79":"edb8c8657883a17093ffd355e8145e26f65ce7071ba38c89fc031040996a9705":"635a7dbb7ff1dc4a90ce91ba13d79e09819ec7387c277c91946b59fad4bf5d606fa75cf03b6904c60f9a70697e662aeeebc7ba2e6e94632c4c5f3e1686e6e9497945c8889243719ad066847dc11efac141e58ac29d6d2779f702cd1d5fd0d82d232a004dfdc13c09147a77d71774761ab4e760a9d2714e9ffc52402633c8c3020b7b9822b177976f21b7e98cccea4a7eebe1cf9a604bdfa36f19e44cf4308172258576c3615cc26418e86a7269e0f88af7f15a114c5b8c6f96b8be098572aec4129fac371736b2fa0a88f1b5480c7c8657dd515417edbcd902b3d3e9f7e10df45160a37284933dac5fb105da145ff13f677d99c494e279b0b1990234fb8ed9d3" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"3c4fed3a265818f6a323b9d52c04a92698223f3136c77428b29e1cd6fddc7e4da48d9115c5ad18a4182df480eddd529f35e2bd1908dfd05964cc3fefe53c38615f04ca5e12c06872a695971f9144f6b97bd32c620083a379d4f56e820105c5f5b0f98539936d05d57f6afdc191cce7f4":"":"7271afbed1b1f2be5643c5bdf0b6218247a6128bfbe2ff4d745a926a3f35d0fe":"00022d8acec09266a84673d056e7b235f0608d15989ddfd7059647522cf3c3e4":"610901399f45ef5a1b747c57b73706509f569e3a2dc84c6603f403cd49e99e288c9ab77d00e974eea625435dd126e9e783566a71396b1bf6364b36305d1986157eb59fd231b6aae35190347e1560f91bb388823504e563cd69f84535559a446ef83ae625cbd1c5a4d114ff394d407f19c8f9f906290dcd03a7b47091ad07f3b190b83de5787dff47cc54a3d53dd31f756eb5de9f7c965d70176a8ee71fe869e960ad33cc492e9568e5748f9ca869ff143252f4c9ec8a0bf937f138f7ad268abeed27e1d80bed0cb7b74411989b313043b1c65c8847cc3dd6d48509852d33903253ceb074dbc3d124749d8a8e41d27f96f7fbc9908d4ecbf04f60187f1a42c33c" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"229b3318cb25189e12ce9ef25acd08bf56c631c6058daae6f377d58f7574576a4c0b7c634e11da5ccc02be824e6effb8ebc0d5403d79bb30572be47a5ef88fe35a0421dcf9547437cd3a563b6be7a158a7f601f75347509a12dba8d7f2abc7afdf89c43fc5538318654fbc90c3f51c5a":"":"f8f98c65ba1f619d376d41d1dd480d4a0446de56e0b3dd007ef7e1cc2bb98def":"b3bed7c4c2e1a762209b1fd2ce9ddda8fe47eb70225e60d5c5887a61bdef0009":"2467978b293afe33a96a7291286eeae2b1c8b5753ed4d45b3d5be906cf30a6051095cbca79d2871334e049b729068924a036ea914a5244fc71005385ed6ad7c7cdaabc267a8ef0074b14189763b5de2115d30da70eb815262aa511e9859b9d1cf2810c910bce18d179a0308fed6f6f911cde79031ead39f499ef85f7525140f1c497fabd879ae130f73fbbfe8c3fa749df48e484cc2fc313d234b5d0b49690988421611206059b42f6d72b0e5fde6bc11291b8533a9aa2c521e54749bc1929b71ff05dfc8f1716c9fb13cdad16b35d194a48ae377625300df479d3facd20c3b8fdf18b88b57753065e542f147248064278611e99ab92b33c68aabc4da08a49bf" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"4cfbfda3fe8ae7ffdd8450a52c78388a6c9d93c6e3ab537c91dffe23b5693158b7919e875d9ed6827a33d5ec5bdcf061c311aee36953d13c16f0e50f455705a9ab7a436b039551187a0f42e5f90b40cbd44e98cd5295550cc46e33be6f073a9e6c02ace6b0f896f9ec56ab7e8be7a07b":"":"9d155d6754ddcebaa3dd28ba27946ce3e22de29dc1db8359378390295e5aa287":"ec634fc86bfb45f49a1197a70875d7addeb257f1245375aa1f01b3bc359ed73b":"46f5a6402ea9e8a008925c8f5540c4366c599166baae8ac762da101550352f35ed9d34f82e7e2ce042cd3569be557e02aa87163d1e453904c5fcc998fa64c8e18fde61a8e54c21ad4da060943aa79de14317276414e71a8c132053c4dd35da0da1fbf7f0cffd264d887c8ae4f358afe7e8a1bec60fe7b4696a6b1c00fbb46012937b715ba8eb173e09c1316cc361819b24f7284f983b6824c39eddf3d0ba58e82a2c603d854cadc41d5b12af0a67b367f411c5c91820e414e30b3d2cfde6876a3d144a900eb2dcfcb750bdcf09c0a01db79aabf53e7f045b9c824c8662283bd4376c7179096c5c9c784d6c3b998c4d11b7ebc01a4a562852b9b82bd313fae0aa" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"3351a083c1f6033be5cc879eaf34e25542ebabb2671b65f726e76ed711ae073e9bd7ef6d7888d6fc31e51dc7f60e8b07cc6fe94ea0f22cea1ad54ffad09700596f6320d980488ad48527f4e00937b6f736ebf1b9166e20c5b812c8b85a2a29d91ebb021b19d2374ed4e2895d1518e6cf":"":"9497a1c85796846de8d8b70d66d369ef59bd91203660d6df2935000e8bfcfe71":"8a681d6cbe1cda5e0f9eeaed12fdac75b7bb33d28d6855d498b6c61cd7ebca57":"5148fcd7c01eed1da1d8f68a706268b5028e4f3435ac5bcef9231cc81c6b6823156ff7432e51651d0d02d92e22297dfd12a9d507dd3137ca8ef216f969ab67f54c8d5fd5c22c9154b6caba4a147ce4aa20647e2bcdacb727cb0810e4106494db0e25e7e6f939d29129b0c5cf47adb35629006e6f5c7c1946c1e647d9aecac7fcc488a1c868378e014fc68afb684e1e043f53fda4431ff031107cc23833975bdac060783f9cdbe96ca164ed75c3280ff355e25e165eb36cdd4d651cdbec053a38b6406c26ab6f16cd0ffe1e8e5a017e25c5c93fc7ba11385164337d54123ba03e65c261e8379f2ab24aa0d27f57b9d7e0fa825f06986a4fb9b9973adb87914cc6" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"3439b57a2d19db8b7e10ff9a34ac1d29b8d789b05f4cd2bcb0376c6e184cfdc695c6e26a0b15b11a685438f48dbd7433d63119fffb5e317d97a5b3e23fa6228221caadd163b66e36e41d1df89473ad3a114d25c8093128e2219a7f2206621b99ebe673bbcaa9a369aad3339927773b57":"":"dd1602f833057b77a8c763ec5aa302326920bc2dda46b4b83b3600673c1f4627":"e2328a109a4546f4311bbe3decb53b3a1028984ae73ef8849bf682ec29c9b5af":"e02326b477271366128cff2c88b703814c52547936ba90e776e383620eaa6f2a0aae1cbc6bf9fe8c395c088edf27ed3a3ee6f242dd6a6c3deeb19fbd7ab3e7d26b8c6f42f86803b885c733aafbd1c59e77e43277e244c0e9afb0629af510d03f6eb547bb0d455163d14beca53afb4e756b82ab5610502c1d74406222142f1cc1a41b4188d7994397a7ee7195482f22cfd997a611816e331cc62387c8d28177ea6727fc773c16278194b419f7e99fff2593bb0e6644ad653b63de83b244fcf531eb6db5716e60dc260510920754504146e4c727aa29b5659aa97a3ec63d07f9387277d487e4b855a6ec053289af6e17284a6deaefbd526dc3a379e5ef4434c698" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"f7c4995379079e036b9b10db6f163db23bce7399fa8b6268099fa5f2795b67ef06ec674197c73fe47eaf0c4986dd3566055eb14934bc8d5272baa751267c1dab1d52da6204ace6c869bef56eac006abe8eed565693e1854619266d400cd3f70222b6c671120173fe918d229d5e566886":"":"23ec7d6ba9a666ab49df45eeac006ad1f4f0e2aa4da2061d0429b510ea43d93d":"299253ffb0481d2a1dc2ccfa666123a3bda652666a77b52a32e4cf92a65f0d61":"4e4573833f4ee5dcfc4fb057e3ff8a7cd621b1c7a51fa4db8d02e6b62462ea9ab62414cfc3262569192a5960f8c3ab164ef2974ee03815281159ee50272730881d997a28ea2f9bbb2d7f2eea719416b80c73598e524f5fd9b41d17f386a30c194e2788278a61fe3f5633395e28a8f142e897d3b6cf34c00fc84a4407e0816518b218eb08a9d161981c84bfd3e47f3ba36f54587d62060e0fca65324a332a9aba7cc1d0e842bdbcc8b1bc57432f9d70e6475959da2fff2590438bd7b4faf19ebbaab175655189050781b7c7a27e9867073e1efe45b47ba3f86414229f5d2cc08a1d801f731c3099b747c68c1e6ca863a82265d3b2819cb0d2d4e80078ee7584e5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"376829aa929aa4fcad37b41f3a23bec28386329ca689317c49bdc2beccd5066b92e763dbe8a80fa1a1d21c38130fd999df05446bbf128bf23834d8c7cf89ceb5ee6b21124eb6d4966f0f5cdfa59ef58592dd2deda2f611b6c1ac8ea1b1dfb3a51dc5760c3a7e82fee6f09cc2b7a74d7a":"":"f14c07e0ca886373c563ca544c3ed069de697c538afaf009bbfbd935995955f6":"4d71578fb5a3211d3bdda82396507fe5193d21a2f70e6c2b03828fff53f5f6a4":"f6df98f9c4f7dc64208aa5804be843ae9a989bab73f6a36b603d1549ba0a58cb6511bf5776a786141e48305856b1db6f641975d0cb5102b51b539496438cf4cb905738c919e1b06092f1af89382fcab4e365688adddf02fc7ff640e111d5f3bb2c06da91a77242e1055c0b56f17abe0807b18f6a93f613899d37762bab607c05467dc89e58b21ac50bc01fa52d1e649bf74841b9643adb4699ec6ec0bb4d297c138fcec1f4249b9f9ab60c2743ab18ea5e202114260edff93f4148ca772f94572398bb387b78ccf50d6200f7369bdec44ba6403ae363f3b710d464b6f9389359030b61b2b6261addf488483e0c5e4cf854d9b601a1b1aada803af8feeca913df" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"981da820fa53e7184a1a214a114a943953eedb39e5bf2c3aa7028aafe57e482bf4c0dbdf862d55afbd0f0a97f6c61204711b46a8f5d1a69089add789f39cc3d6dc7fd19af6a630f03b1496d84aa83f1eb24c0d354407fa9664ee5f4c8de4ea75f05a17621aa9dc58ef38cdb9184d24b1":"":"2f4d6b4724cb715b0d553ae1ca6f3055d7c398c1c031a3a69946f099116d13f6":"76c1d679786f1752bcde1108b9977311f4af9e3d5f5fb9eb52565d0eff90b4f0":"a5b531a51e8118f33b20edc76adcc36fb0ba8e7f752518b84ce712479ce749ea893fd31368b10dd6832f9f2bdbae488dd9668a80c8091dde61e58336a8160fd7a167aae7a1d0f0af077f600b5ea21e64847901ba658fe40f20083907b25b30cad314cbd3f194f8be407359b94be74b34e2b4e2ce7371c12c28c7c7bf0032c03371a6247b60a113d56cf938d1e4eef85785fea90ed45a1b50fa40228fb23f154175fb0d436ad726306659e2e9b6a816e9f0716781a774b2c3386812e872fea9192fd9fe148bfd7a987f74d1c7e7b60a00bde3e4ab53d3fba5df0e2cb7a3cc6bd462e43b93871b3e238634174322a88078cf386fb210aa4df2c69ced8a4f72b2d1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"909f30f7186bfbae0615a701e3fc362fc6e8ce42162cd16fed11ecff70760d7d0679e0b79fec33f83bd722f2bca339e791e5db7af16fa629c84d1f4778d1b1dc24c9813711507349c26319e18084755cc392c9c2f2241406ebef3985a4ccb46b2d7c5f8b79321163bdfc3b5e21eadc89":"":"1fcffb9b047f2e904899eb6aa815b2eb51ed696db2478118c4225b7b308ce069":"becf0c41d3930f152260e0e6f06355bd0c1701b81e699fff7d8e5a750d57b980":"405cb18185e295e35bb8f758b0392d8e323555529b84e1dd0823586dc35f25e27c5a26da87ca57b1544d04b94cca967df7d7d89e00d3c919960e486e6f4cec6eac1951064efb3311e4be348558bb693438753460c65ace14479fcc44915dc6b223900fc84add04c48c57b2e9aa13c69a2cf2b0bdd2b2cc70c49a32e5fa0606fb1523b1da894dd7f6973050471a726fab3ba99de3033ea5a0c21e687a5ec9d66ca8460d74e5b1b99143ddfd4af6d95f6683b103133caae77649f00652f1e78295134ee42cf35bceb7d52f6cacb41effbb2ed661d8f89bab51a90c70862ee5fd5d3c6060ba0b5a5897f796f4107efb08e5d82501692401732abf5237e0585c9483" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"9586ebe27de089218433143fadc74eec6ef7c8d077536f7ecb62d412ef0e163437f6d84e8bc6e97ec02097815a99c338c8f3434b286ef26b1c234ebf1bb1d216b14b4c3b3df48ac3283b3ec9e50c9124a717eb398941ec0801f95ba6108bd9f89d9fbd72d6248ae50961354280d92df3":"":"65d08da7a1fc390f2400efb57520e16da932bbd328a236163c40a540de585488":"a1ffc217e71d1f1047a9657d61ffad559da3ebb75d5af74f3a1ca9fc5b964f76":"0e2958169b413044917124f867d8fd4b865587505d4a18040012319dbd472688bd90a28706c56bd1549271b1237a5cbff1844b8e1947ab97d0b1d33bec5ea32ba3bbb5b0986d95b8aebfeaa80b0a132ccefe9013cee4fe84597cd2c3deec46e5c4419ce2060433cfb696e34c6f3d6298f501a56dfd85ab8a9ae8163e5d09c707cd69a3db0a1ef4a1cbd9a75396f7face5eae9d63875898107e3043cdff7f6a7fed48362792b7a43771f06d97085525f5f38aaf38d5b668dbf84276c258029cea7435aa107334e69ecd50ddddfc8cf592373fdd7cc28eb73e9fd2d2d541d0d88f9fa1bb62ede17667f4c32cc9ae2038fb7763b922c34d70d5805d3896bf8319cd" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"90b824b7aa16b4954d99c3fded669a83d67460ca2fa861468f0ff6e8ef61aac7eff878ac34c2bc59a14dac9659cb558b11989f8e34d1f27c68ccd71f45f7a848c94ced0b18c175c7e1eb50fe0204cf630e39ba3deddeae5de4f2c3d254d6d9a747f486e20106f5a6d7b05a67fe474e57":"":"a76ba2ac232a282b3829d9442587fcff4693350232e976439b5b9dcbc1b704c9":"06eada44600f5d5eeac046e16cf576d59c1bbe6c608d7684453f353a644cd031":"c6d51f9aa217655be89a7b85241dac0cf4f59d983303c3c5e7c279cedf298072fa1cd70a2180c3b3a58f553d6d7dfdd01f995401993ed6f2cc3778f780262f93755c9f8d54d94e702dd6df82a737d57cb5784f035e7b2983e6253d0b2c26e4dc7182d5d06628bf7ff8be110f28b274bf2b9cdbc14d16fa1c9f2fa020b0470bb7744d04332c23bb198d2d7f98f15fdab1ae8bf310dc3b90d132d722ab183f806cdb324c503898f91d9ce12f8dd1942867b1a169089cf24f1508079db6184ab4fbc80292c439f7fc2230c22bcf022aa8ef29f23fd3cb8eff8fd9f033b5620d5845d4ec5d0c8f5d4f7d02dcd2e9feb143fa62885bf140aacc7a3160508ebae8183b" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"0ad0edb50bccfc0fb68b5e7b5edf8ca338e5457cfe44af3fb5d683db120c6a09b9907dccf135c5cd0a97200abe245e144fa70365cdb06dddd7b59a557831ec9c3ac14b3de791421cbaacc609bb7659c4e178a7158d7651369655f9c570674fee2c5aed961f3c6baa0a092363b388add5":"":"f9880c0023486c8c8dcac2b40100a6e2bd78b9289e20a72f4cbf46fc156619f6":"f5bf191309d298ce4a39daa668d8c99935df9ae31f5bd1fbe77a3682858d5c0c":"febefa9a23eb4f236d1321d9abedbe0bda5de6fb8ae4259512dbe3f4df7e006e571d8b55db6a438de63917a2e476435ede5af77630241e7a213005f205d3857348b8282e790972e4a5983009e052cbc6bfd00c08306d346c351f32a7c01e5142cc65d5e951fd9186a098f6f22a5e4d5abd80982d1da86c39b1529e36d2341e18859518a425cbc198e9dba895591a1ae395b148f033e1375903fdcb478e8438e0622544d6cd990e5a4633698dee50a623a2b7d8596ccd647db9be1c2e6f383e5316081f2c076dcc98483279e87594ddca5ec4ef4f9f52439571f671087bba02708af107b771cf59bdd38f4f5b6c36aae8112f85a9b2828e048988bcec68098660" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 0, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"0425754d1610c14f6be928608ea3ce731ae818b200c54341aeb178f69e145fc6bd38473928da0d3638b0625d06f6b94fa009d920238b591c97ef48bdac9021fd85f19ce809a9627183e3b621036fd7e3bfe1dcf51b07ad45ea924e2d933f15c1172432b359ad72149e51e86e56ba7768":"":"f746e854338d81d89e81ba3655eac565866b56b2faccdc50a36156fe2faa661b":"06e81c2ff61b7c7e51f5238babc38887bc10d5fecd86b7a6d7c48baf4aa5adcf":"cf9bdaaa8be06039de98833ca92947aee84ab5a43b71a90855b2bcde9b6e69255a5a5e24c1bc8ade2b6338babac8fc0b90674bb700080951425ce67c51636f35025171f584f62ca49933f11883c9fec666305d88ad2d359ac2e0f2472e368332da2f5a15f857c8e8bc7b4897f7e12187ad9395a47a9f271541537ae1bb217f88f9b689933e5c6fcbbc2c39f5924862a4a68e068d06a485f2d80583eb6606f177f9ca7618e0ec018596e0b98376c95fc159fd68aff1a0ef3514529d4a717b8efb7b4764d11c0619ffb0b20106a5a541cfd4e68c002b99bae85f0e99627c91b3dc7f27c2415f7ceed21c542af170bb1398338041c181da40dc95bb0deec6decb48" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"d7d2a9a0b97f4564e05de6db7bf170d2a726e0f5eb2970839c4a0c686ef372faaa5d8afc07d7e9a44904fe9f7359d8b6205c7ce06021f5dd60656247503694960c78aa5e3b3f5008d48c6a264bb94e1c2950f734611e3e10291cdc0199ab9000a9c2eb74081b3c2cb4461ad6406a38e7":"db994880895242ced06eb29157756b25052257bd49ca08c7208d51e7b0ddeeb7":"":"":"6a45639360130d0a679f9addcbf6f46b9945b3b1e5a72eb175144e62786dbcbc8073cc2be8cac421b9576ec496452ecc1a611b1e5ac41500c4213404a2311247c5e828738a8cb55f67b97f39d05e36eb29871e3d709f3bc7c72567e776ae736b63c06f5b57c1127e305387b115f117e302727d042c2c0979b70e2a0674ace2922bcc2839c1a75044f740790b62b078bc3cb056a34a9ad7271e02a1fa86ec85226ecbb9b126c4a9b3b0b0f4ac6915c641af28b34d7b7da6bbf4ce280671c52eb919100e198a3feed6b4fd48c01d836c363904d640e475e0d0e6c6ce5f25d0b174c561ecbbae201bac53d8499706d83da43c268bc2c57e2405ed016d6198964c60" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"82037584f80266988ef6d15fa6003478c20d33265530c1767e3c23f0a0a95d61c9262c26dbd37083066bacce5f93dc86e2cb95521fa6dcc9e4d01c469c4a3fee33579c21058975dd91f9043d5ddb154f5390c4ca2c813938a8270b954a7c7197ec382f02c50dd19598017d2abd1e45ec":"52a6cc9fe891945e5039e95271ccc44ba9ab57f62086837ee64409d0fcaf1973":"":"":"c60f3bca5d6b1130c6fba93e3da9b81dd763828caa5ce81fa528e1326b675585bcec1b4284d9ecd46343000c1e2d6ea06f2d95f483ffea1902fa3935bea0e9adc40e85dfd1b59a597f2c498068af0ef4c15b51d535e4ed1de28b1b1250963dc00a70e199b48d8d7921bf6cbaf268e801eb241bf659dd38643f39de8b9e0710c22eb45780036ed3a86fd4b9c745d26e2d3a5b7e87ef6ac54d8d4f9d7d01412d940299fa1979716de0ebd7b26bb6d8ba4217dc4a660ee24a683440a12b00ac310b1acc6481d42656ad0b08eebe4883db71a6c64603e07f402829c2677663ec68fe1e7620b6fed23b7cf2da0f09773b85db63221fbc6550a7182d7b9d8b72ef1ad1" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"5aebe22736577e69c5027cbd1dcc95146f8dccadf961020cae23562d70e9f0155bfced0ce2053114972614a45932eed8a6b4f4e746d8d9e8b25cc9d9fa67ee0b15cc5b3e3a2e4371a448c9f6bcffacb8a0a8f2c05e8a3a0abfd5d803a77a80fba75ff12cc0649af9bcb94fa5ae2edd2a":"3422191ee68de00c779434aba239e3cd7ad535c13d118bb226e1e013ea6e9511":"":"":"6bbaefdc1aa307ad401b6040da2036d6beb5c53bab45d72f4c679bc88c911fd2754a09f2f4b4ff37e7fe3cbd9cd788ea89436bf78817fcb3a6472198b675c837624de8525dedb7a3b7901faf8dd09db1216f55205e3719d31103379abac3a0806fcad0474b9bddd81e3fec33488893ead828e08291b0fbb37a12b74347d35131f1bd51aa4e4873096b1a35ee3db7b027fc5654e5a0352c22ee35d70f65b39a5b8f4a206970143d55f0e538fe28114fe3963cff7331e59dd25c1676bcea40c7074073a95b9cb044e114456079594d5c570da4e948bc35be44a524d79bf4c8155720418b8e7ad60990bebf67ec5fc083dff0fadd3e94ba110de23e8ba699c81548" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"f5340f1fea08877edb309b9b43228f11dfca26f340fa433f0b18eb9e6e07ccbe96f7a1d745a9b2910e21bc9522a989dbb2db642c5e4b2d59ffeed6c9e667b378588849338b385625f03a226389081858e86a222876f18a0d7ff69d0fede620a83caf254eb9376dac8ef99837dc491dd4":"98f5b7af38c1fbac43fa9cb358bec11923d103720a73591de2c6ed245e86e028":"":"":"5293ce6891b5641a33199c0a52c2b5ac46b261ed311d15a6eaa8df6478b217aeec221d488af74a347ac9a14d51e07a239c2a52d2db6d75dcd901452fa3b3403a15c449c2f1f9770501fe10884ddc3ef6db2d89ead176dd9d240446b5eaef3737666750f56dcc4370720419136b0e6268efa538c7468f6b21699d68fbca51a3c941df46fe9564d395c54d829a681864837fb2b6eeecc994478210317d5908886f6056293d53501a726cf4e786c6294381fc4af6e1109186759ec90999d8a21ab09053938fb545692ac03c776803868134c3e4f7ed87c9284cf16a7651458d7e68b625272687944e2e6c7ccb4fe8e003abbae93f98f694a8385a295c336b5a404f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"82738d1234a9393fab94ab99b841371f7046c6852bcdfce1b2d56825f5c58786e599005a8a79a30d89a4251d3a797cab8b3f30950b9a15d686f1259a11a516d399551928cd3cb5734c7839847bd584c364b95b8feb390567cb2ec23746543ace1371a089ed97f9968e83e75636203574":"3fa319b90a1038b544916123534aa5cb10f4da16cb12c3e00bc1306423742bad":"":"":"9bba6c3cef2838d115f1030925a01db7881df7e7b5d461a5f8dfa2a40795322df746a25ebbeff272d064aca9ae284b50b6f93fa566ea519e712c82f5ceb481f2ff873e73043352c7647238fe339336cd7aa3765882429a09293267613e29bcce17535efd1cbdbe5e40bb21bdde402e6ba7d554b30635d05f581dd1bfef0565c3f5dedc8210b5a01a10b58130442e3f8eb11b9a40e599ec8d5e1089ef1f5e6587b4120d1fc39576282c80c825e6e9507a0ceb3d0460832ffa079fb8492a3518f27f09c0bbf06f6ec00d80e145b5e848b688418419cec8ae52cda766da84a856f94a4bfbec26a97e2810fb1dec3b48f285fa4b0e2794fcd28455bb178b3d55340e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"e554287587131cc3297b05c8adab4610cc3d1634eab65119d8c546d13e9961594f9e6cc618ea0d782547d54aae466fa243c2265aae6d575f8fe22edcf71b3e77fd9f9ebb11c9e2e81c70abfb193239adb73e4fd14c93bd84bf79c328a86a433427b305a6425dd5711d83006dd2db95d6":"2a5741cd93041be381636c081f44a9410647961ce5265211ba69e09beb6e5cd3":"":"":"ab0f85e64e334bbc741b064a31aa9cda9049dee0d6ea68d1483a60e0f48999527042b7994d7a7131423bbd5a6cabb35b9c78628034fe31e5cc2b8ea2b94c91a488fd34fd344bdc862db00e234677fd0fb5155ac892c304361e0f5453cd2598115cff6a3341200ad7469fc5ea1eddbd85511cf20b842c997dbdf95e4841aaf0d365080a24faa003fba9226bbbf609086a6a378e5a5c2682ffd93234dafa69c2594cb53e77d04ba80367ee5dc92cc606fdf102d265d52a83511e2cc1d166f3b84586b2fb01f8c7ed39a344a40ff884e6a3f97f9474977b74318d88a6c70b8cb7d2489e655189fc97cf1384cf3927f608a1f451c77060f4309ff913f89d21398917" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"ee071e3f09552a53b8bd98d9e4b4b460577bae8629ca6e8461111a1ec08d5188654042148dfedabc409caeb5a03b26e422113d79729e75ccbe2466ae8197cf8ed14dd2a9382596da6daee3314b12ba42cd9ed90aafb911598d1863c9a72625d0ba9d711d1fd3dc462516a6b6286644dc":"fdbdc11a4f71667bd1561e87ee34d925b13d1e79967fcecee8b2656f04d6d379":"":"":"acf342f6537c1c3a8f050359730c185e2beaaba5686d2ffc0101e3eb2b153cc80ed5e8404bc849e330e980c0c2ee5df6e630b0d2e28ea50f9f8c06acc0c880304e321ed7205e673e4bb44ccf12ee27bc6f168b636d4297d53462db1c4816ac5ad684e532f35a21ccc6226dc6481d649158e75a6eb012eb95ff4b460b41f8ee1335fcc43f0cb9b5ee76a471283ffe0880e5cfa2ac200b18149712aa10b76fe3850dec22ef4639beeed69f01a4c25ce6110a2eb0a69c479c97a6ff2be4adf3c725511f932f86419ffffd0306bcba149390e1d30679c4d70d15637665419d17e508c0509bc4a1e73448c29df6944c00ce8e32ca8964418739734e8ba0aa4de20585" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"e0bc8c0b53acd8cf5e4c87ad24455bc34d456367bd2e71674d5ac59d0901a07abb52c4f264b0607bb8f1ac0efa4f974947bad42b482868d84208f064fa27f465865b910d8e536f011097bc0cfea07a934ae5023ac7098985c4e1e2d173bc835f7f6fca3200e38482a36c871386ff9b0d":"bc98fdca1133a21a2b4435105b1f96be16333f5ecc6618c54d28aab599b79549":"":"":"ec616993a60d7971858ab2ecbf86f613ad0d9edfaed88645565159ded90cbdcaeca3dec081f55857df77a3724f34e797729493e995594de81bd1d14f55fc76ff1c99e86f4bab5b01cc849180bc0721bcd7a1c694a523baaed436949882daefdb9f555ba163bc01780831c06fdaff5bcd58c61c08b39d051da943a1a3f831808ae982e3bddf40cdd47d580d3be6603c7818614eb0cbf303c6e6f7b52183e03e42b57153e9e0644c5ccd1018e242fb384d8327475b6c51c32b3dca5f32069539631747757301051a0eb4c2e4bfe6576ace08efc5b4ad888a4b8137797cc74625b847a5b6fe515ce186fbfe7a68ee1dd5796e7aa94e78a85c5bd46953d8c4fc0ea7" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"9c61a730a0ab38830f36a44181988afa24fa5de5f298db058fb4a3443d3b71412ebe35851a12f942b7fc379ca1e14c6319cb485e125dde2482c5632976a2a9c11221a9fb6e65bad990a5b77b55b2b8623a5509cd919819e7f8adb23a99b27c2d05fb6a3fb3936d5fbfd44cf2b24a7a87":"a60b8962b18d686ea141e0f4f01572a25b69acf19740bde9588ea63a11e904ba":"":"":"bcad32168d8bec01482534ef7dcf27ea111d6b2a11311572e09bc2cdb376f30157ed19b90baf8e4e3c61e6f8dcc05839fb1b3f1a723c3ba9dd1c7cd49463278a6b2190dde8ee03242d1be9a40b570dd4c30437f0b15798874ac940dda5bed2c93323f1e79d54ae9bc86d82601987f048976a557c6173f9d3eb16649bf0044947206f3958af2cda743fc40416e645b9596b1ef4e7060c690d75efb4acad24976869627c20993d89359d39cb3a97799f9c9d37dd79d212c690cb148d2b3006cab6d43e798aae2a35e8094a21d632bb05a89ab1b6853f27b7e064041f140870a6bd9513bae4c18e791e2d8f1b3c7bcfbf82d28c9d6cd8ae224034c306e51d362e9e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"e3d186a9a4d9530906c58f9d1f3b415d1b60e2f12ca34a428d16fde09c700dc5ea9d104a92831936136691232ef64c887b71383be1523478c67387441c67fd7761e9f75fa0636e5a3caa845219f3582bddbd0017b9b95984cea6a3ddbeb0820f4f55ff15e22c00e8db7dd8fbea8f6526":"c33655a0e2973ba13785fe4edfb75749d84d818752f7658014448b7719982726":"":"":"e002203e9dcb191c5c0c3ca2e143e689ca9925337ae04c29547a56d4144b2657f826742c2af60a2ef56b4f76e68ecd423ca04eb79e92473c2b2096072918a2390b5e1ef596ed6a4302c181b03257f9defacd58796e10b5601ba9a1be767440ac0aadd4f647bbd81a084bbd8bed5a0091892bafba61259a46cea95f7be6ac76492a52957eb62e0c96f5dc74dc3d949e74310be664cc21b9c76d39101b76b7130f2cdf444e07bdfca000819dfefc2eedf897b1de0ab92e3d04f6dbe9438c71115e5d14fb663d712027be4c1348cc3c5c30bf8dc0f7f5a2456159a542e58aed5d10affdfed5b6eae77f3af607354ddfc4f1d7afed90463486f60dd9fbf10b32f6bb" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"38eccee965505ba5136a8ab868ed1e741d343ad713075233bfebe196fcef6f4057a21d8b2d6c68abdf52633d54d9609e87542efa8f4b46f40a4e60a2dbcf3338138d46c1e14d6f752954a8fb992fb0260ca8890300556ca7092a7661b65fbbbf0c56e2d49875528aed1ebb0133f13c55":"7bf2914afa8ff9c3b384cb495d0a08bf7d8f0b7198df96db7371dfe987b2b73e":"":"":"830a9f61e8af4f322a46f3e75d475f9f6d076713ab98b2b9d1196e8fea098bb7a840ca4d7f32a850cbd7417297211fc37b47b068aba349d26a47b2d6d41e5883f656c287804fbc854521989c5de99b61c58d5144440ccffea4a0d9c455a40d4718cc1e9dbdc9c77c4848f466257f99ab6073dee83cf862511b68c2bba8bc907b88822fb1ba310b3901d7aee1eb3eeeb0ae5e8da38276886cd8a218d26a8d899afdc233944c97baf7b27444e27f9f3600b6d908fb179e504c5091e2febb7478b34bcf881c55fd9fc74e9eae1203e097ca67fcd62f03a1579d898d890c57445d9f6ee1b65b2e1542f490501384a8b98cc598dc8eacfe2260db6d65c54ef915f2db" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"19222f7886766642da4a80b97b9ab8b157b58ed63dcea2512f088644791475a5c6a33a2cce394d45da2f84b02a0abcaaeca4698d50d5bda435778b808397315654878e866ba0136f9c4e206f7749b60ded4198d69d1d077564a894375291991eb125d394547d226c2da17e8cd98853e1":"af34763c141bc212271d52a260c6d6d40e9f40a8a4cc3fb7ce6359bc71941f89":"":"":"5914df97ca36accfe40009f033bc6cd2195d0b1d354960d152157f2b868db4cbb736cdd0f077f230442ba0101789c5cc2ac727b0704a10b41c87d79c8aef748567a2eb6e61a7c499a6a1cd6a9d958cac18585b2e697dae4ff92bf913480968f3b2b8ca2e0cd85f1d9303e3a1a3830a30d6ef0a1e02c682958fd186e1be8ffb2a4a69d34bcbe617c3ecca0a77d460e3782cf10143df34adeaa7cf74d1d86fb1ed35da217f00cdf27f1637d2a188c3ce7ce6cfafda3adef4463a0e7e668eb1268ada8465ce909f368a0b12a439eb4d43a87cbf98f83a4f8c422ac90851ed081d74f212c854522437b2655959c081fdc8ca2945271821182691f6ee5fa0c13dcca8" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"f314eba7451a0b721622be298659a3d253ea5925f5912196c62ed149daa11e26cd94e8e647da38bcbbeeef1da21ad92e0b9a5f1ad72826bf55097621314f9859f8f8d4d62cc9a00b3e9d95e996509d77413449aac8f9d8b311577a083f80364ad1d489262058aa11ce9fd3dcc6b1e4cc":"f8b1e97ec680f637a4792a0d50fff9a0edb028619a9dac05b8ba6d57e55a1a4a":"":"":"93db5a7ed48a819e9a237ad4eaa33946880ae85266418a264ec17b41a8c97c16c446f91c6d901871e70b6d9c10aaa07077c1d40242cb7c5cb89a137094aa81628278b9e453d7f0f034724110acf8a08fa244da256bf3e41960013e70974dc8c228218cd88ac4d7448bd13a4343866b656b16aaf42ff678dfb960523cb95776bfadde24e16ab0070305e084cd970093fcd08431b815f85fdc4f6a43fcad105965b6fb1661c7709a166ae6f3d1fb463689f752811fe7d6665689a06c60aae8a051abfbada40fc602fea2ced51aa910c09b78d97a4e85242c3d206cf31ccfee11c5dc141ebb5278b55de7e7aa9a08048d5cad072da32c449bd0dad2f7d6188a5b9a" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"841cd7bfc5d87a0fa624f474af6d8ae9f2b5a1426cf1b752ddf11f792169f2f2c0b60427bf62df1b373302d91fa8dd891fd7542bf6425a7308f64e96b0c3e372d4addc747898731517a418210813f6f14d56651b2599bb2899b109b9c21367126ed5bf099f455ab5b67f47a1a3abc3f6":"c35726206d18f9fd3b8423fa9ee2fc5a896a013a95d052ff495b9cc6759d58f7":"":"":"b3eb113c19f33eeee3dd53fe58acbef68b652121f39e9b88472e9162f3429c8d98790405afe1368619366c88a487518e1ba7896eee2b4625a987d138569892b8f977798d6931b5d2fda6b8cdf314063e45a22c957a1b96a249c431bfcc2864fc00157fe6c2ced99a1cea466944f675e52cb8fa0027ce78f4e3ed72d19f125045aa824b57526ed20d527d371475f389c66a15e35c2ad1bb8a79842217a422e4b73a3ab5bc8cdac32eb4b12045202b1ff1323a6816c29ad0d65c9dfc8e9bb841ae0c813c0bced097877bf220961c0447162262a96b95dd93ee707393fa5eba4aba292982c216b05a8c2cf165b54e1bb50a9ec20151b229df3d32f54ea62648b340" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 0) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"dd62ed0d54d930fed1cd7582e376ab47da3138f77daadeda32fab95bf881fe90d9ab4dc5b1cf0641ad966ba1761aaedebad9ebc3f3b24688e16251c409267bec9b02cca6b8ea7969a5991ef647fdbe28d3126c505bc0d9f8241fdc49e8674ffd6bbdcc5f99c6e20d4271b4215e224156":"366c8ff666c2b42d735dcca5c0b12e352afa483d48d57c908b5263ad3d2affbe":"":"":"a774564295c318615e4d66e0d857dd6290ae074cb38b6322d8867f2c7bfb7b3bfc50c715c090794d794aae12b6aa1a91ce503b549d79435fd1f407fdbe286e4d607c624b44b5f0b91e65aa59a880c695a0fc2c9d53dfe0662944ad458ee6c364e56e6537ccb62deabf1321e8443cdb58e8833b708807e53ad86eca98e7cedb9bcabcd998f975b9b8722125da2d7f8e611b48e7df63ccd44439c615fc3bf237561345d85378a34c46b65bf5cada2e1c591f5a5ae4cae06bd2314bb5e5ba067eb65205aa2e4f625be97321a91d964c4be9896ecaf20aa78338627ea90578cc900d2abff4b50aca44b24088747e7e27ba9605bbd6f30c99d6697be460da653a1f37" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #0 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"3aca6b55561521007c9ece085e9a6635e346fa804335d6ad42ebd6814c017fa8aa7fd3c3dd5d03d9b8efc7f70574581f4cc19fae5a456f8a53a656d23a0b665d6ddf7f43020a5febbb552714e447565d637386b3ab33f78fd9751c7b7e67e1e15f6e50ddc548a1eb5813f6d0d48381bf":"4bc9a485ec840d377ae4504aa1df41e444c4231687f3d7851c26c275bc687463":"b39c43539fdc24343085cbb65b8d36c54732476d781104c355c391a951313a30":"b6850edd4622675ef5a507eab911e249d63fcf62f330cc8a16bb2ccc5858de5d":"546664042bef33064da28a5718f2c2e5f72d7725e3fbe87ad2ee90fbfe6c114ed36440fbbccf29698b4360bc4ad74650de13825838106adc53002bc389ee900691649b972f3187b84d05cecc8fd034497dd99c6c997d1914b4ef838d84abf23fae7f3ac9efdcdc04c003ac642c5126b00f9f24bf1431a4f19ef0b5f3d230aab3fdf091ba31b7ddcacdf2566f2cfab30f55b3123e733829b697b7c8b248420ab98ba6f11b017175256368e8d8361102c9e6d57386becbeabda092dd57aec65bc20ebee78eea7294571e168c454066d256b81bb8b7bb469207a18ebedbb4348fbe97a4d86d2bd095c41f6de59aa0800e131e98181886a2633cdcc550914d83b327" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #1 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"2531c41a234821eec46f8aa7dae8e3ae12d167d289bfbfdca928643b343eb951015c066e2d278ea39d2a459e6434e234e55fa1145583ede74e632ee8bef2a2ff76ca3b8c9c977a5813c4041f3f9328be6c67f1689d878e8ad61bfe6a39f5b034b75c40c9b305c1eeb92a3f4169ae1720":"d1952b7d0c4c94185adc025e67a29fda50f577770115c0931bfb03e8101d1d3e":"0be3f61ece380d63c68ff0d4bde36f58233358ce62c7bc588728cf1babbd4342":"01e76a0c9addb4dc2001bec231b72e2098a6e9e8d39ada13ff0c493aec8ba65a":"12336758fbec11ee264b06969bb37ff1d37034b66f8b823690758da074d4e09d84ffb493d0610b5c32f68b1a144ca654ab4f0e89c89c6ee6b872b6be4ed06a77b9809e68329addf4ebccb986dd48cf33469362af9d8f7b24aa1cc65bdb814c2e04b79860f2d53b3895b5f92502befe31729e40ceaeeecef456dbd723f485082ad475e46f6023dab6bab0eef61394823122c262baf562d55c687c3c3408c837e6383e11535e950e604df59cc0af1177283fedb5fe30966460dcf6b1625b39b590d455b9182097cfc143290556d68158fe20211effab9303115ebc5b699dc1613c195956dc61348bbb525e571c5407326a6e1628515c9275a6a5e35650c953d68f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #2 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"4d65ff2fd260eb6290b02b1fd71cffec840cc01807e984f07da64e6ad80ad37fb5810ed012d2ceec3a0418003a03343502219bd422c08e0321bbb86d923bbd04082f939ded421657f929b37e21604a2668b57d5606ac36456da916df82a8753d224b4f7c829d285254e9e851937b54af":"d75616aa0190a56af573e43605157c0e0d5275bca959f2c75d0e777943b200e2":"954fdc652d0bd8eea37342f5547241afb67f8d4c587bc2402c435a260144acd1":"ed07fea3a07e8846b4c3aae8cec0bf6df7c8ba7817e3e9699943e2d2e778c4ac":"20c1c41c0809e694b5ddcb8089946d74571144473dcd68af68cea5881859ac803c0192304966a3a6f4c24de0451451128663bafc20c9842bcf72f3d6294dc59b850dde77ec9b7b37d8e5a99ef1719ac29bd54027278db159476849d22d2b46ddc008cf76878eac8c709066aab5f1043ea588815aa48456d89d2657d2905422857f6b741218d22fb7a2a67e7efe5c2c56c9224170a75db10b9d7b93509a6b1c5e9b6d5faf354f79394151eaea71c83c8fa53446eedf70582c4976a4c16311f92cf7d1758c1d1f48e6d58b588b3cec5f2a7f8552dcd7a72cfa8f109c3f734a708304bdcdd6b25acc00899717a05fe98433f104b6fd268379051af36b111ba179f4" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #3 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"313680a6ef5cc85924575195608f3b9cd852004343ab708e89d61c24696246166b0dbcdf61c59b0041fd2c55a829c99cf8468552aabddd993687c2b4a6017024c41100510ee10034ba4f66563db4d3388a7f6d475e080faa23ed43c674254bf9ed25f73109630647fa3c85575727d2e1":"cda08cd76f3bac2c30bda2069a1a7a461f2462ad2b2ab6a727da6836896a4d2f":"431c4fdeddd3da1de6fcf19a25d74af811f72fc2367a7f33cfcdf17cf38fcb6e":"4750344c23e4686b2bfe2dbd9301705d06969fedbc77841bf6591540aebfebd7":"40deadcd87a8e07ea73bb1f29157c7ae8a35e02ee60f9f62ebe3ec4bb325c81c2a17bcf6b863cad6ae29356c0e7f3d82052802fd7a14dc73954c78efd49b2d32f072b137af16a05bc97034b2102c25d6ae68df7141b101f468d79078033015763326dc3ce8bb2e960e7fed09905044ba2164deceafefd545e67a5715fe7e5a1fe51cc356096344245d431dc19eff99b402981b8531a8702f2ff1bf268716793367db8d0f6f454db57b6ae9164596850811fa2bf01dfdf91799b1b54c9773ddaa23164484fddc2cc781c1ff31393ea203420ab2cdfefe514d3089df1b20eba32c003576da5a9712c5c0ad744fa03df197f2ca8463df44d16135f05e1eab014073" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #4 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"95b698a454070603efe15cb4c359ae946da756d124939f916d67d77aaa0608d8e577b5f5567ba3c075128b528a6ecbcc2ff6d8d15ddd68039173c4b70df3651f4cb5ac62957781ac91563324a56b47409b02699662f68022be2d93eac367a21026ae95ff0cba67a630e4bd8e53469215":"de401ad1d2c339934a47822421eba0fb79c89863d1df0ef5d47e6be5bb3a8c48":"a002954ae5f7676a3230533dbdf59252ef051acc76574bd519ad56882bbf46e6":"5e3de2b53936a7890db7248802bb95e9093d9d7a15a9378d8f4ba42c52e679dd":"772a05c279c7fd85750793ee81bfc32719573ec519f5b64b0386e6414b73b153163fdd1dab6d22c637397a30adf86594de90c32f6482d50539eae8775799b89e4c6471493df4f90ce0b694fe1a81fb5b93bfd2719ee69cc576e632cc886824deb7622d487af450e95bd55a609ac30e95adde47b83ac654474c18f615dbfda68267cec8bcf70d094df6301e858d3076db2a85b2b4b3d94de82a6e0720d535d36d6e952811cc371b1e828b86fe00870aa5c55e575a6903303f9e2dbca40e5b66326192f1728bb89fa7d77e6d32cbf5f18b3306206c39697b71c404e38d496c52639f98eef9203baff52837a872f7688b53318c870d3b8cb024c865c81c3ad8b71e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #5 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"d7d3e83dd979bcfb524074f12a90f78873e983c2aa90e0241f00d2c691a4702bb452dbcc69a7793cc2081b984033295c4435495713c20295aa97bf42babb66edb4856370b9701020a8a79df7381650fd7a3aa5ace4bf54b3331a8d4092c19fde08cd51a06146cdfab9e3a32e5cd02b35":"5612ed7d790419dceab4befdce6e4e687d335a3aa972d8809db6291e3001f825":"915028d0610160a2516e926f06ed34b18ad1064b6efd56566494a92a3fa0eea5":"86cf5bdf061711d2361ab6d79c731c2fcf9aa47ae5bb5f6294486a14081b1862":"cf1b0dbfc3f6f3ab526299b7f7d8ce1a945bdeb0c0f6305cdd6876d40d5649ace9e78fbe2e1df6511145635f5acae90b6b9a38393db4bdabcb2fc5e93d252a2098fc082917b1485d387ac5e2efdb5fce0e82bf200ce0d1f6c7b5d22fba062574d9234fc9185f096848d10141ad39571035b3769a521165f7b63a0050a22485d8a47870028d3f3b6437938c3cb51781db9fda64019c049dbb7335dcf7c9c71f1ccf27cff4d379a274fea0d026f5de1dc8866f1dcf883e2e0fdb6316059d5172a6c1faa3203969969defcd8f367ce859aebf998349ba979afa5e63d94588ff02e3a428e93b98464997829cdd4b605a44393057fa27a2fb780b7daff4b64ad73b91" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #6 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"c1e64b99394e1241b31ffb7b482cfaaacf5f2fbc251f954e7e3dc0866aa81856a16ce83d9ce70b71479ae9ccd6c59ea4e99986d1e09ab16eb1f48b99cb9bc9d63701f6a9a1af0b1d8057339d5d7ffeacc8e5729134ef2148663227e348dc31b9d56626c0d43478d5d53bfe998fb85b1f":"42be743f8a9c0187d2d54b596caf64dfa630d60bd8c6de0b126d6a151d823cdc":"e925684793bf51a8a4a46c2ac5b91ed40843efd0878336f983f1001722231f1d":"df019e78efc5d3a85fbd9056ad05f97de81be05c069b32e68792ba8f5a775fb3":"cc3df6f1cbb0e1bd937e64b2d8be12c07cb256369040d834037226b96e4b8e7232c2abfcbbdc0bc2c432414845c5ebbc35fa4e903d5df19aef62dc702b20d0346daf20caebd8819df9210a721be34d9df72603a4370c0c6a653979d19282505d64ae09e0922149759ca0f5324f665eb83ceaf6dd46771c520b96885a8503b6be333ef6aa8d83d370edf100edb13b86724234442a15cc23f89359f629a2a15b645c2510099c0263d25e310567d822bf03aebbd4bac392b999414bd013fdb00b4fba8e30afb17f50145d11302d71dddad30ce6678fbede83e567a97f4deb3b1759e191319697efd9486f2b502a94e01c00a9b5b76230036665fc5d87f8c9e2fb4e" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #7 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"071b46d52085a658309f2c35bdab443e1509aca159c1fb9c222951affaf1a243d0bdcfbcaa247fcb8da53fed8e5f8b3eed2fd022c96bdd6e86bff89beaa99f2bc34963d3ef118df9a5525a910c9540aeac5166f65f5d05c6277260081aa9b71ac58cbb5f1ba5000d4d8078c5a30d282c":"7ca33e3345bb333a5b1f412a6d57f8ebad65b427ccbbd7fe3ac837691da39219":"60efb3c75aeb2f4fb208659f20e79eb41d8d9b422066c235a14b9420bdf6f172":"4e2675c8009b5bde9882ce940d42daefe402fb11379e07db9a4c0c763e97f319":"80b56a4bbea08b2bb09fda9cb04b1ee7bda0164c2f12271d8857ee3af102ab25c56836354052e3d85bb02cf13607d746a62b24eafc989b35d4ba25449823bc1e7b14937523f96713c9098ef2ac3f9765070076f28d76c7e3c2a0fe7b6afd0ac2167ae070a7ff19c5bbce52948abbe94f0d55a5d1beb31a665e97f56f3b92314cad9ba764cc2e3d0c00064ca1b4f3efda14e7e0aca431b427dfef2443d9e3b8a6567c26eb0ddb166f9dd247371407676c6a46fcaa0f9f67f49276676369b725da29aa9ebb7c3e186de460452cc81c02266bb6e79a119c54f4bed8bc3de709bf6a62593273f4680136e95d6d121727d9fad55c4a110a08be1e0a06cdef98aa04eb" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #8 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"06c7a8a74b6fe9e14fa2475ef8b8a1ff9610bfc1b4b93cf53a8c844d7dbac08ff743ea1bfc6c10d7707b5172a29af054491b573dc2cde1a3e74262f4fd2e9ec819ecae830db4f0c7021028737ffc5bc025a216f658065e27314c30c04925051c0d7caf6ef440cae263f49148c0398007":"1a33793d255386d47952bfc1f63ec15caff3603d5c28b2acdd799673affab589":"7eade98e717aaa32f74b033163ad76489a7d682783d2db67b9696ecc7b9be57a":"58369a241166bcc87e713b28b4ae216a8e61f8cba83969d42b91e55283286af6":"7bc84544b68eadac9cf1ca907d9166e094844b396e5d54672ec88dac573418125d50befe1097e2f3438aaaf3f13182ccf4593bddd52d6a41a5e58f267c6f0817d8d1ce3327a611f9fc591ae64c7c18d61958a598e0ec4383e25b46dfd34db10f609cf53ed76c86116018fc8e9027aa2f0b0fb3f22d6b86b11311daa5e78d1f4105ae4ac67f63707400b0f054b6f3d71f26ca5d463192952fb39ae00326db9cb1dc028525c31aa9beb7c3d299070cc3ed8279b8ca32940b21273afe8016d8069a577acdba6bf6d2fe327b2f6dc9c5c7875da6c3f584516db0365d16670db6d90cc1e5bb5309ce9fc8234326ddd68706e1d76830202cdba770bd40046b751f3c15" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #9 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"d5552efbb7f33481a574589c4bb56dbe43000ffe9ea67fd0c8d5638092c8469944a150b0dc1315ab0484976b128ccc961734d226d66c77dab3c22558ff2225e32191aa2dcec8e47a56f757f71c081acaf5df357c07952cf6de2e3564813ded982f72069ed1bcff6b48ba4b4625ba247b":"345b4acb2b0cac82139fd516ec3d39292438a916d2d2c8e97ef265a1192a65a9":"732451ce7bf5acc84a05de3474b622d07bd3d01eb6e3724538e454c4d669a994":"7c7ef660cebee96b425485296a8e88c37c66e385eb1cf7389a95c46fa68a34f6":"d82473db3bd554cdcb2aadbaaa9c919087d9b7bc8d883f99bc95a19fcf96f25698fca8a134ce441414852166998a6ee2f6a18f9f667907f8f8bcd0d2ade7dfcc03cbd6ecbcf3dec46558154dab59717f386bb33c9df9456b258feea593ae1d9bfe70799fce4b25cd6ffd0815e849cf93b496d6ef36cce4e14fc3de1506dbf34f7111b48027ce2aded4140bea8311d5de9df5290e80fb65462fc5433e00c344a3657f47f6a7b992c6ae362afd462280e7830d317192bd8dd26dfefe779dfd69ebfca34038b078c01644857c60c1f6db9da9877cbd2721d0b26a67c4eee1bc43f6d632110759e1e31e7c3d6105e3da30d297b69eb04e880d1f2bff2a54ea798178" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #10 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"bee5dd72828806929757afa02a92c5c54d86c5015047379b717c6608a71239b15255de5a2bd27e9c6ef23046c8a8217bd89744552137b24d93e5ed41250ecbcf6ec77734fed7a40680e801ea277e8c6eae57b4328acb1e1dfa04d0b5f799ce1e2f111c3fe8c9f954fdad6aceac7d27cd":"4c3c54284845fb2a494d1e452b2ba1eb0d3456cfa9560ca7c60878e8458eb7f3":"a8a333527a2158a087879a6f950d2af8d093c4f67945a140549a5e93e405b886":"bfa0025ac9774ac767a4d3810c27a3c8e3e48780cd0597a5a401f6c9b0067e7e":"ef4c169fe5fdb37142c71734b5b5c855a3b7693a0d78f48d76199aafa3d399b057ea78b2f1187bbd3215bca52e3bcdfbb74d1d0c1fbf91e7a81f7c3f6d8ff5276ca906704d2d3556ec8ec1d6d7ba9e7dd73738a7e90b1398d800617f3a5487179439e25d0a9d4ec4e38699b3703020a99c533a6282000544296e63b6ffe12dcaf3864a8502a68482f90fa7fe9aba6ca9e9a74c6e3f89541d18f2a909737280ac8e772fcce6a117411f36c9e82f2d77fc7a03e2f13f97da5bfd6bf69f1d46a64c519046e6d0d379964723bab2b89be9ec91a3e5a33c53a73304c1e89620188aa2e0b8e4112c5699e6a99d66b395cfbd2502e567a0a9e35ede140681b2ffd95fe4" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #11 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"754e542dbb453f10f41e1361164f5e1ffda67a024ba26701cc86066caf2f9477a074690faa069cfec6fa38d8b2506aca34fd27d66708876f28d8ac08d28eeefcb728fb6226559d5a0646a8e183807a8e08469cc5535712a4426ddc5a340b6c71607ee1e2df489528a266b141d7c977ca":"3a9193fbb67a0fdd732a788d3ae5783de84968794b8c4c0b5ad4de067a5d1fe5":"034db3c40c2c181cb4d635aaf08f05e724f418ecf7b3d2ba6863e9ede616857f":"50058bcdd53c9d257dab7846fedca4ef99ed069604002cf58ab27014ca7100c0":"1d30904d8cd4e37357b1b9b4ad060fac12d1cf1d05e2b5b2fcc48bff12643b60f5e40a3f3e542e46804ddb904581cbd576f0dbb4b83b49af83c48b6c68051d7c7f4bbf09d3a4f999db4776089cbed57dd2a75be826ee34e13dd802d7dfa4442a0a0fe154ec9efe6684d6a400d04fa404123ba54d6b89b7dfeca4d4547e3197218dc36be5c0137c94b889c1aa22b7567887551eab168d365d11a5fbd0eb15116e929468e8eb445608d91388a9b3b05c95b9733bb3ff08d96c0899b50b47c570d75323c4d24062820b0a9afc7bb2771fe163ddceb411470f33554822e30dfceeefd0798ac9e4a48b8d30c8f725a4df6568d15a750131998e252dbf9199135f817f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #12 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"42824bd8944f49479f07cf6af8f02aeebda3ac074ab72a9eca8850c99b909d081f2382d4ecc9e923bf1a588f8db10bdce61c6f452c8e15c0f003d2231ce5cb69292ae1a37c602aa889f0d56df049717bd99005ff353c08eb29ebb8cee3aafeb52b3867a61a76335d86c2d7808ac94bba":"2b573345c4fbdb8382bbdac1d3e2c38fbafbcb599c67412296fb6912e1a640ac":"a5f43abb4634bedf1b199dcf6394bd3504ffa0cdc151b4e53cd0772d86a43f60":"a2f1ac52ec46d93b3b944055b7205da8fee95c9a3241418cfbdfb0e9ece9143a":"c751240283ec2480f6c7720c31e1f9f70c23907b38602ff74f707a14ac10989e29d1ec2e81d4cf85a9bd3440f445fdb9ef7955bdd2beecb5f3c69475b71abfb4ebd5134144b24b011e2fa6026d84f8fb511c7a44f2ad7cd212acf089dea4bf2db5be9a24cded5be8ad0b8ed17bbf0c5668fd644daa863616f68278b5f6dd95ab238451966bb5ae6679d1e99bad610befd419ac6bdab3440b7001139af8a2fca35c74ae65d05f490a480caafa1e3487b78450a5ba59fc0a59220395e14685d02f6b4180c72977f095e33c5cb5048b63bcca2767061c97c616f494c775c5d37a67c5ce996e94bb8ffde4a8dd3de97b74493c9b2d985a2492e1f97fba947d2940c5" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #13 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"9d899a56a0660f18b98c921b0d409550fc225ffcfb975e9ec6b2315bc9a1eb3f68fc77abc3452380e30ac761a20a91565f5ce875a82ee08a46a1fc5d4aaa8918fb23970428c863dd1b24606b0118476b150f7a47f3962dfdd8ddec93fc8f82df7cda58cb3bb5623610eec69bdd0722a0":"67bf61b3eca94013fc165b110eafcb9126917a0ce7e2d9bdf7ef1b38bab6ca4b":"db144f531cee5efadc505f4d37a6e5413f638d46d419fbac76f81ecb63ea2809":"d737b2ba62c1ec1c766f30a5dea7363b5c570c1e7a33fb65c3fb89eab41f748e":"de518ac3034859a43cf6701722555be929a5ab2658de326696068b970ff2f77c75083fee45a6660b82fd1e960b472a50d96535559f60b3e3131a2e051af118063c1cc8b1356014538e6ed0e2da05c90baa041085f8f1575fc3103293a0303751077438a081fa3bc5c64aeeea5c4b34fb6957e91db47bc3f73710087db9843efa1a62e9f615843f69f3f450d6c58b33b1a4d55509df2f34b8a14407cd1a87dc9581dbe180e2d839417a4f6ca6a731aae3f08b515df8200890baae9b79db798c8e530b6a03ad13c3c08baa4cff0b055f35dbbc6cd08fbcac7c0fb78f8754921e000e622ce3042e740c64bc935aca85d7132723de8453c543d5cd5a40748e286b8f" - -HMAC_DRBG NIST CAVS 14.3 PR True (SHA-512, 256, 256) #14 -depends_on:MBEDTLS_SHA512_C -hmac_drbg_pr:MBEDTLS_MD_SHA512:"ae767959378e9f031c8f68d778cfc0dce1f9b4cc176c5f9f9f4c9c3aed9435f482585a0711812c3c79bda619b942c6eb8f5abbe8540aaeeedeaaeb52c156d07d8669179fc6967884db69c17186cb8fc96f2de9b0ac5922ab53c595df1e3513bb3f2642b458d96e3782dbb975a8b4faed":"830f178cf5f544140d2d8c0737790b97bc6f150784865548d73f1f37a5a39a65":"cb12a2b9a02aaaeae4c7c76cad9e006186d978bc046c1ea81532bc51601ede00":"2d3dde3b3581b863e1590bdc638c33bfd170555445e225f3a450d9e9762abec1":"fddf7f1b906861d49da9660e7716b5ef987163e7e2f51f4fef2cb3e8d01b736067765aaea11a7d193266b2e0071e4d4c8cc776399464563adb9deae22bd721ed03b148516100b9f340a00d2632c80c5b3e1f93825ffeb112fb90e658d638740e62d8031fabfe40f79c20532e667aeacc6be635f64a0580236d7d978c5db017c76a6767dc419ba2f89102a88e53254f41205866e875225380ae04943bcc8f152c9fd79a680557d1f2a0a8ac7b27900bba33db63e26e0d7363034af1430b6546a3ce2c01c8cfe0e152f106baa5b2fae1fe00cef10154b735fdfae354ececc7da44c914b054cd97d99866a9d5df42765cd62eaf1b8adc885fa2263911c837b4643f" - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.data deleted file mode 100644 index 71d1f6dde5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.data +++ /dev/null @@ -1,1225 +0,0 @@ -MD process -mbedtls_md_process: - -MD NULL/uninitialised arguments -md_null_args: - -Information on MD2 -depends_on:MBEDTLS_MD2_C -md_info:MBEDTLS_MD_MD2:"MD2":16 - -Information on MD4 -depends_on:MBEDTLS_MD4_C -md_info:MBEDTLS_MD_MD4:"MD4":16 - -Information on MD5 -depends_on:MBEDTLS_MD5_C -md_info:MBEDTLS_MD_MD5:"MD5":16 - -Information on RIPEMD160 -depends_on:MBEDTLS_RIPEMD160_C -md_info:MBEDTLS_MD_RIPEMD160:"RIPEMD160":20 - -Information on SHA1 -depends_on:MBEDTLS_SHA1_C -md_info:MBEDTLS_MD_SHA1:"SHA1":20 - -Information on SHA224 -depends_on:MBEDTLS_SHA256_C -md_info:MBEDTLS_MD_SHA224:"SHA224":28 - -Information on SHA256 -depends_on:MBEDTLS_SHA256_C -md_info:MBEDTLS_MD_SHA256:"SHA256":32 - -Information on SHA384 -depends_on:MBEDTLS_SHA512_C -md_info:MBEDTLS_MD_SHA384:"SHA384":48 - -Information on SHA512 -depends_on:MBEDTLS_SHA512_C -md_info:MBEDTLS_MD_SHA512:"SHA512":64 - -generic mbedtls_md2 Test vector RFC1319 #1 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"":"8350e5a3e24c153df2275c9f80692773" - -generic mbedtls_md2 Test vector RFC1319 #2 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"a":"32ec01ec4a6dac72c0ab96fb34c0b5d1" - -generic mbedtls_md2 Test vector RFC1319 #3 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"abc":"da853b0d3f88d99b30283a69e6ded6bb" - -generic mbedtls_md2 Test vector RFC1319 #4 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"message digest":"ab4f496bfb2a530b219ff33031fe06b0" - -generic mbedtls_md2 Test vector RFC1319 #5 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"abcdefghijklmnopqrstuvwxyz":"4e8ddff3650292ab5a4108c3aa47940b" - -generic mbedtls_md2 Test vector RFC1319 #6 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"da33def2a42df13975352846c30338cd" - -generic mbedtls_md2 Test vector RFC1319 #7 -depends_on:MBEDTLS_MD2_C -md_text:"MD2":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"d5976f79d83d3a0dc9806c3c66f3efd8" - -generic mbedtls_md4 Test vector RFC1320 #1 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"":"31d6cfe0d16ae931b73c59d7e0c089c0" - -generic mbedtls_md4 Test vector RFC1320 #2 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"a":"bde52cb31de33e46245e05fbdbd6fb24" - -generic mbedtls_md4 Test vector RFC1320 #3 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"abc":"a448017aaf21d8525fc10ae87aa6729d" - -generic mbedtls_md4 Test vector RFC1320 #4 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"message digest":"d9130a8164549fe818874806e1c7014b" - -generic mbedtls_md4 Test vector RFC1320 #5 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"abcdefghijklmnopqrstuvwxyz":"d79e1c308aa5bbcdeea8ed63df412da9" - -generic mbedtls_md4 Test vector RFC1320 #6 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"043f8582f241db351ce627e153e7f0e4" - -generic mbedtls_md4 Test vector RFC1320 #7 -depends_on:MBEDTLS_MD4_C -md_text:"MD4":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"e33b4ddc9c38f2199c3e7b164fcc0536" - -generic mbedtls_md5 Test vector RFC1321 #1 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"":"d41d8cd98f00b204e9800998ecf8427e" - -generic mbedtls_md5 Test vector RFC1321 #2 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"a":"0cc175b9c0f1b6a831c399e269772661" - -generic mbedtls_md5 Test vector RFC1321 #3 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"abc":"900150983cd24fb0d6963f7d28e17f72" - -generic mbedtls_md5 Test vector RFC1321 #4 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"message digest":"f96b697d7cb7938d525a2f31aaf161d0" - -generic mbedtls_md5 Test vector RFC1321 #5 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"abcdefghijklmnopqrstuvwxyz":"c3fcd3d76192e4007dfb496cca67e13b" - -generic mbedtls_md5 Test vector RFC1321 #6 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"d174ab98d277d9f5a5611c2c9f419d9f" - -generic mbedtls_md5 Test vector RFC1321 #7 -depends_on:MBEDTLS_MD5_C -md_text:"MD5":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"57edf4a22be3c955ac49da2e2107b67a" - -generic mbedtls_ripemd160 Test vector from paper #1 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"":"9c1185a5c5e9fc54612808977ee8f548b2258d31" - -generic mbedtls_ripemd160 Test vector from paper #2 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"a":"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe" - -generic mbedtls_ripemd160 Test vector from paper #3 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"abc":"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc" - -generic mbedtls_ripemd160 Test vector from paper #4 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"message digest":"5d0689ef49d2fae572b881b123a85ffa21595f36" - -generic mbedtls_ripemd160 Test vector from paper #5 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"abcdefghijklmnopqrstuvwxyz":"f71c27109c692c1b56bbdceb5b9d2865b3708dbc" - -generic mbedtls_ripemd160 Test vector from paper #6 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq":"12a053384a9c0c88e405a06c27dcf49ada62eb2b" - -generic mbedtls_ripemd160 Test vector from paper #7 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"b0e20b6e3116640286ed3a87a5713079b21f5189" - -generic mbedtls_ripemd160 Test vector from paper #8 -depends_on:MBEDTLS_RIPEMD160_C -md_text:"RIPEMD160":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"9b752e45573d4b39f4dbd3323cab82bf63326bfb" - -generic HMAC-MD2 Hash File OpenSSL test #1 -depends_on:MBEDTLS_MD2_C -mbedtls_md_hmac:"MD2":16:"61616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"d5732582f494f5ddf35efd166c85af9c" - -generic HMAC-MD2 Hash File OpenSSL test #2 -depends_on:MBEDTLS_MD2_C -mbedtls_md_hmac:"MD2":16:"61616161616161616161616161616161":"270fcf11f27c27448457d7049a7edb084a3e554e0b2acf5806982213f0ad516402e4c869c4ff2171e18e3489baa3125d2c3056ebb616296f9b6aa97ef68eeabcdc0b6dde47775004096a241efcf0a90d19b34e898cc7340cdc940f8bdd46e23e352f34bca131d4d67a7c2ddb8d0d68b67f06152a128168e1c341c37e0a66c5018999b7059bcc300beed2c19dd1152d2fe062853293b8f3c8b5":"54ab68503f7d1b5c7741340dff2722a9" - -generic HMAC-MD2 Hash File OpenSSL test #3 -depends_on:MBEDTLS_MD2_C -mbedtls_md_hmac:"MD2":16:"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"d850e5f554558cf0fe79a0612e1d0365" - -generic HMAC-MD4 Hash File OpenSSL test #1 -depends_on:MBEDTLS_MD4_C -mbedtls_md_hmac:"MD4":16:"61616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"eabd0fbefb82fb0063a25a6d7b8bdc0f" - -generic HMAC-MD4 Hash File OpenSSL test #2 -depends_on:MBEDTLS_MD4_C -mbedtls_md_hmac:"MD4":16:"61616161616161616161616161616161":"270fcf11f27c27448457d7049a7edb084a3e554e0b2acf5806982213f0ad516402e4c869c4ff2171e18e3489baa3125d2c3056ebb616296f9b6aa97ef68eeabcdc0b6dde47775004096a241efcf0a90d19b34e898cc7340cdc940f8bdd46e23e352f34bca131d4d67a7c2ddb8d0d68b67f06152a128168e1c341c37e0a66c5018999b7059bcc300beed2c19dd1152d2fe062853293b8f3c8b5":"cec3c5e421a7b783aa89cacf78daf6dc" - -generic HMAC-MD4 Hash File OpenSSL test #3 -depends_on:MBEDTLS_MD4_C -mbedtls_md_hmac:"MD4":16:"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"ad5f0a04116109b397b57f9cc9b6df4b" - -generic HMAC-MD5 Hash File OpenSSL test #1 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"61616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"42552882f00bd4633ea81135a184b284" - -generic HMAC-MD5 Hash File OpenSSL test #2 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"61616161616161616161616161616161":"270fcf11f27c27448457d7049a7edb084a3e554e0b2acf5806982213f0ad516402e4c869c4ff2171e18e3489baa3125d2c3056ebb616296f9b6aa97ef68eeabcdc0b6dde47775004096a241efcf0a90d19b34e898cc7340cdc940f8bdd46e23e352f34bca131d4d67a7c2ddb8d0d68b67f06152a128168e1c341c37e0a66c5018999b7059bcc300beed2c19dd1152d2fe062853293b8f3c8b5":"a16a842891786d01fe50ba7731db7464" - -generic HMAC-MD5 Hash File OpenSSL test #3 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"e97f623936f98a7f741c4bd0612fecc2" - -HMAC-MD2 Bouncy Castle test #1 -depends_on:MBEDTLS_MD2_C -mbedtls_md_hmac:"MD2":16:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"dc1923ef5f161d35bef839ca8c807808" - -HMAC-MD4 Bouncy Castle test #1 -depends_on:MBEDTLS_MD4_C -mbedtls_md_hmac:"MD4":16:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"5570ce964ba8c11756cdc3970278ff5a" - -HMAC-MD5 Bouncy Castle test #1 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"5ccec34ea9656392457fa1ac27f08fbc" - -generic HMAC-MD5 Test Vector RFC2202 #1 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"9294727a3638bb1c13f48ef8158bfc9d" - -generic HMAC-MD5 Test Vector RFC2202 #2 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"4a656665":"7768617420646f2079612077616e7420666f72206e6f7468696e673f":"750c783e6ab0b503eaa86e310a5db738" - -generic HMAC-MD5 Test Vector RFC2202 #3 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd":"56be34521d144c88dbb8c733f0e8b3f6" - -generic HMAC-MD5 Test Vector RFC2202 #4 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"0102030405060708090a0b0c0d0e0f10111213141516171819":"cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd":"697eaf0aca3a3aea3a75164746ffaa79" - -generic HMAC-MD5 Test Vector RFC2202 #5 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":12:"0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c":"546573742057697468205472756e636174696f6e":"56461ef2342edc00f9bab995" - -generic HMAC-MD5 Test Vector RFC2202 #6 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374":"6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd" - -generic HMAC-MD5 Test Vector RFC2202 #7 -depends_on:MBEDTLS_MD5_C -mbedtls_md_hmac:"MD5":16:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b657920616e64204c6172676572205468616e204f6e6520426c6f636b2d53697a652044617461":"6f630fad67cda0ee1fb1f562db3aa53e" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #1 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"24cb4bd67d20fc1a5d2ed7732dcc39377f0a5668" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #2 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"4a656665":"7768617420646f2079612077616e7420666f72206e6f7468696e673f":"dda6c0213a485a9e24f4742064a7f033b43c4069" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #3 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd":"b0b105360de759960ab4f35298e116e295d8e7c1" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #4 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"0102030405060708090a0b0c0d0e0f10111213141516171819":"cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd":"d5ca862f4d21d5e610e18b4cf1beb97a4365ecf4" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #5 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c":"546573742057697468205472756e636174696f6e":"7619693978f91d90539ae786500ff3d8e0518e39" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #6 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374":"6466ca07ac5eac29e1bd523e5ada7605b791fd8b" - -generic HMAC-RIPEMD160 Test vector RFC 2286 #7 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_hmac:"RIPEMD160":20:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b657920616e64204c6172676572205468616e204f6e6520426c6f636b2d53697a652044617461":"69ea60798d71616cce5fd0871e23754cd75d5a0a" - -generic multi step mbedtls_md2 Test vector RFC1319 #1 -depends_on:MBEDTLS_MD_C:MBEDTLS_MD2_C -md_text_multi:"MD2":"":"8350e5a3e24c153df2275c9f80692773" - -generic multi step mbedtls_md2 Test vector RFC1319 #2 -depends_on:MBEDTLS_MD2_C -md_text_multi:"MD2":"a":"32ec01ec4a6dac72c0ab96fb34c0b5d1" - -generic multi step mbedtls_md2 Test vector RFC1319 #3 -depends_on:MBEDTLS_MD2_C -md_text_multi:"MD2":"abc":"da853b0d3f88d99b30283a69e6ded6bb" - -generic multi step mbedtls_md2 Test vector RFC1319 #4 -depends_on:MBEDTLS_MD2_C -md_text_multi:"MD2":"message digest":"ab4f496bfb2a530b219ff33031fe06b0" - -generic multi step mbedtls_md2 Test vector RFC1319 #5 -depends_on:MBEDTLS_MD2_C -md_text_multi:"MD2":"abcdefghijklmnopqrstuvwxyz":"4e8ddff3650292ab5a4108c3aa47940b" - -generic multi step mbedtls_md2 Test vector RFC1319 #6 -depends_on:MBEDTLS_MD2_C -md_text_multi:"MD2":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"da33def2a42df13975352846c30338cd" - -generic multi step mbedtls_md2 Test vector RFC1319 #7 -depends_on:MBEDTLS_MD2_C -md_text_multi:"MD2":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"d5976f79d83d3a0dc9806c3c66f3efd8" - -generic multi step mbedtls_md4 Test vector RFC1320 #1 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"":"31d6cfe0d16ae931b73c59d7e0c089c0" - -generic multi step mbedtls_md4 Test vector RFC1320 #2 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"a":"bde52cb31de33e46245e05fbdbd6fb24" - -generic multi step mbedtls_md4 Test vector RFC1320 #3 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"abc":"a448017aaf21d8525fc10ae87aa6729d" - -generic multi step mbedtls_md4 Test vector RFC1320 #4 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"message digest":"d9130a8164549fe818874806e1c7014b" - -generic multi step mbedtls_md4 Test vector RFC1320 #5 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"abcdefghijklmnopqrstuvwxyz":"d79e1c308aa5bbcdeea8ed63df412da9" - -generic multi step mbedtls_md4 Test vector RFC1320 #6 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"043f8582f241db351ce627e153e7f0e4" - -generic multi step mbedtls_md4 Test vector RFC1320 #7 -depends_on:MBEDTLS_MD4_C -md_text_multi:"MD4":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"e33b4ddc9c38f2199c3e7b164fcc0536" - -generic multi step mbedtls_md5 Test vector RFC1321 #1 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"":"d41d8cd98f00b204e9800998ecf8427e" - -generic multi step mbedtls_md5 Test vector RFC1321 #2 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"a":"0cc175b9c0f1b6a831c399e269772661" - -generic multi step mbedtls_md5 Test vector RFC1321 #3 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"abc":"900150983cd24fb0d6963f7d28e17f72" - -generic multi step mbedtls_md5 Test vector RFC1321 #4 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"message digest":"f96b697d7cb7938d525a2f31aaf161d0" - -generic multi step mbedtls_md5 Test vector RFC1321 #5 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"abcdefghijklmnopqrstuvwxyz":"c3fcd3d76192e4007dfb496cca67e13b" - -generic multi step mbedtls_md5 Test vector RFC1321 #6 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"d174ab98d277d9f5a5611c2c9f419d9f" - -generic multi step mbedtls_md5 Test vector RFC1321 #7 -depends_on:MBEDTLS_MD5_C -md_text_multi:"MD5":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"57edf4a22be3c955ac49da2e2107b67a" - -generic multi step mbedtls_ripemd160 Test vector from paper #1 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"":"9c1185a5c5e9fc54612808977ee8f548b2258d31" - -generic multi step mbedtls_ripemd160 Test vector from paper #2 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"a":"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe" - -generic multi step mbedtls_ripemd160 Test vector from paper #3 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"abc":"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc" - -generic multi step mbedtls_ripemd160 Test vector from paper #4 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"message digest":"5d0689ef49d2fae572b881b123a85ffa21595f36" - -generic multi step mbedtls_ripemd160 Test vector from paper #5 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"abcdefghijklmnopqrstuvwxyz":"f71c27109c692c1b56bbdceb5b9d2865b3708dbc" - -generic multi step mbedtls_ripemd160 Test vector from paper #6 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq":"12a053384a9c0c88e405a06c27dcf49ada62eb2b" - -generic multi step mbedtls_ripemd160 Test vector from paper #7 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"b0e20b6e3116640286ed3a87a5713079b21f5189" - -generic multi step mbedtls_ripemd160 Test vector from paper #8 -depends_on:MBEDTLS_RIPEMD160_C -md_text_multi:"RIPEMD160":"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"9b752e45573d4b39f4dbd3323cab82bf63326bfb" - -generic multi step HMAC-MD2 Hash File OpenSSL test #1 -depends_on:MBEDTLS_MD2_C -md_hmac_multi:"MD2":16:"61616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"d5732582f494f5ddf35efd166c85af9c" - -generic multi step HMAC-MD2 Hash File OpenSSL test #2 -depends_on:MBEDTLS_MD2_C -md_hmac_multi:"MD2":16:"61616161616161616161616161616161":"270fcf11f27c27448457d7049a7edb084a3e554e0b2acf5806982213f0ad516402e4c869c4ff2171e18e3489baa3125d2c3056ebb616296f9b6aa97ef68eeabcdc0b6dde47775004096a241efcf0a90d19b34e898cc7340cdc940f8bdd46e23e352f34bca131d4d67a7c2ddb8d0d68b67f06152a128168e1c341c37e0a66c5018999b7059bcc300beed2c19dd1152d2fe062853293b8f3c8b5":"54ab68503f7d1b5c7741340dff2722a9" - -generic multi step HMAC-MD2 Hash File OpenSSL test #3 -depends_on:MBEDTLS_MD2_C -md_hmac_multi:"MD2":16:"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"d850e5f554558cf0fe79a0612e1d0365" - -generic multi step HMAC-MD4 Hash File OpenSSL test #1 -depends_on:MBEDTLS_MD4_C -md_hmac_multi:"MD4":16:"61616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"eabd0fbefb82fb0063a25a6d7b8bdc0f" - -generic multi step HMAC-MD4 Hash File OpenSSL test #2 -depends_on:MBEDTLS_MD4_C -md_hmac_multi:"MD4":16:"61616161616161616161616161616161":"270fcf11f27c27448457d7049a7edb084a3e554e0b2acf5806982213f0ad516402e4c869c4ff2171e18e3489baa3125d2c3056ebb616296f9b6aa97ef68eeabcdc0b6dde47775004096a241efcf0a90d19b34e898cc7340cdc940f8bdd46e23e352f34bca131d4d67a7c2ddb8d0d68b67f06152a128168e1c341c37e0a66c5018999b7059bcc300beed2c19dd1152d2fe062853293b8f3c8b5":"cec3c5e421a7b783aa89cacf78daf6dc" - -generic multi step HMAC-MD4 Hash File OpenSSL test #3 -depends_on:MBEDTLS_MD4_C -md_hmac_multi:"MD4":16:"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"ad5f0a04116109b397b57f9cc9b6df4b" - -generic multi step HMAC-MD5 Hash File OpenSSL test #1 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"61616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"42552882f00bd4633ea81135a184b284" - -generic multi step HMAC-MD5 Hash File OpenSSL test #2 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"61616161616161616161616161616161":"270fcf11f27c27448457d7049a7edb084a3e554e0b2acf5806982213f0ad516402e4c869c4ff2171e18e3489baa3125d2c3056ebb616296f9b6aa97ef68eeabcdc0b6dde47775004096a241efcf0a90d19b34e898cc7340cdc940f8bdd46e23e352f34bca131d4d67a7c2ddb8d0d68b67f06152a128168e1c341c37e0a66c5018999b7059bcc300beed2c19dd1152d2fe062853293b8f3c8b5":"a16a842891786d01fe50ba7731db7464" - -generic multi step HMAC-MD5 Hash File OpenSSL test #3 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161":"b91ce5ac77d33c234e61002ed6":"e97f623936f98a7f741c4bd0612fecc2" - -generic multi step HMAC-MD5 Test Vector RFC2202 #1 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"9294727a3638bb1c13f48ef8158bfc9d" - -generic multi step HMAC-MD5 Test Vector RFC2202 #2 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"4a656665":"7768617420646f2079612077616e7420666f72206e6f7468696e673f":"750c783e6ab0b503eaa86e310a5db738" - -generic multi step HMAC-MD5 Test Vector RFC2202 #3 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd":"56be34521d144c88dbb8c733f0e8b3f6" - -generic multi step HMAC-MD5 Test Vector RFC2202 #4 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"0102030405060708090a0b0c0d0e0f10111213141516171819":"cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd":"697eaf0aca3a3aea3a75164746ffaa79" - -generic multi step HMAC-MD5 Test Vector RFC2202 #5 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":12:"0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c":"546573742057697468205472756e636174696f6e":"56461ef2342edc00f9bab995" - -generic multi step HMAC-MD5 Test Vector RFC2202 #6 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374":"6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd" - -generic multi step HMAC-MD5 Test Vector RFC2202 #7 -depends_on:MBEDTLS_MD5_C -md_hmac_multi:"MD5":16:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b657920616e64204c6172676572205468616e204f6e6520426c6f636b2d53697a652044617461":"6f630fad67cda0ee1fb1f562db3aa53e" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #1 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b":"4869205468657265":"24cb4bd67d20fc1a5d2ed7732dcc39377f0a5668" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #2 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"4a656665":"7768617420646f2079612077616e7420666f72206e6f7468696e673f":"dda6c0213a485a9e24f4742064a7f033b43c4069" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #3 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd":"b0b105360de759960ab4f35298e116e295d8e7c1" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #4 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"0102030405060708090a0b0c0d0e0f10111213141516171819":"cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd":"d5ca862f4d21d5e610e18b4cf1beb97a4365ecf4" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #5 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c":"546573742057697468205472756e636174696f6e":"7619693978f91d90539ae786500ff3d8e0518e39" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #6 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374":"6466ca07ac5eac29e1bd523e5ada7605b791fd8b" - -generic multi step HMAC-RIPEMD160 Test vector RFC 2286 #7 -depends_on:MBEDTLS_RIPEMD160_C -md_hmac_multi:"RIPEMD160":20:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa":"54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b657920616e64204c6172676572205468616e204f6e6520426c6f636b2d53697a652044617461":"69ea60798d71616cce5fd0871e23754cd75d5a0a" - -generic MD2 Hash file #1 -depends_on:MBEDTLS_MD2_C -mbedtls_md_file:"MD2":"data_files/hash_file_1":"b593c098712d2e21628c8986695451a8" - -generic MD2 Hash file #2 -depends_on:MBEDTLS_MD2_C -mbedtls_md_file:"MD2":"data_files/hash_file_2":"3c027b7409909a4c4b26bbab69ad9f4f" - -generic MD2 Hash file #3 -depends_on:MBEDTLS_MD2_C -mbedtls_md_file:"MD2":"data_files/hash_file_3":"6bb43eb285e81f414083a94cdbe2989d" - -generic MD2 Hash file #4 -depends_on:MBEDTLS_MD2_C -mbedtls_md_file:"MD2":"data_files/hash_file_4":"8350e5a3e24c153df2275c9f80692773" - -generic MD4 Hash file #1 -depends_on:MBEDTLS_MD4_C -mbedtls_md_file:"MD4":"data_files/hash_file_1":"8d19772c176bd27153b9486715e2c0b9" - -generic MD4 Hash file #2 -depends_on:MBEDTLS_MD4_C -mbedtls_md_file:"MD4":"data_files/hash_file_2":"f2ac53b8542882a5a0007c6f84b4d9fd" - -generic MD4 Hash file #3 -depends_on:MBEDTLS_MD4_C -mbedtls_md_file:"MD4":"data_files/hash_file_3":"195c15158e2d07881d9a654095ce4a42" - -generic MD4 Hash file #4 -depends_on:MBEDTLS_MD4_C -mbedtls_md_file:"MD4":"data_files/hash_file_4":"31d6cfe0d16ae931b73c59d7e0c089c0" - -generic MD5 Hash file #1 -depends_on:MBEDTLS_MD5_C -mbedtls_md_file:"MD5":"data_files/hash_file_1":"52bcdc983c9ed64fc148a759b3c7a415" - -generic MD5 Hash file #2 -depends_on:MBEDTLS_MD5_C -mbedtls_md_file:"MD5":"data_files/hash_file_2":"d17d466f15891df10542207ae78277f0" - -generic MD5 Hash file #3 -depends_on:MBEDTLS_MD5_C -mbedtls_md_file:"MD5":"data_files/hash_file_3":"d945bcc6200ea95d061a2a818167d920" - -generic MD5 Hash file #4 -depends_on:MBEDTLS_MD5_C -mbedtls_md_file:"MD5":"data_files/hash_file_4":"d41d8cd98f00b204e9800998ecf8427e" - -generic RIPEMD160 Hash file #0 (from paper) -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_file:"RIPEMD160":"data_files/hash_file_5":"52783243c1697bdbe16d37f97f68f08325dc1528" - -generic RIPEMD160 Hash file #1 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_file:"RIPEMD160":"data_files/hash_file_1":"82f1d072f0ec0c2b353703a7b575a04c113af1a6" - -generic RIPEMD160 Hash file #2 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_file:"RIPEMD160":"data_files/hash_file_2":"996fbc8b79206ba7393ebcd246584069b1c08f0f" - -generic RIPEMD160 Hash file #3 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_file:"RIPEMD160":"data_files/hash_file_3":"8653b46d65998fa8c8846efa17937e742533ae48" - -generic RIPEMD160 Hash file #4 -depends_on:MBEDTLS_RIPEMD160_C -mbedtls_md_file:"RIPEMD160":"data_files/hash_file_4":"9c1185a5c5e9fc54612808977ee8f548b2258d31" - -generic HMAC-SHA-1 Test Vector FIPS-198a #1 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":20:"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f":"53616d706c65202331":"4f4ca3d5d68ba7cc0a1208c9c61e9c5da0403c0a" - -generic HMAC-SHA-1 Test Vector FIPS-198a #2 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":20:"303132333435363738393a3b3c3d3e3f40414243":"53616d706c65202332":"0922d3405faa3d194f82a45830737d5cc6c75d24" - -generic HMAC-SHA-1 Test Vector FIPS-198a #3 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":20:"505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3":"53616d706c65202333":"bcf41eab8bb2d802f3d05caf7cb092ecf8d1a3aa" - -generic HMAC-SHA-1 Test Vector FIPS-198a #4 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":12:"707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0":"53616d706c65202334":"9ea886efe268dbecce420c75" - -generic HMAC-SHA-1 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"7b10f4124b15c82e":"27dcb5b1daf60cfd3e2f73d4d64ca9c684f8bf71fc682a46793b1790afa4feb100ca7aaff26f58f0e1d0ed42f1cdad1f474afa2e79d53a0c42892c4d7b327cbe46b295ed8da3b6ecab3d4851687a6f812b79df2f6b20f11f6706f5301790ca99625aad7391d84f78043d2a0a239b1477984c157bbc9276064e7a1a406b0612ca":"4ead12c2fe3d6ea43acb" - -generic HMAC-SHA-1 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"4fe9fb902172a21b":"4ceb3a7c13659c22fe51134f03dce4c239d181b63c6b0b59d367157fd05cab98384f92dfa482d2d5e78e72eef1b1838af4696026c54233d484ecbbe87f904df5546419f8567eafd232e6c2fcd3ee2b7682c63000524b078dbb2096f585007deae752562df1fe3b01278089e16f3be46e2d0f7cabac2d8e6cc02a2d0ca953425f":"564428a67be1924b5793" - -generic HMAC-SHA-1 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"d1f01455f78c4fb4":"00d40f67b57914bec456a3e3201ef1464be319a8d188c02e157af4b54f9b5a66d67f898a9bdbb19ff63a80aba6f246d013575721d52eb1b47a65def884011c49b257bcc2817fc853f106e8138ce386d7a5ac3103de0a3fa0ed6bb7af9ff66ebd1cc46fb86e4da0013d20a3c2dcd8fb828a4b70f7f104b41bf3f44682a66497ea":"56a665a7cdfe610f9fc5" - -generic HMAC-SHA-1 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"4e5ef77fdf033a5b":"e59326464e3201d195e29f2a3446ec1b1c9ff31154e2a4d0e40ed466f1bc855d29f76835624fa0127d29c9b1915939a046f385af7e5d47a23ba91f28bd22f811ea258dbbf3332bcd3543b8285d5df41bd064ffd64a341c22c4edb44f9c8d9e6df0c59dbf4a052a6c83da7478e179a6f3839c6870ff8ca8b9497f9ac1d725fdda":"981c0a7a8423b63a8fa6" - -generic HMAC-SHA-1 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"bcd9ff8aa60be2be":"51be4d0eb37bab714f92e19e9d70390655b363e8cd346a748245e731f437759cb8206412c8dab2ef1d4f36f880f41ff69d949da4594fdecb65e23cac1329b59e69e29bf875b38c31df6fa546c595f35cc2192aa750679a8a51a65e00e839d73a8d8c598a610d237fbe78955213589d80efcb73b95b8586f96d17b6f51a71c3b8":"84633f9f5040c8971478" - -generic HMAC-SHA-1 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"4a661bce6ed86d21":"5ff6c744f1aab1bc29697d71f67541b8b3cec3c7079183b10a83fb98a9ee251d4bac3e1cb581ca972aaed8efd7c2875a6fb4c991132f67c9742d45e53bc7e8eaa94b35b37a907be61086b426cd11088ac118934e85d968c9667fd69fc6f6ea38c0fe34710b7ece91211b9b7ea00acd31f022aa6726368f9928a1352f122233f1":"739df59353ac6694e55e" - -generic HMAC-SHA-1 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_hmac:"SHA1":10:"1287e1565a57b547":"390ffdccc6171c11568d85b8f913e019bf4cd982ca9cd21ea730d41bdf3fcc0bc88ff48ba13a8f23deb2d96ec1033e7b2a58ca72b0c1e17bf03330db25d1e360fa6918009c4294bd1215b5ccd159a8f58bc3dc3d490eb7c3b9f887e8c98dbbb274a75373dcb695a59abd0219529d88518a96f92abc0bbcbda985c388f1fbbcc9":"d78ddf08077c7d9e2ba6" - -generic HMAC-SHA-224 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":14:"e055eb756697ee573fd3214811a9f7fa":"3875847012ee42fe54a0027bdf38cca7021b83a2ed0503af69ef6c37c637bc1114fba40096c5947d736e19b7af3c68d95a4e3b8b073adbbb80f47e9db8f2d4f0018ddd847fabfdf9dd9b52c93e40458977725f6b7ba15f0816bb895cdf50401268f5d702b7e6a5f9faef57b8768c8a3fc14f9a4b3182b41d940e337d219b29ff":"40a453133361cc48da11baf616ee" - -generic HMAC-SHA-224 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":14:"88e5258b55b1623385eb9632fa7c57d6":"ada76bb604be14326551701cf30e48a65eee80b44f0b9d4a07b1844543b7844a621097fdc99de57387458ae9354899b620d0617eabcaefa9eef3d413a33628054335ce656c26fa2986e0f111a6351096b283101ec7868871d770b370973c7405983f9756b3005a3eab492cfd0e7eb42e5c2e15fa6be8718c0a50acc4e5717230":"81c783af538015cef3c60095df53" - -generic HMAC-SHA-224 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":14:"85d402d822114d31abf75526e2538705":"8020d8d98cc2e2298b32879c51c751e1dd5558fe2eabb8f158604297d6d072ce2261a1d6830b7cfe2617b57c7126f99c9476211d6161acd75d266da217ec8174b80484c9dc6f0448a0a036a3fc82e8bf54bdb71549368258d5d41f57978a4c266b92e8783ef66350215573d99be4089144b383ad8f3222bae8f3bf80ffb1bb2b":"2aa0340ac9deafe3be38129daca0" - -generic HMAC-SHA-224 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":14:"545c6eecc5ee46fa17c59f91a94f81ae":"8fb7f3565593170152ddb2021874784e951977cfdd22f8b72a72a61320a8f2a35697b5e913f717805559b1af1861ee3ed42fb788481e4fd276b17bdbefcae7b4501dc5d20de5b7626dd5efdcd65294db4bdf682c33d9a9255c6435383fa5f1c886326a3acbc6bd50a33ab5b2dbb034ce0112d4e226bbcd57e3731a519aa1d784":"3eb566eac54c4a3a9ef092469f24" - -generic HMAC-SHA-224 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":14:"4466ab4dc438841a9750c7f173dff02e":"2534c11c78c99cffaec8f722f04adc7045c7324d58ce98e37cfa94b6ed21ed7f58ce55379ef24b72d6d640ee9154f96c614734be9c408e225d7ba4cecc1179cc9f6e1808e1067aa8f244a99bd0c3267594c1887a40d167f8b7cf78db0d19f97b01fc50b8c86def490dfa7a5135002c33e71d77a8cce8ea0f93e0580439a33733":"59f44a9bbed4875b892d22d6b5ab" - -generic HMAC-SHA-224 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":28:"0e3dd9bb5e4cf0f09a4c11600af56d8d":"f4589fa76c328ea25cf8bae582026ba40a59d45a546ff31cf80eb826088f69bb954c452c74586836416dee90a5255bc5d56d3b405b3705a5197045688b32fa984c3a3dfbdc9c2460a0b5e6312a624048bb6f170306535e9b371a3ab134a2642a230ad03d2c688cca80baeaee9a20e1d4c548b1cede29c6a45bf4df2c8c476f1a":"12175b93e3da4c58217145e4dc0a1cf142fab9319bb501e037b350ba" - -generic HMAC-SHA-224 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA224":28:"cda5187b0c5dcb0f8e5a8beed2306584":"9011ae29b44c49b347487ce972965f16ade3c15be0856ce9c853a9739dba07e4f20d594ddc1dfe21560a65a4e458cfa17745575b915a30c7a9412ff8d1d689db9680dd2428c27588bb0dc92d2cd9445fe8f44b840a197c52c3c4333fff45533945134398df6436513cfab06c924046b8c795a5bd92e8d5f2de85bf306f2eed67":"4aaba92b40e2a600feab176eb9b292d814864195c03342aad6f67f08" - -generic HMAC-SHA-256 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA256":16:"cdffd34e6b16fdc0":"d83e78b99ab61709608972b36e76a575603db742269cc5dd4e7d5ca7816e26b65151c92632550cb4c5253c885d5fce53bc47459a1dbd5652786c4aac0145a532f12c05138af04cbb558101a7af5df478834c2146594dd73690d01a4fe72545894335f427ac70204798068cb86c5a600b40b414ede23590b41e1192373df84fe3":"c6f0dde266cb4a26d41e8259d33499cc" - -generic HMAC-SHA-256 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA256":16:"6d97bb5892245be2":"13c2b391d59c0252ca5d2302beaaf88c4bcd779bb505ad9a122003dfae4cc123ad2bd036f225c4f040021a6b9fb8bd6f0281cf2e2631a732bdc71693cc42ef6d52b6c6912a9ef77b3274eb85ad7f965ae6ed44ac1721962a884ec7acfb4534b1488b1c0c45afa4dae8da1eb7b0a88a3240365d7e4e7d826abbde9f9203fd99d7":"31588e241b015319a5ab8c4527296498" - -generic HMAC-SHA-256 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA256":16:"3c7fc8a70b49007a":"60024e428a39c8b8bb2e9591bad9dc2115dfbfd716b6eb7af30a6eb34560caccbbfa47b710fa8d523aca71e9e5ba10fc1feb1a43556d71f07ea4f33496f093044e8caf1d02b79e46eb1288d5964a7a7494f6b92574c35784eece054c6151281d80822f7d47b8231c35d07f5cb5cf4310ddc844845a01c6bfab514c048eccaf9f":"1c98c94a32bec9f253c21070f82f8438" - -generic HMAC-SHA-256 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA256":24:"369f33f85b927a07":"ae8e2a94ca386d448cbacdb0e9040ae3cb297c296363052cc157455da29a0c95897315fc11e3f12b81e2418da1ec280bccbc00e847584ce9d14deeba7b3c9b8dba958b04bba37551f6c9ba9c060be1a4b8cf43aa62e5078b76c6512c5619b71a6a7cf5727180e1ff14f5a1a3c1691bf8b6ebad365c151e58d749d57adb3a4986":"60b90383286533d309de46593e6ce39fc51fb00a8d88278c" - -generic HMAC-SHA-256 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA256":24:"e5179687582b4dc4":"ce103bdacdf32f614f6727bcb31ca1c2824a850d00f5585b016fb234fe1ef2cd687f302d3c6b738ed89a24060d65c36675d0d96307c72ef3e8a83bfa8402e226de9d5d1724ba75c4879bf41a4a465ce61887d9f49a34757849b48bae81c27ebed76faae2ad669bca04747d409148d40812776e0ae2c395b3cb9c89981ce72d5c":"509581f6816df4b8cc9f2cf42b7cc6e6a5a1e375a16f2412" - -generic HMAC-SHA-256 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_hmac:"SHA256":24:"63cec6246aeb1b61":"c178db908a405fa88aa255b8cad22b4057016585f139ee930388b083d86062fa0b3ea1f23f8a43bd11bee8464bcbd19b5ab9f6a8038d5245516f8274d20c8ee3033a07b908da528fa00343bb595deed500cab9745c4cb6391c23300f0d3584b090b3326c4cfa342620b78f9f5b4f27f7307ed770643ec1764aeae3dcf1a3ec69":"64f3dd861b7c7d29fce9ae0ce9ed954b5d7141806ee9eec7" - -generic HMAC-SHA-384 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA384":32:"91a7401817386948ca952f9a20ee55dc":"2fea5b91035d6d501f3a834fa178bff4e64b99a8450432dafd32e4466b0e1e7781166f8a73f7e036b3b0870920f559f47bd1400a1a906e85e0dcf00a6c26862e9148b23806680f285f1fe4f93cdaf924c181a965465739c14f2268c8be8b471847c74b222577a1310bcdc1a85ef1468aa1a3fd4031213c97324b7509c9050a3d":"6d7be9490058cf413cc09fd043c224c2ec4fa7859b13783000a9a593c9f75838" - -generic HMAC-SHA-384 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA384":32:"d6cac19657061aa90a6da11cd2e9ea47":"9f482e4655173135dfaa22a11bbbe6af263db48716406c5aec162ba3c4b41cad4f5a91558377521191c7343118beee65982929802913d67b6de5c4bdc3d27299bd722219d5ad2efa5bdb9ff7b229fc4bbc3f60719320cf2e7a51cad1133d21bad2d80919b1836ef825308b7c51c6b7677ac782e2bc30007afba065681cbdd215":"f3d5f3c008175321aa7b2ea379eaa4f8b9dcc60f895ec8940b8162f80a7dfe9f" - -generic HMAC-SHA-384 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA384":32:"e06366ad149b8442cd4c1abdddd0afde":"2d140a194c02a5598f69174834679b8371234a0d505491f1bd03e128dd91a8bca2fb812e9d5da71613b5b00952ea78bf450d5b7547dea79135925085c7d3e6f52009c51ca3d88c6c09e9d074b0ee110736e0ec9b478b93efb34d7bf1c41b54decec43eab077a3aa4998ede53f67b4ea36c266745f9643d5360bdc8337c70dabf":"c19c67eda6fe29f3667bee1c897c333ce7683094ae77e84b4c16378d290895a1" - -generic HMAC-SHA-384 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA384":48:"01ac59f42f8bb91d1bd10fe6990d7a87":"3caf18c476edd5615f343ac7b7d3a9da9efade755672d5ba4b8ae8a7505539ea2c124ff755ec0457fbe49e43480b3c71e7f4742ec3693aad115d039f90222b030fdc9440313691716d5302005808c07627483b916fdf61983063c2eb1268f2deeef42fc790334456bc6bad256e31fc9066de7cc7e43d1321b1866db45e905622":"1985fa2163a5943fc5d92f1fe8831215e7e91f0bff5332bc713a072bdb3a8f9e5c5157463a3bfeb36231416e65973e64" - -generic HMAC-SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA384":48:"fd74b9d9e102a3a80df1baf0cb35bace":"1a068917584813d1689ccbd0370c2114d537cdc8cc52bf6db16d5535f8f7d1ad0c850a9fa0cf62373ffbf7642b1f1e8164010d350721d798d9f99e9724830399c2fce26377e83d38845675457865c03d4a07d741a505ef028343eb29fd46d0f761f3792886998c1e5c32ac3bc7e6f08faed194b34f06eff4d5d4a5b42c481e0e":"a981eaf5de3d78b20ebd4414a4edd0657e3667cd808a0dbc430cf7252f73a5b24efa136039207bd59806897457d74e0c" - -generic HMAC-SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA384":48:"9fe794f0e26b669fa5f6883149377c6c":"6010c9745e8f1d44cfdc99e7e0fd79bc4271944c2d1d84dba589073dfc4ca5eb98c59356f60cd87bef28aeb83a832bde339b2087daf942aa1f67876c5d5ed33924bed4143bc12a2be532ccaf64daa7e2bc3c8872b9823b0533b6f5159135effe8c61545536975d7c3a61ba7365ec35f165bc92b4d19eb9156ade17dfa1bb4161":"915ae61f8754698c2b6ef9629e93441f8541bd4258a5e05372d19136cfaefc0473b48d96119291b38eb1a3cb1982a986" - -generic HMAC-SHA-512 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA512":32:"c95a17c09940a691ed2d621571b0eb844ede55a9":"99cd28262e81f34878cdcebf4128e05e2098a7009278a66f4c785784d0e5678f3f2b22f86e982d273b6273a222ec61750b4556d766f1550a7aedfe83faedbc4bdae83fa560d62df17eb914d05fdaa48940551bac81d700f5fca7147295e386e8120d66742ec65c6ee8d89a92217a0f6266d0ddc60bb20ef679ae8299c8502c2f":"6bc1379d156559ddee2ed420ea5d5c5ff3e454a1059b7ba72c350e77b6e9333c" - -generic HMAC-SHA-512 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA512":32:"3b10b8fa718840d1dea8e9fc317476bcf55875fd":"f04f5b7073d7d0274e8354433b390306c5607632f5f589c12edb62d55673aff2366d2e6b24de731adf92e654baa30b1cfd4a069788f65ec1b99b015d904d8832110dbd74eae35a81562d14ce4136d820ad0a55ff5489ba678fbbc1c27663ec1349d70e740f0e0ec27cfbe8971819f4789e486b50a2d7271d77e2aaea50de62fd":"fc3c38c7a17e3ce06db033f1c172866f01a00045db55f2e234f71c82264f2ba2" - -generic HMAC-SHA-512 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA512":32:"4803d311394600dc1e0d8fc8cedeb8bde3fe7c42":"a10c125dd702a97153ad923ba5e9889cfac1ba169de370debe51f233735aa6effcc9785c4b5c7e48c477dc5c411ae6a959118584e26adc94b42c2b29b046f3cf01c65b24a24bd2e620bdf650a23bb4a72655b1100d7ce9a4dab697c6379754b4396c825de4b9eb73f2e6a6c0d0353bbdeaf706612800e137b858fdb30f3311c6":"7cd8236c55102e6385f52279506df6fcc388ab75092da21395ce14a82b202ffa" - -generic HMAC-SHA-512 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA512":48:"aeb2f3b977fa6c8e71e07c5a5c74ff58166de092":"22457355dc76095abd46846b41cfe49a06ce42ac8857b4702fc771508dfb3626e0bfe851df897a07b36811ec433766e4b4166c26301b3493e7440d4554b0ef6ac20f1a530e58fac8aeba4e9ff2d4898d8a28783b49cd269c2965fd7f8e4f2d60cf1e5284f2495145b72382aad90e153a90ecae125ad75336fb128825c23fb8b0":"fa39bd8fcc3bfa218f9dea5d3b2ce10a7619e31678a56d8a9d927b1fe703b125af445debe9a89a07db6194d27b44d85a" - -generic HMAC-SHA-512 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA512":48:"4285d3d7744da52775bb44ca436a3154f7980309":"208f0b6f2de2e5aa5df11927ddc6df485edc1193181c484d0f0a434a95418803101d4de9fdb798f93516a6916fa38a8207de1666fe50fe3441c03b112eaaae6954ed063f7ac4e3c1e3f73b20d153fe9e4857f5e91430f0a70ee820529adac2467469fd18adf10e2af0fea27c0abc83c5a9af77c364a466cffce8bab4e2b70bc1":"fe7603f205b2774fe0f14ecfa3e338e90608a806d11ca459dff5ce36b1b264ecd3af5f0492a7521d8da3102ba20927a5" - -generic HMAC-SHA-512 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_hmac:"SHA512":48:"8ab783d5acf32efa0d9c0a21abce955e96630d89":"17371e013dce839963d54418e97be4bd9fa3cb2a368a5220f5aa1b8aaddfa3bdefc91afe7c717244fd2fb640f5cb9d9bf3e25f7f0c8bc758883b89dcdce6d749d9672fed222277ece3e84b3ec01b96f70c125fcb3cbee6d19b8ef0873f915f173bdb05d81629ba187cc8ac1934b2f75952fb7616ae6bd812946df694bd2763af":"9ac7ca8d1aefc166b046e4cf7602ebe181a0e5055474bff5b342106731da0d7e48e4d87bc0a6f05871574289a1b099f8" - -generic multi step HMAC-SHA-1 Test Vector FIPS-198a #1 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":20:"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f":"53616d706c65202331":"4f4ca3d5d68ba7cc0a1208c9c61e9c5da0403c0a" - -generic multi step HMAC-SHA-1 Test Vector FIPS-198a #2 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":20:"303132333435363738393a3b3c3d3e3f40414243":"53616d706c65202332":"0922d3405faa3d194f82a45830737d5cc6c75d24" - -generic multi step HMAC-SHA-1 Test Vector FIPS-198a #3 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":20:"505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3":"53616d706c65202333":"bcf41eab8bb2d802f3d05caf7cb092ecf8d1a3aa" - -generic multi step HMAC-SHA-1 Test Vector FIPS-198a #4 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":12:"707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0":"53616d706c65202334":"9ea886efe268dbecce420c75" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"7b10f4124b15c82e":"27dcb5b1daf60cfd3e2f73d4d64ca9c684f8bf71fc682a46793b1790afa4feb100ca7aaff26f58f0e1d0ed42f1cdad1f474afa2e79d53a0c42892c4d7b327cbe46b295ed8da3b6ecab3d4851687a6f812b79df2f6b20f11f6706f5301790ca99625aad7391d84f78043d2a0a239b1477984c157bbc9276064e7a1a406b0612ca":"4ead12c2fe3d6ea43acb" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"4fe9fb902172a21b":"4ceb3a7c13659c22fe51134f03dce4c239d181b63c6b0b59d367157fd05cab98384f92dfa482d2d5e78e72eef1b1838af4696026c54233d484ecbbe87f904df5546419f8567eafd232e6c2fcd3ee2b7682c63000524b078dbb2096f585007deae752562df1fe3b01278089e16f3be46e2d0f7cabac2d8e6cc02a2d0ca953425f":"564428a67be1924b5793" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"d1f01455f78c4fb4":"00d40f67b57914bec456a3e3201ef1464be319a8d188c02e157af4b54f9b5a66d67f898a9bdbb19ff63a80aba6f246d013575721d52eb1b47a65def884011c49b257bcc2817fc853f106e8138ce386d7a5ac3103de0a3fa0ed6bb7af9ff66ebd1cc46fb86e4da0013d20a3c2dcd8fb828a4b70f7f104b41bf3f44682a66497ea":"56a665a7cdfe610f9fc5" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"4e5ef77fdf033a5b":"e59326464e3201d195e29f2a3446ec1b1c9ff31154e2a4d0e40ed466f1bc855d29f76835624fa0127d29c9b1915939a046f385af7e5d47a23ba91f28bd22f811ea258dbbf3332bcd3543b8285d5df41bd064ffd64a341c22c4edb44f9c8d9e6df0c59dbf4a052a6c83da7478e179a6f3839c6870ff8ca8b9497f9ac1d725fdda":"981c0a7a8423b63a8fa6" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"bcd9ff8aa60be2be":"51be4d0eb37bab714f92e19e9d70390655b363e8cd346a748245e731f437759cb8206412c8dab2ef1d4f36f880f41ff69d949da4594fdecb65e23cac1329b59e69e29bf875b38c31df6fa546c595f35cc2192aa750679a8a51a65e00e839d73a8d8c598a610d237fbe78955213589d80efcb73b95b8586f96d17b6f51a71c3b8":"84633f9f5040c8971478" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"4a661bce6ed86d21":"5ff6c744f1aab1bc29697d71f67541b8b3cec3c7079183b10a83fb98a9ee251d4bac3e1cb581ca972aaed8efd7c2875a6fb4c991132f67c9742d45e53bc7e8eaa94b35b37a907be61086b426cd11088ac118934e85d968c9667fd69fc6f6ea38c0fe34710b7ece91211b9b7ea00acd31f022aa6726368f9928a1352f122233f1":"739df59353ac6694e55e" - -generic multi step HMAC-SHA-1 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA1_C -md_hmac_multi:"SHA1":10:"1287e1565a57b547":"390ffdccc6171c11568d85b8f913e019bf4cd982ca9cd21ea730d41bdf3fcc0bc88ff48ba13a8f23deb2d96ec1033e7b2a58ca72b0c1e17bf03330db25d1e360fa6918009c4294bd1215b5ccd159a8f58bc3dc3d490eb7c3b9f887e8c98dbbb274a75373dcb695a59abd0219529d88518a96f92abc0bbcbda985c388f1fbbcc9":"d78ddf08077c7d9e2ba6" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":14:"e055eb756697ee573fd3214811a9f7fa":"3875847012ee42fe54a0027bdf38cca7021b83a2ed0503af69ef6c37c637bc1114fba40096c5947d736e19b7af3c68d95a4e3b8b073adbbb80f47e9db8f2d4f0018ddd847fabfdf9dd9b52c93e40458977725f6b7ba15f0816bb895cdf50401268f5d702b7e6a5f9faef57b8768c8a3fc14f9a4b3182b41d940e337d219b29ff":"40a453133361cc48da11baf616ee" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":14:"88e5258b55b1623385eb9632fa7c57d6":"ada76bb604be14326551701cf30e48a65eee80b44f0b9d4a07b1844543b7844a621097fdc99de57387458ae9354899b620d0617eabcaefa9eef3d413a33628054335ce656c26fa2986e0f111a6351096b283101ec7868871d770b370973c7405983f9756b3005a3eab492cfd0e7eb42e5c2e15fa6be8718c0a50acc4e5717230":"81c783af538015cef3c60095df53" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":14:"85d402d822114d31abf75526e2538705":"8020d8d98cc2e2298b32879c51c751e1dd5558fe2eabb8f158604297d6d072ce2261a1d6830b7cfe2617b57c7126f99c9476211d6161acd75d266da217ec8174b80484c9dc6f0448a0a036a3fc82e8bf54bdb71549368258d5d41f57978a4c266b92e8783ef66350215573d99be4089144b383ad8f3222bae8f3bf80ffb1bb2b":"2aa0340ac9deafe3be38129daca0" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":14:"545c6eecc5ee46fa17c59f91a94f81ae":"8fb7f3565593170152ddb2021874784e951977cfdd22f8b72a72a61320a8f2a35697b5e913f717805559b1af1861ee3ed42fb788481e4fd276b17bdbefcae7b4501dc5d20de5b7626dd5efdcd65294db4bdf682c33d9a9255c6435383fa5f1c886326a3acbc6bd50a33ab5b2dbb034ce0112d4e226bbcd57e3731a519aa1d784":"3eb566eac54c4a3a9ef092469f24" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":14:"4466ab4dc438841a9750c7f173dff02e":"2534c11c78c99cffaec8f722f04adc7045c7324d58ce98e37cfa94b6ed21ed7f58ce55379ef24b72d6d640ee9154f96c614734be9c408e225d7ba4cecc1179cc9f6e1808e1067aa8f244a99bd0c3267594c1887a40d167f8b7cf78db0d19f97b01fc50b8c86def490dfa7a5135002c33e71d77a8cce8ea0f93e0580439a33733":"59f44a9bbed4875b892d22d6b5ab" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":28:"0e3dd9bb5e4cf0f09a4c11600af56d8d":"f4589fa76c328ea25cf8bae582026ba40a59d45a546ff31cf80eb826088f69bb954c452c74586836416dee90a5255bc5d56d3b405b3705a5197045688b32fa984c3a3dfbdc9c2460a0b5e6312a624048bb6f170306535e9b371a3ab134a2642a230ad03d2c688cca80baeaee9a20e1d4c548b1cede29c6a45bf4df2c8c476f1a":"12175b93e3da4c58217145e4dc0a1cf142fab9319bb501e037b350ba" - -generic multi step HMAC-SHA-224 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA224":28:"cda5187b0c5dcb0f8e5a8beed2306584":"9011ae29b44c49b347487ce972965f16ade3c15be0856ce9c853a9739dba07e4f20d594ddc1dfe21560a65a4e458cfa17745575b915a30c7a9412ff8d1d689db9680dd2428c27588bb0dc92d2cd9445fe8f44b840a197c52c3c4333fff45533945134398df6436513cfab06c924046b8c795a5bd92e8d5f2de85bf306f2eed67":"4aaba92b40e2a600feab176eb9b292d814864195c03342aad6f67f08" - -generic multi step HMAC-SHA-256 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA256":16:"cdffd34e6b16fdc0":"d83e78b99ab61709608972b36e76a575603db742269cc5dd4e7d5ca7816e26b65151c92632550cb4c5253c885d5fce53bc47459a1dbd5652786c4aac0145a532f12c05138af04cbb558101a7af5df478834c2146594dd73690d01a4fe72545894335f427ac70204798068cb86c5a600b40b414ede23590b41e1192373df84fe3":"c6f0dde266cb4a26d41e8259d33499cc" - -generic multi step HMAC-SHA-256 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA256":16:"6d97bb5892245be2":"13c2b391d59c0252ca5d2302beaaf88c4bcd779bb505ad9a122003dfae4cc123ad2bd036f225c4f040021a6b9fb8bd6f0281cf2e2631a732bdc71693cc42ef6d52b6c6912a9ef77b3274eb85ad7f965ae6ed44ac1721962a884ec7acfb4534b1488b1c0c45afa4dae8da1eb7b0a88a3240365d7e4e7d826abbde9f9203fd99d7":"31588e241b015319a5ab8c4527296498" - -generic multi step HMAC-SHA-256 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA256":16:"3c7fc8a70b49007a":"60024e428a39c8b8bb2e9591bad9dc2115dfbfd716b6eb7af30a6eb34560caccbbfa47b710fa8d523aca71e9e5ba10fc1feb1a43556d71f07ea4f33496f093044e8caf1d02b79e46eb1288d5964a7a7494f6b92574c35784eece054c6151281d80822f7d47b8231c35d07f5cb5cf4310ddc844845a01c6bfab514c048eccaf9f":"1c98c94a32bec9f253c21070f82f8438" - -generic multi step HMAC-SHA-256 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA256":24:"369f33f85b927a07":"ae8e2a94ca386d448cbacdb0e9040ae3cb297c296363052cc157455da29a0c95897315fc11e3f12b81e2418da1ec280bccbc00e847584ce9d14deeba7b3c9b8dba958b04bba37551f6c9ba9c060be1a4b8cf43aa62e5078b76c6512c5619b71a6a7cf5727180e1ff14f5a1a3c1691bf8b6ebad365c151e58d749d57adb3a4986":"60b90383286533d309de46593e6ce39fc51fb00a8d88278c" - -generic multi step HMAC-SHA-256 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA256":24:"e5179687582b4dc4":"ce103bdacdf32f614f6727bcb31ca1c2824a850d00f5585b016fb234fe1ef2cd687f302d3c6b738ed89a24060d65c36675d0d96307c72ef3e8a83bfa8402e226de9d5d1724ba75c4879bf41a4a465ce61887d9f49a34757849b48bae81c27ebed76faae2ad669bca04747d409148d40812776e0ae2c395b3cb9c89981ce72d5c":"509581f6816df4b8cc9f2cf42b7cc6e6a5a1e375a16f2412" - -generic multi step HMAC-SHA-256 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -md_hmac_multi:"SHA256":24:"63cec6246aeb1b61":"c178db908a405fa88aa255b8cad22b4057016585f139ee930388b083d86062fa0b3ea1f23f8a43bd11bee8464bcbd19b5ab9f6a8038d5245516f8274d20c8ee3033a07b908da528fa00343bb595deed500cab9745c4cb6391c23300f0d3584b090b3326c4cfa342620b78f9f5b4f27f7307ed770643ec1764aeae3dcf1a3ec69":"64f3dd861b7c7d29fce9ae0ce9ed954b5d7141806ee9eec7" - -generic multi step HMAC-SHA-384 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA384":32:"91a7401817386948ca952f9a20ee55dc":"2fea5b91035d6d501f3a834fa178bff4e64b99a8450432dafd32e4466b0e1e7781166f8a73f7e036b3b0870920f559f47bd1400a1a906e85e0dcf00a6c26862e9148b23806680f285f1fe4f93cdaf924c181a965465739c14f2268c8be8b471847c74b222577a1310bcdc1a85ef1468aa1a3fd4031213c97324b7509c9050a3d":"6d7be9490058cf413cc09fd043c224c2ec4fa7859b13783000a9a593c9f75838" - -generic multi step HMAC-SHA-384 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA384":32:"d6cac19657061aa90a6da11cd2e9ea47":"9f482e4655173135dfaa22a11bbbe6af263db48716406c5aec162ba3c4b41cad4f5a91558377521191c7343118beee65982929802913d67b6de5c4bdc3d27299bd722219d5ad2efa5bdb9ff7b229fc4bbc3f60719320cf2e7a51cad1133d21bad2d80919b1836ef825308b7c51c6b7677ac782e2bc30007afba065681cbdd215":"f3d5f3c008175321aa7b2ea379eaa4f8b9dcc60f895ec8940b8162f80a7dfe9f" - -generic multi step HMAC-SHA-384 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA384":32:"e06366ad149b8442cd4c1abdddd0afde":"2d140a194c02a5598f69174834679b8371234a0d505491f1bd03e128dd91a8bca2fb812e9d5da71613b5b00952ea78bf450d5b7547dea79135925085c7d3e6f52009c51ca3d88c6c09e9d074b0ee110736e0ec9b478b93efb34d7bf1c41b54decec43eab077a3aa4998ede53f67b4ea36c266745f9643d5360bdc8337c70dabf":"c19c67eda6fe29f3667bee1c897c333ce7683094ae77e84b4c16378d290895a1" - -generic multi step HMAC-SHA-384 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA384":48:"01ac59f42f8bb91d1bd10fe6990d7a87":"3caf18c476edd5615f343ac7b7d3a9da9efade755672d5ba4b8ae8a7505539ea2c124ff755ec0457fbe49e43480b3c71e7f4742ec3693aad115d039f90222b030fdc9440313691716d5302005808c07627483b916fdf61983063c2eb1268f2deeef42fc790334456bc6bad256e31fc9066de7cc7e43d1321b1866db45e905622":"1985fa2163a5943fc5d92f1fe8831215e7e91f0bff5332bc713a072bdb3a8f9e5c5157463a3bfeb36231416e65973e64" - -generic multi step HMAC-SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA384":48:"fd74b9d9e102a3a80df1baf0cb35bace":"1a068917584813d1689ccbd0370c2114d537cdc8cc52bf6db16d5535f8f7d1ad0c850a9fa0cf62373ffbf7642b1f1e8164010d350721d798d9f99e9724830399c2fce26377e83d38845675457865c03d4a07d741a505ef028343eb29fd46d0f761f3792886998c1e5c32ac3bc7e6f08faed194b34f06eff4d5d4a5b42c481e0e":"a981eaf5de3d78b20ebd4414a4edd0657e3667cd808a0dbc430cf7252f73a5b24efa136039207bd59806897457d74e0c" - -generic multi step HMAC-SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA384":48:"9fe794f0e26b669fa5f6883149377c6c":"6010c9745e8f1d44cfdc99e7e0fd79bc4271944c2d1d84dba589073dfc4ca5eb98c59356f60cd87bef28aeb83a832bde339b2087daf942aa1f67876c5d5ed33924bed4143bc12a2be532ccaf64daa7e2bc3c8872b9823b0533b6f5159135effe8c61545536975d7c3a61ba7365ec35f165bc92b4d19eb9156ade17dfa1bb4161":"915ae61f8754698c2b6ef9629e93441f8541bd4258a5e05372d19136cfaefc0473b48d96119291b38eb1a3cb1982a986" - -generic multi step HMAC-SHA-512 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA512":32:"c95a17c09940a691ed2d621571b0eb844ede55a9":"99cd28262e81f34878cdcebf4128e05e2098a7009278a66f4c785784d0e5678f3f2b22f86e982d273b6273a222ec61750b4556d766f1550a7aedfe83faedbc4bdae83fa560d62df17eb914d05fdaa48940551bac81d700f5fca7147295e386e8120d66742ec65c6ee8d89a92217a0f6266d0ddc60bb20ef679ae8299c8502c2f":"6bc1379d156559ddee2ed420ea5d5c5ff3e454a1059b7ba72c350e77b6e9333c" - -generic multi step HMAC-SHA-512 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA512":32:"3b10b8fa718840d1dea8e9fc317476bcf55875fd":"f04f5b7073d7d0274e8354433b390306c5607632f5f589c12edb62d55673aff2366d2e6b24de731adf92e654baa30b1cfd4a069788f65ec1b99b015d904d8832110dbd74eae35a81562d14ce4136d820ad0a55ff5489ba678fbbc1c27663ec1349d70e740f0e0ec27cfbe8971819f4789e486b50a2d7271d77e2aaea50de62fd":"fc3c38c7a17e3ce06db033f1c172866f01a00045db55f2e234f71c82264f2ba2" - -generic multi step HMAC-SHA-512 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA512":32:"4803d311394600dc1e0d8fc8cedeb8bde3fe7c42":"a10c125dd702a97153ad923ba5e9889cfac1ba169de370debe51f233735aa6effcc9785c4b5c7e48c477dc5c411ae6a959118584e26adc94b42c2b29b046f3cf01c65b24a24bd2e620bdf650a23bb4a72655b1100d7ce9a4dab697c6379754b4396c825de4b9eb73f2e6a6c0d0353bbdeaf706612800e137b858fdb30f3311c6":"7cd8236c55102e6385f52279506df6fcc388ab75092da21395ce14a82b202ffa" - -generic multi step HMAC-SHA-512 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA512":48:"aeb2f3b977fa6c8e71e07c5a5c74ff58166de092":"22457355dc76095abd46846b41cfe49a06ce42ac8857b4702fc771508dfb3626e0bfe851df897a07b36811ec433766e4b4166c26301b3493e7440d4554b0ef6ac20f1a530e58fac8aeba4e9ff2d4898d8a28783b49cd269c2965fd7f8e4f2d60cf1e5284f2495145b72382aad90e153a90ecae125ad75336fb128825c23fb8b0":"fa39bd8fcc3bfa218f9dea5d3b2ce10a7619e31678a56d8a9d927b1fe703b125af445debe9a89a07db6194d27b44d85a" - -generic multi step HMAC-SHA-512 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA512":48:"4285d3d7744da52775bb44ca436a3154f7980309":"208f0b6f2de2e5aa5df11927ddc6df485edc1193181c484d0f0a434a95418803101d4de9fdb798f93516a6916fa38a8207de1666fe50fe3441c03b112eaaae6954ed063f7ac4e3c1e3f73b20d153fe9e4857f5e91430f0a70ee820529adac2467469fd18adf10e2af0fea27c0abc83c5a9af77c364a466cffce8bab4e2b70bc1":"fe7603f205b2774fe0f14ecfa3e338e90608a806d11ca459dff5ce36b1b264ecd3af5f0492a7521d8da3102ba20927a5" - -generic multi step HMAC-SHA-512 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -md_hmac_multi:"SHA512":48:"8ab783d5acf32efa0d9c0a21abce955e96630d89":"17371e013dce839963d54418e97be4bd9fa3cb2a368a5220f5aa1b8aaddfa3bdefc91afe7c717244fd2fb640f5cb9d9bf3e25f7f0c8bc758883b89dcdce6d749d9672fed222277ece3e84b3ec01b96f70c125fcb3cbee6d19b8ef0873f915f173bdb05d81629ba187cc8ac1934b2f75952fb7616ae6bd812946df694bd2763af":"9ac7ca8d1aefc166b046e4cf7602ebe181a0e5055474bff5b342106731da0d7e48e4d87bc0a6f05871574289a1b099f8" - -generic SHA-1 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"":"da39a3ee5e6b4b0d3255bfef95601890afd80709" - -generic SHA-1 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"a8":"99f2aa95e36f95c2acb0eaf23998f030638f3f15" - -generic SHA-1 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"3000":"f944dcd635f9801f7ac90a407fbc479964dec024" - -generic SHA-1 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"42749e":"a444319e9b6cc1e8464c511ec0969c37d6bb2619" - -generic SHA-1 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"9fc3fe08":"16a0ff84fcc156fd5d3ca3a744f20a232d172253" - -generic SHA-1 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"b5c1c6f1af":"fec9deebfcdedaf66dda525e1be43597a73a1f93" - -generic SHA-1 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"ec29561244ede706b6eb30a1c371d74450a105c3f9735f7fa9fe38cf67f304a5736a106e92e17139a6813b1c81a4f3d3fb9546ab4296fa9f722826c066869edacd73b2548035185813e22634a9da44000d95a281ff9f264ecce0a931222162d021cca28db5f3c2aa24945ab1e31cb413ae29810fd794cad5dfaf29ec43cb38d198fe4ae1da2359780221405bd6712a5305da4b1b737fce7cd21c0eb7728d08235a9011":"970111c4e77bcc88cc20459c02b69b4aa8f58217" - -generic SHA-1 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"5fc2c3f6a7e79dc94be526e5166a238899d54927ce470018fbfd668fd9dd97cbf64e2c91584d01da63be3cc9fdff8adfefc3ac728e1e335b9cdc87f069172e323d094b47fa1e652afe4d6aa147a9f46fda33cacb65f3aa12234746b9007a8c85fe982afed7815221e43dba553d8fe8a022cdac1b99eeeea359e5a9d2e72e382dffa6d19f359f4f27dc3434cd27daeeda8e38594873398678065fbb23665aba9309d946135da0e4a4afdadff14db18e85e71dd93c3bf9faf7f25c8194c4269b1ee3d9934097ab990025d9c3aaf63d5109f52335dd3959d38ae485050e4bbb6235574fc0102be8f7a306d6e8de6ba6becf80f37415b57f9898a5824e77414197422be3d36a6080":"0423dc76a8791107d14e13f5265b343f24cc0f19" - -generic SHA-1 Test Vector NIST CAVS #9 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"0f865f46a8f3aed2da18482aa09a8f390dc9da07d51d1bd10fe0bf5f3928d5927d08733d32075535a6d1c8ac1b2dc6ba0f2f633dc1af68e3f0fa3d85e6c60cb7b56c239dc1519a007ea536a07b518ecca02a6c31b46b76f021620ef3fc6976804018380e5ab9c558ebfc5cb1c9ed2d974722bf8ab6398f1f2b82fa5083f85c16a5767a3a07271d67743f00850ce8ec428c7f22f1cf01f99895c0c844845b06a06cecb0c6cf83eb55a1d4ebc44c2c13f6f7aa5e0e08abfd84e7864279057abc471ee4a45dbbb5774afa24e51791a0eada11093b88681fe30baa3b2e94113dc63342c51ca5d1a6096d0897b626e42cb91761058008f746f35465465540ad8c6b8b60f7e1461b3ce9e6529625984cb8c7d46f07f735be067588a0117f23e34ff57800e2bbe9a1605fde6087fb15d22c5d3ac47566b8c448b0cee40373e5ba6eaa21abee71366afbb27dbbd300477d70c371e7b8963812f5ed4fb784fb2f3bd1d3afe883cdd47ef32beaea":"6692a71d73e00f27df976bc56df4970650d90e45" - -generic SHA-1 Test Vector NIST CAVS #10 -depends_on:MBEDTLS_SHA1_C -md_hex:"SHA1":"8236153781bd2f1b81ffe0def1beb46f5a70191142926651503f1b3bb1016acdb9e7f7acced8dd168226f118ff664a01a8800116fd023587bfba52a2558393476f5fc69ce9c65001f23e70476d2cc81c97ea19caeb194e224339bcb23f77a83feac5096f9b3090c51a6ee6d204b735aa71d7e996d380b80822e4dfd43683af9c7442498cacbea64842dfda238cb099927c6efae07fdf7b23a4e4456e0152b24853fe0d5de4179974b2b9d4a1cdbefcbc01d8d311b5dda059136176ea698ab82acf20dd490be47130b1235cb48f8a6710473cfc923e222d94b582f9ae36d4ca2a32d141b8e8cc36638845fbc499bce17698c3fecae2572dbbd470552430d7ef30c238c2124478f1f780483839b4fb73d63a9460206824a5b6b65315b21e3c2f24c97ee7c0e78faad3df549c7ca8ef241876d9aafe9a309f6da352bec2caaa92ee8dca392899ba67dfed90aef33d41fc2494b765cb3e2422c8e595dabbfaca217757453fb322a13203f425f6073a9903e2dc5818ee1da737afc345f0057744e3a56e1681c949eb12273a3bfc20699e423b96e44bd1ff62e50a848a890809bfe1611c6787d3d741103308f849a790f9c015098286dbacfc34c1718b2c2b77e32194a75dda37954a320fa68764027852855a7e5b5274eb1e2cbcd27161d98b59ad245822015f48af82a45c0ed59be94f9af03d9736048570d6e3ef63b1770bc98dfb77de84b1bb1708d872b625d9ab9b06c18e5dbbf34399391f0f8aa26ec0dac7ff4cb8ec97b52bcb942fa6db2385dcd1b3b9d567aaeb425d567b0ebe267235651a1ed9bf78fd93d3c1dd077fe340bb04b00529c58f45124b717c168d07e9826e33376988bc5cf62845c2009980a4dfa69fbc7e5a0b1bb20a5958ca967aec68eb31dd8fccca9afcd30a26bab26279f1bf6724ff":"11863b483809ef88413ca9b0084ac4a5390640af" - -generic SHA-224 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"":"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" - -generic SHA-224 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"ff":"e33f9d75e6ae1369dbabf81b96b4591ae46bba30b591a6b6c62542b5" - -generic SHA-224 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"984c":"2fa9df9157d9e027cfbc4c6a9df32e1adc0cbe2328ec2a63c5ae934e" - -generic SHA-224 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"50efd0":"b5a9820413c2bf8211fbbf5df1337043b32fa4eafaf61a0c8e9ccede" - -generic SHA-224 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"e5e09924":"fd19e74690d291467ce59f077df311638f1c3a46e510d0e49a67062d" - -generic SHA-224 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"21ebecb914":"78f4a71c21c694499ce1c7866611b14ace70d905012c356323c7c713" - -generic SHA-224 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA224":"fc488947c1a7a589726b15436b4f3d9556262f98fc6422fc5cdf20f0fad7fe427a3491c86d101ffe6b7514f06268f65b2d269b0f69ad9a97847eff1c16a2438775eb7be6847ccf11cb8b2e8dcd6640b095b49c0693fe3cf4a66e2d9b7ad68bff14f3ad69abf49d0aba36cbe0535202deb6599a47225ef05beb351335cd7bc0f480d691198c7e71305ffd53b39d33242bb79cfd98bfd69e137b5d18b2b89ac9ace01c8dbdcf2533cce3682ecc52118de0c1062ec2126c2e657d6ea3d9e2398e705d4b0b1f1ceecb266dffc4f31bf42744fb1e938dc22a889919ee1e73f463f7871fed720519e32186264b7ef2a0e5d9a18e6c95c0781894f77967f048951dec3b4d892a38710b1e3436d3c29088eb8b3da1789c25db3d3bc6c26081206e7155d210a89b80ca6ea877c41ff9947c0f25625dcb118294a163501f6239c326661a958fd12da4cd15a899f8b88cc723589056eaec5aa04a4cf5dbb6f480f9660423ccf38c486e210707e0fb25e1f126ceb2616f63e147a647dab0af9ebe89d65458bf636154a46e4cab95f5ee62da2c7974cd14b90d3e4f99f81733e85b3c1d5da2b508d9b90f5eed7eff0d9c7649de62bee00375454fee4a39576a5bbfdae428e7f8097bdf7797f167686cb68407e49079e4611ff3402b6384ba7b7e522bd2bb11ce8fd02ea4c1604d163ac4f6dde50b8b1f593f7edaadeac0868ed97df690200680c25f0f5d85431a529e4f339089dcdeda105e4ee51dead704cdf5a605c55fb055c9b0e86b8ba1b564c0dea3eb790a595cb103cb292268b07c5e59371e1a7ef597cd4b22977a820694c9f9aeb55d9de3ef62b75d6e656e3336698d960a3787bf8cf5b926a7faeef52ae128bcb5dc9e66d94b016c7b8e034879171a2d91c381f57e6a815b63b5ee6a6d2ff435b49f14c963966960194430d78f8f87627a67757fb3532b289550894da6dce4817a4e07f4d56877a1102ffcc8befa5c9f8fca6a4574d93ff70376c8861e0f8108cf907fce77ecb49728f86f034f80224b9695682e0824462f76cdb1fd1af151337b0d85419047a7aa284791718a4860cd586f7824b95bc837b6fd4f9be5aade68456e20356aa4d943dac36bf8b67b9e8f9d01a00fcda74b798bafa746c661b010f75b59904b29d0c8041504811c4065f82cf2ead58d2f595cbd8bc3e7043f4d94577b373b7cfe16a36fe564f505c03b70cfeb5e5f411c79481338aa67e86b3f5a2e77c21e454c333ae3da943ab723ab5f4c940395319534a5575f64acba0d0ecc43f60221ed3badf7289c9b3a7b903a2d6c94e15fa4c310dc4fa7faa0c24f405160a1002dbef20e4105d481db982f7243f79400a6e4cd9753c4b9732a47575f504b20c328fe9add7f432a4f075829da07b53b695037dc51737d3cd731934df333cd1a53fcf65aa31baa450ca501a6fae26e322347e618c5a444d92e9fec5a8261ae38b98fee5be77c02cec09ddccd5b3de92036":"1302149d1e197c41813b054c942329d420e366530f5517b470e964fe" - -generic SHA-256 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - -generic SHA-256 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"bd":"68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b" - -generic SHA-256 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"5fd4":"7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788" - -generic SHA-256 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"b0bd69":"4096804221093ddccfbf46831490ea63e9e99414858f8d75ff7f642c7ca61803" - -generic SHA-256 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"c98c8e55":"7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504" - -generic SHA-256 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"81a723d966":"7516fb8bb11350df2bf386bc3c33bd0f52cb4c67c6e4745e0488e62c2aea2605" - -generic SHA-256 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -md_hex:"SHA256":"8390cf0be07661cc7669aac54ce09a37733a629d45f5d983ef201f9b2d13800e555d9b1097fec3b783d7a50dcb5e2b644b96a1e9463f177cf34906bf388f366db5c2deee04a30e283f764a97c3b377a034fefc22c259214faa99babaff160ab0aaa7e2ccb0ce09c6b32fe08cbc474694375aba703fadbfa31cf685b30a11c57f3cf4edd321e57d3ae6ebb1133c8260e75b9224fa47a2bb205249add2e2e62f817491482ae152322be0900355cdcc8d42a98f82e961a0dc6f537b7b410eff105f59673bfb787bf042aa071f7af68d944d27371c64160fe9382772372516c230c1f45c0d6b6cca7f274b394da9402d3eafdf733994ec58ab22d71829a98399574d4b5908a447a5a681cb0dd50a31145311d92c22a16de1ead66a5499f2dceb4cae694772ce90762ef8336afec653aa9b1a1c4820b221136dfce80dce2ba920d88a530c9410d0a4e0358a3a11052e58dd73b0b179ef8f56fe3b5a2d117a73a0c38a1392b6938e9782e0d86456ee4884e3c39d4d75813f13633bc79baa07c0d2d555afbf207f52b7dca126d015aa2b9873b3eb065e90b9b065a5373fe1fb1b20d594327d19fba56cb81e7b6696605ffa56eba3c27a438697cc21b201fd7e09f18deea1b3ea2f0d1edc02df0e20396a145412cd6b13c32d2e605641c948b714aec30c0649dc44143511f35ab0fd5dd64c34d06fe86f3836dfe9edeb7f08cfc3bd40956826356242191f99f53473f32b0cc0cf9321d6c92a112e8db90b86ee9e87cc32d0343db01e32ce9eb782cb24efbbbeb440fe929e8f2bf8dfb1550a3a2e742e8b455a3e5730e9e6a7a9824d17acc0f72a7f67eae0f0970f8bde46dcdefaed3047cf807e7f00a42e5fd11d40f5e98533d7574425b7d2bc3b3845c443008b58980e768e464e17cc6f6b3939eee52f713963d07d8c4abf02448ef0b889c9671e2f8a436ddeeffcca7176e9bf9d1005ecd377f2fa67c23ed1f137e60bf46018a8bd613d038e883704fc26e798969df35ec7bbc6a4fe46d8910bd82fa3cded265d0a3b6d399e4251e4d8233daa21b5812fded6536198ff13aa5a1cd46a5b9a17a4ddc1d9f85544d1d1cc16f3df858038c8e071a11a7e157a85a6a8dc47e88d75e7009a8b26fdb73f33a2a70f1e0c259f8f9533b9b8f9af9288b7274f21baeec78d396f8bacdcc22471207d9b4efccd3fedc5c5a2214ff5e51c553f35e21ae696fe51e8df733a8e06f50f419e599e9f9e4b37ce643fc810faaa47989771509d69a110ac916261427026369a21263ac4460fb4f708f8ae28599856db7cb6a43ac8e03d64a9609807e76c5f312b9d1863bfa304e8953647648b4f4ab0ed995e":"4109cdbec3240ad74cc6c37f39300f70fede16e21efc77f7865998714aad0b5e" - -generic SHA-384 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"":"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b" - -generic SHA-384 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"ab":"fb94d5be118865f6fcbc978b825da82cff188faec2f66cb84b2537d74b4938469854b0ca89e66fa2e182834736629f3d" - -generic SHA-384 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"7c27":"3d80be467df86d63abb9ea1d3f9cb39cd19890e7f2c53a6200bedc5006842b35e820dc4e0ca90ca9b97ab23ef07080fc" - -generic SHA-384 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"31f5ca":"78d54b943421fdf7ba90a7fb9637c2073aa480454bd841d39ff72f4511fc21fb67797b652c0c823229342873d3bef955" - -generic SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"7bdee3f8":"8bdafba0777ee446c3431c2d7b1fbb631089f71d2ca417abc1d230e1aba64ec2f1c187474a6f4077d372c14ad407f99a" - -generic SHA-384 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"8f05604915":"504e414bf1db1060f14c8c799e25b1e0c4dcf1504ebbd129998f0ae283e6de86e0d3c7e879c73ec3b1836c3ee89c2649" - -generic SHA-384 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"665da6eda214":"4c022f112010908848312f8b8f1072625fd5c105399d562ea1d56130619a7eac8dfc3748fd05ee37e4b690be9daa9980" - -generic SHA-384 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA384":"7f46ce506d593c4ed53c82edeb602037e0485befbee03f7f930fe532d18ff2a3f5fd6076672c8145a1bf40dd94f7abab47c9ae71c234213d2ad1069c2dac0b0ba15257ae672b8245960ae55bd50315c0097daa3a318745788d70d14706910809ca6e396237fe4934fa46f9ce782d66606d8bd6b2d283b1160513ce9c24e9f084b97891f99d4cdefc169a029e431ca772ba1bba426fce6f01d8e286014e5acc66b799e4db62bd4783322f8a32ff78e0de3957df50ce10871f4e0680df4e8ca3960af9bc6f4efa8eb3962d18f474eb178c3265cc46b8f2ff5ab1a7449fea297dfcfabfa01f28abbb7289bb354b691b5664ec6d098af51be19947ec5ba7ebd66380d1141953ba78d4aa5401679fa7b0a44db1981f864d3535c45afe4c61183d5b0ad51fae71ca07e34240283959f7530a32c70d95a088e501c230059f333b0670825009e7e22103ef22935830df1fac8ef877f5f3426dd54f7d1128dd871ad9a7d088f94c0e8712013295b8d69ae7623b880978c2d3c6ad26dc478f8dc47f5c0adcc618665dc3dc205a9071b2f2191e16cac5bd89bb59148fc719633752303aa08e518dbc389f0a5482caaa4c507b8729a6f3edd061efb39026cecc6399f51971cf7381d605e144a5928c8c2d1ad7467b05da2f202f4f3234e1aff19a0198a28685721c3d2d52311c721e3fdcbaf30214cdc3acff8c433880e104fb63f2df7ce69a97857819ba7ac00ac8eae1969764fde8f68cf8e0916d7e0c151147d4944f99f42ae50f30e1c79a42d2b6c5188d133d3cbbf69094027b354b295ccd0f7dc5a87d73638bd98ebfb00383ca0fa69cb8dcb35a12510e5e07ad8789047d0b63841a1bb928737e8b0a0c33254f47aa8bfbe3341a09c2b76dbcefa67e30df300d34f7b8465c4f869e51b6bcfe6cf68b238359a645036bf7f63f02924e087ce7457e483b6025a859903cb484574aa3b12cf946f32127d537c33bee3141b5db96d10a148c50ae045f287210757710d6846e04b202f79e87dd9a56bc6da15f84a77a7f63935e1dee00309cd276a8e7176cb04da6bb0e9009534438732cb42d008008853d38d19beba46e61006e30f7efd1bc7c2906b024e4ff898a1b58c448d68b43c6ab63f34f85b3ac6aa4475867e51b583844cb23829f4b30f4bdd817d88e2ef3e7b4fc0a624395b05ec5e8686082b24d29fef2b0d3c29e031d5f94f504b1d3df9361eb5ffbadb242e66c39a8094cfe62f85f639f3fd65fc8ae0c74a8f4c6e1d070b9183a434c722caaa0225f8bcd68614d6f0738ed62f8484ec96077d155c08e26c46be262a73e3551698bd70d8d5610cf37c4c306eed04ba6a040a9c3e6d7e15e8acda17f477c2484cf5c56b813313927be8387b1024f995e98fc87f1029091c01424bdc2b296c2eadb7d25b3e762a2fd0c2dcd1727ddf91db97c5984305265f3695a7f5472f2d72c94d68c27914f14f82aa8dd5fe4e2348b0ca967a3f98626a091552f5d0ffa2bf10350d23c996256c01fdeffb2c2c612519869f877e4929c6e95ff15040f1485e22ed14119880232fef3b57b3848f15b1766a5552879df8f06":"cba9e3eb12a6f83db11e8a6ff40d1049854ee094416bc527fea931d8585428a8ed6242ce81f6769b36e2123a5c23483e" - -generic SHA-512 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"":"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" - -generic SHA-512 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"8f":"e4cd2d19931b5aad9c920f45f56f6ce34e3d38c6d319a6e11d0588ab8b838576d6ce6d68eea7c830de66e2bd96458bfa7aafbcbec981d4ed040498c3dd95f22a" - -generic SHA-512 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"e724":"7dbb520221a70287b23dbcf62bfc1b73136d858e86266732a7fffa875ecaa2c1b8f673b5c065d360c563a7b9539349f5f59bef8c0c593f9587e3cd50bb26a231" - -generic SHA-512 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"de4c90":"33ce98281045a5c4c9df0363d8196f1d7dfcd5ee46ac89776fd8a4344c12f123a66788af5bd41ceff1941aa5637654b4064c88c14e00465ab79a2fc6c97e1014" - -generic SHA-512 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"a801e94b":"dadb1b5a27f9fece8d86adb2a51879beb1787ff28f4e8ce162cad7fee0f942efcabbf738bc6f797fc7cc79a3a75048cd4c82ca0757a324695bfb19a557e56e2f" - -generic SHA-512 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"94390d3502":"b6175c4c4cccf69e0ce5f0312010886ea6b34d43673f942ae42483f9cbb7da817de4e11b5d58e25a3d9bd721a22cdffe1c40411cc45df1911fa5506129b69297" - -generic SHA-512 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"49297dd63e5f":"1fcc1e6f6870859d11649f5e5336a9cd16329c029baf04d5a6edf257889a2e9522b497dd656bb402da461307c4ee382e2e89380c8e6e6e7697f1e439f650fa94" - -generic SHA-512 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA512_C -md_hex:"SHA512":"990d1ae71a62d7bda9bfdaa1762a68d296eee72a4cd946f287a898fbabc002ea941fd8d4d991030b4d27a637cce501a834bb95eab1b7889a3e784c7968e67cbf552006b206b68f76d9191327524fcc251aeb56af483d10b4e0c6c5e599ee8c0fe4faeca8293844a8547c6a9a90d093f2526873a19ad4a5e776794c68c742fb834793d2dfcb7fea46c63af4b70fd11cb6e41834e72ee40edb067b292a794990c288d5007e73f349fb383af6a756b8301ad6e5e0aa8cd614399bb3a452376b1575afa6bdaeaafc286cb064bb91edef97c632b6c1113d107fa93a0905098a105043c2f05397f702514439a08a9e5ddc196100721d45c8fc17d2ed659376f8a00bd5cb9a0860e26d8a29d8d6aaf52de97e9346033d6db501a35dbbaf97c20b830cd2d18c2532f3a59cc497ee64c0e57d8d060e5069b28d86edf1adcf59144b221ce3ddaef134b3124fbc7dd000240eff0f5f5f41e83cd7f5bb37c9ae21953fe302b0f6e8b68fa91c6ab99265c64b2fd9cd4942be04321bb5d6d71932376c6f2f88e02422ba6a5e2cb765df93fd5dd0728c6abdaf03bce22e0678a544e2c3636f741b6f4447ee58a8fc656b43ef817932176adbfc2e04b2c812c273cd6cbfa4098f0be036a34221fa02643f5ee2e0b38135f2a18ecd2f16ebc45f8eb31b8ab967a1567ee016904188910861ca1fa205c7adaa194b286893ffe2f4fbe0384c2aef72a4522aeafd3ebc71f9db71eeeef86c48394a1c86d5b36c352cc33a0a2c800bc99e62fd65b3a2fd69e0b53996ec13d8ce483ce9319efd9a85acefabdb5342226febb83fd1daf4b24265f50c61c6de74077ef89b6fecf9f29a1f871af1e9f89b2d345cda7499bd45c42fa5d195a1e1a6ba84851889e730da3b2b916e96152ae0c92154b49719841db7e7cc707ba8a5d7b101eb4ac7b629bb327817910fff61580b59aab78182d1a2e33473d05b00b170b29e331870826cfe45af206aa7d0246bbd8566ca7cfb2d3c10bfa1db7dd48dd786036469ce7282093d78b5e1a5b0fc81a54c8ed4ceac1e5305305e78284ac276f5d7862727aff246e17addde50c670028d572cbfc0be2e4f8b2eb28fa68ad7b4c6c2a239c460441bfb5ea049f23b08563b4e47729a59e5986a61a6093dbd54f8c36ebe87edae01f251cb060ad1364ce677d7e8d5a4a4ca966a7241cc360bc2acb280e5f9e9c1b032ad6a180a35e0c5180b9d16d026c865b252098cc1d99ba7375ca31c7702c0d943d5e3dd2f6861fa55bd46d94b67ed3e52eccd8dd06d968e01897d6de97ed3058d91dd":"8e4bc6f8b8c60fe4d68c61d9b159c8693c3151c46749af58da228442d927f23359bd6ccd6c2ec8fa3f00a86cecbfa728e1ad60b821ed22fcd309ba91a4138bc9" - -generic multi step SHA-1 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"":"da39a3ee5e6b4b0d3255bfef95601890afd80709" - -generic multi step SHA-1 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"a8":"99f2aa95e36f95c2acb0eaf23998f030638f3f15" - -generic multi step SHA-1 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"3000":"f944dcd635f9801f7ac90a407fbc479964dec024" - -generic multi step SHA-1 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"42749e":"a444319e9b6cc1e8464c511ec0969c37d6bb2619" - -generic multi step SHA-1 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"9fc3fe08":"16a0ff84fcc156fd5d3ca3a744f20a232d172253" - -generic multi step SHA-1 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"b5c1c6f1af":"fec9deebfcdedaf66dda525e1be43597a73a1f93" - -generic multi step SHA-1 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"ec29561244ede706b6eb30a1c371d74450a105c3f9735f7fa9fe38cf67f304a5736a106e92e17139a6813b1c81a4f3d3fb9546ab4296fa9f722826c066869edacd73b2548035185813e22634a9da44000d95a281ff9f264ecce0a931222162d021cca28db5f3c2aa24945ab1e31cb413ae29810fd794cad5dfaf29ec43cb38d198fe4ae1da2359780221405bd6712a5305da4b1b737fce7cd21c0eb7728d08235a9011":"970111c4e77bcc88cc20459c02b69b4aa8f58217" - -generic multi step SHA-1 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"5fc2c3f6a7e79dc94be526e5166a238899d54927ce470018fbfd668fd9dd97cbf64e2c91584d01da63be3cc9fdff8adfefc3ac728e1e335b9cdc87f069172e323d094b47fa1e652afe4d6aa147a9f46fda33cacb65f3aa12234746b9007a8c85fe982afed7815221e43dba553d8fe8a022cdac1b99eeeea359e5a9d2e72e382dffa6d19f359f4f27dc3434cd27daeeda8e38594873398678065fbb23665aba9309d946135da0e4a4afdadff14db18e85e71dd93c3bf9faf7f25c8194c4269b1ee3d9934097ab990025d9c3aaf63d5109f52335dd3959d38ae485050e4bbb6235574fc0102be8f7a306d6e8de6ba6becf80f37415b57f9898a5824e77414197422be3d36a6080":"0423dc76a8791107d14e13f5265b343f24cc0f19" - -generic multi step SHA-1 Test Vector NIST CAVS #9 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"0f865f46a8f3aed2da18482aa09a8f390dc9da07d51d1bd10fe0bf5f3928d5927d08733d32075535a6d1c8ac1b2dc6ba0f2f633dc1af68e3f0fa3d85e6c60cb7b56c239dc1519a007ea536a07b518ecca02a6c31b46b76f021620ef3fc6976804018380e5ab9c558ebfc5cb1c9ed2d974722bf8ab6398f1f2b82fa5083f85c16a5767a3a07271d67743f00850ce8ec428c7f22f1cf01f99895c0c844845b06a06cecb0c6cf83eb55a1d4ebc44c2c13f6f7aa5e0e08abfd84e7864279057abc471ee4a45dbbb5774afa24e51791a0eada11093b88681fe30baa3b2e94113dc63342c51ca5d1a6096d0897b626e42cb91761058008f746f35465465540ad8c6b8b60f7e1461b3ce9e6529625984cb8c7d46f07f735be067588a0117f23e34ff57800e2bbe9a1605fde6087fb15d22c5d3ac47566b8c448b0cee40373e5ba6eaa21abee71366afbb27dbbd300477d70c371e7b8963812f5ed4fb784fb2f3bd1d3afe883cdd47ef32beaea":"6692a71d73e00f27df976bc56df4970650d90e45" - -generic multi step SHA-1 Test Vector NIST CAVS #10 -depends_on:MBEDTLS_SHA1_C -md_hex_multi:"SHA1":"8236153781bd2f1b81ffe0def1beb46f5a70191142926651503f1b3bb1016acdb9e7f7acced8dd168226f118ff664a01a8800116fd023587bfba52a2558393476f5fc69ce9c65001f23e70476d2cc81c97ea19caeb194e224339bcb23f77a83feac5096f9b3090c51a6ee6d204b735aa71d7e996d380b80822e4dfd43683af9c7442498cacbea64842dfda238cb099927c6efae07fdf7b23a4e4456e0152b24853fe0d5de4179974b2b9d4a1cdbefcbc01d8d311b5dda059136176ea698ab82acf20dd490be47130b1235cb48f8a6710473cfc923e222d94b582f9ae36d4ca2a32d141b8e8cc36638845fbc499bce17698c3fecae2572dbbd470552430d7ef30c238c2124478f1f780483839b4fb73d63a9460206824a5b6b65315b21e3c2f24c97ee7c0e78faad3df549c7ca8ef241876d9aafe9a309f6da352bec2caaa92ee8dca392899ba67dfed90aef33d41fc2494b765cb3e2422c8e595dabbfaca217757453fb322a13203f425f6073a9903e2dc5818ee1da737afc345f0057744e3a56e1681c949eb12273a3bfc20699e423b96e44bd1ff62e50a848a890809bfe1611c6787d3d741103308f849a790f9c015098286dbacfc34c1718b2c2b77e32194a75dda37954a320fa68764027852855a7e5b5274eb1e2cbcd27161d98b59ad245822015f48af82a45c0ed59be94f9af03d9736048570d6e3ef63b1770bc98dfb77de84b1bb1708d872b625d9ab9b06c18e5dbbf34399391f0f8aa26ec0dac7ff4cb8ec97b52bcb942fa6db2385dcd1b3b9d567aaeb425d567b0ebe267235651a1ed9bf78fd93d3c1dd077fe340bb04b00529c58f45124b717c168d07e9826e33376988bc5cf62845c2009980a4dfa69fbc7e5a0b1bb20a5958ca967aec68eb31dd8fccca9afcd30a26bab26279f1bf6724ff":"11863b483809ef88413ca9b0084ac4a5390640af" - -generic multi step SHA-224 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"":"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" - -generic multi step SHA-224 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"ff":"e33f9d75e6ae1369dbabf81b96b4591ae46bba30b591a6b6c62542b5" - -generic multi step SHA-224 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"984c":"2fa9df9157d9e027cfbc4c6a9df32e1adc0cbe2328ec2a63c5ae934e" - -generic multi step SHA-224 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"50efd0":"b5a9820413c2bf8211fbbf5df1337043b32fa4eafaf61a0c8e9ccede" - -generic multi step SHA-224 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"e5e09924":"fd19e74690d291467ce59f077df311638f1c3a46e510d0e49a67062d" - -generic multi step SHA-224 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"21ebecb914":"78f4a71c21c694499ce1c7866611b14ace70d905012c356323c7c713" - -generic multi step SHA-224 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA224":"fc488947c1a7a589726b15436b4f3d9556262f98fc6422fc5cdf20f0fad7fe427a3491c86d101ffe6b7514f06268f65b2d269b0f69ad9a97847eff1c16a2438775eb7be6847ccf11cb8b2e8dcd6640b095b49c0693fe3cf4a66e2d9b7ad68bff14f3ad69abf49d0aba36cbe0535202deb6599a47225ef05beb351335cd7bc0f480d691198c7e71305ffd53b39d33242bb79cfd98bfd69e137b5d18b2b89ac9ace01c8dbdcf2533cce3682ecc52118de0c1062ec2126c2e657d6ea3d9e2398e705d4b0b1f1ceecb266dffc4f31bf42744fb1e938dc22a889919ee1e73f463f7871fed720519e32186264b7ef2a0e5d9a18e6c95c0781894f77967f048951dec3b4d892a38710b1e3436d3c29088eb8b3da1789c25db3d3bc6c26081206e7155d210a89b80ca6ea877c41ff9947c0f25625dcb118294a163501f6239c326661a958fd12da4cd15a899f8b88cc723589056eaec5aa04a4cf5dbb6f480f9660423ccf38c486e210707e0fb25e1f126ceb2616f63e147a647dab0af9ebe89d65458bf636154a46e4cab95f5ee62da2c7974cd14b90d3e4f99f81733e85b3c1d5da2b508d9b90f5eed7eff0d9c7649de62bee00375454fee4a39576a5bbfdae428e7f8097bdf7797f167686cb68407e49079e4611ff3402b6384ba7b7e522bd2bb11ce8fd02ea4c1604d163ac4f6dde50b8b1f593f7edaadeac0868ed97df690200680c25f0f5d85431a529e4f339089dcdeda105e4ee51dead704cdf5a605c55fb055c9b0e86b8ba1b564c0dea3eb790a595cb103cb292268b07c5e59371e1a7ef597cd4b22977a820694c9f9aeb55d9de3ef62b75d6e656e3336698d960a3787bf8cf5b926a7faeef52ae128bcb5dc9e66d94b016c7b8e034879171a2d91c381f57e6a815b63b5ee6a6d2ff435b49f14c963966960194430d78f8f87627a67757fb3532b289550894da6dce4817a4e07f4d56877a1102ffcc8befa5c9f8fca6a4574d93ff70376c8861e0f8108cf907fce77ecb49728f86f034f80224b9695682e0824462f76cdb1fd1af151337b0d85419047a7aa284791718a4860cd586f7824b95bc837b6fd4f9be5aade68456e20356aa4d943dac36bf8b67b9e8f9d01a00fcda74b798bafa746c661b010f75b59904b29d0c8041504811c4065f82cf2ead58d2f595cbd8bc3e7043f4d94577b373b7cfe16a36fe564f505c03b70cfeb5e5f411c79481338aa67e86b3f5a2e77c21e454c333ae3da943ab723ab5f4c940395319534a5575f64acba0d0ecc43f60221ed3badf7289c9b3a7b903a2d6c94e15fa4c310dc4fa7faa0c24f405160a1002dbef20e4105d481db982f7243f79400a6e4cd9753c4b9732a47575f504b20c328fe9add7f432a4f075829da07b53b695037dc51737d3cd731934df333cd1a53fcf65aa31baa450ca501a6fae26e322347e618c5a444d92e9fec5a8261ae38b98fee5be77c02cec09ddccd5b3de92036":"1302149d1e197c41813b054c942329d420e366530f5517b470e964fe" - -generic multi step SHA-256 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - -generic multi step SHA-256 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"bd":"68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b" - -generic multi step SHA-256 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"5fd4":"7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788" - -generic multi step SHA-256 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"b0bd69":"4096804221093ddccfbf46831490ea63e9e99414858f8d75ff7f642c7ca61803" - -generic multi step SHA-256 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"c98c8e55":"7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504" - -generic multi step SHA-256 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"81a723d966":"7516fb8bb11350df2bf386bc3c33bd0f52cb4c67c6e4745e0488e62c2aea2605" - -generic multi step SHA-256 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -md_hex_multi:"SHA256":"8390cf0be07661cc7669aac54ce09a37733a629d45f5d983ef201f9b2d13800e555d9b1097fec3b783d7a50dcb5e2b644b96a1e9463f177cf34906bf388f366db5c2deee04a30e283f764a97c3b377a034fefc22c259214faa99babaff160ab0aaa7e2ccb0ce09c6b32fe08cbc474694375aba703fadbfa31cf685b30a11c57f3cf4edd321e57d3ae6ebb1133c8260e75b9224fa47a2bb205249add2e2e62f817491482ae152322be0900355cdcc8d42a98f82e961a0dc6f537b7b410eff105f59673bfb787bf042aa071f7af68d944d27371c64160fe9382772372516c230c1f45c0d6b6cca7f274b394da9402d3eafdf733994ec58ab22d71829a98399574d4b5908a447a5a681cb0dd50a31145311d92c22a16de1ead66a5499f2dceb4cae694772ce90762ef8336afec653aa9b1a1c4820b221136dfce80dce2ba920d88a530c9410d0a4e0358a3a11052e58dd73b0b179ef8f56fe3b5a2d117a73a0c38a1392b6938e9782e0d86456ee4884e3c39d4d75813f13633bc79baa07c0d2d555afbf207f52b7dca126d015aa2b9873b3eb065e90b9b065a5373fe1fb1b20d594327d19fba56cb81e7b6696605ffa56eba3c27a438697cc21b201fd7e09f18deea1b3ea2f0d1edc02df0e20396a145412cd6b13c32d2e605641c948b714aec30c0649dc44143511f35ab0fd5dd64c34d06fe86f3836dfe9edeb7f08cfc3bd40956826356242191f99f53473f32b0cc0cf9321d6c92a112e8db90b86ee9e87cc32d0343db01e32ce9eb782cb24efbbbeb440fe929e8f2bf8dfb1550a3a2e742e8b455a3e5730e9e6a7a9824d17acc0f72a7f67eae0f0970f8bde46dcdefaed3047cf807e7f00a42e5fd11d40f5e98533d7574425b7d2bc3b3845c443008b58980e768e464e17cc6f6b3939eee52f713963d07d8c4abf02448ef0b889c9671e2f8a436ddeeffcca7176e9bf9d1005ecd377f2fa67c23ed1f137e60bf46018a8bd613d038e883704fc26e798969df35ec7bbc6a4fe46d8910bd82fa3cded265d0a3b6d399e4251e4d8233daa21b5812fded6536198ff13aa5a1cd46a5b9a17a4ddc1d9f85544d1d1cc16f3df858038c8e071a11a7e157a85a6a8dc47e88d75e7009a8b26fdb73f33a2a70f1e0c259f8f9533b9b8f9af9288b7274f21baeec78d396f8bacdcc22471207d9b4efccd3fedc5c5a2214ff5e51c553f35e21ae696fe51e8df733a8e06f50f419e599e9f9e4b37ce643fc810faaa47989771509d69a110ac916261427026369a21263ac4460fb4f708f8ae28599856db7cb6a43ac8e03d64a9609807e76c5f312b9d1863bfa304e8953647648b4f4ab0ed995e":"4109cdbec3240ad74cc6c37f39300f70fede16e21efc77f7865998714aad0b5e" - -generic multi step SHA-384 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"":"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b" - -generic multi step SHA-384 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"ab":"fb94d5be118865f6fcbc978b825da82cff188faec2f66cb84b2537d74b4938469854b0ca89e66fa2e182834736629f3d" - -generic multi step SHA-384 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"7c27":"3d80be467df86d63abb9ea1d3f9cb39cd19890e7f2c53a6200bedc5006842b35e820dc4e0ca90ca9b97ab23ef07080fc" - -generic multi step SHA-384 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"31f5ca":"78d54b943421fdf7ba90a7fb9637c2073aa480454bd841d39ff72f4511fc21fb67797b652c0c823229342873d3bef955" - -generic multi step SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"7bdee3f8":"8bdafba0777ee446c3431c2d7b1fbb631089f71d2ca417abc1d230e1aba64ec2f1c187474a6f4077d372c14ad407f99a" - -generic multi step SHA-384 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"8f05604915":"504e414bf1db1060f14c8c799e25b1e0c4dcf1504ebbd129998f0ae283e6de86e0d3c7e879c73ec3b1836c3ee89c2649" - -generic multi step SHA-384 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"665da6eda214":"4c022f112010908848312f8b8f1072625fd5c105399d562ea1d56130619a7eac8dfc3748fd05ee37e4b690be9daa9980" - -generic multi step SHA-384 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA384":"7f46ce506d593c4ed53c82edeb602037e0485befbee03f7f930fe532d18ff2a3f5fd6076672c8145a1bf40dd94f7abab47c9ae71c234213d2ad1069c2dac0b0ba15257ae672b8245960ae55bd50315c0097daa3a318745788d70d14706910809ca6e396237fe4934fa46f9ce782d66606d8bd6b2d283b1160513ce9c24e9f084b97891f99d4cdefc169a029e431ca772ba1bba426fce6f01d8e286014e5acc66b799e4db62bd4783322f8a32ff78e0de3957df50ce10871f4e0680df4e8ca3960af9bc6f4efa8eb3962d18f474eb178c3265cc46b8f2ff5ab1a7449fea297dfcfabfa01f28abbb7289bb354b691b5664ec6d098af51be19947ec5ba7ebd66380d1141953ba78d4aa5401679fa7b0a44db1981f864d3535c45afe4c61183d5b0ad51fae71ca07e34240283959f7530a32c70d95a088e501c230059f333b0670825009e7e22103ef22935830df1fac8ef877f5f3426dd54f7d1128dd871ad9a7d088f94c0e8712013295b8d69ae7623b880978c2d3c6ad26dc478f8dc47f5c0adcc618665dc3dc205a9071b2f2191e16cac5bd89bb59148fc719633752303aa08e518dbc389f0a5482caaa4c507b8729a6f3edd061efb39026cecc6399f51971cf7381d605e144a5928c8c2d1ad7467b05da2f202f4f3234e1aff19a0198a28685721c3d2d52311c721e3fdcbaf30214cdc3acff8c433880e104fb63f2df7ce69a97857819ba7ac00ac8eae1969764fde8f68cf8e0916d7e0c151147d4944f99f42ae50f30e1c79a42d2b6c5188d133d3cbbf69094027b354b295ccd0f7dc5a87d73638bd98ebfb00383ca0fa69cb8dcb35a12510e5e07ad8789047d0b63841a1bb928737e8b0a0c33254f47aa8bfbe3341a09c2b76dbcefa67e30df300d34f7b8465c4f869e51b6bcfe6cf68b238359a645036bf7f63f02924e087ce7457e483b6025a859903cb484574aa3b12cf946f32127d537c33bee3141b5db96d10a148c50ae045f287210757710d6846e04b202f79e87dd9a56bc6da15f84a77a7f63935e1dee00309cd276a8e7176cb04da6bb0e9009534438732cb42d008008853d38d19beba46e61006e30f7efd1bc7c2906b024e4ff898a1b58c448d68b43c6ab63f34f85b3ac6aa4475867e51b583844cb23829f4b30f4bdd817d88e2ef3e7b4fc0a624395b05ec5e8686082b24d29fef2b0d3c29e031d5f94f504b1d3df9361eb5ffbadb242e66c39a8094cfe62f85f639f3fd65fc8ae0c74a8f4c6e1d070b9183a434c722caaa0225f8bcd68614d6f0738ed62f8484ec96077d155c08e26c46be262a73e3551698bd70d8d5610cf37c4c306eed04ba6a040a9c3e6d7e15e8acda17f477c2484cf5c56b813313927be8387b1024f995e98fc87f1029091c01424bdc2b296c2eadb7d25b3e762a2fd0c2dcd1727ddf91db97c5984305265f3695a7f5472f2d72c94d68c27914f14f82aa8dd5fe4e2348b0ca967a3f98626a091552f5d0ffa2bf10350d23c996256c01fdeffb2c2c612519869f877e4929c6e95ff15040f1485e22ed14119880232fef3b57b3848f15b1766a5552879df8f06":"cba9e3eb12a6f83db11e8a6ff40d1049854ee094416bc527fea931d8585428a8ed6242ce81f6769b36e2123a5c23483e" - -generic multi step SHA-512 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"":"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" - -generic multi step SHA-512 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"8f":"e4cd2d19931b5aad9c920f45f56f6ce34e3d38c6d319a6e11d0588ab8b838576d6ce6d68eea7c830de66e2bd96458bfa7aafbcbec981d4ed040498c3dd95f22a" - -generic multi step SHA-512 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"e724":"7dbb520221a70287b23dbcf62bfc1b73136d858e86266732a7fffa875ecaa2c1b8f673b5c065d360c563a7b9539349f5f59bef8c0c593f9587e3cd50bb26a231" - -generic multi step SHA-512 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"de4c90":"33ce98281045a5c4c9df0363d8196f1d7dfcd5ee46ac89776fd8a4344c12f123a66788af5bd41ceff1941aa5637654b4064c88c14e00465ab79a2fc6c97e1014" - -generic multi step SHA-512 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"a801e94b":"dadb1b5a27f9fece8d86adb2a51879beb1787ff28f4e8ce162cad7fee0f942efcabbf738bc6f797fc7cc79a3a75048cd4c82ca0757a324695bfb19a557e56e2f" - -generic multi step SHA-512 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"94390d3502":"b6175c4c4cccf69e0ce5f0312010886ea6b34d43673f942ae42483f9cbb7da817de4e11b5d58e25a3d9bd721a22cdffe1c40411cc45df1911fa5506129b69297" - -generic multi step SHA-512 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"49297dd63e5f":"1fcc1e6f6870859d11649f5e5336a9cd16329c029baf04d5a6edf257889a2e9522b497dd656bb402da461307c4ee382e2e89380c8e6e6e7697f1e439f650fa94" - -generic multi step SHA-512 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA512_C -md_hex_multi:"SHA512":"990d1ae71a62d7bda9bfdaa1762a68d296eee72a4cd946f287a898fbabc002ea941fd8d4d991030b4d27a637cce501a834bb95eab1b7889a3e784c7968e67cbf552006b206b68f76d9191327524fcc251aeb56af483d10b4e0c6c5e599ee8c0fe4faeca8293844a8547c6a9a90d093f2526873a19ad4a5e776794c68c742fb834793d2dfcb7fea46c63af4b70fd11cb6e41834e72ee40edb067b292a794990c288d5007e73f349fb383af6a756b8301ad6e5e0aa8cd614399bb3a452376b1575afa6bdaeaafc286cb064bb91edef97c632b6c1113d107fa93a0905098a105043c2f05397f702514439a08a9e5ddc196100721d45c8fc17d2ed659376f8a00bd5cb9a0860e26d8a29d8d6aaf52de97e9346033d6db501a35dbbaf97c20b830cd2d18c2532f3a59cc497ee64c0e57d8d060e5069b28d86edf1adcf59144b221ce3ddaef134b3124fbc7dd000240eff0f5f5f41e83cd7f5bb37c9ae21953fe302b0f6e8b68fa91c6ab99265c64b2fd9cd4942be04321bb5d6d71932376c6f2f88e02422ba6a5e2cb765df93fd5dd0728c6abdaf03bce22e0678a544e2c3636f741b6f4447ee58a8fc656b43ef817932176adbfc2e04b2c812c273cd6cbfa4098f0be036a34221fa02643f5ee2e0b38135f2a18ecd2f16ebc45f8eb31b8ab967a1567ee016904188910861ca1fa205c7adaa194b286893ffe2f4fbe0384c2aef72a4522aeafd3ebc71f9db71eeeef86c48394a1c86d5b36c352cc33a0a2c800bc99e62fd65b3a2fd69e0b53996ec13d8ce483ce9319efd9a85acefabdb5342226febb83fd1daf4b24265f50c61c6de74077ef89b6fecf9f29a1f871af1e9f89b2d345cda7499bd45c42fa5d195a1e1a6ba84851889e730da3b2b916e96152ae0c92154b49719841db7e7cc707ba8a5d7b101eb4ac7b629bb327817910fff61580b59aab78182d1a2e33473d05b00b170b29e331870826cfe45af206aa7d0246bbd8566ca7cfb2d3c10bfa1db7dd48dd786036469ce7282093d78b5e1a5b0fc81a54c8ed4ceac1e5305305e78284ac276f5d7862727aff246e17addde50c670028d572cbfc0be2e4f8b2eb28fa68ad7b4c6c2a239c460441bfb5ea049f23b08563b4e47729a59e5986a61a6093dbd54f8c36ebe87edae01f251cb060ad1364ce677d7e8d5a4a4ca966a7241cc360bc2acb280e5f9e9c1b032ad6a180a35e0c5180b9d16d026c865b252098cc1d99ba7375ca31c7702c0d943d5e3dd2f6861fa55bd46d94b67ed3e52eccd8dd06d968e01897d6de97ed3058d91dd":"8e4bc6f8b8c60fe4d68c61d9b159c8693c3151c46749af58da228442d927f23359bd6ccd6c2ec8fa3f00a86cecbfa728e1ad60b821ed22fcd309ba91a4138bc9" - -generic SHA1 Hash file #1 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_file:"SHA1":"data_files/hash_file_1":"d21c965b1e768bd7a6aa6869f5f821901d255f9f" - -generic SHA1 Hash file #2 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_file:"SHA1":"data_files/hash_file_2":"353f34271f2aef49d23a8913d4a6bd82b2cecdc6" - -generic SHA1 Hash file #3 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_file:"SHA1":"data_files/hash_file_3":"93640ed592076328096270c756db2fba9c486b35" - -generic SHA1 Hash file #4 -depends_on:MBEDTLS_SHA1_C -mbedtls_md_file:"SHA1":"data_files/hash_file_4":"da39a3ee5e6b4b0d3255bfef95601890afd80709" - -generic SHA-224 Hash file #1 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA224":"data_files/hash_file_1":"8606da018870f0c16834a21bc3385704cb1683b9dbab04c5ddb90a48" - -generic SHA-224 Hash file #2 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA224":"data_files/hash_file_2":"733b2ab97b6f63f2e29b9a2089756d81e14c93fe4cc9615c0d5e8a03" - -generic SHA-224 Hash file #3 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA224":"data_files/hash_file_3":"e1df95867580e2cc2100e9565bf9c2e42c24fe5250c19efe33d1c4fe" - -generic SHA-224 Hash file #4 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA224":"data_files/hash_file_4":"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" - -generic SHA-256 Hash file #1 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA256":"data_files/hash_file_1":"975d0c620d3936886f8a3665e585a3e84aa0501f4225bf53029710242823e391" - -generic SHA-256 Hash file #2 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA256":"data_files/hash_file_2":"11fcbf1baa36ca45745f10cc5467aee86f066f80ba2c46806d876bf783022ad2" - -generic SHA-256 Hash file #3 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA256":"data_files/hash_file_3":"9ae4b369f9f4f03b86505b46a5469542e00aaff7cf7417a71af6d6d0aba3b70c" - -generic SHA-256 Hash file #4 -depends_on:MBEDTLS_SHA256_C -mbedtls_md_file:"SHA256":"data_files/hash_file_4":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - -generic SHA-384 Hash file #1 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA384":"data_files/hash_file_1":"e0a3e6259d6378001b54ef82f5dd087009c5fad86d8db226a9fe1d14ecbe33a6fc916e3a4b16f5f286424de15d5a8e0e" - -generic SHA-384 Hash file #2 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA384":"data_files/hash_file_2":"eff727afc8495c92e2f370f97a317f93c3350324b0646b0f0e264708b3c97d3d332d3c5390e1e47130f5c92f1ef4b9cf" - -generic SHA-384 Hash file #3 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA384":"data_files/hash_file_3":"6fc10ebda96a1ccf61777cac72f6034f92533d42052a4bf9f9d929c672973c71e5aeb1213268043c21527ac0f7f349c4" - -generic SHA-384 Hash file #4 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA384":"data_files/hash_file_4":"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b" - -generic SHA-512 Hash file #1 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA512":"data_files/hash_file_1":"d8207a2e1ff2b424f2c4163fe1b723c9bd42e464061eb411e8df730bcd24a7ab3956a6f3ff044a52eb2d262f9e4ca6b524092b544ab78f14d6f9c4cc8ddf335a" - -generic SHA-512 Hash file #2 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA512":"data_files/hash_file_2":"ecbb7f0ed8a702b49f16ad3088bcc06ea93451912a7187db15f64d93517b09630b039293aed418d4a00695777b758b1f381548c2fd7b92ce5ed996b32c8734e7" - -generic SHA-512 Hash file #3 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA512":"data_files/hash_file_3":"7ccc9b2da71ffde9966c3ce44d7f20945fccf33b1fade4da152b021f1afcc7293382944aa6c09eac67af25f22026758e2bf6bed86ae2a43592677ee50f8eea41" - -generic SHA-512 Hash file #4 -depends_on:MBEDTLS_SHA512_C -mbedtls_md_file:"SHA512":"data_files/hash_file_4":"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.function deleted file mode 100644 index 0fcaa388f9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_md.function +++ /dev/null @@ -1,367 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/md.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_MD_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_md_process( ) -{ - const int *md_type_ptr; - const mbedtls_md_info_t *info; - mbedtls_md_context_t ctx; - unsigned char buf[150]; - - mbedtls_md_init( &ctx ); - - /* - * Very minimal testing of mbedtls_md_process, just make sure the various - * xxx_process_wrap() function pointers are valid. (Testing that they - * indeed do the right thing whould require messing with the internal - * state of the underlying mbedtls_md/sha context.) - * - * Also tests that mbedtls_md_list() only returns valid MDs. - */ - for( md_type_ptr = mbedtls_md_list(); *md_type_ptr != 0; md_type_ptr++ ) - { - info = mbedtls_md_info_from_type( *md_type_ptr ); - TEST_ASSERT( info != NULL ); - TEST_ASSERT( mbedtls_md_setup( &ctx, info, 0 ) == 0 ); - TEST_ASSERT( mbedtls_md_process( &ctx, buf ) == 0 ); - mbedtls_md_free( &ctx ); - } - -exit: - mbedtls_md_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_null_args( ) -{ - mbedtls_md_context_t ctx; - const mbedtls_md_info_t *info = mbedtls_md_info_from_type( *( mbedtls_md_list() ) ); - unsigned char buf[1] = { 0 }; - - mbedtls_md_init( &ctx ); - - TEST_ASSERT( mbedtls_md_get_size( NULL ) == 0 ); - TEST_ASSERT( mbedtls_md_get_type( NULL ) == MBEDTLS_MD_NONE ); - TEST_ASSERT( mbedtls_md_get_name( NULL ) == NULL ); - - TEST_ASSERT( mbedtls_md_info_from_string( NULL ) == NULL ); - - TEST_ASSERT( mbedtls_md_setup( &ctx, NULL, 0 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_setup( NULL, info, 0 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_starts( NULL ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_starts( &ctx ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_update( NULL, buf, 1 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_update( &ctx, buf, 1 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_finish( NULL, buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_finish( &ctx, buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md( NULL, buf, 1, buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - -#if defined(MBEDTLS_FS_IO) - TEST_ASSERT( mbedtls_md_file( NULL, "", buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); -#endif - - TEST_ASSERT( mbedtls_md_hmac_starts( NULL, buf, 1 ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_hmac_starts( &ctx, buf, 1 ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_hmac_update( NULL, buf, 1 ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_hmac_update( &ctx, buf, 1 ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_hmac_finish( NULL, buf ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_hmac_finish( &ctx, buf ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_hmac_reset( NULL ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_hmac_reset( &ctx ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_hmac( NULL, buf, 1, buf, 1, buf ) - == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - TEST_ASSERT( mbedtls_md_process( NULL, buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - TEST_ASSERT( mbedtls_md_process( &ctx, buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); - - /* Ok, this is not NULL arg but NULL return... */ - TEST_ASSERT( mbedtls_md_info_from_type( MBEDTLS_MD_NONE ) == NULL ); - TEST_ASSERT( mbedtls_md_info_from_string( "no such md" ) == NULL ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_info( int md_type, char *md_name, int md_size ) -{ - const mbedtls_md_info_t *md_info; - const int *md_type_ptr; - int found; - - md_info = mbedtls_md_info_from_type( md_type ); - TEST_ASSERT( md_info != NULL ); - TEST_ASSERT( md_info == mbedtls_md_info_from_string( md_name ) ); - - TEST_ASSERT( mbedtls_md_get_type( md_info ) == (mbedtls_md_type_t) md_type ); - TEST_ASSERT( mbedtls_md_get_size( md_info ) == (unsigned char) md_size ); - TEST_ASSERT( strcmp( mbedtls_md_get_name( md_info ), md_name ) == 0 ); - - found = 0; - for( md_type_ptr = mbedtls_md_list(); *md_type_ptr != 0; md_type_ptr++ ) - if( *md_type_ptr == md_type ) - found = 1; - TEST_ASSERT( found == 1 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_text( char *text_md_name, char *text_src_string, char *hex_hash_string ) -{ - char md_name[100]; - unsigned char src_str[1000]; - unsigned char hash_str[1000]; - unsigned char output[100]; - const mbedtls_md_info_t *md_info = NULL; - - memset(md_name, 0x00, 100); - memset(src_str, 0x00, 1000); - memset(hash_str, 0x00, 1000); - memset(output, 0x00, 100); - - strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 ); - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string(md_name); - TEST_ASSERT( md_info != NULL ); - - TEST_ASSERT ( 0 == mbedtls_md( md_info, src_str, strlen( (char *) src_str ), output ) ); - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_hex( char *text_md_name, char *hex_src_string, char *hex_hash_string ) -{ - char md_name[100]; - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[100]; - int src_len; - const mbedtls_md_info_t *md_info = NULL; - - memset(md_name, 0x00, 100); - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 100); - - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string(md_name); - TEST_ASSERT( md_info != NULL ); - - src_len = unhexify( src_str, hex_src_string ); - TEST_ASSERT ( 0 == mbedtls_md( md_info, src_str, src_len, output ) ); - - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_text_multi( char *text_md_name, char *text_src_string, - char *hex_hash_string ) -{ - char md_name[100]; - unsigned char src_str[1000]; - unsigned char hash_str[1000]; - unsigned char output[100]; - - const mbedtls_md_info_t *md_info = NULL; - mbedtls_md_context_t ctx; - - mbedtls_md_init( &ctx ); - - memset(md_name, 0x00, 100); - memset(src_str, 0x00, 1000); - memset(hash_str, 0x00, 1000); - memset(output, 0x00, 100); - - strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 ); - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string(md_name); - TEST_ASSERT( md_info != NULL ); - TEST_ASSERT ( 0 == mbedtls_md_setup( &ctx, md_info, 0 ) ); - - TEST_ASSERT ( 0 == mbedtls_md_starts( &ctx ) ); - TEST_ASSERT ( ctx.md_ctx != NULL ); - TEST_ASSERT ( 0 == mbedtls_md_update( &ctx, src_str, strlen( (char *) src_str ) ) ); - TEST_ASSERT ( 0 == mbedtls_md_finish( &ctx, output ) ); - - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); - -exit: - mbedtls_md_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_hex_multi( char *text_md_name, char *hex_src_string, - char *hex_hash_string ) -{ - char md_name[100]; - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[100]; - int src_len; - const mbedtls_md_info_t *md_info = NULL; - mbedtls_md_context_t ctx; - - mbedtls_md_init( &ctx ); - - memset(md_name, 0x00, 100); - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 100); - - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string(md_name); - TEST_ASSERT( md_info != NULL ); - TEST_ASSERT ( 0 == mbedtls_md_setup( &ctx, md_info, 0 ) ); - - src_len = unhexify( src_str, hex_src_string ); - - TEST_ASSERT ( 0 == mbedtls_md_starts( &ctx ) ); - TEST_ASSERT ( ctx.md_ctx != NULL ); - TEST_ASSERT ( 0 == mbedtls_md_update( &ctx, src_str, src_len ) ); - TEST_ASSERT ( 0 == mbedtls_md_finish( &ctx, output ) ); - - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); - -exit: - mbedtls_md_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_md_hmac( char *text_md_name, int trunc_size, char *hex_key_string, - char *hex_src_string, char *hex_hash_string ) -{ - char md_name[100]; - unsigned char src_str[10000]; - unsigned char key_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[100]; - int key_len, src_len; - const mbedtls_md_info_t *md_info = NULL; - - memset(md_name, 0x00, 100); - memset(src_str, 0x00, 10000); - memset(key_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 100); - - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string( md_name ); - TEST_ASSERT( md_info != NULL ); - - key_len = unhexify( key_str, hex_key_string ); - src_len = unhexify( src_str, hex_src_string ); - - TEST_ASSERT ( mbedtls_md_hmac( md_info, key_str, key_len, src_str, src_len, output ) == 0 ); - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - - TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void md_hmac_multi( char *text_md_name, int trunc_size, char *hex_key_string, - char *hex_src_string, char *hex_hash_string ) -{ - char md_name[100]; - unsigned char src_str[10000]; - unsigned char key_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[100]; - int key_len, src_len; - const mbedtls_md_info_t *md_info = NULL; - mbedtls_md_context_t ctx; - - mbedtls_md_init( &ctx ); - - memset(md_name, 0x00, 100); - memset(src_str, 0x00, 10000); - memset(key_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 100); - - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string( md_name ); - TEST_ASSERT( md_info != NULL ); - TEST_ASSERT ( 0 == mbedtls_md_setup( &ctx, md_info, 1 ) ); - - key_len = unhexify( key_str, hex_key_string ); - src_len = unhexify( src_str, hex_src_string ); - - TEST_ASSERT ( 0 == mbedtls_md_hmac_starts( &ctx, key_str, key_len ) ); - TEST_ASSERT ( ctx.md_ctx != NULL ); - TEST_ASSERT ( 0 == mbedtls_md_hmac_update( &ctx, src_str, src_len ) ); - TEST_ASSERT ( 0 == mbedtls_md_hmac_finish( &ctx, output ) ); - - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 ); - - /* Test again, for reset() */ - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 100); - - TEST_ASSERT ( 0 == mbedtls_md_hmac_reset( &ctx ) ); - TEST_ASSERT ( 0 == mbedtls_md_hmac_update( &ctx, src_str, src_len ) ); - TEST_ASSERT ( 0 == mbedtls_md_hmac_finish( &ctx, output ) ); - - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 ); - -exit: - mbedtls_md_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void mbedtls_md_file( char *text_md_name, char *filename, char *hex_hash_string ) -{ - char md_name[100]; - unsigned char hash_str[1000]; - unsigned char output[100]; - const mbedtls_md_info_t *md_info = NULL; - - memset(md_name, 0x00, 100); - memset(hash_str, 0x00, 1000); - memset(output, 0x00, 100); - - strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 ); - md_info = mbedtls_md_info_from_string( md_name ); - TEST_ASSERT( md_info != NULL ); - - TEST_ASSERT( mbedtls_md_file( md_info, filename, output ) == 0 ); - hexify( hash_str, output, mbedtls_md_get_size(md_info) ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.data deleted file mode 100644 index 2d403b4108..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.data +++ /dev/null @@ -1,98 +0,0 @@ -mbedtls_md2 Test vector RFC1319 #1 -md2_text:"":"8350e5a3e24c153df2275c9f80692773" - -mbedtls_md2 Test vector RFC1319 #2 -md2_text:"a":"32ec01ec4a6dac72c0ab96fb34c0b5d1" - -mbedtls_md2 Test vector RFC1319 #3 -md2_text:"abc":"da853b0d3f88d99b30283a69e6ded6bb" - -mbedtls_md2 Test vector RFC1319 #4 -md2_text:"message digest":"ab4f496bfb2a530b219ff33031fe06b0" - -mbedtls_md2 Test vector RFC1319 #5 -md2_text:"abcdefghijklmnopqrstuvwxyz":"4e8ddff3650292ab5a4108c3aa47940b" - -mbedtls_md2 Test vector RFC1319 #6 -md2_text:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"da33def2a42df13975352846c30338cd" - -mbedtls_md2 Test vector RFC1319 #7 -md2_text:"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"d5976f79d83d3a0dc9806c3c66f3efd8" - -mbedtls_md4 Test vector RFC1320 #1 -md4_text:"":"31d6cfe0d16ae931b73c59d7e0c089c0" - -mbedtls_md4 Test vector RFC1320 #2 -md4_text:"a":"bde52cb31de33e46245e05fbdbd6fb24" - -mbedtls_md4 Test vector RFC1320 #3 -md4_text:"abc":"a448017aaf21d8525fc10ae87aa6729d" - -mbedtls_md4 Test vector RFC1320 #4 -md4_text:"message digest":"d9130a8164549fe818874806e1c7014b" - -mbedtls_md4 Test vector RFC1320 #5 -md4_text:"abcdefghijklmnopqrstuvwxyz":"d79e1c308aa5bbcdeea8ed63df412da9" - -mbedtls_md4 Test vector RFC1320 #6 -md4_text:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"043f8582f241db351ce627e153e7f0e4" - -mbedtls_md4 Test vector RFC1320 #7 -md4_text:"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"e33b4ddc9c38f2199c3e7b164fcc0536" - -mbedtls_md5 Test vector RFC1321 #1 -md5_text:"":"d41d8cd98f00b204e9800998ecf8427e" - -mbedtls_md5 Test vector RFC1321 #2 -md5_text:"a":"0cc175b9c0f1b6a831c399e269772661" - -mbedtls_md5 Test vector RFC1321 #3 -md5_text:"abc":"900150983cd24fb0d6963f7d28e17f72" - -mbedtls_md5 Test vector RFC1321 #4 -md5_text:"message digest":"f96b697d7cb7938d525a2f31aaf161d0" - -mbedtls_md5 Test vector RFC1321 #5 -md5_text:"abcdefghijklmnopqrstuvwxyz":"c3fcd3d76192e4007dfb496cca67e13b" - -mbedtls_md5 Test vector RFC1321 #6 -md5_text:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"d174ab98d277d9f5a5611c2c9f419d9f" - -mbedtls_md5 Test vector RFC1321 #7 -md5_text:"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"57edf4a22be3c955ac49da2e2107b67a" - -mbedtls_ripemd160 Test vector from paper #1 -ripemd160_text:"":"9c1185a5c5e9fc54612808977ee8f548b2258d31" - -mbedtls_ripemd160 Test vector from paper #2 -ripemd160_text:"a":"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe" - -mbedtls_ripemd160 Test vector from paper #3 -ripemd160_text:"abc":"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc" - -mbedtls_ripemd160 Test vector from paper #4 -ripemd160_text:"message digest":"5d0689ef49d2fae572b881b123a85ffa21595f36" - -mbedtls_ripemd160 Test vector from paper #5 -ripemd160_text:"abcdefghijklmnopqrstuvwxyz":"f71c27109c692c1b56bbdceb5b9d2865b3708dbc" - -mbedtls_ripemd160 Test vector from paper #6 -ripemd160_text:"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq":"12a053384a9c0c88e405a06c27dcf49ada62eb2b" - -mbedtls_ripemd160 Test vector from paper #7 -ripemd160_text:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"b0e20b6e3116640286ed3a87a5713079b21f5189" - -mbedtls_ripemd160 Test vector from paper #8 -ripemd160_text:"12345678901234567890123456789012345678901234567890123456789012345678901234567890":"9b752e45573d4b39f4dbd3323cab82bf63326bfb" - -MD2 Selftest -md2_selftest: - -MD4 Selftest -md4_selftest: - -MD5 Selftest -md5_selftest: - -RIPEMD160 Selftest -ripemd160_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.function deleted file mode 100644 index 3d233638bf..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mdx.function +++ /dev/null @@ -1,114 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/md2.h" -#include "mbedtls/md4.h" -#include "mbedtls/md5.h" -#include "mbedtls/ripemd160.h" -/* END_HEADER */ - -/* BEGIN_CASE depends_on:MBEDTLS_MD2_C */ -void md2_text( char *text_src_string, char *hex_hash_string ) -{ - unsigned char src_str[100]; - unsigned char hash_str[33]; - unsigned char output[16]; - - memset( src_str, 0x00, sizeof src_str ); - memset( hash_str, 0x00, sizeof hash_str ); - memset( output, 0x00, sizeof output ); - - strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 ); - - mbedtls_md2( src_str, strlen( (char *) src_str ), output ); - hexify( hash_str, output, sizeof output ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_MD4_C */ -void md4_text( char *text_src_string, char *hex_hash_string ) -{ - unsigned char src_str[100]; - unsigned char hash_str[33]; - unsigned char output[16]; - - memset( src_str, 0x00, sizeof src_str ); - memset( hash_str, 0x00, sizeof hash_str ); - memset( output, 0x00, sizeof output ); - - strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 ); - - mbedtls_md4( src_str, strlen( (char *) src_str ), output ); - hexify( hash_str, output, sizeof output ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_MD5_C */ -void md5_text( char *text_src_string, char *hex_hash_string ) -{ - unsigned char src_str[100]; - unsigned char hash_str[33]; - unsigned char output[16]; - - memset( src_str, 0x00, sizeof src_str ); - memset( hash_str, 0x00, sizeof hash_str ); - memset( output, 0x00, sizeof output ); - - strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 ); - - mbedtls_md5( src_str, strlen( (char *) src_str ), output ); - hexify( hash_str, output, sizeof output ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RIPEMD160_C */ -void ripemd160_text( char *text_src_string, char *hex_hash_string ) -{ - unsigned char src_str[100]; - unsigned char hash_str[41]; - unsigned char output[20]; - - memset(src_str, 0x00, sizeof src_str); - memset(hash_str, 0x00, sizeof hash_str); - memset(output, 0x00, sizeof output); - - strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 ); - - mbedtls_ripemd160( src_str, strlen( (char *) src_str ), output ); - hexify( hash_str, output, sizeof output ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_MD2_C:MBEDTLS_SELF_TEST */ -void md2_selftest() -{ - TEST_ASSERT( mbedtls_md2_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_MD4_C:MBEDTLS_SELF_TEST */ -void md4_selftest() -{ - TEST_ASSERT( mbedtls_md4_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_MD5_C:MBEDTLS_SELF_TEST */ -void md5_selftest() -{ - TEST_ASSERT( mbedtls_md5_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RIPEMD160_C:MBEDTLS_SELF_TEST */ -void ripemd160_selftest() -{ - TEST_ASSERT( mbedtls_ripemd160_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.data deleted file mode 100644 index a0b0460108..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.data +++ /dev/null @@ -1,2 +0,0 @@ -Memory buffer alloc self test -mbedtls_memory_buffer_alloc_self_test: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.function deleted file mode 100644 index 59b06431be..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_memory_buffer_alloc.function +++ /dev/null @@ -1,16 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/memory_buffer_alloc.h" -#define TEST_SUITE_MEMORY_BUFFER_ALLOC -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_MEMORY_BUFFER_ALLOC_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void mbedtls_memory_buffer_alloc_self_test( ) -{ - TEST_ASSERT( mbedtls_memory_buffer_alloc_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.data deleted file mode 100644 index f838f3bda3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.data +++ /dev/null @@ -1,719 +0,0 @@ -Arguments with no value -mpi_null: - -Base test mpi_read_write_string #1 -mpi_read_write_string:10:"128":10:"128":100:0:0 - -Base test mpi_read_write_string #2 -mpi_read_write_string:10:"128":16:"80":100:0:0 - -Base test mpi_read_write_string #3 (Read zero) -mpi_read_write_string:10:"0":10:"0":100:0:0 - -Base test mpi_read_write_string #3 (Negative decimal) -mpi_read_write_string:10:"-23":10:"-23":100:0:0 - -Base test mpi_read_write_string #3 (Negative hex) -mpi_read_write_string:16:"-20":10:"-32":100:0:0 - -Base test mpi_read_write_string #3 (Negative decimal) -mpi_read_write_string:16:"-23":16:"-23":100:0:0 - -Test mpi_read_write_string #1 (Invalid character) -mpi_read_write_string:10:"a28":0:"":100:MBEDTLS_ERR_MPI_INVALID_CHARACTER:0 - -Test mpi_read_write_string #2 (Illegal input radix) -mpi_read_write_string:19:"a28":0:"":100:MBEDTLS_ERR_MPI_BAD_INPUT_DATA:0 - -Test mpi_read_write_string #3 (Buffer just fits) -mpi_read_write_string:16:"-23":16:"-23":4:0:0 - -Test mpi_read_write_string #4 (Buffer too small) -mpi_read_write_string:16:"-23":16:"-23":3:0:MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL - -Test mpi_read_write_string #5 (Illegal output radix) -mpi_read_write_string:16:"-23":17:"-23":4:0:MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Test mpi_read_write_string #6 (Output radix of 15) -mpi_read_write_string:10:"29":15:"1e":100:0:0 - -Test mpi_read_write_string #7 -mpi_read_write_string:10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924":16:"0941379d00fed1491fe15df284dfde4a142f68aa8d412023195cee66883e6290ffe703f4ea5963bf212713cee46b107c09182b5edcd955adac418bf4918e2889af48e1099d513830cec85c26ac1e158b52620e33ba8692f893efbb2f958b4424":200:0:0 - -Test mpi_read_write_string #8 (Empty MPI -> hex) -mpi_read_write_string:16:"":16:"00":4:0:0 - -Test mpi_read_write_string #9 (Empty MPI -> dec) -mpi_read_write_string:16:"":10:"0":4:0:0 - -Base test mbedtls_mpi_read_binary #1 -mbedtls_mpi_read_binary:"0941379d00fed1491fe15df284dfde4a142f68aa8d412023195cee66883e6290ffe703f4ea5963bf212713cee46b107c09182b5edcd955adac418bf4918e2889af48e1099d513830cec85c26ac1e158b52620e33ba8692f893efbb2f958b4424":10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924" - -Base test mbedtls_mpi_write_binary #1 -mbedtls_mpi_write_binary:10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924":"0941379d00fed1491fe15df284dfde4a142f68aa8d412023195cee66883e6290ffe703f4ea5963bf212713cee46b107c09182b5edcd955adac418bf4918e2889af48e1099d513830cec85c26ac1e158b52620e33ba8692f893efbb2f958b4424":200:0 - -Test mbedtls_mpi_write_binary #1 (Buffer just fits) -mbedtls_mpi_write_binary:16:"123123123123123123123123123":"0123123123123123123123123123":14:0 - -Test mbedtls_mpi_write_binary #2 (Buffer too small) -mbedtls_mpi_write_binary:16:"123123123123123123123123123":"123123123123123123123123123":13:MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL - -Base test mbedtls_mpi_read_file #1 -mbedtls_mpi_read_file:10:"data_files/mpi_10":"01f55332c3a48b910f9942f6c914e58bef37a47ee45cb164a5b6b8d1006bf59a059c21449939ebebfdf517d2e1dbac88010d7b1f141e997bd6801ddaec9d05910f4f2de2b2c4d714e2c14a72fc7f17aa428d59c531627f09":0 - -Test mbedtls_mpi_read_file #1 (Empty file) -mbedtls_mpi_read_file:10:"data_files/hash_file_4":"":MBEDTLS_ERR_MPI_FILE_IO_ERROR - -Test mbedtls_mpi_read_file #2 (Illegal input) -mbedtls_mpi_read_file:10:"data_files/hash_file_3":"":0 - -Test mbedtls_mpi_read_file #3 (Input too big) -mbedtls_mpi_read_file:10:"data_files/mpi_too_big":"":MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL - -Base test mbedtls_mpi_write_file #1 -mbedtls_mpi_write_file:10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924":16:"data_files/mpi_write" - -Base test mbedtls_mpi_lsb #1 -mbedtls_mpi_lsb:10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924":2 - -Base test mbedtls_mpi_lsb #2 -mbedtls_mpi_lsb:10:"24":3 - -Base test mbedtls_mpi_lsb #3 -mbedtls_mpi_lsb:16:"24":2 - -Base test mbedtls_mpi_lsb #4 -mbedtls_mpi_lsb:16:"2000":13 - -Base test mbedtls_mpi_bitlen #1 -mbedtls_mpi_bitlen:10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924":764 - -Base test mbedtls_mpi_bitlen #2 -mbedtls_mpi_bitlen:10:"24":5 - -Base test mbedtls_mpi_bitlen #3 -mbedtls_mpi_bitlen:10:"1":1 - -Base test mbedtls_mpi_bitlen #4 -mbedtls_mpi_bitlen:10:"15":4 - -Base test mbedtls_mpi_bitlen #5 -mbedtls_mpi_bitlen:10:"16":5 - -Base test mbedtls_mpi_bitlen #6 -mbedtls_mpi_bitlen:10:"10":4 - -Base test mbedtls_mpi_bitlen #7 -mbedtls_mpi_bitlen:10:"0":0 - -Base test mbedtls_mpi_cmp_int #1 -mbedtls_mpi_cmp_int:693:693:0 - -Base test mbedtls_mpi_cmp_int #2 -mbedtls_mpi_cmp_int:693:692:1 - -Base test mbedtls_mpi_cmp_int #3 -mbedtls_mpi_cmp_int:693:694:-1 - -Base test mbedtls_mpi_cmp_int (Negative values) #1 -mbedtls_mpi_cmp_int:-2:-2:0 - -Base test mbedtls_mpi_cmp_int (Negative values) #2 -mbedtls_mpi_cmp_int:-2:-3:1 - -Base test mbedtls_mpi_cmp_int (Negative values) #3 -mbedtls_mpi_cmp_int:-2:-1:-1 - -Base test mbedtls_mpi_cmp_mpi #1 -mbedtls_mpi_cmp_mpi:10:"693":10:"693":0 - -Base test mbedtls_mpi_cmp_mpi #2 -mbedtls_mpi_cmp_mpi:10:"693":10:"692":1 - -Base test mbedtls_mpi_cmp_mpi #3 -mbedtls_mpi_cmp_mpi:10:"693":10:"694":-1 - -Base test mbedtls_mpi_cmp_mpi (Negative values) #1 -mbedtls_mpi_cmp_mpi:10:"-2":10:"-2":0 - -Base test mbedtls_mpi_cmp_mpi (Negative values) #2 -mbedtls_mpi_cmp_mpi:10:"-2":10:"-3":1 - -Base test mbedtls_mpi_cmp_mpi (Negative values) #3 -mbedtls_mpi_cmp_mpi:10:"-2":10:"-1":-1 - -Base test mbedtls_mpi_cmp_mpi (Mixed values) #4 -mbedtls_mpi_cmp_mpi:10:"-3":10:"2":-1 - -Base test mbedtls_mpi_cmp_mpi (Mixed values) #5 -mbedtls_mpi_cmp_mpi:10:"2":10:"-3":1 - -Base test mbedtls_mpi_cmp_mpi (Mixed values) #6 -mbedtls_mpi_cmp_mpi:10:"-2":10:"31231231289798":-1 - -Base test mbedtls_mpi_cmp_abs #1 -mbedtls_mpi_cmp_abs:10:"693":10:"693":0 - -Base test mbedtls_mpi_cmp_abs #2 -mbedtls_mpi_cmp_abs:10:"693":10:"692":1 - -Base test mbedtls_mpi_cmp_abs #3 -mbedtls_mpi_cmp_abs:10:"693":10:"694":-1 - -Base test mbedtls_mpi_cmp_abs (Negative values) #1 -mbedtls_mpi_cmp_abs:10:"-2":10:"-2":0 - -Base test mbedtls_mpi_cmp_abs (Negative values) #2 -mbedtls_mpi_cmp_abs:10:"-2":10:"-3":-1 - -Base test mbedtls_mpi_cmp_abs (Negative values) #3 -mbedtls_mpi_cmp_abs:10:"-2":10:"-1":1 - -Base test mbedtls_mpi_cmp_abs (Zero and Zero) #4 -mbedtls_mpi_cmp_abs:10:"0":10:"0":0 - -Base test mbedtls_mpi_cmp_abs (Mix values) #1 -mbedtls_mpi_cmp_abs:10:"-2":10:"2":0 - -Base test mbedtls_mpi_cmp_abs (Mix values) #2 -mbedtls_mpi_cmp_abs:10:"2":10:"-3":-1 - -Base test mbedtls_mpi_cmp_abs (Mix values) #3 -mbedtls_mpi_cmp_abs:10:"-2":10:"1":1 - -Base test mbedtls_mpi_copy #1 -mbedtls_mpi_copy:0:1500 - -Base test mpi_copy_self #1 -mpi_copy_self:14 - -Base test mbedtls_mpi_swap #1 -mbedtls_mpi_swap:0:1500 - -Test mbedtls_mpi_shrink #1 -mbedtls_mpi_shrink:2:2:4:4 - -Test mbedtls_mpi_shrink #2 -mbedtls_mpi_shrink:4:2:4:4 - -Test mbedtls_mpi_shrink #3 -mbedtls_mpi_shrink:8:2:4:4 - -Test mbedtls_mpi_shrink #4 -mbedtls_mpi_shrink:8:4:4:4 - -Test mbedtls_mpi_shrink #5 -mbedtls_mpi_shrink:8:6:4:6 - -Test mbedtls_mpi_shrink #6 -mbedtls_mpi_shrink:4:2:0:2 - -Test mbedtls_mpi_shrink #7 -mbedtls_mpi_shrink:4:1:0:1 - -Test mbedtls_mpi_shrink #8 -mbedtls_mpi_shrink:4:0:0:1 - -Test mbedtls_mpi_safe_cond_assign #1 -mbedtls_mpi_safe_cond_assign:+1:"01":+1:"02" - -Test mbedtls_mpi_safe_cond_assign #2 -mbedtls_mpi_safe_cond_assign:+1:"FF000000000000000001":+1:"02" - -Test mbedtls_mpi_safe_cond_assign #3 -mbedtls_mpi_safe_cond_assign:+1:"01":+1:"FF000000000000000002" - -Test mbedtls_mpi_safe_cond_assign #4 -mbedtls_mpi_safe_cond_assign:+1:"01":-1:"02" - -Test mbedtls_mpi_safe_cond_assign #5 -mbedtls_mpi_safe_cond_assign:-1:"01":+1:"02" - -Test mbedtls_mpi_safe_cond_assign #6 -mbedtls_mpi_safe_cond_assign:-1:"01":-1:"02" - -Test mbedtls_mpi_safe_cond_swap #1 -mbedtls_mpi_safe_cond_swap:+1:"01":+1:"02" - -Test mbedtls_mpi_safe_cond_swap #2 -mbedtls_mpi_safe_cond_swap:+1:"FF000000000000000001":+1:"02" - -Test mbedtls_mpi_safe_cond_swap #3 -mbedtls_mpi_safe_cond_swap:+1:"01":+1:"FF000000000000000002" - -Test mbedtls_mpi_safe_cond_swap #4 -mbedtls_mpi_safe_cond_swap:+1:"01":-1:"02" - -Test mbedtls_mpi_safe_cond_swap #5 -mbedtls_mpi_safe_cond_swap:-1:"01":+1:"02" - -Test mbedtls_mpi_safe_cond_swap #6 -mbedtls_mpi_safe_cond_swap:-1:"01":-1:"02" - -Base test mbedtls_mpi_add_abs #1 -mbedtls_mpi_add_abs:10:"12345678":10:"642531":10:"12988209" - -Base test mbedtls_mpi_add_abs #2 -mbedtls_mpi_add_abs:10:"-12345678":10:"642531":10:"12988209" - -Base test mbedtls_mpi_add_abs #3 -mbedtls_mpi_add_abs:10:"12345678":10:"-642531":10:"12988209" - -Base test mbedtls_mpi_add_abs #4 -mbedtls_mpi_add_abs:10:"-12345678":10:"-642531":10:"12988209" - -Test mbedtls_mpi_add_abs #1 -mbedtls_mpi_add_abs:10:"-643808006803554439230129854961492699151386107534013432918073439524138264842370630061369715394739134090922937332590384720397133335969549256322620979036686633213903952966175107096769180017646161851573147596390153":10:"56125680981752282333498088313568935051383833838594899821664631784577337171193624243181360054669678410455329112434552942717084003541384594864129940145043086760031292483340068923506115878221189886491132772739661669044958531131327771":10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924" - -Test mbedtls_mpi_add_abs #2 (add to first value) -mpi_add_abs_add_first:10:"123123":10:"123123":10:"246246" - -Test mbedtls_mpi_add_abs #3 (add to second value) -mpi_add_abs_add_second:10:"123123":10:"123123":10:"246246" - -Regression mbedtls_mpi_add_abs (add small to very large MPI with carry rollover) -mbedtls_mpi_add_abs:16:"FFFFFFFFFFFFFFFFFFFFFFFFFFFFF8":16:"08":16:"1000000000000000000000000000000" - -Regression mbedtls_mpi_add_abs (add small to very large MPI with carry rollover) -mbedtls_mpi_add_abs:16:"08":16:"FFFFFFFFFFFFFFFFFFFFFFFFFFFFF8":16:"1000000000000000000000000000000" - -Base test mbedtls_mpi_add_mpi #1 -mbedtls_mpi_add_mpi:10:"12345678":10:"642531":10:"12988209" - -Base test mbedtls_mpi_add_mpi #2 -mbedtls_mpi_add_mpi:10:"-12345678":10:"642531":10:"-11703147" - -Base test mbedtls_mpi_add_mpi #3 -mbedtls_mpi_add_mpi:10:"12345678":10:"-642531":10:"11703147" - -Base test mbedtls_mpi_add_mpi #4 -mbedtls_mpi_add_mpi:10:"-12345678":10:"-642531":10:"-12988209" - -Test mbedtls_mpi_add_mpi #1 -mbedtls_mpi_add_mpi:10:"203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123":10:"531872289054204184185084734375133399408303613982130856645299464930952178606045848877129147820387996428175564228204785846141207532462936339834139412401975338705794646595487324365194792822189473092273993580587964571659678084484152603881094176995594813302284232006001752128168901293560051833646881436219":10:"735829167410606161590850601304167976688497607296479119740072111384235241328747126510065763883532084601487937110881909725679916932621242907172467691556475037071866553361927361439411910627880345885122142692610250903804554267860479115964668998643528806263534149325837971432443181537363155848647445226342" - -Test mbedtls_mpi_add_mpi #2 -mbedtls_mpi_add_mpi:10:"643808006803554439230129854961492699151386107534013432918073439524138264842370630061369715394739134090922937332590384720397133335969549256322620979036686633213903952966175107096769180017646161851573147596390153":10:"56125680981752282333498088313568935051383833838594899821664631784577337171193624243181360054669678410455329112434552942717084003541384594864129940145043086760031292483340068923506115878221189886491132772739661669044958531131327771":10:"56125680981752282334141896320372489490613963693556392520816017892111350604111697682705498319512049040516698827829292076808006940873974979584527073481012636016353913462376755556720019831187364993587901952757307830896531678727717924" - -Test mbedtls_mpi_add_int #1 -mbedtls_mpi_add_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227022647561" - -Test mbedtls_mpi_add_int #2 -mbedtls_mpi_add_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227002905097" - -Base test mbedtls_mpi_sub_abs #1 (Test with larger second input) -mbedtls_mpi_sub_abs:10:"5":10:"7":10:"0":MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_sub_abs #2 (Test with larger second input) -mbedtls_mpi_sub_abs:10:"-5":10:"-7":10:"0":MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_sub_abs #3 (Test with larger second input) -mbedtls_mpi_sub_abs:10:"-5":10:"7":10:"0":MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_sub_abs #4 (Test with larger second input) -mbedtls_mpi_sub_abs:10:"5":10:"-7":10:"0":MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_sub_abs #1 -mbedtls_mpi_sub_abs:10:"7":10:"5":10:"2":0 - -Base test mbedtls_mpi_sub_abs #2 -mbedtls_mpi_sub_abs:10:"-7":10:"-5":10:"2":0 - -Base test mbedtls_mpi_sub_abs #3 -mbedtls_mpi_sub_abs:10:"-7":10:"5":10:"2":0 - -Base test mbedtls_mpi_sub_abs #4 -mbedtls_mpi_sub_abs:10:"7":10:"-5":10:"2":0 - -Test mbedtls_mpi_sub_abs #1 -mbedtls_mpi_sub_abs:16:"FFFFFFFFFF":16:"01":16:"FFFFFFFFFE":0 - -Test mbedtls_mpi_sub_abs #2 -mbedtls_mpi_sub_abs:16:"FFFFFFFFF0":16:"01":16:"FFFFFFFFEF":0 - -Test mbedtls_mpi_sub_abs #3 -mbedtls_mpi_sub_abs:16:"FF00000000":16:"0F00000000":16:"F000000000":0 - -Test mbedtls_mpi_sub_abs #4 -mbedtls_mpi_sub_abs:16:"FF00000000":16:"0F00000001":16:"EFFFFFFFFF":0 - -Base test mbedtls_mpi_sub_mpi #1 (Test with negative result) -mbedtls_mpi_sub_mpi:10:"5":10:"7":10:"-2" - -Base test mbedtls_mpi_sub_mpi #2 (Test with negative inputs) -mbedtls_mpi_sub_mpi:10:"-5":10:"-7":10:"2" - -Base test mbedtls_mpi_sub_mpi #3 (Test with negative base) -mbedtls_mpi_sub_mpi:10:"-5":10:"7":10:"-12" - -Base test mbedtls_mpi_sub_mpi #4 (Test with negative subtraction) -mbedtls_mpi_sub_mpi:10:"5":10:"-7":10:"12" - -Test mbedtls_mpi_sub_mpi #1 -mbedtls_mpi_sub_mpi:10:"531872289054204184185084734375133399408303613982130856645299464930952178606045848877129147820387996428175564228204785846141207532462936339834139412401975338705794646595487324365194792822189473092273993580587964571659678084484152603881094176995594813302284232006001752128168901293560051833646881436219":10:"203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123":10:"327915410697802206779318867446098822128109620667782593550526818477669115883344571244192531757243908254863191345527661966602498132304629772495811133247475640339722739829047287290977675016498600299425844468565678239514801901107826091797519355347660820341034314686165532823894621049756947818646317646096" - -Test mbedtls_mpi_sub_mpi #2 (Test for negative result) -mbedtls_mpi_sub_mpi:10:"643808006803554439230129854961492699151386107534013432918073439524138264842370630061369715394739134090922937332590384720397133335969549256322620979036686633213903952966175107096769180017646161851573147596390153":10:"56125680981752282333498088313568935051383833838594899821664631784577337171193624243181360054669678410455329112434552942717084003541384594864129940145043086760031292483340068923506115878221189886491132772739661669044958531131327771":10:"-56125680981752282332854280306765380612153703983633407122513245677043323738275550803657221789827307780393959397039813808626161066208794210143732806809073537503708671504303382290292211925255014779394363592722015507193385383534937618" - -Test mbedtls_mpi_sub_int #1 -mbedtls_mpi_sub_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227022647561" - -Test mbedtls_mpi_sub_int #2 -mbedtls_mpi_sub_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227002905097" - -Test mbedtls_mpi_shift_l #1 -mbedtls_mpi_shift_l:10:"64":1:10:"128" - -Test mbedtls_mpi_shift_l #2 -mbedtls_mpi_shift_l:10:"658385546911733550164516088405238961461880256029834598831972039469421755117818013653494814438931957316403111689187691446941406788869098983929874080332195117465344344350008880118042764943201875870917468833709791733282363323948005998269792207":37:10:"90487820548639020691922304619723076305400961610119884872723190678642804168382367856686134531865643066983017249846286450251272364365605022750900439437595355052945035915579216557330505438734955340526145476988250171181404966718289259743378883640981192704" - -Test mbedtls_mpi_shift_r #1 -mbedtls_mpi_shift_r:10:"128":1:10:"64" - -Test mbedtls_mpi_shift_r #2 -mbedtls_mpi_shift_r:10:"120815570979701484704906977000760567182871429114712069861589084706550626575967516787438008593490722779337547394120718248995900363209947025063336882559539208430319216688889117222633155838468458047056355241515415159736436403445579777425189969":45:10:"3433785053053426415343295076376096153094051405637175942660777670498379921354157795219578264137985649407981651226029903483433269093721578004287291678324982297860947730012217028349628999378309630601971640587504883789518896817457" - -Test mbedtls_mpi_shift_r #4 -mbedtls_mpi_shift_r:16:"FFFFFFFFFFFFFFFF":63:16:"01" - -Test mbedtls_mpi_shift_r #4 -mbedtls_mpi_shift_r:16:"FFFFFFFFFFFFFFFF":64:16:"00" - -Test mbedtls_mpi_shift_r #6 -mbedtls_mpi_shift_r:16:"FFFFFFFFFFFFFFFF":65:16:"00" - -Test mbedtls_mpi_shift_r #7 -mbedtls_mpi_shift_r:16:"FFFFFFFFFFFFFFFF":128:16:"00" - -Base test mbedtls_mpi_mul_mpi #1 -mbedtls_mpi_mul_mpi:10:"5":10:"7":10:"35" - -Base test mbedtls_mpi_mul_mpi #2 -mbedtls_mpi_mul_mpi:10:"-5":10:"7":10:"-35" - -Base test mbedtls_mpi_mul_mpi #3 -mbedtls_mpi_mul_mpi:10:"5":10:"-7":10:"-35" - -Base test mbedtls_mpi_mul_mpi #4 -mbedtls_mpi_mul_mpi:10:"-5":10:"-7":10:"35" - -Test mbedtls_mpi_mul_mpi #1 -mbedtls_mpi_mul_mpi:10:"28911710017320205966167820725313234361535259163045867986277478145081076845846493521348693253530011243988160148063424837895971948244167867236923919506962312185829914482993478947657472351461336729641485069323635424692930278888923450060546465883490944265147851036817433970984747733020522259537":10:"16471581891701794764704009719057349996270239948993452268812975037240586099924712715366967486587417803753916334331355573776945238871512026832810626226164346328807407669366029926221415383560814338828449642265377822759768011406757061063524768140567867350208554439342320410551341675119078050953":10:"476221599179424887669515829231223263939342135681791605842540429321038144633323941248706405375723482912535192363845116154236465184147599697841273424891410002781967962186252583311115708128167171262206919514587899883547279647025952837516324649656913580411611297312678955801899536937577476819667861053063432906071315727948826276092545739432005962781562403795455162483159362585281248265005441715080197800335757871588045959754547836825977169125866324128449699877076762316768127816074587766799018626179199776188490087103869164122906791440101822594139648973454716256383294690817576188761" - -Test mbedtls_mpi_mul_int #1 -mbedtls_mpi_mul_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":"==" - -Test mbedtls_mpi_mul_int #2 (Unsigned, thus failure) -mbedtls_mpi_mul_int:10:"2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"-20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":"!=" - -Test mbedtls_mpi_mul_int #3 -mbedtls_mpi_mul_int:10:"-2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":9871232:10:"-20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":"==" - -Test mbedtls_mpi_mul_int #4 (Unsigned, thus failure) -mbedtls_mpi_mul_int:10:"-2039568783564019774057658669290345772801939933143482630947726464532830627227012776329":-9871232:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":"!=" - -Base test mbedtls_mpi_div_mpi #1 -mbedtls_mpi_div_mpi:10:"1000":10:"13":10:"76":10:"12":0 - -Base test mbedtls_mpi_div_mpi #2 (Divide by zero) -mbedtls_mpi_div_mpi:10:"1000":10:"0":10:"1":10:"1":MBEDTLS_ERR_MPI_DIVISION_BY_ZERO - -Base test mbedtls_mpi_div_mpi #3 -mbedtls_mpi_div_mpi:10:"1000":10:"-13":10:"-76":10:"12":0 - -Test mbedtls_mpi_div_mpi #1 -mbedtls_mpi_div_mpi:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":10:"34":10:"592148724779947824773845002981655249516095268533053127589864347174804198178334111238460803":10:"26":0 - -Test mbedtls_mpi_div_mpi #2 -mbedtls_mpi_div_mpi:10:"476221599179424887669515829231223263939342135681791605842540429321038144633323941248706405375723482912535192363845116154236465184147599697841273424891410002781967962186252583311115708128167171262206919514587899883547279647025952837516324649656913580411611297312678955801899536937577476819667861053063432906071315727948826276092545739432005962781562403795455162483159362585281248265005441715080197800335757871588045959754547836825977169125866324128449699877076762316768127816074587766799018626179199776188490087103869164122906791440101822594139648973454716256383294690817576188762":10:"28911710017320205966167820725313234361535259163045867986277478145081076845846493521348693253530011243988160148063424837895971948244167867236923919506962312185829914482993478947657472351461336729641485069323635424692930278888923450060546465883490944265147851036817433970984747733020522259537":10:"16471581891701794764704009719057349996270239948993452268812975037240586099924712715366967486587417803753916334331355573776945238871512026832810626226164346328807407669366029926221415383560814338828449642265377822759768011406757061063524768140567867350208554439342320410551341675119078050953":10:"1":0 - -Test mbedtls_mpi_div_mpi #3 -mbedtls_mpi_div_mpi:10:"1000":10:"7":10:"142":10:"6":0 - -Test mbedtls_mpi_div_mpi #4 -mbedtls_mpi_div_mpi:10:"777":10:"7":10:"111":10:"0":0 - -Base test mbedtls_mpi_div_int #1 -mbedtls_mpi_div_int:10:"1000":13:10:"76":10:"12":0 - -Base test mbedtls_mpi_div_int #2 (Divide by zero) -mbedtls_mpi_div_int:10:"1000":0:10:"1":10:"1":MBEDTLS_ERR_MPI_DIVISION_BY_ZERO - -Base test mbedtls_mpi_div_int #3 -mbedtls_mpi_div_int:10:"1000":-13:10:"-76":10:"12":0 - -Test mbedtls_mpi_div_int #1 -mbedtls_mpi_div_int:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":34:10:"592148724779947824773845002981655249516095268533053127589864347174804198178334111238460803":10:"26":0 - -Test mbedtls_mpi_div_int #2 -mbedtls_mpi_div_int:10:"20133056642518226042310730101376278483547239130123806338055387803943342738063359782107667328":-34:10:"-592148724779947824773845002981655249516095268533053127589864347174804198178334111238460803":10:"26":0 - -Base test mbedtls_mpi_mod_mpi #1 -mbedtls_mpi_mod_mpi:10:"1000":10:"13":10:"12":0 - -Base test mbedtls_mpi_mod_mpi #2 (Divide by zero) -mbedtls_mpi_mod_mpi:10:"1000":10:"0":10:"0":MBEDTLS_ERR_MPI_DIVISION_BY_ZERO - -Base test mbedtls_mpi_mod_mpi #3 -mbedtls_mpi_mod_mpi:10:"-1000":10:"13":10:"1":0 - -Base test mbedtls_mpi_mod_mpi #4 (Negative modulo) -mbedtls_mpi_mod_mpi:10:"1000":10:"-13":10:"-1":MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_mod_mpi #5 (Negative modulo) -mbedtls_mpi_mod_mpi:10:"-1000":10:"-13":10:"-12":MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_mod_int #1 -mbedtls_mpi_mod_int:10:"1000":13:12:0 - -Base test mbedtls_mpi_mod_int #2 (Divide by zero) -mbedtls_mpi_mod_int:10:"1000":0:0:MBEDTLS_ERR_MPI_DIVISION_BY_ZERO - -Base test mbedtls_mpi_mod_int #3 -mbedtls_mpi_mod_int:10:"-1000":13:1:0 - -Base test mbedtls_mpi_mod_int #4 (Negative modulo) -mbedtls_mpi_mod_int:10:"1000":-13:0:MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_mod_int #5 (Negative modulo) -mbedtls_mpi_mod_int:10:"-1000":-13:0:MBEDTLS_ERR_MPI_NEGATIVE_VALUE - -Base test mbedtls_mpi_mod_int #6 (By 1) -mbedtls_mpi_mod_int:10:"1000":1:0:0 - -Base test mbedtls_mpi_mod_int #7 (By 2) -mbedtls_mpi_mod_int:10:"1001":2:1:0 - -Base test mbedtls_mpi_mod_int #8 (By 2) -mbedtls_mpi_mod_int:10:"1000":2:0:0 - -Base test mbedtls_mpi_exp_mod #1 -mbedtls_mpi_exp_mod:10:"23":10:"13":10:"29":10:"":10:"24":0 - -Base test mbedtls_mpi_exp_mod #2 (Even N) -mbedtls_mpi_exp_mod:10:"23":10:"13":10:"30":10:"":10:"0":MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Base test mbedtls_mpi_exp_mod #3 (Negative N) -mbedtls_mpi_exp_mod:10:"23":10:"13":10:"-29":10:"":10:"0":MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Base test mbedtls_mpi_exp_mod #4 (Negative base) -mbedtls_mpi_exp_mod:10:"-23":10:"13":10:"29":10:"":10:"5":0 - -Base test mbedtls_mpi_exp_mod #5 (Negative exponent) -mbedtls_mpi_exp_mod:10:"23":10:"-13":10:"29":10:"":10:"0":MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Base test mbedtls_mpi_exp_mod #7 (Negative base + exponent) -mbedtls_mpi_exp_mod:10:"-23":10:"-13":10:"29":10:"":10:"0":MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Test mbedtls_mpi_exp_mod #1 -mbedtls_mpi_exp_mod:10:"433019240910377478217373572959560109819648647016096560523769010881172869083338285573756574557395862965095016483867813043663981946477698466501451832407592327356331263124555137732393938242285782144928753919588632679050799198937132922145084847":10:"5781538327977828897150909166778407659250458379645823062042492461576758526757490910073628008613977550546382774775570888130029763571528699574717583228939535960234464230882573615930384979100379102915657483866755371559811718767760594919456971354184113721":10:"583137007797276923956891216216022144052044091311388601652961409557516421612874571554415606746479105795833145583959622117418531166391184939066520869800857530421873250114773204354963864729386957427276448683092491947566992077136553066273207777134303397724679138833126700957":10:"":10:"114597449276684355144920670007147953232659436380163461553186940113929777196018164149703566472936578890991049344459204199888254907113495794730452699842273939581048142004834330369483813876618772578869083248061616444392091693787039636316845512292127097865026290173004860736":0 - -Test mbedtls_mpi_exp_mod (Negative base) -mbedtls_mpi_exp_mod:10:"-10000000000":10:"10000000000":10:"99999":10:"":10:"99998":0 - -Test mbedtls_mpi_exp_mod (Negative base) -mbedtls_mpi_exp_mod:16:"-9f13012cd92aa72fb86ac8879d2fde4f7fd661aaae43a00971f081cc60ca277059d5c37e89652e2af2585d281d66ef6a9d38a117e9608e9e7574cd142dc55278838a2161dd56db9470d4c1da2d5df15a908ee2eb886aaa890f23be16de59386663a12f1afbb325431a3e835e3fd89b98b96a6f77382f458ef9a37e1f84a03045c8676ab55291a94c2228ea15448ee96b626b998":16:"40a54d1b9e86789f06d9607fb158672d64867665c73ee9abb545fc7a785634b354c7bae5b962ce8040cf45f2c1f3d3659b2ee5ede17534c8fc2ec85c815e8df1fe7048d12c90ee31b88a68a081f17f0d8ce5f4030521e9400083bcea73a429031d4ca7949c2000d597088e0c39a6014d8bf962b73bb2e8083bd0390a4e00b9b3":16:"eeaf0ab9adb38dd69c33f80afa8fc5e86072618775ff3c0b9ea2314c9c256576d674df7496ea81d3383b4813d692c6e0e0d5d8e250b98be48e495c1d6089dad15dc7d7b46154d6b6ce8ef4ad69b15d4982559b297bcf1885c529f566660e57ec68edbc3c05726cc02fd4cbf4976eaa9afd5138fe8376435b9fc61d2fc0eb06e3":16:"":16:"21acc7199e1b90f9b4844ffe12c19f00ec548c5d32b21c647d48b6015d8eb9ec9db05b4f3d44db4227a2b5659c1a7cceb9d5fa8fa60376047953ce7397d90aaeb7465e14e820734f84aa52ad0fc66701bcbb991d57715806a11531268e1e83dd48288c72b424a6287e9ce4e5cc4db0dd67614aecc23b0124a5776d36e5c89483":0 - -Base test GCD #1 -mbedtls_mpi_gcd:10:"693":10:"609":10:"21" - -Base test GCD #2 -mbedtls_mpi_gcd:10:"1764":10:"868":10:"28" - -Base test GCD #3 -mbedtls_mpi_gcd:10:"768454923":10:"542167814":10:"1" - -Test GCD #1 -mbedtls_mpi_gcd:10:"433019240910377478217373572959560109819648647016096560523769010881172869083338285573756574557395862965095016483867813043663981946477698466501451832407592327356331263124555137732393938242285782144928753919588632679050799198937132922145084847":10:"5781538327977828897150909166778407659250458379645823062042492461576758526757490910073628008613977550546382774775570888130029763571528699574717583228939535960234464230882573615930384979100379102915657483866755371559811718767760594919456971354184113721":10:"1" - -Base test mbedtls_mpi_inv_mod #1 -mbedtls_mpi_inv_mod:10:"3":10:"11":10:"4":0 - -Base test mbedtls_mpi_inv_mod #2 -mbedtls_mpi_inv_mod:10:"3":10:"0":10:"0":MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Base test mbedtls_mpi_inv_mod #3 -mbedtls_mpi_inv_mod:10:"3":10:"-11":10:"4":MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Base test mbedtls_mpi_inv_mod #4 -mbedtls_mpi_inv_mod:10:"2":10:"4":10:"0":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Test mbedtls_mpi_inv_mod #1 -mbedtls_mpi_inv_mod:16:"aa4df5cb14b4c31237f98bd1faf527c283c2d0f3eec89718664ba33f9762907c":16:"fffbbd660b94412ae61ead9c2906a344116e316a256fd387874c6c675b1d587d":16:"8d6a5c1d7adeae3e94b9bcd2c47e0d46e778bc8804a2cc25c02d775dc3d05b0c":0 - -Base test mbedtls_mpi_is_prime #1 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"0":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Base test mbedtls_mpi_is_prime #2 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"1":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Base test mbedtls_mpi_is_prime #3 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"2":0 - -Base test mbedtls_mpi_is_prime #4 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"3":0 - -Base test mbedtls_mpi_is_prime #5 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"4":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Base test mbedtls_mpi_is_prime #6 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"5":0 - -Base test mbedtls_mpi_is_prime #7 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"27":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Base test mbedtls_mpi_is_prime #8 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"47":0 - -Test mbedtls_mpi_is_prime #1a -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"83726728883146151979668243326097049289208482987685965276439157162337476477581":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Test mbedtls_mpi_is_prime #1b -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"81248637410584921454869308488899267096530643632730258201256092582281263244641":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Test mbedtls_mpi_is_prime #2a -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"827131507221654563937832686696200995595835694437983658840870036586124168186967796809117749047430768825822857042432722828096779098498192459819306321073968735177531164565305635281198148032612029767584644305912099":0 - -Test mbedtls_mpi_is_prime #2b -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"827131507221654563937832686696200995595835694437983658840870036586124168186967796809117749047430768825822857042432722828096779098498192459819306321073968735177531164565305635281198148032612029767584644305912001":MBEDTLS_ERR_MPI_NOT_ACCEPTABLE - -Test mbedtls_mpi_is_prime #3 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"2833419889721787128217599":0 - -Test mbedtls_mpi_is_prime #4 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"195845982777569926302400511":0 - -Test mbedtls_mpi_is_prime #5 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"4776913109852041418248056622882488319":0 - -Test mbedtls_mpi_is_prime #5 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"768614336404564651":0 - -Test mbedtls_mpi_is_prime #6 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"201487636602438195784363":0 - -Test mbedtls_mpi_is_prime #7 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"845100400152152934331135470251":0 - -Test mbedtls_mpi_is_prime #8 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"56713727820156410577229101238628035243":0 - -Test mbedtls_mpi_is_prime #9 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123":0 - -Test mbedtls_mpi_is_prime #10 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"531872289054204184185084734375133399408303613982130856645299464930952178606045848877129147820387996428175564228204785846141207532462936339834139412401975338705794646595487324365194792822189473092273993580587964571659678084484152603881094176995594813302284232006001752128168901293560051833646881436219":0 - -Test mbedtls_mpi_is_prime #11 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"319705304701141539155720137200974664666792526059405792539680974929469783512821793995613718943171723765238853752439032835985158829038528214925658918372196742089464683960239919950882355844766055365179937610326127675178857306260955550407044463370239890187189750909036833976197804646589380690779463976173":0 - -Test mbedtls_mpi_is_prime #12 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"200603822195324642393516294012917598972967449320074999667103434371470616000652036570009912021332527788252300901905236578801044680456930305350440933538867383130165841118050781326291059830545891570648243241795871":0 - -Test mbedtls_mpi_is_prime #13 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"827131507221654563937832686696200995595835694437983658840870036586124168186967796809117749047430768825822857042432722828096779098498192459819306321073968735177531164565305635281198148032612029767584644305912099":0 - -Test mbedtls_mpi_is_prime #14 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"964274047248418797145090983157197980855078966882276492572788532954904112655338439361306213898569516593744267391754033306465125919199692703323878557833023573312685002670662846477592597659826113460619815244721311":0 - -Test mbedtls_mpi_is_prime #15 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"170141183460469231731687303715884105727":0 - -Test mbedtls_mpi_is_prime #16 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"2147483647":0 - -Test mbedtls_mpi_is_prime #17 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"961748941":0 - -Test mbedtls_mpi_is_prime #18 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"179424691":0 - -Test mbedtls_mpi_is_prime #19 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"32452867":0 - -Test mbedtls_mpi_is_prime #20 -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_is_prime:10:"49979687":0 - -Test mbedtls_mpi_gen_prime (Too small) -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_gen_prime:2:0:MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -Test mbedtls_mpi_gen_prime (OK, minimum size) -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_gen_prime:3:0:0 - -Test mbedtls_mpi_gen_prime (Larger) -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_gen_prime:128:0:0 - -Test mbedtls_mpi_gen_prime (Safe) -depends_on:MBEDTLS_GENPRIME -mbedtls_mpi_gen_prime:128:1:0 - -Test bit getting (Value bit 25) -mbedtls_mpi_get_bit:10:"49979687":25:1 - -Test bit getting (Larger but same limb) -mbedtls_mpi_get_bit:10:"49979687":26:0 - -Test bit getting (Larger and non-existing limb) -mbedtls_mpi_get_bit:10:"49979687":500:0 - -Test bit getting (Value bit 24) -mbedtls_mpi_get_bit:10:"49979687":24:0 - -Test bit getting (Value bit 23) -mbedtls_mpi_get_bit:10:"49979687":23:1 - -Test bit set (Change existing value with a 1) -mbedtls_mpi_set_bit:10:"49979687":24:1:10:"66756903" - -Test bit set (Change existing value with a 0) -mbedtls_mpi_set_bit:10:"49979687":25:0:10:"16425255" - -Test bit set (Add above existing limbs with a 0) -mbedtls_mpi_set_bit:10:"49979687":80:0:10:"49979687" - -Test bit set (Add above existing limbs with a 1) -mbedtls_mpi_set_bit:10:"49979687":80:1:10:"1208925819614629224685863" - -Test bit set (Bit index larger than 31 with a 0) -mbedtls_mpi_set_bit:16:"FFFFFFFFFFFFFFFF":32:0:16:"FFFFFFFEFFFFFFFF" - -Test bit set (Bit index larger than 31 with a 1) -mbedtls_mpi_set_bit:16:"00":32:1:16:"0100000000" - -MPI Selftest -depends_on:MBEDTLS_SELF_TEST -mpi_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.function deleted file mode 100644 index 5dd6f0da40..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_mpi.function +++ /dev/null @@ -1,852 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/bignum.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_BIGNUM_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mpi_null( ) -{ - mbedtls_mpi X, Y, Z; - - mbedtls_mpi_init( &X ); - mbedtls_mpi_init( &Y ); - mbedtls_mpi_init( &Z ); - - TEST_ASSERT( mbedtls_mpi_get_bit( &X, 42 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lsb( &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_bitlen( &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_size( &X ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mpi_read_write_string( int radix_X, char *input_X, int radix_A, - char *input_A, int output_size, int result_read, - int result_write ) -{ - mbedtls_mpi X; - char str[1000]; - size_t len; - - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == result_read ); - if( result_read == 0 ) - { - TEST_ASSERT( mbedtls_mpi_write_string( &X, radix_A, str, output_size, &len ) == result_write ); - if( result_write == 0 ) - { - TEST_ASSERT( strcasecmp( str, input_A ) == 0 ); - } - } - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_read_binary( char *input_X, int radix_A, char *input_A ) -{ - mbedtls_mpi X; - unsigned char str[1000]; - unsigned char buf[1000]; - size_t len; - size_t input_len; - - mbedtls_mpi_init( &X ); - - input_len = unhexify( buf, input_X ); - - TEST_ASSERT( mbedtls_mpi_read_binary( &X, buf, input_len ) == 0 ); - TEST_ASSERT( mbedtls_mpi_write_string( &X, radix_A, (char *) str, sizeof( str ), &len ) == 0 ); - TEST_ASSERT( strcmp( (char *) str, input_A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_write_binary( int radix_X, char *input_X, char *input_A, - int output_size, int result ) -{ - mbedtls_mpi X; - unsigned char str[1000]; - unsigned char buf[1000]; - size_t buflen; - - memset( buf, 0x00, 1000 ); - memset( str, 0x00, 1000 ); - - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - - buflen = mbedtls_mpi_size( &X ); - if( buflen > (size_t) output_size ) - buflen = (size_t) output_size; - - TEST_ASSERT( mbedtls_mpi_write_binary( &X, buf, buflen ) == result ); - if( result == 0) - { - hexify( str, buf, buflen ); - - TEST_ASSERT( strcasecmp( (char *) str, input_A ) == 0 ); - } - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void mbedtls_mpi_read_file( int radix_X, char *input_file, char *input_A, - int result ) -{ - mbedtls_mpi X; - unsigned char str[1000]; - unsigned char buf[1000]; - size_t buflen; - FILE *file; - int ret; - - memset( buf, 0x00, 1000 ); - memset( str, 0x00, 1000 ); - - mbedtls_mpi_init( &X ); - - file = fopen( input_file, "r" ); - TEST_ASSERT( file != NULL ); - ret = mbedtls_mpi_read_file( &X, radix_X, file ); - fclose(file); - TEST_ASSERT( ret == result ); - - if( result == 0 ) - { - buflen = mbedtls_mpi_size( &X ); - TEST_ASSERT( mbedtls_mpi_write_binary( &X, buf, buflen ) == 0 ); - - hexify( str, buf, buflen ); - - TEST_ASSERT( strcasecmp( (char *) str, input_A ) == 0 ); - } - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */ -void mbedtls_mpi_write_file( int radix_X, char *input_X, int output_radix, - char *output_file ) -{ - mbedtls_mpi X, Y; - FILE *file_out, *file_in; - int ret; - - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - - file_out = fopen( output_file, "w" ); - TEST_ASSERT( file_out != NULL ); - ret = mbedtls_mpi_write_file( NULL, &X, output_radix, file_out ); - fclose(file_out); - TEST_ASSERT( ret == 0 ); - - file_in = fopen( output_file, "r" ); - TEST_ASSERT( file_in != NULL ); - ret = mbedtls_mpi_read_file( &Y, output_radix, file_in ); - fclose(file_in); - TEST_ASSERT( ret == 0 ); - - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_get_bit( int radix_X, char *input_X, int pos, int val ) -{ - mbedtls_mpi X; - mbedtls_mpi_init( &X ); - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_get_bit( &X, pos ) == val ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_set_bit( int radix_X, char *input_X, int pos, int val, int radix_Y, - char *output_Y ) -{ - mbedtls_mpi X, Y; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, output_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_set_bit( &X, pos, val ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_lsb( int radix_X, char *input_X, int nr_bits ) -{ - mbedtls_mpi X; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lsb( &X ) == (size_t) nr_bits ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_bitlen( int radix_X, char *input_X, int nr_bits ) -{ - mbedtls_mpi X; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_bitlen( &X ) == (size_t) nr_bits ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_gcd( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A ) -{ - mbedtls_mpi A, X, Y, Z; - mbedtls_mpi_init( &A ); mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &Z, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &A ); mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_cmp_int( int input_X, int input_A, int result_CMP ) -{ - mbedtls_mpi X; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_lset( &X, input_X ) == 0); - TEST_ASSERT( mbedtls_mpi_cmp_int( &X, input_A ) == result_CMP); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_cmp_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y, - int input_A ) -{ - mbedtls_mpi X, Y; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) == input_A ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_cmp_abs( int radix_X, char *input_X, int radix_Y, char *input_Y, - int input_A ) -{ - mbedtls_mpi X, Y; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_abs( &X, &Y ) == input_A ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_copy( int input_X, int input_A ) -{ - mbedtls_mpi X, Y, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_lset( &X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lset( &Y, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lset( &A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) != 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_copy( &Y, &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) != 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mpi_copy_self( int input_X ) -{ - mbedtls_mpi X; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_lset( &X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_copy( &X, &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_int( &X, input_X ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_shrink( int before, int used, int min, int after ) -{ - mbedtls_mpi X; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_grow( &X, before ) == 0 ); - TEST_ASSERT( used <= before ); - memset( X.p, 0x2a, used * sizeof( mbedtls_mpi_uint ) ); - TEST_ASSERT( mbedtls_mpi_shrink( &X, min ) == 0 ); - TEST_ASSERT( X.n == (size_t) after ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_safe_cond_assign( int x_sign, char *x_str, - int y_sign, char *y_str ) -{ - mbedtls_mpi X, Y, XX; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &XX ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, 16, x_str ) == 0 ); - X.s = x_sign; - TEST_ASSERT( mbedtls_mpi_read_string( &Y, 16, y_str ) == 0 ); - Y.s = y_sign; - TEST_ASSERT( mbedtls_mpi_copy( &XX, &X ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_safe_cond_assign( &X, &Y, 0 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &XX ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_safe_cond_assign( &X, &Y, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &XX ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_safe_cond_swap( int x_sign, char *x_str, - int y_sign, char *y_str ) -{ - mbedtls_mpi X, Y, XX, YY; - - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); - mbedtls_mpi_init( &XX ); mbedtls_mpi_init( &YY ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, 16, x_str ) == 0 ); - X.s = x_sign; - TEST_ASSERT( mbedtls_mpi_read_string( &Y, 16, y_str ) == 0 ); - Y.s = y_sign; - - TEST_ASSERT( mbedtls_mpi_copy( &XX, &X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_copy( &YY, &Y ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_safe_cond_swap( &X, &Y, 0 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &XX ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &YY ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_safe_cond_swap( &X, &Y, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &XX ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &YY ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); - mbedtls_mpi_free( &XX ); mbedtls_mpi_free( &YY ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_swap( int input_X, int input_Y ) -{ - mbedtls_mpi X, Y, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_lset( &X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lset( &Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_lset( &A, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) != 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 ); - mbedtls_mpi_swap( &X, &Y ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &Y ) != 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_add_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A ) -{ - mbedtls_mpi X, Y, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_add_mpi( &Z, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_add_abs( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A ) -{ - mbedtls_mpi X, Y, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_add_abs( &Z, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mpi_add_abs_add_first( int radix_X, char *input_X, int radix_Y, - char *input_Y, int radix_A, char *input_A ) -{ - mbedtls_mpi X, Y, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_add_abs( &X, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mpi_add_abs_add_second( int radix_X, char *input_X, int radix_Y, - char *input_Y, int radix_A, char *input_A ) -{ - mbedtls_mpi X, Y, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_add_abs( &Y, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_add_int( int radix_X, char *input_X, int input_Y, int radix_A, - char *input_A ) -{ - mbedtls_mpi X, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_add_int( &Z, &X, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_sub_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A ) -{ - mbedtls_mpi X, Y, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_mpi( &Z, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_sub_abs( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A, int sub_result ) -{ - mbedtls_mpi X, Y, Z, A; - int res; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - - res = mbedtls_mpi_sub_abs( &Z, &X, &Y ); - TEST_ASSERT( res == sub_result ); - if( res == 0 ) - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_sub_int( int radix_X, char *input_X, int input_Y, int radix_A, - char *input_A ) -{ - mbedtls_mpi X, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Z, &X, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_mul_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A ) -{ - mbedtls_mpi X, Y, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &Z, &X, &Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_mul_int( int radix_X, char *input_X, int input_Y, int radix_A, - char *input_A, char *result_comparison ) -{ - mbedtls_mpi X, Z, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_int( &Z, &X, input_Y ) == 0 ); - if( strcmp( result_comparison, "==" ) == 0 ) - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - else if( strcmp( result_comparison, "!=" ) == 0 ) - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) != 0 ); - else - TEST_ASSERT( "unknown operator" == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_div_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A, int radix_B, char *input_B, - int div_result ) -{ - mbedtls_mpi X, Y, Q, R, A, B; - int res; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &R ); - mbedtls_mpi_init( &A ); mbedtls_mpi_init( &B ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &B, radix_B, input_B ) == 0 ); - res = mbedtls_mpi_div_mpi( &Q, &R, &X, &Y ); - TEST_ASSERT( res == div_result ); - if( res == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Q, &A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R, &B ) == 0 ); - } - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &R ); - mbedtls_mpi_free( &A ); mbedtls_mpi_free( &B ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_div_int( int radix_X, char *input_X, int input_Y, int radix_A, - char *input_A, int radix_B, char *input_B, int div_result ) -{ - mbedtls_mpi X, Q, R, A, B; - int res; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &R ); mbedtls_mpi_init( &A ); - mbedtls_mpi_init( &B ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &B, radix_B, input_B ) == 0 ); - res = mbedtls_mpi_div_int( &Q, &R, &X, input_Y ); - TEST_ASSERT( res == div_result ); - if( res == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Q, &A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &R, &B ) == 0 ); - } - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &R ); mbedtls_mpi_free( &A ); - mbedtls_mpi_free( &B ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_mod_mpi( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A, int div_result ) -{ - mbedtls_mpi X, Y, A; - int res; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - res = mbedtls_mpi_mod_mpi( &X, &X, &Y ); - TEST_ASSERT( res == div_result ); - if( res == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 ); - } - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_mod_int( int radix_X, char *input_X, int input_Y, int input_A, - int div_result ) -{ - mbedtls_mpi X; - int res; - mbedtls_mpi_uint r; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - res = mbedtls_mpi_mod_int( &r, &X, input_Y ); - TEST_ASSERT( res == div_result ); - if( res == 0 ) - { - TEST_ASSERT( r == (mbedtls_mpi_uint) input_A ); - } - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_exp_mod( int radix_A, char *input_A, int radix_E, char *input_E, - int radix_N, char *input_N, int radix_RR, char *input_RR, - int radix_X, char *input_X, int div_result ) -{ - mbedtls_mpi A, E, N, RR, Z, X; - int res; - mbedtls_mpi_init( &A ); mbedtls_mpi_init( &E ); mbedtls_mpi_init( &N ); - mbedtls_mpi_init( &RR ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &E, radix_E, input_E ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - - if( strlen( input_RR ) ) - TEST_ASSERT( mbedtls_mpi_read_string( &RR, radix_RR, input_RR ) == 0 ); - - res = mbedtls_mpi_exp_mod( &Z, &A, &E, &N, &RR ); - TEST_ASSERT( res == div_result ); - if( res == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &X ) == 0 ); - } - -exit: - mbedtls_mpi_free( &A ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &N ); - mbedtls_mpi_free( &RR ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_inv_mod( int radix_X, char *input_X, int radix_Y, char *input_Y, - int radix_A, char *input_A, int div_result ) -{ - mbedtls_mpi X, Y, Z, A; - int res; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &Y, radix_Y, input_Y ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - res = mbedtls_mpi_inv_mod( &Z, &X, &Y ); - TEST_ASSERT( res == div_result ); - if( res == 0 ) - { - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 ); - } - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_GENPRIME */ -void mbedtls_mpi_is_prime( int radix_X, char *input_X, int div_result ) -{ - mbedtls_mpi X; - int res; - mbedtls_mpi_init( &X ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - res = mbedtls_mpi_is_prime( &X, rnd_std_rand, NULL ); - TEST_ASSERT( res == div_result ); - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_GENPRIME */ -void mbedtls_mpi_gen_prime( int bits, int safe, int ref_ret ) -{ - mbedtls_mpi X; - int my_ret; - - mbedtls_mpi_init( &X ); - - my_ret = mbedtls_mpi_gen_prime( &X, bits, safe, rnd_std_rand, NULL ); - TEST_ASSERT( my_ret == ref_ret ); - - if( ref_ret == 0 ) - { - size_t actual_bits = mbedtls_mpi_bitlen( &X ); - - TEST_ASSERT( actual_bits >= (size_t) bits ); - TEST_ASSERT( actual_bits <= (size_t) bits + 1 ); - - TEST_ASSERT( mbedtls_mpi_is_prime( &X, rnd_std_rand, NULL ) == 0 ); - if( safe ) - { - mbedtls_mpi_shift_r( &X, 1 ); /* X = ( X - 1 ) / 2 */ - TEST_ASSERT( mbedtls_mpi_is_prime( &X, rnd_std_rand, NULL ) == 0 ); - } - } - -exit: - mbedtls_mpi_free( &X ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_shift_l( int radix_X, char *input_X, int shift_X, int radix_A, - char *input_A) -{ - mbedtls_mpi X, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_shift_l( &X, shift_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_mpi_shift_r( int radix_X, char *input_X, int shift_X, int radix_A, - char *input_A ) -{ - mbedtls_mpi X, A; - mbedtls_mpi_init( &X ); mbedtls_mpi_init( &A ); - - TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 ); - TEST_ASSERT( mbedtls_mpi_shift_r( &X, shift_X ) == 0 ); - TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 ); - -exit: - mbedtls_mpi_free( &X ); mbedtls_mpi_free( &A ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void mpi_selftest() -{ - TEST_ASSERT( mbedtls_mpi_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.data deleted file mode 100644 index 973c92325b..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.data +++ /dev/null @@ -1,17 +0,0 @@ -Standard PEM write -mbedtls_pem_write_buffer:"-----START TEST-----\n":"-----END TEST-----\n":"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"-----START TEST-----\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8=\n-----END TEST-----\n" - -PEM write (zero data) -mbedtls_pem_write_buffer:"-----START TEST-----\n":"-----END TEST-----\n":"":"-----START TEST-----\n-----END TEST-----\n" - -PEM write (one byte) -mbedtls_pem_write_buffer:"-----START TEST-----\n":"-----END TEST-----\n":"00":"-----START TEST-----\nAA==\n-----END TEST-----\n" - -PEM write (more than line size) -mbedtls_pem_write_buffer:"-----START TEST-----\n":"-----END TEST-----\n":"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"-----START TEST-----\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8AAQIDBAUGBwgJCgsMDQ4P\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8=\n-----END TEST-----\n" - -PEM write (exactly two lines) -mbedtls_pem_write_buffer:"-----START TEST-----\n":"-----END TEST-----\n":"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F":"-----START TEST-----\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8AAQIDBAUGBwgJCgsMDQ4P\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8AAQIDBAUGBwgJCgsMDQ4P\n-----END TEST-----\n" - -PEM write (exactly two lines + 1) -mbedtls_pem_write_buffer:"-----START TEST-----\n":"-----END TEST-----\n":"000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F000102030405060708090A0B0C0D0E0F00":"-----START TEST-----\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8AAQIDBAUGBwgJCgsMDQ4P\nAAECAwQFBgcICQoLDA0ODwABAgMEBQYHCAkKCwwNDg8AAQIDBAUGBwgJCgsMDQ4P\nAA==\n-----END TEST-----\n" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.function deleted file mode 100644 index 6a62bfed94..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pem.function +++ /dev/null @@ -1,40 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/base64.h" -#include "mbedtls/pem.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_PEM_WRITE_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_pem_write_buffer( char *start, char *end, char *buf_str, char *result_str ) -{ - unsigned char buf[5000]; - unsigned char *check_buf = NULL; - int ret; - size_t buf_len, olen = 0, olen2 = 0; - - memset( buf, 0, sizeof( buf ) ); - - buf_len = unhexify( buf, buf_str ); - - ret = mbedtls_pem_write_buffer( start, end, buf, buf_len, NULL, 0, &olen ); - TEST_ASSERT( ret == MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); - - check_buf = (unsigned char *) mbedtls_calloc( 1, olen ); - TEST_ASSERT( check_buf != NULL ); - - memset( check_buf, 0, olen ); - ret = mbedtls_pem_write_buffer( start, end, buf, buf_len, check_buf, olen, &olen2 ); - - TEST_ASSERT( olen2 <= olen ); - TEST_ASSERT( olen > strlen( (char*) result_str ) ); - TEST_ASSERT( ret == 0 ); - TEST_ASSERT( strncmp( (char *) check_buf, (char *) result_str, olen ) == 0 ); - -exit: - mbedtls_free( check_buf ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.data deleted file mode 100644 index 22a7fa8b11..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.data +++ /dev/null @@ -1,152 +0,0 @@ -PK utils: RSA -depends_on:MBEDTLS_RSA_C:MBEDTLS_GENPRIME -pk_utils:MBEDTLS_PK_RSA:512:64:"RSA" - -PK utils: ECKEY -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_utils:MBEDTLS_PK_ECKEY:192:24:"EC" - -PK utils: ECKEY_DH -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_utils:MBEDTLS_PK_ECKEY_DH:192:24:"EC_DH" - -PK utils: ECDSA -depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_utils:MBEDTLS_PK_ECDSA:192:24:"ECDSA" - -RSA verify test vector #1 (good) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -pk_rsa_verify_test_vec:"206ef4bf396c6087f8229ef196fd35f37ccb8de5efcdb238f20d556668f114257a11fbe038464a67830378e62ae9791453953dac1dbd7921837ba98e84e856eb80ed9487e656d0b20c28c8ba5e35db1abbed83ed1c7720a97701f709e3547a4bfcabca9c89c57ad15c3996577a0ae36d7c7b699035242f37954646c1cd5c08ac":MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"5abc01f5de25b70867ff0c24e222c61f53c88daf42586fddcd56f3c4588f074be3c328056c063388688b6385a8167957c6e5355a510e005b8a851d69c96b36ec6036644078210e5d7d326f96365ee0648882921492bc7b753eb9c26cdbab37555f210df2ca6fec1b25b463d38b81c0dcea202022b04af5da58aa03d77be949b7":0 - -RSA verify test vector #2 (bad) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -pk_rsa_verify_test_vec:"d6248c3e96b1a7e5fea978870fcc4c9786b4e5156e16b7faef4557d667f730b8bc4c784ef00c624df5309513c3a5de8ca94c2152e0459618666d3148092562ebc256ffca45b27fd2d63c68bd5e0a0aefbe496e9e63838a361b1db6fc272464f191490bf9c029643c49d2d9cd08833b8a70b4b3431f56fb1eb55ccd39e77a9c92":MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"3203b7647fb7e345aa457681e5131777f1adc371f2fba8534928c4e52ef6206a856425d6269352ecbf64db2f6ad82397768cafdd8cd272e512d617ad67992226da6bc291c31404c17fd4b7e2beb20eff284a44f4d7af47fd6629e2c95809fa7f2241a04f70ac70d3271bb13258af1ed5c5988c95df7fa26603515791075feccd":MBEDTLS_ERR_RSA_VERIFY_FAILED - -ECDSA verify test vector #1 (good) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_ec_test_vec:MBEDTLS_PK_ECDSA:MBEDTLS_ECP_DP_SECP192R1:"046FDD3028FA94A863CD4F78DBFF8B3AA561FC6D9CCBBCA88E0AE6FA437F5415F957542D0717FF8B84562DAE99872EF841":"546869732073686F756C64206265207468652068617368206F662061206D6573736167652E00":"30350218185B2A7FB5CD9C9A8488B119B68B47D6EC833509CE9FA1FF021900FB7D259A744A2348BD45D241A39DC915B81CC2084100FA24":0 - -ECDSA verify test vector #2 (bad) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_ec_test_vec:MBEDTLS_PK_ECDSA:MBEDTLS_ECP_DP_SECP192R1:"046FDD3028FA94A863CD4F78DBFF8B3AA561FC6D9CCBBCA88E0AE6FA437F5415F957542D0717FF8B84562DAE99872EF841":"546869732073686F756C64206265207468652068617368206F662061206D6573736167652E00":"30350218185B2A7FB5CD9C9A8488B119B68B47D6EC833509CE9FA1FF021900FB7D259A744A2348BD45D241A39DC915B81CC2084100FA25":MBEDTLS_ERR_ECP_VERIFY_FAILED - -EC(DSA) verify test vector #1 (good) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_ec_test_vec:MBEDTLS_PK_ECKEY:MBEDTLS_ECP_DP_SECP192R1:"046FDD3028FA94A863CD4F78DBFF8B3AA561FC6D9CCBBCA88E0AE6FA437F5415F957542D0717FF8B84562DAE99872EF841":"546869732073686F756C64206265207468652068617368206F662061206D6573736167652E00":"30350218185B2A7FB5CD9C9A8488B119B68B47D6EC833509CE9FA1FF021900FB7D259A744A2348BD45D241A39DC915B81CC2084100FA24":0 - -EC(DSA) verify test vector #2 (bad) -depends_on:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_ec_test_vec:MBEDTLS_PK_ECKEY:MBEDTLS_ECP_DP_SECP192R1:"046FDD3028FA94A863CD4F78DBFF8B3AA561FC6D9CCBBCA88E0AE6FA437F5415F957542D0717FF8B84562DAE99872EF841":"546869732073686F756C64206265207468652068617368206F662061206D6573736167652E00":"30350218185B2A7FB5CD9C9A8488B119B68B47D6EC833509CE9FA1FF021900FB7D259A744A2348BD45D241A39DC915B81CC2084100FA25":MBEDTLS_ERR_ECP_VERIFY_FAILED - -ECDSA sign-verify -depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_sign_verify:MBEDTLS_PK_ECDSA:0:0 - -EC(DSA) sign-verify -depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_sign_verify:MBEDTLS_PK_ECKEY:0:0 - -EC_DH (no) sign-verify -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_sign_verify:MBEDTLS_PK_ECKEY_DH:MBEDTLS_ERR_PK_TYPE_MISMATCH:MBEDTLS_ERR_PK_TYPE_MISMATCH - -RSA sign-verify -depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_GENPRIME -pk_sign_verify:MBEDTLS_PK_RSA:0:0 - -RSA encrypt test vector -depends_on:MBEDTLS_PKCS1_V15 -pk_rsa_encrypt_test_vec:"4E636AF98E40F3ADCFCCB698F4E80B9F":2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"b0c0b193ba4a5b4502bfacd1a9c2697da5510f3e3ab7274cf404418afd2c62c89b98d83bbc21c8c1bf1afe6d8bf40425e053e9c03e03a3be0edbe1eda073fade1cc286cc0305a493d98fe795634c3cad7feb513edb742d66d910c87d07f6b0055c3488bb262b5fd1ce8747af64801fb39d2d3a3e57086ffe55ab8d0a2ca86975629a0f85767a4990c532a7c2dab1647997ebb234d0b28a0008bfebfc905e7ba5b30b60566a5e0190417465efdbf549934b8f0c5c9f36b7c5b6373a47ae553ced0608a161b1b70dfa509375cf7a3598223a6d7b7a1d1a06ac74d345a9bb7c0e44c8388858a4f1d8115f2bd769ffa69020385fa286302c80e950f9e2751308666c":0 - -RSA decrypt test vector #1 -depends_on:MBEDTLS_PKCS1_V15 -pk_rsa_decrypt_test_vec:"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"4E636AF98E40F3ADCFCCB698F4E80B9F":0 - -RSA decrypt test vector #2 -depends_on:MBEDTLS_PKCS1_V15 -pk_rsa_decrypt_test_vec:"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404feb284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"4E636AF98E40F3ADCFCCB698F4E80B9F":MBEDTLS_ERR_RSA_INVALID_PADDING - -EC nocrypt -depends_on:MBEDTLS_ECP_C -pk_ec_nocrypt:MBEDTLS_PK_ECKEY - -EC-DH nocrypt -depends_on:MBEDTLS_ECP_C -pk_ec_nocrypt:MBEDTLS_PK_ECKEY_DH - -ECDSA nocrypt -depends_on:MBEDTLS_ECDSA_C -pk_ec_nocrypt:MBEDTLS_PK_ECDSA - -RSA_ALT consistency -depends_on:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_GENPRIME -pk_rsa_alt: - -Verify ext RSA #1 (PKCS1 v2.1, salt_len = ANY, OK) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:0 - -Verify ext RSA #2 (PKCS1 v2.1, salt_len = ANY, wrong message) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616766":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:MBEDTLS_ERR_RSA_VERIFY_FAILED - -Verify ext RSA #3 (PKCS1 v2.1, salt_len = 0, OK) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"7fc506d26ca3b22922a1ce39faaedd273161b82d9443c56f1a034f131ae4a18cae1474271cb4b66a17d9707ca58b0bdbd3c406b7e65bbcc9bbbce94dc45de807b4989b23b3e4db74ca29298137837eb90cc83d3219249bc7d480fceaf075203a86e54c4ecfa4e312e39f8f69d76534089a36ed9049ca9cfd5ab1db1fa75fe5c8":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA256:0:0 - -Verify ext RSA #4 (PKCS1 v2.1, salt_len = max, OK) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA256:94:0 - -Verify ext RSA #5 (PKCS1 v2.1, wrong salt_len) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA256:32:MBEDTLS_ERR_RSA_INVALID_PADDING - -Verify ext RSA #6 (PKCS1 v2.1, MGF1 alg != MSG hash alg) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"c0719e9a8d5d838d861dc6f675c899d2b309a3a65bb9fe6b11e5afcbf9a2c0b1":MBEDTLS_MD_NONE:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:0 - -Verify ext RSA #7 (PKCS1 v2.1, wrong MGF1 alg != MSG hash alg) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C:MBEDTLS_SHA1_C -pk_rsa_verify_ext_test_vec:"c0719e9a8d5d838d861dc6f675c899d2b309a3a65bb9fe6b11e5afcbf9a2c0b1":MBEDTLS_MD_NONE:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:MBEDTLS_MD_SHA1:MBEDTLS_RSA_SALT_LEN_ANY:MBEDTLS_ERR_RSA_INVALID_PADDING - -Verify ext RSA #8 (PKCS1 v2.1, RSASSA-PSS without options) -depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSASSA_PSS:-1:MBEDTLS_RSA_SALT_LEN_ANY:MBEDTLS_ERR_PK_BAD_INPUT_DATA - -Verify ext RSA #9 (PKCS1 v2.1, RSA with options) -depends_on:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSA:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:MBEDTLS_ERR_PK_BAD_INPUT_DATA - -Verify ext RSA #10 (PKCS1 v2.1, RSA without options) -depends_on:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_RSA:-1:MBEDTLS_RSA_SALT_LEN_ANY:MBEDTLS_ERR_RSA_INVALID_PADDING - -Verify ext RSA #11 (PKCS1 v2.1, asking for ECDSA) -depends_on:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C -pk_rsa_verify_ext_test_vec:"54657374206d657373616765":MBEDTLS_MD_SHA256:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":MBEDTLS_PK_ECDSA:-1:MBEDTLS_RSA_SALT_LEN_ANY:MBEDTLS_ERR_PK_TYPE_MISMATCH - -Verify ext RSA #12 (PKCS1 v1.5, good) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -pk_rsa_verify_ext_test_vec:"206ef4bf396c6087f8229ef196fd35f37ccb8de5efcdb238f20d556668f114257a11fbe038464a67830378e62ae9791453953dac1dbd7921837ba98e84e856eb80ed9487e656d0b20c28c8ba5e35db1abbed83ed1c7720a97701f709e3547a4bfcabca9c89c57ad15c3996577a0ae36d7c7b699035242f37954646c1cd5c08ac":MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"5abc01f5de25b70867ff0c24e222c61f53c88daf42586fddcd56f3c4588f074be3c328056c063388688b6385a8167957c6e5355a510e005b8a851d69c96b36ec6036644078210e5d7d326f96365ee0648882921492bc7b753eb9c26cdbab37555f210df2ca6fec1b25b463d38b81c0dcea202022b04af5da58aa03d77be949b7":MBEDTLS_PK_RSA:-1:MBEDTLS_RSA_SALT_LEN_ANY:0 - -Check pair #1 (EC, OK) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_pk_check_pair:"data_files/ec_256_pub.pem":"data_files/ec_256_prv.pem":0 - -Check pair #2 (EC, bad) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_pk_check_pair:"data_files/ec_256_pub.pem":"data_files/server5.key":MBEDTLS_ERR_ECP_BAD_INPUT_DATA - -Check pair #3 (RSA, OK) -depends_on:MBEDTLS_RSA_C -mbedtls_pk_check_pair:"data_files/server1.pubkey":"data_files/server1.key":0 - -Check pair #4 (RSA, bad) -depends_on:MBEDTLS_RSA_C -mbedtls_pk_check_pair:"data_files/server1.pubkey":"data_files/server2.key":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -Check pair #5 (RSA vs EC) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_RSA_C -mbedtls_pk_check_pair:"data_files/ec_256_pub.pem":"data_files/server1.key":MBEDTLS_ERR_PK_TYPE_MISMATCH - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.function deleted file mode 100644 index 08a262346d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pk.function +++ /dev/null @@ -1,490 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/pk.h" - -/* For error codes */ -#include "mbedtls/ecp.h" -#include "mbedtls/rsa.h" - -static int rnd_std_rand( void *rng_state, unsigned char *output, size_t len ); - -#define RSA_KEY_SIZE 512 -#define RSA_KEY_LEN 64 - -static int pk_genkey( mbedtls_pk_context *pk ) -{ - ((void) pk); - -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_GENPRIME) - if( mbedtls_pk_get_type( pk ) == MBEDTLS_PK_RSA ) - return mbedtls_rsa_gen_key( mbedtls_pk_rsa( *pk ), rnd_std_rand, NULL, RSA_KEY_SIZE, 3 ); -#endif -#if defined(MBEDTLS_ECP_C) - if( mbedtls_pk_get_type( pk ) == MBEDTLS_PK_ECKEY || - mbedtls_pk_get_type( pk ) == MBEDTLS_PK_ECKEY_DH || - mbedtls_pk_get_type( pk ) == MBEDTLS_PK_ECDSA ) - { - int ret; - if( ( ret = mbedtls_ecp_group_load( &mbedtls_pk_ec( *pk )->grp, - MBEDTLS_ECP_DP_SECP192R1 ) ) != 0 ) - return( ret ); - - return mbedtls_ecp_gen_keypair( &mbedtls_pk_ec( *pk )->grp, &mbedtls_pk_ec( *pk )->d, - &mbedtls_pk_ec( *pk )->Q, rnd_std_rand, NULL ); - } -#endif - return( -1 ); -} - -#if defined(MBEDTLS_RSA_C) -int mbedtls_rsa_decrypt_func( void *ctx, int mode, size_t *olen, - const unsigned char *input, unsigned char *output, - size_t output_max_len ) -{ - return( mbedtls_rsa_pkcs1_decrypt( (mbedtls_rsa_context *) ctx, NULL, NULL, mode, olen, - input, output, output_max_len ) ); -} -int mbedtls_rsa_sign_func( void *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, - int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, - const unsigned char *hash, unsigned char *sig ) -{ - return( mbedtls_rsa_pkcs1_sign( (mbedtls_rsa_context *) ctx, f_rng, p_rng, mode, - md_alg, hashlen, hash, sig ) ); -} -size_t mbedtls_rsa_key_len_func( void *ctx ) -{ - return( ((const mbedtls_rsa_context *) ctx)->len ); -} -#endif /* MBEDTLS_RSA_C */ -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_PK_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void pk_utils( int type, int size, int len, char *name ) -{ - mbedtls_pk_context pk; - - mbedtls_pk_init( &pk ); - - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( type ) ) == 0 ); - TEST_ASSERT( pk_genkey( &pk ) == 0 ); - - TEST_ASSERT( (int) mbedtls_pk_get_type( &pk ) == type ); - TEST_ASSERT( mbedtls_pk_can_do( &pk, type ) ); - TEST_ASSERT( mbedtls_pk_get_bitlen( &pk ) == (unsigned) size ); - TEST_ASSERT( mbedtls_pk_get_len( &pk ) == (unsigned) len ); - TEST_ASSERT( strcmp( mbedtls_pk_get_name( &pk), name ) == 0 ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_PK_PARSE_C:MBEDTLS_FS_IO */ -void mbedtls_pk_check_pair( char *pub_file, char *prv_file, int ret ) -{ - mbedtls_pk_context pub, prv, alt; - - mbedtls_pk_init( &pub ); - mbedtls_pk_init( &prv ); - mbedtls_pk_init( &alt ); - - TEST_ASSERT( mbedtls_pk_parse_public_keyfile( &pub, pub_file ) == 0 ); - TEST_ASSERT( mbedtls_pk_parse_keyfile( &prv, prv_file, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_pk_check_pair( &pub, &prv ) == ret ); - -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PK_RSA_ALT_SUPPORT) - if( mbedtls_pk_get_type( &prv ) == MBEDTLS_PK_RSA ) - { - TEST_ASSERT( mbedtls_pk_setup_rsa_alt( &alt, mbedtls_pk_rsa( prv ), - mbedtls_rsa_decrypt_func, mbedtls_rsa_sign_func, mbedtls_rsa_key_len_func ) == 0 ); - TEST_ASSERT( mbedtls_pk_check_pair( &pub, &alt ) == ret ); - } -#endif - - mbedtls_pk_free( &pub ); - mbedtls_pk_free( &prv ); - mbedtls_pk_free( &alt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C */ -void pk_rsa_verify_test_vec( char *message_hex_string, int digest, - int mod, int radix_N, char *input_N, int radix_E, - char *input_E, char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - mbedtls_rsa_context *rsa; - mbedtls_pk_context pk; - int msg_len; - - mbedtls_pk_init( &pk ); - - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == 0 ); - rsa = mbedtls_pk_rsa( pk ); - - rsa->len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->E, radix_E, input_E ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - unhexify( result_str, result_hex_str ); - - if( mbedtls_md_info_from_type( digest ) != NULL ) - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) == 0 ); - - TEST_ASSERT( mbedtls_pk_verify( &pk, digest, hash_result, 0, - result_str, mbedtls_pk_get_len( &pk ) ) == result ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C */ -void pk_rsa_verify_ext_test_vec( char *message_hex_string, int digest, - int mod, int radix_N, char *input_N, int radix_E, - char *input_E, char *result_hex_str, - int pk_type, int mgf1_hash_id, int salt_len, - int result ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - mbedtls_rsa_context *rsa; - mbedtls_pk_context pk; - mbedtls_pk_rsassa_pss_options pss_opts; - void *options; - int msg_len; - size_t hash_len; - - mbedtls_pk_init( &pk ); - - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == 0 ); - rsa = mbedtls_pk_rsa( pk ); - - rsa->len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->E, radix_E, input_E ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - unhexify( result_str, result_hex_str ); - - if( digest != MBEDTLS_MD_NONE ) - { - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), - message_str, msg_len, hash_result ) == 0 ); - hash_len = 0; - } - else - { - memcpy( hash_result, message_str, msg_len ); - hash_len = msg_len; - } - - if( mgf1_hash_id < 0 ) - { - options = NULL; - } - else - { - options = &pss_opts; - - pss_opts.mgf1_hash_id = mgf1_hash_id; - pss_opts.expected_salt_len = salt_len; - } - - TEST_ASSERT( mbedtls_pk_verify_ext( pk_type, options, &pk, - digest, hash_result, hash_len, - result_str, mbedtls_pk_get_len( &pk ) ) == result ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_ECDSA_C */ -void pk_ec_test_vec( int type, int id, char *key_str, - char *hash_str, char * sig_str, int ret ) -{ - mbedtls_pk_context pk; - mbedtls_ecp_keypair *eckey; - unsigned char hash[100], sig[500], key[500]; - size_t hash_len, sig_len, key_len; - - mbedtls_pk_init( &pk ); - - memset( hash, 0, sizeof( hash ) ); hash_len = unhexify(hash, hash_str); - memset( sig, 0, sizeof( sig ) ); sig_len = unhexify(sig, sig_str); - memset( key, 0, sizeof( key ) ); key_len = unhexify(key, key_str); - - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( type ) ) == 0 ); - - TEST_ASSERT( mbedtls_pk_can_do( &pk, MBEDTLS_PK_ECDSA ) ); - eckey = mbedtls_pk_ec( pk ); - - TEST_ASSERT( mbedtls_ecp_group_load( &eckey->grp, id ) == 0 ); - TEST_ASSERT( mbedtls_ecp_point_read_binary( &eckey->grp, &eckey->Q, - key, key_len ) == 0 ); - - TEST_ASSERT( mbedtls_pk_verify( &pk, MBEDTLS_MD_NONE, - hash, hash_len, sig, sig_len ) == ret ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA256_C */ -void pk_sign_verify( int type, int sign_ret, int verify_ret ) -{ - mbedtls_pk_context pk; - unsigned char hash[50], sig[5000]; - size_t sig_len; - - mbedtls_pk_init( &pk ); - - memset( hash, 0x2a, sizeof hash ); - memset( sig, 0, sizeof sig ); - - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( type ) ) == 0 ); - TEST_ASSERT( pk_genkey( &pk ) == 0 ); - - TEST_ASSERT( mbedtls_pk_sign( &pk, MBEDTLS_MD_SHA256, hash, sizeof hash, - sig, &sig_len, rnd_std_rand, NULL ) == sign_ret ); - - TEST_ASSERT( mbedtls_pk_verify( &pk, MBEDTLS_MD_SHA256, - hash, sizeof hash, sig, sig_len ) == verify_ret ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C */ -void pk_rsa_encrypt_test_vec( char *message_hex, int mod, - int radix_N, char *input_N, - int radix_E, char *input_E, - char *result_hex, int ret ) -{ - unsigned char message[1000]; - unsigned char output[1000]; - unsigned char result[1000]; - size_t msg_len, olen, res_len; - rnd_pseudo_info rnd_info; - mbedtls_rsa_context *rsa; - mbedtls_pk_context pk; - - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - memset( message, 0, sizeof( message ) ); - memset( output, 0, sizeof( output ) ); - memset( result, 0, sizeof( result ) ); - - msg_len = unhexify( message, message_hex ); - res_len = unhexify( result, result_hex ); - - mbedtls_pk_init( &pk ); - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == 0 ); - rsa = mbedtls_pk_rsa( pk ); - - rsa->len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_pk_encrypt( &pk, message, msg_len, - output, &olen, sizeof( output ), - rnd_pseudo_rand, &rnd_info ) == ret ); - TEST_ASSERT( olen == res_len ); - TEST_ASSERT( memcmp( output, result, olen ) == 0 ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C */ -void pk_rsa_decrypt_test_vec( char *cipher_hex, int mod, - int radix_P, char *input_P, - int radix_Q, char *input_Q, - int radix_N, char *input_N, - int radix_E, char *input_E, - char *clear_hex, int ret ) -{ - unsigned char clear[1000]; - unsigned char output[1000]; - unsigned char cipher[1000]; - size_t clear_len, olen, cipher_len; - rnd_pseudo_info rnd_info; - mbedtls_mpi P1, Q1, H, G; - mbedtls_rsa_context *rsa; - mbedtls_pk_context pk; - - mbedtls_pk_init( &pk ); - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - memset( clear, 0, sizeof( clear ) ); - memset( cipher, 0, sizeof( cipher ) ); - - clear_len = unhexify( clear, clear_hex ); - cipher_len = unhexify( cipher, cipher_hex ); - - /* init pk-rsa context */ - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == 0 ); - rsa = mbedtls_pk_rsa( pk ); - - /* load public key */ - rsa->len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->E, radix_E, input_E ) == 0 ); - - /* load private key */ - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &rsa->Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &rsa->P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &rsa->Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &rsa->E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &rsa->D , &rsa->E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &rsa->DP, &rsa->D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &rsa->DQ, &rsa->D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &rsa->QP, &rsa->Q, &rsa->P ) == 0 ); - - /* decryption test */ - memset( output, 0, sizeof( output ) ); - olen = 0; - TEST_ASSERT( mbedtls_pk_decrypt( &pk, cipher, cipher_len, - output, &olen, sizeof( output ), - rnd_pseudo_rand, &rnd_info ) == ret ); - if( ret == 0 ) - { - TEST_ASSERT( olen == clear_len ); - TEST_ASSERT( memcmp( output, clear, olen ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void pk_ec_nocrypt( int type ) -{ - mbedtls_pk_context pk; - unsigned char output[100]; - unsigned char input[100]; - rnd_pseudo_info rnd_info; - size_t olen = 0; - int ret = MBEDTLS_ERR_PK_TYPE_MISMATCH; - - mbedtls_pk_init( &pk ); - - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - memset( output, 0, sizeof( output ) ); - memset( input, 0, sizeof( input ) ); - - TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( type ) ) == 0 ); - - TEST_ASSERT( mbedtls_pk_encrypt( &pk, input, sizeof( input ), - output, &olen, sizeof( output ), - rnd_pseudo_rand, &rnd_info ) == ret ); - - TEST_ASSERT( mbedtls_pk_decrypt( &pk, input, sizeof( input ), - output, &olen, sizeof( output ), - rnd_pseudo_rand, &rnd_info ) == ret ); - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C:MBEDTLS_PK_RSA_ALT_SUPPORT */ -void pk_rsa_alt( ) -{ - /* - * An rsa_alt context can only do private operations (decrypt, sign). - * Test it against the public operations (encrypt, verify) of a - * corresponding rsa context. - */ - mbedtls_rsa_context raw; - mbedtls_pk_context rsa, alt; - mbedtls_pk_debug_item dbg_items[10]; - unsigned char hash[50], sig[1000]; - unsigned char msg[50], ciph[1000], test[1000]; - size_t sig_len, ciph_len, test_len; - int ret = MBEDTLS_ERR_PK_TYPE_MISMATCH; - - mbedtls_rsa_init( &raw, MBEDTLS_RSA_PKCS_V15, MBEDTLS_MD_NONE ); - mbedtls_pk_init( &rsa ); mbedtls_pk_init( &alt ); - - memset( hash, 0x2a, sizeof hash ); - memset( sig, 0, sizeof sig ); - memset( msg, 0x2a, sizeof msg ); - memset( ciph, 0, sizeof ciph ); - memset( test, 0, sizeof test ); - - /* Initiliaze PK RSA context with random key */ - TEST_ASSERT( mbedtls_pk_setup( &rsa, - mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == 0 ); - TEST_ASSERT( pk_genkey( &rsa ) == 0 ); - - /* Extract key to the raw rsa context */ - TEST_ASSERT( mbedtls_rsa_copy( &raw, mbedtls_pk_rsa( rsa ) ) == 0 ); - - /* Initialize PK RSA_ALT context */ - TEST_ASSERT( mbedtls_pk_setup_rsa_alt( &alt, (void *) &raw, - mbedtls_rsa_decrypt_func, mbedtls_rsa_sign_func, mbedtls_rsa_key_len_func ) == 0 ); - - /* Test administrative functions */ - TEST_ASSERT( mbedtls_pk_can_do( &alt, MBEDTLS_PK_RSA ) ); - TEST_ASSERT( mbedtls_pk_get_bitlen( &alt ) == RSA_KEY_SIZE ); - TEST_ASSERT( mbedtls_pk_get_len( &alt ) == RSA_KEY_LEN ); - TEST_ASSERT( mbedtls_pk_get_type( &alt ) == MBEDTLS_PK_RSA_ALT ); - TEST_ASSERT( strcmp( mbedtls_pk_get_name( &alt ), "RSA-alt" ) == 0 ); - - /* Test signature */ - TEST_ASSERT( mbedtls_pk_sign( &alt, MBEDTLS_MD_NONE, hash, sizeof hash, - sig, &sig_len, rnd_std_rand, NULL ) == 0 ); - TEST_ASSERT( sig_len == RSA_KEY_LEN ); - TEST_ASSERT( mbedtls_pk_verify( &rsa, MBEDTLS_MD_NONE, - hash, sizeof hash, sig, sig_len ) == 0 ); - - /* Test decrypt */ - TEST_ASSERT( mbedtls_pk_encrypt( &rsa, msg, sizeof msg, - ciph, &ciph_len, sizeof ciph, - rnd_std_rand, NULL ) == 0 ); - TEST_ASSERT( mbedtls_pk_decrypt( &alt, ciph, ciph_len, - test, &test_len, sizeof test, - rnd_std_rand, NULL ) == 0 ); - TEST_ASSERT( test_len == sizeof msg ); - TEST_ASSERT( memcmp( test, msg, test_len ) == 0 ); - - /* Test forbidden operations */ - TEST_ASSERT( mbedtls_pk_encrypt( &alt, msg, sizeof msg, - ciph, &ciph_len, sizeof ciph, - rnd_std_rand, NULL ) == ret ); - TEST_ASSERT( mbedtls_pk_verify( &alt, MBEDTLS_MD_NONE, - hash, sizeof hash, sig, sig_len ) == ret ); - TEST_ASSERT( mbedtls_pk_debug( &alt, dbg_items ) == ret ); - -exit: - mbedtls_rsa_free( &raw ); - mbedtls_pk_free( &rsa ); mbedtls_pk_free( &alt ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.data deleted file mode 100644 index ac16beb8a5..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.data +++ /dev/null @@ -1,789 +0,0 @@ -RSAES-OAEP Encryption Test Vector Int -pkcs1_rsaes_oaep_encrypt:1024:16:"bbf82f090682ce9c2338ac2b9da871f7368d07eed41043a440d6b6f07454f51fb8dfbaaf035c02ab61ea48ceeb6fcd4876ed520d60e1ec4619719d8a5b8b807fafb8e0a3dfc737723ee6b4b7d93a2584ee6a649d060953748834b2454598394ee0aab12d7b61a51f527a9a41f6c1687fe2537298ca2a8f5946f8e5fd091dbdcb":16:"11":MBEDTLS_MD_SHA1:"d436e99569fd32a7c8a05bbc90d32c49":"aafd12f659cae63489b479e5076ddec2f06cb58f":"1253e04dc0a5397bb44a7ab87e9bf2a039a33d1e996fc82a94ccd30074c95df763722017069e5268da5d1c0b4f872cf653c11df82314a67968dfeae28def04bb6d84b1c31d654a1970e5783bd6eb96a024c2ca2f4a90fe9f2ef5c9c140e5bb48da9536ad8700c84fc9130adea74e558d51a74ddf85d8b50de96838d6063e0955":0 - -RSAES-OAEP Encryption Test Vector Data just fits -pkcs1_rsaes_oaep_encrypt:1024:16:"bbf82f090682ce9c2338ac2b9da871f7368d07eed41043a440d6b6f07454f51fb8dfbaaf035c02ab61ea48ceeb6fcd4876ed520d60e1ec4619719d8a5b8b807fafb8e0a3dfc737723ee6b4b7d93a2584ee6a649d060953748834b2454598394ee0aab12d7b61a51f527a9a41f6c1687fe2537298ca2a8f5946f8e5fd091dbdcb":16:"11":MBEDTLS_MD_SHA1:"d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd":"aafd12f659cae63489b479e5076ddec2f06cb58f":"3082f2288fff275213d53168f0a272573cff81837c249dc1f380a12ac124c8f217b700708a1ce7dce154265f31a126ebdd9ed3ef9145ae29124a25f4e65aa52c5a9ff34f6cf4de9ba937ae406dc7d1f277af4f6fb7ea73bfbab2bd397b6b2c53570e173ffcf3b9f0bb96837623a4f87bd81b41446c59e681a2f3da81239e9bdf":0 - -RSAES-OAEP Encryption Test Vector Data too long -pkcs1_rsaes_oaep_encrypt:1024:16:"bbf82f090682ce9c2338ac2b9da871f7368d07eed41043a440d6b6f07454f51fb8dfbaaf035c02ab61ea48ceeb6fcd4876ed520d60e1ec4619719d8a5b8b807fafb8e0a3dfc737723ee6b4b7d93a2584ee6a649d060953748834b2454598394ee0aab12d7b61a51f527a9a41f6c1687fe2537298ca2a8f5946f8e5fd091dbdcb":16:"11":MBEDTLS_MD_SHA1:"d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd00":"aafd12f659cae63489b479e5076ddec2f06cb58f":"1253e04dc0a5397bb44a7ab87e9bf2a039a33d1e996fc82a94ccd30074c95df763722017069e5268da5d1c0b4f872cf653c11df82314a67968dfeae28def04bb6d84b1c31d654a1970e5783bd6eb96a024c2ca2f4a90fe9f2ef5c9c140e5bb48da9536ad8700c84fc9130adea74e558d51a74ddf85d8b50de96838d6063e0955":MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSAES-OAEP Encryption Test Vector 1_1 -pkcs1_rsaes_oaep_encrypt:1024:16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"6628194e12073db03ba94cda9ef9532397d50dba79b987004afefe34":"18b776ea21069d69776a33e96bad48e1dda0a5ef":"354fe67b4a126d5d35fe36c777791a3f7ba13def484e2d3908aff722fad468fb21696de95d0be911c2d3174f8afcc201035f7b6d8e69402de5451618c21a535fa9d7bfc5b8dd9fc243f8cf927db31322d6e881eaa91a996170e657a05a266426d98c88003f8477c1227094a0d9fa1e8c4024309ce1ecccb5210035d47ac72e8a":0 - -RSAES-OAEP Encryption Test Vector 1_2 -pkcs1_rsaes_oaep_encrypt:1024:16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5":"0cc742ce4a9b7f32f951bcb251efd925fe4fe35f":"640db1acc58e0568fe5407e5f9b701dff8c3c91e716c536fc7fcec6cb5b71c1165988d4a279e1577d730fc7a29932e3f00c81515236d8d8e31017a7a09df4352d904cdeb79aa583adcc31ea698a4c05283daba9089be5491f67c1a4ee48dc74bbbe6643aef846679b4cb395a352d5ed115912df696ffe0702932946d71492b44":0 - -RSAES-OAEP Encryption Test Vector 1_3 -pkcs1_rsaes_oaep_encrypt:1024:16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"d94ae0832e6445ce42331cb06d531a82b1db4baad30f746dc916df24d4e3c2451fff59a6423eb0e1d02d4fe646cf699dfd818c6e97b051":"2514df4695755a67b288eaf4905c36eec66fd2fd":"423736ed035f6026af276c35c0b3741b365e5f76ca091b4e8c29e2f0befee603595aa8322d602d2e625e95eb81b2f1c9724e822eca76db8618cf09c5343503a4360835b5903bc637e3879fb05e0ef32685d5aec5067cd7cc96fe4b2670b6eac3066b1fcf5686b68589aafb7d629b02d8f8625ca3833624d4800fb081b1cf94eb":0 - -RSAES-OAEP Encryption Test Vector 1_4 -pkcs1_rsaes_oaep_encrypt:1024:16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"52e650d98e7f2a048b4f86852153b97e01dd316f346a19f67a85":"c4435a3e1a18a68b6820436290a37cefb85db3fb":"45ead4ca551e662c9800f1aca8283b0525e6abae30be4b4aba762fa40fd3d38e22abefc69794f6ebbbc05ddbb11216247d2f412fd0fba87c6e3acd888813646fd0e48e785204f9c3f73d6d8239562722dddd8771fec48b83a31ee6f592c4cfd4bc88174f3b13a112aae3b9f7b80e0fc6f7255ba880dc7d8021e22ad6a85f0755":0 - -RSAES-OAEP Encryption Test Vector 1_5 -pkcs1_rsaes_oaep_encrypt:1024:16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"8da89fd9e5f974a29feffb462b49180f6cf9e802":"b318c42df3be0f83fea823f5a7b47ed5e425a3b5":"36f6e34d94a8d34daacba33a2139d00ad85a9345a86051e73071620056b920e219005855a213a0f23897cdcd731b45257c777fe908202befdd0b58386b1244ea0cf539a05d5d10329da44e13030fd760dcd644cfef2094d1910d3f433e1c7c6dd18bc1f2df7f643d662fb9dd37ead9059190f4fa66ca39e869c4eb449cbdc439":0 - -RSAES-OAEP Encryption Test Vector 1_6 -pkcs1_rsaes_oaep_encrypt:1024:16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"26521050844271":"e4ec0982c2336f3a677f6a356174eb0ce887abc2":"42cee2617b1ecea4db3f4829386fbd61dafbf038e180d837c96366df24c097b4ab0fac6bdf590d821c9f10642e681ad05b8d78b378c0f46ce2fad63f74e0ad3df06b075d7eb5f5636f8d403b9059ca761b5c62bb52aa45002ea70baace08ded243b9d8cbd62a68ade265832b56564e43a6fa42ed199a099769742df1539e8255":0 - -RSAES-OAEP Encryption Test Vector 2_1 -pkcs1_rsaes_oaep_encrypt:1025:16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"8ff00caa605c702830634d9a6c3d42c652b58cf1d92fec570beee7":"8c407b5ec2899e5099c53e8ce793bf94e71b1782":"0181af8922b9fcb4d79d92ebe19815992fc0c1439d8bcd491398a0f4ad3a329a5bd9385560db532683c8b7da04e4b12aed6aacdf471c34c9cda891addcc2df3456653aa6382e9ae59b54455257eb099d562bbe10453f2b6d13c59c02e10f1f8abb5da0d0570932dacf2d0901db729d0fefcc054e70968ea540c81b04bcaefe720e":0 - -RSAES-OAEP Encryption Test Vector 2_2 -pkcs1_rsaes_oaep_encrypt:1025:16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"2d":"b600cf3c2e506d7f16778c910d3a8b003eee61d5":"018759ff1df63b2792410562314416a8aeaf2ac634b46f940ab82d64dbf165eee33011da749d4bab6e2fcd18129c9e49277d8453112b429a222a8471b070993998e758861c4d3f6d749d91c4290d332c7a4ab3f7ea35ff3a07d497c955ff0ffc95006b62c6d296810d9bfab024196c7934012c2df978ef299aba239940cba10245":0 - -RSAES-OAEP Encryption Test Vector 2_3 -pkcs1_rsaes_oaep_encrypt:1025:16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"74fc88c51bc90f77af9d5e9a4a70133d4b4e0b34da3c37c7ef8e":"a73768aeeaa91f9d8c1ed6f9d2b63467f07ccae3":"018802bab04c60325e81c4962311f2be7c2adce93041a00719c88f957575f2c79f1b7bc8ced115c706b311c08a2d986ca3b6a9336b147c29c6f229409ddec651bd1fdd5a0b7f610c9937fdb4a3a762364b8b3206b4ea485fd098d08f63d4aa8bb2697d027b750c32d7f74eaf5180d2e9b66b17cb2fa55523bc280da10d14be2053":0 - -RSAES-OAEP Encryption Test Vector 2_4 -pkcs1_rsaes_oaep_encrypt:1025:16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"a7eb2a5036931d27d4e891326d99692ffadda9bf7efd3e34e622c4adc085f721dfe885072c78a203b151739be540fa8c153a10f00a":"9a7b3b0e708bd96f8190ecab4fb9b2b3805a8156":"00a4578cbc176318a638fba7d01df15746af44d4f6cd96d7e7c495cbf425b09c649d32bf886da48fbaf989a2117187cafb1fb580317690e3ccd446920b7af82b31db5804d87d01514acbfa9156e782f867f6bed9449e0e9a2c09bcecc6aa087636965e34b3ec766f2fe2e43018a2fddeb140616a0e9d82e5331024ee0652fc7641":0 - -RSAES-OAEP Encryption Test Vector 2_5 -pkcs1_rsaes_oaep_encrypt:1025:16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"2ef2b066f854c33f3bdcbb5994a435e73d6c6c":"eb3cebbc4adc16bb48e88c8aec0e34af7f427fd3":"00ebc5f5fda77cfdad3c83641a9025e77d72d8a6fb33a810f5950f8d74c73e8d931e8634d86ab1246256ae07b6005b71b7f2fb98351218331ce69b8ffbdc9da08bbc9c704f876deb9df9fc2ec065cad87f9090b07acc17aa7f997b27aca48806e897f771d95141fe4526d8a5301b678627efab707fd40fbebd6e792a25613e7aec":0 - -RSAES-OAEP Encryption Test Vector 2_6 -pkcs1_rsaes_oaep_encrypt:1025:16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"8a7fb344c8b6cb2cf2ef1f643f9a3218f6e19bba89c0":"4c45cf4d57c98e3d6d2095adc51c489eb50dff84":"010839ec20c27b9052e55befb9b77e6fc26e9075d7a54378c646abdf51e445bd5715de81789f56f1803d9170764a9e93cb78798694023ee7393ce04bc5d8f8c5a52c171d43837e3aca62f609eb0aa5ffb0960ef04198dd754f57f7fbe6abf765cf118b4ca443b23b5aab266f952326ac4581100644325f8b721acd5d04ff14ef3a":0 - -RSAES-OAEP Encryption Example 3_1 -pkcs1_rsaes_oaep_encrypt:1026:16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"087820b569e8fa8d":"8ced6b196290805790e909074015e6a20b0c4894":"026a0485d96aebd96b4382085099b962e6a2bdec3d90c8db625e14372de85e2d5b7baab65c8faf91bb5504fb495afce5c988b3f6a52e20e1d6cbd3566c5cd1f2b8318bb542cc0ea25c4aab9932afa20760eaddec784396a07ea0ef24d4e6f4d37e5052a7a31e146aa480a111bbe926401307e00f410033842b6d82fe5ce4dfae80":0 - -RSAES-OAEP Encryption Example 3_2 -pkcs1_rsaes_oaep_encrypt:1026:16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"4653acaf171960b01f52a7be63a3ab21dc368ec43b50d82ec3781e04":"b4291d6567550848cc156967c809baab6ca507f0":"024db89c7802989be0783847863084941bf209d761987e38f97cb5f6f1bc88da72a50b73ebaf11c879c4f95df37b850b8f65d7622e25b1b889e80fe80baca2069d6e0e1d829953fc459069de98ea9798b451e557e99abf8fe3d9ccf9096ebbf3e5255d3b4e1c6d2ecadf067a359eea86405acd47d5e165517ccafd47d6dbee4bf5":0 - -RSAES-OAEP Encryption Example 3_3 -pkcs1_rsaes_oaep_encrypt:1026:16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"d94cd0e08fa404ed89":"ce8928f6059558254008badd9794fadcd2fd1f65":"0239bce681032441528877d6d1c8bb28aa3bc97f1df584563618995797683844ca86664732f4bed7a0aab083aaabfb7238f582e30958c2024e44e57043b97950fd543da977c90cdde5337d618442f99e60d7783ab59ce6dd9d69c47ad1e962bec22d05895cff8d3f64ed5261d92b2678510393484990ba3f7f06818ae6ffce8a3a":0 - -RSAES-OAEP Encryption Example 3_4 -pkcs1_rsaes_oaep_encrypt:1026:16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"6cc641b6b61e6f963974dad23a9013284ef1":"6e2979f52d6814a57d83b090054888f119a5b9a3":"02994c62afd76f498ba1fd2cf642857fca81f4373cb08f1cbaee6f025c3b512b42c3e8779113476648039dbe0493f9246292fac28950600e7c0f32edf9c81b9dec45c3bde0cc8d8847590169907b7dc5991ceb29bb0714d613d96df0f12ec5d8d3507c8ee7ae78dd83f216fa61de100363aca48a7e914ae9f42ddfbe943b09d9a0":0 - -RSAES-OAEP Encryption Example 3_5 -pkcs1_rsaes_oaep_encrypt:1026:16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"df5151832b61f4f25891fb4172f328d2eddf8371ffcfdbe997939295f30eca6918017cfda1153bf7a6af87593223":"2d760bfe38c59de34cdc8b8c78a38e66284a2d27":"0162042ff6969592a6167031811a239834ce638abf54fec8b99478122afe2ee67f8c5b18b0339805bfdbc5a4e6720b37c59cfba942464c597ff532a119821545fd2e59b114e61daf71820529f5029cf524954327c34ec5e6f5ba7efcc4de943ab8ad4ed787b1454329f70db798a3a8f4d92f8274e2b2948ade627ce8ee33e43c60":0 - -RSAES-OAEP Encryption Example 3_6 -pkcs1_rsaes_oaep_encrypt:1026:16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"3c3bad893c544a6d520ab022319188c8d504b7a788b850903b85972eaa18552e1134a7ad6098826254ff7ab672b3d8eb3158fac6d4cbaef1":"f174779c5fd3cfe007badcb7a36c9b55bfcfbf0e":"00112051e75d064943bc4478075e43482fd59cee0679de6893eec3a943daa490b9691c93dfc0464b6623b9f3dbd3e70083264f034b374f74164e1a00763725e574744ba0b9db83434f31df96f6e2a26f6d8eba348bd4686c2238ac07c37aac3785d1c7eea2f819fd91491798ed8e9cef5e43b781b0e0276e37c43ff9492d005730":0 - -RSAES-OAEP Encryption Example 4_1 -pkcs1_rsaes_oaep_encrypt:1027:16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"4a86609534ee434a6cbca3f7e962e76d455e3264c19f605f6e5ff6137c65c56d7fb344cd52bc93374f3d166c9f0c6f9c506bad19330972d2":"1cac19ce993def55f98203f6852896c95ccca1f3":"04cce19614845e094152a3fe18e54e3330c44e5efbc64ae16886cb1869014cc5781b1f8f9e045384d0112a135ca0d12e9c88a8e4063416deaae3844f60d6e96fe155145f4525b9a34431ca3766180f70e15a5e5d8e8b1a516ff870609f13f896935ced188279a58ed13d07114277d75c6568607e0ab092fd803a223e4a8ee0b1a8":0 - -RSAES-OAEP Encryption Example 4_2 -pkcs1_rsaes_oaep_encrypt:1027:16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"b0adc4f3fe11da59ce992773d9059943c03046497ee9d9f9a06df1166db46d98f58d27ec074c02eee6cbe2449c8b9fc5080c5c3f4433092512ec46aa793743c8":"f545d5897585e3db71aa0cb8da76c51d032ae963":"0097b698c6165645b303486fbf5a2a4479c0ee85889b541a6f0b858d6b6597b13b854eb4f839af03399a80d79bda6578c841f90d645715b280d37143992dd186c80b949b775cae97370e4ec97443136c6da484e970ffdb1323a20847821d3b18381de13bb49aaea66530c4a4b8271f3eae172cd366e07e6636f1019d2a28aed15e":0 - -RSAES-OAEP Encryption Example 4_3 -pkcs1_rsaes_oaep_encrypt:1027:16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"bf6d42e701707b1d0206b0c8b45a1c72641ff12889219a82bdea965b5e79a96b0d0163ed9d578ec9ada20f2fbcf1ea3c4089d83419ba81b0c60f3606da99":"ad997feef730d6ea7be60d0dc52e72eacbfdd275":"0301f935e9c47abcb48acbbe09895d9f5971af14839da4ff95417ee453d1fd77319072bb7297e1b55d7561cd9d1bb24c1a9a37c619864308242804879d86ebd001dce5183975e1506989b70e5a83434154d5cbfd6a24787e60eb0c658d2ac193302d1192c6e622d4a12ad4b53923bca246df31c6395e37702c6a78ae081fb9d065":0 - -RSAES-OAEP Encryption Example 4_4 -pkcs1_rsaes_oaep_encrypt:1027:16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"fb2ef112f5e766eb94019297934794f7be2f6fc1c58e":"136454df5730f73c807a7e40d8c1a312ac5b9dd3":"02d110ad30afb727beb691dd0cf17d0af1a1e7fa0cc040ec1a4ba26a42c59d0a796a2e22c8f357ccc98b6519aceb682e945e62cb734614a529407cd452bee3e44fece8423cc19e55548b8b994b849c7ecde4933e76037e1d0ce44275b08710c68e430130b929730ed77e09b015642c5593f04e4ffb9410798102a8e96ffdfe11e4":0 - -RSAES-OAEP Encryption Example 4_5 -pkcs1_rsaes_oaep_encrypt:1027:16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"28ccd447bb9e85166dabb9e5b7d1adadc4b9d39f204e96d5e440ce9ad928bc1c2284":"bca8057f824b2ea257f2861407eef63d33208681":"00dbb8a7439d90efd919a377c54fae8fe11ec58c3b858362e23ad1b8a44310799066b99347aa525691d2adc58d9b06e34f288c170390c5f0e11c0aa3645959f18ee79e8f2be8d7ac5c23d061f18dd74b8c5f2a58fcb5eb0c54f99f01a83247568292536583340948d7a8c97c4acd1e98d1e29dc320e97a260532a8aa7a758a1ec2":0 - -RSAES-OAEP Encryption Example 4_6 -pkcs1_rsaes_oaep_encrypt:1027:16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"f22242751ec6b1":"2e7e1e17f647b5ddd033e15472f90f6812f3ac4e":"00a5ffa4768c8bbecaee2db77e8f2eec99595933545520835e5ba7db9493d3e17cddefe6a5f567624471908db4e2d83a0fbee60608fc84049503b2234a07dc83b27b22847ad8920ff42f674ef79b76280b00233d2b51b8cb2703a9d42bfbc8250c96ec32c051e57f1b4ba528db89c37e4c54e27e6e64ac69635ae887d9541619a9":0 - -RSAES-OAEP Encryption Example 5_1 -pkcs1_rsaes_oaep_encrypt:1028:16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"af71a901e3a61d3132f0fc1fdb474f9ea6579257ffc24d164170145b3dbde8":"44c92e283f77b9499c603d963660c87d2f939461":"036046a4a47d9ed3ba9a89139c105038eb7492b05a5d68bfd53accff4597f7a68651b47b4a4627d927e485eed7b4566420e8b409879e5d606eae251d22a5df799f7920bfc117b992572a53b1263146bcea03385cc5e853c9a101c8c3e1bda31a519807496c6cb5e5efb408823a352b8fa0661fb664efadd593deb99fff5ed000e5":0 - -RSAES-OAEP Encryption Example 5_2 -pkcs1_rsaes_oaep_encrypt:1028:16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"a3b844a08239a8ac41605af17a6cfda4d350136585903a417a79268760519a4b4ac3303ec73f0f87cfb32399":"cb28f5860659fceee49c3eeafce625a70803bd32":"03d6eb654edce615bc59f455265ed4e5a18223cbb9be4e4069b473804d5de96f54dcaaa603d049c5d94aa1470dfcd2254066b7c7b61ff1f6f6770e3215c51399fd4e34ec5082bc48f089840ad04354ae66dc0f1bd18e461a33cc1258b443a2837a6df26759aa2302334986f87380c9cc9d53be9f99605d2c9a97da7b0915a4a7ad":0 - -RSAES-OAEP Encryption Example 5_3 -pkcs1_rsaes_oaep_encrypt:1028:16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"308b0ecbd2c76cb77fc6f70c5edd233fd2f20929d629f026953bb62a8f4a3a314bde195de85b5f816da2aab074d26cb6acddf323ae3b9c678ac3cf12fbdde7":"2285f40d770482f9a9efa2c72cb3ac55716dc0ca":"0770952181649f9f9f07ff626ff3a22c35c462443d905d456a9fd0bff43cac2ca7a9f554e9478b9acc3ac838b02040ffd3e1847de2e4253929f9dd9ee4044325a9b05cabb808b2ee840d34e15d105a3f1f7b27695a1a07a2d73fe08ecaaa3c9c9d4d5a89ff890d54727d7ae40c0ec1a8dd86165d8ee2c6368141016a48b55b6967":0 - -RSAES-OAEP Encryption Example 5_4 -pkcs1_rsaes_oaep_encrypt:1028:16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"15c5b9ee1185":"49fa45d3a78dd10dfd577399d1eb00af7eed5513":"0812b76768ebcb642d040258e5f4441a018521bd96687e6c5e899fcd6c17588ff59a82cc8ae03a4b45b31299af1788c329f7dcd285f8cf4ced82606b97612671a45bedca133442144d1617d114f802857f0f9d739751c57a3f9ee400912c61e2e6992be031a43dd48fa6ba14eef7c422b5edc4e7afa04fdd38f402d1c8bb719abf":0 - -RSAES-OAEP Encryption Example 5_5 -pkcs1_rsaes_oaep_encrypt:1028:16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"21026e6800c7fa728fcaaba0d196ae28d7a2ac4ffd8abce794f0985f60c8a6737277365d3fea11db8923a2029a":"f0287413234cc5034724a094c4586b87aff133fc":"07b60e14ec954bfd29e60d0047e789f51d57186c63589903306793ced3f68241c743529aba6a6374f92e19e0163efa33697e196f7661dfaaa47aac6bde5e51deb507c72c589a2ca1693d96b1460381249b2cdb9eac44769f2489c5d3d2f99f0ee3c7ee5bf64a5ac79c42bd433f149be8cb59548361640595513c97af7bc2509723":0 - -RSAES-OAEP Encryption Example 5_6 -pkcs1_rsaes_oaep_encrypt:1028:16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"541e37b68b6c8872b84c02":"d9fba45c96f21e6e26d29eb2cdcb6585be9cb341":"08c36d4dda33423b2ed6830d85f6411ba1dcf470a1fae0ebefee7c089f256cef74cb96ea69c38f60f39abee44129bcb4c92de7f797623b20074e3d9c2899701ed9071e1efa0bdd84d4c3e5130302d8f0240baba4b84a71cc032f2235a5ff0fae277c3e8f9112bef44c9ae20d175fc9a4058bfc930ba31b02e2e4f444483710f24a":0 - -RSAES-OAEP Encryption Example 6_1 -pkcs1_rsaes_oaep_encrypt:1029:16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"4046ca8baa3347ca27f49e0d81f9cc1d71be9ba517d4":"dd0f6cfe415e88e5a469a51fbba6dfd40adb4384":"0630eebcd2856c24f798806e41f9e67345eda9ceda386acc9facaea1eeed06ace583709718d9d169fadf414d5c76f92996833ef305b75b1e4b95f662a20faedc3bae0c4827a8bf8a88edbd57ec203a27a841f02e43a615bab1a8cac0701de34debdef62a088089b55ec36ea7522fd3ec8d06b6a073e6df833153bc0aefd93bd1a3":0 - -RSAES-OAEP Encryption Example 6_2 -pkcs1_rsaes_oaep_encrypt:1029:16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"5cc72c60231df03b3d40f9b57931bc31109f972527f28b19e7480c7288cb3c92b22512214e4be6c914792ddabdf57faa8aa7":"8d14bd946a1351148f5cae2ed9a0c653e85ebd85":"0ebc37376173a4fd2f89cc55c2ca62b26b11d51c3c7ce49e8845f74e7607317c436bc8d23b9667dfeb9d087234b47bc6837175ae5c0559f6b81d7d22416d3e50f4ac533d8f0812f2db9e791fe9c775ac8b6ad0f535ad9ceb23a4a02014c58ab3f8d3161499a260f39348e714ae2a1d3443208fd8b722ccfdfb393e98011f99e63f":0 - -RSAES-OAEP Encryption Example 6_3 -pkcs1_rsaes_oaep_encrypt:1029:16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"b20e651303092f4bccb43070c0f86d23049362ed96642fc5632c27db4a52e3d831f2ab068b23b149879c002f6bf3feee97591112562c":"6c075bc45520f165c0bf5ea4c5df191bc9ef0e44":"0a98bf1093619394436cf68d8f38e2f158fde8ea54f3435f239b8d06b8321844202476aeed96009492480ce3a8d705498c4c8c68f01501dc81db608f60087350c8c3b0bd2e9ef6a81458b7c801b89f2e4fe99d4900ba6a4b5e5a96d865dc676c7755928794130d6280a8160a190f2df3ea7cf9aa0271d88e9e6905ecf1c5152d65":0 - -RSAES-OAEP Encryption Example 6_4 -pkcs1_rsaes_oaep_encrypt:1029:16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"684e3038c5c041f7":"3bbc3bd6637dfe12846901029bf5b0c07103439c":"008e7a67cacfb5c4e24bec7dee149117f19598ce8c45808fef88c608ff9cd6e695263b9a3c0ad4b8ba4c95238e96a8422b8535629c8d5382374479ad13fa39974b242f9a759eeaf9c83ad5a8ca18940a0162ba755876df263f4bd50c6525c56090267c1f0e09ce0899a0cf359e88120abd9bf893445b3cae77d3607359ae9a52f8":0 - -RSAES-OAEP Encryption Example 6_5 -pkcs1_rsaes_oaep_encrypt:1029:16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"32488cb262d041d6e4dd35f987bf3ca696db1f06ac29a44693":"b46b41893e8bef326f6759383a83071dae7fcabc":"00003474416c7b68bdf961c385737944d7f1f40cb395343c693cc0b4fe63b31fedf1eaeeac9ccc0678b31dc32e0977489514c4f09085f6298a9653f01aea4045ff582ee887be26ae575b73eef7f3774921e375a3d19adda0ca31aa1849887c1f42cac9677f7a2f4e923f6e5a868b38c084ef187594dc9f7f048fea2e02955384ab":0 - -RSAES-OAEP Encryption Example 6_6 -pkcs1_rsaes_oaep_encrypt:1029:16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"50ba14be8462720279c306ba":"0a2403312a41e3d52f060fbc13a67de5cf7609a7":"0a026dda5fc8785f7bd9bf75327b63e85e2c0fdee5dadb65ebdcac9ae1de95c92c672ab433aa7a8e69ce6a6d8897fac4ac4a54de841ae5e5bbce7687879d79634cea7a30684065c714d52409b928256bbf53eabcd5231eb7259504537399bd29164b726d33a46da701360a4168a091ccab72d44a62fed246c0ffea5b1348ab5470":0 - -RSAES-OAEP Encryption Example 7_1 -pkcs1_rsaes_oaep_encrypt:1030:16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"47aae909":"43dd09a07ff4cac71caa4632ee5e1c1daee4cd8f":"1688e4ce7794bba6cb7014169ecd559cede2a30b56a52b68d9fe18cf1973ef97b2a03153951c755f6294aa49adbdb55845ab6875fb3986c93ecf927962840d282f9e54ce8b690f7c0cb8bbd73440d9571d1b16cd9260f9eab4783cc482e5223dc60973871783ec27b0ae0fd47732cbc286a173fc92b00fb4ba6824647cd93c85c1":0 - -RSAES-OAEP Encryption Example 7_2 -pkcs1_rsaes_oaep_encrypt:1030:16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"1d9b2e2223d9bc13bfb9f162ce735db48ba7c68f6822a0a1a7b6ae165834e7":"3a9c3cec7b84f9bd3adecbc673ec99d54b22bc9b":"1052ed397b2e01e1d0ee1c50bf24363f95e504f4a03434a08fd822574ed6b9736edbb5f390db10321479a8a139350e2bd4977c3778ef331f3e78ae118b268451f20a2f01d471f5d53c566937171b2dbc2d4bde459a5799f0372d6574239b2323d245d0bb81c286b63c89a361017337e4902f88a467f4c7f244bfd5ab46437ff3b6":0 - -RSAES-OAEP Encryption Example 7_3 -pkcs1_rsaes_oaep_encrypt:1030:16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"d976fc":"76a75e5b6157a556cf8884bb2e45c293dd545cf5":"2155cd843ff24a4ee8badb7694260028a490813ba8b369a4cbf106ec148e5298707f5965be7d101c1049ea8584c24cd63455ad9c104d686282d3fb803a4c11c1c2e9b91c7178801d1b6640f003f5728df007b8a4ccc92bce05e41a27278d7c85018c52414313a5077789001d4f01910b72aad05d220aa14a58733a7489bc54556b":0 - -RSAES-OAEP Encryption Example 7_4 -pkcs1_rsaes_oaep_encrypt:1030:16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"d4738623df223aa43843df8467534c41d013e0c803c624e263666b239bde40a5f29aeb8de79e3daa61dd0370f49bd4b013834b98212aef6b1c5ee373b3cb":"7866314a6ad6f2b250a35941db28f5864b585859":"0ab14c373aeb7d4328d0aaad8c094d88b9eb098b95f21054a29082522be7c27a312878b637917e3d819e6c3c568db5d843802b06d51d9e98a2be0bf40c031423b00edfbff8320efb9171bd2044653a4cb9c5122f6c65e83cda2ec3c126027a9c1a56ba874d0fea23f380b82cf240b8cf540004758c4c77d934157a74f3fc12bfac":0 - -RSAES-OAEP Encryption Example 7_5 -pkcs1_rsaes_oaep_encrypt:1030:16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"bb47231ca5ea1d3ad46c99345d9a8a61":"b2166ed472d58db10cab2c6b000cccf10a7dc509":"028387a318277434798b4d97f460068df5298faba5041ba11761a1cb7316b24184114ec500257e2589ed3b607a1ebbe97a6cc2e02bf1b681f42312a33b7a77d8e7855c4a6de03e3c04643f786b91a264a0d6805e2cea91e68177eb7a64d9255e4f27e713b7ccec00dc200ebd21c2ea2bb890feae4942df941dc3f97890ed347478":0 - -RSAES-OAEP Encryption Example 7_6 -pkcs1_rsaes_oaep_encrypt:1030:16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"2184827095d35c3f86f600e8e59754013296":"52673bde2ca166c2aa46131ac1dc808d67d7d3b1":"14c678a94ad60525ef39e959b2f3ba5c097a94ff912b67dbace80535c187abd47d075420b1872152bba08f7fc31f313bbf9273c912fc4c0149a9b0cfb79807e346eb332069611bec0ff9bcd168f1f7c33e77313cea454b94e2549eecf002e2acf7f6f2d2845d4fe0aab2e5a92ddf68c480ae11247935d1f62574842216ae674115":0 - -RSAES-OAEP Encryption Example 8_1 -pkcs1_rsaes_oaep_encrypt:1031:16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"050b755e5e6880f7b9e9d692a74c37aae449b31bfea6deff83747a897f6c2c825bb1adbf850a3c96994b5de5b33cbc7d4a17913a7967":"7706ffca1ecfb1ebee2a55e5c6e24cd2797a4125":"09b3683d8a2eb0fb295b62ed1fb9290b714457b7825319f4647872af889b30409472020ad12912bf19b11d4819f49614824ffd84d09c0a17e7d17309d12919790410aa2995699f6a86dbe3242b5acc23af45691080d6b1ae810fb3e3057087f0970092ce00be9562ff4053b6262ce0caa93e13723d2e3a5ba075d45f0d61b54b61":0 - -RSAES-OAEP Encryption Example 8_2 -pkcs1_rsaes_oaep_encrypt:1031:16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"4eb68dcd93ca9b19df111bd43608f557026fe4aa1d5cfac227a3eb5ab9548c18a06dded23f81825986b2fcd71109ecef7eff88873f075c2aa0c469f69c92bc":"a3717da143b4dcffbc742665a8fa950585548343":"2ecf15c97c5a15b1476ae986b371b57a24284f4a162a8d0c8182e7905e792256f1812ba5f83f1f7a130e42dcc02232844edc14a31a68ee97ae564a383a3411656424c5f62ddb646093c367be1fcda426cf00a06d8acb7e57776fbbd855ac3df506fc16b1d7c3f2110f3d8068e91e186363831c8409680d8da9ecd8cf1fa20ee39d":0 - -RSAES-OAEP Encryption Example 8_3 -pkcs1_rsaes_oaep_encrypt:1031:16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"8604ac56328c1ab5ad917861":"ee06209073cca026bb264e5185bf8c68b7739f86":"4bc89130a5b2dabb7c2fcf90eb5d0eaf9e681b7146a38f3173a3d9cfec52ea9e0a41932e648a9d69344c50da763f51a03c95762131e8052254dcd2248cba40fd31667786ce05a2b7b531ac9dac9ed584a59b677c1a8aed8c5d15d68c05569e2be780bf7db638fd2bfd2a85ab276860f3777338fca989ffd743d13ee08e0ca9893f":0 - -RSAES-OAEP Encryption Example 8_4 -pkcs1_rsaes_oaep_encrypt:1031:16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"fdda5fbf6ec361a9d9a4ac68af216a0686f438b1e0e5c36b955f74e107f39c0dddcc":"990ad573dc48a973235b6d82543618f2e955105d":"2e456847d8fc36ff0147d6993594b9397227d577752c79d0f904fcb039d4d812fea605a7b574dd82ca786f93752348438ee9f5b5454985d5f0e1699e3e7ad175a32e15f03deb042ab9fe1dd9db1bb86f8c089ccb45e7ef0c5ee7ca9b7290ca6b15bed47039788a8a93ff83e0e8d6244c71006362deef69b6f416fb3c684383fbd0":0 - -RSAES-OAEP Encryption Example 8_5 -pkcs1_rsaes_oaep_encrypt:1031:16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"4a5f4914bee25de3c69341de07":"ecc63b28f0756f22f52ac8e6ec1251a6ec304718":"1fb9356fd5c4b1796db2ebf7d0d393cc810adf6145defc2fce714f79d93800d5e2ac211ea8bbecca4b654b94c3b18b30dd576ce34dc95436ef57a09415645923359a5d7b4171ef22c24670f1b229d3603e91f76671b7df97e7317c97734476d5f3d17d21cf82b5ba9f83df2e588d36984fd1b584468bd23b2e875f32f68953f7b2":0 - -RSAES-OAEP Encryption Example 8_6 -pkcs1_rsaes_oaep_encrypt:1031:16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"8e07d66f7b880a72563abcd3f35092bc33409fb7f88f2472be":"3925c71b362d40a0a6de42145579ba1e7dd459fc":"3afd9c6600147b21798d818c655a0f4c9212db26d0b0dfdc2a7594ccb3d22f5bf1d7c3e112cd73fc7d509c7a8bafdd3c274d1399009f9609ec4be6477e453f075aa33db382870c1c3409aef392d7386ae3a696b99a94b4da0589447e955d16c98b17602a59bd736279fcd8fb280c4462d590bfa9bf13fed570eafde97330a2c210":0 - -RSAES-OAEP Encryption Example 9_1 -pkcs1_rsaes_oaep_encrypt:1536:16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"f735fd55ba92592c3b52b8f9c4f69aaa1cbef8fe88add095595412467f9cf4ec0b896c59eda16210e7549c8abb10cdbc21a12ec9b6b5b8fd2f10399eb6":"8ec965f134a3ec9931e92a1ca0dc8169d5ea705c":"267bcd118acab1fc8ba81c85d73003cb8610fa55c1d97da8d48a7c7f06896a4db751aa284255b9d36ad65f37653d829f1b37f97b8001942545b2fc2c55a7376ca7a1be4b1760c8e05a33e5aa2526b8d98e317088e7834c755b2a59b12631a182c05d5d43ab1779264f8456f515ce57dfdf512d5493dab7b7338dc4b7d78db9c091ac3baf537a69fc7f549d979f0eff9a94fda4169bd4d1d19a69c99e33c3b55490d501b39b1edae118ff6793a153261584d3a5f39f6e682e3d17c8cd1261fa72":0 - -RSAES-OAEP Encryption Example 9_2 -pkcs1_rsaes_oaep_encrypt:1536:16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"81b906605015a63aabe42ddf11e1978912f5404c7474b26dce3ed482bf961ecc818bf420c54659":"ecb1b8b25fa50cdab08e56042867f4af5826d16c":"93ac9f0671ec29acbb444effc1a5741351d60fdb0e393fbf754acf0de49761a14841df7772e9bc82773966a1584c4d72baea00118f83f35cca6e537cbd4d811f5583b29783d8a6d94cd31be70d6f526c10ff09c6fa7ce069795a3fcd0511fd5fcb564bcc80ea9c78f38b80012539d8a4ddf6fe81e9cddb7f50dbbbbcc7e5d86097ccf4ec49189fb8bf318be6d5a0715d516b49af191258cd32dc833ce6eb4673c03a19bbace88cc54895f636cc0c1ec89096d11ce235a265ca1764232a689ae8":0 - -RSAES-OAEP Encryption Example 9_3 -pkcs1_rsaes_oaep_encrypt:1536:16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"fd326429df9b890e09b54b18b8f34f1e24":"e89bb032c6ce622cbdb53bc9466014ea77f777c0":"81ebdd95054b0c822ef9ad7693f5a87adfb4b4c4ce70df2df84ed49c04da58ba5fc20a19e1a6e8b7a3900b22796dc4e869ee6b42792d15a8eceb56c09c69914e813cea8f6931e4b8ed6f421af298d595c97f4789c7caa612c7ef360984c21b93edc5401068b5af4c78a8771b984d53b8ea8adf2f6a7d4a0ba76c75e1dd9f658f20ded4a46071d46d7791b56803d8fea7f0b0f8e41ae3f09383a6f9585fe7753eaaffd2bf94563108beecc207bbb535f5fcc705f0dde9f708c62f49a9c90371d3":0 - -RSAES-OAEP Encryption Example 9_4 -pkcs1_rsaes_oaep_encrypt:1536:16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"f1459b5f0c92f01a0f723a2e5662484d8f8c0a20fc29dad6acd43bb5f3effdf4e1b63e07fdfe6628d0d74ca19bf2d69e4a0abf86d293925a796772f8088e":"606f3b99c0b9ccd771eaa29ea0e4c884f3189ccc":"bcc35f94cde66cb1136625d625b94432a35b22f3d2fa11a613ff0fca5bd57f87b902ccdc1cd0aebcb0715ee869d1d1fe395f6793003f5eca465059c88660d446ff5f0818552022557e38c08a67ead991262254f10682975ec56397768537f4977af6d5f6aaceb7fb25dec5937230231fd8978af49119a29f29e424ab8272b47562792d5c94f774b8829d0b0d9f1a8c9eddf37574d5fa248eefa9c5271fc5ec2579c81bdd61b410fa61fe36e424221c113addb275664c801d34ca8c6351e4a858":0 - -RSAES-OAEP Encryption Example 9_5 -pkcs1_rsaes_oaep_encrypt:1536:16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"53e6e8c729d6f9c319dd317e74b0db8e4ccca25f3c8305746e137ac63a63ef3739e7b595abb96e8d55e54f7bd41ab433378ffb911d":"fcbc421402e9ecabc6082afa40ba5f26522c840e":"232afbc927fa08c2f6a27b87d4a5cb09c07dc26fae73d73a90558839f4fd66d281b87ec734bce237ba166698ed829106a7de6942cd6cdce78fed8d2e4d81428e66490d036264cef92af941d3e35055fe3981e14d29cbb9a4f67473063baec79a1179f5a17c9c1832f2838fd7d5e59bb9659d56dce8a019edef1bb3accc697cc6cc7a778f60a064c7f6f5d529c6210262e003de583e81e3167b89971fb8c0e15d44fffef89b53d8d64dd797d159b56d2b08ea5307ea12c241bd58d4ee278a1f2e":0 - -RSAES-OAEP Encryption Example 9_6 -pkcs1_rsaes_oaep_encrypt:1536:16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"b6b28ea2198d0c1008bc64":"23aade0e1e08bb9b9a78d2302a52f9c21b2e1ba2":"438cc7dc08a68da249e42505f8573ba60e2c2773d5b290f4cf9dff718e842081c383e67024a0f29594ea987b9d25e4b738f285970d195abb3a8c8054e3d79d6b9c9a8327ba596f1259e27126674766907d8d582ff3a8476154929adb1e6d1235b2ccb4ec8f663ba9cc670a92bebd853c8dbf69c6436d016f61add836e94732450434207f9fd4c43dec2a12a958efa01efe2669899b5e604c255c55fb7166de5589e369597bb09168c06dd5db177e06a1740eb2d5c82faeca6d92fcee9931ba9f":0 - -RSAES-OAEP Encryption Example 10_1 -pkcs1_rsaes_oaep_encrypt:2048:16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"8bba6bf82a6c0f86d5f1756e97956870b08953b06b4eb205bc1694ee":"47e1ab7119fee56c95ee5eaad86f40d0aa63bd33":"53ea5dc08cd260fb3b858567287fa91552c30b2febfba213f0ae87702d068d19bab07fe574523dfb42139d68c3c5afeee0bfe4cb7969cbf382b804d6e61396144e2d0e60741f8993c3014b58b9b1957a8babcd23af854f4c356fb1662aa72bfcc7e586559dc4280d160c126785a723ebeebeff71f11594440aaef87d10793a8774a239d4a04c87fe1467b9daf85208ec6c7255794a96cc29142f9a8bd418e3c1fd67344b0cd0829df3b2bec60253196293c6b34d3f75d32f213dd45c6273d505adf4cced1057cb758fc26aeefa441255ed4e64c199ee075e7f16646182fdb464739b68ab5daff0e63e9552016824f054bf4d3c8c90a97bb6b6553284eb429fcc":0 - -RSAES-OAEP Encryption Example 10_2 -pkcs1_rsaes_oaep_encrypt:2048:16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"e6ad181f053b58a904f2457510373e57":"6d17f5b4c1ffac351d195bf7b09d09f09a4079cf":"a2b1a430a9d657e2fa1c2bb5ed43ffb25c05a308fe9093c01031795f5874400110828ae58fb9b581ce9dddd3e549ae04a0985459bde6c626594e7b05dc4278b2a1465c1368408823c85e96dc66c3a30983c639664fc4569a37fe21e5a195b5776eed2df8d8d361af686e750229bbd663f161868a50615e0c337bec0ca35fec0bb19c36eb2e0bbcc0582fa1d93aacdb061063f59f2ce1ee43605e5d89eca183d2acdfe9f81011022ad3b43a3dd417dac94b4e11ea81b192966e966b182082e71964607b4f8002f36299844a11f2ae0faeac2eae70f8f4f98088acdcd0ac556e9fccc511521908fad26f04c64201450305778758b0538bf8b5bb144a828e629795":0 - -RSAES-OAEP Encryption Example 10_3 -pkcs1_rsaes_oaep_encrypt:2048:16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"510a2cf60e866fa2340553c94ea39fbc256311e83e94454b4124":"385387514deccc7c740dd8cdf9daee49a1cbfd54":"9886c3e6764a8b9a84e84148ebd8c3b1aa8050381a78f668714c16d9cfd2a6edc56979c535d9dee3b44b85c18be8928992371711472216d95dda98d2ee8347c9b14dffdff84aa48d25ac06f7d7e65398ac967b1ce90925f67dce049b7f812db0742997a74d44fe81dbe0e7a3feaf2e5c40af888d550ddbbe3bc20657a29543f8fc2913b9bd1a61b2ab2256ec409bbd7dc0d17717ea25c43f42ed27df8738bf4afc6766ff7aff0859555ee283920f4c8a63c4a7340cbafddc339ecdb4b0515002f96c932b5b79167af699c0ad3fccfdf0f44e85a70262bf2e18fe34b850589975e867ff969d48eabf212271546cdc05a69ecb526e52870c836f307bd798780ede":0 - -RSAES-OAEP Encryption Example 10_4 -pkcs1_rsaes_oaep_encrypt:2048:16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"bcdd190da3b7d300df9a06e22caae2a75f10c91ff667b7c16bde8b53064a2649a94045c9":"5caca6a0f764161a9684f85d92b6e0ef37ca8b65":"6318e9fb5c0d05e5307e1683436e903293ac4642358aaa223d7163013aba87e2dfda8e60c6860e29a1e92686163ea0b9175f329ca3b131a1edd3a77759a8b97bad6a4f8f4396f28cf6f39ca58112e48160d6e203daa5856f3aca5ffed577af499408e3dfd233e3e604dbe34a9c4c9082de65527cac6331d29dc80e0508a0fa7122e7f329f6cca5cfa34d4d1da417805457e008bec549e478ff9e12a763c477d15bbb78f5b69bd57830fc2c4ed686d79bc72a95d85f88134c6b0afe56a8ccfbc855828bb339bd17909cf1d70de3335ae07039093e606d655365de6550b872cd6de1d440ee031b61945f629ad8a353b0d40939e96a3c450d2a8d5eee9f678093c8":0 - -RSAES-OAEP Encryption Example 10_5 -pkcs1_rsaes_oaep_encrypt:2048:16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"a7dd6c7dc24b46f9dd5f1e91ada4c3b3df947e877232a9":"95bca9e3859894b3dd869fa7ecd5bbc6401bf3e4":"75290872ccfd4a4505660d651f56da6daa09ca1301d890632f6a992f3d565cee464afded40ed3b5be9356714ea5aa7655f4a1366c2f17c728f6f2c5a5d1f8e28429bc4e6f8f2cff8da8dc0e0a9808e45fd09ea2fa40cb2b6ce6ffff5c0e159d11b68d90a85f7b84e103b09e682666480c657505c0929259468a314786d74eab131573cf234bf57db7d9e66cc6748192e002dc0deea930585f0831fdcd9bc33d51f79ed2ffc16bcf4d59812fcebcaa3f9069b0e445686d644c25ccf63b456ee5fa6ffe96f19cdf751fed9eaf35957754dbf4bfea5216aa1844dc507cb2d080e722eba150308c2b5ff1193620f1766ecf4481bafb943bd292877f2136ca494aba0":0 - -RSAES-OAEP Encryption Example 10_6 -pkcs1_rsaes_oaep_encrypt:2048:16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"eaf1a73a1b0c4609537de69cd9228bbcfb9a8ca8c6c3efaf056fe4a7f4634ed00b7c39ec6922d7b8ea2c04ebac":"9f47ddf42e97eea856a9bdbc714eb3ac22f6eb32":"2d207a73432a8fb4c03051b3f73b28a61764098dfa34c47a20995f8115aa6816679b557e82dbee584908c6e69782d7deb34dbd65af063d57fca76a5fd069492fd6068d9984d209350565a62e5c77f23038c12cb10c6634709b547c46f6b4a709bd85ca122d74465ef97762c29763e06dbc7a9e738c78bfca0102dc5e79d65b973f28240caab2e161a78b57d262457ed8195d53e3c7ae9da021883c6db7c24afdd2322eac972ad3c354c5fcef1e146c3a0290fb67adf007066e00428d2cec18ce58f9328698defef4b2eb5ec76918fde1c198cbb38b7afc67626a9aefec4322bfd90d2563481c9a221f78c8272c82d1b62ab914e1c69f6af6ef30ca5260db4a46":0 - -RSAES-OAEP Decryption Test Vector Int -pkcs1_rsaes_oaep_decrypt:1024:16:"eecfae81b1b9b3c908810b10a1b5600199eb9f44aef4fda493b81a9e3d84f632124ef0236e5d1e3b7e28fae7aa040a2d5b252176459d1f397541ba2a58fb6599":16:"c97fb1f027f453f6341233eaaad1d9353f6c42d08866b1d05a0f2035028b9d869840b41666b42e92ea0da3b43204b5cfce3352524d0416a5a441e700af461503":16:"bbf82f090682ce9c2338ac2b9da871f7368d07eed41043a440d6b6f07454f51fb8dfbaaf035c02ab61ea48ceeb6fcd4876ed520d60e1ec4619719d8a5b8b807fafb8e0a3dfc737723ee6b4b7d93a2584ee6a649d060953748834b2454598394ee0aab12d7b61a51f527a9a41f6c1687fe2537298ca2a8f5946f8e5fd091dbdcb":16:"11":MBEDTLS_MD_SHA1:"d436e99569fd32a7c8a05bbc90d32c49":"aafd12f659cae63489b479e5076ddec2f06cb58f":"1253e04dc0a5397bb44a7ab87e9bf2a039a33d1e996fc82a94ccd30074c95df763722017069e5268da5d1c0b4f872cf653c11df82314a67968dfeae28def04bb6d84b1c31d654a1970e5783bd6eb96a024c2ca2f4a90fe9f2ef5c9c140e5bb48da9536ad8700c84fc9130adea74e558d51a74ddf85d8b50de96838d6063e0955":0 - -RSAES-OAEP Decryption Test Vector 1_1 -pkcs1_rsaes_oaep_decrypt:1024:16:"d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d":16:"cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77":16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"6628194e12073db03ba94cda9ef9532397d50dba79b987004afefe34":"18b776ea21069d69776a33e96bad48e1dda0a5ef":"354fe67b4a126d5d35fe36c777791a3f7ba13def484e2d3908aff722fad468fb21696de95d0be911c2d3174f8afcc201035f7b6d8e69402de5451618c21a535fa9d7bfc5b8dd9fc243f8cf927db31322d6e881eaa91a996170e657a05a266426d98c88003f8477c1227094a0d9fa1e8c4024309ce1ecccb5210035d47ac72e8a":0 - -RSAES-OAEP Decryption Test Vector 1_2 -pkcs1_rsaes_oaep_decrypt:1024:16:"d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d":16:"cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77":16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"750c4047f547e8e41411856523298ac9bae245efaf1397fbe56f9dd5":"0cc742ce4a9b7f32f951bcb251efd925fe4fe35f":"640db1acc58e0568fe5407e5f9b701dff8c3c91e716c536fc7fcec6cb5b71c1165988d4a279e1577d730fc7a29932e3f00c81515236d8d8e31017a7a09df4352d904cdeb79aa583adcc31ea698a4c05283daba9089be5491f67c1a4ee48dc74bbbe6643aef846679b4cb395a352d5ed115912df696ffe0702932946d71492b44":0 - -RSAES-OAEP Decryption Test Vector 1_3 -pkcs1_rsaes_oaep_decrypt:1024:16:"d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d":16:"cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77":16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"d94ae0832e6445ce42331cb06d531a82b1db4baad30f746dc916df24d4e3c2451fff59a6423eb0e1d02d4fe646cf699dfd818c6e97b051":"2514df4695755a67b288eaf4905c36eec66fd2fd":"423736ed035f6026af276c35c0b3741b365e5f76ca091b4e8c29e2f0befee603595aa8322d602d2e625e95eb81b2f1c9724e822eca76db8618cf09c5343503a4360835b5903bc637e3879fb05e0ef32685d5aec5067cd7cc96fe4b2670b6eac3066b1fcf5686b68589aafb7d629b02d8f8625ca3833624d4800fb081b1cf94eb":0 - -RSAES-OAEP Decryption Test Vector 1_4 -pkcs1_rsaes_oaep_decrypt:1024:16:"d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d":16:"cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77":16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"52e650d98e7f2a048b4f86852153b97e01dd316f346a19f67a85":"c4435a3e1a18a68b6820436290a37cefb85db3fb":"45ead4ca551e662c9800f1aca8283b0525e6abae30be4b4aba762fa40fd3d38e22abefc69794f6ebbbc05ddbb11216247d2f412fd0fba87c6e3acd888813646fd0e48e785204f9c3f73d6d8239562722dddd8771fec48b83a31ee6f592c4cfd4bc88174f3b13a112aae3b9f7b80e0fc6f7255ba880dc7d8021e22ad6a85f0755":0 - -RSAES-OAEP Decryption Test Vector 1_5 -pkcs1_rsaes_oaep_decrypt:1024:16:"d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d":16:"cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77":16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"8da89fd9e5f974a29feffb462b49180f6cf9e802":"b318c42df3be0f83fea823f5a7b47ed5e425a3b5":"36f6e34d94a8d34daacba33a2139d00ad85a9345a86051e73071620056b920e219005855a213a0f23897cdcd731b45257c777fe908202befdd0b58386b1244ea0cf539a05d5d10329da44e13030fd760dcd644cfef2094d1910d3f433e1c7c6dd18bc1f2df7f643d662fb9dd37ead9059190f4fa66ca39e869c4eb449cbdc439":0 - -RSAES-OAEP Decryption Test Vector 1_6 -pkcs1_rsaes_oaep_decrypt:1024:16:"d32737e7267ffe1341b2d5c0d150a81b586fb3132bed2f8d5262864a9cb9f30af38be448598d413a172efb802c21acf1c11c520c2f26a471dcad212eac7ca39d":16:"cc8853d1d54da630fac004f471f281c7b8982d8224a490edbeb33d3e3d5cc93c4765703d1dd791642f1f116a0dd852be2419b2af72bfe9a030e860b0288b5d77":16:"a8b3b284af8eb50b387034a860f146c4919f318763cd6c5598c8ae4811a1e0abc4c7e0b082d693a5e7fced675cf4668512772c0cbc64a742c6c630f533c8cc72f62ae833c40bf25842e984bb78bdbf97c0107d55bdb662f5c4e0fab9845cb5148ef7392dd3aaff93ae1e6b667bb3d4247616d4f5ba10d4cfd226de88d39f16fb":16:"010001":MBEDTLS_MD_SHA1:"26521050844271":"e4ec0982c2336f3a677f6a356174eb0ce887abc2":"42cee2617b1ecea4db3f4829386fbd61dafbf038e180d837c96366df24c097b4ab0fac6bdf590d821c9f10642e681ad05b8d78b378c0f46ce2fad63f74e0ad3df06b075d7eb5f5636f8d403b9059ca761b5c62bb52aa45002ea70baace08ded243b9d8cbd62a68ade265832b56564e43a6fa42ed199a099769742df1539e8255":0 - -RSAES-OAEP Decryption Test Vector 2_1 -pkcs1_rsaes_oaep_decrypt:1025:16:"0159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a43":16:"012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd7":16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"8ff00caa605c702830634d9a6c3d42c652b58cf1d92fec570beee7":"8c407b5ec2899e5099c53e8ce793bf94e71b1782":"0181af8922b9fcb4d79d92ebe19815992fc0c1439d8bcd491398a0f4ad3a329a5bd9385560db532683c8b7da04e4b12aed6aacdf471c34c9cda891addcc2df3456653aa6382e9ae59b54455257eb099d562bbe10453f2b6d13c59c02e10f1f8abb5da0d0570932dacf2d0901db729d0fefcc054e70968ea540c81b04bcaefe720e":0 - -RSAES-OAEP Decryption Test Vector 2_2 -pkcs1_rsaes_oaep_decrypt:1025:16:"0159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a43":16:"012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd7":16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"2d":"b600cf3c2e506d7f16778c910d3a8b003eee61d5":"018759ff1df63b2792410562314416a8aeaf2ac634b46f940ab82d64dbf165eee33011da749d4bab6e2fcd18129c9e49277d8453112b429a222a8471b070993998e758861c4d3f6d749d91c4290d332c7a4ab3f7ea35ff3a07d497c955ff0ffc95006b62c6d296810d9bfab024196c7934012c2df978ef299aba239940cba10245":0 - -RSAES-OAEP Decryption Test Vector 2_3 -pkcs1_rsaes_oaep_decrypt:1025:16:"0159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a43":16:"012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd7":16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"74fc88c51bc90f77af9d5e9a4a70133d4b4e0b34da3c37c7ef8e":"a73768aeeaa91f9d8c1ed6f9d2b63467f07ccae3":"018802bab04c60325e81c4962311f2be7c2adce93041a00719c88f957575f2c79f1b7bc8ced115c706b311c08a2d986ca3b6a9336b147c29c6f229409ddec651bd1fdd5a0b7f610c9937fdb4a3a762364b8b3206b4ea485fd098d08f63d4aa8bb2697d027b750c32d7f74eaf5180d2e9b66b17cb2fa55523bc280da10d14be2053":0 - -RSAES-OAEP Decryption Test Vector 2_4 -pkcs1_rsaes_oaep_decrypt:1025:16:"0159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a43":16:"012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd7":16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"a7eb2a5036931d27d4e891326d99692ffadda9bf7efd3e34e622c4adc085f721dfe885072c78a203b151739be540fa8c153a10f00a":"9a7b3b0e708bd96f8190ecab4fb9b2b3805a8156":"00a4578cbc176318a638fba7d01df15746af44d4f6cd96d7e7c495cbf425b09c649d32bf886da48fbaf989a2117187cafb1fb580317690e3ccd446920b7af82b31db5804d87d01514acbfa9156e782f867f6bed9449e0e9a2c09bcecc6aa087636965e34b3ec766f2fe2e43018a2fddeb140616a0e9d82e5331024ee0652fc7641":0 - -RSAES-OAEP Decryption Test Vector 2_5 -pkcs1_rsaes_oaep_decrypt:1025:16:"0159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a43":16:"012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd7":16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"2ef2b066f854c33f3bdcbb5994a435e73d6c6c":"eb3cebbc4adc16bb48e88c8aec0e34af7f427fd3":"00ebc5f5fda77cfdad3c83641a9025e77d72d8a6fb33a810f5950f8d74c73e8d931e8634d86ab1246256ae07b6005b71b7f2fb98351218331ce69b8ffbdc9da08bbc9c704f876deb9df9fc2ec065cad87f9090b07acc17aa7f997b27aca48806e897f771d95141fe4526d8a5301b678627efab707fd40fbebd6e792a25613e7aec":0 - -RSAES-OAEP Decryption Test Vector 2_6 -pkcs1_rsaes_oaep_decrypt:1025:16:"0159dbde04a33ef06fb608b80b190f4d3e22bcc13ac8e4a081033abfa416edb0b338aa08b57309ea5a5240e7dc6e54378c69414c31d97ddb1f406db3769cc41a43":16:"012b652f30403b38b40995fd6ff41a1acc8ada70373236b7202d39b2ee30cfb46db09511f6f307cc61cc21606c18a75b8a62f822df031ba0df0dafd5506f568bd7":16:"01947c7fce90425f47279e70851f25d5e62316fe8a1df19371e3e628e260543e4901ef6081f68c0b8141190d2ae8daba7d1250ec6db636e944ec3722877c7c1d0a67f14b1694c5f0379451a43e49a32dde83670b73da91a1c99bc23b436a60055c610f0baf99c1a079565b95a3f1526632d1d4da60f20eda25e653c4f002766f45":16:"010001":MBEDTLS_MD_SHA1:"8a7fb344c8b6cb2cf2ef1f643f9a3218f6e19bba89c0":"4c45cf4d57c98e3d6d2095adc51c489eb50dff84":"010839ec20c27b9052e55befb9b77e6fc26e9075d7a54378c646abdf51e445bd5715de81789f56f1803d9170764a9e93cb78798694023ee7393ce04bc5d8f8c5a52c171d43837e3aca62f609eb0aa5ffb0960ef04198dd754f57f7fbe6abf765cf118b4ca443b23b5aab266f952326ac4581100644325f8b721acd5d04ff14ef3a":0 - -RSAES-OAEP Decryption Example 3_1 -pkcs1_rsaes_oaep_decrypt:1026:16:"01bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf":16:"018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7":16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"087820b569e8fa8d":"8ced6b196290805790e909074015e6a20b0c4894":"026a0485d96aebd96b4382085099b962e6a2bdec3d90c8db625e14372de85e2d5b7baab65c8faf91bb5504fb495afce5c988b3f6a52e20e1d6cbd3566c5cd1f2b8318bb542cc0ea25c4aab9932afa20760eaddec784396a07ea0ef24d4e6f4d37e5052a7a31e146aa480a111bbe926401307e00f410033842b6d82fe5ce4dfae80":0 - -RSAES-OAEP Decryption Example 3_2 -pkcs1_rsaes_oaep_decrypt:1026:16:"01bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf":16:"018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7":16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"4653acaf171960b01f52a7be63a3ab21dc368ec43b50d82ec3781e04":"b4291d6567550848cc156967c809baab6ca507f0":"024db89c7802989be0783847863084941bf209d761987e38f97cb5f6f1bc88da72a50b73ebaf11c879c4f95df37b850b8f65d7622e25b1b889e80fe80baca2069d6e0e1d829953fc459069de98ea9798b451e557e99abf8fe3d9ccf9096ebbf3e5255d3b4e1c6d2ecadf067a359eea86405acd47d5e165517ccafd47d6dbee4bf5":0 - -RSAES-OAEP Decryption Example 3_3 -pkcs1_rsaes_oaep_decrypt:1026:16:"01bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf":16:"018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7":16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"d94cd0e08fa404ed89":"ce8928f6059558254008badd9794fadcd2fd1f65":"0239bce681032441528877d6d1c8bb28aa3bc97f1df584563618995797683844ca86664732f4bed7a0aab083aaabfb7238f582e30958c2024e44e57043b97950fd543da977c90cdde5337d618442f99e60d7783ab59ce6dd9d69c47ad1e962bec22d05895cff8d3f64ed5261d92b2678510393484990ba3f7f06818ae6ffce8a3a":0 - -RSAES-OAEP Decryption Example 3_4 -pkcs1_rsaes_oaep_decrypt:1026:16:"01bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf":16:"018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7":16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"6cc641b6b61e6f963974dad23a9013284ef1":"6e2979f52d6814a57d83b090054888f119a5b9a3":"02994c62afd76f498ba1fd2cf642857fca81f4373cb08f1cbaee6f025c3b512b42c3e8779113476648039dbe0493f9246292fac28950600e7c0f32edf9c81b9dec45c3bde0cc8d8847590169907b7dc5991ceb29bb0714d613d96df0f12ec5d8d3507c8ee7ae78dd83f216fa61de100363aca48a7e914ae9f42ddfbe943b09d9a0":0 - -RSAES-OAEP Decryption Example 3_5 -pkcs1_rsaes_oaep_decrypt:1026:16:"01bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf":16:"018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7":16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"df5151832b61f4f25891fb4172f328d2eddf8371ffcfdbe997939295f30eca6918017cfda1153bf7a6af87593223":"2d760bfe38c59de34cdc8b8c78a38e66284a2d27":"0162042ff6969592a6167031811a239834ce638abf54fec8b99478122afe2ee67f8c5b18b0339805bfdbc5a4e6720b37c59cfba942464c597ff532a119821545fd2e59b114e61daf71820529f5029cf524954327c34ec5e6f5ba7efcc4de943ab8ad4ed787b1454329f70db798a3a8f4d92f8274e2b2948ade627ce8ee33e43c60":0 - -RSAES-OAEP Decryption Example 3_6 -pkcs1_rsaes_oaep_decrypt:1026:16:"01bf01d216d73595cf0270c2beb78d40a0d8447d31da919a983f7eea781b77d85fe371b3e9373e7b69217d3150a02d8958de7fad9d555160958b4454127e0e7eaf":16:"018d3399658166db3829816d7b295416759e9c91987f5b2d8aecd63b04b48bd7b2fcf229bb7f8a6dc88ba13dd2e39ad55b6d1a06160708f9700be80b8fd3744ce7":16:"02b58fec039a860700a4d7b6462f93e6cdd491161ddd74f4e810b40e3c1652006a5c277b2774c11305a4cbab5a78efa57e17a86df7a3fa36fc4b1d2249f22ec7c2dd6a463232accea906d66ebe80b5704b10729da6f833234abb5efdd4a292cbfad33b4d33fa7a14b8c397b56e3acd21203428b77cdfa33a6da706b3d8b0fc43e9":16:"010001":MBEDTLS_MD_SHA1:"3c3bad893c544a6d520ab022319188c8d504b7a788b850903b85972eaa18552e1134a7ad6098826254ff7ab672b3d8eb3158fac6d4cbaef1":"f174779c5fd3cfe007badcb7a36c9b55bfcfbf0e":"00112051e75d064943bc4478075e43482fd59cee0679de6893eec3a943daa490b9691c93dfc0464b6623b9f3dbd3e70083264f034b374f74164e1a00763725e574744ba0b9db83434f31df96f6e2a26f6d8eba348bd4686c2238ac07c37aac3785d1c7eea2f819fd91491798ed8e9cef5e43b781b0e0276e37c43ff9492d005730":0 - -RSAES-OAEP Decryption Example 4_1 -pkcs1_rsaes_oaep_decrypt:1027:16:"027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba5701":16:"0210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139":16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"4a86609534ee434a6cbca3f7e962e76d455e3264c19f605f6e5ff6137c65c56d7fb344cd52bc93374f3d166c9f0c6f9c506bad19330972d2":"1cac19ce993def55f98203f6852896c95ccca1f3":"04cce19614845e094152a3fe18e54e3330c44e5efbc64ae16886cb1869014cc5781b1f8f9e045384d0112a135ca0d12e9c88a8e4063416deaae3844f60d6e96fe155145f4525b9a34431ca3766180f70e15a5e5d8e8b1a516ff870609f13f896935ced188279a58ed13d07114277d75c6568607e0ab092fd803a223e4a8ee0b1a8":0 - -RSAES-OAEP Decryption Example 4_2 -pkcs1_rsaes_oaep_decrypt:1027:16:"027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba5701":16:"0210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139":16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"b0adc4f3fe11da59ce992773d9059943c03046497ee9d9f9a06df1166db46d98f58d27ec074c02eee6cbe2449c8b9fc5080c5c3f4433092512ec46aa793743c8":"f545d5897585e3db71aa0cb8da76c51d032ae963":"0097b698c6165645b303486fbf5a2a4479c0ee85889b541a6f0b858d6b6597b13b854eb4f839af03399a80d79bda6578c841f90d645715b280d37143992dd186c80b949b775cae97370e4ec97443136c6da484e970ffdb1323a20847821d3b18381de13bb49aaea66530c4a4b8271f3eae172cd366e07e6636f1019d2a28aed15e":0 - -RSAES-OAEP Decryption Example 4_3 -pkcs1_rsaes_oaep_decrypt:1027:16:"027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba5701":16:"0210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139":16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"bf6d42e701707b1d0206b0c8b45a1c72641ff12889219a82bdea965b5e79a96b0d0163ed9d578ec9ada20f2fbcf1ea3c4089d83419ba81b0c60f3606da99":"ad997feef730d6ea7be60d0dc52e72eacbfdd275":"0301f935e9c47abcb48acbbe09895d9f5971af14839da4ff95417ee453d1fd77319072bb7297e1b55d7561cd9d1bb24c1a9a37c619864308242804879d86ebd001dce5183975e1506989b70e5a83434154d5cbfd6a24787e60eb0c658d2ac193302d1192c6e622d4a12ad4b53923bca246df31c6395e37702c6a78ae081fb9d065":0 - -RSAES-OAEP Decryption Example 4_4 -pkcs1_rsaes_oaep_decrypt:1027:16:"027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba5701":16:"0210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139":16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"fb2ef112f5e766eb94019297934794f7be2f6fc1c58e":"136454df5730f73c807a7e40d8c1a312ac5b9dd3":"02d110ad30afb727beb691dd0cf17d0af1a1e7fa0cc040ec1a4ba26a42c59d0a796a2e22c8f357ccc98b6519aceb682e945e62cb734614a529407cd452bee3e44fece8423cc19e55548b8b994b849c7ecde4933e76037e1d0ce44275b08710c68e430130b929730ed77e09b015642c5593f04e4ffb9410798102a8e96ffdfe11e4":0 - -RSAES-OAEP Decryption Example 4_5 -pkcs1_rsaes_oaep_decrypt:1027:16:"027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba5701":16:"0210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139":16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"28ccd447bb9e85166dabb9e5b7d1adadc4b9d39f204e96d5e440ce9ad928bc1c2284":"bca8057f824b2ea257f2861407eef63d33208681":"00dbb8a7439d90efd919a377c54fae8fe11ec58c3b858362e23ad1b8a44310799066b99347aa525691d2adc58d9b06e34f288c170390c5f0e11c0aa3645959f18ee79e8f2be8d7ac5c23d061f18dd74b8c5f2a58fcb5eb0c54f99f01a83247568292536583340948d7a8c97c4acd1e98d1e29dc320e97a260532a8aa7a758a1ec2":0 - -RSAES-OAEP Decryption Example 4_6 -pkcs1_rsaes_oaep_decrypt:1027:16:"027458c19ec1636919e736c9af25d609a51b8f561d19c6bf6943dd1ee1ab8a4a3f232100bd40b88decc6ba235548b6ef792a11c9de823d0a7922c7095b6eba5701":16:"0210ee9b33ab61716e27d251bd465f4b35a1a232e2da00901c294bf22350ce490d099f642b5375612db63ba1f20386492bf04d34b3c22bceb909d13441b53b5139":16:"051240b6cc0004fa48d0134671c078c7c8dec3b3e2f25bc2564467339db38853d06b85eea5b2de353bff42ac2e46bc97fae6ac9618da9537a5c8f553c1e357625991d6108dcd7885fb3a25413f53efcad948cb35cd9b9ae9c1c67626d113d57dde4c5bea76bb5bb7de96c00d07372e9685a6d75cf9d239fa148d70931b5f3fb039":16:"010001":MBEDTLS_MD_SHA1:"f22242751ec6b1":"2e7e1e17f647b5ddd033e15472f90f6812f3ac4e":"00a5ffa4768c8bbecaee2db77e8f2eec99595933545520835e5ba7db9493d3e17cddefe6a5f567624471908db4e2d83a0fbee60608fc84049503b2234a07dc83b27b22847ad8920ff42f674ef79b76280b00233d2b51b8cb2703a9d42bfbc8250c96ec32c051e57f1b4ba528db89c37e4c54e27e6e64ac69635ae887d9541619a9":0 - -RSAES-OAEP Decryption Example 5_1 -pkcs1_rsaes_oaep_decrypt:1028:16:"03b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707":16:"02e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f":16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"af71a901e3a61d3132f0fc1fdb474f9ea6579257ffc24d164170145b3dbde8":"44c92e283f77b9499c603d963660c87d2f939461":"036046a4a47d9ed3ba9a89139c105038eb7492b05a5d68bfd53accff4597f7a68651b47b4a4627d927e485eed7b4566420e8b409879e5d606eae251d22a5df799f7920bfc117b992572a53b1263146bcea03385cc5e853c9a101c8c3e1bda31a519807496c6cb5e5efb408823a352b8fa0661fb664efadd593deb99fff5ed000e5":0 - -RSAES-OAEP Decryption Example 5_2 -pkcs1_rsaes_oaep_decrypt:1028:16:"03b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707":16:"02e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f":16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"a3b844a08239a8ac41605af17a6cfda4d350136585903a417a79268760519a4b4ac3303ec73f0f87cfb32399":"cb28f5860659fceee49c3eeafce625a70803bd32":"03d6eb654edce615bc59f455265ed4e5a18223cbb9be4e4069b473804d5de96f54dcaaa603d049c5d94aa1470dfcd2254066b7c7b61ff1f6f6770e3215c51399fd4e34ec5082bc48f089840ad04354ae66dc0f1bd18e461a33cc1258b443a2837a6df26759aa2302334986f87380c9cc9d53be9f99605d2c9a97da7b0915a4a7ad":0 - -RSAES-OAEP Decryption Example 5_3 -pkcs1_rsaes_oaep_decrypt:1028:16:"03b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707":16:"02e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f":16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"308b0ecbd2c76cb77fc6f70c5edd233fd2f20929d629f026953bb62a8f4a3a314bde195de85b5f816da2aab074d26cb6acddf323ae3b9c678ac3cf12fbdde7":"2285f40d770482f9a9efa2c72cb3ac55716dc0ca":"0770952181649f9f9f07ff626ff3a22c35c462443d905d456a9fd0bff43cac2ca7a9f554e9478b9acc3ac838b02040ffd3e1847de2e4253929f9dd9ee4044325a9b05cabb808b2ee840d34e15d105a3f1f7b27695a1a07a2d73fe08ecaaa3c9c9d4d5a89ff890d54727d7ae40c0ec1a8dd86165d8ee2c6368141016a48b55b6967":0 - -RSAES-OAEP Decryption Example 5_4 -pkcs1_rsaes_oaep_decrypt:1028:16:"03b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707":16:"02e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f":16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"15c5b9ee1185":"49fa45d3a78dd10dfd577399d1eb00af7eed5513":"0812b76768ebcb642d040258e5f4441a018521bd96687e6c5e899fcd6c17588ff59a82cc8ae03a4b45b31299af1788c329f7dcd285f8cf4ced82606b97612671a45bedca133442144d1617d114f802857f0f9d739751c57a3f9ee400912c61e2e6992be031a43dd48fa6ba14eef7c422b5edc4e7afa04fdd38f402d1c8bb719abf":0 - -RSAES-OAEP Decryption Example 5_5 -pkcs1_rsaes_oaep_decrypt:1028:16:"03b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707":16:"02e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f":16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"21026e6800c7fa728fcaaba0d196ae28d7a2ac4ffd8abce794f0985f60c8a6737277365d3fea11db8923a2029a":"f0287413234cc5034724a094c4586b87aff133fc":"07b60e14ec954bfd29e60d0047e789f51d57186c63589903306793ced3f68241c743529aba6a6374f92e19e0163efa33697e196f7661dfaaa47aac6bde5e51deb507c72c589a2ca1693d96b1460381249b2cdb9eac44769f2489c5d3d2f99f0ee3c7ee5bf64a5ac79c42bd433f149be8cb59548361640595513c97af7bc2509723":0 - -RSAES-OAEP Decryption Example 5_6 -pkcs1_rsaes_oaep_decrypt:1028:16:"03b0d3962f6d17549cbfca11294348dcf0e7e39f8c2bc6824f2164b606d687860dae1e632393cfedf513228229069e2f60e4acd7e633a436063f82385f48993707":16:"02e4c32e2f517269b7072309f00c0e31365f7ce28b236b82912df239abf39572cf0ed604b02982e53564c52d6a05397de5c052a2fddc141ef7189836346aeb331f":16:"0aadf3f9c125e5d891f31ac448e993defe580f802b45f9d7f22ba5021e9c47576b5a1e68031ba9db4e6dabe4d96a1d6f3d267268cff408005f118efcadb99888d1c234467166b2a2b849a05a889c060ac0da0c5fae8b55f309ba62e703742fa0326f2d10b011021489ff497770190d895fd39f52293c39efd73a698bdab9f10ed9":16:"010001":MBEDTLS_MD_SHA1:"541e37b68b6c8872b84c02":"d9fba45c96f21e6e26d29eb2cdcb6585be9cb341":"08c36d4dda33423b2ed6830d85f6411ba1dcf470a1fae0ebefee7c089f256cef74cb96ea69c38f60f39abee44129bcb4c92de7f797623b20074e3d9c2899701ed9071e1efa0bdd84d4c3e5130302d8f0240baba4b84a71cc032f2235a5ff0fae277c3e8f9112bef44c9ae20d175fc9a4058bfc930ba31b02e2e4f444483710f24a":0 - -RSAES-OAEP Decryption Example 6_1 -pkcs1_rsaes_oaep_decrypt:1029:16:"04a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b":16:"0404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed":16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"4046ca8baa3347ca27f49e0d81f9cc1d71be9ba517d4":"dd0f6cfe415e88e5a469a51fbba6dfd40adb4384":"0630eebcd2856c24f798806e41f9e67345eda9ceda386acc9facaea1eeed06ace583709718d9d169fadf414d5c76f92996833ef305b75b1e4b95f662a20faedc3bae0c4827a8bf8a88edbd57ec203a27a841f02e43a615bab1a8cac0701de34debdef62a088089b55ec36ea7522fd3ec8d06b6a073e6df833153bc0aefd93bd1a3":0 - -RSAES-OAEP Decryption Example 6_2 -pkcs1_rsaes_oaep_decrypt:1029:16:"04a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b":16:"0404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed":16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"5cc72c60231df03b3d40f9b57931bc31109f972527f28b19e7480c7288cb3c92b22512214e4be6c914792ddabdf57faa8aa7":"8d14bd946a1351148f5cae2ed9a0c653e85ebd85":"0ebc37376173a4fd2f89cc55c2ca62b26b11d51c3c7ce49e8845f74e7607317c436bc8d23b9667dfeb9d087234b47bc6837175ae5c0559f6b81d7d22416d3e50f4ac533d8f0812f2db9e791fe9c775ac8b6ad0f535ad9ceb23a4a02014c58ab3f8d3161499a260f39348e714ae2a1d3443208fd8b722ccfdfb393e98011f99e63f":0 - -RSAES-OAEP Decryption Example 6_3 -pkcs1_rsaes_oaep_decrypt:1029:16:"04a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b":16:"0404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed":16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"b20e651303092f4bccb43070c0f86d23049362ed96642fc5632c27db4a52e3d831f2ab068b23b149879c002f6bf3feee97591112562c":"6c075bc45520f165c0bf5ea4c5df191bc9ef0e44":"0a98bf1093619394436cf68d8f38e2f158fde8ea54f3435f239b8d06b8321844202476aeed96009492480ce3a8d705498c4c8c68f01501dc81db608f60087350c8c3b0bd2e9ef6a81458b7c801b89f2e4fe99d4900ba6a4b5e5a96d865dc676c7755928794130d6280a8160a190f2df3ea7cf9aa0271d88e9e6905ecf1c5152d65":0 - -RSAES-OAEP Decryption Example 6_4 -pkcs1_rsaes_oaep_decrypt:1029:16:"04a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b":16:"0404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed":16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"684e3038c5c041f7":"3bbc3bd6637dfe12846901029bf5b0c07103439c":"008e7a67cacfb5c4e24bec7dee149117f19598ce8c45808fef88c608ff9cd6e695263b9a3c0ad4b8ba4c95238e96a8422b8535629c8d5382374479ad13fa39974b242f9a759eeaf9c83ad5a8ca18940a0162ba755876df263f4bd50c6525c56090267c1f0e09ce0899a0cf359e88120abd9bf893445b3cae77d3607359ae9a52f8":0 - -RSAES-OAEP Decryption Example 6_5 -pkcs1_rsaes_oaep_decrypt:1029:16:"04a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b":16:"0404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed":16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"32488cb262d041d6e4dd35f987bf3ca696db1f06ac29a44693":"b46b41893e8bef326f6759383a83071dae7fcabc":"00003474416c7b68bdf961c385737944d7f1f40cb395343c693cc0b4fe63b31fedf1eaeeac9ccc0678b31dc32e0977489514c4f09085f6298a9653f01aea4045ff582ee887be26ae575b73eef7f3774921e375a3d19adda0ca31aa1849887c1f42cac9677f7a2f4e923f6e5a868b38c084ef187594dc9f7f048fea2e02955384ab":0 - -RSAES-OAEP Decryption Example 6_6 -pkcs1_rsaes_oaep_decrypt:1029:16:"04a6ce8b7358dfa69bdcf742617005afb5385f5f3a58a24ef74a22a8c05cb7cc38ebd4cc9d9a9d789a62cd0f60f0cb941d3423c9692efa4fe3adff290c4749a38b":16:"0404c9a803371fedb4c5be39f3c00b009e5e08a63be1e40035cdaca5011cc701cf7eebcb99f0ffe17cfd0a4bf7befd2dd536ac946db797fdbc4abe8f29349b91ed":16:"12b17f6dad2ecd19ff46dc13f7860f09e0e0cfb677b38a52592305ceaf022c166db90d04ac29e33f7dd12d9faf66e0816bb63ead267cc7d46c17c37be214bca2a22d723a64e44407436b6fc965729aefc2554f376cd5dcea68293780a62bf39d0029485a160bbb9e5dc0972d21a504f52e5ee028aa416332f510b2e9cff5f722af":16:"010001":MBEDTLS_MD_SHA1:"50ba14be8462720279c306ba":"0a2403312a41e3d52f060fbc13a67de5cf7609a7":"0a026dda5fc8785f7bd9bf75327b63e85e2c0fdee5dadb65ebdcac9ae1de95c92c672ab433aa7a8e69ce6a6d8897fac4ac4a54de841ae5e5bbce7687879d79634cea7a30684065c714d52409b928256bbf53eabcd5231eb7259504537399bd29164b726d33a46da701360a4168a091ccab72d44a62fed246c0ffea5b1348ab5470":0 - -RSAES-OAEP Decryption Example 7_1 -pkcs1_rsaes_oaep_decrypt:1030:16:"0749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71":16:"06bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023":16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"47aae909":"43dd09a07ff4cac71caa4632ee5e1c1daee4cd8f":"1688e4ce7794bba6cb7014169ecd559cede2a30b56a52b68d9fe18cf1973ef97b2a03153951c755f6294aa49adbdb55845ab6875fb3986c93ecf927962840d282f9e54ce8b690f7c0cb8bbd73440d9571d1b16cd9260f9eab4783cc482e5223dc60973871783ec27b0ae0fd47732cbc286a173fc92b00fb4ba6824647cd93c85c1":0 - -RSAES-OAEP Decryption Example 7_2 -pkcs1_rsaes_oaep_decrypt:1030:16:"0749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71":16:"06bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023":16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"1d9b2e2223d9bc13bfb9f162ce735db48ba7c68f6822a0a1a7b6ae165834e7":"3a9c3cec7b84f9bd3adecbc673ec99d54b22bc9b":"1052ed397b2e01e1d0ee1c50bf24363f95e504f4a03434a08fd822574ed6b9736edbb5f390db10321479a8a139350e2bd4977c3778ef331f3e78ae118b268451f20a2f01d471f5d53c566937171b2dbc2d4bde459a5799f0372d6574239b2323d245d0bb81c286b63c89a361017337e4902f88a467f4c7f244bfd5ab46437ff3b6":0 - -RSAES-OAEP Decryption Example 7_3 -pkcs1_rsaes_oaep_decrypt:1030:16:"0749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71":16:"06bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023":16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"d976fc":"76a75e5b6157a556cf8884bb2e45c293dd545cf5":"2155cd843ff24a4ee8badb7694260028a490813ba8b369a4cbf106ec148e5298707f5965be7d101c1049ea8584c24cd63455ad9c104d686282d3fb803a4c11c1c2e9b91c7178801d1b6640f003f5728df007b8a4ccc92bce05e41a27278d7c85018c52414313a5077789001d4f01910b72aad05d220aa14a58733a7489bc54556b":0 - -RSAES-OAEP Decryption Example 7_4 -pkcs1_rsaes_oaep_decrypt:1030:16:"0749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71":16:"06bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023":16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"d4738623df223aa43843df8467534c41d013e0c803c624e263666b239bde40a5f29aeb8de79e3daa61dd0370f49bd4b013834b98212aef6b1c5ee373b3cb":"7866314a6ad6f2b250a35941db28f5864b585859":"0ab14c373aeb7d4328d0aaad8c094d88b9eb098b95f21054a29082522be7c27a312878b637917e3d819e6c3c568db5d843802b06d51d9e98a2be0bf40c031423b00edfbff8320efb9171bd2044653a4cb9c5122f6c65e83cda2ec3c126027a9c1a56ba874d0fea23f380b82cf240b8cf540004758c4c77d934157a74f3fc12bfac":0 - -RSAES-OAEP Decryption Example 7_5 -pkcs1_rsaes_oaep_decrypt:1030:16:"0749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71":16:"06bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023":16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"bb47231ca5ea1d3ad46c99345d9a8a61":"b2166ed472d58db10cab2c6b000cccf10a7dc509":"028387a318277434798b4d97f460068df5298faba5041ba11761a1cb7316b24184114ec500257e2589ed3b607a1ebbe97a6cc2e02bf1b681f42312a33b7a77d8e7855c4a6de03e3c04643f786b91a264a0d6805e2cea91e68177eb7a64d9255e4f27e713b7ccec00dc200ebd21c2ea2bb890feae4942df941dc3f97890ed347478":0 - -RSAES-OAEP Decryption Example 7_6 -pkcs1_rsaes_oaep_decrypt:1030:16:"0749262c111cd470ec2566e6b3732fc09329469aa19071d3b9c01906514c6f1d26baa14beab0971c8b7e611a4f79009d6fea776928ca25285b0de3643d1a3f8c71":16:"06bc1e50e96c02bf636e9eea8b899bbebf7651de77dd474c3e9bc23bad8182b61904c7d97dfbebfb1e00108878b6e67e415391d67942c2b2bf9b4435f88b0cb023":16:"311179f0bcfc9b9d3ca315d00ef30d7bdd3a2cfae9911bfedcb948b3a4782d0732b6ab44aa4bf03741a644dc01bec3e69b01a033e675d8acd7c4925c6b1aec3119051dfd89762d215d45475ffcb59f908148623f37177156f6ae86dd7a7c5f43dc1e1f908254058a284a5f06c0021793a87f1ac5feff7dcaee69c5e51a3789e373":16:"010001":MBEDTLS_MD_SHA1:"2184827095d35c3f86f600e8e59754013296":"52673bde2ca166c2aa46131ac1dc808d67d7d3b1":"14c678a94ad60525ef39e959b2f3ba5c097a94ff912b67dbace80535c187abd47d075420b1872152bba08f7fc31f313bbf9273c912fc4c0149a9b0cfb79807e346eb332069611bec0ff9bcd168f1f7c33e77313cea454b94e2549eecf002e2acf7f6f2d2845d4fe0aab2e5a92ddf68c480ae11247935d1f62574842216ae674115":0 - -RSAES-OAEP Decryption Example 8_1 -pkcs1_rsaes_oaep_decrypt:1031:16:"0a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f":16:"092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9":16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"050b755e5e6880f7b9e9d692a74c37aae449b31bfea6deff83747a897f6c2c825bb1adbf850a3c96994b5de5b33cbc7d4a17913a7967":"7706ffca1ecfb1ebee2a55e5c6e24cd2797a4125":"09b3683d8a2eb0fb295b62ed1fb9290b714457b7825319f4647872af889b30409472020ad12912bf19b11d4819f49614824ffd84d09c0a17e7d17309d12919790410aa2995699f6a86dbe3242b5acc23af45691080d6b1ae810fb3e3057087f0970092ce00be9562ff4053b6262ce0caa93e13723d2e3a5ba075d45f0d61b54b61":0 - -RSAES-OAEP Decryption Example 8_2 -pkcs1_rsaes_oaep_decrypt:1031:16:"0a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f":16:"092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9":16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"4eb68dcd93ca9b19df111bd43608f557026fe4aa1d5cfac227a3eb5ab9548c18a06dded23f81825986b2fcd71109ecef7eff88873f075c2aa0c469f69c92bc":"a3717da143b4dcffbc742665a8fa950585548343":"2ecf15c97c5a15b1476ae986b371b57a24284f4a162a8d0c8182e7905e792256f1812ba5f83f1f7a130e42dcc02232844edc14a31a68ee97ae564a383a3411656424c5f62ddb646093c367be1fcda426cf00a06d8acb7e57776fbbd855ac3df506fc16b1d7c3f2110f3d8068e91e186363831c8409680d8da9ecd8cf1fa20ee39d":0 - -RSAES-OAEP Decryption Example 8_3 -pkcs1_rsaes_oaep_decrypt:1031:16:"0a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f":16:"092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9":16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"8604ac56328c1ab5ad917861":"ee06209073cca026bb264e5185bf8c68b7739f86":"4bc89130a5b2dabb7c2fcf90eb5d0eaf9e681b7146a38f3173a3d9cfec52ea9e0a41932e648a9d69344c50da763f51a03c95762131e8052254dcd2248cba40fd31667786ce05a2b7b531ac9dac9ed584a59b677c1a8aed8c5d15d68c05569e2be780bf7db638fd2bfd2a85ab276860f3777338fca989ffd743d13ee08e0ca9893f":0 - -RSAES-OAEP Decryption Example 8_4 -pkcs1_rsaes_oaep_decrypt:1031:16:"0a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f":16:"092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9":16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"fdda5fbf6ec361a9d9a4ac68af216a0686f438b1e0e5c36b955f74e107f39c0dddcc":"990ad573dc48a973235b6d82543618f2e955105d":"2e456847d8fc36ff0147d6993594b9397227d577752c79d0f904fcb039d4d812fea605a7b574dd82ca786f93752348438ee9f5b5454985d5f0e1699e3e7ad175a32e15f03deb042ab9fe1dd9db1bb86f8c089ccb45e7ef0c5ee7ca9b7290ca6b15bed47039788a8a93ff83e0e8d6244c71006362deef69b6f416fb3c684383fbd0":0 - -RSAES-OAEP Decryption Example 8_5 -pkcs1_rsaes_oaep_decrypt:1031:16:"0a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f":16:"092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9":16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"4a5f4914bee25de3c69341de07":"ecc63b28f0756f22f52ac8e6ec1251a6ec304718":"1fb9356fd5c4b1796db2ebf7d0d393cc810adf6145defc2fce714f79d93800d5e2ac211ea8bbecca4b654b94c3b18b30dd576ce34dc95436ef57a09415645923359a5d7b4171ef22c24670f1b229d3603e91f76671b7df97e7317c97734476d5f3d17d21cf82b5ba9f83df2e588d36984fd1b584468bd23b2e875f32f68953f7b2":0 - -RSAES-OAEP Decryption Example 8_6 -pkcs1_rsaes_oaep_decrypt:1031:16:"0a02ef8448d9fad8bbd0d004c8c2aa9751ef9721c1b0d03236a54b0df947cbaed5a255ee9e8e20d491ea1723fe094704a9762e88afd16ebb5994412ca966dc4f9f":16:"092d362e7ed3a0bfd9e9fd0e6c0301b6df29159cf50cc83b9b0cf4d6eea71a61e002b46e0ae9f2de62d25b5d7452d498b81c9ac6fc58593d4c3fb4f5d72dfbb0a9":16:"5bdf0e30d321dda5147f882408fa69195480df8f80d3f6e8bf5818504f36427ca9b1f5540b9c65a8f6974cf8447a244d9280201bb49fcbbe6378d1944cd227e230f96e3d10f819dcef276c64a00b2a4b6701e7d01de5fabde3b1e9a0df82f4631359cd22669647fbb1717246134ed7b497cfffbdc42b59c73a96ed90166212dff7":16:"010001":MBEDTLS_MD_SHA1:"8e07d66f7b880a72563abcd3f35092bc33409fb7f88f2472be":"3925c71b362d40a0a6de42145579ba1e7dd459fc":"3afd9c6600147b21798d818c655a0f4c9212db26d0b0dfdc2a7594ccb3d22f5bf1d7c3e112cd73fc7d509c7a8bafdd3c274d1399009f9609ec4be6477e453f075aa33db382870c1c3409aef392d7386ae3a696b99a94b4da0589447e955d16c98b17602a59bd736279fcd8fb280c4462d590bfa9bf13fed570eafde97330a2c210":0 - -RSAES-OAEP Decryption Example 9_1 -pkcs1_rsaes_oaep_decrypt:1536:16:"fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd":16:"d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1":16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"f735fd55ba92592c3b52b8f9c4f69aaa1cbef8fe88add095595412467f9cf4ec0b896c59eda16210e7549c8abb10cdbc21a12ec9b6b5b8fd2f10399eb6":"8ec965f134a3ec9931e92a1ca0dc8169d5ea705c":"267bcd118acab1fc8ba81c85d73003cb8610fa55c1d97da8d48a7c7f06896a4db751aa284255b9d36ad65f37653d829f1b37f97b8001942545b2fc2c55a7376ca7a1be4b1760c8e05a33e5aa2526b8d98e317088e7834c755b2a59b12631a182c05d5d43ab1779264f8456f515ce57dfdf512d5493dab7b7338dc4b7d78db9c091ac3baf537a69fc7f549d979f0eff9a94fda4169bd4d1d19a69c99e33c3b55490d501b39b1edae118ff6793a153261584d3a5f39f6e682e3d17c8cd1261fa72":0 - -RSAES-OAEP Decryption Example 9_2 -pkcs1_rsaes_oaep_decrypt:1536:16:"fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd":16:"d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1":16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"81b906605015a63aabe42ddf11e1978912f5404c7474b26dce3ed482bf961ecc818bf420c54659":"ecb1b8b25fa50cdab08e56042867f4af5826d16c":"93ac9f0671ec29acbb444effc1a5741351d60fdb0e393fbf754acf0de49761a14841df7772e9bc82773966a1584c4d72baea00118f83f35cca6e537cbd4d811f5583b29783d8a6d94cd31be70d6f526c10ff09c6fa7ce069795a3fcd0511fd5fcb564bcc80ea9c78f38b80012539d8a4ddf6fe81e9cddb7f50dbbbbcc7e5d86097ccf4ec49189fb8bf318be6d5a0715d516b49af191258cd32dc833ce6eb4673c03a19bbace88cc54895f636cc0c1ec89096d11ce235a265ca1764232a689ae8":0 - -RSAES-OAEP Decryption Example 9_3 -pkcs1_rsaes_oaep_decrypt:1536:16:"fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd":16:"d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1":16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"fd326429df9b890e09b54b18b8f34f1e24":"e89bb032c6ce622cbdb53bc9466014ea77f777c0":"81ebdd95054b0c822ef9ad7693f5a87adfb4b4c4ce70df2df84ed49c04da58ba5fc20a19e1a6e8b7a3900b22796dc4e869ee6b42792d15a8eceb56c09c69914e813cea8f6931e4b8ed6f421af298d595c97f4789c7caa612c7ef360984c21b93edc5401068b5af4c78a8771b984d53b8ea8adf2f6a7d4a0ba76c75e1dd9f658f20ded4a46071d46d7791b56803d8fea7f0b0f8e41ae3f09383a6f9585fe7753eaaffd2bf94563108beecc207bbb535f5fcc705f0dde9f708c62f49a9c90371d3":0 - -RSAES-OAEP Decryption Example 9_4 -pkcs1_rsaes_oaep_decrypt:1536:16:"fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd":16:"d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1":16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"f1459b5f0c92f01a0f723a2e5662484d8f8c0a20fc29dad6acd43bb5f3effdf4e1b63e07fdfe6628d0d74ca19bf2d69e4a0abf86d293925a796772f8088e":"606f3b99c0b9ccd771eaa29ea0e4c884f3189ccc":"bcc35f94cde66cb1136625d625b94432a35b22f3d2fa11a613ff0fca5bd57f87b902ccdc1cd0aebcb0715ee869d1d1fe395f6793003f5eca465059c88660d446ff5f0818552022557e38c08a67ead991262254f10682975ec56397768537f4977af6d5f6aaceb7fb25dec5937230231fd8978af49119a29f29e424ab8272b47562792d5c94f774b8829d0b0d9f1a8c9eddf37574d5fa248eefa9c5271fc5ec2579c81bdd61b410fa61fe36e424221c113addb275664c801d34ca8c6351e4a858":0 - -RSAES-OAEP Decryption Example 9_5 -pkcs1_rsaes_oaep_decrypt:1536:16:"fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd":16:"d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1":16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"53e6e8c729d6f9c319dd317e74b0db8e4ccca25f3c8305746e137ac63a63ef3739e7b595abb96e8d55e54f7bd41ab433378ffb911d":"fcbc421402e9ecabc6082afa40ba5f26522c840e":"232afbc927fa08c2f6a27b87d4a5cb09c07dc26fae73d73a90558839f4fd66d281b87ec734bce237ba166698ed829106a7de6942cd6cdce78fed8d2e4d81428e66490d036264cef92af941d3e35055fe3981e14d29cbb9a4f67473063baec79a1179f5a17c9c1832f2838fd7d5e59bb9659d56dce8a019edef1bb3accc697cc6cc7a778f60a064c7f6f5d529c6210262e003de583e81e3167b89971fb8c0e15d44fffef89b53d8d64dd797d159b56d2b08ea5307ea12c241bd58d4ee278a1f2e":0 - -RSAES-OAEP Decryption Example 9_6 -pkcs1_rsaes_oaep_decrypt:1536:16:"fc8d6c04bec4eb9a8192ca7900cbe536e2e8b519decf33b2459798c6909df4f176db7d23190fc72b8865a718af895f1bcd9145298027423b605e70a47cf58390a8c3e88fc8c48e8b32e3da210dfbe3e881ea5674b6a348c21e93f9e55ea65efd":16:"d200d45e788aacea606a401d0460f87dd5c1027e12dc1a0d7586e8939d9cf789b40f51ac0442961de7d21cc21e05c83155c1f2aa9193387cfdf956cb48d153ba270406f9bbba537d4987d9e2f9942d7a14cbfffea74fecdda928d23e259f5ee1":16:"cf2cd41e34ca3a728ea5cb8aff64c36d27bdef5364e336fd68d3123c5a196a8c287013e853d5156d58d151954520fb4f6d7b17abb6817765909c576119659d902b1906ed8a2b10c155c24d124528dab9eeae379beac66e4a411786dcb8fd0062ebc030de1219a04c2a8c1b7dd3131e4d6b6caee2e31a5ed41ac1509b2ef1ee2ab18364be568ca941c25ecc84ff9d643b5ec1aaae102a20d73f479b780fd6da91075212d9eac03a0674d899eba2e431f4c44b615b6ba2232bd4b33baed73d625d":16:"010001":MBEDTLS_MD_SHA1:"b6b28ea2198d0c1008bc64":"23aade0e1e08bb9b9a78d2302a52f9c21b2e1ba2":"438cc7dc08a68da249e42505f8573ba60e2c2773d5b290f4cf9dff718e842081c383e67024a0f29594ea987b9d25e4b738f285970d195abb3a8c8054e3d79d6b9c9a8327ba596f1259e27126674766907d8d582ff3a8476154929adb1e6d1235b2ccb4ec8f663ba9cc670a92bebd853c8dbf69c6436d016f61add836e94732450434207f9fd4c43dec2a12a958efa01efe2669899b5e604c255c55fb7166de5589e369597bb09168c06dd5db177e06a1740eb2d5c82faeca6d92fcee9931ba9f":0 - -RSAES-OAEP Decryption Example 10_1 -pkcs1_rsaes_oaep_decrypt:2048:16:"ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce769":16:"bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc3863183":16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"8bba6bf82a6c0f86d5f1756e97956870b08953b06b4eb205bc1694ee":"47e1ab7119fee56c95ee5eaad86f40d0aa63bd33":"53ea5dc08cd260fb3b858567287fa91552c30b2febfba213f0ae87702d068d19bab07fe574523dfb42139d68c3c5afeee0bfe4cb7969cbf382b804d6e61396144e2d0e60741f8993c3014b58b9b1957a8babcd23af854f4c356fb1662aa72bfcc7e586559dc4280d160c126785a723ebeebeff71f11594440aaef87d10793a8774a239d4a04c87fe1467b9daf85208ec6c7255794a96cc29142f9a8bd418e3c1fd67344b0cd0829df3b2bec60253196293c6b34d3f75d32f213dd45c6273d505adf4cced1057cb758fc26aeefa441255ed4e64c199ee075e7f16646182fdb464739b68ab5daff0e63e9552016824f054bf4d3c8c90a97bb6b6553284eb429fcc":0 - -RSAES-OAEP Decryption Example 10_2 -pkcs1_rsaes_oaep_decrypt:2048:16:"ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce769":16:"bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc3863183":16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"e6ad181f053b58a904f2457510373e57":"6d17f5b4c1ffac351d195bf7b09d09f09a4079cf":"a2b1a430a9d657e2fa1c2bb5ed43ffb25c05a308fe9093c01031795f5874400110828ae58fb9b581ce9dddd3e549ae04a0985459bde6c626594e7b05dc4278b2a1465c1368408823c85e96dc66c3a30983c639664fc4569a37fe21e5a195b5776eed2df8d8d361af686e750229bbd663f161868a50615e0c337bec0ca35fec0bb19c36eb2e0bbcc0582fa1d93aacdb061063f59f2ce1ee43605e5d89eca183d2acdfe9f81011022ad3b43a3dd417dac94b4e11ea81b192966e966b182082e71964607b4f8002f36299844a11f2ae0faeac2eae70f8f4f98088acdcd0ac556e9fccc511521908fad26f04c64201450305778758b0538bf8b5bb144a828e629795":0 - -RSAES-OAEP Decryption Example 10_3 -pkcs1_rsaes_oaep_decrypt:2048:16:"ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce769":16:"bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc3863183":16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"510a2cf60e866fa2340553c94ea39fbc256311e83e94454b4124":"385387514deccc7c740dd8cdf9daee49a1cbfd54":"9886c3e6764a8b9a84e84148ebd8c3b1aa8050381a78f668714c16d9cfd2a6edc56979c535d9dee3b44b85c18be8928992371711472216d95dda98d2ee8347c9b14dffdff84aa48d25ac06f7d7e65398ac967b1ce90925f67dce049b7f812db0742997a74d44fe81dbe0e7a3feaf2e5c40af888d550ddbbe3bc20657a29543f8fc2913b9bd1a61b2ab2256ec409bbd7dc0d17717ea25c43f42ed27df8738bf4afc6766ff7aff0859555ee283920f4c8a63c4a7340cbafddc339ecdb4b0515002f96c932b5b79167af699c0ad3fccfdf0f44e85a70262bf2e18fe34b850589975e867ff969d48eabf212271546cdc05a69ecb526e52870c836f307bd798780ede":0 - -RSAES-OAEP Decryption Example 10_4 -pkcs1_rsaes_oaep_decrypt:2048:16:"ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce769":16:"bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc3863183":16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"bcdd190da3b7d300df9a06e22caae2a75f10c91ff667b7c16bde8b53064a2649a94045c9":"5caca6a0f764161a9684f85d92b6e0ef37ca8b65":"6318e9fb5c0d05e5307e1683436e903293ac4642358aaa223d7163013aba87e2dfda8e60c6860e29a1e92686163ea0b9175f329ca3b131a1edd3a77759a8b97bad6a4f8f4396f28cf6f39ca58112e48160d6e203daa5856f3aca5ffed577af499408e3dfd233e3e604dbe34a9c4c9082de65527cac6331d29dc80e0508a0fa7122e7f329f6cca5cfa34d4d1da417805457e008bec549e478ff9e12a763c477d15bbb78f5b69bd57830fc2c4ed686d79bc72a95d85f88134c6b0afe56a8ccfbc855828bb339bd17909cf1d70de3335ae07039093e606d655365de6550b872cd6de1d440ee031b61945f629ad8a353b0d40939e96a3c450d2a8d5eee9f678093c8":0 - -RSAES-OAEP Decryption Example 10_5 -pkcs1_rsaes_oaep_decrypt:2048:16:"ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce769":16:"bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc3863183":16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"a7dd6c7dc24b46f9dd5f1e91ada4c3b3df947e877232a9":"95bca9e3859894b3dd869fa7ecd5bbc6401bf3e4":"75290872ccfd4a4505660d651f56da6daa09ca1301d890632f6a992f3d565cee464afded40ed3b5be9356714ea5aa7655f4a1366c2f17c728f6f2c5a5d1f8e28429bc4e6f8f2cff8da8dc0e0a9808e45fd09ea2fa40cb2b6ce6ffff5c0e159d11b68d90a85f7b84e103b09e682666480c657505c0929259468a314786d74eab131573cf234bf57db7d9e66cc6748192e002dc0deea930585f0831fdcd9bc33d51f79ed2ffc16bcf4d59812fcebcaa3f9069b0e445686d644c25ccf63b456ee5fa6ffe96f19cdf751fed9eaf35957754dbf4bfea5216aa1844dc507cb2d080e722eba150308c2b5ff1193620f1766ecf4481bafb943bd292877f2136ca494aba0":0 - -RSAES-OAEP Decryption Example 10_6 -pkcs1_rsaes_oaep_decrypt:2048:16:"ecf5aecd1e5515fffacbd75a2816c6ebf49018cdfb4638e185d66a7396b6f8090f8018c7fd95cc34b857dc17f0cc6516bb1346ab4d582cadad7b4103352387b70338d084047c9d9539b6496204b3dd6ea442499207bec01f964287ff6336c3984658336846f56e46861881c10233d2176bf15a5e96ddc780bc868aa77d3ce769":16:"bc46c464fc6ac4ca783b0eb08a3c841b772f7e9b2f28babd588ae885e1a0c61e4858a0fb25ac299990f35be85164c259ba1175cdd7192707135184992b6c29b746dd0d2cabe142835f7d148cc161524b4a09946d48b828473f1ce76b6cb6886c345c03e05f41d51b5c3a90a3f24073c7d74a4fe25d9cf21c75960f3fc3863183":16:"ae45ed5601cec6b8cc05f803935c674ddbe0d75c4c09fd7951fc6b0caec313a8df39970c518bffba5ed68f3f0d7f22a4029d413f1ae07e4ebe9e4177ce23e7f5404b569e4ee1bdcf3c1fb03ef113802d4f855eb9b5134b5a7c8085adcae6fa2fa1417ec3763be171b0c62b760ede23c12ad92b980884c641f5a8fac26bdad4a03381a22fe1b754885094c82506d4019a535a286afeb271bb9ba592de18dcf600c2aeeae56e02f7cf79fc14cf3bdc7cd84febbbf950ca90304b2219a7aa063aefa2c3c1980e560cd64afe779585b6107657b957857efde6010988ab7de417fc88d8f384c4e6e72c3f943e0c31c0c4a5cc36f879d8a3ac9d7d59860eaada6b83bb":16:"010001":MBEDTLS_MD_SHA1:"eaf1a73a1b0c4609537de69cd9228bbcfb9a8ca8c6c3efaf056fe4a7f4634ed00b7c39ec6922d7b8ea2c04ebac":"9f47ddf42e97eea856a9bdbc714eb3ac22f6eb32":"2d207a73432a8fb4c03051b3f73b28a61764098dfa34c47a20995f8115aa6816679b557e82dbee584908c6e69782d7deb34dbd65af063d57fca76a5fd069492fd6068d9984d209350565a62e5c77f23038c12cb10c6634709b547c46f6b4a709bd85ca122d74465ef97762c29763e06dbc7a9e738c78bfca0102dc5e79d65b973f28240caab2e161a78b57d262457ed8195d53e3c7ae9da021883c6db7c24afdd2322eac972ad3c354c5fcef1e146c3a0290fb67adf007066e00428d2cec18ce58f9328698defef4b2eb5ec76918fde1c198cbb38b7afc67626a9aefec4322bfd90d2563481c9a221f78c8272c82d1b62ab914e1c69f6af6ef30ca5260db4a46":0 - -RSASSA-PSS Signing Test Vector Int -pkcs1_rsassa_pss_sign:1024:16:"d17f655bf27c8b16d35462c905cc04a26f37e2a67fa9c0ce0dced472394a0df743fe7f929e378efdb368eddff453cf007af6d948e0ade757371f8a711e278f6b":16:"c6d92b6fee7414d1358ce1546fb62987530b90bd15e0f14963a5e2635adb69347ec0c01b2ab1763fd8ac1a592fb22757463a982425bb97a3a437c5bf86d03f2f":16:"a2ba40ee07e3b2bd2f02ce227f36a195024486e49c19cb41bbbdfbba98b22b0e577c2eeaffa20d883a76e65e394c69d4b3c05a1e8fadda27edb2a42bc000fe888b9b32c22d15add0cd76b3e7936e19955b220dd17d4ea904b1ec102b2e4de7751222aa99151024c7cb41cc5ea21d00eeb41f7c800834d2c6e06bce3bce7ea9a5":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"859eef2fd78aca00308bdc471193bf55bf9d78db8f8a672b484634f3c9c26e6478ae10260fe0dd8c082e53a5293af2173cd50c6d5d354febf78b26021c25c02712e78cd4694c9f469777e451e7f8e9e04cd3739c6bbfedae487fb55644e9ca74ff77a53cb729802f6ed4a5ffa8ba159890fc":"e3b5d5d002c1bce50c2b65ef88a188d83bce7e61":"8daa627d3de7595d63056c7ec659e54406f10610128baae821c8b2a0f3936d54dc3bdce46689f6b7951bb18e840542769718d5715d210d85efbb596192032c42be4c29972c856275eb6d5a45f05f51876fc6743deddd28caec9bb30ea99e02c3488269604fe497f74ccd7c7fca1671897123cbd30def5d54a2b5536ad90a747e":0 - -RSASSA-PSS Verification Test Vector Int -pkcs1_rsassa_pss_verify:1024:16:"a2ba40ee07e3b2bd2f02ce227f36a195024486e49c19cb41bbbdfbba98b22b0e577c2eeaffa20d883a76e65e394c69d4b3c05a1e8fadda27edb2a42bc000fe888b9b32c22d15add0cd76b3e7936e19955b220dd17d4ea904b1ec102b2e4de7751222aa99151024c7cb41cc5ea21d00eeb41f7c800834d2c6e06bce3bce7ea9a5":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"859eef2fd78aca00308bdc471193bf55bf9d78db8f8a672b484634f3c9c26e6478ae10260fe0dd8c082e53a5293af2173cd50c6d5d354febf78b26021c25c02712e78cd4694c9f469777e451e7f8e9e04cd3739c6bbfedae487fb55644e9ca74ff77a53cb729802f6ed4a5ffa8ba159890fc":"e3b5d5d002c1bce50c2b65ef88a188d83bce7e61":"8daa627d3de7595d63056c7ec659e54406f10610128baae821c8b2a0f3936d54dc3bdce46689f6b7951bb18e840542769718d5715d210d85efbb596192032c42be4c29972c856275eb6d5a45f05f51876fc6743deddd28caec9bb30ea99e02c3488269604fe497f74ccd7c7fca1671897123cbd30def5d54a2b5536ad90a747e":0 - -RSASSA-PSS Signing Test Vector Hash too large -pkcs1_rsassa_pss_sign:1024:16:"d17f655bf27c8b16d35462c905cc04a26f37e2a67fa9c0ce0dced472394a0df743fe7f929e378efdb368eddff453cf007af6d948e0ade757371f8a711e278f6b":16:"c6d92b6fee7414d1358ce1546fb62987530b90bd15e0f14963a5e2635adb69347ec0c01b2ab1763fd8ac1a592fb22757463a982425bb97a3a437c5bf86d03f2f":16:"a2ba40ee07e3b2bd2f02ce227f36a195024486e49c19cb41bbbdfbba98b22b0e577c2eeaffa20d883a76e65e394c69d4b3c05a1e8fadda27edb2a42bc000fe888b9b32c22d15add0cd76b3e7936e19955b220dd17d4ea904b1ec102b2e4de7751222aa99151024c7cb41cc5ea21d00eeb41f7c800834d2c6e06bce3bce7ea9a5":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA512:"d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd32a7c8a05bbc90d32c49d436e99569fd00":"e3b5d5d002c1bce50c2b65ef88a188d83bce7e61":"":MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSASSA-PSS Signature Example 1_1 -pkcs1_rsassa_pss_sign:1024:16:"e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443":16:"b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd":16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"cdc87da223d786df3b45e0bbbc721326d1ee2af806cc315475cc6f0d9c66e1b62371d45ce2392e1ac92844c310102f156a0d8d52c1f4c40ba3aa65095786cb769757a6563ba958fed0bcc984e8b517a3d5f515b23b8a41e74aa867693f90dfb061a6e86dfaaee64472c00e5f20945729cbebe77f06ce78e08f4098fba41f9d6193c0317e8b60d4b6084acb42d29e3808a3bc372d85e331170fcbf7cc72d0b71c296648b3a4d10f416295d0807aa625cab2744fd9ea8fd223c42537029828bd16be02546f130fd2e33b936d2676e08aed1b73318b750a0167d0":"dee959c7e06411361420ff80185ed57f3e6776af":"9074308fb598e9701b2294388e52f971faac2b60a5145af185df5287b5ed2887e57ce7fd44dc8634e407c8e0e4360bc226f3ec227f9d9e54638e8d31f5051215df6ebb9c2f9579aa77598a38f914b5b9c1bd83c4e2f9f382a0d0aa3542ffee65984a601bc69eb28deb27dca12c82c2d4c3f66cd500f1ff2b994d8a4e30cbb33c":0 - -RSASSA-PSS Signature Example 1_1 (verify) -pkcs1_rsassa_pss_verify:1024:16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"cdc87da223d786df3b45e0bbbc721326d1ee2af806cc315475cc6f0d9c66e1b62371d45ce2392e1ac92844c310102f156a0d8d52c1f4c40ba3aa65095786cb769757a6563ba958fed0bcc984e8b517a3d5f515b23b8a41e74aa867693f90dfb061a6e86dfaaee64472c00e5f20945729cbebe77f06ce78e08f4098fba41f9d6193c0317e8b60d4b6084acb42d29e3808a3bc372d85e331170fcbf7cc72d0b71c296648b3a4d10f416295d0807aa625cab2744fd9ea8fd223c42537029828bd16be02546f130fd2e33b936d2676e08aed1b73318b750a0167d0":"dee959c7e06411361420ff80185ed57f3e6776af":"9074308fb598e9701b2294388e52f971faac2b60a5145af185df5287b5ed2887e57ce7fd44dc8634e407c8e0e4360bc226f3ec227f9d9e54638e8d31f5051215df6ebb9c2f9579aa77598a38f914b5b9c1bd83c4e2f9f382a0d0aa3542ffee65984a601bc69eb28deb27dca12c82c2d4c3f66cd500f1ff2b994d8a4e30cbb33c":0 - -RSASSA-PSS Signature Example 1_2 -pkcs1_rsassa_pss_sign:1024:16:"e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443":16:"b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd":16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"851384cdfe819c22ed6c4ccb30daeb5cf059bc8e1166b7e3530c4c233e2b5f8f71a1cca582d43ecc72b1bca16dfc7013226b9e":"ef2869fa40c346cb183dab3d7bffc98fd56df42d":"3ef7f46e831bf92b32274142a585ffcefbdca7b32ae90d10fb0f0c729984f04ef29a9df0780775ce43739b97838390db0a5505e63de927028d9d29b219ca2c4517832558a55d694a6d25b9dab66003c4cccd907802193be5170d26147d37b93590241be51c25055f47ef62752cfbe21418fafe98c22c4d4d47724fdb5669e843":0 - -RSASSA-PSS Signature Example 1_2 (verify) -pkcs1_rsassa_pss_verify:1024:16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"851384cdfe819c22ed6c4ccb30daeb5cf059bc8e1166b7e3530c4c233e2b5f8f71a1cca582d43ecc72b1bca16dfc7013226b9e":"ef2869fa40c346cb183dab3d7bffc98fd56df42d":"3ef7f46e831bf92b32274142a585ffcefbdca7b32ae90d10fb0f0c729984f04ef29a9df0780775ce43739b97838390db0a5505e63de927028d9d29b219ca2c4517832558a55d694a6d25b9dab66003c4cccd907802193be5170d26147d37b93590241be51c25055f47ef62752cfbe21418fafe98c22c4d4d47724fdb5669e843":0 - -RSASSA-PSS Signature Example 1_3 -pkcs1_rsassa_pss_sign:1024:16:"e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443":16:"b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd":16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"a4b159941761c40c6a82f2b80d1b94f5aa2654fd17e12d588864679b54cd04ef8bd03012be8dc37f4b83af7963faff0dfa225477437c48017ff2be8191cf3955fc07356eab3f322f7f620e21d254e5db4324279fe067e0910e2e81ca2cab31c745e67a54058eb50d993cdb9ed0b4d029c06d21a94ca661c3ce27fae1d6cb20f4564d66ce4767583d0e5f060215b59017be85ea848939127bd8c9c4d47b51056c031cf336f17c9980f3b8f5b9b6878e8b797aa43b882684333e17893fe9caa6aa299f7ed1a18ee2c54864b7b2b99b72618fb02574d139ef50f019c9eef416971338e7d470":"710b9c4747d800d4de87f12afdce6df18107cc77":"666026fba71bd3e7cf13157cc2c51a8e4aa684af9778f91849f34335d141c00154c4197621f9624a675b5abc22ee7d5baaffaae1c9baca2cc373b3f33e78e6143c395a91aa7faca664eb733afd14d8827259d99a7550faca501ef2b04e33c23aa51f4b9e8282efdb728cc0ab09405a91607c6369961bc8270d2d4f39fce612b1":0 - -RSASSA-PSS Signature Example 1_3 (verify) -pkcs1_rsassa_pss_verify:1024:16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"a4b159941761c40c6a82f2b80d1b94f5aa2654fd17e12d588864679b54cd04ef8bd03012be8dc37f4b83af7963faff0dfa225477437c48017ff2be8191cf3955fc07356eab3f322f7f620e21d254e5db4324279fe067e0910e2e81ca2cab31c745e67a54058eb50d993cdb9ed0b4d029c06d21a94ca661c3ce27fae1d6cb20f4564d66ce4767583d0e5f060215b59017be85ea848939127bd8c9c4d47b51056c031cf336f17c9980f3b8f5b9b6878e8b797aa43b882684333e17893fe9caa6aa299f7ed1a18ee2c54864b7b2b99b72618fb02574d139ef50f019c9eef416971338e7d470":"710b9c4747d800d4de87f12afdce6df18107cc77":"666026fba71bd3e7cf13157cc2c51a8e4aa684af9778f91849f34335d141c00154c4197621f9624a675b5abc22ee7d5baaffaae1c9baca2cc373b3f33e78e6143c395a91aa7faca664eb733afd14d8827259d99a7550faca501ef2b04e33c23aa51f4b9e8282efdb728cc0ab09405a91607c6369961bc8270d2d4f39fce612b1":0 - -RSASSA-PSS Signature Example 1_4 -pkcs1_rsassa_pss_sign:1024:16:"e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443":16:"b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd":16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"bc656747fa9eafb3f0":"056f00985de14d8ef5cea9e82f8c27bef720335e":"4609793b23e9d09362dc21bb47da0b4f3a7622649a47d464019b9aeafe53359c178c91cd58ba6bcb78be0346a7bc637f4b873d4bab38ee661f199634c547a1ad8442e03da015b136e543f7ab07c0c13e4225b8de8cce25d4f6eb8400f81f7e1833b7ee6e334d370964ca79fdb872b4d75223b5eeb08101591fb532d155a6de87":0 - -RSASSA-PSS Signature Example 1_4 (verify) -pkcs1_rsassa_pss_verify:1024:16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"bc656747fa9eafb3f0":"056f00985de14d8ef5cea9e82f8c27bef720335e":"4609793b23e9d09362dc21bb47da0b4f3a7622649a47d464019b9aeafe53359c178c91cd58ba6bcb78be0346a7bc637f4b873d4bab38ee661f199634c547a1ad8442e03da015b136e543f7ab07c0c13e4225b8de8cce25d4f6eb8400f81f7e1833b7ee6e334d370964ca79fdb872b4d75223b5eeb08101591fb532d155a6de87":0 - -RSASSA-PSS Signature Example 1_5 -pkcs1_rsassa_pss_sign:1024:16:"e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443":16:"b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd":16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"b45581547e5427770c768e8b82b75564e0ea4e9c32594d6bff706544de0a8776c7a80b4576550eee1b2acabc7e8b7d3ef7bb5b03e462c11047eadd00629ae575480ac1470fe046f13a2bf5af17921dc4b0aa8b02bee6334911651d7f8525d10f32b51d33be520d3ddf5a709955a3dfe78283b9e0ab54046d150c177f037fdccc5be4ea5f68b5e5a38c9d7edcccc4975f455a6909b4":"80e70ff86a08de3ec60972b39b4fbfdcea67ae8e":"1d2aad221ca4d31ddf13509239019398e3d14b32dc34dc5af4aeaea3c095af73479cf0a45e5629635a53a018377615b16cb9b13b3e09d671eb71e387b8545c5960da5a64776e768e82b2c93583bf104c3fdb23512b7b4e89f633dd0063a530db4524b01c3f384c09310e315a79dcd3d684022a7f31c865a664e316978b759fad":0 - -RSASSA-PSS Signature Example 1_5 (verify) -pkcs1_rsassa_pss_verify:1024:16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"b45581547e5427770c768e8b82b75564e0ea4e9c32594d6bff706544de0a8776c7a80b4576550eee1b2acabc7e8b7d3ef7bb5b03e462c11047eadd00629ae575480ac1470fe046f13a2bf5af17921dc4b0aa8b02bee6334911651d7f8525d10f32b51d33be520d3ddf5a709955a3dfe78283b9e0ab54046d150c177f037fdccc5be4ea5f68b5e5a38c9d7edcccc4975f455a6909b4":"80e70ff86a08de3ec60972b39b4fbfdcea67ae8e":"1d2aad221ca4d31ddf13509239019398e3d14b32dc34dc5af4aeaea3c095af73479cf0a45e5629635a53a018377615b16cb9b13b3e09d671eb71e387b8545c5960da5a64776e768e82b2c93583bf104c3fdb23512b7b4e89f633dd0063a530db4524b01c3f384c09310e315a79dcd3d684022a7f31c865a664e316978b759fad":0 - -RSASSA-PSS Signature Example 1_6 -pkcs1_rsassa_pss_sign:1024:16:"e7e8942720a877517273a356053ea2a1bc0c94aa72d55c6e86296b2dfc967948c0a72cbccca7eacb35706e09a1df55a1535bd9b3cc34160b3b6dcd3eda8e6443":16:"b69dca1cf7d4d7ec81e75b90fcca874abcde123fd2700180aa90479b6e48de8d67ed24f9f19d85ba275874f542cd20dc723e6963364a1f9425452b269a6799fd":16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"10aae9a0ab0b595d0841207b700d48d75faedde3b775cd6b4cc88ae06e4694ec74ba18f8520d4f5ea69cbbe7cc2beba43efdc10215ac4eb32dc302a1f53dc6c4352267e7936cfebf7c8d67035784a3909fa859c7b7b59b8e39c5c2349f1886b705a30267d402f7486ab4f58cad5d69adb17ab8cd0ce1caf5025af4ae24b1fb8794c6070cc09a51e2f9911311e3877d0044c71c57a993395008806b723ac38373d395481818528c1e7053739282053529510e935cd0fa77b8fa53cc2d474bd4fb3cc5c672d6ffdc90a00f9848712c4bcfe46c60573659b11e6457e861f0f604b6138d144f8ce4e2da73":"a8ab69dd801f0074c2a1fc60649836c616d99681":"2a34f6125e1f6b0bf971e84fbd41c632be8f2c2ace7de8b6926e31ff93e9af987fbc06e51e9be14f5198f91f3f953bd67da60a9df59764c3dc0fe08e1cbef0b75f868d10ad3fba749fef59fb6dac46a0d6e504369331586f58e4628f39aa278982543bc0eeb537dc61958019b394fb273f215858a0a01ac4d650b955c67f4c58":0 - -RSASSA-PSS Signature Example 1_6 (verify) -pkcs1_rsassa_pss_verify:1024:16:"a56e4a0e701017589a5187dc7ea841d156f2ec0e36ad52a44dfeb1e61f7ad991d8c51056ffedb162b4c0f283a12a88a394dff526ab7291cbb307ceabfce0b1dfd5cd9508096d5b2b8b6df5d671ef6377c0921cb23c270a70e2598e6ff89d19f105acc2d3f0cb35f29280e1386b6f64c4ef22e1e1f20d0ce8cffb2249bd9a2137":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"10aae9a0ab0b595d0841207b700d48d75faedde3b775cd6b4cc88ae06e4694ec74ba18f8520d4f5ea69cbbe7cc2beba43efdc10215ac4eb32dc302a1f53dc6c4352267e7936cfebf7c8d67035784a3909fa859c7b7b59b8e39c5c2349f1886b705a30267d402f7486ab4f58cad5d69adb17ab8cd0ce1caf5025af4ae24b1fb8794c6070cc09a51e2f9911311e3877d0044c71c57a993395008806b723ac38373d395481818528c1e7053739282053529510e935cd0fa77b8fa53cc2d474bd4fb3cc5c672d6ffdc90a00f9848712c4bcfe46c60573659b11e6457e861f0f604b6138d144f8ce4e2da73":"a8ab69dd801f0074c2a1fc60649836c616d99681":"2a34f6125e1f6b0bf971e84fbd41c632be8f2c2ace7de8b6926e31ff93e9af987fbc06e51e9be14f5198f91f3f953bd67da60a9df59764c3dc0fe08e1cbef0b75f868d10ad3fba749fef59fb6dac46a0d6e504369331586f58e4628f39aa278982543bc0eeb537dc61958019b394fb273f215858a0a01ac4d650b955c67f4c58":0 - -RSASSA-PSS Signature Example 2_1 -pkcs1_rsassa_pss_sign:1025:16:"016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1":16:"014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079":16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"daba032066263faedb659848115278a52c44faa3a76f37515ed336321072c40a9d9b53bc05014078adf520875146aae70ff060226dcb7b1f1fc27e9360":"57bf160bcb02bb1dc7280cf0458530b7d2832ff7":"014c5ba5338328ccc6e7a90bf1c0ab3fd606ff4796d3c12e4b639ed9136a5fec6c16d8884bdd99cfdc521456b0742b736868cf90de099adb8d5ffd1deff39ba4007ab746cefdb22d7df0e225f54627dc65466131721b90af445363a8358b9f607642f78fab0ab0f43b7168d64bae70d8827848d8ef1e421c5754ddf42c2589b5b3":0 - -RSASSA-PSS Signature Example 2_1 (verify) -pkcs1_rsassa_pss_verify:1025:16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"daba032066263faedb659848115278a52c44faa3a76f37515ed336321072c40a9d9b53bc05014078adf520875146aae70ff060226dcb7b1f1fc27e9360":"57bf160bcb02bb1dc7280cf0458530b7d2832ff7":"014c5ba5338328ccc6e7a90bf1c0ab3fd606ff4796d3c12e4b639ed9136a5fec6c16d8884bdd99cfdc521456b0742b736868cf90de099adb8d5ffd1deff39ba4007ab746cefdb22d7df0e225f54627dc65466131721b90af445363a8358b9f607642f78fab0ab0f43b7168d64bae70d8827848d8ef1e421c5754ddf42c2589b5b3":0 - -RSASSA-PSS Signature Example 2_2 -pkcs1_rsassa_pss_sign:1025:16:"016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1":16:"014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079":16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e4f8601a8a6da1be34447c0959c058570c3668cfd51dd5f9ccd6ad4411fe8213486d78a6c49f93efc2ca2288cebc2b9b60bd04b1e220d86e3d4848d709d032d1e8c6a070c6af9a499fcf95354b14ba6127c739de1bb0fd16431e46938aec0cf8ad9eb72e832a7035de9b7807bdc0ed8b68eb0f5ac2216be40ce920c0db0eddd3860ed788efaccaca502d8f2bd6d1a7c1f41ff46f1681c8f1f818e9c4f6d91a0c7803ccc63d76a6544d843e084e363b8acc55aa531733edb5dee5b5196e9f03e8b731b3776428d9e457fe3fbcb3db7274442d785890e9cb0854b6444dace791d7273de1889719338a77fe":"7f6dd359e604e60870e898e47b19bf2e5a7b2a90":"010991656cca182b7f29d2dbc007e7ae0fec158eb6759cb9c45c5ff87c7635dd46d150882f4de1e9ae65e7f7d9018f6836954a47c0a81a8a6b6f83f2944d6081b1aa7c759b254b2c34b691da67cc0226e20b2f18b42212761dcd4b908a62b371b5918c5742af4b537e296917674fb914194761621cc19a41f6fb953fbcbb649dea":0 - -RSASSA-PSS Signature Example 2_2 (verify) -pkcs1_rsassa_pss_verify:1025:16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e4f8601a8a6da1be34447c0959c058570c3668cfd51dd5f9ccd6ad4411fe8213486d78a6c49f93efc2ca2288cebc2b9b60bd04b1e220d86e3d4848d709d032d1e8c6a070c6af9a499fcf95354b14ba6127c739de1bb0fd16431e46938aec0cf8ad9eb72e832a7035de9b7807bdc0ed8b68eb0f5ac2216be40ce920c0db0eddd3860ed788efaccaca502d8f2bd6d1a7c1f41ff46f1681c8f1f818e9c4f6d91a0c7803ccc63d76a6544d843e084e363b8acc55aa531733edb5dee5b5196e9f03e8b731b3776428d9e457fe3fbcb3db7274442d785890e9cb0854b6444dace791d7273de1889719338a77fe":"7f6dd359e604e60870e898e47b19bf2e5a7b2a90":"010991656cca182b7f29d2dbc007e7ae0fec158eb6759cb9c45c5ff87c7635dd46d150882f4de1e9ae65e7f7d9018f6836954a47c0a81a8a6b6f83f2944d6081b1aa7c759b254b2c34b691da67cc0226e20b2f18b42212761dcd4b908a62b371b5918c5742af4b537e296917674fb914194761621cc19a41f6fb953fbcbb649dea":0 - -RSASSA-PSS Signature Example 2_3 -pkcs1_rsassa_pss_sign:1025:16:"016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1":16:"014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079":16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"52a1d96c8ac39e41e455809801b927a5b445c10d902a0dcd3850d22a66d2bb0703e67d5867114595aabf5a7aeb5a8f87034bbb30e13cfd4817a9be76230023606d0286a3faf8a4d22b728ec518079f9e64526e3a0cc7941aa338c437997c680ccac67c66bfa1":"fca862068bce2246724b708a0519da17e648688c":"007f0030018f53cdc71f23d03659fde54d4241f758a750b42f185f87578520c30742afd84359b6e6e8d3ed959dc6fe486bedc8e2cf001f63a7abe16256a1b84df0d249fc05d3194ce5f0912742dbbf80dd174f6c51f6bad7f16cf3364eba095a06267dc3793803ac7526aebe0a475d38b8c2247ab51c4898df7047dc6adf52c6c4":0 - -RSASSA-PSS Signature Example 2_3 (verify) -pkcs1_rsassa_pss_verify:1025:16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"52a1d96c8ac39e41e455809801b927a5b445c10d902a0dcd3850d22a66d2bb0703e67d5867114595aabf5a7aeb5a8f87034bbb30e13cfd4817a9be76230023606d0286a3faf8a4d22b728ec518079f9e64526e3a0cc7941aa338c437997c680ccac67c66bfa1":"fca862068bce2246724b708a0519da17e648688c":"007f0030018f53cdc71f23d03659fde54d4241f758a750b42f185f87578520c30742afd84359b6e6e8d3ed959dc6fe486bedc8e2cf001f63a7abe16256a1b84df0d249fc05d3194ce5f0912742dbbf80dd174f6c51f6bad7f16cf3364eba095a06267dc3793803ac7526aebe0a475d38b8c2247ab51c4898df7047dc6adf52c6c4":0 - -RSASSA-PSS Signature Example 2_4 -pkcs1_rsassa_pss_sign:1025:16:"016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1":16:"014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079":16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"a7182c83ac18be6570a106aa9d5c4e3dbbd4afaeb0c60c4a23e1969d79ff":"8070ef2de945c02387684ba0d33096732235d440":"009cd2f4edbe23e12346ae8c76dd9ad3230a62076141f16c152ba18513a48ef6f010e0e37fd3df10a1ec629a0cb5a3b5d2893007298c30936a95903b6ba85555d9ec3673a06108fd62a2fda56d1ce2e85c4db6b24a81ca3b496c36d4fd06eb7c9166d8e94877c42bea622b3bfe9251fdc21d8d5371badad78a488214796335b40b":0 - -RSASSA-PSS Signature Example 2_4 (verify) -pkcs1_rsassa_pss_verify:1025:16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"a7182c83ac18be6570a106aa9d5c4e3dbbd4afaeb0c60c4a23e1969d79ff":"8070ef2de945c02387684ba0d33096732235d440":"009cd2f4edbe23e12346ae8c76dd9ad3230a62076141f16c152ba18513a48ef6f010e0e37fd3df10a1ec629a0cb5a3b5d2893007298c30936a95903b6ba85555d9ec3673a06108fd62a2fda56d1ce2e85c4db6b24a81ca3b496c36d4fd06eb7c9166d8e94877c42bea622b3bfe9251fdc21d8d5371badad78a488214796335b40b":0 - -RSASSA-PSS Signature Example 2_5 -pkcs1_rsassa_pss_sign:1025:16:"016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1":16:"014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079":16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"86a83d4a72ee932a4f5630af6579a386b78fe88999e0abd2d49034a4bfc854dd94f1094e2e8cd7a179d19588e4aefc1b1bd25e95e3dd461f":"17639a4e88d722c4fca24d079a8b29c32433b0c9":"00ec430824931ebd3baa43034dae98ba646b8c36013d1671c3cf1cf8260c374b19f8e1cc8d965012405e7e9bf7378612dfcc85fce12cda11f950bd0ba8876740436c1d2595a64a1b32efcfb74a21c873b3cc33aaf4e3dc3953de67f0674c0453b4fd9f604406d441b816098cb106fe3472bc251f815f59db2e4378a3addc181ecf":0 - -RSASSA-PSS Signature Example 2_5 (verify) -pkcs1_rsassa_pss_verify:1025:16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"86a83d4a72ee932a4f5630af6579a386b78fe88999e0abd2d49034a4bfc854dd94f1094e2e8cd7a179d19588e4aefc1b1bd25e95e3dd461f":"17639a4e88d722c4fca24d079a8b29c32433b0c9":"00ec430824931ebd3baa43034dae98ba646b8c36013d1671c3cf1cf8260c374b19f8e1cc8d965012405e7e9bf7378612dfcc85fce12cda11f950bd0ba8876740436c1d2595a64a1b32efcfb74a21c873b3cc33aaf4e3dc3953de67f0674c0453b4fd9f604406d441b816098cb106fe3472bc251f815f59db2e4378a3addc181ecf":0 - -RSASSA-PSS Signature Example 2_6 -pkcs1_rsassa_pss_sign:1025:16:"016601e926a0f8c9e26ecab769ea65a5e7c52cc9e080ef519457c644da6891c5a104d3ea7955929a22e7c68a7af9fcad777c3ccc2b9e3d3650bce404399b7e59d1":16:"014eafa1d4d0184da7e31f877d1281ddda625664869e8379e67ad3b75eae74a580e9827abd6eb7a002cb5411f5266797768fb8e95ae40e3e8a01f35ff89e56c079":16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"049f9154d871ac4a7c7ab45325ba7545a1ed08f70525b2667cf1":"37810def1055ed922b063df798de5d0aabf886ee":"00475b1648f814a8dc0abdc37b5527f543b666bb6e39d30e5b49d3b876dccc58eac14e32a2d55c2616014456ad2f246fc8e3d560da3ddf379a1c0bd200f10221df078c219a151bc8d4ec9d2fc2564467811014ef15d8ea01c2ebbff8c2c8efab38096e55fcbe3285c7aa558851254faffa92c1c72b78758663ef4582843139d7a6":0 - -RSASSA-PSS Signature Example 2_6 (verify) -pkcs1_rsassa_pss_verify:1025:16:"01d40c1bcf97a68ae7cdbd8a7bf3e34fa19dcca4ef75a47454375f94514d88fed006fb829f8419ff87d6315da68a1ff3a0938e9abb3464011c303ad99199cf0c7c7a8b477dce829e8844f625b115e5e9c4a59cf8f8113b6834336a2fd2689b472cbb5e5cabe674350c59b6c17e176874fb42f8fc3d176a017edc61fd326c4b33c9":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"049f9154d871ac4a7c7ab45325ba7545a1ed08f70525b2667cf1":"37810def1055ed922b063df798de5d0aabf886ee":"00475b1648f814a8dc0abdc37b5527f543b666bb6e39d30e5b49d3b876dccc58eac14e32a2d55c2616014456ad2f246fc8e3d560da3ddf379a1c0bd200f10221df078c219a151bc8d4ec9d2fc2564467811014ef15d8ea01c2ebbff8c2c8efab38096e55fcbe3285c7aa558851254faffa92c1c72b78758663ef4582843139d7a6":0 - -RSASSA-PSS Signature Example 3_1 -pkcs1_rsassa_pss_sign:1026:16:"01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853":16:"01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651":16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"594b37333bbb2c84524a87c1a01f75fcec0e3256f108e38dca36d70d0057":"f31ad6c8cf89df78ed77feacbcc2f8b0a8e4cfaa":"0088b135fb1794b6b96c4a3e678197f8cac52b64b2fe907d6f27de761124964a99a01a882740ecfaed6c01a47464bb05182313c01338a8cd097214cd68ca103bd57d3bc9e816213e61d784f182467abf8a01cf253e99a156eaa8e3e1f90e3c6e4e3aa2d83ed0345b89fafc9c26077c14b6ac51454fa26e446e3a2f153b2b16797f":0 - -RSASSA-PSS Signature Example 3_1 (verify) -pkcs1_rsassa_pss_verify:1026:16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"594b37333bbb2c84524a87c1a01f75fcec0e3256f108e38dca36d70d0057":"f31ad6c8cf89df78ed77feacbcc2f8b0a8e4cfaa":"0088b135fb1794b6b96c4a3e678197f8cac52b64b2fe907d6f27de761124964a99a01a882740ecfaed6c01a47464bb05182313c01338a8cd097214cd68ca103bd57d3bc9e816213e61d784f182467abf8a01cf253e99a156eaa8e3e1f90e3c6e4e3aa2d83ed0345b89fafc9c26077c14b6ac51454fa26e446e3a2f153b2b16797f":0 - -RSASSA-PSS Signature Example 3_2 -pkcs1_rsassa_pss_sign:1026:16:"01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853":16:"01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651":16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8b769528884a0d1ffd090cf102993e796dadcfbddd38e44ff6324ca451":"fcf9f0e1f199a3d1d0da681c5b8606fc642939f7":"02a5f0a858a0864a4f65017a7d69454f3f973a2999839b7bbc48bf78641169179556f595fa41f6ff18e286c2783079bc0910ee9cc34f49ba681124f923dfa88f426141a368a5f5a930c628c2c3c200e18a7644721a0cbec6dd3f6279bde3e8f2be5e2d4ee56f97e7ceaf33054be7042bd91a63bb09f897bd41e81197dee99b11af":0 - -RSASSA-PSS Signature Example 3_2 (verify) -pkcs1_rsassa_pss_verify:1026:16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8b769528884a0d1ffd090cf102993e796dadcfbddd38e44ff6324ca451":"fcf9f0e1f199a3d1d0da681c5b8606fc642939f7":"02a5f0a858a0864a4f65017a7d69454f3f973a2999839b7bbc48bf78641169179556f595fa41f6ff18e286c2783079bc0910ee9cc34f49ba681124f923dfa88f426141a368a5f5a930c628c2c3c200e18a7644721a0cbec6dd3f6279bde3e8f2be5e2d4ee56f97e7ceaf33054be7042bd91a63bb09f897bd41e81197dee99b11af":0 - -RSASSA-PSS Signature Example 3_3 -pkcs1_rsassa_pss_sign:1026:16:"01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853":16:"01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651":16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"1abdba489c5ada2f995ed16f19d5a94d9e6ec34a8d84f84557d26e5ef9b02b22887e3f9a4b690ad1149209c20c61431f0c017c36c2657b35d7b07d3f5ad8708507a9c1b831df835a56f831071814ea5d3d8d8f6ade40cba38b42db7a2d3d7a29c8f0a79a7838cf58a9757fa2fe4c40df9baa193bfc6f92b123ad57b07ace3e6ac068c9f106afd9eeb03b4f37c25dbfbcfb3071f6f9771766d072f3bb070af6605532973ae25051":"986e7c43dbb671bd41b9a7f4b6afc80e805f2423":"0244bcd1c8c16955736c803be401272e18cb990811b14f72db964124d5fa760649cbb57afb8755dbb62bf51f466cf23a0a1607576e983d778fceffa92df7548aea8ea4ecad2c29dd9f95bc07fe91ecf8bee255bfe8762fd7690aa9bfa4fa0849ef728c2c42c4532364522df2ab7f9f8a03b63f7a499175828668f5ef5a29e3802c":0 - -RSASSA-PSS Signature Example 3_3 (verify) -pkcs1_rsassa_pss_verify:1026:16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"1abdba489c5ada2f995ed16f19d5a94d9e6ec34a8d84f84557d26e5ef9b02b22887e3f9a4b690ad1149209c20c61431f0c017c36c2657b35d7b07d3f5ad8708507a9c1b831df835a56f831071814ea5d3d8d8f6ade40cba38b42db7a2d3d7a29c8f0a79a7838cf58a9757fa2fe4c40df9baa193bfc6f92b123ad57b07ace3e6ac068c9f106afd9eeb03b4f37c25dbfbcfb3071f6f9771766d072f3bb070af6605532973ae25051":"986e7c43dbb671bd41b9a7f4b6afc80e805f2423":"0244bcd1c8c16955736c803be401272e18cb990811b14f72db964124d5fa760649cbb57afb8755dbb62bf51f466cf23a0a1607576e983d778fceffa92df7548aea8ea4ecad2c29dd9f95bc07fe91ecf8bee255bfe8762fd7690aa9bfa4fa0849ef728c2c42c4532364522df2ab7f9f8a03b63f7a499175828668f5ef5a29e3802c":0 - -RSASSA-PSS Signature Example 3_4 -pkcs1_rsassa_pss_sign:1026:16:"01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853":16:"01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651":16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8fb431f5ee792b6c2ac7db53cc428655aeb32d03f4e889c5c25de683c461b53acf89f9f8d3aabdf6b9f0c2a1de12e15b49edb3919a652fe9491c25a7fce1f722c2543608b69dc375ec":"f8312d9c8eea13ec0a4c7b98120c87509087c478":"0196f12a005b98129c8df13c4cb16f8aa887d3c40d96df3a88e7532ef39cd992f273abc370bc1be6f097cfebbf0118fd9ef4b927155f3df22b904d90702d1f7ba7a52bed8b8942f412cd7bd676c9d18e170391dcd345c06a730964b3f30bcce0bb20ba106f9ab0eeb39cf8a6607f75c0347f0af79f16afa081d2c92d1ee6f836b8":0 - -RSASSA-PSS Signature Example 3_4 (verify) -pkcs1_rsassa_pss_verify:1026:16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8fb431f5ee792b6c2ac7db53cc428655aeb32d03f4e889c5c25de683c461b53acf89f9f8d3aabdf6b9f0c2a1de12e15b49edb3919a652fe9491c25a7fce1f722c2543608b69dc375ec":"f8312d9c8eea13ec0a4c7b98120c87509087c478":"0196f12a005b98129c8df13c4cb16f8aa887d3c40d96df3a88e7532ef39cd992f273abc370bc1be6f097cfebbf0118fd9ef4b927155f3df22b904d90702d1f7ba7a52bed8b8942f412cd7bd676c9d18e170391dcd345c06a730964b3f30bcce0bb20ba106f9ab0eeb39cf8a6607f75c0347f0af79f16afa081d2c92d1ee6f836b8":0 - -RSASSA-PSS Signature Example 3_5 -pkcs1_rsassa_pss_sign:1026:16:"01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853":16:"01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651":16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"fef4161dfaaf9c5295051dfc1ff3810c8c9ec2e866f7075422c8ec4216a9c4ff49427d483cae10c8534a41b2fd15fee06960ec6fb3f7a7e94a2f8a2e3e43dc4a40576c3097ac953b1de86f0b4ed36d644f23ae14425529622464ca0cbf0b1741347238157fab59e4de5524096d62baec63ac64":"50327efec6292f98019fc67a2a6638563e9b6e2d":"021eca3ab4892264ec22411a752d92221076d4e01c0e6f0dde9afd26ba5acf6d739ef987545d16683e5674c9e70f1de649d7e61d48d0caeb4fb4d8b24fba84a6e3108fee7d0705973266ac524b4ad280f7ae17dc59d96d3351586b5a3bdb895d1e1f7820ac6135d8753480998382ba32b7349559608c38745290a85ef4e9f9bd83":0 - -RSASSA-PSS Signature Example 3_5 (verify) -pkcs1_rsassa_pss_verify:1026:16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"fef4161dfaaf9c5295051dfc1ff3810c8c9ec2e866f7075422c8ec4216a9c4ff49427d483cae10c8534a41b2fd15fee06960ec6fb3f7a7e94a2f8a2e3e43dc4a40576c3097ac953b1de86f0b4ed36d644f23ae14425529622464ca0cbf0b1741347238157fab59e4de5524096d62baec63ac64":"50327efec6292f98019fc67a2a6638563e9b6e2d":"021eca3ab4892264ec22411a752d92221076d4e01c0e6f0dde9afd26ba5acf6d739ef987545d16683e5674c9e70f1de649d7e61d48d0caeb4fb4d8b24fba84a6e3108fee7d0705973266ac524b4ad280f7ae17dc59d96d3351586b5a3bdb895d1e1f7820ac6135d8753480998382ba32b7349559608c38745290a85ef4e9f9bd83":0 - -RSASSA-PSS Signature Example 3_6 -pkcs1_rsassa_pss_sign:1026:16:"01bd36e18ece4b0fdb2e9c9d548bd1a7d6e2c21c6fdc35074a1d05b1c6c8b3d558ea2639c9a9a421680169317252558bd148ad215aac550e2dcf12a82d0ebfe853":16:"01b1b656ad86d8e19d5dc86292b3a192fdf6e0dd37877bad14822fa00190cab265f90d3f02057b6f54d6ecb14491e5adeacebc48bf0ebd2a2ad26d402e54f61651":16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"efd237bb098a443aeeb2bf6c3f8c81b8c01b7fcb3feb":"b0de3fc25b65f5af96b1d5cc3b27d0c6053087b3":"012fafec862f56e9e92f60ab0c77824f4299a0ca734ed26e0644d5d222c7f0bde03964f8e70a5cb65ed44e44d56ae0edf1ff86ca032cc5dd4404dbb76ab854586c44eed8336d08d457ce6c03693b45c0f1efef93624b95b8ec169c616d20e5538ebc0b6737a6f82b4bc0570924fc6b35759a3348426279f8b3d7744e2d222426ce":0 - -RSASSA-PSS Signature Example 3_6 (verify) -pkcs1_rsassa_pss_verify:1026:16:"02f246ef451ed3eebb9a310200cc25859c048e4be798302991112eb68ce6db674e280da21feded1ae74880ca522b18db249385012827c515f0e466a1ffa691d98170574e9d0eadb087586ca48933da3cc953d95bd0ed50de10ddcb6736107d6c831c7f663e833ca4c097e700ce0fb945f88fb85fe8e5a773172565b914a471a443":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"efd237bb098a443aeeb2bf6c3f8c81b8c01b7fcb3feb":"b0de3fc25b65f5af96b1d5cc3b27d0c6053087b3":"012fafec862f56e9e92f60ab0c77824f4299a0ca734ed26e0644d5d222c7f0bde03964f8e70a5cb65ed44e44d56ae0edf1ff86ca032cc5dd4404dbb76ab854586c44eed8336d08d457ce6c03693b45c0f1efef93624b95b8ec169c616d20e5538ebc0b6737a6f82b4bc0570924fc6b35759a3348426279f8b3d7744e2d222426ce":0 - -RSASSA-PSS Signature Example 4_1 -pkcs1_rsassa_pss_sign:1027:16:"029232336d2838945dba9dd7723f4e624a05f7375b927a87abe6a893a1658fd49f47f6c7b0fa596c65fa68a23f0ab432962d18d4343bd6fd671a5ea8d148413995":16:"020ef5efe7c5394aed2272f7e81a74f4c02d145894cb1b3cab23a9a0710a2afc7e3329acbb743d01f680c4d02afb4c8fde7e20930811bb2b995788b5e872c20bb1":16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"9fb03b827c8217d9":"ed7c98c95f30974fbe4fbddcf0f28d6021c0e91d":"0323d5b7bf20ba4539289ae452ae4297080feff4518423ff4811a817837e7d82f1836cdfab54514ff0887bddeebf40bf99b047abc3ecfa6a37a3ef00f4a0c4a88aae0904b745c846c4107e8797723e8ac810d9e3d95dfa30ff4966f4d75d13768d20857f2b1406f264cfe75e27d7652f4b5ed3575f28a702f8c4ed9cf9b2d44948":0 - -RSASSA-PSS Signature Example 4_1 (verify) -pkcs1_rsassa_pss_verify:1027:16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"9fb03b827c8217d9":"ed7c98c95f30974fbe4fbddcf0f28d6021c0e91d":"0323d5b7bf20ba4539289ae452ae4297080feff4518423ff4811a817837e7d82f1836cdfab54514ff0887bddeebf40bf99b047abc3ecfa6a37a3ef00f4a0c4a88aae0904b745c846c4107e8797723e8ac810d9e3d95dfa30ff4966f4d75d13768d20857f2b1406f264cfe75e27d7652f4b5ed3575f28a702f8c4ed9cf9b2d44948":0 - -RSASSA-PSS Signature Example 4_2 -pkcs1_rsassa_pss_sign:1027:16:"029232336d2838945dba9dd7723f4e624a05f7375b927a87abe6a893a1658fd49f47f6c7b0fa596c65fa68a23f0ab432962d18d4343bd6fd671a5ea8d148413995":16:"020ef5efe7c5394aed2272f7e81a74f4c02d145894cb1b3cab23a9a0710a2afc7e3329acbb743d01f680c4d02afb4c8fde7e20930811bb2b995788b5e872c20bb1":16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0ca2ad77797ece86de5bf768750ddb5ed6a3116ad99bbd17edf7f782f0db1cd05b0f677468c5ea420dc116b10e80d110de2b0461ea14a38be68620392e7e893cb4ea9393fb886c20ff790642305bf302003892e54df9f667509dc53920df583f50a3dd61abb6fab75d600377e383e6aca6710eeea27156e06752c94ce25ae99fcbf8592dbe2d7e27453cb44de07100ebb1a2a19811a478adbeab270f94e8fe369d90b3ca612f9f":"22d71d54363a4217aa55113f059b3384e3e57e44":"049d0185845a264d28feb1e69edaec090609e8e46d93abb38371ce51f4aa65a599bdaaa81d24fba66a08a116cb644f3f1e653d95c89db8bbd5daac2709c8984000178410a7c6aa8667ddc38c741f710ec8665aa9052be929d4e3b16782c1662114c5414bb0353455c392fc28f3db59054b5f365c49e1d156f876ee10cb4fd70598":0 - -RSASSA-PSS Signature Example 4_2 (verify) -pkcs1_rsassa_pss_verify:1027:16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0ca2ad77797ece86de5bf768750ddb5ed6a3116ad99bbd17edf7f782f0db1cd05b0f677468c5ea420dc116b10e80d110de2b0461ea14a38be68620392e7e893cb4ea9393fb886c20ff790642305bf302003892e54df9f667509dc53920df583f50a3dd61abb6fab75d600377e383e6aca6710eeea27156e06752c94ce25ae99fcbf8592dbe2d7e27453cb44de07100ebb1a2a19811a478adbeab270f94e8fe369d90b3ca612f9f":"22d71d54363a4217aa55113f059b3384e3e57e44":"049d0185845a264d28feb1e69edaec090609e8e46d93abb38371ce51f4aa65a599bdaaa81d24fba66a08a116cb644f3f1e653d95c89db8bbd5daac2709c8984000178410a7c6aa8667ddc38c741f710ec8665aa9052be929d4e3b16782c1662114c5414bb0353455c392fc28f3db59054b5f365c49e1d156f876ee10cb4fd70598":0 - -RSASSA-PSS Signature Example 4_3 -pkcs1_rsassa_pss_sign:1027:16:"029232336d2838945dba9dd7723f4e624a05f7375b927a87abe6a893a1658fd49f47f6c7b0fa596c65fa68a23f0ab432962d18d4343bd6fd671a5ea8d148413995":16:"020ef5efe7c5394aed2272f7e81a74f4c02d145894cb1b3cab23a9a0710a2afc7e3329acbb743d01f680c4d02afb4c8fde7e20930811bb2b995788b5e872c20bb1":16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"288062afc08fcdb7c5f8650b29837300461dd5676c17a20a3c8fb5148949e3f73d66b3ae82c7240e27c5b3ec4328ee7d6ddf6a6a0c9b5b15bcda196a9d0c76b119d534d85abd123962d583b76ce9d180bce1ca":"4af870fbc6516012ca916c70ba862ac7e8243617":"03fbc410a2ced59500fb99f9e2af2781ada74e13145624602782e2994813eefca0519ecd253b855fb626a90d771eae028b0c47a199cbd9f8e3269734af4163599090713a3fa910fa0960652721432b971036a7181a2bc0cab43b0b598bc6217461d7db305ff7e954c5b5bb231c39e791af6bcfa76b147b081321f72641482a2aad":0 - -RSASSA-PSS Signature Example 4_3 (verify) -pkcs1_rsassa_pss_verify:1027:16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"288062afc08fcdb7c5f8650b29837300461dd5676c17a20a3c8fb5148949e3f73d66b3ae82c7240e27c5b3ec4328ee7d6ddf6a6a0c9b5b15bcda196a9d0c76b119d534d85abd123962d583b76ce9d180bce1ca":"4af870fbc6516012ca916c70ba862ac7e8243617":"03fbc410a2ced59500fb99f9e2af2781ada74e13145624602782e2994813eefca0519ecd253b855fb626a90d771eae028b0c47a199cbd9f8e3269734af4163599090713a3fa910fa0960652721432b971036a7181a2bc0cab43b0b598bc6217461d7db305ff7e954c5b5bb231c39e791af6bcfa76b147b081321f72641482a2aad":0 - -RSASSA-PSS Signature Example 4_4 -pkcs1_rsassa_pss_sign:1027:16:"029232336d2838945dba9dd7723f4e624a05f7375b927a87abe6a893a1658fd49f47f6c7b0fa596c65fa68a23f0ab432962d18d4343bd6fd671a5ea8d148413995":16:"020ef5efe7c5394aed2272f7e81a74f4c02d145894cb1b3cab23a9a0710a2afc7e3329acbb743d01f680c4d02afb4c8fde7e20930811bb2b995788b5e872c20bb1":16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"6f4f9ab9501199cef55c6cf408fe7b36c557c49d420a4763d2463c8ad44b3cfc5be2742c0e7d9b0f6608f08c7f47b693ee":"40d2e180fae1eac439c190b56c2c0e14ddf9a226":"0486644bc66bf75d28335a6179b10851f43f09bded9fac1af33252bb9953ba4298cd6466b27539a70adaa3f89b3db3c74ab635d122f4ee7ce557a61e59b82ffb786630e5f9db53c77d9a0c12fab5958d4c2ce7daa807cd89ba2cc7fcd02ff470ca67b229fcce814c852c73cc93bea35be68459ce478e9d4655d121c8472f371d4f":0 - -RSASSA-PSS Signature Example 4_4 (verify) -pkcs1_rsassa_pss_verify:1027:16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"6f4f9ab9501199cef55c6cf408fe7b36c557c49d420a4763d2463c8ad44b3cfc5be2742c0e7d9b0f6608f08c7f47b693ee":"40d2e180fae1eac439c190b56c2c0e14ddf9a226":"0486644bc66bf75d28335a6179b10851f43f09bded9fac1af33252bb9953ba4298cd6466b27539a70adaa3f89b3db3c74ab635d122f4ee7ce557a61e59b82ffb786630e5f9db53c77d9a0c12fab5958d4c2ce7daa807cd89ba2cc7fcd02ff470ca67b229fcce814c852c73cc93bea35be68459ce478e9d4655d121c8472f371d4f":0 - -RSASSA-PSS Signature Example 4_5 -pkcs1_rsassa_pss_sign:1027:16:"029232336d2838945dba9dd7723f4e624a05f7375b927a87abe6a893a1658fd49f47f6c7b0fa596c65fa68a23f0ab432962d18d4343bd6fd671a5ea8d148413995":16:"020ef5efe7c5394aed2272f7e81a74f4c02d145894cb1b3cab23a9a0710a2afc7e3329acbb743d01f680c4d02afb4c8fde7e20930811bb2b995788b5e872c20bb1":16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e17d20385d501955823c3f666254c1d3dd36ad5168b8f18d286fdcf67a7dad94097085fab7ed86fe2142a28771717997ef1a7a08884efc39356d76077aaf82459a7fad45848875f2819b098937fe923bcc9dc442d72d754d812025090c9bc03db3080c138dd63b355d0b4b85d6688ac19f4de15084a0ba4e373b93ef4a555096691915dc23c00e954cdeb20a47cd55d16c3d8681d46ed7f2ed5ea42795be17baed25f0f4d113b3636addd585f16a8b5aec0c8fa9c5f03cbf3b9b73":"2497dc2b4615dfae5a663d49ffd56bf7efc11304":"022a80045353904cb30cbb542d7d4990421a6eec16a8029a8422adfd22d6aff8c4cc0294af110a0c067ec86a7d364134459bb1ae8ff836d5a8a2579840996b320b19f13a13fad378d931a65625dae2739f0c53670b35d9d3cbac08e733e4ec2b83af4b9196d63e7c4ff1ddeae2a122791a125bfea8deb0de8ccf1f4ffaf6e6fb0a":0 - -RSASSA-PSS Signature Example 4_5 (verify) -pkcs1_rsassa_pss_verify:1027:16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e17d20385d501955823c3f666254c1d3dd36ad5168b8f18d286fdcf67a7dad94097085fab7ed86fe2142a28771717997ef1a7a08884efc39356d76077aaf82459a7fad45848875f2819b098937fe923bcc9dc442d72d754d812025090c9bc03db3080c138dd63b355d0b4b85d6688ac19f4de15084a0ba4e373b93ef4a555096691915dc23c00e954cdeb20a47cd55d16c3d8681d46ed7f2ed5ea42795be17baed25f0f4d113b3636addd585f16a8b5aec0c8fa9c5f03cbf3b9b73":"2497dc2b4615dfae5a663d49ffd56bf7efc11304":"022a80045353904cb30cbb542d7d4990421a6eec16a8029a8422adfd22d6aff8c4cc0294af110a0c067ec86a7d364134459bb1ae8ff836d5a8a2579840996b320b19f13a13fad378d931a65625dae2739f0c53670b35d9d3cbac08e733e4ec2b83af4b9196d63e7c4ff1ddeae2a122791a125bfea8deb0de8ccf1f4ffaf6e6fb0a":0 - -RSASSA-PSS Signature Example 4_6 -pkcs1_rsassa_pss_sign:1027:16:"029232336d2838945dba9dd7723f4e624a05f7375b927a87abe6a893a1658fd49f47f6c7b0fa596c65fa68a23f0ab432962d18d4343bd6fd671a5ea8d148413995":16:"020ef5efe7c5394aed2272f7e81a74f4c02d145894cb1b3cab23a9a0710a2afc7e3329acbb743d01f680c4d02afb4c8fde7e20930811bb2b995788b5e872c20bb1":16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"afbc19d479249018fdf4e09f618726440495de11ddeee38872d775fcea74a23896b5343c9c38d46af0dba224d047580cc60a65e9391cf9b59b36a860598d4e8216722f993b91cfae87bc255af89a6a199bca4a391eadbc3a24903c0bd667368f6be78e3feabfb4ffd463122763740ffbbefeab9a25564bc5d1c24c93e422f75073e2ad72bf45b10df00b52a147128e73fee33fa3f0577d77f80fbc2df1bed313290c12777f50":"a334db6faebf11081a04f87c2d621cdec7930b9b":"00938dcb6d583046065f69c78da7a1f1757066a7fa75125a9d2929f0b79a60b627b082f11f5b196f28eb9daa6f21c05e5140f6aef1737d2023075c05ecf04a028c686a2ab3e7d5a0664f295ce12995e890908b6ad21f0839eb65b70393a7b5afd9871de0caa0cedec5b819626756209d13ab1e7bb9546a26ff37e9a51af9fd562e":0 - -RSASSA-PSS Signature Example 4_6 (verify) -pkcs1_rsassa_pss_verify:1027:16:"054adb7886447efe6f57e0368f06cf52b0a3370760d161cef126b91be7f89c421b62a6ec1da3c311d75ed50e0ab5fff3fd338acc3aa8a4e77ee26369acb81ba900fa83f5300cf9bb6c53ad1dc8a178b815db4235a9a9da0c06de4e615ea1277ce559e9c108de58c14a81aa77f5a6f8d1335494498848c8b95940740be7bf7c3705":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"afbc19d479249018fdf4e09f618726440495de11ddeee38872d775fcea74a23896b5343c9c38d46af0dba224d047580cc60a65e9391cf9b59b36a860598d4e8216722f993b91cfae87bc255af89a6a199bca4a391eadbc3a24903c0bd667368f6be78e3feabfb4ffd463122763740ffbbefeab9a25564bc5d1c24c93e422f75073e2ad72bf45b10df00b52a147128e73fee33fa3f0577d77f80fbc2df1bed313290c12777f50":"a334db6faebf11081a04f87c2d621cdec7930b9b":"00938dcb6d583046065f69c78da7a1f1757066a7fa75125a9d2929f0b79a60b627b082f11f5b196f28eb9daa6f21c05e5140f6aef1737d2023075c05ecf04a028c686a2ab3e7d5a0664f295ce12995e890908b6ad21f0839eb65b70393a7b5afd9871de0caa0cedec5b819626756209d13ab1e7bb9546a26ff37e9a51af9fd562e":0 - -RSASSA-PSS Signature Example 5_1 -pkcs1_rsassa_pss_sign:1028:16:"03f2f331f4142d4f24b43aa10279a89652d4e7537221a1a7b2a25deb551e5de9ac497411c227a94e45f91c2d1c13cc046cf4ce14e32d058734210d44a87ee1b73f":16:"034f090d73b55803030cf0361a5d8081bfb79f851523feac0a2124d08d4013ff08487771a870d0479dc0686c62f7718dfecf024b17c9267678059171339cc00839":16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"30c7d557458b436decfdc14d06cb7b96b06718c48d7de57482a868ae7f065870a6216506d11b779323dfdf046cf5775129134b4d5689e4d9c0ce1e12d7d4b06cb5fc5820decfa41baf59bf257b32f025b7679b445b9499c92555145885992f1b76f84891ee4d3be0f5150fd5901e3a4c8ed43fd36b61d022e65ad5008dbf33293c22bfbfd07321f0f1d5fa9fdf0014c2fcb0358aad0e354b0d29":"081b233b43567750bd6e78f396a88b9f6a445151":"0ba373f76e0921b70a8fbfe622f0bf77b28a3db98e361051c3d7cb92ad0452915a4de9c01722f6823eeb6adf7e0ca8290f5de3e549890ac2a3c5950ab217ba58590894952de96f8df111b2575215da6c161590c745be612476ee578ed384ab33e3ece97481a252f5c79a98b5532ae00cdd62f2ecc0cd1baefe80d80b962193ec1d":0 - -RSASSA-PSS Signature Example 5_1 (verify) -pkcs1_rsassa_pss_verify:1028:16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"30c7d557458b436decfdc14d06cb7b96b06718c48d7de57482a868ae7f065870a6216506d11b779323dfdf046cf5775129134b4d5689e4d9c0ce1e12d7d4b06cb5fc5820decfa41baf59bf257b32f025b7679b445b9499c92555145885992f1b76f84891ee4d3be0f5150fd5901e3a4c8ed43fd36b61d022e65ad5008dbf33293c22bfbfd07321f0f1d5fa9fdf0014c2fcb0358aad0e354b0d29":"081b233b43567750bd6e78f396a88b9f6a445151":"0ba373f76e0921b70a8fbfe622f0bf77b28a3db98e361051c3d7cb92ad0452915a4de9c01722f6823eeb6adf7e0ca8290f5de3e549890ac2a3c5950ab217ba58590894952de96f8df111b2575215da6c161590c745be612476ee578ed384ab33e3ece97481a252f5c79a98b5532ae00cdd62f2ecc0cd1baefe80d80b962193ec1d":0 - -RSASSA-PSS Signature Example 5_2 -pkcs1_rsassa_pss_sign:1028:16:"03f2f331f4142d4f24b43aa10279a89652d4e7537221a1a7b2a25deb551e5de9ac497411c227a94e45f91c2d1c13cc046cf4ce14e32d058734210d44a87ee1b73f":16:"034f090d73b55803030cf0361a5d8081bfb79f851523feac0a2124d08d4013ff08487771a870d0479dc0686c62f7718dfecf024b17c9267678059171339cc00839":16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e7b32e1556ea1b2795046ac69739d22ac8966bf11c116f614b166740e96b90653e5750945fcf772186c03790a07fda323e1a61916b06ee2157db3dff80d67d5e39a53ae268c8f09ed99a732005b0bc6a04af4e08d57a00e7201b3060efaadb73113bfc087fd837093aa25235b8c149f56215f031c24ad5bde7f29960df7d524070f7449c6f785084be1a0f733047f336f9154738674547db02a9f44dfc6e60301081e1ce99847f3b5b601ff06b4d5776a9740b9aa0d34058fd3b906e4f7859dfb07d7173e5e6f6350adac21f27b2307469":"bd0ce19549d0700120cbe51077dbbbb00a8d8b09":"08180de825e4b8b014a32da8ba761555921204f2f90d5f24b712908ff84f3e220ad17997c0dd6e706630ba3e84add4d5e7ab004e58074b549709565d43ad9e97b5a7a1a29e85b9f90f4aafcdf58321de8c5974ef9abf2d526f33c0f2f82e95d158ea6b81f1736db8d1af3d6ac6a83b32d18bae0ff1b2fe27de4c76ed8c7980a34e":0 - -RSASSA-PSS Signature Example 5_2 (verify) -pkcs1_rsassa_pss_verify:1028:16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e7b32e1556ea1b2795046ac69739d22ac8966bf11c116f614b166740e96b90653e5750945fcf772186c03790a07fda323e1a61916b06ee2157db3dff80d67d5e39a53ae268c8f09ed99a732005b0bc6a04af4e08d57a00e7201b3060efaadb73113bfc087fd837093aa25235b8c149f56215f031c24ad5bde7f29960df7d524070f7449c6f785084be1a0f733047f336f9154738674547db02a9f44dfc6e60301081e1ce99847f3b5b601ff06b4d5776a9740b9aa0d34058fd3b906e4f7859dfb07d7173e5e6f6350adac21f27b2307469":"bd0ce19549d0700120cbe51077dbbbb00a8d8b09":"08180de825e4b8b014a32da8ba761555921204f2f90d5f24b712908ff84f3e220ad17997c0dd6e706630ba3e84add4d5e7ab004e58074b549709565d43ad9e97b5a7a1a29e85b9f90f4aafcdf58321de8c5974ef9abf2d526f33c0f2f82e95d158ea6b81f1736db8d1af3d6ac6a83b32d18bae0ff1b2fe27de4c76ed8c7980a34e":0 - -RSASSA-PSS Signature Example 5_3 -pkcs1_rsassa_pss_sign:1028:16:"03f2f331f4142d4f24b43aa10279a89652d4e7537221a1a7b2a25deb551e5de9ac497411c227a94e45f91c2d1c13cc046cf4ce14e32d058734210d44a87ee1b73f":16:"034f090d73b55803030cf0361a5d8081bfb79f851523feac0a2124d08d4013ff08487771a870d0479dc0686c62f7718dfecf024b17c9267678059171339cc00839":16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8d8396e36507fe1ef6a19017548e0c716674c2fec233adb2f775665ec41f2bd0ba396b061a9daa7e866f7c23fd3531954300a342f924535ea1498c48f6c879932865fc02000c528723b7ad0335745b51209a0afed932af8f0887c219004d2abd894ea92559ee3198af3a734fe9b9638c263a728ad95a5ae8ce3eb15839f3aa7852bb390706e7760e43a71291a2e3f827237deda851874c517665f545f27238df86557f375d09ccd8bd15d8ccf61f5d78ca5c7f5cde782e6bf5d0057056d4bad98b3d2f9575e824ab7a33ff57b0ac100ab0d6ead7aa0b50f6e4d3e5ec0b966b":"815779a91b3a8bd049bf2aeb920142772222c9ca":"05e0fdbdf6f756ef733185ccfa8ced2eb6d029d9d56e35561b5db8e70257ee6fd019d2f0bbf669fe9b9821e78df6d41e31608d58280f318ee34f559941c8df13287574bac000b7e58dc4f414ba49fb127f9d0f8936638c76e85356c994f79750f7fa3cf4fd482df75e3fb9978cd061f7abb17572e6e63e0bde12cbdcf18c68b979":0 - -RSASSA-PSS Signature Example 5_3 (verify) -pkcs1_rsassa_pss_verify:1028:16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8d8396e36507fe1ef6a19017548e0c716674c2fec233adb2f775665ec41f2bd0ba396b061a9daa7e866f7c23fd3531954300a342f924535ea1498c48f6c879932865fc02000c528723b7ad0335745b51209a0afed932af8f0887c219004d2abd894ea92559ee3198af3a734fe9b9638c263a728ad95a5ae8ce3eb15839f3aa7852bb390706e7760e43a71291a2e3f827237deda851874c517665f545f27238df86557f375d09ccd8bd15d8ccf61f5d78ca5c7f5cde782e6bf5d0057056d4bad98b3d2f9575e824ab7a33ff57b0ac100ab0d6ead7aa0b50f6e4d3e5ec0b966b":"815779a91b3a8bd049bf2aeb920142772222c9ca":"05e0fdbdf6f756ef733185ccfa8ced2eb6d029d9d56e35561b5db8e70257ee6fd019d2f0bbf669fe9b9821e78df6d41e31608d58280f318ee34f559941c8df13287574bac000b7e58dc4f414ba49fb127f9d0f8936638c76e85356c994f79750f7fa3cf4fd482df75e3fb9978cd061f7abb17572e6e63e0bde12cbdcf18c68b979":0 - -RSASSA-PSS Signature Example 5_4 -pkcs1_rsassa_pss_sign:1028:16:"03f2f331f4142d4f24b43aa10279a89652d4e7537221a1a7b2a25deb551e5de9ac497411c227a94e45f91c2d1c13cc046cf4ce14e32d058734210d44a87ee1b73f":16:"034f090d73b55803030cf0361a5d8081bfb79f851523feac0a2124d08d4013ff08487771a870d0479dc0686c62f7718dfecf024b17c9267678059171339cc00839":16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"328c659e0a6437433cceb73c14":"9aec4a7480d5bbc42920d7ca235db674989c9aac":"0bc989853bc2ea86873271ce183a923ab65e8a53100e6df5d87a24c4194eb797813ee2a187c097dd872d591da60c568605dd7e742d5af4e33b11678ccb63903204a3d080b0902c89aba8868f009c0f1c0cb85810bbdd29121abb8471ff2d39e49fd92d56c655c8e037ad18fafbdc92c95863f7f61ea9efa28fea401369d19daea1":0 - -RSASSA-PSS Signature Example 5_4 (verify) -pkcs1_rsassa_pss_verify:1028:16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"328c659e0a6437433cceb73c14":"9aec4a7480d5bbc42920d7ca235db674989c9aac":"0bc989853bc2ea86873271ce183a923ab65e8a53100e6df5d87a24c4194eb797813ee2a187c097dd872d591da60c568605dd7e742d5af4e33b11678ccb63903204a3d080b0902c89aba8868f009c0f1c0cb85810bbdd29121abb8471ff2d39e49fd92d56c655c8e037ad18fafbdc92c95863f7f61ea9efa28fea401369d19daea1":0 - -RSASSA-PSS Signature Example 5_5 -pkcs1_rsassa_pss_sign:1028:16:"03f2f331f4142d4f24b43aa10279a89652d4e7537221a1a7b2a25deb551e5de9ac497411c227a94e45f91c2d1c13cc046cf4ce14e32d058734210d44a87ee1b73f":16:"034f090d73b55803030cf0361a5d8081bfb79f851523feac0a2124d08d4013ff08487771a870d0479dc0686c62f7718dfecf024b17c9267678059171339cc00839":16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"f37b962379a47d415a376eec8973150bcb34edd5ab654041b61430560c2144582ba133c867d852d6b8e23321901302ecb45b09ec88b1527178fa043263f3067d9ffe973032a99f4cb08ad2c7e0a2456cdd57a7df56fe6053527a5aeb67d7e552063c1ca97b1beffa7b39e997caf27878ea0f62cbebc8c21df4c889a202851e949088490c249b6e9acf1d8063f5be2343989bf95c4da01a2be78b4ab6b378015bc37957f76948b5e58e440c28453d40d7cfd57e7d690600474ab5e75973b1ea0c5f1e45d14190afe2f4eb6d3bdf71f1d2f8bb156a1c295d04aaeb9d689dce79ed62bc443e":"e20c1e9878512c39970f58375e1549a68b64f31d":"0aefa943b698b9609edf898ad22744ac28dc239497cea369cbbd84f65c95c0ad776b594740164b59a739c6ff7c2f07c7c077a86d95238fe51e1fcf33574a4ae0684b42a3f6bf677d91820ca89874467b2c23add77969c80717430d0efc1d3695892ce855cb7f7011630f4df26def8ddf36fc23905f57fa6243a485c770d5681fcd":0 - -RSASSA-PSS Signature Example 5_5 (verify) -pkcs1_rsassa_pss_verify:1028:16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"f37b962379a47d415a376eec8973150bcb34edd5ab654041b61430560c2144582ba133c867d852d6b8e23321901302ecb45b09ec88b1527178fa043263f3067d9ffe973032a99f4cb08ad2c7e0a2456cdd57a7df56fe6053527a5aeb67d7e552063c1ca97b1beffa7b39e997caf27878ea0f62cbebc8c21df4c889a202851e949088490c249b6e9acf1d8063f5be2343989bf95c4da01a2be78b4ab6b378015bc37957f76948b5e58e440c28453d40d7cfd57e7d690600474ab5e75973b1ea0c5f1e45d14190afe2f4eb6d3bdf71f1d2f8bb156a1c295d04aaeb9d689dce79ed62bc443e":"e20c1e9878512c39970f58375e1549a68b64f31d":"0aefa943b698b9609edf898ad22744ac28dc239497cea369cbbd84f65c95c0ad776b594740164b59a739c6ff7c2f07c7c077a86d95238fe51e1fcf33574a4ae0684b42a3f6bf677d91820ca89874467b2c23add77969c80717430d0efc1d3695892ce855cb7f7011630f4df26def8ddf36fc23905f57fa6243a485c770d5681fcd":0 - -RSASSA-PSS Signature Example 5_6 -pkcs1_rsassa_pss_sign:1028:16:"03f2f331f4142d4f24b43aa10279a89652d4e7537221a1a7b2a25deb551e5de9ac497411c227a94e45f91c2d1c13cc046cf4ce14e32d058734210d44a87ee1b73f":16:"034f090d73b55803030cf0361a5d8081bfb79f851523feac0a2124d08d4013ff08487771a870d0479dc0686c62f7718dfecf024b17c9267678059171339cc00839":16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"c6103c330c1ef718c141e47b8fa859be4d5b96259e7d142070ecd485839dba5a8369c17c1114035e532d195c74f44a0476a2d3e8a4da210016caced0e367cb867710a4b5aa2df2b8e5daf5fdc647807d4d5ebb6c56b9763ccdae4dea3308eb0ac2a89501cb209d2639fa5bf87ce790747d3cb2d295e84564f2f637824f0c13028129b0aa4a422d162282":"23291e4a3307e8bbb776623ab34e4a5f4cc8a8db":"02802dccfa8dfaf5279bf0b4a29ba1b157611faeaaf419b8919d15941900c1339e7e92e6fae562c53e6cc8e84104b110bce03ad18525e3c49a0eadad5d3f28f244a8ed89edbafbb686277cfa8ae909714d6b28f4bf8e293aa04c41efe7c0a81266d5c061e2575be032aa464674ff71626219bd74cc45f0e7ed4e3ff96eee758e8f":0 - -RSASSA-PSS Signature Example 5_6 (verify) -pkcs1_rsassa_pss_verify:1028:16:"0d10f661f29940f5ed39aa260966deb47843679d2b6fb25b3de370f3ac7c19916391fd25fb527ebfa6a4b4df45a1759d996c4bb4ebd18828c44fc52d0191871740525f47a4b0cc8da325ed8aa676b0d0f626e0a77f07692170acac8082f42faa7dc7cd123e730e31a87985204cabcbe6670d43a2dd2b2ddef5e05392fc213bc507":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"c6103c330c1ef718c141e47b8fa859be4d5b96259e7d142070ecd485839dba5a8369c17c1114035e532d195c74f44a0476a2d3e8a4da210016caced0e367cb867710a4b5aa2df2b8e5daf5fdc647807d4d5ebb6c56b9763ccdae4dea3308eb0ac2a89501cb209d2639fa5bf87ce790747d3cb2d295e84564f2f637824f0c13028129b0aa4a422d162282":"23291e4a3307e8bbb776623ab34e4a5f4cc8a8db":"02802dccfa8dfaf5279bf0b4a29ba1b157611faeaaf419b8919d15941900c1339e7e92e6fae562c53e6cc8e84104b110bce03ad18525e3c49a0eadad5d3f28f244a8ed89edbafbb686277cfa8ae909714d6b28f4bf8e293aa04c41efe7c0a81266d5c061e2575be032aa464674ff71626219bd74cc45f0e7ed4e3ff96eee758e8f":0 - -RSASSA-PSS Signature Example 6_1 -pkcs1_rsassa_pss_sign:1029:16:"04f0548c9626ab1ebf1244934741d99a06220efa2a5856aa0e75730b2ec96adc86be894fa2803b53a5e85d276acbd29ab823f80a7391bb54a5051672fb04eeb543":16:"0483e0ae47915587743ff345362b555d3962d98bb6f15f848b4c92b1771ca8ed107d8d3ee65ec44517dd0faa481a387e902f7a2e747c269e7ea44480bc538b8e5b":16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0a20b774addc2fa51245ed7cb9da609e50cac6636a52543f97458eed7340f8d53ffc64918f949078ee03ef60d42b5fec246050bd5505cd8cb597bad3c4e713b0ef30644e76adabb0de01a1561efb255158c74fc801e6e919e581b46f0f0ddd08e4f34c7810b5ed8318f91d7c8c":"5b4ea2ef629cc22f3b538e016904b47b1e40bfd5":"04c0cfacec04e5badbece159a5a1103f69b3f32ba593cb4cc4b1b7ab455916a96a27cd2678ea0f46ba37f7fc9c86325f29733b389f1d97f43e7201c0f348fc45fe42892335362eee018b5b161f2f9393031225c713012a576bc88e23052489868d9010cbf033ecc568e8bc152bdc59d560e41291915d28565208e22aeec9ef85d1":0 - -RSASSA-PSS Signature Example 6_1 (verify) -pkcs1_rsassa_pss_verify:1029:16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0a20b774addc2fa51245ed7cb9da609e50cac6636a52543f97458eed7340f8d53ffc64918f949078ee03ef60d42b5fec246050bd5505cd8cb597bad3c4e713b0ef30644e76adabb0de01a1561efb255158c74fc801e6e919e581b46f0f0ddd08e4f34c7810b5ed8318f91d7c8c":"5b4ea2ef629cc22f3b538e016904b47b1e40bfd5":"04c0cfacec04e5badbece159a5a1103f69b3f32ba593cb4cc4b1b7ab455916a96a27cd2678ea0f46ba37f7fc9c86325f29733b389f1d97f43e7201c0f348fc45fe42892335362eee018b5b161f2f9393031225c713012a576bc88e23052489868d9010cbf033ecc568e8bc152bdc59d560e41291915d28565208e22aeec9ef85d1":0 - -RSASSA-PSS Signature Example 6_2 -pkcs1_rsassa_pss_sign:1029:16:"04f0548c9626ab1ebf1244934741d99a06220efa2a5856aa0e75730b2ec96adc86be894fa2803b53a5e85d276acbd29ab823f80a7391bb54a5051672fb04eeb543":16:"0483e0ae47915587743ff345362b555d3962d98bb6f15f848b4c92b1771ca8ed107d8d3ee65ec44517dd0faa481a387e902f7a2e747c269e7ea44480bc538b8e5b":16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"2aaff6631f621ce615760a9ebce94bb333077ad86488c861d4b76d29c1f48746c611ae1e03ced4445d7cfa1fe5f62e1b3f08452bde3b6ef81973bafbb57f97bceef873985395b8260589aa88cb7db50ab469262e551bdcd9a56f275a0ac4fe484700c35f3dbf2b469ede864741b86fa59172a360ba95a02e139be50ddfb7cf0b42faeabbfbbaa86a4497699c4f2dfd5b08406af7e14144427c253ec0efa20eaf9a8be8cd49ce1f1bc4e93e619cf2aa8ed4fb39bc8590d0f7b96488f7317ac9abf7bee4e3a0e715":"83146a9e782722c28b014f98b4267bda2ac9504f":"0a2314250cf52b6e4e908de5b35646bcaa24361da8160fb0f9257590ab3ace42b0dc3e77ad2db7c203a20bd952fbb56b1567046ecfaa933d7b1000c3de9ff05b7d989ba46fd43bc4c2d0a3986b7ffa13471d37eb5b47d64707bd290cfd6a9f393ad08ec1e3bd71bb5792615035cdaf2d8929aed3be098379377e777ce79aaa4773":0 - -RSASSA-PSS Signature Example 6_2 (verify) -pkcs1_rsassa_pss_verify:1029:16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"2aaff6631f621ce615760a9ebce94bb333077ad86488c861d4b76d29c1f48746c611ae1e03ced4445d7cfa1fe5f62e1b3f08452bde3b6ef81973bafbb57f97bceef873985395b8260589aa88cb7db50ab469262e551bdcd9a56f275a0ac4fe484700c35f3dbf2b469ede864741b86fa59172a360ba95a02e139be50ddfb7cf0b42faeabbfbbaa86a4497699c4f2dfd5b08406af7e14144427c253ec0efa20eaf9a8be8cd49ce1f1bc4e93e619cf2aa8ed4fb39bc8590d0f7b96488f7317ac9abf7bee4e3a0e715":"83146a9e782722c28b014f98b4267bda2ac9504f":"0a2314250cf52b6e4e908de5b35646bcaa24361da8160fb0f9257590ab3ace42b0dc3e77ad2db7c203a20bd952fbb56b1567046ecfaa933d7b1000c3de9ff05b7d989ba46fd43bc4c2d0a3986b7ffa13471d37eb5b47d64707bd290cfd6a9f393ad08ec1e3bd71bb5792615035cdaf2d8929aed3be098379377e777ce79aaa4773":0 - -RSASSA-PSS Signature Example 6_3 -pkcs1_rsassa_pss_sign:1029:16:"04f0548c9626ab1ebf1244934741d99a06220efa2a5856aa0e75730b2ec96adc86be894fa2803b53a5e85d276acbd29ab823f80a7391bb54a5051672fb04eeb543":16:"0483e0ae47915587743ff345362b555d3962d98bb6f15f848b4c92b1771ca8ed107d8d3ee65ec44517dd0faa481a387e902f7a2e747c269e7ea44480bc538b8e5b":16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0f6195d04a6e6fc7e2c9600dbf840c39ea8d4d624fd53507016b0e26858a5e0aecd7ada543ae5c0ab3a62599cba0a54e6bf446e262f989978f9ddf5e9a41":"a87b8aed07d7b8e2daf14ddca4ac68c4d0aabff8":"086df6b500098c120f24ff8423f727d9c61a5c9007d3b6a31ce7cf8f3cbec1a26bb20e2bd4a046793299e03e37a21b40194fb045f90b18bf20a47992ccd799cf9c059c299c0526854954aade8a6ad9d97ec91a1145383f42468b231f4d72f23706d9853c3fa43ce8ace8bfe7484987a1ec6a16c8daf81f7c8bf42774707a9df456":0 - -RSASSA-PSS Signature Example 6_3 (verify) -pkcs1_rsassa_pss_verify:1029:16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0f6195d04a6e6fc7e2c9600dbf840c39ea8d4d624fd53507016b0e26858a5e0aecd7ada543ae5c0ab3a62599cba0a54e6bf446e262f989978f9ddf5e9a41":"a87b8aed07d7b8e2daf14ddca4ac68c4d0aabff8":"086df6b500098c120f24ff8423f727d9c61a5c9007d3b6a31ce7cf8f3cbec1a26bb20e2bd4a046793299e03e37a21b40194fb045f90b18bf20a47992ccd799cf9c059c299c0526854954aade8a6ad9d97ec91a1145383f42468b231f4d72f23706d9853c3fa43ce8ace8bfe7484987a1ec6a16c8daf81f7c8bf42774707a9df456":0 - -RSASSA-PSS Signature Example 6_4 -pkcs1_rsassa_pss_sign:1029:16:"04f0548c9626ab1ebf1244934741d99a06220efa2a5856aa0e75730b2ec96adc86be894fa2803b53a5e85d276acbd29ab823f80a7391bb54a5051672fb04eeb543":16:"0483e0ae47915587743ff345362b555d3962d98bb6f15f848b4c92b1771ca8ed107d8d3ee65ec44517dd0faa481a387e902f7a2e747c269e7ea44480bc538b8e5b":16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"337d25fe9810ebca0de4d4658d3ceb8e0fe4c066aba3bcc48b105d3bf7e0257d44fecea6596f4d0c59a08402833678f70620f9138dfeb7ded905e4a6d5f05c473d55936652e2a5df43c0cfda7bacaf3087f4524b06cf42157d01539739f7fddec9d58125df31a32eab06c19b71f1d5bf":"a37932f8a7494a942d6f767438e724d6d0c0ef18":"0b5b11ad549863ffa9c51a14a1106c2a72cc8b646e5c7262509786105a984776534ca9b54c1cc64bf2d5a44fd7e8a69db699d5ea52087a4748fd2abc1afed1e5d6f7c89025530bdaa2213d7e030fa55df6f34bcf1ce46d2edf4e3ae4f3b01891a068c9e3a44bbc43133edad6ecb9f35400c4252a5762d65744b99cb9f4c559329f":0 - -RSASSA-PSS Signature Example 6_4 (verify) -pkcs1_rsassa_pss_verify:1029:16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"337d25fe9810ebca0de4d4658d3ceb8e0fe4c066aba3bcc48b105d3bf7e0257d44fecea6596f4d0c59a08402833678f70620f9138dfeb7ded905e4a6d5f05c473d55936652e2a5df43c0cfda7bacaf3087f4524b06cf42157d01539739f7fddec9d58125df31a32eab06c19b71f1d5bf":"a37932f8a7494a942d6f767438e724d6d0c0ef18":"0b5b11ad549863ffa9c51a14a1106c2a72cc8b646e5c7262509786105a984776534ca9b54c1cc64bf2d5a44fd7e8a69db699d5ea52087a4748fd2abc1afed1e5d6f7c89025530bdaa2213d7e030fa55df6f34bcf1ce46d2edf4e3ae4f3b01891a068c9e3a44bbc43133edad6ecb9f35400c4252a5762d65744b99cb9f4c559329f":0 - -RSASSA-PSS Signature Example 6_5 -pkcs1_rsassa_pss_sign:1029:16:"04f0548c9626ab1ebf1244934741d99a06220efa2a5856aa0e75730b2ec96adc86be894fa2803b53a5e85d276acbd29ab823f80a7391bb54a5051672fb04eeb543":16:"0483e0ae47915587743ff345362b555d3962d98bb6f15f848b4c92b1771ca8ed107d8d3ee65ec44517dd0faa481a387e902f7a2e747c269e7ea44480bc538b8e5b":16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"84ec502b072e8287789d8f9235829ea3b187afd4d4c785611bda5f9eb3cb96717efa7007227f1c08cbcb972e667235e0fb7d431a6570326d2ecce35adb373dc753b3be5f829b89175493193fab16badb41371b3aac0ae670076f24bef420c135add7cee8d35fbc944d79fafb9e307a13b0f556cb654a06f973ed22672330197ef5a748bf826a5db2383a25364b686b9372bb2339aeb1ac9e9889327d016f1670776db06201adbdcaf8a5e3b74e108b73":"7b790c1d62f7b84e94df6af28917cf571018110e":"02d71fa9b53e4654fefb7f08385cf6b0ae3a817942ebf66c35ac67f0b069952a3ce9c7e1f1b02e480a9500836de5d64cdb7ecde04542f7a79988787e24c2ba05f5fd482c023ed5c30e04839dc44bed2a3a3a4fee01113c891a47d32eb8025c28cb050b5cdb576c70fe76ef523405c08417faf350b037a43c379339fcb18d3a356b":0 - -RSASSA-PSS Signature Example 6_5 (verify) -pkcs1_rsassa_pss_verify:1029:16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"84ec502b072e8287789d8f9235829ea3b187afd4d4c785611bda5f9eb3cb96717efa7007227f1c08cbcb972e667235e0fb7d431a6570326d2ecce35adb373dc753b3be5f829b89175493193fab16badb41371b3aac0ae670076f24bef420c135add7cee8d35fbc944d79fafb9e307a13b0f556cb654a06f973ed22672330197ef5a748bf826a5db2383a25364b686b9372bb2339aeb1ac9e9889327d016f1670776db06201adbdcaf8a5e3b74e108b73":"7b790c1d62f7b84e94df6af28917cf571018110e":"02d71fa9b53e4654fefb7f08385cf6b0ae3a817942ebf66c35ac67f0b069952a3ce9c7e1f1b02e480a9500836de5d64cdb7ecde04542f7a79988787e24c2ba05f5fd482c023ed5c30e04839dc44bed2a3a3a4fee01113c891a47d32eb8025c28cb050b5cdb576c70fe76ef523405c08417faf350b037a43c379339fcb18d3a356b":0 - -RSASSA-PSS Signature Example 6_6 -pkcs1_rsassa_pss_sign:1029:16:"04f0548c9626ab1ebf1244934741d99a06220efa2a5856aa0e75730b2ec96adc86be894fa2803b53a5e85d276acbd29ab823f80a7391bb54a5051672fb04eeb543":16:"0483e0ae47915587743ff345362b555d3962d98bb6f15f848b4c92b1771ca8ed107d8d3ee65ec44517dd0faa481a387e902f7a2e747c269e7ea44480bc538b8e5b":16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"9906d89f97a9fdedd3ccd824db687326f30f00aa25a7fca2afcb3b0f86cd41e73f0e8ff7d2d83f59e28ed31a5a0d551523374de22e4c7e8ff568b386ee3dc41163f10bf67bb006261c9082f9af90bf1d9049a6b9fae71c7f84fbe6e55f02789de774f230f115026a4b4e96c55b04a95da3aacbb2cece8f81764a1f1c99515411087cf7d34aeded0932c183":"fbbe059025b69b89fb14ae2289e7aaafe60c0fcd":"0a40a16e2fe2b38d1df90546167cf9469c9e3c3681a3442b4b2c2f581deb385ce99fc6188bb02a841d56e76d301891e24560550fcc2a26b55f4ccb26d837d350a154bcaca8392d98fa67959e9727b78cad03269f56968fc56b68bd679926d83cc9cb215550645ccda31c760ff35888943d2d8a1d351e81e5d07b86182e751081ef":0 - -RSASSA-PSS Signature Example 6_6 (verify) -pkcs1_rsassa_pss_verify:1029:16:"164ca31cff609f3a0e7101b039f2e4fe6dd37519ab98598d179e174996598071f47d3a04559158d7be373cf1aa53f0aa6ef09039e5678c2a4c63900514c8c4f8aaed5de12a5f10b09c311af8c0ffb5b7a297f2efc63b8d6b0510931f0b98e48bf5fc6ec4e7b8db1ffaeb08c38e02adb8f03a48229c99e969431f61cb8c4dc698d1":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"9906d89f97a9fdedd3ccd824db687326f30f00aa25a7fca2afcb3b0f86cd41e73f0e8ff7d2d83f59e28ed31a5a0d551523374de22e4c7e8ff568b386ee3dc41163f10bf67bb006261c9082f9af90bf1d9049a6b9fae71c7f84fbe6e55f02789de774f230f115026a4b4e96c55b04a95da3aacbb2cece8f81764a1f1c99515411087cf7d34aeded0932c183":"fbbe059025b69b89fb14ae2289e7aaafe60c0fcd":"0a40a16e2fe2b38d1df90546167cf9469c9e3c3681a3442b4b2c2f581deb385ce99fc6188bb02a841d56e76d301891e24560550fcc2a26b55f4ccb26d837d350a154bcaca8392d98fa67959e9727b78cad03269f56968fc56b68bd679926d83cc9cb215550645ccda31c760ff35888943d2d8a1d351e81e5d07b86182e751081ef":0 - -RSASSA-PSS Signature Example 7_1 -pkcs1_rsassa_pss_sign:1030:16:"07eefb424b0e3a40e4208ee5afb280b22317308114dde0b4b64f730184ec68da6ce2867a9f48ed7726d5e2614ed04a5410736c8c714ee702474298c6292af07535":16:"070830dbf947eac0228de26314b59b66994cc60e8360e75d3876298f8f8a7d141da064e5ca026a973e28f254738cee669c721b034cb5f8e244dadd7cd1e159d547":16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"9ead0e01945640674eb41cad435e2374eaefa8ad7197d97913c44957d8d83f40d76ee60e39bf9c0f9eaf3021421a074d1ade962c6e9d3dc3bb174fe4dfe652b09115495b8fd2794174020a0602b5ca51848cfc96ce5eb57fc0a2adc1dda36a7cc452641a14911b37e45bfa11daa5c7ecdb74f6d0100d1d3e39e752800e203397de0233077b9a88855537fae927f924380d780f98e18dcff39c5ea741b17d6fdd1885bc9d581482d771ceb562d78a8bf88f0c75b11363e5e36cd479ceb0545f9da84203e0e6e508375cc9e844b88b7ac7a0a201ea0f1bee9a2c577920ca02c01b9d8320e974a56f4efb5763b96255abbf8037bf1802cf018f56379493e569a9":"b7867a59958cb54328f8775e6546ec06d27eaa50":"187f390723c8902591f0154bae6d4ecbffe067f0e8b795476ea4f4d51ccc810520bb3ca9bca7d0b1f2ea8a17d873fa27570acd642e3808561cb9e975ccfd80b23dc5771cdb3306a5f23159dacbd3aa2db93d46d766e09ed15d900ad897a8d274dc26b47e994a27e97e2268a766533ae4b5e42a2fcaf755c1c4794b294c60555823":0 - -RSASSA-PSS Signature Example 7_1 (verify) -pkcs1_rsassa_pss_verify:1030:16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"9ead0e01945640674eb41cad435e2374eaefa8ad7197d97913c44957d8d83f40d76ee60e39bf9c0f9eaf3021421a074d1ade962c6e9d3dc3bb174fe4dfe652b09115495b8fd2794174020a0602b5ca51848cfc96ce5eb57fc0a2adc1dda36a7cc452641a14911b37e45bfa11daa5c7ecdb74f6d0100d1d3e39e752800e203397de0233077b9a88855537fae927f924380d780f98e18dcff39c5ea741b17d6fdd1885bc9d581482d771ceb562d78a8bf88f0c75b11363e5e36cd479ceb0545f9da84203e0e6e508375cc9e844b88b7ac7a0a201ea0f1bee9a2c577920ca02c01b9d8320e974a56f4efb5763b96255abbf8037bf1802cf018f56379493e569a9":"b7867a59958cb54328f8775e6546ec06d27eaa50":"187f390723c8902591f0154bae6d4ecbffe067f0e8b795476ea4f4d51ccc810520bb3ca9bca7d0b1f2ea8a17d873fa27570acd642e3808561cb9e975ccfd80b23dc5771cdb3306a5f23159dacbd3aa2db93d46d766e09ed15d900ad897a8d274dc26b47e994a27e97e2268a766533ae4b5e42a2fcaf755c1c4794b294c60555823":0 - -RSASSA-PSS Signature Example 7_2 -pkcs1_rsassa_pss_sign:1030:16:"07eefb424b0e3a40e4208ee5afb280b22317308114dde0b4b64f730184ec68da6ce2867a9f48ed7726d5e2614ed04a5410736c8c714ee702474298c6292af07535":16:"070830dbf947eac0228de26314b59b66994cc60e8360e75d3876298f8f8a7d141da064e5ca026a973e28f254738cee669c721b034cb5f8e244dadd7cd1e159d547":16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8d80d2d08dbd19c154df3f14673a14bd03735231f24e86bf153d0e69e74cbff7b1836e664de83f680124370fc0f96c9b65c07a366b644c4ab3":"0c09582266df086310821ba7e18df64dfee6de09":"10fd89768a60a67788abb5856a787c8561f3edcf9a83e898f7dc87ab8cce79429b43e56906941a886194f137e591fe7c339555361fbbe1f24feb2d4bcdb80601f3096bc9132deea60ae13082f44f9ad41cd628936a4d51176e42fc59cb76db815ce5ab4db99a104aafea68f5d330329ebf258d4ede16064bd1d00393d5e1570eb8":0 - -RSASSA-PSS Signature Example 7_2 (verify) -pkcs1_rsassa_pss_verify:1030:16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"8d80d2d08dbd19c154df3f14673a14bd03735231f24e86bf153d0e69e74cbff7b1836e664de83f680124370fc0f96c9b65c07a366b644c4ab3":"0c09582266df086310821ba7e18df64dfee6de09":"10fd89768a60a67788abb5856a787c8561f3edcf9a83e898f7dc87ab8cce79429b43e56906941a886194f137e591fe7c339555361fbbe1f24feb2d4bcdb80601f3096bc9132deea60ae13082f44f9ad41cd628936a4d51176e42fc59cb76db815ce5ab4db99a104aafea68f5d330329ebf258d4ede16064bd1d00393d5e1570eb8":0 - -RSASSA-PSS Signature Example 7_3 -pkcs1_rsassa_pss_sign:1030:16:"07eefb424b0e3a40e4208ee5afb280b22317308114dde0b4b64f730184ec68da6ce2867a9f48ed7726d5e2614ed04a5410736c8c714ee702474298c6292af07535":16:"070830dbf947eac0228de26314b59b66994cc60e8360e75d3876298f8f8a7d141da064e5ca026a973e28f254738cee669c721b034cb5f8e244dadd7cd1e159d547":16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"808405cdfc1a58b9bb0397c720722a81fffb76278f335917ef9c473814b3e016ba2973cd2765f8f3f82d6cc38aa7f8551827fe8d1e3884b7e61c94683b8f82f1843bdae2257eeec9812ad4c2cf283c34e0b0ae0fe3cb990cf88f2ef9":"28039dcfe106d3b8296611258c4a56651c9e92dd":"2b31fde99859b977aa09586d8e274662b25a2a640640b457f594051cb1e7f7a911865455242926cf88fe80dfa3a75ba9689844a11e634a82b075afbd69c12a0df9d25f84ad4945df3dc8fe90c3cefdf26e95f0534304b5bdba20d3e5640a2ebfb898aac35ae40f26fce5563c2f9f24f3042af76f3c7072d687bbfb959a88460af1":0 - -RSASSA-PSS Signature Example 7_3 (verify) -pkcs1_rsassa_pss_verify:1030:16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"808405cdfc1a58b9bb0397c720722a81fffb76278f335917ef9c473814b3e016ba2973cd2765f8f3f82d6cc38aa7f8551827fe8d1e3884b7e61c94683b8f82f1843bdae2257eeec9812ad4c2cf283c34e0b0ae0fe3cb990cf88f2ef9":"28039dcfe106d3b8296611258c4a56651c9e92dd":"2b31fde99859b977aa09586d8e274662b25a2a640640b457f594051cb1e7f7a911865455242926cf88fe80dfa3a75ba9689844a11e634a82b075afbd69c12a0df9d25f84ad4945df3dc8fe90c3cefdf26e95f0534304b5bdba20d3e5640a2ebfb898aac35ae40f26fce5563c2f9f24f3042af76f3c7072d687bbfb959a88460af1":0 - -RSASSA-PSS Signature Example 7_4 -pkcs1_rsassa_pss_sign:1030:16:"07eefb424b0e3a40e4208ee5afb280b22317308114dde0b4b64f730184ec68da6ce2867a9f48ed7726d5e2614ed04a5410736c8c714ee702474298c6292af07535":16:"070830dbf947eac0228de26314b59b66994cc60e8360e75d3876298f8f8a7d141da064e5ca026a973e28f254738cee669c721b034cb5f8e244dadd7cd1e159d547":16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"f337b9bad937de22a1a052dff11134a8ce26976202981939b91e0715ae5e609649da1adfcef3f4cca59b238360e7d1e496c7bf4b204b5acff9bbd6166a1d87a36ef2247373751039f8a800b8399807b3a85f44893497c0d05fb7017b82228152de6f25e6116dcc7503c786c875c28f3aa607e94ab0f19863ab1b5073770b0cd5f533acde30c6fb953cf3da680264e30fc11bff9a19bffab4779b6223c3fb3fe0f71abade4eb7c09c41e24c22d23fa148e6a173feb63984d1bc6ee3a02d915b752ceaf92a3015eceb38ca586c6801b37c34cefb2cff25ea23c08662dcab26a7a93a285d05d3044c":"a77821ebbbef24628e4e12e1d0ea96de398f7b0f":"32c7ca38ff26949a15000c4ba04b2b13b35a3810e568184d7ecabaa166b7ffabddf2b6cf4ba07124923790f2e5b1a5be040aea36fe132ec130e1f10567982d17ac3e89b8d26c3094034e762d2e031264f01170beecb3d1439e05846f25458367a7d9c02060444672671e64e877864559ca19b2074d588a281b5804d23772fbbe19":0 - -RSASSA-PSS Signature Example 7_4 (verify) -pkcs1_rsassa_pss_verify:1030:16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"f337b9bad937de22a1a052dff11134a8ce26976202981939b91e0715ae5e609649da1adfcef3f4cca59b238360e7d1e496c7bf4b204b5acff9bbd6166a1d87a36ef2247373751039f8a800b8399807b3a85f44893497c0d05fb7017b82228152de6f25e6116dcc7503c786c875c28f3aa607e94ab0f19863ab1b5073770b0cd5f533acde30c6fb953cf3da680264e30fc11bff9a19bffab4779b6223c3fb3fe0f71abade4eb7c09c41e24c22d23fa148e6a173feb63984d1bc6ee3a02d915b752ceaf92a3015eceb38ca586c6801b37c34cefb2cff25ea23c08662dcab26a7a93a285d05d3044c":"a77821ebbbef24628e4e12e1d0ea96de398f7b0f":"32c7ca38ff26949a15000c4ba04b2b13b35a3810e568184d7ecabaa166b7ffabddf2b6cf4ba07124923790f2e5b1a5be040aea36fe132ec130e1f10567982d17ac3e89b8d26c3094034e762d2e031264f01170beecb3d1439e05846f25458367a7d9c02060444672671e64e877864559ca19b2074d588a281b5804d23772fbbe19":0 - -RSASSA-PSS Signature Example 7_5 -pkcs1_rsassa_pss_sign:1030:16:"07eefb424b0e3a40e4208ee5afb280b22317308114dde0b4b64f730184ec68da6ce2867a9f48ed7726d5e2614ed04a5410736c8c714ee702474298c6292af07535":16:"070830dbf947eac0228de26314b59b66994cc60e8360e75d3876298f8f8a7d141da064e5ca026a973e28f254738cee669c721b034cb5f8e244dadd7cd1e159d547":16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"45013cebafd960b255476a8e2598b9aa32efbe6dc1f34f4a498d8cf5a2b4548d08c55d5f95f7bcc9619163056f2d58b52fa032":"9d5ad8eb452134b65dc3a98b6a73b5f741609cd6":"07eb651d75f1b52bc263b2e198336e99fbebc4f332049a922a10815607ee2d989db3a4495b7dccd38f58a211fb7e193171a3d891132437ebca44f318b280509e52b5fa98fcce8205d9697c8ee4b7ff59d4c59c79038a1970bd2a0d451ecdc5ef11d9979c9d35f8c70a6163717607890d586a7c6dc01c79f86a8f28e85235f8c2f1":0 - -RSASSA-PSS Signature Example 7_5 (verify) -pkcs1_rsassa_pss_verify:1030:16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"45013cebafd960b255476a8e2598b9aa32efbe6dc1f34f4a498d8cf5a2b4548d08c55d5f95f7bcc9619163056f2d58b52fa032":"9d5ad8eb452134b65dc3a98b6a73b5f741609cd6":"07eb651d75f1b52bc263b2e198336e99fbebc4f332049a922a10815607ee2d989db3a4495b7dccd38f58a211fb7e193171a3d891132437ebca44f318b280509e52b5fa98fcce8205d9697c8ee4b7ff59d4c59c79038a1970bd2a0d451ecdc5ef11d9979c9d35f8c70a6163717607890d586a7c6dc01c79f86a8f28e85235f8c2f1":0 - -RSASSA-PSS Signature Example 7_6 -pkcs1_rsassa_pss_sign:1030:16:"07eefb424b0e3a40e4208ee5afb280b22317308114dde0b4b64f730184ec68da6ce2867a9f48ed7726d5e2614ed04a5410736c8c714ee702474298c6292af07535":16:"070830dbf947eac0228de26314b59b66994cc60e8360e75d3876298f8f8a7d141da064e5ca026a973e28f254738cee669c721b034cb5f8e244dadd7cd1e159d547":16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"2358097086c899323e75d9c90d0c09f12d9d54edfbdf70a9c2eb5a04d8f36b9b2bdf2aabe0a5bda1968937f9d6ebd3b6b257efb3136d4131f9acb59b85e2602c2a3fcdc835494a1f4e5ec18b226c80232b36a75a45fdf09a7ea9e98efbde1450d1194bf12e15a4c5f9eb5c0bce5269e0c3b28cfab655d81a61a20b4be2f54459bb25a0db94c52218be109a7426de83014424789aaa90e5056e632a698115e282c1a56410f26c2072f193481a9dcd880572005e64f4082ecf":"3f2efc595880a7d47fcf3cba04983ea54c4b73fb":"18da3cdcfe79bfb77fd9c32f377ad399146f0a8e810620233271a6e3ed3248903f5cdc92dc79b55d3e11615aa056a795853792a3998c349ca5c457e8ca7d29d796aa24f83491709befcfb1510ea513c92829a3f00b104f655634f320752e130ec0ccf6754ff893db302932bb025eb60e87822598fc619e0e981737a9a4c4152d33":0 - -RSASSA-PSS Signature Example 7_6 (verify) -pkcs1_rsassa_pss_verify:1030:16:"37c9da4a66c8c408b8da27d0c9d79f8ccb1eafc1d2fe48746d940b7c4ef5dee18ad12647cefaa0c4b3188b221c515386759b93f02024b25ab9242f8357d8f3fd49640ee5e643eaf6c64deefa7089727c8ff03993333915c6ef21bf5975b6e50d118b51008ec33e9f01a0a545a10a836a43ddbca9d8b5c5d3548022d7064ea29ab3":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"2358097086c899323e75d9c90d0c09f12d9d54edfbdf70a9c2eb5a04d8f36b9b2bdf2aabe0a5bda1968937f9d6ebd3b6b257efb3136d4131f9acb59b85e2602c2a3fcdc835494a1f4e5ec18b226c80232b36a75a45fdf09a7ea9e98efbde1450d1194bf12e15a4c5f9eb5c0bce5269e0c3b28cfab655d81a61a20b4be2f54459bb25a0db94c52218be109a7426de83014424789aaa90e5056e632a698115e282c1a56410f26c2072f193481a9dcd880572005e64f4082ecf":"3f2efc595880a7d47fcf3cba04983ea54c4b73fb":"18da3cdcfe79bfb77fd9c32f377ad399146f0a8e810620233271a6e3ed3248903f5cdc92dc79b55d3e11615aa056a795853792a3998c349ca5c457e8ca7d29d796aa24f83491709befcfb1510ea513c92829a3f00b104f655634f320752e130ec0ccf6754ff893db302932bb025eb60e87822598fc619e0e981737a9a4c4152d33":0 - -RSASSA-PSS Signature Example 8_1 -pkcs1_rsassa_pss_sign:1031:16:"08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb":16:"0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d":16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"81332f4be62948415ea1d899792eeacf6c6e1db1da8be13b5cea41db2fed467092e1ff398914c714259775f595f8547f735692a575e6923af78f22c6997ddb90fb6f72d7bb0dd5744a31decd3dc3685849836ed34aec596304ad11843c4f88489f209735f5fb7fdaf7cec8addc5818168f880acbf490d51005b7a8e84e43e54287977571dd99eea4b161eb2df1f5108f12a4142a83322edb05a75487a3435c9a78ce53ed93bc550857d7a9fb":"1d65491d79c864b373009be6f6f2467bac4c78fa":"0262ac254bfa77f3c1aca22c5179f8f040422b3c5bafd40a8f21cf0fa5a667ccd5993d42dbafb409c520e25fce2b1ee1e716577f1efa17f3da28052f40f0419b23106d7845aaf01125b698e7a4dfe92d3967bb00c4d0d35ba3552ab9a8b3eef07c7fecdbc5424ac4db1e20cb37d0b2744769940ea907e17fbbca673b20522380c5":0 - -RSASSA-PSS Signature Example 8_1 (verify) -pkcs1_rsassa_pss_verify:1031:16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"81332f4be62948415ea1d899792eeacf6c6e1db1da8be13b5cea41db2fed467092e1ff398914c714259775f595f8547f735692a575e6923af78f22c6997ddb90fb6f72d7bb0dd5744a31decd3dc3685849836ed34aec596304ad11843c4f88489f209735f5fb7fdaf7cec8addc5818168f880acbf490d51005b7a8e84e43e54287977571dd99eea4b161eb2df1f5108f12a4142a83322edb05a75487a3435c9a78ce53ed93bc550857d7a9fb":"1d65491d79c864b373009be6f6f2467bac4c78fa":"0262ac254bfa77f3c1aca22c5179f8f040422b3c5bafd40a8f21cf0fa5a667ccd5993d42dbafb409c520e25fce2b1ee1e716577f1efa17f3da28052f40f0419b23106d7845aaf01125b698e7a4dfe92d3967bb00c4d0d35ba3552ab9a8b3eef07c7fecdbc5424ac4db1e20cb37d0b2744769940ea907e17fbbca673b20522380c5":0 - -RSASSA-PSS Signature Example 8_2 -pkcs1_rsassa_pss_sign:1031:16:"08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb":16:"0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d":16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e2f96eaf0e05e7ba326ecca0ba7fd2f7c02356f3cede9d0faabf4fcc8e60a973e5595fd9ea08":"435c098aa9909eb2377f1248b091b68987ff1838":"2707b9ad5115c58c94e932e8ec0a280f56339e44a1b58d4ddcff2f312e5f34dcfe39e89c6a94dcee86dbbdae5b79ba4e0819a9e7bfd9d982e7ee6c86ee68396e8b3a14c9c8f34b178eb741f9d3f121109bf5c8172fada2e768f9ea1433032c004a8aa07eb990000a48dc94c8bac8aabe2b09b1aa46c0a2aa0e12f63fbba775ba7e":0 - -RSASSA-PSS Signature Example 8_2 (verify) -pkcs1_rsassa_pss_verify:1031:16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e2f96eaf0e05e7ba326ecca0ba7fd2f7c02356f3cede9d0faabf4fcc8e60a973e5595fd9ea08":"435c098aa9909eb2377f1248b091b68987ff1838":"2707b9ad5115c58c94e932e8ec0a280f56339e44a1b58d4ddcff2f312e5f34dcfe39e89c6a94dcee86dbbdae5b79ba4e0819a9e7bfd9d982e7ee6c86ee68396e8b3a14c9c8f34b178eb741f9d3f121109bf5c8172fada2e768f9ea1433032c004a8aa07eb990000a48dc94c8bac8aabe2b09b1aa46c0a2aa0e12f63fbba775ba7e":0 - -RSASSA-PSS Signature Example 8_3 -pkcs1_rsassa_pss_sign:1031:16:"08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb":16:"0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d":16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e35c6ed98f64a6d5a648fcab8adb16331db32e5d15c74a40edf94c3dc4a4de792d190889f20f1e24ed12054a6b28798fcb42d1c548769b734c96373142092aed277603f4738df4dc1446586d0ec64da4fb60536db2ae17fc7e3c04bbfbbbd907bf117c08636fa16f95f51a6216934d3e34f85030f17bbbc5ba69144058aff081e0b19cf03c17195c5e888ba58f6fe0a02e5c3bda9719a7":"c6ebbe76df0c4aea32c474175b2f136862d04529":"2ad20509d78cf26d1b6c406146086e4b0c91a91c2bd164c87b966b8faa42aa0ca446022323ba4b1a1b89706d7f4c3be57d7b69702d168ab5955ee290356b8c4a29ed467d547ec23cbadf286ccb5863c6679da467fc9324a151c7ec55aac6db4084f82726825cfe1aa421bc64049fb42f23148f9c25b2dc300437c38d428aa75f96":0 - -RSASSA-PSS Signature Example 8_3 (verify) -pkcs1_rsassa_pss_verify:1031:16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"e35c6ed98f64a6d5a648fcab8adb16331db32e5d15c74a40edf94c3dc4a4de792d190889f20f1e24ed12054a6b28798fcb42d1c548769b734c96373142092aed277603f4738df4dc1446586d0ec64da4fb60536db2ae17fc7e3c04bbfbbbd907bf117c08636fa16f95f51a6216934d3e34f85030f17bbbc5ba69144058aff081e0b19cf03c17195c5e888ba58f6fe0a02e5c3bda9719a7":"c6ebbe76df0c4aea32c474175b2f136862d04529":"2ad20509d78cf26d1b6c406146086e4b0c91a91c2bd164c87b966b8faa42aa0ca446022323ba4b1a1b89706d7f4c3be57d7b69702d168ab5955ee290356b8c4a29ed467d547ec23cbadf286ccb5863c6679da467fc9324a151c7ec55aac6db4084f82726825cfe1aa421bc64049fb42f23148f9c25b2dc300437c38d428aa75f96":0 - -RSASSA-PSS Signature Example 8_4 -pkcs1_rsassa_pss_sign:1031:16:"08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb":16:"0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d":16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"dbc5f750a7a14be2b93e838d18d14a8695e52e8add9c0ac733b8f56d2747e529a0cca532dd49b902aefed514447f9e81d16195c2853868cb9b30f7d0d495c69d01b5c5d50b27045db3866c2324a44a110b1717746de457d1c8c45c3cd2a92970c3d59632055d4c98a41d6e99e2a3ddd5f7f9979ab3cd18f37505d25141de2a1bff17b3a7dce9419ecc385cf11d72840f19953fd0509251f6cafde2893d0e75c781ba7a5012ca401a4fa99e04b3c3249f926d5afe82cc87dab22c3c1b105de48e34ace9c9124e59597ac7ebf8":"021fdcc6ebb5e19b1cb16e9c67f27681657fe20a":"1e24e6e58628e5175044a9eb6d837d48af1260b0520e87327de7897ee4d5b9f0df0be3e09ed4dea8c1454ff3423bb08e1793245a9df8bf6ab3968c8eddc3b5328571c77f091cc578576912dfebd164b9de5454fe0be1c1f6385b328360ce67ec7a05f6e30eb45c17c48ac70041d2cab67f0a2ae7aafdcc8d245ea3442a6300ccc7":0 - -RSASSA-PSS Signature Example 8_4 (verify) -pkcs1_rsassa_pss_verify:1031:16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"dbc5f750a7a14be2b93e838d18d14a8695e52e8add9c0ac733b8f56d2747e529a0cca532dd49b902aefed514447f9e81d16195c2853868cb9b30f7d0d495c69d01b5c5d50b27045db3866c2324a44a110b1717746de457d1c8c45c3cd2a92970c3d59632055d4c98a41d6e99e2a3ddd5f7f9979ab3cd18f37505d25141de2a1bff17b3a7dce9419ecc385cf11d72840f19953fd0509251f6cafde2893d0e75c781ba7a5012ca401a4fa99e04b3c3249f926d5afe82cc87dab22c3c1b105de48e34ace9c9124e59597ac7ebf8":"021fdcc6ebb5e19b1cb16e9c67f27681657fe20a":"1e24e6e58628e5175044a9eb6d837d48af1260b0520e87327de7897ee4d5b9f0df0be3e09ed4dea8c1454ff3423bb08e1793245a9df8bf6ab3968c8eddc3b5328571c77f091cc578576912dfebd164b9de5454fe0be1c1f6385b328360ce67ec7a05f6e30eb45c17c48ac70041d2cab67f0a2ae7aafdcc8d245ea3442a6300ccc7":0 - -RSASSA-PSS Signature Example 8_5 -pkcs1_rsassa_pss_sign:1031:16:"08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb":16:"0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d":16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"04dc251be72e88e5723485b6383a637e2fefe07660c519a560b8bc18bdedb86eae2364ea53ba9dca6eb3d2e7d6b806af42b3e87f291b4a8881d5bf572cc9a85e19c86acb28f098f9da0383c566d3c0f58cfd8f395dcf602e5cd40e8c7183f714996e2297ef":"c558d7167cbb4508ada042971e71b1377eea4269":"33341ba3576a130a50e2a5cf8679224388d5693f5accc235ac95add68e5eb1eec31666d0ca7a1cda6f70a1aa762c05752a51950cdb8af3c5379f18cfe6b5bc55a4648226a15e912ef19ad77adeea911d67cfefd69ba43fa4119135ff642117ba985a7e0100325e9519f1ca6a9216bda055b5785015291125e90dcd07a2ca9673ee":0 - -RSASSA-PSS Signature Example 8_5 (verify) -pkcs1_rsassa_pss_verify:1031:16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"04dc251be72e88e5723485b6383a637e2fefe07660c519a560b8bc18bdedb86eae2364ea53ba9dca6eb3d2e7d6b806af42b3e87f291b4a8881d5bf572cc9a85e19c86acb28f098f9da0383c566d3c0f58cfd8f395dcf602e5cd40e8c7183f714996e2297ef":"c558d7167cbb4508ada042971e71b1377eea4269":"33341ba3576a130a50e2a5cf8679224388d5693f5accc235ac95add68e5eb1eec31666d0ca7a1cda6f70a1aa762c05752a51950cdb8af3c5379f18cfe6b5bc55a4648226a15e912ef19ad77adeea911d67cfefd69ba43fa4119135ff642117ba985a7e0100325e9519f1ca6a9216bda055b5785015291125e90dcd07a2ca9673ee":0 - -RSASSA-PSS Signature Example 8_6 -pkcs1_rsassa_pss_sign:1031:16:"08dad7f11363faa623d5d6d5e8a319328d82190d7127d2846c439b0ab72619b0a43a95320e4ec34fc3a9cea876422305bd76c5ba7be9e2f410c8060645a1d29edb":16:"0847e732376fc7900f898ea82eb2b0fc418565fdae62f7d9ec4ce2217b97990dd272db157f99f63c0dcbb9fbacdbd4c4dadb6df67756358ca4174825b48f49706d":16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0ea37df9a6fea4a8b610373c24cf390c20fa6e2135c400c8a34f5c183a7e8ea4c9ae090ed31759f42dc77719cca400ecdcc517acfc7ac6902675b2ef30c509665f3321482fc69a9fb570d15e01c845d0d8e50d2a24cbf1cf0e714975a5db7b18d9e9e9cb91b5cb16869060ed18b7b56245503f0caf90352b8de81cb5a1d9c6336092f0cd":"76fd4e64fdc98eb927a0403e35a084e76ba9f92a":"1ed1d848fb1edb44129bd9b354795af97a069a7a00d0151048593e0c72c3517ff9ff2a41d0cb5a0ac860d736a199704f7cb6a53986a88bbd8abcc0076a2ce847880031525d449da2ac78356374c536e343faa7cba42a5aaa6506087791c06a8e989335aed19bfab2d5e67e27fb0c2875af896c21b6e8e7309d04e4f6727e69463e":0 - -RSASSA-PSS Signature Example 8_6 (verify) -pkcs1_rsassa_pss_verify:1031:16:"495370a1fb18543c16d3631e3163255df62be6eee890d5f25509e4f778a8ea6fbbbcdf85dff64e0d972003ab3681fbba6dd41fd541829b2e582de9f2a4a4e0a2d0900bef4753db3cee0ee06c7dfae8b1d53b5953218f9cceea695b08668edeaadced9463b1d790d5ebf27e9115b46cad4d9a2b8efab0561b0810344739ada0733f":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0ea37df9a6fea4a8b610373c24cf390c20fa6e2135c400c8a34f5c183a7e8ea4c9ae090ed31759f42dc77719cca400ecdcc517acfc7ac6902675b2ef30c509665f3321482fc69a9fb570d15e01c845d0d8e50d2a24cbf1cf0e714975a5db7b18d9e9e9cb91b5cb16869060ed18b7b56245503f0caf90352b8de81cb5a1d9c6336092f0cd":"76fd4e64fdc98eb927a0403e35a084e76ba9f92a":"1ed1d848fb1edb44129bd9b354795af97a069a7a00d0151048593e0c72c3517ff9ff2a41d0cb5a0ac860d736a199704f7cb6a53986a88bbd8abcc0076a2ce847880031525d449da2ac78356374c536e343faa7cba42a5aaa6506087791c06a8e989335aed19bfab2d5e67e27fb0c2875af896c21b6e8e7309d04e4f6727e69463e":0 - -RSASSA-PSS Signature Example 9_1 -pkcs1_rsassa_pss_sign:1536:16:"f8eb97e98df12664eefdb761596a69ddcd0e76daece6ed4bf5a1b50ac086f7928a4d2f8726a77e515b74da41988f220b1cc87aa1fc810ce99a82f2d1ce821edced794c6941f42c7a1a0b8c4d28c75ec60b652279f6154a762aed165d47dee367":16:"ed4d71d0a6e24b93c2e5f6b4bbe05f5fb0afa042d204fe3378d365c2f288b6a8dad7efe45d153eef40cacc7b81ff934002d108994b94a5e4728cd9c963375ae49965bda55cbf0efed8d6553b4027f2d86208a6e6b489c176128092d629e49d3d":16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"a88e265855e9d7ca36c68795f0b31b591cd6587c71d060a0b3f7f3eaef43795922028bc2b6ad467cfc2d7f659c5385aa70ba3672cdde4cfe4970cc7904601b278872bf51321c4a972f3c95570f3445d4f57980e0f20df54846e6a52c668f1288c03f95006ea32f562d40d52af9feb32f0fa06db65b588a237b34e592d55cf979f903a642ef64d2ed542aa8c77dc1dd762f45a59303ed75e541ca271e2b60ca709e44fa0661131e8d5d4163fd8d398566ce26de8730e72f9cca737641c244159420637028df0a18079d6208ea8b4711a2c750f5":"c0a425313df8d7564bd2434d311523d5257eed80":"586107226c3ce013a7c8f04d1a6a2959bb4b8e205ba43a27b50f124111bc35ef589b039f5932187cb696d7d9a32c0c38300a5cdda4834b62d2eb240af33f79d13dfbf095bf599e0d9686948c1964747b67e89c9aba5cd85016236f566cc5802cb13ead51bc7ca6bef3b94dcbdbb1d570469771df0e00b1a8a06777472d2316279edae86474668d4e1efff95f1de61c6020da32ae92bbf16520fef3cf4d88f61121f24bbd9fe91b59caf1235b2a93ff81fc403addf4ebdea84934a9cdaf8e1a9e":0 - -RSASSA-PSS Signature Example 9_1 (verify) -pkcs1_rsassa_pss_verify:1536:16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"a88e265855e9d7ca36c68795f0b31b591cd6587c71d060a0b3f7f3eaef43795922028bc2b6ad467cfc2d7f659c5385aa70ba3672cdde4cfe4970cc7904601b278872bf51321c4a972f3c95570f3445d4f57980e0f20df54846e6a52c668f1288c03f95006ea32f562d40d52af9feb32f0fa06db65b588a237b34e592d55cf979f903a642ef64d2ed542aa8c77dc1dd762f45a59303ed75e541ca271e2b60ca709e44fa0661131e8d5d4163fd8d398566ce26de8730e72f9cca737641c244159420637028df0a18079d6208ea8b4711a2c750f5":"c0a425313df8d7564bd2434d311523d5257eed80":"586107226c3ce013a7c8f04d1a6a2959bb4b8e205ba43a27b50f124111bc35ef589b039f5932187cb696d7d9a32c0c38300a5cdda4834b62d2eb240af33f79d13dfbf095bf599e0d9686948c1964747b67e89c9aba5cd85016236f566cc5802cb13ead51bc7ca6bef3b94dcbdbb1d570469771df0e00b1a8a06777472d2316279edae86474668d4e1efff95f1de61c6020da32ae92bbf16520fef3cf4d88f61121f24bbd9fe91b59caf1235b2a93ff81fc403addf4ebdea84934a9cdaf8e1a9e":0 - -RSASSA-PSS Signature Example 9_2 -pkcs1_rsassa_pss_sign:1536:16:"f8eb97e98df12664eefdb761596a69ddcd0e76daece6ed4bf5a1b50ac086f7928a4d2f8726a77e515b74da41988f220b1cc87aa1fc810ce99a82f2d1ce821edced794c6941f42c7a1a0b8c4d28c75ec60b652279f6154a762aed165d47dee367":16:"ed4d71d0a6e24b93c2e5f6b4bbe05f5fb0afa042d204fe3378d365c2f288b6a8dad7efe45d153eef40cacc7b81ff934002d108994b94a5e4728cd9c963375ae49965bda55cbf0efed8d6553b4027f2d86208a6e6b489c176128092d629e49d3d":16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"c8c9c6af04acda414d227ef23e0820c3732c500dc87275e95b0d095413993c2658bc1d988581ba879c2d201f14cb88ced153a01969a7bf0a7be79c84c1486bc12b3fa6c59871b6827c8ce253ca5fefa8a8c690bf326e8e37cdb96d90a82ebab69f86350e1822e8bd536a2e":"b307c43b4850a8dac2f15f32e37839ef8c5c0e91":"80b6d643255209f0a456763897ac9ed259d459b49c2887e5882ecb4434cfd66dd7e1699375381e51cd7f554f2c271704b399d42b4be2540a0eca61951f55267f7c2878c122842dadb28b01bd5f8c025f7e228418a673c03d6bc0c736d0a29546bd67f786d9d692ccea778d71d98c2063b7a71092187a4d35af108111d83e83eae46c46aa34277e06044589903788f1d5e7cee25fb485e92949118814d6f2c3ee361489016f327fb5bc517eb50470bffa1afa5f4ce9aa0ce5b8ee19bf5501b958":0 - -RSASSA-PSS Signature Example 9_2 (verify) -pkcs1_rsassa_pss_verify:1536:16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"c8c9c6af04acda414d227ef23e0820c3732c500dc87275e95b0d095413993c2658bc1d988581ba879c2d201f14cb88ced153a01969a7bf0a7be79c84c1486bc12b3fa6c59871b6827c8ce253ca5fefa8a8c690bf326e8e37cdb96d90a82ebab69f86350e1822e8bd536a2e":"b307c43b4850a8dac2f15f32e37839ef8c5c0e91":"80b6d643255209f0a456763897ac9ed259d459b49c2887e5882ecb4434cfd66dd7e1699375381e51cd7f554f2c271704b399d42b4be2540a0eca61951f55267f7c2878c122842dadb28b01bd5f8c025f7e228418a673c03d6bc0c736d0a29546bd67f786d9d692ccea778d71d98c2063b7a71092187a4d35af108111d83e83eae46c46aa34277e06044589903788f1d5e7cee25fb485e92949118814d6f2c3ee361489016f327fb5bc517eb50470bffa1afa5f4ce9aa0ce5b8ee19bf5501b958":0 - -RSASSA-PSS Signature Example 9_3 -pkcs1_rsassa_pss_sign:1536:16:"f8eb97e98df12664eefdb761596a69ddcd0e76daece6ed4bf5a1b50ac086f7928a4d2f8726a77e515b74da41988f220b1cc87aa1fc810ce99a82f2d1ce821edced794c6941f42c7a1a0b8c4d28c75ec60b652279f6154a762aed165d47dee367":16:"ed4d71d0a6e24b93c2e5f6b4bbe05f5fb0afa042d204fe3378d365c2f288b6a8dad7efe45d153eef40cacc7b81ff934002d108994b94a5e4728cd9c963375ae49965bda55cbf0efed8d6553b4027f2d86208a6e6b489c176128092d629e49d3d":16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0afad42ccd4fc60654a55002d228f52a4a5fe03b8bbb08ca82daca558b44dbe1266e50c0e745a36d9d2904e3408abcd1fd569994063f4a75cc72f2fee2a0cd893a43af1c5b8b487df0a71610024e4f6ddf9f28ad0813c1aab91bcb3c9064d5ff742deffea657094139369e5ea6f4a96319a5cc8224145b545062758fefd1fe3409ae169259c6cdfd6b5f2958e314faecbe69d2cace58ee55179ab9b3e6d1ecc14a557c5febe988595264fc5da1c571462eca798a18a1a4940cdab4a3e92009ccd42e1e947b1314e32238a2dece7d23a89b5b30c751fd0a4a430d2c548594":"9a2b007e80978bbb192c354eb7da9aedfc74dbf5":"484408f3898cd5f53483f80819efbf2708c34d27a8b2a6fae8b322f9240237f981817aca1846f1084daa6d7c0795f6e5bf1af59c38e1858437ce1f7ec419b98c8736adf6dd9a00b1806d2bd3ad0a73775e05f52dfef3a59ab4b08143f0df05cd1ad9d04bececa6daa4a2129803e200cbc77787caf4c1d0663a6c5987b605952019782caf2ec1426d68fb94ed1d4be816a7ed081b77e6ab330b3ffc073820fecde3727fcbe295ee61a050a343658637c3fd659cfb63736de32d9f90d3c2f63eca":0 - -RSASSA-PSS Signature Example 9_3 (verify) -pkcs1_rsassa_pss_verify:1536:16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0afad42ccd4fc60654a55002d228f52a4a5fe03b8bbb08ca82daca558b44dbe1266e50c0e745a36d9d2904e3408abcd1fd569994063f4a75cc72f2fee2a0cd893a43af1c5b8b487df0a71610024e4f6ddf9f28ad0813c1aab91bcb3c9064d5ff742deffea657094139369e5ea6f4a96319a5cc8224145b545062758fefd1fe3409ae169259c6cdfd6b5f2958e314faecbe69d2cace58ee55179ab9b3e6d1ecc14a557c5febe988595264fc5da1c571462eca798a18a1a4940cdab4a3e92009ccd42e1e947b1314e32238a2dece7d23a89b5b30c751fd0a4a430d2c548594":"9a2b007e80978bbb192c354eb7da9aedfc74dbf5":"484408f3898cd5f53483f80819efbf2708c34d27a8b2a6fae8b322f9240237f981817aca1846f1084daa6d7c0795f6e5bf1af59c38e1858437ce1f7ec419b98c8736adf6dd9a00b1806d2bd3ad0a73775e05f52dfef3a59ab4b08143f0df05cd1ad9d04bececa6daa4a2129803e200cbc77787caf4c1d0663a6c5987b605952019782caf2ec1426d68fb94ed1d4be816a7ed081b77e6ab330b3ffc073820fecde3727fcbe295ee61a050a343658637c3fd659cfb63736de32d9f90d3c2f63eca":0 - -RSASSA-PSS Signature Example 9_4 -pkcs1_rsassa_pss_sign:1536:16:"f8eb97e98df12664eefdb761596a69ddcd0e76daece6ed4bf5a1b50ac086f7928a4d2f8726a77e515b74da41988f220b1cc87aa1fc810ce99a82f2d1ce821edced794c6941f42c7a1a0b8c4d28c75ec60b652279f6154a762aed165d47dee367":16:"ed4d71d0a6e24b93c2e5f6b4bbe05f5fb0afa042d204fe3378d365c2f288b6a8dad7efe45d153eef40cacc7b81ff934002d108994b94a5e4728cd9c963375ae49965bda55cbf0efed8d6553b4027f2d86208a6e6b489c176128092d629e49d3d":16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"1dfd43b46c93db82629bdae2bd0a12b882ea04c3b465f5cf93023f01059626dbbe99f26bb1be949dddd16dc7f3debb19a194627f0b224434df7d8700e9e98b06e360c12fdbe3d19f51c9684eb9089ecbb0a2f0450399d3f59eac7294085d044f5393c6ce737423d8b86c415370d389e30b9f0a3c02d25d0082e8ad6f3f1ef24a45c3cf82b383367063a4d4613e4264f01b2dac2e5aa42043f8fb5f69fa871d14fb273e767a531c40f02f343bc2fb45a0c7e0f6be2561923a77211d66a6e2dbb43c366350beae22da3ac2c1f5077096fcb5c4bf255f7574351ae0b1e1f03632817c0856d4a8ba97afbdc8b85855402bc56926fcec209f9ea8":"70f382bddf4d5d2dd88b3bc7b7308be632b84045":"84ebeb481be59845b46468bafb471c0112e02b235d84b5d911cbd1926ee5074ae0424495cb20e82308b8ebb65f419a03fb40e72b78981d88aad143053685172c97b29c8b7bf0ae73b5b2263c403da0ed2f80ff7450af7828eb8b86f0028bd2a8b176a4d228cccea18394f238b09ff758cc00bc04301152355742f282b54e663a919e709d8da24ade5500a7b9aa50226e0ca52923e6c2d860ec50ff480fa57477e82b0565f4379f79c772d5c2da80af9fbf325ece6fc20b00961614bee89a183e":0 - -RSASSA-PSS Signature Example 9_4 (verify) -pkcs1_rsassa_pss_verify:1536:16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"1dfd43b46c93db82629bdae2bd0a12b882ea04c3b465f5cf93023f01059626dbbe99f26bb1be949dddd16dc7f3debb19a194627f0b224434df7d8700e9e98b06e360c12fdbe3d19f51c9684eb9089ecbb0a2f0450399d3f59eac7294085d044f5393c6ce737423d8b86c415370d389e30b9f0a3c02d25d0082e8ad6f3f1ef24a45c3cf82b383367063a4d4613e4264f01b2dac2e5aa42043f8fb5f69fa871d14fb273e767a531c40f02f343bc2fb45a0c7e0f6be2561923a77211d66a6e2dbb43c366350beae22da3ac2c1f5077096fcb5c4bf255f7574351ae0b1e1f03632817c0856d4a8ba97afbdc8b85855402bc56926fcec209f9ea8":"70f382bddf4d5d2dd88b3bc7b7308be632b84045":"84ebeb481be59845b46468bafb471c0112e02b235d84b5d911cbd1926ee5074ae0424495cb20e82308b8ebb65f419a03fb40e72b78981d88aad143053685172c97b29c8b7bf0ae73b5b2263c403da0ed2f80ff7450af7828eb8b86f0028bd2a8b176a4d228cccea18394f238b09ff758cc00bc04301152355742f282b54e663a919e709d8da24ade5500a7b9aa50226e0ca52923e6c2d860ec50ff480fa57477e82b0565f4379f79c772d5c2da80af9fbf325ece6fc20b00961614bee89a183e":0 - -RSASSA-PSS Signature Example 9_5 -pkcs1_rsassa_pss_sign:1536:16:"f8eb97e98df12664eefdb761596a69ddcd0e76daece6ed4bf5a1b50ac086f7928a4d2f8726a77e515b74da41988f220b1cc87aa1fc810ce99a82f2d1ce821edced794c6941f42c7a1a0b8c4d28c75ec60b652279f6154a762aed165d47dee367":16:"ed4d71d0a6e24b93c2e5f6b4bbe05f5fb0afa042d204fe3378d365c2f288b6a8dad7efe45d153eef40cacc7b81ff934002d108994b94a5e4728cd9c963375ae49965bda55cbf0efed8d6553b4027f2d86208a6e6b489c176128092d629e49d3d":16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"1bdc6e7c98fb8cf54e9b097b66a831e9cfe52d9d4888448ee4b0978093ba1d7d73ae78b3a62ba4ad95cd289ccb9e005226bb3d178bccaa821fb044a4e21ee97696c14d0678c94c2dae93b0ad73922218553daa7e44ebe57725a7a45cc72b9b2138a6b17c8db411ce8279ee1241aff0a8bec6f77f87edb0c69cb27236e3435a800b192e4f11e519e3fe30fc30eaccca4fbb41769029bf708e817a9e683805be67fa100984683b74838e3bcffa79366eed1d481c76729118838f31ba8a048a93c1be4424598e8df6328b7a77880a3f9c7e2e8dfca8eb5a26fb86bdc556d42bbe01d9fa6ed80646491c9341":"d689257a86effa68212c5e0c619eca295fb91b67":"82102df8cb91e7179919a04d26d335d64fbc2f872c44833943241de8454810274cdf3db5f42d423db152af7135f701420e39b494a67cbfd19f9119da233a23da5c6439b5ba0d2bc373eee3507001378d4a4073856b7fe2aba0b5ee93b27f4afec7d4d120921c83f606765b02c19e4d6a1a3b95fa4c422951be4f52131077ef17179729cddfbdb56950dbaceefe78cb16640a099ea56d24389eef10f8fecb31ba3ea3b227c0a86698bb89e3e9363905bf22777b2a3aa521b65b4cef76d83bde4c":0 - -RSASSA-PSS Signature Example 9_5 (verify) -pkcs1_rsassa_pss_verify:1536:16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"1bdc6e7c98fb8cf54e9b097b66a831e9cfe52d9d4888448ee4b0978093ba1d7d73ae78b3a62ba4ad95cd289ccb9e005226bb3d178bccaa821fb044a4e21ee97696c14d0678c94c2dae93b0ad73922218553daa7e44ebe57725a7a45cc72b9b2138a6b17c8db411ce8279ee1241aff0a8bec6f77f87edb0c69cb27236e3435a800b192e4f11e519e3fe30fc30eaccca4fbb41769029bf708e817a9e683805be67fa100984683b74838e3bcffa79366eed1d481c76729118838f31ba8a048a93c1be4424598e8df6328b7a77880a3f9c7e2e8dfca8eb5a26fb86bdc556d42bbe01d9fa6ed80646491c9341":"d689257a86effa68212c5e0c619eca295fb91b67":"82102df8cb91e7179919a04d26d335d64fbc2f872c44833943241de8454810274cdf3db5f42d423db152af7135f701420e39b494a67cbfd19f9119da233a23da5c6439b5ba0d2bc373eee3507001378d4a4073856b7fe2aba0b5ee93b27f4afec7d4d120921c83f606765b02c19e4d6a1a3b95fa4c422951be4f52131077ef17179729cddfbdb56950dbaceefe78cb16640a099ea56d24389eef10f8fecb31ba3ea3b227c0a86698bb89e3e9363905bf22777b2a3aa521b65b4cef76d83bde4c":0 - -RSASSA-PSS Signature Example 9_6 -pkcs1_rsassa_pss_sign:1536:16:"f8eb97e98df12664eefdb761596a69ddcd0e76daece6ed4bf5a1b50ac086f7928a4d2f8726a77e515b74da41988f220b1cc87aa1fc810ce99a82f2d1ce821edced794c6941f42c7a1a0b8c4d28c75ec60b652279f6154a762aed165d47dee367":16:"ed4d71d0a6e24b93c2e5f6b4bbe05f5fb0afa042d204fe3378d365c2f288b6a8dad7efe45d153eef40cacc7b81ff934002d108994b94a5e4728cd9c963375ae49965bda55cbf0efed8d6553b4027f2d86208a6e6b489c176128092d629e49d3d":16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"88c7a9f1360401d90e53b101b61c5325c3c75db1b411fbeb8e830b75e96b56670ad245404e16793544ee354bc613a90cc9848715a73db5893e7f6d279815c0c1de83ef8e2956e3a56ed26a888d7a9cdcd042f4b16b7fa51ef1a0573662d16a302d0ec5b285d2e03ad96529c87b3d374db372d95b2443d061b6b1a350ba87807ed083afd1eb05c3f52f4eba5ed2227714fdb50b9d9d9dd6814f62f6272fcd5cdbce7a9ef797":"c25f13bf67d081671a0481a1f1820d613bba2276":"a7fdb0d259165ca2c88d00bbf1028a867d337699d061193b17a9648e14ccbbaadeacaacdec815e7571294ebb8a117af205fa078b47b0712c199e3ad05135c504c24b81705115740802487992ffd511d4afc6b854491eb3f0dd523139542ff15c3101ee85543517c6a3c79417c67e2dd9aa741e9a29b06dcb593c2336b3670ae3afbac7c3e76e215473e866e338ca244de00b62624d6b9426822ceae9f8cc460895f41250073fd45c5a1e7b425c204a423a699159f6903e710b37a7bb2bc8049f":0 - -RSASSA-PSS Signature Example 9_6 (verify) -pkcs1_rsassa_pss_verify:1536:16:"e6bd692ac96645790403fdd0f5beb8b9bf92ed10007fc365046419dd06c05c5b5b2f48ecf989e4ce269109979cbb40b4a0ad24d22483d1ee315ad4ccb1534268352691c524f6dd8e6c29d224cf246973aec86c5bf6b1401a850d1b9ad1bb8cbcec47b06f0f8c7f45d3fc8f319299c5433ddbc2b3053b47ded2ecd4a4caefd614833dc8bb622f317ed076b8057fe8de3f84480ad5e83e4a61904a4f248fb397027357e1d30e463139815c6fd4fd5ac5b8172a45230ecb6318a04f1455d84e5a8b":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"88c7a9f1360401d90e53b101b61c5325c3c75db1b411fbeb8e830b75e96b56670ad245404e16793544ee354bc613a90cc9848715a73db5893e7f6d279815c0c1de83ef8e2956e3a56ed26a888d7a9cdcd042f4b16b7fa51ef1a0573662d16a302d0ec5b285d2e03ad96529c87b3d374db372d95b2443d061b6b1a350ba87807ed083afd1eb05c3f52f4eba5ed2227714fdb50b9d9d9dd6814f62f6272fcd5cdbce7a9ef797":"c25f13bf67d081671a0481a1f1820d613bba2276":"a7fdb0d259165ca2c88d00bbf1028a867d337699d061193b17a9648e14ccbbaadeacaacdec815e7571294ebb8a117af205fa078b47b0712c199e3ad05135c504c24b81705115740802487992ffd511d4afc6b854491eb3f0dd523139542ff15c3101ee85543517c6a3c79417c67e2dd9aa741e9a29b06dcb593c2336b3670ae3afbac7c3e76e215473e866e338ca244de00b62624d6b9426822ceae9f8cc460895f41250073fd45c5a1e7b425c204a423a699159f6903e710b37a7bb2bc8049f":0 - -RSASSA-PSS Signature Example 10_1 -pkcs1_rsassa_pss_sign:2048:16:"cfd50283feeeb97f6f08d73cbc7b3836f82bbcd499479f5e6f76fdfcb8b38c4f71dc9e88bd6a6f76371afd65d2af1862b32afb34a95f71b8b132043ffebe3a952baf7592448148c03f9c69b1d68e4ce5cf32c86baf46fed301ca1ab403069b32f456b91f71898ab081cd8c4252ef5271915c9794b8f295851da7510f99cb73eb":16:"cc4e90d2a1b3a065d3b2d1f5a8fce31b544475664eab561d2971b99fb7bef844e8ec1f360b8c2ac8359692971ea6a38f723fcc211f5dbcb177a0fdac5164a1d4ff7fbb4e829986353cb983659a148cdd420c7d31ba3822ea90a32be46c030e8c17e1fa0ad37859e06b0aa6fa3b216d9cbe6c0e22339769c0a615913e5da719cf":16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"883177e5126b9be2d9a9680327d5370c6f26861f5820c43da67a3ad609":"04e215ee6ff934b9da70d7730c8734abfcecde89":"82c2b160093b8aa3c0f7522b19f87354066c77847abf2a9fce542d0e84e920c5afb49ffdfdace16560ee94a1369601148ebad7a0e151cf16331791a5727d05f21e74e7eb811440206935d744765a15e79f015cb66c532c87a6a05961c8bfad741a9a6657022894393e7223739796c02a77455d0f555b0ec01ddf259b6207fd0fd57614cef1a5573baaff4ec00069951659b85f24300a25160ca8522dc6e6727e57d019d7e63629b8fe5e89e25cc15beb3a647577559299280b9b28f79b0409000be25bbd96408ba3b43cc486184dd1c8e62553fa1af4040f60663de7f5e49c04388e257f1ce89c95dab48a315d9b66b1b7628233876ff2385230d070d07e1666":0 - -RSASSA-PSS Signature Example 10_1 (verify) -pkcs1_rsassa_pss_verify:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"883177e5126b9be2d9a9680327d5370c6f26861f5820c43da67a3ad609":"04e215ee6ff934b9da70d7730c8734abfcecde89":"82c2b160093b8aa3c0f7522b19f87354066c77847abf2a9fce542d0e84e920c5afb49ffdfdace16560ee94a1369601148ebad7a0e151cf16331791a5727d05f21e74e7eb811440206935d744765a15e79f015cb66c532c87a6a05961c8bfad741a9a6657022894393e7223739796c02a77455d0f555b0ec01ddf259b6207fd0fd57614cef1a5573baaff4ec00069951659b85f24300a25160ca8522dc6e6727e57d019d7e63629b8fe5e89e25cc15beb3a647577559299280b9b28f79b0409000be25bbd96408ba3b43cc486184dd1c8e62553fa1af4040f60663de7f5e49c04388e257f1ce89c95dab48a315d9b66b1b7628233876ff2385230d070d07e1666":0 - -RSASSA-PSS Signature Example 10_2 -pkcs1_rsassa_pss_sign:2048:16:"cfd50283feeeb97f6f08d73cbc7b3836f82bbcd499479f5e6f76fdfcb8b38c4f71dc9e88bd6a6f76371afd65d2af1862b32afb34a95f71b8b132043ffebe3a952baf7592448148c03f9c69b1d68e4ce5cf32c86baf46fed301ca1ab403069b32f456b91f71898ab081cd8c4252ef5271915c9794b8f295851da7510f99cb73eb":16:"cc4e90d2a1b3a065d3b2d1f5a8fce31b544475664eab561d2971b99fb7bef844e8ec1f360b8c2ac8359692971ea6a38f723fcc211f5dbcb177a0fdac5164a1d4ff7fbb4e829986353cb983659a148cdd420c7d31ba3822ea90a32be46c030e8c17e1fa0ad37859e06b0aa6fa3b216d9cbe6c0e22339769c0a615913e5da719cf":16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"dd670a01465868adc93f26131957a50c52fb777cdbaa30892c9e12361164ec13979d43048118e4445db87bee58dd987b3425d02071d8dbae80708b039dbb64dbd1de5657d9fed0c118a54143742e0ff3c87f74e45857647af3f79eb0a14c9d75ea9a1a04b7cf478a897a708fd988f48e801edb0b7039df8c23bb3c56f4e821ac":"8b2bdd4b40faf545c778ddf9bc1a49cb57f9b71b":"14ae35d9dd06ba92f7f3b897978aed7cd4bf5ff0b585a40bd46ce1b42cd2703053bb9044d64e813d8f96db2dd7007d10118f6f8f8496097ad75e1ff692341b2892ad55a633a1c55e7f0a0ad59a0e203a5b8278aec54dd8622e2831d87174f8caff43ee6c46445345d84a59659bfb92ecd4c818668695f34706f66828a89959637f2bf3e3251c24bdba4d4b7649da0022218b119c84e79a6527ec5b8a5f861c159952e23ec05e1e717346faefe8b1686825bd2b262fb2531066c0de09acde2e4231690728b5d85e115a2f6b92b79c25abc9bd9399ff8bcf825a52ea1f56ea76dd26f43baafa18bfa92a504cbd35699e26d1dcc5a2887385f3c63232f06f3244c3":0 - -RSASSA-PSS Signature Example 10_2 (verify) -pkcs1_rsassa_pss_verify:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"dd670a01465868adc93f26131957a50c52fb777cdbaa30892c9e12361164ec13979d43048118e4445db87bee58dd987b3425d02071d8dbae80708b039dbb64dbd1de5657d9fed0c118a54143742e0ff3c87f74e45857647af3f79eb0a14c9d75ea9a1a04b7cf478a897a708fd988f48e801edb0b7039df8c23bb3c56f4e821ac":"8b2bdd4b40faf545c778ddf9bc1a49cb57f9b71b":"14ae35d9dd06ba92f7f3b897978aed7cd4bf5ff0b585a40bd46ce1b42cd2703053bb9044d64e813d8f96db2dd7007d10118f6f8f8496097ad75e1ff692341b2892ad55a633a1c55e7f0a0ad59a0e203a5b8278aec54dd8622e2831d87174f8caff43ee6c46445345d84a59659bfb92ecd4c818668695f34706f66828a89959637f2bf3e3251c24bdba4d4b7649da0022218b119c84e79a6527ec5b8a5f861c159952e23ec05e1e717346faefe8b1686825bd2b262fb2531066c0de09acde2e4231690728b5d85e115a2f6b92b79c25abc9bd9399ff8bcf825a52ea1f56ea76dd26f43baafa18bfa92a504cbd35699e26d1dcc5a2887385f3c63232f06f3244c3":0 - -RSASSA-PSS Signature Example 10_3 -pkcs1_rsassa_pss_sign:2048:16:"cfd50283feeeb97f6f08d73cbc7b3836f82bbcd499479f5e6f76fdfcb8b38c4f71dc9e88bd6a6f76371afd65d2af1862b32afb34a95f71b8b132043ffebe3a952baf7592448148c03f9c69b1d68e4ce5cf32c86baf46fed301ca1ab403069b32f456b91f71898ab081cd8c4252ef5271915c9794b8f295851da7510f99cb73eb":16:"cc4e90d2a1b3a065d3b2d1f5a8fce31b544475664eab561d2971b99fb7bef844e8ec1f360b8c2ac8359692971ea6a38f723fcc211f5dbcb177a0fdac5164a1d4ff7fbb4e829986353cb983659a148cdd420c7d31ba3822ea90a32be46c030e8c17e1fa0ad37859e06b0aa6fa3b216d9cbe6c0e22339769c0a615913e5da719cf":16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"48b2b6a57a63c84cea859d65c668284b08d96bdcaabe252db0e4a96cb1bac6019341db6fbefb8d106b0e90eda6bcc6c6262f37e7ea9c7e5d226bd7df85ec5e71efff2f54c5db577ff729ff91b842491de2741d0c631607df586b905b23b91af13da12304bf83eca8a73e871ff9db":"4e96fc1b398f92b44671010c0dc3efd6e20c2d73":"6e3e4d7b6b15d2fb46013b8900aa5bbb3939cf2c095717987042026ee62c74c54cffd5d7d57efbbf950a0f5c574fa09d3fc1c9f513b05b4ff50dd8df7edfa20102854c35e592180119a70ce5b085182aa02d9ea2aa90d1df03f2daae885ba2f5d05afdac97476f06b93b5bc94a1a80aa9116c4d615f333b098892b25fface266f5db5a5a3bcc10a824ed55aad35b727834fb8c07da28fcf416a5d9b2224f1f8b442b36f91e456fdea2d7cfe3367268de0307a4c74e924159ed33393d5e0655531c77327b89821bdedf880161c78cd4196b5419f7acc3f13e5ebf161b6e7c6724716ca33b85c2e25640192ac2859651d50bde7eb976e51cec828b98b6563b86bb":0 - -RSASSA-PSS Signature Example 10_3 (verify) -pkcs1_rsassa_pss_verify:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"48b2b6a57a63c84cea859d65c668284b08d96bdcaabe252db0e4a96cb1bac6019341db6fbefb8d106b0e90eda6bcc6c6262f37e7ea9c7e5d226bd7df85ec5e71efff2f54c5db577ff729ff91b842491de2741d0c631607df586b905b23b91af13da12304bf83eca8a73e871ff9db":"4e96fc1b398f92b44671010c0dc3efd6e20c2d73":"6e3e4d7b6b15d2fb46013b8900aa5bbb3939cf2c095717987042026ee62c74c54cffd5d7d57efbbf950a0f5c574fa09d3fc1c9f513b05b4ff50dd8df7edfa20102854c35e592180119a70ce5b085182aa02d9ea2aa90d1df03f2daae885ba2f5d05afdac97476f06b93b5bc94a1a80aa9116c4d615f333b098892b25fface266f5db5a5a3bcc10a824ed55aad35b727834fb8c07da28fcf416a5d9b2224f1f8b442b36f91e456fdea2d7cfe3367268de0307a4c74e924159ed33393d5e0655531c77327b89821bdedf880161c78cd4196b5419f7acc3f13e5ebf161b6e7c6724716ca33b85c2e25640192ac2859651d50bde7eb976e51cec828b98b6563b86bb":0 - -RSASSA-PSS Signature Example 10_4 -pkcs1_rsassa_pss_sign:2048:16:"cfd50283feeeb97f6f08d73cbc7b3836f82bbcd499479f5e6f76fdfcb8b38c4f71dc9e88bd6a6f76371afd65d2af1862b32afb34a95f71b8b132043ffebe3a952baf7592448148c03f9c69b1d68e4ce5cf32c86baf46fed301ca1ab403069b32f456b91f71898ab081cd8c4252ef5271915c9794b8f295851da7510f99cb73eb":16:"cc4e90d2a1b3a065d3b2d1f5a8fce31b544475664eab561d2971b99fb7bef844e8ec1f360b8c2ac8359692971ea6a38f723fcc211f5dbcb177a0fdac5164a1d4ff7fbb4e829986353cb983659a148cdd420c7d31ba3822ea90a32be46c030e8c17e1fa0ad37859e06b0aa6fa3b216d9cbe6c0e22339769c0a615913e5da719cf":16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0b8777c7f839baf0a64bbbdbc5ce79755c57a205b845c174e2d2e90546a089c4e6ec8adffa23a7ea97bae6b65d782b82db5d2b5a56d22a29a05e7c4433e2b82a621abba90add05ce393fc48a840542451a":"c7cd698d84b65128d8835e3a8b1eb0e01cb541ec":"34047ff96c4dc0dc90b2d4ff59a1a361a4754b255d2ee0af7d8bf87c9bc9e7ddeede33934c63ca1c0e3d262cb145ef932a1f2c0a997aa6a34f8eaee7477d82ccf09095a6b8acad38d4eec9fb7eab7ad02da1d11d8e54c1825e55bf58c2a23234b902be124f9e9038a8f68fa45dab72f66e0945bf1d8bacc9044c6f07098c9fcec58a3aab100c805178155f030a124c450e5acbda47d0e4f10b80a23f803e774d023b0015c20b9f9bbe7c91296338d5ecb471cafb032007b67a60be5f69504a9f01abb3cb467b260e2bce860be8d95bf92c0c8e1496ed1e528593a4abb6df462dde8a0968dffe4683116857a232f5ebf6c85be238745ad0f38f767a5fdbf486fb":0 - -RSASSA-PSS Signature Example 10_4 (verify) -pkcs1_rsassa_pss_verify:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"0b8777c7f839baf0a64bbbdbc5ce79755c57a205b845c174e2d2e90546a089c4e6ec8adffa23a7ea97bae6b65d782b82db5d2b5a56d22a29a05e7c4433e2b82a621abba90add05ce393fc48a840542451a":"c7cd698d84b65128d8835e3a8b1eb0e01cb541ec":"34047ff96c4dc0dc90b2d4ff59a1a361a4754b255d2ee0af7d8bf87c9bc9e7ddeede33934c63ca1c0e3d262cb145ef932a1f2c0a997aa6a34f8eaee7477d82ccf09095a6b8acad38d4eec9fb7eab7ad02da1d11d8e54c1825e55bf58c2a23234b902be124f9e9038a8f68fa45dab72f66e0945bf1d8bacc9044c6f07098c9fcec58a3aab100c805178155f030a124c450e5acbda47d0e4f10b80a23f803e774d023b0015c20b9f9bbe7c91296338d5ecb471cafb032007b67a60be5f69504a9f01abb3cb467b260e2bce860be8d95bf92c0c8e1496ed1e528593a4abb6df462dde8a0968dffe4683116857a232f5ebf6c85be238745ad0f38f767a5fdbf486fb":0 - -RSASSA-PSS Signature Example 10_5 -pkcs1_rsassa_pss_sign:2048:16:"cfd50283feeeb97f6f08d73cbc7b3836f82bbcd499479f5e6f76fdfcb8b38c4f71dc9e88bd6a6f76371afd65d2af1862b32afb34a95f71b8b132043ffebe3a952baf7592448148c03f9c69b1d68e4ce5cf32c86baf46fed301ca1ab403069b32f456b91f71898ab081cd8c4252ef5271915c9794b8f295851da7510f99cb73eb":16:"cc4e90d2a1b3a065d3b2d1f5a8fce31b544475664eab561d2971b99fb7bef844e8ec1f360b8c2ac8359692971ea6a38f723fcc211f5dbcb177a0fdac5164a1d4ff7fbb4e829986353cb983659a148cdd420c7d31ba3822ea90a32be46c030e8c17e1fa0ad37859e06b0aa6fa3b216d9cbe6c0e22339769c0a615913e5da719cf":16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"f1036e008e71e964dadc9219ed30e17f06b4b68a955c16b312b1eddf028b74976bed6b3f6a63d4e77859243c9cccdc98016523abb02483b35591c33aad81213bb7c7bb1a470aabc10d44256c4d4559d916":"efa8bff96212b2f4a3f371a10d574152655f5dfb":"7e0935ea18f4d6c1d17ce82eb2b3836c55b384589ce19dfe743363ac9948d1f346b7bfddfe92efd78adb21faefc89ade42b10f374003fe122e67429a1cb8cbd1f8d9014564c44d120116f4990f1a6e38774c194bd1b8213286b077b0499d2e7b3f434ab12289c556684deed78131934bb3dd6537236f7c6f3dcb09d476be07721e37e1ceed9b2f7b406887bd53157305e1c8b4f84d733bc1e186fe06cc59b6edb8f4bd7ffefdf4f7ba9cfb9d570689b5a1a4109a746a690893db3799255a0cb9215d2d1cd490590e952e8c8786aa0011265252470c041dfbc3eec7c3cbf71c24869d115c0cb4a956f56d530b80ab589acfefc690751ddf36e8d383f83cedd2cc":0 - -RSASSA-PSS Signature Example 10_5 (verify) -pkcs1_rsassa_pss_verify:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"f1036e008e71e964dadc9219ed30e17f06b4b68a955c16b312b1eddf028b74976bed6b3f6a63d4e77859243c9cccdc98016523abb02483b35591c33aad81213bb7c7bb1a470aabc10d44256c4d4559d916":"efa8bff96212b2f4a3f371a10d574152655f5dfb":"7e0935ea18f4d6c1d17ce82eb2b3836c55b384589ce19dfe743363ac9948d1f346b7bfddfe92efd78adb21faefc89ade42b10f374003fe122e67429a1cb8cbd1f8d9014564c44d120116f4990f1a6e38774c194bd1b8213286b077b0499d2e7b3f434ab12289c556684deed78131934bb3dd6537236f7c6f3dcb09d476be07721e37e1ceed9b2f7b406887bd53157305e1c8b4f84d733bc1e186fe06cc59b6edb8f4bd7ffefdf4f7ba9cfb9d570689b5a1a4109a746a690893db3799255a0cb9215d2d1cd490590e952e8c8786aa0011265252470c041dfbc3eec7c3cbf71c24869d115c0cb4a956f56d530b80ab589acfefc690751ddf36e8d383f83cedd2cc":0 - -RSASSA-PSS Signature Example 10_6 -pkcs1_rsassa_pss_sign:2048:16:"cfd50283feeeb97f6f08d73cbc7b3836f82bbcd499479f5e6f76fdfcb8b38c4f71dc9e88bd6a6f76371afd65d2af1862b32afb34a95f71b8b132043ffebe3a952baf7592448148c03f9c69b1d68e4ce5cf32c86baf46fed301ca1ab403069b32f456b91f71898ab081cd8c4252ef5271915c9794b8f295851da7510f99cb73eb":16:"cc4e90d2a1b3a065d3b2d1f5a8fce31b544475664eab561d2971b99fb7bef844e8ec1f360b8c2ac8359692971ea6a38f723fcc211f5dbcb177a0fdac5164a1d4ff7fbb4e829986353cb983659a148cdd420c7d31ba3822ea90a32be46c030e8c17e1fa0ad37859e06b0aa6fa3b216d9cbe6c0e22339769c0a615913e5da719cf":16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"ad8b1523703646224b660b550885917ca2d1df28":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0 - -RSASSA-PSS Signature Example 10_6 (verify) -pkcs1_rsassa_pss_verify:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"ad8b1523703646224b660b550885917ca2d1df28":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0 - -RSASSA-PSS Signature verify options #1 (OK) -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0:0 - -RSASSA-PSS Signature verify options #2 (ctx_hash none) -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_NONE:MBEDTLS_MD_SHA1:20:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0:0 - -RSASSA-PSS Signature verify options #3 (ctx_hash diverging) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA1:20:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":MBEDTLS_ERR_RSA_INVALID_PADDING:0 - -RSASSA-PSS Signature verify options #4 (mgf1_hash diverging) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0:MBEDTLS_ERR_RSA_INVALID_PADDING - -RSASSA-PSS Signature verify options #5 (wrong msg_hash) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":MBEDTLS_ERR_RSA_VERIFY_FAILED:MBEDTLS_ERR_RSA_VERIFY_FAILED - -RSASSA-PSS Signature verify options #6 (wrong expected_salt_len) -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:21:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0:MBEDTLS_ERR_RSA_INVALID_PADDING - -RSASSA-PSS Signature verify options #7 (wrong expected_salt_len) -pkcs1_rsassa_pss_verify_ext:2048:16:"a5dd867ac4cb02f90b9457d48c14a770ef991c56c39c0ec65fd11afa8937cea57b9be7ac73b45c0017615b82d622e318753b6027c0fd157be12f8090fee2a7adcd0eef759f88ba4997c7a42d58c9aa12cb99ae001fe521c13bb5431445a8d5ae4f5e4c7e948ac227d3604071f20e577e905fbeb15dfaf06d1de5ae6253d63a6a2120b31a5da5dabc9550600e20f27d3739e2627925fea3cc509f21dff04e6eea4549c540d6809ff9307eede91fff58733d8385a237d6d3705a33e391900992070df7adf1357cf7e3700ce3667de83f17b8df1778db381dce09cb4ad058a511001a738198ee27cf55a13b754539906582ec8b174bd58d5d1f3d767c613721ae05":16:"010001":MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:19:"25f10895a87716c137450bb9519dfaa1f207faa942ea88abf71e9c17980085b555aebab76264ae2a3ab93c2d12981191ddac6fb5949eb36aee3c5da940f00752c916d94608fa7d97ba6a2915b688f20323d4e9d96801d89a72ab5892dc2117c07434fcf972e058cf8c41ca4b4ff554f7d5068ad3155fced0f3125bc04f9193378a8f5c4c3b8cb4dd6d1cc69d30ecca6eaa51e36a05730e9e342e855baf099defb8afd7":"6d3b5b87f67ea657af21f75441977d2180f91b2c5f692de82955696a686730d9b9778d970758ccb26071c2209ffbd6125be2e96ea81b67cb9b9308239fda17f7b2b64ecda096b6b935640a5a1cb42a9155b1c9ef7a633a02c59f0d6ee59b852c43b35029e73c940ff0410e8f114eed46bbd0fae165e42be2528a401c3b28fd818ef3232dca9f4d2a0f5166ec59c42396d6c11dbc1215a56fa17169db9575343ef34f9de32a49cdc3174922f229c23e18e45df9353119ec4319cedce7a17c64088c1f6f52be29634100b3919d38f3d1ed94e6891e66a73b8fb849f5874df59459e298c7bbce2eee782a195aa66fe2d0732b25e595f57d3e061b1fc3e4063bf98f":0:MBEDTLS_ERR_RSA_INVALID_PADDING - -RSASSA-PSS Signature verify options #8 (non-default salt_len: max) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:94:"54657374206d657373616765":"0d2bdb0456a3d651d5bd48a4204493898f72cf1aaddd71387cc058bc3f4c235ea6be4010fd61b28e1fbb275462b53775c04be9022d38b6a2e0387dddba86a3f8554d2858044a59fddbd594753fc056fe33c8daddb85dc70d164690b1182209ff84824e0be10e35c379f2f378bf176a9f7cb94d95e44d90276a298c8810f741c9":0:0 - -RSASSA-PSS Signature verify options #9 (non-default salt_len: 0) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:0:"54657374206d657373616765":"7fc506d26ca3b22922a1ce39faaedd273161b82d9443c56f1a034f131ae4a18cae1474271cb4b66a17d9707ca58b0bdbd3c406b7e65bbcc9bbbce94dc45de807b4989b23b3e4db74ca29298137837eb90cc83d3219249bc7d480fceaf075203a86e54c4ecfa4e312e39f8f69d76534089a36ed9049ca9cfd5ab1db1fa75fe5c8":0:0 - -RSASSA-PSS Signature verify options #10 (non-default salt_len: 0, ANY) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:"54657374206d657373616765":"7fc506d26ca3b22922a1ce39faaedd273161b82d9443c56f1a034f131ae4a18cae1474271cb4b66a17d9707ca58b0bdbd3c406b7e65bbcc9bbbce94dc45de807b4989b23b3e4db74ca29298137837eb90cc83d3219249bc7d480fceaf075203a86e54c4ecfa4e312e39f8f69d76534089a36ed9049ca9cfd5ab1db1fa75fe5c8":0:0 - -RSASSA-PSS Signature verify options #11 (MGF1 alg != MSG hash alg) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":MBEDTLS_MD_NONE:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:"c0719e9a8d5d838d861dc6f675c899d2b309a3a65bb9fe6b11e5afcbf9a2c0b1":"7fc506d26ca3b22922a1ce39faaedd273161b82d9443c56f1a034f131ae4a18cae1474271cb4b66a17d9707ca58b0bdbd3c406b7e65bbcc9bbbce94dc45de807b4989b23b3e4db74ca29298137837eb90cc83d3219249bc7d480fceaf075203a86e54c4ecfa4e312e39f8f69d76534089a36ed9049ca9cfd5ab1db1fa75fe5c8":0:0 - -RSASSA-PSS Signature verify options #12 (MGF1 alg != MSG hash alg, ctx wrong) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":MBEDTLS_MD_NONE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:MBEDTLS_RSA_SALT_LEN_ANY:"c0719e9a8d5d838d861dc6f675c899d2b309a3a65bb9fe6b11e5afcbf9a2c0b1":"7fc506d26ca3b22922a1ce39faaedd273161b82d9443c56f1a034f131ae4a18cae1474271cb4b66a17d9707ca58b0bdbd3c406b7e65bbcc9bbbce94dc45de807b4989b23b3e4db74ca29298137837eb90cc83d3219249bc7d480fceaf075203a86e54c4ecfa4e312e39f8f69d76534089a36ed9049ca9cfd5ab1db1fa75fe5c8":MBEDTLS_ERR_RSA_INVALID_PADDING:0 - -RSASSA-PSS Signature verify options #13 (MGF1 alg != MSG hash alg, arg wrong) -depends_on:MBEDTLS_SHA256_C -pkcs1_rsassa_pss_verify_ext:1024:16:"00dd118a9f99bab068ca2aea3b6a6d5997ed4ec954e40deecea07da01eaae80ec2bb1340db8a128e891324a5c5f5fad8f590d7c8cacbc5fe931dafda1223735279461abaa0572b761631b3a8afe7389b088b63993a0a25ee45d21858bab9931aedd4589a631b37fcf714089f856549f359326dd1e0e86dde52ed66b4a90bda4095":16:"010001":MBEDTLS_MD_NONE:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA1:MBEDTLS_RSA_SALT_LEN_ANY:"c0719e9a8d5d838d861dc6f675c899d2b309a3a65bb9fe6b11e5afcbf9a2c0b1":"7fc506d26ca3b22922a1ce39faaedd273161b82d9443c56f1a034f131ae4a18cae1474271cb4b66a17d9707ca58b0bdbd3c406b7e65bbcc9bbbce94dc45de807b4989b23b3e4db74ca29298137837eb90cc83d3219249bc7d480fceaf075203a86e54c4ecfa4e312e39f8f69d76534089a36ed9049ca9cfd5ab1db1fa75fe5c8":0:MBEDTLS_ERR_RSA_INVALID_PADDING - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.function deleted file mode 100644 index 4f1ff4509f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs1_v21.function +++ /dev/null @@ -1,267 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/rsa.h" -#include "mbedtls/md.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_PKCS1_V21:MBEDTLS_RSA_C:MBEDTLS_SHA1_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void pkcs1_rsaes_oaep_encrypt( int mod, int radix_N, char *input_N, int radix_E, - char *input_E, int hash, - char *message_hex_string, char *seed, - char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - unsigned char rnd_buf[1000]; - mbedtls_rsa_context ctx; - size_t msg_len; - rnd_buf_info info; - - info.length = unhexify( rnd_buf, seed ); - info.buf = rnd_buf; - - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V21, hash ); - memset( message_str, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - - ctx.len = mod / 8 + ( ( mod % 8 ) ? 1 : 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void pkcs1_rsaes_oaep_decrypt( int mod, int radix_P, char *input_P, - int radix_Q, char *input_Q, int radix_N, - char *input_N, int radix_E, char *input_E, - int hash, char *result_hex_str, char *seed, - char *message_hex_string, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx; - mbedtls_mpi P1, Q1, H, G; - size_t output_len; - rnd_pseudo_info rnd_info; - ((void) seed); - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V21, hash ); - - memset( message_str, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - - ctx.len = mod / 8 + ( ( mod % 8 ) ? 1 : 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DQ, &ctx.D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - - unhexify( message_str, message_hex_string ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_decrypt( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, &output_len, message_str, output, 1000 ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strncasecmp( (char *) output_str, result_hex_str, strlen( result_hex_str ) ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void pkcs1_rsassa_pss_sign( int mod, int radix_P, char *input_P, int radix_Q, - char *input_Q, int radix_N, char *input_N, - int radix_E, char *input_E, int digest, int hash, - char *message_hex_string, char *salt, - char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - unsigned char rnd_buf[1000]; - mbedtls_rsa_context ctx; - mbedtls_mpi P1, Q1, H, G; - size_t msg_len; - rnd_buf_info info; - - info.length = unhexify( rnd_buf, salt ); - info.buf = rnd_buf; - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V21, hash ); - - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - - ctx.len = mod / 8 + ( ( mod % 8 ) ? 1 : 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DQ, &ctx.D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - - if( mbedtls_md_info_from_type( digest ) != NULL ) - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_sign( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PRIVATE, digest, 0, hash_result, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void pkcs1_rsassa_pss_verify( int mod, int radix_N, char *input_N, int radix_E, - char *input_E, int digest, int hash, - char *message_hex_string, char *salt, - char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - mbedtls_rsa_context ctx; - size_t msg_len; - ((void) salt); - - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V21, hash ); - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - - ctx.len = mod / 8 + ( ( mod % 8 ) ? 1 : 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - unhexify( result_str, result_hex_str ); - - if( mbedtls_md_info_from_type( digest ) != NULL ) - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_verify( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, digest, 0, hash_result, result_str ) == result ); - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void pkcs1_rsassa_pss_verify_ext( int mod, - int radix_N, char *input_N, - int radix_E, char *input_E, - int msg_digest_id, int ctx_hash, - int mgf_hash, int salt_len, - char *message_hex_string, - char *result_hex_str, - int result_simple, - int result_full ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - mbedtls_rsa_context ctx; - size_t msg_len, hash_len; - - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V21, ctx_hash ); - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - - ctx.len = mod / 8 + ( ( mod % 8 ) ? 1 : 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - unhexify( result_str, result_hex_str ); - - if( msg_digest_id != MBEDTLS_MD_NONE ) - { - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( msg_digest_id ), - message_str, msg_len, hash_result ) == 0 ); - hash_len = 0; - } - else - { - memcpy( hash_result, message_str, msg_len ); - hash_len = msg_len; - } - - TEST_ASSERT( mbedtls_rsa_pkcs1_verify( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, - msg_digest_id, hash_len, hash_result, - result_str ) == result_simple ); - - TEST_ASSERT( mbedtls_rsa_rsassa_pss_verify_ext( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, - msg_digest_id, hash_len, hash_result, - mgf_hash, salt_len, - result_str ) == result_full ); - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.data deleted file mode 100644 index bf16248383..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.data +++ /dev/null @@ -1,123 +0,0 @@ -PBKDF2 RFC 6070 Test Vector #1 (SHA1) -depends_on:MBEDTLS_SHA1_C -pbkdf2_hmac:MBEDTLS_MD_SHA1:"70617373776f7264":"73616c74":1:20:"0c60c80f961f0e71f3a9b524af6012062fe037a6" - -PBKDF2 RFC 6070 Test Vector #2 (SHA1) -depends_on:MBEDTLS_SHA1_C -pbkdf2_hmac:MBEDTLS_MD_SHA1:"70617373776f7264":"73616c74":2:20:"ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957" - -PBKDF2 RFC 6070 Test Vector #3 (SHA1) -depends_on:MBEDTLS_SHA1_C -pbkdf2_hmac:MBEDTLS_MD_SHA1:"70617373776f7264":"73616c74":4096:20:"4b007901b765489abead49d926f721d065a429c1" - -PBKDF2 RFC 6070 Test Vector #5 (SHA1) -depends_on:MBEDTLS_SHA1_C -pbkdf2_hmac:MBEDTLS_MD_SHA1:"70617373776f726450415353574f524470617373776f7264":"73616c7453414c5473616c7453414c5473616c7453414c5473616c7453414c5473616c74":4096:25:"3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038" - -PBKDF2 RFC 6070 Test Vector #6 (SHA1) -depends_on:MBEDTLS_SHA1_C -pbkdf2_hmac:MBEDTLS_MD_SHA1:"7061737300776f7264":"7361006c74":4096:16:"56fa6aa75548099dcc37d7f03425e0c3" - -PBES2 Decrypt (OK) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020800301406082A864886F70D030704088A4FCC9DCC394910":"70617373776f7264":"1B60098D4834CA752D37B430E70B7A085CFF86E21F4849F969DD1DF623342662443F8BD1252BF83CEF6917551B08EF55A69C8F2BFFC93BCB2DFE2E354DA28F896D1BD1BFB972A1251219A6EC7183B0A4CF2C4998449ED786CAE2138437289EB2203974000C38619DA57A4E685D29649284602BD1806131772DA11A682674DC22B2CF109128DDB7FD980E1C5741FC0DB7":0:"308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B0201010420F12A1320760270A83CBFFD53F6031EF76A5D86C8A204F2C30CA9EBF51F0F0EA7A1440342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF060606060606" - -PBES2 Decrypt (bad params tag) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_SEQUENCE:"":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad KDF AlgId: not a sequence) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"31":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad KDF AlgId: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"3001":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (KDF != PBKDF2) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"300B06092A864886F70D01050D":"":"":MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE:"" - -PBES2 Decrypt (bad PBKDF2 params: not a sequence) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"300D06092A864886F70D01050C3100":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad PBKDF2 params: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"300D06092A864886F70D01050C3001":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (bad PBKDF2 params salt: not an octet string) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"300E06092A864886F70D01050C30010500":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad PBKDF2 params salt: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"300E06092A864886F70D01050C30010401":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (bad PBKDF2 params iter: not an int) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301906092A864886F70D01050C300C04082ED7F24A1D516DD70300":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad PBKDF2 params iter: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301906092A864886F70D01050C300C04082ED7F24A1D516DD70201":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (OK, PBKDF2 params explicit keylen) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301E06092A864886F70D01050C301104082ED7F24A1D516DD702020800020118301406082A864886F70D030704088A4FCC9DCC394910":"70617373776f7264":"1B60098D4834CA752D37B430E70B7A085CFF86E21F4849F969DD1DF623342662443F8BD1252BF83CEF6917551B08EF55A69C8F2BFFC93BCB2DFE2E354DA28F896D1BD1BFB972A1251219A6EC7183B0A4CF2C4998449ED786CAE2138437289EB2203974000C38619DA57A4E685D29649284602BD1806131772DA11A682674DC22B2CF109128DDB7FD980E1C5741FC0DB7":0:"308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B0201010420F12A1320760270A83CBFFD53F6031EF76A5D86C8A204F2C30CA9EBF51F0F0EA7A1440342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF060606060606" - -PBES2 Decrypt (bad PBKDF2 params explicit keylen: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301D06092A864886F70D01050C301004082ED7F24A1D516DD7020208000201":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (OK, PBKDF2 params explicit prf_alg) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"302706092A864886F70D01050C301A04082ED7F24A1D516DD702020800300A06082A864886F70D0207301406082A864886F70D030704088A4FCC9DCC394910":"70617373776f7264":"1B60098D4834CA752D37B430E70B7A085CFF86E21F4849F969DD1DF623342662443F8BD1252BF83CEF6917551B08EF55A69C8F2BFFC93BCB2DFE2E354DA28F896D1BD1BFB972A1251219A6EC7183B0A4CF2C4998449ED786CAE2138437289EB2203974000C38619DA57A4E685D29649284602BD1806131772DA11A682674DC22B2CF109128DDB7FD980E1C5741FC0DB7":0:"308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B0201010420F12A1320760270A83CBFFD53F6031EF76A5D86C8A204F2C30CA9EBF51F0F0EA7A1440342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF060606060606" - -PBES2 Decrypt (bad, PBKDF2 params explicit prf_alg not a sequence) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301D06092A864886F70D01050C301004082ED7F24A1D516DD7020208003100":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad, PBKDF2 params explicit prf_alg overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301D06092A864886F70D01050C301004082ED7F24A1D516DD7020208003001":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (bad, PBKDF2 params explicit prf_alg != HMAC-SHA1) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"302706092A864886F70D01050C301A04082ED7F24A1D516DD702020800300A06082A864886F70D0208":"":"":MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE:"" - -PBES2 Decrypt (bad, PBKDF2 params extra data) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"302806092A864886F70D01050C301B04082ED7F24A1D516DD702020800300A06082A864886F70D020700":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH:"" - -PBES2 Decrypt (bad enc_scheme_alg: not a sequence) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD7020208003100":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:"" - -PBES2 Decrypt (bad enc_scheme_alg: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD7020208003001":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (bad enc_scheme_alg: unknown oid) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020800300A06082A864886F70D03FF":"":"":MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE:"" - -PBES2 Decrypt (bad enc_scheme_alg params: not an octet string) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020800300C06082A864886F70D03070500":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT:"" - -PBES2 Decrypt (bad enc_scheme_alg params: overlong) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020800300C06082A864886F70D03070401":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA:"" - -PBES2 Decrypt (bad enc_scheme_alg params: len != iv_len) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020800301306082A864886F70D030704078A4FCC9DCC3949":"":"":MBEDTLS_ERR_PKCS5_INVALID_FORMAT:"" - -PBES2 Decrypt (bad password) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020800301406082A864886F70D030704088A4FCC9DCC394910":"F0617373776f7264":"1B60098D4834CA752D37B430E70B7A085CFF86E21F4849F969DD1DF623342662443F8BD1252BF83CEF6917551B08EF55A69C8F2BFFC93BCB2DFE2E354DA28F896D1BD1BFB972A1251219A6EC7183B0A4CF2C4998449ED786CAE2138437289EB2203974000C38619DA57A4E685D29649284602BD1806131772DA11A682674DC22B2CF109128DDB7FD980E1C5741FC0DB7":MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH:"308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B0201010420F12A1320760270A83CBFFD53F6031EF76A5D86C8A204F2C30CA9EBF51F0F0EA7A1440342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF060606060606" - -PBES2 Decrypt (bad iter value) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_DES_C -mbedtls_pkcs5_pbes2:MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:"301B06092A864886F70D01050C300E04082ED7F24A1D516DD702020801301406082A864886F70D030704088A4FCC9DCC394910":"70617373776f7264":"1B60098D4834CA752D37B430E70B7A085CFF86E21F4849F969DD1DF623342662443F8BD1252BF83CEF6917551B08EF55A69C8F2BFFC93BCB2DFE2E354DA28F896D1BD1BFB972A1251219A6EC7183B0A4CF2C4998449ED786CAE2138437289EB2203974000C38619DA57A4E685D29649284602BD1806131772DA11A682674DC22B2CF109128DDB7FD980E1C5741FC0DB7":MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH:"308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B0201010420F12A1320760270A83CBFFD53F6031EF76A5D86C8A204F2C30CA9EBF51F0F0EA7A1440342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF060606060606" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.function deleted file mode 100644 index ab53326d43..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkcs5.function +++ /dev/null @@ -1,80 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/pkcs5.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_PKCS5_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void pbkdf2_hmac( int hash, char *hex_password_string, - char *hex_salt_string, int it_cnt, int key_len, - char *result_key_string ) -{ - unsigned char pw_str[100]; - unsigned char salt_str[100]; - unsigned char dst_str[100]; - - mbedtls_md_context_t ctx; - const mbedtls_md_info_t *info; - - int pw_len, salt_len; - unsigned char key[100]; - - mbedtls_md_init( &ctx ); - - memset(pw_str, 0x00, 100); - memset(salt_str, 0x00, 100); - memset(dst_str, 0x00, 100); - - pw_len = unhexify( pw_str, hex_password_string ); - salt_len = unhexify( salt_str, hex_salt_string ); - - - info = mbedtls_md_info_from_type( hash ); - TEST_ASSERT( info != NULL ); - TEST_ASSERT( mbedtls_md_setup( &ctx, info, 1 ) == 0 ); - TEST_ASSERT( mbedtls_pkcs5_pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len, - it_cnt, key_len, key ) == 0 ); - - hexify( dst_str, key, key_len ); - TEST_ASSERT( strcmp( (char *) dst_str, result_key_string ) == 0 ); - -exit: - mbedtls_md_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_pkcs5_pbes2( int params_tag, char *params_hex, char *pw_hex, - char *data_hex, int ref_ret, char *ref_out_hex ) -{ - int my_ret; - mbedtls_asn1_buf params; - unsigned char *my_out = NULL, *ref_out = NULL, *data = NULL, *pw = NULL; - size_t ref_out_len, data_len, pw_len; - - params.tag = params_tag; - params.p = unhexify_alloc( params_hex, ¶ms.len ); - - data = unhexify_alloc( data_hex, &data_len ); - pw = unhexify_alloc( pw_hex, &pw_len ); - ref_out = unhexify_alloc( ref_out_hex, &ref_out_len ); - my_out = zero_alloc( ref_out_len ); - - my_ret = mbedtls_pkcs5_pbes2( ¶ms, MBEDTLS_PKCS5_DECRYPT, - pw, pw_len, data, data_len, my_out ); - TEST_ASSERT( my_ret == ref_ret ); - - if( ref_ret == 0 ) - TEST_ASSERT( memcmp( my_out, ref_out, ref_out_len ) == 0 ); - -exit: - mbedtls_free( params.p ); - mbedtls_free( data ); - mbedtls_free( pw ); - mbedtls_free( ref_out ); - mbedtls_free( my_out ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.data deleted file mode 100644 index 763c0db6b9..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.data +++ /dev/null @@ -1,228 +0,0 @@ -Parse RSA Key #1 (No password when required) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/test-ca.key":"NULL":MBEDTLS_ERR_PK_PASSWORD_REQUIRED - -Parse RSA Key #2 (Correct password) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/test-ca.key":"PolarSSLTest":0 - -Parse RSA Key #3 (Wrong password) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/test-ca.key":"PolarSSLWRONG":MBEDTLS_ERR_PK_PASSWORD_MISMATCH - -Parse RSA Key #4 (DES Encrypted) -depends_on:MBEDTLS_MD5_C:MBEDTLS_DES_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/keyfile.des":"testkey":0 - -Parse RSA Key #5 (3DES Encrypted) -depends_on:MBEDTLS_MD5_C:MBEDTLS_DES_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/keyfile.3des":"testkey":0 - -Parse RSA Key #6 (AES-128 Encrypted) -depends_on:MBEDTLS_MD5_C:MBEDTLS_AES_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/keyfile.aes128":"testkey":0 - -Parse RSA Key #7 (AES-192 Encrypted) -depends_on:MBEDTLS_MD5_C:MBEDTLS_AES_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/keyfile.aes192":"testkey":0 - -Parse RSA Key #8 (AES-256 Encrypted) -depends_on:MBEDTLS_MD5_C:MBEDTLS_AES_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/keyfile.aes256":"testkey":0 - -Parse RSA Key #9 (PKCS#8 wrapped) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PEM_PARSE_C -pk_parse_keyfile_rsa:"data_files/format_gen.key":"":0 - -Parse RSA Key #10 (PKCS#8 encrypted SHA1-3DES) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.key":"PolarSSLTest":0 - -Parse RSA Key #10.1 (PKCS#8 encrypted SHA1-3DES, wrong PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.key":"PolarSSLTes":MBEDTLS_ERR_PK_PASSWORD_MISMATCH - -Parse RSA Key #10.2 (PKCS#8 encrypted SHA1-3DES, no PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.key":"":MBEDTLS_ERR_PK_PASSWORD_REQUIRED - -Parse RSA Key #11 (PKCS#8 encrypted SHA1-3DES DER) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PKCS12_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.der":"PolarSSLTest":0 - -Parse RSA Key #12 (PKCS#8 encrypted SHA1-2DES) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_2des.key":"PolarSSLTest":0 - -Parse RSA Key #12.1 (PKCS#8 encrypted SHA1-2DES, wrong PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_2des.key":"PolarSLTest":MBEDTLS_ERR_PK_PASSWORD_MISMATCH - -Parse RSA Key #12.2 (PKCS#8 encrypted SHA1-2DES, no PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_2des.key":"":MBEDTLS_ERR_PK_PASSWORD_REQUIRED - -Parse RSA Key #13 (PKCS#8 encrypted SHA1-RC4-128) -depends_on:MBEDTLS_ARC4_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_rc4_128.key":"PolarSSLTest":0 - -Parse RSA Key #13.1 (PKCS#8 encrypted SHA1-RC4-128, wrong PW) -depends_on:MBEDTLS_ARC4_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_rc4_128.key":"PolarSSLTe":MBEDTLS_ERR_PK_PASSWORD_MISMATCH - -Parse RSA Key #13.2 (PKCS#8 encrypted SHA1-RC4-128, no PW) -depends_on:MBEDTLS_ARC4_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS12_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_rc4_128.key":"":MBEDTLS_ERR_PK_PASSWORD_REQUIRED - -Parse RSA Key #14 (PKCS#8 encrypted v2 PBDFK2 3DES) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS5_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_3des.key":"PolarSSLTest":0 - -Parse RSA Key #15 (PKCS#8 encrypted v2 PBDFK2 3DES, wrong PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS5_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_3des.key":"PolarSSLTes":MBEDTLS_ERR_PK_PASSWORD_MISMATCH - -Parse RSA Key #16 (PKCS#8 encrypted v2 PBDFK2 3DES, no PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS5_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_3des.key":"":MBEDTLS_ERR_PK_PASSWORD_REQUIRED - -Parse RSA Key #17 (PKCS#8 encrypted v2 PBDFK2 3DES DER) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PKCS5_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_3des.der":"PolarSSLTest":0 - -Parse RSA Key #18 (PKCS#8 encrypted v2 PBDFK2 3DES DER, wrong PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PKCS5_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7 -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_3des.der":"PolarSSLTes":MBEDTLS_ERR_PK_PASSWORD_MISMATCH - -Parse RSA Key #19 (PKCS#8 encrypted v2 PBDFK2 3DES DER, no PW) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PKCS5_C -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_3des.der":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Parse RSA Key #20 (PKCS#8 encrypted v2 PBDFK2 DES) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_PKCS5_C:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_rsa:"data_files/pkcs8_pbes2_pbkdf2_des.key":"PolarSSLTest":0 - -Parse Public RSA Key #1 (PKCS#8 wrapped) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PEM_PARSE_C -pk_parse_public_keyfile_rsa:"data_files/format_gen.pub":0 - -Parse Public EC Key #1 (RFC 5480, DER) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_pub.der":0 - -Parse Public EC Key #2 (RFC 5480, PEM) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_pub.pem":0 - -Parse Public EC Key #3 (RFC 5480, secp224r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP224R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_224_pub.pem":0 - -Parse Public EC Key #4 (RFC 5480, secp256r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_256_pub.pem":0 - -Parse Public EC Key #5 (RFC 5480, secp384r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_384_pub.pem":0 - -Parse Public EC Key #6 (RFC 5480, secp521r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP521R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_521_pub.pem":0 - -Parse Public EC Key #7 (RFC 5480, brainpoolP256r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_BP256R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_bp256_pub.pem":0 - -Parse Public EC Key #8 (RFC 5480, brainpoolP384r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_BP384R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_bp384_pub.pem":0 - -Parse Public EC Key #9 (RFC 5480, brainpoolP512r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_BP512R1_ENABLED -pk_parse_public_keyfile_ec:"data_files/ec_bp512_pub.pem":0 - -Parse EC Key #1 (SEC1 DER) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.sec1.der":"NULL":0 - -Parse EC Key #1a (SEC1 DER, no optional part) -depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP256R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.noopt.der":"NULL":0 - -Parse EC Key #2 (SEC1 PEM) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.sec1.pem":"NULL":0 - -Parse EC Key #3 (SEC1 PEM encrypted) -depends_on:MBEDTLS_DES_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_CIPHER_MODE_CBC -pk_parse_keyfile_ec:"data_files/ec_prv.sec1.pw.pem":"polar":0 - -Parse EC Key #4 (PKCS8 DER) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.pk8.der":"NULL":0 - -Parse EC Key #5 (PKCS8 PEM) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.pk8.pem":"NULL":0 - -Parse EC Key #6 (PKCS8 encrypted DER) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.pk8.pw.der":"polar":0 - -Parse EC Key #7 (PKCS8 encrypted PEM) -depends_on:MBEDTLS_DES_C:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_prv.pk8.pw.pem":"polar":0 - -Parse EC Key #8 (SEC1 PEM, secp224r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP224R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_224_prv.pem":"NULL":0 - -Parse EC Key #9 (SEC1 PEM, secp256r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_256_prv.pem":"NULL":0 - -Parse EC Key #10 (SEC1 PEM, secp384r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_384_prv.pem":"NULL":0 - -Parse EC Key #11 (SEC1 PEM, secp521r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP521R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_521_prv.pem":"NULL":0 - -Parse EC Key #12 (SEC1 PEM, bp256r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_BP256R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_bp256_prv.pem":"NULL":0 - -Parse EC Key #13 (SEC1 PEM, bp384r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_BP384R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_bp384_prv.pem":"NULL":0 - -Parse EC Key #14 (SEC1 PEM, bp512r1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_BP512R1_ENABLED -pk_parse_keyfile_ec:"data_files/ec_bp512_prv.pem":"NULL":0 - -Parse EC Key #15 (SEC1 DER, secp256k1, SpecifiedECDomain) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256K1_ENABLED:MBEDTLS_PK_PARSE_EC_EXTENDED -pk_parse_keyfile_ec:"data_files/ec_prv.specdom.der":"NULL":0 - -Key ASN1 (Incorrect first tag) -pk_parse_key_rsa:"":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Key ASN1 (RSAPrivateKey, incorrect version tag) -pk_parse_key_rsa:"300100":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Key ASN1 (RSAPrivateKey, version tag missing) -pk_parse_key_rsa:"3000":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Key ASN1 (RSAPrivateKey, invalid version) -pk_parse_key_rsa:"3003020101":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Key ASN1 (RSAPrivateKey, correct version, incorrect tag) -pk_parse_key_rsa:"300402010000":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Key ASN1 (RSAPrivateKey, values present, length mismatch) -pk_parse_key_rsa:"301c02010002010102010102010102010102010102010102010102010100":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT - -Key ASN1 (RSAPrivateKey, values present, check_privkey fails) -pk_parse_key_rsa:"301b020100020101020101020101020101020101020101020101020101":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.function deleted file mode 100644 index 4f1a616061..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkparse.function +++ /dev/null @@ -1,141 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/pk.h" -#include "mbedtls/pem.h" -#include "mbedtls/oid.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_PK_PARSE_C:MBEDTLS_BIGNUM_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C:MBEDTLS_FS_IO */ -void pk_parse_keyfile_rsa( char *key_file, char *password, int result ) -{ - mbedtls_pk_context ctx; - int res; - char *pwd = password; - - mbedtls_pk_init( &ctx ); - - if( strcmp( pwd, "NULL" ) == 0 ) - pwd = NULL; - - res = mbedtls_pk_parse_keyfile( &ctx, key_file, pwd ); - - TEST_ASSERT( res == result ); - - if( res == 0 ) - { - mbedtls_rsa_context *rsa; - TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_RSA ) ); - rsa = mbedtls_pk_rsa( ctx ); - TEST_ASSERT( mbedtls_rsa_check_privkey( rsa ) == 0 ); - } - -exit: - mbedtls_pk_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C:MBEDTLS_FS_IO */ -void pk_parse_public_keyfile_rsa( char *key_file, int result ) -{ - mbedtls_pk_context ctx; - int res; - - mbedtls_pk_init( &ctx ); - - res = mbedtls_pk_parse_public_keyfile( &ctx, key_file ); - - TEST_ASSERT( res == result ); - - if( res == 0 ) - { - mbedtls_rsa_context *rsa; - TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_RSA ) ); - rsa = mbedtls_pk_rsa( ctx ); - TEST_ASSERT( mbedtls_rsa_check_pubkey( rsa ) == 0 ); - } - -exit: - mbedtls_pk_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_ECP_C */ -void pk_parse_public_keyfile_ec( char *key_file, int result ) -{ - mbedtls_pk_context ctx; - int res; - - mbedtls_pk_init( &ctx ); - - res = mbedtls_pk_parse_public_keyfile( &ctx, key_file ); - - TEST_ASSERT( res == result ); - - if( res == 0 ) - { - mbedtls_ecp_keypair *eckey; - TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_ECKEY ) ); - eckey = mbedtls_pk_ec( ctx ); - TEST_ASSERT( mbedtls_ecp_check_pubkey( &eckey->grp, &eckey->Q ) == 0 ); - } - -exit: - mbedtls_pk_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_ECP_C */ -void pk_parse_keyfile_ec( char *key_file, char *password, int result ) -{ - mbedtls_pk_context ctx; - int res; - - mbedtls_pk_init( &ctx ); - - res = mbedtls_pk_parse_keyfile( &ctx, key_file, password ); - - TEST_ASSERT( res == result ); - - if( res == 0 ) - { - mbedtls_ecp_keypair *eckey; - TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_ECKEY ) ); - eckey = mbedtls_pk_ec( ctx ); - TEST_ASSERT( mbedtls_ecp_check_privkey( &eckey->grp, &eckey->d ) == 0 ); - } - -exit: - mbedtls_pk_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_RSA_C */ -void pk_parse_key_rsa( char *key_data, char *result_str, int result ) -{ - mbedtls_pk_context pk; - unsigned char buf[2000]; - unsigned char output[2000]; - int data_len; - ((void) result_str); - - mbedtls_pk_init( &pk ); - - memset( buf, 0, 2000 ); - memset( output, 0, 2000 ); - - data_len = unhexify( buf, key_data ); - - TEST_ASSERT( mbedtls_pk_parse_key( &pk, buf, data_len, NULL, 0 ) == ( result ) ); - if( ( result ) == 0 ) - { - TEST_ASSERT( 1 ); - } - -exit: - mbedtls_pk_free( &pk ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.data deleted file mode 100644 index c8ff1773ca..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.data +++ /dev/null @@ -1,39 +0,0 @@ -Public key write check RSA -depends_on:MBEDTLS_RSA_C:MBEDTLS_BASE64_C -pk_write_pubkey_check:"data_files/server1.pubkey" - -Public key write check RSA 4096 -depends_on:MBEDTLS_RSA_C:MBEDTLS_BASE64_C -pk_write_pubkey_check:"data_files/rsa4096_pub.pem" - -Public key write check EC 192 bits -depends_on:MBEDTLS_ECP_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_write_pubkey_check:"data_files/ec_pub.pem" - -Public key write check EC 521 bits -depends_on:MBEDTLS_ECP_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_DP_SECP521R1_ENABLED -pk_write_pubkey_check:"data_files/ec_521_pub.pem" - -Public key write check EC Brainpool 512 bits -depends_on:MBEDTLS_ECP_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_DP_BP512R1_ENABLED -pk_write_pubkey_check:"data_files/ec_bp512_pub.pem" - -Private key write check RSA -depends_on:MBEDTLS_RSA_C:MBEDTLS_BASE64_C -pk_write_key_check:"data_files/server1.key" - -Private key write check RSA 4096 -depends_on:MBEDTLS_RSA_C:MBEDTLS_BASE64_C -pk_write_key_check:"data_files/rsa4096_prv.pem" - -Private key write check EC 192 bits -depends_on:MBEDTLS_ECP_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -pk_write_key_check:"data_files/ec_prv.sec1.pem" - -Private key write check EC 521 bits -depends_on:MBEDTLS_ECP_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_DP_SECP521R1_ENABLED -pk_write_key_check:"data_files/ec_521_prv.pem" - -Private key write check EC Brainpool 512 bits -depends_on:MBEDTLS_ECP_C:MBEDTLS_BASE64_C:MBEDTLS_ECP_DP_BP512R1_ENABLED -pk_write_key_check:"data_files/ec_bp512_prv.pem" diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.function deleted file mode 100644 index 8b20640f30..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_pkwrite.function +++ /dev/null @@ -1,74 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/pk.h" -#include "mbedtls/pem.h" -#include "mbedtls/oid.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_PK_WRITE_C:MBEDTLS_BIGNUM_C:MBEDTLS_FS_IO - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_PEM_WRITE_C */ -void pk_write_pubkey_check( char *key_file ) -{ - mbedtls_pk_context key; - unsigned char buf[5000]; - unsigned char check_buf[5000]; - int ret; - FILE *f; - size_t ilen; - - memset( buf, 0, sizeof( buf ) ); - memset( check_buf, 0, sizeof( check_buf ) ); - - mbedtls_pk_init( &key ); - TEST_ASSERT( mbedtls_pk_parse_public_keyfile( &key, key_file ) == 0 ); - - ret = mbedtls_pk_write_pubkey_pem( &key, buf, sizeof( buf )); - TEST_ASSERT( ret == 0 ); - - f = fopen( key_file, "r" ); - TEST_ASSERT( f != NULL ); - ilen = fread( check_buf, 1, sizeof( check_buf ), f ); - fclose( f ); - - TEST_ASSERT( ilen == strlen( (char *) buf ) ); - TEST_ASSERT( memcmp( (char *) buf, (char *) check_buf, ilen ) == 0 ); - -exit: - mbedtls_pk_free( &key ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_PEM_WRITE_C */ -void pk_write_key_check( char *key_file ) -{ - mbedtls_pk_context key; - unsigned char buf[5000]; - unsigned char check_buf[5000]; - int ret; - FILE *f; - size_t ilen; - - memset( buf, 0, sizeof( buf ) ); - memset( check_buf, 0, sizeof( check_buf ) ); - - mbedtls_pk_init( &key ); - TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 ); - - ret = mbedtls_pk_write_key_pem( &key, buf, sizeof( buf )); - TEST_ASSERT( ret == 0 ); - - f = fopen( key_file, "r" ); - TEST_ASSERT( f != NULL ); - ilen = fread( check_buf, 1, sizeof( check_buf ), f ); - fclose( f ); - - TEST_ASSERT( ilen == strlen( (char *) buf ) ); - TEST_ASSERT( memcmp( (char *) buf, (char *) check_buf, ilen ) == 0 ); - -exit: - mbedtls_pk_free( &key ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.data deleted file mode 100644 index c43d6ae514..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.data +++ /dev/null @@ -1,366 +0,0 @@ -RSA PKCS1 Verify v1.5 CAVS #1 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"d6248c3e96b1a7e5fea978870fcc4c9786b4e5156e16b7faef4557d667f730b8bc4c784ef00c624df5309513c3a5de8ca94c2152e0459618666d3148092562ebc256ffca45b27fd2d63c68bd5e0a0aefbe496e9e63838a361b1db6fc272464f191490bf9c029643c49d2d9cd08833b8a70b4b3431f56fb1eb55ccd39e77a9c92":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"3203b7647fb7e345aa457681e5131777f1adc371f2fba8534928c4e52ef6206a856425d6269352ecbf64db2f6ad82397768cafdd8cd272e512d617ad67992226da6bc291c31404c17fd4b7e2beb20eff284a44f4d7af47fd6629e2c95809fa7f2241a04f70ac70d3271bb13258af1ed5c5988c95df7fa26603515791075feccd":MBEDTLS_ERR_RSA_VERIFY_FAILED - -RSA PKCS1 Verify v1.5 CAVS #2 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"206ef4bf396c6087f8229ef196fd35f37ccb8de5efcdb238f20d556668f114257a11fbe038464a67830378e62ae9791453953dac1dbd7921837ba98e84e856eb80ed9487e656d0b20c28c8ba5e35db1abbed83ed1c7720a97701f709e3547a4bfcabca9c89c57ad15c3996577a0ae36d7c7b699035242f37954646c1cd5c08ac":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"5abc01f5de25b70867ff0c24e222c61f53c88daf42586fddcd56f3c4588f074be3c328056c063388688b6385a8167957c6e5355a510e005b8a851d69c96b36ec6036644078210e5d7d326f96365ee0648882921492bc7b753eb9c26cdbab37555f210df2ca6fec1b25b463d38b81c0dcea202022b04af5da58aa03d77be949b7":0 - -RSA PKCS1 Verify v1.5 CAVS #3 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"206ef4bf396c6087f8229ef196fd35f37ccb8de5efcdb238f20d556668f114257a11fbe038464a67830378e62ae9791453953dac1dbd7921837ba98e84e856eb80ed9487e656d0b20c28c8ba5e35db1abbed83ed1c7720a97701f709e3547a4bfcabca9c89c57ad15c3996577a0ae36d7c7b699035242f37954646c1cd5c08ac":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"5abc01f5de25b70867ff0c24e222c61f53c88daf42586fddcd56f3c4588f074be3c328056c063388688b6385a8167957c6e5355a510e005b8a851d69c96b36ec6036644078210e5d7d326f96365ee0648882921492bc7b753eb9c26cdbab37555f210df2ca6fec1b25b463d38b81c0dcea202022b04af5da58aa03d77be949b7":0 - -RSA PKCS1 Verify v1.5 CAVS #4 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"867ac26e11a13b7ac34a42a1e177648692861226effb55bb597fbde10f299bf7fffd6fc8ddb2a46a73b97b67387a461b23e1d65dc119366286979add615b926b9272832fc0c058b946fc752dcffceca12233f4c63f7897cbaa08aa7e07cf02b5e7e3e5ece252bf2fe61d163bce84c0e0368454a98e9fdebf6edbd70b290d549b":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"3bb7b1c5f3391de4549e2e96fd33afa4d647dd90e321d9d576f3808e32213e948b697ef4fd2dd12923de6ec3ffd625078a57f86af38dc07052bb50547c616ed51fa1352b3ab66788408168d21263ef2d3388d567d2ce8cf674f45491ab2b0319d47be1266bda39e343b2a38ea2d6aaaee6c4465aee1d7bb33e93a1c40a8e3ae4":0 - -RSA PKCS1 Verify v1.5 CAVS #5 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"cd810e97dc21095ea7a0238027a7bafd343e01444785ea9184a44a79f80438c41fc0b57aa95693407da38fe5ff0ec1398e03361e51a3dbe134b99cca2df0cef1c444ca54d2b7db2789455b6bb41918c24001fd82fc20ee089de3f34f053699c1c5f7954ce0aaabb9d26fce39d032894152229d98cf64ecafc7089530073c61d9":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"7b5fba70ec5b521638f182bcab39cec30b76e7bc017bdbd1059658a9a1db0969ab482dce32f3e9865952f0a0de0978272c951e3c015328ea3758f47029a379ab4200550fba58f11d51264878406fc717d5f7b72b3582946f16a7e5314a220881fc820f7d29949710273421533d8ac0a449dc6d0fd1a21c22444edd1c0d5b44d3":0 - -RSA PKCS1 Verify v1.5 CAVS #6 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"44637d3b8de525fd589237bc81229c8966d3af24540850c24036330db8007e6d19a19486018b2b02074da590aaba9d2c8848c0a2d1b6de4dfaf24025b6393df9228008f83f13cc76a67cfbed77a6e3429342824a0b6a9b8dd884094acc6a54bbc8c8829930c52fe39ce5e0dcd02d9553ef899d26eb6cae0940b63584e2daeb3b":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"38fc4f6f0430bb3ea9f470a4c0f5cebdabac4dbeb3b9c99d4168e7b00f5eb294ec0ece1908eded1f3e14f1e69d10f9feb425bda0c998af945ef864298a60a675f0bb5c540a7be3f534d5faddff974eea8bffe182a44e2ee1f4f653e71967a11869ee1a850edb03cb44a340378cb7a1bc9616d3649b78002b390a05a7e54edec6":0 - -RSA PKCS1 Verify v1.5 CAVS #7 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"d03f12276f6ba7545b8fce719471bd253791878809694e8754f3b389f26c9253a758ed28b4c62535a8d5702d7a778731d5759ff2b3b39b192db680e791632918b6093c0e8ca25c2bf756a07fde4144a37f769fe4054455a45cb8cefe4462e7a9a45ce71f2189b4fef01b47aee8585d44dc9d6fa627a3e5f08801871731f234cd":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"d93a878c1ce86571590b0e43794b3edb23552797c4b8c9e3da4fe1cc4ac0566acd3b10541fe9a7a79f5ea4892d3069ca6903efb5c40c47eb8a9c781eb4249281d40c3d96aae16da1bb4daaece6a26eca5f41c062b4124a64fc9d340cba5ab0d1f5affff6515a87f0933774fd4322d2fa497cd6f708a429ca56dcb1fd3db623d0":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #8 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"b2f2e6e09fd19b0a8c06447554d6a236c69e2b334017488881d8c02ab81d74cae0c64efd50a374998eeec162651975e637cb2ba594250c750a4943253f1db0613e4ce1d50f8e3e968a2a83bd6cb97455ab2ccc77071076b3e211ffb251bd4c1a738b88b2021c61c727c074ce933c054acbcbf4f0c362ec09af38de191686aebe":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"3":"a853e67f928281d11506c9d39e5ea9b2d742782c663c37d0a7c9e9fe15379cde1e75d94adbfb1ca08691f320af4ff2b0a29a4d2ea10a20cb95d85f3dabac3d56cca9039c851d0181408c00b385fc82cafa4cfa7380d0c2c024fb83fec59d5ee591d63806dcb18b21ea440c3d3f12c1e7795eb15b7ce4c4b288d646cf1d34bdf1":0 - -RSA PKCS1 Verify v1.5 CAVS #9 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"647586ba587b09aa555d1b8da4cdf5c6e777e08859379ca45789019f2041e708d97c4408d4d6943b11dd7ebe05c6b48a9b5f1b0079452cc484579acfa66a34c0cf3f0e7339b2dbd5f1339ef7937a8261547705a846885c43d8ef139a9c83f5604ea52b231176a821fb48c45ed45226f31ba7e8a94a69f6c65c39b7278bf3f08f":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"10001":"e27a90b644c3a11f234132d6727ada397774cd7fdf5eb0160a665ffccedabb8ae9e357966939a71c973e75e5ff771fb01a6483fcaf82f16dee65e6826121e2ae9c69d2c92387b33a641f397676776cde501e7314a9a4e76c0f4538edeea163e8de7bd21c93c298df748c6f5c26b7d03bfa3671f2a7488fe311309e8218a71171":0 - -RSA PKCS1 Verify v1.5 CAVS #10 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"55013a489e09b6553262aab59fb041b49437b86d52876f8e5d5e405b77ca0ff6ce8ea2dd75c7b3b411cf4445d56233c5b0ff0e58c49128d81b4fedd295e172d225c451e13defb34b87b7aea6d6f0d20f5c55feb71d2a789fa31f3d9ff47896adc16bec5ce0c9dda3fde190e08ca2451c01ff3091449887695f96dac97ad6a30e":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"10001":"dd82b7be791c454fbbf6f1de47cbe585a687e4e8bbae0b6e2a77f8ca4efd06d71498f9a74b931bd59c377e71daf708a624c51303f377006c676487bad57f7067b09b7bb94a6189119ab8cf7321c321b2dc7df565bfbec833a28b86625fb5fd6a035d4ed79ff0f9aee9fa78935eec65069439ee449d7f5249cdae6fdd6d8c2a63":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #11 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"f4a990b8d434a5914340c0ca3ca4e4a70856c55e13e938c1f854e91cdef54c6107d6d682a62e6c1ff12b1c6178ee0b26b5d8ae5ee4043db4151465727f313e9e174d7c6961abe9cb86a21367a89e41b47267ac5ef3a6eceaaca5b19ae756b3904b97ec35aeb404dc2a2d0da373ba709a678d2728e7d72daae68d335cbf6c957d":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"10001":"d8ef7bdc0f111b1249d5ad6515b6fe37f2ff327f493832f1385c10e975c07b0266497716fcb84f5039cd60f5a050614fde27f354a6c45e8a7d74f9821e2f301500ac1953feafeb9d98cf88d2c928413f337813135c66abfc3dc7a4d80655d925bf96f21872ca2b3a2684b976ca768fe37feae20a69eeec3cc8f1de0db34b3462":0 - -RSA PKCS1 Verify v1.5 CAVS #12 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"c81f04c79982971fa176d64e8f7f8812f86a94c49e84672ff10996a2d6dfc444a884c7a87c4606a1aab22558894ee59b798b457827f5ee0b0cadcd94371902cc4ddaf97acefed641997717bcb3cc74cd440f0a31e20fb95812cecb740c36d6d1bf07e3641514cfa678aff2a39562ff4d60e02b17583a92bf0c56d66bde9e09f8":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"10001":"52111f4798da3c11b3c74394358348ab0fc797bde99080f238d33a69b04b08ac2bd767b33872473943e23af27ca32fd568a43a8c7d6cc55b4fbb380212fdfcb60487e20694d4287e233efdf7b04737c0037a592d03077801828b051998c42b9f9e2420063331d5b2349918a64d8b65b21a2011ee7318fcef48aced95b8ddf501":0 - -RSA PKCS1 Verify v1.5 CAVS #13 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"a97824871770b79da979a111f6decfb1dd11bd946cfa800b008f0ad5aea5aa92e205d27a46c31d4fe6cb909091bd21f082fb75074000ee46c2f3e530d77b34c7c5d6f8453025950d3e0afae1f9752655f5bbea8432e9f1014357ff11b08076179a101e4f9d3f25bffb5e656bf6afe6c97d7aa4740b5d9224cde4dede035a7768":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"10001":"d5dcd27c74e040ea86f106b63d3275fa7b7e98d2dd701f38ec15fc7301b72df127f6d3bd5571253a0b9e0e719d7d522893896941a1aeccc697912282b5308d829b91905b5dd7b7e1b8fe27e2bd4003b09dfe7fe295f8a43c076c0cb52f2aac067e87de7ffe3a275d21a870c3dfc9b1d06d7f018667de9eb187bdf53d282e5d8b":0 - -RSA PKCS1 Verify v1.5 CAVS #14 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"4ce61930c79dc017c2dea0c5085d73a3b0e4a6f341e9a5061a6658af11e5edf95bdad915ac3619969e39bee15788a8de667f92f4efc84f35082d52d562aa74e12cc7f22d3425b58f5056d74afcf162cd44e65b9ee510ff91af094c3d2d42c3b088536d62a98f1c689edcf3ea3fc228d711c109d76ae83d82d6a34dcfbad563cf":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1024:16:"e28a13548525e5f36dccb24ecb7cc332cc689dfd64012604c9c7816d72a16c3f5fcdc0e86e7c03280b1c69b586ce0cd8aec722cc73a5d3b730310bf7dfebdc77ce5d94bbc369dc18a2f7b07bd505ab0f82224aef09fdc1e5063234255e0b3c40a52e9e8ae60898eb88a766bdd788fe9493d8fd86bcdd2884d5c06216c65469e5":16:"10001":"27280b92eab5cbf0d787ff6fa6b0151d6610adfd25116113f2f186f3f8d39736d91ae510ec2bd96f2de135aefda79178138696dcc6d302e4a79ddabbe16e39ab96075776afce863e84a2e6013cb457e4047e22d43f67bf64ae5e1d844a7c12ac696efbb3cda7c0e0aca71f8a7ada9a0547bfaefe1ba2e04058c672c803720dd9":0 - -RSA PKCS1 Verify v1.5 CAVS #15 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"224ecd3b630581da948216366c741015a9723c5ea43de67e28454d0a846f54a6df167a25cc500cf21f729aaefed6a71a3bdba438e12e20ad0c48396afe38568b70a3187f26098d6ac649a7c7ea68ed52748e7125225102216236a28f67753b077cfd8d9198b86b0b331027cb59b24b85fd92896e8f2ff5a1d11872c2e6af6ae2":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"3":"1f7938b20a9cd8bb8ca26bad9e79ea92373174203f3ab212a06de34a9a3e14e102d19a8878c28a2fc8083a97c06b19c1ae62678289d5d071a904aed1d364655d9e2d16480a6fd18f4c8edf204844a34d573b1b988b82d495caefd9298c1635083e196a11f4a7df6a7e3cc4db7b9642e7682d22ec7038c3bad791e1365fe8836976092460e6df749dc032baf1e026684f55936beb9369845c53c3d217941c1f8d8f54a32333a4c049c3f2d527125778032f5d390040d1d4cce83dc353ce250152":0 - -RSA PKCS1 Verify v1.5 CAVS #16 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"6ecc722d233dad1aca45e6bc3e1a0b99fb1f89c0ec63bc657e6aaacbf931f267106cff42b712819f341b1ede798964a0b1a5032c198b391111e88d0d7303c02e23fa0137e74e604579a285b2dbc0a23aebdda65c371eb403125bd366e822e72dceffe0d55dfa3155c16283020dc9abb0d150da1aef251484aa49e49e00974dac":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"3":"339dce3a1937669d9fb14c4f652378861fd5adc4da88eaf833b16020b55a24ddc83b7ae3395a9a49b426bb9a4170cb765b02652faa9594b457aeefdae4f802e93d8e65c687ddc723701465a5ef19249ed5d2617b5121c58557b34eb99a663bbcf4453a6e1db5d88723de449fcf58ca8ef514daf08cfdc71be155bb3d0724df0c0a6fd5aa7737433cc376640b9b8b4c7ddd09776bae0245729cddb56e36f28edad6aecaed0821ec8d843a96348e722bf0a84cf060a793a2179f054138f907d0c3":0 - -RSA PKCS1 Verify v1.5 CAVS #17 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"72f0b1ae27e1f5e5bfa15ded204c2c54b47b2420750a3eb5471f9ff98b67c8b5f1a30d3f8d6448562e12ce4deb33a26cfeeae993d6be9e20679d8713c5216870f11276e5f22b0ead2821a7b4dee106fc1e19b13fc9fba5d6e73e4bd93b65a9881a43d5e97ebfb0b357d5d06b21ddbecdbb10626d7748bb9e6e07d49316bbf3c4":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"3":"8117a6897e14c183737661cf5741350a84ae00495cd9ee8fb033582e559f79701ab424706660515ee5821a69a6850647ec641676a625d1a3899932aaa52161fbc0c0a825db82fde0585b3c9b9c16de43e26da6a30fe5a601dae68bded1e29ec34557b5f6962efb10b9450d6f096655f68e8499cfa16a0adeb9075e7b91851fef84243132d08273d35d01ad89c17e1e6e4deaf1cb233050b275fa9d2cae57e9e1a0e23139267040aa39b6abd8f10fa1cec38ce2183573ddc11626fc262e1a0ced":0 - -RSA PKCS1 Verify v1.5 CAVS #18 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"f80c94a2b53736978adf041886ad97ab2aeb9e91c08bd4eeef6b2f2b8dd75a99b4506657188bbd7597bd5759121630627c8bf9cc30d90dd488c7a81cabab5350a62fa30abf5523f305b98f2c2c1743ec980cf26ab8219bfd9505b981ab1abbfef733b384519d5259fc5c14577cb6b88fa7f6f332ff6a65b23faecc24342c78e9":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"3":"6b49553ed964ae196a41ea281f4d2a250ce7d1e7434e45cf6a82f7bed17554f39c3f0241e0364702fcb87475eb0c0839ffd2180890fa05b4bbf31bbfa4bf5119dea0c9f88e1e9617fcdadabc6fa1945136cc66e039b905d78ed365c5806d38aec88b3edfb86c05ff446dbfd51d7cd75cbf8d3b85154c783765386f51637532221f52429db5612dcc034968bb8feab7dc6f5ed1f2feb557f6dd49c980296117be2c4195ec7b6101ea767df9d16a56fc9709b49308a54dab63dbc4d609f959ce17":0 - -RSA PKCS1 Verify v1.5 CAVS #19 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"4eb97094bb42aaa58b040bd06a8f324396b9eca9e39359b7039c4a010434ee131a53aebd9f7a55ae58ea7444fa1505a3ec524e054fd408513cddc1ee4c2f7fd95ec4a6f594be1ba39fa1aa933dc0a5dafff5ce44509577ebb3a3e8084c44010aa27321e5a3f646ade99175633b795c0f570b360eeebeefaef15788f80b5cbecd":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"3":"2b8b794a8621d492eec18a4efd239e0e077c89340a34b0fdbf467f2bf3112c7f33d00ee736f2988af8569c1a74891efbefa839e295fffdf4d908c1ede61a861a4d24b154a09d1b3f923fd2bb7906994cf82a97da285bf48e61f90cc3596f9350ab9b66a216ffca323195bb213f5a77fe8c697475595a1857dbee58128cbf1be7cb220229ce52766fefd88cc129ad5cbbdcd31fb4eede6c4fdd3193a9aaaa54362bcea4082981d9b7c40483814828f3297d95ad933c76f31c47e37a93ffaf0d4a":0 - -RSA PKCS1 Verify v1.5 CAVS #20 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"a3edb0f52c6166d7b76e71634761f402337c3e9667549d00cd7877e6055396b35c54c4dffc4c987060178fc10b7e5e827a5c870057002ba6efd31fc4e63a429029be0d6b256b6b653775cb026322743f48e319d053c4aeac34077acb8e0c6c2ef375b2210f8788bd23d24eb0b614de41875b1c8ec56acf18825eaf826691be96":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"180630d2f4dc91ddb1159978e278cda7ac4b178e82477f9770c4d2e1c5017d2f222348658044c1be4cda24ce3c9ba3d423536a39bf60324c1b30eabdad700b0982e58072f7e18216e7e4c07e17674ec3eabcfbafce317d2f539f129902d80031ca201a8b325629a96ca4a70b51294c2fddd1d0aca1537d7d8b780e1e62d34be2f98104d876a4990396c8628e6498d9651f468bdf1139664eabe9166efbe909bf87d7305d5f60f1acc3599ed339fcf4e009fbad4059af1a50264cb0a4ec1d23f3":0 - -RSA PKCS1 Verify v1.5 CAVS #21 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"ac58fd024208d7f045d81a56cd55aad40ab86b0d216ab55136c7027aca23ea13480a52c0dacce0d98139b25965aa4ff76a41dd92037195d24bc0750d52cb3467b48b7b3e71d852c5f82bd9ee85a8388ead5cd8bc38c3d4792e8daa9734a137d31963e245ad3217fad235f7dfd5584de0fe91c4526568588e08b60bdf1badd99f":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"a142b0d9456f8f4772675265a08613a66c416bd1ae712975c69d9ca5fb8c1be9c24359a04fd15460bf6136a8a11f13e3ce2de2171524f10cb715f0d71e3db15281ab99eadbe86cf8c5c518162c638ef27a4f7bfb4a1a3873f3c384a5b1c3b4966c837b9d8d192ac34e03943b7ae191355aa1ff3b9cd041bb2668f1f81cf0d015b3d3608cd9ac79398212c0f132f1bd45d47768b999fcf3c05fe2069593ceecedc851a7fc465abcfef0fabba9b9460153f6ba8723a5c6e766c83a446aef3ee327":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #22 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"027f767928a5821e2723d6f36c43e6b498b6f0b381852571794a096bd49f1c36a4d7bacec7ec402c24b970163169173bb930ec7fdc39bc9457dfc4ca051f5f28a64de1bbe007c22e8368ff9b117dbda17efd2fb73434bbbf5a4158df56813b8c904bb2e779de504dcd974a291568210d6f85810291606a1c0cd88d51ceadf98a":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"0676e64daaa18f4af46e9dfbe234db389b8a527b0fe1db97eb7f404e3155226cba70d318800f83160fa1aa19916e5c09f079331079f18cb8ab1a4b884cb28501824974f683ed2b9babae9f8c15bea30802805c6b2152119764811bbf5f3994d2e97fa2fe8c5ab15a23c14d7ae56be00eaa8bc26678481ff5ba59b0acfb0e43341bff9fc638e5625480a73dbc5d8d13bd2b9e64037c6b79df0c60869980c6a22ec46f80fb859cb4ee5d2032ac1fe538cfd85c70a7f33b4af50a93395917c2cfb6":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #23 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"06dcd9d4c056b6a45b9ed2ae5f6c1cfa43aae06fe01ee098264aa7a80e901abbcf9a505e55f9a352ef0c078d48249b8298e57ea21bf0e423c3bf69002acfa541ca05007c704bc79cee7a80e1107c7b28d2b2aa6dd093b28efe9642519952a4a95ee49235f9924a0ac0aee5b2a1bce47459d70cd6e75074614199dca44561407c":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"5e08f399258e6de075b67a0a6a822ceb21b1eb7a0342eca6a4295739f644547dee3456243cf32bd6ea6f357c88632508457130f3dae04f7806efaed43d1d501e16c961dfbd6c71a42b480e95c7027f8275063d05a9aac3eef0520867b9896ebe8ec358f7d121beb4e61ddfdc3dcd835dfe265f2ba68d300ef566ed1284f9f3d7b1af363ed47bfa2e5f0492925444df7e5fcb1e79e690c746117650b543a5e82c39553552f0f44e617b5cf773c533050f4129e893ac22af69b1eb9afb4b5ba5f5":0 - -RSA PKCS1 Verify v1.5 CAVS #24 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"1240028c6d7ab3992ada0e5ca55ee4f3d62f8de575302d5861d73685423c2e6a6d6fb3be090fbc2a701821b6d8fd5e8233f794b6549cd0bb52b390ac31478307bffa91a9bd9c1bf93ffc846356fef008ebee4bb3ee148e0fb1893d188e4934d0d088a433d14a596c5f2e3e49648a22edc6bdbcc58dc1edbd440046b3a169ca2b":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"a003ae9cf0704d58763b214f20446ecc4099c566f25384e28d0dd6540c58705fc8d0bfe1ceaa06096ed1e230146edb82056e39e6727abec09f25e44079b6ce1ca2c6a540dec7aa34444d7d435f41e5fca9b0bba62759ae2780638e5160e031bb60409c2e85674ac7a776b444b37b9d7f4dbaa557e88b8562a584f2dbe90729b241aede95dfcc7e05b10deef06255cb89f0e7ccff23354818756a1f8bb9f00fd18f6cd22ca1b4bfc38027562bb37562c77c7883b5d735170d75521195fd3f2bd3":0 - -RSA PKCS1 Verify v1.5 CAVS #25 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"67922a8b9cbc95cf7c555ff2d73cfc62ee04c3f0df9bfc8f64293a58bd3bebd2eb212d711f94e35c729d0873d6b244914d21bd0e59b23089b38740e43f480e8f407d090ac93b08a57403968b55e78cfe31eee6e4ecbacf834168fe89b6b8454fce6e675e80f82b33e850ae3f3d24fd320335e37981fd000576941b4f08d4ba99":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"2c6b301852cc55a993a933e2c080eb9dabfe19e9dc3571066caeabed1492d3501cd838de1c01784932df7a5ad5bbfb48c78f53a45f76e9812d046f23bd968495ef7e981e5add4acfc538fe33a5205de74bb37d3d9b6b87b2d174e85a73f216fd67d5738fc469dff7ea6b852e8dd08bc8df036597372d4d51185e6f47a45fbe1b9bdb06a4018783425ec95294de41f27235ad3b3263a890b8b62b17410a9bb08673393ff205a866ee2057e99c6517c6bbc84f8d87717b83d6f64de7ee215e1e8d":0 - -RSA PKCS1 Verify v1.5 CAVS #26 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"1428b4a449698a994ef84c46a517c3aa6359c48e4264ef65f1f69d77ae26133e17edfc103de416fffb4f2bfe865b434544a418f6e2faca00a165d443f0663ff64080154614f7194057d8b5f1f33934cc9fc2314cf86d4fdad4892bf0d3058f7f37ebe98ef52bfb240b9ad369153afe081bbcf9d7ae43e8ba336b8ac57e8a6da0":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"8e10a1ae470e6e57a8d234185f78fdb600cc636c41565a9f3694a84ae102f6251984f54d11a7785fdcfdfaf80a821e05d57ef6b8edc03d9076755779322fd53eb98c805da77dc9316744e393c2fecd291a7e6043b1ca89fd8248f661e1d53110211b91edb41b31e848cde1115d8afd9963ebcc36aff5a27085949f0781bc69167c140ecfe71c44aacaf4123e557eaf2b528c6d0ea875b4ceefa942fe338af8df10562c438af04cd7521da912b3e3899cef0d75722161be6abed5e4e9009dbf40":0 - -RSA PKCS1 Verify v1.5 CAVS #27 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"4871adc05f6b3ecf296680b0dd8d86715b0d5264c064008037dc410512520b5f193c8f4d21eb6c42e10d220c0275c9b3751f03a4096e2f0e3db9df8d52068c06a51589d23ca1361e9fe27691e95663301ec1407fbf73aee99cc92362eaf6994b95038396d815052a0aef6489bbb7bcb0fffdf13f0af9e7d9fd14f6ce00ab98f7":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA1:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"11":"180caf03781b391aacebe5b3f5e1d3b01c68a00df4ecfb6c4bf14217aed7cfca0adac099ec1d6e1f0b43b09b86788533fee6691d773807af0df6cc3bbdde3cf34bf5b848fa59c8bc10227cc3eba3452a85e0520fccdb2d8d32dd99672d302756a2d7f7f2693db3a48be17bd34d9d891f4ba44449c5bad1de91b788f524500a7703cccbaa77b9fe8791f5c8aa7b8f055336f28fcfc01733712e33cfb3d33fe71ddb9ced2a31931ec38007f5ad4a0d19acc428124b0e5ee6e0746fb33c1a4d90c8":0 - -RSA PKCS1 Verify v1.5 CAVS #28 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"3bba64de38438a71b95ab9c94539d5870c1fb08d7a9937600c00e9d063438edc97e625d0cd4b1eb00c31c9d94c7a0fe6d03160d1b6cbec5acdad16ada6ef253fee603df9faca8f98a477cc5456f3dfbf6414dbf19f3832e227ce291780188881e82e96a2e84744f12a34a9808a2daedc6fd00b345c6772bec26a095719451e6a":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"11":"8c846e75e32ce5f9964bdd8f6dcf1d2996a646b233bcf1bd6394e13e856691b89bedd18290a0f9f7c90dca307271b3108e795340490513b25e6789e93722c65ec064b4c43457295a31d1f07dd605e133fd6eaafc58cda132df2939f5f693e0205af34550afaa137f3e482885e50dfb48333a15c0821e7a19642acdddc6fea3c7487c691246a2b083dac439889d5ae741b7e08c47937530b4b069f1a260cd07fe4a0ddd530ab11534fb805e9b562118ee0e97932966008aadfc83f3b8a10de8ee":0 - -RSA PKCS1 Verify v1.5 CAVS #29 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"f7857ce04bf4292ea1755f9e587822372f4dcdf10bddfc0ff498a8af60ae94a0b482e873085c1cd52a5d181ce6b99a1f8520d74b947d65f3e7e358e8ddc4ac4ae465e39d408eee1f09865159733f83f553cd93cfde1c114fb3e32cf51cd418359016b3867df467b645d752808671a4609f3c49a67023c9ca617e6cffa544a10a":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"11":"9677300bbee003be3c445634f8ed5beb152b63f46f84cf5a8e721e0fafe8f3f7e99a6d50741f23f449d3026da3e8a7ac36be99ab44831803486ae552f7aa01f075287829b231d2d0840908e09081ae177ed888fe46a9d937a0871eb5d52ec541c8411c4cbf7efea6ca213b12cea513b0739eedca7c9473e10a7796936f4eaa0c5d3a9013ca5536781ac68eb2ca5779144de23da2e9875114aca885b3219dfc292d73940c5992ea3c4882889e7543430652860e441a01a45d9f4005a012421493":0 - -RSA PKCS1 Verify v1.5 CAVS #30 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"ca312774f2756ac2019f213a01a63c9a0b4a49ccafecf25e97a4c632668e3c77e664f4d7635241f25205e50c37061b02c546db8346fa597c3da8cfd44a827c5a4ff4ecfcd1797b39a1b215d9bbb93fdb6eb35bafbda427a5068888a6e19f86224b0897490491207e35ce39085668b10b4fb851b7dd9465c03869790ef38a61b5":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"3":"a202c33eb831b9d8e818b6c3bcdb42818e1d9c22a06ddd73a17a21e49d18cda44df349a066477cae068e1a5d2b518b0885e889ef796ca9e6f42a69ac755b8a6405fbaef93fe0130d98de35d689addfee3eecd26658903f774bda481c3f40ee0e9569a3c3e2da7ad576c7de82159d933e36fa29cfef99367005e34ab5082d80f48276d37dabc88dbb023bd01585329d2ccf417f78ec508aaa29751007d31f1669296b981d44c8fa99130c5df7a071725b496859314aaf9baf0ebc780355914249":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #31 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"2abe079077290ceb6c80ac5c61062ce8da814b1fb99a1a9fb2860ed900e6541856ec64bf19c0d9d1cc2280b7cc50af3e3d2ad8e044945d44761ca60891dd72bd6aa26a33274ffcf7ae7d661b5e651135fcff21aaf06b4a2db18fe5827e0243884f2841760b9f1c65fbda870f7f0cfbd6ff484f0825e688614928f2d12d1e7080":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"10001":"402631f3cddfb02cc4d9cb58ef1ab6726bd787a50e12e98567c9702bfdf47af85904aec5a2f6c5df9a10f08f90f93728eb090ae2ac21ded9f38faecd8195f3eb3d4107521b1cee956e7a214245b038adae912fa35ec97cb3bdc41352e8aaff80173561284cb740f999a3cd6653a6c3d5a3f911a416f41e2155083982c99eb5998a0a74d77f1ae999d901ee24a7f2c424179a3f92b07dc0b3498c1884e60677bee0175e810b426c4ad008d2743cd19b00b33177bf8be3fed7f7406e1bce0c2ea3":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #32 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"da9505809dc92cfd8e01a1857dde52df6677c40d98f4577c1659ca7d3e9f01f9a809065f51b54fe2f9723fe2c9d1eea7397f2d5531d1c51c6ea100b028596bf9f24dd90be14eab58f07b4f24a35b073aeb29ecde4a6f320237d7adbdc43d94f87e08866b95bbcac83dc7db3553a42400441f088e2bf6259539a2da8b5a74065f":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"11":"57edd0560df9840a25c28ff6d254e432395a5cd2d92248b3b44d7eab0fc65b3c4e545a916a8e90ce89745119db9ec9799aa8890f5250fb589cfc12dac1b6e406a39bc3b3663892da5354ba453cbd5e4c89bdce82d0ffe97052a03a5c3308819c1139ebc780c13cf6dc1477faf734abcb1db3fafaed6f22885c9c0222ff5deacb8cc6d027f2e959c3075011b382e88c4b27b83b4f2e6fda022e331c3602d19f5ac7bccfe95ea1e93d736dbd918ae5b1f468cd0b5b536a2f918d5e27a0757e75b7":0 - -RSA PKCS1 Verify v1.5 CAVS #33 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"d0cd038c65b3acca45822eaf91ea5176e82043268876dec0b62e2abd619023b7023abc67c6b823cfef5447b8772f985ff7910d6cc87e6c23688ac6de1fee40bbe2da1a92770de92adaa427ace02fee571a0a0176fceb0c8f3eb72dde839ab201395625f5c0db8641ce19d7711212dec61733262c6ce4476c025e67a3d5bc01f3":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"11":"2f30629c1117d013bb36e6099dee931dcaf0a1032b07ec23e2b262898a8945e569c9573d81e22bb0a5f8a28b0d7b8ff01367dd7f089c68ed1daa11cf53a96ee91b38e6b839b6e90bea34d14b78f5d2c7629b68c5b4f2ecfff66b483b2233cb14f95df533c867a2b610aebcdbb7ea3109aaf2f5762ab3edc2571deccc7da0c9a5b443ca2b924c0f18de7bbb736a08fed3916795018a436a3ae62c85d554a53a6d48623908e06e7d275f4251d3b3bd530bd11e155dcf2b5c2adf030cdf931ae749":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Verify v1.5 CAVS #34 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1536:16:"a59d9b7269b102b7be684ec5e28db79992e6d3231e77c90b78960c2638b35ef6dbdac1ac59e7249d96d426e7f99397eabc6b8903fe1942da580322b98bafacd81bb911c29666f83886a2a2864f3552044300e60cedd5a8c321c43e280413dc41673c39a11b98a885486f8187a70f270185c4c12bc48a1968305269776c070ef69d4913589a887c4d0f5e7dd58bd806d0d49a14a1762c38665cef4646ff13a0cd29c3a60460703c3d051d5b28c660bffb5f8bd43d495ffa64175f72b8abe5fddd":16:"11":"0b4d96f411c727a262d6d0ade34195b78603551061917d060f89add47b09dfe8715f4f9147d327dc25e91fe457e5d1a2f22cd8fe6fe8e29d2060658307c87a40640650fef3d4b289a6c3febc5a100b29a8b56623afb29fd3c13ea372bf3c638c1db25f8bd8c74c821beec7b5affcace1d05d056a6c2d3035926c7a268df4751a54bc20a6b8cfd729a7cba309ae817daccbef9950a482cf23950a8ca1d3a13ddb7d8d0f87ad5587d4d9ebe19fe93457597a7bdd056c2fd4cea7d31e4a0e595a7b":0 - -RSA PKCS1 Sign #1 (SHA512, 1536 bits RSA) -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1536:16:"c8c67df894c882045ede26a9008ab09ea0672077d7bc71d412511cd93981ddde8f91b967da404056c39f105f7f239abdaff92923859920f6299e82b95bd5b8c959948f4a035cbd693ad83014294d349813d1ad57911a6355d0731fe3a034e9db":16:"f15147d0e7c04a1e3f37adde802cdc610999bf7ab0088434aaeda0c0ab3910b14d2ce56cb66bffd97552195fae8b061077e03920814d8b9cfb5a3958b3a82c2a7fc97e55db5978b47a922156eb8a3e55c06a54a45d1670abdfb995489c4d0051":16:"bd429bb7c3b00bbea19ba664c0f8172d1a73c3cfa05e2ed656d570c1590918bb7e372ed25e2cd71395ba0a9b1a30f3ee012ffb0546cab8e3581fe3e23f44ab57a8aee9717e71a936a580fa8572d450fb00339a6f6704b717df0c149a465bab768c61500cd93b61113ff3e4389167f7b2c8e3c0da2d4765286bee555b0bcb4998f59b14fad03180a17c8b4f69bcd1234f4ae85950137665ac2ba80b55cc9b1aafb454b83771aa755acd2a00e93ddb65e696dbed8bdca69fb5e0c5c2097b9cfe4b":16:"3":"93b6fa99485c116ca6efdd4202ea1cf49f4c6345fae692584413743ce5b65510e8e4690aee9a19ea1ff10d57f22aa3548d839f28a8525a34354e9e58e0f3947e056ce2554e21bf287e220b98db3b551258cd42b495e5d1a3bbc83c9d1a02f2a300ef6d866ea75108e44ebb3e16b47df2f6de28feb2be3874dbbf21599451082d86e9f2f462575a8185c69aa1f1fcb6a363c5d71aeba2103449eaf3845285291148d5f78d1646b8dc95cbcc4082f987d948b0e7d4e80b60595f8a7517584e1643":0 - -RSA PKCS1 Sign #1 Verify -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA512:1536:16:"bd429bb7c3b00bbea19ba664c0f8172d1a73c3cfa05e2ed656d570c1590918bb7e372ed25e2cd71395ba0a9b1a30f3ee012ffb0546cab8e3581fe3e23f44ab57a8aee9717e71a936a580fa8572d450fb00339a6f6704b717df0c149a465bab768c61500cd93b61113ff3e4389167f7b2c8e3c0da2d4765286bee555b0bcb4998f59b14fad03180a17c8b4f69bcd1234f4ae85950137665ac2ba80b55cc9b1aafb454b83771aa755acd2a00e93ddb65e696dbed8bdca69fb5e0c5c2097b9cfe4b":16:"3":"93b6fa99485c116ca6efdd4202ea1cf49f4c6345fae692584413743ce5b65510e8e4690aee9a19ea1ff10d57f22aa3548d839f28a8525a34354e9e58e0f3947e056ce2554e21bf287e220b98db3b551258cd42b495e5d1a3bbc83c9d1a02f2a300ef6d866ea75108e44ebb3e16b47df2f6de28feb2be3874dbbf21599451082d86e9f2f462575a8185c69aa1f1fcb6a363c5d71aeba2103449eaf3845285291148d5f78d1646b8dc95cbcc4082f987d948b0e7d4e80b60595f8a7517584e1643":0 - -RSA PKCS1 Sign #2 (SHA256, 2048 bits RSA) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"5aee2b9dbc02a6a2d87ff64a64165dc0b9ce70c79bab2d287939e2601c3223e0493988d5468731ae4edc7d5f5d449335c204fdb0e192c1915c9d694d3a61c3be14df79c4b34d6ac73707829024d263c94f9107fa93f3783de3965522336e18d1e01a142b5103451bb97839eaf2f44703a63050a36b78aef4072ea1a8daaaf1a2918fc03ee957a9c09efdc7287bcb4d6aec4723290294b249b3e3dc63157b560ad9c867323a73ebeb360cc9e482111643b0d86c4e33dcf170155590f0eba7d170789e84de336b7fe2f6cf485ddca94607a4ff379fc49d375c730249dd1a210e7dccd762d1c23c7532e769c6aa88e38e8654ff90f7b34df4c07ba90e89099ec1ed":0 - -RSA PKCS1 Sign #2 Verify -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"5aee2b9dbc02a6a2d87ff64a64165dc0b9ce70c79bab2d287939e2601c3223e0493988d5468731ae4edc7d5f5d449335c204fdb0e192c1915c9d694d3a61c3be14df79c4b34d6ac73707829024d263c94f9107fa93f3783de3965522336e18d1e01a142b5103451bb97839eaf2f44703a63050a36b78aef4072ea1a8daaaf1a2918fc03ee957a9c09efdc7287bcb4d6aec4723290294b249b3e3dc63157b560ad9c867323a73ebeb360cc9e482111643b0d86c4e33dcf170155590f0eba7d170789e84de336b7fe2f6cf485ddca94607a4ff379fc49d375c730249dd1a210e7dccd762d1c23c7532e769c6aa88e38e8654ff90f7b34df4c07ba90e89099ec1ed":0 - -RSA PKCS1 Sign #2 Verify (Fail) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA256:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"5aee2b9dbc02a6a2d87ff64a64165dc0b9ce70c79bab2d287939e2601c3223e0493988d5468731ae4edc7d5f5d449335c204fdb0e192c1915c9d694d3a61c3be14df79c4b34d6ac73707829024d263c94f9107fa93f3783de3965522336e18d1e01a142b5103451bb97839eaf2f44703a63050a36b78aef4072ea1a8daaaf1a2918fc03ee957a9c09efdc6287bcb4d6aec4723290294b249b3e3dc63157b560ad9c867323a73ebeb360cc9e482111643b0d86c4e33dcf170155590f0eba7d170789e84de336b7fe2f6cf485ddca94607a4ff379fc49d375c730249dd1a210e7dccd763d1c23c7532e769c6aa88e38e8654ff90f7b34df4c07ba90e89099ec1ed":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Sign #3 (SHA224, 2048 bits RSA) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"9d768b8b31421f9d9ced890aafaf8b3468656419049ed268f6e1992066f45dc3e4cd349e8c5ed5a06e4ef5badaba064ba94907dfedf3d708becaf44ae9b27c3866d329311ba93e8ddc7fc284fba05d1bb84fb1e060a5b76b7fa515cfcd2c8144474623672703cac1e15ff4fdf8ef19d365c51ba86e60f4cbbcd07f956060625751bfbecc47945646459cadaddd900603a8149a93b31a6d432e1da1a67eb765f5b2f0bd1adb9af12d731c7b02931b42dbbfd8c7cecde76b817e96f664147a2c5091c6ce4dc562c5f57159d6f9dc9ba2daa212db56677839621bd4805dde62955fb2d0cc2c448109d10ecc6206ea81f0a02e1646471358f3ec146cd3c75f2d390b":0 - -RSA PKCS1 Sign #3 Verify -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA224:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"9d768b8b31421f9d9ced890aafaf8b3468656419049ed268f6e1992066f45dc3e4cd349e8c5ed5a06e4ef5badaba064ba94907dfedf3d708becaf44ae9b27c3866d329311ba93e8ddc7fc284fba05d1bb84fb1e060a5b76b7fa515cfcd2c8144474623672703cac1e15ff4fdf8ef19d365c51ba86e60f4cbbcd07f956060625751bfbecc47945646459cadaddd900603a8149a93b31a6d432e1da1a67eb765f5b2f0bd1adb9af12d731c7b02931b42dbbfd8c7cecde76b817e96f664147a2c5091c6ce4dc562c5f57159d6f9dc9ba2daa212db56677839621bd4805dde62955fb2d0cc2c448109d10ecc6206ea81f0a02e1646471358f3ec146cd3c75f2d390b":0 - -RSA PKCS1 Sign #4 (SHA384, 2048 bits RSA) -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"40dcc96822e5612eb33f1dca247a35109ba3845c7a3d556a60e656624bf1c103d94686ca7379e9e329ccd1b19b52bfd48b608df9f59a96a82d3feb0101096dbcb80e46da543b4c982ac6bb1717f24f9fe3f76b7154492b47525be1ddcaf4631d33481531be8f3e685837b40bdf4a02827d79f6a32374147174680f51c8e0d8eed9d5c445a563a7bce9ef4236e7cfdc12b2223ef457c3e8ccc6dd65cc23e977a1f03f5ef584feb9af00efc71a701f9d413b0290af17692cb821a1e863d5778e174b1130659f30583f434f09cb1212471a41dd65c102de64a194b6ae3e43cd75928049db78042c58e980aff3ea2774e42845bcf217410a118cf5deeaa64224dbc8":0 - -RSA PKCS1 Sign #4 Verify -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_SHA384:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"40dcc96822e5612eb33f1dca247a35109ba3845c7a3d556a60e656624bf1c103d94686ca7379e9e329ccd1b19b52bfd48b608df9f59a96a82d3feb0101096dbcb80e46da543b4c982ac6bb1717f24f9fe3f76b7154492b47525be1ddcaf4631d33481531be8f3e685837b40bdf4a02827d79f6a32374147174680f51c8e0d8eed9d5c445a563a7bce9ef4236e7cfdc12b2223ef457c3e8ccc6dd65cc23e977a1f03f5ef584feb9af00efc71a701f9d413b0290af17692cb821a1e863d5778e174b1130659f30583f434f09cb1212471a41dd65c102de64a194b6ae3e43cd75928049db78042c58e980aff3ea2774e42845bcf217410a118cf5deeaa64224dbc8":0 - -RSA PKCS1 Sign #5 (MD2, 2048 bits RSA) -depends_on:MBEDTLS_MD2_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_MD2:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"6cbb0e4019d64dd5cd2d48fa43446e5cba1a7edbb79d91b199be75c7d3e7ae0820c44d3a120cd2910f73cbb315e15963a60ea7da3452015d9d6beb5ac998fddbd1fa3e5908abc9151f3ffb70365aaee6fb0cd440d3f5591868fc136fae38ac7bcdb3bde3c6a0362dd8b814f7edadd4a51b2edf2227a40d1e34c29f608add7746731425858eb93661c633b7a90942fca3cd594ab4ec170052d44105643518020782e76235def34d014135bad8daed590200482325c3416c3d66417e80d9f9c6322a54683638247b577445ecd0be2765ce96c4ee45213204026dfba24d5ee89e1ea75538ba39f7149a5ac0fc12d7c53cbc12481d4a8e2d410ec633d800ad4b4304":0 - -RSA PKCS1 Sign #5 Verify -depends_on:MBEDTLS_MD2_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_MD2:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"6cbb0e4019d64dd5cd2d48fa43446e5cba1a7edbb79d91b199be75c7d3e7ae0820c44d3a120cd2910f73cbb315e15963a60ea7da3452015d9d6beb5ac998fddbd1fa3e5908abc9151f3ffb70365aaee6fb0cd440d3f5591868fc136fae38ac7bcdb3bde3c6a0362dd8b814f7edadd4a51b2edf2227a40d1e34c29f608add7746731425858eb93661c633b7a90942fca3cd594ab4ec170052d44105643518020782e76235def34d014135bad8daed590200482325c3416c3d66417e80d9f9c6322a54683638247b577445ecd0be2765ce96c4ee45213204026dfba24d5ee89e1ea75538ba39f7149a5ac0fc12d7c53cbc12481d4a8e2d410ec633d800ad4b4304":0 - -RSA PKCS1 Sign #6 (MD4, 2048 bits RSA) -depends_on:MBEDTLS_MD4_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_MD4:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"b0e60dc4dfaf0f636a3a4414eae2d7bce7c3ce505a46e38f3f654d8769b31b7891ba18f89672fce204bbac6e3764355e65447c087994731cd44f086710e79e8c3ebc6e2cb61edc5d3e05848ab733d95efe2d0252a691e810c17fa57fd2dd296374c9ba17fea704685677f45d668a386c8ca433fbbb56d3bbfb43a489ed9518b1c9ab13ce497a1cec91467453bfe533145a31a095c2de541255141768ccc6fdff3fc790b5050f1122c93c3044a9346947e1b23e8125bf7edbf38c64a4286dfc1b829e983db3117959a2559a8ef97687ab673e231be213d88edc632637b58cdb2d69c51fbf6bf894cff319216718b1e696f75cd4366f53dc2e28b2a00017984207":0 - -RSA PKCS1 Sign #6 Verify -depends_on:MBEDTLS_MD4_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_MD4:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"b0e60dc4dfaf0f636a3a4414eae2d7bce7c3ce505a46e38f3f654d8769b31b7891ba18f89672fce204bbac6e3764355e65447c087994731cd44f086710e79e8c3ebc6e2cb61edc5d3e05848ab733d95efe2d0252a691e810c17fa57fd2dd296374c9ba17fea704685677f45d668a386c8ca433fbbb56d3bbfb43a489ed9518b1c9ab13ce497a1cec91467453bfe533145a31a095c2de541255141768ccc6fdff3fc790b5050f1122c93c3044a9346947e1b23e8125bf7edbf38c64a4286dfc1b829e983db3117959a2559a8ef97687ab673e231be213d88edc632637b58cdb2d69c51fbf6bf894cff319216718b1e696f75cd4366f53dc2e28b2a00017984207":0 - -RSA PKCS1 Sign #7 (MD5, 2048 bits RSA) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_MD5:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"3bcf673c3b27f6e2ece4bb97c7a37161e6c6ee7419ef366efc3cfee0f15f415ff6d9d4390937386c6fec1771acba73f24ec6b0469ea8b88083f0b4e1b6069d7bf286e67cf94182a548663137e82a6e09c35de2c27779da0503f1f5bedfebadf2a875f17763a0564df4a6d945a5a3e46bc90fb692af3a55106aafc6b577587456ff8d49cfd5c299d7a2b776dbe4c1ae777b0f64aa3bab27689af32d6cc76157c7dc6900a3469e18a7d9b6bfe4951d1105a08864575e4f4ec05b3e053f9b7a2d5653ae085e50a63380d6bdd6f58ab378d7e0a2be708c559849891317089ab04c82d8bc589ea088b90b11dea5cf85856ff7e609cc1adb1d403beead4c126ff29021":0 - -RSA PKCS1 Sign #7 Verify -depends_on:MBEDTLS_MD5_C:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:MBEDTLS_MD_MD5:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"3bcf673c3b27f6e2ece4bb97c7a37161e6c6ee7419ef366efc3cfee0f15f415ff6d9d4390937386c6fec1771acba73f24ec6b0469ea8b88083f0b4e1b6069d7bf286e67cf94182a548663137e82a6e09c35de2c27779da0503f1f5bedfebadf2a875f17763a0564df4a6d945a5a3e46bc90fb692af3a55106aafc6b577587456ff8d49cfd5c299d7a2b776dbe4c1ae777b0f64aa3bab27689af32d6cc76157c7dc6900a3469e18a7d9b6bfe4951d1105a08864575e4f4ec05b3e053f9b7a2d5653ae085e50a63380d6bdd6f58ab378d7e0a2be708c559849891317089ab04c82d8bc589ea088b90b11dea5cf85856ff7e609cc1adb1d403beead4c126ff29021":0 - -RSA PKCS1 Sign #8 (RAW, 2048 bits RSA) -depends_on:MBEDTLS_PKCS1_V15 -rsa_pkcs1_sign_raw:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":"1234567890deadbeef":MBEDTLS_RSA_PKCS_V15:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"605baf947c0de49e4f6a0dfb94a43ae318d5df8ed20ba4ba5a37a73fb009c5c9e5cce8b70a25b1c7580f389f0d7092485cdfa02208b70d33482edf07a7eafebdc54862ca0e0396a5a7d09991b9753eb1ffb6091971bb5789c6b121abbcd0a3cbaa39969fa7c28146fce96c6d03272e3793e5be8f5abfa9afcbebb986d7b3050604a2af4d3a40fa6c003781a539a60259d1e84f13322da9e538a49c369b83e7286bf7d30b64bbb773506705da5d5d5483a563a1ffacc902fb75c9a751b1e83cdc7a6db0470056883f48b5a5446b43b1d180ea12ba11a6a8d93b3b32a30156b6084b7fb142998a2a0d28014b84098ece7d9d5e4d55cc342ca26f5a0167a679dec8" - -RSA PKCS1 Sign #8 Verify -depends_on:MBEDTLS_PKCS1_V15 -rsa_pkcs1_verify_raw:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":"1234567890deadbeef":MBEDTLS_RSA_PKCS_V15:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"605baf947c0de49e4f6a0dfb94a43ae318d5df8ed20ba4ba5a37a73fb009c5c9e5cce8b70a25b1c7580f389f0d7092485cdfa02208b70d33482edf07a7eafebdc54862ca0e0396a5a7d09991b9753eb1ffb6091971bb5789c6b121abbcd0a3cbaa39969fa7c28146fce96c6d03272e3793e5be8f5abfa9afcbebb986d7b3050604a2af4d3a40fa6c003781a539a60259d1e84f13322da9e538a49c369b83e7286bf7d30b64bbb773506705da5d5d5483a563a1ffacc902fb75c9a751b1e83cdc7a6db0470056883f48b5a5446b43b1d180ea12ba11a6a8d93b3b32a30156b6084b7fb142998a2a0d28014b84098ece7d9d5e4d55cc342ca26f5a0167a679dec8":0 - -RSA PKCS1 Sign #8 Verify (Wrong raw hash) -depends_on:MBEDTLS_PKCS1_V15 -rsa_pkcs1_verify_raw:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":"1234567890deadcafe":MBEDTLS_RSA_PKCS_V15:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"605baf947c0de49e4f6a0dfb94a43ae318d5df8ed20ba4ba5a37a73fb009c5c9e5cce8b70a25b1c7580f389f0d7092485cdfa02208b70d33482edf07a7eafebdc54862ca0e0396a5a7d09991b9753eb1ffb6091971bb5789c6b121abbcd0a3cbaa39969fa7c28146fce96c6d03272e3793e5be8f5abfa9afcbebb986d7b3050604a2af4d3a40fa6c003781a539a60259d1e84f13322da9e538a49c369b83e7286bf7d30b64bbb773506705da5d5d5483a563a1ffacc902fb75c9a751b1e83cdc7a6db0470056883f48b5a5446b43b1d180ea12ba11a6a8d93b3b32a30156b6084b7fb142998a2a0d28014b84098ece7d9d5e4d55cc342ca26f5a0167a679dec8":MBEDTLS_ERR_RSA_VERIFY_FAILED - -RSA PKCS1 Sign #9 (Invalid Digest type) -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:255:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"3bcf673c3b27f6e2ece4bb97c7a37161e6c6ee7419ef366efc3cfee0f15f415ff6d9d4390937386c6fec1771acba73f24ec6b0469ea8b88083f0b4e1b6069d7bf286e67cf94182a548663137e82a6e09c35de2c27779da0503f1f5bedfebadf2a875f17763a0564df4a6d945a5a3e46bc90fb692af3a55106aafc6b577587456ff8d49cfd5c299d7a2b776dbe4c1ae777b0f64aa3bab27689af32d6cc76157c7dc6900a3469e18a7d9b6bfe4951d1105a08864575e4f4ec05b3e053f9b7a2d5653ae085e50a63380d6bdd6f58ab378d7e0a2be708c559849891317089ab04c82d8bc589ea088b90b11dea5cf85856ff7e609cc1adb1d403beead4c126ff29021":MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSA PKCS1 Sign #9 Verify (Invalid Digest type) -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":MBEDTLS_RSA_PKCS_V15:255:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"3bcf673c3b27f6e2ece4bb97c7a37161e6c6ee7419ef366efc3cfee0f15f415ff6d9d4390937386c6fec1771acba73f24ec6b0469ea8b88083f0b4e1b6069d7bf286e67cf94182a548663137e82a6e09c35de2c27779da0503f1f5bedfebadf2a875f17763a0564df4a6d945a5a3e46bc90fb692af3a55106aafc6b577587456ff8d49cfd5c299d7a2b776dbe4c1ae777b0f64aa3bab27689af32d6cc76157c7dc6900a3469e18a7d9b6bfe4951d1105a08864575e4f4ec05b3e053f9b7a2d5653ae085e50a63380d6bdd6f58ab378d7e0a2be708c559849891317089ab04c82d8bc589ea088b90b11dea5cf85856ff7e609cc1adb1d403beead4c126ff29021":MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSA PKCS1 Sign #8 (Invalid padding type) -mbedtls_rsa_pkcs1_sign:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":2:MBEDTLS_MD_MD5:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"3bcf673c3b27f6e2ece4bb97c7a37161e6c6ee7419ef366efc3cfee0f15f415ff6d9d4390937386c6fec1771acba73f24ec6b0469ea8b88083f0b4e1b6069d7bf286e67cf94182a548663137e82a6e09c35de2c27779da0503f1f5bedfebadf2a875f17763a0564df4a6d945a5a3e46bc90fb692af3a55106aafc6b577587456ff8d49cfd5c299d7a2b776dbe4c1ae777b0f64aa3bab27689af32d6cc76157c7dc6900a3469e18a7d9b6bfe4951d1105a08864575e4f4ec05b3e053f9b7a2d5653ae085e50a63380d6bdd6f58ab378d7e0a2be708c559849891317089ab04c82d8bc589ea088b90b11dea5cf85856ff7e609cc1adb1d403beead4c126ff29021":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Sign #8 Verify (Invalid padding type) -mbedtls_rsa_pkcs1_verify:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":1:MBEDTLS_MD_MD5:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"3bcf673c3b27f6e2ece4bb97c7a37161e6c6ee7419ef366efc3cfee0f15f415ff6d9d4390937386c6fec1771acba73f24ec6b0469ea8b88083f0b4e1b6069d7bf286e67cf94182a548663137e82a6e09c35de2c27779da0503f1f5bedfebadf2a875f17763a0564df4a6d945a5a3e46bc90fb692af3a55106aafc6b577587456ff8d49cfd5c299d7a2b776dbe4c1ae777b0f64aa3bab27689af32d6cc76157c7dc6900a3469e18a7d9b6bfe4951d1105a08864575e4f4ec05b3e053f9b7a2d5653ae085e50a63380d6bdd6f58ab378d7e0a2be708c559849891317089ab04c82d8bc589ea088b90b11dea5cf85856ff7e609cc1adb1d403beead4c126ff29021":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Encrypt #1 -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_encrypt:"4E636AF98E40F3ADCFCCB698F4E80B9F":MBEDTLS_RSA_PKCS_V15:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"b0c0b193ba4a5b4502bfacd1a9c2697da5510f3e3ab7274cf404418afd2c62c89b98d83bbc21c8c1bf1afe6d8bf40425e053e9c03e03a3be0edbe1eda073fade1cc286cc0305a493d98fe795634c3cad7feb513edb742d66d910c87d07f6b0055c3488bb262b5fd1ce8747af64801fb39d2d3a3e57086ffe55ab8d0a2ca86975629a0f85767a4990c532a7c2dab1647997ebb234d0b28a0008bfebfc905e7ba5b30b60566a5e0190417465efdbf549934b8f0c5c9f36b7c5b6373a47ae553ced0608a161b1b70dfa509375cf7a3598223a6d7b7a1d1a06ac74d345a9bb7c0e44c8388858a4f1d8115f2bd769ffa69020385fa286302c80e950f9e2751308666c":0 - -RSA PKCS1 Decrypt #1 (Verify) -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_decrypt:"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":MBEDTLS_RSA_PKCS_V15:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":1000:"4E636AF98E40F3ADCFCCB698F4E80B9F":0 - -RSA PKCS1 Encrypt #2 (Data too large) -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_encrypt:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":MBEDTLS_RSA_PKCS_V15:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSA PKCS1 Decrypt #2 (Data too small) -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_decrypt:"deadbeafcafedeadbeeffedcba9876":MBEDTLS_RSA_PKCS_V15:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":1000:"4E636AF98E40F3ADCFCCB698F4E80B9F":MBEDTLS_ERR_RSA_PRIVATE_FAILED + MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -RSA PKCS1 Encrypt #3 (Invalid padding mode) -mbedtls_rsa_pkcs1_encrypt:"4E636AF98E40F3ADCFCCB698F4E80B9F":2:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Decrypt #3 (Invalid padding mode) -mbedtls_rsa_pkcs1_decrypt:"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":2:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":1000:"4E636AF98E40F3ADCFCCB698F4E80B9F":MBEDTLS_ERR_RSA_INVALID_PADDING - -RSA PKCS1 Decrypt #4 (Output buffer too small) -depends_on:MBEDTLS_PKCS1_V15 -mbedtls_rsa_pkcs1_decrypt:"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":MBEDTLS_RSA_PKCS_V15:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":15:"4E636AF98E40F3ADCFCCB698F4E80B9F":MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE - -RSA Check empty private key -rsa_check_privkey_null: - -RSA Check Private key #1 (Correct) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":0 - -RSA Check Private key #2 (No P) -mbedtls_rsa_check_privkey:2048:16:"":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #3 (No Q) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #4 (No N) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #5 (No E) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #6 (No D) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #7 (No DP) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #8 (No DQ) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #9 (No QP) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Private key #10 (Incorrect) -mbedtls_rsa_check_privkey:2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCC":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public key #1 (Correct) -mbedtls_rsa_check_pubkey:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":0 - -RSA Check Public key #2 (Even N) -mbedtls_rsa_check_pubkey:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a20340":16:"3":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public key #3 (Even E) -mbedtls_rsa_check_pubkey:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a20340":16:"65536":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public key #4 (N exactly 128 bits) -mbedtls_rsa_check_pubkey:16:"fedcba9876543210deadbeefcafe4321":16:"3":0 - -RSA Check Public key #5 (N smaller than 128 bits) -mbedtls_rsa_check_pubkey:16:"7edcba9876543210deadbeefcafe4321":16:"3":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public key #6 (N exactly 8192 bits) -mbedtls_rsa_check_pubkey:16:"88F48075BF29E95C1C6AE8716678B74E957B69CC2E49708C160C6343AAD2F076D25397ACE74220311ED18AEEB681F463611B3340C3945CAAEAD3ACC616E08A25A55683A32979BD55EA5DAB7630AF393886896F11DDC5F07E15EDF949324CF0F0B2A5C0E85DFA23167193182D1A43079DC8645F6C2C029629F475575802F7D326DE5BD891A9C5F84A433D45154181EC05685A4B368A5B6434775A00ABC6B0A04647D4598CEEE566B552230F691C98CA30B402A76C686A94B373CCD2F60EFA3878A867BB5F585D088E27C507937262D098A477B9218BE7C03B2E4C102D244CA701645F1827CD947E5E796446378B848862E689F0D1773F752056841A1F0EECE7CAB74921A42DBF2EF264ADCF4ABE05A1242E5F629A657A2D67958A2DAC9A2245074A37099B45064723ABE21241058252632C2BA6FE85AB1C75FF310891B84C9C40AB646FE1D90BC716FB3A4B56DA3EA25CA397C04B994F7C6AD1DD0CB9E994CA6B835F7830F4F4E0F976BBEA5AE8556BC7C90B3E50E21C19AD1F6BC4A8FF15F2909D9CC5F3DA533BADFF50F487869D631C3E34D69636B4C25A55127EF5B715F2FC0565734B38DF996D1970E56F7F64EBECB9D00A587AAEC608F2D3AAA51E66BF53E92C3096BF78D1DCBCE1A645FA4F0542E6F68E5A94AAA6E839F75620FABED5D2BCF40AB8EAF95F838BFA962429F281578882DF0F2721C27C8905C9E776B1D3251FC066A8BC64C0CE7FBA2B8E21F65EF6739AB6F19EC2AB07817DFF03DAB7C846AB5CC86C103642D7664A85DC2D846A8004CD6A144C72CCCAC86DB5901A047324927B80E281F5F7315FA2F9083BDE0DB7AA46DC055E36BB73FB6DBD3A14759D06CBBE8D57CBC213C4D55DE4478679E0A5902C8655BE1391C0E88D2B1FBD57E9232A2CEBC67569ECD94E4BF0FCC6C003F9AA51A2A5E6EE084A46DAE65E52400A727F9713D29E92CD6CA37FD599598B3F677624A2A484A8B36B98EFEAD662C0A23BC1D9280EF2A31F887065EB20A93B41F7A264ECFA65B3555F3E400927018186EAA2D4F00C6B7AB1BCED5F893D64478177592C7F2B945307AB474D7EC7FF2E7E55834CC763BEF81DA9BD70FB3D423AE5ADB86B336734C8A3BEC90CEB05438B5BA030D0D30DEC1442D2EB08450480FBAE090FFA1A5ADD748A415BDCDE45094E792420F0AF94BCA0A80A2096D1A478D3428A214A7E68C0F07F58C6FB232ECC3D8B821AE29AE76E13EB751193F6ECA670016D54F3D796937DDBB8900062EF116CCA3F5B3AECA618272875336C9C050FBC0FC7EDD5B88D85DA0061D21E176E1419CF573629BE7B0496E761EAD45FE32B59EB00D47CDD178AC8F8EC8D6F26DED34F7576CD938422E18E936F16A704B483A48EE3BEA59D95F688136119894930EC8E9282E5974740CF031DF8DBB07EB08F2DA0ACCADECE15A6A57502890F4A03740E60BD":16:"010001":0 - -RSA Check Public key #7 (N larger than 8192 bits) -mbedtls_rsa_check_pubkey:16:"01631CD83F3F2D67FA52E13B44416EA65043A322ECD65467558EACD4C6B6D92DA7471D2DBD58E6921F9465C4900E92DFC6EB35C90637285A7E1F3D27C1C32FD6A5CB324D8253C6B2E480B63F66E3B09F4300C3E683011C7803BDEAD682F0F55473FC8A187734573A11ECDCE802022F539BC2074E94703C23E48FF8AE35702352E70AF921B42E6A143A3EFEE20DF77A97AA703AA271CE96EB78062452D87A4ADCACF83FFB9683818BF2ED234D0ECFB1B935827708050C4D007215D7A028152798045AF6A0B741A7B22F3FCCEBC26D285B9AA22CEF858858702BAE7D945FA0C45E2D8AADFF2FD0A64DF02C241F871C799AD73738E626D9A6D4BFFBCE000C4087F0CE74EF21526402FDCD07649175122697FD01041B84AD0A3FEDABD5C25E953686B2272F8C8B748A486F54CB767A1C79CA499B2C9A300AC8A214A0BFA06280A9235D5B7AFB8A76FFDD78FC72038C5B809569A6125D6A588684A16D222EF93F2469EA78948037957DE9B449AB722044FDFF3B6AC89367D72F0CF3ED1F85EDFD0DE3EEEDD39F6EFD68A0368F83B389B7A7B9C7713F4148F53E82CDF6D9CC002A3A16F1E6A1D78C48CE7849584164661664153A499ACAE5927728B2F1A2E911648676DF316DFCBF5E44F393B7B296A4A21ED59744E3855FCD4A21F2B42CFE5C52860B244D467103107E3DC40A82077269897528CCBF80B2F216A535C52A6A2643E64B53276A1B63348038706328FE369AE2409568160481C07A3ED5B0198EC6CC07F8F250B1DE0D97110F834AA3D1C0862FB719393EA08D530225CE0647FD5488F483FA065196D1160FAFA54CD3FF63B6ADDBE84D09F3CFF98F22CC71DE2FC19735126C3BBA9A2C293D1DB118F0512C144C1C616492BE0D19BFD245955840F640EBE6FCFF2830C683852046F36C3CDA4F4460ABA4B2FEEB700C9DD80418C42673858CDD11E70682D5A41ED7D8010EC7DD5B57B4E206F84DB8A430B246002FEA49AFF45940B1F18AE28863F5AA41D3B42ABCD3D1BAB7644B86E060865997E1BA23A768F233D8A859332F8B9D5D1633F9C462328C17E2B07D6DFD813C94D675873592E5CBB001C112A790B10B9F9E07BE105C4FD328C7E3887C3EF13E8ECE6106B73A3341AF200D8663BDF96FFDB6F794FBB04D976B87423A868882F15CAE8DC9F6CAF4917EFC844E74BAD48F21E34530CB4E20006444706FC95658735553CA99E18F0E820D78DEF8FB84034B10CE44B1AE36B50147558415E5E78A77E2FC7C8C580B54CCC40EE3904C04950846A6D51BF5C80E0B6E2ADC4989DA1D3DD01F99AA369C2E6B53394BA0CB5E6E811BFA004A5B3B3C34C60433AB5EB0EC8050246B9AF10B49EAA51487CCE0C4C8F4CDAF926D582D7E4924C33765E00AC952A38669150EA322CDF886B46DE4D0970A060B670D50C9BF3D2020B529838E192EF92BFE2F06FDF1D5":16:"010001":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public key #8 (E exactly 2 bits) -mbedtls_rsa_check_pubkey:16:"fedcba9876543210deadbeefcafe4321":16:"3":0 - -RSA Check Public key #8 (E exactly 1 bits) -mbedtls_rsa_check_pubkey:16:"fedcba9876543210deadbeefcafe4321":16:"1":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public key #8 (E exactly 64 bits) -mbedtls_rsa_check_pubkey:16:"fedcba9876543210deadbeefcafe4321":16:"00fedcba9876543213":0 - -RSA Check Public key #8 (E larger than 64 bits) -mbedtls_rsa_check_pubkey:16:"fedcba9876543210deadbeefcafe4321":16:"01fedcba9876543213":0 - -RSA Check Public key #9 (E has size N-2) -mbedtls_rsa_check_pubkey:16:"00b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034fb38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"00b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034fb38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034d":0 - -RSA Check Public key #10 (E has size N) -mbedtls_rsa_check_pubkey:16:"00b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034fb38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"00b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034fb38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public-Private key #1 (Correct) -rsa_check_pubpriv:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":0 - -RSA Check Public-Private key #2 (Public no N) -rsa_check_pubpriv:2048:16:"":16:"3":16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public-Private key #3 (Private no N) -rsa_check_pubpriv:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public-Private key #4 (N mismatch) -rsa_check_pubpriv:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034e":16:"3":16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Check Public-Private key #5 (E mismatch) -rsa_check_pubpriv:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"17":16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":16:"77B1D99300D6A54E864962DA09AE10CF19A7FB888456BC2672B72AEA52B204914493D16C184AD201EC3F762E1FBD8702BA796EF953D9EA2F26300D285264F11B0C8301D0207FEB1E2C984445C899B0ACEBAA74EF014DD1D4BDDB43202C08D2FF9692D8D788478DEC829EB52AFB5AE068FBDBAC499A27FACECC391E75C936D55F07BB45EE184DAB45808E15722502F279F89B38C1CB292557E5063597F52C75D61001EDC33F4739353E33E56AD273B067C1A2760208529EA421774A5FFFCB3423B1E0051E7702A55D80CBF2141569F18F87BFF538A1DA8EDBB2693A539F68E0D62D77743F89EACF3B1723BDB25CE2F333FA63CACF0E67DF1A431893BB9B352FCB":16:"9A66CF76572A71A17475794FA1C8C70D987E581E990D772BB27C77C53FF1ECBB31260E9EDAFAEBC79991807E48918EAB8C3A5F03A600F30C69511546AE788EDF53168E2D035D300EDCD5E4BF3AA2A6D603EA0A7BD11E1C1089657306DF8A64E7F1BC6B266B825C1A6C5F0FC85775F4CF7ACD63367E42EAFE46511D58AD6DFE0F":16:"844DBDD20925D9164F9A1E2F707076C261CCA8337D0241392B38AE3C12342F3AC14F8FD6DF4A1C36839662BD0D227344CD55A32AE5DBD2309A9A2B8A2C82BE6DDDDCE81D1B694775D9047AA765CA0C6E1BB8E61C8B7BE27ED711E8EE2FEAD87F3491F76A6D2262C14189EACDFD4CEFE0BF9D0A5B49857E0ED22CBEB98DC8D45B":16:"4951A7B174DF972C37BADCC38457B5EDD1F078BC613E75CE25E08814E12461C7A1C189A70EB8138294298D141244C7A9DE31AB4F6D38B40B04D6353CD30F77ADBF66BBDE41C7BE463C5E30AAA3F7BAD6CEE99506DEAAFA2F335C1B1C5C88B8ABB0D0387EE0D1B4E7027F7F085A025CEDB5CCE18B88C0462F1C3C910D47C0D4AB":MBEDTLS_ERR_RSA_KEY_CHECK_FAILED - -RSA Private (Correct) -mbedtls_rsa_private:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"48ce62658d82be10737bd5d3579aed15bc82617e6758ba862eeb12d049d7bacaf2f62fce8bf6e980763d1951f7f0eae3a493df9890d249314b39d00d6ef791de0daebf2c50f46e54aeb63a89113defe85de6dbe77642aae9f2eceb420f3a47a56355396e728917f17876bb829fabcaeef8bf7ef6de2ff9e84e6108ea2e52bbb62b7b288efa0a3835175b8b08fac56f7396eceb1c692d419ecb79d80aef5bc08a75d89de9f2b2d411d881c0e3ffad24c311a19029d210d3d3534f1b626f982ea322b4d1cfba476860ef20d4f672f38c371084b5301b429b747ea051a619e4430e0dac33c12f9ee41ca4d81a4f6da3e495aa8524574bdc60d290dd1f7a62e90a67":0 - -RSA Private (Data larger than N) -mbedtls_rsa_private:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":2048:16:"e79a373182bfaa722eb035f772ad2a9464bd842de59432c18bbab3a7dfeae318c9b915ee487861ab665a40bd6cda560152578e8579016c929df99fea05b4d64efca1d543850bc8164b40d71ed7f3fa4105df0fb9b9ad2a18ce182c8a4f4f975bea9aa0b9a1438a27a28e97ac8330ef37383414d1bd64607d6979ac050424fd17":16:"c6749cbb0db8c5a177672d4728a8b22392b2fc4d3b8361d5c0d5055a1b4e46d821f757c24eef2a51c561941b93b3ace7340074c058c9bb48e7e7414f42c41da4cccb5c2ba91deb30c586b7fb18af12a52995592ad139d3be429add6547e044becedaf31fa3b39421e24ee034fbf367d11f6b8f88ee483d163b431e1654ad3e89":16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"605baf947c0de49e4f6a0dfb94a43ae318d5df8ed20ba4ba5a37a73fb009c5c9e5cce8b70a25b1c7580f389f0d7092485cdfa02208b70d33482edf07a7eafebdc54862ca0e0396a5a7d09991b9753eb1ffb6091971bb5789c6b121abbcd0a3cbaa39969fa7c28146fce96c6d03272e3793e5be8f5abfa9afcbebb986d7b3050604a2af4d3a40fa6c003781a539a60259d1e84f13322da9e538a49c369b83e7286bf7d30b64bbb773506705da5d5d5483a563a1ffacc902fb75c9a751b1e83cdc7a6db0470056883f48b5a5446b43b1d180ea12ba11a6a8d93b3b32a30156b6084b7fb142998a2a0d28014b84098ece7d9d5e4d55cc342ca26f5a0167a679dec8":MBEDTLS_ERR_RSA_PRIVATE_FAILED + MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -RSA Public (Correct) -mbedtls_rsa_public:"59779fd2a39e56640c4fc1e67b60aeffcecd78aed7ad2bdfa464e93d04198d48466b8da7445f25bfa19db2844edd5c8f539cf772cc132b483169d390db28a43bc4ee0f038f6568ffc87447746cb72fefac2d6d90ee3143a915ac4688028805905a68eb8f8a96674b093c495eddd8704461eaa2b345efbb2ad6930acd8023f870":2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"1f5e927c13ff231090b0f18c8c3526428ed0f4a7561457ee5afe4d22d5d9220c34ef5b9a34d0c07f7248a1f3d57f95d10f7936b3063e40660b3a7ca3e73608b013f85a6e778ac7c60d576e9d9c0c5a79ad84ceea74e4722eb3553bdb0c2d7783dac050520cb27ca73478b509873cb0dcbd1d51dd8fccb96c29ad314f36d67cc57835d92d94defa0399feb095fd41b9f0b2be10f6041079ed4290040449f8a79aba50b0a1f8cf83c9fb8772b0686ec1b29cb1814bb06f9c024857db54d395a8da9a2c6f9f53b94bec612a0cb306a3eaa9fc80992e85d9d232e37a50cabe48c9343f039601ff7d95d60025e582aec475d031888310e8ec3833b394a5cf0599101e":0 - -RSA Public (Data larger than N) -mbedtls_rsa_public:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"605baf947c0de49e4f6a0dfb94a43ae318d5df8ed20ba4ba5a37a73fb009c5c9e5cce8b70a25b1c7580f389f0d7092485cdfa02208b70d33482edf07a7eafebdc54862ca0e0396a5a7d09991b9753eb1ffb6091971bb5789c6b121abbcd0a3cbaa39969fa7c28146fce96c6d03272e3793e5be8f5abfa9afcbebb986d7b3050604a2af4d3a40fa6c003781a539a60259d1e84f13322da9e538a49c369b83e7286bf7d30b64bbb773506705da5d5d5483a563a1ffacc902fb75c9a751b1e83cdc7a6db0470056883f48b5a5446b43b1d180ea12ba11a6a8d93b3b32a30156b6084b7fb142998a2a0d28014b84098ece7d9d5e4d55cc342ca26f5a0167a679dec8":MBEDTLS_ERR_RSA_PUBLIC_FAILED + MBEDTLS_ERR_MPI_BAD_INPUT_DATA - -RSA Generate Key -mbedtls_rsa_gen_key:128:3:0 - -RSA Generate Key (Number of bits too small) -mbedtls_rsa_gen_key:127:3:MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSA Generate Key (Exponent too small) -mbedtls_rsa_gen_key:128:2:MBEDTLS_ERR_RSA_BAD_INPUT_DATA - -RSA Generate Key -mbedtls_rsa_gen_key:1024:3:0 - -RSA PKCS1 Encrypt Bad RNG -depends_on:MBEDTLS_PKCS1_V15 -rsa_pkcs1_encrypt_bad_rng:"4E636AF98E40F3ADCFCCB698F4E80B9F":MBEDTLS_RSA_PKCS_V15:2048:16:"b38ac65c8141f7f5c96e14470e851936a67bf94cc6821a39ac12c05f7c0b06d9e6ddba2224703b02e25f31452f9c4a8417b62675fdc6df46b94813bc7b9769a892c482b830bfe0ad42e46668ace68903617faf6681f4babf1cc8e4b0420d3c7f61dc45434c6b54e2c3ee0fc07908509d79c9826e673bf8363255adb0add2401039a7bcd1b4ecf0fbe6ec8369d2da486eec59559dd1d54c9b24190965eafbdab203b35255765261cd0909acf93c3b8b8428cbb448de4715d1b813d0c94829c229543d391ce0adab5351f97a3810c1f73d7b1458b97daed4209c50e16d064d2d5bfda8c23893d755222793146d0a78c3d64f35549141486c3b0961a7b4c1a2034f":16:"3":"a42eda41e56235e666e7faaa77100197f657288a1bf183e4820f0c37ce2c456b960278d6003e0bbcd4be4a969f8e8fd9231e1f492414f00ed09844994c86ec32db7cde3bec7f0c3dbf6ae55baeb2712fa609f5fc3207a824eb3dace31849cd6a6084318523912bccb84cf42e3c6d6d1685131d69bb545acec827d2b0dfdd5568b7dcc4f5a11d6916583fefa689d367f8c9e1d95dcd2240895a9470b0c1730f97cd6e8546860bd254801769f54be96e16362ddcbf34d56035028890199e0f48db38642cb66a4181e028a6443a404fea284ce02b4614b683367d40874e505611d23142d49f06feea831d52d347b13610b413c4efc43a6de9f0b08d2a951dc503b6":MBEDTLS_ERR_RSA_RNG_FAILED - -RSA Selftest -depends_on:MBEDTLS_SELF_TEST -rsa_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.function deleted file mode 100644 index 59cbb5c97f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_rsa.function +++ /dev/null @@ -1,695 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/rsa.h" -#include "mbedtls/md2.h" -#include "mbedtls/md4.h" -#include "mbedtls/md5.h" -#include "mbedtls/sha1.h" -#include "mbedtls/sha256.h" -#include "mbedtls/sha512.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_RSA_C:MBEDTLS_BIGNUM_C:MBEDTLS_GENPRIME - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void mbedtls_rsa_pkcs1_sign( char *message_hex_string, int padding_mode, int digest, - int mod, int radix_P, char *input_P, int radix_Q, - char *input_Q, int radix_N, char *input_N, int radix_E, - char *input_E, char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx; - mbedtls_mpi P1, Q1, H, G; - int msg_len; - rnd_pseudo_info rnd_info; - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DQ, &ctx.D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - - if( mbedtls_md_info_from_type( digest ) != NULL ) - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_sign( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, digest, 0, hash_result, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_pkcs1_verify( char *message_hex_string, int padding_mode, int digest, - int mod, int radix_N, char *input_N, int radix_E, - char *input_E, char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - mbedtls_rsa_context ctx; - int msg_len; - - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - unhexify( result_str, result_hex_str ); - - if( mbedtls_md_info_from_type( digest ) != NULL ) - TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_verify( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, digest, 0, hash_result, result_str ) == result ); - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - - -/* BEGIN_CASE */ -void rsa_pkcs1_sign_raw( char *message_hex_string, char *hash_result_string, - int padding_mode, int mod, int radix_P, char *input_P, - int radix_Q, char *input_Q, int radix_N, - char *input_N, int radix_E, char *input_E, - char *result_hex_str ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx; - mbedtls_mpi P1, Q1, H, G; - int hash_len; - rnd_pseudo_info rnd_info; - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DQ, &ctx.D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - - unhexify( message_str, message_hex_string ); - hash_len = unhexify( hash_result, hash_result_string ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_sign( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_NONE, hash_len, hash_result, output ) == 0 ); - - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - - /* For PKCS#1 v1.5, there is an alternative way to generate signatures */ - if( padding_mode == MBEDTLS_RSA_PKCS_V15 ) - { - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - - TEST_ASSERT( mbedtls_rsa_rsaes_pkcs1_v15_encrypt( &ctx, - &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, - hash_len, hash_result, output ) == 0 ); - - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void rsa_pkcs1_verify_raw( char *message_hex_string, char *hash_result_string, - int padding_mode, int mod, int radix_N, - char *input_N, int radix_E, char *input_E, - char *result_hex_str, int correct ) -{ - unsigned char message_str[1000]; - unsigned char hash_result[1000]; - unsigned char result_str[1000]; - unsigned char output[1000]; - mbedtls_rsa_context ctx; - size_t hash_len, olen; - - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - memset( message_str, 0x00, 1000 ); - memset( hash_result, 0x00, 1000 ); - memset( result_str, 0x00, 1000 ); - memset( output, 0x00, sizeof( output ) ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - unhexify( message_str, message_hex_string ); - hash_len = unhexify( hash_result, hash_result_string ); - unhexify( result_str, result_hex_str ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_verify( &ctx, NULL, NULL, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_NONE, hash_len, hash_result, result_str ) == correct ); - - /* For PKCS#1 v1.5, there is an alternative way to verify signatures */ - if( padding_mode == MBEDTLS_RSA_PKCS_V15 ) - { - int ok; - - TEST_ASSERT( mbedtls_rsa_rsaes_pkcs1_v15_decrypt( &ctx, - NULL, NULL, MBEDTLS_RSA_PUBLIC, - &olen, result_str, output, sizeof( output ) ) == 0 ); - - ok = olen == hash_len && memcmp( output, hash_result, olen ) == 0; - if( correct == 0 ) - TEST_ASSERT( ok == 1 ); - else - TEST_ASSERT( ok == 0 ); - } - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_pkcs1_encrypt( char *message_hex_string, int padding_mode, int mod, - int radix_N, char *input_N, int radix_E, char *input_E, - char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx; - size_t msg_len; - rnd_pseudo_info rnd_info; - - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - memset( message_str, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void rsa_pkcs1_encrypt_bad_rng( char *message_hex_string, int padding_mode, - int mod, int radix_N, char *input_N, - int radix_E, char *input_E, - char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx; - size_t msg_len; - - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - memset( message_str, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - msg_len = unhexify( message_str, message_hex_string ); - - TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_zero_rand, NULL, MBEDTLS_RSA_PUBLIC, msg_len, message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_pkcs1_decrypt( char *message_hex_string, int padding_mode, int mod, - int radix_P, char *input_P, int radix_Q, char *input_Q, - int radix_N, char *input_N, int radix_E, char *input_E, - int max_output, char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx; - mbedtls_mpi P1, Q1, H, G; - size_t output_len; - rnd_pseudo_info rnd_info; - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - mbedtls_rsa_init( &ctx, padding_mode, 0 ); - - memset( message_str, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DQ, &ctx.D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - - unhexify( message_str, message_hex_string ); - output_len = 0; - - TEST_ASSERT( mbedtls_rsa_pkcs1_decrypt( &ctx, rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PRIVATE, &output_len, message_str, output, max_output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strncasecmp( (char *) output_str, result_hex_str, strlen( result_hex_str ) ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_public( char *message_hex_string, int mod, int radix_N, char *input_N, - int radix_E, char *input_E, char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx, ctx2; /* Also test mbedtls_rsa_copy() while at it */ - - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V15, 0 ); - mbedtls_rsa_init( &ctx2, MBEDTLS_RSA_PKCS_V15, 0 ); - memset( message_str, 0x00, 1000 ); - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); - - unhexify( message_str, message_hex_string ); - - TEST_ASSERT( mbedtls_rsa_public( &ctx, message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - - /* And now with the copy */ - TEST_ASSERT( mbedtls_rsa_copy( &ctx2, &ctx ) == 0 ); - /* clear the original to be sure */ - mbedtls_rsa_free( &ctx ); - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx2 ) == 0 ); - - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - TEST_ASSERT( mbedtls_rsa_public( &ctx2, message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx2.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); - } - -exit: - mbedtls_rsa_free( &ctx ); - mbedtls_rsa_free( &ctx2 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_private( char *message_hex_string, int mod, int radix_P, char *input_P, - int radix_Q, char *input_Q, int radix_N, char *input_N, - int radix_E, char *input_E, char *result_hex_str, int result ) -{ - unsigned char message_str[1000]; - unsigned char output[1000]; - unsigned char output_str[1000]; - mbedtls_rsa_context ctx, ctx2; /* Also test mbedtls_rsa_copy() while at it */ - mbedtls_mpi P1, Q1, H, G; - rnd_pseudo_info rnd_info; - int i; - - mbedtls_mpi_init( &P1 ); mbedtls_mpi_init( &Q1 ); mbedtls_mpi_init( &H ); mbedtls_mpi_init( &G ); - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V15, 0 ); - mbedtls_rsa_init( &ctx2, MBEDTLS_RSA_PKCS_V15, 0 ); - - memset( message_str, 0x00, 1000 ); - memset( &rnd_info, 0, sizeof( rnd_pseudo_info ) ); - - ctx.len = mod / 8; - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - - TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DQ, &ctx.D, &Q1 ) == 0 ); - TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - - unhexify( message_str, message_hex_string ); - - /* repeat three times to test updating of blinding values */ - for( i = 0; i < 3; i++ ) - { - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - TEST_ASSERT( mbedtls_rsa_private( &ctx, rnd_pseudo_rand, &rnd_info, - message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, - result_hex_str ) == 0 ); - } - } - - /* And now one more time with the copy */ - TEST_ASSERT( mbedtls_rsa_copy( &ctx2, &ctx ) == 0 ); - /* clear the original to be sure */ - mbedtls_rsa_free( &ctx ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx2 ) == 0 ); - - memset( output, 0x00, 1000 ); - memset( output_str, 0x00, 1000 ); - TEST_ASSERT( mbedtls_rsa_private( &ctx2, rnd_pseudo_rand, &rnd_info, - message_str, output ) == result ); - if( result == 0 ) - { - hexify( output_str, output, ctx2.len ); - - TEST_ASSERT( strcasecmp( (char *) output_str, - result_hex_str ) == 0 ); - } - -exit: - mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G ); - mbedtls_rsa_free( &ctx ); mbedtls_rsa_free( &ctx2 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void rsa_check_privkey_null() -{ - mbedtls_rsa_context ctx; - memset( &ctx, 0x00, sizeof( mbedtls_rsa_context ) ); - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == MBEDTLS_ERR_RSA_KEY_CHECK_FAILED ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_check_pubkey( int radix_N, char *input_N, int radix_E, char *input_E, - int result ) -{ - mbedtls_rsa_context ctx; - - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V15, 0 ); - - if( strlen( input_N ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - } - if( strlen( input_E ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - } - - TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == result ); - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void mbedtls_rsa_check_privkey( int mod, int radix_P, char *input_P, int radix_Q, - char *input_Q, int radix_N, char *input_N, - int radix_E, char *input_E, int radix_D, char *input_D, - int radix_DP, char *input_DP, int radix_DQ, - char *input_DQ, int radix_QP, char *input_QP, - int result ) -{ - mbedtls_rsa_context ctx; - - mbedtls_rsa_init( &ctx, MBEDTLS_RSA_PKCS_V15, 0 ); - - ctx.len = mod / 8; - if( strlen( input_P ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); - } - if( strlen( input_Q ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); - } - if( strlen( input_N ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); - } - if( strlen( input_E ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); - } - if( strlen( input_D ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.D, radix_D, input_D ) == 0 ); - } - if( strlen( input_DP ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.DP, radix_DP, input_DP ) == 0 ); - } - if( strlen( input_DQ ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.DQ, radix_DQ, input_DQ ) == 0 ); - } - if( strlen( input_QP ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &ctx.QP, radix_QP, input_QP ) == 0 ); - } - - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == result ); - -exit: - mbedtls_rsa_free( &ctx ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void rsa_check_pubpriv( int mod, int radix_Npub, char *input_Npub, - int radix_Epub, char *input_Epub, - int radix_P, char *input_P, int radix_Q, - char *input_Q, int radix_N, char *input_N, - int radix_E, char *input_E, int radix_D, char *input_D, - int radix_DP, char *input_DP, int radix_DQ, - char *input_DQ, int radix_QP, char *input_QP, - int result ) -{ - mbedtls_rsa_context pub, prv; - - mbedtls_rsa_init( &pub, MBEDTLS_RSA_PKCS_V15, 0 ); - mbedtls_rsa_init( &prv, MBEDTLS_RSA_PKCS_V15, 0 ); - - pub.len = mod / 8; - prv.len = mod / 8; - - if( strlen( input_Npub ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &pub.N, radix_Npub, input_Npub ) == 0 ); - } - if( strlen( input_Epub ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &pub.E, radix_Epub, input_Epub ) == 0 ); - } - - if( strlen( input_P ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.P, radix_P, input_P ) == 0 ); - } - if( strlen( input_Q ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.Q, radix_Q, input_Q ) == 0 ); - } - if( strlen( input_N ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.N, radix_N, input_N ) == 0 ); - } - if( strlen( input_E ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.E, radix_E, input_E ) == 0 ); - } - if( strlen( input_D ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.D, radix_D, input_D ) == 0 ); - } - if( strlen( input_DP ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.DP, radix_DP, input_DP ) == 0 ); - } - if( strlen( input_DQ ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.DQ, radix_DQ, input_DQ ) == 0 ); - } - if( strlen( input_QP ) ) - { - TEST_ASSERT( mbedtls_mpi_read_string( &prv.QP, radix_QP, input_QP ) == 0 ); - } - - TEST_ASSERT( mbedtls_rsa_check_pub_priv( &pub, &prv ) == result ); - -exit: - mbedtls_rsa_free( &pub ); - mbedtls_rsa_free( &prv ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_CTR_DRBG_C:MBEDTLS_ENTROPY_C */ -void mbedtls_rsa_gen_key( int nrbits, int exponent, int result) -{ - mbedtls_rsa_context ctx; - mbedtls_entropy_context entropy; - mbedtls_ctr_drbg_context ctr_drbg; - const char *pers = "test_suite_rsa"; - - mbedtls_ctr_drbg_init( &ctr_drbg ); - - mbedtls_entropy_init( &entropy ); - TEST_ASSERT( mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, - (const unsigned char *) pers, strlen( pers ) ) == 0 ); - - mbedtls_rsa_init( &ctx, 0, 0 ); - - TEST_ASSERT( mbedtls_rsa_gen_key( &ctx, mbedtls_ctr_drbg_random, &ctr_drbg, nrbits, exponent ) == result ); - if( result == 0 ) - { - TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx ) == 0 ); - } - -exit: - mbedtls_rsa_free( &ctx ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - mbedtls_entropy_free( &entropy ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void rsa_selftest() -{ - TEST_ASSERT( mbedtls_rsa_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.data deleted file mode 100644 index ea2a18380d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.data +++ /dev/null @@ -1,171 +0,0 @@ -SHA-1 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"":"da39a3ee5e6b4b0d3255bfef95601890afd80709" - -SHA-1 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"a8":"99f2aa95e36f95c2acb0eaf23998f030638f3f15" - -SHA-1 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"3000":"f944dcd635f9801f7ac90a407fbc479964dec024" - -SHA-1 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"42749e":"a444319e9b6cc1e8464c511ec0969c37d6bb2619" - -SHA-1 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"9fc3fe08":"16a0ff84fcc156fd5d3ca3a744f20a232d172253" - -SHA-1 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"b5c1c6f1af":"fec9deebfcdedaf66dda525e1be43597a73a1f93" - -SHA-1 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"ec29561244ede706b6eb30a1c371d74450a105c3f9735f7fa9fe38cf67f304a5736a106e92e17139a6813b1c81a4f3d3fb9546ab4296fa9f722826c066869edacd73b2548035185813e22634a9da44000d95a281ff9f264ecce0a931222162d021cca28db5f3c2aa24945ab1e31cb413ae29810fd794cad5dfaf29ec43cb38d198fe4ae1da2359780221405bd6712a5305da4b1b737fce7cd21c0eb7728d08235a9011":"970111c4e77bcc88cc20459c02b69b4aa8f58217" - -SHA-1 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"5fc2c3f6a7e79dc94be526e5166a238899d54927ce470018fbfd668fd9dd97cbf64e2c91584d01da63be3cc9fdff8adfefc3ac728e1e335b9cdc87f069172e323d094b47fa1e652afe4d6aa147a9f46fda33cacb65f3aa12234746b9007a8c85fe982afed7815221e43dba553d8fe8a022cdac1b99eeeea359e5a9d2e72e382dffa6d19f359f4f27dc3434cd27daeeda8e38594873398678065fbb23665aba9309d946135da0e4a4afdadff14db18e85e71dd93c3bf9faf7f25c8194c4269b1ee3d9934097ab990025d9c3aaf63d5109f52335dd3959d38ae485050e4bbb6235574fc0102be8f7a306d6e8de6ba6becf80f37415b57f9898a5824e77414197422be3d36a6080":"0423dc76a8791107d14e13f5265b343f24cc0f19" - -SHA-1 Test Vector NIST CAVS #9 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"0f865f46a8f3aed2da18482aa09a8f390dc9da07d51d1bd10fe0bf5f3928d5927d08733d32075535a6d1c8ac1b2dc6ba0f2f633dc1af68e3f0fa3d85e6c60cb7b56c239dc1519a007ea536a07b518ecca02a6c31b46b76f021620ef3fc6976804018380e5ab9c558ebfc5cb1c9ed2d974722bf8ab6398f1f2b82fa5083f85c16a5767a3a07271d67743f00850ce8ec428c7f22f1cf01f99895c0c844845b06a06cecb0c6cf83eb55a1d4ebc44c2c13f6f7aa5e0e08abfd84e7864279057abc471ee4a45dbbb5774afa24e51791a0eada11093b88681fe30baa3b2e94113dc63342c51ca5d1a6096d0897b626e42cb91761058008f746f35465465540ad8c6b8b60f7e1461b3ce9e6529625984cb8c7d46f07f735be067588a0117f23e34ff57800e2bbe9a1605fde6087fb15d22c5d3ac47566b8c448b0cee40373e5ba6eaa21abee71366afbb27dbbd300477d70c371e7b8963812f5ed4fb784fb2f3bd1d3afe883cdd47ef32beaea":"6692a71d73e00f27df976bc56df4970650d90e45" - -SHA-1 Test Vector NIST CAVS #10 -depends_on:MBEDTLS_SHA1_C -mbedtls_sha1:"8236153781bd2f1b81ffe0def1beb46f5a70191142926651503f1b3bb1016acdb9e7f7acced8dd168226f118ff664a01a8800116fd023587bfba52a2558393476f5fc69ce9c65001f23e70476d2cc81c97ea19caeb194e224339bcb23f77a83feac5096f9b3090c51a6ee6d204b735aa71d7e996d380b80822e4dfd43683af9c7442498cacbea64842dfda238cb099927c6efae07fdf7b23a4e4456e0152b24853fe0d5de4179974b2b9d4a1cdbefcbc01d8d311b5dda059136176ea698ab82acf20dd490be47130b1235cb48f8a6710473cfc923e222d94b582f9ae36d4ca2a32d141b8e8cc36638845fbc499bce17698c3fecae2572dbbd470552430d7ef30c238c2124478f1f780483839b4fb73d63a9460206824a5b6b65315b21e3c2f24c97ee7c0e78faad3df549c7ca8ef241876d9aafe9a309f6da352bec2caaa92ee8dca392899ba67dfed90aef33d41fc2494b765cb3e2422c8e595dabbfaca217757453fb322a13203f425f6073a9903e2dc5818ee1da737afc345f0057744e3a56e1681c949eb12273a3bfc20699e423b96e44bd1ff62e50a848a890809bfe1611c6787d3d741103308f849a790f9c015098286dbacfc34c1718b2c2b77e32194a75dda37954a320fa68764027852855a7e5b5274eb1e2cbcd27161d98b59ad245822015f48af82a45c0ed59be94f9af03d9736048570d6e3ef63b1770bc98dfb77de84b1bb1708d872b625d9ab9b06c18e5dbbf34399391f0f8aa26ec0dac7ff4cb8ec97b52bcb942fa6db2385dcd1b3b9d567aaeb425d567b0ebe267235651a1ed9bf78fd93d3c1dd077fe340bb04b00529c58f45124b717c168d07e9826e33376988bc5cf62845c2009980a4dfa69fbc7e5a0b1bb20a5958ca967aec68eb31dd8fccca9afcd30a26bab26279f1bf6724ff":"11863b483809ef88413ca9b0084ac4a5390640af" - -SHA-224 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -sha224:"":"d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" - -SHA-224 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -sha224:"ff":"e33f9d75e6ae1369dbabf81b96b4591ae46bba30b591a6b6c62542b5" - -SHA-224 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -sha224:"984c":"2fa9df9157d9e027cfbc4c6a9df32e1adc0cbe2328ec2a63c5ae934e" - -SHA-224 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -sha224:"50efd0":"b5a9820413c2bf8211fbbf5df1337043b32fa4eafaf61a0c8e9ccede" - -SHA-224 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -sha224:"e5e09924":"fd19e74690d291467ce59f077df311638f1c3a46e510d0e49a67062d" - -SHA-224 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -sha224:"21ebecb914":"78f4a71c21c694499ce1c7866611b14ace70d905012c356323c7c713" - -SHA-224 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -sha224:"fc488947c1a7a589726b15436b4f3d9556262f98fc6422fc5cdf20f0fad7fe427a3491c86d101ffe6b7514f06268f65b2d269b0f69ad9a97847eff1c16a2438775eb7be6847ccf11cb8b2e8dcd6640b095b49c0693fe3cf4a66e2d9b7ad68bff14f3ad69abf49d0aba36cbe0535202deb6599a47225ef05beb351335cd7bc0f480d691198c7e71305ffd53b39d33242bb79cfd98bfd69e137b5d18b2b89ac9ace01c8dbdcf2533cce3682ecc52118de0c1062ec2126c2e657d6ea3d9e2398e705d4b0b1f1ceecb266dffc4f31bf42744fb1e938dc22a889919ee1e73f463f7871fed720519e32186264b7ef2a0e5d9a18e6c95c0781894f77967f048951dec3b4d892a38710b1e3436d3c29088eb8b3da1789c25db3d3bc6c26081206e7155d210a89b80ca6ea877c41ff9947c0f25625dcb118294a163501f6239c326661a958fd12da4cd15a899f8b88cc723589056eaec5aa04a4cf5dbb6f480f9660423ccf38c486e210707e0fb25e1f126ceb2616f63e147a647dab0af9ebe89d65458bf636154a46e4cab95f5ee62da2c7974cd14b90d3e4f99f81733e85b3c1d5da2b508d9b90f5eed7eff0d9c7649de62bee00375454fee4a39576a5bbfdae428e7f8097bdf7797f167686cb68407e49079e4611ff3402b6384ba7b7e522bd2bb11ce8fd02ea4c1604d163ac4f6dde50b8b1f593f7edaadeac0868ed97df690200680c25f0f5d85431a529e4f339089dcdeda105e4ee51dead704cdf5a605c55fb055c9b0e86b8ba1b564c0dea3eb790a595cb103cb292268b07c5e59371e1a7ef597cd4b22977a820694c9f9aeb55d9de3ef62b75d6e656e3336698d960a3787bf8cf5b926a7faeef52ae128bcb5dc9e66d94b016c7b8e034879171a2d91c381f57e6a815b63b5ee6a6d2ff435b49f14c963966960194430d78f8f87627a67757fb3532b289550894da6dce4817a4e07f4d56877a1102ffcc8befa5c9f8fca6a4574d93ff70376c8861e0f8108cf907fce77ecb49728f86f034f80224b9695682e0824462f76cdb1fd1af151337b0d85419047a7aa284791718a4860cd586f7824b95bc837b6fd4f9be5aade68456e20356aa4d943dac36bf8b67b9e8f9d01a00fcda74b798bafa746c661b010f75b59904b29d0c8041504811c4065f82cf2ead58d2f595cbd8bc3e7043f4d94577b373b7cfe16a36fe564f505c03b70cfeb5e5f411c79481338aa67e86b3f5a2e77c21e454c333ae3da943ab723ab5f4c940395319534a5575f64acba0d0ecc43f60221ed3badf7289c9b3a7b903a2d6c94e15fa4c310dc4fa7faa0c24f405160a1002dbef20e4105d481db982f7243f79400a6e4cd9753c4b9732a47575f504b20c328fe9add7f432a4f075829da07b53b695037dc51737d3cd731934df333cd1a53fcf65aa31baa450ca501a6fae26e322347e618c5a444d92e9fec5a8261ae38b98fee5be77c02cec09ddccd5b3de92036":"1302149d1e197c41813b054c942329d420e366530f5517b470e964fe" - -SHA-256 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - -SHA-256 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"bd":"68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b" - -SHA-256 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"5fd4":"7c4fbf484498d21b487b9d61de8914b2eadaf2698712936d47c3ada2558f6788" - -SHA-256 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"b0bd69":"4096804221093ddccfbf46831490ea63e9e99414858f8d75ff7f642c7ca61803" - -SHA-256 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"c98c8e55":"7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504" - -SHA-256 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"81a723d966":"7516fb8bb11350df2bf386bc3c33bd0f52cb4c67c6e4745e0488e62c2aea2605" - -SHA-256 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA256_C -mbedtls_sha256:"8390cf0be07661cc7669aac54ce09a37733a629d45f5d983ef201f9b2d13800e555d9b1097fec3b783d7a50dcb5e2b644b96a1e9463f177cf34906bf388f366db5c2deee04a30e283f764a97c3b377a034fefc22c259214faa99babaff160ab0aaa7e2ccb0ce09c6b32fe08cbc474694375aba703fadbfa31cf685b30a11c57f3cf4edd321e57d3ae6ebb1133c8260e75b9224fa47a2bb205249add2e2e62f817491482ae152322be0900355cdcc8d42a98f82e961a0dc6f537b7b410eff105f59673bfb787bf042aa071f7af68d944d27371c64160fe9382772372516c230c1f45c0d6b6cca7f274b394da9402d3eafdf733994ec58ab22d71829a98399574d4b5908a447a5a681cb0dd50a31145311d92c22a16de1ead66a5499f2dceb4cae694772ce90762ef8336afec653aa9b1a1c4820b221136dfce80dce2ba920d88a530c9410d0a4e0358a3a11052e58dd73b0b179ef8f56fe3b5a2d117a73a0c38a1392b6938e9782e0d86456ee4884e3c39d4d75813f13633bc79baa07c0d2d555afbf207f52b7dca126d015aa2b9873b3eb065e90b9b065a5373fe1fb1b20d594327d19fba56cb81e7b6696605ffa56eba3c27a438697cc21b201fd7e09f18deea1b3ea2f0d1edc02df0e20396a145412cd6b13c32d2e605641c948b714aec30c0649dc44143511f35ab0fd5dd64c34d06fe86f3836dfe9edeb7f08cfc3bd40956826356242191f99f53473f32b0cc0cf9321d6c92a112e8db90b86ee9e87cc32d0343db01e32ce9eb782cb24efbbbeb440fe929e8f2bf8dfb1550a3a2e742e8b455a3e5730e9e6a7a9824d17acc0f72a7f67eae0f0970f8bde46dcdefaed3047cf807e7f00a42e5fd11d40f5e98533d7574425b7d2bc3b3845c443008b58980e768e464e17cc6f6b3939eee52f713963d07d8c4abf02448ef0b889c9671e2f8a436ddeeffcca7176e9bf9d1005ecd377f2fa67c23ed1f137e60bf46018a8bd613d038e883704fc26e798969df35ec7bbc6a4fe46d8910bd82fa3cded265d0a3b6d399e4251e4d8233daa21b5812fded6536198ff13aa5a1cd46a5b9a17a4ddc1d9f85544d1d1cc16f3df858038c8e071a11a7e157a85a6a8dc47e88d75e7009a8b26fdb73f33a2a70f1e0c259f8f9533b9b8f9af9288b7274f21baeec78d396f8bacdcc22471207d9b4efccd3fedc5c5a2214ff5e51c553f35e21ae696fe51e8df733a8e06f50f419e599e9f9e4b37ce643fc810faaa47989771509d69a110ac916261427026369a21263ac4460fb4f708f8ae28599856db7cb6a43ac8e03d64a9609807e76c5f312b9d1863bfa304e8953647648b4f4ab0ed995e":"4109cdbec3240ad74cc6c37f39300f70fede16e21efc77f7865998714aad0b5e" - -SHA-384 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -sha384:"":"38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b" - -SHA-384 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -sha384:"ab":"fb94d5be118865f6fcbc978b825da82cff188faec2f66cb84b2537d74b4938469854b0ca89e66fa2e182834736629f3d" - -SHA-384 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -sha384:"7c27":"3d80be467df86d63abb9ea1d3f9cb39cd19890e7f2c53a6200bedc5006842b35e820dc4e0ca90ca9b97ab23ef07080fc" - -SHA-384 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -sha384:"31f5ca":"78d54b943421fdf7ba90a7fb9637c2073aa480454bd841d39ff72f4511fc21fb67797b652c0c823229342873d3bef955" - -SHA-384 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -sha384:"7bdee3f8":"8bdafba0777ee446c3431c2d7b1fbb631089f71d2ca417abc1d230e1aba64ec2f1c187474a6f4077d372c14ad407f99a" - -SHA-384 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -sha384:"8f05604915":"504e414bf1db1060f14c8c799e25b1e0c4dcf1504ebbd129998f0ae283e6de86e0d3c7e879c73ec3b1836c3ee89c2649" - -SHA-384 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA512_C -sha384:"665da6eda214":"4c022f112010908848312f8b8f1072625fd5c105399d562ea1d56130619a7eac8dfc3748fd05ee37e4b690be9daa9980" - -SHA-384 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA512_C -sha384:"7f46ce506d593c4ed53c82edeb602037e0485befbee03f7f930fe532d18ff2a3f5fd6076672c8145a1bf40dd94f7abab47c9ae71c234213d2ad1069c2dac0b0ba15257ae672b8245960ae55bd50315c0097daa3a318745788d70d14706910809ca6e396237fe4934fa46f9ce782d66606d8bd6b2d283b1160513ce9c24e9f084b97891f99d4cdefc169a029e431ca772ba1bba426fce6f01d8e286014e5acc66b799e4db62bd4783322f8a32ff78e0de3957df50ce10871f4e0680df4e8ca3960af9bc6f4efa8eb3962d18f474eb178c3265cc46b8f2ff5ab1a7449fea297dfcfabfa01f28abbb7289bb354b691b5664ec6d098af51be19947ec5ba7ebd66380d1141953ba78d4aa5401679fa7b0a44db1981f864d3535c45afe4c61183d5b0ad51fae71ca07e34240283959f7530a32c70d95a088e501c230059f333b0670825009e7e22103ef22935830df1fac8ef877f5f3426dd54f7d1128dd871ad9a7d088f94c0e8712013295b8d69ae7623b880978c2d3c6ad26dc478f8dc47f5c0adcc618665dc3dc205a9071b2f2191e16cac5bd89bb59148fc719633752303aa08e518dbc389f0a5482caaa4c507b8729a6f3edd061efb39026cecc6399f51971cf7381d605e144a5928c8c2d1ad7467b05da2f202f4f3234e1aff19a0198a28685721c3d2d52311c721e3fdcbaf30214cdc3acff8c433880e104fb63f2df7ce69a97857819ba7ac00ac8eae1969764fde8f68cf8e0916d7e0c151147d4944f99f42ae50f30e1c79a42d2b6c5188d133d3cbbf69094027b354b295ccd0f7dc5a87d73638bd98ebfb00383ca0fa69cb8dcb35a12510e5e07ad8789047d0b63841a1bb928737e8b0a0c33254f47aa8bfbe3341a09c2b76dbcefa67e30df300d34f7b8465c4f869e51b6bcfe6cf68b238359a645036bf7f63f02924e087ce7457e483b6025a859903cb484574aa3b12cf946f32127d537c33bee3141b5db96d10a148c50ae045f287210757710d6846e04b202f79e87dd9a56bc6da15f84a77a7f63935e1dee00309cd276a8e7176cb04da6bb0e9009534438732cb42d008008853d38d19beba46e61006e30f7efd1bc7c2906b024e4ff898a1b58c448d68b43c6ab63f34f85b3ac6aa4475867e51b583844cb23829f4b30f4bdd817d88e2ef3e7b4fc0a624395b05ec5e8686082b24d29fef2b0d3c29e031d5f94f504b1d3df9361eb5ffbadb242e66c39a8094cfe62f85f639f3fd65fc8ae0c74a8f4c6e1d070b9183a434c722caaa0225f8bcd68614d6f0738ed62f8484ec96077d155c08e26c46be262a73e3551698bd70d8d5610cf37c4c306eed04ba6a040a9c3e6d7e15e8acda17f477c2484cf5c56b813313927be8387b1024f995e98fc87f1029091c01424bdc2b296c2eadb7d25b3e762a2fd0c2dcd1727ddf91db97c5984305265f3695a7f5472f2d72c94d68c27914f14f82aa8dd5fe4e2348b0ca967a3f98626a091552f5d0ffa2bf10350d23c996256c01fdeffb2c2c612519869f877e4929c6e95ff15040f1485e22ed14119880232fef3b57b3848f15b1766a5552879df8f06":"cba9e3eb12a6f83db11e8a6ff40d1049854ee094416bc527fea931d8585428a8ed6242ce81f6769b36e2123a5c23483e" - -SHA-512 Test Vector NIST CAVS #1 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"":"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" - -SHA-512 Test Vector NIST CAVS #2 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"8f":"e4cd2d19931b5aad9c920f45f56f6ce34e3d38c6d319a6e11d0588ab8b838576d6ce6d68eea7c830de66e2bd96458bfa7aafbcbec981d4ed040498c3dd95f22a" - -SHA-512 Test Vector NIST CAVS #3 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"e724":"7dbb520221a70287b23dbcf62bfc1b73136d858e86266732a7fffa875ecaa2c1b8f673b5c065d360c563a7b9539349f5f59bef8c0c593f9587e3cd50bb26a231" - -SHA-512 Test Vector NIST CAVS #4 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"de4c90":"33ce98281045a5c4c9df0363d8196f1d7dfcd5ee46ac89776fd8a4344c12f123a66788af5bd41ceff1941aa5637654b4064c88c14e00465ab79a2fc6c97e1014" - -SHA-512 Test Vector NIST CAVS #5 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"a801e94b":"dadb1b5a27f9fece8d86adb2a51879beb1787ff28f4e8ce162cad7fee0f942efcabbf738bc6f797fc7cc79a3a75048cd4c82ca0757a324695bfb19a557e56e2f" - -SHA-512 Test Vector NIST CAVS #6 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"94390d3502":"b6175c4c4cccf69e0ce5f0312010886ea6b34d43673f942ae42483f9cbb7da817de4e11b5d58e25a3d9bd721a22cdffe1c40411cc45df1911fa5506129b69297" - -SHA-512 Test Vector NIST CAVS #7 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"49297dd63e5f":"1fcc1e6f6870859d11649f5e5336a9cd16329c029baf04d5a6edf257889a2e9522b497dd656bb402da461307c4ee382e2e89380c8e6e6e7697f1e439f650fa94" - -SHA-512 Test Vector NIST CAVS #8 -depends_on:MBEDTLS_SHA512_C -mbedtls_sha512:"990d1ae71a62d7bda9bfdaa1762a68d296eee72a4cd946f287a898fbabc002ea941fd8d4d991030b4d27a637cce501a834bb95eab1b7889a3e784c7968e67cbf552006b206b68f76d9191327524fcc251aeb56af483d10b4e0c6c5e599ee8c0fe4faeca8293844a8547c6a9a90d093f2526873a19ad4a5e776794c68c742fb834793d2dfcb7fea46c63af4b70fd11cb6e41834e72ee40edb067b292a794990c288d5007e73f349fb383af6a756b8301ad6e5e0aa8cd614399bb3a452376b1575afa6bdaeaafc286cb064bb91edef97c632b6c1113d107fa93a0905098a105043c2f05397f702514439a08a9e5ddc196100721d45c8fc17d2ed659376f8a00bd5cb9a0860e26d8a29d8d6aaf52de97e9346033d6db501a35dbbaf97c20b830cd2d18c2532f3a59cc497ee64c0e57d8d060e5069b28d86edf1adcf59144b221ce3ddaef134b3124fbc7dd000240eff0f5f5f41e83cd7f5bb37c9ae21953fe302b0f6e8b68fa91c6ab99265c64b2fd9cd4942be04321bb5d6d71932376c6f2f88e02422ba6a5e2cb765df93fd5dd0728c6abdaf03bce22e0678a544e2c3636f741b6f4447ee58a8fc656b43ef817932176adbfc2e04b2c812c273cd6cbfa4098f0be036a34221fa02643f5ee2e0b38135f2a18ecd2f16ebc45f8eb31b8ab967a1567ee016904188910861ca1fa205c7adaa194b286893ffe2f4fbe0384c2aef72a4522aeafd3ebc71f9db71eeeef86c48394a1c86d5b36c352cc33a0a2c800bc99e62fd65b3a2fd69e0b53996ec13d8ce483ce9319efd9a85acefabdb5342226febb83fd1daf4b24265f50c61c6de74077ef89b6fecf9f29a1f871af1e9f89b2d345cda7499bd45c42fa5d195a1e1a6ba84851889e730da3b2b916e96152ae0c92154b49719841db7e7cc707ba8a5d7b101eb4ac7b629bb327817910fff61580b59aab78182d1a2e33473d05b00b170b29e331870826cfe45af206aa7d0246bbd8566ca7cfb2d3c10bfa1db7dd48dd786036469ce7282093d78b5e1a5b0fc81a54c8ed4ceac1e5305305e78284ac276f5d7862727aff246e17addde50c670028d572cbfc0be2e4f8b2eb28fa68ad7b4c6c2a239c460441bfb5ea049f23b08563b4e47729a59e5986a61a6093dbd54f8c36ebe87edae01f251cb060ad1364ce677d7e8d5a4a4ca966a7241cc360bc2acb280e5f9e9c1b032ad6a180a35e0c5180b9d16d026c865b252098cc1d99ba7375ca31c7702c0d943d5e3dd2f6861fa55bd46d94b67ed3e52eccd8dd06d968e01897d6de97ed3058d91dd":"8e4bc6f8b8c60fe4d68c61d9b159c8693c3151c46749af58da228442d927f23359bd6ccd6c2ec8fa3f00a86cecbfa728e1ad60b821ed22fcd309ba91a4138bc9" - -SHA-1 Selftest -depends_on:MBEDTLS_SELF_TEST:MBEDTLS_SHA1_C -sha1_selftest: - -SHA-256 Selftest -depends_on:MBEDTLS_SELF_TEST:MBEDTLS_SHA256_C -sha256_selftest: - -SHA-512 Selftest -depends_on:MBEDTLS_SELF_TEST:MBEDTLS_SHA512_C -sha512_selftest: diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.function deleted file mode 100644 index ec326fcc97..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_shax.function +++ /dev/null @@ -1,131 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/sha1.h" -#include "mbedtls/sha256.h" -#include "mbedtls/sha512.h" -/* END_HEADER */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA1_C */ -void mbedtls_sha1( char *hex_src_string, char *hex_hash_string ) -{ - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[41]; - int src_len; - - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 41); - - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_sha1( src_str, src_len, output ); - hexify( hash_str, output, 20 ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA256_C */ -void sha224(char *hex_src_string, char *hex_hash_string ) -{ - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[57]; - int src_len; - - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 57); - - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_sha256( src_str, src_len, output, 1 ); - hexify( hash_str, output, 28 ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA256_C */ -void mbedtls_sha256(char *hex_src_string, char *hex_hash_string ) -{ - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[65]; - int src_len; - - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 65); - - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_sha256( src_str, src_len, output, 0 ); - hexify( hash_str, output, 32 ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA512_C */ -void sha384(char *hex_src_string, char *hex_hash_string ) -{ - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[97]; - int src_len; - - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 97); - - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_sha512( src_str, src_len, output, 1 ); - hexify( hash_str, output, 48 ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA512_C */ -void mbedtls_sha512(char *hex_src_string, char *hex_hash_string ) -{ - unsigned char src_str[10000]; - unsigned char hash_str[10000]; - unsigned char output[129]; - int src_len; - - memset(src_str, 0x00, 10000); - memset(hash_str, 0x00, 10000); - memset(output, 0x00, 129); - - src_len = unhexify( src_str, hex_src_string ); - - mbedtls_sha512( src_str, src_len, output, 0); - hexify( hash_str, output, 64 ); - - TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA1_C:MBEDTLS_SELF_TEST */ -void sha1_selftest() -{ - TEST_ASSERT( mbedtls_sha1_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA256_C:MBEDTLS_SELF_TEST */ -void sha256_selftest() -{ - TEST_ASSERT( mbedtls_sha256_self_test( 0 ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SHA512_C:MBEDTLS_SELF_TEST */ -void sha512_selftest() -{ - TEST_ASSERT( mbedtls_sha512_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.data deleted file mode 100644 index a39f6f09f0..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.data +++ /dev/null @@ -1,56 +0,0 @@ -SSL DTLS replay: initial state, seqnum 0 -ssl_dtls_replay:"":"000000000000":0 - -SSL DTLS replay: 0 seen, 1 arriving -ssl_dtls_replay:"000000000000":"000000000001":0 - -SSL DTLS replay: 0 seen, 0 replayed -ssl_dtls_replay:"000000000000":"000000000000":-1 - -SSL DTLS replay: 0-1 seen, 2 arriving -ssl_dtls_replay:"000000000000,000000000001":"000000000002":0 - -SSL DTLS replay: 0-1 seen, 1 replayed -ssl_dtls_replay:"000000000000,000000000001":"000000000001":-1 - -SSL DTLS replay: 0-1 seen, 0 replayed -ssl_dtls_replay:"000000000000,000000000001":"000000000000":-1 - -SSL DTLS replay: new -ssl_dtls_replay:"abcd12340000,abcd12340001,abcd12340003":"abcd12340004":0 - -SSL DTLS replay: way new -ssl_dtls_replay:"abcd12340000,abcd12340001,abcd12340003":"abcd12350000":0 - -SSL DTLS replay: delayed -ssl_dtls_replay:"abcd12340000,abcd12340001,abcd12340003":"abcd12340002":0 - -SSL DTLS replay: lastest replayed -ssl_dtls_replay:"abcd12340000,abcd12340001,abcd12340003":"abcd12340003":-1 - -SSL DTLS replay: older replayed -ssl_dtls_replay:"abcd12340000,abcd12340001,abcd12340003":"abcd12340001":-1 - -SSL DTLS replay: most recent in window, replayed -ssl_dtls_replay:"abcd12340000,abcd12340002,abcd12340003":"abcd12340002":-1 - -SSL DTLS replay: oldest in window, replayed -ssl_dtls_replay:"abcd12340000,abcd12340001,abcd1234003f":"abcd12340000":-1 - -SSL DTLS replay: oldest in window, not replayed -ssl_dtls_replay:"abcd12340001,abcd12340002,abcd1234003f":"abcd12340000":0 - -SSL DTLS replay: just out of the window -ssl_dtls_replay:"abcd12340001,abcd12340002,abcd1234003f":"abcd1233ffff":-1 - -SSL DTLS replay: way out of the window -ssl_dtls_replay:"abcd12340001,abcd12340002,abcd1234003f":"abcd12330000":-1 - -SSL DTLS replay: big jump then replay -ssl_dtls_replay:"abcd12340000,abcd12340100":"abcd12340100":-1 - -SSL DTLS replay: big jump then new -ssl_dtls_replay:"abcd12340000,abcd12340100":"abcd12340101":0 - -SSL DTLS replay: big jump then just delayed -ssl_dtls_replay:"abcd12340000,abcd12340100":"abcd123400ff":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.function deleted file mode 100644 index 8d3448cbc3..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_ssl.function +++ /dev/null @@ -1,42 +0,0 @@ -/* BEGIN_HEADER */ -#include -#include -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_SSL_TLS_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_SSL_DTLS_ANTI_REPLAY */ -void ssl_dtls_replay( char *prevs, char *new, int ret ) -{ - mbedtls_ssl_context ssl; - mbedtls_ssl_config conf; - char *end_prevs = prevs + strlen( prevs ) + 1; - - mbedtls_ssl_init( &ssl ); - mbedtls_ssl_config_init( &conf ); - - TEST_ASSERT( mbedtls_ssl_config_defaults( &conf, - MBEDTLS_SSL_IS_CLIENT, - MBEDTLS_SSL_TRANSPORT_DATAGRAM, - MBEDTLS_SSL_PRESET_DEFAULT ) == 0 ); - TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 ); - - /* Read previous record numbers */ - for( ; end_prevs - prevs >= 13; prevs += 13 ) - { - prevs[12] = '\0'; - unhexify( ssl.in_ctr + 2, prevs ); - mbedtls_ssl_dtls_replay_update( &ssl ); - } - - /* Check new number */ - unhexify( ssl.in_ctr + 2, new ); - TEST_ASSERT( mbedtls_ssl_dtls_replay_check( &ssl ) == ret ); - - mbedtls_ssl_free( &ssl ); - mbedtls_ssl_config_free( &conf ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.data deleted file mode 100644 index ac13f11b41..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.data +++ /dev/null @@ -1,15 +0,0 @@ -Check compiletime library version -check_compiletime_version:"2.2.1" - -Check runtime library version -check_runtime_version:"2.2.1" - -Check for MBEDTLS_VERSION_C -check_feature:"MBEDTLS_VERSION_C":0 - -Check for MBEDTLS_AES_C when already present -depends_on:MBEDTLS_AES_C -check_feature:"MBEDTLS_AES_C":0 - -Check for unknown define -check_feature:"MBEDTLS_UNKNOWN":-1 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.function deleted file mode 100644 index 37144ca405..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_version.function +++ /dev/null @@ -1,73 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/version.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_VERSION_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void check_compiletime_version( char *version_str ) -{ - char build_str[100]; - char build_str_full[100]; - unsigned int build_int; - - memset( build_str, 0, 100 ); - memset( build_str_full, 0, 100 ); - - mbedtls_snprintf( build_str, 100, "%d.%d.%d", MBEDTLS_VERSION_MAJOR, - MBEDTLS_VERSION_MINOR, MBEDTLS_VERSION_PATCH ); - - mbedtls_snprintf( build_str_full, 100, "mbed TLS %d.%d.%d", MBEDTLS_VERSION_MAJOR, - MBEDTLS_VERSION_MINOR, MBEDTLS_VERSION_PATCH ); - - build_int = MBEDTLS_VERSION_MAJOR << 24 | - MBEDTLS_VERSION_MINOR << 16 | - MBEDTLS_VERSION_PATCH << 8; - - TEST_ASSERT( build_int == MBEDTLS_VERSION_NUMBER ); - TEST_ASSERT( strcmp( build_str, MBEDTLS_VERSION_STRING ) == 0 ); - TEST_ASSERT( strcmp( build_str_full, MBEDTLS_VERSION_STRING_FULL ) == 0 ); - TEST_ASSERT( strcmp( version_str, MBEDTLS_VERSION_STRING ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void check_runtime_version( char *version_str ) -{ - char build_str[100]; - char get_str[100]; - char build_str_full[100]; - char get_str_full[100]; - unsigned int get_int; - - memset( build_str, 0, 100 ); - memset( get_str, 0, 100 ); - memset( build_str_full, 0, 100 ); - memset( get_str_full, 0, 100 ); - - get_int = mbedtls_version_get_number(); - mbedtls_version_get_string( get_str ); - mbedtls_version_get_string_full( get_str_full ); - - mbedtls_snprintf( build_str, 100, "%d.%d.%d", - (get_int >> 24) & 0xFF, - (get_int >> 16) & 0xFF, - (get_int >> 8) & 0xFF ); - mbedtls_snprintf( build_str_full, 100, "mbed TLS %s", version_str ); - - TEST_ASSERT( strcmp( build_str, version_str ) == 0 ); - TEST_ASSERT( strcmp( build_str_full, get_str_full ) == 0 ); - TEST_ASSERT( strcmp( version_str, get_str ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void check_feature( char *feature, int result ) -{ - int check = mbedtls_version_check_feature( feature ); - TEST_ASSERT( check == result ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.data deleted file mode 100644 index 2f2137f543..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.data +++ /dev/null @@ -1,1462 +0,0 @@ -X509 Certificate information #1 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/server1.crt":"cert. version \: 3\nserial number \: 01\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nissued on \: 2011-02-12 14\:44\:06\nexpires on \: 2021-02-12 14\:44\:06\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information #2 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/server2.crt":"cert. version \: 3\nserial number \: 02\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2011-02-12 14\:44\:06\nexpires on \: 2021-02-12 14\:44\:06\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information #3 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/test-ca.crt":"cert. version \: 3\nserial number \: 00\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nissued on \: 2011-02-12 14\:44\:00\nexpires on \: 2021-02-12 14\:44\:00\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=true\n" - -X509 Certificate information MD2 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_md2.crt":"cert. version \: 3\nserial number \: 09\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert MD2\nissued on \: 2009-07-12 10\:56\:59\nexpires on \: 2011-07-12 10\:56\:59\nsigned using \: RSA with MD2\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information MD4 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_md4.crt":"cert. version \: 3\nserial number \: 05\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert MD4\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with MD4\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information MD5 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_md5.crt":"cert. version \: 3\nserial number \: 06\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert MD5\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with MD5\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information SHA1 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_sha1.crt":"cert. version \: 3\nserial number \: 07\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA1\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information SHA224 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_sha224.crt":"cert. version \: 3\nserial number \: 08\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA224\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with SHA-224\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information SHA256 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_sha256.crt":"cert. version \: 3\nserial number \: 09\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA256\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with SHA-256\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information SHA384 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_sha384.crt":"cert. version \: 3\nserial number \: 0A\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA384\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with SHA-384\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information SHA512 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_sha512.crt":"cert. version \: 3\nserial number \: 0B\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Cert SHA512\nissued on \: 2011-02-12 14\:44\:07\nexpires on \: 2021-02-12 14\:44\:07\nsigned using \: RSA with SHA-512\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information RSA-PSS, SHA1 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_cert_info:"data_files/server9.crt":"cert. version \: 3\nserial number \: 16\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2014-01-20 13\:38\:16\nexpires on \: 2024-01-18 13\:38\:16\nsigned using \: RSASSA-PSS (SHA1, MGF1-SHA1, 0xEA)\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information RSA-PSS, SHA224 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -x509_cert_info:"data_files/server9-sha224.crt":"cert. version \: 3\nserial number \: 17\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2014-01-20 13\:57\:36\nexpires on \: 2024-01-18 13\:57\:36\nsigned using \: RSASSA-PSS (SHA224, MGF1-SHA224, 0xE2)\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information RSA-PSS, SHA256 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -x509_cert_info:"data_files/server9-sha256.crt":"cert. version \: 3\nserial number \: 18\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2014-01-20 13\:57\:45\nexpires on \: 2024-01-18 13\:57\:45\nsigned using \: RSASSA-PSS (SHA256, MGF1-SHA256, 0xDE)\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information RSA-PSS, SHA384 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -x509_cert_info:"data_files/server9-sha384.crt":"cert. version \: 3\nserial number \: 19\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2014-01-20 13\:57\:58\nexpires on \: 2024-01-18 13\:57\:58\nsigned using \: RSASSA-PSS (SHA384, MGF1-SHA384, 0xCE)\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information RSA-PSS, SHA512 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -x509_cert_info:"data_files/server9-sha512.crt":"cert. version \: 3\nserial number \: 1A\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2014-01-20 13\:58\:12\nexpires on \: 2024-01-18 13\:58\:12\nsigned using \: RSASSA-PSS (SHA512, MGF1-SHA512, 0xBE)\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information EC, SHA1 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_cert_info:"data_files/server5-sha1.crt":"cert. version \: 3\nserial number \: 12\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-09-24 16\:21\:27\nexpires on \: 2023-09-22 16\:21\:27\nsigned using \: ECDSA with SHA1\nEC key size \: 256 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information EC, SHA224 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_cert_info:"data_files/server5-sha224.crt":"cert. version \: 3\nserial number \: 13\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-09-24 16\:21\:27\nexpires on \: 2023-09-22 16\:21\:27\nsigned using \: ECDSA with SHA224\nEC key size \: 256 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information EC, SHA256 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_cert_info:"data_files/server5.crt":"cert. version \: 3\nserial number \: 09\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-09-24 15\:52\:04\nexpires on \: 2023-09-22 15\:52\:04\nsigned using \: ECDSA with SHA256\nEC key size \: 256 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information EC, SHA384 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_cert_info:"data_files/server5-sha384.crt":"cert. version \: 3\nserial number \: 14\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-09-24 16\:21\:27\nexpires on \: 2023-09-22 16\:21\:27\nsigned using \: ECDSA with SHA384\nEC key size \: 256 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information EC, SHA512 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_cert_info:"data_files/server5-sha512.crt":"cert. version \: 3\nserial number \: 15\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-09-24 16\:21\:27\nexpires on \: 2023-09-22 16\:21\:27\nsigned using \: ECDSA with SHA512\nEC key size \: 256 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information, NS Cert Type -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/server1.cert_type.crt":"cert. version \: 3\nserial number \: 01\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nissued on \: 2011-02-12 14\:44\:06\nexpires on \: 2021-02-12 14\:44\:06\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\ncert. type \: SSL Server\n" - -X509 Certificate information, Key Usage -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/server1.key_usage.crt":"cert. version \: 3\nserial number \: 01\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nissued on \: 2011-02-12 14\:44\:06\nexpires on \: 2021-02-12 14\:44\:06\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\nkey usage \: Digital Signature, Non Repudiation, Key Encipherment\n" - -X509 Certificate information, Key Usage with decipherOnly -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/keyUsage.decipherOnly.crt":"cert. version \: 3\nserial number \: 9B\:13\:CE\:4C\:A5\:6F\:DE\:52\nissuer name \: C=GB, L=Cambridge, O=Default Company Ltd\nsubject name \: C=GB, L=Cambridge, O=Default Company Ltd\nissued on \: 2015-05-12 10\:36\:55\nexpires on \: 2018-05-11 10\:36\:55\nsigned using \: RSA with SHA1\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\nkey usage \: Digital Signature, Non Repudiation, Key Encipherment, Decipher Only\n" - -X509 Certificate information, Subject Alt Name -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_example_multi.crt":"cert. version \: 3\nserial number \: 11\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=www.example.com\nissued on \: 2012-05-10 13\:23\:41\nexpires on \: 2022-05-11 13\:23\:41\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\nsubject alt name \: example.com, example.net, *.example.org\n" - -X509 Certificate information, Subject Alt Name + Key Usage -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/cert_example_multi_nocn.crt":"cert. version \: 3\nserial number \: F7\:C6\:7F\:F8\:E9\:A9\:63\:F9\nissuer name \: C=NL\nsubject name \: C=NL\nissued on \: 2014-01-22 10\:04\:33\nexpires on \: 2024-01-22 10\:04\:33\nsigned using \: RSA with SHA1\nRSA key size \: 1024 bits\nbasic constraints \: CA=false\nsubject alt name \: www.shotokan-braunschweig.de, www.massimo-abate.eu\nkey usage \: Digital Signature, Non Repudiation, Key Encipherment\n" - -X509 Certificate information, Key Usage + Extended Key Usage -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/server1.ext_ku.crt":"cert. version \: 3\nserial number \: 21\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nissued on \: 2014-04-01 14\:44\:43\nexpires on \: 2024-03-29 14\:44\:43\nsigned using \: RSA with SHA-256\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\nkey usage \: Digital Signature, Non Repudiation, Key Encipherment\next key usage \: TLS Web Server Authentication\n" - -X509 Certificate information RSA signed by EC -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/server4.crt":"cert. version \: 3\nserial number \: 08\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-09-24 15\:52\:04\nexpires on \: 2023-09-22 15\:52\:04\nsigned using \: ECDSA with SHA256\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information EC signed by RSA -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -x509_cert_info:"data_files/server3.crt":"cert. version \: 3\nserial number \: 0D\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nissued on \: 2013-08-09 09\:17\:03\nexpires on \: 2023-08-07 09\:17\:03\nsigned using \: RSA with SHA1\nEC key size \: 192 bits\nbasic constraints \: CA=false\n" - -X509 Certificate information Bitstring in subject name -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -x509_cert_info:"data_files/bitstring-in-dn.pem":"cert. version \: 3\nserial number \: 02\nissuer name \: CN=Test CA 01, ST=Ecnivorp, C=XX, emailAddress=tca@example.com, O=Test CA Authority\nsubject name \: C=XX, O=tca, ST=Ecnivorp, OU=TCA, CN=Client, emailAddress=client@example.com, serialNumber=7101012255, uniqueIdentifier=?7101012255\nissued on \: 2015-03-11 12\:06\:51\nexpires on \: 2025-03-08 12\:06\:51\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nbasic constraints \: CA=false\nsubject alt name \: \next key usage \: TLS Web Client Authentication\n" - -X509 certificate v1 with extension -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -x509_cert_info:"data_files/cert_v1_with_ext.crt":"cert. version \: 1\nserial number \: BD\:ED\:44\:C7\:D2\:3E\:C2\:A4\nissuer name \: C=XX, ST=XX, L=XX, O=XX, OU=XX, emailAddress=admin@identity-check.org, CN=identity-check.org\nsubject name \: C=XX, ST=XX, L=XX, O=XX, OU=XX, emailAddress=admin@identity-check.org, CN=identity-check.org\nissued on \: 2013-07-04 16\:17\:02\nexpires on \: 2014-07-04 16\:17\:02\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\nsubject alt name \: identity-check.org, www.identity-check.org\n" - -X509 CRL information #1 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_expired.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-20 10\:24\:19\nnext update \: 2011-02-20 11\:24\:19\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with SHA1\n" - -X509 CRL Information MD2 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_md2.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2009-07-19 19\:56\:37\nnext update \: 2009-09-17 19\:56\:37\nRevoked certificates\:\nserial number\: 01 revocation date\: 2009-02-09 21\:12\:36\nserial number\: 03 revocation date\: 2009-02-09 21\:12\:36\nsigned using \: RSA with MD2\n" - -X509 CRL Information MD4 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_md4.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with MD4\n" - -X509 CRL Information MD5 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_md5.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with MD5\n" - -X509 CRL Information SHA1 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_sha1.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with SHA1\n" - -X509 CRL Information SHA224 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_sha224.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with SHA-224\n" - -X509 CRL Information SHA256 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_sha256.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with SHA-256\n" - -X509 CRL Information SHA384 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_sha384.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with SHA-384\n" - -X509 CRL Information SHA512 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl_sha512.pem":"CRL version \: 1\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2011-02-12 14\:44\:07\nnext update \: 2011-04-13 14\:44\:07\nRevoked certificates\:\nserial number\: 01 revocation date\: 2011-02-12 14\:44\:07\nserial number\: 03 revocation date\: 2011-02-12 14\:44\:07\nsigned using \: RSA with SHA-512\n" - -X509 CRL information RSA-PSS, SHA1 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -mbedtls_x509_crl_info:"data_files/crl-rsa-pss-sha1.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2014-01-20 13\:46\:35\nnext update \: 2024-01-18 13\:46\:35\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nserial number\: 16 revocation date\: 2014-01-20 13\:43\:05\nsigned using \: RSASSA-PSS (SHA1, MGF1-SHA1, 0xEA)\n" - -X509 CRL information RSA-PSS, SHA224 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -mbedtls_x509_crl_info:"data_files/crl-rsa-pss-sha224.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2014-01-20 13\:56\:06\nnext update \: 2024-01-18 13\:56\:06\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nserial number\: 16 revocation date\: 2014-01-20 13\:43\:05\nsigned using \: RSASSA-PSS (SHA224, MGF1-SHA224, 0xE2)\n" - -X509 CRL information RSA-PSS, SHA256 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -mbedtls_x509_crl_info:"data_files/crl-rsa-pss-sha256.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2014-01-20 13\:56\:16\nnext update \: 2024-01-18 13\:56\:16\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nserial number\: 16 revocation date\: 2014-01-20 13\:43\:05\nsigned using \: RSASSA-PSS (SHA256, MGF1-SHA256, 0xDE)\n" - -X509 CRL information RSA-PSS, SHA384 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -mbedtls_x509_crl_info:"data_files/crl-rsa-pss-sha384.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2014-01-20 13\:56\:28\nnext update \: 2024-01-18 13\:56\:28\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nserial number\: 16 revocation date\: 2014-01-20 13\:43\:05\nsigned using \: RSASSA-PSS (SHA384, MGF1-SHA384, 0xCE)\n" - -X509 CRL information RSA-PSS, SHA512 Digest -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -mbedtls_x509_crl_info:"data_files/crl-rsa-pss-sha512.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=PolarSSL Test CA\nthis update \: 2014-01-20 13\:56\:38\nnext update \: 2024-01-18 13\:56\:38\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nserial number\: 16 revocation date\: 2014-01-20 13\:43\:05\nsigned using \: RSASSA-PSS (SHA512, MGF1-SHA512, 0xBE)\n" - -X509 CRL Information EC, SHA1 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl-ec-sha1.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nthis update \: 2013-09-24 16\:31\:08\nnext update \: 2023-09-22 16\:31\:08\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nsigned using \: ECDSA with SHA1\n" - -X509 CRL Information EC, SHA224 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl-ec-sha224.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nthis update \: 2013-09-24 16\:31\:08\nnext update \: 2023-09-22 16\:31\:08\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nsigned using \: ECDSA with SHA224\n" - -X509 CRL Information EC, SHA256 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl-ec-sha256.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nthis update \: 2013-09-24 16\:31\:08\nnext update \: 2023-09-22 16\:31\:08\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nsigned using \: ECDSA with SHA256\n" - -X509 CRL Information EC, SHA384 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl-ec-sha384.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nthis update \: 2013-09-24 16\:31\:08\nnext update \: 2023-09-22 16\:31\:08\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nsigned using \: ECDSA with SHA384\n" - -X509 CRL Information EC, SHA512 Digest -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_crl_info:"data_files/crl-ec-sha512.pem":"CRL version \: 2\nissuer name \: C=NL, O=PolarSSL, CN=Polarssl Test EC CA\nthis update \: 2013-09-24 16\:31\:08\nnext update \: 2023-09-22 16\:31\:08\nRevoked certificates\:\nserial number\: 0A revocation date\: 2013-09-24 16\:28\:38\nsigned using \: ECDSA with SHA512\n" - -X509 CSR Information RSA with MD4 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.md4":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with MD4\nRSA key size \: 2048 bits\n" - -X509 CSR Information RSA with MD5 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.md5":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with MD5\nRSA key size \: 2048 bits\n" - -X509 CSR Information RSA with SHA1 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.sha1":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with SHA1\nRSA key size \: 2048 bits\n" - -X509 CSR Information RSA with SHA224 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.sha224":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with SHA-224\nRSA key size \: 2048 bits\n" - -X509 CSR Information RSA with SHA256 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.sha256":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with SHA-256\nRSA key size \: 2048 bits\n" - -X509 CSR Information RSA with SHA384 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.sha384":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with SHA-384\nRSA key size \: 2048 bits\n" - -X509 CSR Information RSA with SHA512 -depends_on:MBEDTLS_PEM_PARSE_C -mbedtls_x509_csr_info:"data_files/server1.req.sha512":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=PolarSSL Server 1\nsigned using \: RSA with SHA-512\nRSA key size \: 2048 bits\n" - -X509 CSR Information EC with SHA1 -depends_on:MBEDTLS_ECP_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_info:"data_files/server5.req.sha1":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: ECDSA with SHA1\nEC key size \: 256 bits\n" - -X509 CSR Information EC with SHA224 -depends_on:MBEDTLS_ECP_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_info:"data_files/server5.req.sha224":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: ECDSA with SHA224\nEC key size \: 256 bits\n" - -X509 CSR Information EC with SHA256 -depends_on:MBEDTLS_ECP_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_info:"data_files/server5.req.sha256":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: ECDSA with SHA256\nEC key size \: 256 bits\n" - -X509 CSR Information EC with SHA384 -depends_on:MBEDTLS_ECP_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_info:"data_files/server5.req.sha384":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: ECDSA with SHA384\nEC key size \: 256 bits\n" - -X509 CSR Information EC with SHA512 -depends_on:MBEDTLS_ECP_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_info:"data_files/server5.req.sha512":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: ECDSA with SHA512\nEC key size \: 256 bits\n" - -X509 CSR Information RSA-PSS with SHA1 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -mbedtls_x509_csr_info:"data_files/server9.req.sha1":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: RSASSA-PSS (SHA1, MGF1-SHA1, 0x6A)\nRSA key size \: 1024 bits\n" - -X509 CSR Information RSA-PSS with SHA224 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -mbedtls_x509_csr_info:"data_files/server9.req.sha224":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: RSASSA-PSS (SHA224, MGF1-SHA224, 0x62)\nRSA key size \: 1024 bits\n" - -X509 CSR Information RSA-PSS with SHA256 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -mbedtls_x509_csr_info:"data_files/server9.req.sha256":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: RSASSA-PSS (SHA256, MGF1-SHA256, 0x5E)\nRSA key size \: 1024 bits\n" - -X509 CSR Information RSA-PSS with SHA384 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -mbedtls_x509_csr_info:"data_files/server9.req.sha384":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: RSASSA-PSS (SHA384, MGF1-SHA384, 0x4E)\nRSA key size \: 1024 bits\n" - -X509 CSR Information RSA-PSS with SHA512 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -mbedtls_x509_csr_info:"data_files/server9.req.sha512":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: RSASSA-PSS (SHA512, MGF1-SHA512, 0x3E)\nRSA key size \: 1024 bits\n" - -X509 Verify Information: empty -x509_verify_info:0:"":"" - -X509 Verify Information: one issue -x509_verify_info:MBEDTLS_X509_BADCERT_MISSING:"":"Certificate was missing\n" - -X509 Verify Information: two issues -x509_verify_info:MBEDTLS_X509_BADCERT_EXPIRED | MBEDTLS_X509_BADCRL_EXPIRED:"":"The certificate validity has expired\nThe CRL is expired\n" - -X509 Verify Information: two issues, one unknown -x509_verify_info:MBEDTLS_X509_BADCERT_OTHER | 0x80000000:"":"Other reason (can be used by verify callback)\nUnknown reason (this should not happen)\n" - -X509 Verify Information: empty, with prefix -x509_verify_info:0:" ! ":"" - -X509 Verify Information: one issue, with prefix -x509_verify_info:MBEDTLS_X509_BADCERT_MISSING:" ! ":" ! Certificate was missing\n" - -X509 Verify Information: two issues, with prefix -x509_verify_info:MBEDTLS_X509_BADCERT_EXPIRED | MBEDTLS_X509_BADCRL_EXPIRED:" ! ":" ! The certificate validity has expired\n ! The CRL is expired\n" - -X509 Get Distinguished Name #1 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -mbedtls_x509_dn_gets:"data_files/server1.crt":"subject":"C=NL, O=PolarSSL, CN=PolarSSL Server 1" - -X509 Get Distinguished Name #2 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -mbedtls_x509_dn_gets:"data_files/server1.crt":"issuer":"C=NL, O=PolarSSL, CN=PolarSSL Test CA" - -X509 Get Distinguished Name #3 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -mbedtls_x509_dn_gets:"data_files/server2.crt":"subject":"C=NL, O=PolarSSL, CN=localhost" - -X509 Get Distinguished Name #4 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C -mbedtls_x509_dn_gets:"data_files/server2.crt":"issuer":"C=NL, O=PolarSSL, CN=PolarSSL Test CA" - -X509 Time Expired #1 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_past:"data_files/server1.crt":"valid_from":1 - -X509 Time Expired #2 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_past:"data_files/server1.crt":"valid_to":0 - -X509 Time Expired #3 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_past:"data_files/server2.crt":"valid_from":1 - -X509 Time Expired #4 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_past:"data_files/server2.crt":"valid_to":0 - -X509 Time Expired #5 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_past:"data_files/test-ca.crt":"valid_from":1 - -X509 Time Expired #6 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_past:"data_files/test-ca.crt":"valid_to":0 - -X509 Time Future #1 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_future:"data_files/server5.crt":"valid_from":0 - -X509 Time Future #2 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_future:"data_files/server5.crt":"valid_to":1 - -X509 Time Future #3 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_future:"data_files/server5-future.crt":"valid_from":1 - -X509 Time Future #4 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_future:"data_files/server5-future.crt":"valid_to":1 - -X509 Time Future #5 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_future:"data_files/test-ca2.crt":"valid_from":0 - -X509 Time Future #6 -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_HAVE_TIME_DATE -mbedtls_x509_time_is_future:"data_files/test-ca2.crt":"valid_to":1 - -X509 Certificate verification #1 (Revoked Cert, Expired CRL, no CN) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCRL_EXPIRED:"NULL" - -X509 Certificate verification #1a (Revoked Cert, Future CRL, no CN) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server6.crt":"data_files/test-ca2.crt":"data_files/crl-future.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCRL_FUTURE:"NULL" - -X509 Certificate verification #2 (Revoked Cert, Expired CRL) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":"PolarSSL Server 1":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCRL_EXPIRED:"NULL" - -X509 Certificate verification #2a (Revoked Cert, Future CRL) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server6.crt":"data_files/test-ca2.crt":"data_files/crl-future.pem":"localhost":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCRL_FUTURE:"NULL" - -X509 Certificate verification #3 (Revoked Cert, Future CRL, CN Mismatch) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":"PolarSSL Wrong CN":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCRL_EXPIRED | MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #3a (Revoked Cert, Expired CRL, CN Mismatch) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server6.crt":"data_files/test-ca2.crt":"data_files/crl-future.pem":"Wrong CN":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCRL_FUTURE | MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #4 (Valid Cert, Expired CRL) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server2.crt":"data_files/test-ca.crt":"data_files/crl_expired.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCRL_EXPIRED:"NULL" - -X509 Certificate verification #4a (Revoked Cert, Future CRL) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server5.crt":"data_files/test-ca2.crt":"data_files/crl-future.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCRL_FUTURE:"NULL" - -X509 Certificate verification #5 (Revoked Cert) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #6 (Revoked Cert) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl.pem":"PolarSSL Server 1":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #7 (Revoked Cert, CN Mismatch) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server1.crt":"data_files/test-ca.crt":"data_files/crl.pem":"PolarSSL Wrong CN":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED | MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #8 (Valid Cert) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server5.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha1.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #8a (Expired Cert) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server5-expired.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha1.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_EXPIRED:"NULL" - -X509 Certificate verification #8b (Future Cert) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server5-future.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha1.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_FUTURE:"NULL" - -X509 Certificate verification #9 (Not trusted Cert) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server2.crt":"data_files/server1.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #10 (Not trusted Cert, Expired CRL) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server2.crt":"data_files/server1.crt":"data_files/crl_expired.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #12 (Valid Cert MD4 Digest) -depends_on:MBEDTLS_MD4_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_md4.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_BAD_MD:"NULL" - -X509 Certificate verification #13 (Valid Cert MD5 Digest) -depends_on:MBEDTLS_MD5_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_md5.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_BAD_MD:"NULL" - -X509 Certificate verification #14 (Valid Cert SHA1 Digest) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_sha1.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #15 (Valid Cert SHA224 Digest) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_sha224.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #16 (Valid Cert SHA256 Digest) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_sha256.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #17 (Valid Cert SHA384 Digest) -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_sha384.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #18 (Valid Cert SHA512 Digest) -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_sha512.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #19 (Valid Cert, denying callback) -depends_on:MBEDTLS_SHA512_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_sha512.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_OTHER:"verify_none" - -X509 Certificate verification #19 (Not trusted Cert, allowing callback) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server2.crt":"data_files/server1.crt":"data_files/crl_expired.pem":"NULL":0:0:"verify_all" - -X509 Certificate verification #21 (domain matching wildcard certificate, case insensitive) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_wildcard.crt":"data_files/test-ca.crt":"data_files/crl.pem":"mail.ExAmPlE.com":0:0:"NULL" - -X509 Certificate verification #22 (domain not matching wildcard certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_wildcard.crt":"data_files/test-ca.crt":"data_files/crl.pem":"mail.example.net":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #23 (domain not matching wildcard certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_wildcard.crt":"data_files/test-ca.crt":"data_files/crl.pem":"example.com":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #24 (domain matching CN of multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"www.example.com":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #25 (domain matching multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"example.net":0:0:"NULL" - -X509 Certificate verification #26 (domain not matching multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"www.example.net":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #27 (domain not matching multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"xample.net":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #27 (domain not matching multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"bexample.net":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #28 (domain not matching wildcard in multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"example.org":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH:"NULL" - -X509 Certificate verification #29 (domain matching wildcard in multi certificate) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi.crt":"data_files/test-ca.crt":"data_files/crl.pem":"mail.example.org":0:0:"NULL" - -X509 Certificate verification #30 (domain matching multi certificate without CN) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi_nocn.crt":"data_files/test-ca.crt":"data_files/crl.pem":"www.shotokan-braunschweig.de":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #31 (domain not matching multi certificate without CN) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/cert_example_multi_nocn.crt":"data_files/test-ca.crt":"data_files/crl.pem":"www.example.net":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_CN_MISMATCH + MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #32 (Valid, EC cert, RSA CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA1_C -x509_verify:"data_files/server3.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #33 (Valid, RSA cert, EC CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server4.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #34 (Valid, EC cert, EC CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #35 (Revoked, EC CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server6.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #36 (Valid, EC CA, SHA1 Digest) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA1_C -x509_verify:"data_files/server5-sha1.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #37 (Valid, EC CA, SHA224 Digest) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5-sha224.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #38 (Valid, EC CA, SHA384 Digest) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_SHA512_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5-sha384.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #39 (Valid, EC CA, SHA512 Digest) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_SHA256_C:MBEDTLS_SHA512_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5-sha512.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #40 (Valid, depth 0, RSA, CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C:MBEDTLS_SHA1_C -x509_verify:"data_files/test-ca.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #41 (Valid, depth 0, EC, CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_SHA256_C -x509_verify:"data_files/test-ca2.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #42 (Depth 0, not CA, RSA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server2.crt":"data_files/server2.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #43 (Depth 0, not CA, EC) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/server5.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #44 (Corrupted signature, EC) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5-badsign.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #45 (Corrupted signature, RSA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server2-badsign.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #46 (Valid, depth 2, EC-RSA-EC) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify:"data_files/server7_int-ca.crt":"data_files/test-ca2.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #47 (Untrusted, depth 2, EC-RSA-EC) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server7_int-ca.crt":"data_files/test-ca.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #48 (Missing intermediate CA, EC-RSA-EC) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_PKCS1_V15 -x509_verify:"data_files/server7.crt":"data_files/test-ca.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #49 (Valid, depth 2, RSA-EC-RSA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify:"data_files/server8_int-ca2.crt":"data_files/test-ca.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #50 (Valid, multiple CAs) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server2.crt":"data_files/test-ca_cat12.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #51 (Valid, multiple CAs, reverse order) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server2.crt":"data_files/test-ca_cat21.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #52 (CA keyUsage valid) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/test-ca2.ku-crt_crl.crt":"data_files/crl-ec-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #53 (CA keyUsage missing cRLSign) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_X509_CHECK_KEY_USAGE:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/test-ca2.ku-crt.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCRL_NOT_TRUSTED:"NULL" - -X509 Certificate verification #54 (CA keyUsage missing cRLSign, no CRL) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/test-ca2.ku-crt.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #55 (CA keyUsage missing keyCertSign) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_X509_CHECK_KEY_USAGE:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/test-ca2.ku-crl.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #56 (CA keyUsage plain wrong) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_X509_CHECK_KEY_USAGE:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server5.crt":"data_files/test-ca2.ku-ds.crt":"data_files/crl-ec-sha256.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #57 (Valid, RSASSA-PSS, SHA-1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_verify:"data_files/server9.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #58 (Valid, RSASSA-PSS, SHA-224) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -x509_verify:"data_files/server9-sha224.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha224.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #59 (Valid, RSASSA-PSS, SHA-256) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -x509_verify:"data_files/server9-sha256.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha256.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #60 (Valid, RSASSA-PSS, SHA-384) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -x509_verify:"data_files/server9-sha384.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha384.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #61 (Valid, RSASSA-PSS, SHA-512) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA512_C -x509_verify:"data_files/server9-sha512.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha512.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #62 (Revoked, RSASSA-PSS, SHA-1) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_verify:"data_files/server9.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha1.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #63 (Revoked, RSASSA-PSS, SHA-1, CRL badsign) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_verify:"data_files/server9.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha1-badsign.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCRL_NOT_TRUSTED:"NULL" - -X509 Certificate verification #64 (Valid, RSASSA-PSS, SHA-1, not top) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_verify:"data_files/server9-with-ca.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #65 (RSASSA-PSS, SHA1, bad cert signature) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_verify:"data_files/server9-badsign.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #66 (RSASSA-PSS, SHA1, no RSA CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify:"data_files/server9.crt":"data_files/test-ca2.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #67 (Valid, RSASSA-PSS, all defaults) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA1_C -x509_verify:"data_files/server9-defaults.crt":"data_files/test-ca.crt":"data_files/crl-rsa-pss-sha1.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #68 (RSASSA-PSS, wrong salt_len) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -x509_verify:"data_files/server9-bad-saltlen.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #69 (RSASSA-PSS, wrong mgf_hash) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:MBEDTLS_SHA256_C -x509_verify:"data_files/server9-bad-mgfhash.crt":"data_files/test-ca.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #70 (v1 trusted CA) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify:"data_files/server1-v1.crt":"data_files/test-ca-v1.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #71 (v1 trusted CA, other) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify:"data_files/server2-v1.crt":"data_files/server1-v1.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #72 (v1 chain) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify:"data_files/server2-v1-chain.crt":"data_files/test-ca-v1.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #73 (selfsigned trusted without CA bit) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_verify:"data_files/server5-selfsigned.crt":"data_files/server5-selfsigned.crt":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #74 (signed by selfsigned trusted without CA bit) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_verify:"data_files/server6-ss-child.crt":"data_files/server5-selfsigned.crt":"data_files/crl.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_NOT_TRUSTED:"NULL" - -X509 Certificate verification #75 (encoding mismatch) -depends_on:MBEDTLS_PEM_PARSE_C -x509_verify:"data_files/enco-cert-utf8str.pem":"data_files/enco-ca-prstr.pem":"data_files/crl.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #76 (multiple CRLs, not revoked) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -x509_verify:"data_files/server5.crt":"data_files/test-ca_cat12.crt":"data_files/crl_cat_ec-rsa.pem":"NULL":0:0:"NULL" - -X509 Certificate verification #77 (multiple CRLs, revoked) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -x509_verify:"data_files/server6.crt":"data_files/test-ca_cat12.crt":"data_files/crl_cat_ec-rsa.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #78 (multiple CRLs, revoked by second) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -x509_verify:"data_files/server6.crt":"data_files/test-ca_cat12.crt":"data_files/crl_cat_rsa-ec.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #79 (multiple CRLs, revoked by future) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -x509_verify:"data_files/server6.crt":"data_files/test-ca_cat12.crt":"data_files/crl_cat_ecfut-rsa.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED|MBEDTLS_X509_BADCRL_FUTURE:"NULL" - -X509 Certificate verification #80 (multiple CRLs, first future, revoked by second) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -x509_verify:"data_files/server1.crt":"data_files/test-ca_cat12.crt":"data_files/crl_cat_ecfut-rsa.pem":"NULL":MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:MBEDTLS_X509_BADCERT_REVOKED:"NULL" - -X509 Certificate verification #81 (multiple CRLs, none relevant) -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -x509_verify:"data_files/enco-cert-utf8str.pem":"data_files/enco-ca-prstr.pem":"data_files/crl_cat_rsa-ec.pem":"NULL":0:0:"NULL" - -X509 Certificate verification callback: trusted EE cert -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_verify_callback:"data_files/server5-selfsigned.crt":"data_files/server5-selfsigned.crt":0:"depth 0 - serial 53\:A2\:CB\:4B\:12\:4E\:AD\:83\:7D\:A8\:94\:B2 - subject CN=selfsigned, OU=testing, O=PolarSSL, C=NL\n" - -X509 Certificate verification callback: simple -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_verify_callback:"data_files/server1.crt":"data_files/test-ca.crt":0:"depth 1 - serial 00 - subject C=NL, O=PolarSSL, CN=PolarSSL Test CA\ndepth 0 - serial 01 - subject C=NL, O=PolarSSL, CN=PolarSSL Server 1\n" - -X509 Certificate verification callback: two trusted roots -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify_callback:"data_files/server1.crt":"data_files/test-ca_cat12.crt":0:"depth 1 - serial 00 - subject C=NL, O=PolarSSL, CN=PolarSSL Test CA\ndepth 0 - serial 01 - subject C=NL, O=PolarSSL, CN=PolarSSL Server 1\n" - -X509 Certificate verification callback: two trusted roots, reversed order -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify_callback:"data_files/server1.crt":"data_files/test-ca_cat21.crt":0:"depth 1 - serial 00 - subject C=NL, O=PolarSSL, CN=PolarSSL Test CA\ndepth 0 - serial 01 - subject C=NL, O=PolarSSL, CN=PolarSSL Server 1\n" - -X509 Certificate verification callback: root included -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -x509_verify_callback:"data_files/server1_ca.crt":"data_files/test-ca_cat21.crt":0:"depth 1 - serial 00 - subject C=NL, O=PolarSSL, CN=PolarSSL Test CA\ndepth 0 - serial 01 - subject C=NL, O=PolarSSL, CN=PolarSSL Server 1\n" - -X509 Certificate verification callback: intermediate ca -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server7_int-ca.crt":"data_files/test-ca_cat12.crt":0:"depth 2 - serial C1\:43\:E2\:7E\:62\:43\:CC\:E8 - subject C=NL, O=PolarSSL, CN=Polarssl Test EC CA\ndepth 1 - serial 0E - subject C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA\ndepth 0 - serial 10 - subject C=NL, O=PolarSSL, CN=localhost\n" - -X509 Certificate verification callback: intermediate ca, root included -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server7_int-ca_ca2.crt":"data_files/test-ca_cat12.crt":0:"depth 2 - serial C1\:43\:E2\:7E\:62\:43\:CC\:E8 - subject C=NL, O=PolarSSL, CN=Polarssl Test EC CA\ndepth 1 - serial 0E - subject C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA\ndepth 0 - serial 10 - subject C=NL, O=PolarSSL, CN=localhost\n" - -X509 Certificate verification callback: intermediate ca trusted -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server7_int-ca_ca2.crt":"data_files/test-int-ca.crt":0:"depth 1 - serial 0E - subject C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA\ndepth 0 - serial 10 - subject C=NL, O=PolarSSL, CN=localhost\n" - -X509 Certificate verification callback: two intermediates -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server10_int3_int-ca2.crt":"data_files/test-ca_cat21.crt":0:"depth 3 - serial 00 - subject C=NL, O=PolarSSL, CN=PolarSSL Test CA\ndepth 2 - serial 0F - subject C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA\ndepth 1 - serial 4D - subject C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3\ndepth 0 - serial 4B - subject CN=localhost\n" - -X509 Certificate verification callback: two intermediates, root included -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server10_int3_int-ca2_ca.crt":"data_files/test-ca_cat21.crt":0:"depth 3 - serial 00 - subject C=NL, O=PolarSSL, CN=PolarSSL Test CA\ndepth 2 - serial 0F - subject C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA\ndepth 1 - serial 4D - subject C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3\ndepth 0 - serial 4B - subject CN=localhost\n" - -X509 Certificate verification callback: two intermediates, top int trusted -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server10_int3_int-ca2.crt":"data_files/test-int-ca2.crt":0:"depth 2 - serial 0F - subject C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA\ndepth 1 - serial 4D - subject C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3\ndepth 0 - serial 4B - subject CN=localhost\n" - -X509 Certificate verification callback: two intermediates, low int trusted -depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_ECDSA_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED:MBEDTLS_ECP_DP_SECP384R1_ENABLED:MBEDTLS_PKCS1_V15:MBEDTLS_SHA256_C -x509_verify_callback:"data_files/server10_int3_int-ca2_ca.crt":"data_files/test-int-ca3.crt":0:"depth 1 - serial 4D - subject C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3\ndepth 0 - serial 4B - subject CN=localhost\n" - -X509 Parse Selftest -depends_on:MBEDTLS_SHA1_C:MBEDTLS_PEM_PARSE_C:MBEDTLS_CERTS_C -x509_selftest: - -X509 Certificate ASN1 (Incorrect first tag) -x509parse_crt:"":"":MBEDTLS_ERR_X509_INVALID_FORMAT - -X509 Certificate ASN1 (Correct first tag, data length does not match) -x509parse_crt:"300000":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (Correct first tag, no more data) -x509parse_crt:"3000":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (Correct first tag, length data incorrect) -x509parse_crt:"30023085":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_INVALID_LENGTH - -X509 Certificate ASN1 (Correct first tag, length data incomplete) -x509parse_crt:"30023083":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (Correct first tag, length data incomplete) -x509parse_crt:"30023081":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (Correct first tag, length data incomplete) -x509parse_crt:"3003308200":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (Correct first tag, second tag no TBSCertificate) -x509parse_crt:"300100":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, no version tag, serial missing) -x509parse_crt:"3003300100":"":MBEDTLS_ERR_X509_INVALID_SERIAL + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, invalid version tag) -x509parse_crt:"30053003a00101":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, valid version tag, no length) -x509parse_crt:"30053003a00102":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, valid version tag, invalid length) -x509parse_crt:"30163014a012021000000000000000000000000000000000":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_INVALID_LENGTH - -X509 Certificate ASN1 (TBSCertificate, valid version tag, no serial) -x509parse_crt:"30073005a003020104":"":MBEDTLS_ERR_X509_INVALID_SERIAL + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, invalid length version tag) -x509parse_crt:"30083006a00402010400":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate, incorrect serial tag) -x509parse_crt:"30083006a00302010400":"":MBEDTLS_ERR_X509_INVALID_SERIAL + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, incorrect serial length) -x509parse_crt:"30083006a00302010482":"":MBEDTLS_ERR_X509_INVALID_SERIAL + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, correct serial, no alg) -x509parse_crt:"300d300ba0030201048204deadbeef":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, correct serial, no alg oid) -x509parse_crt:"300e300ca0030201048204deadbeef00":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, alg oid no data in sequence) -x509parse_crt:"300f300da0030201048204deadbeef3000":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, alg with params) -x509parse_crt:"30163014a0030201048204deadbeef30070604cafed00d01":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, correct alg data, no params unknown version) -x509parse_crt:"30153013a0030201048204deadbeef30060604cafed00d":"":MBEDTLS_ERR_X509_UNKNOWN_VERSION - -X509 Certificate ASN1 (TBSCertificate, correct alg data, unknown version) -x509parse_crt:"30173015a0030201048204deadbeef30080604cafed00d0500":"":MBEDTLS_ERR_X509_UNKNOWN_VERSION - -X509 Certificate ASN1 (TBSCertificate, correct alg data, length mismatch) -x509parse_crt:"30183016a0030201048204deadbeef30090604cafed00d050000":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate, correct alg, unknown alg_id) -x509parse_crt:"30173015a0030201028204deadbeef30080604cafed00d0500":"":MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG + MBEDTLS_ERR_OID_NOT_FOUND - -X509 Certificate ASN1 (TBSCertificate, correct alg, specific alg_id) -x509parse_crt:"301c301aa0030201028204deadbeef300d06092a864886f70d0101020500":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, correct alg, unknown specific alg_id) -x509parse_crt:"301c301aa0030201028204deadbeef300d06092a864886f70d0101010500":"":MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG + MBEDTLS_ERR_OID_NOT_FOUND - -X509 Certificate ASN1 (TBSCertificate, correct alg, bad RSASSA-PSS params) -depends_on:MBEDTLS_X509_RSASSA_PSS_SUPPORT -x509parse_crt:"30193017A003020102020118300D06092A864886F70D01010A3100":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, issuer no set data) -x509parse_crt:"301e301ca0030201028204deadbeef300d06092a864886f70d01010205003000":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, issuer no inner seq data) -x509parse_crt:"3020301ea0030201028204deadbeef300d06092a864886f70d010102050030023100":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, issuer no inner set data) -x509parse_crt:"30223020a0030201028204deadbeef300d06092a864886f70d0101020500300431023000":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, issuer two inner set datas) -x509parse_crt:"30243022a0030201028204deadbeef300d06092a864886f70d01010205003006310430003000":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, issuer no oid data) -x509parse_crt:"30243022a0030201028204deadbeef300d06092a864886f70d01010205003006310430020600":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, issuer invalid tag) -x509parse_crt:"302a3028a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600060454657374":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, issuer, no string data) -x509parse_crt:"30253023a0030201028204deadbeef300d06092a864886f70d0101020500300731053003060013":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, issuer, no full following string) -x509parse_crt:"302b3029a0030201028204deadbeef300d06092a864886f70d0101020500300d310b3009060013045465737400":"":MBEDTLS_ERR_X509_INVALID_NAME+MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, valid issuer, no validity) -x509parse_crt:"302a3028a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374":"":MBEDTLS_ERR_X509_INVALID_DATE + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, too much date data) -x509parse_crt:"30493047a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301d170c303930313031303030303030170c30393132333132333539353900":"":MBEDTLS_ERR_X509_INVALID_DATE + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate, invalid from date) -x509parse_crt:"30483046a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303000000000170c303931323331323300000000":"":MBEDTLS_ERR_X509_INVALID_DATE - -X509 Certificate ASN1 (TBSCertificate, invalid to date) -x509parse_crt:"30483046a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323300000000":"":MBEDTLS_ERR_X509_INVALID_DATE - -X509 Certificate ASN1 (TBSCertificate, valid validity, no subject) -x509parse_crt:"30493047a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c30393132333132333539353930":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, valid subject, no pubkeyinfo) -x509parse_crt:"30563054a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, pubkey, no alg) -x509parse_crt:"30583056a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a300806001304546573743000":"":MBEDTLS_ERR_PK_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, valid subject, unknown pk alg) -x509parse_crt:"30673065a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374300f300d06092A864886F70D0101000500":"":MBEDTLS_ERR_PK_UNKNOWN_PK_ALG - -X509 Certificate ASN1 (TBSCertificate, pubkey, no bitstring) -x509parse_crt:"30673065a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374300f300d06092A864886F70D0101010500":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate, pubkey, no bitstring data) -x509parse_crt:"30693067a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a300806001304546573743011300d06092A864886F70D01010105000300":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_INVALID_DATA - -X509 Certificate ASN1 (TBSCertificate, pubkey, invalid bitstring start) -x509parse_crt:"306a3068a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a300806001304546573743012300d06092A864886F70D0101010500030101":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_INVALID_DATA - -X509 Certificate ASN1 (TBSCertificate, pubkey, invalid internal bitstring length) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"306d306ba0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a300806001304546573743015300d06092A864886F70D0101010500030400300000":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate, pubkey, invalid internal bitstring tag) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"306d306ba0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a300806001304546573743015300d06092A864886F70D0101010500030400310000":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, pubkey, invalid mbedtls_mpi) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30743072a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374301c300d06092A864886F70D0101010500030b0030080202ffff0302ffff":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate, pubkey, total length mismatch) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30753073a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374301d300d06092A864886F70D0101010500030b0030080202ffff0202ffff00":"":MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate, pubkey, check failed) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30743072a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374301c300d06092A864886F70D0101010500030b0030080202ffff0202ffff":"":MBEDTLS_ERR_PK_INVALID_PUBKEY - -X509 Certificate ASN1 (TBSCertificate, pubkey, check failed, expanded length notation) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308183308180a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210fffffffffffffffffffffffffffffffe0202ffff":"":MBEDTLS_ERR_PK_INVALID_PUBKEY - -X509 Certificate ASN1 (TBSCertificate v3, Optional UIDs, Extensions not present) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308183308180a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, issuerID wrong tag) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308184308181a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff00":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate v3, UIDs, no ext) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308189308186a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bb":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, UIDs, invalid length) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308189308186a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa185aaa201bb":"":MBEDTLS_ERR_ASN1_INVALID_LENGTH - -X509 Certificate ASN1 (TBSCertificate v3, ext empty) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30818b308188a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba300":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, ext length mismatch) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30818e30818ba0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba303300000":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (TBSCertificate v3, first ext invalid) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30818f30818ca0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba30330023000":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, first ext invalid tag) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30819030818da0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba3043002310000":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate v3, ext BasicContraint tag, bool len missing) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308198308195a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba30c300a30060603551d1301010100":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, ext BasicContraint tag, data missing) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308198308195a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba30c300a30080603551d1301010100":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, ext BasicContraint tag, no octet present) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308198308195a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba30d300b30090603551d1301010100":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate v3, ext BasicContraint tag, octet data missing) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30819c308199a0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba311300f300d0603551d130101010403300100":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (TBSCertificate v3, ext BasicContraint tag, no pathlen) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30819f30819ca0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba314301230100603551d130101010406300402010102":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (TBSCertificate v3, ext BasicContraint tag, octet len mismatch) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"3081a230819fa0030201028204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffffa101aaa201bba317301530130603551d130101010409300702010102010100":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (ExtKeyUsage, bad second tag) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509parse_crt:"3081de3081dba003020102020900ebdbcd14105e1839300906072a8648ce3d0401300f310d300b0603550403130454657374301e170d3134313131313230353935345a170d3234313130383230353935345a300f310d300b06035504031304546573743059301306072a8648ce3d020106082a8648ce3d0301070342000437cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f768225962924ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edffa321301f301d0603551d250416301406082b0601050507030107082b06010505070302":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 Certificate ASN1 (SubjectAltName repeated) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509parse_crt:"3081fd3081faa003020102020900a8b31ff37d09a37f300906072a8648ce3d0401300f310d300b0603550403130454657374301e170d3134313131313231333731365a170d3234313130383231333731365a300f310d300b06035504031304546573743059301306072a8648ce3d020106082a8648ce3d0301070342000437cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f768225962924ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edffa321301f301d0603551d11041630148208666f6f2e7465737482086261722e74657374301d0603551d11041630148208666f6f2e7465737482086261722e74657374":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS - -X509 Certificate ASN1 (ExtKeyUsage repeated) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509parse_crt:"3081fd3081faa003020102020900ebdbcd14105e1839300906072a8648ce3d0401300f310d300b0603550403130454657374301e170d3134313131313230353935345a170d3234313130383230353935345a300f310d300b06035504031304546573743059301306072a8648ce3d020106082a8648ce3d0301070342000437cc56d976091e5a723ec7592dff206eee7cf9069174d0ad14b5f768225962924ee500d82311ffea2fd2345d5d16bd8a88c26b770d55cd8a2a0efa01c8b4edffa340303e301d0603551d250416301406082b0601050507030106082b06010505070302301d0603551d250416301406082b0601050507030106082b06010505070302":"":MBEDTLS_ERR_X509_INVALID_EXTENSIONS - -X509 Certificate ASN1 (correct pubkey, no sig_alg) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308183308180a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (sig_alg mismatch) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308192308180a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0102020500":"":MBEDTLS_ERR_X509_SIG_MISMATCH - -X509 Certificate ASN1 (sig_alg, no sig) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308192308180a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500":"":MBEDTLS_ERR_X509_INVALID_SIGNATURE + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 Certificate ASN1 (signature, invalid sig data) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308195308180a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030100":"":MBEDTLS_ERR_X509_INVALID_SIGNATURE + MBEDTLS_ERR_ASN1_INVALID_DATA - -X509 Certificate ASN1 (signature, data left) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308197308180a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff00":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 Certificate ASN1 (correct) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308196308180a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: ?\?=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (GeneralizedTime instead of UTCTime) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308198308182a0030201008204deadbeef300d06092a864886f70d0101020500300c310a30080600130454657374301e180e3230313030313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: ?\?=Test\nsubject name \: ?\?=Test\nissued on \: 2010-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with X520 CN) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b0603550403130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: CN=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with X520 C) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b0603550406130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: C=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with X520 L) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b0603550407130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: L=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with X520 ST) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b0603550408130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: ST=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with X520 O) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b060355040a130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: O=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with X520 OU) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b060355040b130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: OU=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with unknown X520 part) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"308199308183a0030201008204deadbeef300d06092a864886f70d0101020500300f310d300b06035504de130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: ?\?=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with composite RDN) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"3082029f30820208a00302010202044c20e3bd300d06092a864886f70d01010505003056310b3009060355040613025553310b300906035504080c0243413121301f060355040a0c18496e7465726e6574205769646769747320507479204c74643117301506035504030c0e4672616e6b656e63657274204341301e170d3133303830323135313433375a170d3135303831373035353433315a3081d1310b3009060355040613025553311330110603550408130a57617368696e67746f6e31133011060b2b0601040182373c0201031302555331193017060b2b0601040182373c020102130844656c6177617265311a3018060355040a1311417574686f72697a652e4e6574204c4c43311d301b060355040f131450726976617465204f7267616e697a6174696f6e312a300e06035504051307343336393139313018060355040313117777772e617574686f72697a652e6e6574311630140603550407130d53616e204672616e636973636f30819f300d06092a864886f70d010101050003818d0030818902818100d885c62e209b6ac005c64f0bcfdaac1f2b67a18802f75b08851ff933deed888b7b68a62fcabdb21d4a8914becfeaaa1b7e08a09ffaf9916563586dc95e2877262b0b5f5ec27eb4d754aa6facd1d39d25b38a2372891bacdd3e919f791ed25704e8920e380e5623a38e6a23935978a3aec7a8e761e211d42effa2713e44e7de0b0203010001300d06092a864886f70d010105050003818100092f7424d3f6da4b8553829d958ed1980b9270b42c0d3d5833509a28c66bb207df9f3c51d122065e00b87c08c2730d2745fe1c279d16fae4d53b4bf5bdfa3631fceeb2e772b6b08a3eca5a2e2c687aefd23b4b73bf77ac6099711342cf070b35c6f61333a7cbf613d8dd4bd73e9df34bcd4284b0b4df57c36c450613f11e5dac":"cert. version \: 3\nserial number \: 4C\:20\:E3\:BD\nissuer name \: C=US, ST=CA, O=Internet Widgits Pty Ltd, CN=Frankencert CA\nsubject name \: C=US, ST=Washington, ??=US, ??=Delaware, O=Authorize.Net LLC, ??=Private Organization, serialNumber=4369191 + CN=www.authorize.net, L=San Francisco\nissued on \: 2013-08-02 15\:14\:37\nexpires on \: 2015-08-17 05\:54\:31\nsigned using \: RSA with SHA1\nRSA key size \: 1024 bits\n":0 - -X509 Certificate ASN1 (Name with PKCS9 email) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30819f308189a0030201008204deadbeef300d06092a864886f70d010102050030153113301106092a864886f70d010901130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: emailAddress=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (Name with unknown PKCS9 part) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"30819f308189a0030201008204deadbeef300d06092a864886f70d010102050030153113301106092a864886f70d0109ab130454657374301c170c303930313031303030303030170c303931323331323335393539300c310a30080600130454657374302a300d06092A864886F70D010101050003190030160210ffffffffffffffffffffffffffffffff0202ffff300d06092a864886f70d0101020500030200ff":"cert. version \: 1\nserial number \: DE\:AD\:BE\:EF\nissuer name \: ?\?=Test\nsubject name \: ?\?=Test\nissued on \: 2009-01-01 00\:00\:00\nexpires on \: 2009-12-31 23\:59\:59\nsigned using \: RSA with MD2\nRSA key size \: 128 bits\n":0 - -X509 Certificate ASN1 (ECDSA signature, RSA key) -depends_on:MBEDTLS_RSA_C -x509parse_crt:"3081E630819E020103300906072A8648CE3D0401300F310D300B0603550403130454657374301E170D3133303731303039343631385A170D3233303730383039343631385A300F310D300B0603550403130454657374304C300D06092A864886F70D0101010500033B003038023100E8F546061D3B49BC2F6B7524B7EA4D73A8D5293EE8C64D9407B70B5D16BAEBC32B8205591EAB4E1EB57E9241883701250203010001300906072A8648CE3D0401033800303502186E18209AFBED14A0D9A796EFCAD68891E3CCD5F75815C833021900E92B4FD460B1994693243B9FFAD54729DE865381BDA41D25":"cert. version \: 1\nserial number \: 03\nissuer name \: CN=Test\nsubject name \: CN=Test\nissued on \: 2013-07-10 09\:46\:18\nexpires on \: 2023-07-08 09\:46\:18\nsigned using \: ECDSA with SHA1\nRSA key size \: 384 bits\n":0 - -X509 Certificate ASN1 (ECDSA signature, EC key) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -x509parse_crt:"3081EB3081A3020900F41534662EC7E912300906072A8648CE3D0401300F310D300B0603550403130454657374301E170D3133303731303039343031395A170D3233303730383039343031395A300F310D300B06035504031304546573743049301306072A8648CE3D020106082A8648CE3D030101033200042137969FABD4E370624A0E1A33E379CAB950CCE00EF8C3C3E2ADAEB7271C8F07659D65D3D777DCF21614363AE4B6E617300906072A8648CE3D04010338003035021858CC0F957946FE6A303D92885A456AA74C743C7B708CBD37021900FE293CAC21AF352D16B82EB8EA54E9410B3ABAADD9F05DD6":"cert. version \: 1\nserial number \: F4\:15\:34\:66\:2E\:C7\:E9\:12\nissuer name \: CN=Test\nsubject name \: CN=Test\nissued on \: 2013-07-10 09\:40\:19\nexpires on \: 2023-07-08 09\:40\:19\nsigned using \: ECDSA with SHA1\nEC key size \: 192 bits\n":0 - -X509 Certificate ASN1 (RSA signature, EC key) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP192R1_ENABLED -x509parse_crt:"3081E430819F020104300D06092A864886F70D0101050500300F310D300B0603550403130454657374301E170D3133303731303135303233375A170D3233303730383135303233375A300F310D300B06035504031304546573743049301306072A8648CE3D020106082A8648CE3D03010103320004E962551A325B21B50CF6B990E33D4318FD16677130726357A196E3EFE7107BCB6BDC6D9DB2A4DF7C964ACFE81798433D300D06092A864886F70D01010505000331001A6C18CD1E457474B2D3912743F44B571341A7859A0122774A8E19A671680878936949F904C9255BDD6FFFDB33A7E6D8":"cert. version \: 1\nserial number \: 04\nissuer name \: CN=Test\nsubject name \: CN=Test\nissued on \: 2013-07-10 15\:02\:37\nexpires on \: 2023-07-08 15\:02\:37\nsigned using \: RSA with SHA1\nEC key size \: 192 bits\n":0 - -X509 CRL ASN1 (Incorrect first tag) -x509parse_crl:"":"":MBEDTLS_ERR_X509_INVALID_FORMAT - -X509 CRL ASN1 (Correct first tag, data length does not match) -x509parse_crl:"300000":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 CRL ASN1 (TBSCertList, tag missing) -x509parse_crl:"3000":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, version tag len missing) -x509parse_crl:"3003300102":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, version correct, alg missing) -x509parse_crl:"30053003020100":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, alg correct, incorrect version) -x509parse_crl:"300b3009020102300406000500":"":MBEDTLS_ERR_X509_UNKNOWN_VERSION - -X509 CRL ASN1 (TBSCertList, correct version, sig_oid1 unknown) -x509parse_crl:"300b3009020100300406000500":"":MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG - -X509 CRL ASN1 (TBSCertList, sig_oid1 id unknown) -x509parse_crl:"30143012020100300d06092a864886f70d01010f0500":"":MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG - -X509 CRL ASN1 (TBSCertList, sig_oid1 correct, issuer missing) -x509parse_crl:"30143012020100300d06092a864886f70d01010e0500":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, issuer set missing) -x509parse_crl:"30163014020100300d06092a864886f70d01010e05003000":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, correct issuer, thisUpdate missing) -x509parse_crl:"30253023020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344":"":MBEDTLS_ERR_X509_INVALID_DATE + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, correct thisUpdate, nextUpdate missing, entries length missing) -x509parse_crl:"30343032020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c30393031303130303030303030":"":MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CRL ASN1 (TBSCertList, entries present, invalid sig_alg) -x509parse_crl:"304a3047020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c303930313031303030303030301430128202abcd170c30383132333132333539353900":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CRL ASN1 (TBSCertList, entries present, date in entry invalid) -x509parse_crl:"304a3047020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c303930313031303030303030301430128202abcd190c30383132333132333539353900":"":MBEDTLS_ERR_X509_INVALID_DATE + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CRL ASN1 (TBSCertList, sig_alg present, sig_alg does not match) -x509parse_crl:"30583047020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c303930313031303030303030301430128202abcd170c303831323331323335393539300d06092a864886f70d01010d0500":"":MBEDTLS_ERR_X509_SIG_MISMATCH - -X509 CRL ASN1 (TBSCertList, sig present, len mismatch) -x509parse_crl:"305d3047020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c303930313031303030303030301430128202abcd170c303831323331323335393539300d06092a864886f70d01010e05000302000100":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 CRL ASN1 (TBSCertList, sig present) -x509parse_crl:"305c3047020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c303930313031303030303030301430128202abcd170c303831323331323335393539300d06092a864886f70d01010e050003020001":"CRL version \: 1\nissuer name \: CN=ABCD\nthis update \: 2009-01-01 00\:00\:00\nnext update \: 0000-00-00 00\:00\:00\nRevoked certificates\:\nserial number\: AB\:CD revocation date\: 2008-12-31 23\:59\:59\nsigned using \: RSA with SHA-224\n":0 - -X509 CRL ASN1 (TBSCertList, no entries) -x509parse_crl:"30463031020100300d06092a864886f70d01010e0500300f310d300b0603550403130441424344170c303930313031303030303030300d06092a864886f70d01010e050003020001":"CRL version \: 1\nissuer name \: CN=ABCD\nthis update \: 2009-01-01 00\:00\:00\nnext update \: 0000-00-00 00\:00\:00\nRevoked certificates\:\nsigned using \: RSA with SHA-224\n":0 - -X509 CRT parse path #2 (one cert) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C -mbedtls_x509_crt_parse_path:"data_files/dir1":0:1 - -X509 CRT parse path #3 (two certs) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -mbedtls_x509_crt_parse_path:"data_files/dir2":0:2 - -X509 CRT parse path #4 (two certs, one non-cert) -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_SHA256_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED -mbedtls_x509_crt_parse_path:"data_files/dir3":1:2 - -X509 CRT verify chain #1 (zero pathlen intermediate) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert14.crt data_files/dir4/cert13.crt data_files/dir4/cert12.crt":"data_files/dir4/cert11.crt":MBEDTLS_X509_BADCERT_NOT_TRUSTED - -X509 CRT verify chain #2 (zero pathlen root) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert23.crt data_files/dir4/cert22.crt":"data_files/dir4/cert21.crt":MBEDTLS_X509_BADCERT_NOT_TRUSTED - -X509 CRT verify chain #3 (nonzero pathlen root) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert34.crt data_files/dir4/cert33.crt data_files/dir4/cert32.crt":"data_files/dir4/cert31.crt":MBEDTLS_X509_BADCERT_NOT_TRUSTED - -X509 CRT verify chain #4 (nonzero pathlen intermediate) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert45.crt data_files/dir4/cert44.crt data_files/dir4/cert43.crt data_files/dir4/cert42.crt":"data_files/dir4/cert41.crt":MBEDTLS_X509_BADCERT_NOT_TRUSTED - -X509 CRT verify chain #5 (nonzero maxpathlen intermediate) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert54.crt data_files/dir4/cert53.crt data_files/dir4/cert52.crt":"data_files/dir4/cert51.crt":0 - -X509 CRT verify chain #6 (nonzero maxpathlen root) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert63.crt data_files/dir4/cert62.crt":"data_files/dir4/cert61.crt":0 - -X509 CRT verify chain #7 (maxpathlen root, self signed in path) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert74.crt data_files/dir4/cert73.crt data_files/dir4/cert72.crt":"data_files/dir4/cert71.crt":0 - -X509 CRT verify chain #8 (self signed maxpathlen root) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert61.crt data_files/dir4/cert63.crt data_files/dir4/cert62.crt":"data_files/dir4/cert61.crt":0 - -X509 CRT verify chain #9 (zero pathlen first intermediate, valid) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert83.crt data_files/dir4/cert82.crt":"data_files/dir4/cert81.crt":0 - -X509 CRT verify chain #10 (zero pathlen root, valid) -depends_on:MBEDTLS_SHA256_C:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_crt_verify_chain:"data_files/dir4/cert92.crt":"data_files/dir4/cert91.crt":0 - -X509 OID description #1 -x509_oid_desc:"2B06010505070301":"TLS Web Server Authentication" - -X509 OID description #2 -x509_oid_desc:"2B0601050507030f":"notfound" - -X509 OID description #3 -x509_oid_desc:"2B0601050507030100":"notfound" - -X509 OID numstring #1 (wide buffer) -x509_oid_numstr:"2B06010505070301":"1.3.6.1.5.5.7.3.1":20:17 - -X509 OID numstring #2 (buffer just fits) -x509_oid_numstr:"2B06010505070301":"1.3.6.1.5.5.7.3.1":18:17 - -X509 OID numstring #3 (buffer too small) -x509_oid_numstr:"2B06010505070301":"1.3.6.1.5.5.7.3.1":17:MBEDTLS_ERR_OID_BUF_TOO_SMALL - -X509 OID numstring #4 (larger number) -x509_oid_numstr:"2A864886F70D":"1.2.840.113549":15:14 - -X509 OID numstring #5 (arithmetic overflow) -x509_oid_numstr:"2A8648F9F8F7F6F5F4F3F2F1F001":"":100:MBEDTLS_ERR_OID_BUF_TOO_SMALL - -X509 crt keyUsage #1 (no extension, expected KU) -x509_check_key_usage:"data_files/server1.crt":MBEDTLS_X509_KU_DIGITAL_SIGNATURE|MBEDTLS_X509_KU_KEY_ENCIPHERMENT:0 - -X509 crt keyUsage #2 (no extension, surprising KU) -x509_check_key_usage:"data_files/server1.crt":MBEDTLS_X509_KU_KEY_CERT_SIGN:0 - -X509 crt keyUsage #3 (extension present, no KU) -x509_check_key_usage:"data_files/server1.key_usage.crt":0:0 - -X509 crt keyUsage #4 (extension present, single KU present) -x509_check_key_usage:"data_files/server1.key_usage.crt":MBEDTLS_X509_KU_DIGITAL_SIGNATURE:0 - -X509 crt keyUsage #5 (extension present, single KU absent) -x509_check_key_usage:"data_files/server1.key_usage.crt":MBEDTLS_X509_KU_KEY_CERT_SIGN:MBEDTLS_ERR_X509_BAD_INPUT_DATA - -X509 crt keyUsage #6 (extension present, combined KU present) -x509_check_key_usage:"data_files/server1.key_usage.crt":MBEDTLS_X509_KU_DIGITAL_SIGNATURE|MBEDTLS_X509_KU_KEY_ENCIPHERMENT:0 - -X509 crt keyUsage #7 (extension present, combined KU both absent) -x509_check_key_usage:"data_files/server1.key_usage.crt":MBEDTLS_X509_KU_KEY_CERT_SIGN|MBEDTLS_X509_KU_CRL_SIGN:MBEDTLS_ERR_X509_BAD_INPUT_DATA - -X509 crt keyUsage #8 (extension present, combined KU one absent) -x509_check_key_usage:"data_files/server1.key_usage.crt":MBEDTLS_X509_KU_KEY_ENCIPHERMENT|MBEDTLS_X509_KU_KEY_AGREEMENT:MBEDTLS_ERR_X509_BAD_INPUT_DATA - -X509 crt keyUsage #9 (extension present, decOnly allowed absent) -x509_check_key_usage:"data_files/server1.key_usage.crt":MBEDTLS_X509_KU_DIGITAL_SIGNATURE|MBEDTLS_X509_KU_KEY_ENCIPHERMENT|MBEDTLS_X509_KU_DECIPHER_ONLY:0 - -X509 crt keyUsage #10 (extension present, decOnly non-allowed present) -x509_check_key_usage:"data_files/keyUsage.decipherOnly.crt":MBEDTLS_X509_KU_DIGITAL_SIGNATURE|MBEDTLS_X509_KU_KEY_ENCIPHERMENT:MBEDTLS_ERR_X509_BAD_INPUT_DATA - -X509 crt keyUsage #11 (extension present, decOnly allowed present) -x509_check_key_usage:"data_files/keyUsage.decipherOnly.crt":MBEDTLS_X509_KU_DIGITAL_SIGNATURE|MBEDTLS_X509_KU_KEY_ENCIPHERMENT|MBEDTLS_X509_KU_DECIPHER_ONLY:0 - -X509 crt extendedKeyUsage #1 (no extension, serverAuth) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.crt":"2B06010505070301":0 - -X509 crt extendedKeyUsage #2 (single value, present) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.eku-srv.crt":"2B06010505070301":0 - -X509 crt extendedKeyUsage #3 (single value, absent) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.eku-cli.crt":"2B06010505070301":MBEDTLS_ERR_X509_BAD_INPUT_DATA - -X509 crt extendedKeyUsage #4 (two values, first) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.eku-srv_cli.crt":"2B06010505070301":0 - -X509 crt extendedKeyUsage #5 (two values, second) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.eku-srv_cli.crt":"2B06010505070302":0 - -X509 crt extendedKeyUsage #6 (two values, other) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.eku-srv_cli.crt":"2B06010505070303":MBEDTLS_ERR_X509_BAD_INPUT_DATA - -X509 crt extendedKeyUsage #7 (any, random) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_check_extended_key_usage:"data_files/server5.eku-cs_any.crt":"2B060105050703FF":0 - -X509 RSASSA-PSS parameters ASN1 (good, all defaults) -x509_parse_rsassa_pss_params:"":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:0 - -X509 RSASSA-PSS parameters ASN1 (wrong initial tag) -x509_parse_rsassa_pss_params:"":MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 RSASSA-PSS parameters ASN1 (unknown tag in top-level sequence) -x509_parse_rsassa_pss_params:"A400":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 RSASSA-PSS parameters ASN1 (good, HashAlg SHA256) -x509_parse_rsassa_pss_params:"A00D300B0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA1:20:0 - -X509 RSASSA-PSS parameters ASN1 (good, explicit HashAlg = default) -x509_parse_rsassa_pss_params:"A009300706052B0E03021A":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:0 - -X509 RSASSA-PSS parameters ASN1 (HashAlg wrong len #1) -x509_parse_rsassa_pss_params:"A00A300706052B0E03021A":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (HashAlg wrong len #2) -x509_parse_rsassa_pss_params:"A00A300706052B0E03021A00":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 RSASSA-PSS parameters ASN1 (HashAlg with parameters) -x509_parse_rsassa_pss_params:"A00F300D06096086480165030402013000":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_INVALID_DATA - -X509 RSASSA-PSS parameters ASN1 (HashAlg unknown OID) -x509_parse_rsassa_pss_params:"A00D300B06096086480165030402FF":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA256:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_OID_NOT_FOUND - -X509 RSASSA-PSS parameters ASN1 (good, MGAlg = MGF1-SHA256) -x509_parse_rsassa_pss_params:"A11A301806092A864886F70D010108300B0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:0 - -X509 RSASSA-PSS parameters ASN1 (good, explicit MGAlg = default) -x509_parse_rsassa_pss_params:"A116301406092A864886F70D010108300706052B0E03021A":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:0 - -X509 RSASSA-PSS parameters ASN1 (MGAlg wrong len #1) -x509_parse_rsassa_pss_params:"A11B301806092A864886F70D010108300B0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (MGAlg wrong len #2) -x509_parse_rsassa_pss_params:"A11B301806092A864886F70D010108300B060960864801650304020100":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 RSASSA-PSS parameters ASN1 (MGAlg AlgId wrong len #1) -x509_parse_rsassa_pss_params:"A11A301906092A864886F70D010108300B0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (MGAlg OID != MGF1) -x509_parse_rsassa_pss_params:"A11A301806092A864886F70D010109300B0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE + MBEDTLS_ERR_OID_NOT_FOUND - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params wrong tag) -x509_parse_rsassa_pss_params:"A11A301806092A864886F70D010108310B0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params wrong len #1a) -x509_parse_rsassa_pss_params:"A10F300D06092A864886F70D0101083000":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params wrong len #1b) -x509_parse_rsassa_pss_params:"A11B301906092A864886F70D010108300C0609608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params.alg not an OID) -x509_parse_rsassa_pss_params:"A11A301806092A864886F70D010108300B0709608648016503040201":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params.alg unknown OID) -x509_parse_rsassa_pss_params:"A11A301806092A864886F70D010108300B06096086480165030402FF":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_OID_NOT_FOUND - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params.params NULL) -x509_parse_rsassa_pss_params:"A11C301A06092A864886F70D010108300D06096086480165030402010500":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:0 - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params.params wrong tag) -x509_parse_rsassa_pss_params:"A11C301A06092A864886F70D010108300D06096086480165030402013000":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params wrong len #1c) -x509_parse_rsassa_pss_params:"A11D301B06092A864886F70D010108300E06096086480165030402010500":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (MGAlg.params wrong len #2) -x509_parse_rsassa_pss_params:"A11D301B06092A864886F70D010108300E0609608648016503040201050000":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA256:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 RSASSA-PSS parameters ASN1 (good, saltLen = 94) -x509_parse_rsassa_pss_params:"A20302015E":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:94:0 - -X509 RSASSA-PSS parameters ASN1 (good, explicit saltLen = default) -x509_parse_rsassa_pss_params:"A203020114":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:0 - -X509 RSASSA-PSS parameters ASN1 (saltLen wrong len #1) -x509_parse_rsassa_pss_params:"A20402015E":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:94:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (saltLen wrong len #2) -x509_parse_rsassa_pss_params:"A20402015E00":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:94:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 RSASSA-PSS parameters ASN1 (saltLen not an int) -x509_parse_rsassa_pss_params:"A2023000":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:94:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 RSASSA-PSS parameters ASN1 (good, explicit trailerField = default) -x509_parse_rsassa_pss_params:"A303020101":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:0 - -X509 RSASSA-PSS parameters ASN1 (trailerField wrong len #1) -x509_parse_rsassa_pss_params:"A304020101":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 RSASSA-PSS parameters ASN1 (trailerField wrong len #2) -x509_parse_rsassa_pss_params:"A30402010100":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 RSASSA-PSS parameters ASN1 (trailerField not an int) -x509_parse_rsassa_pss_params:"A3023000":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 RSASSA-PSS parameters ASN1 (trailerField not 1) -x509_parse_rsassa_pss_params:"A303020102":MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE:MBEDTLS_MD_SHA1:MBEDTLS_MD_SHA1:20:MBEDTLS_ERR_X509_INVALID_ALG - -X509 CSR ASN.1 (OK) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"308201183081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0300906072A8648CE3D04010349003046022100B49FD8C8F77ABFA871908DFBE684A08A793D0F490A43D86FCF2086E4F24BB0C2022100F829D5CCD3742369299E6294394717C4B723A0F68B44E831B6E6C3BCABF97243":"CSR version \: 1\nsubject name \: C=NL, O=PolarSSL, CN=localhost\nsigned using \: ECDSA with SHA1\nEC key size \: 256 bits\n":0 - -X509 CSR ASN.1 (bad first tag) -mbedtls_x509_csr_parse:"3100":"":MBEDTLS_ERR_X509_INVALID_FORMAT - -X509 CSR ASN.1 (bad sequence: overlong) -mbedtls_x509_csr_parse:"3001":"":MBEDTLS_ERR_X509_INVALID_FORMAT - -X509 CSR ASN.1 (total length mistmatch) -mbedtls_x509_csr_parse:"30010000":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 CSR ASN.1 (bad CRI: not a sequence) -mbedtls_x509_csr_parse:"30023100":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad CRI: overlong) -mbedtls_x509_csr_parse:"30023001":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad CRI.Version: overlong) -mbedtls_x509_csr_parse:"30053002020100":"":MBEDTLS_ERR_X509_INVALID_VERSION + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad CRI.Version: not v1) -mbedtls_x509_csr_parse:"30053003020101":"":MBEDTLS_ERR_X509_UNKNOWN_VERSION - -X509 CSR ASN.1 (bad CRI.Name: not a sequence) -mbedtls_x509_csr_parse:"300730050201003100":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad CRI.Name: overlong) -mbedtls_x509_csr_parse:"30083005020100300100":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad CRI.Name payload: not a set) -mbedtls_x509_csr_parse:"3009300702010030023000":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad CRI.Name payload: overlong) -mbedtls_x509_csr_parse:"300A30080201003002310100":"":MBEDTLS_ERR_X509_INVALID_NAME + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad SubjectPublicKeyInfo: missing) -mbedtls_x509_csr_parse:"30143012020100300D310B3009060355040613024E4C":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad SubjectPublicKeyInfo: not a sequence) -mbedtls_x509_csr_parse:"30163014020100300D310B3009060355040613024E4C3100":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad SubjectPublicKeyInfo: overlong) -mbedtls_x509_csr_parse:"30173014020100300D310B3009060355040613024E4C300100":"":MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad attributes: missing) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081973081940201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad attributes: bad tag) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081993081960201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFF0500":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad attributes: overlong) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"30819A3081960201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA00100":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad sigAlg: missing) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081C23081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad sigAlg: not a sequence) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081C43081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E03100":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad sigAlg: overlong) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081C43081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E03001":"":MBEDTLS_ERR_X509_INVALID_ALG + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad sigAlg: unknown) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081CD3081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0300906072A8648CE3D04FF":"":MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG - -X509 CSR ASN.1 (bad sig: missing) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081CD3081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0300906072A8648CE3D0401":"":MBEDTLS_ERR_X509_INVALID_SIGNATURE + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (bad sig: not a bit string) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081CF3081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0300906072A8648CE3D04010400":"":MBEDTLS_ERR_X509_INVALID_SIGNATURE + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG - -X509 CSR ASN.1 (bad sig: overlong) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"3081CF3081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0300906072A8648CE3D04010301":"":MBEDTLS_ERR_X509_INVALID_SIGNATURE + MBEDTLS_ERR_ASN1_OUT_OF_DATA - -X509 CSR ASN.1 (extra data after signature) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -mbedtls_x509_csr_parse:"308201193081BF0201003034310B3009060355040613024E4C3111300F060355040A1308506F6C617253534C31123010060355040313096C6F63616C686F73743059301306072A8648CE3D020106082A8648CE3D0301070342000437CC56D976091E5A723EC7592DFF206EEE7CF9069174D0AD14B5F768225962924EE500D82311FFEA2FD2345D5D16BD8A88C26B770D55CD8A2A0EFA01C8B4EDFFA029302706092A864886F70D01090E311A301830090603551D1304023000300B0603551D0F0404030205E0300906072A8648CE3D04010349003046022100B49FD8C8F77ABFA871908DFBE684A08A793D0F490A43D86FCF2086E4F24BB0C2022100F829D5CCD3742369299E6294394717C4B723A0F68B44E831B6E6C3BCABF9724300":"":MBEDTLS_ERR_X509_INVALID_FORMAT + MBEDTLS_ERR_ASN1_LENGTH_MISMATCH - -X509 File parse (no issues) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509parse_crt_file:"data_files/server7_int-ca.crt":0 - -X509 File parse (extra space in one certificate) -depends_on:MBEDTLS_ECP_C -x509parse_crt_file:"data_files/server7_pem_space.crt":1 - -X509 File parse (all certificates fail) -depends_on:MBEDTLS_ECP_C -x509parse_crt_file:"data_files/server7_all_space.crt":MBEDTLS_ERR_PEM_INVALID_DATA + MBEDTLS_ERR_BASE64_INVALID_CHARACTER - -X509 File parse (trailing spaces, OK) -depends_on:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509parse_crt_file:"data_files/server7_trailing_space.crt":0 diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.function deleted file mode 100644 index c476ec5078..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509parse.function +++ /dev/null @@ -1,628 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/x509_crt.h" -#include "mbedtls/x509_crl.h" -#include "mbedtls/x509_csr.h" -#include "mbedtls/pem.h" -#include "mbedtls/oid.h" -#include "mbedtls/base64.h" - -const mbedtls_x509_crt_profile compat_profile = -{ - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA1 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_RIPEMD160 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA224 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA384 ) | - MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA512 ), - 0xFFFFFFF, /* Any PK alg */ - 0xFFFFFFF, /* Any curve */ - 1024, -}; - -int verify_none( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) -{ - ((void) data); - ((void) crt); - ((void) certificate_depth); - *flags |= MBEDTLS_X509_BADCERT_OTHER; - - return 0; -} - -int verify_all( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) -{ - ((void) data); - ((void) crt); - ((void) certificate_depth); - *flags = 0; - - return 0; -} - -/* strsep() not available on Windows */ -char *mystrsep(char **stringp, const char *delim) -{ - const char *p; - char *ret = *stringp; - - if( *stringp == NULL ) - return( NULL ); - - for( ; ; (*stringp)++ ) - { - if( **stringp == '\0' ) - { - *stringp = NULL; - goto done; - } - - for( p = delim; *p != '\0'; p++ ) - if( **stringp == *p ) - { - **stringp = '\0'; - (*stringp)++; - goto done; - } - } - -done: - return( ret ); -} - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -typedef struct { - char buf[512]; - char *p; -} verify_print_context; - -void verify_print_init( verify_print_context *ctx ) -{ - memset( ctx, 0, sizeof( verify_print_context ) ); - ctx->p = ctx->buf; -} - -int verify_print( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) -{ - int ret; - verify_print_context *ctx = (verify_print_context *) data; - char *p = ctx->p; - size_t n = ctx->buf + sizeof( ctx->buf ) - ctx->p; - ((void) flags); - - ret = mbedtls_snprintf( p, n, "depth %d - serial ", certificate_depth ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_serial_gets( p, n, &crt->serial ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, " - subject " ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_x509_dn_gets( p, n, &crt->subject ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ret = mbedtls_snprintf( p, n, "\n" ); - MBEDTLS_X509_SAFE_SNPRINTF; - - ctx->p = p; - - return( 0 ); -} -#endif /* MBEDTLS_X509_CRT_PARSE_C */ -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_BIGNUM_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void x509_cert_info( char *crt_file, char *result_str ) -{ - mbedtls_x509_crt crt; - char buf[2000]; - int res; - - mbedtls_x509_crt_init( &crt ); - memset( buf, 0, 2000 ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - res = mbedtls_x509_crt_info( buf, 2000, "", &crt ); - - TEST_ASSERT( res != -1 ); - TEST_ASSERT( res != -2 ); - - TEST_ASSERT( strcmp( buf, result_str ) == 0 ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRL_PARSE_C */ -void mbedtls_x509_crl_info( char *crl_file, char *result_str ) -{ - mbedtls_x509_crl crl; - char buf[2000]; - int res; - - mbedtls_x509_crl_init( &crl ); - memset( buf, 0, 2000 ); - - TEST_ASSERT( mbedtls_x509_crl_parse_file( &crl, crl_file ) == 0 ); - res = mbedtls_x509_crl_info( buf, 2000, "", &crl ); - - TEST_ASSERT( res != -1 ); - TEST_ASSERT( res != -2 ); - - TEST_ASSERT( strcmp( buf, result_str ) == 0 ); - -exit: - mbedtls_x509_crl_free( &crl ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CSR_PARSE_C */ -void mbedtls_x509_csr_info( char *csr_file, char *result_str ) -{ - mbedtls_x509_csr csr; - char buf[2000]; - int res; - - mbedtls_x509_csr_init( &csr ); - memset( buf, 0, 2000 ); - - TEST_ASSERT( mbedtls_x509_csr_parse_file( &csr, csr_file ) == 0 ); - res = mbedtls_x509_csr_info( buf, 2000, "", &csr ); - - TEST_ASSERT( res != -1 ); - TEST_ASSERT( res != -2 ); - - TEST_ASSERT( strcmp( buf, result_str ) == 0 ); - -exit: - mbedtls_x509_csr_free( &csr ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C */ -void x509_verify_info( int flags, char *prefix, char *result_str ) -{ - char buf[2000]; - int res; - - memset( buf, 0, sizeof( buf ) ); - - res = mbedtls_x509_crt_verify_info( buf, sizeof( buf ), prefix, flags ); - - TEST_ASSERT( res >= 0 ); - - TEST_ASSERT( strcmp( buf, result_str ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_X509_CRL_PARSE_C */ -void x509_verify( char *crt_file, char *ca_file, char *crl_file, - char *cn_name_str, int result, int flags_result, - char *verify_callback ) -{ - mbedtls_x509_crt crt; - mbedtls_x509_crt ca; - mbedtls_x509_crl crl; - uint32_t flags = 0; - int res; - int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *) = NULL; - char * cn_name = NULL; - - mbedtls_x509_crt_init( &crt ); - mbedtls_x509_crt_init( &ca ); - mbedtls_x509_crl_init( &crl ); - - if( strcmp( cn_name_str, "NULL" ) != 0 ) - cn_name = cn_name_str; - - if( strcmp( verify_callback, "NULL" ) == 0 ) - f_vrfy = NULL; - else if( strcmp( verify_callback, "verify_none" ) == 0 ) - f_vrfy = verify_none; - else if( strcmp( verify_callback, "verify_all" ) == 0 ) - f_vrfy = verify_all; - else - TEST_ASSERT( "No known verify callback selected" == 0 ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - TEST_ASSERT( mbedtls_x509_crt_parse_file( &ca, ca_file ) == 0 ); - TEST_ASSERT( mbedtls_x509_crl_parse_file( &crl, crl_file ) == 0 ); - - res = mbedtls_x509_crt_verify_with_profile( &crt, &ca, &crl, &compat_profile, cn_name, &flags, f_vrfy, NULL ); - - TEST_ASSERT( res == ( result ) ); - TEST_ASSERT( flags == (uint32_t)( flags_result ) ); - -exit: - mbedtls_x509_crt_free( &crt ); - mbedtls_x509_crt_free( &ca ); - mbedtls_x509_crl_free( &crl ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void x509_verify_callback( char *crt_file, char *ca_file, - int exp_ret, char *exp_vrfy_out ) -{ - int ret; - mbedtls_x509_crt crt; - mbedtls_x509_crt ca; - uint32_t flags = 0; - verify_print_context vrfy_ctx; - - mbedtls_x509_crt_init( &crt ); - mbedtls_x509_crt_init( &ca ); - verify_print_init( &vrfy_ctx ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - TEST_ASSERT( mbedtls_x509_crt_parse_file( &ca, ca_file ) == 0 ); - - ret = mbedtls_x509_crt_verify( &crt, &ca, NULL, NULL, &flags, - verify_print, &vrfy_ctx ); - - TEST_ASSERT( ret == exp_ret ); - TEST_ASSERT( strcmp( vrfy_ctx.buf, exp_vrfy_out ) == 0 ); - -exit: - mbedtls_x509_crt_free( &crt ); - mbedtls_x509_crt_free( &ca ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_x509_dn_gets( char *crt_file, char *entity, char *result_str ) -{ - mbedtls_x509_crt crt; - char buf[2000]; - int res = 0; - - mbedtls_x509_crt_init( &crt ); - memset( buf, 0, 2000 ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - if( strcmp( entity, "subject" ) == 0 ) - res = mbedtls_x509_dn_gets( buf, 2000, &crt.subject ); - else if( strcmp( entity, "issuer" ) == 0 ) - res = mbedtls_x509_dn_gets( buf, 2000, &crt.issuer ); - else - TEST_ASSERT( "Unknown entity" == 0 ); - - TEST_ASSERT( res != -1 ); - TEST_ASSERT( res != -2 ); - - TEST_ASSERT( strcmp( buf, result_str ) == 0 ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_x509_time_is_past( char *crt_file, char *entity, int result ) -{ - mbedtls_x509_crt crt; - - mbedtls_x509_crt_init( &crt ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - - if( strcmp( entity, "valid_from" ) == 0 ) - TEST_ASSERT( mbedtls_x509_time_is_past( &crt.valid_from ) == result ); - else if( strcmp( entity, "valid_to" ) == 0 ) - TEST_ASSERT( mbedtls_x509_time_is_past( &crt.valid_to ) == result ); - else - TEST_ASSERT( "Unknown entity" == 0 ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_x509_time_is_future( char *crt_file, char *entity, int result ) -{ - mbedtls_x509_crt crt; - - mbedtls_x509_crt_init( &crt ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - - if( strcmp( entity, "valid_from" ) == 0 ) - TEST_ASSERT( mbedtls_x509_time_is_future( &crt.valid_from ) == result ); - else if( strcmp( entity, "valid_to" ) == 0 ) - TEST_ASSERT( mbedtls_x509_time_is_future( &crt.valid_to ) == result ); - else - TEST_ASSERT( "Unknown entity" == 0 ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_FS_IO */ -void x509parse_crt_file( char *crt_file, int result ) -{ - mbedtls_x509_crt crt; - - mbedtls_x509_crt_init( &crt ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == result ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C */ -void x509parse_crt( char *crt_data, char *result_str, int result ) -{ - mbedtls_x509_crt crt; - unsigned char buf[2000]; - unsigned char output[2000]; - int data_len, res; - - mbedtls_x509_crt_init( &crt ); - memset( buf, 0, 2000 ); - memset( output, 0, 2000 ); - - data_len = unhexify( buf, crt_data ); - - TEST_ASSERT( mbedtls_x509_crt_parse( &crt, buf, data_len ) == ( result ) ); - if( ( result ) == 0 ) - { - res = mbedtls_x509_crt_info( (char *) output, 2000, "", &crt ); - - TEST_ASSERT( res != -1 ); - TEST_ASSERT( res != -2 ); - - TEST_ASSERT( strcmp( (char *) output, result_str ) == 0 ); - } - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CRL_PARSE_C */ -void x509parse_crl( char *crl_data, char *result_str, int result ) -{ - mbedtls_x509_crl crl; - unsigned char buf[2000]; - unsigned char output[2000]; - int data_len, res; - - mbedtls_x509_crl_init( &crl ); - memset( buf, 0, 2000 ); - memset( output, 0, 2000 ); - - data_len = unhexify( buf, crl_data ); - - TEST_ASSERT( mbedtls_x509_crl_parse( &crl, buf, data_len ) == ( result ) ); - if( ( result ) == 0 ) - { - res = mbedtls_x509_crl_info( (char *) output, 2000, "", &crl ); - - TEST_ASSERT( res != -1 ); - TEST_ASSERT( res != -2 ); - - TEST_ASSERT( strcmp( (char *) output, result_str ) == 0 ); - } - -exit: - mbedtls_x509_crl_free( &crl ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CSR_PARSE_C */ -void mbedtls_x509_csr_parse( char *csr_der_hex, char *ref_out, int ref_ret ) -{ - mbedtls_x509_csr csr; - unsigned char *csr_der = NULL; - char my_out[1000]; - size_t csr_der_len; - int my_ret; - - mbedtls_x509_csr_init( &csr ); - memset( my_out, 0, sizeof( my_out ) ); - csr_der = unhexify_alloc( csr_der_hex, &csr_der_len ); - - my_ret = mbedtls_x509_csr_parse_der( &csr, csr_der, csr_der_len ); - TEST_ASSERT( my_ret == ref_ret ); - - if( ref_ret == 0 ) - { - size_t my_out_len = mbedtls_x509_csr_info( my_out, sizeof( my_out ), "", &csr ); - TEST_ASSERT( my_out_len == strlen( ref_out ) ); - TEST_ASSERT( strcmp( my_out, ref_out ) == 0 ); - } - -exit: - mbedtls_x509_csr_free( &csr ); - mbedtls_free( csr_der ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_x509_crt_parse_path( char *crt_path, int ret, int nb_crt ) -{ - mbedtls_x509_crt chain, *cur; - int i; - - mbedtls_x509_crt_init( &chain ); - - TEST_ASSERT( mbedtls_x509_crt_parse_path( &chain, crt_path ) == ret ); - - /* Check how many certs we got */ - for( i = 0, cur = &chain; cur != NULL; cur = cur->next ) - if( cur->raw.p != NULL ) - i++; - - TEST_ASSERT( i == nb_crt ); - -exit: - mbedtls_x509_crt_free( &chain ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_x509_crt_verify_chain( char *chain_paths, char *trusted_ca, int flags_result ) -{ - char* act; - uint32_t flags; - int result, res; - mbedtls_x509_crt trusted, chain; - - result= flags_result?MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:0; - - mbedtls_x509_crt_init( &chain ); - mbedtls_x509_crt_init( &trusted ); - - while( ( act = mystrsep( &chain_paths, " " ) ) != NULL ) - TEST_ASSERT( mbedtls_x509_crt_parse_file( &chain, act ) == 0 ); - TEST_ASSERT( mbedtls_x509_crt_parse_file( &trusted, trusted_ca ) == 0 ); - - res = mbedtls_x509_crt_verify( &chain, &trusted, NULL, NULL, &flags, NULL, NULL ); - - TEST_ASSERT( res == ( result ) ); - TEST_ASSERT( flags == (uint32_t)( flags_result ) ); - -exit: - mbedtls_x509_crt_free( &trusted ); - mbedtls_x509_crt_free( &chain ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_USE_C */ -void x509_oid_desc( char *oid_str, char *ref_desc ) -{ - mbedtls_x509_buf oid; - const char *desc = NULL; - unsigned char buf[20]; - int ret; - - memset( buf, 0, sizeof buf ); - - oid.tag = MBEDTLS_ASN1_OID; - oid.len = unhexify( buf, oid_str ); - oid.p = buf; - - ret = mbedtls_oid_get_extended_key_usage( &oid, &desc ); - - if( strcmp( ref_desc, "notfound" ) == 0 ) - { - TEST_ASSERT( ret != 0 ); - TEST_ASSERT( desc == NULL ); - } - else - { - TEST_ASSERT( ret == 0 ); - TEST_ASSERT( desc != NULL ); - TEST_ASSERT( strcmp( desc, ref_desc ) == 0 ); - } -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_USE_C */ -void x509_oid_numstr( char *oid_str, char *numstr, int blen, int ret ) -{ - mbedtls_x509_buf oid; - unsigned char oid_buf[20]; - char num_buf[100]; - - memset( oid_buf, 0x00, sizeof oid_buf ); - memset( num_buf, 0x2a, sizeof num_buf ); - - oid.tag = MBEDTLS_ASN1_OID; - oid.len = unhexify( oid_buf, oid_str ); - oid.p = oid_buf; - - TEST_ASSERT( (size_t) blen <= sizeof num_buf ); - - TEST_ASSERT( mbedtls_oid_get_numeric_string( num_buf, blen, &oid ) == ret ); - - if( ret >= 0 ) - { - TEST_ASSERT( num_buf[ret] == 0 ); - TEST_ASSERT( strcmp( num_buf, numstr ) == 0 ); - } -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_X509_CHECK_KEY_USAGE */ -void x509_check_key_usage( char *crt_file, int usage, int ret ) -{ - mbedtls_x509_crt crt; - - mbedtls_x509_crt_init( &crt ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - - TEST_ASSERT( mbedtls_x509_crt_check_key_usage( &crt, usage ) == ret ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */ -void x509_check_extended_key_usage( char *crt_file, char *usage_hex, int ret ) -{ - mbedtls_x509_crt crt; - char oid[50]; - size_t len; - - mbedtls_x509_crt_init( &crt ); - - len = unhexify( (unsigned char *) oid, usage_hex ); - - TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); - - TEST_ASSERT( mbedtls_x509_crt_check_extended_key_usage( &crt, oid, len ) == ret ); - -exit: - mbedtls_x509_crt_free( &crt ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT */ -void x509_parse_rsassa_pss_params( char *hex_params, int params_tag, - int ref_msg_md, int ref_mgf_md, - int ref_salt_len, int ref_ret ) -{ - int my_ret; - mbedtls_x509_buf params; - mbedtls_md_type_t my_msg_md, my_mgf_md; - int my_salt_len; - - params.p = unhexify_alloc( hex_params, ¶ms.len ); - params.tag = params_tag; - - my_ret = mbedtls_x509_get_rsassa_pss_params( ¶ms, &my_msg_md, &my_mgf_md, - &my_salt_len ); - - TEST_ASSERT( my_ret == ref_ret ); - - if( ref_ret == 0 ) - { - TEST_ASSERT( my_msg_md == (mbedtls_md_type_t) ref_msg_md ); - TEST_ASSERT( my_mgf_md == (mbedtls_md_type_t) ref_mgf_md ); - TEST_ASSERT( my_salt_len == ref_salt_len ); - } - -exit: - mbedtls_free( params.p ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_SELF_TEST */ -void x509_selftest() -{ - TEST_ASSERT( mbedtls_x509_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.data deleted file mode 100644 index d4d2a98ce8..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.data +++ /dev/null @@ -1,77 +0,0 @@ -Certificate Request check Server1 SHA1 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha1":MBEDTLS_MD_SHA1:0:0 - -Certificate Request check Server1 SHA224 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha224":MBEDTLS_MD_SHA224:0:0 - -Certificate Request check Server1 SHA256 -depends_on:MBEDTLS_SHA256_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha256":MBEDTLS_MD_SHA256:0:0 - -Certificate Request check Server1 SHA384 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha384":MBEDTLS_MD_SHA384:0:0 - -Certificate Request check Server1 SHA512 -depends_on:MBEDTLS_SHA512_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha512":MBEDTLS_MD_SHA512:0:0 - -Certificate Request check Server1 MD4 -depends_on:MBEDTLS_MD4_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.md4":MBEDTLS_MD_MD4:0:0 - -Certificate Request check Server1 MD5 -depends_on:MBEDTLS_MD5_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.md5":MBEDTLS_MD_MD5:0:0 - -Certificate Request check Server1 key_usage -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.key_usage":MBEDTLS_MD_SHA1:MBEDTLS_X509_KU_DIGITAL_SIGNATURE | MBEDTLS_X509_KU_NON_REPUDIATION | MBEDTLS_X509_KU_KEY_ENCIPHERMENT:0 - -Certificate Request check Server1 ns_cert_type -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.cert_type":MBEDTLS_MD_SHA1:0:MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER - -Certificate Request check Server1 key_usage + ns_cert_type -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15 -x509_csr_check:"data_files/server1.key":"data_files/server1.req.ku-ct":MBEDTLS_MD_SHA1:MBEDTLS_X509_KU_DIGITAL_SIGNATURE | MBEDTLS_X509_KU_NON_REPUDIATION | MBEDTLS_X509_KU_KEY_ENCIPHERMENT:MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER - -Certificate Request check Server5 ECDSA, key_usage -depends_on:MBEDTLS_SHA1_C:MBEDTLS_ECDSA_C:MBEDTLS_ECDSA_DETERMINISTIC:MBEDTLS_ECP_DP_SECP256R1_ENABLED -x509_csr_check:"data_files/server5.key":"data_files/server5.req.ku.sha1":MBEDTLS_MD_SHA1:MBEDTLS_X509_KU_DIGITAL_SIGNATURE | MBEDTLS_X509_KU_NON_REPUDIATION:0 - -Certificate write check Server1 SHA1 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_MD5_C -x509_crt_check:"data_files/server1.key":"":"C=NL,O=PolarSSL,CN=PolarSSL Server 1":"data_files/test-ca.key":"PolarSSLTest":"C=NL,O=PolarSSL,CN=PolarSSL Test CA":"1":"20110212144406":"20210212144406":MBEDTLS_MD_SHA1:0:0:-1:"data_files/server1.crt" - -Certificate write check Server1 SHA1, key_usage -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_MD5_C -x509_crt_check:"data_files/server1.key":"":"C=NL,O=PolarSSL,CN=PolarSSL Server 1":"data_files/test-ca.key":"PolarSSLTest":"C=NL,O=PolarSSL,CN=PolarSSL Test CA":"1":"20110212144406":"20210212144406":MBEDTLS_MD_SHA1:MBEDTLS_X509_KU_DIGITAL_SIGNATURE | MBEDTLS_X509_KU_NON_REPUDIATION | MBEDTLS_X509_KU_KEY_ENCIPHERMENT:0:-1:"data_files/server1.key_usage.crt" - -Certificate write check Server1 SHA1, ns_cert_type -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_MD5_C -x509_crt_check:"data_files/server1.key":"":"C=NL,O=PolarSSL,CN=PolarSSL Server 1":"data_files/test-ca.key":"PolarSSLTest":"C=NL,O=PolarSSL,CN=PolarSSL Test CA":"1":"20110212144406":"20210212144406":MBEDTLS_MD_SHA1:0:MBEDTLS_X509_NS_CERT_TYPE_SSL_SERVER:-1:"data_files/server1.cert_type.crt" - -Certificate write check Server1 SHA1, version 1 -depends_on:MBEDTLS_SHA1_C:MBEDTLS_RSA_C:MBEDTLS_PKCS1_V15:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_MD5_C -x509_crt_check:"data_files/server1.key":"":"C=NL,O=PolarSSL,CN=PolarSSL Server 1":"data_files/test-ca.key":"PolarSSLTest":"C=NL,O=PolarSSL,CN=PolarSSL Test CA":"1":"20110212144406":"20210212144406":MBEDTLS_MD_SHA1:0:0:MBEDTLS_X509_CRT_VERSION_1:"data_files/server1.v1.crt" - -X509 String to Names #1 -mbedtls_x509_string_to_names:"C=NL,O=Offspark\, Inc., OU=PolarSSL":"C=NL, O=Offspark, Inc., OU=PolarSSL":0 - -X509 String to Names #2 -mbedtls_x509_string_to_names:"C=NL, O=Offspark, Inc., OU=PolarSSL":"":MBEDTLS_ERR_X509_UNKNOWN_OID - -X509 String to Names #3 (Name precisely 255 bytes) -mbedtls_x509_string_to_names:"C=NL, O=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345,OU=PolarSSL":"C=NL, O=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345, OU=PolarSSL":0 - -X509 String to Names #4 (Name larger than 255 bytes) -mbedtls_x509_string_to_names:"C=NL, O=1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456, OU=PolarSSL":"":MBEDTLS_ERR_X509_INVALID_NAME - -X509 String to Names #5 (Escape non-allowed characters) -mbedtls_x509_string_to_names:"C=NL, O=Offspark\a Inc., OU=PolarSSL":"":MBEDTLS_ERR_X509_INVALID_NAME - -X509 String to Names #6 (Escape at end) -mbedtls_x509_string_to_names:"C=NL, O=Offspark\":"":MBEDTLS_ERR_X509_INVALID_NAME diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.function deleted file mode 100644 index c3773ba549..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_x509write.function +++ /dev/null @@ -1,179 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/x509_crt.h" -#include "mbedtls/x509_csr.h" -#include "mbedtls/pem.h" -#include "mbedtls/oid.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_BIGNUM_C:MBEDTLS_FS_IO:MBEDTLS_PK_PARSE_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE depends_on:MBEDTLS_PEM_WRITE_C:MBEDTLS_X509_CSR_WRITE_C */ -void x509_csr_check( char *key_file, char *cert_req_check_file, - int md_type, int key_usage, int cert_type ) -{ - mbedtls_pk_context key; - mbedtls_x509write_csr req; - unsigned char buf[4000]; - unsigned char check_buf[4000]; - int ret; - size_t olen = 0, pem_len = 0; - FILE *f; - const char *subject_name = "C=NL,O=PolarSSL,CN=PolarSSL Server 1"; - rnd_pseudo_info rnd_info; - - memset( &rnd_info, 0x2a, sizeof( rnd_pseudo_info ) ); - - mbedtls_pk_init( &key ); - TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 ); - - mbedtls_x509write_csr_init( &req ); - mbedtls_x509write_csr_set_md_alg( &req, md_type ); - mbedtls_x509write_csr_set_key( &req, &key ); - TEST_ASSERT( mbedtls_x509write_csr_set_subject_name( &req, subject_name ) == 0 ); - if( key_usage != 0 ) - TEST_ASSERT( mbedtls_x509write_csr_set_key_usage( &req, key_usage ) == 0 ); - if( cert_type != 0 ) - TEST_ASSERT( mbedtls_x509write_csr_set_ns_cert_type( &req, cert_type ) == 0 ); - - ret = mbedtls_x509write_csr_pem( &req, buf, sizeof(buf), - rnd_pseudo_rand, &rnd_info ); - TEST_ASSERT( ret == 0 ); - - pem_len = strlen( (char *) buf ); - - f = fopen( cert_req_check_file, "r" ); - TEST_ASSERT( f != NULL ); - olen = fread( check_buf, 1, sizeof( check_buf ), f ); - fclose( f ); - - TEST_ASSERT( olen >= pem_len - 1 ); - TEST_ASSERT( memcmp( buf, check_buf, pem_len - 1 ) == 0 ); - -exit: - mbedtls_x509write_csr_free( &req ); - mbedtls_pk_free( &key ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_PEM_WRITE_C:MBEDTLS_X509_CRT_WRITE_C:MBEDTLS_SHA1_C */ -void x509_crt_check( char *subject_key_file, char *subject_pwd, - char *subject_name, char *issuer_key_file, - char *issuer_pwd, char *issuer_name, - char *serial_str, char *not_before, char *not_after, - int md_type, int key_usage, int cert_type, int ver, - char *cert_check_file ) -{ - mbedtls_pk_context subject_key, issuer_key; - mbedtls_x509write_cert crt; - unsigned char buf[4000]; - unsigned char check_buf[5000]; - mbedtls_mpi serial; - int ret; - size_t olen = 0, pem_len = 0; - FILE *f; - rnd_pseudo_info rnd_info; - - memset( &rnd_info, 0x2a, sizeof( rnd_pseudo_info ) ); - mbedtls_mpi_init( &serial ); - mbedtls_pk_init( &subject_key ); - mbedtls_pk_init( &issuer_key ); - - TEST_ASSERT( mbedtls_pk_parse_keyfile( &subject_key, subject_key_file, - subject_pwd ) == 0 ); - TEST_ASSERT( mbedtls_pk_parse_keyfile( &issuer_key, issuer_key_file, - issuer_pwd ) == 0 ); - TEST_ASSERT( mbedtls_mpi_read_string( &serial, 10, serial_str ) == 0 ); - - mbedtls_x509write_crt_init( &crt ); - if( ver != -1 ) - mbedtls_x509write_crt_set_version( &crt, ver ); - TEST_ASSERT( mbedtls_x509write_crt_set_serial( &crt, &serial ) == 0 ); - TEST_ASSERT( mbedtls_x509write_crt_set_validity( &crt, not_before, - not_after ) == 0 ); - mbedtls_x509write_crt_set_md_alg( &crt, md_type ); - TEST_ASSERT( mbedtls_x509write_crt_set_issuer_name( &crt, issuer_name ) == 0 ); - TEST_ASSERT( mbedtls_x509write_crt_set_subject_name( &crt, subject_name ) == 0 ); - mbedtls_x509write_crt_set_subject_key( &crt, &subject_key ); - mbedtls_x509write_crt_set_issuer_key( &crt, &issuer_key ); - - if( crt.version >= MBEDTLS_X509_CRT_VERSION_3 ) - { - TEST_ASSERT( mbedtls_x509write_crt_set_basic_constraints( &crt, 0, 0 ) == 0 ); - TEST_ASSERT( mbedtls_x509write_crt_set_subject_key_identifier( &crt ) == 0 ); - TEST_ASSERT( mbedtls_x509write_crt_set_authority_key_identifier( &crt ) == 0 ); - if( key_usage != 0 ) - TEST_ASSERT( mbedtls_x509write_crt_set_key_usage( &crt, key_usage ) == 0 ); - if( cert_type != 0 ) - TEST_ASSERT( mbedtls_x509write_crt_set_ns_cert_type( &crt, cert_type ) == 0 ); - } - - ret = mbedtls_x509write_crt_pem( &crt, buf, sizeof(buf), - rnd_pseudo_rand, &rnd_info ); - TEST_ASSERT( ret == 0 ); - - pem_len = strlen( (char *) buf ); - - f = fopen( cert_check_file, "r" ); - TEST_ASSERT( f != NULL ); - olen = fread( check_buf, 1, sizeof(check_buf), f ); - fclose( f ); - TEST_ASSERT( olen < sizeof(check_buf) ); - - TEST_ASSERT( olen >= pem_len - 1 ); - TEST_ASSERT( memcmp( buf, check_buf, pem_len - 1 ) == 0 ); - -exit: - mbedtls_x509write_crt_free( &crt ); - mbedtls_pk_free( &issuer_key ); - mbedtls_pk_free( &subject_key ); - mbedtls_mpi_free( &serial ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_X509_CREATE_C:MBEDTLS_X509_USE_C */ -void mbedtls_x509_string_to_names( char *name, char *parsed_name, int result ) -{ - int ret; - size_t len = 0; - mbedtls_asn1_named_data *names = NULL; - mbedtls_x509_name parsed, *parsed_cur, *parsed_prv; - unsigned char buf[1024], out[1024], *c; - - memset( &parsed, 0, sizeof( parsed ) ); - memset( out, 0, sizeof( out ) ); - memset( buf, 0, sizeof( buf ) ); - c = buf + sizeof( buf ); - - ret = mbedtls_x509_string_to_names( &names, name ); - TEST_ASSERT( ret == result ); - - if( ret != 0 ) - goto exit; - - ret = mbedtls_x509_write_names( &c, buf, names ); - TEST_ASSERT( ret > 0 ); - - TEST_ASSERT( mbedtls_asn1_get_tag( &c, buf + sizeof( buf ), &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) == 0 ); - TEST_ASSERT( mbedtls_x509_get_name( &c, buf + sizeof( buf ), &parsed ) == 0 ); - - ret = mbedtls_x509_dn_gets( (char *) out, sizeof( out ), &parsed ); - TEST_ASSERT( ret > 0 ); - - TEST_ASSERT( strcmp( (char *) out, parsed_name ) == 0 ); - -exit: - mbedtls_asn1_free_named_data_list( &names ); - - parsed_cur = parsed.next; - while( parsed_cur != 0 ) - { - parsed_prv = parsed_cur; - parsed_cur = parsed_cur->next; - mbedtls_free( parsed_prv ); - } -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.data b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.data deleted file mode 100644 index d9d06d7130..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.data +++ /dev/null @@ -1,76 +0,0 @@ -XTEA Encrypt_ecb #1 -xtea_encrypt_ecb:"000102030405060708090a0b0c0d0e0f":"4142434445464748":"497df3d072612cb5" - -XTEA Encrypt_ecb #2 -xtea_encrypt_ecb:"000102030405060708090a0b0c0d0e0f":"4141414141414141":"e78f2d13744341d8" - -XTEA Encrypt_ecb #3 -xtea_encrypt_ecb:"000102030405060708090a0b0c0d0e0f":"5a5b6e278948d77f":"4141414141414141" - -XTEA Encrypt_ecb #4 -xtea_encrypt_ecb:"00000000000000000000000000000000":"4142434445464748":"a0390589f8b8efa5" - -XTEA Encrypt_ecb #5 -xtea_encrypt_ecb:"00000000000000000000000000000000":"4141414141414141":"ed23375a821a8c2d" - -XTEA Encrypt_ecb #6 -xtea_encrypt_ecb:"00000000000000000000000000000000":"70e1225d6e4e7655":"4141414141414141" - -XTEA Decrypt_ecb #1 -xtea_decrypt_ecb:"000102030405060708090a0b0c0d0e0f":"497df3d072612cb5":"4142434445464748" - -XTEA Decrypt_ecb #2 -xtea_decrypt_ecb:"000102030405060708090a0b0c0d0e0f":"e78f2d13744341d8":"4141414141414141" - -XTEA Decrypt_ecb #3 -xtea_decrypt_ecb:"000102030405060708090a0b0c0d0e0f":"4141414141414141":"5a5b6e278948d77f" - -XTEA Decrypt_ecb #4 -xtea_decrypt_ecb:"00000000000000000000000000000000":"a0390589f8b8efa5":"4142434445464748" - -XTEA Decrypt_ecb #5 -xtea_decrypt_ecb:"00000000000000000000000000000000":"ed23375a821a8c2d":"4141414141414141" - -XTEA Decrypt_ecb #6 -xtea_decrypt_ecb:"00000000000000000000000000000000":"4141414141414141":"70e1225d6e4e7655" - -XTEA Encrypt CBC #1 -xtea_encrypt_cbc:"000102030405060708090a0b0c0d0e0f":"6162636465666768":"4142434445464748":"6b982bec15a7b558" - -XTEA Encrypt CBC #2 -xtea_encrypt_cbc:"000102030405060708090a0b0c0d0e0f":"4142434445464748":"41414141414141414141414141414141":"2c6aeb799561c8e973b0927f072e3801" - -XTEA Encrypt CBC #3 -xtea_encrypt_cbc:"000102030405060708090a0b0c0d0e0f":"0000000000000000":"5a5b6e278948d77f70e1225d6e4e7655e78f2d13744341d8":"41414141414141415fee100fe2c030025d8a557f2677cb33" - -XTEA Encrypt CBC #4 -xtea_encrypt_cbc:"00000000000000000000000000000000":"6162636465666768":"4142434445464748":"5b0c065a3803900d" - -XTEA Encrypt CBC #5 -xtea_encrypt_cbc:"00000000000000000000000000000000":"4142434445464748":"41414141414141414141414141414141":"bdae508aa320aa5caa7cd79dbc9c38aa" - -XTEA Encrypt CBC #6 -xtea_encrypt_cbc:"00000000000000000000000000000000":"0000000000000000":"5a5b6e278948d77f70e1225d6e4e7655e78f2d13744341d8":"61f5082a2c996f632da3ea16ff8e06558b69f069d8637b31" - -XTEA Decrypt CBC #1 -xtea_decrypt_cbc:"000102030405060708090a0b0c0d0e0f":"6162636465666768":"4142434445464748":"359def46515c71b2" - -XTEA Decrypt CBC #2 -xtea_decrypt_cbc:"000102030405060708090a0b0c0d0e0f":"4142434445464748":"41414141414141414141414141414141":"1b192d63cc0e90371b1a2f66c809963e" - -XTEA Decrypt CBC #3 -xtea_decrypt_cbc:"000102030405060708090a0b0c0d0e0f":"0000000000000000":"5a5b6e278948d77f70e1225d6e4e7655e78f2d13744341d8":"2e76e5cc03543cdc40ca03358a5764c331a0631c2f0f3714" - -XTEA Decrypt CBC #4 -xtea_decrypt_cbc:"00000000000000000000000000000000":"6162636465666768":"4142434445464748":"81476a15138174dc" - -XTEA Decrypt CBC #5 -xtea_decrypt_cbc:"00000000000000000000000000000000":"4142434445464748":"41414141414141414141414141414141":"31a361192b08311d31a0631c2f0f3714" - -XTEA Decrypt CBC #6 -xtea_decrypt_cbc:"00000000000000000000000000000000":"0000000000000000":"5a5b6e278948d77f70e1225d6e4e7655e78f2d13744341d8":"c1e2dbbf67ee786e29e051bea18c6abc66f1de5c2daefc2a" - -XTEA Selftest -depends_on:MBEDTLS_SELF_TEST -xtea_selftest: - diff --git a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.function b/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.function deleted file mode 100644 index 68ab543321..0000000000 --- a/build/premake/premake5/contrib/mbedtls/tests/suites/test_suite_xtea.function +++ /dev/null @@ -1,129 +0,0 @@ -/* BEGIN_HEADER */ -#include "mbedtls/xtea.h" -/* END_HEADER */ - -/* BEGIN_DEPENDENCIES - * depends_on:MBEDTLS_XTEA_C - * END_DEPENDENCIES - */ - -/* BEGIN_CASE */ -void xtea_encrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_xtea_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - - unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_xtea_setup( &ctx, key_str ); - TEST_ASSERT( mbedtls_xtea_crypt_ecb( &ctx, MBEDTLS_XTEA_ENCRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void xtea_decrypt_ecb( char *hex_key_string, char *hex_src_string, - char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char output[100]; - mbedtls_xtea_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(output, 0x00, 100); - - unhexify( key_str, hex_key_string ); - unhexify( src_str, hex_src_string ); - - mbedtls_xtea_setup( &ctx, key_str ); - TEST_ASSERT( mbedtls_xtea_crypt_ecb( &ctx, MBEDTLS_XTEA_DECRYPT, src_str, output ) == 0 ); - hexify( dst_str, output, 8 ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void xtea_encrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char iv_str[100]; - unsigned char output[100]; - size_t len; - mbedtls_xtea_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(output, 0x00, 100); - - unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - len = unhexify( src_str, hex_src_string ); - - mbedtls_xtea_setup( &ctx, key_str ); - TEST_ASSERT( mbedtls_xtea_crypt_cbc( &ctx, MBEDTLS_XTEA_ENCRYPT, len, iv_str, - src_str, output ) == 0 ); - hexify( dst_str, output, len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE */ -void xtea_decrypt_cbc( char *hex_key_string, char *hex_iv_string, - char *hex_src_string, char *hex_dst_string ) -{ - unsigned char key_str[100]; - unsigned char src_str[100]; - unsigned char dst_str[100]; - unsigned char iv_str[100]; - unsigned char output[100]; - size_t len; - mbedtls_xtea_context ctx; - - memset(key_str, 0x00, 100); - memset(src_str, 0x00, 100); - memset(dst_str, 0x00, 100); - memset(iv_str, 0x00, 100); - memset(output, 0x00, 100); - - unhexify( key_str, hex_key_string ); - unhexify( iv_str, hex_iv_string ); - len = unhexify( src_str, hex_src_string ); - - mbedtls_xtea_setup( &ctx, key_str ); - TEST_ASSERT( mbedtls_xtea_crypt_cbc( &ctx, MBEDTLS_XTEA_DECRYPT, len, iv_str, - src_str, output ) == 0 ); - hexify( dst_str, output, len ); - - TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 ); -} -/* END_CASE */ - -/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */ -void xtea_selftest() -{ - TEST_ASSERT( mbedtls_xtea_self_test( 0 ) == 0 ); -} -/* END_CASE */ diff --git a/build/premake/premake5/contrib/mbedtls/yotta/create-module.sh b/build/premake/premake5/contrib/mbedtls/yotta/create-module.sh deleted file mode 100644 index 4c79ebe510..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/create-module.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -set -eu - -# relative to the script's directory -TREE=.. -DEST=module - -# make sure we're running in our own directory -if [ -f create-module.sh ]; then :; else - cd $( dirname $0 ) - if [ -f create-module.sh ]; then :; else - echo "Please run the script from is directory." >&2 - exit 1 - fi -fi - -# use a temporary directory to build the module, then rsync to DEST -# this allows touching only new files, for more efficient re-builds -TMP=$DEST-tmp -rm -rf $TMP - -mkdir -p $TMP/mbedtls $TMP/source -cp $TREE/include/mbedtls/*.h $TMP/mbedtls -cp $TREE/library/*.c $TMP/source - -# temporary, should depend on external module later -cp data/entropy_hardware_poll.c $TMP/source -cp data/target_config.h $TMP/mbedtls - -data/adjust-config.sh $TREE/scripts/config.pl $TMP/mbedtls/config.h - -mkdir -p $TMP/test -cp -r data/example-* $TMP/test -# later we should have the generated test suites here too - -cp data/module.json $TMP -cp data/README.md $TMP - -cp ../LICENSE $TMP -if [ -f ../apache-2.0.txt ]; then cp ../apache-2.0.txt $TMP; fi - -mkdir -p $DEST -rsync -cr --delete --exclude build --exclude yotta_\* $TMP/ $DEST/ -rm -rf $TMP - -echo "mbed TLS yotta module created in '$PWD/$DEST'." diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/README.md b/build/premake/premake5/contrib/mbedtls/yotta/data/README.md deleted file mode 100644 index 7ec7cef4c7..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# mbed TLS - -mbed TLS makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their embedded products, with a minimal code footprint. It offers an SSL library with an intuitive API and readable source code. - -**Note:** The current release is beta, and implements no secure source of random numbers, weakening its security. - -Currently the only supported yotta targets are: -- `frdm-k64f-gcc` -- `frdm-k64f-armcc` -- `x86-linux-native` -- `x86-osx-native` - -## Sample programs - -This release includes the following examples: - -1. [**Self test:**](https://github.com/ARMmbed/mbedtls/blob/development/yotta/data/example-selftest) Tests different basic functions in the mbed TLS library. - -2. [**Benchmark:**](https://github.com/ARMmbed/mbedtls/blob/development/yotta/data/example-benchmark) Measures the time taken to perform basic cryptographic functions used in the library. - -3. [**Hashing:**](https://github.com/ARMmbed/mbedtls/blob/development/yotta/data/example-hashing) Demonstrates the various APIs for computing hashes of data (also known as message digests) with SHA-256. - -4. [**Authenticated encryption:**](https://github.com/ARMmbed/mbedtls/blob/development/yotta/data/example-authcrypt) Demonstrates usage of the Cipher API for encrypting and authenticating data with AES-CCM. - -These examples are integrated as yotta tests, so that they are built automatically when you build mbed TLS. Each of them comes with complete usage instructions as a Readme file in the repository. - -## Performing TLS and DTLS connections - -A high-level API for performing TLS and DTLS connections with mbed TLS in mbed OS is provided in a separate yotta module: [mbed-tls-sockets](https://github.com/ARMmbed/mbed-tls-sockets). We recommend this API for TLS and DTLS connections. It is very similar to the API provided by the [sockets](https://github.com/ARMmbed/sockets) module for unencrypted TCP and UDP connections. - -The `mbed-tls-sockets` module includes a complete [example TLS client](https://github.com/ARMmbed/mbed-tls-sockets/blob/master/test/tls-client/main.cpp) with [usage instructions](https://github.com/ARMmbed/mbed-tls-sockets/blob/master/test/tls-client/README.md). - -## Configuring mbed TLS features - -mbed TLS makes it easy to disable any feature during compilation, if that feature isn't required for a particular project. The default configuration enables all modern and widely-used features, which should meet the needs of new projects, and disables all features that are older or less common, to minimize the code footprint. - -The list of available compilation flags is available in the fully documented [config.h file](https://github.com/ARMmbed/mbedtls/blob/development/include/mbedtls/config.h). - -If you need to adjust those flags, you can provide your own configuration-adjustment file with suitable `#define` and `#undef` statements. These will be included between the default definitions and the sanity checks. Your configuration file should be in your application's include directory, and can be named freely; you just need to let mbed TLS know the file's name. To do that, use yotta's [configuration system](http://docs.yottabuild.org/reference/config.html). The file's name should be in your `config.json` file, under mbedtls, as the key `user-config-file`. - -For example, in an application called `myapp`, if you want to enable the EC J-PAKE key exchange and disable the CBC cipher mode, you can create a file named `mbedtls-config-changes.h` in the `myapp` directory containing the following lines: - - #define MBEDTLS_ECJPAKE_C - #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED - - #undef MBEDTLS_CIPHER_MODE_CBC - -And then create a file named `config.json` at the root of your application with the following contents: - - { - "mbedtls": { - "user-config-file": "\"myapp/mbedtls-config-changes.h\"" - } - } - -Please note: you need to provide the exact name that will be used in the `#include` directive, including the `<>` or quotes around the name. - -## Getting mbed TLS from GitHub - -Like most components of mbed OS, mbed TLS is developed in the open and its source can be found on GitHub: [ARMmbed/mbedtls](https://github.com/ARMmbed/mbedtls). Unlike most other mbed OS components, however, you cannot just clone the repository and run `yotta build` from its root. This is because mbed TLS also exists as an independent component, so its repository includes things that are not relevant for mbed OS, as well as other build systems. - -The way to use mbed TLS from a clone of the GitHub repository is to run the following commands from the root of a checkout: - - yotta/create-module.sh - cd yotta/module - -You can then run any yotta command you would normally run, such as `yotta build` or `yotta link`. - -## Differences between the standalone and mbed OS editions - -While the two editions share the same code base, there are still a number of differences, mainly in configuration and integration. You should keep in mind those differences when reading some articles in our [knowledge base](https://tls.mbed.org/kb), as currently all the articles are about the standalone edition. - -* The mbed OS edition has a smaller set of features enabled by default in `config.h`, in order to reduce footprint. While the default configuration of the standalone edition puts more emphasize on maintaining interoperability with old peers, the mbed OS edition only enables the most modern ciphers and the latest version of (D)TLS. - -* The following components of mbed TLS are disabled in the mbed OS edition: `net.c` and `timing.c`. This is because mbed OS includes their equivalents. - -* The mbed OS edition comes with a fully integrated API for (D)TLS connections in a companion module: [mbed-tls-sockets](https://github.com/ARMmbed/mbed-tls-sockets). See "Performing TLS and DTLS connections" above. - -## Other resources - -The [mbed TLS website](https://tls.mbed.org) contains many other useful -resources for the developer, such as [developer -documentation](https://tls.mbed.org/dev-corner), [knowledgebase -articles](https://tls.mbed.org/kb), and a [support forum](https://tls.mbed.org/discussions). - -## Contributing - -We gratefully accept bug reports and contributions from the community. There are some requirements we need to fulfill in order to be able to integrate contributions: - -* Simple bug fixes to existing code do not contain copyright themselves and we can integrate without issue. The same is true of trivial contributions. - -* For larger contributions, such as a new feature, the code can possibly fall under copyright law. We then need your consent to share in the ownership of the copyright. We have a form for this, which we will send to you in case you submit a contribution or pull request that we deem this necessary for. - -To contribute, please: - -* [Check for open issues](https://github.com/ARMmbed/mbedtls/issues) or [start a discussion](https://tls.mbed.org/discussions) around a feature idea or a bug. - -* Fork the [mbed TLS repository on GitHub](https://github.com/ARMmbed/mbedtls) to start making your changes. As a general rule, you should use the "development" branch as a basis. - -* Write a test that shows that the bug was fixed or that the feature works as expected. - -* Send a pull request and bug us until it gets merged and published. We will include your name in the ChangeLog. - diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/adjust-config.sh b/build/premake/premake5/contrib/mbedtls/yotta/data/adjust-config.sh deleted file mode 100644 index 9088fd5e34..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/adjust-config.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -set -eu - -if [ $# -ne 2 ]; then - echo "Usage: $0 path/to/config.pl path/to/config.h" >&2 - exit 1 -fi - -SCRIPT=$1 -FILE=$2 - -conf() { - $SCRIPT -f $FILE $@ -} - -# not supported on mbed OS, nor used by mbed Client -conf unset MBEDTLS_NET_C -conf unset MBEDTLS_TIMING_C - -# not supported on all targets with mbed OS, nor used by mbed Client -conf unset MBEDTLS_FS_IO - -conf unset MBEDTLS_CIPHER_MODE_CFB -conf unset MBEDTLS_CIPHER_MODE_CTR -conf unset MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS -conf unset MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN -conf unset MBEDTLS_CIPHER_PADDING_ZEROS -conf unset MBEDTLS_ECP_DP_SECP192R1_ENABLED -conf unset MBEDTLS_ECP_DP_SECP224R1_ENABLED -conf unset MBEDTLS_ECP_DP_SECP521R1_ENABLED -conf unset MBEDTLS_ECP_DP_SECP192K1_ENABLED -conf unset MBEDTLS_ECP_DP_SECP224K1_ENABLED -conf unset MBEDTLS_ECP_DP_SECP256K1_ENABLED -conf unset MBEDTLS_ECP_DP_BP256R1_ENABLED -conf unset MBEDTLS_ECP_DP_BP384R1_ENABLED -conf unset MBEDTLS_ECP_DP_BP512R1_ENABLED -conf unset MBEDTLS_PK_PARSE_EC_EXTENDED - -conf unset MBEDTLS_AESNI_C -conf unset MBEDTLS_ARC4_C -conf unset MBEDTLS_BLOWFISH_C -conf unset MBEDTLS_CAMELLIA_C -conf unset MBEDTLS_DES_C -conf unset MBEDTLS_DHM_C -conf unset MBEDTLS_GENPRIME -conf unset MBEDTLS_MD5_C -conf unset MBEDTLS_PADLOCK_C -conf unset MBEDTLS_PEM_WRITE_C -conf unset MBEDTLS_PKCS5_C -conf unset MBEDTLS_PKCS12_C -conf unset MBEDTLS_RIPEMD160_C -conf unset MBEDTLS_SHA1_C -conf unset MBEDTLS_XTEA_C - -conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT - -conf unset MBEDTLS_X509_CSR_PARSE_C -conf unset MBEDTLS_X509_CREATE_C -conf unset MBEDTLS_X509_CRT_WRITE_C -conf unset MBEDTLS_X509_CSR_WRITE_C - -conf unset MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED -conf unset MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -conf unset MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -conf unset MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED -conf unset MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -conf unset MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -conf unset MBEDTLS_SSL_FALLBACK_SCSV -conf unset MBEDTLS_SSL_CBC_RECORD_SPLITTING -conf unset MBEDTLS_SSL_PROTO_SSL3 -conf unset MBEDTLS_SSL_PROTO_TLS1 -conf unset MBEDTLS_SSL_PROTO_TLS1_1 -conf unset MBEDTLS_SSL_TRUNCATED_HMAC diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/entropy_hardware_poll.c b/build/premake/premake5/contrib/mbedtls/yotta/data/entropy_hardware_poll.c deleted file mode 100644 index 1924302576..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/entropy_hardware_poll.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Temporary "entropy" collector for Cortex-M4 - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * WARNING: this is a temporary hack! - * 1. Currently does not provide strong entropy, should be replaced to use the - * on-board hardware RNG (see IOTSSL-303) - * 2. This should be in a separete yotta module which would be a target - * dependency of mbedtls (see IOTSSL-313) - */ - -#if defined(TARGET_LIKE_CORTEX_M4) - -#include "MK64F12.h" -#include "core_cm4.h" -#include - -unsigned long hardclock( void ) -{ - static int dwt_started = 0; - - if( dwt_started == 0 ) - { - CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; - DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; - } - - return( DWT->CYCCNT ); -} - -int mbedtls_hardware_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - unsigned long timer = hardclock(); - ((void) data); - *olen = 0; - - if( len < sizeof(unsigned long) ) - return( 0 ); - - memcpy( output, &timer, sizeof(unsigned long) ); - *olen = sizeof(unsigned long); - - return( 0 ); -} - -#endif diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/README.md b/build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/README.md deleted file mode 100644 index ae4b1efa9d..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Authenticated Encryption Example - -This application performs authenticated encryption and authenticated decryption of a buffer. It serves as a tutorial for the basic authenticated encryption functions of mbed TLS. - -## Pre-requisites - -To build and run this example you must have: - -* A computer with the following software installed: - * [CMake](http://www.cmake.org/download/). - * [yotta](https://github.com/ARMmbed/yotta). Please note that **yotta has its own set of dependencies**, listed in the [installation instructions](http://armmbed.github.io/yotta/#installing-on-windows). - * [Python](https://www.python.org/downloads/). - * [The ARM GCC toolchain](https://launchpad.net/gcc-arm-embedded). - * A serial terminal emulator (Like screen, pySerial and cu). -* An [FRDM-K64F](http://developer.mbed.org/platforms/FRDM-K64F/) development board, or another board supported by mbed OS (in which case you'll have to substitute frdm-k64f-gcc with the appropriate target in the instructions below). -* A micro-USB cable. -* If your OS is Windows, please follow the installation instructions [for the serial port driver](https://developer.mbed.org/handbook/Windows-serial-configuration). - -## Getting started - -1. Connect the FRDM-K64F to the computer with the micro-USB cable, being careful to use the "OpenSDA" connector on the target board. - -2. Navigate to the mbedtls directory supplied with your release and open a terminal. - -3. Set the yotta target: - - ``` - yotta target frdm-k64f-gcc - ``` - -4. Build mbedtls and the examples. This may take a long time if this is your first compilation: - - ``` - $ yotta build - ``` - -5. Copy `build/frdm-k64f-gcc/test/mbedtls-test-example-authcrypt.bin` to your mbed board and wait until the LED next to the USB port stops blinking. - -6. Start the serial terminal emulator and connect to the virtual serial port presented by FRDM-K64F. - - Use the following settings: - - * 115200 baud (not 9600). - * 8N1. - * No flow control. - -7. Press the Reset button on the board. - -8. The output in the terminal window should look like: - - ``` - {{timeout;10}} - {{host_test_name;default}} - {{description;mbed TLS example authcrypt}} - {{test_id;MBEDTLS_EX_AUTHCRYPT}} - {{start}} - - - plaintext message: 536f6d65207468696e67732061726520626574746572206c65667420756e7265616400 - ciphertext: c57f7afb94f14c7977d785d08682a2596bd62ee9dcf216b8cccd997afee9b402f5de1739e8e6467aa363749ef39392e5c66622b01c7203ec0a3d14 - decrypted: 536f6d65207468696e67732061726520626574746572206c65667420756e7265616400 - - DONE - {{success}} - {{end}} - ``` - -The actual output for the ciphertext line will vary on each run because of the use of a random nonce in the encryption process. diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/main.cpp b/build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/main.cpp deleted file mode 100644 index 83d5566c5f..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-authcrypt/main.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Hello world example of using the authenticated encryption with mbed TLS - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#include "mbedtls/cipher.h" -#include "mbedtls/entropy.h" -#include "mbedtls/ctr_drbg.h" - -#include -#include - -static void print_hex(const char *title, const unsigned char buf[], size_t len) -{ - printf("%s: ", title); - - for (size_t i = 0; i < len; i++) - printf("%02x", buf[i]); - - printf("\r\n"); -} - -/* - * The pre-shared key. Should be generated randomly and be unique to the - * device/channel/etc. Just used a fixed on here for simplicity. - */ -static const unsigned char secret_key[16] = { - 0xf4, 0x82, 0xc6, 0x70, 0x3c, 0xc7, 0x61, 0x0a, - 0xb9, 0xa0, 0xb8, 0xe9, 0x87, 0xb8, 0xc1, 0x72, -}; - -static int example(void) -{ - /* message that should be protected */ - const char message[] = "Some things are better left unread"; - /* metadata transmitted in the clear but authenticated */ - const char metadata[] = "eg sequence number, routing info"; - /* ciphertext buffer large enough to hold message + nonce + tag */ - unsigned char ciphertext[128] = { 0 }; - int ret; - - printf("\r\n\r\n"); - print_hex("plaintext message", (unsigned char *) message, sizeof message); - - /* - * Setup random number generator - * (Note: later this might be done automatically.) - */ - mbedtls_entropy_context entropy; /* entropy pool for seeding PRNG */ - mbedtls_ctr_drbg_context drbg; /* pseudo-random generator */ - - mbedtls_entropy_init(&entropy); - mbedtls_ctr_drbg_init(&drbg); - - /* Seed the PRNG using the entropy pool, and throw in our secret key as an - * additional source of randomness. */ - ret = mbedtls_ctr_drbg_seed(&drbg, mbedtls_entropy_func, &entropy, - secret_key, sizeof (secret_key)); - if (ret != 0) { - printf("mbedtls_ctr_drbg_init() returned -0x%04X\r\n", -ret); - return 1; - } - - /* - * Setup AES-CCM contex - */ - mbedtls_cipher_context_t ctx; - - mbedtls_cipher_init(&ctx); - - ret = mbedtls_cipher_setup(&ctx, mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_CCM)); - if (ret != 0) { - printf("mbedtls_cipher_setup() returned -0x%04X\r\n", -ret); - return 1; - } - - ret = mbedtls_cipher_setkey(&ctx, secret_key, 8 * sizeof secret_key, MBEDTLS_ENCRYPT); - if (ret != 0) { - printf("mbedtls_cipher_setkey() returned -0x%04X\r\n", -ret); - return 1; - } - - /* - * Encrypt-authenticate the message and authenticate additional data - * - * First generate a random 8-byte nonce. - * Put it directly in the output buffer as the recipient will need it. - * - * Warning: you must never re-use the same (key, nonce) pair. One of the - * best ways to ensure this to use a counter for the nonce. However this - * means you should save the counter accross rebots, if the key is a - * long-term one. The alternative we choose here is to generate the nonce - * randomly. However it only works if you have a good source of - * randomness. - */ - const size_t nonce_len = 8; - mbedtls_ctr_drbg_random(&drbg, ciphertext, nonce_len); - - size_t ciphertext_len = 0; - /* Go for a conservative 16-byte (128-bit) tag - * and append it to the ciphertext */ - const size_t tag_len = 16; - ret = mbedtls_cipher_auth_encrypt(&ctx, ciphertext, nonce_len, - (const unsigned char *) metadata, sizeof metadata, - (const unsigned char *) message, sizeof message, - ciphertext + nonce_len, &ciphertext_len, - ciphertext + nonce_len + sizeof message, tag_len ); - if (ret != 0) { - printf("mbedtls_cipher_auth_encrypt() returned -0x%04X\r\n", -ret); - return 1; - } - ciphertext_len += nonce_len + tag_len; - - /* - * The following information should now be transmitted: - * - first ciphertext_len bytes of ciphertext buffer - * - metadata if not already transmitted elsewhere - */ - print_hex("ciphertext", ciphertext, ciphertext_len); - - /* - * Decrypt-authenticate - */ - unsigned char decrypted[128] = { 0 }; - size_t decrypted_len = 0; - - ret = mbedtls_cipher_setkey(&ctx, secret_key, 8 * sizeof secret_key, MBEDTLS_DECRYPT); - if (ret != 0) { - printf("mbedtls_cipher_setkey() returned -0x%04X\r\n", -ret); - return 1; - } - - ret = mbedtls_cipher_auth_decrypt(&ctx, - ciphertext, nonce_len, - (const unsigned char *) metadata, sizeof metadata, - ciphertext + nonce_len, ciphertext_len - nonce_len - tag_len, - decrypted, &decrypted_len, - ciphertext + ciphertext_len - tag_len, tag_len ); - /* Checking the return code is CRITICAL for security here */ - if (ret == MBEDTLS_ERR_CIPHER_AUTH_FAILED) { - printf("Something bad is happening! Data is not authentic!\r\n"); - return 1; - } - if (ret != 0) { - printf("mbedtls_cipher_authdecrypt() returned -0x%04X\r\n", -ret); - return 1; - } - - print_hex("decrypted", decrypted, decrypted_len); - - printf("\r\nDONE\r\n"); - - return 0; -} - -#if defined(TARGET_LIKE_MBED) - -#include "mbed-drivers/test_env.h" -#include "minar/minar.h" - -static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - - MBED_HOSTTEST_TIMEOUT(10); - MBED_HOSTTEST_SELECT(default); - MBED_HOSTTEST_DESCRIPTION(mbed TLS example authcrypt); - MBED_HOSTTEST_START("MBEDTLS_EX_AUTHCRYPT"); - MBED_HOSTTEST_RESULT(example() == 0); -} - -void app_start(int, char*[]) { - minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); -} - -#else - -int main() { - return example(); -} - -#endif diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/README.md b/build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/README.md deleted file mode 100644 index 1a534a2f37..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# mbed TLS Benchmark Example - -This application benchmarks the various cryptographic primitives offered by mbed TLS. - -## Pre-requisites - -To build and run this example you must have: - -* A computer with the following software installed: - * [CMake](http://www.cmake.org/download/). - * [yotta](https://github.com/ARMmbed/yotta). Please note that **yotta has its own set of dependencies**, listed in the [installation instructions](http://armmbed.github.io/yotta/#installing-on-windows). - * [Python](https://www.python.org/downloads/). - * [The ARM GCC toolchain](https://launchpad.net/gcc-arm-embedded). - * A serial terminal emulator (Like screen, pySerial and cu). -* An [FRDM-K64F](http://developer.mbed.org/platforms/FRDM-K64F/) development board, or another board supported by mbed OS (in which case you'll have to substitute frdm-k64f-gcc with the appropriate target in the instructions below). -* A micro-USB cable. -* If your OS is Windows, please follow the installation instructions [for the serial port driver](https://developer.mbed.org/handbook/Windows-serial-configuration). - -## Getting started - -1. Connect the FRDM-K64F to the computer with the micro-USB cable, being careful to use the "OpenSDA" connector on the target board. - -2. Navigate to the mbedtls directory supplied with your release and open a terminal. - -3. Set the yotta target: - - ``` - yotta target frdm-k64f-gcc - ``` - -4. Build mbedtls and the examples. This may take a long time if this is your first compilation: - - ``` - $ yotta build - ``` - -5. Copy `build/frdm-k64f-gcc/test/mbedtls-test-example-benchmark.bin` to your mbed board and wait until the LED next to the USB port stops blinking. - -6. Start the serial terminal emulator and connect to the virtual serial port presented by FRDM-K64F. - - Use the following settings: - - * 115200 baud (not 9600). - * 8N1. - * No flow control. - -7. Press the Reset button on the board. - -8. The output in the terminal window should look like: - - ``` - {{timeout;150}} - {{host_test_name;default}} - {{description;mbed TLS benchmark program}} - {{test_id;MBEDTLS_BENCHMARK}} - {{start}} - - - SHA-1 : 3644 Kb/s, 32 cycles/byte - SHA-256 : 1957 Kb/s, 59 cycles/byte - SHA-512 : 587 Kb/s, 200 cycles/byte - AES-CBC-128 : 1359 Kb/s, 86 cycles/byte - AES-CBC-192 : 1183 Kb/s, 99 cycles/byte - AES-CBC-256 : 1048 Kb/s, 111 cycles/byte - AES-GCM-128 : 421 Kb/s, 279 cycles/byte - AES-GCM-192 : 403 Kb/s, 292 cycles/byte - AES-GCM-256 : 385 Kb/s, 305 cycles/byte - AES-CCM-128 : 542 Kb/s, 216 cycles/byte - AES-CCM-192 : 484 Kb/s, 242 cycles/byte - AES-CCM-256 : 437 Kb/s, 268 cycles/byte - CTR_DRBG (NOPR) : 1002 Kb/s, 117 cycles/byte - CTR_DRBG (PR) : 705 Kb/s, 166 cycles/byte - HMAC_DRBG SHA-1 (NOPR) : 228 Kb/s, 517 cycles/byte - HMAC_DRBG SHA-1 (PR) : 210 Kb/s, 561 cycles/byte - HMAC_DRBG SHA-256 (NOPR) : 212 Kb/s, 557 cycles/byte - HMAC_DRBG SHA-256 (PR) : 185 Kb/s, 637 cycles/byte - RSA-2048 : 41 ms/ public - RSA-2048 : 1349 ms/private - RSA-4096 : 134 ms/ public - RSA-4096 : 7149 ms/private - ECDSA-secp384r1 : 640 ms/sign - ECDSA-secp256r1 : 387 ms/sign - ECDSA-secp384r1 : 1233 ms/verify - ECDSA-secp256r1 : 751 ms/verify - ECDHE-secp384r1 : 1191 ms/handshake - ECDHE-secp256r1 : 730 ms/handshake - ECDHE-Curve25519 : 611 ms/handshake - ECDH-secp384r1 : 584 ms/handshake - ECDH-secp256r1 : 365 ms/handshake - ECDH-Curve25519 : 303 ms/handshake - - {{success}} - {{end}} - ``` diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/main.cpp b/build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/main.cpp deleted file mode 100644 index 77c70052bb..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-benchmark/main.cpp +++ /dev/null @@ -1,953 +0,0 @@ -/* - * Benchmark demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(TARGET_LIKE_MBED) - -#include - -int main() { - printf("this version of this program only works on mbed OS\n"); - return 0; -} - -#else - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_exit exit -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#define mbedtls_free free -#endif - -#include - -#include "mbedtls/md4.h" -#include "mbedtls/md5.h" -#include "mbedtls/ripemd160.h" -#include "mbedtls/sha1.h" -#include "mbedtls/sha256.h" -#include "mbedtls/sha512.h" -#include "mbedtls/arc4.h" -#include "mbedtls/des.h" -#include "mbedtls/aes.h" -#include "mbedtls/blowfish.h" -#include "mbedtls/camellia.h" -#include "mbedtls/gcm.h" -#include "mbedtls/ccm.h" -#include "mbedtls/havege.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/hmac_drbg.h" -#include "mbedtls/rsa.h" -#include "mbedtls/pk.h" -#include "mbedtls/dhm.h" -#include "mbedtls/ecdsa.h" -#include "mbedtls/ecdh.h" -#include "mbedtls/error.h" - -#include "mbed-drivers/mbed.h" - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -#define RSA_PRIVATE_KEY_2048 \ -"-----BEGIN RSA PRIVATE KEY-----\r\n" \ -"MIIEogIBAAKCAQEA2dwVr+IMGEtA2/MCP6fA5eb/6B18Bq6e7gw8brNPkm3E6LyR\r\n" \ -"4DnMJVxZmw3bPDKBDoKzfntkMESi/Yw5UopLtVfjGfWeQWPClqffLZBsZ60BRAsg\r\n" \ -"/g+ID5tgzxSuxzftypK59uexOVCAm7hCKZHGO3DbI7bLY27j7VAgEP7d/yuaz5Fx\r\n" \ -"Kl/vu7shqrBoz6ABJVJD3KC8nUiMRUCXRINmxbyUUjA4DnicZv6+xrGKr36r6M8h\r\n" \ -"VYLa5msKc8WzbnBWzpUsrpb4/r7ML+qp92gdSfVJ8/bLiU7h2C7faDA59uaqrFK9\r\n" \ -"xmDdx7FaWhGQs3LWW6w1UNgkPS0FDYUslpsnsQIDAQABAoIBAC7IJNwM5V3+IuJY\r\n" \ -"T35Nzo1PyloUosJokvY5KGz5Ejg2XBdCDu0gXCcVqqQyGIbXrYDpLhQV+RCoXHun\r\n" \ -"tdN0oQdC5SB47s/J1Uo2qCUHo0+sBd6PqTkFKsl3KxWssk9TQjvCwC412IefMs69\r\n" \ -"hW+ZvwCanmQP56LleApIr2oW4KLfW8Ry/QfZlua+dizctdN7+H1mWwgZQTY9T27J\r\n" \ -"6RtGRA5NVkKVPzIHVJfdpKoO7xGg1g06aEbPB/VmGvZaaFWWnaf7uRvFjLZecBLu\r\n" \ -"QSx2DA/GDjirlDYj99PJb7DtB4xRtKzsyw0o+xapC8w6OtIl/3xFt9moCu2jGrsx\r\n" \ -"vpjHdfECgYEA7fSACRseIs9gAIVX8wq6gayTpA47DHYWAD6IQfIj35SJ+AgsvbFF\r\n" \ -"4AmrwDhcJVPmDy1N4nLBfyGAMt/2CfiYkdkW6QFX/ULRMMBL/G7kWV8hYQDICB2g\r\n" \ -"xaMRN1lPCmFq6BkSWjwIYTnYDFBDWVm1GVT8TMtJoM8Erej9qC0PeFUCgYEA6mF3\r\n" \ -"bigO3t8f5sig+XepaftEUbkJMzo72TVRnIR2ycdR2ihelPQ+25g9dwV0ZA5XXhBS\r\n" \ -"DKOABWjMM739Mwmy9v26Dlmu9R01zHQktMvtEAyfz7lk2NF0aMuj8285OJUBf9bz\r\n" \ -"Cq3MjtMCD+4CZ6iaEqCdUKOuxfpx5cWVJV+qve0CgYBhD1YaYMFOGaBjFgDl1f51\r\n" \ -"Xltqk5NqZdBbkSYrIAWZ8RDF5y+4wFJsLAWuhk6vuyUgE66tK3nZzWRpXAkT0B8L\r\n" \ -"fq1lpXKqj1KcvBNCiEkEW1VWJ+dvyAYIF5eyJ++hoFLnETL3M32HivyhKSwPihPg\r\n" \ -"nVW8TT9fJJIYDe1JZ/fjcQKBgHJfv7UsrR0LSvkG3K8AOtbx+8PZhOjPuRbk0v+L\r\n" \ -"EKCkuIe5/XW4vtfQMeZb7hFJgk7vrepm+vkoy8VQKDf4urGW3W1VTHBmobM01hi4\r\n" \ -"DuYvEul+Mf0wMRtWjJolo4m+BO5KiW2jpFfqFm6JmfjVqOIAKOSKC6am8V/MDF0h\r\n" \ -"kyN9AoGAT9oOiEXMolbkDZw/QCaBiRoAGlGlNYUkJ+58U6OjIZLISw6aFv+Y2uE0\r\n" \ -"mEImItjuYZtSYKblWikp6ldPoKlt9bwEFe3c6IZ8kJ3+xyEyAGrvjXjEY7PzP6dp\r\n" \ -"Ajbjp9X9uocEBv9W/KsBLdQ7yizcL/toHwdBO4vQqmqTvAc5IIw=\r\n" \ -"-----END RSA PRIVATE KEY-----\r\n" - -#define RSA_PRIVATE_KEY_4096 \ -"-----BEGIN RSA PRIVATE KEY-----\r\n" \ -"MIIJKgIBAAKCAgEAmkdGjoIshJuOt2NO47qB3Z3yyvmLg2j351isItSNuFQU3qr+\r\n" \ -"jXHIeANf03yw/K0Zvos8RPd+CqLjoxAQL3QDH4bZAl88bIo29i+SANbNSrKQmc0k\r\n" \ -"pH+yzw3alDzO0GZaOPZjsbo6AwBrno5msi0vRuC2aY8vGLPsZWSyLai7tneS1j/o\r\n" \ -"vYW6XIo8Cj61j2Ypy9HhVUW/4Wc+zAT25D/x7jTpkqJLWWT+YzibNbOY48M5eJcB\r\n" \ -"6/sMyUIeI3/u/wXyMrooNyLiCpedkuHRA0m7u5cWPTUISTunSRlVFij/NHJjuU8e\r\n" \ -"wA3B29yfZFsUqDEnyc+OxniIueAixTomVszxAaVn8zFEbYhFMPqziiFp99u3jfeG\r\n" \ -"k1q9mmUi/uCfUC4e2IC5rqq1ZbKSduH7Ug/Vn2bGQahww0sZFRHDXFrnBcotcW+M\r\n" \ -"bnC290VBDnYgzmdYrIOxuPb2aUwJo4ZlbKh5uBB1PigMuyhLKibQ1a+V5ZJGdpP6\r\n" \ -"SE9PGIdgYWSmh2QEMuLE6v+wTO2LQ5JgqsvFfi3GIZvkn0s8jTS72Jq2uMkFkMer\r\n" \ -"UBjPDYaSPy5kpo103KerWs+cMPOJ/3FtZzI++7MoSUTkWVr1ySQFt5i1EIZ/0Thi\r\n" \ -"jut2jNe8a4AoA3TtC8Rkk/3AIIbg8MVNT4EnT+KHROTMu6gET1oJ3YfBRpUCAwEA\r\n" \ -"AQKCAgEAhuNSmT7PVZH8kfLOAuYKrY1vvm+4v0iDl048Eqfs0QESziyLK3gUYnnw\r\n" \ -"yqP2yrU+EQ8Dvvj0xq/sf6GHxTWVlXb9PcmutueRbmXhLcKg83J0Y0StiPXtjIL8\r\n" \ -"XSddW3Bh6fPi7n14Qy+W6KZwu9AtybanRlvePabyRSRpdOpWVQ7u30w5XZsSed6S\r\n" \ -"6BI0BBC68m2qqje1sInoqdCdXKtcB31TytUDNEHM+UuAyM8iGeGS2hCNqZlycHTS\r\n" \ -"jQ9KEsdMH3YLu0lQgRpWtxmg+VL6ROWwmAtKF12EwbDYZ+uoVl69OkQnCpv8pxKa\r\n" \ -"ec/4m6V+uEA1AOpaAMorHG3fH31IKWC/fTZstovgO/eG2XCtlbcCoWCQ7amFq16l\r\n" \ -"Gh1UKeBHxMXpDj4oDmIUGUvgzSNnEeSN/v76losWvWYQDjXR/LMDa/CNYsD8BmJR\r\n" \ -"PZidIjIXdVRlYOhA7ljtySQvp6RBujBfw3tsVMyZw2XzXFwM9O89b1xXC6+M5jf9\r\n" \ -"DXs/U7Fw+J9qq/YpByABcPCwWdttwdQFRbOxwxaSOKarIqS87TW1JuFcNJ59Ut6G\r\n" \ -"kMvAg6gC34U+0ktkG/AmI1hgjC+P7ErHCXBR2xARoGzcO/CMZF59S+Z2HFchpTSP\r\n" \ -"5T2o4mGy3VfHSBidQQrcZRukg8ZP8M1NF3bXjpY6QZpeLHc4oHECggEBAMjdgzzk\r\n" \ -"xp4mIYFxAEiXYt7tzuUXJk+0UpEJj5uboWLirUZqZmNUPyh6WDnzlREBH++Ms0LO\r\n" \ -"+AWSfaGPDoMb0NE2j3c4FRWAhe7Vn6lj7nLVpF2RdwRo88yGerZ4uwGMY8NUQCtn\r\n" \ -"zum3J7eCJ5DojiceRb6uMxTJ8xZmUC4W2f3J/lrR7wlYjyVnnHqH5HcemYUipWSw\r\n" \ -"sM0/cHp3lrz2VWrbAEu8HVpklvDQpdAgl7cjXt/JHYawY+p426IF/PzQSRROnzgy\r\n" \ -"4WI8FVYNV2tgu0TOFURbkkEvuj/duDKeooUIF0G0XHzha5oAX/j0iWiHbrOF6wHj\r\n" \ -"0xeajL9msKBnmD8CggEBAMSgLWmv7G31x4tndJCcXnX4AyVL7KpygAx/ZwCcyTR8\r\n" \ -"rY1rO07f/ta2noEra/xmEW/BW98qJFCHSU2nSLAQ5FpFSWyuQqrnffrMJnfWyvpr\r\n" \ -"ceQ0yQ/MiA6/JIOvGAjabcspzZijxzGp+Qk3eTT0yOXLSVOCH9B9XVHLodcy4PQM\r\n" \ -"KSCxy0vVHhVNl2SdPEwTXRmxk99Q/rw6IHVpQxBq1OhQt05nTKT+rZMD/grSK22e\r\n" \ -"my2F0DodAJwLo063Zv3RXQZhDYodMmjcp9Hqrtvj9P3HD7J3z6ACiV3SCi8cZumL\r\n" \ -"bSmnKCcd0bb45+aOWm31ieECJuIcJ9rOREEa/KDYTCsCggEBAMG5WkSVhLWsou37\r\n" \ -"dUGNuA63nq42SH3gtS0q4nU6gUkkw+dA4ST1cMByVrr1oRQ4WHup4I4TnQOKyF3T\r\n" \ -"4jQy1I+ipnVeAn+tZ/7zyzwMpEHeqNqRXA9FxbTBEoMAJ6QTqXgOvqDeSqIAQm7r\r\n" \ -"OYu5rrgtqyh/S8bGCwvUe4ooAfCSKx2ekYMbBVwW9MT8YS09tuS/iHJ3Mt2RTMLg\r\n" \ -"qeHvVmxrcXqZoFm44Ba7tN/pP0mi9HKyviZT4tmV3IYEbn3JyGGsfkUuVU9wEUfg\r\n" \ -"MCrgrVxrwfketAzooiHMjkVL2ASjzAJTmEvdAPETYXxzJD9LN0ovY3t8JfAC37IN\r\n" \ -"sVXS8/MCggEBALByOS59Y4Ktq1rLBQx8djwQyuneP0wZohUVAx7Gk7xZIfklQDyg\r\n" \ -"v/R4PrcVezstcPpDnykdjScCsGJR+uWc0v667I/ttP/e6utz5hVmmBGu965dPAzE\r\n" \ -"c1ggaSkOqFfRg/Nr2Qbf+fH0YPnHYSqHe/zSt0OMIvaaeXLcdKhEDSCUBRhE1HWB\r\n" \ -"kxR046WzgBeYzNQwycz9xwqsctJKGpeR9ute+5ANHPd3X9XtID0fqz8ctI5eZaSw\r\n" \ -"wApIW01ZQcAF8B+4WkkVuFXnpWW33yCOaRyPVOPHpnclr5WU1fS+3Q85QkW9rkej\r\n" \ -"97zlkl0QY9AHJqrXnoML1ywAK7ns+MVyNK8CggEAf62xcKZhOb1djeF72Ms+i/i/\r\n" \ -"WIAq4Q4YpsElgvJTHpNH2v9g4ngSTKe3ws3bGc502sWRlhcoTFMOW2rJNe/iqKkb\r\n" \ -"3cdeTkseDbpqozmJWz9dJWSVtXas2bZjzBEa//gQ7nHGVeQdqZJQ9rxPsoOAkfpi\r\n" \ -"qCFrmfUVUqC53e3XMt8+W+aSvKl+JZiB9ozkO9A6Q0vfQLKtjUMdQE3XaCFQT8DI\r\n" \ -"smaLBlBmeRaBpc02ENeC4ADlWosm1SwgxqMhuh2Alba/GrHOoPlVl4hDs9Fb5a6R\r\n" \ -"rmpXSt07GAxnG6j9jssA95E4rc1zO0CVKG5bvjVTxwi/sT0/VVX7VsJM4uTAQg==\r\n" \ -"-----END RSA PRIVATE KEY-----\r\n" - -#if defined _MSC_VER && !defined snprintf -#define snprintf _snprintf -#endif - -/* - * For heap usage estimates, we need an estimate of the overhead per allocated - * block. ptmalloc2/3 (used in gnu libc for instance) uses 2 size_t per block, - * so use that as our baseline. - */ -#define MEM_BLOCK_OVERHEAD ( 2 * sizeof( size_t ) ) - -/* - * Size to use for the malloc buffer if MEMORY_BUFFER_ALLOC_C is defined. - */ -#define HEAP_SIZE (1u << 16) // 64k - -#define BUFSIZE 1024 -#define HEADER_FORMAT " %-24s : " -#define TITLE_LEN 25 - -#define OPTIONS \ - "md4, md5, ripemd160, sha1, sha256, sha512,\r\n" \ - "arc4, des3, des, aes_cbc, aes_gcm, aes_ccm, camellia, blowfish,\r\n" \ - "havege, ctr_drbg, hmac_drbg\r\n" \ - "rsa, dhm, ecdsa, ecdh.\r\n" - -#if defined(MBEDTLS_ERROR_C) -#define PRINT_ERROR \ - mbedtls_strerror( ret, ( char * )tmp, sizeof( tmp ) ); \ - mbedtls_printf( "FAILED: %s\r\n", tmp ); -#else -#define PRINT_ERROR \ - mbedtls_printf( "FAILED: -0x%04x\r\n", -ret ); -#endif - -static unsigned long mbedtls_timing_hardclock( void ) -{ - static int dwt_started = 0; - - if( dwt_started == 0 ) - { - CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; - DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; - } - - return( DWT->CYCCNT ); -} - -static volatile int alarmed; -static void alarm() { alarmed = 1; } - -#define TIME_AND_TSC( TITLE, CODE ) \ -do { \ - unsigned long i, j, tsc; \ - Timeout t; \ - \ - mbedtls_printf( HEADER_FORMAT, TITLE ); \ - fflush( stdout ); \ - \ - for( i = 1, alarmed = 0, t.attach( alarm, 1.0 ); !alarmed; i++ ) \ - { \ - CODE; \ - } \ - \ - tsc = mbedtls_timing_hardclock(); \ - for( j = 0; j < 1024; j++ ) \ - { \ - CODE; \ - } \ - \ - mbedtls_printf( "%9lu Kb/s, %9lu cycles/byte\r\n", \ - i * BUFSIZE / 1024, \ - ( mbedtls_timing_hardclock() - tsc ) / ( j * BUFSIZE ) ); \ -} while( 0 ) - -#if defined(MBEDTLS_ERROR_C) -#define PRINT_ERROR \ - mbedtls_strerror( ret, ( char * )tmp, sizeof( tmp ) ); \ - mbedtls_printf( "FAILED: %s\r\n", tmp ); -#else -#define PRINT_ERROR \ - mbedtls_printf( "FAILED: -0x%04x\r\n", -ret ); -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG) - -#define MEMORY_MEASURE_INIT \ - size_t max_used, max_blocks, max_bytes; \ - size_t prv_used, prv_blocks; \ - mbedtls_memory_buffer_alloc_cur_get( &prv_used, &prv_blocks ); \ - mbedtls_memory_buffer_alloc_max_reset( ); - -#define MEMORY_MEASURE_PRINT( title_len ) \ - mbedtls_memory_buffer_alloc_max_get( &max_used, &max_blocks ); \ - for( i = 12 - title_len; i != 0; i-- ) mbedtls_printf( " " ); \ - max_used -= prv_used; \ - max_blocks -= prv_blocks; \ - max_bytes = max_used + MEM_BLOCK_OVERHEAD * max_blocks; \ - mbedtls_printf( "%6u heap bytes", (unsigned) max_bytes ); - -#else -#define MEMORY_MEASURE_INIT -#define MEMORY_MEASURE_PRINT( title_len ) -#endif - -#define TIME_PUBLIC( TITLE, TYPE, CODE ) \ -do { \ - unsigned long ms; \ - int ret = 0; \ - Timer t; \ - MEMORY_MEASURE_INIT; \ - \ - mbedtls_printf( HEADER_FORMAT, TITLE ); \ - fflush( stdout ); \ - \ - t.start(); \ - CODE; \ - t.stop(); \ - ms = t.read_ms(); \ - \ - if( ret != 0 ) \ - { \ - PRINT_ERROR; \ - } \ - else \ - { \ - mbedtls_printf( "%6lu ms/" TYPE, ms ); \ - MEMORY_MEASURE_PRINT( sizeof( TYPE ) + 1 ); \ - mbedtls_printf( "\r\n" ); \ - } \ -} while( 0 ) - -static int myrand( void *rng_state, unsigned char *output, size_t len ) -{ - size_t use_len; - int rnd; - - if( rng_state != NULL ) - rng_state = NULL; - - while( len > 0 ) - { - use_len = len; - if( use_len > sizeof(int) ) - use_len = sizeof(int); - - rnd = rand(); - memcpy( output, &rnd, use_len ); - output += use_len; - len -= use_len; - } - - return( 0 ); -} - -/* - * Clear some memory that was used to prepare the context - */ -#if defined(MBEDTLS_ECP_C) -void ecp_clear_precomputed( mbedtls_ecp_group *grp ) -{ - if( grp->T != NULL ) - { - size_t i; - for( i = 0; i < grp->T_size; i++ ) - mbedtls_ecp_point_free( &grp->T[i] ); - mbedtls_free( grp->T ); - } - grp->T = NULL; - grp->T_size = 0; -} -#else -#define ecp_clear_precomputed( g ) -#endif - -unsigned char buf[BUFSIZE]; - -typedef struct { - char md4, md5, ripemd160, sha1, sha256, sha512, - arc4, des3, des, aes_cbc, aes_gcm, aes_ccm, camellia, blowfish, - havege, ctr_drbg, hmac_drbg, - rsa, dhm, ecdsa, ecdh; -} todo_list; - -int benchmark( int argc, char *argv[] ) -{ - int i; - unsigned char tmp[200]; - char title[TITLE_LEN]; - todo_list todo; -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - unsigned char malloc_buf[HEAP_SIZE] = { 0 }; -#endif - - if( argc <= 1 ) - { - memset( &todo, 1, sizeof( todo ) ); - } - else - { - memset( &todo, 0, sizeof( todo ) ); - - for( i = 1; i < argc; i++ ) - { - if( strcmp( argv[i], "md4" ) == 0 ) - todo.md4 = 1; - else if( strcmp( argv[i], "md5" ) == 0 ) - todo.md5 = 1; - else if( strcmp( argv[i], "ripemd160" ) == 0 ) - todo.ripemd160 = 1; - else if( strcmp( argv[i], "sha1" ) == 0 ) - todo.sha1 = 1; - else if( strcmp( argv[i], "sha256" ) == 0 ) - todo.sha256 = 1; - else if( strcmp( argv[i], "sha512" ) == 0 ) - todo.sha512 = 1; - else if( strcmp( argv[i], "arc4" ) == 0 ) - todo.arc4 = 1; - else if( strcmp( argv[i], "des3" ) == 0 ) - todo.des3 = 1; - else if( strcmp( argv[i], "des" ) == 0 ) - todo.des = 1; - else if( strcmp( argv[i], "aes_cbc" ) == 0 ) - todo.aes_cbc = 1; - else if( strcmp( argv[i], "aes_gcm" ) == 0 ) - todo.aes_gcm = 1; - else if( strcmp( argv[i], "aes_ccm" ) == 0 ) - todo.aes_ccm = 1; - else if( strcmp( argv[i], "camellia" ) == 0 ) - todo.camellia = 1; - else if( strcmp( argv[i], "blowfish" ) == 0 ) - todo.blowfish = 1; - else if( strcmp( argv[i], "havege" ) == 0 ) - todo.havege = 1; - else if( strcmp( argv[i], "ctr_drbg" ) == 0 ) - todo.ctr_drbg = 1; - else if( strcmp( argv[i], "hmac_drbg" ) == 0 ) - todo.hmac_drbg = 1; - else if( strcmp( argv[i], "rsa" ) == 0 ) - todo.rsa = 1; - else if( strcmp( argv[i], "dhm" ) == 0 ) - todo.dhm = 1; - else if( strcmp( argv[i], "ecdsa" ) == 0 ) - todo.ecdsa = 1; - else if( strcmp( argv[i], "ecdh" ) == 0 ) - todo.ecdh = 1; - else - { - mbedtls_printf( "Unrecognized option: %s\r\n", argv[i] ); - mbedtls_printf( "Available options: " OPTIONS ); - } - } - } - - mbedtls_printf( "\r\n\r\n" ); - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_init( malloc_buf, sizeof( malloc_buf ) ); -#endif - memset( buf, 0xAA, sizeof( buf ) ); - memset( tmp, 0xBB, sizeof( tmp ) ); - -#if defined(MBEDTLS_MD4_C) - if( todo.md4 ) - TIME_AND_TSC( "MD4", mbedtls_md4( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_MD5_C) - if( todo.md5 ) - TIME_AND_TSC( "MD5", mbedtls_md5( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_RIPEMD160_C) - if( todo.ripemd160 ) - TIME_AND_TSC( "RIPEMD160", mbedtls_ripemd160( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_SHA1_C) - if( todo.sha1 ) - TIME_AND_TSC( "SHA-1", mbedtls_sha1( buf, BUFSIZE, tmp ) ); -#endif - -#if defined(MBEDTLS_SHA256_C) - if( todo.sha256 ) - TIME_AND_TSC( "SHA-256", mbedtls_sha256( buf, BUFSIZE, tmp, 0 ) ); -#endif - -#if defined(MBEDTLS_SHA512_C) - if( todo.sha512 ) - TIME_AND_TSC( "SHA-512", mbedtls_sha512( buf, BUFSIZE, tmp, 0 ) ); -#endif - -#if defined(MBEDTLS_ARC4_C) - if( todo.arc4 ) - { - mbedtls_arc4_context arc4; - mbedtls_arc4_init( &arc4 ); - mbedtls_arc4_setup( &arc4, tmp, 32 ); - TIME_AND_TSC( "ARC4", mbedtls_arc4_crypt( &arc4, BUFSIZE, buf, buf ) ); - mbedtls_arc4_free( &arc4 ); - } -#endif - -#if defined(MBEDTLS_DES_C) && defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.des3 ) - { - mbedtls_des3_context des3; - mbedtls_des3_init( &des3 ); - mbedtls_des3_set3key_enc( &des3, tmp ); - TIME_AND_TSC( "3DES", - mbedtls_des3_crypt_cbc( &des3, MBEDTLS_DES_ENCRYPT, BUFSIZE, tmp, buf, buf ) ); - mbedtls_des3_free( &des3 ); - } - - if( todo.des ) - { - mbedtls_des_context des; - mbedtls_des_init( &des ); - mbedtls_des_setkey_enc( &des, tmp ); - TIME_AND_TSC( "DES", - mbedtls_des_crypt_cbc( &des, MBEDTLS_DES_ENCRYPT, BUFSIZE, tmp, buf, buf ) ); - mbedtls_des_free( &des ); - } -#endif - -#if defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.aes_cbc ) - { - int keysize; - mbedtls_aes_context aes; - mbedtls_aes_init( &aes ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "AES-CBC-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_aes_setkey_enc( &aes, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_aes_crypt_cbc( &aes, MBEDTLS_AES_ENCRYPT, BUFSIZE, tmp, buf, buf ) ); - } - mbedtls_aes_free( &aes ); - } -#endif -#if defined(MBEDTLS_GCM_C) - if( todo.aes_gcm ) - { - int keysize; - mbedtls_gcm_context gcm; - - mbedtls_gcm_init( &gcm ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "AES-GCM-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_gcm_setkey( &gcm, MBEDTLS_CIPHER_ID_AES, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_gcm_crypt_and_tag( &gcm, MBEDTLS_GCM_ENCRYPT, BUFSIZE, tmp, - 12, NULL, 0, buf, buf, 16, tmp ) ); - - mbedtls_gcm_free( &gcm ); - } - } -#endif -#if defined(MBEDTLS_CCM_C) - if( todo.aes_ccm ) - { - int keysize; - mbedtls_ccm_context ccm; - - mbedtls_ccm_init( &ccm ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "AES-CCM-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_ccm_setkey( &ccm, MBEDTLS_CIPHER_ID_AES, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_ccm_encrypt_and_tag( &ccm, BUFSIZE, tmp, - 12, NULL, 0, buf, buf, tmp, 16 ) ); - - mbedtls_ccm_free( &ccm ); - } - } -#endif -#endif - -#if defined(MBEDTLS_CAMELLIA_C) && defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.camellia ) - { - int keysize; - mbedtls_camellia_context camellia; - mbedtls_camellia_init( &camellia ); - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "CAMELLIA-CBC-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_camellia_setkey_enc( &camellia, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_camellia_crypt_cbc( &camellia, MBEDTLS_CAMELLIA_ENCRYPT, - BUFSIZE, tmp, buf, buf ) ); - } - mbedtls_camellia_free( &camellia ); - } -#endif - -#if defined(MBEDTLS_BLOWFISH_C) && defined(MBEDTLS_CIPHER_MODE_CBC) - if( todo.blowfish ) - { - int keysize; - mbedtls_blowfish_context blowfish; - mbedtls_blowfish_init( &blowfish ); - - for( keysize = 128; keysize <= 256; keysize += 64 ) - { - mbedtls_snprintf( title, sizeof( title ), "BLOWFISH-CBC-%d", keysize ); - - memset( buf, 0, sizeof( buf ) ); - memset( tmp, 0, sizeof( tmp ) ); - mbedtls_blowfish_setkey( &blowfish, tmp, keysize ); - - TIME_AND_TSC( title, - mbedtls_blowfish_crypt_cbc( &blowfish, MBEDTLS_BLOWFISH_ENCRYPT, BUFSIZE, - tmp, buf, buf ) ); - } - - mbedtls_blowfish_free( &blowfish ); - } -#endif - -#if defined(MBEDTLS_HAVEGE_C) - if( todo.havege ) - { - mbedtls_havege_state hs; - mbedtls_havege_init( &hs ); - TIME_AND_TSC( "HAVEGE", mbedtls_havege_random( &hs, buf, BUFSIZE ) ); - mbedtls_havege_free( &hs ); - } -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) - if( todo.ctr_drbg ) - { - mbedtls_ctr_drbg_context ctr_drbg; - - mbedtls_ctr_drbg_init( &ctr_drbg ); - - if( mbedtls_ctr_drbg_seed( &ctr_drbg, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - TIME_AND_TSC( "CTR_DRBG (NOPR)", - if( mbedtls_ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - - if( mbedtls_ctr_drbg_seed( &ctr_drbg, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - mbedtls_ctr_drbg_set_prediction_resistance( &ctr_drbg, MBEDTLS_CTR_DRBG_PR_ON ); - TIME_AND_TSC( "CTR_DRBG (PR)", - if( mbedtls_ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_ctr_drbg_free( &ctr_drbg ); - } -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) - if( todo.hmac_drbg ) - { - mbedtls_hmac_drbg_context hmac_drbg; - const mbedtls_md_info_t *md_info; - - mbedtls_hmac_drbg_init( &hmac_drbg ); - -#if defined(MBEDTLS_SHA1_C) - if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ) ) == NULL ) - mbedtls_exit(1); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - TIME_AND_TSC( "HMAC_DRBG SHA-1 (NOPR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - mbedtls_hmac_drbg_set_prediction_resistance( &hmac_drbg, - MBEDTLS_HMAC_DRBG_PR_ON ); - TIME_AND_TSC( "HMAC_DRBG SHA-1 (PR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); -#endif - -#if defined(MBEDTLS_SHA256_C) - if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ) ) == NULL ) - mbedtls_exit(1); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - TIME_AND_TSC( "HMAC_DRBG SHA-256 (NOPR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); - - if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) - mbedtls_exit(1); - mbedtls_hmac_drbg_set_prediction_resistance( &hmac_drbg, - MBEDTLS_HMAC_DRBG_PR_ON ); - TIME_AND_TSC( "HMAC_DRBG SHA-256 (PR)", - if( mbedtls_hmac_drbg_random( &hmac_drbg, buf, BUFSIZE ) != 0 ) - mbedtls_exit(1) ); - mbedtls_hmac_drbg_free( &hmac_drbg ); -#endif - } -#endif - -#if defined(MBEDTLS_RSA_C) && \ - defined(MBEDTLS_PEM_PARSE_C) && defined(MBEDTLS_PK_PARSE_C) - if( todo.rsa ) - { - mbedtls_pk_context pk; - mbedtls_rsa_context *rsa; - const char *rsa_keys[] = { RSA_PRIVATE_KEY_2048, RSA_PRIVATE_KEY_4096 }; - size_t i; - - for( i = 0; i < sizeof( rsa_keys ) / sizeof( rsa_keys[0] ); i++ ) - { - mbedtls_pk_init( &pk ); - mbedtls_pk_parse_key( &pk, (const unsigned char *) rsa_keys[i], - strlen( rsa_keys[i] ) + 1, NULL, 0 ); - rsa = mbedtls_pk_rsa( pk ); - - mbedtls_snprintf( title, sizeof( title ), "RSA-%d", mbedtls_pk_get_bitlen( &pk ) ); - - TIME_PUBLIC( title, " public", - buf[0] = 0; - ret = mbedtls_rsa_public( rsa, buf, buf ) ); - - TIME_PUBLIC( title, "private", - buf[0] = 0; - ret = mbedtls_rsa_private( rsa, myrand, NULL, buf, buf ) ); - - mbedtls_pk_free( &pk ); - } - } -#endif - -#if defined(MBEDTLS_DHM_C) && defined(MBEDTLS_BIGNUM_C) - if( todo.dhm ) - { - int dhm_sizes[] = { 2048, 3072 }; - const char *dhm_P[] = { - MBEDTLS_DHM_RFC3526_MODP_2048_P, - MBEDTLS_DHM_RFC3526_MODP_3072_P, - }; - const char *dhm_G[] = { - MBEDTLS_DHM_RFC3526_MODP_2048_G, - MBEDTLS_DHM_RFC3526_MODP_3072_G, - }; - - mbedtls_dhm_context dhm; - size_t olen; - for( i = 0; (size_t) i < sizeof( dhm_sizes ) / sizeof( dhm_sizes[0] ); i++ ) - { - mbedtls_dhm_init( &dhm ); - - if( mbedtls_mpi_read_string( &dhm.P, 16, dhm_P[i] ) != 0 || - mbedtls_mpi_read_string( &dhm.G, 16, dhm_G[i] ) != 0 ) - { - mbedtls_exit( 1 ); - } - - dhm.len = mbedtls_mpi_size( &dhm.P ); - mbedtls_dhm_make_public( &dhm, (int) dhm.len, buf, dhm.len, myrand, NULL ); - if( mbedtls_mpi_copy( &dhm.GY, &dhm.GX ) != 0 ) - mbedtls_exit( 1 ); - - mbedtls_snprintf( title, sizeof( title ), "DHE-%d", dhm_sizes[i] ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_dhm_make_public( &dhm, (int) dhm.len, buf, dhm.len, - myrand, NULL ); - ret |= mbedtls_dhm_calc_secret( &dhm, buf, sizeof( buf ), &olen, myrand, NULL ) ); - - mbedtls_snprintf( title, sizeof( title ), "DH-%d", dhm_sizes[i] ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_dhm_calc_secret( &dhm, buf, sizeof( buf ), &olen, myrand, NULL ) ); - - mbedtls_dhm_free( &dhm ); - } - } -#endif - -#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_SHA256_C) - if( todo.ecdsa ) - { - mbedtls_ecdsa_context ecdsa; - const mbedtls_ecp_curve_info *curve_info; - size_t sig_len; - - memset( buf, 0x2A, sizeof( buf ) ); - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdsa_init( &ecdsa ); - - if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 ) - mbedtls_exit( 1 ); - ecp_clear_precomputed( &ecdsa.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDSA-%s", - curve_info->name ); - TIME_PUBLIC( title, "sign", - ret = mbedtls_ecdsa_write_signature( &ecdsa, MBEDTLS_MD_SHA256, buf, curve_info->bit_size, - tmp, &sig_len, myrand, NULL ) ); - - mbedtls_ecdsa_free( &ecdsa ); - } - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdsa_init( &ecdsa ); - - if( mbedtls_ecdsa_genkey( &ecdsa, curve_info->grp_id, myrand, NULL ) != 0 || - mbedtls_ecdsa_write_signature( &ecdsa, MBEDTLS_MD_SHA256, buf, curve_info->bit_size, - tmp, &sig_len, myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - ecp_clear_precomputed( &ecdsa.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDSA-%s", - curve_info->name ); - TIME_PUBLIC( title, "verify", - ret = mbedtls_ecdsa_read_signature( &ecdsa, buf, curve_info->bit_size, - tmp, sig_len ) ); - - mbedtls_ecdsa_free( &ecdsa ); - } - } -#endif - -#if defined(MBEDTLS_ECDH_C) - if( todo.ecdh ) - { - mbedtls_ecdh_context ecdh; -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - mbedtls_mpi z; -#endif - const mbedtls_ecp_curve_info *curve_info; - size_t olen; - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdh_init( &ecdh ); - - if( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) != 0 || - mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ) != 0 || - mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) != 0 ) - { - mbedtls_exit( 1 ); - } - ecp_clear_precomputed( &ecdh.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDHE-%s", - curve_info->name ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ); - ret |= mbedtls_ecdh_calc_secret( &ecdh, &olen, buf, sizeof( buf ), - myrand, NULL ) ); - mbedtls_ecdh_free( &ecdh ); - } - - /* Curve25519 needs to be handled separately */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - mbedtls_ecdh_init( &ecdh ); - mbedtls_mpi_init( &z ); - - if( mbedtls_ecp_group_load( &ecdh.grp, MBEDTLS_ECP_DP_CURVE25519 ) != 0 || - mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Qp, myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - - TIME_PUBLIC( "ECDHE-Curve25519", "handshake", - ret |= mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Q, - myrand, NULL ); - ret |= mbedtls_ecdh_compute_shared( &ecdh.grp, &z, &ecdh.Qp, &ecdh.d, - myrand, NULL ) ); - - mbedtls_ecdh_free( &ecdh ); - mbedtls_mpi_free( &z ); -#endif - - for( curve_info = mbedtls_ecp_curve_list(); - curve_info->grp_id != MBEDTLS_ECP_DP_NONE; - curve_info++ ) - { - mbedtls_ecdh_init( &ecdh ); - - if( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) != 0 || - mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ) != 0 || - mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) != 0 || - mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), - myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - ecp_clear_precomputed( &ecdh.grp ); - - mbedtls_snprintf( title, sizeof( title ), "ECDH-%s", - curve_info->name ); - TIME_PUBLIC( title, "handshake", - ret |= mbedtls_ecdh_calc_secret( &ecdh, &olen, buf, sizeof( buf ), - myrand, NULL ) ); - mbedtls_ecdh_free( &ecdh ); - } - - /* Curve25519 needs to be handled separately */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - mbedtls_ecdh_init( &ecdh ); - mbedtls_mpi_init( &z ); - - if( mbedtls_ecp_group_load( &ecdh.grp, MBEDTLS_ECP_DP_CURVE25519 ) != 0 || - mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Qp, - myrand, NULL ) != 0 || - mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Q, myrand, NULL ) != 0 ) - { - mbedtls_exit( 1 ); - } - - TIME_PUBLIC( "ECDH-Curve25519", "handshake", - ret |= mbedtls_ecdh_compute_shared( &ecdh.grp, &z, &ecdh.Qp, &ecdh.d, - myrand, NULL ) ); - - mbedtls_ecdh_free( &ecdh ); - mbedtls_mpi_free( &z ); -#endif - } -#endif - - mbedtls_printf( "\r\n" ); - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_free(); -#endif - -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\r\n" ); - fflush( stdout ); getchar(); -#endif - - return( 0 ); -} - -#include "mbed-drivers/test_env.h" -#include "minar/minar.h" - -static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - - MBED_HOSTTEST_TIMEOUT(150); - MBED_HOSTTEST_SELECT(default); - MBED_HOSTTEST_DESCRIPTION(mbed TLS benchmark program); - MBED_HOSTTEST_START("MBEDTLS_BENCHMARK"); - MBED_HOSTTEST_RESULT(benchmark(0, NULL) == 0); -} - -void app_start(int, char*[]) { - minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); -} - -#endif /* TARGET_LIKE_MBED */ diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/README.md b/build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/README.md deleted file mode 100644 index 553c3a618e..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# SHA-256 Hash Example - -This application performs hashing of a buffer with SHA-256 using various APIs. It serves as a tutorial for the basic hashing APIs of mbed TLS. - -## Pre-requisites - -To build and run this example you must have: - -* A computer with the following software installed: - * [CMake](http://www.cmake.org/download/). - * [yotta](https://github.com/ARMmbed/yotta). Please note that **yotta has its own set of dependencies**, listed in the [installation instructions](http://armmbed.github.io/yotta/#installing-on-windows). - * [Python](https://www.python.org/downloads/). - * [The ARM GCC toolchain](https://launchpad.net/gcc-arm-embedded). - * A serial terminal emulator (Like screen, pySerial and cu). -* An [FRDM-K64F](http://developer.mbed.org/platforms/FRDM-K64F/) development board, or another board supported by mbed OS (in which case you'll have to substitute frdm-k64f-gcc with the appropriate target in the instructions below). -* A micro-USB cable. -* If your OS is Windows, please follow the installation instructions [for the serial port driver](https://developer.mbed.org/handbook/Windows-serial-configuration). - -## Getting started - -1. Connect the FRDM-K64F to the computer with the micro-USB cable, being careful to use the "OpenSDA" connector on the target board. - -2. Navigate to the mbedtls directory supplied with your release and open a terminal. - -3. Set the yotta target: - - ``` - yotta target frdm-k64f-gcc - ``` - -4. Build mbedtls and the examples. This may take a long time if this is your first compilation: - - ``` - $ yotta build - ``` - -5. Copy `build/frdm-k64f-gcc/test/mbedtls-test-example-hashing.bin` to your mbed board and wait until the LED next to the USB port stops blinking. - -6. Start the serial terminal emulator and connect to the virtual serial port presented by FRDM-K64F. - - Use the following settings: - - * 115200 baud (not 9600). - * 8N1. - * No flow control. - -7. Press the Reset button on the board. - -8. The output in the terminal window should look like: - - ``` - {{timeout;10}} - {{host_test_name;default}} - {{description;mbed TLS example on hashing}} - {{test_id;MBEDTLS_EX_HASHING}} - {{start}} - - - Method 1: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3 - Method 2: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3 - Method 3: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3 - Method 4: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3 - - DONE - {{success}} - {{end}} - ``` diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/main.cpp b/build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/main.cpp deleted file mode 100644 index 27c469ba52..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-hashing/main.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Hello world example of using the hashing functions of mbed TLS - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * This program illustrates various ways of hashing a buffer. - * You normally need only one of these two includes. - */ -#include "mbedtls/sha256.h" /* SHA-256 only */ -#include "mbedtls/md.h" /* generic interface */ - -#if defined(TARGET_LIKE_MBED) -#include "mbed-drivers/mbed.h" -#endif -#include - -static void print_hex(const char *title, const unsigned char buf[], size_t len) -{ - printf("%s: ", title); - - for (size_t i = 0; i < len; i++) - printf("%02x", buf[i]); - - printf("\r\n"); -} - -static const char hello_str[] = "Hello, world!"; -static const unsigned char *hello_buffer = (const unsigned char *) hello_str; -static const size_t hello_len = sizeof hello_str - 1; - -int example(void) -{ - printf( "\r\n\r\n" ); - - /* - * Method 1: use all-in-one function of a specific SHA-xxx module - */ - unsigned char output1[32]; /* SHA-256 outputs 32 bytes */ - - /* 0 here means use the full SHA-256, not the SHA-224 variant */ - mbedtls_sha256(hello_buffer, hello_len, output1, 0); - - print_hex("Method 1", output1, sizeof output1); - - - /* - * Method 2: use the streaming interface of a specific SHA-xxx module - * This is useful if we get our input piecewise. - */ - unsigned char output2[32]; - mbedtls_sha256_context ctx2; - - mbedtls_sha256_init(&ctx2); - mbedtls_sha256_starts(&ctx2, 0); /* SHA-256, not 224 */ - - /* Simulating multiple fragments */ - mbedtls_sha256_update(&ctx2, hello_buffer, 1); - mbedtls_sha256_update(&ctx2, hello_buffer + 1, 1); - mbedtls_sha256_update(&ctx2, hello_buffer + 2, hello_len - 2); - - mbedtls_sha256_finish(&ctx2, output2); - print_hex("Method 2", output2, sizeof output2); - - /* Or you could re-use the context by doing mbedtls_sha256_starts() again */ - mbedtls_sha256_free(&ctx2); - - /* - * Method 3: use all-in-one function of the generice interface - */ - unsigned char output3[MBEDTLS_MD_MAX_SIZE]; /* Enough for any hash */ - - /* Can easily pick any hash you want, by identifier */ - const mbedtls_md_info_t *md_info3 = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); - - if (md_info3 == NULL) - { - printf("SHA256 not available\r\n"); - return 1; - } - - int ret3 = mbedtls_md(md_info3, hello_buffer, hello_len, output3); - - if (ret3 != 0) - { - printf("md() returned -0x%04X\r\n", -ret3); - return 1; - } - - print_hex("Method 3", output3, mbedtls_md_get_size(md_info3)); - - - /* - * Method 4: streaming & generic interface - */ - unsigned char output4[MBEDTLS_MD_MAX_SIZE]; /* Enough for any hash */ - - const mbedtls_md_info_t *md_info4 = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256); - - if (md_info4 == NULL) - { - printf("SHA256 not available\r\n"); - return 1; - } - - mbedtls_md_context_t ctx4; - - mbedtls_md_init(&ctx4); - - int ret4 = mbedtls_md_init_ctx(&ctx4, md_info4); - if (ret4 != 0) - { - printf("md_init_ctx() returned -0x%04X\r\n", -ret4); - return 1; - } - - mbedtls_md_starts(&ctx4); - - /* Simulating multiple fragments */ - mbedtls_md_update(&ctx4, hello_buffer, 1); - mbedtls_md_update(&ctx4, hello_buffer + 1, 1); - mbedtls_md_update(&ctx4, hello_buffer + 2, hello_len - 2); - - mbedtls_md_finish(&ctx4, output4); - print_hex("Method 4", output4, mbedtls_md_get_size(md_info4)); - - /* Or you could re-use the context by doing mbedtls_md_starts() again */ - mbedtls_md_free(&ctx4); - - - printf("\r\nDONE\r\n"); - - return 0; -} - -#if defined(TARGET_LIKE_MBED) - -#include "mbed-drivers/test_env.h" -#include "minar/minar.h" - -static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - - MBED_HOSTTEST_TIMEOUT(10); - MBED_HOSTTEST_SELECT(default); - MBED_HOSTTEST_DESCRIPTION(mbed TLS example on hashing); - MBED_HOSTTEST_START("MBEDTLS_EX_HASHING"); - MBED_HOSTTEST_RESULT(example() == 0); -} - -void app_start(int, char*[]) { - minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); -} - -#else - -int main() { - return example(); -} - -#endif diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/README.md b/build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/README.md deleted file mode 100644 index 5bc22a6850..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# mbed TLS Selftest Example - -This application runs the various selftest functions of individual mbed TLS components. It serves as a basic sanity check to verify operation of mbed TLS on your platform. In the future, a wider portion of the mbed TLS test suite will become part of this example application. - -## Pre-requisites - -To build and run this example you must have: - -* A computer with the following software installed: - * [CMake](http://www.cmake.org/download/). - * [yotta](https://github.com/ARMmbed/yotta). Please note that **yotta has its own set of dependencies**, listed in the [installation instructions](http://armmbed.github.io/yotta/#installing-on-windows). - * [Python](https://www.python.org/downloads/). - * [The ARM GCC toolchain](https://launchpad.net/gcc-arm-embedded). - * A serial terminal emulator (Like screen, pySerial and cu). -* An [FRDM-K64F](http://developer.mbed.org/platforms/FRDM-K64F/) development board, or another board supported by mbed OS (in which case you'll have to substitute frdm-k64f-gcc with the appropriate target in the instructions below). -* A micro-USB cable. -* If your OS is Windows, please follow the installation instructions [for the serial port driver](https://developer.mbed.org/handbook/Windows-serial-configuration). - -## Getting started - -1. Connect the FRDM-K64F to the computer with the micro-USB cable, being careful to use the "OpenSDA" connector on the target board. - -2. Navigate to the mbedtls directory supplied with your release and open a terminal. - -3. Set the yotta target: - - ``` - yotta target frdm-k64f-gcc - ``` - -4. Build mbedtls and the examples. This may take a long time if this is your first compilation: - - ``` - $ yotta build - ``` - -5. Copy `build/frdm-k64f-gcc/test/mbedtls-test-example-selftest.bin` to your mbed board and wait until the LED next to the USB port stops blinking. - -6. Start the serial terminal emulator and connect to the virtual serial port presented by FRDM-K64F. - - Use the following settings: - - * 115200 baud (not 9600). - * 8N1. - * No flow control. - -7. Press the Reset button on the board. - -8. The output in the terminal window should look like: - - ``` - {{timeout;40}} - {{host_test_name;default}} - {{description;mbed TLS selftest program}} - {{test_id;MBEDTLS_SELFTEST}} - {{start}} - - SHA-224 test #1: passed - SHA-224 test #2: passed - SHA-224 test #3: passed - SHA-256 test #1: passed - SHA-256 test #2: passed - SHA-256 test #3: passed - - [ ... several lines omitted ... ] - - CTR_DRBG (PR = TRUE) : passed - CTR_DRBG (PR = FALSE): passed - - HMAC_DRBG (PR = True) : passed - HMAC_DRBG (PR = False) : passed - - ECP test #1 (constant op_count, base point G): passed - ECP test #2 (constant op_count, other point): passed - - ENTROPY test: passed - - [ All tests passed ] - - {{success}} - {{end}} - ``` diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/main.cpp b/build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/main.cpp deleted file mode 100644 index b1b15f13bd..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/example-selftest/main.cpp +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Self-test demonstration program - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(POLARSSL_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include "mbedtls/entropy.h" -#include "mbedtls/hmac_drbg.h" -#include "mbedtls/ctr_drbg.h" -#include "mbedtls/dhm.h" -#include "mbedtls/gcm.h" -#include "mbedtls/ccm.h" -#include "mbedtls/md2.h" -#include "mbedtls/md4.h" -#include "mbedtls/md5.h" -#include "mbedtls/ripemd160.h" -#include "mbedtls/sha1.h" -#include "mbedtls/sha256.h" -#include "mbedtls/sha512.h" -#include "mbedtls/arc4.h" -#include "mbedtls/des.h" -#include "mbedtls/aes.h" -#include "mbedtls/camellia.h" -#include "mbedtls/base64.h" -#include "mbedtls/bignum.h" -#include "mbedtls/rsa.h" -#include "mbedtls/x509.h" -#include "mbedtls/xtea.h" -#include "mbedtls/pkcs5.h" -#include "mbedtls/ecp.h" - -#include -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" -#endif - -int selftest( int argc, char *argv[] ) -{ - int ret = 0, v; -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - unsigned char buf[1000000]; -#endif - - if( argc == 2 && strcmp( argv[1], "-quiet" ) == 0 ) - v = 0; - else - { - v = 1; - mbedtls_printf( "\n" ); - } - -#if defined(MBEDTLS_SELF_TEST) - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_init( buf, sizeof(buf) ); -#endif - -#if defined(MBEDTLS_MD2_C) - if( ( ret = mbedtls_md2_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_MD4_C) - if( ( ret = mbedtls_md4_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_MD5_C) - if( ( ret = mbedtls_md5_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_RIPEMD160_C) - if( ( ret = mbedtls_ripemd160_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_SHA1_C) - if( ( ret = mbedtls_sha1_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_SHA256_C) - if( ( ret = mbedtls_sha256_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_SHA512_C) - if( ( ret = mbedtls_sha512_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ARC4_C) - if( ( ret = mbedtls_arc4_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_DES_C) - if( ( ret = mbedtls_des_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_AES_C) - if( ( ret = mbedtls_aes_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_GCM_C) && defined(MBEDTLS_AES_C) - if( ( ret = mbedtls_gcm_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_CCM_C) && defined(MBEDTLS_AES_C) - if( ( ret = mbedtls_ccm_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_BASE64_C) - if( ( ret = mbedtls_base64_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_BIGNUM_C) - if( ( ret = mbedtls_mpi_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_RSA_C) - if( ( ret = mbedtls_rsa_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_X509_USE_C) - if( ( ret = mbedtls_x509_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_XTEA_C) - if( ( ret = mbedtls_xtea_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_CAMELLIA_C) - if( ( ret = mbedtls_camellia_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) - if( ( ret = mbedtls_ctr_drbg_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) - if( ( ret = mbedtls_hmac_drbg_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ECP_C) - if( ( ret = mbedtls_ecp_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_DHM_C) - if( ( ret = mbedtls_dhm_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_ENTROPY_C) - if( ( ret = mbedtls_entropy_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_PKCS5_C) - if( ( ret = mbedtls_pkcs5_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#if defined(MBEDTLS_TIMING_C) - if( ( ret = mbedtls_timing_self_test( v ) ) != 0 ) - return( ret ); -#endif - -#else - mbedtls_printf( " POLARSSL_SELF_TEST not defined.\n" ); -#endif - - if( v != 0 ) - { -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_memory_buffer_alloc_status(); -#endif - } - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - mbedtls_memory_buffer_alloc_free(); - - if( ( ret = mbedtls_memory_buffer_alloc_self_test( v ) ) != 0 ) - return( ret ); -#endif - - if( v != 0 ) - { - mbedtls_printf( " [ All tests passed ]\n\n" ); -#if defined(_WIN32) - mbedtls_printf( " Press Enter to exit this program.\n" ); - fflush( stdout ); getchar(); -#endif - } - - return( ret ); -} - -#if defined(TARGET_LIKE_MBED) - -#include "mbed-drivers/test_env.h" -#include "minar/minar.h" - -static void run() { - /* Use 115200 bps for consistency with other examples */ - Serial pc(USBTX, USBRX); - pc.baud(115200); - - MBED_HOSTTEST_TIMEOUT(40); - MBED_HOSTTEST_SELECT(default); - MBED_HOSTTEST_DESCRIPTION(mbed TLS selftest program); - MBED_HOSTTEST_START("MBEDTLS_SELFTEST"); - MBED_HOSTTEST_RESULT(selftest(0, NULL) == 0); -} - -void app_start(int, char*[]) { - minar::Scheduler::postCallback(mbed::util::FunctionPointer0(run).bind()); -} - -#else - -int main() { - return selftest(0, NULL); -} - -#endif diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/module.json b/build/premake/premake5/contrib/mbedtls/yotta/data/module.json deleted file mode 100644 index 6345f080ea..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/module.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "mbedtls", - "version": "2.2.1", - "description": "The mbed TLS crypto/SSL/TLS library", - "licenses": [ - { - "url": "https://spdx.org/licenses/Apache-2.0", - "type": "Apache-2.0" - } - ], - "dependencies": {}, - "targetDependencies": { - "mbed": { "cmsis-core": "^1.0.0" } - }, - "testTargetDependencies": { - "mbed": { "mbed-drivers": "~0.11.0" } - } -} diff --git a/build/premake/premake5/contrib/mbedtls/yotta/data/target_config.h b/build/premake/premake5/contrib/mbedtls/yotta/data/target_config.h deleted file mode 100644 index df1a208b3c..0000000000 --- a/build/premake/premake5/contrib/mbedtls/yotta/data/target_config.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Temporary target-specific config.h for entropy collection - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if defined(TARGET_LIKE_MBED) -#define MBEDTLS_NO_PLATFORM_ENTROPY -#undef MBEDTLS_HAVE_TIME_DATE -#undef MBEDTLS_FS_IO -#endif - -/* - * WARNING: this is a temporary hack! - * 2. This should be in a separete yotta module which would be a target - * dependency of mbedtls (see IOTSSL-313) - */ -#if defined(TARGET_LIKE_CORTEX_M4) -#define MBEDTLS_ENTROPY_HARDWARE_ALT -#endif diff --git a/build/premake/premake5/contrib/zlib/adler32.c b/build/premake/premake5/contrib/zlib/adler32.c deleted file mode 100644 index a868f073d8..0000000000 --- a/build/premake/premake5/contrib/zlib/adler32.c +++ /dev/null @@ -1,179 +0,0 @@ -/* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2011 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zutil.h" - -#define local static - -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); - -#define BASE 65521 /* largest prime smaller than 65536 */ -#define NMAX 5552 -/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ - -#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); -#define DO16(buf) DO8(buf,0); DO8(buf,8); - -/* use NO_DIVIDE if your processor does not do division in hardware -- - try it both ways to see which is faster */ -#ifdef NO_DIVIDE -/* note that this assumes BASE is 65521, where 65536 % 65521 == 15 - (thank you to John Reiser for pointing this out) */ -# define CHOP(a) \ - do { \ - unsigned long tmp = a >> 16; \ - a &= 0xffffUL; \ - a += (tmp << 4) - tmp; \ - } while (0) -# define MOD28(a) \ - do { \ - CHOP(a); \ - if (a >= BASE) a -= BASE; \ - } while (0) -# define MOD(a) \ - do { \ - CHOP(a); \ - MOD28(a); \ - } while (0) -# define MOD63(a) \ - do { /* this assumes a is not negative */ \ - z_off64_t tmp = a >> 32; \ - a &= 0xffffffffL; \ - a += (tmp << 8) - (tmp << 5) + tmp; \ - tmp = a >> 16; \ - a &= 0xffffL; \ - a += (tmp << 4) - tmp; \ - tmp = a >> 16; \ - a &= 0xffffL; \ - a += (tmp << 4) - tmp; \ - if (a >= BASE) a -= BASE; \ - } while (0) -#else -# define MOD(a) a %= BASE -# define MOD28(a) a %= BASE -# define MOD63(a) a %= BASE -#endif - -/* ========================================================================= */ -uLong ZEXPORT adler32(adler, buf, len) - uLong adler; - const Bytef *buf; - uInt len; -{ - unsigned long sum2; - unsigned n; - - /* split Adler-32 into component sums */ - sum2 = (adler >> 16) & 0xffff; - adler &= 0xffff; - - /* in case user likes doing a byte at a time, keep it fast */ - if (len == 1) { - adler += buf[0]; - if (adler >= BASE) - adler -= BASE; - sum2 += adler; - if (sum2 >= BASE) - sum2 -= BASE; - return adler | (sum2 << 16); - } - - /* initial Adler-32 value (deferred check for len == 1 speed) */ - if (buf == Z_NULL) - return 1L; - - /* in case short lengths are provided, keep it somewhat fast */ - if (len < 16) { - while (len--) { - adler += *buf++; - sum2 += adler; - } - if (adler >= BASE) - adler -= BASE; - MOD28(sum2); /* only added so many BASE's */ - return adler | (sum2 << 16); - } - - /* do length NMAX blocks -- requires just one modulo operation */ - while (len >= NMAX) { - len -= NMAX; - n = NMAX / 16; /* NMAX is divisible by 16 */ - do { - DO16(buf); /* 16 sums unrolled */ - buf += 16; - } while (--n); - MOD(adler); - MOD(sum2); - } - - /* do remaining bytes (less than NMAX, still just one modulo) */ - if (len) { /* avoid modulos if none remaining */ - while (len >= 16) { - len -= 16; - DO16(buf); - buf += 16; - } - while (len--) { - adler += *buf++; - sum2 += adler; - } - MOD(adler); - MOD(sum2); - } - - /* return recombined sums */ - return adler | (sum2 << 16); -} - -/* ========================================================================= */ -local uLong adler32_combine_(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ - unsigned long sum1; - unsigned long sum2; - unsigned rem; - - /* for negative len, return invalid adler32 as a clue for debugging */ - if (len2 < 0) - return 0xffffffffUL; - - /* the derivation of this formula is left as an exercise for the reader */ - MOD63(len2); /* assumes len2 >= 0 */ - rem = (unsigned)len2; - sum1 = adler1 & 0xffff; - sum2 = rem * sum1; - MOD(sum2); - sum1 += (adler2 & 0xffff) + BASE - 1; - sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; - if (sum1 >= BASE) sum1 -= BASE; - if (sum1 >= BASE) sum1 -= BASE; - if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); - if (sum2 >= BASE) sum2 -= BASE; - return sum1 | (sum2 << 16); -} - -/* ========================================================================= */ -uLong ZEXPORT adler32_combine(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off_t len2; -{ - return adler32_combine_(adler1, adler2, len2); -} - -uLong ZEXPORT adler32_combine64(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ - return adler32_combine_(adler1, adler2, len2); -} diff --git a/build/premake/premake5/contrib/zlib/compress.c b/build/premake/premake5/contrib/zlib/compress.c deleted file mode 100644 index 6e9762676a..0000000000 --- a/build/premake/premake5/contrib/zlib/compress.c +++ /dev/null @@ -1,80 +0,0 @@ -/* compress.c -- compress a memory buffer - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#define ZLIB_INTERNAL -#include "zlib.h" - -/* =========================================================================== - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least 0.1% larger than sourceLen plus - 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ -int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; - int level; -{ - z_stream stream; - int err; - - stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -#endif - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - stream.opaque = (voidpf)0; - - err = deflateInit(&stream, level); - if (err != Z_OK) return err; - - err = deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - deflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; - - err = deflateEnd(&stream); - return err; -} - -/* =========================================================================== - */ -int ZEXPORT compress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); -} - -/* =========================================================================== - If the default memLevel or windowBits for deflateInit() is changed, then - this function needs to be updated. - */ -uLong ZEXPORT compressBound (sourceLen) - uLong sourceLen; -{ - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + - (sourceLen >> 25) + 13; -} diff --git a/build/premake/premake5/contrib/zlib/crc32.c b/build/premake/premake5/contrib/zlib/crc32.c deleted file mode 100644 index 979a7190a3..0000000000 --- a/build/premake/premake5/contrib/zlib/crc32.c +++ /dev/null @@ -1,425 +0,0 @@ -/* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Thanks to Rodney Brown for his contribution of faster - * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing - * tables for updating the shift register in one step with three exclusive-ors - * instead of four steps with four exclusive-ors. This results in about a - * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. - */ - -/* @(#) $Id$ */ - -/* - Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore - protection on the static variables used to control the first-use generation - of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should - first call get_crc_table() to initialize the tables before allowing more than - one thread to use crc32(). - - DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h. - */ - -#ifdef MAKECRCH -# include -# ifndef DYNAMIC_CRC_TABLE -# define DYNAMIC_CRC_TABLE -# endif /* !DYNAMIC_CRC_TABLE */ -#endif /* MAKECRCH */ - -#include "zutil.h" /* for STDC and FAR definitions */ - -#define local static - -/* Definitions for doing the crc four data bytes at a time. */ -#if !defined(NOBYFOUR) && defined(Z_U4) -# define BYFOUR -#endif -#ifdef BYFOUR - local unsigned long crc32_little OF((unsigned long, - const unsigned char FAR *, unsigned)); - local unsigned long crc32_big OF((unsigned long, - const unsigned char FAR *, unsigned)); -# define TBLS 8 -#else -# define TBLS 1 -#endif /* BYFOUR */ - -/* Local functions for crc concatenation */ -local unsigned long gf2_matrix_times OF((unsigned long *mat, - unsigned long vec)); -local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); -local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2)); - - -#ifdef DYNAMIC_CRC_TABLE - -local volatile int crc_table_empty = 1; -local z_crc_t FAR crc_table[TBLS][256]; -local void make_crc_table OF((void)); -#ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *)); -#endif /* MAKECRCH */ -/* - Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: - x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. - - Polynomials over GF(2) are represented in binary, one bit per coefficient, - with the lowest powers in the most significant bit. Then adding polynomials - is just exclusive-or, and multiplying a polynomial by x is a right shift by - one. If we call the above polynomial p, and represent a byte as the - polynomial q, also with the lowest power in the most significant bit (so the - byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, - where a mod b means the remainder after dividing a by b. - - This calculation is done using the shift-register method of multiplying and - taking the remainder. The register is initialized to zero, and for each - incoming bit, x^32 is added mod p to the register if the bit is a one (where - x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by - x (which is shifting right by one and adding x^32 mod p if the bit shifted - out is a one). We start with the highest power (least significant bit) of - q and repeat for all eight bits of q. - - The first table is simply the CRC of all possible eight bit values. This is - all the information needed to generate CRCs on data a byte at a time for all - combinations of CRC register values and incoming bytes. The remaining tables - allow for word-at-a-time CRC calculation for both big-endian and little- - endian machines, where a word is four bytes. -*/ -local void make_crc_table() -{ - z_crc_t c; - int n, k; - z_crc_t poly; /* polynomial exclusive-or pattern */ - /* terms of polynomial defining this crc (except x^32): */ - static volatile int first = 1; /* flag to limit concurrent making */ - static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; - - /* See if another task is already doing this (not thread-safe, but better - than nothing -- significantly reduces duration of vulnerability in - case the advice about DYNAMIC_CRC_TABLE is ignored) */ - if (first) { - first = 0; - - /* make exclusive-or pattern from polynomial (0xedb88320UL) */ - poly = 0; - for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++) - poly |= (z_crc_t)1 << (31 - p[n]); - - /* generate a crc for every 8-bit value */ - for (n = 0; n < 256; n++) { - c = (z_crc_t)n; - for (k = 0; k < 8; k++) - c = c & 1 ? poly ^ (c >> 1) : c >> 1; - crc_table[0][n] = c; - } - -#ifdef BYFOUR - /* generate crc for each value followed by one, two, and three zeros, - and then the byte reversal of those as well as the first table */ - for (n = 0; n < 256; n++) { - c = crc_table[0][n]; - crc_table[4][n] = ZSWAP32(c); - for (k = 1; k < 4; k++) { - c = crc_table[0][c & 0xff] ^ (c >> 8); - crc_table[k][n] = c; - crc_table[k + 4][n] = ZSWAP32(c); - } - } -#endif /* BYFOUR */ - - crc_table_empty = 0; - } - else { /* not first */ - /* wait for the other guy to finish (not efficient, but rare) */ - while (crc_table_empty) - ; - } - -#ifdef MAKECRCH - /* write out CRC tables to crc32.h */ - { - FILE *out; - - out = fopen("crc32.h", "w"); - if (out == NULL) return; - fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n"); - fprintf(out, " * Generated automatically by crc32.c\n */\n\n"); - fprintf(out, "local const z_crc_t FAR "); - fprintf(out, "crc_table[TBLS][256] =\n{\n {\n"); - write_table(out, crc_table[0]); -# ifdef BYFOUR - fprintf(out, "#ifdef BYFOUR\n"); - for (k = 1; k < 8; k++) { - fprintf(out, " },\n {\n"); - write_table(out, crc_table[k]); - } - fprintf(out, "#endif\n"); -# endif /* BYFOUR */ - fprintf(out, " }\n};\n"); - fclose(out); - } -#endif /* MAKECRCH */ -} - -#ifdef MAKECRCH -local void write_table(out, table) - FILE *out; - const z_crc_t FAR *table; -{ - int n; - - for (n = 0; n < 256; n++) - fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", - (unsigned long)(table[n]), - n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", ")); -} -#endif /* MAKECRCH */ - -#else /* !DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Tables of CRC-32s of all single-byte values, made by make_crc_table(). - */ -#include "crc32.h" -#endif /* DYNAMIC_CRC_TABLE */ - -/* ========================================================================= - * This function can be used by asm versions of crc32() - */ -const z_crc_t FAR * ZEXPORT get_crc_table() -{ -#ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) - make_crc_table(); -#endif /* DYNAMIC_CRC_TABLE */ - return (const z_crc_t FAR *)crc_table; -} - -/* ========================================================================= */ -#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8) -#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 - -/* ========================================================================= */ -unsigned long ZEXPORT crc32(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - uInt len; -{ - if (buf == Z_NULL) return 0UL; - -#ifdef DYNAMIC_CRC_TABLE - if (crc_table_empty) - make_crc_table(); -#endif /* DYNAMIC_CRC_TABLE */ - -#ifdef BYFOUR - if (sizeof(void *) == sizeof(ptrdiff_t)) { - z_crc_t endian; - - endian = 1; - if (*((unsigned char *)(&endian))) - return crc32_little(crc, buf, len); - else - return crc32_big(crc, buf, len); - } -#endif /* BYFOUR */ - crc = crc ^ 0xffffffffUL; - while (len >= 8) { - DO8; - len -= 8; - } - if (len) do { - DO1; - } while (--len); - return crc ^ 0xffffffffUL; -} - -#ifdef BYFOUR - -/* ========================================================================= */ -#define DOLIT4 c ^= *buf4++; \ - c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ - crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24] -#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4 - -/* ========================================================================= */ -local unsigned long crc32_little(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - unsigned len; -{ - register z_crc_t c; - register const z_crc_t FAR *buf4; - - c = (z_crc_t)crc; - c = ~c; - while (len && ((ptrdiff_t)buf & 3)) { - c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); - len--; - } - - buf4 = (const z_crc_t FAR *)(const void FAR *)buf; - while (len >= 32) { - DOLIT32; - len -= 32; - } - while (len >= 4) { - DOLIT4; - len -= 4; - } - buf = (const unsigned char FAR *)buf4; - - if (len) do { - c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); - } while (--len); - c = ~c; - return (unsigned long)c; -} - -/* ========================================================================= */ -#define DOBIG4 c ^= *++buf4; \ - c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ - crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] -#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 - -/* ========================================================================= */ -local unsigned long crc32_big(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - unsigned len; -{ - register z_crc_t c; - register const z_crc_t FAR *buf4; - - c = ZSWAP32((z_crc_t)crc); - c = ~c; - while (len && ((ptrdiff_t)buf & 3)) { - c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); - len--; - } - - buf4 = (const z_crc_t FAR *)(const void FAR *)buf; - buf4--; - while (len >= 32) { - DOBIG32; - len -= 32; - } - while (len >= 4) { - DOBIG4; - len -= 4; - } - buf4++; - buf = (const unsigned char FAR *)buf4; - - if (len) do { - c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); - } while (--len); - c = ~c; - return (unsigned long)(ZSWAP32(c)); -} - -#endif /* BYFOUR */ - -#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */ - -/* ========================================================================= */ -local unsigned long gf2_matrix_times(mat, vec) - unsigned long *mat; - unsigned long vec; -{ - unsigned long sum; - - sum = 0; - while (vec) { - if (vec & 1) - sum ^= *mat; - vec >>= 1; - mat++; - } - return sum; -} - -/* ========================================================================= */ -local void gf2_matrix_square(square, mat) - unsigned long *square; - unsigned long *mat; -{ - int n; - - for (n = 0; n < GF2_DIM; n++) - square[n] = gf2_matrix_times(mat, mat[n]); -} - -/* ========================================================================= */ -local uLong crc32_combine_(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ - int n; - unsigned long row; - unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ - unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ - - /* degenerate case (also disallow negative lengths) */ - if (len2 <= 0) - return crc1; - - /* put operator for one zero bit in odd */ - odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ - row = 1; - for (n = 1; n < GF2_DIM; n++) { - odd[n] = row; - row <<= 1; - } - - /* put operator for two zero bits in even */ - gf2_matrix_square(even, odd); - - /* put operator for four zero bits in odd */ - gf2_matrix_square(odd, even); - - /* apply len2 zeros to crc1 (first square will put the operator for one - zero byte, eight zero bits, in even) */ - do { - /* apply zeros operator for this bit of len2 */ - gf2_matrix_square(even, odd); - if (len2 & 1) - crc1 = gf2_matrix_times(even, crc1); - len2 >>= 1; - - /* if no more bits set, then done */ - if (len2 == 0) - break; - - /* another iteration of the loop with odd and even swapped */ - gf2_matrix_square(odd, even); - if (len2 & 1) - crc1 = gf2_matrix_times(odd, crc1); - len2 >>= 1; - - /* if no more bits set, then done */ - } while (len2 != 0); - - /* return combined crc */ - crc1 ^= crc2; - return crc1; -} - -/* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off_t len2; -{ - return crc32_combine_(crc1, crc2, len2); -} - -uLong ZEXPORT crc32_combine64(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ - return crc32_combine_(crc1, crc2, len2); -} diff --git a/build/premake/premake5/contrib/zlib/crc32.h b/build/premake/premake5/contrib/zlib/crc32.h deleted file mode 100644 index 9e0c778102..0000000000 --- a/build/premake/premake5/contrib/zlib/crc32.h +++ /dev/null @@ -1,441 +0,0 @@ -/* crc32.h -- tables for rapid CRC calculation - * Generated automatically by crc32.c - */ - -local const z_crc_t FAR crc_table[TBLS][256] = -{ - { - 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, - 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, - 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, - 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, - 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, - 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, - 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, - 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, - 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, - 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, - 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, - 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, - 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, - 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, - 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, - 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, - 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, - 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, - 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, - 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, - 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, - 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, - 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, - 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, - 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, - 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, - 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, - 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, - 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, - 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, - 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, - 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, - 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, - 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, - 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, - 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, - 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, - 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, - 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, - 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, - 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, - 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, - 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, - 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, - 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, - 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, - 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, - 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, - 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, - 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, - 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, - 0x2d02ef8dUL -#ifdef BYFOUR - }, - { - 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL, - 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL, - 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL, - 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL, - 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL, - 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL, - 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL, - 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL, - 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL, - 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL, - 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL, - 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL, - 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL, - 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL, - 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL, - 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL, - 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL, - 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL, - 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL, - 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL, - 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL, - 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL, - 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL, - 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL, - 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL, - 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL, - 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL, - 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL, - 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL, - 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL, - 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL, - 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL, - 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL, - 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL, - 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL, - 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL, - 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL, - 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL, - 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL, - 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL, - 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL, - 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL, - 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL, - 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL, - 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL, - 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL, - 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL, - 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL, - 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL, - 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL, - 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL, - 0x9324fd72UL - }, - { - 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL, - 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL, - 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL, - 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL, - 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL, - 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL, - 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL, - 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL, - 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL, - 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL, - 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL, - 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL, - 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL, - 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL, - 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL, - 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL, - 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL, - 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL, - 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL, - 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL, - 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL, - 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL, - 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL, - 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL, - 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL, - 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL, - 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL, - 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL, - 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL, - 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL, - 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL, - 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL, - 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL, - 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL, - 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL, - 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL, - 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL, - 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL, - 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL, - 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL, - 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL, - 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL, - 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL, - 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL, - 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL, - 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL, - 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL, - 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL, - 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL, - 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL, - 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL, - 0xbe9834edUL - }, - { - 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL, - 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL, - 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL, - 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL, - 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL, - 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL, - 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL, - 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL, - 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL, - 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL, - 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL, - 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL, - 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL, - 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL, - 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL, - 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL, - 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL, - 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL, - 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL, - 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL, - 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL, - 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL, - 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL, - 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL, - 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL, - 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL, - 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL, - 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL, - 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL, - 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL, - 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL, - 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL, - 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL, - 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL, - 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL, - 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL, - 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL, - 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL, - 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL, - 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL, - 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL, - 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL, - 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL, - 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL, - 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL, - 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL, - 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL, - 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL, - 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL, - 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL, - 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL, - 0xde0506f1UL - }, - { - 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL, - 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL, - 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL, - 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL, - 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL, - 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL, - 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL, - 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL, - 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL, - 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL, - 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL, - 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL, - 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL, - 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL, - 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL, - 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL, - 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL, - 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL, - 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL, - 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL, - 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL, - 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL, - 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL, - 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL, - 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL, - 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL, - 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL, - 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL, - 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL, - 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL, - 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL, - 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL, - 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL, - 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL, - 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL, - 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL, - 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL, - 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL, - 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL, - 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL, - 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL, - 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL, - 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL, - 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL, - 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL, - 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL, - 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL, - 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL, - 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL, - 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL, - 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL, - 0x8def022dUL - }, - { - 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL, - 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL, - 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL, - 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL, - 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL, - 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL, - 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL, - 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL, - 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL, - 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL, - 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL, - 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL, - 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL, - 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL, - 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL, - 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL, - 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL, - 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL, - 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL, - 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL, - 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL, - 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL, - 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL, - 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL, - 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL, - 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL, - 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL, - 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL, - 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL, - 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL, - 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL, - 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL, - 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL, - 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL, - 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL, - 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL, - 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL, - 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL, - 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL, - 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL, - 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL, - 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL, - 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL, - 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL, - 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL, - 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL, - 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL, - 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL, - 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL, - 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL, - 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL, - 0x72fd2493UL - }, - { - 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL, - 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL, - 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL, - 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL, - 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL, - 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL, - 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL, - 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL, - 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL, - 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL, - 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL, - 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL, - 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL, - 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL, - 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL, - 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL, - 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL, - 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL, - 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL, - 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL, - 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL, - 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL, - 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL, - 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL, - 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL, - 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL, - 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL, - 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL, - 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL, - 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL, - 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL, - 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL, - 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL, - 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL, - 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL, - 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL, - 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL, - 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL, - 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL, - 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL, - 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL, - 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL, - 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL, - 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL, - 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL, - 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL, - 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL, - 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL, - 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL, - 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL, - 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL, - 0xed3498beUL - }, - { - 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL, - 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL, - 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL, - 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL, - 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL, - 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL, - 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL, - 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL, - 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL, - 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL, - 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL, - 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL, - 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL, - 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL, - 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL, - 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL, - 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL, - 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL, - 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL, - 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL, - 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL, - 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL, - 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL, - 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL, - 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL, - 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL, - 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL, - 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL, - 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL, - 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL, - 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL, - 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL, - 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL, - 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL, - 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL, - 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL, - 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL, - 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL, - 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL, - 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL, - 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL, - 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL, - 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL, - 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL, - 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL, - 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL, - 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL, - 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL, - 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL, - 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL, - 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL, - 0xf10605deUL -#endif - } -}; diff --git a/build/premake/premake5/contrib/zlib/deflate.c b/build/premake/premake5/contrib/zlib/deflate.c deleted file mode 100644 index 696957705b..0000000000 --- a/build/premake/premake5/contrib/zlib/deflate.c +++ /dev/null @@ -1,1967 +0,0 @@ -/* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process depends on being able to identify portions - * of the input text which are identical to earlier input (within a - * sliding window trailing behind the input currently being processed). - * - * The most straightforward technique turns out to be the fastest for - * most input files: try all possible matches and select the longest. - * The key feature of this algorithm is that insertions into the string - * dictionary are very simple and thus fast, and deletions are avoided - * completely. Insertions are performed at each input character, whereas - * string matches are performed only when the previous match ends. So it - * is preferable to spend more time in matches to allow very fast string - * insertions and avoid deletions. The matching algorithm for small - * strings is inspired from that of Rabin & Karp. A brute force approach - * is used to find longer strings when a small match has been found. - * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze - * (by Leonid Broukhis). - * A previous version of this file used a more sophisticated algorithm - * (by Fiala and Greene) which is guaranteed to run in linear amortized - * time, but has a larger average cost, uses more memory and is patented. - * However the F&G algorithm may be faster for some highly redundant - * files if the parameter max_chain_length (described below) is too large. - * - * ACKNOWLEDGEMENTS - * - * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and - * I found it in 'freeze' written by Leonid Broukhis. - * Thanks to many people for bug reports and testing. - * - * REFERENCES - * - * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". - * Available in http://tools.ietf.org/html/rfc1951 - * - * A description of the Rabin and Karp algorithm is given in the book - * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. - * - * Fiala,E.R., and Greene,D.H. - * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 - * - */ - -/* @(#) $Id$ */ - -#include "deflate.h" - -const char deflate_copyright[] = - " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* =========================================================================== - * Function prototypes. - */ -typedef enum { - need_more, /* block not completed, need more input or more output */ - block_done, /* block flush performed */ - finish_started, /* finish started, need only more output at next deflate */ - finish_done /* finish done, accept no more input or output */ -} block_state; - -typedef block_state (*compress_func) OF((deflate_state *s, int flush)); -/* Compression function. Returns the block state after the call. */ - -local void fill_window OF((deflate_state *s)); -local block_state deflate_stored OF((deflate_state *s, int flush)); -local block_state deflate_fast OF((deflate_state *s, int flush)); -#ifndef FASTEST -local block_state deflate_slow OF((deflate_state *s, int flush)); -#endif -local block_state deflate_rle OF((deflate_state *s, int flush)); -local block_state deflate_huff OF((deflate_state *s, int flush)); -local void lm_init OF((deflate_state *s)); -local void putShortMSB OF((deflate_state *s, uInt b)); -local void flush_pending OF((z_streamp strm)); -local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifdef ASMV - void match_init OF((void)); /* asm code initialization */ - uInt longest_match OF((deflate_state *s, IPos cur_match)); -#else -local uInt longest_match OF((deflate_state *s, IPos cur_match)); -#endif - -#ifdef DEBUG -local void check_match OF((deflate_state *s, IPos start, IPos match, - int length)); -#endif - -/* =========================================================================== - * Local data - */ - -#define NIL 0 -/* Tail of hash chains */ - -#ifndef TOO_FAR -# define TOO_FAR 4096 -#endif -/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ - -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ -typedef struct config_s { - ush good_length; /* reduce lazy search above this match length */ - ush max_lazy; /* do not perform lazy search above this match length */ - ush nice_length; /* quit search above this match length */ - ush max_chain; - compress_func func; -} config; - -#ifdef FASTEST -local const config configuration_table[2] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ -#else -local const config configuration_table[10] = { -/* good lazy nice chain */ -/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ -/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ -/* 2 */ {4, 5, 16, 8, deflate_fast}, -/* 3 */ {4, 6, 32, 32, deflate_fast}, - -/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ -/* 5 */ {8, 16, 32, 32, deflate_slow}, -/* 6 */ {8, 16, 128, 128, deflate_slow}, -/* 7 */ {8, 32, 128, 256, deflate_slow}, -/* 8 */ {32, 128, 258, 1024, deflate_slow}, -/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ -#endif - -/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 - * For deflate_fast() (levels <= 3) good is ignored and lazy has a different - * meaning. - */ - -#define EQUAL 0 -/* result of memcmp for equal strings */ - -#ifndef NO_DUMMY_DECL -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ -#endif - -/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ -#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0)) - -/* =========================================================================== - * Update a hash value with the given input byte - * IN assertion: all calls to to UPDATE_HASH are made with consecutive - * input characters, so that a running hash key can be computed from the - * previous key instead of complete recalculation each time. - */ -#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) - - -/* =========================================================================== - * Insert string str in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * If this file is compiled with -DFASTEST, the compression level is forced - * to 1, and no hash chains are maintained. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of str are valid - * (except for the last MIN_MATCH-1 bytes of the input file). - */ -#ifdef FASTEST -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#else -#define INSERT_STRING(s, str, match_head) \ - (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ - match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ - s->head[s->ins_h] = (Pos)(str)) -#endif - -/* =========================================================================== - * Initialize the hash table (avoiding 64K overflow for 16 bit systems). - * prev[] will be initialized on the fly. - */ -#define CLEAR_HASH(s) \ - s->head[s->hash_size-1] = NIL; \ - zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); - -/* ========================================================================= */ -int ZEXPORT deflateInit_(strm, level, version, stream_size) - z_streamp strm; - int level; - const char *version; - int stream_size; -{ - return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, - Z_DEFAULT_STRATEGY, version, stream_size); - /* To do: ignore strm->next_in if we use it as window */ -} - -/* ========================================================================= */ -int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, - version, stream_size) - z_streamp strm; - int level; - int method; - int windowBits; - int memLevel; - int strategy; - const char *version; - int stream_size; -{ - deflate_state *s; - int wrap = 1; - static const char my_version[] = ZLIB_VERSION; - - ushf *overlay; - /* We overlay pending_buf and d_buf+l_buf. This works since the average - * output size for (length,distance) codes is <= 24 bits. - */ - - if (version == Z_NULL || version[0] != my_version[0] || - stream_size != sizeof(z_stream)) { - return Z_VERSION_ERROR; - } - if (strm == Z_NULL) return Z_STREAM_ERROR; - - strm->msg = Z_NULL; - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - -#ifdef FASTEST - if (level != 0) level = 1; -#else - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#endif - - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } -#ifdef GZIP - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } -#endif - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return Z_STREAM_ERROR; - } - if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ - s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); - if (s == Z_NULL) return Z_MEM_ERROR; - strm->state = (struct internal_state FAR *)s; - s->strm = strm; - - s->wrap = wrap; - s->gzhead = Z_NULL; - s->w_bits = windowBits; - s->w_size = 1 << s->w_bits; - s->w_mask = s->w_size - 1; - - s->hash_bits = memLevel + 7; - s->hash_size = 1 << s->hash_bits; - s->hash_mask = s->hash_size - 1; - s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); - - s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); - s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); - s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); - - s->high_water = 0; /* nothing written to s->window yet */ - - s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - - overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - s->pending_buf = (uchf *) overlay; - s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); - - if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || - s->pending_buf == Z_NULL) { - s->status = FINISH_STATE; - strm->msg = ERR_MSG(Z_MEM_ERROR); - deflateEnd (strm); - return Z_MEM_ERROR; - } - s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - - s->level = level; - s->strategy = strategy; - s->method = (Byte)method; - - return deflateReset(strm); -} - -/* ========================================================================= */ -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) - z_streamp strm; - const Bytef *dictionary; - uInt dictLength; -{ - deflate_state *s; - uInt str, n; - int wrap; - unsigned avail; - z_const unsigned char *next; - - if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) - return Z_STREAM_ERROR; - s = strm->state; - wrap = s->wrap; - if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead) - return Z_STREAM_ERROR; - - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap == 1) - strm->adler = adler32(strm->adler, dictionary, dictLength); - s->wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s->w_size) { - if (wrap == 0) { /* already empty otherwise */ - CLEAR_HASH(s); - s->strstart = 0; - s->block_start = 0L; - s->insert = 0; - } - dictionary += dictLength - s->w_size; /* use the tail */ - dictLength = s->w_size; - } - - /* insert dictionary into window and hash */ - avail = strm->avail_in; - next = strm->next_in; - strm->avail_in = dictLength; - strm->next_in = (z_const Bytef *)dictionary; - fill_window(s); - while (s->lookahead >= MIN_MATCH) { - str = s->strstart; - n = s->lookahead - (MIN_MATCH-1); - do { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - } while (--n); - s->strstart = str; - s->lookahead = MIN_MATCH-1; - fill_window(s); - } - s->strstart += s->lookahead; - s->block_start = (long)s->strstart; - s->insert = s->lookahead; - s->lookahead = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - strm->next_in = next; - strm->avail_in = avail; - s->wrap = wrap; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateResetKeep (strm) - z_streamp strm; -{ - deflate_state *s; - - if (strm == Z_NULL || strm->state == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) { - return Z_STREAM_ERROR; - } - - strm->total_in = strm->total_out = 0; - strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ - strm->data_type = Z_UNKNOWN; - - s = (deflate_state *)strm->state; - s->pending = 0; - s->pending_out = s->pending_buf; - - if (s->wrap < 0) { - s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ - } - s->status = s->wrap ? INIT_STATE : BUSY_STATE; - strm->adler = -#ifdef GZIP - s->wrap == 2 ? crc32(0L, Z_NULL, 0) : -#endif - adler32(0L, Z_NULL, 0); - s->last_flush = Z_NO_FLUSH; - - _tr_init(s); - - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateReset (strm) - z_streamp strm; -{ - int ret; - - ret = deflateResetKeep(strm); - if (ret == Z_OK) - lm_init(strm->state); - return ret; -} - -/* ========================================================================= */ -int ZEXPORT deflateSetHeader (strm, head) - z_streamp strm; - gz_headerp head; -{ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - if (strm->state->wrap != 2) return Z_STREAM_ERROR; - strm->state->gzhead = head; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflatePending (strm, pending, bits) - unsigned *pending; - int *bits; - z_streamp strm; -{ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - if (pending != Z_NULL) - *pending = strm->state->pending; - if (bits != Z_NULL) - *bits = strm->state->bi_valid; - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflatePrime (strm, bits, value) - z_streamp strm; - int bits; - int value; -{ - deflate_state *s; - int put; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - s = strm->state; - if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) - return Z_BUF_ERROR; - do { - put = Buf_size - s->bi_valid; - if (put > bits) - put = bits; - s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); - s->bi_valid += put; - _tr_flush_bits(s); - value >>= put; - bits -= put; - } while (bits); - return Z_OK; -} - -/* ========================================================================= */ -int ZEXPORT deflateParams(strm, level, strategy) - z_streamp strm; - int level; - int strategy; -{ - deflate_state *s; - compress_func func; - int err = Z_OK; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - s = strm->state; - -#ifdef FASTEST - if (level != 0) level = 1; -#else - if (level == Z_DEFAULT_COMPRESSION) level = 6; -#endif - if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { - return Z_STREAM_ERROR; - } - func = configuration_table[s->level].func; - - if ((strategy != s->strategy || func != configuration_table[level].func) && - strm->total_in != 0) { - /* Flush the last buffer: */ - err = deflate(strm, Z_BLOCK); - if (err == Z_BUF_ERROR && s->pending == 0) - err = Z_OK; - } - if (s->level != level) { - s->level = level; - s->max_lazy_match = configuration_table[level].max_lazy; - s->good_match = configuration_table[level].good_length; - s->nice_match = configuration_table[level].nice_length; - s->max_chain_length = configuration_table[level].max_chain; - } - s->strategy = strategy; - return err; -} - -/* ========================================================================= */ -int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) - z_streamp strm; - int good_length; - int max_lazy; - int nice_length; - int max_chain; -{ - deflate_state *s; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - s = strm->state; - s->good_match = good_length; - s->max_lazy_match = max_lazy; - s->nice_match = nice_length; - s->max_chain_length = max_chain; - return Z_OK; -} - -/* ========================================================================= - * For the default windowBits of 15 and memLevel of 8, this function returns - * a close to exact, as well as small, upper bound on the compressed size. - * They are coded as constants here for a reason--if the #define's are - * changed, then this function needs to be changed as well. The return - * value for 15 and 8 only works for those exact settings. - * - * For any setting other than those defaults for windowBits and memLevel, - * the value returned is a conservative worst case for the maximum expansion - * resulting from using fixed blocks instead of stored blocks, which deflate - * can emit on compressed data for some combinations of the parameters. - * - * This function could be more sophisticated to provide closer upper bounds for - * every combination of windowBits and memLevel. But even the conservative - * upper bound of about 14% expansion does not seem onerous for output buffer - * allocation. - */ -uLong ZEXPORT deflateBound(strm, sourceLen) - z_streamp strm; - uLong sourceLen; -{ - deflate_state *s; - uLong complen, wraplen; - Bytef *str; - - /* conservative upper bound for compressed data */ - complen = sourceLen + - ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; - - /* if can't get parameters, return conservative bound plus zlib wrapper */ - if (strm == Z_NULL || strm->state == Z_NULL) - return complen + 6; - - /* compute wrapper length */ - s = strm->state; - switch (s->wrap) { - case 0: /* raw deflate */ - wraplen = 0; - break; - case 1: /* zlib wrapper */ - wraplen = 6 + (s->strstart ? 4 : 0); - break; - case 2: /* gzip wrapper */ - wraplen = 18; - if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ - if (s->gzhead->extra != Z_NULL) - wraplen += 2 + s->gzhead->extra_len; - str = s->gzhead->name; - if (str != Z_NULL) - do { - wraplen++; - } while (*str++); - str = s->gzhead->comment; - if (str != Z_NULL) - do { - wraplen++; - } while (*str++); - if (s->gzhead->hcrc) - wraplen += 2; - } - break; - default: /* for compiler happiness */ - wraplen = 6; - } - - /* if not default parameters, return conservative bound */ - if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return complen + wraplen; - - /* default settings: return tight bound for that case */ - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + - (sourceLen >> 25) + 13 - 6 + wraplen; -} - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. - */ -local void putShortMSB (s, b) - deflate_state *s; - uInt b; -{ - put_byte(s, (Byte)(b >> 8)); - put_byte(s, (Byte)(b & 0xff)); -} - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->next_out buffer and copying into it. - * (See also read_buf()). - */ -local void flush_pending(strm) - z_streamp strm; -{ - unsigned len; - deflate_state *s = strm->state; - - _tr_flush_bits(s); - len = s->pending; - if (len > strm->avail_out) len = strm->avail_out; - if (len == 0) return; - - zmemcpy(strm->next_out, s->pending_out, len); - strm->next_out += len; - s->pending_out += len; - strm->total_out += len; - strm->avail_out -= len; - s->pending -= len; - if (s->pending == 0) { - s->pending_out = s->pending_buf; - } -} - -/* ========================================================================= */ -int ZEXPORT deflate (strm, flush) - z_streamp strm; - int flush; -{ - int old_flush; /* value of flush param for previous deflate call */ - deflate_state *s; - - if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_BLOCK || flush < 0) { - return Z_STREAM_ERROR; - } - s = strm->state; - - if (strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0) || - (s->status == FINISH_STATE && flush != Z_FINISH)) { - ERR_RETURN(strm, Z_STREAM_ERROR); - } - if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - - s->strm = strm; /* just in case */ - old_flush = s->last_flush; - s->last_flush = flush; - - /* Write the header */ - if (s->status == INIT_STATE) { -#ifdef GZIP - if (s->wrap == 2) { - strm->adler = crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (s->gzhead == Z_NULL) { - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s->status = BUSY_STATE; - } - else { - put_byte(s, (s->gzhead->text ? 1 : 0) + - (s->gzhead->hcrc ? 2 : 0) + - (s->gzhead->extra == Z_NULL ? 0 : 4) + - (s->gzhead->name == Z_NULL ? 0 : 8) + - (s->gzhead->comment == Z_NULL ? 0 : 16) - ); - put_byte(s, (Byte)(s->gzhead->time & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != Z_NULL) { - put_byte(s, s->gzhead->extra_len & 0xff); - put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); - } - if (s->gzhead->hcrc) - strm->adler = crc32(strm->adler, s->pending_buf, - s->pending); - s->gzindex = 0; - s->status = EXTRA_STATE; - } - } - else -#endif - { - uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; - uInt level_flags; - - if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) - level_flags = 0; - else if (s->level < 6) - level_flags = 1; - else if (s->level == 6) - level_flags = 2; - else - level_flags = 3; - header |= (level_flags << 6); - if (s->strstart != 0) header |= PRESET_DICT; - header += 31 - (header % 31); - - s->status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s->strstart != 0) { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - strm->adler = adler32(0L, Z_NULL, 0); - } - } -#ifdef GZIP - if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - - while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) - break; - } - put_byte(s, s->gzhead->extra[s->gzindex]); - s->gzindex++; - } - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (s->gzindex == s->gzhead->extra_len) { - s->gzindex = 0; - s->status = NAME_STATE; - } - } - else - s->status = NAME_STATE; - } - if (s->status == NAME_STATE) { - if (s->gzhead->name != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - int val; - - do { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) { - val = 1; - break; - } - } - val = s->gzhead->name[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (val == 0) { - s->gzindex = 0; - s->status = COMMENT_STATE; - } - } - else - s->status = COMMENT_STATE; - } - if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - int val; - - do { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) { - val = 1; - break; - } - } - val = s->gzhead->comment[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (val == 0) - s->status = HCRC_STATE; - } - else - s->status = HCRC_STATE; - } - if (s->status == HCRC_STATE) { - if (s->gzhead->hcrc) { - if (s->pending + 2 > s->pending_buf_size) - flush_pending(strm); - if (s->pending + 2 <= s->pending_buf_size) { - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - strm->adler = crc32(0L, Z_NULL, 0); - s->status = BUSY_STATE; - } - } - else - s->status = BUSY_STATE; - } -#endif - - /* Flush as much pending output as possible */ - if (s->pending != 0) { - flush_pending(strm); - if (strm->avail_out == 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s->last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && - flush != Z_FINISH) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* User must not provide more input after the first FINISH: */ - if (s->status == FINISH_STATE && strm->avail_in != 0) { - ERR_RETURN(strm, Z_BUF_ERROR); - } - - /* Start a new block or continue the current one. - */ - if (strm->avail_in != 0 || s->lookahead != 0 || - (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { - block_state bstate; - - bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : - (s->strategy == Z_RLE ? deflate_rle(s, flush) : - (*(configuration_table[s->level].func))(s, flush)); - - if (bstate == finish_started || bstate == finish_done) { - s->status = FINISH_STATE; - } - if (bstate == need_more || bstate == finish_started) { - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate == block_done) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(s); - } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ - _tr_stored_block(s, (char*)0, 0L, 0); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush == Z_FULL_FLUSH) { - CLEAR_HASH(s); /* forget history */ - if (s->lookahead == 0) { - s->strstart = 0; - s->block_start = 0L; - s->insert = 0; - } - } - } - flush_pending(strm); - if (strm->avail_out == 0) { - s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - Assert(strm->avail_out > 0, "bug2"); - - if (flush != Z_FINISH) return Z_OK; - if (s->wrap <= 0) return Z_STREAM_END; - - /* Write the trailer */ -#ifdef GZIP - if (s->wrap == 2) { - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); - put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); - put_byte(s, (Byte)(strm->total_in & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); - put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); - } - else -#endif - { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ - return s->pending != 0 ? Z_OK : Z_STREAM_END; -} - -/* ========================================================================= */ -int ZEXPORT deflateEnd (strm) - z_streamp strm; -{ - int status; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - - status = strm->state->status; - if (status != INIT_STATE && - status != EXTRA_STATE && - status != NAME_STATE && - status != COMMENT_STATE && - status != HCRC_STATE && - status != BUSY_STATE && - status != FINISH_STATE) { - return Z_STREAM_ERROR; - } - - /* Deallocate in reverse order of allocations: */ - TRY_FREE(strm, strm->state->pending_buf); - TRY_FREE(strm, strm->state->head); - TRY_FREE(strm, strm->state->prev); - TRY_FREE(strm, strm->state->window); - - ZFREE(strm, strm->state); - strm->state = Z_NULL; - - return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; -} - -/* ========================================================================= - * Copy the source state to the destination state. - * To simplify the source, this is not supported for 16-bit MSDOS (which - * doesn't have enough memory anyway to duplicate compression states). - */ -int ZEXPORT deflateCopy (dest, source) - z_streamp dest; - z_streamp source; -{ -#ifdef MAXSEG_64K - return Z_STREAM_ERROR; -#else - deflate_state *ds; - deflate_state *ss; - ushf *overlay; - - - if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { - return Z_STREAM_ERROR; - } - - ss = source->state; - - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - - ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); - if (ds == Z_NULL) return Z_MEM_ERROR; - dest->state = (struct internal_state FAR *) ds; - zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); - ds->strm = dest; - - ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); - ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); - ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); - ds->pending_buf = (uchf *) overlay; - - if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || - ds->pending_buf == Z_NULL) { - deflateEnd (dest); - return Z_MEM_ERROR; - } - /* following zmemcpy do not work for 16-bit MSDOS */ - zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); - zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); - zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); - - ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); - ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); - ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; - - ds->l_desc.dyn_tree = ds->dyn_ltree; - ds->d_desc.dyn_tree = ds->dyn_dtree; - ds->bl_desc.dyn_tree = ds->bl_tree; - - return Z_OK; -#endif /* MAXSEG_64K */ -} - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->next_in buffer and copying from it. - * (See also flush_pending()). - */ -local int read_buf(strm, buf, size) - z_streamp strm; - Bytef *buf; - unsigned size; -{ - unsigned len = strm->avail_in; - - if (len > size) len = size; - if (len == 0) return 0; - - strm->avail_in -= len; - - zmemcpy(buf, strm->next_in, len); - if (strm->state->wrap == 1) { - strm->adler = adler32(strm->adler, buf, len); - } -#ifdef GZIP - else if (strm->state->wrap == 2) { - strm->adler = crc32(strm->adler, buf, len); - } -#endif - strm->next_in += len; - strm->total_in += len; - - return (int)len; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -local void lm_init (s) - deflate_state *s; -{ - s->window_size = (ulg)2L*s->w_size; - - CLEAR_HASH(s); - - /* Set the default configuration parameters: - */ - s->max_lazy_match = configuration_table[s->level].max_lazy; - s->good_match = configuration_table[s->level].good_length; - s->nice_match = configuration_table[s->level].nice_length; - s->max_chain_length = configuration_table[s->level].max_chain; - - s->strstart = 0; - s->block_start = 0L; - s->lookahead = 0; - s->insert = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - s->ins_h = 0; -#ifndef FASTEST -#ifdef ASMV - match_init(); /* initialize the asm code */ -#endif -#endif -} - -#ifndef FASTEST -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. - */ -#ifndef ASMV -/* For 80x86 and 680x0, an optimized version will be provided in match.asm or - * match.S. The code will be functionally equivalent. - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ - unsigned chain_length = s->max_chain_length;/* max hash chain length */ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - int best_len = s->prev_length; /* best match length so far */ - int nice_match = s->nice_match; /* stop if match long enough */ - IPos limit = s->strstart > (IPos)MAX_DIST(s) ? - s->strstart - (IPos)MAX_DIST(s) : NIL; - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - Posf *prev = s->prev; - uInt wmask = s->w_mask; - -#ifdef UNALIGNED_OK - /* Compare two bytes at a time. Note: this is not always beneficial. - * Try with and without -DUNALIGNED_OK to check. - */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; - register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan+best_len-1); -#else - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - register Byte scan_end1 = scan[best_len-1]; - register Byte scan_end = scan[best_len]; -#endif - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s->prev_length >= s->good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - Assert(cur_match < s->strstart, "no future"); - match = s->window + cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. - */ -#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) - /* This code assumes sizeof(unsigned short) == 2. Do not use - * UNALIGNED_OK if your compiler uses a different size. - */ - if (*(ushf*)(match+best_len-1) != scan_end || - *(ushf*)match != scan_start) continue; - - /* It is not necessary to compare scan[2] and match[2] since they are - * always equal when the other bytes match, given that the hash keys - * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at - * strstart+3, +5, ... up to strstart+257. We check for insufficient - * lookahead only every 4th comparison; the 128th check will be made - * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is - * necessary to put more guard bytes at the end of the window, or - * to check more often for insufficient lookahead. - */ - Assert(scan[2] == match[2], "scan[2]?"); - scan++, match++; - do { - } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - scan < strend); - /* The funny "do {}" generates better code on most compilers */ - - /* Here, scan <= window+strstart+257 */ - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - if (*scan == *match) scan++; - - len = (MAX_MATCH - 1) - (int)(strend-scan); - scan = strend - (MAX_MATCH-1); - -#else /* UNALIGNED_OK */ - - if (match[best_len] != scan_end || - match[best_len-1] != scan_end1 || - *match != *scan || - *++match != scan[1]) continue; - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match++; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - scan = strend - MAX_MATCH; - -#endif /* UNALIGNED_OK */ - - if (len > best_len) { - s->match_start = cur_match; - best_len = len; - if (len >= nice_match) break; -#ifdef UNALIGNED_OK - scan_end = *(ushf*)(scan+best_len-1); -#else - scan_end1 = scan[best_len-1]; - scan_end = scan[best_len]; -#endif - } - } while ((cur_match = prev[cur_match & wmask]) > limit - && --chain_length != 0); - - if ((uInt)best_len <= s->lookahead) return (uInt)best_len; - return s->lookahead; -} -#endif /* ASMV */ - -#else /* FASTEST */ - -/* --------------------------------------------------------------------------- - * Optimized version for FASTEST only - */ -local uInt longest_match(s, cur_match) - deflate_state *s; - IPos cur_match; /* current match */ -{ - register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ - register int len; /* length of current match */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - Assert(cur_match < s->strstart, "no future"); - - match = s->window + cur_match; - - /* Return failure if the match length is less than 2: - */ - if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scan += 2, match += 2; - Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (*++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - *++scan == *++match && *++scan == *++match && - scan < strend); - - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (int)(strend - scan); - - if (len < MIN_MATCH) return MIN_MATCH - 1; - - s->match_start = cur_match; - return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; -} - -#endif /* FASTEST */ - -#ifdef DEBUG -/* =========================================================================== - * Check that the match at match_start is indeed a match. - */ -local void check_match(s, start, match, length) - deflate_state *s; - IPos start, match; - int length; -{ - /* check that the match is indeed a match */ - if (zmemcmp(s->window + match, - s->window + start, length) != EQUAL) { - fprintf(stderr, " start %u, match %u, length %d\n", - start, match, length); - do { - fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); - } while (--length != 0); - z_error("invalid match"); - } - if (z_verbose > 1) { - fprintf(stderr,"\\[%d,%d]", start-match, length); - do { putc(s->window[start++], stderr); } while (--length != 0); - } -} -#else -# define check_match(s, start, match, length) -#endif /* DEBUG */ - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -local void fill_window(s) - deflate_state *s; -{ - register unsigned n, m; - register Posf *p; - unsigned more; /* Amount of free space at the end of the window. */ - uInt wsize = s->w_size; - - Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); - - /* Deal with !@#$% 64K limit: */ - if (sizeof(int) <= 2) { - if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - more = wsize; - - } else if (more == (unsigned)(-1)) { - /* Very unlikely, but possible on 16 bit machine if - * strstart == 0 && lookahead == 1 (input done a byte at time) - */ - more--; - } - } - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s->strstart >= wsize+MAX_DIST(s)) { - - zmemcpy(s->window, s->window+wsize, (unsigned)wsize); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - n = s->hash_size; - p = &s->head[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - } while (--n); - - n = wsize; -#ifndef FASTEST - p = &s->prev[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -#endif - more += wsize; - } - if (s->strm->avail_in == 0) break; - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - Assert(more >= 2, "more < 2"); - - n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); - s->lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s->lookahead + s->insert >= MIN_MATCH) { - uInt str = s->strstart - s->insert; - s->ins_h = s->window[str]; - UPDATE_HASH(s, s->ins_h, s->window[str + 1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - while (s->insert) { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - s->insert--; - if (s->lookahead + s->insert < MIN_MATCH) - break; - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ - if (s->high_water < s->window_size) { - ulg curr = s->strstart + (ulg)(s->lookahead); - ulg init; - - if (s->high_water < curr) { - /* Previous high water mark below current data -- zero WIN_INIT - * bytes or up to end of window, whichever is less. - */ - init = s->window_size - curr; - if (init > WIN_INIT) - init = WIN_INIT; - zmemzero(s->window + curr, (unsigned)init); - s->high_water = curr + init; - } - else if (s->high_water < (ulg)curr + WIN_INIT) { - /* High water mark at or above current data, but below current data - * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up - * to end of window, whichever is less. - */ - init = (ulg)curr + WIN_INIT - s->high_water; - if (init > s->window_size - s->high_water) - init = s->window_size - s->high_water; - zmemzero(s->window + s->high_water, (unsigned)init); - s->high_water += init; - } - } - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "not enough room for search"); -} - -/* =========================================================================== - * Flush the current block, with given end-of-file flag. - * IN assertion: strstart is set to the end of the current match. - */ -#define FLUSH_BLOCK_ONLY(s, last) { \ - _tr_flush_block(s, (s->block_start >= 0L ? \ - (charf *)&s->window[(unsigned)s->block_start] : \ - (charf *)Z_NULL), \ - (ulg)((long)s->strstart - s->block_start), \ - (last)); \ - s->block_start = s->strstart; \ - flush_pending(s->strm); \ - Tracev((stderr,"[FLUSH]")); \ -} - -/* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, last) { \ - FLUSH_BLOCK_ONLY(s, last); \ - if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ -} - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. - */ -local block_state deflate_stored(s, flush) - deflate_state *s; - int flush; -{ - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - ulg max_block_size = 0xffff; - ulg max_start; - - if (max_block_size > s->pending_buf_size - 5) { - max_block_size = s->pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s->lookahead <= 1) { - - Assert(s->strstart < s->w_size+MAX_DIST(s) || - s->block_start >= (long)s->w_size, "slide too late"); - - fill_window(s); - if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; - - if (s->lookahead == 0) break; /* flush the current block */ - } - Assert(s->block_start >= 0L, "block gone"); - - s->strstart += s->lookahead; - s->lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - max_start = s->block_start + max_block_size; - if (s->strstart == 0 || (ulg)s->strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s->lookahead = (uInt)(s->strstart - max_start); - s->strstart = (uInt)max_start; - FLUSH_BLOCK(s, 0); - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: - */ - if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { - FLUSH_BLOCK(s, 0); - } - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if ((long)s->strstart > s->block_start) - FLUSH_BLOCK(s, 0); - return block_done; -} - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ -local block_state deflate_fast(s, flush) - deflate_state *s; - int flush; -{ - IPos hash_head; /* head of the hash chain */ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s->match_length = longest_match (s, hash_head); - /* longest_match() sets match_start */ - } - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->match_start, s->match_length); - - _tr_tally_dist(s, s->strstart - s->match_start, - s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ -#ifndef FASTEST - if (s->match_length <= s->max_insert_length && - s->lookahead >= MIN_MATCH) { - s->match_length--; /* string at strstart already in table */ - do { - s->strstart++; - INSERT_STRING(s, s->strstart, hash_head); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s->match_length != 0); - s->strstart++; - } else -#endif - { - s->strstart += s->match_length; - s->match_length = 0; - s->ins_h = s->window[s->strstart]; - UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} - -#ifndef FASTEST -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ -local block_state deflate_slow(s, flush) - deflate_state *s; - int flush; -{ - IPos hash_head; /* head of hash chain */ - int bflush; /* set if current block must be flushed */ - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s->lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { - INSERT_STRING(s, s->strstart, hash_head); - } - - /* Find the longest match, discarding those <= prev_length. - */ - s->prev_length = s->match_length, s->prev_match = s->match_start; - s->match_length = MIN_MATCH-1; - - if (hash_head != NIL && s->prev_length < s->max_lazy_match && - s->strstart - hash_head <= MAX_DIST(s)) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s->match_length = longest_match (s, hash_head); - /* longest_match() sets match_start */ - - if (s->match_length <= 5 && (s->strategy == Z_FILTERED -#if TOO_FAR <= 32767 - || (s->match_length == MIN_MATCH && - s->strstart - s->match_start > TOO_FAR) -#endif - )) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s->match_length = MIN_MATCH-1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { - uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - check_match(s, s->strstart-1, s->prev_match, s->prev_length); - - _tr_tally_dist(s, s->strstart -1 - s->prev_match, - s->prev_length - MIN_MATCH, bflush); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s->lookahead -= s->prev_length-1; - s->prev_length -= 2; - do { - if (++s->strstart <= max_insert) { - INSERT_STRING(s, s->strstart, hash_head); - } - } while (--s->prev_length != 0); - s->match_available = 0; - s->match_length = MIN_MATCH-1; - s->strstart++; - - if (bflush) FLUSH_BLOCK(s, 0); - - } else if (s->match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); - if (bflush) { - FLUSH_BLOCK_ONLY(s, 0); - } - s->strstart++; - s->lookahead--; - if (s->strm->avail_out == 0) return need_more; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s->match_available = 1; - s->strstart++; - s->lookahead--; - } - } - Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s->match_available) { - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); - s->match_available = 0; - } - s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} -#endif /* FASTEST */ - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -local block_state deflate_rle(s, flush) - deflate_state *s; - int flush; -{ - int bflush; /* set if current block must be flushed */ - uInt prev; /* byte at distance one to match */ - Bytef *scan, *strend; /* scan goes up to strend for length of run */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s->lookahead <= MAX_MATCH) { - fill_window(s); - if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s->match_length = 0; - if (s->lookahead >= MIN_MATCH && s->strstart > 0) { - scan = s->window + s->strstart - 1; - prev = *scan; - if (prev == *++scan && prev == *++scan && prev == *++scan) { - strend = s->window + s->strstart + MAX_MATCH; - do { - } while (prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - scan < strend); - s->match_length = MAX_MATCH - (int)(strend - scan); - if (s->match_length > s->lookahead) - s->match_length = s->lookahead; - } - Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s->match_length >= MIN_MATCH) { - check_match(s, s->strstart, s->strstart - 1, s->match_length); - - _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - s->strstart += s->match_length; - s->match_length = 0; - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -local block_state deflate_huff(s, flush) - deflate_state *s; - int flush; -{ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s->lookahead == 0) { - fill_window(s); - if (s->lookahead == 0) { - if (flush == Z_NO_FLUSH) - return need_more; - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s->match_length = 0; - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} diff --git a/build/premake/premake5/contrib/zlib/deflate.h b/build/premake/premake5/contrib/zlib/deflate.h deleted file mode 100644 index ce0299edd1..0000000000 --- a/build/premake/premake5/contrib/zlib/deflate.h +++ /dev/null @@ -1,346 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2012 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef DEFLATE_H -#define DEFLATE_H - -#include "zutil.h" - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer creation by deflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip encoding - should be left enabled. */ -#ifndef NO_GZIP -# define GZIP -#endif - -/* =========================================================================== - * Internal compression state. - */ - -#define LENGTH_CODES 29 -/* number of length codes, not counting the special END_BLOCK code */ - -#define LITERALS 256 -/* number of literal bytes 0..255 */ - -#define L_CODES (LITERALS+1+LENGTH_CODES) -/* number of Literal or Length codes, including the END_BLOCK code */ - -#define D_CODES 30 -/* number of distance codes */ - -#define BL_CODES 19 -/* number of codes used to transfer the bit lengths */ - -#define HEAP_SIZE (2*L_CODES+1) -/* maximum heap size */ - -#define MAX_BITS 15 -/* All codes must not exceed MAX_BITS bits */ - -#define Buf_size 16 -/* size of bit buffer in bi_buf */ - -#define INIT_STATE 42 -#define EXTRA_STATE 69 -#define NAME_STATE 73 -#define COMMENT_STATE 91 -#define HCRC_STATE 103 -#define BUSY_STATE 113 -#define FINISH_STATE 666 -/* Stream status */ - - -/* Data structure describing a single value and its code string. */ -typedef struct ct_data_s { - union { - ush freq; /* frequency count */ - ush code; /* bit string */ - } fc; - union { - ush dad; /* father node in Huffman tree */ - ush len; /* length of bit string */ - } dl; -} FAR ct_data; - -#define Freq fc.freq -#define Code fc.code -#define Dad dl.dad -#define Len dl.len - -typedef struct static_tree_desc_s static_tree_desc; - -typedef struct tree_desc_s { - ct_data *dyn_tree; /* the dynamic tree */ - int max_code; /* largest code with non zero frequency */ - static_tree_desc *stat_desc; /* the corresponding static tree */ -} FAR tree_desc; - -typedef ush Pos; -typedef Pos FAR Posf; -typedef unsigned IPos; - -/* A Pos is an index in the character window. We use short instead of int to - * save space in the various tables. IPos is used only for parameter passing. - */ - -typedef struct internal_state { - z_streamp strm; /* pointer back to this zlib stream */ - int status; /* as the name implies */ - Bytef *pending_buf; /* output still pending */ - ulg pending_buf_size; /* size of pending_buf */ - Bytef *pending_out; /* next pending byte to output to the stream */ - uInt pending; /* nb of bytes in the pending buffer */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - gz_headerp gzhead; /* gzip header information to write */ - uInt gzindex; /* where in extra, name, or comment */ - Byte method; /* can only be DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ - - uInt w_size; /* LZ77 window size (32K by default) */ - uInt w_bits; /* log2(w_size) (8..16) */ - uInt w_mask; /* w_size - 1 */ - - Bytef *window; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. Also, it limits - * the window size to 64K, which is quite useful on MSDOS. - * To do: use the user input buffer as sliding window. - */ - - ulg window_size; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - Posf *prev; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - Posf *head; /* Heads of the hash chains or NIL. */ - - uInt ins_h; /* hash index of string to be inserted */ - uInt hash_size; /* number of elements in hash table */ - uInt hash_bits; /* log2(hash_size) */ - uInt hash_mask; /* hash_size-1 */ - - uInt hash_shift; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - long block_start; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - uInt match_length; /* length of best match */ - IPos prev_match; /* previous match */ - int match_available; /* set if previous match exists */ - uInt strstart; /* start of string to insert */ - uInt match_start; /* start of matching string */ - uInt lookahead; /* number of valid bytes ahead in window */ - - uInt prev_length; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - uInt max_chain_length; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - uInt max_lazy_match; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ -# define max_insert_length max_lazy_match - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - int level; /* compression level (1..9) */ - int strategy; /* favor or force Huffman coding*/ - - uInt good_match; - /* Use a faster search when the previous match is longer than this */ - - int nice_match; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - /* Didn't use ct_data typedef below to suppress compiler warning */ - struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - struct tree_desc_s l_desc; /* desc. for literal tree */ - struct tree_desc_s d_desc; /* desc. for distance tree */ - struct tree_desc_s bl_desc; /* desc. for bit length tree */ - - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - int heap_len; /* number of elements in the heap */ - int heap_max; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - uch depth[2*L_CODES+1]; - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - uchf *l_buf; /* buffer for literals or lengths */ - - uInt lit_bufsize; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - uInt last_lit; /* running index in l_buf */ - - ushf *d_buf; - /* Buffer for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - ulg opt_len; /* bit length of current block with optimal trees */ - ulg static_len; /* bit length of current block with static trees */ - uInt matches; /* number of string matches in current block */ - uInt insert; /* bytes at end of window left to insert */ - -#ifdef DEBUG - ulg compressed_len; /* total bit length of compressed file mod 2^32 */ - ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ -#endif - - ush bi_buf; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - int bi_valid; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - - ulg high_water; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ - -} FAR deflate_state; - -/* Output a byte on the stream. - * IN assertion: there is enough room in pending_buf. - */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} - - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) -/* In order to simplify the code, particularly on 16 bit machines, match - * distances are limited to MAX_DIST instead of WSIZE. - */ - -#define WIN_INIT MAX_MATCH -/* Number of bytes after end of data in window to initialize in order to avoid - memory checker errors from longest match routines */ - - /* in trees.c */ -void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); -int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); -void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); -void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, - ulg stored_len, int last)); - -#define d_code(dist) \ - ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) -/* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. _dist_code[256] and _dist_code[257] are never - * used. - */ - -#ifndef DEBUG -/* Inline versions of _tr_tally for speed: */ - -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch ZLIB_INTERNAL _length_code[]; - extern uch ZLIB_INTERNAL _dist_code[]; -#else - extern const uch ZLIB_INTERNAL _length_code[]; - extern const uch ZLIB_INTERNAL _dist_code[]; -#endif - -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->d_buf[s->last_lit] = 0; \ - s->l_buf[s->last_lit++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (length); \ - ush dist = (distance); \ - s->d_buf[s->last_lit] = dist; \ - s->l_buf[s->last_lit++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif - -#endif /* DEFLATE_H */ diff --git a/build/premake/premake5/contrib/zlib/gzclose.c b/build/premake/premake5/contrib/zlib/gzclose.c deleted file mode 100644 index caeb99a317..0000000000 --- a/build/premake/premake5/contrib/zlib/gzclose.c +++ /dev/null @@ -1,25 +0,0 @@ -/* gzclose.c -- zlib gzclose() function - * Copyright (C) 2004, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* gzclose() is in a separate file so that it is linked in only if it is used. - That way the other gzclose functions can be used instead to avoid linking in - unneeded compression or decompression routines. */ -int ZEXPORT gzclose(file) - gzFile file; -{ -#ifndef NO_GZCOMPRESS - gz_statep state; - - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); -#else - return gzclose_r(file); -#endif -} diff --git a/build/premake/premake5/contrib/zlib/gzguts.h b/build/premake/premake5/contrib/zlib/gzguts.h deleted file mode 100644 index d87659d031..0000000000 --- a/build/premake/premake5/contrib/zlib/gzguts.h +++ /dev/null @@ -1,209 +0,0 @@ -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#ifdef _LARGEFILE64_SOURCE -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE 1 -# endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif -#endif - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include -#include "zlib.h" -#ifdef STDC -# include -# include -# include -#endif -#include - -#ifdef _WIN32 -# include -#endif - -#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) -# include -#endif - -#ifdef WINAPI_FAMILY -# define open _open -# define read _read -# define write _write -# define close _close -#endif - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(__CYGWIN__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#ifndef HAVE_VSNPRINTF -# ifdef MSDOS -/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ -# define NO_vsnprintf -# endif -# ifdef __TURBOC__ -# define NO_vsnprintf -# endif -# ifdef WIN32 -/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ -# if !defined(vsnprintf) && !defined(NO_vsnprintf) -# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) -# define vsnprintf _vsnprintf -# endif -# endif -# endif -# ifdef __SASC -# define NO_vsnprintf -# endif -# ifdef VMS -# define NO_vsnprintf -# endif -# ifdef __OS400__ -# define NO_vsnprintf -# endif -# ifdef __MVS__ -# define NO_vsnprintf -# endif -#endif - -/* unlike snprintf (which is required in C99, yet still not supported by - Microsoft more than a decade later!), _snprintf does not guarantee null - termination of the result -- however this is only used in gzlib.c where - the result is assured to fit in the space provided */ -#ifdef _MSC_VER -# define snprintf _snprintf -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -/* gz* functions always use library allocation functions */ -#ifndef STDC - extern voidp malloc OF((uInt size)); - extern void free OF((voidpf ptr)); -#endif - -/* get errno and strerror definition */ -#if defined UNDER_CE -# include -# define zstrerror() gz_strwinerror((DWORD)GetLastError()) -#else -# ifndef NO_STRERROR -# include -# define zstrerror() strerror(errno) -# else -# define zstrerror() "stdio error (consult errno)" -# endif -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); -#endif - -/* default memLevel */ -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif - -/* default i/o buffer size -- double this for output when reading (this and - twice this must be able to fit in an unsigned type) */ -#define GZBUFSIZE 8192 - -/* gzip modes, also provide a little integrity check on the passed structure */ -#define GZ_NONE 0 -#define GZ_READ 7247 -#define GZ_WRITE 31153 -#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ - -/* values for gz_state how */ -#define LOOK 0 /* look for a gzip header */ -#define COPY 1 /* copy input directly */ -#define GZIP 2 /* decompress a gzip stream */ - -/* internal gzip file state data structure */ -typedef struct { - /* exposed contents for gzgetc() macro */ - struct gzFile_s x; /* "x" for exposed */ - /* x.have: number of bytes available at x.next */ - /* x.next: next output data to deliver or write */ - /* x.pos: current position in uncompressed data */ - /* used for both reading and writing */ - int mode; /* see gzip modes above */ - int fd; /* file descriptor */ - char *path; /* path or fd for error messages */ - unsigned size; /* buffer size, zero if not allocated yet */ - unsigned want; /* requested buffer size, default is GZBUFSIZE */ - unsigned char *in; /* input buffer */ - unsigned char *out; /* output buffer (double-sized when reading) */ - int direct; /* 0 if processing gzip, 1 if transparent */ - /* just for reading */ - int how; /* 0: get header, 1: copy, 2: decompress */ - z_off64_t start; /* where the gzip data started, for rewinding */ - int eof; /* true if end of input file reached */ - int past; /* true if read requested past end */ - /* just for writing */ - int level; /* compression level */ - int strategy; /* compression strategy */ - /* seek request */ - z_off64_t skip; /* amount to skip (already rewound if backwards) */ - int seek; /* true if seek request pending */ - /* error information */ - int err; /* error code */ - char *msg; /* error message */ - /* zlib inflate or deflate stream */ - z_stream strm; /* stream structure in-place (not a pointer) */ -} gz_state; -typedef gz_state FAR *gz_statep; - -/* shared functions */ -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); -#endif - -/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t - value -- needed when comparing unsigned to z_off64_t, which is signed - (possible z_off64_t types off_t, off64_t, and long are all signed) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif diff --git a/build/premake/premake5/contrib/zlib/gzlib.c b/build/premake/premake5/contrib/zlib/gzlib.c deleted file mode 100644 index fae202ef89..0000000000 --- a/build/premake/premake5/contrib/zlib/gzlib.c +++ /dev/null @@ -1,634 +0,0 @@ -/* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -#if defined(_WIN32) && !defined(__BORLANDC__) -# define LSEEK _lseeki64 -#else -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define LSEEK lseek64 -#else -# define LSEEK lseek -#endif -#endif - -/* Local functions */ -local void gz_reset OF((gz_statep)); -local gzFile gz_open OF((const void *, int, const char *)); - -#if defined UNDER_CE - -/* Map the Windows error number in ERROR to a locale-dependent error message - string and return a pointer to it. Typically, the values for ERROR come - from GetLastError. - - The string pointed to shall not be modified by the application, but may be - overwritten by a subsequent call to gz_strwinerror - - The gz_strwinerror function does not change the current setting of - GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (error) - DWORD error; -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -#endif /* UNDER_CE */ - -/* Reset gzip file state */ -local void gz_reset(state) - gz_statep state; -{ - state->x.have = 0; /* no output data available */ - if (state->mode == GZ_READ) { /* for reading ... */ - state->eof = 0; /* not at end of file */ - state->past = 0; /* have not read past end yet */ - state->how = LOOK; /* look for gzip header */ - } - state->seek = 0; /* no seek request pending */ - gz_error(state, Z_OK, NULL); /* clear error */ - state->x.pos = 0; /* no uncompressed data yet */ - state->strm.avail_in = 0; /* no input data yet */ -} - -/* Open a gzip file either by name or file descriptor. */ -local gzFile gz_open(path, fd, mode) - const void *path; - int fd; - const char *mode; -{ - gz_statep state; - size_t len; - int oflag; -#ifdef O_CLOEXEC - int cloexec = 0; -#endif -#ifdef O_EXCL - int exclusive = 0; -#endif - - /* check input */ - if (path == NULL) - return NULL; - - /* allocate gzFile structure to return */ - state = (gz_statep)malloc(sizeof(gz_state)); - if (state == NULL) - return NULL; - state->size = 0; /* no buffers allocated yet */ - state->want = GZBUFSIZE; /* requested buffer size */ - state->msg = NULL; /* no error message yet */ - - /* interpret mode */ - state->mode = GZ_NONE; - state->level = Z_DEFAULT_COMPRESSION; - state->strategy = Z_DEFAULT_STRATEGY; - state->direct = 0; - while (*mode) { - if (*mode >= '0' && *mode <= '9') - state->level = *mode - '0'; - else - switch (*mode) { - case 'r': - state->mode = GZ_READ; - break; -#ifndef NO_GZCOMPRESS - case 'w': - state->mode = GZ_WRITE; - break; - case 'a': - state->mode = GZ_APPEND; - break; -#endif - case '+': /* can't read and write at the same time */ - free(state); - return NULL; - case 'b': /* ignore -- will request binary anyway */ - break; -#ifdef O_CLOEXEC - case 'e': - cloexec = 1; - break; -#endif -#ifdef O_EXCL - case 'x': - exclusive = 1; - break; -#endif - case 'f': - state->strategy = Z_FILTERED; - break; - case 'h': - state->strategy = Z_HUFFMAN_ONLY; - break; - case 'R': - state->strategy = Z_RLE; - break; - case 'F': - state->strategy = Z_FIXED; - break; - case 'T': - state->direct = 1; - break; - default: /* could consider as an error, but just ignore */ - ; - } - mode++; - } - - /* must provide an "r", "w", or "a" */ - if (state->mode == GZ_NONE) { - free(state); - return NULL; - } - - /* can't force transparent read */ - if (state->mode == GZ_READ) { - if (state->direct) { - free(state); - return NULL; - } - state->direct = 1; /* for empty file */ - } - - /* save the path name for error messages */ -#ifdef _WIN32 - if (fd == -2) { - len = wcstombs(NULL, path, 0); - if (len == (size_t)-1) - len = 0; - } - else -#endif - len = strlen((const char *)path); - state->path = (char *)malloc(len + 1); - if (state->path == NULL) { - free(state); - return NULL; - } -#ifdef _WIN32 - if (fd == -2) - if (len) - wcstombs(state->path, path, len + 1); - else - *(state->path) = 0; - else -#endif -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(state->path, len + 1, "%s", (const char *)path); -#else - strcpy(state->path, path); -#endif - - /* compute the flags for open() */ - oflag = -#ifdef O_LARGEFILE - O_LARGEFILE | -#endif -#ifdef O_BINARY - O_BINARY | -#endif -#ifdef O_CLOEXEC - (cloexec ? O_CLOEXEC : 0) | -#endif - (state->mode == GZ_READ ? - O_RDONLY : - (O_WRONLY | O_CREAT | -#ifdef O_EXCL - (exclusive ? O_EXCL : 0) | -#endif - (state->mode == GZ_WRITE ? - O_TRUNC : - O_APPEND))); - - /* open the file with the appropriate flags (or just use fd) */ - state->fd = fd > -1 ? fd : ( -#ifdef _WIN32 - fd == -2 ? _wopen(path, oflag, 0666) : -#endif - open((const char *)path, oflag, 0666)); - if (state->fd == -1) { - free(state->path); - free(state); - return NULL; - } - if (state->mode == GZ_APPEND) - state->mode = GZ_WRITE; /* simplify later checks */ - - /* save the current position for rewinding (only if reading) */ - if (state->mode == GZ_READ) { - state->start = LSEEK(state->fd, 0, SEEK_CUR); - if (state->start == -1) state->start = 0; - } - - /* initialize stream */ - gz_reset(state); - - /* return stream */ - return (gzFile)state; -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen64(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzdopen(fd, mode) - int fd; - const char *mode; -{ - char *path; /* identifier for error messages */ - gzFile gz; - - if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) - return NULL; -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(path, 7 + 3 * sizeof(int), "", fd); /* for debugging */ -#else - sprintf(path, "", fd); /* for debugging */ -#endif - gz = gz_open(path, fd, mode); - free(path); - return gz; -} - -/* -- see zlib.h -- */ -#ifdef _WIN32 -gzFile ZEXPORT gzopen_w(path, mode) - const wchar_t *path; - const char *mode; -{ - return gz_open(path, -2, mode); -} -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzbuffer(file, size) - gzFile file; - unsigned size; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* make sure we haven't already allocated memory */ - if (state->size != 0) - return -1; - - /* check and set requested size */ - if (size < 2) - size = 2; /* need two bytes to check magic header */ - state->want = size; - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzrewind(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* back up and start over */ - if (LSEEK(state->fd, state->start, SEEK_SET) == -1) - return -1; - gz_reset(state); - return 0; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzseek64(file, offset, whence) - gzFile file; - z_off64_t offset; - int whence; -{ - unsigned n; - z_off64_t ret; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* check that there's no error */ - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - - /* can only seek from start or relative to current position */ - if (whence != SEEK_SET && whence != SEEK_CUR) - return -1; - - /* normalize offset to a SEEK_CUR specification */ - if (whence == SEEK_SET) - offset -= state->x.pos; - else if (state->seek) - offset += state->skip; - state->seek = 0; - - /* if within raw area while reading, just go there */ - if (state->mode == GZ_READ && state->how == COPY && - state->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); - if (ret == -1) - return -1; - state->x.have = 0; - state->eof = 0; - state->past = 0; - state->seek = 0; - gz_error(state, Z_OK, NULL); - state->strm.avail_in = 0; - state->x.pos += offset; - return state->x.pos; - } - - /* calculate skip amount, rewinding if needed for back seek when reading */ - if (offset < 0) { - if (state->mode != GZ_READ) /* writing -- can't go backwards */ - return -1; - offset += state->x.pos; - if (offset < 0) /* before start of file! */ - return -1; - if (gzrewind(file) == -1) /* rewind, then skip to offset */ - return -1; - } - - /* if reading, skip what's in output buffer (one less gzgetc() check) */ - if (state->mode == GZ_READ) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? - (unsigned)offset : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - offset -= n; - } - - /* request skip (if not zero) */ - if (offset) { - state->seek = 1; - state->skip = offset; - } - return state->x.pos + offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzseek(file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ - z_off64_t ret; - - ret = gzseek64(file, (z_off64_t)offset, whence); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gztell64(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* return position */ - return state->x.pos + (state->seek ? state->skip : 0); -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gztell(file) - gzFile file; -{ - z_off64_t ret; - - ret = gztell64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzoffset64(file) - gzFile file; -{ - z_off64_t offset; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* compute and return effective offset in file */ - offset = LSEEK(state->fd, 0, SEEK_CUR); - if (offset == -1) - return -1; - if (state->mode == GZ_READ) /* reading */ - offset -= state->strm.avail_in; /* don't count buffered input */ - return offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzoffset(file) - gzFile file; -{ - z_off64_t ret; - - ret = gzoffset64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzeof(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return 0; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return 0; - - /* return end-of-file state */ - return state->mode == GZ_READ ? state->past : 0; -} - -/* -- see zlib.h -- */ -const char * ZEXPORT gzerror(file, errnum) - gzFile file; - int *errnum; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return NULL; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return NULL; - - /* return error information */ - if (errnum != NULL) - *errnum = state->err; - return state->err == Z_MEM_ERROR ? "out of memory" : - (state->msg == NULL ? "" : state->msg); -} - -/* -- see zlib.h -- */ -void ZEXPORT gzclearerr(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return; - - /* clear error and end-of-file */ - if (state->mode == GZ_READ) { - state->eof = 0; - state->past = 0; - } - gz_error(state, Z_OK, NULL); -} - -/* Create an error message in allocated memory and set state->err and - state->msg accordingly. Free any previous error message already there. Do - not try to free or allocate space if the error is Z_MEM_ERROR (out of - memory). Simply save the error message as a static string. If there is an - allocation failure constructing the error message, then convert the error to - out of memory. */ -void ZLIB_INTERNAL gz_error(state, err, msg) - gz_statep state; - int err; - const char *msg; -{ - /* free previously allocated message and clear */ - if (state->msg != NULL) { - if (state->err != Z_MEM_ERROR) - free(state->msg); - state->msg = NULL; - } - - /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ - if (err != Z_OK && err != Z_BUF_ERROR) - state->x.have = 0; - - /* set error code, and if no message, then done */ - state->err = err; - if (msg == NULL) - return; - - /* for an out of memory error, return literal string when requested */ - if (err == Z_MEM_ERROR) - return; - - /* construct error message with path */ - if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == - NULL) { - state->err = Z_MEM_ERROR; - return; - } -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, - "%s%s%s", state->path, ": ", msg); -#else - strcpy(state->msg, state->path); - strcat(state->msg, ": "); - strcat(state->msg, msg); -#endif - return; -} - -#ifndef INT_MAX -/* portably return maximum value for an int (when limits.h presumed not - available) -- we need to do this to cover cases where 2's complement not - used, since C standard permits 1's complement and sign-bit representations, - otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZLIB_INTERNAL gz_intmax() -{ - unsigned p, q; - - p = 1; - do { - q = p; - p <<= 1; - p++; - } while (p > q); - return q >> 1; -} -#endif diff --git a/build/premake/premake5/contrib/zlib/gzread.c b/build/premake/premake5/contrib/zlib/gzread.c deleted file mode 100644 index bf4538eb27..0000000000 --- a/build/premake/premake5/contrib/zlib/gzread.c +++ /dev/null @@ -1,594 +0,0 @@ -/* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); -local int gz_avail OF((gz_statep)); -local int gz_look OF((gz_statep)); -local int gz_decomp OF((gz_statep)); -local int gz_fetch OF((gz_statep)); -local int gz_skip OF((gz_statep, z_off64_t)); - -/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from - state->fd, and update state->eof, state->err, and state->msg as appropriate. - This function needs to loop on read(), since read() is not guaranteed to - read the number of bytes requested, depending on the type of descriptor. */ -local int gz_load(state, buf, len, have) - gz_statep state; - unsigned char *buf; - unsigned len; - unsigned *have; -{ - int ret; - - *have = 0; - do { - ret = read(state->fd, buf + *have, len - *have); - if (ret <= 0) - break; - *have += ret; - } while (*have < len); - if (ret < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (ret == 0) - state->eof = 1; - return 0; -} - -/* Load up input buffer and set eof flag if last data loaded -- return -1 on - error, 0 otherwise. Note that the eof flag is set when the end of the input - file is reached, even though there may be unused data in the buffer. Once - that data has been used, no more attempts will be made to read the file. - If strm->avail_in != 0, then the current data is moved to the beginning of - the input buffer, and then the remainder of the buffer is loaded with the - available data from the input file. */ -local int gz_avail(state) - gz_statep state; -{ - unsigned got; - z_streamp strm = &(state->strm); - - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - if (state->eof == 0) { - if (strm->avail_in) { /* copy what's there to the start */ - unsigned char *p = state->in; - unsigned const char *q = strm->next_in; - unsigned n = strm->avail_in; - do { - *p++ = *q++; - } while (--n); - } - if (gz_load(state, state->in + strm->avail_in, - state->size - strm->avail_in, &got) == -1) - return -1; - strm->avail_in += got; - strm->next_in = state->in; - } - return 0; -} - -/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. - If this is the first time in, allocate required memory. state->how will be - left unchanged if there is no more input data available, will be set to COPY - if there is no gzip header and direct copying will be performed, or it will - be set to GZIP for decompression. If direct copying, then leftover input - data from the input buffer will be copied to the output buffer. In that - case, all further file reads will be directly to either the output buffer or - a user buffer. If decompressing, the inflate state will be initialized. - gz_look() will return 0 on success or -1 on failure. */ -local int gz_look(state) - gz_statep state; -{ - z_streamp strm = &(state->strm); - - /* allocate read buffers and inflate memory */ - if (state->size == 0) { - /* allocate buffers */ - state->in = (unsigned char *)malloc(state->want); - state->out = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { - if (state->out != NULL) - free(state->out); - if (state->in != NULL) - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - state->size = state->want; - - /* allocate inflate memory */ - state->strm.zalloc = Z_NULL; - state->strm.zfree = Z_NULL; - state->strm.opaque = Z_NULL; - state->strm.avail_in = 0; - state->strm.next_in = Z_NULL; - if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ - free(state->out); - free(state->in); - state->size = 0; - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - } - - /* get at least the magic bytes in the input buffer */ - if (strm->avail_in < 2) { - if (gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) - return 0; - } - - /* look for gzip magic bytes -- if there, do gzip decoding (note: there is - a logical dilemma here when considering the case of a partially written - gzip file, to wit, if a single 31 byte is written, then we cannot tell - whether this is a single-byte file, or just a partially written gzip - file -- for here we assume that if a gzip file is being written, then - the header will be written in a single operation, so that reading a - single byte is sufficient indication that it is not a gzip file) */ - if (strm->avail_in > 1 && - strm->next_in[0] == 31 && strm->next_in[1] == 139) { - inflateReset(strm); - state->how = GZIP; - state->direct = 0; - return 0; - } - - /* no gzip header -- if we were decoding gzip before, then this is trailing - garbage. Ignore the trailing garbage and finish. */ - if (state->direct == 0) { - strm->avail_in = 0; - state->eof = 1; - state->x.have = 0; - return 0; - } - - /* doing raw i/o, copy any leftover input to output -- this assumes that - the output buffer is larger than the input buffer, which also assures - space for gzungetc() */ - state->x.next = state->out; - if (strm->avail_in) { - memcpy(state->x.next, strm->next_in, strm->avail_in); - state->x.have = strm->avail_in; - strm->avail_in = 0; - } - state->how = COPY; - state->direct = 1; - return 0; -} - -/* Decompress from input to the provided next_out and avail_out in the state. - On return, state->x.have and state->x.next point to the just decompressed - data. If the gzip stream completes, state->how is reset to LOOK to look for - the next gzip stream or raw data, once state->x.have is depleted. Returns 0 - on success, -1 on failure. */ -local int gz_decomp(state) - gz_statep state; -{ - int ret = Z_OK; - unsigned had; - z_streamp strm = &(state->strm); - - /* fill output buffer up to end of deflate stream */ - had = strm->avail_out; - do { - /* get more input for inflate() */ - if (strm->avail_in == 0 && gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) { - gz_error(state, Z_BUF_ERROR, "unexpected end of file"); - break; - } - - /* decompress and handle errors */ - ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { - gz_error(state, Z_STREAM_ERROR, - "internal error: inflate stream corrupt"); - return -1; - } - if (ret == Z_MEM_ERROR) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ - gz_error(state, Z_DATA_ERROR, - strm->msg == NULL ? "compressed data error" : strm->msg); - return -1; - } - } while (strm->avail_out && ret != Z_STREAM_END); - - /* update available output */ - state->x.have = had - strm->avail_out; - state->x.next = strm->next_out - state->x.have; - - /* if the gzip stream completed successfully, look for another */ - if (ret == Z_STREAM_END) - state->how = LOOK; - - /* good decompression */ - return 0; -} - -/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. - Data is either copied from the input file or decompressed from the input - file depending on state->how. If state->how is LOOK, then a gzip header is - looked for to determine whether to copy or decompress. Returns -1 on error, - otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the - end of the input file has been reached and all data has been processed. */ -local int gz_fetch(state) - gz_statep state; -{ - z_streamp strm = &(state->strm); - - do { - switch(state->how) { - case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ - if (gz_look(state) == -1) - return -1; - if (state->how == LOOK) - return 0; - break; - case COPY: /* -> COPY */ - if (gz_load(state, state->out, state->size << 1, &(state->x.have)) - == -1) - return -1; - state->x.next = state->out; - return 0; - case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ - strm->avail_out = state->size << 1; - strm->next_out = state->out; - if (gz_decomp(state) == -1) - return -1; - } - } while (state->x.have == 0 && (!state->eof || strm->avail_in)); - return 0; -} - -/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ -local int gz_skip(state, len) - gz_statep state; - z_off64_t len; -{ - unsigned n; - - /* skip over len bytes or reach end-of-file, whichever comes first */ - while (len) - /* skip over whatever is in output buffer */ - if (state->x.have) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? - (unsigned)len : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - len -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && state->strm.avail_in == 0) - break; - - /* need more data to skip -- load up output buffer */ - else { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - } - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzread(file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - unsigned got, n; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return -1; - } - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return -1; - } - - /* get len bytes to buf, or less than len if at the end */ - got = 0; - do { - /* first just try copying data from the output buffer */ - if (state->x.have) { - n = state->x.have > len ? len : state->x.have; - memcpy(buf, state->x.next, n); - state->x.next += n; - state->x.have -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && strm->avail_in == 0) { - state->past = 1; /* tried to read past end */ - break; - } - - /* need output data -- for small len or new stream load up our output - buffer */ - else if (state->how == LOOK || len < (state->size << 1)) { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - continue; /* no progress yet -- go back to copy above */ - /* the copy above assures that we will leave with space in the - output buffer, allowing at least one gzungetc() to succeed */ - } - - /* large len -- read directly into user buffer */ - else if (state->how == COPY) { /* read directly */ - if (gz_load(state, (unsigned char *)buf, len, &n) == -1) - return -1; - } - - /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ - strm->avail_out = len; - strm->next_out = (unsigned char *)buf; - if (gz_decomp(state) == -1) - return -1; - n = state->x.have; - state->x.have = 0; - } - - /* update progress */ - len -= n; - buf = (char *)buf + n; - got += n; - state->x.pos += n; - } while (len); - - /* return number of bytes read into user buffer (will fit in int) */ - return (int)got; -} - -/* -- see zlib.h -- */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -#else -# undef gzgetc -#endif -int ZEXPORT gzgetc(file) - gzFile file; -{ - int ret; - unsigned char buf[1]; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* try output buffer (no need to check for skip request) */ - if (state->x.have) { - state->x.have--; - state->x.pos++; - return *(state->x.next)++; - } - - /* nothing there -- try gzread() */ - ret = gzread(file, buf, 1); - return ret < 1 ? -1 : buf[0]; -} - -int ZEXPORT gzgetc_(file) -gzFile file; -{ - return gzgetc(file); -} - -/* -- see zlib.h -- */ -int ZEXPORT gzungetc(c, file) - int c; - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return -1; - } - - /* can't push EOF */ - if (c < 0) - return -1; - - /* if output buffer empty, put byte at end (allows more pushing) */ - if (state->x.have == 0) { - state->x.have = 1; - state->x.next = state->out + (state->size << 1) - 1; - state->x.next[0] = c; - state->x.pos--; - state->past = 0; - return c; - } - - /* if no room, give up (must have already done a gzungetc()) */ - if (state->x.have == (state->size << 1)) { - gz_error(state, Z_DATA_ERROR, "out of room to push characters"); - return -1; - } - - /* slide output data if needed and insert byte before existing data */ - if (state->x.next == state->out) { - unsigned char *src = state->out + state->x.have; - unsigned char *dest = state->out + (state->size << 1); - while (src > state->out) - *--dest = *--src; - state->x.next = dest; - } - state->x.have++; - state->x.next--; - state->x.next[0] = c; - state->x.pos--; - state->past = 0; - return c; -} - -/* -- see zlib.h -- */ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ - unsigned left, n; - char *str; - unsigned char *eol; - gz_statep state; - - /* check parameters and get internal structure */ - if (file == NULL || buf == NULL || len < 1) - return NULL; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return NULL; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return NULL; - } - - /* copy output bytes up to new line or len - 1, whichever comes first -- - append a terminating zero to the string (we don't check for a zero in - the contents, let the user worry about that) */ - str = buf; - left = (unsigned)len - 1; - if (left) do { - /* assure that something is in the output buffer */ - if (state->x.have == 0 && gz_fetch(state) == -1) - return NULL; /* error */ - if (state->x.have == 0) { /* end of file */ - state->past = 1; /* read past end */ - break; /* return what we have */ - } - - /* look for end-of-line in current output buffer */ - n = state->x.have > left ? left : state->x.have; - eol = (unsigned char *)memchr(state->x.next, '\n', n); - if (eol != NULL) - n = (unsigned)(eol - state->x.next) + 1; - - /* copy through end-of-line, or remainder if not found */ - memcpy(buf, state->x.next, n); - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - left -= n; - buf += n; - } while (left && eol == NULL); - - /* return terminated string, or if nothing, end of file */ - if (buf == str) - return NULL; - buf[0] = 0; - return str; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzdirect(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* if the state is not known, but we can find out, then do so (this is - mainly for right after a gzopen() or gzdopen()) */ - if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) - (void)gz_look(state); - - /* return 1 if transparent, 0 if processing a gzip stream */ - return state->direct; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_r(file) - gzFile file; -{ - int ret, err; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're reading */ - if (state->mode != GZ_READ) - return Z_STREAM_ERROR; - - /* free memory and close file */ - if (state->size) { - inflateEnd(&(state->strm)); - free(state->out); - free(state->in); - } - err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; - gz_error(state, Z_OK, NULL); - free(state->path); - ret = close(state->fd); - free(state); - return ret ? Z_ERRNO : err; -} diff --git a/build/premake/premake5/contrib/zlib/gzwrite.c b/build/premake/premake5/contrib/zlib/gzwrite.c deleted file mode 100644 index aa767fbf63..0000000000 --- a/build/premake/premake5/contrib/zlib/gzwrite.c +++ /dev/null @@ -1,577 +0,0 @@ -/* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_init OF((gz_statep)); -local int gz_comp OF((gz_statep, int)); -local int gz_zero OF((gz_statep, z_off64_t)); - -/* Initialize state for writing a gzip file. Mark initialization by setting - state->size to non-zero. Return -1 on failure or 0 on success. */ -local int gz_init(state) - gz_statep state; -{ - int ret; - z_streamp strm = &(state->strm); - - /* allocate input buffer */ - state->in = (unsigned char *)malloc(state->want); - if (state->in == NULL) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* only need output buffer and deflate state if compressing */ - if (!state->direct) { - /* allocate output buffer */ - state->out = (unsigned char *)malloc(state->want); - if (state->out == NULL) { - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* allocate deflate memory, set up for gzip compression */ - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = deflateInit2(strm, state->level, Z_DEFLATED, - MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); - if (ret != Z_OK) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - } - - /* mark state as initialized */ - state->size = state->want; - - /* initialize write buffer if compressing */ - if (!state->direct) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = strm->next_out; - } - return 0; -} - -/* Compress whatever is at avail_in and next_in and write to the output file. - Return -1 if there is an error writing to the output file, otherwise 0. - flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH, - then the deflate() state is reset to start a new gzip stream. If gz->direct - is true, then simply write to the output file without compressing, and - ignore flush. */ -local int gz_comp(state, flush) - gz_statep state; - int flush; -{ - int ret, got; - unsigned have; - z_streamp strm = &(state->strm); - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return -1; - - /* write directly if requested */ - if (state->direct) { - got = write(state->fd, strm->next_in, strm->avail_in); - if (got < 0 || (unsigned)got != strm->avail_in) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - strm->avail_in = 0; - return 0; - } - - /* run deflate() on provided input until it produces no more output */ - ret = Z_OK; - do { - /* write out current buffer contents if full, or if flushing, but if - doing Z_FINISH then don't write until we get to Z_STREAM_END */ - if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && - (flush != Z_FINISH || ret == Z_STREAM_END))) { - have = (unsigned)(strm->next_out - state->x.next); - if (have && ((got = write(state->fd, state->x.next, have)) < 0 || - (unsigned)got != have)) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (strm->avail_out == 0) { - strm->avail_out = state->size; - strm->next_out = state->out; - } - state->x.next = strm->next_out; - } - - /* compress */ - have = strm->avail_out; - ret = deflate(strm, flush); - if (ret == Z_STREAM_ERROR) { - gz_error(state, Z_STREAM_ERROR, - "internal error: deflate stream corrupt"); - return -1; - } - have -= strm->avail_out; - } while (have); - - /* if that completed a deflate stream, allow another to start */ - if (flush == Z_FINISH) - deflateReset(strm); - - /* all done, no errors */ - return 0; -} - -/* Compress len zeros to output. Return -1 on error, 0 on success. */ -local int gz_zero(state, len) - gz_statep state; - z_off64_t len; -{ - int first; - unsigned n; - z_streamp strm = &(state->strm); - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - - /* compress len zeros (len guaranteed > 0) */ - first = 1; - while (len) { - n = GT_OFF(state->size) || (z_off64_t)state->size > len ? - (unsigned)len : state->size; - if (first) { - memset(state->in, 0, n); - first = 0; - } - strm->avail_in = n; - strm->next_in = state->in; - state->x.pos += n; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - len -= n; - } - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzwrite(file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ - unsigned put = len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return 0; - } - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* for small len, copy to input buffer, otherwise compress directly */ - if (len < state->size) { - /* copy to input buffer, compress when full */ - do { - unsigned have, copy; - - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - copy = state->size - have; - if (copy > len) - copy = len; - memcpy(state->in + have, buf, copy); - strm->avail_in += copy; - state->x.pos += copy; - buf = (const char *)buf + copy; - len -= copy; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); - } - else { - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* directly compress user buffer to file */ - strm->avail_in = len; - strm->next_in = (z_const Bytef *)buf; - state->x.pos += len; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } - - /* input was all buffered or compressed (put will fit in int) */ - return (int)put; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - unsigned have; - unsigned char buf[1]; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* try writing to input buffer for speed (state->size == 0 if buffer not - initialized) */ - if (state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - if (have < state->size) { - state->in[have] = c; - strm->avail_in++; - state->x.pos++; - return c & 0xff; - } - } - - /* no room in buffer or not initialized, use gz_write() */ - buf[0] = c; - if (gzwrite(file, buf, 1) != 1) - return -1; - return c & 0xff; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputs(file, str) - gzFile file; - const char *str; -{ - int ret; - unsigned len; - - /* write string */ - len = (unsigned)strlen(str); - ret = gzwrite(file, str, len); - return ret == 0 && len != 0 ? -1 : ret; -} - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -#include - -/* -- see zlib.h -- */ -int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) -{ - int size, len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf((char *)(state->in), format, va); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; -# else - len = vsprintf((char *)(state->in), format, va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf((char *)(state->in), size, format, va); - len = strlen((char *)(state->in)); -# else - len = vsnprintf((char *)(state->in), size, format, va); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) -{ - va_list va; - int ret; - - va_start(va, format); - ret = gzvprintf(file, format, va); - va_end(va); - return ret; -} - -#else /* !STDC && !Z_HAVE_STDARG_H */ - -/* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ - int size, len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that can really pass pointer in ints */ - if (sizeof(int) != sizeof(void *)) - return 0; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; -# else - len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen((char *)(state->in)); -# else - len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, - a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, - a19, a20); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzflush(file, flush) - gzFile file; - int flush; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* check flush parameter */ - if (flush < 0 || flush > Z_FINISH) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* compress remaining data with requested flush */ - gz_comp(state, flush); - return state->err; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzsetparams(file, level, strategy) - gzFile file; - int level; - int strategy; -{ - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* if no change is requested, then do nothing */ - if (level == state->level && strategy == state->strategy) - return Z_OK; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* change compression parameters for subsequent input */ - if (state->size) { - /* flush previous input with previous parameters before changing */ - if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1) - return state->err; - deflateParams(strm, level, strategy); - } - state->level = level; - state->strategy = strategy; - return Z_OK; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_w(file) - gzFile file; -{ - int ret = Z_OK; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're writing */ - if (state->mode != GZ_WRITE) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - ret = state->err; - } - - /* flush, free memory, and close file */ - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; - if (state->size) { - if (!state->direct) { - (void)deflateEnd(&(state->strm)); - free(state->out); - } - free(state->in); - } - gz_error(state, Z_OK, NULL); - free(state->path); - if (close(state->fd) == -1) - ret = Z_ERRNO; - free(state); - return ret; -} diff --git a/build/premake/premake5/contrib/zlib/infback.c b/build/premake/premake5/contrib/zlib/infback.c deleted file mode 100644 index f3833c2e43..0000000000 --- a/build/premake/premake5/contrib/zlib/infback.c +++ /dev/null @@ -1,640 +0,0 @@ -/* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2011 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - This code is largely copied from inflate.c. Normally either infback.o or - inflate.o would be linked into an application--not both. The interface - with inffast.c is retained so that optimized assembler-coded versions of - inflate_fast() can be used with either inflate.c or infback.c. - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -/* function prototypes */ -local void fixedtables OF((struct inflate_state FAR *state)); - -/* - strm provides memory allocation functions in zalloc and zfree, or - Z_NULL to use the library memory allocation functions. - - windowBits is in the range 8..15, and window is a user-supplied - window and output buffer that is 2**windowBits bytes. - */ -int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) -z_streamp strm; -int windowBits; -unsigned char FAR *window; -const char *version; -int stream_size; -{ - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL || window == Z_NULL || - windowBits < 8 || windowBits > 15) - return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *)ZALLOC(strm, 1, - sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->dmax = 32768U; - state->wbits = windowBits; - state->wsize = 1U << windowBits; - state->window = window; - state->wnext = 0; - state->whave = 0; - return Z_OK; -} - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ -#ifdef BUILDFIXED - static int virgin = 1; - static code *lenfix, *distfix; - static code fixed[544]; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; - static code *next; - - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); - - /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); - - /* do this just once */ - virgin = 0; - } -#else /* !BUILDFIXED */ -# include "inffixed.h" -#endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; -} - -/* Macros for inflateBack(): */ - -/* Load returned state from inflate_fast() */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Set state from registers for inflate_fast() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Assure that some input is available. If input is requested, but denied, - then return a Z_BUF_ERROR from inflateBack(). */ -#define PULL() \ - do { \ - if (have == 0) { \ - have = in(in_desc, &next); \ - if (have == 0) { \ - next = Z_NULL; \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflateBack() - with an error if there is no input available. */ -#define PULLBYTE() \ - do { \ - PULL(); \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflateBack() with - an error. */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* Assure that some output space is available, by writing out the window - if it's full. If the write fails, return from inflateBack() with a - Z_BUF_ERROR. */ -#define ROOM() \ - do { \ - if (left == 0) { \ - put = state->window; \ - left = state->wsize; \ - state->whave = left; \ - if (out(out_desc, put, left)) { \ - ret = Z_BUF_ERROR; \ - goto inf_leave; \ - } \ - } \ - } while (0) - -/* - strm provides the memory allocation functions and window buffer on input, - and provides information on the unused input on return. For Z_DATA_ERROR - returns, strm will also provide an error message. - - in() and out() are the call-back input and output functions. When - inflateBack() needs more input, it calls in(). When inflateBack() has - filled the window with output, or when it completes with data in the - window, it calls out() to write out the data. The application must not - change the provided input until in() is called again or inflateBack() - returns. The application must not change the window/output buffer until - inflateBack() returns. - - in() and out() are called with a descriptor parameter provided in the - inflateBack() call. This parameter can be a structure that provides the - information required to do the read or write, as well as accumulated - information on the input and output such as totals and check values. - - in() should return zero on failure. out() should return non-zero on - failure. If either in() or out() fails, than inflateBack() returns a - Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it - was in() or out() that caused in the error. Otherwise, inflateBack() - returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format - error, or Z_MEM_ERROR if it could not allocate memory for the state. - inflateBack() can also return Z_STREAM_ERROR if the input parameters - are not correct, i.e. strm is Z_NULL or the state was not initialized. - */ -int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) -z_streamp strm; -in_func in; -void FAR *in_desc; -out_func out; -void FAR *out_desc; -{ - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - /* Check that the strm exists and that the state was initialized */ - if (strm == Z_NULL || strm->state == Z_NULL) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* Reset the state */ - strm->msg = Z_NULL; - state->mode = TYPE; - state->last = 0; - state->whave = 0; - next = strm->next_in; - have = next != Z_NULL ? strm->avail_in : 0; - hold = 0; - bits = 0; - put = state->window; - left = state->wsize; - - /* Inflate until end of block marked as last */ - for (;;) - switch (state->mode) { - case TYPE: - /* determine and dispatch block type */ - if (state->last) { - BYTEBITS(); - state->mode = DONE; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); - state->mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); - state->mode = LEN; /* decode codes */ - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - - case STORED: - /* get and verify stored block length */ - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); - INITBITS(); - - /* copy stored block from input to output */ - while (state->length != 0) { - copy = state->length; - PULL(); - ROOM(); - if (copy > have) copy = have; - if (copy > left) copy = left; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - } - Tracev((stderr, "inflate: stored end\n")); - state->mode = TYPE; - break; - - case TABLE: - /* get dynamic table entries descriptor */ - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - Tracev((stderr, "inflate: table sizes ok\n")); - - /* get code length code lengths (not a typo) */ - state->have = 0; - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (code const FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - - /* get length and distance code code lengths */ - state->have = 0; - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = (unsigned)(state->lens[state->have - 1]); - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - state->mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - state->lencode = (code const FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (code const FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN; - - case LEN: - /* use inflate_fast() if we have enough input and output */ - if (have >= 6 && left >= 258) { - RESTORE(); - if (state->whave < state->wsize) - state->whave = state->wsize - left; - inflate_fast(strm, state->wsize); - LOAD(); - break; - } - - /* get a literal, length, or end-of-block code */ - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - state->length = (unsigned)here.val; - - /* process literal */ - if (here.op == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - ROOM(); - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - } - - /* process end of block */ - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - state->mode = TYPE; - break; - } - - /* invalid code */ - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - - /* length code -- get extra bits, if any */ - state->extra = (unsigned)(here.op) & 15; - if (state->extra != 0) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - } - Tracevv((stderr, "inflate: length %u\n", state->length)); - - /* get distance code */ - for (;;) { - here = state->distcode[BITS(state->distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(here.bits); - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)here.val; - - /* get distance extra bits, if any */ - state->extra = (unsigned)(here.op) & 15; - if (state->extra != 0) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - } - if (state->offset > state->wsize - (state->whave < state->wsize ? - left : 0)) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - - /* copy match from window to output */ - do { - ROOM(); - copy = state->wsize - state->offset; - if (copy < left) { - from = put + copy; - copy = left - copy; - } - else { - from = put - state->offset; - copy = left; - } - if (copy > state->length) copy = state->length; - state->length -= copy; - left -= copy; - do { - *put++ = *from++; - } while (--copy); - } while (state->length != 0); - break; - - case DONE: - /* inflate stream terminated properly -- write leftover output */ - ret = Z_STREAM_END; - if (left < state->wsize) { - if (out(out_desc, state->window, state->wsize - left)) - ret = Z_BUF_ERROR; - } - goto inf_leave; - - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - - default: /* can't happen, but makes compilers happy */ - ret = Z_STREAM_ERROR; - goto inf_leave; - } - - /* Return unused input */ - inf_leave: - strm->next_in = next; - strm->avail_in = have; - return ret; -} - -int ZEXPORT inflateBackEnd(strm) -z_streamp strm; -{ - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) - return Z_STREAM_ERROR; - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} diff --git a/build/premake/premake5/contrib/zlib/inffast.c b/build/premake/premake5/contrib/zlib/inffast.c deleted file mode 100644 index bda59ceb6a..0000000000 --- a/build/premake/premake5/contrib/zlib/inffast.c +++ /dev/null @@ -1,340 +0,0 @@ -/* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -#ifndef ASMINF - -/* Allow machine dependent optimization for post-increment or pre-increment. - Based on testing to date, - Pre-increment preferred for: - - PowerPC G3 (Adler) - - MIPS R5000 (Randers-Pehrson) - Post-increment preferred for: - - none - No measurable difference: - - Pentium III (Anderson) - - M68060 (Nikl) - */ -#ifdef POSTINC -# define OFF 0 -# define PUP(a) *(a)++ -#else -# define OFF 1 -# define PUP(a) *++(a) -#endif - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state->mode == LEN - strm->avail_in >= 6 - strm->avail_out >= 258 - start >= strm->avail_out - state->bits < 8 - - On return, state->mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm->avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm->avail_out >= 258 for each loop to avoid checking for - output space. - */ -void ZLIB_INTERNAL inflate_fast(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ - struct inflate_state FAR *state; - z_const unsigned char FAR *in; /* local strm->next_in */ - z_const unsigned char FAR *last; /* have enough input while in < last */ - unsigned char FAR *out; /* local strm->next_out */ - unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ - unsigned char FAR *end; /* while out < end, enough space available */ -#ifdef INFLATE_STRICT - unsigned dmax; /* maximum distance from zlib header */ -#endif - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ - unsigned long hold; /* local strm->hold */ - unsigned bits; /* local strm->bits */ - code const FAR *lcode; /* local strm->lencode */ - code const FAR *dcode; /* local strm->distcode */ - unsigned lmask; /* mask for first level of length codes */ - unsigned dmask; /* mask for first level of distance codes */ - code here; /* retrieved table entry */ - unsigned op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - unsigned len; /* match length, unused bytes */ - unsigned dist; /* match distance */ - unsigned char FAR *from; /* where to copy match from */ - - /* copy state to local variables */ - state = (struct inflate_state FAR *)strm->state; - in = strm->next_in - OFF; - last = in + (strm->avail_in - 5); - out = strm->next_out - OFF; - beg = out - (start - strm->avail_out); - end = out + (strm->avail_out - 257); -#ifdef INFLATE_STRICT - dmax = state->dmax; -#endif - wsize = state->wsize; - whave = state->whave; - wnext = state->wnext; - window = state->window; - hold = state->hold; - bits = state->bits; - lcode = state->lencode; - dcode = state->distcode; - lmask = (1U << state->lenbits) - 1; - dmask = (1U << state->distbits) - 1; - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - do { - if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - here = lcode[hold & lmask]; - dolen: - op = (unsigned)(here.bits); - hold >>= op; - bits -= op; - op = (unsigned)(here.op); - if (op == 0) { /* literal */ - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - PUP(out) = (unsigned char)(here.val); - } - else if (op & 16) { /* length base */ - len = (unsigned)(here.val); - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - len += (unsigned)hold & ((1U << op) - 1); - hold >>= op; - bits -= op; - } - Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - here = dcode[hold & dmask]; - dodist: - op = (unsigned)(here.bits); - hold >>= op; - bits -= op; - op = (unsigned)(here.op); - if (op & 16) { /* distance base */ - dist = (unsigned)(here.val); - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - } - dist += (unsigned)hold & ((1U << op) - 1); -#ifdef INFLATE_STRICT - if (dist > dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - hold >>= op; - bits -= op; - Tracevv((stderr, "inflate: distance %u\n", dist)); - op = (unsigned)(out - beg); /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state->sane) { - strm->msg = - (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - if (len <= op - whave) { - do { - PUP(out) = 0; - } while (--len); - continue; - } - len -= op - whave; - do { - PUP(out) = 0; - } while (--op > whave); - if (op == 0) { - from = out - dist; - do { - PUP(out) = PUP(from); - } while (--len); - continue; - } -#endif - } - from = window - OFF; - if (wnext == 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = window - OFF; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - while (len > 2) { - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); - len -= 3; - } - if (len) { - PUP(out) = PUP(from); - if (len > 1) - PUP(out) = PUP(from); - } - } - else { - from = out - dist; /* copy direct from output */ - do { /* minimum length is three */ - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); - len -= 3; - } while (len > 2); - if (len) { - PUP(out) = PUP(from); - if (len > 1) - PUP(out) = PUP(from); - } - } - } - else if ((op & 64) == 0) { /* 2nd level distance code */ - here = dcode[here.val + (hold & ((1U << op) - 1))]; - goto dodist; - } - else { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - } - else if ((op & 64) == 0) { /* 2nd level length code */ - here = lcode[here.val + (hold & ((1U << op) - 1))]; - goto dolen; - } - else if (op & 32) { /* end-of-block */ - Tracevv((stderr, "inflate: end of block\n")); - state->mode = TYPE; - break; - } - else { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - } while (in < last && out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - in -= len; - bits -= len << 3; - hold &= (1U << bits) - 1; - - /* update state and return */ - strm->next_in = in + OFF; - strm->next_out = out + OFF; - strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); - strm->avail_out = (unsigned)(out < end ? - 257 + (end - out) : 257 - (out - end)); - state->hold = hold; - state->bits = bits; - return; -} - -/* - inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - - Using bit fields for code structure - - Different op definition to avoid & for extra bits (do & for table bits) - - Three separate decoding do-loops for direct, window, and wnext == 0 - - Special case for distance > 1 copies to do overlapped load and store copy - - Explicit branch predictions (based on measured branch probabilities) - - Deferring match copy and interspersed it with decoding subsequent codes - - Swapping literal/length else - - Swapping window/direct else - - Larger unrolled copy loops (three is about right) - - Moving len -= 3 statement into middle of loop - */ - -#endif /* !ASMINF */ diff --git a/build/premake/premake5/contrib/zlib/inffast.h b/build/premake/premake5/contrib/zlib/inffast.h deleted file mode 100644 index e5c1aa4ca8..0000000000 --- a/build/premake/premake5/contrib/zlib/inffast.h +++ /dev/null @@ -1,11 +0,0 @@ -/* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/build/premake/premake5/contrib/zlib/inffixed.h b/build/premake/premake5/contrib/zlib/inffixed.h deleted file mode 100644 index d628327769..0000000000 --- a/build/premake/premake5/contrib/zlib/inffixed.h +++ /dev/null @@ -1,94 +0,0 @@ - /* inffixed.h -- table for decoding fixed codes - * Generated automatically by makefixed(). - */ - - /* WARNING: this file should *not* be used by applications. - It is part of the implementation of this library and is - subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, - {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, - {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, - {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, - {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, - {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, - {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, - {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, - {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, - {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, - {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, - {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, - {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, - {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, - {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, - {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, - {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, - {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, - {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, - {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, - {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, - {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, - {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, - {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, - {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, - {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, - {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, - {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, - {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, - {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, - {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, - {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, - {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, - {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, - {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, - {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, - {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, - {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, - {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, - {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, - {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, - {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, - {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, - {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, - {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, - {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, - {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, - {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, - {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, - {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, - {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, - {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, - {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, - {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, - {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, - {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, - {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, - {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, - {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, - {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, - {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, - {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, - {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, - {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, - {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, - {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, - {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, - {0,9,255} - }; - - static const code distfix[32] = { - {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, - {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, - {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, - {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, - {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, - {22,5,193},{64,5,0} - }; diff --git a/build/premake/premake5/contrib/zlib/inflate.c b/build/premake/premake5/contrib/zlib/inflate.c deleted file mode 100644 index 870f89bb4d..0000000000 --- a/build/premake/premake5/contrib/zlib/inflate.c +++ /dev/null @@ -1,1512 +0,0 @@ -/* inflate.c -- zlib decompression - * Copyright (C) 1995-2012 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * Change history: - * - * 1.2.beta0 24 Nov 2002 - * - First version -- complete rewrite of inflate to simplify code, avoid - * creation of window when not needed, minimize use of window when it is - * needed, make inffast.c even faster, implement gzip decoding, and to - * improve code readability and style over the previous zlib inflate code - * - * 1.2.beta1 25 Nov 2002 - * - Use pointers for available input and output checking in inffast.c - * - Remove input and output counters in inffast.c - * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 - * - Remove unnecessary second byte pull from length extra in inffast.c - * - Unroll direct copy to three copies per loop in inffast.c - * - * 1.2.beta2 4 Dec 2002 - * - Change external routine names to reduce potential conflicts - * - Correct filename to inffixed.h for fixed tables in inflate.c - * - Make hbuf[] unsigned char to match parameter type in inflate.c - * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) - * to avoid negation problem on Alphas (64 bit) in inflate.c - * - * 1.2.beta3 22 Dec 2002 - * - Add comments on state->bits assertion in inffast.c - * - Add comments on op field in inftrees.h - * - Fix bug in reuse of allocated window after inflateReset() - * - Remove bit fields--back to byte structure for speed - * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths - * - Change post-increments to pre-increments in inflate_fast(), PPC biased? - * - Add compile time option, POSTINC, to use post-increments instead (Intel?) - * - Make MATCH copy in inflate() much faster for when inflate_fast() not used - * - Use local copies of stream next and avail values, as well as local bit - * buffer and bit count in inflate()--for speed when inflate_fast() not used - * - * 1.2.beta4 1 Jan 2003 - * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings - * - Move a comment on output buffer sizes from inffast.c to inflate.c - * - Add comments in inffast.c to introduce the inflate_fast() routine - * - Rearrange window copies in inflate_fast() for speed and simplification - * - Unroll last copy for window match in inflate_fast() - * - Use local copies of window variables in inflate_fast() for speed - * - Pull out common wnext == 0 case for speed in inflate_fast() - * - Make op and len in inflate_fast() unsigned for consistency - * - Add FAR to lcode and dcode declarations in inflate_fast() - * - Simplified bad distance check in inflate_fast() - * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new - * source file infback.c to provide a call-back interface to inflate for - * programs like gzip and unzip -- uses window as output buffer to avoid - * window copying - * - * 1.2.beta5 1 Jan 2003 - * - Improved inflateBack() interface to allow the caller to provide initial - * input in strm. - * - Fixed stored blocks bug in inflateBack() - * - * 1.2.beta6 4 Jan 2003 - * - Added comments in inffast.c on effectiveness of POSTINC - * - Typecasting all around to reduce compiler warnings - * - Changed loops from while (1) or do {} while (1) to for (;;), again to - * make compilers happy - * - Changed type of window in inflateBackInit() to unsigned char * - * - * 1.2.beta7 27 Jan 2003 - * - Changed many types to unsigned or unsigned short to avoid warnings - * - Added inflateCopy() function - * - * 1.2.0 9 Mar 2003 - * - Changed inflateBack() interface to provide separate opaque descriptors - * for the in() and out() functions - * - Changed inflateBack() argument and in_func typedef to swap the length - * and buffer address return values for the input function - * - Check next_in and next_out for Z_NULL on entry to inflate() - * - * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. - */ - -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -#ifdef MAKEFIXED -# ifndef BUILDFIXED -# define BUILDFIXED -# endif -#endif - -/* function prototypes */ -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - unsigned copy)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); - -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - strm->total_in = strm->total_out = state->total = 0; - strm->msg = Z_NULL; - if (state->wrap) /* to support ill-conceived Java test suite */ - strm->adler = state->wrap & 1; - state->mode = HEAD; - state->last = 0; - state->havedict = 0; - state->dmax = 32768U; - state->head = Z_NULL; - state->hold = 0; - state->bits = 0; - state->lencode = state->distcode = state->next = state->codes; - state->sane = 1; - state->back = -1; - Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -int ZEXPORT inflateReset(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - state->wsize = 0; - state->whave = 0; - state->wnext = 0; - return inflateResetKeep(strm); -} - -int ZEXPORT inflateReset2(strm, windowBits) -z_streamp strm; -int windowBits; -{ - int wrap; - struct inflate_state FAR *state; - - /* get the state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; -#ifdef GUNZIP - if (windowBits < 48) - windowBits &= 15; -#endif - } - - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) - return Z_STREAM_ERROR; - if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { - ZFREE(strm, state->window); - state->window = Z_NULL; - } - - /* update state and reset the rest of it */ - state->wrap = wrap; - state->wbits = (unsigned)windowBits; - return inflateReset(strm); -} - -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; -{ - int ret; - struct inflate_state FAR *state; - - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || - stream_size != (int)(sizeof(z_stream))) - return Z_VERSION_ERROR; - if (strm == Z_NULL) return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == (free_func)0) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *) - ZALLOC(strm, 1, sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->window = Z_NULL; - ret = inflateReset2(strm, windowBits); - if (ret != Z_OK) { - ZFREE(strm, state); - strm->state = Z_NULL; - } - return ret; -} - -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; -{ - return inflateInit2_(strm, DEF_WBITS, version, stream_size); -} - -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (bits < 0) { - state->hold = 0; - state->bits = 0; - return Z_OK; - } - if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += bits; - return Z_OK; -} - -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ -#ifdef BUILDFIXED - static int virgin = 1; - static code *lenfix, *distfix; - static code fixed[544]; - - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; - static code *next; - - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; - inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); - - /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; - distfix = next; - bits = 5; - inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); - - /* do this just once */ - virgin = 0; - } -#else /* !BUILDFIXED */ -# include "inffixed.h" -#endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; -} - -#ifdef MAKEFIXED -#include - -/* - Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also - defines BUILDFIXED, so the tables are built on the fly. makefixed() writes - those tables to stdout, which would be piped to inffixed.h. A small program - can simply call makefixed to do this: - - void makefixed(void); - - int main(void) - { - makefixed(); - return 0; - } - - Then that can be linked with zlib built with MAKEFIXED defined and run: - - a.out > inffixed.h - */ -void makefixed() -{ - unsigned low, size; - struct inflate_state state; - - fixedtables(&state); - puts(" /* inffixed.h -- table for decoding fixed codes"); - puts(" * Generated automatically by makefixed()."); - puts(" */"); - puts(""); - puts(" /* WARNING: this file should *not* be used by applications."); - puts(" It is part of the implementation of this library and is"); - puts(" subject to change. Applications should only use zlib.h."); - puts(" */"); - puts(""); - size = 1U << 9; - printf(" static const code lenfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 7) == 0) printf("\n "); - printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op, - state.lencode[low].bits, state.lencode[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); - size = 1U << 5; - printf("\n static const code distfix[%u] = {", size); - low = 0; - for (;;) { - if ((low % 6) == 0) printf("\n "); - printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, - state.distcode[low].val); - if (++low == size) break; - putchar(','); - } - puts("\n };"); -} -#endif /* MAKEFIXED */ - -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -local int updatewindow(strm, end, copy) -z_streamp strm; -const Bytef *end; -unsigned copy; -{ - struct inflate_state FAR *state; - unsigned dist; - - state = (struct inflate_state FAR *)strm->state; - - /* if it hasn't been done already, allocate space for the window */ - if (state->window == Z_NULL) { - state->window = (unsigned char FAR *) - ZALLOC(strm, 1U << state->wbits, - sizeof(unsigned char)); - if (state->window == Z_NULL) return 1; - } - - /* if window not in use yet, initialize */ - if (state->wsize == 0) { - state->wsize = 1U << state->wbits; - state->wnext = 0; - state->whave = 0; - } - - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state->wsize) { - zmemcpy(state->window, end - state->wsize, state->wsize); - state->wnext = 0; - state->whave = state->wsize; - } - else { - dist = state->wsize - state->wnext; - if (dist > copy) dist = copy; - zmemcpy(state->window + state->wnext, end - copy, dist); - copy -= dist; - if (copy) { - zmemcpy(state->window, end - copy, copy); - state->wnext = copy; - state->whave = state->wsize; - } - else { - state->wnext += dist; - if (state->wnext == state->wsize) state->wnext = 0; - if (state->whave < state->wsize) state->whave += dist; - } - } - return 0; -} - -/* Macros for inflate(): */ - -/* check function to use adler32() for zlib or crc32() for gzip */ -#ifdef GUNZIP -# define UPDATE(check, buf, len) \ - (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) -#else -# define UPDATE(check, buf, len) adler32(check, buf, len) -#endif - -/* check macros for header crc */ -#ifdef GUNZIP -# define CRC2(check, word) \ - do { \ - hbuf[0] = (unsigned char)(word); \ - hbuf[1] = (unsigned char)((word) >> 8); \ - check = crc32(check, hbuf, 2); \ - } while (0) - -# define CRC4(check, word) \ - do { \ - hbuf[0] = (unsigned char)(word); \ - hbuf[1] = (unsigned char)((word) >> 8); \ - hbuf[2] = (unsigned char)((word) >> 16); \ - hbuf[3] = (unsigned char)((word) >> 24); \ - check = crc32(check, hbuf, 4); \ - } while (0) -#endif - -/* Load registers with state in inflate() for speed */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Restore state from registers in inflate() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflate() - if there is no input available. */ -#define PULLBYTE() \ - do { \ - if (have == 0) goto inf_leave; \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflate(). */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* - inflate() uses a state machine to process as much input data and generate as - much output data as possible before returning. The state machine is - structured roughly as follows: - - for (;;) switch (state) { - ... - case STATEn: - if (not enough input data or output space to make progress) - return; - ... make progress ... - state = STATEm; - break; - ... - } - - so when inflate() is called again, the same case is attempted again, and - if the appropriate resources are provided, the machine proceeds to the - next state. The NEEDBITS() macro is usually the way the state evaluates - whether it can proceed or should return. NEEDBITS() does the return if - the requested bits are not available. The typical use of the BITS macros - is: - - NEEDBITS(n); - ... do something with BITS(n) ... - DROPBITS(n); - - where NEEDBITS(n) either returns from inflate() if there isn't enough - input left to load n bits into the accumulator, or it continues. BITS(n) - gives the low n bits in the accumulator. When done, DROPBITS(n) drops - the low n bits off the accumulator. INITBITS() clears the accumulator - and sets the number of available bits to zero. BYTEBITS() discards just - enough bits to put the accumulator on a byte boundary. After BYTEBITS() - and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. - - NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return - if there is no input available. The decoding of variable length codes uses - PULLBYTE() directly in order to pull just enough bytes to decode the next - code, and no more. - - Some states loop until they get enough input, making sure that enough - state information is maintained to continue the loop where it left off - if NEEDBITS() returns in the loop. For example, want, need, and keep - would all have to actually be part of the saved state in case NEEDBITS() - returns: - - case STATEw: - while (want < need) { - NEEDBITS(n); - keep[want++] = BITS(n); - DROPBITS(n); - } - state = STATEx; - case STATEx: - - As shown above, if the next state is also the next case, then the break - is omitted. - - A state may also return if there is not enough output space available to - complete that state. Those states are copying stored data, writing a - literal byte, and copying a matching string. - - When returning, a "goto inf_leave" is used to update the total counters, - update the check value, and determine whether any progress has been made - during that inflate() call in order to return the proper return code. - Progress is defined as a change in either strm->avail_in or strm->avail_out. - When there is a window, goto inf_leave will update the window with the last - output written. If a goto inf_leave occurs in the middle of decompression - and there is no window currently, goto inf_leave will create one and copy - output to the window for the next call of inflate(). - - In this implementation, the flush parameter of inflate() only affects the - return code (per zlib.h). inflate() always writes as much as possible to - strm->next_out, given the space available and the provided input--the effect - documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers - the allocation of and copying into a sliding window until necessary, which - provides the effect documented in zlib.h for Z_FINISH when the entire input - stream available. So the only thing the flush parameter actually does is: - when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it - will return Z_BUF_ERROR if it has not reached the end of the stream. - */ - -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; -{ - struct inflate_state FAR *state; - z_const unsigned char FAR *next; /* next input */ - unsigned char FAR *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned in, out; /* save starting available input and output */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char FAR *from; /* where to copy match bytes from */ - code here; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ -#ifdef GUNZIP - unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ -#endif - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0)) - return Z_STREAM_ERROR; - - state = (struct inflate_state FAR *)strm->state; - if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ - LOAD(); - in = have; - out = left; - ret = Z_OK; - for (;;) - switch (state->mode) { - case HEAD: - if (state->wrap == 0) { - state->mode = TYPEDO; - break; - } - NEEDBITS(16); -#ifdef GUNZIP - if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ - state->check = crc32(0L, Z_NULL, 0); - CRC2(state->check, hold); - INITBITS(); - state->mode = FLAGS; - break; - } - state->flags = 0; /* expect zlib header */ - if (state->head != Z_NULL) - state->head->done = -1; - if (!(state->wrap & 1) || /* check if zlib header allowed */ -#else - if ( -#endif - ((BITS(8) << 8) + (hold >> 8)) % 31) { - strm->msg = (char *)"incorrect header check"; - state->mode = BAD; - break; - } - if (BITS(4) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - DROPBITS(4); - len = BITS(4) + 8; - if (state->wbits == 0) - state->wbits = len; - else if (len > state->wbits) { - strm->msg = (char *)"invalid window size"; - state->mode = BAD; - break; - } - state->dmax = 1U << len; - Tracev((stderr, "inflate: zlib header ok\n")); - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = hold & 0x200 ? DICTID : TYPE; - INITBITS(); - break; -#ifdef GUNZIP - case FLAGS: - NEEDBITS(16); - state->flags = (int)(hold); - if ((state->flags & 0xff) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - if (state->flags & 0xe000) { - strm->msg = (char *)"unknown header flags set"; - state->mode = BAD; - break; - } - if (state->head != Z_NULL) - state->head->text = (int)((hold >> 8) & 1); - if (state->flags & 0x0200) CRC2(state->check, hold); - INITBITS(); - state->mode = TIME; - case TIME: - NEEDBITS(32); - if (state->head != Z_NULL) - state->head->time = hold; - if (state->flags & 0x0200) CRC4(state->check, hold); - INITBITS(); - state->mode = OS; - case OS: - NEEDBITS(16); - if (state->head != Z_NULL) { - state->head->xflags = (int)(hold & 0xff); - state->head->os = (int)(hold >> 8); - } - if (state->flags & 0x0200) CRC2(state->check, hold); - INITBITS(); - state->mode = EXLEN; - case EXLEN: - if (state->flags & 0x0400) { - NEEDBITS(16); - state->length = (unsigned)(hold); - if (state->head != Z_NULL) - state->head->extra_len = (unsigned)hold; - if (state->flags & 0x0200) CRC2(state->check, hold); - INITBITS(); - } - else if (state->head != Z_NULL) - state->head->extra = Z_NULL; - state->mode = EXTRA; - case EXTRA: - if (state->flags & 0x0400) { - copy = state->length; - if (copy > have) copy = have; - if (copy) { - if (state->head != Z_NULL && - state->head->extra != Z_NULL) { - len = state->head->extra_len - state->length; - zmemcpy(state->head->extra + len, next, - len + copy > state->head->extra_max ? - state->head->extra_max - len : copy); - } - if (state->flags & 0x0200) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - state->length -= copy; - } - if (state->length) goto inf_leave; - } - state->length = 0; - state->mode = NAME; - case NAME: - if (state->flags & 0x0800) { - if (have == 0) goto inf_leave; - copy = 0; - do { - len = (unsigned)(next[copy++]); - if (state->head != Z_NULL && - state->head->name != Z_NULL && - state->length < state->head->name_max) - state->head->name[state->length++] = len; - } while (len && copy < have); - if (state->flags & 0x0200) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - if (len) goto inf_leave; - } - else if (state->head != Z_NULL) - state->head->name = Z_NULL; - state->length = 0; - state->mode = COMMENT; - case COMMENT: - if (state->flags & 0x1000) { - if (have == 0) goto inf_leave; - copy = 0; - do { - len = (unsigned)(next[copy++]); - if (state->head != Z_NULL && - state->head->comment != Z_NULL && - state->length < state->head->comm_max) - state->head->comment[state->length++] = len; - } while (len && copy < have); - if (state->flags & 0x0200) - state->check = crc32(state->check, next, copy); - have -= copy; - next += copy; - if (len) goto inf_leave; - } - else if (state->head != Z_NULL) - state->head->comment = Z_NULL; - state->mode = HCRC; - case HCRC: - if (state->flags & 0x0200) { - NEEDBITS(16); - if (hold != (state->check & 0xffff)) { - strm->msg = (char *)"header crc mismatch"; - state->mode = BAD; - break; - } - INITBITS(); - } - if (state->head != Z_NULL) { - state->head->hcrc = (int)((state->flags >> 9) & 1); - state->head->done = 1; - } - strm->adler = state->check = crc32(0L, Z_NULL, 0); - state->mode = TYPE; - break; -#endif - case DICTID: - NEEDBITS(32); - strm->adler = state->check = ZSWAP32(hold); - INITBITS(); - state->mode = DICT; - case DICT: - if (state->havedict == 0) { - RESTORE(); - return Z_NEED_DICT; - } - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = TYPE; - case TYPE: - if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; - case TYPEDO: - if (state->last) { - BYTEBITS(); - state->mode = CHECK; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); - state->mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); - state->mode = LEN_; /* decode codes */ - if (flush == Z_TREES) { - DROPBITS(2); - goto inf_leave; - } - break; - case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - case STORED: - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); - INITBITS(); - state->mode = COPY_; - if (flush == Z_TREES) goto inf_leave; - case COPY_: - state->mode = COPY; - case COPY: - copy = state->length; - if (copy) { - if (copy > have) copy = have; - if (copy > left) copy = left; - if (copy == 0) goto inf_leave; - zmemcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - break; - } - Tracev((stderr, "inflate: stored end\n")); - state->mode = TYPE; - break; - case TABLE: - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - Tracev((stderr, "inflate: table sizes ok\n")); - state->have = 0; - state->mode = LENLENS; - case LENLENS: - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (const code FAR *)(state->next); - state->lenbits = 7; - ret = inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: code lengths ok\n")); - state->have = 0; - state->mode = CODELENS; - case CODELENS: - while (state->have < state->nlen + state->ndist) { - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.val < 16) { - DROPBITS(here.bits); - state->lens[state->have++] = here.val; - } - else { - if (here.val == 16) { - NEEDBITS(here.bits + 2); - DROPBITS(here.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = state->lens[state->have - 1]; - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (here.val == 17) { - NEEDBITS(here.bits + 3); - DROPBITS(here.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(here.bits + 7); - DROPBITS(here.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* check for end-of-block code (better have one) */ - if (state->lens[256] == 0) { - strm->msg = (char *)"invalid code -- missing end-of-block"; - state->mode = BAD; - break; - } - - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state->next = state->codes; - state->lencode = (const code FAR *)(state->next); - state->lenbits = 9; - ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (const code FAR *)(state->next); - state->distbits = 6; - ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN_; - if (flush == Z_TREES) goto inf_leave; - case LEN_: - state->mode = LEN; - case LEN: - if (have >= 6 && left >= 258) { - RESTORE(); - inflate_fast(strm, out); - LOAD(); - if (state->mode == TYPE) - state->back = -1; - break; - } - state->back = 0; - for (;;) { - here = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if (here.op && (here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - state->back += last.bits; - } - DROPBITS(here.bits); - state->back += here.bits; - state->length = (unsigned)here.val; - if ((int)(here.op) == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - state->mode = LIT; - break; - } - if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); - state->back = -1; - state->mode = TYPE; - break; - } - if (here.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - state->extra = (unsigned)(here.op) & 15; - state->mode = LENEXT; - case LENEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - state->back += state->extra; - } - Tracevv((stderr, "inflate: length %u\n", state->length)); - state->was = state->length; - state->mode = DIST; - case DIST: - for (;;) { - here = state->distcode[BITS(state->distbits)]; - if ((unsigned)(here.bits) <= bits) break; - PULLBYTE(); - } - if ((here.op & 0xf0) == 0) { - last = here; - for (;;) { - here = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + here.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - state->back += last.bits; - } - DROPBITS(here.bits); - state->back += here.bits; - if (here.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)here.val; - state->extra = (unsigned)(here.op) & 15; - state->mode = DISTEXT; - case DISTEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - state->back += state->extra; - } -#ifdef INFLATE_STRICT - if (state->offset > state->dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - state->mode = MATCH; - case MATCH: - if (left == 0) goto inf_leave; - copy = out - left; - if (state->offset > copy) { /* copy from window */ - copy = state->offset - copy; - if (copy > state->whave) { - if (state->sane) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - Trace((stderr, "inflate.c too far\n")); - copy -= state->whave; - if (copy > state->length) copy = state->length; - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = 0; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; -#endif - } - if (copy > state->wnext) { - copy -= state->wnext; - from = state->window + (state->wsize - copy); - } - else - from = state->window + (state->wnext - copy); - if (copy > state->length) copy = state->length; - } - else { /* copy from output */ - from = put - state->offset; - copy = state->length; - } - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = *from++; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; - case LIT: - if (left == 0) goto inf_leave; - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - case CHECK: - if (state->wrap) { - NEEDBITS(32); - out -= left; - strm->total_out += out; - state->total += out; - if (out) - strm->adler = state->check = - UPDATE(state->check, put - out, out); - out = left; - if (( -#ifdef GUNZIP - state->flags ? hold : -#endif - ZSWAP32(hold)) != state->check) { - strm->msg = (char *)"incorrect data check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: check matches trailer\n")); - } -#ifdef GUNZIP - state->mode = LENGTH; - case LENGTH: - if (state->wrap && state->flags) { - NEEDBITS(32); - if (hold != (state->total & 0xffffffffUL)) { - strm->msg = (char *)"incorrect length check"; - state->mode = BAD; - break; - } - INITBITS(); - Tracev((stderr, "inflate: length matches trailer\n")); - } -#endif - state->mode = DONE; - case DONE: - ret = Z_STREAM_END; - goto inf_leave; - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - default: - return Z_STREAM_ERROR; - } - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - inf_leave: - RESTORE(); - if (state->wsize || (out != strm->avail_out && state->mode < BAD && - (state->mode < CHECK || flush != Z_FINISH))) - if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { - state->mode = MEM; - return Z_MEM_ERROR; - } - in -= strm->avail_in; - out -= strm->avail_out; - strm->total_in += in; - strm->total_out += out; - state->total += out; - if (state->wrap && out) - strm->adler = state->check = - UPDATE(state->check, strm->next_out - out, out); - strm->data_type = state->bits + (state->last ? 64 : 0) + - (state->mode == TYPE ? 128 : 0) + - (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); - if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) - ret = Z_BUF_ERROR; - return ret; -} - -int ZEXPORT inflateEnd(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (state->window != Z_NULL) ZFREE(strm, state->window); - ZFREE(strm, strm->state); - strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} - -int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -z_streamp strm; -Bytef *dictionary; -uInt *dictLength; -{ - struct inflate_state FAR *state; - - /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - - /* copy dictionary */ - if (state->whave && dictionary != Z_NULL) { - zmemcpy(dictionary, state->window + state->wnext, - state->whave - state->wnext); - zmemcpy(dictionary + state->whave - state->wnext, - state->window, state->wnext); - } - if (dictLength != Z_NULL) - *dictLength = state->whave; - return Z_OK; -} - -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; -{ - struct inflate_state FAR *state; - unsigned long dictid; - int ret; - - /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (state->wrap != 0 && state->mode != DICT) - return Z_STREAM_ERROR; - - /* check for correct dictionary identifier */ - if (state->mode == DICT) { - dictid = adler32(0L, Z_NULL, 0); - dictid = adler32(dictid, dictionary, dictLength); - if (dictid != state->check) - return Z_DATA_ERROR; - } - - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary + dictLength, dictLength); - if (ret) { - state->mode = MEM; - return Z_MEM_ERROR; - } - state->havedict = 1; - Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} - -int ZEXPORT inflateGetHeader(strm, head) -z_streamp strm; -gz_headerp head; -{ - struct inflate_state FAR *state; - - /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; - - /* save header structure */ - state->head = head; - head->done = 0; - return Z_OK; -} - -/* - Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found - or when out of input. When called, *have is the number of pattern bytes - found in order so far, in 0..3. On return *have is updated to the new - state. If on return *have equals four, then the pattern was found and the - return value is how many bytes were read including the last byte of the - pattern. If *have is less than four, then the pattern has not been found - yet and the return value is len. In the latter case, syncsearch() can be - called again with more data and the *have state. *have is initialized to - zero for the first call. - */ -local unsigned syncsearch(have, buf, len) -unsigned FAR *have; -const unsigned char FAR *buf; -unsigned len; -{ - unsigned got; - unsigned next; - - got = *have; - next = 0; - while (next < len && got < 4) { - if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) - got++; - else if (buf[next]) - got = 0; - else - got = 4 - got; - next++; - } - *have = got; - return next; -} - -int ZEXPORT inflateSync(strm) -z_streamp strm; -{ - unsigned len; /* number of bytes to look at or looked at */ - unsigned long in, out; /* temporary to save total_in and total_out */ - unsigned char buf[4]; /* to restore bit buffer to byte string */ - struct inflate_state FAR *state; - - /* check parameters */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; - - /* if first time, start search in bit buffer */ - if (state->mode != SYNC) { - state->mode = SYNC; - state->hold <<= state->bits & 7; - state->bits -= state->bits & 7; - len = 0; - while (state->bits >= 8) { - buf[len++] = (unsigned char)(state->hold); - state->hold >>= 8; - state->bits -= 8; - } - state->have = 0; - syncsearch(&(state->have), buf, len); - } - - /* search available input */ - len = syncsearch(&(state->have), strm->next_in, strm->avail_in); - strm->avail_in -= len; - strm->next_in += len; - strm->total_in += len; - - /* return no joy or set up to restart inflate() on a new block */ - if (state->have != 4) return Z_DATA_ERROR; - in = strm->total_in; out = strm->total_out; - inflateReset(strm); - strm->total_in = in; strm->total_out = out; - state->mode = TYPE; - return Z_OK; -} - -/* - Returns true if inflate is currently at the end of a block generated by - Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - implementation to provide an additional safety check. PPP uses - Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored - block. When decompressing, PPP checks that at the end of input packet, - inflate is waiting for these length bytes. - */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - return state->mode == STORED && state->bits == 0; -} - -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; -{ - struct inflate_state FAR *state; - struct inflate_state FAR *copy; - unsigned char FAR *window; - unsigned wsize; - - /* check input */ - if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL || - source->zalloc == (alloc_func)0 || source->zfree == (free_func)0) - return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)source->state; - - /* allocate space */ - copy = (struct inflate_state FAR *) - ZALLOC(source, 1, sizeof(struct inflate_state)); - if (copy == Z_NULL) return Z_MEM_ERROR; - window = Z_NULL; - if (state->window != Z_NULL) { - window = (unsigned char FAR *) - ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); - if (window == Z_NULL) { - ZFREE(source, copy); - return Z_MEM_ERROR; - } - } - - /* copy state */ - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); - if (state->lencode >= state->codes && - state->lencode <= state->codes + ENOUGH - 1) { - copy->lencode = copy->codes + (state->lencode - state->codes); - copy->distcode = copy->codes + (state->distcode - state->codes); - } - copy->next = copy->codes + (state->next - state->codes); - if (window != Z_NULL) { - wsize = 1U << state->wbits; - zmemcpy(window, state->window, wsize); - } - copy->window = window; - dest->state = (struct internal_state FAR *)copy; - return Z_OK; -} - -int ZEXPORT inflateUndermine(strm, subvert) -z_streamp strm; -int subvert; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - state->sane = !subvert; -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - return Z_OK; -#else - state->sane = 1; - return Z_DATA_ERROR; -#endif -} - -long ZEXPORT inflateMark(strm) -z_streamp strm; -{ - struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; - state = (struct inflate_state FAR *)strm->state; - return ((long)(state->back) << 16) + - (state->mode == COPY ? state->length : - (state->mode == MATCH ? state->was - state->length : 0)); -} diff --git a/build/premake/premake5/contrib/zlib/inflate.h b/build/premake/premake5/contrib/zlib/inflate.h deleted file mode 100644 index 95f4986d40..0000000000 --- a/build/premake/premake5/contrib/zlib/inflate.h +++ /dev/null @@ -1,122 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2009 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer decoding by inflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip decoding - should be left enabled. */ -#ifndef NO_GZIP -# define GUNZIP -#endif - -/* Possible inflate modes between inflate() calls */ -typedef enum { - HEAD, /* i: waiting for magic header */ - FLAGS, /* i: waiting for method and flags (gzip) */ - TIME, /* i: waiting for modification time (gzip) */ - OS, /* i: waiting for extra flags and operating system (gzip) */ - EXLEN, /* i: waiting for extra length (gzip) */ - EXTRA, /* i: waiting for extra bytes (gzip) */ - NAME, /* i: waiting for end of file name (gzip) */ - COMMENT, /* i: waiting for end of comment (gzip) */ - HCRC, /* i: waiting for header crc (gzip) */ - DICTID, /* i: waiting for dictionary check value */ - DICT, /* waiting for inflateSetDictionary() call */ - TYPE, /* i: waiting for type bits, including last-flag bit */ - TYPEDO, /* i: same, but skip check to exit inflate on new block */ - STORED, /* i: waiting for stored size (length and complement) */ - COPY_, /* i/o: same as COPY below, but only first time in */ - COPY, /* i/o: waiting for input or output to copy stored block */ - TABLE, /* i: waiting for dynamic block table lengths */ - LENLENS, /* i: waiting for code length code lengths */ - CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN_, /* i: same as LEN below, but only first time in */ - LEN, /* i: waiting for length/lit/eob code */ - LENEXT, /* i: waiting for length extra bits */ - DIST, /* i: waiting for distance code */ - DISTEXT, /* i: waiting for distance extra bits */ - MATCH, /* o: waiting for output space to copy string */ - LIT, /* o: waiting for output space to write literal */ - CHECK, /* i: waiting for 32-bit check value */ - LENGTH, /* i: waiting for 32-bit length (gzip) */ - DONE, /* finished check, done -- remain here until reset */ - BAD, /* got a data error -- remain here until reset */ - MEM, /* got an inflate() memory error -- remain here until reset */ - SYNC /* looking for synchronization bytes to restart inflate() */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to BAD or MEM on error -- not shown for clarity) - - Process header: - HEAD -> (gzip) or (zlib) or (raw) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> - HCRC -> TYPE - (zlib) -> DICTID or TYPE - DICTID -> DICT -> TYPE - (raw) -> TYPEDO - Read deflate blocks: - TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK - STORED -> COPY_ -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN_ - LEN_ -> LEN - Read deflate codes in fixed or dynamic block: - LEN -> LENEXT or LIT or TYPE - LENEXT -> DIST -> DISTEXT -> MATCH -> LEN - LIT -> LEN - Process trailer: - CHECK -> LENGTH -> DONE - */ - -/* state maintained between inflate() calls. Approximately 10K bytes. */ -struct inflate_state { - inflate_mode mode; /* current inflate mode */ - int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - int havedict; /* true if dictionary provided */ - int flags; /* gzip header method and flags (0 if zlib) */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ - unsigned long check; /* protected copy of check value */ - unsigned long total; /* protected copy of output count */ - gz_headerp head; /* where to save gzip header information */ - /* sliding window */ - unsigned wbits; /* log base 2 of requested window size */ - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - /* bit accumulator */ - unsigned long hold; /* input bit accumulator */ - unsigned bits; /* number of bits in "in" */ - /* for string and stored block copying */ - unsigned length; /* literal or length of data to copy */ - unsigned offset; /* distance back to copy string from */ - /* for table and code decoding */ - unsigned extra; /* extra bits needed */ - /* fixed and dynamic code tables */ - code const FAR *lencode; /* starting table for length/literal codes */ - code const FAR *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code FAR *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ - int sane; /* if false, allow invalid distance too far */ - int back; /* bits back of last unprocessed length/lit */ - unsigned was; /* initial length of match */ -}; diff --git a/build/premake/premake5/contrib/zlib/inftrees.c b/build/premake/premake5/contrib/zlib/inftrees.c deleted file mode 100644 index 44d89cf24e..0000000000 --- a/build/premake/premake5/contrib/zlib/inftrees.c +++ /dev/null @@ -1,306 +0,0 @@ -/* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "zutil.h" -#include "inftrees.h" - -#define MAXBITS 15 - -const char inflate_copyright[] = - " inflate 1.2.8 Copyright 1995-2013 Mark Adler "; -/* - If you use the zlib library in a product, an acknowledgment is welcome - in the documentation of your product. If for some reason you cannot - include such an acknowledgment, I would appreciate that you keep this - copyright string in the executable of your product. - */ - -/* - Build a set of tables to decode the provided canonical Huffman code. - The code lengths are lens[0..codes-1]. The result starts at *table, - whose indices are 0..2^bits-1. work is a writable array of at least - lens shorts, which is used as a work area. type is the type of code - to be generated, CODES, LENS, or DISTS. On return, zero is success, - -1 is an invalid code, and +1 means that ENOUGH isn't enough. table - on return points to the next available entry's address. bits is the - requested root table index bits, and on return it is the actual root - table index bits. It will differ if the request is greater than the - longest code or if it is less than the shortest code. - */ -int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) -codetype type; -unsigned short FAR *lens; -unsigned codes; -code FAR * FAR *table; -unsigned FAR *bits; -unsigned short FAR *work; -{ - unsigned len; /* a code's length in bits */ - unsigned sym; /* index of code symbols */ - unsigned min, max; /* minimum and maximum code lengths */ - unsigned root; /* number of index bits for root table */ - unsigned curr; /* number of index bits for current table */ - unsigned drop; /* code bits to drop for sub-table */ - int left; /* number of prefix codes available */ - unsigned used; /* code entries in table used */ - unsigned huff; /* Huffman code */ - unsigned incr; /* for incrementing code, index */ - unsigned fill; /* index for replicating entries */ - unsigned low; /* low bits for current root entry */ - unsigned mask; /* mask for low root bits */ - code here; /* table entry for duplication */ - code FAR *next; /* next available space in table */ - const unsigned short FAR *base; /* base value table to use */ - const unsigned short FAR *extra; /* extra bits table to use */ - int end; /* use base and extra for symbol > end */ - unsigned short count[MAXBITS+1]; /* number of codes of each length */ - unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ - static const unsigned short lbase[31] = { /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78}; - static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0}; - static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64}; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) - count[len] = 0; - for (sym = 0; sym < codes; sym++) - count[lens[sym]]++; - - /* bound code lengths, force root to be within code lengths */ - root = *bits; - for (max = MAXBITS; max >= 1; max--) - if (count[max] != 0) break; - if (root > max) root = max; - if (max == 0) { /* no symbols to code at all */ - here.op = (unsigned char)64; /* invalid code marker */ - here.bits = (unsigned char)1; - here.val = (unsigned short)0; - *(*table)++ = here; /* make a table to force an error */ - *(*table)++ = here; - *bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) - if (count[min] != 0) break; - if (root < min) root = min; - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) return -1; /* over-subscribed */ - } - if (left > 0 && (type == CODES || max != 1)) - return -1; /* incomplete set */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + count[len]; - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) - if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - switch (type) { - case CODES: - base = extra = work; /* dummy value--not used */ - end = 19; - break; - case LENS: - base = lbase; - base -= 257; - extra = lext; - extra -= 257; - end = 256; - break; - default: /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - - /* initialize state for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = *table; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = (unsigned)(-1); /* trigger new sub-table when len > root */ - used = 1U << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type == LENS && used > ENOUGH_LENS) || - (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here.bits = (unsigned char)(len - drop); - if ((int)(work[sym]) < end) { - here.op = (unsigned char)0; - here.val = work[sym]; - } - else if ((int)(work[sym]) > end) { - here.op = (unsigned char)(extra[work[sym]]); - here.val = base[work[sym]]; - } - else { - here.op = (unsigned char)(32 + 64); /* end of block */ - here.val = 0; - } - - /* replicate for those indices with low len bits equal to huff */ - incr = 1U << (len - drop); - fill = 1U << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - next[(huff >> drop) + fill] = here; - } while (fill != 0); - - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; - - /* go to next symbol, update count, len */ - sym++; - if (--(count[len]) == 0) { - if (len == max) break; - len = lens[work[sym]]; - } - - /* create new sub-table if needed */ - if (len > root && (huff & mask) != low) { - /* if first time, transition to sub-tables */ - if (drop == 0) - drop = root; - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = (int)(1 << curr); - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) break; - curr++; - left <<= 1; - } - - /* check for enough space */ - used += 1U << curr; - if ((type == LENS && used > ENOUGH_LENS) || - (type == DISTS && used > ENOUGH_DISTS)) - return 1; - - /* point entry in root table to sub-table */ - low = huff & mask; - (*table)[low].op = (unsigned char)curr; - (*table)[low].bits = (unsigned char)root; - (*table)[low].val = (unsigned short)(next - *table); - } - } - - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff != 0) { - here.op = (unsigned char)64; /* invalid code marker */ - here.bits = (unsigned char)(len - drop); - here.val = (unsigned short)0; - next[huff] = here; - } - - /* set return parameters */ - *table += used; - *bits = root; - return 0; -} diff --git a/build/premake/premake5/contrib/zlib/inftrees.h b/build/premake/premake5/contrib/zlib/inftrees.h deleted file mode 100644 index baa53a0b1a..0000000000 --- a/build/premake/premake5/contrib/zlib/inftrees.h +++ /dev/null @@ -1,62 +0,0 @@ -/* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 0001eeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ - -/* Maximum size of the dynamic table. The maximum number of code structures is - 1444, which is the sum of 852 for literal/length codes and 592 for distance - codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribtution. The arguments to that - program are the number of symbols, the initial root table size, and the - maximum bit length of a code. "enough 286 9 15" for literal/length codes - returns returns 852, and "enough 30 6 15" for distance codes returns 592. - The initial root table size (9 or 6) is found in the fifth argument of the - inflate_table() calls in inflate.c and infback.c. If the root table size is - changed, then these maximum sizes would be need to be recalculated and - updated. */ -#define ENOUGH_LENS 852 -#define ENOUGH_DISTS 592 -#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) - -/* Type of code to build for inflate_table() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); diff --git a/build/premake/premake5/contrib/zlib/premake5.lua b/build/premake/premake5/contrib/zlib/premake5.lua deleted file mode 100644 index e1bb429b77..0000000000 --- a/build/premake/premake5/contrib/zlib/premake5.lua +++ /dev/null @@ -1,17 +0,0 @@ -project "zlib-lib" - language "C" - kind "StaticLib" - defines { "N_FSEEKO" } - warnings "off" - - files - { - "**.h", - "**.c" - } - - filter "system:windows" - defines { "_WINDOWS" } - - filter "system:not windows" - defines { 'HAVE_UNISTD_H' } diff --git a/build/premake/premake5/contrib/zlib/trees.c b/build/premake/premake5/contrib/zlib/trees.c deleted file mode 100644 index 1fd7759ef0..0000000000 --- a/build/premake/premake5/contrib/zlib/trees.c +++ /dev/null @@ -1,1226 +0,0 @@ -/* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2012 Jean-loup Gailly - * detect_data_type() function provided freely by Cosmin Truta, 2006 - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* - * ALGORITHM - * - * The "deflation" process uses several Huffman trees. The more - * common source values are represented by shorter bit sequences. - * - * Each code tree is stored in a compressed form which is itself - * a Huffman encoding of the lengths of all the code strings (in - * ascending order by source values). The actual code strings are - * reconstructed from the lengths in the inflate process, as described - * in the deflate specification. - * - * REFERENCES - * - * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". - * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc - * - * Storer, James A. - * Data Compression: Methods and Theory, pp. 49-50. - * Computer Science Press, 1988. ISBN 0-7167-8156-5. - * - * Sedgewick, R. - * Algorithms, p290. - * Addison-Wesley, 1983. ISBN 0-201-06672-6. - */ - -/* @(#) $Id$ */ - -/* #define GEN_TREES_H */ - -#include "deflate.h" - -#ifdef DEBUG -# include -#endif - -/* =========================================================================== - * Constants - */ - -#define MAX_BL_BITS 7 -/* Bit length codes must not exceed MAX_BL_BITS bits */ - -#define END_BLOCK 256 -/* end of block literal code */ - -#define REP_3_6 16 -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ - -#define REPZ_3_10 17 -/* repeat a zero length 3-10 times (3 bits of repeat count) */ - -#define REPZ_11_138 18 -/* repeat a zero length 11-138 times (7 bits of repeat count) */ - -local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ - = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; - -local const int extra_dbits[D_CODES] /* extra bits for each distance code */ - = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ - = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; - -local const uch bl_order[BL_CODES] - = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ - -/* =========================================================================== - * Local data. These are initialized only once. - */ - -#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ - -#if defined(GEN_TREES_H) || !defined(STDC) -/* non ANSI compilers may not accept trees.h */ - -local ct_data static_ltree[L_CODES+2]; -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -local ct_data static_dtree[D_CODES]; -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -uch _dist_code[DIST_CODE_LEN]; -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -uch _length_code[MAX_MATCH-MIN_MATCH+1]; -/* length code for each normalized match length (0 == MIN_MATCH) */ - -local int base_length[LENGTH_CODES]; -/* First normalized length for each code (0 = MIN_MATCH) */ - -local int base_dist[D_CODES]; -/* First normalized distance for each code (0 = distance of 1) */ - -#else -# include "trees.h" -#endif /* GEN_TREES_H */ - -struct static_tree_desc_s { - const ct_data *static_tree; /* static tree or NULL */ - const intf *extra_bits; /* extra bits for each code or NULL */ - int extra_base; /* base index for extra_bits */ - int elems; /* max number of elements in the tree */ - int max_length; /* max bit length for the codes */ -}; - -local static_tree_desc static_l_desc = -{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; - -local static_tree_desc static_d_desc = -{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; - -local static_tree_desc static_bl_desc = -{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; - -/* =========================================================================== - * Local (static) routines in this file. - */ - -local void tr_static_init OF((void)); -local void init_block OF((deflate_state *s)); -local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); -local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); -local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); -local void build_tree OF((deflate_state *s, tree_desc *desc)); -local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); -local int build_bl_tree OF((deflate_state *s)); -local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, - int blcodes)); -local void compress_block OF((deflate_state *s, const ct_data *ltree, - const ct_data *dtree)); -local int detect_data_type OF((deflate_state *s)); -local unsigned bi_reverse OF((unsigned value, int length)); -local void bi_windup OF((deflate_state *s)); -local void bi_flush OF((deflate_state *s)); -local void copy_block OF((deflate_state *s, charf *buf, unsigned len, - int header)); - -#ifdef GEN_TREES_H -local void gen_trees_header OF((void)); -#endif - -#ifndef DEBUG -# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) - /* Send a code of the given tree. c and tree must not have side effects */ - -#else /* DEBUG */ -# define send_code(s, c, tree) \ - { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ - send_bits(s, tree[c].Code, tree[c].Len); } -#endif - -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -#define put_short(s, w) { \ - put_byte(s, (uch)((w) & 0xff)); \ - put_byte(s, (uch)((ush)(w) >> 8)); \ -} - -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -#ifdef DEBUG -local void send_bits OF((deflate_state *s, int value, int length)); - -local void send_bits(s, value, length) - deflate_state *s; - int value; /* value to send */ - int length; /* number of bits */ -{ - Tracevv((stderr," l %2d v %4x ", length, value)); - Assert(length > 0 && length <= 15, "invalid length"); - s->bits_sent += (ulg)length; - - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (ush)value << s->bi_valid; - put_short(s, s->bi_buf); - s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); - s->bi_valid += length - Buf_size; - } else { - s->bi_buf |= (ush)value << s->bi_valid; - s->bi_valid += length; - } -} -#else /* !DEBUG */ - -#define send_bits(s, value, length) \ -{ int len = length;\ - if (s->bi_valid > (int)Buf_size - len) {\ - int val = value;\ - s->bi_buf |= (ush)val << s->bi_valid;\ - put_short(s, s->bi_buf);\ - s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ - s->bi_valid += len - Buf_size;\ - } else {\ - s->bi_buf |= (ush)(value) << s->bi_valid;\ - s->bi_valid += len;\ - }\ -} -#endif /* DEBUG */ - - -/* the arguments must not have side effects */ - -/* =========================================================================== - * Initialize the various 'constant' tables. - */ -local void tr_static_init() -{ -#if defined(GEN_TREES_H) || !defined(STDC) - static int static_init_done = 0; - int n; /* iterates over tree elements */ - int bits; /* bit counter */ - int length; /* length value */ - int code; /* code value */ - int dist; /* distance index */ - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - if (static_init_done) return; - - /* For some embedded targets, global variables are not initialized: */ -#ifdef NO_INIT_GLOBAL_POINTERS - static_l_desc.static_tree = static_ltree; - static_l_desc.extra_bits = extra_lbits; - static_d_desc.static_tree = static_dtree; - static_d_desc.extra_bits = extra_dbits; - static_bl_desc.extra_bits = extra_blbits; -#endif - - /* Initialize the mapping length (0..255) -> length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES-1; code++) { - base_length[code] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (code = 0 ; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for ( ; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { - _dist_code[256 + dist++] = (uch)code; - } - } - Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; - n = 0; - while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; - while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; - while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; - while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n].Len = 5; - static_dtree[n].Code = bi_reverse((unsigned)n, 5); - } - static_init_done = 1; - -# ifdef GEN_TREES_H - gen_trees_header(); -# endif -#endif /* defined(GEN_TREES_H) || !defined(STDC) */ -} - -/* =========================================================================== - * Genererate the file trees.h describing the static trees. - */ -#ifdef GEN_TREES_H -# ifndef DEBUG -# include -# endif - -# define SEPARATOR(i, last, width) \ - ((i) == (last)? "\n};\n\n" : \ - ((i) % (width) == (width)-1 ? ",\n" : ", ")) - -void gen_trees_header() -{ - FILE *header = fopen("trees.h", "w"); - int i; - - Assert (header != NULL, "Can't open trees.h"); - fprintf(header, - "/* header created automatically with -DGEN_TREES_H */\n\n"); - - fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); - for (i = 0; i < L_CODES+2; i++) { - fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, - static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); - } - - fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, - static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); - } - - fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); - for (i = 0; i < DIST_CODE_LEN; i++) { - fprintf(header, "%2u%s", _dist_code[i], - SEPARATOR(i, DIST_CODE_LEN-1, 20)); - } - - fprintf(header, - "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); - for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { - fprintf(header, "%2u%s", _length_code[i], - SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); - } - - fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); - for (i = 0; i < LENGTH_CODES; i++) { - fprintf(header, "%1u%s", base_length[i], - SEPARATOR(i, LENGTH_CODES-1, 20)); - } - - fprintf(header, "local const int base_dist[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "%5u%s", base_dist[i], - SEPARATOR(i, D_CODES-1, 10)); - } - - fclose(header); -} -#endif /* GEN_TREES_H */ - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -void ZLIB_INTERNAL _tr_init(s) - deflate_state *s; -{ - tr_static_init(); - - s->l_desc.dyn_tree = s->dyn_ltree; - s->l_desc.stat_desc = &static_l_desc; - - s->d_desc.dyn_tree = s->dyn_dtree; - s->d_desc.stat_desc = &static_d_desc; - - s->bl_desc.dyn_tree = s->bl_tree; - s->bl_desc.stat_desc = &static_bl_desc; - - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef DEBUG - s->compressed_len = 0L; - s->bits_sent = 0L; -#endif - - /* Initialize the first block of the first file: */ - init_block(s); -} - -/* =========================================================================== - * Initialize a new block. - */ -local void init_block(s) - deflate_state *s; -{ - int n; /* iterates over tree elements */ - - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; - for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; - for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; - - s->dyn_ltree[END_BLOCK].Freq = 1; - s->opt_len = s->static_len = 0L; - s->last_lit = s->matches = 0; -} - -#define SMALLEST 1 -/* Index within the heap array of least frequent node in the Huffman tree */ - - -/* =========================================================================== - * Remove the smallest element from the heap and recreate the heap with - * one less element. Updates heap and heap_len. - */ -#define pqremove(s, tree, top) \ -{\ - top = s->heap[SMALLEST]; \ - s->heap[SMALLEST] = s->heap[s->heap_len--]; \ - pqdownheap(s, tree, SMALLEST); \ -} - -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -#define smaller(tree, n, m, depth) \ - (tree[n].Freq < tree[m].Freq || \ - (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) - -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -local void pqdownheap(s, tree, k) - deflate_state *s; - ct_data *tree; /* the tree to restore */ - int k; /* node to move down */ -{ - int v = s->heap[k]; - int j = k << 1; /* left son of k */ - while (j <= s->heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s->heap_len && - smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s->heap[j], s->depth)) break; - - /* Exchange v with the smallest son */ - s->heap[k] = s->heap[j]; k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s->heap[k] = v; -} - -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ -local void gen_bitlen(s, desc) - deflate_state *s; - tree_desc *desc; /* the tree descriptor */ -{ - ct_data *tree = desc->dyn_tree; - int max_code = desc->max_code; - const ct_data *stree = desc->stat_desc->static_tree; - const intf *extra = desc->stat_desc->extra_bits; - int base = desc->stat_desc->extra_base; - int max_length = desc->stat_desc->max_length; - int h; /* heap index */ - int n, m; /* iterate over the tree elements */ - int bits; /* bit length */ - int xbits; /* extra bits */ - ush f; /* frequency */ - int overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ - - for (h = s->heap_max+1; h < HEAP_SIZE; h++) { - n = s->heap[h]; - bits = tree[tree[n].Dad].Len + 1; - if (bits > max_length) bits = max_length, overflow++; - tree[n].Len = (ush)bits; - /* We overwrite tree[n].Dad which is no longer needed */ - - if (n > max_code) continue; /* not a leaf node */ - - s->bl_count[bits]++; - xbits = 0; - if (n >= base) xbits = extra[n-base]; - f = tree[n].Freq; - s->opt_len += (ulg)f * (bits + xbits); - if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); - } - if (overflow == 0) return; - - Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length-1; - while (s->bl_count[bits] == 0) bits--; - s->bl_count[bits]--; /* move one leaf down the tree */ - s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ - s->bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = s->bl_count[bits]; - while (n != 0) { - m = s->heap[--h]; - if (m > max_code) continue; - if ((unsigned) tree[m].Len != (unsigned) bits) { - Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s->opt_len += ((long)bits - (long)tree[m].Len) - *(long)tree[m].Freq; - tree[m].Len = (ush)bits; - } - n--; - } - } -} - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ -local void gen_codes (tree, max_code, bl_count) - ct_data *tree; /* the tree to decorate */ - int max_code; /* largest code with non zero frequency */ - ushf *bl_count; /* number of codes at each bit length */ -{ - ush next_code[MAX_BITS+1]; /* next code value for each bit length */ - ush code = 0; /* running code value */ - int bits; /* bit index */ - int n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; - const ct_data *stree = desc->stat_desc->static_tree; - int elems = desc->stat_desc->elems; - int n, m; /* iterate over heap elements */ - int max_code = -1; /* largest code with non zero frequency */ - int node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s->heap_len = 0, s->heap_max = HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].Freq != 0) { - s->heap[++(s->heap_len)] = max_code = n; - s->depth[n] = 0; - } else { - tree[n].Len = 0; - } - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s->heap_len < 2) { - node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); - tree[node].Freq = 1; - s->depth[node] = 0; - s->opt_len--; if (stree) s->static_len -= stree[node].Len; - /* node is 0 or 1 so it does not have extra bits */ - } - desc->max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - pqremove(s, tree, n); /* n = node of least frequency */ - m = s->heap[SMALLEST]; /* m = node of next least frequency */ - - s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ - s->heap[--(s->heap_max)] = m; - - /* Create a new node father of n and m */ - tree[node].Freq = tree[n].Freq + tree[m].Freq; - s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? - s->depth[n] : s->depth[m]) + 1); - tree[n].Dad = tree[m].Dad = (ush)node; -#ifdef DUMP_BL_TREE - if (tree == s->bl_tree) { - fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", - node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); - } -#endif - /* and insert the new node in the heap */ - s->heap[SMALLEST] = node++; - pqdownheap(s, tree, SMALLEST); - - } while (s->heap_len >= 2); - - s->heap[--(s->heap_max)] = s->heap[SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, (tree_desc *)desc); - - /* The field len is now set, we can generate the bit codes */ - gen_codes ((ct_data *)tree, max_code, s->bl_count); -} - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. - */ -local void scan_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - if (nextlen == 0) max_count = 138, min_count = 3; - tree[max_code+1].Len = (ush)0xffff; /* guard */ - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n+1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - s->bl_tree[curlen].Freq += count; - } else if (curlen != 0) { - if (curlen != prevlen) s->bl_tree[curlen].Freq++; - s->bl_tree[REP_3_6].Freq++; - } else if (count <= 10) { - s->bl_tree[REPZ_3_10].Freq++; - } else { - s->bl_tree[REPZ_11_138].Freq++; - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ -local void send_tree (s, tree, max_code) - deflate_state *s; - ct_data *tree; /* the tree to be scanned */ - int max_code; /* and its largest code of non zero frequency */ -{ - int n; /* iterates over all tree elements */ - int prevlen = -1; /* last emitted length */ - int curlen; /* length of current code */ - int nextlen = tree[0].Len; /* length of next code */ - int count = 0; /* repeat count of the current code */ - int max_count = 7; /* max repeat count */ - int min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen == 0) max_count = 138, min_count = 3; - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; nextlen = tree[n+1].Len; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { send_code(s, curlen, s->bl_tree); } while (--count != 0); - - } else if (curlen != 0) { - if (curlen != prevlen) { - send_code(s, curlen, s->bl_tree); count--; - } - Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); - - } else if (count <= 10) { - send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); - - } else { - send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); - } - count = 0; prevlen = curlen; - if (nextlen == 0) { - max_count = 138, min_count = 3; - } else if (curlen == nextlen) { - max_count = 6, min_count = 3; - } else { - max_count = 7, min_count = 4; - } - } -} - -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -local int build_bl_tree(s) - deflate_state *s; -{ - int max_blindex; /* index of last bit length code of non zero freq */ - - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); - scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); - - /* Build the bit length tree: */ - build_tree(s, (tree_desc *)(&(s->bl_desc))); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - s->opt_len += 3*(max_blindex+1) + 5+5+4; - Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - s->opt_len, s->static_len)); - - return max_blindex; -} - -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -local void send_all_trees(s, lcodes, dcodes, blcodes) - deflate_state *s; - int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - int rank; /* index in bl_order */ - - Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - "too many codes"); - Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes-1, 5); - send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); - } - Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ - Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); - - send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ - Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} - -/* =========================================================================== - * Send a stored block - */ -void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ -#ifdef DEBUG - s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; - s->compressed_len += (stored_len + 4) << 3; -#endif - copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ -} - -/* =========================================================================== - * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) - */ -void ZLIB_INTERNAL _tr_flush_bits(s) - deflate_state *s; -{ - bi_flush(s); -} - -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -void ZLIB_INTERNAL _tr_align(s) - deflate_state *s; -{ - send_bits(s, STATIC_TREES<<1, 3); - send_code(s, END_BLOCK, static_ltree); -#ifdef DEBUG - s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ -#endif - bi_flush(s); -} - -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ -void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) - deflate_state *s; - charf *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ - int last; /* one if this is the last block for a file */ -{ - ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - int max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s->level > 0) { - - /* Check if the file is binary or text */ - if (s->strm->data_type == Z_UNKNOWN) - s->strm->data_type = detect_data_type(s); - - /* Construct the literal and distance trees */ - build_tree(s, (tree_desc *)(&(s->l_desc))); - Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - - build_tree(s, (tree_desc *)(&(s->d_desc))); - Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); - - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s->opt_len+3+7)>>3; - static_lenb = (s->static_len+3+7)>>3; - - Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - s->last_lit)); - - if (static_lenb <= opt_lenb) opt_lenb = static_lenb; - - } else { - Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } - -#ifdef FORCE_STORED - if (buf != (char*)0) { /* force stored block */ -#else - if (stored_len+4 <= opt_lenb && buf != (char*)0) { - /* 4: two words for the lengths */ -#endif - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); - -#ifdef FORCE_STATIC - } else if (static_lenb >= 0) { /* force static trees */ -#else - } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { -#endif - send_bits(s, (STATIC_TREES<<1)+last, 3); - compress_block(s, (const ct_data *)static_ltree, - (const ct_data *)static_dtree); -#ifdef DEBUG - s->compressed_len += 3 + s->static_len; -#endif - } else { - send_bits(s, (DYN_TREES<<1)+last, 3); - send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, - max_blindex+1); - compress_block(s, (const ct_data *)s->dyn_ltree, - (const ct_data *)s->dyn_dtree); -#ifdef DEBUG - s->compressed_len += 3 + s->opt_len; -#endif - } - Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); - - if (last) { - bi_windup(s); -#ifdef DEBUG - s->compressed_len += 7; /* align on byte boundary */ -#endif - } - Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - s->compressed_len-7*last)); -} - -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -int ZLIB_INTERNAL _tr_tally (s, dist, lc) - deflate_state *s; - unsigned dist; /* distance of matched string */ - unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - s->d_buf[s->last_lit] = (ush)dist; - s->l_buf[s->last_lit++] = (uch)lc; - if (dist == 0) { - /* lc is the unmatched char */ - s->dyn_ltree[lc].Freq++; - } else { - s->matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - Assert((ush)dist < (ush)MAX_DIST(s) && - (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; - s->dyn_dtree[d_code(dist)].Freq++; - } - -#ifdef TRUNCATE_BLOCK - /* Try to guess if it is profitable to stop the current block here */ - if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { - /* Compute an upper bound for the compressed length */ - ulg out_length = (ulg)s->last_lit*8L; - ulg in_length = (ulg)((long)s->strstart - s->block_start); - int dcode; - for (dcode = 0; dcode < D_CODES; dcode++) { - out_length += (ulg)s->dyn_dtree[dcode].Freq * - (5L+extra_dbits[dcode]); - } - out_length >>= 3; - Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", - s->last_lit, in_length, out_length, - 100L - out_length*100L/in_length)); - if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; - } -#endif - return (s->last_lit == s->lit_bufsize-1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} - -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -local void compress_block(s, ltree, dtree) - deflate_state *s; - const ct_data *ltree; /* literal tree */ - const ct_data *dtree; /* distance tree */ -{ - unsigned dist; /* distance of matched string */ - int lc; /* match length or unmatched char (if dist == 0) */ - unsigned lx = 0; /* running index in l_buf */ - unsigned code; /* the code to send */ - int extra; /* number of extra bits to send */ - - if (s->last_lit != 0) do { - dist = s->d_buf[lx]; - lc = s->l_buf[lx++]; - if (dist == 0) { - send_code(s, lc, ltree); /* send a literal byte */ - Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code+LITERALS+1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra != 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra != 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - "pendingBuf overflow"); - - } while (lx < s->last_lit); - - send_code(s, END_BLOCK, ltree); -} - -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -local int detect_data_type(s) - deflate_state *s; -{ - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - unsigned long black_mask = 0xf3ffc07fUL; - int n; - - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>= 1) - if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) - return Z_BINARY; - - /* Check for textual ("white-listed") bytes. */ - if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 - || s->dyn_ltree[13].Freq != 0) - return Z_TEXT; - for (n = 32; n < LITERALS; n++) - if (s->dyn_ltree[n].Freq != 0) - return Z_TEXT; - - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} - -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -local unsigned bi_reverse(code, len) - unsigned code; /* the value to invert */ - int len; /* its bit length */ -{ - register unsigned res = 0; - do { - res |= code & 1; - code >>= 1, res <<= 1; - } while (--len > 0); - return res >> 1; -} - -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. - */ -local void bi_flush(s) - deflate_state *s; -{ - if (s->bi_valid == 16) { - put_short(s, s->bi_buf); - s->bi_buf = 0; - s->bi_valid = 0; - } else if (s->bi_valid >= 8) { - put_byte(s, (Byte)s->bi_buf); - s->bi_buf >>= 8; - s->bi_valid -= 8; - } -} - -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -local void bi_windup(s) - deflate_state *s; -{ - if (s->bi_valid > 8) { - put_short(s, s->bi_buf); - } else if (s->bi_valid > 0) { - put_byte(s, (Byte)s->bi_buf); - } - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef DEBUG - s->bits_sent = (s->bits_sent+7) & ~7; -#endif -} - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -local void copy_block(s, buf, len, header) - deflate_state *s; - charf *buf; /* the input data */ - unsigned len; /* its length */ - int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, (ush)len); - put_short(s, (ush)~len); -#ifdef DEBUG - s->bits_sent += 2*16; -#endif - } -#ifdef DEBUG - s->bits_sent += (ulg)len<<3; -#endif - while (len--) { - put_byte(s, *buf++); - } -} diff --git a/build/premake/premake5/contrib/zlib/trees.h b/build/premake/premake5/contrib/zlib/trees.h deleted file mode 100644 index d35639d82a..0000000000 --- a/build/premake/premake5/contrib/zlib/trees.h +++ /dev/null @@ -1,128 +0,0 @@ -/* header created automatically with -DGEN_TREES_H */ - -local const ct_data static_ltree[L_CODES+2] = { -{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, -{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, -{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, -{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, -{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, -{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, -{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, -{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, -{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, -{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, -{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, -{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, -{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, -{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, -{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, -{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, -{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, -{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, -{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, -{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, -{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, -{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, -{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, -{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, -{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, -{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, -{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, -{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, -{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, -{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, -{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, -{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, -{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, -{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, -{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, -{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, -{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, -{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, -{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, -{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, -{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, -{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, -{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, -{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, -{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, -{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, -{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, -{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, -{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, -{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, -{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, -{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, -{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, -{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, -{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, -{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, -{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, -{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} -}; - -local const ct_data static_dtree[D_CODES] = { -{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, -{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, -{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, -{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, -{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, -{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} -}; - -const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, -18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 -}; - -const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, -13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, -17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, -19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, -22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 -}; - -local const int base_length[LENGTH_CODES] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, -64, 80, 96, 112, 128, 160, 192, 224, 0 -}; - -local const int base_dist[D_CODES] = { - 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, - 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, - 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 -}; - diff --git a/build/premake/premake5/contrib/zlib/uncompr.c b/build/premake/premake5/contrib/zlib/uncompr.c deleted file mode 100644 index 242e9493df..0000000000 --- a/build/premake/premake5/contrib/zlib/uncompr.c +++ /dev/null @@ -1,59 +0,0 @@ -/* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#define ZLIB_INTERNAL -#include "zlib.h" - -/* =========================================================================== - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted. -*/ -int ZEXPORT uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - z_stream stream; - int err; - - stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; - - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - - err = inflateInit(&stream); - if (err != Z_OK) return err; - - err = inflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - inflateEnd(&stream); - if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) - return Z_DATA_ERROR; - return err; - } - *destLen = stream.total_out; - - err = inflateEnd(&stream); - return err; -} diff --git a/build/premake/premake5/contrib/zlib/zconf.h b/build/premake/premake5/contrib/zlib/zconf.h deleted file mode 100644 index 9ccbb0a6fb..0000000000 --- a/build/premake/premake5/contrib/zlib/zconf.h +++ /dev/null @@ -1,513 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H -/* #undef Z_PREFIX */ -/* #undef Z_HAVE_UNISTD_H */ - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzvprintf z_gzvprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetHeader z_inflateGetHeader -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateSetDictionary z_inflateSetDictionary -# define inflateGetDictionary z_inflateGetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# ifndef Z_SOLO -# define uncompress z_uncompress -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef Z_ARG /* function prototypes for stdarg */ -# if defined(STDC) || defined(Z_HAVE_STDARG_H) -# define Z_ARG(args) args -# else -# define Z_ARG(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) -# define Z_HAVE_UNISTD_H -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) -# define z_off64_t __int64 -# else -# define z_off64_t z_off_t -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/build/premake/premake5/contrib/zlib/zlib.h b/build/premake/premake5/contrib/zlib/zlib.h deleted file mode 100644 index 3e0c7672ac..0000000000 --- a/build/premake/premake5/contrib/zlib/zlib.h +++ /dev/null @@ -1,1768 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.8, April 28th, 2013 - - Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 - (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.8" -#define ZLIB_VERNUM 0x1280 -#define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 8 -#define ZLIB_VER_SUBREVISION 0 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed data. - This version of the library supports only one compression method (deflation) - but other algorithms will be added later and will have the same stream - interface. - - Compression can be done in a single step if the buffers are large enough, - or can be done by repeated calls of the compression function. In the latter - case, the application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip streams in memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never crash - even in case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - z_const Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total number of input bytes read so far */ - - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total number of bytes output so far */ - - z_const char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has dropped - to zero. It must update next_out and avail_out when avail_out has dropped - to zero. The application must initialize zalloc, zfree and opaque before - calling the init function. All other fields are set by the compression - library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this if - the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers - returned by zalloc for objects of exactly 65536 bytes *must* have their - offset normalized to zero. The default allocation function provided by this - library ensures this (see zutil.c). To reduce memory requirements and avoid - any allocation of 64K objects, at the expense of compression ratio, compile - the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or progress - reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use in the decompressor (particularly - if the decompressor wants to decompress everything in a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -#define Z_TREES 6 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is not - compatible with the zlib.h header file used by the application. This check - is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. If - zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at all - (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION - requests a default compromise between speed and compression (currently - equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if level is not a valid compression level, or - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). msg is set to null - if there is no error message. deflateInit does not perform any compression: - this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). Some - output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating avail_in or avail_out accordingly; avail_out should - never be zero before the call. The application can consume the compressed - output when it wants, for example when the output buffer is full (avail_out - == 0), or after each call of deflate(). If deflate returns Z_OK and with - zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumulate before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In - particular avail_in is zero after the call if enough output space has been - provided before the call.) Flushing may degrade compression for some - compression algorithms and so it should be used only when necessary. This - completes the current deflate block and follows it with an empty stored block - that is three bits plus filler bits to the next byte, followed by four bytes - (00 00 ff ff). - - If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the - output buffer, but the output is not aligned to a byte boundary. All of the - input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. - This completes the current deflate block and follows it with an empty fixed - codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed code - block. - - If flush is set to Z_BLOCK, a deflate block is completed and emitted, as - for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to - seven bits of the current block are held to be written as the next byte after - the next deflate block is completed. In this case, the decompressor may not - be provided enough bits at this point in order to complete decompression of - the data provided so far to the compressor. It may need to wait for the next - block to be emitted. This is for advanced applications that need to control - the emission of deflate blocks. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the stream - are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least the - value returned by deflateBound (see below). Then deflate is guaranteed to - return Z_STREAM_END. If not enough output space is provided, deflate will - not return Z_STREAM_END, and it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect the - compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, msg - may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the - exact value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit() does not process any header information -- that is deferred - until inflate() is called. -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing will - resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there is - no more input data or no more space in the output buffer (see below about - the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. The - application can consume the uncompressed output when it wants, for example - when the output buffer is full (avail_out == 0), or after each call of - inflate(). If inflate returns Z_OK and with zero avail_out, it must be - called again after making room in the output buffer because there might be - more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, - Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() - stop if and when it gets to the next deflate block boundary. When decoding - the zlib or gzip format, this will cause inflate() to return immediately - after the header and before the first block. When doing a raw inflate, - inflate() will go ahead and process the first block, and will return when it - gets to the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 if - inflate() is currently decoding the last block in the deflate stream, plus - 128 if inflate() returned immediately after decoding an end-of-block code or - decoding the complete header up to just before the first byte of the deflate - stream. The end-of-block will not be indicated until all of the uncompressed - data from that block has been written to strm->next_out. The number of - unused bits may in general be greater than seven, except when bit 7 of - data_type is set, in which case the number of unused bits will be less than - eight. data_type is set as noted here every time inflate() returns for all - flush options, and so can be used to determine the amount of currently - consumed input in bits. - - The Z_TREES option behaves as Z_BLOCK does, but it also returns when the - end of each deflate block header is reached, before any actual data in that - block is decoded. This allows the caller to determine the length of the - deflate block header for later use in random access within a deflate block. - 256 is added to the value of strm->data_type when inflate() returns - immediately after reaching the end of the deflate block header. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step (a - single call of inflate), the parameter flush should be set to Z_FINISH. In - this case all pending input is processed and all pending output is flushed; - avail_out must be large enough to hold all of the uncompressed data for the - operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not - required to perform an inflation in one step. However it may be used to - inform inflate that a faster approach can be used for the single inflate() - call. Z_FINISH also informs inflate to not maintain a sliding window if the - stream completes, which reduces inflate's memory footprint. If the stream - does not complete, either because not all of the stream is provided or not - enough output space is provided, then a sliding window will be allocated and - inflate() can be called again to continue the operation as if Z_NO_FLUSH had - been used. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the effects of the flush parameter in this implementation are - on the return value of inflate() as noted below, when inflate() returns early - when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of - memory for a sliding window when Z_FINISH is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the Adler-32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the Adler-32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() can decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically, if requested when - initializing with inflateInit2(). Any information contained in the gzip - header is not retained, so applications that need that information should - instead use raw inflate, see inflateInit2() below, or inflateBack() and - perform their own processing of the gzip header and trailer. When processing - gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may - then call inflateSync() to look for a good compression block if a partial - recovery of the data is desired. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any pending - output. - - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by the - caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but is - slow and reduces compression ratio; memLevel=9 uses maximum memory for - optimal speed. The default value is 8. See zconf.h for total memory usage - as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as - fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The - strategy parameter only affects the compression ratio but not the - correctness of the compressed output even if it is not set appropriately. - Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler - decoder for special applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid - method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is - incompatible with the version assumed by the caller (ZLIB_VERSION). msg is - set to null if there is no error message. deflateInit2 does not perform any - compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. When using the zlib format, this - function must be called immediately after deflateInit, deflateInit2 or - deflateReset, and before any call of deflate. When doing raw deflate, this - function must be called either before any call of deflate, or immediately - after the completion of a deflate block, i.e. after all input has been - consumed and all output has been delivered when using any of the flush - options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The - compressor and decompressor must use exactly the same dictionary (see - inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size - provided in deflateInit or deflateInit2. Thus the strings most likely to be - useful should be put at the end of the dictionary, not at the front. In - addition, the current implementation of deflate will use at most the window - size minus 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if not at a block boundary for raw deflate). deflateSetDictionary does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and can - consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. The - stream will keep the same compression level and any other attributes that - may have been set by deflateInit2. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different strategy. - If the compression level is changed, the input available so far is - compressed with the old level (and may be flushed); the new level will take - effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to be - compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if - strm->avail_out was zero. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() or - deflateInit2(), and after deflateSetHeader(), if used. This would be used - to allocate an output buffer for deflation in a single pass, and so would be - called before deflate(). If that first deflate() call is provided the - sourceLen input bytes, an output buffer allocated to the size returned by - deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed - to return Z_STREAM_END. Note that it is possible for the compressed size to - be larger than the value returned by deflateBound() if flush options other - than Z_FINISH or Z_NO_FLUSH are used. -*/ - -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); -/* - deflatePending() returns the number of bytes and bits of output that have - been generated, but not yet provided in the available output. The bytes not - provided would be due to the available output space having being consumed. - The number of bits of output not provided are between 0 and 7, where they - await more bits to join them in order to fill out a full byte. If pending - or bits are Z_NULL, then those values are not set. - - deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. - */ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the bits - leftover from a previous deflate stream when appending to it. As such, this - function can only be used for raw deflate, and must be used before the first - deflate() call after a deflateInit2() or deflateReset(). bits must be less - than or equal to 16, and that many of the least significant bits of value - will be inserted in the output. - - deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough - room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be zero to request that inflate use the window size in - the zlib header of the compressed stream. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller, or Z_STREAM_ERROR if the parameters are - invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit2 does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit2() does not process any header information -- that is - deferred until inflate() is called. -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called at any - time to set the dictionary. If the provided dictionary is smaller than the - window and there is already data in the window, then the provided dictionary - will amend what's there. The application must insure that the dictionary - that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); -/* - Returns the sliding dictionary being maintained by inflate. dictLength is - set to the number of bytes in the dictionary, and that many bytes are copied - to dictionary. dictionary must have enough space, where 32768 bytes is - always enough. If inflateGetDictionary() is called with dictionary equal to - Z_NULL, then only the dictionary length is returned, and nothing is copied. - Similary, if dictLength is Z_NULL, then it is not set. - - inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the - stream state is inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a possible full flush point (see above - for the description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurrences of this - pattern are full flush points. - - inflateSync returns Z_OK if a possible full flush point has been found, - Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point - has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. - In the success case, the application may save the current current value of - total_in which indicates where valid compressed data was found. In the - error case, the application may repeatedly call inflateSync, providing more - input each time, until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being Z_NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. The - stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL). -*/ - -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); -/* - This function is the same as inflateReset, but it also permits changing - the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. - - inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being Z_NULL), or if - the windowBits parameter is invalid. -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - If bits is negative, then the input stream bit buffer is emptied. Then - inflatePrime() can be called again to put bits in the buffer. This is used - to clear out bits leftover after feeding inflate a block description prior - to feeding inflate codes. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); -/* - This function returns two values, one in the lower 16 bits of the return - value, and the other in the remaining upper bits, obtained by shifting the - return value down 16 bits. If the upper value is -1 and the lower value is - zero, then inflate() is currently decoding information outside of a block. - If the upper value is -1 and the lower value is non-zero, then inflate is in - the middle of a stored block, with the lower value equaling the number of - bytes from the input remaining to copy. If the upper value is not -1, then - it is the number of bits back from the current bit position in the input of - the code (literal or length/distance pair) currently being processed. In - that case the lower value is the number of bytes already emitted for that - code. - - A code is being processed if inflate is waiting for more input to complete - decoding of the code, or if it has completed decoding but is waiting for - more output space to write the literal or match data. - - inflateMark() is used to mark locations in the input data for random - access, which may be at bit positions, and to note those cases where the - output of a code may span boundaries of random access blocks. The current - location in the input stream can be determined from avail_in and data_type - as noted in the description for the Z_BLOCK flush parameter for inflate. - - inflateMark returns the value noted above or -1 << 16 if the provided - source stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be - used to force inflate() to return immediately after header processing is - complete and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When any - of extra, name, or comment are not Z_NULL and the respective field is not - present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the parameters are invalid, Z_MEM_ERROR if the internal state could not be - allocated, or Z_VERSION_ERROR if the version of the library does not match - the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is potentially more efficient than - inflate() for file i/o applications, in that it avoids copying between the - output and the sliding window by simply making the window itself the output - buffer. inflate() can be faster on modern CPUs when used with large - buffers. inflateBack() trusts the application to not change the output - buffer passed by the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free the - allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the normal - behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format error - in the deflate stream (in which case strm->msg is set to indicate the nature - of the error), or Z_STREAM_ERROR if the stream was not properly initialized. - In the case of Z_BUF_ERROR, an input or output error can be distinguished - using strm->next_in which will be Z_NULL only if in() returned an error. If - strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning - non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() - cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - -#ifndef Z_SOLO - - /* utility functions */ - -/* - The following utility functions are implemented on top of the basic - stream-oriented functions. To simplify the interface, some default options - are assumed (compression level and memory usage, standard memory allocation - functions). The source code of these utility functions can be modified if - you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before a - compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total size - of the destination buffer, which must be large enough to hold the entire - uncompressed data. (The size of the uncompressed data must have been saved - previously by the compressor and transmitted to the decompressor by some - mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed buffer. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In - the case where there is not enough room, uncompress() will fill the output - buffer with the uncompressed data up to that point. -*/ - - /* gzip file access functions */ - -/* - This library supports reading and writing files in gzip (.gz) format with - an interface similar to that of stdio, using the functions that start with - "gz". The gzip format is different from the zlib format. gzip is a gzip - wrapper, documented in RFC 1952, wrapped around a deflate stream. -*/ - -typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ - -/* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - - Opens a gzip (.gz) file for reading or writing. The mode parameter is as - in fopen ("rb" or "wb") but can also include a compression level ("wb9") or - a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only - compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' - for fixed code compression as in "wb9F". (See the description of - deflateInit2 for more information about the strategy parameter.) 'T' will - request transparent writing or appending with no compression and not using - the gzip format. - - "a" can be used instead of "w" to request that the gzip stream that will - be written be appended to the file. "+" will result in an error, since - reading and writing to the same gzip file is not supported. The addition of - "x" when writing will create the file exclusively, which fails if the file - already exists. On systems that support it, the addition of "e" when - reading or writing will set the flag to close the file on an execve() call. - - These functions, as well as gzip, will read and decode a sequence of gzip - streams in a file. The append function of gzopen() can be used to create - such a file. (Also see gzflush() for another way to do this.) When - appending, gzopen does not test whether the file begins with a gzip stream, - nor does it look for the end of the gzip streams to begin appending. gzopen - will simply append a gzip stream to the existing file. - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. When - reading, this will be detected automatically by looking for the magic two- - byte gzip header. - - gzopen returns NULL if the file could not be opened, if there was - insufficient memory to allocate the gzFile state, or if an invalid mode was - specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). - errno can be checked to determine if the reason gzopen failed was that the - file could not be opened. -*/ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen associates a gzFile with the file descriptor fd. File descriptors - are obtained from calls like open, dup, creat, pipe or fileno (if the file - has been previously opened with fopen). The mode parameter is as in gzopen. - - The next call of gzclose on the returned gzFile will also close the file - descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor - fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, - mode);. The duplicated descriptor should be saved to avoid a leak, since - gzdopen does not close fd if it fails. If you are using fileno() to get the - file descriptor from a FILE *, then you will have to use dup() to avoid - double-close()ing the file descriptor. Both gzclose() and fclose() will - close the associated file descriptor, so they need to have different file - descriptors. - - gzdopen returns NULL if there was insufficient memory to allocate the - gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not - provided, or '+' was provided), or if fd is -1. The file descriptor is not - used until the next gz* read, write, seek, or close operation, so gzdopen - will not detect if fd is invalid (unless fd is -1). -*/ - -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); -/* - Set the internal buffer size used by this library's functions. The - default buffer size is 8192 bytes. This function must be called after - gzopen() or gzdopen(), and before any other calls that read or write the - file. The buffer memory allocation is always deferred to the first read or - write. Two buffers are allocated, either both of the specified size when - writing, or one of the specified size and the other twice that size when - reading. A larger buffer size of, for example, 64K or 128K bytes will - noticeably increase the speed of decompression (reading). - - The new buffer size also affects the maximum length for gzprintf(). - - gzbuffer() returns 0 on success, or -1 on failure, such as being called - too late. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. If - the input file is not in gzip format, gzread copies the given number of - bytes into the buffer directly from the file. - - After reaching the end of a gzip stream in the input, gzread will continue - to read, looking for another gzip stream. Any number of gzip streams may be - concatenated in the input file, and will all be decompressed by gzread(). - If something other than a gzip stream is encountered after a gzip stream, - that remaining trailing garbage is ignored (and no error is returned). - - gzread can be used to read a gzip file that is being concurrently written. - Upon reaching the end of the input, gzread will return with the available - data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then - gzclearerr can be used to clear the end of file indicator in order to permit - gzread to be tried again. Z_OK indicates that a gzip stream was completed - on the last gzread. Z_BUF_ERROR indicates that the input file ended in the - middle of a gzip stream. Note that gzread does not return -1 in the event - of an incomplete gzip stream. This error is deferred until gzclose(), which - will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip - stream. Alternatively, gzerror can be used before gzclose to detect this - case. - - gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. -*/ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes written or 0 in case of - error. -*/ - -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the arguments to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or 0 in case of error. The number of - uncompressed bytes written is limited to 8191, or one less than the buffer - size given to gzbuffer(). The caller should assure that this limit is not - exceeded. If it is exceeded, then gzprintf() will return an error (0) with - nothing written. In this case, there may also be a buffer overflow with - unpredictable consequences, which is possible only if zlib was compiled with - the insecure functions sprintf() or vsprintf() because the secure snprintf() - or vsnprintf() functions were not available. This can be determined using - zlibCompileFlags(). -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or a - newline character is read and transferred to buf, or an end-of-file - condition is encountered. If any characters are read or if len == 1, the - string is terminated with a null character. If no characters are read due - to an end-of-file or len < 1, then the buffer is left untouched. - - gzgets returns buf which is a null-terminated string, or it returns NULL - for end-of-file or in case of error. If there was an error, the contents at - buf are indeterminate. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. gzputc - returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte or -1 - in case of end of file or error. This is implemented as a macro for speed. - As such, it does not do all of the checking the other functions do. I.e. - it does not check to see if file is NULL, nor whether the structure file - points to has been clobbered or not. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read as the first character - on the next read. At least one character of push-back is allowed. - gzungetc() returns the character pushed, or -1 on failure. gzungetc() will - fail if c is -1, and may fail if a character has been pushed but not read - yet. If gzungetc is used immediately after gzopen or gzdopen, at least the - output buffer size of pushed characters is allowed. (See gzbuffer above.) - The pushed character will be discarded if the stream is repositioned with - gzseek() or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter flush - is as in the deflate() function. The return value is the zlib error number - (see function gzerror below). gzflush is only permitted when writing. - - If the flush parameter is Z_FINISH, the remaining data is written and the - gzip stream is completed in the output. If gzwrite() is called again, a new - gzip stream will be started in the output. gzread() is able to read such - concatented gzip streams. - - gzflush should be called only when strictly necessary because it will - degrade compression if called too often. -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - - Returns the starting position for the next gzread or gzwrite on the given - compressed file. This position represents a number of bytes in the - uncompressed data stream, and is zero when starting, even if appending or - reading a gzip stream from the middle of a file using gzdopen(). - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -/* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - - Returns the current offset in the file being read or written. This offset - includes the count of bytes that precede the gzip stream, for example when - appending or when using gzdopen() for reading. When reading, the offset - does not include as yet unused buffered input. This information can be used - for a progress indicator. On error, gzoffset() returns -1. -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns true (1) if the end-of-file indicator has been set while reading, - false (0) otherwise. Note that the end-of-file indicator is set only if the - read tried to go past the end of the input, but came up short. Therefore, - just like feof(), gzeof() may return false even if there is no more data to - read, in the event that the last read request was for the exact number of - bytes remaining in the input file. This will happen if the input file size - is an exact multiple of the buffer size. - - If gzeof() returns true, then the read functions will return no more data, - unless the end-of-file indicator is reset by gzclearerr() and the input file - has grown since the previous end of file was detected. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns true (1) if file is being copied directly while reading, or false - (0) if file is a gzip stream being decompressed. - - If the input file is empty, gzdirect() will return true, since the input - does not contain a gzip stream. - - If gzdirect() is used immediately after gzopen() or gzdopen() it will - cause buffers to be allocated to allow reading the file to determine if it - is a gzip file. Therefore if gzbuffer() is used, it should be called before - gzdirect(). - - When writing, gzdirect() returns true (1) if transparent writing was - requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: - gzdirect() is not needed when writing. Transparent writing must be - explicitly requested, so the application already knows the answer. When - linking statically, using gzdirect() will include all of the zlib code for - gzip file reading and decompression, which may not be desired.) -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file and - deallocates the (de)compression state. Note that once file is closed, you - cannot call gzerror with file, since its structures have been deallocated. - gzclose must not be called more than once on the same file, just as free - must not be called more than once on the same allocation. - - gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a - file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the - last read ended in the middle of a gzip stream, or Z_OK on success. -*/ - -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); -/* - Same as gzclose(), but gzclose_r() is only for use when reading, and - gzclose_w() is only for use when writing or appending. The advantage to - using these instead of gzclose() is that they avoid linking in zlib - compression or decompression code that is not used when only reading or only - writing respectively. If gzclose() is used, then both compression and - decompression code will be included the application when linking to a static - zlib library. -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the given - compressed file. errnum is set to zlib error number. If an error occurred - in the file system and not in the compression library, errnum is set to - Z_ERRNO and the application may consult errno to get the exact error code. - - The application must not modify the returned string. Future calls to - this function may invalidate the previously returned string. If file is - closed, then the string previously returned by gzerror will no longer be - available. - - gzerror() should be used to distinguish errors from end-of-file for those - functions above that do not distinguish those cases in their return values. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - -#endif /* !Z_SOLO */ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the compression - library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is Z_NULL, this function returns the - required initial value for the checksum. - - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. - - Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note - that the z_off_t type (like off_t) is a signed integer. If len2 is - negative, the result has no meaning or utility. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is Z_NULL, this function returns the required - initial value for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -/* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) - -#ifndef Z_SOLO - -/* gzgetc() macro and its supporting function and exposed data structure. Note - * that the real internal state is much larger than the exposed structure. - * This abbreviated structure exposes just enough for the gzgetc() macro. The - * user should not mess with these exposed elements, since their names or - * behavior could change in the future, perhaps even capriciously. They can - * only be used by the gzgetc() macro. You have been warned. - */ -struct gzFile_s { - unsigned have; - unsigned char *next; - z_off64_t pos; -}; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -# define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#else -# define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) -#endif - -/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ -#ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); -#endif - -#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) -# ifdef Z_PREFIX_SET -# define z_gzopen z_gzopen64 -# define z_gzseek z_gzseek64 -# define z_gztell z_gztell64 -# define z_gzoffset z_gzoffset64 -# define z_adler32_combine z_adler32_combine64 -# define z_crc32_combine z_crc32_combine64 -# else -# define gzopen gzopen64 -# define gzseek gzseek64 -# define gztell gztell64 -# define gzoffset gzoffset64 -# define adler32_combine adler32_combine64 -# define crc32_combine crc32_combine64 -# endif -# ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -# endif -#else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); -#endif - -#else /* Z_SOLO */ - - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - -#endif /* !Z_SOLO */ - -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - -/* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); -# endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/build/premake/premake5/contrib/zlib/zutil.c b/build/premake/premake5/contrib/zlib/zutil.c deleted file mode 100644 index 23d2ebef00..0000000000 --- a/build/premake/premake5/contrib/zlib/zutil.c +++ /dev/null @@ -1,324 +0,0 @@ -/* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#include "zutil.h" -#ifndef Z_SOLO -# include "gzguts.h" -#endif - -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ -#endif - -z_const char * const z_errmsg[10] = { -"need dictionary", /* Z_NEED_DICT 2 */ -"stream end", /* Z_STREAM_END 1 */ -"", /* Z_OK 0 */ -"file error", /* Z_ERRNO (-1) */ -"stream error", /* Z_STREAM_ERROR (-2) */ -"data error", /* Z_DATA_ERROR (-3) */ -"insufficient memory", /* Z_MEM_ERROR (-4) */ -"buffer error", /* Z_BUF_ERROR (-5) */ -"incompatible version",/* Z_VERSION_ERROR (-6) */ -""}; - - -const char * ZEXPORT zlibVersion() -{ - return ZLIB_VERSION; -} - -uLong ZEXPORT zlibCompileFlags() -{ - uLong flags; - - flags = 0; - switch ((int)(sizeof(uInt))) { - case 2: break; - case 4: flags += 1; break; - case 8: flags += 2; break; - default: flags += 3; - } - switch ((int)(sizeof(uLong))) { - case 2: break; - case 4: flags += 1 << 2; break; - case 8: flags += 2 << 2; break; - default: flags += 3 << 2; - } - switch ((int)(sizeof(voidpf))) { - case 2: break; - case 4: flags += 1 << 4; break; - case 8: flags += 2 << 4; break; - default: flags += 3 << 4; - } - switch ((int)(sizeof(z_off_t))) { - case 2: break; - case 4: flags += 1 << 6; break; - case 8: flags += 2 << 6; break; - default: flags += 3 << 6; - } -#ifdef DEBUG - flags += 1 << 8; -#endif -#if defined(ASMV) || defined(ASMINF) - flags += 1 << 9; -#endif -#ifdef ZLIB_WINAPI - flags += 1 << 10; -#endif -#ifdef BUILDFIXED - flags += 1 << 12; -#endif -#ifdef DYNAMIC_CRC_TABLE - flags += 1 << 13; -#endif -#ifdef NO_GZCOMPRESS - flags += 1L << 16; -#endif -#ifdef NO_GZIP - flags += 1L << 17; -#endif -#ifdef PKZIP_BUG_WORKAROUND - flags += 1L << 20; -#endif -#ifdef FASTEST - flags += 1L << 21; -#endif -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifdef NO_vsnprintf - flags += 1L << 25; -# ifdef HAS_vsprintf_void - flags += 1L << 26; -# endif -# else -# ifdef HAS_vsnprintf_void - flags += 1L << 26; -# endif -# endif -#else - flags += 1L << 24; -# ifdef NO_snprintf - flags += 1L << 25; -# ifdef HAS_sprintf_void - flags += 1L << 26; -# endif -# else -# ifdef HAS_snprintf_void - flags += 1L << 26; -# endif -# endif -#endif - return flags; -} - -#ifdef DEBUG - -# ifndef verbose -# define verbose 0 -# endif -int ZLIB_INTERNAL z_verbose = verbose; - -void ZLIB_INTERNAL z_error (m) - char *m; -{ - fprintf(stderr, "%s\n", m); - exit(1); -} -#endif - -/* exported to allow conversion of error code to string for compress() and - * uncompress() - */ -const char * ZEXPORT zError(err) - int err; -{ - return ERR_MSG(err); -} - -#if defined(_WIN32_WCE) - /* The Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. - */ - int errno = 0; -#endif - -#ifndef HAVE_MEMCPY - -void ZLIB_INTERNAL zmemcpy(dest, source, len) - Bytef* dest; - const Bytef* source; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = *source++; /* ??? to be unrolled */ - } while (--len != 0); -} - -int ZLIB_INTERNAL zmemcmp(s1, s2, len) - const Bytef* s1; - const Bytef* s2; - uInt len; -{ - uInt j; - - for (j = 0; j < len; j++) { - if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; - } - return 0; -} - -void ZLIB_INTERNAL zmemzero(dest, len) - Bytef* dest; - uInt len; -{ - if (len == 0) return; - do { - *dest++ = 0; /* ??? to be unrolled */ - } while (--len != 0); -} -#endif - -#ifndef Z_SOLO - -#ifdef SYS16BIT - -#ifdef __TURBOC__ -/* Turbo C in 16-bit mode */ - -# define MY_ZCALLOC - -/* Turbo C malloc() does not allow dynamic allocation of 64K bytes - * and farmalloc(64K) returns a pointer with an offset of 8, so we - * must fix the pointer. Warning: the pointer must be put back to its - * original form in order to free it, use zcfree(). - */ - -#define MAX_PTR 10 -/* 10*64K = 640K */ - -local int next_ptr = 0; - -typedef struct ptr_table_s { - voidpf org_ptr; - voidpf new_ptr; -} ptr_table; - -local ptr_table table[MAX_PTR]; -/* This table is used to remember the original form of pointers - * to large buffers (64K). Such pointers are normalized with a zero offset. - * Since MSDOS is not a preemptive multitasking OS, this table is not - * protected from concurrent access. This hack doesn't work anyway on - * a protected system like OS/2. Use Microsoft C instead. - */ - -voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) -{ - voidpf buf = opaque; /* just to make some compilers happy */ - ulg bsize = (ulg)items*size; - - /* If we allocate less than 65520 bytes, we assume that farmalloc - * will return a usable pointer which doesn't have to be normalized. - */ - if (bsize < 65520L) { - buf = farmalloc(bsize); - if (*(ush*)&buf != 0) return buf; - } else { - buf = farmalloc(bsize + 16L); - } - if (buf == NULL || next_ptr >= MAX_PTR) return NULL; - table[next_ptr].org_ptr = buf; - - /* Normalize the pointer to seg:0 */ - *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; - *(ush*)&buf = 0; - table[next_ptr++].new_ptr = buf; - return buf; -} - -void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) -{ - int n; - if (*(ush*)&ptr != 0) { /* object < 64K */ - farfree(ptr); - return; - } - /* Find the original pointer */ - for (n = 0; n < next_ptr; n++) { - if (ptr != table[n].new_ptr) continue; - - farfree(table[n].org_ptr); - while (++n < next_ptr) { - table[n-1] = table[n]; - } - next_ptr--; - return; - } - ptr = opaque; /* just to make some compilers happy */ - Assert(0, "zcfree: ptr not found"); -} - -#endif /* __TURBOC__ */ - - -#ifdef M_I86 -/* Microsoft C in 16-bit mode */ - -# define MY_ZCALLOC - -#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) -# define _halloc halloc -# define _hfree hfree -#endif - -voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) -{ - if (opaque) opaque = 0; /* to make compiler happy */ - return _halloc((long)items, size); -} - -void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) -{ - if (opaque) opaque = 0; /* to make compiler happy */ - _hfree(ptr); -} - -#endif /* M_I86 */ - -#endif /* SYS16BIT */ - - -#ifndef MY_ZCALLOC /* Any system without a special alloc function */ - -#ifndef STDC -extern voidp malloc OF((uInt size)); -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); -#endif - -voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; -{ - if (opaque) items += size - size; /* make compiler happy */ - return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : - (voidpf)calloc(items, size); -} - -void ZLIB_INTERNAL zcfree (opaque, ptr) - voidpf opaque; - voidpf ptr; -{ - free(ptr); - if (opaque) return; /* make compiler happy */ -} - -#endif /* MY_ZCALLOC */ - -#endif /* !Z_SOLO */ diff --git a/build/premake/premake5/contrib/zlib/zutil.h b/build/premake/premake5/contrib/zlib/zutil.h deleted file mode 100644 index 24ab06b1cf..0000000000 --- a/build/premake/premake5/contrib/zlib/zutil.h +++ /dev/null @@ -1,253 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id$ */ - -#ifndef ZUTIL_H -#define ZUTIL_H - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include "zlib.h" - -#if defined(STDC) && !defined(Z_SOLO) -# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) -# include -# endif -# include -# include -#endif - -#ifdef Z_SOLO - typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -typedef unsigned char uch; -typedef uch FAR uchf; -typedef unsigned short ush; -typedef ush FAR ushf; -typedef unsigned long ulg; - -extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ - -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = ERR_MSG(err), (err)) -/* To be used only when the state is known to be valid */ - - /* common constants */ - -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif -/* default windowBits for decompression. MAX_WBITS is for compression only */ - -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -/* default memLevel */ - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -/* The three kinds of block type */ - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -/* The minimum and maximum match lengths */ - -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - - /* target dependencies */ - -#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) -# define OS_CODE 0x00 -# ifndef Z_SOLO -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include -# endif -# else /* MSC or DJGPP */ -# include -# endif -# endif -#endif - -#ifdef AMIGA -# define OS_CODE 0x01 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 -#endif - -#ifdef OS2 -# define OS_CODE 0x06 -# if defined(M_I86) && !defined(Z_SOLO) -# include -# endif -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif -#endif - -#ifdef TOPS20 -# define OS_CODE 0x0a -#endif - -#ifdef WIN32 -# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ -# define OS_CODE 0x0b -# endif -#endif - -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0f -#endif - -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# ifndef _PTRDIFF_T_DEFINED - typedef int ptrdiff_t; -# define _PTRDIFF_T_DEFINED -# endif -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - -#if defined(__BORLANDC__) && !defined(MSDOS) - #pragma warn -8004 - #pragma warn -8008 - #pragma warn -8066 -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_WIN32) && \ - (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); -#endif - - /* common defaults */ - -#ifndef OS_CODE -# define OS_CODE 0x03 /* assume Unix */ -#endif - -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) -#endif - - /* functions */ - -#if defined(pyr) || defined(Z_SOLO) -# define NO_MEMCPY -#endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) - /* Use our own functions for small and medium model with MSC <= 5.0. - * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. - */ -# define NO_MEMCPY -#endif -#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) -# define HAVE_MEMCPY -#endif -#ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ -# define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) -# else -# define zmemcpy memcpy -# define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) -# endif -#else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); -#endif - -/* Diagnostic functions */ -#ifdef DEBUG -# include - extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((char *m)); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} -#else -# define Assert(cond,msg) -# define Trace(x) -# define Tracev(x) -# define Tracevv(x) -# define Tracec(c,x) -# define Tracecv(c,x) -#endif - -#ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); -#endif - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - -/* Reverse the bytes in a 32-bit value */ -#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ - (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) - -#endif /* ZUTIL_H */ diff --git a/build/premake/premake5/doxyfile b/build/premake/premake5/doxyfile deleted file mode 100644 index 20ed57cbe6..0000000000 --- a/build/premake/premake5/doxyfile +++ /dev/null @@ -1,258 +0,0 @@ -# Doxyfile 1.5.1-p1 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Premake Internals" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = "" -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = src -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */UnitTest++/* */lua-5.1.1/* -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/build/premake/premake5/mobdebug.lua b/build/premake/premake5/mobdebug.lua deleted file mode 100644 index 6834ab2d9e..0000000000 --- a/build/premake/premake5/mobdebug.lua +++ /dev/null @@ -1,1707 +0,0 @@ --- --- MobDebug -- Lua remote debugger --- Copyright 2011-15 Paul Kulchenko --- Based on RemDebug 1.0 Copyright Kepler Project 2005 --- - --- use loaded modules or load explicitly on those systems that require that -local require = require -local io = io or require "io" -local table = table or require "table" -local string = string or require "string" -local coroutine = coroutine or require "coroutine" -local debug = require "debug" --- protect require "os" as it may fail on embedded systems without os module -local os = os or (function(module) - local ok, res = pcall(require, module) - return ok and res or nil -end)("os") - -local mobdebug = { - _NAME = "mobdebug", - _VERSION = "0.702", - _COPYRIGHT = "Paul Kulchenko", - _DESCRIPTION = "Mobile Remote Debugger for the Lua programming language", - port = os and os.getenv and tonumber((os.getenv("MOBDEBUG_PORT"))) or 8172, - checkcount = 200, - yieldtimeout = 0.02, -- yield timeout (s) - connecttimeout = 2, -- connect timeout (s) -} - -local HOOKMASK = "lcr" -local error = error -local getfenv = getfenv -local setfenv = setfenv -local loadstring = loadstring or load -- "load" replaced "loadstring" in Lua 5.2 -local pairs = pairs -local setmetatable = setmetatable -local tonumber = tonumber -local unpack = table.unpack or unpack -local rawget = rawget -local gsub, sub, find = string.gsub, string.sub, string.find - --- if strict.lua is used, then need to avoid referencing some global --- variables, as they can be undefined; --- use rawget to avoid complaints from strict.lua at run-time. --- it's safe to do the initialization here as all these variables --- should get defined values (if any) before the debugging starts. --- there is also global 'wx' variable, which is checked as part of --- the debug loop as 'wx' can be loaded at any time during debugging. -local genv = _G or _ENV -local jit = rawget(genv, "jit") -local MOAICoroutine = rawget(genv, "MOAICoroutine") - --- ngx_lua debugging requires a special handling as its coroutine.* --- methods use a different mechanism that doesn't allow resume calls --- from debug hook handlers. --- Instead, the "original" coroutine.* methods are used. --- `rawget` needs to be used to protect against `strict` checks, but --- ngx_lua hides those in a metatable, so need to use that. -local metagindex = getmetatable(genv) and getmetatable(genv).__index -local ngx = type(metagindex) == "table" and metagindex.rawget and metagindex:rawget("ngx") or nil -local corocreate = ngx and coroutine._create or coroutine.create -local cororesume = ngx and coroutine._resume or coroutine.resume -local coroyield = ngx and coroutine._yield or coroutine.yield -local corostatus = ngx and coroutine._status or coroutine.status -local corowrap = coroutine.wrap - -if not setfenv then -- Lua 5.2+ - -- based on http://lua-users.org/lists/lua-l/2010-06/msg00314.html - -- this assumes f is a function - local function findenv(f) - local level = 1 - repeat - local name, value = debug.getupvalue(f, level) - if name == '_ENV' then return level, value end - level = level + 1 - until name == nil - return nil end - getfenv = function (f) return(select(2, findenv(f)) or _G) end - setfenv = function (f, t) - local level = findenv(f) - if level then debug.setupvalue(f, level, t) end - return f end -end - --- check for OS and convert file names to lower case on windows --- (its file system is case insensitive, but case preserving), as setting a --- breakpoint on x:\Foo.lua will not work if the file was loaded as X:\foo.lua. --- OSX and Windows behave the same way (case insensitive, but case preserving). --- OSX can be configured to be case-sensitive, so check for that. This doesn't --- handle the case of different partitions having different case-sensitivity. -local win = os and os.getenv and (os.getenv('WINDIR') or (os.getenv('OS') or ''):match('[Ww]indows')) and true or false -local mac = not win and (os and os.getenv and os.getenv('DYLD_LIBRARY_PATH') or not io.open("/proc")) and true or false -local iscasepreserving = win or (mac and io.open('/library') ~= nil) - --- turn jit off based on Mike Pall's comment in this discussion: --- http://www.freelists.org/post/luajit/Debug-hooks-and-JIT,2 --- "You need to turn it off at the start if you plan to receive --- reliable hook calls at any later point in time." -if jit and jit.off then jit.off() end - -local socket = require "socket" -local coro_debugger -local coro_debugee -local coroutines = {}; setmetatable(coroutines, {__mode = "k"}) -- "weak" keys -local events = { BREAK = 1, WATCH = 2, RESTART = 3, STACK = 4 } -local breakpoints = {} -local watches = {} -local lastsource -local lastfile -local watchescnt = 0 -local abort -- default value is nil; this is used in start/loop distinction -local seen_hook = false -local checkcount = 0 -local step_into = false -local step_over = false -local step_level = 0 -local stack_level = 0 -local server -local buf -local outputs = {} -local iobase = {print = print} -local basedir = "" -local deferror = "execution aborted at default debugee" -local debugee = function () - local a = 1 - for _ = 1, 10 do a = a + 1 end - error(deferror) -end -local function q(s) return string.gsub(s, '([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end - -local serpent = (function() ---- include Serpent module for serialization -local n, v = "serpent", "0.30" -- (C) 2012-17 Paul Kulchenko; MIT License -local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" -local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} -local badtype = {thread = true, userdata = true, cdata = true} -local getmetatable = debug and debug.getmetatable or getmetatable -local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+ -local keyword, globals, G = {}, {}, (_G or _ENV) -for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', - 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end -for k,v in pairs(G) do globals[v] = k end -- build func to name mapping -for _,g in ipairs({'coroutine', 'debug', 'io', 'math', 'string', 'table', 'os'}) do - for k,v in pairs(type(G[g]) == 'table' and G[g] or {}) do globals[v] = g..'.'..k end end - -local function s(t, opts) - local name, indent, fatal, maxnum = opts.name, opts.indent, opts.fatal, opts.maxnum - local sparse, custom, huge = opts.sparse, opts.custom, not opts.nohuge - local space, maxl = (opts.compact and '' or ' '), (opts.maxlevel or math.huge) - local maxlen, metatostring = tonumber(opts.maxlength), opts.metatostring - local iname, comm = '_'..(name or ''), opts.comment and (tonumber(opts.comment) or math.huge) - local numformat = opts.numformat or "%.17g" - local seen, sref, syms, symn = {}, {'local '..iname..'={}'}, {}, 0 - local function gensym(val) return '_'..(tostring(tostring(val)):gsub("[^%w]",""):gsub("(%d%w+)", - -- tostring(val) is needed because __tostring may return a non-string value - function(s) if not syms[s] then symn = symn+1; syms[s] = symn end return tostring(syms[s]) end)) end - local function safestr(s) return type(s) == "number" and tostring(huge and snum[tostring(s)] or numformat:format(s)) - or type(s) ~= "string" and tostring(s) -- escape NEWLINE/010 and EOF/026 - or ("%q"):format(s):gsub("\010","n"):gsub("\026","\\026") end - local function comment(s,l) return comm and (l or 0) < comm and ' --[['..select(2, pcall(tostring, s))..']]' or '' end - local function globerr(s,l) return globals[s] and globals[s]..comment(s,l) or not fatal - and safestr(select(2, pcall(tostring, s))) or error("Can't serialize "..tostring(s)) end - local function safename(path, name) -- generates foo.bar, foo[3], or foo['b a r'] - local n = name == nil and '' or name - local plain = type(n) == "string" and n:match("^[%l%u_][%w_]*$") and not keyword[n] - local safe = plain and n or '['..safestr(n)..']' - return (path or '')..(plain and path and '.' or '')..safe, safe end - local alphanumsort = type(opts.sortkeys) == 'function' and opts.sortkeys or function(k, o, n) -- k=keys, o=originaltable, n=padding - local maxn, to = tonumber(n) or 12, {number = 'a', string = 'b'} - local function padnum(d) return ("%0"..tostring(maxn).."d"):format(tonumber(d)) end - table.sort(k, function(a,b) - -- sort numeric keys first: k[key] is not nil for numerical keys - return (k[a] ~= nil and 0 or to[type(a)] or 'z')..(tostring(a):gsub("%d+",padnum)) - < (k[b] ~= nil and 0 or to[type(b)] or 'z')..(tostring(b):gsub("%d+",padnum)) end) end - local function val2str(t, name, indent, insref, path, plainindex, level) - local ttype, level, mt = type(t), (level or 0), getmetatable(t) - local spath, sname = safename(path, name) - local tag = plainindex and - ((type(name) == "number") and '' or name..space..'='..space) or - (name ~= nil and sname..space..'='..space or '') - if seen[t] then -- already seen this element - sref[#sref+1] = spath..space..'='..space..seen[t] - return tag..'nil'..comment('ref', level) end - -- protect from those cases where __tostring may fail - if type(mt) == 'table' then - local to, tr = pcall(function() return mt.__tostring(t) end) - local so, sr = pcall(function() return mt.__serialize(t) end) - if (opts.metatostring ~= false and to or so) then -- knows how to serialize itself - seen[t] = insref or spath - t = so and sr or tr - ttype = type(t) - end -- new value falls through to be serialized - end - if ttype == "table" then - if level >= maxl then return tag..'{}'..comment('maxlvl', level) end - seen[t] = insref or spath - if next(t) == nil then return tag..'{}'..comment(t, level) end -- table empty - if maxlen and maxlen < 0 then return tag..'{}'..comment('maxlen', level) end - local maxn, o, out = math.min(#t, maxnum or #t), {}, {} - for key = 1, maxn do o[key] = key end - if not maxnum or #o < maxnum then - local n = #o -- n = n + 1; o[n] is much faster than o[#o+1] on large tables - for key in pairs(t) do if o[key] ~= key then n = n + 1; o[n] = key end end end - if maxnum and #o > maxnum then o[maxnum+1] = nil end - if opts.sortkeys and #o > maxn then alphanumsort(o, t, opts.sortkeys) end - local sparse = sparse and #o > maxn -- disable sparsness if only numeric keys (shorter output) - for n, key in ipairs(o) do - local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse - if opts.valignore and opts.valignore[value] -- skip ignored values; do nothing - or opts.keyallow and not opts.keyallow[key] - or opts.keyignore and opts.keyignore[key] - or opts.valtypeignore and opts.valtypeignore[type(value)] -- skipping ignored value types - or sparse and value == nil then -- skipping nils; do nothing - elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then - if not seen[key] and not globals[key] then - sref[#sref+1] = 'placeholder' - local sname = safename(iname, gensym(key)) -- iname is table for local variables - sref[#sref] = val2str(key,sname,indent,sname,iname,true) end - sref[#sref+1] = 'placeholder' - local path = seen[t]..'['..tostring(seen[key] or globals[key] or gensym(key))..']' - sref[#sref] = path..space..'='..space..tostring(seen[value] or val2str(value,nil,indent,path)) - else - out[#out+1] = val2str(value,key,indent,insref,seen[t],plainindex,level+1) - if maxlen then - maxlen = maxlen - #out[#out] - if maxlen < 0 then break end - end - end - end - local prefix = string.rep(indent or '', level) - local head = indent and '{\n'..prefix..indent or '{' - local body = table.concat(out, ','..(indent and '\n'..prefix..indent or space)) - local tail = indent and "\n"..prefix..'}' or '}' - return (custom and custom(tag,head,body,tail,level) or tag..head..body..tail)..comment(t, level) - elseif badtype[ttype] then - seen[t] = insref or spath - return tag..globerr(t, level) - elseif ttype == 'function' then - seen[t] = insref or spath - if opts.nocode then return tag.."function() --[[..skipped..]] end"..comment(t, level) end - local ok, res = pcall(string.dump, t) - local func = ok and "((loadstring or load)("..safestr(res)..",'@serialized'))"..comment(t, level) - return tag..(func or globerr(t, level)) - else return tag..safestr(t) end -- handle all other types - end - local sepr = indent and "\n" or ";"..space - local body = val2str(t, name, indent) -- this call also populates sref - local tail = #sref>1 and table.concat(sref, sepr)..sepr or '' - local warn = opts.comment and #sref>1 and space.."--[[incomplete output with shared/self-references skipped]]" or '' - return not name and body..warn or "do local "..body..sepr..tail.."return "..name..sepr.."end" -end - -local function deserialize(data, opts) - local env = (opts and opts.safe == false) and G - or setmetatable({}, { - __index = function(t,k) return t end, - __call = function(t,...) error("cannot call functions") end - }) - local f, res = (loadstring or load)('return '..data, nil, nil, env) - if not f then f, res = (loadstring or load)(data, nil, nil, env) end - if not f then return f, res end - if setfenv then setfenv(f, env) end - return pcall(f) -end - -local function merge(a, b) if b then for k,v in pairs(b) do a[k] = v end end; return a; end -return { _NAME = n, _COPYRIGHT = c, _DESCRIPTION = d, _VERSION = v, serialize = s, - load = deserialize, - dump = function(a, opts) return s(a, merge({name = '_', compact = true, sparse = true}, opts)) end, - line = function(a, opts) return s(a, merge({sortkeys = true, comment = true}, opts)) end, - block = function(a, opts) return s(a, merge({indent = ' ', sortkeys = true, comment = true}, opts)) end } -end)() ---- end of Serpent module - -mobdebug.line = serpent.line -mobdebug.dump = serpent.dump -mobdebug.linemap = nil -mobdebug.loadstring = loadstring - -local function removebasedir(path, basedir) - if iscasepreserving then - -- check if the lowercased path matches the basedir - -- if so, return substring of the original path (to not lowercase it) - return path:lower():find('^'..q(basedir:lower())) - and path:sub(#basedir+1) or path - else - return string.gsub(path, '^'..q(basedir), '') - end -end - -local function stack(start) - local function vars(f) - local func = debug.getinfo(f, "f").func - local i = 1 - local locals = {} - -- get locals - while true do - local name, value = debug.getlocal(f, i) - if not name then break end - if string.sub(name, 1, 1) ~= '(' then - locals[name] = {value, select(2,pcall(tostring,value))} - end - i = i + 1 - end - -- get varargs (these use negative indices) - i = 1 - while true do - local name, value = debug.getlocal(f, -i) - -- `not name` should be enough, but LuaJIT 2.0.0 incorrectly reports `(*temporary)` names here - if not name or name ~= "(*vararg)" then break end - locals[name:gsub("%)$"," "..i..")")] = {value, select(2,pcall(tostring,value))} - i = i + 1 - end - -- get upvalues - i = 1 - local ups = {} - while func do -- check for func as it may be nil for tail calls - local name, value = debug.getupvalue(func, i) - if not name then break end - ups[name] = {value, select(2,pcall(tostring,value))} - i = i + 1 - end - return locals, ups - end - - local stack = {} - local linemap = mobdebug.linemap - for i = (start or 0), 100 do - local source = debug.getinfo(i, "Snl") - if not source then break end - - local src = source.source - if src:find("@") == 1 then - src = src:sub(2):gsub("\\", "/") - if src:find("%./") == 1 then src = src:sub(3) end - end - - table.insert(stack, { -- remove basedir from source - {source.name, removebasedir(src, basedir), - linemap and linemap(source.linedefined, source.source) or source.linedefined, - linemap and linemap(source.currentline, source.source) or source.currentline, - source.what, source.namewhat, source.short_src}, - vars(i+1)}) - if source.what == 'main' then break end - end - return stack -end - -local function set_breakpoint(file, line) - if file == '-' and lastfile then file = lastfile - elseif iscasepreserving then file = string.lower(file) end - if not breakpoints[line] then breakpoints[line] = {} end - breakpoints[line][file] = true -end - -local function remove_breakpoint(file, line) - if file == '-' and lastfile then file = lastfile - elseif file == '*' and line == 0 then breakpoints = {} - elseif iscasepreserving then file = string.lower(file) end - if breakpoints[line] then breakpoints[line][file] = nil end -end - -local function has_breakpoint(file, line) - return breakpoints[line] - and breakpoints[line][iscasepreserving and string.lower(file) or file] -end - -local function restore_vars(vars) - if type(vars) ~= 'table' then return end - - -- locals need to be processed in the reverse order, starting from - -- the inner block out, to make sure that the localized variables - -- are correctly updated with only the closest variable with - -- the same name being changed - -- first loop find how many local variables there is, while - -- the second loop processes them from i to 1 - local i = 1 - while true do - local name = debug.getlocal(3, i) - if not name then break end - i = i + 1 - end - i = i - 1 - local written_vars = {} - while i > 0 do - local name = debug.getlocal(3, i) - if not written_vars[name] then - if string.sub(name, 1, 1) ~= '(' then - debug.setlocal(3, i, rawget(vars, name)) - end - written_vars[name] = true - end - i = i - 1 - end - - i = 1 - local func = debug.getinfo(3, "f").func - while true do - local name = debug.getupvalue(func, i) - if not name then break end - if not written_vars[name] then - if string.sub(name, 1, 1) ~= '(' then - debug.setupvalue(func, i, rawget(vars, name)) - end - written_vars[name] = true - end - i = i + 1 - end -end - -local function capture_vars(level, thread) - level = (level or 0)+2 -- add two levels for this and debug calls - local func = (thread and debug.getinfo(thread, level, "f") or debug.getinfo(level, "f") or {}).func - if not func then return {} end - - local vars = {['...'] = {}} - local i = 1 - while true do - local name, value = debug.getupvalue(func, i) - if not name then break end - if string.sub(name, 1, 1) ~= '(' then vars[name] = value end - i = i + 1 - end - i = 1 - while true do - local name, value - if thread then - name, value = debug.getlocal(thread, level, i) - else - name, value = debug.getlocal(level, i) - end - if not name then break end - if string.sub(name, 1, 1) ~= '(' then vars[name] = value end - i = i + 1 - end - -- get varargs (these use negative indices) - i = 1 - while true do - local name, value - if thread then - name, value = debug.getlocal(thread, level, -i) - else - name, value = debug.getlocal(level, -i) - end - -- `not name` should be enough, but LuaJIT 2.0.0 incorrectly reports `(*temporary)` names here - if not name or name ~= "(*vararg)" then break end - vars['...'][i] = value - i = i + 1 - end - -- returned 'vars' table plays a dual role: (1) it captures local values - -- and upvalues to be restored later (in case they are modified in "eval"), - -- and (2) it provides an environment for evaluated chunks. - -- getfenv(func) is needed to provide proper environment for functions, - -- including access to globals, but this causes vars[name] to fail in - -- restore_vars on local variables or upvalues with `nil` values when - -- 'strict' is in effect. To avoid this `rawget` is used in restore_vars. - setmetatable(vars, { __index = getfenv(func), __newindex = getfenv(func) }) - return vars -end - -local function stack_depth(start_depth) - for i = start_depth, 0, -1 do - if debug.getinfo(i, "l") then return i+1 end - end - return start_depth -end - -local function is_safe(stack_level) - -- the stack grows up: 0 is getinfo, 1 is is_safe, 2 is debug_hook, 3 is user function - if stack_level == 3 then return true end - for i = 3, stack_level do - -- return if it is not safe to abort - local info = debug.getinfo(i, "S") - if not info then return true end - if info.what == "C" then return false end - end - return true -end - -local function in_debugger() - local this = debug.getinfo(1, "S").source - -- only need to check few frames as mobdebug frames should be close - for i = 3, 7 do - local info = debug.getinfo(i, "S") - if not info then return false end - if info.source == this then return true end - end - return false -end - -local function is_pending(peer) - -- if there is something already in the buffer, skip check - if not buf and checkcount >= mobdebug.checkcount then - peer:settimeout(0) -- non-blocking - buf = peer:receive(1) - peer:settimeout() -- back to blocking - checkcount = 0 - end - return buf -end - -local function readnext(peer, num) - peer:settimeout(0) -- non-blocking - local res, err, partial = peer:receive(num) - peer:settimeout() -- back to blocking - return res or partial or '', err -end - -local function handle_breakpoint(peer) - -- check if the buffer has the beginning of SETB/DELB command; - -- this is to avoid reading the entire line for commands that - -- don't need to be handled here. - if not buf or not (buf:sub(1,1) == 'S' or buf:sub(1,1) == 'D') then return end - - -- check second character to avoid reading STEP or other S* and D* commands - if #buf == 1 then buf = buf .. readnext(peer, 1) end - if buf:sub(2,2) ~= 'E' then return end - - -- need to read few more characters - buf = buf .. readnext(peer, 5-#buf) - if buf ~= 'SETB ' and buf ~= 'DELB ' then return end - - local res, _, partial = peer:receive() -- get the rest of the line; blocking - if not res then - if partial then buf = buf .. partial end - return - end - - local _, _, cmd, file, line = (buf..res):find("^([A-Z]+)%s+(.-)%s+(%d+)%s*$") - if cmd == 'SETB' then set_breakpoint(file, tonumber(line)) - elseif cmd == 'DELB' then remove_breakpoint(file, tonumber(line)) - else - -- this looks like a breakpoint command, but something went wrong; - -- return here to let the "normal" processing to handle, - -- although this is likely to not go well. - return - end - - buf = nil -end - -local function normalize_path(file) - local n - repeat - file, n = file:gsub("/+%.?/+","/") -- remove all `//` and `/./` references - until n == 0 - -- collapse all up-dir references: this will clobber UNC prefix (\\?\) - -- and disk on Windows when there are too many up-dir references: `D:\foo\..\..\bar`; - -- handle the case of multiple up-dir references: `foo/bar/baz/../../../more`; - -- only remove one at a time as otherwise `../../` could be removed; - repeat - file, n = file:gsub("[^/]+/%.%./", "", 1) - until n == 0 - -- there may still be a leading up-dir reference left (as `/../` or `../`); remove it - return (file:gsub("^(/?)%.%./", "%1")) -end - -local function debug_hook(event, line) - -- (1) LuaJIT needs special treatment. Because debug_hook is set for - -- *all* coroutines, and not just the one being debugged as in regular Lua - -- (http://lua-users.org/lists/lua-l/2011-06/msg00513.html), - -- need to avoid debugging mobdebug's own code as LuaJIT doesn't - -- always correctly generate call/return hook events (there are more - -- calls than returns, which breaks stack depth calculation and - -- 'step' and 'step over' commands stop working; possibly because - -- 'tail return' events are not generated by LuaJIT). - -- the next line checks if the debugger is run under LuaJIT and if - -- one of debugger methods is present in the stack, it simply returns. - if jit then - -- when luajit is compiled with LUAJIT_ENABLE_LUA52COMPAT, - -- coroutine.running() returns non-nil for the main thread. - local coro, main = coroutine.running() - if not coro or main then coro = 'main' end - local disabled = coroutines[coro] == false - or coroutines[coro] == nil and coro ~= (coro_debugee or 'main') - if coro_debugee and disabled or not coro_debugee and (disabled or in_debugger()) - then return end - end - - -- (2) check if abort has been requested and it's safe to abort - if abort and is_safe(stack_level) then error(abort) end - - -- (3) also check if this debug hook has not been visited for any reason. - -- this check is needed to avoid stepping in too early - -- (for example, when coroutine.resume() is executed inside start()). - if not seen_hook and in_debugger() then return end - - if event == "call" then - stack_level = stack_level + 1 - elseif event == "return" or event == "tail return" then - stack_level = stack_level - 1 - elseif event == "line" then - if mobdebug.linemap then - local ok, mappedline = pcall(mobdebug.linemap, line, debug.getinfo(2, "S").source) - if ok then line = mappedline end - if not line then return end - end - - -- may need to fall through because of the following: - -- (1) step_into - -- (2) step_over and stack_level <= step_level (need stack_level) - -- (3) breakpoint; check for line first as it's known; then for file - -- (4) socket call (only do every Xth check) - -- (5) at least one watch is registered - if not ( - step_into or step_over or breakpoints[line] or watchescnt > 0 - or is_pending(server) - ) then checkcount = checkcount + 1; return end - - checkcount = mobdebug.checkcount -- force check on the next command - - -- this is needed to check if the stack got shorter or longer. - -- unfortunately counting call/return calls is not reliable. - -- the discrepancy may happen when "pcall(load, '')" call is made - -- or when "error()" is called in a function. - -- in either case there are more "call" than "return" events reported. - -- this validation is done for every "line" event, but should be "cheap" - -- as it checks for the stack to get shorter (or longer by one call). - -- start from one level higher just in case we need to grow the stack. - -- this may happen after coroutine.resume call to a function that doesn't - -- have any other instructions to execute. it triggers three returns: - -- "return, tail return, return", which needs to be accounted for. - stack_level = stack_depth(stack_level+1) - - local caller = debug.getinfo(2, "S") - - -- grab the filename and fix it if needed - local file = lastfile - if (lastsource ~= caller.source) then - file, lastsource = caller.source, caller.source - -- technically, users can supply names that may not use '@', - -- for example when they call loadstring('...', 'filename.lua'). - -- Unfortunately, there is no reliable/quick way to figure out - -- what is the filename and what is the source code. - -- If the name doesn't start with `@`, assume it's a file name if it's all on one line. - if find(file, "^@") or not find(file, "[\r\n]") then - file = gsub(gsub(file, "^@", ""), "\\", "/") - -- normalize paths that may include up-dir or same-dir references - -- if the path starts from the up-dir or reference, - -- prepend `basedir` to generate absolute path to keep breakpoints working. - -- ignore qualified relative path (`D:../`) and UNC paths (`\\?\`) - if find(file, "^%.%./") then file = basedir..file end - if find(file, "/%.%.?/") then file = normalize_path(file) end - -- need this conversion to be applied to relative and absolute - -- file names as you may write "require 'Foo'" to - -- load "foo.lua" (on a case insensitive file system) and breakpoints - -- set on foo.lua will not work if not converted to the same case. - if iscasepreserving then file = string.lower(file) end - if find(file, "^%./") then file = sub(file, 3) - else file = gsub(file, "^"..q(basedir), "") end - -- some file systems allow newlines in file names; remove these. - file = gsub(file, "\n", ' ') - else - file = mobdebug.line(file) - end - - -- set to true if we got here; this only needs to be done once per - -- session, so do it here to at least avoid setting it for every line. - seen_hook = true - lastfile = file - end - - if is_pending(server) then handle_breakpoint(server) end - - local vars, status, res - if (watchescnt > 0) then - vars = capture_vars(1) - for index, value in pairs(watches) do - setfenv(value, vars) - local ok, fired = pcall(value) - if ok and fired then - status, res = cororesume(coro_debugger, events.WATCH, vars, file, line, index) - break -- any one watch is enough; don't check multiple times - end - end - end - - -- need to get into the "regular" debug handler, but only if there was - -- no watch that was fired. If there was a watch, handle its result. - local getin = (status == nil) and - (step_into - -- when coroutine.running() return `nil` (main thread in Lua 5.1), - -- step_over will equal 'main', so need to check for that explicitly. - or (step_over and step_over == (coroutine.running() or 'main') and stack_level <= step_level) - or has_breakpoint(file, line) - or is_pending(server)) - - if getin then - vars = vars or capture_vars(1) - step_into = false - step_over = false - status, res = cororesume(coro_debugger, events.BREAK, vars, file, line) - end - - -- handle 'stack' command that provides stack() information to the debugger - while status and res == 'stack' do - -- resume with the stack trace and variables - if vars then restore_vars(vars) end -- restore vars so they are reflected in stack values - status, res = cororesume(coro_debugger, events.STACK, stack(3), file, line) - end - - -- need to recheck once more as resume after 'stack' command may - -- return something else (for example, 'exit'), which needs to be handled - if status and res and res ~= 'stack' then - if not abort and res == "exit" then mobdebug.onexit(1, true); return end - if not abort and res == "done" then mobdebug.done(); return end - abort = res - -- only abort if safe; if not, there is another (earlier) check inside - -- debug_hook, which will abort execution at the first safe opportunity - if is_safe(stack_level) then error(abort) end - elseif not status and res then - error(res, 2) -- report any other (internal) errors back to the application - end - - if vars then restore_vars(vars) end - - -- last command requested Step Over/Out; store the current thread - if step_over == true then step_over = coroutine.running() or 'main' end - end -end - -local function stringify_results(params, status, ...) - if not status then return status, ... end -- on error report as it - - params = params or {} - if params.nocode == nil then params.nocode = true end - if params.comment == nil then params.comment = 1 end - - local t = {...} - for i,v in pairs(t) do -- stringify each of the returned values - local ok, res = pcall(mobdebug.line, v, params) - t[i] = ok and res or ("%q"):format(res):gsub("\010","n"):gsub("\026","\\026") - end - -- stringify table with all returned values - -- this is done to allow each returned value to be used (serialized or not) - -- intependently and to preserve "original" comments - return pcall(mobdebug.dump, t, {sparse = false}) -end - -local function isrunning() - return coro_debugger and (corostatus(coro_debugger) == 'suspended' or corostatus(coro_debugger) == 'running') -end - --- this is a function that removes all hooks and closes the socket to --- report back to the controller that the debugging is done. --- the script that called `done` can still continue. -local function done() - if not (isrunning() and server) then return end - - if not jit then - for co, debugged in pairs(coroutines) do - if debugged then debug.sethook(co) end - end - end - - debug.sethook() - server:close() - - coro_debugger = nil -- to make sure isrunning() returns `false` - seen_hook = nil -- to make sure that the next start() call works - abort = nil -- to make sure that callback calls use proper "abort" value -end - -local function debugger_loop(sev, svars, sfile, sline) - local command - local app, osname - local eval_env = svars or {} - local function emptyWatch () return false end - local loaded = {} - for k in pairs(package.loaded) do loaded[k] = true end - - while true do - local line, err - local wx = rawget(genv, "wx") -- use rawread to make strict.lua happy - if (wx or mobdebug.yield) and server.settimeout then server:settimeout(mobdebug.yieldtimeout) end - while true do - line, err = server:receive() - if not line and err == "timeout" then - -- yield for wx GUI applications if possible to avoid "busyness" - app = app or (wx and wx.wxGetApp and wx.wxGetApp()) - if app then - local win = app:GetTopWindow() - local inloop = app:IsMainLoopRunning() - osname = osname or wx.wxPlatformInfo.Get():GetOperatingSystemFamilyName() - if win and not inloop then - -- process messages in a regular way - -- and exit as soon as the event loop is idle - if osname == 'Unix' then wx.wxTimer(app):Start(10, true) end - local exitLoop = function() - win:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_IDLE) - win:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_TIMER) - app:ExitMainLoop() - end - win:Connect(wx.wxEVT_IDLE, exitLoop) - win:Connect(wx.wxEVT_TIMER, exitLoop) - app:MainLoop() - end - elseif mobdebug.yield then mobdebug.yield() - end - elseif not line and err == "closed" then - error("Debugger connection closed", 0) - else - -- if there is something in the pending buffer, prepend it to the line - if buf then line = buf .. line; buf = nil end - break - end - end - if server.settimeout then server:settimeout() end -- back to blocking - command = string.sub(line, string.find(line, "^[A-Z]+")) - if command == "SETB" then - local _, _, _, file, line = string.find(line, "^([A-Z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - set_breakpoint(file, tonumber(line)) - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "DELB" then - local _, _, _, file, line = string.find(line, "^([A-Z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - remove_breakpoint(file, tonumber(line)) - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "EXEC" then - -- extract any optional parameters - local params = string.match(line, "--%s*(%b{})%s*$") - local _, _, chunk = string.find(line, "^[A-Z]+%s+(.+)$") - if chunk then - local func, res = mobdebug.loadstring(chunk) - local status - if func then - local pfunc = params and loadstring("return "..params) -- use internal function - params = pfunc and pfunc() - params = (type(params) == "table" and params or {}) - local stack = tonumber(params.stack) - -- if the requested stack frame is not the current one, then use a new capture - -- with a specific stack frame: `capture_vars(0, coro_debugee)` - local env = stack and coro_debugee and capture_vars(stack-1, coro_debugee) or eval_env - setfenv(func, env) - status, res = stringify_results(params, pcall(func, unpack(env['...'] or {}))) - end - if status then - if mobdebug.onscratch then mobdebug.onscratch(res) end - server:send("200 OK " .. tostring(#res) .. "\n") - server:send(res) - else - -- fix error if not set (for example, when loadstring is not present) - if not res then res = "Unknown error" end - server:send("401 Error in Expression " .. tostring(#res) .. "\n") - server:send(res) - end - else - server:send("400 Bad Request\n") - end - elseif command == "LOAD" then - local _, _, size, name = string.find(line, "^[A-Z]+%s+(%d+)%s+(%S.-)%s*$") - size = tonumber(size) - - if abort == nil then -- no LOAD/RELOAD allowed inside start() - if size > 0 then server:receive(size) end - if sfile and sline then - server:send("201 Started " .. sfile .. " " .. tostring(sline) .. "\n") - else - server:send("200 OK 0\n") - end - else - -- reset environment to allow required modules to load again - -- remove those packages that weren't loaded when debugger started - for k in pairs(package.loaded) do - if not loaded[k] then package.loaded[k] = nil end - end - - if size == 0 and name == '-' then -- RELOAD the current script being debugged - server:send("200 OK 0\n") - coroyield("load") - else - -- receiving 0 bytes blocks (at least in luasocket 2.0.2), so skip reading - local chunk = size == 0 and "" or server:receive(size) - if chunk then -- LOAD a new script for debugging - local func, res = mobdebug.loadstring(chunk, "@"..name) - if func then - server:send("200 OK 0\n") - debugee = func - coroyield("load") - else - server:send("401 Error in Expression " .. tostring(#res) .. "\n") - server:send(res) - end - else - server:send("400 Bad Request\n") - end - end - end - elseif command == "SETW" then - local _, _, exp = string.find(line, "^[A-Z]+%s+(.+)%s*$") - if exp then - local func, res = mobdebug.loadstring("return(" .. exp .. ")") - if func then - watchescnt = watchescnt + 1 - local newidx = #watches + 1 - watches[newidx] = func - server:send("200 OK " .. tostring(newidx) .. "\n") - else - server:send("401 Error in Expression " .. tostring(#res) .. "\n") - server:send(res) - end - else - server:send("400 Bad Request\n") - end - elseif command == "DELW" then - local _, _, index = string.find(line, "^[A-Z]+%s+(%d+)%s*$") - index = tonumber(index) - if index > 0 and index <= #watches then - watchescnt = watchescnt - (watches[index] ~= emptyWatch and 1 or 0) - watches[index] = emptyWatch - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "RUN" then - server:send("200 OK\n") - - local ev, vars, file, line, idx_watch = coroyield() - eval_env = vars - if ev == events.BREAK then - server:send("202 Paused " .. file .. " " .. tostring(line) .. "\n") - elseif ev == events.WATCH then - server:send("203 Paused " .. file .. " " .. tostring(line) .. " " .. tostring(idx_watch) .. "\n") - elseif ev == events.RESTART then - -- nothing to do - else - server:send("401 Error in Execution " .. tostring(#file) .. "\n") - server:send(file) - end - elseif command == "STEP" then - server:send("200 OK\n") - step_into = true - - local ev, vars, file, line, idx_watch = coroyield() - eval_env = vars - if ev == events.BREAK then - server:send("202 Paused " .. file .. " " .. tostring(line) .. "\n") - elseif ev == events.WATCH then - server:send("203 Paused " .. file .. " " .. tostring(line) .. " " .. tostring(idx_watch) .. "\n") - elseif ev == events.RESTART then - -- nothing to do - else - server:send("401 Error in Execution " .. tostring(#file) .. "\n") - server:send(file) - end - elseif command == "OVER" or command == "OUT" then - server:send("200 OK\n") - step_over = true - - -- OVER and OUT are very similar except for - -- the stack level value at which to stop - if command == "OUT" then step_level = stack_level - 1 - else step_level = stack_level end - - local ev, vars, file, line, idx_watch = coroyield() - eval_env = vars - if ev == events.BREAK then - server:send("202 Paused " .. file .. " " .. tostring(line) .. "\n") - elseif ev == events.WATCH then - server:send("203 Paused " .. file .. " " .. tostring(line) .. " " .. tostring(idx_watch) .. "\n") - elseif ev == events.RESTART then - -- nothing to do - else - server:send("401 Error in Execution " .. tostring(#file) .. "\n") - server:send(file) - end - elseif command == "BASEDIR" then - local _, _, dir = string.find(line, "^[A-Z]+%s+(.+)%s*$") - if dir then - basedir = iscasepreserving and string.lower(dir) or dir - -- reset cached source as it may change with basedir - lastsource = nil - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "SUSPEND" then - -- do nothing; it already fulfilled its role - elseif command == "DONE" then - coroyield("done") - return -- done with all the debugging - elseif command == "STACK" then - -- first check if we can execute the stack command - -- as it requires yielding back to debug_hook it cannot be executed - -- if we have not seen the hook yet as happens after start(). - -- in this case we simply return an empty result - local vars, ev = {} - if seen_hook then - ev, vars = coroyield("stack") - end - if ev and ev ~= events.STACK then - server:send("401 Error in Execution " .. tostring(#vars) .. "\n") - server:send(vars) - else - local params = string.match(line, "--%s*(%b{})%s*$") - local pfunc = params and loadstring("return "..params) -- use internal function - params = pfunc and pfunc() - params = (type(params) == "table" and params or {}) - if params.nocode == nil then params.nocode = true end - if params.sparse == nil then params.sparse = false end - -- take into account additional levels for the stack frames and data management - if tonumber(params.maxlevel) then params.maxlevel = tonumber(params.maxlevel)+4 end - - local ok, res = pcall(mobdebug.dump, vars, params) - if ok then - server:send("200 OK " .. tostring(res) .. "\n") - else - server:send("401 Error in Execution " .. tostring(#res) .. "\n") - server:send(res) - end - end - elseif command == "OUTPUT" then - local _, _, stream, mode = string.find(line, "^[A-Z]+%s+(%w+)%s+([dcr])%s*$") - if stream and mode and stream == "stdout" then - -- assign "print" in the global environment - local default = mode == 'd' - genv.print = default and iobase.print or corowrap(function() - -- wrapping into coroutine.wrap protects this function from - -- being stepped through in the debugger. - -- don't use vararg (...) as it adds a reference for its values, - -- which may affect how they are garbage collected - while true do - local tbl = {coroutine.yield()} - if mode == 'c' then iobase.print(unpack(tbl)) end - for n = 1, #tbl do - tbl[n] = select(2, pcall(mobdebug.line, tbl[n], {nocode = true, comment = false})) end - local file = table.concat(tbl, "\t").."\n" - server:send("204 Output " .. stream .. " " .. tostring(#file) .. "\n" .. file) - end - end) - if not default then genv.print() end -- "fake" print to start printing loop - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "EXIT" then - server:send("200 OK\n") - coroyield("exit") - else - server:send("400 Bad Request\n") - end - end -end - -local function output(stream, data) - if server then return server:send("204 Output "..stream.." "..tostring(#data).."\n"..data) end -end - -local function connect(controller_host, controller_port) - local sock, err = socket.tcp() - if not sock then return nil, err end - - if sock.settimeout then sock:settimeout(mobdebug.connecttimeout) end - local res, err = sock:connect(controller_host, tostring(controller_port)) - if sock.settimeout then sock:settimeout() end - - if not res then return nil, err end - return sock -end - -local lasthost, lastport - --- Starts a debug session by connecting to a controller -local function start(controller_host, controller_port) - -- only one debugging session can be run (as there is only one debug hook) - if isrunning() then return end - - lasthost = controller_host or lasthost - lastport = controller_port or lastport - - controller_host = lasthost or "localhost" - controller_port = lastport or mobdebug.port - - local err - server, err = mobdebug.connect(controller_host, controller_port) - if server then - -- correct stack depth which already has some calls on it - -- so it doesn't go into negative when those calls return - -- as this breaks subsequence checks in stack_depth(). - -- start from 16th frame, which is sufficiently large for this check. - stack_level = stack_depth(16) - - -- provide our own traceback function to report errors remotely - -- but only under Lua 5.1/LuaJIT as it's not called under Lua 5.2+ - -- (http://lua-users.org/lists/lua-l/2016-05/msg00297.html) - local function f() return function()end end - if f() ~= f() then -- Lua 5.1 or LuaJIT - local dtraceback = debug.traceback - debug.traceback = function (...) - if select('#', ...) >= 1 then - local thr, err, lvl = ... - if type(thr) ~= 'thread' then err, lvl = thr, err end - local trace = dtraceback(err, (lvl or 1)+1) - if genv.print == iobase.print then -- no remote redirect - return trace - else - genv.print(trace) -- report the error remotely - return -- don't report locally to avoid double reporting - end - end - -- direct call to debug.traceback: return the original. - -- debug.traceback(nil, level) doesn't work in Lua 5.1 - -- (http://lua-users.org/lists/lua-l/2011-06/msg00574.html), so - -- simply remove first frame from the stack trace - local tb = dtraceback("", 2) -- skip debugger frames - -- if the string is returned, then remove the first new line as it's not needed - return type(tb) == "string" and tb:gsub("^\n","") or tb - end - end - coro_debugger = corocreate(debugger_loop) - debug.sethook(debug_hook, HOOKMASK) - seen_hook = nil -- reset in case the last start() call was refused - step_into = true -- start with step command - return true - else - print(("Could not connect to %s:%s: %s") - :format(controller_host, controller_port, err or "unknown error")) - end -end - -local function controller(controller_host, controller_port, scratchpad) - -- only one debugging session can be run (as there is only one debug hook) - if isrunning() then return end - - lasthost = controller_host or lasthost - lastport = controller_port or lastport - - controller_host = lasthost or "localhost" - controller_port = lastport or mobdebug.port - - local exitonerror = not scratchpad - local err - server, err = mobdebug.connect(controller_host, controller_port) - if server then - local function report(trace, err) - local msg = err .. "\n" .. trace - server:send("401 Error in Execution " .. tostring(#msg) .. "\n") - server:send(msg) - return err - end - - seen_hook = true -- allow to accept all commands - coro_debugger = corocreate(debugger_loop) - - while true do - step_into = true -- start with step command - abort = false -- reset abort flag from the previous loop - if scratchpad then checkcount = mobdebug.checkcount end -- force suspend right away - - coro_debugee = corocreate(debugee) - debug.sethook(coro_debugee, debug_hook, HOOKMASK) - local status, err = cororesume(coro_debugee, unpack(arg or {})) - - -- was there an error or is the script done? - -- 'abort' state is allowed here; ignore it - if abort then - if tostring(abort) == 'exit' then break end - else - if status then -- no errors - if corostatus(coro_debugee) == "suspended" then - -- the script called `coroutine.yield` in the "main" thread - error("attempt to yield from the main thread", 3) - end - break -- normal execution is done - elseif err and not string.find(tostring(err), deferror) then - -- report the error back - -- err is not necessarily a string, so convert to string to report - report(debug.traceback(coro_debugee), tostring(err)) - if exitonerror then break end - -- check if the debugging is done (coro_debugger is nil) - if not coro_debugger then break end - -- resume once more to clear the response the debugger wants to send - -- need to use capture_vars(0) to capture only two (default) level, - -- as even though there is controller() call, because of the tail call, - -- the caller may not exist for it; - -- This is not entirely safe as the user may see the local - -- variable from console, but they will be reset anyway. - -- This functionality is used when scratchpad is paused to - -- gain access to remote console to modify global variables. - local status, err = cororesume(coro_debugger, events.RESTART, capture_vars(0)) - if not status or status and err == "exit" then break end - end - end - end - else - print(("Could not connect to %s:%s: %s") - :format(controller_host, controller_port, err or "unknown error")) - return false - end - return true -end - -local function scratchpad(controller_host, controller_port) - return controller(controller_host, controller_port, true) -end - -local function loop(controller_host, controller_port) - return controller(controller_host, controller_port, false) -end - -local function on() - if not (isrunning() and server) then return end - - -- main is set to true under Lua5.2 for the "main" chunk. - -- Lua5.1 returns co as `nil` in that case. - local co, main = coroutine.running() - if main then co = nil end - if co then - coroutines[co] = true - debug.sethook(co, debug_hook, HOOKMASK) - else - if jit then coroutines.main = true end - debug.sethook(debug_hook, HOOKMASK) - end -end - -local function off() - if not (isrunning() and server) then return end - - -- main is set to true under Lua5.2 for the "main" chunk. - -- Lua5.1 returns co as `nil` in that case. - local co, main = coroutine.running() - if main then co = nil end - - -- don't remove coroutine hook under LuaJIT as there is only one (global) hook - if co then - coroutines[co] = false - if not jit then debug.sethook(co) end - else - if jit then coroutines.main = false end - if not jit then debug.sethook() end - end - - -- check if there is any thread that is still being debugged under LuaJIT; - -- if not, turn the debugging off - if jit then - local remove = true - for _, debugged in pairs(coroutines) do - if debugged then remove = false; break end - end - if remove then debug.sethook() end - end -end - --- Handles server debugging commands -local function handle(params, client, options) - -- when `options.verbose` is not provided, use normal `print`; verbose output can be - -- disabled (`options.verbose == false`) or redirected (`options.verbose == function()...end`) - local verbose = not options or options.verbose ~= nil and options.verbose - local print = verbose and (type(verbose) == "function" and verbose or print) or function() end - local file, line, watch_idx - local _, _, command = string.find(params, "^([a-z]+)") - if command == "run" or command == "step" or command == "out" - or command == "over" or command == "exit" then - client:send(string.upper(command) .. "\n") - client:receive() -- this should consume the first '200 OK' response - while true do - local done = true - local breakpoint = client:receive() - if not breakpoint then - print("Program finished") - return nil, nil, false - end - local _, _, status = string.find(breakpoint, "^(%d+)") - if status == "200" then - -- don't need to do anything - elseif status == "202" then - _, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$") - if file and line then - print("Paused at file " .. file .. " line " .. line) - end - elseif status == "203" then - _, _, file, line, watch_idx = string.find(breakpoint, "^203 Paused%s+(.-)%s+(%d+)%s+(%d+)%s*$") - if file and line and watch_idx then - print("Paused at file " .. file .. " line " .. line .. " (watch expression " .. watch_idx .. ": [" .. watches[watch_idx] .. "])") - end - elseif status == "204" then - local _, _, stream, size = string.find(breakpoint, "^204 Output (%w+) (%d+)$") - if stream and size then - local size = tonumber(size) - local msg = size > 0 and client:receive(size) or "" - print(msg) - if outputs[stream] then outputs[stream](msg) end - -- this was just the output, so go back reading the response - done = false - end - elseif status == "401" then - local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)$") - if size then - local msg = client:receive(tonumber(size)) - print("Error in remote application: " .. msg) - return nil, nil, msg - end - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response '" .. breakpoint .. "'" - end - if done then break end - end - elseif command == "done" then - client:send(string.upper(command) .. "\n") - -- no response is expected - elseif command == "setb" or command == "asetb" then - _, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - -- if this is a file name, and not a file source - if not file:find('^".*"$') then - file = string.gsub(file, "\\", "/") -- convert slash - file = removebasedir(file, basedir) - end - client:send("SETB " .. file .. " " .. line .. "\n") - if command == "asetb" or client:receive() == "200 OK" then - set_breakpoint(file, line) - else - print("Error: breakpoint not inserted") - end - else - print("Invalid command") - end - elseif command == "setw" then - local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") - if exp then - client:send("SETW " .. exp .. "\n") - local answer = client:receive() - local _, _, watch_idx = string.find(answer, "^200 OK (%d+)%s*$") - if watch_idx then - watches[watch_idx] = exp - print("Inserted watch exp no. " .. watch_idx) - else - local _, _, size = string.find(answer, "^401 Error in Expression (%d+)$") - if size then - local err = client:receive(tonumber(size)):gsub(".-:%d+:%s*","") - print("Error: watch expression not set: " .. err) - else - print("Error: watch expression not set") - end - end - else - print("Invalid command") - end - elseif command == "delb" or command == "adelb" then - _, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - -- if this is a file name, and not a file source - if not file:find('^".*"$') then - file = string.gsub(file, "\\", "/") -- convert slash - file = removebasedir(file, basedir) - end - client:send("DELB " .. file .. " " .. line .. "\n") - if command == "adelb" or client:receive() == "200 OK" then - remove_breakpoint(file, line) - else - print("Error: breakpoint not removed") - end - else - print("Invalid command") - end - elseif command == "delallb" then - local file, line = "*", 0 - client:send("DELB " .. file .. " " .. tostring(line) .. "\n") - if client:receive() == "200 OK" then - remove_breakpoint(file, line) - else - print("Error: all breakpoints not removed") - end - elseif command == "delw" then - local _, _, index = string.find(params, "^[a-z]+%s+(%d+)%s*$") - if index then - client:send("DELW " .. index .. "\n") - if client:receive() == "200 OK" then - watches[index] = nil - else - print("Error: watch expression not removed") - end - else - print("Invalid command") - end - elseif command == "delallw" then - for index, exp in pairs(watches) do - client:send("DELW " .. index .. "\n") - if client:receive() == "200 OK" then - watches[index] = nil - else - print("Error: watch expression at index " .. index .. " [" .. exp .. "] not removed") - end - end - elseif command == "eval" or command == "exec" - or command == "load" or command == "loadstring" - or command == "reload" then - local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") - if exp or (command == "reload") then - if command == "eval" or command == "exec" then - exp = (exp:gsub("%-%-%[(=*)%[.-%]%1%]", "") -- remove comments - :gsub("%-%-.-\n", " ") -- remove line comments - :gsub("\n", " ")) -- convert new lines - if command == "eval" then exp = "return " .. exp end - client:send("EXEC " .. exp .. "\n") - elseif command == "reload" then - client:send("LOAD 0 -\n") - elseif command == "loadstring" then - local _, _, _, file, lines = string.find(exp, "^([\"'])(.-)%1%s(.+)") - if not file then - _, _, file, lines = string.find(exp, "^(%S+)%s(.+)") - end - client:send("LOAD " .. tostring(#lines) .. " " .. file .. "\n") - client:send(lines) - else - local file = io.open(exp, "r") - if not file and pcall(require, "winapi") then - -- if file is not open and winapi is there, try with a short path; - -- this may be needed for unicode paths on windows - winapi.set_encoding(winapi.CP_UTF8) - local shortp = winapi.short_path(exp) - file = shortp and io.open(shortp, "r") - end - if not file then return nil, nil, "Cannot open file " .. exp end - -- read the file and remove the shebang line as it causes a compilation error - local lines = file:read("*all"):gsub("^#!.-\n", "\n") - file:close() - - local file = string.gsub(exp, "\\", "/") -- convert slash - file = removebasedir(file, basedir) - client:send("LOAD " .. tostring(#lines) .. " " .. file .. "\n") - if #lines > 0 then client:send(lines) end - end - while true do - local params, err = client:receive() - if not params then - return nil, nil, "Debugger connection " .. (err or "error") - end - local done = true - local _, _, status, len = string.find(params, "^(%d+).-%s+(%d+)%s*$") - if status == "200" then - len = tonumber(len) - if len > 0 then - local status, res - local str = client:receive(len) - -- handle serialized table with results - local func, err = loadstring(str) - if func then - status, res = pcall(func) - if not status then err = res - elseif type(res) ~= "table" then - err = "received "..type(res).." instead of expected 'table'" - end - end - if err then - print("Error in processing results: " .. err) - return nil, nil, "Error in processing results: " .. err - end - print(unpack(res)) - return res[1], res - end - elseif status == "201" then - _, _, file, line = string.find(params, "^201 Started%s+(.-)%s+(%d+)%s*$") - elseif status == "202" or params == "200 OK" then - -- do nothing; this only happens when RE/LOAD command gets the response - -- that was for the original command that was aborted - elseif status == "204" then - local _, _, stream, size = string.find(params, "^204 Output (%w+) (%d+)$") - if stream and size then - local size = tonumber(size) - local msg = size > 0 and client:receive(size) or "" - print(msg) - if outputs[stream] then outputs[stream](msg) end - -- this was just the output, so go back reading the response - done = false - end - elseif status == "401" then - len = tonumber(len) - local res = client:receive(len) - print("Error in expression: " .. res) - return nil, nil, res - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response after EXEC/LOAD '" .. params .. "'" - end - if done then break end - end - else - print("Invalid command") - end - elseif command == "listb" then - for l, v in pairs(breakpoints) do - for f in pairs(v) do - print(f .. ": " .. l) - end - end - elseif command == "listw" then - for i, v in pairs(watches) do - print("Watch exp. " .. i .. ": " .. v) - end - elseif command == "suspend" then - client:send("SUSPEND\n") - elseif command == "stack" then - local opts = string.match(params, "^[a-z]+%s+(.+)$") - client:send("STACK" .. (opts and " "..opts or "") .."\n") - local resp = client:receive() - local _, _, status, res = string.find(resp, "^(%d+)%s+%w+%s+(.+)%s*$") - if status == "200" then - local func, err = loadstring(res) - if func == nil then - print("Error in stack information: " .. err) - return nil, nil, err - end - local ok, stack = pcall(func) - if not ok then - print("Error in stack information: " .. stack) - return nil, nil, stack - end - for _,frame in ipairs(stack) do - print(mobdebug.line(frame[1], {comment = false})) - end - return stack - elseif status == "401" then - local _, _, len = string.find(resp, "%s+(%d+)%s*$") - len = tonumber(len) - local res = len > 0 and client:receive(len) or "Invalid stack information." - print("Error in expression: " .. res) - return nil, nil, res - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response after STACK" - end - elseif command == "output" then - local _, _, stream, mode = string.find(params, "^[a-z]+%s+(%w+)%s+([dcr])%s*$") - if stream and mode then - client:send("OUTPUT "..stream.." "..mode.."\n") - local resp, err = client:receive() - if not resp then - print("Unknown error: "..err) - return nil, nil, "Debugger connection error: "..err - end - local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$") - if status == "200" then - print("Stream "..stream.." redirected") - outputs[stream] = type(options) == 'table' and options.handler or nil - -- the client knows when she is doing, so install the handler - elseif type(options) == 'table' and options.handler then - outputs[stream] = options.handler - else - print("Unknown error") - return nil, nil, "Debugger error: can't redirect "..stream - end - else - print("Invalid command") - end - elseif command == "basedir" then - local _, _, dir = string.find(params, "^[a-z]+%s+(.+)$") - if dir then - dir = string.gsub(dir, "\\", "/") -- convert slash - if not string.find(dir, "/$") then dir = dir .. "/" end - - local remdir = dir:match("\t(.+)") - if remdir then dir = dir:gsub("/?\t.+", "/") end - basedir = dir - - client:send("BASEDIR "..(remdir or dir).."\n") - local resp, err = client:receive() - if not resp then - print("Unknown error: "..err) - return nil, nil, "Debugger connection error: "..err - end - local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$") - if status == "200" then - print("New base directory is " .. basedir) - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response after BASEDIR" - end - else - print(basedir) - end - elseif command == "help" then - print("setb -- sets a breakpoint") - print("delb -- removes a breakpoint") - print("delallb -- removes all breakpoints") - print("setw -- adds a new watch expression") - print("delw -- removes the watch expression at index") - print("delallw -- removes all watch expressions") - print("run -- runs until next breakpoint") - print("step -- runs until next line, stepping into function calls") - print("over -- runs until next line, stepping over function calls") - print("out -- runs until line after returning from current function") - print("listb -- lists breakpoints") - print("listw -- lists watch expressions") - print("eval -- evaluates expression on the current context and returns its value") - print("exec -- executes statement on the current context") - print("load -- loads a local file for debugging") - print("reload -- restarts the current debugging session") - print("stack -- reports stack trace") - print("output stdout -- capture and redirect io stream (default|copy|redirect)") - print("basedir [] -- sets the base path of the remote application, or shows the current one") - print("done -- stops the debugger and continues application execution") - print("exit -- exits debugger and the application") - else - local _, _, spaces = string.find(params, "^(%s*)$") - if spaces then - return nil, nil, "Empty command" - else - print("Invalid command") - return nil, nil, "Invalid command" - end - end - return file, line -end - --- Starts debugging server -local function listen(host, port) - host = host or "*" - port = port or mobdebug.port - - local socket = require "socket" - - print("Lua Remote Debugger") - print("Run the program you wish to debug") - - local server = socket.bind(host, port) - local client = server:accept() - - client:send("STEP\n") - client:receive() - - local breakpoint = client:receive() - local _, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$") - if file and line then - print("Paused at file " .. file ) - print("Type 'help' for commands") - else - local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)%s*$") - if size then - print("Error in remote application: ") - print(client:receive(size)) - end - end - - while true do - io.write("> ") - local file, line, err = handle(io.read("*line"), client) - if not file and err == false then break end -- completed debugging - end - - client:close() -end - -local cocreate -local function coro() - if cocreate then return end -- only set once - cocreate = cocreate or coroutine.create - coroutine.create = function(f, ...) - return cocreate(function(...) - mobdebug.on() - return f(...) - end, ...) - end -end - -local moconew -local function moai() - if moconew then return end -- only set once - moconew = moconew or (MOAICoroutine and MOAICoroutine.new) - if not moconew then return end - MOAICoroutine.new = function(...) - local thread = moconew(...) - -- need to support both thread.run and getmetatable(thread).run, which - -- was used in earlier MOAI versions - local mt = thread.run and thread or getmetatable(thread) - local patched = mt.run - mt.run = function(self, f, ...) - return patched(self, function(...) - mobdebug.on() - return f(...) - end, ...) - end - return thread - end -end - --- make public functions available -mobdebug.setbreakpoint = set_breakpoint -mobdebug.removebreakpoint = remove_breakpoint -mobdebug.listen = listen -mobdebug.loop = loop -mobdebug.scratchpad = scratchpad -mobdebug.handle = handle -mobdebug.connect = connect -mobdebug.start = start -mobdebug.on = on -mobdebug.off = off -mobdebug.moai = moai -mobdebug.coro = coro -mobdebug.done = done -mobdebug.pause = function() step_into = true end -mobdebug.yield = nil -- callback -mobdebug.output = output -mobdebug.onexit = os and os.exit or done -mobdebug.onscratch = nil -- callback -mobdebug.basedir = function(b) if b then basedir = b end return basedir end - -return mobdebug diff --git a/build/premake/premake5/modules/android/LICENSE.txt b/build/premake/premake5/modules/android/LICENSE.txt deleted file mode 100644 index 8ed6e49604..0000000000 --- a/build/premake/premake5/modules/android/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013-2015 Manu Evans and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Premake nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/premake/premake5/modules/android/README.md b/build/premake/premake5/modules/android/README.md deleted file mode 100644 index 7332935931..0000000000 --- a/build/premake/premake5/modules/android/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Premake Extension to support Android NDK projects - -Supported features: - -* VisualStudio support through [vs-android](https://code.google.com/p/vs-android/) - -Todo: - -* gmake support \ No newline at end of file diff --git a/build/premake/premake5/modules/android/_manifest.lua b/build/premake/premake5/modules/android/_manifest.lua deleted file mode 100644 index 9ccf150890..0000000000 --- a/build/premake/premake5/modules/android/_manifest.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "_preload.lua", - "android.lua", - "vsandroid_vcxproj.lua", - "vsandroid_sln2005.lua", - "vsandroid_vstudio.lua", - "vsandroid_androidproj.lua", -} diff --git a/build/premake/premake5/modules/android/_preload.lua b/build/premake/premake5/modules/android/_preload.lua deleted file mode 100644 index 93d656c6d8..0000000000 --- a/build/premake/premake5/modules/android/_preload.lua +++ /dev/null @@ -1,104 +0,0 @@ --- --- Name: android/_preload.lua --- Purpose: Define the Android API's. --- Author: Manu Evans --- Copyright: (c) 2013-2015 Manu Evans and the Premake project --- - - local p = premake - local api = p.api - --- --- Register the Android extension --- - - api.addAllowed("system", p.ANDROID) - api.addAllowed("architecture", { "armv5", "armv7", "aarch64", "mips", "mips64", "arm" }) - api.addAllowed("vectorextensions", { "NEON", "MXU" }) - api.addAllowed("exceptionhandling", {"UnwindTables"}) - api.addAllowed("flags", { "Thumb" }) - api.addAllowed("kind", p.PACKAGING) - - - premake.action._list["vs2015"].valid_kinds = table.join(premake.action._list["vs2015"].valid_kinds, { p.PACKAGING }) - premake.action._list["vs2017"].valid_kinds = table.join(premake.action._list["vs2017"].valid_kinds, { p.PACKAGING }) - premake.action._list["vs2019"].valid_kinds = table.join(premake.action._list["vs2019"].valid_kinds, { p.PACKAGING }) - - local osoption = p.option.get("os") - if osoption ~= nil then - table.insert(osoption.allowed, { "android", "Android" }) - end - - -- add system tags for android. - os.systemTags[p.ANDROID] = { "android", "mobile" } - --- --- Register Android properties --- - - api.register { - name = "floatabi", - scope = "config", - kind = "string", - allowed = { - "soft", - "softfp", - "hard", - }, - } - - api.register { - name = "androidapilevel", - scope = "config", - kind = "integer", - } - - api.register { - name = "toolchainversion", - scope = "config", - kind = "string", - allowed = { - "4.6", -- NDK GCC versions - "4.8", - "4.9", - "3.4", -- NDK clang versions - "3.5", - "3.6", - "3.8", - "5.0", - }, - } - - api.register { - name = "stl", - scope = "config", - kind = "string", - allowed = { - "none", - "gabi++", - "stlport", - "gnu", - "libc++", - }, - } - - api.register { - name = "thumbmode", - scope = "config", - kind = "string", - allowed = { - "thumb", - "arm", - "disabled", - }, - } - - api.register { - name = "androidapplibname", - scope = "config", - kind = "string" - } - - return function(cfg) - return (cfg.system == p.ANDROID) - end diff --git a/build/premake/premake5/modules/android/android.lua b/build/premake/premake5/modules/android/android.lua deleted file mode 100644 index dfef1f6c99..0000000000 --- a/build/premake/premake5/modules/android/android.lua +++ /dev/null @@ -1,25 +0,0 @@ - --- --- Create an android namespace to isolate the additions --- -local p = premake - -if not p.modules.android then - require ("vstudio") - p.modules.android = {} - - if _ACTION < "vs2015" then - configuration { "Android" } - system "android" - toolset "gcc" - end - - -- TODO: configure Android debug environment... - - include("vsandroid_vcxproj.lua") - include("vsandroid_sln2005.lua") - include("vsandroid_vstudio.lua") - include("vsandroid_androidproj.lua") -end - -return p.modules.android diff --git a/build/premake/premake5/modules/android/tests/_tests.lua b/build/premake/premake5/modules/android/tests/_tests.lua deleted file mode 100644 index 63fb41ed2c..0000000000 --- a/build/premake/premake5/modules/android/tests/_tests.lua +++ /dev/null @@ -1,6 +0,0 @@ -require ("android") - -return { - "test_android_files.lua", - "test_android_project.lua", -} diff --git a/build/premake/premake5/modules/android/tests/test_android_files.lua b/build/premake/premake5/modules/android/tests/test_android_files.lua deleted file mode 100644 index 134170cd17..0000000000 --- a/build/premake/premake5/modules/android/tests/test_android_files.lua +++ /dev/null @@ -1,47 +0,0 @@ -local p = premake -local suite = test.declare("test_android_files") -local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2015") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - system "android" - vc2010.files(prj) - end - - --- --- Test filtering of source files into the correct categories. --- - - function suite.none_onJavaFile() - files { "hello.java" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.javaCompile_onJavaFile() - kind "Packaging" - files { "hello.java" } - prepare() - test.capture [[ - - - - ]] - end diff --git a/build/premake/premake5/modules/android/tests/test_android_project.lua b/build/premake/premake5/modules/android/tests/test_android_project.lua deleted file mode 100644 index 43ef82b096..0000000000 --- a/build/premake/premake5/modules/android/tests/test_android_project.lua +++ /dev/null @@ -1,150 +0,0 @@ - local p = premake - local suite = test.declare("test_android_project") - local vc2010 = p.vstudio.vc2010 - local android = p.modules.android - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2015") - system "android" - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.clCompile(cfg) - end - - local function prepareGlobals() - prj = test.getproject(wks, 1) - vc2010.globals(prj) - end - - function suite.minVisualStudioVersion_14() - prepareGlobals() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Android - MyProject - 14.0 - Android - 2.0]] - end - - function suite.minVisualStudioVersion_15() - p.action.set("vs2017") - prepareGlobals() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - Android - MyProject - 15.0 - Android - 3.0]] - end - - function suite.minVisualStudioVersion_16() - p.action.set("vs2019") - prepareGlobals() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Android - MyProject - 16.0 - Android - 3.0]] - end - - function suite.noOptions() - prepare() - test.capture [[ - - NotUsing - Disabled -]] - end - - function suite.rttiOff() - rtti "Off" - prepare() - test.capture [[ - - NotUsing - Disabled -]] - end - - function suite.rttiOn() - rtti "On" - prepare() - test.capture [[ - - NotUsing - Disabled - true -]] - end - - function suite.exceptionHandlingOff() - exceptionhandling "Off" - prepare() - test.capture [[ - - NotUsing - Disabled -]] - end - - function suite.exceptionHandlingOn() - exceptionhandling "On" - prepare() - test.capture [[ - - NotUsing - Disabled - Enabled -]] - end - - function suite.cppdialect_cpp11() - cppdialect "C++11" - prepare() - test.capture [[ - - NotUsing - Disabled - c++11 -]] - end - - function suite.cppdialect_cpp14() - cppdialect "C++14" - prepare() - test.capture [[ - - NotUsing - Disabled - c++1y -]] - end - - function suite.cppdialect_cpp17() - cppdialect "C++17" - prepare() - test.capture [[ - - NotUsing - Disabled - c++1z -]] - end diff --git a/build/premake/premake5/modules/android/vsandroid_androidproj.lua b/build/premake/premake5/modules/android/vsandroid_androidproj.lua deleted file mode 100644 index 9ea170f663..0000000000 --- a/build/premake/premake5/modules/android/vsandroid_androidproj.lua +++ /dev/null @@ -1,271 +0,0 @@ --- --- android/vsandroid_androidproj.lua --- vs-android integration for vstudio. --- Copyright (c) 2012-2015 Manu Evans and the Premake project --- - - local p = premake - - local android = p.modules.android - local vsandroid = p.modules.vsandroid - local vc2010 = p.vstudio.vc2010 - local vstudio = p.vstudio - local project = p.project - - --- --- Add android tools to vstudio actions. --- - - - premake.override(vstudio.vs2010, "generateProject", function(oldfn, prj) - if prj.kind == p.PACKAGING then - p.eol("\r\n") - p.indent(" ") - p.escaper(vstudio.vs2010.esc) - - if project.iscpp(prj) then - p.generate(prj, ".androidproj", vc2010.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vc2010.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".androidproj.user", function() p.outln(user) end) - end - end - else - oldfn(prj) - end - end) - - - premake.override(vstudio, "projectfile", function(oldfn, prj) - if prj.kind == p.PACKAGING then - return premake.filename(prj, ".androidproj") - else - return oldfn(prj) - end - end) - - - premake.override(vstudio, "tool", function(oldfn, prj) - if prj.kind == p.PACKAGING then - return "39E2626F-3545-4960-A6E8-258AD8476CE5" - else - return oldfn(prj) - end - end) - - - premake.override(vc2010.elements, "globals", function (oldfn, cfg) - local elements = oldfn(cfg) - - if cfg.kind == premake.PACKAGING then - -- Remove "IgnoreWarnCompileDuplicatedFilename". - local pos = table.indexof(elements, vc2010.ignoreWarnDuplicateFilename) - table.remove(elements, pos) - elements = table.join(elements, { - android.projectVersion - }) - end - - return elements - end) - - - function android.projectVersion(cfg) - _p(2, "%s", cfg.project.name) - _p(2, "14.0") - _p(2, "1.0") - end - - - premake.override(vc2010.elements, "configurationProperties", function(oldfn, cfg) - local elements = oldfn(cfg) - if cfg.kind == p.PACKAGING then - elements = { - android.androidAPILevel, - vc2010.useDebugLibraries, - } - end - return elements - end) - - - premake.override(vc2010.elements, "itemDefinitionGroup", function(oldfn, cfg) - local elements = oldfn(cfg) - if cfg.kind == p.PACKAGING then - elements = { - android.antPackage, - } - end - return elements - end) - - - premake.override(vc2010, "importDefaultProps", function(oldfn, prj) - if prj.kind == p.PACKAGING then - p.w('') - else - oldfn(prj) - end - end) - - - premake.override(vc2010, "importLanguageSettings", function(oldfn, prj) - if prj.kind == p.PACKAGING then - p.w('') - else - oldfn(prj) - end - end) - - - premake.override(vc2010, "propertySheets", function(oldfn, cfg) - if cfg.kind ~= p.PACKAGING then - oldfn(cfg) - end - end) - - - premake.override(vc2010.elements, "outputProperties", function(oldfn, cfg) - if cfg.kind == p.PACKAGING then - return { - android.outDir, - vc2010.intDir, - vc2010.targetName, - } - else - return oldfn(cfg) - end - end) - - - function android.outDir(cfg) - vc2010.element("OutDir", nil, "%s\\", cfg.buildtarget.directory) - end - - - premake.override(vc2010, "importLanguageTargets", function(oldfn, prj) - if prj.kind == p.PACKAGING then - p.w('') - else - oldfn(prj) - end - end) - - function android.link(cfg, file) - -- default the seperator to '/' as that is what is searched for - -- below. Otherwise the function will use target seperator which - -- could be '\\' and result in failure to create links. - local fname = path.translate(file.relpath, '/') - - -- Files that live outside of the project tree need to be "linked" - -- and provided with a project relative pseudo-path. Check for any - -- leading "../" sequences and, if found, remove them and mark this - -- path as external. - local link, count = fname:gsub("%.%.%/", "") - local external = (count > 0) or fname:find(':', 1, true) or (file.vpath and file.vpath ~= file.relpath) - - -- Try to provide a little bit of flexibility by allowing virtual - -- paths for external files. Would be great to support them for all - -- files but Visual Studio chokes if file is already in project area. - if external and file.vpath ~= file.relpath then - link = file.vpath - end - - if external then - vc2010.element("Link", nil, path.translate(link)) - end - end - - - vc2010.categories.AndroidManifest = { - name = "AndroidManifest", - priority = 99, - - emitFiles = function(prj, group) - vc2010.emitFiles(prj, group, "AndroidManifest", {vc2010.generatedFile, android.link, android.manifestSubType}) - end, - - emitFilter = function(prj, group) - vc2010.filterGroup(prj, group, "AndroidManifest") - end - } - - function android.manifestSubType(cfg, file) - vc2010.element("SubType", nil, "Designer") - end - - vc2010.categories.AntBuildXml = { - name = "AntBuildXml", - priority = 99, - - emitFiles = function(prj, group) - vc2010.emitFiles(prj, group, "AntBuildXml", {vc2010.generatedFile, android.link}) - end, - - emitFilter = function(prj, group) - vc2010.filterGroup(prj, group, "AntBuildXml") - end - } - - vc2010.categories.AntProjectPropertiesFile = { - name = "AntProjectPropertiesFile", - priority = 99, - - emitFiles = function(prj, group) - vc2010.emitFiles(prj, group, "AntProjectPropertiesFile", {vc2010.generatedFile, android.link}) - end, - - emitFilter = function(prj, group) - vc2010.filterGroup(prj, group, "AntProjectPropertiesFile") - end - } - - vc2010.categories.JavaCompile = { - name = "JavaCompile", - priority = 99, - - emitFiles = function(prj, group) - vc2010.emitFiles(prj, group, "JavaCompile", {vc2010.generatedFile, android.link}) - end, - - emitFilter = function(prj, group) - vc2010.filterGroup(prj, group, "JavaCompile") - end - } - - vc2010.categories.Content = { - name = "Content", - priority = 99, - - emitFiles = function(prj, group) - vc2010.emitFiles(prj, group, "Content", {vc2010.generatedFile, android.link}) - end, - - emitFilter = function(prj, group) - vc2010.filterGroup(prj, group, "Content") - end - } - - premake.override(vc2010, "categorizeFile", function(base, prj, file) - if prj.kind ~= p.PACKAGING then - return base(prj, file) - end - - local filename = path.getname(file.name):lower() - local extension = path.getextension(filename) - - if filename == "androidmanifest.xml" then - return vc2010.categories.AndroidManifest - elseif filename == "build.xml" then - return vc2010.categories.AntBuildXml - elseif filename == "project.properties" then - return vc2010.categories.AntProjectPropertiesFile - elseif extension == ".java" then - return vc2010.categories.JavaCompile - else - return vc2010.categories.Content - end - end) diff --git a/build/premake/premake5/modules/android/vsandroid_sln2005.lua b/build/premake/premake5/modules/android/vsandroid_sln2005.lua deleted file mode 100644 index c3463a73ca..0000000000 --- a/build/premake/premake5/modules/android/vsandroid_sln2005.lua +++ /dev/null @@ -1,36 +0,0 @@ --- --- android/vsandroid_sln2005.lua --- vs-android integration for vstudio. --- Copyright (c) 2012-2015 Manu Evans and the Premake project --- - - local p = premake - - local android = p.modules.android - local vsandroid = p.modules.vsandroid - local sln2005 = p.vstudio.sln2005 - - --- --- Add android tools to vstudio actions. --- - - - premake.override(sln2005.elements, "projectConfigurationPlatforms", function(oldfn, cfg, context) - local elements = oldfn(cfg, context) - - if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then - elements = table.join(elements, { - android.deployProject - }) - end - - return elements - end) - - - function android.deployProject(cfg, context) - if context.prjCfg.kind == p.PACKAGING and _ACTION >= "vs2015" then - p.w('{%s}.%s.Deploy.0 = %s|%s', context.prj.uuid, context.descriptor, context.platform, context.architecture) - end - end diff --git a/build/premake/premake5/modules/android/vsandroid_vcxproj.lua b/build/premake/premake5/modules/android/vsandroid_vcxproj.lua deleted file mode 100644 index 79485d0526..0000000000 --- a/build/premake/premake5/modules/android/vsandroid_vcxproj.lua +++ /dev/null @@ -1,642 +0,0 @@ --- --- android/vsandroid_vcxproj.lua --- vs-android integration for vstudio. --- Copyright (c) 2012-2015 Manu Evans and the Premake project --- - - local p = premake - - p.modules.vsandroid = { } - - local android = p.modules.android - local vsandroid = p.modules.vsandroid - local vc2010 = p.vstudio.vc2010 - local vstudio = p.vstudio - local project = p.project - local config = p.config - - --- --- Utility functions --- - local function setBoolOption(optionName, flag, value) - if flag ~= nil then - vc2010.element(optionName, nil, value) - end - end - --- --- Add android tools to vstudio actions. --- - - if vstudio.vs2010_architectures ~= nil then - if _ACTION >= "vs2015" then - vstudio.vs2010_architectures.arm = "ARM" - else - vstudio.vs2010_architectures.android = "Android" - end - end - --- --- Extend global properties --- - premake.override(vc2010.elements, "globals", function (oldfn, prj) - local elements = oldfn(prj) - - if prj.system == premake.ANDROID and prj.kind ~= premake.PACKAGING then - -- Remove "IgnoreWarnCompileDuplicatedFilename". - local pos = table.indexof(elements, vc2010.ignoreWarnDuplicateFilename) - table.remove(elements, pos) - elements = table.join(elements, { - android.androidApplicationType - }) - end - - return elements - end) - - premake.override(vc2010.elements, "globalsCondition", function (oldfn, prj, cfg) - local elements = oldfn(prj, cfg) - - if cfg.system == premake.ANDROID and cfg.system ~= prj.system and cfg.kind ~= premake.PACKAGING then - elements = table.join(elements, { - android.androidApplicationType - }) - end - - return elements - end) - - function android.androidApplicationType(cfg) - vc2010.element("Keyword", nil, "Android") - vc2010.element("RootNamespace", nil, "%s", cfg.project.name) - if _ACTION >= "vs2019" then - vc2010.element("MinimumVisualStudioVersion", nil, "16.0") - elseif _ACTION >= "vs2017" then - vc2010.element("MinimumVisualStudioVersion", nil, "15.0") - elseif _ACTION >= "vs2015" then - vc2010.element("MinimumVisualStudioVersion", nil, "14.0") - end - vc2010.element("ApplicationType", nil, "Android") - if _ACTION >= "vs2017" then - vc2010.element("ApplicationTypeRevision", nil, "3.0") - elseif _ACTION >= "vs2015" then - vc2010.element("ApplicationTypeRevision", nil, "2.0") - else - vc2010.element("ApplicationTypeRevision", nil, "1.0") - end - end - --- --- Extend configurationProperties. --- - - premake.override(vc2010.elements, "configurationProperties", function(oldfn, cfg) - local elements = oldfn(cfg) - - if cfg.kind ~= p.UTILITY and cfg.kind ~= p.PACKAGING and cfg.system == premake.ANDROID then - table.remove(elements, table.indexof(elements, vc2010.characterSet)) - table.remove(elements, table.indexof(elements, vc2010.wholeProgramOptimization)) - table.remove(elements, table.indexof(elements, vc2010.windowsSDKDesktopARMSupport)) - - elements = table.join(elements, { - android.androidAPILevel, - android.androidStlType, - }) - - if _ACTION >= "vs2015" then - elements = table.join(elements, { - android.thumbMode, - }) - end - end - return elements - end) - - function android.androidAPILevel(cfg) - if cfg.androidapilevel ~= nil then - vc2010.element("AndroidAPILevel", nil, "android-" .. cfg.androidapilevel) - end - end - - function android.androidStlType(cfg) - if cfg.stl ~= nil then - local stlType = { - ["none"] = "system", - ["gabi++"] = "gabi++", - ["stlport"] = "stlport", - ["gnu"] = "gnustl", - ["libc++"] = "c++", - } - - local postfix = iif(cfg.staticruntime == "On", "_static", "_shared") - local runtimeLib = iif(cfg.stl == "none", "system", stlType[cfg.stl] .. postfix) - - if _ACTION >= "vs2015" then - vc2010.element("UseOfStl", nil, runtimeLib) - else - vc2010.element("AndroidStlType", nil, runtimeLib) - end - end - end - - function android.thumbMode(cfg) - if cfg.thumbmode ~= nil then - local thumbMode = - { - thumb = "Thumb", - arm = "ARM", - disabled = "Disabled", - } - vc2010.element("ThumbMode", nil, thumbMode[cfg.thumbmode]) - end - end - - -- Note: this function is already patched in by vs2012... - premake.override(vc2010, "platformToolset", function(oldfn, cfg) - if cfg.system ~= premake.ANDROID then - return oldfn(cfg) - end - - if _ACTION >= "vs2015" then - local gcc_map = { - ["4.6"] = "GCC_4_6", - ["4.8"] = "GCC_4_8", - ["4.9"] = "GCC_4_9", - } - local clang_map = { - ["3.4"] = "Clang_3_4", - ["3.5"] = "Clang_3_5", - ["3.6"] = "Clang_3_6", - ["3.8"] = "Clang_3_8", - ["5.0"] = "Clang_5_0", - } - - if cfg.toolchainversion ~= nil then - local map = iif(cfg.toolset == "gcc", gcc_map, clang_map) - local ts = map[cfg.toolchainversion] - if ts == nil then - p.error('Invalid toolchainversion for the selected toolset (%s).', cfg.toolset or "clang") - end - - vc2010.element("PlatformToolset", nil, ts) - end - else - local archMap = { - arm = "armv5te", -- should arm5 be default? vs-android thinks so... - arm5 = "armv5te", - arm7 = "armv7-a", - mips = "mips", - x86 = "x86", - } - local arch = cfg.architecture or "arm" - - if (cfg.architecture ~= nil or cfg.toolchainversion ~= nil) and archMap[arch] ~= nil then - local defaultToolsetMap = { - arm = "arm-linux-androideabi-", - armv5 = "arm-linux-androideabi-", - armv7 = "arm-linux-androideabi-", - aarch64 = "aarch64-linux-android-", - mips = "mipsel-linux-android-", - mips64 = "mips64el-linux-android-", - x86 = "x86-", - x86_64 = "x86_64-", - } - local toolset = defaultToolsetMap[arch] - - if cfg.toolset == "clang" then - error("The clang toolset is not yet supported by vs-android", 2) - toolset = toolset .. "clang" - elseif cfg.toolset and cfg.toolset ~= "gcc" then - error("Toolset not supported by the android NDK: " .. cfg.toolset, 2) - end - - local version = cfg.toolchainversion or iif(cfg.toolset == "clang", "3.5", "4.9") - - vc2010.element("PlatformToolset", nil, toolset .. version) - vc2010.element("AndroidArch", nil, archMap[arch]) - end - end - end) - - --- --- Extend clCompile. --- - - premake.override(vc2010.elements, "clCompile", function(oldfn, cfg) - local elements = oldfn(cfg) - if cfg.system == premake.ANDROID then - elements = table.join(elements, { - android.debugInformation, - android.strictAliasing, - android.fpu, - android.pic, - android.shortEnums, - android.cStandard, - android.cppStandard, - }) - if _ACTION >= "vs2015" then - table.remove(elements, table.indexof(elements, vc2010.debugInformationFormat)) - - -- Android has C[pp]LanguageStandard instead. - table.remove(elements, table.indexof(elements, vc2010.languageStandard)) - -- Ignore multiProcessorCompilation for android projects, they use UseMultiToolTask instead. - table.remove(elements, table.indexof(elements, vc2010.multiProcessorCompilation)) - -- minimalRebuild also ends up in android projects somehow. - table.remove(elements, table.indexof(elements, vc2010.minimalRebuild)) - - -- VS has NEON support through EnableNeonCodegen. - table.replace(elements, vc2010.enableEnhancedInstructionSet, android.enableEnhancedInstructionSet) - -- precompiledHeaderFile support. - table.replace(elements, vc2010.precompiledHeaderFile, android.precompiledHeaderFile) - end - end - return elements - end) - - function android.precompiledHeaderFile(fileName, cfg) - -- Doesn't work for project-relative paths. - vc2010.element("PrecompiledHeaderFile", nil, "%s", path.getabsolute(path.rebase(fileName, cfg.basedir, cfg.location))) - end - - function android.debugInformation(cfg) - if cfg.flags.Symbols then - _p(3,'true') - end - end - - function android.strictAliasing(cfg) - if cfg.strictaliasing ~= nil then - vc2010.element("StrictAliasing", nil, iif(cfg.strictaliasing == "Off", "false", "true")) - end - end - - function android.fpu(cfg) - if cfg.fpu ~= nil then - _p(3,'true', iif(cfg.fpu == "Software", "true", "false")) - end - end - - function android.pic(cfg) - if cfg.pic ~= nil then - vc2010.element("PositionIndependentCode", nil, iif(cfg.pic == "On", "true", "false")) - end - end - - function android.verboseCompiler(cfg) - setBoolOption("Verbose", cfg.flags.VerboseCompiler, "true") - end - - function android.undefineAllPreprocessorDefinitions(cfg) - setBoolOption("UndefineAllPreprocessorDefinitions", cfg.flags.UndefineAllPreprocessorDefinitions, "true") - end - - function android.showIncludes(cfg) - setBoolOption("ShowIncludes", cfg.flags.ShowIncludes, "true") - end - - function android.dataLevelLinking(cfg) - setBoolOption("DataLevelLinking", cfg.flags.DataLevelLinking, "true") - end - - function android.shortEnums(cfg) - setBoolOption("UseShortEnums", cfg.flags.UseShortEnums, "true") - end - - function android.cStandard(cfg) - local c_langmap = { - ["C98"] = "c98", - ["C99"] = "c99", - ["C11"] = "c11", - ["gnu99"] = "gnu99", - ["gnu11"] = "gnu11", - } - if c_langmap[cfg.cdialect] ~= nil then - vc2010.element("CLanguageStandard", nil, c_langmap[cfg.cdialect]) - end - end - - function android.cppStandard(cfg) - local cpp_langmap = { - ["C++98"] = "c++98", - ["C++11"] = "c++11", - ["C++14"] = "c++1y", - ["C++17"] = "c++1z", - ["C++latest"] = "c++1z", - ["gnu++98"] = "gnu++98", - ["gnu++11"] = "gnu++11", - ["gnu++14"] = "gnu++1y", - ["gnu++17"] = "gnu++1z", - } - if cpp_langmap[cfg.cppdialect] ~= nil then - vc2010.element("CppLanguageStandard", nil, cpp_langmap[cfg.cppdialect]) - end - end - - p.override(vc2010, "additionalCompileOptions", function(oldfn, cfg, condition) - if cfg.system == p.ANDROID then - local opts = cfg.buildoptions - - if cfg.disablewarnings and #cfg.disablewarnings > 0 then - for _, warning in ipairs(cfg.disablewarnings) do - table.insert(opts, '-Wno-' .. warning) - end - end - - -- -fvisibility=<> - if cfg.visibility ~= nil then - table.insert(opts, p.tools.gcc.cxxflags.visibility[cfg.visibility]) - end - - if #opts > 0 then - opts = table.concat(opts, " ") - vc2010.element("AdditionalOptions", condition, '%s %%(AdditionalOptions)', opts) - end - else - oldfn(cfg, condition) - end - end) - - p.override(vc2010, "warningLevel", function(oldfn, cfg) - if _ACTION >= "vs2015" and cfg.system == p.ANDROID and cfg.warnings and cfg.warnings ~= "Off" then - vc2010.element("WarningLevel", nil, "EnableAllWarnings") - elseif (_ACTION >= "vs2015" and cfg.system == p.ANDROID and cfg.warnings) or not (_ACTION >= "vs2015" and cfg.system == p.ANDROID) then - oldfn(cfg) - end - end) - - premake.override(vc2010, "clCompilePreprocessorDefinitions", function(oldfn, cfg, condition) - if cfg.system == p.ANDROID then - vc2010.preprocessorDefinitions(cfg, cfg.defines, false, condition) - else - oldfn(cfg, condition) - end - end) - - premake.override(vc2010, "exceptionHandling", function(oldfn, cfg, condition) - if cfg.system == p.ANDROID then - -- Note: Android defaults to 'off' - local exceptions = { - On = "Enabled", - Off = "Disabled", - UnwindTables = "UnwindTables", - } - if _ACTION >= "vs2015" then - if exceptions[cfg.exceptionhandling] ~= nil then - vc2010.element("ExceptionHandling", condition, exceptions[cfg.exceptionhandling]) - end - else - if cfg.exceptionhandling == premake.ON then - vc2010.element("GccExceptionHandling", condition, "true") - end - end - else - oldfn(cfg, condition) - end - end) - - function android.enableEnhancedInstructionSet(cfg) - if cfg.vectorextensions == "NEON" then - vc2010.element("EnableNeonCodegen", nil, "true") - end - end - - premake.override(vc2010, "runtimeTypeInfo", function(oldfn, cfg, condition) - if cfg.system == premake.ANDROID then - -- Note: Android defaults to 'off' - if cfg.rtti == premake.ON then - vc2010.element("RuntimeTypeInfo", condition, "true") - end - else - oldfn(cfg, condition) - end - end) - - --- --- Extend Link. --- - - premake.override(vc2010, "generateDebugInformation", function(oldfn, cfg) - -- Note: Android specifies the debug info in the clCompile section - if cfg.system ~= premake.ANDROID then - oldfn(cfg) - end - end) - - --- --- Add android tools to vstudio actions. --- - - premake.override(vc2010.elements, "itemDefinitionGroup", function(oldfn, cfg) - local elements = oldfn(cfg) - if cfg.system == premake.ANDROID and _ACTION < "vs2015" then - elements = table.join(elements, { - android.antBuild, - }) - end - return elements - end) - - function android.antPackage(cfg) - p.push('') - if cfg.androidapplibname ~= nil then - vc2010.element("AndroidAppLibName", nil, cfg.androidapplibname) - else - vc2010.element("AndroidAppLibName", nil, "$(RootNamespace)") - end - p.pop('') - end - - function android.antBuild(cfg) - if cfg.kind == premake.STATICLIB or cfg.kind == premake.SHAREDLIB then - return - end - - _p(2,'') - _p(3,'%s', iif(premake.config.isDebugBuild(cfg), "Debug", "Release")) - _p(2,'') - end - - premake.override(vc2010, "additionalCompileOptions", function(oldfn, cfg, condition) - if cfg.system == premake.ANDROID then - vsandroid.additionalOptions(cfg, condition) - end - return oldfn(cfg, condition) - end) - - premake.override(vc2010.elements, "user", function(oldfn, cfg) - if cfg.system == p.ANDROID then - return {} - else - return oldfn(cfg) - end - end) - --- --- Add options unsupported by vs-android UI to . --- - function vsandroid.additionalOptions(cfg) - if _ACTION >= "vs2015" then - - else - local function alreadyHas(t, key) - for _, k in ipairs(t) do - if string.find(k, key) then - return true - end - end - return false - end - - if not cfg.architecture or string.startswith(cfg.architecture, "arm") then - -- we might want to define the arch to generate better code --- if not alreadyHas(cfg.buildoptions, "-march=") then --- if cfg.architecture == "armv6" then --- table.insert(cfg.buildoptions, "-march=armv6") --- elseif cfg.architecture == "armv7" then --- table.insert(cfg.buildoptions, "-march=armv7") --- end --- end - - -- ARM has a comprehensive set of floating point options - if cfg.fpu ~= "Software" and cfg.floatabi ~= "soft" then - - if cfg.architecture == "armv7" then - - -- armv7 always has VFP, may not have NEON - - if not alreadyHas(cfg.buildoptions, "-mfpu=") then - if cfg.vectorextensions == "NEON" then - table.insert(cfg.buildoptions, "-mfpu=neon") - elseif cfg.fpu == "Hardware" or cfg.floatabi == "softfp" or cfg.floatabi == "hard" then - table.insert(cfg.buildoptions, "-mfpu=vfpv3-d16") -- d16 is the lowest common denominator - end - end - - if not alreadyHas(cfg.buildoptions, "-mfloat-abi=") then - if cfg.floatabi == "hard" then - table.insert(cfg.buildoptions, "-mfloat-abi=hard") - else - -- Android should probably use softfp by default for compatibility - table.insert(cfg.buildoptions, "-mfloat-abi=softfp") - end - end - - else - - -- armv5/6 may not have VFP - - if not alreadyHas(cfg.buildoptions, "-mfpu=") then - if cfg.fpu == "Hardware" or cfg.floatabi == "softfp" or cfg.floatabi == "hard" then - table.insert(cfg.buildoptions, "-mfpu=vfp") - end - end - - if not alreadyHas(cfg.buildoptions, "-mfloat-abi=") then - if cfg.floatabi == "softfp" then - table.insert(cfg.buildoptions, "-mfloat-abi=softfp") - elseif cfg.floatabi == "hard" then - table.insert(cfg.buildoptions, "-mfloat-abi=hard") - end - end - - end - - elseif cfg.floatabi == "soft" then - - table.insert(cfg.buildoptions, "-mfloat-abi=soft") - - end - - if cfg.endian == "Little" then - table.insert(cfg.buildoptions, "-mlittle-endian") - elseif cfg.endian == "Big" then - table.insert(cfg.buildoptions, "-mbig-endian") - end - - elseif cfg.architecture == "mips" then - - -- TODO... - - if cfg.vectorextensions == "MXU" then - table.insert(cfg.buildoptions, "-mmxu") - end - - elseif cfg.architecture == "x86" then - - -- TODO... - - end - end - end - --- --- Disable subsystem. --- - - p.override(vc2010, "subSystem", function(oldfn, cfg) - if cfg.system ~= p.ANDROID then - return oldfn(cfg) - end - end) - --- --- Remove .lib and list in LibraryDependencies instead of AdditionalDependencies. --- - - p.override(vc2010, "additionalDependencies", function(oldfn, cfg, explicit) - if cfg.system == p.ANDROID then - local links = {} - - -- If we need sibling projects to be listed explicitly, grab them first - if explicit then - links = config.getlinks(cfg, "siblings", "fullpath") - end - - -- Then the system libraries, which come undecorated - local system = config.getlinks(cfg, "system", "name") - for i = 1, #system do - local link = system[i] - table.insert(links, link) - end - - -- TODO: When to use LibraryDependencies vs AdditionalDependencies - - if #links > 0 then - links = path.translate(table.concat(links, ";")) - vc2010.element("LibraryDependencies", nil, "%%(LibraryDependencies);%s", links) - end - else - return oldfn(cfg, explicit) - end - end) - -function android.useMultiToolTask(cfg) - -- Android equivalent of 'MultiProcessorCompilation' - if cfg.flags.MultiProcessorCompile then - vc2010.element("UseMultiToolTask", nil, "true") - end -end - -premake.override(vc2010.elements, "outputProperties", function(oldfn, cfg) - if cfg.system == p.ANDROID then - return table.join(oldfn(cfg), { - android.useMultiToolTask, - }) - else - return oldfn(cfg) - end -end) - --- --- Disable override of OutDir. This is breaking deployment. --- - - p.override(vc2010, "outDir", function(oldfn, cfg) - if cfg.system ~= p.ANDROID then - return oldfn(cfg) - end - end) diff --git a/build/premake/premake5/modules/android/vsandroid_vstudio.lua b/build/premake/premake5/modules/android/vsandroid_vstudio.lua deleted file mode 100644 index a79760f4d2..0000000000 --- a/build/premake/premake5/modules/android/vsandroid_vstudio.lua +++ /dev/null @@ -1,38 +0,0 @@ --- --- android/vsandroid_vstudio.lua --- vs-android integration for vstudio. --- Copyright (c) 2012-2015 Manu Evans and the Premake project --- - - local p = premake - - local android = p.modules.android - local vsandroid = p.modules.vsandroid - local vstudio = p.vstudio - --- --- Add android tools to vstudio actions. --- - - - premake.override(vstudio, "solutionPlatform", function (oldfn, cfg) - local platform = oldfn(cfg) - - -- Bypass that pesky Win32 hack - if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then - if cfg.platform == "x86" then - platform = "x86" - end - end - - return platform - end) - - - premake.override(vstudio, "archFromConfig", function (oldfn, cfg, win32) - -- Bypass that pesky Win32 hack by not passing win32 down - if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then - return oldfn(cfg) - end - return oldfn(cfg, win32) - end) diff --git a/build/premake/premake5/modules/codelite/README.md b/build/premake/premake5/modules/codelite/README.md deleted file mode 100644 index 757a91fd0f..0000000000 --- a/build/premake/premake5/modules/codelite/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Premake extension to support the [CodeLite](http://www.codelite.org/) IDE - -### Features ### - -* Support for C/C++ language projects - -### Usage ### - -Simply generate your project using the `codelite` action: -```bash -premake5 codelite -``` -and open the generated project file in CodeLite. diff --git a/build/premake/premake5/modules/codelite/_manifest.lua b/build/premake/premake5/modules/codelite/_manifest.lua deleted file mode 100644 index 02efd9024f..0000000000 --- a/build/premake/premake5/modules/codelite/_manifest.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "_preload.lua", - "codelite.lua", - "codelite_workspace.lua", - "codelite_project.lua", -} diff --git a/build/premake/premake5/modules/codelite/_preload.lua b/build/premake/premake5/modules/codelite/_preload.lua deleted file mode 100644 index c6b32f712a..0000000000 --- a/build/premake/premake5/modules/codelite/_preload.lua +++ /dev/null @@ -1,58 +0,0 @@ --- --- Name: codelite/_preload.lua --- Purpose: Define the CodeLite action. --- Author: Ryan Pusztai --- Modified by: Andrea Zanellato --- Andrew Gough --- Manu Evans --- Created: 2013/05/06 --- Copyright: (c) 2008-2015 Jason Perkins and the Premake project --- - - local p = premake - - newaction - { - -- Metadata for the command line and help system - - trigger = "codelite", - shortname = "CodeLite", - description = "Generate CodeLite project files", - toolset = "clang", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "SharedLib", "StaticLib", "Utility" }, - valid_languages = { "C", "C++" }, - valid_tools = { - cc = { "gcc", "clang", "msc" } - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - p.modules.codelite.generateWorkspace(wks) - end, - onProject = function(prj) - p.modules.codelite.generateProject(prj) - end, - - onCleanWorkspace = function(wks) - p.modules.codelite.cleanWorkspace(wks) - end, - onCleanProject = function(prj) - p.modules.codelite.cleanProject(prj) - end, - onCleanTarget = function(prj) - p.modules.codelite.cleanTarget(prj) - end, - } - - --- --- Decide when the full module should be loaded. --- - - return function(cfg) - return (_ACTION == "codelite") - end diff --git a/build/premake/premake5/modules/codelite/codelite.lua b/build/premake/premake5/modules/codelite/codelite.lua deleted file mode 100755 index c995773ce6..0000000000 --- a/build/premake/premake5/modules/codelite/codelite.lua +++ /dev/null @@ -1,86 +0,0 @@ --- --- Name: codelite/codelite.lua --- Purpose: Define the CodeLite action(s). --- Author: Ryan Pusztai --- Modified by: Andrea Zanellato --- Andrew Gough --- Manu Evans --- Jason Perkins --- Created: 2013/05/06 --- Copyright: (c) 2008-2020 Jason Perkins and the Premake project --- - - local p = premake - - p.modules.codelite = {} - p.modules.codelite._VERSION = p._VERSION - - local codelite = p.modules.codelite - local project = p.project - - - function codelite.cfgname(cfg) - local cfgname = cfg.buildcfg - if codelite.workspace.multiplePlatforms then - -- Codelite breaks if "|" is used here, see #1411 - cfgname = string.format("%s-%s", cfg.platform, cfg.buildcfg) - end - return cfgname - end - - -- Element text is not escaped the same as element attributes - function codelite.escElementText(value) - local result = value:gsub('&', '&') - result = result:gsub('<', '<') - result = result:gsub('>', '>') - return result - end - - function codelite.esc(value) - local result = value:gsub('&', '&') - result = result:gsub('<', '<') - result = result:gsub('>', '>') - result = result:gsub('"', '\\"') - return result - end - - function codelite.generateWorkspace(wks) - p.eol("\r\n") - p.indent(" ") - p.escaper(codelite.esc) - - p.generate(wks, ".workspace", codelite.workspace.generate) - end - - function codelite.generateProject(prj) - p.eol("\r\n") - p.indent(" ") - p.escaper(codelite.esc) - - if project.isc(prj) or project.iscpp(prj) then - p.generate(prj, ".project", codelite.project.generate) - end - end - - function codelite.cleanWorkspace(wks) - p.clean.file(wks, wks.name .. ".workspace") - p.clean.file(wks, wks.name .. "_wsp.mk") - p.clean.file(wks, wks.name .. ".tags") - p.clean.file(wks, ".clang") - end - - function codelite.cleanProject(prj) - p.clean.file(prj, prj.name .. ".project") - p.clean.file(prj, prj.name .. ".mk") - p.clean.file(prj, prj.name .. ".list") - p.clean.file(prj, prj.name .. ".out") - end - - function codelite.cleanTarget(prj) - -- TODO.. - end - - include("codelite_workspace.lua") - include("codelite_project.lua") - - return codelite diff --git a/build/premake/premake5/modules/codelite/codelite_project.lua b/build/premake/premake5/modules/codelite/codelite_project.lua deleted file mode 100755 index e305de8254..0000000000 --- a/build/premake/premake5/modules/codelite/codelite_project.lua +++ /dev/null @@ -1,480 +0,0 @@ --- --- Name: codelite/codelite_project.lua --- Purpose: Generate a CodeLite C/C++ project file. --- Author: Ryan Pusztai --- Modified by: Andrea Zanellato --- Manu Evans --- Tom van Dijck --- Created: 2013/05/06 --- Copyright: (c) 2008-2016 Jason Perkins and the Premake project --- - - local p = premake - local tree = p.tree - local project = p.project - local config = p.config - local codelite = p.modules.codelite - - codelite.project = {} - local m = codelite.project - - - function codelite.getLinks(cfg) - -- System libraries are undecorated, add the required extension - return config.getlinks(cfg, "system", "fullpath") - end - - function codelite.getSiblingLinks(cfg) - -- If we need sibling projects to be listed explicitly, add them on - return config.getlinks(cfg, "siblings", "fullpath") - end - - - m.elements = {} - - m.ctools = { - gcc = "gnu gcc", - clang = "clang", - msc = "Visual C++", - } - m.cxxtools = { - gcc = "gnu g++", - clang = "clang++", - msc = "Visual C++", - } - - function m.getcompilername(cfg) - local tool = _OPTIONS.cc or cfg.toolset or p.CLANG - - local toolset = p.tools[tool] - if not toolset then - error("Invalid toolset '" + (_OPTIONS.cc or cfg.toolset) + "'") - end - - if p.languages.isc(cfg.language) then - return m.ctools[tool] - elseif p.languages.iscpp(cfg.language) then - return m.cxxtools[tool] - end - end - - function m.getcompiler(cfg) - local toolset = p.tools[_OPTIONS.cc or cfg.toolset or p.CLANG] - if not toolset then - error("Invalid toolset '" + (_OPTIONS.cc or cfg.toolset) + "'") - end - return toolset - end - - local function configuration_iscustombuild(cfg) - - return cfg and (cfg.kind == p.MAKEFILE) and (#cfg.buildcommands > 0) - end - - local function configuration_isfilelist(cfg) - - return cfg and (cfg.buildaction == "None") and not configuration_iscustombuild(cfg) - end - - local function configuration_needresoptions(cfg) - - return cfg and config.findfile(cfg, ".rc") and not configuration_iscustombuild(cfg) - end - - - m.internalTypeMap = { - ConsoleApp = "Console", - WindowedApp = "Console", - Makefile = "", - SharedLib = "Library", - StaticLib = "Library" - } - - function m.header(prj) - _p('') - - local type = m.internalTypeMap[prj.kind] or "" - _x('', prj.name, type) - end - - function m.plugins(prj) --- _p(1, '') - -- - -- --- _p(1, '') - - _p(1, '') - end - - function m.description(prj) - _p(1, '') - - -- TODO: ... - end - - function m.files(prj) - local tr = project.getsourcetree(prj) - tree.traverse(tr, { - -- folders are handled at the internal nodes - onbranchenter = function(node, depth) - _p(depth, '', node.name) - end, - onbranchexit = function(node, depth) - _p(depth, '') - end, - -- source files are handled at the leaves - onleaf = function(node, depth) - local excludesFromBuild = {} - for cfg in project.eachconfig(prj) do - local cfgname = codelite.cfgname(cfg) - local fcfg = p.fileconfig.getconfig(node, cfg) - if not fcfg or fcfg.flags.ExcludeFromBuild then - table.insert(excludesFromBuild, cfgname) - end - end - - if #excludesFromBuild > 0 then - _p(depth, '', node.relpath, table.concat(excludesFromBuild, ';')) - else - _p(depth, '', node.relpath) - end - end, - }, true) - end - - function m.dependencies(prj) - - -- TODO: dependencies don't emit a line for each config if there aren't any... - --- _p(1, '') - - local dependencies = project.getdependencies(prj) - for cfg in project.eachconfig(prj) do - cfgname = codelite.cfgname(cfg) - if #dependencies > 0 then - _p(1, '', cfgname) - for _, dependency in ipairs(dependencies) do - _p(2, '', dependency.name) - end - _p(1, '') - else - _p(1, '', cfgname) - end - end - end - - - function m.global_compiler(prj) - _p(3, '') - _p(4, '') - _p(3, '') - end - - function m.global_linker(prj) - _p(3, '') - _p(4, '') - _p(3, '') - end - - function m.global_resourceCompiler(prj) - _p(3, '') - end - - m.elements.globalSettings = function(prj) - return { - m.global_compiler, - m.global_linker, - m.global_resourceCompiler, - } - end - - - function m.compiler(cfg) - if configuration_iscustombuild(cfg) or configuration_isfilelist(cfg) then - _p(3, '') - return - end - - local toolset = m.getcompiler(cfg) - local forceincludes = toolset.getforceincludes(cfg) - local cxxflags = table.concat(table.join(toolset.getcxxflags(cfg), forceincludes, cfg.buildoptions), ";") - local cflags = table.concat(table.join(toolset.getcflags(cfg), forceincludes, cfg.buildoptions), ";") - local asmflags = "" - local pch = "" - - _x(3, '', cxxflags, cflags, asmflags, pch) - - for _, includedir in ipairs(cfg.includedirs) do - _x(4, '', project.getrelative(cfg.project, includedir)) - end - for _, define in ipairs(cfg.defines) do - _p(4, '', p.esc(define):gsub(' ', '\\ ')) - end - _p(3, '') - end - - function m.linker(cfg) - if configuration_iscustombuild(cfg) or configuration_isfilelist(cfg) then - _p(3, '') - return - end - - local toolset = m.getcompiler(cfg) - local flags = table.join(toolset.getldflags(cfg), cfg.linkoptions, toolset.getlinks(cfg)) - - _x(3, '', table.concat(flags, ";")) - - for _, libdir in ipairs(cfg.libdirs) do - _p(4, '', project.getrelative(cfg.project, libdir)) - end - _p(3, '') - end - - function m.resourceCompiler(cfg) - if not configuration_needresoptions(cfg) then - _p(3, '') - return - end - - local toolset = m.getcompiler(cfg) - local defines = table.implode(toolset.getdefines(table.join(cfg.defines, cfg.resdefines)), "", ";", "") - local options = table.concat(cfg.resoptions, ";") - - _x(3, '', defines, options) - for _, includepath in ipairs(table.join(cfg.includedirs, cfg.resincludedirs)) do - _x(4, '', project.getrelative(cfg.project, includepath)) - end - _p(3, '') - end - - function m.general(cfg) - if configuration_isfilelist(cfg) then - _p(3, '') - return - end - - local prj = cfg.project - - local isExe = prj.kind == "WindowedApp" or prj.kind == "ConsoleApp" - local targetpath = project.getrelative(prj, cfg.buildtarget.directory) - local objdir = project.getrelative(prj, cfg.objdir) - local targetname = project.getrelative(prj, cfg.buildtarget.abspath) - local workingdir = cfg.debugdir or prj.location - local command = iif(isExe, path.getrelative(workingdir, cfg.buildtarget.abspath), "") - local cmdargs = iif(isExe, table.concat(cfg.debugargs, " "), "") -- TODO: should this be debugargs instead? - local useseparatedebugargs = "no" - local debugargs = "" - local workingdir = iif(isExe, project.getrelative(prj, cfg.debugdir), "") - local pauseexec = iif(prj.kind == "ConsoleApp", "yes", "no") - local isguiprogram = iif(prj.kind == "WindowedApp", "yes", "no") - local isenabled = iif(cfg.flags.ExcludeFromBuild, "no", "yes") - local ldPath = '' - - for _, libdir in ipairs(cfg.libdirs) do - ldPath = ldPath .. ":" .. project.getrelative(cfg.project, libdir) - end - - if ldPath == nil or ldPath == '' then - _x(3, '', - targetname, objdir, command, cmdargs, useseparatedebugargs, debugargs, workingdir, pauseexec, isguiprogram, isenabled) - else - ldPath = string.sub(ldPath, 2) - _x(3, '', - targetname, objdir, ldPath, command, cmdargs, useseparatedebugargs, debugargs, workingdir, pauseexec, isguiprogram, isenabled) - end - end - - function m.environment(cfg) - local envs = table.concat(cfg.debugenvs, "\n") - - _p(3, '') - _p(4, '', envs) - _p(3, '') - end - - function m.debugger(cfg) - - _p(3, '', iif(cfg.debugremotehost, "yes", "no"), cfg.debugremotehost or "", iif(cfg.debugport, tostring(cfg.debugport), ""), iif(cfg.debugextendedprotocol, "yes", "no")) - if #cfg.debugsearchpaths > 0 then - p.escaper(codelite.escElementText) - _p(4, '%s', table.concat(p.esc(project.getrelative(cfg.project, cfg.debugsearchpaths)), "\n")) - p.escaper(codelite.esc) - else - _p(4, '') - end - if #cfg.debugconnectcommands > 0 then - p.escaper(codelite.escElementText) - _p(4, '%s', table.concat(p.esc(cfg.debugconnectcommands), "\n")) - p.escaper(codelite.esc) - else - _p(4, '') - end - if #cfg.debugstartupcommands > 0 then - p.escaper(codelite.escElementText) - _p(4, '%s', table.concat(p.esc(cfg.debugstartupcommands), "\n")) - p.escaper(codelite.esc) - else - _p(4, '') - end - _p(3, '') - end - - function m.preBuild(cfg) - if #cfg.prebuildcommands > 0 then - _p(3, '') - local commands = os.translateCommandsAndPaths(cfg.prebuildcommands, cfg.project.basedir, cfg.project.location) - p.escaper(codelite.escElementText) - for _, command in ipairs(commands) do - _x(4, '%s', command) - end - p.escaper(codelite.esc) - _p(3, '') - end - end - - function m.postBuild(cfg) - if #cfg.postbuildcommands > 0 then - _p(3, '') - local commands = os.translateCommandsAndPaths(cfg.postbuildcommands, cfg.project.basedir, cfg.project.location) - p.escaper(codelite.escElementText) - for _, command in ipairs(commands) do - _x(4, '%s', command) - end - p.escaper(codelite.esc) - _p(3, '') - end - end - - function m.customBuild(cfg) - if not configuration_iscustombuild(cfg) then - _p(3, '') - return - end - - local build = table.implode(cfg.buildcommands,"","","") - local clean = table.implode(cfg.cleancommands,"","","") - local rebuild = table.implode(cfg.rebuildcommands,"","","") - - _p(3, '') - _x(4, '%s', build) - _x(4, '%s', clean) - _x(4, '%s', rebuild) - _p(4, '') - _p(4, '') - _p(4, '') - _p(4, '') - _p(4, '') - _p(3, '') - end - - function m.additionalRules(cfg) - if configuration_iscustombuild(cfg) then - _p(3, '') - return - end - - _p(3, '') - _p(4, '') - _p(4, '') - _p(3, '') - end - - function m.isCpp11(cfg) - return (cfg.cppdialect == 'gnu++11') or (cfg.cppdialect == 'C++11') or (cfg.cppdialect == 'gnu++0x') or (cfg.cppdialect == 'C++0x') - end - - function m.isCpp14(cfg) - return (cfg.cppdialect == 'gnu++14') or (cfg.cppdialect == 'C++14') or (cfg.cppdialect == 'gnu++1y') or (cfg.cppdialect == 'C++1y') - end - - function m.completion(cfg) - _p(3, '', - iif(m.isCpp11(cfg), "yes", "no"), - iif(m.isCpp14(cfg), "yes", "no") - ) - _p(4, '') - _p(4, '') - _p(4, '') -- TODO: we might want to set special code completion macros...? - _p(4, '') -- TODO: search paths for code completion? - _p(3, '') - end - - m.elements.settings = function(cfg) - return { - m.compiler, - m.linker, - m.resourceCompiler, - m.general, - m.environment, - m.debugger, - m.preBuild, - m.postBuild, - m.customBuild, - m.additionalRules, - m.completion, - } - end - - m.types = - { - ConsoleApp = "Executable", - Makefile = "", - SharedLib = "Dynamic Library", - StaticLib = "Static Library", - WindowedApp = "Executable", - Utility = "", - } - - m.debuggers = - { - Default = "GNU gdb debugger", - GDB = "GNU gdb debugger", - LLDB = "LLDB Debugger", - } - - function m.settings(prj) - _p(1, '', m.types[prj.kind] or "") - - _p(2, '') - p.callArray(m.elements.globalSettings, prj) - _p(2, '') - - for cfg in project.eachconfig(prj) do - - local cfgname = codelite.cfgname(cfg) - local compiler = m.getcompilername(cfg) - local debugger = m.debuggers[cfg.debugger] or m.debuggers.Default - local type = m.types[cfg.kind] - - _x(2, '', cfgname, compiler, debugger, type) - - p.callArray(m.elements.settings, cfg) - - _p(2, '') - end - - _p(1, '') - end - - - m.elements.project = function(prj) - return { - m.header, - m.plugins, - m.description, - m.files, - m.dependencies, - m.settings, - } - end - --- --- Project: Generate the CodeLite project file. --- - function m.generate(prj) - p.utf8() - - p.callArray(m.elements.project, prj) - - _p('') - end diff --git a/build/premake/premake5/modules/codelite/codelite_workspace.lua b/build/premake/premake5/modules/codelite/codelite_workspace.lua deleted file mode 100755 index 7ea326c94a..0000000000 --- a/build/premake/premake5/modules/codelite/codelite_workspace.lua +++ /dev/null @@ -1,103 +0,0 @@ --- --- Name: codelite/codelite_workspace.lua --- Purpose: Generate a CodeLite workspace. --- Author: Ryan Pusztai --- Modified by: Andrea Zanellato --- Manu Evans --- Created: 2013/05/06 --- Copyright: (c) 2008-2015 Jason Perkins and the Premake project --- - - local p = premake - local project = p.project - local workspace = p.workspace - local tree = p.tree - local codelite = p.modules.codelite - - codelite.workspace = {} - local m = codelite.workspace - --- --- Generate a CodeLite workspace --- - function m.generate(wks) - p.utf8() - - -- - -- Header - -- - p.w('') - - local tagsdb = "" --- local tagsdb = "./" .. wks.name .. ".tags" - p.push('', wks.name, tagsdb) - - -- - -- Project list - -- - local tr = workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - local prj = n.project - - -- Build a relative path from the workspace file to the project file - local prjpath = p.filename(prj, ".project") - prjpath = path.getrelative(prj.workspace.location, prjpath) - - if (prj.name == wks.startproject) then - p.w('', prj.name, prjpath) - else - p.w('', prj.name, prjpath) - end - end, - - onbranchenter = function(n) - p.push('', n.name) - end, - - onbranchexit = function(n) - p.pop('') - end, - }) - - -- - -- Configurations - -- - - -- count the number of platforms - local platformsPresent = {} - local numPlatforms = 0 - - for cfg in workspace.eachconfig(wks) do - local platform = cfg.platform - if platform and not platformsPresent[platform] then - numPlatforms = numPlatforms + 1 - platformsPresent[platform] = true - end - end - - if numPlatforms >= 2 then - codelite.workspace.multiplePlatforms = true - end - - -- for each workspace config - p.push('') - for cfg in workspace.eachconfig(wks) do - - local cfgname = codelite.cfgname(cfg) - p.push('', cfgname) - - local tr = workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - local prj = n.project - p.w('', prj.name, cfgname) - end - }) - p.pop('') - - end - p.pop('') - - p.pop('') - end diff --git a/build/premake/premake5/modules/codelite/tests/_tests.lua b/build/premake/premake5/modules/codelite/tests/_tests.lua deleted file mode 100644 index d94a0cd9f5..0000000000 --- a/build/premake/premake5/modules/codelite/tests/_tests.lua +++ /dev/null @@ -1,7 +0,0 @@ -require ("codelite") - -return { - "test_codelite_workspace.lua", - "test_codelite_project.lua", - "test_codelite_config.lua", -} diff --git a/build/premake/premake5/modules/codelite/tests/test_codelite_config.lua b/build/premake/premake5/modules/codelite/tests/test_codelite_config.lua deleted file mode 100644 index 7d1c37e58b..0000000000 --- a/build/premake/premake5/modules/codelite/tests/test_codelite_config.lua +++ /dev/null @@ -1,324 +0,0 @@ ---- --- codelite/tests/test_codelite_config.lua --- Automated test suite for CodeLite project generation. --- Copyright (c) 2015 Manu Evans and the Premake project ---- - - - local suite = test.declare("codelite_cproj_config") - local p = premake - local codelite = p.modules.codelite - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, cfg - - function suite.setup() - p.action.set("codelite") - p.escaper(codelite.esc) - p.indent(" ") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks,1) - cfg = test.getconfig(prj, "Debug") - end - - - function suite.OnProjectCfg_Compiler() - prepare() - codelite.project.compiler(cfg) - test.capture [[ - - - ]] - end - - function suite.OnProjectCfg_Flags() - optimize "Debug" - exceptionhandling "Off" - rtti "Off" - pic "On" - symbols "On" - language "C++" - cppdialect "C++11" - flags { "NoBufferSecurityCheck" } - forceincludes { "forced_include1.h", "forced_include2.h" } - buildoptions { "-opt1", "-opt2" } - prepare() - codelite.project.compiler(cfg) - test.capture [[ - - - ]] - end - - function suite.OnProjectCfg_Includes() - includedirs { "dir/", "dir2" } - prepare() - codelite.project.compiler(cfg) - test.capture [[ - - - - - ]] - end - - function suite.OnProjectCfg_Defines() - defines { "TEST", "DEF", "VAL=1", "ESCAPE=\"WITH SPACE\"" } - prepare() - codelite.project.compiler(cfg) - test.capture [[ - - - - - - - ]] - end - - function suite.OnProjectCfg_Linker() - prepare() - codelite.project.linker(cfg) - test.capture [[ - - - ]] - end - - function suite.OnProjectCfg_LibPath() - libdirs { "test/", "test2" } - prepare() - codelite.project.linker(cfg) - test.capture [[ - - - - - ]] - end - - function suite.OnProjectCfg_Libs() - links { "a", "b" } - prepare() - codelite.project.linker(cfg) - test.capture [[ - - - ]] - end - - -- TODO: test sibling lib project links - - - function suite.OnProjectCfg_ResCompiler() - prepare() - codelite.project.resourceCompiler(cfg) - test.capture [[ - - ]] - end - - function suite.OnProjectCfg_ResInclude() - files { "x.rc" } - resincludedirs { "dir/" } - prepare() - codelite.project.resourceCompiler(cfg) - test.capture [[ - - - - ]] - end - - function suite.OnProjectCfg_General() - system "Windows" - prepare() - codelite.project.general(cfg) - test.capture [[ - - ]] - end - - function suite.OnProjectCfg_Environment() - debugenvs { "ENV_ONE=1", "ENV_TWO=2" } - prepare() - codelite.project.environment(cfg) - test.capture( -' \n' .. -' \n' .. -' ' - ) - end - - function suite.OnProjectCfg_EnvironmentEscaping() - debugenvs { "\"ENV\"=<&>" } - prepare() - codelite.project.environment(cfg) - test.capture( -' \n' .. -' ]]>\n' .. -' ' - ) - end - - function suite.OnProjectCfg_Debugger() - prepare() - codelite.project.debugger(cfg) - test.capture [[ - - - - - - ]] - end - - function suite.OnProjectCfg_DebuggerOpts() - debugremotehost "localhost" - debugport(2345) - debugextendedprotocol(true) - debugsearchpaths { "search/", "path" } - debugconnectcommands { "connectcmd1", "cmd2" } - debugstartupcommands { "startcmd1", "cmd2" } - prepare() - codelite.project.debugger(cfg) - test.capture [[ - - search -path - connectcmd1 -cmd2 - startcmd1 -cmd2 - - ]] - end - - function suite.OnProjectCfg_DebuggerOptsEscaping() - debugremotehost "localhost" - debugport(2345) - debugextendedprotocol(true) - debugsearchpaths { "\"search\" && " } - debugconnectcommands { "\"connect\" && " } - debugstartupcommands { "\"start\" && " } - prepare() - codelite.project.debugger(cfg) - test.capture [[ - - "search" && <path> - "connect" && <cmd> - "start" && <cmd> - - ]] - end - - function suite.OnProjectCfg_PreBuild() - prebuildcommands { "cmd0", "cmd1" } - prepare() - codelite.project.preBuild(prj) - test.capture [[ - - cmd0 - cmd1 - - ]] - end - - function suite.OnProjectCfg_PreBuild_Escaped() - prebuildcommands { - "touch \"./build/copyright\" && echo OK", - "cat \"./lib/copyright\" >> \"./build/copyright\"" - } - prepare() - codelite.project.preBuild(prj) - test.capture [[ - - touch "./build/copyright" && echo OK - cat "./lib/copyright" >> "./build/copyright" - - ]] - end - - function suite.OnProjectCfg_PostBuild() - postbuildcommands { "cmd0", "cmd1" } - prepare() - codelite.project.postBuild(prj) - test.capture [[ - - cmd0 - cmd1 - - ]] - end - - function suite.OnProjectCfg_PostBuild_Escaped() - postbuildcommands { - "touch \"./build/copyright\" && echo OK", - "cat \"./lib/copyright\" >> \"./build/copyright\"" - } - prepare() - codelite.project.postBuild(prj) - test.capture [[ - - touch "./build/copyright" && echo OK - cat "./lib/copyright" >> "./build/copyright" - - ]] - end - - -- TODO: test custom build - - - function suite.OnProjectCfg_AdditionalRules() - prepare() - codelite.project.additionalRules(prj) - test.capture [[ - - - - - ]] - end - - function suite.OnProjectCfg_Completion() - language "C++" - cppdialect "C++11" - prepare() - codelite.project.completion(prj) - test.capture [[ - - - - - - - ]] - end - - function suite.OnProjectCfg_UnsignedCharOn() - unsignedchar "On" - prepare() - codelite.project.compiler(cfg) - test.capture [[ - - - ]] - end - - - function suite.OnProjectCfg_UnsignedCharOff() - unsignedchar "Off" - prepare() - codelite.project.compiler(cfg) - test.capture [[ - - - ]] - end diff --git a/build/premake/premake5/modules/codelite/tests/test_codelite_project.lua b/build/premake/premake5/modules/codelite/tests/test_codelite_project.lua deleted file mode 100644 index 7dcf6848b9..0000000000 --- a/build/premake/premake5/modules/codelite/tests/test_codelite_project.lua +++ /dev/null @@ -1,102 +0,0 @@ ---- --- codelite/tests/test_codelite_project.lua --- Automated test suite for CodeLite project generation. --- Copyright (c) 2015 Manu Evans and the Premake project ---- - - - local suite = test.declare("codelite_cproj") - local p = premake - local codelite = p.modules.codelite - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj - - function suite.setup() - p.action.set("codelite") - p.escaper(codelite.esc) - p.indent(" ") - wks = test.createWorkspace() - end - - local function prepare() - wks = p.oven.bakeWorkspace(wks) - prj = test.getproject(wks, 1) - end - - - function suite.OnProject_Header() - prepare() - codelite.project.header(prj) - test.capture [[ - - - ]] - end - function suite.OnProject_Header_Windowed() - kind "WindowedApp" - prepare() - codelite.project.header(prj) - test.capture [[ - - - ]] - end - function suite.OnProject_Header_Shared() - kind "SharedLib" - prepare() - codelite.project.header(prj) - test.capture [[ - - - ]] - end - - function suite.OnProject_Plugins() - prepare() - codelite.project.plugins(prj) - test.capture [[ - - ]] - end - - function suite.OnProject_Description() - prepare() - codelite.project.description(prj) - test.capture [[ - - ]] - end - - function suite.OnProject_Dependencies() - prepare() - codelite.project.dependencies(prj) - test.capture [[ - - - ]] - end - - -- TODO: dependencies with actual dependencies... - - - -- GlobalSettings is currently constants, so we'll just test it here - function suite.OnProject_Settings() - prepare() - codelite.project.settings(prj) - test.capture [[ - - - - - - - - - - - ]] - end diff --git a/build/premake/premake5/modules/codelite/tests/test_codelite_workspace.lua b/build/premake/premake5/modules/codelite/tests/test_codelite_workspace.lua deleted file mode 100644 index e3a4c7368f..0000000000 --- a/build/premake/premake5/modules/codelite/tests/test_codelite_workspace.lua +++ /dev/null @@ -1,224 +0,0 @@ ---- --- codelite/tests/test_codelite_workspace.lua --- Validate generation for CodeLite workspaces. --- Author Manu Evans --- Copyright (c) 2015 Manu Evans and the Premake project ---- - - local suite = test.declare("codelite_workspace") - local p = premake - local codelite = p.modules.codelite - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("codelite") - p.escaper(codelite.esc) - p.indent(" ") - wks = test.createWorkspace() - end - - local function prepare() - wks = test.getWorkspace(wks) - codelite.workspace.generate(wks) - end - - --- --- Check the basic structure of a workspace. --- - - function suite.onEmptyWorkspace() - wks.projects = {} - prepare() - test.capture [[ - - - - - - - - - - ]] - end - - function suite.onDefaultWorkspace() - prepare() - test.capture [[ - - - - - - - - - - - - - ]] - end - - function suite.onMultipleProjects() - test.createproject(wks) - prepare() - test.capture [[ - - - - - - - - - - - - - - - - ]] - end - - --- --- Projects should include relative path from workspace. --- - - function suite.onNestedProjectPath() - location "MyProject" - prepare() - test.capture([[ - - - - - - - - - - - - - ]]) - end - - function suite.onExternalProjectPath() - location "../MyProject" - prepare() - test.capture([[ - - - - - - - - - - - - - ]]) - end - - - function suite.onActiveProject() - workspace("MyWorkspace") - startproject "MyProject" - prepare() - test.capture([[ - - - - - - - - - - - - - ]]) - end - - - function suite.onGroupedProjects() - wks.projects = {} - project "MyGrouplessProject" - group "MyGroup" - project "MyGroupedProject" - group "My/Nested/Group" - project "MyNestedGroupedProject" - prepare() - test.capture([[ - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]) - end - ---- --- Test handling of platforms ---- - - function suite.onPlatforms() - workspace "MyWorkspace" - platforms { "x86_64", "x86" } - - prepare() - test.capture [[ - - - - - - - - - - - - - - - - - - - ]] - end diff --git a/build/premake/premake5/modules/d/LICENSE.txt b/build/premake/premake5/modules/d/LICENSE.txt deleted file mode 100644 index 5c218d40b5..0000000000 --- a/build/premake/premake5/modules/d/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Premake nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/premake/premake5/modules/d/README.md b/build/premake/premake5/modules/d/README.md deleted file mode 100644 index 12f64cb4e7..0000000000 --- a/build/premake/premake5/modules/d/README.md +++ /dev/null @@ -1,84 +0,0 @@ -Premake Extension to support the [D](http://dlang.org) language - -### Features ### - -* Support actions: gmake, vs20xx (VisualD) -* Support all compilers; DMD, LDC, GDC -* Support combined and separate compilation - -### Usage ### - -Simply add: -```lua -language "D" -``` -to your project definition and populate with .d files. -C and C++ projects that include .d files will also support some of the API below. Any API tagged with (D/C/C++) works in D and C/C++ projects. Any API tagged with (C/C++) only works for .d files in C/C++ projects. - -### APIs ### - -* [flags](https://github.com/premake/premake-dlang/wiki/flags) - * AllInstantiate - * CodeCoverage - * Color - * Documentation - * GenerateHeader - * GenerateJSON - * GenerateMap - * IgnorePragma - * LowMem - * Main - * PerformSyntaxCheckOnly - * Profile - * ProfileGC - * Quiet - * RetainPaths - * ShowCommandLine - * ShowDependencies - * ShowGC - * ShowTLS - * StackFrame - * StackStomp - * SymbolsLikeC - * UnitTest - * UseLDC - * Verbose -* boundscheck ("type") [Off, SafeOnly, On] -* compilationmodel ("model") [ Project, Package, File ] -* checkaction -* computetargets -* [debugconstants](https://github.com/premake/premake-dlang/wiki/debugconstants) -* [debuglevel](https://github.com/premake/premake-dlang/wiki/debuglevel) -* dependenciesfile ("filename") -* deprecatedfeatures ("feature") [ Error, Info, Allow ] -* [docdir](https://github.com/premake/premake-dlang/wiki/docdir) -* [docname](https://github.com/premake/premake-dlang/wiki/docname) -* [headerdir](https://github.com/premake/premake-dlang/wiki/headerdir) -* [headername](https://github.com/premake/premake-dlang/wiki/headername) -* importdirs { "paths" } -* [inlining](https://github.com/premake/premake-core/wiki/inlining) -* jsonfile ("filename") -* importdirs -* [optimize](https://github.com/premake/premake-core/wiki/optimize) -* preview -* revert -* runtime ("type") [ Debug, Release ] -* staticruntime ("state") [ on, off ] -* stringimportdirs { "paths" } -* transition -* [versionconstants](https://github.com/premake/premake-dlang/wiki/versionconstants) -* [versionlevel](https://github.com/premake/premake-dlang/wiki/versionlevel) - -### Example ### - -The contents of your premake5.lua file would be: - -```lua -solution "MySolution" - configurations { "release", "debug" } - - project "MyDProject" - kind "ConsoleApp" - language "D" - files { "src/main.d", "src/extra.d" } -``` diff --git a/build/premake/premake5/modules/d/_manifest.lua b/build/premake/premake5/modules/d/_manifest.lua deleted file mode 100644 index 51a4ca7640..0000000000 --- a/build/premake/premake5/modules/d/_manifest.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "_preload.lua", - "d.lua", - "actions/gmake.lua", - "actions/vcxproj.lua", - "actions/visuald.lua", - "tools/dmd.lua", - "tools/gdc.lua", - "tools/ldc.lua", -} diff --git a/build/premake/premake5/modules/d/_preload.lua b/build/premake/premake5/modules/d/_preload.lua deleted file mode 100644 index 44cf11ce6b..0000000000 --- a/build/premake/premake5/modules/d/_preload.lua +++ /dev/null @@ -1,267 +0,0 @@ --- --- Name: d/_preload.lua --- Purpose: Define the D language API's. --- Author: Manu Evans --- Created: 2013/10/28 --- Copyright: (c) 2013-2015 Manu Evans and the Premake project --- - --- TODO: --- MonoDevelop/Xamarin Studio has 'workspaces', which correspond to collections --- of Premake workspaces. If premake supports multiple workspaces, we should --- write out a workspace file... - - local p = premake - local api = p.api - --- --- Register the D extension --- - - p.D = "D" - api.addAllowed("language", p.D) - - api.addAllowed("floatingpoint", "None") - api.addAllowed("flags", { - "CodeCoverage", - "Color", - "Documentation", - "GenerateHeader", - "GenerateJSON", - "GenerateMap", - "LowMem", - "Profile", - "Quiet", - "RetainPaths", - "SymbolsLikeC", - "UnitTest", - -- These are used by C++/D mixed $todo move them somewhere else? "flags2" "Dflags"? - -- [Code Generation Flags] - "UseLDC", - "ProfileGC", - "StackFrame", - "StackStomp", - "AllInstantiate", - "BetterC", - "Main", - "PerformSyntaxCheckOnly", - -- [Messages Flags] - "ShowCommandLine", - "Verbose", - "ShowTLS", - "ShowGC", - "IgnorePragma", - "ShowDependencies", - }) - - --- --- Register some D specific properties --- - - api.register { - name = "boundscheck", - scope = "config", - kind = "string", - allowed = { - "Default", - "Off", - "On", - "SafeOnly", - }, - } - - api.register { - name = "compilationmodel", - scope = "config", - kind = "string", - allowed = { - "Default", - "File", - "Package", -- TODO: this doesn't work with gmake!! - "Project", - }, - } - - api.register { - name = "checkaction", - scope = "config", - kind = "string", - allowed = { - "Default", - "D", - "C", - "Halt", - "Context", - }, - } - - api.register { - name = "computetargets", - scope = "config", - kind = "list:string", - } - --- api.register { --- name = "debugcode", --- scope = "config", --- kind = "string", --- } - - api.register { - name = "debugconstants", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "debuglevel", - scope = "config", - kind = "integer", - } - - api.register { - name = "dependenciesfile", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "deprecatedfeatures", - scope = "config", - kind = "string", - allowed = { - "Default", - "Allow", - "Warn", - "Error", - }, - } - - api.register { - name = "docdir", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "docname", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "headerdir", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "headername", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "jsonfile", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "importdirs", - scope = "config", - kind = "list:path", - tokens = true, - } - - api.register { - name = "preview", - scope = "config", - kind = "list:string", - allowed = { - "dip25", - "dip1000", - "dip1008", - "fieldwise", - "markdown", - "fixAliasThis", - "intpromote", - "dtorfields", - }, - } - - api.register { - name = "revert", - scope = "config", - kind = "list:string", - allowed = { - "dip25", - "import", - }, - } - - api.register { - name = "stringimportdirs", - scope = "config", - kind = "list:path", - tokens = true, - } - - api.register { - name = "transition", - scope = "config", - kind = "list:string", - allowed = { - "field", - "checkimports", - "complex", - "tls", - "vmarkdown", - }, - } - - api.register { - name = "versionconstants", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "versionlevel", - scope = "config", - kind = "integer", - } - --- --- Provide information for the help output --- - newoption - { - category = "compilers", - trigger = "dc", - value = "VALUE", - description = "Choose a D compiler", - allowed = { - { "dmd", "Digital Mars (dmd)" }, - { "gdc", "GNU GDC (gdc)" }, - { "ldc", "LLVM LDC (ldc2)" }, - } - } - - --- --- Decide when to load the full module --- - - return function (cfg) - return (cfg.language == p.D or cfg.language == "C" or cfg.language == "C++") - end diff --git a/build/premake/premake5/modules/d/actions/gmake.lua b/build/premake/premake5/modules/d/actions/gmake.lua deleted file mode 100644 index 75bebc0334..0000000000 --- a/build/premake/premake5/modules/d/actions/gmake.lua +++ /dev/null @@ -1,387 +0,0 @@ --- --- d/actions/gmake.lua --- Define the D makefile action(s). --- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project --- - - local p = premake - local m = p.modules.d - - m.make = {} - - local dmake = m.make - - require ("gmake") - - local make = p.make - local cpp = p.make.cpp - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - --- This check may be unnecessary as we only 'require' this file from d.lua --- IFF the action already exists, however this may help if this file is --- directly required, rather than d.lua itself. - local gmake = p.action.get( 'gmake' ) - if gmake == nil then - error( "Failed to locate prequisite action 'gmake'" ) - end - --- --- Patch the gmake action with the allowed tools... --- - gmake.valid_languages = table.join(gmake.valid_languages, { p.D } ) - gmake.valid_tools.dc = { "dmd", "gdc", "ldc" } - - function m.make.separateCompilation(prj) - local some = false - local all = true - for cfg in project.eachconfig(prj) do - if cfg.compilationmodel == "File" then - some = true - else - all = false - end - end - return iif(all, "all", iif(some, "some", "none")) - end - - --- --- Override the GMake action 'onProject' funtion to provide --- D knowledge... --- - p.override( gmake, "onProject", function(oldfn, prj) - p.escaper(make.esc) - if project.isd(prj) then - local makefile = make.getmakefilename(prj, true) - p.generate(prj, makefile, m.make.generate) - return - end - oldfn(prj) - end) - - p.override( make, "objdir", function(oldfn, cfg) - if cfg.project.language ~= "D" or cfg.compilationmodel == "File" then - oldfn(cfg) - end - end) - - p.override( make, "objDirRules", function(oldfn, prj) - if prj.language ~= "D" or m.make.separateCompilation(prj) ~= "none" then - oldfn(prj) - end - end) - - ---- --- Add namespace for element definition lists for p.callarray() ---- - - m.elements = {} - --- --- Generate a GNU make C++ project makefile, with support for the new platforms API. --- - - m.elements.makefile = function(prj) - return { - make.header, - make.phonyRules, - m.make.configs, - m.make.objects, -- TODO: This is basically identical to make.cppObjects(), and should ideally be merged/shared - make.shellType, - m.make.targetRules, - make.targetDirRules, - make.objDirRules, - make.cppCleanRules, -- D clean code is identical to C/C++ - make.preBuildRules, - make.preLinkRules, - m.make.dFileRules, - } - end - - function m.make.generate(prj) - p.callArray(m.elements.makefile, prj) - end - - - function m.make.buildRule(prj) - _p('$(TARGET): $(SOURCEFILES) $(LDDEPS)') - _p('\t@echo Building %s', prj.name) - _p('\t$(SILENT) $(BUILDCMD)') - _p('\t$(POSTBUILDCMDS)') - end - - function m.make.linkRule(prj) - _p('$(TARGET): $(OBJECTS) $(LDDEPS)') - _p('\t@echo Linking %s', prj.name) - _p('\t$(SILENT) $(LINKCMD)') - _p('\t$(POSTBUILDCMDS)') - end - - function m.make.targetRules(prj) - local separateCompilation = m.make.separateCompilation(prj) - if separateCompilation == "all" then - m.make.linkRule(prj) - elseif separateCompilation == "none" then - m.make.buildRule(prj) - else - for cfg in project.eachconfig(prj) do - _x('ifeq ($(config),%s)', cfg.shortname) - if cfg.compilationmodel == "File" then - m.make.linkRule(prj) - else - m.make.buildRule(prj) - end - _p('endif') - end - end - _p('') - end - - function m.make.dFileRules(prj) - local separateCompilation = m.make.separateCompilation(prj) - if separateCompilation ~= "none" then - make.cppFileRules(prj) - end - end - --- --- Override the 'standard' file rule to support D source files --- - - p.override(cpp, "standardFileRules", function(oldfn, prj, node) - -- D file - if path.isdfile(node.abspath) then - _p('\t$(SILENT) $(DC) $(ALL_DFLAGS) $(OUTPUTFLAG) -c $<') - else - oldfn(prj, node) - end - end) - --- --- Let make know it can compile D source files --- - - p.override(make, "fileType", function(oldfn, node) - if path.isdfile(node.abspath) then - return "objects" - else - return oldfn(node) - end - end) - - --- --- Write out the settings for a particular configuration. --- - - m.elements.makeconfig = function(cfg) - return { - m.make.dTools, - make.target, - m.make.target, - make.objdir, - m.make.versions, - m.make.debug, - m.make.imports, - m.make.stringImports, - m.make.dFlags, - make.libs, - make.ldDeps, - make.ldFlags, - m.make.linkCmd, - make.preBuildCmds, - make.preLinkCmds, - make.postBuildCmds, - m.make.allRules, - make.settings, - } - end - - function m.make.configs(prj) - for cfg in project.eachconfig(prj) do - -- identify the toolset used by this configurations (would be nicer if - -- this were computed and stored with the configuration up front) - - local toolset = p.tools[_OPTIONS.dc or cfg.toolset or "dmd"] - if not toolset then - error("Invalid toolset '" + (_OPTIONS.dc or cfg.toolset) + "'") - end - - _x('ifeq ($(config),%s)', cfg.shortname) - p.callArray(m.elements.makeconfig, cfg, toolset) - _p('endif') - _p('') - end - end - - function m.make.dTools(cfg, toolset) - local tool = toolset.gettoolname(cfg, "dc") - if tool then - _p(' DC = %s', tool) - end - end - - function m.make.target(cfg, toolset) - if cfg.compilationmodel == "File" then - _p(' OUTPUTFLAG = %s', toolset.gettarget('"$@"')) - end - end - - function m.make.versions(cfg, toolset) - _p(' VERSIONS +=%s', make.list(toolset.getversions(cfg.versionconstants, cfg.versionlevel))) - end - - function m.make.debug(cfg, toolset) - _p(' DEBUG +=%s', make.list(toolset.getdebug(cfg.debugconstants, cfg.debuglevel))) - end - - function m.make.imports(cfg, toolset) - local imports = p.esc(toolset.getimportdirs(cfg, cfg.importdirs)) - _p(' IMPORTS +=%s', make.list(imports)) - end - - function m.make.stringImports(cfg, toolset) - local stringImports = p.esc(toolset.getstringimportdirs(cfg, cfg.stringimportdirs)) - _p(' STRINGIMPORTS +=%s', make.list(stringImports)) - end - - function m.make.dFlags(cfg, toolset) - _p(' ALL_DFLAGS += $(DFLAGS)%s $(VERSIONS) $(DEBUG) $(IMPORTS) $(STRINGIMPORTS) $(ARCH)', make.list(table.join(toolset.getdflags(cfg), cfg.buildoptions))) - end - - function m.make.linkCmd(cfg, toolset) - if cfg.compilationmodel == "File" then - _p(' LINKCMD = $(DC) ' .. toolset.gettarget("$(TARGET)") .. ' $(ALL_LDFLAGS) $(LIBS) $(OBJECTS)') - --- local cc = iif(p.languages.isc(cfg.language), "CC", "CXX") --- _p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', cc) - else - _p(' BUILDCMD = $(DC) ' .. toolset.gettarget("$(TARGET)") .. ' $(ALL_DFLAGS) $(ALL_LDFLAGS) $(LIBS) $(SOURCEFILES)') - end - end - - function m.make.allRules(cfg, toolset) - -- TODO: The C++ version has some special cases for OSX and Windows... check whether they should be here too? - if cfg.compilationmodel == "File" then - _p('all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)') - else - _p('all: $(TARGETDIR) prebuild prelink $(TARGET)') - end - _p('\t@:') --- _p('') - end - - --- --- List the objects file for the project, and each configuration. --- - --- TODO: This is basically identical to make.cppObjects(), and should ideally be merged/shared - - function m.make.objects(prj) - -- create lists for intermediate files, at the project level and - -- for each configuration - local root = { sourcefiles={}, objects={} } - local configs = {} - for cfg in project.eachconfig(prj) do - configs[cfg] = { sourcefiles={}, objects={} } - end - - -- now walk the list of files in the project - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - -- figure out what configurations contain this file, and - -- if it uses custom build rules - local incfg = {} - local inall = true - local custom = false - for cfg in project.eachconfig(prj) do - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg and not filecfg.flags.ExcludeFromBuild then - incfg[cfg] = filecfg - custom = fileconfig.hasCustomBuildRule(filecfg) - else - inall = false - end - end - - if not custom then - -- skip files that aren't compiled - if not path.isdfile(node.abspath) then - return - end - - local sourcename = node.relpath - - -- TODO: assign a unique object file name to avoid collisions - local objectname = "$(OBJDIR)/" .. node.objname .. ".o" - - -- if this file exists in all configurations, write it to - -- the project's list of files, else add to specific cfgs - if inall then - table.insert(root.sourcefiles, sourcename) - table.insert(root.objects, objectname) - else - for cfg in project.eachconfig(prj) do - if incfg[cfg] then - table.insert(configs[cfg].sourcefiles, sourcename) - table.insert(configs[cfg].objects, objectname) - end - end - end - - else - for cfg in project.eachconfig(prj) do - local filecfg = incfg[cfg] - if filecfg then - -- if the custom build outputs an object file, add it to - -- the link step automatically to match Visual Studio - local output = project.getrelative(prj, filecfg.buildoutputs[1]) - if path.isobjectfile(output) then - table.insert(configs[cfg].objects, output) - end - end - end - end - - end - }) - - local separateCompilation = m.make.separateCompilation(prj) - - -- now I can write out the lists, project level first... - function listobjects(var, list) - _p('%s \\', var) - for _, objectname in ipairs(list) do - _x('\t%s \\', objectname) - end - _p('') - end - - if separateCompilation ~= "all" then - listobjects('SOURCEFILES :=', root.sourcefiles) - end - if separateCompilation ~= "none" then - listobjects('OBJECTS :=', root.objects, 'o') - end - - -- ...then individual configurations, as needed - for cfg in project.eachconfig(prj) do - local files = configs[cfg] - if (#files.sourcefiles > 0 and separateCompilation ~= "all") or (#files.objects > 0 and separateCompilation ~= "none") then - _x('ifeq ($(config),%s)', cfg.shortname) - if #files.sourcefiles > 0 and separateCompilation ~= "all" then - listobjects(' SOURCEFILES +=', files.sourcefiles) - end - if #files.objects > 0 and separateCompilation ~= "none" then - listobjects(' OBJECTS +=', files.objects) - end - _p('endif') - end - end - _p('') - end diff --git a/build/premake/premake5/modules/d/actions/vcxproj.lua b/build/premake/premake5/modules/d/actions/vcxproj.lua deleted file mode 100644 index 8602bfed7b..0000000000 --- a/build/premake/premake5/modules/d/actions/vcxproj.lua +++ /dev/null @@ -1,526 +0,0 @@ --- --- d/actions/vcxproj.lua --- Generate a VisualD .visualdproj project. --- Copyright (c) 2012-2015 Manu Evans and the Premake project --- - - local p = premake - - require ("vstudio") - - p.modules.d.vc2010 = {} - - local vc2010 = p.vstudio.vc2010 - local m = p.modules.d.vc2010 - - m.elements = {} - - local vstudio = p.vstudio - local vc2010 = p.vstudio.vc2010 - local config = p.config - --- --- Patch DCompiler into the configuration properties --- - p.override(vc2010.elements, "configurationProperties", function(oldfn, cfg) - local items = oldfn(cfg) - if cfg.kind ~= p.UTILITY then - table.insert(items, m.dCompiler) - end - return items - end) - - function m.dCompiler(cfg) - local dc = nil - -- TODO: chech for explicit DMD or LDC request? - if _OPTIONS.dc then - local dcMap = { - ["dmd"] = "DMD", - ["ldc"] = "LDC", - } - dc = dcMap[_OPTIONS.dc] - end - if cfg.flags.UseLDC then - dc = "LDC" - end - -- TODO: dunno how to use `toolset`, since it's also used by the C++ compiler :/ --- local tool, version = p.config.toolset(cfg) --- if not version then --- local value = p.action.current().toolset --- tool, version = p.tools.canonical(value) --- end - if dc then - if cfg.kind == p.NONE or cfg.kind == p.MAKEFILE then - if p.config.hasFile(cfg, path.isdfile) or _ACTION >= "vs2015" then - vc2010.element("DCompiler", nil, dc) - end - else - vc2010.element("DCompiler", nil, dc) - end - end - end - --- --- Patch the dCompile step into the project items --- - p.override(vc2010.elements, "itemDefinitionGroup", function(oldfn, cfg) - local items = oldfn(cfg) - if cfg.kind ~= p.UTILITY then - table.insertafter(items, vc2010.clCompile, m.dCompile) - end - return items - end) - --- --- Write the settings block. --- - - m.elements.dCompile = function(cfg) - return { - m.dOptimization, - m.dImportPaths, - m.dStringImportPaths, - m.dVersionConstants, - m.dDebugConstants, - m.dCompilationModel, - m.dPreserveSourcePath, - m.dRuntime, - m.dCodeGeneration, - m.dLanguage, - m.dMessages, - m.dDocumentation, - m.dAdditionalCompileOptions, - } - end - - function m.dCompile(cfg) - if config.hasFile(cfg, path.isdfile) then - p.push('') - p.callArray(m.elements.dCompile, cfg) - p.pop('') - end - end - ---- --- DCompile group ---- - vc2010.categories.DCompile = { - name = "DCompile", - extensions = { ".d" }, - priority = 3, - - emitFiles = function(prj, group) - local fileCfgFunc = function(fcfg, condition) - if fcfg then - return { - vc2010.excludedFromBuild, - m.dOptimization, - m.dImportPaths, - m.dStringImportPaths, - m.dVersionConstants, - m.dDebugConstants, - m.dCompilationModel, - m.dPreserveSourcePath, - m.dRuntime, - m.dCodeGeneration, - m.dLanguage, - m.dMessages, - m.dDocumentation, - m.dAdditionalCompileOptions, - } - else - return { - vc2010.excludedFromBuild - } - end - end - - vc2010.emitFiles(prj, group, "DCompile", {m.generatedFile}, fileCfgFunc) - end, - - emitFilter = function(prj, group) - vc2010.filterGroup(prj, group, "DCompile") - end - } - - function m.dOptimization(cfg, condition) - local map = { Off="false", On="true", Debug="false", Full="true", Size="true", Speed="true" } - if cfg.optimize then - vc2010.element('Optimizer', condition, map[cfg.optimize] or "false") - end - end - - - function m.dImportPaths(cfg, condition) - if cfg.importdirs and #cfg.importdirs > 0 then - local dirs = vstudio.path(cfg, cfg.importdirs) - if #dirs > 0 then - vc2010.element("ImportPaths", condition, "%s;%%(ImportPaths)", table.concat(dirs, ";")) - end - end - end - - - function m.dStringImportPaths(cfg, condition) - if cfg.stringimportdirs and #cfg.stringimportdirs > 0 then - local dirs = vstudio.path(cfg, cfg.stringimportdirs) - if #dirs > 0 then - vc2010.element("StringImportPaths", condition, "%s;%%(StringImportPaths)", table.concat(dirs, ";")) - end - end - end - - - function m.dVersionConstants(cfg, condition) - if cfg.versionconstants and #cfg.versionconstants > 0 then - local versionconstants = table.concat(cfg.versionconstants, ";") - vc2010.element("VersionIdentifiers", condition, versionconstants) - end - end - - - function m.dDebugConstants(cfg, condition) - if cfg.debugconstants and #cfg.debugconstants > 0 then - local debugconstants = table.concat(cfg.debugconstants, ";") - vc2010.element("DebugIdentifiers", condition, debugconstants) - end - end - - - function m.dCompilationModel(cfg, condition) - if cfg.compilationmodel and cfg.compilationmodel ~= "Default" then - vc2010.element("CompilationModel", condition, cfg.compilationmodel) - end - end - - function m.dPreserveSourcePath(cfg, condition) - if cfg.flags.RetainPaths then - vc2010.element("PreserveSourcePath", condition, "true") - end - end - - function m.dRuntime(cfg, condition) - if cfg.flags.OmitDefaultLibrary then - vc2010.element("CRuntimeLibrary", condition, "None") - else - local releaseruntime = not config.isDebugBuild(cfg) - local staticruntime = true - if cfg.staticruntime == "Off" then - staticruntime = false - end - if cfg.runtime == "Debug" then - releaseruntime = false - elseif cfg.runtime == "Release" then - releaseruntime = true - end - if (cfg.staticruntime and cfg.staticruntime ~= "Default") or (cfg.runtime and cfg.runtime ~= "Default") then - if staticruntime == true and releaseruntime == true then - vc2010.element("CRuntimeLibrary", condition, "MultiThreaded") - elseif staticruntime == true and releaseruntime == false then - vc2010.element("CRuntimeLibrary", condition, "MultiThreadedDebug") - elseif staticruntime == false and releaseruntime == true then - vc2010.element("CRuntimeLibrary", condition, "MultiThreadedDll") - elseif staticruntime == false and releaseruntime == false then - vc2010.element("CRuntimeLibrary", condition, "MultiThreadedDebugDll") - end - end - end - end - - - function m.dCodeGeneration(cfg, condition) - if cfg.buildtarget then - local ObjectFileName = "" - if cfg.buildtarget.basename then - if cfg.buildtarget.prefix then - ObjectFileName = cfg.buildtarget.prefix - end - ObjectFileName = ObjectFileName .. cfg.buildtarget.basename .. ".obj" - end - if cfg.buildtarget.directory then - local outdir = vstudio.path(cfg, cfg.buildtarget.directory) - ObjectFileName = path.join(outdir, ObjectFileName) - end - vc2010.element("ObjectFileName", condition, ObjectFileName) - end - - if cfg.flags.Profile then - vc2010.element("Profile", condition, "true") - end - if cfg.flags.ProfileGC then - vc2010.element("ProfileGC", condition, "true") - end - if cfg.flags.CodeCoverage then - vc2010.element("Coverage", condition, "true") - end - if cfg.flags.UnitTest then - vc2010.element("Unittest", condition, "true") - end - if cfg.inlining and cfg.inlining ~= "Default" then - local types = { - Disabled = "false", - Explicit = "true", - Auto = "true", - } - vc2010.element("Inliner", condition, types[cfg.inlining]) - end - if cfg.flags.StackFrame then - vc2010.element("StackFrame", condition, "true") - end - if cfg.flags.StackStomp then - vc2010.element("StackStomp", condition, "true") - end - if cfg.flags.AllInstantiate then - vc2010.element("AllInst", condition, "true") - end - if cfg.flags.Main then - vc2010.element("Main", condition, "true") - end - - if _OPTIONS.dc ~= "ldc" and not cfg.flags.UseLDC then - if cfg.vectorextensions then - local vextMap = { - AVX = "avx", - AVX2 = "avx2", - } - if vextMap[cfg.vectorextensions] ~= nil then - vc2010.element("CPUArchitecture", condition, vextMap[cfg.vectorextensions]) - end - end - end - --- if cfg.debugcode then --- local types = { --- DebugFull = "Debug", --- DebugLight = "Default", --- Release = "Release", --- } --- vc2010.element("DebugCode", condition, types[cfg.debugcode]) --- end - -- TODO: proper option for this? should support unspecified... - if config.isDebugBuild(cfg) then - vc2010.element("DebugCode", condition, "Debug") - else - vc2010.element("DebugCode", condition, "Release") - end - - if cfg.symbols then - if cfg.symbols == p.Off then - vc2010.element("DebugInfo", condition, "None") - elseif cfg.symbols ~= "Default" then - vc2010.element("DebugInfo", condition, iif(cfg.flags.SymbolsLikeC, "VS", "Mago")) - end - end - - if cfg.boundscheck and cfg.boundscheck ~= "Default" then - local types = { - Off = "Off", - SafeOnly = "SafeOnly", - On = "On", - } - vc2010.element("BoundsCheck", condition, types[cfg.boundscheck]) - end - - if cfg.flags.PerformSyntaxCheckOnly then - vc2010.element("PerformSyntaxCheckOnly", condition, "true") - end - end - - function m.dLanguage(cfg, condition) - if cfg.flags.BetterC then - vc2010.element("BetterC", condition, "true") - end - - if #cfg.preview > 0 then - for _, opt in ipairs(cfg.preview) do - if opt == "dip25" then - vc2010.element("DIP25", condition, "true") - elseif opt == "dip1000" then - vc2010.element("DIP1000", condition, "true") - elseif opt == "dip1008" then - vc2010.element("DIP1008", condition, "true") - elseif opt == "fieldwise" then - vc2010.element("PreviewFieldwise", condition, "true") - elseif opt == "dtorfields" then - vc2010.element("PreviewDtorFields", condition, "true") - elseif opt == "intpromote" then - vc2010.element("PreviewIntPromote", condition, "true") - elseif opt == "fixAliasThis" then - vc2010.element("PreviewFixAliasThis", condition, "true") - end - end - end - - if #cfg.revert > 0 then - for _, opt in ipairs(cfg.revert) do - if opt == "import" then - vc2010.element("RevertImport", condition, "true") - end - end - end - end - - function m.dMessages(cfg, condition) - if cfg.warnings == p.OFF then - vc2010.element("Warnings", condition, "None") - elseif cfg.warnings and cfg.warnings ~= "Default" then - vc2010.element("Warnings", condition, iif(cfg.flags.FatalCompileWarnings, "Error", "Info")) - end - - if cfg.deprecatedfeatures and cfg.deprecatedfeatures ~= "Default" then - local types = { - Error = "Error", - Warn = "Info", - Allow = "Allow", - } - vc2010.element("Deprecations", condition, types[cfg.deprecatedfeatures]) - end - - if cfg.flags.ShowCommandLine then - vc2010.element("ShowCommandLine", condition, "true") - end - if cfg.flags.Verbose then - vc2010.element("Verbose", condition, "true") - end - if cfg.flags.ShowTLS then - vc2010.element("ShowTLS", condition, "true") - end - if cfg.flags.ShowGC then - vc2010.element("ShowGC", condition, "true") - end - if cfg.flags.IgnorePragma then - vc2010.element("IgnorePragma", condition, "true") - end - if cfg.flags.ShowDependencies then - vc2010.element("ShowDependencies", condition, "true") - end - - if #cfg.transition > 0 then - for _, opt in ipairs(cfg.transition) do - if opt == "field" then - vc2010.element("TransitionField", condition, "true") - elseif opt == "checkimports" then - vc2010.element("TransitionCheckImports", condition, "true") - elseif opt == "complex" then - vc2010.element("TransitionComplex", condition, "true") - end - end - end - end - - function m.dDocumentation(cfg, condition) - if cfg.docdir then - vc2010.element("DocDir", condition, cfg.docdir) - end - if cfg.docname then - vc2010.element("DocFile", condition, cfg.docname) - end - - if #cfg.preview > 0 then - for _, opt in ipairs(cfg.preview) do - if opt == "markdown" then - vc2010.element("PreviewMarkdown", condition, "true") - end - end - end - if #cfg.transition > 0 then - for _, opt in ipairs(cfg.transition) do - if opt == "vmarkdown" then - vc2010.element("TransitionVMarkdown", condition, "true") - end - end - end - - if cfg.dependenciesfile then - vc2010.element("DepFile", condition, cfg.dependenciesfile) - end - - if cfg.headerdir then - vc2010.element("HeaderDir", condition, cfg.headerdir) - end - if cfg.headername then - vc2010.element("HeaderFile", condition, cfg.headername) - end - - if cfg.jsonfile then - vc2010.element("JSONFile", condition, cfg.jsonfile) - end - end - - function m.dAdditionalCompileOptions(cfg, condition) - local opts = cfg.buildoptions - - if cfg.flags.LowMem then - table.insert(opts, "-lowmem") - end - - if cfg.cppdialect and cfg.cppdialect ~= "Default" then - local cppMap = { - ["C++latest"] = "c++17", -- TODO: keep this up to date >_< - ["C++98"] = "c++98", - ["C++0x"] = "c++11", - ["C++11"] = "c++11", - ["C++1y"] = "c++14", - ["C++14"] = "c++14", - ["C++1z"] = "c++17", - ["C++17"] = "c++17", - ["gnu++98"] = "c++98", - ["gnu++0x"] = "c++11", - ["gnu++11"] = "c++11", - ["gnu++1y"] = "c++14", - ["gnu++14"] = "c++14", - ["gnu++1z"] = "c++17", - ["gnu++17"] = "c++17", - } - if cppMap[cfg.cppdialect] ~= nil then - table.insert(opts, "-extern-std=" .. cppMap[cfg.cppdialect]) - end - end - - -- TODO: better way to check toolset? - if _OPTIONS.dc == "ldc" or cfg.flags.UseLDC then - if cfg.vectorextensions then - local vextMap = { - AVX = "avx", - AVX2 = "avx2", - SSE = "sse", - SSE2 = "sse2", - SSE3 = "sse3", - SSSE3 = "ssse3", - ["SSE4.1"] = "sse4.1", - } - if vextMap[cfg.vectorextensions] ~= nil then - table.insert(opts, "-mattr=+" .. vextMap[cfg.vectorextensions]) - end - end - if #cfg.isaextensions > 0 then - local isaMap = { - MOVBE = "movbe", - POPCNT = "popcnt", - PCLMUL = "pclmul", - LZCNT = "lzcnt", - BMI = "bmi", - BMI2 = "bmi2", - F16C = "f16c", - AES = "aes", - FMA = "fma", - FMA4 = "fma4", - RDRND = "rdrnd", - } - for _, ext in ipairs(cfg.isaextensions) do - if isaMap[ext] ~= nil then - table.insert(opts, "-mattr=+" .. isaMap[ext]) - end - end - end - - if #cfg.computetargets > 0 then - table.insert(opts, "-mdcompute-targets=" .. table.concat(cfg.computetargets, ',')) - end - end - - if #opts > 0 then - opts = table.concat(opts, " ") - vc2010.element("AdditionalOptions", condition, '%s %%(AdditionalOptions)', opts) - end - end diff --git a/build/premake/premake5/modules/d/actions/visuald.lua b/build/premake/premake5/modules/d/actions/visuald.lua deleted file mode 100644 index 5f8612c63d..0000000000 --- a/build/premake/premake5/modules/d/actions/visuald.lua +++ /dev/null @@ -1,359 +0,0 @@ --- --- d/actions/visuald.lua --- Generate a VisualD .visualdproj project. --- Copyright (c) 2012-2015 Manu Evans and the Premake project --- - - local p = premake - local m = p.modules.d - - m.visuald = {} - - require ("vstudio") - - local vstudio = p.vstudio - local workspace = p.workspace - local project = p.project - local config = p.config - local tree = p.tree - --- --- Patch the vstudio actions with D support... --- - - for k,v in pairs({ "vs2005", "vs2008", "vs2010", "vs2012", "vs2013", "vs2015", "vs2017", "vs2019" }) do - local vs = p.action.get(v) - if vs ~= nil then - table.insert( vs.valid_languages, p.D ) - vs.valid_tools.dc = { "dmd", "gdc", "ldc" } - - p.override(vs, "onProject", function(oldfn, prj) - oldfn(prj) - if project.isd(prj) then - p.generate(prj, ".visualdproj", m.visuald.generate) - end - end) - end - end - - --- --- Patch a bunch of other functions --- - - p.override(project, "isnative", function(oldfn, prj) - return project.isd(prj) or oldfn(prj) - end) - - p.override(vstudio, "projectfile", function(oldfn, prj) - if project.isd(prj) then - return p.filename(prj, ".visualdproj") - end - return oldfn(prj) - end) - - p.override(vstudio, "tool", function(oldfn, prj) - if project.isd(prj) then - return "002A2DE9-8BB6-484D-9802-7E4AD4084715" - end - return oldfn(prj) - end) - - --- --- Generate a Visual D project. --- - - m.elements.project = function(prj) - return { - m.visuald.header, - m.visuald.globals, - m.visuald.projectConfigurations, - m.visuald.files, - } - - end - - function m.visuald.generate(prj) - p.eol("\r\n") - p.indent(" ") - - p.callArray(m.elements.project, prj) - - _p('') - end - - - function m.visuald.header(prj) - -- for some reason Visual D projects don't seem to have an xml header - --_p('') - _p('') - end - - function m.visuald.globals(prj) - _p(1,'{%s}', prj.uuid) - end - - --- --- Write out the list of project configurations, which pairs build --- configurations with architectures. --- - - function m.visuald.projectConfigurations(prj) - -- build a list of all architectures used in this project - - for cfg in project.eachconfig(prj) do - local prjPlatform = p.esc(vstudio.projectPlatform(cfg)) - local slnPlatform = vstudio.solutionPlatform(cfg) - local is64bit = slnPlatform == "x64" -- TODO: this seems like a hack - - _p(1,'', prjPlatform, slnPlatform) - - _p(2,'0') - _p(2,'0') - - local isWindows = false - local isDebug = string.find(cfg.buildcfg, 'Debug') ~= nil - local isOptimised = config.isOptimizedBuild(cfg) - - if cfg.kind == p.CONSOLEAPP then - _p(2,'0') - _p(2,'1') - elseif cfg.kind == p.STATICLIB then - _p(2,'1') - _p(2,'0') - elseif cfg.kind == p.SHAREDLIB then - _p(2,'2') - _p(2,'0') -- SHOULD THIS BE '2' (windows)?? - else - _p(2,'0') - _p(2,'2') - isWindows = true - end - - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'%s', iif(cfg.flags.Profile, '1', '0')) - _p(2,'%s', iif(cfg.flags.Quiet, '1', '0')) - _p(2,'%s', iif(cfg.flags.Verbose, '1', '0')) - _p(2,'0') - _p(2,'%s', iif(cfg.symbols == p.ON or cfg.symbols == "FastLink" or cfg.symbols == "Full", iif(cfg.flags.SymbolsLikeC, '2', '1'), '0')) - _p(2,'%s', iif(isOptimised, '1', '0')) - _p(2,'0') - _p(2,'%s', iif(is64bit, '1', '0')) - _p(2,'0') - _p(2,'0') - _p(2,'%s', iif(isWindows, '1', '0')) - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'%s', iif(cfg.deprecatedfeatures == "Allow", '1', '0')) - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'%s', iif(cfg.boundscheck == "Off", '1', '0')) - _p(2,'0') - _p(2,'%s', iif(cfg.flags.UnitTest, '1', '0')) - _p(2,'%s', iif(cfg.flags.Inline or isOptimised, '1', '0')) - _p(2,'%s', iif(cfg.flags.Release or not isDebug, '1', '0')) - _p(2,'0') - - _p(2,'%s', iif(cfg.flags.FatalCompileWarnings, '1', '0')) - _p(2,'%s', iif(cfg.warnings and cfg.warnings ~= "Off", '1', '0')) - - _p(2,'0') - _p(2,'0') - _p(2,'%s', iif(cfg.pic == "On", '1', '0')) - _p(2,'%s', iif(cfg.flags.CodeCoverage, '1', '0')) - _p(2,'%s', iif(cfg.floatingpoint and cfg.floatingpoint == "None", '1', '0')) - _p(2,'2') - _p(2,'0') - - local compiler = { dmd="0", gdc="1", ldc="2" } - m.visuald.element(2, "compiler", compiler[_OPTIONS.dc or cfg.toolset or "dmd"]) - - m.visuald.element(2, "otherDMD", '0') - m.visuald.element(2, "program", '$(DMDInstallDir)windows\\bin\\dmd.exe') - - local impdirs - if #cfg.importdirs > 0 then - impdirs = vstudio.path(cfg, cfg.importdirs) - end - m.visuald.element(2, "imppath", impdirs) - - m.visuald.element(2, "fileImppath") - m.visuald.element(2, "outdir", path.translate(project.getrelative(cfg.project, cfg.buildtarget.directory))) - m.visuald.element(2, "objdir", path.translate(project.getrelative(cfg.project, cfg.objdir))) - m.visuald.element(2, "objname") - m.visuald.element(2, "libname") - - m.visuald.element(2, "doDocComments", iif(cfg.flags.Documentation, '1', '0')) - m.visuald.element(2, "docdir", cfg.docdir) - m.visuald.element(2, "docname", cfg.docname) - m.visuald.element(2, "modules_ddoc") - m.visuald.element(2, "ddocfiles") - - m.visuald.element(2, "doHdrGeneration", iif(cfg.flags.GenerateHeader, '1', '0')) - m.visuald.element(2, "hdrdir", cfg.headerdir) - m.visuald.element(2, "hdrname", cfg.headername) - - m.visuald.element(2, "doXGeneration", iif(cfg.flags.GenerateJSON, '1', '0')) - m.visuald.element(2, "xfilename", '$(IntDir)\\$(TargetName).json') - - m.visuald.element(2, "debuglevel", iif(cfg.debuglevel, tostring(cfg.debuglevel), '0')) - m.visuald.element(2, "debugids", cfg.debugconstants) - m.visuald.element(2, "versionlevel", iif(cfg.versionlevel, tostring(cfg.versionlevel), '0')) - m.visuald.element(2, "versionids", cfg.versionconstants) - - _p(2,'0') - _p(2,'0') - _p(2,'%s', iif(cfg.kind ~= p.SHAREDLIB or cfg.flags.NoImportLib, '0', '1')) - _p(2,'') - _p(2,'') - _p(2,'') - - _p(2,'0') - _p(2,'') - --- _p(2,'%s', iif(cfg.symbols == p.ON, '1', '0')) - _p(2,'1') -- we will just leave this always enabled, since it's ignored if no debuginfo is written - _p(2,'$(VisualDInstallDir)cv2pdb\\cv2pdb.exe') - _p(2,'0') - _p(2,'0') - _p(2,'0') - _p(2,'') - - _p(2,'') - _p(2,'') - - local links - local explicit = vstudio.needsExplicitLink(cfg) - -- check to see if this project uses an external toolset. If so, let the - -- toolset define the format of the links - local toolset = config.toolset(cfg) - if toolset then - links = toolset.getlinks(cfg, not explicit) - else - local scope = iif(explicit, "all", "system") - links = config.getlinks(cfg, scope, "fullpath") - end - m.visuald.element(2, "libfiles", table.concat(links, " ")) - - m.visuald.element(2, "libpaths", cfg.libdirs) - _p(2,'') - _p(2,'') - - local target = config.gettargetinfo(cfg) - _p(2,'$(OutDir)\\%s', target.name) - - _p(2,'1') - - local runtime = 0 - if not cfg.flags.OmitDefaultLibrary then - if config.isDebugBuild(cfg) then - runtime = iif(cfg.flags.StaticRuntime, "2", "4") - else - runtime = iif(cfg.flags.StaticRuntime, "1", "3") - end - end - m.visuald.element(2, "cRuntime", runtime) - - local additionalOptions - if #cfg.buildoptions > 0 then - additionalOptions = table.concat(cfg.buildoptions, " ") - end - if #cfg.linkoptions > 0 then - local linkOpts = table.implode(cfg.linkoptions, "-L", "", " ") - if additionalOptions then - additionalOptions = additionalOptions .. " " .. linkOpts - else - additionalOptions = linkOpts - end - end - m.visuald.element(2, "additionalOptions", additionalOptions) - - if #cfg.prebuildcommands > 0 then - _p(2,'%s',p.esc(table.implode(cfg.prebuildcommands, "", "", "\r\n"))) - else - _p(2,'') - end - - if #cfg.postbuildcommands > 0 then - _p(2,'%s',p.esc(table.implode(cfg.postbuildcommands, "", "", "\r\n"))) - else - _p(2,'') - end - - _p(2,'*.obj;*.cmd;*.build;*.json;*.dep;*.o') - - _p(1,'') - end - end - - --- --- Write out the source file tree. --- - - function m.visuald.files(prj) - _p(1,'', prj.name) - - local tr = project.getsourcetree(prj) - - tree.traverse(tr, { - - -- folders, virtual or otherwise, are handled at the internal nodes - onbranchenter = function(node, depth) - _p(depth, '', node.name) - end, - - onbranchexit = function(node, depth) - _p(depth, '') - end, - - -- source files are handled at the leaves - onleaf = function(node, depth) - _p(depth, '', path.translate(node.relpath)) - --- _p(depth, '', path.translate(node.relpath)) --- m.visuald.fileConfiguration(prj, node, depth + 1) --- _p(depth, '') - end - - }, false, 2) - - _p(1,'') - end - - function m.visuald.fileConfiguration(prj, node, depth) - - -- maybe we'll need this in the future... - - end - - --- --- Output an individual project XML element. --- - - function m.visuald.element(depth, name, value, ...) - local isTable = type(value) == "table" - if not value or (isTable and #value == 0) then - _p(depth, '<%s />', name) - else - if isTable then - value = p.esc(table.implode(value, "", "", ";")) - _p(depth, '<%s>%s', name, value, name) - else - if select('#',...) == 0 then - value = p.esc(value) - end - _x(depth, string.format('<%s>%s', name, value, name), ...) - end - end - end diff --git a/build/premake/premake5/modules/d/d.lua b/build/premake/premake5/modules/d/d.lua deleted file mode 100644 index 3fcb458b6e..0000000000 --- a/build/premake/premake5/modules/d/d.lua +++ /dev/null @@ -1,49 +0,0 @@ --- --- d/d.lua --- Define the D makefile action(s). --- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project --- - - local p = premake - - p.modules.d = {} - - local m = p.modules.d - - m._VERSION = p._VERSION - m.elements = {} - - local api = p.api - - --- --- Patch the project table to provide knowledge of D projects --- - function p.project.isd(prj) - return prj.language == p.D - end - --- --- Patch the path table to provide knowledge of D file extenstions --- - function path.isdfile(fname) - return path.hasextension(fname, { ".d" }) - end - - function path.isdheader(fname) - return path.hasextension(fname, { ".di" }) - end - - --- --- Patch actions --- - include( "tools/dmd.lua" ) - include( "tools/gdc.lua" ) - include( "tools/ldc.lua" ) - - include( "actions/gmake.lua" ) - include( "actions/vcxproj.lua" ) - include( "actions/visuald.lua" ) - - return m diff --git a/build/premake/premake5/modules/d/tests/_tests.lua b/build/premake/premake5/modules/d/tests/_tests.lua deleted file mode 100644 index fed09a4ea1..0000000000 --- a/build/premake/premake5/modules/d/tests/_tests.lua +++ /dev/null @@ -1,9 +0,0 @@ -require ("d") - -return { - "test_visualstudio.lua", - "test_gmake.lua", - "test_dmd.lua", - "test_gdc.lua", - "test_ldc.lua", -} diff --git a/build/premake/premake5/modules/d/tests/test_dmd.lua b/build/premake/premake5/modules/d/tests/test_dmd.lua deleted file mode 100644 index dfdb25aa58..0000000000 --- a/build/premake/premake5/modules/d/tests/test_dmd.lua +++ /dev/null @@ -1,106 +0,0 @@ ---- --- d/tests/test_dmd.lua --- Automated test suite for dmd. --- Copyright (c) 2011-2015 Manu Evans and the Premake project ---- - - local suite = test.declare("d_dmd") - local p = premake - local m = p.modules.d - - local make = p.make - local project = p.project - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, cfg - - function suite.setup() - p.escaper(make.esc) - wks = test.createWorkspace() - end - - local function prepare_cfg(calls) - prj = p.workspace.getproject(wks, 1) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.dmd - p.callArray(calls, cfg, toolset) - end - - --- --- Check configuration generation --- - - function suite.dmd_dTools() - prepare_cfg({ m.make.dTools }) - test.capture [[ - DC = dmd - ]] - end - - function suite.dmd_target() - prepare_cfg({ m.make.target }) - test.capture [[ - - ]] - end - - function suite.dmd_target_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.target }) - test.capture [[ - OUTPUTFLAG = -of"$@" - ]] - end - - function suite.dmd_versions() - versionlevel (10) - versionconstants { "A", "B" } - prepare_cfg({ m.make.versions }) - test.capture [[ - VERSIONS += -version=A -version=B -version=10 - ]] - end - - function suite.dmd_debug() - debuglevel (10) - debugconstants { "A", "B" } - prepare_cfg({ m.make.debug }) - test.capture [[ - DEBUG += -debug=A -debug=B -debug=10 - ]] - end - - function suite.dmd_imports() - importdirs { "dir1", "dir2/" } - prepare_cfg({ m.make.imports }) - test.capture [[ - IMPORTS += -Idir1 -Idir2 - ]] - end - - function suite.dmd_dFlags() - prepare_cfg({ m.make.dFlags }) - test.capture [[ - ALL_DFLAGS += $(DFLAGS) -release $(VERSIONS) $(DEBUG) $(IMPORTS) $(STRINGIMPORTS) $(ARCH) - ]] - end - - function suite.dmd_linkCmd() - prepare_cfg({ m.make.linkCmd }) - test.capture [[ - BUILDCMD = $(DC) -of$(TARGET) $(ALL_DFLAGS) $(ALL_LDFLAGS) $(LIBS) $(SOURCEFILES) - ]] - end - - function suite.dmd_linkCmd_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.linkCmd }) - test.capture [[ - LINKCMD = $(DC) -of$(TARGET) $(ALL_LDFLAGS) $(LIBS) $(OBJECTS) - ]] - end diff --git a/build/premake/premake5/modules/d/tests/test_gdc.lua b/build/premake/premake5/modules/d/tests/test_gdc.lua deleted file mode 100644 index 79fe5127c4..0000000000 --- a/build/premake/premake5/modules/d/tests/test_gdc.lua +++ /dev/null @@ -1,106 +0,0 @@ ---- --- d/tests/test_dmd.lua --- Automated test suite for dmd. --- Copyright (c) 2011-2015 Manu Evans and the Premake project ---- - - local suite = test.declare("d_gdc") - local p = premake - local m = p.modules.d - - local make = p.make - local project = p.project - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, cfg - - function suite.setup() - p.escaper(make.esc) - wks = test.createWorkspace() - end - - local function prepare_cfg(calls) - prj = p.workspace.getproject(wks, 1) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gdc - p.callArray(calls, cfg, toolset) - end - - --- --- Check configuration generation --- - - function suite.dmd_dTools() - prepare_cfg({ m.make.dTools }) - test.capture [[ - DC = gdc - ]] - end - - function suite.dmd_target() - prepare_cfg({ m.make.target }) - test.capture [[ - - ]] - end - - function suite.dmd_target_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.target }) - test.capture [[ - OUTPUTFLAG = -o "$@" - ]] - end - - function suite.dmd_versions() - versionlevel (10) - versionconstants { "A", "B" } - prepare_cfg({ m.make.versions }) - test.capture [[ - VERSIONS += -fversion=A -fversion=B -fversion=10 - ]] - end - - function suite.dmd_debug() - debuglevel (10) - debugconstants { "A", "B" } - prepare_cfg({ m.make.debug }) - test.capture [[ - DEBUG += -fdebug=A -fdebug=B -fdebug=10 - ]] - end - - function suite.dmd_imports() - importdirs { "dir1", "dir2/" } - prepare_cfg({ m.make.imports }) - test.capture [[ - IMPORTS += -Idir1 -Idir2 - ]] - end - - function suite.dmd_dFlags() - prepare_cfg({ m.make.dFlags }) - test.capture [[ - ALL_DFLAGS += $(DFLAGS) -frelease $(VERSIONS) $(DEBUG) $(IMPORTS) $(STRINGIMPORTS) $(ARCH) - ]] - end - - function suite.dmd_linkCmd() - prepare_cfg({ m.make.linkCmd }) - test.capture [[ - BUILDCMD = $(DC) -o $(TARGET) $(ALL_DFLAGS) $(ALL_LDFLAGS) $(LIBS) $(SOURCEFILES) - ]] - end - - function suite.dmd_linkCmd_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.linkCmd }) - test.capture [[ - LINKCMD = $(DC) -o $(TARGET) $(ALL_LDFLAGS) $(LIBS) $(OBJECTS) - ]] - end diff --git a/build/premake/premake5/modules/d/tests/test_gmake.lua b/build/premake/premake5/modules/d/tests/test_gmake.lua deleted file mode 100644 index 9ef2f787c4..0000000000 --- a/build/premake/premake5/modules/d/tests/test_gmake.lua +++ /dev/null @@ -1,195 +0,0 @@ ---- --- d/tests/test_gmake.lua --- Automated test suite for gmake project generation. --- Copyright (c) 2011-2015 Manu Evans and the Premake project ---- - - local suite = test.declare("d_make") - local p = premake - local m = p.modules.d - - local make = p.make - local project = p.project - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, cfg - - function suite.setup() - p.escaper(make.esc) - wks = test.createWorkspace() - end - - local function prepare() - prj = p.workspace.getproject(wks, 1) - end - - local function prepare_cfg(calls) - prj = p.workspace.getproject(wks, 1) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.dmd - p.callArray(calls, cfg, toolset) - end - - - --- --- Check project generation --- - - function suite.make_targetRules() - prepare() - m.make.targetRules(prj) - test.capture [[ -$(TARGET): $(SOURCEFILES) $(LDDEPS) - @echo Building MyProject - $(SILENT) $(BUILDCMD) - $(POSTBUILDCMDS) - - ]] - end - - function suite.make_targetRules_separateCompilation() - compilationmodel "File" - prepare() - m.make.targetRules(prj) - test.capture [[ -$(TARGET): $(OBJECTS) $(LDDEPS) - @echo Linking MyProject - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) - - ]] - end - - function suite.make_targetRules_mixedCompilation() - configuration { "Release" } - compilationmodel "File" - prepare() - m.make.targetRules(prj) - test.capture [[ -ifeq ($(config),debug) -$(TARGET): $(SOURCEFILES) $(LDDEPS) - @echo Building MyProject - $(SILENT) $(BUILDCMD) - $(POSTBUILDCMDS) -endif -ifeq ($(config),release) -$(TARGET): $(OBJECTS) $(LDDEPS) - @echo Linking MyProject - $(SILENT) $(LINKCMD) - $(POSTBUILDCMDS) -endif - - ]] - end - - - function suite.make_fileRules() - files { "blah.d" } - prepare() - m.make.dFileRules(prj) - test.capture [[ - - ]] - end - - function suite.make_fileRules_separateCompilation() - files { "blah.d" } - compilationmodel "File" - prepare() - m.make.dFileRules(prj) - test.capture [[ -$(OBJDIR)/blah.o: blah.d - @echo $(notdir $<) - $(SILENT) $(DC) $(ALL_DFLAGS) $(OUTPUTFLAG) -c $< - ]] - end - - function suite.make_fileRules_mixedCompilation() - files { "blah.d" } - configuration { "Release" } - compilationmodel "File" - prepare() - m.make.dFileRules(prj) - test.capture [[ -$(OBJDIR)/blah.o: blah.d - @echo $(notdir $<) - $(SILENT) $(DC) $(ALL_DFLAGS) $(OUTPUTFLAG) -c $< - ]] - end - - - function suite.make_objects() - files { "blah.d" } - prepare() - m.make.objects(prj) - test.capture [[ -SOURCEFILES := \ - blah.d \ - - ]] - end - - function suite.make_objects_separateCompilation() - files { "blah.d" } - compilationmodel "File" - prepare() - m.make.objects(prj) - test.capture [[ -OBJECTS := \ - $(OBJDIR)/blah.o \ - - ]] - end - - function suite.make_objects_mixedCompilation() - files { "blah.d" } - configuration { "Release" } - compilationmodel "File" - files { "blah2.d" } - prepare() - m.make.objects(prj) - test.capture [[ -SOURCEFILES := \ - blah.d \ - -OBJECTS := \ - $(OBJDIR)/blah.o \ - -ifeq ($(config),release) - SOURCEFILES += \ - blah2.d \ - - OBJECTS += \ - $(OBJDIR)/blah2.o \ - -endif - - ]] - end - - --- --- Check configuration generation --- - - function suite.make_allRules() - prepare_cfg({ m.make.allRules }) - test.capture [[ -all: $(TARGETDIR) prebuild prelink $(TARGET) - @: - ]] - end - - function suite.make_allRules_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.allRules }) - test.capture [[ -all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET) - @: - ]] - end diff --git a/build/premake/premake5/modules/d/tests/test_ldc.lua b/build/premake/premake5/modules/d/tests/test_ldc.lua deleted file mode 100644 index b728b7ece2..0000000000 --- a/build/premake/premake5/modules/d/tests/test_ldc.lua +++ /dev/null @@ -1,106 +0,0 @@ ---- --- d/tests/test_dmd.lua --- Automated test suite for dmd. --- Copyright (c) 2011-2015 Manu Evans and the Premake project ---- - - local suite = test.declare("d_ldc") - local p = premake - local m = p.modules.d - - local make = p.make - local project = p.project - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, cfg - - function suite.setup() - p.escaper(make.esc) - wks = test.createWorkspace() - end - - local function prepare_cfg(calls) - prj = p.workspace.getproject(wks, 1) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.ldc - p.callArray(calls, cfg, toolset) - end - - --- --- Check configuration generation --- - - function suite.dmd_dTools() - prepare_cfg({ m.make.dTools }) - test.capture [[ - DC = ldc2 - ]] - end - - function suite.dmd_target() - prepare_cfg({ m.make.target }) - test.capture [[ - - ]] - end - - function suite.dmd_target_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.target }) - test.capture [[ - OUTPUTFLAG = -of="$@" - ]] - end - - function suite.dmd_versions() - versionlevel (10) - versionconstants { "A", "B" } - prepare_cfg({ m.make.versions }) - test.capture [[ - VERSIONS += -d-version=A -d-version=B -d-version=10 - ]] - end - - function suite.dmd_debug() - debuglevel (10) - debugconstants { "A", "B" } - prepare_cfg({ m.make.debug }) - test.capture [[ - DEBUG += -d-debug=A -d-debug=B -d-debug=10 - ]] - end - - function suite.dmd_imports() - importdirs { "dir1", "dir2/" } - prepare_cfg({ m.make.imports }) - test.capture [[ - IMPORTS += -I=dir1 -I=dir2 - ]] - end - - function suite.dmd_dFlags() - prepare_cfg({ m.make.dFlags }) - test.capture [[ - ALL_DFLAGS += $(DFLAGS) -release $(VERSIONS) $(DEBUG) $(IMPORTS) $(STRINGIMPORTS) $(ARCH) - ]] - end - - function suite.dmd_linkCmd() - prepare_cfg({ m.make.linkCmd }) - test.capture [[ - BUILDCMD = $(DC) -of=$(TARGET) $(ALL_DFLAGS) $(ALL_LDFLAGS) $(LIBS) $(SOURCEFILES) - ]] - end - - function suite.dmd_linkCmd_separateCompilation() - compilationmodel "File" - prepare_cfg({ m.make.linkCmd }) - test.capture [[ - LINKCMD = $(DC) -of=$(TARGET) $(ALL_LDFLAGS) $(LIBS) $(OBJECTS) - ]] - end diff --git a/build/premake/premake5/modules/d/tests/test_visualstudio.lua b/build/premake/premake5/modules/d/tests/test_visualstudio.lua deleted file mode 100644 index da6a53fef4..0000000000 --- a/build/premake/premake5/modules/d/tests/test_visualstudio.lua +++ /dev/null @@ -1,75 +0,0 @@ ---- --- d/tests/test_visualstudio.lua --- Automated test suite for VisualD project generation. --- Copyright (c) 2011-2015 Manu Evans and the Premake project ---- - - local suite = test.declare("visual_d") - local p = premake - local m = p.modules.d - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, cfg - - function suite.setup() - p.action.set("vs2010") --- p.escaper(p.vstudio.vs2005.esc) - p.indent(" ") - wks = workspace "MyWorkspace" - configurations { "Debug", "Release" } - language "D" - kind "ConsoleApp" - end - - local function prepare() - prj = project "MyProject" - end - - local function prepare_cfg() - prj = project "MyProject" - cfg = test.getconfig(prj, "Debug") - end - - --- --- Check sln for the proper project entry --- - - function suite.slnProj() - project "MyProject" - language "D" - p.vstudio.sln2005.reorderProjects(wks) - p.vstudio.sln2005.projects(wks) - test.capture [[ -Project("{002A2DE9-8BB6-484D-9802-7E4AD4084715}") = "MyProject", "MyProject.visualdproj", "{42B5DBC6-AE1F-903D-F75D-41E363076E92}" -EndProject - ]] - end - - --- --- Project tests --- - - function suite.OnProject_header() - prepare() - m.visuald.header(prj) - test.capture [[ - - ]] - end - - function suite.OnProject_globals() - prepare() - m.visuald.globals(prj) - test.capture [[ - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - ]] - end - - - -- TODO: break up the project gen and make lots more tests... diff --git a/build/premake/premake5/modules/d/tools/dmd.lua b/build/premake/premake5/modules/d/tools/dmd.lua deleted file mode 100644 index 55988a8bc8..0000000000 --- a/build/premake/premake5/modules/d/tools/dmd.lua +++ /dev/null @@ -1,481 +0,0 @@ --- --- d/tools/dmd.lua --- Provides dmd-specific configuration strings. --- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project --- - - local tdmd = {} - - local p = premake - local project = p.project - local config = p.config - local d = p.modules.d - --- --- Set default tools --- - tdmd.gcc = {} - tdmd.gcc.dc = "dmd" - - tdmd.optlink = {} - tdmd.optlink.dc = "dmd" - - --- ///////////////////////////////////////////////////////////////////////// --- dmd + GCC toolchain --- ///////////////////////////////////////////////////////////////////////// - --- --- Return a list of LDFLAGS for a specific configuration. --- - - tdmd.gcc.ldflags = { - architecture = { - x86 = { "-m32" }, - x86_64 = { "-m64" }, - }, - kind = { - SharedLib = "-shared", - StaticLib = "-lib", - } - } - - function tdmd.gcc.getldflags(cfg) - local flags = config.mapFlags(cfg, tdmd.gcc.ldflags) - return flags - end - - --- --- Return a list of decorated additional libraries directories. --- - - tdmd.gcc.libraryDirectories = { - architecture = { - x86 = "-L-L/usr/lib", - x86_64 = "-L-L/usr/lib64", - } - } - - function tdmd.gcc.getLibraryDirectories(cfg) - local flags = config.mapFlags(cfg, tdmd.gcc.libraryDirectories) - - -- Scan the list of linked libraries. If any are referenced with - -- paths, add those to the list of library search paths - for _, dir in ipairs(config.getlinks(cfg, "system", "directory")) do - table.insert(flags, '-L-L' .. project.getrelative(cfg.project, dir)) - end - - return flags - end - - --- --- Return the list of libraries to link, decorated with flags as needed. --- - - function tdmd.gcc.getlinks(cfg, systemonly) - local result = {} - - local links - if not systemonly then - links = config.getlinks(cfg, "siblings", "object") - for _, link in ipairs(links) do - -- skip external project references, since I have no way - -- to know the actual output target path - if not link.project.external then - if link.kind == p.STATICLIB then - -- Don't use "-l" flag when linking static libraries; instead use - -- path/libname.a to avoid linking a shared library of the same - -- name if one is present - table.insert(result, "-L" .. project.getrelative(cfg.project, link.linktarget.abspath)) - else - table.insert(result, "-L-l" .. link.linktarget.basename) - end - end - end - end - - -- The "-l" flag is fine for system libraries - links = config.getlinks(cfg, "system", "fullpath") - for _, link in ipairs(links) do - if path.isframework(link) then - table.insert(result, "-framework " .. path.getbasename(link)) - elseif path.isobjectfile(link) then - table.insert(result, "-L" .. link) - else - table.insert(result, "-L-l" .. path.getbasename(link)) - end - end - - return result - end - - --- ///////////////////////////////////////////////////////////////////////// --- tdmd + OPTLINK toolchain --- ///////////////////////////////////////////////////////////////////////// - --- --- Return a list of LDFLAGS for a specific configuration. --- - - tdmd.optlink.ldflags = { - architecture = { - x86 = { "-m32" }, - x86_64 = { "-m64" }, - }, - kind = { - SharedLib = "-shared", - StaticLib = "-lib", - } - } - - function tdmd.optlink.getldflags(cfg) - local flags = config.mapFlags(cfg, tdmd.optlink.ldflags) - return flags - end - - --- --- Return a list of decorated additional libraries directories. --- - - function tdmd.optlink.getLibraryDirectories(cfg) - local flags = {} - - -- Scan the list of linked libraries. If any are referenced with - -- paths, add those to the list of library search paths - for _, dir in ipairs(config.getlinks(cfg, "system", "directory")) do - table.insert(flags, '-Llib "' .. project.getrelative(cfg.project, dir) .. '"') - end - - return flags - end - - --- --- Returns a list of linker flags for library names. --- - - function tdmd.optlink.getlinks(cfg) - local result = {} - - local links = config.getlinks(cfg, "dependencies", "object") - for _, link in ipairs(links) do - -- skip external project references, since I have no way - -- to know the actual output target path - if not link.project.externalname then - local linkinfo = config.getlinkinfo(link) - if link.kind == p.STATICLIB then - table.insert(result, project.getrelative(cfg.project, linkinfo.abspath)) - end - end - end - - -- The "-l" flag is fine for system libraries - links = config.getlinks(cfg, "system", "basename") - for _, link in ipairs(links) do - if path.isobjectfile(link) then - table.insert(result, link) - elseif path.hasextension(link, p.systems[cfg.system].staticlib.extension) then - table.insert(result, link) - end - end - - return result - - end - - --- ///////////////////////////////////////////////////////////////////////// --- common dmd code (either toolchain) --- ///////////////////////////////////////////////////////////////////////// - - -- if we are compiling on windows, we need to specialise to OPTLINK as the linker --- OR!!! if cfg.system ~= p.WINDOWS then - if string.match( os.getversion().description, "Windows" ) ~= nil then - -- TODO: on windows, we may use OPTLINK or MSLINK (for Win64)... --- printf("TODO: select proper linker for 32/64 bit code") - - p.tools.dmd = tdmd.optlink - else - p.tools.dmd = tdmd.gcc - end - - local dmd = p.tools.dmd - - --- --- Returns list of D compiler flags for a configuration. --- - - dmd.dflags = { - architecture = { - x86 = "-m32mscoff", - x86_64 = "-m64", - }, - flags = { - OmitDefaultLibrary = "-mscrtlib=", - CodeCoverage = "-cov", - Color = "-color", - Documentation = "-D", - FatalWarnings = "-w", - GenerateHeader = "-H", - GenerateJSON = "-X", - GenerateMap = "-map", - LowMem = "-lowmem", - Profile = "-profile", - Quiet = "-quiet", - RetainPaths = "-op", - SymbolsLikeC = "-gc", - UnitTest = "-unittest", - Verbose = "-v", - ProfileGC = "-profile=gc", - StackFrame = "-gs", - StackStomp = "-gx", - AllInstantiate = "-allinst", - BetterC = "-betterC", - Main = "-main", - PerformSyntaxCheckOnly = "-o-", - ShowTLS = "-vtls", - ShowGC = "-vgc", - IgnorePragma = "-ignore", - ShowDependencies = "-deps", - }, - boundscheck = { - Off = "-boundscheck=off", - On = "-boundscheck=on", - SafeOnly = "-boundscheck=safeonly", - }, - checkaction = { - D = "-checkaction=D", - C = "-checkaction=C", - Halt = "-checkaction=halt", - Context = "-checkaction=context", - }, - cppdialect = { - ["C++latest"] = "-extern-std=c++17", -- TODO: keep this up to date >_< - ["C++98"] = "-extern-std=c++98", - ["C++0x"] = "-extern-std=c++11", - ["C++11"] = "-extern-std=c++11", - ["C++1y"] = "-extern-std=c++14", - ["C++14"] = "-extern-std=c++14", - ["C++1z"] = "-extern-std=c++17", - ["C++17"] = "-extern-std=c++17", - ["gnu++98"] = "-extern-std=c++98", - ["gnu++0x"] = "-extern-std=c++11", - ["gnu++11"] = "-extern-std=c++11", - ["gnu++1y"] = "-extern-std=c++14", - ["gnu++14"] = "-extern-std=c++14", - ["gnu++1z"] = "-extern-std=c++17", - ["gnu++17"] = "-extern-std=c++17", - }, - deprecatedfeatures = { - Allow = "-d", - Warn = "-dw", - Error = "-de", - }, - floatingpoint = { - None = "-nofloat", - }, - optimize = { - On = "-O -inline", - Full = "-O -inline", - Size = "-O -inline", - Speed = "-O -inline", - }, - pic = { - On = "-fPIC", - }, - symbols = { - On = "-g", - FastLink = "-g", - Full = "-g", - }, - vectorextensions = { - AVX = "-mcpu=avx", - AVX2 = "-mcpu=avx2", - }, - warnings = { - Default = "-wi", - High = "-wi", - Extra = "-wi", - }, - } - - function dmd.getdflags(cfg) - local flags = config.mapFlags(cfg, dmd.dflags) - - if config.isDebugBuild(cfg) then - table.insert(flags, "-debug") - else - table.insert(flags, "-release") - end - - if not cfg.flags.OmitDefaultLibrary then - local releaseruntime = not config.isDebugBuild(cfg) - local staticruntime = true - if cfg.staticruntime == "Off" then - staticruntime = false - end - if cfg.runtime == "Debug" then - releaseruntime = false - elseif cfg.runtime == "Release" then - releaseruntime = true - end - - if (cfg.staticruntime and cfg.staticruntime ~= "Default") or (cfg.runtime and cfg.runtime ~= "Default") then - if staticruntime == true and releaseruntime == true then - table.insert(flags, "-mscrtlib=libcmt") - elseif staticruntime == true and releaseruntime == false then - table.insert(flags, "-mscrtlib=libcmtd") - elseif staticruntime == false and releaseruntime == true then - table.insert(flags, "-mscrtlib=msvcrt") - elseif staticruntime == false and releaseruntime == false then - table.insert(flags, "-mscrtlib=msvcrtd") - end - end - end - - if cfg.flags.Documentation then - if cfg.docname then - table.insert(flags, "-Df" .. p.quoted(cfg.docname)) - end - if cfg.docdir then - table.insert(flags, "-Dd" .. p.quoted(cfg.docdir)) - end - end - if cfg.flags.GenerateHeader then - if cfg.headername then - table.insert(flags, "-Hf" .. p.quoted(cfg.headername)) - end - if cfg.headerdir then - table.insert(flags, "-Hd" .. p.quoted(cfg.headerdir)) - end - end - - if #cfg.preview > 0 then - for _, opt in ipairs(cfg.preview) do - table.insert(flags, "-preview=" .. opt) - end - end - if #cfg.revert > 0 then - for _, opt in ipairs(cfg.revert) do - table.insert(flags, "-revert=" .. opt) - end - end - if #cfg.transition > 0 then - for _, opt in ipairs(cfg.transition) do - table.insert(flags, "-transition=" .. opt) - end - end - - return flags - end - - --- --- Decorate versions for the DMD command line. --- - - function dmd.getversions(versions, level) - local result = {} - for _, version in ipairs(versions) do - table.insert(result, '-version=' .. version) - end - if level then - table.insert(result, '-version=' .. level) - end - return result - end - - --- --- Decorate debug constants for the DMD command line. --- - - function dmd.getdebug(constants, level) - local result = {} - for _, constant in ipairs(constants) do - table.insert(result, '-debug=' .. constant) - end - if level then - table.insert(result, '-debug=' .. level) - end - return result - end - - --- --- Decorate import file search paths for the DMD command line. --- - - function dmd.getimportdirs(cfg, dirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-I' .. p.quoted(dir)) - end - return result - end - - --- --- Decorate string import file search paths for the DMD command line. --- - - function dmd.getstringimportdirs(cfg, dirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-J' .. p.quoted(dir)) - end - return result - end - - --- --- Returns the target name specific to compiler --- - - function dmd.gettarget(name) - return "-of" .. name - end - - --- --- Returns makefile-specific configuration rules. --- - - dmd.makesettings = { - } - - function dmd.getmakesettings(cfg) - local settings = config.mapFlags(cfg, dmd.makesettings) - return table.concat(settings) - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "dc" for the D compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - dmd.tools = { - -- dmd will probably never support any foreign architectures...? - } - - function dmd.gettoolname(cfg, tool) - local names = dmd.tools[cfg.architecture] or dmd.tools[cfg.system] or {} - local name = names[tool] - return name or dmd[tool] - end diff --git a/build/premake/premake5/modules/d/tools/gdc.lua b/build/premake/premake5/modules/d/tools/gdc.lua deleted file mode 100644 index 727d03ef45..0000000000 --- a/build/premake/premake5/modules/d/tools/gdc.lua +++ /dev/null @@ -1,327 +0,0 @@ --- --- d/tools/gdc.lua --- Provides GDC-specific configuration strings. --- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project --- - - local p = premake - p.tools.gdc = { } - - local gdc = p.tools.gdc - local project = p.project - local config = p.config - local d = p.modules.d - - -- - -- Set default tools - -- - - gdc.dc = "gdc" - - --- --- Returns list of D compiler flags for a configuration. --- - - gdc.dflags = { - architecture = { - x86 = "-m32", - x86_64 = "-m64", - }, - flags = { - Documentation = "-fdoc", - FatalWarnings = "-Werror", - GenerateHeader = "-fintfc", - GenerateJSON = "-fX", --- Release = "-frelease", - RetainPaths = "-op", - SymbolsLikeC = "-fdebug-c", - UnitTest = "-funittest", - Verbose = "-fd-verbose", - -- THESE ARE THE DMD ARGS... --- ProfileGC = "-profile=gc", --- StackFrame = "-gs", --- StackStomp = "-gx", --- AllInstantiate = "-allinst", --- BetterC = "-betterC", --- Main = "-main", --- PerformSyntaxCheckOnly = "-o-", - ShowTLS = "-fd-vtls", --- ShowGC = "-vgc", --- IgnorePragma = "-ignore", - ShowDependencies = "-fdeps", - }, - boundscheck = { - Off = "-fno-bounds-check", --- On = "-boundscheck=on", --- SafeOnly = "-boundscheck=safeonly", - }, - deprecatedfeatures = { - Allow = "-fdeprecated", --- Warn = "-dw", --- Error = "-de", - }, - floatingpoint = { - Fast = "-ffast-math", - Strict = "-ffloat-store", - }, - optimize = { - Off = "-O0", - On = "-O2 -finline-functions", - Debug = "-Og", - Full = "-O3 -finline-functions", - Size = "-Os -finline-functions", - Speed = "-O3 -finline-functions", - }, - pic = { - On = "-fPIC", - }, - vectorextensions = { - AVX = "-mavx", - SSE = "-msse", - SSE2 = "-msse2", - }, - warnings = { --- Default = "-w", -- TODO: check this... - High = "-Wall", - Extra = "-Wall -Wextra", - }, - symbols = { - On = "-g", - FastLink = "-g", - Full = "-g -gf", - } - } - - function gdc.getdflags(cfg) - local flags = config.mapFlags(cfg, gdc.dflags) - - if config.isDebugBuild(cfg) then - table.insert(flags, "-fdebug") - else - table.insert(flags, "-frelease") - end - - if cfg.flags.Documentation then - if cfg.docname then - table.insert(flags, "-fdoc-file=" .. p.quoted(cfg.docname)) - end - if cfg.docdir then - table.insert(flags, "-fdoc-dir=" .. p.quoted(cfg.docdir)) - end - end - if cfg.flags.GenerateHeader then - if cfg.headername then - table.insert(flags, "-fintfc-file=" .. p.quoted(cfg.headername)) - end - if cfg.headerdir then - table.insert(flags, "-fintfc-dir=" .. p.quoted(cfg.headerdir)) - end - end - - return flags - end - - --- --- Decorate versions for the DMD command line. --- - - function gdc.getversions(versions, level) - local result = {} - for _, version in ipairs(versions) do - table.insert(result, '-fversion=' .. version) - end - if level then - table.insert(result, '-fversion=' .. level) - end - return result - end - - --- --- Decorate debug constants for the DMD command line. --- - - function gdc.getdebug(constants, level) - local result = {} - for _, constant in ipairs(constants) do - table.insert(result, '-fdebug=' .. constant) - end - if level then - table.insert(result, '-fdebug=' .. level) - end - return result - end - - --- --- Decorate import file search paths for the DMD command line. --- - - function gdc.getimportdirs(cfg, dirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-I' .. p.quoted(dir)) - end - return result - end - - --- --- Decorate import file search paths for the DMD command line. --- - - function gdc.getstringimportdirs(cfg, dirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-J' .. p.quoted(dir)) - end - return result - end - - --- --- Returns the target name specific to compiler --- - - function gdc.gettarget(name) - return "-o " .. name - end - - --- --- Return a list of LDFLAGS for a specific configuration. --- - - gdc.ldflags = { - architecture = { - x86 = { "-m32" }, - x86_64 = { "-m64" }, - }, - kind = { - SharedLib = function(cfg) - local r = { iif(cfg.system == p.MACOSX, "-dynamiclib", "-shared") } - if cfg.system == "windows" and not cfg.flags.NoImportLib then - table.insert(r, '-Wl,--out-implib="' .. cfg.linktarget.relpath .. '"') - end - return r - end, - WindowedApp = function(cfg) - if cfg.system == p.WINDOWS then return "-mwindows" end - end, - }, - } - - function gdc.getldflags(cfg) - local flags = config.mapFlags(cfg, gdc.ldflags) - return flags - end - - --- --- Return a list of decorated additional libraries directories. --- - - gdc.libraryDirectories = { - architecture = { - x86 = "-L/usr/lib", - x86_64 = "-L/usr/lib64", - } - } - - function gdc.getLibraryDirectories(cfg) - local flags = config.mapFlags(cfg, gdc.libraryDirectories) - - -- Scan the list of linked libraries. If any are referenced with - -- paths, add those to the list of library search paths - for _, dir in ipairs(config.getlinks(cfg, "system", "directory")) do - table.insert(flags, '-Wl,-L' .. project.getrelative(cfg.project, dir)) - end - - return flags - end - - --- --- Return the list of libraries to link, decorated with flags as needed. --- - - function gdc.getlinks(cfg, systemonly) - local result = {} - - local links - if not systemonly then - links = config.getlinks(cfg, "siblings", "object") - for _, link in ipairs(links) do - -- skip external project references, since I have no way - -- to know the actual output target path - if not link.project.external then - if link.kind == p.STATICLIB then - -- Don't use "-l" flag when linking static libraries; instead use - -- path/libname.a to avoid linking a shared library of the same - -- name if one is present - table.insert(result, "-Wl," .. project.getrelative(cfg.project, link.linktarget.abspath)) - else - table.insert(result, "-Wl,-l" .. link.linktarget.basename) - end - end - end - end - - -- The "-l" flag is fine for system libraries - links = config.getlinks(cfg, "system", "fullpath") - for _, link in ipairs(links) do - if path.isframework(link) then - table.insert(result, "-framework " .. path.getbasename(link)) - elseif path.isobjectfile(link) then - table.insert(result, "-Wl," .. link) - else - table.insert(result, "-Wl,-l" .. path.getbasename(link)) - end - end - - return result - end - - --- --- Returns makefile-specific configuration rules. --- - - gdc.makesettings = { - } - - function gdc.getmakesettings(cfg) - local settings = config.mapFlags(cfg, gdc.makesettings) - return table.concat(settings) - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "dc" for the D compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - gdc.tools = { - ps3 = { - dc = "ppu-lv2-gdc", - ar = "ppu-lv2-ar", - }, - } - - function gdc.gettoolname(cfg, tool) - local names = gdc.tools[cfg.architecture] or gdc.tools[cfg.system] or {} - local name = names[tool] - return name or gdc[tool] - end diff --git a/build/premake/premake5/modules/d/tools/ldc.lua b/build/premake/premake5/modules/d/tools/ldc.lua deleted file mode 100644 index 4c63ae9d6b..0000000000 --- a/build/premake/premake5/modules/d/tools/ldc.lua +++ /dev/null @@ -1,413 +0,0 @@ --- --- d/tools/ldc.lua --- Provides LDC-specific configuration strings. --- Copyright (c) 2013-2015 Andrew Gough, Manu Evans, and the Premake project --- - - local p = premake - p.tools.ldc = { } - - local ldc = p.tools.ldc - local project = p.project - local config = p.config - local d = p.modules.d - - --- --- Set default tools --- - - ldc.namestyle = "posix" - - --- --- Returns list of D compiler flags for a configuration. --- - - - ldc.dflags = { - architecture = { - x86 = "-m32", - x86_64 = "-m64", - ARM = "-march=arm", - ARM64 = "-march=aarch64", --- ppc = "-march=ppc32", --- ppc64 = "-march=ppc64", --- spu = "-march=cellspu", --- mips = "-march=mips", -- -march=mipsel? - }, - flags = { - OmitDefaultLibrary = "-mscrtlib=", - CodeCoverage = "-cov", - Color = "-enable-color", - Documentation = "-D", - FatalWarnings = "-w", -- Use LLVM flag? : "-fatal-assembler-warnings", - GenerateHeader = "-H", - GenerateJSON = "-X", - LowMem = "-lowmem", - RetainPaths = "-op", - SymbolsLikeC = "-gc", - UnitTest = "-unittest", - Verbose = "-v", - AllInstantiate = "-allinst", - BetterC = "-betterC", - Main = "-main", - PerformSyntaxCheckOnly = "-o-", - ShowGC = "-vgc", - IgnorePragma = "-ignore", - }, - boundscheck = { - Off = "-boundscheck=off", - On = "-boundscheck=on", - SafeOnly = "-boundscheck=safeonly", - }, - checkaction = { - D = "-checkaction=D", - C = "-checkaction=C", - Halt = "-checkaction=halt", - Context = "-checkaction=context", - }, - cppdialect = { - ["C++latest"] = "-extern-std=c++17", -- TODO: keep this up to date >_< - ["C++98"] = "-extern-std=c++98", - ["C++0x"] = "-extern-std=c++11", - ["C++11"] = "-extern-std=c++11", - ["C++1y"] = "-extern-std=c++14", - ["C++14"] = "-extern-std=c++14", - ["C++1z"] = "-extern-std=c++17", - ["C++17"] = "-extern-std=c++17", - ["gnu++98"] = "-extern-std=c++98", - ["gnu++0x"] = "-extern-std=c++11", - ["gnu++11"] = "-extern-std=c++11", - ["gnu++1y"] = "-extern-std=c++14", - ["gnu++14"] = "-extern-std=c++14", - ["gnu++1z"] = "-extern-std=c++17", - ["gnu++17"] = "-extern-std=c++17", - }, - deprecatedfeatures = { - Allow = "-d", - Warn = "-dw", - Error = "-de", - }, - floatingpoint = { - Fast = "-fp-contract=fast -enable-unsafe-fp-math", --- Strict = "-ffloat-store", - }, - optimize = { - Off = "-O0", - On = "-O2", - Debug = "-O0", - Full = "-O3", - Size = "-Oz", - Speed = "-O3", - }, - pic = { - On = "-relocation-model=pic", - }, - vectorextensions = { - AVX = "-mattr=+avx", - AVX2 = "-mattr=+avx2", - SSE = "-mattr=+sse", - SSE2 = "-mattr=+sse2", - SSE3 = "-mattr=+sse3", - SSSE3 = "-mattr=+ssse3", - ["SSE4.1"] = "-mattr=+sse4.1", - }, - warnings = { - Default = "-wi", - High = "-wi", - Extra = "-wi", -- TODO: is there a way to get extra warnings? - }, - symbols = { - On = "-g", - FastLink = "-g", - Full = "-g", - } - } - - function ldc.getdflags(cfg) - local flags = config.mapFlags(cfg, ldc.dflags) - - if config.isDebugBuild(cfg) then - table.insert(flags, "-d-debug") - else - table.insert(flags, "-release") - end - - if not cfg.flags.OmitDefaultLibrary then - local releaseruntime = not config.isDebugBuild(cfg) - local staticruntime = true - if cfg.staticruntime == "Off" then - staticruntime = false - end - if cfg.runtime == "Debug" then - releaseruntime = false - elseif cfg.runtime == "Release" then - releaseruntime = true - end - - if (cfg.staticruntime and cfg.staticruntime ~= "Default") or (cfg.runtime and cfg.runtime ~= "Default") then - if staticruntime == true and releaseruntime == true then - table.insert(flags, "-mscrtlib=libcmt") - elseif staticruntime == true and releaseruntime == false then - table.insert(flags, "-mscrtlib=libcmtd") - elseif staticruntime == false and releaseruntime == true then - table.insert(flags, "-mscrtlib=msvcrt") - elseif staticruntime == false and releaseruntime == false then - table.insert(flags, "-mscrtlib=msvcrtd") - end - end - end - - if cfg.flags.Documentation then - if cfg.docname then - table.insert(flags, "-Df=" .. p.quoted(cfg.docname)) - end - if cfg.docdir then - table.insert(flags, "-Dd=" .. p.quoted(cfg.docdir)) - end - end - if cfg.flags.GenerateHeader then - if cfg.headername then - table.insert(flags, "-Hf=" .. p.quoted(cfg.headername)) - end - if cfg.headerdir then - table.insert(flags, "-Hd=" .. p.quoted(cfg.headerdir)) - end - end - - if #cfg.computetargets > 0 then - table.insert(flags, "-mdcompute-targets=" .. table.concat(cfg.computetargets, ',')) - end - - if #cfg.isaextensions > 0 then - local isaMap = { - MOVBE = "movbe", - POPCNT = "popcnt", - PCLMUL = "pclmul", - LZCNT = "lzcnt", - BMI = "bmi", - BMI2 = "bmi2", - F16C = "f16c", - AES = "aes", - FMA = "fma", - FMA4 = "fma4", - RDRND = "rdrnd", - } - for _, ext in ipairs(cfg.transition) do - if isaMap[ext] ~= nil then - table.insert(flags, "-mattr=+" .. isaMap[ext]) - end - end - end - - if #cfg.preview > 0 then - for _, opt in ipairs(cfg.preview) do - table.insert(flags, "-preview=" .. opt) - end - end - if #cfg.revert > 0 then - for _, opt in ipairs(cfg.revert) do - table.insert(flags, "-revert=" .. opt) - end - end - if #cfg.transition > 0 then - for _, opt in ipairs(cfg.transition) do - table.insert(flags, "-transition=" .. opt) - end - end - - return flags - end - - --- --- Decorate versions for the DMD command line. --- - - function ldc.getversions(versions, level) - local result = {} - for _, version in ipairs(versions) do - table.insert(result, '-d-version=' .. version) - end - if level then - table.insert(result, '-d-version=' .. level) - end - return result - end - - --- --- Decorate debug constants for the DMD command line. --- - - function ldc.getdebug(constants, level) - local result = {} - for _, constant in ipairs(constants) do - table.insert(result, '-d-debug=' .. constant) - end - if level then - table.insert(result, '-d-debug=' .. level) - end - return result - end - - --- --- Decorate import file search paths for the DMD command line. --- - - function ldc.getimportdirs(cfg, dirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-I=' .. p.quoted(dir)) - end - return result - end - - --- --- Decorate import file search paths for the DMD command line. --- - - function ldc.getstringimportdirs(cfg, dirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-J=' .. p.quoted(dir)) - end - return result - end - - --- --- Returns the target name specific to compiler --- - - function ldc.gettarget(name) - return "-of=" .. name - end - - --- --- Return a list of LDFLAGS for a specific configuration. --- - - ldc.ldflags = { - architecture = { - x86 = { "-m32" }, - x86_64 = { "-m64" }, - }, - kind = { - SharedLib = "-shared", - StaticLib = "-lib", - }, - } - - function ldc.getldflags(cfg) - local flags = config.mapFlags(cfg, ldc.ldflags) - return flags - end - - --- --- Return a list of decorated additional libraries directories. --- - - ldc.libraryDirectories = { - architecture = { - x86 = "-L=-L/usr/lib", - x86_64 = "-L=-L/usr/lib64", - } - } - - function ldc.getLibraryDirectories(cfg) - local flags = config.mapFlags(cfg, ldc.libraryDirectories) - - -- Scan the list of linked libraries. If any are referenced with - -- paths, add those to the list of library search paths - for _, dir in ipairs(config.getlinks(cfg, "system", "directory")) do - table.insert(flags, '-L=-L' .. project.getrelative(cfg.project, dir)) - end - - return flags - end - - --- --- Return the list of libraries to link, decorated with flags as needed. --- - - function ldc.getlinks(cfg, systemonly) - local result = {} - - local links - if not systemonly then - links = config.getlinks(cfg, "siblings", "object") - for _, link in ipairs(links) do - -- skip external project references, since I have no way - -- to know the actual output target path - if not link.project.external then - if link.kind == p.STATICLIB then - -- Don't use "-l" flag when linking static libraries; instead use - -- path/libname.a to avoid linking a shared library of the same - -- name if one is present - table.insert(result, "-L=" .. project.getrelative(cfg.project, link.linktarget.abspath)) - else - table.insert(result, "-L=-l" .. link.linktarget.basename) - end - end - end - end - - -- The "-l" flag is fine for system libraries - links = config.getlinks(cfg, "system", "fullpath") - for _, link in ipairs(links) do - if path.isframework(link) then - table.insert(result, "-framework " .. path.getbasename(link)) - elseif path.isobjectfile(link) then - table.insert(result, "-L=" .. link) - else - table.insert(result, "-L=-l" .. path.getbasename(link)) - end - end - - return result - end - - --- --- Returns makefile-specific configuration rules. --- - - ldc.makesettings = { - } - - function ldc.getmakesettings(cfg) - local settings = config.mapFlags(cfg, ldc.makesettings) - return table.concat(settings) - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "dc" for the D compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - ldc.tools = { - dc = "ldc2", - ar = "ar", - } - - function ldc.gettoolname(cfg, tool) - return ldc.tools[tool] - end diff --git a/build/premake/premake5/modules/gmake/_manifest.lua b/build/premake/premake5/modules/gmake/_manifest.lua deleted file mode 100644 index 11adfd1fbd..0000000000 --- a/build/premake/premake5/modules/gmake/_manifest.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "_preload.lua", - "gmake.lua", - "gmake_cpp.lua", - "gmake_csharp.lua", - "gmake_makefile.lua", - "gmake_utility.lua", - "gmake_workspace.lua", -} diff --git a/build/premake/premake5/modules/gmake/_preload.lua b/build/premake/premake5/modules/gmake/_preload.lua deleted file mode 100644 index 968daeaab9..0000000000 --- a/build/premake/premake5/modules/gmake/_preload.lua +++ /dev/null @@ -1,64 +0,0 @@ --- --- _preload.lua --- Define the makefile action(s). --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - - local p = premake - local project = p.project - ---- --- The GNU make action, with support for the new platforms API ---- - - newaction { - trigger = "gmake", - shortname = "GNU Make", - description = "Generate GNU makefiles for POSIX, MinGW, and Cygwin", - toolset = "gcc", - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Utility", "Makefile" }, - valid_languages = { "C", "C++", "C#" }, - valid_tools = { - cc = { "clang", "gcc" }, - dotnet = { "mono", "msnet", "pnet" } - }, - - onWorkspace = function(wks) - p.escaper(p.make.esc) - p.generate(wks, p.make.getmakefilename(wks, false), p.make.generate_workspace) - end, - - onProject = function(prj) - p.escaper(p.make.esc) - local makefile = p.make.getmakefilename(prj, true) - if prj.kind == p.UTILITY then - p.generate(prj, makefile, p.make.utility.generate) - elseif prj.kind == p.MAKEFILE then - p.generate(prj, makefile, p.make.makefile.generate) - else - if project.isdotnet(prj) then - p.generate(prj, makefile, p.make.cs.generate) - elseif project.isc(prj) or project.iscpp(prj) then - p.generate(prj, makefile, p.make.cpp.generate) - end - end - end, - - onCleanWorkspace = function(wks) - p.clean.file(wks, p.make.getmakefilename(wks, false)) - end, - - onCleanProject = function(prj) - p.clean.file(prj, p.make.getmakefilename(prj, true)) - end - } - - --- --- Decide when the full module should be loaded. --- - - return function(cfg) - return (_ACTION == "gmake") - end diff --git a/build/premake/premake5/modules/gmake/gmake.lua b/build/premake/premake5/modules/gmake/gmake.lua deleted file mode 100644 index 4c184d3d67..0000000000 --- a/build/premake/premake5/modules/gmake/gmake.lua +++ /dev/null @@ -1,302 +0,0 @@ --- --- gmake.lua --- Define the makefile action(s). --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - - local p = premake - - p.modules.gmake = {} - p.modules.gmake._VERSION = p._VERSION - - -- for backwards compatibility. - p.make = p.modules.gmake - - local make = p.make - local project = p.project - --- --- Write out the default configuration rule for a workspace or project. --- --- @param target --- The workspace or project object for which a makefile is being generated. --- - - function make.defaultconfig(target) - -- find the right configuration iterator function for this object - local eachconfig = iif(target.project, project.eachconfig, p.workspace.eachconfig) - local defaultconfig = nil - - -- find the right default configuration platform, grab first configuration that matches - if target.defaultplatform then - for cfg in eachconfig(target) do - if cfg.platform == target.defaultplatform then - defaultconfig = cfg - break - end - end - end - - -- grab the first configuration and write the block - if not defaultconfig then - local iter = eachconfig(target) - defaultconfig = iter() - end - - if defaultconfig then - _p('ifndef config') - _x(' config=%s', defaultconfig.shortname) - _p('endif') - _p('') - end - end - - ---- --- Escape a string so it can be written to a makefile. ---- - - function make.esc(value) - result = value:gsub("\\", "\\\\") - result = result:gsub("\"", "\\\"") - result = result:gsub(" ", "\\ ") - result = result:gsub("%(", "\\(") - result = result:gsub("%)", "\\)") - - -- leave $(...) shell replacement sequences alone - result = result:gsub("$\\%((.-)\\%)", "$(%1)") - return result - end - - --- --- Get the makefile file name for a workspace or a project. If this object is the --- only one writing to a location then I can use "Makefile". If more than one object --- writes to the same location I use name + ".make" to keep it unique. --- - - function make.getmakefilename(this, searchprjs) - local count = 0 - for wks in p.global.eachWorkspace() do - if wks.location == this.location then - count = count + 1 - end - - if searchprjs then - for _, prj in ipairs(wks.projects) do - if prj.location == this.location then - count = count + 1 - end - end - end - end - - if count == 1 then - return "Makefile" - else - return ".make" - end - end - - --- --- Output a makefile header. --- --- @param target --- The workspace or project object for which the makefile is being generated. --- - - function make.header(target) - local kind = iif(target.project, "project", "workspace") - - _p('# %s %s makefile autogenerated by Premake', p.action.current().shortname, kind) - _p('') - - if kind == "workspace" then - local haspch = false - for _, prj in ipairs(target.projects) do - for cfg in project.eachconfig(prj) do - if cfg.pchheader then - haspch = true - end - end - end - - if haspch then - _p('.NOTPARALLEL:') - _p('') - end - end - - make.defaultconfig(target) - - _p('ifndef verbose') - _p(' SILENT = @') - _p('endif') - _p('') - end - - --- --- Rules for file ops based on the shell type. Can't use defines and $@ because --- it screws up the escaping of spaces and parethesis (anyone know a fix?) --- - - function make.mkdir(dirname) - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) mkdir -p %s', dirname) - _p('else') - _p('\t$(SILENT) mkdir $(subst /,\\\\,%s)', dirname) - _p('endif') - end - - function make.mkdirRules(dirname) - _p('%s:', dirname) - _p('\t@echo Creating %s', dirname) - make.mkdir(dirname) - _p('') - end - --- --- Format a list of values to be safely written as part of a variable assignment. --- - - function make.list(value, quoted) - quoted = false - if #value > 0 then - if quoted then - local result = "" - for _, v in ipairs (value) do - if #result then - result = result .. " " - end - result = result .. p.quoted(v) - end - return result - else - return " " .. table.concat(value, " ") - end - else - return "" - end - end - - --- --- Convert an arbitrary string (project name) to a make variable name. --- - - function make.tovar(value) - value = value:gsub("[ -]", "_") - value = value:gsub("[()]", "") - return value - end - - ---------------------------------------------------------------------------- --- --- Handlers for the individual makefile elements that can be shared --- between the different language projects. --- ---------------------------------------------------------------------------- - - function make.objdir(cfg) - _x(' OBJDIR = %s', p.esc(project.getrelative(cfg.project, cfg.objdir))) - end - - - function make.objDirRules(prj) - make.mkdirRules("$(OBJDIR)") - end - - - function make.phonyRules(prj) - _p('.PHONY: clean prebuild prelink') - _p('') - end - - - function make.buildCmds(cfg, event) - _p(' define %sCMDS', event:upper()) - local steps = cfg[event .. "commands"] - local msg = cfg[event .. "message"] - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - msg = msg or string.format("Running %s commands", event) - _p('\t@echo %s', msg) - _p('\t%s', table.implode(steps, "", "", "\n\t")) - end - _p(' endef') - end - - - function make.preBuildCmds(cfg, toolset) - make.buildCmds(cfg, "prebuild") - end - - - function make.preBuildRules(prj) - _p('prebuild:') - _p('\t$(PREBUILDCMDS)') - _p('') - end - - - function make.preLinkCmds(cfg, toolset) - make.buildCmds(cfg, "prelink") - end - - - function make.preLinkRules(prj) - _p('prelink:') - _p('\t$(PRELINKCMDS)') - _p('') - end - - - function make.postBuildCmds(cfg, toolset) - make.buildCmds(cfg, "postbuild") - end - - - function make.settings(cfg, toolset) - if #cfg.makesettings > 0 then - for _, value in ipairs(cfg.makesettings) do - _p(value) - end - end - - local value = toolset.getmakesettings(cfg) - if value then - _p(value) - end - end - - - function make.shellType() - _p('SHELLTYPE := posix') - _p('ifeq (.exe,$(findstring .exe,$(ComSpec)))') - _p('\tSHELLTYPE := msdos') - _p('endif') - _p('') - end - - - function make.target(cfg) - _x(' TARGETDIR = %s', project.getrelative(cfg.project, cfg.buildtarget.directory)) - _x(' TARGET = $(TARGETDIR)/%s', cfg.buildtarget.name) - end - - - function make.targetDirRules(prj) - make.mkdirRules("$(TARGETDIR)") - end - - - include("gmake_cpp.lua") - include("gmake_csharp.lua") - include("gmake_makefile.lua") - include("gmake_utility.lua") - include("gmake_workspace.lua") - - return p.modules.gmake diff --git a/build/premake/premake5/modules/gmake/gmake_cpp.lua b/build/premake/premake5/modules/gmake/gmake_cpp.lua deleted file mode 100644 index 9358a37685..0000000000 --- a/build/premake/premake5/modules/gmake/gmake_cpp.lua +++ /dev/null @@ -1,634 +0,0 @@ --- --- make_cpp.lua --- Generate a C/C++ project makefile. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - local p = premake - - p.make.cpp = {} - - local make = p.make - local cpp = p.make.cpp - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - - ---- --- Add namespace for element definition lists for p.callarray() ---- - - cpp.elements = {} - - --- --- Generate a GNU make C++ project makefile, with support for the new platforms API. --- - - cpp.elements.makefile = function(prj) - return { - make.header, - make.phonyRules, - make.cppConfigs, - make.cppObjects, - make.shellType, - make.cppTargetRules, - make.cppCustomFilesRules, - make.cppTargetDirRules, - make.cppObjDirRules, - make.cppCleanRules, - make.preBuildRules, - make.preLinkRules, - make.pchRules, - make.cppFileRules, - make.cppDependencies, - } - end - - -- should be part of the toolset? - function make.fileTypeExtensions() - return { - ["objects"] = "o", - ["resources"] = "res", - } - end - - -- should be part of the toolset? - function make.fileType(node) - local kind - if path.iscppfile(node.abspath) then - kind = "objects" - elseif path.isresourcefile(node.abspath) then - kind = "resources" - end - - return kind - end - - function make.fileDependency(prj, node) - local filetype = make.fileType(node) - _x('$(OBJDIR)/%s.%s: %s', node.objname, make.fileTypeExtensions()[filetype], node.relpath) - _p('\t@echo $(notdir $<)') - end - - function make.cpp.generate(prj) - p.eol("\n") - p.callArray(cpp.elements.makefile, prj) - end - --- --- Write out the commands for compiling a file --- - - cpp.elements.standardFileRules = function(prj, node) - return { - make.fileDependency, - cpp.standardFileRules, - } - end - - cpp.elements.customFileRules = function(prj, node) - return { - make.fileDependency, - cpp.customFileRules, - } - end - - cpp.elements.customBuildRules = function(prj, node) - return { - cpp.customFileRules - } - end - --- --- Write out the settings for a particular configuration. --- - - cpp.elements.configuration = function(cfg, toolset) - return { - make.configBegin, - make.cppTools, - make.target, - make.objdir, - make.pch, - make.defines, - make.includes, - make.forceInclude, - make.cppFlags, - make.cFlags, - make.cxxFlags, - make.resFlags, - make.libs, - make.ldDeps, - make.ldFlags, - make.linkCmd, - make.exePaths, - make.preBuildCmds, - make.preLinkCmds, - make.postBuildCmds, - make.cppAllRules, - make.settings, - make.configEnd, - } - end - - function make.cppConfigs(prj) - for cfg in project.eachconfig(prj) do - -- identify the toolset used by this configurations (would be nicer if - -- this were computed and stored with the configuration up front) - - local toolset = p.tools[_OPTIONS.cc or cfg.toolset or "gcc"] - if not toolset then - error("Invalid toolset '" .. cfg.toolset .. "'") - end - - p.callArray(cpp.elements.configuration, cfg, toolset) - _p('') - end - end - - - function make.exePaths(cfg) - local dirs = project.getrelative(cfg.project, cfg.bindirs) - if #dirs > 0 then - _p(' EXECUTABLE_PATHS = "%s"', table.concat(dirs, ":")) - _p(' EXE_PATHS = export PATH=$(EXECUTABLE_PATHS):$$PATH;') - end - end - --- --- Return the start of the compilation string that corresponds to the 'compileas' enum if set --- - - function cpp.compileas(prj, node) - local result - if node["compileas"] then - if p.languages.isc(node.compileas) or node.compileas == p.OBJECTIVEC then - result = '$(CC) $(ALL_CFLAGS)' - elseif p.languages.iscpp(node.compileas) or node.compileas == p.OBJECTIVECPP then - result = '$(CXX) $(ALL_CXXFLAGS)' - end - end - - return result - end - --- --- Build command for a single file. --- - - function cpp.buildcommand(prj, objext, node) - local flags = cpp.compileas(prj, node) - if not flags then - local iscfile = node and path.iscfile(node.abspath) or false - flags = iif(prj.language == "C" or iscfile, '$(CC) $(ALL_CFLAGS)', '$(CXX) $(ALL_CXXFLAGS)') - end - _p('\t$(SILENT) %s $(FORCE_INCLUDE) -o "$@" -MF "$(@:%%.%s=%%.d)" -c "$<"', flags, objext) - end - - --- --- Output the list of file building rules. --- - - function make.cppFileRules(prj) - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - -- check to see if this file has custom rules - local rules - for cfg in project.eachconfig(prj) do - local filecfg = fileconfig.getconfig(node, cfg) - if fileconfig.hasCustomBuildRule(filecfg) then - rules = cpp.elements.customBuildRules(prj, node) - break - end - - if fileconfig.hasFileSettings(filecfg) then - rules = cpp.elements.customFileRules(prj, node) - break - end - end - - if not rules and make.fileType(node) then - rules = cpp.elements.standardFileRules(prj, node) - end - - if rules then - p.callArray(rules, prj, node) - end - end - }) - _p('') - end - - function cpp.standardFileRules(prj, node) - local kind = make.fileType(node) - - -- C/C++ file - if kind == "objects" then - cpp.buildcommand(prj, make.fileTypeExtensions()[kind], node) - -- resource file - elseif kind == "resources" then - _p('\t$(SILENT) $(RESCOMP) $< -O coff -o "$@" $(ALL_RESFLAGS)') - end - end - - function cpp.customFileRules(prj, node) - for cfg in project.eachconfig(prj) do - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg then - make.configBegin(cfg) - -if fileconfig.hasCustomBuildRule(filecfg) then - local output = project.getrelative(prj, filecfg.buildoutputs[1]) - local dependencies = filecfg.relpath - if filecfg.buildinputs and #filecfg.buildinputs > 0 then - local inputs = project.getrelative(prj, filecfg.buildinputs) - dependencies = dependencies .. " " .. table.concat(p.esc(inputs), " ") - end - _p('%s: %s', output, dependencies) - _p('\t@echo "%s"', filecfg.buildmessage or ("Building " .. filecfg.relpath)) - - local cmds = os.translateCommandsAndPaths(filecfg.buildcommands, cfg.project.basedir, cfg.project.location) - for _, cmd in ipairs(cmds) do - if cfg.bindirs and #cfg.bindirs > 0 then - _p('\t$(SILENT) $(EXE_PATHS) %s', cmd) - else - _p('\t$(SILENT) %s', cmd) - end - end -else - cpp.standardFileRules(prj, filecfg) -end - make.configEnd(cfg) - end - end - end - - --- --- List the objects file for the project, and each configuration. --- - - function make.cppObjects(prj) - -- create lists for intermediate files, at the project level and - -- for each configuration - local root = { objects={}, resources={}, customfiles={} } - local configs = {} - for cfg in project.eachconfig(prj) do - configs[cfg] = { objects={}, resources={}, customfiles={} } - end - - -- now walk the list of files in the project - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - -- figure out what configurations contain this file, and - -- if it uses custom build rules - local incfg = {} - local inall = true - local custom = false - for cfg in project.eachconfig(prj) do - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg and not filecfg.flags.ExcludeFromBuild then - incfg[cfg] = filecfg - custom = fileconfig.hasCustomBuildRule(filecfg) - else - inall = false - end - end - - if not custom then - -- identify the file type - local kind - if path.iscppfile(node.abspath) then - kind = "objects" - elseif path.isresourcefile(node.abspath) then - kind = "resources" - end - - -- skip files that aren't compiled - if not custom and not kind then - return - end - - -- assign a unique object file name to avoid collisions - objectname = "$(OBJDIR)/" .. node.objname .. iif(kind == "objects", ".o", ".res") - - -- if this file exists in all configurations, write it to - -- the project's list of files, else add to specific cfgs - if inall then - table.insert(root[kind], objectname) - else - for cfg in project.eachconfig(prj) do - if incfg[cfg] then - table.insert(configs[cfg][kind], objectname) - end - end - end - - else - for cfg in project.eachconfig(prj) do - local filecfg = incfg[cfg] - if filecfg then - local output = project.getrelative(prj, filecfg.buildoutputs[1]) - if path.isobjectfile(output) and (filecfg.linkbuildoutputs == true or filecfg.linkbuildoutputs == nil) then - table.insert(configs[cfg].objects, output) - else - table.insert(configs[cfg].customfiles, output) - end - end - end - end - - end - }) - - -- now I can write out the lists, project level first... - function listobjects(var, list) - _p('%s \\', var) - for _, objectname in ipairs(list) do - _x('\t%s \\', objectname) - end - _p('') - end - - listobjects('OBJECTS :=', root.objects, 'o') - listobjects('RESOURCES :=', root.resources, 'res') - listobjects('CUSTOMFILES :=', root.customfiles) - - -- ...then individual configurations, as needed - for cfg in project.eachconfig(prj) do - local files = configs[cfg] - if #files.objects > 0 or #files.resources > 0 or #files.customfiles > 0 then - make.configBegin(cfg, toolset) - if #files.objects > 0 then - listobjects(' OBJECTS +=', files.objects) - end - if #files.resources > 0 then - listobjects(' RESOURCES +=', files.resources) - end - if #files.customfiles > 0 then - listobjects(' CUSTOMFILES +=', files.customfiles) - end - make.configEnd(cfg, toolset) - _p('') - end - end - end - - ---------------------------------------------------------------------------- --- --- Handlers for individual makefile elements --- ---------------------------------------------------------------------------- - - function make.configBegin(cfg, toolset) - if cfg then - _x('ifeq ($(config),%s)', cfg.shortname) - end - end - - function make.configEnd(cfg, toolset) - if cfg then - _p('endif') - end - end - - function make.cFlags(cfg, toolset) - _p(' ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS)%s', make.list(table.join(toolset.getcflags(cfg), cfg.buildoptions))) - end - - - function make.cppAllRules(cfg, toolset) - if cfg.system == p.MACOSX and cfg.kind == p.WINDOWEDAPP then - _p('all: prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist') - _p('\t@:') - _p('') - _p('$(dir $(TARGETDIR))PkgInfo:') - _p('$(dir $(TARGETDIR))Info.plist:') - else - _p('all: prebuild prelink $(TARGET)') - _p('\t@:') - end - end - - - function make.cppFlags(cfg, toolset) - _p(' ALL_CPPFLAGS += $(CPPFLAGS)%s $(DEFINES) $(INCLUDES)', make.list(toolset.getcppflags(cfg))) - end - - - function make.cxxFlags(cfg, toolset) - _p(' ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS)%s', make.list(table.join(toolset.getcxxflags(cfg), cfg.buildoptions))) - end - - - function make.cppCleanRules(prj) - _p('clean:') - _p('\t@echo Cleaning %s', prj.name) - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) rm -f $(TARGET)') - _p('\t$(SILENT) rm -rf $(OBJDIR)') - _p('else') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(TARGET)) del $(subst /,\\\\,$(TARGET))') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\,$(OBJDIR))') - _p('endif') - _p('') - end - - - function make.cppDependencies(prj) - -- include the dependencies, built by GCC (with the -MMD flag) - _p('-include $(OBJECTS:%%.o=%%.d)') - _p('ifneq (,$(PCH))') - _p(' -include $(OBJDIR)/$(notdir $(PCH)).d') - _p('endif') - end - - - function make.cppTargetRules(prj) - _p('$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR)') - _p('\t@echo Linking %s', prj.name) - _p('\t$(SILENT) $(LINKCMD)') - _p('\t$(POSTBUILDCMDS)') - _p('') - end - - function make.cppCustomFilesRules(prj) - _p('$(CUSTOMFILES): | $(OBJDIR)') - _p('') - end - - function make.cppTargetDirRules(prj) - _p('$(TARGETDIR):') - _p('\t@echo Creating $(TARGETDIR)') - make.mkdir('$(TARGETDIR)') - _p('') - end - - function make.cppObjDirRules(prj) - _p('$(OBJDIR):') - _p('\t@echo Creating $(OBJDIR)') - make.mkdir('$(OBJDIR)') - _p('') - end - - function make.cppTools(cfg, toolset) - local tool = toolset.gettoolname(cfg, "cc") - if tool then - _p(' ifeq ($(origin CC), default)') - _p(' CC = %s', tool) - _p(' endif' ) - end - - tool = toolset.gettoolname(cfg, "cxx") - if tool then - _p(' ifeq ($(origin CXX), default)') - _p(' CXX = %s', tool) - _p(' endif' ) - end - - tool = toolset.gettoolname(cfg, "ar") - if tool then - _p(' ifeq ($(origin AR), default)') - _p(' AR = %s', tool) - _p(' endif' ) - end - - tool = toolset.gettoolname(cfg, "rc") - if tool then - _p(' RESCOMP = %s', tool) - end - end - - - function make.defines(cfg, toolset) - _p(' DEFINES +=%s', make.list(table.join(toolset.getdefines(cfg.defines, cfg), toolset.getundefines(cfg.undefines)))) - end - - - function make.forceInclude(cfg, toolset) - local includes = toolset.getforceincludes(cfg) - if not cfg.flags.NoPCH and cfg.pchheader then - table.insert(includes, 1, "-include $(OBJDIR)/$(notdir $(PCH))") - end - _x(' FORCE_INCLUDE +=%s', make.list(includes)) - end - - - function make.includes(cfg, toolset) - local includes = toolset.getincludedirs(cfg, cfg.includedirs, cfg.sysincludedirs) - _p(' INCLUDES +=%s', make.list(includes)) - end - - - function make.ldDeps(cfg, toolset) - local deps = config.getlinks(cfg, "siblings", "fullpath") - _p(' LDDEPS +=%s', make.list(p.esc(deps))) - end - - - function make.ldFlags(cfg, toolset) - local flags = table.join(toolset.getLibraryDirectories(cfg), toolset.getrunpathdirs(cfg, cfg.runpathdirs), toolset.getldflags(cfg), cfg.linkoptions) - _p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(flags)) - end - - - function make.libs(cfg, toolset) - local flags = toolset.getlinks(cfg) - _p(' LIBS +=%s', make.list(flags, true)) - end - - - function make.linkCmd(cfg, toolset) - if cfg.kind == p.STATICLIB then - if cfg.architecture == p.UNIVERSAL then - _p(' LINKCMD = libtool -o "$@" $(OBJECTS)') - else - _p(' LINKCMD = $(AR) ' .. (toolset.arargs or '-rcs') ..' "$@" $(OBJECTS)') - end - elseif cfg.kind == p.UTILITY then - -- Empty LINKCMD for Utility (only custom build rules) - _p(' LINKCMD =') - else - -- this was $(TARGET) $(LDFLAGS) $(OBJECTS) - -- but had trouble linking to certain static libs; $(OBJECTS) moved up - -- $(LDFLAGS) moved to end (http://sourceforge.net/p/premake/patches/107/) - -- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/) - - local cc = iif(p.languages.isc(cfg.language), "CC", "CXX") - _p(' LINKCMD = $(%s) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)', cc) - end - end - - - function make.pch(cfg, toolset) - -- If there is no header, or if PCH has been disabled, I can early out - if not cfg.pchheader or cfg.flags.NoPCH then - return - end - - -- Visual Studio requires the PCH header to be specified in the same way - -- it appears in the #include statements used in the source code; the PCH - -- source actual handles the compilation of the header. GCC compiles the - -- header file directly, and needs the file's actual file system path in - -- order to locate it. - - -- To maximize the compatibility between the two approaches, see if I can - -- locate the specified PCH header on one of the include file search paths - -- and, if so, adjust the path automatically so the user doesn't have - -- add a conditional configuration to the project script. - - local pch = cfg.pchheader - local found = false - - -- test locally in the project folder first (this is the most likely location) - local testname = path.join(cfg.project.basedir, pch) - if os.isfile(testname) then - pch = project.getrelative(cfg.project, testname) - found = true - else - -- else scan in all include dirs. - for _, incdir in ipairs(cfg.includedirs) do - testname = path.join(incdir, pch) - if os.isfile(testname) then - pch = project.getrelative(cfg.project, testname) - found = true - break - end - end - end - - if not found then - pch = project.getrelative(cfg.project, path.getabsolute(pch)) - end - - _x(' PCH = %s', pch) - _p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch') - end - - - function make.pchRules(prj) - _p('ifneq (,$(PCH))') - _p('$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR)') - _p('$(GCH): $(PCH) | $(OBJDIR)') - _p('\t@echo $(notdir $<)') - - local cmd = iif(prj.language == "C", "$(CC) -x c-header $(ALL_CFLAGS)", "$(CXX) -x c++-header $(ALL_CXXFLAGS)") - _p('\t$(SILENT) %s -o "$@" -MF "$(@:%%.gch=%%.d)" -c "$<"', cmd) - - _p('else') - _p('$(OBJECTS): | $(OBJDIR)') - _p('endif') - _p('') - end - - - function make.resFlags(cfg, toolset) - local resflags = table.join(toolset.getdefines(cfg.resdefines), toolset.getincludedirs(cfg, cfg.resincludedirs), cfg.resoptions) - _p(' ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)%s', make.list(resflags)) - end diff --git a/build/premake/premake5/modules/gmake/gmake_csharp.lua b/build/premake/premake5/modules/gmake/gmake_csharp.lua deleted file mode 100644 index 6145ab5ee3..0000000000 --- a/build/premake/premake5/modules/gmake/gmake_csharp.lua +++ /dev/null @@ -1,315 +0,0 @@ --- --- make_csharp.lua --- Generate a C# project makefile. --- Copyright (c) 2002-2013 Jason Perkins and the Premake project --- - - local p = premake - p.make.cs = {} - local make = p.make - local cs = p.make.cs - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - - --- --- Add namespace for element definition lists for p.callarray() --- - - cs.elements = {} - - --- --- Generate a GNU make C++ project makefile, with support for the new platforms API. --- - - cs.elements.makefile = function(prj) - return { - make.header, - make.phonyRules, - make.csConfigs, - make.csProjectConfig, - make.csSources, - make.csEmbedFiles, - make.csCopyFiles, - make.csResponseFile, - make.shellType, - make.csAllRules, - make.csTargetRules, - make.targetDirRules, - make.csResponseRules, - make.objDirRules, - make.csCleanRules, - make.preBuildRules, - make.preLinkRules, - make.csFileRules, - } - end - - --- --- Generate a GNU make C# project makefile, with support for the new platforms API. --- - - function make.cs.generate(prj) - p.eol("\n") - local toolset = p.tools.dotnet - p.callArray(cs.elements.makefile, prj, toolset) - end - - --- --- Write out the settings for a particular configuration. --- - - cs.elements.configuration = function(cfg) - return { - make.csTools, - make.target, - make.objdir, - make.csFlags, - make.csLinkCmd, - make.preBuildCmds, - make.preLinkCmds, - make.postBuildCmds, - make.settings, - } - end - - function make.csConfigs(prj, toolset) - for cfg in project.eachconfig(prj) do - _x('ifeq ($(config),%s)', cfg.shortname) - p.callArray(cs.elements.configuration, cfg, toolset) - _p('endif') - _p('') - end - end - - --- --- Given a .resx resource file, builds the path to corresponding .resource --- file, matching the behavior and naming of Visual Studio. --- - - function cs.getresourcefilename(cfg, fname) - if path.getextension(fname) == ".resx" then - local name = cfg.buildtarget.basename .. "." - local dir = path.getdirectory(fname) - if dir ~= "." then - name = name .. path.translate(dir, ".") .. "." - end - return "$(OBJDIR)/" .. p.esc(name .. path.getbasename(fname)) .. ".resources" - else - return fname - end - end - - --- --- Iterate and output some selection of the source code files. --- - - function cs.listsources(prj, selector) - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - local value = selector(node) - if value then - _x('\t%s \\', value) - end - end - }) - end - - - - - ---------------------------------------------------------------------------- --- --- Handlers for individual makefile elements --- ---------------------------------------------------------------------------- - - function make.csAllRules(prj, toolset) - _p('all: $(TARGETDIR) $(OBJDIR) prebuild $(EMBEDFILES) $(COPYFILES) prelink $(TARGET)') - _p('') - end - - - function make.csCleanRules(prj, toolset) - --[[ - -- porting from 4.x - _p('clean:') - _p('\t@echo Cleaning %s', prj.name) - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) rm -f $(TARGETDIR)/%s.* $(COPYFILES)', target.basename) - _p('\t$(SILENT) rm -rf $(OBJDIR)') - _p('else') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(TARGETDIR)/%s) del $(subst /,\\\\,$(TARGETDIR)/%s.*)', target.name, target.basename) - for target, source in pairs(cfgpairs[anycfg]) do - _p('\t$(SILENT) if exist $(subst /,\\\\,%s) del $(subst /,\\\\,%s)', target, target) - end - for target, source in pairs(copypairs) do - _p('\t$(SILENT) if exist $(subst /,\\\\,%s) del $(subst /,\\\\,%s)', target, target) - end - _p('\t$(SILENT) if exist $(subst /,\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\,$(OBJDIR))') - _p('endif') - _p('') - --]] - end - - - function make.csCopyFiles(prj, toolset) - --[[ - -- copied from 4.x; needs more porting - _p('COPYFILES += \\') - for target, source in pairs(cfgpairs[anycfg]) do - _p('\t%s \\', target) - end - for target, source in pairs(copypairs) do - _p('\t%s \\', target) - end - _p('') - --]] - end - - - function make.cs.getresponsefilename(prj) - return '$(OBJDIR)/' .. prj.filename .. '.rsp' - end - - - function make.csResponseFile(prj, toolset) - _x('RESPONSE += ' .. make.cs.getresponsefilename(prj)) - end - - - function make.csResponseRules(prj) - local toolset = p.tools.dotnet - local ext = make.getmakefilename(prj, true) - local makefile = path.getname(p.filename(prj, ext)) - local response = make.cs.getresponsefilename(prj) - - _p('$(RESPONSE): %s', makefile) - _p('\t@echo Generating response file', prj.name) - - _p('ifeq (posix,$(SHELLTYPE))') - _x('\t$(SILENT) rm -f $(RESPONSE)') - _p('else') - _x('\t$(SILENT) if exist $(RESPONSE) del %s', path.translate(response, '\\')) - _p('endif') - - local sep = os.istarget("windows") and "\\" or "/" - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - if toolset.fileinfo(node).action == "Compile" then - _x('\t@echo %s >> $(RESPONSE)', path.translate(node.relpath, sep)) - end - end - }) - _p('') - end - - - function make.csEmbedFiles(prj, toolset) - local cfg = project.getfirstconfig(prj) - - _p('EMBEDFILES += \\') - cs.listsources(prj, function(node) - local fcfg = fileconfig.getconfig(node, cfg) - local info = toolset.fileinfo(fcfg) - if info.action == "EmbeddedResource" then - return cs.getresourcefilename(cfg, node.relpath) - end - end) - _p('') - end - - - function make.csFileRules(prj, toolset) - --[[ - -- porting from 4.x - _p('# Per-configuration copied file rules') - for cfg in p.eachconfig(prj) do - _x('ifneq (,$(findstring %s,$(config)))', cfg.name:lower()) - for target, source in pairs(cfgpairs[cfg]) do - p.make_copyrule(source, target) - end - _p('endif') - _p('') - end - - _p('# Copied file rules') - for target, source in pairs(copypairs) do - p.make_copyrule(source, target) - end - - _p('# Embedded file rules') - for _, fname in ipairs(embedded) do - if path.getextension(fname) == ".resx" then - _x('%s: %s', getresourcefilename(prj, fname), fname) - _p('\t$(SILENT) $(RESGEN) $^ $@') - end - _p('') - end - --]] - end - - - function make.csFlags(cfg, toolset) - _p(' FLAGS =%s', make.list(toolset.getflags(cfg))) - end - - - function make.csLinkCmd(cfg, toolset) - local deps = p.esc(config.getlinks(cfg, "dependencies", "fullpath")) - _p(' DEPENDS =%s', make.list(deps)) - _p(' REFERENCES = %s', table.implode(deps, "/r:", "", " ")) - end - - - function make.csProjectConfig(prj, toolset) - -- To maintain compatibility with Visual Studio, these values must - -- be set on the project level, and not per-configuration. - local cfg = project.getfirstconfig(prj) - - local kindflag = "/t:" .. toolset.getkind(cfg):lower() - local libdirs = table.implode(p.esc(cfg.libdirs), "/lib:", "", " ") - _p('FLAGS += %s', table.concat(table.join(kindflag, libdirs), " ")) - - local refs = p.esc(config.getlinks(cfg, "system", "fullpath")) - _p('REFERENCES += %s', table.implode(refs, "/r:", "", " ")) - _p('') - end - - - function make.csSources(prj, toolset) - local cfg = project.getfirstconfig(prj) - - _p('SOURCES += \\') - cs.listsources(prj, function(node) - local fcfg = fileconfig.getconfig(node, cfg) - local info = toolset.fileinfo(fcfg) - if info.action == "Compile" then - return node.relpath - end - end) - _p('') - end - - - function make.csTargetRules(prj, toolset) - _p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS) $(RESPONSE)') - _p('\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) @$(RESPONSE) $(patsubst %%,/resource:%%,$(EMBEDFILES))') - _p('\t$(POSTBUILDCMDS)') - _p('') - end - - - function make.csTools(cfg, toolset) - _p(' CSC = %s', toolset.gettoolname(cfg, "csc")) - _p(' RESGEN = %s', toolset.gettoolname(cfg, "resgen")) - end diff --git a/build/premake/premake5/modules/gmake/gmake_makefile.lua b/build/premake/premake5/modules/gmake/gmake_makefile.lua deleted file mode 100644 index e5c67bcd14..0000000000 --- a/build/premake/premake5/modules/gmake/gmake_makefile.lua +++ /dev/null @@ -1,93 +0,0 @@ --- --- make_makefile.lua --- Generate a C/C++ project makefile. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - local p = premake - p.make.makefile = {} - - local make = p.make - local makefile = p.make.makefile - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - ---- --- Add namespace for element definition lists for p.callarray() ---- - makefile.elements = {} - --- --- Generate a GNU make makefile project makefile. --- - - makefile.elements.makefile = { - "header", - "phonyRules", - "makefileConfigs", - "makefileTargetRules" - } - - function make.makefile.generate(prj) - p.eol("\n") - p.callarray(make, makefile.elements.makefile, prj) - end - - - makefile.elements.configuration = { - "target", - "buildCommands", - "cleanCommands", - } - - function make.makefileConfigs(prj) - for cfg in project.eachconfig(prj) do - -- identify the toolset used by this configurations (would be nicer if - -- this were computed and stored with the configuration up front) - - local toolset = p.tools[cfg.toolset or "gcc"] - if not toolset then - error("Invalid toolset '" .. cfg.toolset .. "'") - end - - _x('ifeq ($(config),%s)', cfg.shortname) - p.callarray(make, makefile.elements.configuration, cfg, toolset) - _p('endif') - _p('') - end - end - - function make.makefileTargetRules(prj) - _p('$(TARGET):') - _p('\t$(BUILDCMDS)') - _p('') - _p('clean:') - _p('\t$(CLEANCMDS)') - _p('') - end - - - function make.buildCommands(cfg) - _p(' define BUILDCMDS') - local steps = cfg.buildcommands - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - _p('\t@echo Running build commands') - _p('\t%s', table.implode(steps, "", "", "\n\t")) - end - _p(' endef') - end - - - function make.cleanCommands(cfg) - _p(' define CLEANCMDS') - local steps = cfg.cleancommands - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - _p('\t@echo Running clean commands') - _p('\t%s', table.implode(steps, "", "", "\n\t")) - end - _p(' endef') - end - diff --git a/build/premake/premake5/modules/gmake/gmake_utility.lua b/build/premake/premake5/modules/gmake/gmake_utility.lua deleted file mode 100644 index bb10205fc7..0000000000 --- a/build/premake/premake5/modules/gmake/gmake_utility.lua +++ /dev/null @@ -1,67 +0,0 @@ --- --- make_utility.lua --- Generate a C/C++ project makefile. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - local p = premake - p.make.utility = {} - - local make = p.make - local utility = p.make.utility - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - ---- --- Add namespace for element definition lists for p.callarray() ---- - utility.elements = {} - --- --- Generate a GNU make utility project makefile. --- - - utility.elements.makefile = { - "header", - "phonyRules", - "utilityConfigs", - "utilityTargetRules" - } - - function make.utility.generate(prj) - p.eol("\n") - p.callarray(make, utility.elements.makefile, prj) - end - - - utility.elements.configuration = { - "target", - "preBuildCmds", - "postBuildCmds", - } - - function make.utilityConfigs(prj) - for cfg in project.eachconfig(prj) do - -- identify the toolset used by this configurations (would be nicer if - -- this were computed and stored with the configuration up front) - - local toolset = p.tools[cfg.toolset or "gcc"] - if not toolset then - error("Invalid toolset '" .. cfg.toolset .. "'") - end - - _x('ifeq ($(config),%s)', cfg.shortname) - p.callarray(make, utility.elements.configuration, cfg, toolset) - _p('endif') - _p('') - end - end - - function make.utilityTargetRules(prj) - _p('$(TARGET):') - _p('\t$(PREBUILDCMDS)') - _p('\t$(POSTBUILDCMDS)') - _p('') - end - diff --git a/build/premake/premake5/modules/gmake/gmake_workspace.lua b/build/premake/premake5/modules/gmake/gmake_workspace.lua deleted file mode 100644 index 1bf6afd825..0000000000 --- a/build/premake/premake5/modules/gmake/gmake_workspace.lua +++ /dev/null @@ -1,188 +0,0 @@ --- --- make_workspace.lua --- Generate a workspace-level makefile. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - - local p = premake - local make = p.make - local tree = p.tree - local project = p.project - - --- --- Generate a GNU make "workspace" makefile, with support for the new platforms API. --- - - function make.generate_workspace(wks) - p.eol("\n") - - make.header(wks) - - make.configmap(wks) - make.projects(wks) - - make.workspacePhonyRule(wks) - make.groupRules(wks) - - make.projectrules(wks) - make.cleanrules(wks) - make.helprule(wks) - end - - --- --- Write out the workspace's configuration map, which maps workspace --- level configurations to the project level equivalents. --- - - function make.configmap(wks) - for cfg in p.workspace.eachconfig(wks) do - _p('ifeq ($(config),%s)', cfg.shortname) - for prj in p.workspace.eachproject(wks) do - local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform) - if prjcfg then - _p(' %s_config = %s', make.tovar(prj.name), prjcfg.shortname) - end - end - _p('endif') - end - _p('') - end - - --- --- Write out the rules for the `make clean` action. --- - - function make.cleanrules(wks) - _p('clean:') - for prj in p.workspace.eachproject(wks) do - local prjpath = p.filename(prj, make.getmakefilename(prj, true)) - local prjdir = path.getdirectory(path.getrelative(wks.location, prjpath)) - local prjname = path.getname(prjpath) - _x(1,'@${MAKE} --no-print-directory -C %s -f %s clean', prjdir, prjname) - end - _p('') - end - - --- --- Write out the make file help rule and configurations list. --- - - function make.helprule(wks) - _p('help:') - _p(1,'@echo "Usage: make [config=name] [target]"') - _p(1,'@echo ""') - _p(1,'@echo "CONFIGURATIONS:"') - - for cfg in p.workspace.eachconfig(wks) do - _x(1, '@echo " %s"', cfg.shortname) - end - - _p(1,'@echo ""') - - _p(1,'@echo "TARGETS:"') - _p(1,'@echo " all (default)"') - _p(1,'@echo " clean"') - - for prj in p.workspace.eachproject(wks) do - _p(1,'@echo " %s"', prj.name) - end - - _p(1,'@echo ""') - _p(1,'@echo "For more information, see https://github.com/premake/premake-core/wiki"') - end - - --- --- Write out the list of projects that comprise the workspace. --- - - function make.projects(wks) - _p('PROJECTS := %s', table.concat(p.esc(table.extract(wks.projects, "name")), " ")) - _p('') - end - --- --- Write out the workspace PHONY rule --- - - function make.workspacePhonyRule(wks) - local groups = {} - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onbranch = function(n) - table.insert(groups, n.path) - end - }) - - _p('.PHONY: all clean help $(PROJECTS) ' .. table.implode(groups, '', '', ' ')) - _p('') - _p('all: $(PROJECTS)') - _p('') - end - --- --- Write out the phony rules representing project groups --- - function make.groupRules(wks) - -- Transform workspace groups into target aggregate - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onbranch = function(n) - local rule = n.path .. ":" - local projectTargets = {} - local groupTargets = {} - for i, c in pairs(n.children) - do - if type(i) == "string" - then - if c.project - then - table.insert(projectTargets, c.name) - else - table.insert(groupTargets, c.path) - end - end - end - if #groupTargets > 0 then - table.sort(groupTargets) - rule = rule .. " " .. table.concat(groupTargets, " ") - end - if #projectTargets > 0 then - table.sort(projectTargets) - rule = rule .. " " .. table.concat(projectTargets, " ") - end - _p(rule) - _p('') - end - }) - end - --- --- Write out the rules to build each of the workspace's projects. --- - - function make.projectrules(wks) - for prj in p.workspace.eachproject(wks) do - local deps = project.getdependencies(prj) - deps = table.extract(deps, "name") - _p('%s:%s', p.esc(prj.name), make.list(deps)) - - local cfgvar = make.tovar(prj.name) - _p('ifneq (,$(%s_config))', cfgvar) - - _p(1,'@echo "==== Building %s ($(%s_config)) ===="', prj.name, cfgvar) - - local prjpath = p.filename(prj, make.getmakefilename(prj, true)) - local prjdir = path.getdirectory(path.getrelative(wks.location, prjpath)) - local prjname = path.getname(prjpath) - - _x(1,'@${MAKE} --no-print-directory -C %s -f %s config=$(%s_config)', prjdir, prjname, cfgvar) - - _p('endif') - _p('') - end - end diff --git a/build/premake/premake5/modules/gmake/tests/_tests.lua b/build/premake/premake5/modules/gmake/tests/_tests.lua deleted file mode 100644 index cd629ad25c..0000000000 --- a/build/premake/premake5/modules/gmake/tests/_tests.lua +++ /dev/null @@ -1,33 +0,0 @@ -require ("gmake") - -return { - -- Makefile tests - "test_make_escaping.lua", - "test_make_tovar.lua", - - -- Makefile workspaces - "workspace/test_config_maps.lua", - "workspace/test_default_config.lua", - "workspace/test_group_rule.lua", - "workspace/test_help_rule.lua", - "workspace/test_project_rule.lua", - - -- Makefile C/C++ projects - "cpp/test_clang.lua", - "cpp/test_file_rules.lua", - "cpp/test_flags.lua", - "cpp/test_ldflags.lua", - "cpp/test_make_pch.lua", - "cpp/test_make_linking.lua", - "cpp/test_objects.lua", - "cpp/test_target_rules.lua", - "cpp/test_tools.lua", - "cpp/test_wiidev.lua", - - -- Makefile C# projects - "cs/test_embed_files.lua", - "cs/test_flags.lua", - "cs/test_links.lua", - "cs/test_response.lua", - "cs/test_sources.lua", -} diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_clang.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_clang.lua deleted file mode 100644 index f8cb1e0dbf..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_clang.lua +++ /dev/null @@ -1,46 +0,0 @@ --- --- tests/actions/make/cpp/test_clang.lua --- Test Clang support in Makefiles. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_clang") - local make = p.make - local cpp = p.make.cpp - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - toolset "clang" - prj = p.workspace.getproject(wks, 1) - end - - --- --- Make sure that the correct compilers are used. --- - - function suite.usesCorrectCompilers() - make.cppConfigs(prj) - test.capture [[ -ifeq ($(config),debug) - ifeq ($(origin CC), default) - CC = clang - endif - ifeq ($(origin CXX), default) - CXX = clang++ - endif - ifeq ($(origin AR), default) - AR = ar - endif - ]] - end - diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_file_rules.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_file_rules.lua deleted file mode 100644 index 29fc29464b..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_file_rules.lua +++ /dev/null @@ -1,170 +0,0 @@ --- --- tests/actions/make/cpp/test_file_rules.lua --- Validate the makefile source building rules. --- Copyright (c) 2009-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cpp_file_rules") - local make = p.make - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.escaper(make.esc) - wks = test.createWorkspace() - end - - local function prepare() - prj = p.workspace.getproject(wks, 1) - make.cppFileRules(prj) - end - - --- --- Two files with the same base name should have different object files. --- - - function suite.uniqueObjNames_onBaseNameCollision() - files { "src/hello.cpp", "src/greetings/hello.cpp" } - prepare() - test.capture [[ -$(OBJDIR)/hello.o: src/greetings/hello.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hello1.o: src/hello.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - - ]] - end - - --- --- C files in C++ projects should been compiled as c --- - - function suite.cFilesGetsCompiledWithCCWhileInCppProject() - files { "src/hello.c", "src/test.cpp" } - prepare() - test.capture [[ -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/test.o: src/test.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - - ]] - end - --- --- C files in C++ projects can be compiled as C++ with 'compileas' --- - - function suite.cFilesGetsCompiledWithCXXWithCompileas() - files { "src/hello.c", "src/test.c" } - filter { "files:src/hello.c" } - compileas "C++" - prepare() - test.capture [[ -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) -ifeq ($(config),debug) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -endif -ifeq ($(config),release) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -endif -$(OBJDIR)/test.o: src/test.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - ]] - end - --- --- C files in C++ projects can be compiled as C++ with 'compileas' on a configuration basis --- - - function suite.cFilesGetsCompiledWithCXXWithCompileasDebugOnly() - files { "src/test.c", "src/hello.c" } - filter { "configurations:Debug", "files:src/hello.c" } - compileas "C++" - prepare() - test.capture [[ -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) -ifeq ($(config),debug) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -endif -ifeq ($(config),release) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -endif -$(OBJDIR)/test.o: src/test.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - ]] - end - --- --- If a custom build rule is supplied, it should be used. --- - - function suite.customBuildRule() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - prepare() - test.capture [[ -ifeq ($(config),debug) -obj/Debug/hello.obj: hello.x - @echo "Compiling hello.x" - $(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo" - $(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj" -endif -ifeq ($(config),release) -obj/Release/hello.obj: hello.x - @echo "Compiling hello.x" - $(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo" - $(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj" -endif - ]] - end - - function suite.customBuildRuleWithAdditionalInputs() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - buildinputs { "%{file.path}.inc", "%{file.path}.inc2" } - prepare() - test.capture [[ -ifeq ($(config),debug) -obj/Debug/hello.obj: hello.x hello.x.inc hello.x.inc2 - @echo "Compiling hello.x" - $(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo" - $(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj" -endif -ifeq ($(config),release) -obj/Release/hello.obj: hello.x hello.x.inc hello.x.inc2 - @echo "Compiling hello.x" - $(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo" - $(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj" -endif - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_flags.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_flags.lua deleted file mode 100644 index 9326eebb7b..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_flags.lua +++ /dev/null @@ -1,144 +0,0 @@ --- --- tests/actions/make/cpp/test_flags.lua --- Tests compiler and linker flags for Makefiles. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_flags") - local make = p.make - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare(calls) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gcc - p.callarray(make, calls, cfg, toolset) - end - - --- --- Include directories should be relative and space separated. --- - - function suite.includeDirs() - includedirs { "src/include", "../include" } - prepare { "includes" } - test.capture [[ - INCLUDES += -Isrc/include -I../include - ]] - end - - --- --- symbols "on" should produce -g --- - function suite.symbols_on() - symbols "on" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - --- --- symbols default to 'off' --- - function suite.symbols_default() - symbols "default" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) - ]] - end - --- --- All other symbols flags also produce -g --- - function suite.symbols_fastlink() - symbols "FastLink" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - - function suite.symbols_full() - symbols "full" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - --- --- symbols "off" should not produce -g --- - function suite.symbols_off() - symbols "off" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) - ]] - end - --- --- symbols "on" with a proper debugformat should produce a corresponding -g --- - function suite.symbols_on_default() - symbols "on" - debugformat "Default" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - - function suite.symbols_on_dwarf() - symbols "on" - debugformat "Dwarf" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -gdwarf - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -gdwarf - ]] - end - - function suite.symbols_on_split_dwarf() - symbols "on" - debugformat "SplitDwarf" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -gsplit-dwarf - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -gsplit-dwarf - ]] - end - --- --- symbols "off" with a proper debugformat should not produce -g --- - function suite.symbols_off_dwarf() - symbols "off" - debugformat "Dwarf" - prepare { "cFlags", "cxxFlags" } - test.capture [[ - ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) - ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_ldflags.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_ldflags.lua deleted file mode 100644 index 0007b68fab..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_ldflags.lua +++ /dev/null @@ -1,78 +0,0 @@ --- --- tests/actions/make/cpp/test_ldflags.lua --- Tests compiler and linker flags for Makefiles. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_ldflags") - local make = p.make - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - symbols "On" - end - - local function prepare(calls) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gcc - make.ldFlags(cfg, toolset) - end - - --- --- Check the output from default project values. --- - - function suite.checkDefaultValues() - prepare() - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) - ]] - end - --- --- Check addition of library search directores. --- - - function suite.checkLibDirs() - libdirs { "../libs", "libs" } - prepare() - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -L../libs -Llibs - ]] - end - - function suite.checkLibDirs_X86_64() - architecture ("x86_64") - system (p.LINUX) - prepare() - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 - ]] - end - - function suite.checkLibDirs_X86() - architecture ("x86") - system (p.LINUX) - prepare() - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 - ]] - end - - function suite.checkLibDirs_X86_64_MacOSX() - architecture ("x86_64") - system (p.MACOSX) - prepare() - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -m64 - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_make_linking.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_make_linking.lua deleted file mode 100644 index ce1b2ce915..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_make_linking.lua +++ /dev/null @@ -1,270 +0,0 @@ --- --- tests/actions/make/cpp/test_make_linking.lua --- Validate the link step generation for makefiles. --- Copyright (c) 2010-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_linking") - local make = p.make - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - _TARGET_OS = "linux" - wks, prj = test.createWorkspace() - end - - local function prepare(calls) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gcc - p.callarray(make, calls, cfg, toolset) - end - - --- --- Check link command for a shared C++ library. --- - - function suite.links_onCppSharedLib() - kind "SharedLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libMyProject.so -s - LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) - ]] - end - - function suite.links_onMacOSXCppSharedLib() - _TARGET_OS = "macosx" - kind "SharedLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -dynamiclib -Wl,-install_name,@rpath/libMyProject.dylib -Wl,-x - LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) - ]] - end - --- --- Check link command for a shared C library. --- - - function suite.links_onCSharedLib() - language "C" - kind "SharedLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libMyProject.so -s - LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) - ]] - end - - --- --- Check link command for a static library. --- - - function suite.links_onStaticLib() - kind "StaticLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -s - LINKCMD = $(AR) -rcs "$@" $(OBJECTS) - ]] - end - - --- --- Check link command for the Utility kind. --- --- Utility projects should only run custom commands, and perform no linking. --- - - function suite.links_onUtility() - kind "Utility" - prepare { "linkCmd" } - test.capture [[ - LINKCMD = - ]] - end - - --- --- Check link command for a Mac OS X universal static library. --- - - function suite.links_onMacUniversalStaticLib() - architecture "universal" - kind "StaticLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -s - LINKCMD = libtool -o "$@" $(OBJECTS) - ]] - end - - --- --- Check a linking to a sibling static library. --- - - function suite.links_onSiblingStaticLib() - links "MyProject2" - - test.createproject(wks) - kind "StaticLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -s - LIBS += build/bin/Debug/libMyProject2.a - LDDEPS += build/bin/Debug/libMyProject2.a - ]] - end - - --- --- Check a linking to a sibling shared library. --- - - function suite.links_onSiblingSharedLib() - links "MyProject2" - - test.createproject(wks) - kind "SharedLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -Wl,-rpath,'$$ORIGIN/../../build/bin/Debug' -s - LIBS += build/bin/Debug/libMyProject2.so - LDDEPS += build/bin/Debug/libMyProject2.so - ]] - end - --- --- Check a linking to a sibling shared library using -l and -L. --- - - function suite.links_onSiblingSharedLibRelativeLinks() - links "MyProject2" - flags { "RelativeLinks" } - - test.createproject(wks) - kind "SharedLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -Lbuild/bin/Debug -Wl,-rpath,'$$ORIGIN/../../build/bin/Debug' -s - LIBS += -lMyProject2 - LDDEPS += build/bin/Debug/libMyProject2.so - ]] - end - - function suite.links_onMacOSXSiblingSharedLib() - _TARGET_OS = "macosx" - links "MyProject2" - flags { "RelativeLinks" } - - test.createproject(wks) - kind "SharedLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -Lbuild/bin/Debug -Wl,-rpath,'@loader_path/../../build/bin/Debug' -Wl,-x - LIBS += -lMyProject2 - LDDEPS += build/bin/Debug/libMyProject2.dylib - ]] - end - --- --- Check a linking multiple siblings. --- - - function suite.links_onMultipleSiblingStaticLib() - links "MyProject2" - links "MyProject3" - - test.createproject(wks) - kind "StaticLib" - location "build" - - test.createproject(wks) - kind "StaticLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -s - LIBS += build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a - LDDEPS += build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a - ]] - end - --- --- Check a linking multiple siblings with link groups enabled. --- - - function suite.links_onSiblingStaticLibWithLinkGroups() - links "MyProject2" - links "MyProject3" - linkgroups "On" - - test.createproject(wks) - kind "StaticLib" - location "build" - - test.createproject(wks) - kind "StaticLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -s - LIBS += -Wl,--start-group build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a -Wl,--end-group - LDDEPS += build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a - ]] - end - --- --- When referencing an external library via a path, the directory --- should be added to the library search paths, and the library --- itself included via an -l flag. --- - - function suite.onExternalLibraryWithPath() - location "MyProject" - links { "libs/SomeLib" } - prepare { "ldFlags", "libs" } - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -L../libs -s - LIBS += -lSomeLib - ]] - end - - - --- --- When referencing an external library with a period in the --- file name make sure it appears correctly in the LIBS --- directive. Currently the period and everything after it --- is stripped --- - - function suite.onExternalLibraryWithPathAndVersion() - location "MyProject" - links { "libs/SomeLib-1.1" } - prepare { "libs", } - test.capture [[ - LIBS += -lSomeLib-1.1 - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_make_pch.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_make_pch.lua deleted file mode 100644 index b79ab4ee57..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_make_pch.lua +++ /dev/null @@ -1,142 +0,0 @@ --- --- tests/actions/make/cpp/test_make_pch.lua --- Validate the setup for precompiled headers in makefiles. --- Copyright (c) 2010-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_pch") - local make = p.make - local project = p.project - - - --- --- Setup and teardown --- - - local wks, prj - function suite.setup() - os.chdir(_TESTS_DIR) - wks, prj = test.createWorkspace() - end - - local function prepareVars() - local cfg = test.getconfig(prj, "Debug") - make.pch(cfg) - end - - local function prepareRules() - local cfg = test.getconfig(prj, "Debug") - make.pchRules(cfg.project) - end - - --- --- If no header has been set, nothing should be output. --- - - function suite.noConfig_onNoHeaderSet() - prepareVars() - test.isemptycapture() - end - - --- --- If a header is set, but the NoPCH flag is also set, then --- nothing should be output. --- - - function suite.noConfig_onHeaderAndNoPCHFlag() - pchheader "include/myproject.h" - flags "NoPCH" - prepareVars() - test.isemptycapture() - end - - --- --- If a header is specified and the NoPCH flag is not set, then --- the header can be used. --- - - function suite.config_onPchEnabled() - pchheader "include/myproject.h" - prepareVars() - test.capture [[ - PCH = include/myproject.h - GCH = $(OBJDIR)/$(notdir $(PCH)).gch - ]] - end - - --- --- The PCH can be specified relative the an includes search path. --- - - function suite.pch_searchesIncludeDirs() - pchheader "premake.h" - includedirs { "../../../src/host" } - prepareVars() - test.capture [[ - PCH = ../../../src/host/premake.h - ]] - end - - --- --- Verify the format of the PCH rules block for a C++ file. --- - - function suite.buildRules_onCpp() - pchheader "include/myproject.h" - prepareRules() - test.capture [[ -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR) -$(GCH): $(PCH) | $(OBJDIR) - @echo $(notdir $<) - $(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -else -$(OBJECTS): | $(OBJDIR) -endif - ]] - end - - --- --- Verify the format of the PCH rules block for a C file. --- - - function suite.buildRules_onC() - language "C" - pchheader "include/myproject.h" - prepareRules() - test.capture [[ -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR) -$(GCH): $(PCH) | $(OBJDIR) - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -else -$(OBJECTS): | $(OBJDIR) -endif - ]] - end - - - - -- - -- If the header is located on one of the include file - -- search directories, it should get found automatically. - -- - - function suite.findsPCH_onIncludeDirs() - location "MyProject" - pchheader "premake.h" - includedirs { "../../../src/host" } - prepareVars() - test.capture [[ - PCH = ../../../../src/host/premake.h - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_objects.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_objects.lua deleted file mode 100644 index 5b8a6bf476..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_objects.lua +++ /dev/null @@ -1,250 +0,0 @@ --- --- tests/actions/make/cpp/test_objects.lua --- Validate the list of objects for a makefile. --- Copyright (c) 2009-2015 Jason Perkins and the Premake project --- - - local suite = test.declare("make_cpp_objects") - - local p = premake - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - p.make.cppObjects(prj) - end - - --- --- If a file is listed at the project level, it should get listed in --- the project level objects list. --- - - function suite.listFileInProjectObjects() - files { "src/hello.cpp" } - prepare() - test.capture [[ -OBJECTS := \ - $(OBJDIR)/hello.o \ - - ]] - end - - --- --- Only buildable files should be listed. --- - - function suite.onlyListBuildableFiles() - files { "include/gl.h", "src/hello.cpp" } - prepare() - test.capture [[ -OBJECTS := \ - $(OBJDIR)/hello.o \ - - ]] - end - - --- --- A file should only be listed in the configurations to which it belongs. --- - - function suite.configFilesAreConditioned() - filter "Debug" - files { "src/hello_debug.cpp" } - filter "Release" - files { "src/hello_release.cpp" } - prepare() - test.capture [[ -OBJECTS := \ - -RESOURCES := \ - -CUSTOMFILES := \ - -ifeq ($(config),debug) - OBJECTS += \ - $(OBJDIR)/hello_debug.o \ - -endif - -ifeq ($(config),release) - OBJECTS += \ - $(OBJDIR)/hello_release.o \ - -endif - - ]] - end - - --- --- Two files with the same base name should have different object files. --- - - function suite.uniqueObjNames_onBaseNameCollision() - files { "src/hello.cpp", "src/greetings/hello.cpp" } - prepare() - test.capture [[ -OBJECTS := \ - $(OBJDIR)/hello.o \ - $(OBJDIR)/hello1.o \ - - ]] - end - - --- --- If a custom rule builds to an object file, include it in the --- link automatically to match the behavior of Visual Studio --- - - function suite.linkBuildOutputs_onNotSpecified() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - prepare() - test.capture [[ -OBJECTS := \ - -RESOURCES := \ - -CUSTOMFILES := \ - -ifeq ($(config),debug) - OBJECTS += \ - obj/Debug/hello.obj \ - -endif - - ]] - end - - --- --- Also include it in the link step if we explicitly specified so with --- linkbuildoutputs. --- - - function suite.linkBuildOutputs_onOn() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - linkbuildoutputs "On" - prepare() - test.capture [[ -OBJECTS := \ - -RESOURCES := \ - -CUSTOMFILES := \ - -ifeq ($(config),debug) - OBJECTS += \ - obj/Debug/hello.obj \ - -endif - - ]] - end - - --- --- If linkbuildoutputs says that we shouldn't include it in the link however, --- don't do it. --- - - function suite.linkBuildOutputs_onOff() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - linkbuildoutputs "Off" - prepare() - test.capture [[ -OBJECTS := \ - -RESOURCES := \ - -CUSTOMFILES := \ - -ifeq ($(config),debug) - CUSTOMFILES += \ - obj/Debug/hello.obj \ - -endif - - ]] - end - - --- --- If a file is excluded from a configuration, it should not be listed. --- - - function suite.excludedFromBuild_onExcludedFile() - files { "hello.cpp" } - filter "Debug" - removefiles { "hello.cpp" } - prepare() - test.capture [[ -OBJECTS := \ - -RESOURCES := \ - -CUSTOMFILES := \ - -ifeq ($(config),release) - OBJECTS += \ - $(OBJDIR)/hello.o \ - -endif - - ]] - end - - function suite.excludedFromBuild_onExcludeFlag() - files { "hello.cpp" } - filter { "Debug", "files:hello.cpp" } - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ -OBJECTS := \ - -RESOURCES := \ - -CUSTOMFILES := \ - -ifeq ($(config),release) - OBJECTS += \ - $(OBJDIR)/hello.o \ - -endif - - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_target_rules.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_target_rules.lua deleted file mode 100644 index 0009193c44..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_target_rules.lua +++ /dev/null @@ -1,57 +0,0 @@ --- --- tests/actions/make/cpp/test_target_rules.lua --- Validate the makefile target building rules. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cpp_target_rules") - local make = p.make - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - make.cppAllRules(cfg) - end - - --- --- Check the default, normal format of the rules. --- - - function suite.defaultRules() - prepare() - test.capture [[ -all: prebuild prelink $(TARGET) - @: - ]] - end - - --- --- Check rules for an OS X Cocoa application. --- - - function suite.osxWindowedAppRules() - system "MacOSX" - kind "WindowedApp" - prepare() - test.capture [[ -all: prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist - @: - -$(dir $(TARGETDIR))PkgInfo: -$(dir $(TARGETDIR))Info.plist: - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_tools.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_tools.lua deleted file mode 100644 index 6b5a083191..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_tools.lua +++ /dev/null @@ -1,35 +0,0 @@ --- --- tests/actions/make/cpp/test_tools.lua --- Tests for tools support in makefiles. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_tools") - local make = p.make - local cpp = p.make.cpp - local project = p.project - - --- --- Setup --- - - local cfg - - function suite.setup() - local wks, prj = test.createWorkspace() - cfg = test.getconfig(prj, "Debug") - end - - --- --- Make sure that the correct tools are used. --- - - function suite.usesCorrectTools() - make.cppTools(cfg, p.tools.gcc) - test.capture [[ - RESCOMP = windres - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cpp/test_wiidev.lua b/build/premake/premake5/modules/gmake/tests/cpp/test_wiidev.lua deleted file mode 100644 index 063e517d52..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cpp/test_wiidev.lua +++ /dev/null @@ -1,58 +0,0 @@ --- --- tests/actions/make/cpp/test_wiidev.lua --- Tests for Wii homebrew support in makefiles. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_wiidev") - local make = p.make - local project = p.project - - --- --- Setup --- - - local cfg - - function suite.setup() - local wks, prj = test.createWorkspace() - system "wii" - symbols "On" - cfg = test.getconfig(prj, "Debug") - end - - --- --- Make sure that the Wii-specific flags are passed to the tools. --- - - function suite.writesCorrectCppFlags() - make.cppFlags(cfg, p.tools.gcc) - test.capture [[ - ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) $(DEFINES) $(INCLUDES) - ]] - end - - function suite.writesCorrectLinkerFlags() - make.ldFlags(cfg, p.tools.gcc) - test.capture [[ - ALL_LDFLAGS += $(LDFLAGS) -L$(LIBOGC_LIB) $(MACHDEP) - ]] - end - - --- --- Make sure the dev kit include is written to each Wii build configuration. --- - - function suite.writesIncludeBlock() - make.settings(cfg, p.tools.gcc) - test.capture [[ - ifeq ($(strip $(DEVKITPPC)),) - $(error "DEVKITPPC environment variable is not set")' - endif - include $(DEVKITPPC)/wii_rules' - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cs/test_embed_files.lua b/build/premake/premake5/modules/gmake/tests/cs/test_embed_files.lua deleted file mode 100644 index 799789395a..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cs/test_embed_files.lua +++ /dev/null @@ -1,75 +0,0 @@ --- --- tests/actions/make/cs/test_embed_files.lua --- Tests embedded file listings for C# Makefiles. --- Copyright (c) 2013-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cs_embed_files") - local make = p.make - local cs = p.make.cs - local project = p.project - - --- --- Setup --- - - local wks, prj, cfg - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - prj = p.workspace.getproject(wks, 1) - make.csEmbedFiles(prj, p.tools.dotnet) - end - - --- --- Files that can be compiled should be listed here. --- - - function suite.doesListResourceFiles() - files { "Hello.resx" } - prepare() - test.capture [[ -EMBEDFILES += \ - $(OBJDIR)/MyProject.Hello.resources \ - - ]] - end - - --- --- Files that should not be compiled should be excluded. --- - - function suite.doesIgnoreNonResourceFiles() - files { "About.txt", "Hello.resx" } - prepare() - test.capture [[ -EMBEDFILES += \ - $(OBJDIR)/MyProject.Hello.resources \ - - ]] - end - - --- --- Files with a non-standard file extension but a build action of --- "Embed" should be listed here. --- - - function suite.doesIncludeCompileBuildAction() - files { "Hello.txt" } - filter "files:*.txt" - buildaction "Embed" - prepare() - test.capture [[ -EMBEDFILES += \ - Hello.txt \ - - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cs/test_flags.lua b/build/premake/premake5/modules/gmake/tests/cs/test_flags.lua deleted file mode 100644 index 5717e3153d..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cs/test_flags.lua +++ /dev/null @@ -1,65 +0,0 @@ --- --- tests/actions/make/cs/test_flags.lua --- Tests compiler and linker flags for C# Makefiles. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cs_flags") - local make = p.make - local cs = p.make.cs - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - make.csFlags(cfg, p.tools.dotnet) - end - - --- --- Should return an empty assignment if nothing has been specified. --- - - function suite.isEmptyAssignment_onNoSettings() - prepare() - test.capture [[ - FLAGS = /noconfig - ]] - end - - --- --- If the Unsafe flag has been set, it should be specified. --- - - function suite.onUnsafe() - clr "Unsafe" - prepare() - test.capture [[ - FLAGS = /unsafe /noconfig - ]] - end - - --- --- If an application icon has been set, it should be specified. --- - - function suite.onApplicationIcon() - icon "MyProject.ico" - prepare() - test.capture [[ - FLAGS = /noconfig /win32icon:"MyProject.ico" - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cs/test_links.lua b/build/premake/premake5/modules/gmake/tests/cs/test_links.lua deleted file mode 100644 index cc32b6134e..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cs/test_links.lua +++ /dev/null @@ -1,60 +0,0 @@ --- --- tests/actions/make/cs/test_links.lua --- Tests linking for C# Makefiles. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cs_links") - local make = p.make - local cs = p.make.cs - local project = p.project - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - make.csLinkCmd(cfg, p.tools.dotnet) - end - - --- --- Should return an empty assignment if nothing has been specified. --- - - function suite.isEmptyAssignment_onNoSettings() - prepare() - test.capture [[ - DEPENDS = - ]] - end - - --- --- Files that can be compiled should be listed here. --- - - function suite.doesListLinkDependencyFiles() - links { "MyProject2", "MyProject3" } - - test.createproject(wks) - kind "SharedLib" - language "C#" - - test.createproject(wks) - kind "SharedLib" - language "C#" - - prepare () - test.capture [[ - DEPENDS = bin/Debug/MyProject2.dll bin/Debug/MyProject3.dll - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cs/test_response.lua b/build/premake/premake5/modules/gmake/tests/cs/test_response.lua deleted file mode 100644 index 5ffed6a87d..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cs/test_response.lua +++ /dev/null @@ -1,90 +0,0 @@ --- --- tests/actions/make/cs/test_response.lua --- Validate the list of objects for a response file used by a makefile. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cs_response") - local make = p.make - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - end - - --- --- Create a project with a lot of files to force the generation of response files. --- This makes sure they can be processed in Windows since else we reach the command --- line length max limit. --- - - function suite.listResponse() - prepare() - make.csResponseFile(prj) - test.capture [[ -RESPONSE += $(OBJDIR)/MyProject.rsp - ]] - end - - - function suite.listResponseTargets() - prepare() - make.csTargetRules(prj) - test.capture [[ -$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS) $(RESPONSE) - $(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) @$(RESPONSE) $(patsubst %,/resource:%,$(EMBEDFILES)) - ]] - end - - function suite.listResponseRules() - files { "foo.cs", "bar.cs", "dir/foo.cs" } - prepare() - make.csResponseRules(prj) - end - - function suite.listResponseRulesPosix() - _TARGET_OS = "linux" - suite.listResponseRules() - test.capture [[ -$(RESPONSE): MyProject.make - @echo Generating response file -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(RESPONSE) -else - $(SILENT) if exist $(RESPONSE) del $(OBJDIR)\MyProject.rsp -endif - @echo bar.cs >> $(RESPONSE) - @echo dir/foo.cs >> $(RESPONSE) - @echo foo.cs >> $(RESPONSE) - ]] - end - - function suite.listResponseRulesWindows() - _TARGET_OS = "windows" - suite.listResponseRules() - test.capture [[ -$(RESPONSE): MyProject.make - @echo Generating response file -ifeq (posix,$(SHELLTYPE)) - $(SILENT) rm -f $(RESPONSE) -else - $(SILENT) if exist $(RESPONSE) del $(OBJDIR)\MyProject.rsp -endif - @echo bar.cs >> $(RESPONSE) - @echo dir\foo.cs >> $(RESPONSE) - @echo foo.cs >> $(RESPONSE) - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/cs/test_sources.lua b/build/premake/premake5/modules/gmake/tests/cs/test_sources.lua deleted file mode 100644 index 3021bb372c..0000000000 --- a/build/premake/premake5/modules/gmake/tests/cs/test_sources.lua +++ /dev/null @@ -1,90 +0,0 @@ --- --- tests/actions/make/cs/test_sources.lua --- Tests source file listings for C# Makefiles. --- Copyright (c) 2013-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_cs_sources") - local make = p.make - local cs = p.make.cs - local project = p.project - - --- --- Setup --- - - local wks, prj, cfg - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - prj = p.workspace.getproject(wks, 1) - make.csSources(prj, p.tools.dotnet) - end - - --- --- Files that can be compiled should be listed here. --- - - function suite.doesListSourceFiles() - files { "Hello.cs" } - prepare() - test.capture [[ -SOURCES += \ - Hello.cs \ - - ]] - end - --- --- Path delimiter uses slash instead of backslash --- - - function suite.doesUseProperPathDelimiter() - files { "Folder\\Hello.cs", "Folder/World.cs" } - prepare() - test.capture [[ -SOURCES += \ - Folder/Hello.cs \ - Folder/World.cs \ - - ]] - end - - --- --- Files that should not be compiled should be excluded. --- - - function suite.doesIgnoreNonSourceFiles() - files { "About.txt", "Hello.cs" } - prepare() - test.capture [[ -SOURCES += \ - Hello.cs \ - - ]] - end - - --- --- Files with a non-standard file extension but a build action of --- "Compile" should be listed here. --- - - function suite.doesIncludeCompileBuildAction() - files { "Hello.txt" } - filter "files:*.txt" - buildaction "Compile" - prepare() - test.capture [[ -SOURCES += \ - Hello.txt \ - - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/test_make_escaping.lua b/build/premake/premake5/modules/gmake/tests/test_make_escaping.lua deleted file mode 100644 index fa24937f7f..0000000000 --- a/build/premake/premake5/modules/gmake/tests/test_make_escaping.lua +++ /dev/null @@ -1,31 +0,0 @@ --- --- tests/actions/make/test_make_escaping.lua --- Validate the escaping of literal values in Makefiles. --- Copyright (c) 2010-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_escaping") - local make = p.make - - - function suite.Escapes_Spaces() - test.isequal([[Program\ Files]], make.esc([[Program Files]])) - end - - function suite.Escapes_Backslashes() - test.isequal([[Program\\Files]], make.esc([[Program\Files]])) - end - - function suite.Escapes_Parens() - test.isequal([[Debug\(x86\)]], make.esc([[Debug(x86)]])) - end - - function suite.DoesNotEscape_ShellReplacements() - test.isequal([[-L$(NVSDKCUDA_ROOT)/C/lib]], make.esc([[-L$(NVSDKCUDA_ROOT)/C/lib]])) - end - - function suite.CanEscape_ShellReplacementCapturesShortest() - test.isequal([[a\(x\)b$(ROOT)c\(y\)d]], make.esc([[a(x)b$(ROOT)c(y)d]])) - end - diff --git a/build/premake/premake5/modules/gmake/tests/test_make_tovar.lua b/build/premake/premake5/modules/gmake/tests/test_make_tovar.lua deleted file mode 100644 index 5784b47f9f..0000000000 --- a/build/premake/premake5/modules/gmake/tests/test_make_tovar.lua +++ /dev/null @@ -1,35 +0,0 @@ --- --- tests/actions/make/test_make_tovar.lua --- Test translation of strings to make variable names. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_tovar") - local make = p.make - - --- --- Convert spaces to underscores. --- - - function suite.removesSpaces() - test.isequal("My_Project", make.tovar("My Project")) - end - --- --- Convert dashes to underscores. --- - - function suite.removesDashes() - test.isequal("My_Project", make.tovar("My-Project")) - end - - --- --- Remove parenthesis. --- - - function suite.removesParenthesis() - test.isequal("MyProject_x86", make.tovar("MyProject (x86)")) - end diff --git a/build/premake/premake5/modules/gmake/tests/workspace/test_config_maps.lua b/build/premake/premake5/modules/gmake/tests/workspace/test_config_maps.lua deleted file mode 100644 index 0f3c6328f4..0000000000 --- a/build/premake/premake5/modules/gmake/tests/workspace/test_config_maps.lua +++ /dev/null @@ -1,78 +0,0 @@ --- --- tests/actions/make/test_config_maps.lua --- Validate handling of configuration maps in makefiles. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_config_maps") - local make = p.make - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - make.configmap(wks) - end - - --- --- If no map is present, the configurations should pass through --- to the projects unchanged. --- - - function suite.passesThroughConfigs_onNoMap() - prepare() - test.capture [[ -ifeq ($(config),debug) - MyProject_config = debug -endif -ifeq ($(config),release) - MyProject_config = release -endif - ]] - end - - --- --- If a map is present, the configuration change should be applied. --- - - function suite.passesThroughConfigs_onMap() - configmap { Debug = "Development" } - prepare() - test.capture [[ -ifeq ($(config),debug) - MyProject_config = development -endif -ifeq ($(config),release) - MyProject_config = release -endif - ]] - end - - --- --- If a configuration is not included in a particular project, --- no mapping should be created. --- - - function suite.passesThroughConfigs_onNoMapRemovedConfiguration() - removeconfigurations { "Debug" } - prepare() - test.capture [[ -ifeq ($(config),debug) -endif -ifeq ($(config),release) - MyProject_config = release -endif - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/workspace/test_default_config.lua b/build/premake/premake5/modules/gmake/tests/workspace/test_default_config.lua deleted file mode 100644 index 3bc5a71639..0000000000 --- a/build/premake/premake5/modules/gmake/tests/workspace/test_default_config.lua +++ /dev/null @@ -1,87 +0,0 @@ --- --- tests/actions/make/test_default_config.lua --- Validate generation of default configuration block for makefiles. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local suite = test.declare("make_default_config") - - local p = premake - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - p.make.defaultconfig(prj) - end - - --- --- Verify the handling of the default setup: Debug and Release, no platforms. --- - - function suite.defaultsToFirstBuildCfg_onNoPlatforms() - prepare() - test.capture [[ -ifndef config - config=debug -endif - ]] - end - - --- --- Verify handling of build config/platform combination. --- - - function suite.defaultsToFirstPairing_onPlatforms() - platforms { "Win32", "Win64" } - prepare() - test.capture [[ -ifndef config - config=debug_win32 -endif - ]] - end - - --- --- If the project excludes a workspace build cfg, it should be skipped --- over as the default config as well. --- - - function suite.usesFirstValidPairing_onExcludedConfig() - platforms { "Win32", "Win64" } - removeconfigurations { "Debug" } - prepare() - test.capture [[ -ifndef config - config=release_win32 -endif - ]] - end - - --- --- Verify handling of defaultplatform --- - - function suite.defaultsToSpecifiedPlatform() - platforms { "Win32", "Win64" } - defaultplatform "Win64" - prepare() - test.capture [[ -ifndef config - config=debug_win64 -endif - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/workspace/test_group_rule.lua b/build/premake/premake5/modules/gmake/tests/workspace/test_group_rule.lua deleted file mode 100644 index aebb3f82e5..0000000000 --- a/build/premake/premake5/modules/gmake/tests/workspace/test_group_rule.lua +++ /dev/null @@ -1,61 +0,0 @@ --- --- tests/actions/make/workspace/test_group_rule.lua --- Validate generation of group rules --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_group_rule") - local make = p.make - - --- --- Setup/teardown --- - - local wks - - function suite.setup() - wks = test.createWorkspace() - group "MainGroup" - test.createproject(wks) - group "MainGroup/SubGroup1" - test.createproject(wks) - group "MainGroup/SubGroup2" - test.createproject(wks) - test.createproject(wks) - end - - local function prepare() - wks = test.getWorkspace(wks) - end - - --- --- Groups should be added to workspace's PHONY --- - - function suite.groupRule_groupAsPhony() - prepare() - make.workspacePhonyRule(wks) - test.capture [[ -.PHONY: all clean help $(PROJECTS) MainGroup MainGroup/SubGroup1 MainGroup/SubGroup2 - ]] - end - - - --- --- Transform workspace groups into target aggregate --- - function suite.groupRule_groupRules() - prepare() - make.groupRules(wks) - test.capture [[ -MainGroup: MainGroup/SubGroup1 MainGroup/SubGroup2 MyProject2 - -MainGroup/SubGroup1: MyProject3 - -MainGroup/SubGroup2: MyProject4 MyProject5 - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/workspace/test_help_rule.lua b/build/premake/premake5/modules/gmake/tests/workspace/test_help_rule.lua deleted file mode 100644 index 3e3ab50a1d..0000000000 --- a/build/premake/premake5/modules/gmake/tests/workspace/test_help_rule.lua +++ /dev/null @@ -1,41 +0,0 @@ --- --- tests/actions/make/test_help_rule.lua --- Validate generation of help rule and configurations list. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_help_rule") - - --- --- Setup/teardown --- - - local wks - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - wks = test.getWorkspace(wks) - p.make.helprule(wks) - end - - --- --- Start with the default Debug and Release setup. --- - - function suite.looksOkay_onDefaultSetup() - prepare() - test.capture [[ -help: - @echo "Usage: make [config=name] [target]" - @echo "" - @echo "CONFIGURATIONS:" - @echo " debug" - @echo " release" - ]] - end diff --git a/build/premake/premake5/modules/gmake/tests/workspace/test_project_rule.lua b/build/premake/premake5/modules/gmake/tests/workspace/test_project_rule.lua deleted file mode 100644 index 3615bd2a22..0000000000 --- a/build/premake/premake5/modules/gmake/tests/workspace/test_project_rule.lua +++ /dev/null @@ -1,42 +0,0 @@ --- --- tests/actions/make/workspace/test_project_rule.lua --- Validate generation of project rules in workspace makefile. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("make_project_rule") - - --- --- Setup/teardown --- - - local wks - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - p.oven.bake() - wks = test.getWorkspace(wks) - p.make.projectrules(wks) - end - - --- --- Verify a simple project with no dependencies. --- - - function suite.projectRule_onNoDependencies() - prepare() - test.capture [[ -MyProject: -ifneq (,$(MyProject_config)) - @echo "==== Building MyProject ($(MyProject_config)) ====" - @${MAKE} --no-print-directory -C . -f MyProject.make config=$(MyProject_config) -endif - - ]] - end diff --git a/build/premake/premake5/modules/gmake2/_manifest.lua b/build/premake/premake5/modules/gmake2/_manifest.lua deleted file mode 100644 index b71a00b0b7..0000000000 --- a/build/premake/premake5/modules/gmake2/_manifest.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "_preload.lua", - "gmake2.lua", - "gmake2_cpp.lua", - "gmake2_csharp.lua", - "gmake2_makefile.lua", - "gmake2_utility.lua", - "gmake2_workspace.lua", -} diff --git a/build/premake/premake5/modules/gmake2/_preload.lua b/build/premake/premake5/modules/gmake2/_preload.lua deleted file mode 100644 index 567b14ad8b..0000000000 --- a/build/premake/premake5/modules/gmake2/_preload.lua +++ /dev/null @@ -1,70 +0,0 @@ --- --- Name: gmake2/_preload.lua --- Purpose: Define the gmake2 action. --- Author: Blizzard Entertainment (Tom van Dijck) --- Modified by: Aleksi Juvani --- Vlad Ivanov --- Created: 2016/01/01 --- Copyright: (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local project = p.project - - newaction { - trigger = "gmake2", - shortname = "Alternative GNU Make", - description = "Generate GNU makefiles for POSIX, MinGW, and Cygwin", - toolset = "gcc", - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Utility", "Makefile" }, - - valid_languages = { "C", "C++", "C#" }, - - valid_tools = { - cc = { "clang", "gcc" }, - dotnet = { "mono", "msnet", "pnet" } - }, - - onInitialize = function() - require("gmake2") - p.modules.gmake2.cpp.initialize() - end, - - onWorkspace = function(wks) - p.escaper(p.modules.gmake2.esc) - p.generate(wks, p.modules.gmake2.getmakefilename(wks, false), p.modules.gmake2.generate_workspace) - end, - - onProject = function(prj) - p.escaper(p.modules.gmake2.esc) - local makefile = p.modules.gmake2.getmakefilename(prj, true) - if prj.kind == p.UTILITY then - p.generate(prj, makefile, p.modules.gmake2.utility.generate) - elseif prj.kind == p.MAKEFILE then - p.generate(prj, makefile, p.modules.gmake2.makefile.generate) - else - if project.isdotnet(prj) then - p.generate(prj, makefile, p.modules.gmake2.cs.generate) - elseif project.isc(prj) or project.iscpp(prj) then - p.generate(prj, makefile, p.modules.gmake2.cpp.generate) - end - end - end, - - onCleanWorkspace = function(wks) - p.clean.file(wks, p.modules.gmake2.getmakefilename(wks, false)) - end, - - onCleanProject = function(prj) - p.clean.file(prj, p.modules.gmake2.getmakefilename(prj, true)) - end - } - --- --- Decide when the full module should be loaded. --- - - return function(cfg) - return (_ACTION == "gmake2") - end diff --git a/build/premake/premake5/modules/gmake2/gmake2.lua b/build/premake/premake5/modules/gmake2/gmake2.lua deleted file mode 100644 index 86126df9ec..0000000000 --- a/build/premake/premake5/modules/gmake2/gmake2.lua +++ /dev/null @@ -1,427 +0,0 @@ --- --- gmake2.lua --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local project = p.project - - p.modules.gmake2 = {} - p.modules.gmake2._VERSION = p._VERSION - local gmake2 = p.modules.gmake2 - --- --- Write out the default configuration rule for a workspace or project. --- --- @param target --- The workspace or project object for which a makefile is being generated. --- - - function gmake2.defaultconfig(target) - -- find the right configuration iterator function for this object - local eachconfig = iif(target.project, project.eachconfig, p.workspace.eachconfig) - local defaultconfig = nil - - -- find the right default configuration platform, grab first configuration that matches - if target.defaultplatform then - for cfg in eachconfig(target) do - if cfg.platform == target.defaultplatform then - defaultconfig = cfg - break - end - end - end - - -- grab the first configuration and write the block - if not defaultconfig then - local iter = eachconfig(target) - defaultconfig = iter() - end - - if defaultconfig then - _p('ifndef config') - _x(' config=%s', defaultconfig.shortname) - _p('endif') - _p('') - end - end - - ---- --- Escape a string so it can be written to a makefile. ---- - - function gmake2.esc(value) - result = value:gsub("\\", "\\\\") - result = result:gsub("\"", "\\\"") - result = result:gsub(" ", "\\ ") - result = result:gsub("%(", "\\(") - result = result:gsub("%)", "\\)") - - -- leave $(...) shell replacement sequences alone - result = result:gsub("$\\%((.-)\\%)", "$(%1)") - return result - end - - --- --- Get the makefile file name for a workspace or a project. If this object is the --- only one writing to a location then I can use "Makefile". If more than one object --- writes to the same location I use name + ".make" to keep it unique. --- - - function gmake2.getmakefilename(this, searchprjs) - local count = 0 - for wks in p.global.eachWorkspace() do - if wks.location == this.location then - count = count + 1 - end - - if searchprjs then - for _, prj in ipairs(wks.projects) do - if prj.location == this.location then - count = count + 1 - end - end - end - end - - if count == 1 then - return "Makefile" - else - return ".make" - end - end - - --- --- Output a makefile header. --- --- @param target --- The workspace or project object for which the makefile is being generated. --- - - function gmake2.header(target) - local kind = iif(target.project, "project", "workspace") - - _p('# %s %s makefile autogenerated by Premake', p.action.current().shortname, kind) - _p('') - - gmake2.defaultconfig(target) - - _p('ifndef verbose') - _p(' SILENT = @') - _p('endif') - _p('') - end - - --- --- Rules for file ops based on the shell type. Can't use defines and $@ because --- it screws up the escaping of spaces and parethesis (anyone know a fix?) --- - - function gmake2.mkdir(dirname) - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) mkdir -p %s', dirname) - _p('else') - _p('\t$(SILENT) mkdir $(subst /,\\\\,%s)', dirname) - _p('endif') - end - - function gmake2.mkdirRules(dirname) - _p('%s:', dirname) - _p('\t@echo Creating %s', dirname) - gmake2.mkdir(dirname) - _p('') - end - --- --- Format a list of values to be safely written as part of a variable assignment. --- - - function gmake2.list(value, quoted) - quoted = false - if #value > 0 then - if quoted then - local result = "" - for _, v in ipairs (value) do - if #result then - result = result .. " " - end - result = result .. p.quoted(v) - end - return result - else - return " " .. table.concat(value, " ") - end - else - return "" - end - end - - --- --- Convert an arbitrary string (project name) to a make variable name. --- - - function gmake2.tovar(value) - value = value:gsub("[ -]", "_") - value = value:gsub("[()]", "") - return value - end - - - - function gmake2.path(cfg, value) - cfg = cfg.project or cfg - local dirs = path.translate(project.getrelative(cfg, value)) - - if type(dirs) == 'table' then - dirs = table.filterempty(dirs) - end - - return dirs - end - - - function gmake2.getToolSet(cfg) - local default = iif(cfg.system == p.MACOSX, "clang", "gcc") - local toolset = p.tools[_OPTIONS.cc or cfg.toolset or default] - if not toolset then - error("Invalid toolset '" .. cfg.toolset .. "'") - end - return toolset - end - - - function gmake2.outputSection(prj, callback) - local root = {} - - for cfg in project.eachconfig(prj) do - -- identify the toolset used by this configurations (would be nicer if - -- this were computed and stored with the configuration up front) - - local toolset = gmake2.getToolSet(cfg) - - local settings = {} - local funcs = callback(cfg) - for i = 1, #funcs do - local c = p.capture(function () - funcs[i](cfg, toolset) - end) - if #c > 0 then - table.insert(settings, c) - end - end - - if not root.settings then - root.settings = table.arraycopy(settings) - else - root.settings = table.intersect(root.settings, settings) - end - - root[cfg] = settings - end - - if #root.settings > 0 then - for _, v in ipairs(root.settings) do - p.outln(v) - end - p.outln('') - end - - local first = true - for cfg in project.eachconfig(prj) do - local settings = table.difference(root[cfg], root.settings) - if #settings > 0 then - if first then - _x('ifeq ($(config),%s)', cfg.shortname) - first = false - else - _x('else ifeq ($(config),%s)', cfg.shortname) - end - - for k, v in ipairs(settings) do - p.outln(v) - end - - _p('') - end - end - - if not first then - p.outln('endif') - p.outln('') - end - end - - - -- convert a rule property into a string - - function gmake2.expandRuleString(rule, prop, value) - -- list? - if type(value) == "table" then - if #value > 0 then - if prop.switch then - return prop.switch .. table.concat(value, " " .. prop.switch) - else - prop.separator = prop.separator or " " - return table.concat(value, prop.separator) - end - else - return nil - end - end - - -- bool just emits the switch - if prop.switch and type(value) == "boolean" then - if value then - return prop.switch - else - return nil - end - end - - local switch = prop.switch or "" - - -- enum? - if prop.values then - value = table.findKeyByValue(prop.values, value) - if value == nil then - value = "" - end - end - - -- primitive - value = tostring(value) - if #value > 0 then - return switch .. value - else - return nil - end - end - - - function gmake2.prepareEnvironment(rule, environ, cfg) - for _, prop in ipairs(rule.propertydefinition) do - local fld = p.rule.getPropertyField(rule, prop) - local value = cfg[fld.name] - if value ~= nil then - - if fld.kind == "path" then - value = gmake2.path(cfg, value) - elseif fld.kind == "list:path" then - value = gmake2.path(cfg, value) - end - - value = gmake2.expandRuleString(rule, prop, value) - if value ~= nil and #value > 0 then - environ[prop.name] = p.esc(value) - end - end - end - end - - ---------------------------------------------------------------------------- --- --- Handlers for the individual makefile elements that can be shared --- between the different language projects. --- ---------------------------------------------------------------------------- - - function gmake2.phonyRules(prj) - _p('.PHONY: clean prebuild') - _p('') - end - - - function gmake2.shellType() - _p('SHELLTYPE := posix') - _p('ifeq (.exe,$(findstring .exe,$(ComSpec)))') - _p('\tSHELLTYPE := msdos') - _p('endif') - _p('') - end - - - function gmake2.target(cfg, toolset) - p.outln('TARGETDIR = ' .. project.getrelative(cfg.project, cfg.buildtarget.directory)) - p.outln('TARGET = $(TARGETDIR)/' .. cfg.buildtarget.name) - end - - - function gmake2.objdir(cfg, toolset) - p.outln('OBJDIR = ' .. project.getrelative(cfg.project, cfg.objdir)) - end - - - function gmake2.settings(cfg, toolset) - if #cfg.makesettings > 0 then - for _, value in ipairs(cfg.makesettings) do - p.outln(value) - end - end - - local value = toolset.getmakesettings(cfg) - if value then - p.outln(value) - end - end - - - function gmake2.buildCmds(cfg, event) - _p('define %sCMDS', event:upper()) - local steps = cfg[event .. "commands"] - local msg = cfg[event .. "message"] - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - msg = msg or string.format("Running %s commands", event) - _p('\t@echo %s', msg) - _p('\t%s', table.implode(steps, "", "", "\n\t")) - end - _p('endef') - end - - - function gmake2.preBuildCmds(cfg, toolset) - gmake2.buildCmds(cfg, "prebuild") - end - - - function gmake2.preLinkCmds(cfg, toolset) - gmake2.buildCmds(cfg, "prelink") - end - - - function gmake2.postBuildCmds(cfg, toolset) - gmake2.buildCmds(cfg, "postbuild") - end - - - function gmake2.targetDirRules(cfg, toolset) - gmake2.mkdirRules("$(TARGETDIR)") - end - - - function gmake2.objDirRules(cfg, toolset) - gmake2.mkdirRules("$(OBJDIR)") - end - - - function gmake2.preBuildRules(cfg, toolset) - _p('prebuild: | $(OBJDIR)') - _p('\t$(PREBUILDCMDS)') - _p('') - end - - - - include("gmake2_cpp.lua") - include("gmake2_csharp.lua") - include("gmake2_makefile.lua") - include("gmake2_utility.lua") - include("gmake2_workspace.lua") - - return gmake2 diff --git a/build/premake/premake5/modules/gmake2/gmake2_cpp.lua b/build/premake/premake5/modules/gmake2/gmake2_cpp.lua deleted file mode 100644 index 3120772f1a..0000000000 --- a/build/premake/premake5/modules/gmake2/gmake2_cpp.lua +++ /dev/null @@ -1,821 +0,0 @@ --- --- gmake2_cpp.lua --- Generate a C/C++ project makefile. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local gmake2 = p.modules.gmake2 - - gmake2.cpp = {} - local cpp = gmake2.cpp - - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - - ---- --- Add namespace for element definition lists for premake.callarray() ---- - - cpp.elements = {} - - --- --- Generate a GNU make C++ project makefile, with support for the new platforms API. --- - - cpp.elements.makefile = function(prj) - return { - gmake2.header, - gmake2.phonyRules, - gmake2.shellType, - cpp.createRuleTable, - cpp.outputConfigurationSection, - cpp.outputPerFileConfigurationSection, - cpp.createFileTable, - cpp.outputFilesSection, - cpp.outputRulesSection, - cpp.outputFileRuleSection, - cpp.dependencies, - } - end - - - function cpp.generate(prj) - p.eol("\n") - p.callArray(cpp.elements.makefile, prj) - - -- allow the garbage collector to clean things up. - for cfg in project.eachconfig(prj) do - cfg._gmake = nil - end - prj._gmake = nil - end - - - function cpp.initialize() - rule 'cpp' - fileExtension { ".cc", ".cpp", ".cxx", ".mm" } - buildoutputs { "$(OBJDIR)/%{file.objname}.o" } - buildmessage '$(notdir $<)' - buildcommands {'$(CXX) %{premake.modules.gmake2.cpp.fileFlags(cfg, file)} $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"'} - - rule 'cc' - fileExtension {".c", ".s", ".m"} - buildoutputs { "$(OBJDIR)/%{file.objname}.o" } - buildmessage '$(notdir $<)' - buildcommands {'$(CC) %{premake.modules.gmake2.cpp.fileFlags(cfg, file)} $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"'} - - rule 'resource' - fileExtension ".rc" - buildoutputs { "$(OBJDIR)/%{file.objname}.res" } - buildmessage '$(notdir $<)' - buildcommands {'$(RESCOMP) $< -O coff -o "$@" $(ALL_RESFLAGS)'} - - global(nil) - end - - - function cpp.createRuleTable(prj) - local rules = {} - - local function addRule(extension, rule) - if type(extension) == 'table' then - for _, value in ipairs(extension) do - addRule(value, rule) - end - else - rules[extension] = rule - end - end - - -- add all rules. - local usedRules = table.join({'cpp', 'cc', 'resource'}, prj.rules) - for _, name in ipairs(usedRules) do - local rule = p.global.getRule(name) - addRule(rule.fileExtension, rule) - end - - -- create fileset categories. - local filesets = { - ['.o'] = 'OBJECTS', - ['.obj'] = 'OBJECTS', - ['.cc'] = 'SOURCES', - ['.cpp'] = 'SOURCES', - ['.cxx'] = 'SOURCES', - ['.mm'] = 'SOURCES', - ['.c'] = 'SOURCES', - ['.s'] = 'SOURCES', - ['.m'] = 'SOURCES', - ['.rc'] = 'RESOURCES', - } - - -- cache the result. - prj._gmake = prj._gmake or {} - prj._gmake.rules = rules - prj._gmake.filesets = filesets - end - - - function cpp.createFileTable(prj) - for cfg in project.eachconfig(prj) do - cfg._gmake = cfg._gmake or {} - cfg._gmake.filesets = {} - cfg._gmake.fileRules = {} - - local files = table.shallowcopy(prj._.files) - table.foreachi(files, function(node) - cpp.addFile(cfg, node) - end) - - for _, f in pairs(cfg._gmake.filesets) do - table.sort(f) - end - - cfg._gmake.kinds = table.keys(cfg._gmake.filesets) - table.sort(cfg._gmake.kinds) - - prj._gmake.kinds = table.join(prj._gmake.kinds or {}, cfg._gmake.kinds) - end - - -- we need to reassign object sequences if we generated any files. - if prj.hasGeneratedFiles and p.project.iscpp(prj) then - p.oven.assignObjectSequences(prj) - end - - prj._gmake.kinds = table.unique(prj._gmake.kinds) - table.sort(prj._gmake.kinds) - end - - - function cpp.addFile(cfg, node) - local filecfg = fileconfig.getconfig(node, cfg) - if not filecfg or filecfg.flags.ExcludeFromBuild then - return - end - - -- skip generated files, since we try to figure it out manually below. - if node.generated then - return - end - - -- process custom build commands. - if fileconfig.hasCustomBuildRule(filecfg) then - local env = table.shallowcopy(filecfg.environ) - env.PathVars = { - ["file.basename"] = { absolute = false, token = node.basename }, - ["file.abspath"] = { absolute = true, token = node.abspath }, - ["file.relpath"] = { absolute = false, token = node.relpath }, - ["file.name"] = { absolute = false, token = node.name }, - ["file.objname"] = { absolute = false, token = node.objname }, - ["file.path"] = { absolute = true, token = node.path }, - ["file.directory"] = { absolute = true, token = path.getdirectory(node.abspath) }, - ["file.reldirectory"] = { absolute = false, token = path.getdirectory(node.relpath) }, - } - - local shadowContext = p.context.extent(filecfg, env) - - local buildoutputs = p.project.getrelative(cfg.project, shadowContext.buildoutputs) - if buildoutputs and #buildoutputs > 0 then - local file = { - buildoutputs = buildoutputs, - source = node.relpath, - buildmessage = shadowContext.buildmessage, - buildcommands = shadowContext.buildcommands, - buildinputs = p.project.getrelative(cfg.project, shadowContext.buildinputs) - } - table.insert(cfg._gmake.fileRules, file) - - for _, output in ipairs(buildoutputs) do - cpp.addGeneratedFile(cfg, node, output) - end - end - else - cpp.addRuleFile(cfg, node) - end - end - - function cpp.determineFiletype(cfg, node) - -- determine which filetype to use - local filecfg = fileconfig.getconfig(node, cfg) - local fileext = path.getextension(node.abspath):lower() - if filecfg and filecfg.compileas then - if p.languages.isc(filecfg.compileas) then - fileext = ".c" - elseif p.languages.iscpp(filecfg.compileas) then - fileext = ".cpp" - end - end - - return fileext; - end - - function cpp.addGeneratedFile(cfg, source, filename) - -- mark that we have generated files. - cfg.project.hasGeneratedFiles = true - - -- add generated file to the project. - local files = cfg.project._.files - local node = files[filename] - if not node then - node = fileconfig.new(filename, cfg.project) - files[filename] = node - table.insert(files, node) - end - - -- always overwrite the dependency information. - node.dependsOn = source - node.generated = true - - -- add to config if not already added. - if not fileconfig.getconfig(node, cfg) then - fileconfig.addconfig(node, cfg) - end - - -- determine which filetype to use - local fileext = cpp.determineFiletype(cfg, node) - -- add file to the fileset. - local filesets = cfg.project._gmake.filesets - local kind = filesets[fileext] or "CUSTOM" - - -- don't link generated object files automatically if it's explicitly - -- disabled. - if path.isobjectfile(filename) and source.linkbuildoutputs == false then - kind = "CUSTOM" - end - - local fileset = cfg._gmake.filesets[kind] or {} - table.insert(fileset, filename) - cfg._gmake.filesets[kind] = fileset - - local generatedKind = "GENERATED" - local generatedFileset = cfg._gmake.filesets[generatedKind] or {} - table.insert(generatedFileset, filename) - cfg._gmake.filesets[generatedKind] = generatedFileset - - -- recursively setup rules. - cpp.addRuleFile(cfg, node) - end - - function cpp.addRuleFile(cfg, node) - local rules = cfg.project._gmake.rules - local fileext = cpp.determineFiletype(cfg, node) - local rule = rules[fileext] - if rule then - - local filecfg = fileconfig.getconfig(node, cfg) - local environ = table.shallowcopy(filecfg.environ) - - if rule.propertydefinition then - gmake2.prepareEnvironment(rule, environ, cfg) - gmake2.prepareEnvironment(rule, environ, filecfg) - end - - local shadowContext = p.context.extent(rule, environ) - - local buildoutputs = shadowContext.buildoutputs - local buildmessage = shadowContext.buildmessage - local buildcommands = shadowContext.buildcommands - local buildinputs = shadowContext.buildinputs - - buildoutputs = p.project.getrelative(cfg.project, buildoutputs) - if buildoutputs and #buildoutputs > 0 then - local file = { - buildoutputs = buildoutputs, - source = node.relpath, - buildmessage = buildmessage, - buildcommands = buildcommands, - buildinputs = buildinputs - } - table.insert(cfg._gmake.fileRules, file) - - for _, output in ipairs(buildoutputs) do - cpp.addGeneratedFile(cfg, node, output) - end - end - end - end - - --- --- Write out the settings for a particular configuration. --- - - cpp.elements.configuration = function(cfg) - return { - cpp.tools, - gmake2.target, - gmake2.objdir, - cpp.pch, - cpp.defines, - cpp.includes, - cpp.forceInclude, - cpp.cppFlags, - cpp.cFlags, - cpp.cxxFlags, - cpp.resFlags, - cpp.libs, - cpp.ldDeps, - cpp.ldFlags, - cpp.linkCmd, - cpp.bindirs, - cpp.exepaths, - gmake2.settings, - gmake2.preBuildCmds, - gmake2.preLinkCmds, - gmake2.postBuildCmds, - } - end - - - function cpp.outputConfigurationSection(prj) - _p('# Configurations') - _p('# #############################################') - _p('') - gmake2.outputSection(prj, cpp.elements.configuration) - end - - - function cpp.tools(cfg, toolset) - local tool = toolset.gettoolname(cfg, "cc") - if tool then - _p('ifeq ($(origin CC), default)') - _p(' CC = %s', tool) - _p('endif' ) - end - - tool = toolset.gettoolname(cfg, "cxx") - if tool then - _p('ifeq ($(origin CXX), default)') - _p(' CXX = %s', tool) - _p('endif' ) - end - - tool = toolset.gettoolname(cfg, "ar") - if tool then - _p('ifeq ($(origin AR), default)') - _p(' AR = %s', tool) - _p('endif' ) - end - - tool = toolset.gettoolname(cfg, "rc") - if tool then - _p('RESCOMP = %s', tool) - end - end - - - function cpp.pch(cfg, toolset) - -- If there is no header, or if PCH has been disabled, I can early out - if not cfg.pchheader or cfg.flags.NoPCH then - return - end - - -- Visual Studio requires the PCH header to be specified in the same way - -- it appears in the #include statements used in the source code; the PCH - -- source actual handles the compilation of the header. GCC compiles the - -- header file directly, and needs the file's actual file system path in - -- order to locate it. - - -- To maximize the compatibility between the two approaches, see if I can - -- locate the specified PCH header on one of the include file search paths - -- and, if so, adjust the path automatically so the user doesn't have - -- add a conditional configuration to the project script. - - local pch = cfg.pchheader - local found = false - - -- test locally in the project folder first (this is the most likely location) - local testname = path.join(cfg.project.basedir, pch) - if os.isfile(testname) then - pch = project.getrelative(cfg.project, testname) - found = true - else - -- else scan in all include dirs. - for _, incdir in ipairs(cfg.includedirs) do - testname = path.join(incdir, pch) - if os.isfile(testname) then - pch = project.getrelative(cfg.project, testname) - found = true - break - end - end - end - - if not found then - pch = project.getrelative(cfg.project, path.getabsolute(pch)) - end - - p.outln('PCH = ' .. pch) - p.outln('PCH_PLACEHOLDER = $(OBJDIR)/$(notdir $(PCH))') - p.outln('GCH = $(PCH_PLACEHOLDER).gch') - end - - - function cpp.defines(cfg, toolset) - p.outln('DEFINES +=' .. gmake2.list(table.join(toolset.getdefines(cfg.defines, cfg), toolset.getundefines(cfg.undefines)))) - end - - - function cpp.includes(cfg, toolset) - local includes = toolset.getincludedirs(cfg, cfg.includedirs, cfg.sysincludedirs) - p.outln('INCLUDES +=' .. gmake2.list(includes)) - end - - - function cpp.forceInclude(cfg, toolset) - local includes = toolset.getforceincludes(cfg) - p.outln('FORCE_INCLUDE +=' .. gmake2.list(includes)) - end - - - function cpp.cppFlags(cfg, toolset) - local flags = gmake2.list(toolset.getcppflags(cfg)) - p.outln('ALL_CPPFLAGS += $(CPPFLAGS)' .. flags .. ' $(DEFINES) $(INCLUDES)') - end - - - function cpp.cFlags(cfg, toolset) - local flags = gmake2.list(table.join(toolset.getcflags(cfg), cfg.buildoptions)) - p.outln('ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS)' .. flags) - end - - - function cpp.cxxFlags(cfg, toolset) - local flags = gmake2.list(table.join(toolset.getcxxflags(cfg), cfg.buildoptions)) - p.outln('ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS)' .. flags) - end - - - function cpp.resFlags(cfg, toolset) - local resflags = table.join(toolset.getdefines(cfg.resdefines), toolset.getincludedirs(cfg, cfg.resincludedirs), cfg.resoptions) - p.outln('ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)' .. gmake2.list(resflags)) - end - - - function cpp.libs(cfg, toolset) - local flags = toolset.getlinks(cfg) - p.outln('LIBS +=' .. gmake2.list(flags, true)) - end - - - function cpp.ldDeps(cfg, toolset) - local deps = config.getlinks(cfg, "siblings", "fullpath") - p.outln('LDDEPS +=' .. gmake2.list(p.esc(deps))) - end - - - function cpp.ldFlags(cfg, toolset) - local flags = table.join(toolset.getLibraryDirectories(cfg), toolset.getrunpathdirs(cfg, cfg.runpathdirs), toolset.getldflags(cfg), cfg.linkoptions) - p.outln('ALL_LDFLAGS += $(LDFLAGS)' .. gmake2.list(flags)) - end - - - function cpp.linkCmd(cfg, toolset) - if cfg.kind == p.STATICLIB then - if cfg.architecture == p.UNIVERSAL then - p.outln('LINKCMD = libtool -o "$@" $(OBJECTS)') - else - p.outln('LINKCMD = $(AR) -rcs "$@" $(OBJECTS)') - end - elseif cfg.kind == p.UTILITY then - -- Empty LINKCMD for Utility (only custom build rules) - p.outln('LINKCMD =') - else - -- this was $(TARGET) $(LDFLAGS) $(OBJECTS) - -- but had trouble linking to certain static libs; $(OBJECTS) moved up - -- $(LDFLAGS) moved to end (http://sourceforge.net/p/premake/patches/107/) - -- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/) - - local cc = iif(p.languages.isc(cfg.language), "CC", "CXX") - p.outln('LINKCMD = $(' .. cc .. ') -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)') - end - end - - - function cpp.bindirs(cfg, toolset) - local dirs = project.getrelative(cfg.project, cfg.bindirs) - if #dirs > 0 then - p.outln('EXECUTABLE_PATHS = "' .. table.concat(dirs, ":") .. '"') - end - end - - - function cpp.exepaths(cfg, toolset) - local dirs = project.getrelative(cfg.project, cfg.bindirs) - if #dirs > 0 then - p.outln('EXE_PATHS = export PATH=$(EXECUTABLE_PATHS):$$PATH;') - end - end - - --- --- Write out the per file configurations. --- - function cpp.outputPerFileConfigurationSection(prj) - _p('# Per File Configurations') - _p('# #############################################') - _p('') - for cfg in project.eachconfig(prj) do - table.foreachi(prj._.files, function(node) - local fcfg = fileconfig.getconfig(node, cfg) - if fcfg then - cpp.perFileFlags(cfg, fcfg) - end - end) - end - _p('') - end - - function cpp.makeVarName(prj, value, saltValue) - prj._gmake = prj._gmake or {} - prj._gmake.varlist = prj._gmake.varlist or {} - prj._gmake.varlistlength = prj._gmake.varlistlength or 0 - local cache = prj._gmake.varlist - local length = prj._gmake.varlistlength - - local key = value .. saltValue - - if (cache[key] ~= nil) then - return cache[key], false - end - - local var = string.format("PERFILE_FLAGS_%d", length) - cache[key] = var - - prj._gmake.varlistlength = length + 1 - - return var, true - end - - function cpp.perFileFlags(cfg, fcfg) - local toolset = gmake2.getToolSet(cfg) - - local isCFile = path.iscfile(fcfg.name) - - local getflags = iif(isCFile, toolset.getcflags, toolset.getcxxflags) - local value = gmake2.list(table.join(getflags(fcfg), fcfg.buildoptions)) - - if fcfg.defines or fcfg.undefines then - local defs = table.join(toolset.getdefines(fcfg.defines, cfg), toolset.getundefines(fcfg.undefines)) - if #defs > 0 then - value = value .. gmake2.list(defs) - end - end - - if fcfg.includedirs or fcfg.sysincludedirs then - local includes = toolset.getincludedirs(cfg, fcfg.includedirs, fcfg.sysincludedirs) - if #includes > 0 then - value = value .. gmake2.list(includes) - end - end - - if #value > 0 then - local newPerFileFlag = false - fcfg.flagsVariable, newPerFileFlag = cpp.makeVarName(cfg.project, value, iif(isCFile, '_C', '_CPP')) - if newPerFileFlag then - if isCFile then - _p('%s = $(ALL_CFLAGS)%s', fcfg.flagsVariable, value) - else - _p('%s = $(ALL_CXXFLAGS)%s', fcfg.flagsVariable, value) - end - end - end - end - - function cpp.fileFlags(cfg, file) - local fcfg = fileconfig.getconfig(file, cfg) - local flags = {} - - if cfg.pchheader and not cfg.flags.NoPCH and (not fcfg or not fcfg.flags.NoPCH) then - table.insert(flags, "-include $(PCH_PLACEHOLDER)") - end - - if fcfg and fcfg.flagsVariable then - table.insert(flags, string.format("$(%s)", fcfg.flagsVariable)) - else - local fileExt = cpp.determineFiletype(cfg, file) - - if path.iscfile(fileExt) then - table.insert(flags, "$(ALL_CFLAGS)") - elseif path.iscppfile(fileExt) then - table.insert(flags, "$(ALL_CXXFLAGS)") - end - end - - return table.concat(flags, ' ') - end - --- --- Write out the file sets. --- - - cpp.elements.filesets = function(cfg) - local result = {} - for _, kind in ipairs(cfg._gmake.kinds) do - for _, f in ipairs(cfg._gmake.filesets[kind]) do - table.insert(result, function(cfg, toolset) - cpp.outputFileset(cfg, kind, f) - end) - end - end - return result - end - - function cpp.outputFilesSection(prj) - _p('# File sets') - _p('# #############################################') - _p('') - - for _, kind in ipairs(prj._gmake.kinds) do - _x('%s :=', kind) - end - _x('') - - gmake2.outputSection(prj, cpp.elements.filesets) - end - - function cpp.outputFileset(cfg, kind, file) - _x('%s += %s', kind, file) - end - - --- --- Write out the targets. --- - - cpp.elements.rules = function(cfg) - return { - cpp.allRules, - cpp.targetRules, - gmake2.targetDirRules, - gmake2.objDirRules, - cpp.cleanRules, - gmake2.preBuildRules, - cpp.customDeps, - cpp.pchRules, - } - end - - - function cpp.outputRulesSection(prj) - _p('# Rules') - _p('# #############################################') - _p('') - gmake2.outputSection(prj, cpp.elements.rules) - end - - - function cpp.allRules(cfg, toolset) - if cfg.system == p.MACOSX and cfg.kind == p.WINDOWEDAPP then - _p('all: $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist') - _p('\t@:') - _p('') - _p('$(dir $(TARGETDIR))PkgInfo:') - _p('$(dir $(TARGETDIR))Info.plist:') - else - _p('all: $(TARGET)') - _p('\t@:') - end - _p('') - end - - - function cpp.targetRules(cfg, toolset) - local targets = '' - - for _, kind in ipairs(cfg._gmake.kinds) do - if kind ~= 'OBJECTS' and kind ~= 'RESOURCES' then - targets = targets .. '$(' .. kind .. ') ' - end - end - - targets = targets .. '$(OBJECTS) $(LDDEPS)' - if cfg._gmake.filesets['RESOURCES'] then - targets = targets .. ' $(RESOURCES)' - end - - _p('$(TARGET): %s | $(TARGETDIR)', targets) - _p('\t$(PRELINKCMDS)') - _p('\t@echo Linking %s', cfg.project.name) - _p('\t$(SILENT) $(LINKCMD)') - _p('\t$(POSTBUILDCMDS)') - _p('') - end - - - function cpp.customDeps(cfg, toolset) - for _, kind in ipairs(cfg._gmake.kinds) do - if kind == 'CUSTOM' or kind == 'SOURCES' then - _p('$(%s): | prebuild', kind) - end - end - end - - - function cpp.cleanRules(cfg, toolset) - _p('clean:') - _p('\t@echo Cleaning %s', cfg.project.name) - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) rm -f $(TARGET)') - _p('\t$(SILENT) rm -rf $(GENERATED)') - _p('\t$(SILENT) rm -rf $(OBJDIR)') - _p('else') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(TARGET)) del $(subst /,\\\\,$(TARGET))') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(GENERATED)) rmdir /s /q $(subst /,\\\\,$(GENERATED))') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\,$(OBJDIR))') - _p('endif') - _p('') - end - - - function cpp.pchRules(cfg, toolset) - _p('ifneq (,$(PCH))') - _p('$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)') - _p('$(GCH): $(PCH) | prebuild') - _p('\t@echo $(notdir $<)') - local cmd = iif(p.languages.isc(cfg.language), "$(CC) -x c-header $(ALL_CFLAGS)", "$(CXX) -x c++-header $(ALL_CXXFLAGS)") - _p('\t$(SILENT) %s -o "$@" -MF "$(@:%%.gch=%%.d)" -c "$<"', cmd) - _p('$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)') - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) touch "$@"') - _p('else') - _p('\t$(SILENT) echo $null >> "$@"') - _p('endif') - _p('else') - _p('$(OBJECTS): | prebuild') - _p('endif') - _p('') - end - --- --- Output the file compile targets. --- - - cpp.elements.fileRules = function(cfg) - local funcs = {} - for _, fileRule in ipairs(cfg._gmake.fileRules) do - table.insert(funcs, function(cfg, toolset) - cpp.outputFileRules(cfg, fileRule) - end) - end - return funcs - end - - - function cpp.outputFileRuleSection(prj) - _p('# File Rules') - _p('# #############################################') - _p('') - gmake2.outputSection(prj, cpp.elements.fileRules) - end - - - function cpp.outputFileRules(cfg, file) - local dependencies = p.esc(file.source) - if file.buildinputs and #file.buildinputs > 0 then - dependencies = dependencies .. " " .. table.concat(p.esc(file.buildinputs), " ") - end - - _p('%s: %s', file.buildoutputs[1], dependencies) - - if file.buildmessage then - _p('\t@echo %s', file.buildmessage) - end - - if file.buildcommands then - local cmds = os.translateCommandsAndPaths(file.buildcommands, cfg.project.basedir, cfg.project.location) - for _, cmd in ipairs(cmds) do - if cfg.bindirs and #cfg.bindirs > 0 then - _p('\t$(SILENT) $(EXE_PATHS) %s', cmd) - else - _p('\t$(SILENT) %s', cmd) - end - end - end - - -- TODO: this is a hack with some imperfect side-effects. - -- better solution would be to emit a dummy file for the rule, and then outputs depend on it (must clean up dummy in 'clean') - -- better yet, is to use pattern rules, but we need to detect that all outputs have the same stem - if #file.buildoutputs > 1 then - _p('%s: %s', table.concat({ table.unpack(file.buildoutputs, 2) }, ' '), file.buildoutputs[1]) - end - end - - ---------------------------------------------------------------------------- --- --- Handlers for individual makefile elements --- ---------------------------------------------------------------------------- - - - function cpp.dependencies(prj) - -- include the dependencies, built by GCC (with the -MMD flag) - _p('-include $(OBJECTS:%%.o=%%.d)') - _p('ifneq (,$(PCH))') - _p(' -include $(PCH_PLACEHOLDER).d') - _p('endif') - end diff --git a/build/premake/premake5/modules/gmake2/gmake2_csharp.lua b/build/premake/premake5/modules/gmake2/gmake2_csharp.lua deleted file mode 100644 index 5890d3cf6a..0000000000 --- a/build/premake/premake5/modules/gmake2/gmake2_csharp.lua +++ /dev/null @@ -1,317 +0,0 @@ --- --- gmake2_csharp.lua --- Generate a C# project makefile. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local gmake2 = p.modules.gmake2 - - gmake2.cs = {} - local cs = gmake2.cs - - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - - --- --- Add namespace for element definition lists for p.callarray() --- - - cs.elements = {} - - --- --- Generate a GNU make C++ project makefile, with support for the new platforms API. --- - - cs.elements.makefile = function(prj) - return { - gmake2.header, - gmake2.phonyRules, - gmake2.csConfigs, - gmake2.csProjectConfig, - gmake2.csSources, - gmake2.csEmbedFiles, - gmake2.csCopyFiles, - gmake2.csResponseFile, - gmake2.shellType, - gmake2.csAllRules, - gmake2.csTargetRules, - gmake2.targetDirRules, - gmake2.csResponseRules, - gmake2.objDirRules, - gmake2.csCleanRules, - gmake2.preBuildRules, - gmake2.csFileRules, - } - end - - --- --- Generate a GNU make C# project makefile, with support for the new platforms API. --- - - function cs.generate(prj) - p.eol("\n") - local toolset = p.tools.dotnet - p.callArray(cs.elements.makefile, prj, toolset) - end - - --- --- Write out the settings for a particular configuration. --- - - cs.elements.configuration = function(cfg) - return { - gmake2.csTools, - gmake2.target, - gmake2.objdir, - gmake2.csFlags, - gmake2.csLinkCmd, - gmake2.preBuildCmds, - gmake2.preLinkCmds, - gmake2.postBuildCmds, - gmake2.settings, - } - end - - function gmake2.csConfigs(prj, toolset) - for cfg in project.eachconfig(prj) do - _x('ifeq ($(config),%s)', cfg.shortname) - p.callArray(cs.elements.configuration, cfg, toolset) - _p('endif') - _p('') - end - end - - --- --- Given a .resx resource file, builds the path to corresponding .resource --- file, matching the behavior and naming of Visual Studio. --- - - function cs.getresourcefilename(cfg, fname) - if path.getextension(fname) == ".resx" then - local name = cfg.buildtarget.basename .. "." - local dir = path.getdirectory(fname) - if dir ~= "." then - name = name .. path.translate(dir, ".") .. "." - end - return "$(OBJDIR)/" .. p.esc(name .. path.getbasename(fname)) .. ".resources" - else - return fname - end - end - - --- --- Iterate and output some selection of the source code files. --- - - function cs.listsources(prj, selector) - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - local value = selector(node) - if value then - _x('\t%s \\', value) - end - end - }) - end - - - - - ---------------------------------------------------------------------------- --- --- Handlers for individual makefile elements --- ---------------------------------------------------------------------------- - - function gmake2.csAllRules(prj, toolset) - _p('all: prebuild $(EMBEDFILES) $(COPYFILES) $(TARGET)') - _p('') - end - - - function gmake2.csCleanRules(prj, toolset) - --[[ - -- porting from 4.x - _p('clean:') - _p('\t@echo Cleaning %s', prj.name) - _p('ifeq (posix,$(SHELLTYPE))') - _p('\t$(SILENT) rm -f $(TARGETDIR)/%s.* $(COPYFILES)', target.basename) - _p('\t$(SILENT) rm -rf $(OBJDIR)') - _p('else') - _p('\t$(SILENT) if exist $(subst /,\\\\,$(TARGETDIR)/%s) del $(subst /,\\\\,$(TARGETDIR)/%s.*)', target.name, target.basename) - for target, source in pairs(cfgpairs[anycfg]) do - _p('\t$(SILENT) if exist $(subst /,\\\\,%s) del $(subst /,\\\\,%s)', target, target) - end - for target, source in pairs(copypairs) do - _p('\t$(SILENT) if exist $(subst /,\\\\,%s) del $(subst /,\\\\,%s)', target, target) - end - _p('\t$(SILENT) if exist $(subst /,\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\,$(OBJDIR))') - _p('endif') - _p('') - --]] - end - - - function gmake2.csCopyFiles(prj, toolset) - --[[ - -- copied from 4.x; needs more porting - _p('COPYFILES += \\') - for target, source in pairs(cfgpairs[anycfg]) do - _p('\t%s \\', target) - end - for target, source in pairs(copypairs) do - _p('\t%s \\', target) - end - _p('') - --]] - end - - - function cs.getresponsefilename(prj) - return '$(OBJDIR)/' .. prj.filename .. '.rsp' - end - - - function gmake2.csResponseFile(prj, toolset) - _x('RESPONSE += ' .. gmake2.cs.getresponsefilename(prj)) - end - - - function gmake2.csResponseRules(prj) - local toolset = p.tools.dotnet - local ext = gmake2.getmakefilename(prj, true) - local makefile = path.getname(p.filename(prj, ext)) - local response = gmake2.cs.getresponsefilename(prj) - - _p('$(RESPONSE): %s', makefile) - _p('\t@echo Generating response file', prj.name) - - _p('ifeq (posix,$(SHELLTYPE))') - _x('\t$(SILENT) rm -f $(RESPONSE)') - _p('else') - _x('\t$(SILENT) if exist $(RESPONSE) del %s', path.translate(response, '\\')) - _p('endif') - - local sep = os.istarget("windows") and "\\" or "/" - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = function(node, depth) - if toolset.fileinfo(node).action == "Compile" then - _x('\t@echo %s >> $(RESPONSE)', path.translate(node.relpath, sep)) - end - end - }) - _p('') - end - - - function gmake2.csEmbedFiles(prj, toolset) - local cfg = project.getfirstconfig(prj) - - _p('EMBEDFILES += \\') - cs.listsources(prj, function(node) - local fcfg = fileconfig.getconfig(node, cfg) - local info = toolset.fileinfo(fcfg) - if info.action == "EmbeddedResource" then - return cs.getresourcefilename(cfg, node.relpath) - end - end) - _p('') - end - - - function gmake2.csFileRules(prj, toolset) - --[[ - -- porting from 4.x - _p('# Per-configuration copied file rules') - for cfg in p.eachconfig(prj) do - _x('ifneq (,$(findstring %s,$(config)))', cfg.name:lower()) - for target, source in pairs(cfgpairs[cfg]) do - p.make_copyrule(source, target) - end - _p('endif') - _p('') - end - - _p('# Copied file rules') - for target, source in pairs(copypairs) do - p.make_copyrule(source, target) - end - - _p('# Embedded file rules') - for _, fname in ipairs(embedded) do - if path.getextension(fname) == ".resx" then - _x('%s: %s', getresourcefilename(prj, fname), fname) - _p('\t$(SILENT) $(RESGEN) $^ $@') - end - _p('') - end - --]] - end - - - function gmake2.csFlags(cfg, toolset) - _p(' FLAGS =%s', gmake2.list(toolset.getflags(cfg))) - end - - - function gmake2.csLinkCmd(cfg, toolset) - local deps = p.esc(config.getlinks(cfg, "dependencies", "fullpath")) - _p(' DEPENDS =%s', gmake2.list(deps)) - _p(' REFERENCES = %s', table.implode(deps, "/r:", "", " ")) - end - - - function gmake2.csProjectConfig(prj, toolset) - -- To maintain compatibility with Visual Studio, these values must - -- be set on the project level, and not per-configuration. - local cfg = project.getfirstconfig(prj) - - local kindflag = "/t:" .. toolset.getkind(cfg):lower() - local libdirs = table.implode(p.esc(cfg.libdirs), "/lib:", "", " ") - _p('FLAGS += %s', table.concat(table.join(kindflag, libdirs), " ")) - - local refs = p.esc(config.getlinks(cfg, "system", "fullpath")) - _p('REFERENCES += %s', table.implode(refs, "/r:", "", " ")) - _p('') - end - - - function gmake2.csSources(prj, toolset) - local cfg = project.getfirstconfig(prj) - - _p('SOURCES += \\') - cs.listsources(prj, function(node) - local fcfg = fileconfig.getconfig(node, cfg) - local info = toolset.fileinfo(fcfg) - if info.action == "Compile" then - return node.relpath - end - end) - _p('') - end - - - function gmake2.csTargetRules(prj, toolset) - _p('$(TARGET): $(SOURCES) $(EMBEDFILES) $(DEPENDS) $(RESPONSE) | $(TARGETDIR)') - _p('\t$(PRELINKCMDS)') - _p('\t$(SILENT) $(CSC) /nologo /out:$@ $(FLAGS) $(REFERENCES) @$(RESPONSE) $(patsubst %%,/resource:%%,$(EMBEDFILES))') - _p('\t$(POSTBUILDCMDS)') - _p('') - end - - - function gmake2.csTools(cfg, toolset) - _p(' CSC = %s', toolset.gettoolname(cfg, "csc")) - _p(' RESGEN = %s', toolset.gettoolname(cfg, "resgen")) - end diff --git a/build/premake/premake5/modules/gmake2/gmake2_makefile.lua b/build/premake/premake5/modules/gmake2/gmake2_makefile.lua deleted file mode 100644 index 577e083e80..0000000000 --- a/build/premake/premake5/modules/gmake2/gmake2_makefile.lua +++ /dev/null @@ -1,111 +0,0 @@ --- --- gmake2_makefile.lua --- Generate a C/C++ project makefile. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local gmake2 = p.modules.gmake2 - - gmake2.makefile = {} - local makefile = gmake2.makefile - - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - ---- --- Add namespace for element definition lists for p.callArray() ---- - makefile.elements = {} - --- --- Generate a GNU make makefile project makefile. --- - - makefile.elements.makefile = function(prj) - return { - gmake2.header, - gmake2.phonyRules, - makefile.configs, - makefile.targetRules - } - end - - function makefile.generate(prj) - p.eol("\n") - p.callArray(makefile.elements.makefile, prj) - end - - - makefile.elements.configuration = function(cfg) - return { - gmake2.target, - gmake2.buildCommands, - gmake2.cleanCommands, - } - end - - function makefile.configs(prj) - local first = true - for cfg in project.eachconfig(prj) do - -- identify the toolset used by this configurations (would be nicer if - -- this were computed and stored with the configuration up front) - - local toolset = p.tools[cfg.toolset or "gcc"] - if not toolset then - error("Invalid toolset '" .. cfg.toolset .. "'") - end - - if first then - _x('ifeq ($(config),%s)', cfg.shortname) - first = false - else - _x('else ifeq ($(config),%s)', cfg.shortname) - end - - p.callArray(makefile.elements.configuration, cfg, toolset) - _p('') - end - - if not first then - _p('else') - _p(' $(error "invalid configuration $(config)")') - _p('endif') - _p('') - end - end - - function makefile.targetRules(prj) - _p('$(TARGET):') - _p('\t$(BUILDCMDS)') - _p('') - _p('clean:') - _p('\t$(CLEANCMDS)') - _p('') - end - - - function gmake2.buildCommands(cfg) - _p(' define BUILDCMDS') - local steps = cfg.buildcommands - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - _p('\t@echo Running build commands') - _p('\t%s', table.implode(steps, "", "", "\n\t")) - end - _p(' endef') - end - - - function gmake2.cleanCommands(cfg) - _p(' define CLEANCMDS') - local steps = cfg.cleancommands - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - _p('\t@echo Running clean commands') - _p('\t%s', table.implode(steps, "", "", "\n\t")) - end - _p(' endef') - end - diff --git a/build/premake/premake5/modules/gmake2/gmake2_utility.lua b/build/premake/premake5/modules/gmake2/gmake2_utility.lua deleted file mode 100644 index d8d965e9ff..0000000000 --- a/build/premake/premake5/modules/gmake2/gmake2_utility.lua +++ /dev/null @@ -1,386 +0,0 @@ --- --- gmake2_utility.lua --- Generate a C/C++ project makefile. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local gmake2 = p.modules.gmake2 - - gmake2.utility = {} - local utility = gmake2.utility - - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - ---- --- Add namespace for element definition lists for premake.callarray() ---- - - utility.elements = {} - - --- --- Generate a GNU make utility project makefile --- - - utility.elements.makefile = function(prj) - return { - gmake2.header, - gmake2.phonyRules, - gmake2.shellType, - utility.initialize, - utility.createFileTable, - utility.outputConfigurationSection, - utility.outputFilesSection, - utility.outputRulesSection, - utility.outputFileRuleSection, - } - end - - - function utility.generate(prj) - p.eol("\n") - p.callArray(utility.elements.makefile, prj) - - -- allow the garbage collector to clean things up. - for cfg in project.eachconfig(prj) do - cfg._gmake = nil - end - prj._gmake = nil - - end - - - function utility.initialize(prj) - prj._gmake = prj._gmake or {} - prj._gmake.rules = prj.rules - prj._gmake.filesets = { } - end - - - function utility.createFileTable(prj) - for cfg in project.eachconfig(prj) do - cfg._gmake = cfg._gmake or {} - cfg._gmake.filesets = {} - cfg._gmake.fileRules = {} - - local files = table.shallowcopy(prj._.files) - table.foreachi(files, function(node) - utility.addFile(cfg, node, prj) - end) - - for _, f in pairs(cfg._gmake.filesets) do - table.sort(f) - end - - cfg._gmake.kinds = table.keys(cfg._gmake.filesets) - table.sort(cfg._gmake.kinds) - - prj._gmake.kinds = table.join(prj._gmake.kinds or {}, cfg._gmake.kinds) - end - - prj._gmake.kinds = table.unique(prj._gmake.kinds) - table.sort(prj._gmake.kinds) - end - - - function utility.addFile(cfg, node, prj) - local filecfg = fileconfig.getconfig(node, cfg) - if not filecfg or filecfg.flags.ExcludeFromBuild then - return - end - - -- skip generated files, since we try to figure it out manually below. - if node.generated then - return - end - - -- process custom build commands. - if fileconfig.hasCustomBuildRule(filecfg) then - local env = table.shallowcopy(filecfg.environ) - env.PathVars = { - ["file.basename"] = { absolute = false, token = node.basename }, - ["file.abspath"] = { absolute = true, token = node.abspath }, - ["file.relpath"] = { absolute = false, token = node.relpath }, - ["file.name"] = { absolute = false, token = node.name }, - ["file.path"] = { absolute = true, token = node.path }, - } - - local shadowContext = p.context.extent(filecfg, env) - - local buildoutputs = p.project.getrelative(cfg.project, shadowContext.buildoutputs) - if buildoutputs and #buildoutputs > 0 then - local file = { - buildoutputs = buildoutputs, - source = node.relpath, - buildmessage = shadowContext.buildmessage, - buildcommands = shadowContext.buildcommands, - buildinputs = p.project.getrelative(cfg.project, shadowContext.buildinputs) - } - table.insert(cfg._gmake.fileRules, file) - - for _, output in ipairs(buildoutputs) do - utility.addGeneratedFile(cfg, node, output) - end - end - else - utility.addRuleFile(cfg, node) - end - end - - - function utility.addGeneratedFile(cfg, source, filename) - -- mark that we have generated files. - cfg.project.hasGeneratedFiles = true - - -- add generated file to the project. - local files = cfg.project._.files - local node = files[filename] - if not node then - node = fileconfig.new(filename, cfg.project) - files[filename] = node - table.insert(files, node) - end - - -- always overwrite the dependency information. - node.dependsOn = source - node.generated = true - - -- add to config if not already added. - if not fileconfig.getconfig(node, cfg) then - fileconfig.addconfig(node, cfg) - end - - -- add file to the fileset. - local filesets = cfg.project._gmake.filesets - local kind = "CUSTOM" - - local fileset = cfg._gmake.filesets[kind] or {} - table.insert(fileset, filename) - cfg._gmake.filesets[kind] = fileset - - -- recursively setup rules. - utility.addRuleFile(cfg, node) - end - - - function utility.addRuleFile(cfg, node) - local rules = cfg.project._gmake.rules - local rule = rules[path.getextension(node.abspath):lower()] - if rule then - - local filecfg = fileconfig.getconfig(node, cfg) - local environ = table.shallowcopy(filecfg.environ) - - if rule.propertydefinition then - gmake2.prepareEnvironment(rule, environ, cfg) - gmake2.prepareEnvironment(rule, environ, filecfg) - end - - local shadowContext = p.context.extent(rule, environ) - - local buildoutputs = shadowContext.buildoutputs - local buildmessage = shadowContext.buildmessage - local buildcommands = shadowContext.buildcommands - local buildinputs = shadowContext.buildinputs - - buildoutputs = p.project.getrelative(cfg.project, buildoutputs) - if buildoutputs and #buildoutputs > 0 then - local file = { - buildoutputs = buildoutputs, - source = node.relpath, - buildmessage = buildmessage, - buildcommands = buildcommands, - buildinputs = buildinputs - } - table.insert(cfg._gmake.fileRules, file) - - for _, output in ipairs(buildoutputs) do - utility.addGeneratedFile(cfg, node, output) - end - end - end - end - - --- --- Write out the settings for a particular configuration. --- - - utility.elements.configuration = function(cfg) - return { - utility.bindirs, - utility.exepaths, - gmake2.settings, - gmake2.preBuildCmds, - gmake2.preLinkCmds, - gmake2.postBuildCmds, - } - end - - - function utility.outputConfigurationSection(prj) - _p('# Configurations') - _p('# #############################################') - _p('') - gmake2.outputSection(prj, utility.elements.configuration) - end - - - function utility.bindirs(cfg, toolset) - local dirs = project.getrelative(cfg.project, cfg.bindirs) - if #dirs > 0 then - p.outln('EXECUTABLE_PATHS = "' .. table.concat(dirs, ":") .. '"') - end - end - - - function utility.exepaths(cfg, toolset) - local dirs = project.getrelative(cfg.project, cfg.bindirs) - if #dirs > 0 then - p.outln('EXE_PATHS = PATH=$(EXECUTABLE_PATHS):$$PATH;') - end - end - - --- --- Write out the file sets. --- - - utility.elements.filesets = function(cfg) - local result = {} - for _, kind in ipairs(cfg._gmake.kinds) do - for _, f in ipairs(cfg._gmake.filesets[kind]) do - table.insert(result, function(cfg, toolset) - utility.outputFileset(cfg, kind, f) - end) - end - end - return result - end - - - function utility.outputFilesSection(prj) - _p('# File sets') - _p('# #############################################') - _p('') - - for _, kind in ipairs(prj._gmake.kinds) do - _x('%s :=', kind) - end - _x('') - - gmake2.outputSection(prj, utility.elements.filesets) - end - - - function utility.outputFileset(cfg, kind, file) - _x('%s += %s', kind, file) - end - - --- --- Write out the targets. --- - - utility.elements.rules = function(cfg) - return { - utility.allRules, - utility.targetRules, - gmake2.targetDirRules, - utility.cleanRules, - } - end - - - function utility.outputRulesSection(prj) - _p('# Rules') - _p('# #############################################') - _p('') - gmake2.outputSection(prj, utility.elements.rules) - end - - - function utility.allRules(cfg, toolset) - local allTargets = 'all: $(TARGETDIR) $(TARGET)' - for _, kind in ipairs(cfg._gmake.kinds) do - allTargets = allTargets .. ' $(' .. kind .. ')' - end - _p(allTargets) - _p('\t@:') - _p('') - end - - - function utility.targetRules(cfg, toolset) - local targets = '' - - for _, kind in ipairs(cfg._gmake.kinds) do - targets = targets .. '$(' .. kind .. ') ' - end - - _p('$(TARGET): %s', targets) - _p('\t$(PREBUILDCMDS)') - _p('\t$(PRELINKCMDS)') - _p('\t$(POSTBUILDCMDS)') - _p('') - end - - - function utility.cleanRules(cfg, toolset) - _p('clean:') - _p('\t@echo Cleaning %s', cfg.project.name) - _p('') - end - - --- --- Output the file compile targets. --- - - utility.elements.fileRules = function(cfg) - local funcs = {} - for _, fileRule in ipairs(cfg._gmake.fileRules) do - table.insert(funcs, function(cfg, toolset) - utility.outputFileRules(cfg, fileRule) - end) - end - return funcs - end - - - function utility.outputFileRuleSection(prj) - _p('# File Rules') - _p('# #############################################') - _p('') - gmake2.outputSection(prj, utility.elements.fileRules) - end - - - function utility.outputFileRules(cfg, file) - local outputs = table.concat(file.buildoutputs, ' ') - - local dependencies = p.esc(file.source) - if file.buildinputs and #file.buildinputs > 0 then - dependencies = dependencies .. " " .. table.concat(p.esc(file.buildinputs), " ") - end - - _p('%s: %s', outputs, dependencies) - - if file.buildmessage then - _p('\t@echo %s', file.buildmessage) - end - - if file.buildcommands then - local cmds = os.translateCommandsAndPaths(file.buildcommands, cfg.project.basedir, cfg.project.location) - for _, cmd in ipairs(cmds) do - if cfg.bindirs and #cfg.bindirs > 0 then - _p('\t$(SILENT) $(EXE_PATHS) %s', cmd) - else - _p('\t$(SILENT) %s', cmd) - end - end - end - end diff --git a/build/premake/premake5/modules/gmake2/gmake2_workspace.lua b/build/premake/premake5/modules/gmake2/gmake2_workspace.lua deleted file mode 100644 index e5784ace79..0000000000 --- a/build/premake/premake5/modules/gmake2/gmake2_workspace.lua +++ /dev/null @@ -1,202 +0,0 @@ --- --- gmake2_workspace.lua --- Generate a workspace-level makefile. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local gmake2 = p.modules.gmake2 - - local tree = p.tree - local project = p.project - --- --- Generate a GNU make "workspace" makefile, with support for the new platforms API. --- - - function gmake2.generate_workspace(wks) - p.eol("\n") - - gmake2.header(wks) - - gmake2.configmap(wks) - gmake2.projects(wks) - - gmake2.workspacePhonyRule(wks) - gmake2.groupRules(wks) - - gmake2.projectrules(wks) - gmake2.cleanrules(wks) - gmake2.helprule(wks) - end - - --- --- Write out the workspace's configuration map, which maps workspace --- level configurations to the project level equivalents. --- - - function gmake2.configmap(wks) - local first = true - for cfg in p.workspace.eachconfig(wks) do - if first then - _p('ifeq ($(config),%s)', cfg.shortname) - first = false - else - _p('else ifeq ($(config),%s)', cfg.shortname) - end - - for prj in p.workspace.eachproject(wks) do - local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform) - if prjcfg then - _p(' %s_config = %s', gmake2.tovar(prj.name), prjcfg.shortname) - end - end - - _p('') - end - - if not first then - _p('else') - _p(' $(error "invalid configuration $(config)")') - _p('endif') - _p('') - end - end - - --- --- Write out the rules for the `make clean` action. --- - - function gmake2.cleanrules(wks) - _p('clean:') - for prj in p.workspace.eachproject(wks) do - local prjpath = p.filename(prj, gmake2.getmakefilename(prj, true)) - local prjdir = path.getdirectory(path.getrelative(wks.location, prjpath)) - local prjname = path.getname(prjpath) - _x(1,'@${MAKE} --no-print-directory -C %s -f %s clean', prjdir, prjname) - end - _p('') - end - - --- --- Write out the make file help rule and configurations list. --- - - function gmake2.helprule(wks) - _p('help:') - _p(1,'@echo "Usage: make [config=name] [target]"') - _p(1,'@echo ""') - _p(1,'@echo "CONFIGURATIONS:"') - - for cfg in p.workspace.eachconfig(wks) do - _x(1, '@echo " %s"', cfg.shortname) - end - - _p(1,'@echo ""') - - _p(1,'@echo "TARGETS:"') - _p(1,'@echo " all (default)"') - _p(1,'@echo " clean"') - - for prj in p.workspace.eachproject(wks) do - _p(1,'@echo " %s"', prj.name) - end - - _p(1,'@echo ""') - _p(1,'@echo "For more information, see https://github.com/premake/premake-core/wiki"') - end - - --- --- Write out the list of projects that comprise the workspace. --- - - function gmake2.projects(wks) - _p('PROJECTS := %s', table.concat(p.esc(table.extract(wks.projects, "name")), " ")) - _p('') - end - --- --- Write out the workspace PHONY rule --- - - function gmake2.workspacePhonyRule(wks) - local groups = {} - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onbranch = function(n) - table.insert(groups, n.path) - end - }) - - _p('.PHONY: all clean help $(PROJECTS) ' .. table.implode(groups, '', '', ' ')) - _p('') - _p('all: $(PROJECTS)') - _p('') - end - --- --- Write out the phony rules representing project groups --- - function gmake2.groupRules(wks) - -- Transform workspace groups into target aggregate - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onbranch = function(n) - local rule = n.path .. ":" - local projectTargets = {} - local groupTargets = {} - for i, c in pairs(n.children) - do - if type(i) == "string" - then - if c.project - then - table.insert(projectTargets, c.name) - else - table.insert(groupTargets, c.path) - end - end - end - if #groupTargets > 0 then - table.sort(groupTargets) - rule = rule .. " " .. table.concat(groupTargets, " ") - end - if #projectTargets > 0 then - table.sort(projectTargets) - rule = rule .. " " .. table.concat(projectTargets, " ") - end - _p(rule) - _p('') - end - }) - end - --- --- Write out the rules to build each of the workspace's projects. --- - - function gmake2.projectrules(wks) - for prj in p.workspace.eachproject(wks) do - local deps = project.getdependencies(prj) - deps = table.extract(deps, "name") - _p('%s:%s', p.esc(prj.name), gmake2.list(deps)) - - local cfgvar = gmake2.tovar(prj.name) - _p('ifneq (,$(%s_config))', cfgvar) - - _p(1,'@echo "==== Building %s ($(%s_config)) ===="', prj.name, cfgvar) - - local prjpath = p.filename(prj, gmake2.getmakefilename(prj, true)) - local prjdir = path.getdirectory(path.getrelative(wks.location, prjpath)) - local prjname = path.getname(prjpath) - - _x(1,'@${MAKE} --no-print-directory -C %s -f %s config=$(%s_config)', prjdir, prjname, cfgvar) - - _p('endif') - _p('') - end - end diff --git a/build/premake/premake5/modules/gmake2/tests/_tests.lua b/build/premake/premake5/modules/gmake2/tests/_tests.lua deleted file mode 100644 index 448be95d14..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/_tests.lua +++ /dev/null @@ -1,16 +0,0 @@ -require ("gmake2") - -return { - "test_gmake2_buildcmds.lua", - "test_gmake2_clang.lua", - "test_gmake2_file_rules.lua", - "test_gmake2_flags.lua", - "test_gmake2_ldflags.lua", - "test_gmake2_linking.lua", - "test_gmake2_makefile.lua", - "test_gmake2_objects.lua", - "test_gmake2_pch.lua", - "test_gmake2_perfile_flags.lua", - "test_gmake2_target_rules.lua", - "test_gmake2_tools.lua", -} diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_buildcmds.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_buildcmds.lua deleted file mode 100644 index 23ea9aedb9..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_buildcmds.lua +++ /dev/null @@ -1,48 +0,0 @@ - - - -local suite = test.declare("gmake2_buildcommands") -local gmake2 = premake.modules.gmake2 - -local wks, prj, cfg - -function suite.setup() - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - prj = test.createProject(wks) -end - - -local function prepare() - wks = test.getWorkspace(wks) - prj = test.getproject(wks, 1) - cfg = test.getconfig(prj, "Debug") - - local toolset = gmake2.getToolSet(cfg) - gmake2.postBuildCmds(cfg, toolset) -end - - -function suite.postbuildcommands() - targetname "blink" - kind "StaticLib" - language "C++" - - postbuildcommands - { - "mkdir lib/www", - "mkdir lib/www" - } - - prepare() - - test.capture [[ -define POSTBUILDCMDS - @echo Running postbuild commands - mkdir lib/www - mkdir lib/www -endef -]] -end - - diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_clang.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_clang.lua deleted file mode 100644 index 4c66d3686d..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_clang.lua +++ /dev/null @@ -1,46 +0,0 @@ --- --- test_gmake2_clang.lua --- Test Clang support in Makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_clang") - - local p = premake - local gmake2 = p.modules.gmake2 - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - toolset "clang" - prj = p.workspace.getproject(wks, 1) - end - - --- --- Make sure that the correct compilers are used. --- - - function suite.usesCorrectCompilers() - gmake2.cpp.outputConfigurationSection(prj) - test.capture [[ -# Configurations -# ############################################# - -ifeq ($(origin CC), default) - CC = clang -endif -ifeq ($(origin CXX), default) - CXX = clang++ -endif -ifeq ($(origin AR), default) - AR = ar -endif -]] - end - diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_file_rules.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_file_rules.lua deleted file mode 100644 index 0e767bb360..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_file_rules.lua +++ /dev/null @@ -1,320 +0,0 @@ --- --- test_gmake2_file_rules.lua --- Validate the makefile source building rules. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_file_rules") - - local p = premake - local gmake2 = p.modules.gmake2 - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.escaper(gmake2.esc) - gmake2.cpp.initialize() - - rule "TestRule" - display "Test Rule" - fileextension ".rule" - - propertydefinition { - name = "TestProperty", - kind = "boolean", - value = false, - switch = "-p" - } - - propertydefinition { - name = "TestProperty2", - kind = "boolean", - value = false, - switch = "-p2" - } - - propertydefinition { - name = "TestListProperty", - kind = "list" - } - - propertydefinition { - name = "TestListPropertySeparator", - kind = "list", - separator = "," - } - - buildmessage 'Rule-ing %{file.name}' - buildcommands 'dorule %{TestProperty} %{TestProperty2} %{TestListProperty} %{TestListPropertySeparator} "%{file.path}"' - buildoutputs { "%{file.basename}.obj" } - - wks = test.createWorkspace() - end - - local function prepare() - prj = p.workspace.getproject(wks, 1) - p.oven.bake() - - gmake2.cpp.createRuleTable(prj) - gmake2.cpp.createFileTable(prj) - gmake2.cpp.outputFileRuleSection(prj) - end - - --- --- Two files with the same base name should have different object files. --- - - function suite.uniqueObjNames_onBaseNameCollision() - files { "src/hello.cpp", "src/greetings/hello.cpp" } - prepare() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/hello.o: src/greetings/hello.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/hello1.o: src/hello.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - - ]] - end - - --- --- C files in C++ projects should been compiled as c --- - - function suite.cFilesGetsCompiledWithCCWhileInCppProject() - files { "src/hello.c", "src/test.cpp" } - prepare() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/test.o: src/test.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - - ]] - end - --- --- C files in C++ projects can be compiled as C++ with compileas --- - - function suite.cFilesGetsCompiledWithCXXWithCompileas() - files { "src/hello.c", "src/test.c" } - filter { "files:src/hello.c" } - compileas "C++" - prepare() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/test.o: src/test.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - ]] - end - --- --- C files in C++ projects can be compiled as C++ with 'compileas' on a configuration basis --- - - function suite.cFilesGetsCompiledWithCXXWithCompileasDebugOnly() - files { "src/hello.c", "src/test.c" } - filter { "configurations:Debug", "files:src/hello.c" } - compileas "C++" - prepare() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/test.o: src/test.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - -ifeq ($(config),debug) -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - -else ifeq ($(config),release) -$(OBJDIR)/hello.o: src/hello.c - @echo $(notdir $<) - $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - -endif - ]] - end - - --- --- If a custom build rule is supplied, it should be used. --- - - function suite.customBuildRule() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - prepare() - test.capture [[ -# File Rules -# ############################################# - -ifeq ($(config),debug) -obj/Debug/hello.obj: hello.x - @echo Compiling hello.x - $(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo" - $(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj" - -else ifeq ($(config),release) -obj/Release/hello.obj: hello.x - @echo Compiling hello.x - $(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo" - $(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj" - -endif - ]] - end - - function suite.customBuildRuleWithAdditionalInputs() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - buildinputs { "%{file.path}.inc", "%{file.path}.inc2" } - prepare() - test.capture [[ -# File Rules -# ############################################# - -ifeq ($(config),debug) -obj/Debug/hello.obj: hello.x hello.x.inc hello.x.inc2 - @echo Compiling hello.x - $(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo" - $(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj" - -else ifeq ($(config),release) -obj/Release/hello.obj: hello.x hello.x.inc hello.x.inc2 - @echo Compiling hello.x - $(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo" - $(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj" - -endif - ]] - end - - function suite.customBuildRuleWithAdditionalOutputs() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj", "%{cfg.objdir}/%{file.basename}.other", "%{cfg.objdir}/%{file.basename}.another" } - prepare() - test.capture [[ -# File Rules -# ############################################# - -ifeq ($(config),debug) -obj/Debug/hello.obj: hello.x - @echo Compiling hello.x - $(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo" - $(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj" -obj/Debug/hello.other obj/Debug/hello.another: obj/Debug/hello.obj - -else ifeq ($(config),release) -obj/Release/hello.obj: hello.x - @echo Compiling hello.x - $(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo" - $(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj" -obj/Release/hello.other obj/Release/hello.another: obj/Release/hello.obj - -endif - ]] - end - - function suite.customRuleWithProps() - - rules { "TestRule" } - - files { "test.rule", "test2.rule" } - - testRuleVars { - TestProperty = true - } - - filter "files:test2.rule" - testRuleVars { - TestProperty2 = true - } - - prepare() - test.capture [[ -# File Rules -# ############################################# - -test.obj: test.rule - @echo Rule-ing test.rule - $(SILENT) dorule -p "test.rule" -test2.obj: test2.rule - @echo Rule-ing test2.rule - $(SILENT) dorule -p -p2 "test2.rule" - ]] - end - - function suite.propertydefinitionSeparator() - - rules { "TestRule" } - - files { "test.rule", "test2.rule" } - - filter "files:test.rule" - testRuleVars { - TestListProperty = { "testValue1", "testValue2" } - } - - filter "files:test2.rule" - testRuleVars { - TestListPropertySeparator = { "testValue1", "testValue2" } - } - - prepare() - test.capture [[ -# File Rules -# ############################################# - -test.obj: test.rule - @echo Rule-ing test.rule - $(SILENT) dorule testValue1\ testValue2 "test.rule" -test2.obj: test2.rule - @echo Rule-ing test2.rule - $(SILENT) dorule testValue1,testValue2 "test2.rule" - ]] - end - diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_flags.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_flags.lua deleted file mode 100644 index d74c8239ee..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_flags.lua +++ /dev/null @@ -1,145 +0,0 @@ --- --- test_gmake2_flags.lua --- Tests compiler and linker flags for Makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_flags") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare(calls) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gcc - p.callarray(gmake2.cpp, calls, cfg, toolset) - end - - --- --- Include directories should be relative and space separated. --- - - function suite.includeDirs() - includedirs { "src/include", "../include" } - prepare { "includes" } - test.capture [[ -INCLUDES += -Isrc/include -I../include - ]] - end - --- --- symbols "on" should produce -g --- - function suite.symbols_on() - symbols "on" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - --- --- symbols default to 'off' --- - function suite.symbols_default() - symbols "default" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) - ]] - end - --- --- symbols "off" should not produce -g --- - function suite.symbols_off() - symbols "off" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) - ]] - end - --- --- All other symbols flags also produce -g --- - function suite.symbols_fastlink() - symbols "FastLink" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - - function suite.symbols_full() - symbols "full" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - --- --- symbols "on" with a proper debugformat should produce a corresponding -g --- - function suite.symbols_on_default() - symbols "on" - debugformat "Default" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g - ]] - end - - function suite.symbols_on_dwarf() - symbols "on" - debugformat "Dwarf" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -gdwarf -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -gdwarf - ]] - end - - function suite.symbols_on_split_dwarf() - symbols "on" - debugformat "SplitDwarf" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -gsplit-dwarf -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -gsplit-dwarf - ]] - end - --- --- symbols "off" with a proper debugformat should not produce -g --- - function suite.symbols_off_dwarf() - symbols "off" - debugformat "Dwarf" - prepare { "cFlags", "cxxFlags" } - test.capture [[ -ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_ldflags.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_ldflags.lua deleted file mode 100644 index b3a81eb83b..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_ldflags.lua +++ /dev/null @@ -1,79 +0,0 @@ --- --- test_gmake2_ldflags.lua --- Tests compiler and linker flags for Makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_ldflags") - - local p = premake - local gmake2 = p.modules.gmake2 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - symbols "On" - end - - local function prepare(calls) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gcc - gmake2.cpp.ldFlags(cfg, toolset) - end - - --- --- Check the output from default project values. --- - - function suite.checkDefaultValues() - prepare() - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) - ]] - end - --- --- Check addition of library search directores. --- - - function suite.checkLibDirs() - libdirs { "../libs", "libs" } - prepare() - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -L../libs -Llibs - ]] - end - - function suite.checkLibDirs_X86_64() - architecture ("x86_64") - system (p.LINUX) - prepare() - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 - ]] - end - - function suite.checkLibDirs_X86() - architecture ("x86") - system (p.LINUX) - prepare() - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 - ]] - end - - function suite.checkLibDirs_X86_64_MacOSX() - architecture ("x86_64") - system (p.MACOSX) - prepare() - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -m64 - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_linking.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_linking.lua deleted file mode 100644 index 4943980b69..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_linking.lua +++ /dev/null @@ -1,272 +0,0 @@ --- --- test_gmake2_linking.lua --- Validate the link step generation for makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_linking") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - _OS = "linux" - wks, prj = test.createWorkspace() - end - - local function prepare(calls) - local cfg = test.getconfig(prj, "Debug") - local toolset = p.tools.gcc - p.callarray(gmake2.cpp, calls, cfg, toolset) - end - - --- --- Check link command for a shared C++ library. --- - - function suite.links_onCppSharedLib() - kind "SharedLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libMyProject.so -s -LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) - ]] - end - - function suite.links_onMacOSXCppSharedLib() - _OS = "macosx" - kind "SharedLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -dynamiclib -Wl,-install_name,@rpath/libMyProject.dylib -Wl,-x -LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) - ]] - end - --- --- Check link command for a shared C library. --- - - function suite.links_onCSharedLib() - language "C" - kind "SharedLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -shared -Wl,-soname=libMyProject.so -s -LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) - ]] - end - - --- --- Check link command for a static library. --- - - function suite.links_onStaticLib() - kind "StaticLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -s -LINKCMD = $(AR) -rcs "$@" $(OBJECTS) - ]] - end - - --- --- Check link command for the Utility kind. --- --- Utility projects should only run custom commands, and perform no linking. --- - - function suite.links_onUtility() - kind "Utility" - prepare { "linkCmd" } - test.capture [[ -LINKCMD = - ]] - end - - --- --- Check link command for a Mac OS X universal static library. --- - - function suite.links_onMacUniversalStaticLib() - architecture "universal" - kind "StaticLib" - prepare { "ldFlags", "linkCmd" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -s -LINKCMD = libtool -o "$@" $(OBJECTS) - ]] - end - - --- --- Check a linking to a sibling static library. --- - - function suite.links_onSiblingStaticLib() - links "MyProject2" - - test.createproject(wks) - kind "StaticLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -s -LIBS += build/bin/Debug/libMyProject2.a -LDDEPS += build/bin/Debug/libMyProject2.a - ]] - end - - --- --- Check a linking to a sibling shared library. --- - - function suite.links_onSiblingSharedLib() - links "MyProject2" - - test.createproject(wks) - kind "SharedLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -Wl,-rpath,'$$ORIGIN/../../build/bin/Debug' -s -LIBS += build/bin/Debug/libMyProject2.so -LDDEPS += build/bin/Debug/libMyProject2.so - ]] - end - --- --- Check a linking to a sibling shared library using -l and -L. --- - - function suite.links_onSiblingSharedLibRelativeLinks() - links "MyProject2" - flags { "RelativeLinks" } - - test.createproject(wks) - kind "SharedLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -Lbuild/bin/Debug -Wl,-rpath,'$$ORIGIN/../../build/bin/Debug' -s -LIBS += -lMyProject2 -LDDEPS += build/bin/Debug/libMyProject2.so - ]] - end - - function suite.links_onMacOSXSiblingSharedLib() - _OS = "macosx" - links "MyProject2" - flags { "RelativeLinks" } - - test.createproject(wks) - kind "SharedLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -Lbuild/bin/Debug -Wl,-rpath,'@loader_path/../../build/bin/Debug' -Wl,-x -LIBS += -lMyProject2 -LDDEPS += build/bin/Debug/libMyProject2.dylib - ]] - end - --- --- Check a linking multiple siblings. --- - - function suite.links_onMultipleSiblingStaticLib() - links "MyProject2" - links "MyProject3" - - test.createproject(wks) - kind "StaticLib" - location "build" - - test.createproject(wks) - kind "StaticLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -s -LIBS += build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a -LDDEPS += build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a - ]] - end - --- --- Check a linking multiple siblings with link groups enabled. --- - - function suite.links_onSiblingStaticLibWithLinkGroups() - links "MyProject2" - links "MyProject3" - linkgroups "On" - - test.createproject(wks) - kind "StaticLib" - location "build" - - test.createproject(wks) - kind "StaticLib" - location "build" - - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -s -LIBS += -Wl,--start-group build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a -Wl,--end-group -LDDEPS += build/bin/Debug/libMyProject2.a build/bin/Debug/libMyProject3.a - ]] - end - --- --- When referencing an external library via a path, the directory --- should be added to the library search paths, and the library --- itself included via an -l flag. --- - - function suite.onExternalLibraryWithPath() - location "MyProject" - links { "libs/SomeLib" } - prepare { "ldFlags", "libs" } - test.capture [[ -ALL_LDFLAGS += $(LDFLAGS) -L../libs -s -LIBS += -lSomeLib - ]] - end - - - --- --- When referencing an external library with a period in the --- file name make sure it appears correctly in the LIBS --- directive. Currently the period and everything after it --- is stripped --- - - function suite.onExternalLibraryWithPathAndVersion() - location "MyProject" - links { "libs/SomeLib-1.1" } - prepare { "libs", } - test.capture [[ -LIBS += -lSomeLib-1.1 - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_makefile.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_makefile.lua deleted file mode 100644 index 1174a88198..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_makefile.lua +++ /dev/null @@ -1,101 +0,0 @@ --- --- test_gmake2_makefile.lua --- Validate the makefile projects. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local suite = test.declare("gmake2_makefile") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - kind "Makefile" - end - - local function prepare() - prj = test.getproject(wks, 1) - gmake2.makefile.configs(prj) - end - - --- --- Check rules for Makefile projects. --- - - function suite.makefile_configs_empty() - prepare() - test.capture [[ -ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/MyProject - define BUILDCMDS - endef - define CLEANCMDS - endef - -else ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/MyProject - define BUILDCMDS - endef - define CLEANCMDS - endef - -else - $(error "invalid configuration $(config)") -endif - ]] - end - - function suite.makefile_configs_commands() - buildcommands { - "touch source" - } - - cleancommands { - "rm -f source" - } - - prepare() - test.capture [[ -ifeq ($(config),debug) -TARGETDIR = bin/Debug -TARGET = $(TARGETDIR)/MyProject - define BUILDCMDS - @echo Running build commands - touch source - endef - define CLEANCMDS - @echo Running clean commands - rm -f source - endef - -else ifeq ($(config),release) -TARGETDIR = bin/Release -TARGET = $(TARGETDIR)/MyProject - define BUILDCMDS - @echo Running build commands - touch source - endef - define CLEANCMDS - @echo Running clean commands - rm -f source - endef - -else - $(error "invalid configuration $(config)") -endif - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_objects.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_objects.lua deleted file mode 100644 index dd4503ce2a..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_objects.lua +++ /dev/null @@ -1,474 +0,0 @@ --- --- test_gmake2_objects.lua --- Validate the list of objects for a makefile. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_objects") - - local p = premake - local gmake2 = p.modules.gmake2 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - gmake2.cpp.initialize() - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - gmake2.cpp.createRuleTable(prj) - gmake2.cpp.createFileTable(prj) - gmake2.cpp.outputFilesSection(prj) - end - - --- --- If a file is listed at the project level, it should get listed in --- the project level objects list. --- - - function suite.listFileInProjectObjects() - files { "src/hello.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello.o - - ]] - end - - --- --- Only buildable files should be listed. --- - - function suite.onlyListBuildableFiles() - files { "include/gl.h", "src/hello.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello.o - - ]] - end - - --- --- A file should only be listed in the configurations to which it belongs. --- - - function suite.configFilesAreConditioned() - filter "Debug" - files { "src/hello_debug.cpp" } - filter "Release" - files { "src/hello_release.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -ifeq ($(config),debug) -GENERATED += $(OBJDIR)/hello_debug.o -OBJECTS += $(OBJDIR)/hello_debug.o - -else ifeq ($(config),release) -GENERATED += $(OBJDIR)/hello_release.o -OBJECTS += $(OBJDIR)/hello_release.o - -endif - - ]] - end - - --- --- Two files with the same base name should have different object files. --- - - function suite.uniqueObjNames_onBaseNameCollision() - files { "src/hello.cpp", "src/greetings/hello.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/hello.o -GENERATED += $(OBJDIR)/hello1.o -OBJECTS += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello1.o - - ]] - end - - function suite.uniqueObjNames_onBaseNameCollision2() - files { "a/hello.cpp", "b/hello.cpp", "c/hello1.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/hello.o -GENERATED += $(OBJDIR)/hello1.o -GENERATED += $(OBJDIR)/hello11.o -OBJECTS += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello1.o -OBJECTS += $(OBJDIR)/hello11.o - - ]] - end - - function suite.uniqueObjectNames_onBaseNameCollision_Release() - files { "a/hello.cpp", "b/hello.cpp", "c/hello1.cpp", "d/hello11.cpp" } - filter "configurations:Debug" - excludes {"b/hello.cpp"} - filter "configurations:Release" - excludes {"d/hello11.cpp"} - - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/hello.o -GENERATED += $(OBJDIR)/hello11.o -OBJECTS += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello11.o - -ifeq ($(config),debug) -GENERATED += $(OBJDIR)/hello111.o -OBJECTS += $(OBJDIR)/hello111.o - -else ifeq ($(config),release) -GENERATED += $(OBJDIR)/hello1.o -OBJECTS += $(OBJDIR)/hello1.o - -endif - - ]] - end - --- --- Test that changes in case are treated as if multiple files of the same name are being built --- - - function suite.uniqueObjNames_ignoreCase1() - files { "a/hello.cpp", "b/Hello.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/Hello1.o -GENERATED += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/Hello1.o -OBJECTS += $(OBJDIR)/hello.o - - ]] - end - - function suite.uniqueObjNames_ignoreCase2() - files { "a/hello.cpp", "b/hello.cpp", "c/Hello1.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/Hello11.o -GENERATED += $(OBJDIR)/hello.o -GENERATED += $(OBJDIR)/hello1.o -OBJECTS += $(OBJDIR)/Hello11.o -OBJECTS += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello1.o - - ]] - end - - function suite.uniqueObjectNames_ignoreCase_Release() - files { "a/hello.cpp", "b/hello.cpp", "c/Hello1.cpp", "d/Hello11.cpp" } - filter "configurations:Debug" - excludes {"b/hello.cpp"} - filter "configurations:Release" - excludes {"d/Hello11.cpp"} - - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -GENERATED += $(OBJDIR)/Hello11.o -GENERATED += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/Hello11.o -OBJECTS += $(OBJDIR)/hello.o - -ifeq ($(config),debug) -GENERATED += $(OBJDIR)/Hello111.o -OBJECTS += $(OBJDIR)/Hello111.o - -else ifeq ($(config),release) -GENERATED += $(OBJDIR)/hello1.o -OBJECTS += $(OBJDIR)/hello1.o - -endif - - ]] - end - - --- --- If there's a custom rule which generate C++ sources build outputs should be placed --- in separate list so they can be cleaned up properly. --- - - function suite.customBuildCommand_generatedCpp() - files { "interface.pkg","source.cpp" } - filter "files:**.pkg" - buildmessage "Binding pkg: %{file.name}" - buildcommands './tolua -o %{file.basename}.cpp -H %{file.basename}.h -n %{file.basename}} %{file.abspath}' - buildoutputs { '%{file.basename}.cpp','%{file.basename}.h' } - prepare() - test.capture [[ -# File sets -# ############################################# - -CUSTOM := -GENERATED := -OBJECTS := -SOURCES := - -CUSTOM += interface.h -GENERATED += $(OBJDIR)/interface.o -GENERATED += $(OBJDIR)/source.o -GENERATED += interface.cpp -GENERATED += interface.h -OBJECTS += $(OBJDIR)/interface.o -OBJECTS += $(OBJDIR)/source.o -SOURCES += interface.cpp -]] - end - --- --- If there's a custom rule for a non-C++ file extension, make sure that those --- files are included in the build. --- - - function suite.customBuildCommand_onCustomFileType() - files { "hello.lua" } - filter "files:**.lua" - buildmessage "Compiling %{file.name}" - buildcommands { - 'luac "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.luac"', - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.luac" } - prepare() - test.capture [[ -# File sets -# ############################################# - -CUSTOM := -GENERATED := - -ifeq ($(config),debug) -CUSTOM += obj/Debug/hello.luac -GENERATED += obj/Debug/hello.luac - -else ifeq ($(config),release) -CUSTOM += obj/Release/hello.luac -GENERATED += obj/Release/hello.luac - -endif - ]] - end - - --- --- If a custom rule builds to an object file, include it in the --- link automatically to match the behavior of Visual Studio --- - - function suite.linkBuildOutputs_onNotSpecified() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -ifeq ($(config),debug) -GENERATED += obj/Debug/hello.obj -OBJECTS += obj/Debug/hello.obj - -else ifeq ($(config),release) -GENERATED += obj/Release/hello.obj -OBJECTS += obj/Release/hello.obj - -endif - ]] - end - - --- --- Also include it in the link step if we explicitly specified so with --- linkbuildoutputs. --- - - function suite.linkBuildOutputs_onOn() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - linkbuildoutputs "On" - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -ifeq ($(config),debug) -GENERATED += obj/Debug/hello.obj -OBJECTS += obj/Debug/hello.obj - -else ifeq ($(config),release) -GENERATED += obj/Release/hello.obj -OBJECTS += obj/Release/hello.obj - -endif - ]] - end - - --- --- If linkbuildoutputs says that we shouldn't include it in the link however, --- don't do it. --- - - function suite.linkBuildOutputs_onOff() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling %{file.name}" - buildcommands { - 'cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"', - 'c2o -c "%{cfg.objdir}/%{file.basename}.xo" -o "%{cfg.objdir}/%{file.basename}.obj"' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - linkbuildoutputs "Off" - prepare() - test.capture [[ -# File sets -# ############################################# - -CUSTOM := -GENERATED := - -ifeq ($(config),debug) -CUSTOM += obj/Debug/hello.obj -GENERATED += obj/Debug/hello.obj - -else ifeq ($(config),release) -CUSTOM += obj/Release/hello.obj -GENERATED += obj/Release/hello.obj - -endif - ]] - end - - --- --- If a file is excluded from a configuration, it should not be listed. --- - - function suite.excludedFromBuild_onExcludedFile() - files { "hello.cpp" } - filter "Debug" - removefiles { "hello.cpp" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -ifeq ($(config),release) -GENERATED += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello.o - -endif - - ]] - end - - function suite.excludedFromBuild_onExcludeFlag() - files { "hello.cpp" } - filter { "Debug", "files:hello.cpp" } - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ -# File sets -# ############################################# - -GENERATED := -OBJECTS := - -ifeq ($(config),release) -GENERATED += $(OBJDIR)/hello.o -OBJECTS += $(OBJDIR)/hello.o - -endif - - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_pch.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_pch.lua deleted file mode 100644 index 4394981df0..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_pch.lua +++ /dev/null @@ -1,224 +0,0 @@ --- --- test_gmake2_pch.lua --- Validate the setup for precompiled headers in makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local suite = test.declare("gmake2_pch") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = p.project - - - --- --- Setup and teardown --- - - local wks, prj - function suite.setup() - os.chdir(_TESTS_DIR) - gmake2.cpp.initialize() - wks, prj = test.createWorkspace() - end - - local function prepareVars() - local cfg = test.getconfig(prj, "Debug") - gmake2.cpp.pch(cfg) - end - - local function prepareRules() - local cfg = test.getconfig(prj, "Debug") - gmake2.cpp.pchRules(cfg.project) - end - - local function prepareFlags() - local project = test.getproject(wks, 1) - gmake2.cpp.createRuleTable(project) - gmake2.cpp.createFileTable(project) - gmake2.cpp.outputFileRuleSection(project) - end - --- --- If no header has been set, nothing should be output. --- - - function suite.noConfig_onNoHeaderSet() - prepareVars() - test.isemptycapture() - end - - --- --- If a header is set, but the NoPCH flag is also set, then --- nothing should be output. --- - - function suite.noConfig_onHeaderAndNoPCHFlag() - pchheader "include/myproject.h" - flags "NoPCH" - - files { 'a.cpp', 'b.cpp' } - - prepareFlags() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/a.o: a.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/b.o: b.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -]] - end - - --- --- If a header is specified and the NoPCH flag is not set, then --- the header can be used. --- - - function suite.config_onPchEnabled() - pchheader "include/myproject.h" - prepareVars() - test.capture [[ -PCH = include/myproject.h -PCH_PLACEHOLDER = $(OBJDIR)/$(notdir $(PCH)) -GCH = $(PCH_PLACEHOLDER).gch - ]] - end - - --- --- The PCH can be specified relative the an includes search path. --- - - function suite.pch_searchesIncludeDirs() - pchheader "premake.h" - includedirs { "../../../src/host" } - prepareVars() - test.capture [[ -PCH = ../../../src/host/premake.h - ]] - end - - --- --- Verify the format of the PCH rules block for a C++ file. --- - - function suite.buildRules_onCpp() - pchheader "include/myproject.h" - prepareRules() - test.capture [[ -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - ]] - end - - --- --- Verify the format of the PCH rules block for a C file. --- - - function suite.buildRules_onC() - language "C" - pchheader "include/myproject.h" - prepareRules() - test.capture [[ -ifneq (,$(PCH)) -$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) -$(GCH): $(PCH) | prebuild - @echo $(notdir $<) - $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" -$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) -ifeq (posix,$(SHELLTYPE)) - $(SILENT) touch "$@" -else - $(SILENT) echo $null >> "$@" -endif -else -$(OBJECTS): | prebuild -endif - ]] - end - - - - -- - -- If the header is located on one of the include file - -- search directories, it should get found automatically. - -- - - function suite.findsPCH_onIncludeDirs() - location "MyProject" - pchheader "premake.h" - includedirs { "../../../src/host" } - prepareVars() - test.capture [[ -PCH = ../../../../src/host/premake.h - ]] - end - --- --- If the header is located on one of the include file --- search directories, it should get found automatically. --- - - function suite.PCHFlag() - pchheader "include/myproject.h" - - files { 'a.cpp', 'b.cpp' } - - prepareFlags() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/a.o: a.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) -include $(PCH_PLACEHOLDER) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/b.o: b.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) -include $(PCH_PLACEHOLDER) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -]] - end - - function suite.PCHFlag_PerFile() - pchheader "include/myproject.h" - - files { 'a.cpp', 'b.cpp' } - - filter { "files:a.cpp" } - flags "NoPCH" - - prepareFlags() - test.capture [[ -# File Rules -# ############################################# - -$(OBJDIR)/a.o: a.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -$(OBJDIR)/b.o: b.cpp - @echo $(notdir $<) - $(SILENT) $(CXX) -include $(PCH_PLACEHOLDER) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_perfile_flags.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_perfile_flags.lua deleted file mode 100644 index 89b889627d..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_perfile_flags.lua +++ /dev/null @@ -1,110 +0,0 @@ --- --- gmake2_perfile_flags.lua --- Tests compiler and linker flags for Makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_perfile_flags") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = p.project - - --- --- Setup --- - local wks - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - local prj = p.workspace.getproject(wks, 1) - gmake2.cpp.outputPerFileConfigurationSection(prj) - end - - --- --- Test per file settings. --- - - function suite.perfile_buildOptions() - files { 'a.cpp', 'b.cpp', 'c.cpp' } - - filter { 'files:a.cpp' } - buildoptions { '-msse', '-msse2', '-mfpmath=sse,387', '-msse3', '-mssse3', '-msse4.1', '-mpclmul' } - filter { 'files:b.cpp' } - buildoptions { '-msse', '-msse2', '-mfpmath=sse,387' } - filter { 'files:c.cpp' } - buildoptions { '-msse', '-msse2', '-mfpmath=sse,387', '-msse3', '-mssse3', '-msse4.1', '-maes' } - - prepare() - test.capture [[ -# Per File Configurations -# ############################################# - -PERFILE_FLAGS_0 = $(ALL_CXXFLAGS) -msse -msse2 -mfpmath=sse,387 -msse3 -mssse3 -msse4.1 -mpclmul -PERFILE_FLAGS_1 = $(ALL_CXXFLAGS) -msse -msse2 -mfpmath=sse,387 -PERFILE_FLAGS_2 = $(ALL_CXXFLAGS) -msse -msse2 -mfpmath=sse,387 -msse3 -mssse3 -msse4.1 -maes - ]] - end - - - function suite.perfile_mixedbuildOptions() - files { 'a.c', 'b.cpp', 'c.c' } - - filter { 'files:a.c' } - buildoptions { '-msse', '-msse2', '-mfpmath=sse,387', '-msse3', '-mssse3', '-msse4.1', '-mpclmul' } - filter { 'files:b.cpp' } - buildoptions { '-msse', '-msse2', '-mfpmath=sse,387' } - filter { 'files:c.c' } - buildoptions { '-msse', '-msse2', '-mfpmath=sse,387', '-msse3', '-mssse3', '-msse4.1', '-maes' } - - prepare() - test.capture [[ -# Per File Configurations -# ############################################# - -PERFILE_FLAGS_0 = $(ALL_CFLAGS) -msse -msse2 -mfpmath=sse,387 -msse3 -mssse3 -msse4.1 -mpclmul -PERFILE_FLAGS_1 = $(ALL_CXXFLAGS) -msse -msse2 -mfpmath=sse,387 -PERFILE_FLAGS_2 = $(ALL_CFLAGS) -msse -msse2 -mfpmath=sse,387 -msse3 -mssse3 -msse4.1 -maes - ]] - end - - function suite.perfile_cxxApi() - files { 'a.cpp', 'b.cpp', 'c.cpp' } - - visibility "Hidden" - - filter { 'files:b.cpp' } - visibility "Protected" - - prepare() - test.capture [[ -# Per File Configurations -# ############################################# - -PERFILE_FLAGS_0 = $(ALL_CXXFLAGS) -fvisibility=protected - ]] - end - - function suite.perfile_compileas() - files { 'a.c', 'b.cpp' } - - filter { 'files:a.c' } - compileas "Objective-C" - filter { 'files:b.cpp' } - compileas "Objective-C++" - - prepare() - test.capture [[ -# Per File Configurations -# ############################################# - -PERFILE_FLAGS_0 = $(ALL_CFLAGS) -x objective-c -PERFILE_FLAGS_1 = $(ALL_CXXFLAGS) -x objective-c++ - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_target_rules.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_target_rules.lua deleted file mode 100644 index 997d8ae631..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_target_rules.lua +++ /dev/null @@ -1,60 +0,0 @@ --- --- test_gmake2_target_rules.lua --- Validate the makefile target building rules. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local p = premake - local suite = test.declare("gmake2_target_rules") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - gmake2.cpp.allRules(cfg) - end - - --- --- Check the default, normal format of the rules. --- - - function suite.defaultRules() - prepare() - test.capture [[ -all: $(TARGET) - @: - ]] - end - - --- --- Check rules for an OS X Cocoa application. --- - - function suite.osxWindowedAppRules() - system "MacOSX" - kind "WindowedApp" - prepare() - test.capture [[ -all: $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist - @: - -$(dir $(TARGETDIR))PkgInfo: -$(dir $(TARGETDIR))Info.plist: - ]] - end diff --git a/build/premake/premake5/modules/gmake2/tests/test_gmake2_tools.lua b/build/premake/premake5/modules/gmake2/tests/test_gmake2_tools.lua deleted file mode 100644 index 9474176d32..0000000000 --- a/build/premake/premake5/modules/gmake2/tests/test_gmake2_tools.lua +++ /dev/null @@ -1,36 +0,0 @@ --- --- test_gmake2_tools.lua --- Tests for tools support in makefiles. --- (c) 2016-2017 Jason Perkins, Blizzard Entertainment and the Premake project --- - - local suite = test.declare("gmake2_tools") - - local p = premake - local gmake2 = p.modules.gmake2 - - local project = premake.project - - --- --- Setup --- - - local cfg - - function suite.setup() - local wks, prj = test.createWorkspace() - cfg = test.getconfig(prj, "Debug") - end - - --- --- Make sure that the correct tools are used. --- - - function suite.usesCorrectTools() - gmake2.cpp.tools(cfg, p.tools.gcc) - test.capture [[ -RESCOMP = windres - ]] - end diff --git a/build/premake/premake5/modules/raw/README.md b/build/premake/premake5/modules/raw/README.md deleted file mode 100644 index f4a75cffb6..0000000000 --- a/build/premake/premake5/modules/raw/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Premake extension to support writing the raw lua tables. - -### Usage ### - -Simply generate your project using the `raw` action: -```bash -premake5 raw -``` -and open the generated workspace.raw file in any text editor. diff --git a/build/premake/premake5/modules/raw/_manifest.lua b/build/premake/premake5/modules/raw/_manifest.lua deleted file mode 100644 index 2228f342bc..0000000000 --- a/build/premake/premake5/modules/raw/_manifest.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "_preload.lua", - "raw.lua", - "raw_action.lua", -} diff --git a/build/premake/premake5/modules/raw/_preload.lua b/build/premake/premake5/modules/raw/_preload.lua deleted file mode 100644 index 9b8bc0070c..0000000000 --- a/build/premake/premake5/modules/raw/_preload.lua +++ /dev/null @@ -1,16 +0,0 @@ -newaction -{ - trigger = "raw", - shortname = "Raw output", - description = "Generate raw representation of Premake structures", - - onsolution = function(sln) - require('raw') - - premake.generate(sln, ".raw", premake.raw.workspace) - end, -} - -return function(cfg) - return (_ACTION == "raw") -end diff --git a/build/premake/premake5/modules/raw/raw.lua b/build/premake/premake5/modules/raw/raw.lua deleted file mode 100644 index 2dd871705d..0000000000 --- a/build/premake/premake5/modules/raw/raw.lua +++ /dev/null @@ -1,11 +0,0 @@ -local p = premake - -p.modules.raw = {} - -local m = p.modules.raw -m.elements = {} - -dofile("_preload.lua") -dofile("raw_action.lua") - -return m diff --git a/build/premake/premake5/modules/raw/raw_action.lua b/build/premake/premake5/modules/raw/raw_action.lua deleted file mode 100644 index 572d25cc13..0000000000 --- a/build/premake/premake5/modules/raw/raw_action.lua +++ /dev/null @@ -1,76 +0,0 @@ -local p = premake -p.raw = { } -local raw = p.raw -local gvisited = { } - -function raw.workspace(wks) - if not gvisited[wks.global] then - gvisited[wks.global] = true - raw.printTable({ global = wks.global }) - end -end - -function raw.printTable(t, i) - i = i or 0 - placement = raw._createPlacement(t) - raw._printTableRecursive(t, i, placement) -end - -function raw._printTableRecursive(t, i, placement) - elements = { } - for k, v in pairs(t) do - table.insert(elements, { key = k, value = v }) - end - - table.sort(elements, function(a, b) - local n1 = type(a.key) == "number" - local n2 = type(b.key) == "number" - if n1 ~= n2 then - return n1 - end - - local k1 = n1 and a.key or raw._encode(a.key) - local k2 = n2 and b.key or raw._encode(b.key) - return k1 < k2 - end) - - for _, elem in ipairs(elements) do - p = placement[elem.value] - if p and elem.key == p.key and t == p.parent then - _p(i, "%s", raw._encode(elem.key) .. ': ' .. raw._encode(elem.value) .. ' {') - raw._printTableRecursive(elem.value, i + 1, placement) - _p(i, '} # ' .. raw._encode(elem.key)) - else - _p(i, "%s", raw._encode(elem.key) .. ': ' .. raw._encode(elem.value)) - end - end -end - -function raw._createPlacement(tbl) - placement = { } - placementList = { tbl } - while #placementList ~= 0 do - parentList = { } - for _, parent in ipairs(placementList) do - for k, v in pairs(parent) do - if type(v) == "table" and not placement[v] then - table.insert(parentList, v) - placement[v] = { - parent = parent, - key = k - } - end - end - end - placementList = parentList - end - return placement -end - -function raw._encode(v) - if type(v) == "string" then - return '"' .. v .. '"' - else - return tostring(v) - end -end diff --git a/build/premake/premake5/modules/self-test/_manifest.lua b/build/premake/premake5/modules/self-test/_manifest.lua deleted file mode 100644 index b63a96622f..0000000000 --- a/build/premake/premake5/modules/self-test/_manifest.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "self-test.lua", - "test_assertions.lua", - "test_declare.lua", - "test_helpers.lua", - "test_runner.lua" -} diff --git a/build/premake/premake5/modules/self-test/self-test.lua b/build/premake/premake5/modules/self-test/self-test.lua deleted file mode 100644 index b7bb46c1aa..0000000000 --- a/build/premake/premake5/modules/self-test/self-test.lua +++ /dev/null @@ -1,106 +0,0 @@ ---- --- self-test/self-test.lua --- --- An automated test framework for Premake and its add-on modules. --- --- Author Jason Perkins --- Copyright (c) 2008-2016 Jason Perkins and the Premake project. ---- - - - local p = premake - - p.modules.self_test = {} - local m = p.modules.self_test - - m._VERSION = p._VERSION - - - - newaction { - trigger = "self-test", - shortname = "Test Premake", - description = "Run Premake's own local unit test suites", - execute = function() - m.executeSelfTest() - end - } - - - - newoption { - trigger = "test-only", - value = "suite[.test]", - description = "For self-test action; run specific suite or test" - } - - - - function m.executeSelfTest() - m.detectDuplicateTests = true - m.loadTestsFromManifests() - m.detectDuplicateTests = false - - local tests = {} - local isAction = true - for i, arg in ipairs(_ARGS) do - local _tests, err = m.getTestsWithIdentifier(arg) - if err then - error(err, 0) - end - - tests = table.join(tests, _tests) - end - - if #tests == 0 or _OPTIONS["test-only"] ~= nil then - local _tests, err = m.getTestsWithIdentifier(_OPTIONS["test-only"]) - if err then - error(err, 0) - end - - tests = table.join(tests, _tests) - end - - local passed, failed = m.runTest(tests) - - if failed > 0 then - printf("\n %d FAILED TEST%s", failed, iif(failed > 1, "S", "")) - os.exit(5) - end - end - - - - function m.loadTestsFromManifests() - local mask = path.join(_MAIN_SCRIPT_DIR, "**/tests/_tests.lua") - local manifests = os.matchfiles(mask) - - -- TODO: "**" should also match "." but doesn't currently - local top = path.join(_MAIN_SCRIPT_DIR, "tests/_tests.lua") - if os.isfile(top) then - table.insert(manifests, 1, top) - end - - for i = 1, #manifests do - local manifest = manifests[i] - - _TESTS_DIR = path.getdirectory(manifest) - - local files = dofile(manifest) - for i = 1, #files do - local filename = path.join(_TESTS_DIR, files[i]) - dofile(filename) - end - end - end - - - - dofile("test_assertions.lua") - dofile("test_declare.lua") - dofile("test_helpers.lua") - dofile("test_runner.lua") - - - - return m diff --git a/build/premake/premake5/modules/self-test/test_assertions.lua b/build/premake/premake5/modules/self-test/test_assertions.lua deleted file mode 100644 index 6e9efc5880..0000000000 --- a/build/premake/premake5/modules/self-test/test_assertions.lua +++ /dev/null @@ -1,240 +0,0 @@ ---- --- test_assertions.lua --- --- Assertion functions for unit tests. --- --- Author Jason Perkins --- Copyright (c) 2008-2016 Jason Perkins and the Premake project. ---- - - local p = premake - - local m = p.modules.self_test - - local _ = {} - - - - function m.capture(expected) - local actual = p.captured() .. p.eol() - - -- create line-by-line iterators for both values - local ait = actual:gmatch("(.-)" .. p.eol()) - local eit = expected:gmatch("(.-)\n") - - -- compare each value line by line - local linenum = 1 - local atxt = ait() - local etxt = eit() - while etxt do - if (etxt ~= atxt) then - m.fail("(%d) expected:\n%s\n...but was:\n%s\nfulltext:\n%s", linenum, etxt, atxt, actual) - end - - linenum = linenum + 1 - atxt = ait() - etxt = eit() - end - end - - - - function m.closedfile(expected) - if expected and not m.value_closedfile then - m.fail("expected file to be closed") - elseif not expected and m.value_closedfile then - m.fail("expected file to remain open") - end - end - - - - function m.contains(expected, actual) - if type(expected) == "table" then - for i, v in ipairs(expected) do - m.contains(v, actual) - end - elseif not table.contains(actual, expected) then - m.fail("expected value %s not found", expected) - end - end - - - - function m.excludes(expected, actual) - if type(expected) == "table" then - for i, v in ipairs(expected) do - m.excludes(v, actual) - end - elseif table.contains(actual, expected) then - m.fail("excluded value %s found", expected) - end - end - - - - function m.fail(format, ...) - -- if format is a number then it is the stack depth - local depth = 3 - local arg = {...} - if type(format) == "number" then - depth = depth + format - format = table.remove(arg, 1) - end - - -- convert nils into something more usefuls - for i = 1, #arg do - if (arg[i] == nil) then - arg[i] = "(nil)" - elseif (type(arg[i]) == "table") then - arg[i] = "{" .. table.concat(arg[i], ", ") .. "}" - end - end - - local msg = string.format(format, table.unpack(arg)) - error(debug.traceback(msg, depth), depth) - end - - - - function m.filecontains(expected, fn) - local f = io.open(fn) - local actual = f:read("*a") - f:close() - if (expected ~= actual) then - m.fail("expected %s but was %s", expected, actual) - end - end - - - - function m.hasoutput() - local actual = p.captured() - if actual == "" then - m.fail("expected output, received none"); - end - end - - - - function m.isemptycapture() - local actual = p.captured() - if actual ~= "" then - m.fail("expected empty capture, but was %s", actual); - end - end - - - - function m.isequal(expected, actual, depth) - depth = depth or 0 - if type(expected) == "table" then - if expected and not actual then - m.fail(depth, "expected table, got nil") - end - if #expected < #actual then - m.fail(depth, "expected %d items, got %d", #expected, #actual) - end - for k,v in pairs(expected) do - m.isequal(expected[k], actual[k], depth + 1) - end - else - if (expected ~= actual) then - m.fail(depth, "expected %s but was %s", expected, actual or "nil") - end - end - return true - end - - - - function m.isfalse(value) - if (value) then - m.fail("expected false but was true") - end - end - - - - function m.isnil(value) - if (value ~= nil) then - m.fail("expected nil but was " .. tostring(value)) - end - end - - - - function m.isnotnil(value) - if (value == nil) then - m.fail("expected not nil") - end - end - - - - function m.issame(expected, action) - if expected ~= action then - m.fail("expected same value") - end - end - - - - function m.istrue(value) - if (not value) then - m.fail("expected true but was false") - end - end - - - - function m.missing(value, actual) - if table.contains(actual, value) then - m.fail("unexpected value %s found", value) - end - end - - - - function m.openedfile(fname) - if fname ~= m.value_openedfilename then - local msg = "expected to open file '" .. fname .. "'" - if m.value_openedfilename then - msg = msg .. ", got '" .. m.value_openedfilename .. "'" - end - m.fail(msg) - end - end - - - - function m.success(fn, ...) - local ok, err = pcall(fn, ...) - if not ok then - m.fail("call failed: " .. err) - end - end - - - - function m.stderr(expected) - if not expected and m.stderr_capture then - m.fail("Unexpected: " .. m.stderr_capture) - elseif expected then - if not m.stderr_capture or not m.stderr_capture:find(expected) then - m.fail(string.format("expected '%s'; got %s", expected, m.stderr_capture or "(nil)")) - end - end - end - - - - function m.notstderr(expected) - if not expected and not m.stderr_capture then - m.fail("Expected output on stderr; none received") - elseif expected then - if m.stderr_capture and m.stderr_capture:find(expected) then - m.fail(string.format("stderr contains '%s'; was %s", expected, m.stderr_capture)) - end - end - end diff --git a/build/premake/premake5/modules/self-test/test_declare.lua b/build/premake/premake5/modules/self-test/test_declare.lua deleted file mode 100644 index 9528d214cd..0000000000 --- a/build/premake/premake5/modules/self-test/test_declare.lua +++ /dev/null @@ -1,246 +0,0 @@ ---- --- test_declare.lua --- --- Declare unit test suites, and fetch tests from them. --- --- Author Jason Perkins --- Copyright (c) 2008-2016 Jason Perkins and the Premake project. ---- - - local p = premake - local m = p.modules.self_test - - local _ = {} - - - _.suites = {} - _.suppressed = {} - - - ---- --- Declare a new test suite. --- --- @param suiteName --- A unique name for the suite. This name will be displayed as part of --- test failure messages, and also to select the suite when using the --- `--test-only` command line parameter. Best to avoid spaces and special --- characters which might not be command line friendly. An error will be --- raised if the name is not unique. --- @return --- The new test suite object. ---- - - function m.declare(suiteName) - if _.suites[suiteName] then - error('Duplicate test suite "'.. suiteName .. '"', 2) - end - - local _suite = {} - -- Setup a metatable for the test suites to use, this will catch duplicate tests - local suite = setmetatable({}, { - __index = _suite, - __newindex = function (table, key, value) - if m.detectDuplicateTests and _suite[key] ~= nil then - error('Duplicate test "'.. key .. '"', 2) - end - _suite[key] = value - end, - __pairs = function (table) return pairs(_suite) end, - __ipairs = function (table) return ipairs(_suite) end, - }) - - suite._SCRIPT_DIR = _SCRIPT_DIR - suite._TESTS_DIR = _TESTS_DIR - - _.suites[suiteName] = suite - return suite - end - - - ---- --- Prevent a particular test or suite of tests from running. --- --- @param identifier --- A test or suite identifier, indicating which tests should be suppressed, --- in the form "suiteName" or "suiteName.testName". ---- - - function m.suppress(identifier) - if type(identifier) == "table" then - for i = 1, #identifier do - m.suppress(identifier[i]) - end - else - _.suppressed[identifier] = true - end - end - - - - function m.isSuppressed(identifier) - return _.suppressed[identifier] - end - - - ---- --- Returns true if the provided test object represents a valid test. ---- - - function m.isValid(test) - if type(test.testFunction) ~= "function" then - return false - end - if test.testName == "setup" or test.testName == "teardown" then - return false - end - return true - end - - - ---- --- Return the table of declared test suites. ---- - - function m.getSuites() - return _.suites - end - - - ---- --- Fetch test objects via the string identifier. --- --- @param identifier --- An optional test or suite identifier, indicating which tests should be --- run, in the form "suiteName" or "suiteName.testName". If not specified, --- the global test object, representing all test suites, will be returned. --- Use "*" to match any part of a suite or test name --- @return --- On success, returns an array of test objects, which should be considered opaque. --- On failure, returns `nil` and an error. ---- - - function m.getTestsWithIdentifier(identifier) - local suiteName, testName = m.parseTestIdentifier(identifier) - - if suiteName ~= nil and string.contains(suiteName, "*") then - local tests = {} - - local pattern = string.gsub(suiteName, "*", ".*") - for _suiteName, suite in pairs(_.suites) do - local length = string.len(_suiteName) - local start, finish = string.find(_suiteName, pattern) - if start == 1 and finish == length then - if testName ~= nil then - if string.contains(testName, "*") then - local testPattern = string.gsub(testName, "*", ".*") - for _testName, test in pairs(suite) do - length = string.len(_testName) - start, finish = string.find(_testName, testPattern) - if start == 1 and finish == length then - table.insert(tests, { - suiteName = _suiteName, - suite = suite, - testName = _testName, - testFunction = test, - }) - end - end - else - table.insert(tests, { - suiteName = _suiteName, - suite = suite, - testName = testName, - testFunction = suite[testName], - }) - end - else - table.insert(tests, { - suiteName = _suiteName, - suite = suite, - testName = nil, - testFunction = nil, - }) - end - end - end - - return tests - else - local suite, test, err = _.checkTestIdentifier(_.suites, suiteName, testName) - if err then - return nil, err - end - - return { - { - suiteName = suiteName, - suite = suite, - testName = testName, - testFunction = test - } - } - end - end - - - ---- --- Parse a test identifier and split it into separate suite and test names. --- --- @param identifier --- A test identifier, which may be nil or an empty string, a test suite --- name, or a suite and test with the format "suiteName.testName". --- @return --- Two values: the suite name and the test name, or nil if not included --- in the identifier. ---- - - function m.parseTestIdentifier(identifier) - local suiteName, testName - if identifier then - local parts = string.explode(identifier, ".", true) - suiteName = iif(parts[1] ~= "", parts[1], nil) - testName = iif(parts[2] ~= "", parts[2], nil) - end - return suiteName, testName - end - - - - function _.checkTestIdentifier(suites, suiteName, testName) - local suite, test - - if suiteName then - suite = suites[suiteName] - if not suite then - return nil, nil, "No such test suite '" .. suiteName .. "'" - end - - if testName then - test = suite[testName] - if not _.isValidTestPair(testName, test) then - return nil, nil, "No such test '" .. suiteName .. "." .. testName .. "'" - end - end - end - - return suite, test - end - - - function _.isValidTestPair(testName, testFunc) - if type(testFunc) ~= "function" then - return false - end - - if testName == "setup" or testName == "teardown" then - return false - end - - return true - end diff --git a/build/premake/premake5/modules/self-test/test_helpers.lua b/build/premake/premake5/modules/self-test/test_helpers.lua deleted file mode 100644 index c6754784d9..0000000000 --- a/build/premake/premake5/modules/self-test/test_helpers.lua +++ /dev/null @@ -1,87 +0,0 @@ ---- --- test_helpers.lua --- --- Helper functions for setting up workspaces and projects, etc. --- --- Author Jason Perkins --- Copyright (c) 2008-2016 Jason Perkins and the Premake project. ---- - - local p = premake - - local m = p.modules.self_test - - - - function m.createWorkspace() - local wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - local prj = m.createProject(wks) - return wks, prj - end - - - - -- Eventually we'll want to deprecate this one and move everyone - -- over to createWorkspace() instead (4 Sep 2015). - - function m.createsolution() - local wks = workspace("MySolution") - configurations { "Debug", "Release" } - local prj = m.createproject(wks) - return wks, prj - end - - - - function m.createProject(wks) - local n = #wks.projects + 1 - if n == 1 then n = "" end - - local prj = project ("MyProject" .. n) - language "C++" - kind "ConsoleApp" - return prj - end - - function m.createGroup(wks) - local prj = group ("MyGroup" .. (#wks.groups + 1)) - return prj - end - - - function m.getWorkspace(wks) - p.oven.bake() - return p.global.getWorkspace(wks.name) - end - - - function m.getRule(name) - p.oven.bake() - return p.global.getRule(name) - end - - - function m.getProject(wks, i) - wks = m.getWorkspace(wks) - return p.workspace.getproject(wks, i or 1) - end - - - - function m.getConfig(prj, buildcfg, platform) - local wks = m.getWorkspace(prj.workspace) - prj = p.workspace.getproject(wks, prj.name) - return p.project.getconfig(prj, buildcfg, platform) - end - - - - m.print = print - - - - p.alias(m, "createProject", "createproject") - p.alias(m, "getConfig", "getconfig") - p.alias(m, "getProject", "getproject") - p.alias(m, "getWorkspace", "getsolution") diff --git a/build/premake/premake5/modules/self-test/test_runner.lua b/build/premake/premake5/modules/self-test/test_runner.lua deleted file mode 100644 index e5dcd6ba42..0000000000 --- a/build/premake/premake5/modules/self-test/test_runner.lua +++ /dev/null @@ -1,337 +0,0 @@ ---- --- self-test/test_runner.lua --- --- Execute unit tests and test suites. --- --- Author Jason Perkins --- Copyright (c) 2008-2016 Jason Perkins and the Premake project. ---- - - local p = premake - - local m = p.modules.self_test - - local _ = {} - - - - function m.runTest(tests) - local failed = 0 - local failedTests = {} - - local suites = m.getSuites() - local suitesKeys, suiteTestsKeys, totalTestCount = _.preprocessTests(suites, tests) - - _.log(term.lightGreen, "[==========]", string.format(" Running %d tests from %d test suites.", totalTestCount, #suitesKeys)) - local startTime = os.clock() - - for index, suiteName in ipairs(suitesKeys) do - suite = suites[suiteName] - if not m.isSuppressed(suiteName) then - local test = { - suiteName = suiteName, - suite = suite - } - - local suiteFailed, suiteFailedTests = _.runTestSuite(test, suiteTestsKeys[suiteName]) - - failed = failed + suiteFailed - failedTests = table.join(failedTests, suiteFailedTests) - end - end - - _.log(term.lightGreen, "[==========]", string.format(" %d tests from %d test suites ran. (%.0f ms total)", totalTestCount, #suitesKeys, (os.clock() - startTime) * 1000)) - _.log(term.lightGreen, "[ PASSED ]", string.format(" %d tests.", totalTestCount - failed)) - if failed > 0 then - _.log(term.lightRed, "[ FAILED ]", string.format(" %d tests, listed below:", failed)) - for index, testName in ipairs(failedTests) do - _.log(term.lightRed, "[ FAILED ]", " " .. testName) - end - end - - return (totalTestCount - failed), failed - end - - - - function _.runTestSuite(test, keys) - local failed = 0 - local failedTests = {} - _.log(term.lightGreen, "[----------]", string.format(" %d tests from %s", #keys, test.suiteName)) - local startTime = os.clock() - - if test.suite ~= nil then - for index, testName in ipairs(keys) do - testFunction = test.suite[testName] - test.testName = testName - test.testFunction = testFunction - - if m.isValid(test) and not m.isSuppressed(test.suiteName .. "." .. test.testName) then - local err = _.runTest(test) - if err then - failed = failed + 1 - table.insert(failedTests, test.suiteName .. "." .. test.testName .. "\n" .. err) - end - end - end - end - - _.log(term.lightGreen, "[----------]", string.format(" %d tests from %s (%.0f ms total)\n", #keys, test.suiteName, (os.clock() - startTime) * 1000)) - return failed, failedTests - end - - - - function _.runTest(test) - _.log(term.lightGreen, "[ RUN ]", string.format(" %s.%s", test.suiteName, test.testName)) - local startTime = os.clock() - local cwd = os.getcwd() - local hooks = _.installTestingHooks() - - _TESTS_DIR = test.suite._TESTS_DIR - _SCRIPT_DIR = test.suite._SCRIPT_DIR - - m.suiteName = test.suiteName - m.testName = test.testName - - local ok, err = _.setupTest(test) - - if ok then - ok, err = _.executeTest(test) - end - - local tok, terr = _.teardownTest(test) - ok = ok and tok - err = err or terr - - _.removeTestingHooks(hooks) - os.chdir(cwd) - - if ok then - _.log(term.lightGreen, "[ OK ]", string.format(" %s.%s (%.0f ms)", test.suiteName, test.testName, (os.clock() - startTime) * 1000)) - return nil - else - _.log(term.lightRed, "[ FAILED ]", string.format(" %s.%s (%.0f ms)", test.suiteName, test.testName, (os.clock() - startTime) * 1000)) - m.print(string.format("%s", err)) - return err - end - end - - - - function _.log(color, left, right) - term.pushColor(color) - io.write(left) - term.popColor() - m.print(right) - end - - - - function _.preprocessTests(suites, filters) - local suitesKeys = {} - local suiteTestsKeys = {} - local totalTestCount = 0 - - for i, filter in ipairs(filters) do - for suiteName, suite in pairs(suites) do - if not m.isSuppressed(suiteName) and suite ~= nil and (not filter.suiteName or filter.suiteName == suiteName) then - local test = {} - - test.suiteName = suiteName - test.suite = suite - - if not table.contains(suitesKeys, suiteName) then - table.insertsorted(suitesKeys, suiteName) - suiteTestsKeys[suiteName] = {} - end - - for testName, testFunction in pairs(suite) do - test.testName = testName - test.testFunction = testFunction - - if m.isValid(test) and not m.isSuppressed(test.suiteName .. "." .. test.testName) and (not filter.testName or filter.testName == testName) then - if not table.contains(suiteTestsKeys[suiteName], testName) then - table.insertsorted(suiteTestsKeys[suiteName], testName) - totalTestCount = totalTestCount + 1 - end - end - end - end - end - end - - return suitesKeys, suiteTestsKeys, totalTestCount - end - - - - function _.installTestingHooks() - local hooks = {} - - hooks.action = _ACTION - hooks.options = _OPTIONS - hooks.targetOs = _TARGET_OS - - hooks.io_open = io.open - hooks.io_output = io.output - hooks.os_writefile_ifnotequal = os.writefile_ifnotequal - hooks.p_utf8 = p.utf8 - hooks.print = print - hooks.setTextColor = term.setTextColor - - local mt = getmetatable(io.stderr) - _.builtin_write = mt.write - mt.write = _.stub_stderr_write - - _OPTIONS = table.shallowcopy(_OPTIONS) or {} - setmetatable(_OPTIONS, getmetatable(hooks.options)) - - io.open = _.stub_io_open - io.output = _.stub_io_output - os.writefile_ifnotequal = _.stub_os_writefile_ifnotequal - print = _.stub_print - p.utf8 = _.stub_utf8 - term.setTextColor = _.stub_setTextColor - - stderr_capture = nil - - p.clearWarnings() - p.eol("\n") - p.escaper(nil) - p.indent("\t") - p.api.reset() - - m.stderr_capture = nil - m.value_openedfilename = nil - m.value_openedfilemode = nil - m.value_closedfile = false - - return hooks - end - - - - - function _.removeTestingHooks(hooks) - p.action.set(hooks.action) - _OPTIONS = hooks.options - _TARGET_OS = hooks.targetOs - - io.open = hooks.io_open - io.output = hooks.io_output - os.writefile_ifnotequal = hooks.os_writefile_ifnotequal - p.utf8 = hooks.p_utf8 - print = hooks.print - term.setTextColor = hooks.setTextColor - - local mt = getmetatable(io.stderr) - mt.write = _.builtin_write - end - - - - function _.setupTest(test) - if type(test.suite.setup) == "function" then - return xpcall(test.suite.setup, _.errorHandler) - else - return true - end - end - - - - function _.executeTest(test) - local result, err - p.capture(function() - result, err = xpcall(test.testFunction, _.errorHandler) - end) - return result, err - end - - - - function _.teardownTest(test) - if type(test.suite.teardown) == "function" then - return xpcall(test.suite.teardown, _.errorHandler) - else - return true - end - end - - - - function _.errorHandler(err) - local msg = err - - -- if the error doesn't include a stack trace, add one - if not msg:find("stack traceback:", 1, true) then - msg = debug.traceback(err, 2) - end - - -- trim of the trailing context of the originating xpcall - local i = msg:find("[C]: in function 'xpcall'", 1, true) - if i then - msg = msg:sub(1, i - 3) - end - - -- if the resulting stack trace is only one level deep, ignore it - local n = select(2, msg:gsub('\n', '\n')) - if n == 2 then - msg = msg:sub(1, msg:find('\n', 1, true) - 1) - end - - return msg - end - - - - function _.stub_io_open(fname, mode) - m.value_openedfilename = fname - m.value_openedfilemode = mode - return { - read = function() - end, - close = function() - m.value_closedfile = true - end - } - end - - - - function _.stub_io_output(f) - end - - - - function _.stub_os_writefile_ifnotequal(content, fname) - m.value_openedfilename = fname - m.value_closedfile = true - return 0 - end - - - - function _.stub_print(s) - end - - - - - function _.stub_stderr_write(...) - if select(1, ...) == io.stderr then - m.stderr_capture = (m.stderr_capture or "") .. select(2, ...) - else - return _.builtin_write(...) - end - end - - - - function _.stub_utf8() - end - - - function _.stub_setTextColor() - end diff --git a/build/premake/premake5/modules/vstudio/_manifest.lua b/build/premake/premake5/modules/vstudio/_manifest.lua deleted file mode 100644 index bec751920c..0000000000 --- a/build/premake/premake5/modules/vstudio/_manifest.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - "_preload.lua", - "vstudio.lua", - "vs2005.lua", - "vs2008.lua", - "vs200x_vcproj.lua", - "vs200x_vcproj_user.lua", - "vs2005_solution.lua", - "vs2005_dotnetbase.lua", - "vs2005_csproj.lua", - "vs2005_csproj_user.lua", - "vs2005_fsproj.lua", - "vs2005_fsproj_user.lua", - "vs2010.lua", - "vs2010_nuget.lua", - "vs2010_vcxproj.lua", - "vs2010_vcxproj_user.lua", - "vs2010_vcxproj_filters.lua", - "vs2010_rules_props.lua", - "vs2010_rules_targets.lua", - "vs2010_rules_xml.lua", - "vs2012.lua", - "vs2013.lua", - "vs2013_vcxitems.lua", - "vs2015.lua", - "vs2017.lua", - "vs2019.lua" -} diff --git a/build/premake/premake5/modules/vstudio/_preload.lua b/build/premake/premake5/modules/vstudio/_preload.lua deleted file mode 100644 index 490f44ff36..0000000000 --- a/build/premake/premake5/modules/vstudio/_preload.lua +++ /dev/null @@ -1,173 +0,0 @@ --- --- _preload.lua --- Define the makefile action(s). --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local project = p.project - - -- initialize module. - p.modules.vstudio = p.modules.vstudio or {} - p.modules.vstudio._VERSION = p._VERSION - p.vstudio = p.modules.vstudio - - -- load actions. - include("vs2005.lua") - include("vs2008.lua") - include("vs2010.lua") - include("vs2012.lua") - include("vs2013.lua") - include("vs2015.lua") - include("vs2017.lua") - include("vs2019.lua") - - -- Initialize Specific API - - p.api.addAllowed("debugger", "VisualStudioLocal") - p.api.addAllowed("debugger", "VisualStudioRemote") - p.api.addAllowed("debugger", "VisualStudioWebBrowser") - p.api.addAllowed("debugger", "VisualStudioWebService") - - p.api.register { - name = "shaderoptions", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - p.api.register { - name = "shaderdefines", - scope = "config", - kind = "list:string", - tokens = true, - } - - p.api.register { - name = "shaderincludedirs", - scope = "config", - kind = "list:directory", - tokens = true, - pathVars = true, - } - - p.api.register { - name = "shadertype", - scope = "config", - kind = "string", - allowed = { - "Effect", - "Vertex", - "Pixel", - "Geometry", - "Hull", - "Domain", - "Compute", - "Texture", - "RootSignature", - } - } - - p.api.register { - name = "shadermodel", - scope = "config", - kind = "string", - allowed = { - "2.0", - "3.0", - "4.0_level_9_1", - "4.0_level_9_3", - "4.0", - "4.1", - "5.0", - "5.1", - "rootsig_1.0", - "rootsig_1.1", - "6.0", - "6.1", - "6.2", - "6.3" - } - } - - p.api.register { - name = "shaderentry", - scope = "config", - kind = "string", - tokens = true, - } - - p.api.register { - name = "shadervariablename", - scope = "config", - kind = "string", - tokens = true, - } - - p.api.register { - name = "shaderheaderfileoutput", - scope = "config", - kind = "string", - tokens = true, - } - - p.api.register { - name = "shaderobjectfileoutput", - scope = "config", - kind = "string", - tokens = true, - } - - p.api.register { - name = "shaderassembler", - scope = "config", - kind = "string", - allowed = { - "NoListing", - "AssemblyCode", - "AssemblyCodeAndHex", - } - } - - p.api.register { - name = "shaderassembleroutput", - scope = "config", - kind = "string", - tokens = true, - } - - p.api.register { -- DEPRECATED 2019-10-21 - name = "debuggerflavor", - scope = "config", - kind = "string", - allowed = { - "Local", - "Remote", - "WebBrowser", - "WebService" - } - } - - p.api.deprecateField("debuggerflavor", 'Use `debugger` instead.', - function(value) - debugger('VisualStudio' .. value) - end) - - --- --- Decide when the full module should be loaded. --- - - return function(cfg) - return - _ACTION == "vs2005" or - _ACTION == "vs2008" or - _ACTION == "vs2010" or - _ACTION == "vs2012" or - _ACTION == "vs2013" or - _ACTION == "vs2015" or - _ACTION == "vs2017" or - _ACTION == "vs2019" or - false; - end diff --git a/build/premake/premake5/modules/vstudio/tests/_tests.lua b/build/premake/premake5/modules/vstudio/tests/_tests.lua deleted file mode 100644 index fd418b368a..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/_tests.lua +++ /dev/null @@ -1,99 +0,0 @@ -require ("vstudio") - -return { - -- Visual Studio .Net projects - "dotnet2005/projectelement.lua", - "dotnet2005/test_nuget_framework_folders.lua", - - -- Visual Studio 2005+ C# projects - "cs2005/test_assembly_refs.lua", - "cs2005/test_build_events.lua", - "cs2005/test_common_props.lua", - "cs2005/test_compiler_props.lua", - "cs2005/test_no_warn.lua", - "cs2005/test_debug_props.lua", - "cs2005/test_files.lua", - "cs2005/test_icon.lua", - "cs2005/test_netcore.lua", - "cs2005/test_nuget_config.lua", - "cs2005/test_nuget_packages_config.lua", - "cs2005/test_nuget_references.lua", - "cs2005/test_output_props.lua", - "cs2005/test_platform_groups.lua", - "cs2005/test_project_refs.lua", - "cs2005/projectsettings.lua", - "cs2005/test_targets.lua", - "cs2005/test_user_file.lua", - - -- Visual Studio 2005+ solutions - "sln2005/test_dependencies.lua", - "sln2005/test_header.lua", - "sln2005/test_nested_projects.lua", - "sln2005/test_projects.lua", - "sln2005/test_platforms.lua", - "sln2005/test_sections.lua", - "sln2005/test_shared_projects.lua", - - -- Visual Studio 2002-2008 C/C++ projects - "vc200x/test_assembly_refs.lua", - "vc200x/test_build_steps.lua", - "vc200x/test_configuration.lua", - "vc200x/test_compiler_block.lua", - "vc200x/test_debug_settings.lua", - "vc200x/test_excluded_configs.lua", - "vc200x/test_files.lua", - "vc200x/test_linker_block.lua", - "vc200x/test_manifest_block.lua", - "vc200x/test_nmake_settings.lua", - "vc200x/test_platforms.lua", - "vc200x/test_project.lua", - "vc200x/test_project_refs.lua", - "vc200x/test_resource_compiler.lua", - "vc200x/test_user_file.lua", - - -- Visual Studio 2010+ C/C++ projects - "vc2010/test_assembly_refs.lua", - "vc2010/test_build_events.lua", - "vc2010/test_build_log.lua", - "vc2010/test_build_steps.lua", - "vc2010/test_character_set.lua", - "vc2010/test_compile_settings.lua", - "vc2010/test_config_props.lua", - "vc2010/test_debug_settings.lua", - "vc2010/test_excluded_configs.lua", - "vc2010/test_extension_settings.lua", - "vc2010/test_extension_targets.lua", - "vc2010/test_language_settings.lua", - "vc2010/test_language_targets.lua", - "vc2010/test_floatingpoint.lua", - "vc2010/test_fxcompile_settings.lua", - "vc2010/test_globals.lua", - "vc2010/test_header.lua", - "vc2010/test_files.lua", - "vc2010/test_filter_ids.lua", - "vc2010/test_filters.lua", - "vc2010/test_item_def_group.lua", - "vc2010/test_link.lua", - "vc2010/test_manifest.lua", - "vc2010/test_nmake_props.lua", - "vc2010/test_nuget_packages_config.lua", - "vc2010/test_nuget_package_references.lua", - "vc2010/test_output_props.lua", - "vc2010/test_platform_toolset.lua", - "vc2010/test_project_configs.lua", - "vc2010/test_project_refs.lua", - "vc2010/test_prop_sheet.lua", - "vc2010/test_resource_compile.lua", - "vc2010/test_rule_props.lua", - "vc2010/test_rule_targets.lua", - "vc2010/test_rule_vars.lua", - "vc2010/test_rule_xml.lua", - "vc2010/test_tokens.lua", - "vc2010/test_target_machine.lua", - "vc2010/test_user_file.lua", - "vc2010/test_vectorextensions.lua", - "vc2010/test_ensure_nuget_imports.lua", - - -- Visual Studio 2013+ C/C++ Shared Items projects - "vc2013/test_vcxitems.lua", -} diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/projectsettings.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/projectsettings.lua deleted file mode 100644 index 4d87c807fa..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/projectsettings.lua +++ /dev/null @@ -1,291 +0,0 @@ --- --- tests/actions/vstudio/cs2005/projectsettings.lua --- Validate generation of root in Visual Studio 2005+ .csproj --- Copyright (c) 2009-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_dn2005_projectsettings") - local dn2005 = p.vstudio.dotnetbase - local cs2005 = p.vstudio.cs2005 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks = test.createWorkspace() - language "C#" - uuid "AE61726D-187C-E440-BD07-2556188A6565" - end - - local function prepare() - prj = test.getproject(wks, 1) - - dn2005.prepare(cs2005) - dn2005.projectProperties(prj) - end - - --- --- Version Tests --- - - function suite.OnVs2005() - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - - ]] - end - - - function suite.OnVs2008() - p.action.set("vs2008") - prepare() - test.capture [[ - - Debug - AnyCPU - 9.0.30729 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - - ]] - end - - - function suite.OnVs2010() - p.action.set("vs2010") - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.30703 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.0 - - - 512 - - ]] - end - - - function suite.onVs2012() - p.action.set("vs2012") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.5 - 512 - - ]] - end - - - function suite.onVs2015() - p.action.set("vs2015") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.5 - 512 - true - - ]] - end - - - function suite.onVs2017() - p.action.set("vs2017") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.5.2 - 512 - true - - ]] - end - - function suite.onVs2019() - p.action.set("vs2019") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.7.2 - 512 - true - - ]] - end --- --- Framework Tests --- - - function suite.OnFrameworkVersion() - framework "3.0" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v3.0 - - ]] - end - - - function suite.OnDotNetFrameworkVersion() - dotnetframework "3.0" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v3.0 - - ]] - end - - --- --- Lang version tests --- - - function suite.OnCSVersion() - csversion "6" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - 6 - - ]] - end - - --- --- Make sure the root namespace can be overridden. --- - - function suite.canOverrideRootNamespace() - namespace "MyCompany.%{prj.name}" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyCompany.MyProject - MyProject - - ]] - end - - --- --- WPF adds an additional element. --- - - function suite.projectTypeGuids_onWPF() - p.action.set("vs2010") - flags { "WPF" } - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.30703 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.0 - - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_assembly_refs.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_assembly_refs.lua deleted file mode 100644 index 6e0f1d5627..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_assembly_refs.lua +++ /dev/null @@ -1,289 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_assembly_refs.lua --- Test the assembly linking block of a Visual Studio 2005+ C# project. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_assembly_refs") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - language "C#" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - - dn2005.references(prj) - end - - --- --- Block should be empty if the project has no links. --- - - function suite.emptyGroup_onNoLinks() - prepare() - test.capture [[ - - - ]] - end - - --- --- Check handling of system assemblies. --- - - function suite.assemblyRef_onSystemAssembly() - links { "System" } - prepare() - test.capture [[ - - - - ]] - end - - --- --- Assemblies referenced by a path should get a hint. --- - - function suite.assemblyRef_onPath() - links { "../Libraries/nunit.framework" } - prepare() - test.capture [[ - - - ..\Libraries\nunit.framework.dll - - - ]] - end - - --- --- Assemblies referenced via a token that expands to an absolute --- path should still end up with a relative hint path. --- - - function suite.assemblyRef_onAbsoluteToken() - links { "%{path.getdirectory(os.getcwd())}/Libraries/nunit.framework" } - prepare() - test.capture [[ - - - ..\Libraries\nunit.framework.dll - - - ]] - end - - --- --- The assembly should not be copied to the target directory if the --- NoCopyLocal flag has been set for the configuration. --- - - function suite.markedPrivate_onNoCopyLocal() - links { "../Libraries/nunit.framework" } - flags { "NoCopyLocal" } - prepare() - test.capture [[ - - - ..\Libraries\nunit.framework.dll - False - - - ]] - end - - --- --- If there are entries in the copylocal() list, then only those --- specific libraries should be copied. --- - - function suite.markedPrivate_onCopyLocalListExclusion() - links { "../Libraries/nunit.framework" } - copylocal { "SomeOtherProject" } - prepare() - test.capture [[ - - - ..\Libraries\nunit.framework.dll - False - - - ]] - end - - function suite.notMarkedPrivate_onCopyLocalListInclusion() - links { "../Libraries/nunit.framework" } - copylocal { "../Libraries/nunit.framework" } - prepare() - test.capture [[ - - - ..\Libraries\nunit.framework.dll - - - ]] - end - - --- --- NuGet packages should get references. --- - - function suite.nuGetPackages_net45() - dotnetframework "4.5" - nuget { "Newtonsoft.Json:10.0.2" } - prepare() - test.capture [[ - - - packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - True - - - ]] - end - - function suite.nuGetPackages_net30() - dotnetframework "3.0" - nuget { "Newtonsoft.Json:10.0.2" } - prepare() - test.capture [[ - - - packages\Newtonsoft.Json.10.0.2\lib\net20\Newtonsoft.Json.dll - True - - - ]] - end - --- --- If there are multiple assemblies in the NuGet package, they all should be --- referenced. --- - - function suite.nuGetPackages_multipleAssemblies() - dotnetframework "2.0" - nuget { "NUnit:3.6.1" } - prepare() - test.capture [[ - - - packages\NUnit.3.6.1\lib\net20\nunit.framework.dll - True - - - packages\NUnit.3.6.1\lib\net20\NUnit.System.Linq.dll - True - - - ]] - end - - --- --- NuGet packages should respect copylocal() and the NoCopyLocal flag. --- - - function suite.nugetPackages_onNoCopyLocal() - dotnetframework "2.0" - nuget { "NUnit:3.6.1" } - flags { "NoCopyLocal" } - prepare() - test.capture [[ - - - packages\NUnit.3.6.1\lib\net20\nunit.framework.dll - False - - - packages\NUnit.3.6.1\lib\net20\NUnit.System.Linq.dll - False - - - ]] - end - - function suite.nugetPackages_onCopyLocalListExclusion() - dotnetframework "2.0" - nuget { "NUnit:3.6.1" } - copylocal { "SomeOtherProject" } - prepare() - test.capture [[ - - - packages\NUnit.3.6.1\lib\net20\nunit.framework.dll - False - - - packages\NUnit.3.6.1\lib\net20\NUnit.System.Linq.dll - False - - - ]] - end - - function suite.nugetPackages_onCopyLocalListInclusion() - dotnetframework "2.0" - nuget { "NUnit:3.6.1" } - copylocal { "NUnit:3.6.1" } - prepare() - test.capture [[ - - - packages\NUnit.3.6.1\lib\net20\nunit.framework.dll - True - - - packages\NUnit.3.6.1\lib\net20\NUnit.System.Linq.dll - True - - - ]] - end - --- --- NuGet packages with unconventional folder structures should be handled --- properly. --- - - function suite.nuGetPackages_netFolder() - dotnetframework "4.5" - nuget { "MetroModernUI:1.4.0" } - prepare() - test.capture [[ - - - packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll - True - - - packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll - True - - - packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll - True - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_build_events.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_build_events.lua deleted file mode 100644 index ec9035c44e..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_build_events.lua +++ /dev/null @@ -1,101 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_build_events.lua --- Check generation of pre- and post-build commands for C# projects. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_build_events") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup --- - - local wks, prj, cfg - - function suite.setup() - p.action.set("vs2005") - p.escaper(p.vstudio.vs2010.esc) - wks = test.createWorkspace() - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - dn2005.buildEvents(prj) - end - - --- --- If no build steps are specified, nothing should be written. --- - - function suite.noOutput_onNoEvents() - prepare() - test.isemptycapture() - end - - --- --- If one command set is used and not the other, only the one should be written. --- - - function suite.onlyOne_onPreBuildOnly() - prebuildcommands { "command1" } - prepare() - test.capture [[ - - command1 - - ]] - end - - function suite.onlyOne_onPostBuildOnly() - postbuildcommands { "command1" } - prepare() - test.capture [[ - - command1 - - ]] - end - - function suite.both_onBoth() - prebuildcommands { "command1" } - postbuildcommands { "command2" } - prepare() - test.capture [[ - - command1 - command2 - - ]] - end - - --- --- Multiple commands should be separated with un-escaped EOLs. --- - - function suite.splits_onMultipleCommands() - postbuildcommands { "command1", "command2" } - prepare() - test.capture ("\t\n\t\tcommand1\r\ncommand2\n\t\n") - end - - - --- --- Quotes should not be escaped, other special characters should. --- - - function suite.onSpecialChars() - postbuildcommands { '\' " < > &' } - prepare() - test.capture [[ - - ' " < > & - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_common_props.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_common_props.lua deleted file mode 100644 index 5cb05811ce..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_common_props.lua +++ /dev/null @@ -1,39 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_common_props.lua --- Check Visual Studio 2012 extensions to the project properties block. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2012_csproj_common_props") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2012") - wks = test.createWorkspace() - language "C#" - end - - local function prepare() - prj = test.getproject(wks, 1) - dn2005.commonProperties(prj) - end - - ---- --- Visual Studio 2012 omits and . ---- - - function suite.onDefaultCommonProps() - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_compiler_props.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_compiler_props.lua deleted file mode 100644 index d32b721db2..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_compiler_props.lua +++ /dev/null @@ -1,73 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_compiler_props.lua --- Test the compiler flags of a Visual Studio 2005+ C# project. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_compiler_props") - local dn2005 = p.vstudio.dotnetbase - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - dn2005.compilerProps(cfg) - end - - --- --- Check handling of defines. --- - - function suite.defineConstants_onDefines() - defines { "DEBUG", "TRACE" } - prepare() - test.capture [[ - DEBUG;TRACE - ]] - end - - --- --- Check handling of the Unsafe flag. --- - - function suite.allowUnsafeBlocks_onUnsafeFlag() - clr "Unsafe" - prepare() - test.capture [[ - - prompt - 4 - true - ]] - end - - --- --- Check handling of FatalWarnings flag. --- - - - function suite.treatWarningsAsErrors_onFatalWarningsFlag() - flags { "FatalWarnings" } - prepare() - test.capture [[ - - prompt - 4 - true - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_debug_props.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_debug_props.lua deleted file mode 100644 index 3fedf780c1..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_debug_props.lua +++ /dev/null @@ -1,106 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_debug_props.lua --- Test debugging and optimization flags block of a Visual Studio 2005+ C# project. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_debug_props") - local cs2005 = p.vstudio.cs2005 - local dn2005 = p.vstudio.dotnetbase - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - dn2005.debugProps(cfg) - end - - --- --- Check the handling of the Symbols flag. --- - - function suite.debugSymbols_onNoSymbolsFlag() - prepare() - test.capture [[ - pdbonly - false - ]] - end - - function suite.debugSymbols_onSymbolsFlag() - symbols "On" - prepare() - test.capture [[ - true - full - false - ]] - end - ---- ---- Check handling of debug parameters. ---- - - function suite.debugCommandParameters() - debugargs "foobar" - - local cfg = test.getconfig(prj, "Debug") - dn2005.debugCommandParameters(cfg) - - test.capture [[ - foobar - ]] - end - - function suite.debugStartArguments() - debugargs "foobar" - local cfg = test.getconfig(prj, "Debug") - cs2005.localDebuggerCommandArguments(cfg) - test.capture [[ -foobar - ]] - end - --- --- Check handling of optimization flags. --- - - function suite.optimize_onOptimizeFlag() - optimize "On" - prepare() - test.capture [[ - pdbonly - true - ]] - end - - function suite.optimize_onOptimizeSizeFlag() - optimize "Size" - prepare() - test.capture [[ - pdbonly - true - ]] - end - - function suite.optimize_onOptimizeSpeedFlag() - optimize "Speed" - prepare() - test.capture [[ - pdbonly - true - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_files.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_files.lua deleted file mode 100644 index 52836630c5..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_files.lua +++ /dev/null @@ -1,401 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_files.lua --- Validate generation of block in Visual Studio 2005 .csproj --- Copyright (c) 2009-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_files") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - dn2005.files(prj) - end - - --- --- Test grouping and nesting --- - - function suite.SimpleSourceFile() - files { "Hello.cs" } - prepare() - test.capture [[ - - ]] - end - - function suite.NestedSourceFile() - files { "Src/Hello.cs" } - prepare() - test.capture [[ - - ]] - end - - - function suite.PerConfigFile() - files { "Hello.cs" } - configuration { 'debug' } - files { "HelloTwo.cs" } - prepare() - test.capture [[ - - - ]] - end - - --- --- Test file dependencies --- - - function suite.resourceDesignerDependency() - files { "Resources.resx", "Resources.Designer.cs" } - prepare() - test.capture [[ - - True - Resources.resx - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - ]] - end - - - function suite.publicResourceDesignerDependency() - files { "Resources.resx", "Resources.Designer.cs" } - resourcegenerator 'public' - - prepare() - test.capture [[ - - True - Resources.resx - - - PublicResXFileCodeGenerator - Resources.Designer.cs - Designer - - ]] - end - - - function suite.settingsDesignerDependency() - files { "Properties/Settings.settings", "Properties/Settings.Designer.cs" } - prepare() - test.capture [[ - - True - Settings.settings - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - ]] - end - - function suite.datasetDesignerDependency() - files { "DataSet.xsd", "DataSet.Designer.cs" } - prepare() - test.capture [[ - - True - True - DataSet.xsd - - - MSDataSetGenerator - DataSet.Designer.cs - Designer - - ]] - end - - function suite.datasetDependencies() - files { "DataSet.xsd", "DataSet.xsc", "DataSet.xss" } - prepare() - test.capture [[ - - DataSet.xsd - - - - DataSet.xsd - - ]] - end - - function suite.textTemplatingDependency() - files { "foobar.tt", "foobar.cs" } - prepare() - test.capture [[ - - True - True - foobar.tt - - - TextTemplatingFileGenerator - foobar.cs - - ]] - end - --- --- File associations should always be made relative to the file --- which is doing the associating. --- - - function suite.resourceDependency_inSubfolder() - files { "Forms/TreeListView.resx", "Forms/TreeListView.cs" } - prepare() - test.capture [[ - - - TreeListView.cs - - ]] - end - - function suite.datasetDependency_inSubfolder() - files { "DataSets/DataSet.xsd", "DataSets/DataSet.Designer.cs" } - prepare() - test.capture [[ - - True - True - DataSet.xsd - - - MSDataSetGenerator - DataSet.Designer.cs - Designer - - ]] - end - - --- --- Test build actions. --- - - function suite.copyAction() - files { "Hello.txt" } - filter "files:**.txt" - buildaction "Copy" - prepare() - test.capture [[ - - PreserveNewest - - ]] - end - - function suite.componentAction() - files { "Hello.cs" } - filter "files:Hello.cs" - buildaction "Component" - prepare() - test.capture [[ - - Component - - ]] - end - - function suite.embeddedResourceAction() - files { "Hello.ico" } - filter "files:*.ico" - buildaction "Embed" - prepare() - test.capture [[ - - ]] - end - - function suite.formAction() - files { "HelloForm.cs" } - filter "files:HelloForm.cs" - buildaction "Form" - prepare() - test.capture [[ - - Form - - ]] - end - - function suite.userControlAction() - files { "Hello.cs" } - filter "files:Hello.cs" - buildaction "UserControl" - prepare() - test.capture [[ - - UserControl - - ]] - end - - function suite.resourceAction() - files { "Hello.ico" } - filter "files:*.ico" - buildaction "Resource" - prepare() - test.capture [[ - - ]] - end - - --- --- Files that exist outside the project folder should be added as --- links, with a relative path. Weird but true. --- - - function suite.usesLink_onExternalSourceCode() - files { "../Hello.cs" } - prepare() - test.capture [[ - - Hello.cs - - ]] - end - - function suite.usesLinkInFolder_onExternalSourceCode() - files { "../Src/Hello.cs" } - prepare() - test.capture [[ - - Src\Hello.cs - - ]] - end - - function suite.usesLinkInFolder_onExternalContent() - files { "../Resources/Hello.txt" } - filter "files:**.txt" - buildaction "Copy" - prepare() - test.capture [[ - - Resources\Hello.txt - PreserveNewest - - ]] - end - - function suite.usesLinkInFolder_onExternalReference() - files { "../Resources/Hello.txt" } - prepare() - test.capture [[ - - Resources\Hello.txt - - ]] - end - - --- --- Files that exist outside the project's folder are allowed to be --- placed into a folder using a virtual path, which is better than --- dropping them at the root. Files within the project folder cannot --- use virtual paths, because Visual Studio won't allow it. --- - - function suite.usesLinks_onVpath_onLocalSourceFile() - files { "Hello.cs" } - vpaths { ["Sources"] = "**.cs" } - prepare() - test.capture [[ - - ]] - end - - function suite.usesLinks_onVpath_onExternalSourceFile() - files { "../Src/Hello.cs" } - vpaths { ["Sources"] = "../**.cs" } - prepare() - test.capture [[ - - Sources\Hello.cs - - ]] - end - - --- --- Check WPF XAML handling. --- - - function suite.associatesFiles_onXamlForm() - files { "MainWindow.xaml", "MainWindow.xaml.cs" } - prepare() - test.capture [[ - - MSBuild:Compile - Designer - - - MainWindow.xaml - Code - - ]] - end - - - function suite.xamlApp_onAppXaml() - files { "App.xaml", "App.xaml.cs" } - prepare() - test.capture [[ - - MSBuild:Compile - Designer - - - App.xaml - Code - - ]] - end - - - function suite.xamlApp_onBuildAction() - files { "MyApp.xaml", "MyApp.xaml.cs" } - filter "files:MyApp.xaml" - buildaction "Application" - prepare() - test.capture [[ - - MSBuild:Compile - Designer - - - MyApp.xaml - Code - - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_icon.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_icon.lua deleted file mode 100644 index ce2d916382..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_icon.lua +++ /dev/null @@ -1,51 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_icon.lua --- Validate generation of the application icon declaration. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_icon") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2005") - wks, prj = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - dn2005.applicationIcon(prj) - end - - --- --- By default, there should be no output. --- - - function suite.noOutput_onNoIcon() - prepare() - test.isemptycapture() - end - - --- --- If an icon is specified, output the property group. --- - - function suite.doesOutput_onIcon() - icon "MyApp.ico" - prepare() - test.capture [[ - - MyApp.ico - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_netcore.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_netcore.lua deleted file mode 100644 index cfa138a103..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_netcore.lua +++ /dev/null @@ -1,103 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_output_props.lua --- Test the target output settings of a Visual Studio 2005+ C# project. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - -local p = premake -local suite = test.declare("vstudio_cs2005_netcore_prj") -local dn2005 = p.vstudio.dotnetbase -local project = p.project - - --- --- Setup and teardown --- - -local wks, prj - -function suite.setup() - p.action.set("vs2005") - wks, prj = test.createWorkspace() - language "C#" -end - -local function targetFrameworkPrepare() - local cfg = test.getconfig(prj, "Debug") - dn2005.netcore.targetFramework(cfg) -end - -local function targetFrameworkVersionPrepare() - local cfg = test.getconfig(prj, "Debug") - dn2005.targetFrameworkVersion(cfg) -end - -local function prepareNetcore() - dn2005.projectElement(prj) -end - -function suite.targetFrameworkProperty_framework() - dotnetframework "4.7.2" - targetFrameworkPrepare() - test.isemptycapture() -end - -function suite.targetFrameworkProperty_core() - dotnetframework "netcoreapp2.2" - targetFrameworkPrepare() - test.capture [[ - netcoreapp2.2 - ]] -end - -function suite.targetFrameworkProperty_standard() - dotnetframework "netstandard1.2" - targetFrameworkPrepare() - test.capture [[ - netstandard1.2 - ]] -end - -function suite.targetFrameworkVersionProperty_framework() - dotnetframework "4.7.2" - targetFrameworkVersionPrepare() - test.capture [[ - v4.7.2 - ]] -end - -function suite.targetFrameworkVersionProperty_core() - dotnetframework "netcoreapp2.2" - targetFrameworkVersionPrepare() - test.isemptycapture() -end - -function suite.targetFrameworkVersionProperty_standard() - dotnetframework "netstandard1.2" - targetFrameworkVersionPrepare() - test.isemptycapture() -end - -function suite.project_element_standard() - dotnetframework "netstandard1.2" - prepareNetcore() - test.capture [[ - - ]] -end - -function suite.project_element_core() - dotnetframework "netcoreapp1.2" - prepareNetcore() - test.capture [[ - - ]] -end - -function suite.project_element_framework() - dotnetframework "4.7.2" - prepareNetcore() - test.capture [[ - - ]] -end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_no_warn.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_no_warn.lua deleted file mode 100644 index e37a4ec385..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_no_warn.lua +++ /dev/null @@ -1,50 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_no_warn.lua --- Validate generation of disabling warnings for Visual Studio 2010 and newer. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_no_warn") - local dn2005 = p.vstudio.dotnetbase - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - dn2005.NoWarn - (cfg) - end - - --- --- If no disableWarnings are specified, nothing should be written. --- - - function suite.noOutput_onNoDisableWarnings() - prepare() - test.isemptycapture() - end - --- --- Handling of disableWarnings --- - - function suite.output_onDisableWarnings() - disablewarnings { "1018", "1019" } - prepare() - test.capture [[ - 1018;1019 - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_config.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_config.lua deleted file mode 100644 index 8be355269b..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_config.lua +++ /dev/null @@ -1,83 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_nuget_config.lua --- Validate generation of NuGet.Config files for Visual Studio 2010 and newer --- Copyright (c) 2017 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_nuget_config") - local cs2005 = p.vstudio.cs2005 - local nuget2010 = p.vstudio.nuget2010 - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - language "C#" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - nuget2010.generateNuGetConfig(prj) - end - - --- --- Shouldn't output a file if no packages or sources have been set. --- - - function suite.noOutputIfNoPackages() - prepare() - test.isemptycapture() - end - - --- --- Shouldn't output a file if no package sources have been set. --- - - function suite.noOutputIfNoPackageSources() - dotnetframework "4.6" - nuget "NUnit:3.6.1" - prepare() - test.isemptycapture() - end - - --- --- Shouldn't output a file if no packages have been set. --- - - function suite.noOutputIfNoPackagesButSource() - dotnetframework "4.6" - nugetsource "https://www.myget.org/F/premake-nuget-test/api/v3/index.json" - prepare() - test.isemptycapture() - end - - --- --- Writes the NuGet.Config file properly. --- - - function suite.structureIsCorrect() - dotnetframework "4.6" - nuget "NUnit:3.6.1" - nugetsource "https://www.myget.org/F/premake-nuget-test/api/v3/index.json" - prepare() - test.capture [[ - - - - - - - -]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_packages_config.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_packages_config.lua deleted file mode 100644 index 0247c569cc..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_packages_config.lua +++ /dev/null @@ -1,58 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_assembly_refs.lua --- Validate generation of NuGet packages.config file for Visual Studio 2010 and newer. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_nuget_packages_config") - local cs2005 = p.vstudio.cs2005 - local nuget2010 = p.vstudio.nuget2010 - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - language "C#" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - nuget2010.generatePackagesConfig(prj) - end - - --- --- Should not output anything if no packages have been set. --- - - function suite.noOutputIfNoPackages() - prepare() - test.isemptycapture() - end - - - --- --- Writes the packages.config file properly. --- - - function suite.structureIsCorrect() - dotnetframework "4.6" - nuget { "Newtonsoft.Json:10.0.2", "NUnit:3.6.1", "SSH.NET:2016.0.0" } - prepare() - test.capture [[ - - - - - - -]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_references.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_references.lua deleted file mode 100644 index 57acfd6da0..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_nuget_references.lua +++ /dev/null @@ -1,39 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_nuget_references.lua --- Validate generation of NuGet package references files for Visual Studio 2010 and newer --- Copyright (c) 2017 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_nuget_references") - local dn2005 = p.vstudio.dotnetbase - local nuget2010 = p.vstudio.nuget2010 - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - _OPTIONS.os = "macosx" - p.action.set("vs2010") - wks = test.createWorkspace() - language "C#" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - dn2005.nuGetReferences(prj) - end - --- --- Check that we process Unix-style paths correctly. --- - - function suite.unixPaths() - dotnetframework "4.6" - nuget "Mono.Cecil:0.9.6.4" - prepare() - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_output_props.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_output_props.lua deleted file mode 100644 index 7f52923c6a..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_output_props.lua +++ /dev/null @@ -1,66 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_output_props.lua --- Test the target output settings of a Visual Studio 2005+ C# project. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_output_props") - local dn2005 = p.vstudio.dotnetbase - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks, prj = test.createWorkspace() - language "C#" - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - dn2005.outputProps(cfg) - end - - --- --- Check handling of the output directory. --- - - function suite.outputDirectory_onTargetDir() - targetdir "../build" - prepare() - test.capture [[ - ..\build\ - ]] - end - - --- --- Check handling of the intermediates directory. --- - - function suite.intermediateDirectory_onVs2008() - p.action.set("vs2008") - prepare() - test.capture [[ - bin\Debug\ - obj\Debug\ - ]] - end - - function suite.intermediateDirectory_onVs2010() - p.action.set("vs2010") - prepare() - test.capture [[ - bin\Debug\ - obj\Debug\ - $(BaseIntermediateOutputPath) - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_platform_groups.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_platform_groups.lua deleted file mode 100644 index 4b2269b191..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_platform_groups.lua +++ /dev/null @@ -1,108 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_platform_groups.lua --- Check creation of per-platform property groups in VS2005+ C# projects. --- Copyright (c) 2009-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_platform_groups") - local dn2005 = p.vstudio.dotnetbase - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - language "C#" - end - - local function prepare(platform) - local prj = project("MyProject") - local cfg = test.getconfig(prj, "Debug", platform) - dn2005.propertyGroup(cfg) - end - - --- --- Check defaults. --- - - function suite.vs2008() - p.action.set("vs2008") - prepare() - test.capture [[ - - ]] - end - - - function suite.vs2010() - p.action.set("vs2010") - prepare() - test.capture [[ - - AnyCPU - ]] - end - - --- --- Check handling of specific architectures. --- - - function suite.vs2008_onAnyCpu() - p.action.set("vs2008") - platforms "Any CPU" - prepare("Any CPU") - test.capture [[ - - ]] - end - - - function suite.vs2010_onAnyCpu() - p.action.set("vs2010") - platforms "Any CPU" - prepare("Any CPU") - test.capture [[ - - AnyCPU - ]] - end - - function suite.onX86() - platforms "x86" - prepare("x86") - test.capture [[ - - x86 - ]] - end - - - function suite.onX86_64() - platforms "x86_64" - prepare("x86_64") - test.capture [[ - - x64 - ]] - end - - - function suite.onArbitrary64bitPlatform() - platforms "Win64" - system "Windows" - architecture "x86_64" - prepare("Win64") - test.capture [[ - - x64 - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_project_refs.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_project_refs.lua deleted file mode 100644 index 7dd7b0c34a..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_project_refs.lua +++ /dev/null @@ -1,148 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_project_refs.lua --- Test the project dependencies block of a Visual Studio 2005+ C# project. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_project_refs") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - wks = test.createWorkspace() - uuid "00112233-4455-6677-8888-99AABBCCDDEE" - test.createproject(wks) - end - - local function prepare(platform) - prj = test.getproject(wks, 2) - dn2005.projectReferences(prj) - end - - --- --- Block should be empty if the project has no dependencies. --- - - function suite.emptyGroup_onNoDependencies() - prepare() - test.capture [[ - - - ]] - end - - --- --- If a sibling project is listed in links()/dependson(), an item group should --- be written with a reference to that sibling project. --- - - function suite.projectReferenceAdded_onSiblingProjectLink() - links { "MyProject" } - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - MyProject - - - ]] - end - - function suite.projectReferenceNotAdded_onSiblingProjectDependson() - dependson { "MyProject" } - prepare() - test.capture [[ - - - ]] - end - - --- --- Project references should always be specified relative to the --- project doing the referencing. --- - - function suite.referencesAreRelative_onDifferentProjectLocation() - links { "MyProject" } - location "build/MyProject2" - project("MyProject") - location "build/MyProject" - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - MyProject - - - ]] - end - - --- --- The assembly should not be copied to the target directory if the --- NoCopyLocal flag has been set for the configuration. --- - - function suite.markedPrivate_onNoCopyLocal() - links { "MyProject" } - flags { "NoCopyLocal" } - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - MyProject - False - - - ]] - end - - --- --- If there are entries in the copylocal() list, then only those --- specific libraries should be copied. --- - - function suite.markedPrivate_onCopyLocalListExclusion() - links { "MyProject" } - copylocal { "SomeOtherProject" } - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - MyProject - False - - - ]] - end - - function suite.notMarkedPrivate_onCopyLocalListInclusion() - links { "MyProject" } - copylocal { "MyProject" } - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - MyProject - - - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_targets.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_targets.lua deleted file mode 100644 index bf76f311a4..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_targets.lua +++ /dev/null @@ -1,46 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_targets.lua --- Check Visual Studio 2012 extensions to the targets block. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2012_csproj_targets") - local cs2005 = p.vstudio.cs2005 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2012") - wks = test.createWorkspace() - language "C#" - end - - local function prepare() - prj = test.getproject(wks, 1) - cs2005.targets(prj) - end - - ---- --- Visual Studio 2012 changes the MS Build path slightly. ---- - - function suite.on2012() - prepare() - test.capture [[ - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/cs2005/test_user_file.lua b/build/premake/premake5/modules/vstudio/tests/cs2005/test_user_file.lua deleted file mode 100644 index 97f16b8dc5..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/cs2005/test_user_file.lua +++ /dev/null @@ -1,50 +0,0 @@ --- --- tests/actions/vstudio/cs2005/test_user_file.lua --- Verify handling of empty and non-empty .user files for VC#. --- Copyright (c) 2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_cs2005_user_file") - local cs2005 = p.vstudio.cs2005 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2008") - wks = test.createWorkspace() - language "C#" - end - - local function prepare() - local prj = test.getproject(wks, 1) - cs2005.generateUser(prj) - end - - --- --- If no debugger settings have been specified, then the .user --- file should not be written at all. --- - - function suite.noOutput_onNoSettings() - prepare() - test.isemptycapture() - end - - --- --- If a debugger setting has been specified, output. --- - - function suite.doesOutput_onDebugSettings() - debugargs { "hello" } - prepare() - test.hasoutput() - end - diff --git a/build/premake/premake5/modules/vstudio/tests/dotnet2005/projectelement.lua b/build/premake/premake5/modules/vstudio/tests/dotnet2005/projectelement.lua deleted file mode 100644 index 17e115dfd6..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/dotnet2005/projectelement.lua +++ /dev/null @@ -1,104 +0,0 @@ --- --- tests/actions/vstudio/dotnet2005/projectelement.lua --- Validate generation of element in Visual Studio 2005+ .csproj --- Copyright (c) 2009-2017 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_dn2005_projectelement") - local dn2005 = p.vstudio.dotnetbase - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare() - dn2005.xmlDeclaration() - dn2005.projectElement(prj) - end - - --- --- Tests --- - - function suite.on2005() - p.action.set("vs2005") - prepare() - test.capture [[ - - ]] - end - - - function suite.on2008() - p.action.set("vs2008") - prepare() - test.capture [[ - - ]] - end - - - function suite.on2010() - p.action.set("vs2010") - prepare() - test.capture [[ - - - ]] - end - - - function suite.on2012() - p.action.set("vs2012") - prepare() - test.capture [[ - - - ]] - end - - - function suite.on2013() - p.action.set("vs2013") - prepare() - test.capture [[ - - - ]] - end - - function suite.on2015() - p.action.set("vs2015") - prepare() - test.capture [[ - - - ]] - end - - function suite.on2017() - p.action.set("vs2017") - prepare() - test.capture [[ - - - ]] - end - - function suite.on2019() - p.action.set("vs2019") - prepare() - test.capture [[ - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/dotnet2005/test_nuget_framework_folders.lua b/build/premake/premake5/modules/vstudio/tests/dotnet2005/test_nuget_framework_folders.lua deleted file mode 100644 index 17bec4fae1..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/dotnet2005/test_nuget_framework_folders.lua +++ /dev/null @@ -1,42 +0,0 @@ --- --- modules/vstudio/tests/dotnet2005/test_nuget_framework_folders.lua --- Validate parsing of framework versions from folder names for --- Visual Studio 2010 and newer --- Copyright (c) 2017 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_dn2005_nuget_framework_folders") - local dn2005 = p.vstudio.dotnetbase - - - function suite.net() - test.isequal(dn2005.frameworkVersionForFolder("net451"), "4510000000") - test.isequal(dn2005.frameworkVersionForFolder("net45"), "4500000000") - test.isequal(dn2005.frameworkVersionForFolder("net20"), "2000000000") - test.isequal(dn2005.frameworkVersionForFolder("net35"), "3500000000") - test.isequal(dn2005.frameworkVersionForFolder("net"), "0000000000") - end - - function suite.numeric() - test.isequal(dn2005.frameworkVersionForFolder("10"), "1000000000") - test.isequal(dn2005.frameworkVersionForFolder("11"), "1100000000") - test.isequal(dn2005.frameworkVersionForFolder("20"), "2000000000") - test.isequal(dn2005.frameworkVersionForFolder("45"), "4500000000") - end - - function suite.numericWithDots() - test.isequal(dn2005.frameworkVersionForFolder("1.0"), "1000000000") - test.isequal(dn2005.frameworkVersionForFolder("1.1"), "1100000000") - test.isequal(dn2005.frameworkVersionForFolder("2.0"), "2000000000") - test.isequal(dn2005.frameworkVersionForFolder("4.5"), "4500000000") - end - - function suite.invalid() - test.isnil(dn2005.frameworkVersionForFolder("netstandard1.3")) - test.isnil(dn2005.frameworkVersionForFolder("sl4")) - test.isnil(dn2005.frameworkVersionForFolder("sl5")) - test.isnil(dn2005.frameworkVersionForFolder("uap10")) - test.isnil(dn2005.frameworkVersionForFolder("wp8")) - test.isnil(dn2005.frameworkVersionForFolder("wp71")) - end diff --git a/build/premake/premake5/modules/vstudio/tests/fs2005/projectsettings.lua b/build/premake/premake5/modules/vstudio/tests/fs2005/projectsettings.lua deleted file mode 100644 index 9b3f22a7be..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/fs2005/projectsettings.lua +++ /dev/null @@ -1,289 +0,0 @@ --- --- tests/actions/vstudio/fs2005/projectsettings.lua --- Validate generation of root in Visual Studio 2005+ .fsproj --- Copyright (c) 2009-2017 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_dn2005_projectsettings") - local dn2005 = p.vstudio.dotnetbase - local cs2005 = p.vstudio.cs2005 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks = test.createWorkspace() - language "F#" - uuid "AE61726D-187C-E440-BD07-2556188A6565" - end - - local function prepare() - prj = test.getproject(wks, 1) - - dn2005.prepare(cs2005) - dn2005.projectProperties(prj) - end - - --- --- Version Tests --- - - function suite.OnVs2005() - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - - ]] - end - - - function suite.OnVs2008() - p.action.set("vs2008") - prepare() - test.capture [[ - - Debug - AnyCPU - 9.0.30729 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - - ]] - end - - - function suite.OnVs2010() - p.action.set("vs2010") - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.30703 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.0 - - - 512 - - ]] - end - - - function suite.onVs2012() - p.action.set("vs2012") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.5 - 512 - - ]] - end - - - function suite.onVs2015() - p.action.set("vs2015") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.5 - 512 - true - - ]] - end - - - function suite.onVs2017() - p.action.set("vs2017") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.5 - 512 - true - - ]] - end - - function suite.onVs2019() - p.action.set("vs2019") - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.7.2 - 512 - true - - ]] - end - - function suite.onVs2015_462() - p.action.set("vs2015") - framework "4.6.2" - prepare() - test.capture [[ - - Debug - AnyCPU - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.6.2 - 512 - true - - ]] - end - - --- --- Framework Tests --- - - function suite.OnFrameworkVersion() - framework "3.0" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v3.0 - - ]] - end - - - function suite.OnDotNetFrameworkVersion() - dotnetframework "3.0" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v3.0 - - ]] - end - - --- --- Make sure the root namespace can be overridden. --- - - function suite.canOverrideRootNamespace() - namespace "MyCompany.%{prj.name}" - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.50727 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyCompany.MyProject - MyProject - - ]] - end - - --- --- WPF adds an additional element. --- - - function suite.projectTypeGuids_onWPF() - p.action.set("vs2010") - flags { "WPF" } - prepare() - test.capture [[ - - Debug - AnyCPU - 8.0.30703 - 2.0 - {AE61726D-187C-E440-BD07-2556188A6565} - Exe - Properties - MyProject - MyProject - v4.0 - - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_dependencies.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_dependencies.lua deleted file mode 100644 index 583db6b6a5..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_dependencies.lua +++ /dev/null @@ -1,97 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_dependencies.lua --- Validate generation of Visual Studio 2005+ solution project dependencies. --- Copyright (c) 2009-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_dependencies") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks, prj1, prj2 - - function suite.setup() - p.action.set("vs2005") - wks, prj1 = test.createWorkspace() - uuid "AE61726D-187C-E440-BD07-2556188A6565" - prj2 = test.createproject(wks) - uuid "2151E83B-997F-4A9D-955D-380157E88C31" - prj3 = test.createproject(wks) - uuid "CAA68162-8B96-11E1-8D5E-5885BBE59B18" - links "MyProject" - dependson "MyProject2" - end - - local function prepare(language) - prj1.language = language - prj2.language = language - prj2 = test.getproject(wks, 2) - sln2005.projectdependencies(prj2) - prj3.language = language - prj3 = test.getproject(wks, 3) - sln2005.projectdependencies(prj3) - end - - --- --- Verify dependencies between C++ projects are listed. --- - function suite.dependency_onCppProjects() - prepare("C++") - test.capture [[ -ProjectSection(ProjectDependencies) = postProject - {2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31} -EndProjectSection - ]] - end - - --- --- Verify dependencies between C# projects are listed. --- - - function suite.dependency_onCSharpProjects() - prepare("C#") - test.capture [[ -ProjectSection(ProjectDependencies) = postProject - {2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31} -EndProjectSection - ]] - end - - --- --- Most C# references should go into the project rather than the solution, --- but until I know the conditions, put everything here to be safe. --- - - function suite.dependency_onCSharpProjectsVs2010() - p.action.set("vs2010") - prepare("C#") - test.capture [[ -ProjectSection(ProjectDependencies) = postProject - {2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31} -EndProjectSection - ]] - end - - - --- --- Verify dependencies between projects C# are listed for VS2012. --- - - function suite.dependency_onCSharpProjectsVs2012() - p.action.set("vs2012") - prepare("C#") - test.capture [[ -ProjectSection(ProjectDependencies) = postProject - {2151E83B-997F-4A9D-955D-380157E88C31} = {2151E83B-997F-4A9D-955D-380157E88C31} -EndProjectSection - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_header.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_header.lua deleted file mode 100644 index 117b6f3cdf..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_header.lua +++ /dev/null @@ -1,78 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_header.lua --- Validate generation of Visual Studio 2005+ solution header. --- Copyright (c) 2009-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_header") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - sln2005.header() - end - - --- --- Each supported action should output the corresponding version numbers. --- - - function suite.on2005() - p.action.set("vs2005") - prepare() - test.capture [[ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 - ]] - end - - - function suite.on2008() - p.action.set("vs2008") - prepare() - test.capture [[ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 - ]] - end - - - function suite.on2010() - p.action.set("vs2010") - prepare() - test.capture [[ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 - ]] - end - - - function suite.on2012() - p.action.set("vs2012") - prepare() - test.capture [[ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 - ]] - end - - - function suite.on2013() - p.action.set("vs2013") - prepare() - test.capture [[ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_nested_projects.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_nested_projects.lua deleted file mode 100644 index e8dc9920f0..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_nested_projects.lua +++ /dev/null @@ -1,104 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_nested_projects.lua --- Check Visual Studio 2005+ Nested Projects solution block. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_nested_projects") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2008") - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - language "C++" - kind "ConsoleApp" - end - - local function prepare() - sln2005.nestedProjects(wks) - end - - --- --- This block should only be written if solution groups are present. --- - - function suite.isEmpty_onNoGroups() - project "MyProject" - prepare() - test.isemptycapture() - end - - --- --- Should be written even if first entry in project tree is not a group. --- - - function suite.writesBlock_onUngroupedFirstProject() - project "MyProject" - group "Alpha" - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(NestedProjects) = preSolution - ]] - end - - --- --- Check nesting with a single group and project. --- - - function suite.onSingleGroup() - group "Alpha" - project "MyProject" - prepare() - test.capture [[ -GlobalSection(NestedProjects) = preSolution - {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {D2C41116-3E7A-8A0B-C76E-84E23323810F} -EndGlobalSection - ]] - end - - --- --- Check nesting with multiple levels of groups. --- - - function suite.onNestedGroups() - group "Alpha/Beta" - project "MyProject" - prepare() - test.capture [[ -GlobalSection(NestedProjects) = preSolution - {BD0520A9-A9FE-3EFB-D230-2480BE881E07} = {D2C41116-3E7A-8A0B-C76E-84E23323810F} - {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {BD0520A9-A9FE-3EFB-D230-2480BE881E07} -EndGlobalSection - ]] - end - --- --- Ungrouped projects should not appear in the list. --- - - function suite.onUngroupedProject() - group "Alpha" - project "MyProject" - group "" - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(NestedProjects) = preSolution - {42B5DBC6-AE1F-903D-F75D-41E363076E92} = {D2C41116-3E7A-8A0B-C76E-84E23323810F} -EndGlobalSection - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_platforms.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_platforms.lua deleted file mode 100644 index a9d693b7e8..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_platforms.lua +++ /dev/null @@ -1,804 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_platforms.lua --- Test the Visual Studio 2005-2010 platform mapping blocks. --- Copyright (c) 2009-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_platforms") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2008") - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - language "C++" - end - - local function prepare(lang) - filter {} - uuid "C9135098-6047-8142-B10E-D27E7F73FCB3" - wks = test.getWorkspace(wks) - sln2005.configurationPlatforms(wks) - end - - --- --- Verify the default settings, when no platforms or architectures are used. --- - - function suite.onSingleCpp_noPlatforms_noArchs() - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.Build.0 = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.Build.0 = Release|Win32 -EndGlobalSection - ]] - end - - function suite.onSingleCs_noPlatforms_noArchs() - project "MyProject" - language "C#" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_noPlatforms_noArchs() - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Mixed Platforms = Debug|Mixed Platforms - Release|Mixed Platforms = Release|Mixed Platforms -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Mixed Platforms.Build.0 = Release|Win32 -EndGlobalSection - ]] - end - - --- --- If platforms are specified, use it to identify the configurations. --- - - function suite.onSingleCpp_withPlatforms_noArchs() - platforms { "DLL", "Static" } - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.Build.0 = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Debug Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.Build.0 = Debug Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.Build.0 = Release Static|Win32 -EndGlobalSection - ]] - end - - function suite.onSingleCs_withPlatforms_noArchs() - platforms { "DLL", "Static" } - project "MyProject" - language "C#" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Debug DLL|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.Build.0 = Debug DLL|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Debug Static|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.Build.0 = Debug Static|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release Static|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.Build.0 = Release Static|Any CPU -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_withPlatforms_noArchs() - platforms { "DLL", "Static" } - - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|DLL.ActiveCfg = Debug DLL|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|DLL.Build.0 = Debug DLL|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Static.ActiveCfg = Debug Static|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Static.Build.0 = Debug Static|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|DLL.ActiveCfg = Release DLL|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|DLL.Build.0 = Release DLL|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Static.ActiveCfg = Release Static|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Static.Build.0 = Release Static|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.Build.0 = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Debug Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.Build.0 = Debug Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.Build.0 = Release Static|Win32 -EndGlobalSection - ]] - end - - --- --- If the projects contained by the solution specify a consistent --- architecture, bubble that up. --- - - function suite.onSingleCpp_noPlatforms_singleArch() - project "MyProject" - architecture "x86_64" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.ActiveCfg = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.Build.0 = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.ActiveCfg = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.Build.0 = Release|x64 -EndGlobalSection - ]] - end - - function suite.onSingleCs_noPlatforms_singleArch() - project "MyProject" - architecture "x86_64" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.ActiveCfg = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.Build.0 = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.ActiveCfg = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.Build.0 = Release|x64 -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_noPlatforms_singleArch() - architecture "x86_64" - - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x64.ActiveCfg = Debug|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x64.Build.0 = Debug|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x64.ActiveCfg = Release|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x64.Build.0 = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.ActiveCfg = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.Build.0 = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.ActiveCfg = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.Build.0 = Release|x64 -EndGlobalSection - ]] - end - - --- --- If the projects contain a mix of architectures, handle that. --- - - function suite.onMixedLanguage_noPlatforms_multipleArch() - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - architecture "x86_64" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Mixed Platforms = Debug|Mixed Platforms - Release|Mixed Platforms = Release|Mixed Platforms -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Mixed Platforms.Build.0 = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Mixed Platforms.Build.0 = Release|x64 -EndGlobalSection - ]] - end - - --- --- Use the right variant for 32-bit architectures. --- - - function suite.onSingleCpp_noPlatforms_x86() - architecture "x86" - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.Build.0 = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.Build.0 = Release|Win32 -EndGlobalSection - ]] - end - - function suite.onSingleCs_noPlatforms_x86() - architecture "x86" - project "MyProject" - language "C#" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.ActiveCfg = Debug|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.Build.0 = Debug|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.ActiveCfg = Release|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.Build.0 = Release|x86 -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_noPlatforms_x86() - architecture "x86" - - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x86.ActiveCfg = Debug|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x86.Build.0 = Debug|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x86.ActiveCfg = Release|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x86.Build.0 = Release|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.ActiveCfg = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.Build.0 = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.Build.0 = Release|Win32 -EndGlobalSection - ]] - end - - --- --- If both platforms and architectures are used, break it all out correctly. --- - - function suite.onSingleCpp_withPlatforms_withArchs() - platforms { "DLL32", "DLL64" } - filter "platforms:DLL32" - architecture "x86" - filter "platforms:DLL64" - architecture "x86_64" - - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL32 = Debug|DLL32 - Debug|DLL64 = Debug|DLL64 - Release|DLL32 = Release|DLL32 - Release|DLL64 = Release|DLL64 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL32.ActiveCfg = Debug DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL32.Build.0 = Debug DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL64.ActiveCfg = Debug DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL64.Build.0 = Debug DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL32.ActiveCfg = Release DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL32.Build.0 = Release DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL64.ActiveCfg = Release DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL64.Build.0 = Release DLL64|x64 -EndGlobalSection - ]] - end - - function suite.onSingleCs_withPlatforms_withArchs() - platforms { "DLL32", "DLL64" } - filter "platforms:DLL32" - architecture "x86" - filter "platforms:DLL64" - architecture "x86_64" - - project "MyProject" - language "C#" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL32 = Debug|DLL32 - Debug|DLL64 = Debug|DLL64 - Release|DLL32 = Release|DLL32 - Release|DLL64 = Release|DLL64 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL32.ActiveCfg = Debug DLL32|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL32.Build.0 = Debug DLL32|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL64.ActiveCfg = Debug DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL64.Build.0 = Debug DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL32.ActiveCfg = Release DLL32|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL32.Build.0 = Release DLL32|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL64.ActiveCfg = Release DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL64.Build.0 = Release DLL64|x64 -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_withPlatforms_withArchs() - platforms { "DLL32", "DLL64" } - filter "platforms:DLL32" - architecture "x86" - filter "platforms:DLL64" - architecture "x86_64" - - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL32 = Debug|DLL32 - Debug|DLL64 = Debug|DLL64 - Release|DLL32 = Release|DLL32 - Release|DLL64 = Release|DLL64 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|DLL32.ActiveCfg = Debug DLL32|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|DLL32.Build.0 = Debug DLL32|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|DLL64.ActiveCfg = Debug DLL64|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|DLL64.Build.0 = Debug DLL64|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|DLL32.ActiveCfg = Release DLL32|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|DLL32.Build.0 = Release DLL32|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|DLL64.ActiveCfg = Release DLL64|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|DLL64.Build.0 = Release DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL32.ActiveCfg = Debug DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL32.Build.0 = Debug DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL64.ActiveCfg = Debug DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL64.Build.0 = Debug DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL32.ActiveCfg = Release DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL32.Build.0 = Release DLL32|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL64.ActiveCfg = Release DLL64|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL64.Build.0 = Release DLL64|x64 -EndGlobalSection - ]] - end - - - function suite.onSingleCs_withPlatformsMatchingArch_noArchs() - platforms { "x86", "x86_64" } - project "MyProject" - language "C#" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.ActiveCfg = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.Build.0 = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.ActiveCfg = Debug|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.Build.0 = Debug|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.ActiveCfg = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.Build.0 = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.ActiveCfg = Release|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.Build.0 = Release|x86 -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_withPlatformsMatchingArch_noArchs() - platforms { "x86", "x86_64" } - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x64.ActiveCfg = Debug|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x64.Build.0 = Debug|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x86.ActiveCfg = Debug|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|x86.Build.0 = Debug|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x64.ActiveCfg = Release|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x64.Build.0 = Release|x64 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x86.ActiveCfg = Release|x86 - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|x86.Build.0 = Release|x86 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.ActiveCfg = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x64.Build.0 = Debug|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.ActiveCfg = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|x86.Build.0 = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.ActiveCfg = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x64.Build.0 = Release|x64 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|x86.Build.0 = Release|Win32 -EndGlobalSection - ]] - end - - --- --- Check the handling of the "Any CPU" .NET architecture. --- - - function suite.onSingleCpp_withAnyCpuPlatform() - platforms { "Any CPU" } - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.ActiveCfg = Debug Any CPU|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.Build.0 = Debug Any CPU|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.ActiveCfg = Release Any CPU|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.Build.0 = Release Any CPU|Win32 -EndGlobalSection - ]] - end - - function suite.onSingleCs_withAnyCpuPlatform() - platforms { "Any CPU" } - project "MyProject" - language "C#" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection - ]] - end - - function suite.onMixedLanguage_withAnyCpuPlatform() - platforms { "Any CPU" } - project "MyProject1" - language "C#" - uuid "52AD9329-0D74-4F66-A213-E649D8CCD737" - - project "MyProject2" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Debug|Any CPU.Build.0 = Debug|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Any CPU.ActiveCfg = Release|Any CPU - {52AD9329-0D74-4F66-A213-E649D8CCD737}.Release|Any CPU.Build.0 = Release|Any CPU - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.ActiveCfg = Debug Any CPU|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.Build.0 = Debug Any CPU|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.ActiveCfg = Release Any CPU|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Any CPU.Build.0 = Release Any CPU|Win32 -EndGlobalSection - ]] - end - - ---- --- Check the sort order of the configurations. ---- - - function suite.sortsByBuildCfgAndPlatform() - platforms { "Windows", "Linux" } - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Linux = Debug|Linux - Debug|Windows = Debug|Windows - Release|Linux = Release|Linux - Release|Windows = Release|Windows -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Linux.ActiveCfg = Debug Linux|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Linux.Build.0 = Debug Linux|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Windows.ActiveCfg = Debug Windows|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Windows.Build.0 = Debug Windows|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Linux.ActiveCfg = Release Linux|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Linux.Build.0 = Release Linux|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Windows.ActiveCfg = Release Windows|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Windows.Build.0 = Release Windows|Win32 -EndGlobalSection - ]] - end - - ---- --- Configurations with a kind of "None" should be excluded from the build. ---- - - function suite.excludesFromBuild_onNone() - project "MyProject" - kind "None" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.ActiveCfg = Release|Win32 -EndGlobalSection - ]] - end - - ---- --- Excluded configurations should write an ActiveCfg entry, pointing to some --- arbitrary project configuration, and skip the Build.0 entry. Try to match --- the available project configurations as closely as possible. ---- - - function suite.onExcludedBuildCfg() - platforms { "DLL", "Static" } - project "MyProject" - removeconfigurations { "Debug" } - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Release Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.Build.0 = Release Static|Win32 -EndGlobalSection - ]] - end - - - function suite.onBuildCfgExcludedByFlag() - platforms { "DLL", "Static" } - project "MyProject" - filter "configurations:Debug" - flags "ExcludeFromBuild" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Debug Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.Build.0 = Release Static|Win32 -EndGlobalSection - ]] - end - - - function suite.onExcludedPlatform() - platforms { "DLL", "Static" } - project "MyProject" - removeplatforms { "Static" } - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.Build.0 = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release DLL|Win32 -EndGlobalSection - ]] - end - - - function suite.onPlatformExcludedByFlag() - platforms { "DLL", "Static" } - project "MyProject" - filter "platforms:Static" - flags "ExcludeFromBuild" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|DLL = Debug|DLL - Debug|Static = Debug|Static - Release|DLL = Release|DLL - Release|Static = Release|Static -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.ActiveCfg = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|DLL.Build.0 = Debug DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Static.ActiveCfg = Debug Static|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.ActiveCfg = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|DLL.Build.0 = Release DLL|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Static.ActiveCfg = Release Static|Win32 -EndGlobalSection - ]] - end - - function suite.onExcludedBuildCfg_noPlatforms() - project "MyProject" - removeconfigurations { "Debug" } - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Win32.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.ActiveCfg = Release|Win32 - {C9135098-6047-8142-B10E-D27E7F73FCB3}.Release|Win32.Build.0 = Release|Win32 -EndGlobalSection - ]] - end - - ---- --- Check that when a default platform is specified it is written in a separate --- configuration block so that Visual Studio picks it up as default. ---- - - function suite.onDefaultPlatforms() - platforms { "x86", "x86_64" } - defaultplatform "x86_64" - project "MyProject" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 -EndGlobalSection -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 -EndGlobalSection - ]] - end - ---- --- Check that when a shared items project is specified that no entries are added --- to the project configuration platforms ---- - - function suite.onSharedItemsProject() - p.action.set("vs2013") - project "MyProject" - kind "SharedItems" - prepare() - test.capture [[ -GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution -EndGlobalSection - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_projects.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_projects.lua deleted file mode 100644 index 04eaeca848..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_projects.lua +++ /dev/null @@ -1,198 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_projects.lua --- Validate generation of Visual Studio 2005+ solution project entries. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_projects") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2005") - p.escaper(p.vstudio.vs2005.esc) - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - language "C++" - kind "ConsoleApp" - end - - local function prepare() - sln2005.reorderProjects(wks) - sln2005.projects(wks) - end - - --- --- Check the format of a C/C++ project entry --- - - function suite.structureIsOkay_onCpp() - project "MyProject" - prepare() - test.capture [[ -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject", "MyProject.vcproj", "{42B5DBC6-AE1F-903D-F75D-41E363076E92}" -EndProject - ]] - end - - --- --- Check the format of a VS2005/V2008 C# project entry --- - - function suite.structureIsOkay_onCSharp() - project "MyProject" - language "C#" - prepare() - test.capture [[ -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject", "MyProject.csproj", "{42B5DBC6-AE1F-903D-F75D-41E363076E92}" -EndProject - ]] - end - - --- --- Project names should be XML escaped. --- - - function suite.projectNamesAreEscaped() - project 'My "x64" Project' - filename 'My "x64" Project' - prepare() - test.capture [[ -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "My "x64" Project", "My "x64" Project.vcproj", "{48E4ED8F-34DD-0CE2-5D0F-F2664967ECED}" -EndProject - ]] - end - - --- --- Check the structure of a top-level group entry. --- - - function suite.onSingleTopLevelGroup() - group "Alpha" - project "MyProject" - prepare() - test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{D2C41116-3E7A-8A0B-C76E-84E23323810F}" -EndProject - ]] - end - - - --- --- Nested groups should be listed individually. --- - - function suite.OnNestedGroups() - group "Alpha/Beta" - project "MyProject" - prepare() - test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{D2C41116-3E7A-8A0B-C76E-84E23323810F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{BD0520A9-A9FE-3EFB-D230-2480BE881E07}" -EndProject - ]] - end - - --- --- If a startup project is specified, it should appear first in the list. --- - - function suite.startupProjectFirst_onNoGroups() - startproject "MyProject2" - project "MyProject1" - project "MyProject2" - project "MyProject3" - prepare() - test.capture [[ -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject2", "MyProject2.vcproj", "{B45D52A2-A015-94EF-091D-6D4BF5F32EE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject3", "MyProject3.vcproj", "{B55D52A2-A115-94EF-0A1D-6D4BF6F32EE0}" -EndProject - ]] - end - - --- --- If the startup project is contained by a group, that group (and any parent --- groups) should appear first in the list. --- - - function suite.startupProjectFirst_onSingleGroup() - startproject "MyProject2" - project "MyProject1" - group "Zed" - project "MyProject2" - group "Beta" - project "MyProject3" - prepare() - test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{2FCAF67E-9B34-ABF5-E472-5C9B501C894A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject2", "MyProject2.vcproj", "{B45D52A2-A015-94EF-091D-6D4BF5F32EE0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{68E9C25D-54A1-04AB-BDA8-DD06A97F9F9B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject3", "MyProject3.vcproj", "{B55D52A2-A115-94EF-0A1D-6D4BF6F32EE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" -EndProject - ]] - end - - function suite.startupProjectFirst_onMultipleGroups() - startproject "MyProject2" - project "MyProject1" - group "Zed" - project "MyProject3" - group "Alpha/Beta" - project "MyProject2" - prepare() - test.capture [[ -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Alpha", "Alpha", "{D2C41116-3E7A-8A0B-C76E-84E23323810F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Beta", "Beta", "{BD0520A9-A9FE-3EFB-D230-2480BE881E07}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject2", "MyProject2.vcproj", "{B45D52A2-A015-94EF-091D-6D4BF5F32EE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject1", "MyProject1.vcproj", "{B35D52A2-9F15-94EF-081D-6D4BF4F32EE0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zed", "Zed", "{2FCAF67E-9B34-ABF5-E472-5C9B501C894A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject3", "MyProject3.vcproj", "{B55D52A2-A115-94EF-0A1D-6D4BF6F32EE0}" -EndProject - ]] - end - - --- --- Environment variables in the form of $(...) need to be translated --- to old school %...% DOS style. --- - - function suite.translatesEnvironmentVars() - externalproject "MyProject" - location "$(SDK_LOCATION)/MyProject" - uuid "30A1B994-C2C6-485F-911B-FB4674366DA8" - kind "SharedLib" - prepare() - test.capture [[ -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyProject", "%SDK_LOCATION%\MyProject\MyProject.vcproj", "{30A1B994-C2C6-485F-911B-FB4674366DA8}" -EndProject - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_sections.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_sections.lua deleted file mode 100644 index 9f2f2f37c1..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_sections.lua +++ /dev/null @@ -1,54 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_sections.lua --- Validate generation of Visual Studio 2005+ solution section entries. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_sections") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks - - function suite.setup() - _MAIN_SCRIPT = "c:\\test\\premake5.lua" - - p.escaper(p.vstudio.vs2005.esc) - wks = workspace("MyWorkspace") - wks.location = "c:\\test\\build" - - configurations { "Debug", "Release" } - language "C++" - kind "ConsoleApp" - end - --- --- Test the editorintegration switch. --- - function suite.extensibilityGlobalsOn() - editorintegration "On" - - project "MyProject" - sln2005.extensibilityGlobals(wks) - - test.capture [[ -GlobalSection(ExtensibilityGlobals) = postSolution -]] - end - - function suite.extensibilityGlobalsOff() - editorintegration "Off" - - project "MyProject" - sln2005.extensibilityGlobals(wks) - - local res = p.captured() - if (#res > 0) then - test.fail("no editorintegration output was expected"); - end - end diff --git a/build/premake/premake5/modules/vstudio/tests/sln2005/test_shared_projects.lua b/build/premake/premake5/modules/vstudio/tests/sln2005/test_shared_projects.lua deleted file mode 100644 index 158f0adb75..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/sln2005/test_shared_projects.lua +++ /dev/null @@ -1,72 +0,0 @@ --- --- tests/actions/vstudio/sln2005/test_shared_projects.lua --- Validate generation of Visual Studio 2005+ SharedMSBuildProjectFiles entries. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_sln2005_shared_projects") - local sln2005 = p.vstudio.sln2005 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2013") - p.escaper(p.vstudio.vs2005.esc) - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - language "C++" - end - - local function prepare() - sln2005.reorderProjects(wks) - sln2005.sharedProjects(wks) - end - --- --- Test the shared projects listing --- - - function suite.noSharedProjects() - project "MyProject" - kind "ConsoleApp" - prepare() - - test.isemptycapture() - end - - - function suite.onSharedProjects() - project "MyProject" - kind "SharedItems" - prepare() - - test.capture [[ -GlobalSection(SharedMSBuildProjectFiles) = preSolution -MyProject.vcxitems*{42b5dbc6-ae1f-903d-f75d-41e363076e92}*SharedItemsImports = 9 -EndGlobalSection - ]] - end - - - function suite.onLinkedSharedProjects() - project "MyProject" - kind "SharedItems" - - project "MyProject2" - kind "ConsoleApp" - links { "MyProject" } - prepare() - - test.capture [[ -GlobalSection(SharedMSBuildProjectFiles) = preSolution -MyProject.vcxitems*{42b5dbc6-ae1f-903d-f75d-41e363076e92}*SharedItemsImports = 9 -MyProject.vcxitems*{b45d52a2-a015-94ef-091d-6d4bf5f32ee0}*SharedItemsImports = 4 -EndGlobalSection - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_assembly_refs.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_assembly_refs.lua deleted file mode 100644 index 957e0160a5..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_assembly_refs.lua +++ /dev/null @@ -1,86 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_assembly_refs.lua --- Validate managed assembly references in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs200x_assembly_refs") - local vc200x = p.vstudio.vc200x - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - wks = test.createWorkspace() - clr "On" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - vc200x.assemblyReferences(prj) - end - - --- --- If there are no managed assemblies listed in links, output nothing. --- - - function suite.noOutput_onNoAssemblies() - prepare() - test.isemptycapture() - end - - --- --- To distinguish between managed and unmanaged libraries, the ".dll" --- extension must be explicitly supplied. --- - - function suite.listsAssemblies() - links { "System.dll", "System.Data.dll" } - prepare() - test.capture [[ - - - ]] - end - - --- --- Any unmanaged libraries included in the list should be ignored. --- - - function suite.ignoresUnmanagedLibraries() - links { "m", "System.dll" } - prepare() - test.capture [[ - - ]] - end - - --- --- Local (non-system) assemblies can be referenced with a relative path. --- - - function suite.canReferenceLocalAssembly() - links { "../nunit.framework.dll" } - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_build_steps.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_build_steps.lua deleted file mode 100644 index c7fc7aafea..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_build_steps.lua +++ /dev/null @@ -1,76 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_build_steps.lua --- Test generation of custom build step elements. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs200x_build_steps") - local vc200x = p.vstudio.vc200x - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - p.escaper(p.vstudio.vs2005.esc) - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc200x.VCPreBuildEventTool(cfg) - end - - ---- --- Should output empty element wrapper on no build steps. ---- - - function suite.noCommandLine_onNoBuildSteps() - prepare() - test.capture [[ - - ]] - end - - ---- --- Should insert CR-LF at end of each command line. ---- - - function suite.addsCRLF() - prebuildcommands { "command_1", "command_2" } - prepare() - test.capture [[ - - ]] - end - - - --- --- If a message is specified, it should be included. --- - - function suite.onMessageProvided() - prebuildcommands { "command1" } - prebuildmessage "Pre-building..." - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_compiler_block.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_compiler_block.lua deleted file mode 100644 index 9fd3c56b54..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_compiler_block.lua +++ /dev/null @@ -1,659 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_compiler_block.lua --- Validate generation the VCCLCompiler element in Visual Studio 200x C/C++ projects. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs200x_compiler_block") - local vc200x = p.vstudio.vc200x - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc200x.VCCLCompilerTool(cfg) - end - - --- --- Verify the basic structure of the compiler block with no flags or settings. --- - - function suite.looksGood_onDefaultSettings() - prepare() - test.capture [[ - - ]] - end - - --- --- If include directories are specified, the should be added. --- - - - function suite.additionalIncludeDirs_onIncludeDirs() - includedirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the handling of the Symbols in conjunction with the Optimize flag. --- The release runtime library must be used. --- - - function suite.looksGood_onSymbolsAndOptimizeFlags() - symbols "On" - optimize "On" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the handling of the C7 debug information format. --- - - function suite.looksGood_onC7DebugFormat() - symbols "On" - debugformat "C7" - prepare() - test.capture [[ - - ]] - end - - ---- --- Test precompiled header handling; the header should be treated as --- a plain string value, with no path manipulation applied, since it --- needs to match the value of the #include statement used in the --- project code. ---- - - function suite.compilerBlock_OnPCH() - location "build" - pchheader "include/common.h" - pchsource "source/common.cpp" - prepare() - test.capture [[ - - ]] - end - - --- --- Floating point flag tests --- - - function suite.compilerBlock_OnFpFast() - floatingpoint "Fast" - prepare() - test.capture [[ - - ]] - end - - function suite.compilerBlock_OnFpStrict() - floatingpoint "Strict" - prepare() - test.capture [[ - - ]] - end - - --- --- Check that the "minimal rebuild" flag is applied correctly. --- - - function suite.minimalRebuildFlagsSet_onMinimalRebuildAndSymbols() - flags { "NoMinimalRebuild" } - symbols "On" - prepare() - test.capture [[ - - ]] - end - --- --- Check that the "no buffer security check" flag is applied correctly. --- - - function suite.noBufferSecurityFlagSet_onBufferSecurityCheck() - flags { "NoBufferSecurityCheck" } - prepare() - test.capture [[ - - ]] - end - --- --- Check that the CompileAs value is set correctly for C language projects. --- - - function suite.compileAsSet_onC() - language "C" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the correct runtime library is used when symbols are enabled. --- - - function suite.runtimeLibraryIsDebug_onSymbolsNoOptimize() - symbols "On" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the correct warnings settings are used when extra warnings are enabled. --- - - function suite.runtimeLibraryIsDebug_onExtraWarnings() - warnings "Extra" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the correct warnings settings are used when FatalWarnings are enabled. --- - - function suite.runtimeLibraryIsDebug_onFatalWarnings() - flags { "FatalWarnings" } - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the correct warnings settings are used when no warnings are enabled. --- - - function suite.runtimeLibraryIsDebug_onNoWarnings_whichDisablesAllOtherWarningsFlags() - flags { "FatalWarnings" } - warnings "Off" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the correct Detect64BitPortabilityProblems settings are used when _ACTION < "VS2008". --- - - function suite._64BitPortabilityOn_onVS2005() - p.action.set("vs2005") - prepare() - test.capture [[ - - ]] - end - - function suite._64BitPortabilityOff_onVS2005_andCLR() - p.action.set("vs2005") - clr "On" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the correct warnings settings are used when no warnings are enabled. --- - - function suite.runtimeLibraryIsDebug_onVS2005_NoWarnings() - p.action.set("vs2005") - warnings "Off" - prepare() - test.capture [[ - - ]] - end - --- --- Check handling of forced includes. --- - - function suite.forcedIncludeFiles() - forceincludes { "stdafx.h", "include/sys.h" } - prepare() - test.capture [[ - - ]] - end - - --- --- If a platform is specified, it should be included in the platform name. --- - - function suite.usesWin32_onX86() - workspace("MyWorkspace") - platforms { "x86" } - prepare() - test.capture [[ - - ]] - end - - function suite.defaultSettings_onNone() - kind "None" - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_debug_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_debug_settings.lua deleted file mode 100644 index 7ffd087cf3..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_debug_settings.lua +++ /dev/null @@ -1,137 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_debugdir.lua --- Validate handling of the working directory for debugging. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs200x_debugdir") - local vc200x = p.vstudio.vc200x - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - p.escaper(p.vstudio.vs2005.esc) - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc200x.debugSettings(cfg) - end - - --- --- If no debug settings are specified, an empty block should be generated. --- - - function suite.emptyBlock_onNoSettings() - prepare() - test.isemptycapture() - end - - --- --- If a debug command is provided, it should be specified relative to --- the project. --- - - function suite.debugCommand_onRelativePath() - location "build" - debugcommand "bin/emulator.exe" - prepare() - test.capture [[ -Command="..\bin\emulator.exe" - ]] - end - - --- --- If a working directory is provided, it should be specified relative to --- the project. --- - - function suite.workingDir_onRelativePath() - location "build" - debugdir "bin/debug" - prepare() - test.capture [[ -WorkingDirectory="..\bin\debug" - ]] - end - - --- --- Make sure debug arguments are being written. --- - - function suite.commandArguments_onDebugArgs() - debugargs { "arg1", "arg2" } - prepare() - test.capture [[ -CommandArguments="arg1 arg2" - ]] - end - - --- --- Make sure environment variables are being written. --- - - function suite.environmentVarsSet_onDebugEnvs() - debugenvs { "key=value" } - prepare() - test.capture [[ -Environment="key=value" - ]] - end - - --- --- Make sure quotes around environment variables are properly escaped. --- - - function suite.environmentVarsEscaped_onQuotes() - debugenvs { 'key="value"' } - prepare() - test.capture [[ -Environment="key="value"" - ]] - end - - --- --- If multiple environment variables are specified, make sure they get --- separated properly. --- - - function suite.environmentVars_onMultipleValues() - debugenvs { "key=value", "foo=bar" } - prepare() - test.capture [[ -Environment="key=value foo=bar" - ]] - end - - --- --- Make sure that environment merging is turned off if the build --- flag is set. --- - - function suite.environmentVarsSet_onDebugEnvsAndDebugEnvsDontMerge() - debugenvs { "key=value" } - flags { "DebugEnvsDontMerge" } - prepare() - test.capture [[ -Environment="key=value" -EnvironmentMerge="false" - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_excluded_configs.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_excluded_configs.lua deleted file mode 100644 index b40499f582..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_excluded_configs.lua +++ /dev/null @@ -1,75 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_excluded_configs.lua --- Check handling of configurations which have been excluded from the build. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs200x_excluded_configs") - local vc200x = p.vstudio.vc200x - local config = p.config - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - platforms { "Zeus", "Ares" } - language "C++" - - prj = project("MyProject") - kind "ConsoleApp" - links { "MyProject2", "MyProject3" } - - project("MyProject2") - kind "StaticLib" - - project("MyProject3") - kind "StaticLib" - removeplatforms { "Ares" } - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc200x.VCLinkerTool(cfg, config.toolset(cfg)) - end - - - --- --- If a sibling is included in one configuration and excluded from --- another, the included configuration should link as normal. --- - - function suite.normalLink_onIncludedConfig() - prepare("Zeus") - test.capture [[ - block in Visual Studio 200x projects. --- Copyright (c) 2009-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs200x_files") - local vc200x = p.vstudio.vc200x - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - p.escaper(p.vstudio.vs2005.esc) - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - vc200x.files(prj) - end - - --- --- Check the structure of an individual file element. --- - - function suite.file_onDefaults() - files { "hello.cpp" } - prepare() - test.capture [[ - - - - ]] - end - - --- --- Check the structure of a file contained in a folder. --- - - function suite.file_onSingleLevelFolder() - files { "src/hello.cpp", "so_long.cpp" } - prepare() - test.capture [[ - - - - - - - - ]] - end - - --- --- Check the structure of a file contained in multiple folders. --- - - function suite.file_onMultipleFolderLevels() - files { "src/greetings/hello.cpp", "so_long.cpp" } - prepare() - test.capture [[ - - - - - - - - - - ]] - end - - --- --- Check the structure of a file with a virtual path. --- - - function suite.file_onVpath() - files { "src/hello.cpp", "so_long.h" } - vpaths { ["Source Files"] = "**.cpp" } - prepare() - test.capture [[ - - - - - - ]] - end - - --- --- Make sure that the special "build a C code" logic only gets triggered --- by actual C source code files. --- - - function suite.file_markedAsNonBuildable_onSupportFiles() - language "C" - files { "hello.lua" } - prepare() - test.capture [[ - - - - ]] - end - - --- --- When a C code file is listed in a C++ project, it should still be --- compiled as C (and not C++), and vice versa. --- - - function suite.compileAsSet_onCFileInCppProject() - language "C++" - files { "hello.c" } - prepare() - test.capture [[ - - - - - - - - - - - - - - - - - ]] - end - - -- make sure compileas is still omitted when it matches the language. - function suite.onCompileAs_C_as_CPP_in_CPP() - language "C++" - files { "hello.c" } - filter {"files:hello.c"} - compileas "C++" - prepare() - test.capture [[ - - - - - - - - - - - ]] - end - - function suite.onCompileAs_C_as_CPP_release() - language "C" - files { "hello.c" } - filter {"files:hello.c", "configurations:release"} - compileas "C++" - prepare() - test.capture [[ - - - - - - - - ]] - end - - function suite.onCompileAs_CPP_as_C() - language "C++" - files { "hello.cpp" } - filter {"files:hello.cpp"} - compileas "C" - prepare() - test.capture [[ - - - - - - - - - - - ]] - end - - function suite.onCompileAs_CPP_as_C_release() - language "C++" - files { "hello.cpp" } - filter {"files:hello.cpp", "configurations:release"} - compileas "C" - prepare() - test.capture [[ - - - - - - - - ]] - end - - --- --- A PCH source file should be marked as such. --- - - function suite.usePrecompiledHeadersSet_onPchSource() - files { "afxwin.cpp" } - pchsource "afxwin.cpp" - prepare() - test.capture [[ - - - - - - - - - - - - - ]] - end - - function suite.excludedFromBuild_onExcludeFlag() - files { "hello.cpp" } - filter "files:hello.cpp" - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - - - - - - - - ]] - end - - function suite.excludedFromBuild_onCustomBuildRule_excludedFile() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - filter "Debug" - removefiles { "hello.cg" } - prepare() - test.capture [[ - - - - - - - ]] - end - - function suite.excludedFromBuild_onCustomBuildRule_excludeFlag() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - - - - - ]] - end - - --- --- If a custom build rule is supplied, the custom build tool settings should be used. --- - - function suite.customBuildTool_onBuildRule() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling $(InputFile)" - buildcommands { - 'cxc -c "$(InputFile)" -o "$(IntDir)/$(InputName).xo"', - 'c2o -c "$(IntDir)/$(InputName).xo" -o "$(IntDir)/$(InputName).obj"' - } - buildoutputs { "$(IntDir)/$(InputName).obj" } - prepare() - test.capture [[ - - - - - - ]] - end - - function suite.customBuildTool_onBuildRuleMultipleBuildOutputs() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling $(InputFile)" - buildcommands { - 'cp "$(InputFile)" "$(IntDir)/$(InputName).a"', - 'cp "$(InputFile)" "$(IntDir)/$(InputName).b"' - } - buildoutputs { "$(IntDir)/$(InputName).a", "$(IntDir)/$(InputName).b" } - prepare() - test.capture [[ - - - - - - ]] - end - - function suite.customBuildTool_onBuildRuleWithTokens() - files { "hello.x" } - objdir "../tmp/%{cfg.name}" - filter "files:**.x" - buildmessage "Compiling $(InputFile)" - buildcommands { - 'cxc -c %{file.relpath} -o %{cfg.objdir}/%{file.basename}.xo', - 'c2o -c %{cfg.objdir}/%{file.basename}.xo -o %{cfg.objdir}/%{file.basename}.obj' - } - buildoutputs { "%{cfg.objdir}/%{file.basename}.obj" } - prepare() - test.capture [[ - - - - - - ]] - end - - function suite.customBuildTool_onBuildRuleWithAdditionalInputs() - files { "hello.x" } - filter "files:**.x" - buildmessage "Compiling $(InputFile)" - buildcommands { - 'cxc -c "$(InputFile)" -o "$(IntDir)/$(InputName).xo"', - 'c2o -c "$(IntDir)/$(InputName).xo" -o "$(IntDir)/$(InputName).obj"' - } - buildoutputs { "$(IntDir)/$(InputName).obj" } - buildinputs { "common.x.inc", "common.x.inc2" } - prepare() - test.capture [[ - - - - - - ]] - end - - --- --- If two files at different folder levels have the same name, a different --- object file name should be used for each. --- - - function suite.uniqueObjectNames_onSourceNameCollision() - files { "hello.cpp", "greetings/hello.cpp" } - prepare() - test.capture [[ - - - - - - - - - - - - - - ]] - end - - --- --- Check handling of per-file forced includes. --- - - function suite.forcedIncludeFiles() - files { "hello.cpp" } - filter "files:**.cpp" - forceincludes { "../include/force1.h", "../include/force2.h" } - - prepare() - test.capture [[ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]] - end - - --- --- Verify the basic structure of windowed app linker block. --- - - function suite.onWindowedApp() - kind "WindowedApp" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the basic structure of shared library linker block. --- - - function suite.onSharedLib() - kind "SharedLib" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the basic structure of static library linker block. --- - - function suite.onStaticLib() - kind "StaticLib" - prepare() - test.capture [[ - - ]] - end - - --- --- Verify the handling of the Symbols flag. --- - - function suite.onSymbolsFlag() - symbols "On" - prepare() - test.capture [[ - - ]] - end - - --- --- If a module definition file is present, make sure it is specified. --- - - function suite.onModuleDefinitionFile() - files { "MyProject.def" } - prepare() - test.capture [[ - - ]] - end - - --- --- Links to system libraries should appear in the list, properly decorated. --- - - function suite.includesSystemLibs() - links { "GL", "GLU" } - prepare() - test.capture [[ - - ]] - end - - --- --- If manifest file(s) are present, they should be listed. --- - - function suite.listsFiles_onManifests() - files { "hello.c", "project1.manifest", "goodbye.c", "project2.manifest" } - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_nmake_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_nmake_settings.lua deleted file mode 100644 index 5274d07042..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_nmake_settings.lua +++ /dev/null @@ -1,123 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_nmake_settings.lua --- Validate generation the VCNMakeTool element in Visual Studio 200x C/C++ projects. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs200x_nmake_settings") - local vc200x = p.vstudio.vc200x - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2005") - p.escaper(p.vstudio.vs2005.esc) - wks, prj = test.createWorkspace() - kind "Makefile" - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc200x.VCNMakeTool(cfg) - end - - --- --- Verify the basic structure of the compiler block with no flags or settings. --- - - function suite.onDefaultSettings() - prepare() - test.capture [[ - - ]] - end - - --- --- Make sure the target file extension is included. --- - - function suite.usesTargetExtension() - targetextension ".exe" - prepare() - test.capture [[ - - - - ]] - end - - --- --- If multiple configurations use the same architecture, it should --- still only be listed once. --- - - function suite.architectureListedOnlyOnce_onMultipleConfigurations() - platforms { "Static", "Dynamic" } - prepare() - test.capture [[ - - - - ]] - end - - --- --- If multiple architectures are used, they should all be listed. --- - - function suite.allArchitecturesListed_onMultipleArchitectures() - platforms { "x86", "x86_64" } - prepare() - test.capture [[ - - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_project.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_project.lua deleted file mode 100644 index d0d312b345..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_project.lua +++ /dev/null @@ -1,214 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_project.lua --- Validate generation of the opening element. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs200x_project") - local vc200x = p.vstudio.vc200x - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - wks = test.createWorkspace() - uuid "AE61726D-187C-E440-BD07-2556188A6565" - end - - local function prepare() - prj = test.getproject(wks, 1) - vc200x.visualStudioProject(prj) - end - - --- --- Verify the version numbers for each action. --- - - function suite.hasCorrectVersion_on2005() - p.action.set("vs2005") - prepare() - test.capture [[ - - ]] - end - - --- --- Use the correct keyword for Managed C++ projects. --- - - function suite.keywordIsCorrect_onManagedC() - clr "On" - prepare() - test.capture [[ - - ]] - end - - --- --- Include Keyword and RootNamespace for mixed system projects. --- - - function suite.includeKeyword_onMixedConfigs() - filter "Debug" - system "Windows" - filter "Release" - system "Linux" - prepare() - test.capture [[ - - ]] - end - - --- --- Makefile projects set new keyword. It should also drop the root --- namespace, but I need to figure out a better way to test for --- empty configurations in the project first. --- - - function suite.keywordIsCorrect_onMakefile() - kind "Makefile" - prepare() - test.capture [[ - - ]] - end - - function suite.keywordIsCorrect_onNone() - kind "None" - prepare() - test.capture [[ - - ]] - end - - ---- --- Makefile projects which do not support all of the solution configurations --- add back the RootNamespace element. ---- - - function suite.keywordIsCorrect_onMakefileWithMixedConfigs() - removeconfigurations { "Release" } - kind "Makefile" - prepare() - test.capture [[ - - ]] - end - - function suite.keywordIsCorrect_onNoneWithMixedConfigs() - removeconfigurations { "Release" } - kind "None" - prepare() - test.capture [[ - - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_project_refs.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_project_refs.lua deleted file mode 100644 index afa7fae2b8..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_project_refs.lua +++ /dev/null @@ -1,78 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_project_refs.lua --- Validate project references in Visual Studio 200x C/C++ projects. --- Copyright (c) 2011-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs200x_project_refs") - local vc200x = p.vstudio.vc200x - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - wks = test.createWorkspace() - uuid "00112233-4455-6677-8888-99AABBCCDDEE" - test.createproject(wks) - end - - local function prepare(platform) - prj = test.getproject(wks, 2) - vc200x.projectReferences(prj) - end - - --- --- If there are no sibling projects listed in links(), then the --- entire project references item group should be skipped. --- - - function suite.noProjectReferencesGroup_onNoSiblingReferences() - prepare() - test.isemptycapture() - end - - --- --- If a sibling project is listed in links(), an item group should --- be written with a reference to that sibling project. --- - - function suite.projectReferenceAdded_onSiblingProjectLink() - links { "MyProject" } - prepare() - test.capture [[ - - ]] - end - --- --- Project references should always be specified relative to the --- *solution* doing the referencing. Which is kind of weird, since it --- would be incorrect if the project were included in more than one --- solution file, yes? --- - - function suite.referencesAreRelative_onDifferentProjectLocation() - links { "MyProject" } - location "build/MyProject2" - project("MyProject") - location "build/MyProject" - prepare() - test.capture [[ - - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_resource_compiler.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_resource_compiler.lua deleted file mode 100644 index 00e9ce93c2..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_resource_compiler.lua +++ /dev/null @@ -1,73 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_resource_compiler.lua --- Validate generation the VCResourceCompilerTool element in Visual Studio 200x C/C++ projects. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs200x_resource_compiler") - local vc200x = p.vstudio.vc200x - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2008") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc200x.VCResourceCompilerTool(cfg) - end - - --- --- Verify the basic structure of the compiler block with no flags or settings. --- - - function suite.looksGood_onDefaultSettings() - prepare() - test.capture [[ - - ]] - end - - --- --- Both includedirs and resincludedirs should be used. --- - - function suite.usesBothIncludeAndResIncludeDirs() - includedirs { "../include" } - resincludedirs { "../res/include" } - prepare() - test.capture [[ - - ]] - end - - --- --- Test locale conversion to culture codes. --- - - function suite.culture_en_NZ() - locale "en-NZ" - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc200x/test_user_file.lua b/build/premake/premake5/modules/vstudio/tests/vc200x/test_user_file.lua deleted file mode 100644 index ef5e26680c..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc200x/test_user_file.lua +++ /dev/null @@ -1,49 +0,0 @@ --- --- tests/actions/vstudio/vc200x/test_user_file.lua --- Verify handling of empty and non-empty .user files for VC'200x. --- Copyright (c) 2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs200x_user_file") - local vc200x = p.vstudio.vc200x - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2008") - wks = test.createWorkspace() - end - - local function prepare() - local prj = test.getproject(wks, 1) - vc200x.generateUser(prj) - end - - --- --- If no debugger settings have been specified, then the .user --- file should not be written at all. --- - - function suite.noOutput_onNoSettings() - prepare() - test.isemptycapture() - end - - --- --- If a debugger setting has been specified, output. --- - - function suite.doesOutput_onDebugSettings() - debugcommand "bin/emulator.exe" - prepare() - test.hasoutput() - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_assembly_refs.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_assembly_refs.lua deleted file mode 100644 index 09592e0b52..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_assembly_refs.lua +++ /dev/null @@ -1,86 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_assembly_refs.lua --- Validate managed assembly references in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_assembly_refs") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - clr "On" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - vc2010.assemblyReferences(prj) - end - - --- --- If there are no managed assemblies listed in links, output nothing. --- - - function suite.noOutput_onNoAssemblies() - prepare() - test.isemptycapture() - end - - --- --- To distinguish between managed and unmanaged libraries, the ".dll" --- extension must be explicitly supplied. --- - - function suite.listsAssemblies() - links { "System.dll", "System.Data.dll" } - prepare() - test.capture [[ - - - - - ]] - end - - --- --- Any unmanaged libraries included in the list should be ignored. --- - - function suite.ignoresUnmanagedLibraries() - links { "m", "System.dll" } - prepare() - test.capture [[ - - - - ]] - end - - --- --- Local (non-system) assemblies can be referenced with a relative path. --- - - function suite.canReferenceLocalAssembly() - links { "../nunit.framework.dll" } - prepare() - test.capture [[ - - - ..\nunit.framework.dll - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_events.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_events.lua deleted file mode 100644 index 5516c1edde..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_events.lua +++ /dev/null @@ -1,131 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_build_events.lua --- Check generation of pre- and post-build commands for C++ projects. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vc2010_build_events") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj, cfg - - function suite.setup() - p.action.set("vs2010") - p.escaper(p.vstudio.vs2010.esc) - wks = test.createWorkspace() - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - vc2010.buildEvents(prj) - end - - --- --- If no build steps are specified, nothing should be written. --- - - function suite.noOutput_onNoEvents() - prepare() - test.isemptycapture() - end - - --- --- If one command set is used and not the other, only the one should be written. --- - - function suite.onlyOne_onPreBuildOnly() - prebuildcommands { "command1" } - prepare() - test.capture [[ - - command1 - - ]] - end - - function suite.onlyOne_onPostBuildOnly() - postbuildcommands { "command1" } - prepare() - test.capture [[ - - command1 - - ]] - end - - function suite.both_onBoth() - prebuildcommands { "command1" } - postbuildcommands { "command2" } - prepare() - test.capture [[ - - command1 - - - command2 - - ]] - end - - --- --- Multiple commands should be separated with un-escaped EOLs. --- - - function suite.splits_onMultipleCommands() - postbuildcommands { "command1", "command2" } - prepare() - test.capture ("\n\tcommand1\r\ncommand2\n\n") - end - - --- --- Multiple of the same command should be emit. --- - - function suite.onCommandTwice() - postbuildcommands { "command", "command" } - prepare() - test.capture ("\n\tcommand\r\ncommand\n\n") - end - - - --- --- Quotes should not be escaped, other special characters should. --- - - function suite.onSpecialChars() - postbuildcommands { '\' " < > &' } - prepare() - test.capture [[ - - ' " < > & - - ]] - end - - --- --- If a message is specified, it should be included. --- - - function suite.onMessageProvided() - postbuildcommands { "command1" } - postbuildmessage "Post-building..." - prepare() - test.capture [[ - - command1 - Post-building... - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_log.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_log.lua deleted file mode 100644 index 1c1a2d6bc4..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_log.lua +++ /dev/null @@ -1,52 +0,0 @@ ---- --- tests/actions/vstudio/vc2010/test_build_log.lua --- Validate build log settings in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2015 Jason Perkins and the Premake project ---- - - local p = premake - local suite = test.declare("vstudio_vs2010_build_log") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.buildLog(cfg) - end - - - --- --- Nothing should be written by default. --- - - function suite.isIgnoredByDefault() - prepare() - test.isemptycapture() - end - - --- --- Write out relative path if provided. --- - - function suite.writesPathIfSet() - buildlog "logs/MyCustomLogFile.log" - prepare() - test.capture [[ - - logs\MyCustomLogFile.log - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_steps.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_steps.lua deleted file mode 100644 index 0a8026b09b..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_build_steps.lua +++ /dev/null @@ -1,92 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_compile_settings.lua --- Validate compiler settings in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2020 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_build_steps") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.buildStep(cfg) - end - --- --- Check that we output nothing unless there is something to output --- - - function suite.buildStepNone() - prepare() - test.capture [[ - ]] - end - --- --- Check the basic build step example --- - - function suite.buildStepBasic() - buildcommands("Example.exe") - prepare() - test.capture [[ - - Example.exe - - ]] - end - --- --- Check a normal build step setup --- - - function suite.buildStepCommon() - buildcommands("Example.exe") - buildoutputs("Example.out") - buildinputs("Example.in") - buildmessage("Hello World") - prepare() - test.capture [[ - - Example.exe - Hello World - Example.out - Example.in - - ]] - end - - --- --- Check a more complex build step setup --- - - function suite.buildStepComplex() - buildcommands ( "Example.exe" ) - buildoutputs { "Example.out", "Example2.out" } - buildinputs { "Example.in", "Example2.in" } - buildmessage("Hello World") - prepare() - test.capture [[ - - Example.exe - Hello World - Example.out;Example2.out - Example.in;Example2.in - - ]] - end \ No newline at end of file diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_character_set.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_character_set.lua deleted file mode 100644 index a6a45df381..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_character_set.lua +++ /dev/null @@ -1,57 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_character_set.lua --- Validate generation Unicode/MBCS settings. --- Copyright (c) 2011-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_character_set") - local vc2010 = p.vstudio.vc2010 - - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.characterSet(cfg) - end - - - function suite.onDefault() - prepare() - test.capture [[ -Unicode - ]] - end - - - function suite.onUnicode() - characterset "Unicode" - prepare() - test.capture [[ -Unicode - ]] - end - - - function suite.onMBCS() - characterset "MBCS" - prepare() - test.capture [[ -MultiByte - ]] - end - - function suite.onASCII() - characterset "ASCII" - prepare() - test.capture [[ -NotSet - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_compile_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_compile_settings.lua deleted file mode 100644 index 2eb2322bf7..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_compile_settings.lua +++ /dev/null @@ -1,1403 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_compile_settings.lua --- Validate compiler settings in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_compile_settings") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.clCompile(cfg) - end - - --- --- Check the basic element structure with default settings. ---- - - function suite.defaultSettings() - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - ---- --- Test precompiled header handling; the header should be treated as --- a plain string value, with no path manipulation applied, since it --- needs to match the value of the #include statement used in the --- project code. ---- - - function suite.usePrecompiledHeaders_onPrecompiledHeaders() - location "build" - pchheader "include/afxwin.h" - prepare() - test.capture [[ - - Use - include/afxwin.h - ]] - end - - ---- --- The NoPCH flag should override any other PCH settings. ---- - - function suite.noPrecompiledHeaders_onNoPCH() - pchheader "afxwin.h" - flags "NoPCH" - prepare() - test.capture [[ - - NotUsing - ]] - end - - --- --- If extra warnings is specified, pump up the volume. --- - - function suite.warningLevel_onExtraWarnings() - warnings "Extra" - prepare() - test.capture [[ - - NotUsing - Level4 - ]] - end - --- --- If the warnings are disabled, mute all warnings. --- - - function suite.warningLevel_onNoWarnings() - warnings "Off" - prepare() - test.capture [[ - - NotUsing - TurnOffAllWarnings - ]] - end - --- --- If warnings are turned off, the fatal warnings flags should --- not be generated. --- - - function suite.warningLevel_onNoWarningsOverOtherWarningsFlags() - flags { "FatalWarnings" } - warnings "Off" - prepare() - test.capture [[ - - NotUsing - TurnOffAllWarnings - ]] - end - --- --- Disable specific warnings. --- - - function suite.disableSpecificWarnings() - disablewarnings { "disable" } - prepare() - test.capture [[ - - NotUsing - Level3 - disable;%(DisableSpecificWarnings) - ]] - end - --- --- Specific warnings as errors. --- - - function suite.specificWarningsAsErrors() - fatalwarnings { "fatal" } - prepare() - test.capture [[ - - NotUsing - Level3 - fatal;%(TreatSpecificWarningsAsErrors) - ]] - end - --- --- Check the optimization flags. --- - - function suite.optimization_onOptimize() - optimize "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Full - true - true - false - true - ]] - end - - function suite.optimization_onOptimizeSize() - optimize "Size" - prepare() - test.capture [[ - - NotUsing - Level3 - MinSpace - true - true - false - true - ]] - end - - function suite.optimization_onOptimizeSpeed() - optimize "Speed" - prepare() - test.capture [[ - - NotUsing - Level3 - MaxSpeed - true - true - false - true - ]] - end - - function suite.optimization_onOptimizeFull() - optimize "Full" - prepare() - test.capture [[ - - NotUsing - Level3 - Full - true - true - false - true - ]] - end - - function suite.optimization_onOptimizeOff() - optimize "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - function suite.optimization_onOptimizeDebug() - optimize "Debug" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - --- --- If defines are specified, the element should be added. --- - - function suite.preprocessorDefinitions_onDefines() - defines { "DEBUG", "_DEBUG" } - prepare() - test.capture [[ - - NotUsing - Level3 - DEBUG;_DEBUG;%(PreprocessorDefinitions) - ]] - end - - --- --- If defines are specified with escapable characters, they should be escaped. --- - - function suite.preprocessorDefinitions_onDefinesWithEscapeCharacters() - p.escaper(p.vstudio.vs2010.esc) - defines { "&", "<", ">" } - prepare() - test.capture [[ - - NotUsing - Level3 - &;<;>;%(PreprocessorDefinitions) - ]] - p.escaper(nil) - end - - --- --- If undefines are specified, the element should be added. --- - - function suite.preprocessorDefinitions_onUnDefines() - undefines { "DEBUG", "_DEBUG" } - prepare() - test.capture [[ - - NotUsing - Level3 - DEBUG;_DEBUG;%(UndefinePreprocessorDefinitions) - ]] - end - - --- --- If build options are specified, the element should be specified. --- - - function suite.additionalOptions_onBuildOptions() - buildoptions { "/xyz", "/abc" } - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - /xyz /abc %(AdditionalOptions) - ]] - end - - --- --- If include directories are specified, the should be added. --- - - function suite.additionalIncludeDirs_onIncludeDirs() - includedirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - NotUsing - Level3 - include\lua;include\zlib;%(AdditionalIncludeDirectories) - ]] - end - - - --- --- Ensure macros are not truncated (see issue #63) --- - - - function suite.additionalIncludeDirs_onIncludeDirs_with_vs_macros() - includedirs { "$(Macro1)/foo/bar/$(Macro2)/baz" } - prepare() - test.capture [[ - - NotUsing - Level3 - $(Macro1)\foo\bar\$(Macro2)\baz;%(AdditionalIncludeDirectories) - ]] - end - - --- --- If include directories are specified, the should be added. --- - - function suite.additionalUsingDirs_onUsingDirs() - usingdirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - NotUsing - Level3 - include\lua;include\zlib;%(AdditionalUsingDirectories) - ]] - end - --- --- Turn off minimal rebuilds if the NoMinimalRebuild flag is set. --- - - function suite.minimalRebuild_onNoMinimalRebuild() - flags "NoMinimalRebuild" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - --- --- Can't minimal rebuild with the C7 debugging format. --- - - function suite.minimalRebuild_onC7() - debugformat "C7" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - --- --- If staticruntime is specified, add the element. --- - - function suite.runtimeLibrary_onDynamicRuntime() - staticruntime "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - MultiThreadedDLL - ]] - end - - function suite.runtimeLibrary_onStaticRuntime() - staticruntime "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - MultiThreaded - ]] - end - - function suite.runtimeLibrary_onDynamicRuntimeAndSymbols() - staticruntime "Off" - symbols "On" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - MultiThreadedDebugDLL - ]] - end - - function suite.runtimeLibrary_onStaticRuntimeAndSymbols() - staticruntime "On" - symbols "On" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - MultiThreadedDebug - ]] - end - - --- --- Add if FatalWarnings flag is set. --- - - function suite.treatWarningsAsError_onFatalWarnings() - flags { "FatalCompileWarnings" } - prepare() - test.capture [[ - - NotUsing - Level3 - true - ]] - end - - --- --- Check the handling of the Symbols flag. --- - - function suite.onDefaultSymbols() - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - --- --- Check handling of the explicitly disabling symbols. --- Note: VS2013 and older have a bug with setting --- DebugInformationFormat to None. The workaround --- is to leave the field blank. --- - function suite.onNoSymbols() - symbols 'Off' - prepare() - test.capture [[ - - NotUsing - Level3 - - Disabled - ]] - end - - --- --- VS2015 and newer can use DebugInformationFormat None. --- - function suite.onNoSymbolsVS2015() - symbols 'Off' - p.action.set("vs2015") - prepare() - test.capture [[ - - NotUsing - Level3 - None - Disabled - ]] - end - - function suite.onSymbols() - symbols "On" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - - ]] - end - - --- --- Check the handling of the C7 debug information format. --- - - function suite.onC7DebugFormat() - symbols "On" - debugformat "c7" - prepare() - test.capture [[ - - NotUsing - Level3 - OldStyle - Disabled - ]] - end - - --- --- Verify character handling. --- - - function suite.wchar_onNative() - flags "NativeWChar" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - ]] - end - - function suite.wchar_onNoNative() - flags "NoNativeWChar" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - --- --- Check exception handling and RTTI. --- - - function suite.exceptions_onNoExceptions() - exceptionhandling "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) - Disabled - false - ]] - end - - - function suite.exceptions_onSEH() - exceptionhandling "SEH" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - Async - ]] - end - - function suite.runtimeTypeInfo_onNoRTTI() - rtti "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - function suite.runtimeTypeInfo_onNoBufferSecurityCheck() - flags "NoBufferSecurityCheck" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - --- --- On Win32 builds, use the Edit-and-Continue debug information format. --- - - function suite.debugFormat_onWin32() - symbols "On" - architecture "x86" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - ]] - end - - --- --- Edit-and-Continue is not support on 64-bit builds. --- - - function suite.debugFormat_onWin64() - symbols "On" - architecture "x86_64" - prepare() - test.capture [[ - - NotUsing - Level3 - ProgramDatabase - ]] - end - - --- --- Check the handling of the editandcontinue flag. --- - - function suite.debugFormat_onEditAndContinueOff() - symbols "On" - editandcontinue "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - ProgramDatabase - ]] - end - --- --- Check the handling of the editandcontinue flag. --- - - function suite.debugFormat_onFastLinkBuild() - symbols "FastLink" - editandcontinue "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - ProgramDatabase - ]] - end - - --- --- Edit-and-Continue is not supported for optimized builds. --- - - function suite.debugFormat_onOptimizedBuild() - symbols "On" - optimize "On" - prepare() - test.capture [[ - - NotUsing - Level3 - ProgramDatabase - ]] - end - - - --- --- Edit-and-Continue is not supported for Managed builds. --- - - function suite.debugFormat_onManagedCode() - symbols "On" - clr "On" - prepare() - test.capture [[ - - NotUsing - Level3 - ProgramDatabase - ]] - end - - --- --- Check handling of forced includes. --- - - function suite.forcedIncludeFiles() - forceincludes { "stdafx.h", "include/sys.h" } - prepare() - test.capture [[ - - NotUsing - Level3 - stdafx.h;include\sys.h - ]] - end - - function suite.forcedUsingFiles() - forceusings { "stdafx.h", "include/sys.h" } - prepare() - test.capture [[ - - NotUsing - Level3 - stdafx.h;include\sys.h - ]] - end - - --- --- Check handling of the NoRuntimeChecks flag. --- - - function suite.onNoRuntimeChecks() - flags { "NoRuntimeChecks" } - prepare() - test.capture [[ - - NotUsing - Level3 - Default - ]] - end - - --- --- Check handling of the EnableMultiProcessorCompile flag. --- - - function suite.onMultiProcessorCompile() - flags { "MultiProcessorCompile" } - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - true - ]] - end - - --- --- Check handling of the `runtime` API; should override the --- default behavior of linking the debug runtime when symbols are --- enabled with no optimizations. --- - - function suite.releaseRuntime_onReleaseRuntime() - runtime "Release" - symbols "On" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - MultiThreadedDLL - ]] - end - - function suite.releaseRuntime_onDynamicAndReleaseRuntime() - runtime "Release" - staticruntime "Off" - symbols "On" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - MultiThreadedDLL - ]] - end - - function suite.releaseRuntime_onStaticAndReleaseRuntime() - runtime "Release" - staticruntime "On" - symbols "On" - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - MultiThreaded - ]] - end - - --- --- Check handling of the OmitDefaultLibrary flag. --- - - function suite.onOmitDefaultLibrary() - flags { "OmitDefaultLibrary" } - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - ]] - end - - --- --- Check handling of the stringpooling api --- - function suite.onStringPoolingOff() - stringpooling 'Off' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - function suite.onStringPoolingOn() - stringpooling 'On' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - ]] - end - - function suite.onStringPoolingNotSpecified() - optimize "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Full - true - true - false - true - ]] - end - - - --- --- Check handling of the floatingpointexceptions api --- - function suite.onFloatingPointExceptionsOff() - floatingpointexceptions 'Off' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - function suite.onFloatingPointExceptionsOn() - floatingpointexceptions 'On' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - ]] - end - - function suite.onFloatingPointExceptionsNotSpecified() - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - - --- --- Check handling of the functionlevellinking api --- - function suite.onFunctionLevelLinkingOff() - functionlevellinking 'Off' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - function suite.onFunctionLevelLinkingOn() - functionlevellinking 'On' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - ]] - end - - function suite.onFunctionLevelLinkingNotSpecified() - optimize "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Full - true - ]] - end - - - --- --- Check handling of the intrinsics api --- - function suite.onIntrinsicsOff() - intrinsics 'Off' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - function suite.onIntrinsicsOn() - intrinsics 'On' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - ]] - end - - function suite.onIntrinsicsNotSpecified() - optimize "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Full - true - true - false - true - ]] - end - - - --- --- Check handling of the language api --- - function suite.onLanguageC() - language 'C' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - function suite.onLanguageCpp() - language 'C++' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - --- --- Check handling of the compileAs api --- - function suite.onCompileAsC() - compileas 'C' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - CompileAsC - - ]] - end - - function suite.onCompileAsCpp() - compileas 'C++' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - CompileAsCpp - - ]] - end - - --- --- Check handling of the C++14 & C++17 api --- - - function suite.onLanguage_Cpp14_VS2010() - cppdialect 'C++14' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - function suite.onLanguage_Cpp14_VS2015() - p.action.set("vs2015") - - cppdialect 'C++14' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - /std:c++14 %(AdditionalOptions) - - ]] - end - - function suite.onLanguage_Cpp14_VS2017() - p.action.set("vs2017") - - cppdialect 'C++14' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - stdcpp14 - - ]] - end - - function suite.onLanguage_Cpp14_VS2019() - p.action.set("vs2019") - - cppdialect 'C++14' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - stdcpp14 - - ]] - end - - function suite.onLanguage_Cpp17_VS2010() - cppdialect 'C++17' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - function suite.onLanguage_Cpp17_VS2015() - p.action.set("vs2015") - - cppdialect 'C++17' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - /std:c++latest %(AdditionalOptions) - - ]] - end - - function suite.onLanguage_Cpp17_VS2017() - p.action.set("vs2017") - - cppdialect 'C++17' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - stdcpp17 - - ]] - end - - function suite.onLanguage_Cpp17_VS2019() - p.action.set("vs2019") - - cppdialect 'C++17' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - stdcpp17 - - ]] - end - - function suite.onLanguage_CppLatest_VS2010() - cppdialect 'C++latest' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - function suite.onLanguage_CppLatest_VS2015() - p.action.set("vs2015") - - cppdialect 'C++latest' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - /std:c++latest %(AdditionalOptions) - - ]] - end - - function suite.onLanguage_CppLatest_VS2017() - p.action.set("vs2017") - - cppdialect 'C++latest' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - stdcpplatest - - ]] - end - - function suite.onLanguage_CppLatest_VS2019() - p.action.set("vs2019") - - cppdialect 'C++latest' - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - stdcpplatest - - ]] - end - --- --- Check StaticLib SymbolsPath --- - - function suite.generateProgramDataBaseFileName_onStaticLib() - kind "StaticLib" - - symbols "On" - symbolspath "$(IntDir)$(TargetName).pdb" - - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateNotProgramDataBaseFileName_onSharedLib() - kind "SharedLib" - - symbols "On" - symbolspath "$(IntDir)$(TargetName).pdb" - - prepare() - test.capture [[ - - NotUsing - Level3 - EditAndContinue - Disabled - - ]] - end - --- --- Check UnsignedChar. --- - - function suite.unsignedChar_On() - unsignedchar "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - /J %(AdditionalOptions) - - ]] - end - - function suite.unsignedChar_Off() - unsignedchar "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - --- --- Check StructMemberAlignment --- - - function suite.structMemberAlignment() - structmemberalign(1) - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - 1Byte - - ]] - end - --- --- Check OmitFramePointer --- - - function suite.omitFramePointer_Default() - omitframepointer "Default" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - - ]] - end - - function suite.omitFramePointer_On() - omitframepointer "On" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - - ]] - end - - function suite.omitFramePointer_Off() - omitframepointer "Off" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - false - - ]] - end - - function suite.omitFramePointer_DeprecationFlag() - flags "NoFramePointer" - prepare() - test.capture [[ - - NotUsing - Level3 - Disabled - true - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_config_props.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_config_props.lua deleted file mode 100644 index 9e13f9a922..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_config_props.lua +++ /dev/null @@ -1,344 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_config_props.lua --- Validate generation of the configuration property group. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_config_props") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - cfg = test.getconfig(prj, "Debug") - vc2010.configurationProperties(cfg) - end - - --- --- Check the structure with the default project values. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - Application - false - Unicode - v100 - - ]] - end - - --- --- Check the configuration type for differenet project kinds. --- - - function suite.configurationType_onConsoleApp() - kind "ConsoleApp" - prepare() - test.capture [[ - - Application - ]] - end - - function suite.configurationType_onWindowedApp() - kind "WindowedApp" - prepare() - test.capture [[ - - Application - ]] - end - - function suite.configurationType_onSharedLib() - kind "SharedLib" - prepare() - test.capture [[ - - DynamicLibrary - ]] - end - - function suite.configurationType_onStaticLib() - kind "StaticLib" - prepare() - test.capture [[ - - StaticLibrary - ]] - end - --- --- Debug configurations (for some definition of "debug") should use the debug libraries. --- - - function suite.debugLibraries_onDebugConfig() - symbols "On" - prepare() - test.capture [[ - - Application - true - ]] - end - - --- --- Check the support for Managed C++. --- - - function suite.clrSupport_onClrOn() - clr "On" - prepare() - test.capture [[ - - Application - false - true - ]] - end - - function suite.clrSupport_onClrOff() - clr "Off" - prepare() - test.capture [[ - - Application - false - ]] - end - - function suite.clrSupport_onClrUnsafe() - clr "Unsafe" - prepare() - test.capture [[ - - Application - false - true - ]] - end - - function suite.clrSupport_onClrSafe() - clr "Safe" - prepare() - test.capture [[ - - Application - false - Safe - ]] - end - - function suite.clrSupport_onClrPure() - clr "Pure" - prepare() - test.capture [[ - - Application - false - Pure - ]] - end - - --- --- Check the support for building with MFC. --- - - function suite.useOfMfc_onDynamicRuntime() - flags "MFC" - prepare() - test.capture [[ - - Application - false - Dynamic - ]] - end - - function suite.useOfMfc_onStaticRuntime() - flags { "MFC" } - staticruntime "On" - prepare() - test.capture [[ - - Application - false - Static - ]] - end - --- --- Check the support for building with ATL. --- - - function suite.useOfAtl_onDynamicRuntime() - atl "Dynamic" - prepare() - test.capture [[ - - Application - false - Dynamic - ]] - end - - function suite.useOfAtl_onStaticRuntime() - atl "Static" - prepare() - test.capture [[ - - Application - false - Static - ]] - end - --- --- Check handling of the ReleaseRuntime flag; should override the --- default behavior of linking the debug runtime when symbols are --- enabled with no optimizations. --- - - function suite.releaseRuntime_onFlag() - runtime "Release" - symbols "On" - prepare() - test.capture [[ - - Application - false - ]] - end - - --- --- Check the default settings for a Makefile configuration: new --- configuration type, no character set, output and intermediate --- folders are moved up from their normal location in the output --- configuration element. --- - - function suite.structureIsCorrect_onMakefile() - kind "Makefile" - prepare() - test.capture [[ - - Makefile - false - bin\Debug\ - obj\Debug\ - - ]] - end - - function suite.structureIsCorrect_onNone() - kind "None" - prepare() - test.capture [[ - - Makefile - false - bin\Debug\ - obj\Debug\ - - ]] - end - --- --- Same as above but for Utility --- - - function suite.structureIsCorrect_onUtility() - kind "Utility" - prepare() - test.capture [[ - - Utility - v100 - - ]] - end - --- --- Check the LinkTimeOptimization flag --- - - function suite.useOfLinkTimeOptimization() - flags { "LinkTimeOptimization" } - prepare() - test.capture [[ - - Application - false - Unicode - v100 - true - ]] - end - - --- --- Check the WindowsSDKDesktopARMSupport element --- - - function suite.WindowsSDKDesktopARMSupport_off() - system "ios" - architecture "ARM" - prepare() - test.capture [[ - - Application - false - Unicode - v100 - - ]] - end - - function suite.WindowsSDKDesktopARMSupport_on() - system "windows" - architecture "ARM" - prepare() - test.capture [[ - - Application - false - Unicode - v100 - true - - ]] - end - - function suite.WindowsSDKDesktopARM64Support() - system "windows" - architecture "ARM64" - prepare() - test.capture [[ - - Application - false - Unicode - v100 - true - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_debug_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_debug_settings.lua deleted file mode 100644 index b1f5b6b2ee..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_debug_settings.lua +++ /dev/null @@ -1,148 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_debug_settings.lua --- Validate handling of the working directory for debugging. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_debug_settings") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.debugSettings(cfg) - end - - --- --- If no debug directory is set, nothing should be output. --- - - function suite.noOutput_onNoDebugDir() - prepare() - test.isemptycapture() - end - --- --- The debug command should specified relative to the project location. --- - - function suite.debugCommand_isProjectRelative() - debugcommand "bin/emulator.exe" - prepare() - - expectedPath = path.translate(path.getabsolute(os.getcwd())) .. "\\bin\\emulator.exe" - expected = "" .. expectedPath .. "" - expected = expected .. "\nWindowsLocalDebugger" - test.capture (expected) - end - - --- --- The debug directory should specified relative to the project location. --- - - function suite.debugDirectory_isProjectRelative() - debugdir "bin/debug" - prepare() - test.capture [[ -bin\debug -WindowsLocalDebugger - ]] - end - --- --- Verify handling of debug arguments. --- - - function suite.debuggerCommandArgs_onDebugArgs() - debugargs { "arg1", "arg2", "arg1" } - prepare() - test.capture [[ -arg1 arg2 arg1 - ]] - end - --- --- Check the handling of debug environment variables. --- - - function suite.localDebuggerEnv_onDebugEnv() - debugenvs { "key=value" } - prepare() - test.capture [[ -key=value - ]] - end - --- --- Multiple environment variables should be separated by a "\n" sequence. --- - - function suite.localDebuggerEnv_onMultipleDebugEnv() - debugenvs { "key=value", "foo=bar" } - prepare() - test.capture [[ -key=value -foo=bar - ]] - end - --- --- Test debugger flavors --- - - function suite.debugger_OnWindowsDefault() - debugger "Default" - prepare() - test.capture [[ - - ]] - end - - function suite.debugger_OnWindowsUnavailable() - debugger "GDB" - prepare() - test.capture [[ - - ]] - end - - function suite.debugger_OnWindowsLocal() - debugger "VisualStudioLocal" - prepare() - test.capture [[ -WindowsLocalDebugger - ]] - end - - function suite.debuggerFlavor_OnWindowsRemote() - debugger "VisualStudioRemote" - prepare() - test.capture [[ -WindowsRemoteDebugger - ]] - end - - function suite.debuggerFlavor_OnDebugDirAndDebugger() - debugdir "bin/debug" - debugger "VisualStudioRemote" - prepare() - test.capture [[ -bin\debug -WindowsRemoteDebugger - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_ensure_nuget_imports.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_ensure_nuget_imports.lua deleted file mode 100644 index 8e9a3a21db..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_ensure_nuget_imports.lua +++ /dev/null @@ -1,58 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_ensure_nuget_imports.lua --- Check the EnsureNuGetPackageBuildImports block of a VS 2010 project. --- Copyright (c) 2016 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_ensure_nuget_imports") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - local prj = p.workspace.getproject(wks, 1) - vc2010.ensureNuGetPackageBuildImports(prj) - end - - --- --- Should not output anything if no packages have been set. --- - - function suite.noOutputIfNoPackages() - prepare() - test.isemptycapture() - end - - - --- --- Writes the pre-build check that makes sure that all packages are installed. --- - - function suite.structureIsCorrect() - nuget { "boost:1.59.0-b1", "sdl2.v140:2.0.3", "sdl2.v140.redist:2.0.3" } - prepare() - test.capture [[ - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_excluded_configs.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_excluded_configs.lua deleted file mode 100644 index 3df6eb6bbb..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_excluded_configs.lua +++ /dev/null @@ -1,78 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_excluded_configs.lua --- Check handling of configurations which have been excluded from the build. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_excluded_configs") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - platforms { "Zeus", "Ares" } - language "C++" - - prj = project("MyProject") - kind "ConsoleApp" - links { "MyProject2", "MyProject3" } - - project("MyProject2") - kind "StaticLib" - - project("MyProject3") - kind "StaticLib" - removeplatforms { "Ares" } - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.linker(cfg) - end - - - --- --- If a sibling is included in one configuration and excluded from --- another, the included configuration should link as normal. --- - - function suite.normalLink_onIncludedConfig() - prepare("Zeus") - test.capture [[ - - Console - - ]] - end - - - --- --- If a sibling is included in one configuration and excluded from --- another, the excluded configuration should force explicit linking --- and not list the excluded library. --- - - function suite.explicitLink_onExcludedConfig() - prepare("Ares") - test.capture [[ - - Console - bin\Ares\Debug\MyProject2.lib;%(AdditionalDependencies) - - - false - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_settings.lua deleted file mode 100644 index e52120c00a..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_settings.lua +++ /dev/null @@ -1,90 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_extension_settings.lua --- Check the import extension settings block of a VS 2010 project. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_extension_settings") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - rule "MyRules" - rule "MyOtherRules" - wks = test.createWorkspace() - end - - local function prepare() - local prj = test.getproject(wks) - vc2010.importExtensionSettings(prj) - end - - --- --- Writes an empty element when no custom rules are specified. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - - ]] - end - - - --- --- Writes entries for each project scoped custom rules path. --- - - function suite.addsImport_onEachRulesFile() - rules { "MyRules", "MyOtherRules" } - prepare() - test.capture [[ - - - - - ]] - end - - --- --- Rule files use a project relative path. --- - - function suite.usesProjectRelativePaths() - rules "MyRules" - location "build" - prepare() - test.capture [[ - - - - ]] - end - --- --- the asm 'file category' should add the right settings. --- - - function suite.hasAssemblyFiles() - files { "test.asm" } - location "build" - prepare() - test.capture [[ - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_targets.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_targets.lua deleted file mode 100644 index 71b12c9dac..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_extension_targets.lua +++ /dev/null @@ -1,108 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_extension_targets.lua --- Check the import extension targets block of a VS 2010 project. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_extension_targets") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - rule "MyRules" - rule "MyOtherRules" - wks = test.createWorkspace() - end - - local function prepare() - local prj = test.getproject(wks) - vc2010.importExtensionTargets(prj) - end - - --- --- Writes an empty element when no custom rules are specified. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - - ]] - end - - - --- --- Writes entries for each project scoped custom rules path. --- - - function suite.addsImport_onEachRulesFile() - rules { "MyRules", "MyOtherRules" } - prepare() - test.capture [[ - - - - - ]] - end - - --- --- Writes entries for NuGet packages. --- - - function suite.addsImport_onEachNuGetPackage() - nuget { "boost:1.59.0-b1", "sdl2.v140:2.0.3", "sdl2.v140.redist:2.0.3" } - prepare() - test.capture [[ - - - - - - ]] - end - - --- --- Rule files use a project relative path. --- - - function suite.usesProjectRelativePaths() - rules { "MyRules" } - location "build" - prepare() - test.capture [[ - - - - ]] - end - - --- --- the asm 'file category' should add the right target. --- - - function suite.hasAssemblyFiles() - files { "test.asm" } - location "build" - prepare() - test.capture [[ - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_files.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_files.lua deleted file mode 100644 index acd8d0e2a5..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_files.lua +++ /dev/null @@ -1,905 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_files.lua --- Validate generation of files block in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_files") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - - rule "Animation" - fileextension ".dae" - propertydefinition { - name = "AdditionalOptions", - kind = "list", - separator = ";" - } - - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - vc2010.files(prj) - end - - --- --- Test filtering of source files into the correct categories. --- - - function suite.clInclude_onHFile() - files { "include/hello.h" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.clCompile_onCFile() - files { "hello.c" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.resourceCompile_onRCFile() - files { "resources/hello.rc" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.midlCompile_onIDLFile() - files { "idl/interfaces.idl" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.none_onTxtFile() - files { "docs/hello.txt" } - prepare() - test.capture [[ - - - - ]] - end - - --- --- Check handling of buildaction. --- - function suite.customBuildTool_onBuildAction() - files { "test.x", "test2.cpp", "test3.cpp" } - filter "files:**.x" - buildaction "FxCompile" - filter "files:test2.cpp" - buildaction "None" - prepare() - test.capture [[ - - - - - - - - - - ]] - end - - --- --- Check handling of files with custom build rules. --- - - function suite.customBuild_onBuildRule() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - prepare() - test.capture [[ - - - Document - cgc $(InputFile) - $(InputName).obj - - - ]] - end - - function suite.customBuild_onBuildRuleMultipleBuildOutputs() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).a", "$(InputName).b" } - prepare() - test.capture [[ - - - Document - cgc $(InputFile) - $(InputName).a;$(InputName).b - - - ]] - end - - function suite.customBuild_onBuildRuleWithMessage() - files { "hello.cg" } - filter "files:**.cg" - buildmessage "Compiling shader $(InputFile)" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - prepare() - test.capture [[ - - - Document - cgc $(InputFile) - $(InputName).obj - Compiling shader $(InputFile) - - - ]] - end - - function suite.customBuild_onBuildRuleWithAdditionalInputs() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - buildinputs { "common.cg.inc", "common.cg.inc2" } - prepare() - test.capture [[ - - - Document - cgc $(InputFile) - $(InputName).obj - common.cg.inc;common.cg.inc2 - - - ]] - end - - --- --- If a PCH source is specified, ensure it is included in the file configuration. --- - - function suite.precompiledHeader_onPchSource() - files { "afxwin.cpp" } - pchheader "afxwin.h" - pchsource "afxwin.cpp" - prepare() - test.capture [[ - - - Create - - - ]] - end - - --- --- If a file is excluded from a configuration, make sure it is marked as such. --- - - function suite.excludedFromBuild_onExcludedFile() - files { "hello.cpp" } - filter "Debug" - removefiles { "hello.cpp" } - prepare() - test.capture [[ - - - true - - - ]] - end - - function suite.excludedFromBuild_onExcludeFlag() - files { "hello.cpp" } - filter "files:hello.cpp" - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - true - - - ]] - end - - function suite.excludedFromBuild_onResourceFile_excludedFile() - files { "hello.rc" } - filter "Debug" - removefiles { "hello.rc" } - prepare() - test.capture [[ - - - true - - - ]] - end - - function suite.excludedFromBuild_onResourceFile_excludeFlag() - files { "hello.rc" } - filter "files:hello.rc" - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - true - - - ]] - end - - function suite.excludedFromBuild_onResourceFile_excludeFlag_nonWindows() - files { "hello.rc" } - system "Linux" - filter "files:hello.rc" - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - true - - - ]] - end - - function suite.includedFromBuild_onResourceFile_nonWindows() - files { "hello.rc" } - system "Linux" - prepare() - test.capture [[ - - - - ]] - end - - function suite.excludedFromBuild_onCustomBuildRule_excludedFile() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - filter "Debug" - removefiles { "hello.cg" } - prepare() - test.capture [[ - - - Document - cgc $(InputFile) - $(InputName).obj - - - ]] - end - - function suite.excludedFromBuild_onCustomBuildRule_excludeFlag() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - Document - true - cgc $(InputFile) - $(InputName).obj - - - ]] - end - - function suite.excludedFromBuild_onCustomBuildRule_withNoCommands() - files { "hello.cg" } - filter { "files:**.cg", "Debug" } - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - filter { "files:**.cg" } - flags { "ExcludeFromBuild" } - prepare() - test.capture [[ - - - Document - true - cgc $(InputFile) - $(InputName).obj - - - ]] - end - - --- --- If a custom rule outputs an object file, it's automatically linked, unless --- we explicitly specify that it isn't with linkbuildoutputs. --- - - function suite.linkBuildOutputs_onNotSpecified() - files { "hello.x" } - filter "files:**.x" - buildcommands { "echo $(InputFile)" } - buildoutputs { "$(InputName).obj" } - prepare() - test.capture [[ - - - Document - echo $(InputFile) - $(InputName).obj - - - ]] - end - - function suite.linkBuildOutputs_onOff() - files { "hello.x" } - filter "files:**.x" - buildcommands { "echo $(InputFile)" } - buildoutputs { "$(InputName).obj" } - linkbuildoutputs "Off" - prepare() - test.capture [[ - - - Document - echo $(InputFile) - $(InputName).obj - false - - - ]] - end - - function suite.linkBuildOutputs_onOn() - files { "hello.x" } - filter "files:**.x" - buildcommands { "echo $(InputFile)" } - buildoutputs { "$(InputName).obj" } - linkbuildoutputs "On" - prepare() - test.capture [[ - - - Document - echo $(InputFile) - $(InputName).obj - true - - - ]] - end - - --- --- If two files at different folder levels have the same name, a different --- object file name should be used for each. --- - - function suite.uniqueObjectNames_onSourceNameCollision() - files { "hello.cpp", "greetings/hello.cpp" } - prepare() - test.capture [[ - - - - $(IntDir)\hello1.obj - - - ]] - end - - - function suite.uniqueObjectNames_onBaseNameCollision1() - files { "a/hello.cpp", "b/hello.cpp", "c/hello1.cpp" } - prepare() - test.capture [[ - - - - $(IntDir)\hello1.obj - - - $(IntDir)\hello11.obj - - - ]] - end - - - function suite.uniqueObjectNames_onBaseNameCollision2() - files { "a/hello1.cpp", "b/hello.cpp", "c/hello.cpp" } - prepare() - test.capture [[ - - - - - $(IntDir)\hello2.obj - - - ]] - end - - - function suite.uniqueObjectNames_onBaseNameCollision_Release() - files { "a/hello.cpp", "b/hello.cpp", "c/hello1.cpp", "d/hello11.cpp" } - filter "configurations:Debug" - excludes {"b/hello.cpp"} - filter "configurations:Release" - excludes {"d/hello11.cpp"} - - prepare() - test.capture [[ - - - - true - $(IntDir)\hello1.obj - - - $(IntDir)\hello11.obj - - - true - - - ]] - end - --- --- Test that changes in case are treated as if multiple files of the same name are being built --- - - function suite.uniqueObjectNames_onSourceNameCollision_ignoreCase() - files { "hello.cpp", "greetings/Hello.cpp" } - prepare() - test.capture [[ - - - - $(IntDir)\hello1.obj - - - ]] - end - - - function suite.uniqueObjectNames_onBaseNameCollision_ignoreCase1() - files { "a/hello.cpp", "b/Hello.cpp", "c/hello1.cpp" } - prepare() - test.capture [[ - - - - $(IntDir)\Hello1.obj - - - $(IntDir)\hello11.obj - - - ]] - end - - - function suite.uniqueObjectNames_onBaseNameCollision_ignoreCase2() - files { "a/hello1.cpp", "b/Hello.cpp", "c/hello.cpp" } - prepare() - test.capture [[ - - - - - $(IntDir)\hello2.obj - - - ]] - end - - - function suite.uniqueObjectNames_onBaseNameCollision_Release_ignoreCase() - files { "a/Hello.cpp", "b/hello.cpp", "c/hello1.cpp", "d/hello11.cpp" } - filter "configurations:Debug" - excludes {"b/hello.cpp"} - filter "configurations:Release" - excludes {"d/hello11.cpp"} - - prepare() - test.capture [[ - - - - true - $(IntDir)\hello1.obj - - - $(IntDir)\hello11.obj - - - true - - - ]] - end - - - --- --- Check handling of per-file forced includes. --- - - function suite.forcedIncludeFiles() - files { "hello.cpp" } - filter "files:**.cpp" - forceincludes { "../include/force1.h", "../include/force2.h" } - - prepare() - test.capture [[ - - - ..\include\force1.h;..\include\force2.h - - - ]] - end - - --- --- Check handling of per-file command line build options. --- - - function suite.additionalOptions() - files { "hello.cpp" } - filter "files:**.cpp" - buildoptions { "/Xc" } - - prepare() - test.capture [[ - - - /Xc %(AdditionalOptions) - - - ]] - end - --- --- Check handling of per-file compileas options. --- - - function suite.onCompileAs() - files { "hello.c" } - filter "files:hello.c" - compileas "C++" - prepare() - test.capture [[ - - - CompileAsCpp - ]] - end - - function suite.onCompileAsDebug() - files { "hello.c" } - filter { "configurations:Debug", "files:hello.c" } - compileas "C++" - prepare() - test.capture [[ - - - CompileAsCpp - ]] - end - --- --- Check handling of per-file optimization levels. --- - - function suite.onOptimize() - files { "hello.cpp" } - filter "files:hello.cpp" - optimize "On" - prepare() - test.capture [[ - - - Full - ]] - end - - - function suite.onOptimizeSize() - files { "hello.cpp" } - filter "files:hello.cpp" - optimize "Size" - prepare() - test.capture [[ - - - MinSpace - ]] - end - - function suite.onOptimizeSpeed() - files { "hello.cpp" } - filter "files:hello.cpp" - optimize "Speed" - prepare() - test.capture [[ - - - MaxSpeed - ]] - end - - function suite.onOptimizeFull() - files { "hello.cpp" } - filter "files:hello.cpp" - optimize "Full" - prepare() - test.capture [[ - - - Full - ]] - end - - function suite.onOptimizeOff() - files { "hello.cpp" } - filter "files:hello.cpp" - optimize "Off" - prepare() - test.capture [[ - - - Disabled - ]] - end - - function suite.onOptimizeDebug() - files { "hello.cpp" } - filter "files:hello.cpp" - optimize "Debug" - prepare() - test.capture [[ - - - Disabled - ]] - end - - - --- --- Check handling of per-file optimization levels. --- - - function suite.onPerFileRttiOn() - files { "hello.cpp" } - filter "files:hello.cpp" - rtti "On" - prepare() - test.capture [[ - - - true - - - ]] - end - - function suite.onPerFileRttiOff() - files { "hello.cpp" } - filter "files:hello.cpp" - rtti "Off" - prepare() - test.capture [[ - - - false - - - ]] - end - --- --- Check handling of per-file no PCH build options. --- - - function suite.excludedFromPCH() - files { "hello.cpp" } - filter "files:**.cpp" - flags { "NoPCH" } - prepare() - test.capture [[ - - - NotUsing - - - ]] - end - - - --- --- Check handling of per-file command line build options. --- - - function suite.perFileDefines() - files { "hello.cpp" } - filter "files:**.cpp" - defines { "IS_CPP" } - prepare() - test.capture [[ - - - IS_CPP;%(PreprocessorDefinitions) - - - ]] - end - - - - --- --- Check handling of per-file command line build options. --- - - function suite.perFileSEH() - files { "hello.asm", "hello.cpp" } - filter "files:**.asm" - exceptionhandling 'SEH' - prepare() - test.capture [[ - - - - - - true - - - ]] - end - --- --- Make sure that the sort order of the source files is maintained even --- when virtual paths are used to organize them. --- - - function suite.maintainsSortOrder_onVirtualPaths() - files { "SystemTray.h", "PrefsWriter.h", "SystemTray.cpp", "PrefsWriter.cpp" } - vpaths { - ["source/mfc"] = { "PrefsWriter.*" }, - ["source/core"] = { "SystemTray.*" }, - } - prepare() - test.capture [[ - - - - - ]] - end - - - --- --- Check handling of per-file vector extensions. --- - - function suite.perFileVectorExtensions() - files { "hello.cpp" } - filter "files:**.cpp" - vectorextensions "sse2" - prepare() - test.capture [[ - - - StreamingSIMDExtensions2 - - - ]] - end - - --- --- Check handling of files using custom rule definitions. --- - - function suite.isCategorizedByRule() - rules "Animation" - files { "hello.dae" } - prepare() - test.capture [[ - - - - ]] - end - - - function suite.listsPerConfigRuleVars() - rules "Animation" - files { "hello.dae" } - filter { "files:hello.*", "configurations:Debug" } - animationVars { AdditionalOptions = { "File1", "File2" }} - filter { "files:hello.*", "configurations:Release" } - animationVars { AdditionalOptions = { "File3" }} - prepare() - test.capture [[ - - - File1;File2 - File3 - - - ]] - end - --- --- test warning level set for a single file --- - - function suite.warningLevelPerFile() - warnings 'Off' - files { "hello.cpp", "hello2.cpp" } - filter { "files:hello.cpp" } - warnings 'Extra' - prepare() - test.capture [[ - - - Level4 - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_filter_ids.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_filter_ids.lua deleted file mode 100644 index e256de969f..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_filter_ids.lua +++ /dev/null @@ -1,108 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_filter_ids.lua --- Validate generation of filter unique identifiers. --- Copyright (c) 2011-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_filter_ids") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks) - vc2010.uniqueIdentifiers(prj) - end - - --- --- Files in the root folder (the same one as the project) don't get identifiers. --- - - function suite.groupIsEmpty_onOnlyRootFiles() - files { "hello.c", "goodbye.c" } - prepare() - test.isemptycapture() - end - - --- --- Folders shared between multiple files should be reduced to a single identifier. --- - - function suite.singleIdentifier_onMultipleFilesInSameFolder() - files { "src/hello.c", "src/goodbye.c", "so_long.h" } - prepare() - test.capture [[ - - - {2DAB880B-99B4-887C-2230-9F7C8E38947C} - - - ]] - end - - --- --- Nested folders should each get their own unique identifier. --- - - function suite.multipleIdentifiers_forNestedFolders() - files { "src/hello.c", "src/departures/goodbye.c", "so_long.h" } - prepare() - test.capture [[ - - - {2DAB880B-99B4-887C-2230-9F7C8E38947C} - - - {BB36ED8F-A704-E195-9098-51BC7C05BDFA} - - - ]] - end - - --- --- If a file has a virtual path, that should be used to build the filters. --- - - function suite.filterUsesVpath_onVpath() - files { "hello.c", "goodbye.h" } - vpaths { ["Source Files"] = "**.c" } - prepare() - test.capture [[ - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - ]] - end - - function suite.filterUsesVpath_onMultipleVpaths() - files { "hello.h", "goodbye.c" } - vpaths { ["Source Files"] = "*.c", ["Header Files"] = "*.h" } - prepare() - test.capture [[ - - - {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_filters.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_filters.lua deleted file mode 100644 index 5bebc1132e..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_filters.lua +++ /dev/null @@ -1,214 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_filters.lua --- Validate generation of file filter blocks in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_filters") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup/teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare(group) - prj = test.getproject(wks) - vc2010.filterGroups(prj) - end - - --- --- Check contents of the different file groups. --- - - function suite.itemGroup_onClInclude() - files { "hello.h" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.itemGroup_onResourceSection() - files { "hello.rc" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.itemGroup_onNoneSection() - files { "hello.txt" } - prepare() - test.capture [[ - - - - ]] - end - - function suite.itemGroup_onMixed() - files { "hello.c", "hello.h", "hello.rc", "hello.txt" } - prepare() - test.capture [[ - - - - - - - - - - - - - ]] - end - - --- --- Files with a build rule go into a custom build section. --- - - function suite.itemGroup_onBuildRule() - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - prepare("CustomBuild") - test.capture [[ - - - - ]] - end - - function suite.itemGroup_onSingleConfigBuildRule() - files { "hello.cg" } - filter { "Release", "files:**.cg" } - buildcommands { "cgc $(InputFile)" } - buildoutputs { "$(InputName).obj" } - prepare("CustomBuild") - test.capture [[ - - - - ]] - end - - --- --- Files located at the root (in the same folder as the project) do not --- need a filter identifier. --- - - function suite.noFilter_onRootFiles() - files { "hello.c", "goodbye.c" } - prepare() - test.capture [[ - - - - - ]] - end - --- --- Check the filter with a real path. --- - - function suite.filter_onRealPath() - files { "src/hello.c", "hello.h" } - prepare() - test.capture [[ - - - - - - src - - - ]] - end - --- --- Check the filter with a virtual path. --- - - function suite.filter_onVpath() - files { "src/hello.c", "hello.h" } - vpaths { ["Source Files"] = "**.c" } - prepare() - test.capture [[ - - - - - - Source Files - - - ]] - end - - --- --- Check handling of files using custom rules. --- - - function suite.filter_onCustomRule() - rules "Animation" - files { "hello.dae" } - - rule "Animation" - fileextension ".dae" - - prepare() - test.capture [[ - - - - ]] - end - - --- --- Check handling of .asm files --- - function suite.itemGroup_onMasmSection() - files { "hello.asm" } - prepare() - test.capture [[ - - - - ]] - end - --- --- Check handling of image files --- - function suite.filerImage() - files { "hello.png" } - prepare() - test.capture [[ - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_floatingpoint.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_floatingpoint.lua deleted file mode 100644 index 4a402dd070..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_floatingpoint.lua +++ /dev/null @@ -1,53 +0,0 @@ ---- --- tests/actions/vstudio/vc2010/test_floatingpoint.lua --- Validate handling of vectorextensions() in VS 2010 C/C++ projects. --- --- Created 26 Mar 2015 by Jason Perkins --- Copyright (c) 2015 Jason Perkins and the Premake project ---- - - local p = premake - local suite = test.declare("vs2010_vc_floatingpoint") - local m = p.vstudio.vc2010 - - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - m.floatingPointModel(cfg) - end - - - - function suite.instructionSet_onNotSet() - test.isemptycapture() - end - - - function suite.floatingPoint_onFloatFast() - floatingpoint "fast" - prepare() - test.capture [[ -Fast - ]] - end - - function suite.floatingPoint_onFloatStrict() - floatingpoint "strict" - prepare() - test.capture [[ -Strict - ]] - end - - function suite.floatingPoint_onDefault() - floatingpoint "Default" - prepare() - test.isemptycapture() - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_fxcompile_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_fxcompile_settings.lua deleted file mode 100644 index 75cc3f5a8f..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_fxcompile_settings.lua +++ /dev/null @@ -1,258 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_fxcompile_settings.lua --- Validate FxCompile settings in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_fxcompile_settings") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.fxCompile(cfg) - end - - ---- --- Check the basic element structure with default settings. --- Project should not generate this block if no hlsl files or no shader settings sets. ---- - - function suite.empty() - prepare() - test.capture [[ - - ]] - end - - - function suite.defaultSettings() - files { "shader.hlsl" } - prepare() - test.capture [[ - - ]] - end - ---- --- Test FxCompilePreprocessorDefinition ---- - - function suite.onFxCompilePreprocessorDefinition() - files { "shader.hlsl" } - shaderdefines { "DEFINED_VALUE" } - - prepare() - test.capture [[ - - DEFINED_VALUE;%(PreprocessorDefinitions) - - ]] - end - - - function suite.onFxCompilePreprocessorDefinition_multipleDefines() - files { "shader.hlsl" } - shaderdefines { "DEFINED_VALUE", "OTHER_DEFINED_VALUE" } - - prepare() - test.capture [[ - - DEFINED_VALUE;OTHER_DEFINED_VALUE;%(PreprocessorDefinitions) - - ]] - end - ---- --- Test FxCompileAdditionalIncludeDirectories ---- - - function suite.onFxCompileAdditionalIncludeDirectories() - files { "shader.hlsl" } - shaderincludedirs { "../includes" } - - prepare() - test.capture [[ - - ..\includes;%(AdditionalIncludeDirectories) - - ]] - end - - - function suite.onFxCompileAdditionalIncludeDirectories_multipleDefines() - files { "shader.hlsl" } - shaderincludedirs { "../includes", "otherpath/embedded" } - - prepare() - test.capture [[ - - ..\includes;otherpath\embedded;%(AdditionalIncludeDirectories) - - ]] - end - ---- --- Test FxCompileShaderType ---- - - function suite.onFxCompileShaderType() - files { "shader.hlsl" } - shadertype "Effect" - - prepare() - test.capture [[ - - Effect - - ]] - end - ---- --- Test FxCompileShaderModel ---- - - function suite.onFxCompileShaderModel() - files { "shader.hlsl" } - shadermodel "5.0" - - prepare() - test.capture [[ - - 5.0 - - ]] - end - - ---- --- Test FxCompileShaderEntry ---- - - function suite.onFxCompileShaderEntry() - files { "shader.hlsl" } - shaderentry "NewEntry" - - prepare() - test.capture [[ - - NewEntry - - ]] - end - - ---- --- Test FxCompileShaderVariableName ---- - - function suite.onFxCompileShaderVariableName() - files { "shader.hlsl" } - shadervariablename "ShaderVar" - - prepare() - test.capture [[ - - ShaderVar - - ]] - end - - ---- --- Test FxCompileShaderHeaderOutput ---- - - function suite.onFxCompileShaderHeaderOutput() - files { "shader.hlsl" } - shaderheaderfileoutput "%%(filename).hlsl.h" - - prepare() - test.capture [[ - - %(filename).hlsl.h - - ]] - end - - ---- --- Test FxCompileShaderObjectOutput ---- - - function suite.onFxCompileShaderObjectOutput() - files { "shader.hlsl" } - shaderobjectfileoutput "%%(filename).hlsl.o" - - prepare() - test.capture [[ - - %(filename).hlsl.o - - ]] - end - - ---- --- Test FxCompileShaderAssembler ---- - - function suite.onFxCompileShaderAssembler() - files { "shader.hlsl" } - shaderassembler "AssemblyCode" - - prepare() - test.capture [[ - - AssemblyCode - - ]] - end - - ---- --- Test FxCompileShaderAssemblerOutput ---- - - function suite.onFxCompileShaderAssemblerOutput() - files { "shader.hlsl" } - shaderassembleroutput "%%(filename).hlsl.asm.o" - - prepare() - test.capture [[ - - %(filename).hlsl.asm.o - - ]] - end - - ---- --- Test FxCompileShaderAdditionalOptions ---- - - function suite.onFxCompileShaderAdditionalOptions() - files { "shader.hlsl" } - shaderoptions "-opt" - - prepare() - test.capture [[ - - -opt %(AdditionalOptions) - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_globals.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_globals.lua deleted file mode 100644 index b72b7c5b3d..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_globals.lua +++ /dev/null @@ -1,364 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_globals.lua --- Validate generation of the Globals property group. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_globals") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - vc2010.globals(prj) - end - - --- --- Check the structure with the default project values. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Win32Proj - MyProject - - ]] - end - - --- --- Ensure CLR support gets enabled for Managed C++ projects. --- - - function suite.keywordIsCorrect_onManagedC() - clr "On" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - v4.0 - ManagedCProj - MyProject - - ]] - end - - --- --- Ensure custom target framework version correct for Managed C++ projects. --- - - function suite.frameworkVersionIsCorrect_onSpecificVersion() - clr "On" - dotnetframework "4.5" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - v4.5 - ManagedCProj - MyProject - - ]] - end - - function suite.frameworkVersionIsCorrect_on2013() - p.action.set("vs2013") - clr "On" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - v4.5 - ManagedCProj - MyProject - - ]] - end - --- --- Omit Keyword and RootNamespace for non-Windows projects. --- - - function suite.noKeyword_onNotWindows() - system "Linux" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - - ]] - end - - --- --- Include Keyword and RootNamespace for mixed system projects. --- - - function suite.includeKeyword_onMixedConfigs() - filter "Debug" - system "Windows" - filter "Release" - system "Linux" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Win32Proj - MyProject - - ]] - end - - --- --- Makefile projects set new keyword and drop the root namespace. --- - - function suite.keywordIsCorrect_onMakefile() - kind "Makefile" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - MakeFileProj - - ]] - end - - function suite.keywordIsCorrect_onNone() - kind "None" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - MakeFileProj - - ]] - end - - ---- --- If the project name differs from the project filename, output a --- element to indicate that. ---- - - function suite.addsFilename_onDifferentFilename() - filename "MyProject_2012" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Win32Proj - MyProject - MyProject - - ]] - end - - --- --- VS 2013 adds the to get rid --- of spurious warnings when the same filename is present in different --- configurations. --- - - function suite.structureIsCorrect_on2013() - p.action.set("vs2013") - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - - ]] - end - - --- --- VS 2015 adds the to allow developers --- to target different versions of the Windows SDK. --- - - function suite.windowsTargetPlatformVersionMissing_on2013Default() - p.action.set("vs2013") - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - - ]] - end - - function suite.windowsTargetPlatformVersionMissing_on2013() - p.action.set("vs2013") - systemversion "10.0.10240.0" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - - ]] - end - - function suite.windowsTargetPlatformVersionMissing_on2015Default() - p.action.set("vs2015") - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - - ]] - end - - function suite.windowsTargetPlatformVersion_on2015() - p.action.set("vs2015") - systemversion "10.0.10240.0" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - 10.0.10240.0 - - ]] - end - ---- --- Check handling of systemversion("latest") ---- - -function suite.windowsTargetPlatformVersion_latest_on2015() - p.action.set("vs2015") - systemversion "latest" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - - ]] -end - - - function suite.windowsTargetPlatformVersion_latest_on2017() - p.action.set("vs2017") - systemversion "latest" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - $(LatestTargetPlatformVersion) - - ]] - end - - - function suite.windowsTargetPlatformVersion_latest_on2019() - p.action.set("vs2019") - systemversion "latest" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - 10.0 - - ]] - end - - ---- --- Check handling of per-configuration systemversion ---- - - function suite.windowsTargetPlatformVersion_perConfig_on2015() - p.action.set("vs2015") - systemversion "8.1" - filter "Debug" - systemversion "10.0.10240.0" - filter "Release" - systemversion "10.0.10240.1" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - 8.1 - - - 10.0.10240.0 - - - 10.0.10240.1 - - ]] - end - - - function suite.windowsTargetPlatformVersion_perConfig_on2017() - p.action.set("vs2017") - systemversion "8.1" - filter "Debug" - systemversion "latest" - filter "Release" - systemversion "10.0.10240.1" - prepare() - test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - 8.1 - - - $(LatestTargetPlatformVersion) - - - 10.0.10240.1 - - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_header.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_header.lua deleted file mode 100644 index d4ee0d26db..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_header.lua +++ /dev/null @@ -1,47 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_header.lua --- Validate generation of the project file header block. --- Copyright (c) 2011-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vc2010_header") - local vc2010 = p.vstudio.vc2010 - - --- --- If a default build target is specified, it should be included in the --- generated Project element. --- - - function suite.project_on2010() - p.action.set("vs2010") - vc2010.project() - test.capture [[ - - ]] - end - - function suite.project_on2011() - p.action.set("vs2012") - vc2010.project() - test.capture [[ - - ]] - end - - function suite.project_on2013() - p.action.set("vs2013") - vc2010.project() - test.capture [[ - - ]] - end - - function suite.project_on2019() - p.action.set("vs2019") - vc2010.project() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_item_def_group.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_item_def_group.lua deleted file mode 100644 index e6909b340e..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_item_def_group.lua +++ /dev/null @@ -1,98 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_item_def_group.lua --- Check the item definition groups, containing compile and link flags. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_item_def_group") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare(buildcfg) - local cfg = test.getconfig(prj, buildcfg or "Debug") - vc2010.itemDefinitionGroup(cfg) - end - - --- --- Check generation of opening element for typical C++ project. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - ]] - end - - --- --- Makefile projects omit the condition and all contents. --- - - function suite.structureIsCorrect_onMakefile() - kind "Makefile" - prepare() - test.capture [[ - - - ]] - end - - function suite.structureIsCorrect_onNone() - kind "Makefile" - prepare() - test.capture [[ - - - ]] - end - - - --- --- Because the item definition group for makefile projects is not --- tied to a particular condition, it should only get written for --- the first configuration. --- - - function suite.skipped_onSubsequentConfigs() - kind "Makefile" - prepare("Release") - test.isemptycapture() - end - - function suite.skipped_onSubsequentConfigs_onNone() - kind "None" - prepare("Release") - test.isemptycapture() - end - --- --- Utility projects include buildlog --- - function suite.utilityIncludesPath() - kind "Utility" - buildlog "MyCustomLogFile.log" - prepare() - test.capture [[ - - - MyCustomLogFile.log - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_language_settings.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_language_settings.lua deleted file mode 100644 index 58cf6996d8..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_language_settings.lua +++ /dev/null @@ -1,41 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_language_settings.lua --- Check the import language settings block of a VS 2010 project. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_language_settings") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - rule "MyRules" - rule "MyOtherRules" - wks = test.createWorkspace() - end - - local function prepare() - local prj = test.getproject(wks) - vc2010.importLanguageSettings(prj) - end - - --- --- Writes language settings. --- - - function suite.structureIsCorrect() - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_language_targets.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_language_targets.lua deleted file mode 100644 index 1065f24d20..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_language_targets.lua +++ /dev/null @@ -1,41 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_language_targets.lua --- Check the import language targets block of a VS 2010 project. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_language_targets") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - rule "MyRules" - rule "MyOtherRules" - wks = test.createWorkspace() - end - - local function prepare() - local prj = test.getproject(wks) - vc2010.importLanguageTargets(prj) - end - - --- --- Writes language targets. --- - - function suite.structureIsCorrect() - prepare() - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_link.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_link.lua deleted file mode 100644 index 1a420c023d..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_link.lua +++ /dev/null @@ -1,740 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_link.lua --- Validate linking and project references in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_link") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - kind "SharedLib" - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.linker(cfg) - end - - --- --- Check the basic element structure with default settings. --- - - function suite.defaultSettings() - kind "SharedLib" - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - - ]] - end - - --- --- Check the basic element structure with a release build. --- - - function suite.defaultSettings_onOptimize() - optimize "On" - prepare() - test.capture [[ - - Windows - true - true - bin\Debug\MyProject.lib - - ]] - end - - --- --- Check subsystem values with each project kind. --- - - function suite.subsystem_onConsoleApp() - kind "ConsoleApp" - prepare() - test.capture [[ - - Console - ]] - end - - function suite.subsystem_onWindowedApp() - kind "WindowedApp" - prepare() - test.capture [[ - - Windows - ]] - end - - function suite.subsystem_onSharedLib() - kind "SharedLib" - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - - ]] - end - - function suite.subsystem_onStaticLib() - kind "StaticLib" - prepare() - test.capture [[ - - Windows - - ]] - end - - --- --- Test the handling of the entrypoint API. --- - function suite.onEntryPoint() - kind "ConsoleApp" - entrypoint "foobar" - prepare() - test.capture [[ - - Console - foobar - - ]] - end - - --- --- Test the handling of the NoImplicitLink flag. --- - - function suite.linkDependencies_onNoImplicitLink() - flags "NoImplicitLink" - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - - - false - - ]] - end - --- --- Test the handling of the Symbols flag. --- - - function suite.generateDebugInfo_onSymbolsOn_on2010() - p.action.set("vs2010") - symbols "On" - prepare() - test.capture [[ - - Windows - true - ]] - end - - function suite.generateDebugInfo_onSymbolsFastLink_on2010() - p.action.set("vs2010") - symbols "FastLink" - prepare() - test.capture [[ - - Windows - true - ]] - end - - function suite.generateDebugInfo_onSymbolsFull_on2010() - p.action.set("vs2010") - symbols "Full" - prepare() - test.capture [[ - - Windows - true - ]] - end - - function suite.generateDebugInfo_onSymbolsOn_on2015() - p.action.set("vs2015") - symbols "On" - prepare() - test.capture [[ - - Windows - true - ]] - end - - function suite.generateDebugInfo_onSymbolsFastLink_on2015() - p.action.set("vs2015") - symbols "FastLink" - prepare() - test.capture [[ - - Windows - true - DebugFastLink - ]] - end - - function suite.generateDebugInfo_onSymbolsFull_on2015() - p.action.set("vs2015") - symbols "Full" - prepare() - test.capture [[ - - Windows - true - ]] - end - - function suite.generateDebugInfo_onSymbolsFull_on2017() - p.action.set("vs2017") - symbols "Full" - prepare() - test.capture [[ - - Windows - DebugFull - ]] - end - - function suite.generateDebugInfo_onSymbolsFull_on2019() - p.action.set("vs2019") - symbols "Full" - prepare() - test.capture [[ - - Windows - DebugFull - ]] - end --- --- Test the handling of the SymbolsPath flag. --- - - function suite.generateProgramDataBaseFile_onStaticLib() - kind "StaticLib" - - symbols "On" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - - ]] - end - - function suite.generateProgramDataBaseFile_onSharedLib() - kind "SharedLib" - - symbols "On" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsOn_on2010() - p.action.set("vs2010") - symbols "On" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsFastLink_on2010() - p.action.set("vs2010") - symbols "Off" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsFull_on2010() - p.action.set("vs2010") - symbols "Full" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsOn_on2015() - p.action.set("vs2015") - symbols "On" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsFastLink_on2015() - p.action.set("vs2015") - symbols "FastLink" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - DebugFastLink - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsFull_on2015() - p.action.set("vs2015") - symbols "Full" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - true - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsFull_on2017() - p.action.set("vs2017") - symbols "Full" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - DebugFull - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end - - function suite.generateProgramDatabaseFile_onSymbolsFull_on2019() - p.action.set("vs2019") - symbols "Full" - symbolspath "$(IntDir)$(TargetName).pdb" - prepare() - test.capture [[ - - Windows - DebugFull - bin\Debug\MyProject.lib - $(IntDir)$(TargetName).pdb - - ]] - end --- --- Any system libraries specified in links() should be listed as --- additional dependencies. --- - - function suite.additionalDependencies_onSystemLinks() - links { "lua", "zlib" } - prepare() - test.capture [[ - - Windows - lua.lib;zlib.lib;%(AdditionalDependencies) - ]] - end - - function suite.additionalDependencies_onSystemLinksStatic() - kind "StaticLib" - links { "lua", "zlib" } - prepare() - test.capture [[ - - Windows - - - lua.lib;zlib.lib;%(AdditionalDependencies) - - ]] - end - - --- --- Any system libraries specified in links() with valid extensions should --- be listed with those extensions. --- - - function suite.additionalDependencies_onSystemLinksExtensions() - links { "lua.obj", "zlib.lib" } - prepare() - test.capture [[ - - Windows - lua.obj;zlib.lib;%(AdditionalDependencies) - ]] - end - - function suite.additionalDependencies_onSystemLinksExtensionsStatic() - kind "StaticLib" - links { "lua.obj", "zlib.lib" } - prepare() - test.capture [[ - - Windows - - - lua.obj;zlib.lib;%(AdditionalDependencies) - - ]] - end - - --- --- Any system libraries specified in links() with multiple dots should --- only have .lib appended to the end when no valid extension is found --- - - function suite.additionalDependencies_onSystemLinksExtensionsMultipleDots() - links { "lua.5.3.lib", "lua.5.4" } - prepare() - test.capture [[ - - Windows - lua.5.3.lib;lua.5.4.lib;%(AdditionalDependencies) - ]] - end - - function suite.additionalDependencies_onSystemLinksExtensionsMultipleDotsStatic() - kind "StaticLib" - links { "lua.5.3.lib", "lua.5.4" } - prepare() - test.capture [[ - - Windows - - - lua.5.3.lib;lua.5.4.lib;%(AdditionalDependencies) - - ]] - end - - --- --- Additional library directories should be specified, relative to the project. --- - - function suite.additionalLibraryDirectories_onLibDirs() - libdirs { "../lib", "../lib64" } - prepare() - test.capture [[ - - Windows - ..\lib;..\lib64;%(AdditionalLibraryDirectories) - ]] - end - - --- --- Sibling projects do not need to be listed in additional dependencies, as Visual --- Studio will link them implicitly. --- - - function suite.excludeSiblings() - links { "MyProject2" } - test.createproject(wks) - kind "SharedLib" - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - - ]] - end - - --- --- If the NoImplicitLink flag is set, all dependencies should be listed explicitly. --- - - function suite.includeSiblings_onNoImplicitLink() - flags { "NoImplicitLink" } - links { "MyProject2" } - test.createproject(wks) - kind "SharedLib" - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject2.lib;%(AdditionalDependencies) - bin\Debug\MyProject.lib - - - false - - ]] - end - - --- --- Static libraries do not link dependencies directly, to maintain --- compatibility with GCC and others. --- - - function suite.additionalDependencies_onSystemLinksAndStaticLib() - kind "StaticLib" - links { "lua", "zlib" } - libdirs { "../lib", "../lib64" } - prepare() - test.capture [[ - - Windows - - ]] - end - - --- --- Check handling of the import library settings. --- - - function suite.importLibrary_onImpLibDir() - implibdir "../lib" - prepare() - test.capture [[ - - Windows - ..\lib\MyProject.lib - - ]] - end - - - --- --- Check handling of additional options. --- - - function suite.additionalOptions_onNonStaticLib() - kind "SharedLib" - linkoptions { "/kupo" } - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - /kupo %(AdditionalOptions) - ]] - end - - function suite.additionalOptions_onStaticLib() - kind "StaticLib" - linkoptions { "/kupo" } - prepare() - test.capture [[ - - Windows - - - /kupo %(AdditionalOptions) - - ]] - end - - --- --- Enable reference optimizing if Optimize flag is specified. --- - - function suite.optimizeReferences_onOptimizeFlag() - optimize "On" - prepare() - test.capture [[ - - Windows - true - true - ]] - end - - --- --- Correctly handle module definition (.def) files. --- - - function suite.recognizesModuleDefinitionFile() - files { "hello.cpp", "hello.def" } - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - hello.def - - ]] - end - - --- --- Managed assembly references should not be listed in additional dependencies. --- - - function suite.ignoresAssemblyReferences() - links { "kernel32", "System.dll", "System.Data.dll" } - prepare() - test.capture [[ - - Windows - kernel32.lib;%(AdditionalDependencies) - ]] - end - --- --- Check handling of warning flags. --- - - function suite.fatalWarnings_onDynamicLink() - kind "ConsoleApp" - flags { "FatalLinkWarnings" } - prepare() - test.capture [[ - - Console - true - ]] - end - - function suite.fatalWarnings_onStaticLink() - kind "StaticLib" - flags { "FatalLinkWarnings" } - prepare() - test.capture [[ - - Windows - - - true - - ]] - end - - --- --- Test generating .map files. --- - - function suite.generateMapFile_onMapsFlag() - flags { "Maps" } - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - true - - ]] - end - --- --- Test ignoring default libraries with extensions specified. --- - - function suite.ignoreDefaultLibraries_WithExtensions() - ignoredefaultlibraries { "lib1.lib", "lib2.obj" } - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - lib1.lib;lib2.obj - - ]] - end - --- --- Test ignoring default libraries without extensions specified. --- - - function suite.ignoreDefaultLibraries_WithoutExtensions() - ignoredefaultlibraries { "lib1", "lib2.obj" } - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - lib1.lib;lib2.obj - - ]] - end - - -- --- Test ignoring default libraries with extensions specified. --- - - function suite.assemblyDebug() - assemblydebug "true" - prepare() - test.capture [[ - - Windows - bin\Debug\MyProject.lib - true - - ]] - end \ No newline at end of file diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_manifest.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_manifest.lua deleted file mode 100644 index c94f7eb304..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_manifest.lua +++ /dev/null @@ -1,88 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_manifest.lua --- Validate generation of Manifest block in Visual Studio 201x C/C++ projects. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_manifest") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - kind "ConsoleApp" - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.manifest(cfg) - end - - --- --- Check the basic element structure with default settings. --- - - function suite.defaultSettings() - files { "source/test.manifest" } - prepare() - test.capture [[ - - source/test.manifest;%(AdditionalManifestFiles) - - ]] - end - --- --- Check that there is no manifest when using static lib --- - - function suite.staticLib() - kind "StaticLib" - files { "test.manifest" } - prepare() - test.isemptycapture() - end - --- --- Check that DPI Awareness emits correctly --- - - function suite.dpiAwareness_None() - dpiawareness "None" - prepare() - test.capture [[ - - false - - ]] - end - - function suite.dpiAwareness_High() - dpiawareness "High" - prepare() - test.capture [[ - - true - - ]] - end - - function suite.dpiAwareness_HighPerMonitor() - dpiawareness "HighPerMonitor" - prepare() - test.capture [[ - - PerMonitorHighDPIAware - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_nmake_props.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_nmake_props.lua deleted file mode 100644 index 0a74746e56..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_nmake_props.lua +++ /dev/null @@ -1,203 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_nmake_props.lua --- Check makefile project generation. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_nmake_props") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - kind "Makefile" - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.nmakeProperties(cfg) - end - - --- --- Check the structure with the default project values. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - $(OutDir)MyProject - - ]] - end - - --- --- Element should be skipped for non-Makefile projects. --- - - function suite.skips_onNonMakefile() - kind "ConsoleApp" - prepare() - test.isemptycapture() - end - - --- --- Make sure the target file extension is included. --- - - function suite.usesTargetExtension() - targetextension ".exe" - prepare() - test.capture [[ - - $(OutDir)MyProject.exe - - ]] - end - - --- --- Verify generation of the build commands. --- - - function suite.buildCommandLine_onSingleCommand() - buildcommands { "command 1" } - prepare() - test.capture [[ - - $(OutDir)MyProject - command 1 - - ]] - end - - function suite.buildCommandLine_onMultipleCommands() - buildcommands { "command 1", "command 2" } - prepare() - test.capture [[ - - $(OutDir)MyProject - command 1 -command 2 - - ]] - end - - function suite.rebuildCommandLine() - rebuildcommands { "command 1" } - prepare() - test.capture [[ - - $(OutDir)MyProject - command 1 - - ]] - end - - function suite.cleanCommandLine() - cleancommands { "command 1" } - prepare() - test.capture [[ - - $(OutDir)MyProject - command 1 - - ]] - end - - function suite.onDefines() - defines { "DEBUG", "_DEBUG" } - prepare() - test.capture [[ - - $(OutDir)MyProject - DEBUG;_DEBUG;$(NMakePreprocessorDefinitions) - - ]] - end - - function suite.onEscapedDefines() - p.escaper(p.vstudio.vs2010.esc) - defines { "&", "<", ">" } - prepare() - test.capture [[ - - $(OutDir)MyProject - &;<;>;$(NMakePreprocessorDefinitions) - - ]] - p.escaper(nil) - end - - function suite.onIncludeDirs() - includedirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - $(OutDir)MyProject - include\lua;include\zlib - - ]] - end - - function suite.onBinDirs() - bindirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - $(ProjectDir)include\lua;$(ProjectDir)include\zlib;$(ExecutablePath) - $(OutDir)MyProject - - ]] - end - - function suite.onSysIncludeDirs() - sysincludedirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - include\lua;include\zlib;$(IncludePath) - $(OutDir)MyProject - - ]] - end - - function suite.onSysLibDirs() - syslibdirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - include\lua;include\zlib;$(LibraryPath) - $(OutDir)MyProject - - ]] - end - - --- --- Should not emit include dirs or preprocessor definitions if the project --- kind is "None", since that project is by definition not buildable. ---- - - function suite.noIncludeDirsOrPreprocessorDefs_onKindNone() - kind "None" - defines { "DEBUG", "_DEBUG" } - includedirs { "include/lua", "include/zlib" } - prepare() - test.capture [[ - - $(OutDir)MyProject - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_package_references.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_package_references.lua deleted file mode 100644 index 0808682577..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_package_references.lua +++ /dev/null @@ -1,71 +0,0 @@ --- --- tests/actions/vstudio/vs2010/test_nuget_package_references.lua --- Validate generation of NuGet packages references for Visual Studio 2017 and newer. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_nuget_package_references") - local cs2005 = p.vstudio.cs2005 - local nuget2010 = p.vstudio.nuget2010 - local dotnetbase = p.vstudio.dotnetbase - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("vs2017") - wks = test.createWorkspace() - configurations {'Debug','Release'} - language "C#" - end - - local function prepare(platform) - prj = test.getproject(wks, 1) - dotnetbase.packageReferences(prj) - end - - --- --- Should not output anything if no packages have been set. --- - - function suite.noOutputIfNoPackages() - prepare() - test.isemptycapture() - end - - --- --- Writes the packages.config file properly. --- - - function suite.structureIsCorrect() - nuget { "Newtonsoft.Json:10.0.2", "NUnit:3.6.1", "SSH.NET:2016.0.0" } - prepare() - test.capture [[ - - - - - -]] - end - - - function suite.configStructureIsCorrect() - nuget { "NUnit:3.6.1", "SSH.NET:2016.0.0" } - filter { "configurations:Debug" } - nuget { "Newtonsoft.Json:10.0.2" } - prepare() - test.capture [[ - - - - - -]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_packages_config.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_packages_config.lua deleted file mode 100644 index 623c67e4b7..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_nuget_packages_config.lua +++ /dev/null @@ -1,57 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_nuget_packages_config.lua --- Validate generation of NuGet packages.config file for Visual Studio 2010 and newer. --- Copyright (c) 2017 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_nuget_packages_config") - local vc2010 = p.vstudio.vc2010 - local nuget2010 = p.vstudio.nuget2010 - local project = p.project - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - local prj = p.workspace.getproject(wks, 1) - nuget2010.generatePackagesConfig(prj) - end - - --- --- Should not output anything if no packages have been set. --- - - function suite.noOutputIfNoPackages() - prepare() - test.isemptycapture() - end - - - --- --- Writes the packages.config file properly. --- - - function suite.structureIsCorrect() - nuget { "boost:1.59.0-b1", "sdl2.v140:2.0.3", "sdl2.v140.redist:2.0.3" } - prepare() - test.capture [[ - - - - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_output_props.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_output_props.lua deleted file mode 100644 index 71fb27fa68..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_output_props.lua +++ /dev/null @@ -1,287 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_output_props.lua --- Validate generation of the output property groups. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_output_props") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.outputProperties(cfg) - end - - --- --- Check the structure with the default project values. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - - ]] - end - - --- --- This entire block gets skipped for Makefile projects. --- - - function suite.omitsBlock_onMakefile() - kind "Makefile" - prepare() - test.isemptycapture() - end - - function suite.omitsBlock_onNone() - kind "Makefile" - prepare() - test.isemptycapture() - end - --- --- Static libraries should omit the link incremental element entirely. --- - - function suite.omitLinkIncremental_onStaticLib() - kind "StaticLib" - prepare() - test.capture [[ - - bin\Debug\ - ]] - end - --- --- Optimized builds should not link incrementally. --- - - function suite.noIncrementalLink_onOptimizedBuild() - optimize "On" - prepare() - test.capture [[ - - false - ]] - end - --- --- The target directory is applied, if specified. --- - - function suite.outDir_onTargetDir() - targetdir "../bin" - prepare() - test.capture [[ - - true - ..\bin\ - ]] - end - --- --- The objeccts directory is applied, if specified. --- - - function suite.intDir_onTargetDir() - objdir "../tmp" - prepare() - test.capture [[ - - true - bin\Debug\ - ..\tmp\Debug\ - ]] - end - --- --- The target name is applied, if specified. --- - - function suite.targetName_onTargetName() - targetname "MyTarget" - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyTarget - ]] - end - --- --- If the NoImportLib flag is set, add the IgnoreImportLibrary element. --- - - function suite.ignoreImportLib_onNoImportLib() - kind "SharedLib" - flags "NoImportLib" - prepare() - test.capture [[ - - true - true - ]] - end - - function suite.omitIgnoreImportLib_onNonSharedLib() - kind "ConsoleApp" - flags "NoImportLib" - prepare() - test.capture [[ - - true - bin\Debug\ - ]] - end - - --- --- If the NoManifest flag is set, add the GenerateManifest element. --- - - function suite.generateManifest_onNoManifest() - flags "NoManifest" - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - false - ]] - end - - ---- --- The should be split if there is no extension. ---- - - function suite.splitTargetExt_onNoTargetExtension() - targetextension "" - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - - - - ]] - end - - - --- --- Check the handling of extra cleaning extensions. --- - - function suite.extensionsToDeleteOnClean() - cleanextensions { ".temp1", ".temp2" } - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - *.temp1;*.temp2;$(ExtensionsToDeleteOnClean) - - ]] - end - - --- --- Check the handling of the VC++ Directories. --- - - function suite.onSystemIncludeDirs() - sysincludedirs { "$(DXSDK_DIR)/Include" } - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - $(DXSDK_DIR)\Include;$(IncludePath) - - ]] - end - - function suite.onSystemLibraryDirs() - syslibdirs { "$(DXSDK_DIR)/lib/x86" } - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - $(DXSDK_DIR)\lib\x86;$(LibraryPath) - - ]] - end - --- --- Check the handling of the VC++ ExecutablePath. --- - - function suite.onBinDirsRelative() - bindirs { "../Include" } - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - $(ProjectDir)..\Include;$(ExecutablePath) - - ]] - end - - function suite.onBinDirsAbsolute() - bindirs { "C:\\Include" } - prepare() - test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - C:\Include;$(ExecutablePath) - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_platform_toolset.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_platform_toolset.lua deleted file mode 100644 index eb1bc3c8e5..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_platform_toolset.lua +++ /dev/null @@ -1,124 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_platform_toolset.lua --- Validate VC platform toolset generation. --- Copyright (c) 2013-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_platform_toolset") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2012") - wks, prj = test.createWorkspace() - files "hello.cpp" - end - - local function prepare() - cfg = test.getconfig(prj, "Debug") - vc2010.platformToolset(cfg) - end - - - --- --- Check default values for each version. --- - - function suite.correctDefault_onVS2010() - p.action.set("vs2010") - prepare() - test.capture [[ -v100 - ]] - end - - - function suite.correctDefault_onVS2012() - p.action.set("vs2012") - prepare() - test.capture [[ -v110 - ]] - end - - - function suite.correctDefault_onVS2013() - p.action.set("vs2013") - prepare() - test.capture [[ -v120 - ]] - end - - --- --- Check for overrides from project scripts. --- - - function suite.canOverrideFromScript_withV() - toolset "v90" - prepare() - test.capture [[ -v90 - ]] - end - - function suite.canOverrideFromScript_withMsc() - toolset "msc-100" - prepare() - test.capture [[ -v100 - ]] - end - - function suite.canOverrideFromScript_withXP() - toolset "v120_xp" - prepare() - test.capture [[ -v120_xp - ]] - end - - function suite.canOverrideFromScript_withLLVM() - toolset "msc-llvm-vs2014_xp" - prepare() - test.capture [[ -LLVM-vs2014_xp - ]] - end - --- --- Check if platform toolset element is being emitted correctly. --- - - function suite.output_onConsoleAppAndNoCpp() - kind "ConsoleApp" - removefiles "hello.cpp" - prepare() - test.capture [[ -v110 - ]] - end - - function suite.skipped_onNoMakefileAndNoCpp() - kind "Makefile" - removefiles "hello.cpp" - prepare() - test.isemptycapture() - end - - function suite.output_onNoMakefileAndCpp() - kind "Makefile" - prepare() - test.capture [[ -v110 - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_project_configs.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_project_configs.lua deleted file mode 100644 index 3068f64c7c..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_project_configs.lua +++ /dev/null @@ -1,106 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_project_configs.lua --- Test the Visual Studio 2010 project configurations item group. --- Copyright (c) 2009-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vc2010_project_configs") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - vc2010.projectConfigurations(prj) - end - - --- --- If no architectures are specified, Win32 should be the default. --- - - function suite.win32Listed_onNoPlatforms() - prepare() - test.capture [[ - - - Debug - Win32 - - - Release - Win32 - - - ]] - end - - --- --- Visual Studio requires that all combinations of configurations and --- architectures be listed (even if some pairings would make no sense --- for our build, i.e. Win32 DLL DCRT|PS3). --- - - function suite.allArchitecturesListed_onMultipleArchitectures() - platforms { "32b", "64b" } - filter "platforms:32b" - architecture "x86" - filter "platforms:64b" - architecture "x86_64" - prepare() - test.capture [[ - - - Debug 32b - Win32 - - - Debug 32b - x64 - - - Debug 64b - Win32 - - - Debug 64b - x64 - - - ]] - end - - --- --- Sometimes unrolling the configuration-architecture combinations --- can cause duplicates. Make sure those get removed. --- - - function suite.allArchitecturesListed_onImplicitArchitectures() - platforms { "x86", "x86_64" } - prepare() - test.capture [[ - - - Debug - Win32 - - - Debug - x64 - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_project_refs.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_project_refs.lua deleted file mode 100644 index 1609bba720..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_project_refs.lua +++ /dev/null @@ -1,116 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_project_refs.lua --- Validate project references in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_project_refs") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - uuid "00112233-4455-6677-8888-99AABBCCDDEE" - test.createproject(wks) - end - - local function prepare(platform) - prj = test.getproject(wks, 2) - vc2010.projectReferences(prj) - end - - --- --- If there are no sibling projects listed in links(), then the --- entire project references item group should be skipped. --- - - function suite.noProjectReferencesGroup_onNoSiblingReferences() - prepare() - test.isemptycapture() - end - --- --- If a sibling project is listed in links(), an item group should --- be written with a reference to that sibling project. --- - - function suite.projectReferenceAdded_onSiblingProjectLink() - links { "MyProject" } - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - - - ]] - end - --- --- Project references should always be specified relative to the --- project doing the referencing. --- - - function suite.referencesAreRelative_onDifferentProjectLocation() - links { "MyProject" } - location "build/MyProject2" - project("MyProject") - location "build/MyProject" - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - - - ]] - end - - --- --- Managed C++ projects write out references a little differently. --- - - function suite.referencesAreRelative_onDifferentProjectLocationWithCLR() - links { "MyProject" } - clr "On" - prepare() - test.capture [[ - - - {00112233-4455-6677-8888-99AABBCCDDEE} - true - true - false - true - false - - - ]] - end - - --- --- Shared items projects are referenced differently --- - - function suite.sharedItemsProjects() - links { "MyProject" } - project("MyProject") - kind "SharedItems" - prepare() - test.capture [[ - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_prop_sheet.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_prop_sheet.lua deleted file mode 100644 index a343783465..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_prop_sheet.lua +++ /dev/null @@ -1,41 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_prop_sheet.lua --- Validate generation of the property sheet import groups. --- Copyright (c) 2011-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_prop_sheet") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.propertySheets(cfg) - end - - --- --- Check the structure with the default project values. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - test.capture [[ - - - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_resource_compile.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_resource_compile.lua deleted file mode 100644 index 5532c8aded..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_resource_compile.lua +++ /dev/null @@ -1,105 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_resource_compile.lua --- Validate resource compiler settings in Visual Studio 2010 C/C++ projects. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vs2010_resource_compiler") - local vc2010 = p.vstudio.vc2010 - local project = p.project - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - p.escaper(p.vstudio.vs2010.esc) - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.resourceCompile(cfg) - end - - --- --- Should only write the element if it is needed. --- - - function suite.excluded_onNoResourceFiles() - prepare() - test.isemptycapture() - end - - function suite.excluded_onNoSettings() - files { "hello.rc" } - prepare() - test.isemptycapture() - end - --- --- If defines are specified, the element should be added. --- - - function suite.preprocessorDefinitions_onDefines() - files { "hello.rc" } - defines { "DEBUG" } - resdefines { "RESOURCES" } - prepare() - test.capture [[ - - DEBUG;RESOURCES;%(PreprocessorDefinitions) - ]] - end - - --- --- If include directories are specified, the should be added. --- - - function suite.additionalIncludeDirs_onIncludeDirs() - files { "hello.rc" } - includedirs { "include/lua" } - resincludedirs { "include/zlib" } - prepare() - test.capture [[ - - include\lua;include\zlib;%(AdditionalIncludeDirectories) - ]] - end - - --- --- Test special escaping for preprocessor definition with quotes. --- - - function suite.preprocessorDefinitions_onDefinesEscaping() - files { "hello.rc" } - defines { 'VERSION_STRING="1.0.0 (testing)"' } - prepare() - test.capture [[ - - VERSION_STRING=\"1.0.0 (testing)\";%(PreprocessorDefinitions) - ]] - end - - --- --- Test locale conversion to culture codes. --- - - function suite.culture_en_US() - files { "hello.rc" } - locale "en-US" - prepare() - test.capture [[ - - 0x0409 - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_props.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_props.lua deleted file mode 100644 index 8b61eec2c6..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_props.lua +++ /dev/null @@ -1,70 +0,0 @@ --- --- tests/actions/vstudio/vc2010/vstudio_vs2010_rule_props.lua --- Validate generation of custom rules --- Author Tom van Dijck --- Copyright (c) 2016 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_rule_props") - local vc2010 = p.vstudio.vc2010 - local m = p.vstudio.vs2010.rules.props - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - rule 'example' - display 'Example compiler' - fileExtension '.example' - - propertydefinition { - name = "output_path", - kind = "string", - display = "Output Path", - description = "", - } - - buildmessage 'Compiling %{file.basename} with example-compiler...' - buildcommands { - 'package-example-compiler.exe %{output_path} "%{file.relpath}"' - } - buildoutputs { - '%{output_path}%{file.basename}.example.cc', - '%{output_path}%{file.basename}.example.h' - } - end - - - --- --- commandLineTemplates --- - - function suite.commandLineTemplates() - local r = test.getRule("example") - m.commandLineTemplates(r) - - test.capture [[ -package-example-compiler.exe [output_path] "%(Identity)" - ]] - end - --- --- executionDescription --- - - function suite.executionDescription() - local r = test.getRule("example") - m.executionDescription(r) - - test.capture [[ -Compiling %(Filename) with example-compiler... - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_targets.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_targets.lua deleted file mode 100644 index 21bda828ef..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_targets.lua +++ /dev/null @@ -1,97 +0,0 @@ --- --- tests/actions/vstudio/vc2010/vstudio_vs2010_rule_targets.lua --- Validate generation of custom rules --- Author Tom van Dijck --- Copyright (c) 2016 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_rule_targets") - local vc2010 = p.vstudio.vc2010 - local m = p.vstudio.vs2010.rules.targets - - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - rule 'example' - display 'Example compiler' - fileExtension '.example' - - propertydefinition { - name = "output_path", - kind = "string", - display = "Output Path", - description = "", - } - - buildmessage 'Compiling %{file.basename} with example-compiler...' - buildcommands { - 'package-example-compiler.exe %{output_path} "%{file.relpath}"' - } - buildoutputs { - '%{output_path}%{file.basename}.example.cc', - '%{output_path}%{file.basename}.example.h' - } - end - - - --- --- availableItemName --- - - function suite.availableItemName() - local r = test.getRule("example") - m.availableItemName(r) - - test.capture [[ - - _example - - ]] - end - - --- --- computedProperties --- - - function suite.computedProperties() - local r = test.getRule("example") - m.computedProperties(r) - - test.capture [[ - - - %(output_path)%(Filename).example.cc;%(output_path)%(Filename).example.h - - - ]] - end - - - --- --- usingTask --- - - function suite.usingTask() - local r = test.getRule("example") - m.usingTask(r) - - test.capture [[ - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_vars.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_vars.lua deleted file mode 100644 index bb85847d9a..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_vars.lua +++ /dev/null @@ -1,135 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_rule_vars.lua --- Validate generation of custom rule variables at the project level. --- Author Jason Perkins --- Copyright (c) 2014-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_rule_vars") - local vc2010 = p.vstudio.vc2010 - - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - rule "MyRule" - wks, prj = test.createWorkspace() - rules { "MyRule" } - end - - local function createVar(def) - rule "MyRule" - propertydefinition(def) - project "MyProject" - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - vc2010.ruleVars(cfg) - end - - --- --- If the configuration has a rule, but does not set any variables, --- nothing should be written. --- - - function suite.noOutput_onNoVars() - prepare() - test.isemptycapture() - end - - --- --- Test setting the various property kinds. --- - - function suite.onBooleanVar() - createVar { name="MyVar", kind="boolean" } - myRuleVars { MyVar = false } - prepare() - test.capture [[ - - false - - ]] - end - - - function suite.onEnumVar() - createVar { - name = "MyVar", - values = { - [0] = "Win32", - [1] = "Win64", - }, - switch = { - [0] = "-m32", - [1] = "-m64", - }, - value = 0, - } - myRuleVars { MyVar = "Win32" } - prepare() - test.capture [[ - - 0 - - ]] - end - - - function suite.onListVar() - createVar { name="MyVar", kind="list" } - myRuleVars { MyVar = { "a", "b", "c" } } - prepare() - test.capture [[ - - a;b;c - - ]] - end - - - function suite.onCustomListSeparator() - createVar { name="MyVar", kind="list", separator="," } - myRuleVars { MyVar = { "a", "b", "c" } } - prepare() - test.capture [[ - - a;b;c - - ]] - end - - - function suite.onPathVar() - createVar { name="MyVar", kind="path" } - myRuleVars { MyVar = "../path/to/file" } - prepare() - test.capture [[ - - ..\path\to\file - - ]] - end - - - function suite.onStringVar() - createVar { name="MyVar", kind="string" } - myRuleVars { MyVar = "hello" } - prepare() - test.capture [[ - - hello - - ]] - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_xml.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_xml.lua deleted file mode 100644 index c999ed5d10..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_rule_xml.lua +++ /dev/null @@ -1,238 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_rule_xml.lua --- Validate generation of custom rules --- Author Jason Perkins --- Copyright (c) 2016 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_rule_xml") - local vc2010 = p.vstudio.vc2010 - local m = p.vstudio.vs2010.rules.xml - - --- --- Setup --- - - function suite.setup() - p.action.set("vs2010") - rule "MyRule" - wks, prj = test.createWorkspace() - rules { "MyRule" } - end - - local function createVar(def) - rule "MyRule" - propertydefinition(def) - project "MyProject" - end - - - ---- --- Property definitions ---- - - function suite.properties_onStringNoSwitch() - createVar { name="MyVar", kind="string" } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end - - function suite.properties_onString() - createVar { name="MyVar", kind="string", switch="[value]" } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end - - function suite.properties_onStringWithNoKind() - createVar { name="MyVar" } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end - - - function suite.properties_onBooleanNoSwitch() - createVar { name="MyVar", kind="boolean" } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end - - function suite.properties_onBoolean() - createVar { name="MyVar", kind="boolean", switch="[value]" } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end - - function suite.properties_onEnum() - createVar { - name = "OptimizationLevel", - display = "Optimization Level", - values = { - [0] = "None", - [1] = "Size", - [2] = "Speed", - }, - switch = { - [0] = "-O0", - [1] = "-O1", - [2] = "-O3", - }, - value = 2, - } - - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - - - - - ]] - end - - function suite.properties_onEnumNoSwitches() - createVar { - name = "OptimizationLevel", - display = "Optimization Level", - values = { - [0] = "None", - [1] = "Size", - [2] = "Speed", - }, - value = 2, - } - - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - - - - - ]] - end - - function suite.properties_onStringWithCategory() - createVar { name="MyVar", kind="string", category="Custom Category" } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end - - function suite.categories_onStringWithCategory() - createVar { name="MyVar", kind="string", category="Custom Category" } - local r = test.getRule("MyRule") - m.categories(r) - test.capture [[ - - - - General - - - - - Custom Category - - - - - Command Line - - - - ]] - end - - function suite.properties_onListWithSeparator() - createVar { name="MyVar", kind="list", separator="," } - local r = test.getRule("MyRule") - m.properties(r) - test.capture [[ - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_target_machine.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_target_machine.lua deleted file mode 100644 index 25b73ff512..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_target_machine.lua +++ /dev/null @@ -1,89 +0,0 @@ ---- --- tests/actions/vstudio/vc2010/test_target_machine.lua --- Validate generation of the element --- Copyright (c) 2015 Jason Perkins and the Premake project ---- - - local p = premake - local suite = test.declare("vstudio_vs2010_target_machine") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare(platform) - local cfg = test.getconfig(prj, "Debug", platform) - vc2010.targetMachine(cfg) - end - - - --- --- Emit if a static lib project contains a resource file and an --- architecture is specified. --- - - function suite.emitsOnStaticLibWithX86() - kind "StaticLib" - architecture "x86" - files { "hello.rc" } - prepare() - test.capture [[ -MachineX86 - ]] - end - - function suite.emitsOnStaticLibWithX86_64() - kind "StaticLib" - architecture "x86_64" - files { "hello.rc" } - prepare() - test.capture [[ -MachineX64 - ]] - end - - - --- --- Other combinations should NOT emit anything --- - - function suite.isIgnoredOnStaticLibNoArch() - kind "StaticLib" - files { "hello.rc" } - prepare() - test.isemptycapture() - end - - function suite.isIgnoredOnStaticLibNoResource() - kind "StaticLib" - architecture "x86" - prepare() - test.isemptycapture() - end - - function suite.isIgnoredOnConsoleApp() - kind "ConsoleApp" - architecture "x86" - files { "hello.rc" } - prepare() - test.isemptycapture() - end - - function suite.isIgnoredOnSharedLib() - kind "SharedLib" - architecture "x86" - files { "hello.rc" } - prepare() - test.isemptycapture() - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_tokens.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_tokens.lua deleted file mode 100644 index 65e3749c2c..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_tokens.lua +++ /dev/null @@ -1,91 +0,0 @@ --- --- test_tokens.lua --- Generate a NuGet packages.config file. --- Copyright (c) Jason Perkins and the Premake project --- - - - local p = premake - local suite = test.declare("vstudio_vs2010_tokens") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - vc2010.files(prj) - end - - - - function suite.customBuild_onBuildRuleMultipleBuildOutputs() - location "projects" - files { "hello.cg" } - - filter "files:**.cg" - buildcommands { "cgc %{file.relpath}" } - buildoutputs { "%{file.basename}.a", "%{file.basename}.b" } - prepare() - test.capture [[ - - - Document - cgc %(Identity) - ../hello.a;../hello.b - - - ]] - end - - function suite.customBuild_onBuildRuleWithMessage() - location "projects" - files { "hello.cg" } - filter "files:**.cg" - buildmessage "Compiling shader %{file.relpath}" - buildcommands { "cgc %{file.relpath}" } - buildoutputs { "%{file.basename}.obj" } - prepare() - test.capture [[ - - - Document - cgc %(Identity) - ../hello.obj - Compiling shader %(Identity) - - - ]] - end - - function suite.customBuild_onBuildRuleWithAdditionalInputs() - location "projects" - files { "hello.cg" } - filter "files:**.cg" - buildcommands { "cgc %{file.relpath}" } - buildoutputs { "%{file.basename}.obj" } - buildinputs { "common.cg.inc", "common.cg.inc2" } - prepare() - test.capture [[ - - - Document - cgc %(Identity) - ../hello.obj - ../common.cg.inc;../common.cg.inc2 - - - ]] - end - - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_user_file.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_user_file.lua deleted file mode 100644 index d34b9c442b..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_user_file.lua +++ /dev/null @@ -1,49 +0,0 @@ --- --- tests/actions/vstudio/vc2010/test_user_file.lua --- Verify handling of empty and non-empty .user files for VC'201x. --- Copyright (c) 2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2010_user_file") - local vc2010 = p.vstudio.vc2010 - - --- --- Setup --- - - local wks - - function suite.setup() - p.action.set("vs2010") - wks = test.createWorkspace() - end - - local function prepare() - local prj = test.getproject(wks, 1) - vc2010.generateUser(prj) - end - - --- --- If no debugger settings have been specified, then the .user --- file should not be written at all. --- - - function suite.noOutput_onNoSettings() - prepare() - test.isemptycapture() - end - - --- --- If a debugger setting has been specified, output. --- - - function suite.doesOutput_onDebugSettings() - debugcommand "bin/emulator.exe" - prepare() - test.hasoutput() - end - diff --git a/build/premake/premake5/modules/vstudio/tests/vc2010/test_vectorextensions.lua b/build/premake/premake5/modules/vstudio/tests/vc2010/test_vectorextensions.lua deleted file mode 100644 index 313248dc9d..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2010/test_vectorextensions.lua +++ /dev/null @@ -1,93 +0,0 @@ ---- --- tests/actions/vstudio/vc2010/test_vectorextensions.lua --- Validate handling of vectorextensions() in VS 2010 C/C++ projects. --- --- Created 26 Mar 2015 by Jason Perkins --- Copyright (c) 2015 Jason Perkins and the Premake project ---- - - local p = premake - local suite = test.declare("vs2010_vc_vectorextensions") - local m = p.vstudio.vc2010 - - - local wks, prj - - function suite.setup() - p.action.set("vs2010") - wks, prj = test.createWorkspace() - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - m.enableEnhancedInstructionSet(cfg) - end - - - - function suite.instructionSet_onNotSet() - test.isemptycapture() - end - - - function suite.instructionSet_onIA32_onVS2010() - vectorextensions "IA32" - prepare() - test.isemptycapture() - end - - function suite.instructionSet_onIA32() - p.action.set("vs2012") - vectorextensions "IA32" - prepare() - test.capture [[ -NoExtensions - ]] - end - - function suite.instructionSet_onSSE() - vectorextensions "SSE" - prepare() - test.capture [[ -StreamingSIMDExtensions - ]] - end - - function suite.instructionSet_onSSE2() - vectorextensions "SSE2" - prepare() - test.capture [[ -StreamingSIMDExtensions2 - ]] - end - - function suite.instructionSet_onAVX() - p.action.set("vs2013") - vectorextensions "AVX" - prepare() - test.capture [[ -AdvancedVectorExtensions - ]] - end - - function suite.instructionSet_onAVX_onVS2010() - vectorextensions "AVX" - prepare() - test.isemptycapture() - end - - function suite.instructionSet_onAVX2() - p.action.set("vs2013") - vectorextensions "AVX2" - prepare() - test.capture [[ -AdvancedVectorExtensions2 - ]] - end - - function suite.instructionSet_onAVX2_onVS2012() - p.action.set("vs2012") - vectorextensions "AVX2" - prepare() - test.isemptycapture() - end diff --git a/build/premake/premake5/modules/vstudio/tests/vc2013/test_vcxitems.lua b/build/premake/premake5/modules/vstudio/tests/vc2013/test_vcxitems.lua deleted file mode 100644 index 80bc4a74c3..0000000000 --- a/build/premake/premake5/modules/vstudio/tests/vc2013/test_vcxitems.lua +++ /dev/null @@ -1,109 +0,0 @@ --- --- tests/actions/vstudio/vc2013/test_vcxitems.lua --- Validate generation of the vcxitems project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("vstudio_vs2013_vcxitems") - local vc2013 = p.vstudio.vc2013 - - --- --- Setup --- - - local wks, prj - - function suite.setup() - p.action.set("vs2013") - wks = test.createWorkspace() - end - - local function prepare() - kind "SharedItems" - prj = test.getproject(wks, 1) - end - - --- --- Check the structure with the default project values. --- - - function suite.structureIsCorrect_onDefaultValues() - prepare() - vc2013.generate(prj) - test.capture [[ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - - - - %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) - - - - - - - ]] - end - - --- --- Check the structure with files. --- - - function suite.structureIsCorrect_onFiles() - files { "test.h", "test.cpp" } - prepare() - vc2013.generate(prj) - test.capture [[ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - - - - %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) - - - - - - - - - - - - - ]] - end - - --- --- If the project name differs from the project filename, output a --- element to indicate that. --- - - function suite.projectName_OnFilename() - filename "MyProject_2013" - prepare() - vc2013.globals(prj) - test.capture [[ - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - MyProject - - ]] - end diff --git a/build/premake/premake5/modules/vstudio/vs2005.lua b/build/premake/premake5/modules/vstudio/vs2005.lua deleted file mode 100644 index fa5f6ca511..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005.lua +++ /dev/null @@ -1,121 +0,0 @@ --- --- vs2005.lua --- Add support for the Visual Studio 2005 project formats. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vs2005 = {} - - local vs2005 = p.vstudio.vs2005 - local vstudio = p.vstudio - - ---- --- Register a command-line action for Visual Studio 2006. ---- - - function vs2005.generateSolution(wks) - p.indent("\t") - p.eol("\r\n") - p.escaper(vs2005.esc) - - p.generate(wks, ".sln", vstudio.sln2005.generate) - end - - - function vs2005.generateProject(prj) - p.indent(" ") - p.eol("\r\n") - p.escaper(vs2005.esc) - - if p.project.iscsharp(prj) then - p.generate(prj, ".csproj", vstudio.cs2005.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vstudio.cs2005.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".csproj.user", function() p.outln(user) end) - end - elseif p.project.isfsharp(prj) then - p.generate(prj, ".fsproj", vstudio.fs2005.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vstudio.fs2005.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".fsproj.user", function() p.outln(user) end) - end - else - p.generate(prj, ".vcproj", vstudio.vc200x.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vstudio.vc200x.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".vcproj.user", function() p.outln(user) end) - end - end - end - - - ---- --- Apply XML escaping on a value to be included in an --- exported project file. ---- - - function vs2005.esc(value) - value = string.gsub(value, '&', "&") - value = value:gsub('"', """) - value = value:gsub("'", "'") - value = value:gsub('<', "<") - value = value:gsub('>', ">") - value = value:gsub('\r', " ") - value = value:gsub('\n', " ") - return value - end - - - ---- --- Define the Visual Studio 2005 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2005", - shortname = "Visual Studio 2005", - description = "Generate Visual Studio 2005 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v80", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = vstudio.vs2005.generateSolution, - onProject = vstudio.vs2005.generateProject, - - onCleanWorkspace = vstudio.cleanSolution, - onCleanProject = vstudio.cleanProject, - onCleanTarget = vstudio.cleanTarget, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - csprojSchemaVersion = "2.0", - productVersion = "8.0.50727", - solutionVersion = "9", - versionName = "2005", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs2005_csproj.lua b/build/premake/premake5/modules/vstudio/vs2005_csproj.lua deleted file mode 100644 index 186cde4534..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005_csproj.lua +++ /dev/null @@ -1,104 +0,0 @@ --- --- vs2005_csproj.lua --- Generate a Visual Studio 2005+ C# project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.cs2005 = {} - - local vstudio = p.vstudio - local cs2005 = p.vstudio.cs2005 - local dotnetbase = p.vstudio.dotnetbase - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - local dotnet = p.tools.dotnet - - cs2005.elements = {} - - cs2005.elements.project = function (prj) - if dotnetbase.isNewFormatProject(prj) then - return { - dotnetbase.projectElement, - dotnetbase.projectProperties, - dotnetbase.configurations, - dotnetbase.applicationIcon, - dotnetbase.references - } - else - return { - dotnetbase.xmlDeclaration, - dotnetbase.projectElement, - dotnetbase.commonProperties, - dotnetbase.projectProperties, - dotnetbase.configurations, - dotnetbase.applicationIcon, - dotnetbase.references - } - end - end - - cs2005.elements.projectProperties = function (cfg) - if dotnetbase.isNewFormatProject(cfg) then - return { - dotnetbase.outputType, - dotnetbase.appDesignerFolder, - dotnetbase.rootNamespace, - dotnetbase.assemblyName, - dotnetbase.netcore.targetFramework, - dotnetbase.fileAlignment, - dotnetbase.bindingRedirects, - dotnetbase.netcore.useWpf, - dotnetbase.csversion, - dotnetbase.netcore.enableDefaultCompileItems, - } - else - return { - dotnetbase.configurationCondition, - dotnetbase.platformCondition, - dotnetbase.productVersion, - dotnetbase.schemaVersion, - dotnetbase.projectGuid, - dotnetbase.outputType, - dotnetbase.appDesignerFolder, - dotnetbase.rootNamespace, - dotnetbase.assemblyName, - dotnetbase.targetFrameworkVersion, - dotnetbase.targetFrameworkProfile, - dotnetbase.fileAlignment, - dotnetbase.bindingRedirects, - dotnetbase.projectTypeGuids, - dotnetbase.csversion, - } - end - end - - cs2005.elements.configuration = function () - return { - dotnetbase.propertyGroup, - dotnetbase.debugProps, - dotnetbase.outputProps, - dotnetbase.compilerProps, - dotnetbase.NoWarn - } - end - - function cs2005.generate(prj) - dotnetbase.prepare(cs2005) - dotnetbase.generate(prj) - end - - function cs2005.targets(prj) - if not dotnetbase.isNewFormatProject(prj) then - local bin = iif(_ACTION <= "vs2010", "MSBuildBinPath", "MSBuildToolsPath") - _p(1,'', bin) - _p(1,'') - end - end diff --git a/build/premake/premake5/modules/vstudio/vs2005_csproj_user.lua b/build/premake/premake5/modules/vstudio/vs2005_csproj_user.lua deleted file mode 100644 index 3f4040dbdf..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005_csproj_user.lua +++ /dev/null @@ -1,91 +0,0 @@ --- --- vs2005_csproj_user.lua --- Generate a Visual Studio 2005+ C# .user file. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local m = p.vstudio.cs2005 - local dn = p.vstudio.dotnetbase - - --- --- Generate a Visual Studio 200x C# user file. --- - - m.elements.userProjectPropertyGroup = function() - return { - m.referencePath, - } - end - - m.elements.userConfigPropertyGroup = function() - return { - m.localDebuggerCommandArguments, - } - end - - function m.generateUser(prj) - -- Only want output if there is something to configure - local prjGroup = p.capture(function() - p.push(2) - p.callArray(m.elements.userProjectPropertyGroup, prj) - p.pop(2) - end) - - local contents = {} - local size = 0 - - for cfg in p.project.eachconfig(prj) do - contents[cfg] = p.capture(function() - p.push(2) - p.callArray(m.elements.userConfigPropertyGroup, cfg) - p.pop(2) - end) - size = size + #contents[cfg] - end - - if #prjGroup > 0 or size > 0 then - p.vstudio.projectElement() - - if #prjGroup > 0 then - p.push('') - p.outln(prjGroup) - p.pop('') - end - - for cfg in p.project.eachconfig(prj) do - if #contents[cfg] > 0 then - p.push('', dn.condition(cfg)) - p.outln(contents[cfg]) - p.pop('') - end - end - - p.pop('') - end - end - - - ---- --- Output any reference paths required by the project. ---- - - function m.referencePath(prj) - -- Per-configuration reference paths aren't supported (are they?) so just - -- use the first configuration in the project - local cfg = p.project.getfirstconfig(prj) - local paths = p.vstudio.path(prj, cfg.libdirs) - if #paths > 0 then - p.w('%s', table.concat(paths, ";")) - end - end - - - - function m.localDebuggerCommandArguments(cfg) - if #cfg.debugargs > 0 then - p.x('%s', table.concat(cfg.debugargs, " ")) - end - end diff --git a/build/premake/premake5/modules/vstudio/vs2005_dotnetbase.lua b/build/premake/premake5/modules/vstudio/vs2005_dotnetbase.lua deleted file mode 100644 index 4275e0a358..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005_dotnetbase.lua +++ /dev/null @@ -1,775 +0,0 @@ --- --- vs2005_dotnetbase.lua --- Generate a Visual Studio 2005+ .NET project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.dotnetbase = {} - - local vstudio = p.vstudio - local dotnetbase = p.vstudio.dotnetbase - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - local dotnet = p.tools.dotnet - - - dotnetbase.elements = {} - dotnetbase.langObj = {} - dotnetbase.netcore = {} - --- --- Generate a Visual Studio 200x dotnet project, with support for the new platforms API. --- - - function dotnetbase.prepare(langObj) - dotnetbase.elements.project = langObj.elements.project - dotnetbase.elements.projectProperties = langObj.elements.projectProperties - dotnetbase.elements.configuration = langObj.elements.configuration - - dotnetbase.langObj = langObj - end - - - function dotnetbase.generate(prj) - p.utf8() - - p.callArray(dotnetbase.elements.project, prj) - - _p(1,'') - dotnetbase.files(prj) - _p(1,'') - - dotnetbase.projectReferences(prj) - dotnetbase.packageReferences(prj) - dotnetbase.langObj.targets(prj) - dotnetbase.buildEvents(prj) - - p.out('') - end - - --- --- Write the opening element. --- - - function dotnetbase.projectElement(prj) - if dotnetbase.isNewFormatProject(prj) then - if prj.flags.WPF then - _p('') - else - _p('') - end - else - local ver = '' - local action = p.action.current() - if action.vstudio.toolsVersion then - ver = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion) - end - _p('', ver) - end - end - - --- --- Write the opening PropertyGroup, which contains the project-level settings. --- - - - function dotnetbase.projectProperties(prj) - _p(1,'') - local cfg = project.getfirstconfig(prj) - p.callArray(dotnetbase.elements.projectProperties, cfg) - _p(1,'') - end - - --- --- Write out the settings for the project configurations. --- - - - function dotnetbase.configurations(prj) - for cfg in project.eachconfig(prj) do - dotnetbase.configuration(cfg) - end - end - - function dotnetbase.configuration(cfg) - p.callArray(dotnetbase.elements.configuration, cfg) - _p(1,'') - end - - - function dotnetbase.dofile(node, cfg, condition) - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg then - local fname = path.translate(node.relpath) - - -- Files that live outside of the project tree need to be "linked" - -- and provided with a project relative pseudo-path. Check for any - -- leading "../" sequences and, if found, remove them and mark this - -- path as external. - local link, count = node.relpath:gsub("%.%.%/", "") - local external = (count > 0) - - -- Try to provide a little bit of flexibility by allowing virtual - -- paths for external files. Would be great to support them for all - -- files but Visual Studio chokes if file is already in project area. - if external and node.vpath ~= node.relpath then - link = node.vpath - end - - -- Deduce what, if any, special attributes are required for this file. - -- For example, forms may have related source, designer, and resource - -- files which need to be associated. - - local info = dotnet.fileinfo(filecfg) - - -- Process any sub-elements required by this file; choose the write - -- element form to use based on the results. - - local contents = p.capture(function () - -- Try to write file-level elements in the same order as Visual Studio - local elements = { - "AutoGen", - "CopyToOutputDirectory", - "DesignTime", - "DependentUpon", - "DesignTimeSharedInput", - "Generator", - "LastGenOutput", - "SubType", - } - - for _, el in ipairs(elements) do - local value = info[el] - if value then - _p(3,"<%s>%s", el, value, el) - end - end - if info.action == "EmbeddedResource" and cfg.customtoolnamespace then - _p(3,"%s", cfg.customtoolnamespace) - end - end) - - if #contents > 0 or external then - _p(2,'<%s%s Include="%s">', info.action, condition, fname) - if external then - _p(3,'%s', path.translate(link)) - end - if #contents > 0 then - _p("%s", contents) - end - _p(2,'', info.action) - else - _p(2,'<%s%s Include="%s" />', info.action, condition, fname) - end - end - end - - --- --- Write out the source files item group. --- - - function dotnetbase.files(prj) - local firstcfg = project.getfirstconfig(prj) - - local processfcfg = function(node) - -- test if all fileinfo's are going to be the same for each config. - local allsame = true - local first = nil - for cfg in project.eachconfig(prj) do - local filecfg = fileconfig.getconfig(node, cfg) - local info = dotnet.fileinfo(filecfg) - - if first == nil then - first = info - elseif not table.equals(first, info) then - allsame = false - end - end - - -- output to proj file. - if allsame then - dotnetbase.dofile(node, firstcfg, '') - else - for cfg in project.eachconfig(prj) do - dotnetbase.dofile(node, cfg, ' ' .. dotnetbase.condition(cfg)) - end - end - end - - if project.isfsharp(prj) then - sorter = function(a,b) - verbosef('Sorting F# proj file (%s, %s), index %s < %s', a.name, b.name, a.order, b.order) - return a.order < b.order - end - - table.sort(prj._.files, sorter) - table.foreachi(prj._.files, processfcfg) - else - local tr = project.getsourcetree(prj) - p.tree.traverse(tr, { - onleaf = processfcfg - }, false) - end - end - - --- --- Write out pre- and post-build events, if provided. --- - - function dotnetbase.buildEvents(prj) - local function output(name, steps) - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, prj.basedir, prj.location) - steps = table.implode(steps, "", "", "\r\n") - _x(2,'<%sBuildEvent>%s', name, steps, name) - end - end - - local cfg = project.getfirstconfig(prj) - if #cfg.prebuildcommands > 0 or #cfg.postbuildcommands > 0 then - _p(1,'') - output("Pre", cfg.prebuildcommands) - output("Post", cfg.postbuildcommands) - _p(1,'') - end - end - - --- --- Write the compiler flags for a particular configuration. --- - - function dotnetbase.compilerProps(cfg) - _x(2,'%s', table.concat(cfg.defines, ";")) - - _p(2,'prompt') - _p(2,'4') - - if cfg.clr == "Unsafe" then - _p(2,'true') - end - - if cfg.flags.FatalCompileWarnings then - _p(2,'true') - end - - dotnetbase.debugCommandParameters(cfg) - end - --- --- Write out the debug start parameters for MonoDevelop/Xamarin Studio. --- - - function dotnetbase.debugCommandParameters(cfg) - if #cfg.debugargs > 0 then - _x(2,'%s', table.concat(cfg.debugargs, " ")) - end - end - --- --- Write out the debugging and optimization flags for a configuration. --- - - function dotnetbase.debugProps(cfg) - if cfg.symbols == p.ON then - _p(2,'true') - _p(2,'full') - else - _p(2,'pdbonly') - end - _p(2,'%s', iif(config.isOptimizedBuild(cfg), "true", "false")) - end - - --- --- Write out the target and intermediates settings for a configuration. --- - - function dotnetbase.outputProps(cfg) - local outdir = vstudio.path(cfg, cfg.buildtarget.directory) - _x(2,'%s\\', outdir) - - -- Want to set BaseIntermediateOutputPath because otherwise VS will create obj/ - -- anyway. But VS2008 throws up ominous warning if present. - local objdir = vstudio.path(cfg, cfg.objdir) - if _ACTION > "vs2008" and not dotnetbase.isNewFormatProject(cfg) then - _x(2,'%s\\', objdir) - _p(2,'$(BaseIntermediateOutputPath)') - else - _x(2,'%s\\', objdir) - end - end - - --- --- Write out the references item group. --- - - dotnetbase.elements.references = function(prj) - return { - dotnetbase.assemblyReferences, - dotnetbase.nuGetReferences, - } - end - - function dotnetbase.references(prj) - _p(1,'') - p.callArray(dotnetbase.elements.references, prj) - _p(1,'') - end - - --- --- Write the list of assembly (system, or non-sibling) references. --- - - function dotnetbase.assemblyReferences(prj) - -- C# doesn't support per-configuration links (does it?) so just use - -- the settings from the first available config instead - local cfg = project.getfirstconfig(prj) - - config.getlinks(cfg, "system", function(original, decorated) - local name = path.getname(decorated) - if path.getextension(name) == ".dll" then - name = name.sub(name, 1, -5) - end - - if decorated:find("/", nil, true) then - _x(2,'', name) - local decPath, decVars = decorated:match("(.-),") - if not decPath then - decPath = decorated - end - - _x(3,'%s', path.appendextension(path.translate(decPath), ".dll")) - - if not config.isCopyLocal(prj, original, true) then - _p(3,"False") - end - - _p(2,'') - else - _x(2,'', name) - end - end) - end - - --- --- This is a bit janky. To compare versions, we extract all numbers from the --- given string and right-pad the result with zeros. Then we can just do a --- lexicographical compare on the resulting strings. --- --- This is so that we can compare version strings such as "4.6" and "net451" --- with each other. --- - - function dotnetbase.makeVersionComparable(version) - local numbers = "" - - for number in version:gmatch("%d") do - numbers = numbers .. number - end - - return string.format("%-10d", numbers):gsub(" ", "0") - end - - --- --- https://github.com/NuGet/NuGet.Client/blob/dev/test/NuGet.Core.Tests/NuGet.Frameworks.Test/NuGetFrameworkParseTests.cs --- - - function dotnetbase.frameworkVersionForFolder(folder) - -- If this exporter ever supports frameworks such as "netstandard1.3", - -- "sl4", "sl5", "uap10", "wp8" or "wp71", this code will need changing - -- to match the right folders, depending on the current framework. - - -- Right now this only matches folders for the .NET Framework. - - if folder:match("^net%d+$") or folder:match("^[0-9%.]+$") then - return dotnetbase.makeVersionComparable(folder) - elseif folder == "net" then - return dotnetbase.makeVersionComparable("0") - end - end - - --- --- Write the list of NuGet references. --- - - function dotnetbase.nuGetReferences(prj) - if _ACTION >= "vs2010" and not vstudio.nuget2010.supportsPackageReferences(prj) then - for _, package in ipairs(prj.nuget) do - local id = vstudio.nuget2010.packageId(package) - local packageAPIInfo = vstudio.nuget2010.packageAPIInfo(prj, package) - - local cfg = p.project.getfirstconfig(prj) - local action = p.action.current() - local targetFramework = cfg.dotnetframework or action.vstudio.targetFramework - - local targetVersion = dotnetbase.makeVersionComparable(targetFramework) - - -- Figure out what folder contains the files for the nearest - -- supported .NET Framework version. - - local files = {} - - local bestVersion, bestFolder - - for _, file in ipairs(packageAPIInfo.packageEntries) do - local folder = file:match("^lib[\\/](.+)[\\/]") - - if folder and path.hasextension(file, ".dll") then - local version = dotnetbase.frameworkVersionForFolder(folder) - - if version then - files[folder] = files[folder] or {} - table.insert(files[folder], file) - - if version <= targetVersion and (not bestVersion or version > bestVersion) then - bestVersion = version - bestFolder = folder - end - end - end - end - - if not bestVersion then - p.error("NuGet package '%s' is not compatible with project '%s' .NET Framework version '%s'", id, prj.name, targetFramework) - end - - -- Now, add references for all DLLs in that folder. - - for _, file in ipairs(files[bestFolder]) do - -- There's some stuff missing from this include that we - -- can't get from the API and would need to download and - -- extract the package to figure out. It looks like we can - -- just omit it though. - -- - -- So, for example, instead of: - -- - -- - -- - -- We're just outputting: - -- - -- - - _x(2, '', path.getbasename(file)) - _x(3, '%s', vstudio.path(prj, p.filename(prj.workspace, string.format("packages\\%s.%s\\%s", id, packageAPIInfo.verbatimVersion or packageAPIInfo.version, file)))) - - if config.isCopyLocal(prj, package, true) then - _p(3, 'True') - else - _p(3, 'False') - end - - _p(2, '') - end - end - end - end - - --- --- Write the list of project dependencies. --- - function dotnetbase.projectReferences(prj) - if not dotnetbase.isNewFormatProject(prj) then - _p(1,'') - end - - local deps = project.getdependencies(prj, 'linkOnly') - if #deps > 0 then - if dotnetbase.isNewFormatProject(prj) then - _p(1,'') - end - - for _, dep in ipairs(deps) do - local relpath = vstudio.path(prj, vstudio.projectfile(dep)) - _x(2,'', relpath) - _p(3,'{%s}', dep.uuid) - _x(3,'%s', dep.name) - - if not config.isCopyLocal(prj, dep.name, true) then - _p(3,"False") - end - - _p(2,'') - end - - if dotnetbase.isNewFormatProject(prj) then - _p(1,'') - end - end - - if not dotnetbase.isNewFormatProject(prj) then - _p(1,'') - end - end - --- --- Write the list of package dependencies. --- - function dotnetbase.packageReferences(prj) - if vstudio.nuget2010.supportsPackageReferences(prj) then - local hasNuget = prj.nuget and #prj.nuget>0 - for cfg in project.eachconfig(prj) do - if cfg.nuget and #cfg.nuget>0 then - hasNuget = true - end - end - if hasNuget then - _p(1,'') - if prj.nuget and #prj.nuget>0 then - for _, package in ipairs(prj.nuget) do - _p(2,'', vstudio.nuget2010.packageId(package), vstudio.nuget2010.packageVersion(package)) - end - end - for cfg in project.eachconfig(prj) do - if cfg.nuget and #cfg.nuget>0 then - for _, package in ipairs(cfg.nuget) do - if prj.nuget[package]==nil then - _p(2,'', vstudio.nuget2010.packageId(package), vstudio.nuget2010.packageVersion(package), dotnetbase.condition(cfg)) - end - end - end - end - _p(1,'') - end - end - end - --- --- Return the Visual Studio architecture identification string. The logic --- to select this is getting more complicated in VS2010, but I haven't --- tackled all the permutations yet. --- - - function dotnetbase.arch(cfg) - local arch = vstudio.archFromConfig(cfg) - if arch == "Any CPU" then - arch = "AnyCPU" - end - return arch - end - - --- --- Write the PropertyGroup element for a specific configuration block. --- - - function dotnetbase.propertyGroup(cfg) - p.push('', dotnetbase.condition(cfg)) - - local arch = dotnetbase.arch(cfg) - if arch ~= "AnyCPU" or _ACTION > "vs2008" then - p.x('%s', arch) - end - end - - --- --- Generators for individual project elements. --- - - function dotnetbase.applicationIcon(prj) - if prj.icon then - local icon = vstudio.path(prj, prj.icon) - _p(1,'') - _x(2,'%s', icon) - _p(1,'') - end - end - ---------------------------------------------------------------------------- --- --- Support functions --- ---------------------------------------------------------------------------- - --- --- Format and return a Visual Studio Condition attribute. --- - - function dotnetbase.condition(cfg) - local platform = vstudio.projectPlatform(cfg) - local arch = dotnetbase.arch(cfg) - return string.format('Condition=" \'$(Configuration)|$(Platform)\' == \'%s|%s\' "', platform, arch) - end - - --- --- When given a .NET Framework version, returns it formatted for NuGet. --- - - function dotnetbase.formatNuGetFrameworkVersion(framework) - return "net" .. framework:gsub("%.", "") - end - ---------------------------------------------------------------------------- --- --- Handlers for individual project elements --- ---------------------------------------------------------------------------- - - function dotnetbase.appDesignerFolder(cfg) - _p(2,'Properties') - end - - - function dotnetbase.assemblyName(cfg) - if not dotnetbase.isNewFormatProject(cfg) --[[or cfg.assemblyname]] then - _p(2,'%s', cfg.buildtarget.basename) - end - end - - - function dotnetbase.commonProperties(prj) - if _ACTION > "vs2010" then - _p(1,'') - end - end - - - function dotnetbase.configurationCondition(cfg) - _x(2,'%s', cfg.buildcfg) - end - - - function dotnetbase.fileAlignment(cfg) - if _ACTION >= "vs2010" and not dotnetbase.isNewFormatProject(cfg) then - _p(2,'512') - end - end - - - function dotnetbase.bindingRedirects(cfg) - if _ACTION >= "vs2015" and not dotnetbase.isNewFormatProject(cfg) then - _p(2, 'true') - end - end - - - function dotnetbase.outputType(cfg) - _p(2,'%s', dotnet.getkind(cfg)) - end - - - function dotnetbase.platformCondition(cfg) - _p(2,'%s', dotnetbase.arch(cfg.project)) - end - - - function dotnetbase.productVersion(cfg) - local action = p.action.current() - if action.vstudio.productVersion then - _p(2,'%s', action.vstudio.productVersion) - end - end - - function dotnetbase.projectGuid(cfg) - _p(2,'{%s}', cfg.uuid) - end - - - function dotnetbase.projectTypeGuids(cfg) - if cfg.flags.WPF then - _p(2,'{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}') - end - end - - - function dotnetbase.rootNamespace(cfg) - if not dotnetbase.isNewFormatProject(cfg) or cfg.namespace then - _p(2,'%s', cfg.namespace or cfg.buildtarget.basename) - end - end - - - function dotnetbase.schemaVersion(cfg) - local action = p.action.current() - if action.vstudio.csprojSchemaVersion then - _p(2,'%s', action.vstudio.csprojSchemaVersion) - end - end - - - function dotnetbase.NoWarn(cfg) - if #cfg.disablewarnings > 0 then - local warnings = table.concat(cfg.disablewarnings, ";") - _p(2,'%s', warnings) - end - end - - function dotnetbase.targetFrameworkVersion(cfg) - local action = p.action.current() - local framework = cfg.dotnetframework or action.vstudio.targetFramework - if framework and not dotnetbase.isNewFormatProject(cfg) then - _p(2,'v%s', framework) - end - end - - function dotnetbase.csversion(cfg) - if cfg.csversion then - _p(2,'%s', cfg.csversion) - end - end - - function dotnetbase.targetFrameworkProfile(cfg) - if _ACTION == "vs2010" then - _p(2,'') - _p(2,'') - end - end - - - function dotnetbase.xmlDeclaration() - if _ACTION > "vs2008" then - p.xmlUtf8() - end - end - - function dotnetbase.isNewFormatProject(cfg) - local framework = cfg.dotnetframework - if not framework then - return false - end - - if framework:find('^netcoreapp') ~= nil then - return true - end - - if framework:find('^netstandard') ~= nil then - return true - end - - return false - end - - function dotnetbase.netcore.targetFramework(cfg) - local action = p.action.current() - local framework = cfg.dotnetframework or action.vstudio.targetFramework - if framework and dotnetbase.isNewFormatProject(cfg) then - _p(2,'%s', framework) - end - end - - function dotnetbase.netcore.enableDefaultCompileItems(cfg) - _p(2,'%s', iif(cfg.enableDefaultCompileItems, "true", "false")) - end - - function dotnetbase.netcore.useWpf(cfg) - if cfg.flags.WPF then - _p(2,'true') - end - end \ No newline at end of file diff --git a/build/premake/premake5/modules/vstudio/vs2005_fsproj.lua b/build/premake/premake5/modules/vstudio/vs2005_fsproj.lua deleted file mode 100644 index 6c7e8a8d76..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005_fsproj.lua +++ /dev/null @@ -1,89 +0,0 @@ --- --- vs2005_fsproj.lua --- Generate a Visual Studio 2005+ F# project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.fs2005 = {} - - local vstudio = p.vstudio - local fs2005 = p.vstudio.fs2005 - local dotnetbase = p.vstudio.dotnetbase - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - local dotnet = p.tools.dotnet - - fs2005.elements = {} - - fs2005.elements.project = function () - return { - dotnetbase.xmlDeclaration, - dotnetbase.projectElement, - dotnetbase.commonProperties, - dotnetbase.projectProperties, - dotnetbase.configurations, - dotnetbase.applicationIcon, - dotnetbase.references - } - end - - fs2005.elements.projectProperties = function () - return { - dotnetbase.configurationCondition, - dotnetbase.platformCondition, - dotnetbase.schemaVersion, - dotnetbase.productVersion, - dotnetbase.projectGuid, - dotnetbase.outputType, - dotnetbase.appDesignerFolder, - dotnetbase.rootNamespace, - dotnetbase.assemblyName, - dotnetbase.targetFrameworkVersion, - dotnetbase.targetFrameworkProfile, - dotnetbase.projectTypeGuids - } - end - - fs2005.elements.configuration = function () - return { - dotnetbase.propertyGroup, - dotnetbase.debugProps, - dotnetbase.outputProps, - dotnetbase.compilerProps, - dotnetbase.NoWarn, - fs2005.tailCalls - } - end - - function fs2005.generate(prj) - dotnetbase.prepare(fs2005) - dotnetbase.generate(prj) - end - - function fs2005.tailCalls(cfg) - local tc - if cfg.tailcalls == nil then - tc = config.isDebugBuild(cfg) - else - tc = cfg.tailcalls - end - _p(2, '%s', iif(tc, "true", "false")) - end - - function fs2005.targets(prj) - _p(1, '') - _p(2, '') - _p(3, '') - _p(4, '$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\FSharp\\Microsoft.FSharp.Targets') - _p(3, '') - _p(2, '') - _p(2, '') - _p(2, '') - _p(3, '$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\FSharp\\Microsoft.FSharp.Targets') - _p(2, '') - _p(2, '') - _p(1, '') - _p(1, '') - end diff --git a/build/premake/premake5/modules/vstudio/vs2005_fsproj_user.lua b/build/premake/premake5/modules/vstudio/vs2005_fsproj_user.lua deleted file mode 100644 index ee1e7d56a1..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005_fsproj_user.lua +++ /dev/null @@ -1,91 +0,0 @@ --- --- vs2005_fsproj_user.lua --- Generate a Visual Studio 2005+ F# .user file. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local m = p.vstudio.fs2005 - local dn = p.vstudio.dotnetbase - - --- --- Generate a Visual Studio 200x C# user file. --- - - m.elements.userProjectPropertyGroup = function() - return { - m.referencePath, - } - end - - m.elements.userConfigPropertyGroup = function() - return { - m.localDebuggerCommandArguments, - } - end - - function m.generateUser(prj) - -- Only want output if there is something to configure - local prjGroup = p.capture(function() - p.push(2) - p.callArray(m.elements.userProjectPropertyGroup, prj) - p.pop(2) - end) - - local contents = {} - local size = 0 - - for cfg in p.project.eachconfig(prj) do - contents[cfg] = p.capture(function() - p.push(2) - p.callArray(m.elements.userConfigPropertyGroup, cfg) - p.pop(2) - end) - size = size + #contents[cfg] - end - - if #prjGroup > 0 or size > 0 then - p.vstudio.projectElement() - - if #prjGroup > 0 then - p.push('') - p.outln(prjGroup) - p.pop('') - end - - for cfg in p.project.eachconfig(prj) do - if #contents[cfg] > 0 then - p.push('', dn.condition(cfg)) - p.outln(contents[cfg]) - p.pop('') - end - end - - p.pop('') - end - end - - - ---- --- Output any reference paths required by the project. ---- - - function m.referencePath(prj) - -- Per-configuration reference paths aren't supported (are they?) so just - -- use the first configuration in the project - local cfg = p.project.getfirstconfig(prj) - local paths = p.vstudio.path(prj, cfg.libdirs) - if #paths > 0 then - p.w('%s', table.concat(paths, ";")) - end - end - - - - function m.localDebuggerCommandArguments(cfg) - if #cfg.debugargs > 0 then - p.x('%s', table.concat(cfg.debugargs, " ")) - end - end diff --git a/build/premake/premake5/modules/vstudio/vs2005_solution.lua b/build/premake/premake5/modules/vstudio/vs2005_solution.lua deleted file mode 100644 index 740ea1be4f..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2005_solution.lua +++ /dev/null @@ -1,415 +0,0 @@ --- --- vs2005_solution.lua --- Generate a Visual Studio 2005+ solution. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.sln2005 = {} - - local vstudio = p.vstudio - local sln2005 = p.vstudio.sln2005 - local project = p.project - local tree = p.tree - - ---- --- Add namespace for element definition lists for p.callArray() ---- - - sln2005.elements = {} - - --- --- Return the list of sections contained in the solution. --- TODO: Get rid of this when the MonoDevelop module no longer needs it --- - - function sln2005.solutionSections(wks) - return { - "ConfigurationPlatforms", - "SolutionProperties", - "NestedProjects", - "ExtensibilityGlobals" - } - end - - --- --- Generate a Visual Studio 200x solution, with support for the new platforms API. --- - - function sln2005.generate(wks) - -- Mark the file as Unicode - p.utf8() - p.outln('') - - sln2005.reorderProjects(wks) - - sln2005.header() - sln2005.projects(wks) - - p.push('Global') - sln2005.sections(wks) - p.pop('EndGlobal') - p.w() - end - - --- --- Generate the solution header. Each Visual Studio action definition --- should include its own version. --- - - function sln2005.header() - local action = p.action.current() - p.w('Microsoft Visual Studio Solution File, Format Version %d.00', action.vstudio.solutionVersion) - p.w('# Visual Studio %s', action.vstudio.versionName) - end - - --- --- If a startup project is specified, move it (and any enclosing groups) --- to the front of the project list. This will make Visual Studio treat --- it like a startup project. --- --- I force the new ordering into the tree so that it will get applied to --- all sections of the solution; otherwise the first change to the solution --- in the IDE will cause the orderings to get rewritten. --- - - function sln2005.reorderProjects(wks) - if wks.startproject then - local np - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - if n.project.name == wks.startproject then - np = n - end - end - }) - - while np and np.parent do - local p = np.parent - local i = table.indexof(p.children, np) - table.remove(p.children, i) - table.insert(p.children, 1, np) - np = p - end - end - end - - --- --- Build a relative path from the solution file to the project file --- - - function sln2005.buildRelativePath(prj) - local prjpath = vstudio.projectfile(prj) - prjpath = vstudio.path(prj.workspace, prjpath) - - -- Unlike projects, solutions must use old-school %...% DOS style - -- for environment variables. - return prjpath:gsub("$%((.-)%)", "%%%1%%") - end - - --- --- Write out the list of projects and groups contained by the solution. --- - - function sln2005.projects(wks) - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - local prj = n.project - p.x('Project("{%s}") = "%s", "%s", "{%s}"', vstudio.tool(prj), prj.name, sln2005.buildRelativePath(prj), prj.uuid) - p.push() - sln2005.projectdependencies(prj) - p.pop('EndProject') - end, - - onbranch = function(n) - p.push('Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "%s", "%s", "{%s}"', n.name, n.name, n.uuid) - p.pop('EndProject') - end, - }) - end - - --- --- Write out the list of project dependencies for a particular project. --- - - function sln2005.projectdependencies(prj) - local deps = project.getdependencies(prj, 'dependOnly') - if #deps > 0 then - p.push('ProjectSection(ProjectDependencies) = postProject') - for _, dep in ipairs(deps) do - p.w('{%s} = {%s}', dep.uuid, dep.uuid) - end - p.pop('EndProjectSection') - end - end - - --- --- Write out the list of shared project files and their links --- - - function sln2005.sharedProjects(wks) - local contents = p.capture(function () - local tr = p.workspace.grouptree(wks) - p.tree.traverse(tr, { - onleaf = function(n) - local prj = n.project - - -- SharedItems projects reference their own UUID with a "9" - -- SharedItems projects reference the UUID of projects that link them with a "4" - if prj.kind == p.SHAREDITEMS then - p.w('%s*{%s}*SharedItemsImports = %s', sln2005.buildRelativePath(prj), prj.uuid:lower(), "9") - else - local deps = p.project.getdependencies(prj, 'linkOnly') - for _, dep in ipairs(deps) do - if dep.kind == p.SHAREDITEMS then - p.w('%s*{%s}*SharedItemsImports = %s', sln2005.buildRelativePath(dep), prj.uuid:lower(), "4") - end - end - end - end, - }) - end) - - if #contents > 0 then - p.push('GlobalSection(SharedMSBuildProjectFiles) = preSolution') - p.outln(contents) - p.pop('EndGlobalSection') - end - end - - --- --- Write out the list of project configuration platforms. --- - - sln2005.elements.projectConfigurationPlatforms = function(cfg, context) - return { - sln2005.activeCfg, - sln2005.build0, - } - end - - - function sln2005.projectConfigurationPlatforms(wks, sorted, descriptors) - p.w("GlobalSection(ProjectConfigurationPlatforms) = postSolution") - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - local prj = n.project - - -- SharedItems projects don't have any configuration platform entries - if prj.kind == p.SHAREDITEMS then - return - end - - table.foreachi(sorted, function(cfg) - local context = {} - -- Look up the matching project configuration. If none exist, this - -- configuration has been excluded from the project, and should map - -- to closest available project configuration instead. - context.prj = prj - context.prjCfg = project.getconfig(prj, cfg.buildcfg, cfg.platform) - context.excluded = (context.prjCfg == nil or context.prjCfg.flags.ExcludeFromBuild) - - if context.prjCfg == nil then - context.prjCfg = project.findClosestMatch(prj, cfg.buildcfg, cfg.platform) - end - - context.descriptor = descriptors[cfg] - context.platform = vstudio.projectPlatform(context.prjCfg) - context.architecture = vstudio.archFromConfig(context.prjCfg, true) - - p.push() - p.callArray(sln2005.elements.projectConfigurationPlatforms, cfg, context) - p.pop() - end) - end - }) - p.w("EndGlobalSection") - end - - - function sln2005.activeCfg(cfg, context) - p.w('{%s}.%s.ActiveCfg = %s|%s', context.prj.uuid, context.descriptor, context.platform, context.architecture) - end - - - function sln2005.build0(cfg, context) - if not context.excluded and context.prjCfg.kind ~= p.NONE then - p.w('{%s}.%s.Build.0 = %s|%s', context.prj.uuid, context.descriptor, context.platform, context.architecture) - end - end - --- --- Write out the tables that map solution configurations to project configurations. --- - - function sln2005.configurationPlatforms(wks) - - local descriptors = {} - local sorted = {} - - for cfg in p.workspace.eachconfig(wks) do - - -- Create a Visual Studio solution descriptor (i.e. Debug|Win32) for - -- this solution configuration. I need to use it in a few different places - -- below so it makes sense to precompute it up front. - - local platform = vstudio.solutionPlatform(cfg) - descriptors[cfg] = string.format("%s|%s", cfg.buildcfg, platform) - - -- Also add the configuration to an indexed table which I can sort below - - table.insert(sorted, cfg) - - end - - -- Sort the solution configurations to match Visual Studio's preferred - -- order, which appears to be a simple alpha sort on the descriptors. - - table.sort(sorted, function(cfg0, cfg1) - return descriptors[cfg0]:lower() < descriptors[cfg1]:lower() - end) - - -- Now I can output the sorted list of solution configuration descriptors - - -- Visual Studio assumes the first configurations as the defaults. - if wks.defaultplatform then - p.push('GlobalSection(SolutionConfigurationPlatforms) = preSolution') - table.foreachi(sorted, function (cfg) - if cfg.platform == wks.defaultplatform then - p.w('%s = %s', descriptors[cfg], descriptors[cfg]) - end - end) - p.pop("EndGlobalSection") - end - - p.push('GlobalSection(SolutionConfigurationPlatforms) = preSolution') - table.foreachi(sorted, function (cfg) - if not wks.defaultplatform or cfg.platform ~= wks.defaultplatform then - p.w('%s = %s', descriptors[cfg], descriptors[cfg]) - end - end) - p.pop("EndGlobalSection") - - -- For each project in the solution... - sln2005.projectConfigurationPlatforms(wks, sorted, descriptors) - end - - - --- --- Write out contents of the SolutionProperties section; currently unused. --- - - function sln2005.properties(wks) - p.push('GlobalSection(SolutionProperties) = preSolution') - p.w('HideSolutionNode = FALSE') - p.pop('EndGlobalSection') - end - - --- --- Write out the NestedProjects block, which describes the structure of --- any solution groups. --- - - function sln2005.nestedProjects(wks) - local tr = p.workspace.grouptree(wks) - if tree.hasbranches(tr) then - p.push('GlobalSection(NestedProjects) = preSolution') - tree.traverse(tr, { - onnode = function(n) - if n.parent.uuid then - p.w('{%s} = {%s}', (n.project or n).uuid, n.parent.uuid) - end - end - }) - p.pop('EndGlobalSection') - end - end - - --- --- Write out the ExtensibilityGlobals block, which embeds some data for the --- Visual Studio PremakeExtension. --- - function sln2005.premakeExtensibilityGlobals(wks) - if wks.editorintegration then - -- we need to filter out the 'file' argument, since we already output - -- the script separately. - local args = {} - for _, arg in ipairs(_ARGV) do - if not (arg:startswith("--file") or arg:startswith("/file")) then - table.insert(args, arg); - end - end - - p.w('PremakeBinary = %s', _PREMAKE_COMMAND) - p.w('PremakeScript = %s', p.workspace.getrelative(wks, _MAIN_SCRIPT)) - p.w('PremakeArguments = %s', table.concat(args, ' ')) - end - end - --- --- Map ExtensibilityGlobals to output functions. --- - - sln2005.elements.extensibilityGlobals = function(wks) - return { - sln2005.premakeExtensibilityGlobals, - } - end - --- --- Output the ExtensibilityGlobals section. --- - function sln2005.extensibilityGlobals(wks) - local contents = p.capture(function () - p.push() - p.callArray(sln2005.elements.extensibilityGlobals, wks) - p.pop() - end) - - if #contents > 0 then - p.push('GlobalSection(ExtensibilityGlobals) = postSolution') - p.outln(contents) - p.pop('EndGlobalSection') - end - end - - --- --- Map solution sections to output functions. Tools that aren't listed will --- be ignored. --- - - sln2005.elements.sections = function(wks) - return { - sln2005.sharedProjects, - sln2005.configurationPlatforms, - sln2005.properties, - sln2005.nestedProjects, - sln2005.extensibilityGlobals, - } - end - - --- --- Write out all of the workspace sections. --- - - function sln2005.sections(wks) - p.callArray(sln2005.elements.sections, wks) - end diff --git a/build/premake/premake5/modules/vstudio/vs2008.lua b/build/premake/premake5/modules/vstudio/vs2008.lua deleted file mode 100644 index 401bfdf147..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2008.lua +++ /dev/null @@ -1,56 +0,0 @@ --- --- vs2008.lua --- Add support for the Visual Studio 2008 project formats. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vs2008 = {} - local vs2008 = p.vstudio.vs2008 - local vstudio = p.vstudio - - ---- --- Define the Visual Studio 2008 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2008", - shortname = "Visual Studio 2008", - description = "Generate Visual Studio 2008 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v90", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = vstudio.vs2005.generateSolution, - onProject = vstudio.vs2005.generateProject, - - onCleanWorkspace = vstudio.cleanSolution, - onCleanProject = vstudio.cleanProject, - onCleanTarget = vstudio.cleanTarget, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - csprojSchemaVersion = "2.0", - productVersion = "9.0.30729", - solutionVersion = "10", - versionName = "2008", - toolsVersion = "3.5", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs200x_vcproj.lua b/build/premake/premake5/modules/vstudio/vs200x_vcproj.lua deleted file mode 100644 index 735b66ddfb..0000000000 --- a/build/premake/premake5/modules/vstudio/vs200x_vcproj.lua +++ /dev/null @@ -1,1619 +0,0 @@ --- --- vs200x_vcproj.lua --- Generate a Visual Studio 2005-2008 C/C++ project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vc200x = {} - local m = p.vstudio.vc200x - - local vstudio = p.vstudio - local context = p.context - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - - m.elements = {} - - - ---- --- Generate a Visual Studio 200x C++ or Makefile project. ---- - - m.elements.project = function(prj) - return { - m.xmlElement, - m.visualStudioProject, - m.platforms, - m.toolFiles, - m.configurations, - m.references, - m.files, - m.globals - } - end - - function m.generate(prj) - p.indent("\t") - p.callArray(m.elements.project, prj) - p.pop('') - p.w() - end - - - ---- --- Write the opening element of the project file. --- In this case, the call list is for XML attributes rather than elements. ---- - - m.elements.visualStudioProject = function(prj) - return { - m.projectType, - m.version, - m.projectName, - m.projectGUID, - m.rootNamespace, - m.keyword, - m.targetFrameworkVersion - } - end - - function m.visualStudioProject(prj) - p.push('') - end - - - ---- --- Write out the element group, enumerating each of the --- configuration-architecture pairings. ---- - - function m.configurations(prj) - p.push('') - - -- Visual Studio requires each configuration to be paired up with each - -- architecture, even if the pairing doesn't make any sense (i.e. Win32 - -- DLL DCRT|PS3). Start by building a map between configurations and - -- their Visual Studio names. I will use this to determine which - -- pairings are "real", and which need to be synthesized. - - local mapping = {} - for cfg in project.eachconfig(prj) do - local name = vstudio.projectConfig(cfg) - mapping[cfg] = name - mapping[name] = cfg - end - - -- Now enumerate each configuration and architecture pairing - - for cfg in project.eachconfig(prj) do - for i, arch in ipairs(architectures) do - local target - - -- Generate a Visual Studio name from this pairing and see if - -- it matches. If so, I can go ahead and output the markup for - -- this configuration. - - local testName = vstudio.projectConfig(cfg, arch) - if testName == mapping[cfg] then - target = cfg - - -- Okay, this pairing doesn't match this configuration. Check - -- the mapping to see if it matches some *other* configuration. - -- If it does, I can ignore it as it will getting written on - -- another pass through the loop. If it does not, then this is - -- one of those fake configurations that I have to synthesize. - - elseif not mapping[testName] then - target = { fake = true } - end - - -- If I'm not ignoring this pairing, output the result now - - if target then - m.configuration(target, testName) - m.tools(target) - p.pop('') - end - end - end - - p.pop('') - end - - - ---- --- Write out the element, describing a specific Premake --- build configuration/platform pairing. ---- - - m.elements.configuration = function(cfg) - if cfg.fake then - return { - m.intermediateDirectory, - m.configurationType - } - else - return { - m.outputDirectory, - m.intermediateDirectory, - m.configurationType, - m.useOfMFC, - m.characterSet, - m.managedExtensions, - } - end - end - - function m.configuration(cfg, name) - p.push('') - end - - - ---- --- Return the list of tools required to build a specific configuration. --- Each tool gets represented by an XML element in the project file, all --- of which are implemented farther down in this file. --- --- @param cfg --- The configuration being written. ---- - - m.elements.tools = function(cfg) - if vstudio.isMakefile(cfg) and not cfg.fake then - return { - m.VCNMakeTool - } - end - - return { - m.VCPreBuildEventTool, - m.VCCustomBuildTool, - m.VCXMLDataGeneratorTool, - m.VCWebServiceProxyGeneratorTool, - m.VCMIDLTool, - m.VCCLCompilerTool, - m.VCManagedResourceCompilerTool, - m.VCResourceCompilerTool, - m.VCPreLinkEventTool, - m.VCLinkerTool, - m.VCALinkTool, - m.VCManifestTool, - m.VCXDCMakeTool, - m.VCBscMakeTool, - m.VCFxCopTool, - m.VCAppVerifierTool, - m.VCPostBuildEventTool, - } - end - - function m.tools(cfg) - p.callArray(m.elements.tools, cfg, config.toolset(cfg)) - end - - - ---- --- Write out the element group. ---- - - m.elements.references = function(prj) - return { - m.assemblyReferences, - m.projectReferences, - } - end - - function m.references(prj) - p.push('') - p.callArray(m.elements.references, prj) - p.pop('') - end - - - ---- --- Write out the element group. ---- - - function m.files(prj) - local tr = m.filesSorted(prj) - p.push('') - p.tree.traverse(tr, { - onbranchenter = m.filesFilterStart, - onbranchexit = m.filesFilterEnd, - onleaf = m.filesFile, - }, false) - p.pop('') - end - - function m.filesSorted(prj) - -- Fetch the source tree, sorted how Visual Studio likes it: alpha - -- sorted, with any leading ../ sequences ignored. At the top level - -- of the tree, files go after folders, otherwise before. - return project.getsourcetree(prj, function(a,b) - local istop = (a.parent.parent == nil) - - local aSortName = a.name - local bSortName = b.name - - -- Only file nodes have a relpath field; folder nodes do not - if a.relpath then - if not b.relpath then - return not istop - end - aSortName = a.relpath:gsub("%.%.%/", "") - end - - if b.relpath then - if not a.relpath then - return istop - end - bSortName = b.relpath:gsub("%.%.%/", "") - end - - return aSortName < bSortName - end) - end - - function m.filesFilterStart(node) - p.push('') - end - - function m.filesFilterEnd(node) - p.pop('
') - - end - - function m.filesFile(node) - p.push('') - local prj = node.project - for cfg in project.eachconfig(prj) do - m.fileConfiguration(cfg, node) - end - p.pop('') - end - - m.elements.fileConfigurationAttributes = function(filecfg) - return { - m.excludedFromBuild, - } - end - - function m.fileConfiguration(cfg, node) - local filecfg = fileconfig.getconfig(node, cfg) - - -- Generate the individual sections of the file configuration - -- element and capture the results to a buffer. I will only - -- write the file configuration if the buffers are not empty. - - local configAttribs = p.capture(function () - p.push() - p.callArray(m.elements.fileConfigurationAttributes, filecfg) - p.pop() - end) - - local compilerAttribs = p.capture(function () - p.push() - m.VCCLCompilerTool(filecfg) - p.pop() - end) - - -- lines() > 3 skips empty elements - if #configAttribs > 0 or compilerAttribs:lines() > 3 then - p.push(' 0 then - p.outln(configAttribs) - end - p.w('>') - p.outln(compilerAttribs) - p.pop('') - end - end - - - ---- --- I don't do anything with globals yet, but here it is if you want to --- extend it. ---- - - m.elements.globals = function(prj) - return {} - end - - function m.globals(prj) - p.push('') - p.callArray(m.elements.globals, prj) - p.pop('') - end - - - ---------------------------------------------------------------------------- --- --- Handlers for the individual tool sections of the project. --- --- There is a lot of repetition here; most of these tools are just --- placeholders for modules to override as needed. --- ---------------------------------------------------------------------------- - - ---- --- The implementation of a "normal" tool. Writes the opening tool element --- and name attribute, calls the corresponding function list, and then --- closes the element. --- --- @param name --- The name of the tool, e.g. "VCCustomBuildTool". --- @param ... --- Any additional arguments required by the call list. ---- - - function m.VCTool(name, cfg, ...) - p.push('') - end - - ------------ - - m.elements.DebuggerTool = function(cfg) - return {} - end - - function m.DebuggerTool(cfg) - p.push('') - end - - ------------ - - m.elements.VCALinkTool = function(cfg) - return {} - end - - function m.VCALinkTool(cfg) - m.VCTool("VCALinkTool", cfg) - end - - ------------ - - m.elements.VCAppVerifierTool = function(cfg) - return {} - end - - function m.VCAppVerifierTool(cfg) - if cfg.kind ~= p.STATICLIB then - m.VCTool("VCAppVerifierTool", cfg) - end - end - - ------------ - - m.elements.VCBscMakeTool = function(cfg) - return {} - end - - function m.VCBscMakeTool(cfg) - m.VCTool("VCBscMakeTool", cfg) - end - - ------------ - - m.elements.VCCLCompilerTool = function(cfg, toolset) - if not toolset then - -- not a custom tool, use the standard set of attributes - return { - m.customBuildTool, - m.objectFile, - m.additionalCompilerOptions, - m.optimization, - m.additionalIncludeDirectories, - m.wholeProgramOptimization, - m.preprocessorDefinitions, - m.undefinePreprocessorDefinitions, - m.minimalRebuild, - m.basicRuntimeChecks, - m.bufferSecurityCheck, - m.stringPooling, - m.exceptionHandling, - m.runtimeLibrary, - m.enableFunctionLevelLinking, - m.enableEnhancedInstructionSet, - m.floatingPointModel, - m.runtimeTypeInfo, - m.treatWChar_tAsBuiltInType, - m.usePrecompiledHeader, - m.programDataBaseFileName, - m.warningLevel, - m.warnAsError, - m.detect64BitPortabilityProblems, - m.debugInformationFormat, - m.compileAs, - m.disableSpecificWarnings, - m.forcedIncludeFiles, - m.omitDefaultLib, - } - else - -- custom tool, use subset of attributes - return { - m.additionalExternalCompilerOptions, - m.additionalIncludeDirectories, - m.preprocessorDefinitions, - m.undefinePreprocessorDefinitions, - m.usePrecompiledHeader, - m.programDataBaseFileName, - m.debugInformationFormat, - m.compileAs, - m.forcedIncludeFiles, - } - end - end - - function m.VCCLCompilerToolName(cfg) - local prjcfg, filecfg = config.normalize(cfg) - if filecfg and fileconfig.hasCustomBuildRule(filecfg) then - return "VCCustomBuildTool" - else - return "VCCLCompilerTool" - end - end - - function m.VCCLCompilerTool(cfg, toolset) - m.VCTool("VCCLCompilerTool", cfg, toolset) - end - - ------------ - - m.elements.VCCustomBuildTool = function(cfg) - return {} - end - - function m.VCCustomBuildTool(cfg) - m.VCTool("VCCustomBuildTool", cfg) - end - - ------------ - - m.elements.VCFxCopTool = function(cfg) - return {} - end - - function m.VCFxCopTool(cfg) - m.VCTool("VCFxCopTool", cfg) - end - - ------------ - - m.elements.VCLinkerTool = function(cfg, toolset) - if cfg.kind ~= p.STATICLIB then - return { - m.linkLibraryDependencies, - m.ignoreImportLibrary, - m.additionalLinkerOptions, - m.additionalDependencies, - m.outputFile, - m.linkIncremental, - m.additionalLibraryDirectories, - m.moduleDefinitionFile, - m.generateManifest, - m.generateDebugInformation, - m.programDatabaseFile, - m.subSystem, - m.largeAddressAware, - m.optimizeReferences, - m.enableCOMDATFolding, - m.entryPointSymbol, - m.importLibrary, - m.targetMachine, - } - else - return { - m.additionalLinkerOptions, - m.additionalDependencies, - m.outputFile, - m.additionalLibraryDirectories, - } - end - end - - function m.VCLinkerToolName(cfg) - if cfg.kind == p.STATICLIB then - return "VCLibrarianTool" - else - return "VCLinkerTool" - end - end - - function m.VCLinkerTool(cfg, toolset) - m.VCTool("VCLinkerTool", cfg, toolset) - end - - ------------ - - m.elements.VCManagedResourceCompilerTool = function(cfg) - return {} - end - - function m.VCManagedResourceCompilerTool(cfg) - m.VCTool("VCManagedResourceCompilerTool", cfg) - end - - ------------ - - m.elements.VCManifestTool = function(cfg) - return { - m.additionalManifestFiles, - } - end - - function m.VCManifestTool(cfg) - if cfg.kind ~= p.STATICLIB then - m.VCTool("VCManifestTool", cfg) - end - end - - ------------ - - m.elements.VCMIDLTool = function(cfg) - return { - m.targetEnvironment - } - end - - function m.VCMIDLTool(cfg) - m.VCTool("VCMIDLTool", cfg) - end - - ------------ - - m.elements.VCNMakeTool = function(cfg) - return { - m.buildCommandLine, - m.reBuildCommandLine, - m.cleanCommandLine, - m.output, - m.preprocessorDefinitions, - m.undefinePreprocessorDefinitions, - m.includeSearchPath, - m.forcedIncludes, - m.assemblySearchPath, - m.forcedUsingAssemblies, - m.compileAsManaged, - } - end - - function m.VCNMakeTool(cfg) - m.VCTool("VCNMakeTool", cfg) - end - - ------------ - - m.elements.VCBuildTool = function(cfg, stage) - return { - m.commandLine, - } - end - - function m.VCBuildToolName(cfg, stage) - return "VC" .. stage .. "EventTool" - end - - function m.VCPreBuildEventTool(cfg) - m.VCTool("VCBuildTool", cfg, "PreBuild") - end - - function m.VCPreLinkEventTool(cfg) - m.VCTool("VCBuildTool", cfg, "PreLink") - end - - function m.VCPostBuildEventTool(cfg) - m.VCTool("VCBuildTool", cfg, "PostBuild") - end - - ------------ - - m.elements.VCResourceCompilerTool = function(cfg) - return { - m.additionalResourceOptions, - m.resourcePreprocessorDefinitions, - m.additionalResourceIncludeDirectories, - m.culture, - } - end - - function m.VCResourceCompilerTool(cfg) - m.VCTool("VCResourceCompilerTool", cfg) - end - - ------------ - - m.elements.VCWebServiceProxyGeneratorTool = function(cfg) - return {} - end - - function m.VCWebServiceProxyGeneratorTool(cfg) - m.VCTool("VCWebServiceProxyGeneratorTool", cfg) - end - - ------------ - - m.elements.VCXDCMakeTool = function(cfg) - return {} - end - - function m.VCXDCMakeTool(cfg) - m.VCTool("VCXDCMakeTool", cfg) - end - - ------------ - - m.elements.VCXMLDataGeneratorTool = function(cfg) - return {} - end - - function m.VCXMLDataGeneratorTool(cfg) - m.VCTool("VCXMLDataGeneratorTool", cfg) - end - - - ---------------------------------------------------------------------------- --- --- Support functions --- ---------------------------------------------------------------------------- - --- --- Return the debugging symbol level for a configuration. --- - - function m.symbols(cfg) - if not (cfg.symbols == p.ON) then - return 0 - elseif cfg.debugformat == "c7" then - return 1 - else - -- Edit-and-continue doesn't work for some configurations - if cfg.editandcontinue == p.OFF or - config.isOptimizedBuild(cfg) or - cfg.clr ~= p.OFF or - cfg.architecture == p.X86_64 - then - return 3 - else - return 4 - end - end - end - - - ---------------------------------------------------------------------------- --- --- Handlers for individual project elements --- ---------------------------------------------------------------------------- - - - function m.additionalCompilerOptions(cfg) - local opts = cfg.buildoptions - if cfg.flags.MultiProcessorCompile then - table.insert(opts, "/MP") - end - if #opts > 0 then - p.x('AdditionalOptions="%s"', table.concat(opts, " ")) - end - end - - - - function m.additionalDependencies(cfg, toolset) - if #cfg.links == 0 then return end - - local ex = vstudio.needsExplicitLink(cfg) - - local links - if not toolset then - links = vstudio.getLinks(cfg, ex) - for i, link in ipairs(links) do - if link:find(" ", 1, true) then - link = '"' .. link .. '"' - end - links[i] = path.translate(link) - end - else - links = path.translate(toolset.getlinks(cfg, not ex)) - end - - if #links > 0 then - p.x('AdditionalDependencies="%s"', table.concat(links, " ")) - end - end - - - - function m.additionalExternalCompilerOptions(cfg, toolset) - local buildoptions = table.join(toolset.getcxxflags(cfg), cfg.buildoptions) - if not cfg.flags.NoPCH and cfg.pchheader then - table.insert(buildoptions, '--use_pch="$(IntDir)/$(TargetName).pch"') - end - if #buildoptions > 0 then - p.x('AdditionalOptions="%s"', table.concat(buildoptions, " ")) - end - end - - - - function m.additionalImageOptions(cfg) - if #cfg.imageoptions > 0 then - p.x('AdditionalOptions="%s"', table.concat(cfg.imageoptions, " ")) - end - end - - - - function m.additionalIncludeDirectories(cfg) - if #cfg.includedirs > 0 then - local dirs = vstudio.path(cfg, cfg.includedirs) - p.x('AdditionalIncludeDirectories="%s"', table.concat(dirs, ";")) - end - end - - - function m.additionalLibraryDirectories(cfg) - if #cfg.libdirs > 0 then - local dirs = vstudio.path(cfg, cfg.libdirs) - p.x('AdditionalLibraryDirectories="%s"', table.concat(dirs, ";")) - end - end - - - - function m.additionalLinkerOptions(cfg, toolset) - local flags - if toolset then - flags = table.join(toolset.getldflags(cfg), cfg.linkoptions) - else - flags = cfg.linkoptions - end - if #flags > 0 then - p.x('AdditionalOptions="%s"', table.concat(flags, " ")) - end - end - - - - function m.additionalManifestFiles(cfg) - local manifests = {} - for i, fname in ipairs(cfg.files) do - if path.getextension(fname) == ".manifest" then - table.insert(manifests, project.getrelative(cfg.project, fname)) - end - end - if #manifests > 0 then - p.x('AdditionalManifestFiles="%s"', table.concat(manifests, ";")) - end - end - - - - function m.additionalResourceIncludeDirectories(cfg) - local dirs = table.join(cfg.includedirs, cfg.resincludedirs) - if #dirs > 0 then - dirs = vstudio.path(cfg, dirs) - p.x('AdditionalIncludeDirectories="%s"', table.concat(dirs, ";")) - end - end - - - - function m.additionalResourceOptions(cfg) - if #cfg.resoptions > 0 then - p.x('AdditionalOptions="%s"', table.concat(cfg.resoptions, " ")) - end - end - - - - function m.assemblyReferences(prj) - -- Visual Studio doesn't support per-config references - local cfg = project.getfirstconfig(prj) - local refs = config.getlinks(cfg, "system", "fullpath", "managed") - table.foreachi(refs, function(value) - p.push('') - end) - end - - - - function m.assemblySearchPath(cfg) - p.w('AssemblySearchPath=""') - end - - - - function m.basicRuntimeChecks(cfg) - local cfg, filecfg = config.normalize(cfg) - if not filecfg - and not config.isOptimizedBuild(cfg) - and cfg.clr == p.OFF - and not cfg.flags.NoRuntimeChecks - then - p.w('BasicRuntimeChecks="3"') - end - end - - - - function m.bufferSecurityCheck(cfg) - if cfg.flags.NoBufferSecurityCheck then - p.w('BufferSecurityCheck="false"') - end - end - - - - function m.buildCommandLine(cfg) - local cmds = os.translateCommandsAndPaths(cfg.buildcommands, cfg.project.basedir, cfg.project.location) - p.x('BuildCommandLine="%s"', table.concat(cmds, "\r\n")) - end - - - - function m.characterSet(cfg) - if not vstudio.isMakefile(cfg) then - p.w('CharacterSet="%s"', iif(cfg.characterset == p.MBCS, 2, 1)) - end - end - - - - function m.cleanCommandLine(cfg) - local cmds = os.translateCommandsAndPaths(cfg.cleancommands, cfg.project.basedir, cfg.project.location) - cmds = table.concat(cmds, "\r\n") - p.x('CleanCommandLine="%s"', cmds) - end - - - - function m.commandLine(cfg, stage) - local field = stage:lower() - local steps = cfg[field .. "commands"] - local msg = cfg[field .. "message"] - if #steps > 0 then - if msg then - p.x('Description="%s"', msg) - end - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - p.x('CommandLine="%s"', table.implode(steps, "", "", "\r\n")) - end - end - - - - function m.compileAs(cfg, toolset) - local cfg, filecfg = config.normalize(cfg) - local c = p.languages.isc(cfg.language) - local compileAs - if filecfg then - if filecfg.compileas then - compileAs = iif(p.languages.iscpp(filecfg.compileas), 2, 1) - elseif path.iscfile(filecfg.name) ~= c then - if path.iscppfile(filecfg.name) then - compileAs = iif(c, 2, 1) - end - end - else - if toolset then - compileAs = "0" - elseif c then - compileAs = "1" - end - end - if compileAs then - p.w('CompileAs="%s"', compileAs) - end - end - - - - function m.disableSpecificWarnings(cfg) - if #cfg.disablewarnings > 0 then - p.x('DisableSpecificWarnings="%s"', table.concat(cfg.disablewarnings, ";")) - end - end - - - - function m.compileAsManaged(cfg) - p.w('CompileAsManaged=""') - end - - - - function m.configurationType(cfg) - local cfgtypes = { - Makefile = 0, - None = 0, - SharedLib = 2, - StaticLib = 4, - } - p.w('ConfigurationType="%s"', cfgtypes[cfg.kind] or 1) - end - - - - function m.culture(cfg) - local value = vstudio.cultureForLocale(cfg.locale) - if value then - p.w('Culture="%d"', value) - end - end - - - - function m.customBuildTool(cfg) - local cfg, filecfg = config.normalize(cfg) - if filecfg and fileconfig.hasCustomBuildRule(filecfg) then - local cmds = os.translateCommandsAndPaths(filecfg.buildcommands, filecfg.project.basedir, filecfg.project.location) - p.x('CommandLine="%s"', table.concat(cmds,'\r\n')) - - local outputs = project.getrelative(filecfg.project, filecfg.buildoutputs) - p.x('Outputs="%s"', table.concat(outputs, ';')) - - if filecfg.buildinputs and #filecfg.buildinputs > 0 then - local inputs = project.getrelative(filecfg.project, filecfg.buildinputs) - p.x('AdditionalDependencies="%s"', table.concat(inputs, ';')) - end - end - end - - - - function m.debugInformationFormat(cfg, toolset) - local prjcfg, filecfg = config.normalize(cfg) - if not filecfg then - local fmt = iif(toolset, "0", m.symbols(cfg)) - p.w('DebugInformationFormat="%s"', fmt) - end - end - - - - function m.detect64BitPortabilityProblems(cfg) - local prjcfg, filecfg = config.normalize(cfg) - if _ACTION < "vs2008" and cfg.clr == p.OFF and cfg.warnings ~= p.OFF and not filecfg then - p.w('Detect64BitPortabilityProblems="%s"', tostring(not cfg.flags.No64BitChecks)) - end - end - - - - function m.enableCOMDATFolding(cfg, toolset) - if config.isOptimizedBuild(cfg) and not toolset then - p.w('EnableCOMDATFolding="2"') - end - end - - - - function m.largeAddressAware(cfg) - if (cfg.largeaddressaware == true) then - p.w('LargeAddressAware="2"') - end - end - - - - function m.enableEnhancedInstructionSet(cfg) - local map = { SSE = "1", SSE2 = "2" } - local value = map[cfg.vectorextensions] - if value and cfg.architecture ~= "x86_64" then - p.w('EnableEnhancedInstructionSet="%d"', value) - end - end - - - - function m.enableFunctionLevelLinking(cfg) - local cfg, filecfg = config.normalize(cfg) - if not filecfg then - p.w('EnableFunctionLevelLinking="true"') - end - end - - - - function m.entryPointSymbol(cfg, toolset) - if cfg.entrypoint then - p.w('EntryPointSymbol="%s"', cfg.entrypoint) - end - end - - - - function m.exceptionHandling(cfg) - if cfg.exceptionhandling == p.OFF then - p.w('ExceptionHandling="%s"', iif(_ACTION < "vs2005", "FALSE", 0)) - elseif cfg.exceptionhandling == "SEH" and _ACTION > "vs2003" then - p.w('ExceptionHandling="2"') - end - end - - - - function m.excludedFromBuild(filecfg) - if not filecfg or filecfg.flags.ExcludeFromBuild then - p.w('ExcludedFromBuild="true"') - end - end - - - - function m.floatingPointModel(cfg) - local map = { Strict = "1", Fast = "2" } - local value = map[cfg.floatingpoint] - if value then - p.w('FloatingPointModel="%d"', value) - end - end - - - - function m.forcedIncludeFiles(cfg) - if #cfg.forceincludes > 0 then - local includes = vstudio.path(cfg, cfg.forceincludes) - p.w('ForcedIncludeFiles="%s"', table.concat(includes, ';')) - end - if #cfg.forceusings > 0 then - local usings = vstudio.path(cfg, cfg.forceusings) - p.w('ForcedUsingFiles="%s"', table.concat(usings, ';')) - end - end - - - - function m.forcedIncludes(cfg) - p.w('ForcedIncludes=""') - end - - - - function m.forcedUsingAssemblies(cfg) - p.w('ForcedUsingAssemblies=""') - end - - - - function m.keyword(prj) - local windows, managed, makefile - for cfg in project.eachconfig(prj) do - if cfg.system == p.WINDOWS then windows = true end - if cfg.clr ~= p.OFF then managed = true end - if vstudio.isMakefile(cfg) then makefile = true end - end - - if windows then - local keyword = "Win32Proj" - if managed then - keyword = "ManagedCProj" - end - if makefile then - keyword = "MakeFileProj" - end - p.w('Keyword="%s"', keyword) - end - end - - - - function m.generateDebugInformation(cfg, toolset) - if not toolset then - p.w('GenerateDebugInformation="%s"', tostring(m.symbols(cfg) ~= 0)) - end - end - - - - function m.generateManifest(cfg, toolset) - if cfg.flags.NoManifest or toolset then - p.w('GenerateManifest="false"') - end - end - - - - function m.ignoreImportLibrary(cfg, toolset) - if cfg.flags.NoImportLib and not toolset then - p.w('IgnoreImportLibrary="true"') - end - end - - - - function m.importLibrary(cfg, toolset) - if cfg.kind == p.SHAREDLIB and not toolset then - local implibdir = cfg.linktarget.abspath - - -- I can't actually stop the import lib, but I can hide it in the objects directory - if cfg.flags.NoImportLib then - implibdir = path.join(cfg.objdir, path.getname(implibdir)) - end - - implibdir = vstudio.path(cfg, implibdir) - p.x('ImportLibrary="%s"', implibdir) - end - end - - - - function m.includeSearchPath(cfg) - p.w('IncludeSearchPath=""') - end - - - - function m.intermediateDirectory(cfg) - local objdir - if not cfg.fake then - objdir = vstudio.path(cfg, cfg.objdir) - else - objdir = "$(PlatformName)\\$(ConfigurationName)" - end - p.x('IntermediateDirectory="%s"', objdir) - end - - - - function m.linkIncremental(cfg, toolset) - local value - if not toolset then - value = iif(config.canLinkIncremental(cfg) , 2, 1) - else - value = 0 - end - p.w('LinkIncremental="%s"', value) - end - - - - function m.linkLibraryDependencies(cfg, toolset) - if vstudio.needsExplicitLink(cfg) and not toolset then - p.w('LinkLibraryDependencies="false"') - end - end - - - - function m.managedExtensions(cfg) - if cfg.clr ~= p.OFF then - p.w('ManagedExtensions="1"') - end - end - - - - function m.minimalRebuild(cfg) - if config.isDebugBuild(cfg) and - cfg.debugformat ~= "c7" and - not cfg.flags.NoMinimalRebuild and - cfg.clr == p.OFF and - not cfg.flags.MultiProcessorCompile - then - p.w('MinimalRebuild="true"') - end - end - - - - function m.moduleDefinitionFile(cfg, toolset) - if not toolset then - local deffile = config.findfile(cfg, ".def") - if deffile then - p.w('ModuleDefinitionFile="%s"', deffile) - end - end - end - - - - function m.objectFile(cfg) - local cfg, filecfg = config.normalize(cfg) - if filecfg and path.iscppfile(filecfg.name) then - if filecfg.objname ~= path.getbasename(filecfg.abspath) then - p.x('ObjectFile="$(IntDir)\\%s.obj"', filecfg.objname) - end - end - end - - - - function m.omitDefaultLib(cfg) - if cfg.flags.OmitDefaultLibrary then - p.w('OmitDefaultLibName="true"') - end - end - - - - function m.omitFramePointers(cfg) - if cfg.omitframepointer == "On" then - p.w('OmitFramePointers="true"') - end - end - - - - function m.optimization(cfg) - local map = { Off=0, On=3, Debug=0, Full=3, Size=1, Speed=2 } - local value = map[cfg.optimize] - if value or not cfg.abspath then - p.w('Optimization="%s"', value or 0) - end - end - - - - function m.optimizeReferences(cfg, toolset) - if config.isOptimizedBuild(cfg) and not toolset then - p.w('OptimizeReferences="2"') - end - end - - - - function m.output(cfg) - p.w('Output="$(OutDir)%s"', cfg.buildtarget.name) - end - - - - function m.outputDirectory(cfg) - local outdir = project.getrelative(cfg.project, cfg.buildtarget.directory) - p.x('OutputDirectory="%s"', path.translate(outdir)) - end - - - - function m.outputFile(cfg) - p.x('OutputFile="$(OutDir)\\%s"', cfg.buildtarget.name) - end - - - - function m.outputFileName(cfg) - if cfg.imagepath ~= nil then - p.x('OutputFileName="%s"', path.translate(cfg.imagepath)) - end - end - - - - function m.platforms(prj) - architectures = {} - for cfg in project.eachconfig(prj) do - local arch = vstudio.archFromConfig(cfg, true) - if not table.contains(architectures, arch) then - table.insert(architectures, arch) - end - end - - p.push('') - table.foreachi(architectures, function(arch) - p.push('') - end) - p.pop('') - end - - - - function m.preprocessorDefinitions(cfg) - if #cfg.defines > 0 or vstudio.isMakefile(cfg) then - p.x('PreprocessorDefinitions="%s"', table.concat(cfg.defines, ";")) - end - end - - - function m.undefinePreprocessorDefinitions(cfg) - if #cfg.undefines > 0 then - p.x('UndefinePreprocessorDefinitions="%s"', table.concat(cfg.undefines, ";")) - end - end - - - function m.programDatabaseFile(cfg, toolset) - if toolset then - p.w('ProgramDatabaseFile=""') - end - end - - - function m.programDataBaseFileName(cfg, toolset) - if toolset then - p.w('ProgramDataBaseFileName=""') - end - end - - - - function m.projectGUID(prj) - p.w('ProjectGUID="{%s}"', prj.uuid) - end - - - - function m.projectName(prj) - p.x('Name="%s"', prj.name) - end - - - - function m.projectReferences(prj) - local deps = project.getdependencies(prj) - if #deps > 0 then - -- This is a little odd: Visual Studio wants the "relative path to project" - -- to be relative to the *workspace*, rather than the project doing the - -- referencing. Which, in theory, would break if the project is included - -- in more than one workspace. But that's how they do it. - - for i, dep in ipairs(deps) do - local relpath = vstudio.path(prj.workspace, vstudio.projectfile(dep)) - - -- Visual Studio wants the path to start with ./ or ../ - if not relpath:startswith(".") then - relpath = ".\\" .. relpath - end - - p.push('') - end - end - end - - - - function m.projectType(prj) - p.w('ProjectType="Visual C++"') - end - - - - function m.reBuildCommandLine(cfg) - commands = table.concat(cfg.rebuildcommands, "\r\n") - p.x('ReBuildCommandLine="%s"', commands) - end - - - - function m.resourcePreprocessorDefinitions(cfg) - local defs = table.join(cfg.defines, cfg.resdefines) - if #defs > 0 then - p.x('PreprocessorDefinitions="%s"', table.concat(defs, ";")) - end - end - - - - function m.rootNamespace(prj) - local hasWindows = project.hasConfig(prj, function(cfg) - return cfg.system == p.WINDOWS - end) - - -- Technically, this should be skipped for pure makefile projects that - -- do not contain any empty configurations. But I need to figure out a - -- a good way to check the empty configuration bit first. - - if hasWindows and _ACTION > "vs2003" then - p.x('RootNamespace="%s"', prj.name) - end - end - - - - function m.runtimeLibrary(cfg) - local cfg, filecfg = config.normalize(cfg) - if not filecfg then - local runtimes = { - StaticRelease = 0, - StaticDebug = 1, - SharedRelease = 2, - SharedDebug = 3, - } - local runtime = config.getruntime(cfg) - if runtime then - p.w('RuntimeLibrary="%s"', runtimes[runtime]) - else - -- TODO: this path should probably be omitted and left for default - -- ...but I can't really test this, so I'm a leave it how I found it - p.w('RuntimeLibrary="%s"', iif(config.isDebugBuild(cfg), 3, 2)) - end - end - end - - - - function m.runtimeTypeInfo(cfg) - if cfg.rtti == p.OFF and cfg.clr == p.OFF then - p.w('RuntimeTypeInfo="false"') - elseif cfg.rtti == p.ON then - p.w('RuntimeTypeInfo="true"') - end - end - - - function m.stringPooling(cfg) - if config.isOptimizedBuild(cfg) then - p.w('StringPooling="true"') - end - end - - - function m.subSystem(cfg, toolset) - if not toolset then - p.w('SubSystem="%s"', iif(cfg.kind == "ConsoleApp", 1, 2)) - end - end - - - function m.targetEnvironment(cfg) - if cfg.architecture == "x86_64" then - p.w('TargetEnvironment="3"') - end - end - - - function m.targetFrameworkVersion(prj) - local windows, makefile - for cfg in project.eachconfig(prj) do - if cfg.system == p.WINDOWS then windows = true end - if vstudio.isMakefile(cfg) then makefile = true end - end - - local version = 0 - if makefile or not windows then - version = 196613 - end - p.w('TargetFrameworkVersion="%d"', version) - end - - - function m.targetMachine(cfg, toolset) - if not toolset then - p.w('TargetMachine="%d"', iif(cfg.architecture == "x86_64", 17, 1)) - end - end - - - function m.toolFiles(prj) - if _ACTION > "vs2003" then - p.w('') - p.w('') - end - end - - - function m.treatWChar_tAsBuiltInType(cfg) - local map = { On = "true", Off = "false" } - local value = map[cfg.nativewchar] - if value then - p.w('TreatWChar_tAsBuiltInType="%s"', value) - end - end - - - function m.useOfMFC(cfg) - if (cfg.flags.MFC) then - p.w('UseOfMFC="%d"', iif(cfg.staticruntime == "On", 1, 2)) - end - end - - - function m.usePrecompiledHeader(cfg) - local prj, file = config.normalize(cfg) - if file then - if prj.pchsource == file.abspath and - not prj.flags.NoPCH and - prj.system == p.WINDOWS - then - p.w('UsePrecompiledHeader="1"') - elseif file.flags.NoPCH then - p.w('UsePrecompiledHeader="0"') - end - else - if not prj.flags.NoPCH and prj.pchheader then - p.w('UsePrecompiledHeader="%s"', iif(_ACTION < "vs2005", 3, 2)) - p.x('PrecompiledHeaderThrough="%s"', prj.pchheader) - else - p.w('UsePrecompiledHeader="%s"', iif(_ACTION > "vs2003" or prj.flags.NoPCH, 0, 2)) - end - end - end - - - - function m.version(prj) - local map = { - vs2002 = '7.0', - vs2003 = '7.1', - vs2005 = '8.0', - vs2008 = '9.0' - } - p.w('Version="%s0"', map[_ACTION]) - end - - - - function m.warnAsError(cfg) - if cfg.flags.FatalCompileWarnings and cfg.warnings ~= p.OFF then - p.w('WarnAsError="true"') - end - end - - - - function m.warningLevel(cfg) - local prjcfg, filecfg = config.normalize(cfg) - - local level - if cfg.warnings == p.OFF then - level = "0" - elseif cfg.warnings == "Extra" then - level = "4" - elseif not filecfg then - level = "3" - end - - if level then - p.w('WarningLevel="%s"', level) - end - end - - - - function m.wholeProgramOptimization(cfg) - if cfg.flags.LinkTimeOptimization then - p.x('WholeProgramOptimization="true"') - end - end - - - function m.xmlElement() - p.w('') - end diff --git a/build/premake/premake5/modules/vstudio/vs200x_vcproj_user.lua b/build/premake/premake5/modules/vstudio/vs200x_vcproj_user.lua deleted file mode 100644 index 1342fce044..0000000000 --- a/build/premake/premake5/modules/vstudio/vs200x_vcproj_user.lua +++ /dev/null @@ -1,131 +0,0 @@ --- --- vs200x_vcproj_user.lua --- Generate a Visual Studio 2002-2008 C/C++ project .user file --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local m = p.vstudio.vc200x - - - --- --- Generate a Visual Studio 200x C++ user file, with support for the new platforms API. --- - - m.elements.user = function(cfg) - return { - m.debugSettings, - } - end - - function m.generateUser(prj) - p.indent("\t") - - -- Only want output if there is something to configure - local contents = {} - local size = 0 - - for cfg in p.project.eachconfig(prj) do - contents[cfg] = p.capture(function() - p.push(4) - p.callArray(m.elements.user, cfg) - p.pop(4) - end) - size = size + #contents[cfg] - end - - if size > 0 then - m.xmlElement() - m.visualStudioUserFile() - p.push('') - for cfg in p.project.eachconfig(prj) do - m.userConfiguration(cfg) - p.push(' 0 then - p.outln(contents[cfg]) - end - p.pop('/>') - p.pop('') - end - p.pop('') - p.pop('') - end - end - - - ---- --- Output the opening project tag. ---- - - function m.visualStudioUserFile() - p.push('') - end - - - --- --- Write out the element, describing a specific Premake --- build configuration/platform pairing. --- - - function m.userConfiguration(cfg) - p.push('') - end - - - --- --- Write out the debug settings for this project. --- - - m.elements.debugSettings = function(cfg) - return { - m.debugCommand, - m.debugDir, - m.debugArgs, - m.debugEnvironment, - } - end - - function m.debugSettings(cfg) - p.callArray(m.elements.debugSettings, cfg) - end - - - function m.debugArgs(cfg) - if #cfg.debugargs > 0 then - p.x('CommandArguments="%s"', table.concat(cfg.debugargs, " ")) - end - end - - - function m.debugCommand(cfg) - if cfg.debugcommand then - p.x('Command="%s"', p.vstudio.path(cfg, cfg.debugcommand)) - end - end - - - function m.debugDir(cfg) - if cfg.debugdir then - p.x('WorkingDirectory="%s"', p.vstudio.path(cfg, cfg.debugdir)) - end - end - - - function m.debugEnvironment(cfg) - if #cfg.debugenvs > 0 then - p.x('Environment="%s"', table.concat(cfg.debugenvs, "\n")) - if cfg.flags.DebugEnvsDontMerge then - p.x('EnvironmentMerge="false"') - end - end - end diff --git a/build/premake/premake5/modules/vstudio/vs2010.lua b/build/premake/premake5/modules/vstudio/vs2010.lua deleted file mode 100644 index ed4fcfe7c9..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010.lua +++ /dev/null @@ -1,206 +0,0 @@ --- --- vs2010.lua --- Add support for the Visual Studio 2010 project formats. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vs2010 = {} - - local vs2010 = p.vstudio.vs2010 - local vstudio = p.vstudio - local project = p.project - local tree = p.tree - - ---- --- Map Premake tokens to the corresponding Visual Studio variables. ---- - - vs2010.pathVars = { - ["cfg.objdir"] = { absolute = true, token = "$(IntDir)" }, - ["prj.location"] = { absolute = true, token = "$(ProjectDir)" }, - ["prj.name"] = { absolute = false, token = "$(ProjectName)" }, - ["sln.location"] = { absolute = true, token = "$(SolutionDir)" }, - ["sln.name"] = { absolute = false, token = "$(SolutionName)" }, - ["wks.location"] = { absolute = true, token = "$(SolutionDir)" }, - ["wks.name"] = { absolute = false, token = "$(SolutionName)" }, - ["cfg.buildtarget.directory"] = { absolute = false, token = "$(TargetDir)" }, - ["cfg.buildtarget.name"] = { absolute = false, token = "$(TargetFileName)" }, - ["cfg.buildtarget.basename"] = { absolute = false, token = "$(TargetName)" }, - ["file.basename"] = { absolute = false, token = "%(Filename)" }, - ["file.abspath"] = { absolute = true, token = "%(FullPath)" }, - ["file.relpath"] = { absolute = false, token = "%(Identity)" }, - ["file.path"] = { absolute = false, token = "%(Identity)" }, - ["file.directory"] = { absolute = true, token = "%(RootDir)%(Directory)" }, - ["file.reldirectory"] = { absolute = false, token = "%(RelativeDir)" }, - ["file.extension"] = { absolute = false, token = "%(Extension)" }, - ["file.name"] = { absolute = false, token = "%(Filename)%(Extension)" }, - } - - - ---- --- Identify the type of project being exported and hand it off --- the right generator. ---- - - function vs2010.generateProject(prj) - p.eol("\r\n") - p.indent(" ") - p.escaper(vs2010.esc) - - if p.project.iscsharp(prj) then - p.generate(prj, ".csproj", vstudio.cs2005.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vstudio.cs2005.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".csproj.user", function() p.outln(user) end) - end - - elseif p.project.isfsharp(prj) then - p.generate(prj, ".fsproj", vstudio.fs2005.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vstudio.fs2005.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".fsproj.user", function() p.outln(user) end) - end - - elseif p.project.isc(prj) or p.project.iscpp(prj) then - if prj.kind == p.SHAREDITEMS then - local projFileModified = p.generate(prj, ".vcxitems", vstudio.vc2013.generate) - - -- Only generate a filters file if the source tree actually has subfolders - if tree.hasbranches(project.getsourcetree(prj)) then - if p.generate(prj, ".vcxitems.filters", vstudio.vc2010.generateFilters) == true and projFileModified == false then - -- vs workaround for issue where if only the .filters file is modified, VS doesn't automaticly trigger a reload - p.touch(prj, ".vcxitems") - end - end - else - local projFileModified = p.generate(prj, ".vcxproj", vstudio.vc2010.generate) - - -- Skip generation of empty user files - local user = p.capture(function() vstudio.vc2010.generateUser(prj) end) - if #user > 0 then - p.generate(prj, ".vcxproj.user", function() p.outln(user) end) - end - - -- Only generate a filters file if the source tree actually has subfolders - if tree.hasbranches(project.getsourcetree(prj)) then - if p.generate(prj, ".vcxproj.filters", vstudio.vc2010.generateFilters) == true and projFileModified == false then - -- vs workaround for issue where if only the .filters file is modified, VS doesn't automaticly trigger a reload - p.touch(prj, ".vcxproj") - end - end - end - end - - if not vstudio.nuget2010.supportsPackageReferences(prj) then - -- Skip generation of empty packages.config files - local packages = p.capture(function() vstudio.nuget2010.generatePackagesConfig(prj) end) - if #packages > 0 then - p.generate(prj, "packages.config", function() p.outln(packages) end) - end - - -- Skip generation of empty NuGet.Config files - local config = p.capture(function() vstudio.nuget2010.generateNuGetConfig(prj) end) - if #config > 0 then - p.generate(prj, "NuGet.Config", function() p.outln(config) end) - end - end - end - - - ---- --- Generate the .props, .targets, and .xml files for custom rules. ---- - - function vs2010.generateRule(rule) - p.eol("\r\n") - p.indent(" ") - p.escaper(vs2010.esc) - - p.generate(rule, ".props", vs2010.rules.props.generate) - p.generate(rule, ".targets", vs2010.rules.targets.generate) - p.generate(rule, ".xml", vs2010.rules.xml.generate) - end - - - --- --- The VS 2010 standard for XML escaping in generated project files. --- - - function vs2010.esc(value) - value = value:gsub('&', "&") - value = value:gsub('<', "<") - value = value:gsub('>', ">") - return value - end - - - ---- --- Define the Visual Studio 2010 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2010", - shortname = "Visual Studio 2010", - description = "Generate Visual Studio 2010 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v100", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - vstudio.vs2005.generateSolution(wks) - end, - onProject = function(prj) - vstudio.vs2010.generateProject(prj) - end, - onRule = function(rule) - vstudio.vs2010.generateRule(rule) - end, - - onCleanWorkspace = function(wks) - vstudio.cleanSolution(wks) - end, - onCleanProject = function(prj) - vstudio.cleanProject(prj) - end, - onCleanTarget = function(prj) - vstudio.cleanTarget(prj) - end, - - pathVars = vs2010.pathVars, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - csprojSchemaVersion = "2.0", - productVersion = "8.0.30703", - solutionVersion = "11", - versionName = "2010", - targetFramework = "4.0", - toolsVersion = "4.0", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs2010_nuget.lua b/build/premake/premake5/modules/vstudio/vs2010_nuget.lua deleted file mode 100644 index 1faeeab5ad..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_nuget.lua +++ /dev/null @@ -1,437 +0,0 @@ --- --- vs2010_nuget.lua --- Generate a NuGet packages.config file. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.nuget2010 = {} - - local vstudio = p.vstudio - local nuget2010 = p.vstudio.nuget2010 - local dn2005 = p.vstudio.dotnetbase - - local packageAPIInfos = {} - local packageSourceInfos = {} - --- --- These functions take the package string as an argument and give you --- information about it. --- - - function nuget2010.packageId(package) - return package:sub(0, package:find(":") - 1) - end - - function nuget2010.packageVersion(package) - return package:sub(package:find(":") + 1, -1) - end - - function nuget2010.packageFramework(prj) - if p.project.isdotnet(prj) then - local cfg = p.project.getfirstconfig(prj) - local action = p.action.current() - local framework = cfg.dotnetframework or action.vstudio.targetFramework - return dn2005.formatNuGetFrameworkVersion(framework) - else - return "native" - end - end - - function nuget2010.supportsPackageReferences(prj) - return _ACTION >= "vs2017" and p.project.isdotnet(prj) - end - - --- --- Given a package string, returns a table containing "verbatimVersion", --- "version" and for C# packages, "packageEntries". --- - - function nuget2010.packageAPIInfo(prj, package) - local id = nuget2010.packageId(package) - local version = nuget2010.packageVersion(package) - - -- It's possible that NuGet already has this package in its cache. In - -- that case we can examine the nuspec file and the file listing - -- locally. - - local function examinePackageFromCache() - -- It should be possible to implement this for platforms other than - -- Windows, but we'll need to figure out where the NuGet cache is on - -- these platforms (or if they even have one). - - if not os.ishost("windows") then - return - end - - local cachePath = path.translate(path.join(os.getenv("userprofile"), ".nuget/packages", id)) - - if os.isdir(cachePath) then - local packageAPIInfo = {} - - printf("Examining cached NuGet package '%s'...", id) - io.flush() - - local versionPath = path.translate(path.join(cachePath, version)) - - local nuspecPath = path.translate(path.join(versionPath, id .. ".nuspec")) - - if not os.isfile(nuspecPath) then - return - end - - local nuspec = io.readfile(nuspecPath) - - if not nuspec then - return - end - - packageAPIInfo.verbatimVersion = nuspec:match("(.+)") - packageAPIInfo.version = version - - if not packageAPIInfo.verbatimVersion then - return - end - - if p.project.isdotnet(prj) then - -- Using the local file listing for "packageEntries" might - -- not exactly match what we would get from the API but this - -- doesn't matter. At the moment of writing, we're only - -- interested in knowing what DLL files the package - -- contains. - - packageAPIInfo.packageEntries = {} - - for _, file in ipairs(os.matchfiles(path.translate(path.join(versionPath, "**")))) do - local extension = path.getextension(file) - - if extension ~= ".nupkg" and extension ~= ".sha512" then - table.insert(packageAPIInfo.packageEntries, path.translate(path.getrelative(versionPath, file))) - end - end - - if #packageAPIInfo.packageEntries == 0 then - return - end - - if nuspec:match("(.+)") then - p.warn("NuGet package '%s' may depend on .NET Framework assemblies - package dependencies are currently unimplemented", id) - end - end - - if nuspec:match("(.+)") then - p.warn("NuGet package '%s' may depend on other packages - package dependencies are currently unimplemented", id) - end - - packageAPIInfos[package] = packageAPIInfo - end - end - - if not packageAPIInfos[package] then - examinePackageFromCache() - end - - -- If we didn't find the package from the cache, use the NuGet API - -- instead. - - if not packageAPIInfos[package] then - if not packageSourceInfos[prj.nugetsource] then - local packageSourceInfo = {} - - printf("Examining NuGet package source '%s'...", prj.nugetsource) - io.flush() - - local response, err, code = http.get(prj.nugetsource) - - if err ~= "OK" then - p.error("NuGet API error (%d)\n%s", code, err) - end - - response, err = json.decode(response) - - if not response then - p.error("Failed to decode NuGet API response (%s)", err) - end - - if not response.resources then - p.error("Failed to understand NuGet API response (no resources in response)", id) - end - - local packageDisplayMetadataUriTemplate, catalog - - for _, resource in ipairs(response.resources) do - if not resource["@id"] then - p.error("Failed to understand NuGet API response (no resource['@id'])") - end - - if not resource["@type"] then - p.error("Failed to understand NuGet API response (no resource['@type'])") - end - - if resource["@type"]:find("PackageDisplayMetadataUriTemplate") == 1 then - packageDisplayMetadataUriTemplate = resource - end - - if resource["@type"]:find("Catalog") == 1 then - catalog = resource - end - end - - if not packageDisplayMetadataUriTemplate then - p.error("Failed to understand NuGet API response (no PackageDisplayMetadataUriTemplate resource)") - end - - if not catalog then - if prj.nugetsource == "https://api.nuget.org/v3/index.json" then - p.error("Failed to understand NuGet API response (no Catalog resource)") - else - p.error("Package source is not a NuGet gallery - non-gallery sources are currently unsupported", prj.nugetsource, prj.name) - end - end - - packageSourceInfo.packageDisplayMetadataUriTemplate = packageDisplayMetadataUriTemplate - packageSourceInfo.catalog = catalog - - packageSourceInfos[prj.nugetsource] = packageSourceInfo - end - - local packageAPIInfo = {} - - printf("Examining NuGet package '%s'...", id) - io.flush() - - local response, err, code = http.get(packageSourceInfos[prj.nugetsource].packageDisplayMetadataUriTemplate["@id"]:gsub("{id%-lower}", id:lower())) - - if err ~= "OK" then - if code == 404 then - p.error("NuGet package '%s' for project '%s' couldn't be found in the repository", id, prj.name) - else - p.error("NuGet API error (%d)\n%s", code, err) - end - end - - response, err = json.decode(response) - - if not response then - p.error("Failed to decode NuGet API response (%s)", err) - end - - if not response.items or #response.items == 0 then - p.error("Failed to understand NuGet API response (no pages for package '%s')", id) - end - - local items = {} - - for _, page in ipairs(response.items) do - if not page.items or #page.items == 0 then - p.error("Failed to understand NuGet API response (got a page with no items for package '%s')", id) - end - - for _, item in ipairs(page.items) do - table.insert(items, item) - end - end - - local versions = {} - - for _, item in ipairs(items) do - if not item.catalogEntry then - p.error("Failed to understand NuGet API response (subitem of package '%s' has no catalogEntry)", id) - end - - if not item.catalogEntry.version then - p.error("Failed to understand NuGet API response (subitem of package '%s' has no catalogEntry.version)", id) - end - - if not item.catalogEntry["@id"] then - p.error("Failed to understand NuGet API response (subitem of package '%s' has no catalogEntry['@id'])", id) - end - - table.insert(versions, item.catalogEntry.version) - end - - if not table.contains(versions, version) then - local options = table.translate(versions, function(value) return "'" .. value .. "'" end) - options = table.concat(options, ", ") - - p.error("'%s' is not a valid version for NuGet package '%s' (options are: %s)", version, id, options) - end - - for _, item in ipairs(items) do - if item.catalogEntry.version == version then - local response, err, code = http.get(item.catalogEntry["@id"]) - - if err ~= "OK" then - if code == 404 then - p.error("NuGet package '%s' version '%s' couldn't be found in the repository even though the API reported that it exists", id, version) - else - p.error("NuGet API error (%d)\n%s", code, err) - end - end - - response, err = json.decode(response) - - if not response then - p.error("Failed to decode NuGet API response (%s)", err) - end - - if not response.verbatimVersion and not response.version then - p.error("Failed to understand NuGet API response (package '%s' version '%s' has no verbatimVersion or version)", id, version) - end - - packageAPIInfo.verbatimVersion = response.verbatimVersion - packageAPIInfo.version = response.version - - -- C++ packages don't have this, but C# packages have a - -- packageEntries field that lists all the files in the - -- package. We need to look at this to figure out what - -- DLLs to reference in the project file. - - if prj.language == "C#" and not response.packageEntries then - p.error("NuGet package '%s' version '%s' has no file listing. This package might be too old to be using this API or it might be a C++ package instead of a .NET Framework package.", id, response.version) - end - - if prj.language == "C#" then - packageAPIInfo.packageEntries = {} - - for _, item in ipairs(response.packageEntries) do - if not item.fullName then - p.error("Failed to understand NuGet API response (package '%s' version '%s' packageEntry has no fullName)", id, version) - end - - table.insert(packageAPIInfo.packageEntries, path.translate(item.fullName)) - end - - if #packageAPIInfo.packageEntries == 0 then - p.error("NuGet package '%s' file listing is empty", id) - end - - if response.frameworkAssemblyGroup then - p.warn("NuGet package '%s' may depend on .NET Framework assemblies - package dependencies are currently unimplemented", id) - end - end - - if response.dependencyGroups then - p.warn("NuGet package '%s' may depend on other packages - package dependencies are currently unimplemented", id) - end - - break - end - end - - packageAPIInfos[package] = packageAPIInfo - end - - return packageAPIInfos[package] - end - - --- --- Generates the packages.config file. --- - - function nuget2010.generatePackagesConfig(prj) - if #prj.nuget > 0 then - p.w('') - p.push('') - - for _, package in ipairs(prj.nuget) do - p.x('', nuget2010.packageId(package), nuget2010.packageVersion(package), nuget2010.packageFramework(prj)) - end - - p.pop('') - end - end - - --- --- Generates the NuGet.Config file. --- - - function nuget2010.generateNuGetConfig(prj) - if #prj.nuget == 0 then - return - end - - if prj.nugetsource == "https://api.nuget.org/v3/index.json" then - return - end - - p.w('') - p.push('') - p.push('') - - -- By specifying "", we ensure that only the source that we - -- define below is used. Otherwise it would just get added to the list - -- of package sources. - - p.x('') - - p.x('', prj.nugetsource, prj.nugetsource) - p.pop('') - p.pop('') - end - - --- --- nuget workspace validation --- - - function nuget2010.uniqueProjectLocationsWithNuGet(wks) - local locations = {} - for prj in p.workspace.eachproject(wks) do - if not nuget2010.supportsPackageReferences(prj) then - local function fail() - p.error("projects '%s' and '%s' cannot have the same location when using NuGet with different packages (packages.config conflict)", locations[prj.location].name, prj.name) - end - - if locations[prj.location] and #locations[prj.location].nuget > 0 and #prj.nuget > 0 then - if #locations[prj.location].nuget ~= #prj.nuget then - fail() - end - - for i, package in ipairs(locations[prj.location].nuget) do - if prj.nuget[i] ~= package then - fail() - end - end - end - locations[prj.location] = prj - end - end - end - - p.override(p.validation.elements, "workspace", function (oldfn, wks) - local t = oldfn(wks) - table.insert(t, nuget2010.uniqueProjectLocationsWithNuGet) - return t - end) - --- --- nuget project validation --- - - function nuget2010.NuGetHasHTTP(prj) - if not http and #prj.nuget > 0 and not nuget2010.supportsPackageReferences(prj) then - p.error("Premake was compiled with --no-curl, but Curl is required for NuGet support (project '%s' is referencing NuGet packages)", prj.name) - end - end - - function nuget2010.NuGetPackageStrings(prj) - for _, package in ipairs(prj.nuget) do - local components = package:explode(":") - - if #components ~= 2 or #components[1] == 0 or #components[2] == 0 then - p.error("NuGet package '%s' in project '%s' is invalid - please give packages in the format 'id:version', e.g. 'NUnit:3.6.1'", package, prj.name) - end - end - end - - p.override(p.validation.elements, "project", function (oldfn, prj) - local t = oldfn(prj) - table.insert(t, nuget2010.NuGetHasHTTP) - table.insert(t, nuget2010.NuGetPackageStrings) - return t - end) - diff --git a/build/premake/premake5/modules/vstudio/vs2010_rules_props.lua b/build/premake/premake5/modules/vstudio/vs2010_rules_props.lua deleted file mode 100644 index c26295971f..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_rules_props.lua +++ /dev/null @@ -1,182 +0,0 @@ ---- --- vs2010_rules_props.lua --- Generate a Visual Studio 201x custom rules properties file. --- Copyright (c) Jason Perkins and the Premake project --- - - - local p = premake - p.vstudio.vs2010.rules = {} - p.vstudio.vs2010.rules.props = {} - - local m = p.vstudio.vs2010.rules.props - m.elements = {} - - ---- --- Entry point; generate the root element. ---- - - m.elements.project = function(r) - return { - p.vstudio.projectElement, - m.targetsGroup, - m.dependsOnGroup, - m.ruleGroup, - } - end - - function m.generate(r) - p.xmlUtf8() - p.callArray(m.elements.project, r) - p.pop() - p.out('') - end - - - ---- --- Generate the targets property group element. ---- - - m.elements.targetsGroup = function(r) - return { - m.beforeTargets, - m.afterTargets, - } - end - - function m.targetsGroup(r) - p.w('', - r.name, r.name) - p.callArray(m.elements.targetsGroup, r) - p.pop('') - end - - - ---- --- Generate the dependencies property group element. ---- - - m.elements.dependsOnGroup = function(r) - return { - m.dependsOn, - } - end - - function m.dependsOnGroup(r) - p.push('') - p.callArray(m.elements.dependsOnGroup, r) - p.pop('') - end - - - ---- --- Generate the rule itemm group element. ---- - - m.elements.ruleGroup = function(r) - return { - m.propertyDefaults, - m.commandLineTemplates, - m.executionDescription, - m.additionalDependencies, - } - end - - function m.ruleGroup(r) - p.push('') - p.push('<%s>', r.name) - p.callArray(m.elements.ruleGroup, r) - p.pop('', r.name) - p.pop('') - end - - - ---- --- Output the default values for all of the property definitions. ---- - - function m.propertyDefaults(r) - local defs = r.propertydefinition - for i = 1, #defs do - local def = defs[i] - local value = def.value - if value then - if def.kind == "path" then - value = path.translate(value) - end - p.w('<%s>%s', def.name, value, def.name) - end - end - end - - - ---- --- Implementations of individual elements. ---- - - function m.additionalDependencies(r) - local deps = table.concat(r.builddependencies, ";") - p.x('%s', deps) - end - - - - function m.afterTargets(r) - p.w('<%sAfterTargets>CustomBuild', r.name, r.name) - end - - - - function m.beforeTargets(r) - p.w('<%sBeforeTargets>Midl', r.name, r.name) - end - - - - function m.commandLineTemplates(r) - -- create shadow context. - local env = p.rule.createEnvironment(r, "[%s]") - local ctx = p.context.extent(r, env) - - -- now use the shadow context to detoken. - local buildcommands = ctx.buildcommands - - -- write out the result. - if buildcommands and #buildcommands > 0 then - local cmds = os.translateCommands(buildcommands, p.WINDOWS) - cmds = table.concat(cmds, p.eol()) - p.x('%s', cmds) - end - end - - - - function m.dependsOn(r) - p.w('<%sDependsOn', r.name) - p.w(' Condition="\'$(ConfigurationType)\' != \'Makefile\'">_SelectedFiles;$(%sDependsOn)', - r.name, r.name, r.name) - end - - - - function m.executionDescription(r) - -- create shadow context. - local env = p.rule.createEnvironment(r, "%%(%s)") - local ctx = p.context.extent(r, env) - - -- now use the shadow context to detoken. - local buildmessage = ctx.buildmessage - - -- write out the result. - if buildmessage and #buildmessage > 0 then - p.x('%s', buildmessage) - end - end - diff --git a/build/premake/premake5/modules/vstudio/vs2010_rules_targets.lua b/build/premake/premake5/modules/vstudio/vs2010_rules_targets.lua deleted file mode 100644 index 6079bd5cfb..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_rules_targets.lua +++ /dev/null @@ -1,492 +0,0 @@ ---- --- vs2010_rules_targets.lua --- Generate a Visual Studio 201x custom rules targets file. --- Copyright (c) Jason Perkins and the Premake project ---- - - local p = premake - p.vstudio.vs2010.rules.targets = {} - - local m = p.vstudio.vs2010.rules.targets - m.elements = {} - - ---- --- Entry point; generate the root element. ---- - - m.elements.project = function(r) - return { - p.vstudio.projectElement, - m.availableItemGroup, - m.computedProperties, - m.computeInputsGroup, - m.usingTask, - m.ruleTarget, - m.computeOutputTarget, - } - end - - function m.generate(r) - p.xmlUtf8() - p.callArray(m.elements.project, r) - p.pop() - p.out('') - end - - - ---- --- Generate the opening item group element. ---- - - m.elements.availableItemGroup = function(r) - return { - m.propertyPageSchema, - m.availableItemName, - } - end - - function m.availableItemGroup(r) - p.push('') - p.callArray(m.elements.availableItemGroup, r) - p.pop('') - end - - ---- --- Generate the computed outputs property. ---- - function m.computedProperties(r) - -- create shadow context. - local pathVars = p.rule.createPathVars(r, "%%(%s)") - local ctx = p.context.extent(r, { pathVars = pathVars, overridePathVars = true }) - - -- now use the shadow context to detoken. - local buildoutputs = ctx.buildoutputs - - -- write the output. - if buildoutputs and #buildoutputs > 0 then - local outputs = table.concat(buildoutputs, ";") - p.push('') - p.push('<%s>', r.name) - p.x('%s', path.translate(outputs)) - p.pop('', r.name) - p.pop('') - end - end - - - ---- --- Generate the computed input targets group. ---- - - m.elements.computeInputsGroup = function(r) - return { - m.computeCompileInputsTargets, - m.computeLinkInputsTargets, - m.computeLibInputsTargets, - } - end - - function m.computeInputsGroup(r) - p.push('') - p.callArray(m.elements.computeInputsGroup, r) - p.pop('') - end - - - ---- --- Generate the rule's target element. ---- - - m.elements.ruleTargetAttributes = function(r) - return { - m.targetName, - m.beforeTargets, - m.afterTargets, - m.targetCondition, - m.targetOutputs, - m.targetInputs, - m.dependsOnTargets, - } - end - - m.elements.ruleTarget = function(r) - return { - m.selectedFiles, - m.tlog, - m.message, - m.tlogWrite, - m.tlogRead, - m.rule, - } - end - - function m.ruleTarget(r) - local attribs = p.capture(function() - p.push() - p.callArray(m.elements.ruleTargetAttributes, r) - p.pop() - end) - - p.push('') - p.callArray(m.elements.ruleTarget, r) - p.pop('') - end - - - ---- --- Write out the tlog entries. I've extended this with an input --- dependencies fix as described here: --- http://www.virtualdub.org/blog/pivot/entry.php?id=334 ---- - - m.elements.tlog = function(r) - return { - m.tlogSource, - m.tlogInputs, - m.tlogProperties, - } - end - - function m.tlog(r) - p.push('') - p.push('<%s_tlog', r.name) - p.w('Include="%%(%s.Outputs)"', r.name) - p.w('Condition="\'%%(%s.Outputs)\' != \'\' and \'%%(%s.ExcludedFromBuild)\' != \'true\'">', r.name, r.name) - p.callArray(m.elements.tlog, r) - p.pop('', r.name) - p.pop('') - end - - - ---- --- Write out the rule element. ---- - - m.elements.ruleAttributes = function(r) - return { - m.ruleCondition, - m.commandLineTemplate, - m.properties, - m.additionalOptions, - m.inputs, - m.standardOutputImportance, - } - end - - function m.rule(r) - local attribs = p.capture(function() - p.push() - p.callArray(m.elements.ruleAttributes, r) - p.pop() - end) - - p.w('<%s', r.name) - p.outln(attribs .. ' />') - end - - - ---- --- Generate the rule's computed output element. ---- - - m.elements.computeOutputItems = function(r) - return { - m.outputs, - m.linkLib, - } - end - - m.elements.computeOutputTarget = function(r) - return { - m.makeDir, - } - end - - function m.computeOutputTarget(r) - p.push('', r.name) - p.push('') - p.callArray(m.elements.computeOutputItems, r) - p.pop('') - p.callArray(m.elements.computeOutputTarget, r) - p.pop('') - end - - - ---- --- Implementations of individual elements. ---- - - function m.additionalOptions(r) - p.w('AdditionalOptions="%%(%s.AdditionalOptions)"', r.name) - end - - - - function m.commandLineTemplate(r) - p.w('CommandLineTemplate="%%(%s.CommandLineTemplate)"', r.name) - end - - - - function m.afterTargets(r) - p.w('AfterTargets="$(%sAfterTargets)"', r.name) - end - - - - function m.availableItemName(r) - p.push('', r.name) - p.w('_%s', r.name) - p.pop('') - end - - - - function m.beforeTargets(r) - p.w('BeforeTargets="$(%sBeforeTargets)"', r.name) - end - - - - function m.computeLibInputsTargets(r) - p.push('') - p.w('$(ComputeLibInputsTargets);') - p.w('Compute%sOutput;', r.name) - p.pop('') - end - - - - function m.computeLinkInputsTargets(r) - p.push('') - p.w('$(ComputeLinkInputsTargets);') - p.w('Compute%sOutput;', r.name) - p.pop('') - end - - - - function m.computeCompileInputsTargets(r) - p.push('') - p.w('$(ComputeCompileInputsTargets);') - p.w('Compute%sOutput;', r.name) - p.pop('') - end - - - - function m.dependsOnTargets(r) - p.w('DependsOnTargets="$(%sDependsOn);Compute%sOutput"', r.name, r.name) - end - - - - function m.inputs(r) - p.w('Inputs="%%(%s.Identity)"', r.name) - end - - - - function m.linkLib(r) - -- create shadow context. - local pathVars = p.rule.createPathVars(r, "%%(%s)") - local ctx = p.context.extent(r, { pathVars = pathVars, overridePathVars=true }) - - -- now use the shadow context to detoken. - local buildoutputs = ctx.buildoutputs - - local linkable, compileable - for i = 1, #buildoutputs do - if (path.islinkable(buildoutputs[i])) then - linkable = true - end - if (path.iscppfile(buildoutputs[i])) then - compileable = true - end - end - if linkable then - for i, el in pairs { 'Link', 'Lib', 'ImpLib' } do - p.push('<%s', el) - p.w('Include="%%(%sOutputs.Identity)"', r.name) - p.w('Condition="\'%%(Extension)\'==\'.obj\' or \'%%(Extension)\'==\'.res\' or \'%%(Extension)\'==\'.rsc\' or \'%%(Extension)\'==\'.lib\'" />') - p.pop() - end - end - if compileable then - p.push('') - p.pop() - end - end - - - - function m.makeDir(r) - p.w('', r.name) - end - - - - function m.message(r) - p.w('', r.name) - end - - - - function m.outputs(r) - p.w('<%sOutputs', r.name) - p.w(' Condition="\'@(%s)\' != \'\' and \'%%(%s.ExcludedFromBuild)\' != \'true\'"', r.name, r.name) - p.w(' Include="%%(%s.Outputs)" />', r.name) - end - - - - function m.properties(r) - local defs = r.propertydefinition - for i = 1, #defs do - local name = defs[i].name - p.w('%s="%%(%s.%s)"', name, r.name, name) - end - end - - - - function m.propertyPageSchema(r) - p.w('') - end - - - - function m.ruleCondition(r) - p.w('Condition="\'@(%s)\' != \'\' and \'%%(%s.ExcludedFromBuild)\' != \'true\'"', r.name, r.name) - end - - - - function m.selectedFiles(r) - p.push('') - p.w('<%s Remove="@(%s)" Condition="\'%%(Identity)\' != \'@(SelectedFiles)\'" />', r.name, r.name) - p.pop('') - end - - - - function m.standardOutputImportance(r) - p.w('StandardOutputImportance="High"') - p.w('StandardErrorImportance="High"') - end - - - - function m.targetCondition(r) - p.w('Condition="\'@(%s)\' != \'\'"', r.name) - end - - - - function m.targetInputs(r) - local extra = {} - local defs = r.propertydefinition - for i = 1, #defs do - local def = defs[i] - if def.dependency then - table.insert(extra, string.format("%%(%s.%s);", r.name, def.name)) - end - end - extra = table.concat(extra) - p.w('Inputs="%%(%s.Identity);%%(%s.AdditionalDependencies);%s$(MSBuildProjectFile)"', r.name, r.name, extra) - end - - - - function m.targetName(r) - p.w('Name="_%s"', r.name) - end - - - - function m.targetOutputs(r) - p.w('Outputs="%%(%s.Outputs)"', r.name) - end - - - - function m.tlogInputs(r) - p.w("@(%s, ';')", r.name) - end - - - - function m.tlogProperties(r) - local defs = r.propertydefinition - for i = 1, #defs do - local def = defs[i] - if def.dependency then - p.w('<%s>%%(%s.%s)', def.name, r.name, def.name, def.name) - end - end - end - - - - function m.tlogRead(r) - local extra = {} - local defs = r.propertydefinition - for i = 1, #defs do - local def = defs[i] - if def.dependency then - table.insert(extra, string.format("%%(%s_tlog.%s);", r.name, def.name)) - end - end - extra = table.concat(extra) - - p.w('', r.name, extra, r.name) - end - - - - function m.tlogWrite(r) - p.w('', r.name, r.name) - end - - - - function m.tlogSource(r) - p.w("@(%s, '|')", r.name) - end - - - - function m.usingTask(r) - p.push('') - p.w('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml') - p.pop('') - end - - - diff --git a/build/premake/premake5/modules/vstudio/vs2010_rules_xml.lua b/build/premake/premake5/modules/vstudio/vs2010_rules_xml.lua deleted file mode 100644 index 491d7710c7..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_rules_xml.lua +++ /dev/null @@ -1,428 +0,0 @@ ---- --- vs2010_rules_xml.lua --- Generate a Visual Studio 201x custom rules XML file. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vs2010.rules.xml = {} - - local m = p.vstudio.vs2010.rules.xml - m.elements = {} - - ---- --- Entry point; generate the root element. ---- - - m.elements.project = function(r) - return { - m.projectSchemaDefinitions, - m.rule, - m.ruleItem, - m.fileExtension, - m.contentType, - } - end - - function m.generate(r) - p.xmlUtf8() - p.callArray(m.elements.project, r) - p.out('') - end - - - ---- --- Generate the main element. ---- - - m.elements.rule = function(r) - return { - m.dataSource, - m.categories, - m.inputs, - m.properties, - m.commandLineTemplate, - m.beforeTargets, - m.afterTargets, - m.outputs, - m.executionDescription, - m.additionalDependencies, - m.additionalOptions, - } - end - - function m.rule(r) - p.push('') - p.callArray(m.elements.rule, r) - p.pop('') - end - - - ---- --- Generate the list of categories. ---- - - function m.categories(r) - local categories = { - [1] = { name="General" }, - } - local propCategory = {} - local defs = r.propertydefinition - for i = 1, #defs do - local def = defs[i] - local cat = def.category - if cat then - if type(cat) == "string" and cat ~= "Command Line" and cat ~= "General" then - if not propCategory[cat] then - table.insert(categories, { name=cat }) - propCategory[cat] = true - end - else - def.category = nil - end - end - end - table.insert(categories, { name="Command Line", subtype="CommandLine" }) - p.push('') - for i = 1, #categories do - m.category(categories[i]) - end - p.pop('') - end - - - function m.category(cat) - local attribs = p.capture(function() - p.push() - p.w('Name="%s"', cat.name) - if cat.subtype then - p.w('Subtype="%s"', cat.subtype) - end - p.pop() - end) - - p.push('') - - p.push('') - p.w('%s', cat.name) - p.pop('') - - p.pop('') - end - - - ---- --- Generate the list of property definitions. ---- - - function m.properties(r) - local defs = r.propertydefinition - for i = 1, #defs do - local def = defs[i] - if def.kind == "boolean" then - m.boolProperty(def) - elseif def.kind == "list" then - m.stringListProperty(def) - elseif type(def.values) == "table" then - m.enumProperty(def) - elseif def.kind and def.kind:startswith("list:") then - m.stringListProperty(def) - else - m.stringProperty(def) - end - end - end - - - function m.baseProperty(def, suffix) - local c = p.capture(function () - p.w('Name="%s"', def.name) - p.w('HelpContext="0"') - p.w('DisplayName="%s"', def.display or def.name) - if def.description then - p.w('Description="%s"', def.description) - end - if def.category then - p.w('Category="%s"', def.category) - end - end) - if suffix then - c = c .. suffix - end - p.outln(c) - end - - - function m.boolProperty(def) - p.push('') - p.pop() - end - - - function m.enumProperty(def) - p.push('') - - local values = def.values - local switches = def.switch or {} - - local keys = table.keys(def.values) - table.sort(keys) - - for _, key in pairs(keys) do - p.push('') - p.pop() - end - - p.pop('') - end - - - function m.stringProperty(def) - p.push('') - p.pop() - end - - - function m.stringListProperty(def) - p.push('') - p.pop() - end - - - ---- --- Implementations of individual elements. ---- - - function m.additionalDependencies(r) - p.push('') - p.pop() - end - - - - function m.additionalOptions(r) - p.push('') - p.push('') - p.w('Additional Options') - p.pop('') - p.push('') - p.w('Additional Options') - p.pop('') - p.pop('') - end - - - - function m.afterTargets(r) - p.push('') - - p.push('') - p.w('Execute After') - p.pop('') - - p.push('') - p.w('Specifies the targets for the build customization to run after.') - p.pop('') - - p.push('') - p.push('', r.name) - p.pop() - p.pop('') - - p.push('') - p.push('') - p.pop() - p.pop('') - - p.pop('') - end - - - - function m.beforeTargets(r) - p.push('') - - p.push('') - p.w('Execute Before') - p.pop('') - - p.push('') - p.w('Specifies the targets for the build customization to run before.') - p.pop('') - - p.push('') - p.push('', r.name) - p.pop() - p.pop('') - - p.push('') - p.push('') - p.pop() - p.pop('') - - p.pop('') - end - - - - function m.commandLineTemplate(r) - p.push('') - p.pop() - end - - - - function m.contentType(r) - p.push('', r.name) - p.pop() - end - - - - function m.dataSource(r) - p.push('') - p.push('', r.name) - p.pop() - p.pop('') - end - - - - function m.executionDescription(r) - p.push('') - p.pop() - end - - - - function m.fileExtension(r) - for _, v in ipairs(r.fileextension) do - p.push('', r.name) - p.pop() - end - end - - - - function m.inputs(r) - p.push('') - - p.push('') - p.push('') - p.pop() - - p.pop('') - p.pop('') - end - - - - function m.outputs(r) - p.push('') - p.pop() - end - - - - function m.ruleItem(r) - p.push('', r.display or r.name) - p.pop() - end - - - - function m.projectSchemaDefinitions(r) - p.push('') - end - diff --git a/build/premake/premake5/modules/vstudio/vs2010_vcxproj.lua b/build/premake/premake5/modules/vstudio/vs2010_vcxproj.lua deleted file mode 100644 index acdfe4c0ca..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_vcxproj.lua +++ /dev/null @@ -1,2890 +0,0 @@ --- --- vs2010_vcxproj.lua --- Generate a Visual Studio 201x C/C++ project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vc2010 = {} - - local vstudio = p.vstudio - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - local tree = p.tree - - local m = p.vstudio.vc2010 - - ---- --- Add namespace for element definition lists for p.callArray() ---- - - m.elements = {} - m.conditionalElements = {} - --- --- Generate a Visual Studio 201x C++ project, with support for the new platforms API. --- - - m.elements.project = function(prj) - return { - m.xmlDeclaration, - m.project, - m.projectConfigurations, - m.globals, - m.importDefaultProps, - m.configurationPropertiesGroup, - m.importLanguageSettings, - m.importExtensionSettings, - m.propertySheetGroup, - m.userMacros, - m.outputPropertiesGroup, - m.itemDefinitionGroups, - m.assemblyReferences, - m.files, - m.projectReferences, - m.importLanguageTargets, - m.importExtensionTargets, - m.ensureNuGetPackageBuildImports, - } - end - - function m.generate(prj) - p.utf8() - p.callArray(m.elements.project, prj) - p.out('') - end - - --- --- Output the XML declaration and opening tag. --- - - function m.project(prj) - local action = p.action.current() - if _ACTION >= "vs2019" then - p.push('') - else - p.push('', - action.vstudio.toolsVersion) - end - end - - --- --- Write out the list of project configurations, which pairs build --- configurations with architectures. --- - - function m.projectConfigurations(prj) - - -- build a list of all architectures used in this project - local platforms = {} - for cfg in project.eachconfig(prj) do - local arch = vstudio.archFromConfig(cfg, true) - if not table.contains(platforms, arch) then - table.insert(platforms, arch) - end - end - - local configs = {} - p.push('') - for cfg in project.eachconfig(prj) do - for _, arch in ipairs(platforms) do - local prjcfg = vstudio.projectConfig(cfg, arch) - if not configs[prjcfg] then - configs[prjcfg] = prjcfg - p.push('', vstudio.projectConfig(cfg, arch)) - p.x('%s', vstudio.projectPlatform(cfg)) - p.w('%s', arch) - p.pop('') - end - end - end - p.pop('') - end - - --- --- Write out the TargetFrameworkVersion property. --- - - function m.targetFramework(prj) - local action = p.action.current() - local tools = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion) - - local framework = prj.dotnetframework or action.vstudio.targetFramework or "4.0" - p.w('v%s', framework) - end - - - --- --- Write out the Globals property group. --- - - m.elements.globals = function(prj) - return { - m.projectGuid, - m.ignoreWarnDuplicateFilename, - m.keyword, - m.projectName, - m.preferredToolArchitecture, - m.latestTargetPlatformVersion, - m.windowsTargetPlatformVersion, - } - end - - m.elements.globalsCondition = function(prj, cfg) - return { - m.windowsTargetPlatformVersion, - } - end - - function m.globals(prj) - - -- Write out the project-level globals - m.propertyGroup(nil, "Globals") - p.callArray(m.elements.globals, prj) - p.pop('') - - -- Write out the configurable globals - for cfg in project.eachconfig(prj) do - - -- Find out whether we're going to actually write a property out - local captured = p.capture( function() - p.push() - p.callArray(m.elements.globalsCondition, prj, cfg) - p.pop() - end) - - -- If we do have something, create the entry, skip otherwise - if captured ~= '' then - m.propertyGroup(cfg, "Globals") - p.callArray(m.elements.globalsCondition, prj, cfg) - p.pop('') - end - - end - - end - - --- --- Write out the configuration property group: what kind of binary it --- produces, and some global settings. --- - - m.elements.configurationProperties = function(cfg) - if cfg.kind == p.UTILITY then - return { - m.configurationType, - m.platformToolset, - } - else - return { - m.configurationType, - m.useDebugLibraries, - m.useOfMfc, - m.useOfAtl, - m.clrSupport, - m.characterSet, - m.platformToolset, - m.wholeProgramOptimization, - m.nmakeOutDirs, - m.windowsSDKDesktopARMSupport, - } - end - end - - function m.configurationProperties(cfg) - m.propertyGroup(cfg, "Configuration") - p.callArray(m.elements.configurationProperties, cfg) - p.pop('') - end - - function m.configurationPropertiesGroup(prj) - for cfg in project.eachconfig(prj) do - m.configurationProperties(cfg) - end - end - - - --- --- Write the output property group, which includes the output and intermediate --- directories, manifest, etc. --- - - m.elements.outputProperties = function(cfg) - if cfg.kind == p.UTILITY then - return { - m.outDir, - m.intDir, - m.extensionsToDeleteOnClean, - m.executablePath, - } - else - return { - m.linkIncremental, - m.ignoreImportLibrary, - m.outDir, - m.intDir, - m.targetName, - m.targetExt, - m.includePath, - m.libraryPath, - m.generateManifest, - m.extensionsToDeleteOnClean, - m.executablePath, - } - end - end - - function m.outputProperties(cfg) - if not vstudio.isMakefile(cfg) then - m.propertyGroup(cfg) - p.callArray(m.elements.outputProperties, cfg) - p.pop('') - end - end - - --- --- Write the NMake property group for Makefile projects, which includes the custom --- build commands, output file location, etc. --- - - m.elements.nmakeProperties = function(cfg) - return { - m.executablePath, - m.includePath, - m.libraryPath, - m.nmakeOutput, - m.nmakeBuildCommands, - m.nmakeRebuildCommands, - m.nmakeCleanCommands, - m.nmakePreprocessorDefinitions, - m.nmakeIncludeDirs - } - end - - function m.nmakeProperties(cfg) - if vstudio.isMakefile(cfg) then - m.propertyGroup(cfg) - p.callArray(m.elements.nmakeProperties, cfg) - p.pop('') - end - end - - --- --- Output properties and NMake properties should appear side-by-side --- for each configuration. --- - - function m.outputPropertiesGroup(prj) - for cfg in project.eachconfig(prj) do - m.outputProperties(cfg) - m.nmakeProperties(cfg) - end - end - - - --- --- Write a configuration's item definition group, which contains all --- of the per-configuration compile and link settings. --- - - m.elements.itemDefinitionGroup = function(cfg) - if cfg.kind == p.UTILITY then - return { - m.ruleVars, - m.buildEvents, - m.buildLog, - } - else - return { - m.clCompile, - m.buildStep, - m.fxCompile, - m.resourceCompile, - m.linker, - m.manifest, - m.buildEvents, - m.ruleVars, - m.buildLog, - } - end - end - - function m.itemDefinitionGroup(cfg) - if not vstudio.isMakefile(cfg) then - p.push('', m.condition(cfg)) - p.callArray(m.elements.itemDefinitionGroup, cfg) - p.pop('') - - else - if cfg == project.getfirstconfig(cfg.project) then - p.w('') - p.w('') - end - end - end - - function m.itemDefinitionGroups(prj) - for cfg in project.eachconfig(prj) do - m.itemDefinitionGroup(cfg) - end - end - - - --- --- Write the the compiler settings block. --- - - m.elements.clCompile = function(cfg) - local calls = { - m.precompiledHeader, - m.warningLevel, - m.treatWarningAsError, - m.disableSpecificWarnings, - m.treatSpecificWarningsAsErrors, - m.basicRuntimeChecks, - m.clCompilePreprocessorDefinitions, - m.clCompileUndefinePreprocessorDefinitions, - m.clCompileAdditionalIncludeDirectories, - m.clCompileAdditionalUsingDirectories, - m.forceIncludes, - m.debugInformationFormat, - m.optimization, - m.functionLevelLinking, - m.intrinsicFunctions, - m.minimalRebuild, - m.omitFramePointers, - m.stringPooling, - m.runtimeLibrary, - m.omitDefaultLib, - m.exceptionHandling, - m.runtimeTypeInfo, - m.bufferSecurityCheck, - m.treatWChar_tAsBuiltInType, - m.floatingPointModel, - m.floatingPointExceptions, - m.inlineFunctionExpansion, - m.enableEnhancedInstructionSet, - m.multiProcessorCompilation, - m.additionalCompileOptions, - m.compileAs, - m.callingConvention, - m.languageStandard, - m.structMemberAlignment, - } - - if cfg.kind == p.STATICLIB then - table.insert(calls, m.programDatabaseFileName) - end - - return calls - end - - function m.clCompile(cfg) - p.push('') - p.callArray(m.elements.clCompile, cfg) - p.pop('') - end - --- --- Write the the compiler settings block. --- - - m.elements.buildStep = function(cfg) - local calls = { - m.buildCommands, - m.buildMessage, - m.buildOutputs, - m.buildInputs - } - - return calls - end - - function m.buildStep(cfg) - if #cfg.buildCommands > 0 or #cfg.buildOutputs > 0 or #cfg.buildInputs > 0 or cfg.buildMessage then - - p.push('') - p.callArray(m.elements.buildStep, cfg) - p.pop('') - - end - end - - --- --- Write the settings block. --- - - m.elements.fxCompile = function(cfg) - return { - m.fxCompilePreprocessorDefinition, - m.fxCompileAdditionalIncludeDirs, - m.fxCompileShaderType, - m.fxCompileShaderModel, - m.fxCompileShaderEntry, - m.fxCompileShaderVariableName, - m.fxCompileShaderHeaderOutput, - m.fxCompileShaderObjectOutput, - m.fxCompileShaderAssembler, - m.fxCompileShaderAssemblerOutput, - m.fxCompileShaderAdditionalOptions, - } - end - - function m.fxCompile(cfg) - if p.config.hasFile(cfg, path.ishlslfile) then - local contents = p.capture(function () - p.push() - p.callArray(m.elements.fxCompile, cfg) - p.pop() - end) - - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - end - - --- --- Write out the resource compiler block. --- - - m.elements.resourceCompile = function(cfg) - return { - m.resourcePreprocessorDefinitions, - m.resourceAdditionalIncludeDirectories, - m.culture, - } - end - - function m.resourceCompile(cfg) - if p.config.hasFile(cfg, path.isresourcefile) then - local contents = p.capture(function () - p.push() - p.callArray(m.elements.resourceCompile, cfg) - p.pop() - end) - - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - end - - --- --- Write out the linker tool block. --- - - m.elements.linker = function(cfg, explicit) - return { - m.link, - m.lib, - m.linkLibraryDependencies, - } - end - - function m.linker(cfg) - local explicit = vstudio.needsExplicitLink(cfg) - p.callArray(m.elements.linker, cfg, explicit) - end - - - - m.elements.link = function(cfg, explicit) - if cfg.kind == p.STATICLIB then - return { - m.subSystem, - m.fullProgramDatabaseFile, - m.generateDebugInformation, - m.optimizeReferences, - } - else - return { - m.subSystem, - m.fullProgramDatabaseFile, - m.generateDebugInformation, - m.optimizeReferences, - m.additionalDependencies, - m.additionalLibraryDirectories, - m.importLibrary, - m.entryPointSymbol, - m.generateMapFile, - m.moduleDefinitionFile, - m.treatLinkerWarningAsErrors, - m.ignoreDefaultLibraries, - m.largeAddressAware, - m.targetMachine, - m.additionalLinkOptions, - m.programDatabaseFile, - m.assemblyDebug, - } - end - end - - function m.link(cfg, explicit) - local contents = p.capture(function () - p.push() - p.callArray(m.elements.link, cfg, explicit) - p.pop() - end) - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - - - - m.elements.lib = function(cfg, explicit) - if cfg.kind == p.STATICLIB then - return { - m.additionalDependencies, - m.additionalLibraryDirectories, - m.treatLinkerWarningAsErrors, - m.targetMachine, - m.additionalLinkOptions, - } - else - return {} - end - end - - function m.lib(cfg, explicit) - local contents = p.capture(function () - p.push() - p.callArray(m.elements.lib, cfg, explicit) - p.pop() - end) - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - - - --- --- Write the manifest section. --- - - m.elements.manifest = function(cfg) - return { - m.enableDpiAwareness, - m.additionalManifestFiles, - } - end - - function m.manifest(cfg) - if cfg.kind ~= p.STATICLIB then - local contents = p.capture(function () - p.push() - p.callArray(m.elements.manifest, cfg) - p.pop() - end) - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - end - - - ---- --- Write out the pre- and post-build event settings. ---- - - function m.buildEvents(cfg) - local write = function (event) - local name = event .. "Event" - local field = event:lower() - local steps = cfg[field .. "commands"] - local msg = cfg[field .. "message"] - - if #steps > 0 then - steps = os.translateCommandsAndPaths(steps, cfg.project.basedir, cfg.project.location) - p.push('<%s>', name) - p.x('%s', table.implode(steps, "", "", "\r\n")) - if msg then - p.x('%s', msg) - end - p.pop('', name) - end - end - - write("PreBuild") - write("PreLink") - write("PostBuild") - end - - - ---- --- Transform property to string ---- - - function m.getRulePropertyString(rule, prop, value, kind) - -- list of paths - if kind == "list:path" then - return table.concat(vstudio.path(cfg, value), ';') - end - - -- path - if kind == "path" then - return vstudio.path(cfg, value) - end - - -- list - if type(value) == "table" then - return table.concat(value, ";") - end - - -- enum - if prop.values then - value = table.findKeyByValue(prop.values, value) - end - - -- primitive - return tostring(value) - end - - - ---- --- Write out project-level custom rule variables. ---- - - function m.ruleVars(cfg) - for i = 1, #cfg.rules do - local rule = p.global.getRule(cfg.rules[i]) - - local contents = p.capture(function () - p.push() - for prop in p.rule.eachProperty(rule) do - local fld = p.rule.getPropertyField(rule, prop) - local value = cfg[fld.name] - if value ~= nil then - value = m.getRulePropertyString(rule, prop, value, fld.kind) - - if value ~= nil and #value > 0 then - m.element(prop.name, nil, '%s', value) - end - end - end - p.pop() - end) - - if #contents > 0 then - p.push('<%s>', rule.name) - p.outln(contents) - p.pop('', rule.name) - end - end - end - - --- --- Reference any managed assemblies listed in the links() --- - - function m.assemblyReferences(prj) - -- Visual Studio doesn't support per-config references; use - -- whatever is contained in the first configuration - local cfg = project.getfirstconfig(prj) - - local refs = config.getlinks(cfg, "system", "fullpath", "managed") - if #refs > 0 then - p.push('') - for i = 1, #refs do - local value = refs[i] - - -- If the link contains a '/' then it is a relative path to - -- a local assembly. Otherwise treat it as a system assembly. - if value:find('/', 1, true) then - p.push('', path.getbasename(value)) - p.x('%s', path.translate(value)) - p.pop('') - else - p.x('', path.getbasename(value)) - end - end - p.pop('') - end - end - - - function m.generatedFile(cfg, file) - if file.generated then - local path = path.translate(file.dependsOn.relpath) - m.element("AutoGen", nil, 'true') - m.element("DependentUpon", nil, path) - end - end - - ---- --- Write out the list of source code files, and any associated configuration. ---- - - function m.files(prj) - local groups = m.categorizeSources(prj) - for _, group in ipairs(groups) do - group.category.emitFiles(prj, group) - end - end - - - m.categories = {} - ---- --- ClInclude group ---- - m.categories.ClInclude = { - name = "ClInclude", - extensions = { ".h", ".hh", ".hpp", ".hxx", ".inl" }, - priority = 1, - - emitFiles = function(prj, group) - m.emitFiles(prj, group, "ClInclude", {m.generatedFile}) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "ClInclude") - end - } - - ---- --- ClCompile group ---- - m.categories.ClCompile = { - name = "ClCompile", - extensions = { ".cc", ".cpp", ".cxx", ".c++", ".c", ".s", ".m", ".mm" }, - priority = 2, - - emitFiles = function(prj, group) - local fileCfgFunc = function(fcfg, condition) - if fcfg then - return { - m.excludedFromBuild, - m.objectFileName, - m.clCompilePreprocessorDefinitions, - m.clCompileUndefinePreprocessorDefinitions, - m.optimization, - m.forceIncludes, - m.precompiledHeader, - m.enableEnhancedInstructionSet, - m.additionalCompileOptions, - m.disableSpecificWarnings, - m.treatSpecificWarningsAsErrors, - m.basicRuntimeChecks, - m.exceptionHandling, - m.compileAsManaged, - m.compileAs, - m.runtimeTypeInfo, - m.warningLevelFile, - } - else - return { - m.excludedFromBuild - } - end - end - - m.emitFiles(prj, group, "ClCompile", {m.generatedFile}, fileCfgFunc) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "ClCompile") - end - } - - ---- --- FxCompile group ---- - m.categories.FxCompile = { - name = "FxCompile", - extensions = { ".hlsl" }, - priority = 4, - - emitFiles = function(prj, group) - local fileCfgFunc = function(fcfg, condition) - if fcfg then - return { - m.excludedFromBuild, - m.fxCompilePreprocessorDefinition, - m.fxCompileAdditionalIncludeDirs, - m.fxCompileShaderType, - m.fxCompileShaderModel, - m.fxCompileShaderEntry, - m.fxCompileShaderVariableName, - m.fxCompileShaderHeaderOutput, - m.fxCompileShaderObjectOutput, - m.fxCompileShaderAssembler, - m.fxCompileShaderAssemblerOutput, - m.fxCompileShaderAdditionalOptions, - } - else - return { - m.excludedFromBuild - } - end - end - - m.emitFiles(prj, group, "FxCompile", nil, fileCfgFunc) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "FxCompile") - end - } - - ---- --- None group ---- - m.categories.None = { - name = "None", - priority = 5, - - emitFiles = function(prj, group) - m.emitFiles(prj, group, "None", {m.generatedFile}) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "None") - end - } - - ---- --- ResourceCompile group ---- - m.categories.ResourceCompile = { - name = "ResourceCompile", - extensions = ".rc", - priority = 6, - - emitFiles = function(prj, group) - local fileCfgFunc = { - m.excludedFromBuild - } - - m.emitFiles(prj, group, "ResourceCompile", nil, fileCfgFunc) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "ResourceCompile") - end - } - - ---- --- CustomBuild group ---- - m.categories.CustomBuild = { - name = "CustomBuild", - priority = 7, - - emitFiles = function(prj, group) - local fileFunc = { - m.fileType - } - - local fileCfgFunc = { - m.excludedFromBuild, - m.buildCommands, - m.buildOutputs, - m.linkObjects, - m.buildMessage, - m.buildAdditionalInputs - } - - m.emitFiles(prj, group, "CustomBuild", fileFunc, fileCfgFunc, function (cfg, fcfg) - return fileconfig.hasCustomBuildRule(fcfg) - end) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "CustomBuild") - end - } - - ---- --- Midl group ---- - m.categories.Midl = { - name = "Midl", - extensions = ".idl", - priority = 8, - - emitFiles = function(prj, group) - local fileCfgFunc = { - m.excludedFromBuild - } - - m.emitFiles(prj, group, "Midl", nil, fileCfgFunc, function(cfg) - return cfg.system == p.WINDOWS - end) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "Midl") - end - } - - ---- --- Masm group ---- - m.categories.Masm = { - name = "Masm", - extensions = ".asm", - priority = 9, - - emitFiles = function(prj, group) - local fileCfgFunc = function(fcfg, condition) - if fcfg then - return { - m.MasmPreprocessorDefinitions, - m.excludedFromBuild, - m.exceptionHandlingSEH, - } - else - return { - m.excludedFromBuild - } - end - end - m.emitFiles(prj, group, "Masm", nil, fileCfgFunc) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "Masm") - end, - - emitExtensionSettings = function(prj, group) - p.w('') - end, - - emitExtensionTargets = function(prj, group) - p.w('') - end - } - - ---- --- Image group ---- - m.categories.Image = { - name = "Image", - extensions = { ".gif", ".jpg", ".jpe", ".png", ".bmp", ".dib", "*.tif", "*.wmf", "*.ras", "*.eps", "*.pcx", "*.pcd", "*.tga", "*.dds" }, - priority = 10, - - emitFiles = function(prj, group) - local fileCfgFunc = function(fcfg, condition) - return { - m.excludedFromBuild - } - end - m.emitFiles(prj, group, "Image", nil, fileCfgFunc) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "Image") - end - } - - ---- --- Natvis group ---- - m.categories.Natvis = { - name = "Natvis", - extensions = { ".natvis" }, - priority = 11, - - emitFiles = function(prj, group) - m.emitFiles(prj, group, "Natvis", {m.generatedFile}) - end, - - emitFilter = function(prj, group) - m.filterGroup(prj, group, "Natvis") - end - } - - ---- --- Categorize files into groups. ---- - function m.categorizeSources(prj) - -- if we already did this, return the cached result. - if prj._vc2010_sources then - return prj._vc2010_sources - end - - -- build the new group table. - local result = {} - local groups = {} - prj._vc2010_sources = result - - local tr = project.getsourcetree(prj) - tree.traverse(tr, { - onleaf = function(node) - local cat = m.categorizeFile(prj, node) - groups[cat.name] = groups[cat.name] or { - category = cat, - files = {} - } - table.insert(groups[cat.name].files, node) - end - }) - - -- sort by relative-to path; otherwise VS will reorder the files - for name, group in pairs(groups) do - table.sort(group.files, function (a, b) - return a.relpath < b.relpath - end) - table.insert(result, group) - end - - -- sort by category priority then name; so we get stable results. - table.sort(result, function (a, b) - if (a.category.priority == b.category.priority) then - return a.category.name < b.category.name - end - return a.category.priority < b.category.priority - end) - - return result - end - - - function m.categorizeFile(prj, file) - for cfg in project.eachconfig(prj) do - local fcfg = fileconfig.getconfig(file, cfg) - if fcfg then - -- If any configuration for this file uses a custom build step, that's the category to use - if fileconfig.hasCustomBuildRule(fcfg) then - return m.categories.CustomBuild - end - - -- also check for buildaction - if fcfg.buildaction then - return m.categories[fcfg.buildaction] or m.categories.None - end - end - end - - -- If there is a custom rule associated with it, use that - local rule = p.global.getRuleForFile(file.name, prj.rules) - if rule then - return { - name = rule.name, - priority = 100, - rule = rule, - emitFiles = function(prj, group) - m.emitRuleFiles(prj, group) - end, - emitFilter = function(prj, group) - m.filterGroup(prj, group, group.category.name) - end - } - end - - -- Otherwise use the file extension to deduce a category - for _, cat in pairs(m.categories) do - if cat.extensions and path.hasextension(file.name, cat.extensions) then - return cat - end - end - - return m.categories.None - end - - - function m.configPair(cfg) - return vstudio.projectPlatform(cfg) .. "|" .. vstudio.archFromConfig(cfg, true) - end - - - function m.getTotalCfgCount(prj) - if prj._totalCfgCount then - return prj._totalCfgCount - else - local result = 0 - for _ in p.project.eachconfig(prj) do - result = result + 1 - end - -- cache result - prj._totalCfgCount = result - return result - end - end - - - function m.indexConditionalElements() - local nameMap, nameList, settingList - nameMap = {} - nameList = {} -- to preserve ordering - settingList = {} -- to preserve ordering - for _, element in ipairs(m.conditionalElements) do - local settingMap = nameMap[element.name] - if not settingMap then - settingMap = {} - nameMap[element.name] = settingMap - if not table.contains(nameList, element.name) then - table.insert(nameList, element.name) - end - end - --setting will either be value or args - local elementSet = settingMap[element.setting] - if elementSet then - table.insert(elementSet, element) - else - elementSet = {element} - settingMap[element.setting] = elementSet - if not table.contains(settingList, element.setting) then - table.insert(settingList, element.setting) - end - end - end - return nameMap, nameList, settingList - end - - - function m.emitConditionalElements(prj) - local keyCount = function(tbl) - local count = 0 - for _ in pairs(tbl) do count = count + 1 end - return count - end - - local nameMap, nameList, settingList - nameMap, nameList, settingList = m.indexConditionalElements() - - local totalCfgCount = m.getTotalCfgCount(prj) - for _, name in ipairs(nameList) do - local settingMap = nameMap[name] - local done = false - if keyCount(settingMap)==1 then - for _, setting in ipairs(settingList) do - local elements = settingMap[setting] - if elements~=nil and #elements==totalCfgCount then - local element = elements[1] - local format = string.format('<%s>%s', name, element.value, name) - p.w(format, table.unpack(element.args)) - done = true - end - end - end - if not done then - for _, setting in ipairs(settingList) do - local elements = settingMap[setting] - if elements then - for _, element in ipairs(elements) do - local format = string.format('<%s %s>%s', name, m.conditionFromConfigText(element.condition), element.value, name) - p.w(format, table.unpack(element.args)) - end - end - end - end - end - end - - function m.emitFiles(prj, group, tag, fileFunc, fileCfgFunc, checkFunc) - local files = group.files - if files and #files > 0 then - p.push('') - for _, file in ipairs(files) do - - local contents = p.capture(function () - p.push() - p.callArray(fileFunc, cfg, file) - m.conditionalElements = {} - for cfg in project.eachconfig(prj) do - local fcfg = fileconfig.getconfig(file, cfg) - if not checkFunc or checkFunc(cfg, fcfg) then - p.callArray(fileCfgFunc, fcfg, m.configPair(cfg)) - end - end - if #m.conditionalElements > 0 then - m.emitConditionalElements(prj) - end - p.pop() - end) - - local rel = path.translate(file.relpath) - - -- SharedItems projects paths are prefixed with a magical variable - if prj.kind == p.SHAREDITEMS then - rel = "$(MSBuildThisFileDirectory)" .. rel - end - - if #contents > 0 then - p.push('<%s Include="%s">', tag, rel) - p.outln(contents) - p.pop('', tag) - else - p.x('<%s Include="%s" />', tag, rel) - end - - end - p.pop('') - end - end - - function m.emitRuleFiles(prj, group) - local files = group.files - local rule = group.category.rule - - if files and #files > 0 then - p.push('') - - for _, file in ipairs(files) do - local contents = p.capture(function() - p.push() - for prop in p.rule.eachProperty(rule) do - local fld = p.rule.getPropertyField(rule, prop) - m.conditionalElements = {} - for cfg in project.eachconfig(prj) do - local fcfg = fileconfig.getconfig(file, cfg) - if fcfg and fcfg[fld.name] then - local value = m.getRulePropertyString(rule, prop, fcfg[fld.name]) - if value and #value > 0 then - m.element(prop.name, m.configPair(cfg), '%s', value) - end - end - end - if #m.conditionalElements > 0 then - m.emitConditionalElements(prj) - end - end - p.pop() - end) - - if #contents > 0 then - p.push('<%s Include=\"%s\">', rule.name, path.translate(file.relpath)) - p.outln(contents) - p.pop('', rule.name) - else - p.x('<%s Include=\"%s\" />', rule.name, path.translate(file.relpath)) - end - end - - p.pop('') - end - end - - - function m.isClrMixed(prj) - -- check to see if any files are marked with clr - local isMixed = false - if not prj.clr or prj.clr == p.OFF then - if prj._isClrMixed ~= nil then - isMixed = prj._isClrMixed - else - table.foreachi(prj._.files, function(file) - for cfg in p.project.eachconfig(prj) do - local fcfg = p.fileconfig.getconfig(file, cfg) - if fcfg and fcfg.clr and fcfg.clr ~= p.OFF then - isMixed = true - end - end - end) - prj._isClrMixed = isMixed -- cache the results - end - end - return isMixed - end - - --- --- Generate the list of project dependencies. --- - - m.elements.projectReferences = function(prj, ref) - if prj.clr ~= p.OFF or (m.isClrMixed(prj) and ref and ref.kind ~=p.STATICLIB) then - return { - m.referenceProject, - m.referencePrivate, - m.referenceOutputAssembly, - m.referenceCopyLocalSatelliteAssemblies, - m.referenceLinkLibraryDependencies, - m.referenceUseLibraryDependences, - } - else - return { - m.referenceProject, - } - end - end - - function m.projectReferences(prj) - local refs = project.getdependencies(prj, 'linkOnly') - -- Handle linked shared items projects - local contents = p.capture(function() - p.push() - for _, ref in ipairs(refs) do - if ref.kind == p.SHAREDITEMS then - local relpath = vstudio.path(prj, vstudio.projectfile(ref)) - p.x('', relpath) - end - end - p.pop() - end) - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - - -- Handle all other linked projects - local contents = p.capture(function() - p.push() - for _, ref in ipairs(refs) do - if ref.kind ~= p.SHAREDITEMS then - local relpath = vstudio.path(prj, vstudio.projectfile(ref)) - p.push('', relpath) - p.callArray(m.elements.projectReferences, prj, ref) - p.pop('') - end - end - p.pop() - end) - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - - - ---------------------------------------------------------------------------- --- --- Handlers for individual project elements --- ---------------------------------------------------------------------------- - - function m.additionalDependencies(cfg, explicit) - local links - - -- check to see if this project uses an external toolset. If so, let the - -- toolset define the format of the links - local toolset = config.toolset(cfg) - if toolset then - links = toolset.getlinks(cfg, not explicit) - else - links = vstudio.getLinks(cfg, explicit) - end - - if #links > 0 then - links = path.translate(table.concat(links, ";")) - m.element("AdditionalDependencies", nil, "%s;%%(AdditionalDependencies)", links) - end - end - - - function m.additionalIncludeDirectories(cfg, includedirs) - if #includedirs > 0 then - local dirs = vstudio.path(cfg, includedirs) - if #dirs > 0 then - m.element("AdditionalIncludeDirectories", nil, "%s;%%(AdditionalIncludeDirectories)", table.concat(dirs, ";")) - end - end - end - - - function m.additionalLibraryDirectories(cfg) - if #cfg.libdirs > 0 then - local dirs = table.concat(vstudio.path(cfg, cfg.libdirs), ";") - m.element("AdditionalLibraryDirectories", nil, "%s;%%(AdditionalLibraryDirectories)", dirs) - end - end - - - function m.additionalManifestFiles(cfg) - -- get the manifests files - local manifests = {} - for _, fname in ipairs(cfg.files) do - if path.getextension(fname) == ".manifest" then - table.insert(manifests, project.getrelative(cfg.project, fname)) - end - end - - if #manifests > 0 then - m.element("AdditionalManifestFiles", nil, "%s;%%(AdditionalManifestFiles)", table.concat(manifests, ";")) - end - end - - - function m.additionalUsingDirectories(cfg) - if #cfg.usingdirs > 0 then - local dirs = vstudio.path(cfg, cfg.usingdirs) - if #dirs > 0 then - m.element("AdditionalUsingDirectories", nil, "%s;%%(AdditionalUsingDirectories)", table.concat(dirs, ";")) - end - end - end - - - function m.largeAddressAware(cfg) - if (cfg.largeaddressaware == true) then - m.element("LargeAddressAware", nil, 'true') - end - end - - - function m.languageStandard(cfg) - if _ACTION >= "vs2017" then - if (cfg.cppdialect == "C++14") then - m.element("LanguageStandard", nil, 'stdcpp14') - elseif (cfg.cppdialect == "C++17") then - m.element("LanguageStandard", nil, 'stdcpp17') - elseif (cfg.cppdialect == "C++latest") then - m.element("LanguageStandard", nil, 'stdcpplatest') - end - end - end - - function m.structMemberAlignment(cfg) - local map = { - [1] = "1Byte", - [2] = "2Bytes", - [4] = "4Bytes", - [8] = "8Bytes", - [16] = "16Bytes" - } - - local value = map[cfg.structmemberalign] - if value then - m.element("StructMemberAlignment", nil, value) - end - end - - function m.additionalCompileOptions(cfg, condition) - local opts = cfg.buildoptions - if _ACTION == "vs2015" then - if (cfg.cppdialect == "C++14") then - table.insert(opts, "/std:c++14") - elseif (cfg.cppdialect == "C++17") then - table.insert(opts, "/std:c++latest") - elseif (cfg.cppdialect == "C++latest") then - table.insert(opts, "/std:c++latest") - end - end - - if cfg.toolset and cfg.toolset:startswith("msc") then - local value = iif(cfg.unsignedchar, "On", "Off") - table.insert(opts, p.tools.msc.shared.unsignedchar[value]) - end - - if #opts > 0 then - opts = table.concat(opts, " ") - m.element("AdditionalOptions", condition, '%s %%(AdditionalOptions)', opts) - end - end - - - function m.additionalLinkOptions(cfg) - if #cfg.linkoptions > 0 then - local opts = table.concat(cfg.linkoptions, " ") - m.element("AdditionalOptions", nil, "%s %%(AdditionalOptions)", opts) - end - end - - - function m.compileAsManaged(fcfg, condition) - if fcfg.clr and fcfg ~= p.OFF then - m.element("CompileAsManaged", condition, "true") - end - end - - - function m.basicRuntimeChecks(cfg, condition) - local prjcfg, filecfg = p.config.normalize(cfg) - local runtime = config.getruntime(prjcfg) or iif(config.isDebugBuild(cfg), "Debug", "Release") - if filecfg then - if filecfg.flags.NoRuntimeChecks or (config.isOptimizedBuild(filecfg) and runtime:endswith("Debug")) then - m.element("BasicRuntimeChecks", condition, "Default") - end - else - if prjcfg.flags.NoRuntimeChecks or (config.isOptimizedBuild(prjcfg) and runtime:endswith("Debug")) then - m.element("BasicRuntimeChecks", nil, "Default") - end - end - end - - function m.buildInputs(cfg, condition) - if cfg.buildinputs and #cfg.buildinputs > 0 then - local inputs = project.getrelative(cfg.project, cfg.buildinputs) - m.element("Inputs", condition, '%s', table.concat(inputs, ";")) - end - end - - function m.buildAdditionalInputs(fcfg, condition) - if fcfg.buildinputs and #fcfg.buildinputs > 0 then - local inputs = project.getrelative(fcfg.project, fcfg.buildinputs) - m.element("AdditionalInputs", condition, '%s', table.concat(inputs, ";")) - end - end - - - function m.buildCommands(fcfg, condition) - if #fcfg.buildcommands > 0 then - local commands = os.translateCommandsAndPaths(fcfg.buildcommands, fcfg.project.basedir, fcfg.project.location) - m.element("Command", condition, '%s', table.concat(commands,'\r\n')) - end - end - - - function m.buildLog(cfg) - if cfg.buildlog and #cfg.buildlog > 0 then - p.push('') - m.element("Path", nil, "%s", vstudio.path(cfg, cfg.buildlog)) - p.pop('') - end - end - - - function m.buildMessage(fcfg, condition) - if fcfg.buildmessage then - m.element("Message", condition, '%s', fcfg.buildmessage) - end - end - - - function m.buildOutputs(fcfg, condition) - if #fcfg.buildoutputs > 0 then - local outputs = project.getrelative(fcfg.project, fcfg.buildoutputs) - m.element("Outputs", condition, '%s', table.concat(outputs, ";")) - end - end - - - function m.linkObjects(fcfg, condition) - if fcfg.linkbuildoutputs ~= nil then - m.element("LinkObjects", condition, tostring(fcfg.linkbuildoutputs)) - end - end - - - function m.characterSet(cfg) - if not vstudio.isMakefile(cfg) then - local charactersets = { - ASCII = "NotSet", - MBCS = "MultiByte", - Unicode = "Unicode", - Default = "Unicode" - } - m.element("CharacterSet", nil, charactersets[cfg.characterset]) - end - end - - - function m.wholeProgramOptimization(cfg) - if cfg.flags.LinkTimeOptimization then - m.element("WholeProgramOptimization", nil, "true") - end - end - - function m.clCompileAdditionalIncludeDirectories(cfg) - m.additionalIncludeDirectories(cfg, cfg.includedirs) - end - - function m.clCompileAdditionalUsingDirectories(cfg) - m.additionalUsingDirectories(cfg, cfg.usingdirs) - end - - - function m.clCompilePreprocessorDefinitions(cfg, condition) - local defines = cfg.defines - if cfg.exceptionhandling == p.OFF then - defines = table.join(defines, "_HAS_EXCEPTIONS=0") - end - m.preprocessorDefinitions(cfg, defines, false, condition) - end - - - function m.clCompileUndefinePreprocessorDefinitions(cfg, condition) - m.undefinePreprocessorDefinitions(cfg, cfg.undefines, false, condition) - end - - - function m.clrSupport(cfg) - local value - if cfg.clr == "On" or cfg.clr == "Unsafe" then - value = "true" - elseif cfg.clr ~= p.OFF then - value = cfg.clr - end - if value then - m.element("CLRSupport", nil, value) - end - end - - - function m.compileAs(cfg, condition) - if p.languages.isc(cfg.compileas) then - m.element("CompileAs", condition, "CompileAsC") - elseif p.languages.iscpp(cfg.compileas) then - m.element("CompileAs", condition, "CompileAsCpp") - end - end - - - function m.configurationType(cfg) - local types = { - SharedLib = "DynamicLibrary", - StaticLib = "StaticLibrary", - ConsoleApp = "Application", - WindowedApp = "Application", - Makefile = "Makefile", - None = "Makefile", - Utility = "Utility", - } - m.element("ConfigurationType", nil, types[cfg.kind]) - end - - - function m.culture(cfg) - local value = vstudio.cultureForLocale(cfg.locale) - if value then - m.element("Culture", nil, "0x%04x", tostring(value)) - end - end - - - function m.debugInformationFormat(cfg) - local value - local tool, toolVersion = p.config.toolset(cfg) - if (cfg.symbols == p.ON) or (cfg.symbols == "FastLink") or (cfg.symbols == "Full") then - if cfg.debugformat == "c7" then - value = "OldStyle" - elseif (cfg.architecture == "x86_64" and _ACTION < "vs2015") or - cfg.clr ~= p.OFF or - config.isOptimizedBuild(cfg) or - cfg.editandcontinue == p.OFF or - (toolVersion and toolVersion:startswith("LLVM-vs")) - then - value = "ProgramDatabase" - else - value = "EditAndContinue" - end - - m.element("DebugInformationFormat", nil, value) - elseif cfg.symbols == p.OFF then - -- leave field blank for vs2013 and older to workaround bug - if _ACTION < "vs2015" then - value = "" - else - value = "None" - end - - m.element("DebugInformationFormat", nil, value) - end - end - - - function m.enableDpiAwareness(cfg) - local awareness = { - None = "false", - High = "true", - HighPerMonitor = "PerMonitorHighDPIAware", - } - local value = awareness[cfg.dpiawareness] - - if value then - m.element("EnableDpiAwareness", nil, value) - end - end - - - function m.enableEnhancedInstructionSet(cfg, condition) - local v - local x = cfg.vectorextensions - if x == "AVX" and _ACTION > "vs2010" then - v = "AdvancedVectorExtensions" - elseif x == "AVX2" and _ACTION > "vs2012" then - v = "AdvancedVectorExtensions2" - elseif cfg.architecture ~= "x86_64" then - if x == "SSE2" or x == "SSE3" or x == "SSSE3" or x == "SSE4.1" then - v = "StreamingSIMDExtensions2" - elseif x == "SSE" then - v = "StreamingSIMDExtensions" - elseif x == "IA32" and _ACTION > "vs2010" then - v = "NoExtensions" - end - end - if v then - m.element('EnableEnhancedInstructionSet', condition, v) - end - end - - - function m.entryPointSymbol(cfg) - if cfg.entrypoint then - m.element("EntryPointSymbol", nil, cfg.entrypoint) - end - end - - - function m.exceptionHandling(cfg, condition) - if cfg.exceptionhandling == p.OFF then - m.element("ExceptionHandling", condition, "false") - elseif cfg.exceptionhandling == "SEH" then - m.element("ExceptionHandling", condition, "Async") - elseif cfg.exceptionhandling == "On" then - m.element("ExceptionHandling", condition, "Sync") - elseif cfg.exceptionhandling == "CThrow" then - m.element("ExceptionHandling", condition, "SyncCThrow") - end - end - - - function m.excludedFromBuild(filecfg, condition) - if not filecfg or filecfg.flags.ExcludeFromBuild then - m.element("ExcludedFromBuild", condition, "true") - end - end - - - function m.exceptionHandlingSEH(filecfg, condition) - if not filecfg or filecfg.exceptionhandling == "SEH" then - m.element("UseSafeExceptionHandlers", condition, "true") - end - end - - - function m.extensionsToDeleteOnClean(cfg) - if #cfg.cleanextensions > 0 then - local value = table.implode(cfg.cleanextensions, "*", ";", "") - m.element("ExtensionsToDeleteOnClean", nil, value .. "$(ExtensionsToDeleteOnClean)") - end - end - - - function m.fileType(cfg, file) - m.element("FileType", nil, "Document") - end - - - function m.floatingPointModel(cfg) - if cfg.floatingpoint and cfg.floatingpoint ~= "Default" then - m.element("FloatingPointModel", nil, cfg.floatingpoint) - end - end - - - function m.floatingPointExceptions(cfg) - if cfg.floatingpointexceptions ~= nil then - if cfg.floatingpointexceptions then - m.element("FloatingPointExceptions", nil, "true") - else - m.element("FloatingPointExceptions", nil, "false") - end - end - end - - - function m.inlineFunctionExpansion(cfg) - if cfg.inlining then - local types = { - Default = "Default", - Disabled = "Disabled", - Explicit = "OnlyExplicitInline", - Auto = "AnySuitable", - } - m.element("InlineFunctionExpansion", nil, types[cfg.inlining]) - end - end - - - function m.forceIncludes(cfg, condition) - if #cfg.forceincludes > 0 then - local includes = vstudio.path(cfg, cfg.forceincludes) - if #includes > 0 then - m.element("ForcedIncludeFiles", condition, table.concat(includes, ';')) - end - end - if #cfg.forceusings > 0 then - local usings = vstudio.path(cfg, cfg.forceusings) - if #usings > 0 then - m.element("ForcedUsingFiles", condition, table.concat(usings, ';')) - end - end - end - - - function m.fullProgramDatabaseFile(cfg) - if _ACTION >= "vs2015" and cfg.symbols == "FastLink" then - m.element("FullProgramDatabaseFile", nil, "true") - end - end - - function m.assemblyDebug(cfg) - if cfg.assemblydebug then - m.element("AssemblyDebug", nil, "true") - end - end - - - function m.functionLevelLinking(cfg) - if cfg.functionlevellinking ~= nil then - if cfg.functionlevellinking then - m.element("FunctionLevelLinking", nil, "true") - else - m.element("FunctionLevelLinking", nil, "false") - end - elseif config.isOptimizedBuild(cfg) then - m.element("FunctionLevelLinking", nil, "true") - end - end - - - function m.generateDebugInformation(cfg) - local lookup = {} - if _ACTION >= "vs2017" then - lookup[p.ON] = "true" - lookup[p.OFF] = "false" - lookup["FastLink"] = "DebugFastLink" - lookup["Full"] = "DebugFull" - elseif _ACTION == "vs2015" then - lookup[p.ON] = "true" - lookup[p.OFF] = "false" - lookup["FastLink"] = "DebugFastLink" - lookup["Full"] = "true" - else - lookup[p.ON] = "true" - lookup[p.OFF] = "false" - lookup["FastLink"] = "true" - lookup["Full"] = "true" - end - - local value = lookup[cfg.symbols] - if value then - m.element("GenerateDebugInformation", nil, value) - end - end - - - function m.generateManifest(cfg) - if cfg.flags.NoManifest then - m.element("GenerateManifest", nil, "false") - end - end - - - function m.generateMapFile(cfg) - if cfg.flags.Maps then - m.element("GenerateMapFile", nil, "true") - end - end - - - function m.ignoreDefaultLibraries(cfg) - if #cfg.ignoredefaultlibraries > 0 then - local ignored = cfg.ignoredefaultlibraries - for i = 1, #ignored do - -- Add extension if required - if not p.tools.msc.getLibraryExtensions()[ignored[i]:match("[^.]+$")] then - ignored[i] = path.appendextension(ignored[i], ".lib") - end - end - - m.element("IgnoreSpecificDefaultLibraries", condition, table.concat(ignored, ';')) - end - end - - - function m.ignoreWarnDuplicateFilename(prj) - -- VS 2013 warns on duplicate file names, even those files which are - -- contained in different, mututally exclusive configurations. See: - -- http://connect.microsoft.com/VisualStudio/feedback/details/797460/incorrect-warning-msb8027-reported-for-files-excluded-from-build - -- Premake already adds unique object names to conflicting file names, so - -- just go ahead and disable that warning. - if _ACTION > "vs2012" then - m.element("IgnoreWarnCompileDuplicatedFilename", nil, "true") - end - end - - - function m.ignoreImportLibrary(cfg) - if cfg.kind == p.SHAREDLIB and cfg.flags.NoImportLib then - m.element("IgnoreImportLibrary", nil, "true") - end - end - - - function m.importLanguageTargets(prj) - p.w('') - end - - m.elements.importExtensionTargets = function(prj) - return { - m.importGroupTargets, - m.importRuleTargets, - m.importNuGetTargets, - m.importBuildCustomizationsTargets - } - end - - function m.importExtensionTargets(prj) - p.push('') - p.callArray(m.elements.importExtensionTargets, prj) - p.pop('') - end - - function m.importGroupTargets(prj) - local groups = m.categorizeSources(prj) - for _, group in ipairs(groups) do - if group.category.emitExtensionTargets then - group.category.emitExtensionTargets(prj, group) - end - end - end - - function m.importRuleTargets(prj) - for i = 1, #prj.rules do - local rule = p.global.getRule(prj.rules[i]) - local loc = vstudio.path(prj, p.filename(rule, ".targets")) - p.x('', loc) - end - end - - local function nuGetTargetsFile(prj, package) - local packageAPIInfo = vstudio.nuget2010.packageAPIInfo(prj, package) - return p.vstudio.path(prj, p.filename(prj.workspace, string.format("packages\\%s.%s\\build\\native\\%s.targets", vstudio.nuget2010.packageId(package), packageAPIInfo.verbatimVersion or packageAPIInfo.version, vstudio.nuget2010.packageId(package)))) - end - - function m.importNuGetTargets(prj) - if not vstudio.nuget2010.supportsPackageReferences(prj) then - for i = 1, #prj.nuget do - local targetsFile = nuGetTargetsFile(prj, prj.nuget[i]) - p.x('', targetsFile, targetsFile) - end - end - end - - function m.importBuildCustomizationsTargets(prj) - for i, build in ipairs(prj.buildcustomizations) do - p.w('', path.translate(build)) - end - end - - - - function m.ensureNuGetPackageBuildImports(prj) - if #prj.nuget > 0 then - p.push('') - p.push('') - p.x('This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.') - p.pop('') - - for i = 1, #prj.nuget do - local targetsFile = nuGetTargetsFile(prj, prj.nuget[i]) - p.x('', targetsFile, targetsFile) - end - p.pop('') - end - end - - - - function m.importDefaultProps(prj) - p.w('') - end - - - - function m.importLanguageSettings(prj) - p.w('') - end - - m.elements.importExtensionSettings = function(prj) - return { - m.importGroupSettings, - m.importRuleSettings, - m.importBuildCustomizationsProps - } - end - - function m.importExtensionSettings(prj) - p.push('') - p.callArray(m.elements.importExtensionSettings, prj) - p.pop('') - end - - - function m.importGroupSettings(prj) - local groups = m.categorizeSources(prj) - for _, group in ipairs(groups) do - if group.category.emitExtensionSettings then - group.category.emitExtensionSettings(prj, group) - end - end - end - - - function m.importRuleSettings(prj) - for i = 1, #prj.rules do - local rule = p.global.getRule(prj.rules[i]) - local loc = vstudio.path(prj, p.filename(rule, ".props")) - p.x('', loc) - end - end - - - function m.importBuildCustomizationsProps(prj) - for i, build in ipairs(prj.buildcustomizations) do - p.w('', path.translate(build)) - end - end - - - - function m.importLibrary(cfg) - if cfg.kind == p.SHAREDLIB then - m.element("ImportLibrary", nil, "%s", path.translate(cfg.linktarget.relpath)) - end - end - - - function m.includePath(cfg) - local dirs = vstudio.path(cfg, cfg.sysincludedirs) - if #dirs > 0 then - m.element("IncludePath", nil, "%s;$(IncludePath)", table.concat(dirs, ";")) - end - end - - - function m.intDir(cfg) - local objdir = vstudio.path(cfg, cfg.objdir) - m.element("IntDir", nil, "%s\\", objdir) - end - - - function m.intrinsicFunctions(cfg) - if cfg.intrinsics ~= nil then - if cfg.intrinsics then - m.element("IntrinsicFunctions", nil, "true") - else - m.element("IntrinsicFunctions", nil, "false") - end - elseif config.isOptimizedBuild(cfg) then - m.element("IntrinsicFunctions", nil, "true") - end - end - - - function m.keyword(prj) - -- try to determine what kind of targets we're building here - local isWin, isManaged, isMakefile - for cfg in project.eachconfig(prj) do - if cfg.system == p.WINDOWS then - isWin = true - end - if cfg.clr ~= p.OFF then - isManaged = true - end - if vstudio.isMakefile(cfg) then - isMakefile = true - end - end - - if isWin then - if isMakefile then - m.element("Keyword", nil, "MakeFileProj") - else - if isManaged or m.isClrMixed(prj) then - m.targetFramework(prj) - end - if isManaged then - m.element("Keyword", nil, "ManagedCProj") - else - m.element("Keyword", nil, "Win32Proj") - end - m.element("RootNamespace", nil, "%s", prj.name) - end - end - end - - - function m.libraryPath(cfg) - local dirs = vstudio.path(cfg, cfg.syslibdirs) - if #dirs > 0 then - m.element("LibraryPath", nil, "%s;$(LibraryPath)", table.concat(dirs, ";")) - end - end - - - - function m.linkIncremental(cfg) - if cfg.kind ~= p.STATICLIB then - m.element("LinkIncremental", nil, "%s", tostring(config.canLinkIncremental(cfg))) - end - end - - - function m.linkLibraryDependencies(cfg, explicit) - -- Left to its own devices, VS will happily link against a project dependency - -- that has been excluded from the build. As a workaround, disable dependency - -- linking and list all siblings explicitly - if explicit then - p.push('') - m.element("LinkLibraryDependencies", nil, "false") - p.pop('') - end - end - - - function m.MasmPreprocessorDefinitions(cfg, condition) - if cfg.defines then - m.preprocessorDefinitions(cfg, cfg.defines, false, condition) - end - end - - - function m.minimalRebuild(cfg) - if config.isOptimizedBuild(cfg) or - cfg.flags.NoMinimalRebuild or - cfg.flags.MultiProcessorCompile or - cfg.debugformat == p.C7 - then - m.element("MinimalRebuild", nil, "false") - end - end - - - function m.moduleDefinitionFile(cfg) - local df = config.findfile(cfg, ".def") - if df then - m.element("ModuleDefinitionFile", nil, "%s", df) - end - end - - - function m.multiProcessorCompilation(cfg) - if cfg.flags.MultiProcessorCompile then - m.element("MultiProcessorCompilation", nil, "true") - end - end - - - function m.nmakeBuildCommands(cfg) - m.nmakeCommandLine(cfg, cfg.buildcommands, "Build") - end - - - function m.nmakeCleanCommands(cfg) - m.nmakeCommandLine(cfg, cfg.cleancommands, "Clean") - end - - - function m.nmakeCommandLine(cfg, commands, phase) - if #commands > 0 then - commands = os.translateCommandsAndPaths(commands, cfg.project.basedir, cfg.project.location) - commands = table.concat(p.esc(commands), p.eol()) - p.w('%s', phase, commands, phase) - end - end - - - function m.nmakeIncludeDirs(cfg) - if cfg.kind ~= p.NONE and #cfg.includedirs > 0 then - local dirs = vstudio.path(cfg, cfg.includedirs) - if #dirs > 0 then - m.element("NMakeIncludeSearchPath", nil, "%s", table.concat(dirs, ";")) - end - end - end - - - function m.nmakeOutDirs(cfg) - if vstudio.isMakefile(cfg) then - m.outDir(cfg) - m.intDir(cfg) - end - end - - - function m.windowsSDKDesktopARMSupport(cfg) - if cfg.system == p.WINDOWS then - if cfg.architecture == p.ARM then - p.w('true') - end - if cfg.architecture == p.ARM64 then - p.w('true') - end - end - end - - - function m.nmakeOutput(cfg) - m.element("NMakeOutput", nil, "$(OutDir)%s", cfg.buildtarget.name) - end - - - function m.nmakePreprocessorDefinitions(cfg) - if cfg.kind ~= p.NONE and #cfg.defines > 0 then - local defines = table.concat(cfg.defines, ";") - defines = defines .. ";$(NMakePreprocessorDefinitions)" - m.element('NMakePreprocessorDefinitions', nil, defines) - end - end - - - function m.nmakeRebuildCommands(cfg) - m.nmakeCommandLine(cfg, cfg.rebuildcommands, "ReBuild") - end - - - function m.objectFileName(fcfg) - if fcfg.objname ~= fcfg.basename then - m.element("ObjectFileName", m.configPair(fcfg.config), "$(IntDir)\\%s.obj", fcfg.objname) - end - end - - - function m.omitDefaultLib(cfg) - if cfg.flags.OmitDefaultLibrary then - m.element("OmitDefaultLibName", nil, "true") - end - end - - - function m.omitFramePointers(cfg) - local map = { Off = "false", On = "true" } - local value = map[cfg.omitframepointer] - - if value then - m.element("OmitFramePointers", nil, value) - end - end - - - function m.optimizeReferences(cfg) - if config.isOptimizedBuild(cfg) then - m.element("EnableCOMDATFolding", nil, "true") - m.element("OptimizeReferences", nil, "true") - end - end - - - function m.optimization(cfg, condition) - local map = { Off="Disabled", On="Full", Debug="Disabled", Full="Full", Size="MinSpace", Speed="MaxSpeed" } - local value = map[cfg.optimize] - if value or not condition then - m.element('Optimization', condition, value or "Disabled") - end - end - - - function m.outDir(cfg) - local outdir = vstudio.path(cfg, cfg.buildtarget.directory) - m.element("OutDir", nil, "%s\\", outdir) - end - - - function m.executablePath(cfg) - local dirs = vstudio.path(cfg, cfg.bindirs) - if #dirs > 0 then - dirs = table.translate(dirs, function(dir) - if path.isabsolute(dir) then - return dir - end - return "$(ProjectDir)" .. dir - end) - m.element("ExecutablePath", nil, "%s;$(ExecutablePath)", table.concat(dirs, ";")) - end - end - - - function m.platformToolset(cfg) - local tool, version = p.config.toolset(cfg) - if not version then - local value = p.action.current().toolset - tool, version = p.tools.canonical(value) - end - if version then - if cfg.kind == p.NONE or cfg.kind == p.MAKEFILE then - if p.config.hasFile(cfg, path.iscppfile) or _ACTION >= "vs2015" then - m.element("PlatformToolset", nil, version) - end - else - m.element("PlatformToolset", nil, version) - end - end - end - - function m.precompiledHeaderFile(fileName, cfg) - m.element("PrecompiledHeaderFile", nil, "%s", fileName) - end - - function m.precompiledHeader(cfg, condition) - local prjcfg, filecfg = p.config.normalize(cfg) - if filecfg then - if prjcfg.pchsource == filecfg.abspath and not prjcfg.flags.NoPCH then - m.element('PrecompiledHeader', condition, 'Create') - elseif filecfg.flags.NoPCH then - m.element('PrecompiledHeader', condition, 'NotUsing') - end - else - if not prjcfg.flags.NoPCH and prjcfg.pchheader then - m.element("PrecompiledHeader", nil, "Use") - m.precompiledHeaderFile(prjcfg.pchheader, prjcfg) - else - m.element("PrecompiledHeader", nil, "NotUsing") - end - end - end - - - function m.preprocessorDefinitions(cfg, defines, escapeQuotes, condition) - if #defines > 0 then - defines = table.concat(defines, ";") - if escapeQuotes then - defines = defines:gsub('"', '\\"') - end - defines = defines .. ";%%(PreprocessorDefinitions)" - m.element('PreprocessorDefinitions', condition, defines) - end - end - - - function m.undefinePreprocessorDefinitions(cfg, undefines, escapeQuotes, condition) - if #undefines > 0 then - undefines = table.concat(undefines, ";") - if escapeQuotes then - undefines = undefines:gsub('"', '\\"') - end - undefines = undefines .. ";%%(UndefinePreprocessorDefinitions)" - m.element('UndefinePreprocessorDefinitions', condition, undefines) - end - end - - local function getSymbolsPathRelative(cfg) - if cfg.symbolspath and cfg.symbols ~= p.OFF and cfg.debugformat ~= "c7" then - return p.project.getrelative(cfg.project, cfg.symbolspath) - else - return nil - end - end - - function m.programDatabaseFile(cfg) - local value = getSymbolsPathRelative(cfg) - - if value then - m.element("ProgramDatabaseFile", nil, value) - end - end - - function m.programDatabaseFileName(cfg) - local value = getSymbolsPathRelative(cfg) - - if value then - m.element("ProgramDataBaseFileName", nil, value) - end - end - - function m.projectGuid(prj) - m.element("ProjectGuid", nil, "{%s}", prj.uuid) - end - - - function m.projectName(prj) - if prj.name ~= prj.filename then - m.element("ProjectName", nil, "%s", prj.name) - end - end - - - function m.propertyGroup(cfg, label) - local cond - if cfg then - cond = string.format(' %s', m.condition(cfg)) - end - - if label then - label = string.format(' Label="%s"', label) - end - - p.push('', cond or "", label or "") - end - - - - function m.propertySheets(cfg) - p.push('', m.condition(cfg)) - p.w('') - p.pop('') - end - - - function m.propertySheetGroup(prj) - for cfg in project.eachconfig(prj) do - m.propertySheets(cfg) - end - end - - - function m.referenceCopyLocalSatelliteAssemblies(prj, ref) - m.element("CopyLocalSatelliteAssemblies", nil, "false") - end - - - function m.referenceLinkLibraryDependencies(prj, ref) - m.element("LinkLibraryDependencies", nil, "true") - end - - - function m.referenceOutputAssembly(prj, ref) - m.element("ReferenceOutputAssembly", nil, "true") - end - - - function m.referencePrivate(prj, ref) - m.element("Private", nil, "true") - end - - - function m.referenceProject(prj, ref) - m.element("Project", nil, "{%s}", ref.uuid) - end - - - function m.referenceUseLibraryDependences(prj, ref) - m.element("UseLibraryDependencyInputs", nil, "false") - end - - - function m.resourceAdditionalIncludeDirectories(cfg) - m.additionalIncludeDirectories(cfg, table.join(cfg.includedirs, cfg.resincludedirs)) - end - - - function m.resourcePreprocessorDefinitions(cfg) - local defines = table.join(cfg.defines, cfg.resdefines) - if cfg.exceptionhandling == p.OFF then - table.insert(defines, "_HAS_EXCEPTIONS=0") - end - m.preprocessorDefinitions(cfg, defines, true) - end - - - function m.runtimeLibrary(cfg) - local runtimes = { - StaticDebug = "MultiThreadedDebug", - StaticRelease = "MultiThreaded", - SharedDebug = "MultiThreadedDebugDLL", - SharedRelease = "MultiThreadedDLL" - } - local runtime = config.getruntime(cfg) - if runtime then - m.element("RuntimeLibrary", nil, runtimes[runtime]) - end - end - - function m.callingConvention(cfg) - if cfg.callingconvention then - m.element("CallingConvention", nil, cfg.callingconvention) - end - end - - function m.runtimeTypeInfo(cfg, condition) - if cfg.rtti == p.OFF and ((not cfg.clr) or cfg.clr == p.OFF) then - m.element("RuntimeTypeInfo", condition, "false") - elseif cfg.rtti == p.ON then - m.element("RuntimeTypeInfo", condition, "true") - end - end - - function m.bufferSecurityCheck(cfg) - local tool, toolVersion = p.config.toolset(cfg) - if cfg.flags.NoBufferSecurityCheck or (toolVersion and toolVersion:startswith("LLVM-vs")) then - m.element("BufferSecurityCheck", nil, "false") - end - end - - function m.stringPooling(cfg) - if cfg.stringpooling ~= nil then - if cfg.stringpooling then - m.element("StringPooling", nil, "true") - else - m.element("StringPooling", nil, "false") - end - elseif config.isOptimizedBuild(cfg) then - m.element("StringPooling", nil, "true") - end - end - - - function m.subSystem(cfg) - local subsystem = iif(cfg.kind == p.CONSOLEAPP, "Console", "Windows") - m.element("SubSystem", nil, subsystem) - end - - - function m.targetExt(cfg) - local ext = cfg.buildtarget.extension - if ext ~= "" then - m.element("TargetExt", nil, "%s", ext) - else - p.w('') - p.w('') - end - end - - - function m.targetMachine(cfg) - -- If a static library project contains a resource file, VS will choke with - -- "LINK : warning LNK4068: /MACHINE not specified; defaulting to X86" - local targetmachine = { - x86 = "MachineX86", - x86_64 = "MachineX64", - } - if cfg.kind == p.STATICLIB and config.hasFile(cfg, path.isresourcefile) then - local value = targetmachine[cfg.architecture] - if value ~= nil then - m.element("TargetMachine", nil, '%s', value) - end - end - end - - - function m.targetName(cfg) - m.element("TargetName", nil, "%s%s", cfg.buildtarget.prefix, cfg.buildtarget.basename) - end - - - function m.latestTargetPlatformVersion(prj) - -- See https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html - if _ACTION == "vs2017" then - m.element("LatestTargetPlatformVersion", nil, "$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))") - end - end - - - function m.windowsTargetPlatformVersion(prj, cfg) - if _ACTION < "vs2015" then - return - end - - local target = cfg or prj - local version = project.systemversion(target) - - -- if this is a config, only emit if different from project - if cfg then - local prjVersion = project.systemversion(prj) - if not prjVersion or version == prjVersion then - return - end - end - - -- See https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html - if version == "latest" then - if _ACTION == "vs2015" then - version = nil -- SDK v10 is not supported by VS2015 - elseif _ACTION == "vs2017" then - version = "$(LatestTargetPlatformVersion)" - else - version = "10.0" - end - end - - if version then - m.element("WindowsTargetPlatformVersion", nil, version) - end - end - - - function m.preferredToolArchitecture(prj) - if _ACTION >= "vs2013" then - if prj.preferredtoolarchitecture == p.X86_64 then - m.element("PreferredToolArchitecture", nil, 'x64') - elseif prj.preferredtoolarchitecture == p.X86 then - m.element("PreferredToolArchitecture", nil, 'x86') - end - else - if prj.preferredtoolarchitecture == p.X86_64 then - m.element("UseNativeEnvironment", nil, 'true') - end - end - end - - - function m.treatLinkerWarningAsErrors(cfg) - if cfg.flags.FatalLinkWarnings then - local el = iif(cfg.kind == p.STATICLIB, "Lib", "Linker") - m.element("Treat" .. el .. "WarningAsErrors", nil, "true") - end - end - - - function m.treatWChar_tAsBuiltInType(cfg) - local map = { On = "true", Off = "false" } - local value = map[cfg.nativewchar] - if value then - m.element("TreatWChar_tAsBuiltInType", nil, value) - end - end - - - function m.treatWarningAsError(cfg) - if cfg.flags.FatalCompileWarnings and cfg.warnings ~= p.OFF then - m.element("TreatWarningAsError", nil, "true") - end - end - - - function m.disableSpecificWarnings(cfg, condition) - if #cfg.disablewarnings > 0 then - local warnings = table.concat(cfg.disablewarnings, ";") - warnings = warnings .. ";%%(DisableSpecificWarnings)" - m.element('DisableSpecificWarnings', condition, warnings) - end - end - - - function m.treatSpecificWarningsAsErrors(cfg, condition) - if #cfg.fatalwarnings > 0 then - local fatal = table.concat(cfg.fatalwarnings, ";") - fatal = fatal .. ";%%(TreatSpecificWarningsAsErrors)" - m.element('TreatSpecificWarningsAsErrors', condition, fatal) - end - end - - - function m.useDebugLibraries(cfg) - local runtime = config.getruntime(cfg) or iif(config.isDebugBuild(cfg), "Debug", "Release") - m.element("UseDebugLibraries", nil, tostring(runtime:endswith("Debug"))) - end - - - function m.useOfMfc(cfg) - if cfg.flags.MFC then - m.element("UseOfMfc", nil, iif(cfg.staticruntime == "On", "Static", "Dynamic")) - end - end - - function m.useOfAtl(cfg) - if cfg.atl then - m.element("UseOfATL", nil, cfg.atl) - end - end - - - - function m.userMacros(cfg) - p.w('') - end - - - function m.warningLevel(cfg) - local map = { Off = "TurnOffAllWarnings", Extra = "Level4" } - m.element("WarningLevel", nil, map[cfg.warnings] or "Level3") - end - - - function m.warningLevelFile(cfg, condition) - local map = { Off = "TurnOffAllWarnings", Extra = "Level4" } - if cfg.warnings then - m.element("WarningLevel", condition, map[cfg.warnings] or "Level3") - end - end - - - function m.xmlDeclaration() - p.xmlUtf8() - end - - -- Fx Functions - -------------------------------------------------------------------------------------------------------------- - -------------------------------------------------------------------------------------------------------------- - - function m.fxCompilePreprocessorDefinition(cfg, condition) - if cfg.shaderdefines and #cfg.shaderdefines > 0 then - local shaderdefines = table.concat(cfg.shaderdefines, ";") - - shaderdefines = shaderdefines .. ";%%(PreprocessorDefinitions)" - m.element('PreprocessorDefinitions', condition, shaderdefines) - end - end - - function m.fxCompileAdditionalIncludeDirs(cfg, condition) - if cfg.shaderincludedirs and #cfg.shaderincludedirs > 0 then - local dirs = vstudio.path(cfg, cfg.shaderincludedirs) - m.element('AdditionalIncludeDirectories', condition, "%s;%%(AdditionalIncludeDirectories)", table.concat(dirs, ";")) - end - end - - function m.fxCompileShaderType(cfg, condition) - if cfg.shadertype then - m.element("ShaderType", condition, cfg.shadertype) - end - end - - - function m.fxCompileShaderModel(cfg, condition) - if cfg.shadermodel then - m.element("ShaderModel", condition, cfg.shadermodel) - end - end - - - function m.fxCompileShaderEntry(cfg, condition) - if cfg.shaderentry then - m.element("EntryPointName", condition, cfg.shaderentry) - end - end - - - function m.fxCompileShaderVariableName(cfg, condition) - if cfg.shadervariablename then - m.element("VariableName", condition, cfg.shadervariablename) - end - end - - - function m.fxCompileShaderHeaderOutput(cfg, condition) - if cfg.shaderheaderfileoutput then - m.element("HeaderFileOutput", condition, cfg.shaderheaderfileoutput) - end - end - - - function m.fxCompileShaderObjectOutput(cfg, condition) - if cfg.shaderobjectfileoutput then - m.element("ObjectFileOutput", condition, cfg.shaderobjectfileoutput) - end - end - - - function m.fxCompileShaderAssembler(cfg, condition) - if cfg.shaderassembler then - m.element("AssemblerOutput", condition, cfg.shaderassembler) - end - end - - - function m.fxCompileShaderAssemblerOutput(cfg, condition) - if cfg.shaderassembleroutput then - m.element("AssemblerOutputFile", condition, cfg.shaderassembleroutput) - end - end - - - function m.fxCompileShaderAdditionalOptions(cfg, condition) - local opts = cfg.shaderoptions - if #opts > 0 then - opts = table.concat(opts, " ") - m.element("AdditionalOptions", condition, '%s %%(AdditionalOptions)', opts) - end - end - - ---------------------------------------------------------------------------- --- --- Support functions --- ---------------------------------------------------------------------------- - --- --- Format and return a Visual Studio Condition attribute. --- - - function m.conditionFromConfigText(cfgText) - return string.format('Condition="\'$(Configuration)|$(Platform)\'==\'%s\'"', p.esc(cfgText)) - end - - function m.condition(cfg) - return m.conditionFromConfigText(vstudio.projectConfig(cfg)) - end - --- --- Get the latest installed SDK 10 version from the registry. --- - - function m.latestSDK10Version() - local arch = iif(os.is64bit(), "\\WOW6432Node\\", "\\") - local version = os.getWindowsRegistry("HKLM:SOFTWARE" .. arch .."Microsoft\\Microsoft SDKs\\Windows\\v10.0\\ProductVersion") - if version ~= nil then - return version .. ".0" - else - return nil - end - end - - --- --- Output an individual project XML element, with an optional configuration --- condition. --- --- @param depth --- How much to indent the element. --- @param name --- The element name. --- @param condition --- An optional configuration condition, formatted with vc2010.condition(). --- @param value --- The element value, which may contain printf formatting tokens. --- @param ... --- Optional additional arguments to satisfy any tokens in the value. --- - - function m.element(name, condition, value, ...) - local arg = {...} - if select('#',...) == 0 then - value = p.esc(value) - else - for i = 1, #arg do - arg[i] = p.esc(arg[i]) - end - end - - if condition then - --defer output - local element = {} - element.name = name - element.condition = condition - element.value = value - element.args = arg - if ... then - if value == '%s' then - element.setting = table.concat(arg) - else - element.setting = value .. table.concat(arg) - end - else - element.setting = element.value - end - table.insert(m.conditionalElements, element) - else - local format = string.format('<%s>%s', name, value, name) - p.w(format, table.unpack(arg)) - end - end diff --git a/build/premake/premake5/modules/vstudio/vs2010_vcxproj_filters.lua b/build/premake/premake5/modules/vstudio/vs2010_vcxproj_filters.lua deleted file mode 100644 index dc8b283062..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_vcxproj_filters.lua +++ /dev/null @@ -1,99 +0,0 @@ --- --- vs2010_vcxproj_filters.lua --- Generate a Visual Studio 201x C/C++ filters file. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local project = p.project - local tree = p.tree - - local m = p.vstudio.vc2010 - - --- --- Generate a Visual Studio 201x C++ project, with support for the new platforms API. --- - - function m.generateFilters(prj) - m.xmlDeclaration() - m.filtersProject() - m.uniqueIdentifiers(prj) - m.filterGroups(prj) - p.out('') - end - - --- --- Output the XML declaration and opening tag. --- - - function m.filtersProject() - local action = p.action.current() - p.push('', - action.vstudio.filterToolsVersion or action.vstudio.toolsVersion) - end - - - - function m.filterGroups(prj) - local groups = m.categorizeSources(prj) - for _, group in ipairs(groups) do - group.category.emitFilter(prj, group) - end - end - - - --- --- The first portion of the filters file assigns unique IDs to each --- directory or virtual group. Would be cool if we could automatically --- map vpaths like "**.h" to an h element. --- - - function m.uniqueIdentifiers(prj) - local tr = project.getsourcetree(prj) - local contents = p.capture(function() - p.push() - tree.traverse(tr, { - onbranch = function(node, depth) - p.push('', path.translate(node.path, '\\')) - p.w('{%s}', os.uuid(node.path)) - p.pop('') - end - }, false) - p.pop() - end) - - if #contents > 0 then - p.push('') - p.outln(contents) - p.pop('') - end - end - - - function m.filterGroup(prj, group, tag) - local files = group.files - if files and #files > 0 then - p.push('') - for _, file in ipairs(files) do - local rel = path.translate(file.relpath) - - -- SharedItems projects paths are prefixed with a magical variable - if prj.kind == p.SHAREDITEMS then - rel = "$(MSBuildThisFileDirectory)" .. rel - end - - if file.parent.path then - p.push('<%s Include=\"%s\">', tag, rel) - p.w('%s', path.translate(file.parent.path, '\\')) - p.pop('', tag) - else - p.w('<%s Include=\"%s\" />', tag, rel) - end - end - p.pop('') - end - end - diff --git a/build/premake/premake5/modules/vstudio/vs2010_vcxproj_user.lua b/build/premake/premake5/modules/vstudio/vs2010_vcxproj_user.lua deleted file mode 100644 index a421f67d9c..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2010_vcxproj_user.lua +++ /dev/null @@ -1,152 +0,0 @@ --- --- vs2010_vcxproj_user.lua --- Generate a Visual Studio 201x C/C++ project .user file --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local m = p.vstudio.vc2010 - - --- --- Generate a Visual Studio 201x C++ user file. --- - - m.elements.user = function(cfg) - return { - m.debugSettings, - } - end - - function m.generateUser(prj) - -- Only want output if there is something to configure - local contents = {} - local size = 0 - - for cfg in p.project.eachconfig(prj) do - contents[cfg] = p.capture(function() - p.push(2) - p.callArray(m.elements.user, cfg) - p.pop(2) - end) - size = size + #contents[cfg] - end - - if size > 0 then - m.xmlDeclaration() - m.userProject() - for cfg in p.project.eachconfig(prj) do - p.push('', m.condition(cfg)) - if #contents[cfg] > 0 then - p.outln(contents[cfg]) - end - p.pop('') - end - p.pop('') - end - end - - - --- --- Output the opening tag. --- - - function m.userProject() - local action = p.action.current() - p.push('', - action.vstudio.userToolsVersion or action.vstudio.toolsVersion) - end - - - - m.elements.debugSettings = function(cfg) - return { - m.localDebuggerCommand, - m.localDebuggerWorkingDirectory, - m.debuggerFlavor, - m.localDebuggerCommandArguments, - m.localDebuggerDebuggerType, - m.localDebuggerEnvironment, - m.localDebuggerMergeEnvironment, - } - end - - function m.debugSettings(cfg) - p.callArray(m.elements.debugSettings, cfg) - end - - - - function m.debuggerFlavor(cfg) - local map = { - VisualStudioLocal = "WindowsLocalDebugger", - VisualStudioRemote = "WindowsRemoteDebugger", - VisualStudioWebBrowser = "WebBrowserDebugger", - VisualStudioWebService = "WebServiceDebugger" - } - - local value = map[cfg.debugger] - if value then - p.w('%s', value) - elseif cfg.debugdir or cfg.debugcommand then - p.w('WindowsLocalDebugger') - end - end - - - - function m.localDebuggerCommand(cfg) - if cfg.debugcommand then - local dir = path.translate(cfg.debugcommand) - p.w('%s', dir) - end - end - - - function m.localDebuggerDebuggerType(cfg) - if cfg.debuggertype then - p.w('%s', cfg.debuggertype) - end - end - - - function m.localDebuggerCommandArguments(cfg) - if #cfg.debugargs > 0 then - local args = os.translateCommandsAndPaths(cfg.debugargs, cfg.project.basedir, cfg.project.location) - p.x('%s', table.concat(args, " ")) - end - end - - - - function m.localDebuggerWorkingDirectory(cfg) - if cfg.debugdir then - local dir = p.vstudio.path(cfg, cfg.debugdir) - p.x('%s', dir) - end - end - - - - function m.localDebuggerEnvironment(cfg) - if #cfg.debugenvs > 0 then - local envs = table.concat(cfg.debugenvs, "\n") - if cfg.flags.DebugEnvsInherit then - envs = envs .. "\n$(LocalDebuggerEnvironment)" - end - p.w('%s', envs) - - if cfg.flags.DebugEnvsDontMerge then - p.w(2,'false') - end - end - end - - - - function m.localDebuggerMergeEnvironment(cfg) - if #cfg.debugenvs > 0 and cfg.flags.DebugEnvsDontMerge then - p.w(2,'false') - end - end diff --git a/build/premake/premake5/modules/vstudio/vs2012.lua b/build/premake/premake5/modules/vstudio/vs2012.lua deleted file mode 100644 index cc0c3fa639..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2012.lua +++ /dev/null @@ -1,67 +0,0 @@ --- --- vs2012.lua --- Extend the existing exporters with support for Visual Studio 2012. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local vstudio = p.vstudio - ---- --- Define the Visual Studio 2010 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2012", - shortname = "Visual Studio 2012", - description = "Generate Visual Studio 2012 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v110", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - vstudio.vs2005.generateSolution(wks) - end, - onProject = function(prj) - vstudio.vs2010.generateProject(prj) - end, - onRule = function(rule) - vstudio.vs2010.generateRule(rule) - end, - - onCleanWorkspace = function(wks) - vstudio.cleanSolution(wks) - end, - onCleanProject = function(prj) - vstudio.cleanProject(prj) - end, - onCleanTarget = function(prj) - vstudio.cleanTarget(prj) - end, - - pathVars = vstudio.vs2010.pathVars, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - solutionVersion = "12", - versionName = "2012", - targetFramework = "4.5", - toolsVersion = "4.0", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs2013.lua b/build/premake/premake5/modules/vstudio/vs2013.lua deleted file mode 100644 index ff9f70e8e6..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2013.lua +++ /dev/null @@ -1,68 +0,0 @@ --- --- vs2013.lua --- Extend the existing exporters with support for Visual Studio 2013. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local vstudio = p.vstudio - ---- --- Define the Visual Studio 2013 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2013", - shortname = "Visual Studio 2013", - description = "Generate Visual Studio 2013 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v120", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "SharedItems" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - vstudio.vs2005.generateSolution(wks) - end, - onProject = function(prj) - vstudio.vs2010.generateProject(prj) - end, - onRule = function(rule) - vstudio.vs2010.generateRule(rule) - end, - - onCleanWorkspace = function(wks) - vstudio.cleanSolution(wks) - end, - onCleanProject = function(prj) - vstudio.cleanProject(prj) - end, - onCleanTarget = function(prj) - vstudio.cleanTarget(prj) - end, - - pathVars = vstudio.vs2010.pathVars, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - solutionVersion = "12", - versionName = "2013", - targetFramework = "4.5", - toolsVersion = "12.0", - filterToolsVersion = "4.0", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs2013_vcxitems.lua b/build/premake/premake5/modules/vstudio/vs2013_vcxitems.lua deleted file mode 100644 index 0499f42f6c..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2013_vcxitems.lua +++ /dev/null @@ -1,142 +0,0 @@ --- --- vs2013_vcxitems.lua --- Generate a Visual Studio 201x C/C++ shared items project. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - p.vstudio.vc2013 = {} - - local vstudio = p.vstudio - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - local tree = p.tree - - local m = p.vstudio.vc2013 - local vc2010 = p.vstudio.vc2010 - ---- --- Add namespace for element definition lists for p.callArray() ---- - - m.elements = {} - m.conditionalElements = {} - --- --- Generate a Visual Studio 201x C++ project, with support for the new platforms API. --- - - m.elements.project = function(prj) - return { - vc2010.xmlDeclaration, - m.project, - m.globals, - m.itemDefinitionGroup, - m.itemGroup, - vc2010.files, - } - end - - function m.generate(prj) - p.utf8() - p.callArray(m.elements.project, prj) - p.out('') - end - --- --- Output the XML declaration and opening tag. --- - - function m.project(prj) - p.push('') - end - --- --- Write out the Globals property group. --- - - m.elements.globals = function(prj) - return { - m.msbuildAllProjects, - m.hasSharedItems, - m.itemsProjectGuid, - m.itemsProjectName, - } - end - - function m.globals(prj) - vc2010.propertyGroup(nil, "Globals") - p.callArray(m.elements.globals, prj) - p.pop('') - end - - function m.msbuildAllProjects(prj) - vc2010.element("MSBuildAllProjects", nil, "$(MSBuildAllProjects);$(MSBuildThisFileFullPath)") - end - - function m.hasSharedItems(prj) - vc2010.element("HasSharedItems", nil, "true") - end - - function m.itemsProjectGuid(prj) - vc2010.element("ItemsProjectGuid", nil, "{%s}", prj.uuid) - end - - function m.itemsProjectName(prj) - if prj.name ~= prj.filename then - vc2010.element("ItemsProjectName", nil, "%s", prj.name) - end - end - --- --- Write an item definition group, which contains all of the shared compile settings. --- - - m.elements.itemDefinitionGroup = function(prj) - return { - m.clCompile, - } - end - - function m.itemDefinitionGroup(prj) - p.push('') - p.callArray(m.elements.itemDefinitionGroup, prj) - p.pop('') - end - - m.elements.clCompile = function(prj) - return { - m.additionalIncludeDirectories, - } - end - - function m.clCompile(prj) - p.push('') - p.callArray(m.elements.clCompile, prj) - p.pop('') - end - - function m.additionalIncludeDirectories(prj) - vc2010.element("AdditionalIncludeDirectories", nil, '%s', '%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)') - end - --- --- Write an item group, which contains the project capability --- - - m.elements.itemGroup = function(prj) - return { - m.projectCapability, - } - end - - function m.itemGroup(prj) - p.push('') - p.callArray(m.elements.itemGroup, prj) - p.pop('') - end - - function m.projectCapability(prj) - p.w('') - end diff --git a/build/premake/premake5/modules/vstudio/vs2015.lua b/build/premake/premake5/modules/vstudio/vs2015.lua deleted file mode 100644 index 33a15feace..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2015.lua +++ /dev/null @@ -1,68 +0,0 @@ --- --- vs2015.lua --- Extend the existing exporters with support for Visual Studio 2015. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local vstudio = p.vstudio - ---- --- Define the Visual Studio 2015 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2015", - shortname = "Visual Studio 2015", - description = "Generate Visual Studio 2015 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v140", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "SharedItems" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - vstudio.vs2005.generateSolution(wks) - end, - onProject = function(prj) - vstudio.vs2010.generateProject(prj) - end, - onRule = function(rule) - vstudio.vs2010.generateRule(rule) - end, - - onCleanWorkspace = function(wks) - vstudio.cleanSolution(wks) - end, - onCleanProject = function(prj) - vstudio.cleanProject(prj) - end, - onCleanTarget = function(prj) - vstudio.cleanTarget(prj) - end, - - pathVars = vstudio.vs2010.pathVars, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - solutionVersion = "12", - versionName = "14", - targetFramework = "4.5", - toolsVersion = "14.0", - filterToolsVersion = "4.0", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs2017.lua b/build/premake/premake5/modules/vstudio/vs2017.lua deleted file mode 100644 index 1115be8bec..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2017.lua +++ /dev/null @@ -1,68 +0,0 @@ --- --- vs2017.lua --- Extend the existing exporters with support for Visual Studio 2017. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local vstudio = p.vstudio - ---- --- Define the Visual Studio 2017 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2017", - shortname = "Visual Studio 2017", - description = "Generate Visual Studio 2017 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v141", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "SharedItems" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - p.vstudio.vs2005.generateSolution(wks) - end, - onProject = function(prj) - p.vstudio.vs2010.generateProject(prj) - end, - onRule = function(rule) - p.vstudio.vs2010.generateRule(rule) - end, - - onCleanWorkspace = function(wks) - p.vstudio.cleanSolution(wks) - end, - onCleanProject = function(prj) - p.vstudio.cleanProject(prj) - end, - onCleanTarget = function(prj) - p.vstudio.cleanTarget(prj) - end, - - pathVars = vstudio.vs2010.pathVars, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - solutionVersion = "12", - versionName = "15", - targetFramework = "4.5.2", - toolsVersion = "15.0", - filterToolsVersion = "4.0", - } - } diff --git a/build/premake/premake5/modules/vstudio/vs2019.lua b/build/premake/premake5/modules/vstudio/vs2019.lua deleted file mode 100644 index 0ae85df5cb..0000000000 --- a/build/premake/premake5/modules/vstudio/vs2019.lua +++ /dev/null @@ -1,69 +0,0 @@ --- --- vs2019.lua --- Extend the existing exporters with support for Visual Studio 2019. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - local vstudio = p.vstudio - ---- --- Define the Visual Studio 2019 export action. ---- - - newaction { - -- Metadata for the command line and help system - - trigger = "vs2019", - shortname = "Visual Studio 2019", - description = "Generate Visual Studio 2019 project files", - - -- Visual Studio always uses Windows path and naming conventions - - targetos = "windows", - toolset = "msc-v142", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "SharedItems" }, - valid_languages = { "C", "C++", "C#", "F#" }, - valid_tools = { - cc = { "msc" }, - dotnet = { "msnet" }, - }, - - -- Workspace and project generation logic - - onWorkspace = function(wks) - p.vstudio.vs2005.generateSolution(wks) - end, - onProject = function(prj) - p.vstudio.vs2010.generateProject(prj) - end, - onRule = function(rule) - p.vstudio.vs2010.generateRule(rule) - end, - - onCleanWorkspace = function(wks) - p.vstudio.cleanSolution(wks) - end, - onCleanProject = function(prj) - p.vstudio.cleanProject(prj) - end, - onCleanTarget = function(prj) - p.vstudio.cleanTarget(prj) - end, - - pathVars = vstudio.vs2010.pathVars, - - -- This stuff is specific to the Visual Studio exporters - - vstudio = { - solutionVersion = "12", - versionName = "Version 16", - targetFramework = "4.7.2", - toolsVersion = "15.0", - userToolsVersion = "Current", - filterToolsVersion = "4.0", - } - } diff --git a/build/premake/premake5/modules/vstudio/vstudio.lua b/build/premake/premake5/modules/vstudio/vstudio.lua deleted file mode 100644 index 55b6cd39fa..0000000000 --- a/build/premake/premake5/modules/vstudio/vstudio.lua +++ /dev/null @@ -1,653 +0,0 @@ --- --- vstudio.lua --- Define the Visual Studio 200x actions. --- Copyright (c) Jason Perkins and the Premake project --- - - local p = premake - - p.modules.vstudio = p.modules.vstudio or {} - p.modules.vstudio._VERSION = p._VERSION - - -- for backwards compatibility. - p.vstudio = p.modules.vstudio - - local vstudio = p.vstudio - local project = p.project - local config = p.config - --- --- Mapping tables from Premake systems and architectures to Visual Studio --- identifiers. Broken out as tables so new values can be pushed in by --- add-ons. --- - - vstudio.vs200x_architectures = - { - win32 = "x86", - x86 = "x86", - x86_64 = "x64", - ARM = "ARM", - ARM64 = "ARM64", - } - - vstudio.vs2010_architectures = - { - win32 = "x86", - } - - - local function architecture(system, arch) - local result - if _ACTION >= "vs2010" then - result = vstudio.vs2010_architectures[arch] or vstudio.vs2010_architectures[system] - end - return result or vstudio.vs200x_architectures[arch] or vstudio.vs200x_architectures[system] - end - - --- --- Mapping from ISO locales to MS culture identifiers. --- http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.85%29.ASPX --- - - vstudio._cultures = { - ["af"] = 0x0036, - ["af-ZA"] = 0x0436, - ["sq"] = 0x001C, - ["sq-AL"] = 0x041C, - ["ar"] = 0x0001, - ["ar-DZ"] = 0x1401, - ["ar-BH"] = 0x3C01, - ["ar-EG"] = 0x0C01, - ["ar-IQ"] = 0x0801, - ["ar-JO"] = 0x2C01, - ["ar-KW"] = 0x3401, - ["ar-LB"] = 0x3001, - ["ar-LY"] = 0x1001, - ["ar-MA"] = 0x1801, - ["ar-OM"] = 0x2001, - ["ar-QA"] = 0x4001, - ["ar-SA"] = 0x0401, - ["ar-SY"] = 0x2801, - ["ar-TN"] = 0x1C01, - ["ar-AE"] = 0x3801, - ["ar-YE"] = 0x2401, - ["hy"] = 0x002B, - ["hy-AM"] = 0x042B, - ["az"] = 0x002C, - ["az-Cyrl-AZ"] = 0x082C, - ["az-Latn-AZ"] = 0x042C, - ["eu"] = 0x002D, - ["eu-ES"] = 0x042D, - ["be"] = 0x0023, - ["be-BY"] = 0x0423, - ["bg"] = 0x0002, - ["bg-BG"] = 0x0402, - ["ca"] = 0x0003, - ["ca-ES"] = 0x0403, - ["zh-HK"] = 0x0C04, - ["zh-MO"] = 0x1404, - ["zh-CN"] = 0x0804, - ["zh-Hans"] = 0x0004, - ["zh-SG"] = 0x1004, - ["zh-TW"] = 0x0404, - ["zh-Hant"] = 0x7C04, - ["hr"] = 0x001A, - ["hr-HR"] = 0x041A, - ["cs"] = 0x0005, - ["cs-CZ"] = 0x0405, - ["da"] = 0x0006, - ["da-DK"] = 0x0406, - ["dv"] = 0x0065, - ["dv-MV"] = 0x0465, - ["nl"] = 0x0013, - ["nl-BE"] = 0x0813, - ["nl-NL"] = 0x0413, - ["en"] = 0x0009, - ["en-AU"] = 0x0C09, - ["en-BZ"] = 0x2809, - ["en-CA"] = 0x1009, - ["en-029"] = 0x2409, - ["en-IE"] = 0x1809, - ["en-JM"] = 0x2009, - ["en-NZ"] = 0x1409, - ["en-PH"] = 0x3409, - ["en-ZA"] = 0x1C09, - ["en-TT"] = 0x2C09, - ["en-GB"] = 0x0809, - ["en-US"] = 0x0409, - ["en-ZW"] = 0x3009, - ["et"] = 0x0025, - ["et-EE"] = 0x0425, - ["fo"] = 0x0038, - ["fo-FO"] = 0x0438, - ["fa"] = 0x0029, - ["fa-IR"] = 0x0429, - ["fi"] = 0x000B, - ["fi-FI"] = 0x040B, - ["fr"] = 0x000C, - ["fr-BE"] = 0x080C, - ["fr-CA"] = 0x0C0C, - ["fr-FR"] = 0x040C, - ["fr-LU"] = 0x140C, - ["fr-MC"] = 0x180C, - ["fr-CH"] = 0x100C, - ["gl"] = 0x0056, - ["gl-ES"] = 0x0456, - ["ka"] = 0x0037, - ["ka-GE"] = 0x0437, - ["de"] = 0x0007, - ["de-AT"] = 0x0C07, - ["de-DE"] = 0x0407, - ["de-LI"] = 0x1407, - ["de-LU"] = 0x1007, - ["de-CH"] = 0x0807, - ["el"] = 0x0008, - ["el-GR"] = 0x0408, - ["gu"] = 0x0047, - ["gu-IN"] = 0x0447, - ["he"] = 0x000D, - ["he-IL"] = 0x040D, - ["hi"] = 0x0039, - ["hi-IN"] = 0x0439, - ["hu"] = 0x000E, - ["hu-HU"] = 0x040E, - ["is"] = 0x000F, - ["is-IS"] = 0x040F, - ["id"] = 0x0021, - ["id-ID"] = 0x0421, - ["it"] = 0x0010, - ["it-IT"] = 0x0410, - ["it-CH"] = 0x0810, - ["ja"] = 0x0011, - ["ja-JP"] = 0x0411, - ["kn"] = 0x004B, - ["kn-IN"] = 0x044B, - ["kk"] = 0x003F, - ["kk-KZ"] = 0x043F, - ["kok"] = 0x0057, - ["kok-IN"] = 0x0457, - ["ko"] = 0x0012, - ["ko-KR"] = 0x0412, - ["ky"] = 0x0040, - ["ky-KG"] = 0x0440, - ["lv"] = 0x0026, - ["lv-LV"] = 0x0426, - ["lt"] = 0x0027, - ["lt-LT"] = 0x0427, - ["mk"] = 0x002F, - ["mk-MK"] = 0x042F, - ["ms"] = 0x003E, - ["ms-BN"] = 0x083E, - ["ms-MY"] = 0x043E, - ["mr"] = 0x004E, - ["mr-IN"] = 0x044E, - ["mn"] = 0x0050, - ["mn-MN"] = 0x0450, - ["no"] = 0x0014, - ["nb-NO"] = 0x0414, - ["nn-NO"] = 0x0814, - ["pl"] = 0x0015, - ["pl-PL"] = 0x0415, - ["pt"] = 0x0016, - ["pt-BR"] = 0x0416, - ["pt-PT"] = 0x0816, - ["pa"] = 0x0046, - ["pa-IN"] = 0x0446, - ["ro"] = 0x0018, - ["ro-RO"] = 0x0418, - ["ru"] = 0x0019, - ["ru-RU"] = 0x0419, - ["sa"] = 0x004F, - ["sa-IN"] = 0x044F, - ["sr-Cyrl-CS"] = 0x0C1A, - ["sr-Latn-CS"] = 0x081A, - ["sk"] = 0x001B, - ["sk-SK"] = 0x041B, - ["sl"] = 0x0024, - ["sl-SI"] = 0x0424, - ["es"] = 0x000A, - ["es-AR"] = 0x2C0A, - ["es-BO"] = 0x400A, - ["es-CL"] = 0x340A, - ["es-CO"] = 0x240A, - ["es-CR"] = 0x140A, - ["es-DO"] = 0x1C0A, - ["es-EC"] = 0x300A, - ["es-SV"] = 0x440A, - ["es-GT"] = 0x100A, - ["es-HN"] = 0x480A, - ["es-MX"] = 0x080A, - ["es-NI"] = 0x4C0A, - ["es-PA"] = 0x180A, - ["es-PY"] = 0x3C0A, - ["es-PE"] = 0x280A, - ["es-PR"] = 0x500A, - ["es-ES"] = 0x0C0A, - ["es-ES_tradnl"]= 0x040A, - ["es-UY"] = 0x380A, - ["es-VE"] = 0x200A, - ["sw"] = 0x0041, - ["sw-KE"] = 0x0441, - ["sv"] = 0x001D, - ["sv-FI"] = 0x081D, - ["sv-SE"] = 0x041D, - ["syr"] = 0x005A, - ["syr-SY"] = 0x045A, - ["ta"] = 0x0049, - ["ta-IN"] = 0x0449, - ["tt"] = 0x0044, - ["tt-RU"] = 0x0444, - ["te"] = 0x004A, - ["te-IN"] = 0x044A, - ["th"] = 0x001E, - ["th-TH"] = 0x041E, - ["tr"] = 0x001F, - ["tr-TR"] = 0x041F, - ["uk"] = 0x0022, - ["uk-UA"] = 0x0422, - ["ur"] = 0x0020, - ["ur-PK"] = 0x0420, - ["uz"] = 0x0043, - ["uz-Cyrl-UZ"] = 0x0843, - ["uz-Latn-UZ"] = 0x0443, - ["vi"] = 0x002A, - ["vi-VN"] = 0x042A, - } - - --- --- Translate the system and architecture settings from a configuration --- into a corresponding Visual Studio identifier. If no settings are --- found in the configuration, a default value is returned, based on --- the project settings. --- --- @param cfg --- The configuration to translate. --- @param win32 --- If true, enables the "Win32" symbol. If false, uses "x86" instead. --- @return --- A Visual Studio architecture identifier. --- - - function vstudio.archFromConfig(cfg, win32) - local isnative = project.isnative(cfg.project) - - local arch = architecture(cfg.system, cfg.architecture) - if not arch then - arch = iif(isnative, "x86", "Any CPU") - end - - if win32 and isnative and arch == "x86" then - arch = "Win32" - end - - return arch - end - - --- --- Attempt to translate a platform identifier into a corresponding --- Visual Studio architecture identifier. --- --- @param platform --- The platform identifier to translate. --- @return --- A Visual Studio architecture identifier, or nil if no mapping --- could be made. --- - - function vstudio.archFromPlatform(platform) - local system = p.api.checkValue(p.fields.system, platform) - local arch = p.api.checkValue(p.fields.architecture, platform) - return architecture(system, arch or platform:lower()) - end - - ---- --- Given an ISO locale identifier, return an MS culture code. ---- - - function vstudio.cultureForLocale(locale) - if locale then - local culture = vstudio._cultures[locale] - if not culture then - p.warnOnce("Locale" .. locale, 'Unsupported locale "%s"', locale) - end - return culture - end - end - - - ---- --- Assemble the list of links just the way Visual Studio likes them. --- --- @param cfg --- The active configuration. --- @param explicit --- True to explicitly include sibling project libraries; if false Visual --- Studio's default implicit linking will be used. --- @return --- The list of linked libraries, ready to be used in Visual Studio's --- AdditionalDependencies element. ---- - - function vstudio.getLinks(cfg, explicit) - return p.tools.msc.getlinks(cfg, not explicit) - end - - - --- --- Return true if the configuration kind is one of "Makefile" or "None". The --- latter is generated like a Makefile project and excluded from the solution. --- - - function vstudio.isMakefile(cfg) - return (cfg.kind == p.MAKEFILE or cfg.kind == p.NONE) - end - - --- --- If a dependency of a project configuration is excluded from that particular --- build configuration or platform, Visual Studio will still try to link it. --- This function detects that case, so that the individual actions can work --- around it by switching to external linking. --- --- @param cfg --- The configuration to test. --- @return --- True if the configuration excludes one or more dependencies. --- - - function vstudio.needsExplicitLink(cfg) - if not cfg._needsExplicitLink then - local ex = cfg.flags.NoImplicitLink - if not ex then - local prjdeps = project.getdependencies(cfg.project, "linkOnly") - local cfgdeps = config.getlinks(cfg, "dependencies", "object") - ex = #prjdeps ~= #cfgdeps - end - cfg._needsExplicitLink = ex - end - return cfg._needsExplicitLink - end - - ---- --- Prepare a path value for output in a Visual Studio project or solution. --- Converts path separators to backslashes, and makes relative to the project. --- --- @param cfg --- The project or configuration which contains the path. --- @param value --- The path to be prepared. --- @return --- The prepared path. ---- - - function vstudio.path(cfg, value) - cfg = cfg.project or cfg - local dirs = path.translate(project.getrelative(cfg, value)) - - if type(dirs) == 'table' then - dirs = table.filterempty(dirs) - end - - return dirs - end - - --- --- Returns the Visual Studio project configuration identifier corresponding --- to the given Premake configuration. --- --- @param cfg --- The configuration to query. --- @param arch --- An optional architecture identifier, to override the configuration. --- @return --- A project configuration identifier of the form --- |. --- - - function vstudio.projectConfig(cfg, arch) - local platform = vstudio.projectPlatform(cfg) - local architecture = arch or vstudio.archFromConfig(cfg, true) - return platform .. "|" .. architecture - end - - ---- --- Generates a Visual Studio project element for the current action. ---- - - function vstudio.projectElement() - p.push('') - end - - - --- --- Returns the full, absolute path to the Visual Studio project file --- corresponding to a particular project object. --- --- @param prj --- The project object. --- @return --- The absolute path to the corresponding Visual Studio project file. --- - - function vstudio.projectfile(prj) - local extension - if project.iscsharp(prj) then - extension = ".csproj" - elseif project.isfsharp(prj) then - extension = ".fsproj" - elseif project.isc(prj) or project.iscpp(prj) then - if prj.kind == p.SHAREDITEMS then - extension = ".vcxitems" - else - extension = iif(_ACTION > "vs2008", ".vcxproj", ".vcproj") - end - end - - return p.filename(prj, extension) - end - - --- --- Returns a project configuration name corresponding to the given --- Premake configuration. This is just the solution build configuration --- and platform identifiers concatenated. --- - - function vstudio.projectPlatform(cfg) - local platform = cfg.platform - if platform then - local pltarch = vstudio.archFromPlatform(cfg.platform) or platform - local cfgarch = vstudio.archFromConfig(cfg) - if pltarch == cfgarch then - platform = nil - end - end - - if platform then - return cfg.buildcfg .. " " .. platform - else - return cfg.buildcfg - end - end - - --- --- Determine the appropriate Visual Studio platform identifier for a --- solution-level configuration. --- --- @param cfg --- The configuration to be identified. --- @return --- A corresponding Visual Studio platform identifier. --- - - function vstudio.solutionPlatform(cfg) - local platform = cfg.platform - - -- if a platform is specified use it, translating to the corresponding - -- Visual Studio identifier if appropriate - local platarch - if platform then - platform = vstudio.archFromPlatform(platform) or platform - - -- Value for 32-bit arch is different depending on whether this solution - -- contains C++ or C# projects or both - if platform ~= "x86" then - return platform - end - end - - -- scan the contained projects to identify the platform - local hasnative = false - local hasnet = false - local slnarch - for prj in p.workspace.eachproject(cfg.workspace) do - hasnative = hasnative or project.isnative(prj) - hasnet = hasnet or project.isdotnet(prj) - - -- get a VS architecture identifier for this project - local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform) - if prjcfg then - local prjarch = vstudio.archFromConfig(prjcfg) - if not slnarch then - slnarch = prjarch - elseif slnarch ~= prjarch then - slnarch = "Mixed Platforms" - end - end - end - - - if platform then - return iif(hasnet, "x86", "Win32") - elseif slnarch then - return iif(slnarch == "x86" and not hasnet, "Win32", slnarch) - elseif hasnet and hasnative then - return "Mixed Platforms" - elseif hasnet then - return "Any CPU" - else - return "Win32" - end - end - - --- --- Attempt to determine an appropriate Visual Studio architecture identifier --- for a solution configuration. --- --- @param cfg --- The configuration to query. --- @return --- A best guess at the corresponding Visual Studio architecture identifier. --- - - function vstudio.solutionarch(cfg) - local hasnative = false - local hasdotnet = false - - -- if the configuration has a platform identifier, use that as default - local arch = cfg.platform - - -- if the platform identifier matches a known system or architecture, - -- - - for prj in p.workspace.eachproject(cfg.workspace) do - hasnative = hasnative or project.isnative(prj) - hasnet = hasnet or project.isdotnet(prj) - - if hasnative and hasdotnet then - return "Mixed Platforms" - end - - if not arch then - local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform) - if prjcfg then - if prjcfg.architecture then - arch = vstudio.archFromConfig(prjcfg) - end - end - end - end - - -- use a default if no other architecture was specified - arch = arch or iif(hasnative, "Win32", "Any CPU") - return arch - end - - --- --- Returns the Visual Studio solution configuration identifier corresponding --- to the given Premake configuration. --- --- @param cfg --- The configuration to query. --- @return --- A solution configuration identifier of the format BuildCfg|Platform, --- corresponding to the Premake values of the same names. If no platform --- was specified by the script, the architecture is used instead. --- - - function vstudio.solutionconfig(cfg) - local platform = cfg.platform - - -- if no platform name was specified, use the architecture instead; - -- since architectures are defined in the projects and not at the - -- solution level, need to poke around to figure this out - if not platform then - platform = vstudio.solutionarch(cfg) - end - - return string.format("%s|%s", cfg.buildcfg, platform) - end - - --- --- Returns the Visual Studio tool ID for a given project type. --- - - function vstudio.tool(prj) - if project.iscsharp(prj) then - return "FAE04EC0-301F-11D3-BF4B-00C04F79EFBC" - elseif project.isfsharp(prj) then - return "F2A71F9B-5D33-465A-A702-920D77279786" - elseif project.isc(prj) or project.iscpp(prj) then - return "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942" - end - end - - - --- --- Load all required code, and return the module. --- - - include("vs200x_vcproj.lua") - include("vs200x_vcproj_user.lua") - include("vs2005_solution.lua") - include("vs2005_dotnetbase.lua") - include("vs2005_csproj.lua") - include("vs2005_csproj_user.lua") - include("vs2005_fsproj.lua") - include("vs2005_fsproj_user.lua") - include("vs2010_nuget.lua") - include("vs2010_vcxproj.lua") - include("vs2010_vcxproj_user.lua") - include("vs2010_vcxproj_filters.lua") - include("vs2010_rules_props.lua") - include("vs2010_rules_targets.lua") - include("vs2010_rules_xml.lua") - include("vs2013_vcxitems.lua") - - return p.modules.vstudio diff --git a/build/premake/premake5/modules/xcode/LICENSE.TXT b/build/premake/premake5/modules/xcode/LICENSE.TXT deleted file mode 100644 index 11cc14f0a3..0000000000 --- a/build/premake/premake5/modules/xcode/LICENSE.TXT +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2003-2015 Jason Perkins, Mihai Sebea and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Premake nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/premake/premake5/modules/xcode/_manifest.lua b/build/premake/premake5/modules/xcode/_manifest.lua deleted file mode 100644 index 4c11a556f3..0000000000 --- a/build/premake/premake5/modules/xcode/_manifest.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "_preload.lua", - "xcode.lua", - "xcode4_workspace.lua", - "xcode_common.lua", - "xcode_project.lua", -} diff --git a/build/premake/premake5/modules/xcode/_preload.lua b/build/premake/premake5/modules/xcode/_preload.lua deleted file mode 100644 index 06dec3fb90..0000000000 --- a/build/premake/premake5/modules/xcode/_preload.lua +++ /dev/null @@ -1,89 +0,0 @@ ---- --- xcode/_preload.lua --- Define the Apple XCode actions and new APIs. --- Copyright (c) 2009-2015 Jason Perkins and the Premake project ---- - - local p = premake - - --- --- Register new Xcode-specific project fields. --- - - p.api.register { - name = "xcodebuildsettings", - scope = "config", - kind = "key-array", - } - - p.api.register { - name = "xcodebuildresources", - scope = "config", - kind = "list", - } - - p.api.register { - name = "xcodecodesigningidentity", - scope = "config", - kind = "string", - } - - p.api.register { - name = "xcodesystemcapabilities", - scope = "project", - kind = "key-boolean", - } - - p.api.register { - name = "iosfamily", - scope = "config", - kind = "string", - allowed = { - "iPhone/iPod touch", - "iPad", - "Universal", - } - } - --- --- Register the Xcode exporters. --- - - newaction { - trigger = "xcode4", - shortname = "Apple Xcode 4", - description = "Generate Apple Xcode 4 project files", - - -- Xcode always uses Mac OS X path and naming conventions - - toolset = "clang", - - -- The capabilities of this action - - valid_kinds = { "ConsoleApp", "WindowedApp", "SharedLib", "StaticLib", "Makefile", "Utility", "None" }, - valid_languages = { "C", "C++" }, - valid_tools = { - cc = { "gcc", "clang" }, - }, - - - -- Workspace and project generation logic - - onWorkspace = function(wks) - p.generate(wks, ".xcworkspace/contents.xcworkspacedata", p.modules.xcode.generateWorkspace) - end, - - onProject = function(prj) - p.generate(prj, ".xcodeproj/project.pbxproj", p.modules.xcode.generateProject) - end, - } - - --- --- Decide when the full module should be loaded. --- - - return function(cfg) - return (_ACTION == "xcode4") - end diff --git a/build/premake/premake5/modules/xcode/tests/_tests.lua b/build/premake/premake5/modules/xcode/tests/_tests.lua deleted file mode 100644 index 3c9b714ed6..0000000000 --- a/build/premake/premake5/modules/xcode/tests/_tests.lua +++ /dev/null @@ -1,9 +0,0 @@ -require ("xcode") - -return { - "test_header_footer.lua", - "test_xcode4_project.lua", - "test_xcode4_workspace.lua", - "test_xcode_dependencies.lua", - "test_xcode_project.lua", -} diff --git a/build/premake/premake5/modules/xcode/tests/test_header_footer.lua b/build/premake/premake5/modules/xcode/tests/test_header_footer.lua deleted file mode 100644 index 73dcbda60b..0000000000 --- a/build/premake/premake5/modules/xcode/tests/test_header_footer.lua +++ /dev/null @@ -1,51 +0,0 @@ ---- --- xcode/tests/test_header.lua --- Validate generation for Xcode workspaces. --- Author Jason Perkins --- Copyright (c) 2009-2015 Jason Perkins and the Premake project ---- - - local suite = test.declare("xcode_header") - local p = premake - local xcode = p.modules.xcode - - --- --- Setup --- - - local wks - - function suite.setup() - _TARGET_OS = "macosx" - p.action.set('xcode4') - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - xcode.header(prj) - xcode.footer(prj) - end - - --- --- Check basic structure --- - - function suite.onDefaults() - prepare() - test.capture [[ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} - ]] - end diff --git a/build/premake/premake5/modules/xcode/tests/test_xcode4_project.lua b/build/premake/premake5/modules/xcode/tests/test_xcode4_project.lua deleted file mode 100644 index 94ad5512a4..0000000000 --- a/build/premake/premake5/modules/xcode/tests/test_xcode4_project.lua +++ /dev/null @@ -1,111 +0,0 @@ ---- --- tests/actions/xcode/test_xcode4_project.lua --- Automated test suite for Xcode project generation. --- Copyright (c) 2011-2015 Jason Perkins and the Premake project ---- - - - local suite = test.declare("xcode4_proj") - local p = premake - local xcode = p.modules.xcode - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local tr, wks - - function suite.teardown() - tr = nil - end - - function suite.setup() - _TARGET_OS = "macosx" - p.action.set('xcode4') - io.eol = "\n" - wks = test.createWorkspace() - end - - local function prepare() - wks = p.oven.bakeWorkspace(wks) - xcode.prepareWorkspace(wks) - local prj = p.workspace.getproject(wks, 1) - tr = xcode.buildprjtree(prj) - end - ---------------------------------------------------------------------------- --- xcode id generation tests ---------------------------------------------------------------------------- - - local function print_id(...) - _p("%s", xcode.newid(...)) - end - - function suite.IDGeneratorIsDeterministic() - print_id("project", "Debug") - print_id("project", "Release") - test.capture [[ -B266956655B21E987082EBA6 -DAC961207F1BFED291544760 - ]] - end - - function suite.IDGeneratorIsDifferent() - print_id("project", "Debug", "file") - print_id("project", "Debug", "hello") - test.capture [[ -47C6E72E5ED982604EF57D6E -8DCA12C2873014347ACB7102 - ]] - end - - function suite.IDGeneratorSame3() - print_id("project", "Release", "file") - print_id("project", "Release", "file") - print_id("project", "Release", "file") - test.capture [[ -022ECCE82854FC9A8F5BF328 -022ECCE82854FC9A8F5BF328 -022ECCE82854FC9A8F5BF328 - ]] - end - - function suite.IDGeneratorMoreThanNecessary() - print_id("a", "b", "c", "d", "e", "f") - print_id("abcdef") - test.capture [[ -63AEF3DD89D5238FF0DC1A1D -9F1AF6957CC5F947506A7CD5 - ]] - end - ---------------------------------------------------------------------------- --- XCBuildConfiguration_Project tests ---------------------------------------------------------------------------- - - function suite.XCBuildConfigurationProject_OnSymbols() - symbols "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - COPY_PHASE_STRIP = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = YES; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end diff --git a/build/premake/premake5/modules/xcode/tests/test_xcode4_workspace.lua b/build/premake/premake5/modules/xcode/tests/test_xcode4_workspace.lua deleted file mode 100644 index 795f1e6ca9..0000000000 --- a/build/premake/premake5/modules/xcode/tests/test_xcode4_workspace.lua +++ /dev/null @@ -1,133 +0,0 @@ ---- --- xcode/tests/test_xcode4_workspace.lua --- Validate generation for Xcode workspaces. --- Author Mihai Sebea --- Modified by Jason Perkins --- Copyright (c) 2014-2015 Jason Perkins and the Premake project ---- - - local suite = test.declare("xcode4_workspace") - local p = premake - local xcode = p.modules.xcode - - --- --- Setup --- - - local wks, prj - - function suite.setup() - _TARGET_OS = "macosx" - p.action.set('xcode4') - wks = test.createWorkspace() - end - - local function prepare() - wks = test.getWorkspace(wks) - xcode.generateWorkspace(wks) - end - - --- --- Check the basic structure of a workspace. --- - - function suite.onEmptyWorkspace() - wks.projects = {} - prepare() - test.capture [[ - - - - ]] - end - - - function suite.onDefaultWorkspace() - prepare() - test.capture [[ - - - - - - ]] - end - - - function suite.onMultipleProjects() - test.createproject(wks) - prepare() - test.capture [[ - - - - - - - - ]] - end - - function suite.onMultipleProjectsGrouped() - test.createGroup(wks) - test.createproject(wks) - prepare() - test.capture [[ - - - - - - - - - - ]] - end - - - --- --- Projects should include relative path from workspace. --- - - function suite.onNestedProjectPath() - location "MyProject" - prepare() - test.capture [[ - - - - - - ]] - end - - function suite.onExternalProjectPath() - location "../MyProject" - prepare() - test.capture [[ - - - - - - ]] - end diff --git a/build/premake/premake5/modules/xcode/tests/test_xcode_dependencies.lua b/build/premake/premake5/modules/xcode/tests/test_xcode_dependencies.lua deleted file mode 100644 index 42c86938ef..0000000000 --- a/build/premake/premake5/modules/xcode/tests/test_xcode_dependencies.lua +++ /dev/null @@ -1,318 +0,0 @@ --- --- tests/actions/xcode/test_xcode_dependencies.lua --- Automated test suite for Xcode project dependencies. --- Copyright (c) 2009-2011 Jason Perkins and the Premake project --- - - local suite = test.declare("xcode_deps") - local p = premake - local xcode = p.modules.xcode - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local wks, prj, prj2, tr - - function suite.teardown() - wks = nil - prj = nil - prj2 = nil - tr = nil - end - - function suite.setup() - _TARGET_OS = "macosx" - p.action.set('xcode4') - - wks, prj = test.createWorkspace() - links { "MyProject2" } - - prj2 = test.createproject(wks) - kind "StaticLib" - configuration "Debug" - targetsuffix "-d" - end - - local function prepare() - wks = p.oven.bakeWorkspace(wks) - xcode.prepareWorkspace(wks) - local prj3 = p.workspace.getproject(wks, 1) - --prj2 = test.getproject(wks, 2) - tr = xcode.buildprjtree(prj3) - end - - ---------------------------------------------------------------------------- --- PBXBuildFile tests ---------------------------------------------------------------------------- - - function suite.PBXBuildFile_ListsDependencyTargets_OnStaticLib() - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 5931FBCA4D31453CD21C5A0A /* libMyProject2-d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CCB6C53210CA9664049C1B72 /* libMyProject2-d.a */; }; -/* End PBXBuildFile section */ - ]] - end - - function suite.PBXBuildFile_ListsDependencyTargets_OnSharedLib() - kind "SharedLib" - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 1BC538B0FA67D422AF49D6F0 /* libMyProject2-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 107168B810144BEA4A68FEF8 /* libMyProject2-d.dylib */; }; -/* End PBXBuildFile section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXContainerItemProxy tests ---------------------------------------------------------------------------- - - function suite.PBXContainerItemProxy_ListsProjectConfigs() - prepare() - xcode.PBXContainerItemProxy(tr) - test.capture [[ -/* Begin PBXContainerItemProxy section */ - 17DF877139AB34A376605DB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = CBD893DEB01F9C10340CCA1E /* MyProject2.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = E052136F28C2F7A16D61C9AF; - remoteInfo = "libMyProject2-d.a"; - }; - 6A19FA0A8BE5A73CC89AD04A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = CBD893DEB01F9C10340CCA1E /* MyProject2.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = DA5DB975C549DF670D2FA7B5; - remoteInfo = "libMyProject2-d.a"; - }; -/* End PBXContainerItemProxy section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXFileReference tests ---------------------------------------------------------------------------- - - function suite.PBXFileReference_ListsDependencies() - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - CBD893DEB01F9C10340CCA1E /* libMyProject2-d.a */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "MyProject2.xcodeproj"; path = MyProject2.xcodeproj; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - ]] - end - - function suite.PBXFileReference_UsesRelativePaths() - prj.location = "MyProject" - prj2.location = "MyProject2" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 149CF6C96C0269BB1E108509 /* libMyProject2-d.a */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "MyProject2.xcodeproj"; path = ../MyProject2.xcodeproj; sourceTree = SOURCE_ROOT; }; - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXFrameworksBuildPhase tests ---------------------------------------------------------------------------- - - function suite.PBXFrameworksBuildPhase_ListsDependencies_OnStaticLib() - prepare() - xcode.PBXFrameworksBuildPhase(tr) - test.capture [[ -/* Begin PBXFrameworksBuildPhase section */ - 9FDD37564328C0885DF98D96 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5931FBCA4D31453CD21C5A0A /* libMyProject2-d.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - ]] - end - - function suite.PBXFrameworksBuildPhase_ListsDependencies_OnSharedLib() - kind "SharedLib" - prepare() - xcode.PBXFrameworksBuildPhase(tr) - test.capture [[ -/* Begin PBXFrameworksBuildPhase section */ - 9FDD37564328C0885DF98D96 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1BC538B0FA67D422AF49D6F0 /* libMyProject2-d.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - ]] - end - ---------------------------------------------------------------------------- --- PBXGroup tests ---------------------------------------------------------------------------- - - function suite.PBXGroup_ListsDependencies() - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - A6C936B49B3FADE6EA134CF4 /* Products */, - 9D968EAA920D05DCE0E0A4EA /* Projects */, - ); - name = MyProject; - sourceTree = ""; - }; - 9D968EAA920D05DCE0E0A4EA /* Projects */ = { - isa = PBXGroup; - children = ( - CBD893DEB01F9C10340CCA1E /* MyProject2.xcodeproj */, - ); - name = Projects; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; - C7F36A91F7853983D29278D1 /* Products */ = { - isa = PBXGroup; - children = ( - CCB6C53210CA9664049C1B72 /* libMyProject2-d.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXNativeTarget tests ---------------------------------------------------------------------------- - - function suite.PBXNativeTarget_ListsDependencies() - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - 0FC4B7F6B3104128CDE10E36 /* Resources */, - 7971D14D1CBD5A7F378E278D /* Sources */, - 9FDD37564328C0885DF98D96 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - B5ABA79AE53D768CC04AB5DA /* PBXTargetDependency */, - ); - name = MyProject; - productInstallPath = "$(HOME)/bin"; - productName = MyProject; - productReference = 19A5C4E61D1697189E833B26 /* MyProject */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXProject tests ---------------------------------------------------------------------------- - - function suite.PBXProject_ListsDependencies() - prepare() - xcode.PBXProject(tr) - test.capture [[ -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */; - compatibilityVersion = "Xcode 3.2"; - hasScannedForEncodings = 1; - mainGroup = 12F5A37D963B00EFBF8281BD /* MyProject */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = C7F36A91F7853983D29278D1 /* Products */; - ProjectRef = CBD893DEB01F9C10340CCA1E /* MyProject2.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 48B5980C775BEBFED09D464C /* MyProject */, - ); - }; -/* End PBXProject section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXReferenceProxy tests ---------------------------------------------------------------------------- - - function suite.PBXReferenceProxy_ListsDependencies() - prepare() - xcode.PBXReferenceProxy(tr) - test.capture [[ -/* Begin PBXReferenceProxy section */ - CCB6C53210CA9664049C1B72 /* libMyProject2-d.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libMyProject2-d.a"; - remoteRef = 17DF877139AB34A376605DB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXTargetDependency tests ---------------------------------------------------------------------------- - - function suite.PBXTargetDependency_ListsDependencies() - prepare() - xcode.PBXTargetDependency(tr) - test.capture [[ -/* Begin PBXTargetDependency section */ - B5ABA79AE53D768CC04AB5DA /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "libMyProject2-d.a"; - targetProxy = 6A19FA0A8BE5A73CC89AD04A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - ]] - end diff --git a/build/premake/premake5/modules/xcode/tests/test_xcode_project.lua b/build/premake/premake5/modules/xcode/tests/test_xcode_project.lua deleted file mode 100644 index 243126a8ff..0000000000 --- a/build/premake/premake5/modules/xcode/tests/test_xcode_project.lua +++ /dev/null @@ -1,3564 +0,0 @@ --- --- tests/actions/xcode/test_xcode_project.lua --- Automated test suite for Xcode project generation. --- Copyright (c) 2009-2011 Jason Perkins and the Premake project --- - local suite = test.declare("xcode_project") - local p = premake - local xcode = p.modules.xcode - - - ---------------------------------------------------------------------------- --- Setup/Teardown ---------------------------------------------------------------------------- - - local tr, wks - - function suite.teardown() - tr = nil - end - - function suite.setup() - _TARGET_OS = "macosx" - p.action.set('xcode4') - p.eol("\n") - wks = test.createWorkspace() - end - - local function prepare() - wks = p.oven.bakeWorkspace(wks) - xcode.prepareWorkspace(wks) - local prj = test.getproject(wks, 1) - tr = xcode.buildprjtree(prj) - end - ---------------------------------------------------------------------------- --- PBXBuildFile tests ---------------------------------------------------------------------------- - - function suite.PBXBuildFile_ListsCppSources() - files { "source.h", "source.c", "source.cpp", "Info.plist" } - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 7018C364CB5A16D69EB461A4 /* source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B47484CB259E37EA275DE8C /* source.cpp */; }; - F3989C244A260696229F1A64 /* source.c in Sources */ = {isa = PBXBuildFile; fileRef = 7DC6D30C8137A53E02A4494C /* source.c */; }; -/* End PBXBuildFile section */ - ]] - end - - function suite.PBXBuildFile_ListsObjCSources() - files { "source.h", "source.m", "source.mm", "Info.plist" } - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 8A01A092B9936F8494A0AED2 /* source.mm in Sources */ = {isa = PBXBuildFile; fileRef = CCAA329A6F98594CFEBE38DA /* source.mm */; }; - CBA890782235FAEAFAAF0EB8 /* source.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AFE9C203E6F6E52BFDC1260 /* source.m */; }; -/* End PBXBuildFile section */ - ]] - end - - function suite.PBXBuildFile_ListsResourceFilesOnlyOnceWithGroupID() - files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib" } - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 6FE0F2A3E16C0B15906D30E3 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CB8FB6B191BBB9DD7A431AB /* MainMenu.xib */; }; -/* End PBXBuildFile section */ - ]] - end - - - function suite.PBXBuildFile_ListsFrameworks() - links { "Cocoa.framework", "ldap" } - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - F8E8DBA28B76A594F44F49E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D6BC6AA50D7885C8F7B2CEA /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - ]] - end - - function suite.PBXBuildFile_IgnoresVpaths() - files { "source.h", "source.c", "source.cpp", "Info.plist" } - vpaths { ["Source Files"] = { "**.c", "**.cpp" } } - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 7018C364CB5A16D69EB461A4 /* source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9B47484CB259E37EA275DE8C /* source.cpp */; }; - F3989C244A260696229F1A64 /* source.c in Sources */ = {isa = PBXBuildFile; fileRef = 7DC6D30C8137A53E02A4494C /* source.c */; }; -/* End PBXBuildFile section */ - ]] - end - - ---- --- Verify that files listed in xcodebuildresources are marked as resources ---- - function suite.PBXBuildFile_ListsXcodeBuildResources() - files { "file1.txt", "file01.png", "file02.png", "file-3.png" } - xcodebuildresources { "file1.txt", "**.png" } - prepare() - xcode.PBXBuildFile(tr) - test.capture [[ -/* Begin PBXBuildFile section */ - 628F3826BDD08B98912AD666 /* file-3.png in Resources */ = {isa = PBXBuildFile; fileRef = 992385EEB0362120A0521C2E /* file-3.png */; }; - 93485EDEC2DA2DD09DE76D1E /* file1.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9F78562642667CD8D18C5C66 /* file1.txt */; }; - C87AFEAA23BC521CF7169CEA /* file02.png in Resources */ = {isa = PBXBuildFile; fileRef = D54D8E32EC602964DC7C2472 /* file02.png */; }; - EE9FC5C849E1193A1D3B6408 /* file01.png in Resources */ = {isa = PBXBuildFile; fileRef = 989B7E70AFAE19A29FCA14B0 /* file01.png */; }; -/* End PBXBuildFile section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXFileReference tests ---------------------------------------------------------------------------- - - function suite.PBXFileReference_ListsConsoleTarget() - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsWindowedTarget() - kind "WindowedApp" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - E5FB9875FD0E33A7ED2A2EB5 /* MyProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = MyProject.app; path = MyProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsIOSWindowedTarget() - _TARGET_OS = "ios" - kind "WindowedApp" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - E5FB9875FD0E33A7ED2A2EB5 /* MyProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = MyProject.app; path = MyProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsStaticLibTarget() - kind "StaticLib" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - FDCF31ACF735331EEAD08FEC /* libMyProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMyProject.a; path = libMyProject.a; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsIOSStaticLibTarget() - _TARGET_OS = "ios" - kind "StaticLib" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - FDCF31ACF735331EEAD08FEC /* libMyProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMyProject.a; path = libMyProject.a; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsSharedLibTarget() - kind "SharedLib" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 2781AF7F7E0F19F156882DBF /* libMyProject.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; name = libMyProject.dylib; path = libMyProject.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsIOSSharedLibTarget() - _TARGET_OS = "ios" - kind "SharedLib" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 2781AF7F7E0F19F156882DBF /* libMyProject.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; name = libMyProject.dylib; path = libMyProject.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsOSXBundleTarget() - kind "SharedLib" - sharedlibtype "OSXBundle" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 8AD066EE75BC8CE0BDA2552E /* MyProject.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = MyProject.bundle; path = MyProject.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsIOSOSXBundleTarget() - _TARGET_OS = "ios" - kind "SharedLib" - sharedlibtype "OSXBundle" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 8AD066EE75BC8CE0BDA2552E /* MyProject.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = MyProject.bundle; path = MyProject.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - function suite.PBXFileReference_ListsXCTestTarget() - kind "SharedLib" - sharedlibtype "XCTest" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - F573990FE05FBF012845874F /* MyProject.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = MyProject.xctest; path = MyProject.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - function suite.PBXFileReference_ListsIOSXCTestTarget() - _TARGET_OS = "ios" - kind "SharedLib" - sharedlibtype "XCTest" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - F573990FE05FBF012845874F /* MyProject.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = MyProject.xctest; path = MyProject.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - function suite.PBXFileReference_ListsOSXFrameworkTarget() - kind "SharedLib" - sharedlibtype "OSXFramework" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 2D914F2255CC07D43D679562 /* MyProject.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MyProject.framework; path = MyProject.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_ListsIOSOSXFrameworkTarget() - _TARGET_OS = "ios" - kind "SharedLib" - sharedlibtype "OSXFramework" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 2D914F2255CC07D43D679562 /* MyProject.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MyProject.framework; path = MyProject.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - - function suite.PBXFileReference_ListsSourceFiles() - files { "source.c" } - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - 7DC6D30C8137A53E02A4494C /* source.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = source.c; path = source.c; sourceTree = ""; }; - ]] - end - - function suite.PBXFileReference_ListsSourceFilesCompileAs() - files { "source.c", "objsource.c", "objsource.cpp" } - filter { "files:source.c" } - compileas "C++" - filter { "files:objsource.c" } - compileas "Objective-C" - filter { "files:objsource.cpp" } - compileas "Objective-C++" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - 7DC6D30C8137A53E02A4494C /* source.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = source.c; path = source.c; sourceTree = ""; }; - C8C6CC62F1018514D89D12A2 /* objsource.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; name = objsource.cpp; path = objsource.cpp; sourceTree = ""; }; - E4BF12E20AE5429471EC3922 /* objsource.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; name = objsource.c; path = objsource.c; sourceTree = ""; }; - ]] - end - - - function suite.PBXFileReference_ListsXibCorrectly() - files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib" } - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - 31594983623D4175755577C3 /* French */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = French; path = French.lproj/MainMenu.xib; sourceTree = ""; }; - 625C7BEB5C1E385D961D3A2B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - ]] - end - - - function suite.PBXFileReference_ListsStringsCorrectly() - files { "English.lproj/InfoPlist.strings", "French.lproj/InfoPlist.strings" } - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - A329C1B0714D1562F85B67F0 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - C3BECE4859358D7AC7D1E488 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/InfoPlist.strings; sourceTree = ""; }; - ]] - end - - - function suite.PBXFileReference_ListFrameworksCorrectly() - links { "Cocoa.framework/" } - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - 8D6BC6AA50D7885C8F7B2CEA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_leavesFrameworkLocationsAsIsWhenSupplied_pathIsSetToInput() - local inputFrameWork = 'somedir/Foo.framework' - links(inputFrameWork) - prepare() - - --io.capture() - xcode.PBXFileReference(tr) - --local str = io.captured() - --test.istrue(str:find('path = "'..inputFrameWork..'"')) - - --ms check - end - - - function suite.PBXFileReference_relativeFrameworkPathSupplied_callsError() - local inputFrameWork = '../somedir/Foo.framework' - links(inputFrameWork) - prepare() - -- ms no longer and error - -- valid case for linking relative frameworks - --local error_called = false - --local old_error = error - --error = function( ... )error_called = true end - xcode.PBXFileReference(tr) - --error = old_error - --test.istrue(error_called) - end - - function suite.PBXFileReference_ListsIconFiles() - files { "Icon.icns" } - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - 1A07B4D0BCF5DB824C1BBB10 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Icon.icns; path = Icon.icns; sourceTree = ""; }; - ]] - end - - function suite.PBXFileReference_IgnoresTargetDir() - targetdir "bin" - kind "WindowedApp" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - E5FB9875FD0E33A7ED2A2EB5 /* MyProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = MyProject.app; path = MyProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_UsesTargetSuffix() - targetsuffix "-d" - kind "SharedLib" - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 9E361150CDC7E042A8D51F90 /* libMyProject-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; name = "libMyProject-d.dylib"; path = "libMyProject-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - ]] - end - - - function suite.PBXFileReference_UsesFullPath_WhenParentIsVirtual() - files { "src/source.c" } - vpaths { ["Source Files"] = "**.c" } - prepare() - xcode.PBXFileReference(tr) - test.capture [[ -/* Begin PBXFileReference section */ - 19A5C4E61D1697189E833B26 /* MyProject */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = MyProject; path = MyProject; sourceTree = BUILT_PRODUCTS_DIR; }; - 721A4003892CDB357948D643 /* source.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = source.c; path = src/source.c; sourceTree = ""; }; - ]] - end - - ---------------------------------------------------------------------------- --- PBXFrameworksBuildPhase tests ---------------------------------------------------------------------------- - - function suite.PBXFrameworksBuildPhase_OnNoFiles() - prepare() - xcode.PBXFrameworksBuildPhase(tr) - test.capture [[ -/* Begin PBXFrameworksBuildPhase section */ - 9FDD37564328C0885DF98D96 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - ]] - end - - - function suite.PBXFrameworksBuild_ListsFrameworksCorrectly() - links { "Cocoa.framework" } - prepare() - xcode.PBXFrameworksBuildPhase(tr) - test.capture [[ -/* Begin PBXFrameworksBuildPhase section */ - 9FDD37564328C0885DF98D96 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F8E8DBA28B76A594F44F49E2 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXGroup tests ---------------------------------------------------------------------------- - - function suite.PBXGroup_OnNoFiles() - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - ]] - end - - - function suite.PBXGroup_OnSourceFiles() - files { "source.h" } - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - 5C62B7965FD389C8E1402DD6 /* source.h */, - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - ]] - end - - - function suite.PBXGroup_OnSourceSubdirs() - files { "include/premake/source.h" } - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - 5C62B7965FD389C8E1402DD6 /* source.h */, - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - ]] - end - - - function suite.PBXGroup_pathHasPlusPlus_PathIsQuoted() - files { "RequiresQuoting++/h.h" } - prepare() - xcode.PBXGroup(tr) - - local str = p.captured() - --test.istrue(str:find('path = "RequiresQuoting%+%+";')) - - end - - function suite.PBXGroup_SortsFiles() - files { "test.h", "source.h", "source.cpp" } - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - 9B47484CB259E37EA275DE8C /* source.cpp */, - 5C62B7965FD389C8E1402DD6 /* source.h */, - ABEF15744F3A9EA66A0B6BB4 /* test.h */, - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - ]] - end - - - function suite.PBXGroup_OnResourceFiles() - files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib", "Info.plist" } - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - ACC2AED4C3D54A06B3F14514 /* Info.plist */, - 6CB8FB6B191BBB9DD7A431AB /* MainMenu.xib */, - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - ]] - end - - - function suite.PBXGroup_OnFrameworks() - links { "Cocoa.framework" } - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - BBF76781A7E87333FA200DC1 /* Frameworks */, - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - A6C936B49B3FADE6EA134CF4 /* Products */ = { - isa = PBXGroup; - children = ( - 19A5C4E61D1697189E833B26 /* MyProject */, - ); - name = Products; - sourceTree = ""; - }; - BBF76781A7E87333FA200DC1 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8D6BC6AA50D7885C8F7B2CEA /* Cocoa.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - ]] - end - - - function suite.PBXGroup_OnVpaths() - files { "include/premake/source.h" } - vpaths { ["Headers"] = "**.h" } - prepare() - xcode.PBXGroup(tr) - test.capture [[ -/* Begin PBXGroup section */ - 12F5A37D963B00EFBF8281BD /* MyProject */ = { - isa = PBXGroup; - children = ( - 20D885C0C52B2372D7636C00 /* Headers */, - A6C936B49B3FADE6EA134CF4 /* Products */, - ); - name = MyProject; - sourceTree = ""; - }; - 20D885C0C52B2372D7636C00 /* Headers */ = { - isa = PBXGroup; - children = ( - E91A2DDD367D240FAC9C241D /* source.h */, - ); - name = Headers; - sourceTree = ""; - }; - ]] - end - - ---------------------------------------------------------------------------- --- PBXNativeTarget tests ---------------------------------------------------------------------------- - - function suite.PBXNativeTarget_OnConsoleApp() - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - 0FC4B7F6B3104128CDE10E36 /* Resources */, - 7971D14D1CBD5A7F378E278D /* Sources */, - 9FDD37564328C0885DF98D96 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productInstallPath = "$(HOME)/bin"; - productName = MyProject; - productReference = 19A5C4E61D1697189E833B26 /* MyProject */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - ]] - end - - - function suite.PBXNativeTarget_OnWindowedApp() - kind "WindowedApp" - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - D2C7B5BBD37AB2AD475C83FB /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8DCCE3C4913DB5F612AA5A04 /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - 0F791C0512E9EE3794569245 /* Resources */, - 7926355C7C97078EFE03AB9C /* Sources */, - 9F919B65A3026D97246F11A5 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productInstallPath = "$(HOME)/Applications"; - productName = MyProject; - productReference = E5FB9875FD0E33A7ED2A2EB5 /* MyProject.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - ]] - end - - - function suite.PBXNativeTarget_OnSharedLib() - kind "SharedLib" - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - CD0213851572F7B75A11C9C5 /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1F5D05CE18C307400C5E640E /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - A1093E0F9A6F3F818E0A9C4F /* Resources */, - 0AB65766041C58D8F7B7B5A6 /* Sources */, - 3121BD6F2A87BEE11E231BAF /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productName = MyProject; - productReference = 2781AF7F7E0F19F156882DBF /* libMyProject.dylib */; - productType = "com.apple.product-type.library.dynamic"; - }; -/* End PBXNativeTarget section */ - ]] - end - - - function suite.PBXNativeTarget_OnBuildCommands() - prebuildcommands { "prebuildcmd" } - prelinkcommands { "prelinkcmd" } - postbuildcommands { "postbuildcmd" } - files { "file.in" } - filter { "files:file.in" } - buildcommands { "buildcmd" } - buildoutputs { "file.out" } - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - 9607AE1010C857E500CD1376 /* Prebuild */, - C06220C983CDE27BC2718709 /* Build "file.in" */, - 0FC4B7F6B3104128CDE10E36 /* Resources */, - 7971D14D1CBD5A7F378E278D /* Sources */, - 9607AE3510C85E7E00CD1376 /* Prelink */, - 9FDD37564328C0885DF98D96 /* Frameworks */, - 9607AE3710C85E8F00CD1376 /* Postbuild */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productInstallPath = "$(HOME)/bin"; - productName = MyProject; - productReference = 19A5C4E61D1697189E833B26 /* MyProject */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - ]] - end - - - function suite.PBXNativeTarget_OnBuildCommandsFilesFilterDependency() - files { "file.1", "file.2", "file.3" } - filter { "files:file.1" } - buildcommands { "first" } - buildoutputs { "file.2" } - filter { "files:file.3" } - buildcommands { "last" } - buildoutputs { "file.4" } - filter { "files:file.2" } - buildcommands { "second" } - buildoutputs { "file.3" } - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - A50DBDBDC6D96AEF038E93FD /* Build "file.1" */, - 71E4A5FF93B05331D0657C3F /* Build "file.2" */, - 3EBB8E4160873B739D3C6481 /* Build "file.3" */, - 0FC4B7F6B3104128CDE10E36 /* Resources */, - 7971D14D1CBD5A7F378E278D /* Sources */, - 9FDD37564328C0885DF98D96 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productInstallPath = "$(HOME)/bin"; - productName = MyProject; - productReference = 19A5C4E61D1697189E833B26 /* MyProject */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - ]] - end - - - function suite.PBXNativeTarget_OnBuildCommandsBuildInputsDependency() - files { "file.1", "file.2", "file.3" } - filter { "files:file.1" } - buildcommands { "first" } - buildoutputs { "file.4" } - filter { "files:file.3" } - buildcommands { "last" } - buildinputs { "file.5" } - buildoutputs { "file.6" } - filter { "files:file.2" } - buildcommands { "second" } - buildinputs { "file.4" } - buildoutputs { "file.5" } - prepare() - xcode.PBXNativeTarget(tr) - test.capture [[ -/* Begin PBXNativeTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */; - buildPhases = ( - A50DBDBDC6D96AEF038E93FD /* Build "file.1" */, - 71E4A5FF93B05331D0657C3F /* Build "file.2" */, - 3EBB8E4160873B739D3C6481 /* Build "file.3" */, - 0FC4B7F6B3104128CDE10E36 /* Resources */, - 7971D14D1CBD5A7F378E278D /* Sources */, - 9FDD37564328C0885DF98D96 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productInstallPath = "$(HOME)/bin"; - productName = MyProject; - productReference = 19A5C4E61D1697189E833B26 /* MyProject */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXAggregateTarget tests ---------------------------------------------------------------------------- - - function suite.PBXAggregateTarget_OnUtility() - kind "Utility" - prepare() - xcode.PBXAggregateTarget(tr) - test.capture [[ -/* Begin PBXAggregateTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXAggregateTarget "MyProject" */; - buildPhases = ( - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productName = MyProject; - }; -/* End PBXAggregateTarget section */ - ]] - end - - - function suite.PBXAggregateTarget_OnBuildCommands() - kind "Utility" - prebuildcommands { "prebuildcmd" } - prelinkcommands { "prelinkcmd" } - postbuildcommands { "postbuildcmd" } - files { "file.in" } - filter { "files:file.in" } - buildcommands { "buildcmd" } - buildoutputs { "file.out" } - prepare() - xcode.PBXAggregateTarget(tr) - test.capture [[ -/* Begin PBXAggregateTarget section */ - 48B5980C775BEBFED09D464C /* MyProject */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXAggregateTarget "MyProject" */; - buildPhases = ( - 9607AE1010C857E500CD1376 /* Prebuild */, - C06220C983CDE27BC2718709 /* Build "file.in" */, - 9607AE3510C85E7E00CD1376 /* Prelink */, - 9607AE3710C85E8F00CD1376 /* Postbuild */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MyProject; - productName = MyProject; - }; -/* End PBXAggregateTarget section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXProject tests ---------------------------------------------------------------------------- - - function suite.PBXProject_OnProject() - prepare() - xcode.PBXProject(tr) - test.capture [[ -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */; - compatibilityVersion = "Xcode 3.2"; - hasScannedForEncodings = 1; - mainGroup = 12F5A37D963B00EFBF8281BD /* MyProject */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 48B5980C775BEBFED09D464C /* MyProject */, - ); - }; -/* End PBXProject section */ - ]] - end - - - function suite.PBXProject_OnSystemCapabilities() - xcodesystemcapabilities { - ["com.apple.InAppPurchase"] = "ON", - ["com.apple.iCloud"] = "ON", - ["com.apple.GameCenter.iOS"] = "OFF", - } - prepare() - xcode.PBXProject(tr) - test.capture [[ -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - attributes = { - TargetAttributes = { - 48B5980C775BEBFED09D464C = { - SystemCapabilities = { - com.apple.GameCenter.iOS = { - enabled = 0; - }; - com.apple.InAppPurchase = { - enabled = 1; - }; - com.apple.iCloud = { - enabled = 1; - }; - }; - }; - }; - }; - buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */; - compatibilityVersion = "Xcode 3.2"; - hasScannedForEncodings = 1; - mainGroup = 12F5A37D963B00EFBF8281BD /* MyProject */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 48B5980C775BEBFED09D464C /* MyProject */, - ); - }; -/* End PBXProject section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXResourceBuildPhase tests ---------------------------------------------------------------------------- - - function suite.PBXResourcesBuildPhase_OnNoResources() - prepare() - xcode.PBXResourcesBuildPhase(tr) - test.capture [[ -/* Begin PBXResourcesBuildPhase section */ - 0FC4B7F6B3104128CDE10E36 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - ]] - end - - - function suite.PBXResourcesBuildPhase_OnResources() - files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib", "Info.plist" } - prepare() - xcode.PBXResourcesBuildPhase(tr) - test.capture [[ -/* Begin PBXResourcesBuildPhase section */ - 0FC4B7F6B3104128CDE10E36 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6FE0F2A3E16C0B15906D30E3 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXShellScriptBuildPhase tests ---------------------------------------------------------------------------- - - function suite.PBXShellScriptBuildPhase_OnNoScripts() - prepare() - xcode.PBXShellScriptBuildPhase(tr) - test.capture [[ - ]] - end - - - function suite.PBXShellScriptBuildPhase_OnPrebuildScripts() - prebuildcommands { 'ls src', 'cp "a" "b"' } - prepare() - xcode.PBXShellScriptBuildPhase(tr) - test.capture [[ -/* Begin PBXShellScriptBuildPhase section */ - 9607AE1010C857E500CD1376 /* Prebuild */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Prebuild; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\nif [ \"${CONFIGURATION}\" = \"Debug\" ]; then\nls src\ncp \"a\" \"b\"\nfi\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\nls src\ncp \"a\" \"b\"\nfi"; - }; -/* End PBXShellScriptBuildPhase section */ - ]] - end - - - function suite.PBXShellScriptBuildPhase_OnBuildComandScripts() - files { "file.in1" } - filter { "files:file.in1" } - buildcommands { 'ls src', 'cp "a" "b"' } - buildinputs { "file.in2" } - buildoutputs { "file.out" } - prepare() - xcode.PBXShellScriptBuildPhase(tr) - test.capture [[ -/* Begin PBXShellScriptBuildPhase section */ - 9AE2196BE8450F9D5E640FAB /* Build "file.in1" */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "file.in1", - "file.in2", - ); - name = "Build \"file.in1\""; - outputPaths = ( - "file.out", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\nif [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n\tls src\n\tcp \"a\" \"b\"\nfi\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n\tls src\n\tcp \"a\" \"b\"\nfi"; - }; -/* End PBXShellScriptBuildPhase section */ - ]] - end - - - function suite.PBXShellScriptBuildPhase_OnPerConfigCmds() - prebuildcommands { 'ls src' } - configuration "Debug" - prebuildcommands { 'cp a b' } - prepare() - xcode.PBXShellScriptBuildPhase(tr) - test.capture [[ -/* Begin PBXShellScriptBuildPhase section */ - 9607AE1010C857E500CD1376 /* Prebuild */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Prebuild; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\nif [ \"${CONFIGURATION}\" = \"Debug\" ]; then\nls src\ncp a b\nfi\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\nls src\nfi"; - }; -/* End PBXShellScriptBuildPhase section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXSourcesBuildPhase tests ---------------------------------------------------------------------------- - - function suite.PBXSourcesBuildPhase_OnNoSources() - prepare() - xcode.PBXSourcesBuildPhase(tr) - test.capture [[ -/* Begin PBXSourcesBuildPhase section */ - 7971D14D1CBD5A7F378E278D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - ]] - end - - - function suite.PBXSourcesBuildPhase_OnSources() - files { "hello.cpp", "goodbye.cpp" } - prepare() - xcode.PBXSourcesBuildPhase(tr) - test.capture [[ -/* Begin PBXSourcesBuildPhase section */ - 7971D14D1CBD5A7F378E278D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D7426C94082664861B3E9AD4 /* goodbye.cpp in Sources */, - EF69EEEA1EFBBDDCFA08FD2A /* hello.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - ]] - end - - ---------------------------------------------------------------------------- --- PBXVariantGroup tests ---------------------------------------------------------------------------- - - function suite.PBXVariantGroup_OnNoGroups() - prepare() - xcode.PBXVariantGroup(tr) - test.capture [[ -/* Begin PBXVariantGroup section */ -/* End PBXVariantGroup section */ - ]] - end - - - function suite.PBXVariantGroup_OnNoResourceGroups() - files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib" } - prepare() - xcode.PBXVariantGroup(tr) - test.capture [[ -/* Begin PBXVariantGroup section */ - 6CB8FB6B191BBB9DD7A431AB /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 625C7BEB5C1E385D961D3A2B /* English */, - 31594983623D4175755577C3 /* French */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - ]] - end - - ---------------------------------------------------------------------------- --- XCBuildConfiguration_Target tests ---------------------------------------------------------------------------- - - function suite.XCBuildConfigurationTarget_OnConsoleApp() - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnConsoleApp_dwarf() - debugformat "Dwarf" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnConsoleApp_split_dwarf() - debugformat "SplitDwarf" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnConsoleApp_default() - debugformat "Default" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnWindowedApp() - kind "WindowedApp" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - F1C0BE8A138C6BBC504194CA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "\"$(HOME)/Applications\""; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnStaticLib() - kind "StaticLib" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 92D99EC1EE1AF233C1753D01 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnSharedLib() - kind "SharedLib" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 144A3F940E0BFC06480AFDD4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnOSXBundle() - kind "SharedLib" - sharedlibtype "OSXBundle" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 5C54F6038D38EDF5A0512443 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnXCTest() - kind "SharedLib" - sharedlibtype "XCTest" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 0C14B9243CF8B1165010E764 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnOSXFramework() - kind "SharedLib" - sharedlibtype "OSXFramework" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 2EC4D23760BE1CE9DA9D5877 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnTargetPrefix() - kind "SharedLib" - targetprefix "xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 33365BC82CF8183A66F71A08 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_PREFIX = xyz; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnConsoleAppTargetExtension() - kind "ConsoleApp" - targetextension ".xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 4FD8665471A41386AE593C94 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject.xyz; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnConsoleAppNoTargetExtension() - kind "ConsoleApp" - targetextension "" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnSharedLibTargetExtension() - kind "SharedLib" - targetextension ".xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 8FB8842BC09C7C1DD3B4B26B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_EXTENSION = xyz; - EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnSharedLibNoTargetExtension() - kind "SharedLib" - targetextension "" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 5E2996528DBB654468C8A492 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_EXTENSION = ""; - EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnStaticLibTargetExtension() - kind "StaticLib" - targetextension ".xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 8FB8842BC09C7C1DD3B4B26B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_EXTENSION = xyz; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnStaticLibNoTargetExtension() - kind "StaticLib" - targetextension "" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 5E2996528DBB654468C8A492 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EXECUTABLE_EXTENSION = ""; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnWindowedAppTargetExtension() - kind "WindowedApp" - targetextension ".xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 4FD8665471A41386AE593C94 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "\"$(HOME)/Applications\""; - PRODUCT_NAME = MyProject; - WRAPPER_EXTENSION = xyz; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnWindowedAppNoTargetExtension() - kind "WindowedApp" - targetextension "" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "\"$(HOME)/Applications\""; - PRODUCT_NAME = MyProject; - WRAPPER_EXTENSION = ""; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnOSXBundleTargetExtension() - kind "SharedLib" - sharedlibtype "OSXBundle" - targetextension ".xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 4FD8665471A41386AE593C94 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_NAME = MyProject; - WRAPPER_EXTENSION = xyz; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnOSXBundleNoTargetExtension() - kind "SharedLib" - sharedlibtype "OSXBundle" - targetextension "" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_NAME = MyProject; - WRAPPER_EXTENSION = ""; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnOSXFrameworkTargetExtension() - kind "SharedLib" - sharedlibtype "OSXFramework" - targetextension ".xyz" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 4FD8665471A41386AE593C94 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - PRODUCT_NAME = MyProject; - WRAPPER_EXTENSION = xyz; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnOSXFrameworkNoTargetExtension() - kind "SharedLib" - sharedlibtype "OSXFramework" - targetextension "" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - PRODUCT_NAME = MyProject; - WRAPPER_EXTENSION = ""; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnOSXMinVersion() - _TARGET_OS = "macosx" - systemversion "10.11" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - MACOSX_DEPLOYMENT_TARGET = 10.11; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnOSXUnSpecificedVersion() - _TARGET_OS = "macosx" - -- systemversion "10.11" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnInfoPlist() - files { "./a/b/c/MyProject-Info.plist" } - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INFOPLIST_FILE = "a/b/c/MyProject-Info.plist"; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnSymbols() - symbols "On" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnTargetSuffix() - targetsuffix "-d" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - 46BCF44C6EF7ACFE56933A8C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = "MyProject-d"; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnSinglePlatform() - platforms { "Universal32" } - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Universal32/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationTarget_OnMultiplePlatforms() - workspace("MyWorkspace") - platforms { "Universal32", "Universal64" } - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CONFIGURATION_BUILD_DIR = bin/Universal32/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnIOS() - _TARGET_OS = "ios" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - SDKROOT = iphoneos; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnIOSMinVersion() - _TARGET_OS = "ios" - systemversion "8.3" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - PRODUCT_NAME = MyProject; - SDKROOT = iphoneos; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnIOSMinMaxVersion() - _TARGET_OS = "ios" - systemversion "8.3:9.1" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - PRODUCT_NAME = MyProject; - SDKROOT = iphoneos; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnIOSCodeSigningIdentity() - _TARGET_OS = "ios" - xcodecodesigningidentity "Premake Developers" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Premake Developers"; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - SDKROOT = iphoneos; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationTarget_OnIOSFamily() - _TARGET_OS = "ios" - iosfamily "Universal" - prepare() - xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1]) - test.capture [[ - FDC4CBFB4635B02D8AD4823B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CONFIGURATION_BUILD_DIR = bin/Debug; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_DYNAMIC_NO_PIC = NO; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = MyProject; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - ]] - end - - ---------------------------------------------------------------------------- --- XCBuildConfiguration_Project tests ---------------------------------------------------------------------------- - - function suite.XCBuildConfigurationProject_OnConsoleApp() - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnOptimizeSize() - optimize "Size" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = s; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnOptimizeSpeed() - optimize "Speed" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnStaticRuntime() - flags { "StaticRuntime" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnTargetDir() - targetdir "bin" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnDefines() - defines { "_DEBUG", "DEBUG" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - _DEBUG, - DEBUG, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnIncludeDirs() - includedirs { "../include", "../libs", "../name with spaces" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - USER_HEADER_SEARCH_PATHS = ( - ../include, - ../libs, - "\"../name with spaces\"", - ); - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnSysIncludeDirs() - sysincludedirs { "../include", "../libs", "../name with spaces" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../include, - ../libs, - "\"../name with spaces\"", - "$(inherited)", - ); - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnBuildOptions() - buildoptions { "build option 1", "build option 2" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "build option 1", - "build option 2", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnLinks() - links { "Cocoa.framework", "ldap" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_LDFLAGS = ( - "-lldap", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnLinkOptions() - linkoptions { "link option 1", "link option 2" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_LDFLAGS = ( - "link option 1", - "link option 2", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnExtraWarnings() - warnings "Extra" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - WARNING_CFLAGS = "-Wall -Wextra"; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnFatalWarnings() - flags { "FatalWarnings" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnFloatFast() - flags { "FloatFast" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "-ffast-math", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnFloatStrict() - floatingpoint "Strict" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNoEditAndContinue() - editandcontinue "Off" - symbols "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - COPY_PHASE_STRIP = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = YES; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNoExceptions() - exceptionhandling "Off" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_ENABLE_CPP_EXCEPTIONS = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNoFramePointer() - flags { "NoFramePointer" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "-fomit-frame-pointer", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnOmitFramePointer() - omitframepointer "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "-fomit-frame-pointer", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNoOmitFramePointer() - omitframepointer "Off" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "-fno-omit-frame-pointer", - ); - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNoPCH() - pchheader "MyProject_Prefix.pch" - flags { "NoPCH" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNoRTTI() - rtti "Off" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_ENABLE_CPP_RTTI = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnSymbols() - symbols "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - COPY_PHASE_STRIP = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = YES; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnLibDirs() - libdirs { "mylibs1", "mylibs2" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LIBRARY_SEARCH_PATHS = ( - mylibs1, - mylibs2, - ); - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnPCH() - pchheader "MyProject_Prefix.pch" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = MyProject_Prefix.pch; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnUniversal() - workspace("MyWorkspace") - platforms { "Universal" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Universal/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Universal/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnUniversal32() - workspace("MyWorkspace") - platforms { "Universal32" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Universal32/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Universal32/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnUniversal64() - workspace("MyWorkspace") - platforms { "Universal64" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Universal64/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Universal64/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnNative() - workspace("MyWorkspace") - platforms { "Native" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Native/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Native/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnX86() - workspace("MyWorkspace") - platforms { "x86" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = i386; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/x86/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/x86/Debug; - }; - name = Debug; - }; - ]] - end - - - function suite.XCBuildConfigurationProject_OnX86_64() - workspace("MyWorkspace") - platforms { "x86_64" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = x86_64; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/x86_64/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/x86_64/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnMultiplePlatforms() - workspace("MyWorkspace") - platforms { "Universal32", "Universal64" } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Universal32/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Universal32/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCDefault() - workspace("MyWorkspace") - cdialect("Default") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnC89() - workspace("MyWorkspace") - cdialect("C89") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = c89; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnC90() - workspace("MyWorkspace") - cdialect("C90") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = c90; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnC99() - workspace("MyWorkspace") - cdialect("C99") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnC11() - workspace("MyWorkspace") - cdialect("C11") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = c11; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnGnu89() - workspace("MyWorkspace") - cdialect("gnu89") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = gnu89; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnGnu90() - workspace("MyWorkspace") - cdialect("gnu90") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = gnu90; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnGnu99() - workspace("MyWorkspace") - cdialect("gnu99") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnGnu11() - workspace("MyWorkspace") - cdialect("gnu11") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCppDefault() - workspace("MyWorkspace") - cppdialect("Default") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCpp98() - workspace("MyWorkspace") - cppdialect("C++98") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++98"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCpp11() - workspace("MyWorkspace") - cppdialect("C++11") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++11"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCpp14() - workspace("MyWorkspace") - cppdialect("C++14") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++14"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCpp17() - workspace("MyWorkspace") - cppdialect("C++17") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "c++1z"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCppGnu98() - workspace("MyWorkspace") - cppdialect("gnu++98") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++98"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCppGnu11() - workspace("MyWorkspace") - cppdialect("gnu++11") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCppGnu14() - workspace("MyWorkspace") - cppdialect("gnu++14") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnCppGnu17() - workspace("MyWorkspace") - cppdialect("gnu++17") - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++1z"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnUnsignedCharOn() - workspace("MyWorkspace") - unsignedchar "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_CHAR_IS_UNSIGNED_CHAR = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnUnsignedCharOff() - workspace("MyWorkspace") - unsignedchar "Off" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_CHAR_IS_UNSIGNED_CHAR = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - function suite.XCBuildConfigurationProject_OnRemoveXcodebuildSettings() - xcodebuildsettings { - ARCHS = false - } - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - test.capture [[ - A14350AC4595EE5E57CE36EC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; - CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OBJROOT = obj/Debug; - ONLY_ACTIVE_ARCH = NO; - SYMROOT = bin/Debug; - }; - name = Debug; - }; - ]] - end - - ---------------------------------------------------------------------------- --- XCBuildConfigurationList tests ---------------------------------------------------------------------------- - - function suite.XCBuildConfigurationList_OnNoPlatforms() - prepare() - xcode.XCBuildConfigurationList(tr) - test.capture [[ -/* Begin XCConfigurationList section */ - 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A14350AC4595EE5E57CE36EC /* Debug */, - F3C205E6F732D818789F7C26 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC4CBFB4635B02D8AD4823B /* Debug */, - C8EAD1B5F1258A67D8C117F5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - ]] - end - - - function suite.XCBuildConfigurationList_OnSinglePlatforms() - platforms { "Universal32" } - prepare() - xcode.XCBuildConfigurationList(tr) - test.capture [[ -/* Begin XCConfigurationList section */ - 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A14350AC4595EE5E57CE36EC /* Debug */, - F3C205E6F732D818789F7C26 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC4CBFB4635B02D8AD4823B /* Debug */, - C8EAD1B5F1258A67D8C117F5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - ]] - end - - - function suite.XCBuildConfigurationList_OnMultiplePlatforms() - workspace("MyWorkspace") - platforms { "Universal32", "Universal64" } - prepare() - xcode.XCBuildConfigurationList(tr) - test.capture [[ -/* Begin XCConfigurationList section */ - 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A14350AC4595EE5E57CE36EC /* Debug */, - A14350AC4595EE5E57CE36EC /* Debug */, - F3C205E6F732D818789F7C26 /* Release */, - F3C205E6F732D818789F7C26 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 8E187FB5316408E74C34D5F5 /* Build configuration list for PBXNativeTarget "MyProject" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC4CBFB4635B02D8AD4823B /* Debug */, - FDC4CBFB4635B02D8AD4823B /* Debug */, - C8EAD1B5F1258A67D8C117F5 /* Release */, - C8EAD1B5F1258A67D8C117F5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - ]] - end - -function suite.defaultVisibility_settingIsFound() - prepare() - xcode.XCBuildConfiguration(tr) - local str = p.captured() - test.istrue(str:find('GCC_SYMBOLS_PRIVATE_EXTERN')) -end - - -function suite.defaultVisibilitySetting_setToNo() - prepare() - xcode.XCBuildConfiguration(tr) - local str = p.captured() - test.istrue(str:find('GCC_SYMBOLS_PRIVATE_EXTERN = NO;')) -end - -function suite.releaseBuild_onlyDefaultArch_equalsNo() - optimize "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[2]) - local str = p.captured() - test.istrue(str:find('ONLY_ACTIVE_ARCH = NO;')) -end - -function suite.debugBuild_onlyDefaultArch_equalsYes() - symbols "On" - prepare() - xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) - - local str = p.captured() - test.istrue(str:find('ONLY_ACTIVE_ARCH = YES;')) -end diff --git a/build/premake/premake5/modules/xcode/xcode.lua b/build/premake/premake5/modules/xcode/xcode.lua deleted file mode 100644 index a10454b6ae..0000000000 --- a/build/premake/premake5/modules/xcode/xcode.lua +++ /dev/null @@ -1,19 +0,0 @@ ---- --- xcode/xcode.lua --- Common support code for the Apple Xcode exporters. --- Copyright (c) 2009-2015 Jason Perkins and the Premake project ---- - - local p = premake - - p.modules.xcode = {} - - local m = p.modules.xcode - m._VERSION = p._VERSION - m.elements = {} - - include("xcode_common.lua") - include("xcode4_workspace.lua") - include("xcode_project.lua") - - return m diff --git a/build/premake/premake5/modules/xcode/xcode4_workspace.lua b/build/premake/premake5/modules/xcode/xcode4_workspace.lua deleted file mode 100644 index 496403d2fc..0000000000 --- a/build/premake/premake5/modules/xcode/xcode4_workspace.lua +++ /dev/null @@ -1,133 +0,0 @@ ---- --- xcode/xcode4_workspace.lua --- Generate an Xcode workspace. --- Author Mihai Sebea --- Modified by Jason Perkins --- Copyright (c) 2014-2015 Jason Perkins and the Premake project ---- - - local p = premake - local m = p.modules.xcode - local tree = p.tree - - ---- --- Generate an Xcode contents.xcworkspacedata file. ---- - - m.elements.workspace = function(wks) - return { - m.xmlDeclaration, - m.workspace, - m.reorderProjects, - m.workspaceFileRefs, - m.workspaceTail, - } - end - - function m.generateWorkspace(wks) - m.prepareWorkspace(wks) - p.callArray(m.elements.workspace, wks) - end - - - function m.workspace() - p.push('') - end - - - function m.workspaceTail() - -- Don't output final newline. Xcode doesn't. - p.out('') - end - - --- --- If a startup project is specified, move it (and any enclosing groups) --- to the front of the project list. This will make Visual Studio treat --- it like a startup project. --- --- I force the new ordering into the tree so that it will get applied to --- all sections of the solution; otherwise the first change to the solution --- in the IDE will cause the orderings to get rewritten. --- - - function m.reorderProjects(wks) - if wks.startproject then - local np - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - if n.project.name == wks.startproject then - np = n - end - end - }) - - while np and np.parent do - local p = np.parent - local i = table.indexof(p.children, np) - table.remove(p.children, i) - table.insert(p.children, 1, np) - np = p - end - end - end - - ---- --- Generate the list of project references. ---- - - m.elements.workspaceFileRef = function(prj) - return { - m.workspaceLocation, - } - end - - function m.workspaceFileRefs(wks) - local tr = p.workspace.grouptree(wks) - tree.traverse(tr, { - onleaf = function(n) - local prj = n.project - - p.push('") - p.pop('') - end, - - onbranchenter = function(n) - local prj = n.project - - p.push('', n.name) - end, - - onbranchexit = function(n) - p.pop('') - end, - }) - end - ---------------------------------------------------------------------------- --- --- Handlers for individual project elements --- ---------------------------------------------------------------------------- - - - function m.workspaceLocation(prj) - local fname = p.filename(prj, ".xcodeproj") - fname = path.getrelative(prj.workspace.location, fname) - p.w('location = "group:%s"', fname) - end - - - function m.xmlDeclaration() - p.xmlUtf8(true) - end diff --git a/build/premake/premake5/modules/xcode/xcode_common.lua b/build/premake/premake5/modules/xcode/xcode_common.lua deleted file mode 100644 index 9081fdc02e..0000000000 --- a/build/premake/premake5/modules/xcode/xcode_common.lua +++ /dev/null @@ -1,1527 +0,0 @@ --- --- xcode_common.lua --- Functions to generate the different sections of an Xcode project. --- Copyright (c) 2009-2015 Jason Perkins and the Premake project --- - - local p = premake - local xcode = p.modules.xcode - local tree = p.tree - local workspace = p.workspace - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - - --- --- Return the Xcode build category for a given file, based on the file extension. --- --- @param node --- The node to identify. --- @returns --- An Xcode build category, one of "Sources", "Resources", "Frameworks", or nil. --- - - function xcode.getbuildcategory(node) - local categories = { - [".a"] = "Frameworks", - [".c"] = "Sources", - [".cc"] = "Sources", - [".cpp"] = "Sources", - [".cxx"] = "Sources", - [".c++"] = "Sources", - [".dylib"] = "Frameworks", - [".framework"] = "Frameworks", - [".m"] = "Sources", - [".mm"] = "Sources", - [".strings"] = "Resources", - [".nib"] = "Resources", - [".xib"] = "Resources", - [".storyboard"] = "Resources", - [".icns"] = "Resources", - [".s"] = "Sources", - [".S"] = "Sources", - } - if node.isResource then - return "Resources" - end - return categories[path.getextension(node.name)] - end - - function xcode.isItemResource(project, node) - local res - - if project and project.xcodebuildresources then - if type(project.xcodebuildresources) == "table" then - res = project.xcodebuildresources - end - end - - local function checkItemInList(item, list) - if item then - for _,v in pairs(list) do - if string.find(item, path.wildcards(v)) then - return true - end - end - end - return false - end - - if (checkItemInList(node.path, res)) then - return true - end - - return false - end - --- --- Return 'explicitFileType' if the given file is being set with 'compileas' --- - - function xcode.getfiletypekey(node, cfg) - if node.configs then - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg and filecfg["compileas"] then - return "explicitFileType" - end - end - return "lastKnownFileType" - end --- --- Return the Xcode type for a given file, based on the file extension. --- --- @param fname --- The file name to identify. --- @returns --- An Xcode file type, string. --- - - function xcode.getfiletype(node, cfg) - - if node.configs then - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg then - if p.languages.isc(filecfg.compileas) then - return "sourcecode.c.c" - elseif p.languages.iscpp(filecfg.compileas) then - return "sourcecode.cpp.cpp" - elseif filecfg.compileas == p.OBJECTIVEC then - return "sourcecode.c.objc" - elseif filecfg.compileas == p.OBJECTIVECPP then - return "sourcecode.cpp.objcpp" - end - end - end - - local types = { - [".c"] = "sourcecode.c.c", - [".cc"] = "sourcecode.cpp.cpp", - [".cpp"] = "sourcecode.cpp.cpp", - [".css"] = "text.css", - [".cxx"] = "sourcecode.cpp.cpp", - [".c++"] = "sourcecode.cpp.cpp", - [".S"] = "sourcecode.asm.asm", - [".framework"] = "wrapper.framework", - [".gif"] = "image.gif", - [".h"] = "sourcecode.c.h", - [".html"] = "text.html", - [".lua"] = "sourcecode.lua", - [".m"] = "sourcecode.c.objc", - [".mm"] = "sourcecode.cpp.objc", - [".nib"] = "wrapper.nib", - [".storyboard"] = "file.storyboard", - [".pch"] = "sourcecode.c.h", - [".plist"] = "text.plist.xml", - [".strings"] = "text.plist.strings", - [".xib"] = "file.xib", - [".icns"] = "image.icns", - [".s"] = "sourcecode.asm", - [".bmp"] = "image.bmp", - [".wav"] = "audio.wav", - [".xcassets"] = "folder.assetcatalog", - - } - return types[path.getextension(node.path)] or "text" - end - --- --- Print user configuration references contained in xcodeconfigreferences --- @param offset --- offset used by function _p --- @param cfg --- configuration --- - - local function xcodePrintUserConfigReferences(offset, cfg, tr, kind) - local referenceName - if kind == "project" then - referenceName = cfg.xcodeconfigreferenceproject - elseif kind == "target" then - referenceName = cfg.xcodeconfigreferencetarget - end - tree.traverse(tr, { - onleaf = function(node) - filename = node.name - if node.id and path.getextension(filename) == ".xcconfig" then - if filename == referenceName then - _p(offset, 'baseConfigurationReference = %s /* %s */;', node.id, filename) - return - end - end - end - }, false) - end - - - - local escapeSpecialChars = { - ['\n'] = '\\n', - ['\r'] = '\\r', - ['\t'] = '\\t', - } - - local function escapeChar(c) - return escapeSpecialChars[c] or '\\'..c - end - - local function escapeArg(value) - value = value:gsub('[\'"\\\n\r\t ]', escapeChar) - return value - end - - local function escapeSetting(value) - value = value:gsub('["\\\n\r\t]', escapeChar) - return value - end - - local function stringifySetting(value) - value = value..'' - if not value:match('^[%a%d_./]+$') then - value = '"'..escapeSetting(value)..'"' - end - return value - end - - local function customStringifySetting(value) - value = value..'' - - local test = value:match('^[%a%d_./%+]+$') - if test then - value = '"'..escapeSetting(value)..'"' - end - return value - end - - local function printSetting(level, name, value) - if type(value) == 'function' then - value(level, name) - elseif type(value) ~= 'table' then - _p(level, '%s = %s;', stringifySetting(name), stringifySetting(value)) - --elseif #value == 1 then - --_p(level, '%s = %s;', stringifySetting(name), stringifySetting(value[1])) - elseif #value >= 1 then - _p(level, '%s = (', stringifySetting(name)) - for _, item in ipairs(value) do - _p(level + 1, '%s,', stringifySetting(item)) - end - _p(level, ');') - end - end - - local function printSettingsTable(level, settings) - -- Maintain alphabetic order to be consistent - local keys = table.keys(settings) - table.sort(keys) - for _, k in ipairs(keys) do - printSetting(level, k, settings[k]) - end - end - - local function overrideSettings(settings, overrides) - if type(overrides) == 'table' then - for name, value in pairs(overrides) do - -- Allow an override to remove a value by using false - settings[name] = iif(not table.equals(value, { false }), value, nil) - end - end - end - --- --- Return the Xcode product type, based target kind. --- --- @param node --- The product node to identify. --- @returns --- An Xcode product type, string. --- - - function xcode.getproducttype(node) - local types = { - ConsoleApp = "com.apple.product-type.tool", - WindowedApp = "com.apple.product-type.application", - StaticLib = "com.apple.product-type.library.static", - SharedLib = "com.apple.product-type.library.dynamic", - OSXBundle = "com.apple.product-type.bundle", - OSXFramework = "com.apple.product-type.framework", - XCTest = "com.apple.product-type.bundle.unit-test", - } - return types[iif(node.cfg.kind == "SharedLib" and node.cfg.sharedlibtype, node.cfg.sharedlibtype, node.cfg.kind)] - end - - --- --- Return the Xcode target type, based on the target file extension. --- --- @param node --- The product node to identify. --- @returns --- An Xcode target type, string. --- - - function xcode.gettargettype(node) - local types = { - ConsoleApp = "\"compiled.mach-o.executable\"", - WindowedApp = "wrapper.application", - StaticLib = "archive.ar", - SharedLib = "\"compiled.mach-o.dylib\"", - OSXBundle = "wrapper.cfbundle", - OSXFramework = "wrapper.framework", - XCTest = "wrapper.cfbundle", - } - return types[iif(node.cfg.kind == "SharedLib" and node.cfg.sharedlibtype, node.cfg.sharedlibtype, node.cfg.kind)] - end - --- --- Return the Xcode debug information format for the current configuration --- --- @param cfg --- The current configuration --- @returns --- The corresponding value of DEBUG_INFORMATION_FORMAT, or 'dwarf-with-dsym' if invalid --- - - function xcode.getdebugformat(cfg) - local formats = { - ["Dwarf"] = "dwarf", - ["Default"] = "dwarf-with-dsym", - ["SplitDwarf"] = "dwarf-with-dsym", - } - local rval = "dwarf-with-dsym" - if cfg.debugformat then - rval = formats[cfg.debugformat] or rval - end - return rval - end - --- --- Return a unique file name for a project. Since Xcode uses .xcodeproj's to --- represent both workspaces and projects there is a likely change of a name --- collision. Tack on a number to differentiate them. --- --- @param prj --- The project being queried. --- @returns --- A uniqued file name --- - - function xcode.getxcodeprojname(prj) - -- if there is a workspace with matching name, then use "projectname1.xcodeproj" - -- just get something working for now - local fname = p.filename(prj, ".xcodeproj") - return fname - end - - --- --- Returns true if the file name represents a framework. --- --- @param fname --- The name of the file to test. --- - - function xcode.isframework(fname) - return (path.getextension(fname) == ".framework") - end - - --- --- Retrieves a unique 12 byte ID for an object. --- This function accepts an array of parameters that will be used to generate the id. --- --- @returns --- A 24-character string representing the 12 byte ID. --- - - function xcode.newid(...) - local name = '' - local arg = {...} - for i, v in pairs(arg) do - name = name..v..'****' - end - - - return ("%08X%08X%08X"):format(name:hash(16777619), name:hash(2166136261), name:hash(46577619)) - end - - --- --- Create a product tree node and all projects in a workspace; assigning IDs --- that are needed for inter-project dependencies. --- --- @param wks --- The workspace to prepare. --- - - function xcode.prepareWorkspace(wks) - -- create and cache a list of supported platforms - wks.xcode = { } - - for prj in p.workspace.eachproject(wks) do - -- need a configuration to get the target information - local cfg = project.getconfig(prj, prj.configurations[1], prj.platforms[1]) - - -- build the product tree node - local bundlepath = cfg.buildtarget.bundlename ~= "" and cfg.buildtarget.bundlename or cfg.buildtarget.name; - if (prj.external) then - bundlepath = cfg.project.name - end - - local node = p.tree.new(path.getname(bundlepath)) - - node.cfg = cfg - node.id = xcode.newid(node.name, "product") - node.targetid = xcode.newid(node.name, "target") - - -- attach it to the project - prj.xcode = {} - prj.xcode.projectnode = node - end - end - - ---------------------------------------------------------------------------- --- Section generator functions, in the same order in which they appear --- in the .pbxproj file ---------------------------------------------------------------------------- - - function xcode.PBXBuildFile(tr) - local settings = {}; - tree.traverse(tr, { - onnode = function(node) - if node.buildid then - settings[node.buildid] = function(level) - _p(level,'%s /* %s in %s */ = {isa = PBXBuildFile; fileRef = %s /* %s */; };', - node.buildid, node.name, xcode.getbuildcategory(node), node.id, node.name) - end - end - end - }) - - if not table.isempty(settings) then - _p('/* Begin PBXBuildFile section */') - printSettingsTable(2, settings); - _p('/* End PBXBuildFile section */') - _p('') - end - end - - - function xcode.PBXContainerItemProxy(tr) - local settings = {} - for _, node in ipairs(tr.projects.children) do - settings[node.productproxyid] = function() - _p(2,'%s /* PBXContainerItemProxy */ = {', node.productproxyid) - _p(3,'isa = PBXContainerItemProxy;') - _p(3,'containerPortal = %s /* %s */;', node.id, path.getrelative(node.parent.parent.project.location, node.path)) - _p(3,'proxyType = 2;') - _p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.id) - _p(3,'remoteInfo = %s;', stringifySetting(node.project.xcode.projectnode.name)) - _p(2,'};') - end - settings[node.targetproxyid] = function() - _p(2,'%s /* PBXContainerItemProxy */ = {', node.targetproxyid) - _p(3,'isa = PBXContainerItemProxy;') - _p(3,'containerPortal = %s /* %s */;', node.id, path.getrelative(node.parent.parent.project.location, node.path)) - _p(3,'proxyType = 1;') - _p(3,'remoteGlobalIDString = %s;', node.project.xcode.projectnode.targetid) - _p(3,'remoteInfo = %s;', stringifySetting(node.project.xcode.projectnode.name)) - _p(2,'};') - end - end - - if not table.isempty(settings) then - _p('/* Begin PBXContainerItemProxy section */') - printSettingsTable(2, settings); - _p('/* End PBXContainerItemProxy section */') - _p('') - end - end - - - function xcode.PBXFileReference(tr) - local cfg = project.getfirstconfig(tr.project) - local settings = {} - - tree.traverse(tr, { - onleaf = function(node) - -- I'm only listing files here, so ignore anything without a path - if not node.path then - return - end - - -- is this the product node, describing the output target? - if node.kind == "product" then - settings[node.id] = function(level) - _p(level,'%s /* %s */ = {isa = PBXFileReference; explicitFileType = %s; includeInIndex = 0; name = %s; path = %s; sourceTree = BUILT_PRODUCTS_DIR; };', - node.id, node.name, xcode.gettargettype(node), stringifySetting(node.name), stringifySetting(path.getname(node.cfg.buildtarget.bundlename ~= "" and node.cfg.buildtarget.bundlename or node.cfg.buildtarget.relpath))) - end - -- is this a project dependency? - elseif node.parent.parent == tr.projects then - settings[node.parent.id] = function(level) - -- ms Is there something wrong with path is relative ? - -- if we have a and b without slashes get relative should assume the same parent folder and return ../ - -- this works if we put it like below - local relpath = path.getrelative(path.getabsolute(tr.project.location), path.getabsolute(node.parent.project.location)) - _p(level,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = %s; path = %s; sourceTree = SOURCE_ROOT; };', - node.parent.id, node.name, customStringifySetting(node.parent.name), stringifySetting(path.join(relpath, node.parent.name))) - end - -- something else - else - settings[node.id] = function(level) - local pth, src - if xcode.isframework(node.path) then - --respect user supplied paths - -- look for special variable-starting paths for different sources - local nodePath = node.path - local _, matchEnd, variable = string.find(nodePath, "^%$%((.+)%)/") - if variable then - -- by skipping the last '/' we support the same absolute/relative - -- paths as before - nodePath = string.sub(nodePath, matchEnd + 1) - end - if string.find(nodePath,'/') then - if string.find(nodePath,'^%.')then - --error('relative paths are not currently supported for frameworks') - pth = path.getrelative(tr.project.location, node.path) - --print(tr.project.location, node.path , pth) - src = "SOURCE_ROOT" - variable = src - else - pth = nodePath - src = "" - end - end - -- if it starts with a variable, use that as the src instead - if variable then - src = variable - -- if we are using a different source tree, it has to be relative - -- to that source tree, so get rid of any leading '/' - if string.find(pth, '^/') then - pth = string.sub(pth, 2) - end - else - pth = "System/Library/Frameworks/" .. node.path - src = "SDKROOT" - end - else - -- something else; probably a source code file - src = "" - - if node.abspath then - pth = path.getrelative(tr.project.location, node.abspath) - else - pth = node.path - end - --end - end - _p(level,'%s /* %s */ = {isa = PBXFileReference; %s = %s; name = %s; path = %s; sourceTree = %s; };', - node.id, node.name, xcode.getfiletypekey(node, cfg), xcode.getfiletype(node, cfg), stringifySetting(node.name), stringifySetting(pth), stringifySetting(src)) - end - end - end - }) - - if not table.isempty(settings) then - _p('/* Begin PBXFileReference section */') - printSettingsTable(2, settings) - _p('/* End PBXFileReference section */') - _p('') - end - end - - - function xcode.PBXFrameworksBuildPhase(tr) - _p('/* Begin PBXFrameworksBuildPhase section */') - _p(2,'%s /* Frameworks */ = {', tr.products.children[1].fxstageid) - _p(3,'isa = PBXFrameworksBuildPhase;') - _p(3,'buildActionMask = 2147483647;') - _p(3,'files = (') - - -- write out library dependencies - tree.traverse(tr.frameworks, { - onleaf = function(node) - if node.buildid then - _p(4,'%s /* %s in Frameworks */,', node.buildid, node.name) - end - end - }) - - -- write out project dependencies - tree.traverse(tr.projects, { - onleaf = function(node) - if node.buildid then - _p(4,'%s /* %s in Frameworks */,', node.buildid, node.name) - end - end - }) - - _p(3,');') - _p(3,'runOnlyForDeploymentPostprocessing = 0;') - _p(2,'};') - _p('/* End PBXFrameworksBuildPhase section */') - _p('') - end - - - function xcode.PBXGroup(tr) - local settings = {} - - tree.traverse(tr, { - onnode = function(node) - -- Skip over anything that isn't a proper group - if (node.path and #node.children == 0) or node.kind == "vgroup" then - return - end - - local function isAggregateTarget(node) - local productsId = xcode.newid("Products") - return node.id == productsId and node.parent.project and node.parent.project.kind == "Utility" - end - if isAggregateTarget(node) then - return - end - - settings[node.productgroupid or node.id] = function() - -- project references get special treatment - if node.parent == tr.projects then - _p(2,'%s /* Products */ = {', node.productgroupid) - else - _p(2,'%s /* %s */ = {', node.id, node.name) - end - - _p(3,'isa = PBXGroup;') - _p(3,'children = (') - for _, childnode in ipairs(node.children) do - if not isAggregateTarget(childnode) then - _p(4,'%s /* %s */,', childnode.id, childnode.name) - end - end - _p(3,');') - - if node.parent == tr.projects then - _p(3,'name = Products;') - else - _p(3,'name = %s;', stringifySetting(node.name)) - - local vpath = project.getvpath(tr.project, node.name) - - if node.path and node.name ~= vpath then - local p = node.path - if node.parent.path then - p = path.getrelative(node.parent.path, node.path) - end - _p(3,'path = %s;', stringifySetting(p)) - end - end - - _p(3,'sourceTree = "";') - _p(2,'};') - end - end - }, true) - - if not table.isempty(settings) then - _p('/* Begin PBXGroup section */') - printSettingsTable(2, settings) - _p('/* End PBXGroup section */') - _p('') - end - end - - local function xcode_GetBuildCommands(tr) - local buildCommandInfos = {} - tree.traverse(tr, { - onnode = function(node) - if node.buildcommandid then - local info = { - node = node, - inputs = { node.relpath }, - outputs = {}, - depends = {}, - transact = false, - } - for cfg in project.eachconfig(tr.project) do - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg then - for _, v in ipairs(filecfg.buildinputs) do - table.insert(info.inputs, project.getrelative(tr.project, v)) - end - for _, v in ipairs(filecfg.buildoutputs) do - table.insert(info.outputs, project.getrelative(tr.project, v)) - end - end - end - table.insert(buildCommandInfos, info) - end - end - }) - for _, mine in ipairs(buildCommandInfos) do - for _, their in ipairs(buildCommandInfos) do - if mine ~= their then - for _, input in ipairs(mine.inputs) do - if table.contains(their.outputs, input) then - table.insert(mine.depends, their) - break - end - end - end - end - end - local buildCommands = {} - local leftover = #buildCommandInfos - while leftover > 0 do - local prev = leftover - for _, info in ipairs(buildCommandInfos) do - if not info.transact then - local transact = true - for _, depend in ipairs(info.depends) do - transact = depend.transact - if not transact then - break - end - end - if transact then - table.insert(buildCommands, info.node) - info.transact = true - leftover = leftover - 1 - end - end - end - if prev == leftover then - error('detect circular reference.') - end - end - return buildCommands - end - - local function xcode_PBXAggregateOrNativeTarget(tr, pbxTargetName) - local kinds = { - Aggregate = { - "Utility", - }, - Native = { - "ConsoleApp", - "WindowedApp", - "SharedLib", - "StaticLib", - }, - } - local hasTarget = false - for _, node in ipairs(tr.products.children) do - hasTarget = table.contains(kinds[pbxTargetName], node.cfg.kind) - if hasTarget then - break - end - end - if not hasTarget then - return - end - - _p('/* Begin PBX%sTarget section */', pbxTargetName) - - local buildCommands = xcode_GetBuildCommands(tr) - - for _, node in ipairs(tr.products.children) do - local name = tr.project.name - - local function hasBuildCommands(which) - for _, cfg in ipairs(tr.configs) do - if #cfg[which] > 0 then - return true - end - end - end - - _p(2,'%s /* %s */ = {', node.targetid, name) - _p(3,'isa = PBX%sTarget;', pbxTargetName) - _p(3,'buildConfigurationList = %s /* Build configuration list for PBX%sTarget "%s" */;', node.cfgsection, pbxTargetName, escapeSetting(name)) - _p(3,'buildPhases = (') - if hasBuildCommands('prebuildcommands') then - _p(4,'9607AE1010C857E500CD1376 /* Prebuild */,') - end - for _, v in ipairs(buildCommands) do - _p(4,'%s /* Build "%s" */,', v.buildcommandid, v.name) - end - if pbxTargetName == "Native" then - _p(4,'%s /* Resources */,', node.resstageid) - _p(4,'%s /* Sources */,', node.sourcesid) - end - if hasBuildCommands('prelinkcommands') then - _p(4,'9607AE3510C85E7E00CD1376 /* Prelink */,') - end - if pbxTargetName == "Native" then - _p(4,'%s /* Frameworks */,', node.fxstageid) - end - if hasBuildCommands('postbuildcommands') then - _p(4,'9607AE3710C85E8F00CD1376 /* Postbuild */,') - end - _p(3,');') - _p(3,'buildRules = (') - _p(3,');') - - _p(3,'dependencies = (') - for _, node in ipairs(tr.projects.children) do - _p(4,'%s /* PBXTargetDependency */,', node.targetdependid) - end - _p(3,');') - - _p(3,'name = %s;', stringifySetting(name)) - - if pbxTargetName == "Native" then - local p - if node.cfg.kind == "ConsoleApp" then - p = "$(HOME)/bin" - elseif node.cfg.kind == "WindowedApp" then - p = "$(HOME)/Applications" - end - if p then - _p(3,'productInstallPath = %s;', stringifySetting(p)) - end - end - - _p(3,'productName = %s;', stringifySetting(name)) - if pbxTargetName == "Native" then - _p(3,'productReference = %s /* %s */;', node.id, node.name) - _p(3,'productType = %s;', stringifySetting(xcode.getproducttype(node))) - end - _p(2,'};') - end - _p('/* End PBX%sTarget section */', pbxTargetName) - _p('') - end - - - function xcode.PBXAggregateTarget(tr) - xcode_PBXAggregateOrNativeTarget(tr, "Aggregate") - end - - - function xcode.PBXNativeTarget(tr) - xcode_PBXAggregateOrNativeTarget(tr, "Native") - end - - - function xcode.PBXProject(tr) - _p('/* Begin PBXProject section */') - _p(2,'08FB7793FE84155DC02AAC07 /* Project object */ = {') - _p(3,'isa = PBXProject;') - local capabilities = tr.project.xcodesystemcapabilities - if not table.isempty(capabilities) then - local keys = table.keys(capabilities) - table.sort(keys) - _p(3, 'attributes = {') - _p(4, 'TargetAttributes = {') - _p(5, '%s = {', tr.project.xcode.projectnode.targetid) - _p(6, 'SystemCapabilities = {') - for _, key in pairs(keys) do - _p(7, '%s = {', key) - _p(8, 'enabled = %d;', iif(capabilities[key], 1, 0)) - _p(7, '};') - end - _p(6, '};') - _p(5, '};') - _p(4, '};') - _p(3, '};') - end - - _p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "%s" */;', tr.name) - _p(3,'compatibilityVersion = "Xcode 3.2";') - _p(3,'hasScannedForEncodings = 1;') - _p(3,'mainGroup = %s /* %s */;', tr.id, tr.name) - _p(3,'projectDirPath = "";') - - if #tr.projects.children > 0 then - _p(3,'projectReferences = (') - for _, node in ipairs(tr.projects.children) do - _p(4,'{') - _p(5,'ProductGroup = %s /* Products */;', node.productgroupid) - _p(5,'ProjectRef = %s /* %s */;', node.id, path.getname(node.path)) - _p(4,'},') - end - _p(3,');') - end - - _p(3,'projectRoot = "";') - _p(3,'targets = (') - for _, node in ipairs(tr.products.children) do - _p(4,'%s /* %s */,', node.targetid, node.name) - end - _p(3,');') - _p(2,'};') - _p('/* End PBXProject section */') - _p('') - end - - - function xcode.PBXReferenceProxy(tr) - local settings = {} - - tree.traverse(tr.projects, { - onleaf = function(node) - settings[node.id] = function() - _p(2,'%s /* %s */ = {', node.id, node.name) - _p(3,'isa = PBXReferenceProxy;') - _p(3,'fileType = %s;', xcode.gettargettype(node)) - _p(3,'path = %s;', stringifySetting(node.name)) - _p(3,'remoteRef = %s /* PBXContainerItemProxy */;', node.parent.productproxyid) - _p(3,'sourceTree = BUILT_PRODUCTS_DIR;') - _p(2,'};') - end - end - }) - - if not table.isempty(settings) then - _p('/* Begin PBXReferenceProxy section */') - printSettingsTable(2, settings) - _p('/* End PBXReferenceProxy section */') - _p('') - end - end - - - function xcode.PBXResourcesBuildPhase(tr) - _p('/* Begin PBXResourcesBuildPhase section */') - for _, target in ipairs(tr.products.children) do - _p(2,'%s /* Resources */ = {', target.resstageid) - _p(3,'isa = PBXResourcesBuildPhase;') - _p(3,'buildActionMask = 2147483647;') - _p(3,'files = (') - tree.traverse(tr, { - onnode = function(node) - if xcode.getbuildcategory(node) == "Resources" then - _p(4,'%s /* %s in Resources */,', node.buildid, node.name) - end - end - }) - _p(3,');') - _p(3,'runOnlyForDeploymentPostprocessing = 0;') - _p(2,'};') - end - _p('/* End PBXResourcesBuildPhase section */') - _p('') - end - - function xcode.PBXShellScriptBuildPhase(tr) - local wrapperWritten = false - - local function doblock(id, name, which) - -- see if there are any config-specific commands to add - local commands = {} - for _, cfg in ipairs(tr.configs) do - local cfgcmds = cfg[which] - if #cfgcmds > 0 then - table.insert(commands, 'if [ "${CONFIGURATION}" = "' .. cfg.buildcfg .. '" ]; then') - for i = 1, #cfgcmds do - table.insert(commands, cfgcmds[i]) - end - table.insert(commands, 'fi') - end - end - - if #commands > 0 then - table.insert(commands, 1, 'set -e') -- Tells the shell to exit when any command fails - commands = os.translateCommands(commands, p.MACOSX) - if not wrapperWritten then - _p('/* Begin PBXShellScriptBuildPhase section */') - wrapperWritten = true - end - _p(2,'%s /* %s */ = {', id, name) - _p(3,'isa = PBXShellScriptBuildPhase;') - _p(3,'buildActionMask = 2147483647;') - _p(3,'files = (') - _p(3,');') - _p(3,'inputPaths = ('); - _p(3,');'); - _p(3,'name = %s;', name); - _p(3,'outputPaths = ('); - _p(3,');'); - _p(3,'runOnlyForDeploymentPostprocessing = 0;'); - _p(3,'shellPath = /bin/sh;'); - _p(3,'shellScript = %s;', stringifySetting(table.concat(commands, '\n'))) - _p(2,'};') - end - end - - doblock("9607AE1010C857E500CD1376", "Prebuild", "prebuildcommands") - - local settings = {} - tree.traverse(tr, { - onnode = function(node) - if node.buildcommandid then - settings[node.buildcommandid] = function(level) - local commands = {} - local inputs = {} - local outputs = {} - for cfg in project.eachconfig(tr.project) do - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg then - table.insert(commands, 'if [ "${CONFIGURATION}" = "' .. cfg.buildcfg .. '" ]; then') - if filecfg.buildmessage then - table.insert(commands, '\techo "' .. filecfg.buildmessage .. '"') - end - local cmds = os.translateCommandsAndPaths(filecfg.buildcommands, filecfg.project.basedir, filecfg.project.location) - for _, cmd in ipairs(cmds) do - table.insert(commands, '\t' .. cmd) - end - table.insert(commands, 'fi') - for _, v in ipairs(filecfg.buildinputs) do - inputs[v] = true - end - for _, v in ipairs(filecfg.buildoutputs) do - outputs[v] = true - end - end - end - - if #commands > 0 then - table.insert(commands, 1, 'set -e') -- Tells the shell to exit when any command fails - end - - _p(level,'%s /* Build "%s" */ = {', node.buildcommandid, node.name) - _p(level+1,'isa = PBXShellScriptBuildPhase;') - _p(level+1,'buildActionMask = 2147483647;') - _p(level+1,'files = (') - _p(level+1,');') - _p(level+1,'inputPaths = ('); - _p(level+2,'"%s",', escapeSetting(node.relpath)) - for v, _ in pairs(inputs) do - _p(level+2,'"%s",', escapeSetting(project.getrelative(tr.project, v))) - end - _p(level+1,');') - _p(level+1,'name = %s;', stringifySetting('Build "' .. node.name .. '"')) - _p(level+1,'outputPaths = (') - for v, _ in pairs(outputs) do - _p(level+2,'"%s",', escapeSetting(project.getrelative (tr.project, v))) - end - _p(level+1,');') - _p(level+1,'runOnlyForDeploymentPostprocessing = 0;'); - _p(level+1,'shellPath = /bin/sh;'); - _p(level+1,'shellScript = %s;', stringifySetting(table.concat(commands, '\n'))) - _p(level,'};') - end - end - end - }) - - if not table.isempty(settings) then - if not wrapperWritten then - _p('/* Begin PBXShellScriptBuildPhase section */') - wrapperWritten = true - end - printSettingsTable(2, settings) - end - - doblock("9607AE3510C85E7E00CD1376", "Prelink", "prelinkcommands") - doblock("9607AE3710C85E8F00CD1376", "Postbuild", "postbuildcommands") - - if wrapperWritten then - _p('/* End PBXShellScriptBuildPhase section */') - _p('') - end - end - - - function xcode.PBXSourcesBuildPhase(tr) - _p('/* Begin PBXSourcesBuildPhase section */') - for _, target in ipairs(tr.products.children) do - _p(2,'%s /* Sources */ = {', target.sourcesid) - _p(3,'isa = PBXSourcesBuildPhase;') - _p(3,'buildActionMask = 2147483647;') - _p(3,'files = (') - tree.traverse(tr, { - onleaf = function(node) - if xcode.getbuildcategory(node) == "Sources" and node.buildid then - _p(4,'%s /* %s in Sources */,', node.buildid, node.name) - end - end - }) - _p(3,');') - _p(3,'runOnlyForDeploymentPostprocessing = 0;') - _p(2,'};') - end - _p('/* End PBXSourcesBuildPhase section */') - _p('') - end - - - function xcode.PBXVariantGroup(tr) - local settings = {} - tree.traverse(tr, { - onbranch = function(node) - settings[node.id] = function() - if node.kind == "vgroup" then - _p(2,'%s /* %s */ = {', node.id, node.name) - _p(3,'isa = PBXVariantGroup;') - _p(3,'children = (') - for _, lang in ipairs(node.children) do - _p(4,'%s /* %s */,', lang.id, lang.name) - end - _p(3,');') - _p(3,'name = %s;', node.name) - _p(3,'sourceTree = "";') - _p(2,'};') - end - end - end - }) - - if not table.isempty(settings) then - _p('/* Begin PBXVariantGroup section */') - printSettingsTable(2, settings) - _p('/* End PBXVariantGroup section */') - _p('') - end - end - - - function xcode.PBXTargetDependency(tr) - local settings = {} - tree.traverse(tr.projects, { - onleaf = function(node) - settings[node.parent.targetdependid] = function() - _p(2,'%s /* PBXTargetDependency */ = {', node.parent.targetdependid) - _p(3,'isa = PBXTargetDependency;') - _p(3,'name = %s;', stringifySetting(node.name)) - _p(3,'targetProxy = %s /* PBXContainerItemProxy */;', node.parent.targetproxyid) - _p(2,'};') - end - end - }) - - if not table.isempty(settings) then - _p('/* Begin PBXTargetDependency section */') - printSettingsTable(2, settings) - _p('/* End PBXTargetDependency section */') - _p('') - end - end - - - function xcode.XCBuildConfiguration_Target(tr, target, cfg) - local settings = {} - - settings['ALWAYS_SEARCH_USER_PATHS'] = 'NO' - - if cfg.symbols ~= p.OFF then - settings['DEBUG_INFORMATION_FORMAT'] = xcode.getdebugformat(cfg) - end - - if cfg.kind ~= "StaticLib" and cfg.buildtarget.prefix ~= '' then - settings['EXECUTABLE_PREFIX'] = cfg.buildtarget.prefix - end - - if cfg.buildtarget.extension then - local exts = { - WindowedApp = "app", - SharedLib = "dylib", - StaticLib = "a", - OSXBundle = "bundle", - OSXFramework = "framework", - XCTest = "xctest", - } - local ext = cfg.buildtarget.extension:sub(2) - if ext ~= exts[iif(cfg.kind == "SharedLib" and cfg.sharedlibtype, cfg.sharedlibtype, cfg.kind)] then - if cfg.kind == "WindowedApp" or (cfg.kind == "SharedLib" and cfg.sharedlibtype) then - settings['WRAPPER_EXTENSION'] = ext - elseif cfg.kind == "SharedLib" or cfg.kind == "StaticLib" then - settings['EXECUTABLE_EXTENSION'] = ext - end - end - end - - local outdir = path.getrelative(tr.project.location, path.getdirectory(cfg.buildtarget.relpath)) - if outdir ~= "." then - settings['CONFIGURATION_BUILD_DIR'] = outdir - end - - settings['GCC_DYNAMIC_NO_PIC'] = 'NO' - - if tr.infoplist then - settings['INFOPLIST_FILE'] = config.findfile(cfg, path.getextension(tr.infoplist.name)) - end - - local installpaths = { - ConsoleApp = '/usr/local/bin', - WindowedApp = '"$(HOME)/Applications"', - SharedLib = '/usr/local/lib', - StaticLib = '/usr/local/lib', - OSXBundle = '$(LOCAL_LIBRARY_DIR)/Bundles', - OSXFramework = '$(LOCAL_LIBRARY_DIR)/Frameworks', - } - settings['INSTALL_PATH'] = installpaths[iif(cfg.kind == "SharedLib" and cfg.sharedlibtype, cfg.sharedlibtype, cfg.kind)] - - local fileNameList = {} - local file_tree = project.getsourcetree(tr.project) - tree.traverse(tr, { - onnode = function(node) - if node.buildid and not node.isResource and node.abspath then - -- ms this seems to work on visual studio !!! - -- why not in xcode ?? - local filecfg = fileconfig.getconfig(node, cfg) - if filecfg and filecfg.flags.ExcludeFromBuild then - --fileNameList = fileNameList .. " " ..filecfg.name - table.insert(fileNameList, escapeArg(node.name)) - end - - --ms new way - -- if the file is not in this config file list excluded it from build !!! - --if not cfg.files[node.abspath] then - -- table.insert(fileNameList, escapeArg(node.name)) - --end - end - end - }) - - if not table.isempty(fileNameList) then - settings['EXCLUDED_SOURCE_FILE_NAMES'] = fileNameList - end - settings['PRODUCT_NAME'] = iif(cfg.kind == "ConsoleApp" and cfg.buildtarget.extension, cfg.buildtarget.basename .. cfg.buildtarget.extension, cfg.buildtarget.basename) - - if os.istarget(p.IOS) then - settings['SDKROOT'] = 'iphoneos' - - settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = cfg.xcodecodesigningidentity or 'iPhone Developer' - - local minOSVersion = project.systemversion(cfg) - if minOSVersion ~= nil then - settings['IPHONEOS_DEPLOYMENT_TARGET'] = minOSVersion - end - - local families = { - ['iPhone/iPod touch'] = '1', - ['iPad'] = '2', - ['Universal'] = '1,2', - } - local family = families[cfg.iosfamily] - if family then - settings['TARGETED_DEVICE_FAMILY'] = family - end - else - local minOSVersion = project.systemversion(cfg) - if minOSVersion ~= nil then - settings['MACOSX_DEPLOYMENT_TARGET'] = minOSVersion - end - end - - --ms not by default ...add it manually if you need it - --settings['COMBINE_HIDPI_IMAGES'] = 'YES' - - overrideSettings(settings, cfg.xcodebuildsettings) - - _p(2,'%s /* %s */ = {', cfg.xcode.targetid, cfg.buildcfg) - _p(3,'isa = XCBuildConfiguration;') - _p(3,'buildSettings = {') - printSettingsTable(4, settings) - _p(3,'};') - printSetting(3, 'name', cfg.buildcfg); - _p(2,'};') - end - - - xcode.cLanguageStandards = { - ["Default"] = "compiler-default", -- explicit compiler default - ["C89"] = "c89", - ["C90"] = "c90", - ["C99"] = "c99", - ["C11"] = "c11", - ["gnu89"] = "gnu89", - ["gnu90"] = "gnu90", - ["gnu99"] = "gnu99", - ["gnu11"] = "gnu11" - } - - function xcode.XCBuildConfiguration_CLanguageStandard(settings, cfg) - -- if no cppdialect is provided, don't set C dialect - -- projects without C dialect set will use compiler default - if not cfg.cdialect then - return - end - - local cLanguageStandard = xcode.cLanguageStandards[cfg.cdialect] - if cLanguageStandard then - settings['GCC_C_LANGUAGE_STANDARD'] = cLanguageStandard - end - end - - - xcode.cppLanguageStandards = { - ["Default"] = "compiler-default", -- explicit compiler default - ["C++98"] = "c++98", - ["C++11"] = "c++11", - ["C++14"] = "c++14", - ["C++17"] = "c++1z", - ["gnu++98"] = "gnu++98", - ["gnu++11"] = "gnu++0x", -- Xcode project GUI uses gnu++0x, but gnu++11 also works - ["gnu++14"] = "gnu++14", - ["gnu++17"] = "gnu++1z" - } - - function xcode.XCBuildConfiguration_CppLanguageStandard(settings, cfg) - -- if no cppdialect is provided, don't set C++ dialect - -- projects without C++ dialect set will use compiler default - if not cfg.cppdialect then - return - end - - local cppLanguageStandard = xcode.cppLanguageStandards[cfg.cppdialect] - if cppLanguageStandard then - settings['CLANG_CXX_LANGUAGE_STANDARD'] = cppLanguageStandard - end - end - - - function xcode.XCBuildConfiguration_Project(tr, cfg) - local settings = {} - - local archs = { - Native = "$(NATIVE_ARCH_ACTUAL)", - x86 = "i386", - x86_64 = "x86_64", - Universal32 = "$(ARCHS_STANDARD_32_BIT)", - Universal64 = "$(ARCHS_STANDARD_64_BIT)", - Universal = "$(ARCHS_STANDARD_32_64_BIT)", - } - - settings['ARCHS'] = archs[cfg.platform or "Native"] - - --ms This is the default so don;t write it - --settings['SDKROOT'] = 'macosx' - - local targetdir = path.getdirectory(cfg.buildtarget.relpath) - if targetdir ~= "." then - settings['CONFIGURATION_BUILD_DIR'] = '$(SYMROOT)' - end - - settings['CONFIGURATION_TEMP_DIR'] = '$(OBJROOT)' - - if config.isDebugBuild(cfg) then - settings['COPY_PHASE_STRIP'] = 'NO' - end - - xcode.XCBuildConfiguration_CLanguageStandard(settings, cfg) - xcode.XCBuildConfiguration_CppLanguageStandard(settings, cfg) - - if cfg.exceptionhandling == p.OFF then - settings['GCC_ENABLE_CPP_EXCEPTIONS'] = 'NO' - end - - if cfg.rtti == p.OFF then - settings['GCC_ENABLE_CPP_RTTI'] = 'NO' - end - - if cfg.symbols == p.ON and cfg.editandcontinue ~= "Off" then - settings['GCC_ENABLE_FIX_AND_CONTINUE'] = 'YES' - end - - if cfg.exceptionhandling == p.OFF then - settings['GCC_ENABLE_OBJC_EXCEPTIONS'] = 'NO' - end - - local optimizeMap = { On = 3, Size = 's', Speed = 3, Full = 'fast', Debug = 1 } - settings['GCC_OPTIMIZATION_LEVEL'] = optimizeMap[cfg.optimize] or 0 - - if cfg.pchheader and not cfg.flags.NoPCH then - settings['GCC_PRECOMPILE_PREFIX_HEADER'] = 'YES' - settings['GCC_PREFIX_HEADER'] = cfg.pchheader - end - - local escapedDefines = { } - for i,v in ipairs(cfg.defines) do - escapedDefines[i] = escapeArg(v) - end - settings['GCC_PREPROCESSOR_DEFINITIONS'] = escapedDefines - - settings["GCC_SYMBOLS_PRIVATE_EXTERN"] = 'NO' - - if cfg.unsignedchar ~= nil then - settings['GCC_CHAR_IS_UNSIGNED_CHAR'] = iif(cfg.unsignedchar, "YES", "NO") - end - - if cfg.flags.FatalWarnings then - settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES' - end - - settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'YES' - settings['GCC_WARN_UNUSED_VARIABLE'] = 'YES' - - local includedirs = project.getrelative(cfg.project, cfg.includedirs) - for i,v in ipairs(includedirs) do - cfg.includedirs[i] = p.quoted(v) - end - settings['USER_HEADER_SEARCH_PATHS'] = cfg.includedirs - - local sysincludedirs = project.getrelative(cfg.project, cfg.sysincludedirs) - for i,v in ipairs(sysincludedirs) do - cfg.sysincludedirs[i] = p.quoted(v) - end - if not table.isempty(cfg.sysincludedirs) then - table.insert(cfg.sysincludedirs, "$(inherited)") - end - settings['HEADER_SEARCH_PATHS'] = cfg.sysincludedirs - - for i,v in ipairs(cfg.libdirs) do - cfg.libdirs[i] = p.project.getrelative(cfg.project, cfg.libdirs[i]) - end - settings['LIBRARY_SEARCH_PATHS'] = cfg.libdirs - - for i,v in ipairs(cfg.frameworkdirs) do - cfg.frameworkdirs[i] = p.project.getrelative(cfg.project, cfg.frameworkdirs[i]) - end - settings['FRAMEWORK_SEARCH_PATHS'] = cfg.frameworkdirs - - local objDir = path.getrelative(tr.project.location, cfg.objdir) - settings['OBJROOT'] = objDir - - settings['ONLY_ACTIVE_ARCH'] = iif(p.config.isDebugBuild(cfg), 'YES', 'NO') - - -- build list of "other" C/C++ flags - local checks = { - ["-ffast-math"] = cfg.floatingpoint == "Fast", - ["-fomit-frame-pointer"] = cfg.omitframepointer == "On", - ["-fno-omit-frame-pointer"] = cfg.omitframepointer == "Off", - } - - local flags = { } - for flag, check in pairs(checks) do - if check then - table.insert(flags, flag) - end - end - - - --[[if (type(cfg.buildoptions) == "table") then - for k,v in pairs(cfg.buildoptions) do - table.insertflat(flags, string.explode(v," -")) - end - end - ]] - - settings['OTHER_CFLAGS'] = table.join(flags, cfg.buildoptions) - - -- build list of "other" linked flags. All libraries that aren't frameworks - -- are listed here, so I don't have to try and figure out if they are ".a" - -- or ".dylib", which Xcode requires to list in the Frameworks section - flags = { } - for _, lib in ipairs(config.getlinks(cfg, "system")) do - if not xcode.isframework(lib) then - table.insert(flags, "-l" .. lib) - end - end - - --ms this step is for reference projects only - for _, lib in ipairs(config.getlinks(cfg, "dependencies", "object")) do - if (lib.external) then - if not xcode.isframework(lib.linktarget.basename) then - table.insert(flags, "-l" .. escapeArg(lib.linktarget.basename)) - end - end - end - - settings['OTHER_LDFLAGS'] = table.join(flags, cfg.linkoptions) - - if cfg.flags.StaticRuntime then - settings['STANDARD_C_PLUS_PLUS_LIBRARY_TYPE'] = 'static' - end - - if targetdir ~= "." then - settings['SYMROOT'] = path.getrelative(tr.project.location, targetdir) - end - - if cfg.warnings == "Extra" then - settings['WARNING_CFLAGS'] = '-Wall -Wextra' - end - - overrideSettings(settings, cfg.xcodebuildsettings) - - _p(2,'%s /* %s */ = {', cfg.xcode.projectid, cfg.buildcfg) - _p(3,'isa = XCBuildConfiguration;') - _p(3,'buildSettings = {') - printSettingsTable(4, settings) - _p(3,'};') - printSetting(3, 'name', cfg.buildcfg); - _p(2,'};') - end - - - function xcode.XCBuildConfiguration(tr) - local settings = {} - - for _, target in ipairs(tr.products.children) do - for _, cfg in ipairs(tr.configs) do - settings[cfg.xcode.targetid] = function() - xcode.XCBuildConfiguration_Target(tr, target, cfg) - end - end - end - for _, cfg in ipairs(tr.configs) do - settings[cfg.xcode.projectid] = function() - xcode.XCBuildConfiguration_Project(tr, cfg) - end - end - - if not table.isempty(settings) then - _p('/* Begin XCBuildConfiguration section */') - printSettingsTable(0, settings) - _p('/* End XCBuildConfiguration section */') - _p('') - end - end - - - function xcode.XCBuildConfigurationList(tr) - local wks = tr.project.workspace - local defaultCfgName = stringifySetting(tr.configs[1].buildcfg) - local settings = {} - - for _, target in ipairs(tr.products.children) do - settings[target.cfgsection] = function() - _p(2,'%s /* Build configuration list for PBXNativeTarget "%s" */ = {', target.cfgsection, target.name) - _p(3,'isa = XCConfigurationList;') - _p(3,'buildConfigurations = (') - for _, cfg in ipairs(tr.configs) do - _p(4,'%s /* %s */,', cfg.xcode.targetid, cfg.buildcfg) - end - _p(3,');') - _p(3,'defaultConfigurationIsVisible = 0;') - _p(3,'defaultConfigurationName = %s;', defaultCfgName) - _p(2,'};') - end - end - settings['1DEB928908733DD80010E9CD'] = function() - _p(2,'1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "%s" */ = {', tr.name) - _p(3,'isa = XCConfigurationList;') - _p(3,'buildConfigurations = (') - for _, cfg in ipairs(tr.configs) do - _p(4,'%s /* %s */,', cfg.xcode.projectid, cfg.buildcfg) - end - _p(3,');') - _p(3,'defaultConfigurationIsVisible = 0;') - _p(3,'defaultConfigurationName = %s;', defaultCfgName) - _p(2,'};') - end - - _p('/* Begin XCConfigurationList section */') - printSettingsTable(2, settings) - _p('/* End XCConfigurationList section */') - end diff --git a/build/premake/premake5/modules/xcode/xcode_project.lua b/build/premake/premake5/modules/xcode/xcode_project.lua deleted file mode 100644 index 6732a4b362..0000000000 --- a/build/premake/premake5/modules/xcode/xcode_project.lua +++ /dev/null @@ -1,262 +0,0 @@ ---- --- xcode/xcode4_project.lua --- Generate an Xcode project file. --- Author Jason Perkins --- Modified by Mihai Sebea --- Copyright (c) 2009-2015 Jason Perkins and the Premake project ---- - - local p = premake - local m = p.modules.xcode - - local xcode = p.modules.xcode - local project = p.project - local config = p.config - local fileconfig = p.fileconfig - local tree = p.tree - --- --- Checks if a node must be excluded completely from a target or not. It will --- return true only if the node has the "ExcludeFromBuild" flag in all the --- configurations. --- --- @param node --- The node to check. --- @param prj --- The project being generated. --- @returns --- A boolean, telling whether the node must be excluded from its target or not. --- - function xcode.mustExcludeFromTarget(node, prj) - if not node.configs then - return false - end - - local value - for cfg in premake.project.eachconfig(prj) do - local filecfg = premake.fileconfig.getconfig(node, cfg) - if filecfg then - local newValue = not not filecfg.flags.ExcludeFromBuild - if value == nil then - value = newValue - elseif value ~= newValue then - p.warn(node.name .. " is excluded in just some configurations. Autocompletion will not work correctly on this file in Xcode.") - return false - end - end - end - return value - end - --- --- Create a tree corresponding to what is shown in the Xcode project browser --- pane, with nodes for files and folders, resources, frameworks, and products. --- --- @param prj --- The project being generated. --- @returns --- A tree, loaded with metadata, which mirrors Xcode's view of the project. --- - - function xcode.buildprjtree(prj) - local tr = project.getsourcetree(prj, nil , false) - tr.project = prj - - -- create a list of build configurations and assign IDs - tr.configs = {} - - for cfg in project.eachconfig(prj) do - cfg.xcode = {} - cfg.xcode.targetid = xcode.newid(prj.xcode.projectnode.name, cfg.buildcfg, "target") - cfg.xcode.projectid = xcode.newid(tr.name, cfg.buildcfg) - table.insert(tr.configs, cfg) - end - - -- convert localized resources from their filesystem layout (English.lproj/MainMenu.xib) - -- to Xcode's display layout (MainMenu.xib/English). - tree.traverse(tr, { - onbranch = function(node) - if path.getextension(node.name) == ".lproj" then - local lang = path.getbasename(node.name) -- "English", "French", etc. - - -- create a new language group for each file it contains - for _, filenode in ipairs(node.children) do - local grpnode = node.parent.children[filenode.name] - if not grpnode then - grpnode = tree.insert(node.parent, tree.new(filenode.name)) - grpnode.kind = "vgroup" - end - - -- convert the file node to a language node and add to the group - filenode.name = path.getbasename(lang) - tree.insert(grpnode, filenode) - end - - -- remove this directory from the tree - tree.remove(node) - end - end - }) - - -- the special folder "Frameworks" lists all linked frameworks - tr.frameworks = tree.new("Frameworks") - for cfg in project.eachconfig(prj) do - for _, link in ipairs(config.getlinks(cfg, "system", "fullpath")) do - local name = path.getname(link) - if xcode.isframework(name) and not tr.frameworks.children[name] then - node = tree.insert(tr.frameworks, tree.new(name)) - node.path = link - end - end - end - - -- only add it to the tree if there are frameworks to link - if #tr.frameworks.children > 0 then - tree.insert(tr, tr.frameworks) - end - - -- the special folder "Products" holds the target produced by the project; this - -- is populated below - tr.products = tree.insert(tr, tree.new("Products")) - - -- the special folder "Projects" lists sibling project dependencies - tr.projects = tree.new("Projects") - for _, dep in ipairs(project.getdependencies(prj, "linkOnly")) do - xcode.addDependency(prj, tr, dep, true) - end - for _, dep in ipairs(project.getdependencies(prj, "dependOnly")) do - xcode.addDependency(prj, tr, dep, false) - end - - if #tr.projects.children > 0 then - tree.insert(tr, tr.projects) - end - - -- Final setup - tree.traverse(tr, { - onnode = function(node) - local nodePath - if node.path then - nodePath = path.getrelative(tr.project.location, node.path) - end - -- assign IDs to every node in the tree - node.id = xcode.newid(node.name, nil, nodePath) - - node.isResource = xcode.isItemResource(prj, node) - - -- check to see if this file has custom build - if node.configs then - for cfg in project.eachconfig(prj) do - local filecfg = fileconfig.getconfig(node, cfg) - if fileconfig.hasCustomBuildRule(filecfg) then - if not node.buildcommandid then - node.buildcommandid = xcode.newid(node.name, "buildcommand", nodePath) - end - end - end - end - - -- assign build IDs to buildable files - if xcode.getbuildcategory(node) and not node.excludefrombuild and not xcode.mustExcludeFromTarget(node, tr.project) then - node.buildid = xcode.newid(node.name, "build", nodePath) - end - - -- remember key files that are needed elsewhere - if string.endswith(node.name, "Info.plist") then - tr.infoplist = node - end - end - }, true) - - -- Plug in the product node into the Products folder in the tree. The node - -- was built in xcode.prepareWorkspace() in xcode_common.lua; it contains IDs - -- that are necessary for inter-project dependencies - node = tree.insert(tr.products, prj.xcode.projectnode) - node.kind = "product" - node.path = node.cfg.buildtarget.fullpath - node.cfgsection = xcode.newid(node.name, "cfg") - node.resstageid = xcode.newid(node.name, "rez") - node.sourcesid = xcode.newid(node.name, "src") - node.fxstageid = xcode.newid(node.name, "fxs") - - return tr - end - - function xcode.addDependency(prj, tr, dep, build) - -- create a child node for the dependency's xcodeproj - local xcpath = xcode.getxcodeprojname(dep) - local xcnode = tree.insert(tr.projects, tree.new(path.getname(xcpath))) - xcnode.path = xcpath - xcnode.project = dep - xcnode.productgroupid = xcode.newid(xcnode.name, "prodgrp") - xcnode.productproxyid = xcode.newid(xcnode.name, "prodprox") - xcnode.targetproxyid = xcode.newid(xcnode.name, "targprox") - xcnode.targetdependid = xcode.newid(xcnode.name, "targdep") - - -- create a grandchild node for the dependency's link target - local lprj = p.workspace.findproject(prj.workspace, dep.name) - local cfg = project.findClosestMatch(lprj, prj.configurations[1]) - node = tree.insert(xcnode, tree.new(cfg.linktarget.name)) - node.path = cfg.linktarget.fullpath - node.cfg = cfg - - -- don't link the dependency if it's a dependency only - if build == false then - node.excludefrombuild = true - end - end - - ---- --- Generate an Xcode .xcodeproj for a Premake project. ---- - - m.elements.project = function(prj) - return { - m.header, - } - end - - function m.generateProject(prj) - local tr = xcode.buildprjtree(prj) - p.callArray(m.elements.project, prj) - xcode.PBXBuildFile(tr) - xcode.PBXContainerItemProxy(tr) - xcode.PBXFileReference(tr) - xcode.PBXFrameworksBuildPhase(tr) - xcode.PBXGroup(tr) - xcode.PBXNativeTarget(tr) - xcode.PBXAggregateTarget(tr) - xcode.PBXProject(tr) - xcode.PBXReferenceProxy(tr) - xcode.PBXResourcesBuildPhase(tr) - xcode.PBXShellScriptBuildPhase(tr) - xcode.PBXSourcesBuildPhase(tr) - xcode.PBXTargetDependency(tr) - xcode.PBXVariantGroup(tr) - xcode.XCBuildConfiguration(tr) - xcode.XCBuildConfigurationList(tr) - xcode.footer(prj) - end - - - - function m.header(prj) - p.w('// !$*UTF8*$!') - p.push('{') - p.w('archiveVersion = 1;') - p.w('classes = {') - p.w('};') - p.w('objectVersion = 46;') - p.push('objects = {') - p.w() - end - - - - function xcode.footer(prj) - p.pop('};') - p.w('rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;') - p.pop('}') - end - diff --git a/build/premake/premake5/premake4.lua b/build/premake/premake5/premake4.lua deleted file mode 100644 index 204d563a0e..0000000000 --- a/build/premake/premake5/premake4.lua +++ /dev/null @@ -1,123 +0,0 @@ --- --- Premake 5.x build configuration script --- Use this script to configure the project with Premake4. --- - --- --- Define the project. Put the release configuration first so it will be the --- default when folks build using the makefile. That way they don't have to --- worry about the /scripts argument and all that. --- - - solution "Premake5" - configurations { "Release", "Debug" } - location ( _OPTIONS["to"] ) - - project "Premake5" - targetname "premake5" - language "C" - kind "ConsoleApp" - defines { "PREMAKE_NO_BUILTIN_SCRIPTS" } - flags { "No64BitChecks", "ExtraWarnings", "StaticRuntime" } - includedirs { "contrib/lua/src", "contrib/luashim" } - - files - { - "*.txt", "**.lua", - "contrib/lua/src/*.c", "contrib/lua/src/*.h", - "src/host/*.c" - } - - excludes - { - "contrib/lua/src/lauxlib.c", - "contrib/lua/src/lua.c", - "contrib/lua/src/luac.c", - "contrib/lua/src/print.c", - "contrib/lua/**.lua", - "contrib/lua/etc/*.c" - } - - configuration "Debug" - targetdir "bin/debug" - defines "_DEBUG" - flags { "Symbols" } - - configuration "Release" - targetdir "bin/release" - defines "NDEBUG" - flags { "OptimizeSize" } - - configuration "vs*" - defines { "_CRT_SECURE_NO_WARNINGS" } - - configuration "vs2005" - defines {"_CRT_SECURE_NO_DEPRECATE" } - - configuration "windows" - links { "ole32", "advapi32" } - - configuration "linux or bsd or hurd" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m" } - linkoptions { "-rdynamic" } - - configuration "linux or hurd" - links { "dl", "rt" } - - configuration "macosx" - defines { "LUA_USE_MACOSX" } - links { "CoreServices.framework" } - - configuration { "macosx", "gmake" } - -- toolset "clang" (not until a 5.0 binary is available) - buildoptions { "-mmacosx-version-min=10.4" } - linkoptions { "-mmacosx-version-min=10.4" } - - configuration { "solaris" } - links { "m", "socket", "nsl" } - - configuration "aix" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m" } - - --- --- A more thorough cleanup. --- - - if _ACTION == "clean" then - os.rmdir("bin") - os.rmdir("build") - end - - - --- --- Use the --to=path option to control where the project files get generated. I use --- this to create project files for each supported toolset, each in their own folder, --- in preparation for deployment. --- - - newoption { - trigger = "to", - value = "path", - description = "Set the output location for the generated files" - } - - - --- --- This new embed action is slightly hardcoded for the 4.x executable, and is --- really only intended to get folks bootstrapped on to 5.x --- - - newaction { - trigger = "embed", - description = "Embed scripts in scripts.c; required before release builds", - execute = function () - _MAIN_SCRIPT_DIR = os.getcwd() - _SCRIPT_DIR = path.join(_MAIN_SCRIPT_DIR, "scripts") - dofile("scripts/embed.lua") - end - } diff --git a/build/premake/premake5/premake5.lua b/build/premake/premake5/premake5.lua deleted file mode 100644 index fcd647794b..0000000000 --- a/build/premake/premake5/premake5.lua +++ /dev/null @@ -1,241 +0,0 @@ ---- --- Premake 5.x build configuration script --- Use this script to configure the project with Premake5. ---- - --- --- Remember my location; I will need it to locate sub-scripts later. --- - - local corePath = _SCRIPT_DIR - - --- --- Disable deprecation warnings for myself, so that older development --- versions of Premake can be used to bootstrap new builds. --- - - premake.api.deprecations "off" - - --- --- Register supporting actions and options. --- - - newaction { - trigger = "embed", - description = "Embed scripts in scripts.c; required before release builds", - execute = function () - include (path.join(corePath, "scripts/embed.lua")) - end - } - - - newaction { - trigger = "package", - description = "Creates source and binary packages", - execute = function () - include (path.join(corePath, "scripts/package.lua")) - end - } - - - newaction { - trigger = "test", - description = "Run the automated test suite", - execute = function () - test = require "self-test" - premake.action.call("self-test") - end - } - - - newoption { - trigger = "test-only", - description = "When testing, run only the specified suite or test" - } - - - newoption { - trigger = "to", - value = "path", - description = "Set the output location for the generated files" - } - - - newoption { - trigger = "no-curl", - description = "Disable Curl 3rd party lib" - } - - - newoption { - trigger = "no-zlib", - description = "Disable Zlib/Zip 3rd party lib" - } - - newoption { - trigger = "no-luasocket", - description = "Disable Luasocket 3rd party lib" - } - - newoption { - trigger = "bytecode", - description = "Embed scripts as bytecode instead of stripped souce code" - } - --- --- Define the project. Put the release configuration first so it will be the --- default when folks build using the makefile. That way they don't have to --- worry about the /scripts argument and all that. --- --- TODO: Switch to these new APIs once they've had a chance to land everywhere --- --- defaultConfiguration "Release" --- symbols "On" --- - - solution "Premake5" - configurations { "Release", "Debug" } - location ( _OPTIONS["to"] ) - - flags { "StaticRuntime", "MultiProcessorCompile" } - warnings "Extra" - - if not _OPTIONS["no-zlib"] then - defines { "PREMAKE_COMPRESSION" } - end - - if not _OPTIONS["no-curl"] then - defines { "CURL_STATICLIB", "PREMAKE_CURL"} - end - - filter { 'system:windows' } - platforms { 'x86', 'x64' } - - filter "configurations:Debug" - defines "_DEBUG" - flags { "Symbols" } - - filter "configurations:Release" - defines "NDEBUG" - optimize "Full" - flags { "NoBufferSecurityCheck", "NoRuntimeChecks" } - - filter "action:vs*" - defines { "_CRT_SECURE_NO_DEPRECATE", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_WARNINGS" } - - filter { "system:windows", "configurations:Release" } - flags { "NoIncrementalLink" } - - -- MinGW AR does not handle LTO out of the box and need a plugin to be setup - filter { "system:windows", "configurations:Release", "toolset:not mingw" } - flags { "LinkTimeOptimization" } - - project "Premake5" - targetname "premake5" - language "C" - kind "ConsoleApp" - includedirs { "contrib/lua/src", "contrib/luashim" } - links { "lua-lib" } - - -- optional 3rd party libraries - if not _OPTIONS["no-zlib"] then - includedirs { "contrib/zlib", "contrib/libzip" } - links { "zip-lib", "zlib-lib" } - end - - if not _OPTIONS["no-curl"] then - includedirs { "contrib/curl/include" } - links { "curl-lib" } - end - - files - { - "*.txt", "**.lua", - "src/**.h", "src/**.c", - "modules/**" - } - - excludes - { - "contrib/**.*", - "binmodules/**.*" - } - - filter "configurations:Debug" - targetdir "bin/debug" - debugargs { "--scripts=%{prj.location}/%{path.getrelative(prj.location, prj.basedir)}", "test" } - debugdir "." - - filter "configurations:Release" - targetdir "bin/release" - - filter "system:windows" - links { "ole32", "ws2_32", "advapi32", "version" } - - filter "toolset:mingw" - links { "crypt32" } - - filter "system:linux or bsd or hurd" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m" } - linkoptions { "-rdynamic" } - - filter "system:linux or hurd" - links { "dl", "rt" } - - filter { "system:not windows", "system:not macosx" } - if not _OPTIONS["no-curl"] then - links { "mbedtls-lib" } - end - - filter "system:macosx" - defines { "LUA_USE_MACOSX" } - links { "CoreServices.framework", "Foundation.framework", "Security.framework", "readline" } - - filter { "system:macosx", "action:gmake" } - toolset "clang" - - filter { "system:solaris" } - links { "m", "socket", "nsl" } - - filter "system:aix" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m" } - - filter "system:haiku" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN", "_BSD_SOURCE" } - links { "network", "bsd" } - - - -- optional 3rd party libraries - group "contrib" - include "contrib/lua" - include "contrib/luashim" - - if not _OPTIONS["no-zlib"] then - include "contrib/zlib" - include "contrib/libzip" - end - - if not _OPTIONS["no-curl"] then - include "contrib/mbedtls" - include "contrib/curl" - end - - group "Binary Modules" - include "binmodules/example" - - if not _OPTIONS["no-luasocket"] then - include "binmodules/luasocket" - end - --- --- A more thorough cleanup. --- - - if _ACTION == "clean" then - os.rmdir("bin") - os.rmdir("build") - end diff --git a/build/premake/premake5/scripts/RELEASE.md b/build/premake/premake5/scripts/RELEASE.md deleted file mode 100644 index 74a1851955..0000000000 --- a/build/premake/premake5/scripts/RELEASE.md +++ /dev/null @@ -1,50 +0,0 @@ -# PREMAKE RELEASE CHECKLIST - -## PREP - - * Create a new release branch; push to origin - - * Notify `@premakeapp` of release branch availability; request testing - - * Update `CHANGES.txt` - - * `premake5 --file=scripts/changes.lua --since= changes` - - * Review and clean up as needed - - * Update `README.md` - - * "Commits since last release" badge (once out of prerelease replace `v5.0.0-alphaXX` with `latest`) - - * Update version in `src/host/premake.h` - - * Commit `CHANGES.txt`, `README.txt`, `src/host/premake.h` - - * Push release branch to GitHub; wait for CI to pass - - * Prep release announcement from change log - -## RELEASE - - * Run `premake5 package source` (from Posix ideally) - - * On each platform, run `premake5 package binary` - - * Merge working branch to release and tag; push with tags - - * Create new release on GitHub from `CHANGES.txt`; upload files - - * Update the download page on github.io - - * Post annoucement to `@premakeapp` - - -## CYCLE - - * Update version in `src/host/premake.h` (e.x `"5.0.0-dev"`) - - * Commit - - * Merge release branch to master - - * Delete release branch diff --git a/build/premake/premake5/scripts/changes.lua b/build/premake/premake5/scripts/changes.lua deleted file mode 100644 index 0d7b47916f..0000000000 --- a/build/premake/premake5/scripts/changes.lua +++ /dev/null @@ -1,69 +0,0 @@ ---- --- Output a list of merged PRs since last release in the CHANGES.txt format. ---- - -local usage = "Usage: premake5 --file=scripts/changes.lua --since= changes" - -local sinceRev = _OPTIONS["since"] - -if not sinceRev then - print(usage) - error("Missing `--since`", 0) -end - - -local function parsePullRequestId(line) - return line:match("#%d+%s") -end - -local function parseTitle(line) - return line:match("||(.+)") -end - -local function parseAuthor(line) - return line:match("%s([^%s]-)/") -end - -local function parseLog(line) - local pr = parsePullRequestId(line) - local title = parseTitle(line) - local author = parseAuthor(line) - return string.format("* PR %s %s (@%s)", pr, title, author) -end - - -local function gatherChanges() - local cmd = string.format('git log HEAD "^%s" --merges --first-parent --format="%%s||%%b"', _OPTIONS["since"]) - local output = os.outputof(cmd) - - changes = {} - - for line in output:gmatch("[^\r\n]+") do - table.insert(changes, parseLog(line)) - end - - return changes -end - - -local function generateChanges() - local changes = gatherChanges() - table.sort(changes) - for i = 1, #changes do - print(changes[i]) - end -end - - -newaction { - trigger = "changes", - description = "Generate list of git merges in CHANGES.txt format", - execute = generateChanges -} - -newoption { - trigger = "since", - value = "revision", - description = "Log merges since this revision" -} - diff --git a/build/premake/premake5/scripts/embed.lua b/build/premake/premake5/scripts/embed.lua deleted file mode 100644 index 0d650c4268..0000000000 --- a/build/premake/premake5/scripts/embed.lua +++ /dev/null @@ -1,210 +0,0 @@ --- --- Embed the Lua scripts into src/host/scripts.c as static data buffers. --- Embeds minified versions of the actual scripts by default, rather than --- bytecode, as bytecodes are not portable to different architectures. Use --- the `--bytecode` flag to override. --- - - local scriptCount = 0 - - local function loadScript(fname) - fname = path.getabsolute(fname) - local f = io.open(fname, "rb") - local s = assert(f:read("*all")) - f:close() - return s - end - - - local function stripScript(s) - -- strip tabs - local result = s:gsub("[\t]", "") - - -- strip any CRs - result = result:gsub("[\r]", "") - - -- strip out block comments - result = result:gsub("[^\"']%-%-%[%[.-%]%]", "") - result = result:gsub("[^\"']%-%-%[=%[.-%]=%]", "") - result = result:gsub("[^\"']%-%-%[==%[.-%]==%]", "") - - -- strip out inline comments - result = result:gsub("\n%-%-[^\n]*", "\n") - - -- strip duplicate line feeds - result = result:gsub("\n+", "\n") - - -- strip out leading comments - result = result:gsub("^%-%-[^\n]*\n", "") - - return result - end - - - local function outputScript(result, script) - local data = script.data - local length = #data - - if length > 0 then - script.table = string.format("builtin_script_%d", scriptCount) - scriptCount = scriptCount + 1 - - buffered.writeln(result, "// ".. script.name) - buffered.writeln(result, "static const unsigned char " .. script.table .. "[] = {") - - for i = 1, length do - buffered.write(result, string.format("%3d, ", data:byte(i))) - if (i % 32 == 0) then - buffered.writeln(result) - end - end - - buffered.writeln(result, "};") - buffered.writeln(result) - end - end - - - local function addScript(result, filename, name, data) - if not data then - if not path.hasextension(filename, ".lua") then - data = loadScript(filename) - elseif _OPTIONS["bytecode"] then - verbosef("Compiling... " .. filename) - local output = path.replaceextension(filename, ".luac") - local res, err = os.compile(filename, output); - if res ~= nil then - data = loadScript(output) - os.remove(output) - else - print(err) - print("Embedding source instead.") - data = stripScript(loadScript(filename)) - end - else - data = stripScript(loadScript(filename)) - end - end - - local script = {} - script.filename = filename - script.name = name - script.data = data - table.insert(result, script) - end - - --- Prepare the file header - - local result = buffered.new() - buffered.writeln(result, "/* Premake's Lua scripts, as static data buffers for release mode builds */") - buffered.writeln(result, "/* DO NOT EDIT - this file is autogenerated - see BUILD.txt */") - buffered.writeln(result, "/* To regenerate this file, run: premake5 embed */") - buffered.writeln(result, "") - buffered.writeln(result, '#include "host/premake.h"') - buffered.writeln(result, "") - --- Find all of the _manifest.lua files within the project - - local mask = path.join(_MAIN_SCRIPT_DIR, "**/_manifest.lua") - local manifests = os.matchfiles(mask) - --- Find all of the _user_modules.lua files within the project - - local userModuleFiles = {} - userModuleFiles = table.join(userModuleFiles, os.matchfiles(path.join(_MAIN_SCRIPT_DIR, "**/_user_modules.lua"))) - userModuleFiles = table.join(userModuleFiles, os.matchfiles(path.join(_MAIN_SCRIPT_DIR, "_user_modules.lua"))) - - --- Generate table of embedded content. - local contentTable = {} - local nativeTable = {} - - print("Compiling... ") - for mi = 1, #manifests do - local manifestName = manifests[mi] - local manifestDir = path.getdirectory(manifestName) - local moduleName = path.getbasename(manifestDir) - local baseDir = path.getdirectory(manifestDir) - - local files = dofile(manifests[mi]) - for fi = 1, #files do - local filename = path.join(manifestDir, files[fi]) - addScript(contentTable, filename, path.getrelative(baseDir, filename)) - end - - -- find native code in modules. - if moduleName ~= "src" then - local nativeFile = path.join(manifestDir, 'native', moduleName .. '.c') - if os.isfile(nativeFile) then - local pretty_name = moduleName:gsub("^%l", string.upper) - table.insert(nativeTable, pretty_name) - end - end - end - - addScript(contentTable, path.join(_SCRIPT_DIR, "../src/_premake_main.lua"), "src/_premake_main.lua") - addScript(contentTable, path.join(_SCRIPT_DIR, "../src/_manifest.lua"), "src/_manifest.lua") - --- Add the list of modules - - local modules = dofile("../src/_modules.lua") - for _, userModules in ipairs(userModuleFiles) do - modules = table.join(modules, dofile(userModules)) - end - - addScript(contentTable, "_modules.lua", "src/_modules.lua", "return {" .. table.implode(modules, '"', '"', ', ') .. "}") - --- Embed the actual script contents - - print("Embedding...") - for mi = 1, #contentTable do - outputScript(result, contentTable[mi]) - end - --- Generate an index of the script file names. Script names are stored --- relative to the directory containing the manifest, i.e. the main --- Xcode script, which is at $/modules/xcode/xcode.lua is stored as --- "xcode/xcode.lua". - buffered.writeln(result, "const buildin_mapping builtin_scripts[] = {") - - for mi = 1, #contentTable do - if contentTable[mi].table then - buffered.writeln(result, string.format('\t{"%s", %s, sizeof(%s)},', contentTable[mi].name, contentTable[mi].table, contentTable[mi].table)) - else - buffered.writeln(result, string.format('\t{"%s", NULL, 0},', contentTable[mi].name)) - end - end - - buffered.writeln(result, "\t{NULL, NULL, 0}") - buffered.writeln(result, "};") - buffered.writeln(result, "") - --- write out the registerModules method. - - for _, name in ipairs(nativeTable) do - buffered.writeln(result, string.format("extern void register%s(lua_State* L);", name)) - end - buffered.writeln(result, "") - buffered.writeln(result, "void registerModules(lua_State* L)") - buffered.writeln(result, "{") - buffered.writeln(result, "\t(void)(L);") - for _, name in ipairs(nativeTable) do - buffered.writeln(result, string.format("\tregister%s(L);", name)) - end - buffered.writeln(result, "}") - buffered.writeln(result, "") - --- Write it all out. Check against the current contents of scripts.c first, --- and only overwrite it if there are actual changes. - - print("Writing...") - local scriptsFile = path.getabsolute(path.join(_SCRIPT_DIR, "../src/scripts.c")) - local output = buffered.tostring(result) - - local f, err = os.writefile_ifnotequal(output, scriptsFile); - if (f < 0) then - error(err, 0) - elseif (f > 0) then - printf("Generated %s...", path.getrelative(os.getcwd(), scriptsFile)) - end diff --git a/build/premake/premake5/scripts/package.lua b/build/premake/premake5/scripts/package.lua deleted file mode 100644 index d16420ec2a..0000000000 --- a/build/premake/premake5/scripts/package.lua +++ /dev/null @@ -1,289 +0,0 @@ ---- --- Create a source or binary release package. ---- - - ---- --- Helper function: run a command while hiding its output. ---- - - local function execQuiet(cmd, ...) - cmd = string.format(cmd, ...) .. " > _output_.log 2> _error_.log" - local z = os.execute(cmd) - os.remove("_output_.log") - os.remove("_error_.log") - return z - end - - ---- --- Check the command line arguments, and show some help if needed. ---- - - local allowedCompilers = {} - - if os.ishost("windows") then - allowedCompilers = { - "vs2019", - "vs2017", - "vs2015", - "vs2013", - "vs2012", - "vs2010", - "vs2008", - "vs2005", - } - elseif os.ishost("linux") or os.ishost("bsd") then - allowedCompilers = { - "gcc", - "clang", - } - elseif os.ishost("macosx") then - allowedCompilers = { - "clang", - } - else - error("Unsupported host os", 0) - end - - local usage = 'usage is: package []\n' .. - ' is the name of the release branch to target\n' .. - ' is one of "source" or "binary"\n' .. - ' (default: ' .. allowedCompilers[1] .. ') is one of ' .. table.implode(allowedCompilers, "", "", " ") - - if #_ARGS ~= 2 and #_ARGS ~= 3 then - error(usage, 0) - end - - local branch = _ARGS[1] - local kind = _ARGS[2] - local compiler = _ARGS[3] or allowedCompilers[1] - - if kind ~= "source" and kind ~= "binary" then - print("Invalid package kind: "..kind) - error(usage, 0) - end - - if not table.contains(allowedCompilers, compiler) then - print("Invalid compiler: "..compiler) - error(usage, 0) - end - - local compilerIsVS = compiler:startswith("vs") - --- --- Make sure I've got what I've need to be happy. --- - - local required = { "git" } - - if not compilerIsVS then - table.insert(required, "make") - table.insert(required, compiler) - end - - for _, value in ipairs(required) do - local z = execQuiet("%s --version", value) - if not z then - error("required tool '" .. value .. "' not found", 0) - end - end - - --- --- Figure out what I'm making. --- - - os.chdir("..") - local text = os.outputof(string.format('git show %s:src/host/premake.h', branch)) - local _, _, version = text:find('VERSION%s*"([%w%p]+)"') - - local pkgName = "premake-" .. version - local pkgExt = ".zip" - - if not os.istarget("windows") and kind == "binary" then - pkgExt = ".tar.gz" - end - - --- --- Make sure I'm sure. --- - - printf("") - printf("I am about to create a %s package", kind:upper()) - printf(" ...named release/%s%s", pkgName, pkgExt) - printf(" ...from the %s branch", branch) - printf("") - printf("Does this look right to you? If so, press [Enter] to begin.") - io.read() - - --- --- Pull down the release branch. --- - - print("Preparing release folder") - os.mkdir("release") - os.chdir("release") - os.rmdir(pkgName) - - print("Cloning source code") - local z = execQuiet("git clone .. %s -b %s --recurse-submodules --depth 1 --shallow-submodules", pkgName, branch) - if not z then - error("clone failed", 0) - end - - os.chdir(pkgName) - --- --- Bootstrap Premake in the newly cloned repository --- - - print("Bootstrapping Premake...") - if compilerIsVS then - z = os.execute("Bootstrap.bat " .. compiler) - else - z = os.execute("make -j -f Bootstrap.mak " .. os.host()) - end - if not z then - error("Failed to Bootstrap Premake", 0) - end - local premakeBin = path.translate("./bin/release/premake5") - - --- --- Make absolutely sure the embedded scripts have been updated --- - - print("Updating embedded scripts...") - - local z = execQuiet("%s embed %s", premakeBin, iif(kind == "source", "", "--bytecode")) - if not z then - error("failed to update the embedded scripts", 0) - end - - --- --- Generate a source package. --- - -if kind == "source" then - - local function genProjects(parameters) - if not execQuiet("%s %s", premakeBin, parameters) then - error("failed to generate project for "..parameters, 0) - end - end - - os.rmdir("build") - - print("Generating project files...") - - local ignoreActions = { - "clean", - "embed", - "package", - "self-test", - "test", - "gmake", -- deprecated - } - - local perOSActions = { - "gmake2", - "codelite" - } - - for action in premake.action.each() do - - if not table.contains(ignoreActions, action.trigger) then - if table.contains(perOSActions, action.trigger) then - - local osList = { - { "windows", }, - { "unix", "linux" }, - { "macosx", }, - { "bsd", }, - } - - for _, os in ipairs(osList) do - local osTarget = os[2] or os[1] - genProjects(string.format("--to=build/%s.%s --os=%s %s", action.trigger, os[1], osTarget, action.trigger)) - end - else - genProjects(string.format("--to=build/%s %s", action.trigger, action.trigger)) - end - end - end - - print("Creating source code package...") - - local excludeList = { - ".gitignore", - ".gitattributes", - ".gitmodules", - ".travis.yml", - ".editorconfig", - "appveyor.yml", - "Bootstrap.*", - "packages/*", - } - local includeList = { - "build", - "src/scripts.c", - } - - if not execQuiet("git rm --cached -r -f --ignore-unmatch "..table.concat(excludeList, ' ')) or - not execQuiet("git add -f "..table.concat(includeList, ' ')) or - not execQuiet("git stash") or - not execQuiet("git archive --format=zip -9 -o ../%s-src.zip --prefix=%s/ stash@{0}", pkgName, pkgName) or - not execQuiet("git stash drop stash@{0}") - then - error("failed to archive release", 0) - end - - os.chdir("..") -end - - --- --- Create a binary package for this platform. This step requires a working --- GNU/Make/GCC environment. --- - -if kind == "binary" then - - print("Building binary...") - - os.chdir("bin/release") - - local addCommand = "git add -f premake5%s" - local archiveCommand = "git archive --format=%s -o ../../../%s-%s%s stash@{0} -- ./premake5%s" - - if os.ishost("windows") then - addCommand = string.format(addCommand, ".exe") - archiveCommand = string.format(archiveCommand, "zip -9", pkgName, os.host(), pkgExt, ".exe") - else - addCommand = string.format(addCommand, "") - archiveCommand = string.format(archiveCommand, "tar.gz", pkgName, os.host(), pkgExt, "") - end - - if not execQuiet(addCommand) or - not execQuiet("git stash") or - not execQuiet(archiveCommand) or - not execQuiet("git stash drop stash@{0}") - then - error("failed to archive release", 0) - end - - os.chdir("../../..") - -end - - --- --- Clean up --- - - -- Use RMDIR token instead of os.rmdir to force remove .git dir which has read only files - execQuiet(os.translateCommands("{RMDIR} "..pkgName)) diff --git a/build/premake/premake5/src/_manifest.lua b/build/premake/premake5/src/_manifest.lua deleted file mode 100644 index 113b1575bd..0000000000 --- a/build/premake/premake5/src/_manifest.lua +++ /dev/null @@ -1,72 +0,0 @@ --- --- _manifest.lua --- Manage the list of built-in Premake scripts. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - --- The master list of built-in scripts. Order is important! If you want to --- build a new script into Premake, add it to this list. - - return - { - -- core files - "base/_foundation.lua", - "base/string.lua", - "base/table.lua", - "base/path.lua", - "base/os.lua", - "base/io.lua", - "base/tools.lua", - "base/tree.lua", - "base/globals.lua", - "base/moduledownloader.lua", - "base/semver.lua", - "base/http.lua", - "base/json.lua", - "base/jsonwrapper.lua", - "base/languages.lua", - "base/term.lua", - - -- configuration data - "base/field.lua", - "base/criteria.lua", - "base/detoken.lua", - "base/configset.lua", - "base/context.lua", - "base/container.lua", - - -- runtime switches - "base/option.lua", - "base/action.lua", - - -- project script setup - "base/api.lua", - - -- project objects - "base/global.lua", - "base/workspace.lua", - "base/group.lua", - "base/project.lua", - "base/config.lua", - "base/fileconfig.lua", - "base/rule.lua", - - -- project script processing - "base/oven.lua", - "base/validation.lua", - "base/premake.lua", - "base/help.lua", - - -- tool APIs - "tools/dotnet.lua", - "tools/gcc.lua", - "tools/msc.lua", - "tools/snc.lua", - "tools/clang.lua", - "tools/mingw.lua", - - -- Clean action - "actions/clean/_clean.lua", - - "_premake_init.lua", - } diff --git a/build/premake/premake5/src/_modules.lua b/build/premake/premake5/src/_modules.lua deleted file mode 100644 index 1f51c1baa0..0000000000 --- a/build/premake/premake5/src/_modules.lua +++ /dev/null @@ -1,15 +0,0 @@ --- --- _modules.lua --- The list of core modules to preload on startup --- Copyright (c) 2015 Jason Perkins and the Premake project --- - - return { - "gmake", - "vstudio", - "xcode", - "codelite", - "gmake2", - "d", - "android", - } diff --git a/build/premake/premake5/src/_premake_init.lua b/build/premake/premake5/src/_premake_init.lua deleted file mode 100644 index b82e899c28..0000000000 --- a/build/premake/premake5/src/_premake_init.lua +++ /dev/null @@ -1,1834 +0,0 @@ --- --- _premake_init.lua --- --- Prepares the runtime environment for the add-ons and user project scripts. --- --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local api = p.api - - local DOC_URL = "See https://github.com/premake/premake-core/wiki/" - - ------------------------------------------------------------------------------ --- --- Register the core API functions. --- ------------------------------------------------------------------------------ - - api.register { - name = "architecture", - scope = "config", - kind = "string", - allowed = { - "universal", - p.X86, - p.X86_64, - p.ARM, - p.ARM64, - }, - aliases = { - i386 = p.X86, - amd64 = p.X86_64, - x32 = p.X86, -- these should be DEPRECATED - x64 = p.X86_64, - }, - } - - api.register { - name = "atl", - scope = "config", - kind = "string", - allowed = { - "Off", - "Dynamic", - "Static", - }, - } - - api.register { - name = "basedir", - scope = "project", - kind = "path" - } - - api.register { - name = "buildaction", - scope = "config", - kind = "string", - } - - api.register { - name = "buildcommands", - scope = { "config", "rule" }, - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "buildcustomizations", - scope = "project", - kind = "list:string", - } - - api.register { - name = "builddependencies", - scope = { "rule" }, - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "buildlog", - scope = { "config" }, - kind = "path", - tokens = true, - pathVars = true, - } - - api.register { - name = "buildmessage", - scope = { "config", "rule" }, - kind = "string", - tokens = true, - pathVars = true, - } - - api.register { - name = "buildoptions", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "buildoutputs", - scope = { "config", "rule" }, - kind = "list:path", - tokens = true, - pathVars = false, - } - - api.register { - name = "buildinputs", - scope = "config", - kind = "list:path", - tokens = true, - pathVars = false, - } - - api.register { - name = "buildrule", -- DEPRECATED - scope = "config", - kind = "table", - tokens = true, - } - - api.register { - name = "characterset", - scope = "config", - kind = "string", - allowed = { - "Default", - "ASCII", - "MBCS", - "Unicode", - } - } - - api.register { - name = "cleancommands", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "cleanextensions", - scope = "config", - kind = "list:string", - } - - api.register { - name = "clr", - scope = "config", - kind = "string", - allowed = { - "Off", - "On", - "Pure", - "Safe", - "Unsafe", - } - } - - api.register { - name = "compilebuildoutputs", - scope = "config", - kind = "boolean" - } - - api.register { - name = "compileas", - scope = "config", - kind = "string", - allowed = { - "Default", - "C", - "C++", - "Objective-C", - "Objective-C++", - } - } - - api.register { - name = "configmap", - scope = "project", - kind = "list:keyed:array:string", - } - - api.register { - name = "configurations", - scope = "project", - kind = "list:string", - } - - api.register { - name = "copylocal", - scope = "config", - kind = "list:mixed", - tokens = true, - } - - api.register { - name = "debugargs", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - allowDuplicates = true, - } - - api.register { - name = "debugcommand", - scope = "config", - kind = "path", - tokens = true, - pathVars = true, - } - - api.register { - name = "debugconnectcommands", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "debugdir", - scope = "config", - kind = "path", - tokens = true, - pathVars = true, - } - - api.register { - name = "debugenvs", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "debugextendedprotocol", - scope = "config", - kind = "boolean", - } - - api.register { - name = "debugformat", - scope = "config", - kind = "string", - allowed = { - "Default", - "c7", - "Dwarf", - "SplitDwarf", - }, - } - - api.register { - name = "debugger", - scope = "config", - kind = "string", - allowed = { - "Default", - "GDB", - "LLDB", - } - } - - api.register { - name = "debuggertype", - scope = "config", - kind = "string", - allowed = { - "Mixed", - "NativeOnly", - "ManagedOnly", - } - } - - api.register { - name = "debugpathmap", - scope = "config", - kind = "list:keyed:path", - tokens = true, - } - - api.register { - name = "debugport", - scope = "config", - kind = "integer", - } - - api.register { - name = "debugremotehost", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "debugsearchpaths", - scope = "config", - kind = "list:path", - tokens = true, - } - - api.register { - name = "debugstartupcommands", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "debugtoolargs", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "debugtoolcommand", - scope = "config", - kind = "path", - tokens = true, - pathVars = true, - } - - api.register { - name = "defaultplatform", - scope = "project", - kind = "string", - } - - api.register { - name = "defines", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "dependson", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "disablewarnings", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "display", - scope = "rule", - kind = "string", - } - - api.register { - name = "dpiawareness", - scope = "config", - kind = "string", - allowed = { - "Default", - "None", - "High", - "HighPerMonitor", - } - } - - api.register { - name = "editandcontinue", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off", - }, - } - - api.register { - name = "exceptionhandling", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off", - "SEH", - "CThrow", - }, - } - - api.register { - name = "enablewarnings", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "endian", - scope = "config", - kind = "string", - allowed = { - "Default", - "Little", - "Big", - }, - } - - api.register { - name = "entrypoint", - scope = "config", - kind = "string", - } - - api.register { - name = "fatalwarnings", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "fileextension", - scope = "rule", - kind = "list:string", - } - - api.register { - name = "filename", - scope = { "project", "rule" }, - kind = "string", - tokens = true, - } - - api.register { - name = "files", - scope = "config", - kind = "list:file", - tokens = true, - } - - api.register { - name = "functionlevellinking", - scope = "config", - kind = "boolean" - } - - api.register { - name = "flags", - scope = "config", - kind = "list:string", - allowed = { - "Component", -- DEPRECATED - "DebugEnvsDontMerge", - "DebugEnvsInherit", - "EnableSSE", -- DEPRECATED - "EnableSSE2", -- DEPRECATED - "ExcludeFromBuild", - "ExtraWarnings", -- DEPRECATED - "FatalCompileWarnings", - "FatalLinkWarnings", - "FloatFast", -- DEPRECATED - "FloatStrict", -- DEPRECATED - "LinkTimeOptimization", - "Managed", -- DEPRECATED - "Maps", - "MFC", - "MultiProcessorCompile", - "NativeWChar", -- DEPRECATED - "No64BitChecks", - "NoCopyLocal", - "NoEditAndContinue", -- DEPRECATED - "NoFramePointer", -- DEPRECATED - "NoImplicitLink", - "NoImportLib", - "NoIncrementalLink", - "NoManifest", - "NoMinimalRebuild", - "NoNativeWChar", -- DEPRECATED - "NoPCH", - "NoRuntimeChecks", - "NoBufferSecurityCheck", - "NoWarnings", -- DEPRECATED - "OmitDefaultLibrary", - "Optimize", -- DEPRECATED - "OptimizeSize", -- DEPRECATED - "OptimizeSpeed", -- DEPRECATED - "RelativeLinks", - "ReleaseRuntime", -- DEPRECATED - "ShadowedVariables", - "StaticRuntime", -- DEPRECATED - "Symbols", -- DEPRECATED - "UndefinedIdentifiers", - "WinMain", -- DEPRECATED - "WPF", - "C++11", -- DEPRECATED - "C++14", -- DEPRECATED - "C90", -- DEPRECATED - "C99", -- DEPRECATED - "C11", -- DEPRECATED - }, - aliases = { - FatalWarnings = { "FatalWarnings", "FatalCompileWarnings", "FatalLinkWarnings" }, - Optimise = 'Optimize', - OptimiseSize = 'OptimizeSize', - OptimiseSpeed = 'OptimizeSpeed', - }, - } - - api.register { - name = "floatingpoint", - scope = "config", - kind = "string", - allowed = { - "Default", - "Fast", - "Strict", - } - } - - api.register { - name = "floatingpointexceptions", - scope = "config", - kind = "boolean" - } - - api.register { - name = "inlining", - scope = "config", - kind = "string", - allowed = { - "Default", - "Disabled", - "Explicit", - "Auto" - } - } - - api.register { - name = "callingconvention", - scope = "config", - kind = "string", - allowed = { - "Cdecl", - "FastCall", - "StdCall", - "VectorCall", - } - } - - api.register { - name = "forceincludes", - scope = "config", - kind = "list:mixed", - tokens = true, - } - - api.register { - name = "forceusings", - scope = "config", - kind = "list:file", - tokens = true, - } - - api.register { - name = "fpu", - scope = "config", - kind = "string", - allowed = { - "Software", - "Hardware", - } - } - - api.register { - name = "dotnetframework", - scope = "config", - kind = "string", - } - - api.register { - name = "enabledefaultcompileitems", - scope = "config", - kind = "boolean", - default = false - } - - api.register { - name = "csversion", - scope = "config", - kind = "string", - } - - api.register { - name = "gccprefix", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "ignoredefaultlibraries", - scope = "config", - kind = "list:mixed", - tokens = true, - } - - api.register { - name = "icon", - scope = "project", - kind = "file", - tokens = true, - } - - api.register { - name = "imageoptions", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "imagepath", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "implibdir", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "implibextension", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "implibname", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "implibprefix", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "implibsuffix", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "includedirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "intrinsics", - scope = "config", - kind = "boolean" - } - - api.register { - name = "bindirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "kind", - scope = "config", - kind = "string", - allowed = { - "ConsoleApp", - "Makefile", - "None", - "SharedLib", - "StaticLib", - "WindowedApp", - "Utility", - "SharedItems", - }, - } - - api.register { - name = "sharedlibtype", - scope = "project", - kind = "string", - allowed = { - "OSXBundle", - "OSXFramework", - "XCTest", - }, - } - - api.register { - name = "language", - scope = "project", - kind = "string", - allowed = { - "C", - "C++", - "C#", - "F#" - } - } - - api.register { - name = "cdialect", - scope = "config", - kind = "string", - allowed = { - "Default", - "C89", - "C90", - "C99", - "C11", - "gnu89", - "gnu90", - "gnu99", - "gnu11", - } - } - - api.register { - name = "cppdialect", - scope = "config", - kind = "string", - allowed = { - "Default", - "C++latest", - "C++98", - "C++0x", - "C++11", - "C++1y", - "C++14", - "C++1z", - "C++17", - "gnu++98", - "gnu++0x", - "gnu++11", - "gnu++1y", - "gnu++14", - "gnu++1z", - "gnu++17", - } - } - - api.register { - name = "libdirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "frameworkdirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "linkbuildoutputs", - scope = "config", - kind = "boolean" - } - - api.register { - name = "linkoptions", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "links", - scope = "config", - kind = "list:mixed", - tokens = true, - } - - api.register { - name = "linkgroups", - scope = "config", - kind = "string", - allowed = { - "Off", - "On", - } - } - - api.register { - name = "locale", - scope = "config", - kind = "string", - tokens = false, - } - - api.register { - name = "location", - scope = { "project", "rule" }, - kind = "path", - tokens = true, - } - - api.register { - name = "makesettings", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "namespace", - scope = "project", - kind = "string", - tokens = true, - } - - api.register { - name = "nativewchar", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off", - } - } - - api.register { - name = "nuget", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "nugetsource", - scope = "project", - kind = "string", - tokens = true, - } - - api.register { - name = "objdir", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "optimize", - scope = "config", - kind = "string", - allowed = { - "Off", - "On", - "Debug", - "Size", - "Speed", - "Full", - } - } - - api.register { - name = "runpathdirs", - scope = "config", - kind = "list:path", - tokens = true, - } - - api.register { - name = "runtime", - scope = "config", - kind = "string", - allowed = { - "Debug", - "Release", - } - } - - api.register { - name = "pchheader", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "pchsource", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "pic", - scope = "config", - kind = "string", - allowed = { - "Off", - "On", - } - } - - api.register { - name = "platforms", - scope = "project", - kind = "list:string", - } - - api.register { - name = "postbuildcommands", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - allowDuplicates = true, - } - - api.register { - name = "postbuildmessage", - scope = "config", - kind = "string", - tokens = true, - pathVars = true, - } - - api.register { - name = "prebuildcommands", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - allowDuplicates = true, - } - - api.register { - name = "prebuildmessage", - scope = "config", - kind = "string", - tokens = true, - pathVars = true, - } - - api.register { - name = "prelinkcommands", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "prelinkmessage", - scope = "config", - kind = "string", - tokens = true, - pathVars = true, - } - - api.register { - name = "propertydefinition", - scope = "rule", - kind = "list:table", - } - - api.register { - name = "rebuildcommands", - scope = "config", - kind = "list:string", - tokens = true, - pathVars = true, - } - - api.register { - name = "resdefines", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "resincludedirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "resoptions", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "resourcegenerator", - scope = "project", - kind = "string", - allowed = { - "internal", - "public" - } - } - - api.register { - name = "rtti", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off", - }, - } - - api.register { - name = "rules", - scope = "project", - kind = "list:string", - } - - api.register { - name = "startproject", - scope = "workspace", - kind = "string", - tokens = true, - } - - api.register { - name = "staticruntime", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off" - } - } - - api.register { - name = "strictaliasing", - scope = "config", - kind = "string", - allowed = { - "Off", - "Level1", - "Level2", - "Level3", - } - } - - api.register { - name = "stringpooling", - scope = "config", - kind = "boolean" - } - - api.register { - name = "symbols", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off", - "FastLink", -- Visual Studio 2015+ only, considered 'On' for all other cases. - "Full", -- Visual Studio 2017+ only, considered 'On' for all other cases. - }, - } - - api.register { - name = "symbolspath", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "sysincludedirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "syslibdirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "system", - scope = "config", - kind = "string", - allowed = { - "aix", - "bsd", - "haiku", - "ios", - "linux", - "macosx", - "solaris", - "wii", - "windows", - }, - } - - api.register { - name = "systemversion", - scope = "config", - kind = "string", - } - - api.register { - name = "tags", - scope = "config", - kind = "list:string", - } - - api.register { - name = "tailcalls", - scope = "config", - kind = "boolean" - } - - api.register { - name = "targetdir", - scope = "config", - kind = "path", - tokens = true, - } - - api.register { - name = "targetextension", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "targetname", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "targetprefix", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "targetsuffix", - scope = "config", - kind = "string", - tokens = true, - } - - api.register { - name = "toolset", - scope = "config", - kind = "string", - allowed = function(value) - value = value:lower() - local tool, version = p.tools.canonical(value) - if tool then - return p.tools.normalize(value) - else - return nil - end - end, - } - - api.register { - name = "customtoolnamespace", - scope = "config", - kind = "string", - } - - api.register { - name = "undefines", - scope = "config", - kind = "list:string", - tokens = true, - } - - api.register { - name = "usingdirs", - scope = "config", - kind = "list:directory", - tokens = true, - } - - api.register { - name = "uuid", - scope = "project", - kind = "string", - allowed = function(value) - local ok = true - if (#value ~= 36) then ok = false end - for i=1,36 do - local ch = value:sub(i,i) - if (not ch:find("[ABCDEFabcdef0123456789-]")) then ok = false end - end - if (value:sub(9,9) ~= "-") then ok = false end - if (value:sub(14,14) ~= "-") then ok = false end - if (value:sub(19,19) ~= "-") then ok = false end - if (value:sub(24,24) ~= "-") then ok = false end - if (not ok) then - return nil, "invalid UUID" - end - return value:upper() - end - } - - api.register { - name = "vectorextensions", - scope = "config", - kind = "string", - allowed = { - "Default", - "AVX", - "AVX2", - "IA32", - "SSE", - "SSE2", - "SSE3", - "SSSE3", - "SSE4.1", - } - } - - api.register { - name = "isaextensions", - scope = "config", - kind = "list:string", - allowed = { - "MOVBE", - "POPCNT", - "PCLMUL", - "LZCNT", - "BMI", - "BMI2", - "F16C", - "AES", - "FMA", - "FMA4", - "RDRND", - } - } - - api.register { - name = "vpaths", - scope = "project", - kind = "list:keyed:list:path", - tokens = true, - pathVars = true, - } - - api.register { - name = "warnings", - scope = "config", - kind = "string", - allowed = { - "Off", - "Default", - "High", - "Extra", - } - } - - api.register { - name = "largeaddressaware", - scope = "config", - kind = "boolean", - } - - api.register { - name = "editorintegration", - scope = "workspace", - kind = "boolean", - } - - api.register { - name = "preferredtoolarchitecture", - scope = "workspace", - kind = "string", - allowed = { - "Default", - p.X86, - p.X86_64, - } - } - - api.register { - name = "unsignedchar", - scope = "config", - kind = "boolean", - } - - p.api.register { - name = "structmemberalign", - scope = "config", - kind = "integer", - allowed = { - "1", - "2", - "4", - "8", - "16", - } - } - - api.register { - name = "omitframepointer", - scope = "config", - kind = "string", - allowed = { - "Default", - "On", - "Off" - } - } - - api.register { - name = "visibility", - scope = "config", - kind = "string", - allowed = { - "Default", - "Hidden", - "Internal", - "Protected" - } - } - - api.register { - name = "inlinesvisibility", - scope = "config", - kind = "string", - allowed = { - "Default", - "Hidden" - } - } - - api.register { - name = "assemblydebug", - scope = "config", - kind = "boolean" - } - ------------------------------------------------------------------------------ --- --- Field name aliases for backward compatibility --- ------------------------------------------------------------------------------ - - api.alias("buildcommands", "buildCommands") - api.alias("builddependencies", "buildDependencies") - api.alias("buildmessage", "buildMessage") - api.alias("buildoutputs", "buildOutputs") - api.alias("cleanextensions", "cleanExtensions") - api.alias("dotnetframework", "framework") - api.alias("editandcontinue", "editAndContinue") - api.alias("fileextension", "fileExtension") - api.alias("propertydefinition", "propertyDefinition") - api.alias("removefiles", "excludes") - - ------------------------------------------------------------------------------ --- --- Handlers for deprecated fields and values. --- ------------------------------------------------------------------------------ - - -- 13 Apr 2017 - - api.deprecateField("buildrule", 'Use `buildcommands`, `buildoutputs`, and `buildmessage` instead.', - function(value) - if value.description then - buildmessage(value.description) - end - buildcommands(value.commands) - buildoutputs(value.outputs) - end) - - - api.deprecateValue("flags", "Component", 'Use `buildaction "Component"` instead.', - function(value) - buildaction "Component" - end) - - - api.deprecateValue("flags", "EnableSSE", 'Use `vectorextensions "SSE"` instead.', - function(value) - vectorextensions("SSE") - end, - function(value) - vectorextensions "Default" - end) - - - api.deprecateValue("flags", "EnableSSE2", 'Use `vectorextensions "SSE2"` instead.', - function(value) - vectorextensions("SSE2") - end, - function(value) - vectorextensions "Default" - end) - - - api.deprecateValue("flags", "FloatFast", 'Use `floatingpoint "Fast"` instead.', - function(value) - floatingpoint("Fast") - end, - function(value) - floatingpoint "Default" - end) - - - api.deprecateValue("flags", "FloatStrict", 'Use `floatingpoint "Strict"` instead.', - function(value) - floatingpoint("Strict") - end, - function(value) - floatingpoint "Default" - end) - - - api.deprecateValue("flags", "NativeWChar", 'Use `nativewchar "On"` instead."', - function(value) - nativewchar("On") - end, - function(value) - nativewchar "Default" - end) - - - api.deprecateValue("flags", "NoNativeWChar", 'Use `nativewchar "Off"` instead."', - function(value) - nativewchar("Off") - end, - function(value) - nativewchar "Default" - end) - - - api.deprecateValue("flags", "Optimize", 'Use `optimize "On"` instead.', - function(value) - optimize ("On") - end, - function(value) - optimize "Off" - end) - - - api.deprecateValue("flags", "OptimizeSize", 'Use `optimize "Size"` instead.', - function(value) - optimize ("Size") - end, - function(value) - optimize "Off" - end) - - - api.deprecateValue("flags", "OptimizeSpeed", 'Use `optimize "Speed"` instead.', - function(value) - optimize ("Speed") - end, - function(value) - optimize "Off" - end) - - - api.deprecateValue("flags", "ReleaseRuntime", 'Use `runtime "Release"` instead.', - function(value) - runtime "Release" - end, - function(value) - end) - - - api.deprecateValue("flags", "ExtraWarnings", 'Use `warnings "Extra"` instead.', - function(value) - warnings "Extra" - end, - function(value) - warnings "Default" - end) - - - api.deprecateValue("flags", "NoWarnings", 'Use `warnings "Off"` instead.', - function(value) - warnings "Off" - end, - function(value) - warnings "Default" - end) - - api.deprecateValue("flags", "Managed", 'Use `clr "On"` instead.', - function(value) - clr "On" - end, - function(value) - clr "Off" - end) - - - api.deprecateValue("flags", "NoEditAndContinue", 'Use editandcontinue "Off"` instead.', - function(value) - editandcontinue "Off" - end, - function(value) - editandcontinue "On" - end) - - - -- 21 June 2016 - - api.deprecateValue("flags", "Symbols", 'Use `symbols "On"` instead', - function(value) - symbols "On" - end, - function(value) - symbols "Default" - end) - - - -- 31 January 2017 - - api.deprecateValue("flags", "C++11", 'Use `cppdialect "C++11"` instead', - function(value) - cppdialect "C++11" - end, - function(value) - cppdialect "Default" - end) - - api.deprecateValue("flags", "C++14", 'Use `cppdialect "C++14"` instead', - function(value) - cppdialect "C++14" - end, - function(value) - cppdialect "Default" - end) - - api.deprecateValue("flags", "C90", 'Use `cdialect "gnu90"` instead', - function(value) - cdialect "gnu90" - end, - function(value) - cdialect "Default" - end) - - api.deprecateValue("flags", "C99", 'Use `cdialect "gnu99"` instead', - function(value) - cdialect "gnu99" - end, - function(value) - cdialect "Default" - end) - - api.deprecateValue("flags", "C11", 'Use `cdialect "gnu11"` instead', - function(value) - cdialect "gnu11" - end, - function(value) - cdialect "Default" - end) - - - -- 13 April 2017 - - api.deprecateValue("flags", "WinMain", 'Use `entrypoint "WinMainCRTStartup"` instead', - function(value) - entrypoint "WinMainCRTStartup" - end, - function(value) - entrypoint "mainCRTStartup" - end) - - -- 31 October 2017 - - api.deprecateValue("flags", "StaticRuntime", 'Use `staticruntime "On"` instead', - function(value) - staticruntime "On" - end, - function(value) - staticruntime "Default" - end) - - -- 08 April 2018 - - api.deprecateValue("flags", "NoFramePointer", 'Use `omitframepointer "On"` instead.', - function(value) - omitframepointer("On") - end, - function(value) - omitframepointer("Default") - end) - ------------------------------------------------------------------------------ --- --- Install Premake's default set of command line arguments. --- ------------------------------------------------------------------------------ - - newoption - { - category = "compilers", - trigger = "cc", - value = "VALUE", - description = "Choose a C/C++ compiler set", - allowed = { - { "clang", "Clang (clang)" }, - { "gcc", "GNU GCC (gcc/g++)" }, - { "mingw", "MinGW GCC (gcc/g++)" }, - } - } - - newoption - { - category = "compilers", - trigger = "dotnet", - value = "VALUE", - description = "Choose a .NET compiler set", - allowed = { - { "msnet", "Microsoft .NET (csc)" }, - { "mono", "Novell Mono (mcs)" }, - { "pnet", "Portable.NET (cscc)" }, - } - } - - newoption - { - trigger = "fatal", - description = "Treat warnings from project scripts as errors" - } - - newoption - { - trigger = "debugger", - description = "Start MobDebug remote debugger. Works with ZeroBrane Studio" - } - - newoption - { - trigger = "file", - value = "FILE", - description = "Read FILE as a Premake script; default is 'premake5.lua'" - } - - newoption - { - trigger = "help", - description = "Display this information" - } - - newoption - { - trigger = "verbose", - description = "Generate extra debug text output" - } - - newoption - { - trigger = "interactive", - description = "Interactive command prompt" - } - - newoption - { - trigger = "os", - value = "VALUE", - description = "Generate files for a different operating system", - allowed = { - { "aix", "IBM AIX" }, - { "bsd", "OpenBSD, NetBSD, or FreeBSD" }, - { "haiku", "Haiku" }, - { "hurd", "GNU/Hurd" }, - { "ios", "iOS" }, - { "linux", "Linux" }, - { "macosx", "Apple Mac OS X" }, - { "solaris", "Solaris" }, - { "windows", "Microsoft Windows" }, - } - } - - newoption - { - trigger = "scripts", - value = "PATH", - description = "Search for additional scripts on the given path" - } - - newoption - { - trigger = "systemscript", - value = "FILE", - description = "Override default system script (premake5-system.lua)" - } - - newoption - { - trigger = "version", - description = "Display version information" - } - - if http ~= nil then - newoption { - trigger = "insecure", - description = "forfit SSH certification checks." - } - end - - ------------------------------------------------------------------------------ --- --- Set up the global environment for the systems I know about. I would like --- to see at least some if not all of this moved into add-ons in the future. --- ------------------------------------------------------------------------------ - - characterset "Default" - clr "Off" - editorintegration "Off" - exceptionhandling "Default" - rtti "Default" - symbols "Default" - nugetsource "https://api.nuget.org/v3/index.json" - - -- Setting a default language makes some validation easier later - - language "C++" - - -- Use Posix-style target naming by default, since it is the most common. - - filter { "kind:SharedLib" } - targetprefix "lib" - targetextension ".so" - - filter { "kind:StaticLib" } - targetprefix "lib" - targetextension ".a" - - -- Add variations for other Posix-like systems. - - filter { "system:darwin", "kind:WindowedApp" } - targetextension ".app" - - filter { "system:darwin", "kind:SharedLib" } - targetextension ".dylib" - - filter { "system:darwin", "kind:SharedLib", "sharedlibtype:OSXBundle" } - targetprefix "" - targetextension ".bundle" - - filter { "system:darwin", "kind:SharedLib", "sharedlibtype:OSXFramework" } - targetprefix "" - targetextension ".framework" - - filter { "system:darwin", "kind:SharedLib", "sharedlibtype:XCTest" } - targetprefix "" - targetextension ".xctest" - - -- Windows and friends. - - filter { "system:Windows or language:C# or language:F#", "kind:ConsoleApp or WindowedApp" } - targetextension ".exe" - - filter { "system:Windows", "kind:SharedLib" } - targetprefix "" - targetextension ".dll" - implibextension ".lib" - - filter { "system:Windows", "kind:StaticLib" } - targetprefix "" - targetextension ".lib" - - filter { "language:C# or language:F#", "kind:SharedLib" } - targetprefix "" - targetextension ".dll" - implibextension ".dll" - - filter { "kind:SharedLib", "system:not Windows" } - pic "On" - - filter { "system:darwin" } - toolset "clang" - - filter { "platforms:Win64" } - architecture "x86_64" - - filter {} diff --git a/build/premake/premake5/src/_premake_main.lua b/build/premake/premake5/src/_premake_main.lua deleted file mode 100644 index b2c159f1c3..0000000000 --- a/build/premake/premake5/src/_premake_main.lua +++ /dev/null @@ -1,394 +0,0 @@ --- --- _premake_main.lua --- Script-side entry point for the main program logic. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - - local shorthelp = "Type 'premake5 --help' for help" - local versionhelp = "premake5 (Premake Build Script Generator) %s" - local startTime = os.clock() - --- set a global. - _PREMAKE_STARTTIME = startTime - --- Load the collection of core scripts, required for everything else to work - - local modules = dofile("_modules.lua") - local manifest = dofile("_manifest.lua") - for i = 1, #manifest do - dofile(manifest[i]) - end - - --- Create namespaces for myself - - local p = premake - p.main = {} - - local m = p.main - - --- Keep a table of modules that have been preloaded, and their associated --- "should load" test functions. - - m._preloaded = {} - - ---- --- Add a new module loader that knows how to use the Premake paths like --- PREMAKE_PATH and the --scripts option, and follows the module/module.lua --- naming convention. ---- - - function m.installModuleLoader() - if not os.ishost('windows') then - local premakeDir = path.getdirectory(_PREMAKE_COMMAND) - package.cpath = package.cpath .. ';' .. premakeDir .. '/?.so' - end - table.insert(package.searchers, 2, m.moduleLoader) - end - - function m.moduleLoader(name) - local dir = path.getdirectory(name) - local base = path.getname(name) - - if dir ~= "." then - dir = dir .. "/" .. base - else - dir = base - end - - local full = dir .. "/" .. base .. ".lua" - - -- list of paths where to look for the module - local paths = { - ".modules/" .. full, - "modules/" .. full, - full, - name .. ".lua" - } - - -- try to locate the module - for _, p in ipairs(paths) do - local file = os.locate(p) - if file then - local chunk, err = loadfile(file) - if chunk then - return chunk - end - if err then - return "\n\tload error " .. err - end - end - end - - -- didn't find the module in supported paths, try the embedded scripts - for _, p in ipairs(paths) do - local chunk, err = loadfile("$/" .. p) - if chunk then - return chunk - end - end - end - - ---- --- Prepare the script environment; anything that should be done --- before the system script gets a chance to run. ---- - - function m.prepareEnvironment() - math.randomseed(os.time()) - _PREMAKE_DIR = path.getdirectory(_PREMAKE_COMMAND) - p.path = p.path .. ";" .. _PREMAKE_DIR .. ";" .. _MAIN_SCRIPT_DIR - end - - ---- --- Load the required core modules that are shipped as part of Premake and --- expected to be present at startup. If a _preload.lua script is present, --- that script is run and the return value (a "should load" test) is cached --- to be called after baking is complete. Otherwise the module's main script --- is run immediately. ---- - - function m.preloadModules() - for i = 1, #modules do - local name = modules[i] - local preloader = name .. "/_preload.lua" - preloader = os.locate("modules/" .. preloader) or os.locate(preloader) - if preloader then - m._preloaded[name] = include(preloader) - if not m._preloaded[name] then - p.warn("module '%s' should return function from _preload.lua", name) - end - else - require(name) - end - end - end - - ---- --- Look for and run the system-wide configuration script; make sure any --- configuration scoping gets cleared before continuing. ---- - - function m.runSystemScript() - dofileopt(_OPTIONS["systemscript"] or { "premake5-system.lua", "premake-system.lua" }) - filter {} - end - - ---- --- Look for a user project script, and set up the related global --- variables if I can find one. ---- - - function m.locateUserScript() - local defaults = { "premake5.lua", "premake4.lua" } - for i = 1, #defaults do - if os.isfile(defaults[i]) then - _MAIN_SCRIPT = defaults[i] - break - end - end - - if not _MAIN_SCRIPT then - _MAIN_SCRIPT = defaults[1] - end - - if _OPTIONS.file then - _MAIN_SCRIPT = _OPTIONS.file - end - - _MAIN_SCRIPT = path.getabsolute(_MAIN_SCRIPT) - _MAIN_SCRIPT_DIR = path.getdirectory(_MAIN_SCRIPT) - end - - ---- --- Set the action to be performed from the command line arguments. ---- - - function m.prepareAction() - -- The "next-gen" actions have now replaced their deprecated counterparts. - -- Provide a warning for a little while before I remove them entirely. - if _ACTION and _ACTION:endswith("ng") then - p.warnOnce(_ACTION, "'%s' has been deprecated; use '%s' instead", _ACTION, _ACTION:sub(1, -3)) - end - p.action.set(_ACTION) - - -- Allow the action to initialize stuff. - local action = p.action.current() - if action then - p.action.initialize(action.trigger) - end - end - - ---- --- If there is a project script available, run it to get the --- project information, available options and actions, etc. ---- - - function m.runUserScript() - if os.isfile(_MAIN_SCRIPT) then - dofile(_MAIN_SCRIPT) - end - end - - ---- --- Run the interactive prompt, if requested. ---- - - function m.checkInteractive() - if _OPTIONS.interactive then - debug.prompt() - end - end - - ---- --- Validate and process the command line options and arguments. ---- - - function m.processCommandLine() - -- Process special options - if (_OPTIONS["version"]) then - printf(versionhelp, _PREMAKE_VERSION) - os.exit(0) - end - - if (_OPTIONS["help"]) then - p.showhelp() - os.exit(1) - end - - -- Validate the command-line arguments. This has to happen after the - -- script has run to allow for project-specific options - ok, err = p.option.validate(_OPTIONS) - if not ok then - print("Error: " .. err) - os.exit(1) - end - - -- If no further action is possible, show a short help message - if not _OPTIONS.interactive then - if not _ACTION then - print(shorthelp) - os.exit(1) - end - - local action = p.action.current() - if not action then - print("Error: no such action '" .. _ACTION .. "'") - os.exit(1) - end - - if p.action.isConfigurable() and not os.isfile(_MAIN_SCRIPT) then - print(string.format("No Premake script (%s) found!", path.getname(_MAIN_SCRIPT))) - os.exit(1) - end - end - end - ---- --- Start up MobDebug and try to hook up with ZeroBrane ---- - - function m.tryHookDebugger() - - if (_OPTIONS["debugger"]) then - print("Loading luasocket...") - require('luasocket') - print("Starting debugger...") - local mobdebug = require('mobdebug') - mobdebug.start() - - end - end - ---- --- Override point, for logic that should run before baking. ---- - - function m.preBake() - if p.action.isConfigurable() then - print("Building configurations...") - end - end - - ---- --- "Bake" the project information, preparing it for use by the action. ---- - - function m.bake() - if p.action.isConfigurable() then - p.oven.bake() - end - end - - ---- --- Override point, for logic that should run after baking but before --- the configurations are validated. ---- - - function m.postBake() - local function shouldLoad(func) - for wks in p.global.eachWorkspace() do - for prj in p.workspace.eachproject(wks) do - for cfg in p.project.eachconfig(prj) do - if func(cfg) then - return true - end - end - end - end - end - - -- any modules need to load to support this project? - for module, func in pairs(m._preloaded) do - if not package.loaded[module] and shouldLoad(func) then - require(module) - end - end - end - - ---- --- Sanity check the current project setup. ---- - - function m.validate() - if p.action.isConfigurable() then - p.container.validate(p.api.rootContainer()) - end - end - - ---- --- Override point, for logic that should run after validation and --- before the action takes control. ---- - - function m.preAction() - local action = p.action.current() - printf("Running action '%s'...", action.trigger) - end - - ---- --- Hand over control to the action. ---- - - function m.callAction() - local action = p.action.current() - p.action.call(action.trigger) - end - - ---- --- Processing is complete. ---- - - function m.postAction() - if p.action.isConfigurable() then - local duration = math.floor((os.clock() - startTime) * 1000); - printf("Done (%dms).", duration) - end - end - - - --- --- Script-side program entry point. --- - - m.elements = { - m.tryHookDebugger, - m.installModuleLoader, - m.locateUserScript, - m.prepareEnvironment, - m.preloadModules, - m.runSystemScript, - m.prepareAction, - m.runUserScript, - m.checkInteractive, - m.processCommandLine, - m.preBake, - m.bake, - m.postBake, - m.validate, - m.preAction, - m.callAction, - m.postAction, - } - - function _premake_main() - p.callArray(m.elements) - return 0 - end diff --git a/build/premake/premake5/src/actions/clean/_clean.lua b/build/premake/premake5/src/actions/clean/_clean.lua deleted file mode 100644 index e82f4bd7ce..0000000000 --- a/build/premake/premake5/src/actions/clean/_clean.lua +++ /dev/null @@ -1,21 +0,0 @@ --- --- _clean.lua --- The "clean" action: removes all generated files. --- Copyright (c) 2002-2012 Jason Perkins and the Premake project --- - - premake.clean = {} - - --- --- Register the "clean" action. --- - - newaction { - trigger = "clean", - description = "Remove all binaries and generated files", - - execute = function() - print("** The clean action has not yet been ported") - end - } diff --git a/build/premake/premake5/src/base/_foundation.lua b/build/premake/premake5/src/base/_foundation.lua deleted file mode 100644 index ae4102ef43..0000000000 --- a/build/premake/premake5/src/base/_foundation.lua +++ /dev/null @@ -1,438 +0,0 @@ ---- --- Base definitions required by all the other scripts. --- @copyright 2002-2015 Jason Perkins and the Premake project ---- - - premake = premake or {} - premake._VERSION = _PREMAKE_VERSION - package.loaded["premake"] = premake - - premake.modules = {} - premake.extensions = premake.modules - - local semver = dofile('semver.lua') - local p = premake - - --- Keep track of warnings that have been shown, so they don't get shown twice - - local _warnings = {} - --- Keep track of aliased functions, so I can resolve to canonical names - - local _aliases = {} - --- --- Define some commonly used symbols, for future-proofing. --- - - premake.C = "C" - premake.C7 = "c7" - premake.CLANG = "clang" - premake.CONSOLEAPP = "ConsoleApp" - premake.CPP = "C++" - premake.CSHARP = "C#" - premake.GCC = "gcc" - premake.HAIKU = "haiku" - premake.ANDROID = "android" - premake.IOS = "ios" - premake.LINUX = "linux" - premake.MACOSX = "macosx" - premake.MAKEFILE = "Makefile" - premake.MBCS = "MBCS" - premake.NONE = "None" - premake.DEFAULT = "Default" - premake.OBJECTIVEC = "Objective-C" - premake.OBJECTIVECPP = "Objective-C++" - premake.ON = "On" - premake.OFF = "Off" - premake.POSIX = "posix" - premake.PS3 = "ps3" - premake.SHAREDITEMS = "SharedItems" - premake.SHAREDLIB = "SharedLib" - premake.STATICLIB = "StaticLib" - premake.UNICODE = "Unicode" - premake.UNIVERSAL = "universal" - premake.UTILITY = "Utility" - premake.PACKAGING = "Packaging" - premake.WINDOWEDAPP = "WindowedApp" - premake.WINDOWS = "windows" - premake.X86 = "x86" - premake.X86_64 = "x86_64" - premake.ARM = "ARM" - premake.ARM64 = "ARM64" - - - ---- --- Provide an alias for a function in a namespace. Calls to the alias will --- invoke the canonical function, and attempts to override the alias will --- instead override the canonical call. --- --- @param scope --- The table containing the function to be overridden. Use _G for --- global functions. --- @param canonical --- The name of the function to be aliased (a string value) --- @param alias --- The new alias for the function (another string value). ---- - - function p.alias(scope, canonical, alias) - scope, canonical = p.resolveAlias(scope, canonical) - if not scope[canonical] then - error("unable to alias '" .. canonical .. "'; no such function", 2) - end - - _aliases[scope] = _aliases[scope] or {} - _aliases[scope][alias] = canonical - - scope[alias] = function(...) - return scope[canonical](...) - end - end - - - ---- --- Call a list of functions. --- --- @param funcs --- The list of functions to be called, or a function that can be called --- to build and return the list. If this is a function, it will be called --- with all of the additional arguments (below). --- @param ... --- An optional set of arguments to be passed to each of the functions as --- as they are called. ---- - - function premake.callArray(funcs, ...) - if type(funcs) == "function" then - funcs = funcs(...) - end - if funcs then - for i = 1, #funcs do - funcs[i](...) - end - end - end - - - -- TODO: THIS IMPLEMENTATION IS GOING AWAY - - function premake.callarray(namespace, array, ...) - local n = #array - for i = 1, n do - local fn = namespace[array[i]] - if not fn then - error(string.format("Unable to find function '%s'", array[i])) - end - fn(...) - end - - end - - - ---- --- Compare a version string that uses semver semantics against a --- version comparision string. Comparisions take the form of ">=5.0" (5.0 or --- later), "5.0" (5.0 or later), ">=5.0 <6.0" (5.0 or later but not 6.0 or --- later). --- --- @param version --- The version to be tested. --- @param checks --- The comparision string to be evaluated. --- @return --- True if the comparisions pass, false if any fail. ---- - - function p.checkVersion(version, checks) - if not version then - return false - end - - -- try to parse semver, if it fails, it's not semver compatible and we cannot compare, in which case - -- we're going to ignore the checkVersion entirely, but warn. - if not premake.isSemVer(version) then - p.warn("'" .. version .. "' is not semver compatible, and cannot be compared against '" .. checks .. "'."); - return true - end - - -- now compare the semver against the checks. - local function eq(a, b) return a == b end - local function le(a, b) return a <= b end - local function lt(a, b) return a < b end - local function ge(a, b) return a >= b end - local function gt(a, b) return a > b end - local function compat(a, b) return a ^ b end - - version = semver(version) - checks = string.explode(checks, " ", true) - for i = 1, #checks do - local check = checks[i] - local func - if check:startswith(">=") then - func = ge - check = check:sub(3) - elseif check:startswith(">") then - func = gt - check = check:sub(2) - elseif check:startswith("<=") then - func = le - check = check:sub(3) - elseif check:startswith("<") then - func = lt - check = check:sub(2) - elseif check:startswith("=") then - func = eq - check = check:sub(2) - elseif check:startswith("^") then - func = compat - check = check:sub(2) - else - func = ge - end - - check = semver(check) - if not func(version, check) then - return false - end - end - - return true - end - - - - function premake.clearWarnings() - _warnings = {} - end - - - --- --- Raise an error, with a formatted message built from the provided --- arguments. --- --- @param message --- The error message, which may contain string formatting tokens. --- @param ... --- Values to fill in the string formatting tokens. --- - - function premake.error(message, ...) - error(string.format("** Error: " .. message, ...), 0) - end - - --- --- Finds the correct premake script filename to be run. --- --- @param fname --- The filename of the script to run. --- @return --- The correct location and filename of the script to run. --- - - function premake.findProjectScript(fname) - return os.locate(fname, fname .. ".lua", path.join(fname, "premake5.lua"), path.join(fname, "premake4.lua")) - end - - ---- --- "Immediate If" - returns one of the two values depending on the value --- of the provided condition. Note that both the true and false expressions --- will be evaluated regardless of the condition, even if only one result --- is returned. --- --- @param condition --- A boolean condition, determining which value gets returned. --- @param trueValue --- The value to return if the condition is true. --- @param falseValue --- The value to return if the condition is false. --- @return --- One of trueValue or falseValue. ---- - - function iif(condition, trueValue, falseValue) - if condition then - return trueValue - else - return falseValue - end - end - - - ---- --- Override an existing function with a new implementation; the original --- function is passed as the first argument to the replacement when called. --- --- @param scope --- The table containing the function to be overridden. Use _G for --- global functions. --- @param name --- The name of the function to override (a string value). --- @param repl --- The replacement function. The first argument to the function --- will be the original implementation, followed by the arguments --- passed to the original call. ---- - - function premake.override(scope, name, repl) - scope, name = p.resolveAlias(scope, name) - - local original = scope[name] - if not original then - error("unable to override '" .. name .. "'; no such function", 2) - end - - scope[name] = function(...) - return repl(original, ...) - end - - -- Functions from premake.main are special in that they are fetched - -- from an array, which can be modified by system and project scripts, - -- instead of a function which would have already been called before - -- those scripts could have run. Since the array will have already - -- been evaluated by the time override() is called, the new value - -- won't be picked up as it would with the function-fetched call - -- lists. Special case the workaround for that here so everyone else - -- can just override without having to think about the difference. - if scope == premake.main then - table.replace(premake.main.elements, original, scope[name]) - end - end - - - ---- --- Find the canonical name and scope of a function, resolving any aliases. --- --- @param scope --- The table containing the function to be overridden. Use _G for --- global functions. --- @param name --- The name of the function to resolve. --- @return --- The canonical scope and function name (a string value). ---- - - function p.resolveAlias(scope, name) - local aliases = _aliases[scope] - if aliases then - while aliases[name] do - name = aliases[name] - end - end - return scope, name - end - - - --- --- Display a warning, with a formatted message built from the provided --- arguments. --- --- @param message --- The warning message, which may contain string formatting tokens. --- @param ... --- Values to fill in the string formatting tokens. --- - - function premake.warn(message, ...) - message = string.format(message, ...) - if _OPTIONS.fatal then - error(message) - else - term.pushColor(term.warningColor) - io.stderr:write(string.format("** Warning: " .. message .. "\n", ...)) - term.popColor(); - end - end - - --- --- Displays a warning just once per run. --- --- @param key --- A unique key to identify this warning. Subsequent warnings messages --- using the same key will not be shown. --- @param message --- The warning message, which may contain string formatting tokens. --- @param ... --- Values to fill in the string formatting tokens. --- - - function premake.warnOnce(key, message, ...) - if not _warnings[key] then - _warnings[key] = true - premake.warn(message, ...) - end - end - - --- --- Display information in the term.infoColor color. --- --- @param message --- The info message, which may contain string formatting tokens. --- @param ... --- Values to fill in the string formatting tokens. --- - - function premake.info(message, ...) - message = string.format(message, ...) - term.pushColor(term.infoColor) - io.stdout:write(string.format("** Info: " .. message .. "\n", ...)) - term.popColor(); - end - - - --- --- A shortcut for printing formatted output. --- - - function printf(msg, ...) - print(string.format(msg, ...)) - end - --- --- A shortcut for printing formatted output in verbose mode. --- - function verbosef(msg, ...) - if _OPTIONS.verbose then - print(string.format(msg, ...)) - end - end - - --- --- make a string from debug.getinfo information. --- - function filelineinfo(level) - local info = debug.getinfo(level+1, "Sl") - if info == nil then - return nil - end - if info.what == "C" then - return "C function" - else - local sep = iif(os.ishost('windows'), '\\', '/') - return string.format("%s(%d)", path.translate(info.short_src, sep), info.currentline) - end - end - - ---- --- check if version is semver. ---- - - function premake.isSemVer(version) - local sMajor, sMinor, sPatch, sPrereleaseAndBuild = version:match("^(%d+)%.?(%d*)%.?(%d*)(.-)$") - return (type(sMajor) == 'string') - end diff --git a/build/premake/premake5/src/base/action.lua b/build/premake/premake5/src/base/action.lua deleted file mode 100644 index 710b5c6906..0000000000 --- a/build/premake/premake5/src/base/action.lua +++ /dev/null @@ -1,278 +0,0 @@ ---- --- action.lua --- Work with the list of registered actions. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project ---- - - local p = premake - p.action = {} - - local action = p.action - - - --- --- Process the raw command line arguments from _ARGV to populate --- the _ACTION global and _ARGS table. --- - - _ACTION = nil - _ARGS = {} - - for i, arg in ipairs(_ARGV) do - if not arg:startswith("/") and not arg:startswith("--") then - if not _ACTION then - _ACTION = arg - else - table.insert(_ARGS, arg) - _ARGS[arg] = arg - end - end - end - - - --- --- The list of registered actions. Calls to newaction() will add --- new entries here. --- - - action._list = {} - - ---- --- Register a new action. --- --- @param act --- The new action object. ---- - - function action.add(act) - -- validate the action object, at least a little bit - local missing - for _, field in ipairs({"description", "trigger"}) do - if not act[field] then - missing = field - end - end - - if missing then - local name = act.trigger or "" - error(string.format('action "%s" needs a %s', name, missing), 3) - end - - if act.os ~= nil then - p.warnOnce(act.trigger, "action '" .. act.trigger .. "' sets 'os' field, which is deprecated, use 'targetos' instead.") - act.targetos = act.os - act.os = nil - end - - action._list[act.trigger] = act - end - - - ---- --- Initialize an action. --- --- @param name --- The name of the action to be initialized. ---- - - function action.initialize(name) - local a = action._list[name] - if (a.onInitialize) then - a.onInitialize() - end - end - - - ---- --- Trigger an action. --- --- @param name --- The name of the action to be triggered. ---- - - function action.call(name) - local a = action._list[name] - - if a.onStart then - a.onStart() - end - - for wks in p.global.eachWorkspace() do - local onWorkspace = a.onWorkspace or a.onSolution or a.onsolution - if onWorkspace and not wks.external then - onWorkspace(wks) - end - - for prj in p.workspace.eachproject(wks) do - local onProject = a.onProject or a.onproject - if onProject and not prj.external then - onProject(prj) - end - end - end - - for rule in p.global.eachRule() do - local onRule = a.onRule or a.onrule - if onRule and not rule.external then - onRule(rule) - end - end - - if a.execute then - a.execute() - end - - if a.onEnd then - a.onEnd() - end - end - - ---- --- Retrieve the current action, as determined by _ACTION. --- --- @return --- The current action, or nil if _ACTION is nil or does not match any action. ---- - - function action.current() - return action.get(_ACTION) - end - - ---- --- Retrieve an action by name. --- --- @param name --- The name of the action to retrieve. --- @returns --- The requested action, or nil if the action does not exist. ---- - - function action.get(name) - -- "Next-gen" actions are deprecated - if name and name:endswith("ng") then - name = name:sub(1, -3) - end - return action._list[name] - end - - ---- --- Iterator for the list of actions. ---- - - function action.each() - -- sort the list by trigger - local keys = { } - for _, act in pairs(action._list) do - table.insert(keys, act.trigger) - end - table.sort(keys) - - local i = 0 - return function() - i = i + 1 - return action._list[keys[i]] - end - end - - ---- --- Determines if an action makes use of the configuration information --- provided by the project scripts (i.e. it is an exporter) or if it --- simply performs an action irregardless of configuration, in which --- case the baking and validation phases can be skipped. ---- - - function action.isConfigurable(self) - if not self then - self = action.current() or {} - end - if self.onWorkspace or self.onSolution or self.onsolution then - return true - end - if self.onProject or self.onproject then - return true - end - return false - end - - - ---- --- Activates a particular action. --- --- @param name --- The name of the action to activate. ---- - - function action.set(name) - _ACTION = name - - -- Some actions imply a particular operating system - local act = action.get(name) - if act then - _TARGET_OS = act.targetos or _TARGET_OS - end - - -- Some are implemented in standalone modules - if act and act.module then - require(act.module) - end - end - - ---- --- Determines if an action supports a particular language or target type. --- --- @param feature --- The feature to check, either a programming language or a target type. --- @returns --- True if the feature is supported, false otherwise. ---- - - function action.supports(feature) - if not feature then - return true - end - local self = action.current() - if not self then - return false - end - - if not self.valid_languages and not self.valid_kinds then - return true - end - - if self.valid_languages and table.contains(self.valid_languages, feature) then - return true - end - - if self.valid_kinds and table.contains(self.valid_kinds, feature) then - return true - end - - return false - end - - --- --- Determines if an action supports a particular configuration. --- @return --- True if the configuration is supported, false otherwise. --- - function p.action.supportsconfig(action, cfg) - if not action then - return false - end - if action.supportsconfig then - return action.supportsconfig(cfg) - end - return true - end diff --git a/build/premake/premake5/src/base/api.lua b/build/premake/premake5/src/base/api.lua deleted file mode 100755 index 3332f0dd02..0000000000 --- a/build/premake/premake5/src/base/api.lua +++ /dev/null @@ -1,1179 +0,0 @@ --- --- api.lua --- Implementation of the workspace, project, and configuration APIs. --- Author Jason Perkins --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - - local p = premake - p.api = {} - - local api = p.api - local configset = p.configset - - - ---- --- Set up a place to store the current active objects in each configuration --- scope (e.g. wprkspaces, projects, groups, and configurations). This likely --- ought to be internal scope, but it is useful for testing. ---- - - api.scope = {} - - - ---- --- Define a new class of configuration container. A container can receive and --- store configuration blocks, which are what hold the individial settings --- from the scripts. A container can also hold one or more kinds of child --- containers; a workspace can contain projects, for instance. --- --- @param containerName --- The name of the new container type, e.g. "workspace". Used to define a --- corresponding global function, e.g. workspace() to create new instances --- of the container. --- @param parentContainer (optional) --- The container that can contain this one. For a project, this would be --- the workspace container class. --- @param extraScopes (optional) --- Each container can hold fields scoped to itself (by putting the container's --- class name into its scope attribute), or any of the container's children. --- If a container can hold scopes other than these (i.e. "config"), it can --- provide a list of those scopes in this argument. --- @returns --- The newly defined container class. ---- - - function api.container(containerName, parentContainer, extraScopes) - local class, err = p.container.newClass(containerName, parentContainer, extraScopes) - if not class then - error(err, 2) - end - - _G[containerName] = function(name) - local c = api._setContainer(class, name) - if api._isIncludingExternal then - c.external = true - end - return c - end - - _G["external" .. containerName] = function(name) - local c = _G[containerName](name) - c.external = true - return c - end - - -- for backward compatibility - p.alias(_G, "external" .. containerName, "external" .. containerName:capitalized()) - - return class - end - - - ---- --- Register a general-purpose includeExternal() call which works just like --- include(), but marks any containers created while evaluating the included --- scripts as external. It also, loads the file regardless of how many times --- it has been loaded already. ---- - - function includeexternal(fname) - local fullPath = p.findProjectScript(fname) - local wasIncludingExternal = api._isIncludingExternal - api._isIncludingExternal = true - fname = fullPath or fname - dofile(fname) - api._isIncludingExternal = wasIncludingExternal - end - - p.alias(_G, "includeexternal", "includeExternal") - - - ---- --- Return the global configuration container. ---- - - function api.rootContainer() - return api.scope.global - end - - - ---- --- Activate a new configuration container, making it the target for all --- subsequent configuration settings. When you call workspace() or project() --- to active a container, that call comes here (see api.container() for the --- details on how that happens). --- --- @param class --- The container class being activated, e.g. a project or workspace. --- @param name --- The name of the container instance to be activated. If a container --- (e.g. project) with this name does not already exist it will be --- created. If name is not set, the last activated container of this --- class will be made current again. --- @return --- The container instance. ---- - - function api._setContainer(class, name) - local instance - - -- for backward compatibility, "*" activates the parent container - if name == "*" then - return api._setContainer(class.parent) - end - - -- if name is not set, use whatever was last made current - if not name then - instance = api.scope[class.name] - if not instance then - error("no " .. class.name .. " in scope", 3) - end - end - - -- otherwise, look up the instance by name - local parent - if not instance and class.parent then - parent = api.scope[class.parent.name] - if not parent then - error("no " .. class.parent.name .. " in scope", 3) - end - instance = p.container.getChild(parent, class, name) - end - - -- if I have an existing instance, create a new configuration - -- block for it so I don't pick up an old filter - if instance then - configset.addFilter(instance, {}, os.getcwd()) - end - - -- otherwise, a new instance - if not instance then - instance = class.new(name, parent) - if parent then - p.container.addChild(parent, instance) - end - end - - -- clear out any active child containers that might be active - -- (recursive call, so needs to be its own function) - api._clearContainerChildren(class) - - -- active this container, as well as it ancestors - if not class.placeholder then - api.scope.current = instance - end - - while instance do - api.scope[instance.class.name] = instance - if instance.class.alias then - api.scope[instance.class.alias] = instance - end - instance = instance.parent - end - - return api.scope.current - end - - function api._clearContainerChildren(class) - for childClass in p.container.eachChildClass(class) do - api.scope[childClass.name] = nil - if childClass.alias then - api.scope[childClass.alias] = nil - end - api._clearContainerChildren(childClass) - end - end - - - ---- --- Register a new API function. See the built-in API definitions in --- _premake_init.lua for lots of usage examples. --- --- A new global function will be created to receive values for the field. --- List fields will also receive a `remove...()` function to remove values. --- --- @param field --- A table describing the new field, with these keys: --- --- name The API name of the new field. This is used to create a global --- function with the same name, and so should follow Lua symbol --- naming conventions. (required) --- scope The scoping level at which this value can be used; see list --- below. (required) --- kind The type of values that can be stored into this field; see --- list below. (required) --- allowed An array of valid values for this field, or a function which --- accepts a value as input and returns the canonical value as a --- result, or nil if the input value is invalid. (optional) --- tokens A boolean indicating whether token expansion should be --- performed on this field. --- --- The available field scopes are: --- --- project The field applies to workspaces and projects. --- config The field applies to workspaces, projects, and individual build --- configurations. --- --- The available field kinds are: --- --- string A simple string value. --- path A file system path. The value will be made into an absolute --- path, but no wildcard expansion will be performed. --- file One or more file names. Wilcard expansion will be performed, --- and the results made absolute. Implies a list. --- directory One of more directory names. Wildcard expansion will be --- performed, and the results made absolute. Implies a list. --- mixed A mix of simple string values and file system paths. Values --- which contain a directory separator ("/") will be made --- absolute; other values will be left intact. --- table A table of values. If the input value is not a table, it is --- wrapped in one. ---- - - function api.register(field) - -- verify the name - local name = field.name - if not name then - error("missing name", 2) - end - - if rawget(_G, name) then - error("name '" .. name .. "' in use", 2) - end - - -- add this new field to my master list - field, err = p.field.new(field) - if not field then - error(err) - end - - - -- Flag fields which contain filesystem paths. The context object will - -- use this information when expanding tokens, to ensure that the paths - -- are still well-formed after replacements. - - field.paths = p.field.property(field, "paths") - - -- Add preprocessed, lowercase keys to the allowed and aliased value - -- lists to speed up value checking later on. - - if type(field.allowed) == "table" then - for i, item in ipairs(field.allowed) do - field.allowed[item:lower()] = item - end - end - - if type(field.aliases) == "table" then - local keys = table.keys(field.aliases) - for i, key in ipairs(keys) do - field.aliases[key:lower()] = field.aliases[key] - end - end - - -- create a setter function for it - _G[name] = function(value) - return api.storeField(field, value) - end - - if p.field.removes(field) then - _G["remove" .. name] = function(value) - return api.remove(field, value) - end - end - - return field - end - - - ---- --- Unregister a field definition, removing its functions and field --- list entries. ---- - - function api.unregister(field) - if type(field) == "string" then - field = p.field.get(field) - end - p.field.unregister(field) - _G[field.name] = nil - _G["remove" .. field.name] = nil - end - - - ---- --- Create an alias to one of the canonical API functions. This creates --- new setter and remover names pointing to the same functions. --- --- @param original --- The name of the function to be aliased (a string value). --- @param alias --- The alias name (another string value). ---- - - function api.alias(original, alias) - p.alias(_G, original, alias) - if _G["remove" .. original] then - p.alias(_G, "remove" .. original, "remove" .. alias) - end - end - - - --- --- Add a new value to a field's list of allowed values. --- --- @param fieldName --- The name of the field to which to add the value. --- @param value --- The value to add. May be a single string value, or an array --- of values. --- - - function api.addAllowed(fieldName, value) - local field = p.field.get(fieldName) - if not field then - error("No such field: " .. fieldName, 2) - end - - if type(value) == "table" then - for i, item in ipairs(value) do - api.addAllowed(fieldName, item) - end - else - field.allowed = field.allowed or {} - if field.allowed[value:lower()] == nil then - table.insert(field.allowed, value) - field.allowed[value:lower()] = value - end - end - end - - - --- --- Add a new value to a field's list of allowed values. --- --- @param fieldName --- The name of the field to which to add the value. --- @param value --- The value to add. May be a single string value, or an array --- of values. --- - - function api.addAliases(fieldName, value) - local field = p.field.get(fieldName) - if not field then - error("No such field: " .. fieldName, 2) - end - - field.aliases = field.aliases or {} - for k, v in pairs(value) do - field.aliases[k] = v - field.aliases[k:lower()] = v - end - end - - - --- --- Mark an API field as deprecated. --- --- @param name --- The name of the field to mark as deprecated. --- @param message --- A optional message providing more information, to be shown --- as part of the deprecation warning message. --- @param handler --- A function to call when the field is used. Passes the value --- provided to the field as the only argument. --- - - function api.deprecateField(name, message, handler) - p.fields[name].deprecated = { - handler = handler, - message = message - } - end - - --- --- Mark a specific value of a field as deprecated. --- --- @param name --- The name of the field containing the value. --- @param value --- The value or values to mark as deprecated. May be a string --- for a single value or an array of multiple values. --- @param message --- A optional message providing more information, to be shown --- as part of the deprecation warning message. --- @param addHandler --- A function to call when the value is used, receiving the --- value as its only argument. --- @param removeHandler --- A function to call when the value is removed from a list --- field, receiving the value as its only argument (optional). --- - - function api.deprecateValue(name, value, message, addHandler, removeHandler) - if type(value) == "table" then - for _, v in pairs(value) do - api.deprecateValue(name, v, message, addHandler, removeHandler) - end - else - local field = p.fields[name] - field.deprecated = field.deprecated or {} - field.deprecated[value] = { - add = addHandler, - remove = removeHandler, - message = message - } - end - end - - --- --- Control the handling of API deprecations. --- --- @param value --- One of "on" to enable the deprecation behavior, "off" to disable it, --- and "error" to raise an error instead of logging a warning. --- - - function api.deprecations(value) - value = value:lower() - if not table.contains({ "on", "off", "error"}, value) then - error("Invalid value: " .. value, 2) - end - api._deprecations = value:lower() - end - - api._deprecations = "on" - - - ---- --- Return the target container instance for a field. --- --- @param field --- The field being set or fetched. --- @return --- The currently active container instance if one is available, or nil if --- active container is of the wrong class. ---- - - function api.target(field) - if p.container.classCanContain(api.scope.current.class, field.scope) then - return api.scope.current - end - return nil - end - - - --- --- Callback for all API functions; everything comes here first, and then --- gets parceled out to the individual set...() functions. --- - - function api.storeField(field, value) - if value == nil then - return - end - - if field.deprecated and type(field.deprecated.handler) == "function" then - field.deprecated.handler(value) - if field.deprecated.message and api._deprecations ~= "off" then - local caller = filelineinfo(2) - local key = field.name .. "_" .. caller - p.warnOnce(key, "the field %s has been deprecated and will be removed.\n %s\n @%s\n", field.name, field.deprecated.message, caller) - if api._deprecations == "error" then - error("deprecation errors enabled", 3) - end - end - end - - local target = api.target(field) - if not target then - local err = string.format("unable to set %s in %s scope, should be %s", field.name, api.scope.current.class.name, table.concat(field.scopes, ", ")) - error(err, 3) - end - - local status, err = configset.store(target, field, value) - if err then - error(err, 3) - end - end - - - --- --- The remover: adds values to be removed to the "removes" field on --- current configuration. Removes are keyed by the associated field, --- so the call `removedefines("X")` will add the entry: --- cfg.removes["defines"] = { "X" } --- - - function api.remove(field, value) - -- right now, ignore calls with no value; later might want to - -- return the current baked value - if value == nil then return end - - local target = api.target(field) - if not target then - local err = string.format("unable to remove %s from %s scope, should be %s", field.name, api.scope.current.class.name, table.concat(field.scopes, ", ")) - error(err, 3) - end - - local hasDeprecatedValues = (type(field.deprecated) == "table") - - -- Build a list of values to be removed. If this field has deprecated - -- values, check to see if any of those are going to be removed by this - -- call (which means matching against any provided wildcards) and call - -- the appropriate logic for removing that value. - - local removes = {} - - local function check(value) - if field.deprecated[value] then - local handler = field.deprecated[value] - if handler.remove then handler.remove(value) end - if handler.message and api._deprecations ~= "off" then - local caller = filelineinfo(8) - local key = field.name .. "_" .. value .. "_" .. caller - p.warnOnce(key, "the %s value %s has been deprecated and will be removed.\n %s\n @%s\n", field.name, value, handler.message, caller) - if api._deprecations == "error" then - error { msg="deprecation errors enabled" } - end - end - end - end - - local function recurse(value) - if type(value) == "table" then - table.foreachi(value, recurse) - - elseif hasDeprecatedValues and value:contains("*") then - local current = configset.fetch(target, field, { - matcher = function(cset, block, filter) - local current = cset.current - return criteria.matches(current._criteria, block._criteria.terms or {}) or - criteria.matches(block._criteria, current._criteria.terms or {}) - end - }) - - local mask = path.wildcards(value) - for _, item in ipairs(current) do - if item:match(mask) == item then - recurse(item) - end - end - else - local value, err, additional = api.checkValue(field, value) - if err then - error { msg=err } - end - - if field.deprecated then - check(value) - end - - table.insert(removes, value) - if additional then - table.insert(removes, additional) - end - end - end - - local ok, err = pcall(function () - recurse(value) - end) - - if not ok then - if type(err) == "table" then - err = err.msg - end - error(err, 3) - end - - configset.remove(target, field, removes) - end - - - --- --- Check to see if a value is valid for a particular field. --- --- @param field --- The field to check against. --- @param value --- The value to check. --- @param kind --- The kind of data currently being checked, corresponding to --- one segment of the field's kind string (e.g. "string"). If --- not set, defaults to "string". --- @return --- If the value is valid for this field, the canonical version --- of that value is returned. If the value is not valid two --- values are returned: nil, and an error message. --- - - function api.checkValue(field, value, kind) - if not field.allowed then - return value - end - - local canonical, result - local lowerValue = value:lower() - - if field.aliases then - canonical = field.aliases[lowerValue] - end - - if not canonical then - if type(field.allowed) == "function" then - canonical = field.allowed(value, kind or "string") - else - canonical = field.allowed[lowerValue] - end - end - - if not canonical then - return nil, "invalid value '" .. value .. "' for " .. field.name - end - - if field.deprecated and field.deprecated[canonical] then - local handler = field.deprecated[canonical] - handler.add(canonical) - if handler.message and api._deprecations ~= "off" then - local caller = filelineinfo(9) - local key = field.name .. "_" .. value .. "_" .. caller - p.warnOnce(key, "the %s value %s has been deprecated and will be removed.\n %s\n @%s\n", field.name, canonical, handler.message, caller) - if api._deprecations == "error" then - return nil, "deprecation errors enabled" - end - end - end - - return canonical - end - - - ---- --- Reset the API system, clearing out any temporary or cached values. --- Used by the automated testing framework to clear state between --- individual test runs. ---- - - local numBuiltInGlobalBlocks - - function api.reset() - if numBuiltInGlobalBlocks == nil then - numBuiltInGlobalBlocks = #api.scope.global.blocks - end - - for containerClass in p.container.eachChildClass(p.global) do - api.scope.global[containerClass.pluralName] = {} - end - - api.scope.current = api.scope.global - - local currentGlobalBlockCount = #api.scope.global.blocks - for i = currentGlobalBlockCount, numBuiltInGlobalBlocks, -1 do - table.remove(api.scope.global.blocks, i) - end - - configset.addFilter(api.scope.current, {}, os.getcwd()) - end - - - --- --- Arrays are integer indexed tables; unlike lists, a new array value --- will replace the old one, rather than merging both. --- - - premake.field.kind("array", { - store = function(field, current, value, processor) - if type(value) ~= "table" then - value = { value } - end - - for i, item in ipairs(value) do - value[i] = processor(field, nil, value[i]) - end - - return value - end, - compare = function(field, a, b, processor) - if a == nil or b == nil or #a ~= #b then - return false - end - for i = 1, #a do - if not processor(field, a[i], b[i]) then - return false - end - end - return true - end - }) - - - ---- --- Boolean field kind; converts common yes/no strings into true/false values. ---- - - premake.field.kind("boolean", { - store = function(field, current, value, processor) - local mapping = { - ["false"] = false, - ["no"] = false, - ["off"] = false, - ["on"] = true, - ["true"] = true, - ["yes"] = true, - } - - if type(value) == "string" then - value = mapping[value:lower()] - if value == nil then - error { msg="expected boolean; got " .. value } - end - return value - end - - if type(value) == "boolean" then - return value - end - - if type(value) == "number" then - return (value ~= 0) - end - - return (value ~= nil) - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - - - --- --- Directory data kind; performs wildcard directory searches, converts --- results to absolute paths. --- - - premake.field.kind("directory", { - paths = true, - store = function(field, current, value, processor) - return path.getabsolute(value) - end, - remove = function(field, current, value, processor) - return path.getabsolute(value) - end, - compare = function(field, a, b, processor) - return (a == b) - end, - - translate = function(field, current, _, processor) - if current:find("*") then - return os.matchdirs(current) - end - return { current } - end - }) - - - --- --- File data kind; performs wildcard file searches, converts results --- to absolute paths. --- - - premake.field.kind("file", { - paths = true, - store = function(field, current, value, processor) - return path.getabsolute(value) - end, - remove = function(field, current, value, processor) - return path.getabsolute(value) - end, - compare = function(field, a, b, processor) - return (a == b) - end, - - translate = function(field, current, _, processor) - if current:find("*") then - return os.matchfiles(current) - end - return { current } - end - }) - - - --- --- Function data kind; this isn't terribly useful right now, but makes --- a nice extension point for modules to build on. --- - - premake.field.kind("function", { - store = function(field, current, value, processor) - local t = type(value) - if t ~= "function" then - error { msg="expected function; got " .. t } - end - return value - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - - --- --- Integer data kind; validates inputs. --- - - premake.field.kind("integer", { - store = function(field, current, value, processor) - local t = type(value) - if t ~= "number" then - error { msg="expected number; got " .. t } - end - if math.floor(value) ~= value then - error { msg="expected integer; got " .. tostring(value) } - end - return value - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - - ---- --- Key-value data kind definition. Merges key domains; values may be any kind. ---- - - local function storeKeyed(field, current, value, processor) - current = current or {} - - for k, v in pairs(value) do - if processor then - v = processor(field, current[k], v) - end - current[k] = v - end - - return current - end - - - local function mergeKeyed(field, current, value, processor) - value = value or {} - for k, v in pairs(value) do - current[k] = v - end - return current - end - - - premake.field.kind("keyed", { - store = storeKeyed, - merge = mergeKeyed, - compare = function(field, a, b, processor) - if a == nil or b == nil then - return false - end - for k in pairs(a) do - if not processor(field, a[k], b[k]) then - return false - end - end - return true - end, - - translate = function(field, current, _, processor) - if not processor then - return { current } - end - for k, v in pairs(current) do - current[k] = processor(field, v, nil)[1] - end - return { current } - end - }) - - ---- --- List data kind definition. Actually a misnomer, lists are more like sets in --- that duplicate values are weeded out; each will only appear once. Can --- contain any other kind of data. ---- - - local function storeListItem(current, item, allowDuplicates) - if not allowDuplicates and current[item] then - table.remove(current, table.indexof(current, item)) - end - table.insert(current, item) - current[item] = item - end - - - local function storeList(field, current, value, processor) - if type(value) == "table" then - -- Flatten out incoming arrays of values - if #value > 0 then - for i = 1, #value do - current = storeList(field, current, value[i], processor) - end - return current - end - - -- Ignore empty lists - if table.isempty(value) then - return current - end - end - - current = current or {} - - if processor then - value = processor(field, nil, value) - end - - if type(value) == "table" then - if #value > 0 then - for i = 1, #value do - storeListItem(current, value[i], field.allowDuplicates) - end - elseif not table.isempty(value) then - storeListItem(current, value, field.allowDuplicates) - end - elseif value then - storeListItem(current, value, field.allowDuplicates) - end - - return current - end - - - local function mergeList(field, current, value, processor) - value = value or {} - for i = 1, #value do - storeListItem(current, value[i], field.allowDuplicates) - end - return current - end - - - premake.field.kind("list", { - store = storeList, - remove = storeList, - merge = mergeList, - compare = function(field, a, b, processor) - if a == nil or b == nil or #a ~= #b then - return false - end - for i = 1, #a do - if not processor(field, a[i], b[i]) then - return false - end - end - return true - end, - - translate = function(field, current, _, processor) - if not processor then - return { current } - end - local ret = {} - for _, value in ipairs(current) do - for _, processed in ipairs(processor(field, value, nil)) do - table.insert(ret, processed) - end - end - return { ret } - end - }) - - - --- --- Mixed data kind; values containing a directory separator "/" are converted --- to absolute paths, other values left as-is. Used for links, where system --- libraries and local library paths can be mixed into a single list. --- - - premake.field.kind("mixed", { - paths = true, - store = function(field, current, value, processor) - if type(value) == "string" and value:find('/', nil, true) then - if string.sub(value, 1, 2) ~= "%{" then - value = path.getabsolute(value) - end - end - return value - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - - --- --- Number data kind; validates inputs. --- - - premake.field.kind("number", { - store = function(field, current, value, processor) - local t = type(value) - if t ~= "number" then - error { msg="expected number; got " .. t } - end - return value - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - - --- --- Path data kind; converts all inputs to absolute paths. --- - - premake.field.kind("path", { - paths = true, - store = function(field, current, value, processor) - return path.deferredjoin(os.getcwd(), value) - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - - --- --- String data kind; performs validation against allowed fields, checks for --- value deprecations. --- - - premake.field.kind("string", { - store = function(field, current, value, processor) - if type(value) == "table" then - error { msg="expected string; got table" } - end - - if value ~= nil then - local err - value, err = api.checkValue(field, value) - if err then - error { msg=err } - end - end - - return value - end, - compare = function(field, a, b, processor) - return (a == b) - end - }) - - --- --- Table data kind; wraps simple values into a table, returns others as-is. --- - - premake.field.kind("table", { - store = function(field, current, value, processor) - if type(value) ~= "table" then - value = { value } - end - return value - end, - compare = function(field, a, b, processor) - -- TODO: is there a reliable way to check this? - return true - end - }) - - - ---- --- Start a new block of configuration settings, using the old, "open" --- style of matching without field prefixes. ---- - - function configuration(terms) - if terms then - if (type(terms) == "table" and #terms == 1 and terms[1] == "*") or (terms == "*") then - terms = nil - end - configset.addblock(api.scope.current, {terms}, os.getcwd()) - end - return api.scope.current - end - - - ---- --- Start a new block of configuration settings, using the new prefixed --- style of pattern matching. ---- - - function filter(terms) - if terms then - if (type(terms) == "table" and #terms == 1 and terms[1] == "*") or (terms == "*") then - terms = nil - end - local ok, err = configset.addFilter(api.scope.current, {terms}, os.getcwd()) - if not ok then - error(err, 2) - end - end - end - - - --- --- Define a new action. --- --- @param a --- The new action object. --- - - function newaction(a) - p.action.add(a) - end - - --- --- Define a new option. --- --- @param opt --- The new option object. --- - - function newoption(opt) - p.option.add(opt) - end diff --git a/build/premake/premake5/src/base/config.lua b/build/premake/premake5/src/base/config.lua deleted file mode 100755 index 387ba17423..0000000000 --- a/build/premake/premake5/src/base/config.lua +++ /dev/null @@ -1,591 +0,0 @@ --- --- config.lua --- Premake configuration object API --- Copyright (c) 2011-2015 Jason Perkins and the Premake project --- - - local p = premake - - p.config = {} - - local project = p.project - local config = p.config - - ---- --- Helper function for getlinkinfo() and gettargetinfo(); builds the --- name parts for a configuration, for building or linking. --- --- @param cfg --- The configuration object being queried. --- @param kind --- The target kind (SharedLib, StaticLib). --- @param field --- One of "target" or "implib", used to locate the naming information --- in the configuration object (i.e. targetdir, targetname, etc.) --- @return --- A target info object; see one of getlinkinfo() or gettargetinfo() --- for more information. ---- - - function config.buildtargetinfo(cfg, kind, field) - local basedir = cfg.project.location - - local targetdir - if cfg.platform then - targetdir = path.join(basedir, 'bin', cfg.platform, cfg.buildcfg) - else - targetdir = path.join(basedir, 'bin', cfg.buildcfg) - end - - local directory = cfg[field.."dir"] or cfg.targetdir or targetdir - local basename = cfg[field.."name"] or cfg.targetname or cfg.project.name - - local prefix = cfg[field.."prefix"] or cfg.targetprefix or "" - local suffix = cfg[field.."suffix"] or cfg.targetsuffix or "" - local extension = cfg[field.."extension"] or cfg.targetextension or "" - - local bundlename = "" - local bundlepath = "" - - if table.contains(os.getSystemTags(cfg.system), "darwin") and (kind == p.WINDOWEDAPP or (kind == p.SHAREDLIB and cfg.sharedlibtype)) then - bundlename = basename .. extension - bundlepath = path.join(bundlename, iif(kind == p.SHAREDLIB and cfg.sharedlibtype == "OSXFramework", "Versions/A", "Contents/MacOS")) - end - - local info = {} - info.directory = directory - info.basename = basename .. suffix - info.name = prefix .. info.basename .. extension - info.extension = extension - info.abspath = path.join(directory, info.name) - info.fullpath = info.abspath - info.bundlename = bundlename - info.bundlepath = path.join(directory, bundlepath) - info.prefix = prefix - info.suffix = suffix - return info - end - - ---- --- Determine whether the given configuration can meaningfully link --- against the target object. --- --- @param cfg --- The configuration to be tested. --- @param target --- The object to test against. This can be a library file name, or a --- configuration from another project. --- @param linkage --- Optional. For languages or environments that support different kinds of --- linking (i.e. Managed/CLR C++, which can link both managed and unmanaged --- libs), which one to return. One of "unmanaged", "managed". If not --- specified, the default for the configuration will be used. --- @return --- True if linking the target into the configuration makes sense. ---- - - function config.canLink(cfg, target, linkage) - - -- Have I got a project configuration? If so, I've got some checks - -- I can do with the extra information - - if type(target) ~= "string" then - - -- Can't link against executables - - if target.kind ~= "SharedLib" and target.kind ~= "StaticLib" then - return false - end - - -- Can link mixed C++ with native projects - - if cfg.language == "C++" then - if cfg.clr == p.ON then - return true - end - end - if target.language == "C++" then - if target.clr == p.ON then - return true - end - end - - -- Can't link managed and unmanaged projects - - local cfgManaged = project.isdotnet(cfg.project) or (cfg.clr ~= p.OFF) - local tgtManaged = project.isdotnet(target.project) or (target.clr ~= p.OFF) - return (cfgManaged == tgtManaged) - - end - - -- For now, I assume that everything listed in a .NET project can be - -- linked; unmanaged code is simply not supported - - if project.isdotnet(cfg.project) then - return true - end - - -- In C++ projects, managed dependencies must explicitly include - -- the ".dll" extension, to distinguish from unmanaged libraries - - local isManaged = (path.getextension(target) == ".dll") - - -- Unmanaged projects can never link managed assemblies - - if isManaged and cfg.clr == p.OFF then - return false - end - - -- Only allow this link it matches the requested linkage - - return (isManaged) == (linkage == "managed") - - end - - --- --- Determines if this configuration can be linked incrementally. --- - - function config.canLinkIncremental(cfg) - if cfg.kind == "StaticLib" - or config.isOptimizedBuild(cfg) - or cfg.flags.NoIncrementalLink then - return false - end - return true - end - - - --- --- Check a configuration for a source code file with the specified --- extension. Used for locating special files, such as Windows --- ".def" module definition files. --- --- @param cfg --- The configuration object to query. --- @param ext --- The file extension for which to search. --- @return --- The full file name if found, nil otherwise. --- - - function config.findfile(cfg, ext) - for _, fname in ipairs(cfg.files) do - if fname:endswith(ext) then - return project.getrelative(cfg.project, fname) - end - end - end - - ---- --- Retrieve linking information for a specific configuration. That is, --- the path information that is required to link against the library --- built by this configuration. --- --- @param cfg --- The configuration object to query. --- @return --- A table with these values: --- basename - the target with no directory or file extension --- name - the target name and extension, with no directory --- directory - relative path to the target, with no file name --- extension - the file extension --- prefix - the file name prefix --- suffix - the file name suffix --- fullpath - directory, name, and extension relative to project --- abspath - absolute directory, name, and extension ---- - - function config.getlinkinfo(cfg) - -- if the configuration target is a DLL, and an import library - -- is provided, change the kind as import libraries are static. - local kind = cfg.kind - if project.isnative(cfg.project) then - if cfg.system == p.WINDOWS and kind == p.SHAREDLIB and not cfg.flags.NoImportLib then - kind = p.STATICLIB - end - end - return config.buildtargetinfo(cfg, kind, "implib") - end - - --- --- Retrieve a list of link targets from a configuration. --- --- @param cfg --- The configuration object to query. --- @param kind --- The type of links to retrieve; one of: --- siblings - linkable sibling projects --- system - system (non-sibling) libraries --- dependencies - all sibling dependencies, including non-linkable --- all - return everything --- @param part --- How the link target should be expressed; one of: --- name - the decorated library name with no directory --- basename - the undecorated library name --- directory - just the directory, no name --- fullpath - full path with decorated name --- object - return the project object of the dependency --- Or, a function(original, decorated) can be supplied, in which case it --- will be called for each matching link, providing the original value as --- it was specified in links(), and the decorated value. --- @param linkage --- Optional. For languages or environments that support different kinds of --- linking (i.e. Managed/CLR C++, which can link both managed and unmanaged --- libs), which one to return. One of "unmanaged", "managed". If not --- specified, the default for the configuration will be used. --- @return --- An array containing the requested link target information. --- - - function config.getlinks(cfg, kind, part, linkage) - local result = {} - - -- If I'm building a list of link directories, include libdirs - - if part == "directory" then - table.foreachi(cfg.libdirs, function(dir) - table.insert(result, project.getrelative(cfg.project, dir)) - end) - end - - -- Iterate all of the links listed in the configuration and boil - -- them down to the requested data set - - for i = 1, #cfg.links do - local link = cfg.links[i] - local item - - -- Sort the links into "sibling" (is another project in this same - -- workspace) and "system" (is not part of this workspace) libraries. - - local prj = p.workspace.findproject(cfg.workspace, link) - if prj and kind ~= "system" then - - -- Sibling; is there a matching configuration in this project that - -- is compatible with linking to me? - - local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform) - if prjcfg and (kind == "dependencies" or config.canLink(cfg, prjcfg)) then - - -- Yes; does the caller want the whole project config or only part? - if part == "object" then - item = prjcfg - else - item = project.getrelative(cfg.project, prjcfg.linktarget.fullpath) - end - - end - - elseif not prj and (kind == "system" or kind == "all") then - - -- Make sure this library makes sense for the requested linkage; don't - -- link managed .DLLs into unmanaged code, etc. - - if config.canLink(cfg, link, linkage) then - -- if the target is listed via an explicit path (i.e. not a - -- system library or assembly), make it project-relative - item = link - if item:find("/", nil, true) then - item = project.getrelative(cfg.project, item) - end - end - - end - - -- If this is something I can link against, pull out the requested part - -- dont link against my self - if item and item ~= cfg then - if part == "directory" then - item = path.getdirectory(item) - if item == "." then - item = nil - end - elseif part == "name" then - item = path.getname(item) - elseif part == "basename" then - item = path.getbasename(item) - elseif type(part) == "function" then - part(link, item) - end - end - - -- Add it to the list, skipping duplicates - - if item and not table.contains(result, item) then - table.insert(result, item) - end - - end - - return result - end - - --- --- Determines the correct runtime library for a configuration. --- --- @param cfg --- The configuration object to query. --- @return --- A string identifying the runtime library, one of --- StaticDebug, StaticRelease, SharedDebug, SharedRelease. --- - - function config.getruntime(cfg) - if (not cfg.staticruntime or cfg.staticruntime == "Default") and not cfg.runtime then - return nil -- indicate that no runtime was explicitly selected - end - - local linkage = iif(cfg.staticruntime == "On", "Static", "Shared") -- assume 'Shared' is default? - - if not cfg.runtime then - return linkage .. iif(config.isDebugBuild(cfg), "Debug", "Release") - else - return linkage .. cfg.runtime - end - end - - --- --- Retrieve information about a configuration's build target. --- --- @param cfg --- The configuration object to query. --- @return --- A table with these values: --- basename - the target with no directory or file extension --- name - the target name and extension, with no directory --- directory - relative path to the target, with no file name --- extension - the file extension --- prefix - the file name prefix --- suffix - the file name suffix --- fullpath - directory, name, and extension, relative to project --- abspath - absolute directory, name, and extension --- bundlepath - the relative path and file name of the bundle --- - - function config.gettargetinfo(cfg) - return config.buildtargetinfo(cfg, cfg.kind, "target") - end - - - ---- --- Returns true if any of the files in the provided container pass the --- provided test function. ---- - - function config.hasFile(self, testfn) - local files = self.files - for i = 1, #files do - if testfn(files[i]) then - return true - end - end - return false - end - - - --- --- Determine if the specified library or assembly reference should be copied --- to the build's target directory. "Copy Local" is the terminology used by --- Visual Studio C# projects for this feature. --- --- @param cfg --- The configuration to query. Can be a project (and will be for C# --- projects). --- @param linkname --- The name of the library or assembly reference to check. This should --- match the name as it was provided in the call to links(). --- @param default --- The value to return if the library is not mentioned in any settings. --- @return --- True if the library should be copied local, false otherwise. --- - - function config.isCopyLocal(cfg, linkname, default) - if cfg.flags.NoCopyLocal then - return false - end - - if #cfg.copylocal > 0 then - return table.contains(cfg.copylocal, linkname) - end - - return default - end - - --- --- Determine if a configuration represents a "debug" or "release" build. --- This controls the runtime library selected for Visual Studio builds --- (and might also be useful elsewhere). --- - - function config.isDebugBuild(cfg) - return cfg.symbols ~= nil and - cfg.symbols ~= p.OFF and - cfg.symbols ~= "Default" and - not config.isOptimizedBuild(cfg) - end - - --- --- Determine if this configuration uses one of the optimize flags. --- Optimized builds get different treatment, such as full linking --- instead of incremental. --- - - function config.isOptimizedBuild(cfg) - return cfg.optimize ~= nil and cfg.optimize ~= p.OFF and cfg.optimize ~= "Debug" - end - - --- --- Does this configuration's list of links contain the specified --- project? Performs a case-insensitive search for the project's --- name in the configuration's link array. --- --- @param cfg --- The configuration to query. --- @param prjName --- The name of the project for which to search. --- @return --- True if the project name is found in the configuration's --- list of links; nil otherwise. --- - - function config.linksToProject(cfg, prjName) - prjName = prjName:lower() - local n = #cfg.links - for i = 1,n do - if cfg.links[i]:lower() == prjName then - return true - end - end - end - - --- --- Map the values contained in the configuration to an array of flags. --- --- @param cfg --- The configuration to map. --- @param mappings --- A mapping from configuration fields and values to flags. See --- the GCC tool interface for examples of these mappings. --- @return --- An array containing the translated flags. --- - - function config.mapFlags(cfg, mappings) - local flags = {} - - -- Helper function to append replacement values to the result - - local function add(replacement) - if type(replacement) == "function" then - replacement = replacement(cfg) - end - table.insertflat(flags, replacement) - end - - -- To ensure we get deterministic results that don't change as more keys - -- are added to the map, and to open the possibility to controlling the - -- application order of flags, use a prioritized list of fields to order - -- the mapping, even though it takes a little longer. - - for field in p.field.eachOrdered() do - local map = mappings[field.name] - if type(map) == "function" then - map = map(cfg, mappings) - end - if map then - - -- Pass each cfg value in the list through the map and append the - -- replacement, if any, to the result - - local values = cfg[field.name] - if type(values) == "boolean" then - values = iif(values, "On", "Off") - end - if type(values) ~= "table" then - values = { values } - end - - local foundValue = false - table.foreachi(values, function(value) - local replacement = map[value] - if replacement ~= nil then - foundValue = true - add(replacement) - end - end) - - -- If no value was mapped, check to see if the map specifies a - -- default value and, if so, push that into the result - - if not foundValue then - add(map._) - end - - -- Finally, check for "not values", which should be added to the - -- result if the corresponding value is not present - - for key, replacement in pairs(map) do - if #key > 1 and key:startswith("_") then - key = key:sub(2) - if values[key] == nil then - add(replacement) - end - end - end - - end - end - - return flags - end - - ---- --- Returns both a project configuration and a file configuration from a --- configuration argument that could be either. --- --- @param cfg --- A project or file configuration object. --- @return --- Both a project configuration and a file configuration. If the input --- argument is a project configuration, the file configuration value is --- returned as nil. ---- - - function config.normalize(cfg) - if cfg and cfg.config ~= nil then - return cfg.config, cfg - else - return cfg, nil - end - end - - - ---- --- Return the appropriate toolset adapter for the provided configuration, --- or nil if no toolset is specified. If a specific version was provided, --- returns that as a second argument. ---- - - function config.toolset(cfg) - if cfg.toolset then - return p.tools.canonical(cfg.toolset) - end - end diff --git a/build/premake/premake5/src/base/configset.lua b/build/premake/premake5/src/base/configset.lua deleted file mode 100644 index a6e835cfbd..0000000000 --- a/build/premake/premake5/src/base/configset.lua +++ /dev/null @@ -1,499 +0,0 @@ --- --- base/configset.lua --- --- A configuration set manages a collection of fields, which are organized --- into "blocks". Each block stores a set of field-value pairs, along with --- a list of terms which indicate the context in which those field values --- should be applied. --- --- Configurations use the field definitions to know what fields are available, --- and the corresponding value types for those fields. Only fields that have --- been registered via field.new() can be stored. --- --- TODO: I may roll this functionality up into the container API at some --- point. If you find yourself using or extending this code for your own --- work give me a shout before you go too far with it so we can coordinate. --- --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - - p.configset = {} - - local configset = p.configset - local criteria = p.criteria - - --- --- Create a new configuration set. --- --- @param parent --- An optional parent configuration set. If provided, the parent provides --- a base configuration, which this set will extend. --- @return --- A new, empty configuration set. --- - - function configset.new(parent) - local cset = {} - cset.parent = parent - cset.blocks = {} - cset.current = nil - cset.compiled = false - return cset - end - - - ---- --- Retrieve a value from the configuration set. --- --- This and the criteria supporting code are the inner loops of the app. Some --- readability has been sacrificed for overall performance. --- --- @param cset --- The configuration set to query. --- @param field --- The definition of field to be queried. --- @param filter --- A list of lowercase context terms to use during the fetch. Only those --- blocks with terms fully contained by this list will be considered in --- determining the returned value. Terms should be lower case to make --- the context filtering case-insensitive. --- @param ctx --- The context that will be used for detoken.expand --- @param origin --- The originating configset if set. --- @return --- The requested value. ---- - - function configset.fetch(cset, field, filter, ctx, origin) - filter = filter or {} - ctx = ctx or {} - - if p.field.merges(field) then - return configset._fetchMerged(cset, field, filter, ctx, origin) - else - return configset._fetchDirect(cset, field, filter, ctx, origin) - end - end - - - function configset._dofilter(cset, block, filter) - if not filter.matcher then - return (cset.compiled or criteria.matches(block._criteria, filter)) - else - return filter.matcher(cset, block, filter) - end - end - - - function configset._fetchDirect(cset, field, filter, ctx, origin) - -- If the originating configset hasn't been compiled, then the value will still - -- be on that configset. - if origin and origin ~= cset and not origin.compiled then - return configset._fetchDirect(origin, field, filter, ctx, origin) - end - - local abspath = filter.files - local basedir - - local key = field.name - local blocks = cset.blocks - local n = #blocks - for i = n, 1, -1 do - local block = blocks[i] - - if not origin or block._origin == origin then - local value = block[key] - - -- If the filter contains a file path, make it relative to - -- this block's basedir - if value ~= nil and abspath and not cset.compiled and block._basedir and block._basedir ~= basedir then - basedir = block._basedir - filter.files = path.getrelative(basedir, abspath) - end - - if value ~= nil and configset._dofilter(cset, block, filter) then - -- If value is an object, return a copy of it so that any - -- changes later made to it by the caller won't alter the - -- original value (that was a tough bug to find) - if type(value) == "table" then - value = table.deepcopy(value) - end - -- Detoken - if field.tokens and ctx.environ then - value = p.detoken.expand(value, ctx.environ, field, ctx._basedir) - end - return value - end - end - end - - filter.files = abspath - - if cset.parent then - return configset._fetchDirect(cset.parent, field, filter, ctx, origin) - end - end - - - function configset._fetchMerged(cset, field, filter, ctx, origin) - -- If the originating configset hasn't been compiled, then the value will still - -- be on that configset. - if origin and origin ~= cset and not origin.compiled then - return configset._fetchMerged(origin, field, filter, ctx, origin) - end - - local result = {} - - local function remove(patterns) - for _, pattern in ipairs(patterns) do - -- Detoken - if field.tokens and ctx.environ then - pattern = p.detoken.expand(pattern, ctx.environ, field, ctx._basedir) - end - pattern = path.wildcards(pattern):lower() - - local j = 1 - while j <= #result do - local value = result[j]:lower() - if value:match(pattern) == value then - result[result[j]] = nil - table.remove(result, j) - else - j = j + 1 - end - end - end - end - - if cset.parent then - result = configset._fetchMerged(cset.parent, field, filter, ctx, origin) - end - - local abspath = filter.files - local basedir - - local key = field.name - local blocks = cset.blocks - local n = #blocks - for i = 1, n do - local block = blocks[i] - if not origin or block._origin == origin then - -- If the filter contains a file path, make it relative to - -- this block's basedir - if abspath and block._basedir and block._basedir ~= basedir and not cset.compiled then - basedir = block._basedir - filter.files = path.getrelative(basedir, abspath) - end - - if configset._dofilter(cset, block, filter) then - if block._removes and block._removes[key] then - remove(block._removes[key]) - end - - local value = block[key] - -- If value is an object, return a copy of it so that any - -- changes later made to it by the caller won't alter the - -- original value (that was a tough bug to find) - if type(value) == "table" then - value = table.deepcopy(value) - end - - if value then - -- Detoken - if field.tokens and ctx.environ then - value = p.detoken.expand(value, ctx.environ, field, ctx._basedir) - end - -- Translate - if field and p.field.translates(field) then - value = p.field.translate(field, value) - end - - result = p.field.merge(field, result, value) - end - end - end - end - - filter.files = abspath - return result - end - - - ---- --- Create and return a metatable which allows a configuration set to act as a --- "backing store" for a regular Lua table. Table operations that access a --- registered field will fetch from or store to the configurations set, while --- unknown keys are get and set to the table normally. ---- - - function configset.metatable(cset) - return { - __newindex = function(tbl, key, value) - local f = p.field.get(key) - if f then - local status, err = configset.store(cset, f, value) - if err then - error(err, 2) - end - else - rawset(tbl, key, value) - return value - end - end, - __index = function(tbl, key) - local f = p.field.get(key) - if f then - return configset.fetch(cset, f) - else - return nil - end - end - } - end - - - ---- --- Create a new block of configuration field-value pairs, using a set of --- old-style, non-prefixed context terms to control their application. This --- approach will eventually be phased out in favor of prefixed filters; --- see addFilter() below. --- --- @param cset --- The configuration set to hold the new block. --- @param terms --- A set of context terms to control the application of values contained --- in the block. --- @param basedir --- An optional base directory; if set, filename filter tests will be made --- relative to this basis before pattern testing. --- @return --- The new configuration data block. ---- - - function configset.addblock(cset, terms, basedir) - configset.addFilter(cset, terms, basedir, true) - return cset.current - end - - - ---- --- Create a new block of configuration field-value pairs, using a set --- of new-style, prefixed context terms to control their application. --- --- @param cset --- The configuration set to hold the new block. --- @param terms --- A set of terms used to control the application of the values --- contained in the block. --- @param basedir --- An optional base directory. If set, filename filter tests will be --- made relative to this base before pattern testing. --- @param unprefixed --- If true, uses the old, unprefixed style for filter terms. This will --- eventually be phased out in favor of prefixed filters. ---- - - function configset.addFilter(cset, terms, basedir, unprefixed) - local crit, err = criteria.new(terms, unprefixed) - if not crit then - return nil, err - end - - local block = {} - block._criteria = crit - block._origin = cset - - if basedir then - block._basedir = basedir:lower() - end - - table.insert(cset.blocks, block) - cset.current = block - return true - end - - ---- --- Allow calling code to save and restore a filter. Particularly useful for --- modules. ---- - function configset.getFilter(cset) - return { - _criteria = cset.current._criteria, - _basedir = cset.current._basedir - } - end - - function configset.setFilter(cset, filter) - local block = {} - block._criteria = filter._criteria - block._basedir = filter._basedir - block._origin = cset - table.insert(cset.blocks, block) - cset.current = block; - end - - - ---- --- Add a new field-value pair to the current configuration data block. The --- data type of the field is taken into account when adding the values: --- strings are replaced, arrays are merged, etc. --- --- @param cset --- The configuration set to hold the new value. --- @param fieldname --- The name of the field being set. The field should have already been --- defined using the api.register() function. --- @param value --- The new value for the field. --- @return --- If successful, returns true. If an error occurred, returns nil and --- an error message. ---- - - function configset.store(cset, field, value) - if not cset.current then - configset.addblock(cset, {}) - end - - local key = field.name - local current = cset.current - - local status, result = pcall(function () - current[key] = p.field.store(field, current[key], value) - end) - - if not status then - if type(result) == "table" then - result = result.msg - end - return nil, result - end - - return true - end - - - --- --- Remove values from a configuration set. --- --- @param cset --- The configuration set from which to remove. --- @param field --- The field holding the values to be removed. --- @param values --- A list of values to be removed. --- - - function configset.remove(cset, field, values) - -- removes are always processed first; starting a new block here - -- ensures that they will be processed in the proper order - local block = {} - block._basedir = cset.current._basedir - block._criteria = cset.current._criteria - block._origin = cset - table.insert(cset.blocks, block) - cset.current = block - - -- TODO This comment is not completely valid anymore - -- This needs work; right now it is hardcoded to only work for lists. - -- To support removing from keyed collections, I first need to figure - -- out how to move the wildcard():lower() bit into the value - -- processing call chain (i.e. that should happen somewhere inside of - -- the field.remove() call). And then I will probably need to add - -- another accessor to actually do the removing, which right now is - -- hardcoded inside of _fetchMerged(). Oh, and some of the logic in - -- api.remove() needs to get pushed down to here (or field). - - values = p.field.remove(field, {}, values) - - -- add a list of removed values to the block - current = cset.current - current._removes = {} - current._removes[field.name] = values - end - - - --- --- Check to see if a configuration set is empty; that is, it does --- not contain any configuration blocks. --- --- @param cset --- The configuration set to query. --- @return --- True if the set does not contain any blocks. --- - - function configset.empty(cset) - return (#cset.blocks == 0) - end - - - --- --- Compiles a new configuration set containing only the blocks which match --- the specified criteria. Fetches against this compiled configuration set --- may omit the context argument, resulting in faster fetches against a --- smaller set of configuration blocks. --- --- @param cset --- The configuration set to query. --- @param filter --- A list of lowercase context terms to use during the fetch. Only those --- blocks with terms fully contained by this list will be considered in --- determining the returned value. Terms should be lower case to make --- the context filtering case-insensitive. --- @return --- A new configuration set containing only the selected blocks, and the --- "compiled" field set to true. --- - - function configset.compile(cset, filter) - -- always start with the parent - local result - if cset.parent then - result = configset.compile(cset.parent, filter) - else - result = configset.new() - end - - local blocks = cset.blocks - local n = #blocks - - local abspath = filter.files - local basedir - - for i = 1, n do - local block = blocks[i] - if block._origin == cset then - block._origin = result - end - - -- If the filter contains a file path, make it relative to - -- this block's basedir - if abspath and block._basedir and block._basedir ~= basedir then - basedir = block._basedir - filter.files = path.getrelative(basedir, abspath) - end - - if criteria.matches(block._criteria, filter) then - table.insert(result.blocks, block) - end - end - - filter.files = abspath - - result.compiled = true - return result - end diff --git a/build/premake/premake5/src/base/container.lua b/build/premake/premake5/src/base/container.lua deleted file mode 100644 index b5ec00a98f..0000000000 --- a/build/premake/premake5/src/base/container.lua +++ /dev/null @@ -1,361 +0,0 @@ ---- --- container.lua --- Implementation of configuration containers. --- Copyright (c) 2014 Jason Perkins and the Premake project ---- - - local p = premake - p.container = {} - - local container = p.container - - - ---- --- Keep a master dictionary of container class, so they can be easily looked --- up by name (technically you could look at premake["name"] but that is just --- a coding convention and I don't want to count on it) ---- - - container.classes = {} - - - ---- --- Define a new class of containers. --- --- @param name --- The name of the new container class. Used wherever the class needs to --- be shown to the end user in a readable way. --- @param parent (optional) --- If this class of container is intended to be contained within another, --- the containing class object. --- @param extraScopes (optional) --- Each container can hold fields scoped to itself (by putting the container's --- class name into its scope attribute), or any of the container's children. --- If a container can hold scopes other than these (i.e. "config"), it can --- provide a list of those scopes in this argument. --- @return --- If successful, the new class descriptor object (a table). Otherwise, --- returns nil and an error message. ---- - - function container.newClass(name, parent, extraScopes) - local class = p.configset.new(parent) - class.name = name - class.pluralName = name:plural() - class.containedClasses = {} - class.extraScopes = extraScopes - - if parent then - table.insert(parent.containedClasses, class) - end - - container.classes[name] = class - return class - end - - - ---- --- Create a new instance of a configuration container. This is just the --- generic base implementation, each container class will define their --- own version. --- --- @param parent --- The class of container being instantiated. --- @param name --- The name for the new container instance. --- @return --- A new container instance. ---- - - function container.new(class, name) - local self = p.configset.new() - setmetatable(self, p.configset.metatable(self)) - - self.class = class - self.name = name - self.filename = name - self.script = _SCRIPT - self.basedir = os.getcwd() - self.external = false - - for childClass in container.eachChildClass(class) do - self[childClass.pluralName] = {} - end - - return self - end - - - ---- --- Add a new child to an existing container instance. --- --- @param self --- The container instance to hold the child. --- @param child --- The child container instance. ---- - - function container.addChild(self, child) - local children = self[child.class.pluralName] - table.insert(children, child) - children[child.name] = child - - child.parent = self - child[self.class.name] = self - if self.class.alias then - child[self.class.alias] = self - end - end - - - ---- --- Process the contents of a container, which were populated by the project --- script, in preparation for doing work on the results, such as exporting --- project files. ---- - - function container.bake(self) - if self._isBaked then - return self - end - self._isBaked = true - - local ctx = p.context.new(self) - - for key, value in pairs(self) do - ctx[key] = value - end - - local parent = self.parent - if parent then - ctx[parent.class.name] = parent - end - - for class in container.eachChildClass(self.class) do - for child in container.eachChild(self, class) do - child.parent = ctx - child[self.class.name] = ctx - end - end - - if type(self.class.bake) == "function" then - self.class.bake(ctx) - end - - return ctx - end - - - function container.bakeChildren(self) - for class in container.eachChildClass(self.class) do - local children = self[class.pluralName] - for i = 1, #children do - local ctx = container.bake(children[i]) - children[i] = ctx - children[ctx.name] = ctx - end - end - end - - - ---- --- Returns true if the container can hold any of the specified field scopes. --- --- @param class --- The container class to test. --- @param scope --- A scope string (e.g. "project", "config") or an array of scope strings. --- @return --- True if this container can hold any of the specified scopes. ---- - - function container.classCanContain(class, scope) - if type(scope) == "table" then - for i = 1, #scope do - if container.classCanContain(class, scope[i]) then - return true - end - end - return false - end - - -- if I have child classes, check with them first, since scopes - -- are usually specified for leaf nodes in the hierarchy - for child in container.eachChildClass(class) do - if (container.classCanContain(child, scope)) then - return true - end - end - - if class.name == scope or class.alias == scope then - return true - end - - -- is it in my extra scopes list? - if class.extraScopes and table.contains(class.extraScopes, scope) then - return true - end - - return false - end - - - ---- --- Return true if a container class is or inherits from the --- specified class. --- --- @param class --- The container class to be tested. --- @param scope --- The name of the class to be checked against. If the container --- class matches this scope (i.e. class is a project and the --- scope is "project"), or if it is a parent object of it (i.e. --- class is a workspace and scope is "project"), then returns --- true. ---- - - function container.classIsA(class, scope) - while class do - if class.name == scope or class.alias == scope then - return true - end - class = class.parent - end - return false - end - - - ---- --- Enumerate all of the registered child classes of a specific container class. --- --- @param class --- The container class to be enumerated. --- @return --- An iterator function for the container's child classes. ---- - - function container.eachChildClass(class) - local children = class.containedClasses - local i = 0 - return function () - i = i + 1 - if i <= #children then - return children[i] - end - end - end - - - ---- --- Enumerate all of the registered child instances of a specific container. --- --- @param self --- The container to be queried. --- @param class --- The class of child containers to be enumerated. --- @return --- An iterator function for the container's child classes. ---- - - function container.eachChild(self, class) - local children = self[class.pluralName] - local i = 0 - return function () - i = i + 1 - if i <= #children then - return children[i] - end - end - end - - - ---- --- Retrieve the child container with the specified class and name. --- --- @param self --- The container instance to query. --- @param class --- The class of the child container to be fetched. --- @param name --- The name of the child container to be fetched. --- @return --- The child instance if it exists, nil otherwise. ---- - - function container.getChild(self, class, name) - local children = self[class.pluralName] - return children[name] - end - - - ---- --- Retrieve a container class object. --- --- @param name --- The name of the container class to retrieve. --- @return --- The container class object if it exists, nil otherwise. ---- - - function container.getClass(name) - return container.classes[name] - end - - - ---- --- Determine if the container contains a child of the specified class which --- meets the criteria of a testing function. --- --- @param self --- The container to be queried. --- @param class --- The class of the child containers to be enumerated. --- @param func --- A function that takes a child container as its only argument, and --- returns true if it meets the selection criteria for the call. --- @return --- True if the test function returns true for any child. ---- - - function container.hasChild(self, class, func) - for child in container.eachChild(self, class) do - if func(child) then - return true - end - end - end - - - ---- --- Call out to the container validation to make sure everything --- is as it should be before handing off to the actions. ---- - - function container.validate(self) - if type(self.class.validate) == "function" then - self.class.validate(self) - end - end - - - function container.validateChildren(self) - for class in container.eachChildClass(self.class) do - local children = self[class.pluralName] - for i = 1, #children do - container.validate(children[i]) - end - end - end diff --git a/build/premake/premake5/src/base/context.lua b/build/premake/premake5/src/base/context.lua deleted file mode 100644 index fe0e80f1f8..0000000000 --- a/build/premake/premake5/src/base/context.lua +++ /dev/null @@ -1,256 +0,0 @@ --- --- base/context.lua --- --- Provide a context for pulling out values from a configuration set. Each --- context has an associated list of terms which constrain the values that --- it will retrieve, i.e. "Windows, "Debug", "x64", and so on. --- --- The context also provides caching for the values returned from the set. --- --- TODO: I may roll this functionality up into the container API at some --- point. If you find yourself using or extending this code for your own --- work give me a shout before you go too far with it so we can coordinate. --- --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - - p.context = {} - - local context = p.context - local configset = p.configset - - --- --- Create a new context object. --- --- @param cfgset --- The configuration set to provide the data from this context. --- @param environ --- An optional key-value environment table for token expansion; keys and --- values provided in this table will be available for tokens to use. --- @param filename --- An optional filename, which will limit the fetched results to blocks --- which specifically match the provided name. --- @return --- A new context object. --- - - function context.new(cfgset, environ) - local ctx = {} - ctx._cfgset = cfgset - ctx.environ = environ or {} - ctx.terms = {} - - -- This base directory is used when expanding path tokens encountered - -- in non-path value; such values will be made relative to this value - -- so the resulting projects will only contain relative paths. It is - -- expected that the creator of the context will set this value using - -- the setbasedir() function. - - ctx._basedir = os.getcwd() - - -- when a missing field is requested, fetch it from my config - -- set, and then cache the value for future lookups - setmetatable(ctx, context.__mt) - - return ctx - end - - --- --- Create an extended and uncached context based on another context object. --- --- @param baseContext --- The base context to extent --- @param newEnvVars --- An optional key-value environment table for token expansion; keys and --- values provided in this table will be available for tokens to use. --- @return --- A new context object. --- - - function context.extent(baseContext, newEnvVars) - local ctx = {} - ctx._ctx = baseContext - ctx.environ = newEnvVars or baseContext.environ - ctx.terms = {} - ctx._basedir = baseContext._basedir - - setmetatable(ctx, context.__mt_uncached) - - return ctx - end - - - ---- --- Add a new key-value pair to refine the context filtering. --- --- @param ctx --- The context to be filtered. --- @param key --- The new (or an existing) key value. --- @param value --- The filtering value for the key. ---- - - function context.addFilter(ctx, key, value) - if type(value) == "table" then - for i = 1, #value do - value[i] = tostring(value[i]):lower() - end - elseif value ~= nil then - value = tostring(value):lower() - end - ctx.terms[key:lower()] = value - end - - - --- --- Copies the list of terms from an existing context. --- --- @param ctx --- The context to receive the copied terms. --- @param src --- The context containing the terms to copy. --- - - function context.copyFilters(ctx, src) - ctx.terms = {} - for k,v in pairs(src.terms) do - ctx.terms[k] = v - end - end - - - --- --- Merges the list of terms from an existing context. --- --- @param ctx --- The context to receive the copied terms. --- @param src --- The context containing the terms to copy. --- - - function context.mergeFilters(ctx, src) - for k, v in pairs(src.terms) do - if k == "tags" then - ctx.terms[k] = table.join(ctx.terms[k], v) - else - ctx.terms[k] = v - end - end - end - - --- --- Sets the base directory for path token expansion in non-path fields; such --- values will be made relative to this path. --- --- @param ctx --- The context in which to set the value. --- @param basedir --- The new base directory for path token expansion. This should be --- provided as an absolute path. This may be left nil to simply fetch --- the current base directory. --- @return --- The context's base directory. --- - - function context.basedir(ctx, basedir) - ctx._basedir = basedir or ctx._basedir - return ctx._basedir - end - - --- --- Compiles the context for better performance. The list of context terms --- becomes locked down; any subsequent changes are ignored. --- --- @param ctx --- The context to compile. --- - - function context.compile(ctx) - ctx._cfgset = configset.compile(ctx._cfgset, ctx.terms) - end - - --- --- Check to see if a context's underlying configuration set is empty; that --- is, it does not contain any configuration blocks. --- --- @param ctx --- The context to query. --- @return --- True if the set does not contain any blocks. --- - - function context.empty(ctx) - return configset.empty(ctx._cfgset) - end - - --- --- Fetch a value from underlying configuration set. --- --- @param ctx --- The context to query. --- @param key --- The property key to query. --- @param onlylocal --- If true, don't combine values from parent contexts. --- @return --- The value of the key, as determined by the configuration set. If --- there is a corresponding Premake field, and it the field is enabled --- for tokens, any contained tokens will be expanded. --- - - function context.fetchvalue(ctx, key, onlylocal) - if not onlylocal then - local value = rawget(ctx, key) - if value ~= nil then - return value - end - end - - -- The underlying configuration set will only hold registered fields. - -- If the requested key doesn't have a corresponding field, it is just - -- a regular value to be stored and fetched from the table. - - local field = p.field.get(key) - if not field then - return nil - end - - -- If there is a matching field, then go fetch the aggregated value - -- from my configuration set, and then cache it future lookups. - - local value = configset.fetch(ctx._cfgset, field, ctx.terms, ctx, onlylocal and ctx._cfgset) - if value then - -- store the result for later lookups - rawset(ctx, key, value) - end - - return value - end - - context.__mt = { - __index = context.fetchvalue - } - - context.__mt_uncached = { - __index = function(ctx, key) - local field = p.field.get(key) - if not field then - return nil - end - local parent = rawget(ctx, '_ctx') - return configset.fetch(parent._cfgset, field, ctx.terms, ctx, nil) - end - } - diff --git a/build/premake/premake5/src/base/criteria.lua b/build/premake/premake5/src/base/criteria.lua deleted file mode 100644 index a36efb7bab..0000000000 --- a/build/premake/premake5/src/base/criteria.lua +++ /dev/null @@ -1,179 +0,0 @@ --- --- criteria.lua --- --- Stores a list of criteria terms with support for negation, conjunction, --- and wildcard matches. Provides functions match match these criteria --- against various contexts. --- --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - - p.criteria = criteria -- criteria namespace is defined in C host - local criteria = p.criteria - - --- --- These prefixes correspond to the context information built by the oven --- during baking. In theory, any field could be used as a filter, but right --- now only these are set. --- - - criteria._validPrefixes = { - _action = true, - action = true, - architecture = true, - configurations = true, - files = true, - kind = true, - language = true, - _options = true, - options = true, - platforms = true, - sharedlibtype = true, - system = true, - toolset = true, - tags = true, - host = true, - } - - --- --- Flattens a hierarchy of criteria terms into a single array containing all --- of the values as strings in the form of "term:value1 or value2" etc. --- - function criteria.flatten(terms) - local result = {} - - local function flatten(terms) - for key, value in pairs(terms) do - if type(key) == "number" then - if type(value) == "table" then - flatten(value) - elseif value then - table.insert(result, value) - end - elseif type(key) == "string" then - local word = key .. ":" - if type(value) == "table" then - local values = table.flatten(value) - word = word .. table.concat(values, " or ") - else - word = word .. value - end - table.insert(result, word) - else - error("Unknown key type in terms.") - end - end - end - - flatten(terms) - return result - end - ---- --- Create a new criteria object. --- --- @param terms --- A list of criteria terms. --- @param unprefixed --- If true, use the old style, unprefixed filter terms. This will --- eventually be phased out in favor of prefixed terms only. --- @return --- A new criteria object. ---- - - function criteria.new(terms, unprefixed) - terms = criteria.flatten(terms) - - -- Preprocess the list of terms for better performance in matches(). - -- Each term is replaced with a pattern, with an implied AND between - -- them. Each pattern contains one or more words, with an implied OR - -- between them. A word maybe be flagged as negated, or as a wildcard - -- pattern, and may have a field prefix associated with it. - - local patterns = {} - - for i, term in ipairs(terms) do - term = term:lower() - - local pattern = {} - local prefix = iif(unprefixed, nil, "configurations") - - local words = term:explode(" or ") - for _, word in ipairs(words) do - word, prefix = criteria._word(word, prefix) - if prefix and not criteria._validPrefixes[prefix] then - return nil, string.format("Invalid field prefix '%s'", prefix) - end - - -- check for field value aliases - if prefix then - local fld = p.field.get(prefix) - if fld and fld.aliases then - word[1] = fld.aliases[word[1]] or word[1] - end - end - - table.insert(pattern, word) - end - - table.insert(patterns, pattern) - end - - -- The matching logic is written in C now for performance; compile - -- this collection of patterns to C data structures to make that - -- code easier to read and maintain. - - local crit = {} - crit.patterns = patterns - crit.data = criteria._compile(patterns) - crit.terms = terms - return crit - end - - - - function criteria._word(word, prefix) - local wildcard - local assertion = true - - -- Trim off all "not" and field prefixes and check for wildcards - while (true) do - if word:startswith("not ") then - assertion = not assertion - word = word:sub(5) - else - local i = word:find(":", 1, true) - if prefix and i then - prefix = word:sub(1, i - 1) - word = word:sub(i + 1) - else - wildcard = (word:find("*", 1, true) ~= nil) - if wildcard then - word = path.wildcards(word) - end - break - end - end - end - - return { word, prefix, assertion, wildcard }, prefix - end - - ---- --- Add a new prefix to the list of allowed values for filters. Note --- setting a prefix on its own has no effect on the output; a filter --- term must also be set on the corresponding context during baking. --- --- @param prefix --- The new prefix to be allowed. ---- - - function criteria.allowPrefix(prefix) - criteria._validPrefixes[prefix:lower()] = true - end - diff --git a/build/premake/premake5/src/base/detoken.lua b/build/premake/premake5/src/base/detoken.lua deleted file mode 100644 index 162ae104e3..0000000000 --- a/build/premake/premake5/src/base/detoken.lua +++ /dev/null @@ -1,202 +0,0 @@ --- --- detoken.lua --- --- Expands tokens. --- --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - p.detoken = {} - - local detoken = p.detoken - - --- --- Expand tokens in a value. --- --- @param value --- The value containing the tokens to be expanded. --- @param environ --- An execution environment for any token expansion. This is a list of --- key-value pairs that will be inserted as global variables into the --- token expansion runtime environment. --- @param field --- The definition of the field which stores the value. --- @param basedir --- If provided, path tokens encountered in non-path fields (where --- field.paths is set to false) will be made relative to this location. --- @return --- The value with any contained tokens expanded. --- - - function detoken.expand(value, environ, field, basedir) - function expandtoken(token, e, f) - -- fetch the path variable from the action, if needed - local varMap = {} - if f.pathVars or e.overridePathVars then - local action = p.action.current() - if action then - varMap = action.pathVars or {} - end - end - - -- fetch the pathVars from the enviroment. - local envMap = e.pathVars or {} - - -- enable access to the global environment - setmetatable(e, {__index = _G}) - - local isAbs = false - local err - local result - local success - - -- if the token starts with a !, don't try making it relative. - local dontMakeRelative = token:startswith('!') - if dontMakeRelative then - token = token:sub(2, -1) - end - - -- If this token is in my path variable mapping tables, replace the - -- value with the one from the map. This needs to go here because - -- I don't want to make the result relative, but I don't want the - -- absolute path handling below. - local mapped = envMap[token] or varMap[token] - if mapped then - err = nil - result = mapped - if type(result) == "function" then - success, result = pcall(result, e) - if not success then - return nil, result - end - end - - if (type(result) == "table") then - isAbs = result.absolute - result = result.token - else - isAbs = path.isabsolute(result) - end - else - -- convert the token into a function to execute - local func - func, err = load("return " .. token, nil, 't', e) - if not func then - return nil, "load error: " .. err - end - - -- run it and get the result - success, result = pcall(func) - if not success then - err = result - result = nil - else - err = nil - result = result or "" - end - - if result ~= nil then - -- ensure we got a string. - result = tostring(result) - - -- If the result is an absolute path, and it is being inserted into - -- a NON-path value, I need to make it relative to the project that - -- will contain it. Otherwise I ended up with an absolute path in - -- the generated project, and it can no longer be moved around. - if path.hasdeferredjoin(result) then - result = path.resolvedeferredjoin(result) - end - isAbs = path.isabsolute(result) - if isAbs and not f.paths and basedir and not dontMakeRelative then - result = path.getrelative(basedir, result) - end - end - end - - -- If the result is an absolute path, and it is being inserted into - -- a path value, place a special marker at the start of it. After - -- all results have been processed, I can look for these markers to - -- find the last absolute path expanded. - -- - -- Example: the value "/home/user/myprj/%{cfg.objdir}" expands to: - -- "/home/user/myprj//home/user/myprj/obj/Debug". - -- - -- By inserting a marker this becomes: - -- "/home/user/myprj/[\0]/home/user/myprj/obj/Debug". - -- - -- I can now trim everything before the marker to get the right - -- result, which should always be the last absolute path specified: - -- "/home/user/myprj/obj/Debug" - - if result ~= nil and isAbs and f.paths then - result = "\0" .. result - end - return result, err - end - - function expandvalue(value, e, f) - if type(value) ~= "string" then - return value - end - - local count - repeat - value, count = value:gsub("%%{(.-)}", function(token) - local result, err = expandtoken(token:gsub("\\", "\\\\"), e, f) - if err then - error(err .. " in token: " .. token, 0) - end - if not result then - error("Token returned nil, it may not exist: " .. token, 0) - end - return result - end) - until count == 0 - - -- if a path, look for a split out embedded absolute paths - if f.paths then - local i, j - repeat - i, j = value:find("\0") - if i then - value = value:sub(i + 1) - end - until not i - end - return value - end - - local expand_cache = {} - - function recurse(value, e, f) - if type(value) == "table" then - local res_table = {} - - for k, v in pairs(value) do - if tonumber(k) ~= nil then - res_table[k] = recurse(v, e, f) - else - local nk = recurse(k, e, f) - res_table[nk] = recurse(v, e, f) - end - end - - return res_table - else - local res = expand_cache[value] - if res == nil then - if type(value) == "string" and path.hasdeferredjoin(value) then - value = path.resolvedeferredjoin(value) - end - res = expandvalue(value, e, f) - expand_cache[value] = res - end - return res - end - end - - return recurse(value, environ, field or {}) - end - diff --git a/build/premake/premake5/src/base/field.lua b/build/premake/premake5/src/base/field.lua deleted file mode 100644 index 299039adf0..0000000000 --- a/build/premake/premake5/src/base/field.lua +++ /dev/null @@ -1,391 +0,0 @@ ---- --- base/field.lua --- --- Fields hold a particular bit of information about a configuration, such --- as the language of a project or the list of files it uses. Each field has --- a particular data "kind", which describes the structure of the information --- it holds, such a simple string, or a list of paths. --- --- The field.* functions here manage the definition of these fields, and the --- accessor functions required to get, set, remove, and merge their values. --- --- Copyright (c) 2014 Jason Perkins and the Premake project ---- - - local p = premake - p.field = {} - local field = p.field - - --- Lists to hold all of the registered fields and data kinds - - field._list = {} - field._loweredList = {} - field._sortedList = nil - field._kinds = {} - - -- For historical reasons - premake.fields = field._list - --- A cache for data kind accessor functions - - field._accessors = {} - - ---- --- Register a new field. --- --- @param f --- A table describing the new field, with these keys: --- name A unique string name for the field, to be used to identify --- the field in future operations. --- kind The kind of values that can be stored into this field. Kinds --- can be chained together to create more complex types, such as --- "list:string". --- --- In addition, any custom keys set on the field description will be --- maintained. --- --- @return --- A populated field object. Or nil and an error message if the field could --- not be registered. ---- - - function field.new(f) - -- Translate the old approaches to data kind definitions to the new - -- one used here. These should probably be deprecated eventually. - - if f.kind:startswith("key-") then - f.kind = f.kind:sub(5) - f.keyed = true - end - - if f.kind:endswith("-list") then - f.kind = f.kind:sub(1, -6) - f.list = true - end - - local kind = f.kind - - if kind == "object" or kind == "array" then - kind = "table" - end - - if f.list then - kind = "list:" .. kind - end - - if f.keyed then - kind = "keyed:" .. kind - end - - -- Store the translated kind with a new name, so legacy add-on code - -- can continue to work with the old value. - - f._kind = kind - - -- Make sure scope is always an array; don't overwrite old value - if type(f.scope) == "table" then - f.scopes = f.scope - else - f.scopes = { f.scope } - end - - -- All fields must have a valid store() function - if not field.accessor(f, "store") then - return nil, "invalid field kind '" .. f._kind .. "'" - end - - field._list[f.name] = f - field._loweredList[f.name:lower()] = f - field._sortedList = nil - - return f - end - - - ---- --- Remove a previously created field definition. ---- - - function field.unregister(f) - field._list[f.name] = nil - field._loweredList[f.name:lower()] = nil - field._sortedList = nil - end - - - ---- --- Returns an iterator for the list of registered fields; the --- ordering of returned results is arbitrary. ---- - - function field.each() - local index - return function () - index = next(field._list, index) - return field._list[index] - end - end - - - ---- --- Returns an iterator for the list of registered fields; the --- results are in a prioritized order, then alphabetized. ---- - - function field.eachOrdered() - if not field._sortedList then - -- no priorities yet, just alpha sort - local keys = table.keys(field._list) - table.sort(keys) - - field._sortedList = {} - for i = 1, #keys do - field._sortedList[i] = field._list[keys[i]] - end - end - - local i = 0 - return function () - i = i + 1 - return field._sortedList[i] - end - end - - ---- --- Register a new kind of data for field storage. --- --- @param tag --- A unique name of the kind; used in the kind string in new field --- definitions (see new(), above). --- @param settings --- A table containing the processor functions for the new kind. If --- nil, no change is made to the current field settings. --- @return --- The settings table for the specified tag. ---- - - function field.kind(tag, settings) - if settings then - field._kinds[tag] = settings - end - return field._kinds[tag] - end - - - ---- --- Build an "accessor" function to process incoming values for a field. This --- function should be an interview question. --- --- An accessor function takes the form of: --- --- function (field, current, value, nextAccessor) --- --- It receives the target field, the current value of that field, and the new --- value that has been provided by the project script. It then returns the --- new value for the target field. --- --- @param f --- The field for which an accessor should be returned. --- @param method --- The type of accessor function required; currently this should be one of --- "store", "remove", or "merge" though it is possible for add-on modules to --- extend the available methods by implementing appropriate processing --- functions. --- @return --- An accessor function for the field's kind and method. May return nil --- if no processing functions are available for the given method. ---- - - - function field.accessor(f, method) - -- Prepare a cache for accessors using this method; each encountered - -- kind only needs to be fully processed once. - - field._accessors[method] = field._accessors[method] or {} - local cache = field._accessors[method] - - -- Helper function recurses over each piece of the field's data kind, - -- building an accessor function for each sequence encountered. Results - -- cached from earlier calls are reused again. - - local function accessorForKind(kind) - -- I'll end up with a kind of "" when I hit the end of the string - if kind == "" then - return nil - end - - -- Have I already cached a result from an earlier call? - if cache[kind] then - return cache[kind] - end - - -- Split off the first piece from the rest of the kind. If the - -- incoming kind is "list:key:string", thisKind will be "list" - -- and nextKind will be "key:string". - - local thisKind = kind:match('(.-):') or kind - local nextKind = kind:sub(#thisKind + 2) - - -- Get the processor function for this kind. Processors perform - -- data validation and storage appropriate for the data structure. - - local functions = field._kinds[thisKind] - if not functions then - return nil, "Invalid field kind '" .. thisKind .. "'" - end - - local processor = functions[method] - if not processor then - return nil - end - - -- Now recurse to get the accessor function for the remaining parts - -- of the field's data kind. If the kind was "list:key:string", then - -- the processor function handles the "list" part, and this function - -- takes care of the "key:string" part. - - local nextAccessor = accessorForKind(nextKind) - - -- Now here's the magic: wrap the processor and the next accessor - -- up together into a Matryoshka doll of function calls, each call - -- handling just it's level of the kind. - - accessor = function(f, current, value) - return processor(f, current, value, nextAccessor) - end - - -- And cache the result so I don't have to go through that again - cache[kind] = accessor - return accessor - end - - return accessorForKind(f._kind) - end - - - - function field.compare(f, a, b) - local processor = field.accessor(f, "compare") - if processor then - return processor(f, a, b) - else - return (a == b) - end - end - - - ---- --- Fetch a field description by name. ---- - - function field.get(name) - return field._list[name] or field._loweredList[name:lower()] - end - - - - function field.merge(f, current, value) - local processor = field.accessor(f, "merge") - if processor then - return processor(f, current, value) - else - return value - end - end - - ---- --- Is this a field that supports merging values together? Non-merging fields --- can simply overwrite their values, merging fields can call merge() to --- combine two values together. ---- - - function field.merges(f) - return (field.accessor(f, "merge") ~= nil) - end - - - ---- --- Retrieve a property from a field, based on it's data kind. Allows extra --- information to be stored along with the data kind definitions; use this --- call to find the first value in the field's data kind chain. ---- - - function field.property(f, tag) - local kinds = string.explode(f._kind, ":", true) - for i, kind in ipairs(kinds) do - local value = field._kinds[kind][tag] - if value ~= nil then - return value - end - end - end - - - - ---- --- Override one of the field kind accessor functions. This works just like --- p.override(), but applies the new function to the internal field --- description and clears the accessor caches to make sure the change gets --- picked up by future operations. ---- - - function field.override(fieldName, accessorName, func) - local kind = field.kind(fieldName) - p.override(kind, accessorName, func) - field._accessors = {} - end - - - function field.remove(f, current, value) - local processor = field.accessor(f, "remove") - if processor then - return processor(f, current, value) - else - return value - end - end - - - - function field.removes(f) - return (field.accessor(f, "merge") ~= nil and field.accessor(f, "remove") ~= nil) - end - - - - function field.store(f, current, value) - local processor = field.accessor(f, "store") - if processor then - return processor(f, current, value) - else - return value - end - end - - - - function field.translate(f, value) - local processor = field.accessor(f, "translate") - if processor then - return processor(f, value, nil)[1] - else - return value - end - end - - - function field.translates(f) - return (field.accessor(f, "translate") ~= nil) - end - diff --git a/build/premake/premake5/src/base/fileconfig.lua b/build/premake/premake5/src/base/fileconfig.lua deleted file mode 100644 index 37e232b579..0000000000 --- a/build/premake/premake5/src/base/fileconfig.lua +++ /dev/null @@ -1,300 +0,0 @@ --- --- fileconfig.lua --- The set of configuration information for a specific file. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - p.fileconfig = {} - - local fileconfig = p.fileconfig - local context = p.context - local project = p.project - - --- --- A little confusing: the file configuration actually contains two objects. --- The first object, the one that is returned by fileconfig.new() and later --- passed back in as *the* file configuration object, contains the common --- project-wide settings for the file. This object also contains a list of --- "sub-configurations", one for each project configuration to which the file --- belongs. --- --- Internally, I'm calling the first object the "file configuration" (fcfg) --- and the children "file sub-configurations" (fsub). To distinguish them --- from the project configurations (cfg). --- --- Define metatables for each of types; more info below. --- - - fileconfig.fcfg_mt = {} - fileconfig.fsub_mt = {} - - --- --- Create a new file configuration object. --- --- @param fname --- The absolute path to the file. --- @param prj --- The project which contains the file. --- @return --- A new file configuration object. --- - - function fileconfig.new(fname, prj) - local environ = { } - local fcfg = context.new(prj, environ) - context.copyFilters(fcfg, prj) - context.addFilter(fcfg, "files", fname:lower()) - - for key, value in pairs(prj.environ) do - environ[key] = value - end - - environ.file = fcfg - context.compile(fcfg) - - fcfg.project = prj - fcfg.workspace = prj.workspace - fcfg.configs = {} - fcfg.abspath = fname - - context.basedir(fcfg, prj.location) - - -- Most of the other path properties are computed on demand - -- from the file's absolute path. - - setmetatable(fcfg, fileconfig.fcfg_mt) - - -- Except for the virtual path, which is expensive to compute, and - -- can be used across all the sub-configurations - - local vpath = project.getvpath(prj, fname) - if vpath ~= fcfg.abspath then - fcfg.vpath = vpath - end - - return fcfg - end - - --- --- Associate a new project configuration with a file. It is possible for a --- file to only appear in a subset of a project's configurations. --- --- @param fcfg --- The file configuration to which the project configuration should be --- associated. --- @param cfg --- The project configuration to associate. --- - - function fileconfig.addconfig(fcfg, cfg) - local prj = cfg.project - local wks = cfg.workspace - - -- Create a new context object for this configuration-file pairing. - -- The context has the ability to pull out configuration settings - -- specific to the file. - - local environ = {} - local fsub = context.new(prj, environ) - context.copyFilters(fsub, fcfg) - context.mergeFilters(fsub, cfg) - - fcfg.configs[cfg] = fsub - - -- set up an environment for expanding tokens contained by this file - -- configuration; based on the configuration's environment so that - -- any magic set up there gets maintained - - for key, value in pairs(cfg.environ) do - environ[key] = value - end - - for key, value in pairs(fcfg.environ) do - environ[key] = value - end - - -- finish the setup - - context.compile(fsub) - fsub.abspath = fcfg.abspath - fsub.vpath = fcfg.vpath - fsub.config = cfg - fsub.project = prj - fsub.workspace = wks - - -- Set the context's base directory to the project's file system - -- location. Any path tokens which are expanded in non-path fields - -- (such as the custom build commands) will be made relative to - -- this path, ensuring a portable generated project. - - context.basedir(fsub, prj.location) - - return setmetatable(fsub, fileconfig.fsub_mt) - end - - - --- --- Retrieve the configuration settings for a particular file/project --- configuration pairing. --- --- @param fcfg --- The file configuration to query. --- @param cfg --- The project configuration to query. --- @return --- The configuration context for the pairing, or nil if this project --- configuration is not associated with this file. --- - - function fileconfig.getconfig(fcfg, cfg) - return fcfg.configs[cfg] - end - - - --- --- Checks to see if the project or file configuration contains a --- custom build rule. --- --- @param cfg --- A project or file configuration. --- @return --- True if the configuration contains settings for a custom --- build rule. --- - - function fileconfig.hasCustomBuildRule(fcfg) - return fcfg and (#fcfg.buildcommands > 0) and (#fcfg.buildoutputs > 0) - end - - - --- --- Checks to see if the file configuration contains any unique information, --- or if it is the same as its parent configuration. --- --- @param fcfg --- A file configuration. --- @return --- True if the file configuration contains values which differ from the --- parent project configuration, false otherwise. --- - - function fileconfig.hasFileSettings(fcfg) - if not fcfg then - return false - end - for key, field in pairs(p.fields) do - if field.scopes[1] == "config" then - local value = fcfg[field.name] - if value then - if type(value) == "table" then - if #value > 0 then - return true - end - else - return true - end - end - end - end - return false - end - - - --- --- Rather than store pre-computed strings for all of the path variations --- (abspath, relpath, vpath, name, etc.) for each file (there can be quite --- a lot of them) I assign a metatable to the file configuration objects --- that will build these values on the fly. --- --- I am using these pseudo-properties, rather than explicit functions, to make --- it easier to fetch them script tokens (i.e. %{file.relpath} with no need --- for knowledge of the internal Premake APIs. --- - - --- --- The indexer for the file configurations. If I have a path building function --- to fulfill the request, call it. Else fall back to the context's own value lookups. --- - - local fcfg_mt = fileconfig.fcfg_mt - - fcfg_mt.__index = function(fcfg, key) - if type(fcfg_mt[key]) == "function" then - return fcfg_mt[key](fcfg) - end - return context.__mt.__index(fcfg, key) - end - - --- --- The indexer for the file sub-configurations. Check for a path building --- function first, and then fall back to the context's own value lookups. --- TODO: Would be great if this didn't require inside knowledge of context. --- - - fileconfig.fsub_mt.__index = function(fsub, key) - if type(fcfg_mt[key]) == "function" then - return fcfg_mt[key](fsub) - end - return context.__mt.__index(fsub, key) - end - --- --- And here are the path building functions. --- - - function fcfg_mt.basename(fcfg) - return path.getbasename(fcfg.abspath) - end - - - function fcfg_mt.directory(fcfg) - return path.getdirectory(fcfg.abspath) - end - - function fcfg_mt.reldirectory(fcfg) - return path.getdirectory(fcfg.relpath) - end - - function fcfg_mt.name(fcfg) - return path.getname(fcfg.abspath) - end - - - function fcfg_mt.objname(fcfg) - if fcfg.sequence ~= nil and fcfg.sequence > 0 then - return fcfg.basename .. fcfg.sequence - else - return fcfg.basename - end - end - - - function fcfg_mt.path(fcfg) - return fcfg.relpath - end - - - function fcfg_mt.relpath(fcfg) - return project.getrelative(fcfg.project, fcfg.abspath) - end - - - function fcfg_mt.vpath(fcfg) - -- This only gets called if no explicit virtual path was set - return fcfg.relpath - end - - - function fcfg_mt.extension(fcfg) - return path.getextension(fcfg.abspath) - end diff --git a/build/premake/premake5/src/base/global.lua b/build/premake/premake5/src/base/global.lua deleted file mode 100644 index f055bd8183..0000000000 --- a/build/premake/premake5/src/base/global.lua +++ /dev/null @@ -1,113 +0,0 @@ ---- --- global.lua --- The global container holds workspaces and rules. --- Copyright (c) 2014-2015 Jason Perkins and the Premake project ---- - - local p = premake - p.global = p.api.container("global") - local global = p.global - - ---- --- Create a new global container instance. ---- - - function global.new(name) - return p.container.new(p.global, name) - end - ---- --- Bakes the global scope. ---- - function global.bake(self) - p.container.bakeChildren(self) - end - - ---- --- Iterate over the collection of rules in a session. --- --- @returns --- An iterator function. ---- - - function global.eachRule() - local root = p.api.rootContainer() - return p.container.eachChild(root, p.rule) - end - - - ---- --- Iterate over the collection of workspaces in a session. --- --- @returns --- A workspace iterator function. ---- - - function global.eachWorkspace() - local root = p.api.rootContainer() - return p.container.eachChild(root, p.workspace) - end - - p.alias(global, "eachWorkspace", "eachSolution") - - - ---- --- Retrieve a rule by name or index. --- --- @param key --- The rule key, either a string name or integer index. --- @returns --- The rule with the provided key. ---- - - function global.getRule(key) - local root = p.api.rootContainer() - return root.rules[key] - end - - - ---- --- Retrieve the rule to applies to the provided file name, if any such --- rule exists. --- --- @param fname --- The name of the file. --- @param rules --- A list of rule names to be included in the search. If not specified, --- all rules will be checked. --- @returns --- The rule, is one has been registered, or nil. ---- - - function global.getRuleForFile(fname, rules) - for rule in global.eachRule() do - if not rules or table.contains(rules, rule.name) then - if path.hasextension(fname, rule.fileextension) then - return rule - end - end - end - end - - - ---- --- Retrieve a workspace by name or index. --- --- @param key --- The workspace key, either a string name or integer index. --- @returns --- The workspace with the provided key. ---- - - function global.getWorkspace(key) - local root = p.api.rootContainer() - return root.workspaces[key] - end - - p.alias(global, "getWorkspace", "getSolution") diff --git a/build/premake/premake5/src/base/globals.lua b/build/premake/premake5/src/base/globals.lua deleted file mode 100644 index 96b0f875cb..0000000000 --- a/build/premake/premake5/src/base/globals.lua +++ /dev/null @@ -1,90 +0,0 @@ --- --- globals.lua --- Replacements and extensions to Lua's global functions. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - --- --- Find and execute a Lua source file present on the filesystem, but --- continue without error if the file is not present. This is used to --- handle optional files such as the premake-system.lua script. --- --- @param fname --- The name of the file to load. This may be specified as a single --- file path or an array of file paths, in which case the first --- file found is run. --- @return --- True if a file was found and executed, nil otherwise. --- - - function dofileopt(fname) - if type(fname) == "string" then fname = {fname} end - for i = 1, #fname do - local found = os.locate(fname[i]) - if not found then - found = os.locate(fname[i] .. ".lua") - end - if found then - dofile(found) - return true - end - end - end - - - ---- --- Load and run an external script file, with a bit of extra logic to make --- including projects easier. if "path" is a directory, will look for --- path/premake5.lua. And each file is tracked, and loaded only once. --- --- @param fname --- The name of the directory or file to include. If a directory, will --- automatically include the contained premake5.lua or premake4.lua --- script at that lcoation. ---- - - io._includedFiles = {} - - function include(fname) - local fullPath = premake.findProjectScript(fname) - fname = fullPath or fname - if not io._includedFiles[fname] then - io._includedFiles[fname] = true - return dofile(fname) - end - end - - ---- --- Extend require() with a second argument to specify the expected --- version of the loaded module. Raises an error if the version criteria --- are not met. --- --- @param modname --- The name of the module to load. --- @param versions --- An optional version criteria string; see premake.checkVersion() --- for more information on the format. --- @return --- If successful, the loaded module, which is also stored into the --- global package.loaded table. ---- - - premake.override(_G, "require", function(base, modname, versions) - local result, mod = pcall(base,modname) - if not result then - if (premake.downloadModule(modname, versions)) then - result, mod = pcall(base, modname); - end - if not result then - error(mod, 3) - end - end - if mod and versions and not premake.checkVersion(mod._VERSION, versions) then - error(string.format("module %s %s does not meet version criteria %s", - modname, mod._VERSION or "(none)", versions), 3) - end - return mod - end) diff --git a/build/premake/premake5/src/base/group.lua b/build/premake/premake5/src/base/group.lua deleted file mode 100644 index 0d98a1024f..0000000000 --- a/build/premake/premake5/src/base/group.lua +++ /dev/null @@ -1,22 +0,0 @@ ---- --- group.lua --- A psuedo-configuration container to represent project groups. --- Copyright (c) 2014 Jason Perkins and the Premake project ---- - - local p = premake - p.group = p.api.container("group", p.workspace) - local group = p.group - - ---- --- Bit of a hack: prevent groups from holding any configuration data. ---- - - group.placeholder = true - - - - function group.new(name) - return p.container.new(group, name) - end diff --git a/build/premake/premake5/src/base/help.lua b/build/premake/premake5/src/base/help.lua deleted file mode 100644 index eb5142c055..0000000000 --- a/build/premake/premake5/src/base/help.lua +++ /dev/null @@ -1,81 +0,0 @@ --- --- help.lua --- User help, displayed on /help option. --- Copyright (c) 2002-2013 Jason Perkins and the Premake project --- - - - function premake.showhelp() - - -- display the basic usage - printf("Premake %s, a build script generator", _PREMAKE_VERSION) - printf(_PREMAKE_COPYRIGHT) - printf("%s %s", _VERSION, _COPYRIGHT) - printf("") - printf("Usage: premake5 [options] action [arguments]") - printf("") - - -- filter all options by category. - local categories = {} - for option in premake.option.each() do - local cat = "OPTIONS - General" - if option.category then - cat = "OPTIONS - " .. option.category; - end - - if categories[cat] then - table.insert(categories[cat], option) - else - categories[cat] = {option} - end - end - - -- display all options - for k, options in spairs(categories) do - printf(k) - printf("") - - local length = 0 - for _, option in ipairs(options) do - local trigger = option.trigger - if (option.value) then trigger = trigger .. "=" .. option.value end - if (#trigger > length) then length = #trigger end - end - - for _, option in ipairs(options) do - local trigger = option.trigger - local description = option.description - if (option.value) then trigger = trigger .. "=" .. option.value end - if (option.allowed) then description = description .. "; one of:" end - - printf(" --%-" .. length .. "s %s", trigger, description) - if (option.allowed) then - local function compareValue(a, b) - return a[1] < b[1] - end - table.sort(option.allowed, compareValue) - - for _, value in ipairs(option.allowed) do - printf(" %-" .. length-1 .. "s %s", value[1], value[2]) - end - printf("") - end - end - printf("") - end - - -- display all actions - printf("ACTIONS") - printf("") - for action in premake.action.each() do - printf(" %-17s %s", action.trigger, action.description) - end - printf("") - - - -- see more - printf("For additional information, see https://premake.github.io") - - end - - diff --git a/build/premake/premake5/src/base/http.lua b/build/premake/premake5/src/base/http.lua deleted file mode 100644 index 5fc31d4ad2..0000000000 --- a/build/premake/premake5/src/base/http.lua +++ /dev/null @@ -1,68 +0,0 @@ --- --- http.lua --- Additions to the http namespace. --- Copyright (c) 2008-2014 Jason Perkins and the Premake project --- - - if http == nil then - return - end - ---- --- Simple progress bar on stdout for curl downloads. ---- - - function http.reportProgress(total, current) - local width = 70 - local progress = math.floor(current * width / total) - - if progress == width then - io.write(string.rep(' ', width + 2) .. '\r') - else - io.write('[' .. string.rep('=', progress) .. string.rep(' ', width - progress) .. ']\r') - end - end - - ---- --- Correctly escape parameters for use in a url. ---- - - function http.escapeUrlParam(param) - local url_encodings = { - [' '] = '%%20', - ['!'] = '%%21', - ['"'] = '%%22', - ['#'] = '%%23', - ['$'] = '%%24', - ['&'] = '%%26', - ['\''] = '%%27', - ['('] = '%%28', - [')'] = '%%29', - ['*'] = '%%2A', - ['+'] = '%%2B', - ['-'] = '%%2D', - ['.'] = '%%2E', - ['/'] = '%%2F', - [':'] = '%%3A', - [';'] = '%%3B', - ['<'] = '%%3C', - ['='] = '%%3D', - ['>'] = '%%3E', - ['?'] = '%%3F', - ['@'] = '%%40', - ['['] = '%%5B', - ['\\'] = '%%5C', - [']'] = '%%5D', - ['^'] = '%%5E', - ['_'] = '%%5F', - ['`'] = '%%60' - } - - param = param:gsub('%%', '%%25') - for k,v in pairs(url_encodings) do - param = param:gsub('%' .. k, v) - end - - return param - end \ No newline at end of file diff --git a/build/premake/premake5/src/base/io.lua b/build/premake/premake5/src/base/io.lua deleted file mode 100644 index 35c3c1dbd3..0000000000 --- a/build/premake/premake5/src/base/io.lua +++ /dev/null @@ -1,47 +0,0 @@ --- --- io.lua --- Additions to the I/O namespace. --- Copyright (c) 2008-2014 Jason Perkins and the Premake project --- - - --- --- Open an overload of the io.open() function, which will create any missing --- subdirectories in the filename if "mode" is set to writeable. --- - - premake.override(io, "open", function(base, fname, mode) - if mode and (mode:find("w") or mode:find("a")) then - local dir = path.getdirectory(fname) - ok, err = os.mkdir(dir) - if not ok then - error(err, 0) - end - end - return base(fname, mode) - end) - - --- --- Write content to a new file. --- - function io.writefile(filename, content) - local file = io.open(filename, "w+b") - if file then - file:write(content) - file:close() - return true - end - end - --- --- Read content from new file. --- - function io.readfile(filename) - local file = io.open(filename, "rb") - if file then - local content = file:read("*a") - file:close() - return content - end - end \ No newline at end of file diff --git a/build/premake/premake5/src/base/json.lua b/build/premake/premake5/src/base/json.lua deleted file mode 100644 index 2a54f4cfd4..0000000000 --- a/build/premake/premake5/src/base/json.lua +++ /dev/null @@ -1,1548 +0,0 @@ --- -*- coding: utf-8 -*- --- --- Simple JSON encoding and decoding in pure Lua. --- --- Copyright 2010-2016 Jeffrey Friedl --- http://regex.info/blog/ --- Latest version: http://regex.info/blog/lua/json --- --- This code is released under a Creative Commons CC-BY "Attribution" License: --- http://creativecommons.org/licenses/by/3.0/deed.en_US --- --- It can be used for any purpose so long as: --- 1) the copyright notice above is maintained --- 2) the web-page links above are maintained --- 3) the 'AUTHOR_NOTE' string below is maintained --- -local VERSION = '20161109.21' -- version history at end of file -local AUTHOR_NOTE = "-[ JSON.lua package by Jeffrey Friedl (http://regex.info/blog/lua/json) version 20161109.21 ]-" - --- --- The 'AUTHOR_NOTE' variable exists so that information about the source --- of the package is maintained even in compiled versions. It's also --- included in OBJDEF below mostly to quiet warnings about unused variables. --- -local OBJDEF = { - VERSION = VERSION, - AUTHOR_NOTE = AUTHOR_NOTE, -} - - --- --- Simple JSON encoding and decoding in pure Lua. --- JSON definition: http://www.json.org/ --- --- --- JSON = assert(loadfile "JSON.lua")() -- one-time load of the routines --- --- local lua_value = JSON:decode(raw_json_text) --- --- local raw_json_text = JSON:encode(lua_table_or_value) --- local pretty_json_text = JSON:encode_pretty(lua_table_or_value) -- "pretty printed" version for human readability --- --- --- --- DECODING (from a JSON string to a Lua table) --- --- --- JSON = assert(loadfile "JSON.lua")() -- one-time load of the routines --- --- local lua_value = JSON:decode(raw_json_text) --- --- If the JSON text is for an object or an array, e.g. --- { "what": "books", "count": 3 } --- or --- [ "Larry", "Curly", "Moe" ] --- --- the result is a Lua table, e.g. --- { what = "books", count = 3 } --- or --- { "Larry", "Curly", "Moe" } --- --- --- The encode and decode routines accept an optional second argument, --- "etc", which is not used during encoding or decoding, but upon error --- is passed along to error handlers. It can be of any type (including nil). --- --- --- --- ERROR HANDLING --- --- With most errors during decoding, this code calls --- --- JSON:onDecodeError(message, text, location, etc) --- --- with a message about the error, and if known, the JSON text being --- parsed and the byte count where the problem was discovered. You can --- replace the default JSON:onDecodeError() with your own function. --- --- The default onDecodeError() merely augments the message with data --- about the text and the location if known (and if a second 'etc' --- argument had been provided to decode(), its value is tacked onto the --- message as well), and then calls JSON.assert(), which itself defaults --- to Lua's built-in assert(), and can also be overridden. --- --- For example, in an Adobe Lightroom plugin, you might use something like --- --- function JSON:onDecodeError(message, text, location, etc) --- LrErrors.throwUserError("Internal Error: invalid JSON data") --- end --- --- or even just --- --- function JSON.assert(message) --- LrErrors.throwUserError("Internal Error: " .. message) --- end --- --- If JSON:decode() is passed a nil, this is called instead: --- --- JSON:onDecodeOfNilError(message, nil, nil, etc) --- --- and if JSON:decode() is passed HTML instead of JSON, this is called: --- --- JSON:onDecodeOfHTMLError(message, text, nil, etc) --- --- The use of the fourth 'etc' argument allows stronger coordination --- between decoding and error reporting, especially when you provide your --- own error-handling routines. Continuing with the the Adobe Lightroom --- plugin example: --- --- function JSON:onDecodeError(message, text, location, etc) --- local note = "Internal Error: invalid JSON data" --- if type(etc) = 'table' and etc.photo then --- note = note .. " while processing for " .. etc.photo:getFormattedMetadata('fileName') --- end --- LrErrors.throwUserError(note) --- end --- --- : --- : --- --- for i, photo in ipairs(photosToProcess) do --- : --- : --- local data = JSON:decode(someJsonText, { photo = photo }) --- : --- : --- end --- --- --- --- If the JSON text passed to decode() has trailing garbage (e.g. as with the JSON "[123]xyzzy"), --- the method --- --- JSON:onTrailingGarbage(json_text, location, parsed_value, etc) --- --- is invoked, where: --- --- json_text is the original JSON text being parsed, --- location is the count of bytes into json_text where the garbage starts (6 in the example), --- parsed_value is the Lua result of what was successfully parsed ({123} in the example), --- etc is as above. --- --- If JSON:onTrailingGarbage() does not abort, it should return the value decode() should return, --- or nil + an error message. --- --- local new_value, error_message = JSON:onTrailingGarbage() --- --- The default handler just invokes JSON:onDecodeError("trailing garbage"...), but you can have --- this package ignore trailing garbage via --- --- function JSON:onTrailingGarbage(json_text, location, parsed_value, etc) --- return parsed_value --- end --- --- --- DECODING AND STRICT TYPES --- --- Because both JSON objects and JSON arrays are converted to Lua tables, --- it's not normally possible to tell which original JSON type a --- particular Lua table was derived from, or guarantee decode-encode --- round-trip equivalency. --- --- However, if you enable strictTypes, e.g. --- --- JSON = assert(loadfile "JSON.lua")() --load the routines --- JSON.strictTypes = true --- --- then the Lua table resulting from the decoding of a JSON object or --- JSON array is marked via Lua metatable, so that when re-encoded with --- JSON:encode() it ends up as the appropriate JSON type. --- --- (This is not the default because other routines may not work well with --- tables that have a metatable set, for example, Lightroom API calls.) --- --- --- ENCODING (from a lua table to a JSON string) --- --- JSON = assert(loadfile "JSON.lua")() -- one-time load of the routines --- --- local raw_json_text = JSON:encode(lua_table_or_value) --- local pretty_json_text = JSON:encode_pretty(lua_table_or_value) -- "pretty printed" version for human readability --- local custom_pretty = JSON:encode(lua_table_or_value, etc, { pretty = true, indent = "| ", align_keys = false }) --- --- On error during encoding, this code calls: --- --- JSON:onEncodeError(message, etc) --- --- which you can override in your local JSON object. --- --- The 'etc' in the error call is the second argument to encode() --- and encode_pretty(), or nil if it wasn't provided. --- --- --- ENCODING OPTIONS --- --- An optional third argument, a table of options, can be provided to encode(). --- --- encode_options = { --- -- options for making "pretty" human-readable JSON (see "PRETTY-PRINTING" below) --- pretty = true, --- indent = " ", --- align_keys = false, --- --- -- other output-related options --- null = "\0", -- see "ENCODING JSON NULL VALUES" below --- stringsAreUtf8 = false, -- see "HANDLING UNICODE LINE AND PARAGRAPH SEPARATORS FOR JAVA" below --- } --- --- json_string = JSON:encode(mytable, etc, encode_options) --- --- --- --- For reference, the defaults are: --- --- pretty = false --- null = nil, --- stringsAreUtf8 = false, --- --- --- --- PRETTY-PRINTING --- --- Enabling the 'pretty' encode option helps generate human-readable JSON. --- --- pretty = JSON:encode(val, etc, { --- pretty = true, --- indent = " ", --- align_keys = false, --- }) --- --- encode_pretty() is also provided: it's identical to encode() except --- that encode_pretty() provides a default options table if none given in the call: --- --- { pretty = true, align_keys = false, indent = " " } --- --- For example, if --- --- JSON:encode(data) --- --- produces: --- --- {"city":"Kyoto","climate":{"avg_temp":16,"humidity":"high","snowfall":"minimal"},"country":"Japan","wards":11} --- --- then --- --- JSON:encode_pretty(data) --- --- produces: --- --- { --- "city": "Kyoto", --- "climate": { --- "avg_temp": 16, --- "humidity": "high", --- "snowfall": "minimal" --- }, --- "country": "Japan", --- "wards": 11 --- } --- --- The following three lines return identical results: --- JSON:encode_pretty(data) --- JSON:encode_pretty(data, nil, { pretty = true, align_keys = false, indent = " " }) --- JSON:encode (data, nil, { pretty = true, align_keys = false, indent = " " }) --- --- An example of setting your own indent string: --- --- JSON:encode_pretty(data, nil, { pretty = true, indent = "| " }) --- --- produces: --- --- { --- | "city": "Kyoto", --- | "climate": { --- | | "avg_temp": 16, --- | | "humidity": "high", --- | | "snowfall": "minimal" --- | }, --- | "country": "Japan", --- | "wards": 11 --- } --- --- An example of setting align_keys to true: --- --- JSON:encode_pretty(data, nil, { pretty = true, indent = " ", align_keys = true }) --- --- produces: --- --- { --- "city": "Kyoto", --- "climate": { --- "avg_temp": 16, --- "humidity": "high", --- "snowfall": "minimal" --- }, --- "country": "Japan", --- "wards": 11 --- } --- --- which I must admit is kinda ugly, sorry. This was the default for --- encode_pretty() prior to version 20141223.14. --- --- --- HANDLING UNICODE LINE AND PARAGRAPH SEPARATORS FOR JAVA --- --- If the 'stringsAreUtf8' encode option is set to true, consider Lua strings not as a sequence of bytes, --- but as a sequence of UTF-8 characters. --- --- Currently, the only practical effect of setting this option is that Unicode LINE and PARAGRAPH --- separators, if found in a string, are encoded with a JSON escape instead of being dumped as is. --- The JSON is valid either way, but encoding this way, apparently, allows the resulting JSON --- to also be valid Java. --- --- AMBIGUOUS SITUATIONS DURING THE ENCODING --- --- During the encode, if a Lua table being encoded contains both string --- and numeric keys, it fits neither JSON's idea of an object, nor its --- idea of an array. To get around this, when any string key exists (or --- when non-positive numeric keys exist), numeric keys are converted to --- strings. --- --- For example, --- JSON:encode({ "one", "two", "three", SOMESTRING = "some string" })) --- produces the JSON object --- {"1":"one","2":"two","3":"three","SOMESTRING":"some string"} --- --- To prohibit this conversion and instead make it an error condition, set --- JSON.noKeyConversion = true --- --- --- ENCODING JSON NULL VALUES --- --- Lua tables completely omit keys whose value is nil, so without special handling there's --- no way to get a field in a JSON object with a null value. For example --- JSON:encode({ username = "admin", password = nil }) --- produces --- {"username":"admin"} --- --- In order to actually produce --- {"username":"admin", "password":null} --- one can include a string value for a "null" field in the options table passed to encode().... --- any Lua table entry with that value becomes null in the JSON output: --- JSON:encode({ username = "admin", password = "xyzzy" }, nil, { null = "xyzzy" }) --- produces --- {"username":"admin", "password":null} --- --- Just be sure to use a string that is otherwise unlikely to appear in your data. --- The string "\0" (a string with one null byte) may well be appropriate for many applications. --- --- The "null" options also applies to Lua tables that become JSON arrays. --- JSON:encode({ "one", "two", nil, nil }) --- produces --- ["one","two"] --- while --- NULL = "\0" --- JSON:encode({ "one", "two", NULL, NULL}, nil, { null = NULL }) --- produces --- ["one","two",null,null] --- --- --- --- --- HANDLING LARGE AND/OR PRECISE NUMBERS --- --- --- Without special handling, numbers in JSON can lose precision in Lua. --- For example: --- --- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }') --- --- print("small: ", type(T.small), T.small) --- print("big: ", type(T.big), T.big) --- print("precise: ", type(T.precise), T.precise) --- --- produces --- --- small: number 12345 --- big: number 1.2345678901235e+28 --- precise: number 9876.6789012346 --- --- Precision is lost with both 'big' and 'precise'. --- --- This package offers ways to try to handle this better (for some definitions of "better")... --- --- The most precise method is by setting the global: --- --- JSON.decodeNumbersAsObjects = true --- --- When this is set, numeric JSON data is encoded into Lua in a form that preserves the exact --- JSON numeric presentation when re-encoded back out to JSON, or accessed in Lua as a string. --- --- (This is done by encoding the numeric data with a Lua table/metatable that returns --- the possibly-imprecise numeric form when accessed numerically, but the original precise --- representation when accessed as a string. You can also explicitly access --- via JSON:forceString() and JSON:forceNumber()) --- --- Consider the example above, with this option turned on: --- --- JSON.decodeNumbersAsObjects = true --- --- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }') --- --- print("small: ", type(T.small), T.small) --- print("big: ", type(T.big), T.big) --- print("precise: ", type(T.precise), T.precise) --- --- This now produces: --- --- small: table 12345 --- big: table 12345678901234567890123456789 --- precise: table 9876.67890123456789012345 --- --- However, within Lua you can still use the values (e.g. T.precise in the example above) in numeric --- contexts. In such cases you'll get the possibly-imprecise numeric version, but in string contexts --- and when the data finds its way to this package's encode() function, the original full-precision --- representation is used. --- --- Even without using the JSON.decodeNumbersAsObjects option, you can encode numbers --- in your Lua table that retain high precision upon encoding to JSON, by using the JSON:asNumber() --- function: --- --- T = { --- imprecise = 123456789123456789.123456789123456789, --- precise = JSON:asNumber("123456789123456789.123456789123456789") --- } --- --- print(JSON:encode_pretty(T)) --- --- This produces: --- --- { --- "precise": 123456789123456789.123456789123456789, --- "imprecise": 1.2345678912346e+17 --- } --- --- --- --- A different way to handle big/precise JSON numbers is to have decode() merely return --- the exact string representation of the number instead of the number itself. --- This approach might be useful when the numbers are merely some kind of opaque --- object identifier and you want to work with them in Lua as strings anyway. --- --- This approach is enabled by setting --- --- JSON.decodeIntegerStringificationLength = 10 --- --- The value is the number of digits (of the integer part of the number) at which to stringify numbers. --- --- Consider our previous example with this option set to 10: --- --- JSON.decodeIntegerStringificationLength = 10 --- --- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }') --- --- print("small: ", type(T.small), T.small) --- print("big: ", type(T.big), T.big) --- print("precise: ", type(T.precise), T.precise) --- --- This produces: --- --- small: number 12345 --- big: string 12345678901234567890123456789 --- precise: number 9876.6789012346 --- --- The long integer of the 'big' field is at least JSON.decodeIntegerStringificationLength digits --- in length, so it's converted not to a Lua integer but to a Lua string. Using a value of 0 or 1 ensures --- that all JSON numeric data becomes strings in Lua. --- --- Note that unlike --- JSON.decodeNumbersAsObjects = true --- this stringification is simple and unintelligent: the JSON number simply becomes a Lua string, and that's the end of it. --- If the string is then converted back to JSON, it's still a string. After running the code above, adding --- print(JSON:encode(T)) --- produces --- {"big":"12345678901234567890123456789","precise":9876.6789012346,"small":12345} --- which is unlikely to be desired. --- --- There's a comparable option for the length of the decimal part of a number: --- --- JSON.decodeDecimalStringificationLength --- --- This can be used alone or in conjunction with --- --- JSON.decodeIntegerStringificationLength --- --- to trip stringification on precise numbers with at least JSON.decodeIntegerStringificationLength digits after --- the decimal point. --- --- This example: --- --- JSON.decodeIntegerStringificationLength = 10 --- JSON.decodeDecimalStringificationLength = 5 --- --- T = JSON:decode('{ "small":12345, "big":12345678901234567890123456789, "precise":9876.67890123456789012345 }') --- --- print("small: ", type(T.small), T.small) --- print("big: ", type(T.big), T.big) --- print("precise: ", type(T.precise), T.precise) --- --- produces: --- --- small: number 12345 --- big: string 12345678901234567890123456789 --- precise: string 9876.67890123456789012345 --- --- --- --- --- --- SUMMARY OF METHODS YOU CAN OVERRIDE IN YOUR LOCAL LUA JSON OBJECT --- --- assert --- onDecodeError --- onDecodeOfNilError --- onDecodeOfHTMLError --- onTrailingGarbage --- onEncodeError --- --- If you want to create a separate Lua JSON object with its own error handlers, --- you can reload JSON.lua or use the :new() method. --- ---------------------------------------------------------------------------- - -local default_pretty_indent = " " -local default_pretty_options = { pretty = true, align_keys = false, indent = default_pretty_indent } - -local isArray = { __tostring = function() return "JSON array" end } isArray.__index = isArray -local isObject = { __tostring = function() return "JSON object" end } isObject.__index = isObject - -function OBJDEF:newArray(tbl) - return setmetatable(tbl or {}, isArray) -end - -function OBJDEF:newObject(tbl) - return setmetatable(tbl or {}, isObject) -end - - - - -local function getnum(op) - return type(op) == 'number' and op or op.N -end - -local isNumber = { - __tostring = function(T) return T.S end, - __unm = function(op) return getnum(op) end, - - __concat = function(op1, op2) return tostring(op1) .. tostring(op2) end, - __add = function(op1, op2) return getnum(op1) + getnum(op2) end, - __sub = function(op1, op2) return getnum(op1) - getnum(op2) end, - __mul = function(op1, op2) return getnum(op1) * getnum(op2) end, - __div = function(op1, op2) return getnum(op1) / getnum(op2) end, - __mod = function(op1, op2) return getnum(op1) % getnum(op2) end, - __pow = function(op1, op2) return getnum(op1) ^ getnum(op2) end, - __lt = function(op1, op2) return getnum(op1) < getnum(op2) end, - __eq = function(op1, op2) return getnum(op1) == getnum(op2) end, - __le = function(op1, op2) return getnum(op1) <= getnum(op2) end, -} -isNumber.__index = isNumber - -function OBJDEF:asNumber(item) - - if getmetatable(item) == isNumber then - -- it's already a JSON number object. - return item - elseif type(item) == 'table' and type(item.S) == 'string' and type(item.N) == 'number' then - -- it's a number-object table that lost its metatable, so give it one - return setmetatable(item, isNumber) - else - -- the normal situation... given a number or a string representation of a number.... - local holder = { - S = tostring(item), -- S is the representation of the number as a string, which remains precise - N = tonumber(item), -- N is the number as a Lua number. - } - return setmetatable(holder, isNumber) - end -end - --- --- Given an item that might be a normal string or number, or might be an 'isNumber' object defined above, --- return the string version. This shouldn't be needed often because the 'isNumber' object should autoconvert --- to a string in most cases, but it's here to allow it to be forced when needed. --- -function OBJDEF:forceString(item) - if type(item) == 'table' and type(item.S) == 'string' then - return item.S - else - return tostring(item) - end -end - --- --- Given an item that might be a normal string or number, or might be an 'isNumber' object defined above, --- return the numeric version. --- -function OBJDEF:forceNumber(item) - if type(item) == 'table' and type(item.N) == 'number' then - return item.N - else - return tonumber(item) - end -end - - -local function unicode_codepoint_as_utf8(codepoint) - -- - -- codepoint is a number - -- - if codepoint <= 127 then - return string.char(codepoint) - - elseif codepoint <= 2047 then - -- - -- 110yyyxx 10xxxxxx <-- useful notation from http://en.wikipedia.org/wiki/Utf8 - -- - local highpart = math.floor(codepoint / 0x40) - local lowpart = codepoint - (0x40 * highpart) - return string.char(0xC0 + highpart, - 0x80 + lowpart) - - elseif codepoint <= 65535 then - -- - -- 1110yyyy 10yyyyxx 10xxxxxx - -- - local highpart = math.floor(codepoint / 0x1000) - local remainder = codepoint - 0x1000 * highpart - local midpart = math.floor(remainder / 0x40) - local lowpart = remainder - 0x40 * midpart - - highpart = 0xE0 + highpart - midpart = 0x80 + midpart - lowpart = 0x80 + lowpart - - -- - -- Check for an invalid character (thanks Andy R. at Adobe). - -- See table 3.7, page 93, in http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf#G28070 - -- - if ( highpart == 0xE0 and midpart < 0xA0 ) or - ( highpart == 0xED and midpart > 0x9F ) or - ( highpart == 0xF0 and midpart < 0x90 ) or - ( highpart == 0xF4 and midpart > 0x8F ) - then - return "?" - else - return string.char(highpart, - midpart, - lowpart) - end - - else - -- - -- 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx - -- - local highpart = math.floor(codepoint / 0x40000) - local remainder = codepoint - 0x40000 * highpart - local midA = math.floor(remainder / 0x1000) - remainder = remainder - 0x1000 * midA - local midB = math.floor(remainder / 0x40) - local lowpart = remainder - 0x40 * midB - - return string.char(0xF0 + highpart, - 0x80 + midA, - 0x80 + midB, - 0x80 + lowpart) - end -end - -function OBJDEF:onDecodeError(message, text, location, etc) - if text then - if location then - message = string.format("%s at byte %d of: %s", message, location, text) - else - message = string.format("%s: %s", message, text) - end - end - - if etc ~= nil then - message = message .. " (" .. OBJDEF:encode(etc) .. ")" - end - - if self.assert then - self.assert(false, message) - else - assert(false, message) - end -end - -function OBJDEF:onTrailingGarbage(json_text, location, parsed_value, etc) - return self:onDecodeError("trailing garbage", json_text, location, etc) -end - -OBJDEF.onDecodeOfNilError = OBJDEF.onDecodeError -OBJDEF.onDecodeOfHTMLError = OBJDEF.onDecodeError - -function OBJDEF:onEncodeError(message, etc) - if etc ~= nil then - message = message .. " (" .. OBJDEF:encode(etc) .. ")" - end - - if self.assert then - self.assert(false, message) - else - assert(false, message) - end -end - -local function grok_number(self, text, start, options) - -- - -- Grab the integer part - -- - local integer_part = text:match('^-?[1-9]%d*', start) - or text:match("^-?0", start) - - if not integer_part then - self:onDecodeError("expected number", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible - end - - local i = start + integer_part:len() - - -- - -- Grab an optional decimal part - -- - local decimal_part = text:match('^%.%d+', i) or "" - - i = i + decimal_part:len() - - -- - -- Grab an optional exponential part - -- - local exponent_part = text:match('^[eE][-+]?%d+', i) or "" - - i = i + exponent_part:len() - - local full_number_text = integer_part .. decimal_part .. exponent_part - - if options.decodeNumbersAsObjects then - return OBJDEF:asNumber(full_number_text), i - end - - -- - -- If we're told to stringify under certain conditions, so do. - -- We punt a bit when there's an exponent by just stringifying no matter what. - -- I suppose we should really look to see whether the exponent is actually big enough one - -- way or the other to trip stringification, but I'll be lazy about it until someone asks. - -- - if (options.decodeIntegerStringificationLength - and - (integer_part:len() >= options.decodeIntegerStringificationLength or exponent_part:len() > 0)) - - or - - (options.decodeDecimalStringificationLength - and - (decimal_part:len() >= options.decodeDecimalStringificationLength or exponent_part:len() > 0)) - then - return full_number_text, i -- this returns the exact string representation seen in the original JSON - end - - - - local as_number = tonumber(full_number_text) - - if not as_number then - self:onDecodeError("bad number", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible - end - - return as_number, i -end - - -local function grok_string(self, text, start, options) - - if text:sub(start,start) ~= '"' then - self:onDecodeError("expected string's opening quote", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible - end - - local i = start + 1 -- +1 to bypass the initial quote - local text_len = text:len() - local VALUE = "" - while i <= text_len do - local c = text:sub(i,i) - if c == '"' then - return VALUE, i + 1 - end - if c ~= '\\' then - VALUE = VALUE .. c - i = i + 1 - elseif text:match('^\\b', i) then - VALUE = VALUE .. "\b" - i = i + 2 - elseif text:match('^\\f', i) then - VALUE = VALUE .. "\f" - i = i + 2 - elseif text:match('^\\n', i) then - VALUE = VALUE .. "\n" - i = i + 2 - elseif text:match('^\\r', i) then - VALUE = VALUE .. "\r" - i = i + 2 - elseif text:match('^\\t', i) then - VALUE = VALUE .. "\t" - i = i + 2 - else - local hex = text:match('^\\u([0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF])', i) - if hex then - i = i + 6 -- bypass what we just read - - -- We have a Unicode codepoint. It could be standalone, or if in the proper range and - -- followed by another in a specific range, it'll be a two-code surrogate pair. - local codepoint = tonumber(hex, 16) - if codepoint >= 0xD800 and codepoint <= 0xDBFF then - -- it's a hi surrogate... see whether we have a following low - local lo_surrogate = text:match('^\\u([dD][cdefCDEF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF])', i) - if lo_surrogate then - i = i + 6 -- bypass the low surrogate we just read - codepoint = 0x2400 + (codepoint - 0xD800) * 0x400 + tonumber(lo_surrogate, 16) - else - -- not a proper low, so we'll just leave the first codepoint as is and spit it out. - end - end - VALUE = VALUE .. unicode_codepoint_as_utf8(codepoint) - - else - - -- just pass through what's escaped - VALUE = VALUE .. text:match('^\\(.)', i) - i = i + 2 - end - end - end - - self:onDecodeError("unclosed string", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible -end - -local function skip_whitespace(text, start) - - local _, match_end = text:find("^[ \n\r\t]+", start) -- [http://www.ietf.org/rfc/rfc4627.txt] Section 2 - if match_end then - return match_end + 1 - else - return start - end -end - -local grok_one -- assigned later - -local function grok_object(self, text, start, options) - - if text:sub(start,start) ~= '{' then - self:onDecodeError("expected '{'", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible - end - - local i = skip_whitespace(text, start + 1) -- +1 to skip the '{' - - local VALUE = self.strictTypes and self:newObject { } or { } - - if text:sub(i,i) == '}' then - return VALUE, i + 1 - end - local text_len = text:len() - while i <= text_len do - local key, new_i = grok_string(self, text, i, options) - - i = skip_whitespace(text, new_i) - - if text:sub(i, i) ~= ':' then - self:onDecodeError("expected colon", text, i, options.etc) - return nil, i -- in case the error method doesn't abort, return something sensible - end - - i = skip_whitespace(text, i + 1) - - local new_val, new_i = grok_one(self, text, i, options) - - VALUE[key] = new_val - - -- - -- Expect now either '}' to end things, or a ',' to allow us to continue. - -- - i = skip_whitespace(text, new_i) - - local c = text:sub(i,i) - - if c == '}' then - return VALUE, i + 1 - end - - if text:sub(i, i) ~= ',' then - self:onDecodeError("expected comma or '}'", text, i, options.etc) - return nil, i -- in case the error method doesn't abort, return something sensible - end - - i = skip_whitespace(text, i + 1) - end - - self:onDecodeError("unclosed '{'", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible -end - -local function grok_array(self, text, start, options) - if text:sub(start,start) ~= '[' then - self:onDecodeError("expected '['", text, start, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible - end - - local i = skip_whitespace(text, start + 1) -- +1 to skip the '[' - local VALUE = self.strictTypes and self:newArray { } or { } - if text:sub(i,i) == ']' then - return VALUE, i + 1 - end - - local VALUE_INDEX = 1 - - local text_len = text:len() - while i <= text_len do - local val, new_i = grok_one(self, text, i, options) - - -- can't table.insert(VALUE, val) here because it's a no-op if val is nil - VALUE[VALUE_INDEX] = val - VALUE_INDEX = VALUE_INDEX + 1 - - i = skip_whitespace(text, new_i) - - -- - -- Expect now either ']' to end things, or a ',' to allow us to continue. - -- - local c = text:sub(i,i) - if c == ']' then - return VALUE, i + 1 - end - if text:sub(i, i) ~= ',' then - self:onDecodeError("expected comma or ']'", text, i, options.etc) - return nil, i -- in case the error method doesn't abort, return something sensible - end - i = skip_whitespace(text, i + 1) - end - self:onDecodeError("unclosed '['", text, start, options.etc) - return nil, i -- in case the error method doesn't abort, return something sensible -end - - -grok_one = function(self, text, start, options) - -- Skip any whitespace - start = skip_whitespace(text, start) - - if start > text:len() then - self:onDecodeError("unexpected end of string", text, nil, options.etc) - return nil, start -- in case the error method doesn't abort, return something sensible - end - - if text:find('^"', start) then - return grok_string(self, text, start, options.etc) - - elseif text:find('^[-0123456789 ]', start) then - return grok_number(self, text, start, options) - - elseif text:find('^%{', start) then - return grok_object(self, text, start, options) - - elseif text:find('^%[', start) then - return grok_array(self, text, start, options) - - elseif text:find('^true', start) then - return true, start + 4 - - elseif text:find('^false', start) then - return false, start + 5 - - elseif text:find('^null', start) then - return nil, start + 4 - - else - self:onDecodeError("can't parse JSON", text, start, options.etc) - return nil, 1 -- in case the error method doesn't abort, return something sensible - end -end - -function OBJDEF:decode(text, etc, options) - -- - -- If the user didn't pass in a table of decode options, make an empty one. - -- - if type(options) ~= 'table' then - options = {} - end - - -- - -- If they passed in an 'etc' argument, stuff it into the options. - -- (If not, any 'etc' field in the options they passed in remains to be used) - -- - if etc ~= nil then - options.etc = etc - end - - - if type(self) ~= 'table' or self.__index ~= OBJDEF then - local error_message = "JSON:decode must be called in method format" - OBJDEF:onDecodeError(error_message, nil, nil, options.etc) - return nil, error_message -- in case the error method doesn't abort, return something sensible - end - - if text == nil then - local error_message = "nil passed to JSON:decode()" - self:onDecodeOfNilError(error_message, nil, nil, options.etc) - return nil, error_message -- in case the error method doesn't abort, return something sensible - - elseif type(text) ~= 'string' then - local error_message = "expected string argument to JSON:decode()" - self:onDecodeError(string.format("%s, got %s", error_message, type(text)), nil, nil, options.etc) - return nil, error_message -- in case the error method doesn't abort, return something sensible - end - - if text:match('^%s*$') then - -- an empty string is nothing, but not an error - return nil - end - - if text:match('^%s*<') then - -- Can't be JSON... we'll assume it's HTML - local error_message = "HTML passed to JSON:decode()" - self:onDecodeOfHTMLError(error_message, text, nil, options.etc) - return nil, error_message -- in case the error method doesn't abort, return something sensible - end - - -- - -- Ensure that it's not UTF-32 or UTF-16. - -- Those are perfectly valid encodings for JSON (as per RFC 4627 section 3), - -- but this package can't handle them. - -- - if text:sub(1,1):byte() == 0 or (text:len() >= 2 and text:sub(2,2):byte() == 0) then - local error_message = "JSON package groks only UTF-8, sorry" - self:onDecodeError(error_message, text, nil, options.etc) - return nil, error_message -- in case the error method doesn't abort, return something sensible - end - - -- - -- apply global options - -- - if options.decodeNumbersAsObjects == nil then - options.decodeNumbersAsObjects = self.decodeNumbersAsObjects - end - if options.decodeIntegerStringificationLength == nil then - options.decodeIntegerStringificationLength = self.decodeIntegerStringificationLength - end - if options.decodeDecimalStringificationLength == nil then - options.decodeDecimalStringificationLength = self.decodeDecimalStringificationLength - end - - -- - -- Finally, go parse it - -- - local success, value, next_i = pcall(grok_one, self, text, 1, options) - - if success then - - local error_message = nil - if next_i ~= #text + 1 then - -- something's left over after we parsed the first thing.... whitespace is allowed. - next_i = skip_whitespace(text, next_i) - - -- if we have something left over now, it's trailing garbage - if next_i ~= #text + 1 then - value, error_message = self:onTrailingGarbage(text, next_i, value, options.etc) - end - end - return value, error_message - - else - - -- If JSON:onDecodeError() didn't abort out of the pcall, we'll have received - -- the error message here as "value", so pass it along as an assert. - local error_message = value - if self.assert then - self.assert(false, error_message) - else - assert(false, error_message) - end - -- ...and if we're still here (because the assert didn't throw an error), - -- return a nil and throw the error message on as a second arg - return nil, error_message - - end -end - -local function backslash_replacement_function(c) - if c == "\n" then - return "\\n" - elseif c == "\r" then - return "\\r" - elseif c == "\t" then - return "\\t" - elseif c == "\b" then - return "\\b" - elseif c == "\f" then - return "\\f" - elseif c == '"' then - return '\\"' - elseif c == '\\' then - return '\\\\' - else - return string.format("\\u%04x", c:byte()) - end -end - -local chars_to_be_escaped_in_JSON_string - = '[' - .. '"' -- class sub-pattern to match a double quote - .. '%\\' -- class sub-pattern to match a backslash - .. '%z' -- class sub-pattern to match a null - .. '\001' .. '-' .. '\031' -- class sub-pattern to match control characters - .. ']' - - -local LINE_SEPARATOR_as_utf8 = unicode_codepoint_as_utf8(0x2028) -local PARAGRAPH_SEPARATOR_as_utf8 = unicode_codepoint_as_utf8(0x2029) -local function json_string_literal(value, options) - local newval = value:gsub(chars_to_be_escaped_in_JSON_string, backslash_replacement_function) - if options.stringsAreUtf8 then - -- - -- This feels really ugly to just look into a string for the sequence of bytes that we know to be a particular utf8 character, - -- but utf8 was designed purposefully to make this kind of thing possible. Still, feels dirty. - -- I'd rather decode the byte stream into a character stream, but it's not technically needed so - -- not technically worth it. - -- - newval = newval:gsub(LINE_SEPARATOR_as_utf8, '\\u2028'):gsub(PARAGRAPH_SEPARATOR_as_utf8,'\\u2029') - end - return '"' .. newval .. '"' -end - -local function object_or_array(self, T, etc) - -- - -- We need to inspect all the keys... if there are any strings, we'll convert to a JSON - -- object. If there are only numbers, it's a JSON array. - -- - -- If we'll be converting to a JSON object, we'll want to sort the keys so that the - -- end result is deterministic. - -- - local string_keys = { } - local number_keys = { } - local number_keys_must_be_strings = false - local maximum_number_key - - for key in pairs(T) do - if type(key) == 'string' then - table.insert(string_keys, key) - elseif type(key) == 'number' then - table.insert(number_keys, key) - if key <= 0 or key >= math.huge then - number_keys_must_be_strings = true - elseif not maximum_number_key or key > maximum_number_key then - maximum_number_key = key - end - else - self:onEncodeError("can't encode table with a key of type " .. type(key), etc) - end - end - - if #string_keys == 0 and not number_keys_must_be_strings then - -- - -- An empty table, or a numeric-only array - -- - if #number_keys > 0 then - return nil, maximum_number_key -- an array - elseif tostring(T) == "JSON array" then - return nil - elseif tostring(T) == "JSON object" then - return { } - else - -- have to guess, so we'll pick array, since empty arrays are likely more common than empty objects - return nil - end - end - - table.sort(string_keys) - - local map - if #number_keys > 0 then - -- - -- If we're here then we have either mixed string/number keys, or numbers inappropriate for a JSON array - -- It's not ideal, but we'll turn the numbers into strings so that we can at least create a JSON object. - -- - - if self.noKeyConversion then - self:onEncodeError("a table with both numeric and string keys could be an object or array; aborting", etc) - end - - -- - -- Have to make a shallow copy of the source table so we can remap the numeric keys to be strings - -- - map = { } - for key, val in pairs(T) do - map[key] = val - end - - table.sort(number_keys) - - -- - -- Throw numeric keys in there as strings - -- - for _, number_key in ipairs(number_keys) do - local string_key = tostring(number_key) - if map[string_key] == nil then - table.insert(string_keys , string_key) - map[string_key] = T[number_key] - else - self:onEncodeError("conflict converting table with mixed-type keys into a JSON object: key " .. number_key .. " exists both as a string and a number.", etc) - end - end - end - - return string_keys, nil, map -end - --- --- Encode --- --- 'options' is nil, or a table with possible keys: --- --- pretty -- If true, return a pretty-printed version. --- --- indent -- A string (usually of spaces) used to indent each nested level. --- --- align_keys -- If true, align all the keys when formatting a table. --- --- null -- If this exists with a string value, table elements with this value are output as JSON null. --- --- stringsAreUtf8 -- If true, consider Lua strings not as a sequence of bytes, but as a sequence of UTF-8 characters. --- (Currently, the only practical effect of setting this option is that Unicode LINE and PARAGRAPH --- separators, if found in a string, are encoded with a JSON escape instead of as raw UTF-8. --- The JSON is valid either way, but encoding this way, apparently, allows the resulting JSON --- to also be valid Java.) --- --- -local encode_value -- must predeclare because it calls itself -function encode_value(self, value, parents, etc, options, indent, for_key) - - -- - -- keys in a JSON object can never be null, so we don't even consider options.null when converting a key value - -- - if value == nil or (not for_key and options and options.null and value == options.null) then - return 'null' - - elseif type(value) == 'string' then - return json_string_literal(value, options) - - elseif type(value) == 'number' then - if value ~= value then - -- - -- NaN (Not a Number). - -- JSON has no NaN, so we have to fudge the best we can. This should really be a package option. - -- - return "null" - elseif value >= math.huge then - -- - -- Positive infinity. JSON has no INF, so we have to fudge the best we can. This should - -- really be a package option. Note: at least with some implementations, positive infinity - -- is both ">= math.huge" and "<= -math.huge", which makes no sense but that's how it is. - -- Negative infinity is properly "<= -math.huge". So, we must be sure to check the ">=" - -- case first. - -- - return "1e+9999" - elseif value <= -math.huge then - -- - -- Negative infinity. - -- JSON has no INF, so we have to fudge the best we can. This should really be a package option. - -- - return "-1e+9999" - else - return tostring(value) - end - - elseif type(value) == 'boolean' then - return tostring(value) - - elseif type(value) ~= 'table' then - self:onEncodeError("can't convert " .. type(value) .. " to JSON", etc) - - elseif getmetatable(value) == isNumber then - return tostring(value) - else - -- - -- A table to be converted to either a JSON object or array. - -- - local T = value - - if type(options) ~= 'table' then - options = {} - end - if type(indent) ~= 'string' then - indent = "" - end - - if parents[T] then - self:onEncodeError("table " .. tostring(T) .. " is a child of itself", etc) - else - parents[T] = true - end - - local result_value - - local object_keys, maximum_number_key, map = object_or_array(self, T, etc) - if maximum_number_key then - -- - -- An array... - -- - local ITEMS = { } - for i = 1, maximum_number_key do - table.insert(ITEMS, encode_value(self, T[i], parents, etc, options, indent)) - end - - if options.pretty then - result_value = "[ " .. table.concat(ITEMS, ", ") .. " ]" - else - result_value = "[" .. table.concat(ITEMS, ",") .. "]" - end - - elseif object_keys then - -- - -- An object - -- - local TT = map or T - - if options.pretty then - - local KEYS = { } - local max_key_length = 0 - for _, key in ipairs(object_keys) do - local encoded = encode_value(self, tostring(key), parents, etc, options, indent, true) - if options.align_keys then - max_key_length = math.max(max_key_length, #encoded) - end - table.insert(KEYS, encoded) - end - local key_indent = indent .. tostring(options.indent or "") - local subtable_indent = key_indent .. string.rep(" ", max_key_length) .. (options.align_keys and " " or "") - local FORMAT = "%s%" .. string.format("%d", max_key_length) .. "s: %s" - - local COMBINED_PARTS = { } - for i, key in ipairs(object_keys) do - local encoded_val = encode_value(self, TT[key], parents, etc, options, subtable_indent) - table.insert(COMBINED_PARTS, string.format(FORMAT, key_indent, KEYS[i], encoded_val)) - end - result_value = "{\n" .. table.concat(COMBINED_PARTS, ",\n") .. "\n" .. indent .. "}" - - else - - local PARTS = { } - for _, key in ipairs(object_keys) do - local encoded_val = encode_value(self, TT[key], parents, etc, options, indent) - local encoded_key = encode_value(self, tostring(key), parents, etc, options, indent, true) - table.insert(PARTS, string.format("%s:%s", encoded_key, encoded_val)) - end - result_value = "{" .. table.concat(PARTS, ",") .. "}" - - end - else - -- - -- An empty array/object... we'll treat it as an array, though it should really be an option - -- - result_value = "[]" - end - - parents[T] = false - return result_value - end -end - -local function top_level_encode(self, value, etc, options) - local val = encode_value(self, value, {}, etc, options) - if val == nil then - --PRIVATE("may need to revert to the previous public verison if I can't figure out what the guy wanted") - return val - else - return val - end -end - -function OBJDEF:encode(value, etc, options) - if type(self) ~= 'table' or self.__index ~= OBJDEF then - OBJDEF:onEncodeError("JSON:encode must be called in method format", etc) - end - - -- - -- If the user didn't pass in a table of decode options, make an empty one. - -- - if type(options) ~= 'table' then - options = {} - end - - return top_level_encode(self, value, etc, options) -end - -function OBJDEF:encode_pretty(value, etc, options) - if type(self) ~= 'table' or self.__index ~= OBJDEF then - OBJDEF:onEncodeError("JSON:encode_pretty must be called in method format", etc) - end - - -- - -- If the user didn't pass in a table of decode options, use the default pretty ones - -- - if type(options) ~= 'table' then - options = default_pretty_options - end - - return top_level_encode(self, value, etc, options) -end - -function OBJDEF.__tostring() - return "JSON encode/decode package" -end - -OBJDEF.__index = OBJDEF - -function OBJDEF:new(args) - local new = { } - - if args then - for key, val in pairs(args) do - new[key] = val - end - end - - return setmetatable(new, OBJDEF) -end - -return OBJDEF:new() - --- --- Version history: --- --- 20161109.21 Oops, had a small boo-boo in the previous update. --- --- 20161103.20 Used to silently ignore trailing garbage when decoding. Now fails via JSON:onTrailingGarbage() --- http://seriot.ch/parsing_json.php --- --- Built-in error message about "expected comma or ']'" had mistakenly referred to '[' --- --- Updated the built-in error reporting to refer to bytes rather than characters. --- --- The decode() method no longer assumes that error handlers abort. --- --- Made the VERSION string a string instead of a number --- - --- 20160916.19 Fixed the isNumber.__index assignment (thanks to Jack Taylor) --- --- 20160730.18 Added JSON:forceString() and JSON:forceNumber() --- --- 20160728.17 Added concatenation to the metatable for JSON:asNumber() --- --- 20160709.16 Could crash if not passed an options table (thanks jarno heikkinen ). --- --- Made JSON:asNumber() a bit more resilient to being passed the results of itself. --- --- 20160526.15 Added the ability to easily encode null values in JSON, via the new "null" encoding option. --- (Thanks to Adam B for bringing up the issue.) --- --- Added some support for very large numbers and precise floats via --- JSON.decodeNumbersAsObjects --- JSON.decodeIntegerStringificationLength --- JSON.decodeDecimalStringificationLength --- --- Added the "stringsAreUtf8" encoding option. (Hat tip to http://lua-users.org/wiki/JsonModules ) --- --- 20141223.14 The encode_pretty() routine produced fine results for small datasets, but isn't really --- appropriate for anything large, so with help from Alex Aulbach I've made the encode routines --- more flexible, and changed the default encode_pretty() to be more generally useful. --- --- Added a third 'options' argument to the encode() and encode_pretty() routines, to control --- how the encoding takes place. --- --- Updated docs to add assert() call to the loadfile() line, just as good practice so that --- if there is a problem loading JSON.lua, the appropriate error message will percolate up. --- --- 20140920.13 Put back (in a way that doesn't cause warnings about unused variables) the author string, --- so that the source of the package, and its version number, are visible in compiled copies. --- --- 20140911.12 Minor lua cleanup. --- Fixed internal reference to 'JSON.noKeyConversion' to reference 'self' instead of 'JSON'. --- (Thanks to SmugMug's David Parry for these.) --- --- 20140418.11 JSON nulls embedded within an array were being ignored, such that --- ["1",null,null,null,null,null,"seven"], --- would return --- {1,"seven"} --- It's now fixed to properly return --- {1, nil, nil, nil, nil, nil, "seven"} --- Thanks to "haddock" for catching the error. --- --- 20140116.10 The user's JSON.assert() wasn't always being used. Thanks to "blue" for the heads up. --- --- 20131118.9 Update for Lua 5.3... it seems that tostring(2/1) produces "2.0" instead of "2", --- and this caused some problems. --- --- 20131031.8 Unified the code for encode() and encode_pretty(); they had been stupidly separate, --- and had of course diverged (encode_pretty didn't get the fixes that encode got, so --- sometimes produced incorrect results; thanks to Mattie for the heads up). --- --- Handle encoding tables with non-positive numeric keys (unlikely, but possible). --- --- If a table has both numeric and string keys, or its numeric keys are inappropriate --- (such as being non-positive or infinite), the numeric keys are turned into --- string keys appropriate for a JSON object. So, as before, --- JSON:encode({ "one", "two", "three" }) --- produces the array --- ["one","two","three"] --- but now something with mixed key types like --- JSON:encode({ "one", "two", "three", SOMESTRING = "some string" })) --- instead of throwing an error produces an object: --- {"1":"one","2":"two","3":"three","SOMESTRING":"some string"} --- --- To maintain the prior throw-an-error semantics, set --- JSON.noKeyConversion = true --- --- 20131004.7 Release under a Creative Commons CC-BY license, which I should have done from day one, sorry. --- --- 20130120.6 Comment update: added a link to the specific page on my blog where this code can --- be found, so that folks who come across the code outside of my blog can find updates --- more easily. --- --- 20111207.5 Added support for the 'etc' arguments, for better error reporting. --- --- 20110731.4 More feedback from David Kolf on how to make the tests for Nan/Infinity system independent. --- --- 20110730.3 Incorporated feedback from David Kolf at http://lua-users.org/wiki/JsonModules: --- --- * When encoding lua for JSON, Sparse numeric arrays are now handled by --- spitting out full arrays, such that --- JSON:encode({"one", "two", [10] = "ten"}) --- returns --- ["one","two",null,null,null,null,null,null,null,"ten"] --- --- In 20100810.2 and earlier, only up to the first non-null value would have been retained. --- --- * When encoding lua for JSON, numeric value NaN gets spit out as null, and infinity as "1+e9999". --- Version 20100810.2 and earlier created invalid JSON in both cases. --- --- * Unicode surrogate pairs are now detected when decoding JSON. --- --- 20100810.2 added some checking to ensure that an invalid Unicode character couldn't leak in to the UTF-8 encoding --- --- 20100731.1 initial public release --- diff --git a/build/premake/premake5/src/base/jsonwrapper.lua b/build/premake/premake5/src/base/jsonwrapper.lua deleted file mode 100644 index bf2992a9a5..0000000000 --- a/build/premake/premake5/src/base/jsonwrapper.lua +++ /dev/null @@ -1,59 +0,0 @@ --- --- jsonwrapper.lua --- Provides JSON encoding and decoding API by wrapping a third-party JSON library --- Copyright (c) 2017 Jason Perkins and the Premake project --- - - json = {} - - local implementation = dofile('json.lua') - local err - json.implementation = implementation - - function implementation.assert(condition, message) - if not condition then - err = message - end - - -- The JSON library we're using assumes that encode error handlers will - -- abort on error. It doesn't have the same assumption for decode error - -- handlers, but we're using this same function for both. - - assert(condition, message) - end - - function json.encode(value) - err = nil - - local success, result = pcall(implementation.encode, implementation, value) - - if not success then - return nil, err - end - - return result - end - - function json.encode_pretty(value) - err = nil - - local success, result = pcall(implementation.encode_pretty, implementation, value) - - if not success then - return nil, err - end - - return result - end - - function json.decode(value) - err = nil - - local success, result = pcall(implementation.decode, implementation, value) - - if not success then - return nil, err - end - - return result - end diff --git a/build/premake/premake5/src/base/languages.lua b/build/premake/premake5/src/base/languages.lua deleted file mode 100644 index e6e676631f..0000000000 --- a/build/premake/premake5/src/base/languages.lua +++ /dev/null @@ -1,24 +0,0 @@ ---- --- languages.lua --- Language helpers. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project ---- - - local p = premake - p.languages = {} - - function p.languages.isc(value) - return value == "C"; - end - - function p.languages.iscpp(value) - return value == "C++"; - end - - function p.languages.iscsharp(value) - return value == "C#"; - end - - function p.languages.isfsharp(value) - return value == "F#"; - end diff --git a/build/premake/premake5/src/base/moduledownloader.lua b/build/premake/premake5/src/base/moduledownloader.lua deleted file mode 100644 index 339ee18024..0000000000 --- a/build/premake/premake5/src/base/moduledownloader.lua +++ /dev/null @@ -1,67 +0,0 @@ --- --- moduledownloader.lua --- Downloads a module from a package server --- Copyright (c) 2002-2017 Jason Perkins and the Premake project --- - ---- --- Downloads a module from a package server --- --- @param modname --- The name of the module to download. --- @param versions --- An optional version criteria string; see premake.checkVersion() --- for more information on the format. --- @return --- If successful, the module was downloaded into the .modules folder. ---- - - function premake.downloadModule(modname, versions) - if http == nil then - return false - end - - -- get current user. - local user = 'UNKNOWN' - if os.ishost('windows') then - user = os.getenv('USERNAME') or user - else - user = os.getenv('LOGNAME') or user - end - - -- what server to ask? - local server = package.server or 'http://packagesrv.com'; - - -- get the link to the module? - local url = 'api/v1/module/' .. http.escapeUrlParam(modname) - if versions then - url = url .. '/' .. http.escapeUrlParam(versions) - end - local content, result_str, response_code = http.get(server .. '/' .. url) - if content then - url = content - else - -- no content, module doesn't exist. - return false - end - - -- Download the module. - local location = '.modules/' .. modname - local destination = location .. '/temp.zip' - - os.mkdir(location) - local result_str, response_code = http.download(url, destination, { - headers = {'X-Premake-User: ' .. user}, - progress = iif(_OPTIONS.verbose, http.reportProgress, nil) - }) - - if result_str ~= 'OK' then - premake.error('Download of %s failed (%d)\n%s', url, response_code, result_str) - end - - -- Unzip the module, and delete the temporary zip file. - verbosef(' UNZIP : %s', destination) - zip.extract(destination, location) - os.remove(destination) - return true; - end diff --git a/build/premake/premake5/src/base/option.lua b/build/premake/premake5/src/base/option.lua deleted file mode 100644 index a8cf8b1fda..0000000000 --- a/build/premake/premake5/src/base/option.lua +++ /dev/null @@ -1,174 +0,0 @@ --- --- option.lua --- Work with the list of registered options. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - local p = premake - p.option = {} - local m = p.option - - --- --- We can't control how people will type in the command line arguments, or how --- project scripts will define their custom options, so case becomes an issue. --- To mimimize issues, set up the _OPTIONS table to always use lowercase keys. --- - - local _OPTIONS_metatable = { - __index = function(tbl, key) - if type(key) == "string" then - key = key:lower() - end - return rawget(tbl, key) - end, - __newindex = function(tbl, key, value) - if type(key) == "string" then - key = key:lower() - end - rawset(tbl, key, value) - end - } - - _OPTIONS = {} - setmetatable(_OPTIONS, _OPTIONS_metatable) - - --- --- Process the raw command line arguments from _ARGV to populate --- the _OPTIONS table --- - - for i, arg in ipairs(_ARGV) do - local key, value - local i = arg:find("=", 1, true) - if i then - key = arg:sub(1, i - 1) - value = arg:sub(i + 1) - else - key = arg - value = "" - end - - if key:startswith("/") then - _OPTIONS[key:sub(2)] = value - elseif key:startswith("--") then - _OPTIONS[key:sub(3)] = value - end - end - - - --- --- The list of registered options. Calls to newoption() will add --- new entries here. --- - - m.list = {} - - --- --- Register a new option. --- --- @param opt --- The new option object. --- - - function m.add(opt) - -- some sanity checking - local missing - for _, field in ipairs({ "description", "trigger" }) do - if (not opt[field]) then - missing = field - end - end - - if (missing) then - error("option needs a " .. missing, 3) - end - - -- add it to the master list - p.option.list[opt.trigger:lower()] = opt - - -- if it has a default value, set it. - if opt.default and not _OPTIONS[opt.trigger] then - _OPTIONS[opt.trigger] = opt.default - end - end - - - --- --- Retrieve an option by name. --- --- @param name --- The name of the option to retrieve. --- @returns --- The requested option, or nil if the option does not exist. --- - - function m.get(name) - return p.option.list[name] - end - - - --- --- Iterator for the list of options. --- - - function m.each() - -- sort the list by trigger - local keys = { } - for _, option in pairs(p.option.list) do - table.insert(keys, option.trigger) - end - table.sort(keys) - - local i = 0 - return function() - i = i + 1 - return p.option.list[keys[i]] - end - end - - - --- --- Validate a list of user supplied key/value pairs against the list of registered options. --- --- @param values --- The list of user supplied key/value pairs. --- @returns ---- True if the list of pairs are valid, false and an error message otherwise. --- - - function m.validate(values) - for key, value in pairs(values) do - -- does this option exist - local opt = p.option.get(key) - if (not opt) then - return false, "invalid option '" .. key .. "'" - end - - -- does it need a value? - if (opt.value and value == "") then - return false, "no value specified for option '" .. key .. "'" - end - - -- is the value allowed? - if opt.allowed then - local found = false - for _, match in ipairs(opt.allowed) do - if match[1] == value then - found = true - break - end - end - if not found then - return false, string.format("invalid value '%s' for option '%s'", value, key) - end - end - end - return true - end diff --git a/build/premake/premake5/src/base/os.lua b/build/premake/premake5/src/base/os.lua deleted file mode 100644 index cab9f17560..0000000000 --- a/build/premake/premake5/src/base/os.lua +++ /dev/null @@ -1,758 +0,0 @@ --- --- os.lua --- Additions to the OS namespace. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - ---- --- Extend Lua's built-in os.execute() with token expansion and --- path normalization. --- - - premake.override(os, "execute", function(base, cmd) - cmd = os.translateCommands(cmd) - return base(cmd) - end) - - - ---- --- Same as os.execute(), but accepts string formatting arguments. ---- - - function os.executef(cmd, ...) - cmd = string.format(cmd, ...) - return os.execute(cmd) - end - - - --- --- Scan the well-known system locations for a particular library. --- - - local function parse_ld_so_conf(conf_file) - -- Linux ldconfig file parser to find system library locations - local first, last - local dirs = { } - for line in io.lines(conf_file) do - -- ignore comments - first = line:find("#", 1, true) - if first ~= nil then - line = line:sub(1, first - 1) - end - - if line ~= "" then - -- check for include files - first, last = line:find("include%s+") - if first ~= nil then - -- found include glob - local include_glob = line:sub(last + 1) - local includes = os.matchfiles(include_glob) - for _, v in ipairs(includes) do - dirs = table.join(dirs, parse_ld_so_conf(v)) - end - else - -- found an actual ld path entry - table.insert(dirs, line) - end - end - end - return dirs - end - - local function get_library_search_path() - local path - if os.istarget("windows") then - path = os.getenv("PATH") or "" - elseif os.istarget("haiku") then - path = os.getenv("LIBRARY_PATH") or "" - else - if os.istarget("darwin") then - path = os.getenv("DYLD_LIBRARY_PATH") or "" - else - path = os.getenv("LD_LIBRARY_PATH") or "" - - for _, prefix in ipairs({"", "/opt"}) do - local conf_file = prefix .. "/etc/ld.so.conf" - if os.isfile(conf_file) then - for _, v in ipairs(parse_ld_so_conf(conf_file)) do - if (#path > 0) then - path = path .. ":" .. v - else - path = v - end - end - end - end - end - - path = path or "" - local archpath = "/lib:/usr/lib:/usr/local/lib" - if os.is64bit() and not (os.istarget("darwin")) then - archpath = "/lib64:/usr/lib64/:usr/local/lib64" .. ":" .. archpath - end - if (#path > 0) then - path = path .. ":" .. archpath - else - path = archpath - end - end - - return path - end - - function os.findlib(libname, libdirs) - -- libname: library name with or without prefix and suffix - -- libdirs: (array or string): A set of additional search paths - - local path = get_library_search_path() - local formats - - -- assemble a search path, depending on the platform - if os.istarget("windows") then - formats = { "%s.dll", "%s" } - elseif os.istarget("haiku") then - formats = { "lib%s.so", "%s.so" } - else - if os.istarget("darwin") then - formats = { "lib%s.dylib", "%s.dylib" } - else - formats = { "lib%s.so", "%s.so" } - end - - table.insert(formats, "%s") - end - - local userpath = "" - - if type(libdirs) == "string" then - userpath = libdirs - elseif type(libdirs) == "table" then - userpath = table.implode(libdirs, "", "", ":") - end - - if (#userpath > 0) then - if (#path > 0) then - path = userpath .. ":" .. path - else - path = userpath - end - end - - for _, fmt in ipairs(formats) do - local name = string.format(fmt, libname) - local result = os.pathsearch(name, path) - if result then return result end - end - end - - function os.findheader(headerpath, headerdirs) - -- headerpath: a partial header file path - -- headerdirs: additional header search paths - - local path = get_library_search_path() - - -- replace all /lib by /include - path = path .. ':' - path = path:gsub ('/lib[0-9]*([:/])', '/include%1') - path = path:sub (1, #path - 1) - - local userpath = "" - - if type(headerdirs) == "string" then - userpath = headerdirs - elseif type(headerdirs) == "table" then - userpath = table.implode(headerdirs, "", "", ":") - end - - if (#userpath > 0) then - if (#path > 0) then - path = userpath .. ":" .. path - else - path = userpath - end - end - - local result = os.pathsearch (headerpath, path) - return result - end - --- --- Retrieve the current target operating system ID string. --- - - function os.target() - return _OPTIONS.os or _TARGET_OS - end - - function os.get() - local caller = filelineinfo(2) - premake.warnOnce(caller, "os.get() is deprecated, use 'os.target()' or 'os.host()'.\n @%s\n", caller) - return os.target() - end - - -- deprecate _OS - _G_metatable = { - __index = function(t, k) - if (k == '_OS') then - premake.warnOnce("_OS+get", "_OS is deprecated, use '_TARGET_OS'.") - return rawget(t, "_TARGET_OS") - else - return rawget(t, k) - end - end, - - __newindex = function(t, k, v) - if (k == '_OS') then - premake.warnOnce("_OS+set", "_OS is deprecated, use '_TARGET_OS'.") - rawset(t, "_TARGET_OS", v) - else - rawset(t, k, v) - end - end - } - setmetatable(_G, _G_metatable) - - - --- --- Check the current target operating system; may be set with the /os command line flag. --- - - function os.istarget(id) - local tags = os.getSystemTags(os.target()) - return table.contains(tags, id:lower()) - end - - function os.is(id) - local caller = filelineinfo(2) - premake.warnOnce(caller, "os.is() is deprecated, use 'os.istarget()' or 'os.ishost()'.\n @%s\n", caller) - return os.istarget(id) - end - - --- --- Check the current host operating system. --- - - function os.ishost(id) - local tags = os.getSystemTags(os.host()) - return table.contains(tags, id:lower()) - end - - ---- --- Determine if a directory exists on the file system, and that it is a --- directory and not a file. --- --- @param p --- The path to check. --- @return --- True if a directory exists at the given path. ---- - - premake.override(os, "isdir", function(base, p) - p = path.normalize(p) - return base(p) - end) - - - ---- --- Determine if a file exists on the file system, and that it is a --- file and not a directory. --- --- @param p --- The path to check. --- @return --- True if a file exists at the given path. ---- - - premake.override(os, "isfile", function(base, p) - p = path.normalize(p) - return base(p) - end) - - - --- --- Determine if the current system is running a 64-bit architecture. --- - - local _is64bit - - local _64BitHostTypes = { - "x86_64", - "ia64", - "amd64", - "ppc64", - "powerpc64", - "sparc64" - } - - function os.is64bit() - -- This can be expensive to compute, so cache and reuse the response - if _is64bit ~= nil then - return _is64bit - end - - _is64bit = false - - -- Call the native code implementation. If this returns true then - -- we're 64-bit, otherwise do more checking locally - if (os._is64bit()) then - _is64bit = true - else - -- Identify the system - local arch - if os.ishost("windows") then - arch = os.getenv("PROCESSOR_ARCHITECTURE") - elseif os.ishost("macosx") then - arch = os.outputof("echo $HOSTTYPE") - else - arch = os.outputof("uname -m") - end - - -- Check our known 64-bit identifiers - arch = arch:lower() - for _, hosttype in ipairs(_64BitHostTypes) do - if arch:find(hosttype) then - _is64bit = true - end - end - end - - return _is64bit - end - - ---- --- Perform a wildcard search for files and directories. --- --- @param mask --- The file search pattern. Use "*" to match any part of a file or --- directory name, "**" to recurse into subdirectories. --- @return --- A table containing the matched file or directory names. ---- - - function os.match(mask) - mask = path.normalize(mask) - local starpos = mask:find("%*") - local before = path.getdirectory(starpos and mask:sub(1, starpos - 1) or mask) - local slashpos = starpos and mask:find("/", starpos) - local after = slashpos and mask:sub(slashpos + 1) - - -- Only recurse for path components starting with '**': - local recurse = starpos and - mask:sub(starpos + 1, starpos + 1) == '*' and - (starpos == 1 or mask:sub(starpos - 1, starpos - 1) == '/') - - local results = { } - - if recurse then - local submask = mask:sub(1, starpos) .. mask:sub(starpos + 2) - results = os.match(submask) - - local pattern = mask:sub(1, starpos) - local m = os.matchstart(pattern) - while os.matchnext(m) do - if not os.matchisfile(m) then - local matchpath = path.join(before, os.matchname(m), mask:sub(starpos)) - results = table.join(results, os.match(matchpath)) - end - end - os.matchdone(m) - else - local pattern = mask:sub(1, slashpos and slashpos - 1) - local m = os.matchstart(pattern) - while os.matchnext(m) do - if not (slashpos and os.matchisfile(m)) then - local matchpath = path.join(before, matchpath, os.matchname(m)) - if after then - results = table.join(results, os.match(path.join(matchpath, after))) - else - table.insert(results, matchpath) - end - end - end - os.matchdone(m) - end - - return results - end - - ---- --- Perform a wildcard search for directories. --- --- @param mask --- The search pattern. Use "*" to match any part of a directory --- name, "**" to recurse into subdirectories. --- @return --- A table containing the matched directory names. ---- - - function os.matchdirs(mask) - local results = os.match(mask) - for i = #results, 1, -1 do - if not os.isdir(results[i]) then - table.remove(results, i) - end - end - return results - end - - ---- --- Perform a wildcard search for files. --- --- @param mask --- The search pattern. Use "*" to match any part of a file --- name, "**" to recurse into subdirectories. --- @return --- A table containing the matched directory names. ---- - - function os.matchfiles(mask) - local results = os.match(mask) - for i = #results, 1, -1 do - if not os.isfile(results[i]) then - table.remove(results, i) - end - end - return results - end - --- --- An overload of the os.mkdir() function, which will create any missing --- subdirectories along the path. --- - - local builtin_mkdir = os.mkdir - function os.mkdir(p) - p = path.normalize(p) - - local dir = iif(p:startswith("/"), "/", "") - for part in p:gmatch("[^/]+") do - dir = dir .. part - - if (part ~= "" and not path.isabsolute(part) and not os.isdir(dir)) then - local ok, err = builtin_mkdir(dir) - if (not ok) then - return nil, err - end - end - - dir = dir .. "/" - end - - return true - end - - --- --- Run a shell command and return the output. --- - - function os.outputof(cmd) - cmd = path.normalize(cmd) - - local pipe = io.popen(cmd .. " 2>&1") - local result = pipe:read('*a') - local success, what, code = pipe:close() - if success then - -- chomp trailing newlines - if result then - result = string.gsub(result, "[\r\n]+$", "") - end - - return result, code, what - else - return nil, code, what - end - end - - --- --- @brief An overloaded os.remove() that will be able to handle list of files, --- as well as wildcards for files. Uses the syntax os.matchfiles() for --- matching pattern wildcards. --- --- @param f A file, a wildcard, or a list of files or wildcards to be removed --- --- @return true on success, false and an appropriate error message on error --- --- @example ok, err = os.remove{"**.bak", "**.log"} --- if not ok then --- error(err) --- end --- - - local builtin_remove = os.remove - function os.remove(f) - -- in case of string, just match files - if type(f) == "string" then - local p = os.matchfiles(f) - for _, v in pairs(p) do - local ok, err, code = builtin_remove(v) - if not ok then - return ok, err, code - end - end - if #p == 0 then - return nil, "Couldn't find any file matching: " .. f, 1 - end - -- in case of table, match files for every table entry - elseif type(f) == "table" then - for _, v in pairs(f) do - local ok, err, code = os.remove(v) - if not ok then - return ok, err, code - end - end - end - - return true - end - - --- --- Remove a directory, along with any contained files or subdirectories. --- --- @return true on success, false and an appropriate error message on error - - local builtin_rmdir = os.rmdir - function os.rmdir(p) - -- recursively remove subdirectories - local dirs = os.matchdirs(p .. "/*") - for _, dname in ipairs(dirs) do - local ok, err = os.rmdir(dname) - if not ok then - return ok, err - end - end - - -- remove any files - local files = os.matchfiles(p .. "/*") - for _, fname in ipairs(files) do - local ok, err = os.remove(fname) - if not ok then - return ok, err - end - end - - -- remove this directory - return builtin_rmdir(p) - end - - ---- --- Return information about a file. ---- - - premake.override(os, "stat", function(base, p) - p = path.normalize(p) - return base(p) - end) - - - ---- --- Translate command tokens into their OS or action specific equivalents. ---- - - os.commandTokens = { - _ = { - chdir = function(v) - return "cd " .. path.normalize(v) - end, - copy = function(v) - return "cp -rf " .. path.normalize(v) - end, - delete = function(v) - return "rm -f " .. path.normalize(v) - end, - echo = function(v) - return "echo " .. v - end, - mkdir = function(v) - return "mkdir -p " .. path.normalize(v) - end, - move = function(v) - return "mv -f " .. path.normalize(v) - end, - rmdir = function(v) - return "rm -rf " .. path.normalize(v) - end, - touch = function(v) - return "touch " .. path.normalize(v) - end, - }, - windows = { - chdir = function(v) - return "chdir " .. path.translate(path.normalize(v)) - end, - copy = function(v) - v = path.translate(path.normalize(v)) - - -- Detect if there's multiple parts to the input, if there is grab the first part else grab the whole thing - local src = string.match(v, '^".-"') or string.match(v, '^.- ') or v - - -- Strip the trailing space from the second condition so that we don't have a space between src and '\\NUL' - src = string.match(src, '^.*%S') - - return "IF EXIST " .. src .. "\\ (xcopy /Q /E /Y /I " .. v .. " > nul) ELSE (xcopy /Q /Y /I " .. v .. " > nul)" - end, - delete = function(v) - return "del " .. path.translate(path.normalize(v)) - end, - echo = function(v) - return "echo " .. v - end, - mkdir = function(v) - v = path.translate(path.normalize(v)) - return "IF NOT EXIST " .. v .. " (mkdir " .. v .. ")" - end, - move = function(v) - return "move /Y " .. path.translate(path.normalize(v)) - end, - rmdir = function(v) - return "rmdir /S /Q " .. path.translate(path.normalize(v)) - end, - touch = function(v) - v = path.translate(path.normalize(v)) - return string.format("type nul >> %s && copy /b %s+,, %s", v, v, v) - end, - } - } - - function os.translateCommands(cmd, map) - map = map or os.target() - if type(map) == "string" then - map = os.commandTokens[map] or os.commandTokens["_"] - end - - local processOne = function(cmd) - local i, j, prev - repeat - i, j = cmd:find("{.-}") - if i then - if i == prev then - break - end - - local token = cmd:sub(i + 1, j - 1):lower() - local args = cmd:sub(j + 2) - local func = map[token] or os.commandTokens["_"][token] - if func then - cmd = cmd:sub(1, i -1) .. func(args) - end - - prev = i - end - until i == nil - return cmd - end - - if type(cmd) == "table" then - local result = {} - for i = 1, #cmd do - result[i] = processOne(cmd[i]) - end - return result - else - return processOne(cmd) - end - end - - - ---- --- Apply os slashes for decorated command paths. ---- - function os.translateCommandAndPath(dir, map) - if map == 'windows' then - return path.translate(dir) - end - return dir - end - ---- --- Translate decorated command paths into their OS equivalents. ---- - function os.translateCommandsAndPaths(cmds, basedir, location, map) - local translatedBaseDir = path.getrelative(location, basedir) - - map = map or os.target() - - local translateFunction = function(value) - local result = path.join(translatedBaseDir, value) - result = os.translateCommandAndPath(result, map) - if value:endswith('/') or value:endswith('\\') or -- if orginal path ends with a slash then ensure the same - value:endswith('/"') or value:endswith('\\"') then - result = result .. '/' - end - return result - end - - local processOne = function(cmd) - local replaceFunction = function(value) - value = value:sub(3, #value - 1) - return '"' .. translateFunction(value) .. '"' - end - return string.gsub(cmd, "%%%[[^%]\r\n]*%]", replaceFunction) - end - - if type(cmds) == "table" then - local result = {} - for i = 1, #cmds do - result[i] = processOne(cmds[i]) - end - return os.translateCommands(result, map) - else - return os.translateCommands(processOne(cmds), map) - end - end - - --- --- Generate a UUID. --- - - os._uuids = {} - - local builtin_uuid = os.uuid - function os.uuid(name) - local id = builtin_uuid(name) - if name then - if os._uuids[id] and os._uuids[id] ~= name then - premake.warnOnce(id, "UUID clash between %s and %s", os._uuids[id], name) - end - os._uuids[id] = name - end - return id - end - - --- --- Get a set of tags for different 'platforms' --- - - os.systemTags = - { - ["aix"] = { "aix", "posix" }, - ["bsd"] = { "bsd", "posix" }, - ["haiku"] = { "haiku", "posix" }, - ["ios"] = { "ios", "darwin", "posix", "mobile" }, - ["linux"] = { "linux", "posix" }, - ["macosx"] = { "macosx", "darwin", "posix" }, - ["solaris"] = { "solaris", "posix" }, - ["windows"] = { "windows", "win32" }, - } - - function os.getSystemTags(name) - return os.systemTags[name:lower()] or { name:lower() } - end diff --git a/build/premake/premake5/src/base/oven.lua b/build/premake/premake5/src/base/oven.lua deleted file mode 100644 index 79e48ed6c4..0000000000 --- a/build/premake/premake5/src/base/oven.lua +++ /dev/null @@ -1,792 +0,0 @@ --- --- base/oven.lua --- --- Process the workspaces, projects, and configurations that were specified --- by the project script, and make them suitable for use by the exporters --- and actions. Fills in computed values (e.g. object directories) and --- optimizes the layout of the data for faster fetches. --- --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - local p = premake - - p.oven = {} - - local oven = p.oven - local context = p.context - - --- --- These fields get special treatment, "bubbling up" from the configurations --- to the project. This allows you to express, for example: "use this config --- map if this configuration is present in the project", and saves the step --- of clearing the current configuration filter before creating the map. --- - - p.oven.bubbledFields = { - configmap = true, - vpaths = true - } - - - ---- --- Traverses the container hierarchy built up by the project scripts and --- filters, merges, and munges the information based on the current runtime --- environment in preparation for doing work on the results, like exporting --- project files. --- --- This call replaces the existing the container objects with their --- processed replacements. If you are using the provided container APIs --- (p.global.*, p.workspace.*, etc.) this will be transparent. ---- - - function oven.bake() - -- reset the root _isBaked state. - -- this really only affects the unit-tests, since that is the only place - -- where multiple bakes per 'exe run' happen. - local root = p.api.rootContainer() - root._isBaked = false; - - p.container.bake(root) - end - - function oven.bakeWorkspace(wks) - return p.container.bake(wks) - end - - p.alias(oven, "bakeWorkspace", "bakeSolution") - - - local function addCommonContextFilters(self) - context.addFilter(self, "_ACTION", _ACTION) - context.addFilter(self, "action", _ACTION) - - self.system = self.system or os.target() - context.addFilter(self, "system", os.getSystemTags(self.system)) - context.addFilter(self, "host", os.getSystemTags(os.host())) - - -- Add command line options to the filtering options - local options = {} - for key, value in pairs(_OPTIONS) do - local term = key - if value ~= "" then - term = term .. "=" .. tostring(value) - end - table.insert(options, term) - end - context.addFilter(self, "_OPTIONS", options) - context.addFilter(self, "options", options) - end - ---- --- Bakes a specific workspace object. ---- - - function p.workspace.bake(self) - -- Add filtering terms to the context and then compile the results. These - -- terms describe the "operating environment"; only results contained by - -- configuration blocks which match these terms will be returned. - - addCommonContextFilters(self) - - -- Set up my token expansion environment - - self.environ = { - wks = self, - sln = self, - } - - context.compile(self) - - -- Specify the workspaces's file system location; when path tokens are - -- expanded in workspace values, they will be made relative to this. - - self.location = self.location or self.basedir - context.basedir(self, self.location) - - -- Build a master list of configuration/platform pairs from all of the - -- projects contained by the workspace; I will need this when generating - -- workspace files in order to provide a map from workspace configurations - -- to project configurations. - - self.configs = oven.bakeConfigs(self) - - -- Now bake down all of the projects contained in the workspace, and - -- store that for future reference - - p.container.bakeChildren(self) - - -- I now have enough information to assign unique object directories - -- to each project configuration in the workspace. - - oven.bakeObjDirs(self) - - -- now we can post process the projects for 'buildoutputs' files - -- that have the 'compilebuildoutputs' flag - oven.addGeneratedFiles(self) - end - - - function oven.addGeneratedFiles(wks) - - local function addGeneratedFile(cfg, source, filename) - -- mark that we have generated files. - cfg.project.hasGeneratedFiles = true - - -- add generated file to the project. - local files = cfg.project._.files - local node = files[filename] - if not node then - node = p.fileconfig.new(filename, cfg.project) - files[filename] = node - table.insert(files, node) - end - - -- always overwrite the dependency information. - node.dependsOn = source - node.generated = true - - -- add to config if not already added. - if not p.fileconfig.getconfig(node, cfg) then - p.fileconfig.addconfig(node, cfg) - end - end - - local function addFile(cfg, node) - local filecfg = p.fileconfig.getconfig(node, cfg) - if not filecfg or filecfg.flags.ExcludeFromBuild or not filecfg.compilebuildoutputs then - return - end - - if p.fileconfig.hasCustomBuildRule(filecfg) then - local buildoutputs = filecfg.buildoutputs - if buildoutputs and #buildoutputs > 0 then - for _, output in ipairs(buildoutputs) do - if not path.islinkable(output) then - addGeneratedFile(cfg, node, output) - end - end - end - end - end - - - for prj in p.workspace.eachproject(wks) do - local files = table.shallowcopy(prj._.files) - for cfg in p.project.eachconfig(prj) do - table.foreachi(files, function(node) - addFile(cfg, node) - end) - end - - -- generated files might screw up the object sequences. - if prj.hasGeneratedFiles and p.project.isnative(prj) then - oven.assignObjectSequences(prj) - end - end - end - - - function p.project.bake(self) - verbosef(' Baking %s...', self.name) - - self.solution = self.workspace - self.global = self.workspace.global - - local wks = self.workspace - - -- Add filtering terms to the context to make it as specific as I can. - -- Start with the same filtering that was applied at the workspace level. - - context.copyFilters(self, wks) - - -- Now filter on the current system and architecture, allowing the - -- values that might already in the context to override my defaults. - - self.system = self.system or os.target() - context.addFilter(self, "system", os.getSystemTags(self.system)) - context.addFilter(self, "host", os.getSystemTags(os.host())) - context.addFilter(self, "architecture", self.architecture) - context.addFilter(self, "tags", self.tags) - - -- The kind is a configuration level value, but if it has been set at the - -- project level allow that to influence the other project-level results. - - context.addFilter(self, "kind", self.kind) - - -- Allow the project object to also be treated like a configuration - - self.project = self - - -- Populate the token expansion environment - - self.environ = { - wks = wks, - sln = wks, - prj = self, - } - - -- Go ahead and distill all of that down now; this is my new project object - - context.compile(self) - - p.container.bakeChildren(self) - - -- Set the context's base directory to the project's file system - -- location. Any path tokens which are expanded in non-path fields - -- are made relative to this, ensuring a portable generated project. - - self.location = self.location or self.basedir - context.basedir(self, self.location) - - -- This bit could use some work: create a canonical set of configurations - -- for the project, along with a mapping from the workspace's configurations. - -- This works, but it could probably be simplified. - - local cfgs = table.fold(self.configurations or {}, self.platforms or {}) - oven.bubbleFields(self, self, cfgs) - self._cfglist = oven.bakeConfigList(self, cfgs) - - -- Don't allow a project-level system setting to influence the configurations - - local projectSystem = self.system - self.system = nil - - -- Finally, step through the list of configurations I built above and - -- bake all of those down into configuration contexts as well. Store - -- the results with the project. - - self.configs = {} - - for _, pairing in ipairs(self._cfglist) do - local buildcfg = pairing[1] - local platform = pairing[2] - local cfg = oven.bakeConfig(wks, self, buildcfg, platform) - - if p.action.supportsconfig(p.action.current(), cfg) then - self.configs[(buildcfg or "*") .. (platform or "")] = cfg - end - end - - -- Process the sub-objects that are contained by this project. The - -- configuration build stuff above really belongs in here now. - - self._ = {} - self._.files = oven.bakeFiles(self) - - -- If this type of project generates object files, look for files that will - -- generate object name collisions (i.e. src/hello.cpp and tests/hello.cpp - -- both create hello.o) and assign unique sequence numbers to each. I need - -- to do this up front to make sure the sequence numbers are the same for - -- all the tools, even they reorder the source file list. - - if p.project.isnative(self) then - oven.assignObjectSequences(self) - end - - -- at the end, restore the system, so it's usable elsewhere. - self.system = projectSystem - end - - - function p.rule.bake(self) - -- Add filtering terms to the context and then compile the results. These - -- terms describe the "operating environment"; only results contained by - -- configuration blocks which match these terms will be returned. - - addCommonContextFilters(self) - - -- Populate the token expansion environment - - self.environ = { - rule = self, - } - - -- Go ahead and distill all of that down now; this is my new rule object - - context.compile(self) - - -- sort the propertydefinition table. - table.sort(self.propertydefinition, function (a, b) - return a.name < b.name - end) - - -- Set the context's base directory to the rule's file system - -- location. Any path tokens which are expanded in non-path fields - -- are made relative to this, ensuring a portable generated rule. - - self.location = self.location or self.basedir - context.basedir(self, self.location) - end - - - --- --- Assigns a unique objects directory to every configuration of every project --- in the workspace, taking any objdir settings into account, to ensure builds --- from different configurations won't step on each others' object files. --- The path is built from these choices, in order: --- --- [1] -> the objects directory as set in the config --- [2] -> [1] + the platform name --- [3] -> [2] + the build configuration name --- [4] -> [3] + the project name --- --- @param wks --- The workspace to process. The directories are modified inline. --- - - function oven.bakeObjDirs(wks) - -- function to compute the four options for a specific configuration - local function getobjdirs(cfg) - -- the "!" prefix indicates the directory is not to be touched - local objdir = cfg.objdir or "obj" - local i = objdir:find("!", 1, true) - if i then - cfg.objdir = objdir:sub(1, i - 1) .. objdir:sub(i + 1) - return nil - end - - local dirs = {} - - local dir = path.getabsolute(path.join(cfg.project.location, objdir)) - table.insert(dirs, dir) - - if cfg.platform then - dir = path.join(dir, cfg.platform) - table.insert(dirs, dir) - end - - dir = path.join(dir, cfg.buildcfg) - table.insert(dirs, dir) - - dir = path.join(dir, cfg.project.name) - table.insert(dirs, dir) - - return dirs - end - - -- walk all of the configs in the workspace, and count the number of - -- times each obj dir gets used - local counts = {} - local configs = {} - - for prj in p.workspace.eachproject(wks) do - for cfg in p.project.eachconfig(prj) do - -- get the dirs for this config, and associate them together, - -- and increment a counter for each one discovered - local dirs = getobjdirs(cfg) - if dirs then - configs[cfg] = dirs - for _, dir in ipairs(dirs or {}) do - counts[dir] = (counts[dir] or 0) + 1 - end - end - end - end - - -- now walk the list again, and assign the first unique value - for cfg, dirs in pairs(configs) do - for _, dir in ipairs(dirs) do - if counts[dir] == 1 then - cfg.objdir = dir - break - end - end - end - end - - --- --- Create a list of workspace-level build configuration/platform pairs. --- - - function oven.bakeConfigs(wks) - local buildcfgs = wks.configurations or {} - local platforms = wks.platforms or {} - - local configs = {} - - local pairings = table.fold(buildcfgs, platforms) - for _, pairing in ipairs(pairings) do - local cfg = oven.bakeConfig(wks, nil, pairing[1], pairing[2]) - if p.action.supportsconfig(p.action.current(), cfg) then - table.insert(configs, cfg) - end - end - - return configs - end - - --- --- It can be useful to state "use this map if this configuration is present". --- To allow this to happen, config maps that are specified within a project --- configuration are allowed to "bubble up" to the top level. Currently, --- maps are the only values that get this special behavior. --- --- @param ctx --- The project context information. --- @param cset --- The project's original configuration set, which contains the settings --- of all the project configurations. --- @param cfgs --- The list of the project's build cfg/platform pairs. --- - - function oven.bubbleFields(ctx, cset, cfgs) - -- build a query filter that will match any configuration name, - -- within the existing constraints of the project - - local configurations = {} - local platforms = {} - - for _, cfg in ipairs(cfgs) do - if cfg[1] then - table.insert(configurations, cfg[1]:lower()) - end - if cfg[2] then - table.insert(platforms, cfg[2]:lower()) - end - end - - local terms = table.deepcopy(ctx.terms) - terms.configurations = configurations - terms.platforms = platforms - - for key in pairs(oven.bubbledFields) do - local field = p.field.get(key) - if not field then - ctx[key] = rawget(ctx, key) - else - local value = p.configset.fetch(cset, field, terms, ctx) - if value then - ctx[key] = value - end - end - end - end - - --- --- Builds a list of build configuration/platform pairs for a project, --- along with a mapping between the workspace and project configurations. --- --- @param ctx --- The project context information. --- @param cfgs --- The list of the project's build cfg/platform pairs. --- @return --- An array of the project's build configuration/platform pairs, --- based on any discovered mappings. --- - - function oven.bakeConfigList(ctx, cfgs) - -- run them all through the project's config map - for i, cfg in ipairs(cfgs) do - cfgs[i] = p.project.mapconfig(ctx, cfg[1], cfg[2]) - end - - -- walk through the result and remove any duplicates - local buildcfgs = {} - local platforms = {} - - for _, pairing in ipairs(cfgs) do - local buildcfg = pairing[1] - local platform = pairing[2] - - if not table.contains(buildcfgs, buildcfg) then - table.insert(buildcfgs, buildcfg) - end - - if platform and not table.contains(platforms, platform) then - table.insert(platforms, platform) - end - end - - -- merge these de-duped lists back into pairs for the final result - return table.fold(buildcfgs, platforms) - end - - ---- --- Flattens out the build settings for a particular build configuration and --- platform pairing, and returns the result. --- --- @param wks --- The workpace which contains the configuration data. --- @param prj --- The project which contains the configuration data. Can be nil. --- @param buildcfg --- The target build configuration, a value from configurations(). --- @param platform --- The target platform, a value from platforms(). --- @param extraFilters --- Optional. Any extra filter terms to use when retrieving the data for --- this configuration ---- - - function oven.bakeConfig(wks, prj, buildcfg, platform, extraFilters) - - -- Set the default system and architecture values; if the platform's - -- name matches a known system or architecture, use that as the default. - -- More than a convenience; this is required to work properly with - -- external Visual Studio project files. - - local system = os.target() - local architecture = nil - local toolset = p.action.current().toolset - - if platform then - system = p.api.checkValue(p.fields.system, platform) or system - architecture = p.api.checkValue(p.fields.architecture, platform) or architecture - toolset = p.api.checkValue(p.fields.toolset, platform) or toolset - end - - -- Wrap the projects's configuration set (which contains all of the information - -- provided by the project script) with a context object. The context handles - -- the expansion of tokens, and caching of retrieved values. The environment - -- values are used when expanding tokens. - - local environ = { - wks = wks, - sln = wks, - prj = prj, - } - - local ctx = context.new(prj or wks, environ) - - ctx.project = prj - ctx.workspace = wks - ctx.solution = wks - ctx.global = wks.global - ctx.buildcfg = buildcfg - ctx.platform = platform - ctx.action = _ACTION - - -- Allow the configuration information to be accessed by tokens contained - -- within the configuration itself - - environ.cfg = ctx - - -- Add filtering terms to the context and then compile the results. These - -- terms describe the "operating environment"; only results contained by - -- configuration blocks which match these terms will be returned. Start - -- by copying over the top-level environment from the workspace. Don't - -- copy the project terms though, so configurations can override those. - - context.copyFilters(ctx, wks) - - context.addFilter(ctx, "configurations", buildcfg) - context.addFilter(ctx, "platforms", platform) - if prj then - context.addFilter(ctx, "language", prj.language) - end - - -- allow the project script to override the default system - ctx.system = ctx.system or system - context.addFilter(ctx, "system", os.getSystemTags(ctx.system)) - context.addFilter(ctx, "host", os.getSystemTags(os.host())) - - -- allow the project script to override the default architecture - ctx.architecture = ctx.architecture or architecture - context.addFilter(ctx, "architecture", ctx.architecture) - - -- allow the project script to override the default toolset - ctx.toolset = _OPTIONS.cc or ctx.toolset or toolset - context.addFilter(ctx, "toolset", ctx.toolset) - - -- if a kind is set, allow that to influence the configuration - context.addFilter(ctx, "kind", ctx.kind) - - -- if a sharedlibtype is set, allow that to influence the configuration - context.addFilter(ctx, "sharedlibtype", ctx.sharedlibtype) - - -- if tags are set, allow that to influence the configuration - context.addFilter(ctx, "tags", ctx.tags) - - -- if any extra filters were specified, can include them now - if extraFilters then - for k, v in pairs(extraFilters) do - context.addFilter(ctx, k, v) - end - end - - context.compile(ctx) - - ctx.location = ctx.location or prj and prj.location - context.basedir(ctx, ctx.location) - - -- Fill in a few calculated for the configuration, including the long - -- and short names and the build and link target. - - oven.finishConfig(ctx) - return ctx - end - - --- --- Create configuration objects for each file contained in the project. This --- collects and collates all of the values specified in the project scripts, --- and computes extra values like the relative path and object names. --- --- @param prj --- The project object being baked. The project --- @return --- A collection of file configurations, keyed by both the absolute file --- path and an alpha-sorted index. --- - - function oven.bakeFiles(prj) - - local files = {} - - -- Start by building a comprehensive list of all the files contained by the - -- project. Some files may only be included in a subset of configurations so - -- I need to look at them all. - - for cfg in p.project.eachconfig(prj) do - local function addFile(fname, i) - - -- If this is the first time I've seen this file, start a new - -- file configuration for it. Track both by key for quick lookups - -- and indexed for ordered iteration. - local fcfg = files[fname] - if not fcfg then - fcfg = p.fileconfig.new(fname, prj) - fcfg.order = i - files[fname] = fcfg - table.insert(files, fcfg) - end - - p.fileconfig.addconfig(fcfg, cfg) - end - - table.foreachi(cfg.files, addFile) - - -- If this project uses NuGet, we need to add the generated - -- packages.config file to the project. Is there a better place to - -- do this? - - if #prj.nuget > 0 and (_ACTION < "vs2017" or p.project.iscpp(prj)) then - addFile("packages.config") - end - end - - -- Alpha sort the indices, so I will get consistent results in - -- the exported project files. - - table.sort(files, function(a,b) - return a.vpath < b.vpath - end) - - return files - end - - --- --- Assign unique sequence numbers to any source code files that would generate --- conflicting object file names (i.e. src/hello.cpp and tests/hello.cpp both --- create hello.o). --- --- a file list of: src/hello.cpp, tests/hello.cpp and src/hello1.cpp also generates --- conflicting object file names - hello1.o - - function oven.uniqueSequence(f, cfg, seq, bases) - while true do - f.sequence = seq[cfg] or 0 - seq[cfg] = f.sequence + 1 - - if f.sequence == 0 then - -- first time seeing this objname - break - end - - -- getting here has changed our sequence number, but this new "basename" - -- may still collide with files that actually end with this "sequence number" - -- so we have to check the bases table now - - -- objname changes with the sequence number on every loop - local lowerobj = f.objname:lower() - if not bases[lowerobj] then - -- this is the first appearance of a file that produces this objname - -- intialize the table for any future basename that matches our objname - bases[lowerobj] = {} - end - - if not bases[lowerobj][cfg] then - -- not a collision - -- start a sequence for a future basename that matches our objname for this cfg - bases[lowerobj][cfg] = 1 - break - end - -- else we have a objname collision, try the next sequence number - end - end - - - function oven.assignObjectSequences(prj) - - -- Iterate over the file configurations which were prepared and cached in - -- project.bakeFiles(); find buildable files with common base file names. - - local bases = {} - table.foreachi(prj._.files, function(file) - - -- Only consider sources that actually generate object files - - if not path.isnativefile(file.abspath) then - return - end - - -- For each base file name encountered, keep a count of the number of - -- collisions that have occurred for each project configuration. Use - -- this collision count to generate the unique object file names. - - local lowerbase = file.basename:lower() - if not bases[lowerbase] then - bases[lowerbase] = {} - end - - local sequences = bases[lowerbase] - - for cfg in p.project.eachconfig(prj) do - local fcfg = p.fileconfig.getconfig(file, cfg) - if fcfg ~= nil and not fcfg.flags.ExcludeFromBuild then - oven.uniqueSequence(fcfg, cfg, sequences, bases) - end - end - - -- Makefiles don't use per-configuration object names yet; keep - -- this around until they do. At which point I might consider just - -- storing the sequence number instead of the whole object name - - oven.uniqueSequence(file, prj, sequences, bases) - - end) - end - - --- --- Finish the baking process for a workspace or project level configurations. --- Doesn't bake per se, just fills in some calculated values. --- - - function oven.finishConfig(cfg) - -- assign human-readable names - cfg.longname = table.concat({ cfg.buildcfg, cfg.platform }, "|") - cfg.shortname = table.concat({ cfg.buildcfg, cfg.platform }, " ") - cfg.shortname = cfg.shortname:gsub(" ", "_"):lower() - cfg.name = cfg.longname - - -- compute build and link targets - if cfg.project and cfg.kind then - cfg.buildtarget = p.config.gettargetinfo(cfg) - cfg.buildtarget.relpath = p.project.getrelative(cfg.project, cfg.buildtarget.abspath) - - cfg.linktarget = p.config.getlinkinfo(cfg) - cfg.linktarget.relpath = p.project.getrelative(cfg.project, cfg.linktarget.abspath) - end - end diff --git a/build/premake/premake5/src/base/path.lua b/build/premake/premake5/src/base/path.lua deleted file mode 100644 index 7a339832db..0000000000 --- a/build/premake/premake5/src/base/path.lua +++ /dev/null @@ -1,304 +0,0 @@ --- --- path.lua --- Path manipulation functions. --- Copyright (c) 2002-2014 Jason Perkins and the Premake project --- - - --- --- Appends a file extension to the path. Verifies that the extension --- isn't already present, and adjusts quotes as necessary. --- - - function path.appendExtension(p, ext) - -- if the extension is nil or empty, do nothing - if not ext or ext == "" then - return p - end - - -- if the path ends with a quote, pull it off - local endquote - if p:endswith('"') then - p = p:sub(1, -2) - endquote = '"' - end - - -- add the extension if it isn't there already - if not path.hasextension(p, ext) then - p = p .. ext - end - - -- put the quote back if necessary - if endquote then - p = p .. endquote - end - - return p - end - - path.appendextension = path.appendExtension - - - --- --- Retrieve the filename portion of a path, without any extension. --- - - function path.getbasename(p) - local name = path.getname(p) - local i = name:findlast(".", true) - if (i) then - return name:sub(1, i - 1) - else - return name - end - end - - --- --- Retrieve the directory portion of a path, or an empty string if --- the path does not include a directory. --- - - function path.getdirectory(p) - local i = p:findlast("/", true) - if (i) then - if i > 1 then i = i - 1 end - return p:sub(1, i) - else - return "." - end - end - - --- --- Retrieve the drive letter, if a Windows path. --- - - function path.getdrive(p) - local ch1 = p:sub(1,1) - local ch2 = p:sub(2,2) - if ch2 == ":" then - return ch1 - end - end - - - --- --- Retrieve the file extension. --- - - function path.getextension(p) - p = path.getname(p) - local i = p:findlast(".", true) - if (i) then - return p:sub(i) - else - return "" - end - end - - - --- --- Remove extension from path. --- - - function path.removeextension(p) - local i = p:findlast(".", true) - if (i) then - if i > 1 then i = i - 1 end - return p:sub(1, i) - else - return "" - end - end - - --- --- Retrieve the filename portion of a path. --- - - function path.getname(p) - local i = p:findlast("[/\\]") - if (i) then - return p:sub(i + 1) - else - return p - end - end - - - - --- --- Returns true if the filename has a particular extension. --- --- @param fname --- The file name to test. --- @param extensions --- The extension(s) to test. Maybe be a string or table. --- - - function path.hasextension(fname, extensions) - local fext = path.getextension(fname):lower() - if type(extensions) == "table" then - for _, extension in pairs(extensions) do - if fext == extension then - return true - end - end - return false - else - return (fext == extensions) - end - end - - --- --- Returns true if the filename represents various source languages. --- - - function path.isasmfile(fname) - return path.hasextension(fname, { ".s" }) - end - - function path.iscfile(fname) - return path.hasextension(fname, { ".c" }) - or path.isasmfile(fname) -- is this really right? - or path.isobjcfile(fname) -- there is code that depends on this behaviour, which would need to change - end - - function path.iscppfile(fname) - return path.hasextension(fname, { ".cc", ".cpp", ".cxx", ".c++" }) - or path.isobjcppfile(fname) -- is this really right? - or path.iscfile(fname) - end - - function path.isobjcfile(fname) - return path.hasextension(fname, { ".m" }) - end - - function path.isobjcppfile(fname) - return path.hasextension(fname, { ".mm" }) - end - - function path.iscppheader(fname) - return path.hasextension(fname, { ".h", ".hh", ".hpp", ".hxx" }) - end - - --- --- Returns true if the filename represents a native language source file. --- These checks are used to prevent passing non-code files to the compiler --- in makefiles. It is not foolproof, but it has held up well. I'm open to --- better suggestions. --- - - function path.isnativefile(fname) - return path.iscfile(fname) - or path.iscppfile(fname) - or path.isasmfile(fname) - or path.isobjcfile(fname) - or path.isobjcppfile(fname) - end - - --- --- Returns true if the filename represents an OS X framework. --- - - function path.isframework(fname) - return path.hasextension(fname, ".framework") - end - - ---- --- Is this a type of file that can be linked? ---- - - function path.islinkable(fname) - return path.hasextension(fname, { ".o", ".obj", ".a", ".lib", ".so" }) - end - - - --- --- Returns true if the filename represents an object file. --- - - function path.isobjectfile(fname) - return path.hasextension(fname, { ".o", ".obj" }) - end - - --- --- Returns true if the filename represents a Windows resource file. This check --- is used to prevent passing non-resources to the compiler in makefiles. --- - - function path.isresourcefile(fname) - return path.hasextension(fname, ".rc") - end - --- --- Returns true if the filename represents a Windows idl file. --- - - function path.isidlfile(fname) - return path.hasextension(fname, ".idl") - end - - --- --- Returns true if the filename represents a hlsl shader file. --- - - function path.ishlslfile(fname) - return path.hasextension(fname, ".hlsl") - end - - --- --- Takes a path which is relative to one location and makes it relative --- to another location instead. --- - - function path.rebase(p, oldbase, newbase) - p = path.getabsolute(path.join(oldbase, p)) - p = path.getrelative(newbase, p) - return p - end - - - --- --- Replace the file extension. --- - - function path.replaceextension(p, newext) - local ext = path.getextension(p) - - if not ext then - return p - end - - if #newext > 0 and not newext:findlast(".", true) then - newext = "."..newext - end - - return p:match("^(.*)"..ext.."$")..newext - end - --- --- Get the default seperator for path.translate --- - - function path.getDefaultSeparator() - if os.istarget('windows') then - return '\\' - else - return '/' - end - end diff --git a/build/premake/premake5/src/base/premake.lua b/build/premake/premake5/src/base/premake.lua deleted file mode 100644 index 1ba52282a5..0000000000 --- a/build/premake/premake5/src/base/premake.lua +++ /dev/null @@ -1,432 +0,0 @@ --- --- premake.lua --- High-level helper functions for the project exporters. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- - - local p = premake - - - --- Store captured output text for later testing - - local _captured - --- The string escaping function. - - local _esc = function(v) return v end - --- The output settings and defaults - - local _eol = "\n" - local _indentString = "\t" - local _indentLevel = 0 - --- Set up the global configuration scope. There can be only one. - - global("root") - - - ---- --- Capture and store everything sent through the output stream functions --- premake.w(), premake.x(), and premake.out(). Retrieve the captured --- text using the premake.captured() function. --- --- @param fn --- A function to execute. Any output calls made during the execution --- of the function will be captured. --- @return --- The captured output. ---- - - function premake.capture(fn) - -- start a new capture without forgetting the old one - local old = _captured - _captured = buffered.new() - - -- capture - fn() - - -- build the result - local captured = p.captured() - - -- free the capture buffer. - buffered.close(_captured) - - -- restore the old capture and done - _captured = old - return captured - end - - - --- --- Returns the captured text and stops capturing. --- - - function premake.captured() - if _captured then - return buffered.tostring(_captured) - else - return "" - end - end - - - ---- --- Set the output stream end-of-line sequence. --- --- @param s --- The string to use to mark line ends, or nil to keep the existing --- EOL sequence. --- @return --- The new EOL sequence. ---- - - function premake.eol(s) - _eol = s or _eol - return _eol - end - - - ---- --- Handle escaping of strings for various outputs. --- --- @param value --- If this is a string: escape it and return the new value. If it is an --- array, return a new array of escaped values. --- @return --- If the input was a single string, returns the escaped version. If it --- was an array, returns an corresponding array of escaped strings. ---- - - function premake.esc(value) - if type(value) == "table" then - local result = {} - local n = #value - for i = 1, n do - table.insert(result, p.esc(value[i])) - end - return result - end - - return _esc(value or "") - end - - - ---- --- Set a new string escaping function. --- --- @param func --- The new escaping function, which should take a single string argument --- and return the escaped version of that string. If nil, uses a default --- no-op function. ---- - - function premake.escaper(func) - _esc = func - if not _esc then - _esc = function (value) return value end - end - end - - - --- --- Returns a boolean if the file was modified --- Open a file for output, and call a function to actually do the writing. --- Used by the actions to generate workspace and project files. --- --- @param obj --- A workspace or project object; will be passed to the callback function. --- @param ext --- An optional extension for the generated file, with the leading dot. --- @param callback --- The function responsible for writing the file, should take a workspace --- or project as a parameters. --- - - function premake.generate(obj, ext, callback) - local output = p.capture(function () - _indentLevel = 0 - callback(obj) - _indentLevel = 0 - end) - - local fn = p.filename(obj, ext) - - -- make sure output folder exists. - local dir = path.getdirectory(fn) - local ok, err = os.mkdir(dir) - if not ok then - error(err, 0) - end - - local f, err = os.writefile_ifnotequal(output, fn); - - if (f == 0) then - return false -- file not modified - elseif (f < 0) then - error(err, 0) - elseif (f > 0) then - printf("Generated %s...", path.getrelative(os.getcwd(), fn)) - return true -- file modified - end - end - - - --- --- Marks a file as modified without changing its contents --- --- @param obj --- A workspace or project object; will be passed to the callback function. --- @param ext --- An optional extension for the generated file, with the leading dot. --- - - function premake.touch(obj, ext) - local fn = premake.filename(obj, ext) - - -- make sure output folder exists. - local dir = path.getdirectory(fn) - local ok, err = os.mkdir(dir) - if not ok then - error(err, 0) - end - - local f, err = os.touchfile(fn); - - if (f == 0) then - return false -- file marked as modified - elseif (f < 0) then - error(err, 0) - elseif (f > 0) then - return true -- file created - end - end - - ---- --- Returns the full path a file generated from any of the project --- objects (project, workspace, rule). --- --- @param obj --- The project object being generated. --- @param ext --- An optional extension for the generated file, with the leading dot. ---- - -function premake.filename(obj, ext) - local fname = obj.location or obj.basedir - if ext and not ext:startswith(".") then - fname = path.join(fname, ext) - else - fname = path.join(fname, obj.filename) - if ext then - fname = fname .. ext - end - end - return path.getabsolute(fname) -end - - - ---- --- Sets the output indentation parameters. --- --- @param s --- The indentation string. --- @param i --- The new indentation level, or nil to reset to zero. ---- - - function premake.indent(s, i) - _indentString = s or "\t" - _indentLevel = i or 0 - end - - - ---- --- Write a simple, unformatted string to the output stream, with no indentation --- or end of line sequence. ---- - - function premake.out(s) - if not _captured then - io.write(s) - else - buffered.write(_captured, s) - end - end - - - ---- --- Write a simple, unformatted string to the output stream, with no indentation, --- and append the current EOL sequence. ---- - - function premake.outln(s) - p.out(s) - p.out(_eol or "\n") - end - - - ---- --- Write a formatted string to the exported file, after decreasing the --- indentation level by one. --- --- @param i --- If set to a number, the indentation level will be decreased by --- this amount. If nil, the indentation level is decremented and --- no output is written. Otherwise, pass to premake.w() as the --- formatting string, followed by any additional arguments. ---- - - function premake.pop(i, ...) - if i == nil or type(i) == "number" then - _indentLevel = _indentLevel - (i or 1) - else - _indentLevel = _indentLevel - 1 - p.w(i, ...) - end - end - - - ---- --- Write a formatted string to the exported file, and increase the --- indentation level by one. --- --- @param i --- If set to a number, the indentation level will be increased by --- this amount. If nil, the indentation level is incremented and --- no output is written. Otherwise, pass to premake.w() as the --- formatting string, followed by any additional arguments. ---- - - function premake.push(i, ...) - if i == nil or type(i) == "number" then - _indentLevel = _indentLevel + (i or 1) - else - p.w(i, ...) - _indentLevel = _indentLevel + 1 - end - end - - - ---- --- Wrap the provided value in double quotes if it contains spaces, or --- if it contains a shell variable of the form $(...). ---- - - function premake.quoted(value) - local q = value:find(" ", 1, true) - if not q then - q = value:find("$%(.-%)", 1) - end - if q then - value = '"' .. value .. '"' - end - return value - end - - - --- --- Output a UTF-8 BOM to the exported file. --- - - function p.utf8() - p.out('\239\187\191') - end - - - ---- --- Write a formatted string to the exported file, at the current --- level of indentation, and appends an end of line sequence. --- This gets called quite a lot, hence the very short name. ---- - - function premake.w(...) - if select("#", ...) > 0 then - p.outln(string.rep(_indentString or "\t", _indentLevel) .. string.format(...)) - else - p.outln(''); - end - end - - - ---- --- Write a formatted string to the exported file, after passing all --- arguments (except for the first, which is the formatting string) --- through premake.esc(). ---- - - function premake.x(msg, ...) - local arg = {...} - for i = 1, #arg do - arg[i] = p.esc(arg[i]) - end - p.w(msg, table.unpack(arg)) - end - - - ---- --- Write a opening XML element for a UTF-8 encoded file. Used by --- several different files for different actions, so makes sense --- to have a common call for it. --- --- @param upper --- If true, the encoding is written in uppercase. ---- - - function premake.xmlUtf8(upper) - local encoding = iif(upper, "UTF-8", "utf-8") - p.w('', encoding) - end - - - --- --- These are the output shortcuts that I used before switching to the --- indentation-aware calls above. They are still in use all over the --- place, including lots of community code, so let's keep them around. --- --- @param i --- This will either be a printf-style formatting string suitable --- for passing to string.format(), OR an integer number indicating --- the desired level of indentation. If the latter, the formatting --- string should be the next argument in the list. --- @param ... --- The values necessary to fill out the formatting string tokens. --- - - function _p(i, ...) - if type(i) == "number" then - _indentLevel = i - p.w(...) - else - _indentLevel = 0 - p.w(i, ...) - end - end - - function _x(i, ...) - local arg = {...} - for i = 2, #arg do - arg[i] = p.esc(arg[i]) - end - _p(i, table.unpack(arg)) - end diff --git a/build/premake/premake5/src/base/project.lua b/build/premake/premake5/src/base/project.lua deleted file mode 100755 index 69aba8defd..0000000000 --- a/build/premake/premake5/src/base/project.lua +++ /dev/null @@ -1,563 +0,0 @@ ---- --- project.lua --- Premake project object API --- Author Jason Perkins --- Copyright (c) 2011-2015 Jason Perkins and the Premake project ---- - - local p = premake - p.project = p.api.container("project", p.workspace, { "config" }) - - local project = p.project - local tree = p.tree - - - ---- --- Alias the old external() call to the new externalproject(), to distinguish --- between it and externalrule(). ---- - - external = externalproject - - - ---- --- Create a new project container instance. ---- - - function project.new(name) - local prj = p.container.new(project, name) - prj.uuid = os.uuid(name) - - if p.api.scope.group then - prj.group = p.api.scope.group.name - else - prj.group = "" - end - - return prj - end - - - --- --- Returns an iterator function for the configuration objects contained by --- the project. Each configuration corresponds to a build configuration/ --- platform pair (i.e. "Debug|x86") as specified in the workspace. --- --- @param prj --- The project object to query. --- @return --- An iterator function returning configuration objects. --- - - function project.eachconfig(prj) - local configs = prj._cfglist - local count = #configs - - -- Once the configurations are mapped into the workspace I could get - -- the same one multiple times. Make sure that doesn't happen. - local seen = {} - - local i = 0 - return function () - i = i + 1 - if i <= count then - local cfg = project.getconfig(prj, configs[i][1], configs[i][2]) - if not seen[cfg] then - seen[cfg] = true - return cfg - else - i = i + 1 - end - end - end - end - - - --- --- When an exact match is not available (project.getconfig() returns nil), use --- this function to find the closest alternative. --- --- @param prj --- The project object to query. --- @param buildcfg --- The name of the build configuration on which to filter. --- @param platform --- Optional; the name of the platform on which to filter. --- @return --- A configuration object. --- - - function project.findClosestMatch(prj, buildcfg, platform) - - -- One or both of buildcfg and platform do not match any of the project - -- configurations, otherwise I would have had an exact match. Map them - -- separately to apply any partial rules. - - buildcfg = project.mapconfig(prj, buildcfg)[1] - platform = project.mapconfig(prj, platform)[1] - - -- Replace missing values with whatever is first in the list - - if not table.contains(prj.configurations, buildcfg) then - buildcfg = prj.configurations[1] - end - - if not table.contains(prj.platforms, platform) then - platform = prj.platforms[1] - end - - -- Now I should have a workable pairing - - return project.getconfig(prj, buildcfg, platform) - - end - - - --- Retrieve the project's configuration information for a particular build --- configuration/platform pair. --- --- @param prj --- The project object to query. --- @param buildcfg --- The name of the build configuration on which to filter. --- @param platform --- Optional; the name of the platform on which to filter. --- @return --- A configuration object. - - function project.getconfig(prj, buildcfg, platform) - -- if no build configuration is specified, return the "root" project - -- configurations, which includes all configuration values that - -- weren't set with a specific configuration filter - if not buildcfg then - return prj - end - - -- apply any configuration mappings - local pairing = project.mapconfig(prj, buildcfg, platform) - buildcfg = pairing[1] - platform = pairing[2] - - -- look up and return the associated config - local key = (buildcfg or "*") .. (platform or "") - return prj.configs[key] - end - - - ---- --- Returns a list of sibling projects on which the specified project depends. --- This is used to list dependencies within a workspace. Must consider all --- configurations because Visual Studio does not support per-config project --- dependencies. --- --- @param prj --- The project to query. --- @param mode --- if mode == 'linkOnly', returns only siblings which are linked against (links) and skips siblings which are not (dependson). --- if mode == 'dependOnly' returns only siblings which are depended on (dependson) and skips siblings which are not (links). --- @return --- A list of dependent projects, as an array of project objects. ---- - - function project.getdependencies(prj, mode) - if not prj.dependencies then - prj.dependencies = {} - end - - local m = mode or 'all' - local result = prj.dependencies[m] - if result then - return result - end - - local function add_to_project_list(cfg, depproj, result) - local dep = p.workspace.findproject(cfg.workspace, depproj) - if dep and not table.contains(result, dep) then - table.insert(result, dep) - end - end - - local linkOnly = m == 'linkOnly' - local depsOnly = m == 'dependOnly' - - result = {} - for cfg in project.eachconfig(prj) do - if not depsOnly then - for _, link in ipairs(cfg.links) do - if link ~= prj.name then - add_to_project_list(cfg, link, result) - end - end - end - if not linkOnly then - for _, depproj in ipairs(cfg.dependson) do - add_to_project_list(cfg, depproj, result) - end - end - end - prj.dependencies[m] = result - - return result - end - - - --- --- Return the first configuration of a project, which is used in some --- actions to generate project-wide defaults. --- --- @param prj --- The project object to query. --- @return --- The first configuration in a project, as would be returned by --- eachconfig(). --- - - function project.getfirstconfig(prj) - local iter = project.eachconfig(prj) - local first = iter() - return first - end - - --- --- Return the relative path from the project to the specified file. --- --- @param prj --- The project object to query. --- @param filename --- The file path, or an array of file paths, to convert. --- @return --- The relative path, or array of paths, from the project to the file. --- - - function project.getrelative(prj, filename) - if type(filename) == "table" then - local result = {} - for i, name in ipairs(filename) do - result[i] = project.getrelative(prj, name) - end - return result - else - if filename then - local result = filename - if path.hasdeferredjoin(result) then - result = path.resolvedeferredjoin(result) - end - return path.getrelative(prj.location, result) - end - end - end - - --- --- Create a tree from a project's list of source files. --- --- @param prj --- The project to query. --- @param sorter --- An optional comparator function for the sorting pass. --- @return --- A tree object containing the source file hierarchy. Leaf nodes, --- representing the individual files, are file configuration --- objects. --- - - function project.getsourcetree(prj, sorter) - - if prj._.sourcetree then - return prj._.sourcetree - end - - local tr = tree.new(prj.name) - - table.foreachi(prj._.files, function(fcfg) - -- if the file is a generated file, we add those in a second pass. - if fcfg.generated then - return; - end - - -- The tree represents the logical source code tree to be displayed - -- in the IDE, not the physical organization of the file system. So - -- virtual paths are used when adding nodes. - - -- If the project script specifies a virtual path for a file, disable - -- the logic that could trim out empty root nodes from that path. If - -- the script writer wants an empty root node they should get it. - - local flags - if fcfg.vpath ~= fcfg.relpath then - flags = { trim = false } - end - - -- Virtual paths can overlap, potentially putting files with the same - -- name in the same folder, even though they have different paths on - -- the underlying filesystem. The tree.add() call won't overwrite - -- existing nodes, so provide the extra logic here. Start by getting - -- the parent folder node, creating it if necessary. - - local parent = tree.add(tr, path.getdirectory(fcfg.vpath), flags) - local node = tree.insert(parent, tree.new(path.getname(fcfg.vpath))) - - -- Pass through value fetches to the file configuration - setmetatable(node, { __index = fcfg }) - end) - - - table.foreachi(prj._.files, function(fcfg) - -- if the file is not a generated file, we already added them - if not fcfg.generated then - return; - end - - local parent = tree.add(tr, path.getdirectory(fcfg.dependsOn.vpath)) - local node = tree.insert(parent, tree.new(path.getname(fcfg.vpath))) - - -- Pass through value fetches to the file configuration - setmetatable(node, { __index = fcfg }) - end) - - tree.trimroot(tr) - tree.sort(tr, sorter) - - prj._.sourcetree = tr - return tr - end - - --- --- Given a source file path, return a corresponding virtual path based on --- the vpath entries in the project. If no matching vpath entry is found, --- the original path is returned. --- - - function project.getvpath(prj, abspath) - -- If there is no match, the result is the original filename - local vpath = abspath - - -- The file's name must be maintained in the resulting path; use these - -- to make sure I don't cut off too much - - local fname = path.getname(abspath) - local max = abspath:len() - fname:len() - - -- Look for matching patterns. Virtual paths are stored as an array - -- for tables, each table continuing the path key, which looks up the - -- array of paths with should match against that path. - - for _, vpaths in ipairs(prj.vpaths) do - for replacement, patterns in pairs(vpaths) do - for _, pattern in ipairs(patterns) do - local i = abspath:find(path.wildcards(pattern)) - if i == 1 then - - -- Trim out the part of the name that matched the pattern; what's - -- left is the part that gets appended to the replacement to make - -- the virtual path. So a pattern like "src/**.h" matching the - -- file src/include/hello.h, I want to trim out the src/ part, - -- leaving include/hello.h. - - -- Find out where the wildcard appears in the match. If there is - -- no wildcard, the match includes the entire pattern - - i = pattern:find("*", 1, true) or (pattern:len() + 1) - - -- Trim, taking care to keep the actual file name intact. - - local leaf - if i < max then - leaf = abspath:sub(i) - else - leaf = fname - end - - if leaf:startswith("/") then - leaf = leaf:sub(2) - end - - -- check for (and remove) stars in the replacement pattern. - -- If there are none, then trim all path info from the leaf - -- and use just the filename in the replacement (stars should - -- really only appear at the end; I'm cheating here) - - local stem = "" - if replacement:len() > 0 then - stem, stars = replacement:gsub("%*", "") - if stars == 0 then - leaf = path.getname(leaf) - end - else - leaf = path.getname(leaf) - end - - vpath = path.join(stem, leaf) - return vpath - end - end - end - end - - return vpath - end - - --- --- Determines if project contains a configuration meeting certain criteria. --- --- @param prj --- The project to query. --- @param func --- A test function. Takes a project configuration as an argument and --- returns a boolean result of the test. --- @return --- True if the test function returned true. --- - - function project.hasConfig(prj, func) - for cfg in project.eachconfig(prj) do - if func(cfg) then - return true - end - end - end - - --- --- Determines if a project contains a particular source code file. --- --- @param prj --- The project to query. --- @param filename --- The absolute path to the source code file being checked. --- @return --- True if the file belongs to the project, in any configuration. --- - - function project.hasfile(prj, filename) - return (prj._.files[filename] ~= nil) - end - - --- --- Returns true if the project uses a .NET language. --- - - function project.isdotnet(prj) - return - p.languages.iscsharp(prj.language) or - p.languages.isfsharp(prj.language) - end - - --- --- Returns true if the project uses a C# language. --- - - function project.iscsharp(prj) - return p.languages.iscsharp(prj.language) - end - - --- --- Returns true if the project uses a F# language. --- - - function project.isfsharp(prj) - return p.languages.isfsharp(prj.language) - end - - --- --- Returns true if the project uses a cpp language. --- - - function project.isc(prj) - return p.languages.isc(prj.language) - end - - --- --- Returns true if the project uses a cpp language. --- - - function project.iscpp(prj) - return p.languages.iscpp(prj.language) - end - - --- --- Returns true if the project has uses any 'native' languages. --- which is basically anything other then .net at this point. --- modules like the dlang should overload this to add 'project.isd(prj)' to it. --- - function project.isnative(prj) - return project.isc(prj) or project.iscpp(prj) - end - - --- --- Given a build config/platform pairing, applies any project configuration maps --- and returns a new (or the same) pairing. --- --- TODO: I think this could be made much simpler by building a string pattern --- like :part1:part2: and then doing string comparisions, instead of trying to --- iterate over variable number of table elements. --- - - function project.mapconfig(prj, buildcfg, platform) - local pairing = { buildcfg, platform } - - local testpattern = function(pattern, pairing, i) - local j = 1 - while i <= #pairing and j <= #pattern do - local wd = path.wildcards(pattern[j]) - if pairing[i]:match(wd) ~= pairing[i] then - return false - end - i = i + 1 - j = j + 1 - end - return true - end - - local maps = prj.configmap or {} - for mi = 1, #maps do - for pattern, replacements in pairs(maps[mi]) do - if type(pattern) ~= "table" then - pattern = { pattern } - end - - -- does this pattern match any part of the pair? If so, - -- replace it with the corresponding values - for i = 1, #pairing do - if testpattern(pattern, pairing, i) then - if #pattern == 1 and #replacements == 1 then - pairing[i] = replacements[1] - else - pairing = { replacements[1], replacements[2] } - end - end - end - end - end - - return pairing - end - - --- --- Given a project, returns requested min and max system versions. --- - - function project.systemversion(prj) - if prj.systemversion ~= nil then - local values = string.explode(prj.systemversion, ":", true) - return values[1], values[2] - end - end diff --git a/build/premake/premake5/src/base/rule.lua b/build/premake/premake5/src/base/rule.lua deleted file mode 100644 index 78e4984b5d..0000000000 --- a/build/premake/premake5/src/base/rule.lua +++ /dev/null @@ -1,174 +0,0 @@ ---- --- base/rule.lua --- Defines rule sets for generated custom rule files. --- Copyright (c) 2014 Jason Perkins and the Premake project ---- - - local p = premake - p.rule = p.api.container("rule", p.global) - - local rule = p.rule - - - ---- --- Create a new rule container instance. ---- - - function rule.new(name) - local self = p.container.new(rule, name) - - -- create a variable setting function. Do a version with lowercased - -- first letter(s) to match Premake's naming style for other calls - - _G[name .. "Vars"] = function(vars) - rule.setVars(self, vars) - end - - local lowerName = name:gsub("^%u+", string.lower) - _G[lowerName .. "Vars"] = _G[name .. "Vars"] - - return self - end - - - ---- --- Enumerate the property definitions for a rule. ---- - - function rule.eachProperty(self) - local props = self.propertydefinition - local i = 0 - return function () - i = i + 1 - if i <= #props then - return props[i] - end - end - end - - - ---- --- Find a property definition by its name. --- --- @param name --- The property name. --- @returns --- The property definition if found, nil otherwise. ---- - - function rule.getProperty(self, name) - local props = self.propertydefinition - for i = 1, #props do - local prop = props[i] - if prop.name == name then - return prop - end - end - end - - - ---- --- Find the field definition for one this rule's properties. This field --- can then be used with the api.* functions to manipulate the property's --- values in the current configuration scope. --- --- @param prop --- The property definition. --- @return --- The field definition for the property; this will be created if it --- does not already exist. ---- - - function rule.getPropertyField(self, prop) - if prop._field then - return prop._field - end - - local kind = prop.kind or "string" - if kind == "list" then - kind = "list:string" - end - - local fld = p.field.new { - name = "_rule_" .. self.name .. "_" .. prop.name, - scope = "config", - kind = kind, - tokens = true, - } - - prop._field = fld - return fld - end - - - ---- --- Set one or more rule variables in the current configuration scope. --- --- @param vars --- A key-value list of variables to set and their corresponding values. ---- - - function rule.setVars(self, vars) - for key, value in pairs(vars) do - local prop = rule.getProperty(self, key) - if not prop then - error (string.format("rule '%s' does not have property '%s'", self.name, key)) - end - - local fld = rule.getPropertyField(self, prop) - p.api.storeField(fld, value) - end - end - - - ---- --- prepare an environment with the rule properties as global tokens, --- according to the format specified. --- --- @param environ --- The environment table to fill up --- @param format --- The formatting to be used, ie "[%s]". ---- - - function rule.prepareEnvironment(self, environ, format) - for _, def in ipairs(self.propertydefinition) do - environ[def.name] = string.format(format, def.name) - end - end - - function rule.createEnvironment(self, format) - local environ = {} - rule.prepareEnvironment(self, environ, format) - return environ - end - - - ---- --- prepare an table of pathVars with the rule properties as global tokens, --- according to the format specified. --- --- @param pathVars --- The pathVars table to fill up --- @param format --- The formatting to be used, ie "%%(%s)". ---- - - function rule.preparePathVars(self, pathVars, format) - for _, def in ipairs(self.propertydefinition) do - pathVars[def.name] = { absolute = true, token = string.format(format, def.name) } - end - end - - function rule.createPathVars(self, format) - local pathVars = {} - rule.preparePathVars(self, pathVars, format) - return pathVars - end diff --git a/build/premake/premake5/src/base/semver.lua b/build/premake/premake5/src/base/semver.lua deleted file mode 100644 index 23f981ed7b..0000000000 --- a/build/premake/premake5/src/base/semver.lua +++ /dev/null @@ -1,209 +0,0 @@ -local semver = { - _VERSION = '1.2.1', - _DESCRIPTION = 'semver for Lua', - _URL = 'https://github.com/kikito/semver.lua', - _LICENSE = [[ - MIT LICENSE - - Copyright (c) 2015 Enrique García Cota - - Permission is hereby granted, free of charge, to any person obtaining a - copy of tother software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and tother permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ]] -} - -local function checkPositiveInteger(number, name) - assert(number >= 0, name .. ' must be a valid positive number') - assert(math.floor(number) == number, name .. ' must be an integer') -end - -local function present(value) - return value and value ~= '' -end - --- splitByDot("a.bbc.d") == {"a", "bbc", "d"} -local function splitByDot(str) - str = str or "" - local t, count = {}, 0 - str:gsub("([^%.]+)", function(c) - count = count + 1 - t[count] = c - end) - return t -end - -local function parsePrereleaseAndBuildWithSign(str) - local prereleaseWithSign, buildWithSign = str:match("^(-[^+]+)(+.+)$") - if not (prereleaseWithSign and buildWithSign) then - prereleaseWithSign = str:match("^(-.+)$") - buildWithSign = str:match("^(+.+)$") - end - assert(prereleaseWithSign or buildWithSign, ("The parameter %q must begin with + or - to denote a prerelease or a build"):format(str)) - return prereleaseWithSign, buildWithSign -end - -local function parsePrerelease(prereleaseWithSign) - if prereleaseWithSign then - local prerelease = prereleaseWithSign:match("^-(%w[%.%w-]*)$") - assert(prerelease, ("The prerelease %q is not a slash followed by alphanumerics, dots and slashes"):format(prereleaseWithSign)) - return prerelease - end -end - -local function parseBuild(buildWithSign) - if buildWithSign then - local build = buildWithSign:match("^%+(%w[%.%w-]*)$") - assert(build, ("The build %q is not a + sign followed by alphanumerics, dots and slashes"):format(buildWithSign)) - return build - end -end - -local function parsePrereleaseAndBuild(str) - if not present(str) then return nil, nil end - - local prereleaseWithSign, buildWithSign = parsePrereleaseAndBuildWithSign(str) - - local prerelease = parsePrerelease(prereleaseWithSign) - local build = parseBuild(buildWithSign) - - return prerelease, build -end - -local function parseVersion(str) - local sMajor, sMinor, sPatch, sPrereleaseAndBuild = str:match("^(%d+)%.?(%d*)%.?(%d*)(.-)$") - assert(type(sMajor) == 'string', ("Could not extract version number(s) from %q"):format(str)) - local major, minor, patch = tonumber(sMajor), tonumber(sMinor), tonumber(sPatch) - local prerelease, build = parsePrereleaseAndBuild(sPrereleaseAndBuild) - return major, minor, patch, prerelease, build -end - - --- return 0 if a == b, -1 if a < b, and 1 if a > b -local function compare(a,b) - return a == b and 0 or a < b and -1 or 1 -end - -local function compareIds(myId, otherId) - if myId == otherId then return 0 - elseif not myId then return -1 - elseif not otherId then return 1 - end - - local selfNumber, otherNumber = tonumber(myId), tonumber(otherId) - - if selfNumber and otherNumber then -- numerical comparison - return compare(selfNumber, otherNumber) - -- numericals are always smaller than alphanums - elseif selfNumber then - return -1 - elseif otherNumber then - return 1 - else - return compare(myId, otherId) -- alphanumerical comparison - end -end - -local function smallerIdList(myIds, otherIds) - local myLength = #myIds - local comparison - - for i=1, myLength do - comparison = compareIds(myIds[i], otherIds[i]) - if comparison ~= 0 then - return comparison == -1 - end - -- if comparison == 0, continue loop - end - - return myLength < #otherIds -end - -local function smallerPrerelease(mine, other) - if mine == other or not mine then return false - elseif not other then return true - end - - return smallerIdList(splitByDot(mine), splitByDot(other)) -end - -local methods = {} - -function methods:nextMajor() - return semver(self.major + 1, 0, 0) -end -function methods:nextMinor() - return semver(self.major, self.minor + 1, 0) -end -function methods:nextPatch() - return semver(self.major, self.minor, self.patch + 1) -end - -local mt = { __index = methods } -function mt:__eq(other) - return self.major == other.major and - self.minor == other.minor and - self.patch == other.patch and - self.prerelease == other.prerelease - -- notice that build is ignored for precedence in semver 2.0.0 -end -function mt:__lt(other) - if self.major ~= other.major then return self.major < other.major end - if self.minor ~= other.minor then return self.minor < other.minor end - if self.patch ~= other.patch then return self.patch < other.patch end - return smallerPrerelease(self.prerelease, other.prerelease) - -- notice that build is ignored for precedence in semver 2.0.0 -end --- This works like the "pessimisstic operator" in Rubygems. --- if a and b are versions, a ^ b means "b is backwards-compatible with a" --- in other words, "it's safe to upgrade from a to b" -function mt:__pow(other) - if self.major == 0 then - return self == other - end - return self.major == other.major and - self.minor <= other.minor -end -function mt:__tostring() - local buffer = { ("%d.%d.%d"):format(self.major, self.minor, self.patch) } - if self.prerelease then table.insert(buffer, "-" .. self.prerelease) end - if self.build then table.insert(buffer, "+" .. self.build) end - return table.concat(buffer) -end - -local function new(major, minor, patch, prerelease, build) - assert(major, "At least one parameter is needed") - - if type(major) == 'string' then - major,minor,patch,prerelease,build = parseVersion(major) - end - patch = patch or 0 - minor = minor or 0 - - checkPositiveInteger(major, "major") - checkPositiveInteger(minor, "minor") - checkPositiveInteger(patch, "patch") - - local result = {major=major, minor=minor, patch=patch, prerelease=prerelease, build=build} - return setmetatable(result, mt) -end - -setmetatable(semver, { __call = function(_, ...) return new(...) end }) -semver._VERSION= semver(semver._VERSION) - -return semver diff --git a/build/premake/premake5/src/base/string.lua b/build/premake/premake5/src/base/string.lua deleted file mode 100644 index 0a1a537d63..0000000000 --- a/build/premake/premake5/src/base/string.lua +++ /dev/null @@ -1,103 +0,0 @@ --- --- string.lua --- Additions to Lua's built-in string functions. --- Copyright (c) 2002-2013 Jason Perkins and the Premake project --- - - --- --- Capitalize the first letter of the string. --- - - function string.capitalized(self) - return self:gsub("^%l", string.upper) - end - - - --- --- Returns true if the string has a match for the plain specified pattern --- - - function string.contains(s, match) - return string.find(s, match, 1, true) ~= nil - end - - --- --- Returns an array of strings, each of which is a substring of s --- formed by splitting on boundaries formed by `pattern`. --- - - function string.explode(s, pattern, plain, maxTokens) - if (pattern == '') then return false end - local pos = 0 - local arr = { } - for st,sp in function() return s:find(pattern, pos, plain) end do - table.insert(arr, s:sub(pos, st-1)) - pos = sp + 1 - if maxTokens ~= nil and maxTokens > 0 then - maxTokens = maxTokens - 1 - if maxTokens == 0 then - break - end - end - end - table.insert(arr, s:sub(pos)) - return arr - end - - - --- --- Find the last instance of a pattern in a string. --- - - function string.findlast(s, pattern, plain) - local curr = 0 - repeat - local next = s:find(pattern, curr + 1, plain) - if (next) then curr = next end - until (not next) - if (curr > 0) then - return curr - end - end - - - --- --- Returns the number of lines of text contained by the string. --- - - function string.lines(s) - local trailing, n = s:gsub('.-\n', '') - if #trailing > 0 then - n = n + 1 - end - return n - end - - - ---- --- Return a plural version of a string. ---- - - function string:plural() - if self:endswith("y") then - return self:sub(1, #self - 1) .. "ies" - else - return self .. "s" - end - end - - - ---- --- Returns the string escaped for Lua patterns. ---- - - function string.escapepattern(s) - return s:gsub("[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%0") - end diff --git a/build/premake/premake5/src/base/table.lua b/build/premake/premake5/src/base/table.lua deleted file mode 100644 index d317586c0a..0000000000 --- a/build/premake/premake5/src/base/table.lua +++ /dev/null @@ -1,602 +0,0 @@ --- --- table.lua --- Additions to Lua's built-in table functions. --- Copyright (c) 2002-2013 Jason Perkins and the Premake project --- - - --- --- Make a copy of the indexed elements of the table. --- - - function table.arraycopy(object) - local result = {} - for i, value in ipairs(object) do - result[i] = value - end - return result - end - - --- --- Returns true if the table contains the specified value. --- - - function table.contains(t, value) - for _,v in pairs(t) do - if (v == value) then - return true - end - end - return false - end - - --- --- Make a shallow copy of a table --- - - function table.shallowcopy(object) - local copy = {} - for k, v in pairs(object) do - copy[k] = v - end - return copy - end - - --- --- Make a complete copy of a table, including any child tables it contains. --- - - function table.deepcopy(object) - -- keep track of already seen objects to avoid loops - local seen = {} - - local function copy(object) - if type(object) ~= "table" then - return object - elseif seen[object] then - return seen[object] - end - - local clone = {} - seen[object] = clone - for key, value in pairs(object) do - clone[key] = copy(value) - end - - setmetatable(clone, getmetatable(object)) - return clone - end - - return copy(object) - end - - --- --- Enumerates an array of objects and returns a new table containing --- only the value of one particular field. --- - - function table.extract(arr, fname) - local result = { } - for _,v in ipairs(arr) do - table.insert(result, v[fname]) - end - return result - end - - --- --- Enumerates an array of objects and returns a new table containing --- only the values satisfying the given predicate. --- - - function table.filter(arr, fn) - local result = { } - table.foreachi(arr, function(val) - if fn(val) then - table.insert(result, val) - end - end) - return result - end - - --- --- Flattens a hierarchy of tables into a single array containing all --- of the values. --- - - function table.flatten(arr) - local result = {} - - local function flatten(arr) - local n = #arr - for i = 1, n do - local v = arr[i] - if type(v) == "table" then - flatten(v) - elseif v then - table.insert(result, v) - end - end - end - - flatten(arr) - return result - end - - --- --- Walk the elements of an array and call the specified function --- for each non-nil element. This works around a "feature" of the --- ipairs() function that stops iteration at the first nil. --- --- @param arr --- The array to iterate. --- @param func --- The function to call. The value (not the index) will be passed --- as the only argument. --- - - function table.foreachi(arr, func) - if arr then - local n = #arr - for i = 1, n do - local v = arr[i] - if v then - func(v, i) - end - end - end - end - - --- --- Merge two lists into an array of objects, containing pairs --- of values, one from each list. --- - - function table.fold(list1, list2) - local result = {} - for _, item1 in ipairs(list1 or {}) do - if list2 and #list2 > 0 then - for _, item2 in ipairs(list2) do - table.insert(result, { item1, item2 }) - end - else - table.insert(result, { item1 }) - end - end - return result - end - - --- --- Merges an array of items into a string. --- - - function table.implode(arr, before, after, between) - local result = "" - for _,v in ipairs(arr) do - if (result ~= "" and between) then - result = result .. between - end - result = result .. before .. v .. after - end - return result - end - - - --- --- Looks for an object within an array. Returns its index if found, --- or nil if the object could not be found. --- - - function table.indexof(tbl, obj) - for k, v in ipairs(tbl) do - if v == obj then - return k - end - end - end - - --- --- Looks for an object within a table. Returns the key if found, --- or nil if the object could not be found. --- - - function table.findKeyByValue(tbl, obj) - for k, v in pairs(tbl) do - if v == obj then - return k - end - end - end - - ---- --- Insert a new value into a table in the position after the specified --- existing value. If the specified value does not exist in the table, --- the new value is appended to the end of the table. --- --- @param tbl --- The table in which to insert. --- @param after --- The existing value to insert after. --- @param value --- The new value to insert. --- - - function table.insertafter(tbl, after, value) - local i = table.indexof(tbl, after) - if i then - table.insert(tbl, i + 1, value) - else - table.insert(tbl, value) - end - end - - --- --- Inserts a value or array of values into a table. If the value is --- itself a table, its contents are enumerated and added instead. So --- these inputs give these outputs: --- --- "x" -> { "x" } --- { "x", "y" } -> { "x", "y" } --- { "x", { "y" }} -> { "x", "y" } --- - - function table.insertflat(tbl, values) - if values == nil then - return - elseif type(values) == "table" then - for _, value in ipairs(values) do - table.insertflat(tbl, value) - end - else - table.insert(tbl, values) - end - return tbl - end - - --- --- Inserts a value into a table as both a list item and a key-value pair. --- Useful for set operations. Returns false if the value already exists, true otherwise. --- - - function table.insertkeyed(tbl, pos, value) - if value == nil then - value = pos - pos = #tbl + 1 - end - - if tbl[value] ~= nil then - return false - end - - table.insert(tbl, pos, value) - tbl[value] = value - return true - end - - --- --- Inserts a value into a table in sorted order. Assumes that the --- table is already sorted according to the sort function. If fn is --- nil, the table is sorted according to the < operator. --- - - function table.insertsorted(tbl, value, fn) - if value == nil then - return - else - fn = fn or function(a, b) return a < b end - - local minindex = 1 - local maxindex = #tbl + 1 - while minindex < maxindex do - local index = minindex + ((maxindex - minindex) >> 1) - local test = tbl[index] - if fn(value, test) then - maxindex = index - else - minindex = index + 1 - if not fn(test, value) then - break - end - end - end - - table.insert(tbl, minindex, value) - end - - return tbl - end - - --- --- Returns true if the table is empty, and contains no indexed or keyed values. --- - - function table.isempty(t) - return next(t) == nil - end - - --- --- Adds the values from one array to the end of another and --- returns the result. --- - - function table.join(...) - local result = { } - local arg = {...} - for _,t in ipairs(arg) do - if type(t) == "table" then - for _,v in ipairs(t) do - table.insert(result, v) - end - else - table.insert(result, t) - end - end - return result - end - - --- --- Return a list of all keys used in a table. --- - - function table.keys(tbl) - local keys = {} - for k, _ in pairs(tbl) do - table.insert(keys, k) - end - return keys - end - - --- --- Adds the key-value associations from one table into another --- and returns the resulting merged table. --- - - function table.merge(...) - local result = {} - local arg = {...} - for _,t in ipairs(arg) do - - if type(t) == "table" then - for k,v in pairs(t) do - if type(result[k]) == "table" and type(v) == "table" then - result[k] = table.merge(result[k], v) - else - result[k] = v - end - end - - else - error("invalid value") - end - end - - return result - end - - ---- --- Replace all instances of `value` with `replacement` in an array. Array --- elements are modified in place. --- --- @param value --- The value to be replaced. --- @param replacement --- The new value. ---- - - function table.replace(self, value, replacement) - for i = 1, #self do - if self[i] == value then - self[i] = replacement - end - end - end - - --- --- Translates the values contained in array, using the specified --- translation table, and returns the results in a new array. --- - - function table.translate(arr, translation) - if not translation then return {} end - - local result = {} - for i = 1, #arr do - local tvalue - if type(translation) == "function" then - tvalue = translation(arr[i]) - else - tvalue = translation[arr[i]] - end - if (tvalue) then - table.insert(result, tvalue) - end - end - return result - end - - --- --- Dumps a table to a string --- - function table.tostring(tab, recurse, indent) - local res = '' - - if not indent then - indent = 0 - end - - local format_value = function(k, v, i) - formatting = string.rep("\t", i) - - if k then - if type(k) == "table" then - k = '[table]' - end - formatting = formatting .. k .. ": " - end - - if not v then - return formatting .. '(nil)' - elseif type(v) == "table" then - if recurse and recurse > 0 then - return formatting .. '\n' .. table.tostring(v, recurse-1, i+1) - else - return formatting .. "" - end - elseif type(v) == "function" then - return formatting .. tostring(v) - elseif type(v) == "userdata" then - return formatting .. "" - elseif type(v) == "boolean" then - if v then - return formatting .. 'true' - else - return formatting .. 'false' - end - else - return formatting .. v - end - end - - if type(tab) == "table" then - local first = true - - -- add the meta table. - local mt = getmetatable(tab) - if mt then - res = res .. format_value('__mt', mt, indent) - first = false - end - - -- add all values. - for k, v in pairs(tab) do - if not first then - res = res .. '\n' - end - - res = res .. format_value(k, v, indent) - first = false - end - else - res = res .. format_value(nil, tab, indent) - end - - return res - end - - --- --- Returns a copy of a list with all duplicate elements removed. --- - function table.unique(tab) - local elems = { } - local result = { } - table.foreachi(tab, function(elem) - if not elems[elem] then - table.insert(result, elem) - elems[elem] = true - end - end) - - return result - end - --- --- Filters a table for empty entries. primarly useful for lists of string. --- - function table.filterempty(dirs) - return table.translate(dirs, function(val) - if val and #val > 0 then - return val - else - return nil - end - end) - end - - --- --- Compares two tables. --- - function table.equals(a, b) - for k, v in pairs(a) do - if b[k] ~= v then - return false - end - end - for k, v in pairs(b) do - if a[k] ~= v then - return false - end - end - return true - end - - --- --- Enumerate a table sorted by its keys. --- - function spairs(t) - -- collect the keys - local keys = {} - for k in pairs(t) do - table.insert(keys, k) - end - table.sort(keys) - - -- return the iterator function - local i = 0 - return function() - i = i + 1 - if keys[i] then - return keys[i], t[keys[i]] - end - end - end - - --- --- Intersect two arrays and return a new array --- - function table.intersect(a, b) - local result = {} - for _, v in ipairs(b) do - if table.indexof(a, v) then - table.insert(result, v) - end - end - return result - end - --- --- The difference of A and B is the set containing those elements that are in A but not in B --- - function table.difference(a, b) - local result = {} - for _, v in ipairs(a) do - if not table.indexof(b, v) then - table.insert(result, v) - end - end - return result - end diff --git a/build/premake/premake5/src/base/term.lua b/build/premake/premake5/src/base/term.lua deleted file mode 100644 index 7952f4076b..0000000000 --- a/build/premake/premake5/src/base/term.lua +++ /dev/null @@ -1,45 +0,0 @@ --- --- term.lua --- Additions to the 'term' namespace. --- Copyright (c) 2017 Blizzard Entertainment and the Premake project --- - --- default colors. -term.black = 0 -term.blue = 1 -term.green = 2 -term.cyan = 3 -term.red = 4 -term.purple = 5 -term.brown = 6 -term.lightGray = 7 -term.gray = 8 -term.lightBlue = 9 -term.lightGreen = 10 -term.lightCyan = 11 -term.lightRed = 12 -term.magenta = 13 -term.yellow = 14 -term.white = 15 - --- colors for specific purpose. -term.warningColor = term.magenta -term.errorColor = term.lightRed -term.infoColor = term.lightCyan - --- color stack implementation. -term._colorStack = {} - -function term.pushColor(color) - local old = term.getTextColor() - table.insert(term._colorStack, old) - - term.setTextColor(color) -end - -function term.popColor() - if #term._colorStack > 0 then - local color = table.remove(term._colorStack) - term.setTextColor(color) - end -end diff --git a/build/premake/premake5/src/base/tools.lua b/build/premake/premake5/src/base/tools.lua deleted file mode 100644 index e8371908dc..0000000000 --- a/build/premake/premake5/src/base/tools.lua +++ /dev/null @@ -1,61 +0,0 @@ ---- --- tools.lua --- Work with Premake's collection of tool adapters. --- Author Jason Perkins --- Copyright (c) 2015 Jason Perkins and the Premake project ---- - - local p = premake - p.tools = {} - - ---- --- Given a toolset identifier (e.g. "gcc" or "gcc-4.8") returns the --- corresponding tool adapter and the version, if one was provided. --- --- @param identifier --- A toolset identifier composed of two parts: the toolset name, --- which should match of the name of the adapter object ("gcc", --- "clang", etc.) in the p.tools namespace, and and optional --- version number, separated by a dash. --- --- To make things more intuitive for Visual Studio users, supports --- identifiers like "v100" to represent the v100 Microsoft platform --- toolset. --- @return --- If successful, returns the toolset adapter object. If a version --- was specified as part of the identifier, that is returned as a --- second return value. If no corresponding tool adapter exists, --- returns nil. ---- - - function p.tools.normalize(identifier) - if identifier:startswith("v") then -- TODO: this should be deprecated? - identifier = 'msc-' .. identifier - end - - local parts = identifier:explode("-", true, 1) - if parts[2] == nil then - return parts[1] - end - - -- 'msc-100' is accepted, but the code expects 'v100' - if parts[1] == "msc" and tonumber(parts[2]:sub(1,3)) ~= nil then - parts[2] = "v" .. parts[2] - end - - -- perform case-correction of the LLVM toolset - if parts[2]:startswith("llvm-vs") then - parts[2] = "LLVM-" .. parts[2]:sub(6) - end - - return parts[1] .. '-' .. parts[2] - end - - - function p.tools.canonical(identifier) - identifier = p.tools.normalize(identifier) - - local parts = identifier:explode("-", true, 1) - return p.tools[parts[1]], parts[2] - end diff --git a/build/premake/premake5/src/base/tree.lua b/build/premake/premake5/src/base/tree.lua deleted file mode 100644 index 46e4b02159..0000000000 --- a/build/premake/premake5/src/base/tree.lua +++ /dev/null @@ -1,329 +0,0 @@ --- --- tree.lua --- Functions for working with the source code tree. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - p.tree = {} - local tree = p.tree - - --- --- Create a new tree. --- --- @param n --- The name of the tree, applied to the root node (optional). --- - - function tree.new(n) - local t = { - name = n, - children = {} - } - return t - end - - --- --- Add a new node to the tree, or returns the current node if it already exists. --- --- @param tr --- The tree to contain the new node. --- @param p --- The path of the new node. --- @param extraFields --- A table containing key-value pairs to be added to any new nodes. --- @returns --- The new tree node. --- - - function tree.add(tr, p, extraFields) - -- Special case "." refers to the current node - if p == "." or p == "/" then - return tr - end - - -- Look for the immediate parent for this new node, creating it if necessary. - -- Recurses to create as much of the tree as necessary. - local parentnode = tree.add(tr, path.getdirectory(p), extraFields) - - -- Create the child if necessary - local childname = path.getname(p) - local childnode = parentnode.children[childname] - if not childnode or childnode.path ~= p then - childnode = tree.insert(parentnode, tree.new(childname)) - childnode.path = p - if extraFields then - for k,v in pairs(extraFields) do - childnode[k] = v - end - end - end - - return childnode - end - - --- --- Insert one tree into another. --- --- @param parent --- The parent tree, to contain the child. --- @param child --- The child tree, to be inserted. --- - - function tree.insert(parent, child) - table.insert(parent.children, child) - if child.name then - parent.children[child.name] = child - end - child.parent = parent - return child - end - - --- --- Gets the node's relative path from it's parent. If the parent does not have --- a path set (it is the root or other container node) returns the full node path. --- --- @param node --- The node to query. --- - - function tree.getlocalpath(node) - if node.parent.path then - return node.name - elseif node.cfg then - return node.cfg.name - else - return node.path - end - end - - --- --- Determines if the tree contains any branch nodes, or only leaves. --- --- @param tr --- The root node of the tree to query. --- @return --- True if a node below the root contains children, false otherwise. --- - - function tree.hasbranches(tr) - local n = #tr.children - if n > 0 then - for i = 1, n do - if #tr.children[i].children > 0 then - return true - end - end - end - return false - end - - --- --- Determines if one node is a parent if another. --- --- @param n --- The node being tested for parentage. --- @param child --- The child node being testing against. --- @return --- True if n is a parent of child. --- - - function tree.isparent(n, child) - local p = child.parent - while p do - if p == n then - return true - end - p = p.parent - end - return false - end - - --- --- Remove a node from a tree. --- --- @param node --- The node to remove. --- - - function tree.remove(node) - local children = node.parent.children - for i = 1, #children do - if children[i] == node then - table.remove(children, i) - end - end - node.children = {} - end - - --- --- Sort the nodes of a tree in-place. --- --- @param tr --- The tree to sort. --- @param fn --- An optional comparator function. --- - - function tree.sort(tr, fn) - if not fn then - fn = function(a,b) return a.name < b.name end - end - tree.traverse(tr, { - onnode = function(node) - table.sort(node.children, fn) - end - }, true) - end - - --- --- Traverse a tree. --- --- @param t --- The tree to traverse. --- @param fn --- A collection of callback functions, which may contain any or all of the --- following entries. Entries are called in this order. --- --- onnode - called on each node encountered --- onbranchenter - called on branches, before processing children --- onbranch - called only on branch nodes --- onleaf - called only on leaf nodes --- onbranchexit - called on branches, after processing children --- --- Callbacks receive two arguments: the node being processed, and the --- current traversal depth. --- --- @param includeroot --- True to include the root node in the traversal, otherwise it will be skipped. --- @param initialdepth --- An optional starting value for the traversal depth; defaults to zero. --- - - function tree.traverse(t, fn, includeroot, initialdepth) - - -- forward declare my handlers, which call each other - local donode, dochildren - - -- process an individual node - donode = function(node, fn, depth) - if node.isremoved then - return - end - - if fn.onnode then - fn.onnode(node, depth) - end - - if #node.children > 0 then - if fn.onbranchenter then - fn.onbranchenter(node, depth) - end - if fn.onbranch then - fn.onbranch(node, depth) - end - dochildren(node, fn, depth + 1) - if fn.onbranchexit then - fn.onbranchexit(node, depth) - end - else - if fn.onleaf then - fn.onleaf(node, depth) - end - end - end - - -- this goofy iterator allows nodes to be removed during the traversal - dochildren = function(parent, fn, depth) - local i = 1 - while i <= #parent.children do - local node = parent.children[i] - donode(node, fn, depth) - if node == parent.children[i] then - i = i + 1 - end - end - end - - -- set a default initial traversal depth, if one wasn't set - if not initialdepth then - initialdepth = 0 - end - - if includeroot then - donode(t, fn, initialdepth) - else - dochildren(t, fn, initialdepth) - end - end - - --- --- Starting at the top of the tree, remove nodes that contain only a single --- item until I hit a node that has multiple items. This is used to remove --- superfluous folders from the top of the source tree. --- - - function tree.trimroot(tr) - local trimmed - - -- start by removing single-children folders from the top of the tree - while #tr.children == 1 do - local node = tr.children[1] - - -- if this node has no children (it is the last node in the tree) I'm done - if #node.children == 0 or node.trim == false then - break - end - - -- remove this node from the tree, and move its children up a level - trimmed = true - local numChildren = #node.children - for i = 1, numChildren do - local child = node.children[i] - child.parent = node.parent - tr.children[i] = child - end - end - - -- found the top, now remove any single-children ".." folders from here - local dotdot - local count = #tr.children - repeat - dotdot = false - for i = 1, count do - local node = tr.children[i] - if node.name == ".." and #node.children == 1 then - local child = node.children[1] - child.parent = node.parent - tr.children[i] = child - trimmed = true - dotdot = true - end - end - until not dotdot - - -- if nodes were removed, adjust the paths on all remaining nodes - if trimmed then - tree.traverse(tr, { - onnode = function(node) - if node.parent.path then - node.path = path.join(node.parent.path, node.name) - else - node.path = node.name - end - end - }, false) - end - end diff --git a/build/premake/premake5/src/base/validation.lua b/build/premake/premake5/src/base/validation.lua deleted file mode 100644 index 84d246f7dd..0000000000 --- a/build/premake/premake5/src/base/validation.lua +++ /dev/null @@ -1,239 +0,0 @@ ---- --- base/validation.lua --- --- Verify the contents of the project object before handing them off to --- the action/exporter. --- --- Copyright (c) 2002-2015 Jason Perkins and the Premake project ---- - - local p = premake - p.validation = {} - local m = p.validation - - m.elements = {} - - ---- --- Validate the global container and all of its contents. ---- - - m.elements.global = function(glb) - return { - } - end - - function p.global.validate(self) - p.callArray(m.elements.global, self) - p.container.validateChildren(self) - end - - - ---- --- Validate a workspace and its projects. ---- - - m.elements.workspace = function(wks) - return { - m.workspaceHasConfigs, - m.uniqueProjectIds, - } - end - - function p.workspace.validate(self) - p.callArray(m.elements.workspace, self) - p.container.validateChildren(self) - end - - - ---- --- Validate a project and its configurations. ---- - - m.elements.project = function(prj) - return { - m.projectHasLanguage, - m.actionSupportsLanguage, - m.actionSupportsKind, - m.projectRulesExist, - m.projectValuesInScope, - } - end - - function p.project.validate(self) - p.callArray(m.elements.project, self) - for cfg in p.project.eachconfig(self) do - p.config.validate(cfg) - end - end - - - ---- --- Validate a project configuration. ---- - - m.elements.config = function(cfg) - return { - m.configHasKind, - m.configSupportsKind, - m.configValuesInScope, - } - end - - function p.config.validate(self) - p.callArray(m.elements.config, self) - - end - - - ---- --- Validate a rule. ---- - - m.elements.rule = function(rule) - return { - -- TODO: fill this in - } - end - - function p.rule.validate(self) - p.callArray(m.elements.rule, self) - end - - - ---- --- Check the values stored in a configuration for values that might have --- been set out of scope. --- --- @param container --- The container being validated; will only check fields which are --- scoped to this container's class hierarchy. --- @param expectedScope --- The expected scope of values in this object, i.e. "project", "config". --- Values that appear unexpectedly get checked to be sure they match up --- with the values in the expected scope, and an error is raised if they --- are not the same. ---- - - function p.config.validateScopes(self, container, expected) - for f in p.field.each() do - -- If this field scoped to the target container class? If not - -- I can skip over it (config scope applies to everything). - local scope - for i = 1, #f.scopes do - if f.scopes[i] == "config" or p.container.classIsA(container.class, f.scopes[i]) then - scope = f.scopes[i] - break - end - end - - local okay = (not scope or scope == "config") - - -- Skip over fields that are at or below my expected scope. - okay = okay or scope == expected - - -- Skip over fields that bubble up to their parent containers anyway; - -- these can't be out of scope for that reason - okay = okay or p.oven.bubbledFields[f.name] - - -- this one needs to checked - okay = okay or p.field.compare(f, self[scope][f.name], self[f.name]) - - -- found a problem? - if not okay then - local key = "validate." .. f.name - p.warnOnce(key, "'%s' on %s '%s' differs from %s '%s'; may be set out of scope", f.name, expected, self.name, scope, self[scope].name) - end - end - end - - - ---------------------------------------------------------------------------- --- --- Handlers for individual checks --- ---------------------------------------------------------------------------- - - function m.actionSupportsKind(prj) - if not p.action.supports(prj.kind) then - p.warn("Unsupported kind '%s' used for project '%s'", prj.kind, prj.name) - end - end - - - function m.actionSupportsLanguage(prj) - if not p.action.supports(prj.language) then - p.warn("Unsupported language '%s' used for project '%s'", prj.language, prj.name) - end - end - - - function m.configHasKind(cfg) - if not cfg.kind then - p.error("Project '%s' needs a kind in configuration '%s'", cfg.project.name, cfg.name) - end - end - - - function m.configSupportsKind(cfg) - if not p.action.supports(cfg.kind) then - p.warn("Unsupported kind '%s' used in configuration '%s'", cfg.kind, cfg.name) - end - - -- makefile configuration can only appear in C++ projects; this is the - -- default now, so should only be a problem if overridden. - if (cfg.kind == p.MAKEFILE or cfg.kind == p.NONE) and p.project.isdotnet(cfg.project) then - p.error("Project '%s' uses '%s' kind in configuration '%s'; language must not be C#", cfg.project.name, cfg.kind, cfg.name) - end - end - - - function m.configValuesInScope(cfg) - p.config.validateScopes(cfg, cfg.project, "config") - end - - - function m.projectHasLanguage(prj) - if not prj.language then - p.error("project '%s' does not have a language", prj.name) - end - end - - - function m.projectRulesExist(prj) - for i = 1, #prj.rules do - local rule = prj.rules[i] - if not p.global.getRule(rule) then - p.error("project '%s' uses missing rule '%s'", prj.name, rule) - end - end - end - - - function m.projectValuesInScope(prj) - p.config.validateScopes(prj, prj, "project") - end - - - function m.uniqueProjectIds(wks) - local uuids = {} - for prj in p.workspace.eachproject(wks) do - if uuids[prj.uuid] then - p.error("projects '%s' and '%s' have the same UUID", uuids[prj.uuid], prj.name) - end - uuids[prj.uuid] = prj.name - end - end - - - function m.workspaceHasConfigs(wks) - if not wks.configurations or #wks.configurations == 0 then - p.error("workspace '%s' does not contain any configurations", wks.name) - end - end diff --git a/build/premake/premake5/src/base/workspace.lua b/build/premake/premake5/src/base/workspace.lua deleted file mode 100644 index 22b268f2eb..0000000000 --- a/build/premake/premake5/src/base/workspace.lua +++ /dev/null @@ -1,202 +0,0 @@ ---- --- workspace.lua --- Work with the list of workspaces loaded from the script. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project ---- - - local p = premake - p.workspace = p.api.container("workspace", p.global) - - local workspace = p.workspace - - ---- --- Switch this container's name from "solution" to "workspace" --- --- We changed these names on 30 Jul 2015. While it might be nice to leave --- `solution()` around for Visual Studio folks and everyone still used to the --- old system, it would be good to eventually deprecate and remove all of --- the other, more internal uses of "solution" and "sln". Probably including --- all uses of container class aliases, since we probably aren't going to --- need those again (right?). ---- - - p.solution = workspace - workspace.alias = "solution" - - p.alias(_G, "workspace", "solution") - p.alias(_G, "externalworkspace", "externalsolution") - - - ---- --- Create a new workspace container instance. ---- - - function workspace.new(name) - local wks = p.container.new(workspace, name) - return wks - end - - - --- --- Iterate over the configurations of a workspace. --- --- @return --- A configuration iteration function. --- - - function workspace.eachconfig(self) - self = p.oven.bakeWorkspace(self) - - local i = 0 - return function() - i = i + 1 - if i > #self.configs then - return nil - else - return self.configs[i] - end - end - end - - --- --- Iterate over the projects of a workspace. --- --- @return --- An iterator function, returning project configurations. --- - - function workspace.eachproject(self) - local i = 0 - return function () - i = i + 1 - if i <= #self.projects then - return p.workspace.getproject(self, i) - end - end - end - - --- --- Locate a project by name, case insensitive. --- --- @param name --- The name of the projec to find. --- @return --- The project object, or nil if a matching project could not be found. --- - - function workspace.findproject(self, name) - name = name:lower() - for _, prj in ipairs(self.projects) do - if name == prj.name:lower() then - return prj - end - end - return nil - end - - --- --- Retrieve the tree of project groups. --- --- @return --- The tree of project groups defined for the workspace. --- - - function workspace.grouptree(self) - -- check for a previously cached tree - if self.grouptree then - return self.grouptree - end - - -- build the tree of groups - - local tr = p.tree.new() - for prj in workspace.eachproject(self) do - local prjpath = path.join(prj.group, prj.name) - local node = p.tree.add(tr, prjpath) - node.project = prj - end - - -- assign UUIDs to each node in the tree - p.tree.traverse(tr, { - onbranch = function(node) - node.uuid = os.uuid("group:" .. node.path) - end - }) - - -- sort by uuid for determinism. - p.tree.sort(tr, function(a,b) - return a.name < b.name - end) - - self.grouptree = tr - return tr - end - - --- --- Retrieve the project configuration at a particular index. --- --- @param idx --- An index into the array of projects. --- @return --- The project configuration at the given index. --- - - function workspace.getproject(self, idx) - self = p.oven.bakeWorkspace(self) - return self.projects[idx] - end - - - ---- --- Determines if the workspace contains a project that meets certain criteria. --- --- @param func --- A test function. Receives a project as its only argument and returns a --- boolean indicating whether it meets to matching criteria. --- @return --- True if the test function returned true. ---- - - function workspace.hasProject(self, func) - return p.container.hasChild(self, p.project, func) - end - - --- --- Return the relative path from the solution to the specified file. --- --- @param self --- The workspace object to query. --- @param filename --- The file path, or an array of file paths, to convert. --- @return --- The relative path, or array of paths, from the workspace to the file. --- - - function workspace.getrelative(self, filename) - if type(filename) == "table" then - local result = {} - for i, name in ipairs(filename) do - if name and #name > 0 then - table.insert(result, workspace.getrelative(self, name)) - end - end - return result - else - if filename then - local result = filename - if path.hasdeferredjoin(result) then - result = path.resolvedeferredjoin(result) - end - return path.getrelative(self.location, result) - end - end - end diff --git a/build/premake/premake5/src/host/buffered_io.c b/build/premake/premake5/src/host/buffered_io.c deleted file mode 100644 index 018402be7e..0000000000 --- a/build/premake/premake5/src/host/buffered_io.c +++ /dev/null @@ -1,125 +0,0 @@ -/** - * \file buffered_io.c - * \brief provide buffered io. - * \author Copyright (c) 2014 - */ - -#include -#include -#include "premake.h" -#include "buffered_io.h" - -void buffer_init(Buffer* b) -{ - b->capacity = 0; - b->length = 0; - b->data = NULL; -} - -void buffer_destroy(Buffer* b) -{ - free(b->data); - b->capacity = 0; - b->length = 0; - b->data = NULL; -} - -void buffer_puts(Buffer* b, const void* ptr, size_t len) -{ - char* data; - - size_t required = b->length + len; - if (required > b->capacity) - { - size_t cap = b->capacity; - while (required > cap) - { - cap = (cap * 3) / 2; - if (cap <= 65536) - cap = 65536; - } - - data = (char*)calloc(cap, 1); - if (b->length > 0) - { - memcpy(data, b->data, b->length); - free(b->data); - } - b->data = data; - b->capacity = cap; - } - - memcpy(b->data + b->length, ptr, len); - b->length += len; -} - -void buffer_printf(Buffer* b, const char *fmt, ...) -{ - char text[2048]; - int len; - va_list args; - va_start(args, fmt); - len = vsnprintf(text, sizeof(text) - 1, fmt, args); - va_end(args); - buffer_puts(b, text, len); -} - -// -- Lua wrappers ---------------------------------------- - -int buffered_new(lua_State* L) -{ - Buffer* b = (Buffer*)malloc(sizeof(Buffer)); - buffer_init(b); - lua_pushlightuserdata(L, b); - return 1; -} - -int buffered_write(lua_State* L) -{ - size_t len; - const char *s = luaL_checklstring(L, 2, &len); - Buffer* b = (Buffer*)lua_touserdata(L, 1); - - buffer_puts(b, s, len); - return 0; -} - -int buffered_writeln(lua_State* L) -{ - size_t len; - const char *s = luaL_optlstring(L, 2, NULL, &len); - Buffer* b = (Buffer*)lua_touserdata(L, 1); - - if (s != NULL) - buffer_puts(b, s, len); - buffer_puts(b, "\r\n", 2); - return 0; -} - -int buffered_close(lua_State* L) -{ - Buffer* b = (Buffer*)lua_touserdata(L, 1); - buffer_destroy(b); - free(b); - return 0; -} - -int buffered_tostring(lua_State* L) -{ - Buffer* b = (Buffer*)lua_touserdata(L, 1); - size_t len = b->length; - - // trim string for _eol of line at the end. - if (len > 0 && b->data[len-1] == '\n') - --len; - if (len > 0 && b->data[len-1] == '\r') - --len; - - if (len > 0) - // push data into a string. - lua_pushlstring(L, b->data, len); - else - lua_pushstring(L, ""); - - return 1; -} diff --git a/build/premake/premake5/src/host/buffered_io.h b/build/premake/premake5/src/host/buffered_io.h deleted file mode 100644 index 50bdfb99ad..0000000000 --- a/build/premake/premake5/src/host/buffered_io.h +++ /dev/null @@ -1,24 +0,0 @@ -/** - * \file buffered_io.h - * \brief provide buffered io. - * \author Copyright (c) 2014 - */ -#ifndef buffered_io_h -#define buffered_io_h - -#include - -typedef struct struct_Buffer -{ - size_t capacity; - size_t length; - char* data; -} Buffer; - -void buffer_init(Buffer* b); -void buffer_destroy(Buffer* b); - -void buffer_puts(Buffer* b, const void* ptr, size_t len); -void buffer_printf(Buffer* b, const char* s, ...); - -#endif \ No newline at end of file diff --git a/build/premake/premake5/src/host/criteria_matches.c b/build/premake/premake5/src/host/criteria_matches.c deleted file mode 100644 index 8a315a490e..0000000000 --- a/build/premake/premake5/src/host/criteria_matches.c +++ /dev/null @@ -1,310 +0,0 @@ -/** - * \file criteria_matches.c - * \brief Determine if this criteria is met by the provided filter terms. - * \author Copyright (c) 2002-2014 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#include - - -struct Word { - const char* word; - const char* prefix; - int matchesFiles; - int assertion; - int wildcard; -}; - -struct Pattern { - int matchesFiles; - int n; - struct Word* word; -}; - -struct Patterns { - int prefixed; - int filePatterns; - int n; - struct Pattern* pattern; -}; - - -static int criteria_compilePattern(lua_State* L, struct Pattern* pattern); - - -int criteria_compile(lua_State* L) -{ - struct Patterns* patterns; - int i, n; - - /* create a Patterns object and userdata; holds a list of Pattern items */ - patterns = (struct Patterns*)lua_newuserdata(L, sizeof(struct Patterns)); - patterns->prefixed = 0; - patterns->filePatterns = 0; - - if (luaL_newmetatable(L, "premake.criteria")) { - lua_pushstring(L, "__gc"); - lua_pushcfunction(L, criteria_delete); - lua_settable(L, -3); - } - lua_setmetatable(L, -2); - - /* create array to hold the incoming list of patterns */ - n = (int)lua_rawlen(L, 1); - patterns->n = n; - patterns->pattern = (struct Pattern*)malloc(sizeof(struct Pattern) * n); - - /* create a new pattern object for each incoming pattern */ - for (i = 0; i < n; ++i) { - struct Pattern* pattern = &patterns->pattern[i]; - - lua_rawgeti(L, 1, i + 1); - criteria_compilePattern(L, pattern); - lua_pop(L, 1); - - if (pattern->n > 0 && pattern->word[0].prefix != NULL) { - patterns->prefixed = 1; - } - - if (pattern->matchesFiles) { - ++patterns->filePatterns; - } - } - - return 1; -} - - -int criteria_compilePattern(lua_State* L, struct Pattern* pattern) -{ - int i, n; - - /* create array to hold the incoming list of words */ - n = (int)lua_rawlen(L, -1); - pattern->n = n; - pattern->word = (struct Word*)malloc(sizeof(struct Word) * n); - pattern->matchesFiles = 0; - - for (i = 0; i < n; ++i) { - struct Word* word = &pattern->word[i]; - word->matchesFiles = 0; - - lua_rawgeti(L, -1, i + 1); - - lua_rawgeti(L, -1, 1); - word->word = lua_tostring(L, -1); - lua_pop(L, 1); - - lua_rawgeti(L, -1, 2); - word->prefix = lua_tostring(L, -1); - lua_pop(L, 1); - - lua_rawgeti(L, -1, 3); - word->assertion = lua_toboolean(L, -1); - lua_pop(L, 1); - - lua_rawgeti(L, -1, 4); - word->wildcard = lua_toboolean(L, -1); - lua_pop(L, 1); - - if (word->prefix && strcmp(word->prefix, "files") == 0) { - word->matchesFiles = 1; - pattern->matchesFiles = 1; - } - - lua_pop(L, 1); - } - - return 0; -} - - - -int criteria_delete(lua_State* L) -{ - int i, n; - struct Patterns* patterns = (struct Patterns*)lua_touserdata(L, 1); - - n = patterns->n; - for (i = 0; i < n; ++i) { - free(patterns->pattern[i].word); - } - free(patterns->pattern); - - return 0; -} - - - -static int match(lua_State* L, const char* value, struct Word* word) -{ - if (word->wildcard) { - /* use string.match() to compare */ - const char* result; - int matched = 0; - - int top = lua_gettop(L); - - lua_pushvalue(L, 4); - lua_pushstring(L, value); - lua_pushstring(L, word->word); - lua_call(L, 2, 1); - - if (lua_isstring(L, -1)) { - result = lua_tostring(L, -1); - matched = (strcmp(value, result) == 0); - } - - lua_settop(L, top); - return matched; - } - else { - return (strcmp(value, word->word) == 0); - } -} - - - -/* - * Compares the value on the top of the stack to the specified word. - */ - -static int testValue(lua_State* L, struct Word* word) -{ - const char* value; - size_t i, n; - int result; - - if (lua_istable(L, -1)) { - n = lua_rawlen(L, -1); - for (i = 1; i <= n; ++i) { - lua_rawgeti(L, -1, i); - result = testValue(L, word); - lua_pop(L, 1); - if (result) { - return 1; - } - } - return 0; - } - - value = lua_tostring(L, -1); - if (value) { - return match(L, value, word); - } - - return 0; -} - - - -static int testWithPrefix(lua_State* L, struct Word* word, const char* filename, int* fileMatched) -{ - int result; - - if (word->matchesFiles && !filename) { - return 0; - } - - lua_pushstring(L, word->prefix); - lua_rawget(L, 2); - result = testValue(L, word); - lua_pop(L, 1); - - if (word->matchesFiles && result == word->assertion) { - (*fileMatched) = 1; - } - - if (result) { - return word->assertion; - } - - return (!word->assertion); -} - - - -static int testNoPrefix(lua_State* L, struct Word* word, const char* filename, int* fileMatched) -{ - if (filename && word->assertion && match(L, filename, word)) { - (*fileMatched) = 1; - return 1; - } - - lua_pushnil(L); - while (lua_next(L, 2)) { - if (testValue(L, word)) { - lua_pop(L, 2); - return word->assertion; - } - lua_pop(L, 1); - } - - return (!word->assertion); -} - - - -int criteria_matches(lua_State* L) -{ - /* stack [1] = criteria */ - /* stack [2] = context */ - - struct Patterns* patterns; - const char* filename; - int i, j, fileMatched; - int matched = 1; - - /* filename = context.files */ - lua_pushstring(L, "files"); - lua_rawget(L, 2); - filename = lua_tostring(L, -1); - lua_pop(L, 1); - - /* fetch the patterns to be tested */ - lua_pushstring(L, "data"); - lua_rawget(L, 1); - patterns = (struct Patterns*)lua_touserdata(L, -1); - lua_pop(L, 1); - - /* if a file is being matched, the pattern must be able to match it */ - if (patterns->prefixed && filename != NULL && patterns->filePatterns == 0) { - return 0; - } - - /* Cache string.match on the stack (at index 4) to save time in matches() later */ - - lua_getglobal(L, "string"); - lua_getfield(L, -1, "match"); - - /* if there is no file to consider, consider it matched */ - fileMatched = (filename == NULL); - - /* all patterns must match to pass */ - for (i = 0; matched && i < patterns->n; ++i) { - struct Pattern* pattern = &patterns->pattern[i]; - - /* only one word needs to match for the pattern to pass */ - matched = 0; - - for (j = 0; !matched && j < pattern->n; ++j) { - struct Word* word = &pattern->word[j]; - if (word->prefix) { - matched = testWithPrefix(L, word, filename, &fileMatched); - } - else { - matched = testNoPrefix(L, word, filename, &fileMatched); - } - } - } - - /* if a file name was provided in the context, it must be matched */ - if (filename && !fileMatched) { - matched = 0; - } - - lua_pushboolean(L, matched); - return 1; -} diff --git a/build/premake/premake5/src/host/curl_utils.c b/build/premake/premake5/src/host/curl_utils.c deleted file mode 100644 index a74cf5ef6d..0000000000 --- a/build/premake/premake5/src/host/curl_utils.c +++ /dev/null @@ -1,207 +0,0 @@ -/** -* \file curl_utils.c -* \brief curl utilities for the http library. -* \author Copyright (c) 2017 Tom van Dijck, João Matos and the Premake project -*/ -#ifdef PREMAKE_CURL - -#include "curl_utils.h" -#include "premake.h" -#include - -int curlProgressCallback(curl_state* state, double dltotal, double dlnow, double ultotal, double ulnow) -{ - lua_State* L = state->L; - - (void)ultotal; - (void)ulnow; - - if (dltotal == 0) return 0; - - /* retrieve the lua progress callback we saved before */ - lua_rawgeti(L, LUA_REGISTRYINDEX, state->RefIndex); - lua_pushnumber(L, (lua_Number)dltotal); - lua_pushnumber(L, (lua_Number)dlnow); - int ret = premake_pcall(L, 2, LUA_MULTRET); - if (ret != LUA_OK) { - printLastError(L); - return -1; // abort download - } - - return 0; -} - - -size_t curlWriteCallback(char *ptr, size_t size, size_t nmemb, curl_state* state) -{ - size_t length = size * nmemb; - buffer_puts(&state->S, ptr, length); - return length; -} - - -static void curl_init() -{ - static int initializedHTTP = 0; - - if (initializedHTTP) - return; - - curl_global_init(CURL_GLOBAL_ALL); - atexit(curl_global_cleanup); - initializedHTTP = 1; -} - - -static void get_headers(lua_State* L, int headersIndex, struct curl_slist** headers) -{ - lua_pushnil(L); - while (lua_next(L, headersIndex) != 0) - { - const char *item = luaL_checkstring(L, -1); - lua_pop(L, 1); - *headers = curl_slist_append(*headers, item); - } -} - - -CURL* curlRequest(lua_State* L, curl_state* state, int optionsIndex, int progressFnIndex, int headersIndex) -{ - char agent[1024]; - CURL* curl; - - state->L = 0; - state->RefIndex = 0; - state->errorBuffer[0] = '\0'; - state->headers = NULL; - buffer_init(&state->S); - - curl_init(); - curl = curl_easy_init(); - - if (!curl) - return NULL; - - strcpy(agent, "Premake/"); - strcat(agent, PREMAKE_VERSION); - - curl_easy_setopt(curl, CURLOPT_URL, luaL_checkstring(L, 1)); - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); - curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1); - curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); - curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, state->errorBuffer); - curl_easy_setopt(curl, CURLOPT_USERAGENT, agent); - - // check if the --insecure option was specified on the commandline. - lua_getglobal(L, "_OPTIONS"); - lua_pushstring(L, "insecure"); - lua_gettable(L, -2); - if (!lua_isnil(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); - } - lua_pop(L, 2); - - // apply all other options. - if (optionsIndex && lua_istable(L, optionsIndex)) - { - lua_pushnil(L); - while (lua_next(L, optionsIndex) != 0) - { - const char* key = luaL_checkstring(L, -2); - - if (!strcmp(key, "headers") && lua_istable(L, -1)) - { - get_headers(L, lua_gettop(L), &state->headers); - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, state->headers); - } - else if (!strcmp(key, "progress") && lua_isfunction(L, -1)) - { - state->L = L; - lua_pushvalue(L, -1); - state->RefIndex = luaL_ref(L, LUA_REGISTRYINDEX); - } - else if (!strcmp(key, "userpwd") && lua_isstring(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_USERPWD, luaL_checkstring(L, -1)); - } - else if (!strcmp(key, "username") && lua_isstring(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_USERNAME, luaL_checkstring(L, -1)); - } - else if (!strcmp(key, "password") && lua_isstring(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_PASSWORD, luaL_checkstring(L, -1)); - } - else if (!strcmp(key, "timeout") && lua_isnumber(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)luaL_checknumber(L, -1)); - } - else if (!strcmp(key, "timeoutms") && lua_isnumber(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, (long)luaL_checknumber(L, -1)); - } - else if (!strcmp(key, "sslverifyhost") && lua_isnumber(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, (long)luaL_checknumber(L, -1)); - } - else if (!strcmp(key, "sslverifypeer") && lua_isnumber(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, (long)luaL_checknumber(L, -1)); - } - else if (!strcmp(key, "proxyurl") && lua_isstring(L, -1)) - { - curl_easy_setopt(curl, CURLOPT_PROXY, luaL_checkstring(L, -1)); - } - - // pop the value, leave the key for lua_next - lua_pop(L, 1); - } - } - else - { - if (progressFnIndex && lua_type(L, progressFnIndex) == LUA_TFUNCTION) - { - state->L = L; - lua_pushvalue(L, progressFnIndex); - state->RefIndex = luaL_ref(L, LUA_REGISTRYINDEX); - } - - if (headersIndex && lua_istable(L, headersIndex)) - { - get_headers(L, headersIndex, &state->headers); - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, state->headers); - } - } - - curl_easy_setopt(curl, CURLOPT_WRITEDATA, state); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlWriteCallback); - - if (state->L != 0) - { - curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); - curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, state); - curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, curlProgressCallback); - } - - // clear error buffer. - state->errorBuffer[0] = 0; - - return curl; -} - - - -void curlCleanup(CURL* curl, curl_state* state) -{ - if (state->headers) - { - curl_slist_free_all(state->headers); - state->headers = 0; - } - curl_easy_cleanup(curl); -} - - -#endif diff --git a/build/premake/premake5/src/host/curl_utils.h b/build/premake/premake5/src/host/curl_utils.h deleted file mode 100644 index d8215bdd56..0000000000 --- a/build/premake/premake5/src/host/curl_utils.h +++ /dev/null @@ -1,36 +0,0 @@ -/** -* \file curl_utils.h -* \brief curl utilities for the http library. -* \author Copyright (c) 2017 Tom van Dijck, João Matos and the Premake project -*/ -#ifndef curl_utils_h -#define curl_utils_h - -#ifdef PREMAKE_CURL - -#include "buffered_io.h" -#include "lua.h" - -#define _MPRINTF_REPLACE /* use curl functions only */ -#include -#include - -typedef struct -{ - lua_State* L; - int RefIndex; - Buffer S; - char errorBuffer[256]; - struct curl_slist* headers; -} curl_state; - -int curlProgressCallback(curl_state* state, double dltotal, double dlnow, double ultotal, double ulnow); -size_t curlWriteCallback(char *ptr, size_t size, size_t nmemb, curl_state* state); - -CURL* curlRequest(lua_State* L, curl_state* state, int optionsIndex, int progressFnIndex, int headersIndex); -void curlCleanup(CURL* curl, curl_state* state); - - -#endif // PREMAKE_CURL - -#endif // curl_utils_h diff --git a/build/premake/premake5/src/host/debug_prompt.c b/build/premake/premake5/src/host/debug_prompt.c deleted file mode 100644 index d4546c72d6..0000000000 --- a/build/premake/premake5/src/host/debug_prompt.c +++ /dev/null @@ -1,47 +0,0 @@ -/** - * \file debug_prompt.c - * \brief Display a prompt and enter interactive REPL mode. - * \author Copyright (c) 2014 Jason Perkins and the Premake project - */ - -#include "premake.h" - -/* Build on the REPL built into Lua already */ -#define main lua_main -#include "lua.c" - - -/* Based on dotty() in lua.c */ -int debug_prompt(lua_State* L) -{ - int status; - - const char* oldProgName = progname; - progname = NULL; - - while ((status = loadline(L)) != -1) { - if (status == 0) { - status = docall(L, 0, 0); - } - - report(L, status); - - if (status == 0 && lua_gettop(L) > 0) { /* any result to print? */ - lua_getglobal(L, "print"); - lua_insert(L, 1); - if (lua_pcall(L, lua_gettop(L) - 1, 0, 0) != 0) { - l_message(progname, lua_pushfstring(L, - "error calling " LUA_QL("print") " (%s)", - lua_tostring(L, -1)) - ); - } - } - } - - lua_settop(L, 0); /* clear stack */ - fputs("\n", stdout); - fflush(stdout); - progname = oldProgName; - return 0; -} - diff --git a/build/premake/premake5/src/host/http_download.c b/build/premake/premake5/src/host/http_download.c deleted file mode 100644 index 80945b0f85..0000000000 --- a/build/premake/premake5/src/host/http_download.c +++ /dev/null @@ -1,76 +0,0 @@ -/** -* \file http_download.c -* \brief HTTP download support using libcurl. -* \author Copyright (c) 2017 Blizzard Entertainment, João Matos and the Premake project -*/ - -#include "premake.h" -#include "curl_utils.h" - -#ifdef PREMAKE_CURL - -static size_t curl_file_cb(void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - return fwrite(ptr, size, nmemb, stream); -} - -int http_download(lua_State* L) -{ - curl_state state; - CURL* curl; - CURLcode code = CURLE_FAILED_INIT; - long responseCode = 0; - - FILE* fp; - const char* file = luaL_checkstring(L, 2); - - fp = fopen(file, "wb"); - if (!fp) - { - lua_pushstring(L, "Unable to open file."); - lua_pushnumber(L, -1); - return 2; - } - - if (lua_istable(L, 3)) - { - // http.download(source, destination, { options }) - curl = curlRequest(L, &state, /*optionsIndex=*/3, /*progressFnIndex=*/0, /*headersIndex=*/0); - } - else - { - // backward compatible function signature - // http.download(source, destination, progressFunction, { headers }) - curl = curlRequest(L, &state, /*optionsIndex=*/0, /*progressFnIndex=*/3, /*headersIndex=*/4); - } - - if (curl) - { - curl_easy_setopt(curl, CURLOPT_HTTPGET, 1); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_file_cb); - - code = curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode); - curlCleanup(curl, &state); - } - - fclose(fp); - - if (code != CURLE_OK) - { - char errorBuf[1024]; - snprintf(errorBuf, sizeof(errorBuf) - 1, "%s\n%s\n", curl_easy_strerror(code), state.errorBuffer); - lua_pushstring(L, errorBuf); - } - else - { - lua_pushstring(L, "OK"); - } - - buffer_destroy(&state.S); - lua_pushnumber(L, (lua_Number)responseCode); - return 2; -} - -#endif diff --git a/build/premake/premake5/src/host/http_get.c b/build/premake/premake5/src/host/http_get.c deleted file mode 100644 index b1df2b9494..0000000000 --- a/build/premake/premake5/src/host/http_get.c +++ /dev/null @@ -1,59 +0,0 @@ -/** -* \file http_get.c -* \brief HTTP get request support using libcurl. -* \author Copyright (c) 2017 Blizzard Entertainment, João Matos and the Premake project -*/ - -#include "premake.h" -#include "curl_utils.h" - -#ifdef PREMAKE_CURL - -int http_get(lua_State* L) -{ - curl_state state; - CURL* curl; - CURLcode code = CURLE_FAILED_INIT; - long responseCode = 0; - - if (lua_istable(L, 2)) - { - // http.get(source, { options }) - curl = curlRequest(L, &state, /*optionsIndex=*/2, /*progressFnIndex=*/0, /*headersIndex=*/0); - } - else - { - // backward compatible function signature - // http.get(source, progressFunction, { headers }) - curl = curlRequest(L, &state, /*optionsIndex=*/0, /*progressFnIndex=*/2, /*headersIndex=*/3); - } - - if (curl) - { - curl_easy_setopt(curl, CURLOPT_HTTPGET, 1); - - code = curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode); - curlCleanup(curl, &state); - } - - if (code != CURLE_OK) - { - char errorBuf[1024]; - - lua_pushnil(L); - snprintf(errorBuf, sizeof(errorBuf) - 1, "%s\n%s\n", curl_easy_strerror(code), state.errorBuffer); - lua_pushstring(L, errorBuf); - } - else - { - lua_pushlstring(L, state.S.data, state.S.length); - lua_pushstring(L, "OK"); - } - - buffer_destroy(&state.S); - lua_pushnumber(L, (lua_Number)responseCode); - return 3; -} - -#endif diff --git a/build/premake/premake5/src/host/http_post.c b/build/premake/premake5/src/host/http_post.c deleted file mode 100644 index dff473d234..0000000000 --- a/build/premake/premake5/src/host/http_post.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - * \file http_post.c - * \brief HTTP post request support using libcurl. - * \author Copyright (c) 2017 Blizzard Entertainment, João Matos and the Premake project - */ - -#include "premake.h" -#include "curl_utils.h" - -#ifdef PREMAKE_CURL - -int http_post(lua_State* L) -{ - curl_state state; - CURL* curl; - CURLcode code = CURLE_FAILED_INIT; - long responseCode = 0; - - // http.post(source, postdata, { options }) - curl = curlRequest(L, &state, /*optionsIndex=*/3, /*progressFnIndex=*/0, /*headersIndex=*/0); - if (curl) - { - size_t dataSize; - const char* data = luaL_checklstring(L, 2, &dataSize); - - curl_easy_setopt(curl, CURLOPT_POST, 1); - if (data && dataSize > 0) - { - curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)dataSize); - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); - } - - code = curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode); - curlCleanup(curl, &state); - } - - if (code != CURLE_OK) - { - char errorBuf[1024]; - - lua_pushnil(L); - snprintf(errorBuf, sizeof(errorBuf) - 1, "%s\n%s\n", curl_easy_strerror(code), state.errorBuffer); - lua_pushstring(L, errorBuf); - } - else - { - lua_pushlstring(L, state.S.data, state.S.length); - lua_pushstring(L, "OK"); - } - - buffer_destroy(&state.S); - lua_pushnumber(L, (lua_Number)responseCode); - return 3; -} - -#endif diff --git a/build/premake/premake5/src/host/lua_auxlib.c b/build/premake/premake5/src/host/lua_auxlib.c deleted file mode 100644 index baa849c698..0000000000 --- a/build/premake/premake5/src/host/lua_auxlib.c +++ /dev/null @@ -1,177 +0,0 @@ -/** - * \file lua_auxlib.c - * \brief Modifications and extensions to Lua's library functions. - * \author Copyright (c) 2014-2017 Jason Perkins and the Premake project - */ - -#include "premake.h" - - -static int chunk_wrapper(lua_State* L); - - - -/* Pull in Lua's aux lib implementation, but rename luaL_loadfilex() so I - * can replace it with my own implementation. */ - -#define luaL_loadfilex original_luaL_loadfilex -#include "lauxlib.c" -#undef luaL_loadfilex - - - -/** - * Extend the default implementation of luaL_loadfile() to call my chunk - * wrapper, above, before executing any scripts loaded from a file. - */ -LUALIB_API int luaL_loadfilex (lua_State* L, const char* filename, const char* mode) -{ - const char* script_dir; - const char* test_name; - - int bottom = lua_gettop(L); - int z = !OKAY; - - /* If filename starts with "$/" then we want to load the version that - * was embedded into the executable and skip the local file system */ - if (filename[0] == '$') { - z = premake_load_embedded_script(L, filename + 2); /* Skip over leading "$/" */ - if (z != OKAY) { - return z; - } - } - - /* If the currently running script was embedded, try to load this file - * as it if were embedded too. */ - if (z != OKAY) { - lua_getglobal(L, "_SCRIPT_DIR"); - script_dir = lua_tostring(L, -1); - - if (script_dir && script_dir[0] == '$') { - /* Call `path.getabsolute(filename, _SCRIPT_DIR)` to resolve any - * "../" sequences in the filename */ - lua_pushcfunction(L, path_getabsolute); - lua_pushstring(L, filename); - lua_pushvalue(L, -3); - lua_call(L, 2, 1); - test_name = lua_tostring(L, -1); - - /* if successful, filename and chunk will be on top of stack */ - z = premake_load_embedded_script(L, test_name + 2); /* Skip over leading "$/" */ - - /* remove test_name */ - lua_remove(L, bottom + 1); - } - - /* remove _SCRIPT_DIR */ - lua_remove(L, bottom); - } - - /* Try to locate the script on the filesystem */ - if (z != OKAY) { - lua_pushcfunction(L, os_locate); - lua_pushstring(L, filename); - lua_call(L, 1, 1); - - test_name = lua_tostring(L, -1); - - if (test_name) { - z = original_luaL_loadfilex(L, test_name, mode); - } - - /* If the file exists but errors, pass that through */ - if (test_name && z != OKAY && z != LUA_ERRFILE) { - return z; - } - - /* If the file didn't exist, remove the result and the test - * name from the stack before checking embedded scripts */ - if (z != OKAY) { - lua_pop(L, 1); - } - } - - /* Try to load from embedded scripts */ - if (z != OKAY) { - z = premake_load_embedded_script(L, filename); - } - - /* Either way I should have ended up with the file name followed by the - * script chunk on the stack. Turn these into a closure that will call my - * wrapper below when the loaded script needs to be executed. */ - if (z == OKAY) { - lua_pushcclosure(L, chunk_wrapper, 2); - } - else if (z == LUA_ERRFILE) { - lua_pushfstring(L, "cannot open %s: No such file or directory", filename); - } - - return z; -} - - - -/** - * Execute a chunk of code previously loaded by my customized version of - * luaL_loadfile(), below. Sets the _SCRIPT global variable to the absolute - * path of the loaded chunk, and makes its enclosing directory current so - * that relative path references to other files or scripts can be used. - */ - -static int chunk_wrapper(lua_State* L) -{ - char cwd[PATH_MAX]; - const char* filename; - char* ptr; - int i, args; - - args = lua_gettop(L); - - /* Remember the current _SCRIPT and working directory so I can - * restore them after this new chunk has been run. */ - - do_getcwd(cwd, PATH_MAX); - lua_getglobal(L, "_SCRIPT"); - lua_getglobal(L, "_SCRIPT_DIR"); - - /* Set the new _SCRIPT variable */ - - lua_pushvalue(L, lua_upvalueindex(1)); - lua_setglobal(L, "_SCRIPT"); - - /* And the new _SCRIPT_DIR variable (const cheating) */ - - filename = lua_tostring(L, lua_upvalueindex(1)); - ptr = strrchr(filename, '/'); - if (ptr) *ptr = '\0'; - lua_pushlstring(L, filename, strlen(filename)); - lua_setglobal(L, "_SCRIPT_DIR"); - - /* And make that the CWD (and fix the const cheat) */ - - if (filename[0] != '$') { - do_chdir(L, filename); - } - if (ptr) *ptr = '/'; - - /* Move the function's arguments to the top of the stack and - * execute the function created by luaL_loadfile() */ - - lua_pushvalue(L, lua_upvalueindex(2)); - for (i = 1; i <= args; ++i) { - lua_pushvalue(L, i); - } - - lua_call(L, args, LUA_MULTRET); - - /* Finally, restore the previous _SCRIPT variable and working directory - * before returning control to the previously executing script. */ - - do_chdir(L, cwd); - lua_pushvalue(L, args + 1); - lua_setglobal(L, "_SCRIPT"); - lua_pushvalue(L, args + 2); - lua_setglobal(L, "_SCRIPT_DIR"); - - return lua_gettop(L) - args - 2; -} diff --git a/build/premake/premake5/src/host/lua_shimtable.h b/build/premake/premake5/src/host/lua_shimtable.h deleted file mode 100644 index 948d53f53f..0000000000 --- a/build/premake/premake5/src/host/lua_shimtable.h +++ /dev/null @@ -1,147 +0,0 @@ -/** -* \file lua_shimtable.h -* \brief Lua shim for premake binary modules. -* \author Copyright (c) 2017 Tom van Dijck and the Premake project -*/ -#ifndef HEADER_lua_shimtable_H -#define HEADER_lua_shimtable_H - -#include "luashim.h" - -static LuaFunctionTable_t s_shimTable = { - &luaL_register, - &lua_newstate, - &lua_close, - &lua_newthread, - &lua_atpanic, - &lua_version, - &lua_absindex, - &lua_gettop, - &lua_settop, - &lua_pushvalue, - &lua_rotate, - &lua_copy, - &lua_checkstack, - &lua_xmove, - &lua_isnumber, - &lua_isstring, - &lua_iscfunction, - &lua_isinteger, - &lua_isuserdata, - &lua_type, - &lua_typename, - &lua_tonumberx, - &lua_tointegerx, - &lua_toboolean, - &lua_tolstring, - &lua_rawlen, - &lua_tocfunction, - &lua_touserdata, - &lua_tothread, - &lua_topointer, - &lua_arith, - &lua_rawequal, - &lua_compare, - &lua_pushnil, - &lua_pushnumber, - &lua_pushinteger, - &lua_pushlstring, - &lua_pushstring, - &lua_pushvfstring, - &lua_pushcclosure, - &lua_pushboolean, - &lua_pushlightuserdata, - &lua_pushthread, - &lua_getglobal, - &lua_gettable, - &lua_getfield, - &lua_geti, - &lua_rawget, - &lua_rawgeti, - &lua_rawgetp, - &lua_createtable, - &lua_newuserdata, - &lua_getmetatable, - &lua_getuservalue, - &lua_setglobal, - &lua_settable, - &lua_setfield, - &lua_seti, - &lua_rawset, - &lua_rawseti, - &lua_rawsetp, - &lua_setmetatable, - &lua_setuservalue, - &lua_callk, - &lua_pcallk, - &lua_load, - &lua_dump, - &lua_yieldk, - &lua_resume, - &lua_status, - &lua_isyieldable, - &lua_gc, - &lua_error, - &lua_next, - &lua_concat, - &lua_len, - &lua_stringtonumber, - &lua_getallocf, - &lua_setallocf, - &lua_getstack, - &lua_getinfo, - &lua_getlocal, - &lua_setlocal, - &lua_getupvalue, - &lua_setupvalue, - &lua_upvalueid, - &lua_upvaluejoin, - &lua_sethook, - &lua_gethook, - &lua_gethookmask, - &lua_gethookcount, - &luaL_checkversion_, - &luaL_getmetafield, - &luaL_callmeta, - &luaL_tolstring, - &luaL_argerror, - &luaL_checklstring, - &luaL_optlstring, - &luaL_checknumber, - &luaL_optnumber, - &luaL_checkinteger, - &luaL_optinteger, - &luaL_checkstack, - &luaL_checktype, - &luaL_checkany, - &luaL_newmetatable, - &luaL_setmetatable, - &luaL_testudata, - &luaL_checkudata, - &luaL_where, - &luaL_checkoption, - &luaL_fileresult, - &luaL_execresult, - &luaL_ref, - &luaL_unref, - &luaL_loadfilex, - &luaL_loadbufferx, - &luaL_loadstring, - &luaL_newstate, - &luaL_len, - &luaL_gsub, - &luaL_setfuncs, - &luaL_getsubtable, - &luaL_traceback, - &luaL_requiref, - &luaL_buffinit, - &luaL_prepbuffsize, - &luaL_addlstring, - &luaL_addstring, - &luaL_addvalue, - &luaL_pushresult, - &luaL_pushresultsize, - &luaL_buffinitsize, -}; - -#endif \ No newline at end of file diff --git a/build/premake/premake5/src/host/os_chdir.c b/build/premake/premake5/src/host/os_chdir.c deleted file mode 100644 index b51292afed..0000000000 --- a/build/premake/premake5/src/host/os_chdir.c +++ /dev/null @@ -1,50 +0,0 @@ -/** - * \file os_chdir.c - * \brief Change the current working directory. - * \author Copyright (c) 2002-2014 Jason Perkins and the Premake project - */ - -#include "premake.h" - - -int do_chdir(lua_State* L, const char* path) -{ - int z; - -#if PLATFORM_WINDOWS - wchar_t wide_buffer[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, path, -1, wide_buffer, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode path"); - return lua_error(L); - } - - z = SetCurrentDirectoryW(wide_buffer); -#else - (void)(L); /* warning: unused parameter */ - - z = !chdir(path); -#endif - - return z; -} - - - -int os_chdir(lua_State* L) -{ - const char* path = luaL_checkstring(L, 1); - - int z = do_chdir(L, path); - if (!z) - { - lua_pushnil(L); - lua_pushfstring(L, "unable to switch to directory '%s'", path); - return 2; - } - else - { - lua_pushboolean(L, 1); - return 1; - } -} diff --git a/build/premake/premake5/src/host/os_chmod.c b/build/premake/premake5/src/host/os_chmod.c deleted file mode 100644 index 5181a26ec4..0000000000 --- a/build/premake/premake5/src/host/os_chmod.c +++ /dev/null @@ -1,46 +0,0 @@ -/** - * \file os_chmod.c - * \brief Change file permissions - * \author Copyright (c) 2014 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#include -#include -#include - -#if PLATFORM_WINDOWS -#include -#endif - -int os_chmod(lua_State* L) -{ - int rv; - char* endPtr; - - const char* path = luaL_checkstring(L, 1); - const char* modeStr = luaL_checkstring(L, 2); - - int mode = (int)strtol(modeStr, &endPtr, 8); - -#if PLATFORM_WINDOWS - /* DOS-mode permissions only support the low word */ - mode = mode & 0x0000ffff; - rv = _chmod(path, mode); -#else - rv = chmod(path, mode); -#endif - - if (rv != 0) - { - lua_pushnil(L); - lua_pushfstring(L, "unable to set mode %o on '%s', errno %d : %s", mode, path, errno, strerror(errno)); - return 2; - } - else - { - lua_pushboolean(L, 1); - return 1; - } -} diff --git a/build/premake/premake5/src/host/os_comparefiles.c b/build/premake/premake5/src/host/os_comparefiles.c deleted file mode 100644 index 9f95f3ac74..0000000000 --- a/build/premake/premake5/src/host/os_comparefiles.c +++ /dev/null @@ -1,132 +0,0 @@ -/** - * \file os_comparefiles.c - * \brief Check if two files are identical. - * \author Copyright (c) 2015 Jérôme "Lynix" Leclercq and the Premake project - */ - -#include -#include -#include -#include "premake.h" - -int os_comparefiles(lua_State* L) -{ - FILE* firstFile; - FILE* secondFile; - size_t firstSize; - size_t secondSize; - size_t count; - size_t read; - char firstBuffer[4096]; - char secondBuffer[4096]; - const char* firstPath = luaL_checkstring(L, 1); - const char* secondPath = luaL_checkstring(L, 2); - - #if PLATFORM_WINDOWS - wchar_t wide_firstPath[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, firstPath, -1, wide_firstPath, PATH_MAX) == 0) - { - lua_pushnil(L); - lua_pushstring(L, "unable to encode first path"); - return 2; - } - - wchar_t wide_secondPath[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, secondPath, -1, wide_secondPath, PATH_MAX) == 0) - { - lua_pushnil(L); - lua_pushstring(L, "unable to encode second path"); - return 2; - } - - firstFile = _wfopen(wide_firstPath, L"rb"); - secondFile = _wfopen(wide_secondPath, L"rb"); - #else - firstFile = fopen(firstPath, "rb"); - secondFile = fopen(secondPath, "rb"); - #endif - - if (!firstFile) - { - if (secondFile) - fclose(secondFile); - - lua_pushnil(L); - lua_pushstring(L, "failed to open first file"); - return 2; - } - - - if (!secondFile) - { - fclose(firstFile); - - lua_pushnil(L); - lua_pushstring(L, "failed to open second file"); - return 2; - } - - // check sizes. - fseek(firstFile, 0, SEEK_END); - firstSize = ftell(firstFile); - fseek(firstFile, 0, SEEK_SET); - - fseek(secondFile, 0, SEEK_END); - secondSize = ftell(secondFile); - fseek(secondFile, 0, SEEK_SET); - - if (firstSize != secondSize) - { - fclose(firstFile); - fclose(secondFile); - - lua_pushboolean(L, 0); - return 1; - } - - // compare file content - while (firstSize > 0) - { - count = firstSize > 4096 ? 4096 : firstSize; - - read = fread(firstBuffer, 1, count, firstFile); - if (read != count) - { - fclose(firstFile); - fclose(secondFile); - - lua_pushnil(L); - lua_pushstring(L, "failed to read first file content"); - return 2; - } - - read = fread(secondBuffer, 1, count, secondFile); - if (read != count) - { - fclose(firstFile); - fclose(secondFile); - - lua_pushnil(L); - lua_pushstring(L, "failed to read second file content"); - return 2; - } - - if (memcmp(firstBuffer, secondBuffer, count) != 0) - { - fclose(firstFile); - fclose(secondFile); - - lua_pushboolean(L, 0); - return 1; - } - - firstSize -= count; - } - - // File content match - fclose(firstFile); - fclose(secondFile); - - lua_pushboolean(L, 1); - return 1; -} diff --git a/build/premake/premake5/src/host/os_compile.c b/build/premake/premake5/src/host/os_compile.c deleted file mode 100644 index d35690c81b..0000000000 --- a/build/premake/premake5/src/host/os_compile.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - * \file os_compile.c - * \brief Compile lua source. - * \author Copyright (c) 2002-2012 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include "lundump.h" -#include "lstate.h" - -extern int original_luaL_loadfilex(lua_State* L, const char* filename, const char* mode); - -static int writer(lua_State* L, const void* p, size_t size, void* u) -{ - UNUSED(L); - return (fwrite(p, size, 1, (FILE*)u) != 1) && (size != 0); -} - -int os_compile(lua_State* L) -{ - const char* input = luaL_checkstring(L, 1); - const char* output = luaL_checkstring(L, 2); - lua_State* P = luaL_newstate(); - - if (original_luaL_loadfilex(P, input, NULL) != LUA_OK) - { - const char* msg = lua_tostring(P, -1); - if (msg == NULL) - msg = "(error with no message)"; - - lua_pushnil(L); - lua_pushfstring(L, "Unable to compile '%s': %s", input, msg); - - lua_close(P); - return 2; - } - else - { - FILE* outputFile = (output == NULL) ? stdout : fopen(output, "wb"); - if (outputFile == NULL) - { - lua_close(P); - - lua_pushnil(L); - lua_pushfstring(L, "unable to write to '%s'", output); - return 2; - } - - lua_dump(P, writer, outputFile, FALSE); - fclose(outputFile); - - lua_close(P); - lua_pushboolean(L, 1); - return 1; - } -} diff --git a/build/premake/premake5/src/host/os_copyfile.c b/build/premake/premake5/src/host/os_copyfile.c deleted file mode 100644 index f641ff9719..0000000000 --- a/build/premake/premake5/src/host/os_copyfile.c +++ /dev/null @@ -1,60 +0,0 @@ -/** - * \file os_copyfile.c - * \brief Copy a file from one location to another. - * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project - */ - -#include -#include "premake.h" - -int os_copyfile(lua_State* L) -{ - int z; - const char* src = luaL_checkstring(L, 1); - const char* dst = luaL_checkstring(L, 2); - -#if PLATFORM_WINDOWS - wchar_t wide_src[PATH_MAX]; - wchar_t wide_dst[PATH_MAX]; - - if (MultiByteToWideChar(CP_UTF8, 0, src, -1, wide_src, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode source path"); - return lua_error(L); - } - - if (MultiByteToWideChar(CP_UTF8, 0, dst, -1, wide_dst, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode source path"); - return lua_error(L); - } - - z = CopyFileW(wide_src, wide_dst, FALSE); -#else - lua_pushfstring(L, "cp \"%s\" \"%s\"", src, dst); - z = (system(lua_tostring(L, -1)) == 0); -#endif - - if (!z) - { - lua_pushnil(L); -#if PLATFORM_WINDOWS - wchar_t buf[256]; - FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 256, NULL); - - char bufA[256]; - WideCharToMultiByte(CP_UTF8, 0, buf, 256, bufA, 256, 0, 0); - - lua_pushfstring(L, "unable to copy file to '%s', reason: '%s'", dst, bufA); -#else - lua_pushfstring(L, "unable to copy file to '%s'", dst); -#endif - return 2; - } - else - { - lua_pushboolean(L, 1); - return 1; - } -} diff --git a/build/premake/premake5/src/host/os_getWindowsRegistry.c b/build/premake/premake5/src/host/os_getWindowsRegistry.c deleted file mode 100644 index 949f7b8f51..0000000000 --- a/build/premake/premake5/src/host/os_getWindowsRegistry.c +++ /dev/null @@ -1,144 +0,0 @@ -/** - * \file os_reg.c - * \brief Returns true if the given file exists on the file system. - * \author Copyright (c) 2002-2016 Jason Perkins and the Premake project - */ - -#include "premake.h" - -#if PLATFORM_WINDOWS - -typedef struct RegKeyInfo -{ - HKEY key; - HKEY subkey; - char * value; -} RegKeyInfo; - -HKEY getRegistryKey(const char **path) -{ - if (_strnicmp(*path, "HKCU:", 5) == 0) { - *path += 5; - return HKEY_CURRENT_USER; - } - if (_strnicmp(*path, "HKLM:", 5) == 0) { - *path += 5; - return HKEY_LOCAL_MACHINE; - } - if (_strnicmp(*path, "HKCR:", 5) == 0) { - *path += 5; - return HKEY_CLASSES_ROOT; - } - if (_strnicmp(*path, "HKU:", 4) == 0) { - *path += 4; - return HKEY_USERS; - } - if (_strnicmp(*path, "HKCC:", 5) == 0) { - *path += 5; - return HKEY_CURRENT_CONFIG; - } - - // unsupported or invalid key prefix - return NULL; -} - -static HKEY getSubkey(HKEY key, const char **path) -{ - HKEY subkey; - size_t length; - char *subpath; - const char *value; - char hasValue; - - if (key == NULL) - return NULL; - - // skip the initial path separator - if ((*path)[0] == '\\') - (*path)++; - - // make a copy of the subkey path that excludes the value name (if present) - value = strrchr(*path, '\\'); - hasValue = value ? value[1] : 0; - if (hasValue) { - length = (size_t)(value - *path); - subpath = (char *)malloc(length + 1); - strncpy(subpath, *path, length); - subpath[length] = 0; - } - // no value separator means we should check the default value - else { - subpath = (char *)*path; - length = strlen(subpath); - } - - // open the key for reading - if (RegOpenKeyExA(key, subpath, 0, KEY_READ, &subkey) != ERROR_SUCCESS) - subkey = NULL; - - // free the subpath if one was allocated - if (hasValue) - free(subpath); - - *path += length; - return subkey; -} - -static char * getValue(HKEY key, const char * name) -{ - DWORD length; - char * value; - - if (key == NULL || name == NULL) - return NULL; - - // skip the initial path separator - if (name[0] == '\\') - name++; - - // query length of value - if (RegQueryValueExA(key, name, NULL, NULL, NULL, &length) != ERROR_SUCCESS) - return NULL; - - // allocate room for the value and fetch it - value = (char *)malloc((size_t)length + 1); - if (RegQueryValueExA(key, name, NULL, NULL, (LPBYTE)value, &length) != ERROR_SUCCESS) { - free(value); - return NULL; - } - - value[length] = 0; - return value; -} - -static void fetchKeyInfo(struct RegKeyInfo *info, const char *path) -{ - info->key = getRegistryKey(&path); - info->subkey = getSubkey(info->key, &path); - info->value = getValue(info->subkey, path); -} - -static void releaseKeyInfo(struct RegKeyInfo *info) -{ - free(info->value); - RegCloseKey(info->subkey); -} - -int os_getWindowsRegistry(lua_State *L) -{ - RegKeyInfo info; - fetchKeyInfo(&info, luaL_checkstring(L, 1)); - lua_pushstring(L, info.value); - releaseKeyInfo(&info); - return 1; -} - -#else - -int os_getWindowsRegistry(lua_State *L) -{ - lua_pushnil(L); - return 1; -} - -#endif diff --git a/build/premake/premake5/src/host/os_getcwd.c b/build/premake/premake5/src/host/os_getcwd.c deleted file mode 100644 index c8bc7d4f90..0000000000 --- a/build/premake/premake5/src/host/os_getcwd.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - * \file os_getcwd.c - * \brief Retrieve the current working directory. - * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project - */ - -#include "premake.h" - -int os_getcwd(lua_State* L) -{ - char buffer[0x4000]; - if (do_getcwd(buffer, 0x4000)) { - lua_pushstring(L, buffer); - return 1; - } - else { - return 0; - } -} - - -int do_getcwd(char* buffer, size_t size) -{ - int result; - -#if PLATFORM_WINDOWS - wchar_t wbuffer[PATH_MAX]; - - result = (GetCurrentDirectoryW(PATH_MAX, wbuffer) != 0); - if (result) { - WideCharToMultiByte(CP_UTF8, 0, wbuffer, -1, buffer, (int)size, NULL, NULL); - - do_translate(buffer, '/'); - } -#else - result = (getcwd(buffer, size) != 0); -#endif - - return result; -} diff --git a/build/premake/premake5/src/host/os_getpass.c b/build/premake/premake5/src/host/os_getpass.c deleted file mode 100644 index 6a27f9faa4..0000000000 --- a/build/premake/premake5/src/host/os_getpass.c +++ /dev/null @@ -1,38 +0,0 @@ -/** - * \file os_getpass.c - * \brief Prompt and retrieve a password from the user. - * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project - */ - -#include "premake.h" - - -int os_getpass(lua_State* L) -{ - const char* prompt = luaL_checkstring(L, 1); - - #if PLATFORM_WINDOWS - HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE); - HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE); - DWORD read_chars, mode, written_chars; - char buffer[1024]; - const char* newline = "\n"; - - WriteConsoleA(hstdout, prompt, (DWORD)strlen(prompt), &written_chars, NULL); - - GetConsoleMode(hstdin, &mode); - SetConsoleMode(hstdin, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); - ReadConsoleA(hstdin, buffer, sizeof (buffer), &read_chars, NULL); - SetConsoleMode(hstdin, mode); - - WriteConsoleA(hstdout, newline, (DWORD)strlen(newline), &written_chars, NULL); - - buffer[strcspn(buffer, "\r\n")] = '\0'; - - lua_pushstring(L, buffer); - return 1; - #else - lua_pushstring(L, getpass(prompt)); - return 1; - #endif -} diff --git a/build/premake/premake5/src/host/os_getversion.c b/build/premake/premake5/src/host/os_getversion.c deleted file mode 100644 index 9d3a1f6a56..0000000000 --- a/build/premake/premake5/src/host/os_getversion.c +++ /dev/null @@ -1,253 +0,0 @@ -/** - * \file os_getversioninfo.c - * \brief Retrieve operating system version information. - * \author Copyright (c) 2011-2012 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include - -struct OsVersionInfo -{ - int majorversion; - int minorversion; - int revision; - const char* description; - int isalloc; -}; - -static int getversion(struct OsVersionInfo* info); - -int os_getversion(lua_State* L) -{ - struct OsVersionInfo info = {0, 0, 0, NULL, 0}; - if (!getversion(&info)) - { - return 0; - } - - lua_newtable(L); - - lua_pushstring(L, "majorversion"); - lua_pushnumber(L, (lua_Number)info.majorversion); - lua_settable(L, -3); - - lua_pushstring(L, "minorversion"); - lua_pushnumber(L, (lua_Number)info.minorversion); - lua_settable(L, -3); - - lua_pushstring(L, "revision"); - lua_pushnumber(L, (lua_Number)info.revision); - lua_settable(L, -3); - - lua_pushstring(L, "description"); - lua_pushstring(L, info.description); - lua_settable(L, -3); - - if (info.isalloc) { - free((void*)info.description); - } - - return 1; -} - -/*************************************************************/ - -#if defined(PLATFORM_WINDOWS) - -#pragma comment(lib, "version.lib") - -int getKernelVersion(struct OsVersionInfo* info) -{ - DWORD size = GetFileVersionInfoSizeA("kernel32.dll", NULL); - if (size > 0) - { - void* data = malloc(size); - if (GetFileVersionInfoA("kernel32.dll", 0, size, data)) - { - void* fixedInfoPtr; - UINT fixedInfoSize; - if (VerQueryValueA(data, "\\", &fixedInfoPtr, &fixedInfoSize)) - { - VS_FIXEDFILEINFO* fileInfo = (VS_FIXEDFILEINFO*)fixedInfoPtr; - info->majorversion = HIWORD(fileInfo->dwProductVersionMS); - info->minorversion = LOWORD(fileInfo->dwProductVersionMS); - info->revision = HIWORD(fileInfo->dwProductVersionLS); - return TRUE; - } - } - } - return FALSE; -} - -int getversion(struct OsVersionInfo* info) -{ - HKEY key; - info->description = "Windows"; - - // First get a friendly product name from the registry. - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, &key) == ERROR_SUCCESS) - { - char value[512]; - DWORD value_length = sizeof(value); - DWORD type; - RegQueryValueExA(key, "productName", NULL, &type, (LPBYTE)value, &value_length); - RegCloseKey(key); - if (type == REG_SZ) - { - info->description = strdup(value); - info->isalloc = 1; - } - } - - // See if we can get a product version number from kernel32.dll - return getKernelVersion(info); -} - -/*************************************************************/ - -#elif defined(PLATFORM_MACOSX) - -#include -#include -#include -#include - -int getversion(struct OsVersionInfo* info) -{ - info->description = "Mac OS"; - - int mib[] = { CTL_KERN, KERN_OSRELEASE }; - size_t len; - sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &len, NULL, 0); - - char kernel_version[len]; - sysctl(mib, sizeof(mib) / sizeof(mib[0]), kernel_version, &len, NULL, 0); - - int kern_major; - int kern_minor; - sscanf(kernel_version, "%d.%d.%*d", &kern_major, &kern_minor); - switch (kern_major) - { - case 8: - info->description = "Mac OS X Tiger"; - info->majorversion = 10; - info->minorversion = 4; - info->revision = kern_minor; - break; - case 9: - info->description = "Mac OS X Leopard"; - info->majorversion = 10; - info->minorversion = 5; - info->revision = kern_minor; - break; - case 10: - info->description = "Mac OS X Snow Leopard"; - info->majorversion = 10; - info->minorversion = 6; - info->revision = kern_minor; - break; - case 11: - info->description = "OS X Lion"; - info->majorversion = 10; - info->minorversion = 7; - info->revision = kern_minor; - break; - case 12: - info->description = "OS X Mountain Lion"; - info->majorversion = 10; - info->minorversion = 8; - info->revision = kern_minor; - break; - case 13: - info->description = "OS X Mavericks"; - info->majorversion = 10; - info->minorversion = 9; - info->revision = kern_minor; - break; - case 14: - info->description = "OS X Yosemite"; - info->majorversion = 10; - info->minorversion = 10; - info->revision = kern_minor; - break; - case 15: - info->description = "OS X El Capitan"; - info->majorversion = 10; - info->minorversion = 11; - info->revision = kern_minor; - break; - case 16: - info->description = "macOS Sierra"; - info->majorversion = 10; - info->minorversion = 12; - info->revision = kern_minor; - break; - default: - break; - } - - return 1; -} - - -/*************************************************************/ - -#elif defined(PLATFORM_BSD) || defined(PLATFORM_LINUX) || defined(PLATFORM_SOLARIS) || defined(PLATFORM_HURD) || defined(PLATFORM_HAIKU) - -#include -#include - -int getversion(struct OsVersionInfo* info) -{ - struct utsname u; - char* ver; - - info->majorversion = 0; - info->minorversion = 0; - info->revision = 0; - - if (uname(&u)) - { - // error - info->description = PLATFORM_STRING; - return 0; - } - -#if __GLIBC__ - // When using glibc, info->description gets set to u.sysname, - // but it isn't passed out of this function, so we need to copy - // the string. - info->description = malloc(strlen(u.sysname) + 1); - strcpy((char*)info->description, u.sysname); - info->isalloc = 1; -#else - info->description = u.sysname; -#endif - - if ((ver = strtok(u.release, ".-")) != NULL) - { - info->majorversion = atoi(ver); - // continue parsing from the previous position - if ((ver = strtok(NULL, ".-")) != NULL) - { - info->minorversion = atoi(ver); - if ((ver = strtok(NULL, ".-")) != NULL) - info->revision = atoi(ver); - } - } - - return 1; -} - -/*************************************************************/ - -#else - -int getversion(struct OsVersionInfo* info) -{ - return 0; -} - -#endif - diff --git a/build/premake/premake5/src/host/os_host.c b/build/premake/premake5/src/host/os_host.c deleted file mode 100644 index 085a44c230..0000000000 --- a/build/premake/premake5/src/host/os_host.c +++ /dev/null @@ -1,13 +0,0 @@ -/** - * \file os_host.c - * \brief Get the current host OS we're executing on. - * \author Copyright (c) 2014-2017 Tom van Dijck, Jason Perkins and the Premake project - */ - -#include "premake.h" - -int os_host(lua_State* L) -{ - lua_pushstring(L, PLATFORM_STRING); - return 1; -} diff --git a/build/premake/premake5/src/host/os_is64bit.c b/build/premake/premake5/src/host/os_is64bit.c deleted file mode 100644 index 313475123b..0000000000 --- a/build/premake/premake5/src/host/os_is64bit.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - * \file os_is64bit.c - * \brief Native code-side checking for a 64-bit architecture. - * \author Copyright (c) 2011 Jason Perkins and the Premake project - */ - -#include "premake.h" - -int os_is64bit(lua_State* L) -{ - // If this code returns true, then the platform is 64-bit. If it - // returns false, the platform might still be 64-bit, but more - // checking will need to be done on the Lua side of things. -#if PLATFORM_WINDOWS - typedef BOOL (WINAPI* WowFuncSig)(HANDLE, PBOOL); - WowFuncSig func = (WowFuncSig)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process"); - if (func) - { - BOOL isWow = FALSE; - if (func(GetCurrentProcess(), &isWow)) - { - lua_pushboolean(L, isWow); - return 1; - } - } -#endif - - lua_pushboolean(L, 0); - return 1; -} diff --git a/build/premake/premake5/src/host/os_isdir.c b/build/premake/premake5/src/host/os_isdir.c deleted file mode 100644 index b3e2ccdd37..0000000000 --- a/build/premake/premake5/src/host/os_isdir.c +++ /dev/null @@ -1,56 +0,0 @@ -/** - * \file os_isdir.c - * \brief Returns true if the specified directory exists. - * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project - */ - -#include -#include -#include "premake.h" - -#ifdef _WIN32 -#include -#endif - -int os_isdir(lua_State* L) -{ - struct stat buf; - const char* path = luaL_checkstring(L, 1); -#ifdef _WIN32 - int attr; - - wchar_t wide_path[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, path, -1, wide_path, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode path"); - return lua_error(L); - } -#endif - - /* empty path is equivalent to ".", must be true */ - if (strlen(path) == 0) - { - lua_pushboolean(L, 1); - } -#ifdef _WIN32 - // Use Windows-specific GetFileAttributes since it deals with symbolic links. - else if ((attr = GetFileAttributesW(wide_path)) != INVALID_FILE_ATTRIBUTES) - { - int isdir = (attr & FILE_ATTRIBUTE_DIRECTORY) != 0; - lua_pushboolean(L, isdir); - } -#endif - else if (stat(path, &buf) == 0) - { - int isdir = (buf.st_mode & S_IFDIR) != 0; - lua_pushboolean(L, isdir); - } - else - { - lua_pushboolean(L, 0); - } - - return 1; -} - - diff --git a/build/premake/premake5/src/host/os_isfile.c b/build/premake/premake5/src/host/os_isfile.c deleted file mode 100644 index c2a1076814..0000000000 --- a/build/premake/premake5/src/host/os_isfile.c +++ /dev/null @@ -1,48 +0,0 @@ -/** - * \file os_isfile.c - * \brief Returns true if the given file exists on the file system. - * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project - */ - -#include -#include "premake.h" - - -int os_isfile(lua_State* L) -{ - const char* filename = luaL_checkstring(L, 1); - lua_pushboolean(L, do_isfile(L, filename)); - return 1; -} - - -int do_isfile(lua_State* L, const char* filename) -{ -#if PLATFORM_WINDOWS - wchar_t wide_path[PATH_MAX]; - DWORD attrib; - - if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, wide_path, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode filepath"); - return lua_error(L); - } - - attrib = GetFileAttributesW(wide_path); - if (attrib != INVALID_FILE_ATTRIBUTES) - { - return (attrib & FILE_ATTRIBUTE_DIRECTORY) == 0; - } -#else - struct stat buf; - - (void)(L); /* warning: unused parameter */ - - if (stat(filename, &buf) == 0) - { - return ((buf.st_mode & S_IFDIR) == 0); - } -#endif - - return 0; -} diff --git a/build/premake/premake5/src/host/os_islink.c b/build/premake/premake5/src/host/os_islink.c deleted file mode 100644 index ee3a208936..0000000000 --- a/build/premake/premake5/src/host/os_islink.c +++ /dev/null @@ -1,43 +0,0 @@ -/** - * \file os_islink.c - * \brief Returns true if the given path is a symbolic link or reparse point. - * \author Copyright (c) 2014 Jason Perkins and the Premake project - */ - -#include -#include "premake.h" - - -int os_islink(lua_State* L) -{ - const char* path = luaL_checkstring(L, 1); - -#if PLATFORM_WINDOWS - { - wchar_t wide_path[PATH_MAX]; - DWORD attr; - if (MultiByteToWideChar(CP_UTF8, 0, path, -1, wide_path, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode path"); - return lua_error(L); - } - - attr = GetFileAttributesW(wide_path); - if (attr != INVALID_FILE_ATTRIBUTES) { - lua_pushboolean(L, (attr & FILE_ATTRIBUTE_REPARSE_POINT) != 0); - return 1; - } - } -#else - { - struct stat buf; - if (lstat(path, &buf) == 0) { - lua_pushboolean(L, S_ISLNK(buf.st_mode)); - return 1; - } - } -#endif - - lua_pushboolean(L, 0); - return 1; -} diff --git a/build/premake/premake5/src/host/os_listWindowsRegistry.c b/build/premake/premake5/src/host/os_listWindowsRegistry.c deleted file mode 100644 index f2f14be282..0000000000 --- a/build/premake/premake5/src/host/os_listWindowsRegistry.c +++ /dev/null @@ -1,252 +0,0 @@ -/** - * \file os_reg.c - * \brief Returns true if the given file exists on the file system. - * \author Copyright (c) 2002-2016 Jason Perkins and the Premake project - */ - -#include "premake.h" - -#if PLATFORM_WINDOWS - -typedef struct RegNodeInfo -{ - const char * name; - const char * value; - DWORD valueSize; - DWORD type; -} RegNodeInfo; - -typedef void (*ListCallback)(const RegNodeInfo * info, void * user); -extern HKEY getRegistryKey(const char** path); - -static const char* getTypeString(DWORD type) -{ - switch (type) - { - case REG_NONE: return "REG_NONE"; - case REG_SZ: return "REG_SZ"; - case REG_EXPAND_SZ: return "REG_EXPAND_SZ"; - case REG_BINARY: return "REG_BINARY"; - case REG_DWORD: return "REG_DWORD"; - case REG_DWORD_BIG_ENDIAN: return "REG_DWORD_BIG_ENDIAN"; - case REG_LINK: return "REG_LINK"; - case REG_MULTI_SZ: return "REG_MULTI_SZ"; - case REG_RESOURCE_LIST: return "REG_RESOURCE_LIST"; - case REG_FULL_RESOURCE_DESCRIPTOR: return "REG_FULL_RESOURCE_DESCRIPTOR"; - case REG_RESOURCE_REQUIREMENTS_LIST: return "REG_RESOURCE_REQUIREMENTS_LIST"; - case REG_QWORD: return "REG_QWORD"; - default: return NULL; - } -} - -static HKEY openKey(const char *path) -{ - HKEY key, subkey; - - // check string - if (path == NULL) - return NULL; - - // get HKEY - key = getRegistryKey(&path); - if (key == NULL) - return NULL; - - // skip the initial path separator - if (path[0] == '\\') - path++; - - // open the key for reading - if (RegOpenKeyExA(key, path, 0, KEY_READ, &subkey) != ERROR_SUCCESS) - subkey = NULL; - - return subkey; -} - -static int listNodes(HKEY key, ListCallback callback, void * user) -{ - RegNodeInfo node; - DWORD maxSubkeyLength; - DWORD maxValueLength; - DWORD maxNameLength; - DWORD numSubkeys; - DWORD numValues; - DWORD length; - DWORD index; - char* name; - char* value; - int ok; - - if (key == NULL || callback == NULL) - return 0; - - // Initialize node structure - node.value = NULL; - node.valueSize = 0; - node.type = REG_NONE; - - // Fetch info about key content - if (RegQueryInfoKeyA(key, NULL, NULL, NULL, &numSubkeys, &maxSubkeyLength, NULL, &numValues, &maxNameLength, &maxValueLength, NULL, NULL) != ERROR_SUCCESS) - return 0; - - // Allocate name and value buffers - if (maxSubkeyLength > maxNameLength) - maxNameLength = maxSubkeyLength; - - maxNameLength++; - maxValueLength++; - name = (char*)malloc((size_t)maxNameLength); - value = (char*)malloc((size_t)maxValueLength + 1); - - // Iterate over subkeys - ok = 1; - node.name = name; - for (index = 0; index < numSubkeys; index++) { - length = maxNameLength; - if (RegEnumKeyExA(key, index, name, &length, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) { - ok = 0; - break; - } - callback(&node, user); - } - - // Iterate over values - if (ok) { - node.value = value; - for (index = 0; index < numValues; index++) { - length = maxNameLength; - node.valueSize = maxValueLength; - if (RegEnumValueA(key, index, name, &length, NULL, &node.type, (LPBYTE)value, &node.valueSize) != ERROR_SUCCESS) { - ok = 0; - break; - } - - // Ensure proper termination of strings (two terminators for the REG_MULTI_SZ) - value[node.valueSize] = '\0'; - value[node.valueSize + 1] = '\0'; - callback(&node, user); - } - } - - // Free buffers - free(name); - free(value); - - return ok; -} - -static void listCallback(const RegNodeInfo* info, void* user) -{ - lua_State* L = (lua_State*)user; - const char* typeString; - - // Insert key into the result table (keys are represented as empty tables) - if (info->value == NULL) { - lua_createtable(L, 0, 0); - lua_setfield(L, -2, info->name); - return; - } - - // Values are represented as tables containing "type" and "value" records - typeString = getTypeString(info->type); - lua_createtable(L, 0, 2); - lua_pushstring(L, typeString ? typeString : "Unknown"); - lua_setfield(L, -2, "type"); - - switch (info->type) - { - // Binary encoded values -> size defined string - case REG_NONE: - case REG_BINARY: - case REG_RESOURCE_LIST: - case REG_FULL_RESOURCE_DESCRIPTOR: - case REG_RESOURCE_REQUIREMENTS_LIST: { - lua_pushlstring(L, info->value, info->valueSize); - break; - } - - // String encoded values -> zero terminated string - case REG_SZ: - case REG_EXPAND_SZ: - case REG_LINK: { - lua_pushstring(L, info->value); - break; - } - - // Numbers - case REG_DWORD: { - lua_pushinteger(L, *(DWORD32*)info->value); - break; - } - - case REG_DWORD_BIG_ENDIAN: { - lua_pushinteger(L, (info->value[3] << 0) | (info->value[2] << 8) | (info->value[1] << 16) | (info->value[0] << 24)); - break; - } - - case REG_QWORD: { - lua_pushinteger(L, *(DWORD64*)info->value); - break; - } - - // Multiple strings - case REG_MULTI_SZ: { - DWORD i, j, k; - - lua_newtable(L); - for (i = j = 0, k = 1; i < info->valueSize; i++) - { - if (info->value[i] != 0) - continue; - - if (i == j) - break; - - lua_pushlstring(L, &info->value[j], i - j); - lua_rawseti(L, -2, k); - j = i + 1; - k++; - } - break; - } - - // Unknown field -> nil - default: { - lua_pushnil(L); - break; - } - } - lua_setfield(L, -2, "value"); - - // Complete the value subtable - lua_setfield(L, -2, info->name); -} - -int os_listWindowsRegistry(lua_State* L) -{ - HKEY key = openKey(luaL_checkstring(L, 1)); - if (key == NULL) { - lua_pushnil(L); - return 1; - } - - lua_newtable(L); - if (!listNodes(key, listCallback, (void *)L)) { - // Discard table in case of fault and push nil instead - lua_pop(L, 1); - lua_pushnil(L); - } - - RegCloseKey(key); - return 1; -} - -#else - -int os_listWindowsRegistry(lua_State* L) -{ - lua_pushnil(L); - return 1; -} - -#endif diff --git a/build/premake/premake5/src/host/os_locate.c b/build/premake/premake5/src/host/os_locate.c deleted file mode 100644 index b72b1576dd..0000000000 --- a/build/premake/premake5/src/host/os_locate.c +++ /dev/null @@ -1,62 +0,0 @@ -/** - * \file os_locate.c - * \brief Locates files along the standard built-in search paths. - * \author Copyright (c) 2014-2015 Jason Perkins and the Premake project - */ - -#include -#include "premake.h" - - -int do_locate(lua_State* L, const char* filename, const char* path) -{ - if (do_pathsearch(L, filename, path)) { - lua_pushstring(L, "/"); - lua_pushstring(L, filename); - lua_concat(L, 3); - return 1; - } - - return 0; -} - - - -int os_locate(lua_State* L) -{ - const char* path; - int i; - int nArgs = lua_gettop(L); - - /* Fetch premake.path */ - lua_getglobal(L, "premake"); - lua_getfield(L, -1, "path"); - path = lua_tostring(L, -1); - - for (i = 1; i <= nArgs; ++i) { - const char* name = lua_tostring(L, i); - - /* Direct path to file? Return as absolute path */ - if (do_isfile(L, name)) { - lua_pushcfunction(L, path_getabsolute); - lua_pushvalue(L, i); - lua_call(L, 1, 1); - return 1; - } - - /* do_locate(arg[i], premake.path) */ - if (do_locate(L, name, path)) { - return 1; - } - - /* embedded in the executable? */ - if (premake_find_embedded_script(name)) { - lua_pushstring(L, "$/"); - lua_pushvalue(L, i); - lua_concat(L, 2); - return 1; - } - } - - return 0; -} diff --git a/build/premake/premake5/src/host/os_match.c b/build/premake/premake5/src/host/os_match.c deleted file mode 100644 index c07a10627a..0000000000 --- a/build/premake/premake5/src/host/os_match.c +++ /dev/null @@ -1,206 +0,0 @@ -/** - * \file os_match.c - * \brief Match files and directories. - * \author Copyright (c) 2002-2014 Jason Perkins and the Premake project - */ - -#include -#include -#include "premake.h" - - -#if PLATFORM_WINDOWS - -typedef struct struct_MatchInfo -{ - HANDLE handle; - int is_first; - WIN32_FIND_DATAW entry; -} MatchInfo; - -int os_matchstart(lua_State* L) -{ - const char* mask = luaL_checkstring(L, 1); - MatchInfo* m; - - wchar_t wide_mask[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, mask, -1, wide_mask, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode mask"); - return lua_error(L); - } - - m = (MatchInfo*)malloc(sizeof(MatchInfo)); - - m->handle = FindFirstFileW(wide_mask, &m->entry); - m->is_first = 1; - lua_pushlightuserdata(L, m); - return 1; -} - -int os_matchdone(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - if (m->handle != INVALID_HANDLE_VALUE) - FindClose(m->handle); - free(m); - return 0; -} - -int os_matchname(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - - char filename[PATH_MAX]; - if (WideCharToMultiByte(CP_UTF8, 0, m->entry.cFileName, -1, filename, PATH_MAX, NULL, NULL) == 0) - { - lua_pushstring(L, "unable to decode filename"); - return lua_error(L); - } - - lua_pushstring(L, filename); - return 1; -} - -int os_matchisfile(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - lua_pushboolean(L, (m->entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0); - return 1; -} - -int os_matchnext(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - if (m->handle == INVALID_HANDLE_VALUE) { - return 0; - } - - while (m) /* loop forever */ - { - if (m->is_first) - m->is_first = 0; - else - { - if (!FindNextFileW(m->handle, &m->entry)) - return 0; - } - - if (wcscmp(m->entry.cFileName, L".") != 0 && wcscmp(m->entry.cFileName, L"..") != 0) - { - lua_pushboolean(L, 1); - return 1; - } - } - - return 0; -} - -#else - -#include -#include -#include - -typedef struct struct_MatchInfo -{ - DIR* handle; - struct dirent* entry; - char* path; - char* mask; -} MatchInfo; - -int os_matchstart(lua_State* L) -{ - const char* split; - const char* mask = luaL_checkstring(L, 1); - MatchInfo* m = (MatchInfo*)malloc(sizeof(MatchInfo)); - - /* split the mask into path and filename components */ - split = strrchr(mask, '/'); - if (split) - { - m->path = (char*)malloc(split - mask + 1); - strncpy(m->path, mask, split - mask); - m->path[split - mask] = '\0'; - m->mask = (char*)malloc(mask + strlen(mask) - split); - strcpy(m->mask, split + 1); - } - else - { - m->path = (char*)malloc(2); - strcpy(m->path, "."); - m->mask = (char*)malloc(strlen(mask)+1); - strcpy(m->mask, mask); - } - - m->handle = opendir(m->path); - lua_pushlightuserdata(L, m); - return 1; -} - -int os_matchdone(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - if (m->handle != NULL) - closedir(m->handle); - free(m->path); - free(m->mask); - free(m); - return 0; -} - -int os_matchname(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - lua_pushstring(L, m->entry->d_name); - return 1; -} - -int os_matchisfile(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); -#if defined(_DIRENT_HAVE_D_TYPE) - if (m->entry->d_type != DT_UNKNOWN) - { - lua_pushboolean(L, (m->entry->d_type == DT_DIR) == 0); - } - else -#endif - { - const char* fname; - lua_pushfstring(L, "%s/%s", m->path, m->entry->d_name); - fname = lua_tostring(L, -1); - lua_pop(L, 1); - - lua_pushboolean(L, do_isfile(L, fname)); - } - return 1; -} - -int os_matchnext(lua_State* L) -{ - MatchInfo* m = (MatchInfo*)lua_touserdata(L, 1); - if (m->handle == NULL) { - return 0; - } - - m->entry = readdir(m->handle); - while (m->entry != NULL) - { - const char* name = m->entry->d_name; - if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) - { - if (fnmatch(m->mask, name, 0) == 0) - { - lua_pushboolean(L, 1); - return 1; - } - } - m->entry = readdir(m->handle); - } - - return 0; -} - -#endif diff --git a/build/premake/premake5/src/host/os_mkdir.c b/build/premake/premake5/src/host/os_mkdir.c deleted file mode 100644 index 44326c092f..0000000000 --- a/build/premake/premake5/src/host/os_mkdir.c +++ /dev/null @@ -1,78 +0,0 @@ -/** - * \file os_mkdir.c - * \brief Create a subdirectory. - * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project - */ - -#include -#include -#include - -#include "premake.h" - -#if PLATFORM_WINDOWS -#include -#include -#endif - -int do_mkdir(const char* path) -{ - struct stat sb; - char sub_path[1024]; - int i, length; - - // if it already exists, return. - if (stat(path, &sb) == 0) - return 1; - - // find the parent folder name. - length = (int)strlen(path); - for (i = length - 1; i >= 0; --i) - { - if (path[i] == '/' || path[i] == '\\') - break; - } - - // if we found one, create it. - if (i > 0) - { - memcpy(sub_path, path, i); - sub_path[i] = '\0'; - -#if PLATFORM_WINDOWS - if (sub_path[i - 1] == ':') - { - sub_path[i + 0] = '/'; - sub_path[i + 1] = '\0'; - } -#endif - - if (!do_mkdir(sub_path)) - return 0; - } - - // now finally create the actual folder we want. -#if PLATFORM_WINDOWS - return _mkdir(path) == 0; -#else - return mkdir(path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == 0; -#endif -} - - -int os_mkdir(lua_State* L) -{ - const char* path = luaL_checkstring(L, 1); - - int z = do_mkdir(path); - if (!z) - { - lua_pushnil(L); - lua_pushfstring(L, "unable to create directory '%s'", path); - return 2; - } - - lua_pushboolean(L, 1); - return 1; -} - diff --git a/build/premake/premake5/src/host/os_pathsearch.c b/build/premake/premake5/src/host/os_pathsearch.c deleted file mode 100644 index 85e49a026e..0000000000 --- a/build/premake/premake5/src/host/os_pathsearch.c +++ /dev/null @@ -1,93 +0,0 @@ -/** - * \file os_pathsearch.c - * \brief Locates a file, given a set of search paths. - * \author Copyright (c) 2002-2015 Jason Perkins and the Premake project - * - * \note This function is required by the bootstrapping code; it must be - * implemented here in the host and not scripted. - */ - -#include -#include "premake.h" - - -int do_pathsearch(lua_State* L, const char* filename, const char* path) -{ - do - { - const char* split; - - /* look for the closest path separator ; or : */ - /* can't use : on windows because it breaks on C:\path */ - const char* semi = strchr(path, ';'); -#if !defined(PLATFORM_WINDOWS) - const char* full = strchr(path, ':'); -#else - const char* full = NULL; -#endif - - if (!semi) - { - split = full; - } - else if (!full) - { - split = semi; - } - else - { - split = (semi < full) ? semi : full; - } - - /* push this piece of the full search string onto the stack */ - if (split) - { - lua_pushlstring(L, path, split - path); - } - else - { - lua_pushstring(L, path); - } - - /* keep an extra copy around, so I can return it if I have a match */ - lua_pushvalue(L, -1); - - /* append the filename to make the full test path */ - lua_pushstring(L, "/"); - lua_pushstring(L, filename); - lua_concat(L, 3); - - /* test it - if it exists, return the absolute path */ - if (do_isfile(L, lua_tostring(L, -1))) - { - lua_pop(L, 1); - lua_pushcfunction(L, path_getabsolute); - lua_pushvalue(L, -2); - lua_call(L, 1, 1); - return 1; - } - - /* no match, set up the next try */ - lua_pop(L, 2); - path = (split) ? split + 1 : NULL; - } - while (path); - - return 0; -} - - - -int os_pathsearch(lua_State* L) -{ - int i; - - const char* filename = luaL_checkstring(L, 1); - for (i = 2; i <= lua_gettop(L); ++i) - { - if (lua_isnil(L, i)) continue; - if (do_pathsearch(L, filename, luaL_checkstring(L, i))) return 1; - } - - return 0; -} diff --git a/build/premake/premake5/src/host/os_realpath.c b/build/premake/premake5/src/host/os_realpath.c deleted file mode 100644 index 475c66f409..0000000000 --- a/build/premake/premake5/src/host/os_realpath.c +++ /dev/null @@ -1,37 +0,0 @@ -/** - * \file os_realpath.c - * \brief Return the canonical absolute version of a given path. - * \author Copyright (c) 2014 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#include -#include - - -int os_realpath(lua_State* L) -{ - char result[PATH_MAX]; - int ok; - - const char* path = luaL_checkstring(L, 1); - -#if PLATFORM_POSIX - ok = (realpath(path, result) != NULL); -#elif PLATFORM_WINDOWS - ok = (_fullpath(result, path, PATH_MAX) != NULL); -#else - do_getabsolute(result, path, NULL); - ok = 1; -#endif - - if (!ok) { - lua_pushnil(L); - lua_pushfstring(L, "unable to fetch real path of '%s', errno %d : %s", path, errno, strerror(errno)); - return 2; - } - - lua_pushstring(L, result); - return 1; -} diff --git a/build/premake/premake5/src/host/os_remove.c b/build/premake/premake5/src/host/os_remove.c deleted file mode 100644 index 66d6e5e1b0..0000000000 --- a/build/premake/premake5/src/host/os_remove.c +++ /dev/null @@ -1,51 +0,0 @@ -/** - * \file os_remove.c - * \brief Remove a file on Windows. - * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project - */ - -#include "premake.h" - -#if PLATFORM_WINDOWS - -int os_remove(lua_State* L) -{ - const char* filename = luaL_checkstring(L, 1); - - wchar_t wide_path[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, wide_path, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode path"); - return lua_error(L); - } - - if (DeleteFileW(wide_path)) - { - lua_pushboolean(L, 1); - return 1; - } - else - { - DWORD err = GetLastError(); - - char unicodeErr[512]; - - LPWSTR messageBuffer = NULL; - if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR) &messageBuffer, 0, NULL) != 0) - { - if (WideCharToMultiByte(CP_UTF8, 0, messageBuffer, -1, unicodeErr, sizeof(unicodeErr), NULL, NULL) == 0) - strcpy(unicodeErr, "failed to translate error message"); - - LocalFree(messageBuffer); - } - else - strcpy(unicodeErr, "failed to get error message"); - - lua_pushnil(L); - lua_pushfstring(L, "%s: %s", filename, unicodeErr); - lua_pushinteger(L, err); - return 3; - } -} - -#endif diff --git a/build/premake/premake5/src/host/os_rename.c b/build/premake/premake5/src/host/os_rename.c deleted file mode 100644 index 06a41055d3..0000000000 --- a/build/premake/premake5/src/host/os_rename.c +++ /dev/null @@ -1,59 +0,0 @@ -/** -* \file os_rename.c -* \brief Rename a path on Windows. -* \author Copyright (c) 2002-2013 Jason Perkins and the Premake project -*/ - -#include "premake.h" - -#if PLATFORM_WINDOWS - -int os_rename(lua_State* L) -{ - const char *fromname = luaL_checkstring(L, 1); - const char *toname = luaL_checkstring(L, 2); - - wchar_t wide_frompath[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, fromname, -1, wide_frompath, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode source path"); - return lua_error(L); - } - - wchar_t wide_topath[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, toname, -1, wide_topath, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode dest path"); - return lua_error(L); - } - - if (MoveFileExW(wide_frompath, wide_topath, MOVEFILE_COPY_ALLOWED)) - { - lua_pushboolean(L, 1); - return 1; - } - else - { - DWORD err = GetLastError(); - - char unicodeErr[512]; - - LPWSTR messageBuffer = NULL; - if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR) &messageBuffer, 0, NULL) != 0) - { - if (WideCharToMultiByte(CP_UTF8, 0, messageBuffer, -1, unicodeErr, sizeof(unicodeErr), NULL, NULL) == 0) - strcpy(unicodeErr, "failed to translate error message"); - - LocalFree(messageBuffer); - } - else - strcpy(unicodeErr, "failed to get error message"); - - lua_pushnil(L); - lua_pushfstring(L, "%s: %s", fromname, unicodeErr); - lua_pushinteger(L, err); - return 3; - } -} - -#endif diff --git a/build/premake/premake5/src/host/os_rmdir.c b/build/premake/premake5/src/host/os_rmdir.c deleted file mode 100644 index 46e65d9daa..0000000000 --- a/build/premake/premake5/src/host/os_rmdir.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - * \file os_rmdir.c - * \brief Remove a subdirectory. - * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project - */ - -#include -#include "premake.h" - - -int os_rmdir(lua_State* L) -{ - int z; - const char* path = luaL_checkstring(L, 1); - -#if PLATFORM_WINDOWS - wchar_t wide_path[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, path, -1, wide_path, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode path"); - return lua_error(L); - } - - z = RemoveDirectoryW(wide_path); -#else - z = (0 == rmdir(path)); -#endif - - if (!z) - { - lua_pushnil(L); - lua_pushfstring(L, "unable to remove directory '%s'", path); - return 2; - } - else - { - lua_pushboolean(L, 1); - return 1; - } -} diff --git a/build/premake/premake5/src/host/os_stat.c b/build/premake/premake5/src/host/os_stat.c deleted file mode 100644 index 7930c0e8b6..0000000000 --- a/build/premake/premake5/src/host/os_stat.c +++ /dev/null @@ -1,60 +0,0 @@ -/** - * \file os_stat.c - * \brief Retrieve information about a file. - * \author Copyright (c) 2011 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#include - -int os_stat(lua_State* L) -{ - const char* filename = luaL_checkstring(L, 1); - -#if PLATFORM_WINDOWS - struct _stat s; - - wchar_t wide_filename[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, wide_filename, PATH_MAX) == 0) - { - lua_pushstring(L, "unable to encode source path"); - return lua_error(L); - } - - if (_wstat(wide_filename, &s) != 0) -#else - struct stat s; - - if (stat(filename, &s) != 0) -#endif - { - lua_pushnil(L); - switch (errno) - { - case EACCES: - lua_pushfstring(L, "'%s' could not be accessed", filename); - break; - case ENOENT: - lua_pushfstring(L, "'%s' was not found", filename); - break; - default: - lua_pushfstring(L, "An unknown error %d occured while accessing '%s'", errno, filename); - break; - } - return 2; - } - - - lua_newtable(L); - - lua_pushstring(L, "mtime"); - lua_pushinteger(L, (lua_Integer)s.st_mtime); - lua_settable(L, -3); - - lua_pushstring(L, "size"); - lua_pushnumber(L, (lua_Number)s.st_size); - lua_settable(L, -3); - - return 1; -} diff --git a/build/premake/premake5/src/host/os_touchfile.c b/build/premake/premake5/src/host/os_touchfile.c deleted file mode 100644 index a3850683a1..0000000000 --- a/build/premake/premake5/src/host/os_touchfile.c +++ /dev/null @@ -1,107 +0,0 @@ -/** - * \file os_touchfile.c - * \brief markes a file as modified without changing its contents. - * \author Blizzard Entertainment (contact tvandijck@blizzard.com) - * \author Copyright (c) 2015 Jason Perkins and the Premake project - */ - -#include -#include -#include -#include "premake.h" - -#if PLATFORM_WINDOWS - #include -#else - #include - #include -#endif - -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - -static int truncate_file(const char* fn) -{ - FILE* file = fopen(fn, "rb"); - size_t size; - file = fopen(fn, "ab"); - if (file == NULL) - { - return FALSE; - } - fseek(file, 0, SEEK_END); - size = ftell(file); - // append a dummy space. There are better ways to do - // a touch, however this is a rather simple - // multiplatform method - if (fwrite(" ", 1, 1, file) != 1) - { - fclose(file); - return FALSE; - } -#if PLATFORM_WINDOWS - if (_chsize(_fileno(file), (long)size) != 0) - { - fclose(file); - return FALSE; - } -#endif - fclose(file); -#if !PLATFORM_WINDOWS - if (truncate(fn, (off_t)size) != 0) - { - return FALSE; - } -#endif - return TRUE; -} - -int os_touchfile(lua_State* L) -{ - FILE* file; - const char* dst = luaL_checkstring(L, 1); - - // if destination exist, mark the file as modified - if (do_isfile(L, dst)) - { - if (truncate_file(dst)) - { - lua_pushinteger(L, 0); - return 1; - } else { - lua_pushinteger(L, -1); - lua_pushfstring(L, "unable to touch file '%s'", dst); - return 2; - } - } - -#if PLATFORM_WINDOWS - wchar_t wide_path[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, dst, -1, wide_path, PATH_MAX) == 0) - { - lua_pushinteger(L, -1); - lua_pushstring(L, "unable to encode path"); - return 2; - } - - file = _wfopen(wide_path, L"wb"); -#else - file = fopen(dst, "wb"); -#endif - - if (file != NULL) - { - fclose(file); - - lua_pushinteger(L, 1); - return 1; - } - - lua_pushinteger(L, -1); - lua_pushfstring(L, "unable to open file to '%s'", dst); - return 2; -} diff --git a/build/premake/premake5/src/host/os_uuid.c b/build/premake/premake5/src/host/os_uuid.c deleted file mode 100644 index 57cd657277..0000000000 --- a/build/premake/premake5/src/host/os_uuid.c +++ /dev/null @@ -1,75 +0,0 @@ -/** - * \file os_uuid.c - * \brief Create a new UUID. - * \author Copyright (c) 2002-2012 Jason Perkins and the Premake project - */ - -#include "premake.h" - -#if PLATFORM_WINDOWS -#include -#endif - - -/* - * Pull off the four lowest bytes of a value and add them to my array, - * without the help of the determinately sized C99 data types that - * are not yet universally supported. - */ -static void add(unsigned char* bytes, int offset, uint32_t value) -{ - int i; - for (i = 0; i < 4; ++i) - { - bytes[offset++] = (unsigned char)(value & 0xff); - value >>= 8; - } -} - - -int os_uuid(lua_State* L) -{ - char uuid[38]; - unsigned char bytes[16]; - - /* If a name argument is supplied, build the UUID from that. For speed we - * are using a simple DBJ2 hashing function; if this isn't sufficient we - * can switch to a full RFC 4122 §4.3 implementation later. */ - const char* name = luaL_optstring(L, 1, NULL); - if (name != NULL) - { - add(bytes, 0, do_hash(name, 0)); - add(bytes, 4, do_hash(name, 'L')); - add(bytes, 8, do_hash(name, 'u')); - add(bytes, 12, do_hash(name, 'a')); - } - - /* If no name is supplied, try to build one properly */ - else - { -#if PLATFORM_WINDOWS - CoCreateGuid((GUID*)bytes); -#else - int result; - - /* not sure how to get a UUID here, so I fake it */ - FILE* rnd = fopen("/dev/urandom", "rb"); - result = fread(bytes, 16, 1, rnd); - fclose(rnd); - if (!result) - { - return 0; - } -#endif - } - - sprintf(uuid, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", - bytes[0], bytes[1], bytes[2], bytes[3], - bytes[4], bytes[5], - bytes[6], bytes[7], - bytes[8], bytes[9], - bytes[10], bytes[11], bytes[12], bytes[13], bytes[14], bytes[15]); - - lua_pushstring(L, uuid); - return 1; -} diff --git a/build/premake/premake5/src/host/os_writefile_ifnotequal.c b/build/premake/premake5/src/host/os_writefile_ifnotequal.c deleted file mode 100644 index 59123fdc01..0000000000 --- a/build/premake/premake5/src/host/os_writefile_ifnotequal.c +++ /dev/null @@ -1,109 +0,0 @@ -/** - * \file os_writefile_ifnotequal.c - * \brief Writes a file only if it differs with its current contents. - * \author Blizzard Entertainment (contact tvandijck@blizzard.com) - * \author Copyright (c) 2015 Jason Perkins and the Premake project - */ - -#include -#include -#include -#include "premake.h" - -static int compare_file(const char* content, size_t length, const char* dst) -{ - FILE* file; - size_t size; - size_t read; - char buffer[4096]; - size_t num; - - #if PLATFORM_WINDOWS - wchar_t wide_path[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, dst, -1, wide_path, PATH_MAX) == 0) - return FALSE; - - file = _wfopen(wide_path, L"rb"); - #else - file = fopen(dst, "rb"); - #endif - - if (file == NULL) - { - return FALSE; - } - - // check sizes. - fseek(file, 0, SEEK_END); - size = ftell(file); - fseek(file, 0, SEEK_SET); - - if (length != size) - { - fclose(file); - return FALSE; - } - - while (size > 0) - { - num = size > 4096 ? 4096 : size; - - read = fread(buffer, 1, num, file); - if (read != num) - { - fclose (file); - return FALSE; - } - - if (memcmp(content, buffer, num) != 0) - { - fclose(file); - return FALSE; - } - - size -= num; - content += num; - } - - fclose(file); - return TRUE; -} - - -int os_writefile_ifnotequal(lua_State* L) -{ - FILE* file; - size_t length; - const char* content = luaL_checklstring(L, 1, &length); - const char* dst = luaL_checkstring(L, 2); - - // if destination exist, and they are the same, no need to copy. - if (do_isfile(L, dst) && compare_file(content, length, dst)) - { - lua_pushinteger(L, 0); - return 1; - } - - #if PLATFORM_WINDOWS - wchar_t wide_path[PATH_MAX]; - if (MultiByteToWideChar(CP_UTF8, 0, dst, -1, wide_path, PATH_MAX) == 0) - return FALSE; - - file = _wfopen(wide_path, L"wb"); - #else - file = fopen(dst, "wb"); - #endif - - if (file != NULL) - { - fwrite(content, 1, length, file); - fclose(file); - - lua_pushinteger(L, 1); - return 1; - } - - lua_pushinteger(L, -1); - lua_pushfstring(L, "unable to write file to '%s'", dst); - return 2; -} diff --git a/build/premake/premake5/src/host/path_getabsolute.c b/build/premake/premake5/src/host/path_getabsolute.c deleted file mode 100644 index 94b67cd706..0000000000 --- a/build/premake/premake5/src/host/path_getabsolute.c +++ /dev/null @@ -1,105 +0,0 @@ -/** - * \file path_getabsolute.c - * \brief Returns an absolute version of a relative path. - * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include - - -void do_getabsolute(char* result, const char* value, const char* relative_to) -{ - int i; - char* ch; - char* prev; - char buffer[0x4000] = { '\0' }; - - /* if the path is not already absolute, base it on working dir */ - if (!do_isabsolute(value)) { - if (relative_to) { - strcpy(buffer, relative_to); - } - else { - do_getcwd(buffer, 0x4000); - } - strcat(buffer, "/"); - } - - /* normalize the path */ - strcat(buffer, value); - do_translate(buffer, '/'); - - /* process it part by part */ - result[0] = '\0'; - if (buffer[0] == '/') { - strcat(result, "/"); - if (buffer[1] == '/') { - strcat(result, "/"); - } - } - - prev = NULL; - ch = strtok(buffer, "/"); - while (ch) { - /* remove ".." where I can */ - if (strcmp(ch, "..") == 0 && (prev == NULL || (prev[0] != '$' && prev[0] != '%' && strcmp(prev, "..") != 0))) { - i = (int)strlen(result) - 2; - while (i >= 0 && result[i] != '/') { - --i; - } - if (i >= 0) { - result[i + 1] = '\0'; - } - ch = NULL; - } - - /* allow everything except "." */ - else if (strcmp(ch, ".") != 0) { - strcat(result, ch); - strcat(result, "/"); - } - - prev = ch; - ch = strtok(NULL, "/"); - } - - /* remove trailing slash */ - i = (int)strlen(result) - 1; - if (result[i] == '/') { - result[i] = '\0'; - } -} - - -int path_getabsolute(lua_State* L) -{ - const char* relative_to; - char buffer[0x4000]; - - relative_to = NULL; - if (lua_gettop(L) > 1 && !lua_isnil(L,2)) { - relative_to = luaL_checkstring(L, 2); - } - - if (lua_istable(L, 1)) { - int i = 0; - lua_newtable(L); - lua_pushnil(L); - while (lua_next(L, 1)) { - const char* value = luaL_checkstring(L, -1); - do_getabsolute(buffer, value, relative_to); - lua_pop(L, 1); - - lua_pushstring(L, buffer); - lua_rawseti(L, -3, ++i); - } - return 1; - } - else { - const char* value = luaL_checkstring(L, 1); - do_getabsolute(buffer, value, relative_to); - lua_pushstring(L, buffer); - return 1; - } -} diff --git a/build/premake/premake5/src/host/path_getrelative.c b/build/premake/premake5/src/host/path_getrelative.c deleted file mode 100644 index e48af75647..0000000000 --- a/build/premake/premake5/src/host/path_getrelative.c +++ /dev/null @@ -1,99 +0,0 @@ -/** - * \file path_getrelative.c - * \brief Returns a path relative to another. - * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#if PLATFORM_WINDOWS -#include -#endif - - -int path_getrelative(lua_State* L) -{ - int i, last, count; - char src[0x4000]; - char dst[0x4000]; - - const char* p1 = luaL_checkstring(L, 1); - const char* p2 = luaL_checkstring(L, 2); - - /* normalize the paths */ - do_normalize(L, src, p1); - do_normalize(L, dst, p2); - - /* same directory? */ -#if PLATFORM_WINDOWS - if (_stricmp(src, dst) == 0) { -#else - if (strcmp(src, dst) == 0) { -#endif - lua_pushstring(L, "."); - return 1; - } - - /* dollar macro? Can't tell what the real path might be, so treat - * as absolute. This enables paths like $(SDK_ROOT)/include to - * work as expected. */ - if (dst[0] == '$') { - lua_pushstring(L, dst); - return 1; - } - - /* find the common leading directories */ - strcat(src, "/"); - strcat(dst, "/"); - - last = -1; - i = 0; -#if PLATFORM_WINDOWS - while (src[i] && dst[i] && tolower(src[i]) == tolower(dst[i])) { -#else - while (src[i] && dst[i] && src[i] == dst[i]) { -#endif - if (src[i] == '/') { - last = i; - } - ++i; - } - - /* if I end up with just the root of the filesystem, either a single - * slash (/) or a drive letter (c:) then return the absolute path. */ - if (last <= 0 || (last == 2 && src[1] == ':')) { - dst[strlen(dst) - 1] = '\0'; - lua_pushstring(L, dst); - return 1; - } - - /* Relative paths within a server can't climb outside the server root. - * If the paths don't share server name, return the absolute path. */ - if (src[0] == '/' && src[1] == '/' && last == 1) { - dst[strlen(dst) - 1] = '\0'; - lua_pushstring(L, dst); - return 1; - } - - /* count remaining levels in src */ - count = 0; - for (i = last + 1; src[i] != '\0'; ++i) { - if (src[i] == '/') { - ++count; - } - } - - /* start my result by backing out that many levels */ - src[0] = '\0'; - for (i = 0; i < count; ++i) { - strcat(src, "../"); - } - - /* append what's left */ - strcat(src, dst + last + 1); - - /* remove trailing slash and done */ - src[strlen(src) - 1] = '\0'; - lua_pushstring(L, src); - return 1; -} diff --git a/build/premake/premake5/src/host/path_isabsolute.c b/build/premake/premake5/src/host/path_isabsolute.c deleted file mode 100644 index 3bc307b1c8..0000000000 --- a/build/premake/premake5/src/host/path_isabsolute.c +++ /dev/null @@ -1,119 +0,0 @@ -/** - * \file path_isabsolute.c - * \brief Determines if a path is absolute or relative. - * \author Copyright (c) 2002-2016 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#include -#include "path_isabsolute.h" - -#if PLATFORM_WINDOWS -#define strncasecmp _strnicmp -#endif - -int do_absolutetype(const char* path) -{ - char c; - const char* closing; - size_t length; - - while (path[0] == '"' || path[0] == '!') - path++; - if (path[0] == '/' || path[0] == '\\') - return JOIN_ABSOLUTE; - if (isalpha(path[0]) && path[1] == ':') - return JOIN_ABSOLUTE; - - // $(foo) and %(foo) - if ((path[0] == '%' || path[0] == '$') && path[1] == '(') - { - char delimiter = path[0]; - closing = strchr(path + 2, ')'); - if (closing == NULL) - return JOIN_RELATIVE; - - path += 2; - // special case VS macros %(filename) and %(extension) as normal text - if (delimiter == '%') - { - length = closing - path; - switch (length) { - case 8: - if (strncasecmp(path, "Filename)", length) == 0) - return JOIN_RELATIVE; - break; - case 9: - if (strncasecmp(path, "Extension)", length) == 0) - return JOIN_RELATIVE; - break; - default: - break; - } - } - - // only alpha, digits, _ and . allowed inside $() - while (path < closing) { - c = *path++; - if (!isalpha(c) && !isdigit(c) && c != '_' && c != '.') - return JOIN_RELATIVE; - } - - return JOIN_ABSOLUTE; - } - - // $ORIGIN. - if (path[0] == '$') - return JOIN_ABSOLUTE; - - // either %ORIGIN% or %{} - if (path[0] == '%') - { - if (path[1] == '{') //${foo} need to defer join until after detokenization - { - closing = strchr(path + 2, '}'); - if (closing != NULL) - return JOIN_MAYBE_ABSOLUTE; - } - // find the second closing % - path += 1; - closing = strchr(path, '%'); - if (closing == NULL) - return JOIN_RELATIVE; - - // need at least one character between the %% - if (path == closing) - return JOIN_RELATIVE; - - // only alpha, digits and _ allowed inside %..% - while (path < closing) { - c = *path++; - if (!isalpha(c) && !isdigit(c) && c != '_') - return JOIN_RELATIVE; - } - return JOIN_ABSOLUTE; - } - - return JOIN_RELATIVE; -} - -int do_isabsolute(const char* path) -{ - // backwards compatibility - return (do_absolutetype(path) == 1) ? 1 : 0; -} - -int path_isabsolute(lua_State* L) -{ - const char* path = luaL_checkstring(L, -1); - lua_pushboolean(L, do_isabsolute(path)); - return 1; -} - -int path_absolutetype(lua_State* L) -{ - const char* path = luaL_checkstring(L, -1); - lua_pushinteger(L, do_absolutetype(path)); - return 1; -} diff --git a/build/premake/premake5/src/host/path_isabsolute.h b/build/premake/premake5/src/host/path_isabsolute.h deleted file mode 100644 index 8e7cf245f3..0000000000 --- a/build/premake/premake5/src/host/path_isabsolute.h +++ /dev/null @@ -1,9 +0,0 @@ -/** - * \file path_isabsolute.h - * \brief Determines if a path is absolute or relative. - * \author Copyright (c) 2002-2016 Jason Perkins and the Premake project - */ - -#define JOIN_RELATIVE 0 -#define JOIN_ABSOLUTE 1 -#define JOIN_MAYBE_ABSOLUTE 2 diff --git a/build/premake/premake5/src/host/path_join.c b/build/premake/premake5/src/host/path_join.c deleted file mode 100644 index c41f1e0b8b..0000000000 --- a/build/premake/premake5/src/host/path_join.c +++ /dev/null @@ -1,191 +0,0 @@ -/** -* \file path_join.c -* \brief Join two or more pieces of a file system path. -* \author Copyright (c) 2002-2013 Jason Perkins and the Premake project -*/ - -#include "premake.h" -#include -#include "path_isabsolute.h" - -#define DEFERRED_JOIN_DELIMITER '\a' - -char* path_join_single(char* buffer, char* ptr, const char* part, int allowDeferredJoin) -{ - int absoluteType; - size_t len = strlen(part); - /* remove leading "./" */ - while (strncmp(part, "./", 2) == 0) { - part += 2; - len -= 2; - } - - /* remove trailing slashes */ - while (len > 1 && part[len - 1] == '/') { - --len; - } - - /* ignore empty segments and "." */ - if (len == 0 || (len == 1 && part[0] == '.')) { - return ptr; - } - - absoluteType = do_absolutetype(part); - if (!allowDeferredJoin && absoluteType == JOIN_MAYBE_ABSOLUTE) - absoluteType = JOIN_RELATIVE; - - /* if I encounter an absolute path, restart my result */ - switch (absoluteType) { - case JOIN_ABSOLUTE: - ptr = buffer; - break; - case JOIN_RELATIVE: - /* if source has a .. prefix then take off last dest path part - note that this doesn't guarantee a normalized result as this - code doesn't check for .. in the mid path, however .. occurring - mid path are much more likely to occur during path joins - and its faster if we handle here as we don't have to remove - substrings from the middle of the string. */ - - while (ptr != buffer && len >= 2 && part[0] == '.' && part[1] == '.') - { - /* locate start of previous segment */ - char* start = strrchr(buffer, '/'); - if (!start) { - start = buffer; - } - else { - ++start; - } - - /* if I hit a segment I can't trim, bail out */ - if (strcmp(start, "..") == 0 /* parent dir */ - || strcmp(start, ".") == 0 /* current dir */ - || strstr(start, "**") != NULL /* recursive wildcard */ - || strchr(start, '$') != NULL) /* property expansion */ - { - break; - } - - /* otherwise trim segment and the ".." sequence */ - if (start != buffer) { - --start; - } - *start = '\0'; - ptr = start; - part += 2; - len -= 2; - if (len > 0 && part[0] == '/') { - ++part; - --len; - } - } - - /* if the path is already started, split parts */ - if (ptr != buffer && *(ptr - 1) != '/') { - *(ptr++) = '/'; - } - - break; - case JOIN_MAYBE_ABSOLUTE: - *ptr = DEFERRED_JOIN_DELIMITER; - ptr++; - break; - } - - /* append new part */ - strncpy(ptr, part, len); - ptr += len; - *ptr = '\0'; - return ptr; -} - -int path_join_internal(lua_State* L, int allowDeferredJoin) -{ - int i; - const char* part; - char buffer[0x4000]; - char* ptr = buffer; - - /* for each argument... */ - int argc = lua_gettop(L); - for (i = 1; i <= argc; ++i) { - /* if next argument is nil, skip it */ - if (lua_isnil(L, i)) { - continue; - } - - /* grab the next argument */ - part = luaL_checkstring(L, i); - ptr = path_join_single(buffer, ptr, part, allowDeferredJoin); - } - - lua_pushstring(L, buffer); - return 1; -} - - -int path_join(lua_State* L) -{ - return path_join_internal(L, 0); -} - - -int path_deferred_join(lua_State* L) -{ - return path_join_internal(L, 1); -} - - -int do_path_has_deferred_join(const char* path) -{ - return (strchr(path, DEFERRED_JOIN_DELIMITER) != NULL); -} - - -int path_has_deferred_join(lua_State* L) -{ - const char* path = luaL_checkstring(L, -1); - lua_pushboolean(L, do_path_has_deferred_join(path)); - return 1; -} - - -int path_resolve_deferred_join(lua_State* L) -{ - const char* path = luaL_checkstring(L, -1); - char inBuffer[0x4000]; - char outBuffer[0x4000]; - char* ptr = outBuffer; - char* nextPart; - size_t len = strlen(path); - int i; - int numParts = 0; - strncpy(inBuffer, path, len); - inBuffer[len] = '\0'; - char *parts[0x200]; - // break up the string into parts and index the start of each part - nextPart = strchr(inBuffer, DEFERRED_JOIN_DELIMITER); - if (nextPart == NULL) // nothing to do - { - lua_pushlstring(L, inBuffer, len); - return 1; - } - parts[numParts++] = inBuffer; - while (nextPart != NULL) - { - *nextPart = '\0'; - nextPart++; - parts[numParts++] = nextPart; - nextPart = strchr(nextPart, DEFERRED_JOIN_DELIMITER); - } - - /* for each part... */ - for (i = 0; i < numParts; ++i) { - nextPart = parts[i]; - ptr = path_join_single(outBuffer, ptr, nextPart, 0); - } - - lua_pushstring(L, outBuffer); - return 1; -} diff --git a/build/premake/premake5/src/host/path_normalize.c b/build/premake/premake5/src/host/path_normalize.c deleted file mode 100644 index 55fcd2ee44..0000000000 --- a/build/premake/premake5/src/host/path_normalize.c +++ /dev/null @@ -1,223 +0,0 @@ -/** -* \file path_normalize.c -* \brief Removes any weirdness from a file system path string. -* \author Copyright (c) 2013 Jason Perkins and the Premake project -*/ - -#include "premake.h" -#include -#include - -#define IS_SEP(__c) ((__c) == '/' || (__c) == '\\') -#define IS_QUOTE(__c) ((__c) == '\"' || (__c) == '\'') - -#define IS_UPPER_ALPHA(__c) ((__c) >= 'A' && (__c) <= 'Z') -#define IS_LOWER_ALPHA(__c) ((__c) >= 'a' && (__c) <= 'z') -#define IS_ALPHA(__c) (IS_UPPER_ALPHA(__c) || IS_LOWER_ALPHA(__c)) - -#define IS_SPACE(__c) ((__c >= '\t' && __c <= '\r') || __c == ' ') - -#define IS_WIN_ENVVAR_START(__c) (*__c == '%') -#define IS_WIN_ENVVAR_END(__c) (*__c == '%') - -#define IS_VS_VAR_START(__c) (*__c == '$' && __c[1] == '(') -#define IS_VS_VAR_END(__c) (*__c == ')') - -#define IS_UNIX_ENVVAR_START(__c) (*__c == '$' && __c[1] == '{') -#define IS_UNIX_ENVVAR_END(__c) (*__c == '}') - -#define IS_PREMAKE_TOKEN_START(__c) (*__c == '%' && __c[1] == '{') -#define IS_PREMAKE_TOKEN_END(__c) (*__c == '}') - -static void* normalize_substring(const char* srcPtr, const char* srcEnd, char* dstPtr) -{ -#define IS_END(__p) (__p >= srcEnd || *__p == '\0') -#define IS_SEP_OR_END(__p) (IS_END(__p) || IS_SEP(*__p)) - - // Handle Windows absolute paths - if (IS_ALPHA(srcPtr[0]) && srcPtr[1] == ':') - { - *(dstPtr++) = srcPtr[0]; - *(dstPtr++) = ':'; - - srcPtr += 2; - } - - // Handle path starting with a sep (C:/ or /) - if (IS_SEP(*srcPtr)) - { - ++srcPtr; - *(dstPtr++) = '/'; - // Handle path starting with // - if (IS_SEP(*srcPtr)) - { - ++srcPtr; - *(dstPtr++) = '/'; - } - } - - const char * const dstRoot = dstPtr; - unsigned int folderDepth = 0; - - while (!IS_END(srcPtr)) - { - // Skip multiple sep and "./" pattern - while (IS_SEP(*srcPtr) || (srcPtr[0] == '.' && IS_SEP_OR_END(&srcPtr[1]))) - ++srcPtr; - - if (IS_END(srcPtr)) - break; - - // Handle "../ pattern" - if (srcPtr[0] == '.' && srcPtr[1] == '.' && IS_SEP_OR_END(&srcPtr[2])) - { - if (folderDepth > 0) - { - // Here dstPtr[-1] is safe as folderDepth > 0. - while (--dstPtr != dstRoot && !IS_SEP(dstPtr[-1])); - - --folderDepth; - } - else - { - *(dstPtr++) = '.'; - *(dstPtr++) = '.'; - *(dstPtr++) = '/'; - } - srcPtr += 3; - } - else - { - while (!IS_SEP_OR_END(srcPtr)) - *(dstPtr++) = *(srcPtr++); - - if (IS_SEP(*srcPtr)) - { - *(dstPtr++) = '/'; - ++srcPtr; - ++folderDepth; - } - } - } - - // Remove trailing slash except for C:/ or / (root) - while (dstPtr != dstRoot && IS_SEP(dstPtr[-1])) - --dstPtr; - - return dstPtr; -#undef IS_END -#undef IS_SEP_OR_END -} - -static int skip_tokens(const char *readPtr) -{ - int skipped = 0; - -#define DO_SKIP_FOR(__kind)\ -if (IS_ ## __kind ## _START(readPtr)) { \ - do \ - { \ - skipped++; \ - } while (!IS_ ## __kind ## _END(readPtr++)); \ -} \ -// DO_SKIP_FOR - - do - { - DO_SKIP_FOR(PREMAKE_TOKEN) - DO_SKIP_FOR(WIN_ENVVAR) - DO_SKIP_FOR(VS_VAR) - DO_SKIP_FOR(UNIX_ENVVAR) - - } while (IS_WIN_ENVVAR_START(readPtr) || - IS_VS_VAR_START(readPtr) || - IS_UNIX_ENVVAR_START(readPtr) || - IS_PREMAKE_TOKEN_START(readPtr)); - - return skipped; -#undef DO_SKIP_FOR -} - -int path_normalize(lua_State* L) -{ - const char *path = luaL_checkstring(L, 1); - const char *readPtr = path; - char buffer[0x4000] = { 0 }; - char *writePtr = buffer; - const char *endPtr; - - // skip leading white spaces - while (IS_SPACE(*readPtr)) - ++readPtr; - - endPtr = readPtr; - - while (*endPtr) { - - int skipped = skip_tokens(readPtr); - if (skipped > 0) { - - if (readPtr != path && writePtr != buffer && - IS_SEP(readPtr[-1]) && !IS_SEP(writePtr[-1])) - { - *(writePtr++) = (readPtr[-1]); - } - - while (skipped-- > 0) - *(writePtr++) = *(readPtr++); - - endPtr = readPtr; - } - - // find the end of sub path - while (*endPtr && !IS_SPACE(*endPtr) && - !IS_WIN_ENVVAR_START(endPtr) && - !IS_VS_VAR_START(endPtr) && - !IS_UNIX_ENVVAR_START(endPtr) && - !IS_PREMAKE_TOKEN_START(endPtr)) - { - ++endPtr; - } - - // path is surrounded with quotes - if (readPtr != endPtr && - IS_QUOTE(*readPtr)) - { - *(writePtr++) = *(readPtr++); - } - - writePtr = normalize_substring(readPtr, endPtr, writePtr); - - // skip any white spaces between sub paths - while (IS_SPACE(*endPtr)) - *(writePtr++) = *(endPtr++); - - readPtr = endPtr; - } - - // skip any trailing white spaces - while (writePtr != buffer && IS_SPACE(writePtr[-1])) - --writePtr; - - *writePtr = 0; - - lua_pushstring(L, buffer); - return 1; -} - - -/* Call the scripted path.normalize(), to allow for overrides */ -void do_normalize(lua_State* L, char* buffer, const char* path) -{ - int top = lua_gettop(L); - - lua_getglobal(L, "path"); - lua_getfield(L, -1, "normalize"); - lua_pushstring(L, path); - lua_call(L, 1, 1); - - path = luaL_checkstring(L, -1); - strcpy(buffer, path); - - lua_settop(L, top); -} diff --git a/build/premake/premake5/src/host/path_translate.c b/build/premake/premake5/src/host/path_translate.c deleted file mode 100644 index 7924b02adc..0000000000 --- a/build/premake/premake5/src/host/path_translate.c +++ /dev/null @@ -1,65 +0,0 @@ -/** - * \file path_translate.c - * \brief Translates between path separators. - * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include - - -void do_translate(char* value, const char sep) -{ - char* ch; - for (ch = value; *ch != '\0'; ++ch) { - if (*ch == '/' || *ch == '\\') { - *ch = sep; - } - } -} - - -static void translate(char* result, const char* value, const char sep) -{ - strcpy(result, value); - do_translate(result, sep); -} - - -int path_translate(lua_State* L) -{ - const char* sep; - char buffer[0x4000]; - - if (lua_gettop(L) == 1) { - lua_getglobal(L, "path"); - lua_getfield(L, -1, "getDefaultSeparator"); - lua_call(L, 0, 1); - sep = luaL_checkstring(L, -1); - lua_pop(L, 2); - } - else { - sep = luaL_checkstring(L, 2); - } - - if (lua_istable(L, 1)) { - int i = 0; - lua_newtable(L); - lua_pushnil(L); - while (lua_next(L, 1)) { - const char* value = luaL_checkstring(L, 4); - translate(buffer, value, sep[0]); - lua_pop(L, 1); - - lua_pushstring(L, buffer); - lua_rawseti(L, -3, ++i); - } - return 1; - } - else { - const char* value = luaL_checkstring(L, 1); - translate(buffer, value, sep[0]); - lua_pushstring(L, buffer); - return 1; - } -} diff --git a/build/premake/premake5/src/host/path_wildcards.c b/build/premake/premake5/src/host/path_wildcards.c deleted file mode 100644 index 41b8f699d2..0000000000 --- a/build/premake/premake5/src/host/path_wildcards.c +++ /dev/null @@ -1,80 +0,0 @@ -/** - * \file path_wildcards.c - * \brief Converts from a simple wildcard syntax to the corresponding Lua pattern. - * \author Copyright (c) 2015 Tom van Dijck, Jason Perkins and the Premake project - */ - -#include "premake.h" -#include -#include - -/* ---Converts from a simple wildcard syntax, where * is "match any" --- and ** is "match recursive", to the corresponding Lua pattern. --- --- @param pattern --- The wildcard pattern to convert. --- @returns --- The corresponding Lua pattern. -*/ -int path_wildcards(lua_State* L) -{ - size_t length, i; - const char* input; - char buffer[0x4000]; - char* output; - - input = luaL_checklstring(L, 1, &length); - output = buffer; - - for (i = 0; i < length; ++i) - { - char c = input[i]; - switch (c) - { - case '+': - case '.': - case '-': - case '^': - case '$': - case '(': - case ')': - case '%': - *(output++) = '%'; - *(output++) = c; - break; - - case '*': - if ((i + 1) < length && input[i + 1] == '*') - { - i++; // skip the next character. - *(output++) = '.'; - *(output++) = '*'; - } - else - { - *(output++) = '['; - *(output++) = '^'; - *(output++) = '/'; - *(output++) = ']'; - *(output++) = '*'; - } - break; - - default: - *(output++) = c; - break; - } - - if (output >= buffer + sizeof(buffer)) - { - lua_pushstring(L, "Wildcards expansion too big."); - lua_error(L); - } - } - - *(output++) = '\0'; - - lua_pushstring(L, buffer); - return 1; -} diff --git a/build/premake/premake5/src/host/premake.c b/build/premake/premake5/src/host/premake.c deleted file mode 100644 index 49d192f283..0000000000 --- a/build/premake/premake5/src/host/premake.c +++ /dev/null @@ -1,705 +0,0 @@ -/** - * \file premake.c - * \brief Program entry point. - * \author Copyright (c) 2002-2017 Jason Perkins and the Premake project - */ - -#include -#include -#include -#include "premake.h" -#include "lua_shimtable.h" - -#if PLATFORM_MACOSX -#include -#endif - -#if PLATFORM_BSD -#include -#include -#endif - -#define ERROR_MESSAGE "Error: %s\n" - - -static void build_premake_path(lua_State* L); -static int process_arguments(lua_State* L, int argc, const char** argv); -static int run_premake_main(lua_State* L, const char* script); - - -/* A search path for script files */ -const char* scripts_path = NULL; - - -/* Built-in functions */ -static const luaL_Reg criteria_functions[] = { - { "_compile", criteria_compile }, - { "_delete", criteria_delete }, - { "matches", criteria_matches }, - { NULL, NULL } -}; - -static const luaL_Reg debug_functions[] = { - { "prompt", debug_prompt }, - { NULL, NULL } -}; - -static const luaL_Reg path_functions[] = { - { "getabsolute", path_getabsolute }, - { "getrelative", path_getrelative }, - { "isabsolute", path_isabsolute }, - { "join", path_join }, - { "deferredjoin", path_deferred_join }, - { "hasdeferredjoin", path_has_deferred_join }, - { "resolvedeferredjoin", path_resolve_deferred_join }, - { "normalize", path_normalize }, - { "translate", path_translate }, - { "wildcards", path_wildcards }, - { NULL, NULL } -}; - -static const luaL_Reg os_functions[] = { - { "chdir", os_chdir }, - { "chmod", os_chmod }, - { "comparefiles", os_comparefiles }, - { "copyfile", os_copyfile }, - { "_is64bit", os_is64bit }, - { "isdir", os_isdir }, - { "getcwd", os_getcwd }, - { "getpass", os_getpass }, - { "getWindowsRegistry", os_getWindowsRegistry }, - { "listWindowsRegistry", os_listWindowsRegistry }, - { "getversion", os_getversion }, - { "host", os_host }, - { "isfile", os_isfile }, - { "islink", os_islink }, - { "locate", os_locate }, - { "matchdone", os_matchdone }, - { "matchisfile", os_matchisfile }, - { "matchname", os_matchname }, - { "matchnext", os_matchnext }, - { "matchstart", os_matchstart }, - { "mkdir", os_mkdir }, -#if PLATFORM_WINDOWS - // utf8 functions for Windows (assuming posix already handle utf8) - {"remove", os_remove }, - {"rename", os_rename }, -#endif - { "pathsearch", os_pathsearch }, - { "realpath", os_realpath }, - { "rmdir", os_rmdir }, - { "stat", os_stat }, - { "uuid", os_uuid }, - { "writefile_ifnotequal", os_writefile_ifnotequal }, - { "touchfile", os_touchfile }, - { "compile", os_compile }, - { NULL, NULL } -}; - -static const luaL_Reg premake_functions[] = { - { "getEmbeddedResource", premake_getEmbeddedResource }, - { NULL, NULL } -}; - -static const luaL_Reg string_functions[] = { - { "endswith", string_endswith }, - { "hash", string_hash }, - { "sha1", string_sha1 }, - { "startswith", string_startswith }, - { NULL, NULL } -}; - -static const luaL_Reg buffered_functions[] = { - { "new", buffered_new }, - { "write", buffered_write }, - { "writeln", buffered_writeln }, - { "tostring", buffered_tostring }, - { "close", buffered_close }, - { NULL, NULL } -}; - -static const luaL_Reg term_functions[] = { - { "getTextColor", term_getTextColor }, - { "setTextColor", term_setTextColor }, - { NULL, NULL } -}; - -#ifdef PREMAKE_CURL -static const luaL_Reg http_functions[] = { - { "get", http_get }, - { "post", http_post }, - { "download", http_download }, - { NULL, NULL } -}; -#endif - -#ifdef PREMAKE_COMPRESSION -static const luaL_Reg zip_functions[] = { - { "extract", zip_extract }, - { NULL, NULL } -}; -#endif - - -static void lua_getorcreate_table(lua_State *L, const char *modname) -{ - luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED"); // get _LOADED table stack = {_LOADED} - lua_getfield(L, -1, modname); // get _LOADED[modname] stack = { _LOADED, result } - if (!lua_istable(L, -1)) // not found? stack = { _LOADED, result } - { - lua_pop(L, 1); // remove previous result stack = { _LOADED } - lua_pushglobaltable(L); // push _G onto stack stack = { _LOADED, _G } - lua_createtable(L, 0, 0); // new table for field stack = { _LOADED, _G, result } - lua_pushlstring(L, modname, strlen(modname)); // stack = { _LOADED, _G, result, modname } - lua_pushvalue(L, -2); // stack = { _LOADED, _G, result, modname, result } - lua_settable(L, -4); // _G[modname] = result stack = { _LOADED, _G, result } - lua_remove(L, -2); // remove _G from stack stack = { _LOADED, result } - lua_pushvalue(L, -1); // duplicate result stack = { _LOADED, result, result } - lua_setfield(L, -3, modname); // _LOADED[modname] = result stack = { _LOADED, result } - } - - lua_remove(L, -2); // remove _LOADED from stack stack = { result } -} - - -void luaL_register(lua_State *L, const char *libname, const luaL_Reg *l) -{ - lua_getorcreate_table(L, libname); - luaL_setfuncs(L, l, 0); - lua_pop(L, 1); -} - - -/** - * Initialize the Premake Lua environment. - */ -int premake_init(lua_State* L) -{ - const char* value; - - luaL_register(L, "premake", premake_functions); - luaL_register(L, "criteria", criteria_functions); - luaL_register(L, "debug", debug_functions); - luaL_register(L, "path", path_functions); - luaL_register(L, "os", os_functions); - luaL_register(L, "string", string_functions); - luaL_register(L, "buffered", buffered_functions); - luaL_register(L, "term", term_functions); - -#ifdef PREMAKE_CURL - luaL_register(L, "http", http_functions); -#endif - -#ifdef PREMAKE_COMPRESSION - luaL_register(L, "zip", zip_functions); -#endif - - lua_pushlightuserdata(L, &s_shimTable); - lua_rawseti(L, LUA_REGISTRYINDEX, 0x5348494D); // equal to 'SHIM' - - /* push the application metadata */ - lua_pushstring(L, LUA_COPYRIGHT); - lua_setglobal(L, "_COPYRIGHT"); - - lua_pushstring(L, PREMAKE_VERSION); - lua_setglobal(L, "_PREMAKE_VERSION"); - - lua_pushstring(L, PREMAKE_COPYRIGHT); - lua_setglobal(L, "_PREMAKE_COPYRIGHT"); - - lua_pushstring(L, PREMAKE_PROJECT_URL); - lua_setglobal(L, "_PREMAKE_URL"); - - /* set the OS platform variable */ - lua_pushstring(L, PLATFORM_STRING); - lua_setglobal(L, "_TARGET_OS"); - - /* find the user's home directory */ - value = getenv("HOME"); - if (!value) value = getenv("USERPROFILE"); - if (!value) value = "~"; - lua_pushstring(L, value); - lua_setglobal(L, "_USER_HOME_DIR"); - - /* publish the initial working directory */ - os_getcwd(L); - lua_setglobal(L, "_WORKING_DIR"); - -#if !defined(PREMAKE_NO_BUILTIN_SCRIPTS) - /* let native modules initialize themselves */ - registerModules(L); -#endif - - return OKAY; -} - - -static void setErrorColor(lua_State* L) -{ - int errorColor = 12; - - lua_getglobal(L, "term"); - lua_pushstring(L, "errorColor"); - lua_gettable(L, -2); - - if (!lua_isnil(L, -1)) - errorColor = (int)luaL_checkinteger(L, -1); - - term_doSetTextColor(errorColor); - - lua_pop(L, 2); -} - - - -void printLastError(lua_State* L) -{ - const char* message = lua_tostring(L, -1); - int oldColor = term_doGetTextColor(); - setErrorColor(L); - printf(ERROR_MESSAGE, message); - term_doSetTextColor(oldColor); -} - -static int lua_error_handler(lua_State* L) -{ - // in debug mode, show full traceback on all errors -#if !defined(NDEBUG) - lua_getglobal(L, "debug"); - lua_getfield(L, -1, "traceback"); - lua_remove(L, -2); // remove debug table - lua_insert(L, -2); // insert traceback function before error message - lua_pushinteger(L, 3); // push level - lua_call(L, 2, 1); // call traceback -#else - (void) L; -#endif - - return 1; -} - -int premake_pcall(lua_State* L, int nargs, int nresults) -{ - lua_pushcfunction(L, lua_error_handler); - - int error_handler_index = lua_gettop(L) - nargs - 1; - lua_insert(L, error_handler_index); // insert lua_error_handler before call parameters - int result = lua_pcall(L, nargs, nresults, error_handler_index); - lua_remove(L, error_handler_index); // remove lua_error_handler from stack - return result; -} - -int premake_execute(lua_State* L, int argc, const char** argv, const char* script) -{ - /* push the absolute path to the Premake executable */ - lua_pushcfunction(L, path_getabsolute); - premake_locate_executable(L, argv[0]); - lua_call(L, 1, 1); - lua_setglobal(L, "_PREMAKE_COMMAND"); - - /* Parse the command line arguments */ - if (process_arguments(L, argc, argv) != OKAY) { - return !OKAY; - } - - /* Use --scripts and PREMAKE_PATH to populate premake.path */ - build_premake_path(L); - - /* Find and run the main Premake bootstrapping script */ - if (run_premake_main(L, script) != OKAY) { - printLastError(L); - return !OKAY; - } - - /* and call the main entry point */ - lua_getglobal(L, "_premake_main"); - if (premake_pcall(L, 0, 1) != OKAY) { - printLastError(L); - return !OKAY; - } - else { - int exitCode = (int)lua_tonumber(L, -1); - return exitCode; - } -} - - - -/** - * Locate the Premake executable, and push its full path to the Lua stack. - * Based on: - * http://sourceforge.net/tracker/index.php?func=detail&aid=3351583&group_id=71616&atid=531880 - * http://stackoverflow.com/questions/933850/how-to-find-the-location-of-the-executable-in-c - * http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe - */ -int premake_locate_executable(lua_State* L, const char* argv0) -{ - char buffer[PATH_MAX]; - const char* path = NULL; - -#if PLATFORM_WINDOWS - wchar_t widebuffer[PATH_MAX]; - - DWORD len = GetModuleFileNameW(NULL, widebuffer, PATH_MAX); - if (len > 0) - { - WideCharToMultiByte(CP_UTF8, 0, widebuffer, len, buffer, PATH_MAX, NULL, NULL); - - buffer[len] = 0; - path = buffer; - } -#endif - -#if PLATFORM_MACOSX - CFURLRef bundleURL = CFBundleCopyExecutableURL(CFBundleGetMainBundle()); - CFStringRef pathRef = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle); - if (CFStringGetCString(pathRef, buffer, PATH_MAX - 1, kCFStringEncodingUTF8)) - path = buffer; -#endif - -#if PLATFORM_LINUX - int len = readlink("/proc/self/exe", buffer, PATH_MAX - 1); - if (len > 0) - { - buffer[len] = 0; - path = buffer; - } -#endif - -#if PLATFORM_BSD && !defined(__OpenBSD__) - int len = readlink("/proc/curproc/file", buffer, PATH_MAX - 1); - if (len < 0) - len = readlink("/proc/curproc/exe", buffer, PATH_MAX - 1); - if (len < 0) - { - int mib[4]; - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PATHNAME; - mib[3] = -1; - size_t cb = sizeof(buffer); - sysctl(mib, 4, buffer, &cb, NULL, 0); - len = (int)cb; - } - if (len > 0) - { - buffer[len] = 0; - path = buffer; - } -#endif - -#if PLATFORM_SOLARIS - int len = readlink("/proc/self/path/a.out", buffer, PATH_MAX - 1); - if (len > 0) - { - buffer[len] = 0; - path = buffer; - } -#endif - - /* As a fallback, search the PATH with argv[0] */ - if (!path) - { - lua_pushcfunction(L, os_pathsearch); - lua_pushstring(L, argv0); - lua_pushstring(L, getenv("PATH")); - if (lua_pcall(L, 2, 1, 0) == OKAY && !lua_isnil(L, -1)) - { - lua_pushstring(L, "/"); - lua_pushstring(L, argv0); - lua_concat(L, 3); - path = lua_tostring(L, -1); - } - lua_pop(L, 1); - } - - /* If all else fails, use argv[0] as-is and hope for the best */ - if (!path) - { - /* make it absolute, if needed */ - os_getcwd(L); - lua_pushstring(L, "/"); - lua_pushstring(L, argv0); - - if (!do_isabsolute(argv0)) { - lua_concat(L, 3); - } - else { - lua_pop(L, 3); - lua_pushstring(L, argv0); - } - - path = lua_tostring(L, -1); - lua_pop(L, 1); - } - - lua_pushstring(L, path); - return 1; -} - - - -/** - * Checks one or more of the standard script search locations to locate the - * specified file. If found, returns the discovered path to the script on - * the top of the Lua stack. - */ -int premake_test_file(lua_State* L, const char* filename, int searchMask) -{ - if (searchMask & TEST_LOCAL) { - if (do_isfile(L, filename)) { - lua_pushcfunction(L, path_getabsolute); - lua_pushstring(L, filename); - lua_call(L, 1, 1); - return OKAY; - } - } - - if (scripts_path && (searchMask & TEST_SCRIPTS)) { - if (do_locate(L, filename, scripts_path)) return OKAY; - } - - if (searchMask & TEST_PATH) { - const char* path = getenv("PREMAKE_PATH"); - if (path && do_locate(L, filename, path)) return OKAY; - } - -#if !defined(PREMAKE_NO_BUILTIN_SCRIPTS) - if ((searchMask & TEST_EMBEDDED) != 0) { - /* Try to locate a record matching the filename */ - if (premake_find_embedded_script(filename) != NULL) { - lua_pushstring(L, "$/"); - lua_pushstring(L, filename); - lua_concat(L, 2); - return OKAY; - } - } -#endif - - return !OKAY; -} - - - -static const char* set_scripts_path(const char* relativePath) -{ - char* path = (char*)malloc(PATH_MAX); - do_getabsolute(path, relativePath, NULL); - scripts_path = path; - return scripts_path; -} - - - -/** - * Set the premake.path variable, pulling from the --scripts argument - * and PREMAKE_PATH environment variable if present. - */ -static void build_premake_path(lua_State* L) -{ - int top; - const char* value; - - lua_getglobal(L, "premake"); - top = lua_gettop(L); - - /* Start by searching the current working directory */ - lua_pushstring(L, "."); - - /* The --scripts argument goes next, if present */ - if (scripts_path) { - lua_pushstring(L, ";"); - lua_pushstring(L, scripts_path); - } - - /* Then the PREMAKE_PATH environment variable */ - value = getenv("PREMAKE_PATH"); - if (value) { - lua_pushstring(L, ";"); - lua_pushstring(L, value); - } - - /* Then in ~/.premake */ - lua_pushstring(L, ";"); - lua_getglobal(L, "_USER_HOME_DIR"); - lua_pushstring(L, "/.premake"); - - /* In the user's Application Support folder */ -#if defined(PLATFORM_MACOSX) - lua_pushstring(L, ";"); - lua_getglobal(L, "_USER_HOME_DIR"); - lua_pushstring(L, "/Library/Application Support/Premake"); -#endif - - /* In the /usr tree */ - lua_pushstring(L, ";/usr/local/share/premake;/usr/share/premake"); - - /* Put it all together */ - lua_concat(L, lua_gettop(L) - top); - - /* Match Lua's package.path; use semicolon separators */ -#if !defined(PLATFORM_WINDOWS) - lua_getglobal(L, "string"); - lua_getfield(L, -1, "gsub"); - lua_pushvalue(L, -3); - lua_pushstring(L, ":"); - lua_pushstring(L, ";"); - lua_call(L, 3, 1); - /* remove the string global table */ - lua_remove(L, -2); - /* remove the previously concatonated result */ - lua_remove(L, -2); -#endif - - /* Store it in premake.path */ - lua_setfield(L, -2, "path"); - - /* Remove the premake namespace table */ - lua_pop(L, 1); -} - - - -/** - * Copy all command line arguments into the script-side _ARGV global, and - * check for the presence of a /scripts= argument to help locate - * the manifest if needed. - * \returns OKAY if successful. - */ -static int process_arguments(lua_State* L, int argc, const char** argv) -{ - int i; - - /* Copy all arguments in the _ARGV global */ - lua_newtable(L); - for (i = 1; i < argc; ++i) - { - lua_pushstring(L, argv[i]); - lua_rawseti(L, -2, luaL_len(L, -2) + 1); - - /* The /scripts option gets picked up here; used later to find the - * manifest and scripts later if necessary */ - if (strncmp(argv[i], "/scripts=", 9) == 0) - { - argv[i] = set_scripts_path(argv[i] + 9); - } - else if (strncmp(argv[i], "--scripts=", 10) == 0) - { - argv[i] = set_scripts_path(argv[i] + 10); - } - } - lua_setglobal(L, "_ARGV"); - - return OKAY; -} - - - -/** - * Find and run the main Premake bootstrapping script. The loading of the - * bootstrap and the other core scripts use a limited set of search paths - * to avoid mismatches between the native host code and the scripts - * themselves. - */ -static int run_premake_main(lua_State* L, const char* script) -{ - /* Release builds want to load the embedded scripts, with --scripts - * argument allowed as an override. Debug builds will look at the - * local file system first, then fall back to embedded. */ -#if defined(NDEBUG) - int z = premake_test_file(L, script, - TEST_SCRIPTS | TEST_EMBEDDED); -#else - int z = premake_test_file(L, script, - TEST_LOCAL | TEST_SCRIPTS | TEST_PATH | TEST_EMBEDDED); -#endif - - /* If no embedded script can be found, release builds will then - * try to fall back to the local file system, just in case */ -#if defined(NDEBUG) - if (z != OKAY) { - z = premake_test_file(L, script, TEST_LOCAL | TEST_PATH); - } -#endif - - if (z == OKAY) { - const char* filename = lua_tostring(L, -1); - z = luaL_dofile(L, filename); - } - - return z; -} - - - -/** - * Locate a file in the embedded script index. If found, returns the - * contents of the file's script. - */ - -const buildin_mapping* premake_find_embedded_script(const char* filename) -{ -#if !defined(PREMAKE_NO_BUILTIN_SCRIPTS) - int i; - for (i = 0; builtin_scripts[i].name != NULL; ++i) { - if (strcmp(builtin_scripts[i].name, filename) == 0) { - return builtin_scripts + i; - } - } -#endif - return NULL; -} - - - -/** - * Load a script that was previously embedded into the executable. If - * successful, a function containing the new script chunk is pushed to - * the stack, just like luaL_loadfile would do had the chunk been loaded - * from a file. - */ - -int premake_load_embedded_script(lua_State* L, const char* filename) -{ -#if !defined(NDEBUG) - static int warned = 0; -#endif - - const buildin_mapping* chunk = premake_find_embedded_script(filename); - if (chunk == NULL) { - return LUA_ERRFILE; - } - - /* Debug builds probably want to be loading scripts from the disk */ -#if !defined(NDEBUG) - if (!warned) { - warned = 1; - printf("** warning: using embedded script '%s'; use /scripts argument to load from files\n", filename); - } -#endif - - /* "Fully qualify" the filename by turning it into the form $/filename */ - lua_pushstring(L, "$/"); - lua_pushstring(L, filename); - lua_concat(L, 2); - - /* Load the chunk */ - return luaL_loadbuffer(L, (const char*)chunk->bytecode, chunk->length, filename); -} - - -/** - * Give the lua runtime raw access to embedded files. - */ -int premake_getEmbeddedResource(lua_State* L) -{ - const char* filename = luaL_checkstring(L, 1); - const buildin_mapping* chunk = premake_find_embedded_script(filename); - if (chunk == NULL) - { - return 0; - } - - lua_pushlstring(L, (const char*)chunk->bytecode, chunk->length); - return 1; -} diff --git a/build/premake/premake5/src/host/premake.h b/build/premake/premake5/src/host/premake.h deleted file mode 100644 index 5f1f51c7eb..0000000000 --- a/build/premake/premake5/src/host/premake.h +++ /dev/null @@ -1,201 +0,0 @@ -/** - * \file premake.h - * \brief Program-wide constants and definitions. - * \author Copyright (c) 2002-2015 Jason Perkins and the Premake project - */ - -#define lua_c -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" - -#include - -#define PREMAKE_VERSION "5.0.0-alpha15" -#define PREMAKE_COPYRIGHT "Copyright (C) 2002-2020 Jason Perkins and the Premake Project" -#define PREMAKE_PROJECT_URL "https://github.com/premake/premake-core/wiki" - -/* Identify the current platform I'm not sure how to reliably detect - * Windows but since it is the most common I use it as the default */ -#if defined(__linux__) -#define PLATFORM_LINUX (1) -#define PLATFORM_STRING "linux" -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -#define PLATFORM_BSD (1) -#define PLATFORM_STRING "bsd" -#elif defined(__APPLE__) && defined(__MACH__) -#define PLATFORM_MACOSX (1) -#define PLATFORM_STRING "macosx" -#elif defined(__sun__) && defined(__svr4__) -#define PLATFORM_SOLARIS (1) -#define PLATFORM_STRING "solaris" -#elif defined(__HAIKU__) -#define PLATFORM_HAIKU (1) -#define PLATFORM_STRING "haiku" -#elif defined (_AIX) -#define PLATFORM_AIX (1) -#define PLATFORM_STRING "aix" -#elif defined (__GNU__) -#define PLATFORM_HURD (1) -#define PLATFORM_STRING "hurd" -#else -#define PLATFORM_WINDOWS (1) -#define PLATFORM_STRING "windows" -#endif - -#define PLATFORM_POSIX (PLATFORM_LINUX || PLATFORM_BSD || PLATFORM_MACOSX || PLATFORM_SOLARIS || PLATFORM_HAIKU) - - -/* Pull in platform-specific headers required by built-in functions */ -#if PLATFORM_WINDOWS -#define WIN32_LEAN_AND_MEAN -#include -#else -#include -#endif -#include - -/* not all platforms define this */ -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - -/* Fill in any missing bits */ -#ifndef PATH_MAX -#define PATH_MAX (4096) -#endif - - -/* A success return code */ -#define OKAY (0) - - -/* Bitmasks for the different script file search locations */ -#define TEST_LOCAL (0x01) -#define TEST_SCRIPTS (0x02) -#define TEST_PATH (0x04) -#define TEST_EMBEDDED (0x08) - - -/* If a /scripts argument is present, its value */ -extern const char* scripts_path; - - -/* Bootstrapping helper functions */ -int do_chdir(lua_State* L, const char* path); -uint32_t do_hash(const char* str, int seed); -void do_getabsolute(char* result, const char* value, const char* relative_to); -int do_getcwd(char* buffer, size_t size); -int do_isabsolute(const char* path); -int do_absolutetype(const char* path); -int do_isfile(lua_State* L, const char* filename); -int do_locate(lua_State* L, const char* filename, const char* path); -void do_normalize(lua_State* L, char* buffer, const char* path); -int do_pathsearch(lua_State* L, const char* filename, const char* path); -void do_translate(char* value, const char sep); - -int term_doGetTextColor(); -void term_doSetTextColor(int color); -void printLastError(lua_State* L); - -/* Built-in functions */ -int criteria_compile(lua_State* L); -int criteria_delete(lua_State* L); -int criteria_matches(lua_State* L); -int debug_prompt(lua_State* L); -int path_getabsolute(lua_State* L); -int path_getrelative(lua_State* L); -int path_isabsolute(lua_State* L); -int path_join(lua_State* L); -int path_deferred_join(lua_State* L); -int path_has_deferred_join(lua_State* L); -int path_resolve_deferred_join(lua_State* L); -int path_normalize(lua_State* L); -int path_translate(lua_State* L); -int path_wildcards(lua_State* L); -int os_chdir(lua_State* L); -int os_chmod(lua_State* L); -int os_comparefiles(lua_State* L); -int os_copyfile(lua_State* L); -int os_getcwd(lua_State* L); -int os_getpass(lua_State* L); -int os_getWindowsRegistry(lua_State* L); -int os_listWindowsRegistry(lua_State* L); -int os_getversion(lua_State* L); -int os_host(lua_State* L); -int os_is64bit(lua_State* L); -int os_isdir(lua_State* L); -int os_isfile(lua_State* L); -int os_islink(lua_State* L); -int os_locate(lua_State* L); -int os_matchdone(lua_State* L); -int os_matchisfile(lua_State* L); -int os_matchname(lua_State* L); -int os_matchnext(lua_State* L); -int os_matchstart(lua_State* L); -int os_mkdir(lua_State* L); -int os_pathsearch(lua_State* L); -int os_realpath(lua_State* L); -#if PLATFORM_WINDOWS -// utf8 versions -int os_remove(lua_State* L); -int os_rename(lua_State* L); -#endif -int os_rmdir(lua_State* L); -int os_stat(lua_State* L); -int os_uuid(lua_State* L); -int os_writefile_ifnotequal(lua_State* L); -int os_touchfile(lua_State* L); -int os_compile(lua_State* L); -int premake_getEmbeddedResource(lua_State* L); -int string_endswith(lua_State* L); -int string_hash(lua_State* L); -int string_sha1(lua_State* L); -int string_startswith(lua_State* L); -int buffered_new(lua_State* L); -int buffered_write(lua_State* L); -int buffered_writeln(lua_State* L); -int buffered_close(lua_State* L); -int buffered_tostring(lua_State* L); -int term_getTextColor(lua_State* L); -int term_setTextColor(lua_State* L); - -#ifdef PREMAKE_CURL -int http_get(lua_State* L); -int http_post(lua_State* L); -int http_download(lua_State* L); -#endif - -#ifdef PREMAKE_COMPRESSION -int zip_extract(lua_State* L); -#endif - -#ifdef _MSC_VER - #ifndef snprintf - #define snprintf _snprintf - #endif -#endif - -/* Engine interface */ - -typedef struct -{ - const char* name; - const unsigned char* bytecode; - size_t length; -} buildin_mapping; - -extern const buildin_mapping builtin_scripts[]; -extern void registerModules(lua_State* L); - -int premake_init(lua_State* L); -int premake_pcall(lua_State* L, int nargs, int nresults); -int premake_execute(lua_State* L, int argc, const char** argv, const char* script); -int premake_load_embedded_script(lua_State* L, const char* filename); -const buildin_mapping* premake_find_embedded_script(const char* filename); - -int premake_locate_executable(lua_State* L, const char* argv0); -int premake_test_file(lua_State* L, const char* filename, int searchMask); diff --git a/build/premake/premake5/src/host/premake_main.c b/build/premake/premake5/src/host/premake_main.c deleted file mode 100644 index 8473975784..0000000000 --- a/build/premake/premake5/src/host/premake_main.c +++ /dev/null @@ -1,24 +0,0 @@ -/** - * \file premake_main.c - * \brief Program entry point. - * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project - */ - -#include "premake.h" - -int main(int argc, const char** argv) -{ - lua_State* L; - int z; - - L = luaL_newstate(); - luaL_openlibs(L); - - z = premake_init(L); - if (z == OKAY) { - z = premake_execute(L, argc, argv, "src/_premake_main.lua"); - } - - lua_close(L); - return z; -} diff --git a/build/premake/premake5/src/host/string_endswith.c b/build/premake/premake5/src/host/string_endswith.c deleted file mode 100644 index 4fb22dba39..0000000000 --- a/build/premake/premake5/src/host/string_endswith.c +++ /dev/null @@ -1,28 +0,0 @@ -/** - * \file string_endswith.c - * \brief Determines if a string ends with the given sequence. - * \author Copyright (c) 2002-2009 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include - - -int string_endswith(lua_State* L) -{ - const char* haystack = luaL_optstring(L, 1, NULL); - const char* needle = luaL_optstring(L, 2, NULL); - - if (haystack && needle) - { - size_t hlen = strlen(haystack); - size_t nlen = strlen(needle); - if (hlen >= nlen) - { - lua_pushboolean(L, strcmp(haystack + hlen - nlen, needle) == 0); - return 1; - } - } - - return 0; -} diff --git a/build/premake/premake5/src/host/string_hash.c b/build/premake/premake5/src/host/string_hash.c deleted file mode 100644 index 51e59ea239..0000000000 --- a/build/premake/premake5/src/host/string_hash.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * \file string_hash.c - * \brief Computes a hash value for a string. - * \author Copyright (c) 2012-2014 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include - - -int string_hash(lua_State* L) -{ - const char* str = luaL_checkstring(L, 1); - int seed = (int)luaL_optinteger(L, 2, 0); - lua_pushinteger(L, do_hash(str, seed)); - return 1; -} - - -uint32_t do_hash(const char* str, int seed) -{ - /* DJB2 hashing; see http://www.cse.yorku.ca/~oz/hash.html */ - - uint32_t hash = 5381; - - if (seed != 0) { - hash = hash * 33 + seed; - } - - while (*str) { - hash = hash * 33 + (*str); - str++; - } - - return hash; -} diff --git a/build/premake/premake5/src/host/string_sha1.c b/build/premake/premake5/src/host/string_sha1.c deleted file mode 100644 index 81618a54d2..0000000000 --- a/build/premake/premake5/src/host/string_sha1.c +++ /dev/null @@ -1,185 +0,0 @@ -#include -#include -#include "premake.h" - -#define HASH_LENGTH 20 -#define BLOCK_LENGTH 64 - -typedef struct sha1nfo { - uint32_t buffer[BLOCK_LENGTH / 4]; - uint32_t state[HASH_LENGTH / 4]; - uint32_t byteCount; - uint8_t bufferOffset; - uint8_t keyBuffer[BLOCK_LENGTH]; - uint8_t innerHash[HASH_LENGTH]; -} sha1nfo; - -/* public API - prototypes - TODO: doxygen*/ -void sha1_init(sha1nfo *s); -void sha1_writebyte(sha1nfo *s, uint8_t data); -void sha1_write(sha1nfo *s, const char *data, size_t len); -uint8_t* sha1_result(sha1nfo *s); - -/* code */ -#define SHA1_K0 0x5a827999 -#define SHA1_K20 0x6ed9eba1 -#define SHA1_K40 0x8f1bbcdc -#define SHA1_K60 0xca62c1d6 - -void sha1_init(sha1nfo *s) -{ - s->state[0] = 0x67452301; - s->state[1] = 0xefcdab89; - s->state[2] = 0x98badcfe; - s->state[3] = 0x10325476; - s->state[4] = 0xc3d2e1f0; - s->byteCount = 0; - s->bufferOffset = 0; -} - -uint32_t sha1_rol32(uint32_t number, uint8_t bits) -{ - return ((number << bits) | (number >> (32 - bits))); -} - -void sha1_hashBlock(sha1nfo *s) -{ - uint8_t i; - uint32_t a, b, c, d, e, t; - - a = s->state[0]; - b = s->state[1]; - c = s->state[2]; - d = s->state[3]; - e = s->state[4]; - for (i = 0; i < 80; i++) - { - if (i >= 16) - { - t = s->buffer[(i + 13) & 15] ^ s->buffer[(i + 8) & 15] ^ s->buffer[(i + 2) & 15] ^ s->buffer[i & 15]; - s->buffer[i & 15] = sha1_rol32(t, 1); - } - if (i < 20) - { - t = (d ^ (b & (c ^ d))) + SHA1_K0; - } - else if (i < 40) - { - t = (b ^ c ^ d) + SHA1_K20; - } - else if (i < 60) - { - t = ((b & c) | (d & (b | c))) + SHA1_K40; - } - else - { - t = (b ^ c ^ d) + SHA1_K60; - } - t += sha1_rol32(a, 5) + e + s->buffer[i & 15]; - e = d; - d = c; - c = sha1_rol32(b, 30); - b = a; - a = t; - } - s->state[0] += a; - s->state[1] += b; - s->state[2] += c; - s->state[3] += d; - s->state[4] += e; -} - -void sha1_addUncounted(sha1nfo *s, uint8_t data) -{ - uint8_t * const b = (uint8_t*)s->buffer; - b[s->bufferOffset ^ 3] = data; - s->bufferOffset++; - if (s->bufferOffset == BLOCK_LENGTH) - { - sha1_hashBlock(s); - s->bufferOffset = 0; - } -} - -void sha1_writebyte(sha1nfo *s, uint8_t data) -{ - ++s->byteCount; - sha1_addUncounted(s, data); -} - -void sha1_write(sha1nfo *s, const char *data, size_t len) -{ - for (; len--;) sha1_writebyte(s, (uint8_t)*data++); -} - -void sha1_pad(sha1nfo *s) -{ - // Implement SHA-1 padding (fips180-2 §5.1.1) - - // Pad with 0x80 followed by 0x00 until the end of the block - sha1_addUncounted(s, 0x80); - while (s->bufferOffset != 56) sha1_addUncounted(s, 0x00); - - // Append length in the last 8 bytes - sha1_addUncounted(s, 0); // We're only using 32 bit lengths - sha1_addUncounted(s, 0); // But SHA-1 supports 64 bit lengths - sha1_addUncounted(s, 0); // So zero pad the top bits - sha1_addUncounted(s, s->byteCount >> 29); // Shifting to multiply by 8 - sha1_addUncounted(s, (uint8_t)(s->byteCount >> 21)); // as SHA-1 supports bitstreams as well as - sha1_addUncounted(s, (uint8_t)(s->byteCount >> 13)); // byte. - sha1_addUncounted(s, (uint8_t)(s->byteCount >> 5)); - sha1_addUncounted(s, (uint8_t)(s->byteCount << 3)); -} - -uint8_t* sha1_result(sha1nfo *s) -{ - int i; - - // Pad to complete the last block - sha1_pad(s); - - // Swap byte order back - for (i = 0; i < 5; i++) - { - s->state[i] = - (((s->state[i]) << 24) & 0xff000000) - | (((s->state[i]) << 8) & 0x00ff0000) - | (((s->state[i]) >> 8) & 0x0000ff00) - | (((s->state[i]) >> 24) & 0x000000ff); - } - - // Return pointer to hash (20 characters) - return (uint8_t*)s->state; -} - - - -int string_sha1(lua_State* L) -{ - static const char* g_int2hex = "0123456789ABCDEF"; - uint8_t* result; - size_t l; - sha1nfo s; - int i; - char output[41]; - - const char *str = luaL_checklstring(L, 1, &l); - if (str != NULL) - { - sha1_init(&s); - sha1_write(&s, str, l); - result = sha1_result(&s); - - for (i = 0; i < 20; ++i) - { - output[i * 2 + 0] = g_int2hex[result[i] & 0x0f]; - output[i * 2 + 1] = g_int2hex[result[i] >> 4]; - } - output[40] = 0; - - lua_pushlstring(L, output, 40); - return 1; - } - - return 0; -} diff --git a/build/premake/premake5/src/host/string_startswith.c b/build/premake/premake5/src/host/string_startswith.c deleted file mode 100644 index 2a223a852d..0000000000 --- a/build/premake/premake5/src/host/string_startswith.c +++ /dev/null @@ -1,24 +0,0 @@ -/** - * \file string_startswith.c - * \brief Determines if a string starts with the given sequence. - * \author Copyright (c) 2013 Jason Perkins and the Premake project - */ - -#include "premake.h" -#include - - -int string_startswith(lua_State* L) -{ - const char* haystack = luaL_optstring(L, 1, NULL); - const char* needle = luaL_optstring(L, 2, NULL); - - if (haystack && needle) - { - size_t nlen = strlen(needle); - lua_pushboolean(L, strncmp(haystack, needle, nlen) == 0); - return 1; - } - - return 0; -} diff --git a/build/premake/premake5/src/host/term_textColor.c b/build/premake/premake5/src/host/term_textColor.c deleted file mode 100644 index 7a5523e593..0000000000 --- a/build/premake/premake5/src/host/term_textColor.c +++ /dev/null @@ -1,114 +0,0 @@ -/** - * \file term_textColor.c - * \brief Change the foreground color of the terminal output. - * \author Copyright (c) 2017 Blizzard Entertainment and the Premake project - */ - -#include "premake.h" - -#if PLATFORM_WINDOWS -#include -#endif - -#if PLATFORM_POSIX -static int s_currentColor = -1; -#endif - -int canUseColors() -{ -#if PLATFORM_WINDOWS - return _isatty(_fileno(stdout)); -#else - return isatty(1); -#endif -} - -static const char *getenvOrFallback(const char *var, const char *fallback) -{ - const char *value = getenv(var); - return (value != NULL) ? value : fallback; -} - -static int s_shouldUseColor = -1; -static int shouldUseColors() -{ - if (s_shouldUseColor < 0) - { - // CLICOLOR* documented at: http://bixense.com/clicolors/ - s_shouldUseColor = ((getenvOrFallback("CLICOLOR", "1")[0] != '0') && canUseColors()) - || getenvOrFallback("CLICOLOR_FORCE", "0")[0] != '0'; - } - return s_shouldUseColor; -} - -int term_doGetTextColor() -{ -#if PLATFORM_WINDOWS - CONSOLE_SCREEN_BUFFER_INFO info; - if (!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info)) - return -1; - return (int)info.wAttributes; -#else - return s_currentColor; -#endif -} - -void term_doSetTextColor(int color) -{ -#if PLATFORM_WINDOWS - if (color >= 0 && shouldUseColors()) - { - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), (WORD)color); - SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), (WORD)color); - } -#else - - // Do not output colors e.g. into a pipe, unless forced. - if (!shouldUseColors()) - return; - - s_currentColor = color; - - const char* colorTable[] = - { - "\x1B[0;30m", // term.black = 0 - "\x1B[0;34m", // term.blue = 1 - "\x1B[0;32m", // term.green = 2 - "\x1B[0;36m", // term.cyan = 3 - "\x1B[0;31m", // term.red = 4 - "\x1B[0;35m", // term.purple = 5 - "\x1B[0;33m", // term.brown = 6 - "\x1B[0;37m", // term.lightGray = 7 - "\x1B[1;30m", // term.gray = 8 - "\x1B[1;34m", // term.lightBlue = 9 - "\x1B[1;32m", // term.lightGreen = 10 - "\x1B[1;36m", // term.lightCyan = 11 - "\x1B[1;31m", // term.lightRed = 12 - "\x1B[1;35m", // term.magenta = 13 - "\x1B[1;33m", // term.yellow = 14 - "\x1B[1;37m", // term.white = 15 - }; - if (color >= 0 && color < 16) - { - fputs(colorTable[color], stdout); - } else - { - fputs("\x1B[0m", stdout); - } -#endif -} - - -int term_getTextColor(lua_State* L) -{ - int color = term_doGetTextColor(); - lua_pushinteger(L, color); - return 1; -} - - -int term_setTextColor(lua_State* L) -{ - term_doSetTextColor((int)luaL_optinteger(L, 1, -1)); - return 0; -} diff --git a/build/premake/premake5/src/host/zip_extract.c b/build/premake/premake5/src/host/zip_extract.c deleted file mode 100644 index 96b2d59bc0..0000000000 --- a/build/premake/premake5/src/host/zip_extract.c +++ /dev/null @@ -1,234 +0,0 @@ -/** -* \file os_unzip.c -* \brief Unzip file using libzip library. -* \author battle.net -- abrunasso.int@blizzard.com -*/ - -#include "premake.h" - -#ifdef PREMAKE_COMPRESSION - -#include "zip.h" - -#ifdef WIN32 -#include -#include -#endif - -#include -#include -#include -#include - -// File Attribute for Unix -#define FA_IFIFO 0010000 /* named pipe (fifo) */ -#define FA_IFCHR 0020000 /* character special */ -#define FA_IFDIR 0040000 /* directory */ -#define FA_IFBLK 0060000 /* block special */ -#define FA_IFREG 0100000 /* regular */ -#define FA_IFLNK 0120000 /* symbolic link */ -#define FA_IFSOCK 0140000 /* socket */ - -#define FA_ISUID 0004000 /* set user id on execution */ -#define FA_ISGID 0002000 /* set group id on execution */ -#define FA_ISTXT 0001000 /* sticky bit */ -#define FA_IRWXU 0000700 /* RWX mask for owner */ -#define FA_IRUSR 0000400 /* R for owner */ -#define FA_IWUSR 0000200 /* W for owner */ -#define FA_IXUSR 0000100 /* X for owner */ -#define FA_IRWXG 0000070 /* RWX mask for group */ -#define FA_IRGRP 0000040 /* R for group */ -#define FA_IWGRP 0000020 /* W for group */ -#define FA_IXGRP 0000010 /* X for group */ -#define FA_IRWXO 0000007 /* RWX mask for other */ -#define FA_IROTH 0000004 /* R for other */ -#define FA_IWOTH 0000002 /* W for other */ -#define FA_IXOTH 0000001 /* X for other */ -#define FA_ISVTX 0001000 /* save swapped text even after use */ - -// ---------------------------------------------------------------------------- - -static int is_symlink(zip_uint8_t opsys, zip_uint32_t attrib) -{ - if (opsys == ZIP_OPSYS_DOS) - return (attrib & 0x400) == 0x400; // FILE_ATTRIBUTE_REPARSE_POINT - - if (opsys == ZIP_OPSYS_UNIX) - return ((attrib >> 16) & FA_IFLNK) == FA_IFLNK; - - return 0; -} - - -static int is_directory(zip_uint8_t opsys, zip_uint32_t attrib) -{ - if (opsys == ZIP_OPSYS_DOS) - return (attrib & 0x10) == 0x10; // FILE_ATTRIBUTE_DIRECTORY - - if (opsys == ZIP_OPSYS_UNIX) - return ((attrib >> 16) & FA_IFDIR) == FA_IFDIR; - - return 0; -} - - -static int write_link(const char* filename, const char* bytes, size_t count) -{ -#if PLATFORM_POSIX - (void)(count); - return symlink(bytes, filename); -#else - FILE* fp = fopen(filename, "wb"); - if (fp == NULL) - { - printf("Error creating file:\n %s\n", filename); - return -1; - } - fwrite(bytes, sizeof(char), count, fp); - fclose(fp); - return 0; -#endif -} - -extern int do_mkdir(const char* path); - -static void parse_path(const char* full_name, char* filename, char* directory) -{ - const char *ssc; - size_t orig_length = strlen(full_name); - size_t l = 0; - size_t dir_size; - - ssc = strstr(full_name, "/"); - do - { - l = strlen(ssc) + 1; - full_name = &full_name[strlen(full_name) - l + 2]; - ssc = strstr(full_name, "/"); - } while (ssc); - - // full_name currently pointing to beginning of filename - memcpy(filename, full_name, strlen(full_name)); - filename[strlen(full_name)] = 0; // Null terminate it - - dir_size = orig_length - strlen(filename); - // full_name points to beginning of original string(with directory) - full_name = &full_name[strlen(full_name) - orig_length]; - - // Extract directory from full name by removing filename - memcpy(directory, full_name, dir_size); - directory[dir_size] = 0; -} - - -static int extract(const char* src, const char* destination) -{ - int err = 0; - FILE *fp = NULL; - struct zip *z_archive = zip_open(src, 0, &err); - int i; - zip_int64_t entries; - char buffer[4096]; - char appended_full_name[512]; - char directory[512]; - char filename[512]; - size_t result; - zip_int64_t bytes_read; - - if (!z_archive) - { - printf("%s does not exist\n", src); - return -1; - } - - for (i = 0, entries = zip_get_num_entries(z_archive, 0); i < entries; ++i) - { - zip_uint8_t opsys; - zip_uint32_t attrib; - const char* full_name; - - struct zip_file* zf = zip_fopen_index(z_archive, i, 0); - if (!zf) - continue; - - zip_file_get_external_attributes(z_archive, i, 0, &opsys, &attrib); - - full_name = zip_get_name(z_archive, i, 0); - - sprintf(appended_full_name, "%s/%s", destination, full_name); - do_translate(appended_full_name, '/'); - - parse_path(appended_full_name, filename, directory); - do_mkdir(directory); - - // is this a symbolic link? - if (is_symlink(opsys, attrib)) - { - bytes_read = zip_fread(zf, buffer, sizeof(buffer)); - buffer[bytes_read] = '\0'; - if (write_link(appended_full_name, buffer, (size_t)bytes_read) != 0) - { - printf(" Failed to create symbolic link [%s->%s]\n", appended_full_name, buffer); - return -1; - } - } else - { - // If blank filename it's just a directory so create it and move on - if (!is_directory(opsys, attrib) && strlen(filename) > 0) - { - // mark as read-write, so we can overwrite the file if it already exists. - chmod(appended_full_name, 0666); - - fp = fopen(appended_full_name, "wb"); - if (fp == NULL) - { - printf("Error creating file:\n %s\n", appended_full_name); - return -1; - } - for(;;) - { - // Read content from zipped file - bytes_read = zip_fread(zf, buffer, sizeof(buffer)); - if (bytes_read == 0) break; - // Write that content to file - result = fwrite(buffer, sizeof(char), (size_t)bytes_read, fp); - // If all bytes read weren't written, report error - if (result != (size_t)bytes_read) - { - printf(" Writing data to %s failed\n %d bytes were written\n %d bytes were attempted to be written\n File may be corrupt\n", - appended_full_name, (int)result, (int)bytes_read); - return -1; - } - } - - fclose(fp); - - // mark read-only, but maintain the other properties. - if (opsys == ZIP_OPSYS_UNIX) - chmod(appended_full_name, (attrib >> 16) & ~0222); - else - chmod(appended_full_name, 0444); - } - } - - // Cleanup - zip_fclose(zf); - } - zip_close(z_archive); - - return 0; -} - - -int zip_extract(lua_State* L) -{ - const char* src = luaL_checkstring(L, 1); - const char* dst = luaL_checkstring(L, 2); - - int res = extract(src, dst); - - lua_pushnumber(L, (lua_Number)res); - return 1; -} - -#endif diff --git a/build/premake/premake5/src/scripts.c b/build/premake/premake5/src/scripts.c deleted file mode 100644 index 9ed203c266..0000000000 --- a/build/premake/premake5/src/scripts.c +++ /dev/null @@ -1,19512 +0,0 @@ -/* Premake's Lua scripts, as static data buffers for release mode builds */ -/* DO NOT EDIT - this file is autogenerated - see BUILD.txt */ -/* To regenerate this file, run: premake5 embed */ - -#include "host/premake.h" - -// src/base/_foundation.lua -static const unsigned char builtin_script_0[] = { -112, 114, 101, 109, 97, 107, 101, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 32, 111, 114, 32, 123, 125, 10, 112, 114, 101, 109, 97, 107, 101, 46, - 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 95, 80, 82, 69, 77, 65, 75, 69, 95, 86, 69, 82, 83, 73, 79, 78, 10, 112, 97, 99, 107, - 97, 103, 101, 46, 108, 111, 97, 100, 101, 100, 91, 34, 112, 114, 101, 109, 97, 107, 101, 34, 93, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, -112, 114, 101, 109, 97, 107, 101, 46, 109, 111, 100, 117, 108, 101, 115, 32, 61, 32, 123, 125, 10, 112, 114, 101, 109, 97, 107, 101, 46, 101, 120, 116, -101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 109, 111, 100, 117, 108, 101, 115, 10, 108, 111, 99, 97, 108, 32, -115, 101, 109, 118, 101, 114, 32, 61, 32, 100, 111, 102, 105, 108, 101, 40, 39, 115, 101, 109, 118, 101, 114, 46, 108, 117, 97, 39, 41, 10, 108, 111, - 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 95, 119, 97, 114, 110, 105, 110, 103, 115, 32, - 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 95, 97, 108, 105, 97, 115, 101, 115, 32, 61, 32, 123, 125, 10, 112, 114, 101, 109, 97, 107, 101, - 46, 67, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 67, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 67, 55, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 99, 55, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 67, 76, 65, 78, 71, 32, 32, 32, 32, 32, - 32, 32, 61, 32, 34, 99, 108, 97, 110, 103, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 67, 79, 78, 83, 79, 76, 69, 65, 80, 80, 32, 32, - 61, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 67, 80, 80, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 34, 67, 43, 43, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 67, 83, 72, 65, 82, 80, 32, 32, 32, 32, 32, 32, 61, - 32, 34, 67, 35, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 71, 67, 67, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 103, 99, 99, - 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 72, 65, 73, 75, 85, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 104, 97, 105, 107, 117, 34, 10, -112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 32, 32, 32, 32, 61, 32, 34, 97, 110, 100, 114, 111, 105, 100, 34, 10, -112, 114, 101, 109, 97, 107, 101, 46, 73, 79, 83, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 105, 111, 115, 34, 10, 112, 114, 101, 109, - 97, 107, 101, 46, 76, 73, 78, 85, 88, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 108, 105, 110, 117, 120, 34, 10, 112, 114, 101, 109, 97, 107, -101, 46, 77, 65, 67, 79, 83, 88, 32, 32, 32, 32, 32, 32, 61, 32, 34, 109, 97, 99, 111, 115, 120, 34, 10, 112, 114, 101, 109, 97, 107, 101, - 46, 77, 65, 75, 69, 70, 73, 76, 69, 32, 32, 32, 32, 61, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 10, 112, 114, 101, 109, 97, 107, -101, 46, 77, 66, 67, 83, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 77, 66, 67, 83, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 78, - 79, 78, 69, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 78, 111, 110, 101, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 68, 69, 70, 65, - 85, 76, 84, 32, 32, 32, 32, 32, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 79, 66, 74, 69, - 67, 84, 73, 86, 69, 67, 32, 32, 32, 61, 32, 34, 79, 98, 106, 101, 99, 116, 105, 118, 101, 45, 67, 34, 10, 112, 114, 101, 109, 97, 107, 101, - 46, 79, 66, 74, 69, 67, 84, 73, 86, 69, 67, 80, 80, 32, 61, 32, 34, 79, 98, 106, 101, 99, 116, 105, 118, 101, 45, 67, 43, 43, 34, 10, -112, 114, 101, 109, 97, 107, 101, 46, 79, 78, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 79, 110, 34, 10, 112, 114, 101, 109, 97, -107, 101, 46, 79, 70, 70, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 79, 102, 102, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 80, - 79, 83, 73, 88, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 112, 111, 115, 105, 120, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 80, 83, 51, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 112, 115, 51, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 83, 72, 65, 82, 69, 68, 73, - 84, 69, 77, 83, 32, 61, 32, 34, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 83, 72, 65, - 82, 69, 68, 76, 73, 66, 32, 32, 32, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, 83, - 84, 65, 84, 73, 67, 76, 73, 66, 32, 32, 32, 61, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 10, 112, 114, 101, 109, 97, 107, 101, - 46, 85, 78, 73, 67, 79, 68, 69, 32, 32, 32, 32, 32, 61, 32, 34, 85, 110, 105, 99, 111, 100, 101, 34, 10, 112, 114, 101, 109, 97, 107, 101, - 46, 85, 78, 73, 86, 69, 82, 83, 65, 76, 32, 32, 32, 61, 32, 34, 117, 110, 105, 118, 101, 114, 115, 97, 108, 34, 10, 112, 114, 101, 109, 97, -107, 101, 46, 85, 84, 73, 76, 73, 84, 89, 32, 32, 32, 32, 32, 61, 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, 10, 112, 114, 101, 109, 97, -107, 101, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 32, 32, 61, 32, 34, 80, 97, 99, 107, 97, 103, 105, 110, 103, 34, 10, 112, 114, 101, -109, 97, 107, 101, 46, 87, 73, 78, 68, 79, 87, 69, 68, 65, 80, 80, 32, 61, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, - 10, 112, 114, 101, 109, 97, 107, 101, 46, 87, 73, 78, 68, 79, 87, 83, 32, 32, 32, 32, 32, 61, 32, 34, 119, 105, 110, 100, 111, 119, 115, 34, - 10, 112, 114, 101, 109, 97, 107, 101, 46, 88, 56, 54, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 120, 56, 54, 34, 10, 112, 114, 101, -109, 97, 107, 101, 46, 88, 56, 54, 95, 54, 52, 32, 32, 32, 32, 32, 32, 61, 32, 34, 120, 56, 54, 95, 54, 52, 34, 10, 112, 114, 101, 109, - 97, 107, 101, 46, 65, 82, 77, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 65, 82, 77, 34, 10, 112, 114, 101, 109, 97, 107, 101, 46, - 65, 82, 77, 54, 52, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 65, 82, 77, 54, 52, 34, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, - 46, 97, 108, 105, 97, 115, 40, 115, 99, 111, 112, 101, 44, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, 44, 32, 97, 108, 105, 97, 115, 41, 10, -115, 99, 111, 112, 101, 44, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, 32, 61, 32, 112, 46, 114, 101, 115, 111, 108, 118, 101, 65, 108, 105, 97, -115, 40, 115, 99, 111, 112, 101, 44, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 99, 111, 112, 101, - 91, 99, 97, 110, 111, 110, 105, 99, 97, 108, 93, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 117, 110, 97, 98, 108, 101, 32, 116, -111, 32, 97, 108, 105, 97, 115, 32, 39, 34, 32, 46, 46, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, 32, 46, 46, 32, 34, 39, 59, 32, 110, -111, 32, 115, 117, 99, 104, 32, 102, 117, 110, 99, 116, 105, 111, 110, 34, 44, 32, 50, 41, 10, 101, 110, 100, 10, 95, 97, 108, 105, 97, 115, 101, -115, 91, 115, 99, 111, 112, 101, 93, 32, 61, 32, 95, 97, 108, 105, 97, 115, 101, 115, 91, 115, 99, 111, 112, 101, 93, 32, 111, 114, 32, 123, 125, - 10, 95, 97, 108, 105, 97, 115, 101, 115, 91, 115, 99, 111, 112, 101, 93, 91, 97, 108, 105, 97, 115, 93, 32, 61, 32, 99, 97, 110, 111, 110, 105, - 99, 97, 108, 10, 115, 99, 111, 112, 101, 91, 97, 108, 105, 97, 115, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 46, 46, 46, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 115, 99, 111, 112, 101, 91, 99, 97, 110, 111, 110, 105, 99, 97, 108, 93, 40, 46, 46, 46, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, - 40, 102, 117, 110, 99, 115, 44, 32, 46, 46, 46, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 117, 110, 99, 115, 41, 32, 61, 61, 32, 34, -102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 102, 117, 110, 99, 115, 32, 61, 32, 102, 117, 110, 99, 115, 40, 46, 46, 46, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 102, 117, 110, 99, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, -102, 117, 110, 99, 115, 32, 100, 111, 10, 102, 117, 110, 99, 115, 91, 105, 93, 40, 46, 46, 46, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 99, 97, 108, 108, 97, 114, 114, 97, 121, 40, 110, 97, -109, 101, 115, 112, 97, 99, 101, 44, 32, 97, 114, 114, 97, 121, 44, 32, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, - 97, 114, 114, 97, 121, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 110, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 110, 32, 61, - 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 91, 97, 114, 114, 97, 121, 91, 105, 93, 93, 10, 105, 102, 32, 110, 111, 116, 32, 102, 110, 32, 116, -104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 85, 110, 97, 98, 108, 101, 32, -116, 111, 32, 102, 105, 110, 100, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 39, 37, 115, 39, 34, 44, 32, 97, 114, 114, 97, 121, 91, 105, 93, - 41, 41, 10, 101, 110, 100, 10, 102, 110, 40, 46, 46, 46, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -112, 46, 99, 104, 101, 99, 107, 86, 101, 114, 115, 105, 111, 110, 40, 118, 101, 114, 115, 105, 111, 110, 44, 32, 99, 104, 101, 99, 107, 115, 41, 10, -105, 102, 32, 110, 111, 116, 32, 118, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, - 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 101, 109, 97, 107, 101, 46, 105, 115, 83, 101, 109, 86, 101, 114, 40, 118, 101, 114, -115, 105, 111, 110, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 39, 34, 32, 46, 46, 32, 118, 101, 114, 115, 105, 111, 110, - 32, 46, 46, 32, 34, 39, 32, 105, 115, 32, 110, 111, 116, 32, 115, 101, 109, 118, 101, 114, 32, 99, 111, 109, 112, 97, 116, 105, 98, 108, 101, 44, - 32, 97, 110, 100, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 99, 111, 109, 112, 97, 114, 101, 100, 32, 97, 103, 97, 105, 110, 115, 116, 32, - 39, 34, 32, 46, 46, 32, 99, 104, 101, 99, 107, 115, 32, 46, 46, 32, 34, 39, 46, 34, 41, 59, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, -117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 101, 113, 40, 97, 44, 32, 98, 41, 32, 114, -101, 116, 117, 114, 110, 32, 97, 32, 61, 61, 32, 98, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, -108, 101, 40, 97, 44, 32, 98, 41, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 60, 61, 32, 98, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 116, 40, 97, 44, 32, 98, 41, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 60, 32, 98, 32, - 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 101, 40, 97, 44, 32, 98, 41, 32, 114, 101, 116, -117, 114, 110, 32, 97, 32, 62, 61, 32, 98, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 116, - 40, 97, 44, 32, 98, 41, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 62, 32, 98, 32, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, -117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 109, 112, 97, 116, 40, 97, 44, 32, 98, 41, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 94, 32, - 98, 32, 32, 101, 110, 100, 10, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 115, 101, 109, 118, 101, 114, 40, 118, 101, 114, 115, 105, 111, 110, 41, - 10, 99, 104, 101, 99, 107, 115, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 101, 120, 112, 108, 111, 100, 101, 40, 99, 104, 101, 99, 107, 115, 44, - 32, 34, 32, 34, 44, 32, 116, 114, 117, 101, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 104, 101, 99, 107, 115, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 99, 104, 101, 99, 107, 32, 61, 32, 99, 104, 101, 99, 107, 115, 91, 105, 93, 10, 108, 111, 99, 97, 108, 32, -102, 117, 110, 99, 10, 105, 102, 32, 99, 104, 101, 99, 107, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 62, 61, 34, 41, 32, 116, -104, 101, 110, 10, 102, 117, 110, 99, 32, 61, 32, 103, 101, 10, 99, 104, 101, 99, 107, 32, 61, 32, 99, 104, 101, 99, 107, 58, 115, 117, 98, 40, - 51, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 104, 101, 99, 107, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 62, 34, 41, 32, -116, 104, 101, 110, 10, 102, 117, 110, 99, 32, 61, 32, 103, 116, 10, 99, 104, 101, 99, 107, 32, 61, 32, 99, 104, 101, 99, 107, 58, 115, 117, 98, - 40, 50, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 104, 101, 99, 107, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 60, 61, 34, - 41, 32, 116, 104, 101, 110, 10, 102, 117, 110, 99, 32, 61, 32, 108, 101, 10, 99, 104, 101, 99, 107, 32, 61, 32, 99, 104, 101, 99, 107, 58, 115, -117, 98, 40, 51, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 104, 101, 99, 107, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 60, - 34, 41, 32, 116, 104, 101, 110, 10, 102, 117, 110, 99, 32, 61, 32, 108, 116, 10, 99, 104, 101, 99, 107, 32, 61, 32, 99, 104, 101, 99, 107, 58, -115, 117, 98, 40, 50, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 104, 101, 99, 107, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, - 61, 34, 41, 32, 116, 104, 101, 110, 10, 102, 117, 110, 99, 32, 61, 32, 101, 113, 10, 99, 104, 101, 99, 107, 32, 61, 32, 99, 104, 101, 99, 107, - 58, 115, 117, 98, 40, 50, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 104, 101, 99, 107, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, - 34, 94, 34, 41, 32, 116, 104, 101, 110, 10, 102, 117, 110, 99, 32, 61, 32, 99, 111, 109, 112, 97, 116, 10, 99, 104, 101, 99, 107, 32, 61, 32, - 99, 104, 101, 99, 107, 58, 115, 117, 98, 40, 50, 41, 10, 101, 108, 115, 101, 10, 102, 117, 110, 99, 32, 61, 32, 103, 101, 10, 101, 110, 100, 10, - 99, 104, 101, 99, 107, 32, 61, 32, 115, 101, 109, 118, 101, 114, 40, 99, 104, 101, 99, 107, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 117, 110, - 99, 40, 118, 101, 114, 115, 105, 111, 110, 44, 32, 99, 104, 101, 99, 107, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, -108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 99, 108, 101, 97, 114, 87, 97, 114, 110, 105, 110, 103, 115, 40, 41, 10, 95, 119, 97, -114, 110, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, - 46, 101, 114, 114, 111, 114, 40, 109, 101, 115, 115, 97, 103, 101, 44, 32, 46, 46, 46, 41, 10, 101, 114, 114, 111, 114, 40, 115, 116, 114, 105, 110, -103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 42, 42, 32, 69, 114, 114, 111, 114, 58, 32, 34, 32, 46, 46, 32, 109, 101, 115, 115, 97, 103, 101, - 44, 32, 46, 46, 46, 41, 44, 32, 48, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, -102, 105, 110, 100, 80, 114, 111, 106, 101, 99, 116, 83, 99, 114, 105, 112, 116, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, -111, 115, 46, 108, 111, 99, 97, 116, 101, 40, 102, 110, 97, 109, 101, 44, 32, 102, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 108, 117, 97, 34, - 44, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 102, 110, 97, 109, 101, 44, 32, 34, 112, 114, 101, 109, 97, 107, 101, 53, 46, 108, 117, 97, - 34, 41, 44, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 102, 110, 97, 109, 101, 44, 32, 34, 112, 114, 101, 109, 97, 107, 101, 52, 46, 108, -117, 97, 34, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 105, 105, 102, 40, 99, 111, 110, 100, 105, 116, 105, 111, 110, - 44, 32, 116, 114, 117, 101, 86, 97, 108, 117, 101, 44, 32, 102, 97, 108, 115, 101, 86, 97, 108, 117, 101, 41, 10, 105, 102, 32, 99, 111, 110, 100, -105, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 86, 97, 108, 117, 101, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 86, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 115, 99, 111, 112, 101, 44, 32, 110, 97, 109, 101, - 44, 32, 114, 101, 112, 108, 41, 10, 115, 99, 111, 112, 101, 44, 32, 110, 97, 109, 101, 32, 61, 32, 112, 46, 114, 101, 115, 111, 108, 118, 101, 65, -108, 105, 97, 115, 40, 115, 99, 111, 112, 101, 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 111, 114, 105, 103, 105, 110, 97, 108, - 32, 61, 32, 115, 99, 111, 112, 101, 91, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 111, 114, 105, 103, 105, 110, 97, 108, 32, 116, -104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 117, 110, 97, 98, 108, 101, 32, 116, 111, 32, 111, 118, 101, 114, 114, 105, 100, 101, 32, 39, 34, - 32, 46, 46, 32, 110, 97, 109, 101, 32, 46, 46, 32, 34, 39, 59, 32, 110, 111, 32, 115, 117, 99, 104, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 34, 44, 32, 50, 41, 10, 101, 110, 100, 10, 115, 99, 111, 112, 101, 91, 110, 97, 109, 101, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 46, 46, 46, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 112, 108, 40, 111, 114, 105, 103, 105, 110, 97, 108, 44, 32, 46, 46, 46, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 115, 99, 111, 112, 101, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 109, 97, 105, 110, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 114, 101, 112, 108, 97, 99, 101, 40, 112, 114, 101, 109, 97, 107, 101, 46, 109, 97, 105, 110, 46, 101, 108, -101, 109, 101, 110, 116, 115, 44, 32, 111, 114, 105, 103, 105, 110, 97, 108, 44, 32, 115, 99, 111, 112, 101, 91, 110, 97, 109, 101, 93, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 114, 101, 115, 111, 108, 118, 101, 65, 108, 105, 97, 115, 40, 115, - 99, 111, 112, 101, 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 97, 108, 105, 97, 115, 101, 115, 32, 61, 32, 95, 97, 108, 105, - 97, 115, 101, 115, 91, 115, 99, 111, 112, 101, 93, 10, 105, 102, 32, 97, 108, 105, 97, 115, 101, 115, 32, 116, 104, 101, 110, 10, 119, 104, 105, 108, -101, 32, 97, 108, 105, 97, 115, 101, 115, 91, 110, 97, 109, 101, 93, 32, 100, 111, 10, 110, 97, 109, 101, 32, 61, 32, 97, 108, 105, 97, 115, 101, -115, 91, 110, 97, 109, 101, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 115, 99, 111, 112, 101, 44, 32, 110, 97, -109, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, 114, 110, 40, 109, 101, 115, -115, 97, 103, 101, 44, 32, 46, 46, 46, 41, 10, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, - 97, 116, 40, 109, 101, 115, 115, 97, 103, 101, 44, 32, 46, 46, 46, 41, 10, 105, 102, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 102, 97, 116, - 97, 108, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 109, 101, 115, 115, 97, 103, 101, 41, 10, 101, 108, 115, 101, 10, 116, 101, 114, 109, - 46, 112, 117, 115, 104, 67, 111, 108, 111, 114, 40, 116, 101, 114, 109, 46, 119, 97, 114, 110, 105, 110, 103, 67, 111, 108, 111, 114, 41, 10, 105, 111, - 46, 115, 116, 100, 101, 114, 114, 58, 119, 114, 105, 116, 101, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 42, 42, 32, - 87, 97, 114, 110, 105, 110, 103, 58, 32, 34, 32, 46, 46, 32, 109, 101, 115, 115, 97, 103, 101, 32, 46, 46, 32, 34, 92, 110, 34, 44, 32, 46, - 46, 46, 41, 41, 10, 116, 101, 114, 109, 46, 112, 111, 112, 67, 111, 108, 111, 114, 40, 41, 59, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 107, 101, 121, 44, 32, 109, 101, 115, -115, 97, 103, 101, 44, 32, 46, 46, 46, 41, 10, 105, 102, 32, 110, 111, 116, 32, 95, 119, 97, 114, 110, 105, 110, 103, 115, 91, 107, 101, 121, 93, - 32, 116, 104, 101, 110, 10, 95, 119, 97, 114, 110, 105, 110, 103, 115, 91, 107, 101, 121, 93, 32, 61, 32, 116, 114, 117, 101, 10, 112, 114, 101, 109, - 97, 107, 101, 46, 119, 97, 114, 110, 40, 109, 101, 115, 115, 97, 103, 101, 44, 32, 46, 46, 46, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 105, 110, 102, 111, 40, 109, 101, 115, 115, 97, 103, 101, 44, 32, 46, 46, - 46, 41, 10, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 109, 101, 115, 115, 97, -103, 101, 44, 32, 46, 46, 46, 41, 10, 116, 101, 114, 109, 46, 112, 117, 115, 104, 67, 111, 108, 111, 114, 40, 116, 101, 114, 109, 46, 105, 110, 102, -111, 67, 111, 108, 111, 114, 41, 10, 105, 111, 46, 115, 116, 100, 111, 117, 116, 58, 119, 114, 105, 116, 101, 40, 115, 116, 114, 105, 110, 103, 46, 102, -111, 114, 109, 97, 116, 40, 34, 42, 42, 32, 73, 110, 102, 111, 58, 32, 34, 32, 46, 46, 32, 109, 101, 115, 115, 97, 103, 101, 32, 46, 46, 32, - 34, 92, 110, 34, 44, 32, 46, 46, 46, 41, 41, 10, 116, 101, 114, 109, 46, 112, 111, 112, 67, 111, 108, 111, 114, 40, 41, 59, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 105, 110, 116, 102, 40, 109, 115, 103, 44, 32, 46, 46, 46, 41, 10, 112, 114, 105, 110, 116, - 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 109, 115, 103, 44, 32, 46, 46, 46, 41, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 118, 101, 114, 98, 111, 115, 101, 102, 40, 109, 115, 103, 44, 32, 46, 46, 46, 41, 10, 105, 102, 32, 95, 79, 80, - 84, 73, 79, 78, 83, 46, 118, 101, 114, 98, 111, 115, 101, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 40, 115, 116, 114, 105, 110, 103, 46, -102, 111, 114, 109, 97, 116, 40, 109, 115, 103, 44, 32, 46, 46, 46, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 102, 105, 108, 101, 108, 105, 110, 101, 105, 110, 102, 111, 40, 108, 101, 118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 102, -111, 32, 61, 32, 100, 101, 98, 117, 103, 46, 103, 101, 116, 105, 110, 102, 111, 40, 108, 101, 118, 101, 108, 43, 49, 44, 32, 34, 83, 108, 34, 41, - 10, 105, 102, 32, 105, 110, 102, 111, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, -101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 119, 104, 97, 116, 32, 61, 61, 32, 34, 67, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 34, 67, 32, 102, 117, 110, 99, 116, 105, 111, 110, 34, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 115, 101, 112, 32, - 61, 32, 105, 105, 102, 40, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 39, 119, 105, 110, 100, 111, 119, 115, 39, 41, 44, 32, 39, 92, 92, 39, - 44, 32, 39, 47, 39, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 115, 40, - 37, 100, 41, 34, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 105, 110, 102, 111, 46, 115, 104, 111, 114, 116, 95, -115, 114, 99, 44, 32, 115, 101, 112, 41, 44, 32, 105, 110, 102, 111, 46, 99, 117, 114, 114, 101, 110, 116, 108, 105, 110, 101, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 105, 115, 83, 101, 109, 86, 101, 114, 40, 118, -101, 114, 115, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 115, 77, 97, 106, 111, 114, 44, 32, 115, 77, 105, 110, 111, 114, 44, 32, 115, 80, - 97, 116, 99, 104, 44, 32, 115, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 32, 61, 32, 118, 101, 114, 115, -105, 111, 110, 58, 109, 97, 116, 99, 104, 40, 34, 94, 40, 37, 100, 43, 41, 37, 46, 63, 40, 37, 100, 42, 41, 37, 46, 63, 40, 37, 100, 42, - 41, 40, 46, 45, 41, 36, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 116, 121, 112, 101, 40, 115, 77, 97, 106, 111, 114, 41, 32, 61, 61, - 32, 39, 115, 116, 114, 105, 110, 103, 39, 41, 10, 101, 110, 100, 10, }; - -// src/base/string.lua -static const unsigned char builtin_script_1[] = { -102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 46, 99, 97, 112, 105, 116, 97, 108, 105, 122, 101, 100, 40, 115, 101, 108, 102, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 58, 103, 115, 117, 98, 40, 34, 94, 37, 108, 34, 44, 32, 115, 116, 114, 105, 110, 103, - 46, 117, 112, 112, 101, 114, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 46, 99, 111, 110, 116, - 97, 105, 110, 115, 40, 115, 44, 32, 109, 97, 116, 99, 104, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, -100, 40, 115, 44, 32, 109, 97, 116, 99, 104, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 32, 126, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 46, 101, 120, 112, 108, 111, 100, 101, 40, 115, 44, 32, 112, 97, 116, 116, 101, -114, 110, 44, 32, 112, 108, 97, 105, 110, 44, 32, 109, 97, 120, 84, 111, 107, 101, 110, 115, 41, 10, 105, 102, 32, 40, 112, 97, 116, 116, 101, 114, -110, 32, 61, 61, 32, 39, 39, 41, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 32, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 112, 111, 115, 32, 61, 32, 48, 10, 108, 111, 99, 97, 108, 32, 97, 114, 114, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, - 32, 115, 116, 44, 115, 112, 32, 105, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 114, 101, 116, 117, 114, 110, 32, 115, 58, 102, 105, -110, 100, 40, 112, 97, 116, 116, 101, 114, 110, 44, 32, 112, 111, 115, 44, 32, 112, 108, 97, 105, 110, 41, 32, 101, 110, 100, 32, 100, 111, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 97, 114, 114, 44, 32, 115, 58, 115, 117, 98, 40, 112, 111, 115, 44, 32, 115, 116, 45, 49, - 41, 41, 10, 112, 111, 115, 32, 61, 32, 115, 112, 32, 43, 32, 49, 10, 105, 102, 32, 109, 97, 120, 84, 111, 107, 101, 110, 115, 32, 126, 61, 32, -110, 105, 108, 32, 97, 110, 100, 32, 109, 97, 120, 84, 111, 107, 101, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 97, 120, 84, 111, -107, 101, 110, 115, 32, 61, 32, 109, 97, 120, 84, 111, 107, 101, 110, 115, 32, 45, 32, 49, 10, 105, 102, 32, 109, 97, 120, 84, 111, 107, 101, 110, -115, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 97, 114, 114, 44, 32, 115, 58, 115, 117, 98, 40, 112, 111, 115, 41, 41, 10, 114, 101, 116, 117, -114, 110, 32, 97, 114, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 108, - 97, 115, 116, 40, 115, 44, 32, 112, 97, 116, 116, 101, 114, 110, 44, 32, 112, 108, 97, 105, 110, 41, 10, 108, 111, 99, 97, 108, 32, 99, 117, 114, -114, 32, 61, 32, 48, 10, 114, 101, 112, 101, 97, 116, 10, 108, 111, 99, 97, 108, 32, 110, 101, 120, 116, 32, 61, 32, 115, 58, 102, 105, 110, 100, - 40, 112, 97, 116, 116, 101, 114, 110, 44, 32, 99, 117, 114, 114, 32, 43, 32, 49, 44, 32, 112, 108, 97, 105, 110, 41, 10, 105, 102, 32, 40, 110, -101, 120, 116, 41, 32, 116, 104, 101, 110, 32, 99, 117, 114, 114, 32, 61, 32, 110, 101, 120, 116, 32, 101, 110, 100, 10, 117, 110, 116, 105, 108, 32, - 40, 110, 111, 116, 32, 110, 101, 120, 116, 41, 10, 105, 102, 32, 40, 99, 117, 114, 114, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 99, 117, 114, 114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, -103, 46, 108, 105, 110, 101, 115, 40, 115, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 97, 105, 108, 105, 110, 103, 44, 32, 110, 32, 61, 32, 115, - 58, 103, 115, 117, 98, 40, 39, 46, 45, 92, 110, 39, 44, 32, 39, 39, 41, 10, 105, 102, 32, 35, 116, 114, 97, 105, 108, 105, 110, 103, 32, 62, - 32, 48, 32, 116, 104, 101, 110, 10, 110, 32, 61, 32, 110, 32, 43, 32, 49, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 110, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 58, 112, 108, 117, 114, 97, 108, 40, 41, 10, 105, 102, 32, 115, -101, 108, 102, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 121, 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, -108, 102, 58, 115, 117, 98, 40, 49, 44, 32, 35, 115, 101, 108, 102, 32, 45, 32, 49, 41, 32, 46, 46, 32, 34, 105, 101, 115, 34, 10, 101, 108, -115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 32, 46, 46, 32, 34, 115, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 46, 101, 115, 99, 97, 112, 101, 112, 97, 116, 116, 101, 114, 110, 40, 115, 41, 10, 114, -101, 116, 117, 114, 110, 32, 115, 58, 103, 115, 117, 98, 40, 34, 91, 37, 40, 37, 41, 37, 46, 37, 37, 37, 43, 37, 45, 37, 42, 37, 63, 37, - 91, 37, 93, 37, 94, 37, 36, 93, 34, 44, 32, 34, 37, 37, 37, 48, 34, 41, 10, 101, 110, 100, 10, }; - -// src/base/table.lua -static const unsigned char builtin_script_2[] = { -102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 97, 114, 114, 97, 121, 99, 111, 112, 121, 40, 111, 98, 106, 101, 99, 116, 41, - 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, 118, 97, 108, 117, 101, 32, -105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, 98, 106, 101, 99, 116, 41, 32, 100, 111, 10, 114, 101, 115, 117, 108, 116, 91, 105, 93, 32, 61, - 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 116, 44, 32, 118, 97, 108, 117, 101, 41, 10, 102, -111, 114, 32, 95, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 41, 32, 100, 111, 10, 105, 102, 32, 40, 118, 32, 61, 61, 32, 118, - 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, -101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 115, -104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 111, 98, 106, 101, 99, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 112, 121, 32, 61, 32, -123, 125, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 111, 98, 106, 101, 99, 116, 41, 32, 100, 111, 10, - 99, 111, 112, 121, 91, 107, 93, 32, 61, 32, 118, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 112, 121, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 100, 101, 101, 112, 99, 111, 112, 121, 40, 111, 98, 106, 101, 99, 116, 41, 10, -108, 111, 99, 97, 108, 32, 115, 101, 101, 110, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, -111, 112, 121, 40, 111, 98, 106, 101, 99, 116, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 111, 98, 106, 101, 99, 116, 41, 32, 126, 61, 32, 34, -116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 98, 106, 101, 99, 116, 10, 101, 108, 115, 101, 105, 102, - 32, 115, 101, 101, 110, 91, 111, 98, 106, 101, 99, 116, 93, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 101, 110, 91, 111, - 98, 106, 101, 99, 116, 93, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 108, 111, 110, 101, 32, 61, 32, 123, 125, 10, 115, 101, 101, 110, - 91, 111, 98, 106, 101, 99, 116, 93, 32, 61, 32, 99, 108, 111, 110, 101, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 32, -105, 110, 32, 112, 97, 105, 114, 115, 40, 111, 98, 106, 101, 99, 116, 41, 32, 100, 111, 10, 99, 108, 111, 110, 101, 91, 107, 101, 121, 93, 32, 61, - 32, 99, 111, 112, 121, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 99, 108, -111, 110, 101, 44, 32, 103, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 111, 98, 106, 101, 99, 116, 41, 41, 10, 114, 101, 116, 117, 114, -110, 32, 99, 108, 111, 110, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 112, 121, 40, 111, 98, 106, 101, 99, 116, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 101, 120, 116, 114, 97, 99, 116, 40, 97, 114, 114, 44, 32, -102, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 95, 44, -118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 97, 114, 114, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 114, 101, 115, 117, 108, 116, 44, 32, 118, 91, 102, 110, 97, 109, 101, 93, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, -115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 102, 105, 108, 116, 101, 114, 40, 97, -114, 114, 44, 32, 102, 110, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 32, 125, 10, 116, 97, 98, 108, 101, - 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 97, 114, 114, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 41, 10, 105, 102, 32, -102, 110, 40, 118, 97, 108, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, - 44, 32, 118, 97, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 102, 108, 97, 116, 116, 101, 110, 40, 97, 114, 114, 41, 10, 108, 111, - 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, -108, 97, 116, 116, 101, 110, 40, 97, 114, 114, 41, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, 97, 114, 114, 10, 102, 111, 114, 32, 105, - 32, 61, 32, 49, 44, 32, 110, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 118, 32, 61, 32, 97, 114, 114, 91, 105, 93, 10, 105, 102, 32, 116, -121, 112, 101, 40, 118, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 108, 97, 116, 116, 101, 110, 40, 118, - 41, 10, 101, 108, 115, 101, 105, 102, 32, 118, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, -117, 108, 116, 44, 32, 118, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 108, 97, 116, 116, 101, 110, 40, 97, 114, 114, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, -101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 97, 114, 114, 44, 32, 102, 117, 110, 99, 41, 10, 105, 102, 32, 97, 114, 114, 32, 116, 104, 101, -110, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, 97, 114, 114, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 110, 32, 100, 111, - 10, 108, 111, 99, 97, 108, 32, 118, 32, 61, 32, 97, 114, 114, 91, 105, 93, 10, 105, 102, 32, 118, 32, 116, 104, 101, 110, 10, 102, 117, 110, 99, - 40, 118, 44, 32, 105, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -116, 97, 98, 108, 101, 46, 102, 111, 108, 100, 40, 108, 105, 115, 116, 49, 44, 32, 108, 105, 115, 116, 50, 41, 10, 108, 111, 99, 97, 108, 32, 114, -101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 49, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 108, 105, 115, 116, 49, 32, 111, 114, 32, 123, 125, 41, 32, 100, 111, 10, 105, 102, 32, 108, 105, 115, 116, 50, 32, 97, 110, 100, 32, 35, -108, 105, 115, 116, 50, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 50, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 108, 105, 115, 116, 50, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, -117, 108, 116, 44, 32, 123, 32, 105, 116, 101, 109, 49, 44, 32, 105, 116, 101, 109, 50, 32, 125, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 123, 32, 105, 116, 101, 109, 49, 32, 125, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 97, 114, 114, 44, 32, 98, 101, 102, 111, 114, 101, 44, 32, 97, 102, -116, 101, 114, 44, 32, 98, 101, 116, 119, 101, 101, 110, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 34, 34, 10, -102, 111, 114, 32, 95, 44, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 97, 114, 114, 41, 32, 100, 111, 10, 105, 102, 32, 40, 114, 101, -115, 117, 108, 116, 32, 126, 61, 32, 34, 34, 32, 97, 110, 100, 32, 98, 101, 116, 119, 101, 101, 110, 41, 32, 116, 104, 101, 110, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 32, 46, 46, 32, 98, 101, 116, 119, 101, 101, 110, 10, 101, 110, 100, 10, 114, 101, 115, 117, -108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 32, 46, 46, 32, 98, 101, 102, 111, 114, 101, 32, 46, 46, 32, 118, 32, 46, 46, 32, 97, 102, -116, 101, 114, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 116, 98, 108, 44, 32, 111, 98, 106, 41, 10, 102, 111, 114, 32, 107, - 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 98, 108, 41, 32, 100, 111, 10, 105, 102, 32, 118, 32, 61, 61, 32, 111, 98, -106, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 102, 105, 110, 100, 75, 101, 121, 66, 121, 86, 97, 108, 117, 101, 40, 116, 98, 108, 44, 32, 111, - 98, 106, 41, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 98, 108, 41, 32, 100, 111, 10, 105, 102, - 32, 118, 32, 61, 61, 32, 111, 98, 106, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 97, 102, 116, 101, 114, 40, 116, - 98, 108, 44, 32, 97, 102, 116, 101, 114, 44, 32, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 116, 97, 98, 108, -101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 116, 98, 108, 44, 32, 97, 102, 116, 101, 114, 41, 10, 105, 102, 32, 105, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 98, 108, 44, 32, 105, 32, 43, 32, 49, 44, 32, 118, 97, 108, 117, 101, 41, 10, -101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 98, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 102, 108, 97, 116, 40, -116, 98, 108, 44, 32, 118, 97, 108, 117, 101, 115, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 115, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 115, 41, 32, 61, 61, - 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 102, 108, 97, 116, - 40, 116, 98, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, -114, 116, 40, 116, 98, 108, 44, 32, 118, 97, 108, 117, 101, 115, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 98, 108, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 107, 101, 121, 101, 100, 40, 116, 98, -108, 44, 32, 112, 111, 115, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, -104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 111, 115, 10, 112, 111, 115, 32, 61, 32, 35, 116, 98, 108, 32, 43, 32, 49, 10, 101, -110, 100, 10, 105, 102, 32, 116, 98, 108, 91, 118, 97, 108, 117, 101, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 98, 108, 44, 32, -112, 111, 115, 44, 32, 118, 97, 108, 117, 101, 41, 10, 116, 98, 108, 91, 118, 97, 108, 117, 101, 93, 32, 61, 32, 118, 97, 108, 117, 101, 10, 114, -101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 115, 111, 114, 116, 101, 100, 40, 116, 98, 108, 44, 32, 118, 97, 108, 117, 101, 44, 32, 102, 110, 41, 10, 105, 102, 32, 118, 97, -108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 108, 115, 101, 10, 102, 110, 32, 61, - 32, 102, 110, 32, 111, 114, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 32, 98, 41, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 60, - 32, 98, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 109, 105, 110, 105, 110, 100, 101, 120, 32, 61, 32, 49, 10, 108, 111, 99, 97, 108, 32, -109, 97, 120, 105, 110, 100, 101, 120, 32, 61, 32, 35, 116, 98, 108, 32, 43, 32, 49, 10, 119, 104, 105, 108, 101, 32, 109, 105, 110, 105, 110, 100, -101, 120, 32, 60, 32, 109, 97, 120, 105, 110, 100, 101, 120, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 105, 110, 100, 101, 120, 32, 61, 32, 109, -105, 110, 105, 110, 100, 101, 120, 32, 43, 32, 40, 40, 109, 97, 120, 105, 110, 100, 101, 120, 32, 45, 32, 109, 105, 110, 105, 110, 100, 101, 120, 41, - 32, 62, 62, 32, 49, 41, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 32, 61, 32, 116, 98, 108, 91, 105, 110, 100, 101, 120, 93, 10, 105, -102, 32, 102, 110, 40, 118, 97, 108, 117, 101, 44, 32, 116, 101, 115, 116, 41, 32, 116, 104, 101, 110, 10, 109, 97, 120, 105, 110, 100, 101, 120, 32, - 61, 32, 105, 110, 100, 101, 120, 10, 101, 108, 115, 101, 10, 109, 105, 110, 105, 110, 100, 101, 120, 32, 61, 32, 105, 110, 100, 101, 120, 32, 43, 32, - 49, 10, 105, 102, 32, 110, 111, 116, 32, 102, 110, 40, 116, 101, 115, 116, 44, 32, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 98, 114, -101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 98, 108, - 44, 32, 109, 105, 110, 105, 110, 100, 101, 120, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 98, -108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 116, 41, 10, -114, 101, 116, 117, 114, 110, 32, 110, 101, 120, 116, 40, 116, 41, 32, 61, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 123, 32, 125, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, 46, 46, 125, 10, 102, 111, 114, 32, 95, 44, 116, 32, -105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 97, 114, 103, 41, 32, 100, 111, 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 41, 32, 61, 61, 32, - 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, - 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 118, 41, 10, 101, 110, 100, - 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 116, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 116, 97, 98, 108, 101, 46, 107, 101, 121, 115, 40, 116, 98, 108, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 123, 125, - 10, 102, 111, 114, 32, 107, 44, 32, 95, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 98, 108, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 107, 101, 121, 115, 44, 32, 107, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 107, 101, 121, 115, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 109, 101, 114, 103, 101, 40, 46, 46, 46, 41, 10, 108, -111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, 46, - 46, 125, 10, 102, 111, 114, 32, 95, 44, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 97, 114, 103, 41, 32, 100, 111, 10, 105, 102, 32, -116, 121, 112, 101, 40, 116, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 107, 44, 118, 32, -105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 41, 32, 100, 111, 10, 105, 102, 32, 116, 121, 112, 101, 40, 114, 101, 115, 117, 108, 116, 91, 107, 93, - 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 118, 41, 32, 61, 61, 32, 34, 116, 97, 98, -108, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 91, 107, 93, 32, 61, 32, 116, 97, 98, 108, 101, 46, 109, 101, 114, 103, 101, - 40, 114, 101, 115, 117, 108, 116, 91, 107, 93, 44, 32, 118, 41, 10, 101, 108, 115, 101, 10, 114, 101, 115, 117, 108, 116, 91, 107, 93, 32, 61, 32, -118, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 101, 114, 114, 111, 114, 40, 34, 105, 110, 118, 97, 108, 105, 100, 32, 118, 97, -108, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 114, 101, 112, 108, 97, 99, 101, 40, 115, 101, 108, 102, 44, 32, 118, 97, 108, -117, 101, 44, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 115, 101, 108, -102, 32, 100, 111, 10, 105, 102, 32, 115, 101, 108, 102, 91, 105, 93, 32, 61, 61, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 115, 101, -108, 102, 91, 105, 93, 32, 61, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 97, 114, 114, 44, 32, 116, 114, - 97, 110, 115, 108, 97, 116, 105, 111, 110, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 114, 97, 110, 115, 108, 97, 116, 105, 111, 110, 32, 116, 104, -101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 123, 125, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, -123, 125, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 97, 114, 114, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 118, 97, 108, -117, 101, 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 114, 97, 110, 115, 108, 97, 116, 105, 111, 110, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, -116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 116, 118, 97, 108, 117, 101, 32, 61, 32, 116, 114, 97, 110, 115, 108, 97, 116, 105, 111, 110, 40, - 97, 114, 114, 91, 105, 93, 41, 10, 101, 108, 115, 101, 10, 116, 118, 97, 108, 117, 101, 32, 61, 32, 116, 114, 97, 110, 115, 108, 97, 116, 105, 111, -110, 91, 97, 114, 114, 91, 105, 93, 93, 10, 101, 110, 100, 10, 105, 102, 32, 40, 116, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 116, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, - 97, 98, 108, 101, 46, 116, 111, 115, 116, 114, 105, 110, 103, 40, 116, 97, 98, 44, 32, 114, 101, 99, 117, 114, 115, 101, 44, 32, 105, 110, 100, 101, -110, 116, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 32, 61, 32, 39, 39, 10, 105, 102, 32, 110, 111, 116, 32, 105, 110, 100, 101, 110, 116, - 32, 116, 104, 101, 110, 10, 105, 110, 100, 101, 110, 116, 32, 61, 32, 48, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 111, 114, 109, 97, -116, 95, 118, 97, 108, 117, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 107, 44, 32, 118, 44, 32, 105, 41, 10, 102, 111, 114, 109, - 97, 116, 116, 105, 110, 103, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 114, 101, 112, 40, 34, 92, 116, 34, 44, 32, 105, 41, 10, 105, 102, 32, -107, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, 107, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, -110, 10, 107, 32, 61, 32, 39, 91, 116, 97, 98, 108, 101, 93, 39, 10, 101, 110, 100, 10, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 61, - 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, 107, 32, 46, 46, 32, 34, 58, 32, 34, 10, 101, 110, 100, 10, 105, 102, 32, -110, 111, 116, 32, 118, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, - 39, 40, 110, 105, 108, 41, 39, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, - 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 114, 101, 99, 117, 114, 115, 101, 32, 97, 110, 100, 32, 114, 101, 99, 117, 114, 115, 101, 32, 62, 32, - 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, 39, 92, 110, 39, - 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 44, 32, 114, 101, 99, 117, 114, 115, 101, 45, 49, 44, - 32, 105, 43, 49, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, - 34, 60, 116, 97, 98, 108, 101, 62, 34, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 41, 32, 61, 61, 32, - 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, -103, 32, 46, 46, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 41, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 41, 32, - 61, 61, 32, 34, 117, 115, 101, 114, 100, 97, 116, 97, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, -116, 105, 110, 103, 32, 46, 46, 32, 34, 60, 117, 115, 101, 114, 100, 97, 116, 97, 62, 34, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, - 40, 118, 41, 32, 61, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 118, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, 39, 116, 114, 117, 101, 39, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, 39, 102, 97, 108, 115, 101, 39, 10, 101, 110, -100, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 102, 111, 114, 109, 97, 116, 116, 105, 110, 103, 32, 46, 46, 32, 118, 10, 101, 110, -100, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 97, 98, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, 116, 32, 61, 32, 116, 114, 117, 101, 10, 108, 111, 99, 97, 108, 32, 109, 116, 32, 61, - 32, 103, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 116, 97, 98, 41, 10, 105, 102, 32, 109, 116, 32, 116, 104, 101, 110, 10, 114, 101, -115, 32, 61, 32, 114, 101, 115, 32, 46, 46, 32, 102, 111, 114, 109, 97, 116, 95, 118, 97, 108, 117, 101, 40, 39, 95, 95, 109, 116, 39, 44, 32, -109, 116, 44, 32, 105, 110, 100, 101, 110, 116, 41, 10, 102, 105, 114, 115, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 111, -114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 97, 98, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 102, -105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 114, 101, 115, 32, 61, 32, 114, 101, 115, 32, 46, 46, 32, 39, 92, 110, 39, 10, 101, 110, 100, 10, -114, 101, 115, 32, 61, 32, 114, 101, 115, 32, 46, 46, 32, 102, 111, 114, 109, 97, 116, 95, 118, 97, 108, 117, 101, 40, 107, 44, 32, 118, 44, 32, -105, 110, 100, 101, 110, 116, 41, 10, 102, 105, 114, 115, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, -101, 115, 32, 61, 32, 114, 101, 115, 32, 46, 46, 32, 102, 111, 114, 109, 97, 116, 95, 118, 97, 108, 117, 101, 40, 110, 105, 108, 44, 32, 116, 97, - 98, 44, 32, 105, 110, 100, 101, 110, 116, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 117, 110, 105, 113, 117, 101, 40, 116, 97, 98, 41, 10, 108, 111, 99, 97, 108, 32, 101, -108, 101, 109, 115, 32, 61, 32, 123, 32, 125, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 32, 125, 10, 116, 97, - 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 116, 97, 98, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 101, 108, 101, 109, 41, - 10, 105, 102, 32, 110, 111, 116, 32, 101, 108, 101, 109, 115, 91, 101, 108, 101, 109, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 101, 108, 101, 109, 41, 10, 101, 108, 101, 109, 115, 91, 101, 108, 101, 109, 93, 32, - 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 102, 105, 108, 116, 101, 114, 101, 109, 112, 116, 121, 40, 100, 105, 114, -115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 100, 105, 114, 115, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 41, 10, 105, 102, 32, 118, 97, 108, 32, 97, 110, 100, 32, 35, 118, 97, 108, 32, 62, 32, - 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, -108, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 101, 113, -117, 97, 108, 115, 40, 97, 44, 32, 98, 41, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 97, 41, 32, -100, 111, 10, 105, 102, 32, 98, 91, 107, 93, 32, 126, 61, 32, 118, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, -101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 98, 41, 32, 100, -111, 10, 105, 102, 32, 97, 91, 107, 93, 32, 126, 61, 32, 118, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 115, 112, 97, 105, 114, 115, 40, 116, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, -107, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 107, 101, -121, 115, 44, 32, 107, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 107, 101, 121, 115, 41, 10, 108, 111, 99, 97, -108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 105, 32, 61, 32, 105, 32, - 43, 32, 49, 10, 105, 102, 32, 107, 101, 121, 115, 91, 105, 93, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 107, 101, 121, 115, 91, -105, 93, 44, 32, 116, 91, 107, 101, 121, 115, 91, 105, 93, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, 116, 101, 114, 115, 101, 99, 116, 40, 97, 44, 32, 98, 41, 10, 108, 111, 99, 97, 108, 32, -114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, - 41, 32, 100, 111, 10, 105, 102, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 97, 44, 32, 118, 41, 32, 116, 104, 101, 110, - 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 118, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 97, 98, 108, -101, 46, 100, 105, 102, 102, 101, 114, 101, 110, 99, 101, 40, 97, 44, 32, 98, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 97, 41, 32, 100, 111, 10, 105, 102, - 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 98, 44, 32, 118, 41, 32, 116, 104, 101, 110, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 118, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, }; - -// src/base/path.lua -static const unsigned char builtin_script_3[] = { -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 97, 112, 112, 101, 110, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 40, 112, 44, - 32, 101, 120, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 101, 120, 116, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 34, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 101, 110, 100, 113, 117, 111, 116, 101, 10, 105, -102, 32, 112, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 39, 34, 39, 41, 32, 116, 104, 101, 110, 10, 112, 32, 61, 32, 112, 58, 115, 117, 98, - 40, 49, 44, 32, 45, 50, 41, 10, 101, 110, 100, 113, 117, 111, 116, 101, 32, 61, 32, 39, 34, 39, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, -116, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 112, 44, 32, 101, 120, 116, 41, 32, 116, 104, 101, 110, - 10, 112, 32, 61, 32, 112, 32, 46, 46, 32, 101, 120, 116, 10, 101, 110, 100, 10, 105, 102, 32, 101, 110, 100, 113, 117, 111, 116, 101, 32, 116, 104, -101, 110, 10, 112, 32, 61, 32, 112, 32, 46, 46, 32, 101, 110, 100, 113, 117, 111, 116, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, -112, 10, 101, 110, 100, 10, 112, 97, 116, 104, 46, 97, 112, 112, 101, 110, 100, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, 112, 97, 116, -104, 46, 97, 112, 112, 101, 110, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, -103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 110, 97, 109, 101, 58, 102, 105, 110, 100, 108, - 97, 115, 116, 40, 34, 46, 34, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 40, 105, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 110, 97, 109, 101, 58, 115, 117, 98, 40, 49, 44, 32, 105, 32, 45, 32, 49, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, - 32, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, -105, 114, 101, 99, 116, 111, 114, 121, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 112, 58, 102, 105, 110, 100, 108, 97, 115, 116, - 40, 34, 47, 34, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 40, 105, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 105, 32, 62, 32, 49, - 32, 116, 104, 101, 110, 32, 105, 32, 61, 32, 105, 32, 45, 32, 49, 32, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 58, 115, 117, 98, - 40, 49, 44, 32, 105, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 46, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 114, 105, 118, 101, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 99, -104, 49, 32, 61, 32, 112, 58, 115, 117, 98, 40, 49, 44, 49, 41, 10, 108, 111, 99, 97, 108, 32, 99, 104, 50, 32, 61, 32, 112, 58, 115, 117, - 98, 40, 50, 44, 50, 41, 10, 105, 102, 32, 99, 104, 50, 32, 61, 61, 32, 34, 58, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 99, 104, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, -116, 101, 110, 115, 105, 111, 110, 40, 112, 41, 10, 112, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 41, 10, 108, -111, 99, 97, 108, 32, 105, 32, 61, 32, 112, 58, 102, 105, 110, 100, 108, 97, 115, 116, 40, 34, 46, 34, 44, 32, 116, 114, 117, 101, 41, 10, 105, -102, 32, 40, 105, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 58, 115, 117, 98, 40, 105, 41, 10, 101, 108, 115, 101, 10, -114, 101, 116, 117, 114, 110, 32, 34, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, -114, 101, 109, 111, 118, 101, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 112, 58, 102, -105, 110, 100, 108, 97, 115, 116, 40, 34, 46, 34, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 40, 105, 41, 32, 116, 104, 101, 110, 10, 105, -102, 32, 105, 32, 62, 32, 49, 32, 116, 104, 101, 110, 32, 105, 32, 61, 32, 105, 32, 45, 32, 49, 32, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 112, 58, 115, 117, 98, 40, 49, 44, 32, 105, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 34, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 41, 10, 108, 111, - 99, 97, 108, 32, 105, 32, 61, 32, 112, 58, 102, 105, 110, 100, 108, 97, 115, 116, 40, 34, 91, 47, 92, 92, 93, 34, 41, 10, 105, 102, 32, 40, -105, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 58, 115, 117, 98, 40, 105, 32, 43, 32, 49, 41, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 112, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, -104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 41, 10, -108, 111, 99, 97, 108, 32, 102, 101, 120, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, -110, 97, 109, 101, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, - 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 101, 120, 116, 101, 110, 115, 105, -111, 110, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 41, 32, 100, 111, 10, 105, 102, 32, 102, 101, -120, 116, 32, 61, 61, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, -110, 32, 40, 102, 101, 120, 116, 32, 61, 61, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 97, 115, 109, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, -116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, - 34, 46, 115, 34, 32, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 99, 102, 105, 108, -101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, -110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, 34, 46, 99, 34, 32, 125, 41, 10, 111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 97, 115, 109, -102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 45, 45, 32, 105, 115, 32, 116, 104, 105, 115, 32, 114, 101, 97, 108, 108, 121, 32, 114, 105, 103, -104, 116, 63, 10, 111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 99, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 45, 45, 32, -116, 104, 101, 114, 101, 32, 105, 115, 32, 99, 111, 100, 101, 32, 116, 104, 97, 116, 32, 100, 101, 112, 101, 110, 100, 115, 32, 111, 110, 32, 116, 104, -105, 115, 32, 98, 101, 104, 97, 118, 105, 111, 117, 114, 44, 32, 119, 104, 105, 99, 104, 32, 119, 111, 117, 108, 100, 32, 110, 101, 101, 100, 32, 116, -111, 32, 99, 104, 97, 110, 103, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, -102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, -115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, 34, 46, 99, 99, 34, 44, 32, 34, 46, 99, 112, 112, 34, 44, 32, 34, 46, 99, -120, 120, 34, 44, 32, 34, 46, 99, 43, 43, 34, 32, 125, 41, 10, 111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 99, 112, 112, 102, -105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 45, 45, 32, 105, 115, 32, 116, 104, 105, 115, 32, 114, 101, 97, 108, 108, 121, 32, 114, 105, 103, 104, -116, 63, 10, 111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 99, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 99, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, -116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, - 34, 46, 109, 34, 32, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 99, -112, 112, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, -101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, 34, 46, 109, 109, 34, 32, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 104, 101, 97, 100, 101, 114, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, -116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, - 34, 46, 104, 34, 44, 32, 34, 46, 104, 104, 34, 44, 32, 34, 46, 104, 112, 112, 34, 44, 32, 34, 46, 104, 120, 120, 34, 32, 125, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 110, 97, 116, 105, 118, 101, 102, 105, 108, 101, 40, 102, 110, - 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 105, 115, 99, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, -111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 111, 114, 32, 112, 97, 116, 104, - 46, 105, 115, 97, 115, 109, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 99, -102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 111, 114, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 99, 112, 112, 102, 105, 108, 101, - 40, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 102, 114, 97, 109, -101, 119, 111, 114, 107, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, -110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 34, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 108, 105, 110, 107, 97, 98, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, -101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, - 32, 34, 46, 111, 34, 44, 32, 34, 46, 111, 98, 106, 34, 44, 32, 34, 46, 97, 34, 44, 32, 34, 46, 108, 105, 98, 34, 44, 32, 34, 46, 115, -111, 34, 32, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, -102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, -115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, 34, 46, 111, 34, 44, 32, 34, 46, 111, 98, 106, 34, 32, 125, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 40, 102, -110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, -110, 97, 109, 101, 44, 32, 34, 46, 114, 99, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, -115, 105, 100, 108, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, -120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 34, 46, 105, 100, 108, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 104, 108, 115, 108, 102, 105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, -114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 34, 46, 104, 108, -115, 108, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 114, 101, 98, 97, 115, 101, 40, 112, 44, - 32, 111, 108, 100, 98, 97, 115, 101, 44, 32, 110, 101, 119, 98, 97, 115, 101, 41, 10, 112, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, - 98, 115, 111, 108, 117, 116, 101, 40, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 111, 108, 100, 98, 97, 115, 101, 44, 32, 112, 41, 41, 10, 112, - 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 110, 101, 119, 98, 97, 115, 101, 44, 32, 112, 41, 10, -114, 101, 116, 117, 114, 110, 32, 112, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 114, 101, 112, 108, 97, - 99, 101, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 112, 44, 32, 110, 101, 119, 101, 120, 116, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, - 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 112, 41, 10, 105, 102, 32, 110, 111, 116, 32, 101, -120, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 10, 101, 110, 100, 10, 105, 102, 32, 35, 110, 101, 119, 101, 120, 116, 32, - 62, 32, 48, 32, 97, 110, 100, 32, 110, 111, 116, 32, 110, 101, 119, 101, 120, 116, 58, 102, 105, 110, 100, 108, 97, 115, 116, 40, 34, 46, 34, 44, - 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 110, 101, 119, 101, 120, 116, 32, 61, 32, 34, 46, 34, 46, 46, 110, 101, 119, 101, 120, 116, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 58, 109, 97, 116, 99, 104, 40, 34, 94, 40, 46, 42, 41, 34, 46, 46, 101, 120, 116, - 46, 46, 34, 36, 34, 41, 46, 46, 110, 101, 119, 101, 120, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 68, 101, 102, 97, 117, 108, 116, 83, 101, 112, 97, 114, 97, 116, 111, 114, 40, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 116, - 97, 114, 103, 101, 116, 40, 39, 119, 105, 110, 100, 111, 119, 115, 39, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 39, 92, 92, - 39, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 39, 47, 39, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// src/base/os.lua -static const unsigned char builtin_script_4[] = { -112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 111, 115, 44, 32, 34, 101, 120, 101, 99, 117, 116, 101, 34, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 98, 97, 115, 101, 44, 32, 99, 109, 100, 41, 10, 99, 109, 100, 32, 61, 32, 111, 115, 46, 116, 114, 97, -110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 109, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 98, 97, 115, 101, 40, - 99, 109, 100, 41, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 101, 120, 101, 99, 117, 116, 101, 102, 40, 99, -109, 100, 44, 32, 46, 46, 46, 41, 10, 99, 109, 100, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 99, 109, 100, - 44, 32, 46, 46, 46, 41, 10, 114, 101, 116, 117, 114, 110, 32, 111, 115, 46, 101, 120, 101, 99, 117, 116, 101, 40, 99, 109, 100, 41, 10, 101, 110, -100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 114, 115, 101, 95, 108, 100, 95, 115, 111, 95, 99, 111, 110, -102, 40, 99, 111, 110, 102, 95, 102, 105, 108, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, 116, 44, 32, 108, 97, 115, 116, 10, 108, -111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 108, 105, 110, 101, 32, 105, 110, 32, 105, 111, 46, 108, -105, 110, 101, 115, 40, 99, 111, 110, 102, 95, 102, 105, 108, 101, 41, 32, 100, 111, 10, 102, 105, 114, 115, 116, 32, 61, 32, 108, 105, 110, 101, 58, -102, 105, 110, 100, 40, 34, 35, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 102, 105, 114, 115, 116, 32, 126, 61, 32, 110, -105, 108, 32, 116, 104, 101, 110, 10, 108, 105, 110, 101, 32, 61, 32, 108, 105, 110, 101, 58, 115, 117, 98, 40, 49, 44, 32, 102, 105, 114, 115, 116, - 32, 45, 32, 49, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 105, 110, 101, 32, 126, 61, 32, 34, 34, 32, 116, 104, 101, 110, 10, 102, 105, 114, -115, 116, 44, 32, 108, 97, 115, 116, 32, 61, 32, 108, 105, 110, 101, 58, 102, 105, 110, 100, 40, 34, 105, 110, 99, 108, 117, 100, 101, 37, 115, 43, - 34, 41, 10, 105, 102, 32, 102, 105, 114, 115, 116, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 110, - 99, 108, 117, 100, 101, 95, 103, 108, 111, 98, 32, 61, 32, 108, 105, 110, 101, 58, 115, 117, 98, 40, 108, 97, 115, 116, 32, 43, 32, 49, 41, 10, -108, 111, 99, 97, 108, 32, 105, 110, 99, 108, 117, 100, 101, 115, 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, 104, 102, 105, 108, 101, 115, 40, 105, -110, 99, 108, 117, 100, 101, 95, 103, 108, 111, 98, 41, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, -105, 110, 99, 108, 117, 100, 101, 115, 41, 32, 100, 111, 10, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 100, -105, 114, 115, 44, 32, 112, 97, 114, 115, 101, 95, 108, 100, 95, 115, 111, 95, 99, 111, 110, 102, 40, 118, 41, 41, 10, 101, 110, 100, 10, 101, 108, -115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 100, 105, 114, 115, 44, 32, 108, 105, 110, 101, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 100, 105, 114, 115, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, -110, 99, 116, 105, 111, 110, 32, 103, 101, 116, 95, 108, 105, 98, 114, 97, 114, 121, 95, 115, 101, 97, 114, 99, 104, 95, 112, 97, 116, 104, 40, 41, - 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 104, 10, 105, 102, 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 119, 105, 110, 100, -111, 119, 115, 34, 41, 32, 116, 104, 101, 110, 10, 112, 97, 116, 104, 32, 61, 32, 111, 115, 46, 103, 101, 116, 101, 110, 118, 40, 34, 80, 65, 84, - 72, 34, 41, 32, 111, 114, 32, 34, 34, 10, 101, 108, 115, 101, 105, 102, 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 104, 97, -105, 107, 117, 34, 41, 32, 116, 104, 101, 110, 10, 112, 97, 116, 104, 32, 61, 32, 111, 115, 46, 103, 101, 116, 101, 110, 118, 40, 34, 76, 73, 66, - 82, 65, 82, 89, 95, 80, 65, 84, 72, 34, 41, 32, 111, 114, 32, 34, 34, 10, 101, 108, 115, 101, 10, 105, 102, 32, 111, 115, 46, 105, 115, 116, - 97, 114, 103, 101, 116, 40, 34, 100, 97, 114, 119, 105, 110, 34, 41, 32, 116, 104, 101, 110, 10, 112, 97, 116, 104, 32, 61, 32, 111, 115, 46, 103, -101, 116, 101, 110, 118, 40, 34, 68, 89, 76, 68, 95, 76, 73, 66, 82, 65, 82, 89, 95, 80, 65, 84, 72, 34, 41, 32, 111, 114, 32, 34, 34, - 10, 101, 108, 115, 101, 10, 112, 97, 116, 104, 32, 61, 32, 111, 115, 46, 103, 101, 116, 101, 110, 118, 40, 34, 76, 68, 95, 76, 73, 66, 82, 65, - 82, 89, 95, 80, 65, 84, 72, 34, 41, 32, 111, 114, 32, 34, 34, 10, 102, 111, 114, 32, 95, 44, 32, 112, 114, 101, 102, 105, 120, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 123, 34, 34, 44, 32, 34, 47, 111, 112, 116, 34, 125, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, -111, 110, 102, 95, 102, 105, 108, 101, 32, 61, 32, 112, 114, 101, 102, 105, 120, 32, 46, 46, 32, 34, 47, 101, 116, 99, 47, 108, 100, 46, 115, 111, - 46, 99, 111, 110, 102, 34, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 99, 111, 110, 102, 95, 102, 105, 108, 101, 41, 32, 116, -104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 97, 114, 115, 101, 95, 108, 100, 95, -115, 111, 95, 99, 111, 110, 102, 40, 99, 111, 110, 102, 95, 102, 105, 108, 101, 41, 41, 32, 100, 111, 10, 105, 102, 32, 40, 35, 112, 97, 116, 104, - 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 32, 46, 46, 32, 34, 58, 34, 32, 46, 46, - 32, 118, 10, 101, 108, 115, 101, 10, 112, 97, 116, 104, 32, 61, 32, 118, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 32, 111, 114, 32, 34, 34, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, -104, 112, 97, 116, 104, 32, 61, 32, 34, 47, 108, 105, 98, 58, 47, 117, 115, 114, 47, 108, 105, 98, 58, 47, 117, 115, 114, 47, 108, 111, 99, 97, -108, 47, 108, 105, 98, 34, 10, 105, 102, 32, 111, 115, 46, 105, 115, 54, 52, 98, 105, 116, 40, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 40, -111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 100, 97, 114, 119, 105, 110, 34, 41, 41, 32, 116, 104, 101, 110, 10, 97, 114, 99, 104, -112, 97, 116, 104, 32, 61, 32, 34, 47, 108, 105, 98, 54, 52, 58, 47, 117, 115, 114, 47, 108, 105, 98, 54, 52, 47, 58, 117, 115, 114, 47, 108, -111, 99, 97, 108, 47, 108, 105, 98, 54, 52, 34, 32, 46, 46, 32, 34, 58, 34, 32, 46, 46, 32, 97, 114, 99, 104, 112, 97, 116, 104, 10, 101, -110, 100, 10, 105, 102, 32, 40, 35, 112, 97, 116, 104, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, 112, 97, 116, 104, 32, 61, 32, 112, 97, -116, 104, 32, 46, 46, 32, 34, 58, 34, 32, 46, 46, 32, 97, 114, 99, 104, 112, 97, 116, 104, 10, 101, 108, 115, 101, 10, 112, 97, 116, 104, 32, - 61, 32, 97, 114, 99, 104, 112, 97, 116, 104, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 102, 105, 110, 100, 108, 105, 98, 40, 108, 105, 98, 110, 97, 109, 101, 44, 32, -108, 105, 98, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 104, 32, 61, 32, 103, 101, 116, 95, 108, 105, 98, 114, 97, 114, -121, 95, 115, 101, 97, 114, 99, 104, 95, 112, 97, 116, 104, 40, 41, 10, 108, 111, 99, 97, 108, 32, 102, 111, 114, 109, 97, 116, 115, 10, 105, 102, - 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 119, 105, 110, 100, 111, 119, 115, 34, 41, 32, 116, 104, 101, 110, 10, 102, 111, 114, -109, 97, 116, 115, 32, 61, 32, 123, 32, 34, 37, 115, 46, 100, 108, 108, 34, 44, 32, 34, 37, 115, 34, 32, 125, 10, 101, 108, 115, 101, 105, 102, - 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 104, 97, 105, 107, 117, 34, 41, 32, 116, 104, 101, 110, 10, 102, 111, 114, 109, 97, -116, 115, 32, 61, 32, 123, 32, 34, 108, 105, 98, 37, 115, 46, 115, 111, 34, 44, 32, 34, 37, 115, 46, 115, 111, 34, 32, 125, 10, 101, 108, 115, -101, 10, 105, 102, 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 100, 97, 114, 119, 105, 110, 34, 41, 32, 116, 104, 101, 110, 10, -102, 111, 114, 109, 97, 116, 115, 32, 61, 32, 123, 32, 34, 108, 105, 98, 37, 115, 46, 100, 121, 108, 105, 98, 34, 44, 32, 34, 37, 115, 46, 100, -121, 108, 105, 98, 34, 32, 125, 10, 101, 108, 115, 101, 10, 102, 111, 114, 109, 97, 116, 115, 32, 61, 32, 123, 32, 34, 108, 105, 98, 37, 115, 46, -115, 111, 34, 44, 32, 34, 37, 115, 46, 115, 111, 34, 32, 125, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -102, 111, 114, 109, 97, 116, 115, 44, 32, 34, 37, 115, 34, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 112, 97, 116, -104, 32, 61, 32, 34, 34, 10, 105, 102, 32, 116, 121, 112, 101, 40, 108, 105, 98, 100, 105, 114, 115, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, -110, 103, 34, 32, 116, 104, 101, 110, 10, 117, 115, 101, 114, 112, 97, 116, 104, 32, 61, 32, 108, 105, 98, 100, 105, 114, 115, 10, 101, 108, 115, 101, -105, 102, 32, 116, 121, 112, 101, 40, 108, 105, 98, 100, 105, 114, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, - 10, 117, 115, 101, 114, 112, 97, 116, 104, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 108, 105, 98, 100, 105, 114, -115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 58, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 40, 35, 117, 115, 101, 114, 112, 97, 116, -104, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 40, 35, 112, 97, 116, 104, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, -112, 97, 116, 104, 32, 61, 32, 117, 115, 101, 114, 112, 97, 116, 104, 32, 46, 46, 32, 34, 58, 34, 32, 46, 46, 32, 112, 97, 116, 104, 10, 101, -108, 115, 101, 10, 112, 97, 116, 104, 32, 61, 32, 117, 115, 101, 114, 112, 97, 116, 104, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, - 95, 44, 32, 102, 109, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 111, 114, 109, 97, 116, 115, 41, 32, 100, 111, 10, 108, 111, 99, - 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 102, 109, 116, 44, 32, 108, 105, 98, -110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 111, 115, 46, 112, 97, 116, 104, 115, 101, 97, 114, - 99, 104, 40, 110, 97, 109, 101, 44, 32, 112, 97, 116, 104, 41, 10, 105, 102, 32, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 32, 114, 101, -116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 32, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 111, 115, 46, 102, 105, 110, 100, 104, 101, 97, 100, 101, 114, 40, 104, 101, 97, 100, 101, 114, 112, 97, 116, 104, 44, 32, 104, 101, 97, 100, 101, -114, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 104, 32, 61, 32, 103, 101, 116, 95, 108, 105, 98, 114, 97, 114, 121, 95, -115, 101, 97, 114, 99, 104, 95, 112, 97, 116, 104, 40, 41, 10, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 32, 46, 46, 32, 39, 58, 39, - 10, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 58, 103, 115, 117, 98, 32, 40, 39, 47, 108, 105, 98, 91, 48, 45, 57, 93, 42, 40, 91, - 58, 47, 93, 41, 39, 44, 32, 39, 47, 105, 110, 99, 108, 117, 100, 101, 37, 49, 39, 41, 10, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, - 58, 115, 117, 98, 32, 40, 49, 44, 32, 35, 112, 97, 116, 104, 32, 45, 32, 49, 41, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 112, 97, -116, 104, 32, 61, 32, 34, 34, 10, 105, 102, 32, 116, 121, 112, 101, 40, 104, 101, 97, 100, 101, 114, 100, 105, 114, 115, 41, 32, 61, 61, 32, 34, -115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 117, 115, 101, 114, 112, 97, 116, 104, 32, 61, 32, 104, 101, 97, 100, 101, 114, 100, 105, -114, 115, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 104, 101, 97, 100, 101, 114, 100, 105, 114, 115, 41, 32, 61, 61, 32, 34, 116, - 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 117, 115, 101, 114, 112, 97, 116, 104, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, -111, 100, 101, 40, 104, 101, 97, 100, 101, 114, 100, 105, 114, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 58, 34, 41, 10, 101, 110, 100, - 10, 105, 102, 32, 40, 35, 117, 115, 101, 114, 112, 97, 116, 104, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 40, 35, 112, 97, -116, 104, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, 112, 97, 116, 104, 32, 61, 32, 117, 115, 101, 114, 112, 97, 116, 104, 32, 46, 46, 32, - 34, 58, 34, 32, 46, 46, 32, 112, 97, 116, 104, 10, 101, 108, 115, 101, 10, 112, 97, 116, 104, 32, 61, 32, 117, 115, 101, 114, 112, 97, 116, 104, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 111, 115, 46, 112, 97, 116, 104, 115, -101, 97, 114, 99, 104, 32, 40, 104, 101, 97, 100, 101, 114, 112, 97, 116, 104, 44, 32, 112, 97, 116, 104, 41, 10, 114, 101, 116, 117, 114, 110, 32, -114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 10, -114, 101, 116, 117, 114, 110, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 111, 115, 32, 111, 114, 32, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 103, 101, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, -108, 101, 114, 32, 61, 32, 102, 105, 108, 101, 108, 105, 110, 101, 105, 110, 102, 111, 40, 50, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, -114, 110, 79, 110, 99, 101, 40, 99, 97, 108, 108, 101, 114, 44, 32, 34, 111, 115, 46, 103, 101, 116, 40, 41, 32, 105, 115, 32, 100, 101, 112, 114, -101, 99, 97, 116, 101, 100, 44, 32, 117, 115, 101, 32, 39, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 39, 32, 111, 114, 32, 39, 111, 115, - 46, 104, 111, 115, 116, 40, 41, 39, 46, 92, 110, 32, 32, 32, 64, 37, 115, 92, 110, 34, 44, 32, 99, 97, 108, 108, 101, 114, 41, 10, 114, 101, -116, 117, 114, 110, 32, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 10, 101, 110, 100, 10, 95, 71, 95, 109, 101, 116, 97, 116, 97, 98, 108, -101, 32, 61, 32, 123, 10, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 116, 44, 32, 107, 41, 10, 105, -102, 32, 40, 107, 32, 61, 61, 32, 39, 95, 79, 83, 39, 41, 32, 116, 104, 101, 110, 10, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, 114, 110, - 79, 110, 99, 101, 40, 34, 95, 79, 83, 43, 103, 101, 116, 34, 44, 32, 34, 95, 79, 83, 32, 105, 115, 32, 100, 101, 112, 114, 101, 99, 97, 116, -101, 100, 44, 32, 117, 115, 101, 32, 39, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 39, 46, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, - 97, 119, 103, 101, 116, 40, 116, 44, 32, 34, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 34, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, -114, 110, 32, 114, 97, 119, 103, 101, 116, 40, 116, 44, 32, 107, 41, 10, 101, 110, 100, 10, 101, 110, 100, 44, 10, 95, 95, 110, 101, 119, 105, 110, -100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 116, 44, 32, 107, 44, 32, 118, 41, 10, 105, 102, 32, 40, 107, 32, 61, 61, - 32, 39, 95, 79, 83, 39, 41, 32, 116, 104, 101, 110, 10, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 34, 95, - 79, 83, 43, 115, 101, 116, 34, 44, 32, 34, 95, 79, 83, 32, 105, 115, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 44, 32, 117, 115, 101, - 32, 39, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 39, 46, 34, 41, 10, 114, 97, 119, 115, 101, 116, 40, 116, 44, 32, 34, 95, 84, 65, 82, - 71, 69, 84, 95, 79, 83, 34, 44, 32, 118, 41, 10, 101, 108, 115, 101, 10, 114, 97, 119, 115, 101, 116, 40, 116, 44, 32, 107, 44, 32, 118, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 95, 71, 44, 32, 95, 71, 95, 109, -101, 116, 97, 116, 97, 98, 108, 101, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 105, -100, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 103, 115, 32, 61, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, - 40, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, -105, 110, 115, 40, 116, 97, 103, 115, 44, 32, 105, 100, 58, 108, 111, 119, 101, 114, 40, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 111, 115, 46, 105, 115, 40, 105, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 101, 114, 32, 61, 32, 102, 105, 108, 101, -108, 105, 110, 101, 105, 110, 102, 111, 40, 50, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 99, 97, 108, -108, 101, 114, 44, 32, 34, 111, 115, 46, 105, 115, 40, 41, 32, 105, 115, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 44, 32, 117, 115, 101, - 32, 39, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 41, 39, 32, 111, 114, 32, 39, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 41, - 39, 46, 92, 110, 32, 32, 32, 64, 37, 115, 92, 110, 34, 44, 32, 99, 97, 108, 108, 101, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 111, 115, - 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 105, 100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 105, 115, -104, 111, 115, 116, 40, 105, 100, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 103, 115, 32, 61, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, -101, 109, 84, 97, 103, 115, 40, 111, 115, 46, 104, 111, 115, 116, 40, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, -111, 110, 116, 97, 105, 110, 115, 40, 116, 97, 103, 115, 44, 32, 105, 100, 58, 108, 111, 119, 101, 114, 40, 41, 41, 10, 101, 110, 100, 10, 112, 114, -101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 111, 115, 44, 32, 34, 105, 115, 100, 105, 114, 34, 44, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 98, 97, 115, 101, 44, 32, 112, 41, 10, 112, 32, 61, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, - 40, 112, 41, 10, 114, 101, 116, 117, 114, 110, 32, 98, 97, 115, 101, 40, 112, 41, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, -111, 118, 101, 114, 114, 105, 100, 101, 40, 111, 115, 44, 32, 34, 105, 115, 102, 105, 108, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, - 98, 97, 115, 101, 44, 32, 112, 41, 10, 112, 32, 61, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 112, 41, 10, 114, -101, 116, 117, 114, 110, 32, 98, 97, 115, 101, 40, 112, 41, 10, 101, 110, 100, 41, 10, 108, 111, 99, 97, 108, 32, 95, 105, 115, 54, 52, 98, 105, -116, 10, 108, 111, 99, 97, 108, 32, 95, 54, 52, 66, 105, 116, 72, 111, 115, 116, 84, 121, 112, 101, 115, 32, 61, 32, 123, 10, 34, 120, 56, 54, - 95, 54, 52, 34, 44, 10, 34, 105, 97, 54, 52, 34, 44, 10, 34, 97, 109, 100, 54, 52, 34, 44, 10, 34, 112, 112, 99, 54, 52, 34, 44, 10, - 34, 112, 111, 119, 101, 114, 112, 99, 54, 52, 34, 44, 10, 34, 115, 112, 97, 114, 99, 54, 52, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 111, 115, 46, 105, 115, 54, 52, 98, 105, 116, 40, 41, 10, 105, 102, 32, 95, 105, 115, 54, 52, 98, 105, 116, 32, 126, 61, 32, 110, 105, -108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 95, 105, 115, 54, 52, 98, 105, 116, 10, 101, 110, 100, 10, 95, 105, 115, 54, 52, - 98, 105, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 105, 102, 32, 40, 111, 115, 46, 95, 105, 115, 54, 52, 98, 105, 116, 40, 41, 41, 32, 116, -104, 101, 110, 10, 95, 105, 115, 54, 52, 98, 105, 116, 32, 61, 32, 116, 114, 117, 101, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 97, -114, 99, 104, 10, 105, 102, 32, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 34, 119, 105, 110, 100, 111, 119, 115, 34, 41, 32, 116, 104, 101, 110, - 10, 97, 114, 99, 104, 32, 61, 32, 111, 115, 46, 103, 101, 116, 101, 110, 118, 40, 34, 80, 82, 79, 67, 69, 83, 83, 79, 82, 95, 65, 82, 67, - 72, 73, 84, 69, 67, 84, 85, 82, 69, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 34, 109, 97, - 99, 111, 115, 120, 34, 41, 32, 116, 104, 101, 110, 10, 97, 114, 99, 104, 32, 61, 32, 111, 115, 46, 111, 117, 116, 112, 117, 116, 111, 102, 40, 34, -101, 99, 104, 111, 32, 36, 72, 79, 83, 84, 84, 89, 80, 69, 34, 41, 10, 101, 108, 115, 101, 10, 97, 114, 99, 104, 32, 61, 32, 111, 115, 46, -111, 117, 116, 112, 117, 116, 111, 102, 40, 34, 117, 110, 97, 109, 101, 32, 45, 109, 34, 41, 10, 101, 110, 100, 10, 97, 114, 99, 104, 32, 61, 32, - 97, 114, 99, 104, 58, 108, 111, 119, 101, 114, 40, 41, 10, 102, 111, 114, 32, 95, 44, 32, 104, 111, 115, 116, 116, 121, 112, 101, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 95, 54, 52, 66, 105, 116, 72, 111, 115, 116, 84, 121, 112, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 97, 114, - 99, 104, 58, 102, 105, 110, 100, 40, 104, 111, 115, 116, 116, 121, 112, 101, 41, 32, 116, 104, 101, 110, 10, 95, 105, 115, 54, 52, 98, 105, 116, 32, - 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 95, 105, 115, 54, 52, 98, -105, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 109, 97, 116, 99, 104, 40, 109, 97, 115, 107, 41, 10, 109, - 97, 115, 107, 32, 61, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 109, 97, 115, 107, 41, 10, 108, 111, 99, 97, 108, - 32, 115, 116, 97, 114, 112, 111, 115, 32, 61, 32, 109, 97, 115, 107, 58, 102, 105, 110, 100, 40, 34, 37, 42, 34, 41, 10, 108, 111, 99, 97, 108, - 32, 98, 101, 102, 111, 114, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 115, 116, 97, 114, -112, 111, 115, 32, 97, 110, 100, 32, 109, 97, 115, 107, 58, 115, 117, 98, 40, 49, 44, 32, 115, 116, 97, 114, 112, 111, 115, 32, 45, 32, 49, 41, - 32, 111, 114, 32, 109, 97, 115, 107, 41, 10, 108, 111, 99, 97, 108, 32, 115, 108, 97, 115, 104, 112, 111, 115, 32, 61, 32, 115, 116, 97, 114, 112, -111, 115, 32, 97, 110, 100, 32, 109, 97, 115, 107, 58, 102, 105, 110, 100, 40, 34, 47, 34, 44, 32, 115, 116, 97, 114, 112, 111, 115, 41, 10, 108, -111, 99, 97, 108, 32, 97, 102, 116, 101, 114, 32, 61, 32, 115, 108, 97, 115, 104, 112, 111, 115, 32, 97, 110, 100, 32, 109, 97, 115, 107, 58, 115, -117, 98, 40, 115, 108, 97, 115, 104, 112, 111, 115, 32, 43, 32, 49, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 99, 117, 114, 115, 101, 32, 61, - 32, 115, 116, 97, 114, 112, 111, 115, 32, 97, 110, 100, 10, 109, 97, 115, 107, 58, 115, 117, 98, 40, 115, 116, 97, 114, 112, 111, 115, 32, 43, 32, - 49, 44, 32, 115, 116, 97, 114, 112, 111, 115, 32, 43, 32, 49, 41, 32, 61, 61, 32, 39, 42, 39, 32, 97, 110, 100, 10, 40, 115, 116, 97, 114, -112, 111, 115, 32, 61, 61, 32, 49, 32, 111, 114, 32, 109, 97, 115, 107, 58, 115, 117, 98, 40, 115, 116, 97, 114, 112, 111, 115, 32, 45, 32, 49, - 44, 32, 115, 116, 97, 114, 112, 111, 115, 32, 45, 32, 49, 41, 32, 61, 61, 32, 39, 47, 39, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, -117, 108, 116, 115, 32, 61, 32, 123, 32, 125, 10, 105, 102, 32, 114, 101, 99, 117, 114, 115, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 115, 117, 98, 109, 97, 115, 107, 32, 61, 32, 109, 97, 115, 107, 58, 115, 117, 98, 40, 49, 44, 32, 115, 116, 97, 114, 112, 111, 115, 41, 32, - 46, 46, 32, 109, 97, 115, 107, 58, 115, 117, 98, 40, 115, 116, 97, 114, 112, 111, 115, 32, 43, 32, 50, 41, 10, 114, 101, 115, 117, 108, 116, 115, - 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, 104, 40, 115, 117, 98, 109, 97, 115, 107, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 116, 101, -114, 110, 32, 61, 32, 109, 97, 115, 107, 58, 115, 117, 98, 40, 49, 44, 32, 115, 116, 97, 114, 112, 111, 115, 41, 10, 108, 111, 99, 97, 108, 32, -109, 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, 104, 115, 116, 97, 114, 116, 40, 112, 97, 116, 116, 101, 114, 110, 41, 10, 119, 104, 105, 108, 101, - 32, 111, 115, 46, 109, 97, 116, 99, 104, 110, 101, 120, 116, 40, 109, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 111, 115, 46, 109, 97, -116, 99, 104, 105, 115, 102, 105, 108, 101, 40, 109, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 109, 97, 116, 99, 104, 112, 97, 116, -104, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 98, 101, 102, 111, 114, 101, 44, 32, 111, 115, 46, 109, 97, 116, 99, 104, 110, 97, -109, 101, 40, 109, 41, 44, 32, 109, 97, 115, 107, 58, 115, 117, 98, 40, 115, 116, 97, 114, 112, 111, 115, 41, 41, 10, 114, 101, 115, 117, 108, 116, -115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, 115, 44, 32, 111, 115, 46, 109, 97, 116, 99, 104, - 40, 109, 97, 116, 99, 104, 112, 97, 116, 104, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 111, 115, 46, 109, 97, 116, 99, 104, 100, 111, 110, -101, 40, 109, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 116, 101, 114, 110, 32, 61, 32, 109, 97, 115, 107, 58, 115, -117, 98, 40, 49, 44, 32, 115, 108, 97, 115, 104, 112, 111, 115, 32, 97, 110, 100, 32, 115, 108, 97, 115, 104, 112, 111, 115, 32, 45, 32, 49, 41, - 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, 104, 115, 116, 97, 114, 116, 40, 112, 97, 116, 116, 101, 114, 110, - 41, 10, 119, 104, 105, 108, 101, 32, 111, 115, 46, 109, 97, 116, 99, 104, 110, 101, 120, 116, 40, 109, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, -116, 32, 40, 115, 108, 97, 115, 104, 112, 111, 115, 32, 97, 110, 100, 32, 111, 115, 46, 109, 97, 116, 99, 104, 105, 115, 102, 105, 108, 101, 40, 109, - 41, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 109, 97, 116, 99, 104, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 106, -111, 105, 110, 40, 98, 101, 102, 111, 114, 101, 44, 32, 109, 97, 116, 99, 104, 112, 97, 116, 104, 44, 32, 111, 115, 46, 109, 97, 116, 99, 104, 110, - 97, 109, 101, 40, 109, 41, 41, 10, 105, 102, 32, 97, 102, 116, 101, 114, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 115, 32, 61, 32, -116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, 115, 44, 32, 111, 115, 46, 109, 97, 116, 99, 104, 40, 112, 97, 116, -104, 46, 106, 111, 105, 110, 40, 109, 97, 116, 99, 104, 112, 97, 116, 104, 44, 32, 97, 102, 116, 101, 114, 41, 41, 41, 10, 101, 108, 115, 101, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 115, 44, 32, 109, 97, 116, 99, 104, 112, 97, 116, 104, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 111, 115, 46, 109, 97, 116, 99, 104, 100, 111, 110, 101, 40, 109, 41, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, -109, 97, 116, 99, 104, 100, 105, 114, 115, 40, 109, 97, 115, 107, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 115, 32, 61, 32, -111, 115, 46, 109, 97, 116, 99, 104, 40, 109, 97, 115, 107, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 35, 114, 101, 115, 117, 108, 116, 115, 44, - 32, 49, 44, 32, 45, 49, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 111, 115, 46, 105, 115, 100, 105, 114, 40, 114, 101, 115, 117, 108, 116, -115, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 114, 101, 115, 117, 108, 116, 115, 44, - 32, 105, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 115, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 109, 97, 116, 99, 104, 102, 105, 108, 101, 115, 40, 109, 97, 115, 107, 41, 10, 108, 111, 99, 97, -108, 32, 114, 101, 115, 117, 108, 116, 115, 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, 104, 40, 109, 97, 115, 107, 41, 10, 102, 111, 114, 32, 105, - 32, 61, 32, 35, 114, 101, 115, 117, 108, 116, 115, 44, 32, 49, 44, 32, 45, 49, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 111, 115, 46, -105, 115, 102, 105, 108, 101, 40, 114, 101, 115, 117, 108, 116, 115, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 114, 101, -109, 111, 118, 101, 40, 114, 101, 115, 117, 108, 116, 115, 44, 32, 105, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, -114, 101, 115, 117, 108, 116, 115, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 116, 105, 110, 95, 109, 107, 100, 105, 114, 32, - 61, 32, 111, 115, 46, 109, 107, 100, 105, 114, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 109, 107, 100, 105, 114, 40, 112, 41, 10, -112, 32, 61, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 32, - 61, 32, 105, 105, 102, 40, 112, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 47, 34, 41, 44, 32, 34, 47, 34, 44, 32, 34, 34, - 41, 10, 102, 111, 114, 32, 112, 97, 114, 116, 32, 105, 110, 32, 112, 58, 103, 109, 97, 116, 99, 104, 40, 34, 91, 94, 47, 93, 43, 34, 41, 32, -100, 111, 10, 100, 105, 114, 32, 61, 32, 100, 105, 114, 32, 46, 46, 32, 112, 97, 114, 116, 10, 105, 102, 32, 40, 112, 97, 114, 116, 32, 126, 61, - 32, 34, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 112, 97, 116, 104, 46, 105, 115, 97, 98, 115, 111, 108, 117, 116, 101, 40, 112, 97, 114, 116, - 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 111, 115, 46, 105, 115, 100, 105, 114, 40, 100, 105, 114, 41, 41, 32, 116, 104, 101, 110, 10, 108, 111, - 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 98, 117, 105, 108, 116, 105, 110, 95, 109, 107, 100, 105, 114, 40, 100, 105, 114, 41, - 10, 105, 102, 32, 40, 110, 111, 116, 32, 111, 107, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, -114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 100, 105, 114, 32, 61, 32, 100, 105, 114, 32, 46, 46, 32, 34, 47, 34, 10, 101, 110, 100, 10, 114, -101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 111, 117, 116, 112, 117, -116, 111, 102, 40, 99, 109, 100, 41, 10, 99, 109, 100, 32, 61, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 109, -100, 41, 10, 108, 111, 99, 97, 108, 32, 112, 105, 112, 101, 32, 61, 32, 105, 111, 46, 112, 111, 112, 101, 110, 40, 99, 109, 100, 32, 46, 46, 32, - 34, 32, 50, 62, 38, 49, 34, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 105, 112, 101, 58, 114, 101, 97, -100, 40, 39, 42, 97, 39, 41, 10, 108, 111, 99, 97, 108, 32, 115, 117, 99, 99, 101, 115, 115, 44, 32, 119, 104, 97, 116, 44, 32, 99, 111, 100, -101, 32, 61, 32, 112, 105, 112, 101, 58, 99, 108, 111, 115, 101, 40, 41, 10, 105, 102, 32, 115, 117, 99, 99, 101, 115, 115, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, -103, 115, 117, 98, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 91, 92, 114, 92, 110, 93, 43, 36, 34, 44, 32, 34, 34, 41, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 44, 32, 99, 111, 100, 101, 44, 32, 119, 104, 97, 116, 10, 101, 108, 115, 101, 10, -114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 99, 111, 100, 101, 44, 32, 119, 104, 97, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 98, 117, 105, 108, 116, 105, 110, 95, 114, 101, 109, 111, 118, 101, 32, 61, 32, 111, 115, 46, 114, 101, 109, 111, 118, 101, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 114, 101, 109, 111, 118, 101, 40, 102, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 41, - 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 111, 115, 46, 109, - 97, 116, 99, 104, 102, 105, 108, 101, 115, 40, 102, 41, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 112, - 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 44, 32, 99, 111, 100, 101, 32, 61, 32, 98, 117, 105, 108, 116, -105, 110, 95, 114, 101, 109, 111, 118, 101, 40, 118, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 111, 107, 44, 32, 101, 114, 114, 44, 32, 99, 111, 100, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 112, 32, 61, - 61, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 67, 111, 117, 108, 100, 110, 39, 116, 32, 102, -105, 110, 100, 32, 97, 110, 121, 32, 102, 105, 108, 101, 32, 109, 97, 116, 99, 104, 105, 110, 103, 58, 32, 34, 32, 46, 46, 32, 102, 44, 32, 49, - 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 102, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, -104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 102, 41, 32, 100, 111, 10, 108, 111, 99, 97, -108, 32, 111, 107, 44, 32, 101, 114, 114, 44, 32, 99, 111, 100, 101, 32, 61, 32, 111, 115, 46, 114, 101, 109, 111, 118, 101, 40, 118, 41, 10, 105, -102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 107, 44, 32, 101, 114, 114, 44, 32, 99, 111, -100, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 98, 117, 105, 108, 116, 105, 110, 95, 114, 109, 100, 105, 114, 32, 61, 32, 111, 115, 46, 114, 109, 100, 105, 114, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 114, 109, 100, 105, 114, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, -111, 115, 46, 109, 97, 116, 99, 104, 100, 105, 114, 115, 40, 112, 32, 46, 46, 32, 34, 47, 42, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, -110, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 107, - 44, 32, 101, 114, 114, 32, 61, 32, 111, 115, 46, 114, 109, 100, 105, 114, 40, 100, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, -107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 107, 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, 104, 102, 105, 108, 101, 115, 40, 112, 32, 46, 46, 32, 34, - 47, 42, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 102, 110, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 101, -115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 111, 115, 46, 114, 101, 109, 111, 118, 101, 40, -102, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 107, 44, - 32, 101, 114, 114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 98, 117, 105, 108, 116, 105, 110, 95, 114, 109, 100, 105, -114, 40, 112, 41, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 111, 115, 44, 32, 34, 115, -116, 97, 116, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 98, 97, 115, 101, 44, 32, 112, 41, 10, 112, 32, 61, 32, 112, 97, 116, 104, - 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 112, 41, 10, 114, 101, 116, 117, 114, 110, 32, 98, 97, 115, 101, 40, 112, 41, 10, 101, 110, 100, - 41, 10, 111, 115, 46, 99, 111, 109, 109, 97, 110, 100, 84, 111, 107, 101, 110, 115, 32, 61, 32, 123, 10, 95, 32, 61, 32, 123, 10, 99, 104, 100, -105, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 99, 100, 32, 34, 32, 46, 46, - 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, 44, 10, 99, 111, 112, 121, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 99, 112, 32, 45, 114, 102, 32, 34, 32, 46, 46, 32, 112, - 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, 44, 10, 100, 101, 108, 101, 116, 101, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 114, 109, 32, 45, 102, 32, 34, 32, 46, 46, 32, 112, 97, -116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, 44, 10, 101, 99, 104, 111, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 101, 99, 104, 111, 32, 34, 32, 46, 46, 32, 118, 10, 101, 110, 100, 44, - 10, 109, 107, 100, 105, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 109, 107, 100, -105, 114, 32, 45, 112, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, - 44, 10, 109, 111, 118, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 109, 118, 32, - 45, 102, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, 44, 10, 114, -109, 100, 105, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 114, 109, 32, 45, 114, -102, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, 44, 10, 116, 111, -117, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 116, 111, 117, 99, 104, 32, - 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 10, 101, 110, 100, 44, 10, 125, 44, 10, 119, -105, 110, 100, 111, 119, 115, 32, 61, 32, 123, 10, 99, 104, 100, 105, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, -101, 116, 117, 114, 110, 32, 34, 99, 104, 100, 105, 114, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, - 40, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 41, 10, 101, 110, 100, 44, 10, 99, 111, 112, 121, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 118, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, - 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 41, 10, 108, 111, 99, 97, 108, 32, 115, 114, 99, 32, 61, 32, 115, 116, -114, 105, 110, 103, 46, 109, 97, 116, 99, 104, 40, 118, 44, 32, 39, 94, 34, 46, 45, 34, 39, 41, 32, 111, 114, 32, 115, 116, 114, 105, 110, 103, - 46, 109, 97, 116, 99, 104, 40, 118, 44, 32, 39, 94, 46, 45, 32, 39, 41, 32, 111, 114, 32, 118, 10, 115, 114, 99, 32, 61, 32, 115, 116, 114, -105, 110, 103, 46, 109, 97, 116, 99, 104, 40, 115, 114, 99, 44, 32, 39, 94, 46, 42, 37, 83, 39, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, - 73, 70, 32, 69, 88, 73, 83, 84, 32, 34, 32, 46, 46, 32, 115, 114, 99, 32, 46, 46, 32, 34, 92, 92, 32, 40, 120, 99, 111, 112, 121, 32, - 47, 81, 32, 47, 69, 32, 47, 89, 32, 47, 73, 32, 34, 32, 46, 46, 32, 118, 32, 46, 46, 32, 34, 32, 62, 32, 110, 117, 108, 41, 32, 69, - 76, 83, 69, 32, 40, 120, 99, 111, 112, 121, 32, 47, 81, 32, 47, 89, 32, 47, 73, 32, 34, 32, 46, 46, 32, 118, 32, 46, 46, 32, 34, 32, - 62, 32, 110, 117, 108, 41, 34, 10, 101, 110, 100, 44, 10, 100, 101, 108, 101, 116, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 100, 101, 108, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, -101, 40, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 41, 10, 101, 110, 100, 44, 10, 101, 99, 104, 111, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 101, 99, 104, 111, 32, 34, 32, 46, 46, 32, 118, - 10, 101, 110, 100, 44, 10, 109, 107, 100, 105, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 118, 32, 61, 32, 112, 97, -116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 41, 10, -114, 101, 116, 117, 114, 110, 32, 34, 73, 70, 32, 78, 79, 84, 32, 69, 88, 73, 83, 84, 32, 34, 32, 46, 46, 32, 118, 32, 46, 46, 32, 34, - 32, 40, 109, 107, 100, 105, 114, 32, 34, 32, 46, 46, 32, 118, 32, 46, 46, 32, 34, 41, 34, 10, 101, 110, 100, 44, 10, 109, 111, 118, 101, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 109, 111, 118, 101, 32, 47, 89, 32, 34, 32, - 46, 46, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, - 40, 118, 41, 41, 10, 101, 110, 100, 44, 10, 114, 109, 100, 105, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 114, 101, -116, 117, 114, 110, 32, 34, 114, 109, 100, 105, 114, 32, 47, 83, 32, 47, 81, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, -115, 108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 41, 10, 101, 110, 100, 44, 10, 116, 111, -117, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 10, 118, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, -108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 118, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, -116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 116, 121, 112, 101, 32, 110, 117, 108, 32, 62, 62, 32, 37, 115, 32, 38, 38, 32, - 99, 111, 112, 121, 32, 47, 98, 32, 37, 115, 43, 44, 44, 32, 37, 115, 34, 44, 32, 118, 44, 32, 118, 44, 32, 118, 41, 10, 101, 110, 100, 44, - 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, -100, 115, 40, 99, 109, 100, 44, 32, 109, 97, 112, 41, 10, 109, 97, 112, 32, 61, 32, 109, 97, 112, 32, 111, 114, 32, 111, 115, 46, 116, 97, 114, -103, 101, 116, 40, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 109, 97, 112, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, -104, 101, 110, 10, 109, 97, 112, 32, 61, 32, 111, 115, 46, 99, 111, 109, 109, 97, 110, 100, 84, 111, 107, 101, 110, 115, 91, 109, 97, 112, 93, 32, -111, 114, 32, 111, 115, 46, 99, 111, 109, 109, 97, 110, 100, 84, 111, 107, 101, 110, 115, 91, 34, 95, 34, 93, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 79, 110, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 109, 100, 41, 10, 108, 111, - 99, 97, 108, 32, 105, 44, 32, 106, 44, 32, 112, 114, 101, 118, 10, 114, 101, 112, 101, 97, 116, 10, 105, 44, 32, 106, 32, 61, 32, 99, 109, 100, - 58, 102, 105, 110, 100, 40, 34, 123, 46, 45, 125, 34, 41, 10, 105, 102, 32, 105, 32, 116, 104, 101, 110, 10, 105, 102, 32, 105, 32, 61, 61, 32, -112, 114, 101, 118, 32, 116, 104, 101, 110, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 111, 107, 101, 110, 32, - 61, 32, 99, 109, 100, 58, 115, 117, 98, 40, 105, 32, 43, 32, 49, 44, 32, 106, 32, 45, 32, 49, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, -108, 111, 99, 97, 108, 32, 97, 114, 103, 115, 32, 61, 32, 99, 109, 100, 58, 115, 117, 98, 40, 106, 32, 43, 32, 50, 41, 10, 108, 111, 99, 97, -108, 32, 102, 117, 110, 99, 32, 61, 32, 109, 97, 112, 91, 116, 111, 107, 101, 110, 93, 32, 111, 114, 32, 111, 115, 46, 99, 111, 109, 109, 97, 110, -100, 84, 111, 107, 101, 110, 115, 91, 34, 95, 34, 93, 91, 116, 111, 107, 101, 110, 93, 10, 105, 102, 32, 102, 117, 110, 99, 32, 116, 104, 101, 110, - 10, 99, 109, 100, 32, 61, 32, 99, 109, 100, 58, 115, 117, 98, 40, 49, 44, 32, 105, 32, 45, 49, 41, 32, 46, 46, 32, 102, 117, 110, 99, 40, - 97, 114, 103, 115, 41, 10, 101, 110, 100, 10, 112, 114, 101, 118, 32, 61, 32, 105, 10, 101, 110, 100, 10, 117, 110, 116, 105, 108, 32, 105, 32, 61, - 61, 32, 110, 105, 108, 10, 114, 101, 116, 117, 114, 110, 32, 99, 109, 100, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 99, 109, 100, - 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 123, 125, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 109, 100, 32, 100, 111, 10, 114, 101, 115, 117, 108, 116, 91, 105, 93, - 32, 61, 32, 112, 114, 111, 99, 101, 115, 115, 79, 110, 101, 40, 99, 109, 100, 91, 105, 93, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, - 32, 114, 101, 115, 117, 108, 116, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 79, 110, 101, 40, 99, -109, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, -101, 67, 111, 109, 109, 97, 110, 100, 65, 110, 100, 80, 97, 116, 104, 40, 100, 105, 114, 44, 32, 109, 97, 112, 41, 10, 105, 102, 32, 109, 97, 112, - 32, 61, 61, 32, 39, 119, 105, 110, 100, 111, 119, 115, 39, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 116, -114, 97, 110, 115, 108, 97, 116, 101, 40, 100, 105, 114, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 100, 105, 114, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, -100, 80, 97, 116, 104, 115, 40, 99, 109, 100, 115, 44, 32, 98, 97, 115, 101, 100, 105, 114, 44, 32, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, -109, 97, 112, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 97, 110, 115, 108, 97, 116, 101, 100, 66, 97, 115, 101, 68, 105, 114, 32, 61, 32, 112, - 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 98, 97, 115, 101, 100, 105, -114, 41, 10, 109, 97, 112, 32, 61, 32, 109, 97, 112, 32, 111, 114, 32, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 10, 108, 111, 99, 97, -108, 32, 116, 114, 97, 110, 115, 108, 97, 116, 101, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, - 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 116, -114, 97, 110, 115, 108, 97, 116, 101, 100, 66, 97, 115, 101, 68, 105, 114, 44, 32, 118, 97, 108, 117, 101, 41, 10, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 65, 110, 100, 80, 97, 116, 104, 40, 114, 101, 115, -117, 108, 116, 44, 32, 109, 97, 112, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 39, 47, 39, 41, - 32, 111, 114, 32, 118, 97, 108, 117, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 39, 92, 92, 39, 41, 32, 111, 114, 32, 45, 45, 32, 105, -102, 32, 111, 114, 103, 105, 110, 97, 108, 32, 112, 97, 116, 104, 32, 101, 110, 100, 115, 32, 119, 105, 116, 104, 32, 97, 32, 115, 108, 97, 115, 104, - 32, 116, 104, 101, 110, 32, 101, 110, 115, 117, 114, 101, 32, 116, 104, 101, 32, 115, 97, 109, 101, 10, 32, 32, 32, 118, 97, 108, 117, 101, 58, 101, -110, 100, 115, 119, 105, 116, 104, 40, 39, 47, 34, 39, 41, 32, 111, 114, 32, 118, 97, 108, 117, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, - 39, 92, 92, 34, 39, 41, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 32, 46, 46, 32, 39, - 47, 39, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, -114, 111, 99, 101, 115, 115, 79, 110, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 109, 100, 41, 10, 108, 111, 99, 97, 108, 32, -114, 101, 112, 108, 97, 99, 101, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, - 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 115, 117, 98, 40, 51, 44, 32, 35, 118, 97, 108, 117, 101, 32, 45, 32, - 49, 41, 10, 114, 101, 116, 117, 114, 110, 32, 39, 34, 39, 32, 46, 46, 32, 116, 114, 97, 110, 115, 108, 97, 116, 101, 70, 117, 110, 99, 116, 105, -111, 110, 40, 118, 97, 108, 117, 101, 41, 32, 46, 46, 32, 39, 34, 39, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, -110, 103, 46, 103, 115, 117, 98, 40, 99, 109, 100, 44, 32, 34, 37, 37, 37, 91, 91, 94, 37, 93, 92, 114, 92, 110, 93, 42, 37, 93, 34, 44, - 32, 114, 101, 112, 108, 97, 99, 101, 70, 117, 110, 99, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 99, 109, -100, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, - 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 109, 100, 115, 32, 100, 111, 10, 114, 101, 115, 117, 108, 116, - 91, 105, 93, 32, 61, 32, 112, 114, 111, 99, 101, 115, 115, 79, 110, 101, 40, 99, 109, 100, 115, 91, 105, 93, 41, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 40, 114, 101, 115, 117, 108, 116, - 44, 32, 109, 97, 112, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, -111, 109, 109, 97, 110, 100, 115, 40, 112, 114, 111, 99, 101, 115, 115, 79, 110, 101, 40, 99, 109, 100, 115, 41, 44, 32, 109, 97, 112, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 111, 115, 46, 95, 117, 117, 105, 100, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, -116, 105, 110, 95, 117, 117, 105, 100, 32, 61, 32, 111, 115, 46, 117, 117, 105, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 117, -117, 105, 100, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 105, 100, 32, 61, 32, 98, 117, 105, 108, 116, 105, 110, 95, 117, 117, 105, -100, 40, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 105, 102, 32, 111, 115, 46, 95, 117, 117, 105, 100, -115, 91, 105, 100, 93, 32, 97, 110, 100, 32, 111, 115, 46, 95, 117, 117, 105, 100, 115, 91, 105, 100, 93, 32, 126, 61, 32, 110, 97, 109, 101, 32, -116, 104, 101, 110, 10, 112, 114, 101, 109, 97, 107, 101, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 105, 100, 44, 32, 34, 85, 85, 73, 68, 32, - 99, 108, 97, 115, 104, 32, 98, 101, 116, 119, 101, 101, 110, 32, 37, 115, 32, 97, 110, 100, 32, 37, 115, 34, 44, 32, 111, 115, 46, 95, 117, 117, -105, 100, 115, 91, 105, 100, 93, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 111, 115, 46, 95, 117, 117, 105, 100, 115, 91, 105, 100, 93, - 32, 61, 32, 110, 97, 109, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 105, 100, 10, 101, 110, 100, 10, 111, 115, 46, 115, 121, 115, -116, 101, 109, 84, 97, 103, 115, 32, 61, 10, 123, 10, 91, 34, 97, 105, 120, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 97, 105, -120, 34, 44, 32, 32, 32, 32, 32, 34, 112, 111, 115, 105, 120, 34, 32, 125, 44, 10, 91, 34, 98, 115, 100, 34, 93, 32, 32, 32, 32, 32, 32, - 61, 32, 123, 32, 34, 98, 115, 100, 34, 44, 32, 32, 32, 32, 32, 34, 112, 111, 115, 105, 120, 34, 32, 125, 44, 10, 91, 34, 104, 97, 105, 107, -117, 34, 93, 32, 32, 32, 32, 61, 32, 123, 32, 34, 104, 97, 105, 107, 117, 34, 44, 32, 32, 32, 34, 112, 111, 115, 105, 120, 34, 32, 125, 44, - 10, 91, 34, 105, 111, 115, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 105, 111, 115, 34, 44, 32, 32, 32, 32, 32, 34, 100, 97, -114, 119, 105, 110, 34, 44, 32, 34, 112, 111, 115, 105, 120, 34, 44, 32, 34, 109, 111, 98, 105, 108, 101, 34, 32, 125, 44, 10, 91, 34, 108, 105, -110, 117, 120, 34, 93, 32, 32, 32, 32, 61, 32, 123, 32, 34, 108, 105, 110, 117, 120, 34, 44, 32, 32, 32, 34, 112, 111, 115, 105, 120, 34, 32, -125, 44, 10, 91, 34, 109, 97, 99, 111, 115, 120, 34, 93, 32, 32, 32, 61, 32, 123, 32, 34, 109, 97, 99, 111, 115, 120, 34, 44, 32, 32, 34, -100, 97, 114, 119, 105, 110, 34, 44, 32, 34, 112, 111, 115, 105, 120, 34, 32, 125, 44, 10, 91, 34, 115, 111, 108, 97, 114, 105, 115, 34, 93, 32, - 32, 61, 32, 123, 32, 34, 115, 111, 108, 97, 114, 105, 115, 34, 44, 32, 34, 112, 111, 115, 105, 120, 34, 32, 125, 44, 10, 91, 34, 119, 105, 110, -100, 111, 119, 115, 34, 93, 32, 32, 61, 32, 123, 32, 34, 119, 105, 110, 100, 111, 119, 115, 34, 44, 32, 34, 119, 105, 110, 51, 50, 34, 32, 125, - 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 110, 97, -109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 111, 115, 46, 115, 121, 115, 116, 101, 109, 84, 97, 103, 115, 91, 110, 97, 109, 101, 58, 108, 111, -119, 101, 114, 40, 41, 93, 32, 111, 114, 32, 123, 32, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, 32, 125, 10, 101, 110, 100, 10, }; - -// src/base/io.lua -static const unsigned char builtin_script_5[] = { -112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 105, 111, 44, 32, 34, 111, 112, 101, 110, 34, 44, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 98, 97, 115, 101, 44, 32, 102, 110, 97, 109, 101, 44, 32, 109, 111, 100, 101, 41, 10, 105, 102, 32, 109, 111, 100, 101, - 32, 97, 110, 100, 32, 40, 109, 111, 100, 101, 58, 102, 105, 110, 100, 40, 34, 119, 34, 41, 32, 111, 114, 32, 109, 111, 100, 101, 58, 102, 105, 110, -100, 40, 34, 97, 34, 41, 41, 32, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, -101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 110, 97, 109, 101, 41, 10, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 111, 115, 46, -109, 107, 100, 105, 114, 40, 100, 105, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, -101, 114, 114, 44, 32, 48, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 98, 97, 115, 101, 40, 102, 110, 97, 109, -101, 44, 32, 109, 111, 100, 101, 41, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 105, 111, 46, 119, 114, 105, 116, 101, 102, -105, 108, 101, 40, 102, 105, 108, 101, 110, 97, 109, 101, 44, 32, 99, 111, 110, 116, 101, 110, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, -101, 32, 61, 32, 105, 111, 46, 111, 112, 101, 110, 40, 102, 105, 108, 101, 110, 97, 109, 101, 44, 32, 34, 119, 43, 98, 34, 41, 10, 105, 102, 32, -102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 102, 105, 108, 101, 58, 119, 114, 105, 116, 101, 40, 99, 111, 110, 116, 101, 110, 116, 41, 10, 102, 105, -108, 101, 58, 99, 108, 111, 115, 101, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 105, 111, 46, 114, 101, 97, 100, 102, 105, 108, 101, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 108, 111, - 99, 97, 108, 32, 102, 105, 108, 101, 32, 61, 32, 105, 111, 46, 111, 112, 101, 110, 40, 102, 105, 108, 101, 110, 97, 109, 101, 44, 32, 34, 114, 98, - 34, 41, 10, 105, 102, 32, 102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 32, 61, 32, -102, 105, 108, 101, 58, 114, 101, 97, 100, 40, 34, 42, 97, 34, 41, 10, 102, 105, 108, 101, 58, 99, 108, 111, 115, 101, 40, 41, 10, 114, 101, 116, -117, 114, 110, 32, 99, 111, 110, 116, 101, 110, 116, 10, 101, 110, 100, 10, 101, 110, 100, }; - -// src/base/tools.lua -static const unsigned char builtin_script_6[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 32, 61, 32, 123, 125, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 116, 111, 111, 108, 115, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 105, 100, 101, 110, 116, 105, -102, 105, 101, 114, 41, 10, 105, 102, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, -118, 34, 41, 32, 116, 104, 101, 110, 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 116, 104, 105, 115, 32, 115, 104, 111, 117, 108, 100, 32, 98, 101, - 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 63, 10, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 61, 32, 39, 109, 115, 99, 45, 39, - 32, 46, 46, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 114, 116, 115, 32, 61, - 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 58, 101, 120, 112, 108, 111, 100, 101, 40, 34, 45, 34, 44, 32, 116, 114, 117, 101, 44, 32, 49, - 41, 10, 105, 102, 32, 112, 97, 114, 116, 115, 91, 50, 93, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 112, 97, 114, 116, 115, 91, 49, 93, 10, 101, 110, 100, 10, 105, 102, 32, 112, 97, 114, 116, 115, 91, 49, 93, 32, 61, 61, 32, 34, 109, 115, - 99, 34, 32, 97, 110, 100, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 112, 97, 114, 116, 115, 91, 50, 93, 58, 115, 117, 98, 40, 49, 44, 51, - 41, 41, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 112, 97, 114, 116, 115, 91, 50, 93, 32, 61, 32, 34, 118, 34, 32, 46, 46, - 32, 112, 97, 114, 116, 115, 91, 50, 93, 10, 101, 110, 100, 10, 105, 102, 32, 112, 97, 114, 116, 115, 91, 50, 93, 58, 115, 116, 97, 114, 116, 115, -119, 105, 116, 104, 40, 34, 108, 108, 118, 109, 45, 118, 115, 34, 41, 32, 116, 104, 101, 110, 10, 112, 97, 114, 116, 115, 91, 50, 93, 32, 61, 32, - 34, 76, 76, 86, 77, 45, 34, 32, 46, 46, 32, 112, 97, 114, 116, 115, 91, 50, 93, 58, 115, 117, 98, 40, 54, 41, 10, 101, 110, 100, 10, 114, -101, 116, 117, 114, 110, 32, 112, 97, 114, 116, 115, 91, 49, 93, 32, 46, 46, 32, 39, 45, 39, 32, 46, 46, 32, 112, 97, 114, 116, 115, 91, 50, - 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 116, 111, 111, 108, 115, 46, 99, 97, 110, 111, 110, 105, 99, 97, 108, - 40, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 10, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 61, 32, 112, 46, 116, 111, 111, 108, -115, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, -114, 116, 115, 32, 61, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 58, 101, 120, 112, 108, 111, 100, 101, 40, 34, 45, 34, 44, 32, 116, 114, -117, 101, 44, 32, 49, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 116, 111, 111, 108, 115, 91, 112, 97, 114, 116, 115, 91, 49, 93, 93, 44, - 32, 112, 97, 114, 116, 115, 91, 50, 93, 10, 101, 110, 100, 10, }; - -// src/base/tree.lua -static const unsigned char builtin_script_7[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 114, 101, 101, 32, 61, 32, 123, 125, 10, 108, 111, - 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, -110, 101, 119, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, 116, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 110, 44, 10, 99, 104, 105, -108, 100, 114, 101, 110, 32, 61, 32, 123, 125, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 116, 114, 101, 101, 46, 97, 100, 100, 40, 116, 114, 44, 32, 112, 44, 32, 101, 120, 116, 114, 97, 70, 105, 101, 108, 100, 115, 41, 10, -105, 102, 32, 112, 32, 61, 61, 32, 34, 46, 34, 32, 111, 114, 32, 112, 32, 61, 61, 32, 34, 47, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 116, 114, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 114, 101, 110, 116, 110, 111, 100, 101, 32, 61, 32, 116, 114, -101, 101, 46, 97, 100, 100, 40, 116, 114, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 112, 41, 44, - 32, 101, 120, 116, 114, 97, 70, 105, 101, 108, 100, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 110, 97, 109, 101, 32, 61, 32, -112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 41, 10, 108, 111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 110, 111, 100, 101, 32, - 61, 32, 112, 97, 114, 101, 110, 116, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 99, 104, 105, 108, 100, 110, 97, 109, 101, 93, - 10, 105, 102, 32, 110, 111, 116, 32, 99, 104, 105, 108, 100, 110, 111, 100, 101, 32, 111, 114, 32, 99, 104, 105, 108, 100, 110, 111, 100, 101, 46, 112, - 97, 116, 104, 32, 126, 61, 32, 112, 32, 116, 104, 101, 110, 10, 99, 104, 105, 108, 100, 110, 111, 100, 101, 32, 61, 32, 116, 114, 101, 101, 46, 105, -110, 115, 101, 114, 116, 40, 112, 97, 114, 101, 110, 116, 110, 111, 100, 101, 44, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 99, 104, 105, 108, 100, -110, 97, 109, 101, 41, 41, 10, 99, 104, 105, 108, 100, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 61, 32, 112, 10, 105, 102, 32, 101, 120, 116, -114, 97, 70, 105, 101, 108, 100, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 107, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 101, -120, 116, 114, 97, 70, 105, 101, 108, 100, 115, 41, 32, 100, 111, 10, 99, 104, 105, 108, 100, 110, 111, 100, 101, 91, 107, 93, 32, 61, 32, 118, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 104, 105, 108, 100, 110, 111, 100, 101, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 114, 101, 110, 116, 44, 32, 99, 104, -105, 108, 100, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 114, 101, 110, 116, 46, 99, 104, 105, 108, 100, 114, 101, -110, 44, 32, 99, 104, 105, 108, 100, 41, 10, 105, 102, 32, 99, 104, 105, 108, 100, 46, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 112, 97, 114, -101, 110, 116, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 99, 104, 105, 108, 100, 46, 110, 97, 109, 101, 93, 32, 61, 32, 99, 104, 105, 108, 100, - 10, 101, 110, 100, 10, 99, 104, 105, 108, 100, 46, 112, 97, 114, 101, 110, 116, 32, 61, 32, 112, 97, 114, 101, 110, 116, 10, 114, 101, 116, 117, 114, -110, 32, 99, 104, 105, 108, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, 103, 101, 116, 108, 111, 99, - 97, 108, 112, 97, 116, 104, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 116, 104, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, -100, 101, 46, 99, 102, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 110, 97, 109, 101, - 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, 104, 97, 115, 98, 114, 97, 110, 99, 104, 101, 115, 40, 116, 114, 41, 10, 108, 111, 99, - 97, 108, 32, 110, 32, 61, 32, 35, 116, 114, 46, 99, 104, 105, 108, 100, 114, 101, 110, 10, 105, 102, 32, 110, 32, 62, 32, 48, 32, 116, 104, 101, -110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 110, 32, 100, 111, 10, 105, 102, 32, 35, 116, 114, 46, 99, 104, 105, 108, 100, 114, 101, -110, 91, 105, 93, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, -117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, 105, 115, 112, 97, 114, 101, 110, 116, 40, 110, 44, 32, 99, 104, 105, 108, 100, 41, - 10, 108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 99, 104, 105, 108, 100, 46, 112, 97, 114, 101, 110, 116, 10, 119, 104, 105, 108, 101, 32, 112, 32, -100, 111, 10, 105, 102, 32, 112, 32, 61, 61, 32, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, -100, 10, 112, 32, 61, 32, 112, 46, 112, 97, 114, 101, 110, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, 114, 101, 109, 111, 118, 101, 40, 110, 111, 100, 101, 41, 10, 108, -111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 99, 104, 105, 108, -100, 114, 101, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 104, 105, 108, 100, 114, 101, 110, 32, 100, 111, 10, 105, 102, 32, - 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 32, 61, 61, 32, 110, 111, 100, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 114, -101, 109, 111, 118, 101, 40, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 105, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 110, 111, 100, 101, 46, - 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, -115, 111, 114, 116, 40, 116, 114, 44, 32, 102, 110, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 110, 32, 116, 104, 101, 110, 10, 102, 110, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 98, 41, 32, 114, 101, 116, 117, 114, 110, 32, 97, 46, 110, 97, 109, 101, 32, 60, 32, 98, - 46, 110, 97, 109, 101, 32, 101, 110, 100, 10, 101, 110, 100, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, -123, 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 116, 97, 98, 108, 101, 46, -115, 111, 114, 116, 40, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 102, 110, 41, 10, 101, 110, 100, 10, 125, 44, 32, 116, -114, 117, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, -116, 44, 32, 102, 110, 44, 32, 105, 110, 99, 108, 117, 100, 101, 114, 111, 111, 116, 44, 32, 105, 110, 105, 116, 105, 97, 108, 100, 101, 112, 116, 104, - 41, 10, 108, 111, 99, 97, 108, 32, 100, 111, 110, 111, 100, 101, 44, 32, 100, 111, 99, 104, 105, 108, 100, 114, 101, 110, 10, 100, 111, 110, 111, 100, -101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 102, 110, 44, 32, 100, 101, 112, 116, 104, 41, 10, 105, 102, - 32, 110, 111, 100, 101, 46, 105, 115, 114, 101, 109, 111, 118, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, -105, 102, 32, 102, 110, 46, 111, 110, 110, 111, 100, 101, 32, 116, 104, 101, 110, 10, 102, 110, 46, 111, 110, 110, 111, 100, 101, 40, 110, 111, 100, 101, - 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, 62, - 32, 48, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 110, 46, 111, 110, 98, 114, 97, 110, 99, 104, 101, 110, 116, 101, 114, 32, 116, 104, 101, 110, - 10, 102, 110, 46, 111, 110, 98, 114, 97, 110, 99, 104, 101, 110, 116, 101, 114, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, -110, 100, 10, 105, 102, 32, 102, 110, 46, 111, 110, 98, 114, 97, 110, 99, 104, 32, 116, 104, 101, 110, 10, 102, 110, 46, 111, 110, 98, 114, 97, 110, - 99, 104, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 100, 111, 99, 104, 105, 108, 100, 114, 101, 110, 40, 110, -111, 100, 101, 44, 32, 102, 110, 44, 32, 100, 101, 112, 116, 104, 32, 43, 32, 49, 41, 10, 105, 102, 32, 102, 110, 46, 111, 110, 98, 114, 97, 110, - 99, 104, 101, 120, 105, 116, 32, 116, 104, 101, 110, 10, 102, 110, 46, 111, 110, 98, 114, 97, 110, 99, 104, 101, 120, 105, 116, 40, 110, 111, 100, 101, - 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, 32, 102, 110, 46, 111, 110, 108, 101, 97, 102, 32, 116, -104, 101, 110, 10, 102, 110, 46, 111, 110, 108, 101, 97, 102, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, 100, 111, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 97, 114, -101, 110, 116, 44, 32, 102, 110, 44, 32, 100, 101, 112, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 49, 10, 119, 104, 105, 108, -101, 32, 105, 32, 60, 61, 32, 35, 112, 97, 114, 101, 110, 116, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, 100, 111, 10, 108, 111, 99, 97, 108, - 32, 110, 111, 100, 101, 32, 61, 32, 112, 97, 114, 101, 110, 116, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 10, 100, 111, 110, 111, 100, -101, 40, 110, 111, 100, 101, 44, 32, 102, 110, 44, 32, 100, 101, 112, 116, 104, 41, 10, 105, 102, 32, 110, 111, 100, 101, 32, 61, 61, 32, 112, 97, -114, 101, 110, 116, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 32, 116, 104, 101, 110, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 105, 110, 105, 116, 105, 97, 108, 100, 101, 112, 116, 104, 32, -116, 104, 101, 110, 10, 105, 110, 105, 116, 105, 97, 108, 100, 101, 112, 116, 104, 32, 61, 32, 48, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 99, -108, 117, 100, 101, 114, 111, 111, 116, 32, 116, 104, 101, 110, 10, 100, 111, 110, 111, 100, 101, 40, 116, 44, 32, 102, 110, 44, 32, 105, 110, 105, 116, -105, 97, 108, 100, 101, 112, 116, 104, 41, 10, 101, 108, 115, 101, 10, 100, 111, 99, 104, 105, 108, 100, 114, 101, 110, 40, 116, 44, 32, 102, 110, 44, - 32, 105, 110, 105, 116, 105, 97, 108, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -116, 114, 101, 101, 46, 116, 114, 105, 109, 114, 111, 111, 116, 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 105, 109, 109, 101, 100, 10, -119, 104, 105, 108, 101, 32, 35, 116, 114, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 61, 32, 49, 32, 100, 111, 10, 108, 111, 99, 97, 108, - 32, 110, 111, 100, 101, 32, 61, 32, 116, 114, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 49, 93, 10, 105, 102, 32, 35, 110, 111, 100, 101, 46, - 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 61, 32, 48, 32, 111, 114, 32, 110, 111, 100, 101, 46, 116, 114, 105, 109, 32, 61, 61, 32, 102, 97, -108, 115, 101, 32, 116, 104, 101, 110, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 116, 114, 105, 109, 109, 101, 100, 32, 61, 32, 116, 114, 117, -101, 10, 108, 111, 99, 97, 108, 32, 110, 117, 109, 67, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 35, 110, 111, 100, 101, 46, 99, 104, 105, 108, -100, 114, 101, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 110, 117, 109, 67, 104, 105, 108, 100, 114, 101, 110, 32, 100, 111, 10, 108, -111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 32, 61, 32, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 10, 99, 104, -105, 108, 100, 46, 112, 97, 114, 101, 110, 116, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 10, 116, 114, 46, 99, 104, 105, 108, -100, 114, 101, 110, 91, 105, 93, 32, 61, 32, 99, 104, 105, 108, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 100, 111, -116, 100, 111, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 117, 110, 116, 32, 61, 32, 35, 116, 114, 46, 99, 104, 105, 108, 100, 114, 101, 110, 10, -114, 101, 112, 101, 97, 116, 10, 100, 111, 116, 100, 111, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, - 32, 99, 111, 117, 110, 116, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, 116, 114, 46, 99, 104, 105, 108, 100, 114, -101, 110, 91, 105, 93, 10, 105, 102, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 61, 61, 32, 34, 46, 46, 34, 32, 97, 110, 100, 32, 35, -110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 104, -105, 108, 100, 32, 61, 32, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 49, 93, 10, 99, 104, 105, 108, 100, 46, 112, 97, 114, -101, 110, 116, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 10, 116, 114, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, - 32, 61, 32, 99, 104, 105, 108, 100, 10, 116, 114, 105, 109, 109, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 100, 111, 116, 100, 111, 116, 32, 61, - 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 117, 110, 116, 105, 108, 32, 110, 111, 116, 32, 100, 111, 116, 100, 111, 116, 10, 105, -102, 32, 116, 114, 105, 109, 109, 101, 100, 32, 116, 104, 101, 110, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, - 32, 123, 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, -100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 61, 32, -112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 116, 104, 44, 32, 110, 111, 100, 101, - 46, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 61, 32, 110, 111, 100, 101, 46, 110, 97, 109, -101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 44, 32, 102, 97, 108, 115, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// src/base/globals.lua -static const unsigned char builtin_script_8[] = { -102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 102, 105, 108, 101, 111, 112, 116, 40, 102, 110, 97, 109, 101, 41, 10, 105, 102, 32, 116, 121, 112, -101, 40, 102, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 32, 102, 110, 97, 109, 101, 32, - 61, 32, 123, 102, 110, 97, 109, 101, 125, 32, 101, 110, 100, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 102, 110, 97, 109, 101, 32, -100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 111, 117, 110, 100, 32, 61, 32, 111, 115, 46, 108, 111, 99, 97, 116, 101, 40, 102, 110, 97, 109, 101, - 91, 105, 93, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 32, 116, 104, 101, 110, 10, 102, 111, 117, 110, 100, 32, 61, 32, 111, -115, 46, 108, 111, 99, 97, 116, 101, 40, 102, 110, 97, 109, 101, 91, 105, 93, 32, 46, 46, 32, 34, 46, 108, 117, 97, 34, 41, 10, 101, 110, 100, - 10, 105, 102, 32, 102, 111, 117, 110, 100, 32, 116, 104, 101, 110, 10, 100, 111, 102, 105, 108, 101, 40, 102, 111, 117, 110, 100, 41, 10, 114, 101, 116, -117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 111, 46, 95, 105, 110, 99, 108, 117, 100, 101, -100, 70, 105, 108, 101, 115, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 105, 110, 99, 108, 117, 100, 101, 40, 102, 110, 97, -109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 108, 108, 80, 97, 116, 104, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 110, -100, 80, 114, 111, 106, 101, 99, 116, 83, 99, 114, 105, 112, 116, 40, 102, 110, 97, 109, 101, 41, 10, 102, 110, 97, 109, 101, 32, 61, 32, 102, 117, -108, 108, 80, 97, 116, 104, 32, 111, 114, 32, 102, 110, 97, 109, 101, 10, 105, 102, 32, 110, 111, 116, 32, 105, 111, 46, 95, 105, 110, 99, 108, 117, -100, 101, 100, 70, 105, 108, 101, 115, 91, 102, 110, 97, 109, 101, 93, 32, 116, 104, 101, 110, 10, 105, 111, 46, 95, 105, 110, 99, 108, 117, 100, 101, -100, 70, 105, 108, 101, 115, 91, 102, 110, 97, 109, 101, 93, 32, 61, 32, 116, 114, 117, 101, 10, 114, 101, 116, 117, 114, 110, 32, 100, 111, 102, 105, -108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, -100, 101, 40, 95, 71, 44, 32, 34, 114, 101, 113, 117, 105, 114, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 98, 97, 115, 101, 44, - 32, 109, 111, 100, 110, 97, 109, 101, 44, 32, 118, 101, 114, 115, 105, 111, 110, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, - 44, 32, 109, 111, 100, 32, 61, 32, 112, 99, 97, 108, 108, 40, 98, 97, 115, 101, 44, 109, 111, 100, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, -111, 116, 32, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 10, 105, 102, 32, 40, 112, 114, 101, 109, 97, 107, 101, 46, 100, 111, 119, 110, 108, -111, 97, 100, 77, 111, 100, 117, 108, 101, 40, 109, 111, 100, 110, 97, 109, 101, 44, 32, 118, 101, 114, 115, 105, 111, 110, 115, 41, 41, 32, 116, 104, -101, 110, 10, 114, 101, 115, 117, 108, 116, 44, 32, 109, 111, 100, 32, 61, 32, 112, 99, 97, 108, 108, 40, 98, 97, 115, 101, 44, 32, 109, 111, 100, -110, 97, 109, 101, 41, 59, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 10, 101, 114, -114, 111, 114, 40, 109, 111, 100, 44, 32, 51, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 109, 111, 100, 32, 97, 110, 100, 32, 118, -101, 114, 115, 105, 111, 110, 115, 32, 97, 110, 100, 32, 110, 111, 116, 32, 112, 114, 101, 109, 97, 107, 101, 46, 99, 104, 101, 99, 107, 86, 101, 114, -115, 105, 111, 110, 40, 109, 111, 100, 46, 95, 86, 69, 82, 83, 73, 79, 78, 44, 32, 118, 101, 114, 115, 105, 111, 110, 115, 41, 32, 116, 104, 101, -110, 10, 101, 114, 114, 111, 114, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 109, 111, 100, 117, 108, 101, 32, 37, 115, - 32, 37, 115, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 109, 101, 101, 116, 32, 118, 101, 114, 115, 105, 111, 110, 32, 99, 114, 105, 116, 101, 114, -105, 97, 32, 37, 115, 34, 44, 10, 109, 111, 100, 110, 97, 109, 101, 44, 32, 109, 111, 100, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, 111, 114, - 32, 34, 40, 110, 111, 110, 101, 41, 34, 44, 32, 118, 101, 114, 115, 105, 111, 110, 115, 41, 44, 32, 51, 41, 10, 101, 110, 100, 10, 114, 101, 116, -117, 114, 110, 32, 109, 111, 100, 10, 101, 110, 100, 41, 10, }; - -// src/base/moduledownloader.lua -static const unsigned char builtin_script_9[] = { -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 100, 111, 119, 110, 108, 111, 97, 100, 77, 111, 100, 117, 108, 101, 40, -109, 111, 100, 110, 97, 109, 101, 44, 32, 118, 101, 114, 115, 105, 111, 110, 115, 41, 10, 105, 102, 32, 104, 116, 116, 112, 32, 61, 61, 32, 110, 105, -108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 117, 115, -101, 114, 32, 61, 32, 39, 85, 78, 75, 78, 79, 87, 78, 39, 10, 105, 102, 32, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 39, 119, 105, 110, -100, 111, 119, 115, 39, 41, 32, 116, 104, 101, 110, 10, 117, 115, 101, 114, 32, 61, 32, 111, 115, 46, 103, 101, 116, 101, 110, 118, 40, 39, 85, 83, - 69, 82, 78, 65, 77, 69, 39, 41, 32, 111, 114, 32, 117, 115, 101, 114, 10, 101, 108, 115, 101, 10, 117, 115, 101, 114, 32, 61, 32, 111, 115, 46, -103, 101, 116, 101, 110, 118, 40, 39, 76, 79, 71, 78, 65, 77, 69, 39, 41, 32, 111, 114, 32, 117, 115, 101, 114, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 115, 101, 114, 118, 101, 114, 32, 61, 32, 112, 97, 99, 107, 97, 103, 101, 46, 115, 101, 114, 118, 101, 114, 32, 111, 114, 32, 39, -104, 116, 116, 112, 58, 47, 47, 112, 97, 99, 107, 97, 103, 101, 115, 114, 118, 46, 99, 111, 109, 39, 59, 10, 108, 111, 99, 97, 108, 32, 117, 114, -108, 32, 61, 32, 39, 97, 112, 105, 47, 118, 49, 47, 109, 111, 100, 117, 108, 101, 47, 39, 32, 46, 46, 32, 104, 116, 116, 112, 46, 101, 115, 99, - 97, 112, 101, 85, 114, 108, 80, 97, 114, 97, 109, 40, 109, 111, 100, 110, 97, 109, 101, 41, 10, 105, 102, 32, 118, 101, 114, 115, 105, 111, 110, 115, - 32, 116, 104, 101, 110, 10, 117, 114, 108, 32, 61, 32, 117, 114, 108, 32, 46, 46, 32, 39, 47, 39, 32, 46, 46, 32, 104, 116, 116, 112, 46, 101, -115, 99, 97, 112, 101, 85, 114, 108, 80, 97, 114, 97, 109, 40, 118, 101, 114, 115, 105, 111, 110, 115, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, -108, 32, 99, 111, 110, 116, 101, 110, 116, 44, 32, 114, 101, 115, 117, 108, 116, 95, 115, 116, 114, 44, 32, 114, 101, 115, 112, 111, 110, 115, 101, 95, - 99, 111, 100, 101, 32, 61, 32, 104, 116, 116, 112, 46, 103, 101, 116, 40, 115, 101, 114, 118, 101, 114, 32, 46, 46, 32, 39, 47, 39, 32, 46, 46, - 32, 117, 114, 108, 41, 10, 105, 102, 32, 99, 111, 110, 116, 101, 110, 116, 32, 116, 104, 101, 110, 10, 117, 114, 108, 32, 61, 32, 99, 111, 110, 116, -101, 110, 116, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, -108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 32, 39, 46, 109, 111, 100, 117, 108, 101, 115, 47, 39, 32, 46, 46, 32, 109, 111, 100, 110, 97, 109, -101, 10, 108, 111, 99, 97, 108, 32, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 32, 61, 32, 108, 111, 99, 97, 116, 105, 111, 110, 32, 46, - 46, 32, 39, 47, 116, 101, 109, 112, 46, 122, 105, 112, 39, 10, 111, 115, 46, 109, 107, 100, 105, 114, 40, 108, 111, 99, 97, 116, 105, 111, 110, 41, - 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 95, 115, 116, 114, 44, 32, 114, 101, 115, 112, 111, 110, 115, 101, 95, 99, 111, 100, 101, - 32, 61, 32, 104, 116, 116, 112, 46, 100, 111, 119, 110, 108, 111, 97, 100, 40, 117, 114, 108, 44, 32, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, -110, 44, 32, 123, 10, 104, 101, 97, 100, 101, 114, 115, 32, 32, 61, 32, 123, 39, 88, 45, 80, 114, 101, 109, 97, 107, 101, 45, 85, 115, 101, 114, - 58, 32, 39, 32, 46, 46, 32, 117, 115, 101, 114, 125, 44, 10, 112, 114, 111, 103, 114, 101, 115, 115, 32, 61, 32, 105, 105, 102, 40, 95, 79, 80, - 84, 73, 79, 78, 83, 46, 118, 101, 114, 98, 111, 115, 101, 44, 32, 104, 116, 116, 112, 46, 114, 101, 112, 111, 114, 116, 80, 114, 111, 103, 114, 101, -115, 115, 44, 32, 110, 105, 108, 41, 10, 125, 41, 10, 105, 102, 32, 114, 101, 115, 117, 108, 116, 95, 115, 116, 114, 32, 126, 61, 32, 39, 79, 75, - 39, 32, 116, 104, 101, 110, 10, 112, 114, 101, 109, 97, 107, 101, 46, 101, 114, 114, 111, 114, 40, 39, 68, 111, 119, 110, 108, 111, 97, 100, 32, 111, -102, 32, 37, 115, 32, 102, 97, 105, 108, 101, 100, 32, 40, 37, 100, 41, 92, 110, 37, 115, 39, 44, 32, 117, 114, 108, 44, 32, 114, 101, 115, 112, -111, 110, 115, 101, 95, 99, 111, 100, 101, 44, 32, 114, 101, 115, 117, 108, 116, 95, 115, 116, 114, 41, 10, 101, 110, 100, 10, 118, 101, 114, 98, 111, -115, 101, 102, 40, 39, 32, 85, 78, 90, 73, 80, 32, 32, 32, 58, 32, 37, 115, 39, 44, 32, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, - 41, 10, 122, 105, 112, 46, 101, 120, 116, 114, 97, 99, 116, 40, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 44, 32, 108, 111, 99, 97, 116, -105, 111, 110, 41, 10, 111, 115, 46, 114, 101, 109, 111, 118, 101, 40, 100, 101, 115, 116, 105, 110, 97, 116, 105, 111, 110, 41, 10, 114, 101, 116, 117, -114, 110, 32, 116, 114, 117, 101, 59, 10, 101, 110, 100, 10, }; - -// src/base/semver.lua -static const unsigned char builtin_script_10[] = { -108, 111, 99, 97, 108, 32, 115, 101, 109, 118, 101, 114, 32, 61, 32, 123, 10, 32, 32, 95, 86, 69, 82, 83, 73, 79, 78, 32, 32, 32, 32, 32, - 61, 32, 39, 49, 46, 50, 46, 49, 39, 44, 10, 32, 32, 95, 68, 69, 83, 67, 82, 73, 80, 84, 73, 79, 78, 32, 61, 32, 39, 115, 101, 109, -118, 101, 114, 32, 102, 111, 114, 32, 76, 117, 97, 39, 44, 10, 32, 32, 95, 85, 82, 76, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 39, -104, 116, 116, 112, 115, 58, 47, 47, 103, 105, 116, 104, 117, 98, 46, 99, 111, 109, 47, 107, 105, 107, 105, 116, 111, 47, 115, 101, 109, 118, 101, 114, - 46, 108, 117, 97, 39, 44, 10, 32, 32, 95, 76, 73, 67, 69, 78, 83, 69, 32, 32, 32, 32, 32, 61, 32, 91, 91, 10, 32, 32, 32, 32, 77, - 73, 84, 32, 76, 73, 67, 69, 78, 83, 69, 10, 32, 32, 32, 32, 67, 111, 112, 121, 114, 105, 103, 104, 116, 32, 40, 99, 41, 32, 50, 48, 49, - 53, 32, 69, 110, 114, 105, 113, 117, 101, 32, 71, 97, 114, 99, 195, 173, 97, 32, 67, 111, 116, 97, 10, 32, 32, 32, 32, 80, 101, 114, 109, 105, -115, 115, 105, 111, 110, 32, 105, 115, 32, 104, 101, 114, 101, 98, 121, 32, 103, 114, 97, 110, 116, 101, 100, 44, 32, 102, 114, 101, 101, 32, 111, 102, - 32, 99, 104, 97, 114, 103, 101, 44, 32, 116, 111, 32, 97, 110, 121, 32, 112, 101, 114, 115, 111, 110, 32, 111, 98, 116, 97, 105, 110, 105, 110, 103, - 32, 97, 10, 32, 32, 32, 32, 99, 111, 112, 121, 32, 111, 102, 32, 116, 111, 116, 104, 101, 114, 32, 115, 111, 102, 116, 119, 97, 114, 101, 32, 97, -110, 100, 32, 97, 115, 115, 111, 99, 105, 97, 116, 101, 100, 32, 100, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 32, 102, 105, 108, 101, -115, 32, 40, 116, 104, 101, 10, 32, 32, 32, 32, 34, 83, 111, 102, 116, 119, 97, 114, 101, 34, 41, 44, 32, 116, 111, 32, 100, 101, 97, 108, 32, -105, 110, 32, 116, 104, 101, 32, 83, 111, 102, 116, 119, 97, 114, 101, 32, 119, 105, 116, 104, 111, 117, 116, 32, 114, 101, 115, 116, 114, 105, 99, 116, -105, 111, 110, 44, 32, 105, 110, 99, 108, 117, 100, 105, 110, 103, 10, 32, 32, 32, 32, 119, 105, 116, 104, 111, 117, 116, 32, 108, 105, 109, 105, 116, - 97, 116, 105, 111, 110, 32, 116, 104, 101, 32, 114, 105, 103, 104, 116, 115, 32, 116, 111, 32, 117, 115, 101, 44, 32, 99, 111, 112, 121, 44, 32, 109, -111, 100, 105, 102, 121, 44, 32, 109, 101, 114, 103, 101, 44, 32, 112, 117, 98, 108, 105, 115, 104, 44, 10, 32, 32, 32, 32, 100, 105, 115, 116, 114, -105, 98, 117, 116, 101, 44, 32, 115, 117, 98, 108, 105, 99, 101, 110, 115, 101, 44, 32, 97, 110, 100, 47, 111, 114, 32, 115, 101, 108, 108, 32, 99, -111, 112, 105, 101, 115, 32, 111, 102, 32, 116, 104, 101, 32, 83, 111, 102, 116, 119, 97, 114, 101, 44, 32, 97, 110, 100, 32, 116, 111, 10, 32, 32, - 32, 32, 112, 101, 114, 109, 105, 116, 32, 112, 101, 114, 115, 111, 110, 115, 32, 116, 111, 32, 119, 104, 111, 109, 32, 116, 104, 101, 32, 83, 111, 102, -116, 119, 97, 114, 101, 32, 105, 115, 32, 102, 117, 114, 110, 105, 115, 104, 101, 100, 32, 116, 111, 32, 100, 111, 32, 115, 111, 44, 32, 115, 117, 98, -106, 101, 99, 116, 32, 116, 111, 10, 32, 32, 32, 32, 116, 104, 101, 32, 102, 111, 108, 108, 111, 119, 105, 110, 103, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 115, 58, 10, 32, 32, 32, 32, 84, 104, 101, 32, 97, 98, 111, 118, 101, 32, 99, 111, 112, 121, 114, 105, 103, 104, 116, 32, 110, 111, -116, 105, 99, 101, 32, 97, 110, 100, 32, 116, 111, 116, 104, 101, 114, 32, 112, 101, 114, 109, 105, 115, 115, 105, 111, 110, 32, 110, 111, 116, 105, 99, -101, 32, 115, 104, 97, 108, 108, 32, 98, 101, 32, 105, 110, 99, 108, 117, 100, 101, 100, 10, 32, 32, 32, 32, 105, 110, 32, 97, 108, 108, 32, 99, -111, 112, 105, 101, 115, 32, 111, 114, 32, 115, 117, 98, 115, 116, 97, 110, 116, 105, 97, 108, 32, 112, 111, 114, 116, 105, 111, 110, 115, 32, 111, 102, - 32, 116, 104, 101, 32, 83, 111, 102, 116, 119, 97, 114, 101, 46, 10, 32, 32, 32, 32, 84, 72, 69, 32, 83, 79, 70, 84, 87, 65, 82, 69, 32, - 73, 83, 32, 80, 82, 79, 86, 73, 68, 69, 68, 32, 34, 65, 83, 32, 73, 83, 34, 44, 32, 87, 73, 84, 72, 79, 85, 84, 32, 87, 65, 82, - 82, 65, 78, 84, 89, 32, 79, 70, 32, 65, 78, 89, 32, 75, 73, 78, 68, 44, 32, 69, 88, 80, 82, 69, 83, 83, 10, 32, 32, 32, 32, 79, - 82, 32, 73, 77, 80, 76, 73, 69, 68, 44, 32, 73, 78, 67, 76, 85, 68, 73, 78, 71, 32, 66, 85, 84, 32, 78, 79, 84, 32, 76, 73, 77, - 73, 84, 69, 68, 32, 84, 79, 32, 84, 72, 69, 32, 87, 65, 82, 82, 65, 78, 84, 73, 69, 83, 32, 79, 70, 10, 32, 32, 32, 32, 77, 69, - 82, 67, 72, 65, 78, 84, 65, 66, 73, 76, 73, 84, 89, 44, 32, 70, 73, 84, 78, 69, 83, 83, 32, 70, 79, 82, 32, 65, 32, 80, 65, 82, - 84, 73, 67, 85, 76, 65, 82, 32, 80, 85, 82, 80, 79, 83, 69, 32, 65, 78, 68, 32, 78, 79, 78, 73, 78, 70, 82, 73, 78, 71, 69, 77, - 69, 78, 84, 46, 10, 32, 32, 32, 32, 73, 78, 32, 78, 79, 32, 69, 86, 69, 78, 84, 32, 83, 72, 65, 76, 76, 32, 84, 72, 69, 32, 65, - 85, 84, 72, 79, 82, 83, 32, 79, 82, 32, 67, 79, 80, 89, 82, 73, 71, 72, 84, 32, 72, 79, 76, 68, 69, 82, 83, 32, 66, 69, 32, 76, - 73, 65, 66, 76, 69, 32, 70, 79, 82, 32, 65, 78, 89, 10, 32, 32, 32, 32, 67, 76, 65, 73, 77, 44, 32, 68, 65, 77, 65, 71, 69, 83, - 32, 79, 82, 32, 79, 84, 72, 69, 82, 32, 76, 73, 65, 66, 73, 76, 73, 84, 89, 44, 32, 87, 72, 69, 84, 72, 69, 82, 32, 73, 78, 32, - 65, 78, 32, 65, 67, 84, 73, 79, 78, 32, 79, 70, 32, 67, 79, 78, 84, 82, 65, 67, 84, 44, 10, 32, 32, 32, 32, 84, 79, 82, 84, 32, - 79, 82, 32, 79, 84, 72, 69, 82, 87, 73, 83, 69, 44, 32, 65, 82, 73, 83, 73, 78, 71, 32, 70, 82, 79, 77, 44, 32, 79, 85, 84, 32, - 79, 70, 32, 79, 82, 32, 73, 78, 32, 67, 79, 78, 78, 69, 67, 84, 73, 79, 78, 32, 87, 73, 84, 72, 32, 84, 72, 69, 10, 32, 32, 32, - 32, 83, 79, 70, 84, 87, 65, 82, 69, 32, 79, 82, 32, 84, 72, 69, 32, 85, 83, 69, 32, 79, 82, 32, 79, 84, 72, 69, 82, 32, 68, 69, - 65, 76, 73, 78, 71, 83, 32, 73, 78, 32, 84, 72, 69, 32, 83, 79, 70, 84, 87, 65, 82, 69, 46, 10, 32, 32, 93, 93, 10, 125, 10, 108, -111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 104, 101, 99, 107, 80, 111, 115, 105, 116, 105, 118, 101, 73, 110, 116, 101, 103, -101, 114, 40, 110, 117, 109, 98, 101, 114, 44, 32, 110, 97, 109, 101, 41, 10, 32, 32, 97, 115, 115, 101, 114, 116, 40, 110, 117, 109, 98, 101, 114, - 32, 62, 61, 32, 48, 44, 32, 110, 97, 109, 101, 32, 46, 46, 32, 39, 32, 109, 117, 115, 116, 32, 98, 101, 32, 97, 32, 118, 97, 108, 105, 100, - 32, 112, 111, 115, 105, 116, 105, 118, 101, 32, 110, 117, 109, 98, 101, 114, 39, 41, 10, 32, 32, 97, 115, 115, 101, 114, 116, 40, 109, 97, 116, 104, - 46, 102, 108, 111, 111, 114, 40, 110, 117, 109, 98, 101, 114, 41, 32, 61, 61, 32, 110, 117, 109, 98, 101, 114, 44, 32, 110, 97, 109, 101, 32, 46, - 46, 32, 39, 32, 109, 117, 115, 116, 32, 98, 101, 32, 97, 110, 32, 105, 110, 116, 101, 103, 101, 114, 39, 41, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 115, 101, 110, 116, 40, 118, 97, 108, 117, 101, 41, 10, 32, 32, 114, 101, 116, -117, 114, 110, 32, 118, 97, 108, 117, 101, 32, 97, 110, 100, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 39, 39, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 112, 108, 105, 116, 66, 121, 68, 111, 116, 40, 115, 116, 114, 41, 10, 32, 32, 115, -116, 114, 32, 61, 32, 115, 116, 114, 32, 111, 114, 32, 34, 34, 10, 32, 32, 108, 111, 99, 97, 108, 32, 116, 44, 32, 99, 111, 117, 110, 116, 32, - 61, 32, 123, 125, 44, 32, 48, 10, 32, 32, 115, 116, 114, 58, 103, 115, 117, 98, 40, 34, 40, 91, 94, 37, 46, 93, 43, 41, 34, 44, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 41, 10, 32, 32, 32, 32, 99, 111, 117, 110, 116, 32, 61, 32, 99, 111, 117, 110, 116, 32, 43, 32, 49, - 10, 32, 32, 32, 32, 116, 91, 99, 111, 117, 110, 116, 93, 32, 61, 32, 99, 10, 32, 32, 101, 110, 100, 41, 10, 32, 32, 114, 101, 116, 117, 114, -110, 32, 116, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 114, 115, 101, 80, 114, 101, 114, -101, 108, 101, 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 40, 115, 116, 114, 41, 10, 32, 32, 108, 111, - 99, 97, 108, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 44, 32, 98, 117, 105, 108, 100, 87, 105, 116, -104, 83, 105, 103, 110, 32, 61, 32, 115, 116, 114, 58, 109, 97, 116, 99, 104, 40, 34, 94, 40, 45, 91, 94, 43, 93, 43, 41, 40, 43, 46, 43, - 41, 36, 34, 41, 10, 32, 32, 105, 102, 32, 110, 111, 116, 32, 40, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, -110, 32, 97, 110, 100, 32, 98, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 112, 114, -101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 32, 61, 32, 115, 116, 114, 58, 109, 97, 116, 99, 104, 40, 34, 94, 40, - 45, 46, 43, 41, 36, 34, 41, 10, 32, 32, 32, 32, 98, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 32, 32, 32, 32, 32, 32, 61, - 32, 115, 116, 114, 58, 109, 97, 116, 99, 104, 40, 34, 94, 40, 43, 46, 43, 41, 36, 34, 41, 10, 32, 32, 101, 110, 100, 10, 32, 32, 97, 115, -115, 101, 114, 116, 40, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 32, 111, 114, 32, 98, 117, 105, 108, 100, - 87, 105, 116, 104, 83, 105, 103, 110, 44, 32, 40, 34, 84, 104, 101, 32, 112, 97, 114, 97, 109, 101, 116, 101, 114, 32, 37, 113, 32, 109, 117, 115, -116, 32, 98, 101, 103, 105, 110, 32, 119, 105, 116, 104, 32, 43, 32, 111, 114, 32, 45, 32, 116, 111, 32, 100, 101, 110, 111, 116, 101, 32, 97, 32, -112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 32, 111, 114, 32, 97, 32, 98, 117, 105, 108, 100, 34, 41, 58, 102, 111, 114, 109, 97, 116, 40, 115, -116, 114, 41, 41, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, - 44, 32, 98, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, -111, 110, 32, 112, 97, 114, 115, 101, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 40, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, -104, 83, 105, 103, 110, 41, 10, 32, 32, 105, 102, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 32, 116, -104, 101, 110, 10, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 32, 61, 32, 112, 114, 101, 114, 101, -108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 58, 109, 97, 116, 99, 104, 40, 34, 94, 45, 40, 37, 119, 91, 37, 46, 37, 119, 45, - 93, 42, 41, 36, 34, 41, 10, 32, 32, 32, 32, 97, 115, 115, 101, 114, 116, 40, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 44, 32, 40, 34, - 84, 104, 101, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 32, 37, 113, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 115, 108, 97, 115, 104, - 32, 102, 111, 108, 108, 111, 119, 101, 100, 32, 98, 121, 32, 97, 108, 112, 104, 97, 110, 117, 109, 101, 114, 105, 99, 115, 44, 32, 100, 111, 116, 115, - 32, 97, 110, 100, 32, 115, 108, 97, 115, 104, 101, 115, 34, 41, 58, 102, 111, 114, 109, 97, 116, 40, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, - 87, 105, 116, 104, 83, 105, 103, 110, 41, 41, 10, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, - 10, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 114, 115, 101, 66, -117, 105, 108, 100, 40, 98, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 41, 10, 32, 32, 105, 102, 32, 98, 117, 105, 108, 100, 87, 105, -116, 104, 83, 105, 103, 110, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 32, 61, 32, 98, 117, -105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 58, 109, 97, 116, 99, 104, 40, 34, 94, 37, 43, 40, 37, 119, 91, 37, 46, 37, 119, 45, 93, - 42, 41, 36, 34, 41, 10, 32, 32, 32, 32, 97, 115, 115, 101, 114, 116, 40, 98, 117, 105, 108, 100, 44, 32, 40, 34, 84, 104, 101, 32, 98, 117, -105, 108, 100, 32, 37, 113, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 43, 32, 115, 105, 103, 110, 32, 102, 111, 108, 108, 111, 119, 101, 100, 32, - 98, 121, 32, 97, 108, 112, 104, 97, 110, 117, 109, 101, 114, 105, 99, 115, 44, 32, 100, 111, 116, 115, 32, 97, 110, 100, 32, 115, 108, 97, 115, 104, -101, 115, 34, 41, 58, 102, 111, 114, 109, 97, 116, 40, 98, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 41, 41, 10, 32, 32, 32, 32, -114, 101, 116, 117, 114, 110, 32, 98, 117, 105, 108, 100, 10, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 112, 97, 114, 115, 101, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 40, 115, 116, -114, 41, 10, 32, 32, 105, 102, 32, 110, 111, 116, 32, 112, 114, 101, 115, 101, 110, 116, 40, 115, 116, 114, 41, 32, 116, 104, 101, 110, 32, 114, 101, -116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 110, 105, 108, 32, 101, 110, 100, 10, 32, 32, 108, 111, 99, 97, 108, 32, 112, 114, 101, 114, 101, 108, -101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 44, 32, 98, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 32, 61, 32, 112, 97, -114, 115, 101, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 87, 105, 116, 104, 83, 105, 103, 110, 40, 115, 116, -114, 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 32, 61, 32, 112, 97, 114, 115, 101, 80, 114, 101, -114, 101, 108, 101, 97, 115, 101, 40, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 87, 105, 116, 104, 83, 105, 103, 110, 41, 10, 32, 32, 108, 111, - 99, 97, 108, 32, 98, 117, 105, 108, 100, 32, 61, 32, 112, 97, 114, 115, 101, 66, 117, 105, 108, 100, 40, 98, 117, 105, 108, 100, 87, 105, 116, 104, - 83, 105, 103, 110, 41, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 44, 32, 98, 117, 105, 108, 100, - 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 114, 115, 101, 86, 101, 114, 115, 105, 111, 110, - 40, 115, 116, 114, 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, 115, 77, 97, 106, 111, 114, 44, 32, 115, 77, 105, 110, 111, 114, 44, 32, 115, 80, - 97, 116, 99, 104, 44, 32, 115, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 32, 61, 32, 115, 116, 114, 58, -109, 97, 116, 99, 104, 40, 34, 94, 40, 37, 100, 43, 41, 37, 46, 63, 40, 37, 100, 42, 41, 37, 46, 63, 40, 37, 100, 42, 41, 40, 46, 45, - 41, 36, 34, 41, 10, 32, 32, 97, 115, 115, 101, 114, 116, 40, 116, 121, 112, 101, 40, 115, 77, 97, 106, 111, 114, 41, 32, 61, 61, 32, 39, 115, -116, 114, 105, 110, 103, 39, 44, 32, 40, 34, 67, 111, 117, 108, 100, 32, 110, 111, 116, 32, 101, 120, 116, 114, 97, 99, 116, 32, 118, 101, 114, 115, -105, 111, 110, 32, 110, 117, 109, 98, 101, 114, 40, 115, 41, 32, 102, 114, 111, 109, 32, 37, 113, 34, 41, 58, 102, 111, 114, 109, 97, 116, 40, 115, -116, 114, 41, 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, 109, 97, 106, 111, 114, 44, 32, 109, 105, 110, 111, 114, 44, 32, 112, 97, 116, 99, 104, - 32, 61, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 115, 77, 97, 106, 111, 114, 41, 44, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 115, 77, -105, 110, 111, 114, 41, 44, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 115, 80, 97, 116, 99, 104, 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, -112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 44, 32, 98, 117, 105, 108, 100, 32, 61, 32, 112, 97, 114, 115, 101, 80, 114, 101, 114, 101, 108, 101, - 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 40, 115, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 65, 110, 100, 66, 117, 105, 108, 100, 41, - 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 109, 97, 106, 111, 114, 44, 32, 109, 105, 110, 111, 114, 44, 32, 112, 97, 116, 99, 104, 44, 32, 112, -114, 101, 114, 101, 108, 101, 97, 115, 101, 44, 32, 98, 117, 105, 108, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, -105, 111, 110, 32, 99, 111, 109, 112, 97, 114, 101, 40, 97, 44, 98, 41, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 61, 61, 32, 98, - 32, 97, 110, 100, 32, 48, 32, 111, 114, 32, 97, 32, 60, 32, 98, 32, 97, 110, 100, 32, 45, 49, 32, 111, 114, 32, 49, 10, 101, 110, 100, 10, -108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 109, 112, 97, 114, 101, 73, 100, 115, 40, 109, 121, 73, 100, 44, 32, -111, 116, 104, 101, 114, 73, 100, 41, 10, 32, 32, 105, 102, 32, 109, 121, 73, 100, 32, 61, 61, 32, 111, 116, 104, 101, 114, 73, 100, 32, 116, 104, -101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 32, 48, 10, 32, 32, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 109, 121, 73, 100, 32, 32, - 32, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 45, 49, 10, 32, 32, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 111, 116, -104, 101, 114, 73, 100, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 32, 49, 10, 32, 32, 101, 110, 100, 10, 32, 32, 108, 111, 99, - 97, 108, 32, 115, 101, 108, 102, 78, 117, 109, 98, 101, 114, 44, 32, 111, 116, 104, 101, 114, 78, 117, 109, 98, 101, 114, 32, 61, 32, 116, 111, 110, -117, 109, 98, 101, 114, 40, 109, 121, 73, 100, 41, 44, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 111, 116, 104, 101, 114, 73, 100, 41, 10, 32, - 32, 105, 102, 32, 115, 101, 108, 102, 78, 117, 109, 98, 101, 114, 32, 97, 110, 100, 32, 111, 116, 104, 101, 114, 78, 117, 109, 98, 101, 114, 32, 116, -104, 101, 110, 32, 45, 45, 32, 110, 117, 109, 101, 114, 105, 99, 97, 108, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 10, 32, 32, 32, 32, -114, 101, 116, 117, 114, 110, 32, 99, 111, 109, 112, 97, 114, 101, 40, 115, 101, 108, 102, 78, 117, 109, 98, 101, 114, 44, 32, 111, 116, 104, 101, 114, - 78, 117, 109, 98, 101, 114, 41, 10, 32, 32, 45, 45, 32, 110, 117, 109, 101, 114, 105, 99, 97, 108, 115, 32, 97, 114, 101, 32, 97, 108, 119, 97, -121, 115, 32, 115, 109, 97, 108, 108, 101, 114, 32, 116, 104, 97, 110, 32, 97, 108, 112, 104, 97, 110, 117, 109, 115, 10, 32, 32, 101, 108, 115, 101, -105, 102, 32, 115, 101, 108, 102, 78, 117, 109, 98, 101, 114, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 45, 49, - 10, 32, 32, 101, 108, 115, 101, 105, 102, 32, 111, 116, 104, 101, 114, 78, 117, 109, 98, 101, 114, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 114, -101, 116, 117, 114, 110, 32, 49, 10, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 99, 111, 109, 112, 97, 114, -101, 40, 109, 121, 73, 100, 44, 32, 111, 116, 104, 101, 114, 73, 100, 41, 32, 45, 45, 32, 97, 108, 112, 104, 97, 110, 117, 109, 101, 114, 105, 99, - 97, 108, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 10, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, -110, 99, 116, 105, 111, 110, 32, 115, 109, 97, 108, 108, 101, 114, 73, 100, 76, 105, 115, 116, 40, 109, 121, 73, 100, 115, 44, 32, 111, 116, 104, 101, -114, 73, 100, 115, 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, 109, 121, 76, 101, 110, 103, 116, 104, 32, 61, 32, 35, 109, 121, 73, 100, 115, 10, - 32, 32, 108, 111, 99, 97, 108, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 10, 32, 32, 102, 111, 114, 32, 105, 61, 49, 44, 32, 109, 121, - 76, 101, 110, 103, 116, 104, 32, 100, 111, 10, 32, 32, 32, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 32, 61, 32, 99, 111, 109, 112, 97, -114, 101, 73, 100, 115, 40, 109, 121, 73, 100, 115, 91, 105, 93, 44, 32, 111, 116, 104, 101, 114, 73, 100, 115, 91, 105, 93, 41, 10, 32, 32, 32, - 32, 105, 102, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 32, 126, 61, 32, 48, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, -101, 116, 117, 114, 110, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 32, 61, 61, 32, 45, 49, 10, 32, 32, 32, 32, 101, 110, 100, 10, 32, - 32, 32, 32, 45, 45, 32, 105, 102, 32, 99, 111, 109, 112, 97, 114, 105, 115, 111, 110, 32, 61, 61, 32, 48, 44, 32, 99, 111, 110, 116, 105, 110, -117, 101, 32, 108, 111, 111, 112, 10, 32, 32, 101, 110, 100, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 109, 121, 76, 101, 110, 103, 116, 104, 32, - 60, 32, 35, 111, 116, 104, 101, 114, 73, 100, 115, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, -109, 97, 108, 108, 101, 114, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 40, 109, 105, 110, 101, 44, 32, 111, 116, 104, 101, 114, 41, 10, 32, 32, -105, 102, 32, 109, 105, 110, 101, 32, 61, 61, 32, 111, 116, 104, 101, 114, 32, 111, 114, 32, 110, 111, 116, 32, 109, 105, 110, 101, 32, 116, 104, 101, -110, 32, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 32, 32, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 111, 116, 104, 101, -114, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 32, 32, 101, 110, 100, 10, 32, 32, 114, 101, 116, 117, 114, -110, 32, 115, 109, 97, 108, 108, 101, 114, 73, 100, 76, 105, 115, 116, 40, 115, 112, 108, 105, 116, 66, 121, 68, 111, 116, 40, 109, 105, 110, 101, 41, - 44, 32, 115, 112, 108, 105, 116, 66, 121, 68, 111, 116, 40, 111, 116, 104, 101, 114, 41, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 109, -101, 116, 104, 111, 100, 115, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 101, 116, 104, 111, 100, 115, 58, 110, 101, 120, -116, 77, 97, 106, 111, 114, 40, 41, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 109, 118, 101, 114, 40, 115, 101, 108, 102, 46, 109, 97, -106, 111, 114, 32, 43, 32, 49, 44, 32, 48, 44, 32, 48, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 101, 116, 104, -111, 100, 115, 58, 110, 101, 120, 116, 77, 105, 110, 111, 114, 40, 41, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 109, 118, 101, 114, 40, -115, 101, 108, 102, 46, 109, 97, 106, 111, 114, 44, 32, 115, 101, 108, 102, 46, 109, 105, 110, 111, 114, 32, 43, 32, 49, 44, 32, 48, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 101, 116, 104, 111, 100, 115, 58, 110, 101, 120, 116, 80, 97, 116, 99, 104, 40, 41, 10, - 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 109, 118, 101, 114, 40, 115, 101, 108, 102, 46, 109, 97, 106, 111, 114, 44, 32, 115, 101, 108, 102, - 46, 109, 105, 110, 111, 114, 44, 32, 115, 101, 108, 102, 46, 112, 97, 116, 99, 104, 32, 43, 32, 49, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, -108, 32, 109, 116, 32, 61, 32, 123, 32, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 109, 101, 116, 104, 111, 100, 115, 32, 125, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 116, 58, 95, 95, 101, 113, 40, 111, 116, 104, 101, 114, 41, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, -108, 102, 46, 109, 97, 106, 111, 114, 32, 61, 61, 32, 111, 116, 104, 101, 114, 46, 109, 97, 106, 111, 114, 32, 97, 110, 100, 10, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 115, 101, 108, 102, 46, 109, 105, 110, 111, 114, 32, 61, 61, 32, 111, 116, 104, 101, 114, 46, 109, 105, 110, 111, 114, 32, 97, -110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 46, 112, 97, 116, 99, 104, 32, 61, 61, 32, 111, 116, 104, 101, 114, 46, -112, 97, 116, 99, 104, 32, 97, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 46, 112, 114, 101, 114, 101, 108, 101, 97, -115, 101, 32, 61, 61, 32, 111, 116, 104, 101, 114, 46, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 45, 45, 32, 110, 111, 116, 105, 99, 101, 32, 116, 104, 97, 116, 32, 98, 117, 105, 108, 100, 32, 105, 115, 32, 105, 103, 110, 111, 114, 101, 100, 32, -102, 111, 114, 32, 112, 114, 101, 99, 101, 100, 101, 110, 99, 101, 32, 105, 110, 32, 115, 101, 109, 118, 101, 114, 32, 50, 46, 48, 46, 48, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 116, 58, 95, 95, 108, 116, 40, 111, 116, 104, 101, 114, 41, 10, 32, 32, 105, 102, 32, -115, 101, 108, 102, 46, 109, 97, 106, 111, 114, 32, 126, 61, 32, 111, 116, 104, 101, 114, 46, 109, 97, 106, 111, 114, 32, 116, 104, 101, 110, 32, 114, -101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 46, 109, 97, 106, 111, 114, 32, 60, 32, 111, 116, 104, 101, 114, 46, 109, 97, 106, 111, 114, 32, 101, -110, 100, 10, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 109, 105, 110, 111, 114, 32, 126, 61, 32, 111, 116, 104, 101, 114, 46, 109, 105, 110, 111, -114, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 46, 109, 105, 110, 111, 114, 32, 60, 32, 111, 116, 104, 101, 114, - 46, 109, 105, 110, 111, 114, 32, 101, 110, 100, 10, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 112, 97, 116, 99, 104, 32, 126, 61, 32, 111, 116, -104, 101, 114, 46, 112, 97, 116, 99, 104, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 46, 112, 97, 116, 99, 104, - 32, 60, 32, 111, 116, 104, 101, 114, 46, 112, 97, 116, 99, 104, 32, 101, 110, 100, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 109, 97, 108, -108, 101, 114, 80, 114, 101, 114, 101, 108, 101, 97, 115, 101, 40, 115, 101, 108, 102, 46, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 44, 32, 111, -116, 104, 101, 114, 46, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 41, 10, 32, 32, 45, 45, 32, 110, 111, 116, 105, 99, 101, 32, 116, 104, 97, -116, 32, 98, 117, 105, 108, 100, 32, 105, 115, 32, 105, 103, 110, 111, 114, 101, 100, 32, 102, 111, 114, 32, 112, 114, 101, 99, 101, 100, 101, 110, 99, -101, 32, 105, 110, 32, 115, 101, 109, 118, 101, 114, 32, 50, 46, 48, 46, 48, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, -116, 58, 95, 95, 112, 111, 119, 40, 111, 116, 104, 101, 114, 41, 10, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 109, 97, 106, 111, 114, 32, 61, - 61, 32, 48, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 32, 61, 61, 32, 111, 116, 104, 101, -114, 10, 32, 32, 101, 110, 100, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 46, 109, 97, 106, 111, 114, 32, 61, 61, 32, 111, -116, 104, 101, 114, 46, 109, 97, 106, 111, 114, 32, 97, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 46, 109, 105, 110, -111, 114, 32, 60, 61, 32, 111, 116, 104, 101, 114, 46, 109, 105, 110, 111, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, -116, 58, 95, 95, 116, 111, 115, 116, 114, 105, 110, 103, 40, 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, 98, 117, 102, 102, 101, 114, 32, 61, 32, -123, 32, 40, 34, 37, 100, 46, 37, 100, 46, 37, 100, 34, 41, 58, 102, 111, 114, 109, 97, 116, 40, 115, 101, 108, 102, 46, 109, 97, 106, 111, 114, - 44, 32, 115, 101, 108, 102, 46, 109, 105, 110, 111, 114, 44, 32, 115, 101, 108, 102, 46, 112, 97, 116, 99, 104, 41, 32, 125, 10, 32, 32, 105, 102, - 32, 115, 101, 108, 102, 46, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 32, 116, 104, 101, 110, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, -114, 116, 40, 98, 117, 102, 102, 101, 114, 44, 32, 34, 45, 34, 32, 46, 46, 32, 115, 101, 108, 102, 46, 112, 114, 101, 114, 101, 108, 101, 97, 115, -101, 41, 32, 101, 110, 100, 10, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 98, 117, 105, 108, 100, 32, 32, 32, 32, 32, 32, 116, 104, 101, 110, - 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 98, 117, 102, 102, 101, 114, 44, 32, 34, 43, 34, 32, 46, 46, 32, 115, 101, 108, -102, 46, 98, 117, 105, 108, 100, 41, 32, 101, 110, 100, 10, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, - 97, 116, 40, 98, 117, 102, 102, 101, 114, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 101, -119, 40, 109, 97, 106, 111, 114, 44, 32, 109, 105, 110, 111, 114, 44, 32, 112, 97, 116, 99, 104, 44, 32, 112, 114, 101, 114, 101, 108, 101, 97, 115, -101, 44, 32, 98, 117, 105, 108, 100, 41, 10, 32, 32, 97, 115, 115, 101, 114, 116, 40, 109, 97, 106, 111, 114, 44, 32, 34, 65, 116, 32, 108, 101, - 97, 115, 116, 32, 111, 110, 101, 32, 112, 97, 114, 97, 109, 101, 116, 101, 114, 32, 105, 115, 32, 110, 101, 101, 100, 101, 100, 34, 41, 10, 32, 32, -105, 102, 32, 116, 121, 112, 101, 40, 109, 97, 106, 111, 114, 41, 32, 61, 61, 32, 39, 115, 116, 114, 105, 110, 103, 39, 32, 116, 104, 101, 110, 10, - 32, 32, 32, 32, 109, 97, 106, 111, 114, 44, 109, 105, 110, 111, 114, 44, 112, 97, 116, 99, 104, 44, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, - 44, 98, 117, 105, 108, 100, 32, 61, 32, 112, 97, 114, 115, 101, 86, 101, 114, 115, 105, 111, 110, 40, 109, 97, 106, 111, 114, 41, 10, 32, 32, 101, -110, 100, 10, 32, 32, 112, 97, 116, 99, 104, 32, 61, 32, 112, 97, 116, 99, 104, 32, 111, 114, 32, 48, 10, 32, 32, 109, 105, 110, 111, 114, 32, - 61, 32, 109, 105, 110, 111, 114, 32, 111, 114, 32, 48, 10, 32, 32, 99, 104, 101, 99, 107, 80, 111, 115, 105, 116, 105, 118, 101, 73, 110, 116, 101, -103, 101, 114, 40, 109, 97, 106, 111, 114, 44, 32, 34, 109, 97, 106, 111, 114, 34, 41, 10, 32, 32, 99, 104, 101, 99, 107, 80, 111, 115, 105, 116, -105, 118, 101, 73, 110, 116, 101, 103, 101, 114, 40, 109, 105, 110, 111, 114, 44, 32, 34, 109, 105, 110, 111, 114, 34, 41, 10, 32, 32, 99, 104, 101, - 99, 107, 80, 111, 115, 105, 116, 105, 118, 101, 73, 110, 116, 101, 103, 101, 114, 40, 112, 97, 116, 99, 104, 44, 32, 34, 112, 97, 116, 99, 104, 34, - 41, 10, 32, 32, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 109, 97, 106, 111, 114, 61, 109, 97, 106, 111, 114, 44, - 32, 109, 105, 110, 111, 114, 61, 109, 105, 110, 111, 114, 44, 32, 112, 97, 116, 99, 104, 61, 112, 97, 116, 99, 104, 44, 32, 112, 114, 101, 114, 101, -108, 101, 97, 115, 101, 61, 112, 114, 101, 114, 101, 108, 101, 97, 115, 101, 44, 32, 98, 117, 105, 108, 100, 61, 98, 117, 105, 108, 100, 125, 10, 32, - 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 114, 101, 115, 117, 108, 116, 44, 32, 109, 116, 41, - 10, 101, 110, 100, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 115, 101, 109, 118, 101, 114, 44, 32, 123, 32, 95, 95, 99, 97, -108, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 95, 44, 32, 46, 46, 46, 41, 32, 114, 101, 116, 117, 114, 110, 32, 110, 101, 119, - 40, 46, 46, 46, 41, 32, 101, 110, 100, 32, 125, 41, 10, 115, 101, 109, 118, 101, 114, 46, 95, 86, 69, 82, 83, 73, 79, 78, 61, 32, 115, 101, -109, 118, 101, 114, 40, 115, 101, 109, 118, 101, 114, 46, 95, 86, 69, 82, 83, 73, 79, 78, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 109, -118, 101, 114, 10, }; - -// src/base/http.lua -static const unsigned char builtin_script_11[] = { -105, 102, 32, 104, 116, 116, 112, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 104, 116, 116, 112, 46, 114, 101, 112, 111, 114, 116, 80, 114, 111, 103, 114, 101, 115, 115, 40, 116, 111, 116, 97, -108, 44, 32, 99, 117, 114, 114, 101, 110, 116, 41, 10, 108, 111, 99, 97, 108, 32, 119, 105, 100, 116, 104, 32, 61, 32, 55, 48, 10, 108, 111, 99, - 97, 108, 32, 112, 114, 111, 103, 114, 101, 115, 115, 32, 61, 32, 109, 97, 116, 104, 46, 102, 108, 111, 111, 114, 40, 99, 117, 114, 114, 101, 110, 116, - 32, 42, 32, 119, 105, 100, 116, 104, 32, 47, 32, 116, 111, 116, 97, 108, 41, 10, 105, 102, 32, 112, 114, 111, 103, 114, 101, 115, 115, 32, 61, 61, - 32, 119, 105, 100, 116, 104, 32, 116, 104, 101, 110, 10, 105, 111, 46, 119, 114, 105, 116, 101, 40, 115, 116, 114, 105, 110, 103, 46, 114, 101, 112, 40, - 39, 32, 39, 44, 32, 119, 105, 100, 116, 104, 32, 43, 32, 50, 41, 32, 46, 46, 32, 39, 92, 114, 39, 41, 10, 101, 108, 115, 101, 10, 105, 111, - 46, 119, 114, 105, 116, 101, 40, 39, 91, 39, 32, 46, 46, 32, 115, 116, 114, 105, 110, 103, 46, 114, 101, 112, 40, 39, 61, 39, 44, 32, 112, 114, -111, 103, 114, 101, 115, 115, 41, 32, 46, 46, 32, 115, 116, 114, 105, 110, 103, 46, 114, 101, 112, 40, 39, 32, 39, 44, 32, 119, 105, 100, 116, 104, - 32, 45, 32, 112, 114, 111, 103, 114, 101, 115, 115, 41, 32, 46, 46, 32, 39, 93, 92, 114, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 104, 116, 116, 112, 46, 101, 115, 99, 97, 112, 101, 85, 114, 108, 80, 97, 114, 97, 109, 40, 112, 97, 114, 97, -109, 41, 10, 108, 111, 99, 97, 108, 32, 117, 114, 108, 95, 101, 110, 99, 111, 100, 105, 110, 103, 115, 32, 61, 32, 123, 10, 91, 39, 32, 39, 93, - 32, 61, 32, 39, 37, 37, 50, 48, 39, 44, 10, 91, 39, 33, 39, 93, 32, 61, 32, 39, 37, 37, 50, 49, 39, 44, 10, 91, 39, 34, 39, 93, - 32, 61, 32, 39, 37, 37, 50, 50, 39, 44, 10, 91, 39, 35, 39, 93, 32, 61, 32, 39, 37, 37, 50, 51, 39, 44, 10, 91, 39, 36, 39, 93, - 32, 61, 32, 39, 37, 37, 50, 52, 39, 44, 10, 91, 39, 38, 39, 93, 32, 61, 32, 39, 37, 37, 50, 54, 39, 44, 10, 91, 39, 92, 39, 39, - 93, 32, 61, 32, 39, 37, 37, 50, 55, 39, 44, 10, 91, 39, 40, 39, 93, 32, 61, 32, 39, 37, 37, 50, 56, 39, 44, 10, 91, 39, 41, 39, - 93, 32, 61, 32, 39, 37, 37, 50, 57, 39, 44, 10, 91, 39, 42, 39, 93, 32, 61, 32, 39, 37, 37, 50, 65, 39, 44, 10, 91, 39, 43, 39, - 93, 32, 61, 32, 39, 37, 37, 50, 66, 39, 44, 10, 91, 39, 45, 39, 93, 32, 61, 32, 39, 37, 37, 50, 68, 39, 44, 10, 91, 39, 46, 39, - 93, 32, 61, 32, 39, 37, 37, 50, 69, 39, 44, 10, 91, 39, 47, 39, 93, 32, 61, 32, 39, 37, 37, 50, 70, 39, 44, 10, 91, 39, 58, 39, - 93, 32, 61, 32, 39, 37, 37, 51, 65, 39, 44, 10, 91, 39, 59, 39, 93, 32, 61, 32, 39, 37, 37, 51, 66, 39, 44, 10, 91, 39, 60, 39, - 93, 32, 61, 32, 39, 37, 37, 51, 67, 39, 44, 10, 91, 39, 61, 39, 93, 32, 61, 32, 39, 37, 37, 51, 68, 39, 44, 10, 91, 39, 62, 39, - 93, 32, 61, 32, 39, 37, 37, 51, 69, 39, 44, 10, 91, 39, 63, 39, 93, 32, 61, 32, 39, 37, 37, 51, 70, 39, 44, 10, 91, 39, 64, 39, - 93, 32, 61, 32, 39, 37, 37, 52, 48, 39, 44, 10, 91, 39, 91, 39, 93, 32, 61, 32, 39, 37, 37, 53, 66, 39, 44, 10, 91, 39, 92, 92, - 39, 93, 32, 61, 32, 39, 37, 37, 53, 67, 39, 44, 10, 91, 39, 93, 39, 93, 32, 61, 32, 39, 37, 37, 53, 68, 39, 44, 10, 91, 39, 94, - 39, 93, 32, 61, 32, 39, 37, 37, 53, 69, 39, 44, 10, 91, 39, 95, 39, 93, 32, 61, 32, 39, 37, 37, 53, 70, 39, 44, 10, 91, 39, 96, - 39, 93, 32, 61, 32, 39, 37, 37, 54, 48, 39, 10, 125, 10, 112, 97, 114, 97, 109, 32, 61, 32, 112, 97, 114, 97, 109, 58, 103, 115, 117, 98, - 40, 39, 37, 37, 39, 44, 32, 39, 37, 37, 50, 53, 39, 41, 10, 102, 111, 114, 32, 107, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, -117, 114, 108, 95, 101, 110, 99, 111, 100, 105, 110, 103, 115, 41, 32, 100, 111, 10, 112, 97, 114, 97, 109, 32, 61, 32, 112, 97, 114, 97, 109, 58, -103, 115, 117, 98, 40, 39, 37, 39, 32, 46, 46, 32, 107, 44, 32, 118, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 114, - 97, 109, 10, 101, 110, 100, }; - -// src/base/json.lua -static const unsigned char builtin_script_12[] = { -108, 111, 99, 97, 108, 32, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 39, 50, 48, 49, 54, 49, 49, 48, 57, 46, 50, 49, 39, 32, 45, 45, - 32, 118, 101, 114, 115, 105, 111, 110, 32, 104, 105, 115, 116, 111, 114, 121, 32, 97, 116, 32, 101, 110, 100, 32, 111, 102, 32, 102, 105, 108, 101, 10, -108, 111, 99, 97, 108, 32, 65, 85, 84, 72, 79, 82, 95, 78, 79, 84, 69, 32, 61, 32, 34, 45, 91, 32, 74, 83, 79, 78, 46, 108, 117, 97, - 32, 112, 97, 99, 107, 97, 103, 101, 32, 98, 121, 32, 74, 101, 102, 102, 114, 101, 121, 32, 70, 114, 105, 101, 100, 108, 32, 40, 104, 116, 116, 112, - 58, 47, 47, 114, 101, 103, 101, 120, 46, 105, 110, 102, 111, 47, 98, 108, 111, 103, 47, 108, 117, 97, 47, 106, 115, 111, 110, 41, 32, 118, 101, 114, -115, 105, 111, 110, 32, 50, 48, 49, 54, 49, 49, 48, 57, 46, 50, 49, 32, 93, 45, 34, 10, 108, 111, 99, 97, 108, 32, 79, 66, 74, 68, 69, - 70, 32, 61, 32, 123, 10, 32, 32, 32, 86, 69, 82, 83, 73, 79, 78, 32, 32, 32, 32, 32, 32, 61, 32, 86, 69, 82, 83, 73, 79, 78, 44, - 10, 32, 32, 32, 65, 85, 84, 72, 79, 82, 95, 78, 79, 84, 69, 32, 32, 61, 32, 65, 85, 84, 72, 79, 82, 95, 78, 79, 84, 69, 44, 10, -125, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 95, 112, 114, 101, 116, 116, 121, 95, 105, 110, 100, 101, 110, 116, 32, 32, 61, - 32, 34, 32, 32, 34, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 95, 112, 114, 101, 116, 116, 121, 95, 111, 112, 116, 105, 111, -110, 115, 32, 61, 32, 123, 32, 112, 114, 101, 116, 116, 121, 32, 61, 32, 116, 114, 117, 101, 44, 32, 97, 108, 105, 103, 110, 95, 107, 101, 121, 115, - 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 105, 110, 100, 101, 110, 116, 32, 61, 32, 100, 101, 102, 97, 117, 108, 116, 95, 112, 114, 101, 116, 116, -121, 95, 105, 110, 100, 101, 110, 116, 32, 32, 125, 10, 108, 111, 99, 97, 108, 32, 105, 115, 65, 114, 114, 97, 121, 32, 32, 61, 32, 123, 32, 95, - 95, 116, 111, 115, 116, 114, 105, 110, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 114, 101, 116, 117, 114, 110, 32, 34, 74, - 83, 79, 78, 32, 97, 114, 114, 97, 121, 34, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 32, 125, 32, 32, 105, 115, 65, 114, 114, 97, -121, 46, 95, 95, 105, 110, 100, 101, 120, 32, 32, 61, 32, 105, 115, 65, 114, 114, 97, 121, 10, 108, 111, 99, 97, 108, 32, 105, 115, 79, 98, 106, -101, 99, 116, 32, 61, 32, 123, 32, 95, 95, 116, 111, 115, 116, 114, 105, 110, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, -114, 101, 116, 117, 114, 110, 32, 34, 74, 83, 79, 78, 32, 111, 98, 106, 101, 99, 116, 34, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 32, -125, 32, 32, 105, 115, 79, 98, 106, 101, 99, 116, 46, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 105, 115, 79, 98, 106, 101, 99, 116, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 110, 101, 119, 65, 114, 114, 97, 121, 40, 116, 98, 108, 41, 10, 32, 32, 32, -114, 101, 116, 117, 114, 110, 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 116, 98, 108, 32, 111, 114, 32, 123, 125, 44, 32, 105, -115, 65, 114, 114, 97, 121, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 110, 101, 119, 79, - 98, 106, 101, 99, 116, 40, 116, 98, 108, 41, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, -101, 40, 116, 98, 108, 32, 111, 114, 32, 123, 125, 44, 32, 105, 115, 79, 98, 106, 101, 99, 116, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 41, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, -121, 112, 101, 40, 111, 112, 41, 32, 61, 61, 32, 39, 110, 117, 109, 98, 101, 114, 39, 32, 97, 110, 100, 32, 111, 112, 32, 111, 114, 32, 111, 112, - 46, 78, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 105, 115, 78, 117, 109, 98, 101, 114, 32, 61, 32, 123, 10, 32, 32, 32, 95, 95, 116, -111, 115, 116, 114, 105, 110, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 84, 41, 32, 32, 114, 101, 116, 117, 114, 110, 32, 84, 46, - 83, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 117, 110, 109, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 111, 112, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 41, 32, 101, 110, 100, - 44, 10, 32, 32, 32, 95, 95, 99, 111, 110, 99, 97, 116, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, -111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 111, 112, 49, 41, 32, 46, 46, 32, 116, 111, 115, -116, 114, 105, 110, 103, 40, 111, 112, 50, 41, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 97, 100, 100, 32, 32, 32, 32, 32, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, - 40, 111, 112, 49, 41, 32, 32, 32, 43, 32, 32, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, 32, 32, - 32, 95, 95, 115, 117, 98, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, - 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 49, 41, 32, 32, 32, 45, 32, 32, 32, 103, 101, 116, 110, 117, 109, - 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 109, 117, 108, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 49, - 41, 32, 32, 32, 42, 32, 32, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 100, -105, 118, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, -117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 49, 41, 32, 32, 32, 47, 32, 32, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 50, - 41, 32, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 109, 111, 100, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 49, 41, 32, 32, 32, - 37, 32, 32, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 112, 111, 119, 32, 32, - 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, -103, 101, 116, 110, 117, 109, 40, 111, 112, 49, 41, 32, 32, 32, 94, 32, 32, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 50, 41, 32, 32, 101, -110, 100, 44, 10, 32, 32, 32, 95, 95, 108, 116, 32, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, - 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 49, 41, 32, 32, 32, 60, 32, 32, 32, -103, 101, 116, 110, 117, 109, 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, 32, 32, 32, 95, 95, 101, 113, 32, 32, 32, 32, 32, 32, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, -117, 109, 40, 111, 112, 49, 41, 32, 32, 32, 61, 61, 32, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, - 32, 32, 32, 95, 95, 108, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 112, 49, 44, 32, 111, 112, - 50, 41, 32, 114, 101, 116, 117, 114, 110, 32, 103, 101, 116, 110, 117, 109, 40, 111, 112, 49, 41, 32, 32, 32, 60, 61, 32, 32, 103, 101, 116, 110, -117, 109, 40, 111, 112, 50, 41, 32, 32, 101, 110, 100, 44, 10, 125, 10, 105, 115, 78, 117, 109, 98, 101, 114, 46, 95, 95, 105, 110, 100, 101, 120, - 32, 61, 32, 105, 115, 78, 117, 109, 98, 101, 114, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 97, 115, 78, 117, -109, 98, 101, 114, 40, 105, 116, 101, 109, 41, 10, 32, 32, 32, 105, 102, 32, 103, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 105, 116, -101, 109, 41, 32, 61, 61, 32, 105, 115, 78, 117, 109, 98, 101, 114, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 105, 116, - 39, 115, 32, 97, 108, 114, 101, 97, 100, 121, 32, 97, 32, 74, 83, 79, 78, 32, 110, 117, 109, 98, 101, 114, 32, 111, 98, 106, 101, 99, 116, 46, - 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 105, 116, 101, 109, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, -101, 40, 105, 116, 101, 109, 41, 32, 61, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 105, 116, 101, 109, - 46, 83, 41, 32, 61, 61, 32, 39, 115, 116, 114, 105, 110, 103, 39, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 105, 116, 101, 109, 46, 78, 41, - 32, 61, 61, 32, 39, 110, 117, 109, 98, 101, 114, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 105, 116, 39, 115, 32, - 97, 32, 110, 117, 109, 98, 101, 114, 45, 111, 98, 106, 101, 99, 116, 32, 116, 97, 98, 108, 101, 32, 116, 104, 97, 116, 32, 108, 111, 115, 116, 32, -105, 116, 115, 32, 109, 101, 116, 97, 116, 97, 98, 108, 101, 44, 32, 115, 111, 32, 103, 105, 118, 101, 32, 105, 116, 32, 111, 110, 101, 10, 32, 32, - 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 105, 116, 101, 109, 44, 32, 105, 115, - 78, 117, 109, 98, 101, 114, 41, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 116, 104, 101, 32, 110, 111, 114, -109, 97, 108, 32, 115, 105, 116, 117, 97, 116, 105, 111, 110, 46, 46, 46, 32, 103, 105, 118, 101, 110, 32, 97, 32, 110, 117, 109, 98, 101, 114, 32, -111, 114, 32, 97, 32, 115, 116, 114, 105, 110, 103, 32, 114, 101, 112, 114, 101, 115, 101, 110, 116, 97, 116, 105, 111, 110, 32, 111, 102, 32, 97, 32, -110, 117, 109, 98, 101, 114, 46, 46, 46, 46, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 104, 111, 108, 100, 101, 114, 32, 61, 32, -123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 83, 32, 61, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 105, 116, 101, 109, 41, 44, 32, 45, - 45, 32, 83, 32, 105, 115, 32, 116, 104, 101, 32, 114, 101, 112, 114, 101, 115, 101, 110, 116, 97, 116, 105, 111, 110, 32, 111, 102, 32, 116, 104, 101, - 32, 110, 117, 109, 98, 101, 114, 32, 97, 115, 32, 97, 32, 115, 116, 114, 105, 110, 103, 44, 32, 119, 104, 105, 99, 104, 32, 114, 101, 109, 97, 105, -110, 115, 32, 112, 114, 101, 99, 105, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 78, 32, 61, 32, 116, 111, 110, 117, 109, 98, 101, 114, - 40, 105, 116, 101, 109, 41, 44, 32, 45, 45, 32, 78, 32, 105, 115, 32, 116, 104, 101, 32, 110, 117, 109, 98, 101, 114, 32, 97, 115, 32, 97, 32, - 76, 117, 97, 32, 110, 117, 109, 98, 101, 114, 46, 10, 32, 32, 32, 32, 32, 32, 125, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, - 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 104, 111, 108, 100, 101, 114, 44, 32, 105, 115, 78, 117, 109, 98, 101, 114, 41, 10, - 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 102, 111, 114, 99, 101, - 83, 116, 114, 105, 110, 103, 40, 105, 116, 101, 109, 41, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 105, 116, 101, 109, 41, 32, 61, 61, - 32, 39, 116, 97, 98, 108, 101, 39, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 105, 116, 101, 109, 46, 83, 41, 32, 61, 61, 32, 39, 115, 116, -114, 105, 110, 103, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 105, 116, 101, 109, 46, 83, 10, 32, - 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 105, 116, 101, -109, 41, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 102, 111, -114, 99, 101, 78, 117, 109, 98, 101, 114, 40, 105, 116, 101, 109, 41, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 105, 116, 101, 109, 41, - 32, 61, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 105, 116, 101, 109, 46, 78, 41, 32, 61, 61, 32, - 39, 110, 117, 109, 98, 101, 114, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 105, 116, 101, 109, 46, - 78, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, -105, 116, 101, 109, 41, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 32, 32, 32, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, -105, 111, 110, 32, 117, 110, 105, 99, 111, 100, 101, 95, 99, 111, 100, 101, 112, 111, 105, 110, 116, 95, 97, 115, 95, 117, 116, 102, 56, 40, 99, 111, -100, 101, 112, 111, 105, 110, 116, 41, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 105, -115, 32, 97, 32, 110, 117, 109, 98, 101, 114, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, - 32, 60, 61, 32, 49, 50, 55, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, - 46, 99, 104, 97, 114, 40, 99, 111, 100, 101, 112, 111, 105, 110, 116, 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 99, 111, 100, 101, 112, -111, 105, 110, 116, 32, 60, 61, 32, 50, 48, 52, 55, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, - 32, 45, 45, 32, 49, 49, 48, 121, 121, 121, 120, 120, 32, 49, 48, 120, 120, 120, 120, 120, 120, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 45, - 45, 32, 117, 115, 101, 102, 117, 108, 32, 110, 111, 116, 97, 116, 105, 111, 110, 32, 102, 114, 111, 109, 32, 104, 116, 116, 112, 58, 47, 47, 101, 110, - 46, 119, 105, 107, 105, 112, 101, 100, 105, 97, 46, 111, 114, 103, 47, 119, 105, 107, 105, 47, 85, 116, 102, 56, 10, 32, 32, 32, 32, 32, 32, 45, - 45, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 61, 32, 109, 97, 116, 104, 46, 102, 108, -111, 111, 114, 40, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 47, 32, 48, 120, 52, 48, 41, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, -108, 32, 108, 111, 119, 112, 97, 114, 116, 32, 32, 61, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 45, 32, 40, 48, 120, 52, 48, 32, 42, - 32, 104, 105, 103, 104, 112, 97, 114, 116, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 99, -104, 97, 114, 40, 48, 120, 67, 48, 32, 43, 32, 104, 105, 103, 104, 112, 97, 114, 116, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 48, 120, 56, 48, 32, 43, 32, 108, 111, 119, 112, 97, 114, 116, 41, 10, 32, 32, - 32, 101, 108, 115, 101, 105, 102, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 60, 61, 32, 54, 53, 53, 51, 53, 32, 116, 104, 101, 110, 10, - 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 49, 49, 49, 48, 121, 121, 121, 121, 32, 49, 48, 121, 121, 121, -121, 120, 120, 32, 49, 48, 120, 120, 120, 120, 120, 120, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, -108, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 32, 61, 32, 109, 97, 116, 104, 46, 102, 108, 111, 111, 114, 40, 99, 111, 100, 101, 112, 111, 105, -110, 116, 32, 47, 32, 48, 120, 49, 48, 48, 48, 41, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 114, 101, 109, 97, 105, 110, 100, -101, 114, 32, 61, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 45, 32, 48, 120, 49, 48, 48, 48, 32, 42, 32, 104, 105, 103, 104, 112, 97, -114, 116, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 109, 105, 100, 112, 97, 114, 116, 32, 32, 32, 61, 32, 109, 97, 116, 104, 46, -102, 108, 111, 111, 114, 40, 114, 101, 109, 97, 105, 110, 100, 101, 114, 32, 47, 32, 48, 120, 52, 48, 41, 10, 32, 32, 32, 32, 32, 32, 108, 111, - 99, 97, 108, 32, 108, 111, 119, 112, 97, 114, 116, 32, 32, 32, 61, 32, 114, 101, 109, 97, 105, 110, 100, 101, 114, 32, 45, 32, 48, 120, 52, 48, - 32, 42, 32, 109, 105, 100, 112, 97, 114, 116, 10, 32, 32, 32, 32, 32, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 61, 32, 48, 120, 69, 48, - 32, 43, 32, 104, 105, 103, 104, 112, 97, 114, 116, 10, 32, 32, 32, 32, 32, 32, 109, 105, 100, 112, 97, 114, 116, 32, 32, 61, 32, 48, 120, 56, - 48, 32, 43, 32, 109, 105, 100, 112, 97, 114, 116, 10, 32, 32, 32, 32, 32, 32, 108, 111, 119, 112, 97, 114, 116, 32, 32, 61, 32, 48, 120, 56, - 48, 32, 43, 32, 108, 111, 119, 112, 97, 114, 116, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 67, 104, -101, 99, 107, 32, 102, 111, 114, 32, 97, 110, 32, 105, 110, 118, 97, 108, 105, 100, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, 32, 40, 116, 104, - 97, 110, 107, 115, 32, 65, 110, 100, 121, 32, 82, 46, 32, 97, 116, 32, 65, 100, 111, 98, 101, 41, 46, 10, 32, 32, 32, 32, 32, 32, 45, 45, - 32, 83, 101, 101, 32, 116, 97, 98, 108, 101, 32, 51, 46, 55, 44, 32, 112, 97, 103, 101, 32, 57, 51, 44, 32, 105, 110, 32, 104, 116, 116, 112, - 58, 47, 47, 119, 119, 119, 46, 117, 110, 105, 99, 111, 100, 101, 46, 111, 114, 103, 47, 118, 101, 114, 115, 105, 111, 110, 115, 47, 85, 110, 105, 99, -111, 100, 101, 53, 46, 50, 46, 48, 47, 99, 104, 48, 51, 46, 112, 100, 102, 35, 71, 50, 56, 48, 55, 48, 10, 32, 32, 32, 32, 32, 32, 45, - 45, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 40, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 61, 61, 32, 48, 120, 69, 48, 32, 97, 110, -100, 32, 109, 105, 100, 112, 97, 114, 116, 32, 60, 32, 48, 120, 65, 48, 32, 41, 32, 111, 114, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, - 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 61, 61, 32, 48, 120, 69, 68, 32, 97, 110, 100, 32, 109, 105, 100, 112, 97, 114, 116, 32, 62, 32, - 48, 120, 57, 70, 32, 41, 32, 111, 114, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 61, 61, - 32, 48, 120, 70, 48, 32, 97, 110, 100, 32, 109, 105, 100, 112, 97, 114, 116, 32, 60, 32, 48, 120, 57, 48, 32, 41, 32, 111, 114, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 40, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 61, 61, 32, 48, 120, 70, 52, 32, 97, 110, 100, 32, 109, 105, -100, 112, 97, 114, 116, 32, 62, 32, 48, 120, 56, 70, 32, 41, 10, 32, 32, 32, 32, 32, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 63, 34, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 99, 104, 97, 114, 40, 104, 105, 103, 104, 112, 97, 114, 116, 44, 10, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 109, 105, 100, 112, 97, -114, 116, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, -108, 111, 119, 112, 97, 114, 116, 41, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, - 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 49, 49, 49, 49, 48, 122, 122, 122, 32, 49, 48, 122, 122, 121, 121, 121, 121, 32, 49, - 48, 121, 121, 121, 121, 120, 120, 32, 49, 48, 120, 120, 120, 120, 120, 120, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, -108, 111, 99, 97, 108, 32, 104, 105, 103, 104, 112, 97, 114, 116, 32, 32, 61, 32, 109, 97, 116, 104, 46, 102, 108, 111, 111, 114, 40, 99, 111, 100, -101, 112, 111, 105, 110, 116, 32, 47, 32, 48, 120, 52, 48, 48, 48, 48, 41, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 114, 101, -109, 97, 105, 110, 100, 101, 114, 32, 61, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 45, 32, 48, 120, 52, 48, 48, 48, 48, 32, 42, 32, -104, 105, 103, 104, 112, 97, 114, 116, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 109, 105, 100, 65, 32, 32, 32, 32, 32, 32, 61, - 32, 109, 97, 116, 104, 46, 102, 108, 111, 111, 114, 40, 114, 101, 109, 97, 105, 110, 100, 101, 114, 32, 47, 32, 48, 120, 49, 48, 48, 48, 41, 10, - 32, 32, 32, 32, 32, 32, 114, 101, 109, 97, 105, 110, 100, 101, 114, 32, 32, 32, 32, 32, 32, 32, 61, 32, 114, 101, 109, 97, 105, 110, 100, 101, -114, 32, 45, 32, 48, 120, 49, 48, 48, 48, 32, 42, 32, 109, 105, 100, 65, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 109, 105, -100, 66, 32, 32, 32, 32, 32, 32, 61, 32, 109, 97, 116, 104, 46, 102, 108, 111, 111, 114, 40, 114, 101, 109, 97, 105, 110, 100, 101, 114, 32, 47, - 32, 48, 120, 52, 48, 41, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 108, 111, 119, 112, 97, 114, 116, 32, 32, 32, 61, 32, 114, -101, 109, 97, 105, 110, 100, 101, 114, 32, 45, 32, 48, 120, 52, 48, 32, 42, 32, 109, 105, 100, 66, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, -117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 99, 104, 97, 114, 40, 48, 120, 70, 48, 32, 43, 32, 104, 105, 103, 104, 112, 97, 114, 116, 44, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 48, 120, 56, 48, 32, 43, - 32, 109, 105, 100, 65, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 48, 120, 56, 48, 32, 43, 32, 109, 105, 100, 66, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 48, 120, 56, 48, 32, 43, 32, 108, 111, 119, 112, 97, 114, 116, 41, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 109, -101, 115, 115, 97, 103, 101, 44, 32, 116, 101, 120, 116, 44, 32, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, -105, 102, 32, 116, 101, 120, 116, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 108, 111, 99, 97, 116, 105, 111, 110, 32, 116, -104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, -114, 109, 97, 116, 40, 34, 37, 115, 32, 97, 116, 32, 98, 121, 116, 101, 32, 37, 100, 32, 111, 102, 58, 32, 37, 115, 34, 44, 32, 109, 101, 115, -115, 97, 103, 101, 44, 32, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 116, 101, 120, 116, 41, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, -116, 40, 34, 37, 115, 58, 32, 37, 115, 34, 44, 32, 109, 101, 115, 115, 97, 103, 101, 44, 32, 116, 101, 120, 116, 41, 10, 32, 32, 32, 32, 32, - 32, 101, 110, 100, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 101, 116, 99, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, -110, 10, 32, 32, 32, 32, 32, 32, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 109, 101, 115, 115, 97, 103, 101, 32, 46, 46, 32, 34, 32, 40, - 34, 32, 46, 46, 32, 79, 66, 74, 68, 69, 70, 58, 101, 110, 99, 111, 100, 101, 40, 101, 116, 99, 41, 32, 46, 46, 32, 34, 41, 34, 10, 32, - 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 97, 115, 115, 101, 114, 116, 32, 116, 104, 101, 110, 10, 32, 32, 32, - 32, 32, 32, 115, 101, 108, 102, 46, 97, 115, 115, 101, 114, 116, 40, 102, 97, 108, 115, 101, 44, 32, 109, 101, 115, 115, 97, 103, 101, 41, 10, 32, - 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 97, 115, 115, 101, 114, 116, 40, 102, 97, 108, 115, 101, 44, 32, 109, 101, 115, 115, 97, -103, 101, 41, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 111, -110, 84, 114, 97, 105, 108, 105, 110, 103, 71, 97, 114, 98, 97, 103, 101, 40, 106, 115, 111, 110, 95, 116, 101, 120, 116, 44, 32, 108, 111, 99, 97, -116, 105, 111, 110, 44, 32, 112, 97, 114, 115, 101, 100, 95, 118, 97, 108, 117, 101, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 114, 101, 116, 117, -114, 110, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 116, 114, 97, 105, 108, 105, 110, 103, 32, -103, 97, 114, 98, 97, 103, 101, 34, 44, 32, 106, 115, 111, 110, 95, 116, 101, 120, 116, 44, 32, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 101, -116, 99, 41, 10, 101, 110, 100, 10, 79, 66, 74, 68, 69, 70, 46, 111, 110, 68, 101, 99, 111, 100, 101, 79, 102, 78, 105, 108, 69, 114, 114, 111, -114, 32, 32, 61, 32, 79, 66, 74, 68, 69, 70, 46, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 10, 79, 66, 74, 68, 69, 70, - 46, 111, 110, 68, 101, 99, 111, 100, 101, 79, 102, 72, 84, 77, 76, 69, 114, 114, 111, 114, 32, 61, 32, 79, 66, 74, 68, 69, 70, 46, 111, 110, - 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 111, 110, 69, 110, - 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 109, 101, 115, 115, 97, 103, 101, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 105, 102, 32, 101, 116, - 99, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 109, 101, -115, 115, 97, 103, 101, 32, 46, 46, 32, 34, 32, 40, 34, 32, 46, 46, 32, 79, 66, 74, 68, 69, 70, 58, 101, 110, 99, 111, 100, 101, 40, 101, -116, 99, 41, 32, 46, 46, 32, 34, 41, 34, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 97, 115, 115, -101, 114, 116, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 46, 97, 115, 115, 101, 114, 116, 40, 102, 97, 108, 115, 101, - 44, 32, 109, 101, 115, 115, 97, 103, 101, 41, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 97, 115, 115, 101, 114, 116, 40, -102, 97, 108, 115, 101, 44, 32, 109, 101, 115, 115, 97, 103, 101, 41, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 114, 111, 107, 95, 110, 117, 109, 98, 101, 114, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, - 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 71, 114, - 97, 98, 32, 116, 104, 101, 32, 105, 110, 116, 101, 103, 101, 114, 32, 112, 97, 114, 116, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 108, 111, 99, - 97, 108, 32, 105, 110, 116, 101, 103, 101, 114, 95, 112, 97, 114, 116, 32, 61, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 45, - 63, 91, 49, 45, 57, 93, 37, 100, 42, 39, 44, 32, 115, 116, 97, 114, 116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 111, 114, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 34, 94, 45, 63, 48, 34, 44, 32, 32, 32, - 32, 32, 32, 32, 32, 115, 116, 97, 114, 116, 41, 10, 32, 32, 32, 105, 102, 32, 110, 111, 116, 32, 105, 110, 116, 101, 103, 101, 114, 95, 112, 97, -114, 116, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, - 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 110, 117, 109, 98, 101, 114, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, - 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, -115, 116, 97, 114, 116, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, -100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, -103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 115, -116, 97, 114, 116, 32, 43, 32, 105, 110, 116, 101, 103, 101, 114, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, 10, 32, 32, 32, 45, 45, 10, - 32, 32, 32, 45, 45, 32, 71, 114, 97, 98, 32, 97, 110, 32, 111, 112, 116, 105, 111, 110, 97, 108, 32, 100, 101, 99, 105, 109, 97, 108, 32, 112, - 97, 114, 116, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 100, 101, 99, 105, 109, 97, 108, 95, 112, 97, 114, 116, 32, - 61, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 37, 46, 37, 100, 43, 39, 44, 32, 105, 41, 32, 111, 114, 32, 34, 34, 10, - 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 100, 101, 99, 105, 109, 97, 108, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, 10, 32, 32, - 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 71, 114, 97, 98, 32, 97, 110, 32, 111, 112, 116, 105, 111, 110, 97, 108, 32, 101, 120, 112, 111, 110, -101, 110, 116, 105, 97, 108, 32, 112, 97, 114, 116, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 120, 112, 111, 110, -101, 110, 116, 95, 112, 97, 114, 116, 32, 61, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 91, 101, 69, 93, 91, 45, 43, 93, - 63, 37, 100, 43, 39, 44, 32, 105, 41, 32, 111, 114, 32, 34, 34, 10, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 101, 120, 112, 111, 110, -101, 110, 116, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 102, 117, 108, 108, 95, 110, 117, 109, - 98, 101, 114, 95, 116, 101, 120, 116, 32, 61, 32, 105, 110, 116, 101, 103, 101, 114, 95, 112, 97, 114, 116, 32, 46, 46, 32, 100, 101, 99, 105, 109, - 97, 108, 95, 112, 97, 114, 116, 32, 46, 46, 32, 101, 120, 112, 111, 110, 101, 110, 116, 95, 112, 97, 114, 116, 10, 32, 32, 32, 105, 102, 32, 111, -112, 116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 78, 117, 109, 98, 101, 114, 115, 65, 115, 79, 98, 106, 101, 99, 116, 115, 32, 116, 104, -101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 79, 66, 74, 68, 69, 70, 58, 97, 115, 78, 117, 109, 98, 101, 114, 40, -102, 117, 108, 108, 95, 110, 117, 109, 98, 101, 114, 95, 116, 101, 120, 116, 41, 44, 32, 105, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, - 45, 10, 32, 32, 32, 45, 45, 32, 73, 102, 32, 119, 101, 39, 114, 101, 32, 116, 111, 108, 100, 32, 116, 111, 32, 115, 116, 114, 105, 110, 103, 105, -102, 121, 32, 117, 110, 100, 101, 114, 32, 99, 101, 114, 116, 97, 105, 110, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 115, 44, 32, 115, 111, 32, -100, 111, 46, 10, 32, 32, 32, 45, 45, 32, 87, 101, 32, 112, 117, 110, 116, 32, 97, 32, 98, 105, 116, 32, 119, 104, 101, 110, 32, 116, 104, 101, -114, 101, 39, 115, 32, 97, 110, 32, 101, 120, 112, 111, 110, 101, 110, 116, 32, 98, 121, 32, 106, 117, 115, 116, 32, 115, 116, 114, 105, 110, 103, 105, -102, 121, 105, 110, 103, 32, 110, 111, 32, 109, 97, 116, 116, 101, 114, 32, 119, 104, 97, 116, 46, 10, 32, 32, 32, 45, 45, 32, 73, 32, 115, 117, -112, 112, 111, 115, 101, 32, 119, 101, 32, 115, 104, 111, 117, 108, 100, 32, 114, 101, 97, 108, 108, 121, 32, 108, 111, 111, 107, 32, 116, 111, 32, 115, -101, 101, 32, 119, 104, 101, 116, 104, 101, 114, 32, 116, 104, 101, 32, 101, 120, 112, 111, 110, 101, 110, 116, 32, 105, 115, 32, 97, 99, 116, 117, 97, -108, 108, 121, 32, 98, 105, 103, 32, 101, 110, 111, 117, 103, 104, 32, 111, 110, 101, 10, 32, 32, 32, 45, 45, 32, 119, 97, 121, 32, 111, 114, 32, -116, 104, 101, 32, 111, 116, 104, 101, 114, 32, 116, 111, 32, 116, 114, 105, 112, 32, 115, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, 111, -110, 44, 32, 98, 117, 116, 32, 73, 39, 108, 108, 32, 98, 101, 32, 108, 97, 122, 121, 32, 97, 98, 111, 117, 116, 32, 105, 116, 32, 117, 110, 116, -105, 108, 32, 115, 111, 109, 101, 111, 110, 101, 32, 97, 115, 107, 115, 46, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 40, 111, 112, -116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 73, 110, 116, 101, 103, 101, 114, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, -111, 110, 76, 101, 110, 103, 116, 104, 10, 32, 32, 32, 32, 32, 32, 32, 97, 110, 100, 10, 32, 32, 32, 32, 32, 32, 40, 105, 110, 116, 101, 103, -101, 114, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, 32, 62, 61, 32, 111, 112, 116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 73, -110, 116, 101, 103, 101, 114, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, 111, 110, 76, 101, 110, 103, 116, 104, 32, 111, 114, 32, 101, -120, 112, 111, 110, 101, 110, 116, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, 32, 62, 32, 48, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, -111, 114, 10, 32, 32, 32, 32, 32, 32, 40, 111, 112, 116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 68, 101, 99, 105, 109, 97, 108, 83, -116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, 111, 110, 76, 101, 110, 103, 116, 104, 32, 10, 32, 32, 32, 32, 32, 32, 32, 97, 110, 100, - 10, 32, 32, 32, 32, 32, 32, 32, 40, 100, 101, 99, 105, 109, 97, 108, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, 32, 62, 61, 32, 111, -112, 116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 68, 101, 99, 105, 109, 97, 108, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, -105, 111, 110, 76, 101, 110, 103, 116, 104, 32, 111, 114, 32, 101, 120, 112, 111, 110, 101, 110, 116, 95, 112, 97, 114, 116, 58, 108, 101, 110, 40, 41, - 32, 62, 32, 48, 41, 41, 10, 32, 32, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 102, 117, 108, 108, - 95, 110, 117, 109, 98, 101, 114, 95, 116, 101, 120, 116, 44, 32, 105, 32, 45, 45, 32, 116, 104, 105, 115, 32, 114, 101, 116, 117, 114, 110, 115, 32, -116, 104, 101, 32, 101, 120, 97, 99, 116, 32, 115, 116, 114, 105, 110, 103, 32, 114, 101, 112, 114, 101, 115, 101, 110, 116, 97, 116, 105, 111, 110, 32, -115, 101, 101, 110, 32, 105, 110, 32, 116, 104, 101, 32, 111, 114, 105, 103, 105, 110, 97, 108, 32, 74, 83, 79, 78, 10, 32, 32, 32, 101, 110, 100, - 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 97, 115, 95, 110, 117, 109, 98, 101, 114, 32, 61, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 102, -117, 108, 108, 95, 110, 117, 109, 98, 101, 114, 95, 116, 101, 120, 116, 41, 10, 32, 32, 32, 105, 102, 32, 110, 111, 116, 32, 97, 115, 95, 110, 117, -109, 98, 101, 114, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, -111, 114, 40, 34, 98, 97, 100, 32, 110, 117, 109, 98, 101, 114, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, -116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, -114, 116, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, -111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, -101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 97, 115, 95, 110, 117, 109, 98, -101, 114, 44, 32, 105, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 114, 111, 107, 95, 115, 116, -114, 105, 110, 103, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, - 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 115, 116, 97, 114, 116, 44, 115, 116, 97, 114, 116, 41, 32, 126, 61, 32, - 39, 34, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, -114, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 115, 116, 114, 105, 110, 103, 39, 115, 32, 111, 112, 101, 110, 105, 110, 103, 32, 113, 117, 111, -116, 101, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, - 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, -101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, - 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, -110, 100, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 115, 116, 97, 114, 116, 32, 43, 32, 49, 32, 45, 45, 32, 43, 49, 32, -116, 111, 32, 98, 121, 112, 97, 115, 115, 32, 116, 104, 101, 32, 105, 110, 105, 116, 105, 97, 108, 32, 113, 117, 111, 116, 101, 10, 32, 32, 32, 108, -111, 99, 97, 108, 32, 116, 101, 120, 116, 95, 108, 101, 110, 32, 61, 32, 116, 101, 120, 116, 58, 108, 101, 110, 40, 41, 10, 32, 32, 32, 108, 111, - 99, 97, 108, 32, 86, 65, 76, 85, 69, 32, 61, 32, 34, 34, 10, 32, 32, 32, 119, 104, 105, 108, 101, 32, 105, 32, 60, 61, 32, 116, 101, 120, -116, 95, 108, 101, 110, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 99, 32, 61, 32, 116, 101, 120, 116, 58, 115, 117, - 98, 40, 105, 44, 105, 41, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 99, 32, 61, 61, 32, 39, 34, 39, 32, 116, 104, 101, 110, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 86, 65, 76, 85, 69, 44, 32, 105, 32, 43, 32, 49, 10, 32, 32, 32, 32, 32, - 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 99, 32, 126, 61, 32, 39, 92, 92, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, 65, 76, 85, 69, 32, 46, 46, 32, 99, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 109, 97, -116, 99, 104, 40, 39, 94, 92, 92, 98, 39, 44, 32, 105, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, - 85, 69, 32, 61, 32, 86, 65, 76, 85, 69, 32, 46, 46, 32, 34, 92, 98, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, -105, 32, 43, 32, 50, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, - 92, 92, 102, 39, 44, 32, 105, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, - 65, 76, 85, 69, 32, 46, 46, 32, 34, 92, 102, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 50, 10, - 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 92, 92, 110, 39, 44, 32, -105, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, 65, 76, 85, 69, 32, 46, - 46, 32, 34, 92, 110, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 50, 10, 32, 32, 32, 32, 32, 32, -101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 92, 92, 114, 39, 44, 32, 105, 41, 32, 116, 104, 101, -110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, 65, 76, 85, 69, 32, 46, 46, 32, 34, 92, 114, 34, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 50, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, - 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 92, 92, 116, 39, 44, 32, 105, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, 65, 76, 85, 69, 32, 46, 46, 32, 34, 92, 116, 34, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 50, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 108, 111, 99, 97, 108, 32, 104, 101, 120, 32, 61, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 92, 92, 117, 40, 91, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 65, 98, 66, 99, 67, 100, 68, 101, 69, 102, 70, 93, 91, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 97, 65, 98, 66, 99, 67, 100, 68, 101, 69, 102, 70, 93, 91, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 65, 98, 66, 99, 67, -100, 68, 101, 69, 102, 70, 93, 91, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 65, 98, 66, 99, 67, 100, 68, 101, 69, 102, 70, 93, 41, - 39, 44, 32, 105, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 104, 101, 120, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 54, 32, 45, 45, 32, 98, 121, 112, 97, 115, 115, 32, 119, 104, 97, 116, 32, -119, 101, 32, 106, 117, 115, 116, 32, 114, 101, 97, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 87, 101, 32, 104, - 97, 118, 101, 32, 97, 32, 85, 110, 105, 99, 111, 100, 101, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 46, 32, 73, 116, 32, 99, 111, 117, 108, -100, 32, 98, 101, 32, 115, 116, 97, 110, 100, 97, 108, 111, 110, 101, 44, 32, 111, 114, 32, 105, 102, 32, 105, 110, 32, 116, 104, 101, 32, 112, 114, -111, 112, 101, 114, 32, 114, 97, 110, 103, 101, 32, 97, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 102, 111, -108, 108, 111, 119, 101, 100, 32, 98, 121, 32, 97, 110, 111, 116, 104, 101, 114, 32, 105, 110, 32, 97, 32, 115, 112, 101, 99, 105, 102, 105, 99, 32, -114, 97, 110, 103, 101, 44, 32, 105, 116, 39, 108, 108, 32, 98, 101, 32, 97, 32, 116, 119, 111, 45, 99, 111, 100, 101, 32, 115, 117, 114, 114, 111, -103, 97, 116, 101, 32, 112, 97, 105, 114, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 99, 111, 100, -101, 112, 111, 105, 110, 116, 32, 61, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 104, 101, 120, 44, 32, 49, 54, 41, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 62, 61, 32, 48, 120, 68, 56, 48, 48, 32, 97, 110, -100, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 60, 61, 32, 48, 120, 68, 66, 70, 70, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 105, 116, 39, 115, 32, 97, 32, 104, 105, 32, 115, 117, 114, 114, 111, 103, 97, 116, 101, - 46, 46, 46, 32, 115, 101, 101, 32, 119, 104, 101, 116, 104, 101, 114, 32, 119, 101, 32, 104, 97, 118, 101, 32, 97, 32, 102, 111, 108, 108, 111, 119, -105, 110, 103, 32, 108, 111, 119, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 108, 111, 95, -115, 117, 114, 114, 111, 103, 97, 116, 101, 32, 61, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 92, 92, 117, 40, 91, 100, 68, - 93, 91, 99, 100, 101, 102, 67, 68, 69, 70, 93, 91, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 65, 98, 66, 99, 67, 100, 68, 101, 69, -102, 70, 93, 91, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 65, 98, 66, 99, 67, 100, 68, 101, 69, 102, 70, 93, 41, 39, 44, 32, 105, - 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 108, 111, 95, 115, 117, 114, 114, 111, 103, 97, 116, 101, - 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, - 54, 32, 45, 45, 32, 98, 121, 112, 97, 115, 115, 32, 116, 104, 101, 32, 108, 111, 119, 32, 115, 117, 114, 114, 111, 103, 97, 116, 101, 32, 119, 101, - 32, 106, 117, 115, 116, 32, 114, 101, 97, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 99, 111, 100, -101, 112, 111, 105, 110, 116, 32, 61, 32, 48, 120, 50, 52, 48, 48, 32, 43, 32, 40, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 45, 32, 48, -120, 68, 56, 48, 48, 41, 32, 42, 32, 48, 120, 52, 48, 48, 32, 43, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 108, 111, 95, 115, 117, 114, -114, 111, 103, 97, 116, 101, 44, 32, 49, 54, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 110, 111, 116, 32, 97, 32, 112, 114, 111, 112, 101, -114, 32, 108, 111, 119, 44, 32, 115, 111, 32, 119, 101, 39, 108, 108, 32, 106, 117, 115, 116, 32, 108, 101, 97, 118, 101, 32, 116, 104, 101, 32, 102, -105, 114, 115, 116, 32, 99, 111, 100, 101, 112, 111, 105, 110, 116, 32, 97, 115, 32, 105, 115, 32, 97, 110, 100, 32, 115, 112, 105, 116, 32, 105, 116, - 32, 111, 117, 116, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, 65, 76, - 85, 69, 32, 46, 46, 32, 117, 110, 105, 99, 111, 100, 101, 95, 99, 111, 100, 101, 112, 111, 105, 110, 116, 95, 97, 115, 95, 117, 116, 102, 56, 40, - 99, 111, 100, 101, 112, 111, 105, 110, 116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 45, 45, 32, 106, 117, 115, 116, 32, 112, 97, 115, 115, 32, 116, 104, 114, 111, 117, 103, 104, 32, 119, 104, 97, 116, 39, 115, - 32, 101, 115, 99, 97, 112, 101, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 32, 61, 32, 86, 65, 76, - 85, 69, 32, 46, 46, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 92, 92, 40, 46, 41, 39, 44, 32, 105, 41, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 105, 32, 43, 32, 50, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, - 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, -100, 101, 69, 114, 114, 111, 114, 40, 34, 117, 110, 99, 108, 111, 115, 101, 100, 32, 115, 116, 114, 105, 110, 103, 34, 44, 32, 116, 101, 120, 116, 44, - 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, -105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, -101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, -116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, -110, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 41, 10, 32, - 32, 32, 108, 111, 99, 97, 108, 32, 95, 44, 32, 109, 97, 116, 99, 104, 95, 101, 110, 100, 32, 61, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, - 40, 34, 94, 91, 32, 92, 110, 92, 114, 92, 116, 93, 43, 34, 44, 32, 115, 116, 97, 114, 116, 41, 32, 45, 45, 32, 91, 104, 116, 116, 112, 58, - 47, 47, 119, 119, 119, 46, 105, 101, 116, 102, 46, 111, 114, 103, 47, 114, 102, 99, 47, 114, 102, 99, 52, 54, 50, 55, 46, 116, 120, 116, 93, 32, - 83, 101, 99, 116, 105, 111, 110, 32, 50, 10, 32, 32, 32, 105, 102, 32, 109, 97, 116, 99, 104, 95, 101, 110, 100, 32, 116, 104, 101, 110, 10, 32, - 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 109, 97, 116, 99, 104, 95, 101, 110, 100, 32, 43, 32, 49, 10, 32, 32, 32, 101, 108, 115, -101, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 116, 97, 114, 116, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, -108, 111, 99, 97, 108, 32, 103, 114, 111, 107, 95, 111, 110, 101, 32, 45, 45, 32, 97, 115, 115, 105, 103, 110, 101, 100, 32, 108, 97, 116, 101, 114, - 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 114, 111, 107, 95, 111, 98, 106, 101, 99, 116, 40, 115, 101, 108, 102, - 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 105, 102, 32, 116, 101, -120, 116, 58, 115, 117, 98, 40, 115, 116, 97, 114, 116, 44, 115, 116, 97, 114, 116, 41, 32, 126, 61, 32, 39, 123, 39, 32, 116, 104, 101, 110, 10, - 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 101, 120, 112, 101, 99, 116, -101, 100, 32, 39, 123, 39, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, - 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 45, 45, 32, 105, 110, - 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, - 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, - 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, - 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 32, 43, 32, 49, 41, 32, 45, 45, 32, 43, 49, 32, 116, 111, 32, 115, 107, -105, 112, 32, 116, 104, 101, 32, 39, 123, 39, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 86, 65, 76, 85, 69, 32, 61, 32, 115, 101, 108, 102, - 46, 115, 116, 114, 105, 99, 116, 84, 121, 112, 101, 115, 32, 97, 110, 100, 32, 115, 101, 108, 102, 58, 110, 101, 119, 79, 98, 106, 101, 99, 116, 32, -123, 32, 125, 32, 111, 114, 32, 123, 32, 125, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 105, 44, 105, 41, 32, 61, - 61, 32, 39, 125, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 86, 65, 76, 85, 69, 44, 32, 105, - 32, 43, 32, 49, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 116, 101, 120, 116, 95, 108, 101, 110, 32, 61, 32, -116, 101, 120, 116, 58, 108, 101, 110, 40, 41, 10, 32, 32, 32, 119, 104, 105, 108, 101, 32, 105, 32, 60, 61, 32, 116, 101, 120, 116, 95, 108, 101, -110, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 107, 101, 121, 44, 32, 110, 101, 119, 95, 105, 32, 61, 32, 103, 114, -111, 107, 95, 115, 116, 114, 105, 110, 103, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 105, 44, 32, 111, 112, 116, 105, 111, 110, 115, - 41, 10, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, - 44, 32, 110, 101, 119, 95, 105, 41, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 105, 44, 32, 105, 41, - 32, 126, 61, 32, 39, 58, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, -111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 99, 111, 108, 111, 110, 34, 44, 32, 116, 101, 120, 116, 44, - 32, 105, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, - 32, 110, 105, 108, 44, 32, 105, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, -104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, -105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 105, 32, 61, - 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 105, 32, 43, 32, 49, 41, 10, 32, 32, - 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 110, 101, 119, 95, 118, 97, 108, 44, 32, 110, 101, 119, 95, 105, 32, 61, 32, 103, 114, 111, 107, 95, -111, 110, 101, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 105, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 32, - 32, 32, 86, 65, 76, 85, 69, 91, 107, 101, 121, 93, 32, 61, 32, 110, 101, 119, 95, 118, 97, 108, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, - 32, 32, 32, 32, 32, 32, 45, 45, 32, 69, 120, 112, 101, 99, 116, 32, 110, 111, 119, 32, 101, 105, 116, 104, 101, 114, 32, 39, 125, 39, 32, 116, -111, 32, 101, 110, 100, 32, 116, 104, 105, 110, 103, 115, 44, 32, 111, 114, 32, 97, 32, 39, 44, 39, 32, 116, 111, 32, 97, 108, 108, 111, 119, 32, -117, 115, 32, 116, 111, 32, 99, 111, 110, 116, 105, 110, 117, 101, 46, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 105, - 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 110, 101, 119, 95, 105, 41, 10, - 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 99, 32, 61, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 105, 44, 105, 41, 10, 32, 32, - 32, 32, 32, 32, 105, 102, 32, 99, 32, 61, 61, 32, 39, 125, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, -116, 117, 114, 110, 32, 86, 65, 76, 85, 69, 44, 32, 105, 32, 43, 32, 49, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, - 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 105, 44, 32, 105, 41, 32, 126, 61, 32, 39, 44, 39, 32, 116, 104, 101, 110, 10, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 101, 120, 112, -101, 99, 116, 101, 100, 32, 99, 111, 109, 109, 97, 32, 111, 114, 32, 39, 125, 39, 34, 44, 32, 116, 101, 120, 116, 44, 32, 105, 44, 32, 111, 112, -116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, -105, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, -101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, -110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 115, 107, 105, 112, 95, -119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 105, 32, 43, 32, 49, 41, 10, 32, 32, 32, 101, 110, 100, 10, 32, - 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 117, 110, 99, 108, 111, 115, 101, 100, 32, 39, -123, 39, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, - 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, -104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, -101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 114, 111, 107, 95, 97, 114, 114, 97, 121, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, -116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, - 98, 40, 115, 116, 97, 114, 116, 44, 115, 116, 97, 114, 116, 41, 32, 126, 61, 32, 39, 91, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, - 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 39, 91, - 39, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, - 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, - 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, - 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, -100, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, -101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 32, 43, 32, 49, 41, 32, 45, 45, 32, 43, 49, 32, 116, 111, 32, 115, 107, 105, 112, 32, 116, 104, -101, 32, 39, 91, 39, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 86, 65, 76, 85, 69, 32, 61, 32, 115, 101, 108, 102, 46, 115, 116, 114, 105, - 99, 116, 84, 121, 112, 101, 115, 32, 97, 110, 100, 32, 115, 101, 108, 102, 58, 110, 101, 119, 65, 114, 114, 97, 121, 32, 123, 32, 125, 32, 111, 114, - 32, 123, 32, 125, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 105, 44, 105, 41, 32, 61, 61, 32, 39, 93, 39, 32, -116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 86, 65, 76, 85, 69, 44, 32, 105, 32, 43, 32, 49, 10, 32, - 32, 32, 101, 110, 100, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 86, 65, 76, 85, 69, 95, 73, 78, 68, 69, 88, 32, 61, 32, 49, 10, 32, - 32, 32, 108, 111, 99, 97, 108, 32, 116, 101, 120, 116, 95, 108, 101, 110, 32, 61, 32, 116, 101, 120, 116, 58, 108, 101, 110, 40, 41, 10, 32, 32, - 32, 119, 104, 105, 108, 101, 32, 105, 32, 60, 61, 32, 116, 101, 120, 116, 95, 108, 101, 110, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 108, 111, - 99, 97, 108, 32, 118, 97, 108, 44, 32, 110, 101, 119, 95, 105, 32, 61, 32, 103, 114, 111, 107, 95, 111, 110, 101, 40, 115, 101, 108, 102, 44, 32, -116, 101, 120, 116, 44, 32, 105, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 99, 97, 110, 39, 116, - 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 86, 65, 76, 85, 69, 44, 32, 118, 97, 108, 41, 32, 104, 101, 114, 101, 32, 98, -101, 99, 97, 117, 115, 101, 32, 105, 116, 39, 115, 32, 97, 32, 110, 111, 45, 111, 112, 32, 105, 102, 32, 118, 97, 108, 32, 105, 115, 32, 110, 105, -108, 10, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 91, 86, 65, 76, 85, 69, 95, 73, 78, 68, 69, 88, 93, 32, 61, 32, 118, 97, 108, - 10, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 95, 73, 78, 68, 69, 88, 32, 61, 32, 86, 65, 76, 85, 69, 95, 73, 78, 68, 69, 88, - 32, 43, 32, 49, 10, 32, 32, 32, 32, 32, 32, 105, 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, -101, 120, 116, 44, 32, 110, 101, 119, 95, 105, 41, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 69, 120, -112, 101, 99, 116, 32, 110, 111, 119, 32, 101, 105, 116, 104, 101, 114, 32, 39, 93, 39, 32, 116, 111, 32, 101, 110, 100, 32, 116, 104, 105, 110, 103, -115, 44, 32, 111, 114, 32, 97, 32, 39, 44, 39, 32, 116, 111, 32, 97, 108, 108, 111, 119, 32, 117, 115, 32, 116, 111, 32, 99, 111, 110, 116, 105, -110, 117, 101, 46, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 99, 32, 61, 32, 116, 101, -120, 116, 58, 115, 117, 98, 40, 105, 44, 105, 41, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 99, 32, 61, 61, 32, 39, 93, 39, 32, 116, 104, -101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 86, 65, 76, 85, 69, 44, 32, 105, 32, 43, 32, 49, 10, - 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 105, 44, 32, 105, - 41, 32, 126, 61, 32, 39, 44, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, - 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 99, 111, 109, 109, 97, 32, 111, 114, 32, 39, 93, 39, - 34, 44, 32, 116, 101, 120, 116, 44, 32, 105, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 105, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, -114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, -110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, - 32, 32, 32, 32, 32, 105, 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 105, - 32, 43, 32, 49, 41, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, -111, 114, 40, 34, 117, 110, 99, 108, 111, 115, 101, 100, 32, 39, 91, 39, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, -111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 105, 32, 45, 45, - 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, -116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, -108, 101, 10, 101, 110, 100, 10, 103, 114, 111, 107, 95, 111, 110, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 115, 101, 108, 102, 44, - 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 45, 45, 32, 83, 107, 105, -112, 32, 97, 110, 121, 32, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 10, 32, 32, 32, 115, 116, 97, 114, 116, 32, 61, 32, 115, 107, 105, 112, - 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 41, 10, 32, 32, 32, 105, 102, 32, 115, -116, 97, 114, 116, 32, 62, 32, 116, 101, 120, 116, 58, 108, 101, 110, 40, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, -102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 117, 110, 101, 120, 112, 101, 99, 116, 101, 100, 32, 101, 110, 100, 32, -111, 102, 32, 115, 116, 114, 105, 110, 103, 34, 44, 32, 116, 101, 120, 116, 44, 32, 110, 105, 108, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, -116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 45, 45, 32, 105, -110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, - 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, - 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, 40, 39, 94, 34, 39, 44, 32, 115, 116, - 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 103, 114, 111, 107, 95, 115, 116, 114, 105, -110, 103, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, - 99, 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, 40, 39, 94, 91, 45, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 32, 93, 39, 44, 32, 115, 116, 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, -114, 110, 32, 103, 114, 111, 107, 95, 110, 117, 109, 98, 101, 114, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, - 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, 40, 39, - 94, 37, 123, 39, 44, 32, 115, 116, 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 103, -114, 111, 107, 95, 111, 98, 106, 101, 99, 116, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, -116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, 40, 39, 94, 37, 91, 39, - 44, 32, 115, 116, 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 103, 114, 111, 107, 95, - 97, 114, 114, 97, 121, 40, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, - 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, 40, 39, 94, 116, 114, 117, 101, 39, 44, 32, 115, -116, 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 44, 32, 115, 116, - 97, 114, 116, 32, 43, 32, 52, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 102, 105, 110, 100, 40, 39, 94, 102, 97, -108, 115, 101, 39, 44, 32, 115, 116, 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 102, - 97, 108, 115, 101, 44, 32, 115, 116, 97, 114, 116, 32, 43, 32, 53, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 101, 120, 116, 58, 102, -105, 110, 100, 40, 39, 94, 110, 117, 108, 108, 39, 44, 32, 115, 116, 97, 114, 116, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, -101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 97, 114, 116, 32, 43, 32, 52, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, - 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 99, 97, 110, 39, 116, 32, 112, 97, 114, -115, 101, 32, 74, 83, 79, 78, 34, 44, 32, 116, 101, 120, 116, 44, 32, 115, 116, 97, 114, 116, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, -116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 49, 32, 45, 45, 32, 105, 110, 32, 99, 97, -115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, -116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 100, 101, 99, 111, 100, 101, 40, 116, -101, 120, 116, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 73, -102, 32, 116, 104, 101, 32, 117, 115, 101, 114, 32, 100, 105, 100, 110, 39, 116, 32, 112, 97, 115, 115, 32, 105, 110, 32, 97, 32, 116, 97, 98, 108, -101, 32, 111, 102, 32, 100, 101, 99, 111, 100, 101, 32, 111, 112, 116, 105, 111, 110, 115, 44, 32, 109, 97, 107, 101, 32, 97, 110, 32, 101, 109, 112, -116, 121, 32, 111, 110, 101, 46, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 111, 112, 116, 105, 111, 110, 115, - 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, 110, 115, 32, - 61, 32, 123, 125, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 73, 102, 32, 116, 104, 101, 121, 32, -112, 97, 115, 115, 101, 100, 32, 105, 110, 32, 97, 110, 32, 39, 101, 116, 99, 39, 32, 97, 114, 103, 117, 109, 101, 110, 116, 44, 32, 115, 116, 117, -102, 102, 32, 105, 116, 32, 105, 110, 116, 111, 32, 116, 104, 101, 32, 111, 112, 116, 105, 111, 110, 115, 46, 10, 32, 32, 32, 45, 45, 32, 40, 73, -102, 32, 110, 111, 116, 44, 32, 97, 110, 121, 32, 39, 101, 116, 99, 39, 32, 102, 105, 101, 108, 100, 32, 105, 110, 32, 116, 104, 101, 32, 111, 112, -116, 105, 111, 110, 115, 32, 116, 104, 101, 121, 32, 112, 97, 115, 115, 101, 100, 32, 105, 110, 32, 114, 101, 109, 97, 105, 110, 115, 32, 116, 111, 32, - 98, 101, 32, 117, 115, 101, 100, 41, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 101, 116, 99, 32, 126, 61, 32, 110, 105, 108, 32, -116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 32, 61, 32, 101, 116, 99, 10, 32, 32, 32, -101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 115, 101, 108, 102, 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, -111, 114, 32, 115, 101, 108, 102, 46, 95, 95, 105, 110, 100, 101, 120, 32, 126, 61, 32, 79, 66, 74, 68, 69, 70, 32, 116, 104, 101, 110, 10, 32, - 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 34, 74, 83, 79, 78, - 58, 100, 101, 99, 111, 100, 101, 32, 109, 117, 115, 116, 32, 98, 101, 32, 99, 97, 108, 108, 101, 100, 32, 105, 110, 32, 109, 101, 116, 104, 111, 100, - 32, 102, 111, 114, 109, 97, 116, 34, 10, 32, 32, 32, 32, 32, 32, 79, 66, 74, 68, 69, 70, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, -114, 111, 114, 40, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 44, 32, 110, 105, 108, 44, 32, 110, 105, 108, 44, 32, 111, 112, 116, -105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 111, -114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, -101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, -116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, - 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 114, 114, 111, 114, 95, 109, -101, 115, 115, 97, 103, 101, 32, 61, 32, 34, 110, 105, 108, 32, 112, 97, 115, 115, 101, 100, 32, 116, 111, 32, 74, 83, 79, 78, 58, 100, 101, 99, -111, 100, 101, 40, 41, 34, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 79, 102, 78, 105, 108, 69, -114, 114, 111, 114, 40, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 44, 32, 110, 105, 108, 44, 32, 110, 105, 108, 44, 32, 111, 112, -116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, -111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, -109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, -101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 116, -101, 120, 116, 41, 32, 126, 61, 32, 39, 115, 116, 114, 105, 110, 103, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, -108, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 115, 116, 114, 105, -110, 103, 32, 97, 114, 103, 117, 109, 101, 110, 116, 32, 116, 111, 32, 74, 83, 79, 78, 58, 100, 101, 99, 111, 100, 101, 40, 41, 34, 10, 32, 32, - 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, -114, 109, 97, 116, 40, 34, 37, 115, 44, 32, 103, 111, 116, 32, 37, 115, 34, 44, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, - 44, 32, 116, 121, 112, 101, 40, 116, 101, 120, 116, 41, 41, 44, 32, 110, 105, 108, 44, 32, 110, 105, 108, 44, 32, 111, 112, 116, 105, 111, 110, 115, - 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 111, 114, 95, 109, 101, -115, 115, 97, 103, 101, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 116, 104, 111, -100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, 116, 104, 105, 110, -103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 109, 97, 116, - 99, 104, 40, 39, 94, 37, 115, 42, 36, 39, 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 97, 110, 32, 101, 109, 112, -116, 121, 32, 115, 116, 114, 105, 110, 103, 32, 105, 115, 32, 110, 111, 116, 104, 105, 110, 103, 44, 32, 98, 117, 116, 32, 110, 111, 116, 32, 97, 110, - 32, 101, 114, 114, 111, 114, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 32, 32, 32, 101, 110, 100, 10, 32, - 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 109, 97, 116, 99, 104, 40, 39, 94, 37, 115, 42, 60, 39, 41, 32, 116, 104, 101, 110, 10, 32, 32, - 32, 32, 32, 32, 45, 45, 32, 67, 97, 110, 39, 116, 32, 98, 101, 32, 74, 83, 79, 78, 46, 46, 46, 32, 119, 101, 39, 108, 108, 32, 97, 115, -115, 117, 109, 101, 32, 105, 116, 39, 115, 32, 72, 84, 77, 76, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 114, 114, 111, 114, - 95, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 34, 72, 84, 77, 76, 32, 112, 97, 115, 115, 101, 100, 32, 116, 111, 32, 74, 83, 79, 78, 58, -100, 101, 99, 111, 100, 101, 40, 41, 34, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 79, 102, 72, - 84, 77, 76, 69, 114, 114, 111, 114, 40, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 44, 32, 116, 101, 120, 116, 44, 32, 110, 105, -108, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, - 44, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, -114, 114, 111, 114, 32, 109, 101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, -110, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, - 45, 10, 32, 32, 32, 45, 45, 32, 69, 110, 115, 117, 114, 101, 32, 116, 104, 97, 116, 32, 105, 116, 39, 115, 32, 110, 111, 116, 32, 85, 84, 70, - 45, 51, 50, 32, 111, 114, 32, 85, 84, 70, 45, 49, 54, 46, 10, 32, 32, 32, 45, 45, 32, 84, 104, 111, 115, 101, 32, 97, 114, 101, 32, 112, -101, 114, 102, 101, 99, 116, 108, 121, 32, 118, 97, 108, 105, 100, 32, 101, 110, 99, 111, 100, 105, 110, 103, 115, 32, 102, 111, 114, 32, 74, 83, 79, - 78, 32, 40, 97, 115, 32, 112, 101, 114, 32, 82, 70, 67, 32, 52, 54, 50, 55, 32, 115, 101, 99, 116, 105, 111, 110, 32, 51, 41, 44, 10, 32, - 32, 32, 45, 45, 32, 98, 117, 116, 32, 116, 104, 105, 115, 32, 112, 97, 99, 107, 97, 103, 101, 32, 99, 97, 110, 39, 116, 32, 104, 97, 110, 100, -108, 101, 32, 116, 104, 101, 109, 46, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 49, 44, - 49, 41, 58, 98, 121, 116, 101, 40, 41, 32, 61, 61, 32, 48, 32, 111, 114, 32, 40, 116, 101, 120, 116, 58, 108, 101, 110, 40, 41, 32, 62, 61, - 32, 50, 32, 97, 110, 100, 32, 116, 101, 120, 116, 58, 115, 117, 98, 40, 50, 44, 50, 41, 58, 98, 121, 116, 101, 40, 41, 32, 61, 61, 32, 48, - 41, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, - 32, 61, 32, 34, 74, 83, 79, 78, 32, 112, 97, 99, 107, 97, 103, 101, 32, 103, 114, 111, 107, 115, 32, 111, 110, 108, 121, 32, 85, 84, 70, 45, - 56, 44, 32, 115, 111, 114, 114, 121, 34, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, -111, 114, 40, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 44, 32, 116, 101, 120, 116, 44, 32, 110, 105, 108, 44, 32, 111, 112, 116, -105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 111, -114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 45, 45, 32, 105, 110, 32, 99, 97, 115, 101, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, -101, 116, 104, 111, 100, 32, 100, 111, 101, 115, 110, 39, 116, 32, 97, 98, 111, 114, 116, 44, 32, 114, 101, 116, 117, 114, 110, 32, 115, 111, 109, 101, -116, 104, 105, 110, 103, 32, 115, 101, 110, 115, 105, 98, 108, 101, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, - 45, 32, 97, 112, 112, 108, 121, 32, 103, 108, 111, 98, 97, 108, 32, 111, 112, 116, 105, 111, 110, 115, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, -105, 102, 32, 111, 112, 116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 78, 117, 109, 98, 101, 114, 115, 65, 115, 79, 98, 106, 101, 99, 116, -115, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, 110, 115, 46, 100, 101, 99, 111, -100, 101, 78, 117, 109, 98, 101, 114, 115, 65, 115, 79, 98, 106, 101, 99, 116, 115, 32, 61, 32, 115, 101, 108, 102, 46, 100, 101, 99, 111, 100, 101, - 78, 117, 109, 98, 101, 114, 115, 65, 115, 79, 98, 106, 101, 99, 116, 115, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 111, 112, -116, 105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 73, 110, 116, 101, 103, 101, 114, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, -111, 110, 76, 101, 110, 103, 116, 104, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, -110, 115, 46, 100, 101, 99, 111, 100, 101, 73, 110, 116, 101, 103, 101, 114, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, 111, 110, 76, -101, 110, 103, 116, 104, 32, 61, 32, 115, 101, 108, 102, 46, 100, 101, 99, 111, 100, 101, 73, 110, 116, 101, 103, 101, 114, 83, 116, 114, 105, 110, 103, -105, 102, 105, 99, 97, 116, 105, 111, 110, 76, 101, 110, 103, 116, 104, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, 102, 32, 111, 112, 116, -105, 111, 110, 115, 46, 100, 101, 99, 111, 100, 101, 68, 101, 99, 105, 109, 97, 108, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, 111, -110, 76, 101, 110, 103, 116, 104, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, 110, -115, 46, 100, 101, 99, 111, 100, 101, 68, 101, 99, 105, 109, 97, 108, 83, 116, 114, 105, 110, 103, 105, 102, 105, 99, 97, 116, 105, 111, 110, 76, 101, -110, 103, 116, 104, 32, 61, 32, 115, 101, 108, 102, 46, 100, 101, 99, 111, 100, 101, 68, 101, 99, 105, 109, 97, 108, 83, 116, 114, 105, 110, 103, 105, -102, 105, 99, 97, 116, 105, 111, 110, 76, 101, 110, 103, 116, 104, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, - 45, 32, 70, 105, 110, 97, 108, 108, 121, 44, 32, 103, 111, 32, 112, 97, 114, 115, 101, 32, 105, 116, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, -108, 111, 99, 97, 108, 32, 115, 117, 99, 99, 101, 115, 115, 44, 32, 118, 97, 108, 117, 101, 44, 32, 110, 101, 120, 116, 95, 105, 32, 61, 32, 112, - 99, 97, 108, 108, 40, 103, 114, 111, 107, 95, 111, 110, 101, 44, 32, 115, 101, 108, 102, 44, 32, 116, 101, 120, 116, 44, 32, 49, 44, 32, 111, 112, -116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 105, 102, 32, 115, 117, 99, 99, 101, 115, 115, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, -108, 111, 99, 97, 108, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 110, 105, 108, 10, 32, 32, 32, 32, 32, 32, -105, 102, 32, 110, 101, 120, 116, 95, 105, 32, 126, 61, 32, 35, 116, 101, 120, 116, 32, 43, 32, 49, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 45, 45, 32, 115, 111, 109, 101, 116, 104, 105, 110, 103, 39, 115, 32, 108, 101, 102, 116, 32, 111, 118, 101, 114, 32, 97, 102, -116, 101, 114, 32, 119, 101, 32, 112, 97, 114, 115, 101, 100, 32, 116, 104, 101, 32, 102, 105, 114, 115, 116, 32, 116, 104, 105, 110, 103, 46, 46, 46, - 46, 32, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 32, 105, 115, 32, 97, 108, 108, 111, 119, 101, 100, 46, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 110, 101, 120, 116, 95, 105, 32, 61, 32, 115, 107, 105, 112, 95, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 40, 116, 101, 120, 116, 44, - 32, 110, 101, 120, 116, 95, 105, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 105, 102, 32, 119, 101, 32, 104, 97, 118, 101, 32, -115, 111, 109, 101, 116, 104, 105, 110, 103, 32, 108, 101, 102, 116, 32, 111, 118, 101, 114, 32, 110, 111, 119, 44, 32, 105, 116, 39, 115, 32, 116, 114, - 97, 105, 108, 105, 110, 103, 32, 103, 97, 114, 98, 97, 103, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 110, 101, 120, 116, 95, -105, 32, 126, 61, 32, 35, 116, 101, 120, 116, 32, 43, 32, 49, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, -118, 97, 108, 117, 101, 44, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 115, 101, 108, 102, 58, 111, 110, 84, 114, - 97, 105, 108, 105, 110, 103, 71, 97, 114, 98, 97, 103, 101, 40, 116, 101, 120, 116, 44, 32, 110, 101, 120, 116, 95, 105, 44, 32, 118, 97, 108, 117, -101, 44, 32, 111, 112, 116, 105, 111, 110, 115, 46, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, - 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 44, 32, 101, 114, 114, 111, 114, - 95, 109, 101, 115, 115, 97, 103, 101, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 73, 102, 32, 74, 83, 79, - 78, 58, 111, 110, 68, 101, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 41, 32, 100, 105, 100, 110, 39, 116, 32, 97, 98, 111, 114, 116, 32, 111, -117, 116, 32, 111, 102, 32, 116, 104, 101, 32, 112, 99, 97, 108, 108, 44, 32, 119, 101, 39, 108, 108, 32, 104, 97, 118, 101, 32, 114, 101, 99, 101, -105, 118, 101, 100, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 115, 115, 97, 103, 101, 32, -104, 101, 114, 101, 32, 97, 115, 32, 34, 118, 97, 108, 117, 101, 34, 44, 32, 115, 111, 32, 112, 97, 115, 115, 32, 105, 116, 32, 97, 108, 111, 110, -103, 32, 97, 115, 32, 97, 110, 32, 97, 115, 115, 101, 114, 116, 46, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 114, 114, 111, -114, 95, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 118, 97, 108, 117, 101, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, - 97, 115, 115, 101, 114, 116, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 46, 97, 115, 115, 101, 114, 116, - 40, 102, 97, 108, 115, 101, 44, 32, 101, 114, 114, 111, 114, 95, 109, 101, 115, 115, 97, 103, 101, 41, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, -101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 97, 115, 115, 101, 114, 116, 40, 102, 97, 108, 115, 101, 44, 32, 101, 114, 114, 111, 114, 95, 109, -101, 115, 115, 97, 103, 101, 41, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 46, 46, 46, 97, 110, -100, 32, 105, 102, 32, 119, 101, 39, 114, 101, 32, 115, 116, 105, 108, 108, 32, 104, 101, 114, 101, 32, 40, 98, 101, 99, 97, 117, 115, 101, 32, 116, -104, 101, 32, 97, 115, 115, 101, 114, 116, 32, 100, 105, 100, 110, 39, 116, 32, 116, 104, 114, 111, 119, 32, 97, 110, 32, 101, 114, 114, 111, 114, 41, - 44, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 114, 101, 116, 117, 114, 110, 32, 97, 32, 110, 105, 108, 32, 97, 110, 100, 32, 116, 104, 114, 111, -119, 32, 116, 104, 101, 32, 101, 114, 114, 111, 114, 32, 109, 101, 115, 115, 97, 103, 101, 32, 111, 110, 32, 97, 115, 32, 97, 32, 115, 101, 99, 111, -110, 100, 32, 97, 114, 103, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 111, 114, 95, 109, -101, 115, 115, 97, 103, 101, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 98, 97, 99, 107, 115, 108, 97, 115, 104, 95, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 95, 102, 117, 110, 99, 116, 105, 111, 110, 40, - 99, 41, 10, 32, 32, 32, 105, 102, 32, 99, 32, 61, 61, 32, 34, 92, 110, 34, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, -116, 117, 114, 110, 32, 34, 92, 92, 110, 34, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 99, 32, 61, 61, 32, 34, 92, 114, 34, 32, 116, -104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 92, 92, 114, 34, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, - 32, 99, 32, 61, 61, 32, 34, 92, 116, 34, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 92, 92, -116, 34, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 99, 32, 61, 61, 32, 34, 92, 98, 34, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, - 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 92, 92, 98, 34, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 99, 32, 61, 61, 32, 34, 92, -102, 34, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 92, 92, 102, 34, 10, 32, 32, 32, 101, 108, -115, 101, 105, 102, 32, 99, 32, 61, 61, 32, 39, 34, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, - 39, 92, 92, 34, 39, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 99, 32, 61, 61, 32, 39, 92, 92, 39, 32, 116, 104, 101, 110, 10, 32, - 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 39, 92, 92, 92, 92, 39, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, - 32, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 92, 92, 117, 37, 48, 52, 120, 34, 44, - 32, 99, 58, 98, 121, 116, 101, 40, 41, 41, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 104, 97, 114, -115, 95, 116, 111, 95, 98, 101, 95, 101, 115, 99, 97, 112, 101, 100, 95, 105, 110, 95, 74, 83, 79, 78, 95, 115, 116, 114, 105, 110, 103, 10, 32, - 32, 32, 61, 32, 39, 91, 39, 10, 32, 32, 32, 46, 46, 32, 32, 32, 32, 39, 34, 39, 32, 32, 32, 32, 45, 45, 32, 99, 108, 97, 115, 115, - 32, 115, 117, 98, 45, 112, 97, 116, 116, 101, 114, 110, 32, 116, 111, 32, 109, 97, 116, 99, 104, 32, 97, 32, 100, 111, 117, 98, 108, 101, 32, 113, -117, 111, 116, 101, 10, 32, 32, 32, 46, 46, 32, 32, 32, 32, 39, 37, 92, 92, 39, 32, 32, 45, 45, 32, 99, 108, 97, 115, 115, 32, 115, 117, - 98, 45, 112, 97, 116, 116, 101, 114, 110, 32, 116, 111, 32, 109, 97, 116, 99, 104, 32, 97, 32, 98, 97, 99, 107, 115, 108, 97, 115, 104, 10, 32, - 32, 32, 46, 46, 32, 32, 32, 32, 39, 37, 122, 39, 32, 32, 32, 45, 45, 32, 99, 108, 97, 115, 115, 32, 115, 117, 98, 45, 112, 97, 116, 116, -101, 114, 110, 32, 116, 111, 32, 109, 97, 116, 99, 104, 32, 97, 32, 110, 117, 108, 108, 10, 32, 32, 32, 46, 46, 32, 32, 32, 32, 39, 92, 48, - 48, 49, 39, 32, 46, 46, 32, 39, 45, 39, 32, 46, 46, 32, 39, 92, 48, 51, 49, 39, 32, 45, 45, 32, 99, 108, 97, 115, 115, 32, 115, 117, - 98, 45, 112, 97, 116, 116, 101, 114, 110, 32, 116, 111, 32, 109, 97, 116, 99, 104, 32, 99, 111, 110, 116, 114, 111, 108, 32, 99, 104, 97, 114, 97, - 99, 116, 101, 114, 115, 10, 32, 32, 32, 46, 46, 32, 39, 93, 39, 10, 108, 111, 99, 97, 108, 32, 76, 73, 78, 69, 95, 83, 69, 80, 65, 82, - 65, 84, 79, 82, 95, 97, 115, 95, 117, 116, 102, 56, 32, 32, 32, 32, 32, 32, 61, 32, 117, 110, 105, 99, 111, 100, 101, 95, 99, 111, 100, 101, -112, 111, 105, 110, 116, 95, 97, 115, 95, 117, 116, 102, 56, 40, 48, 120, 50, 48, 50, 56, 41, 10, 108, 111, 99, 97, 108, 32, 80, 65, 82, 65, - 71, 82, 65, 80, 72, 95, 83, 69, 80, 65, 82, 65, 84, 79, 82, 95, 97, 115, 95, 117, 116, 102, 56, 32, 61, 32, 117, 110, 105, 99, 111, 100, -101, 95, 99, 111, 100, 101, 112, 111, 105, 110, 116, 95, 97, 115, 95, 117, 116, 102, 56, 40, 48, 120, 50, 48, 50, 57, 41, 10, 108, 111, 99, 97, -108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 106, 115, 111, 110, 95, 115, 116, 114, 105, 110, 103, 95, 108, 105, 116, 101, 114, 97, 108, 40, 118, - 97, 108, 117, 101, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 110, 101, 119, 118, 97, 108, 32, 61, - 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 99, 104, 97, 114, 115, 95, 116, 111, 95, 98, 101, 95, 101, 115, 99, 97, 112, 101, 100, 95, -105, 110, 95, 74, 83, 79, 78, 95, 115, 116, 114, 105, 110, 103, 44, 32, 98, 97, 99, 107, 115, 108, 97, 115, 104, 95, 114, 101, 112, 108, 97, 99, -101, 109, 101, 110, 116, 95, 102, 117, 110, 99, 116, 105, 111, 110, 41, 10, 32, 32, 32, 105, 102, 32, 111, 112, 116, 105, 111, 110, 115, 46, 115, 116, -114, 105, 110, 103, 115, 65, 114, 101, 85, 116, 102, 56, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, - 32, 45, 45, 32, 84, 104, 105, 115, 32, 102, 101, 101, 108, 115, 32, 114, 101, 97, 108, 108, 121, 32, 117, 103, 108, 121, 32, 116, 111, 32, 106, 117, -115, 116, 32, 108, 111, 111, 107, 32, 105, 110, 116, 111, 32, 97, 32, 115, 116, 114, 105, 110, 103, 32, 102, 111, 114, 32, 116, 104, 101, 32, 115, 101, -113, 117, 101, 110, 99, 101, 32, 111, 102, 32, 98, 121, 116, 101, 115, 32, 116, 104, 97, 116, 32, 119, 101, 32, 107, 110, 111, 119, 32, 116, 111, 32, - 98, 101, 32, 97, 32, 112, 97, 114, 116, 105, 99, 117, 108, 97, 114, 32, 117, 116, 102, 56, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, 44, 10, - 32, 32, 32, 32, 32, 32, 45, 45, 32, 98, 117, 116, 32, 117, 116, 102, 56, 32, 119, 97, 115, 32, 100, 101, 115, 105, 103, 110, 101, 100, 32, 112, -117, 114, 112, 111, 115, 101, 102, 117, 108, 108, 121, 32, 116, 111, 32, 109, 97, 107, 101, 32, 116, 104, 105, 115, 32, 107, 105, 110, 100, 32, 111, 102, - 32, 116, 104, 105, 110, 103, 32, 112, 111, 115, 115, 105, 98, 108, 101, 46, 32, 83, 116, 105, 108, 108, 44, 32, 102, 101, 101, 108, 115, 32, 100, 105, -114, 116, 121, 46, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 73, 39, 100, 32, 114, 97, 116, 104, 101, 114, 32, 100, 101, 99, 111, 100, 101, 32, -116, 104, 101, 32, 98, 121, 116, 101, 32, 115, 116, 114, 101, 97, 109, 32, 105, 110, 116, 111, 32, 97, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, - 32, 115, 116, 114, 101, 97, 109, 44, 32, 98, 117, 116, 32, 105, 116, 39, 115, 32, 110, 111, 116, 32, 116, 101, 99, 104, 110, 105, 99, 97, 108, 108, -121, 32, 110, 101, 101, 100, 101, 100, 32, 115, 111, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 110, 111, 116, 32, 116, 101, 99, 104, 110, 105, 99, - 97, 108, 108, 121, 32, 119, 111, 114, 116, 104, 32, 105, 116, 46, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 110, 101, -119, 118, 97, 108, 32, 61, 32, 110, 101, 119, 118, 97, 108, 58, 103, 115, 117, 98, 40, 76, 73, 78, 69, 95, 83, 69, 80, 65, 82, 65, 84, 79, - 82, 95, 97, 115, 95, 117, 116, 102, 56, 44, 32, 39, 92, 92, 117, 50, 48, 50, 56, 39, 41, 58, 103, 115, 117, 98, 40, 80, 65, 82, 65, 71, - 82, 65, 80, 72, 95, 83, 69, 80, 65, 82, 65, 84, 79, 82, 95, 97, 115, 95, 117, 116, 102, 56, 44, 39, 92, 92, 117, 50, 48, 50, 57, 39, - 41, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 39, 34, 39, 32, 46, 46, 32, 110, 101, 119, 118, 97, 108, - 32, 46, 46, 32, 39, 34, 39, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 98, 106, 101, 99, -116, 95, 111, 114, 95, 97, 114, 114, 97, 121, 40, 115, 101, 108, 102, 44, 32, 84, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 45, 45, 10, 32, - 32, 32, 45, 45, 32, 87, 101, 32, 110, 101, 101, 100, 32, 116, 111, 32, 105, 110, 115, 112, 101, 99, 116, 32, 97, 108, 108, 32, 116, 104, 101, 32, -107, 101, 121, 115, 46, 46, 46, 32, 105, 102, 32, 116, 104, 101, 114, 101, 32, 97, 114, 101, 32, 97, 110, 121, 32, 115, 116, 114, 105, 110, 103, 115, - 44, 32, 119, 101, 39, 108, 108, 32, 99, 111, 110, 118, 101, 114, 116, 32, 116, 111, 32, 97, 32, 74, 83, 79, 78, 10, 32, 32, 32, 45, 45, 32, -111, 98, 106, 101, 99, 116, 46, 32, 73, 102, 32, 116, 104, 101, 114, 101, 32, 97, 114, 101, 32, 111, 110, 108, 121, 32, 110, 117, 109, 98, 101, 114, -115, 44, 32, 105, 116, 39, 115, 32, 97, 32, 74, 83, 79, 78, 32, 97, 114, 114, 97, 121, 46, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, - 45, 32, 73, 102, 32, 119, 101, 39, 108, 108, 32, 98, 101, 32, 99, 111, 110, 118, 101, 114, 116, 105, 110, 103, 32, 116, 111, 32, 97, 32, 74, 83, - 79, 78, 32, 111, 98, 106, 101, 99, 116, 44, 32, 119, 101, 39, 108, 108, 32, 119, 97, 110, 116, 32, 116, 111, 32, 115, 111, 114, 116, 32, 116, 104, -101, 32, 107, 101, 121, 115, 32, 115, 111, 32, 116, 104, 97, 116, 32, 116, 104, 101, 10, 32, 32, 32, 45, 45, 32, 101, 110, 100, 32, 114, 101, 115, -117, 108, 116, 32, 105, 115, 32, 100, 101, 116, 101, 114, 109, 105, 110, 105, 115, 116, 105, 99, 46, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 108, -111, 99, 97, 108, 32, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 115, 32, 61, 32, 123, 32, 125, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, -110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 115, 32, 61, 32, 123, 32, 125, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 110, 117, 109, 98, 101, -114, 95, 107, 101, 121, 115, 95, 109, 117, 115, 116, 95, 98, 101, 95, 115, 116, 114, 105, 110, 103, 115, 32, 61, 32, 102, 97, 108, 115, 101, 10, 32, - 32, 32, 108, 111, 99, 97, 108, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 10, 32, 32, 32, 102, 111, -114, 32, 107, 101, 121, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 84, 41, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 116, 121, -112, 101, 40, 107, 101, 121, 41, 32, 61, 61, 32, 39, 115, 116, 114, 105, 110, 103, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 115, 44, 32, 107, 101, 121, 41, - 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 107, 101, 121, 41, 32, 61, 61, 32, 39, 110, 117, 109, 98, -101, 114, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 110, -117, 109, 98, 101, 114, 95, 107, 101, 121, 115, 44, 32, 107, 101, 121, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 107, 101, 121, - 32, 60, 61, 32, 48, 32, 111, 114, 32, 107, 101, 121, 32, 62, 61, 32, 109, 97, 116, 104, 46, 104, 117, 103, 101, 32, 116, 104, 101, 110, 10, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 115, 95, 109, 117, 115, 116, 95, 98, 101, 95, 115, -116, 114, 105, 110, 103, 115, 32, 61, 32, 116, 114, 117, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 110, 111, -116, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 32, 111, 114, 32, 107, 101, 121, 32, 62, 32, 109, 97, -120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 32, 61, 32, 107, 101, 121, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, - 58, 111, 110, 69, 110, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 99, 97, 110, 39, 116, 32, 101, 110, 99, 111, 100, 101, 32, 116, 97, 98, -108, 101, 32, 119, 105, 116, 104, 32, 97, 32, 107, 101, 121, 32, 111, 102, 32, 116, 121, 112, 101, 32, 34, 32, 46, 46, 32, 116, 121, 112, 101, 40, -107, 101, 121, 41, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 105, -102, 32, 35, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 115, 32, 61, 61, 32, 48, 32, 97, 110, 100, 32, 110, 111, 116, 32, 110, 117, 109, 98, -101, 114, 95, 107, 101, 121, 115, 95, 109, 117, 115, 116, 95, 98, 101, 95, 115, 116, 114, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, 32, 32, 32, - 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 65, 110, 32, 101, 109, 112, 116, 121, 32, 116, 97, 98, 108, 101, 44, 32, 111, -114, 32, 97, 32, 110, 117, 109, 101, 114, 105, 99, 45, 111, 110, 108, 121, 32, 97, 114, 114, 97, 121, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, - 32, 32, 32, 32, 32, 32, 105, 102, 32, 35, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, -101, 114, 95, 107, 101, 121, 32, 45, 45, 32, 97, 110, 32, 97, 114, 114, 97, 121, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, -116, 111, 115, 116, 114, 105, 110, 103, 40, 84, 41, 32, 61, 61, 32, 34, 74, 83, 79, 78, 32, 97, 114, 114, 97, 121, 34, 32, 116, 104, 101, 110, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, -102, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 84, 41, 32, 61, 61, 32, 34, 74, 83, 79, 78, 32, 111, 98, 106, 101, 99, 116, 34, 32, 116, -104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 123, 32, 125, 10, 32, 32, 32, 32, 32, 32, 101, 108, -115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 104, 97, 118, 101, 32, 116, 111, 32, 103, 117, 101, 115, 115, 44, 32, 115, 111, - 32, 119, 101, 39, 108, 108, 32, 112, 105, 99, 107, 32, 97, 114, 114, 97, 121, 44, 32, 115, 105, 110, 99, 101, 32, 101, 109, 112, 116, 121, 32, 97, -114, 114, 97, 121, 115, 32, 97, 114, 101, 32, 108, 105, 107, 101, 108, 121, 32, 109, 111, 114, 101, 32, 99, 111, 109, 109, 111, 110, 32, 116, 104, 97, -110, 32, 101, 109, 112, 116, 121, 32, 111, 98, 106, 101, 99, 116, 115, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, -110, 105, 108, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 116, 97, 98, 108, 101, 46, 115, 111, -114, 116, 40, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 115, 41, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 109, 97, 112, 10, 32, 32, 32, -105, 102, 32, 35, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, - 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 73, 102, 32, 119, 101, 39, 114, 101, 32, 104, 101, 114, 101, 32, 116, 104, 101, 110, 32, 119, 101, - 32, 104, 97, 118, 101, 32, 101, 105, 116, 104, 101, 114, 32, 109, 105, 120, 101, 100, 32, 115, 116, 114, 105, 110, 103, 47, 110, 117, 109, 98, 101, 114, - 32, 107, 101, 121, 115, 44, 32, 111, 114, 32, 110, 117, 109, 98, 101, 114, 115, 32, 105, 110, 97, 112, 112, 114, 111, 112, 114, 105, 97, 116, 101, 32, -102, 111, 114, 32, 97, 32, 74, 83, 79, 78, 32, 97, 114, 114, 97, 121, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 73, 116, 39, 115, 32, 110, -111, 116, 32, 105, 100, 101, 97, 108, 44, 32, 98, 117, 116, 32, 119, 101, 39, 108, 108, 32, 116, 117, 114, 110, 32, 116, 104, 101, 32, 110, 117, 109, - 98, 101, 114, 115, 32, 105, 110, 116, 111, 32, 115, 116, 114, 105, 110, 103, 115, 32, 115, 111, 32, 116, 104, 97, 116, 32, 119, 101, 32, 99, 97, 110, - 32, 97, 116, 32, 108, 101, 97, 115, 116, 32, 99, 114, 101, 97, 116, 101, 32, 97, 32, 74, 83, 79, 78, 32, 111, 98, 106, 101, 99, 116, 46, 10, - 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 115, 101, 108, 102, 46, 110, 111, 75, 101, 121, 67, 111, 110, 118, -101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 69, 110, 99, 111, -100, 101, 69, 114, 114, 111, 114, 40, 34, 97, 32, 116, 97, 98, 108, 101, 32, 119, 105, 116, 104, 32, 98, 111, 116, 104, 32, 110, 117, 109, 101, 114, -105, 99, 32, 97, 110, 100, 32, 115, 116, 114, 105, 110, 103, 32, 107, 101, 121, 115, 32, 99, 111, 117, 108, 100, 32, 98, 101, 32, 97, 110, 32, 111, - 98, 106, 101, 99, 116, 32, 111, 114, 32, 97, 114, 114, 97, 121, 59, 32, 97, 98, 111, 114, 116, 105, 110, 103, 34, 44, 32, 101, 116, 99, 41, 10, - 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 72, 97, 118, 101, - 32, 116, 111, 32, 109, 97, 107, 101, 32, 97, 32, 115, 104, 97, 108, 108, 111, 119, 32, 99, 111, 112, 121, 32, 111, 102, 32, 116, 104, 101, 32, 115, -111, 117, 114, 99, 101, 32, 116, 97, 98, 108, 101, 32, 115, 111, 32, 119, 101, 32, 99, 97, 110, 32, 114, 101, 109, 97, 112, 32, 116, 104, 101, 32, -110, 117, 109, 101, 114, 105, 99, 32, 107, 101, 121, 115, 32, 116, 111, 32, 98, 101, 32, 115, 116, 114, 105, 110, 103, 115, 10, 32, 32, 32, 32, 32, - 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 109, 97, 112, 32, 61, 32, 123, 32, 125, 10, 32, 32, 32, 32, 32, 32, 102, 111, 114, 32, 107, 101, -121, 44, 32, 118, 97, 108, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 84, 41, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 109, - 97, 112, 91, 107, 101, 121, 93, 32, 61, 32, 118, 97, 108, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 116, 97, - 98, 108, 101, 46, 115, 111, 114, 116, 40, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 115, 41, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, - 32, 32, 32, 32, 32, 45, 45, 32, 84, 104, 114, 111, 119, 32, 110, 117, 109, 101, 114, 105, 99, 32, 107, 101, 121, 115, 32, 105, 110, 32, 116, 104, -101, 114, 101, 32, 97, 115, 32, 115, 116, 114, 105, 110, 103, 115, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 102, 111, -114, 32, 95, 44, 32, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 110, 117, 109, 98, 101, 114, - 95, 107, 101, 121, 115, 41, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 115, 116, 114, 105, 110, 103, 95, -107, 101, 121, 32, 61, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 41, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 105, 102, 32, 109, 97, 112, 91, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 93, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, -101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 115, 116, 114, 105, -110, 103, 95, 107, 101, 121, 115, 32, 44, 32, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 109, 97, 112, 91, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 93, 32, 61, 32, 84, 91, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, - 93, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, - 58, 111, 110, 69, 110, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 99, 111, 110, 102, 108, 105, 99, 116, 32, 99, 111, 110, 118, 101, 114, 116, -105, 110, 103, 32, 116, 97, 98, 108, 101, 32, 119, 105, 116, 104, 32, 109, 105, 120, 101, 100, 45, 116, 121, 112, 101, 32, 107, 101, 121, 115, 32, 105, -110, 116, 111, 32, 97, 32, 74, 83, 79, 78, 32, 111, 98, 106, 101, 99, 116, 58, 32, 107, 101, 121, 32, 34, 32, 46, 46, 32, 110, 117, 109, 98, -101, 114, 95, 107, 101, 121, 32, 46, 46, 32, 34, 32, 101, 120, 105, 115, 116, 115, 32, 98, 111, 116, 104, 32, 97, 115, 32, 97, 32, 115, 116, 114, -105, 110, 103, 32, 97, 110, 100, 32, 97, 32, 110, 117, 109, 98, 101, 114, 46, 34, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, - 32, 115, 116, 114, 105, 110, 103, 95, 107, 101, 121, 115, 44, 32, 110, 105, 108, 44, 32, 109, 97, 112, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, 101, 32, 45, 45, 32, 109, 117, 115, 116, 32, 112, 114, 101, 100, 101, 99, 108, 97, 114, 101, - 32, 98, 101, 99, 97, 117, 115, 101, 32, 105, 116, 32, 99, 97, 108, 108, 115, 32, 105, 116, 115, 101, 108, 102, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, 101, 40, 115, 101, 108, 102, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 97, 114, 101, -110, 116, 115, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 44, 32, 105, 110, 100, 101, 110, 116, 44, 32, 102, 111, 114, 95, 107, -101, 121, 41, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 107, 101, 121, 115, 32, 105, 110, 32, 97, 32, 74, 83, 79, 78, 32, 111, - 98, 106, 101, 99, 116, 32, 99, 97, 110, 32, 110, 101, 118, 101, 114, 32, 98, 101, 32, 110, 117, 108, 108, 44, 32, 115, 111, 32, 119, 101, 32, 100, -111, 110, 39, 116, 32, 101, 118, 101, 110, 32, 99, 111, 110, 115, 105, 100, 101, 114, 32, 111, 112, 116, 105, 111, 110, 115, 46, 110, 117, 108, 108, 32, -119, 104, 101, 110, 32, 99, 111, 110, 118, 101, 114, 116, 105, 110, 103, 32, 97, 32, 107, 101, 121, 32, 118, 97, 108, 117, 101, 10, 32, 32, 32, 45, - 45, 10, 32, 32, 32, 105, 102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 40, 110, 111, 116, 32, 102, 111, 114, - 95, 107, 101, 121, 32, 97, 110, 100, 32, 111, 112, 116, 105, 111, 110, 115, 32, 97, 110, 100, 32, 111, 112, 116, 105, 111, 110, 115, 46, 110, 117, 108, -108, 32, 97, 110, 100, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 111, 112, 116, 105, 111, 110, 115, 46, 110, 117, 108, 108, 41, 32, 116, 104, 101, -110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 39, 110, 117, 108, 108, 39, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, -116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 39, 115, 116, 114, 105, 110, 103, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, - 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 106, 115, 111, 110, 95, 115, 116, 114, 105, 110, 103, 95, 108, 105, 116, 101, 114, 97, 108, 40, 118, 97, -108, 117, 101, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, -117, 101, 41, 32, 61, 61, 32, 39, 110, 117, 109, 98, 101, 114, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 118, 97, -108, 117, 101, 32, 126, 61, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 78, 97, 78, 32, 40, 78, 111, 116, 32, 97, 32, 78, 117, 109, 98, 101, 114, 41, 46, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 74, 83, 79, 78, 32, 104, 97, 115, 32, 110, 111, 32, 78, 97, 78, 44, 32, 115, 111, 32, 119, 101, - 32, 104, 97, 118, 101, 32, 116, 111, 32, 102, 117, 100, 103, 101, 32, 116, 104, 101, 32, 98, 101, 115, 116, 32, 119, 101, 32, 99, 97, 110, 46, 32, - 84, 104, 105, 115, 32, 115, 104, 111, 117, 108, 100, 32, 114, 101, 97, 108, 108, 121, 32, 98, 101, 32, 97, 32, 112, 97, 99, 107, 97, 103, 101, 32, -111, 112, 116, 105, 111, 110, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, -117, 114, 110, 32, 34, 110, 117, 108, 108, 34, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 118, 97, 108, 117, 101, 32, 62, 61, - 32, 109, 97, 116, 104, 46, 104, 117, 103, 101, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 45, 45, 32, 80, 111, 115, 105, 116, 105, 118, 101, 32, 105, 110, 102, 105, 110, 105, 116, 121, 46, 32, 74, 83, 79, 78, 32, -104, 97, 115, 32, 110, 111, 32, 73, 78, 70, 44, 32, 115, 111, 32, 119, 101, 32, 104, 97, 118, 101, 32, 116, 111, 32, 102, 117, 100, 103, 101, 32, -116, 104, 101, 32, 98, 101, 115, 116, 32, 119, 101, 32, 99, 97, 110, 46, 32, 84, 104, 105, 115, 32, 115, 104, 111, 117, 108, 100, 10, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 45, 45, 32, 114, 101, 97, 108, 108, 121, 32, 98, 101, 32, 97, 32, 112, 97, 99, 107, 97, 103, 101, 32, 111, 112, 116, -105, 111, 110, 46, 32, 78, 111, 116, 101, 58, 32, 97, 116, 32, 108, 101, 97, 115, 116, 32, 119, 105, 116, 104, 32, 115, 111, 109, 101, 32, 105, 109, -112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 115, 44, 32, 112, 111, 115, 105, 116, 105, 118, 101, 32, 105, 110, 102, 105, 110, 105, 116, 121, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 105, 115, 32, 98, 111, 116, 104, 32, 34, 62, 61, 32, 109, 97, 116, 104, 46, 104, 117, -103, 101, 34, 32, 97, 110, 100, 32, 34, 60, 61, 32, 45, 109, 97, 116, 104, 46, 104, 117, 103, 101, 34, 44, 32, 119, 104, 105, 99, 104, 32, 109, - 97, 107, 101, 115, 32, 110, 111, 32, 115, 101, 110, 115, 101, 32, 98, 117, 116, 32, 116, 104, 97, 116, 39, 115, 32, 104, 111, 119, 32, 105, 116, 32, -105, 115, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 78, 101, 103, 97, 116, 105, 118, 101, 32, 105, 110, 102, 105, 110, 105, 116, -121, 32, 105, 115, 32, 112, 114, 111, 112, 101, 114, 108, 121, 32, 34, 60, 61, 32, 45, 109, 97, 116, 104, 46, 104, 117, 103, 101, 34, 46, 32, 83, -111, 44, 32, 119, 101, 32, 109, 117, 115, 116, 32, 98, 101, 32, 115, 117, 114, 101, 32, 116, 111, 32, 99, 104, 101, 99, 107, 32, 116, 104, 101, 32, - 34, 62, 61, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 99, 97, 115, 101, 32, 102, 105, 114, 115, 116, 46, 10, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 49, 101, 43, 57, 57, 57, - 57, 34, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 118, 97, 108, 117, 101, 32, 60, 61, 32, 45, 109, 97, 116, 104, 46, 104, -117, 103, 101, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, - 32, 78, 101, 103, 97, 116, 105, 118, 101, 32, 105, 110, 102, 105, 110, 105, 116, 121, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, - 74, 83, 79, 78, 32, 104, 97, 115, 32, 110, 111, 32, 73, 78, 70, 44, 32, 115, 111, 32, 119, 101, 32, 104, 97, 118, 101, 32, 116, 111, 32, 102, -117, 100, 103, 101, 32, 116, 104, 101, 32, 98, 101, 115, 116, 32, 119, 101, 32, 99, 97, 110, 46, 32, 84, 104, 105, 115, 32, 115, 104, 111, 117, 108, -100, 32, 114, 101, 97, 108, 108, 121, 32, 98, 101, 32, 97, 32, 112, 97, 99, 107, 97, 103, 101, 32, 111, 112, 116, 105, 111, 110, 46, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 45, 49, 101, 43, 57, - 57, 57, 57, 34, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, -116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 108, 115, -101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 39, 98, 111, 111, 108, 101, 97, 110, 39, 32, 116, 104, 101, -110, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 10, 32, - 32, 32, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, -116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 115, 101, 108, 102, 58, 111, 110, 69, 110, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 99, - 97, 110, 39, 116, 32, 99, 111, 110, 118, 101, 114, 116, 32, 34, 32, 46, 46, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 46, 46, - 32, 34, 32, 116, 111, 32, 74, 83, 79, 78, 34, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 103, 101, 116, 109, -101, 116, 97, 116, 97, 98, 108, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 105, 115, 78, 117, 109, 98, 101, 114, 32, 116, 104, 101, 110, - 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 10, 32, 32, - 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 45, 45, 32, 65, 32, 116, 97, 98, 108, 101, 32, -116, 111, 32, 98, 101, 32, 99, 111, 110, 118, 101, 114, 116, 101, 100, 32, 116, 111, 32, 101, 105, 116, 104, 101, 114, 32, 97, 32, 74, 83, 79, 78, - 32, 111, 98, 106, 101, 99, 116, 32, 111, 114, 32, 97, 114, 114, 97, 121, 46, 10, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, - 32, 108, 111, 99, 97, 108, 32, 84, 32, 61, 32, 118, 97, 108, 117, 101, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 111, -112, 116, 105, 111, 110, 115, 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 123, 125, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 105, 102, - 32, 116, 121, 112, 101, 40, 105, 110, 100, 101, 110, 116, 41, 32, 126, 61, 32, 39, 115, 116, 114, 105, 110, 103, 39, 32, 116, 104, 101, 110, 10, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 105, 110, 100, 101, 110, 116, 32, 61, 32, 34, 34, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, - 32, 32, 32, 32, 105, 102, 32, 112, 97, 114, 101, 110, 116, 115, 91, 84, 93, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, -115, 101, 108, 102, 58, 111, 110, 69, 110, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 116, 97, 98, 108, 101, 32, 34, 32, 46, 46, 32, 116, -111, 115, 116, 114, 105, 110, 103, 40, 84, 41, 32, 46, 46, 32, 34, 32, 105, 115, 32, 97, 32, 99, 104, 105, 108, 100, 32, 111, 102, 32, 105, 116, -115, 101, 108, 102, 34, 44, 32, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, -112, 97, 114, 101, 110, 116, 115, 91, 84, 93, 32, 61, 32, 116, 114, 117, 101, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, - 32, 32, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 95, 118, 97, 108, 117, 101, 10, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, - 32, 111, 98, 106, 101, 99, 116, 95, 107, 101, 121, 115, 44, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, - 44, 32, 109, 97, 112, 32, 61, 32, 111, 98, 106, 101, 99, 116, 95, 111, 114, 95, 97, 114, 114, 97, 121, 40, 115, 101, 108, 102, 44, 32, 84, 44, - 32, 101, 116, 99, 41, 10, 32, 32, 32, 32, 32, 32, 105, 102, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, -121, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 65, -110, 32, 97, 114, 114, 97, 121, 46, 46, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, -108, 111, 99, 97, 108, 32, 73, 84, 69, 77, 83, 32, 61, 32, 123, 32, 125, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 102, 111, 114, 32, 105, - 32, 61, 32, 49, 44, 32, 109, 97, 120, 105, 109, 117, 109, 95, 110, 117, 109, 98, 101, 114, 95, 107, 101, 121, 32, 100, 111, 10, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 73, 84, 69, 77, 83, 44, 32, 101, 110, 99, 111, -100, 101, 95, 118, 97, 108, 117, 101, 40, 115, 101, 108, 102, 44, 32, 84, 91, 105, 93, 44, 32, 112, 97, 114, 101, 110, 116, 115, 44, 32, 101, 116, - 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 44, 32, 105, 110, 100, 101, 110, 116, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, -100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 111, 112, 116, 105, 111, 110, 115, 46, 112, 114, 101, 116, 116, 121, 32, 116, 104, 101, -110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 115, 117, 108, 116, 95, 118, 97, 108, 117, 101, 32, 61, 32, 34, 91, 32, - 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 73, 84, 69, 77, 83, 44, 32, 34, 44, 32, 34, 41, 32, 46, - 46, 32, 34, 32, 93, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 114, 101, 115, 117, 108, 116, 95, 118, 97, 108, 117, 101, 32, 61, 32, 34, 91, 34, 32, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 73, 84, 69, 77, 83, 44, 32, 34, 44, 34, 41, 32, 32, 46, 46, 32, 34, 93, 34, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 105, 102, 32, 111, 98, 106, 101, 99, 116, 95, 107, 101, 121, 115, 32, 116, -104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 65, 110, 32, 111, - 98, 106, 101, 99, 116, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, - 32, 84, 84, 32, 61, 32, 109, 97, 112, 32, 111, 114, 32, 84, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 111, 112, 116, 105, 111, -110, 115, 46, 112, 114, 101, 116, 116, 121, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, - 32, 75, 69, 89, 83, 32, 61, 32, 123, 32, 125, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 109, 97, -120, 95, 107, 101, 121, 95, 108, 101, 110, 103, 116, 104, 32, 61, 32, 48, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 102, 111, 114, - 32, 95, 44, 32, 107, 101, 121, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, 98, 106, 101, 99, 116, 95, 107, 101, 121, 115, 41, 32, 100, -111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 101, 110, 99, 111, 100, 101, 100, 32, 61, - 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, 101, 40, 115, 101, 108, 102, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 107, 101, 121, - 41, 44, 32, 112, 97, 114, 101, 110, 116, 115, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 44, 32, 105, 110, 100, 101, 110, 116, - 44, 32, 116, 114, 117, 101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 105, 102, 32, 111, 112, 116, 105, 111, 110, -115, 46, 97, 108, 105, 103, 110, 95, 107, 101, 121, 115, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 109, 97, 120, 95, 107, 101, 121, 95, 108, 101, 110, 103, 116, 104, 32, 61, 32, 109, 97, 116, 104, 46, 109, 97, 120, 40, 109, 97, -120, 95, 107, 101, 121, 95, 108, 101, 110, 103, 116, 104, 44, 32, 35, 101, 110, 99, 111, 100, 101, 100, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 75, 69, 89, 83, 44, 32, 101, 110, 99, 111, 100, 101, 100, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 107, 101, 121, 95, 105, 110, 100, 101, -110, 116, 32, 61, 32, 105, 110, 100, 101, 110, 116, 32, 46, 46, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 111, 112, 116, 105, 111, 110, 115, 46, -105, 110, 100, 101, 110, 116, 32, 111, 114, 32, 34, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, -115, 117, 98, 116, 97, 98, 108, 101, 95, 105, 110, 100, 101, 110, 116, 32, 61, 32, 107, 101, 121, 95, 105, 110, 100, 101, 110, 116, 32, 46, 46, 32, -115, 116, 114, 105, 110, 103, 46, 114, 101, 112, 40, 34, 32, 34, 44, 32, 109, 97, 120, 95, 107, 101, 121, 95, 108, 101, 110, 103, 116, 104, 41, 32, - 46, 46, 32, 40, 111, 112, 116, 105, 111, 110, 115, 46, 97, 108, 105, 103, 110, 95, 107, 101, 121, 115, 32, 97, 110, 100, 32, 34, 32, 32, 34, 32, -111, 114, 32, 34, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 70, 79, 82, 77, 65, 84, 32, - 61, 32, 34, 37, 115, 37, 34, 32, 46, 46, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 100, 34, 44, 32, 109, - 97, 120, 95, 107, 101, 121, 95, 108, 101, 110, 103, 116, 104, 41, 32, 46, 46, 32, 34, 115, 58, 32, 37, 115, 34, 10, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 67, 79, 77, 66, 73, 78, 69, 68, 95, 80, 65, 82, 84, 83, 32, 61, 32, 123, 32, 125, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 102, 111, 114, 32, 105, 44, 32, 107, 101, 121, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 111, 98, 106, 101, 99, 116, 95, 107, 101, 121, 115, 41, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 108, 111, 99, 97, 108, 32, 101, 110, 99, 111, 100, 101, 100, 95, 118, 97, 108, 32, 61, 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, -101, 40, 115, 101, 108, 102, 44, 32, 84, 84, 91, 107, 101, 121, 93, 44, 32, 112, 97, 114, 101, 110, 116, 115, 44, 32, 101, 116, 99, 44, 32, 111, -112, 116, 105, 111, 110, 115, 44, 32, 115, 117, 98, 116, 97, 98, 108, 101, 95, 105, 110, 100, 101, 110, 116, 41, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 67, 79, 77, 66, 73, 78, 69, 68, 95, 80, 65, - 82, 84, 83, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 70, 79, 82, 77, 65, 84, 44, 32, 107, 101, 121, 95, 105, -110, 100, 101, 110, 116, 44, 32, 75, 69, 89, 83, 91, 105, 93, 44, 32, 101, 110, 99, 111, 100, 101, 100, 95, 118, 97, 108, 41, 41, 10, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 115, 117, 108, 116, - 95, 118, 97, 108, 117, 101, 32, 61, 32, 34, 123, 92, 110, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 67, - 79, 77, 66, 73, 78, 69, 68, 95, 80, 65, 82, 84, 83, 44, 32, 34, 44, 92, 110, 34, 41, 32, 46, 46, 32, 34, 92, 110, 34, 32, 46, 46, - 32, 105, 110, 100, 101, 110, 116, 32, 46, 46, 32, 34, 125, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, 32, 80, 65, 82, 84, 83, 32, 61, 32, 123, 32, 125, 10, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 102, 111, 114, 32, 95, 44, 32, 107, 101, 121, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, 98, 106, 101, - 99, 116, 95, 107, 101, 121, 115, 41, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 111, 99, 97, 108, - 32, 101, 110, 99, 111, 100, 101, 100, 95, 118, 97, 108, 32, 61, 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, 101, 40, 115, 101, 108, 102, - 44, 32, 84, 84, 91, 107, 101, 121, 93, 44, 32, 32, 32, 32, 32, 32, 32, 112, 97, 114, 101, 110, 116, 115, 44, 32, 101, 116, 99, 44, 32, 111, -112, 116, 105, 111, 110, 115, 44, 32, 105, 110, 100, 101, 110, 116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, -111, 99, 97, 108, 32, 101, 110, 99, 111, 100, 101, 100, 95, 107, 101, 121, 32, 61, 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, 101, 40, -115, 101, 108, 102, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 107, 101, 121, 41, 44, 32, 112, 97, 114, 101, 110, 116, 115, 44, 32, 101, 116, - 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 44, 32, 105, 110, 100, 101, 110, 116, 44, 32, 116, 114, 117, 101, 41, 10, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 80, 65, 82, 84, 83, 44, 32, 115, 116, 114, -105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 115, 58, 37, 115, 34, 44, 32, 101, 110, 99, 111, 100, 101, 100, 95, 107, 101, 121, 44, - 32, 101, 110, 99, 111, 100, 101, 100, 95, 118, 97, 108, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 101, 115, 117, 108, 116, 95, 118, 97, 108, 117, 101, 32, 61, 32, 34, 123, 34, 32, 46, 46, - 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 80, 65, 82, 84, 83, 44, 32, 34, 44, 34, 41, 32, 46, 46, 32, 34, 125, 34, - 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 65, 110, 32, 101, 109, 112, 116, 121, 32, 97, 114, 114, 97, 121, 47, -111, 98, 106, 101, 99, 116, 46, 46, 46, 32, 119, 101, 39, 108, 108, 32, 116, 114, 101, 97, 116, 32, 105, 116, 32, 97, 115, 32, 97, 110, 32, 97, -114, 114, 97, 121, 44, 32, 116, 104, 111, 117, 103, 104, 32, 105, 116, 32, 115, 104, 111, 117, 108, 100, 32, 114, 101, 97, 108, 108, 121, 32, 98, 101, - 32, 97, 110, 32, 111, 112, 116, 105, 111, 110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, -114, 101, 115, 117, 108, 116, 95, 118, 97, 108, 117, 101, 32, 61, 32, 34, 91, 93, 34, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, - 32, 32, 32, 32, 112, 97, 114, 101, 110, 116, 115, 91, 84, 93, 32, 61, 32, 102, 97, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, -117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 95, 118, 97, 108, 117, 101, 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, -108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 111, 112, 95, 108, 101, 118, 101, 108, 95, 101, 110, 99, 111, 100, 101, 40, 115, 101, 108, 102, - 44, 32, 118, 97, 108, 117, 101, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, -118, 97, 108, 32, 61, 32, 101, 110, 99, 111, 100, 101, 95, 118, 97, 108, 117, 101, 40, 115, 101, 108, 102, 44, 32, 118, 97, 108, 117, 101, 44, 32, -123, 125, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 105, 102, 32, 118, 97, 108, 32, 61, 61, 32, 110, -105, 108, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 45, 45, 80, 82, 73, 86, 65, 84, 69, 40, 34, 109, 97, 121, 32, 110, 101, 101, -100, 32, 116, 111, 32, 114, 101, 118, 101, 114, 116, 32, 116, 111, 32, 116, 104, 101, 32, 112, 114, 101, 118, 105, 111, 117, 115, 32, 112, 117, 98, 108, -105, 99, 32, 118, 101, 114, 105, 115, 111, 110, 32, 105, 102, 32, 73, 32, 99, 97, 110, 39, 116, 32, 102, 105, 103, 117, 114, 101, 32, 111, 117, 116, - 32, 119, 104, 97, 116, 32, 116, 104, 101, 32, 103, 117, 121, 32, 119, 97, 110, 116, 101, 100, 34, 41, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, -117, 114, 110, 32, 118, 97, 108, 10, 32, 32, 32, 101, 108, 115, 101, 10, 32, 32, 32, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, - 10, 32, 32, 32, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 101, 110, 99, 111, -100, 101, 40, 118, 97, 108, 117, 101, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 105, 102, 32, 116, 121, -112, 101, 40, 115, 101, 108, 102, 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 111, 114, 32, 115, 101, 108, 102, 46, 95, 95, 105, 110, -100, 101, 120, 32, 126, 61, 32, 79, 66, 74, 68, 69, 70, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 79, 66, 74, 68, 69, 70, 58, -111, 110, 69, 110, 99, 111, 100, 101, 69, 114, 114, 111, 114, 40, 34, 74, 83, 79, 78, 58, 101, 110, 99, 111, 100, 101, 32, 109, 117, 115, 116, 32, - 98, 101, 32, 99, 97, 108, 108, 101, 100, 32, 105, 110, 32, 109, 101, 116, 104, 111, 100, 32, 102, 111, 114, 109, 97, 116, 34, 44, 32, 101, 116, 99, - 41, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 73, 102, 32, 116, 104, 101, 32, 117, 115, 101, 114, - 32, 100, 105, 100, 110, 39, 116, 32, 112, 97, 115, 115, 32, 105, 110, 32, 97, 32, 116, 97, 98, 108, 101, 32, 111, 102, 32, 100, 101, 99, 111, 100, -101, 32, 111, 112, 116, 105, 111, 110, 115, 44, 32, 109, 97, 107, 101, 32, 97, 110, 32, 101, 109, 112, 116, 121, 32, 111, 110, 101, 46, 10, 32, 32, - 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 111, 112, 116, 105, 111, 110, 115, 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, -101, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 123, 125, 10, 32, 32, 32, 101, 110, -100, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 116, 111, 112, 95, 108, 101, 118, 101, 108, 95, 101, 110, 99, 111, 100, 101, 40, 115, 101, 108, -102, 44, 32, 118, 97, 108, 117, 101, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 79, 66, 74, 68, 69, 70, 58, 101, 110, 99, 111, 100, 101, 95, 112, 114, 101, 116, 116, 121, 40, 118, 97, 108, 117, 101, 44, - 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 115, 101, 108, 102, 41, 32, -126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 111, 114, 32, 115, 101, 108, 102, 46, 95, 95, 105, 110, 100, 101, 120, 32, 126, 61, 32, 79, 66, - 74, 68, 69, 70, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 79, 66, 74, 68, 69, 70, 58, 111, 110, 69, 110, 99, 111, 100, 101, 69, -114, 114, 111, 114, 40, 34, 74, 83, 79, 78, 58, 101, 110, 99, 111, 100, 101, 95, 112, 114, 101, 116, 116, 121, 32, 109, 117, 115, 116, 32, 98, 101, - 32, 99, 97, 108, 108, 101, 100, 32, 105, 110, 32, 109, 101, 116, 104, 111, 100, 32, 102, 111, 114, 109, 97, 116, 34, 44, 32, 101, 116, 99, 41, 10, - 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 45, 45, 32, 73, 102, 32, 116, 104, 101, 32, 117, 115, 101, 114, 32, 100, -105, 100, 110, 39, 116, 32, 112, 97, 115, 115, 32, 105, 110, 32, 97, 32, 116, 97, 98, 108, 101, 32, 111, 102, 32, 100, 101, 99, 111, 100, 101, 32, -111, 112, 116, 105, 111, 110, 115, 44, 32, 117, 115, 101, 32, 116, 104, 101, 32, 100, 101, 102, 97, 117, 108, 116, 32, 112, 114, 101, 116, 116, 121, 32, -111, 110, 101, 115, 10, 32, 32, 32, 45, 45, 10, 32, 32, 32, 105, 102, 32, 116, 121, 112, 101, 40, 111, 112, 116, 105, 111, 110, 115, 41, 32, 126, - 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 100, -101, 102, 97, 117, 108, 116, 95, 112, 114, 101, 116, 116, 121, 95, 111, 112, 116, 105, 111, 110, 115, 10, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, -114, 101, 116, 117, 114, 110, 32, 116, 111, 112, 95, 108, 101, 118, 101, 108, 95, 101, 110, 99, 111, 100, 101, 40, 115, 101, 108, 102, 44, 32, 118, 97, -108, 117, 101, 44, 32, 101, 116, 99, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 79, 66, 74, 68, 69, 70, 46, 95, 95, 116, 111, 115, 116, 114, 105, 110, 103, 40, 41, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 34, 74, - 83, 79, 78, 32, 101, 110, 99, 111, 100, 101, 47, 100, 101, 99, 111, 100, 101, 32, 112, 97, 99, 107, 97, 103, 101, 34, 10, 101, 110, 100, 10, 79, - 66, 74, 68, 69, 70, 46, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 79, 66, 74, 68, 69, 70, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 79, 66, 74, 68, 69, 70, 58, 110, 101, 119, 40, 97, 114, 103, 115, 41, 10, 32, 32, 32, 108, 111, 99, 97, 108, 32, 110, 101, 119, 32, 61, 32, -123, 32, 125, 10, 32, 32, 32, 105, 102, 32, 97, 114, 103, 115, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, 32, 32, 102, 111, 114, 32, 107, 101, -121, 44, 32, 118, 97, 108, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 97, 114, 103, 115, 41, 32, 100, 111, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 110, 101, 119, 91, 107, 101, 121, 93, 32, 61, 32, 118, 97, 108, 10, 32, 32, 32, 32, 32, 32, 101, 110, 100, 10, 32, 32, 32, 101, 110, -100, 10, 32, 32, 32, 114, 101, 116, 117, 114, 110, 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 110, 101, 119, 44, 32, 79, 66, - 74, 68, 69, 70, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 79, 66, 74, 68, 69, 70, 58, 110, 101, 119, 40, 41, 10, }; - -// src/base/jsonwrapper.lua -static const unsigned char builtin_script_13[] = { -106, 115, 111, 110, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 32, 61, - 32, 100, 111, 102, 105, 108, 101, 40, 39, 106, 115, 111, 110, 46, 108, 117, 97, 39, 41, 10, 108, 111, 99, 97, 108, 32, 101, 114, 114, 10, 106, 115, -111, 110, 46, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 32, 61, 32, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, -111, 110, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 46, 97, 115, 115, 101, 114, -116, 40, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 109, 101, 115, 115, 97, 103, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 101, 114, 114, 32, 61, 32, 109, 101, 115, 115, 97, 103, 101, 10, 101, 110, 100, 10, 97, 115, -115, 101, 114, 116, 40, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 109, 101, 115, 115, 97, 103, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 106, 115, 111, 110, 46, 101, 110, 99, 111, 100, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 114, 114, 32, 61, 32, 110, -105, 108, 10, 108, 111, 99, 97, 108, 32, 115, 117, 99, 99, 101, 115, 115, 44, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 99, 97, 108, 108, - 40, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 46, 101, 110, 99, 111, 100, 101, 44, 32, 105, 109, 112, 108, 101, 109, 101, 110, -116, 97, 116, 105, 111, 110, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 117, 99, 99, 101, 115, 115, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, -115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 106, 115, 111, 110, 46, 101, 110, 99, 111, 100, 101, 95, 112, 114, -101, 116, 116, 121, 40, 118, 97, 108, 117, 101, 41, 10, 101, 114, 114, 32, 61, 32, 110, 105, 108, 10, 108, 111, 99, 97, 108, 32, 115, 117, 99, 99, -101, 115, 115, 44, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 99, 97, 108, 108, 40, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, -111, 110, 46, 101, 110, 99, 111, 100, 101, 95, 112, 114, 101, 116, 116, 121, 44, 32, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, - 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 117, 99, 99, 101, 115, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 106, 115, 111, 110, 46, 100, 101, 99, 111, 100, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, -114, 114, 32, 61, 32, 110, 105, 108, 10, 108, 111, 99, 97, 108, 32, 115, 117, 99, 99, 101, 115, 115, 44, 32, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 112, 99, 97, 108, 108, 40, 105, 109, 112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 46, 100, 101, 99, 111, 100, 101, 44, 32, 105, 109, -112, 108, 101, 109, 101, 110, 116, 97, 116, 105, 111, 110, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 117, 99, 99, -101, 115, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 114, 101, 116, -117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, }; - -// src/base/languages.lua -static const unsigned char builtin_script_14[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, -123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, 118, 97, 108, 117, -101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 34, 67, 34, 59, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, -116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 34, 67, 43, 43, 34, 59, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 115, 104, 97, 114, 112, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, -116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 34, 67, 35, 34, 59, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, 116, -117, 114, 110, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 34, 70, 35, 34, 59, 10, 101, 110, 100, 10, }; - -// src/base/term.lua -static const unsigned char builtin_script_15[] = { -116, 101, 114, 109, 46, 98, 108, 97, 99, 107, 32, 32, 32, 32, 32, 32, 32, 61, 32, 48, 10, 116, 101, 114, 109, 46, 98, 108, 117, 101, 32, 32, - 32, 32, 32, 32, 32, 32, 61, 32, 49, 10, 116, 101, 114, 109, 46, 103, 114, 101, 101, 110, 32, 32, 32, 32, 32, 32, 32, 61, 32, 50, 10, 116, -101, 114, 109, 46, 99, 121, 97, 110, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 51, 10, 116, 101, 114, 109, 46, 114, 101, 100, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 61, 32, 52, 10, 116, 101, 114, 109, 46, 112, 117, 114, 112, 108, 101, 32, 32, 32, 32, 32, 32, 61, 32, 53, 10, 116, 101, -114, 109, 46, 98, 114, 111, 119, 110, 32, 32, 32, 32, 32, 32, 32, 61, 32, 54, 10, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 97, -121, 32, 32, 32, 61, 32, 55, 10, 116, 101, 114, 109, 46, 103, 114, 97, 121, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 56, 10, 116, 101, 114, -109, 46, 108, 105, 103, 104, 116, 66, 108, 117, 101, 32, 32, 32, 61, 32, 57, 10, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 101, 101, -110, 32, 32, 61, 32, 49, 48, 10, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 67, 121, 97, 110, 32, 32, 32, 61, 32, 49, 49, 10, 116, 101, -114, 109, 46, 108, 105, 103, 104, 116, 82, 101, 100, 32, 32, 32, 32, 61, 32, 49, 50, 10, 116, 101, 114, 109, 46, 109, 97, 103, 101, 110, 116, 97, - 32, 32, 32, 32, 32, 61, 32, 49, 51, 10, 116, 101, 114, 109, 46, 121, 101, 108, 108, 111, 119, 32, 32, 32, 32, 32, 32, 61, 32, 49, 52, 10, -116, 101, 114, 109, 46, 119, 104, 105, 116, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 49, 53, 10, 116, 101, 114, 109, 46, 119, 97, 114, 110, 105, -110, 103, 67, 111, 108, 111, 114, 32, 61, 32, 116, 101, 114, 109, 46, 109, 97, 103, 101, 110, 116, 97, 10, 116, 101, 114, 109, 46, 101, 114, 114, 111, -114, 67, 111, 108, 111, 114, 32, 32, 32, 61, 32, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 82, 101, 100, 10, 116, 101, 114, 109, 46, 105, 110, -102, 111, 67, 111, 108, 111, 114, 32, 32, 32, 32, 61, 32, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 67, 121, 97, 110, 10, 116, 101, 114, 109, - 46, 95, 99, 111, 108, 111, 114, 83, 116, 97, 99, 107, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 101, 114, 109, 46, -112, 117, 115, 104, 67, 111, 108, 111, 114, 40, 99, 111, 108, 111, 114, 41, 10, 108, 111, 99, 97, 108, 32, 111, 108, 100, 32, 61, 32, 116, 101, 114, -109, 46, 103, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 40, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 101, -114, 109, 46, 95, 99, 111, 108, 111, 114, 83, 116, 97, 99, 107, 44, 32, 111, 108, 100, 41, 10, 116, 101, 114, 109, 46, 115, 101, 116, 84, 101, 120, -116, 67, 111, 108, 111, 114, 40, 99, 111, 108, 111, 114, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 101, 114, 109, 46, -112, 111, 112, 67, 111, 108, 111, 114, 40, 41, 10, 105, 102, 32, 35, 116, 101, 114, 109, 46, 95, 99, 111, 108, 111, 114, 83, 116, 97, 99, 107, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 111, 108, 111, 114, 32, 61, 32, 116, 97, 98, 108, 101, 46, 114, 101, 109, -111, 118, 101, 40, 116, 101, 114, 109, 46, 95, 99, 111, 108, 111, 114, 83, 116, 97, 99, 107, 41, 10, 116, 101, 114, 109, 46, 115, 101, 116, 84, 101, -120, 116, 67, 111, 108, 111, 114, 40, 99, 111, 108, 111, 114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// src/base/field.lua -static const unsigned char builtin_script_16[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 102, 105, 101, 108, 100, 32, 61, 32, 123, 125, 10, 108, -111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 10, 102, 105, 101, 108, 100, 46, 95, 108, 105, 115, 116, - 32, 61, 32, 123, 125, 10, 102, 105, 101, 108, 100, 46, 95, 108, 111, 119, 101, 114, 101, 100, 76, 105, 115, 116, 32, 61, 32, 123, 125, 10, 102, 105, -101, 108, 100, 46, 95, 115, 111, 114, 116, 101, 100, 76, 105, 115, 116, 32, 61, 32, 110, 105, 108, 10, 102, 105, 101, 108, 100, 46, 95, 107, 105, 110, -100, 115, 32, 61, 32, 123, 125, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 115, 32, 61, 32, 102, 105, 101, 108, 100, 46, 95, -108, 105, 115, 116, 10, 102, 105, 101, 108, 100, 46, 95, 97, 99, 99, 101, 115, 115, 111, 114, 115, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 110, 101, 119, 40, 102, 41, 10, 105, 102, 32, 102, 46, 107, 105, 110, 100, 58, 115, 116, 97, 114, 116, -115, 119, 105, 116, 104, 40, 34, 107, 101, 121, 45, 34, 41, 32, 116, 104, 101, 110, 10, 102, 46, 107, 105, 110, 100, 32, 61, 32, 102, 46, 107, 105, -110, 100, 58, 115, 117, 98, 40, 53, 41, 10, 102, 46, 107, 101, 121, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, -102, 46, 107, 105, 110, 100, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 45, 108, 105, 115, 116, 34, 41, 32, 116, 104, 101, 110, 10, 102, 46, -107, 105, 110, 100, 32, 61, 32, 102, 46, 107, 105, 110, 100, 58, 115, 117, 98, 40, 49, 44, 32, 45, 54, 41, 10, 102, 46, 108, 105, 115, 116, 32, - 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 61, 32, 102, 46, 107, 105, 110, 100, 10, 105, -102, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 111, 98, 106, 101, 99, 116, 34, 32, 111, 114, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 97, -114, 114, 97, 121, 34, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 116, 97, 98, 108, 101, 34, 10, 101, 110, 100, 10, 105, 102, - 32, 102, 46, 108, 105, 115, 116, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 34, 32, 46, 46, 32, 107, -105, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 102, 46, 107, 101, 121, 101, 100, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, -107, 101, 121, 101, 100, 58, 34, 32, 46, 46, 32, 107, 105, 110, 100, 10, 101, 110, 100, 10, 102, 46, 95, 107, 105, 110, 100, 32, 61, 32, 107, 105, -110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 46, 115, 99, 111, 112, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, -104, 101, 110, 10, 102, 46, 115, 99, 111, 112, 101, 115, 32, 61, 32, 102, 46, 115, 99, 111, 112, 101, 10, 101, 108, 115, 101, 10, 102, 46, 115, 99, -111, 112, 101, 115, 32, 61, 32, 123, 32, 102, 46, 115, 99, 111, 112, 101, 32, 125, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, -101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 34, 115, 116, 111, 114, 101, 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 105, 110, 118, 97, 108, 105, 100, 32, 102, 105, 101, 108, 100, 32, 107, 105, 110, 100, 32, 39, 34, - 32, 46, 46, 32, 102, 46, 95, 107, 105, 110, 100, 32, 46, 46, 32, 34, 39, 34, 10, 101, 110, 100, 10, 102, 105, 101, 108, 100, 46, 95, 108, 105, -115, 116, 91, 102, 46, 110, 97, 109, 101, 93, 32, 61, 32, 102, 10, 102, 105, 101, 108, 100, 46, 95, 108, 111, 119, 101, 114, 101, 100, 76, 105, 115, -116, 91, 102, 46, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 102, 10, 102, 105, 101, 108, 100, 46, 95, 115, 111, 114, -116, 101, 100, 76, 105, 115, 116, 32, 61, 32, 110, 105, 108, 10, 114, 101, 116, 117, 114, 110, 32, 102, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 117, 110, 114, 101, 103, 105, 115, 116, 101, 114, 40, 102, 41, 10, 102, 105, 101, 108, 100, 46, 95, 108, -105, 115, 116, 91, 102, 46, 110, 97, 109, 101, 93, 32, 61, 32, 110, 105, 108, 10, 102, 105, 101, 108, 100, 46, 95, 108, 111, 119, 101, 114, 101, 100, - 76, 105, 115, 116, 91, 102, 46, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 110, 105, 108, 10, 102, 105, 101, 108, 100, - 46, 95, 115, 111, 114, 116, 101, 100, 76, 105, 115, 116, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -102, 105, 101, 108, 100, 46, 101, 97, 99, 104, 40, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 100, 101, 120, 10, 114, 101, 116, 117, 114, 110, 32, -102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 105, 110, 100, 101, 120, 32, 61, 32, 110, 101, 120, 116, 40, 102, 105, 101, 108, 100, 46, 95, -108, 105, 115, 116, 44, 32, 105, 110, 100, 101, 120, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 101, 108, 100, 46, 95, 108, 105, 115, 116, 91, -105, 110, 100, 101, 120, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 101, 97, - 99, 104, 79, 114, 100, 101, 114, 101, 100, 40, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, 46, 95, 115, 111, 114, 116, 101, 100, - 76, 105, 115, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, 121, -115, 40, 102, 105, 101, 108, 100, 46, 95, 108, 105, 115, 116, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 107, 101, 121, 115, 41, 10, -102, 105, 101, 108, 100, 46, 95, 115, 111, 114, 116, 101, 100, 76, 105, 115, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, - 44, 32, 35, 107, 101, 121, 115, 32, 100, 111, 10, 102, 105, 101, 108, 100, 46, 95, 115, 111, 114, 116, 101, 100, 76, 105, 115, 116, 91, 105, 93, 32, - 61, 32, 102, 105, 101, 108, 100, 46, 95, 108, 105, 115, 116, 91, 107, 101, 121, 115, 91, 105, 93, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 105, 32, - 61, 32, 105, 32, 43, 32, 49, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 101, 108, 100, 46, 95, 115, 111, 114, 116, 101, 100, 76, 105, 115, 116, - 91, 105, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, -116, 97, 103, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 105, 102, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, -102, 105, 101, 108, 100, 46, 95, 107, 105, 110, 100, 115, 91, 116, 97, 103, 93, 32, 61, 32, 115, 101, 116, 116, 105, 110, 103, 115, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 101, 108, 100, 46, 95, 107, 105, 110, 100, 115, 91, 116, 97, 103, 93, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 109, 101, 116, 104, 111, 100, 41, - 10, 102, 105, 101, 108, 100, 46, 95, 97, 99, 99, 101, 115, 115, 111, 114, 115, 91, 109, 101, 116, 104, 111, 100, 93, 32, 61, 32, 102, 105, 101, 108, -100, 46, 95, 97, 99, 99, 101, 115, 115, 111, 114, 115, 91, 109, 101, 116, 104, 111, 100, 93, 32, 111, 114, 32, 123, 125, 10, 108, 111, 99, 97, 108, - 32, 99, 97, 99, 104, 101, 32, 61, 32, 102, 105, 101, 108, 100, 46, 95, 97, 99, 99, 101, 115, 115, 111, 114, 115, 91, 109, 101, 116, 104, 111, 100, - 93, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 99, 99, 101, 115, 115, 111, 114, 70, 111, 114, 75, 105, 110, 100, - 40, 107, 105, 110, 100, 41, 10, 105, 102, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 110, 105, 108, 10, 101, 110, 100, 10, 105, 102, 32, 99, 97, 99, 104, 101, 91, 107, 105, 110, 100, 93, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 99, 97, 99, 104, 101, 91, 107, 105, 110, 100, 93, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 104, 105, 115, 75, 105, -110, 100, 32, 61, 32, 107, 105, 110, 100, 58, 109, 97, 116, 99, 104, 40, 39, 40, 46, 45, 41, 58, 39, 41, 32, 111, 114, 32, 107, 105, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 110, 101, 120, 116, 75, 105, 110, 100, 32, 61, 32, 107, 105, 110, 100, 58, 115, 117, 98, 40, 35, 116, 104, 105, 115, - 75, 105, 110, 100, 32, 43, 32, 50, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 115, 32, 61, 32, 102, 105, 101, 108, -100, 46, 95, 107, 105, 110, 100, 115, 91, 116, 104, 105, 115, 75, 105, 110, 100, 93, 10, 105, 102, 32, 110, 111, 116, 32, 102, 117, 110, 99, 116, 105, -111, 110, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 73, 110, 118, 97, 108, 105, 100, 32, 102, 105, -101, 108, 100, 32, 107, 105, 110, 100, 32, 39, 34, 32, 46, 46, 32, 116, 104, 105, 115, 75, 105, 110, 100, 32, 46, 46, 32, 34, 39, 34, 10, 101, -110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 115, 91, 109, -101, 116, 104, 111, 100, 93, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 110, 101, 120, 116, 65, 99, 99, 101, 115, 115, 111, 114, 32, 61, - 32, 97, 99, 99, 101, 115, 115, 111, 114, 70, 111, 114, 75, 105, 110, 100, 40, 110, 101, 120, 116, 75, 105, 110, 100, 41, 10, 97, 99, 99, 101, 115, -115, 111, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, - 97, 108, 117, 101, 44, 32, 110, 101, 120, 116, 65, 99, 99, 101, 115, 115, 111, 114, 41, 10, 101, 110, 100, 10, 99, 97, 99, 104, 101, 91, 107, 105, -110, 100, 93, 32, 61, 32, 97, 99, 99, 101, 115, 115, 111, 114, 10, 114, 101, 116, 117, 114, 110, 32, 97, 99, 99, 101, 115, 115, 111, 114, 10, 101, -110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 97, 99, 99, 101, 115, 115, 111, 114, 70, 111, 114, 75, 105, 110, 100, 40, 102, 46, 95, 107, 105, 110, -100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 99, 111, 109, 112, 97, 114, 101, 40, 102, 44, - 32, 97, 44, 32, 98, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, - 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 34, 99, 111, 109, 112, 97, 114, 101, 34, 41, 10, 105, 102, 32, 112, 114, 111, 99, 101, 115, 115, -111, 114, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 97, 44, 32, 98, - 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, -105, 101, 108, 100, 46, 95, 108, 105, 115, 116, 91, 110, 97, 109, 101, 93, 32, 111, 114, 32, 102, 105, 101, 108, 100, 46, 95, 108, 111, 119, 101, 114, -101, 100, 76, 105, 115, 116, 91, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 102, 105, 101, 108, 100, 46, 109, 101, 114, 103, 101, 40, 102, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 41, - 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, -114, 40, 102, 44, 32, 34, 109, 101, 114, 103, 101, 34, 41, 10, 105, 102, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, -117, 101, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 109, 101, 114, 103, 101, 115, 40, 102, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 102, -105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 34, 109, 101, 114, 103, 101, 34, 41, 32, 126, 61, 32, 110, 105, 108, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 112, 114, 111, 112, 101, 114, 116, 121, 40, 102, 44, - 32, 116, 97, 103, 41, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 115, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 101, 120, 112, 108, 111, -100, 101, 40, 102, 46, 95, 107, 105, 110, 100, 44, 32, 34, 58, 34, 44, 32, 116, 114, 117, 101, 41, 10, 102, 111, 114, 32, 105, 44, 32, 107, 105, -110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, -117, 101, 32, 61, 32, 102, 105, 101, 108, 100, 46, 95, 107, 105, 110, 100, 115, 91, 107, 105, 110, 100, 93, 91, 116, 97, 103, 93, 10, 105, 102, 32, -118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, -110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 111, 118, 101, 114, 114, 105, -100, 101, 40, 102, 105, 101, 108, 100, 78, 97, 109, 101, 44, 32, 97, 99, 99, 101, 115, 115, 111, 114, 78, 97, 109, 101, 44, 32, 102, 117, 110, 99, - 41, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 61, 32, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 102, 105, 101, 108, 100, 78, - 97, 109, 101, 41, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 107, 105, 110, 100, 44, 32, 97, 99, 99, 101, 115, 115, 111, 114, 78, 97, -109, 101, 44, 32, 102, 117, 110, 99, 41, 10, 102, 105, 101, 108, 100, 46, 95, 97, 99, 99, 101, 115, 115, 111, 114, 115, 32, 61, 32, 123, 125, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 114, 101, 109, 111, 118, 101, 40, 102, 44, 32, 99, 117, 114, -114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 61, 32, 102, -105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 34, 114, 101, 109, 111, 118, 101, 34, 41, 10, 105, 102, 32, 112, 114, -111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 44, - 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, -117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 114, 101, 109, 111, 118, 101, -115, 40, 102, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 34, -109, 101, 114, 103, 101, 34, 41, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, -114, 40, 102, 44, 32, 34, 114, 101, 109, 111, 118, 101, 34, 41, 32, 126, 61, 32, 110, 105, 108, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 115, 116, 111, 114, 101, 40, 102, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, -101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, -115, 111, 114, 40, 102, 44, 32, 34, 115, 116, 111, 114, 101, 34, 41, 10, 105, 102, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, - 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 44, 32, 118, 97, 108, 117, -101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, -115, 111, 114, 40, 102, 44, 32, 34, 116, 114, 97, 110, 115, 108, 97, 116, 101, 34, 41, 10, 105, 102, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 118, 97, 108, 117, 101, 44, - 32, 110, 105, 108, 41, 91, 49, 93, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 115, 40, 102, 41, 10, -114, 101, 116, 117, 114, 110, 32, 40, 102, 105, 101, 108, 100, 46, 97, 99, 99, 101, 115, 115, 111, 114, 40, 102, 44, 32, 34, 116, 114, 97, 110, 115, -108, 97, 116, 101, 34, 41, 32, 126, 61, 32, 110, 105, 108, 41, 10, 101, 110, 100, 10, }; - -// src/base/criteria.lua -static const unsigned char builtin_script_17[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 99, 114, 105, 116, 101, 114, 105, 97, 32, 61, 32, 99, -114, 105, 116, 101, 114, 105, 97, 32, 32, 45, 45, 32, 99, 114, 105, 116, 101, 114, 105, 97, 32, 110, 97, 109, 101, 115, 112, 97, 99, 101, 32, 105, -115, 32, 100, 101, 102, 105, 110, 101, 100, 32, 105, 110, 32, 67, 32, 104, 111, 115, 116, 10, 108, 111, 99, 97, 108, 32, 99, 114, 105, 116, 101, 114, -105, 97, 32, 61, 32, 112, 46, 99, 114, 105, 116, 101, 114, 105, 97, 10, 99, 114, 105, 116, 101, 114, 105, 97, 46, 95, 118, 97, 108, 105, 100, 80, -114, 101, 102, 105, 120, 101, 115, 32, 61, 32, 123, 10, 95, 97, 99, 116, 105, 111, 110, 32, 61, 32, 116, 114, 117, 101, 44, 10, 97, 99, 116, 105, -111, 110, 32, 61, 32, 116, 114, 117, 101, 44, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 116, 114, 117, 101, 44, 10, - 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 102, 105, 108, 101, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 107, 105, 110, 100, 32, 61, 32, 116, 114, 117, 101, 44, 10, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 32, 116, 114, 117, -101, 44, 10, 95, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 116, 114, -117, 101, 44, 10, 112, 108, 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, -121, 112, 101, 32, 61, 32, 116, 114, 117, 101, 44, 10, 115, 121, 115, 116, 101, 109, 32, 61, 32, 116, 114, 117, 101, 44, 10, 116, 111, 111, 108, 115, -101, 116, 32, 61, 32, 116, 114, 117, 101, 44, 10, 116, 97, 103, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 104, 111, 115, 116, 32, 61, 32, 116, -114, 117, 101, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 102, 108, 97, 116, 116, 101, 110, - 40, 116, 101, 114, 109, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, -102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 108, 97, 116, 116, 101, 110, 40, 116, 101, 114, 109, 115, 41, 10, 102, 111, 114, 32, 107, 101, 121, 44, - 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 101, 114, 109, 115, 41, 32, 100, 111, 10, 105, 102, 32, 116, 121, 112, -101, 40, 107, 101, 121, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, -118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 108, 97, 116, 116, 101, 110, 40, 118, - 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 116, -121, 112, 101, 40, 107, 101, 121, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -119, 111, 114, 100, 32, 61, 32, 107, 101, 121, 32, 46, 46, 32, 34, 58, 34, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, - 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 115, 32, 61, 32, -116, 97, 98, 108, 101, 46, 102, 108, 97, 116, 116, 101, 110, 40, 118, 97, 108, 117, 101, 41, 10, 119, 111, 114, 100, 32, 61, 32, 119, 111, 114, 100, - 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 118, 97, 108, 117, 101, 115, 44, 32, 34, 32, 111, 114, 32, 34, 41, - 10, 101, 108, 115, 101, 10, 119, 111, 114, 100, 32, 61, 32, 119, 111, 114, 100, 32, 46, 46, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 119, 111, 114, 100, 41, 10, 101, 108, 115, 101, 10, 101, -114, 114, 111, 114, 40, 34, 85, 110, 107, 110, 111, 119, 110, 32, 107, 101, 121, 32, 116, 121, 112, 101, 32, 105, 110, 32, 116, 101, 114, 109, 115, 46, - 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 108, 97, 116, 116, 101, 110, 40, 116, 101, 114, 109, 115, 41, 10, 114, 101, -116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 114, 105, 116, 101, 114, 105, - 97, 46, 110, 101, 119, 40, 116, 101, 114, 109, 115, 44, 32, 117, 110, 112, 114, 101, 102, 105, 120, 101, 100, 41, 10, 116, 101, 114, 109, 115, 32, 61, - 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 102, 108, 97, 116, 116, 101, 110, 40, 116, 101, 114, 109, 115, 41, 10, 108, 111, 99, 97, 108, 32, 112, - 97, 116, 116, 101, 114, 110, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, 116, 101, 114, 109, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 116, 101, 114, 109, 115, 41, 32, 100, 111, 10, 116, 101, 114, 109, 32, 61, 32, 116, 101, 114, 109, 58, 108, 111, 119, 101, 114, 40, 41, - 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 116, 101, 114, 110, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 114, 101, 102, 105, 120, - 32, 61, 32, 105, 105, 102, 40, 117, 110, 112, 114, 101, 102, 105, 120, 101, 100, 44, 32, 110, 105, 108, 44, 32, 34, 99, 111, 110, 102, 105, 103, 117, -114, 97, 116, 105, 111, 110, 115, 34, 41, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 100, 115, 32, 61, 32, 116, 101, 114, 109, 58, 101, 120, 112, -108, 111, 100, 101, 40, 34, 32, 111, 114, 32, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 119, 111, 114, 100, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 119, 111, 114, 100, 115, 41, 32, 100, 111, 10, 119, 111, 114, 100, 44, 32, 112, 114, 101, 102, 105, 120, 32, 61, 32, 99, 114, 105, 116, -101, 114, 105, 97, 46, 95, 119, 111, 114, 100, 40, 119, 111, 114, 100, 44, 32, 112, 114, 101, 102, 105, 120, 41, 10, 105, 102, 32, 112, 114, 101, 102, -105, 120, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 95, 118, 97, 108, 105, 100, 80, 114, 101, 102, 105, 120, -101, 115, 91, 112, 114, 101, 102, 105, 120, 93, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 115, 116, 114, 105, -110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 102, 105, 101, 108, 100, 32, 112, 114, 101, 102, 105, 120, 32, - 39, 37, 115, 39, 34, 44, 32, 112, 114, 101, 102, 105, 120, 41, 10, 101, 110, 100, 10, 105, 102, 32, 112, 114, 101, 102, 105, 120, 32, 116, 104, 101, -110, 10, 108, 111, 99, 97, 108, 32, 102, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 112, 114, 101, 102, 105, 120, - 41, 10, 105, 102, 32, 102, 108, 100, 32, 97, 110, 100, 32, 102, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 32, 116, 104, 101, 110, 10, 119, 111, -114, 100, 91, 49, 93, 32, 61, 32, 102, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 91, 119, 111, 114, 100, 91, 49, 93, 93, 32, 111, 114, 32, -119, 111, 114, 100, 91, 49, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 116, -116, 101, 114, 110, 44, 32, 119, 111, 114, 100, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 116, -116, 101, 114, 110, 115, 44, 32, 112, 97, 116, 116, 101, 114, 110, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 114, 105, 116, 32, 61, - 32, 123, 125, 10, 99, 114, 105, 116, 46, 112, 97, 116, 116, 101, 114, 110, 115, 32, 61, 32, 112, 97, 116, 116, 101, 114, 110, 115, 10, 99, 114, 105, -116, 46, 100, 97, 116, 97, 32, 61, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 95, 99, 111, 109, 112, 105, 108, 101, 40, 112, 97, 116, 116, 101, -114, 110, 115, 41, 10, 99, 114, 105, 116, 46, 116, 101, 114, 109, 115, 32, 61, 32, 116, 101, 114, 109, 115, 10, 114, 101, 116, 117, 114, 110, 32, 99, -114, 105, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 95, 119, 111, 114, 100, 40, -119, 111, 114, 100, 44, 32, 112, 114, 101, 102, 105, 120, 41, 10, 108, 111, 99, 97, 108, 32, 119, 105, 108, 100, 99, 97, 114, 100, 10, 108, 111, 99, - 97, 108, 32, 97, 115, 115, 101, 114, 116, 105, 111, 110, 32, 61, 32, 116, 114, 117, 101, 10, 119, 104, 105, 108, 101, 32, 40, 116, 114, 117, 101, 41, - 32, 100, 111, 10, 105, 102, 32, 119, 111, 114, 100, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 110, 111, 116, 32, 34, 41, 32, 116, -104, 101, 110, 10, 97, 115, 115, 101, 114, 116, 105, 111, 110, 32, 61, 32, 110, 111, 116, 32, 97, 115, 115, 101, 114, 116, 105, 111, 110, 10, 119, 111, -114, 100, 32, 61, 32, 119, 111, 114, 100, 58, 115, 117, 98, 40, 53, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, -119, 111, 114, 100, 58, 102, 105, 110, 100, 40, 34, 58, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 112, 114, 101, 102, 105, -120, 32, 97, 110, 100, 32, 105, 32, 116, 104, 101, 110, 10, 112, 114, 101, 102, 105, 120, 32, 61, 32, 119, 111, 114, 100, 58, 115, 117, 98, 40, 49, - 44, 32, 105, 32, 45, 32, 49, 41, 10, 119, 111, 114, 100, 32, 61, 32, 119, 111, 114, 100, 58, 115, 117, 98, 40, 105, 32, 43, 32, 49, 41, 10, -101, 108, 115, 101, 10, 119, 105, 108, 100, 99, 97, 114, 100, 32, 61, 32, 40, 119, 111, 114, 100, 58, 102, 105, 110, 100, 40, 34, 42, 34, 44, 32, - 49, 44, 32, 116, 114, 117, 101, 41, 32, 126, 61, 32, 110, 105, 108, 41, 10, 105, 102, 32, 119, 105, 108, 100, 99, 97, 114, 100, 32, 116, 104, 101, -110, 10, 119, 111, 114, 100, 32, 61, 32, 112, 97, 116, 104, 46, 119, 105, 108, 100, 99, 97, 114, 100, 115, 40, 119, 111, 114, 100, 41, 10, 101, 110, -100, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 123, 32, 119, 111, 114, -100, 44, 32, 112, 114, 101, 102, 105, 120, 44, 32, 97, 115, 115, 101, 114, 116, 105, 111, 110, 44, 32, 119, 105, 108, 100, 99, 97, 114, 100, 32, 125, - 44, 32, 112, 114, 101, 102, 105, 120, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 97, -108, 108, 111, 119, 80, 114, 101, 102, 105, 120, 40, 112, 114, 101, 102, 105, 120, 41, 10, 99, 114, 105, 116, 101, 114, 105, 97, 46, 95, 118, 97, 108, -105, 100, 80, 114, 101, 102, 105, 120, 101, 115, 91, 112, 114, 101, 102, 105, 120, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 116, 114, 117, -101, 10, 101, 110, 100, 10, }; - -// src/base/detoken.lua -static const unsigned char builtin_script_18[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 100, 101, 116, 111, 107, 101, 110, 32, 61, 32, 123, 125, - 10, 108, 111, 99, 97, 108, 32, 100, 101, 116, 111, 107, 101, 110, 32, 61, 32, 112, 46, 100, 101, 116, 111, 107, 101, 110, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 100, 101, 116, 111, 107, 101, 110, 46, 101, 120, 112, 97, 110, 100, 40, 118, 97, 108, 117, 101, 44, 32, 101, 110, 118, 105, 114, 111, -110, 44, 32, 102, 105, 101, 108, 100, 44, 32, 98, 97, 115, 101, 100, 105, 114, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 101, 120, 112, 97, -110, 100, 116, 111, 107, 101, 110, 40, 116, 111, 107, 101, 110, 44, 32, 101, 44, 32, 102, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 114, 77, 97, -112, 32, 61, 32, 123, 125, 10, 105, 102, 32, 102, 46, 112, 97, 116, 104, 86, 97, 114, 115, 32, 111, 114, 32, 101, 46, 111, 118, 101, 114, 114, 105, -100, 101, 80, 97, 116, 104, 86, 97, 114, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, - 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 97, 99, 116, 105, 111, 110, 32, 116, 104, 101, 110, - 10, 118, 97, 114, 77, 97, 112, 32, 61, 32, 97, 99, 116, 105, 111, 110, 46, 112, 97, 116, 104, 86, 97, 114, 115, 32, 111, 114, 32, 123, 125, 10, -101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 77, 97, 112, 32, 61, 32, 101, 46, 112, 97, 116, 104, 86, 97, 114, -115, 32, 111, 114, 32, 123, 125, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 101, 44, 32, 123, 95, 95, 105, 110, 100, 101, 120, - 32, 61, 32, 95, 71, 125, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 65, 98, 115, 32, 61, 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, 97, -108, 32, 101, 114, 114, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 10, 108, 111, 99, 97, 108, 32, 115, 117, 99, 99, 101, 115, 115, - 10, 108, 111, 99, 97, 108, 32, 100, 111, 110, 116, 77, 97, 107, 101, 82, 101, 108, 97, 116, 105, 118, 101, 32, 61, 32, 116, 111, 107, 101, 110, 58, -115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 39, 33, 39, 41, 10, 105, 102, 32, 100, 111, 110, 116, 77, 97, 107, 101, 82, 101, 108, 97, 116, -105, 118, 101, 32, 116, 104, 101, 110, 10, 116, 111, 107, 101, 110, 32, 61, 32, 116, 111, 107, 101, 110, 58, 115, 117, 98, 40, 50, 44, 32, 45, 49, - 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 112, 101, 100, 32, 61, 32, 101, 110, 118, 77, 97, 112, 91, 116, 111, 107, 101, -110, 93, 32, 111, 114, 32, 118, 97, 114, 77, 97, 112, 91, 116, 111, 107, 101, 110, 93, 10, 105, 102, 32, 109, 97, 112, 112, 101, 100, 32, 116, 104, -101, 110, 10, 101, 114, 114, 32, 32, 32, 32, 61, 32, 110, 105, 108, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 109, 97, 112, 112, 101, 100, 10, -105, 102, 32, 116, 121, 112, 101, 40, 114, 101, 115, 117, 108, 116, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, -101, 110, 10, 115, 117, 99, 99, 101, 115, 115, 44, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 99, 97, 108, 108, 40, 114, 101, 115, 117, 108, -116, 44, 32, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 117, 99, 99, 101, 115, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 110, 105, 108, 44, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 40, 116, 121, 112, 101, 40, 114, 101, -115, 117, 108, 116, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 41, 32, 116, 104, 101, 110, 10, 105, 115, 65, 98, 115, 32, 32, 61, 32, -114, 101, 115, 117, 108, 116, 46, 97, 98, 115, 111, 108, 117, 116, 101, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 46, -116, 111, 107, 101, 110, 10, 101, 108, 115, 101, 10, 105, 115, 65, 98, 115, 32, 61, 32, 112, 97, 116, 104, 46, 105, 115, 97, 98, 115, 111, 108, 117, -116, 101, 40, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 10, 102, -117, 110, 99, 44, 32, 101, 114, 114, 32, 61, 32, 108, 111, 97, 100, 40, 34, 114, 101, 116, 117, 114, 110, 32, 34, 32, 46, 46, 32, 116, 111, 107, -101, 110, 44, 32, 110, 105, 108, 44, 32, 39, 116, 39, 44, 32, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 117, 110, 99, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 108, 111, 97, 100, 32, 101, 114, 114, 111, 114, 58, 32, 34, 32, 46, 46, 32, -101, 114, 114, 10, 101, 110, 100, 10, 115, 117, 99, 99, 101, 115, 115, 44, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 99, 97, 108, 108, 40, -102, 117, 110, 99, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 117, 99, 99, 101, 115, 115, 32, 116, 104, 101, 110, 10, 101, 114, 114, 32, 32, 32, - 32, 61, 32, 114, 101, 115, 117, 108, 116, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 110, 105, 108, 10, 101, 108, 115, 101, 10, 101, 114, 114, 32, - 32, 32, 32, 61, 32, 110, 105, 108, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 32, 111, 114, 32, 34, 34, 10, 101, -110, 100, 10, 105, 102, 32, 114, 101, 115, 117, 108, 116, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 114, 101, 115, 117, 108, 116, 41, 10, 105, 102, 32, 112, 97, 116, 104, 46, 104, 97, 115, 100, 101, -102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, 41, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 112, 97, 116, 104, 46, 114, 101, 115, 111, 108, 118, 101, 100, 101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, - 41, 10, 101, 110, 100, 10, 105, 115, 65, 98, 115, 32, 61, 32, 112, 97, 116, 104, 46, 105, 115, 97, 98, 115, 111, 108, 117, 116, 101, 40, 114, 101, -115, 117, 108, 116, 41, 10, 105, 102, 32, 105, 115, 65, 98, 115, 32, 97, 110, 100, 32, 110, 111, 116, 32, 102, 46, 112, 97, 116, 104, 115, 32, 97, -110, 100, 32, 98, 97, 115, 101, 100, 105, 114, 32, 97, 110, 100, 32, 110, 111, 116, 32, 100, 111, 110, 116, 77, 97, 107, 101, 82, 101, 108, 97, 116, -105, 118, 101, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, -118, 101, 40, 98, 97, 115, 101, 100, 105, 114, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, -105, 102, 32, 114, 101, 115, 117, 108, 116, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 105, 115, 65, 98, 115, 32, 97, 110, 100, 32, 102, - 46, 112, 97, 116, 104, 115, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 34, 92, 48, 34, 32, 46, 46, 32, 114, 101, 115, -117, 108, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 101, 120, 112, 97, 110, 100, 118, 97, 108, 117, 101, 40, 118, 97, 108, 117, 101, 44, 32, 101, 44, 32, 102, 41, - 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 126, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 111, 117, 110, 116, 10, 114, 101, -112, 101, 97, 116, 10, 118, 97, 108, 117, 101, 44, 32, 99, 111, 117, 110, 116, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 34, - 37, 37, 123, 40, 46, 45, 41, 125, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 116, 111, 107, 101, 110, 41, 10, 108, 111, 99, 97, 108, - 32, 114, 101, 115, 117, 108, 116, 44, 32, 101, 114, 114, 32, 61, 32, 101, 120, 112, 97, 110, 100, 116, 111, 107, 101, 110, 40, 116, 111, 107, 101, 110, - 58, 103, 115, 117, 98, 40, 34, 92, 92, 34, 44, 32, 34, 92, 92, 92, 92, 34, 41, 44, 32, 101, 44, 32, 102, 41, 10, 105, 102, 32, 101, 114, -114, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 32, 46, 46, 32, 34, 32, 105, 110, 32, 116, 111, 107, 101, 110, 58, 32, - 34, 32, 46, 46, 32, 116, 111, 107, 101, 110, 44, 32, 48, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 117, 108, 116, - 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 84, 111, 107, 101, 110, 32, 114, 101, 116, 117, 114, 110, 101, 100, 32, 110, 105, 108, 44, - 32, 105, 116, 32, 109, 97, 121, 32, 110, 111, 116, 32, 101, 120, 105, 115, 116, 58, 32, 34, 32, 46, 46, 32, 116, 111, 107, 101, 110, 44, 32, 48, - 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 41, 10, 117, 110, 116, 105, 108, 32, 99, -111, 117, 110, 116, 32, 61, 61, 32, 48, 10, 105, 102, 32, 102, 46, 112, 97, 116, 104, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -105, 44, 32, 106, 10, 114, 101, 112, 101, 97, 116, 10, 105, 44, 32, 106, 32, 61, 32, 118, 97, 108, 117, 101, 58, 102, 105, 110, 100, 40, 34, 92, - 48, 34, 41, 10, 105, 102, 32, 105, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 115, 117, 98, 40, -105, 32, 43, 32, 49, 41, 10, 101, 110, 100, 10, 117, 110, 116, 105, 108, 32, 110, 111, 116, 32, 105, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 101, 120, 112, 97, 110, 100, 95, 99, 97, 99, 104, 101, 32, 61, - 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 101, 99, 117, 114, 115, 101, 40, 118, 97, 108, 117, 101, 44, 32, 101, 44, 32, 102, - 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, - 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 95, 116, 97, 98, 108, 101, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, -110, 32, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 41, 32, 100, 111, 10, 105, 102, 32, 116, 111, 110, 117, 109, 98, 101, 114, 40, 107, 41, - 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 115, 95, 116, 97, 98, 108, 101, 91, 107, 93, 32, 61, 32, 114, 101, 99, 117, -114, 115, 101, 40, 118, 44, 32, 101, 44, 32, 102, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 110, 107, 32, 61, 32, 114, 101, 99, -117, 114, 115, 101, 40, 107, 44, 32, 101, 44, 32, 102, 41, 10, 114, 101, 115, 95, 116, 97, 98, 108, 101, 91, 110, 107, 93, 32, 61, 32, 114, 101, - 99, 117, 114, 115, 101, 40, 118, 44, 32, 101, 44, 32, 102, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, -115, 95, 116, 97, 98, 108, 101, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 32, 61, 32, 101, 120, 112, 97, 110, 100, 95, - 99, 97, 99, 104, 101, 91, 118, 97, 108, 117, 101, 93, 10, 105, 102, 32, 114, 101, 115, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, -105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 97, 110, 100, 32, 112, - 97, 116, 104, 46, 104, 97, 115, 100, 101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, -118, 97, 108, 117, 101, 32, 61, 32, 112, 97, 116, 104, 46, 114, 101, 115, 111, 108, 118, 101, 100, 101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, - 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 114, 101, 115, 32, 61, 32, 101, 120, 112, 97, 110, 100, 118, 97, 108, 117, 101, 40, 118, 97, -108, 117, 101, 44, 32, 101, 44, 32, 102, 41, 10, 101, 120, 112, 97, 110, 100, 95, 99, 97, 99, 104, 101, 91, 118, 97, 108, 117, 101, 93, 32, 61, - 32, 114, 101, 115, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 114, 101, 99, 117, 114, 115, 101, 40, 118, 97, 108, 117, 101, 44, 32, 101, 110, 118, 105, 114, 111, 110, 44, 32, 102, 105, 101, 108, 100, - 32, 111, 114, 32, 123, 125, 41, 10, 101, 110, 100, 10, }; - -// src/base/configset.lua -static const unsigned char builtin_script_19[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 99, 111, 110, 102, 105, 103, 115, 101, 116, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 115, 101, 116, - 10, 108, 111, 99, 97, 108, 32, 99, 114, 105, 116, 101, 114, 105, 97, 32, 61, 32, 112, 46, 99, 114, 105, 116, 101, 114, 105, 97, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 110, 101, 119, 40, 112, 97, 114, 101, 110, 116, 41, 10, 108, 111, 99, 97, -108, 32, 99, 115, 101, 116, 32, 61, 32, 123, 125, 10, 99, 115, 101, 116, 46, 112, 97, 114, 101, 110, 116, 32, 61, 32, 112, 97, 114, 101, 110, 116, - 10, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, 32, 61, 32, 123, 125, 10, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 32, 61, - 32, 110, 105, 108, 10, 99, 115, 101, 116, 46, 99, 111, 109, 112, 105, 108, 101, 100, 32, 61, 32, 102, 97, 108, 115, 101, 10, 114, 101, 116, 117, 114, -110, 32, 99, 115, 101, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 102, 101, -116, 99, 104, 40, 99, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, -105, 103, 105, 110, 41, 10, 102, 105, 108, 116, 101, 114, 32, 61, 32, 102, 105, 108, 116, 101, 114, 32, 111, 114, 32, 123, 125, 10, 99, 116, 120, 32, - 61, 32, 99, 116, 120, 32, 111, 114, 32, 123, 125, 10, 105, 102, 32, 112, 46, 102, 105, 101, 108, 100, 46, 109, 101, 114, 103, 101, 115, 40, 102, 105, -101, 108, 100, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, 101, 116, 99, -104, 77, 101, 114, 103, 101, 100, 40, 99, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, - 44, 32, 111, 114, 105, 103, 105, 110, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, - 95, 102, 101, 116, 99, 104, 68, 105, 114, 101, 99, 116, 40, 99, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, - 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 100, 111, 102, 105, 108, 116, 101, 114, 40, 99, 115, 101, 116, 44, 32, 98, 108, 111, 99, 107, 44, - 32, 102, 105, 108, 116, 101, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 116, 101, 114, 46, 109, 97, 116, 99, 104, 101, 114, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 115, 101, 116, 46, 99, 111, 109, 112, 105, 108, 101, 100, 32, 111, 114, 32, 99, 114, 105, -116, 101, 114, 105, 97, 46, 109, 97, 116, 99, 104, 101, 115, 40, 98, 108, 111, 99, 107, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 44, 32, 102, -105, 108, 116, 101, 114, 41, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 108, 116, 101, 114, 46, 109, 97, 116, 99, 104, -101, 114, 40, 99, 115, 101, 116, 44, 32, 98, 108, 111, 99, 107, 44, 32, 102, 105, 108, 116, 101, 114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, 101, 116, 99, 104, 68, 105, 114, 101, 99, 116, 40, - 99, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, 110, - 41, 10, 105, 102, 32, 111, 114, 105, 103, 105, 110, 32, 97, 110, 100, 32, 111, 114, 105, 103, 105, 110, 32, 126, 61, 32, 99, 115, 101, 116, 32, 97, -110, 100, 32, 110, 111, 116, 32, 111, 114, 105, 103, 105, 110, 46, 99, 111, 109, 112, 105, 108, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, 101, 116, 99, 104, 68, 105, 114, 101, 99, 116, 40, 111, 114, 105, 103, 105, 110, - 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, 110, 41, 10, 101, 110, -100, 10, 108, 111, 99, 97, 108, 32, 97, 98, 115, 112, 97, 116, 104, 32, 61, 32, 102, 105, 108, 116, 101, 114, 46, 102, 105, 108, 101, 115, 10, 108, -111, 99, 97, 108, 32, 98, 97, 115, 101, 100, 105, 114, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 102, 105, 101, 108, 100, 46, 110, - 97, 109, 101, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 115, 32, 61, 32, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, 10, 108, -111, 99, 97, 108, 32, 110, 32, 61, 32, 35, 98, 108, 111, 99, 107, 115, 10, 102, 111, 114, 32, 105, 32, 61, 32, 110, 44, 32, 49, 44, 32, 45, - 49, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 32, 61, 32, 98, 108, 111, 99, 107, 115, 91, 105, 93, 10, 105, 102, 32, -110, 111, 116, 32, 111, 114, 105, 103, 105, 110, 32, 111, 114, 32, 98, 108, 111, 99, 107, 46, 95, 111, 114, 105, 103, 105, 110, 32, 61, 61, 32, 111, -114, 105, 103, 105, 110, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 98, 108, 111, 99, 107, 91, 107, -101, 121, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 97, 98, 115, 112, 97, 116, 104, 32, - 97, 110, 100, 32, 110, 111, 116, 32, 99, 115, 101, 116, 46, 99, 111, 109, 112, 105, 108, 101, 100, 32, 97, 110, 100, 32, 98, 108, 111, 99, 107, 46, - 95, 98, 97, 115, 101, 100, 105, 114, 32, 97, 110, 100, 32, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 126, 61, 32, 98, - 97, 115, 101, 100, 105, 114, 32, 116, 104, 101, 110, 10, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, -101, 100, 105, 114, 10, 102, 105, 108, 116, 101, 114, 46, 102, 105, 108, 101, 115, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, -116, 105, 118, 101, 40, 98, 97, 115, 101, 100, 105, 114, 44, 32, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 105, 102, 32, 118, 97, -108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 100, 111, 102, 105, 108, 116, -101, 114, 40, 99, 115, 101, 116, 44, 32, 98, 108, 111, 99, 107, 44, 32, 102, 105, 108, 116, 101, 114, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, -116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, -101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 100, 101, 101, 112, 99, 111, 112, 121, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 105, 102, - 32, 102, 105, 101, 108, 100, 46, 116, 111, 107, 101, 110, 115, 32, 97, 110, 100, 32, 99, 116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 32, 116, 104, -101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, 100, 101, 116, 111, 107, 101, 110, 46, 101, 120, 112, 97, 110, 100, 40, 118, 97, 108, 117, -101, 44, 32, 99, 116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 44, 32, 102, 105, 101, 108, 100, 44, 32, 99, 116, 120, 46, 95, 98, 97, 115, 101, -100, 105, 114, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 105, 108, 116, 101, 114, 46, 102, 105, 108, 101, 115, 32, 61, 32, 97, 98, 115, 112, 97, 116, 104, 10, 105, 102, 32, 99, 115, 101, 116, - 46, 112, 97, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, -101, 116, 99, 104, 68, 105, 114, 101, 99, 116, 40, 99, 115, 101, 116, 46, 112, 97, 114, 101, 110, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, -105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, 101, 116, 99, 104, 77, 101, 114, 103, 101, 100, 40, 99, 115, 101, 116, - 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, 110, 41, 10, 105, 102, - 32, 111, 114, 105, 103, 105, 110, 32, 97, 110, 100, 32, 111, 114, 105, 103, 105, 110, 32, 126, 61, 32, 99, 115, 101, 116, 32, 97, 110, 100, 32, 110, -111, 116, 32, 111, 114, 105, 103, 105, 110, 46, 99, 111, 109, 112, 105, 108, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 99, -111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, 101, 116, 99, 104, 77, 101, 114, 103, 101, 100, 40, 111, 114, 105, 103, 105, 110, 44, 32, 102, 105, -101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, 110, 41, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, -101, 109, 111, 118, 101, 40, 112, 97, 116, 116, 101, 114, 110, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, 112, 97, 116, 116, 101, 114, 110, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 97, 116, 116, 101, 114, 110, 115, 41, 32, 100, 111, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 116, -111, 107, 101, 110, 115, 32, 97, 110, 100, 32, 99, 116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 32, 116, 104, 101, 110, 10, 112, 97, 116, 116, 101, -114, 110, 32, 61, 32, 112, 46, 100, 101, 116, 111, 107, 101, 110, 46, 101, 120, 112, 97, 110, 100, 40, 112, 97, 116, 116, 101, 114, 110, 44, 32, 99, -116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 44, 32, 102, 105, 101, 108, 100, 44, 32, 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 41, - 10, 101, 110, 100, 10, 112, 97, 116, 116, 101, 114, 110, 32, 61, 32, 112, 97, 116, 104, 46, 119, 105, 108, 100, 99, 97, 114, 100, 115, 40, 112, 97, -116, 116, 101, 114, 110, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 108, 111, 99, 97, 108, 32, 106, 32, 61, 32, 49, 10, 119, 104, 105, 108, 101, - 32, 106, 32, 60, 61, 32, 35, 114, 101, 115, 117, 108, 116, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 114, -101, 115, 117, 108, 116, 91, 106, 93, 58, 108, 111, 119, 101, 114, 40, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 58, 109, 97, 116, 99, 104, 40, -112, 97, 116, 116, 101, 114, 110, 41, 32, 61, 61, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 91, 114, 101, -115, 117, 108, 116, 91, 106, 93, 93, 32, 61, 32, 110, 105, 108, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 114, 101, 115, 117, -108, 116, 44, 32, 106, 41, 10, 101, 108, 115, 101, 10, 106, 32, 61, 32, 106, 32, 43, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 115, 101, 116, 46, 112, 97, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, - 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, 102, 101, 116, 99, 104, 77, 101, 114, 103, 101, 100, 40, 99, 115, 101, 116, 46, 112, - 97, 114, 101, 110, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 102, 105, 108, 116, 101, 114, 44, 32, 99, 116, 120, 44, 32, 111, 114, 105, 103, 105, -110, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 97, 98, 115, 112, 97, 116, 104, 32, 61, 32, 102, 105, 108, 116, 101, 114, 46, 102, 105, -108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 100, 105, 114, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 102, 105, -101, 108, 100, 46, 110, 97, 109, 101, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 115, 32, 61, 32, 99, 115, 101, 116, 46, 98, 108, 111, - 99, 107, 115, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, 98, 108, 111, 99, 107, 115, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, - 32, 110, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 32, 61, 32, 98, 108, 111, 99, 107, 115, 91, 105, 93, 10, 105, 102, - 32, 110, 111, 116, 32, 111, 114, 105, 103, 105, 110, 32, 111, 114, 32, 98, 108, 111, 99, 107, 46, 95, 111, 114, 105, 103, 105, 110, 32, 61, 61, 32, -111, 114, 105, 103, 105, 110, 32, 116, 104, 101, 110, 10, 105, 102, 32, 97, 98, 115, 112, 97, 116, 104, 32, 97, 110, 100, 32, 98, 108, 111, 99, 107, - 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 97, 110, 100, 32, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 126, 61, 32, - 98, 97, 115, 101, 100, 105, 114, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 115, 101, 116, 46, 99, 111, 109, 112, 105, 108, 101, 100, 32, 116, 104, -101, 110, 10, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 102, 105, 108, 116, -101, 114, 46, 102, 105, 108, 101, 115, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 98, 97, 115, 101, -100, 105, 114, 44, 32, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 95, -100, 111, 102, 105, 108, 116, 101, 114, 40, 99, 115, 101, 116, 44, 32, 98, 108, 111, 99, 107, 44, 32, 102, 105, 108, 116, 101, 114, 41, 32, 116, 104, -101, 110, 10, 105, 102, 32, 98, 108, 111, 99, 107, 46, 95, 114, 101, 109, 111, 118, 101, 115, 32, 97, 110, 100, 32, 98, 108, 111, 99, 107, 46, 95, -114, 101, 109, 111, 118, 101, 115, 91, 107, 101, 121, 93, 32, 116, 104, 101, 110, 10, 114, 101, 109, 111, 118, 101, 40, 98, 108, 111, 99, 107, 46, 95, -114, 101, 109, 111, 118, 101, 115, 91, 107, 101, 121, 93, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, - 98, 108, 111, 99, 107, 91, 107, 101, 121, 93, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, - 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 100, 101, 101, 112, 99, 111, 112, 121, - 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 105, 101, -108, 100, 46, 116, 111, 107, 101, 110, 115, 32, 97, 110, 100, 32, 99, 116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 32, 116, 104, 101, 110, 10, 118, - 97, 108, 117, 101, 32, 61, 32, 112, 46, 100, 101, 116, 111, 107, 101, 110, 46, 101, 120, 112, 97, 110, 100, 40, 118, 97, 108, 117, 101, 44, 32, 99, -116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 44, 32, 102, 105, 101, 108, 100, 44, 32, 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 101, 108, 100, 32, 97, 110, 100, 32, 112, 46, 102, 105, 101, 108, 100, 46, 116, 114, 97, 110, 115, 108, - 97, 116, 101, 115, 40, 102, 105, 101, 108, 100, 41, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, - 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 109, 101, 114, 103, 101, 40, 102, 105, 101, 108, 100, 44, 32, 114, 101, 115, 117, 108, -116, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 105, 108, 116, 101, 114, - 46, 102, 105, 108, 101, 115, 32, 61, 32, 97, 98, 115, 112, 97, 116, 104, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, - 99, 115, 101, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 95, 95, 110, 101, 119, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 116, 98, 108, 44, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 32, 61, 32, -112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 107, 101, 121, 41, 10, 105, 102, 32, 102, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 115, 116, 97, 116, 117, 115, 44, 32, 101, 114, 114, 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 115, 116, 111, 114, 101, 40, 99, -115, 101, 116, 44, 32, 102, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, - 40, 101, 114, 114, 44, 32, 50, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 97, 119, 115, 101, 116, 40, 116, 98, 108, 44, 32, 107, 101, -121, 44, 32, 118, 97, 108, 117, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 44, 10, - 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 116, 98, 108, 44, 32, 107, 101, 121, 41, 10, 108, 111, 99, - 97, 108, 32, 102, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 107, 101, 121, 41, 10, 105, 102, 32, 102, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 102, 101, 116, 99, 104, 40, 99, 115, 101, 116, 44, 32, 102, - 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 97, 100, 100, 98, 108, 111, 99, 107, 40, 99, 115, 101, 116, - 44, 32, 116, 101, 114, 109, 115, 44, 32, 98, 97, 115, 101, 100, 105, 114, 41, 10, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 97, 100, 100, 70, -105, 108, 116, 101, 114, 40, 99, 115, 101, 116, 44, 32, 116, 101, 114, 109, 115, 44, 32, 98, 97, 115, 101, 100, 105, 114, 44, 32, 116, 114, 117, 101, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 115, 101, 116, 44, 32, 116, 101, 114, -109, 115, 44, 32, 98, 97, 115, 101, 100, 105, 114, 44, 32, 117, 110, 112, 114, 101, 102, 105, 120, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, -114, 105, 116, 44, 32, 101, 114, 114, 32, 61, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 110, 101, 119, 40, 116, 101, 114, 109, 115, 44, 32, 117, -110, 112, 114, 101, 102, 105, 120, 101, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 114, 105, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 32, 61, 32, 123, 125, - 10, 98, 108, 111, 99, 107, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 32, 61, 32, 99, 114, 105, 116, 10, 98, 108, 111, 99, 107, 46, 95, 111, -114, 105, 103, 105, 110, 32, 61, 32, 99, 115, 101, 116, 10, 105, 102, 32, 98, 97, 115, 101, 100, 105, 114, 32, 116, 104, 101, 110, 10, 98, 108, 111, - 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 98, 97, 115, 101, 100, 105, 114, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, -100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, 44, 32, 98, 108, 111, 99, -107, 41, 10, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 98, 108, 111, 99, 107, 10, 114, 101, 116, 117, 114, 110, 32, 116, -114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 103, 101, 116, 70, 105, -108, 116, 101, 114, 40, 99, 115, 101, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 95, 99, 114, 105, 116, 101, 114, 105, 97, 32, 61, 32, - 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 44, 10, 95, 98, 97, 115, 101, 100, 105, 114, - 32, 61, 32, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 115, 101, 116, 70, 105, 108, 116, 101, 114, 40, 99, 115, 101, 116, - 44, 32, 102, 105, 108, 116, 101, 114, 41, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 32, 61, 32, 123, 125, 10, 98, 108, 111, 99, 107, - 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 32, 61, 32, 102, 105, 108, 116, 101, 114, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 10, 98, 108, -111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 102, 105, 108, 116, 101, 114, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 98, -108, 111, 99, 107, 46, 95, 111, 114, 105, 103, 105, 110, 32, 61, 32, 99, 115, 101, 116, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, 44, 32, 98, 108, 111, 99, 107, 41, 10, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, -116, 32, 61, 32, 98, 108, 111, 99, 107, 59, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, -116, 46, 115, 116, 111, 114, 101, 40, 99, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 110, -111, 116, 32, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 97, -100, 100, 98, 108, 111, 99, 107, 40, 99, 115, 101, 116, 44, 32, 123, 125, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, - 61, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 10, 108, 111, 99, 97, 108, 32, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 99, 115, 101, -116, 46, 99, 117, 114, 114, 101, 110, 116, 10, 108, 111, 99, 97, 108, 32, 115, 116, 97, 116, 117, 115, 44, 32, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 112, 99, 97, 108, 108, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 99, 117, 114, 114, 101, 110, 116, 91, 107, 101, 121, 93, 32, - 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 115, 116, 111, 114, 101, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 91, 107, -101, 121, 93, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 116, 97, 116, 117, 115, 32, 116, -104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, 114, 101, 115, 117, 108, 116, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, -104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 46, 109, 115, 103, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 110, 105, 108, 44, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 114, 101, 109, 111, 118, 101, 40, 99, 115, 101, -116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 115, 41, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 32, 61, 32, -123, 125, 10, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, - 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 98, 108, 111, 99, 107, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 32, 61, 32, 99, 115, 101, 116, - 46, 99, 117, 114, 114, 101, 110, 116, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 10, 98, 108, 111, 99, 107, 46, 95, 111, 114, 105, 103, 105, 110, - 32, 61, 32, 99, 115, 101, 116, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, - 44, 32, 98, 108, 111, 99, 107, 41, 10, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 98, 108, 111, 99, 107, 10, 118, 97, -108, 117, 101, 115, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 114, 101, 109, 111, 118, 101, 40, 102, 105, 101, 108, 100, 44, 32, 123, 125, 44, - 32, 118, 97, 108, 117, 101, 115, 41, 10, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 10, - 99, 117, 114, 114, 101, 110, 116, 46, 95, 114, 101, 109, 111, 118, 101, 115, 32, 61, 32, 123, 125, 10, 99, 117, 114, 114, 101, 110, 116, 46, 95, 114, -101, 109, 111, 118, 101, 115, 91, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 93, 32, 61, 32, 118, 97, 108, 117, 101, 115, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 101, 109, 112, 116, 121, 40, 99, 115, 101, 116, 41, 10, 114, -101, 116, 117, 114, 110, 32, 40, 35, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, 32, 61, 61, 32, 48, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 99, 115, 101, 116, 44, 32, 102, -105, 108, 116, 101, 114, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 10, 105, 102, 32, 99, 115, 101, 116, 46, 112, 97, 114, 101, -110, 116, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 99, 111, 109, 112, 105, -108, 101, 40, 99, 115, 101, 116, 46, 112, 97, 114, 101, 110, 116, 44, 32, 102, 105, 108, 116, 101, 114, 41, 10, 101, 108, 115, 101, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 110, 101, 119, 40, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, - 98, 108, 111, 99, 107, 115, 32, 61, 32, 99, 115, 101, 116, 46, 98, 108, 111, 99, 107, 115, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, - 98, 108, 111, 99, 107, 115, 10, 108, 111, 99, 97, 108, 32, 97, 98, 115, 112, 97, 116, 104, 32, 61, 32, 102, 105, 108, 116, 101, 114, 46, 102, 105, -108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 100, 105, 114, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 110, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 98, 108, 111, 99, 107, 32, 61, 32, 98, 108, 111, 99, 107, 115, 91, 105, 93, 10, 105, 102, 32, 98, 108, 111, - 99, 107, 46, 95, 111, 114, 105, 103, 105, 110, 32, 61, 61, 32, 99, 115, 101, 116, 32, 116, 104, 101, 110, 10, 98, 108, 111, 99, 107, 46, 95, 111, -114, 105, 103, 105, 110, 32, 61, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 105, 102, 32, 97, 98, 115, 112, 97, 116, 104, 32, 97, 110, -100, 32, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 97, 110, 100, 32, 98, 108, 111, 99, 107, 46, 95, 98, 97, 115, 101, -100, 105, 114, 32, 126, 61, 32, 98, 97, 115, 101, 100, 105, 114, 32, 116, 104, 101, 110, 10, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 98, 108, -111, 99, 107, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 102, 105, 108, 116, 101, 114, 46, 102, 105, 108, 101, 115, 32, 61, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 98, 97, 115, 101, 100, 105, 114, 44, 32, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, -110, 100, 10, 105, 102, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, 109, 97, 116, 99, 104, 101, 115, 40, 98, 108, 111, 99, 107, 46, 95, 99, 114, -105, 116, 101, 114, 105, 97, 44, 32, 102, 105, 108, 116, 101, 114, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 114, 101, 115, 117, 108, 116, 46, 98, 108, 111, 99, 107, 115, 44, 32, 98, 108, 111, 99, 107, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 105, 108, 116, 101, 114, 46, 102, 105, 108, 101, 115, 32, 61, 32, 97, 98, 115, 112, 97, 116, 104, 10, 114, 101, 115, 117, 108, 116, 46, 99, 111, -109, 112, 105, 108, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, -}; - -// src/base/context.lua -static const unsigned char builtin_script_20[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 99, 111, 110, 116, 101, 120, 116, 32, 61, 32, 123, 125, - 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 120, 116, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 10, 108, 111, 99, 97, 108, - 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 115, 101, 116, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 110, 101, 119, 40, 99, 102, 103, 115, 101, 116, 44, 32, 101, 110, 118, 105, 114, 111, 110, 41, 10, 108, -111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 123, 125, 10, 99, 116, 120, 46, 95, 99, 102, 103, 115, 101, 116, 32, 61, 32, 99, 102, 103, 115, -101, 116, 10, 99, 116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 101, 110, 118, 105, 114, 111, 110, 32, 111, 114, 32, 123, 125, 10, 99, -116, 120, 46, 116, 101, 114, 109, 115, 32, 61, 32, 123, 125, 10, 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 111, 115, 46, -103, 101, 116, 99, 119, 100, 40, 41, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 99, 116, 120, 44, 32, 99, 111, 110, 116, 101, -120, 116, 46, 95, 95, 109, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 116, 120, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 98, 97, 115, 101, 67, 111, 110, 116, 101, 120, 116, 44, 32, 110, 101, 119, - 69, 110, 118, 86, 97, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 123, 125, 10, 99, 116, 120, 46, 95, 99, 116, 120, - 32, 61, 32, 98, 97, 115, 101, 67, 111, 110, 116, 101, 120, 116, 10, 99, 116, 120, 46, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 110, 101, 119, - 69, 110, 118, 86, 97, 114, 115, 32, 111, 114, 32, 98, 97, 115, 101, 67, 111, 110, 116, 101, 120, 116, 46, 101, 110, 118, 105, 114, 111, 110, 10, 99, -116, 120, 46, 116, 101, 114, 109, 115, 32, 61, 32, 123, 125, 10, 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 98, 97, 115, -101, 67, 111, 110, 116, 101, 120, 116, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 99, -116, 120, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 95, 95, 109, 116, 95, 117, 110, 99, 97, 99, 104, 101, 100, 41, 10, 114, 101, 116, 117, 114, -110, 32, 99, 116, 120, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, -108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, -108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, - 35, 118, 97, 108, 117, 101, 32, 100, 111, 10, 118, 97, 108, 117, 101, 91, 105, 93, 32, 61, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, -108, 117, 101, 91, 105, 93, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 118, 97, 108, 117, 101, - 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, -108, 117, 101, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, 100, 10, 99, 116, 120, 46, 116, 101, 114, 109, 115, 91, 107, 101, 121, 58, 108, -111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, -116, 101, 120, 116, 46, 99, 111, 112, 121, 70, 105, 108, 116, 101, 114, 115, 40, 99, 116, 120, 44, 32, 115, 114, 99, 41, 10, 99, 116, 120, 46, 116, -101, 114, 109, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 107, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 115, 114, 99, 46, 116, -101, 114, 109, 115, 41, 32, 100, 111, 10, 99, 116, 120, 46, 116, 101, 114, 109, 115, 91, 107, 93, 32, 61, 32, 118, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 109, 101, 114, 103, 101, 70, 105, 108, 116, 101, 114, 115, 40, - 99, 116, 120, 44, 32, 115, 114, 99, 41, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 115, 114, 99, 46, -116, 101, 114, 109, 115, 41, 32, 100, 111, 10, 105, 102, 32, 107, 32, 61, 61, 32, 34, 116, 97, 103, 115, 34, 32, 116, 104, 101, 110, 10, 99, 116, -120, 46, 116, 101, 114, 109, 115, 91, 107, 93, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 99, 116, 120, 46, 116, 101, 114, 109, -115, 91, 107, 93, 44, 32, 118, 41, 10, 101, 108, 115, 101, 10, 99, 116, 120, 46, 116, 101, 114, 109, 115, 91, 107, 93, 32, 61, 32, 118, 10, 101, -110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 98, 97, 115, 101, -100, 105, 114, 40, 99, 116, 120, 44, 32, 98, 97, 115, 101, 100, 105, 114, 41, 10, 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 32, 61, - 32, 98, 97, 115, 101, 100, 105, 114, 32, 111, 114, 32, 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 114, 101, 116, 117, 114, 110, 32, - 99, 116, 120, 46, 95, 98, 97, 115, 101, 100, 105, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 101, 120, -116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 99, 116, 120, 41, 10, 99, 116, 120, 46, 95, 99, 102, 103, 115, 101, 116, 32, 61, 32, 99, 111, 110, -102, 105, 103, 115, 101, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 99, 116, 120, 46, 95, 99, 102, 103, 115, 101, 116, 44, 32, 99, 116, 120, 46, -116, 101, 114, 109, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 101, 109, 112, 116, -121, 40, 99, 116, 120, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 101, 109, 112, 116, 121, 40, 99, 116, -120, 46, 95, 99, 102, 103, 115, 101, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, -102, 101, 116, 99, 104, 118, 97, 108, 117, 101, 40, 99, 116, 120, 44, 32, 107, 101, 121, 44, 32, 111, 110, 108, 121, 108, 111, 99, 97, 108, 41, 10, -105, 102, 32, 110, 111, 116, 32, 111, 110, 108, 121, 108, 111, 99, 97, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, -101, 32, 61, 32, 114, 97, 119, 103, 101, 116, 40, 99, 116, 120, 44, 32, 107, 101, 121, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, - 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 107, 101, 121, 41, 10, 105, 102, - 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 102, 101, 116, 99, 104, 40, 99, 116, 120, - 46, 95, 99, 102, 103, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 99, 116, 120, 46, 116, 101, 114, 109, 115, 44, 32, 99, 116, 120, 44, - 32, 111, 110, 108, 121, 108, 111, 99, 97, 108, 32, 97, 110, 100, 32, 99, 116, 120, 46, 95, 99, 102, 103, 115, 101, 116, 41, 10, 105, 102, 32, 118, - 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 114, 97, 119, 115, 101, 116, 40, 99, 116, 120, 44, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, - 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 99, 111, 110, 116, 101, 120, 116, 46, 95, - 95, 109, 116, 32, 61, 32, 123, 10, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 99, 111, 110, 116, 101, 120, 116, 46, 102, 101, 116, 99, 104, 118, - 97, 108, 117, 101, 10, 125, 10, 99, 111, 110, 116, 101, 120, 116, 46, 95, 95, 109, 116, 95, 117, 110, 99, 97, 99, 104, 101, 100, 32, 61, 32, 123, - 10, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 116, 120, 44, 32, 107, 101, 121, 41, 10, 108, -111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 107, 101, 121, 41, 10, 105, 102, - 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 112, 97, 114, 101, 110, 116, 32, 61, 32, 114, 97, 119, 103, 101, 116, 40, 99, 116, 120, 44, 32, 39, 95, 99, 116, 120, 39, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 102, 101, 116, 99, 104, 40, 112, 97, 114, 101, 110, 116, 46, - 95, 99, 102, 103, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 99, 116, 120, 46, 116, 101, 114, 109, 115, 44, 32, 99, 116, 120, 44, 32, -110, 105, 108, 41, 10, 101, 110, 100, 10, 125, 10, }; - -// src/base/container.lua -static const unsigned char builtin_script_21[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 32, 61, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, - 10, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 101, 115, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 110, 101, 119, 67, 108, 97, 115, 115, 40, 110, 97, 109, 101, 44, 32, 112, 97, 114, 101, 110, 116, - 44, 32, 101, 120, 116, 114, 97, 83, 99, 111, 112, 101, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 108, 97, 115, 115, 32, 61, 32, 112, 46, 99, -111, 110, 102, 105, 103, 115, 101, 116, 46, 110, 101, 119, 40, 112, 97, 114, 101, 110, 116, 41, 10, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 32, - 61, 32, 110, 97, 109, 101, 10, 99, 108, 97, 115, 115, 46, 112, 108, 117, 114, 97, 108, 78, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 58, 112, -108, 117, 114, 97, 108, 40, 41, 10, 99, 108, 97, 115, 115, 46, 99, 111, 110, 116, 97, 105, 110, 101, 100, 67, 108, 97, 115, 115, 101, 115, 32, 61, - 32, 123, 125, 10, 99, 108, 97, 115, 115, 46, 101, 120, 116, 114, 97, 83, 99, 111, 112, 101, 115, 32, 61, 32, 101, 120, 116, 114, 97, 83, 99, 111, -112, 101, 115, 10, 105, 102, 32, 112, 97, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -112, 97, 114, 101, 110, 116, 46, 99, 111, 110, 116, 97, 105, 110, 101, 100, 67, 108, 97, 115, 115, 101, 115, 44, 32, 99, 108, 97, 115, 115, 41, 10, -101, 110, 100, 10, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 101, 115, 91, 110, 97, 109, 101, 93, 32, 61, 32, 99, 108, - 97, 115, 115, 10, 114, 101, 116, 117, 114, 110, 32, 99, 108, 97, 115, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, -110, 116, 97, 105, 110, 101, 114, 46, 110, 101, 119, 40, 99, 108, 97, 115, 115, 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 115, -101, 108, 102, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 110, 101, 119, 40, 41, 10, 115, 101, 116, 109, 101, 116, 97, 116, - 97, 98, 108, 101, 40, 115, 101, 108, 102, 44, 32, 112, 46, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 109, 101, 116, 97, 116, 97, 98, 108, 101, - 40, 115, 101, 108, 102, 41, 41, 10, 115, 101, 108, 102, 46, 99, 108, 97, 115, 115, 32, 61, 32, 99, 108, 97, 115, 115, 10, 115, 101, 108, 102, 46, -110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 10, 115, 101, 108, 102, 46, 102, 105, 108, 101, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, - 10, 115, 101, 108, 102, 46, 115, 99, 114, 105, 112, 116, 32, 61, 32, 95, 83, 67, 82, 73, 80, 84, 10, 115, 101, 108, 102, 46, 98, 97, 115, 101, -100, 105, 114, 32, 61, 32, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 10, 115, 101, 108, 102, 46, 101, 120, 116, 101, 114, 110, 97, 108, 32, - 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 99, 104, 105, 108, 100, 67, 108, 97, 115, 115, 32, 105, 110, 32, 99, 111, 110, 116, 97, 105, -110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 67, 108, 97, 115, 115, 40, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, 115, 101, 108, -102, 91, 99, 104, 105, 108, 100, 67, 108, 97, 115, 115, 46, 112, 108, 117, 114, 97, 108, 78, 97, 109, 101, 93, 32, 61, 32, 123, 125, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, -105, 110, 101, 114, 46, 97, 100, 100, 67, 104, 105, 108, 100, 40, 115, 101, 108, 102, 44, 32, 99, 104, 105, 108, 100, 41, 10, 108, 111, 99, 97, 108, - 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 115, 101, 108, 102, 91, 99, 104, 105, 108, 100, 46, 99, 108, 97, 115, 115, 46, 112, 108, 117, -114, 97, 108, 78, 97, 109, 101, 93, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, - 99, 104, 105, 108, 100, 41, 10, 99, 104, 105, 108, 100, 114, 101, 110, 91, 99, 104, 105, 108, 100, 46, 110, 97, 109, 101, 93, 32, 61, 32, 99, 104, -105, 108, 100, 10, 99, 104, 105, 108, 100, 46, 112, 97, 114, 101, 110, 116, 32, 61, 32, 115, 101, 108, 102, 10, 99, 104, 105, 108, 100, 91, 115, 101, -108, 102, 46, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 93, 32, 61, 32, 115, 101, 108, 102, 10, 105, 102, 32, 115, 101, 108, 102, 46, 99, 108, - 97, 115, 115, 46, 97, 108, 105, 97, 115, 32, 116, 104, 101, 110, 10, 99, 104, 105, 108, 100, 91, 115, 101, 108, 102, 46, 99, 108, 97, 115, 115, 46, - 97, 108, 105, 97, 115, 93, 32, 61, 32, 115, 101, 108, 102, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, -111, 110, 116, 97, 105, 110, 101, 114, 46, 98, 97, 107, 101, 40, 115, 101, 108, 102, 41, 10, 105, 102, 32, 115, 101, 108, 102, 46, 95, 105, 115, 66, - 97, 107, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 10, 101, 110, 100, 10, 115, 101, 108, 102, 46, 95, -105, 115, 66, 97, 107, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 112, 46, 99, 111, 110, -116, 101, 120, 116, 46, 110, 101, 119, 40, 115, 101, 108, 102, 41, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, - 32, 112, 97, 105, 114, 115, 40, 115, 101, 108, 102, 41, 32, 100, 111, 10, 99, 116, 120, 91, 107, 101, 121, 93, 32, 61, 32, 118, 97, 108, 117, 101, - 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 114, 101, 110, 116, 32, 61, 32, 115, 101, 108, 102, 46, 112, 97, 114, 101, 110, 116, 10, -105, 102, 32, 112, 97, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 99, 116, 120, 91, 112, 97, 114, 101, 110, 116, 46, 99, 108, 97, 115, 115, 46, -110, 97, 109, 101, 93, 32, 61, 32, 112, 97, 114, 101, 110, 116, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 108, 97, 115, 115, 32, 105, 110, 32, - 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 67, 108, 97, 115, 115, 40, 115, 101, 108, 102, 46, 99, 108, - 97, 115, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 99, 104, 105, 108, 100, 32, 105, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 101, - 97, 99, 104, 67, 104, 105, 108, 100, 40, 115, 101, 108, 102, 44, 32, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, 99, 104, 105, 108, 100, 46, 112, - 97, 114, 101, 110, 116, 32, 61, 32, 99, 116, 120, 10, 99, 104, 105, 108, 100, 91, 115, 101, 108, 102, 46, 99, 108, 97, 115, 115, 46, 110, 97, 109, -101, 93, 32, 61, 32, 99, 116, 120, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 115, 101, 108, 102, 46, 99, 108, - 97, 115, 115, 46, 98, 97, 107, 101, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 115, 101, 108, -102, 46, 99, 108, 97, 115, 115, 46, 98, 97, 107, 101, 40, 99, 116, 120, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 116, 120, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 98, 97, 107, 101, 67, 104, 105, 108, -100, 114, 101, 110, 40, 115, 101, 108, 102, 41, 10, 102, 111, 114, 32, 99, 108, 97, 115, 115, 32, 105, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, -114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 67, 108, 97, 115, 115, 40, 115, 101, 108, 102, 46, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, -108, 111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 115, 101, 108, 102, 91, 99, 108, 97, 115, 115, 46, 112, 108, 117, 114, - 97, 108, 78, 97, 109, 101, 93, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 104, 105, 108, 100, 114, 101, 110, 32, 100, 111, 10, -108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 98, 97, 107, 101, 40, 99, 104, 105, 108, 100, -114, 101, 110, 91, 105, 93, 41, 10, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 32, 61, 32, 99, 116, 120, 10, 99, 104, 105, 108, 100, 114, -101, 110, 91, 99, 116, 120, 46, 110, 97, 109, 101, 93, 32, 61, 32, 99, 116, 120, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 67, 97, 110, 67, 111, 110, 116, 97, 105, -110, 40, 99, 108, 97, 115, 115, 44, 32, 115, 99, 111, 112, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 115, 99, 111, 112, 101, 41, 32, 61, - 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 115, 99, 111, 112, 101, - 32, 100, 111, 10, 105, 102, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 67, 97, 110, 67, 111, 110, 116, 97, 105, 110, - 40, 99, 108, 97, 115, 115, 44, 32, 115, 99, 111, 112, 101, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, -117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, - 99, 104, 105, 108, 100, 32, 105, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 67, 108, 97, 115, -115, 40, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, 105, 102, 32, 40, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 67, - 97, 110, 67, 111, 110, 116, 97, 105, 110, 40, 99, 104, 105, 108, 100, 44, 32, 115, 99, 111, 112, 101, 41, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 32, - 61, 61, 32, 115, 99, 111, 112, 101, 32, 111, 114, 32, 99, 108, 97, 115, 115, 46, 97, 108, 105, 97, 115, 32, 61, 61, 32, 115, 99, 111, 112, 101, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 99, 108, 97, 115, 115, 46, 101, -120, 116, 114, 97, 83, 99, 111, 112, 101, 115, 32, 97, 110, 100, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 99, 108, - 97, 115, 115, 46, 101, 120, 116, 114, 97, 83, 99, 111, 112, 101, 115, 44, 32, 115, 99, 111, 112, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 73, 115, 65, 40, 99, 108, 97, 115, 115, 44, - 32, 115, 99, 111, 112, 101, 41, 10, 119, 104, 105, 108, 101, 32, 99, 108, 97, 115, 115, 32, 100, 111, 10, 105, 102, 32, 99, 108, 97, 115, 115, 46, -110, 97, 109, 101, 32, 61, 61, 32, 115, 99, 111, 112, 101, 32, 111, 114, 32, 99, 108, 97, 115, 115, 46, 97, 108, 105, 97, 115, 32, 61, 61, 32, -115, 99, 111, 112, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 99, 108, 97, 115, 115, - 32, 61, 32, 99, 108, 97, 115, 115, 46, 112, 97, 114, 101, 110, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, -100, 67, 108, 97, 115, 115, 40, 99, 108, 97, 115, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 99, -108, 97, 115, 115, 46, 99, 111, 110, 116, 97, 105, 110, 101, 100, 67, 108, 97, 115, 115, 101, 115, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, - 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 105, -102, 32, 105, 32, 60, 61, 32, 35, 99, 104, 105, 108, 100, 114, 101, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 99, 104, 105, -108, 100, 114, 101, 110, 91, 105, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, -110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 40, 115, 101, 108, 102, 44, 32, 99, 108, 97, 115, 115, 41, 10, 108, -111, 99, 97, 108, 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 115, 101, 108, 102, 91, 99, 108, 97, 115, 115, 46, 112, 108, 117, 114, 97, -108, 78, 97, 109, 101, 93, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, -111, 110, 32, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 105, 102, 32, 105, 32, 60, 61, 32, 35, 99, 104, 105, 108, 100, 114, 101, -110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 103, 101, 116, 67, 104, 105, 108, -100, 40, 115, 101, 108, 102, 44, 32, 99, 108, 97, 115, 115, 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 99, 104, 105, 108, 100, -114, 101, 110, 32, 61, 32, 115, 101, 108, 102, 91, 99, 108, 97, 115, 115, 46, 112, 108, 117, 114, 97, 108, 78, 97, 109, 101, 93, 10, 114, 101, 116, -117, 114, 110, 32, 99, 104, 105, 108, 100, 114, 101, 110, 91, 110, 97, 109, 101, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 103, 101, 116, 67, 108, 97, 115, 115, 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, - 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 101, 115, 91, 110, 97, 109, 101, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 104, 97, 115, 67, 104, 105, 108, 100, 40, 115, 101, 108, 102, 44, 32, 99, 108, - 97, 115, 115, 44, 32, 102, 117, 110, 99, 41, 10, 102, 111, 114, 32, 99, 104, 105, 108, 100, 32, 105, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, -114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 40, 115, 101, 108, 102, 44, 32, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, 105, 102, 32, 102, -117, 110, 99, 40, 99, 104, 105, 108, 100, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 118, 97, 108, 105, 100, - 97, 116, 101, 40, 115, 101, 108, 102, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 115, 101, 108, 102, 46, 99, 108, 97, 115, 115, 46, 118, 97, 108, -105, 100, 97, 116, 101, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 115, 101, 108, 102, 46, 99, -108, 97, 115, 115, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 115, 101, 108, 102, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 118, 97, 108, 105, 100, 97, 116, 101, 67, 104, 105, 108, 100, 114, 101, 110, 40, -115, 101, 108, 102, 41, 10, 102, 111, 114, 32, 99, 108, 97, 115, 115, 32, 105, 110, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, -104, 67, 104, 105, 108, 100, 67, 108, 97, 115, 115, 40, 115, 101, 108, 102, 46, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, - 32, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 115, 101, 108, 102, 91, 99, 108, 97, 115, 115, 46, 112, 108, 117, 114, 97, 108, 78, 97, 109, -101, 93, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 104, 105, 108, 100, 114, 101, 110, 32, 100, 111, 10, 99, 111, 110, 116, 97, -105, 110, 101, 114, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 99, 104, 105, 108, 100, 114, 101, 110, 91, 105, 93, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, }; - -// src/base/option.lua -static const unsigned char builtin_script_22[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 111, 112, 116, 105, 111, 110, 32, 61, 32, 123, 125, 10, -108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 111, 112, 116, 105, 111, 110, 10, 108, 111, 99, 97, 108, 32, 95, 79, 80, 84, 73, 79, 78, - 83, 95, 109, 101, 116, 97, 116, 97, 98, 108, 101, 32, 61, 32, 123, 10, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 116, 98, 108, 44, 32, 107, 101, 121, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 107, 101, 121, 41, 32, 61, 61, 32, 34, 115, 116, -114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 107, 101, 121, 32, 61, 32, 107, 101, 121, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 114, 97, 119, 103, 101, 116, 40, 116, 98, 108, 44, 32, 107, 101, 121, 41, 10, 101, 110, 100, 44, 10, 95, 95, -110, 101, 119, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 116, 98, 108, 44, 32, 107, 101, 121, 44, 32, 118, 97, -108, 117, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 107, 101, 121, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, -101, 110, 10, 107, 101, 121, 32, 61, 32, 107, 101, 121, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, 100, 10, 114, 97, 119, 115, 101, 116, 40, -116, 98, 108, 44, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 125, 10, 95, 79, 80, 84, 73, 79, 78, 83, 32, - 61, 32, 123, 125, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 95, 79, 80, 84, 73, 79, 78, 83, 44, 32, 95, 79, 80, 84, - 73, 79, 78, 83, 95, 109, 101, 116, 97, 116, 97, 98, 108, 101, 41, 10, 102, 111, 114, 32, 105, 44, 32, 97, 114, 103, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 95, 65, 82, 71, 86, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 10, -108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 97, 114, 103, 58, 102, 105, 110, 100, 40, 34, 61, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, - 10, 105, 102, 32, 105, 32, 116, 104, 101, 110, 10, 107, 101, 121, 32, 61, 32, 97, 114, 103, 58, 115, 117, 98, 40, 49, 44, 32, 105, 32, 45, 32, - 49, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 97, 114, 103, 58, 115, 117, 98, 40, 105, 32, 43, 32, 49, 41, 10, 101, 108, 115, 101, 10, 107, -101, 121, 32, 61, 32, 97, 114, 103, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 34, 10, 101, 110, 100, 10, 105, 102, 32, 107, 101, 121, 58, 115, -116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 47, 34, 41, 32, 116, 104, 101, 110, 10, 95, 79, 80, 84, 73, 79, 78, 83, 91, 107, 101, 121, - 58, 115, 117, 98, 40, 50, 41, 93, 32, 61, 32, 118, 97, 108, 117, 101, 10, 101, 108, 115, 101, 105, 102, 32, 107, 101, 121, 58, 115, 116, 97, 114, -116, 115, 119, 105, 116, 104, 40, 34, 45, 45, 34, 41, 32, 116, 104, 101, 110, 10, 95, 79, 80, 84, 73, 79, 78, 83, 91, 107, 101, 121, 58, 115, -117, 98, 40, 51, 41, 93, 32, 61, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 108, 105, 115, 116, 32, 61, 32, -123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 40, 111, 112, 116, 41, 10, 108, 111, 99, 97, 108, 32, 109, 105, 115, -115, 105, 110, 103, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 101, 108, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 123, 32, 34, 100, -101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 44, 32, 34, 116, 114, 105, 103, 103, 101, 114, 34, 32, 125, 41, 32, 100, 111, 10, 105, 102, 32, - 40, 110, 111, 116, 32, 111, 112, 116, 91, 102, 105, 101, 108, 100, 93, 41, 32, 116, 104, 101, 110, 10, 109, 105, 115, 115, 105, 110, 103, 32, 61, 32, -102, 105, 101, 108, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 40, 109, 105, 115, 115, 105, 110, 103, 41, 32, 116, 104, 101, 110, 10, -101, 114, 114, 111, 114, 40, 34, 111, 112, 116, 105, 111, 110, 32, 110, 101, 101, 100, 115, 32, 97, 32, 34, 32, 46, 46, 32, 109, 105, 115, 115, 105, -110, 103, 44, 32, 51, 41, 10, 101, 110, 100, 10, 112, 46, 111, 112, 116, 105, 111, 110, 46, 108, 105, 115, 116, 91, 111, 112, 116, 46, 116, 114, 105, -103, 103, 101, 114, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 111, 112, 116, 10, 105, 102, 32, 111, 112, 116, 46, 100, 101, 102, 97, 117, -108, 116, 32, 97, 110, 100, 32, 110, 111, 116, 32, 95, 79, 80, 84, 73, 79, 78, 83, 91, 111, 112, 116, 46, 116, 114, 105, 103, 103, 101, 114, 93, - 32, 116, 104, 101, 110, 10, 95, 79, 80, 84, 73, 79, 78, 83, 91, 111, 112, 116, 46, 116, 114, 105, 103, 103, 101, 114, 93, 32, 61, 32, 111, 112, -116, 46, 100, 101, 102, 97, 117, 108, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, - 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 111, 112, 116, 105, 111, 110, 46, 108, 105, 115, 116, 91, 110, 97, 109, 101, - 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 97, 99, 104, 40, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, -121, 115, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 105, 111, 110, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, -112, 46, 111, 112, 116, 105, 111, 110, 46, 108, 105, 115, 116, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 107, -101, 121, 115, 44, 32, 111, 112, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, 114, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, -111, 114, 116, 40, 107, 101, 121, 115, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 111, 112, 116, 105, 111, -110, 46, 108, 105, 115, 116, 91, 107, 101, 121, 115, 91, 105, 93, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 118, 97, 108, 117, 101, 115, 41, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, -117, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, - 32, 61, 32, 112, 46, 111, 112, 116, 105, 111, 110, 46, 103, 101, 116, 40, 107, 101, 121, 41, 10, 105, 102, 32, 40, 110, 111, 116, 32, 111, 112, 116, - 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 44, 32, 34, 105, 110, 118, 97, 108, 105, 100, 32, 111, 112, -116, 105, 111, 110, 32, 39, 34, 32, 46, 46, 32, 107, 101, 121, 32, 46, 46, 32, 34, 39, 34, 10, 101, 110, 100, 10, 105, 102, 32, 40, 111, 112, -116, 46, 118, 97, 108, 117, 101, 32, 97, 110, 100, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 34, 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 44, 32, 34, 110, 111, 32, 118, 97, 108, 117, 101, 32, 115, 112, 101, 99, 105, 102, 105, 101, 100, 32, -102, 111, 114, 32, 111, 112, 116, 105, 111, 110, 32, 39, 34, 32, 46, 46, 32, 107, 101, 121, 32, 46, 46, 32, 34, 39, 34, 10, 101, 110, 100, 10, -105, 102, 32, 111, 112, 116, 46, 97, 108, 108, 111, 119, 101, 100, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 111, 117, 110, 100, 32, - 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 95, 44, 32, 109, 97, 116, 99, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, -112, 116, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 100, 111, 10, 105, 102, 32, 109, 97, 116, 99, 104, 91, 49, 93, 32, 61, 61, 32, 118, 97, -108, 117, 101, 32, 116, 104, 101, 110, 10, 102, 111, 117, 110, 100, 32, 61, 32, 116, 114, 117, 101, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, -101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, -115, 101, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 105, 110, 118, 97, 108, 105, 100, 32, 118, 97, 108, 117, 101, - 32, 39, 37, 115, 39, 32, 102, 111, 114, 32, 111, 112, 116, 105, 111, 110, 32, 39, 37, 115, 39, 34, 44, 32, 118, 97, 108, 117, 101, 44, 32, 107, -101, 121, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, -}; - -// src/base/action.lua -static const unsigned char builtin_script_23[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 123, 125, 10, -108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 10, 95, 65, 67, 84, 73, 79, 78, 32, - 61, 32, 110, 105, 108, 10, 95, 65, 82, 71, 83, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, 97, 114, 103, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 95, 65, 82, 71, 86, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 97, 114, 103, 58, 115, 116, 97, 114, 116, -115, 119, 105, 116, 104, 40, 34, 47, 34, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 97, 114, 103, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, -104, 40, 34, 45, 45, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 95, 65, 67, 84, 73, 79, 78, 32, 116, 104, 101, 110, - 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 32, 97, 114, 103, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 95, 65, 82, 71, 83, 44, 32, 97, 114, 103, 41, 10, 95, 65, 82, 71, 83, 91, 97, 114, 103, 93, 32, 61, 32, 97, 114, 103, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 97, 99, 116, 105, 111, 110, 46, 97, 100, 100, 40, 97, 99, 116, 41, 10, 108, 111, 99, 97, 108, 32, 109, 105, 115, 115, 105, -110, 103, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 101, 108, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 123, 34, 100, 101, 115, 99, -114, 105, 112, 116, 105, 111, 110, 34, 44, 32, 34, 116, 114, 105, 103, 103, 101, 114, 34, 125, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, - 97, 99, 116, 91, 102, 105, 101, 108, 100, 93, 32, 116, 104, 101, 110, 10, 109, 105, 115, 115, 105, 110, 103, 32, 61, 32, 102, 105, 101, 108, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 109, 105, 115, 115, 105, 110, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 97, -109, 101, 32, 61, 32, 97, 99, 116, 46, 116, 114, 105, 103, 103, 101, 114, 32, 111, 114, 32, 34, 34, 10, 101, 114, 114, 111, 114, 40, 115, 116, 114, -105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 97, 99, 116, 105, 111, 110, 32, 34, 37, 115, 34, 32, 110, 101, 101, 100, 115, 32, 97, 32, - 32, 37, 115, 39, 44, 32, 110, 97, 109, 101, 44, 32, 109, 105, 115, 115, 105, 110, 103, 41, 44, 32, 51, 41, 10, 101, 110, 100, 10, 105, 102, 32, - 97, 99, 116, 46, 111, 115, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 97, 99, -116, 46, 116, 114, 105, 103, 103, 101, 114, 44, 32, 34, 97, 99, 116, 105, 111, 110, 32, 39, 34, 32, 46, 46, 32, 97, 99, 116, 46, 116, 114, 105, -103, 103, 101, 114, 32, 46, 46, 32, 34, 39, 32, 115, 101, 116, 115, 32, 39, 111, 115, 39, 32, 102, 105, 101, 108, 100, 44, 32, 119, 104, 105, 99, -104, 32, 105, 115, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 44, 32, 117, 115, 101, 32, 39, 116, 97, 114, 103, 101, 116, 111, 115, 39, 32, -105, 110, 115, 116, 101, 97, 100, 46, 34, 41, 10, 97, 99, 116, 46, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 97, 99, 116, 46, 111, 115, - 10, 97, 99, 116, 46, 111, 115, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 97, - 99, 116, 46, 116, 114, 105, 103, 103, 101, 114, 93, 32, 61, 32, 97, 99, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, - 99, 116, 105, 111, 110, 46, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 97, 32, 61, - 32, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 110, 97, 109, 101, 93, 10, 105, 102, 32, 40, 97, 46, 111, 110, 73, 110, 105, 116, -105, 97, 108, 105, 122, 101, 41, 32, 116, 104, 101, 110, 10, 97, 46, 111, 110, 73, 110, 105, 116, 105, 97, 108, 105, 122, 101, 40, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 99, 116, 105, 111, 110, 46, 99, 97, 108, 108, 40, 110, 97, 109, 101, 41, - 10, 108, 111, 99, 97, 108, 32, 97, 32, 61, 32, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 110, 97, 109, 101, 93, 10, 105, 102, - 32, 97, 46, 111, 110, 83, 116, 97, 114, 116, 32, 116, 104, 101, 110, 10, 97, 46, 111, 110, 83, 116, 97, 114, 116, 40, 41, 10, 101, 110, 100, 10, -102, 111, 114, 32, 119, 107, 115, 32, 105, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 101, 97, 99, 104, 87, 111, 114, 107, 115, 112, 97, 99, -101, 40, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 97, 46, 111, 110, 87, -111, 114, 107, 115, 112, 97, 99, 101, 32, 111, 114, 32, 97, 46, 111, 110, 83, 111, 108, 117, 116, 105, 111, 110, 32, 111, 114, 32, 97, 46, 111, 110, -115, 111, 108, 117, 116, 105, 111, 110, 10, 105, 102, 32, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 97, 110, 100, 32, 110, 111, 116, 32, -119, 107, 115, 46, 101, 120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, 110, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, -115, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, - 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 110, 80, 114, 111, 106, 101, 99, -116, 32, 61, 32, 97, 46, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 111, 114, 32, 97, 46, 111, 110, 112, 114, 111, 106, 101, 99, 116, 10, 105, -102, 32, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 97, 110, 100, 32, 110, 111, 116, 32, 112, 114, 106, 46, 101, 120, 116, 101, 114, 110, 97, 108, - 32, 116, 104, 101, 110, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 111, 114, 32, 114, 117, 108, 101, 32, 105, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 101, 97, 99, 104, 82, 117, 108, 101, 40, 41, - 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 111, 110, 82, 117, 108, 101, 32, 61, 32, 97, 46, 111, 110, 82, 117, 108, 101, 32, 111, 114, 32, 97, - 46, 111, 110, 114, 117, 108, 101, 10, 105, 102, 32, 111, 110, 82, 117, 108, 101, 32, 97, 110, 100, 32, 110, 111, 116, 32, 114, 117, 108, 101, 46, 101, -120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, 110, 10, 111, 110, 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 105, 102, 32, 97, 46, 101, 120, 101, 99, 117, 116, 101, 32, 116, 104, 101, 110, 10, 97, 46, 101, 120, 101, 99, 117, 116, 101, 40, 41, 10, -101, 110, 100, 10, 105, 102, 32, 97, 46, 111, 110, 69, 110, 100, 32, 116, 104, 101, 110, 10, 97, 46, 111, 110, 69, 110, 100, 40, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, -114, 101, 116, 117, 114, 110, 32, 97, 99, 116, 105, 111, 110, 46, 103, 101, 116, 40, 95, 65, 67, 84, 73, 79, 78, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 97, 99, 116, 105, 111, 110, 46, 103, 101, 116, 40, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, 97, 109, 101, - 32, 97, 110, 100, 32, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 110, 103, 34, 41, 32, 116, 104, 101, 110, 10, 110, 97, -109, 101, 32, 61, 32, 110, 97, 109, 101, 58, 115, 117, 98, 40, 49, 44, 32, 45, 51, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, - 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 110, 97, 109, 101, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 97, 99, 116, 105, 111, 110, 46, 101, 97, 99, 104, 40, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 123, 32, 125, 10, 102, -111, 114, 32, 95, 44, 32, 97, 99, 116, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 41, - 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 107, 101, 121, 115, 44, 32, 97, 99, 116, 46, 116, 114, 105, 103, 103, -101, 114, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 107, 101, 121, 115, 41, 10, 108, 111, 99, 97, 108, 32, 105, - 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, - 10, 114, 101, 116, 117, 114, 110, 32, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 107, 101, 121, 115, 91, 105, 93, 93, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 99, 116, 105, 111, 110, 46, 105, 115, 67, 111, 110, 102, 105, 103, 117, 114, - 97, 98, 108, 101, 40, 115, 101, 108, 102, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 101, 108, 102, 32, 116, 104, 101, 110, 10, 115, 101, 108, 102, - 32, 61, 32, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 32, 111, 114, 32, 123, 125, 10, 101, 110, 100, 10, 105, 102, - 32, 115, 101, 108, 102, 46, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 111, 114, 32, 115, 101, 108, 102, 46, 111, 110, 83, 111, 108, 117, -116, 105, 111, 110, 32, 111, 114, 32, 115, 101, 108, 102, 46, 111, 110, 115, 111, 108, 117, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 115, 101, 108, 102, 46, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 111, -114, 32, 115, 101, 108, 102, 46, 111, 110, 112, 114, 111, 106, 101, 99, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, -101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 97, 99, 116, 105, 111, 110, 46, 115, 101, 116, 40, 110, 97, 109, 101, 41, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 32, 110, 97, 109, 101, 10, -108, 111, 99, 97, 108, 32, 97, 99, 116, 32, 61, 32, 97, 99, 116, 105, 111, 110, 46, 103, 101, 116, 40, 110, 97, 109, 101, 41, 10, 105, 102, 32, - 97, 99, 116, 32, 116, 104, 101, 110, 10, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 32, 61, 32, 97, 99, 116, 46, 116, 97, 114, 103, 101, 116, -111, 115, 32, 111, 114, 32, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 10, 101, 110, 100, 10, 105, 102, 32, 97, 99, 116, 32, 97, 110, 100, 32, - 97, 99, 116, 46, 109, 111, 100, 117, 108, 101, 32, 116, 104, 101, 110, 10, 114, 101, 113, 117, 105, 114, 101, 40, 97, 99, 116, 46, 109, 111, 100, 117, -108, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 99, 116, 105, 111, 110, 46, 115, 117, 112, 112, -111, 114, 116, 115, 40, 102, 101, 97, 116, 117, 114, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 101, 97, 116, 117, 114, 101, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 101, 108, 102, 32, 61, 32, 97, - 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 101, 108, 102, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 115, 101, 108, 102, 46, 118, 97, -108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 97, 110, 100, 32, 110, 111, 116, 32, 115, 101, 108, 102, 46, 118, 97, 108, 105, 100, - 95, 107, 105, 110, 100, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 115, -101, 108, 102, 46, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 97, 110, 100, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 116, 97, 105, 110, 115, 40, 115, 101, 108, 102, 46, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 44, 32, 102, 101, 97, -116, 117, 114, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 115, 101, -108, 102, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 97, 110, 100, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, -115, 40, 115, 101, 108, 102, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 44, 32, 102, 101, 97, 116, 117, 114, 101, 41, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, 117, 112, 112, 111, 114, 116, 115, 99, 111, 110, -102, 105, 103, 40, 97, 99, 116, 105, 111, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 97, 99, 116, 105, 111, 110, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 97, 99, 116, 105, 111, 110, 46, 115, -117, 112, 112, 111, 114, 116, 115, 99, 111, 110, 102, 105, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 97, 99, 116, 105, 111, 110, - 46, 115, 117, 112, 112, 111, 114, 116, 115, 99, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, -116, 114, 117, 101, 10, 101, 110, 100, 10, }; - -// src/base/api.lua -static const unsigned char builtin_script_24[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 97, 112, 105, 32, 61, 32, 123, 125, 10, 108, 111, 99, - 97, 108, 32, 97, 112, 105, 32, 61, 32, 112, 46, 97, 112, 105, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 32, 61, - 32, 112, 46, 99, 111, 110, 102, 105, 103, 115, 101, 116, 10, 97, 112, 105, 46, 115, 99, 111, 112, 101, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 97, 112, 105, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 40, 99, 111, 110, 116, 97, 105, 110, 101, 114, 78, 97, 109, 101, - 44, 32, 112, 97, 114, 101, 110, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 44, 32, 101, 120, 116, 114, 97, 83, 99, 111, 112, 101, 115, 41, 10, -108, 111, 99, 97, 108, 32, 99, 108, 97, 115, 115, 44, 32, 101, 114, 114, 32, 61, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 110, -101, 119, 67, 108, 97, 115, 115, 40, 99, 111, 110, 116, 97, 105, 110, 101, 114, 78, 97, 109, 101, 44, 32, 112, 97, 114, 101, 110, 116, 67, 111, 110, -116, 97, 105, 110, 101, 114, 44, 32, 101, 120, 116, 114, 97, 83, 99, 111, 112, 101, 115, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 108, 97, 115, -115, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, 50, 41, 10, 101, 110, 100, 10, 95, 71, 91, 99, 111, 110, 116, - 97, 105, 110, 101, 114, 78, 97, 109, 101, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, -108, 32, 99, 32, 61, 32, 97, 112, 105, 46, 95, 115, 101, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 99, 108, 97, 115, 115, 44, 32, 110, - 97, 109, 101, 41, 10, 105, 102, 32, 97, 112, 105, 46, 95, 105, 115, 73, 110, 99, 108, 117, 100, 105, 110, 103, 69, 120, 116, 101, 114, 110, 97, 108, - 32, 116, 104, 101, 110, 10, 99, 46, 101, 120, 116, 101, 114, 110, 97, 108, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 99, 10, 101, 110, 100, 10, 95, 71, 91, 34, 101, 120, 116, 101, 114, 110, 97, 108, 34, 32, 46, 46, 32, 99, 111, 110, 116, 97, 105, -110, 101, 114, 78, 97, 109, 101, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, - 99, 32, 61, 32, 95, 71, 91, 99, 111, 110, 116, 97, 105, 110, 101, 114, 78, 97, 109, 101, 93, 40, 110, 97, 109, 101, 41, 10, 99, 46, 101, 120, -116, 101, 114, 110, 97, 108, 32, 61, 32, 116, 114, 117, 101, 10, 114, 101, 116, 117, 114, 110, 32, 99, 10, 101, 110, 100, 10, 112, 46, 97, 108, 105, - 97, 115, 40, 95, 71, 44, 32, 34, 101, 120, 116, 101, 114, 110, 97, 108, 34, 32, 46, 46, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 78, 97, -109, 101, 44, 32, 34, 101, 120, 116, 101, 114, 110, 97, 108, 34, 32, 46, 46, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 78, 97, 109, 101, 58, - 99, 97, 112, 105, 116, 97, 108, 105, 122, 101, 100, 40, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 108, 97, 115, 115, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 105, 110, 99, 108, 117, 100, 101, 101, 120, 116, 101, 114, 110, 97, 108, 40, 102, 110, 97, 109, 101, 41, 10, -108, 111, 99, 97, 108, 32, 102, 117, 108, 108, 80, 97, 116, 104, 32, 61, 32, 112, 46, 102, 105, 110, 100, 80, 114, 111, 106, 101, 99, 116, 83, 99, -114, 105, 112, 116, 40, 102, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 119, 97, 115, 73, 110, 99, 108, 117, 100, 105, 110, 103, 69, 120, -116, 101, 114, 110, 97, 108, 32, 61, 32, 97, 112, 105, 46, 95, 105, 115, 73, 110, 99, 108, 117, 100, 105, 110, 103, 69, 120, 116, 101, 114, 110, 97, -108, 10, 97, 112, 105, 46, 95, 105, 115, 73, 110, 99, 108, 117, 100, 105, 110, 103, 69, 120, 116, 101, 114, 110, 97, 108, 32, 61, 32, 116, 114, 117, -101, 10, 102, 110, 97, 109, 101, 32, 61, 32, 102, 117, 108, 108, 80, 97, 116, 104, 32, 111, 114, 32, 102, 110, 97, 109, 101, 10, 100, 111, 102, 105, -108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 97, 112, 105, 46, 95, 105, 115, 73, 110, 99, 108, 117, 100, 105, 110, 103, 69, 120, 116, 101, 114, 110, - 97, 108, 32, 61, 32, 119, 97, 115, 73, 110, 99, 108, 117, 100, 105, 110, 103, 69, 120, 116, 101, 114, 110, 97, 108, 10, 101, 110, 100, 10, 112, 46, - 97, 108, 105, 97, 115, 40, 95, 71, 44, 32, 34, 105, 110, 99, 108, 117, 100, 101, 101, 120, 116, 101, 114, 110, 97, 108, 34, 44, 32, 34, 105, 110, - 99, 108, 117, 100, 101, 69, 120, 116, 101, 114, 110, 97, 108, 34, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 114, 111, 111, -116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 108, -111, 98, 97, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 95, 115, 101, 116, 67, 111, 110, 116, 97, 105, -110, 101, 114, 40, 99, 108, 97, 115, 115, 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 115, 116, 97, 110, 99, 101, 10, -105, 102, 32, 110, 97, 109, 101, 32, 61, 61, 32, 34, 42, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 97, 112, 105, 46, 95, -115, 101, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 99, 108, 97, 115, 115, 46, 112, 97, 114, 101, 110, 116, 41, 10, 101, 110, 100, 10, 105, -102, 32, 110, 111, 116, 32, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 105, 110, 115, 116, 97, 110, 99, 101, 32, 61, 32, 97, 112, 105, 46, 115, - 99, 111, 112, 101, 91, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 105, 110, 115, 116, 97, 110, 99, 101, - 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 110, 111, 32, 34, 32, 46, 46, 32, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 32, - 46, 46, 32, 34, 32, 105, 110, 32, 115, 99, 111, 112, 101, 34, 44, 32, 51, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 112, 97, 114, 101, 110, 116, 10, 105, 102, 32, 110, 111, 116, 32, 105, 110, 115, 116, 97, 110, 99, 101, 32, 97, 110, 100, 32, 99, 108, 97, 115, -115, 46, 112, 97, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 112, 97, 114, 101, 110, 116, 32, 61, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, - 91, 99, 108, 97, 115, 115, 46, 112, 97, 114, 101, 110, 116, 46, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 114, 101, 110, -116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 110, 111, 32, 34, 32, 46, 46, 32, 99, 108, 97, 115, 115, 46, 112, 97, 114, 101, -110, 116, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 32, 105, 110, 32, 115, 99, 111, 112, 101, 34, 44, 32, 51, 41, 10, 101, 110, 100, 10, 105, -110, 115, 116, 97, 110, 99, 101, 32, 61, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 103, 101, 116, 67, 104, 105, 108, 100, 40, 112, - 97, 114, 101, 110, 116, 44, 32, 99, 108, 97, 115, 115, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 115, 116, 97, -110, 99, 101, 32, 116, 104, 101, 110, 10, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 105, 110, 115, -116, 97, 110, 99, 101, 44, 32, 123, 125, 44, 32, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, -111, 116, 32, 105, 110, 115, 116, 97, 110, 99, 101, 32, 116, 104, 101, 110, 10, 105, 110, 115, 116, 97, 110, 99, 101, 32, 61, 32, 99, 108, 97, 115, -115, 46, 110, 101, 119, 40, 110, 97, 109, 101, 44, 32, 112, 97, 114, 101, 110, 116, 41, 10, 105, 102, 32, 112, 97, 114, 101, 110, 116, 32, 116, 104, -101, 110, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 97, 100, 100, 67, 104, 105, 108, 100, 40, 112, 97, 114, 101, 110, 116, 44, 32, -105, 110, 115, 116, 97, 110, 99, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 97, 112, 105, 46, 95, 99, 108, 101, 97, 114, 67, 111, 110, 116, - 97, 105, 110, 101, 114, 67, 104, 105, 108, 100, 114, 101, 110, 40, 99, 108, 97, 115, 115, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 108, 97, 115, -115, 46, 112, 108, 97, 99, 101, 104, 111, 108, 100, 101, 114, 32, 116, 104, 101, 110, 10, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, 114, -114, 101, 110, 116, 32, 61, 32, 105, 110, 115, 116, 97, 110, 99, 101, 10, 101, 110, 100, 10, 119, 104, 105, 108, 101, 32, 105, 110, 115, 116, 97, 110, - 99, 101, 32, 100, 111, 10, 97, 112, 105, 46, 115, 99, 111, 112, 101, 91, 105, 110, 115, 116, 97, 110, 99, 101, 46, 99, 108, 97, 115, 115, 46, 110, - 97, 109, 101, 93, 32, 61, 32, 105, 110, 115, 116, 97, 110, 99, 101, 10, 105, 102, 32, 105, 110, 115, 116, 97, 110, 99, 101, 46, 99, 108, 97, 115, -115, 46, 97, 108, 105, 97, 115, 32, 116, 104, 101, 110, 10, 97, 112, 105, 46, 115, 99, 111, 112, 101, 91, 105, 110, 115, 116, 97, 110, 99, 101, 46, - 99, 108, 97, 115, 115, 46, 97, 108, 105, 97, 115, 93, 32, 61, 32, 105, 110, 115, 116, 97, 110, 99, 101, 10, 101, 110, 100, 10, 105, 110, 115, 116, - 97, 110, 99, 101, 32, 61, 32, 105, 110, 115, 116, 97, 110, 99, 101, 46, 112, 97, 114, 101, 110, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 97, 112, 105, 46, 95, 99, 108, 101, 97, 114, 67, 111, 110, 116, 97, 105, 110, 101, 114, 67, 104, 105, 108, 100, 114, 101, 110, 40, 99, 108, 97, -115, 115, 41, 10, 102, 111, 114, 32, 99, 104, 105, 108, 100, 67, 108, 97, 115, 115, 32, 105, 110, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, -114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 67, 108, 97, 115, 115, 40, 99, 108, 97, 115, 115, 41, 32, 100, 111, 10, 97, 112, 105, 46, 115, - 99, 111, 112, 101, 91, 99, 104, 105, 108, 100, 67, 108, 97, 115, 115, 46, 110, 97, 109, 101, 93, 32, 61, 32, 110, 105, 108, 10, 105, 102, 32, 99, -104, 105, 108, 100, 67, 108, 97, 115, 115, 46, 97, 108, 105, 97, 115, 32, 116, 104, 101, 110, 10, 97, 112, 105, 46, 115, 99, 111, 112, 101, 91, 99, -104, 105, 108, 100, 67, 108, 97, 115, 115, 46, 97, 108, 105, 97, 115, 93, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 97, 112, 105, 46, 95, - 99, 108, 101, 97, 114, 67, 111, 110, 116, 97, 105, 110, 101, 114, 67, 104, 105, 108, 100, 114, 101, 110, 40, 99, 104, 105, 108, 100, 67, 108, 97, 115, -115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 40, 102, 105, 101, 108, 100, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 10, -105, 102, 32, 110, 111, 116, 32, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 109, 105, 115, 115, 105, 110, 103, 32, -110, 97, 109, 101, 34, 44, 32, 50, 41, 10, 101, 110, 100, 10, 105, 102, 32, 114, 97, 119, 103, 101, 116, 40, 95, 71, 44, 32, 110, 97, 109, 101, - 41, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 110, 97, 109, 101, 32, 39, 34, 32, 46, 46, 32, 110, 97, 109, 101, 32, 46, 46, - 32, 34, 39, 32, 105, 110, 32, 117, 115, 101, 34, 44, 32, 50, 41, 10, 101, 110, 100, 10, 102, 105, 101, 108, 100, 44, 32, 101, 114, 114, 32, 61, - 32, 112, 46, 102, 105, 101, 108, 100, 46, 110, 101, 119, 40, 102, 105, 101, 108, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, - 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 41, 10, 101, 110, 100, 10, 102, 105, 101, 108, 100, 46, 112, 97, 116, 104, 115, - 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 112, 114, 111, 112, 101, 114, 116, 121, 40, 102, 105, 101, 108, 100, 44, 32, 34, 112, 97, 116, 104, -115, 34, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 61, 61, 32, 34, 116, - 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 100, 111, 10, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, - 91, 105, 116, 101, 109, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 105, 116, 101, 109, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, - 32, 116, 121, 112, 101, 40, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, 121, 115, 40, 102, 105, 101, -108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 41, 10, 102, 111, 114, 32, 105, 44, 32, 107, 101, 121, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 107, 101, 121, 115, 41, 32, 100, 111, 10, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 91, 107, 101, 121, 58, 108, 111, 119, 101, -114, 40, 41, 93, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 91, 107, 101, 121, 93, 10, 101, 110, 100, 10, 101, 110, -100, 10, 95, 71, 91, 110, 97, 109, 101, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, 116, -117, 114, 110, 32, 97, 112, 105, 46, 115, 116, 111, 114, 101, 70, 105, 101, 108, 100, 40, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 112, 46, 102, 105, 101, 108, 100, 46, 114, 101, 109, 111, 118, 101, 115, 40, 102, 105, 101, 108, 100, 41, 32, 116, -104, 101, 110, 10, 95, 71, 91, 34, 114, 101, 109, 111, 118, 101, 34, 32, 46, 46, 32, 110, 97, 109, 101, 93, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 112, 105, 46, 114, 101, 109, 111, 118, 101, 40, 102, 105, 101, -108, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 101, 108, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 117, 110, 114, 101, 103, 105, 115, 116, 101, 114, 40, 102, 105, 101, 108, -100, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 105, 101, 108, 100, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, -101, 110, 10, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 102, 105, 101, 108, 100, 41, 10, 101, 110, -100, 10, 112, 46, 102, 105, 101, 108, 100, 46, 117, 110, 114, 101, 103, 105, 115, 116, 101, 114, 40, 102, 105, 101, 108, 100, 41, 10, 95, 71, 91, 102, -105, 101, 108, 100, 46, 110, 97, 109, 101, 93, 32, 61, 32, 110, 105, 108, 10, 95, 71, 91, 34, 114, 101, 109, 111, 118, 101, 34, 32, 46, 46, 32, -102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 93, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, -112, 105, 46, 97, 108, 105, 97, 115, 40, 111, 114, 105, 103, 105, 110, 97, 108, 44, 32, 97, 108, 105, 97, 115, 41, 10, 112, 46, 97, 108, 105, 97, -115, 40, 95, 71, 44, 32, 111, 114, 105, 103, 105, 110, 97, 108, 44, 32, 97, 108, 105, 97, 115, 41, 10, 105, 102, 32, 95, 71, 91, 34, 114, 101, -109, 111, 118, 101, 34, 32, 46, 46, 32, 111, 114, 105, 103, 105, 110, 97, 108, 93, 32, 116, 104, 101, 110, 10, 112, 46, 97, 108, 105, 97, 115, 40, - 95, 71, 44, 32, 34, 114, 101, 109, 111, 118, 101, 34, 32, 46, 46, 32, 111, 114, 105, 103, 105, 110, 97, 108, 44, 32, 34, 114, 101, 109, 111, 118, -101, 34, 32, 46, 46, 32, 97, 108, 105, 97, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, -105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 102, 105, 101, 108, 100, 78, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 41, 10, 108, -111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 102, 105, 101, 108, 100, 78, 97, -109, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 78, 111, 32, -115, 117, 99, 104, 32, 102, 105, 101, 108, 100, 58, 32, 34, 32, 46, 46, 32, 102, 105, 101, 108, 100, 78, 97, 109, 101, 44, 32, 50, 41, 10, 101, -110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, -110, 10, 102, 111, 114, 32, 105, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 41, 32, 100, -111, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 102, 105, 101, 108, 100, 78, 97, 109, 101, 44, 32, 105, 116, 101, 109, - 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 102, 105, 101, 108, 100, - 46, 97, 108, 108, 111, 119, 101, 100, 32, 111, 114, 32, 123, 125, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 91, -118, 97, 108, 117, 101, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 102, 105, -101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 91, 118, 97, 108, 117, 101, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 118, 97, 108, -117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 97, 100, 100, 65, -108, 105, 97, 115, 101, 115, 40, 102, 105, 101, 108, 100, 78, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, -105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 102, 105, 101, 108, 100, 78, 97, 109, 101, 41, 10, 105, 102, - 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 78, 111, 32, 115, 117, 99, 104, 32, 102, -105, 101, 108, 100, 58, 32, 34, 32, 46, 46, 32, 102, 105, 101, 108, 100, 78, 97, 109, 101, 44, 32, 50, 41, 10, 101, 110, 100, 10, 102, 105, 101, -108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 32, 111, 114, 32, 123, 125, - 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 41, 32, 100, 111, 10, 102, 105, 101, -108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 91, 107, 93, 32, 61, 32, 118, 10, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 91, -107, 58, 108, 111, 119, 101, 114, 40, 41, 93, 32, 61, 32, 118, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 70, 105, 101, 108, 100, 40, 110, 97, 109, 101, 44, 32, 109, 101, 115, 115, 97, 103, 101, - 44, 32, 104, 97, 110, 100, 108, 101, 114, 41, 10, 112, 46, 102, 105, 101, 108, 100, 115, 91, 110, 97, 109, 101, 93, 46, 100, 101, 112, 114, 101, 99, - 97, 116, 101, 100, 32, 61, 32, 123, 10, 104, 97, 110, 100, 108, 101, 114, 32, 61, 32, 104, 97, 110, 100, 108, 101, 114, 44, 10, 109, 101, 115, 115, - 97, 103, 101, 32, 61, 32, 109, 101, 115, 115, 97, 103, 101, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, - 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 44, 32, 109, 101, 115, -115, 97, 103, 101, 44, 32, 97, 100, 100, 72, 97, 110, 100, 108, 101, 114, 44, 32, 114, 101, 109, 111, 118, 101, 72, 97, 110, 100, 108, 101, 114, 41, - 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, -102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 41, 32, 100, 111, 10, 97, 112, 105, 46, -100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 110, 97, 109, 101, 44, 32, 118, 44, 32, 109, 101, 115, 115, 97, 103, 101, 44, - 32, 97, 100, 100, 72, 97, 110, 100, 108, 101, 114, 44, 32, 114, 101, 109, 111, 118, 101, 72, 97, 110, 100, 108, 101, 114, 41, 10, 101, 110, 100, 10, -101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 115, 91, 110, 97, 109, 101, - 93, 10, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 32, 61, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, - 99, 97, 116, 101, 100, 32, 111, 114, 32, 123, 125, 10, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 91, 118, 97, 108, -117, 101, 93, 32, 61, 32, 123, 10, 97, 100, 100, 32, 61, 32, 97, 100, 100, 72, 97, 110, 100, 108, 101, 114, 44, 10, 114, 101, 109, 111, 118, 101, - 32, 61, 32, 114, 101, 109, 111, 118, 101, 72, 97, 110, 100, 108, 101, 114, 44, 10, 109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 109, 101, 115, 115, - 97, 103, 101, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 100, 101, 112, 114, 101, - 99, 97, 116, 105, 111, 110, 115, 40, 118, 97, 108, 117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 108, 111, 119, -101, 114, 40, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 123, 32, 34, 111, 110, - 34, 44, 32, 34, 111, 102, 102, 34, 44, 32, 34, 101, 114, 114, 111, 114, 34, 125, 44, 32, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, -101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 118, 97, 108, 117, 101, 58, 32, 34, 32, 46, 46, 32, 118, 97, 108, 117, 101, - 44, 32, 50, 41, 10, 101, 110, 100, 10, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 61, 32, 118, 97, 108, -117, 101, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, 100, 10, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, - 32, 61, 32, 34, 111, 110, 34, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 116, 97, 114, 103, 101, 116, 40, 102, 105, 101, 108, -100, 41, 10, 105, 102, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 67, 97, 110, 67, 111, 110, 116, 97, 105, -110, 40, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, 114, 114, 101, 110, 116, 46, 99, 108, 97, 115, 115, 44, 32, 102, 105, 101, 108, 100, - 46, 115, 99, 111, 112, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, -114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 97, 112, 105, 46, 115, 116, 111, 114, 101, 70, 105, 101, 108, 100, 40, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, -102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 105, -102, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 102, 105, 101, 108, -100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 46, 104, 97, 110, 100, 108, 101, 114, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, -111, 110, 34, 32, 116, 104, 101, 110, 10, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 46, 104, 97, 110, 100, 108, 101, -114, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 46, 109, 101, 115, -115, 97, 103, 101, 32, 97, 110, 100, 32, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 126, 61, 32, 34, 111, -102, 102, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 101, 114, 32, 61, 32, 102, 105, 108, 101, 108, 105, 110, 101, -105, 110, 102, 111, 40, 50, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 32, 46, - 46, 32, 34, 95, 34, 32, 46, 46, 32, 99, 97, 108, 108, 101, 114, 10, 112, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 107, 101, 121, 44, 32, - 34, 116, 104, 101, 32, 102, 105, 101, 108, 100, 32, 37, 115, 32, 104, 97, 115, 32, 98, 101, 101, 110, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, -100, 32, 97, 110, 100, 32, 119, 105, 108, 108, 32, 98, 101, 32, 114, 101, 109, 111, 118, 101, 100, 46, 92, 110, 32, 32, 32, 37, 115, 92, 110, 32, - 32, 32, 64, 37, 115, 92, 110, 34, 44, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 44, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, -101, 99, 97, 116, 101, 100, 46, 109, 101, 115, 115, 97, 103, 101, 44, 32, 99, 97, 108, 108, 101, 114, 41, 10, 105, 102, 32, 97, 112, 105, 46, 95, -100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 61, 61, 32, 34, 101, 114, 114, 111, 114, 34, 32, 116, 104, 101, 110, 10, 101, 114, 114, -111, 114, 40, 34, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 32, 101, 114, 114, 111, 114, 115, 32, 101, 110, 97, 98, 108, 101, 100, 34, 44, - 32, 51, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 32, 61, 32, 97, -112, 105, 46, 116, 97, 114, 103, 101, 116, 40, 102, 105, 101, 108, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 114, 103, 101, 116, 32, 116, -104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 114, 114, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 117, -110, 97, 98, 108, 101, 32, 116, 111, 32, 115, 101, 116, 32, 37, 115, 32, 105, 110, 32, 37, 115, 32, 115, 99, 111, 112, 101, 44, 32, 115, 104, 111, -117, 108, 100, 32, 98, 101, 32, 37, 115, 34, 44, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 44, 32, 97, 112, 105, 46, 115, 99, 111, 112, -101, 46, 99, 117, 114, 114, 101, 110, 116, 46, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, - 97, 116, 40, 102, 105, 101, 108, 100, 46, 115, 99, 111, 112, 101, 115, 44, 32, 34, 44, 32, 34, 41, 41, 10, 101, 114, 114, 111, 114, 40, 101, 114, -114, 44, 32, 51, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 116, 97, 116, 117, 115, 44, 32, 101, 114, 114, 32, 61, 32, 99, 111, -110, 102, 105, 103, 115, 101, 116, 46, 115, 116, 111, 114, 101, 40, 116, 97, 114, 103, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, -117, 101, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, 51, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 114, 101, 109, 111, 118, 101, 40, 102, 105, 101, 108, 100, 44, - 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 32, 114, 101, 116, -117, 114, 110, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 32, 61, 32, 97, 112, 105, 46, 116, 97, 114, 103, 101, -116, 40, 102, 105, 101, 108, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 114, 103, 101, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, -108, 32, 101, 114, 114, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 117, 110, 97, 98, 108, 101, 32, 116, 111, - 32, 114, 101, 109, 111, 118, 101, 32, 37, 115, 32, 102, 114, 111, 109, 32, 37, 115, 32, 115, 99, 111, 112, 101, 44, 32, 115, 104, 111, 117, 108, 100, - 32, 98, 101, 32, 37, 115, 34, 44, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 44, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, -117, 114, 114, 101, 110, 116, 46, 99, 108, 97, 115, 115, 46, 110, 97, 109, 101, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, -102, 105, 101, 108, 100, 46, 115, 99, 111, 112, 101, 115, 44, 32, 34, 44, 32, 34, 41, 41, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, - 51, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 68, 101, 112, 114, 101, 99, 97, 116, 101, 100, 86, 97, 108, 117, 101, 115, - 32, 61, 32, 40, 116, 121, 112, 101, 40, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 41, 32, 61, 61, 32, 34, 116, - 97, 98, 108, 101, 34, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 109, 111, 118, 101, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 104, 101, 99, 107, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 100, -101, 112, 114, 101, 99, 97, 116, 101, 100, 91, 118, 97, 108, 117, 101, 93, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 104, 97, 110, 100, -108, 101, 114, 32, 61, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 91, 118, 97, 108, 117, 101, 93, 10, 105, 102, - 32, 104, 97, 110, 100, 108, 101, 114, 46, 114, 101, 109, 111, 118, 101, 32, 116, 104, 101, 110, 32, 104, 97, 110, 100, 108, 101, 114, 46, 114, 101, 109, -111, 118, 101, 40, 118, 97, 108, 117, 101, 41, 32, 101, 110, 100, 10, 105, 102, 32, 104, 97, 110, 100, 108, 101, 114, 46, 109, 101, 115, 115, 97, 103, -101, 32, 97, 110, 100, 32, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 126, 61, 32, 34, 111, 102, 102, 34, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 101, 114, 32, 61, 32, 102, 105, 108, 101, 108, 105, 110, 101, 105, 110, 102, -111, 40, 56, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, - 95, 34, 32, 46, 46, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 34, 95, 34, 32, 46, 46, 32, 99, 97, 108, 108, 101, 114, 10, 112, 46, 119, - 97, 114, 110, 79, 110, 99, 101, 40, 107, 101, 121, 44, 32, 34, 116, 104, 101, 32, 37, 115, 32, 118, 97, 108, 117, 101, 32, 37, 115, 32, 104, 97, -115, 32, 98, 101, 101, 110, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 32, 97, 110, 100, 32, 119, 105, 108, 108, 32, 98, 101, 32, 114, 101, -109, 111, 118, 101, 100, 46, 92, 110, 32, 32, 32, 37, 115, 92, 110, 32, 32, 32, 64, 37, 115, 92, 110, 34, 44, 32, 102, 105, 101, 108, 100, 46, -110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 44, 32, 104, 97, 110, 100, 108, 101, 114, 46, 109, 101, 115, 115, 97, 103, 101, 44, 32, 99, 97, -108, 108, 101, 114, 41, 10, 105, 102, 32, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 61, 61, 32, 34, 101, -114, 114, 111, 114, 34, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 34, 100, 101, 112, 114, 101, 99, 97, 116, -105, 111, 110, 32, 101, 114, 114, 111, 114, 115, 32, 101, 110, 97, 98, 108, 101, 100, 34, 32, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 101, 99, 117, 114, 115, 101, 40, 118, 97, 108, -117, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 118, 97, 108, 117, 101, 44, 32, 114, 101, 99, 117, 114, 115, 101, - 41, 10, 101, 108, 115, 101, 105, 102, 32, 104, 97, 115, 68, 101, 112, 114, 101, 99, 97, 116, 101, 100, 86, 97, 108, 117, 101, 115, 32, 97, 110, 100, - 32, 118, 97, 108, 117, 101, 58, 99, 111, 110, 116, 97, 105, 110, 115, 40, 34, 42, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, - 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 102, 101, 116, 99, 104, 40, 116, 97, 114, 103, 101, 116, - 44, 32, 102, 105, 101, 108, 100, 44, 32, 123, 10, 109, 97, 116, 99, 104, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 115, -101, 116, 44, 32, 98, 108, 111, 99, 107, 44, 32, 102, 105, 108, 116, 101, 114, 41, 10, 108, 111, 99, 97, 108, 32, 99, 117, 114, 114, 101, 110, 116, - 32, 61, 32, 99, 115, 101, 116, 46, 99, 117, 114, 114, 101, 110, 116, 10, 114, 101, 116, 117, 114, 110, 32, 99, 114, 105, 116, 101, 114, 105, 97, 46, -109, 97, 116, 99, 104, 101, 115, 40, 99, 117, 114, 114, 101, 110, 116, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 44, 32, 98, 108, 111, 99, 107, - 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 46, 116, 101, 114, 109, 115, 32, 111, 114, 32, 123, 125, 41, 32, 111, 114, 10, 32, 32, 32, 99, 114, -105, 116, 101, 114, 105, 97, 46, 109, 97, 116, 99, 104, 101, 115, 40, 98, 108, 111, 99, 107, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 44, 32, - 99, 117, 114, 114, 101, 110, 116, 46, 95, 99, 114, 105, 116, 101, 114, 105, 97, 46, 116, 101, 114, 109, 115, 32, 111, 114, 32, 123, 125, 41, 10, 101, -110, 100, 10, 125, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 115, 107, 32, 61, 32, 112, 97, 116, 104, 46, 119, 105, 108, 100, 99, 97, 114, 100, -115, 40, 118, 97, 108, 117, 101, 41, 10, 102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, -117, 114, 114, 101, 110, 116, 41, 32, 100, 111, 10, 105, 102, 32, 105, 116, 101, 109, 58, 109, 97, 116, 99, 104, 40, 109, 97, 115, 107, 41, 32, 61, - 61, 32, 105, 116, 101, 109, 32, 116, 104, 101, 110, 10, 114, 101, 99, 117, 114, 115, 101, 40, 105, 116, 101, 109, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 44, 32, 101, 114, 114, 44, 32, 97, 100, 100, 105, 116, 105, 111, -110, 97, 108, 32, 61, 32, 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, -101, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 101, 114, 114, 32, 125, - 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 32, 116, 104, 101, 110, 10, 99, 104, -101, 99, 107, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 109, 111, -118, 101, 115, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 109, 111, 118, 101, 115, 44, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 112, 99, 97, -108, 108, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 114, 101, 99, 117, 114, 115, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, -100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, 101, 114, 114, 41, 32, 61, - 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 101, 114, 114, 32, 61, 32, 101, 114, 114, 46, 109, 115, 103, 10, 101, 110, 100, - 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, 51, 41, 10, 101, 110, 100, 10, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 114, 101, 109, -111, 118, 101, 40, 116, 97, 114, 103, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 114, 101, 109, 111, 118, 101, 115, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 102, 105, 101, 108, 100, 44, 32, 118, - 97, 108, 117, 101, 44, 32, 107, 105, 110, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 97, 110, -111, 110, 105, 99, 97, 108, 44, 32, 114, 101, 115, 117, 108, 116, 10, 108, 111, 99, 97, 108, 32, 108, 111, 119, 101, 114, 86, 97, 108, 117, 101, 32, - 61, 32, 118, 97, 108, 117, 101, 58, 108, 111, 119, 101, 114, 40, 41, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, - 32, 116, 104, 101, 110, 10, 99, 97, 110, 111, 110, 105, 99, 97, 108, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 108, 105, 97, 115, 101, 115, 91, -108, 111, 119, 101, 114, 86, 97, 108, 117, 101, 93, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 61, 61, 32, - 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 99, 97, 110, 111, 110, 105, 99, 97, 108, 32, 61, 32, 102, 105, 101, 108, -100, 46, 97, 108, 108, 111, 119, 101, 100, 40, 118, 97, 108, 117, 101, 44, 32, 107, 105, 110, 100, 32, 111, 114, 32, 34, 115, 116, 114, 105, 110, 103, - 34, 41, 10, 101, 108, 115, 101, 10, 99, 97, 110, 111, 110, 105, 99, 97, 108, 32, 61, 32, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 101, -100, 91, 108, 111, 119, 101, 114, 86, 97, 108, 117, 101, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 99, 97, 110, -111, 110, 105, 99, 97, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 105, 110, 118, 97, 108, 105, 100, - 32, 118, 97, 108, 117, 101, 32, 39, 34, 32, 46, 46, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 34, 39, 32, 102, 111, 114, 32, 34, 32, 46, - 46, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, - 97, 116, 101, 100, 32, 97, 110, 100, 32, 102, 105, 101, 108, 100, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 91, 99, 97, 110, 111, 110, 105, - 99, 97, 108, 93, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 104, 97, 110, 100, 108, 101, 114, 32, 61, 32, 102, 105, 101, 108, 100, 46, -100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 91, 99, 97, 110, 111, 110, 105, 99, 97, 108, 93, 10, 104, 97, 110, 100, 108, 101, 114, 46, 97, 100, -100, 40, 99, 97, 110, 111, 110, 105, 99, 97, 108, 41, 10, 105, 102, 32, 104, 97, 110, 100, 108, 101, 114, 46, 109, 101, 115, 115, 97, 103, 101, 32, - 97, 110, 100, 32, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 126, 61, 32, 34, 111, 102, 102, 34, 32, 116, -104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 101, 114, 32, 61, 32, 32, 102, 105, 108, 101, 108, 105, 110, 101, 105, 110, 102, 111, - 40, 57, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 95, - 34, 32, 46, 46, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 34, 95, 34, 32, 46, 46, 32, 99, 97, 108, 108, 101, 114, 10, 112, 46, 119, 97, -114, 110, 79, 110, 99, 101, 40, 107, 101, 121, 44, 32, 34, 116, 104, 101, 32, 37, 115, 32, 118, 97, 108, 117, 101, 32, 37, 115, 32, 104, 97, 115, - 32, 98, 101, 101, 110, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 32, 97, 110, 100, 32, 119, 105, 108, 108, 32, 98, 101, 32, 114, 101, 109, -111, 118, 101, 100, 46, 92, 110, 32, 32, 32, 37, 115, 92, 110, 32, 32, 32, 64, 37, 115, 92, 110, 34, 44, 32, 102, 105, 101, 108, 100, 46, 110, - 97, 109, 101, 44, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, 44, 32, 104, 97, 110, 100, 108, 101, 114, 46, 109, 101, 115, 115, 97, 103, 101, 44, - 32, 99, 97, 108, 108, 101, 114, 41, 10, 105, 102, 32, 97, 112, 105, 46, 95, 100, 101, 112, 114, 101, 99, 97, 116, 105, 111, 110, 115, 32, 61, 61, - 32, 34, 101, 114, 114, 111, 114, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 100, 101, 112, 114, 101, - 99, 97, 116, 105, 111, 110, 32, 101, 114, 114, 111, 114, 115, 32, 101, 110, 97, 98, 108, 101, 100, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 97, 110, 111, 110, 105, 99, 97, 108, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 110, 117, -109, 66, 117, 105, 108, 116, 73, 110, 71, 108, 111, 98, 97, 108, 66, 108, 111, 99, 107, 115, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 112, -105, 46, 114, 101, 115, 101, 116, 40, 41, 10, 105, 102, 32, 110, 117, 109, 66, 117, 105, 108, 116, 73, 110, 71, 108, 111, 98, 97, 108, 66, 108, 111, - 99, 107, 115, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 110, 117, 109, 66, 117, 105, 108, 116, 73, 110, 71, 108, 111, 98, 97, 108, - 66, 108, 111, 99, 107, 115, 32, 61, 32, 35, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 108, 111, 98, 97, 108, 46, 98, 108, 111, 99, 107, -115, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 67, 108, 97, 115, 115, 32, 105, 110, 32, 112, 46, 99, 111, -110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 67, 108, 97, 115, 115, 40, 112, 46, 103, 108, 111, 98, 97, 108, 41, - 32, 100, 111, 10, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 108, 111, 98, 97, 108, 91, 99, 111, 110, 116, 97, 105, 110, 101, 114, 67, 108, - 97, 115, 115, 46, 112, 108, 117, 114, 97, 108, 78, 97, 109, 101, 93, 32, 61, 32, 123, 125, 10, 101, 110, 100, 10, 97, 112, 105, 46, 115, 99, 111, -112, 101, 46, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 108, 111, 98, 97, 108, 10, 108, 111, - 99, 97, 108, 32, 99, 117, 114, 114, 101, 110, 116, 71, 108, 111, 98, 97, 108, 66, 108, 111, 99, 107, 67, 111, 117, 110, 116, 32, 61, 32, 35, 97, -112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 108, 111, 98, 97, 108, 46, 98, 108, 111, 99, 107, 115, 10, 102, 111, 114, 32, 105, 32, 61, 32, 99, -117, 114, 114, 101, 110, 116, 71, 108, 111, 98, 97, 108, 66, 108, 111, 99, 107, 67, 111, 117, 110, 116, 44, 32, 110, 117, 109, 66, 117, 105, 108, 116, - 73, 110, 71, 108, 111, 98, 97, 108, 66, 108, 111, 99, 107, 115, 44, 32, 45, 49, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, -118, 101, 40, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 108, 111, 98, 97, 108, 46, 98, 108, 111, 99, 107, 115, 44, 32, 105, 41, 10, 101, -110, 100, 10, 99, 111, 110, 102, 105, 103, 115, 101, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 97, 112, 105, 46, 115, 99, 111, 112, 101, - 46, 99, 117, 114, 114, 101, 110, 116, 44, 32, 123, 125, 44, 32, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 41, 10, 101, 110, 100, 10, 112, -114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 97, 114, 114, 97, 121, 34, 44, 32, 123, 10, 115, 116, 111, -114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, -108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 126, - 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 123, 32, 118, 97, 108, 117, 101, 32, 125, - 10, 101, 110, 100, 10, 102, 111, 114, 32, 105, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, - 41, 32, 100, 111, 10, 118, 97, 108, 117, 101, 91, 105, 93, 32, 61, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, - 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 91, 105, 93, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, - 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, - 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 97, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, - 98, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 35, 97, 32, 126, 61, 32, 35, 98, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 97, 32, 100, 111, 10, 105, 102, 32, 110, -111, 116, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, 32, 97, 91, 105, 93, 44, 32, 98, 91, 105, 93, 41, 32, -116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, - 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 125, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, - 34, 98, 111, 111, 108, 101, 97, 110, 34, 44, 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, -101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, -108, 111, 99, 97, 108, 32, 109, 97, 112, 112, 105, 110, 103, 32, 61, 32, 123, 10, 91, 34, 102, 97, 108, 115, 101, 34, 93, 32, 61, 32, 102, 97, -108, 115, 101, 44, 10, 91, 34, 110, 111, 34, 93, 32, 61, 32, 102, 97, 108, 115, 101, 44, 10, 91, 34, 111, 102, 102, 34, 93, 32, 61, 32, 102, - 97, 108, 115, 101, 44, 10, 91, 34, 111, 110, 34, 93, 32, 61, 32, 116, 114, 117, 101, 44, 10, 91, 34, 116, 114, 117, 101, 34, 93, 32, 61, 32, -116, 114, 117, 101, 44, 10, 91, 34, 121, 101, 115, 34, 93, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 105, 102, 32, 116, 121, 112, 101, 40, -118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, -109, 97, 112, 112, 105, 110, 103, 91, 118, 97, 108, 117, 101, 58, 108, 111, 119, 101, 114, 40, 41, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, - 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 34, 101, 120, 112, 101, 99, 116, 101, -100, 32, 98, 111, 111, 108, 101, 97, 110, 59, 32, 103, 111, 116, 32, 34, 32, 46, 46, 32, 118, 97, 108, 117, 101, 32, 125, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, - 61, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, -110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 40, 118, 97, 108, 117, 101, 32, 126, 61, 32, 48, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 40, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 41, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, -102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 32, 123, 10, 112, 97, 116, 104, 115, 32, - 61, 32, 116, 114, 117, 101, 44, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, - 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, -110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 44, 10, 114, -101, 109, 111, 118, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, - 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 103, -101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 44, 10, 116, 114, 97, 110, 115, 108, 97, 116, 101, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 95, 44, 32, 112, -114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 99, 117, 114, 114, 101, 110, 116, 58, 102, 105, 110, 100, 40, 34, 42, 34, 41, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 115, 46, 109, 97, 116, 99, 104, 100, 105, 114, 115, 40, 99, 117, 114, 114, 101, 110, 116, 41, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 123, 32, 99, 117, 114, 114, 101, 110, 116, 32, 125, 10, 101, 110, 100, 10, 125, 41, 10, 112, -114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 102, 105, 108, 101, 34, 44, 32, 123, 10, 112, 97, 116, 104, -115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, - 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, -117, 114, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 44, - 10, 114, 101, 109, 111, 118, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, -116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, -111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 44, 10, 116, 114, 97, 110, 115, 108, 97, -116, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 95, 44, - 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 99, 117, 114, 114, 101, 110, 116, 58, 102, 105, 110, 100, 40, 34, 42, 34, 41, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 115, 46, 109, 97, 116, 99, 104, 102, 105, 108, 101, 115, 40, 99, 117, 114, 114, 101, -110, 116, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 123, 32, 99, 117, 114, 114, 101, 110, 116, 32, 125, 10, 101, 110, 100, 10, 125, - 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 44, - 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, -110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 108, 111, 99, 97, 108, 32, 116, 32, 61, 32, -116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, 32, 126, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, -104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 102, 117, 110, 99, 116, 105, -111, 110, 59, 32, 103, 111, 116, 32, 34, 32, 46, 46, 32, 116, 32, 125, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, -101, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, - 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, - 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 105, 110, 116, -101, 103, 101, 114, 34, 44, 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, - 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 108, 111, 99, 97, -108, 32, 116, 32, 61, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, 32, 126, 61, 32, 34, 110, 117, 109, 98, 101, -114, 34, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 110, 117, -109, 98, 101, 114, 59, 32, 103, 111, 116, 32, 34, 32, 46, 46, 32, 116, 32, 125, 10, 101, 110, 100, 10, 105, 102, 32, 109, 97, 116, 104, 46, 102, -108, 111, 111, 114, 40, 118, 97, 108, 117, 101, 41, 32, 126, 61, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, -123, 32, 109, 115, 103, 61, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 105, 110, 116, 101, 103, 101, 114, 59, 32, 103, 111, 116, 32, 34, 32, 46, - 46, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 32, 125, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, - 97, 108, 117, 101, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, -108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, - 61, 32, 98, 41, 10, 101, 110, 100, 10, 125, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 111, 114, 101, - 75, 101, 121, 101, 100, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, - 99, 101, 115, 115, 111, 114, 41, 10, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 99, 117, 114, 114, 101, 110, 116, 32, 111, 114, 32, 123, 125, 10, -102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 41, 32, 100, 111, 10, 105, 102, 32, 112, -114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, 118, 32, 61, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, -100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 91, 107, 93, 44, 32, 118, 41, 10, 101, 110, 100, 10, 99, 117, 114, 114, 101, 110, 116, 91, 107, 93, - 32, 61, 32, 118, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 108, 111, 99, 97, -108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 101, 114, 103, 101, 75, 101, 121, 101, 100, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, -114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, -118, 97, 108, 117, 101, 32, 111, 114, 32, 123, 125, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 118, 97, -108, 117, 101, 41, 32, 100, 111, 10, 99, 117, 114, 114, 101, 110, 116, 91, 107, 93, 32, 61, 32, 118, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, - 40, 34, 107, 101, 121, 101, 100, 34, 44, 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 115, 116, 111, 114, 101, 75, 101, 121, 101, 100, 44, 10, -109, 101, 114, 103, 101, 32, 61, 32, 109, 101, 114, 103, 101, 75, 101, 121, 101, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, -102, 32, 97, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 98, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 97, 41, 32, 100, -111, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, 32, 97, 91, 107, 93, 44, 32, - 98, 91, 107, 93, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 44, 10, 116, 114, 97, 110, 115, 108, 97, 116, 101, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 95, 44, 32, 112, 114, 111, 99, 101, 115, 115, -111, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 32, 99, 117, 114, 114, 101, 110, 116, 32, 125, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, -114, 115, 40, 99, 117, 114, 114, 101, 110, 116, 41, 32, 100, 111, 10, 99, 117, 114, 114, 101, 110, 116, 91, 107, 93, 32, 61, 32, 112, 114, 111, 99, -101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, 32, 118, 44, 32, 110, 105, 108, 41, 91, 49, 93, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 123, 32, 99, 117, 114, 114, 101, 110, 116, 32, 125, 10, 101, 110, 100, 10, 125, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, -116, 105, 111, 110, 32, 115, 116, 111, 114, 101, 76, 105, 115, 116, 73, 116, 101, 109, 40, 99, 117, 114, 114, 101, 110, 116, 44, 32, 105, 116, 101, 109, - 44, 32, 97, 108, 108, 111, 119, 68, 117, 112, 108, 105, 99, 97, 116, 101, 115, 41, 10, 105, 102, 32, 110, 111, 116, 32, 97, 108, 108, 111, 119, 68, -117, 112, 108, 105, 99, 97, 116, 101, 115, 32, 97, 110, 100, 32, 99, 117, 114, 114, 101, 110, 116, 91, 105, 116, 101, 109, 93, 32, 116, 104, 101, 110, - 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 99, 117, 114, 114, 101, 110, 116, 44, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, -101, 120, 111, 102, 40, 99, 117, 114, 114, 101, 110, 116, 44, 32, 105, 116, 101, 109, 41, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 99, 117, 114, 114, 101, 110, 116, 44, 32, 105, 116, 101, 109, 41, 10, 99, 117, 114, 114, 101, 110, 116, 91, 105, 116, 101, -109, 93, 32, 61, 32, 105, 116, 101, 109, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 111, -114, 101, 76, 105, 115, 116, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, -111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, -101, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, - 32, 61, 32, 49, 44, 32, 35, 118, 97, 108, 117, 101, 32, 100, 111, 10, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 115, 116, 111, 114, 101, 76, -105, 115, 116, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 91, 105, 93, 44, 32, 112, 114, -111, 99, 101, 115, 115, 111, 114, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, -105, 102, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 99, 117, 114, 114, 101, 110, 116, 32, 61, 32, 99, 117, -114, 114, 101, 110, 116, 32, 111, 114, 32, 123, 125, 10, 105, 102, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, 118, 97, -108, 117, 101, 32, 61, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, -101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 32, 61, - 32, 49, 44, 32, 35, 118, 97, 108, 117, 101, 32, 100, 111, 10, 115, 116, 111, 114, 101, 76, 105, 115, 116, 73, 116, 101, 109, 40, 99, 117, 114, 114, -101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 91, 105, 93, 44, 32, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 68, 117, 112, 108, 105, 99, - 97, 116, 101, 115, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, -116, 121, 40, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 115, 116, 111, 114, 101, 76, 105, 115, 116, 73, 116, 101, 109, 40, 99, 117, 114, -114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 68, 117, 112, 108, 105, 99, 97, 116, -101, 115, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 115, 116, 111, 114, 101, 76, -105, 115, 116, 73, 116, 101, 109, 40, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 102, 105, 101, 108, 100, 46, 97, 108, -108, 111, 119, 68, 117, 112, 108, 105, 99, 97, 116, 101, 115, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 117, 114, 114, 101, 110, -116, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 101, 114, 103, 101, 76, 105, 115, 116, 40, 102, -105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, - 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 32, 111, 114, 32, 123, 125, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, - 35, 118, 97, 108, 117, 101, 32, 100, 111, 10, 115, 116, 111, 114, 101, 76, 105, 115, 116, 73, 116, 101, 109, 40, 99, 117, 114, 114, 101, 110, 116, 44, - 32, 118, 97, 108, 117, 101, 91, 105, 93, 44, 32, 102, 105, 101, 108, 100, 46, 97, 108, 108, 111, 119, 68, 117, 112, 108, 105, 99, 97, 116, 101, 115, - 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, - 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 108, 105, 115, 116, 34, 44, 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 115, 116, -111, 114, 101, 76, 105, 115, 116, 44, 10, 114, 101, 109, 111, 118, 101, 32, 61, 32, 115, 116, 111, 114, 101, 76, 105, 115, 116, 44, 10, 109, 101, 114, -103, 101, 32, 61, 32, 109, 101, 114, 103, 101, 76, 105, 115, 116, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 97, 32, - 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 98, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 35, 97, 32, 126, 61, 32, 35, 98, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, - 35, 97, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, 32, 97, 91, -105, 93, 44, 32, 98, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 44, 10, 116, 114, 97, 110, 115, 108, 97, 116, 101, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 95, 44, 32, 112, 114, 111, - 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 123, 32, 99, 117, 114, 114, 101, 110, 116, 32, 125, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 114, 101, 116, 32, 61, - 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 117, 114, 114, 101, -110, 116, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, 112, 114, 111, 99, 101, 115, 115, 101, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 112, 114, 111, 99, 101, 115, 115, 111, 114, 40, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 44, 32, 110, 105, 108, 41, 41, 32, -100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 116, 44, 32, 112, 114, 111, 99, 101, 115, 115, 101, 100, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 123, 32, 114, 101, 116, 32, 125, 10, 101, 110, 100, 10, 125, 41, 10, 112, 114, -101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 109, 105, 120, 101, 100, 34, 44, 32, 123, 10, 112, 97, 116, 104, -115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, - 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 105, 102, 32, -116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 97, 110, 100, 32, 118, 97, 108, 117, -101, 58, 102, 105, 110, 100, 40, 39, 47, 39, 44, 32, 110, 105, 108, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 115, -116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 118, 97, 108, 117, 101, 44, 32, 49, 44, 32, 50, 41, 32, 126, 61, 32, 34, 37, 123, 34, 32, 116, -104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 118, 97, 108, -117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 44, 10, 99, 111, -109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, -111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 10, 125, 41, 10, -112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 110, 117, 109, 98, 101, 114, 34, 44, 32, 123, 10, 115, -116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, -118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 108, 111, 99, 97, 108, 32, 116, 32, 61, 32, 116, 121, 112, 101, - 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, 32, 126, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 32, 116, 104, 101, 110, 10, 101, 114, -114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 110, 117, 109, 98, 101, 114, 59, 32, 103, 111, 116, 32, - 34, 32, 46, 46, 32, 116, 32, 125, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 44, 10, 99, -111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, -114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 10, 125, 41, - 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 112, 97, 116, 104, 34, 44, 32, 123, 10, 112, 97, -116, 104, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 101, -108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, -101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 100, 101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 111, 115, 46, 103, 101, 116, 99, 119, -100, 40, 41, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, -114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 101, 108, 100, - 46, 107, 105, 110, 100, 40, 34, 115, 116, 114, 105, 110, 103, 34, 44, 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, 101, 115, -115, 111, 114, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, -104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 115, 116, 114, 105, 110, 103, - 59, 32, 103, 111, 116, 32, 116, 97, 98, 108, 101, 34, 32, 125, 10, 101, 110, 100, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, -105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 114, 114, 10, 118, 97, 108, 117, 101, 44, 32, 101, 114, 114, 32, 61, 32, 97, -112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 102, 105, 101, 108, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 101, -114, 114, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 123, 32, 109, 115, 103, 61, 101, 114, 114, 32, 125, 10, 101, 110, 100, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, -101, 116, 117, 114, 110, 32, 40, 97, 32, 61, 61, 32, 98, 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, -101, 108, 100, 46, 107, 105, 110, 100, 40, 34, 116, 97, 98, 108, 101, 34, 44, 32, 123, 10, 115, 116, 111, 114, 101, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 102, 105, 101, 108, 100, 44, 32, 99, 117, 114, 114, 101, 110, 116, 44, 32, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 99, -101, 115, 115, 111, 114, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 126, 61, 32, 34, 116, 97, 98, 108, 101, 34, - 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 123, 32, 118, 97, 108, 117, 101, 32, 125, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 44, 10, 99, 111, 109, 112, 97, 114, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 102, 105, 101, 108, 100, 44, 32, 97, 44, 32, 98, 44, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, -116, 114, 117, 101, 10, 101, 110, 100, 10, 125, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 40, 116, 101, 114, 109, 115, 41, 10, 105, 102, 32, 116, 101, 114, 109, 115, 32, 116, 104, 101, 110, 10, 105, 102, 32, 40, 116, 121, 112, 101, - 40, 116, 101, 114, 109, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 97, 110, 100, 32, 35, 116, 101, 114, 109, 115, 32, 61, 61, - 32, 49, 32, 97, 110, 100, 32, 116, 101, 114, 109, 115, 91, 49, 93, 32, 61, 61, 32, 34, 42, 34, 41, 32, 111, 114, 32, 40, 116, 101, 114, 109, -115, 32, 61, 61, 32, 34, 42, 34, 41, 32, 116, 104, 101, 110, 10, 116, 101, 114, 109, 115, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 99, -111, 110, 102, 105, 103, 115, 101, 116, 46, 97, 100, 100, 98, 108, 111, 99, 107, 40, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, 114, 114, -101, 110, 116, 44, 32, 123, 116, 101, 114, 109, 115, 125, 44, 32, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 41, 10, 101, 110, 100, 10, 114, -101, 116, 117, 114, 110, 32, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, 114, 114, 101, 110, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 102, 105, 108, 116, 101, 114, 40, 116, 101, 114, 109, 115, 41, 10, 105, 102, 32, 116, 101, 114, 109, 115, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 40, 116, 121, 112, 101, 40, 116, 101, 114, 109, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 97, 110, 100, 32, - 35, 116, 101, 114, 109, 115, 32, 61, 61, 32, 49, 32, 97, 110, 100, 32, 116, 101, 114, 109, 115, 91, 49, 93, 32, 61, 61, 32, 34, 42, 34, 41, - 32, 111, 114, 32, 40, 116, 101, 114, 109, 115, 32, 61, 61, 32, 34, 42, 34, 41, 32, 116, 104, 101, 110, 10, 116, 101, 114, 109, 115, 32, 61, 32, -110, 105, 108, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 99, 111, 110, 102, 105, 103, 115, 101, -116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 99, 117, 114, 114, 101, 110, 116, 44, 32, 123, -116, 101, 114, 109, 115, 125, 44, 32, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, -104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, 50, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 110, 101, 119, 97, 99, 116, 105, 111, 110, 40, 97, 41, 10, 112, 46, 97, 99, 116, 105, 111, 110, 46, 97, 100, 100, - 40, 97, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 101, 119, 111, 112, 116, 105, 111, 110, 40, 111, 112, 116, 41, 10, -112, 46, 111, 112, 116, 105, 111, 110, 46, 97, 100, 100, 40, 111, 112, 116, 41, 10, 101, 110, 100, 10, }; - -// src/base/global.lua -static const unsigned char builtin_script_25[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 103, 108, 111, 98, 97, 108, 32, 61, 32, 112, 46, 97, -112, 105, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 40, 34, 103, 108, 111, 98, 97, 108, 34, 41, 10, 108, 111, 99, 97, 108, 32, 103, 108, 111, - 98, 97, 108, 32, 61, 32, 112, 46, 103, 108, 111, 98, 97, 108, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 108, 111, 98, 97, 108, 46, 110, -101, 119, 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 110, 101, 119, 40, -112, 46, 103, 108, 111, 98, 97, 108, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 108, 111, - 98, 97, 108, 46, 98, 97, 107, 101, 40, 115, 101, 108, 102, 41, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 98, 97, 107, 101, 67, -104, 105, 108, 100, 114, 101, 110, 40, 115, 101, 108, 102, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 108, 111, 98, 97, -108, 46, 101, 97, 99, 104, 82, 117, 108, 101, 40, 41, 10, 108, 111, 99, 97, 108, 32, 114, 111, 111, 116, 32, 61, 32, 112, 46, 97, 112, 105, 46, -114, 111, 111, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, -101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 40, 114, 111, 111, 116, 44, 32, 112, 46, 114, 117, 108, 101, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 103, 108, 111, 98, 97, 108, 46, 101, 97, 99, 104, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 41, 10, 108, -111, 99, 97, 108, 32, 114, 111, 111, 116, 32, 61, 32, 112, 46, 97, 112, 105, 46, 114, 111, 111, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 101, 97, 99, 104, 67, 104, 105, 108, 100, 40, 114, -111, 111, 116, 44, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 41, 10, 101, 110, 100, 10, 112, 46, 97, 108, 105, 97, 115, 40, 103, 108, -111, 98, 97, 108, 44, 32, 34, 101, 97, 99, 104, 87, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 34, 101, 97, 99, 104, 83, 111, 108, 117, -116, 105, 111, 110, 34, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 82, 117, 108, 101, 40, 107, -101, 121, 41, 10, 108, 111, 99, 97, 108, 32, 114, 111, 111, 116, 32, 61, 32, 112, 46, 97, 112, 105, 46, 114, 111, 111, 116, 67, 111, 110, 116, 97, -105, 110, 101, 114, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 111, 111, 116, 46, 114, 117, 108, 101, 115, 91, 107, 101, 121, 93, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 82, 117, 108, 101, 70, 111, 114, 70, 105, 108, 101, - 40, 102, 110, 97, 109, 101, 44, 32, 114, 117, 108, 101, 115, 41, 10, 102, 111, 114, 32, 114, 117, 108, 101, 32, 105, 110, 32, 103, 108, 111, 98, 97, -108, 46, 101, 97, 99, 104, 82, 117, 108, 101, 40, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 114, 117, 108, 101, 115, 32, 111, 114, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 114, 117, 108, 101, 115, 44, 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 41, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, - 44, 32, 114, 117, 108, 101, 46, 102, 105, 108, 101, 101, 120, 116, 101, 110, 115, 105, 111, 110, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 114, 117, 108, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 107, 101, 121, 41, 10, 108, 111, 99, 97, 108, 32, 114, -111, 111, 116, 32, 61, 32, 112, 46, 97, 112, 105, 46, 114, 111, 111, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 41, 10, 114, 101, 116, 117, -114, 110, 32, 114, 111, 111, 116, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 115, 91, 107, 101, 121, 93, 10, 101, 110, 100, 10, 112, 46, 97, 108, -105, 97, 115, 40, 103, 108, 111, 98, 97, 108, 44, 32, 34, 103, 101, 116, 87, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 34, 103, 101, 116, - 83, 111, 108, 117, 116, 105, 111, 110, 34, 41, 10, }; - -// src/base/workspace.lua -static const unsigned char builtin_script_26[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, -112, 46, 97, 112, 105, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 40, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 112, 46, 103, -108, 111, 98, 97, 108, 41, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 10, 112, 46, 115, 111, 108, 117, 116, 105, 111, 110, 32, 61, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 10, 119, 111, 114, 107, -115, 112, 97, 99, 101, 46, 97, 108, 105, 97, 115, 32, 61, 32, 34, 115, 111, 108, 117, 116, 105, 111, 110, 34, 10, 112, 46, 97, 108, 105, 97, 115, - 40, 95, 71, 44, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 34, 115, 111, 108, 117, 116, 105, 111, 110, 34, 41, 10, 112, 46, - 97, 108, 105, 97, 115, 40, 95, 71, 44, 32, 34, 101, 120, 116, 101, 114, 110, 97, 108, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 34, -101, 120, 116, 101, 114, 110, 97, 108, 115, 111, 108, 117, 116, 105, 111, 110, 34, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, 114, 107, -115, 112, 97, 99, 101, 46, 110, 101, 119, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 119, 107, 115, 32, 61, 32, 112, 46, 99, 111, -110, 116, 97, 105, 110, 101, 114, 46, 110, 101, 119, 40, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 110, 97, 109, 101, 41, 10, 114, 101, 116, -117, 114, 110, 32, 119, 107, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 115, 101, 108, 102, 41, 10, 115, 101, 108, 102, 32, 61, 32, 112, 46, 111, 118, 101, 110, 46, 98, 97, -107, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 115, 101, 108, 102, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, -116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 105, 102, 32, 105, 32, 62, - 32, 35, 115, 101, 108, 102, 46, 99, 111, 110, 102, 105, 103, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, -108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 46, 99, 111, 110, 102, 105, 103, 115, 91, 105, 93, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, -111, 106, 101, 99, 116, 40, 115, 101, 108, 102, 41, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, -117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 105, 102, 32, 105, 32, 60, 61, 32, 35, 115, 101, -108, 102, 46, 112, 114, 111, 106, 101, 99, 116, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, - 97, 99, 101, 46, 103, 101, 116, 112, 114, 111, 106, 101, 99, 116, 40, 115, 101, 108, 102, 44, 32, 105, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 102, 105, 110, 100, 112, 114, 111, 106, 101, - 99, 116, 40, 115, 101, 108, 102, 44, 32, 110, 97, 109, 101, 41, 10, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, - 40, 41, 10, 102, 111, 114, 32, 95, 44, 32, 112, 114, 106, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 115, 101, 108, 102, 46, 112, 114, 111, -106, 101, 99, 116, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 97, 109, 101, 32, 61, 61, 32, 112, 114, 106, 46, 110, 97, 109, 101, 58, 108, 111, -119, 101, 114, 40, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, -103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 115, 101, 108, 102, 41, 10, 105, 102, 32, 115, 101, 108, 102, 46, 103, 114, 111, 117, 112, 116, 114, 101, -101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 10, 101, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 116, 114, 101, 101, 46, 110, 101, 119, 40, 41, 10, 102, 111, 114, 32, 112, 114, 106, - 32, 105, 110, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 115, 101, 108, 102, 41, 32, -100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 112, 114, 106, - 46, 103, 114, 111, 117, 112, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, 112, - 46, 116, 114, 101, 101, 46, 97, 100, 100, 40, 116, 114, 44, 32, 112, 114, 106, 112, 97, 116, 104, 41, 10, 110, 111, 100, 101, 46, 112, 114, 111, 106, -101, 99, 116, 32, 61, 32, 112, 114, 106, 10, 101, 110, 100, 10, 112, 46, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, - 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 110, 111, -100, 101, 46, 117, 117, 105, 100, 32, 61, 32, 111, 115, 46, 117, 117, 105, 100, 40, 34, 103, 114, 111, 117, 112, 58, 34, 32, 46, 46, 32, 110, 111, -100, 101, 46, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 46, 116, 114, 101, 101, 46, 115, 111, 114, 116, 40, 116, 114, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 98, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 46, 110, 97, 109, 101, 32, 60, 32, 98, 46, -110, 97, 109, 101, 10, 101, 110, 100, 41, 10, 115, 101, 108, 102, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 32, 61, 32, 116, 114, 10, 114, 101, -116, 117, 114, 110, 32, 116, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, -101, 116, 112, 114, 111, 106, 101, 99, 116, 40, 115, 101, 108, 102, 44, 32, 105, 100, 120, 41, 10, 115, 101, 108, 102, 32, 61, 32, 112, 46, 111, 118, -101, 110, 46, 98, 97, 107, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 115, 101, 108, 102, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, -108, 102, 46, 112, 114, 111, 106, 101, 99, 116, 115, 91, 105, 100, 120, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, 111, -114, 107, 115, 112, 97, 99, 101, 46, 104, 97, 115, 80, 114, 111, 106, 101, 99, 116, 40, 115, 101, 108, 102, 44, 32, 102, 117, 110, 99, 41, 10, 114, -101, 116, 117, 114, 110, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 104, 97, 115, 67, 104, 105, 108, 100, 40, 115, 101, 108, 102, 44, - 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 102, 117, 110, 99, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 119, -111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 115, 101, 108, 102, 44, 32, 102, 105, 108, 101, 110, - 97, 109, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, - 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, -110, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 32, 100, 111, 10, 105, 102, 32, 110, - 97, 109, 101, 32, 97, 110, 100, 32, 35, 110, 97, 109, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, -101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, -101, 40, 115, 101, 108, 102, 44, 32, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, -115, 117, 108, 116, 10, 101, 108, 115, 101, 10, 105, 102, 32, 102, 105, 108, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 102, 105, 108, 101, 110, 97, 109, 101, 10, 105, 102, 32, 112, 97, 116, 104, 46, 104, 97, 115, 100, 101, -102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, 41, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 112, 97, 116, 104, 46, 114, 101, 115, 111, 108, 118, 101, 100, 101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, - 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 115, 101, -108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, }; - -// src/base/group.lua -static const unsigned char builtin_script_27[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 103, 114, 111, 117, 112, 32, 61, 32, 112, 46, 97, 112, -105, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 40, 34, 103, 114, 111, 117, 112, 34, 44, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, - 41, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 32, 61, 32, 112, 46, 103, 114, 111, 117, 112, 10, 103, 114, 111, 117, 112, 46, 112, 108, - 97, 99, 101, 104, 111, 108, 100, 101, 114, 32, 61, 32, 116, 114, 117, 101, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 114, 111, 117, 112, 46, -110, 101, 119, 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 110, 101, 119, - 40, 103, 114, 111, 117, 112, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, }; - -// src/base/project.lua -static const unsigned char builtin_script_28[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, - 97, 112, 105, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 40, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 32, 112, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 44, 32, 123, 32, 34, 99, 111, 110, 102, 105, 103, 34, 32, 125, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, -116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, -101, 10, 101, 120, 116, 101, 114, 110, 97, 108, 32, 61, 32, 101, 120, 116, 101, 114, 110, 97, 108, 112, 114, 111, 106, 101, 99, 116, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 110, 101, 119, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, -106, 32, 61, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 110, 101, 119, 40, 112, 114, 111, 106, 101, 99, 116, 44, 32, 110, 97, 109, -101, 41, 10, 112, 114, 106, 46, 117, 117, 105, 100, 32, 61, 32, 111, 115, 46, 117, 117, 105, 100, 40, 110, 97, 109, 101, 41, 10, 105, 102, 32, 112, - 46, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 114, 111, 117, 112, 32, 116, 104, 101, 110, 10, 112, 114, 106, 46, 103, 114, 111, 117, 112, 32, - 61, 32, 112, 46, 97, 112, 105, 46, 115, 99, 111, 112, 101, 46, 103, 114, 111, 117, 112, 46, 110, 97, 109, 101, 10, 101, 108, 115, 101, 10, 112, 114, -106, 46, 103, 114, 111, 117, 112, 32, 61, 32, 34, 34, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, - 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 112, 114, 106, 46, 95, 99, 102, 103, 108, 105, 115, 116, 10, 108, 111, - 99, 97, 108, 32, 99, 111, 117, 110, 116, 32, 61, 32, 35, 99, 111, 110, 102, 105, 103, 115, 10, 108, 111, 99, 97, 108, 32, 115, 101, 101, 110, 32, - 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 105, 102, 32, 105, 32, 60, 61, 32, 99, 111, 117, 110, 116, 32, 116, 104, 101, 110, - 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, -114, 106, 44, 32, 99, 111, 110, 102, 105, 103, 115, 91, 105, 93, 91, 49, 93, 44, 32, 99, 111, 110, 102, 105, 103, 115, 91, 105, 93, 91, 50, 93, - 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 101, 101, 110, 91, 99, 102, 103, 93, 32, 116, 104, 101, 110, 10, 115, 101, 101, 110, 91, 99, 102, 103, - 93, 32, 61, 32, 116, 114, 117, 101, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 10, 101, 108, 115, 101, 10, 105, 32, 61, 32, 105, 32, 43, - 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, -101, 99, 116, 46, 102, 105, 110, 100, 67, 108, 111, 115, 101, 115, 116, 77, 97, 116, 99, 104, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, 99, -102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 98, 117, 105, 108, 100, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 109, 97, 112, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 41, 91, 49, 93, 10, 112, 108, 97, -116, 102, 111, 114, 109, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 109, 97, 112, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 112, -108, 97, 116, 102, 111, 114, 109, 41, 91, 49, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, -115, 40, 112, 114, 106, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 41, 32, -116, 104, 101, 110, 10, 98, 117, 105, 108, 100, 99, 102, 103, 32, 61, 32, 112, 114, 106, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 115, 91, 49, 93, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, -112, 114, 106, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 32, 116, 104, 101, 110, 10, 112, 108, - 97, 116, 102, 111, 114, 109, 32, 61, 32, 112, 114, 106, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 91, 49, 93, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, -100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, - 97, 116, 102, 111, 114, 109, 41, 10, 105, 102, 32, 110, 111, 116, 32, 98, 117, 105, 108, 100, 99, 102, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 112, 114, 106, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 105, 114, 105, 110, 103, 32, 61, 32, 112, 114, 111, 106, -101, 99, 116, 46, 109, 97, 112, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, -116, 102, 111, 114, 109, 41, 10, 98, 117, 105, 108, 100, 99, 102, 103, 32, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 49, 93, 10, 112, 108, 97, -116, 102, 111, 114, 109, 32, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 50, 93, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 40, - 98, 117, 105, 108, 100, 99, 102, 103, 32, 111, 114, 32, 34, 42, 34, 41, 32, 46, 46, 32, 40, 112, 108, 97, 116, 102, 111, 114, 109, 32, 111, 114, - 32, 34, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 46, 99, 111, 110, 102, 105, 103, 115, 91, 107, 101, 121, 93, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, -115, 40, 112, 114, 106, 44, 32, 109, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 106, 46, 100, 101, 112, 101, 110, 100, 101, 110, - 99, 105, 101, 115, 32, 116, 104, 101, 110, 10, 112, 114, 106, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 61, 32, 123, 125, 10, -101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 109, 111, 100, 101, 32, 111, 114, 32, 39, 97, 108, 108, 39, 10, 108, 111, 99, 97, -108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 114, 106, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 91, 109, 93, 10, 105, -102, 32, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, -108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 100, 100, 95, 116, 111, 95, 112, 114, 111, 106, 101, 99, 116, 95, 108, 105, -115, 116, 40, 99, 102, 103, 44, 32, 100, 101, 112, 112, 114, 111, 106, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, -101, 112, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 102, 105, 110, 100, 112, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, - 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 100, 101, 112, 112, 114, 111, 106, 41, 10, 105, 102, 32, 100, 101, 112, 32, 97, 110, 100, 32, -110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 114, 101, 115, 117, 108, 116, 44, 32, 100, 101, 112, 41, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 100, 101, 112, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 79, 110, 108, 121, 32, 61, 32, 109, 32, 61, 61, 32, 39, 108, 105, -110, 107, 79, 110, 108, 121, 39, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 79, 110, 108, 121, 32, 61, 32, 109, 32, 61, 61, 32, 39, 100, -101, 112, 101, 110, 100, 79, 110, 108, 121, 39, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, -110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, -110, 111, 116, 32, 100, 101, 112, 115, 79, 110, 108, 121, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 108, 105, 110, 107, 32, 126, 61, - 32, 112, 114, 106, 46, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 97, 100, 100, 95, 116, 111, 95, 112, 114, 111, 106, 101, 99, 116, 95, 108, 105, -115, 116, 40, 99, 102, 103, 44, 32, 108, 105, 110, 107, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 105, 102, 32, 110, 111, 116, 32, 108, 105, 110, 107, 79, 110, 108, 121, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, -112, 112, 114, 111, 106, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 100, 101, 112, 101, 110, 100, 115, 111, 110, 41, 32, 100, -111, 10, 97, 100, 100, 95, 116, 111, 95, 112, 114, 111, 106, 101, 99, 116, 95, 108, 105, 115, 116, 40, 99, 102, 103, 44, 32, 100, 101, 112, 112, 114, -111, 106, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 114, 106, 46, 100, 101, 112, 101, -110, 100, 101, 110, 99, 105, 101, 115, 91, 109, 93, 32, 61, 32, 114, 101, 115, 117, 108, 116, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, -108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, - 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 105, 116, 101, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, 116, 32, 61, 32, 105, -116, 101, 114, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 114, 115, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 102, 105, 108, 101, 110, 97, 109, -101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, 110, 97, -109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 32, 100, 111, 10, 114, 101, 115, 117, 108, 116, - 91, 105, 93, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 110, - 97, 109, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 108, 115, 101, 10, 105, 102, 32, 102, -105, 108, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 102, 105, 108, 101, -110, 97, 109, 101, 10, 105, 102, 32, 112, 97, 116, 104, 46, 104, 97, 115, 100, 101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 114, 101, 115, -117, 108, 116, 41, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 112, 97, 116, 104, 46, 114, 101, 115, 111, 108, 118, 101, 100, -101, 102, 101, 114, 114, 101, 100, 106, 111, 105, 110, 40, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, - 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 114, 101, -115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 44, 32, 115, 111, 114, 116, 101, 114, 41, 10, 105, 102, - 32, 112, 114, 106, 46, 95, 46, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, -106, 46, 95, 46, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 116, 114, -101, 101, 46, 110, 101, 119, 40, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, -112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 41, 10, 105, 102, 32, 102, - 99, 102, 103, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 59, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 10, 105, 102, 32, 102, 99, 102, 103, 46, 118, 112, 97, 116, 104, 32, 126, 61, 32, 102, 99, 102, 103, - 46, 114, 101, 108, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 32, 116, 114, 105, 109, 32, 61, 32, 102, - 97, 108, 115, 101, 32, 125, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 114, 101, 110, 116, 32, 61, 32, 116, 114, 101, 101, 46, 97, -100, 100, 40, 116, 114, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 99, 102, 103, 46, 118, 112, - 97, 116, 104, 41, 44, 32, 102, 108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, 116, 114, 101, 101, 46, 105, -110, 115, 101, 114, 116, 40, 112, 97, 114, 101, 110, 116, 44, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 112, 97, 116, 104, 46, 103, 101, 116, 110, - 97, 109, 101, 40, 102, 99, 102, 103, 46, 118, 112, 97, 116, 104, 41, 41, 41, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 110, -111, 100, 101, 44, 32, 123, 32, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 99, 102, 103, 32, 125, 41, 10, 101, 110, 100, 41, 10, 116, 97, - 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 102, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 99, 102, 103, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 59, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 114, 101, 110, 116, 32, 61, 32, 116, -114, 101, 101, 46, 97, 100, 100, 40, 116, 114, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 99, -102, 103, 46, 100, 101, 112, 101, 110, 100, 115, 79, 110, 46, 118, 112, 97, 116, 104, 41, 41, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, - 61, 32, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 114, 101, 110, 116, 44, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 112, - 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 102, 99, 102, 103, 46, 118, 112, 97, 116, 104, 41, 41, 41, 10, 115, 101, 116, 109, 101, 116, - 97, 116, 97, 98, 108, 101, 40, 110, 111, 100, 101, 44, 32, 123, 32, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 99, 102, 103, 32, 125, 41, - 10, 101, 110, 100, 41, 10, 116, 114, 101, 101, 46, 116, 114, 105, 109, 114, 111, 111, 116, 40, 116, 114, 41, 10, 116, 114, 101, 101, 46, 115, 111, 114, -116, 40, 116, 114, 44, 32, 115, 111, 114, 116, 101, 114, 41, 10, 112, 114, 106, 46, 95, 46, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 32, 61, - 32, 116, 114, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 103, 101, 116, 118, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 97, 98, 115, 112, 97, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, -118, 112, 97, 116, 104, 32, 61, 32, 97, 98, 115, 112, 97, 116, 104, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, 101, 32, 61, 32, 112, 97, -116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 97, 98, 115, 112, 97, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 120, 32, 61, 32, - 97, 98, 115, 112, 97, 116, 104, 58, 108, 101, 110, 40, 41, 32, 45, 32, 102, 110, 97, 109, 101, 58, 108, 101, 110, 40, 41, 10, 102, 111, 114, 32, - 95, 44, 32, 118, 112, 97, 116, 104, 115, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 118, 112, 97, 116, 104, 115, 41, 32, -100, 111, 10, 102, 111, 114, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 44, 32, 112, 97, 116, 116, 101, 114, 110, 115, 32, 105, 110, 32, -112, 97, 105, 114, 115, 40, 118, 112, 97, 116, 104, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, 112, 97, 116, 116, 101, 114, 110, 32, -105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 97, 116, 116, 101, 114, 110, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, - 32, 97, 98, 115, 112, 97, 116, 104, 58, 102, 105, 110, 100, 40, 112, 97, 116, 104, 46, 119, 105, 108, 100, 99, 97, 114, 100, 115, 40, 112, 97, 116, -116, 101, 114, 110, 41, 41, 10, 105, 102, 32, 105, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 10, 105, 32, 61, 32, 112, 97, 116, 116, 101, 114, -110, 58, 102, 105, 110, 100, 40, 34, 42, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 32, 111, 114, 32, 40, 112, 97, 116, 116, 101, 114, 110, - 58, 108, 101, 110, 40, 41, 32, 43, 32, 49, 41, 10, 108, 111, 99, 97, 108, 32, 108, 101, 97, 102, 10, 105, 102, 32, 105, 32, 60, 32, 109, 97, -120, 32, 116, 104, 101, 110, 10, 108, 101, 97, 102, 32, 61, 32, 97, 98, 115, 112, 97, 116, 104, 58, 115, 117, 98, 40, 105, 41, 10, 101, 108, 115, -101, 10, 108, 101, 97, 102, 32, 61, 32, 102, 110, 97, 109, 101, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, 97, 102, 58, 115, 116, 97, 114, 116, -115, 119, 105, 116, 104, 40, 34, 47, 34, 41, 32, 116, 104, 101, 110, 10, 108, 101, 97, 102, 32, 61, 32, 108, 101, 97, 102, 58, 115, 117, 98, 40, - 50, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 109, 32, 61, 32, 34, 34, 10, 105, 102, 32, 114, 101, 112, 108, 97, 99, -101, 109, 101, 110, 116, 58, 108, 101, 110, 40, 41, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, 109, 44, 32, 115, 116, 97, 114, 115, - 32, 61, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 58, 103, 115, 117, 98, 40, 34, 37, 42, 34, 44, 32, 34, 34, 41, 10, 105, 102, - 32, 115, 116, 97, 114, 115, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 108, 101, 97, 102, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, -110, 97, 109, 101, 40, 108, 101, 97, 102, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 108, 101, 97, 102, 32, 61, 32, 112, 97, 116, 104, 46, -103, 101, 116, 110, 97, 109, 101, 40, 108, 101, 97, 102, 41, 10, 101, 110, 100, 10, 118, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 106, -111, 105, 110, 40, 115, 116, 101, 109, 44, 32, 108, 101, 97, 102, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 112, 97, 116, 104, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 112, 97, 116, 104, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 102, 117, -110, 99, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, -103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 102, 117, 110, 99, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, -106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 112, 114, 106, 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, -114, 110, 32, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 32, 126, 61, 32, 110, 105, 108, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, -112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 10, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 115, 104, 97, 114, 112, - 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 32, 111, 114, 10, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, -102, 115, 104, 97, 114, 112, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, - 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 115, 104, 97, 114, 112, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, -112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 102, 115, 104, 97, 114, 112, - 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, -101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, -105, 115, 99, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, -114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 108, 97, 110, 103, 117, - 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, 105, 118, 101, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, -114, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, 41, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, -115, 99, 112, 112, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 109, - 97, 112, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, - 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 105, 114, 105, 110, 103, 32, 61, 32, 123, 32, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, - 97, 116, 102, 111, 114, 109, 32, 125, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 112, 97, 116, 116, 101, 114, 110, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 112, 97, 116, 116, 101, 114, 110, 44, 32, 112, 97, 105, 114, 105, 110, 103, 44, 32, 105, 41, 10, 108, 111, 99, 97, 108, - 32, 106, 32, 61, 32, 49, 10, 119, 104, 105, 108, 101, 32, 105, 32, 60, 61, 32, 35, 112, 97, 105, 114, 105, 110, 103, 32, 97, 110, 100, 32, 106, - 32, 60, 61, 32, 35, 112, 97, 116, 116, 101, 114, 110, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 119, 100, 32, 61, 32, 112, 97, 116, 104, 46, -119, 105, 108, 100, 99, 97, 114, 100, 115, 40, 112, 97, 116, 116, 101, 114, 110, 91, 106, 93, 41, 10, 105, 102, 32, 112, 97, 105, 114, 105, 110, 103, - 91, 105, 93, 58, 109, 97, 116, 99, 104, 40, 119, 100, 41, 32, 126, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 105, 93, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 106, 32, 61, 32, -106, 32, 43, 32, 49, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, -109, 97, 112, 115, 32, 61, 32, 112, 114, 106, 46, 99, 111, 110, 102, 105, 103, 109, 97, 112, 32, 111, 114, 32, 123, 125, 10, 102, 111, 114, 32, 109, -105, 32, 61, 32, 49, 44, 32, 35, 109, 97, 112, 115, 32, 100, 111, 10, 102, 111, 114, 32, 112, 97, 116, 116, 101, 114, 110, 44, 32, 114, 101, 112, -108, 97, 99, 101, 109, 101, 110, 116, 115, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 109, 97, 112, 115, 91, 109, 105, 93, 41, 32, 100, 111, 10, -105, 102, 32, 116, 121, 112, 101, 40, 112, 97, 116, 116, 101, 114, 110, 41, 32, 126, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, - 10, 112, 97, 116, 116, 101, 114, 110, 32, 61, 32, 123, 32, 112, 97, 116, 116, 101, 114, 110, 32, 125, 10, 101, 110, 100, 10, 102, 111, 114, 32, 105, - 32, 61, 32, 49, 44, 32, 35, 112, 97, 105, 114, 105, 110, 103, 32, 100, 111, 10, 105, 102, 32, 116, 101, 115, 116, 112, 97, 116, 116, 101, 114, 110, - 40, 112, 97, 116, 116, 101, 114, 110, 44, 32, 112, 97, 105, 114, 105, 110, 103, 44, 32, 105, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 35, 112, - 97, 116, 116, 101, 114, 110, 32, 61, 61, 32, 49, 32, 97, 110, 100, 32, 35, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 115, 32, 61, 61, - 32, 49, 32, 116, 104, 101, 110, 10, 112, 97, 105, 114, 105, 110, 103, 91, 105, 93, 32, 61, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, -115, 91, 49, 93, 10, 101, 108, 115, 101, 10, 112, 97, 105, 114, 105, 110, 103, 32, 61, 32, 123, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, -116, 115, 91, 49, 93, 44, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 115, 91, 50, 93, 32, 125, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 105, 114, 105, 110, 103, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, 105, 111, 110, 40, 112, -114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, 105, 111, 110, 32, 126, 61, 32, 110, 105, 108, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 115, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 101, 120, 112, 108, 111, -100, 101, 40, 112, 114, 106, 46, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, 105, 111, 110, 44, 32, 34, 58, 34, 44, 32, 116, 114, 117, 101, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 115, 91, 49, 93, 44, 32, 118, 97, 108, 117, 101, 115, 91, 50, 93, 10, 101, 110, 100, - 10, 101, 110, 100, 10, }; - -// src/base/config.lua -static const unsigned char builtin_script_29[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 99, 111, 110, 102, 105, 103, 32, 61, 32, 123, 125, 10, -108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, - 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, -103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 105, 110, 102, 111, 40, 99, 102, 103, 44, 32, 107, 105, 110, 100, 44, 32, 102, 105, 101, -108, 100, 41, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 100, 105, 114, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, -108, 111, 99, 97, 116, 105, 111, 110, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 100, 105, 114, 10, 105, 102, 32, 99, 102, 103, 46, -112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 116, 97, 114, 103, 101, 116, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 106, -111, 105, 110, 40, 98, 97, 115, 101, 100, 105, 114, 44, 32, 39, 98, 105, 110, 39, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, - 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 101, 108, 115, 101, 10, 116, 97, 114, 103, 101, 116, 100, 105, 114, 32, 61, - 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 98, 97, 115, 101, 100, 105, 114, 44, 32, 39, 98, 105, 110, 39, 44, 32, 99, 102, 103, 46, 98, -117, 105, 108, 100, 99, 102, 103, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 61, 32, 99, -102, 103, 91, 102, 105, 101, 108, 100, 46, 46, 34, 100, 105, 114, 34, 93, 32, 111, 114, 32, 99, 102, 103, 46, 116, 97, 114, 103, 101, 116, 100, 105, -114, 32, 111, 114, 32, 116, 97, 114, 103, 101, 116, 100, 105, 114, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 61, 32, - 99, 102, 103, 91, 102, 105, 101, 108, 100, 46, 46, 34, 110, 97, 109, 101, 34, 93, 32, 111, 114, 32, 99, 102, 103, 46, 116, 97, 114, 103, 101, 116, -110, 97, 109, 101, 32, 111, 114, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 10, 108, 111, 99, 97, 108, 32, 112, -114, 101, 102, 105, 120, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 46, 46, 34, 112, 114, 101, 102, 105, 120, 34, 93, 32, 111, 114, 32, - 99, 102, 103, 46, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 111, 114, 32, 34, 34, 10, 108, 111, 99, 97, 108, 32, 115, 117, 102, -102, 105, 120, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 46, 46, 34, 115, 117, 102, 102, 105, 120, 34, 93, 32, 111, 114, 32, 99, 102, -103, 46, 116, 97, 114, 103, 101, 116, 115, 117, 102, 102, 105, 120, 32, 111, 114, 32, 34, 34, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 101, 110, -115, 105, 111, 110, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 46, 46, 34, 101, 120, 116, 101, 110, 115, 105, 111, 110, 34, 93, 32, 111, -114, 32, 99, 102, 103, 46, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 111, 114, 32, 34, 34, 10, 108, 111, 99, 97, -108, 32, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 32, 61, 32, 34, 34, 10, 108, 111, 99, 97, 108, 32, 98, 117, 110, 100, 108, 101, 112, 97, -116, 104, 32, 61, 32, 34, 34, 10, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, - 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, - 41, 32, 97, 110, 100, 32, 40, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 69, 68, 65, 80, 80, 32, 111, 114, 32, - 40, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 104, 97, -114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 41, 41, 32, 116, 104, 101, 110, 10, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 32, 61, 32, 98, - 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 10, 98, 117, 110, 100, 108, 101, 112, 97, 116, 104, 32, - 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 44, 32, 105, 105, 102, 40, 107, 105, 110, 100, - 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, - 98, 116, 121, 112, 101, 32, 61, 61, 32, 34, 79, 83, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 32, 34, 86, 101, 114, 115, 105, 111, -110, 115, 47, 65, 34, 44, 32, 34, 67, 111, 110, 116, 101, 110, 116, 115, 47, 77, 97, 99, 79, 83, 34, 41, 41, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 105, 110, 102, 111, 32, 61, 32, 123, 125, 10, 105, 110, 102, 111, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 32, 61, 32, -100, 105, 114, 101, 99, 116, 111, 114, 121, 10, 105, 110, 102, 111, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 32, 32, 61, 32, 98, 97, 115, 101, -110, 97, 109, 101, 32, 46, 46, 32, 115, 117, 102, 102, 105, 120, 10, 105, 110, 102, 111, 46, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, - 32, 112, 114, 101, 102, 105, 120, 32, 46, 46, 32, 105, 110, 102, 111, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 101, 120, 116, 101, -110, 115, 105, 111, 110, 10, 105, 110, 102, 111, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 32, 61, 32, 101, 120, 116, 101, 110, 115, 105, 111, -110, 10, 105, 110, 102, 111, 46, 97, 98, 115, 112, 97, 116, 104, 32, 32, 32, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 100, 105, -114, 101, 99, 116, 111, 114, 121, 44, 32, 105, 110, 102, 111, 46, 110, 97, 109, 101, 41, 10, 105, 110, 102, 111, 46, 102, 117, 108, 108, 112, 97, 116, -104, 32, 32, 32, 61, 32, 105, 110, 102, 111, 46, 97, 98, 115, 112, 97, 116, 104, 10, 105, 110, 102, 111, 46, 98, 117, 110, 100, 108, 101, 110, 97, -109, 101, 32, 61, 32, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 10, 105, 110, 102, 111, 46, 98, 117, 110, 100, 108, 101, 112, 97, 116, 104, 32, - 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 100, 105, 114, 101, 99, 116, 111, 114, 121, 44, 32, 98, 117, 110, 100, 108, 101, 112, 97, 116, -104, 41, 10, 105, 110, 102, 111, 46, 112, 114, 101, 102, 105, 120, 32, 32, 32, 32, 32, 61, 32, 112, 114, 101, 102, 105, 120, 10, 105, 110, 102, 111, - 46, 115, 117, 102, 102, 105, 120, 32, 32, 32, 32, 32, 61, 32, 115, 117, 102, 102, 105, 120, 10, 114, 101, 116, 117, 114, 110, 32, 105, 110, 102, 111, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 99, 97, 110, 76, 105, 110, 107, 40, 99, 102, 103, - 44, 32, 116, 97, 114, 103, 101, 116, 44, 32, 108, 105, 110, 107, 97, 103, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 97, 114, 103, 101, -116, 41, 32, 126, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 46, 107, 105, -110, 100, 32, 126, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 97, 110, 100, 32, 116, 97, 114, 103, 101, 116, 46, 107, 105, 110, -100, 32, 126, 61, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, -115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 61, 32, 34, 67, 43, 43, 34, 32, -116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, 112, 46, 79, 78, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 46, 108, 97, 110, 103, 117, - 97, 103, 101, 32, 61, 61, 32, 34, 67, 43, 43, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 46, 99, 108, 114, 32, - 61, 61, 32, 112, 46, 79, 78, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 77, 97, 110, 97, 103, 101, 100, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, -116, 110, 101, 116, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, - 32, 112, 46, 79, 70, 70, 41, 10, 108, 111, 99, 97, 108, 32, 116, 103, 116, 77, 97, 110, 97, 103, 101, 100, 32, 61, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 116, 97, 114, 103, 101, 116, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 111, 114, 32, 40, -116, 97, 114, 103, 101, 116, 46, 99, 108, 114, 32, 126, 61, 32, 112, 46, 79, 70, 70, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 102, 103, - 77, 97, 110, 97, 103, 101, 100, 32, 61, 61, 32, 116, 103, 116, 77, 97, 110, 97, 103, 101, 100, 41, 10, 101, 110, 100, 10, 105, 102, 32, 112, 114, -111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 105, 115, 77, 97, 110, 97, 103, 101, 100, - 32, 61, 32, 40, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 116, 97, 114, 103, 101, 116, 41, 32, 61, 61, - 32, 34, 46, 100, 108, 108, 34, 41, 10, 105, 102, 32, 105, 115, 77, 97, 110, 97, 103, 101, 100, 32, 97, 110, 100, 32, 99, 102, 103, 46, 99, 108, -114, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 40, 105, 115, 77, 97, 110, 97, 103, 101, 100, 41, 32, 61, 61, 32, 40, 108, 105, 110, 107, 97, 103, 101, 32, - 61, 61, 32, 34, 109, 97, 110, 97, 103, 101, 100, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, -103, 46, 99, 97, 110, 76, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, - 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 10, 111, 114, 32, 99, 111, 110, 102, 105, 103, 46, 105, -115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 111, 114, 32, 99, 102, 103, 46, 102, 108, 97, 103, -115, 46, 78, 111, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 76, 105, 110, 107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, -102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 102, 105, 110, 100, 102, 105, 108, 101, 40, 99, 102, 103, 44, 32, 101, 120, 116, 41, 10, 102, 111, 114, - 32, 95, 44, 32, 102, 110, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 102, 105, 108, 101, 115, 41, 32, 100, -111, 10, 105, 102, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 101, 120, 116, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, -106, 101, 99, 116, 44, 32, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 105, 110, 102, 111, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, -107, 105, 110, 100, 32, 61, 32, 99, 102, 103, 46, 107, 105, 110, 100, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, -105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, -115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 32, 97, 110, 100, 32, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, - 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 73, 109, -112, 111, 114, 116, 76, 105, 98, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, -116, 105, 110, 102, 111, 40, 99, 102, 103, 44, 32, 107, 105, 110, 100, 44, 32, 34, 105, 109, 112, 108, 105, 98, 34, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 107, 105, 110, -100, 44, 32, 112, 97, 114, 116, 44, 32, 108, 105, 110, 107, 97, 103, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 123, 125, 10, 105, 102, 32, 112, 97, 114, 116, 32, 61, 61, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 44, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 112, -114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, -100, 105, 114, 41, 41, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 102, 103, 46, 108, -105, 110, 107, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 32, 61, 32, 99, 102, 103, 46, 108, 105, 110, 107, 115, 91, 105, - 93, 10, 108, 111, 99, 97, 108, 32, 105, 116, 101, 109, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 46, 102, 105, 110, 100, 112, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, -108, 105, 110, 107, 41, 10, 105, 102, 32, 112, 114, 106, 32, 97, 110, 100, 32, 107, 105, 110, 100, 32, 126, 61, 32, 34, 115, 121, 115, 116, 101, 109, - 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, -116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, -108, 97, 116, 102, 111, 114, 109, 41, 10, 105, 102, 32, 112, 114, 106, 99, 102, 103, 32, 97, 110, 100, 32, 40, 107, 105, 110, 100, 32, 61, 61, 32, - 34, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 32, 111, 114, 32, 99, 111, 110, 102, 105, 103, 46, 99, 97, 110, 76, 105, 110, 107, - 40, 99, 102, 103, 44, 32, 112, 114, 106, 99, 102, 103, 41, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 97, 114, 116, 32, 61, 61, 32, 34, -111, 98, 106, 101, 99, 116, 34, 32, 116, 104, 101, 110, 10, 105, 116, 101, 109, 32, 61, 32, 112, 114, 106, 99, 102, 103, 10, 101, 108, 115, 101, 10, -105, 116, 101, 109, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 44, 32, 112, 114, 106, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 102, 117, 108, 108, 112, 97, -116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 112, 114, 106, 32, 97, 110, 100, 32, 40, -107, 105, 110, 100, 32, 61, 61, 32, 34, 115, 121, 115, 116, 101, 109, 34, 32, 111, 114, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 97, 108, 108, - 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 99, 97, 110, 76, 105, 110, 107, 40, 99, 102, 103, 44, 32, 108, -105, 110, 107, 44, 32, 108, 105, 110, 107, 97, 103, 101, 41, 32, 116, 104, 101, 110, 10, 105, 116, 101, 109, 32, 61, 32, 108, 105, 110, 107, 10, 105, -102, 32, 105, 116, 101, 109, 58, 102, 105, 110, 100, 40, 34, 47, 34, 44, 32, 110, 105, 108, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, - 10, 105, 116, 101, 109, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 44, 32, 105, 116, 101, 109, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 116, -101, 109, 32, 97, 110, 100, 32, 105, 116, 101, 109, 32, 126, 61, 32, 99, 102, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 97, 114, 116, 32, - 61, 61, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 32, 116, 104, 101, 110, 10, 105, 116, 101, 109, 32, 61, 32, 112, 97, 116, 104, 46, -103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 105, 116, 101, 109, 41, 10, 105, 102, 32, 105, 116, 101, 109, 32, 61, 61, 32, 34, 46, - 34, 32, 116, 104, 101, 110, 10, 105, 116, 101, 109, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 112, 97, 114, -116, 32, 61, 61, 32, 34, 110, 97, 109, 101, 34, 32, 116, 104, 101, 110, 10, 105, 116, 101, 109, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, -110, 97, 109, 101, 40, 105, 116, 101, 109, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 97, 114, 116, 32, 61, 61, 32, 34, 98, 97, 115, 101, 110, - 97, 109, 101, 34, 32, 116, 104, 101, 110, 10, 105, 116, 101, 109, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, -101, 40, 105, 116, 101, 109, 41, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 112, 97, 114, 116, 41, 32, 61, 61, 32, 34, 102, 117, -110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 112, 97, 114, 116, 40, 108, 105, 110, 107, 44, 32, 105, 116, 101, 109, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 116, 101, 109, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, - 97, 105, 110, 115, 40, 114, 101, 115, 117, 108, 116, 44, 32, 105, 116, 101, 109, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 105, 116, 101, 109, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, -114, 117, 110, 116, 105, 109, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 40, 110, 111, 116, 32, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, -117, 110, 116, 105, 109, 101, 32, 111, 114, 32, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 32, 45, 45, 32, 105, 110, 100, 105, 99, 97, 116, 101, 32, 116, 104, 97, 116, 32, 110, -111, 32, 114, 117, 110, 116, 105, 109, 101, 32, 119, 97, 115, 32, 101, 120, 112, 108, 105, 99, 105, 116, 108, 121, 32, 115, 101, 108, 101, 99, 116, 101, -100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 97, 103, 101, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 116, - 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, 79, 110, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 34, 44, 32, 34, - 83, 104, 97, 114, 101, 100, 34, 41, 32, 45, 45, 32, 97, 115, 115, 117, 109, 101, 32, 39, 83, 104, 97, 114, 101, 100, 39, 32, 105, 115, 32, 100, -101, 102, 97, 117, 108, 116, 63, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 108, 105, 110, 107, 97, 103, 101, 32, 46, 46, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, -101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 44, 32, 34, 68, 101, 98, 117, 103, 34, 44, 32, 34, 82, 101, 108, 101, 97, 115, -101, 34, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 108, 105, 110, 107, 97, 103, 101, 32, 46, 46, 32, 99, 102, 103, 46, 114, -117, 110, 116, 105, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 103, -101, 116, 116, 97, 114, 103, 101, 116, 105, 110, 102, 111, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 46, - 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 105, 110, 102, 111, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 107, 105, 110, 100, 44, 32, 34, -116, 97, 114, 103, 101, 116, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, - 70, 105, 108, 101, 40, 115, 101, 108, 102, 44, 32, 116, 101, 115, 116, 102, 110, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, - 32, 115, 101, 108, 102, 46, 102, 105, 108, 101, 115, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 102, 105, 108, 101, 115, 32, 100, 111, - 10, 105, 102, 32, 116, 101, 115, 116, 102, 110, 40, 102, 105, 108, 101, 115, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 67, 111, 112, 121, 76, 111, 99, 97, 108, 40, 99, 102, 103, 44, 32, -108, 105, 110, 107, 110, 97, 109, 101, 44, 32, 100, 101, 102, 97, 117, 108, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, - 78, 111, 67, 111, 112, 121, 76, 111, 99, 97, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, -100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 99, 111, 112, 121, 108, 111, 99, 97, 108, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 99, 102, 103, 46, 99, 111, 112, 121, 108, 111, 99, 97, 108, - 44, 32, 108, 105, 110, 107, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 100, 101, 102, 97, 117, 108, 116, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, - 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 126, 61, 32, 110, 105, 108, 32, 97, -110, 100, 10, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 97, 110, 100, 10, 99, 102, 103, 46, -115, 121, 109, 98, 111, 108, 115, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 32, 97, 110, 100, 10, 110, 111, 116, 32, 99, 111, 110, -102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, -102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 46, 111, 112, 116, 105, 109, 105, 122, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, -110, 100, 32, 99, 102, 103, 46, 111, 112, 116, 105, 109, 105, 122, 101, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 97, 110, 100, 32, 99, 102, 103, - 46, 111, 112, 116, 105, 109, 105, 122, 101, 32, 126, 61, 32, 34, 68, 101, 98, 117, 103, 34, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 99, 111, 110, 102, 105, 103, 46, 108, 105, 110, 107, 115, 84, 111, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 44, 32, 112, 114, 106, - 78, 97, 109, 101, 41, 10, 112, 114, 106, 78, 97, 109, 101, 32, 61, 32, 112, 114, 106, 78, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, 10, -108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, 99, 102, 103, 46, 108, 105, 110, 107, 115, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 110, - 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 108, 105, 110, 107, 115, 91, 105, 93, 58, 108, 111, 119, 101, 114, 40, 41, 32, 61, 61, 32, 112, -114, 106, 78, 97, 109, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, - 44, 32, 109, 97, 112, 112, 105, 110, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, - 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 100, 100, 40, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 10, 105, 102, 32, -116, 121, 112, 101, 40, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, -116, 104, 101, 110, 10, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 32, 61, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 40, 99, -102, 103, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 102, 108, 97, 116, 40, 102, 108, 97, 103, 115, 44, 32, -114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 102, 105, 101, 108, 100, 32, 105, 110, 32, 112, 46, -102, 105, 101, 108, 100, 46, 101, 97, 99, 104, 79, 114, 100, 101, 114, 101, 100, 40, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, - 32, 61, 32, 109, 97, 112, 112, 105, 110, 103, 115, 91, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 93, 10, 105, 102, 32, 116, 121, 112, 101, 40, -109, 97, 112, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 109, 97, 112, 32, 61, 32, 109, 97, -112, 40, 99, 102, 103, 44, 32, 109, 97, 112, 112, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 105, 102, 32, 109, 97, 112, 32, 116, 104, 101, 110, - 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 115, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 93, 10, -105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 115, 41, 32, 61, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 32, 116, 104, 101, -110, 10, 118, 97, 108, 117, 101, 115, 32, 61, 32, 105, 105, 102, 40, 118, 97, 108, 117, 101, 115, 44, 32, 34, 79, 110, 34, 44, 32, 34, 79, 102, -102, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 115, 41, 32, 126, 61, 32, 34, 116, 97, 98, 108, -101, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 115, 32, 61, 32, 123, 32, 118, 97, 108, 117, 101, 115, 32, 125, 10, 101, 110, 100, 10, -108, 111, 99, 97, 108, 32, 102, 111, 117, 110, 100, 86, 97, 108, 117, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 102, -111, 114, 101, 97, 99, 104, 105, 40, 118, 97, 108, 117, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, -108, 111, 99, 97, 108, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 32, 61, 32, 109, 97, 112, 91, 118, 97, 108, 117, 101, 93, 10, 105, -102, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 102, 111, 117, 110, 100, 86, - 97, 108, 117, 101, 32, 61, 32, 116, 114, 117, 101, 10, 97, 100, 100, 40, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 86, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 97, 100, 100, - 40, 109, 97, 112, 46, 95, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, - 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 109, 97, 112, 41, 32, 100, 111, 10, 105, 102, 32, 35, 107, 101, 121, 32, 62, 32, 49, 32, 97, 110, -100, 32, 107, 101, 121, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 95, 34, 41, 32, 116, 104, 101, 110, 10, 107, 101, 121, 32, 61, - 32, 107, 101, 121, 58, 115, 117, 98, 40, 50, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 115, 91, 107, 101, 121, 93, 32, 61, 61, 32, 110, 105, -108, 32, 116, 104, 101, 110, 10, 97, 100, 100, 40, 114, 101, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, -102, 103, 32, 97, 110, 100, 32, 99, 102, 103, 46, 99, 111, 110, 102, 105, 103, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 99, 102, 103, 46, 99, 111, 110, 102, 105, 103, 44, 32, 99, 102, 103, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, - 32, 99, 102, 103, 44, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, -103, 46, 116, 111, 111, 108, 115, 101, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 116, 111, 111, 108, 115, 46, 99, 97, 110, 111, 110, 105, 99, 97, 108, 40, 99, 102, 103, 46, -116, 111, 111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// src/base/fileconfig.lua -static const unsigned char builtin_script_30[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, - 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, -102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 120, 116, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 10, 108, 111, - 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 102, 99, 102, 103, 95, 109, 116, 32, 61, 32, 123, 125, 10, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 102, 115, 117, 98, 95, -109, 116, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 110, 101, 119, 40, -102, 110, 97, 109, 101, 44, 32, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 123, 32, 125, 10, -108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 99, 111, 110, 116, 101, 120, 116, 46, 110, 101, 119, 40, 112, 114, 106, 44, 32, 101, 110, -118, 105, 114, 111, 110, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 112, 121, 70, 105, 108, 116, 101, 114, 115, 40, 102, 99, 102, 103, 44, - 32, 112, 114, 106, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 102, 99, 102, 103, 44, 32, 34, 102, -105, 108, 101, 115, 34, 44, 32, 102, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, 41, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, - 97, 108, 117, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 101, 110, 118, 105, 114, 111, 110, 41, 32, 100, 111, 10, 101, 110, -118, 105, 114, 111, 110, 91, 107, 101, 121, 93, 32, 61, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 118, 105, 114, 111, 110, 46, 102, -105, 108, 101, 32, 61, 32, 102, 99, 102, 103, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 102, 99, 102, 103, 41, - 10, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 61, 32, 112, 114, 106, 10, 102, 99, 102, 103, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 32, 61, 32, 112, 114, 106, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 10, 102, 99, 102, 103, 46, 99, 111, 110, 102, 105, 103, -115, 32, 32, 32, 61, 32, 123, 125, 10, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 32, 32, 32, 61, 32, 102, 110, 97, 109, 101, 10, - 99, 111, 110, 116, 101, 120, 116, 46, 98, 97, 115, 101, 100, 105, 114, 40, 102, 99, 102, 103, 44, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, -111, 110, 41, 10, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 102, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, -103, 46, 102, 99, 102, 103, 95, 109, 116, 41, 10, 108, 111, 99, 97, 108, 32, 118, 112, 97, 116, 104, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 103, 101, 116, 118, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 102, 110, 97, 109, 101, 41, 10, 105, 102, 32, 118, 112, 97, 116, 104, 32, 126, - 61, 32, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 102, 99, 102, 103, 46, 118, 112, 97, 116, 104, 32, 61, - 32, 118, 112, 97, 116, 104, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 97, 100, 100, 99, 111, 110, 102, 105, 103, 40, 102, 99, 102, 103, 44, 32, 99, -102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, -108, 32, 119, 107, 115, 32, 61, 32, 99, 102, 103, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 105, -114, 111, 110, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 115, 117, 98, 32, 61, 32, 99, 111, 110, 116, 101, 120, 116, 46, 110, 101, -119, 40, 112, 114, 106, 44, 32, 101, 110, 118, 105, 114, 111, 110, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 112, 121, 70, 105, 108, 116, -101, 114, 115, 40, 102, 115, 117, 98, 44, 32, 102, 99, 102, 103, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 109, 101, 114, 103, 101, 70, 105, 108, -116, 101, 114, 115, 40, 102, 115, 117, 98, 44, 32, 99, 102, 103, 41, 10, 102, 99, 102, 103, 46, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, - 93, 32, 61, 32, 102, 115, 117, 98, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, - 40, 99, 102, 103, 46, 101, 110, 118, 105, 114, 111, 110, 41, 32, 100, 111, 10, 101, 110, 118, 105, 114, 111, 110, 91, 107, 101, 121, 93, 32, 61, 32, -118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 112, 97, 105, 114, -115, 40, 102, 99, 102, 103, 46, 101, 110, 118, 105, 114, 111, 110, 41, 32, 100, 111, 10, 101, 110, 118, 105, 114, 111, 110, 91, 107, 101, 121, 93, 32, - 61, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 102, 115, 117, 98, - 41, 10, 102, 115, 117, 98, 46, 97, 98, 115, 112, 97, 116, 104, 32, 61, 32, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 10, 102, 115, -117, 98, 46, 118, 112, 97, 116, 104, 32, 61, 32, 102, 99, 102, 103, 46, 118, 112, 97, 116, 104, 10, 102, 115, 117, 98, 46, 99, 111, 110, 102, 105, -103, 32, 61, 32, 99, 102, 103, 10, 102, 115, 117, 98, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 114, 106, 10, 102, 115, 117, 98, 46, -119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 119, 107, 115, 10, 99, 111, 110, 116, 101, 120, 116, 46, 98, 97, 115, 101, 100, 105, 114, 40, -102, 115, 117, 98, 44, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 116, 109, 101, -116, 97, 116, 97, 98, 108, 101, 40, 102, 115, 117, 98, 44, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 102, 115, 117, 98, 95, 109, 116, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, -102, 105, 103, 40, 102, 99, 102, 103, 44, 32, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, 46, 99, 111, 110, 102, 105, -103, 115, 91, 99, 102, 103, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, -104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, -102, 99, 102, 103, 32, 97, 110, 100, 32, 40, 35, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, - 48, 41, 32, 97, 110, 100, 32, 40, 35, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 83, -101, 116, 116, 105, 110, 103, 115, 40, 102, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, 114, -101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 102, 105, 101, 108, 100, 32, 105, -110, 32, 112, 97, 105, 114, 115, 40, 112, 46, 102, 105, 101, 108, 100, 115, 41, 32, 100, 111, 10, 105, 102, 32, 102, 105, 101, 108, 100, 46, 115, 99, -111, 112, 101, 115, 91, 49, 93, 32, 61, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, - 97, 108, 117, 101, 32, 61, 32, 102, 99, 102, 103, 91, 102, 105, 101, 108, 100, 46, 110, 97, 109, 101, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, -116, 104, 101, 110, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, -114, 117, 101, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, -102, 99, 102, 103, 95, 109, 116, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 102, 99, 102, 103, 95, 109, 116, 10, 102, 99, 102, -103, 95, 109, 116, 46, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 44, 32, 107, 101, -121, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 99, 102, 103, 95, 109, 116, 91, 107, 101, 121, 93, 41, 32, 61, 61, 32, 34, 102, 117, 110, - 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, 95, 109, 116, 91, 107, 101, 121, 93, 40, -102, 99, 102, 103, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 95, 95, 109, 116, 46, 95, 95, -105, 110, 100, 101, 120, 40, 102, 99, 102, 103, 44, 32, 107, 101, 121, 41, 10, 101, 110, 100, 10, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, -102, 115, 117, 98, 95, 109, 116, 46, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 115, 117, 98, 44, - 32, 107, 101, 121, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 99, 102, 103, 95, 109, 116, 91, 107, 101, 121, 93, 41, 32, 61, 61, 32, 34, -102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, 95, 109, 116, 91, 107, 101, -121, 93, 40, 102, 115, 117, 98, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 116, 101, 120, 116, 46, 95, 95, 109, 116, - 46, 95, 95, 105, 110, 100, 101, 120, 40, 102, 115, 117, 98, 44, 32, 107, 101, 121, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 102, 99, 102, 103, 95, 109, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, - 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 99, 102, -103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 99, 102, 103, - 46, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 114, -101, 108, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 103, 101, -116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 99, 102, 103, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 110, 97, 109, 101, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, -112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 111, 98, 106, 110, 97, 109, 101, 40, 102, 99, 102, 103, 41, 10, 105, 102, - 32, 102, 99, 102, 103, 46, 115, 101, 113, 117, 101, 110, 99, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 102, 99, 102, 103, 46, 115, -101, 113, 117, 101, 110, 99, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, 46, 98, 97, 115, -101, 110, 97, 109, 101, 32, 46, 46, 32, 102, 99, 102, 103, 46, 115, 101, 113, 117, 101, 110, 99, 101, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, -114, 110, 32, 102, 99, 102, 103, 46, 98, 97, 115, 101, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 112, 97, 116, 104, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, - 46, 114, 101, 108, 112, 97, 116, 104, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 114, 101, -108, 112, 97, 116, 104, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, -104, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 118, 112, 97, 116, 104, 40, 102, 99, -102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 99, 102, 103, 46, 114, 101, 108, 112, 97, 116, 104, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 102, 99, 102, 103, 95, 109, 116, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 99, 102, 103, 41, 10, 114, 101, 116, -117, 114, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 99, 102, 103, 46, 97, 98, 115, 112, 97, -116, 104, 41, 10, 101, 110, 100, 10, }; - -// src/base/rule.lua -static const unsigned char builtin_script_31[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 114, 117, 108, 101, 32, 61, 32, 112, 46, 97, 112, 105, - 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 40, 34, 114, 117, 108, 101, 34, 44, 32, 112, 46, 103, 108, 111, 98, 97, 108, 41, 10, 108, 111, 99, - 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 112, 46, 114, 117, 108, 101, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, 110, -101, 119, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 108, 102, 32, 61, 32, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, -114, 46, 110, 101, 119, 40, 114, 117, 108, 101, 44, 32, 110, 97, 109, 101, 41, 10, 95, 71, 91, 110, 97, 109, 101, 32, 46, 46, 32, 34, 86, 97, -114, 115, 34, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 114, 115, 41, 10, 114, 117, 108, 101, 46, 115, 101, 116, 86, 97, -114, 115, 40, 115, 101, 108, 102, 44, 32, 118, 97, 114, 115, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 108, 111, 119, 101, 114, 78, 97, -109, 101, 32, 61, 32, 32, 110, 97, 109, 101, 58, 103, 115, 117, 98, 40, 34, 94, 37, 117, 43, 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 108, -111, 119, 101, 114, 41, 10, 95, 71, 91, 108, 111, 119, 101, 114, 78, 97, 109, 101, 32, 46, 46, 32, 34, 86, 97, 114, 115, 34, 93, 32, 61, 32, - 95, 71, 91, 110, 97, 109, 101, 32, 46, 46, 32, 34, 86, 97, 114, 115, 34, 93, 10, 114, 101, 116, 117, 114, 110, 32, 115, 101, 108, 102, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, 101, 97, 99, 104, 80, 114, 111, 112, 101, 114, 116, 121, 40, 115, 101, -108, 102, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 112, 115, 32, 61, 32, 115, 101, 108, 102, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, -101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 48, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 40, 41, 10, 105, 32, 61, 32, 105, 32, 43, 32, 49, 10, 105, 102, 32, 105, 32, 60, 61, 32, 35, 112, 114, 111, 112, -115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 112, 115, 91, 105, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, 112, 101, 114, 116, 121, 40, 115, 101, 108, -102, 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 112, 115, 32, 61, 32, 115, 101, 108, 102, 46, 112, 114, 111, 112, -101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 112, 114, 111, 112, 115, - 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 112, 32, 61, 32, 112, 114, 111, 112, 115, 91, 105, 93, 10, 105, 102, 32, 112, 114, 111, -112, 46, 110, 97, 109, 101, 32, 61, 61, 32, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 112, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, -112, 101, 114, 116, 121, 70, 105, 101, 108, 100, 40, 115, 101, 108, 102, 44, 32, 112, 114, 111, 112, 41, 10, 105, 102, 32, 112, 114, 111, 112, 46, 95, -102, 105, 101, 108, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 112, 46, 95, 102, 105, 101, 108, 100, 10, 101, 110, -100, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 61, 32, 112, 114, 111, 112, 46, 107, 105, 110, 100, 32, 111, 114, 32, 34, 115, 116, 114, -105, 110, 103, 34, 10, 105, 102, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 108, 105, 115, 116, 34, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 108, 100, 32, 61, - 32, 112, 46, 102, 105, 101, 108, 100, 46, 110, 101, 119, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 95, 114, 117, 108, 101, 95, 34, 32, 46, - 46, 32, 115, 101, 108, 102, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 95, 34, 32, 46, 46, 32, 112, 114, 111, 112, 46, 110, 97, 109, 101, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 107, 105, 110, 100, 44, 10, -116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 114, 111, 112, 46, 95, 102, 105, 101, 108, 100, 32, 61, 32, 102, -108, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, -115, 101, 116, 86, 97, 114, 115, 40, 115, 101, 108, 102, 44, 32, 118, 97, 114, 115, 41, 10, 102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, -117, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 118, 97, 114, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 112, 32, - 61, 32, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, 112, 101, 114, 116, 121, 40, 115, 101, 108, 102, 44, 32, 107, 101, 121, 41, 10, 105, 102, - 32, 110, 111, 116, 32, 112, 114, 111, 112, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 32, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, -109, 97, 116, 40, 34, 114, 117, 108, 101, 32, 39, 37, 115, 39, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 104, 97, 118, 101, 32, 112, 114, 111, -112, 101, 114, 116, 121, 32, 39, 37, 115, 39, 34, 44, 32, 115, 101, 108, 102, 46, 110, 97, 109, 101, 44, 32, 107, 101, 121, 41, 41, 10, 101, 110, -100, 10, 108, 111, 99, 97, 108, 32, 102, 108, 100, 32, 61, 32, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, 112, 101, 114, 116, 121, 70, 105, -101, 108, 100, 40, 115, 101, 108, 102, 44, 32, 112, 114, 111, 112, 41, 10, 112, 46, 97, 112, 105, 46, 115, 116, 111, 114, 101, 70, 105, 101, 108, 100, - 40, 102, 108, 100, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 117, -108, 101, 46, 112, 114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 115, 101, 108, 102, 44, 32, 101, 110, 118, 105, -114, 111, 110, 44, 32, 102, 111, 114, 109, 97, 116, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 102, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 115, 101, 108, 102, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 41, 32, 100, 111, 10, 101, 110, -118, 105, 114, 111, 110, 91, 100, 101, 102, 46, 110, 97, 109, 101, 93, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, -102, 111, 114, 109, 97, 116, 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 114, 117, 108, 101, 46, 99, 114, 101, 97, 116, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 115, 101, 108, 102, 44, 32, -102, 111, 114, 109, 97, 116, 41, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 123, 125, 10, 114, 117, 108, 101, 46, -112, 114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 115, 101, 108, 102, 44, 32, 101, 110, 118, 105, 114, 111, 110, - 44, 32, 102, 111, 114, 109, 97, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 101, 110, 118, 105, 114, 111, 110, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, 112, 114, 101, 112, 97, 114, 101, 80, 97, 116, 104, 86, 97, 114, 115, 40, 115, 101, 108, 102, 44, - 32, 112, 97, 116, 104, 86, 97, 114, 115, 44, 32, 102, 111, 114, 109, 97, 116, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 102, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 115, 101, 108, 102, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 41, - 32, 100, 111, 10, 112, 97, 116, 104, 86, 97, 114, 115, 91, 100, 101, 102, 46, 110, 97, 109, 101, 93, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, -117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, - 97, 116, 40, 102, 111, 114, 109, 97, 116, 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 32, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 114, 117, 108, 101, 46, 99, 114, 101, 97, 116, 101, 80, 97, 116, 104, 86, 97, 114, 115, 40, 115, 101, 108, 102, - 44, 32, 102, 111, 114, 109, 97, 116, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 123, 125, 10, 114, 117, -108, 101, 46, 112, 114, 101, 112, 97, 114, 101, 80, 97, 116, 104, 86, 97, 114, 115, 40, 115, 101, 108, 102, 44, 32, 112, 97, 116, 104, 86, 97, 114, -115, 44, 32, 102, 111, 114, 109, 97, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 86, 97, 114, 115, 10, 101, 110, 100, 10, }; - -// src/base/oven.lua -static const unsigned char builtin_script_32[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 111, 118, 101, 110, 32, 61, 32, 123, 125, 10, 108, 111, - 99, 97, 108, 32, 111, 118, 101, 110, 32, 61, 32, 112, 46, 111, 118, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 120, 116, 32, - 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 10, 112, 46, 111, 118, 101, 110, 46, 98, 117, 98, 98, 108, 101, 100, 70, 105, 101, 108, 100, 115, - 32, 61, 32, 123, 10, 99, 111, 110, 102, 105, 103, 109, 97, 112, 32, 61, 32, 116, 114, 117, 101, 44, 10, 118, 112, 97, 116, 104, 115, 32, 61, 32, -116, 114, 117, 101, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 40, 41, 10, 108, 111, 99, 97, -108, 32, 114, 111, 111, 116, 32, 61, 32, 112, 46, 97, 112, 105, 46, 114, 111, 111, 116, 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 41, 10, 114, -111, 111, 116, 46, 95, 105, 115, 66, 97, 107, 101, 100, 32, 61, 32, 102, 97, 108, 115, 101, 59, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, -114, 46, 98, 97, 107, 101, 40, 114, 111, 111, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 98, - 97, 107, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 99, 111, 110, 116, 97, -105, 110, 101, 114, 46, 98, 97, 107, 101, 40, 119, 107, 115, 41, 10, 101, 110, 100, 10, 112, 46, 97, 108, 105, 97, 115, 40, 111, 118, 101, 110, 44, - 32, 34, 98, 97, 107, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 34, 98, 97, 107, 101, 83, 111, 108, 117, 116, 105, 111, 110, 34, - 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 100, 100, 67, 111, 109, 109, 111, 110, 67, 111, 110, 116, 101, 120, -116, 70, 105, 108, 116, 101, 114, 115, 40, 115, 101, 108, 102, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, - 40, 115, 101, 108, 102, 44, 32, 34, 95, 65, 67, 84, 73, 79, 78, 34, 44, 32, 95, 65, 67, 84, 73, 79, 78, 41, 10, 99, 111, 110, 116, 101, -120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 115, 101, 108, 102, 44, 32, 34, 97, 99, 116, 105, 111, 110, 34, 44, 32, 95, 65, 67, - 84, 73, 79, 78, 41, 10, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 32, 61, 32, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 32, -111, 114, 32, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, - 40, 115, 101, 108, 102, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, -115, 40, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 41, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, -114, 40, 115, 101, 108, 102, 44, 32, 34, 104, 111, 115, 116, 34, 44, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, - 40, 111, 115, 46, 104, 111, 115, 116, 40, 41, 41, 41, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 123, 125, 10, -102, 111, 114, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 95, 79, 80, 84, 73, 79, 78, 83, - 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 101, 114, 109, 32, 61, 32, 107, 101, 121, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, - 61, 32, 34, 34, 32, 116, 104, 101, 110, 10, 116, 101, 114, 109, 32, 61, 32, 116, 101, 114, 109, 32, 46, 46, 32, 34, 61, 34, 32, 46, 46, 32, -116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 111, 112, 116, 105, 111, 110, 115, 44, 32, 116, 101, 114, 109, 41, 10, 101, 110, 100, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, -105, 108, 116, 101, 114, 40, 115, 101, 108, 102, 44, 32, 34, 95, 79, 80, 84, 73, 79, 78, 83, 34, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, - 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 115, 101, 108, 102, 44, 32, 34, 111, 112, 116, 105, 111, 110, -115, 34, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 46, 98, 97, 107, 101, 40, 115, 101, 108, 102, 41, 10, 97, 100, 100, 67, 111, 109, 109, 111, 110, 67, 111, 110, 116, 101, 120, -116, 70, 105, 108, 116, 101, 114, 115, 40, 115, 101, 108, 102, 41, 10, 115, 101, 108, 102, 46, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 123, 10, -119, 107, 115, 32, 61, 32, 115, 101, 108, 102, 44, 10, 115, 108, 110, 32, 61, 32, 115, 101, 108, 102, 44, 10, 125, 10, 99, 111, 110, 116, 101, 120, -116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 115, 101, 108, 102, 41, 10, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 32, -115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 111, 114, 32, 115, 101, 108, 102, 46, 98, 97, 115, 101, 100, 105, 114, 10, 99, 111, -110, 116, 101, 120, 116, 46, 98, 97, 115, 101, 100, 105, 114, 40, 115, 101, 108, 102, 44, 32, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, -110, 41, 10, 115, 101, 108, 102, 46, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, 105, -103, 115, 40, 115, 101, 108, 102, 41, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 98, 97, 107, 101, 67, 104, 105, 108, 100, 114, 101, -110, 40, 115, 101, 108, 102, 41, 10, 111, 118, 101, 110, 46, 98, 97, 107, 101, 79, 98, 106, 68, 105, 114, 115, 40, 115, 101, 108, 102, 41, 10, 111, -118, 101, 110, 46, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 40, 115, 101, 108, 102, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 40, -119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, - 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 115, 111, 117, 114, 99, 101, 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 32, 61, 32, 116, 114, 117, 101, - 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 95, 46, 102, 105, 108, -101, 115, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, 102, 105, 108, 101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 10, -105, 102, 32, 110, 111, 116, 32, 110, 111, 100, 101, 32, 116, 104, 101, 110, 10, 110, 111, 100, 101, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, -110, 102, 105, 103, 46, 110, 101, 119, 40, 102, 105, 108, 101, 110, 97, 109, 101, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 10, -102, 105, 108, 101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 32, 61, 32, 110, 111, 100, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, -101, 114, 116, 40, 102, 105, 108, 101, 115, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 110, 111, 100, 101, 46, 100, 101, 112, 101, 110, 100, -115, 79, 110, 32, 61, 32, 115, 111, 117, 114, 99, 101, 10, 110, 111, 100, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 61, 32, 116, 114, -117, 101, 10, 105, 102, 32, 110, 111, 116, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, - 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 97, 100, -100, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 100, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, - 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, -102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 111, 114, - 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, -111, 114, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, -116, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 105, 102, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, -104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 102, 105, 108, 101, 99, 102, 103, - 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 10, 105, 102, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 97, 110, -100, 32, 35, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, -111, 117, 116, 112, 117, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 32, 100, -111, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 116, 104, 46, 105, 115, 108, 105, 110, 107, 97, 98, 108, 101, 40, 111, 117, 116, 112, 117, 116, 41, - 32, 116, 104, 101, 110, 10, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, - 44, 32, 111, 117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, -114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, - 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 115, 104, 97, -108, 108, 111, 119, 99, 111, 112, 121, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, - 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 116, 97, - 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, -101, 41, 10, 97, 100, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 105, -102, 32, 112, 114, 106, 46, 104, 97, 115, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 32, 97, 110, 100, 32, 112, 46, 112, 114, -111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, 105, 118, 101, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 111, 118, 101, 110, 46, 97, 115, -115, 105, 103, 110, 79, 98, 106, 101, 99, 116, 83, 101, 113, 117, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 107, 101, 40, 115, 101, 108, -102, 41, 10, 118, 101, 114, 98, 111, 115, 101, 102, 40, 39, 32, 32, 32, 32, 66, 97, 107, 105, 110, 103, 32, 37, 115, 46, 46, 46, 39, 44, 32, -115, 101, 108, 102, 46, 110, 97, 109, 101, 41, 10, 115, 101, 108, 102, 46, 115, 111, 108, 117, 116, 105, 111, 110, 32, 61, 32, 115, 101, 108, 102, 46, -119, 111, 114, 107, 115, 112, 97, 99, 101, 10, 115, 101, 108, 102, 46, 103, 108, 111, 98, 97, 108, 32, 61, 32, 115, 101, 108, 102, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 46, 103, 108, 111, 98, 97, 108, 10, 108, 111, 99, 97, 108, 32, 119, 107, 115, 32, 61, 32, 115, 101, 108, 102, 46, 119, -111, 114, 107, 115, 112, 97, 99, 101, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 112, 121, 70, 105, 108, 116, 101, 114, 115, 40, 115, 101, 108, -102, 44, 32, 119, 107, 115, 41, 10, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 32, 61, 32, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, -109, 32, 111, 114, 32, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, -101, 114, 40, 115, 101, 108, 102, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, - 97, 103, 115, 40, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 41, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, -116, 101, 114, 40, 115, 101, 108, 102, 44, 32, 34, 104, 111, 115, 116, 34, 44, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, -103, 115, 40, 111, 115, 46, 104, 111, 115, 116, 40, 41, 41, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, - 40, 115, 101, 108, 102, 44, 32, 34, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 34, 44, 32, 115, 101, 108, 102, 46, 97, 114, 99, 104, -105, 116, 101, 99, 116, 117, 114, 101, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 115, 101, 108, 102, - 44, 32, 34, 116, 97, 103, 115, 34, 44, 32, 115, 101, 108, 102, 46, 116, 97, 103, 115, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, - 70, 105, 108, 116, 101, 114, 40, 115, 101, 108, 102, 44, 32, 34, 107, 105, 110, 100, 34, 44, 32, 115, 101, 108, 102, 46, 107, 105, 110, 100, 41, 10, -115, 101, 108, 102, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 115, 101, 108, 102, 10, 115, 101, 108, 102, 46, 101, 110, 118, 105, 114, 111, 110, - 32, 61, 32, 123, 10, 119, 107, 115, 32, 61, 32, 119, 107, 115, 44, 10, 115, 108, 110, 32, 61, 32, 119, 107, 115, 44, 10, 112, 114, 106, 32, 61, - 32, 115, 101, 108, 102, 44, 10, 125, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 115, 101, 108, 102, 41, 10, 112, - 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 98, 97, 107, 101, 67, 104, 105, 108, 100, 114, 101, 110, 40, 115, 101, 108, 102, 41, 10, 115, 101, -108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 32, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 111, 114, 32, 115, -101, 108, 102, 46, 98, 97, 115, 101, 100, 105, 114, 10, 99, 111, 110, 116, 101, 120, 116, 46, 98, 97, 115, 101, 100, 105, 114, 40, 115, 101, 108, 102, - 44, 32, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 115, 32, 61, 32, 116, 97, - 98, 108, 101, 46, 102, 111, 108, 100, 40, 115, 101, 108, 102, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 111, 114, 32, -123, 125, 44, 32, 115, 101, 108, 102, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 32, 111, 114, 32, 123, 125, 41, 10, 111, 118, 101, 110, 46, 98, -117, 98, 98, 108, 101, 70, 105, 101, 108, 100, 115, 40, 115, 101, 108, 102, 44, 32, 115, 101, 108, 102, 44, 32, 99, 102, 103, 115, 41, 10, 115, 101, -108, 102, 46, 95, 99, 102, 103, 108, 105, 115, 116, 32, 61, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, 105, 103, 76, 105, 115, -116, 40, 115, 101, 108, 102, 44, 32, 99, 102, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 83, 121, 115, 116, 101, -109, 32, 61, 32, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 10, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 32, 61, 32, 110, 105, -108, 10, 115, 101, 108, 102, 46, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 112, 97, 105, 114, 105, -110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 115, 101, 108, 102, 46, 95, 99, 102, 103, 108, 105, 115, 116, 41, 32, 100, 111, 10, 108, -111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 102, 103, 32, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 49, 93, 10, 108, 111, 99, 97, 108, - 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 50, 93, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, - 32, 61, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, 105, 103, 40, 119, 107, 115, 44, 32, 115, 101, 108, 102, 44, 32, 98, 117, -105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 105, 102, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, 117, -112, 112, 111, 114, 116, 115, 99, 111, 110, 102, 105, 103, 40, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 44, - 32, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 115, 101, 108, 102, 46, 99, 111, 110, 102, 105, 103, 115, 91, 40, 98, 117, 105, 108, 100, 99, 102, -103, 32, 111, 114, 32, 34, 42, 34, 41, 32, 46, 46, 32, 40, 112, 108, 97, 116, 102, 111, 114, 109, 32, 111, 114, 32, 34, 34, 41, 93, 32, 61, - 32, 99, 102, 103, 10, 101, 110, 100, 10, 101, 110, 100, 10, 115, 101, 108, 102, 46, 95, 32, 61, 32, 123, 125, 10, 115, 101, 108, 102, 46, 95, 46, -102, 105, 108, 101, 115, 32, 61, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 70, 105, 108, 101, 115, 40, 115, 101, 108, 102, 41, 10, 105, 102, 32, -112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, 105, 118, 101, 40, 115, 101, 108, 102, 41, 32, 116, 104, 101, 110, 10, 111, 118, -101, 110, 46, 97, 115, 115, 105, 103, 110, 79, 98, 106, 101, 99, 116, 83, 101, 113, 117, 101, 110, 99, 101, 115, 40, 115, 101, 108, 102, 41, 10, 101, -110, 100, 10, 115, 101, 108, 102, 46, 115, 121, 115, 116, 101, 109, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 83, 121, 115, 116, 101, 109, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 114, 117, 108, 101, 46, 98, 97, 107, 101, 40, 115, 101, 108, 102, 41, 10, 97, 100, -100, 67, 111, 109, 109, 111, 110, 67, 111, 110, 116, 101, 120, 116, 70, 105, 108, 116, 101, 114, 115, 40, 115, 101, 108, 102, 41, 10, 115, 101, 108, 102, - 46, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 123, 10, 114, 117, 108, 101, 32, 61, 32, 115, 101, 108, 102, 44, 10, 125, 10, 99, 111, 110, 116, -101, 120, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 115, 101, 108, 102, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 115, 101, 108, -102, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, - 97, 44, 32, 98, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 46, 110, 97, 109, 101, 32, 60, 32, 98, 46, 110, 97, 109, 101, 10, 101, 110, 100, - 41, 10, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 32, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, -111, 114, 32, 115, 101, 108, 102, 46, 98, 97, 115, 101, 100, 105, 114, 10, 99, 111, 110, 116, 101, 120, 116, 46, 98, 97, 115, 101, 100, 105, 114, 40, -115, 101, 108, 102, 44, 32, 115, 101, 108, 102, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 79, 98, 106, 68, 105, 114, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, -110, 99, 116, 105, 111, 110, 32, 103, 101, 116, 111, 98, 106, 100, 105, 114, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 111, 98, 106, -100, 105, 114, 32, 61, 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 32, 111, 114, 32, 34, 111, 98, 106, 34, 10, 108, 111, 99, 97, 108, 32, -105, 32, 61, 32, 111, 98, 106, 100, 105, 114, 58, 102, 105, 110, 100, 40, 34, 33, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, - 32, 105, 32, 116, 104, 101, 110, 10, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 32, 61, 32, 111, 98, 106, 100, 105, 114, 58, 115, 117, 98, 40, - 49, 44, 32, 105, 32, 45, 32, 49, 41, 32, 46, 46, 32, 111, 98, 106, 100, 105, 114, 58, 115, 117, 98, 40, 105, 32, 43, 32, 49, 41, 10, 114, -101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 123, 125, 10, 108, 111, - 99, 97, 108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 112, 97, 116, 104, 46, -106, 111, 105, 110, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 111, 98, 106, 100, 105, -114, 41, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 100, 105, 114, 115, 44, 32, 100, 105, 114, 41, 10, 105, 102, 32, 99, -102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, - 40, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 100, 105, 114, 115, 44, 32, 100, 105, 114, 41, 10, 101, 110, 100, 10, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, -100, 105, 114, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -100, 105, 114, 115, 44, 32, 100, 105, 114, 41, 10, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 100, 105, 114, 44, 32, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 100, -105, 114, 115, 44, 32, 100, 105, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 100, 105, 114, 115, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, - 99, 111, 117, 110, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 123, 125, 10, 102, -111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, -116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 103, -101, 116, 111, 98, 106, 100, 105, 114, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 100, 105, 114, 115, 32, 116, 104, 101, 110, 10, 99, 111, 110, 102, -105, 103, 115, 91, 99, 102, 103, 93, 32, 61, 32, 100, 105, 114, 115, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 100, 105, 114, 115, 32, 111, 114, 32, 123, 125, 41, 32, 100, 111, 10, 99, 111, 117, 110, 116, 115, 91, 100, 105, 114, 93, 32, - 61, 32, 40, 99, 111, 117, 110, 116, 115, 91, 100, 105, 114, 93, 32, 111, 114, 32, 48, 41, 32, 43, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 102, 103, 44, 32, 100, 105, 114, 115, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, - 99, 111, 110, 102, 105, 103, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 111, 117, 110, 116, 115, 91, 100, 105, 114, 93, 32, 61, 61, 32, 49, 32, 116, 104, -101, 110, 10, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 32, 61, 32, 100, 105, 114, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, -105, 103, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 102, 103, 115, 32, 61, 32, 119, 107, 115, 46, 99, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 111, 114, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, -114, 109, 115, 32, 61, 32, 119, 107, 115, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 32, 111, 114, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, - 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 97, 105, 114, 105, 110, 103, 115, 32, 61, 32, 116, 97, - 98, 108, 101, 46, 102, 111, 108, 100, 40, 98, 117, 105, 108, 100, 99, 102, 103, 115, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 115, 41, 10, 102, -111, 114, 32, 95, 44, 32, 112, 97, 105, 114, 105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 97, 105, 114, 105, 110, 103, 115, - 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, 105, 103, - 40, 119, 107, 115, 44, 32, 110, 105, 108, 44, 32, 112, 97, 105, 114, 105, 110, 103, 91, 49, 93, 44, 32, 112, 97, 105, 114, 105, 110, 103, 91, 50, - 93, 41, 10, 105, 102, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, 117, 112, 112, 111, 114, 116, 115, 99, 111, 110, 102, 105, 103, 40, 112, 46, - 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 44, 32, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 115, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, -101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, - 98, 117, 98, 98, 108, 101, 70, 105, 101, 108, 100, 115, 40, 99, 116, 120, 44, 32, 99, 115, 101, 116, 44, 32, 99, 102, 103, 115, 41, 10, 108, 111, - 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 108, - 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 99, 102, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 99, 102, 103, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 91, 49, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 44, 32, 99, 102, 103, 91, 49, 93, 58, 108, 111, -119, 101, 114, 40, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 91, 50, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 112, 108, 97, 116, 102, 111, 114, 109, 115, 44, 32, 99, 102, 103, 91, 50, 93, 58, 108, 111, 119, 101, 114, 40, 41, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 101, 114, 109, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 100, 101, -101, 112, 99, 111, 112, 121, 40, 99, 116, 120, 46, 116, 101, 114, 109, 115, 41, 10, 116, 101, 114, 109, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, - 97, 116, 105, 111, 110, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 10, 116, 101, 114, 109, 115, 46, 112, 108, - 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 112, 108, 97, 116, 102, 111, 114, 109, 115, 10, 102, 111, 114, 32, 107, 101, 121, 32, 105, 110, 32, 112, - 97, 105, 114, 115, 40, 111, 118, 101, 110, 46, 98, 117, 98, 98, 108, 101, 100, 70, 105, 101, 108, 100, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, -108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 112, 46, 102, 105, 101, 108, 100, 46, 103, 101, 116, 40, 107, 101, 121, 41, 10, 105, 102, 32, 110, 111, -116, 32, 102, 105, 101, 108, 100, 32, 116, 104, 101, 110, 10, 99, 116, 120, 91, 107, 101, 121, 93, 32, 61, 32, 114, 97, 119, 103, 101, 116, 40, 99, -116, 120, 44, 32, 107, 101, 121, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, 99, 111, -110, 102, 105, 103, 115, 101, 116, 46, 102, 101, 116, 99, 104, 40, 99, 115, 101, 116, 44, 32, 102, 105, 101, 108, 100, 44, 32, 116, 101, 114, 109, 115, - 44, 32, 99, 116, 120, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 99, 116, 120, 91, 107, 101, 121, 93, 32, 61, 32, -118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, -118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, 105, 103, 76, 105, 115, 116, 40, 99, 116, 120, 44, 32, 99, 102, 103, 115, 41, 10, 102, 111, -114, 32, 105, 44, 32, 99, 102, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 115, 41, 32, 100, 111, 10, 99, 102, 103, 115, - 91, 105, 93, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 109, 97, 112, 99, 111, 110, 102, 105, 103, 40, 99, 116, 120, 44, 32, 99, -102, 103, 91, 49, 93, 44, 32, 99, 102, 103, 91, 50, 93, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 102, -103, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, - 32, 95, 44, 32, 112, 97, 105, 114, 105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 115, 41, 32, 100, 111, 10, 108, -111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 102, 103, 32, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 49, 93, 10, 108, 111, 99, 97, 108, - 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 112, 97, 105, 114, 105, 110, 103, 91, 50, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, - 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 98, 117, 105, 108, 100, 99, 102, 103, 115, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, - 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 98, 117, 105, 108, 100, 99, 102, 103, 115, 44, 32, 98, -117, 105, 108, 100, 99, 102, 103, 41, 10, 101, 110, 100, 10, 105, 102, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 97, 110, 100, 32, 110, 111, 116, - 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 112, 108, 97, 116, 102, 111, 114, 109, 115, 44, 32, 112, 108, 97, 116, 102, -111, 114, 109, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 108, 97, 116, 102, 111, 114, 109, 115, - 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, - 46, 102, 111, 108, 100, 40, 98, 117, 105, 108, 100, 99, 102, 103, 115, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 115, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 67, 111, 110, 102, 105, 103, 40, 119, 107, 115, 44, 32, 112, 114, -106, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 44, 32, 101, 120, 116, 114, 97, 70, 105, 108, 116, -101, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 115, 121, 115, 116, 101, 109, 32, 61, 32, 111, 115, 46, 116, 97, 114, 103, 101, 116, 40, 41, 10, -108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 110, 105, 108, 10, 108, 111, 99, 97, 108, 32, 116, -111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 46, 116, 111, 111, 108, -115, 101, 116, 10, 105, 102, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 115, 121, 115, 116, 101, 109, 32, 61, 32, 112, 46, - 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 112, 46, 102, 105, 101, 108, 100, 115, 46, 115, 121, 115, 116, 101, 109, 44, 32, -112, 108, 97, 116, 102, 111, 114, 109, 41, 32, 111, 114, 32, 115, 121, 115, 116, 101, 109, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, - 32, 61, 32, 112, 46, 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 112, 46, 102, 105, 101, 108, 100, 115, 46, 97, 114, 99, -104, 105, 116, 101, 99, 116, 117, 114, 101, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 32, 111, 114, 32, 97, 114, 99, 104, 105, 116, 101, 99, -116, 117, 114, 101, 10, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, -112, 46, 102, 105, 101, 108, 100, 115, 46, 116, 111, 111, 108, 115, 101, 116, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 32, 111, 114, 32, 116, -111, 111, 108, 115, 101, 116, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 123, 10, 119, 107, 115, - 32, 61, 32, 119, 107, 115, 44, 10, 115, 108, 110, 32, 61, 32, 119, 107, 115, 44, 10, 112, 114, 106, 32, 61, 32, 112, 114, 106, 44, 10, 125, 10, -108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 99, 111, 110, 116, 101, 120, 116, 46, 110, 101, 119, 40, 112, 114, 106, 32, 111, 114, 32, 119, -107, 115, 44, 32, 101, 110, 118, 105, 114, 111, 110, 41, 10, 99, 116, 120, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 114, 106, 10, 99, -116, 120, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 119, 107, 115, 10, 99, 116, 120, 46, 115, 111, 108, 117, 116, 105, 111, 110, 32, - 61, 32, 119, 107, 115, 10, 99, 116, 120, 46, 103, 108, 111, 98, 97, 108, 32, 61, 32, 119, 107, 115, 46, 103, 108, 111, 98, 97, 108, 10, 99, 116, -120, 46, 98, 117, 105, 108, 100, 99, 102, 103, 32, 61, 32, 98, 117, 105, 108, 100, 99, 102, 103, 10, 99, 116, 120, 46, 112, 108, 97, 116, 102, 111, -114, 109, 32, 61, 32, 112, 108, 97, 116, 102, 111, 114, 109, 10, 99, 116, 120, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 95, 65, 67, 84, 73, - 79, 78, 10, 101, 110, 118, 105, 114, 111, 110, 46, 99, 102, 103, 32, 61, 32, 99, 116, 120, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 112, -121, 70, 105, 108, 116, 101, 114, 115, 40, 99, 116, 120, 44, 32, 119, 107, 115, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, -108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 34, 44, 32, 98, 117, 105, 108, -100, 99, 102, 103, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 112, 108, - 97, 116, 102, 111, 114, 109, 115, 34, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 105, 102, 32, 112, 114, 106, 32, 116, 104, 101, 110, 10, - 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 108, 97, 110, 103, 117, 97, 103, 101, - 34, 44, 32, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 10, 101, 110, 100, 10, 99, 116, 120, 46, 115, 121, 115, 116, 101, 109, 32, - 61, 32, 99, 116, 120, 46, 115, 121, 115, 116, 101, 109, 32, 111, 114, 32, 115, 121, 115, 116, 101, 109, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, -100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 111, 115, 46, 103, 101, 116, 83, 121, -115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 116, 120, 46, 115, 121, 115, 116, 101, 109, 41, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, -100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 104, 111, 115, 116, 34, 44, 32, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, -109, 84, 97, 103, 115, 40, 111, 115, 46, 104, 111, 115, 116, 40, 41, 41, 41, 10, 99, 116, 120, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, -114, 101, 32, 61, 32, 99, 116, 120, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 111, 114, 32, 97, 114, 99, 104, 105, 116, 101, - 99, 116, 117, 114, 101, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 97, 114, - 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 34, 44, 32, 99, 116, 120, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 41, 10, 99, -116, 120, 46, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 99, 99, 32, 111, 114, 32, 99, 116, 120, 46, -116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 116, 111, 111, 108, 115, 101, 116, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, -108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 116, 111, 111, 108, 115, 101, 116, 34, 44, 32, 99, 116, 120, 46, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 107, 105, 110, 100, 34, 44, - 32, 99, 116, 120, 46, 107, 105, 110, 100, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, - 44, 32, 34, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 34, 44, 32, 99, 116, 120, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, -116, 121, 112, 101, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 34, 116, 97, -103, 115, 34, 44, 32, 99, 116, 120, 46, 116, 97, 103, 115, 41, 10, 105, 102, 32, 101, 120, 116, 114, 97, 70, 105, 108, 116, 101, 114, 115, 32, 116, -104, 101, 110, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 101, 120, 116, 114, 97, 70, 105, 108, 116, 101, -114, 115, 41, 32, 100, 111, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 100, 100, 70, 105, 108, 116, 101, 114, 40, 99, 116, 120, 44, 32, 107, 44, - 32, 118, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 99, 111, 110, 116, 101, 120, 116, 46, 99, 111, 109, 112, 105, 108, 101, 40, 99, 116, 120, 41, - 10, 99, 116, 120, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 32, 99, 116, 120, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 111, 114, 32, -112, 114, 106, 32, 97, 110, 100, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 10, 99, 111, 110, 116, 101, 120, 116, 46, 98, 97, 115, -101, 100, 105, 114, 40, 99, 116, 120, 44, 32, 99, 116, 120, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 111, 118, 101, 110, 46, 102, 105, 110, -105, 115, 104, 67, 111, 110, 102, 105, 103, 40, 99, 116, 120, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 116, 120, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 98, 97, 107, 101, 70, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, - 32, 102, 105, 108, 101, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, - 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, -111, 110, 32, 97, 100, 100, 70, 105, 108, 101, 40, 102, 110, 97, 109, 101, 44, 32, 105, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, - 61, 32, 102, 105, 108, 101, 115, 91, 102, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, -102, 99, 102, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 110, 101, 119, 40, 102, 110, 97, 109, 101, 44, 32, 112, -114, 106, 41, 10, 102, 99, 102, 103, 46, 111, 114, 100, 101, 114, 32, 61, 32, 105, 10, 102, 105, 108, 101, 115, 91, 102, 110, 97, 109, 101, 93, 32, - 61, 32, 102, 99, 102, 103, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, 108, 101, 115, 44, 32, 102, 99, 102, 103, 41, - 10, 101, 110, 100, 10, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 97, 100, 100, 99, 111, 110, 102, 105, 103, 40, 102, 99, 102, 103, - 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 99, 102, 103, 46, 102, 105, -108, 101, 115, 44, 32, 97, 100, 100, 70, 105, 108, 101, 41, 10, 105, 102, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 32, 62, 32, 48, 32, - 97, 110, 100, 32, 40, 95, 65, 67, 84, 73, 79, 78, 32, 60, 32, 34, 118, 115, 50, 48, 49, 55, 34, 32, 111, 114, 32, 112, 46, 112, 114, 111, -106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 41, 41, 32, 116, 104, 101, 110, 10, 97, 100, 100, 70, 105, 108, 101, 40, 34, 112, - 97, 99, 107, 97, 103, 101, 115, 46, 99, 111, 110, 102, 105, 103, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, -111, 114, 116, 40, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 98, 41, 10, 114, 101, 116, 117, 114, 110, 32, - 97, 46, 118, 112, 97, 116, 104, 32, 60, 32, 98, 46, 118, 112, 97, 116, 104, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, -108, 101, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 117, 110, 105, 113, 117, 101, 83, 101, 113, 117, -101, 110, 99, 101, 40, 102, 44, 32, 99, 102, 103, 44, 32, 115, 101, 113, 44, 32, 98, 97, 115, 101, 115, 41, 10, 119, 104, 105, 108, 101, 32, 116, -114, 117, 101, 32, 100, 111, 10, 102, 46, 115, 101, 113, 117, 101, 110, 99, 101, 32, 61, 32, 115, 101, 113, 91, 99, 102, 103, 93, 32, 111, 114, 32, - 48, 10, 115, 101, 113, 91, 99, 102, 103, 93, 32, 61, 32, 102, 46, 115, 101, 113, 117, 101, 110, 99, 101, 32, 43, 32, 49, 10, 105, 102, 32, 102, - 46, 115, 101, 113, 117, 101, 110, 99, 101, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 108, 111, 119, 101, 114, 111, 98, 106, 32, 61, 32, 102, 46, 111, 98, 106, 110, 97, 109, 101, 58, 108, 111, 119, 101, 114, 40, 41, - 10, 105, 102, 32, 110, 111, 116, 32, 98, 97, 115, 101, 115, 91, 108, 111, 119, 101, 114, 111, 98, 106, 93, 32, 116, 104, 101, 110, 10, 98, 97, 115, -101, 115, 91, 108, 111, 119, 101, 114, 111, 98, 106, 93, 32, 61, 32, 123, 125, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 98, 97, 115, -101, 115, 91, 108, 111, 119, 101, 114, 111, 98, 106, 93, 91, 99, 102, 103, 93, 32, 116, 104, 101, 110, 10, 98, 97, 115, 101, 115, 91, 108, 111, 119, -101, 114, 111, 98, 106, 93, 91, 99, 102, 103, 93, 32, 61, 32, 49, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 97, 115, 115, 105, 103, 110, 79, 98, 106, 101, 99, 116, 83, 101, 113, 117, -101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 115, 32, 61, 32, 123, 125, 10, 116, 97, 98, 108, -101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 102, 105, 108, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 116, 104, 46, 105, 115, 110, 97, 116, 105, 118, 101, 102, 105, 108, 101, 40, -102, 105, 108, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 108, 111, 119, 101, 114, 98, 97, 115, 101, 32, 61, 32, 102, 105, 108, 101, 46, 98, 97, 115, 101, 110, 97, 109, 101, 58, 108, 111, -119, 101, 114, 40, 41, 10, 105, 102, 32, 110, 111, 116, 32, 98, 97, 115, 101, 115, 91, 108, 111, 119, 101, 114, 98, 97, 115, 101, 93, 32, 116, 104, -101, 110, 10, 98, 97, 115, 101, 115, 91, 108, 111, 119, 101, 114, 98, 97, 115, 101, 93, 32, 61, 32, 123, 125, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 115, 101, 113, 117, 101, 110, 99, 101, 115, 32, 61, 32, 98, 97, 115, 101, 115, 91, 108, 111, 119, 101, 114, 98, 97, 115, 101, 93, 10, -102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, -112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, -103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 102, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 99, 102, 103, 32, 126, - 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 110, 111, 116, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, - 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 111, 118, 101, 110, 46, 117, 110, 105, 113, 117, 101, 83, 101, 113, 117, 101, 110, - 99, 101, 40, 102, 99, 102, 103, 44, 32, 99, 102, 103, 44, 32, 115, 101, 113, 117, 101, 110, 99, 101, 115, 44, 32, 98, 97, 115, 101, 115, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 111, 118, 101, 110, 46, 117, 110, 105, 113, 117, 101, 83, 101, 113, 117, 101, 110, 99, 101, 40, 102, 105, 108, 101, - 44, 32, 112, 114, 106, 44, 32, 115, 101, 113, 117, 101, 110, 99, 101, 115, 44, 32, 98, 97, 115, 101, 115, 41, 10, 101, 110, 100, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 118, 101, 110, 46, 102, 105, 110, 105, 115, 104, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, - 41, 10, 99, 102, 103, 46, 108, 111, 110, 103, 110, 97, 109, 101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 123, 32, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 125, 44, 32, 34, 124, - 34, 41, 10, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, -123, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 125, 44, 32, - 34, 32, 34, 41, 10, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 61, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, -109, 101, 58, 103, 115, 117, 98, 40, 34, 32, 34, 44, 32, 34, 95, 34, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 99, 102, 103, 46, 110, 97, -109, 101, 32, 61, 32, 99, 102, 103, 46, 108, 111, 110, 103, 110, 97, 109, 101, 10, 105, 102, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 32, 97, 110, 100, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 116, 104, 101, 110, 10, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, -101, 116, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 105, 110, 102, 111, 40, 99, 102, 103, 41, - 10, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 114, 101, 108, 112, 97, 116, 104, 32, 61, 32, 112, 46, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, -103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 41, 10, 99, 102, 103, 46, 108, 105, 110, 107, 116, - 97, 114, 103, 101, 116, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 105, 110, 102, 111, 40, 99, 102, 103, - 41, 10, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 114, 101, 108, 112, 97, 116, 104, 32, 61, 32, 112, 46, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, -103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// src/base/validation.lua -static const unsigned char builtin_script_33[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 97, 108, 105, 100, 97, 116, 105, 111, 110, 32, 61, - 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 97, 108, 105, 100, 97, 116, 105, 111, 110, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 103, 108, 98, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 115, 101, 108, 102, 41, 10, 112, 46, 99, - 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 44, 32, 115, 101, 108, 102, - 41, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 118, 97, 108, 105, 100, 97, 116, 101, 67, 104, 105, 108, 100, 114, 101, 110, 40, 115, -101, 108, 102, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 72, 97, 115, 67, 111, 110, 102, 105, 103, 115, 44, 10, 109, 46, 117, 110, 105, 113, 117, 101, 80, 114, 111, 106, 101, 99, 116, 73, 100, 115, - 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 118, 97, 108, -105, 100, 97, 116, 101, 40, 115, 101, 108, 102, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 115, 101, 108, 102, 41, 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, -118, 97, 108, 105, 100, 97, 116, 101, 67, 104, 105, 108, 100, 114, 101, 110, 40, 115, 101, 108, 102, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, -116, 117, 114, 110, 32, 123, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 72, 97, 115, 76, 97, 110, 103, 117, 97, 103, 101, 44, 10, 109, 46, 97, - 99, 116, 105, 111, 110, 83, 117, 112, 112, 111, 114, 116, 115, 76, 97, 110, 103, 117, 97, 103, 101, 44, 10, 109, 46, 97, 99, 116, 105, 111, 110, 83, -117, 112, 112, 111, 114, 116, 115, 75, 105, 110, 100, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 82, 117, 108, 101, 115, 69, 120, 105, 115, 116, - 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 86, 97, 108, 117, 101, 115, 73, 110, 83, 99, 111, 112, 101, 44, 10, 125, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 115, 101, 108, 102, - 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 115, 101, 108, 102, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, -104, 99, 111, 110, 102, 105, 103, 40, 115, 101, 108, 102, 41, 32, 100, 111, 10, 112, 46, 99, 111, 110, 102, 105, 103, 46, 118, 97, 108, 105, 100, 97, -116, 101, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, -103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 99, 111, 110, -102, 105, 103, 72, 97, 115, 75, 105, 110, 100, 44, 10, 109, 46, 99, 111, 110, 102, 105, 103, 83, 117, 112, 112, 111, 114, 116, 115, 75, 105, 110, 100, - 44, 10, 109, 46, 99, 111, 110, 102, 105, 103, 86, 97, 108, 117, 101, 115, 73, 110, 83, 99, 111, 112, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 115, 101, 108, 102, 41, 10, -112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 44, 32, 115, -101, 108, 102, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 114, 117, 108, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 112, 46, 114, 117, 108, 101, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 115, 101, 108, 102, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, -114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 44, 32, 115, 101, 108, 102, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 118, 97, 108, 105, 100, 97, 116, 101, 83, 99, 111, 112, 101, 115, 40, -115, 101, 108, 102, 44, 32, 99, 111, 110, 116, 97, 105, 110, 101, 114, 44, 32, 101, 120, 112, 101, 99, 116, 101, 100, 41, 10, 102, 111, 114, 32, 102, - 32, 105, 110, 32, 112, 46, 102, 105, 101, 108, 100, 46, 101, 97, 99, 104, 40, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 115, 99, 111, 112, -101, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 102, 46, 115, 99, 111, 112, 101, 115, 32, 100, 111, 10, 105, 102, 32, 102, 46, 115, - 99, 111, 112, 101, 115, 91, 105, 93, 32, 61, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 32, 111, 114, 32, 112, 46, 99, 111, 110, 116, 97, 105, -110, 101, 114, 46, 99, 108, 97, 115, 115, 73, 115, 65, 40, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 99, 108, 97, 115, 115, 44, 32, 102, 46, -115, 99, 111, 112, 101, 115, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 115, 99, 111, 112, 101, 32, 61, 32, 102, 46, 115, 99, 111, 112, 101, 115, - 91, 105, 93, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 111, 107, 97, 121, 32, 61, 32, 40, -110, 111, 116, 32, 115, 99, 111, 112, 101, 32, 111, 114, 32, 115, 99, 111, 112, 101, 32, 61, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 41, 10, -111, 107, 97, 121, 32, 61, 32, 111, 107, 97, 121, 32, 111, 114, 32, 115, 99, 111, 112, 101, 32, 61, 61, 32, 101, 120, 112, 101, 99, 116, 101, 100, - 10, 111, 107, 97, 121, 32, 61, 32, 111, 107, 97, 121, 32, 111, 114, 32, 112, 46, 111, 118, 101, 110, 46, 98, 117, 98, 98, 108, 101, 100, 70, 105, -101, 108, 100, 115, 91, 102, 46, 110, 97, 109, 101, 93, 10, 111, 107, 97, 121, 32, 61, 32, 111, 107, 97, 121, 32, 111, 114, 32, 112, 46, 102, 105, -101, 108, 100, 46, 99, 111, 109, 112, 97, 114, 101, 40, 102, 44, 32, 115, 101, 108, 102, 91, 115, 99, 111, 112, 101, 93, 91, 102, 46, 110, 97, 109, -101, 93, 44, 32, 115, 101, 108, 102, 91, 102, 46, 110, 97, 109, 101, 93, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 97, 121, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 34, 118, 97, 108, 105, 100, 97, 116, 101, 46, 34, 32, 46, 46, 32, 102, 46, -110, 97, 109, 101, 10, 112, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 107, 101, 121, 44, 32, 34, 39, 37, 115, 39, 32, 111, 110, 32, 37, 115, - 32, 39, 37, 115, 39, 32, 100, 105, 102, 102, 101, 114, 115, 32, 102, 114, 111, 109, 32, 37, 115, 32, 39, 37, 115, 39, 59, 32, 109, 97, 121, 32, - 98, 101, 32, 115, 101, 116, 32, 111, 117, 116, 32, 111, 102, 32, 115, 99, 111, 112, 101, 34, 44, 32, 102, 46, 110, 97, 109, 101, 44, 32, 101, 120, -112, 101, 99, 116, 101, 100, 44, 32, 115, 101, 108, 102, 46, 110, 97, 109, 101, 44, 32, 115, 99, 111, 112, 101, 44, 32, 115, 101, 108, 102, 91, 115, - 99, 111, 112, 101, 93, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 97, 99, 116, 105, 111, 110, 83, 117, 112, 112, 111, 114, 116, 115, 75, 105, 110, 100, 40, 112, 114, 106, 41, 10, 105, 102, 32, 110, 111, -116, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, 117, 112, 112, 111, 114, 116, 115, 40, 112, 114, 106, 46, 107, 105, 110, 100, 41, 32, 116, 104, -101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 107, 105, 110, 100, 32, 39, 37, 115, 39, - 32, 117, 115, 101, 100, 32, 102, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 32, 39, 37, 115, 39, 34, 44, 32, 112, 114, 106, 46, 107, 105, 110, -100, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, - 97, 99, 116, 105, 111, 110, 83, 117, 112, 112, 111, 114, 116, 115, 76, 97, 110, 103, 117, 97, 103, 101, 40, 112, 114, 106, 41, 10, 105, 102, 32, 110, -111, 116, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, 117, 112, 112, 111, 114, 116, 115, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, -101, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 108, 97, 110, 103, -117, 97, 103, 101, 32, 39, 37, 115, 39, 32, 117, 115, 101, 100, 32, 102, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 32, 39, 37, 115, 39, 34, - 44, 32, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 72, 97, 115, 75, 105, 110, 100, 40, 99, 102, 103, 41, 10, -105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 80, 114, -111, 106, 101, 99, 116, 32, 39, 37, 115, 39, 32, 110, 101, 101, 100, 115, 32, 97, 32, 107, 105, 110, 100, 32, 105, 110, 32, 99, 111, 110, 102, 105, -103, 117, 114, 97, 116, 105, 111, 110, 32, 39, 37, 115, 39, 34, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, - 44, 32, 99, 102, 103, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, -111, 110, 102, 105, 103, 83, 117, 112, 112, 111, 114, 116, 115, 75, 105, 110, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 112, 46, - 97, 99, 116, 105, 111, 110, 46, 115, 117, 112, 112, 111, 114, 116, 115, 40, 99, 102, 103, 46, 107, 105, 110, 100, 41, 32, 116, 104, 101, 110, 10, 112, - 46, 119, 97, 114, 110, 40, 34, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 107, 105, 110, 100, 32, 39, 37, 115, 39, 32, 117, 115, 101, -100, 32, 105, 110, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 39, 37, 115, 39, 34, 44, 32, 99, 102, 103, 46, 107, 105, -110, 100, 44, 32, 99, 102, 103, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, - 61, 32, 112, 46, 77, 65, 75, 69, 70, 73, 76, 69, 32, 111, 114, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 78, 79, - 78, 69, 41, 32, 97, 110, 100, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 41, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 80, 114, 111, 106, 101, 99, 116, 32, 39, 37, -115, 39, 32, 117, 115, 101, 115, 32, 39, 37, 115, 39, 32, 107, 105, 110, 100, 32, 105, 110, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 32, 39, 37, 115, 39, 59, 32, 108, 97, 110, 103, 117, 97, 103, 101, 32, 109, 117, 115, 116, 32, 110, 111, 116, 32, 98, 101, 32, 67, 35, - 34, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 44, 32, 99, 102, 103, 46, 107, 105, 110, 100, 44, 32, 99, -102, 103, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, -105, 103, 86, 97, 108, 117, 101, 115, 73, 110, 83, 99, 111, 112, 101, 40, 99, 102, 103, 41, 10, 112, 46, 99, 111, 110, 102, 105, 103, 46, 118, 97, -108, 105, 100, 97, 116, 101, 83, 99, 111, 112, 101, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 34, - 99, 111, 110, 102, 105, 103, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 72, - 97, 115, 76, 97, 110, 103, 117, 97, 103, 101, 40, 112, 114, 106, 41, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 106, 46, 108, 97, 110, 103, 117, - 97, 103, 101, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 112, 114, 111, 106, 101, 99, 116, 32, 39, 37, 115, 39, 32, 100, -111, 101, 115, 32, 110, 111, 116, 32, 104, 97, 118, 101, 32, 97, 32, 108, 97, 110, 103, 117, 97, 103, 101, 34, 44, 32, 112, 114, 106, 46, 110, 97, -109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 82, 117, -108, 101, 115, 69, 120, 105, 115, 116, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 112, 114, 106, 46, 114, 117, -108, 101, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 112, 114, 106, 46, 114, 117, 108, 101, 115, 91, 105, 93, - 10, 105, 102, 32, 110, 111, 116, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 32, 116, -104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 112, 114, 111, 106, 101, 99, 116, 32, 39, 37, 115, 39, 32, 117, 115, 101, 115, 32, 109, -105, 115, 115, 105, 110, 103, 32, 114, 117, 108, 101, 32, 39, 37, 115, 39, 34, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 44, 32, 114, 117, 108, -101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, -116, 86, 97, 108, 117, 101, 115, 73, 110, 83, 99, 111, 112, 101, 40, 112, 114, 106, 41, 10, 112, 46, 99, 111, 110, 102, 105, 103, 46, 118, 97, 108, -105, 100, 97, 116, 101, 83, 99, 111, 112, 101, 115, 40, 112, 114, 106, 44, 32, 112, 114, 106, 44, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 110, 105, 113, 117, 101, 80, 114, 111, 106, 101, 99, 116, 73, 100, 115, - 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 117, 117, 105, 100, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, -110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, -111, 10, 105, 102, 32, 117, 117, 105, 100, 115, 91, 112, 114, 106, 46, 117, 117, 105, 100, 93, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, -114, 40, 34, 112, 114, 111, 106, 101, 99, 116, 115, 32, 39, 37, 115, 39, 32, 97, 110, 100, 32, 39, 37, 115, 39, 32, 104, 97, 118, 101, 32, 116, -104, 101, 32, 115, 97, 109, 101, 32, 85, 85, 73, 68, 34, 44, 32, 117, 117, 105, 100, 115, 91, 112, 114, 106, 46, 117, 117, 105, 100, 93, 44, 32, -112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 117, 117, 105, 100, 115, 91, 112, 114, 106, 46, 117, 117, 105, 100, 93, 32, 61, 32, -112, 114, 106, 46, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 72, 97, 115, 67, 111, 110, 102, 105, 103, 115, 40, 119, 107, 115, 41, 10, 105, 102, 32, 110, 111, 116, 32, 119, 107, 115, 46, - 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 111, 114, 32, 35, 119, 107, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 115, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 32, 39, 37, 115, 39, 32, 100, 111, 101, 115, 32, 110, 111, 116, 32, 99, 111, 110, 116, 97, 105, 110, 32, 97, 110, 121, 32, 99, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 34, 44, 32, 119, 107, 115, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -}; - -// src/base/premake.lua -static const unsigned char builtin_script_34[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 95, 99, 97, 112, 116, 117, 114, 101, -100, 10, 108, 111, 99, 97, 108, 32, 95, 101, 115, 99, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 41, 32, 114, 101, 116, 117, 114, -110, 32, 118, 32, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 95, 101, 111, 108, 32, 61, 32, 34, 92, 110, 34, 10, 108, 111, 99, 97, 108, 32, - 95, 105, 110, 100, 101, 110, 116, 83, 116, 114, 105, 110, 103, 32, 61, 32, 34, 92, 116, 34, 10, 108, 111, 99, 97, 108, 32, 95, 105, 110, 100, 101, -110, 116, 76, 101, 118, 101, 108, 32, 61, 32, 48, 10, 103, 108, 111, 98, 97, 108, 40, 34, 114, 111, 111, 116, 34, 41, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 110, 41, 10, 108, 111, 99, 97, 108, 32, 111, 108, -100, 32, 61, 32, 95, 99, 97, 112, 116, 117, 114, 101, 100, 10, 95, 99, 97, 112, 116, 117, 114, 101, 100, 32, 61, 32, 98, 117, 102, 102, 101, 114, -101, 100, 46, 110, 101, 119, 40, 41, 10, 102, 110, 40, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 112, 116, 117, 114, 101, 100, 32, 61, 32, 112, - 46, 99, 97, 112, 116, 117, 114, 101, 100, 40, 41, 10, 98, 117, 102, 102, 101, 114, 101, 100, 46, 99, 108, 111, 115, 101, 40, 95, 99, 97, 112, 116, -117, 114, 101, 100, 41, 10, 95, 99, 97, 112, 116, 117, 114, 101, 100, 32, 61, 32, 111, 108, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 97, 112, -116, 117, 114, 101, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 99, 97, 112, 116, 117, -114, 101, 100, 40, 41, 10, 105, 102, 32, 95, 99, 97, 112, 116, 117, 114, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 98, -117, 102, 102, 101, 114, 101, 100, 46, 116, 111, 115, 116, 114, 105, 110, 103, 40, 95, 99, 97, 112, 116, 117, 114, 101, 100, 41, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 34, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, - 97, 107, 101, 46, 101, 111, 108, 40, 115, 41, 10, 95, 101, 111, 108, 32, 61, 32, 115, 32, 111, 114, 32, 95, 101, 111, 108, 10, 114, 101, 116, 117, -114, 110, 32, 95, 101, 111, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 101, 115, 99, - 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, - 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 110, - 32, 61, 32, 35, 118, 97, 108, 117, 101, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 110, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 112, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, 91, 105, 93, 41, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 95, 101, 115, - 99, 40, 118, 97, 108, 117, 101, 32, 111, 114, 32, 34, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, - 97, 107, 101, 46, 101, 115, 99, 97, 112, 101, 114, 40, 102, 117, 110, 99, 41, 10, 95, 101, 115, 99, 32, 61, 32, 102, 117, 110, 99, 10, 105, 102, - 32, 110, 111, 116, 32, 95, 101, 115, 99, 32, 116, 104, 101, 110, 10, 95, 101, 115, 99, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, -118, 97, 108, 117, 101, 41, 32, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 32, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 111, 98, 106, 44, 32, 101, -120, 116, 44, 32, 99, 97, 108, 108, 98, 97, 99, 107, 41, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 112, 117, 116, 32, 61, 32, 112, 46, 99, - 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, - 61, 32, 48, 10, 99, 97, 108, 108, 98, 97, 99, 107, 40, 111, 98, 106, 41, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 61, - 32, 48, 10, 101, 110, 100, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 32, 61, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 111, 98, -106, 44, 32, 101, 120, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, - 99, 116, 111, 114, 121, 40, 102, 110, 41, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 111, 115, 46, 109, 107, 100, -105, 114, 40, 100, 105, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, - 44, 32, 48, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 44, 32, 101, 114, 114, 32, 61, 32, 111, 115, 46, 119, 114, 105, 116, 101, -102, 105, 108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, 40, 111, 117, 116, 112, 117, 116, 44, 32, 102, 110, 41, 59, 10, 105, 102, 32, - 40, 102, 32, 61, 61, 32, 48, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 32, 45, 45, 32, 102, 105, -108, 101, 32, 110, 111, 116, 32, 109, 111, 100, 105, 102, 105, 101, 100, 10, 101, 108, 115, 101, 105, 102, 32, 40, 102, 32, 60, 32, 48, 41, 32, 116, -104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, 48, 41, 10, 101, 108, 115, 101, 105, 102, 32, 40, 102, 32, 62, 32, 48, 41, - 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 102, 40, 34, 71, 101, 110, 101, 114, 97, 116, 101, 100, 32, 37, 115, 46, 46, 46, 34, 44, 32, -112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 44, 32, 102, 110, - 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 32, 45, 45, 32, 102, 105, 108, 101, 32, 109, 111, 100, 105, 102, 105, 101, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 116, 111, 117, 99, 104, 40, 111, - 98, 106, 44, 32, 101, 120, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 108, 101, -110, 97, 109, 101, 40, 111, 98, 106, 44, 32, 101, 120, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, -103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 110, 41, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, - 32, 111, 115, 46, 109, 107, 100, 105, 114, 40, 100, 105, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 101, 114, -114, 111, 114, 40, 101, 114, 114, 44, 32, 48, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 44, 32, 101, 114, 114, 32, 61, 32, 111, -115, 46, 116, 111, 117, 99, 104, 102, 105, 108, 101, 40, 102, 110, 41, 59, 10, 105, 102, 32, 40, 102, 32, 61, 61, 32, 48, 41, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 32, 45, 45, 32, 102, 105, 108, 101, 32, 109, 97, 114, 107, 101, 100, 32, 97, 115, - 32, 109, 111, 100, 105, 102, 105, 101, 100, 10, 101, 108, 115, 101, 105, 102, 32, 40, 102, 32, 60, 32, 48, 41, 32, 116, 104, 101, 110, 10, 101, 114, -114, 111, 114, 40, 101, 114, 114, 44, 32, 48, 41, 10, 101, 108, 115, 101, 105, 102, 32, 40, 102, 32, 62, 32, 48, 41, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 32, 45, 45, 32, 102, 105, 108, 101, 32, 99, 114, 101, 97, 116, 101, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 111, 98, -106, 44, 32, 101, 120, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, 101, 32, 61, 32, 111, 98, 106, 46, 108, 111, 99, 97, 116, 105, -111, 110, 32, 111, 114, 32, 111, 98, 106, 46, 98, 97, 115, 101, 100, 105, 114, 10, 105, 102, 32, 101, 120, 116, 32, 97, 110, 100, 32, 110, 111, 116, - 32, 101, 120, 116, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 46, 34, 41, 32, 116, 104, 101, 110, 10, 102, 110, 97, 109, 101, 32, - 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 102, 110, 97, 109, 101, 44, 32, 101, 120, 116, 41, 10, 101, 108, 115, 101, 10, 102, 110, 97, -109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 102, 110, 97, 109, 101, 44, 32, 111, 98, 106, 46, 102, 105, 108, 101, 110, 97, -109, 101, 41, 10, 105, 102, 32, 101, 120, 116, 32, 116, 104, 101, 110, 10, 102, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, 109, 101, 32, 46, 46, - 32, 101, 120, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, -108, 117, 116, 101, 40, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, - 46, 105, 110, 100, 101, 110, 116, 40, 115, 44, 32, 105, 41, 10, 95, 105, 110, 100, 101, 110, 116, 83, 116, 114, 105, 110, 103, 32, 61, 32, 115, 32, -111, 114, 32, 34, 92, 116, 34, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 61, 32, 105, 32, 111, 114, 32, 48, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 111, 117, 116, 40, 115, 41, 10, 105, 102, 32, 110, 111, 116, - 32, 95, 99, 97, 112, 116, 117, 114, 101, 100, 32, 116, 104, 101, 110, 10, 105, 111, 46, 119, 114, 105, 116, 101, 40, 115, 41, 10, 101, 108, 115, 101, - 10, 98, 117, 102, 102, 101, 114, 101, 100, 46, 119, 114, 105, 116, 101, 40, 95, 99, 97, 112, 116, 117, 114, 101, 100, 44, 32, 115, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 111, 117, 116, 108, 110, 40, 115, 41, 10, -112, 46, 111, 117, 116, 40, 115, 41, 10, 112, 46, 111, 117, 116, 40, 95, 101, 111, 108, 32, 111, 114, 32, 34, 92, 110, 34, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 112, 111, 112, 40, 105, 44, 32, 46, 46, 46, 41, 10, 105, 102, - 32, 105, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 116, 121, 112, 101, 40, 105, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, - 32, 116, 104, 101, 110, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 61, 32, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, -108, 32, 45, 32, 40, 105, 32, 111, 114, 32, 49, 41, 10, 101, 108, 115, 101, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 61, - 32, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 45, 32, 49, 10, 112, 46, 119, 40, 105, 44, 32, 46, 46, 46, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 112, 117, 115, 104, 40, 105, 44, 32, 46, - 46, 46, 41, 10, 105, 102, 32, 105, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 116, 121, 112, 101, 40, 105, 41, 32, 61, 61, 32, 34, 110, -117, 109, 98, 101, 114, 34, 32, 116, 104, 101, 110, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 61, 32, 95, 105, 110, 100, 101, -110, 116, 76, 101, 118, 101, 108, 32, 43, 32, 40, 105, 32, 111, 114, 32, 49, 41, 10, 101, 108, 115, 101, 10, 112, 46, 119, 40, 105, 44, 32, 46, - 46, 46, 41, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, 61, 32, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 32, - 43, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 113, 117, 111, -116, 101, 100, 40, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 113, 32, 61, 32, 118, 97, 108, 117, 101, 58, 102, 105, 110, 100, 40, - 34, 32, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 113, 32, 116, 104, 101, 110, 10, 113, 32, 61, 32, -118, 97, 108, 117, 101, 58, 102, 105, 110, 100, 40, 34, 36, 37, 40, 46, 45, 37, 41, 34, 44, 32, 49, 41, 10, 101, 110, 100, 10, 105, 102, 32, -113, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 39, 34, 39, 32, 46, 46, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 39, - 34, 39, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 112, 46, 117, 116, 102, 56, 40, 41, 10, 112, 46, 111, 117, 116, 40, 39, 92, 50, 51, 57, 92, 49, 56, 55, 92, 49, 57, 49, 39, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 119, 40, 46, 46, 46, 41, 10, 105, 102, 32, 115, -101, 108, 101, 99, 116, 40, 34, 35, 34, 44, 32, 46, 46, 46, 41, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, - 40, 115, 116, 114, 105, 110, 103, 46, 114, 101, 112, 40, 95, 105, 110, 100, 101, 110, 116, 83, 116, 114, 105, 110, 103, 32, 111, 114, 32, 34, 92, 116, - 34, 44, 32, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, 108, 41, 32, 46, 46, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, -116, 40, 46, 46, 46, 41, 41, 10, 101, 108, 115, 101, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 39, 41, 59, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 120, 40, 109, 115, 103, 44, 32, 46, 46, 46, 41, 10, 108, -111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, 46, 46, 125, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 97, 114, 103, - 32, 100, 111, 10, 97, 114, 103, 91, 105, 93, 32, 61, 32, 112, 46, 101, 115, 99, 40, 97, 114, 103, 91, 105, 93, 41, 10, 101, 110, 100, 10, 112, - 46, 119, 40, 109, 115, 103, 44, 32, 116, 97, 98, 108, 101, 46, 117, 110, 112, 97, 99, 107, 40, 97, 114, 103, 41, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 120, 109, 108, 85, 116, 102, 56, 40, 117, 112, 112, 101, 114, 41, 10, 108, -111, 99, 97, 108, 32, 101, 110, 99, 111, 100, 105, 110, 103, 32, 61, 32, 105, 105, 102, 40, 117, 112, 112, 101, 114, 44, 32, 34, 85, 84, 70, 45, - 56, 34, 44, 32, 34, 117, 116, 102, 45, 56, 34, 41, 10, 112, 46, 119, 40, 39, 60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, - 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 37, 115, 34, 63, 62, 39, 44, 32, 101, 110, 99, 111, 100, 105, 110, 103, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 112, 40, 105, 44, 32, 46, 46, 46, 41, 10, 105, 102, 32, 116, 121, 112, -101, 40, 105, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 32, 116, 104, 101, 110, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, -101, 108, 32, 61, 32, 105, 10, 112, 46, 119, 40, 46, 46, 46, 41, 10, 101, 108, 115, 101, 10, 95, 105, 110, 100, 101, 110, 116, 76, 101, 118, 101, -108, 32, 61, 32, 48, 10, 112, 46, 119, 40, 105, 44, 32, 46, 46, 46, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 95, 120, 40, 105, 44, 32, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, 46, 46, 125, 10, -102, 111, 114, 32, 105, 32, 61, 32, 50, 44, 32, 35, 97, 114, 103, 32, 100, 111, 10, 97, 114, 103, 91, 105, 93, 32, 61, 32, 112, 46, 101, 115, - 99, 40, 97, 114, 103, 91, 105, 93, 41, 10, 101, 110, 100, 10, 95, 112, 40, 105, 44, 32, 116, 97, 98, 108, 101, 46, 117, 110, 112, 97, 99, 107, - 40, 97, 114, 103, 41, 41, 10, 101, 110, 100, 10, }; - -// src/base/help.lua -static const unsigned char builtin_script_35[] = { -102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 115, 104, 111, 119, 104, 101, 108, 112, 40, 41, 10, 112, 114, 105, 110, -116, 102, 40, 34, 80, 114, 101, 109, 97, 107, 101, 32, 37, 115, 44, 32, 97, 32, 98, 117, 105, 108, 100, 32, 115, 99, 114, 105, 112, 116, 32, 103, -101, 110, 101, 114, 97, 116, 111, 114, 34, 44, 32, 95, 80, 82, 69, 77, 65, 75, 69, 95, 86, 69, 82, 83, 73, 79, 78, 41, 10, 112, 114, 105, -110, 116, 102, 40, 95, 80, 82, 69, 77, 65, 75, 69, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 41, 10, 112, 114, 105, 110, 116, 102, 40, 34, - 37, 115, 32, 37, 115, 34, 44, 32, 95, 86, 69, 82, 83, 73, 79, 78, 44, 32, 95, 67, 79, 80, 89, 82, 73, 71, 72, 84, 41, 10, 112, 114, -105, 110, 116, 102, 40, 34, 34, 41, 10, 112, 114, 105, 110, 116, 102, 40, 34, 85, 115, 97, 103, 101, 58, 32, 112, 114, 101, 109, 97, 107, 101, 53, - 32, 91, 111, 112, 116, 105, 111, 110, 115, 93, 32, 97, 99, 116, 105, 111, 110, 32, 91, 97, 114, 103, 117, 109, 101, 110, 116, 115, 93, 34, 41, 10, -112, 114, 105, 110, 116, 102, 40, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 32, 61, 32, 123, 125, - 10, 102, 111, 114, 32, 111, 112, 116, 105, 111, 110, 32, 105, 110, 32, 112, 114, 101, 109, 97, 107, 101, 46, 111, 112, 116, 105, 111, 110, 46, 101, 97, - 99, 104, 40, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 97, 116, 32, 61, 32, 34, 79, 80, 84, 73, 79, 78, 83, 32, 45, 32, 71, -101, 110, 101, 114, 97, 108, 34, 10, 105, 102, 32, 111, 112, 116, 105, 111, 110, 46, 99, 97, 116, 101, 103, 111, 114, 121, 32, 116, 104, 101, 110, 10, - 99, 97, 116, 32, 61, 32, 34, 79, 80, 84, 73, 79, 78, 83, 32, 45, 32, 34, 32, 46, 46, 32, 111, 112, 116, 105, 111, 110, 46, 99, 97, 116, -101, 103, 111, 114, 121, 59, 10, 101, 110, 100, 10, 105, 102, 32, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 91, 99, 97, 116, 93, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 91, 99, 97, 116, 93, 44, - 32, 111, 112, 116, 105, 111, 110, 41, 10, 101, 108, 115, 101, 10, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 91, 99, 97, 116, 93, 32, 61, 32, -123, 111, 112, 116, 105, 111, 110, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 44, 32, 111, 112, 116, 105, 111, 110, 115, 32, -105, 110, 32, 115, 112, 97, 105, 114, 115, 40, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 41, 32, 100, 111, 10, 112, 114, 105, 110, 116, 102, 40, -107, 41, 10, 112, 114, 105, 110, 116, 102, 40, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 108, 101, 110, 103, 116, 104, 32, 61, 32, 48, 10, 102, -111, 114, 32, 95, 44, 32, 111, 112, 116, 105, 111, 110, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, 112, 116, 105, 111, 110, 115, 41, 32, -100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 114, 105, 103, 103, 101, 114, 32, 61, 32, 111, 112, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, -114, 10, 105, 102, 32, 40, 111, 112, 116, 105, 111, 110, 46, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 32, 116, 114, 105, 103, 103, 101, 114, - 32, 61, 32, 116, 114, 105, 103, 103, 101, 114, 32, 46, 46, 32, 34, 61, 34, 32, 46, 46, 32, 111, 112, 116, 105, 111, 110, 46, 118, 97, 108, 117, -101, 32, 101, 110, 100, 10, 105, 102, 32, 40, 35, 116, 114, 105, 103, 103, 101, 114, 32, 62, 32, 108, 101, 110, 103, 116, 104, 41, 32, 116, 104, 101, -110, 32, 108, 101, 110, 103, 116, 104, 32, 61, 32, 35, 116, 114, 105, 103, 103, 101, 114, 32, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, - 95, 44, 32, 111, 112, 116, 105, 111, 110, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, 112, 116, 105, 111, 110, 115, 41, 32, 100, 111, 10, -108, 111, 99, 97, 108, 32, 116, 114, 105, 103, 103, 101, 114, 32, 61, 32, 111, 112, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, 114, 10, 108, -111, 99, 97, 108, 32, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 111, 112, 116, 105, 111, 110, 46, 100, 101, 115, 99, 114, 105, -112, 116, 105, 111, 110, 10, 105, 102, 32, 40, 111, 112, 116, 105, 111, 110, 46, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 32, 116, 114, 105, -103, 103, 101, 114, 32, 61, 32, 116, 114, 105, 103, 103, 101, 114, 32, 46, 46, 32, 34, 61, 34, 32, 46, 46, 32, 111, 112, 116, 105, 111, 110, 46, -118, 97, 108, 117, 101, 32, 101, 110, 100, 10, 105, 102, 32, 40, 111, 112, 116, 105, 111, 110, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 116, 104, -101, 110, 32, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 46, 46, 32, - 34, 59, 32, 111, 110, 101, 32, 111, 102, 58, 34, 32, 101, 110, 100, 10, 112, 114, 105, 110, 116, 102, 40, 34, 32, 45, 45, 37, 45, 34, 32, 46, - 46, 32, 108, 101, 110, 103, 116, 104, 32, 46, 46, 32, 34, 115, 32, 37, 115, 34, 44, 32, 116, 114, 105, 103, 103, 101, 114, 44, 32, 100, 101, 115, - 99, 114, 105, 112, 116, 105, 111, 110, 41, 10, 105, 102, 32, 40, 111, 112, 116, 105, 111, 110, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 109, 112, 97, 114, 101, 86, 97, 108, 117, 101, 40, 97, - 44, 32, 98, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 91, 49, 93, 32, 60, 32, 98, 91, 49, 93, 10, 101, 110, 100, 10, 116, 97, 98, 108, -101, 46, 115, 111, 114, 116, 40, 111, 112, 116, 105, 111, 110, 46, 97, 108, 108, 111, 119, 101, 100, 44, 32, 99, 111, 109, 112, 97, 114, 101, 86, 97, -108, 117, 101, 41, 10, 102, 111, 114, 32, 95, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 111, 112, 116, 105, -111, 110, 46, 97, 108, 108, 111, 119, 101, 100, 41, 32, 100, 111, 10, 112, 114, 105, 110, 116, 102, 40, 34, 32, 32, 32, 32, 32, 37, 45, 34, 32, - 46, 46, 32, 108, 101, 110, 103, 116, 104, 45, 49, 32, 46, 46, 32, 34, 115, 32, 37, 115, 34, 44, 32, 118, 97, 108, 117, 101, 91, 49, 93, 44, - 32, 118, 97, 108, 117, 101, 91, 50, 93, 41, 10, 101, 110, 100, 10, 112, 114, 105, 110, 116, 102, 40, 34, 34, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 112, 114, 105, 110, 116, 102, 40, 34, 34, 41, 10, 101, 110, 100, 10, 112, 114, 105, 110, 116, 102, 40, 34, 65, 67, 84, 73, 79, 78, 83, - 34, 41, 10, 112, 114, 105, 110, 116, 102, 40, 34, 34, 41, 10, 102, 111, 114, 32, 97, 99, 116, 105, 111, 110, 32, 105, 110, 32, 112, 114, 101, 109, - 97, 107, 101, 46, 97, 99, 116, 105, 111, 110, 46, 101, 97, 99, 104, 40, 41, 32, 100, 111, 10, 112, 114, 105, 110, 116, 102, 40, 34, 32, 37, 45, - 49, 55, 115, 32, 37, 115, 34, 44, 32, 97, 99, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, 114, 44, 32, 97, 99, 116, 105, 111, 110, 46, -100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 112, 114, 105, 110, 116, 102, 40, 34, 34, 41, 10, 112, 114, 105, 110, -116, 102, 40, 34, 70, 111, 114, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 32, 105, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 44, 32, -115, 101, 101, 32, 104, 116, 116, 112, 115, 58, 47, 47, 112, 114, 101, 109, 97, 107, 101, 46, 103, 105, 116, 104, 117, 98, 46, 105, 111, 34, 41, 10, -101, 110, 100, 10, }; - -// src/tools/dotnet.lua -static const unsigned char builtin_script_36[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, 101, 116, - 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 100, 111, 116, 110, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, -110, 101, 116, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, - 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, -111, 116, 110, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, 40, 102, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 102, 111, 32, - 61, 32, 123, 125, 10, 105, 102, 32, 40, 102, 99, 102, 103, 32, 61, 61, 32, 110, 105, 108, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 105, 110, 102, 111, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, 101, 32, 61, 32, 102, 99, 102, 103, 46, 97, 98, -115, 112, 97, 116, 104, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, -105, 111, 110, 40, 102, 110, 97, 109, 101, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, - 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, 34, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, - 99, 115, 34, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, 102, 115, 34, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 97, 99, -116, 105, 111, 110, 32, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, 34, 10, 101, 108, 115, 101, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, -108, 100, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 69, 109, 98, 101, 100, 34, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, -114, 101, 115, 120, 34, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 34, 69, 109, 98, 101, 100, 100, -101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 34, 10, 101, 108, 115, 101, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 97, 99, 116, -105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 112, 121, 34, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, 97, 115, 97, 120, 34, 32, -111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, 97, 115, 112, 120, 34, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, 100, 108, -108, 34, 32, 111, 114, 32, 101, 120, 116, 32, 61, 61, 32, 34, 46, 116, 116, 34, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 97, 99, 116, -105, 111, 110, 32, 61, 32, 34, 67, 111, 110, 116, 101, 110, 116, 34, 10, 101, 108, 115, 101, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, -100, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 34, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, - 97, 99, 116, 105, 111, 110, 32, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 34, 10, 101, 108, 115, 101, 105, 102, 32, 101, 120, 116, 32, 61, - 61, 32, 34, 46, 120, 97, 109, 108, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 97, 99, 116, 105, -111, 110, 32, 61, 61, 32, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 34, 32, 111, 114, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, - 97, 115, 101, 110, 97, 109, 101, 40, 102, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 65, 112, 112, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, -102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, - 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 34, 78, 111, 110, 101, 34, 10, 101, 108, 115, 101, 10, -105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 68, 101, 102, 105, 110, 105, -116, 105, 111, 110, 34, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 34, 80, 97, -103, 101, 34, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 34, 78, 111, 110, 101, - 34, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, - 34, 32, 97, 110, 100, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 46, 99, 115, 34, 41, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 46, 68, 101, 115, 105, 103, 110, 101, 114, 46, 99, 115, - 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, 109, 101, 58, 115, -117, 98, 40, 49, 44, 32, 45, 49, 51, 41, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, -110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 114, 101, 115, 120, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, -108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, -105, 110, 102, 111, 46, 65, 117, 116, 111, 71, 101, 110, 32, 61, 32, 34, 84, 114, 117, 101, 34, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, -100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, 10, 101, 110, 100, 10, 116, 101, 115, 116, 110, 97, 109, 101, - 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 115, 101, 116, 116, 105, 110, 103, 115, 34, 10, 105, 102, 32, 112, 114, -111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, -110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 65, 117, 116, 111, 71, 101, 110, 32, 61, 32, 34, 84, 114, 117, 101, 34, - 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, 10, 105, -110, 102, 111, 46, 68, 101, 115, 105, 103, 110, 84, 105, 109, 101, 83, 104, 97, 114, 101, 100, 73, 110, 112, 117, 116, 32, 61, 32, 34, 84, 114, 117, -101, 34, 10, 101, 110, 100, 10, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, - 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 65, 117, 116, 111, 71, 101, 110, - 32, 61, 32, 110, 105, 108, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 34, 68, 101, 112, 101, 110, 100, 101, 110, 99, -121, 34, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, - 10, 101, 110, 100, 10, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 120, 115, -100, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, - 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 65, 117, 116, 111, 71, 101, 110, 32, - 61, 32, 34, 84, 114, 117, 101, 34, 10, 105, 110, 102, 111, 46, 68, 101, 115, 105, 103, 110, 84, 105, 109, 101, 32, 61, 32, 34, 84, 114, 117, 101, - 34, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, 10, -101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 46, 120, 97, 109, 108, - 46, 99, 115, 34, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 34, 67, 111, 100, 101, 34, - 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 102, 110, 97, 109, 101, 58, 115, 117, 98, 40, - 49, 44, 32, 45, 52, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, -109, 101, 58, 115, 117, 98, 40, 49, 44, 32, 45, 52, 41, 10, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, -101, 32, 46, 46, 32, 34, 46, 120, 115, 100, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, - 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, 10, 101, 110, 100, 10, 116, 101, -115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 68, 101, 115, 105, 103, 110, 101, 114, 46, - 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, - 32, 61, 32, 34, 70, 111, 114, 109, 34, 10, 101, 110, 100, 10, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, -101, 32, 46, 46, 32, 34, 46, 116, 116, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, - 65, 117, 116, 111, 71, 101, 110, 32, 61, 32, 34, 84, 114, 117, 101, 34, 10, 105, 110, 102, 111, 46, 68, 101, 115, 105, 103, 110, 84, 105, 109, 101, - 32, 61, 32, 34, 84, 114, 117, 101, 34, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, -101, 115, 116, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 97, 99, 116, -105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 111, 110, 101, 110, 116, 34, 32, 111, 114, 10, 32, 32, 32, 102, 99, 102, 103, 46, 98, 117, -105, 108, 100, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 70, 111, 114, 109, 34, 32, 111, 114, 10, 32, 32, 32, 102, 99, 102, 103, 46, 98, -117, 105, 108, 100, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 85, 115, 101, 114, 67, 111, 110, 116, 114, 111, 108, 34, 10, 116, 104, 101, 110, - 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 97, 99, 116, 105, 111, 110, - 10, 101, 110, 100, 10, 105, 102, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 32, 97, 110, 100, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, -115, 46, 67, 111, 109, 112, 111, 110, 101, 110, 116, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, - 34, 67, 111, 109, 112, 111, 110, 101, 110, 116, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, -111, 110, 32, 61, 61, 32, 34, 67, 111, 110, 116, 101, 110, 116, 34, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 67, 111, 112, 121, 84, 111, - 79, 117, 116, 112, 117, 116, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 61, 32, 34, 80, 114, 101, 115, 101, 114, 118, 101, 78, 101, 119, 101, 115, -116, 34, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 69, 109, 98, 101, 100, 100, -101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 34, 32, 97, 110, 100, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, - 46, 114, 101, 115, 120, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 61, 32, 102, 110, - 97, 109, 101, 58, 115, 117, 98, 40, 49, 44, 32, 45, 54, 41, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, - 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, -102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, -110, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, 10, -105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, - 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 68, 101, 115, 105, 103, 110, 101, 114, 46, 99, 115, 34, 41, 32, 116, 104, 101, -110, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 34, 68, 101, 115, 105, 103, 110, 101, 114, 84, 121, 112, 101, 34, 10, -101, 110, 100, 10, 101, 108, 115, 101, 10, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, - 34, 46, 68, 101, 115, 105, 103, 110, 101, 114, 46, 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, -101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, -110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 34, 68, 101, 115, 105, 103, 110, 101, 114, 34, 10, 108, 111, 99, 97, 108, 32, 114, -101, 115, 111, 117, 114, 99, 101, 65, 99, 99, 101, 115, 115, 71, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 32, 34, 82, 101, 115, 88, 70, 105, -108, 101, 67, 111, 100, 101, 71, 101, 110, 101, 114, 97, 116, 111, 114, 34, 10, 105, 102, 32, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 46, 114, 101, 115, 111, 117, 114, 99, 101, 103, 101, 110, 101, 114, 97, 116, 111, 114, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 46, 114, 101, 115, 111, 117, 114, 99, 101, 103, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 61, 32, 34, 112, 117, - 98, 108, 105, 99, 34, 32, 116, 104, 101, 110, 10, 114, 101, 115, 111, 117, 114, 99, 101, 65, 99, 99, 101, 115, 115, 71, 101, 110, 101, 114, 97, 116, -111, 114, 32, 61, 32, 34, 80, 117, 98, 108, 105, 99, 82, 101, 115, 88, 70, 105, 108, 101, 67, 111, 100, 101, 71, 101, 110, 101, 114, 97, 116, 111, -114, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 110, 102, 111, 46, 71, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 32, 114, 101, 115, 111, -117, 114, 99, 101, 65, 99, 99, 101, 115, 115, 71, 101, 110, 101, 114, 97, 116, 111, 114, 10, 105, 110, 102, 111, 46, 76, 97, 115, 116, 71, 101, 110, - 79, 117, 116, 112, 117, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 116, 101, 115, 116, 110, 97, 109, 101, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 78, -111, 110, 101, 34, 32, 97, 110, 100, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 46, 115, 101, 116, 116, 105, 110, -103, 115, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, 109, 101, - 58, 115, 117, 98, 40, 49, 44, 32, 45, 49, 48, 41, 32, 46, 46, 32, 34, 46, 68, 101, 115, 105, 103, 110, 101, 114, 46, 99, 115, 34, 10, 105, -102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, -116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 71, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 32, - 34, 83, 101, 116, 116, 105, 110, 103, 115, 83, 105, 110, 103, 108, 101, 70, 105, 108, 101, 71, 101, 110, 101, 114, 97, 116, 111, 114, 34, 10, 105, 110, -102, 111, 46, 76, 97, 115, 116, 71, 101, 110, 79, 117, 116, 112, 117, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, -116, 101, 115, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, - 32, 61, 61, 32, 34, 67, 111, 110, 116, 101, 110, 116, 34, 32, 97, 110, 100, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, - 40, 34, 46, 116, 116, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 102, 110, - 97, 109, 101, 58, 115, 117, 98, 40, 49, 44, 32, 45, 52, 41, 32, 46, 46, 32, 34, 46, 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, -101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 71, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 32, 34, 84, 101, 120, 116, 84, 101, -109, 112, 108, 97, 116, 105, 110, 103, 70, 105, 108, 101, 71, 101, 110, 101, 114, 97, 116, 111, 114, 34, 10, 105, 110, 102, 111, 46, 76, 97, 115, 116, - 71, 101, 110, 79, 117, 116, 112, 117, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 116, 101, 115, 116, 110, 97, 109, -101, 41, 10, 105, 110, 102, 111, 46, 67, 111, 112, 121, 84, 111, 79, 117, 116, 112, 117, 116, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 61, 32, -110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 78, -111, 110, 101, 34, 32, 97, 110, 100, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 46, 120, 115, 100, 34, 41, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, 109, 101, 58, 115, 117, 98, 40, - 49, 44, 32, 45, 53, 41, 32, 46, 46, 32, 34, 46, 68, 101, 115, 105, 103, 110, 101, 114, 46, 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, -101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, -109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 34, 68, 101, 115, 105, 103, 110, 101, -114, 34, 10, 105, 110, 102, 111, 46, 71, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 32, 34, 77, 83, 68, 97, 116, 97, 83, 101, 116, 71, 101, -110, 101, 114, 97, 116, 111, 114, 34, 10, 105, 110, 102, 111, 46, 76, 97, 115, 116, 71, 101, 110, 79, 117, 116, 112, 117, 116, 32, 61, 32, 112, 97, -116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 116, 101, 115, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, -105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 78, 111, 110, 101, 34, 32, 97, 110, 100, 32, 40, 102, 110, 97, 109, 101, - 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 46, 120, 115, 99, 34, 41, 32, 111, 114, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, 115, 119, -105, 116, 104, 40, 34, 46, 120, 115, 115, 34, 41, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, - 32, 61, 32, 102, 110, 97, 109, 101, 58, 115, 117, 98, 40, 49, 44, 32, 45, 53, 41, 32, 46, 46, 32, 34, 46, 120, 115, 100, 34, 10, 105, 102, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, -101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, - 32, 61, 32, 116, 101, 115, 116, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 102, 110, 97, 109, 101, 58, 101, 110, 100, -115, 119, 105, 116, 104, 40, 34, 46, 120, 97, 109, 108, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, -109, 101, 32, 61, 32, 102, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 99, 115, 34, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, - 97, 115, 102, 105, 108, 101, 40, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, -104, 101, 110, 10, 105, 110, 102, 111, 46, 83, 117, 98, 84, 121, 112, 101, 32, 61, 32, 34, 68, 101, 115, 105, 103, 110, 101, 114, 34, 10, 105, 110, -102, 111, 46, 71, 101, 110, 101, 114, 97, 116, 111, 114, 32, 61, 32, 34, 77, 83, 66, 117, 105, 108, 100, 58, 67, 111, 109, 112, 105, 108, 101, 34, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 116, -104, 101, 110, 10, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, -116, 110, 97, 109, 101, 40, 105, 110, 102, 111, 46, 68, 101, 112, 101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 41, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 105, 110, 102, 111, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 46, 103, 101, -116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 109, 112, 105, -108, 101, 114, 115, 32, 61, 32, 123, 10, 109, 115, 110, 101, 116, 32, 61, 32, 34, 99, 115, 99, 34, 44, 10, 109, 111, 110, 111, 32, 61, 32, 34, -109, 99, 115, 34, 44, 10, 112, 110, 101, 116, 32, 61, 32, 34, 99, 115, 99, 99, 34, 44, 10, 125, 10, 105, 102, 32, 116, 111, 111, 108, 32, 61, - 61, 32, 34, 99, 115, 99, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 95, 79, 80, - 84, 73, 79, 78, 83, 46, 100, 111, 116, 110, 101, 116, 32, 111, 114, 32, 34, 109, 115, 110, 101, 116, 34, 10, 114, 101, 116, 117, 114, 110, 32, 99, -111, 109, 112, 105, 108, 101, 114, 115, 91, 116, 111, 111, 108, 115, 101, 116, 93, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 114, -101, 115, 103, 101, 110, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 100, 111, 116, 110, 101, 116, 46, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, - 99, 108, 114, 32, 61, 32, 123, 10, 85, 110, 115, 97, 102, 101, 32, 61, 32, 34, 47, 117, 110, 115, 97, 102, 101, 34, 44, 10, 125, 44, 10, 102, -108, 97, 103, 115, 32, 61, 32, 123, 10, 70, 97, 116, 97, 108, 87, 97, 114, 110, 105, 110, 103, 32, 61, 32, 34, 47, 119, 97, 114, 110, 97, 115, -101, 114, 114, 111, 114, 34, 44, 10, 125, 44, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, 111, -112, 116, 105, 109, 105, 122, 101, 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 47, 111, 112, 116, 105, 109, 105, 122, 101, 34, 44, 10, 83, 112, -101, 101, 100, 32, 61, 32, 34, 47, 111, 112, 116, 105, 109, 105, 122, 101, 34, 44, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, 32, -123, 10, 79, 110, 32, 61, 32, 34, 47, 100, 101, 98, 117, 103, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, -116, 110, 101, 116, 46, 103, 101, 116, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, - 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 100, 111, 116, 110, 101, 116, 46, 102, 108, 97, -103, 115, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 47, 110, 111, 99, 111, 110, 102, -105, 103, 39, 41, 10, 105, 102, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 99, 111, 110, 32, 116, 104, 101, 110, 10, 108, 111, - 99, 97, 108, 32, 102, 110, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, - 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 99, 111, 110, 41, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 47, -119, 105, 110, 51, 50, 105, 99, 111, 110, 58, 34, 37, 115, 34, 39, 44, 32, 102, 110, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, -103, 46, 100, 101, 102, 105, 110, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -102, 108, 97, 103, 115, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, - 44, 32, 34, 47, 100, 58, 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 99, 115, -118, 101, 114, 115, 105, 111, 110, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 102, 108, 97, 103, 115, 44, 32, 39, 47, 108, 97, 110, 103, 118, 101, 114, 115, 105, 111, 110, 58, 39, 32, 46, 46, 32, 99, 102, 103, 46, 99, -115, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, -102, 108, 97, 103, 115, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 46, 103, 101, 116, 107, 105, 110, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 40, 99, 102, -103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 34, 69, 120, 101, 34, 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 87, -105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 87, 105, 110, 69, 120, 101, - 34, 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, - 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 76, 105, 98, 114, 97, 114, 121, 34, 10, 101, 108, 115, 101, 10, 101, 114, -114, 111, 114, 40, 34, 105, 110, 118, 97, 108, 105, 100, 32, 100, 111, 116, 110, 101, 116, 32, 107, 105, 110, 100, 32, 34, 32, 46, 46, 32, 99, 102, -103, 46, 107, 105, 110, 100, 32, 46, 46, 32, 34, 46, 32, 86, 97, 108, 105, 100, 32, 107, 105, 110, 100, 115, 32, 97, 114, 101, 32, 67, 111, 110, -115, 111, 108, 101, 65, 112, 112, 44, 32, 87, 105, 110, 100, 111, 119, 115, 65, 112, 112, 44, 32, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 46, 103, 101, 116, 109, 97, 107, 101, -115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, }; - -// src/tools/gcc.lua -static const unsigned char builtin_script_37[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 103, 99, 99, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 103, 99, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 103, 99, 99, 10, 108, 111, 99, 97, 108, - 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, -103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 103, 99, 99, 46, 99, 112, 112, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 115, 121, -115, 116, 101, 109, 32, 61, 32, 123, 10, 104, 97, 105, 107, 117, 32, 61, 32, 34, 45, 77, 77, 68, 34, 44, 10, 119, 105, 105, 32, 61, 32, 123, - 32, 34, 45, 77, 77, 68, 34, 44, 32, 34, 45, 77, 80, 34, 44, 32, 34, 45, 73, 36, 40, 76, 73, 66, 79, 71, 67, 95, 73, 78, 67, 41, - 34, 44, 32, 34, 36, 40, 77, 65, 67, 72, 68, 69, 80, 41, 34, 32, 125, 44, 10, 95, 32, 61, 32, 123, 32, 34, 45, 77, 77, 68, 34, 44, - 32, 34, 45, 77, 80, 34, 32, 125, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 99, 112, 112, -102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, -109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 99, 99, 46, 99, 112, 112, 102, 108, 97, 103, 115, 41, 10, 114, 101, 116, 117, -114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 100, 101, 98, -117, 103, 102, 111, 114, 109, 97, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 68, 101, -102, 97, 117, 108, 116, 32, 61, 32, 34, 34, 44, 10, 68, 119, 97, 114, 102, 32, 61, 32, 34, 100, 119, 97, 114, 102, 34, 44, 10, 83, 112, 108, -105, 116, 68, 119, 97, 114, 102, 32, 61, 32, 34, 115, 112, 108, 105, 116, 45, 100, 119, 97, 114, 102, 34, 44, 10, 125, 10, 114, 101, 116, 117, 114, -110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, -116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 109, 51, 50, 34, 44, 10, 120, 56, 54, 95, 54, 52, - 32, 61, 32, 34, 45, 109, 54, 52, 34, 44, 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 70, 97, 116, 97, 108, 67, 111, 109, -112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 34, 45, 87, 101, 114, 114, 111, 114, 34, 44, 10, 76, 105, 110, 107, 84, 105, -109, 101, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 32, 61, 32, 34, 45, 102, 108, 116, 111, 34, 44, 10, 83, 104, 97, 100, 111, 119, -101, 100, 86, 97, 114, 105, 97, 98, 108, 101, 115, 32, 61, 32, 34, 45, 87, 115, 104, 97, 100, 111, 119, 34, 44, 10, 85, 110, 100, 101, 102, 105, -110, 101, 100, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 115, 32, 61, 32, 34, 45, 87, 117, 110, 100, 101, 102, 34, 44, 10, 125, 44, 10, 102, -108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 61, 32, 123, 10, 70, 97, 115, 116, 32, 61, 32, 34, 45, 102, 102, 97, 115, 116, 45, -109, 97, 116, 104, 34, 44, 10, 83, 116, 114, 105, 99, 116, 32, 61, 32, 34, 45, 102, 102, 108, 111, 97, 116, 45, 115, 116, 111, 114, 101, 34, 44, - 10, 125, 44, 10, 115, 116, 114, 105, 99, 116, 97, 108, 105, 97, 115, 105, 110, 103, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 102, -110, 111, 45, 115, 116, 114, 105, 99, 116, 45, 97, 108, 105, 97, 115, 105, 110, 103, 34, 44, 10, 76, 101, 118, 101, 108, 49, 32, 61, 32, 123, 32, - 34, 45, 102, 115, 116, 114, 105, 99, 116, 45, 97, 108, 105, 97, 115, 105, 110, 103, 34, 44, 32, 34, 45, 87, 115, 116, 114, 105, 99, 116, 45, 97, -108, 105, 97, 115, 105, 110, 103, 61, 49, 34, 32, 125, 44, 10, 76, 101, 118, 101, 108, 50, 32, 61, 32, 123, 32, 34, 45, 102, 115, 116, 114, 105, - 99, 116, 45, 97, 108, 105, 97, 115, 105, 110, 103, 34, 44, 32, 34, 45, 87, 115, 116, 114, 105, 99, 116, 45, 97, 108, 105, 97, 115, 105, 110, 103, - 61, 50, 34, 32, 125, 44, 10, 76, 101, 118, 101, 108, 51, 32, 61, 32, 123, 32, 34, 45, 102, 115, 116, 114, 105, 99, 116, 45, 97, 108, 105, 97, -115, 105, 110, 103, 34, 44, 32, 34, 45, 87, 115, 116, 114, 105, 99, 116, 45, 97, 108, 105, 97, 115, 105, 110, 103, 61, 51, 34, 32, 125, 44, 10, -125, 44, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 79, 48, 34, 44, 10, 79, 110, 32, - 61, 32, 34, 45, 79, 50, 34, 44, 10, 68, 101, 98, 117, 103, 32, 61, 32, 34, 45, 79, 103, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, 34, - 45, 79, 51, 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 45, 79, 115, 34, 44, 10, 83, 112, 101, 101, 100, 32, 61, 32, 34, 45, 79, 51, - 34, 44, 10, 125, 44, 10, 112, 105, 99, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 102, 80, 73, 67, 34, 44, 10, 125, 44, 10, 118, -101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 123, 10, 65, 86, 88, 32, 61, 32, 34, 45, 109, 97, 118, 120, - 34, 44, 10, 65, 86, 88, 50, 32, 61, 32, 34, 45, 109, 97, 118, 120, 50, 34, 44, 10, 83, 83, 69, 32, 61, 32, 34, 45, 109, 115, 115, 101, - 34, 44, 10, 83, 83, 69, 50, 32, 61, 32, 34, 45, 109, 115, 115, 101, 50, 34, 44, 10, 83, 83, 69, 51, 32, 61, 32, 34, 45, 109, 115, 115, -101, 51, 34, 44, 10, 83, 83, 83, 69, 51, 32, 61, 32, 34, 45, 109, 115, 115, 115, 101, 51, 34, 44, 10, 91, 34, 83, 83, 69, 52, 46, 49, - 34, 93, 32, 61, 32, 34, 45, 109, 115, 115, 101, 52, 46, 49, 34, 44, 10, 125, 44, 10, 105, 115, 97, 101, 120, 116, 101, 110, 115, 105, 111, 110, -115, 32, 61, 32, 123, 10, 77, 79, 86, 66, 69, 32, 61, 32, 34, 45, 109, 109, 111, 118, 98, 101, 34, 44, 10, 80, 79, 80, 67, 78, 84, 32, - 61, 32, 34, 45, 109, 112, 111, 112, 99, 110, 116, 34, 44, 10, 80, 67, 76, 77, 85, 76, 32, 61, 32, 34, 45, 109, 112, 99, 108, 109, 117, 108, - 34, 44, 10, 76, 90, 67, 78, 84, 32, 61, 32, 34, 45, 109, 108, 122, 99, 110, 116, 34, 44, 10, 66, 77, 73, 32, 61, 32, 34, 45, 109, 98, -109, 105, 34, 44, 10, 66, 77, 73, 50, 32, 61, 32, 34, 45, 109, 98, 109, 105, 50, 34, 44, 10, 70, 49, 54, 67, 32, 61, 32, 34, 45, 109, -102, 49, 54, 99, 34, 44, 10, 65, 69, 83, 32, 61, 32, 34, 45, 109, 97, 101, 115, 34, 44, 10, 70, 77, 65, 32, 61, 32, 34, 45, 109, 102, -109, 97, 34, 44, 10, 70, 77, 65, 52, 32, 61, 32, 34, 45, 109, 102, 109, 97, 52, 34, 44, 10, 82, 68, 82, 78, 68, 32, 61, 32, 34, 45, -109, 114, 100, 114, 110, 100, 34, 44, 10, 125, 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 123, 10, 69, 120, 116, 114, 97, 32, 61, - 32, 123, 34, 45, 87, 97, 108, 108, 34, 44, 32, 34, 45, 87, 101, 120, 116, 114, 97, 34, 125, 44, 10, 72, 105, 103, 104, 32, 61, 32, 34, 45, - 87, 97, 108, 108, 34, 44, 10, 79, 102, 102, 32, 61, 32, 34, 45, 119, 34, 44, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 109, 97, 112, 112, 105, 110, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, -108, 117, 101, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 40, 99, 102, 103, 41, 10, 108, -111, 99, 97, 108, 32, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 32, 61, 32, 118, 97, 108, 117, 101, 115, 91, 99, 102, 103, 46, 100, 101, - 98, 117, 103, 102, 111, 114, 109, 97, 116, 93, 32, 111, 114, 32, 34, 34, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 79, 110, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 34, 45, 103, 34, 32, 46, 46, 32, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 44, 10, 70, 97, 115, 116, 76, 105, -110, 107, 32, 61, 32, 34, 45, 103, 34, 32, 46, 46, 32, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 44, 10, 70, 117, 108, 108, 32, 32, - 32, 32, 32, 61, 32, 34, 45, 103, 34, 32, 46, 46, 32, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 44, 10, 125, 10, 101, 110, 100, 44, - 10, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 102, 117, 110, 115, 105, 103, 110, -101, 100, 45, 99, 104, 97, 114, 34, 44, 10, 79, 102, 102, 32, 61, 32, 34, 45, 102, 110, 111, 45, 117, 110, 115, 105, 103, 110, 101, 100, 45, 99, -104, 97, 114, 34, 10, 125, 44, 10, 111, 109, 105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 32, 61, 32, 123, 10, 79, 110, 32, - 61, 32, 34, 45, 102, 111, 109, 105, 116, 45, 102, 114, 97, 109, 101, 45, 112, 111, 105, 110, 116, 101, 114, 34, 44, 10, 79, 102, 102, 32, 61, 32, - 34, 45, 102, 110, 111, 45, 111, 109, 105, 116, 45, 102, 114, 97, 109, 101, 45, 112, 111, 105, 110, 116, 101, 114, 34, 10, 125, 44, 10, 99, 111, 109, -112, 105, 108, 101, 97, 115, 32, 61, 32, 123, 10, 91, 34, 79, 98, 106, 101, 99, 116, 105, 118, 101, 45, 67, 34, 93, 32, 61, 32, 34, 45, 120, - 32, 111, 98, 106, 101, 99, 116, 105, 118, 101, 45, 99, 34, 44, 10, 91, 34, 79, 98, 106, 101, 99, 116, 105, 118, 101, 45, 67, 43, 43, 34, 93, - 32, 61, 32, 34, 45, 120, 32, 111, 98, 106, 101, 99, 116, 105, 118, 101, 45, 99, 43, 43, 34, 44, 10, 125, 10, 125, 10, 103, 99, 99, 46, 99, -102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 99, 100, 105, 97, 108, 101, 99, 116, 32, 61, 32, 123, 10, 91, 34, 67, 56, 57, 34, 93, 32, 61, - 32, 34, 45, 115, 116, 100, 61, 99, 56, 57, 34, 44, 10, 91, 34, 67, 57, 48, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 57, 48, - 34, 44, 10, 91, 34, 67, 57, 57, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 57, 57, 34, 44, 10, 91, 34, 67, 49, 49, 34, 93, - 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 56, 57, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, - 61, 103, 110, 117, 56, 57, 34, 44, 10, 91, 34, 103, 110, 117, 57, 48, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 57, 48, - 34, 44, 10, 91, 34, 103, 110, 117, 57, 57, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 57, 57, 34, 44, 10, 91, 34, 103, -110, 117, 49, 49, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 49, 49, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, -114, 101, 100, 95, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, - 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, -105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 99, 99, 46, 99, 102, 108, 97, 103, 115, 41, 10, 108, 111, 99, - 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 115, 104, 97, 114, 101, 100, 95, 102, 108, 97, -103, 115, 44, 32, 99, 102, 108, 97, 103, 115, 41, 10, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 102, -108, 97, 103, 115, 44, 32, 103, 99, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 41, 10, 114, 101, 116, 117, -114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 119, 97, 114, -110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, - 32, 95, 44, 32, 101, 110, 97, 98, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 101, 110, 97, 98, 108, 101, 119, - 97, 114, 110, 105, 110, 103, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, - 32, 39, 45, 87, 39, 32, 46, 46, 32, 101, 110, 97, 98, 108, 101, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 115, 97, - 98, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, -115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 87, 110, 111, - 45, 39, 32, 46, 46, 32, 100, 105, 115, 97, 98, 108, 101, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 102, 97, 116, 97, 108, 32, -105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 102, 97, 116, 97, 108, 119, 97, 114, 110, 105, 110, 103, 115, 41, 32, 100, 111, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 87, 101, 114, 114, 111, 114, 61, 39, 32, - 46, 46, 32, 102, 97, 116, 97, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, -103, 99, 99, 46, 99, 120, 120, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, -110, 103, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 102, 110, 111, 45, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 34, 10, 125, - 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 78, 111, 66, 117, 102, 102, 101, 114, 83, 101, 99, 117, 114, 105, 116, 121, 67, 104, 101, 99, -107, 32, 61, 32, 34, 45, 102, 110, 111, 45, 115, 116, 97, 99, 107, 45, 112, 114, 111, 116, 101, 99, 116, 111, 114, 34, 44, 10, 125, 44, 10, 99, -112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 32, 123, 10, 91, 34, 67, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, - 99, 43, 43, 57, 56, 34, 44, 10, 91, 34, 67, 43, 43, 48, 120, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 43, 43, 48, 120, 34, - 44, 10, 91, 34, 67, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, - 43, 49, 121, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 43, 43, 49, 121, 34, 44, 10, 91, 34, 67, 43, 43, 49, 52, 34, 93, 32, - 61, 32, 34, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 122, 34, 93, 32, 61, 32, 34, 45, 115, 116, -100, 61, 99, 43, 43, 49, 122, 34, 44, 10, 91, 34, 67, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 99, 43, 43, 49, - 55, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 57, 56, 34, - 44, 10, 91, 34, 103, 110, 117, 43, 43, 48, 120, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 48, 120, 34, 44, 10, - 91, 34, 103, 110, 117, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 49, 49, 34, 44, 10, 91, 34, -103, 110, 117, 43, 43, 49, 121, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 49, 121, 34, 44, 10, 91, 34, 103, 110, -117, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 49, 52, 34, 44, 10, 91, 34, 103, 110, 117, 43, - 43, 49, 122, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 49, 122, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, - 55, 34, 93, 32, 61, 32, 34, 45, 115, 116, 100, 61, 103, 110, 117, 43, 43, 49, 55, 34, 44, 10, 125, 44, 10, 114, 116, 116, 105, 32, 61, 32, -123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 102, 110, 111, 45, 114, 116, 116, 105, 34, 10, 125, 44, 10, 118, 105, 115, 105, 98, 105, 108, 105, 116, -121, 32, 61, 32, 123, 10, 68, 101, 102, 97, 117, 108, 116, 32, 61, 32, 34, 45, 102, 118, 105, 115, 105, 98, 105, 108, 105, 116, 121, 61, 100, 101, -102, 97, 117, 108, 116, 34, 44, 10, 72, 105, 100, 100, 101, 110, 32, 61, 32, 34, 45, 102, 118, 105, 115, 105, 98, 105, 108, 105, 116, 121, 61, 104, -105, 100, 100, 101, 110, 34, 44, 10, 73, 110, 116, 101, 114, 110, 97, 108, 32, 61, 32, 34, 45, 102, 118, 105, 115, 105, 98, 105, 108, 105, 116, 121, - 61, 105, 110, 116, 101, 114, 110, 97, 108, 34, 44, 10, 80, 114, 111, 116, 101, 99, 116, 101, 100, 32, 61, 32, 34, 45, 102, 118, 105, 115, 105, 98, -105, 108, 105, 116, 121, 61, 112, 114, 111, 116, 101, 99, 116, 101, 100, 34, 44, 10, 125, 44, 10, 105, 110, 108, 105, 110, 101, 115, 118, 105, 115, 105, - 98, 105, 108, 105, 116, 121, 32, 61, 32, 123, 10, 72, 105, 100, 100, 101, 110, 32, 61, 32, 34, 45, 102, 118, 105, 115, 105, 98, 105, 108, 105, 116, -121, 45, 105, 110, 108, 105, 110, 101, 115, 45, 104, 105, 100, 100, 101, 110, 34, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, - 99, 99, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, - 95, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 99, - 99, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 120, 120, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, -103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 99, 99, 46, 99, 120, 120, 102, 108, 97, 103, 115, 41, 10, 108, 111, - 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 115, 104, 97, 114, 101, 100, 95, 102, 108, - 97, 103, 115, 44, 32, 99, 120, 120, 102, 108, 97, 103, 115, 41, 10, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, -110, 40, 102, 108, 97, 103, 115, 44, 32, 103, 99, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 41, 10, 114, -101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, -100, 101, 102, 105, 110, 101, 115, 40, 100, 101, 102, 105, 110, 101, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, -123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 102, 105, 110, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 101, 102, 105, 110, -101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 68, 39, - 32, 46, 46, 32, 112, 46, 101, 115, 99, 40, 100, 101, 102, 105, 110, 101, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, -115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 117, 110, 100, 101, 102, 105, 110, -101, 115, 40, 117, 110, 100, 101, 102, 105, 110, 101, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, -102, 111, 114, 32, 95, 44, 32, 117, 110, 100, 101, 102, 105, 110, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 117, 110, 100, 101, 102, 105, -110, 101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 85, - 39, 32, 46, 46, 32, 112, 46, 101, 115, 99, 40, 117, 110, 100, 101, 102, 105, 110, 101, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, - 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 102, 111, 114, 99, -101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, - 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 99, 102, 103, 46, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, -115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 32, 61, 32, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 118, - 97, 108, 117, 101, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 115, 116, 114, 105, 110, -103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 45, 105, 110, 99, 108, 117, 100, 101, 32, 37, 115, 39, 44, 32, 112, 46, 113, 117, 111, 116, 101, 100, - 40, 102, 110, 41, 41, 41, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, -105, 114, 115, 44, 32, 115, 121, 115, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, -102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, -114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, - 45, 73, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, - 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 115, 121, 115, 100, 105, 114, 115, 32, 111, 114, 32, 123, 125, 41, 32, 100, 111, - 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, - 44, 32, 39, 45, 105, 115, 121, 115, 116, 101, 109, 32, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, - 99, 99, 46, 103, 101, 116, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 41, 10, 108, 111, 99, - 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 105, 102, 32, 110, 111, 116, 32, 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, -116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, -109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, 41, 10, 111, 114, 32, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, -112, 46, 76, 73, 78, 85, 88, 41, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 114, 112, 97, 116, 104, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 102, 117, 108, 108, 112, 97, -116, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 41, 32, 100, 111, - 10, 108, 111, 99, 97, 108, 32, 114, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 44, 32, 102, 117, 108, 108, 112, - 97, 116, 104, 41, 10, 105, 102, 32, 110, 111, 116, 32, 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 114, 112, 97, 116, -104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 112, - 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 115, 105, 98, 108, -105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, -103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 41, 32, 100, 111, 10, 105, 102, 32, - 40, 115, 105, 98, 108, 105, 110, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 41, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 117, 108, 108, 112, 97, 116, 104, 32, 61, 32, 115, 105, 98, 108, 105, 110, 103, 46, 108, 105, 110, 107, -116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 10, 108, 111, 99, 97, 108, 32, 114, 112, 97, 116, 104, 32, 61, 32, 112, - 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, -100, 105, 114, 101, 99, 116, 111, 114, 121, 44, 32, 102, 117, 108, 108, 112, 97, 116, 104, 41, 10, 105, 102, 32, 110, 111, 116, 32, 40, 116, 97, 98, -108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 114, 112, 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 41, 32, 116, 104, 101, 110, - 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 112, 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 114, 112, 97, 116, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, -114, 112, 97, 116, 104, 115, 41, 32, 100, 111, 10, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, -103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, -105, 110, 34, 41, 32, 116, 104, 101, 110, 10, 114, 112, 97, 116, 104, 32, 61, 32, 34, 64, 108, 111, 97, 100, 101, 114, 95, 112, 97, 116, 104, 47, - 34, 32, 46, 46, 32, 114, 112, 97, 116, 104, 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, - 32, 112, 46, 76, 73, 78, 85, 88, 41, 32, 116, 104, 101, 110, 10, 114, 112, 97, 116, 104, 32, 61, 32, 105, 105, 102, 40, 114, 112, 97, 116, 104, - 32, 61, 61, 32, 34, 46, 34, 44, 32, 34, 34, 44, 32, 34, 47, 34, 32, 46, 46, 32, 114, 112, 97, 116, 104, 41, 10, 114, 112, 97, 116, 104, - 32, 61, 32, 34, 36, 36, 79, 82, 73, 71, 73, 78, 34, 32, 46, 46, 32, 114, 112, 97, 116, 104, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 87, 108, 44, 45, 114, 112, 97, 116, 104, 44, 39, 34, 32, 46, - 46, 32, 114, 112, 97, 116, 104, 32, 46, 46, 32, 34, 39, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, -116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 115, 104, 97, 114, 101, 100, 108, 105, 98, 97, -114, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, - 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, - 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 32, 61, 61, 32, 34, - 79, 83, 88, 66, 117, 110, 100, 108, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 98, 117, 110, 100, 108, 101, 34, - 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 32, 61, 61, 32, 34, 88, 67, - 84, 101, 115, 116, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 98, 117, 110, 100, 108, 101, 34, 10, 101, 108, 115, 101, -105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 32, 61, 61, 32, 34, 79, 83, 88, 70, 114, 97, 109, -101, 119, 111, 114, 107, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 10, -101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 100, 121, 110, 97, 109, 105, 99, 108, 105, 98, 34, 10, 101, 110, 100, 10, 101, 108, -115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 115, 104, 97, 114, 101, 100, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 103, 99, 99, 46, 108, 100, 115, 121, 109, 98, 111, 108, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 105, -105, 102, 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, -103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, 41, 44, 32, 34, 45, 87, 108, 44, - 45, 120, 34, 44, 32, 34, 45, 115, 34, 41, 10, 101, 110, 100, 10, 103, 99, 99, 46, 108, 100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, -114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 109, 51, 50, 34, 44, 10, 120, 56, - 54, 95, 54, 52, 32, 61, 32, 34, 45, 109, 54, 52, 34, 44, 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 76, 105, 110, 107, - 84, 105, 109, 101, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 32, 61, 32, 34, 45, 102, 108, 116, 111, 34, 44, 10, 125, 44, 10, 107, -105, 110, 100, 32, 61, 32, 123, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, - 41, 10, 108, 111, 99, 97, 108, 32, 114, 32, 61, 32, 123, 32, 103, 99, 99, 46, 103, 101, 116, 115, 104, 97, 114, 101, 100, 108, 105, 98, 97, 114, -103, 40, 99, 102, 103, 41, 32, 125, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, - 79, 87, 83, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, - 98, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 44, 32, 39, 45, 87, 108, 44, 45, 45, 111, 117, -116, 45, 105, 109, 112, 108, 105, 98, 61, 34, 39, 32, 46, 46, 32, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 114, 101, -108, 112, 97, 116, 104, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, - 61, 61, 32, 112, 46, 76, 73, 78, 85, 88, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 44, 32, - 39, 45, 87, 108, 44, 45, 115, 111, 110, 97, 109, 101, 61, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 108, -105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 41, 10, 101, 108, 115, 101, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, -101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 114, 44, 32, 39, 45, 87, 108, 44, 45, 105, 110, 115, 116, 97, 108, 108, 95, 110, 97, 109, 101, 44, 39, 32, 46, 46, 32, 112, 46, 113, 117, -111, 116, 101, 100, 40, 39, 64, 114, 112, 97, 116, 104, 47, 39, 32, 46, 46, 32, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, - 46, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 10, 101, 110, 100, 44, 10, 87, 105, 110, 100, 111, 119, -101, 100, 65, 112, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, -116, 101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 34, 45, 109, -119, 105, 110, 100, 111, 119, 115, 34, 32, 101, 110, 100, 10, 101, 110, 100, 44, 10, 125, 44, 10, 115, 121, 115, 116, 101, 109, 32, 61, 32, 123, 10, -119, 105, 105, 32, 61, 32, 34, 36, 40, 77, 65, 67, 72, 68, 69, 80, 41, 34, 44, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, - 32, 123, 10, 79, 102, 102, 32, 61, 32, 103, 99, 99, 46, 108, 100, 115, 121, 109, 98, 111, 108, 115, 44, 10, 68, 101, 102, 97, 117, 108, 116, 32, - 61, 32, 103, 99, 99, 46, 108, 100, 115, 121, 109, 98, 111, 108, 115, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, - 99, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, - 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 99, 99, 46, 108, 100, 102, 108, 97, 103, 115, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 103, 99, 99, 46, 108, 105, 98, 114, 97, 114, 121, 68, 105, -114, 101, 99, 116, 111, 114, 105, 101, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, - 56, 54, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 32, 61, 32, 123, 125, - 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, 83, 121, 115, -116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, 41, 32, 116, -104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 32, 40, 114, 44, 32, 34, 45, 76, 47, 117, 115, 114, 47, 108, 105, 98, - 51, 50, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 10, 101, 110, 100, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 32, 61, 32, 123, 125, 10, 105, 102, 32, 110, -111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, -103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, 34, 41, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 32, 40, 114, 44, 32, 34, 45, 76, 47, 117, 115, 114, 47, 108, 105, 98, 54, 52, 34, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 10, 101, 110, 100, 44, 10, 125, 44, 10, 115, 121, 115, 116, 101, 109, 32, 61, 32, 123, 10, -119, 105, 105, 32, 61, 32, 34, 45, 76, 36, 40, 76, 73, 66, 79, 71, 67, 95, 76, 73, 66, 41, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, - 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 41, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 45, 76, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, -100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 82, 101, 108, 97, 116, 105, 118, 101, 76, -105, 110, 107, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, -111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, - 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 41, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 108, 105, 98, 70, 108, 97, 103, 32, 61, - 32, 34, 45, 76, 34, 32, 46, 46, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 116, 97, 105, 110, 115, 40, 102, 108, 97, 103, 115, 44, 32, 108, 105, 98, 70, 108, 97, 103, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 108, 105, 98, 70, 108, 97, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 115, 121, -115, 108, 105, 98, 100, 105, 114, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, - 32, 39, 45, 76, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, -108, 32, 103, 99, 99, 70, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, - 44, 32, 103, 99, 99, 46, 108, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 10, 102, 108, 97, 103, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 102, 108, 97, 103, 115, 44, 32, 103, 99, 99, 70, 108, 97, 103, 115, 41, 10, 114, 101, -116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 108, -105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 44, 32, 110, 111, 103, 114, 111, 117, 112, 115, 41, 10, -108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 105, 102, 32, 110, 111, 116, 32, 115, 121, 115, 116, 101, 109, 111, -110, 108, 121, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 82, 101, 108, 97, 116, 105, 118, 101, 76, 105, -110, 107, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 108, 105, 98, 70, 105, 108, 101, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, - 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 98, 97, 115, 101, -110, 97, 109, 101, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 98, - 70, 105, 108, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 108, -105, 110, 107, 44, 32, 34, 108, 105, 98, 34, 41, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 32, 61, 32, 108, 105, 110, 107, 58, 115, 117, 98, - 40, 52, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 108, - 34, 32, 46, 46, 32, 108, 105, 110, 107, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 99, 111, 110, -102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 102, -117, 108, 108, 112, 97, 116, 104, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 32, 61, 32, - 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, -102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 97, 116, 105, 99, 95, 115, 121, 115, 108, 105, 98, 115, 32, - 61, 32, 123, 34, 45, 87, 108, 44, 45, 66, 115, 116, 97, 116, 105, 99, 34, 125, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, 95, -115, 121, 115, 108, 105, 98, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, 107, - 40, 108, 105, 110, 107, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, - 32, 34, 45, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, -108, 116, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 108, 105, 110, 107, 41, 41, 10, 101, 108, 115, 101, -105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 108, 105, 110, 107, 41, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 108, 105, 110, 107, 41, 10, 101, 108, 115, 101, 10, -108, 111, 99, 97, 108, 32, 101, 110, 100, 115, 119, 105, 116, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 115, 44, 32, 112, 116, 114, -110, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 116, 114, 110, 32, 61, 61, 32, 115, 116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 115, 44, 32, - 45, 115, 116, 114, 105, 110, 103, 46, 108, 101, 110, 40, 112, 116, 114, 110, 41, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, -101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 108, 105, 110, 107, 41, 10, 105, 102, 32, 101, 110, 100, 115, 119, 105, -116, 104, 40, 110, 97, 109, 101, 44, 32, 34, 58, 115, 116, 97, 116, 105, 99, 34, 41, 32, 116, 104, 101, 110, 10, 110, 97, 109, 101, 32, 61, 32, -115, 116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 110, 97, 109, 101, 44, 32, 48, 44, 32, 45, 56, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 115, 116, 97, 116, 105, 99, 95, 115, 121, 115, 108, 105, 98, 115, 44, 32, 34, 45, 108, 34, 32, 46, 46, 32, 110, 97, 109, -101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 101, 110, 100, 115, 119, 105, 116, 104, 40, 110, 97, 109, 101, 44, 32, 34, 58, 115, 104, 97, 114, 101, -100, 34, 41, 32, 116, 104, 101, 110, 10, 110, 97, 109, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 110, 97, 109, 101, 44, - 32, 48, 44, 32, 45, 56, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 115, 104, 97, 114, 101, 100, 95, 115, 121, 115, 108, -105, 98, 115, 44, 32, 34, 45, 108, 34, 32, 46, 46, 32, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 115, 104, 97, 114, 101, 100, 95, 115, 121, 115, 108, 105, 98, 115, 44, 32, 34, 45, 108, 34, 32, 46, 46, 32, 110, 97, 109, -101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 109, 111, 118, 101, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 97, 49, 44, 32, 97, 50, 41, 10, 108, 111, 99, 97, 108, 32, 116, 32, 61, 32, 35, 97, 50, 10, 102, 111, 114, 32, 105, - 32, 61, 32, 49, 44, 32, 35, 97, 49, 32, 100, 111, 32, 97, 50, 91, 116, 32, 43, 32, 105, 93, 32, 61, 32, 97, 49, 91, 105, 93, 32, 101, -110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 115, 116, 97, 116, 105, 99, 95, 115, 121, 115, 108, 105, 98, 115, 32, 62, 32, 49, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 115, 116, 97, 116, 105, 99, 95, 115, 121, 115, 108, 105, 98, 115, 44, 32, - 34, 45, 87, 108, 44, 45, 66, 100, 121, 110, 97, 109, 105, 99, 34, 41, 10, 109, 111, 118, 101, 40, 115, 116, 97, 116, 105, 99, 95, 115, 121, 115, -108, 105, 98, 115, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 101, 110, 100, 10, 109, 111, 118, 101, 40, 115, 104, 97, 114, 101, 100, 95, 115, 121, -115, 108, 105, 98, 115, 44, 32, 114, 101, 115, 117, 108, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 110, 111, 103, 114, 111, 117, 112, 115, 32, 97, -110, 100, 32, 35, 114, 101, 115, 117, 108, 116, 32, 62, 32, 49, 32, 97, 110, 100, 32, 40, 99, 102, 103, 46, 108, 105, 110, 107, 103, 114, 111, 117, -112, 115, 32, 61, 61, 32, 112, 46, 79, 78, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, -115, 117, 108, 116, 44, 32, 49, 44, 32, 34, 45, 87, 108, 44, 45, 45, 115, 116, 97, 114, 116, 45, 103, 114, 111, 117, 112, 34, 41, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 87, 108, 44, 45, 45, 101, 110, 100, 45, 103, 114, -111, 117, 112, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 103, 99, 99, 46, -109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 10, 115, 121, 115, 116, 101, 109, 32, 61, 32, 123, 10, 119, 105, 105, 32, - 61, 32, 91, 91, 10, 32, 32, 105, 102, 101, 113, 32, 40, 36, 40, 115, 116, 114, 105, 112, 32, 36, 40, 68, 69, 86, 75, 73, 84, 80, 80, 67, - 41, 41, 44, 41, 10, 32, 32, 32, 32, 36, 40, 101, 114, 114, 111, 114, 32, 34, 68, 69, 86, 75, 73, 84, 80, 80, 67, 32, 101, 110, 118, 105, -114, 111, 110, 109, 101, 110, 116, 32, 118, 97, 114, 105, 97, 98, 108, 101, 32, 105, 115, 32, 110, 111, 116, 32, 115, 101, 116, 34, 41, 39, 10, 32, - 32, 101, 110, 100, 105, 102, 10, 32, 32, 105, 110, 99, 108, 117, 100, 101, 32, 36, 40, 68, 69, 86, 75, 73, 84, 80, 80, 67, 41, 47, 119, 105, -105, 95, 114, 117, 108, 101, 115, 39, 93, 93, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 109, - 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, - 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 99, 99, 46, 109, 97, 107, 101, 115, -101, 116, 116, 105, 110, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 115, 101, 116, -116, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 103, 99, 99, 46, 116, 111, 111, 108, 115, 32, 61, 32, 123, 10, 99, 99, 32, 61, 32, 34, 103, - 99, 99, 34, 44, 10, 99, 120, 120, 32, 61, 32, 34, 103, 43, 43, 34, 44, 10, 97, 114, 32, 61, 32, 34, 97, 114, 34, 44, 10, 114, 99, 32, - 61, 32, 34, 119, 105, 110, 100, 114, 101, 115, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 99, 99, 46, 103, 101, 116, 116, 111, -111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 105, 102, 32, 40, 99, 102, 103, 46, 103, 99, 99, 112, 114, 101, -102, 105, 120, 32, 97, 110, 100, 32, 103, 99, 99, 46, 116, 111, 111, 108, 115, 91, 116, 111, 111, 108, 93, 41, 32, 111, 114, 32, 116, 111, 111, 108, - 32, 61, 61, 32, 34, 114, 99, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 102, 103, 46, 103, 99, 99, 112, 114, 101, -102, 105, 120, 32, 111, 114, 32, 34, 34, 41, 32, 46, 46, 32, 103, 99, 99, 46, 116, 111, 111, 108, 115, 91, 116, 111, 111, 108, 93, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, }; - -// src/tools/msc.lua -static const unsigned char builtin_script_38[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 109, 115, 99, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 115, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 109, 115, 99, 10, 108, 111, 99, 97, 108, - 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, -103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 99, 112, 112, -102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 109, 115, 99, 46, 115, 104, 97, -114, 101, 100, 32, 61, 32, 123, 10, 99, 108, 114, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, 99, 108, 114, 34, 44, 10, 85, 110, 115, - 97, 102, 101, 32, 61, 32, 34, 47, 99, 108, 114, 34, 44, 10, 80, 117, 114, 101, 32, 61, 32, 34, 47, 99, 108, 114, 58, 112, 117, 114, 101, 34, - 44, 10, 83, 97, 102, 101, 32, 61, 32, 34, 47, 99, 108, 114, 58, 115, 97, 102, 101, 34, 44, 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, - 32, 123, 10, 70, 97, 116, 97, 108, 67, 111, 109, 112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 34, 47, 87, 88, 34, 44, - 10, 77, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 34, 47, 77, 80, 34, 44, 10, - 78, 111, 77, 105, 110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 32, 61, 32, 34, 47, 71, 109, 45, 34, 44, 10, 79, 109, 105, 116, 68, -101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, 121, 32, 61, 32, 34, 47, 90, 108, 34, 10, 125, 44, 10, 102, 108, 111, 97, 116, 105, 110, -103, 112, 111, 105, 110, 116, 32, 61, 32, 123, 10, 70, 97, 115, 116, 32, 61, 32, 34, 47, 102, 112, 58, 102, 97, 115, 116, 34, 44, 10, 83, 116, -114, 105, 99, 116, 32, 61, 32, 34, 47, 102, 112, 58, 115, 116, 114, 105, 99, 116, 34, 44, 10, 125, 44, 10, 102, 108, 111, 97, 116, 105, 110, 103, -112, 111, 105, 110, 116, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 32, 61, 32, 123, 10, 79, 110, 32, 32, 61, 32, 34, 47, 102, 112, 58, 101, -120, 99, 101, 112, 116, 34, 44, 10, 79, 102, 102, 32, 61, 32, 34, 47, 102, 112, 58, 101, 120, 99, 101, 112, 116, 45, 34, 44, 10, 125, 44, 10, -102, 117, 110, 99, 116, 105, 111, 110, 108, 101, 118, 101, 108, 108, 105, 110, 107, 105, 110, 103, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, - 71, 121, 34, 44, 10, 79, 102, 102, 32, 61, 32, 34, 47, 71, 121, 45, 34, 44, 10, 125, 44, 10, 99, 97, 108, 108, 105, 110, 103, 99, 111, 110, -118, 101, 110, 116, 105, 111, 110, 32, 61, 32, 123, 10, 67, 100, 101, 99, 108, 32, 61, 32, 34, 47, 71, 100, 34, 44, 10, 70, 97, 115, 116, 67, - 97, 108, 108, 32, 61, 32, 34, 47, 71, 114, 34, 44, 10, 83, 116, 100, 67, 97, 108, 108, 32, 61, 32, 34, 47, 71, 122, 34, 44, 10, 86, 101, - 99, 116, 111, 114, 67, 97, 108, 108, 32, 61, 32, 34, 47, 71, 118, 34, 44, 10, 125, 44, 10, 105, 110, 116, 114, 105, 110, 115, 105, 99, 115, 32, - 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, 79, 105, 34, 44, 10, 125, 44, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 61, 32, 123, 10, - 79, 102, 102, 32, 61, 32, 34, 47, 79, 100, 34, 44, 10, 79, 110, 32, 61, 32, 34, 47, 79, 116, 34, 44, 10, 68, 101, 98, 117, 103, 32, 61, - 32, 34, 47, 79, 100, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, 34, 47, 79, 120, 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 47, 79, - 49, 34, 44, 10, 83, 112, 101, 101, 100, 32, 61, 32, 34, 47, 79, 50, 34, 44, 10, 125, 44, 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, -110, 115, 105, 111, 110, 115, 32, 61, 32, 123, 10, 65, 86, 88, 32, 61, 32, 34, 47, 97, 114, 99, 104, 58, 65, 86, 88, 34, 44, 10, 65, 86, - 88, 50, 32, 61, 32, 34, 47, 97, 114, 99, 104, 58, 65, 86, 88, 50, 34, 44, 10, 83, 83, 69, 32, 61, 32, 34, 47, 97, 114, 99, 104, 58, - 83, 83, 69, 34, 44, 10, 83, 83, 69, 50, 32, 61, 32, 34, 47, 97, 114, 99, 104, 58, 83, 83, 69, 50, 34, 44, 10, 83, 83, 69, 51, 32, - 61, 32, 34, 47, 97, 114, 99, 104, 58, 83, 83, 69, 50, 34, 44, 10, 83, 83, 83, 69, 51, 32, 61, 32, 34, 47, 97, 114, 99, 104, 58, 83, - 83, 69, 50, 34, 44, 10, 91, 34, 83, 83, 69, 52, 46, 49, 34, 93, 32, 61, 32, 34, 47, 97, 114, 99, 104, 58, 83, 83, 69, 50, 34, 44, - 10, 125, 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 123, 10, 69, 120, 116, 114, 97, 32, 61, 32, 34, 47, 87, 52, 34, 44, 10, - 72, 105, 103, 104, 32, 61, 32, 34, 47, 87, 52, 34, 44, 10, 79, 102, 102, 32, 61, 32, 34, 47, 87, 48, 34, 44, 10, 125, 44, 10, 115, 116, - 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 123, 10, 95, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, - 41, 32, 114, 101, 116, 117, 114, 110, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, - 40, 99, 102, 103, 41, 44, 32, 34, 47, 77, 68, 100, 34, 44, 32, 34, 47, 77, 68, 34, 41, 32, 101, 110, 100, 44, 10, 68, 101, 102, 97, 117, -108, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 32, 114, 101, 116, 117, 114, 110, 32, 105, 105, 102, 40, 99, 111, -110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 44, 32, 34, 47, 77, 68, 100, 34, 44, 32, - 34, 47, 77, 68, 34, 41, 32, 101, 110, 100, 44, 10, 79, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 32, 114, -101, 116, 117, 114, 110, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, -103, 41, 44, 32, 34, 47, 77, 84, 100, 34, 44, 32, 34, 47, 77, 84, 34, 41, 32, 101, 110, 100, 44, 10, 79, 102, 102, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 32, 114, 101, 116, 117, 114, 110, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, - 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 44, 32, 34, 47, 77, 68, 100, 34, 44, 32, 34, 47, 77, 68, 34, 41, 32, -101, 110, 100, 44, 10, 125, 44, 10, 115, 116, 114, 105, 110, 103, 112, 111, 111, 108, 105, 110, 103, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, - 47, 71, 70, 34, 44, 10, 79, 102, 102, 32, 61, 32, 34, 47, 71, 70, 45, 34, 44, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, - 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, 90, 55, 34, 10, 125, 44, 10, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, 32, 61, 32, -123, 10, 79, 110, 32, 61, 32, 34, 47, 74, 34, 44, 10, 125, 44, 10, 111, 109, 105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, - 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, 79, 121, 34, 10, 125, 10, 125, 10, 109, 115, 99, 46, 99, 102, 108, 97, 103, 115, 32, 61, - 32, 123, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, - 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, - 99, 102, 103, 44, 32, 109, 115, 99, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 108, 97, 103, 115, 32, 61, 32, - 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 109, 115, 99, 46, 99, 102, 108, 97, 103, 115, 41, - 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 115, 104, 97, 114, 101, 100, - 44, 32, 99, 102, 108, 97, 103, 115, 44, 32, 109, 115, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 41, 10, -114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 109, 115, 99, 46, 99, 120, 120, 102, 108, 97, 103, 115, 32, 61, 32, -123, 10, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 32, 123, 10, 68, 101, 102, 97, 117, 108, 116, 32, - 61, 32, 34, 47, 69, 72, 115, 99, 34, 44, 10, 79, 110, 32, 61, 32, 34, 47, 69, 72, 115, 99, 34, 44, 10, 83, 69, 72, 32, 61, 32, 34, - 47, 69, 72, 97, 34, 44, 10, 125, 44, 10, 114, 116, 116, 105, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 47, 71, 82, 45, 34, 10, -125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, - 41, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, - 40, 99, 102, 103, 44, 32, 109, 115, 99, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 120, 120, 102, 108, 97, 103, 115, - 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 109, 115, 99, 46, 99, 120, 120, 102, -108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 115, -104, 97, 114, 101, 100, 44, 32, 99, 120, 120, 102, 108, 97, 103, 115, 44, 32, 109, 115, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, - 40, 99, 102, 103, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 109, 115, 99, 46, 100, 101, 102, 105, -110, 101, 115, 32, 61, 32, 123, 10, 99, 104, 97, 114, 97, 99, 116, 101, 114, 115, 101, 116, 32, 61, 32, 123, 10, 68, 101, 102, 97, 117, 108, 116, - 32, 61, 32, 123, 32, 39, 47, 68, 34, 95, 85, 78, 73, 67, 79, 68, 69, 34, 39, 44, 32, 39, 47, 68, 34, 85, 78, 73, 67, 79, 68, 69, - 34, 39, 32, 125, 44, 10, 77, 66, 67, 83, 32, 61, 32, 39, 47, 68, 34, 95, 77, 66, 67, 83, 34, 39, 44, 10, 85, 110, 105, 99, 111, 100, -101, 32, 61, 32, 123, 32, 39, 47, 68, 34, 95, 85, 78, 73, 67, 79, 68, 69, 34, 39, 44, 32, 39, 47, 68, 34, 85, 78, 73, 67, 79, 68, - 69, 34, 39, 32, 125, 44, 10, 65, 83, 67, 73, 73, 32, 61, 32, 123, 32, 125, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 115, 99, 46, 103, 101, 116, 100, 101, 102, 105, 110, 101, 115, 40, 100, 101, 102, 105, 110, 101, 115, 44, 32, 99, 102, 103, 41, 10, 108, 111, - 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 10, 105, 102, 32, 99, 102, 103, 32, 97, 110, 100, 32, 100, 101, 102, 105, 110, 101, 115, 32, 116, 104, -101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, - 32, 109, 115, 99, 46, 100, 101, 102, 105, 110, 101, 115, 41, 10, 101, 108, 115, 101, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 101, -110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 102, 105, 110, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 101, 102, 105, 110, -101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 47, 68, 34, - 39, 32, 46, 46, 32, 100, 101, 102, 105, 110, 101, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 32, 97, -110, 100, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 46, 79, 70, - 70, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 47, 68, 95, - 72, 65, 83, 95, 69, 88, 67, 69, 80, 84, 73, 79, 78, 83, 61, 48, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, -115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 117, 110, 100, 101, 102, 105, 110, -101, 115, 40, 117, 110, 100, 101, 102, 105, 110, 101, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, -102, 111, 114, 32, 95, 44, 32, 117, 110, 100, 101, 102, 105, 110, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 117, 110, 100, 101, 102, 105, -110, 101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 47, 85, - 34, 39, 32, 46, 46, 32, 117, 110, 100, 101, 102, 105, 110, 101, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 102, 111, 114, - 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, -125, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 99, 102, 103, 46, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, -101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 32, 61, 32, 112, -114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, -118, 97, 108, 117, 101, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 47, 70, 73, - 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 102, 110, 41, 41, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, -101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 114, 117, 110, 112, 97, 116, -104, 100, 105, 114, 115, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, -115, 99, 46, 103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 44, 32, 115, 121, 115, -100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 100, 105, 114, 115, 32, 61, 32, 116, - 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 100, 105, 114, 115, 44, 32, 115, 121, 115, 100, 105, 114, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, -100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, -114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 73, 39, 32, 46, 46, 32, - 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, -116, 10, 101, 110, 100, 10, 109, 115, 99, 46, 108, 105, 110, 107, 101, 114, 70, 108, 97, 103, 115, 32, 61, 32, 123, 10, 102, 108, 97, 103, 115, 32, - 61, 32, 123, 10, 70, 97, 116, 97, 108, 76, 105, 110, 107, 87, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 34, 47, 87, 88, 34, 44, 10, 76, -105, 110, 107, 84, 105, 109, 101, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 32, 61, 32, 34, 47, 71, 76, 34, 44, 10, 78, 111, 73, -110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 76, 105, 110, 107, 32, 61, 32, 34, 47, 73, 78, 67, 82, 69, 77, 69, 78, 84, 65, 76, 58, 78, - 79, 34, 44, 10, 78, 111, 77, 97, 110, 105, 102, 101, 115, 116, 32, 61, 32, 34, 47, 77, 65, 78, 73, 70, 69, 83, 84, 58, 78, 79, 34, 44, - 10, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, 121, 32, 61, 32, 34, 47, 78, 79, 68, 69, 70, 65, 85, 76, - 84, 76, 73, 66, 34, 44, 10, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 123, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 34, - 47, 68, 76, 76, 34, 44, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 47, 68, 69, 66, - 85, 71, 34, 10, 125, 10, 125, 10, 109, 115, 99, 46, 108, 105, 98, 114, 97, 114, 105, 97, 110, 70, 108, 97, 103, 115, 32, 61, 32, 123, 10, 102, -108, 97, 103, 115, 32, 61, 32, 123, 10, 70, 97, 116, 97, 108, 76, 105, 110, 107, 87, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 34, 47, 87, - 88, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, - 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 44, 32, 109, 115, 99, 46, 108, 105, 110, 107, 101, 114, 70, 108, 97, 103, 115, 44, 32, 109, -115, 99, 46, 108, 105, 98, 114, 97, 114, 105, 97, 110, 70, 108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, - 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 109, 97, 112, 41, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 49, 44, 32, 34, 47, 78, 79, 76, 79, 71, 79, 34, 41, 10, 102, 111, 114, - 32, 105, 44, 32, 105, 103, 110, 111, 114, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 105, 103, 110, 111, 114, 101, 100, -101, 102, 97, 117, 108, 116, 108, 105, 98, 114, 97, 114, 105, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 109, 115, 99, 46, 103, -101, 116, 76, 105, 98, 114, 97, 114, 121, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 40, 41, 91, 105, 103, 110, 111, 114, 101, 58, 109, 97, 116, - 99, 104, 40, 34, 91, 94, 46, 93, 43, 36, 34, 41, 93, 32, 116, 104, 101, 110, 10, 105, 103, 110, 111, 114, 101, 32, 61, 32, 112, 97, 116, 104, - 46, 97, 112, 112, 101, 110, 100, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 105, 103, 110, 111, 114, 101, 44, 32, 34, 46, 108, 105, 98, 34, 41, - 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 47, 78, 79, 68, 69, 70, - 65, 85, 76, 84, 76, 73, 66, 58, 39, 32, 46, 46, 32, 105, 103, 110, 111, 114, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, -102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, -121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 108, -105, 98, 100, 105, 114, 115, 44, 32, 99, 102, 103, 46, 115, 121, 115, 108, 105, 98, 100, 105, 114, 115, 41, 10, 102, 111, 114, 32, 105, 44, 32, 100, -105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, -101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, - 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 47, 76, 73, 66, 80, 65, 84, 72, 58, - 34, 39, 32, 46, 46, 32, 100, 105, 114, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, -103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, 121, 69, 120, -116, 101, 110, 115, 105, 111, 110, 115, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 91, 34, 108, 105, 98, 34, 93, 32, 61, 32, 116, 114, -117, 101, 44, 10, 91, 34, 111, 98, 106, 34, 93, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 44, - 32, 110, 111, 103, 114, 111, 117, 112, 115, 41, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 32, 61, 32, 123, 125, 10, 105, 102, 32, 110, -111, 116, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, -103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 102, 117, 108, -108, 112, 97, 116, 104, 34, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 121, 115, 116, 101, 109, 32, 61, 32, 99, 111, 110, 102, 105, -103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, - 97, 116, 104, 34, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 115, 121, 115, 116, 101, 109, 32, 100, 111, 10, 108, 111, 99, 97, -108, 32, 108, 105, 110, 107, 32, 61, 32, 115, 121, 115, 116, 101, 109, 91, 105, 93, 10, 105, 102, 32, 110, 111, 116, 32, 112, 46, 116, 111, 111, 108, -115, 46, 109, 115, 99, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, 121, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 40, 41, 91, 108, 105, 110, -107, 58, 109, 97, 116, 99, 104, 40, 34, 91, 94, 46, 93, 43, 36, 34, 41, 93, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 32, 61, 32, 112, - 97, 116, 104, 46, 97, 112, 112, 101, 110, 100, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 108, 105, 110, 107, 44, 32, 34, 46, 108, 105, 98, 34, - 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 108, 105, 110, 107, 115, 44, 32, 108, 105, 110, 107, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 108, 105, 110, 107, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, - 99, 46, 103, 101, 116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, -108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 115, 99, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, -102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 115, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, -117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 101, 110, 97, 98, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 99, 102, 103, 46, 101, 110, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 47, 119, 49, 34, 39, 32, 46, 46, 32, 101, 110, 97, 98, 108, 101, 32, 46, 46, - 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 115, 97, 98, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 47, 119, 100, 34, 39, 32, 46, 46, 32, 100, 105, 115, 97, 98, 108, -101, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 102, 97, 116, 97, 108, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 99, 102, 103, 46, 102, 97, 116, 97, 108, 119, 97, 114, 110, 105, 110, 103, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 47, 119, 101, 34, 39, 32, 46, 46, 32, 102, 97, 116, 97, 108, 32, - 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, }; - -// src/tools/snc.lua -static const unsigned char builtin_script_39[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 115, 110, 99, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 110, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 115, 110, 99, 10, 108, 111, 99, 97, 108, - 32, 103, 99, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 103, 99, 99, 10, 115, 110, 99, 46, 115, 104, 97, 114, 101, 100, 32, 61, 32, -123, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 70, 97, 116, 97, 108, 67, 111, 109, 112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, - 32, 61, 32, 34, 45, 88, 113, 117, 105, 116, 61, 50, 34, 44, 10, 125, 44, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 61, 32, 123, 10, 79, -102, 102, 32, 61, 32, 34, 45, 79, 48, 34, 44, 10, 79, 110, 32, 61, 32, 34, 45, 79, 49, 34, 44, 10, 68, 101, 98, 117, 103, 32, 61, 32, - 34, 45, 79, 100, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, 34, 45, 79, 51, 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 45, 79, 115, - 34, 44, 10, 83, 112, 101, 101, 100, 32, 61, 32, 34, 45, 79, 50, 34, 44, 10, 125, 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, -123, 10, 69, 120, 116, 114, 97, 32, 61, 32, 34, 45, 88, 100, 105, 97, 103, 61, 50, 34, 44, 10, 125, 10, 125, 10, 115, 110, 99, 46, 99, 102, -108, 97, 103, 115, 32, 61, 32, 123, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 110, 99, 46, 103, 101, 116, 99, 102, 108, 97, 103, -115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 109, - 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 115, 110, 99, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, -102, 108, 97, 103, 115, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 115, -110, 99, 46, 99, 102, 108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, -111, 105, 110, 40, 115, 104, 97, 114, 101, 100, 44, 32, 99, 102, 108, 97, 103, 115, 44, 32, 115, 110, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, -110, 103, 115, 40, 99, 102, 103, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 115, 110, 99, 46, 99, -120, 120, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 32, -123, 10, 68, 101, 102, 97, 117, 108, 116, 32, 61, 32, 34, 45, 88, 99, 43, 61, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 34, 44, 10, 79, -110, 32, 61, 32, 34, 45, 88, 99, 43, 61, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 34, 44, 10, 83, 69, 72, 32, 61, 32, 34, 45, 88, - 99, 45, 61, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 34, 44, 10, 125, 44, 10, 114, 116, 116, 105, 32, 61, 32, 123, 10, 68, 101, 102, 97, -117, 108, 116, 32, 61, 32, 34, 45, 88, 99, 43, 61, 114, 116, 116, 105, 34, 44, 10, 79, 110, 32, 61, 32, 34, 45, 88, 99, 43, 61, 114, 116, -116, 105, 34, 44, 10, 83, 69, 72, 32, 61, 32, 34, 45, 88, 99, 45, 61, 114, 116, 116, 105, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 115, 110, 99, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, -115, 104, 97, 114, 101, 100, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 115, 110, - 99, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 120, 120, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, -103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 115, 110, 99, 46, 99, 120, 120, 102, 108, 97, 103, 115, 41, 10, 108, 111, - 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 115, 104, 97, 114, 101, 100, 44, 32, 99, -120, 120, 102, 108, 97, 103, 115, 44, 32, 115, 110, 99, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 41, 10, 114, -101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 110, 99, 46, 103, 101, 116, -102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, - 32, 103, 99, 99, 46, 103, 101, 116, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, -110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 110, 99, 46, 103, 101, 116, 108, 100, 102, 108, - 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 123, 32, 125, 10, 105, 102, 32, 110, 111, -116, 32, 40, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 112, 46, 79, 78, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 115, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 115, 110, 99, 46, 103, 101, 116, 99, 112, 112, 102, 108, 97, 103, 115, 32, 61, 32, 103, 99, - 99, 46, 103, 101, 116, 99, 112, 112, 102, 108, 97, 103, 115, 10, 115, 110, 99, 46, 103, 101, 116, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 103, - 99, 99, 46, 103, 101, 116, 100, 101, 102, 105, 110, 101, 115, 10, 115, 110, 99, 46, 103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, - 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 10, 115, 110, 99, 46, 103, 101, 116, 114, 117, 110, -112, 97, 116, 104, 100, 105, 114, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 10, 115, 110, - 99, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, -116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 10, 115, 110, 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, - 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 110, 99, 46, 103, 101, 116, -109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, - 10, 115, 110, 99, 46, 116, 111, 111, 108, 115, 32, 61, 32, 123, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 110, 99, 46, 103, 101, -116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 115, - 32, 61, 32, 115, 110, 99, 46, 116, 111, 111, 108, 115, 91, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 93, 32, 111, -114, 32, 115, 110, 99, 46, 116, 111, 111, 108, 115, 91, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 93, 32, 111, 114, 32, 123, 125, 10, 114, 101, -116, 117, 114, 110, 32, 110, 97, 109, 101, 115, 91, 116, 111, 111, 108, 93, 10, 101, 110, 100, 10, }; - -// src/tools/clang.lua -static const unsigned char builtin_script_40[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 99, 108, 97, 110, 103, 32, - 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 99, 108, 97, 110, 103, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 99, 108, 97, 110, 103, - 10, 108, 111, 99, 97, 108, 32, 103, 99, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 103, 99, 99, 10, 108, 111, 99, 97, 108, 32, 99, -111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, 97, 110, 103, 46, -103, 101, 116, 99, 112, 112, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, - 99, 99, 46, 103, 101, 116, 99, 112, 112, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, - 10, 101, 110, 100, 10, 99, 108, 97, 110, 103, 46, 115, 104, 97, 114, 101, 100, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, -114, 101, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 44, 10, 102, 108, - 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 102, 108, 97, 103, 115, 44, 10, 102, 108, 111, 97, 116, 105, 110, 103, -112, 111, 105, 110, 116, 32, 61, 32, 123, 10, 70, 97, 115, 116, 32, 61, 32, 34, 45, 102, 102, 97, 115, 116, 45, 109, 97, 116, 104, 34, 44, 10, -125, 44, 10, 115, 116, 114, 105, 99, 116, 97, 108, 105, 97, 115, 105, 110, 103, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 115, -116, 114, 105, 99, 116, 97, 108, 105, 97, 115, 105, 110, 103, 44, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 61, 32, 123, 10, 79, 102, 102, 32, - 61, 32, 34, 45, 79, 48, 34, 44, 10, 79, 110, 32, 61, 32, 34, 45, 79, 50, 34, 44, 10, 68, 101, 98, 117, 103, 32, 61, 32, 34, 45, 79, - 48, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, 34, 45, 79, 51, 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 45, 79, 115, 34, 44, 10, - 83, 112, 101, 101, 100, 32, 61, 32, 34, 45, 79, 51, 34, 44, 10, 125, 44, 10, 112, 105, 99, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, -101, 100, 46, 112, 105, 99, 44, 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 103, 99, 99, 46, 115, -104, 97, 114, 101, 100, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 44, 10, 105, 115, 97, 101, 120, 116, 101, 110, -115, 105, 111, 110, 115, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 105, 115, 97, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, - 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 119, 97, 114, 110, 105, 110, 103, 115, - 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 115, 121, 109, 98, 111, 108, 115, 44, 10, -117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 117, 110, 115, 105, 103, 110, -101, 100, 99, 104, 97, 114, 44, 10, 111, 109, 105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 32, 61, 32, 103, 99, 99, 46, 115, -104, 97, 114, 101, 100, 46, 111, 109, 105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 44, 10, 99, 111, 109, 112, 105, 108, 101, 97, -115, 32, 61, 32, 103, 99, 99, 46, 115, 104, 97, 114, 101, 100, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 10, 125, 10, 99, 108, 97, 110, 103, - 46, 99, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 109, 101, 114, 103, 101, 40, 103, 99, 99, 46, 99, 102, 108, 97, 103, 115, - 44, 32, 123, 10, 125, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 40, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, - 97, 103, 115, 40, 99, 102, 103, 44, 32, 99, 108, 97, 110, 103, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 108, - 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 99, 108, 97, 110, 103, - 46, 99, 102, 108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, -110, 40, 115, 104, 97, 114, 101, 100, 44, 32, 99, 102, 108, 97, 103, 115, 41, 10, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, -106, 111, 105, 110, 40, 102, 108, 97, 103, 115, 44, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, -103, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, - 97, 110, 103, 46, 103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 103, 99, 99, 46, -103, 101, 116, 119, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 99, 108, 97, 110, 103, 46, 99, 120, 120, 102, 108, - 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 109, 101, 114, 103, 101, 40, 103, 99, 99, 46, 99, 120, 120, 102, 108, 97, 103, 115, 44, 32, -123, 10, 125, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 114, 101, 100, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, - 97, 103, 115, 40, 99, 102, 103, 44, 32, 99, 108, 97, 110, 103, 46, 115, 104, 97, 114, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 120, 120, -102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 99, 108, 97, -110, 103, 46, 99, 120, 120, 102, 108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, - 46, 106, 111, 105, 110, 40, 115, 104, 97, 114, 101, 100, 44, 32, 99, 120, 120, 102, 108, 97, 103, 115, 41, 10, 102, 108, 97, 103, 115, 32, 61, 32, -116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 102, 108, 97, 103, 115, 44, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 119, 97, 114, 110, 105, -110, 103, 115, 40, 99, 102, 103, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 100, 101, 102, 105, 110, 101, 115, 40, 100, 101, 102, 105, 110, 101, 115, 41, 10, 108, 111, - 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 100, 101, 102, 105, 110, 101, 115, 40, 100, 101, 102, 105, 110, -101, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, - 97, 110, 103, 46, 103, 101, 116, 117, 110, 100, 101, 102, 105, 110, 101, 115, 40, 117, 110, 100, 101, 102, 105, 110, 101, 115, 41, 10, 108, 111, 99, 97, -108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 117, 110, 100, 101, 102, 105, 110, 101, 115, 40, 117, 110, 100, 101, 102, -105, 110, 101, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 108, 97, 110, 103, 46, 103, 101, 116, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, -102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, - 97, 110, 103, 46, 103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 44, 32, 115, 121, -115, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 105, 110, 99, 108, -117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 44, 32, 115, 121, 115, 100, 105, 114, 115, 41, 10, 114, 101, 116, 117, -114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 99, 108, 97, 110, 103, 46, 103, 101, 116, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, -115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 108, 97, 110, 103, 46, 103, 101, 116, 115, 104, 97, 114, 101, 100, 108, 105, 98, 97, 114, 103, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, -110, 32, 103, 99, 99, 46, 103, 101, 116, 115, 104, 97, 114, 101, 100, 108, 105, 98, 97, 114, 103, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 99, -108, 97, 110, 103, 46, 108, 100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, -123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 109, 51, 50, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 109, 54, 52, 34, 44, - 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 76, 105, 110, 107, 84, 105, 109, 101, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, -111, 110, 32, 61, 32, 34, 45, 102, 108, 116, 111, 34, 44, 10, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 123, 10, 83, 104, 97, 114, 101, 100, - 76, 105, 98, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 32, 61, 32, 123, 32, - 99, 108, 97, 110, 103, 46, 103, 101, 116, 115, 104, 97, 114, 101, 100, 108, 105, 98, 97, 114, 103, 40, 99, 102, 103, 41, 32, 125, 10, 105, 102, 32, - 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 34, 119, 105, 110, 100, 111, 119, 115, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, - 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 114, 44, 32, 39, 45, 87, 108, 44, 45, 45, 111, 117, 116, 45, 105, 109, 112, 108, 105, 98, 61, 34, 39, 32, - 46, 46, 32, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 114, 101, 108, 112, 97, 116, 104, 32, 46, 46, 32, 39, 34, 39, - 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 76, 73, 78, 85, 88, 32, 116, -104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 44, 32, 39, 45, 87, 108, 44, 45, 115, 111, 110, 97, 109, 101, - 61, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 110, 97, -109, 101, 41, 41, 10, 101, 108, 115, 101, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, 103, 101, -116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, 105, 110, - 34, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 44, 32, 39, 45, 87, 108, 44, 45, 105, 110, -115, 116, 97, 108, 108, 95, 110, 97, 109, 101, 44, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 39, 64, 114, 112, 97, 116, 104, - 47, 39, 32, 46, 46, 32, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 114, 10, 101, 110, 100, 44, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, - 68, 79, 87, 83, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 34, 45, 109, 119, 105, 110, 100, 111, 119, 115, 34, 32, 101, 110, 100, - 10, 101, 110, 100, 44, 10, 125, 44, 10, 115, 121, 115, 116, 101, 109, 32, 61, 32, 123, 10, 119, 105, 105, 32, 61, 32, 34, 36, 40, 77, 65, 67, - 72, 68, 69, 80, 41, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 108, 100, -102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, -109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 99, 108, 97, 110, 103, 46, 108, 100, 102, 108, 97, 103, 115, 41, 10, 114, 101, 116, -117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, - 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, - 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, - 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, -108, 97, 110, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 44, 32, 110, -111, 103, 114, 111, 117, 112, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 103, 99, 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, - 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 44, 32, 110, 111, 103, 114, 111, 117, 112, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 99, 108, 97, 110, 103, 46, 103, 101, 116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 99, 99, 46, 103, 101, 116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, -115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 99, 108, 97, 110, 103, 46, 116, 111, -111, 108, 115, 32, 61, 32, 123, 10, 99, 99, 32, 61, 32, 34, 99, 108, 97, 110, 103, 34, 44, 10, 99, 120, 120, 32, 61, 32, 34, 99, 108, 97, -110, 103, 43, 43, 34, 44, 10, 97, 114, 32, 61, 32, 34, 97, 114, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 108, 97, 110, -103, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 114, 101, 116, 117, 114, 110, 32, - 99, 108, 97, 110, 103, 46, 116, 111, 111, 108, 115, 91, 116, 111, 111, 108, 93, 10, 101, 110, 100, 10, }; - -// src/tools/mingw.lua -static const unsigned char builtin_script_41[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 109, 105, 110, 103, 119, 32, - 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 103, 99, 99, 10, }; - -// src/actions/clean/_clean.lua -static const unsigned char builtin_script_42[] = { -112, 114, 101, 109, 97, 107, 101, 46, 99, 108, 101, 97, 110, 32, 61, 32, 123, 125, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, -114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 99, 108, 101, 97, 110, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, -110, 32, 61, 32, 34, 82, 101, 109, 111, 118, 101, 32, 97, 108, 108, 32, 98, 105, 110, 97, 114, 105, 101, 115, 32, 97, 110, 100, 32, 103, 101, 110, -101, 114, 97, 116, 101, 100, 32, 102, 105, 108, 101, 115, 34, 44, 10, 101, 120, 101, 99, 117, 116, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 41, 10, 112, 114, 105, 110, 116, 40, 34, 42, 42, 32, 84, 104, 101, 32, 99, 108, 101, 97, 110, 32, 97, 99, 116, 105, 111, 110, 32, 104, - 97, 115, 32, 110, 111, 116, 32, 121, 101, 116, 32, 98, 101, 101, 110, 32, 112, 111, 114, 116, 101, 100, 34, 41, 10, 101, 110, 100, 10, 125, 10, }; - -// src/_premake_init.lua -static const unsigned char builtin_script_43[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 97, 112, 105, 32, 61, 32, 112, 46, - 97, 112, 105, 10, 108, 111, 99, 97, 108, 32, 68, 79, 67, 95, 85, 82, 76, 32, 61, 32, 34, 83, 101, 101, 32, 104, 116, 116, 112, 115, 58, 47, - 47, 103, 105, 116, 104, 117, 98, 46, 99, 111, 109, 47, 112, 114, 101, 109, 97, 107, 101, 47, 112, 114, 101, 109, 97, 107, 101, 45, 99, 111, 114, 101, - 47, 119, 105, 107, 105, 47, 34, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 97, -114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 117, 110, -105, 118, 101, 114, 115, 97, 108, 34, 44, 10, 112, 46, 88, 56, 54, 44, 10, 112, 46, 88, 56, 54, 95, 54, 52, 44, 10, 112, 46, 65, 82, 77, - 44, 10, 112, 46, 65, 82, 77, 54, 52, 44, 10, 125, 44, 10, 97, 108, 105, 97, 115, 101, 115, 32, 61, 32, 123, 10, 105, 51, 56, 54, 32, 32, - 61, 32, 112, 46, 88, 56, 54, 44, 10, 97, 109, 100, 54, 52, 32, 61, 32, 112, 46, 88, 56, 54, 95, 54, 52, 44, 10, 120, 51, 50, 32, 32, - 32, 61, 32, 112, 46, 88, 56, 54, 44, 45, 45, 32, 116, 104, 101, 115, 101, 32, 115, 104, 111, 117, 108, 100, 32, 98, 101, 32, 68, 69, 80, 82, - 69, 67, 65, 84, 69, 68, 10, 120, 54, 52, 32, 32, 32, 61, 32, 112, 46, 88, 56, 54, 95, 54, 52, 44, 10, 125, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 97, 116, 108, 34, 44, 10, 115, 99, 111, 112, 101, - 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, -108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, 102, 102, 34, 44, 10, 34, 68, 121, 110, 97, 109, 105, 99, 34, 44, 10, 34, 83, 116, - 97, 116, 105, 99, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 98, 97, 115, 101, 100, 105, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 97, 99, 116, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, -110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, -103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 123, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 32, 34, 114, 117, 108, 101, 34, 32, 125, 44, 10, 107, -105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, -117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, -116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 99, 117, 115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, -115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, -105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, - 61, 32, 123, 32, 34, 114, 117, 108, 101, 34, 32, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, -103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, -117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, -108, 100, 108, 111, 103, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 123, 32, 34, 99, 111, 110, 102, 105, 103, 34, 32, 125, 44, 10, 107, 105, -110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, - 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 123, 32, 34, - 99, 111, 110, 102, 105, 103, 34, 44, 32, 34, 114, 117, 108, 101, 34, 32, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, -103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, -117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, -108, 100, 111, 112, 116, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, -110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, -101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 34, 44, 10, 115, 99, 111, 112, -101, 32, 61, 32, 123, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 32, 34, 114, 117, 108, 101, 34, 32, 125, 44, 10, 107, 105, 110, 100, 32, 61, - 32, 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, -104, 86, 97, 114, 115, 32, 61, 32, 102, 97, 108, 115, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, -110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, -110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 102, 97, 108, 115, 101, 44, 10, 125, 10, 97, -112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 117, 105, 108, 100, 114, 117, 108, 101, 34, - 44, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 116, 97, 98, 108, 101, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 104, - 97, 114, 97, 99, 116, 101, 114, 115, 101, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, -105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, - 97, 117, 108, 116, 34, 44, 10, 34, 65, 83, 67, 73, 73, 34, 44, 10, 34, 77, 66, 67, 83, 34, 44, 10, 34, 85, 110, 105, 99, 111, 100, 101, - 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 108, -101, 97, 110, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 108, 101, 97, 110, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, -115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 99, 108, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, - 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, 102, 102, 34, 44, 10, 34, 79, -110, 34, 44, 10, 34, 80, 117, 114, 101, 34, 44, 10, 34, 83, 97, 102, 101, 34, 44, 10, 34, 85, 110, 115, 97, 102, 101, 34, 44, 10, 125, 10, -125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 111, 109, 112, 105, 108, 101, - 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 111, 109, 112, 105, 108, 101, 97, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, - 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, -100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 67, 34, 44, 10, 34, 67, 43, 43, 34, 44, 10, 34, 79, 98, -106, 101, 99, 116, 105, 118, 101, 45, 67, 34, 44, 10, 34, 79, 98, 106, 101, 99, 116, 105, 118, 101, 45, 67, 43, 43, 34, 44, 10, 125, 10, 125, - 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 109, 97, -112, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, -105, 115, 116, 58, 107, 101, 121, 101, 100, 58, 97, 114, 114, 97, 121, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, -101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, -115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, -101, 32, 61, 32, 34, 99, 111, 112, 121, 108, 111, 99, 97, 108, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 109, 105, 120, 101, 100, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, - 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, -100, 101, 98, 117, 103, 97, 114, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, -110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 97, 108, 108, 111, 119, 68, 117, 112, 108, 105, 99, 97, -116, 101, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, -101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 99, 111, 109, 109, 97, 110, 100, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, -117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, -116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 99, 111, 110, 110, 101, 99, 116, 99, 111, 109, 109, 97, 110, -100, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, -105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 100, 105, 114, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, - 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, - 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 101, -110, 118, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, -108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, -104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 101, 120, 116, 101, 110, 100, 101, 100, 112, 114, 111, 116, 111, 99, 111, 108, 34, 44, 10, 115, - 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, - 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, -103, 102, 111, 114, 109, 97, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, -116, 34, 44, 10, 34, 99, 55, 34, 44, 10, 34, 68, 119, 97, 114, 102, 34, 44, 10, 34, 83, 112, 108, 105, 116, 68, 119, 97, 114, 102, 34, 44, - 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, -117, 103, 103, 101, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, - 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, - 44, 10, 34, 71, 68, 66, 34, 44, 10, 34, 76, 76, 68, 66, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 103, 101, 114, 116, 121, 112, 101, 34, 44, 10, 115, 99, 111, 112, 101, - 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, -108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 77, 105, 120, 101, 100, 34, 44, 10, 34, 78, 97, 116, 105, 118, 101, 79, 110, 108, 121, 34, 44, - 10, 34, 77, 97, 110, 97, 103, 101, 100, 79, 110, 108, 121, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 112, 97, 116, 104, 109, 97, 112, 34, 44, 10, 115, 99, 111, 112, 101, 32, - 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 107, 101, 121, 101, 100, 58, 112, - 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, -116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 112, 111, 114, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, - 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 105, 110, 116, 101, 103, 101, 114, 34, 44, 10, 125, 10, - 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 114, 101, 109, 111, -116, 101, 104, 111, 115, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, - 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 115, 101, 97, 114, 99, 104, 112, - 97, 116, 104, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, - 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 115, 116, 97, 114, 116, 117, -112, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, -110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, -103, 116, 111, 111, 108, 97, 114, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, -110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, -101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 116, 111, 111, 108, 99, 111, 109, 109, 97, 110, 100, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, - 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, - 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 102, 97, 117, 108, -116, 112, 108, 97, 116, 102, 111, 114, 109, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, -105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 102, 105, 110, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, -105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, -115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 100, 101, 112, 101, 110, 100, 115, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, -116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, -105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, - 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, - 34, 100, 105, 115, 112, 108, 97, 121, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 114, 117, 108, 101, 34, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, -101, 32, 61, 32, 34, 100, 112, 105, 97, 119, 97, 114, 101, 110, 101, 115, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, - 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 78, 111, 110, 101, 34, 44, 10, 34, 72, 105, 103, 104, 34, 44, 10, 34, 72, -105, 103, 104, 80, 101, 114, 77, 111, 110, 105, 116, 111, 114, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, 110, 117, 101, 34, 44, 10, 115, 99, 111, -112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, - 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 79, 102, -102, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, -101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, - 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 79, 102, 102, 34, 44, 10, 34, 83, 69, 72, 34, - 44, 10, 34, 67, 84, 104, 114, 111, 119, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, -110, 97, 109, 101, 32, 61, 32, 34, 101, 110, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, - 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 101, 110, 100, 105, 97, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, - 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 76, 105, 116, 116, 108, 101, 34, 44, 10, 34, 66, 105, 103, 34, 44, 10, 125, 44, 10, -125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 101, 110, 116, 114, 121, 112, 111, -105, 110, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, -115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 102, 97, 116, 97, 108, 119, 97, 114, 110, 105, 110, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, - 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 102, 105, 108, 101, 101, 120, 116, 101, 110, 115, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 114, 117, 108, 101, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, -103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 105, 108, 101, 110, 97, 109, 101, 34, 44, 10, 115, 99, 111, 112, -101, 32, 61, 32, 123, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 32, 34, 114, 117, 108, 101, 34, 32, 125, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, - 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 105, 108, 101, 115, 34, 44, 10, 115, 99, 111, 112, -101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 102, 105, 108, 101, 34, - 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, -123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 108, 101, 118, 101, 108, 108, 105, 110, 107, 105, 110, 103, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, - 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 108, 97, -103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 32, 61, 32, 34, -108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 67, 111, 109, 112, 111, -110, 101, 110, 116, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, - 68, 101, 98, 117, 103, 69, 110, 118, 115, 68, 111, 110, 116, 77, 101, 114, 103, 101, 34, 44, 10, 34, 68, 101, 98, 117, 103, 69, 110, 118, 115, 73, -110, 104, 101, 114, 105, 116, 34, 44, 10, 34, 69, 110, 97, 98, 108, 101, 83, 83, 69, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 69, 110, 97, 98, 108, 101, 83, 83, 69, 50, 34, 44, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, -117, 105, 108, 100, 34, 44, 10, 34, 69, 120, 116, 114, 97, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 32, 32, 32, 32, 32, 32, 45, 45, - 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 70, 97, 116, 97, 108, 67, 111, 109, 112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, -115, 34, 44, 10, 34, 70, 97, 116, 97, 108, 76, 105, 110, 107, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 10, 34, 70, 108, 111, 97, 116, 70, - 97, 115, 116, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 70, -108, 111, 97, 116, 83, 116, 114, 105, 99, 116, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, - 69, 68, 10, 34, 76, 105, 110, 107, 84, 105, 109, 101, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 34, 44, 10, 34, 77, 97, 110, 97, -103, 101, 100, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, - 34, 77, 97, 112, 115, 34, 44, 10, 34, 77, 70, 67, 34, 44, 10, 34, 77, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, -109, 112, 105, 108, 101, 34, 44, 10, 34, 78, 97, 116, 105, 118, 101, 87, 67, 104, 97, 114, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, - 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 78, 111, 54, 52, 66, 105, 116, 67, 104, 101, 99, 107, 115, 34, 44, 10, 34, 78, -111, 67, 111, 112, 121, 76, 111, 99, 97, 108, 34, 44, 10, 34, 78, 111, 69, 100, 105, 116, 65, 110, 100, 67, 111, 110, 116, 105, 110, 117, 101, 34, - 44, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 78, 111, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, -114, 34, 44, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 78, 111, 73, 109, 112, 108, 105, 99, -105, 116, 76, 105, 110, 107, 34, 44, 10, 34, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 34, 44, 10, 34, 78, 111, 73, 110, 99, 114, 101, -109, 101, 110, 116, 97, 108, 76, 105, 110, 107, 34, 44, 10, 34, 78, 111, 77, 97, 110, 105, 102, 101, 115, 116, 34, 44, 10, 34, 78, 111, 77, 105, -110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 34, 44, 10, 34, 78, 111, 78, 97, 116, 105, 118, 101, 87, 67, 104, 97, 114, 34, 44, 32, - 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 78, 111, 80, 67, 72, 34, 44, 10, 34, 78, 111, - 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 34, 44, 10, 34, 78, 111, 66, 117, 102, 102, 101, 114, 83, 101, 99, 117, 114, 105, 116, -121, 67, 104, 101, 99, 107, 34, 44, 10, 34, 78, 111, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, -121, 34, 44, 10, 34, 79, 112, 116, 105, 109, 105, 122, 101, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, - 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 79, 112, 116, 105, 109, 105, 122, 101, 83, 105, 122, 101, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, - 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 79, 112, 116, 105, 109, 105, 122, 101, 83, 112, 101, 101, 100, 34, 44, 32, 32, - 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 82, 101, 108, 97, 116, 105, 118, 101, 76, 105, 110, 107, -115, 34, 44, 10, 34, 82, 101, 108, 101, 97, 115, 101, 82, 117, 110, 116, 105, 109, 101, 34, 44, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, - 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 83, 104, 97, 100, 111, 119, 101, 100, 86, 97, 114, 105, 97, 98, 108, 101, 115, 34, 44, 10, 34, 83, -116, 97, 116, 105, 99, 82, 117, 110, 116, 105, 109, 101, 34, 44, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, - 69, 68, 10, 34, 83, 121, 109, 98, 111, 108, 115, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, - 82, 69, 67, 65, 84, 69, 68, 10, 34, 85, 110, 100, 101, 102, 105, 110, 101, 100, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 115, 34, 44, 10, - 34, 87, 105, 110, 77, 97, 105, 110, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, - 65, 84, 69, 68, 10, 34, 87, 80, 70, 34, 44, 10, 34, 67, 43, 43, 49, 49, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 67, 43, 43, 49, 52, 34, 44, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 67, 57, 48, 34, 44, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, 34, 67, 57, 57, 34, - 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, 65, 84, 69, 68, 10, - 34, 67, 49, 49, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 68, 69, 80, 82, 69, 67, - 65, 84, 69, 68, 10, 125, 44, 10, 97, 108, 105, 97, 115, 101, 115, 32, 61, 32, 123, 10, 70, 97, 116, 97, 108, 87, 97, 114, 110, 105, 110, 103, -115, 32, 61, 32, 123, 32, 34, 70, 97, 116, 97, 108, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 34, 70, 97, 116, 97, 108, 67, 111, 109, -112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 34, 70, 97, 116, 97, 108, 76, 105, 110, 107, 87, 97, 114, 110, 105, 110, 103, -115, 34, 32, 125, 44, 10, 79, 112, 116, 105, 109, 105, 115, 101, 32, 61, 32, 39, 79, 112, 116, 105, 109, 105, 122, 101, 39, 44, 10, 79, 112, 116, -105, 109, 105, 115, 101, 83, 105, 122, 101, 32, 61, 32, 39, 79, 112, 116, 105, 109, 105, 122, 101, 83, 105, 122, 101, 39, 44, 10, 79, 112, 116, 105, -109, 105, 115, 101, 83, 112, 101, 101, 100, 32, 61, 32, 39, 79, 112, 116, 105, 109, 105, 122, 101, 83, 112, 101, 101, 100, 39, 44, 10, 125, 44, 10, -125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 108, 111, 97, 116, 105, 110, -103, 112, 111, 105, 110, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, - 34, 44, 10, 34, 70, 97, 115, 116, 34, 44, 10, 34, 83, 116, 114, 105, 99, 116, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, -105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 101, 120, 99, -101, 112, 116, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 105, 110, 108, 105, 110, 105, 110, 103, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, - 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 68, 105, 115, 97, 98, 108, 101, 100, 34, 44, 10, 34, 69, 120, 112, 108, 105, 99, 105, 116, - 34, 44, 10, 34, 65, 117, 116, 111, 34, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, -101, 32, 61, 32, 34, 99, 97, 108, 108, 105, 110, 103, 99, 111, 110, 118, 101, 110, 116, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, -119, 101, 100, 32, 61, 32, 123, 10, 34, 67, 100, 101, 99, 108, 34, 44, 10, 34, 70, 97, 115, 116, 67, 97, 108, 108, 34, 44, 10, 34, 83, 116, -100, 67, 97, 108, 108, 34, 44, 10, 34, 86, 101, 99, 116, 111, 114, 67, 97, 108, 108, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, -103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, -109, 105, 120, 101, 100, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, -105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 111, 114, 99, 101, 117, 115, 105, 110, 103, 115, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 102, 105, 108, -101, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 112, 117, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, - 10, 34, 83, 111, 102, 116, 119, 97, 114, 101, 34, 44, 10, 34, 72, 97, 114, 100, 119, 97, 114, 101, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, - 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, -111, 114, 107, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, -115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 101, 110, 97, 98, 108, 101, 100, 101, 102, 97, 117, 108, 116, 99, 111, 109, 112, 105, 108, 101, 105, 116, 101, 109, 115, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, - 44, 10, 100, 101, 102, 97, 117, 108, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 115, 118, 101, 114, 115, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, - 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, -114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 103, 99, 99, 112, 114, 101, 102, 105, 120, 34, 44, 10, 115, - 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, - 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, -123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 103, 110, 111, 114, 101, 100, 101, 102, 97, 117, 108, 116, 108, 105, 98, 114, 97, 114, 105, 101, 115, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, -116, 58, 109, 105, 120, 101, 100, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, -101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 99, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 102, 105, 108, 101, 34, 44, 10, 116, 111, 107, 101, 110, -115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 105, 109, 97, 103, 101, 111, 112, 116, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, - 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 105, 109, 97, 103, 101, 112, 97, 116, 104, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, - 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 109, 112, 108, 105, 98, 100, 105, 114, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, -104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 109, 112, 108, 105, 98, 101, 120, 116, 101, 110, 115, 105, 111, 110, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, - 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 109, 112, 108, 105, 98, 110, 97, 109, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, - 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, - 34, 105, 109, 112, 108, 105, 98, 112, 114, 101, 102, 105, 120, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 109, 112, 108, 105, - 98, 115, 117, 102, 102, 105, 120, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, -116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, -112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 110, 116, 114, 105, 110, 115, 105, 99, 115, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, -108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, -105, 110, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 34, 108, 105, 115, 116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 107, 105, 110, 100, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, -105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 10, - 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 10, 34, 78, 111, 110, 101, 34, 44, 10, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, - 10, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 10, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 10, 34, 85, 116, -105, 108, 105, 116, 121, 34, 44, 10, 34, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, -114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, -114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, 83, 88, 66, 117, 110, 100, 108, 101, 34, 44, 10, - 34, 79, 83, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 10, 34, 88, 67, 84, 101, 115, 116, 34, 44, 10, 125, 44, 10, 125, 10, 97, -112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 108, 97, 110, 103, 117, 97, 103, 101, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, -110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 67, 34, 44, 10, 34, 67, 43, 43, 34, 44, 10, 34, 67, 35, - 34, 44, 10, 34, 70, 35, 34, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 99, 100, 105, 97, 108, 101, 99, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, -102, 97, 117, 108, 116, 34, 44, 10, 34, 67, 56, 57, 34, 44, 10, 34, 67, 57, 48, 34, 44, 10, 34, 67, 57, 57, 34, 44, 10, 34, 67, 49, - 49, 34, 44, 10, 34, 103, 110, 117, 56, 57, 34, 44, 10, 34, 103, 110, 117, 57, 48, 34, 44, 10, 34, 103, 110, 117, 57, 57, 34, 44, 10, 34, -103, 110, 117, 49, 49, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 44, 10, 34, 67, 43, 43, 57, 56, 34, 44, 10, - 34, 67, 43, 43, 48, 120, 34, 44, 10, 34, 67, 43, 43, 49, 49, 34, 44, 10, 34, 67, 43, 43, 49, 121, 34, 44, 10, 34, 67, 43, 43, 49, - 52, 34, 44, 10, 34, 67, 43, 43, 49, 122, 34, 44, 10, 34, 67, 43, 43, 49, 55, 34, 44, 10, 34, 103, 110, 117, 43, 43, 57, 56, 34, 44, - 10, 34, 103, 110, 117, 43, 43, 48, 120, 34, 44, 10, 34, 103, 110, 117, 43, 43, 49, 49, 34, 44, 10, 34, 103, 110, 117, 43, 43, 49, 121, 34, - 44, 10, 34, 103, 110, 117, 43, 43, 49, 52, 34, 44, 10, 34, 103, 110, 117, 43, 43, 49, 122, 34, 44, 10, 34, 103, 110, 117, 43, 43, 49, 55, - 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 108, 105, - 98, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, - 32, 34, 108, 105, 115, 116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 114, 97, 109, 101, -119, 111, 114, 107, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 108, 105, -110, 107, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, -101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, - 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, - 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 108, 105, 110, 107, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, -105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 109, 105, 120, 101, 100, 34, 44, 10, 116, 111, 107, 101, 110, 115, - 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 108, 105, 110, 107, 103, 114, 111, 117, 112, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, -102, 102, 34, 44, 10, 34, 79, 110, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 108, 111, 99, 97, 108, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 102, 97, 108, 115, 101, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 108, 111, 99, 97, 116, -105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 123, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 32, 34, 114, 117, 108, 101, - 34, 32, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 109, 97, 107, 101, -115, 101, 116, 116, 105, 110, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 110, 97, 109, 101, 115, -112, 97, 99, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, - 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, -114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, 114, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, -103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 79, 110, 34, 44, - 10, 34, 79, 102, 102, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 110, 117, 103, 101, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 110, 117, 103, 101, 116, -115, 111, 117, 114, 99, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 111, 98, 106, 100, 105, 114, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, -111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 111, 112, 116, 105, 109, 105, 122, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, - 10, 34, 79, 102, 102, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 68, 101, 98, 117, 103, 34, 44, 10, 34, 83, 105, 122, 101, 34, 44, 10, 34, - 83, 112, 101, 101, 100, 34, 44, 10, 34, 70, 117, 108, 108, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 44, 10, 116, -111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 114, 117, 110, 116, 105, 109, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, - 34, 68, 101, 98, 117, 103, 34, 44, 10, 34, 82, 101, 108, 101, 97, 115, 101, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 99, 104, 104, 101, 97, 100, 101, 114, 34, 44, 10, 115, 99, 111, 112, 101, - 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, -107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 112, 99, 104, 115, 111, 117, 114, 99, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 105, 99, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, -103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, 102, 102, 34, 44, 10, 34, 79, 110, 34, 44, 10, 125, 10, 125, - 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 108, 97, 116, 102, 111, 114, 109, -115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, -105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, - 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, - 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, - 44, 10, 97, 108, 108, 111, 119, 68, 117, 112, 108, 105, 99, 97, 116, 101, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, -114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 111, 115, 116, 98, 117, 105, 108, 100, 109, 101, 115, 115, - 97, 103, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, -115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, - 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 112, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, -110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, -101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 97, 108, 108, -111, 119, 68, 117, 112, 108, 105, 99, 97, 116, 101, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, -116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 114, 101, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, - 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 114, 101, 108, -105, 110, 107, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 114, 101, 108, 105, 110, 107, 109, 101, 115, 115, 97, 103, 101, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, - 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 114, 111, 112, -101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 114, 117, 108, 101, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 116, 97, 98, 108, 101, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, -115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, - 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 114, 101, 115, 100, 101, 102, 105, 110, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, -116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 114, -101, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, -115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, - 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, -114, 101, 115, 111, 117, 114, 99, 101, 103, 101, 110, 101, 114, 97, 116, 111, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, -106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, - 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 105, 110, 116, 101, 114, 110, 97, -108, 34, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 10, 32, 32, 32, 32, 32, 32, 32, - 32, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 114, 116, 116, 105, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, -105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 79, 110, - 34, 44, 10, 34, 79, 102, 102, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 114, 117, 108, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, -105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 116, 97, 114, 116, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 115, - 99, 111, 112, 101, 32, 61, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, -110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, -101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 34, 44, 10, 115, 99, 111, -112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, - 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 79, 102, -102, 34, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 116, -114, 105, 99, 116, 97, 108, 105, 97, 115, 105, 110, 103, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, -102, 102, 34, 44, 10, 34, 76, 101, 118, 101, 108, 49, 34, 44, 10, 34, 76, 101, 118, 101, 108, 50, 34, 44, 10, 34, 76, 101, 118, 101, 108, 51, - 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 116, -114, 105, 110, 103, 112, 111, 111, 108, 105, 110, 103, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, -123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 121, 109, 98, 111, 108, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, - 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 79, 102, 102, 34, 44, 10, 34, 70, 97, 115, 116, - 76, 105, 110, 107, 34, 44, 32, 32, 32, 32, 45, 45, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 53, 43, - 32, 111, 110, 108, 121, 44, 32, 99, 111, 110, 115, 105, 100, 101, 114, 101, 100, 32, 39, 79, 110, 39, 32, 102, 111, 114, 32, 97, 108, 108, 32, 111, -116, 104, 101, 114, 32, 99, 97, 115, 101, 115, 46, 10, 34, 70, 117, 108, 108, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 86, 105, -115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 55, 43, 32, 111, 110, 108, 121, 44, 32, 99, 111, 110, 115, 105, 100, 101, 114, -101, 100, 32, 39, 79, 110, 39, 32, 102, 111, 114, 32, 97, 108, 108, 32, 111, 116, 104, 101, 114, 32, 99, 97, 115, 101, 115, 46, 10, 125, 44, 10, -125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 121, 109, 98, 111, 108, 115, -112, 97, 116, 104, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, - 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, -105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, -100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, - 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 121, 115, 108, 105, 98, 100, 105, 114, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, -100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, - 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 10, 115, 99, 111, -112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, - 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 97, 105, 120, 34, 44, 10, 34, 98, 115, 100, 34, 44, 10, 34, 104, 97, 105, 107, 117, - 34, 44, 10, 34, 105, 111, 115, 34, 44, 10, 34, 108, 105, 110, 117, 120, 34, 44, 10, 34, 109, 97, 99, 111, 115, 120, 34, 44, 10, 34, 115, 111, -108, 97, 114, 105, 115, 34, 44, 10, 34, 119, 105, 105, 34, 44, 10, 34, 119, 105, 110, 100, 111, 119, 115, 34, 44, 10, 125, 44, 10, 125, 10, 97, -112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, -105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, -115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 116, 97, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, -123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 97, 105, 108, 99, 97, 108, 108, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 114, -101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 97, 114, 103, 101, 116, 100, 105, 114, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, -111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, -110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, - 32, 61, 32, 34, 116, 97, 114, 103, 101, 116, 110, 97, 109, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 97, 114, 103, -101, 116, 112, 114, 101, 102, 105, 120, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, -112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 97, 114, 103, 101, 116, 115, 117, 102, 102, -105, 120, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, -116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, -105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 111, 111, 108, 115, 101, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, - 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, -111, 119, 101, 100, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, - 97, 108, 117, 101, 58, 108, 111, 119, 101, 114, 40, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 44, 32, 118, 101, 114, 115, 105, 111, 110, - 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 99, 97, 110, 111, 110, 105, 99, 97, 108, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, -111, 111, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 116, 111, 111, 108, 115, 46, 110, 111, 114, 109, 97, 108, 105, 122, -101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, - 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 117, 115, 116, 111, -109, 116, 111, 111, 108, 110, 97, 109, 101, 115, 112, 97, 99, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, -101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 117, 110, 100, 101, 102, 105, 110, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, - 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 117, 115, 105, 110, 103, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, -110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, -116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, -110, 97, 109, 101, 32, 61, 32, 34, 117, 117, 105, 100, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 111, 107, 32, 61, 32, 116, 114, 117, 101, 10, 105, 102, 32, - 40, 35, 118, 97, 108, 117, 101, 32, 126, 61, 32, 51, 54, 41, 32, 116, 104, 101, 110, 32, 111, 107, 32, 61, 32, 102, 97, 108, 115, 101, 32, 101, -110, 100, 10, 102, 111, 114, 32, 105, 61, 49, 44, 51, 54, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 104, 32, 61, 32, 118, 97, 108, 117, -101, 58, 115, 117, 98, 40, 105, 44, 105, 41, 10, 105, 102, 32, 40, 110, 111, 116, 32, 99, 104, 58, 102, 105, 110, 100, 40, 34, 91, 65, 66, 67, - 68, 69, 70, 97, 98, 99, 100, 101, 102, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 93, 34, 41, 41, 32, 116, 104, 101, 110, 32, 111, 107, - 32, 61, 32, 102, 97, 108, 115, 101, 32, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 58, 115, 117, 98, 40, 57, - 44, 57, 41, 32, 126, 61, 32, 34, 45, 34, 41, 32, 32, 32, 116, 104, 101, 110, 32, 111, 107, 32, 61, 32, 102, 97, 108, 115, 101, 32, 101, 110, -100, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 58, 115, 117, 98, 40, 49, 52, 44, 49, 52, 41, 32, 126, 61, 32, 34, 45, 34, 41, 32, 116, -104, 101, 110, 32, 111, 107, 32, 61, 32, 102, 97, 108, 115, 101, 32, 101, 110, 100, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 58, 115, 117, 98, - 40, 49, 57, 44, 49, 57, 41, 32, 126, 61, 32, 34, 45, 34, 41, 32, 116, 104, 101, 110, 32, 111, 107, 32, 61, 32, 102, 97, 108, 115, 101, 32, -101, 110, 100, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 58, 115, 117, 98, 40, 50, 52, 44, 50, 52, 41, 32, 126, 61, 32, 34, 45, 34, 41, - 32, 116, 104, 101, 110, 32, 111, 107, 32, 61, 32, 102, 97, 108, 115, 101, 32, 101, 110, 100, 10, 105, 102, 32, 40, 110, 111, 116, 32, 111, 107, 41, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 34, 105, 110, 118, 97, 108, 105, 100, 32, 85, 85, 73, 68, 34, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 58, 117, 112, 112, 101, 114, 40, 41, 10, 101, 110, 100, 10, 125, 10, - 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 118, 101, 99, 116, 111, 114, 101, 120, 116, -101, 110, 115, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, -116, 34, 44, 10, 34, 65, 86, 88, 34, 44, 10, 34, 65, 86, 88, 50, 34, 44, 10, 34, 73, 65, 51, 50, 34, 44, 10, 34, 83, 83, 69, 34, - 44, 10, 34, 83, 83, 69, 50, 34, 44, 10, 34, 83, 83, 69, 51, 34, 44, 10, 34, 83, 83, 83, 69, 51, 34, 44, 10, 34, 83, 83, 69, 52, - 46, 49, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, -105, 115, 97, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, - 61, 32, 123, 10, 34, 77, 79, 86, 66, 69, 34, 44, 10, 34, 80, 79, 80, 67, 78, 84, 34, 44, 10, 34, 80, 67, 76, 77, 85, 76, 34, 44, - 10, 34, 76, 90, 67, 78, 84, 34, 44, 10, 34, 66, 77, 73, 34, 44, 10, 34, 66, 77, 73, 50, 34, 44, 10, 34, 70, 49, 54, 67, 34, 44, - 10, 34, 65, 69, 83, 34, 44, 10, 34, 70, 77, 65, 34, 44, 10, 34, 70, 77, 65, 52, 34, 44, 10, 34, 82, 68, 82, 78, 68, 34, 44, 10, -125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 118, 112, 97, 116, 104, -115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, -105, 115, 116, 58, 107, 101, 121, 101, 100, 58, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 119, 97, 114, 110, 105, 110, 103, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, - 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, -111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 79, 102, 102, 34, 44, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 72, 105, 103, 104, - 34, 44, 10, 34, 69, 120, 116, 114, 97, 34, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 108, 97, 114, 103, 101, 97, 100, 100, 114, 101, 115, 115, 97, 119, 97, 114, 101, 34, 44, 10, 115, 99, 111, 112, 101, - 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 44, 10, 125, - 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 101, 100, 105, 116, 111, 114, 105, 110, -116, 101, 103, 114, 97, 116, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, - 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 112, 114, 101, 102, 101, 114, 114, 101, 100, 116, 111, 111, 108, 97, 114, 99, 104, 105, 116, 101, - 99, 116, 117, 114, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, -108, 116, 34, 44, 10, 112, 46, 88, 56, 54, 44, 10, 112, 46, 88, 56, 54, 95, 54, 52, 44, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, -103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, -110, 34, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, -116, 114, 117, 99, 116, 109, 101, 109, 98, 101, 114, 97, 108, 105, 103, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, -105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 105, 110, 116, 101, 103, 101, 114, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, - 32, 123, 10, 34, 49, 34, 44, 10, 34, 50, 34, 44, 10, 34, 52, 34, 44, 10, 34, 56, 34, 44, 10, 34, 49, 54, 34, 44, 10, 125, 10, 125, - 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 111, 109, 105, 116, 102, 114, 97, 109, -101, 112, 111, 105, 110, 116, 101, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, -108, 116, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 79, 102, 102, 34, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 118, 105, 115, 105, 98, 105, 108, 105, 116, 121, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, -119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 72, 105, 100, 100, 101, 110, 34, 44, 10, 34, 73, 110, -116, 101, 114, 110, 97, 108, 34, 44, 10, 34, 80, 114, 111, 116, 101, 99, 116, 101, 100, 34, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, -105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 110, 108, 105, 110, 101, 115, 118, 105, 115, 105, 98, 105, 108, 105, 116, -121, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, -114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 72, -105, 100, 100, 101, 110, 34, 10, 125, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 97, 115, 115, 101, 109, 98, 108, 121, 100, 101, 98, 117, 103, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 32, 61, 32, 34, 98, 111, 111, 108, 101, 97, 110, 34, 10, 125, 10, 97, 112, 105, 46, 97, 108, 105, 97, -115, 40, 34, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 32, 34, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, -115, 34, 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, 115, 40, 34, 98, 117, 105, 108, 100, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, - 34, 44, 32, 34, 98, 117, 105, 108, 100, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, -115, 40, 34, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 34, 44, 32, 34, 98, 117, 105, 108, 100, 77, 101, 115, 115, 97, 103, 101, 34, - 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, 115, 40, 34, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 34, 44, 32, 34, 98, 117, 105, -108, 100, 79, 117, 116, 112, 117, 116, 115, 34, 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, 115, 40, 34, 99, 108, 101, 97, 110, 101, 120, 116, 101, -110, 115, 105, 111, 110, 115, 34, 44, 32, 34, 99, 108, 101, 97, 110, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 34, 41, 10, 97, 112, 105, 46, - 97, 108, 105, 97, 115, 40, 34, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 32, 34, 102, 114, 97, 109, 101, 119, -111, 114, 107, 34, 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, 115, 40, 34, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, 110, 117, 101, - 34, 44, 32, 34, 101, 100, 105, 116, 65, 110, 100, 67, 111, 110, 116, 105, 110, 117, 101, 34, 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, 115, 40, - 34, 102, 105, 108, 101, 101, 120, 116, 101, 110, 115, 105, 111, 110, 34, 44, 32, 34, 102, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 34, - 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, 115, 40, 34, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 34, - 44, 32, 34, 112, 114, 111, 112, 101, 114, 116, 121, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 34, 41, 10, 97, 112, 105, 46, 97, 108, 105, 97, -115, 40, 34, 114, 101, 109, 111, 118, 101, 102, 105, 108, 101, 115, 34, 44, 32, 34, 101, 120, 99, 108, 117, 100, 101, 115, 34, 41, 10, 97, 112, 105, - 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 70, 105, 101, 108, 100, 40, 34, 98, 117, 105, 108, 100, 114, 117, 108, 101, 34, 44, 32, 39, 85, 115, -101, 32, 96, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 96, 44, 32, 96, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, - 96, 44, 32, 97, 110, 100, 32, 96, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 46, 100, 101, 115, 99, 114, 105, -112, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 40, 118, 97, 108, 117, 101, 46, 100, 101, -115, 99, 114, 105, 112, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 40, 118, 97, 108, -117, 101, 46, 99, 111, 109, 109, 97, 110, 100, 115, 41, 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 40, 118, 97, 108, 117, 101, 46, -111, 117, 116, 112, 117, 116, 115, 41, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, - 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 67, 111, 109, 112, 111, 110, 101, 110, 116, 34, 44, 32, 39, 85, 115, 101, 32, 96, 98, 117, 105, -108, 100, 97, 99, 116, 105, 111, 110, 32, 34, 67, 111, 109, 112, 111, 110, 101, 110, 116, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 98, 117, 105, 108, 100, 97, 99, 116, 105, 111, 110, 32, 34, 67, 111, -109, 112, 111, 110, 101, 110, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, - 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 69, 110, 97, 98, 108, 101, 83, 83, 69, 34, 44, 32, 39, 85, 115, 101, 32, 96, 118, 101, 99, -116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 34, 83, 83, 69, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, -102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, - 40, 34, 83, 83, 69, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 118, 101, 99, -116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, - 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 69, 110, 97, 98, 108, 101, - 83, 83, 69, 50, 34, 44, 32, 39, 85, 115, 101, 32, 96, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 34, 83, - 83, 69, 50, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, - 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 40, 34, 83, 83, 69, 50, 34, 41, 10, 101, 110, 100, 44, 10, 102, -117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, - 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, -101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 70, 108, 111, 97, 116, 70, 97, 115, 116, 34, 44, 32, 39, 85, 115, 101, 32, 96, 102, 108, -111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 34, 70, 97, 115, 116, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, -117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 40, 34, 70, 97, -115, 116, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 102, 108, 111, 97, 116, 105, -110, 103, 112, 111, 105, 110, 116, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, - 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 70, 108, 111, 97, 116, 83, 116, 114, 105, 99, 116, 34, - 44, 32, 39, 85, 115, 101, 32, 96, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 34, 83, 116, 114, 105, 99, 116, 34, 96, 32, -105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 102, 108, 111, 97, 116, -105, 110, 103, 112, 111, 105, 110, 116, 40, 34, 83, 116, 114, 105, 99, 116, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 118, 97, 108, 117, 101, 41, 10, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, -101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, - 32, 34, 78, 97, 116, 105, 118, 101, 87, 67, 104, 97, 114, 34, 44, 32, 39, 85, 115, 101, 32, 96, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, -114, 32, 34, 79, 110, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 34, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, -117, 101, 41, 10, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, 114, 40, 34, 79, 110, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, -105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, 114, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, - 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, - 44, 32, 34, 78, 111, 78, 97, 116, 105, 118, 101, 87, 67, 104, 97, 114, 34, 44, 32, 39, 85, 115, 101, 32, 96, 110, 97, 116, 105, 118, 101, 119, - 99, 104, 97, 114, 32, 34, 79, 102, 102, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 34, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 118, 97, 108, 117, 101, 41, 10, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, 114, 40, 34, 79, 102, 102, 34, 41, 10, 101, 110, 100, 44, 10, -102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, 114, 32, 34, 68, 101, 102, - 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, -108, 97, 103, 115, 34, 44, 32, 34, 79, 112, 116, 105, 109, 105, 122, 101, 34, 44, 32, 39, 85, 115, 101, 32, 96, 111, 112, 116, 105, 109, 105, 122, -101, 32, 34, 79, 110, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, -101, 41, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 40, 34, 79, 110, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 118, 97, 108, 117, 101, 41, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 34, 79, 102, 102, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, -100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 79, 112, 116, 105, 109, 105, 122, -101, 83, 105, 122, 101, 34, 44, 32, 39, 85, 115, 101, 32, 96, 111, 112, 116, 105, 109, 105, 122, 101, 32, 34, 83, 105, 122, 101, 34, 96, 32, 105, -110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 111, 112, 116, 105, 109, 105, -122, 101, 32, 40, 34, 83, 105, 122, 101, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, - 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 34, 79, 102, 102, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, -116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 79, 112, 116, 105, 109, 105, 122, 101, 83, 112, 101, 101, 100, 34, - 44, 32, 39, 85, 115, 101, 32, 96, 111, 112, 116, 105, 109, 105, 122, 101, 32, 34, 83, 112, 101, 101, 100, 34, 96, 32, 105, 110, 115, 116, 101, 97, -100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 111, 112, 116, 105, 109, 105, 122, 101, 32, 40, 34, - 83, 112, 101, 101, 100, 34, 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 111, 112, 116, -105, 109, 105, 122, 101, 32, 34, 79, 102, 102, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, -108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 82, 101, 108, 101, 97, 115, 101, 82, 117, 110, 116, 105, 109, 101, 34, 44, 32, 39, - 85, 115, 101, 32, 96, 114, 117, 110, 116, 105, 109, 101, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, - 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 114, 117, 110, 116, 105, 109, 101, 32, 34, 82, 101, 108, 101, - 97, 115, 101, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 41, 10, 97, -112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 69, 120, 116, 114, - 97, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 39, 85, 115, 101, 32, 96, 119, 97, 114, 110, 105, 110, 103, 115, 32, 34, 69, 120, 116, 114, - 97, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 119, - 97, 114, 110, 105, 110, 103, 115, 32, 34, 69, 120, 116, 114, 97, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, -108, 117, 101, 41, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, - 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 78, 111, 87, 97, 114, 110, -105, 110, 103, 115, 34, 44, 32, 39, 85, 115, 101, 32, 96, 119, 97, 114, 110, 105, 110, 103, 115, 32, 34, 79, 102, 102, 34, 96, 32, 105, 110, 115, -116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 119, 97, 114, 110, 105, 110, 103, 115, - 32, 34, 79, 102, 102, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 119, 97, 114, 110, -105, 110, 103, 115, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, -101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 77, 97, 110, 97, 103, 101, 100, 34, 44, 32, 39, 85, 115, 101, 32, - 96, 99, 108, 114, 32, 34, 79, 110, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, - 97, 108, 117, 101, 41, 10, 99, 108, 114, 32, 34, 79, 110, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, -117, 101, 41, 10, 99, 108, 114, 32, 34, 79, 102, 102, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, - 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 78, 111, 69, 100, 105, 116, 65, 110, 100, 67, 111, 110, 116, 105, 110, 117, -101, 34, 44, 32, 39, 85, 115, 101, 32, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, 110, 117, 101, 32, 34, 79, 102, 102, 34, 96, 32, -105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 101, 100, 105, 116, 97, -110, 100, 99, 111, 110, 116, 105, 110, 117, 101, 32, 34, 79, 102, 102, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, - 97, 108, 117, 101, 41, 10, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, 110, 117, 101, 32, 34, 79, 110, 34, 10, 101, 110, 100, 41, 10, - 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 83, 121, 109, - 98, 111, 108, 115, 34, 44, 32, 39, 85, 115, 101, 32, 96, 115, 121, 109, 98, 111, 108, 115, 32, 34, 79, 110, 34, 96, 32, 105, 110, 115, 116, 101, - 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 115, 121, 109, 98, 111, 108, 115, 32, 34, 79, 110, - 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 115, 121, 109, 98, 111, 108, 115, 32, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, - 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 67, 43, 43, 49, 49, 34, 44, 32, 39, 85, 115, 101, 32, 96, 99, 112, 112, 100, 105, 97, 108, -101, 99, 116, 32, 34, 67, 43, 43, 49, 49, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, -118, 97, 108, 117, 101, 41, 10, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 34, 67, 43, 43, 49, 49, 34, 10, 101, 110, 100, 44, 10, 102, -117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 34, 68, 101, 102, 97, 117, -108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, -103, 115, 34, 44, 32, 34, 67, 43, 43, 49, 52, 34, 44, 32, 39, 85, 115, 101, 32, 96, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 34, - 67, 43, 43, 49, 52, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, - 41, 10, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 34, 67, 43, 43, 49, 52, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, -111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, -110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, - 34, 67, 57, 48, 34, 44, 32, 32, 32, 39, 85, 115, 101, 32, 96, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, 103, 110, 117, 57, 48, 34, 96, - 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 99, 100, 105, 97, 108, -101, 99, 116, 32, 34, 103, 110, 117, 57, 48, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, - 10, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, -114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 67, 57, 57, 34, 44, 32, 32, 32, 39, 85, -115, 101, 32, 96, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, 103, 110, 117, 57, 57, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, -102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, 103, 110, 117, 57, 57, 34, - 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, - 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 67, 49, 49, 34, 44, 32, 32, 32, 39, 85, 115, 101, 32, 96, 99, 100, 105, 97, 108, 101, 99, -116, 32, 34, 103, 110, 117, 49, 49, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, -108, 117, 101, 41, 10, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, 103, 110, 117, 49, 49, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, -105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 99, 100, 105, 97, 108, 101, 99, 116, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 101, 110, -100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, - 87, 105, 110, 77, 97, 105, 110, 34, 44, 32, 39, 85, 115, 101, 32, 96, 101, 110, 116, 114, 121, 112, 111, 105, 110, 116, 32, 34, 87, 105, 110, 77, - 97, 105, 110, 67, 82, 84, 83, 116, 97, 114, 116, 117, 112, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, -111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 116, 114, 121, 112, 111, 105, 110, 116, 32, 34, 87, 105, 110, 77, 97, 105, 110, 67, 82, 84, - 83, 116, 97, 114, 116, 117, 112, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, -116, 114, 121, 112, 111, 105, 110, 116, 32, 34, 109, 97, 105, 110, 67, 82, 84, 83, 116, 97, 114, 116, 117, 112, 34, 10, 101, 110, 100, 41, 10, 97, -112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 34, 83, 116, 97, 116, -105, 99, 82, 117, 110, 116, 105, 109, 101, 34, 44, 32, 39, 85, 115, 101, 32, 96, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, - 34, 79, 110, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, -115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 34, 79, 110, 34, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 118, 97, 108, 117, 101, 41, 10, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, -101, 110, 100, 41, 10, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 86, 97, 108, 117, 101, 40, 34, 102, 108, 97, 103, 115, 34, 44, - 32, 34, 78, 111, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, 114, 34, 44, 32, 39, 85, 115, 101, 32, 96, 111, 109, 105, 116, 102, 114, 97, -109, 101, 112, 111, 105, 110, 116, 101, 114, 32, 34, 79, 110, 34, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, -105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 111, 109, 105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 40, 34, 79, 110, 34, - 41, 10, 101, 110, 100, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 10, 111, 109, 105, 116, 102, 114, 97, 109, 101, -112, 111, 105, 110, 116, 101, 114, 40, 34, 68, 101, 102, 97, 117, 108, 116, 34, 41, 10, 101, 110, 100, 41, 10, 110, 101, 119, 111, 112, 116, 105, 111, -110, 10, 123, 10, 99, 97, 116, 101, 103, 111, 114, 121, 61, 32, 34, 99, 111, 109, 112, 105, 108, 101, 114, 115, 34, 44, 10, 116, 114, 105, 103, 103, -101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 99, 99, 34, 44, 10, 118, 97, 108, 117, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 86, 65, - 76, 85, 69, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 67, 104, 111, 111, 115, 101, 32, 97, 32, 67, 47, - 67, 43, 43, 32, 99, 111, 109, 112, 105, 108, 101, 114, 32, 115, 101, 116, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 123, - 32, 34, 99, 108, 97, 110, 103, 34, 44, 32, 34, 67, 108, 97, 110, 103, 32, 40, 99, 108, 97, 110, 103, 41, 34, 32, 125, 44, 10, 123, 32, 34, -103, 99, 99, 34, 44, 32, 34, 71, 78, 85, 32, 71, 67, 67, 32, 40, 103, 99, 99, 47, 103, 43, 43, 41, 34, 32, 125, 44, 10, 123, 32, 34, -109, 105, 110, 103, 119, 34, 44, 32, 34, 77, 105, 110, 71, 87, 32, 71, 67, 67, 32, 40, 103, 99, 99, 47, 103, 43, 43, 41, 34, 32, 125, 44, - 10, 125, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 99, 97, 116, 101, 103, 111, 114, 121, 61, 32, 34, 99, 111, 109, 112, -105, 108, 101, 114, 115, 34, 44, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 100, 111, 116, 110, 101, 116, 34, 44, 10, -118, 97, 108, 117, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 86, 65, 76, 85, 69, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, -111, 110, 32, 61, 32, 34, 67, 104, 111, 111, 115, 101, 32, 97, 32, 46, 78, 69, 84, 32, 99, 111, 109, 112, 105, 108, 101, 114, 32, 115, 101, 116, - 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 123, 32, 34, 109, 115, 110, 101, 116, 34, 44, 32, 32, 32, 34, 77, 105, 99, -114, 111, 115, 111, 102, 116, 32, 46, 78, 69, 84, 32, 40, 99, 115, 99, 41, 34, 32, 125, 44, 10, 123, 32, 34, 109, 111, 110, 111, 34, 44, 32, - 32, 32, 32, 34, 78, 111, 118, 101, 108, 108, 32, 77, 111, 110, 111, 32, 40, 109, 99, 115, 41, 34, 32, 32, 32, 32, 125, 44, 10, 123, 32, 34, -112, 110, 101, 116, 34, 44, 32, 32, 32, 32, 34, 80, 111, 114, 116, 97, 98, 108, 101, 46, 78, 69, 84, 32, 40, 99, 115, 99, 99, 41, 34, 32, - 32, 125, 44, 10, 125, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, - 61, 32, 34, 102, 97, 116, 97, 108, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 84, 114, 101, 97, 116, 32, -119, 97, 114, 110, 105, 110, 103, 115, 32, 102, 114, 111, 109, 32, 112, 114, 111, 106, 101, 99, 116, 32, 115, 99, 114, 105, 112, 116, 115, 32, 97, 115, - 32, 101, 114, 114, 111, 114, 115, 34, 10, 125, 10, 32, 32, 32, 32, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, -101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 100, 101, 98, 117, 103, 103, 101, 114, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, - 32, 61, 32, 34, 83, 116, 97, 114, 116, 32, 77, 111, 98, 68, 101, 98, 117, 103, 32, 114, 101, 109, 111, 116, 101, 32, 100, 101, 98, 117, 103, 103, -101, 114, 46, 32, 87, 111, 114, 107, 115, 32, 119, 105, 116, 104, 32, 90, 101, 114, 111, 66, 114, 97, 110, 101, 32, 83, 116, 117, 100, 105, 111, 34, - 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 102, 105, -108, 101, 34, 44, 10, 118, 97, 108, 117, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 70, 73, 76, 69, 34, 44, 10, 100, 101, 115, 99, 114, -105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 82, 101, 97, 100, 32, 70, 73, 76, 69, 32, 97, 115, 32, 97, 32, 80, 114, 101, 109, 97, 107, 101, - 32, 115, 99, 114, 105, 112, 116, 59, 32, 100, 101, 102, 97, 117, 108, 116, 32, 105, 115, 32, 39, 112, 114, 101, 109, 97, 107, 101, 53, 46, 108, 117, - 97, 39, 34, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, - 34, 104, 101, 108, 112, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 68, 105, 115, 112, 108, 97, 121, 32, 116, -104, 105, 115, 32, 105, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 34, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, -114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 118, 101, 114, 98, 111, 115, 101, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, -105, 111, 110, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 101, 120, 116, 114, 97, 32, 100, 101, 98, 117, 103, 32, 116, 101, 120, 116, - 32, 111, 117, 116, 112, 117, 116, 34, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 61, - 32, 34, 105, 110, 116, 101, 114, 97, 99, 116, 105, 118, 101, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 73, -110, 116, 101, 114, 97, 99, 116, 105, 118, 101, 32, 99, 111, 109, 109, 97, 110, 100, 32, 112, 114, 111, 109, 112, 116, 34, 10, 125, 10, 110, 101, 119, -111, 112, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 111, 115, 34, 44, 10, 118, 97, 108, -117, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 86, 65, 76, 85, 69, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, - 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 102, 105, 108, 101, 115, 32, 102, 111, 114, 32, 97, 32, 100, 105, 102, 102, 101, 114, 101, 110, -116, 32, 111, 112, 101, 114, 97, 116, 105, 110, 103, 32, 115, 121, 115, 116, 101, 109, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, - 10, 123, 32, 34, 97, 105, 120, 34, 44, 32, 32, 32, 32, 32, 32, 34, 73, 66, 77, 32, 65, 73, 88, 34, 32, 125, 44, 10, 123, 32, 34, 98, -115, 100, 34, 44, 32, 32, 32, 32, 32, 32, 34, 79, 112, 101, 110, 66, 83, 68, 44, 32, 78, 101, 116, 66, 83, 68, 44, 32, 111, 114, 32, 70, -114, 101, 101, 66, 83, 68, 34, 32, 125, 44, 10, 123, 32, 34, 104, 97, 105, 107, 117, 34, 44, 32, 32, 32, 32, 34, 72, 97, 105, 107, 117, 34, - 32, 125, 44, 10, 123, 32, 34, 104, 117, 114, 100, 34, 44, 32, 32, 32, 32, 32, 34, 71, 78, 85, 47, 72, 117, 114, 100, 34, 32, 125, 44, 10, -123, 32, 34, 105, 111, 115, 34, 44, 32, 32, 32, 32, 32, 32, 34, 105, 79, 83, 34, 32, 125, 44, 10, 123, 32, 34, 108, 105, 110, 117, 120, 34, - 44, 32, 32, 32, 32, 34, 76, 105, 110, 117, 120, 34, 32, 125, 44, 10, 123, 32, 34, 109, 97, 99, 111, 115, 120, 34, 44, 32, 32, 32, 34, 65, -112, 112, 108, 101, 32, 77, 97, 99, 32, 79, 83, 32, 88, 34, 32, 125, 44, 10, 123, 32, 34, 115, 111, 108, 97, 114, 105, 115, 34, 44, 32, 32, - 34, 83, 111, 108, 97, 114, 105, 115, 34, 32, 125, 44, 10, 123, 32, 34, 119, 105, 110, 100, 111, 119, 115, 34, 44, 32, 32, 34, 77, 105, 99, 114, -111, 115, 111, 102, 116, 32, 87, 105, 110, 100, 111, 119, 115, 34, 32, 125, 44, 10, 125, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, -123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 115, 99, 114, 105, 112, 116, 115, 34, 44, 10, 118, 97, 108, 117, 101, - 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 80, 65, 84, 72, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, - 83, 101, 97, 114, 99, 104, 32, 102, 111, 114, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 32, 115, 99, 114, 105, 112, 116, 115, 32, 111, 110, - 32, 116, 104, 101, 32, 103, 105, 118, 101, 110, 32, 112, 97, 116, 104, 34, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 10, 123, 10, 116, -114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 115, 121, 115, 116, 101, 109, 115, 99, 114, 105, 112, 116, 34, 44, 10, 118, 97, 108, -117, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 70, 73, 76, 69, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, - 32, 34, 79, 118, 101, 114, 114, 105, 100, 101, 32, 100, 101, 102, 97, 117, 108, 116, 32, 115, 121, 115, 116, 101, 109, 32, 115, 99, 114, 105, 112, 116, - 32, 40, 112, 114, 101, 109, 97, 107, 101, 53, 45, 115, 121, 115, 116, 101, 109, 46, 108, 117, 97, 41, 34, 10, 125, 10, 110, 101, 119, 111, 112, 116, -105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 118, 101, 114, 115, 105, 111, 110, 34, 44, 10, 100, -101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 68, 105, 115, 112, 108, 97, 121, 32, 118, 101, 114, 115, 105, 111, 110, 32, 105, 110, -102, 111, 114, 109, 97, 116, 105, 111, 110, 34, 10, 125, 10, 105, 102, 32, 104, 116, 116, 112, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, - 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 61, 32, 34, 105, 110, 115, 101, 99, 117, 114, 101, - 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 102, 111, 114, 102, 105, 116, 32, 83, 83, 72, 32, 99, 101, 114, -116, 105, 102, 105, 99, 97, 116, 105, 111, 110, 32, 99, 104, 101, 99, 107, 115, 46, 34, 10, 125, 10, 101, 110, 100, 10, 99, 104, 97, 114, 97, 99, -116, 101, 114, 115, 101, 116, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 99, 108, 114, 32, 34, 79, 102, 102, 34, 10, 101, 100, 105, 116, 111, -114, 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 32, 34, 79, 102, 102, 34, 10, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, -108, 105, 110, 103, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 114, 116, 116, 105, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 115, 121, -109, 98, 111, 108, 115, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 10, 110, 117, 103, 101, 116, 115, 111, 117, 114, 99, 101, 32, 34, 104, 116, 116, -112, 115, 58, 47, 47, 97, 112, 105, 46, 110, 117, 103, 101, 116, 46, 111, 114, 103, 47, 118, 51, 47, 105, 110, 100, 101, 120, 46, 106, 115, 111, 110, - 34, 10, 108, 97, 110, 103, 117, 97, 103, 101, 32, 34, 67, 43, 43, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 107, 105, 110, 100, 58, - 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, 108, 105, 98, 34, 10, -116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 115, 111, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, -107, 105, 110, 100, 58, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, -108, 105, 98, 34, 10, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 97, 34, 10, 102, 105, 108, 116, 101, 114, - 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, 58, 100, 97, 114, 119, 105, 110, 34, 44, 32, 34, 107, 105, 110, 100, 58, 87, 105, 110, 100, 111, 119, -101, 100, 65, 112, 112, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 97, 112, 112, 34, 10, -102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, 58, 100, 97, 114, 119, 105, 110, 34, 44, 32, 34, 107, 105, 110, 100, 58, - 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 100, -121, 108, 105, 98, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, 58, 100, 97, 114, 119, 105, 110, 34, 44, 32, - 34, 107, 105, 110, 100, 58, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, - 58, 79, 83, 88, 66, 117, 110, 100, 108, 101, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, 34, 10, 116, 97, -114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 98, 117, 110, 100, 108, 101, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, - 32, 34, 115, 121, 115, 116, 101, 109, 58, 100, 97, 114, 119, 105, 110, 34, 44, 32, 34, 107, 105, 110, 100, 58, 83, 104, 97, 114, 101, 100, 76, 105, - 98, 34, 44, 32, 34, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 58, 79, 83, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 34, - 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, 34, 10, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, -111, 110, 32, 34, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, - 58, 100, 97, 114, 119, 105, 110, 34, 44, 32, 34, 107, 105, 110, 100, 58, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 115, 104, 97, -114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 58, 88, 67, 84, 101, 115, 116, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, -120, 32, 34, 34, 10, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 120, 99, 116, 101, 115, 116, 34, 10, 102, -105, 108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, 58, 87, 105, 110, 100, 111, 119, 115, 32, 111, 114, 32, 108, 97, 110, 103, 117, - 97, 103, 101, 58, 67, 35, 32, 111, 114, 32, 108, 97, 110, 103, 117, 97, 103, 101, 58, 70, 35, 34, 44, 32, 34, 107, 105, 110, 100, 58, 67, 111, -110, 115, 111, 108, 101, 65, 112, 112, 32, 111, 114, 32, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 32, 125, 10, 116, 97, 114, 103, 101, -116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 101, 120, 101, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, -101, 109, 58, 87, 105, 110, 100, 111, 119, 115, 34, 44, 32, 34, 107, 105, 110, 100, 58, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 125, 10, -116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, 34, 10, 116, 97, 114, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, - 34, 46, 100, 108, 108, 34, 10, 105, 109, 112, 108, 105, 98, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 108, 105, 98, 34, 10, 102, 105, -108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, 58, 87, 105, 110, 100, 111, 119, 115, 34, 44, 32, 34, 107, 105, 110, 100, 58, 83, -116, 97, 116, 105, 99, 76, 105, 98, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, 34, 10, 116, 97, 114, 103, -101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 108, 105, 98, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 108, 97, 110, -103, 117, 97, 103, 101, 58, 67, 35, 32, 111, 114, 32, 108, 97, 110, 103, 117, 97, 103, 101, 58, 70, 35, 34, 44, 32, 34, 107, 105, 110, 100, 58, - 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 125, 10, 116, 97, 114, 103, 101, 116, 112, 114, 101, 102, 105, 120, 32, 34, 34, 10, 116, 97, 114, -103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 100, 108, 108, 34, 10, 105, 109, 112, 108, 105, 98, 101, 120, 116, 101, 110, 115, -105, 111, 110, 32, 34, 46, 100, 108, 108, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 107, 105, 110, 100, 58, 83, 104, 97, 114, 101, 100, - 76, 105, 98, 34, 44, 32, 34, 115, 121, 115, 116, 101, 109, 58, 110, 111, 116, 32, 87, 105, 110, 100, 111, 119, 115, 34, 32, 125, 10, 112, 105, 99, - 32, 34, 79, 110, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 115, 121, 115, 116, 101, 109, 58, 100, 97, 114, 119, 105, 110, 34, 32, 125, - 10, 116, 111, 111, 108, 115, 101, 116, 32, 34, 99, 108, 97, 110, 103, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 32, 34, 112, 108, 97, 116, 102, -111, 114, 109, 115, 58, 87, 105, 110, 54, 52, 34, 32, 125, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 34, 120, 56, 54, 95, - 54, 52, 34, 10, 102, 105, 108, 116, 101, 114, 32, 123, 125, 10, }; - -// xcode/_preload.lua -static const unsigned char builtin_script_44[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 120, 99, 111, 100, 101, 98, 117, 105, 108, 100, 115, 101, 116, 116, 105, 110, 103, 115, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 107, 101, 121, 45, 97, 114, -114, 97, 121, 34, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, - 34, 120, 99, 111, 100, 101, 98, 117, 105, 108, 100, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, - 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 34, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, -114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 120, 99, 111, 100, 101, 99, 111, 100, 101, 115, 105, 103, 110, -105, 110, 103, 105, 100, 101, 110, 116, 105, 116, 121, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 120, 99, 111, 100, 101, 115, 121, 115, 116, 101, 109, 99, 97, 112, 97, 98, 105, 108, 105, 116, -105, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, - 34, 107, 101, 121, 45, 98, 111, 111, 108, 101, 97, 110, 34, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, -123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 111, 115, 102, 97, 109, 105, 108, 121, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, - 32, 61, 32, 123, 10, 34, 105, 80, 104, 111, 110, 101, 47, 105, 80, 111, 100, 32, 116, 111, 117, 99, 104, 34, 44, 10, 34, 105, 80, 97, 100, 34, - 44, 10, 34, 85, 110, 105, 118, 101, 114, 115, 97, 108, 34, 44, 10, 125, 10, 125, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, -114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 120, 99, 111, 100, 101, 52, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, - 32, 32, 32, 61, 32, 34, 65, 112, 112, 108, 101, 32, 88, 99, 111, 100, 101, 32, 52, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, -110, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 65, 112, 112, 108, 101, 32, 88, 99, 111, 100, 101, 32, 52, 32, 112, 114, 111, 106, -101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 99, 108, 97, 110, 103, 34, 44, 10, -118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, - 44, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 83, -116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, - 44, 32, 34, 78, 111, 110, 101, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, - 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, -123, 10, 99, 99, 32, 61, 32, 123, 32, 34, 103, 99, 99, 34, 44, 32, 34, 99, 108, 97, 110, 103, 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, - 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 103, 101, 110, 101, -114, 97, 116, 101, 40, 119, 107, 115, 44, 32, 34, 46, 120, 99, 119, 111, 114, 107, 115, 112, 97, 99, 101, 47, 99, 111, 110, 116, 101, 110, 116, 115, - 46, 120, 99, 119, 111, 114, 107, 115, 112, 97, 99, 101, 100, 97, 116, 97, 34, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 120, 99, 111, -100, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, 111, -106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, -112, 114, 106, 44, 32, 34, 46, 120, 99, 111, 100, 101, 112, 114, 111, 106, 47, 112, 114, 111, 106, 101, 99, 116, 46, 112, 98, 120, 112, 114, 111, 106, - 34, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 120, 99, 111, 100, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, - 99, 116, 41, 10, 101, 110, 100, 44, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, -114, 101, 116, 117, 114, 110, 32, 40, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 120, 99, 111, 100, 101, 52, 34, 41, 10, 101, 110, 100, - 10, }; - -// xcode/xcode.lua -static const unsigned char builtin_script_45[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 120, 99, 111, 100, -101, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 120, 99, 111, 100, 101, - 10, 109, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, 10, 109, 46, 101, 108, 101, 109, 101, -110, 116, 115, 32, 61, 32, 123, 125, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 120, 99, 111, 100, 101, 95, 99, 111, 109, 109, 111, 110, 46, 108, -117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 120, 99, 111, 100, 101, 52, 95, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 108, -117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 120, 99, 111, 100, 101, 95, 112, 114, 111, 106, 101, 99, 116, 46, 108, 117, 97, 34, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 109, 10, }; - -// xcode/xcode4_workspace.lua -static const unsigned char builtin_script_46[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 120, 99, 111, 100, 101, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, -119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 44, 10, -109, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 10, 109, 46, 114, 101, 111, 114, 100, 101, 114, 80, 114, 111, 106, 101, 99, 116, 115, 44, 10, -109, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 70, 105, 108, 101, 82, 101, 102, 115, 44, 10, 109, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, - 84, 97, 105, 108, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 87, -111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 109, 46, 112, 114, 101, 112, 97, 114, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, - 40, 119, 107, 115, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 44, 32, 119, 107, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 87, 111, 114, 107, 115, 112, 97, 99, 101, 39, 41, 10, 112, 46, 119, - 40, 39, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 49, 46, 48, 34, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 84, 97, 105, 108, 40, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 87, 111, 114, -107, 115, 112, 97, 99, 101, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 111, 114, 100, 101, 114, - 80, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 105, 102, 32, 119, 107, 115, 46, 115, 116, 97, 114, 116, 112, 114, 111, 106, 101, 99, -116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 112, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, -114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 105, -102, 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 32, 61, 61, 32, 119, 107, 115, 46, 115, 116, 97, 114, 116, 112, 114, 111, -106, 101, 99, 116, 32, 116, 104, 101, 110, 10, 110, 112, 32, 61, 32, 110, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 119, 104, 105, 108, -101, 32, 110, 112, 32, 97, 110, 100, 32, 110, 112, 46, 112, 97, 114, 101, 110, 116, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 32, 61, 32, -110, 112, 46, 112, 97, 114, 101, 110, 116, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, -102, 40, 112, 46, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 110, 112, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 112, - 46, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 105, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 46, 99, 104, 105, -108, 100, 114, 101, 110, 44, 32, 49, 44, 32, 110, 112, 41, 10, 110, 112, 32, 61, 32, 112, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 70, 105, 108, 101, 82, 101, 102, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 119, 111, 114, 107, 115, 112, 97, 99, -101, 76, 111, 99, 97, 116, 105, 111, 110, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 70, 105, 108, 101, 82, 101, 102, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, -119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, - 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, - 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 10, 112, 46, 112, 117, 115, 104, 40, 39, - 60, 70, 105, 108, 101, 82, 101, 102, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, -112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 70, 105, 108, 101, 82, 101, 102, 44, 32, 112, 114, 106, 41, 10, 101, -110, 100, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 32, 46, 46, 32, 34, 62, 34, 41, 10, 112, 46, 112, -111, 112, 40, 39, 60, 47, 70, 105, 108, 101, 82, 101, 102, 62, 39, 41, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, 97, 110, 99, 104, 101, 110, -116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 110, 46, -112, 114, 111, 106, 101, 99, 116, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 71, 114, 111, 117, 112, 39, 41, 10, 112, 46, 119, 40, 39, 108, 111, - 99, 97, 116, 105, 111, 110, 32, 61, 32, 34, 99, 111, 110, 116, 97, 105, 110, 101, 114, 58, 34, 39, 41, 10, 112, 46, 119, 40, 39, 110, 97, 109, -101, 32, 61, 32, 34, 37, 115, 34, 62, 39, 44, 32, 110, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, 97, 110, 99, -104, 101, 120, 105, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 71, 114, 111, -117, 112, 62, 39, 41, 10, 101, 110, 100, 44, 10, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 76, 111, 99, 97, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, 101, 32, - 61, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 34, 46, 120, 99, 111, 100, 101, 112, 114, 111, 106, 34, 41, 10, -102, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 102, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 108, 111, 99, - 97, 116, 105, 111, 110, 32, 61, 32, 34, 103, 114, 111, 117, 112, 58, 37, 115, 34, 39, 44, 32, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 40, 41, 10, 112, 46, 120, 109, -108, 85, 116, 102, 56, 40, 116, 114, 117, 101, 41, 10, 101, 110, 100, 10, }; - -// xcode/xcode_common.lua -static const unsigned char builtin_script_47[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 120, 99, 111, 100, 101, 32, 61, 32, -112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 120, 99, 111, 100, 101, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 32, 61, 32, 112, 46, -116, 114, 101, 101, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, - 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, -111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, -111, 100, 101, 46, 103, 101, 116, 98, 117, 105, 108, 100, 99, 97, 116, 101, 103, 111, 114, 121, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, - 32, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 32, 61, 32, 123, 10, 91, 34, 46, 97, 34, 93, 32, 61, 32, 34, 70, 114, 97, 109, 101, 119, -111, 114, 107, 115, 34, 44, 10, 91, 34, 46, 99, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 99, 99, - 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 99, 112, 112, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, - 99, 101, 115, 34, 44, 10, 91, 34, 46, 99, 120, 120, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 99, - 43, 43, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 100, 121, 108, 105, 98, 34, 93, 32, 61, 32, 34, - 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 34, 44, 10, 91, 34, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 93, 32, 61, 32, 34, 70, -114, 97, 109, 101, 119, 111, 114, 107, 115, 34, 44, 10, 91, 34, 46, 109, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, - 91, 34, 46, 109, 109, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 115, 116, 114, 105, 110, 103, 115, 34, - 93, 32, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 110, 105, 98, 34, 93, 32, 61, 32, 34, 82, 101, 115, -111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 120, 105, 98, 34, 93, 32, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 115, 34, 44, - 10, 91, 34, 46, 115, 116, 111, 114, 121, 98, 111, 97, 114, 100, 34, 93, 32, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 115, 34, 44, 10, - 91, 34, 46, 105, 99, 110, 115, 34, 93, 32, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 115, 34, 93, 32, - 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, 10, 91, 34, 46, 83, 34, 93, 32, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, 44, - 10, 125, 10, 105, 102, 32, 110, 111, 100, 101, 46, 105, 115, 82, 101, 115, 111, 117, 114, 99, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 115, 34, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 97, 116, 101, 103, 111, 114, -105, 101, 115, 91, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, - 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 105, 115, 73, 116, 101, 109, 82, 101, 115, 111, 117, -114, 99, 101, 40, 112, 114, 111, 106, 101, 99, 116, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 10, 105, 102, 32, -112, 114, 111, 106, 101, 99, 116, 32, 97, 110, 100, 32, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, 100, 101, 98, 117, 105, 108, 100, 114, 101, -115, 111, 117, 114, 99, 101, 115, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 121, 112, 101, 40, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, -100, 101, 98, 117, 105, 108, 100, 114, 101, 115, 111, 117, 114, 99, 101, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, -110, 10, 114, 101, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, 100, 101, 98, 117, 105, 108, 100, 114, 101, 115, 111, 117, 114, - 99, 101, 115, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 104, 101, 99, 107, - 73, 116, 101, 109, 73, 110, 76, 105, 115, 116, 40, 105, 116, 101, 109, 44, 32, 108, 105, 115, 116, 41, 10, 105, 102, 32, 105, 116, 101, 109, 32, 116, -104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 108, 105, 115, 116, 41, 32, 100, 111, 10, 105, 102, - 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 105, 116, 101, 109, 44, 32, 112, 97, 116, 104, 46, 119, 105, 108, 100, 99, 97, 114, 100, -115, 40, 118, 41, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 40, 99, 104, 101, 99, 107, 73, 116, 101, -109, 73, 110, 76, 105, 115, 116, 40, 110, 111, 100, 101, 46, 112, 97, 116, 104, 44, 32, 114, 101, 115, 41, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 102, 105, 108, 101, 116, 121, 112, 101, 107, 101, 121, 40, 110, 111, 100, -101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 99, 111, 110, 102, 105, 103, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, - 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, -103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 97, 110, 100, 32, 102, 105, 108, 101, - 99, 102, 103, 91, 34, 99, 111, 109, 112, 105, 108, 101, 97, 115, 34, 93, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 101, 120, -112, 108, 105, 99, 105, 116, 70, 105, 108, 101, 84, 121, 112, 101, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 34, -108, 97, 115, 116, 75, 110, 111, 119, 110, 70, 105, 108, 101, 84, 121, 112, 101, 34, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -120, 99, 111, 100, 101, 46, 103, 101, 116, 102, 105, 108, 101, 116, 121, 112, 101, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, -110, 111, 100, 101, 46, 99, 111, 110, 102, 105, 103, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, - 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, - 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, - 46, 105, 115, 99, 40, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 46, 99, 34, 10, 101, 108, 115, 101, 105, 102, 32, 112, 46, 108, 97, -110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 41, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 112, 112, 46, 99, 112, 112, - 34, 10, 101, 108, 115, 101, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 32, 61, 61, 32, 112, 46, - 79, 66, 74, 69, 67, 84, 73, 86, 69, 67, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, -100, 101, 46, 99, 46, 111, 98, 106, 99, 34, 10, 101, 108, 115, 101, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, -101, 97, 115, 32, 61, 61, 32, 112, 46, 79, 66, 74, 69, 67, 84, 73, 86, 69, 67, 80, 80, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 112, 112, 46, 111, 98, 106, 99, 112, 112, 34, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, 32, 61, 32, 123, 10, 91, 34, 46, 99, 34, 93, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 46, 99, 34, 44, 10, 91, 34, 46, 99, 99, 34, 93, - 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 112, 112, 46, 99, 112, 112, 34, 44, 10, - 91, 34, 46, 99, 112, 112, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 112, 112, - 46, 99, 112, 112, 34, 44, 10, 91, 34, 46, 99, 115, 115, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 116, 101, 120, 116, 46, 99, 115, -115, 34, 44, 10, 91, 34, 46, 99, 120, 120, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, - 46, 99, 112, 112, 46, 99, 112, 112, 34, 44, 10, 91, 34, 46, 99, 43, 43, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, -114, 99, 101, 99, 111, 100, 101, 46, 99, 112, 112, 46, 99, 112, 112, 34, 44, 10, 91, 34, 46, 83, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 97, 115, 109, 46, 97, 115, 109, 34, 44, 10, 91, 34, 46, 102, 114, 97, 109, -101, 119, 111, 114, 107, 34, 93, 32, 61, 32, 34, 119, 114, 97, 112, 112, 101, 114, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 10, 91, - 34, 46, 103, 105, 102, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 105, 109, 97, 103, 101, 46, 103, 105, 102, 34, 44, 10, 91, 34, 46, -104, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 46, 104, 34, 44, 10, - 91, 34, 46, 104, 116, 109, 108, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 34, 116, 101, 120, 116, 46, 104, 116, 109, 108, 34, 44, 10, 91, 34, - 46, 108, 117, 97, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 108, 117, 97, 34, 44, - 10, 91, 34, 46, 109, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 46, -111, 98, 106, 99, 34, 44, 10, 91, 34, 46, 109, 109, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, -111, 100, 101, 46, 99, 112, 112, 46, 111, 98, 106, 99, 34, 44, 10, 91, 34, 46, 110, 105, 98, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, - 34, 119, 114, 97, 112, 112, 101, 114, 46, 110, 105, 98, 34, 44, 10, 91, 34, 46, 115, 116, 111, 114, 121, 98, 111, 97, 114, 100, 34, 93, 32, 61, - 32, 34, 102, 105, 108, 101, 46, 115, 116, 111, 114, 121, 98, 111, 97, 114, 100, 34, 44, 10, 91, 34, 46, 112, 99, 104, 34, 93, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 99, 46, 104, 34, 44, 10, 91, 34, 46, 112, 108, 105, 115, 116, 34, - 93, 32, 32, 32, 32, 32, 61, 32, 34, 116, 101, 120, 116, 46, 112, 108, 105, 115, 116, 46, 120, 109, 108, 34, 44, 10, 91, 34, 46, 115, 116, 114, -105, 110, 103, 115, 34, 93, 32, 32, 32, 61, 32, 34, 116, 101, 120, 116, 46, 112, 108, 105, 115, 116, 46, 115, 116, 114, 105, 110, 103, 115, 34, 44, - 10, 91, 34, 46, 120, 105, 98, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 102, 105, 108, 101, 46, 120, 105, 98, 34, 44, 10, 91, 34, - 46, 105, 99, 110, 115, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 34, 105, 109, 97, 103, 101, 46, 105, 99, 110, 115, 34, 44, 10, 91, 34, 46, -115, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 115, 111, 117, 114, 99, 101, 99, 111, 100, 101, 46, 97, 115, 109, 34, 44, 10, - 91, 34, 46, 98, 109, 112, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 105, 109, 97, 103, 101, 46, 98, 109, 112, 34, 44, 10, 91, 34, - 46, 119, 97, 118, 34, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 97, 117, 100, 105, 111, 46, 119, 97, 118, 34, 44, 10, 91, 34, 46, 120, - 99, 97, 115, 115, 101, 116, 115, 34, 93, 32, 32, 61, 32, 34, 102, 111, 108, 100, 101, 114, 46, 97, 115, 115, 101, 116, 99, 97, 116, 97, 108, 111, -103, 34, 44, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 116, 121, 112, 101, 115, 91, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, -115, 105, 111, 110, 40, 110, 111, 100, 101, 46, 112, 97, 116, 104, 41, 93, 32, 111, 114, 32, 34, 116, 101, 120, 116, 34, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 80, 114, 105, 110, 116, 85, 115, 101, 114, 67, 111, 110, 102, -105, 103, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 111, 102, 102, 115, 101, 116, 44, 32, 99, 102, 103, 44, 32, 116, 114, 44, 32, 107, 105, -110, 100, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 102, 101, 114, 101, 110, 99, 101, 78, 97, 109, 101, 10, 105, 102, 32, 107, 105, 110, 100, 32, - 61, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 32, 116, 104, 101, 110, 10, 114, 101, 102, 101, 114, 101, 110, 99, 101, 78, 97, 109, 101, 32, - 61, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 99, 111, 110, 102, 105, 103, 114, 101, 102, 101, 114, 101, 110, 99, 101, 112, 114, 111, 106, 101, 99, -116, 10, 101, 108, 115, 101, 105, 102, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 116, 97, 114, 103, 101, 116, 34, 32, 116, 104, 101, 110, 10, 114, -101, 102, 101, 114, 101, 110, 99, 101, 78, 97, 109, 101, 32, 61, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 99, 111, 110, 102, 105, 103, 114, 101, -102, 101, 114, 101, 110, 99, 101, 116, 97, 114, 103, 101, 116, 10, 101, 110, 100, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, -116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 102, 105, -108, 101, 110, 97, 109, 101, 32, 61, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 10, 105, 102, 32, 110, 111, 100, 101, 46, 105, 100, 32, 97, 110, -100, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 32, 61, 61, - 32, 34, 46, 120, 99, 99, 111, 110, 102, 105, 103, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 105, 108, 101, 110, 97, 109, 101, 32, 61, 61, - 32, 114, 101, 102, 101, 114, 101, 110, 99, 101, 78, 97, 109, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 111, 102, 102, 115, 101, 116, 44, 32, 39, - 98, 97, 115, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 61, 32, 37, 115, 32, - 47, 42, 32, 37, 115, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 114, -101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 44, 32, 102, 97, 108, 115, 101, 41, 10, 101, 110, 100, 10, -108, 111, 99, 97, 108, 32, 101, 115, 99, 97, 112, 101, 83, 112, 101, 99, 105, 97, 108, 67, 104, 97, 114, 115, 32, 61, 32, 123, 10, 91, 39, 92, -110, 39, 93, 32, 61, 32, 39, 92, 92, 110, 39, 44, 10, 91, 39, 92, 114, 39, 93, 32, 61, 32, 39, 92, 92, 114, 39, 44, 10, 91, 39, 92, -116, 39, 93, 32, 61, 32, 39, 92, 92, 116, 39, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 101, 115, - 99, 97, 112, 101, 67, 104, 97, 114, 40, 99, 41, 10, 114, 101, 116, 117, 114, 110, 32, 101, 115, 99, 97, 112, 101, 83, 112, 101, 99, 105, 97, 108, - 67, 104, 97, 114, 115, 91, 99, 93, 32, 111, 114, 32, 39, 92, 92, 39, 46, 46, 99, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, -110, 99, 116, 105, 111, 110, 32, 101, 115, 99, 97, 112, 101, 65, 114, 103, 40, 118, 97, 108, 117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, -118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 91, 92, 39, 34, 92, 92, 92, 110, 92, 114, 92, 116, 32, 93, 39, 44, 32, 101, 115, 99, - 97, 112, 101, 67, 104, 97, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, -102, 117, 110, 99, 116, 105, 111, 110, 32, 101, 115, 99, 97, 112, 101, 83, 101, 116, 116, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 10, 118, 97, -108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 91, 34, 92, 92, 92, 110, 92, 114, 92, 116, 93, 39, 44, 32, -101, 115, 99, 97, 112, 101, 67, 104, 97, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 118, 97, 108, -117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 46, 46, 39, 39, 10, 105, 102, 32, 110, 111, 116, 32, 118, 97, 108, -117, 101, 58, 109, 97, 116, 99, 104, 40, 39, 94, 91, 37, 97, 37, 100, 95, 46, 47, 93, 43, 36, 39, 41, 32, 116, 104, 101, 110, 10, 118, 97, -108, 117, 101, 32, 61, 32, 39, 34, 39, 46, 46, 101, 115, 99, 97, 112, 101, 83, 101, 116, 116, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 46, - 46, 39, 34, 39, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 117, 115, 116, 111, 109, 83, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, -118, 97, 108, 117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 46, 46, 39, 39, 10, 108, 111, 99, 97, 108, 32, 116, -101, 115, 116, 32, 61, 32, 118, 97, 108, 117, 101, 58, 109, 97, 116, 99, 104, 40, 39, 94, 91, 37, 97, 37, 100, 95, 46, 47, 37, 43, 93, 43, - 36, 39, 41, 10, 105, 102, 32, 116, 101, 115, 116, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 39, 34, 39, 46, 46, 101, 115, - 99, 97, 112, 101, 83, 101, 116, 116, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 46, 46, 39, 34, 39, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 105, 110, -116, 83, 101, 116, 116, 105, 110, 103, 40, 108, 101, 118, 101, 108, 44, 32, 110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, -116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 39, 102, 117, 110, 99, 116, 105, 111, 110, 39, 32, 116, 104, 101, 110, 10, 118, - 97, 108, 117, 101, 40, 108, 101, 118, 101, 108, 44, 32, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, -108, 117, 101, 41, 32, 126, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 32, 39, - 37, 115, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 97, 109, 101, - 41, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 41, 10, 101, 108, 115, 101, -105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 61, 32, 49, 32, 116, 104, 101, 110, 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 32, 39, 37, -115, 32, 61, 32, 40, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 97, 109, 101, 41, 41, 10, -102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 118, 97, 108, 117, 101, 41, 32, 100, 111, 10, - 95, 112, 40, 108, 101, 118, 101, 108, 32, 43, 32, 49, 44, 32, 39, 37, 115, 44, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, -116, 116, 105, 110, 103, 40, 105, 116, 101, 109, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 32, 39, 41, 59, 39, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 114, 105, 110, 116, 83, 101, 116, -116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 108, 101, 118, 101, 108, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 108, 111, 99, 97, -108, 32, 107, 101, 121, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, 121, 115, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 116, 97, - 98, 108, 101, 46, 115, 111, 114, 116, 40, 107, 101, 121, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 107, 101, 121, 115, 41, 32, 100, 111, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 40, 108, 101, 118, 101, 108, 44, 32, 107, - 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 91, 107, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 111, 118, 101, 114, 114, 105, 100, 101, 83, 101, 116, 116, 105, 110, 103, 115, 40, 115, 101, 116, 116, 105, 110, 103, 115, 44, - 32, 111, 118, 101, 114, 114, 105, 100, 101, 115, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 111, 118, 101, 114, 114, 105, 100, 101, 115, 41, 32, 61, - 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 32, 105, -110, 32, 112, 97, 105, 114, 115, 40, 111, 118, 101, 114, 114, 105, 100, 101, 115, 41, 32, 100, 111, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, - 97, 109, 101, 93, 32, 61, 32, 105, 105, 102, 40, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 101, 113, 117, 97, 108, 115, 40, 118, 97, 108, 117, -101, 44, 32, 123, 32, 102, 97, 108, 115, 101, 32, 125, 41, 44, 32, 118, 97, 108, 117, 101, 44, 32, 110, 105, 108, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 112, 114, 111, 100, 117, 99, 116, -116, 121, 112, 101, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, 32, 61, 32, 123, 10, 67, 111, 110, 115, 111, -108, 101, 65, 112, 112, 32, 32, 32, 61, 32, 34, 99, 111, 109, 46, 97, 112, 112, 108, 101, 46, 112, 114, 111, 100, 117, 99, 116, 45, 116, 121, 112, -101, 46, 116, 111, 111, 108, 34, 44, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 32, 32, 61, 32, 34, 99, 111, 109, 46, 97, 112, 112, -108, 101, 46, 112, 114, 111, 100, 117, 99, 116, 45, 116, 121, 112, 101, 46, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 34, 44, 10, 83, 116, - 97, 116, 105, 99, 76, 105, 98, 32, 32, 32, 32, 61, 32, 34, 99, 111, 109, 46, 97, 112, 112, 108, 101, 46, 112, 114, 111, 100, 117, 99, 116, 45, -116, 121, 112, 101, 46, 108, 105, 98, 114, 97, 114, 121, 46, 115, 116, 97, 116, 105, 99, 34, 44, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, - 32, 32, 32, 61, 32, 34, 99, 111, 109, 46, 97, 112, 112, 108, 101, 46, 112, 114, 111, 100, 117, 99, 116, 45, 116, 121, 112, 101, 46, 108, 105, 98, -114, 97, 114, 121, 46, 100, 121, 110, 97, 109, 105, 99, 34, 44, 10, 79, 83, 88, 66, 117, 110, 100, 108, 101, 32, 32, 32, 32, 61, 32, 34, 99, -111, 109, 46, 97, 112, 112, 108, 101, 46, 112, 114, 111, 100, 117, 99, 116, 45, 116, 121, 112, 101, 46, 98, 117, 110, 100, 108, 101, 34, 44, 10, 79, - 83, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 34, 99, 111, 109, 46, 97, 112, 112, 108, 101, 46, 112, 114, 111, 100, 117, 99, 116, - 45, 116, 121, 112, 101, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 10, 88, 67, 84, 101, 115, 116, 32, 32, 32, 32, 32, 32, 32, 61, - 32, 34, 99, 111, 109, 46, 97, 112, 112, 108, 101, 46, 112, 114, 111, 100, 117, 99, 116, 45, 116, 121, 112, 101, 46, 98, 117, 110, 100, 108, 101, 46, -117, 110, 105, 116, 45, 116, 101, 115, 116, 34, 44, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 116, 121, 112, 101, 115, 91, 105, 105, 102, 40, 110, -111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 97, 110, 100, 32, -110, 111, 100, 101, 46, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 44, 32, 110, 111, 100, 101, 46, 99, 102, 103, - 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 44, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, 100, 41, 93, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 116, 121, 112, 101, - 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, 32, 61, 32, 123, 10, 67, 111, 110, 115, 111, 108, 101, 65, 112, -112, 32, 32, 32, 61, 32, 34, 92, 34, 99, 111, 109, 112, 105, 108, 101, 100, 46, 109, 97, 99, 104, 45, 111, 46, 101, 120, 101, 99, 117, 116, 97, - 98, 108, 101, 92, 34, 34, 44, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 32, 32, 61, 32, 34, 119, 114, 97, 112, 112, 101, 114, 46, - 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 32, 32, 32, 61, 32, 34, 97, 114, - 99, 104, 105, 118, 101, 46, 97, 114, 34, 44, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 32, 32, 32, 61, 32, 34, 92, 34, 99, 111, 109, -112, 105, 108, 101, 100, 46, 109, 97, 99, 104, 45, 111, 46, 100, 121, 108, 105, 98, 92, 34, 34, 44, 10, 79, 83, 88, 66, 117, 110, 100, 108, 101, - 32, 32, 32, 32, 61, 32, 34, 119, 114, 97, 112, 112, 101, 114, 46, 99, 102, 98, 117, 110, 100, 108, 101, 34, 44, 10, 79, 83, 88, 70, 114, 97, -109, 101, 119, 111, 114, 107, 32, 61, 32, 34, 119, 114, 97, 112, 112, 101, 114, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 10, 88, 67, - 84, 101, 115, 116, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 119, 114, 97, 112, 112, 101, 114, 46, 99, 102, 98, 117, 110, 100, 108, 101, 34, 44, - 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 116, 121, 112, 101, 115, 91, 105, 105, 102, 40, 110, 111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, -100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 97, 110, 100, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 115, 104, - 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 44, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, -121, 112, 101, 44, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, 100, 41, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 102, 111, 114, 109, 97, 116, 115, 32, 61, 32, 123, 10, 91, 34, 68, 119, 97, 114, 102, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 34, -100, 119, 97, 114, 102, 34, 44, 10, 91, 34, 68, 101, 102, 97, 117, 108, 116, 34, 93, 32, 32, 32, 32, 61, 32, 34, 100, 119, 97, 114, 102, 45, -119, 105, 116, 104, 45, 100, 115, 121, 109, 34, 44, 10, 91, 34, 83, 112, 108, 105, 116, 68, 119, 97, 114, 102, 34, 93, 32, 61, 32, 34, 100, 119, - 97, 114, 102, 45, 119, 105, 116, 104, 45, 100, 115, 121, 109, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 114, 118, 97, 108, 32, 61, 32, 34, -100, 119, 97, 114, 102, 45, 119, 105, 116, 104, 45, 100, 115, 121, 109, 34, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 102, 111, 114, -109, 97, 116, 32, 116, 104, 101, 110, 10, 114, 118, 97, 108, 32, 61, 32, 102, 111, 114, 109, 97, 116, 115, 91, 99, 102, 103, 46, 100, 101, 98, 117, -103, 102, 111, 114, 109, 97, 116, 93, 32, 111, 114, 32, 114, 118, 97, 108, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 118, 97, 108, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 120, 99, 111, 100, 101, 112, 114, 111, 106, -110, 97, 109, 101, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, 101, 32, 61, 32, 112, 46, 102, 105, 108, 101, 110, 97, -109, 101, 40, 112, 114, 106, 44, 32, 34, 46, 120, 99, 111, 100, 101, 112, 114, 111, 106, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 110, 97, -109, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, -107, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, -111, 110, 40, 102, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 110, - 97, 109, 101, 32, 61, 32, 39, 39, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, 46, 46, 125, 10, 102, 111, 114, 32, 105, - 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 97, 114, 103, 41, 32, 100, 111, 10, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, - 46, 46, 118, 46, 46, 39, 42, 42, 42, 42, 39, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 40, 34, 37, 48, 56, 88, 37, 48, 56, - 88, 37, 48, 56, 88, 34, 41, 58, 102, 111, 114, 109, 97, 116, 40, 110, 97, 109, 101, 58, 104, 97, 115, 104, 40, 49, 54, 55, 55, 55, 54, 49, - 57, 41, 44, 32, 110, 97, 109, 101, 58, 104, 97, 115, 104, 40, 50, 49, 54, 54, 49, 51, 54, 50, 54, 49, 41, 44, 32, 110, 97, 109, 101, 58, -104, 97, 115, 104, 40, 52, 54, 53, 55, 55, 54, 49, 57, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, -100, 101, 46, 112, 114, 101, 112, 97, 114, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 119, 107, 115, 46, 120, 99, 111, -100, 101, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, -101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 112, 114, 106, 46, 99, 111, 110, 102, 105, -103, 117, 114, 97, 116, 105, 111, 110, 115, 91, 49, 93, 44, 32, 112, 114, 106, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 91, 49, 93, 41, 10, -108, 111, 99, 97, 108, 32, 98, 117, 110, 100, 108, 101, 112, 97, 116, 104, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, -101, 116, 46, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 32, 126, 61, 32, 34, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 98, 117, 105, 108, -100, 116, 97, 114, 103, 101, 116, 46, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 32, 111, 114, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, - 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 59, 10, 105, 102, 32, 40, 112, 114, 106, 46, 101, 120, 116, 101, 114, 110, 97, 108, 41, 32, 116, 104, -101, 110, 10, 98, 117, 110, 100, 108, 101, 112, 97, 116, 104, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, - 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 46, 110, 101, 119, 40, 112, 97, 116, -104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 98, 117, 110, 100, 108, 101, 112, 97, 116, 104, 41, 41, 10, 110, 111, 100, 101, 46, 99, 102, 103, 32, - 61, 32, 99, 102, 103, 10, 110, 111, 100, 101, 46, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, - 46, 110, 97, 109, 101, 44, 32, 34, 112, 114, 111, 100, 117, 99, 116, 34, 41, 10, 110, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 105, 100, 32, - 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 116, 97, 114, 103, 101, 116, - 34, 41, 10, 112, 114, 106, 46, 120, 99, 111, 100, 101, 32, 61, 32, 123, 125, 10, 112, 114, 106, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, -101, 99, 116, 110, 111, 100, 101, 32, 61, 32, 110, 111, 100, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -120, 99, 111, 100, 101, 46, 80, 66, 88, 66, 117, 105, 108, 100, 70, 105, 108, 101, 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, -116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 59, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, -111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, - 98, 117, 105, 108, 100, 105, 100, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, -105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 108, 101, 118, 101, 108, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 39, - 37, 115, 32, 47, 42, 32, 37, 115, 32, 105, 110, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 105, 115, 97, 32, 61, 32, 80, 66, 88, 66, 117, -105, 108, 100, 70, 105, 108, 101, 59, 32, 102, 105, 108, 101, 82, 101, 102, 32, 61, 32, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 59, 32, -125, 59, 39, 44, 10, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 120, 99, -111, 100, 101, 46, 103, 101, 116, 98, 117, 105, 108, 100, 99, 97, 116, 101, 103, 111, 114, 121, 40, 110, 111, 100, 101, 41, 44, 32, 110, 111, 100, 101, - 46, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 105, -102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 116, 104, -101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 66, 117, 105, 108, 100, 70, 105, 108, 101, 32, 115, 101, 99, -116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, -115, 101, 116, 116, 105, 110, 103, 115, 41, 59, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 66, 117, 105, 108, 100, 70, 105, -108, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, -111, 120, 121, 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, - 95, 44, 32, 110, 111, 100, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 46, 99, 104, -105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, -112, 114, 111, 120, 121, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, - 42, 32, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, 111, 120, 121, 32, 42, 47, 32, 61, 32, 123, 39, 44, - 32, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, 112, 114, 111, 120, 121, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, - 61, 32, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, 111, 120, 121, 59, 39, 41, 10, 95, 112, 40, 51, 44, - 39, 99, 111, 110, 116, 97, 105, 110, 101, 114, 80, 111, 114, 116, 97, 108, 32, 61, 32, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 59, 39, - 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 110, 111, 100, 101, - 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 114, 101, 110, 116, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, - 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 41, 41, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 120, 121, 84, 121, 112, 101, 32, 61, 32, 50, - 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 114, 101, 109, 111, 116, 101, 71, 108, 111, 98, 97, 108, 73, 68, 83, 116, 114, 105, 110, 103, 32, 61, - 32, 37, 115, 59, 39, 44, 32, 110, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, -116, 110, 111, 100, 101, 46, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 114, 101, 109, 111, 116, 101, 73, 110, 102, 111, 32, 61, 32, 37, 115, 59, - 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, - 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 41, 10, 95, 112, 40, 50, 44, 39, -125, 59, 39, 41, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 112, 114, 111, -120, 121, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 80, - 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, 111, 120, 121, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 110, 111, -100, 101, 46, 116, 97, 114, 103, 101, 116, 112, 114, 111, 120, 121, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, - 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, 111, 120, 121, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 99, 111, 110, -116, 97, 105, 110, 101, 114, 80, 111, 114, 116, 97, 108, 32, 61, 32, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 59, 39, 44, 32, 110, 111, -100, 101, 46, 105, 100, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 110, 111, 100, 101, 46, 112, 97, 114, -101, 110, 116, 46, 112, 97, 114, 101, 110, 116, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 110, 111, 100, -101, 46, 112, 97, 116, 104, 41, 41, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 120, 121, 84, 121, 112, 101, 32, 61, 32, 49, 59, 39, 41, 10, - 95, 112, 40, 51, 44, 39, 114, 101, 109, 111, 116, 101, 71, 108, 111, 98, 97, 108, 73, 68, 83, 116, 114, 105, 110, 103, 32, 61, 32, 37, 115, 59, - 39, 44, 32, 110, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 110, 111, 100, -101, 46, 116, 97, 114, 103, 101, 116, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 114, 101, 109, 111, 116, 101, 73, 110, 102, 111, 32, 61, 32, 37, -115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 112, 114, 111, 106, 101, - 99, 116, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 41, 10, 95, 112, 40, 50, - 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, -112, 116, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, - 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, 111, 120, 121, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, - 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, -115, 41, 59, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, -114, 111, 120, 121, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 70, 105, 108, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, - 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, -116, 99, 111, 110, 102, 105, 103, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, -103, 115, 32, 61, 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, - 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 110, 111, 100, 101, 46, -112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 100, 101, 46, 107, 105, 110, -100, 32, 61, 61, 32, 34, 112, 114, 111, 100, 117, 99, 116, 34, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, -101, 46, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 108, 101, 118, 101, 108, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, - 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 105, 115, 97, 32, 61, 32, 80, 66, 88, 70, 105, 108, 101, 82, 101, -102, 101, 114, 101, 110, 99, 101, 59, 32, 101, 120, 112, 108, 105, 99, 105, 116, 70, 105, 108, 101, 84, 121, 112, 101, 32, 61, 32, 37, 115, 59, 32, -105, 110, 99, 108, 117, 100, 101, 73, 110, 73, 110, 100, 101, 120, 32, 61, 32, 48, 59, 32, 110, 97, 109, 101, 32, 61, 32, 37, 115, 59, 32, 112, - 97, 116, 104, 32, 61, 32, 37, 115, 59, 32, 115, 111, 117, 114, 99, 101, 84, 114, 101, 101, 32, 61, 32, 66, 85, 73, 76, 84, 95, 80, 82, 79, - 68, 85, 67, 84, 83, 95, 68, 73, 82, 59, 32, 125, 59, 39, 44, 10, 110, 111, 100, 101, 46, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, -109, 101, 44, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 116, 121, 112, 101, 40, 110, 111, 100, 101, 41, 44, 32, 115, -116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 44, 32, 115, 116, 114, 105, -110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 110, 111, 100, 101, 46, 99, -102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 117, 110, 100, 108, 101, 110, 97, 109, 101, 32, 126, 61, 32, 34, 34, 32, - 97, 110, 100, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 117, 110, 100, 108, 101, 110, - 97, 109, 101, 32, 111, 114, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 114, 101, 108, 112, - 97, 116, 104, 41, 41, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, -114, 101, 110, 116, 32, 61, 61, 32, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, -115, 91, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 108, 101, 118, -101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 112, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, -116, 105, 118, 101, 40, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, - 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 110, 111, 100, -101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 41, 10, 95, 112, 40, 108, -101, 118, 101, 108, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 105, 115, 97, 32, 61, 32, 80, 66, 88, 70, 105, -108, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 59, 32, 108, 97, 115, 116, 75, 110, 111, 119, 110, 70, 105, 108, 101, 84, 121, 112, 101, 32, 61, - 32, 34, 119, 114, 97, 112, 112, 101, 114, 46, 112, 98, 45, 112, 114, 111, 106, 101, 99, 116, 34, 59, 32, 110, 97, 109, 101, 32, 61, 32, 37, 115, - 59, 32, 112, 97, 116, 104, 32, 61, 32, 37, 115, 59, 32, 115, 111, 117, 114, 99, 101, 84, 114, 101, 101, 32, 61, 32, 83, 79, 85, 82, 67, 69, - 95, 82, 79, 79, 84, 59, 32, 125, 59, 39, 44, 10, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 105, 100, 44, 32, 110, 111, 100, 101, - 46, 110, 97, 109, 101, 44, 32, 99, 117, 115, 116, 111, 109, 83, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, -100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 110, 97, 109, 101, 41, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, -103, 40, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 114, 101, 108, 112, 97, 116, 104, 44, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, - 46, 110, 97, 109, 101, 41, 41, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, -105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 108, 101, 118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 112, 116, 104, 44, - 32, 115, 114, 99, 10, 105, 102, 32, 120, 99, 111, 100, 101, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, 107, 40, 110, 111, 100, 101, 46, 112, - 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 80, 97, 116, 104, 32, 61, 32, 110, 111, 100, 101, 46, -112, 97, 116, 104, 10, 108, 111, 99, 97, 108, 32, 95, 44, 32, 109, 97, 116, 99, 104, 69, 110, 100, 44, 32, 118, 97, 114, 105, 97, 98, 108, 101, - 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 110, 111, 100, 101, 80, 97, 116, 104, 44, 32, 34, 94, 37, 36, 37, 40, 40, - 46, 43, 41, 37, 41, 47, 34, 41, 10, 105, 102, 32, 118, 97, 114, 105, 97, 98, 108, 101, 32, 116, 104, 101, 110, 10, 110, 111, 100, 101, 80, 97, -116, 104, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 110, 111, 100, 101, 80, 97, 116, 104, 44, 32, 109, 97, 116, 99, 104, 69, -110, 100, 32, 43, 32, 49, 41, 10, 101, 110, 100, 10, 105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 110, 111, 100, 101, 80, - 97, 116, 104, 44, 39, 47, 39, 41, 32, 32, 116, 104, 101, 110, 10, 105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 110, 111, -100, 101, 80, 97, 116, 104, 44, 39, 94, 37, 46, 39, 41, 116, 104, 101, 110, 10, 112, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, -114, 101, 108, 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 110, 111, -100, 101, 46, 112, 97, 116, 104, 41, 10, 115, 114, 99, 32, 61, 32, 34, 83, 79, 85, 82, 67, 69, 95, 82, 79, 79, 84, 34, 10, 118, 97, 114, -105, 97, 98, 108, 101, 32, 61, 32, 115, 114, 99, 10, 101, 108, 115, 101, 10, 112, 116, 104, 32, 61, 32, 110, 111, 100, 101, 80, 97, 116, 104, 10, -115, 114, 99, 32, 61, 32, 34, 60, 97, 98, 115, 111, 108, 117, 116, 101, 62, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 118, 97, -114, 105, 97, 98, 108, 101, 32, 116, 104, 101, 110, 10, 115, 114, 99, 32, 61, 32, 118, 97, 114, 105, 97, 98, 108, 101, 10, 105, 102, 32, 115, 116, -114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 112, 116, 104, 44, 32, 39, 94, 47, 39, 41, 32, 116, 104, 101, 110, 10, 112, 116, 104, 32, 61, 32, -115, 116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 112, 116, 104, 44, 32, 50, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 112, 116, 104, 32, - 61, 32, 34, 83, 121, 115, 116, 101, 109, 47, 76, 105, 98, 114, 97, 114, 121, 47, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 47, 34, 32, 46, - 46, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 10, 115, 114, 99, 32, 61, 32, 34, 83, 68, 75, 82, 79, 79, 84, 34, 10, 101, 110, 100, 10, -101, 108, 115, 101, 10, 115, 114, 99, 32, 61, 32, 34, 60, 103, 114, 111, 117, 112, 62, 34, 10, 105, 102, 32, 110, 111, 100, 101, 46, 97, 98, 115, -112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 112, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, - 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, -116, 104, 41, 10, 101, 108, 115, 101, 10, 112, 116, 104, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 105, 115, 97, 32, 61, 32, - 80, 66, 88, 70, 105, 108, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 59, 32, 37, 115, 32, 61, 32, 37, 115, 59, 32, 110, 97, 109, 101, 32, - 61, 32, 37, 115, 59, 32, 112, 97, 116, 104, 32, 61, 32, 37, 115, 59, 32, 115, 111, 117, 114, 99, 101, 84, 114, 101, 101, 32, 61, 32, 37, 115, - 59, 32, 125, 59, 39, 44, 10, 110, 111, 100, 101, 46, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 120, 99, 111, 100, 101, - 46, 103, 101, 116, 102, 105, 108, 101, 116, 121, 112, 101, 107, 101, 121, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 44, 32, 120, 99, 111, 100, -101, 46, 103, 101, 116, 102, 105, 108, 101, 116, 121, 112, 101, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 44, 32, 115, 116, 114, 105, 110, 103, -105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, - 83, 101, 116, 116, 105, 110, 103, 40, 112, 116, 104, 41, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 115, -114, 99, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, - 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, -101, 103, 105, 110, 32, 80, 66, 88, 70, 105, 108, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, - 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, -115, 41, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 70, 105, 108, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 115, -101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, -101, 40, 116, 114, 41, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, - 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 50, 44, 39, 37, 115, - 32, 47, 42, 32, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 116, 114, 46, 112, 114, 111, 100, 117, - 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 49, 93, 46, 102, 120, 115, 116, 97, 103, 101, 105, 100, 41, 10, 95, 112, 40, 51, 44, - 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 59, 39, - 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 65, 99, 116, 105, 111, 110, 77, 97, 115, 107, 32, 61, 32, 50, 49, 52, 55, 52, 56, - 51, 54, 52, 55, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 102, 105, 108, 101, 115, 32, 61, 32, 40, 39, 41, 10, 116, 114, 101, 101, 46, 116, -114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 115, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, - 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 105, 110, 32, 70, 114, 97, 109, 101, 119, 111, 114, -107, 115, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 46, 112, 114, -111, 106, 101, 99, 116, 115, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, - 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, - 47, 42, 32, 37, 115, 32, 105, 110, 32, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 98, -117, 105, 108, 100, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 95, 112, - 40, 51, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 114, 117, 110, 79, 110, 108, 121, 70, 111, 114, 68, 101, 112, 108, 111, 121, 109, -101, 110, 116, 80, 111, 115, 116, 112, 114, 111, 99, 101, 115, 115, 105, 110, 103, 32, 61, 32, 48, 59, 39, 41, 10, 95, 112, 40, 50, 44, 39, 125, - 59, 39, 41, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 66, 117, 105, 108, -100, 80, 104, 97, 115, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 71, 114, 111, 117, 112, 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, - 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, - 32, 123, 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 40, 110, -111, 100, 101, 46, 112, 97, 116, 104, 32, 97, 110, 100, 32, 35, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 61, 32, 48, - 41, 32, 111, 114, 32, 110, 111, 100, 101, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 118, 103, 114, 111, 117, 112, 34, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 105, 115, 65, 103, 103, 114, -101, 103, 97, 116, 101, 84, 97, 114, 103, 101, 116, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 100, 117, 99, 116, 115, - 73, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 34, 80, 114, 111, 100, 117, 99, 116, 115, 34, 41, 10, 114, 101, 116, -117, 114, 110, 32, 110, 111, 100, 101, 46, 105, 100, 32, 61, 61, 32, 112, 114, 111, 100, 117, 99, 116, 115, 73, 100, 32, 97, 110, 100, 32, 110, 111, -100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 114, 111, 106, 101, 99, 116, 32, 97, 110, 100, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, -116, 46, 112, 114, 111, 106, 101, 99, 116, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, 10, 101, 110, 100, 10, -105, 102, 32, 105, 115, 65, 103, 103, 114, 101, 103, 97, 116, 101, 84, 97, 114, 103, 101, 116, 40, 110, 111, 100, 101, 41, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, -103, 114, 111, 117, 112, 105, 100, 32, 111, 114, 32, 110, 111, 100, 101, 46, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, - 10, 105, 102, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 32, 61, 61, 32, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 32, 116, -104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 80, 114, 111, 100, 117, 99, 116, 115, 32, 42, 47, 32, 61, 32, 123, 39, - 44, 32, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, 103, 114, 111, 117, 112, 105, 100, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 50, - 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, 110, 111, 100, -101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, 71, 114, 111, 117, 112, - 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 40, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, - 99, 104, 105, 108, 100, 110, 111, 100, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, -110, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 105, 115, 65, 103, 103, 114, 101, 103, 97, 116, 101, 84, 97, 114, 103, 101, 116, 40, 99, -104, 105, 108, 100, 110, 111, 100, 101, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, - 44, 39, 44, 32, 99, 104, 105, 108, 100, 110, 111, 100, 101, 46, 105, 100, 44, 32, 99, 104, 105, 108, 100, 110, 111, 100, 101, 46, 110, 97, 109, 101, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 112, 97, 114, -101, 110, 116, 32, 61, 61, 32, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 39, 110, 97, -109, 101, 32, 61, 32, 80, 114, 111, 100, 117, 99, 116, 115, 59, 39, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 51, 44, 39, 110, 97, 109, 101, - 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 110, - 97, 109, 101, 41, 41, 10, 108, 111, 99, 97, 108, 32, 118, 112, 97, 116, 104, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 118, -112, 97, 116, 104, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, -111, 100, 101, 46, 112, 97, 116, 104, 32, 97, 110, 100, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 126, 61, 32, 118, 112, 97, 116, 104, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 10, 105, 102, 32, 110, 111, 100, 101, - 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 112, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 116, 104, 44, 32, 110, 111, 100, 101, 46, 112, 97, -116, 104, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 112, 97, 116, 104, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, -103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 112, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 115, 111, -117, 114, 99, 101, 84, 114, 101, 101, 32, 61, 32, 34, 60, 103, 114, 111, 117, 112, 62, 34, 59, 39, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, - 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, - 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, -101, 103, 105, 110, 32, 80, 66, 88, 71, 114, 111, 117, 112, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 112, 114, 105, 110, 116, - 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 39, 47, - 42, 32, 69, 110, 100, 32, 80, 66, 88, 71, 114, 111, 117, 112, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, - 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 95, - 71, 101, 116, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, - 67, 111, 109, 109, 97, 110, 100, 73, 110, 102, 111, 115, 32, 61, 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, -116, 114, 44, 32, 123, 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, - 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 105, 100, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -105, 110, 102, 111, 32, 61, 32, 123, 10, 110, 111, 100, 101, 32, 61, 32, 110, 111, 100, 101, 44, 10, 105, 110, 112, 117, 116, 115, 32, 61, 32, 123, - 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 32, 125, 44, 10, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 123, 125, 44, 10, 100, -101, 112, 101, 110, 100, 115, 32, 61, 32, 123, 125, 44, 10, 116, 114, 97, 110, 115, 97, 99, 116, 32, 61, 32, 102, 97, 108, 115, 101, 44, 10, 125, - 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 116, -114, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, -108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, - 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 105, 110, 102, 111, 46, 105, 110, 112, 117, 116, 115, 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 118, 41, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, - 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, -116, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 105, 110, 102, 111, 46, 111, 117, 116, 112, 117, 116, 115, - 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 118, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 98, -117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 73, 110, 102, 111, 115, 44, 32, 105, 110, 102, 111, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -125, 41, 10, 102, 111, 114, 32, 95, 44, 32, 109, 105, 110, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, 117, 105, 108, 100, 67, 111, -109, 109, 97, 110, 100, 73, 110, 102, 111, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, 116, 104, 101, 105, 114, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 73, 110, 102, 111, 115, 41, 32, 100, 111, 10, 105, 102, 32, 109, -105, 110, 101, 32, 126, 61, 32, 116, 104, 101, 105, 114, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 105, 110, 112, 117, 116, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 109, 105, 110, 101, 46, 105, 110, 112, 117, 116, 115, 41, 32, 100, 111, 10, 105, 102, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 116, 104, 101, 105, 114, 46, 111, 117, 116, 112, 117, 116, 115, 44, 32, 105, 110, 112, 117, 116, 41, - 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 109, 105, 110, 101, 46, 100, 101, 112, 101, 110, 100, 115, 44, - 32, 116, 104, 101, 105, 114, 41, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, - 32, 108, 101, 102, 116, 111, 118, 101, 114, 32, 61, 32, 35, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 73, 110, 102, 111, 115, 10, 119, -104, 105, 108, 101, 32, 108, 101, 102, 116, 111, 118, 101, 114, 32, 62, 32, 48, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 101, 118, 32, - 61, 32, 108, 101, 102, 116, 111, 118, 101, 114, 10, 102, 111, 114, 32, 95, 44, 32, 105, 110, 102, 111, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 73, 110, 102, 111, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 105, 110, -102, 111, 46, 116, 114, 97, 110, 115, 97, 99, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 114, 97, 110, 115, 97, 99, 116, 32, - 61, 32, 116, 114, 117, 101, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 112, 101, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 105, -110, 102, 111, 46, 100, 101, 112, 101, 110, 100, 115, 41, 32, 100, 111, 10, 116, 114, 97, 110, 115, 97, 99, 116, 32, 61, 32, 100, 101, 112, 101, 110, -100, 46, 116, 114, 97, 110, 115, 97, 99, 116, 10, 105, 102, 32, 110, 111, 116, 32, 116, 114, 97, 110, 115, 97, 99, 116, 32, 116, 104, 101, 110, 10, - 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 116, 114, 97, 110, 115, 97, 99, 116, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 44, 32, 105, 110, 102, 111, 46, -110, 111, 100, 101, 41, 10, 105, 110, 102, 111, 46, 116, 114, 97, 110, 115, 97, 99, 116, 32, 61, 32, 116, 114, 117, 101, 10, 108, 101, 102, 116, 111, -118, 101, 114, 32, 61, 32, 108, 101, 102, 116, 111, 118, 101, 114, 32, 45, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, -102, 32, 112, 114, 101, 118, 32, 61, 61, 32, 108, 101, 102, 116, 111, 118, 101, 114, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 39, 100, -101, 116, 101, 99, 116, 32, 99, 105, 114, 99, 117, 108, 97, 114, 32, 114, 101, 102, 101, 114, 101, 110, 99, 101, 46, 39, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 95, 80, 66, 88, 65, 103, 103, 114, 101, 103, 97, 116, 101, 79, 114, - 78, 97, 116, 105, 118, 101, 84, 97, 114, 103, 101, 116, 40, 116, 114, 44, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 10, -108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 115, 32, 61, 32, 123, 10, 65, 103, 103, 114, 101, 103, 97, 116, 101, 32, 61, 32, 123, 10, 34, 85, -116, 105, 108, 105, 116, 121, 34, 44, 10, 125, 44, 10, 78, 97, 116, 105, 118, 101, 32, 61, 32, 123, 10, 34, 67, 111, 110, 115, 111, 108, 101, 65, -112, 112, 34, 44, 10, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 10, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, - 10, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 10, 125, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 84, 97, 114, 103, -101, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 95, 44, 32, 110, 111, 100, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 104, 97, 115, 84, 97, 114, -103, 101, 116, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 107, 105, 110, 100, 115, 91, 112, 98, 120, 84, 97, -114, 103, 101, 116, 78, 97, 109, 101, 93, 44, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, 100, 41, 10, 105, 102, 32, 104, 97, 115, - 84, 97, 114, 103, 101, 116, 32, 116, 104, 101, 110, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, - 32, 104, 97, 115, 84, 97, 114, 103, 101, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 95, 112, 40, 39, 47, - 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 37, 115, 84, 97, 114, 103, 101, 116, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 44, - 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, -110, 100, 115, 32, 61, 32, 120, 99, 111, 100, 101, 95, 71, 101, 116, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 116, 114, 41, - 10, 102, 111, 114, 32, 95, 44, 32, 110, 111, 100, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, -116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 116, 114, 46, -112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 104, 97, 115, 66, -117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 119, 104, 105, 99, 104, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 102, 103, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, 41, 32, 100, 111, 10, 105, 102, 32, 35, 99, 102, 103, 91, -119, 104, 105, 99, 104, 93, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, -110, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 105, 100, 44, 32, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, - 32, 80, 66, 88, 37, 115, 84, 97, 114, 103, 101, 116, 59, 39, 44, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 10, 95, -112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 32, 61, 32, 37, 115, - 32, 47, 42, 32, 66, 117, 105, 108, 100, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 108, 105, 115, 116, 32, 102, 111, 114, - 32, 80, 66, 88, 37, 115, 84, 97, 114, 103, 101, 116, 32, 34, 37, 115, 34, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 99, 102, 103, -115, 101, 99, 116, 105, 111, 110, 44, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 44, 32, 101, 115, 99, 97, 112, 101, 83, 101, -116, 116, 105, 110, 103, 40, 110, 97, 109, 101, 41, 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 80, 104, 97, 115, 101, 115, 32, 61, - 32, 40, 39, 41, 10, 105, 102, 32, 104, 97, 115, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 39, 112, 114, 101, 98, 117, 105, -108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 57, 54, 48, 55, 65, 69, 49, 48, - 49, 48, 67, 56, 53, 55, 69, 53, 48, 48, 67, 68, 49, 51, 55, 54, 32, 47, 42, 32, 80, 114, 101, 98, 117, 105, 108, 100, 32, 42, 47, 44, - 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, 117, 105, 108, 100, 67, -111, 109, 109, 97, 110, 100, 115, 41, 32, 100, 111, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 66, 117, 105, 108, 100, 32, 34, 37, -115, 34, 32, 42, 47, 44, 39, 44, 32, 118, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 105, 100, 44, 32, 118, 46, 110, 97, 109, -101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 78, 97, 116, 105, -118, 101, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 82, 101, 115, 111, 117, 114, 99, 101, 115, 32, 42, - 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 114, 101, 115, 115, 116, 97, 103, 101, 105, 100, 41, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, - 42, 32, 83, 111, 117, 114, 99, 101, 115, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 115, 111, 117, 114, 99, 101, 115, 105, 100, 41, 10, -101, 110, 100, 10, 105, 102, 32, 104, 97, 115, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 39, 112, 114, 101, 108, 105, 110, 107, - 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 57, 54, 48, 55, 65, 69, 51, 53, 49, 48, - 67, 56, 53, 69, 55, 69, 48, 48, 67, 68, 49, 51, 55, 54, 32, 47, 42, 32, 80, 114, 101, 108, 105, 110, 107, 32, 42, 47, 44, 39, 41, 10, -101, 110, 100, 10, 105, 102, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 78, 97, 116, 105, 118, 101, 34, - 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 32, 42, 47, 44, - 39, 44, 32, 110, 111, 100, 101, 46, 102, 120, 115, 116, 97, 103, 101, 105, 100, 41, 10, 101, 110, 100, 10, 105, 102, 32, 104, 97, 115, 66, 117, 105, -108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 39, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 32, -116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 57, 54, 48, 55, 65, 69, 51, 55, 49, 48, 67, 56, 53, 69, 56, 70, 48, 48, 67, 68, 49, - 51, 55, 54, 32, 47, 42, 32, 80, 111, 115, 116, 98, 117, 105, 108, 100, 32, 42, 47, 44, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, - 39, 41, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 82, 117, 108, 101, 115, 32, 61, 32, 40, 39, 41, 10, 95, 112, 40, - 51, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 61, 32, 40, 39, 41, - 10, 102, 111, 114, 32, 95, 44, 32, 110, 111, 100, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, -116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 80, 66, 88, 84, - 97, 114, 103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 116, 97, 114, 103, 101, -116, 100, 101, 112, 101, 110, 100, 105, 100, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, -110, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 97, -109, 101, 41, 41, 10, 105, 102, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 78, 97, 116, 105, 118, 101, - 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 10, 105, 102, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, 100, 32, - 61, 61, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 32, 116, 104, 101, 110, 10, 112, 32, 61, 32, 34, 36, 40, 72, 79, 77, 69, - 41, 47, 98, 105, 110, 34, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, - 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 32, 116, 104, 101, 110, 10, 112, 32, 61, 32, 34, 36, 40, 72, 79, 77, 69, 41, 47, 65, -112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 115, 34, 10, 101, 110, 100, 10, 105, 102, 32, 112, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, - 39, 112, 114, 111, 100, 117, 99, 116, 73, 110, 115, 116, 97, 108, 108, 80, 97, 116, 104, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, -110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 112, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 112, -114, 111, 100, 117, 99, 116, 78, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, -105, 110, 103, 40, 110, 97, 109, 101, 41, 41, 10, 105, 102, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, - 78, 97, 116, 105, 118, 101, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 100, 117, 99, 116, 82, 101, 102, 101, 114, 101, -110, 99, 101, 32, 61, 32, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, 110, 111, -100, 101, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 100, 117, 99, 116, 84, 121, 112, 101, 32, 61, 32, 37, 115, 59, - 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 120, 99, 111, 100, 101, 46, 103, 101, 116, 112, 114, 111, -100, 117, 99, 116, 116, 121, 112, 101, 40, 110, 111, 100, 101, 41, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, -101, 110, 100, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 37, 115, 84, 97, 114, 103, 101, 116, 32, 115, 101, 99, 116, 105, -111, 110, 32, 42, 47, 39, 44, 32, 112, 98, 120, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 65, 103, 103, 114, 101, 103, 97, 116, 101, 84, 97, 114, -103, 101, 116, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 95, 80, 66, 88, 65, 103, 103, 114, 101, 103, 97, 116, 101, 79, 114, 78, 97, 116, 105, -118, 101, 84, 97, 114, 103, 101, 116, 40, 116, 114, 44, 32, 34, 65, 103, 103, 114, 101, 103, 97, 116, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 78, 97, 116, 105, 118, 101, 84, 97, 114, 103, 101, 116, 40, 116, 114, 41, - 10, 120, 99, 111, 100, 101, 95, 80, 66, 88, 65, 103, 103, 114, 101, 103, 97, 116, 101, 79, 114, 78, 97, 116, 105, 118, 101, 84, 97, 114, 103, 101, -116, 40, 116, 114, 44, 32, 34, 78, 97, 116, 105, 118, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, -100, 101, 46, 80, 66, 88, 80, 114, 111, 106, 101, 99, 116, 40, 116, 114, 41, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, - 66, 88, 80, 114, 111, 106, 101, 99, 116, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 50, 44, 39, 48, 56, 70, - 66, 55, 55, 57, 51, 70, 69, 56, 52, 49, 53, 53, 68, 67, 48, 50, 65, 65, 67, 48, 55, 32, 47, 42, 32, 80, 114, 111, 106, 101, 99, 116, - 32, 111, 98, 106, 101, 99, 116, 32, 42, 47, 32, 61, 32, 123, 39, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, - 80, 114, 111, 106, 101, 99, 116, 59, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 112, 97, 98, 105, 108, 105, 116, 105, 101, 115, 32, 61, 32, -116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, 100, 101, 115, 121, 115, 116, 101, 109, 99, 97, 112, 97, 98, 105, 108, 105, 116, 105, -101, 115, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 99, 97, 112, 97, 98, 105, 108, 105, -116, 105, 101, 115, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, -121, 115, 40, 99, 97, 112, 97, 98, 105, 108, 105, 116, 105, 101, 115, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 107, 101, 121, 115, - 41, 10, 95, 112, 40, 51, 44, 32, 39, 97, 116, 116, 114, 105, 98, 117, 116, 101, 115, 32, 61, 32, 123, 39, 41, 10, 95, 112, 40, 52, 44, 32, - 39, 84, 97, 114, 103, 101, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 32, 61, 32, 123, 39, 41, 10, 95, 112, 40, 53, 44, 32, 39, 37, -115, 32, 61, 32, 123, 39, 44, 32, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, -110, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 105, 100, 41, 10, 95, 112, 40, 54, 44, 32, 39, 83, 121, 115, 116, 101, 109, 67, 97, 112, 97, - 98, 105, 108, 105, 116, 105, 101, 115, 32, 61, 32, 123, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 107, 101, 121, 32, 105, 110, 32, 112, 97, 105, -114, 115, 40, 107, 101, 121, 115, 41, 32, 100, 111, 10, 95, 112, 40, 55, 44, 32, 39, 37, 115, 32, 61, 32, 123, 39, 44, 32, 107, 101, 121, 41, - 10, 95, 112, 40, 56, 44, 32, 39, 101, 110, 97, 98, 108, 101, 100, 32, 61, 32, 37, 100, 59, 39, 44, 32, 105, 105, 102, 40, 99, 97, 112, 97, - 98, 105, 108, 105, 116, 105, 101, 115, 91, 107, 101, 121, 93, 44, 32, 49, 44, 32, 48, 41, 41, 10, 95, 112, 40, 55, 44, 32, 39, 125, 59, 39, - 41, 10, 101, 110, 100, 10, 95, 112, 40, 54, 44, 32, 39, 125, 59, 39, 41, 10, 95, 112, 40, 53, 44, 32, 39, 125, 59, 39, 41, 10, 95, 112, - 40, 52, 44, 32, 39, 125, 59, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, - 98, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 32, 61, 32, 49, 68, 69, 66, 57, 50, 56, - 57, 48, 56, 55, 51, 51, 68, 68, 56, 48, 48, 49, 48, 69, 57, 67, 68, 32, 47, 42, 32, 66, 117, 105, 108, 100, 32, 99, 111, 110, 102, 105, -103, 117, 114, 97, 116, 105, 111, 110, 32, 108, 105, 115, 116, 32, 102, 111, 114, 32, 80, 66, 88, 80, 114, 111, 106, 101, 99, 116, 32, 34, 37, 115, - 34, 32, 42, 47, 59, 39, 44, 32, 116, 114, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 99, 111, 109, 112, 97, 116, 105, 98, 105, -108, 105, 116, 121, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 88, 99, 111, 100, 101, 32, 51, 46, 50, 34, 59, 39, 41, 10, 95, 112, 40, - 51, 44, 39, 104, 97, 115, 83, 99, 97, 110, 110, 101, 100, 70, 111, 114, 69, 110, 99, 111, 100, 105, 110, 103, 115, 32, 61, 32, 49, 59, 39, 41, - 10, 95, 112, 40, 51, 44, 39, 109, 97, 105, 110, 71, 114, 111, 117, 112, 32, 61, 32, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 59, 39, - 44, 32, 116, 114, 46, 105, 100, 44, 32, 116, 114, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 106, 101, 99, 116, 68, -105, 114, 80, 97, 116, 104, 32, 61, 32, 34, 34, 59, 39, 41, 10, 105, 102, 32, 35, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 46, 99, -104, 105, 108, 100, 114, 101, 110, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 106, 101, 99, 116, 82, 101, -102, 101, 114, 101, 110, 99, 101, 115, 32, 61, 32, 40, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 110, 111, 100, 101, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 95, 112, - 40, 52, 44, 39, 123, 39, 41, 10, 95, 112, 40, 53, 44, 39, 80, 114, 111, 100, 117, 99, 116, 71, 114, 111, 117, 112, 32, 61, 32, 37, 115, 32, - 47, 42, 32, 80, 114, 111, 100, 117, 99, 116, 115, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, 103, 114, -111, 117, 112, 105, 100, 41, 10, 95, 112, 40, 53, 44, 39, 80, 114, 111, 106, 101, 99, 116, 82, 101, 102, 32, 61, 32, 37, 115, 32, 47, 42, 32, - 37, 115, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 110, -111, 100, 101, 46, 112, 97, 116, 104, 41, 41, 10, 95, 112, 40, 52, 44, 39, 125, 44, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, - 41, 59, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 112, 114, 111, 106, 101, 99, 116, 82, 111, 111, 116, 32, 61, 32, 34, 34, 59, - 39, 41, 10, 95, 112, 40, 51, 44, 39, 116, 97, 114, 103, 101, 116, 115, 32, 61, 32, 40, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 110, 111, -100, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, -110, 41, 32, 100, 111, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, -116, 97, 114, 103, 101, 116, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 41, - 59, 39, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 80, 114, 111, -106, 101, 99, 116, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 120, 121, 40, 116, 114, - 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, -114, 115, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 105, 100, 93, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 39, - 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, - 61, 32, 80, 66, 88, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 120, 121, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 102, 105, 108, -101, 84, 121, 112, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 116, 121, 112, -101, 40, 110, 111, 100, 101, 41, 41, 10, 95, 112, 40, 51, 44, 39, 112, 97, 116, 104, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, -110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 41, 10, 95, 112, 40, 51, 44, 39, 114, -101, 109, 111, 116, 101, 82, 101, 102, 32, 61, 32, 37, 115, 32, 47, 42, 32, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, -109, 80, 114, 111, 120, 121, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 114, 111, 100, 117, 99, 116, -112, 114, 111, 120, 121, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 115, 111, 117, 114, 99, 101, 84, 114, 101, 101, 32, 61, 32, 66, 85, 73, 76, - 84, 95, 80, 82, 79, 68, 85, 67, 84, 83, 95, 68, 73, 82, 59, 39, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 125, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, -116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 82, 101, 102, 101, -114, 101, 110, 99, 101, 80, 114, 111, 120, 121, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, -116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 39, 47, 42, 32, 69, -110, 100, 32, 80, 66, 88, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 120, 121, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, - 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, - 80, 66, 88, 82, 101, 115, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, 114, 41, 10, 95, 112, 40, 39, 47, - 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 82, 101, 115, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 32, 115, -101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 116, 97, 114, 103, 101, 116, 32, 105, 110, 32, 105, 112, 97, -105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 95, 112, 40, - 50, 44, 39, 37, 115, 32, 47, 42, 32, 82, 101, 115, 111, 117, 114, 99, 101, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 116, 97, 114, 103, -101, 116, 46, 114, 101, 115, 115, 116, 97, 103, 101, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, 82, 101, -115, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, - 65, 99, 116, 105, 111, 110, 77, 97, 115, 107, 32, 61, 32, 50, 49, 52, 55, 52, 56, 51, 54, 52, 55, 59, 39, 41, 10, 95, 112, 40, 51, 44, - 39, 102, 105, 108, 101, 115, 32, 61, 32, 40, 39, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, - 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 120, 99, 111, 100, -101, 46, 103, 101, 116, 98, 117, 105, 108, 100, 99, 97, 116, 101, 103, 111, 114, 121, 40, 110, 111, 100, 101, 41, 32, 61, 61, 32, 34, 82, 101, 115, -111, 117, 114, 99, 101, 115, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 105, 110, 32, 82, -101, 115, 111, 117, 114, 99, 101, 115, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 44, 32, 110, 111, 100, -101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 10, 95, 112, - 40, 51, 44, 39, 114, 117, 110, 79, 110, 108, 121, 70, 111, 114, 68, 101, 112, 108, 111, 121, 109, 101, 110, 116, 80, 111, 115, 116, 112, 114, 111, 99, -101, 115, 115, 105, 110, 103, 32, 61, 32, 48, 59, 39, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, - 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 82, 101, 115, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 32, 115, -101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -120, 99, 111, 100, 101, 46, 80, 66, 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, -114, 41, 10, 108, 111, 99, 97, 108, 32, 119, 114, 97, 112, 112, 101, 114, 87, 114, 105, 116, 116, 101, 110, 32, 61, 32, 102, 97, 108, 115, 101, 10, -108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 98, 108, 111, 99, 107, 40, 105, 100, 44, 32, 110, 97, 109, 101, 44, - 32, 119, 104, 105, 99, 104, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, - 95, 44, 32, 99, 102, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, 41, 32, 100, 111, 10, -108, 111, 99, 97, 108, 32, 99, 102, 103, 99, 109, 100, 115, 32, 61, 32, 99, 102, 103, 91, 119, 104, 105, 99, 104, 93, 10, 105, 102, 32, 35, 99, -102, 103, 99, 109, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 109, -109, 97, 110, 100, 115, 44, 32, 39, 105, 102, 32, 91, 32, 34, 36, 123, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 73, 79, 78, 125, 34, 32, - 61, 32, 34, 39, 32, 46, 46, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 32, 46, 46, 32, 39, 34, 32, 93, 59, 32, 116, 104, -101, 110, 39, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 102, 103, 99, 109, 100, 115, 32, 100, 111, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 99, 102, 103, 99, 109, 100, 115, 91, 105, 93, 41, 10, 101, -110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 39, 102, 105, 39, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 49, 44, 32, 39, 115, 101, 116, 32, 45, 101, 39, - 41, 32, 45, 45, 32, 84, 101, 108, 108, 115, 32, 116, 104, 101, 32, 115, 104, 101, 108, 108, 32, 116, 111, 32, 101, 120, 105, 116, 32, 119, 104, 101, -110, 32, 97, 110, 121, 32, 99, 111, 109, 109, 97, 110, 100, 32, 102, 97, 105, 108, 115, 10, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 111, -115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 112, 46, - 77, 65, 67, 79, 83, 88, 41, 10, 105, 102, 32, 110, 111, 116, 32, 119, 114, 97, 112, 112, 101, 114, 87, 114, 105, 116, 116, 101, 110, 32, 116, 104, -101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 66, 117, -105, 108, 100, 80, 104, 97, 115, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 119, 114, 97, 112, 112, 101, 114, 87, 114, 105, -116, 116, 101, 110, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, - 47, 32, 61, 32, 123, 39, 44, 32, 105, 100, 44, 32, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, - 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, - 98, 117, 105, 108, 100, 65, 99, 116, 105, 111, 110, 77, 97, 115, 107, 32, 61, 32, 50, 49, 52, 55, 52, 56, 51, 54, 52, 55, 59, 39, 41, 10, - 95, 112, 40, 51, 44, 39, 102, 105, 108, 101, 115, 32, 61, 32, 40, 39, 41, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, - 51, 44, 39, 105, 110, 112, 117, 116, 80, 97, 116, 104, 115, 32, 61, 32, 40, 39, 41, 59, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 59, - 10, 95, 112, 40, 51, 44, 39, 110, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 110, 97, 109, 101, 41, 59, 10, 95, 112, 40, 51, 44, - 39, 111, 117, 116, 112, 117, 116, 80, 97, 116, 104, 115, 32, 61, 32, 40, 39, 41, 59, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 59, 10, - 95, 112, 40, 51, 44, 39, 114, 117, 110, 79, 110, 108, 121, 70, 111, 114, 68, 101, 112, 108, 111, 121, 109, 101, 110, 116, 80, 111, 115, 116, 112, 114, -111, 99, 101, 115, 115, 105, 110, 103, 32, 61, 32, 48, 59, 39, 41, 59, 10, 95, 112, 40, 51, 44, 39, 115, 104, 101, 108, 108, 80, 97, 116, 104, - 32, 61, 32, 47, 98, 105, 110, 47, 115, 104, 59, 39, 41, 59, 10, 95, 112, 40, 51, 44, 39, 115, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, - 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 116, 97, 98, 108, 101, 46, - 99, 111, 110, 99, 97, 116, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 39, 92, 110, 39, 41, 41, 41, 10, 95, 112, 40, 50, 44, 39, 125, - 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 100, 111, 98, 108, 111, 99, 107, 40, 34, 57, 54, 48, 55, 65, 69, 49, 48, 49, 48, 67, - 56, 53, 55, 69, 53, 48, 48, 67, 68, 49, 51, 55, 54, 34, 44, 32, 34, 80, 114, 101, 98, 117, 105, 108, 100, 34, 44, 32, 34, 112, 114, 101, - 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, - 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 110, 111, 100, 101, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 99, 111, 109, -109, 97, 110, 100, 105, 100, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 99, -111, 109, 109, 97, 110, 100, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 108, 101, 118, 101, 108, 41, 10, 108, 111, 99, 97, -108, 32, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 105, 110, 112, 117, 116, 115, 32, 61, 32, 123, -125, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, -112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, - 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, -110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 39, 105, 102, 32, 91, 32, 34, - 36, 123, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 73, 79, 78, 125, 34, 32, 61, 32, 34, 39, 32, 46, 46, 32, 99, 102, 103, 46, 98, 117, -105, 108, 100, 99, 102, 103, 32, 46, 46, 32, 39, 34, 32, 93, 59, 32, 116, 104, 101, 110, 39, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, -103, 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 39, 92, 116, 101, 99, 104, 111, 32, 34, 39, 32, 46, 46, 32, 102, 105, 108, 101, 99, 102, 103, - 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, - 99, 109, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, -116, 104, 115, 40, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 102, 105, 108, 101, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 109, 100, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 99, 109, 100, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 109, 109, 97, 110, 100, -115, 44, 32, 39, 92, 116, 39, 32, 46, 46, 32, 99, 109, 100, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 39, 102, 105, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, -105, 114, 115, 40, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 32, 100, 111, 10, 105, 110, 112, 117, -116, 115, 91, 118, 93, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, -105, 114, 115, 40, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 32, 100, 111, 10, 111, 117, 116, -112, 117, 116, 115, 91, 118, 93, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, -111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, -109, 109, 97, 110, 100, 115, 44, 32, 49, 44, 32, 39, 115, 101, 116, 32, 45, 101, 39, 41, 32, 45, 45, 32, 84, 101, 108, 108, 115, 32, 116, 104, -101, 32, 115, 104, 101, 108, 108, 32, 116, 111, 32, 101, 120, 105, 116, 32, 119, 104, 101, 110, 32, 97, 110, 121, 32, 99, 111, 109, 109, 97, 110, 100, - 32, 102, 97, 105, 108, 115, 10, 101, 110, 100, 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 39, 37, 115, 32, 47, 42, 32, 66, 117, 105, 108, 100, - 32, 34, 37, 115, 34, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, -105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 105, 115, 97, 32, 61, - 32, 80, 66, 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 59, 39, 41, 10, 95, 112, 40, -108, 101, 118, 101, 108, 43, 49, 44, 39, 98, 117, 105, 108, 100, 65, 99, 116, 105, 111, 110, 77, 97, 115, 107, 32, 61, 32, 50, 49, 52, 55, 52, - 56, 51, 54, 52, 55, 59, 39, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 102, 105, 108, 101, 115, 32, 61, 32, 40, 39, 41, - 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 105, 110, -112, 117, 116, 80, 97, 116, 104, 115, 32, 61, 32, 40, 39, 41, 59, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 50, 44, 39, 34, 37, 115, 34, - 44, 39, 44, 32, 101, 115, 99, 97, 112, 101, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 41, - 10, 102, 111, 114, 32, 118, 44, 32, 95, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 105, 110, 112, 117, 116, 115, 41, 32, 100, 111, 10, 95, 112, - 40, 108, 101, 118, 101, 108, 43, 50, 44, 39, 34, 37, 115, 34, 44, 39, 44, 32, 101, 115, 99, 97, 112, 101, 83, 101, 116, 116, 105, 110, 103, 40, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, -118, 41, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, 108, 101, 118, -101, 108, 43, 49, 44, 39, 110, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, 121, 83, 101, 116, 116, -105, 110, 103, 40, 39, 66, 117, 105, 108, 100, 32, 34, 39, 32, 46, 46, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 46, 46, 32, 39, 34, - 39, 41, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 111, 117, 116, 112, 117, 116, 80, 97, 116, 104, 115, 32, 61, 32, 40, 39, - 41, 10, 102, 111, 114, 32, 118, 44, 32, 95, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 111, 117, 116, 112, 117, 116, 115, 41, 32, 100, 111, 10, - 95, 112, 40, 108, 101, 118, 101, 108, 43, 50, 44, 39, 34, 37, 115, 34, 44, 39, 44, 32, 101, 115, 99, 97, 112, 101, 83, 101, 116, 116, 105, 110, -103, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 32, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 118, 41, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, -108, 101, 118, 101, 108, 43, 49, 44, 39, 114, 117, 110, 79, 110, 108, 121, 70, 111, 114, 68, 101, 112, 108, 111, 121, 109, 101, 110, 116, 80, 111, 115, -116, 112, 114, 111, 99, 101, 115, 115, 105, 110, 103, 32, 61, 32, 48, 59, 39, 41, 59, 10, 95, 112, 40, 108, 101, 118, 101, 108, 43, 49, 44, 39, -115, 104, 101, 108, 108, 80, 97, 116, 104, 32, 61, 32, 47, 98, 105, 110, 47, 115, 104, 59, 39, 41, 59, 10, 95, 112, 40, 108, 101, 118, 101, 108, - 43, 49, 44, 39, 115, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, 102, -121, 83, 101, 116, 116, 105, 110, 103, 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, - 39, 92, 110, 39, 41, 41, 41, 10, 95, 112, 40, 108, 101, 118, 101, 108, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 125, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, 116, 105, -110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 119, 114, 97, 112, 112, 101, 114, 87, 114, 105, 116, 116, 101, 110, 32, -116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, - 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 119, 114, 97, 112, 112, 101, 114, 87, -114, 105, 116, 116, 101, 110, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, - 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 100, 111, 98, 108, 111, 99, 107, 40, 34, 57, - 54, 48, 55, 65, 69, 51, 53, 49, 48, 67, 56, 53, 69, 55, 69, 48, 48, 67, 68, 49, 51, 55, 54, 34, 44, 32, 34, 80, 114, 101, 108, 105, -110, 107, 34, 44, 32, 34, 112, 114, 101, 108, 105, 110, 107, 99, 111, 109, 109, 97, 110, 100, 115, 34, 41, 10, 100, 111, 98, 108, 111, 99, 107, 40, - 34, 57, 54, 48, 55, 65, 69, 51, 55, 49, 48, 67, 56, 53, 69, 56, 70, 48, 48, 67, 68, 49, 51, 55, 54, 34, 44, 32, 34, 80, 111, 115, -116, 98, 117, 105, 108, 100, 34, 44, 32, 34, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 34, 41, 10, 105, 102, - 32, 119, 114, 97, 112, 112, 101, 114, 87, 114, 105, 116, 116, 101, 110, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, - 80, 66, 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 32, 115, 101, 99, 116, 105, 111, 110, - 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, -111, 100, 101, 46, 80, 66, 88, 83, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, 114, 41, 10, 95, 112, 40, - 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 83, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 32, 115, -101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 116, 97, 114, 103, 101, 116, 32, 105, 110, 32, 105, 112, 97, -105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 95, 112, 40, - 50, 44, 39, 37, 115, 32, 47, 42, 32, 83, 111, 117, 114, 99, 101, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 116, 97, 114, 103, 101, 116, - 46, 115, 111, 117, 114, 99, 101, 115, 105, 100, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, 83, 111, 117, 114, 99, -101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 65, 99, 116, 105, 111, -110, 77, 97, 115, 107, 32, 61, 32, 50, 49, 52, 55, 52, 56, 51, 54, 52, 55, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 102, 105, 108, 101, -115, 32, 61, 32, 40, 39, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, - 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, - 98, 117, 105, 108, 100, 99, 97, 116, 101, 103, 111, 114, 121, 40, 110, 111, 100, 101, 41, 32, 61, 61, 32, 34, 83, 111, 117, 114, 99, 101, 115, 34, - 32, 97, 110, 100, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 32, 116, 104, 101, 110, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, - 47, 42, 32, 37, 115, 32, 105, 110, 32, 83, 111, 117, 114, 99, 101, 115, 32, 42, 47, 44, 39, 44, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, -100, 105, 100, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 95, 112, 40, 51, 44, - 39, 41, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 114, 117, 110, 79, 110, 108, 121, 70, 111, 114, 68, 101, 112, 108, 111, 121, 109, 101, 110, 116, - 80, 111, 115, 116, 112, 114, 111, 99, 101, 115, 115, 105, 110, 103, 32, 61, 32, 48, 59, 39, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, - 10, 101, 110, 100, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 83, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, -104, 97, 115, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 86, 97, 114, 105, 97, 110, 116, 71, 114, 111, 117, 112, 40, 116, 114, 41, 10, -108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, -101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, - 41, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, - 10, 105, 102, 32, 110, 111, 100, 101, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 118, 103, 114, 111, 117, 112, 34, 32, 116, 104, 101, 110, 10, 95, -112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 110, 111, 100, 101, 46, 105, 100, 44, 32, -110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, 86, 97, 114, 105, 97, 110, -116, 71, 114, 111, 117, 112, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 99, 104, 105, 108, 100, 114, 101, 110, 32, 61, 32, 40, 39, 41, 10, 102, -111, 114, 32, 95, 44, 32, 108, 97, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, -101, 110, 41, 32, 100, 111, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 44, 39, 44, 32, 108, 97, 110, 103, - 46, 105, 100, 44, 32, 108, 97, 110, 103, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 10, 95, -112, 40, 51, 44, 39, 110, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, - 51, 44, 39, 115, 111, 117, 114, 99, 101, 84, 114, 101, 101, 32, 61, 32, 34, 60, 103, 114, 111, 117, 112, 62, 34, 59, 39, 41, 10, 95, 112, 40, - 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, - 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, - 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 86, 97, 114, 105, 97, 110, 116, 71, 114, 111, 117, 112, 32, 115, 101, 99, 116, 105, 111, 110, 32, - 42, 47, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, -110, 103, 115, 41, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 86, 97, 114, 105, 97, 110, 116, 71, 114, 111, 117, 112, 32, -115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 80, 66, 88, 84, 97, 114, 103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 40, 116, -114, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, -101, 114, 115, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, - 46, 116, 97, 114, 103, 101, 116, 100, 101, 112, 101, 110, 100, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 95, 112, - 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 80, 66, 88, 84, 97, 114, 103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 42, 47, - 32, 61, 32, 123, 39, 44, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 116, 97, 114, 103, 101, 116, 100, 101, 112, 101, 110, 100, 105, -100, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 80, 66, 88, 84, 97, 114, 103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, - 99, 121, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 110, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 115, 116, 114, 105, 110, 103, 105, -102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 41, 10, 95, 112, 40, 51, 44, 39, 116, 97, 114, 103, -101, 116, 80, 114, 111, 120, 121, 32, 61, 32, 37, 115, 32, 47, 42, 32, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, - 80, 114, 111, 120, 121, 32, 42, 47, 59, 39, 44, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 116, 97, 114, 103, 101, 116, 112, 114, -111, 120, 121, 105, 100, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 105, 102, 32, -110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, - 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 80, 66, 88, 84, 97, 114, 103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, 99, -121, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, -101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 39, 47, 42, 32, 69, 110, 100, 32, 80, 66, 88, 84, 97, 114, -103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, - 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 84, 97, 114, 103, 101, 116, 40, 116, 114, 44, 32, 116, 97, 114, 103, 101, 116, 44, - 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 115, 101, 116, 116, 105, 110, -103, 115, 91, 39, 65, 76, 87, 65, 89, 83, 95, 83, 69, 65, 82, 67, 72, 95, 85, 83, 69, 82, 95, 80, 65, 84, 72, 83, 39, 93, 32, 61, - 32, 39, 78, 79, 39, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, -101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 68, 69, 66, 85, 71, 95, 73, 78, 70, 79, 82, 77, 65, 84, 73, 79, 78, 95, 70, - 79, 82, 77, 65, 84, 39, 93, 32, 61, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 40, 99, -102, 103, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, - 98, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 112, 114, 101, 102, 105, 120, 32, 126, 61, - 32, 39, 39, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 69, 88, 69, 67, 85, 84, 65, 66, 76, 69, 95, 80, 82, - 69, 70, 73, 88, 39, 93, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 112, 114, 101, 102, 105, 120, 10, -101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 115, 32, 61, 32, 123, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, - 32, 32, 61, 32, 34, 97, 112, 112, 34, 44, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 32, 32, 32, 61, 32, 34, 100, 121, 108, 105, 98, - 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 32, 32, 32, 61, 32, 34, 97, 34, 44, 10, 79, 83, 88, 66, 117, 110, 100, 108, 101, - 32, 32, 32, 32, 61, 32, 34, 98, 117, 110, 100, 108, 101, 34, 44, 10, 79, 83, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 34, -102, 114, 97, 109, 101, 119, 111, 114, 107, 34, 44, 10, 88, 67, 84, 101, 115, 116, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 120, 99, 116, 101, -115, 116, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, -101, 116, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 58, 115, 117, 98, 40, 50, 41, 10, 105, 102, 32, 101, 120, 116, 32, 126, 61, 32, 101, 120, -116, 115, 91, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 97, -110, 100, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 44, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, -108, 105, 98, 116, 121, 112, 101, 44, 32, 99, 102, 103, 46, 107, 105, 110, 100, 41, 93, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, -107, 105, 110, 100, 32, 61, 61, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 32, 111, 114, 32, 40, 99, 102, 103, 46, 107, 105, -110, 100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, -108, 105, 98, 116, 121, 112, 101, 41, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 87, 82, 65, 80, 80, 69, 82, 95, - 69, 88, 84, 69, 78, 83, 73, 79, 78, 39, 93, 32, 61, 32, 101, 120, 116, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, -100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 32, 111, 114, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, - 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 69, 88, 69, 67, 85, - 84, 65, 66, 76, 69, 95, 69, 88, 84, 69, 78, 83, 73, 79, 78, 39, 93, 32, 61, 32, 101, 120, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, -105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 112, 97, 116, 104, 46, 103, 101, -116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 114, 101, 108, 112, 97, -116, 104, 41, 41, 10, 105, 102, 32, 111, 117, 116, 100, 105, 114, 32, 126, 61, 32, 34, 46, 34, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, -110, 103, 115, 91, 39, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 73, 79, 78, 95, 66, 85, 73, 76, 68, 95, 68, 73, 82, 39, 93, 32, 61, - 32, 111, 117, 116, 100, 105, 114, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 68, 89, 78, 65, 77, 73, - 67, 95, 78, 79, 95, 80, 73, 67, 39, 93, 32, 61, 32, 39, 78, 79, 39, 10, 105, 102, 32, 116, 114, 46, 105, 110, 102, 111, 112, 108, 105, 115, -116, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 73, 78, 70, 79, 80, 76, 73, 83, 84, 95, 70, 73, 76, 69, 39, - 93, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 102, 105, 110, 100, 102, 105, 108, 101, 40, 99, 102, 103, 44, 32, 112, 97, 116, 104, 46, 103, 101, -116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 116, 114, 46, 105, 110, 102, 111, 112, 108, 105, 115, 116, 46, 110, 97, 109, 101, 41, 41, 10, 101, -110, 100, 10, 108, 111, 99, 97, 108, 32, 105, 110, 115, 116, 97, 108, 108, 112, 97, 116, 104, 115, 32, 61, 32, 123, 10, 67, 111, 110, 115, 111, 108, -101, 65, 112, 112, 32, 61, 32, 39, 47, 117, 115, 114, 47, 108, 111, 99, 97, 108, 47, 98, 105, 110, 39, 44, 10, 87, 105, 110, 100, 111, 119, 101, -100, 65, 112, 112, 32, 61, 32, 39, 34, 36, 40, 72, 79, 77, 69, 41, 47, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 115, 34, 39, 44, - 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 39, 47, 117, 115, 114, 47, 108, 111, 99, 97, 108, 47, 108, 105, 98, 39, 44, 10, 83, -116, 97, 116, 105, 99, 76, 105, 98, 32, 61, 32, 39, 47, 117, 115, 114, 47, 108, 111, 99, 97, 108, 47, 108, 105, 98, 39, 44, 10, 79, 83, 88, - 66, 117, 110, 100, 108, 101, 32, 61, 32, 39, 36, 40, 76, 79, 67, 65, 76, 95, 76, 73, 66, 82, 65, 82, 89, 95, 68, 73, 82, 41, 47, 66, -117, 110, 100, 108, 101, 115, 39, 44, 10, 79, 83, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 39, 36, 40, 76, 79, 67, 65, 76, - 95, 76, 73, 66, 82, 65, 82, 89, 95, 68, 73, 82, 41, 47, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 39, 44, 10, 125, 10, 115, 101, 116, -116, 105, 110, 103, 115, 91, 39, 73, 78, 83, 84, 65, 76, 76, 95, 80, 65, 84, 72, 39, 93, 32, 61, 32, 105, 110, 115, 116, 97, 108, 108, 112, - 97, 116, 104, 115, 91, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, - 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 104, 97, 114, 101, 100, 108, 105, 98, 116, 121, 112, 101, 44, 32, 99, 102, 103, 46, 115, 104, 97, 114, -101, 100, 108, 105, 98, 116, 121, 112, 101, 44, 32, 99, 102, 103, 46, 107, 105, 110, 100, 41, 93, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, - 78, 97, 109, 101, 76, 105, 115, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 95, 116, 114, 101, 101, 32, 61, 32, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, - 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 32, 97, 110, -100, 32, 110, 111, 116, 32, 110, 111, 100, 101, 46, 105, 115, 82, 101, 115, 111, 117, 114, 99, 101, 32, 97, 110, 100, 32, 110, 111, 100, 101, 46, 97, - 98, 115, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, - 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, -105, 108, 101, 99, 102, 103, 32, 97, 110, 100, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, - 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, 108, 101, - 78, 97, 109, 101, 76, 105, 115, 116, 44, 32, 101, 115, 99, 97, 112, 101, 65, 114, 103, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, -112, 116, 121, 40, 102, 105, 108, 101, 78, 97, 109, 101, 76, 105, 115, 116, 41, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, - 39, 69, 88, 67, 76, 85, 68, 69, 68, 95, 83, 79, 85, 82, 67, 69, 95, 70, 73, 76, 69, 95, 78, 65, 77, 69, 83, 39, 93, 32, 61, 32, -102, 105, 108, 101, 78, 97, 109, 101, 76, 105, 115, 116, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 80, 82, 79, 68, 85, - 67, 84, 95, 78, 65, 77, 69, 39, 93, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 67, 111, 110, -115, 111, 108, 101, 65, 112, 112, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 101, 120, 116, -101, 110, 115, 105, 111, 110, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, - 32, 46, 46, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, 10, 105, 102, 32, 111, 115, 46, 105, -115, 116, 97, 114, 103, 101, 116, 40, 112, 46, 73, 79, 83, 41, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 83, 68, - 75, 82, 79, 79, 84, 39, 93, 32, 61, 32, 39, 105, 112, 104, 111, 110, 101, 111, 115, 39, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 67, - 79, 68, 69, 95, 83, 73, 71, 78, 95, 73, 68, 69, 78, 84, 73, 84, 89, 91, 115, 100, 107, 61, 105, 112, 104, 111, 110, 101, 111, 115, 42, 93, - 39, 93, 32, 61, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 99, 111, 100, 101, 115, 105, 103, 110, 105, 110, 103, 105, 100, 101, 110, 116, 105, 116, -121, 32, 111, 114, 32, 39, 105, 80, 104, 111, 110, 101, 32, 68, 101, 118, 101, 108, 111, 112, 101, 114, 39, 10, 108, 111, 99, 97, 108, 32, 109, 105, -110, 79, 83, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, 105, -111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 109, 105, 110, 79, 83, 86, 101, 114, 115, 105, 111, 110, 32, 126, 61, 32, 110, 105, 108, 32, 116, -104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 73, 80, 72, 79, 78, 69, 79, 83, 95, 68, 69, 80, 76, 79, 89, 77, 69, 78, - 84, 95, 84, 65, 82, 71, 69, 84, 39, 93, 32, 61, 32, 109, 105, 110, 79, 83, 86, 101, 114, 115, 105, 111, 110, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 102, 97, 109, 105, 108, 105, 101, 115, 32, 61, 32, 123, 10, 91, 39, 105, 80, 104, 111, 110, 101, 47, 105, 80, 111, 100, 32, 116, -111, 117, 99, 104, 39, 93, 32, 61, 32, 39, 49, 39, 44, 10, 91, 39, 105, 80, 97, 100, 39, 93, 32, 61, 32, 39, 50, 39, 44, 10, 91, 39, - 85, 110, 105, 118, 101, 114, 115, 97, 108, 39, 93, 32, 61, 32, 39, 49, 44, 50, 39, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 102, 97, 109, -105, 108, 121, 32, 61, 32, 102, 97, 109, 105, 108, 105, 101, 115, 91, 99, 102, 103, 46, 105, 111, 115, 102, 97, 109, 105, 108, 121, 93, 10, 105, 102, - 32, 102, 97, 109, 105, 108, 121, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 84, 65, 82, 71, 69, 84, 69, 68, 95, - 68, 69, 86, 73, 67, 69, 95, 70, 65, 77, 73, 76, 89, 39, 93, 32, 61, 32, 102, 97, 109, 105, 108, 121, 10, 101, 110, 100, 10, 101, 108, 115, -101, 10, 108, 111, 99, 97, 108, 32, 109, 105, 110, 79, 83, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 115, -121, 115, 116, 101, 109, 118, 101, 114, 115, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 109, 105, 110, 79, 83, 86, 101, 114, 115, 105, 111, -110, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 77, 65, 67, 79, 83, 88, 95, 68, - 69, 80, 76, 79, 89, 77, 69, 78, 84, 95, 84, 65, 82, 71, 69, 84, 39, 93, 32, 61, 32, 109, 105, 110, 79, 83, 86, 101, 114, 115, 105, 111, -110, 10, 101, 110, 100, 10, 101, 110, 100, 10, 111, 118, 101, 114, 114, 105, 100, 101, 83, 101, 116, 116, 105, 110, 103, 115, 40, 115, 101, 116, 116, 105, -110, 103, 115, 44, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 98, 117, 105, 108, 100, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, - 50, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, 116, - 97, 114, 103, 101, 116, 105, 100, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, - 32, 61, 32, 88, 67, 66, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 59, 39, 41, 10, 95, 112, 40, 51, 44, - 39, 98, 117, 105, 108, 100, 83, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, -103, 115, 84, 97, 98, 108, 101, 40, 52, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 51, 44, 39, 125, 59, 39, 41, 10, -112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 40, 51, 44, 32, 39, 110, 97, 109, 101, 39, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, -100, 99, 102, 103, 41, 59, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 120, 99, 111, 100, 101, 46, 99, 76, 97, 110, -103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 115, 32, 61, 32, 123, 10, 91, 34, 68, 101, 102, 97, 117, 108, 116, 34, 93, 32, 61, - 32, 34, 99, 111, 109, 112, 105, 108, 101, 114, 45, 100, 101, 102, 97, 117, 108, 116, 34, 44, 32, 32, 45, 45, 32, 101, 120, 112, 108, 105, 99, 105, -116, 32, 99, 111, 109, 112, 105, 108, 101, 114, 32, 100, 101, 102, 97, 117, 108, 116, 10, 91, 34, 67, 56, 57, 34, 93, 32, 61, 32, 34, 99, 56, - 57, 34, 44, 10, 91, 34, 67, 57, 48, 34, 93, 32, 61, 32, 34, 99, 57, 48, 34, 44, 10, 91, 34, 67, 57, 57, 34, 93, 32, 61, 32, 34, - 99, 57, 57, 34, 44, 10, 91, 34, 67, 49, 49, 34, 93, 32, 61, 32, 34, 99, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 56, 57, 34, 93, - 32, 61, 32, 34, 103, 110, 117, 56, 57, 34, 44, 10, 91, 34, 103, 110, 117, 57, 48, 34, 93, 32, 61, 32, 34, 103, 110, 117, 57, 48, 34, 44, - 10, 91, 34, 103, 110, 117, 57, 57, 34, 93, 32, 61, 32, 34, 103, 110, 117, 57, 57, 34, 44, 10, 91, 34, 103, 110, 117, 49, 49, 34, 93, 32, - 61, 32, 34, 103, 110, 117, 49, 49, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, -108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 67, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, -100, 40, 115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 99, 100, 105, 97, -108, 101, 99, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 76, 97, 110, 103, -117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 99, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, - 97, 110, 100, 97, 114, 100, 115, 91, 99, 102, 103, 46, 99, 100, 105, 97, 108, 101, 99, 116, 93, 10, 105, 102, 32, 99, 76, 97, 110, 103, 117, 97, -103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 67, 95, - 76, 65, 78, 71, 85, 65, 71, 69, 95, 83, 84, 65, 78, 68, 65, 82, 68, 39, 93, 32, 61, 32, 99, 76, 97, 110, 103, 117, 97, 103, 101, 83, -116, 97, 110, 100, 97, 114, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 120, 99, 111, 100, 101, 46, 99, 112, 112, 76, 97, 110, 103, 117, 97, 103, -101, 83, 116, 97, 110, 100, 97, 114, 100, 115, 32, 61, 32, 123, 10, 91, 34, 68, 101, 102, 97, 117, 108, 116, 34, 93, 32, 61, 32, 34, 99, 111, -109, 112, 105, 108, 101, 114, 45, 100, 101, 102, 97, 117, 108, 116, 34, 44, 32, 32, 45, 45, 32, 101, 120, 112, 108, 105, 99, 105, 116, 32, 99, 111, -109, 112, 105, 108, 101, 114, 32, 100, 101, 102, 97, 117, 108, 116, 10, 91, 34, 67, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 99, 43, 43, 57, - 56, 34, 44, 10, 91, 34, 67, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 52, - 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 122, - 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 103, 110, 117, 43, 43, 57, 56, 34, 44, 10, 91, 34, 103, 110, -117, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 103, 110, 117, 43, 43, 48, 120, 34, 44, 32, 32, 45, 45, 32, 88, 99, 111, 100, 101, 32, 112, -114, 111, 106, 101, 99, 116, 32, 71, 85, 73, 32, 117, 115, 101, 115, 32, 103, 110, 117, 43, 43, 48, 120, 44, 32, 98, 117, 116, 32, 103, 110, 117, - 43, 43, 49, 49, 32, 97, 108, 115, 111, 32, 119, 111, 114, 107, 115, 10, 91, 34, 103, 110, 117, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 103, -110, 117, 43, 43, 49, 52, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 103, 110, 117, 43, 43, 49, 122, 34, - 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, -114, 97, 116, 105, 111, 110, 95, 67, 112, 112, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 40, 115, 101, 116, 116, 105, -110, 103, 115, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, -116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 112, 112, 76, 97, 110, 103, 117, 97, 103, -101, 83, 116, 97, 110, 100, 97, 114, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 99, 112, 112, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, -110, 100, 97, 114, 100, 115, 91, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 93, 10, 105, 102, 32, 99, 112, 112, 76, 97, 110, -103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 67, 76, 65, - 78, 71, 95, 67, 88, 88, 95, 76, 65, 78, 71, 85, 65, 71, 69, 95, 83, 84, 65, 78, 68, 65, 82, 68, 39, 93, 32, 61, 32, 99, 112, 112, - 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 80, 114, 111, -106, 101, 99, 116, 40, 116, 114, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, -125, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 115, 32, 61, 32, 123, 10, 78, 97, 116, 105, 118, 101, 32, 61, 32, 34, 36, 40, 78, 65, - 84, 73, 86, 69, 95, 65, 82, 67, 72, 95, 65, 67, 84, 85, 65, 76, 41, 34, 44, 10, 120, 56, 54, 32, 32, 32, 32, 61, 32, 34, 105, 51, - 56, 54, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 120, 56, 54, 95, 54, 52, 34, 44, 10, 85, 110, 105, 118, 101, 114, 115, 97, -108, 51, 50, 32, 61, 32, 34, 36, 40, 65, 82, 67, 72, 83, 95, 83, 84, 65, 78, 68, 65, 82, 68, 95, 51, 50, 95, 66, 73, 84, 41, 34, - 44, 10, 85, 110, 105, 118, 101, 114, 115, 97, 108, 54, 52, 32, 61, 32, 34, 36, 40, 65, 82, 67, 72, 83, 95, 83, 84, 65, 78, 68, 65, 82, - 68, 95, 54, 52, 95, 66, 73, 84, 41, 34, 44, 10, 85, 110, 105, 118, 101, 114, 115, 97, 108, 32, 61, 32, 34, 36, 40, 65, 82, 67, 72, 83, - 95, 83, 84, 65, 78, 68, 65, 82, 68, 95, 51, 50, 95, 54, 52, 95, 66, 73, 84, 41, 34, 44, 10, 125, 10, 115, 101, 116, 116, 105, 110, 103, -115, 91, 39, 65, 82, 67, 72, 83, 39, 93, 32, 61, 32, 97, 114, 99, 104, 115, 91, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, -111, 114, 32, 34, 78, 97, 116, 105, 118, 101, 34, 93, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 100, 105, 114, 32, 61, 32, 112, - 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, - 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 100, 105, 114, 32, 126, 61, 32, 34, 46, 34, 32, 116, 104, -101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 73, 79, 78, 95, 66, 85, 73, 76, 68, - 95, 68, 73, 82, 39, 93, 32, 61, 32, 39, 36, 40, 83, 89, 77, 82, 79, 79, 84, 41, 39, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, -103, 115, 91, 39, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 73, 79, 78, 95, 84, 69, 77, 80, 95, 68, 73, 82, 39, 93, 32, 61, 32, 39, - 36, 40, 79, 66, 74, 82, 79, 79, 84, 41, 39, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, -108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 67, 79, 80, 89, 95, 80, 72, 65, 83, - 69, 95, 83, 84, 82, 73, 80, 39, 93, 32, 61, 32, 39, 78, 79, 39, 10, 101, 110, 100, 10, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, -108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 67, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, -100, 40, 115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, 41, 10, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, 67, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 67, 112, 112, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 40, -115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, - 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, - 71, 67, 67, 95, 69, 78, 65, 66, 76, 69, 95, 67, 80, 80, 95, 69, 88, 67, 69, 80, 84, 73, 79, 78, 83, 39, 93, 32, 61, 32, 39, 78, - 79, 39, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 114, 116, 116, 105, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, - 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 69, 78, 65, 66, 76, 69, 95, 67, 80, 80, 95, 82, 84, 84, 73, 39, 93, - 32, 61, 32, 39, 78, 79, 39, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 112, 46, - 79, 78, 32, 97, 110, 100, 32, 99, 102, 103, 46, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, 110, 117, 101, 32, 126, 61, 32, 34, 79, -102, 102, 34, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 69, 78, 65, 66, 76, 69, 95, 70, 73, - 88, 95, 65, 78, 68, 95, 67, 79, 78, 84, 73, 78, 85, 69, 39, 93, 32, 61, 32, 39, 89, 69, 83, 39, 10, 101, 110, 100, 10, 105, 102, 32, - 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, -104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 69, 78, 65, 66, 76, 69, 95, 79, 66, 74, 67, 95, 69, 88, - 67, 69, 80, 84, 73, 79, 78, 83, 39, 93, 32, 61, 32, 39, 78, 79, 39, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 105, -109, 105, 122, 101, 77, 97, 112, 32, 61, 32, 123, 32, 79, 110, 32, 61, 32, 51, 44, 32, 83, 105, 122, 101, 32, 61, 32, 39, 115, 39, 44, 32, - 83, 112, 101, 101, 100, 32, 61, 32, 51, 44, 32, 70, 117, 108, 108, 32, 61, 32, 39, 102, 97, 115, 116, 39, 44, 32, 68, 101, 98, 117, 103, 32, - 61, 32, 49, 32, 125, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 79, 80, 84, 73, 77, 73, 90, 65, 84, 73, 79, 78, - 95, 76, 69, 86, 69, 76, 39, 93, 32, 61, 32, 111, 112, 116, 105, 109, 105, 122, 101, 77, 97, 112, 91, 99, 102, 103, 46, 111, 112, 116, 105, 109, -105, 122, 101, 93, 32, 111, 114, 32, 48, 10, 105, 102, 32, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 32, 97, 110, 100, 32, 110, -111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, - 91, 39, 71, 67, 67, 95, 80, 82, 69, 67, 79, 77, 80, 73, 76, 69, 95, 80, 82, 69, 70, 73, 88, 95, 72, 69, 65, 68, 69, 82, 39, 93, - 32, 61, 32, 39, 89, 69, 83, 39, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 80, 82, 69, 70, 73, 88, 95, 72, 69, - 65, 68, 69, 82, 39, 93, 32, 61, 32, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, - 32, 101, 115, 99, 97, 112, 101, 100, 68, 101, 102, 105, 110, 101, 115, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 105, 44, 118, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 41, 32, 100, 111, 10, 101, 115, 99, 97, 112, 101, 100, 68, -101, 102, 105, 110, 101, 115, 91, 105, 93, 32, 61, 32, 101, 115, 99, 97, 112, 101, 65, 114, 103, 40, 118, 41, 10, 101, 110, 100, 10, 115, 101, 116, -116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 80, 82, 69, 80, 82, 79, 67, 69, 83, 83, 79, 82, 95, 68, 69, 70, 73, 78, 73, 84, 73, - 79, 78, 83, 39, 93, 32, 61, 32, 101, 115, 99, 97, 112, 101, 100, 68, 101, 102, 105, 110, 101, 115, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, - 34, 71, 67, 67, 95, 83, 89, 77, 66, 79, 76, 83, 95, 80, 82, 73, 86, 65, 84, 69, 95, 69, 88, 84, 69, 82, 78, 34, 93, 32, 61, 32, - 39, 78, 79, 39, 10, 105, 102, 32, 99, 102, 103, 46, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, 32, 126, 61, 32, 110, 105, 108, 32, -116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 67, 72, 65, 82, 95, 73, 83, 95, 85, 78, 83, 73, 71, - 78, 69, 68, 95, 67, 72, 65, 82, 39, 93, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, -114, 44, 32, 34, 89, 69, 83, 34, 44, 32, 34, 78, 79, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, - 46, 70, 97, 116, 97, 108, 87, 97, 114, 110, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, - 67, 95, 84, 82, 69, 65, 84, 95, 87, 65, 82, 78, 73, 78, 71, 83, 95, 65, 83, 95, 69, 82, 82, 79, 82, 83, 39, 93, 32, 61, 32, 39, - 89, 69, 83, 39, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 71, 67, 67, 95, 87, 65, 82, 78, 95, 65, 66, 79, 85, - 84, 95, 82, 69, 84, 85, 82, 78, 95, 84, 89, 80, 69, 39, 93, 32, 61, 32, 39, 89, 69, 83, 39, 10, 115, 101, 116, 116, 105, 110, 103, 115, - 91, 39, 71, 67, 67, 95, 87, 65, 82, 78, 95, 85, 78, 85, 83, 69, 68, 95, 86, 65, 82, 73, 65, 66, 76, 69, 39, 93, 32, 61, 32, 39, - 89, 69, 83, 39, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 105, 110, - 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 102, 111, 114, 32, 105, 44, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 105, 110, 99, -108, 117, 100, 101, 100, 105, 114, 115, 41, 32, 100, 111, 10, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 91, 105, 93, 32, - 61, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 118, 41, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 85, 83, 69, 82, - 95, 72, 69, 65, 68, 69, 82, 95, 83, 69, 65, 82, 67, 72, 95, 80, 65, 84, 72, 83, 39, 93, 32, 61, 32, 99, 102, 103, 46, 105, 110, 99, -108, 117, 100, 101, 100, 105, 114, 115, 10, 108, 111, 99, 97, 108, 32, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 32, 61, 32, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, - 32, 99, 102, 103, 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 102, 111, 114, 32, 105, 44, 118, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 32, 100, 111, 10, 99, 102, 103, 46, 115, 121, -115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 91, 105, 93, 32, 61, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 118, 41, 10, 101, 110, -100, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 99, 102, 103, 46, 115, 121, 115, 105, 110, - 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, - 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 44, 32, 34, 36, 40, 105, 110, 104, 101, 114, 105, 116, 101, 100, 41, 34, 41, - 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 72, 69, 65, 68, 69, 82, 95, 83, 69, 65, 82, 67, 72, 95, 80, 65, 84, - 72, 83, 39, 93, 32, 61, 32, 99, 102, 103, 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 10, 102, 111, 114, 32, 105, 44, -118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 41, 32, 100, 111, 10, 99, 102, 103, 46, -108, 105, 98, 100, 105, 114, 115, 91, 105, 93, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, -118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 91, 105, 93, 41, 10, -101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 76, 73, 66, 82, 65, 82, 89, 95, 83, 69, 65, 82, 67, 72, 95, 80, 65, 84, - 72, 83, 39, 93, 32, 61, 32, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 10, 102, 111, 114, 32, 105, 44, 118, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 99, 102, 103, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 100, 105, 114, 115, 41, 32, 100, 111, 10, 99, 102, 103, 46, 102, -114, 97, 109, 101, 119, 111, 114, 107, 100, 105, 114, 115, 91, 105, 93, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, -101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 102, 114, 97, 109, 101, 119, 111, -114, 107, 100, 105, 114, 115, 91, 105, 93, 41, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 70, 82, 65, 77, 69, 87, 79, - 82, 75, 95, 83, 69, 65, 82, 67, 72, 95, 80, 65, 84, 72, 83, 39, 93, 32, 61, 32, 99, 102, 103, 46, 102, 114, 97, 109, 101, 119, 111, 114, -107, 100, 105, 114, 115, 10, 108, 111, 99, 97, 108, 32, 111, 98, 106, 68, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, - 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 111, - 98, 106, 100, 105, 114, 41, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 79, 66, 74, 82, 79, 79, 84, 39, 93, 32, 61, 32, 111, 98, 106, - 68, 105, 114, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 79, 78, 76, 89, 95, 65, 67, 84, 73, 86, 69, 95, 65, 82, 67, 72, 39, 93, - 32, 61, 32, 105, 105, 102, 40, 112, 46, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, - 41, 44, 32, 39, 89, 69, 83, 39, 44, 32, 39, 78, 79, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 104, 101, 99, 107, 115, 32, 61, 32, 123, - 10, 91, 34, 45, 102, 102, 97, 115, 116, 45, 109, 97, 116, 104, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 99, -102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 61, 61, 32, 34, 70, 97, 115, 116, 34, 44, 10, 91, 34, 45, 102, -111, 109, 105, 116, 45, 102, 114, 97, 109, 101, 45, 112, 111, 105, 110, 116, 101, 114, 34, 93, 32, 32, 32, 32, 61, 32, 99, 102, 103, 46, 111, 109, -105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 32, 61, 61, 32, 34, 79, 110, 34, 44, 10, 91, 34, 45, 102, 110, 111, 45, 111, -109, 105, 116, 45, 102, 114, 97, 109, 101, 45, 112, 111, 105, 110, 116, 101, 114, 34, 93, 32, 61, 32, 99, 102, 103, 46, 111, 109, 105, 116, 102, 114, - 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 32, 61, 61, 32, 34, 79, 102, 102, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, -103, 115, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 102, 108, 97, 103, 44, 32, 99, 104, 101, 99, 107, 32, 105, 110, 32, 112, 97, 105, 114, -115, 40, 99, 104, 101, 99, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 104, 101, 99, 107, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 102, 108, 97, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 115, 101, 116, -116, 105, 110, 103, 115, 91, 39, 79, 84, 72, 69, 82, 95, 67, 70, 76, 65, 71, 83, 39, 93, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, -105, 110, 40, 102, 108, 97, 103, 115, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 10, 102, 108, 97, 103, -115, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 98, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, -102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 41, 41, 32, 100, 111, 10, -105, 102, 32, 110, 111, 116, 32, 120, 99, 111, 100, 101, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, 107, 40, 108, 105, 98, 41, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 108, 34, 32, 46, 46, 32, 108, -105, 98, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 98, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, - 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 100, 101, 112, 101, 110, 100, 101, 110, 99, -105, 101, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 41, 32, 100, 111, 10, 105, 102, 32, 40, 108, 105, 98, 46, 101, 120, 116, 101, -114, 110, 97, 108, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 120, 99, 111, 100, 101, 46, 105, 115, 102, 114, 97, 109, 101, 119, -111, 114, 107, 40, 108, 105, 98, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, 32, 116, 104, 101, -110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 108, 34, 32, 46, 46, 32, 101, 115, - 99, 97, 112, 101, 65, 114, 103, 40, 108, 105, 98, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 79, 84, 72, 69, 82, 95, 76, 68, - 70, 76, 65, 71, 83, 39, 93, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 102, 108, 97, 103, 115, 44, 32, 99, 102, 103, 46, -108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 116, 97, 116, 105, 99, - 82, 117, 110, 116, 105, 109, 101, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 83, 84, 65, 78, 68, 65, 82, 68, 95, - 67, 95, 80, 76, 85, 83, 95, 80, 76, 85, 83, 95, 76, 73, 66, 82, 65, 82, 89, 95, 84, 89, 80, 69, 39, 93, 32, 61, 32, 39, 115, 116, - 97, 116, 105, 99, 39, 10, 101, 110, 100, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 100, 105, 114, 32, 126, 61, 32, 34, 46, 34, 32, 116, 104, -101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 83, 89, 77, 82, 79, 79, 84, 39, 93, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, -116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 116, - 97, 114, 103, 101, 116, 100, 105, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 61, - 32, 34, 69, 120, 116, 114, 97, 34, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 39, 87, 65, 82, 78, 73, 78, 71, 95, - 67, 70, 76, 65, 71, 83, 39, 93, 32, 61, 32, 39, 45, 87, 97, 108, 108, 32, 45, 87, 101, 120, 116, 114, 97, 39, 10, 101, 110, 100, 10, 111, -118, 101, 114, 114, 105, 100, 101, 83, 101, 116, 116, 105, 110, 103, 115, 40, 115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, 46, 120, 99, -111, 100, 101, 98, 117, 105, 108, 100, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, - 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 105, 100, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 88, 67, 66, 117, 105, 108, 100, - 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 83, 101, 116, 116, -105, 110, 103, 115, 32, 61, 32, 123, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 52, 44, - 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 51, 44, 39, 125, 59, 39, 41, 10, 112, 114, 105, 110, 116, 83, 101, 116, 116, 105, -110, 103, 40, 51, 44, 32, 39, 110, 97, 109, 101, 39, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 59, 10, 95, 112, 40, - 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, -108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, -103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 116, 97, 114, 103, 101, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, -116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, - 99, 102, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, 41, 32, 100, 111, 10, 115, 101, 116, -116, 105, 110, 103, 115, 91, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 41, 10, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 95, 84, 97, 114, 103, 101, 116, 40, 116, 114, 44, 32, 116, 97, 114, 103, 101, 116, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 99, 102, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 99, 111, -110, 102, 105, 103, 115, 41, 32, 100, 111, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, -106, 101, 99, 116, 105, 100, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, -108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 80, 114, 111, 106, 101, 99, 116, 40, 116, 114, 44, 32, 99, 102, 103, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 105, 115, 101, 109, 112, 116, 121, 40, 115, 101, -116, 116, 105, 110, 103, 115, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 88, 67, 66, 117, 105, 108, -100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 112, 114, 105, 110, -116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 48, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 39, - 47, 42, 32, 69, 110, 100, 32, 88, 67, 66, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 115, 101, 99, 116, -105, 111, 110, 32, 42, 47, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 40, -116, 114, 41, 10, 108, 111, 99, 97, 108, 32, 119, 107, 115, 32, 61, 32, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 67, 102, 103, 78, 97, 109, 101, 32, 61, 32, 115, 116, 114, 105, -110, 103, 105, 102, 121, 83, 101, 116, 116, 105, 110, 103, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, 91, 49, 93, 46, 98, 117, 105, 108, 100, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, -116, 97, 114, 103, 101, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 46, 99, 104, 105, -108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 115, 101, 116, 116, 105, 110, 103, 115, 91, 116, 97, 114, 103, 101, 116, 46, 99, 102, 103, 115, 101, 99, -116, 105, 111, 110, 93, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 95, 112, 40, 50, 44, 39, 37, 115, 32, 47, 42, 32, 66, -117, 105, 108, 100, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 108, 105, 115, 116, 32, 102, 111, 114, 32, 80, 66, 88, 78, - 97, 116, 105, 118, 101, 84, 97, 114, 103, 101, 116, 32, 34, 37, 115, 34, 32, 42, 47, 32, 61, 32, 123, 39, 44, 32, 116, 97, 114, 103, 101, 116, - 46, 99, 102, 103, 115, 101, 99, 116, 105, 111, 110, 44, 32, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, -105, 115, 97, 32, 61, 32, 88, 67, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 59, 39, 41, 10, 95, 112, 40, - 51, 44, 39, 98, 117, 105, 108, 100, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 61, 32, 40, 39, 41, 10, 102, 111, 114, - 32, 95, 44, 32, 99, 102, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, 41, 32, 100, 111, - 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, 42, 32, 37, 115, 32, 42, 47, 44, 39, 44, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, -116, 97, 114, 103, 101, 116, 105, 100, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, - 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 100, 101, 102, 97, 117, 108, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 73, 115, 86, 105, 115, 105, 98, 108, 101, 32, 61, 32, 48, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 100, 101, 102, 97, 117, 108, 116, 67, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 78, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 100, 101, 102, 97, 117, 108, 116, - 67, 102, 103, 78, 97, 109, 101, 41, 10, 95, 112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 115, 101, 116, 116, -105, 110, 103, 115, 91, 39, 49, 68, 69, 66, 57, 50, 56, 57, 48, 56, 55, 51, 51, 68, 68, 56, 48, 48, 49, 48, 69, 57, 67, 68, 39, 93, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 95, 112, 40, 50, 44, 39, 49, 68, 69, 66, 57, 50, 56, 57, 48, 56, 55, 51, - 51, 68, 68, 56, 48, 48, 49, 48, 69, 57, 67, 68, 32, 47, 42, 32, 66, 117, 105, 108, 100, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, -105, 111, 110, 32, 108, 105, 115, 116, 32, 102, 111, 114, 32, 80, 66, 88, 80, 114, 111, 106, 101, 99, 116, 32, 34, 37, 115, 34, 32, 42, 47, 32, - 61, 32, 123, 39, 44, 32, 116, 114, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 51, 44, 39, 105, 115, 97, 32, 61, 32, 88, 67, 67, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 98, 117, 105, 108, 100, 67, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 61, 32, 40, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 102, 103, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, 41, 32, 100, 111, 10, 95, 112, 40, 52, 44, 39, 37, 115, 32, 47, - 42, 32, 37, 115, 32, 42, 47, 44, 39, 44, 32, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 105, 100, 44, 32, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 39, 41, 59, 39, 41, 10, 95, 112, 40, - 51, 44, 39, 100, 101, 102, 97, 117, 108, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 73, 115, 86, 105, 115, 105, 98, 108, 101, - 32, 61, 32, 48, 59, 39, 41, 10, 95, 112, 40, 51, 44, 39, 100, 101, 102, 97, 117, 108, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 78, 97, 109, 101, 32, 61, 32, 37, 115, 59, 39, 44, 32, 100, 101, 102, 97, 117, 108, 116, 67, 102, 103, 78, 97, 109, 101, 41, 10, 95, -112, 40, 50, 44, 39, 125, 59, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 47, 42, 32, 66, 101, 103, 105, 110, 32, 88, 67, 67, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 47, 39, 41, 10, 112, 114, 105, 110, -116, 83, 101, 116, 116, 105, 110, 103, 115, 84, 97, 98, 108, 101, 40, 50, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 95, 112, 40, 39, - 47, 42, 32, 69, 110, 100, 32, 88, 67, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 32, 115, 101, 99, 116, 105, -111, 110, 32, 42, 47, 39, 41, 10, 101, 110, 100, 10, }; - -// xcode/xcode_project.lua -static const unsigned char builtin_script_48[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 120, 99, 111, 100, 101, 10, 108, 111, 99, 97, 108, 32, 120, 99, 111, 100, 101, 32, 61, 32, 112, 46, 109, 111, 100, 117, -108, 101, 115, 46, 120, 99, 111, 100, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, -101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 109, -117, 115, 116, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 84, 97, 114, 103, 101, 116, 40, 110, 111, 100, 101, 44, 32, 112, 114, 106, 41, 10, -105, 102, 32, 110, 111, 116, 32, 110, 111, 100, 101, 46, 99, 111, 110, 102, 105, 103, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, -102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, - 32, 112, 114, 101, 109, 97, 107, 101, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, - 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 102, 105, 108, 101, - 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, -105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 101, 119, 86, 97, 108, 117, 101, 32, 61, 32, 110, 111, 116, - 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, -105, 108, 100, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, - 32, 110, 101, 119, 86, 97, 108, 117, 101, 10, 101, 108, 115, 101, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 101, 119, 86, 97, 108, -117, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 32, 105, 115, - 32, 101, 120, 99, 108, 117, 100, 101, 100, 32, 105, 110, 32, 106, 117, 115, 116, 32, 115, 111, 109, 101, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 115, 46, 32, 65, 117, 116, 111, 99, 111, 109, 112, 108, 101, 116, 105, 111, 110, 32, 119, 105, 108, 108, 32, 110, 111, 116, 32, 119, -111, 114, 107, 32, 99, 111, 114, 114, 101, 99, 116, 108, 121, 32, 111, 110, 32, 116, 104, 105, 115, 32, 102, 105, 108, 101, 32, 105, 110, 32, 88, 99, -111, 100, 101, 46, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, 99, 111, 100, 101, 46, - 98, 117, 105, 108, 100, 112, 114, 106, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 44, 32, 110, 105, 108, 32, 44, 32, 102, 97, -108, 115, 101, 41, 10, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 114, 106, 10, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, - 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, -102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 102, 103, 46, 120, 99, 111, 100, 101, 32, 61, 32, 123, 125, 10, 99, 102, 103, 46, 120, - 99, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 112, 114, 106, 46, -120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, 116, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, -100, 99, 102, 103, 44, 32, 34, 116, 97, 114, 103, 101, 116, 34, 41, 10, 99, 102, 103, 46, 120, 99, 111, 100, 101, 46, 112, 114, 111, 106, 101, 99, -116, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 116, 114, 46, 110, 97, 109, 101, 44, 32, 99, 102, 103, 46, 98, -117, 105, 108, 100, 99, 102, 103, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 46, 99, 111, 110, 102, 105, 103, 115, - 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, -110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 46, 108, 112, -114, 111, 106, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 108, 97, 110, 103, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, - 97, 115, 101, 110, 97, 109, 101, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 32, 32, 45, 45, 32, 34, 69, 110, 103, 108, 105, 115, 104, 34, - 44, 32, 34, 70, 114, 101, 110, 99, 104, 34, 44, 32, 101, 116, 99, 46, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 110, 111, 100, 101, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 110, 111, 100, 101, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 32, 100, 111, 10, 108, 111, 99, - 97, 108, 32, 103, 114, 112, 110, 111, 100, 101, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 114, 101, 110, 116, 46, 99, 104, 105, 108, 100, 114, 101, -110, 91, 102, 105, 108, 101, 110, 111, 100, 101, 46, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 103, 114, 112, 110, 111, 100, 101, 32, -116, 104, 101, 110, 10, 103, 114, 112, 110, 111, 100, 101, 32, 61, 32, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 110, 111, 100, 101, 46, -112, 97, 114, 101, 110, 116, 44, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 102, 105, 108, 101, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 41, - 10, 103, 114, 112, 110, 111, 100, 101, 46, 107, 105, 110, 100, 32, 61, 32, 34, 118, 103, 114, 111, 117, 112, 34, 10, 101, 110, 100, 10, 102, 105, 108, -101, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 108, 97, -110, 103, 41, 10, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 103, 114, 112, 110, 111, 100, 101, 44, 32, 102, 105, 108, 101, 110, 111, 100, -101, 41, 10, 101, 110, 100, 10, 116, 114, 101, 101, 46, 114, 101, 109, 111, 118, 101, 40, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 125, 41, 10, 116, 114, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 115, 32, 61, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 34, 70, 114, - 97, 109, 101, 119, 111, 114, 107, 115, 34, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, - 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, -116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, - 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 108, 105, 110, 107, 41, 10, 105, 102, 32, 120, 99, 111, 100, 101, 46, 105, -115, 102, 114, 97, 109, 101, 119, 111, 114, 107, 40, 110, 97, 109, 101, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, 114, 46, 102, 114, 97, 109, -101, 119, 111, 114, 107, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 91, 110, 97, 109, 101, 93, 32, 116, 104, 101, 110, 10, 110, 111, 100, 101, 32, - 61, 32, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 115, 44, 32, 116, 114, 101, -101, 46, 110, 101, 119, 40, 110, 97, 109, 101, 41, 41, 10, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 61, 32, 108, 105, 110, 107, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 116, 114, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 115, 46, 99, 104, 105, 108, -100, 114, 101, 110, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 44, 32, 116, 114, - 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 115, 41, 10, 101, 110, 100, 10, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 32, 61, 32, 116, -114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 44, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 34, 80, 114, 111, 100, 117, 99, 116, -115, 34, 41, 41, 10, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 32, 61, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, 34, 80, 114, 111, -106, 101, 99, 116, 115, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 44, 32, 34, 108, 105, 110, 107, 79, -110, 108, 121, 34, 41, 41, 32, 100, 111, 10, 120, 99, 111, 100, 101, 46, 97, 100, 100, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 40, 112, 114, -106, 44, 32, 116, 114, 44, 32, 100, 101, 112, 44, 32, 116, 114, 117, 101, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 112, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, -101, 115, 40, 112, 114, 106, 44, 32, 34, 100, 101, 112, 101, 110, 100, 79, 110, 108, 121, 34, 41, 41, 32, 100, 111, 10, 120, 99, 111, 100, 101, 46, - 97, 100, 100, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 40, 112, 114, 106, 44, 32, 116, 114, 44, 32, 100, 101, 112, 44, 32, 102, 97, 108, 115, -101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 46, 99, 104, 105, 108, 100, 114, 101, 110, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 44, 32, 116, 114, 46, 112, 114, 111, 106, -101, 99, 116, 115, 41, 10, 101, 110, 100, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, -110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, - 80, 97, 116, 104, 10, 105, 102, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 110, 111, 100, 101, 80, 97, 116, 104, 32, - 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, - 99, 97, 116, 105, 111, 110, 44, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 110, 111, 100, 101, 46, 105, 100, 32, 61, - 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 110, 105, 108, 44, 32, 110, 111, 100, -101, 80, 97, 116, 104, 41, 10, 110, 111, 100, 101, 46, 105, 115, 82, 101, 115, 111, 117, 114, 99, 101, 32, 61, 32, 120, 99, 111, 100, 101, 46, 105, -115, 73, 116, 101, 109, 82, 101, 115, 111, 117, 114, 99, 101, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 100, 101, - 46, 99, 111, 110, 102, 105, 103, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, -103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, -102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, - 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 110, 111, 100, 101, 46, 98, -117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 105, 100, 32, 116, 104, 101, 110, 10, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 99, 111, 109, -109, 97, 110, 100, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, - 34, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 34, 44, 32, 110, 111, 100, 101, 80, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 120, 99, 111, 100, 101, 46, 103, 101, 116, 98, 117, 105, 108, 100, 99, 97, 116, 101, 103, -111, 114, 121, 40, 110, 111, 100, 101, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 110, 111, 100, 101, 46, 101, 120, 99, 108, 117, 100, 101, 102, 114, -111, 109, 98, 117, 105, 108, 100, 32, 97, 110, 100, 32, 110, 111, 116, 32, 120, 99, 111, 100, 101, 46, 109, 117, 115, 116, 69, 120, 99, 108, 117, 100, -101, 70, 114, 111, 109, 84, 97, 114, 103, 101, 116, 40, 110, 111, 100, 101, 44, 32, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 116, 104, -101, 110, 10, 110, 111, 100, 101, 46, 98, 117, 105, 108, 100, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, -100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 98, 117, 105, 108, 100, 34, 44, 32, 110, 111, 100, 101, 80, 97, 116, 104, 41, 10, 101, 110, 100, 10, -105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 101, 110, 100, 115, 119, 105, 116, 104, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 73, -110, 102, 111, 46, 112, 108, 105, 115, 116, 34, 41, 32, 116, 104, 101, 110, 10, 116, 114, 46, 105, 110, 102, 111, 112, 108, 105, 115, 116, 32, 61, 32, -110, 111, 100, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 44, 32, 116, 114, 117, 101, 41, 10, 110, 111, 100, 101, 32, 61, 32, 116, 114, 101, -101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 46, 112, 114, 111, 100, 117, 99, 116, 115, 44, 32, 112, 114, 106, 46, 120, 99, 111, 100, 101, 46, -112, 114, 111, 106, 101, 99, 116, 110, 111, 100, 101, 41, 10, 110, 111, 100, 101, 46, 107, 105, 110, 100, 32, 61, 32, 34, 112, 114, 111, 100, 117, 99, -116, 34, 10, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 61, 32, 110, 111, 100, 101, 46, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, -103, 101, 116, 46, 102, 117, 108, 108, 112, 97, 116, 104, 10, 110, 111, 100, 101, 46, 99, 102, 103, 115, 101, 99, 116, 105, 111, 110, 32, 61, 32, 120, - 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 99, 102, 103, 34, 41, 10, 110, 111, 100, -101, 46, 114, 101, 115, 115, 116, 97, 103, 101, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, -110, 97, 109, 101, 44, 32, 34, 114, 101, 122, 34, 41, 10, 110, 111, 100, 101, 46, 115, 111, 117, 114, 99, 101, 115, 105, 100, 32, 32, 61, 32, 120, - 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 115, 114, 99, 34, 41, 10, 110, 111, 100, -101, 46, 102, 120, 115, 116, 97, 103, 101, 105, 100, 32, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 110, 111, 100, 101, 46, -110, 97, 109, 101, 44, 32, 34, 102, 120, 115, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 120, 99, 111, 100, 101, 46, 97, 100, 100, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 40, 112, 114, 106, 44, 32, 116, 114, 44, - 32, 100, 101, 112, 44, 32, 98, 117, 105, 108, 100, 41, 10, 108, 111, 99, 97, 108, 32, 120, 99, 112, 97, 116, 104, 32, 61, 32, 120, 99, 111, 100, -101, 46, 103, 101, 116, 120, 99, 111, 100, 101, 112, 114, 111, 106, 110, 97, 109, 101, 40, 100, 101, 112, 41, 10, 108, 111, 99, 97, 108, 32, 120, 99, -110, 111, 100, 101, 32, 61, 32, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 114, 46, 112, 114, 111, 106, 101, 99, 116, 115, 44, 32, -116, 114, 101, 101, 46, 110, 101, 119, 40, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 120, 99, 112, 97, 116, 104, 41, 41, 41, 10, -120, 99, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 61, 32, 120, 99, 112, 97, 116, 104, 10, 120, 99, 110, 111, 100, 101, 46, 112, 114, 111, 106, -101, 99, 116, 32, 61, 32, 100, 101, 112, 10, 120, 99, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, 103, 114, 111, 117, 112, 105, 100, 32, - 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 120, 99, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 112, 114, 111, 100, -103, 114, 112, 34, 41, 10, 120, 99, 110, 111, 100, 101, 46, 112, 114, 111, 100, 117, 99, 116, 112, 114, 111, 120, 121, 105, 100, 32, 61, 32, 120, 99, -111, 100, 101, 46, 110, 101, 119, 105, 100, 40, 120, 99, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 112, 114, 111, 100, 112, 114, 111, 120, - 34, 41, 10, 120, 99, 110, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 112, 114, 111, 120, 121, 105, 100, 32, 32, 61, 32, 120, 99, 111, 100, 101, - 46, 110, 101, 119, 105, 100, 40, 120, 99, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 116, 97, 114, 103, 112, 114, 111, 120, 34, 41, 10, -120, 99, 110, 111, 100, 101, 46, 116, 97, 114, 103, 101, 116, 100, 101, 112, 101, 110, 100, 105, 100, 32, 61, 32, 120, 99, 111, 100, 101, 46, 110, 101, -119, 105, 100, 40, 120, 99, 110, 111, 100, 101, 46, 110, 97, 109, 101, 44, 32, 34, 116, 97, 114, 103, 100, 101, 112, 34, 41, 10, 108, 111, 99, 97, -108, 32, 108, 112, 114, 106, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 102, 105, 110, 100, 112, 114, 111, 106, 101, 99, 116, - 40, 112, 114, 106, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 100, 101, 112, 46, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, - 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 102, 105, 110, 100, 67, 108, 111, 115, 101, 115, 116, 77, 97, 116, 99, 104, 40, 108, -112, 114, 106, 44, 32, 112, 114, 106, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 91, 49, 93, 41, 10, 110, 111, 100, 101, - 32, 61, 32, 116, 114, 101, 101, 46, 105, 110, 115, 101, 114, 116, 40, 120, 99, 110, 111, 100, 101, 44, 32, 116, 114, 101, 101, 46, 110, 101, 119, 40, - 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 41, 10, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, - 61, 32, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 102, 117, 108, 108, 112, 97, 116, 104, 10, 110, 111, 100, 101, 46, 99, -102, 103, 32, 61, 32, 99, 102, 103, 10, 105, 102, 32, 98, 117, 105, 108, 100, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, -110, 111, 100, 101, 46, 101, 120, 99, 108, 117, 100, 101, 102, 114, 111, 109, 98, 117, 105, 108, 100, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 104, 101, 97, 100, 101, 114, 44, 10, 125, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, - 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 120, 99, 111, 100, 101, 46, 98, 117, 105, 108, 100, 112, 114, 106, 116, 114, 101, 101, 40, 112, -114, 106, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, - 99, 116, 44, 32, 112, 114, 106, 41, 10, 120, 99, 111, 100, 101, 46, 80, 66, 88, 66, 117, 105, 108, 100, 70, 105, 108, 101, 40, 116, 114, 41, 10, -120, 99, 111, 100, 101, 46, 80, 66, 88, 67, 111, 110, 116, 97, 105, 110, 101, 114, 73, 116, 101, 109, 80, 114, 111, 120, 121, 40, 116, 114, 41, 10, -120, 99, 111, 100, 101, 46, 80, 66, 88, 70, 105, 108, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, - 46, 80, 66, 88, 70, 114, 97, 109, 101, 119, 111, 114, 107, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, 114, 41, 10, 120, 99, 111, -100, 101, 46, 80, 66, 88, 71, 114, 111, 117, 112, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 80, 66, 88, 78, 97, 116, 105, 118, 101, 84, - 97, 114, 103, 101, 116, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 80, 66, 88, 65, 103, 103, 114, 101, 103, 97, 116, 101, 84, 97, 114, 103, -101, 116, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 80, 66, 88, 80, 114, 111, 106, 101, 99, 116, 40, 116, 114, 41, 10, 120, 99, 111, 100, -101, 46, 80, 66, 88, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 120, 121, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 80, 66, - 88, 82, 101, 115, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 80, - 66, 88, 83, 104, 101, 108, 108, 83, 99, 114, 105, 112, 116, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, 114, 41, 10, 120, 99, 111, 100, -101, 46, 80, 66, 88, 83, 111, 117, 114, 99, 101, 115, 66, 117, 105, 108, 100, 80, 104, 97, 115, 101, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, - 46, 80, 66, 88, 84, 97, 114, 103, 101, 116, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 80, - 66, 88, 86, 97, 114, 105, 97, 110, 116, 71, 114, 111, 117, 112, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, - 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 88, 67, 66, 117, 105, 108, 100, 67, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 76, 105, 115, 116, 40, 116, 114, 41, 10, 120, 99, 111, 100, 101, 46, 102, 111, 111, 116, 101, -114, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 104, 101, 97, 100, 101, 114, 40, 112, 114, 106, - 41, 10, 112, 46, 119, 40, 39, 47, 47, 32, 33, 36, 42, 85, 84, 70, 56, 42, 36, 33, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 123, - 39, 41, 10, 112, 46, 119, 40, 39, 97, 114, 99, 104, 105, 118, 101, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 49, 59, 39, 41, 10, 112, 46, -119, 40, 39, 99, 108, 97, 115, 115, 101, 115, 32, 61, 32, 123, 39, 41, 10, 112, 46, 119, 40, 39, 125, 59, 39, 41, 10, 112, 46, 119, 40, 39, -111, 98, 106, 101, 99, 116, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 52, 54, 59, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 111, 98, -106, 101, 99, 116, 115, 32, 61, 32, 123, 39, 41, 10, 112, 46, 119, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 120, - 99, 111, 100, 101, 46, 102, 111, 111, 116, 101, 114, 40, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 125, 59, 39, 41, 10, 112, 46, 119, - 40, 39, 114, 111, 111, 116, 79, 98, 106, 101, 99, 116, 32, 61, 32, 48, 56, 70, 66, 55, 55, 57, 51, 70, 69, 56, 52, 49, 53, 53, 68, 67, - 48, 50, 65, 65, 67, 48, 55, 32, 47, 42, 32, 80, 114, 111, 106, 101, 99, 116, 32, 111, 98, 106, 101, 99, 116, 32, 42, 47, 59, 39, 41, 10, -112, 46, 112, 111, 112, 40, 39, 125, 39, 41, 10, 101, 110, 100, 10, }; - -// android/_preload.lua -static const unsigned char builtin_script_49[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 97, 112, 105, 32, 61, 32, 112, 46, - 97, 112, 105, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 112, 46, 65, - 78, 68, 82, 79, 73, 68, 41, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 97, 114, 99, 104, 105, 116, 101, 99, -116, 117, 114, 101, 34, 44, 32, 123, 32, 34, 97, 114, 109, 118, 53, 34, 44, 32, 34, 97, 114, 109, 118, 55, 34, 44, 32, 34, 97, 97, 114, 99, -104, 54, 52, 34, 44, 32, 34, 109, 105, 112, 115, 34, 44, 32, 34, 109, 105, 112, 115, 54, 52, 34, 44, 32, 34, 97, 114, 109, 34, 32, 125, 41, - 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, -115, 34, 44, 32, 123, 32, 34, 78, 69, 79, 78, 34, 44, 32, 34, 77, 88, 85, 34, 32, 125, 41, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, -108, 111, 119, 101, 100, 40, 34, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 34, 44, 32, 123, 34, 85, 110, 119, -105, 110, 100, 84, 97, 98, 108, 101, 115, 34, 125, 41, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 102, 108, 97, -103, 115, 34, 44, 32, 123, 32, 34, 84, 104, 117, 109, 98, 34, 32, 125, 41, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, - 40, 34, 107, 105, 110, 100, 34, 44, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 97, 99, -116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 34, 118, 115, 50, 48, 49, 53, 34, 93, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, - 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 112, 114, 101, 109, 97, 107, 101, 46, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, -115, 116, 91, 34, 118, 115, 50, 48, 49, 53, 34, 93, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 44, 32, 123, 32, 112, 46, 80, 65, - 67, 75, 65, 71, 73, 78, 71, 32, 125, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, - 34, 118, 115, 50, 48, 49, 55, 34, 93, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, -105, 110, 40, 112, 114, 101, 109, 97, 107, 101, 46, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 34, 118, 115, 50, 48, 49, 55, 34, - 93, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 44, 32, 123, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 125, 41, 10, -112, 114, 101, 109, 97, 107, 101, 46, 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 34, 118, 115, 50, 48, 49, 57, 34, 93, 46, 118, - 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 112, 114, 101, 109, 97, 107, 101, 46, - 97, 99, 116, 105, 111, 110, 46, 95, 108, 105, 115, 116, 91, 34, 118, 115, 50, 48, 49, 57, 34, 93, 46, 118, 97, 108, 105, 100, 95, 107, 105, 110, -100, 115, 44, 32, 123, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 125, 41, 10, 108, 111, 99, 97, 108, 32, 111, 115, 111, 112, 116, -105, 111, 110, 32, 61, 32, 112, 46, 111, 112, 116, 105, 111, 110, 46, 103, 101, 116, 40, 34, 111, 115, 34, 41, 10, 105, 102, 32, 111, 115, 111, 112, -116, 105, 111, 110, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 115, -111, 112, 116, 105, 111, 110, 46, 97, 108, 108, 111, 119, 101, 100, 44, 32, 123, 32, 34, 97, 110, 100, 114, 111, 105, 100, 34, 44, 32, 32, 34, 65, -110, 100, 114, 111, 105, 100, 34, 32, 125, 41, 10, 101, 110, 100, 10, 111, 115, 46, 115, 121, 115, 116, 101, 109, 84, 97, 103, 115, 91, 112, 46, 65, - 78, 68, 82, 79, 73, 68, 93, 32, 61, 32, 123, 32, 34, 97, 110, 100, 114, 111, 105, 100, 34, 44, 32, 34, 109, 111, 98, 105, 108, 101, 34, 32, -125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 102, 108, 111, 97, 116, 97, 98, -105, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, -114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 115, 111, 102, 116, 34, 44, 10, 34, 115, 111, 102, 116, -102, 112, 34, 44, 10, 34, 104, 97, 114, 100, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 97, 110, 100, 114, 111, 105, 100, 97, 112, 105, 108, 101, 118, 101, 108, 34, 44, 10, 115, 99, 111, 112, 101, - 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 105, 110, 116, 101, 103, 101, 114, 34, 44, 10, 125, - 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 111, 111, 108, 99, 104, 97, 105, -110, 118, 101, 114, 115, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 52, 46, 54, 34, 44, - 32, 45, 45, 32, 78, 68, 75, 32, 71, 67, 67, 32, 118, 101, 114, 115, 105, 111, 110, 115, 10, 34, 52, 46, 56, 34, 44, 10, 34, 52, 46, 57, - 34, 44, 10, 34, 51, 46, 52, 34, 44, 32, 45, 45, 32, 78, 68, 75, 32, 99, 108, 97, 110, 103, 32, 118, 101, 114, 115, 105, 111, 110, 115, 10, - 34, 51, 46, 53, 34, 44, 10, 34, 51, 46, 54, 34, 44, 10, 34, 51, 46, 56, 34, 44, 10, 34, 53, 46, 48, 34, 44, 10, 125, 44, 10, 125, - 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 116, 108, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, - 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 110, 111, 110, 101, 34, 44, 10, 34, 103, 97, 98, 105, 43, 43, 34, 44, 10, 34, -115, 116, 108, 112, 111, 114, 116, 34, 44, 10, 34, 103, 110, 117, 34, 44, 10, 34, 108, 105, 98, 99, 43, 43, 34, 44, 10, 125, 44, 10, 125, 10, - 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 104, 117, 109, 98, 109, 111, 100, 101, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, -105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 116, 104, 117, 109, 98, 34, 44, 10, 34, 97, 114, 109, 34, - 44, 10, 34, 100, 105, 115, 97, 98, 108, 101, 100, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, -123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 97, 110, 100, 114, 111, 105, 100, 97, 112, 112, 108, 105, 98, 110, 97, 109, 101, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 10, -125, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, -102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, 41, 10, 101, 110, 100, 10, }; - -// android/android.lua -static const unsigned char builtin_script_50[] = { - 10, 108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 105, 102, 32, 110, 111, 116, 32, 112, 46, 109, 111, 100, 117, -108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 32, 116, 104, 101, 110, 10, 114, 101, 113, 117, 105, 114, 101, 32, 40, 34, 118, 115, 116, 117, 100, -105, 111, 34, 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 32, 61, 32, 123, 125, 10, 105, 102, 32, 95, - 65, 67, 84, 73, 79, 78, 32, 60, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 99, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 32, 123, 32, 34, 65, 110, 100, 114, 111, 105, 100, 34, 32, 125, 10, 115, 121, 115, 116, 101, 109, 32, 34, 97, 110, 100, 114, 111, -105, 100, 34, 10, 116, 111, 111, 108, 115, 101, 116, 32, 34, 103, 99, 99, 34, 10, 101, 110, 100, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, -115, 97, 110, 100, 114, 111, 105, 100, 95, 118, 99, 120, 112, 114, 111, 106, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, -118, 115, 97, 110, 100, 114, 111, 105, 100, 95, 115, 108, 110, 50, 48, 48, 53, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, - 34, 118, 115, 97, 110, 100, 114, 111, 105, 100, 95, 118, 115, 116, 117, 100, 105, 111, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, - 40, 34, 118, 115, 97, 110, 100, 114, 111, 105, 100, 95, 97, 110, 100, 114, 111, 105, 100, 112, 114, 111, 106, 46, 108, 117, 97, 34, 41, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 10, }; - -// android/vsandroid_vcxproj.lua -static const unsigned char builtin_script_51[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 97, 110, -100, 114, 111, 105, 100, 32, 61, 32, 123, 32, 125, 10, 108, 111, 99, 97, 108, 32, 97, 110, 100, 114, 111, 105, 100, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, 118, 115, 97, 110, 100, 114, 111, 105, 100, 32, 61, 32, -112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, 118, 99, 50, 48, 49, 48, - 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, -111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, -112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, -108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 101, 116, 66, 111, 111, 108, 79, 112, 116, 105, 111, 110, 40, 111, 112, 116, -105, 111, 110, 78, 97, 109, 101, 44, 32, 102, 108, 97, 103, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 102, 108, 97, 103, 32, 126, 61, - 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 111, 112, 116, 105, 111, 110, 78, - 97, 109, 101, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 118, 115, 116, 117, -100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 95, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 32, 126, 61, 32, 110, 105, 108, 32, -116, 104, 101, 110, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, - 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 95, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 46, 97, 114, -109, 32, 61, 32, 34, 65, 82, 77, 34, 10, 101, 108, 115, 101, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 95, 97, 114, - 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 32, 61, 32, 34, 65, 110, 100, 114, 111, 105, 100, 34, 10, -101, 110, 100, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 103, 108, 111, 98, 97, 108, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, -108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 111, 108, 100, 102, -110, 40, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, - 65, 78, 68, 82, 79, 73, 68, 32, 97, 110, 100, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, - 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 111, 115, 32, 61, 32, 116, 97, 98, 108, 101, - 46, 105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 105, 103, 110, 111, 114, 101, - 87, 97, 114, 110, 68, 117, 112, 108, 105, 99, 97, 116, 101, 70, 105, 108, 101, 110, 97, 109, 101, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, -111, 118, 101, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 112, 111, 115, 41, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 116, 97, - 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 100, -114, 111, 105, 100, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 84, 121, 112, 101, 10, 125, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 101, 108, 101, 109, 101, 110, 116, 115, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, - 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 103, 108, 111, 98, 97, 108, 115, 67, 111, 110, 100, 105, 116, -105, 111, 110, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 44, 32, 99, 102, 103, 41, - 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 112, 114, 106, 44, 32, 99, 102, 103, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, - 73, 68, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 126, 61, 32, 112, 114, 106, 46, 115, 121, 115, 116, 101, 109, 32, - 97, 110, 100, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 80, 65, 67, 75, 65, 71, 73, 78, - 71, 32, 116, 104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, 108, 101, -109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 100, 114, 111, 105, 100, 65, 112, 112, 108, 105, 99, 97, 116, -105, 111, 110, 84, 121, 112, 101, 10, 125, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, 110, 116, 115, 10, 101, -110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 100, 114, 111, 105, 100, 65, 112, 112, 108, -105, 99, 97, 116, 105, 111, 110, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, - 34, 75, 101, 121, 119, 111, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 34, 65, 110, 100, 114, 111, 105, 100, 34, 41, 10, 118, 99, 50, 48, 49, - 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 82, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 34, 44, 32, 110, 105, 108, 44, 32, - 34, 37, 115, 34, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, - 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 57, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, -110, 116, 40, 34, 77, 105, 110, 105, 109, 117, 109, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 34, 44, - 32, 110, 105, 108, 44, 32, 34, 49, 54, 46, 48, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, - 34, 118, 115, 50, 48, 49, 55, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, 105, -110, 105, 109, 117, 109, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, - 34, 49, 53, 46, 48, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, - 53, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, 105, 110, 105, 109, 117, 109, 86, -105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 34, 49, 52, 46, 48, 34, - 41, 10, 101, 110, 100, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, -110, 84, 121, 112, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 65, 110, 100, 114, 111, 105, 100, 34, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, - 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 55, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, -110, 116, 40, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 84, 121, 112, 101, 82, 101, 118, 105, 115, 105, 111, 110, 34, 44, 32, 110, 105, -108, 44, 32, 34, 51, 46, 48, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, - 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 112, 112, 108, 105, 99, - 97, 116, 105, 111, 110, 84, 121, 112, 101, 82, 101, 118, 105, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 34, 50, 46, 48, 34, 41, 10, -101, 108, 115, 101, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, - 84, 121, 112, 101, 82, 101, 118, 105, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 34, 49, 46, 48, 34, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, -110, 116, 115, 44, 32, 34, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, -110, 116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, -112, 46, 85, 84, 73, 76, 73, 84, 89, 32, 97, 110, 100, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 80, 65, 67, 75, - 65, 71, 73, 78, 71, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, - 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, 108, 101, 109, 101, 110, -116, 115, 44, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, - 49, 48, 46, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, 101, 116, 41, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, -108, 101, 109, 101, 110, 116, 115, 44, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, - 32, 118, 99, 50, 48, 49, 48, 46, 119, 104, 111, 108, 101, 80, 114, 111, 103, 114, 97, 109, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, - 41, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 116, 97, 98, 108, 101, 46, -105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 119, 105, 110, 100, 111, 119, 115, - 83, 68, 75, 68, 101, 115, 107, 116, 111, 112, 65, 82, 77, 83, 117, 112, 112, 111, 114, 116, 41, 41, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, - 46, 97, 110, 100, 114, 111, 105, 100, 65, 80, 73, 76, 101, 118, 101, 108, 44, 10, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 100, 114, 111, 105, -100, 83, 116, 108, 84, 121, 112, 101, 44, 10, 125, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, - 49, 53, 34, 32, 116, 104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, -108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, 46, 116, 104, 117, 109, 98, 77, 111, 100, 101, 44, 10, 125, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, 110, 116, 115, 10, 101, 110, 100, 41, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 100, 114, 111, 105, 100, 65, 80, 73, 76, 101, 118, 101, 108, 40, 99, -102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 97, 110, 100, 114, 111, 105, 100, 97, 112, 105, 108, 101, 118, 101, 108, 32, 126, 61, 32, 110, 105, -108, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 110, 100, 114, 111, 105, 100, 65, 80, - 73, 76, 101, 118, 101, 108, 34, 44, 32, 110, 105, 108, 44, 32, 34, 97, 110, 100, 114, 111, 105, 100, 45, 34, 32, 46, 46, 32, 99, 102, 103, 46, - 97, 110, 100, 114, 111, 105, 100, 97, 112, 105, 108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 100, 114, 111, 105, 100, 83, 116, 108, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 99, 102, 103, 46, 115, 116, 108, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 115, 116, 108, 84, 121, -112, 101, 32, 61, 32, 123, 10, 91, 34, 110, 111, 110, 101, 34, 93, 32, 61, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 10, 91, 34, 103, 97, - 98, 105, 43, 43, 34, 93, 32, 61, 32, 34, 103, 97, 98, 105, 43, 43, 34, 44, 10, 91, 34, 115, 116, 108, 112, 111, 114, 116, 34, 93, 32, 61, - 32, 34, 115, 116, 108, 112, 111, 114, 116, 34, 44, 10, 91, 34, 103, 110, 117, 34, 93, 32, 61, 32, 34, 103, 110, 117, 115, 116, 108, 34, 44, 10, - 91, 34, 108, 105, 98, 99, 43, 43, 34, 93, 32, 61, 32, 34, 99, 43, 43, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 112, 111, 115, 116, -102, 105, 120, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, - 79, 110, 34, 44, 32, 34, 95, 115, 116, 97, 116, 105, 99, 34, 44, 32, 34, 95, 115, 104, 97, 114, 101, 100, 34, 41, 10, 108, 111, 99, 97, 108, - 32, 114, 117, 110, 116, 105, 109, 101, 76, 105, 98, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 116, 108, 32, 61, 61, 32, 34, 110, 111, -110, 101, 34, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 115, 116, 108, 84, 121, 112, 101, 91, 99, 102, 103, 46, 115, 116, 108, 93, 32, - 46, 46, 32, 112, 111, 115, 116, 102, 105, 120, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, - 53, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 85, 115, 101, 79, 102, 83, 116, 108, - 34, 44, 32, 110, 105, 108, 44, 32, 114, 117, 110, 116, 105, 109, 101, 76, 105, 98, 41, 10, 101, 108, 115, 101, 10, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 110, 100, 114, 111, 105, 100, 83, 116, 108, 84, 121, 112, 101, 34, 44, 32, 110, 105, 108, 44, 32, 114, -117, 110, 116, 105, 109, 101, 76, 105, 98, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 97, 110, 100, 114, 111, 105, 100, 46, 116, 104, 117, 109, 98, 77, 111, 100, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 116, 104, -117, 109, 98, 109, 111, 100, 101, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 104, 117, 109, 98, 77, -111, 100, 101, 32, 61, 10, 123, 10, 116, 104, 117, 109, 98, 32, 61, 32, 34, 84, 104, 117, 109, 98, 34, 44, 10, 97, 114, 109, 32, 61, 32, 34, - 65, 82, 77, 34, 44, 10, 100, 105, 115, 97, 98, 108, 101, 100, 32, 61, 32, 34, 68, 105, 115, 97, 98, 108, 101, 100, 34, 44, 10, 125, 10, 118, - 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 104, 117, 109, 98, 77, 111, 100, 101, 34, 44, 32, 110, 105, 108, 44, 32, -116, 104, 117, 109, 98, 77, 111, 100, 101, 91, 99, 102, 103, 46, 116, 104, 117, 109, 98, 109, 111, 100, 101, 93, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 112, 108, 97, 116, -102, 111, 114, 109, 84, 111, 111, 108, 115, 101, 116, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, -103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 126, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, - 79, 73, 68, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 105, -102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 103, 99, 99, 95, 109, 97, 112, 32, 61, 32, 123, 10, 91, 34, 52, 46, 54, 34, 93, 32, 61, 32, 34, 71, 67, 67, 95, 52, 95, 54, 34, - 44, 10, 91, 34, 52, 46, 56, 34, 93, 32, 61, 32, 34, 71, 67, 67, 95, 52, 95, 56, 34, 44, 10, 91, 34, 52, 46, 57, 34, 93, 32, 61, - 32, 34, 71, 67, 67, 95, 52, 95, 57, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 99, 108, 97, 110, 103, 95, 109, 97, 112, 32, 61, 32, -123, 10, 91, 34, 51, 46, 52, 34, 93, 32, 61, 32, 34, 67, 108, 97, 110, 103, 95, 51, 95, 52, 34, 44, 10, 91, 34, 51, 46, 53, 34, 93, - 32, 61, 32, 34, 67, 108, 97, 110, 103, 95, 51, 95, 53, 34, 44, 10, 91, 34, 51, 46, 54, 34, 93, 32, 61, 32, 34, 67, 108, 97, 110, 103, - 95, 51, 95, 54, 34, 44, 10, 91, 34, 51, 46, 56, 34, 93, 32, 61, 32, 34, 67, 108, 97, 110, 103, 95, 51, 95, 56, 34, 44, 10, 91, 34, - 53, 46, 48, 34, 93, 32, 61, 32, 34, 67, 108, 97, 110, 103, 95, 53, 95, 48, 34, 44, 10, 125, 10, 105, 102, 32, 99, 102, 103, 46, 116, 111, -111, 108, 99, 104, 97, 105, 110, 118, 101, 114, 115, 105, 111, 110, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 109, 97, 112, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 61, 61, 32, 34, 103, 99, 99, 34, 44, - 32, 103, 99, 99, 95, 109, 97, 112, 44, 32, 99, 108, 97, 110, 103, 95, 109, 97, 112, 41, 10, 108, 111, 99, 97, 108, 32, 116, 115, 32, 32, 61, - 32, 109, 97, 112, 91, 99, 102, 103, 46, 116, 111, 111, 108, 99, 104, 97, 105, 110, 118, 101, 114, 115, 105, 111, 110, 93, 10, 105, 102, 32, 116, 115, - 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 39, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, -111, 108, 99, 104, 97, 105, 110, 118, 101, 114, 115, 105, 111, 110, 32, 102, 111, 114, 32, 116, 104, 101, 32, 115, 101, 108, 101, 99, 116, 101, 100, 32, -116, 111, 111, 108, 115, 101, 116, 32, 40, 37, 115, 41, 46, 39, 44, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 34, - 99, 108, 97, 110, 103, 34, 41, 10, 101, 110, 100, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 108, 97, 116, -102, 111, 114, 109, 84, 111, 111, 108, 115, 101, 116, 34, 44, 32, 110, 105, 108, 44, 32, 116, 115, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, -108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 77, 97, 112, 32, 61, 32, 123, 10, 97, 114, 109, 32, 61, 32, 34, 97, 114, 109, 118, 53, 116, 101, - 34, 44, 32, 45, 45, 32, 115, 104, 111, 117, 108, 100, 32, 97, 114, 109, 53, 32, 98, 101, 32, 100, 101, 102, 97, 117, 108, 116, 63, 32, 118, 115, - 45, 97, 110, 100, 114, 111, 105, 100, 32, 116, 104, 105, 110, 107, 115, 32, 115, 111, 46, 46, 46, 10, 97, 114, 109, 53, 32, 61, 32, 34, 97, 114, -109, 118, 53, 116, 101, 34, 44, 10, 97, 114, 109, 55, 32, 61, 32, 34, 97, 114, 109, 118, 55, 45, 97, 34, 44, 10, 109, 105, 112, 115, 32, 61, - 32, 34, 109, 105, 112, 115, 34, 44, 10, 120, 56, 54, 32, 61, 32, 34, 120, 56, 54, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 97, 114, - 99, 104, 32, 61, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 111, 114, 32, 34, 97, 114, 109, 34, 10, 105, -102, 32, 40, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 126, 61, 32, 110, 105, 108, 32, 111, 114, 32, 99, 102, -103, 46, 116, 111, 111, 108, 99, 104, 97, 105, 110, 118, 101, 114, 115, 105, 111, 110, 32, 126, 61, 32, 110, 105, 108, 41, 32, 97, 110, 100, 32, 97, -114, 99, 104, 77, 97, 112, 91, 97, 114, 99, 104, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, -101, 102, 97, 117, 108, 116, 84, 111, 111, 108, 115, 101, 116, 77, 97, 112, 32, 61, 32, 123, 10, 97, 114, 109, 32, 61, 32, 34, 97, 114, 109, 45, -108, 105, 110, 117, 120, 45, 97, 110, 100, 114, 111, 105, 100, 101, 97, 98, 105, 45, 34, 44, 10, 97, 114, 109, 118, 53, 32, 61, 32, 34, 97, 114, -109, 45, 108, 105, 110, 117, 120, 45, 97, 110, 100, 114, 111, 105, 100, 101, 97, 98, 105, 45, 34, 44, 10, 97, 114, 109, 118, 55, 32, 61, 32, 34, - 97, 114, 109, 45, 108, 105, 110, 117, 120, 45, 97, 110, 100, 114, 111, 105, 100, 101, 97, 98, 105, 45, 34, 44, 10, 97, 97, 114, 99, 104, 54, 52, - 32, 61, 32, 34, 97, 97, 114, 99, 104, 54, 52, 45, 108, 105, 110, 117, 120, 45, 97, 110, 100, 114, 111, 105, 100, 45, 34, 44, 10, 109, 105, 112, -115, 32, 61, 32, 34, 109, 105, 112, 115, 101, 108, 45, 108, 105, 110, 117, 120, 45, 97, 110, 100, 114, 111, 105, 100, 45, 34, 44, 10, 109, 105, 112, -115, 54, 52, 32, 61, 32, 34, 109, 105, 112, 115, 54, 52, 101, 108, 45, 108, 105, 110, 117, 120, 45, 97, 110, 100, 114, 111, 105, 100, 45, 34, 44, - 10, 120, 56, 54, 32, 61, 32, 34, 120, 56, 54, 45, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 120, 56, 54, 95, 54, 52, 45, - 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 100, 101, 102, 97, 117, 108, 116, 84, 111, 111, 108, -115, 101, 116, 77, 97, 112, 91, 97, 114, 99, 104, 93, 10, 105, 102, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 61, 61, 32, 34, - 99, 108, 97, 110, 103, 34, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 84, 104, 101, 32, 99, 108, 97, 110, 103, 32, 116, 111, 111, -108, 115, 101, 116, 32, 105, 115, 32, 110, 111, 116, 32, 121, 101, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 98, 121, 32, 118, 115, 45, - 97, 110, 100, 114, 111, 105, 100, 34, 44, 32, 50, 41, 10, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 32, 46, - 46, 32, 34, 99, 108, 97, 110, 103, 34, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 97, 110, 100, - 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 126, 61, 32, 34, 103, 99, 99, 34, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, - 40, 34, 84, 111, 111, 108, 115, 101, 116, 32, 110, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 98, 121, 32, 116, 104, 101, 32, 97, -110, 100, 114, 111, 105, 100, 32, 78, 68, 75, 58, 32, 34, 32, 46, 46, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 44, 32, 50, 41, - 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 99, 102, 103, 46, 116, 111, 111, 108, 99, 104, 97, -105, 110, 118, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 105, 105, 102, 40, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 61, 61, 32, - 34, 99, 108, 97, 110, 103, 34, 44, 32, 34, 51, 46, 53, 34, 44, 32, 34, 52, 46, 57, 34, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, -101, 109, 101, 110, 116, 40, 34, 80, 108, 97, 116, 102, 111, 114, 109, 84, 111, 111, 108, 115, 101, 116, 34, 44, 32, 110, 105, 108, 44, 32, 116, 111, -111, 108, 115, 101, 116, 32, 46, 46, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 65, 110, 100, 114, 111, 105, 100, 65, 114, 99, 104, 34, 44, 32, 110, 105, 108, 44, 32, 97, 114, 99, 104, 77, 97, 112, 91, 97, 114, 99, -104, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, -101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 99, 108, 67, 111, 109, 112, 105, 108, 101, 34, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, -110, 116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, - 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, - 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 44, 10, 97, 110, 100, 114, 111, 105, 100, 46, 115, 116, 114, 105, 99, -116, 65, 108, 105, 97, 115, 105, 110, 103, 44, 10, 97, 110, 100, 114, 111, 105, 100, 46, 102, 112, 117, 44, 10, 97, 110, 100, 114, 111, 105, 100, 46, -112, 105, 99, 44, 10, 97, 110, 100, 114, 111, 105, 100, 46, 115, 104, 111, 114, 116, 69, 110, 117, 109, 115, 44, 10, 97, 110, 100, 114, 111, 105, 100, - 46, 99, 83, 116, 97, 110, 100, 97, 114, 100, 44, 10, 97, 110, 100, 114, 111, 105, 100, 46, 99, 112, 112, 83, 116, 97, 110, 100, 97, 114, 100, 44, - 10, 125, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, -101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, -109, 97, 116, 105, 111, 110, 70, 111, 114, 109, 97, 116, 41, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, 108, 101, 109, -101, 110, 116, 115, 44, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, - 50, 48, 49, 48, 46, 108, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 41, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, -109, 111, 118, 101, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, -109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 109, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, -105, 108, 97, 116, 105, 111, 110, 41, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, - 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, 111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, -109, 105, 110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 41, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 112, 108, 97, 99, 101, 40, 101, -108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, -115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, -110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 112, 108, 97, 99, -101, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, - 97, 100, 101, 114, 70, 105, 108, 101, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, -100, 101, 114, 70, 105, 108, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, 110, 116, 115, - 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, -101, 100, 72, 101, 97, 100, 101, 114, 70, 105, 108, 101, 40, 102, 105, 108, 101, 78, 97, 109, 101, 44, 32, 99, 102, 103, 41, 10, 118, 99, 50, 48, - 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 70, 105, 108, -101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, -112, 97, 116, 104, 46, 114, 101, 98, 97, 115, 101, 40, 102, 105, 108, 101, 78, 97, 109, 101, 44, 32, 99, 102, 103, 46, 98, 97, 115, 101, 100, 105, -114, 44, 32, 99, 102, 103, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 97, 110, 100, 114, 111, 105, 100, 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 121, 109, 98, 111, 108, 115, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 39, 60, 71, -101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 62, 116, 114, 117, 101, 60, 47, 71, 101, -110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 115, 116, 114, 105, 99, 116, 65, 108, 105, 97, 115, 105, 110, -103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 116, 114, 105, 99, 116, 97, 108, 105, 97, 115, 105, 110, 103, 32, 126, 61, 32, -110, 105, 108, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 116, 114, 105, 99, 116, 65, -108, 105, 97, 115, 105, 110, 103, 34, 44, 32, 110, 105, 108, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 116, 114, 105, 99, 116, 97, 108, 105, - 97, 115, 105, 110, 103, 32, 61, 61, 32, 34, 79, 102, 102, 34, 44, 32, 34, 102, 97, 108, 115, 101, 34, 44, 32, 34, 116, 114, 117, 101, 34, 41, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 102, 112, 117, 40, 99, -102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 112, 117, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, - 39, 60, 83, 111, 102, 116, 70, 108, 111, 97, 116, 62, 116, 114, 117, 101, 60, 47, 83, 111, 102, 116, 70, 108, 111, 97, 116, 62, 39, 44, 32, 105, -105, 102, 40, 99, 102, 103, 46, 102, 112, 117, 32, 61, 61, 32, 34, 83, 111, 102, 116, 119, 97, 114, 101, 34, 44, 32, 34, 116, 114, 117, 101, 34, - 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, -114, 111, 105, 100, 46, 112, 105, 99, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 112, 105, 99, 32, 126, 61, 32, 110, 105, 108, 32, -116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 111, 115, 105, 116, 105, 111, 110, 73, 110, 100, -101, 112, 101, 110, 100, 101, 110, 116, 67, 111, 100, 101, 34, 44, 32, 110, 105, 108, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 112, 105, 99, 32, - 61, 61, 32, 34, 79, 110, 34, 44, 32, 34, 116, 114, 117, 101, 34, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 118, 101, 114, 98, 111, 115, 101, 67, 111, 109, 112, 105, -108, 101, 114, 40, 99, 102, 103, 41, 10, 115, 101, 116, 66, 111, 111, 108, 79, 112, 116, 105, 111, 110, 40, 34, 86, 101, 114, 98, 111, 115, 101, 34, - 44, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 86, 101, 114, 98, 111, 115, 101, 67, 111, 109, 112, 105, 108, 101, 114, 44, 32, 34, 116, 114, -117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 117, 110, 100, 101, 102, 105, -110, 101, 65, 108, 108, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, - 41, 10, 115, 101, 116, 66, 111, 111, 108, 79, 112, 116, 105, 111, 110, 40, 34, 85, 110, 100, 101, 102, 105, 110, 101, 65, 108, 108, 80, 114, 101, 112, -114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 34, 44, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, - 85, 110, 100, 101, 102, 105, 110, 101, 65, 108, 108, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, -110, 115, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, - 46, 115, 104, 111, 119, 73, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 115, 101, 116, 66, 111, 111, 108, 79, 112, 116, 105, 111, 110, - 40, 34, 83, 104, 111, 119, 73, 110, 99, 108, 117, 100, 101, 115, 34, 44, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 104, 111, 119, 73, -110, 99, 108, 117, 100, 101, 115, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, -100, 114, 111, 105, 100, 46, 100, 97, 116, 97, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 40, 99, 102, 103, 41, 10, 115, 101, 116, 66, -111, 111, 108, 79, 112, 116, 105, 111, 110, 40, 34, 68, 97, 116, 97, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 34, 44, 32, 99, 102, -103, 46, 102, 108, 97, 103, 115, 46, 68, 97, 116, 97, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 44, 32, 34, 116, 114, 117, 101, 34, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 115, 104, 111, 114, 116, 69, 110, 117, 109, -115, 40, 99, 102, 103, 41, 10, 115, 101, 116, 66, 111, 111, 108, 79, 112, 116, 105, 111, 110, 40, 34, 85, 115, 101, 83, 104, 111, 114, 116, 69, 110, -117, 109, 115, 34, 44, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 85, 115, 101, 83, 104, 111, 114, 116, 69, 110, 117, 109, 115, 44, 32, 34, -116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 99, 83, 116, 97, -110, 100, 97, 114, 100, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 95, 108, 97, 110, 103, 109, 97, 112, 32, 61, 32, 123, 10, 91, - 34, 67, 57, 56, 34, 93, 32, 32, 32, 61, 32, 34, 99, 57, 56, 34, 44, 10, 91, 34, 67, 57, 57, 34, 93, 32, 32, 32, 61, 32, 34, 99, - 57, 57, 34, 44, 10, 91, 34, 67, 49, 49, 34, 93, 32, 32, 32, 61, 32, 34, 99, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 57, 57, 34, - 93, 32, 61, 32, 34, 103, 110, 117, 57, 57, 34, 44, 10, 91, 34, 103, 110, 117, 49, 49, 34, 93, 32, 61, 32, 34, 103, 110, 117, 49, 49, 34, - 44, 10, 125, 10, 105, 102, 32, 99, 95, 108, 97, 110, 103, 109, 97, 112, 91, 99, 102, 103, 46, 99, 100, 105, 97, 108, 101, 99, 116, 93, 32, 126, - 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 76, 97, 110, 103, -117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 99, 95, 108, 97, 110, 103, 109, 97, 112, 91, 99, 102, -103, 46, 99, 100, 105, 97, 108, 101, 99, 116, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, -100, 114, 111, 105, 100, 46, 99, 112, 112, 83, 116, 97, 110, 100, 97, 114, 100, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 112, 112, - 95, 108, 97, 110, 103, 109, 97, 112, 32, 61, 32, 123, 10, 91, 34, 67, 43, 43, 57, 56, 34, 93, 32, 32, 32, 61, 32, 34, 99, 43, 43, 57, - 56, 34, 44, 10, 91, 34, 67, 43, 43, 49, 49, 34, 93, 32, 32, 32, 61, 32, 34, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, - 49, 52, 34, 93, 32, 32, 32, 61, 32, 34, 99, 43, 43, 49, 121, 34, 44, 10, 91, 34, 67, 43, 43, 49, 55, 34, 93, 32, 32, 32, 61, 32, - 34, 99, 43, 43, 49, 122, 34, 44, 10, 91, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 122, 34, - 44, 10, 91, 34, 103, 110, 117, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 103, 110, 117, 43, 43, 57, 56, 34, 44, 10, 91, 34, 103, 110, 117, - 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 103, 110, 117, 43, 43, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 52, 34, 93, 32, - 61, 32, 34, 103, 110, 117, 43, 43, 49, 121, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 103, 110, 117, 43, - 43, 49, 122, 34, 44, 10, 125, 10, 105, 102, 32, 99, 112, 112, 95, 108, 97, 110, 103, 109, 97, 112, 91, 99, 102, 103, 46, 99, 112, 112, 100, 105, - 97, 108, 101, 99, 116, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, -116, 40, 34, 67, 112, 112, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 99, 112, -112, 95, 108, 97, 110, 103, 109, 97, 112, 91, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 93, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, - 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, - 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 115, 32, 61, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 10, 105, 102, 32, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, -114, 110, 105, 110, 103, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 119, 97, 114, 110, 105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 39, 45, 87, 110, 111, 45, 39, 32, 46, 46, 32, 119, 97, 114, 110, 105, 110, 103, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 118, 105, 115, 105, 98, 105, 108, 105, 116, 121, 32, 126, 61, 32, 110, 105, -108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 112, 46, 116, 111, 111, 108, -115, 46, 103, 99, 99, 46, 99, 120, 120, 102, 108, 97, 103, 115, 46, 118, 105, 115, 105, 98, 105, 108, 105, 116, 121, 91, 99, 102, 103, 46, 118, 105, -115, 105, 98, 105, 108, 105, 116, 121, 93, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 111, 112, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, - 10, 111, 112, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 112, 116, 115, 44, 32, 34, 32, 34, 41, 10, -118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, -115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 32, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, - 79, 112, 116, 105, 111, 110, 115, 41, 39, 44, 32, 111, 112, 116, 115, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 111, 108, 100, 102, 110, 40, - 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 46, 111, 118, 101, 114, 114, -105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 119, 97, 114, 110, 105, 110, 103, 76, 101, 118, 101, 108, 34, 44, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, -118, 115, 50, 48, 49, 53, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 65, 78, 68, 82, - 79, 73, 68, 32, 97, 110, 100, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 97, 110, 100, 32, 99, 102, 103, 46, 119, 97, 114, -110, 105, 110, 103, 115, 32, 126, 61, 32, 34, 79, 102, 102, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, -110, 116, 40, 34, 87, 97, 114, 110, 105, 110, 103, 76, 101, 118, 101, 108, 34, 44, 32, 110, 105, 108, 44, 32, 34, 69, 110, 97, 98, 108, 101, 65, -108, 108, 87, 97, 114, 110, 105, 110, 103, 115, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 40, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, - 34, 118, 115, 50, 48, 49, 53, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 65, 78, 68, - 82, 79, 73, 68, 32, 97, 110, 100, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 41, 32, 111, 114, 32, 110, 111, 116, 32, 40, 95, - 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, -109, 32, 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, 41, 32, 116, 104, 101, 110, 10, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, -101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, - 44, 32, 34, 99, 108, 67, 111, 109, 112, 105, 108, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, -111, 110, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, - 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, -105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 44, 32, 102, 97, 108, 115, 101, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 41, 10, 101, 108, 115, 101, 10, 111, 108, 100, 102, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, - 50, 48, 49, 48, 44, 32, 34, 101, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 34, 44, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, -103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 69, 110, 97, 98, 108, 101, 100, 34, 44, 10, - 79, 102, 102, 32, 61, 32, 34, 68, 105, 115, 97, 98, 108, 101, 100, 34, 44, 10, 85, 110, 119, 105, 110, 100, 84, 97, 98, 108, 101, 115, 32, 61, - 32, 34, 85, 110, 119, 105, 110, 100, 84, 97, 98, 108, 101, 115, 34, 44, 10, 125, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, - 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 91, 99, 102, 103, - 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, -118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, -103, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 91, 99, 102, 103, 46, 101, 120, - 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 93, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, 32, 99, 102, -103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 79, - 78, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 71, 99, 99, 69, 120, 99, 101, 112, 116, -105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 111, 108, 100, 102, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 101, 110, - 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, 40, 99, 102, 103, 41, 10, -105, 102, 32, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 61, 32, 34, 78, 69, 79, 78, - 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 110, 97, 98, 108, 101, 78, 101, 111, -110, 67, 111, 100, 101, 103, 101, 110, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 114, 117, 110, 116, 105, 109, -101, 84, 121, 112, 101, 73, 110, 102, 111, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 44, - 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, -109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 114, 116, 116, 105, 32, 61, 61, - 32, 112, 114, 101, 109, 97, 107, 101, 46, 79, 78, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, - 34, 82, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, -114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 111, 108, 100, 102, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, - 99, 50, 48, 49, 48, 44, 32, 34, 103, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, - 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, -121, 115, 116, 101, 109, 32, 126, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 111, 108, -100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, -100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, -105, 111, 110, 71, 114, 111, 117, 112, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, -102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 97, 110, 100, - 32, 95, 65, 67, 84, 73, 79, 78, 32, 60, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, -115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, -105, 100, 46, 97, 110, 116, 66, 117, 105, 108, 100, 44, 10, 125, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, -110, 116, 115, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 116, 80, 97, 99, -107, 97, 103, 101, 40, 99, 102, 103, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 65, 110, 116, 80, 97, 99, 107, 97, 103, 101, 62, 39, 41, - 10, 105, 102, 32, 99, 102, 103, 46, 97, 110, 100, 114, 111, 105, 100, 97, 112, 112, 108, 105, 98, 110, 97, 109, 101, 32, 126, 61, 32, 110, 105, 108, - 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 110, 100, 114, 111, 105, 100, 65, 112, 112, - 76, 105, 98, 78, 97, 109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 99, 102, 103, 46, 97, 110, 100, 114, 111, 105, 100, 97, 112, 112, 108, 105, 98, -110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 110, 100, 114, 111, -105, 100, 65, 112, 112, 76, 105, 98, 78, 97, 109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 36, 40, 82, 111, 111, 116, 78, 97, 109, 101, 115, -112, 97, 99, 101, 41, 34, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 65, 110, 116, 80, 97, 99, 107, 97, 103, 101, 62, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 97, 110, 116, 66, 117, 105, 108, 100, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 83, 84, 65, - 84, 73, 67, 76, 73, 66, 32, 111, 114, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 83, 72, - 65, 82, 69, 68, 76, 73, 66, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 60, 65, -110, 116, 66, 117, 105, 108, 100, 62, 39, 41, 10, 95, 112, 40, 51, 44, 39, 60, 65, 110, 116, 66, 117, 105, 108, 100, 84, 121, 112, 101, 62, 37, -115, 60, 47, 65, 110, 116, 66, 117, 105, 108, 100, 84, 121, 112, 101, 62, 39, 44, 32, 105, 105, 102, 40, 112, 114, 101, 109, 97, 107, 101, 46, 99, -111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 44, 32, 34, 68, 101, 98, 117, 103, 34, - 44, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 47, 65, 110, 116, 66, 117, 105, 108, 100, 62, 39, - 41, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, - 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 34, 44, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, -103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, - 10, 118, 115, 97, 110, 100, 114, 111, 105, 100, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, - 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, -103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, -105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 117, 115, 101, 114, 34, 44, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, - 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 118, 115, 97, 110, 100, 114, 111, 105, 100, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, -110, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 108, 114, 101, 97, 100, 121, 72, 97, 115, - 40, 116, 44, 32, 107, 101, 121, 41, 10, 102, 111, 114, 32, 95, 44, 32, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 41, 32, 100, -111, 10, 105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 107, 44, 32, 107, 101, 121, 41, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, -110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 111, 114, 32, 115, 116, -114, 105, 110, 103, 46, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, - 44, 32, 34, 97, 114, 109, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 102, 112, 117, 32, 126, 61, 32, 34, 83, 111, 102, -116, 119, 97, 114, 101, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 126, 61, 32, 34, 115, 111, 102, 116, - 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 34, 97, -114, 109, 118, 55, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 97, 108, 114, 101, 97, 100, 121, 72, 97, 115, 40, 99, 102, 103, - 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 112, 117, 61, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, - 32, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 61, 32, 34, 78, 69, 79, 78, 34, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, -110, 115, 44, 32, 34, 45, 109, 102, 112, 117, 61, 110, 101, 111, 110, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 102, 112, 117, - 32, 61, 61, 32, 34, 72, 97, 114, 100, 119, 97, 114, 101, 34, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, - 61, 32, 34, 115, 111, 102, 116, 102, 112, 34, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, 61, 32, 34, 104, - 97, 114, 100, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, -111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 112, 117, 61, 118, 102, 112, 118, 51, 45, 100, 49, 54, 34, 41, 32, 45, 45, 32, 100, - 49, 54, 32, 105, 115, 32, 116, 104, 101, 32, 108, 111, 119, 101, 115, 116, 32, 99, 111, 109, 109, 111, 110, 32, 100, 101, 110, 111, 109, 105, 110, 97, -116, 111, 114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 97, 108, 114, 101, 97, 100, 121, 72, 97, 115, 40, 99, 102, -103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 108, 111, 97, 116, 45, 97, 98, 105, 61, 34, 41, 32, -116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, 61, 32, 34, 104, 97, 114, 100, 34, 32, 116, -104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, -115, 44, 32, 34, 45, 109, 102, 108, 111, 97, 116, 45, 97, 98, 105, 61, 104, 97, 114, 100, 34, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 108, -111, 97, 116, 45, 97, 98, 105, 61, 115, 111, 102, 116, 102, 112, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, - 32, 110, 111, 116, 32, 97, 108, 114, 101, 97, 100, 121, 72, 97, 115, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, - 44, 32, 34, 45, 109, 102, 112, 117, 61, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 102, 112, 117, 32, 61, 61, 32, 34, - 72, 97, 114, 100, 119, 97, 114, 101, 34, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, 61, 32, 34, 115, 111, -102, 116, 102, 112, 34, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, 61, 32, 34, 104, 97, 114, 100, 34, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, -110, 115, 44, 32, 34, 45, 109, 102, 112, 117, 61, 118, 102, 112, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, - 97, 108, 114, 101, 97, 100, 121, 72, 97, 115, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, -102, 108, 111, 97, 116, 45, 97, 98, 105, 61, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, -105, 32, 61, 61, 32, 34, 115, 111, 102, 116, 102, 112, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 108, 111, 97, 116, 45, 97, 98, 105, 61, 115, -111, 102, 116, 102, 112, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, 61, 32, 34, -104, 97, 114, 100, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, -100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 108, 111, 97, 116, 45, 97, 98, 105, 61, 104, 97, 114, 100, 34, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 97, 98, 105, 32, 61, 61, - 32, 34, 115, 111, 102, 116, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, -105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 102, 108, 111, 97, 116, 45, 97, 98, 105, 61, 115, 111, 102, 116, 34, 41, 10, -101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 101, 110, 100, 105, 97, 110, 32, 61, 61, 32, 34, 76, 105, 116, 116, 108, 101, 34, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, - 44, 32, 34, 45, 109, 108, 105, 116, 116, 108, 101, 45, 101, 110, 100, 105, 97, 110, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, -101, 110, 100, 105, 97, 110, 32, 61, 61, 32, 34, 66, 105, 103, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 98, 105, 103, 45, 101, 110, 100, 105, 97, -110, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, - 61, 61, 32, 34, 109, 105, 112, 115, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, -110, 115, 105, 111, 110, 115, 32, 61, 61, 32, 34, 77, 88, 85, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 109, 109, 120, 117, 34, 41, 10, 101, 110, 100, - 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 34, 120, 56, 54, - 34, 32, 116, 104, 101, 110, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, - 50, 48, 49, 48, 44, 32, 34, 115, 117, 98, 83, 121, 115, 116, 101, 109, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, -110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 126, 61, 32, 112, 46, 65, 78, 68, 82, 79, - 73, 68, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, -100, 41, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, - 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, -112, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 32, 61, 32, 123, 125, 10, -105, 102, 32, 101, 120, 112, 108, 105, 99, 105, 116, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, -103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 102, 117, 108, 108, 112, - 97, 116, 104, 34, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 121, 115, 116, 101, 109, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, -103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 110, 97, 109, 101, 34, 41, 10, -102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 115, 121, 115, 116, 101, 109, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, - 32, 61, 32, 115, 121, 115, 116, 101, 109, 91, 105, 93, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 108, 105, 110, 107, 115, 44, - 32, 108, 105, 110, 107, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 108, 105, 110, 107, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 105, -110, 107, 115, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, -116, 40, 108, 105, 110, 107, 115, 44, 32, 34, 59, 34, 41, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, -105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 37, 40, 76, 105, - 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 59, 37, 115, 34, 44, 32, 108, 105, 110, 107, 115, 41, 10, 101, -110, 100, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, -105, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 117, 115, -101, 77, 117, 108, 116, 105, 84, 111, 111, 108, 84, 97, 115, 107, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, - 46, 77, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, - 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 85, 115, 101, 77, 117, 108, 116, 105, 84, 111, 111, 108, 84, 97, 115, 107, 34, 44, 32, 110, -105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, -114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 111, 117, 116, 112, 117, 116, 80, 114, 111, -112, 101, 114, 116, 105, 101, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, -102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 114, -101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 44, 32, 123, 10, 97, -110, 100, 114, 111, 105, 100, 46, 117, 115, 101, 77, 117, 108, 116, 105, 84, 111, 111, 108, 84, 97, 115, 107, 44, 10, 125, 41, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 46, 111, 118, -101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 111, 117, 116, 68, 105, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 126, 61, 32, 112, - 46, 65, 78, 68, 82, 79, 73, 68, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, -101, 110, 100, 10, 101, 110, 100, 41, 10, }; - -// android/vsandroid_sln2005.lua -static const unsigned char builtin_script_52[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 97, 110, 100, 114, 111, 105, 100, 32, - 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, 118, 115, 97, 110, 100, 114, -111, 105, 100, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, -115, 108, 110, 50, 48, 48, 53, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 115, 108, 110, 50, 48, 48, 53, 10, 112, 114, 101, 109, - 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 115, 108, 110, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, -112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 34, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 116, 101, 120, 116, 41, 10, 108, 111, - 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 116, 101, 120, -116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, - 79, 73, 68, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, - 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, - 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, 46, 100, 101, 112, 108, 111, 121, 80, 114, 111, 106, 101, 99, 116, 10, 125, 41, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, 110, 116, 115, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, -100, 114, 111, 105, 100, 46, 100, 101, 112, 108, 111, 121, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 44, 32, 99, 111, 110, 116, 101, 120, 116, - 41, 10, 105, 102, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 67, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 80, 65, - 67, 75, 65, 71, 73, 78, 71, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, -116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 123, 37, 115, 125, 46, 37, 115, 46, 68, 101, 112, 108, 111, 121, 46, 48, 32, 61, 32, 37, 115, 124, - 37, 115, 39, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 46, 117, 117, 105, 100, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 100, -101, 115, 99, 114, 105, 112, 116, 111, 114, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 108, 97, 116, 102, 111, 114, 109, 44, 32, 99, 111, 110, -116, 101, 120, 116, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// android/vsandroid_vstudio.lua -static const unsigned char builtin_script_53[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 97, 110, 100, 114, 111, 105, 100, 32, - 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, 118, 115, 97, 110, 100, 114, -111, 105, 100, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, -118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, -114, 105, 100, 101, 40, 118, 115, 116, 117, 100, 105, 111, 44, 32, 34, 115, 111, 108, 117, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 34, - 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 108, - 97, 116, 102, 111, 114, 109, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, -109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 65, 78, 68, 82, 79, 73, 68, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, - 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, -109, 32, 61, 61, 32, 34, 120, 56, 54, 34, 32, 116, 104, 101, 110, 10, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 34, 120, 56, 54, 34, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 108, 97, 116, 102, 111, 114, 109, 10, 101, 110, 100, 41, 10, 112, 114, -101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 115, 116, 117, 100, 105, 111, 44, 32, 34, 97, 114, 99, 104, 70, 114, 111, -109, 67, 111, 110, 102, 105, 103, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 44, 32, -119, 105, 110, 51, 50, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, - 65, 78, 68, 82, 79, 73, 68, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, -116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 44, 32, 119, 105, 110, 51, 50, 41, 10, 101, 110, 100, 41, 10, }; - -// android/vsandroid_androidproj.lua -static const unsigned char builtin_script_54[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 97, 110, 100, 114, 111, 105, 100, 32, - 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, 118, 115, 97, 110, 100, 114, -111, 105, 100, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 97, 110, 100, 114, 111, 105, 100, 10, 108, 111, 99, 97, 108, 32, -118, 99, 50, 48, 49, 48, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 10, 108, 111, 99, 97, 108, 32, -118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, -116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, -115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 44, 32, 34, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 34, - 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, -110, 100, 32, 61, 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 112, 46, 101, 111, 108, 40, 34, 92, 114, - 92, 110, 34, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 32, 32, 34, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 118, 115, -116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 101, 115, 99, 41, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, -112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 97, -110, 100, 114, 111, 105, 100, 112, 114, 111, 106, 34, 44, 32, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 108, 111, - 99, 97, 108, 32, 117, 115, 101, 114, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, -118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, - 32, 35, 117, 115, 101, 114, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, - 34, 46, 97, 110, 100, 114, 111, 105, 100, 112, 114, 111, 106, 46, 117, 115, 101, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, -112, 46, 111, 117, 116, 108, 110, 40, 117, 115, 101, 114, 41, 32, 101, 110, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, -111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, -114, 105, 100, 101, 40, 118, 115, 116, 117, 100, 105, 111, 44, 32, 34, 112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 34, 44, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, - 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 101, 109, 97, 107, 101, - 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 34, 46, 97, 110, 100, 114, 111, 105, 100, 112, 114, 111, 106, 34, 41, 10, 101, -108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, -114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 115, 116, 117, 100, 105, 111, 44, 32, 34, 116, 111, 111, 108, 34, 44, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, -100, 32, 61, 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 51, 57, - 69, 50, 54, 50, 54, 70, 45, 51, 53, 52, 53, 45, 52, 57, 54, 48, 45, 65, 54, 69, 56, 45, 50, 53, 56, 65, 68, 56, 52, 55, 54, 67, - 69, 53, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, -110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, -101, 110, 116, 115, 44, 32, 34, 103, 108, 111, 98, 97, 108, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, 108, 100, 102, 110, - 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, -103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 114, 101, 109, 97, 107, 101, 46, 80, 65, 67, 75, 65, 71, - 73, 78, 71, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 111, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 110, 100, 101, 120, -111, 102, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 105, 103, 110, 111, 114, 101, 87, 97, 114, 110, 68, 117, -112, 108, 105, 99, 97, 116, 101, 70, 105, 108, 101, 110, 97, 109, 101, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 101, 108, -101, 109, 101, 110, 116, 115, 44, 32, 112, 111, 115, 41, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, -105, 110, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, 46, 112, 114, 111, 106, 101, 99, 116, 86, 101, -114, 115, 105, 111, 110, 10, 125, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, 110, 116, 115, 10, 101, 110, 100, - 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 112, 114, 111, 106, 101, 99, 116, 86, 101, 114, 115, 105, 111, -110, 40, 99, 102, 103, 41, 10, 95, 112, 40, 50, 44, 32, 34, 60, 82, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 62, 37, 115, 60, - 47, 82, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 62, 34, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, -109, 101, 41, 10, 95, 112, 40, 50, 44, 32, 34, 60, 77, 105, 110, 105, 109, 117, 109, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 86, -101, 114, 115, 105, 111, 110, 62, 49, 52, 46, 48, 60, 47, 77, 105, 110, 105, 109, 117, 109, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, - 86, 101, 114, 115, 105, 111, 110, 62, 34, 41, 10, 95, 112, 40, 50, 44, 32, 34, 60, 80, 114, 111, 106, 101, 99, 116, 86, 101, 114, 115, 105, 111, -110, 62, 49, 46, 48, 60, 47, 80, 114, 111, 106, 101, 99, 116, 86, 101, 114, 115, 105, 111, 110, 62, 34, 41, 10, 101, 110, 100, 10, 112, 114, 101, -109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, - 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, -111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 80, 65, 67, 75, - 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 10, 97, 110, 100, 114, 111, 105, 100, 46, - 97, 110, 100, 114, 111, 105, 100, 65, 80, 73, 76, 101, 118, 101, 108, 44, 10, 118, 99, 50, 48, 49, 48, 46, 117, 115, 101, 68, 101, 98, 117, 103, - 76, 105, 98, 114, 97, 114, 105, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, 101, 109, 101, 110, 116, 115, - 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, -101, 109, 101, 110, 116, 115, 44, 32, 34, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 34, 44, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, -116, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, - 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 10, 97, 110, 100, -114, 111, 105, 100, 46, 97, 110, 116, 80, 97, 99, 107, 97, 103, 101, 44, 10, 125, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 101, 108, -101, 109, 101, 110, 116, 115, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, - 48, 49, 48, 44, 32, 34, 105, 109, 112, 111, 114, 116, 68, 101, 102, 97, 117, 108, 116, 80, 114, 111, 112, 115, 34, 44, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, - 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, -106, 101, 99, 116, 61, 34, 36, 40, 65, 110, 100, 114, 111, 105, 100, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, 65, 110, 100, -114, 111, 105, 100, 46, 68, 101, 102, 97, 117, 108, 116, 46, 112, 114, 111, 112, 115, 34, 32, 47, 62, 39, 41, 10, 101, 108, 115, 101, 10, 111, 108, -100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, -100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 105, 109, 112, 111, 114, 116, 76, 97, 110, 103, 117, 97, 103, 101, 83, 101, 116, 116, 105, 110, -103, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, - 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, - 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 65, 110, 100, 114, 111, 105, 100, 84, 97, 114, 103, 101, 116, 115, - 80, 97, 116, 104, 41, 92, 92, 65, 110, 100, 114, 111, 105, 100, 46, 112, 114, 111, 112, 115, 34, 32, 47, 62, 39, 41, 10, 101, 108, 115, 101, 10, -111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, -114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 112, 114, 111, 112, 101, 114, 116, 121, 83, 104, 101, 101, 116, 115, 34, 44, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, -126, 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, -110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 44, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, - 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 97, 110, 100, 114, -111, 105, 100, 46, 111, 117, 116, 68, 105, 114, 44, 10, 118, 99, 50, 48, 49, 48, 46, 105, 110, 116, 68, 105, 114, 44, 10, 118, 99, 50, 48, 49, - 48, 46, 116, 97, 114, 103, 101, 116, 78, 97, 109, 101, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, -110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, - 46, 111, 117, 116, 68, 105, 114, 40, 99, 102, 103, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 117, 116, - 68, 105, 114, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 92, 92, 34, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, -101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 41, 10, 101, 110, 100, 10, 112, 114, 101, 109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, -100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 105, 109, 112, 111, 114, 116, 76, 97, 110, 103, 117, 97, 103, 101, 84, 97, 114, 103, 101, 116, -115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, -107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 73, -109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 65, 110, 100, 114, 111, 105, 100, 84, 97, 114, 103, 101, 116, 115, 80, - 97, 116, 104, 41, 92, 92, 65, 110, 100, 114, 111, 105, 100, 46, 116, 97, 114, 103, 101, 116, 115, 34, 32, 47, 62, 39, 41, 10, 101, 108, 115, 101, - 10, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, -100, 114, 111, 105, 100, 46, 108, 105, 110, 107, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, -101, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 105, 108, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, - 32, 39, 47, 39, 41, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 44, 32, 99, 111, 117, 110, 116, 32, 61, 32, 102, 110, 97, 109, 101, 58, -103, 115, 117, 98, 40, 34, 37, 46, 37, 46, 37, 47, 34, 44, 32, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 101, 114, 110, 97, -108, 32, 61, 32, 40, 99, 111, 117, 110, 116, 32, 62, 32, 48, 41, 32, 111, 114, 32, 102, 110, 97, 109, 101, 58, 102, 105, 110, 100, 40, 39, 58, - 39, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 32, 111, 114, 32, 40, 102, 105, 108, 101, 46, 118, 112, 97, 116, 104, 32, 97, 110, 100, 32, 102, -105, 108, 101, 46, 118, 112, 97, 116, 104, 32, 126, 61, 32, 102, 105, 108, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 105, 102, 32, 101, 120, -116, 101, 114, 110, 97, 108, 32, 97, 110, 100, 32, 102, 105, 108, 101, 46, 118, 112, 97, 116, 104, 32, 126, 61, 32, 102, 105, 108, 101, 46, 114, 101, -108, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 32, 61, 32, 102, 105, 108, 101, 46, 118, 112, 97, 116, 104, 10, 101, 110, 100, - 10, 105, 102, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 76, 105, 110, 107, 34, 44, 32, 110, 105, 108, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 108, 105, 110, -107, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 118, 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 65, 110, -100, 114, 111, 105, 100, 77, 97, 110, 105, 102, 101, 115, 116, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 65, 110, 100, 114, 111, 105, -100, 77, 97, 110, 105, 102, 101, 115, 116, 34, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 61, 32, 57, 57, 44, 10, 101, 109, 105, 116, 70, -105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, - 49, 48, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 65, 110, 100, 114, 111, 105, -100, 77, 97, 110, 105, 102, 101, 115, 116, 34, 44, 32, 123, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, -101, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 108, 105, 110, 107, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 109, 97, 110, 105, 102, 101, 115, -116, 83, 117, 98, 84, 121, 112, 101, 125, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 116, 101, 114, 71, -114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 65, 110, 100, 114, 111, 105, 100, 77, 97, 110, 105, 102, 101, 115, -116, 34, 41, 10, 101, 110, 100, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 110, 100, 114, 111, 105, 100, 46, 109, 97, 110, 105, 102, -101, 115, 116, 83, 117, 98, 84, 121, 112, 101, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 83, 117, 98, 84, 121, 112, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 68, 101, 115, 105, 103, 110, 101, 114, 34, 41, - 10, 101, 110, 100, 10, 118, 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 65, 110, 116, 66, 117, 105, 108, 100, 88, -109, 108, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 65, 110, 116, 66, 117, 105, 108, 100, 88, 109, 108, 34, 44, 10, 112, 114, 105, -111, 114, 105, 116, 121, 32, 61, 32, 57, 57, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, -106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 65, 110, 116, 66, 117, 105, 108, 100, 88, 109, 108, 34, 44, 32, 123, 118, 99, 50, 48, 49, 48, - 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 108, 105, 110, 107, 125, 41, 10, 101, -110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, -114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, -111, 117, 112, 44, 32, 34, 65, 110, 116, 66, 117, 105, 108, 100, 88, 109, 108, 34, 41, 10, 101, 110, 100, 10, 125, 10, 118, 99, 50, 48, 49, 48, - 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 65, 110, 116, 80, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, - 70, 105, 108, 101, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 65, 110, 116, 80, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, -114, 116, 105, 101, 115, 70, 105, 108, 101, 34, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 61, 32, 57, 57, 44, 10, 101, 109, 105, 116, 70, -105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, - 49, 48, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 65, 110, 116, 80, 114, 111, -106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 70, 105, 108, 101, 34, 44, 32, 123, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, -101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 108, 105, 110, 107, 125, 41, 10, 101, 110, 100, 44, 10, -101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, - 41, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, - 32, 34, 65, 110, 116, 80, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 70, 105, 108, 101, 34, 41, 10, 101, 110, 100, - 10, 125, 10, 118, 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 74, 97, 118, 97, 67, 111, 109, 112, 105, 108, 101, - 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 74, 97, 118, 97, 67, 111, 109, 112, 105, 108, 101, 34, 44, 10, 112, 114, 105, 111, 114, -105, 116, 121, 32, 61, 32, 57, 57, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, -114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, - 32, 103, 114, 111, 117, 112, 44, 32, 34, 74, 97, 118, 97, 67, 111, 109, 112, 105, 108, 101, 34, 44, 32, 123, 118, 99, 50, 48, 49, 48, 46, 103, -101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 108, 105, 110, 107, 125, 41, 10, 101, 110, 100, - 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, -117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, -112, 44, 32, 34, 74, 97, 118, 97, 67, 111, 109, 112, 105, 108, 101, 34, 41, 10, 101, 110, 100, 10, 125, 10, 118, 99, 50, 48, 49, 48, 46, 99, - 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 67, 111, 110, 116, 101, 110, 116, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 67, 111, -110, 116, 101, 110, 116, 34, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 61, 32, 57, 57, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, -109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 111, 110, 116, 101, 110, 116, 34, 44, 32, -123, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 44, 32, 97, 110, 100, 114, 111, 105, 100, 46, 108, -105, 110, 107, 125, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, -112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 111, 110, 116, 101, 110, 116, 34, 41, 10, 101, 110, 100, 10, 125, 10, 112, 114, 101, -109, 97, 107, 101, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 44, 32, 34, 99, 97, 116, 101, 103, 111, 114, 105, 122, -101, 70, 105, 108, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 98, 97, 115, 101, 44, 32, 112, 114, 106, 44, 32, 102, 105, 108, 101, - 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 80, 65, 67, 75, 65, 71, 73, 78, 71, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 98, 97, 115, 101, 40, 112, 114, 106, 44, 32, 102, 105, 108, 101, 41, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 102, 105, 108, 101, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 102, 105, 108, 101, 46, -110, 97, 109, 101, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, -112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 105, 102, 32, 102, -105, 108, 101, 110, 97, 109, 101, 32, 61, 61, 32, 34, 97, 110, 100, 114, 111, 105, 100, 109, 97, 110, 105, 102, 101, 115, 116, 46, 120, 109, 108, 34, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 65, -110, 100, 114, 111, 105, 100, 77, 97, 110, 105, 102, 101, 115, 116, 10, 101, 108, 115, 101, 105, 102, 32, 102, 105, 108, 101, 110, 97, 109, 101, 32, 61, - 61, 32, 34, 98, 117, 105, 108, 100, 46, 120, 109, 108, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 99, 50, 48, 49, 48, - 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 65, 110, 116, 66, 117, 105, 108, 100, 88, 109, 108, 10, 101, 108, 115, 101, 105, 102, 32, 102, -105, 108, 101, 110, 97, 109, 101, 32, 61, 61, 32, 34, 112, 114, 111, 106, 101, 99, 116, 46, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 32, -116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 65, 110, -116, 80, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 70, 105, 108, 101, 10, 101, 108, 115, 101, 105, 102, 32, 101, 120, -116, 101, 110, 115, 105, 111, 110, 32, 61, 61, 32, 34, 46, 106, 97, 118, 97, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, - 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 74, 97, 118, 97, 67, 111, 109, 112, 105, 108, 101, 10, 101, 108, 115, -101, 10, 114, 101, 116, 117, 114, 110, 32, 118, 99, 50, 48, 49, 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 67, 111, 110, 116, 101, -110, 116, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, }; - -// raw/_preload.lua -static const unsigned char builtin_script_55[] = { -110, 101, 119, 97, 99, 116, 105, 111, 110, 10, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 114, - 97, 119, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 82, 97, 119, 32, 111, 117, 116, 112, -117, 116, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 32, 32, 32, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, - 32, 114, 97, 119, 32, 114, 101, 112, 114, 101, 115, 101, 110, 116, 97, 116, 105, 111, 110, 32, 111, 102, 32, 80, 114, 101, 109, 97, 107, 101, 32, 115, -116, 114, 117, 99, 116, 117, 114, 101, 115, 34, 44, 10, 111, 110, 115, 111, 108, 117, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 115, 108, 110, 41, 10, 114, 101, 113, 117, 105, 114, 101, 40, 39, 114, 97, 119, 39, 41, 10, 112, 114, 101, 109, 97, 107, 101, 46, 103, 101, -110, 101, 114, 97, 116, 101, 40, 115, 108, 110, 44, 32, 34, 46, 114, 97, 119, 34, 44, 32, 112, 114, 101, 109, 97, 107, 101, 46, 114, 97, 119, 46, -119, 111, 114, 107, 115, 112, 97, 99, 101, 41, 10, 101, 110, 100, 44, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 114, 97, 119, 34, 41, - 10, 101, 110, 100, 10, }; - -// raw/raw.lua -static const unsigned char builtin_script_56[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 114, 97, 119, 32, - 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 114, 97, 119, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 100, 111, 102, 105, 108, 101, 40, 34, 95, 112, 114, 101, 108, 111, 97, 100, 46, 108, 117, - 97, 34, 41, 10, 100, 111, 102, 105, 108, 101, 40, 34, 114, 97, 119, 95, 97, 99, 116, 105, 111, 110, 46, 108, 117, 97, 34, 41, 10, 114, 101, 116, -117, 114, 110, 32, 109, 10, }; - -// raw/raw_action.lua -static const unsigned char builtin_script_57[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 114, 97, 119, 32, 61, 32, 123, 32, 125, 10, 108, 111, - 99, 97, 108, 32, 114, 97, 119, 32, 61, 32, 112, 46, 114, 97, 119, 10, 108, 111, 99, 97, 108, 32, 103, 118, 105, 115, 105, 116, 101, 100, 32, 61, - 32, 123, 32, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 97, 119, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, - 10, 105, 102, 32, 110, 111, 116, 32, 103, 118, 105, 115, 105, 116, 101, 100, 91, 119, 107, 115, 46, 103, 108, 111, 98, 97, 108, 93, 32, 116, 104, 101, -110, 10, 103, 118, 105, 115, 105, 116, 101, 100, 91, 119, 107, 115, 46, 103, 108, 111, 98, 97, 108, 93, 32, 61, 32, 116, 114, 117, 101, 10, 114, 97, -119, 46, 112, 114, 105, 110, 116, 84, 97, 98, 108, 101, 40, 123, 32, 103, 108, 111, 98, 97, 108, 32, 61, 32, 119, 107, 115, 46, 103, 108, 111, 98, - 97, 108, 32, 125, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 97, 119, 46, 112, 114, 105, 110, 116, - 84, 97, 98, 108, 101, 40, 116, 44, 32, 105, 41, 10, 105, 32, 61, 32, 105, 32, 111, 114, 32, 48, 10, 112, 108, 97, 99, 101, 109, 101, 110, 116, - 32, 61, 32, 114, 97, 119, 46, 95, 99, 114, 101, 97, 116, 101, 80, 108, 97, 99, 101, 109, 101, 110, 116, 40, 116, 41, 10, 114, 97, 119, 46, 95, -112, 114, 105, 110, 116, 84, 97, 98, 108, 101, 82, 101, 99, 117, 114, 115, 105, 118, 101, 40, 116, 44, 32, 105, 44, 32, 112, 108, 97, 99, 101, 109, -101, 110, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 97, 119, 46, 95, 112, 114, 105, 110, 116, 84, 97, 98, 108, -101, 82, 101, 99, 117, 114, 115, 105, 118, 101, 40, 116, 44, 32, 105, 44, 32, 112, 108, 97, 99, 101, 109, 101, 110, 116, 41, 10, 101, 108, 101, 109, -101, 110, 116, 115, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 41, 32, -100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 123, 32, 107, 101, 121, 32, - 61, 32, 107, 44, 32, 118, 97, 108, 117, 101, 32, 61, 32, 118, 32, 125, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, - 40, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 32, 98, 41, 10, 108, 111, 99, 97, 108, 32, -110, 49, 32, 61, 32, 116, 121, 112, 101, 40, 97, 46, 107, 101, 121, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 10, 108, 111, 99, - 97, 108, 32, 110, 50, 32, 61, 32, 116, 121, 112, 101, 40, 98, 46, 107, 101, 121, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 10, -105, 102, 32, 110, 49, 32, 126, 61, 32, 110, 50, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 49, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 107, 49, 32, 61, 32, 110, 49, 32, 97, 110, 100, 32, 97, 46, 107, 101, 121, 32, 111, 114, 32, 114, 97, 119, 46, 95, 101, -110, 99, 111, 100, 101, 40, 97, 46, 107, 101, 121, 41, 10, 108, 111, 99, 97, 108, 32, 107, 50, 32, 61, 32, 110, 50, 32, 97, 110, 100, 32, 98, - 46, 107, 101, 121, 32, 111, 114, 32, 114, 97, 119, 46, 95, 101, 110, 99, 111, 100, 101, 40, 98, 46, 107, 101, 121, 41, 10, 114, 101, 116, 117, 114, -110, 32, 107, 49, 32, 60, 32, 107, 50, 10, 101, 110, 100, 41, 10, 102, 111, 114, 32, 95, 44, 32, 101, 108, 101, 109, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 101, 108, 101, 109, 101, 110, 116, 115, 41, 32, 100, 111, 10, 112, 32, 61, 32, 112, 108, 97, 99, 101, 109, 101, 110, 116, 91, -101, 108, 101, 109, 46, 118, 97, 108, 117, 101, 93, 10, 105, 102, 32, 112, 32, 97, 110, 100, 32, 101, 108, 101, 109, 46, 107, 101, 121, 32, 61, 61, - 32, 112, 46, 107, 101, 121, 32, 97, 110, 100, 32, 116, 32, 61, 61, 32, 112, 46, 112, 97, 114, 101, 110, 116, 32, 116, 104, 101, 110, 10, 95, 112, - 40, 105, 44, 32, 34, 37, 115, 34, 44, 32, 114, 97, 119, 46, 95, 101, 110, 99, 111, 100, 101, 40, 101, 108, 101, 109, 46, 107, 101, 121, 41, 32, - 46, 46, 32, 39, 58, 32, 39, 32, 46, 46, 32, 114, 97, 119, 46, 95, 101, 110, 99, 111, 100, 101, 40, 101, 108, 101, 109, 46, 118, 97, 108, 117, -101, 41, 32, 46, 46, 32, 39, 32, 123, 39, 41, 10, 114, 97, 119, 46, 95, 112, 114, 105, 110, 116, 84, 97, 98, 108, 101, 82, 101, 99, 117, 114, -115, 105, 118, 101, 40, 101, 108, 101, 109, 46, 118, 97, 108, 117, 101, 44, 32, 105, 32, 43, 32, 49, 44, 32, 112, 108, 97, 99, 101, 109, 101, 110, -116, 41, 10, 95, 112, 40, 105, 44, 32, 39, 125, 32, 35, 32, 39, 32, 46, 46, 32, 114, 97, 119, 46, 95, 101, 110, 99, 111, 100, 101, 40, 101, -108, 101, 109, 46, 107, 101, 121, 41, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 105, 44, 32, 34, 37, 115, 34, 44, 32, 114, 97, 119, 46, 95, -101, 110, 99, 111, 100, 101, 40, 101, 108, 101, 109, 46, 107, 101, 121, 41, 32, 46, 46, 32, 39, 58, 32, 39, 32, 46, 46, 32, 114, 97, 119, 46, - 95, 101, 110, 99, 111, 100, 101, 40, 101, 108, 101, 109, 46, 118, 97, 108, 117, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 114, 97, 119, 46, 95, 99, 114, 101, 97, 116, 101, 80, 108, 97, 99, 101, 109, 101, 110, 116, 40, 116, - 98, 108, 41, 10, 112, 108, 97, 99, 101, 109, 101, 110, 116, 32, 61, 32, 123, 32, 125, 10, 112, 108, 97, 99, 101, 109, 101, 110, 116, 76, 105, 115, -116, 32, 61, 32, 123, 32, 116, 98, 108, 32, 125, 10, 119, 104, 105, 108, 101, 32, 35, 112, 108, 97, 99, 101, 109, 101, 110, 116, 76, 105, 115, 116, - 32, 126, 61, 32, 48, 32, 100, 111, 10, 112, 97, 114, 101, 110, 116, 76, 105, 115, 116, 32, 61, 32, 123, 32, 125, 10, 102, 111, 114, 32, 95, 44, - 32, 112, 97, 114, 101, 110, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 108, 97, 99, 101, 109, 101, 110, 116, 76, 105, 115, 116, 41, - 32, 100, 111, 10, 102, 111, 114, 32, 107, 44, 32, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 112, 97, 114, 101, 110, 116, 41, 32, 100, 111, - 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 112, -108, 97, 99, 101, 109, 101, 110, 116, 91, 118, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, -114, 101, 110, 116, 76, 105, 115, 116, 44, 32, 118, 41, 10, 112, 108, 97, 99, 101, 109, 101, 110, 116, 91, 118, 93, 32, 61, 32, 123, 10, 112, 97, -114, 101, 110, 116, 32, 61, 32, 112, 97, 114, 101, 110, 116, 44, 10, 107, 101, 121, 32, 61, 32, 107, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 112, 108, 97, 99, 101, 109, 101, 110, 116, 76, 105, 115, 116, 32, 61, 32, 112, 97, 114, 101, 110, 116, 76, 105, 115, 116, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 108, 97, 99, 101, 109, 101, 110, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 114, 97, 119, 46, 95, 101, 110, 99, 111, 100, 101, 40, 118, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 41, 32, 61, 61, 32, 34, -115, 116, 114, 105, 110, 103, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 39, 34, 39, 32, 46, 46, 32, 118, 32, 46, 46, 32, - 39, 34, 39, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, }; - -// self-test/self-test.lua -static const unsigned char builtin_script_58[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 115, 101, 108, 102, - 95, 116, 101, 115, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 115, -101, 108, 102, 95, 116, 101, 115, 116, 10, 109, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, - 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 61, 32, 34, 115, 101, 108, 102, 45, 116, 101, 115, -116, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 61, 32, 34, 84, 101, 115, 116, 32, 80, 114, 101, 109, 97, 107, 101, 34, 44, - 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 82, 117, 110, 32, 80, 114, 101, 109, 97, 107, 101, 39, 115, 32, 111, 119, -110, 32, 108, 111, 99, 97, 108, 32, 117, 110, 105, 116, 32, 116, 101, 115, 116, 32, 115, 117, 105, 116, 101, 115, 34, 44, 10, 101, 120, 101, 99, 117, -116, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 109, 46, 101, 120, 101, 99, 117, 116, 101, 83, 101, 108, 102, 84, 101, 115, -116, 40, 41, 10, 101, 110, 100, 10, 125, 10, 110, 101, 119, 111, 112, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 61, 32, - 34, 116, 101, 115, 116, 45, 111, 110, 108, 121, 34, 44, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 115, 117, 105, 116, 101, 91, 46, 116, 101, 115, -116, 93, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 70, 111, 114, 32, 115, 101, 108, 102, 45, 116, 101, 115, -116, 32, 97, 99, 116, 105, 111, 110, 59, 32, 114, 117, 110, 32, 115, 112, 101, 99, 105, 102, 105, 99, 32, 115, 117, 105, 116, 101, 32, 111, 114, 32, -116, 101, 115, 116, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 101, 99, 117, 116, 101, 83, 101, 108, 102, 84, 101, -115, 116, 40, 41, 10, 109, 46, 100, 101, 116, 101, 99, 116, 68, 117, 112, 108, 105, 99, 97, 116, 101, 84, 101, 115, 116, 115, 32, 61, 32, 116, 114, -117, 101, 10, 109, 46, 108, 111, 97, 100, 84, 101, 115, 116, 115, 70, 114, 111, 109, 77, 97, 110, 105, 102, 101, 115, 116, 115, 40, 41, 10, 109, 46, -100, 101, 116, 101, 99, 116, 68, 117, 112, 108, 105, 99, 97, 116, 101, 84, 101, 115, 116, 115, 32, 61, 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, - 97, 108, 32, 116, 101, 115, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 105, 115, 65, 99, 116, 105, 111, 110, 32, 61, 32, 116, -114, 117, 101, 10, 102, 111, 114, 32, 105, 44, 32, 97, 114, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 95, 65, 82, 71, 83, 41, 32, -100, 111, 10, 108, 111, 99, 97, 108, 32, 95, 116, 101, 115, 116, 115, 44, 32, 101, 114, 114, 32, 61, 32, 109, 46, 103, 101, 116, 84, 101, 115, 116, -115, 87, 105, 116, 104, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 40, 97, 114, 103, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, - 10, 101, 114, 114, 111, 114, 40, 101, 114, 114, 44, 32, 48, 41, 10, 101, 110, 100, 10, 116, 101, 115, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, - 46, 106, 111, 105, 110, 40, 116, 101, 115, 116, 115, 44, 32, 95, 116, 101, 115, 116, 115, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 116, 101, 115, -116, 115, 32, 61, 61, 32, 48, 32, 111, 114, 32, 95, 79, 80, 84, 73, 79, 78, 83, 91, 34, 116, 101, 115, 116, 45, 111, 110, 108, 121, 34, 93, - 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 95, 116, 101, 115, 116, 115, 44, 32, 101, 114, 114, 32, 61, - 32, 109, 46, 103, 101, 116, 84, 101, 115, 116, 115, 87, 105, 116, 104, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 40, 95, 79, 80, 84, 73, 79, - 78, 83, 91, 34, 116, 101, 115, 116, 45, 111, 110, 108, 121, 34, 93, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 101, 114, 114, -111, 114, 40, 101, 114, 114, 44, 32, 48, 41, 10, 101, 110, 100, 10, 116, 101, 115, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, -110, 40, 116, 101, 115, 116, 115, 44, 32, 95, 116, 101, 115, 116, 115, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 115, 115, 101, -100, 44, 32, 102, 97, 105, 108, 101, 100, 32, 61, 32, 109, 46, 114, 117, 110, 84, 101, 115, 116, 40, 116, 101, 115, 116, 115, 41, 10, 105, 102, 32, -102, 97, 105, 108, 101, 100, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 102, 40, 34, 92, 110, 32, 37, 100, 32, 70, 65, - 73, 76, 69, 68, 32, 84, 69, 83, 84, 37, 115, 34, 44, 32, 102, 97, 105, 108, 101, 100, 44, 32, 105, 105, 102, 40, 102, 97, 105, 108, 101, 100, - 32, 62, 32, 49, 44, 32, 34, 83, 34, 44, 32, 34, 34, 41, 41, 10, 111, 115, 46, 101, 120, 105, 116, 40, 53, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 97, 100, 84, 101, 115, 116, 115, 70, 114, 111, 109, 77, 97, 110, 105, 102, -101, 115, 116, 115, 40, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 115, 107, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 95, 77, - 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 95, 68, 73, 82, 44, 32, 34, 42, 42, 47, 116, 101, 115, 116, 115, 47, 95, 116, 101, 115, 116, 115, - 46, 108, 117, 97, 34, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 110, 105, 102, 101, 115, 116, 115, 32, 61, 32, 111, 115, 46, 109, 97, 116, 99, -104, 102, 105, 108, 101, 115, 40, 109, 97, 115, 107, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 112, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, -105, 110, 40, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 95, 68, 73, 82, 44, 32, 34, 116, 101, 115, 116, 115, 47, 95, 116, 101, 115, -116, 115, 46, 108, 117, 97, 34, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 116, 111, 112, 41, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 109, 97, 110, 105, 102, 101, 115, 116, 115, 44, 32, 49, 44, 32, 116, 111, 112, 41, 10, -101, 110, 100, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 109, 97, 110, 105, 102, 101, 115, 116, 115, 32, 100, 111, 10, 108, 111, 99, - 97, 108, 32, 109, 97, 110, 105, 102, 101, 115, 116, 32, 61, 32, 109, 97, 110, 105, 102, 101, 115, 116, 115, 91, 105, 93, 10, 95, 84, 69, 83, 84, - 83, 95, 68, 73, 82, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 109, 97, 110, 105, 102, 101, -115, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 100, 111, 102, 105, 108, 101, 40, 109, 97, 110, 105, 102, 101, 115, -116, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 102, 105, 108, 101, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, -108, 101, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 95, 84, 69, 83, 84, 83, 95, 68, 73, 82, 44, 32, 102, -105, 108, 101, 115, 91, 105, 93, 41, 10, 100, 111, 102, 105, 108, 101, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 100, 111, 102, 105, 108, 101, 40, 34, 116, 101, 115, 116, 95, 97, 115, 115, 101, 114, 116, 105, 111, 110, 115, 46, 108, 117, - 97, 34, 41, 10, 100, 111, 102, 105, 108, 101, 40, 34, 116, 101, 115, 116, 95, 100, 101, 99, 108, 97, 114, 101, 46, 108, 117, 97, 34, 41, 10, 100, -111, 102, 105, 108, 101, 40, 34, 116, 101, 115, 116, 95, 104, 101, 108, 112, 101, 114, 115, 46, 108, 117, 97, 34, 41, 10, 100, 111, 102, 105, 108, 101, - 40, 34, 116, 101, 115, 116, 95, 114, 117, 110, 110, 101, 114, 46, 108, 117, 97, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 109, 10, }; - -// self-test/test_assertions.lua -static const unsigned char builtin_script_59[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 115, 101, 108, 102, 95, 116, 101, 115, 116, 10, 108, 111, 99, 97, 108, 32, 95, 32, 61, 32, 123, 125, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 99, 97, 112, 116, 117, 114, 101, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, - 97, 99, 116, 117, 97, 108, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 100, 40, 41, 32, 46, 46, 32, 112, 46, 101, 111, 108, 40, 41, - 10, 108, 111, 99, 97, 108, 32, 97, 105, 116, 32, 61, 32, 97, 99, 116, 117, 97, 108, 58, 103, 109, 97, 116, 99, 104, 40, 34, 40, 46, 45, 41, - 34, 32, 46, 46, 32, 112, 46, 101, 111, 108, 40, 41, 41, 10, 108, 111, 99, 97, 108, 32, 101, 105, 116, 32, 61, 32, 101, 120, 112, 101, 99, 116, -101, 100, 58, 103, 109, 97, 116, 99, 104, 40, 34, 40, 46, 45, 41, 92, 110, 34, 41, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 101, 110, 117, -109, 32, 61, 32, 49, 10, 108, 111, 99, 97, 108, 32, 97, 116, 120, 116, 32, 61, 32, 97, 105, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 101, -116, 120, 116, 32, 61, 32, 101, 105, 116, 40, 41, 10, 119, 104, 105, 108, 101, 32, 101, 116, 120, 116, 32, 100, 111, 10, 105, 102, 32, 40, 101, 116, -120, 116, 32, 126, 61, 32, 97, 116, 120, 116, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 40, 37, 100, 41, 32, 101, 120, -112, 101, 99, 116, 101, 100, 58, 92, 110, 37, 115, 92, 110, 46, 46, 46, 98, 117, 116, 32, 119, 97, 115, 58, 92, 110, 37, 115, 92, 110, 102, 117, -108, 108, 116, 101, 120, 116, 58, 92, 110, 37, 115, 34, 44, 32, 108, 105, 110, 101, 110, 117, 109, 44, 32, 101, 116, 120, 116, 44, 32, 97, 116, 120, -116, 44, 32, 97, 99, 116, 117, 97, 108, 41, 10, 101, 110, 100, 10, 108, 105, 110, 101, 110, 117, 109, 32, 61, 32, 108, 105, 110, 101, 110, 117, 109, - 32, 43, 32, 49, 10, 97, 116, 120, 116, 32, 61, 32, 97, 105, 116, 40, 41, 10, 101, 116, 120, 116, 32, 61, 32, 101, 105, 116, 40, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 108, 111, 115, 101, 100, 102, 105, 108, 101, 40, 101, 120, 112, -101, 99, 116, 101, 100, 41, 10, 105, 102, 32, 101, 120, 112, 101, 99, 116, 101, 100, 32, 97, 110, 100, 32, 110, 111, 116, 32, 109, 46, 118, 97, 108, -117, 101, 95, 99, 108, 111, 115, 101, 100, 102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, -116, 101, 100, 32, 102, 105, 108, 101, 32, 116, 111, 32, 98, 101, 32, 99, 108, 111, 115, 101, 100, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 110, -111, 116, 32, 101, 120, 112, 101, 99, 116, 101, 100, 32, 97, 110, 100, 32, 109, 46, 118, 97, 108, 117, 101, 95, 99, 108, 111, 115, 101, 100, 102, 105, -108, 101, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 102, 105, 108, 101, 32, 116, 111, - 32, 114, 101, 109, 97, 105, 110, 32, 111, 112, 101, 110, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, 97, 99, 116, 117, 97, 108, 41, 10, 105, 102, 32, -116, 121, 112, 101, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, -111, 114, 32, 105, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 32, 100, 111, 10, 109, - 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 118, 44, 32, 97, 99, 116, 117, 97, 108, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, -110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 97, 99, 116, 117, 97, 108, 44, 32, 101, 120, 112, 101, 99, -116, 101, 100, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 118, 97, 108, 117, 101, - 32, 37, 115, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 34, 44, 32, 101, 120, 112, 101, 99, 116, 101, 100, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 99, 108, 117, 100, 101, 115, 40, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, - 97, 99, 116, 117, 97, 108, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 32, 61, 61, 32, 34, 116, 97, - 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 101, 120, 112, -101, 99, 116, 101, 100, 41, 32, 100, 111, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 115, 40, 118, 44, 32, 97, 99, 116, 117, 97, 108, 41, 10, -101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 97, 99, 116, 117, 97, 108, - 44, 32, 101, 120, 112, 101, 99, 116, 101, 100, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 101, 120, 99, 108, 117, 100, 101, -100, 32, 118, 97, 108, 117, 101, 32, 37, 115, 32, 102, 111, 117, 110, 100, 34, 44, 32, 101, 120, 112, 101, 99, 116, 101, 100, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 97, 105, 108, 40, 102, 111, 114, 109, 97, 116, 44, 32, 46, 46, 46, - 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 116, 104, 32, 61, 32, 51, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, - 46, 46, 125, 10, 105, 102, 32, 116, 121, 112, 101, 40, 102, 111, 114, 109, 97, 116, 41, 32, 61, 61, 32, 34, 110, 117, 109, 98, 101, 114, 34, 32, -116, 104, 101, 110, 10, 100, 101, 112, 116, 104, 32, 61, 32, 100, 101, 112, 116, 104, 32, 43, 32, 102, 111, 114, 109, 97, 116, 10, 102, 111, 114, 109, - 97, 116, 32, 61, 32, 116, 97, 98, 108, 101, 46, 114, 101, 109, 111, 118, 101, 40, 97, 114, 103, 44, 32, 49, 41, 10, 101, 110, 100, 10, 102, 111, -114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 97, 114, 103, 32, 100, 111, 10, 105, 102, 32, 40, 97, 114, 103, 91, 105, 93, 32, 61, 61, 32, 110, -105, 108, 41, 32, 116, 104, 101, 110, 10, 97, 114, 103, 91, 105, 93, 32, 61, 32, 34, 40, 110, 105, 108, 41, 34, 10, 101, 108, 115, 101, 105, 102, - 32, 40, 116, 121, 112, 101, 40, 97, 114, 103, 91, 105, 93, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 41, 32, 116, 104, 101, 110, 10, - 97, 114, 103, 91, 105, 93, 32, 61, 32, 34, 123, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 97, 114, 103, - 91, 105, 93, 44, 32, 34, 44, 32, 34, 41, 32, 46, 46, 32, 34, 125, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, -109, 115, 103, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 102, 111, 114, 109, 97, 116, 44, 32, 116, 97, 98, 108, -101, 46, 117, 110, 112, 97, 99, 107, 40, 97, 114, 103, 41, 41, 10, 101, 114, 114, 111, 114, 40, 100, 101, 98, 117, 103, 46, 116, 114, 97, 99, 101, - 98, 97, 99, 107, 40, 109, 115, 103, 44, 32, 100, 101, 112, 116, 104, 41, 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 99, 111, 110, 116, 97, 105, 110, 115, 40, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, 102, -110, 41, 10, 108, 111, 99, 97, 108, 32, 102, 32, 61, 32, 105, 111, 46, 111, 112, 101, 110, 40, 102, 110, 41, 10, 108, 111, 99, 97, 108, 32, 97, - 99, 116, 117, 97, 108, 32, 61, 32, 102, 58, 114, 101, 97, 100, 40, 34, 42, 97, 34, 41, 10, 102, 58, 99, 108, 111, 115, 101, 40, 41, 10, 105, -102, 32, 40, 101, 120, 112, 101, 99, 116, 101, 100, 32, 126, 61, 32, 97, 99, 116, 117, 97, 108, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, -105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 37, 115, 32, 98, 117, 116, 32, 119, 97, 115, 32, 37, 115, 34, 44, 32, 101, 120, 112, -101, 99, 116, 101, 100, 44, 32, 97, 99, 116, 117, 97, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 104, 97, 115, 111, 117, 116, 112, 117, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 117, 97, 108, 32, 61, 32, 112, 46, 99, - 97, 112, 116, 117, 114, 101, 100, 40, 41, 10, 105, 102, 32, 97, 99, 116, 117, 97, 108, 32, 61, 61, 32, 34, 34, 32, 116, 104, 101, 110, 10, 109, - 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 111, 117, 116, 112, 117, 116, 44, 32, 114, 101, 99, 101, 105, 118, 101, 100, - 32, 110, 111, 110, 101, 34, 41, 59, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 101, 109, -112, 116, 121, 99, 97, 112, 116, 117, 114, 101, 40, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 117, 97, 108, 32, 61, 32, 112, 46, 99, 97, -112, 116, 117, 114, 101, 100, 40, 41, 10, 105, 102, 32, 97, 99, 116, 117, 97, 108, 32, 126, 61, 32, 34, 34, 32, 116, 104, 101, 110, 10, 109, 46, -102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 101, 109, 112, 116, 121, 32, 99, 97, 112, 116, 117, 114, 101, 44, 32, 98, 117, -116, 32, 119, 97, 115, 32, 37, 115, 34, 44, 32, 97, 99, 116, 117, 97, 108, 41, 59, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 105, 115, 101, 113, 117, 97, 108, 40, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, 97, 99, 116, 117, 97, 108, 44, - 32, 100, 101, 112, 116, 104, 41, 10, 100, 101, 112, 116, 104, 32, 61, 32, 100, 101, 112, 116, 104, 32, 111, 114, 32, 48, 10, 105, 102, 32, 116, 121, -112, 101, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, -101, 120, 112, 101, 99, 116, 101, 100, 32, 97, 110, 100, 32, 110, 111, 116, 32, 97, 99, 116, 117, 97, 108, 32, 116, 104, 101, 110, 10, 109, 46, 102, - 97, 105, 108, 40, 100, 101, 112, 116, 104, 44, 32, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 116, 97, 98, 108, 101, 44, 32, 103, 111, 116, 32, -110, 105, 108, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 101, 120, 112, 101, 99, 116, 101, 100, 32, 60, 32, 35, 97, 99, 116, 117, 97, 108, - 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 100, 101, 112, 116, 104, 44, 32, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 37, 100, - 32, 105, 116, 101, 109, 115, 44, 32, 103, 111, 116, 32, 37, 100, 34, 44, 32, 35, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, 35, 97, 99, 116, -117, 97, 108, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 107, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 101, 120, 112, 101, 99, 116, -101, 100, 41, 32, 100, 111, 10, 109, 46, 105, 115, 101, 113, 117, 97, 108, 40, 101, 120, 112, 101, 99, 116, 101, 100, 91, 107, 93, 44, 32, 97, 99, -116, 117, 97, 108, 91, 107, 93, 44, 32, 100, 101, 112, 116, 104, 32, 43, 32, 49, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, 32, - 40, 101, 120, 112, 101, 99, 116, 101, 100, 32, 126, 61, 32, 97, 99, 116, 117, 97, 108, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, - 40, 100, 101, 112, 116, 104, 44, 32, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 37, 115, 32, 98, 117, 116, 32, 119, 97, 115, 32, 37, 115, 34, - 44, 32, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, 97, 99, 116, 117, 97, 108, 32, 111, 114, 32, 34, 110, 105, 108, 34, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -105, 115, 102, 97, 108, 115, 101, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 109, - 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 102, 97, 108, 115, 101, 32, 98, 117, 116, 32, 119, 97, 115, 32, 116, 114, -117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 110, 105, 108, 40, 118, 97, -108, 117, 101, 41, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, -105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 110, 105, 108, 32, 98, 117, 116, 32, 119, 97, 115, 32, 34, 32, 46, 46, 32, 116, 111, -115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 105, 115, 110, 111, 116, 110, 105, 108, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 40, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, -105, 108, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 110, 111, 116, 32, 110, 105, -108, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 115, 97, 109, 101, 40, 101, 120, -112, 101, 99, 116, 101, 100, 44, 32, 97, 99, 116, 105, 111, 110, 41, 10, 105, 102, 32, 101, 120, 112, 101, 99, 116, 101, 100, 32, 126, 61, 32, 97, - 99, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 115, 97, 109, 101, - 32, 118, 97, 108, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 116, 114, -117, 101, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 40, 110, 111, 116, 32, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 109, 46, -102, 97, 105, 108, 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 116, 114, 117, 101, 32, 98, 117, 116, 32, 119, 97, 115, 32, 102, 97, 108, 115, -101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 105, 115, 115, 105, 110, 103, 40, 118, - 97, 108, 117, 101, 44, 32, 97, 99, 116, 117, 97, 108, 41, 10, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, - 97, 99, 116, 117, 97, 108, 44, 32, 118, 97, 108, 117, 101, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 117, 110, 101, 120, -112, 101, 99, 116, 101, 100, 32, 118, 97, 108, 117, 101, 32, 37, 115, 32, 102, 111, 117, 110, 100, 34, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 40, 102, 110, 97, -109, 101, 41, 10, 105, 102, 32, 102, 110, 97, 109, 101, 32, 126, 61, 32, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, -108, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 109, 115, 103, 32, 61, 32, 34, 101, 120, 112, 101, 99, 116, 101, -100, 32, 116, 111, 32, 111, 112, 101, 110, 32, 102, 105, 108, 101, 32, 39, 34, 32, 46, 46, 32, 102, 110, 97, 109, 101, 32, 46, 46, 32, 34, 39, - 34, 10, 105, 102, 32, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, - 10, 109, 115, 103, 32, 61, 32, 109, 115, 103, 32, 46, 46, 32, 34, 44, 32, 103, 111, 116, 32, 39, 34, 32, 46, 46, 32, 109, 46, 118, 97, 108, -117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 39, 34, 10, 101, 110, 100, 10, 109, 46, 102, - 97, 105, 108, 40, 109, 115, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 117, 99, 99, -101, 115, 115, 40, 102, 110, 44, 32, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 112, 99, 97, -108, 108, 40, 102, 110, 44, 32, 46, 46, 46, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, -108, 40, 34, 99, 97, 108, 108, 32, 102, 97, 105, 108, 101, 100, 58, 32, 34, 32, 46, 46, 32, 101, 114, 114, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 116, 100, 101, 114, 114, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 10, 105, 102, - 32, 110, 111, 116, 32, 101, 120, 112, 101, 99, 116, 101, 100, 32, 97, 110, 100, 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, -114, 101, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 34, 85, 110, 101, 120, 112, 101, 99, 116, 101, 100, 58, 32, 34, 32, 46, 46, - 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 101, 120, 112, 101, 99, 116, -101, 100, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 32, -111, 114, 32, 110, 111, 116, 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 58, 102, 105, 110, 100, 40, 101, 120, 112, -101, 99, 116, 101, 100, 41, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, 108, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, - 40, 34, 101, 120, 112, 101, 99, 116, 101, 100, 32, 39, 37, 115, 39, 59, 32, 103, 111, 116, 32, 37, 115, 34, 44, 32, 101, 120, 112, 101, 99, 116, -101, 100, 44, 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 32, 111, 114, 32, 34, 40, 110, 105, 108, 41, 34, 41, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 110, 111, 116, 115, 116, 100, 101, -114, 114, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 10, 105, 102, 32, 110, 111, 116, 32, 101, 120, 112, 101, 99, 116, 101, 100, 32, 97, 110, 100, - 32, 110, 111, 116, 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 32, 116, 104, 101, 110, 10, 109, 46, 102, 97, 105, -108, 40, 34, 69, 120, 112, 101, 99, 116, 101, 100, 32, 111, 117, 116, 112, 117, 116, 32, 111, 110, 32, 115, 116, 100, 101, 114, 114, 59, 32, 110, 111, -110, 101, 32, 114, 101, 99, 101, 105, 118, 101, 100, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 101, 120, 112, 101, 99, 116, 101, 100, 32, 116, 104, -101, 110, 10, 105, 102, 32, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 32, 97, 110, 100, 32, 109, 46, 115, 116, 100, -101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 58, 102, 105, 110, 100, 40, 101, 120, 112, 101, 99, 116, 101, 100, 41, 32, 116, 104, 101, 110, 10, -109, 46, 102, 97, 105, 108, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 115, 116, 100, 101, 114, 114, 32, 99, 111, 110, -116, 97, 105, 110, 115, 32, 39, 37, 115, 39, 59, 32, 119, 97, 115, 32, 37, 115, 34, 44, 32, 101, 120, 112, 101, 99, 116, 101, 100, 44, 32, 109, - 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// self-test/test_declare.lua -static const unsigned char builtin_script_60[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 115, 101, 108, 102, 95, 116, 101, 115, 116, 10, 108, 111, 99, 97, 108, 32, 95, 32, 61, 32, 123, 125, 10, 95, 46, 115, -117, 105, 116, 101, 115, 32, 61, 32, 123, 125, 10, 95, 46, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, 32, 61, 32, 123, 125, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 99, 108, 97, 114, 101, 40, 115, 117, 105, 116, 101, 78, 97, 109, 101, 41, 10, 105, 102, 32, 95, 46, -115, 117, 105, 116, 101, 115, 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 39, 68, 117, -112, 108, 105, 99, 97, 116, 101, 32, 116, 101, 115, 116, 32, 115, 117, 105, 116, 101, 32, 34, 39, 46, 46, 32, 115, 117, 105, 116, 101, 78, 97, 109, -101, 32, 46, 46, 32, 39, 34, 39, 44, 32, 50, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 95, 115, 117, 105, 116, 101, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, 116, 101, 32, 61, 32, 115, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 123, 125, - 44, 32, 123, 10, 95, 95, 105, 110, 100, 101, 120, 32, 61, 32, 95, 115, 117, 105, 116, 101, 44, 10, 95, 95, 110, 101, 119, 105, 110, 100, 101, 120, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 116, 97, 98, 108, 101, 44, 32, 107, 101, 121, 44, 32, 118, 97, 108, 117, 101, 41, 10, -105, 102, 32, 109, 46, 100, 101, 116, 101, 99, 116, 68, 117, 112, 108, 105, 99, 97, 116, 101, 84, 101, 115, 116, 115, 32, 97, 110, 100, 32, 95, 115, -117, 105, 116, 101, 91, 107, 101, 121, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 39, 68, 117, 112, -108, 105, 99, 97, 116, 101, 32, 116, 101, 115, 116, 32, 34, 39, 46, 46, 32, 107, 101, 121, 32, 46, 46, 32, 39, 34, 39, 44, 32, 50, 41, 10, -101, 110, 100, 10, 95, 115, 117, 105, 116, 101, 91, 107, 101, 121, 93, 32, 61, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 44, 10, 95, 95, 112, - 97, 105, 114, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 116, 97, 98, 108, 101, 41, 32, 114, 101, 116, 117, 114, 110, 32, 112, - 97, 105, 114, 115, 40, 95, 115, 117, 105, 116, 101, 41, 32, 101, 110, 100, 44, 10, 95, 95, 105, 112, 97, 105, 114, 115, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 40, 116, 97, 98, 108, 101, 41, 32, 114, 101, 116, 117, 114, 110, 32, 105, 112, 97, 105, 114, 115, 40, 95, 115, 117, 105, -116, 101, 41, 32, 101, 110, 100, 44, 10, 125, 41, 10, 115, 117, 105, 116, 101, 46, 95, 83, 67, 82, 73, 80, 84, 95, 68, 73, 82, 32, 61, 32, - 95, 83, 67, 82, 73, 80, 84, 95, 68, 73, 82, 10, 115, 117, 105, 116, 101, 46, 95, 84, 69, 83, 84, 83, 95, 68, 73, 82, 32, 61, 32, 95, - 84, 69, 83, 84, 83, 95, 68, 73, 82, 10, 95, 46, 115, 117, 105, 116, 101, 115, 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 32, 61, 32, -115, 117, 105, 116, 101, 10, 114, 101, 116, 117, 114, 110, 32, 115, 117, 105, 116, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 115, 117, 112, 112, 114, 101, 115, 115, 40, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 105, -100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, - 32, 61, 32, 49, 44, 32, 35, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 100, 111, 10, 109, 46, 115, 117, 112, 112, 114, 101, 115, 115, 40, -105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 91, 105, 93, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 95, 46, 115, 117, 112, 112, 114, 101, -115, 115, 101, 100, 91, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 93, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 83, 117, 112, 112, 114, 101, 115, 115, 101, 100, 40, 105, 100, 101, 110, 116, 105, 102, 105, -101, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 95, 46, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, 91, 105, 100, 101, 110, 116, 105, 102, 105, -101, 114, 93, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 86, 97, 108, 105, 100, 40, 116, 101, 115, 116, 41, - 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 101, 115, 116, 46, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 41, 32, 126, 61, 32, 34, -102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, -105, 102, 32, 116, 101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 115, 101, 116, 117, 112, 34, 32, 111, 114, 32, 116, -101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 116, 101, 97, 114, 100, 111, 119, 110, 34, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 83, 117, 105, 116, 101, 115, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 95, - 46, 115, 117, 105, 116, 101, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 84, 101, 115, 116, 115, 87, -105, 116, 104, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 40, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 10, 108, 111, 99, 97, 108, 32, -115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 109, 46, 112, 97, 114, 115, 101, 84, 101, 115, -116, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 40, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 10, 105, 102, 32, 115, 117, 105, 116, 101, - 78, 97, 109, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 115, 116, 114, 105, 110, 103, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, -115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 34, 42, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 115, - 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 116, 101, 114, 110, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 103, 115, 117, - 98, 40, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 34, 42, 34, 44, 32, 34, 46, 42, 34, 41, 10, 102, 111, 114, 32, 95, 115, 117, 105, -116, 101, 78, 97, 109, 101, 44, 32, 115, 117, 105, 116, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 95, 46, 115, 117, 105, 116, 101, 115, 41, - 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 108, 101, 110, 103, 116, 104, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 108, 101, 110, 40, 95, 115, -117, 105, 116, 101, 78, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 97, 114, 116, 44, 32, 102, 105, 110, 105, 115, 104, 32, 61, 32, -115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 95, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 112, 97, 116, 116, 101, 114, 110, 41, - 10, 105, 102, 32, 115, 116, 97, 114, 116, 32, 61, 61, 32, 49, 32, 97, 110, 100, 32, 102, 105, 110, 105, 115, 104, 32, 61, 61, 32, 108, 101, 110, -103, 116, 104, 32, 116, 104, 101, 110, 10, 105, 102, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 116, 101, 115, 116, 78, 97, 109, 101, 44, 32, 34, 42, - 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 80, 97, 116, 116, 101, 114, 110, 32, 61, 32, 115, 116, 114, 105, -110, 103, 46, 103, 115, 117, 98, 40, 116, 101, 115, 116, 78, 97, 109, 101, 44, 32, 34, 42, 34, 44, 32, 34, 46, 42, 34, 41, 10, 102, 111, 114, - 32, 95, 116, 101, 115, 116, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 115, 117, 105, 116, 101, 41, - 32, 100, 111, 10, 108, 101, 110, 103, 116, 104, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 108, 101, 110, 40, 95, 116, 101, 115, 116, 78, 97, 109, -101, 41, 10, 115, 116, 97, 114, 116, 44, 32, 102, 105, 110, 105, 115, 104, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, 110, 100, 40, 95, -116, 101, 115, 116, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 80, 97, 116, 116, 101, 114, 110, 41, 10, 105, 102, 32, 115, 116, 97, 114, 116, 32, - 61, 61, 32, 49, 32, 97, 110, 100, 32, 102, 105, 110, 105, 115, 104, 32, 61, 61, 32, 108, 101, 110, 103, 116, 104, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 101, 115, 116, 115, 44, 32, 123, 10, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 61, - 32, 95, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 10, 115, 117, 105, 116, 101, 32, 61, 32, 115, 117, 105, 116, 101, 44, 10, 116, 101, 115, 116, - 78, 97, 109, 101, 32, 61, 32, 95, 116, 101, 115, 116, 78, 97, 109, 101, 44, 10, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, - 32, 116, 101, 115, 116, 44, 10, 125, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, -101, 114, 116, 40, 116, 101, 115, 116, 115, 44, 32, 123, 10, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 61, 32, 95, 115, 117, 105, 116, 101, 78, - 97, 109, 101, 44, 10, 115, 117, 105, 116, 101, 32, 61, 32, 115, 117, 105, 116, 101, 44, 10, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 116, -101, 115, 116, 78, 97, 109, 101, 44, 10, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 115, 117, 105, 116, 101, 91, 116, 101, -115, 116, 78, 97, 109, 101, 93, 44, 10, 125, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 116, 101, 115, 116, 115, 44, 32, 123, 10, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 61, 32, 95, 115, 117, 105, 116, 101, 78, 97, 109, -101, 44, 10, 115, 117, 105, 116, 101, 32, 61, 32, 115, 117, 105, 116, 101, 44, 10, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 110, 105, 108, - 44, 10, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 110, 105, 108, 44, 10, 125, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 101, 115, 116, 115, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, -116, 101, 44, 32, 116, 101, 115, 116, 44, 32, 101, 114, 114, 32, 61, 32, 95, 46, 99, 104, 101, 99, 107, 84, 101, 115, 116, 73, 100, 101, 110, 116, -105, 102, 105, 101, 114, 40, 95, 46, 115, 117, 105, 116, 101, 115, 44, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 78, - 97, 109, 101, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 101, 114, 114, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 123, 10, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 61, 32, 115, 117, 105, 116, -101, 78, 97, 109, 101, 44, 10, 115, 117, 105, 116, 101, 32, 61, 32, 115, 117, 105, 116, 101, 44, 10, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, - 32, 116, 101, 115, 116, 78, 97, 109, 101, 44, 10, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 116, 101, 115, 116, 10, 125, - 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 97, 114, 115, 101, 84, 101, 115, 116, 73, -100, 101, 110, 116, 105, 102, 105, 101, 114, 40, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 41, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, 116, -101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 78, 97, 109, 101, 10, 105, 102, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 97, 114, 116, 115, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 101, 120, 112, 108, 111, 100, 101, 40, -105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 44, 32, 34, 46, 34, 44, 32, 116, 114, 117, 101, 41, 10, 115, 117, 105, 116, 101, 78, 97, 109, 101, - 32, 61, 32, 105, 105, 102, 40, 112, 97, 114, 116, 115, 91, 49, 93, 32, 126, 61, 32, 34, 34, 44, 32, 112, 97, 114, 116, 115, 91, 49, 93, 44, - 32, 110, 105, 108, 41, 10, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 105, 105, 102, 40, 112, 97, 114, 116, 115, 91, 50, 93, 32, 126, 61, - 32, 34, 34, 44, 32, 112, 97, 114, 116, 115, 91, 50, 93, 44, 32, 110, 105, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 115, -117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 78, 97, 109, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 95, 46, 99, 104, 101, 99, 107, 84, 101, 115, 116, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 40, 115, 117, 105, 116, 101, 115, 44, 32, 115, 117, -105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 78, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, 116, 101, 44, 32, -116, 101, 115, 116, 10, 105, 102, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 116, 104, 101, 110, 10, 115, 117, 105, 116, 101, 32, 61, 32, 115, -117, 105, 116, 101, 115, 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 115, 117, 105, 116, 101, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 44, 32, 110, 105, 108, 44, 32, 34, 78, 111, 32, 115, 117, 99, 104, 32, 116, 101, 115, -116, 32, 115, 117, 105, 116, 101, 32, 39, 34, 32, 46, 46, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 46, 46, 32, 34, 39, 34, 10, 101, -110, 100, 10, 105, 102, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 116, 104, 101, 110, 10, 116, 101, 115, 116, 32, 61, 32, 115, 117, 105, 116, 101, - 91, 116, 101, 115, 116, 78, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 95, 46, 105, 115, 86, 97, 108, 105, 100, 84, 101, 115, 116, 80, - 97, 105, 114, 40, 116, 101, 115, 116, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, -110, 105, 108, 44, 32, 110, 105, 108, 44, 32, 34, 78, 111, 32, 115, 117, 99, 104, 32, 116, 101, 115, 116, 32, 39, 34, 32, 46, 46, 32, 115, 117, -105, 116, 101, 78, 97, 109, 101, 32, 46, 46, 32, 34, 46, 34, 32, 46, 46, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 46, 46, 32, 34, 39, - 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 115, 117, 105, 116, 101, 44, 32, 116, 101, 115, 116, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 105, 115, 86, 97, 108, 105, 100, 84, 101, 115, 116, 80, 97, 105, 114, 40, -116, 101, 115, 116, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 70, 117, 110, 99, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 101, 115, 116, - 70, 117, 110, 99, 41, 32, 126, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, -102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 115, 101, 116, 117, 112, 34, - 32, 111, 114, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 61, 32, 34, 116, 101, 97, 114, 100, 111, 119, 110, 34, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, - 10, }; - -// self-test/test_helpers.lua -static const unsigned char builtin_script_61[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 115, 101, 108, 102, 95, 116, 101, 115, 116, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 114, 101, 97, 116, -101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 41, 10, 108, 111, 99, 97, 108, 32, 119, 107, 115, 32, 61, 32, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 40, 34, 77, 121, 87, 111, 114, 107, 115, 112, 97, 99, 101, 34, 41, 10, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, - 32, 123, 32, 34, 68, 101, 98, 117, 103, 34, 44, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 112, 114, -106, 32, 61, 32, 109, 46, 99, 114, 101, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, -119, 107, 115, 44, 32, 112, 114, 106, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 114, 101, 97, 116, 101, 115, 111, -108, 117, 116, 105, 111, 110, 40, 41, 10, 108, 111, 99, 97, 108, 32, 119, 107, 115, 32, 61, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 40, 34, - 77, 121, 83, 111, 108, 117, 116, 105, 111, 110, 34, 41, 10, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 32, 123, 32, 34, 68, -101, 98, 117, 103, 34, 44, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 109, - 46, 99, 114, 101, 97, 116, 101, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 119, 107, 115, 44, 32, -112, 114, 106, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 114, 101, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, - 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 35, 119, 107, 115, 46, 112, 114, 111, 106, 101, 99, 116, 115, 32, 43, 32, - 49, 10, 105, 102, 32, 110, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 32, 110, 32, 61, 32, 34, 34, 32, 101, 110, 100, 10, 108, 111, 99, 97, -108, 32, 112, 114, 106, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 32, 40, 34, 77, 121, 80, 114, 111, 106, 101, 99, 116, 34, 32, 46, 46, 32, -110, 41, 10, 108, 97, 110, 103, 117, 97, 103, 101, 32, 34, 67, 43, 43, 34, 10, 107, 105, 110, 100, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, -112, 112, 34, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 114, -101, 97, 116, 101, 71, 114, 111, 117, 112, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 103, 114, 111, 117, 112, - 32, 40, 34, 77, 121, 71, 114, 111, 117, 112, 34, 32, 46, 46, 32, 40, 35, 119, 107, 115, 46, 103, 114, 111, 117, 112, 115, 32, 43, 32, 49, 41, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 87, -111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 112, 46, 111, 118, 101, 110, 46, 98, 97, 107, 101, 40, 41, 10, 114, 101, 116, 117, -114, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 46, 110, 97, 109, -101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 82, 117, 108, 101, 40, 110, 97, 109, 101, 41, 10, -112, 46, 111, 118, 101, 110, 46, 98, 97, 107, 101, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 103, 101, -116, 82, 117, 108, 101, 40, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 80, 114, -111, 106, 101, 99, 116, 40, 119, 107, 115, 44, 32, 105, 41, 10, 119, 107, 115, 32, 61, 32, 109, 46, 103, 101, 116, 87, 111, 114, 107, 115, 112, 97, - 99, 101, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 101, 116, 112, 114, -111, 106, 101, 99, 116, 40, 119, 107, 115, 44, 32, 105, 32, 111, 114, 32, 49, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 103, 101, 116, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, -111, 114, 109, 41, 10, 108, 111, 99, 97, 108, 32, 119, 107, 115, 32, 61, 32, 109, 46, 103, 101, 116, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, -112, 114, 106, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 41, 10, 112, 114, 106, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, - 46, 103, 101, 116, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, -110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 98, 117, 105, 108, 100, - 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 101, 110, 100, 10, 109, 46, 112, 114, 105, 110, 116, 32, 61, 32, 112, 114, 105, -110, 116, 10, 112, 46, 97, 108, 105, 97, 115, 40, 109, 44, 32, 34, 99, 114, 101, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 34, 44, 32, 34, - 99, 114, 101, 97, 116, 101, 112, 114, 111, 106, 101, 99, 116, 34, 41, 10, 112, 46, 97, 108, 105, 97, 115, 40, 109, 44, 32, 34, 103, 101, 116, 67, -111, 110, 102, 105, 103, 34, 44, 32, 34, 103, 101, 116, 99, 111, 110, 102, 105, 103, 34, 41, 10, 112, 46, 97, 108, 105, 97, 115, 40, 109, 44, 32, - 34, 103, 101, 116, 80, 114, 111, 106, 101, 99, 116, 34, 44, 32, 34, 103, 101, 116, 112, 114, 111, 106, 101, 99, 116, 34, 41, 10, 112, 46, 97, 108, -105, 97, 115, 40, 109, 44, 32, 34, 103, 101, 116, 87, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 34, 103, 101, 116, 115, 111, 108, 117, 116, -105, 111, 110, 34, 41, 10, }; - -// self-test/test_runner.lua -static const unsigned char builtin_script_62[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 115, 101, 108, 102, 95, 116, 101, 115, 116, 10, 108, 111, 99, 97, 108, 32, 95, 32, 61, 32, 123, 125, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 110, 84, 101, 115, 116, 40, 116, 101, 115, 116, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 97, 105, -108, 101, 100, 32, 61, 32, 48, 10, 108, 111, 99, 97, 108, 32, 102, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 32, 61, 32, 123, 125, 10, 108, -111, 99, 97, 108, 32, 115, 117, 105, 116, 101, 115, 32, 61, 32, 109, 46, 103, 101, 116, 83, 117, 105, 116, 101, 115, 40, 41, 10, 108, 111, 99, 97, -108, 32, 115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 44, 32, 115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, 121, 115, 44, 32, 116, 111, -116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 32, 61, 32, 95, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 84, 101, 115, 116, 115, - 40, 115, 117, 105, 116, 101, 115, 44, 32, 116, 101, 115, 116, 115, 41, 10, 95, 46, 108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, - 71, 114, 101, 101, 110, 44, 32, 34, 91, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 93, 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, -114, 109, 97, 116, 40, 34, 32, 82, 117, 110, 110, 105, 110, 103, 32, 37, 100, 32, 116, 101, 115, 116, 115, 32, 102, 114, 111, 109, 32, 37, 100, 32, -116, 101, 115, 116, 32, 115, 117, 105, 116, 101, 115, 46, 34, 44, 32, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 44, 32, 35, -115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 41, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 32, 61, 32, 111, -115, 46, 99, 108, 111, 99, 107, 40, 41, 10, 102, 111, 114, 32, 105, 110, 100, 101, 120, 44, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 41, 32, 100, 111, 10, 32, 32, 115, 117, 105, 116, 101, 32, - 61, 32, 115, 117, 105, 116, 101, 115, 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 109, 46, 105, 115, 83, -117, 112, 112, 114, 101, 115, 115, 101, 100, 40, 115, 117, 105, 116, 101, 78, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -116, 101, 115, 116, 32, 61, 32, 123, 10, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 61, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 10, -115, 117, 105, 116, 101, 32, 61, 32, 115, 117, 105, 116, 101, 10, 125, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, 116, 101, 70, 97, 105, 108, 101, -100, 44, 32, 115, 117, 105, 116, 101, 70, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 32, 61, 32, 95, 46, 114, 117, 110, 84, 101, 115, 116, 83, -117, 105, 116, 101, 40, 116, 101, 115, 116, 44, 32, 115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, 121, 115, 91, 115, 117, 105, 116, 101, 78, - 97, 109, 101, 93, 41, 10, 102, 97, 105, 108, 101, 100, 32, 61, 32, 102, 97, 105, 108, 101, 100, 32, 43, 32, 115, 117, 105, 116, 101, 70, 97, 105, -108, 101, 100, 10, 102, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 102, 97, 105, -108, 101, 100, 84, 101, 115, 116, 115, 44, 32, 115, 117, 105, 116, 101, 70, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 95, 46, 108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 101, 101, 110, 44, 32, 34, 91, 61, 61, 61, - 61, 61, 61, 61, 61, 61, 61, 93, 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 32, 37, 100, 32, 116, 101, -115, 116, 115, 32, 102, 114, 111, 109, 32, 37, 100, 32, 116, 101, 115, 116, 32, 115, 117, 105, 116, 101, 115, 32, 114, 97, 110, 46, 32, 40, 37, 46, - 48, 102, 32, 109, 115, 32, 116, 111, 116, 97, 108, 41, 34, 44, 32, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 44, 32, 35, -115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 44, 32, 40, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 32, 45, 32, 115, 116, 97, 114, 116, 84, -105, 109, 101, 41, 32, 42, 32, 49, 48, 48, 48, 41, 41, 10, 95, 46, 108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, -101, 101, 110, 44, 32, 34, 91, 32, 32, 80, 65, 83, 83, 69, 68, 32, 32, 93, 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, - 97, 116, 40, 34, 32, 37, 100, 32, 116, 101, 115, 116, 115, 46, 34, 44, 32, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 32, - 45, 32, 102, 97, 105, 108, 101, 100, 41, 41, 10, 105, 102, 32, 102, 97, 105, 108, 101, 100, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 46, -108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 82, 101, 100, 44, 32, 34, 91, 32, 32, 70, 65, 73, 76, 69, 68, 32, 32, 93, - 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 32, 37, 100, 32, 116, 101, 115, 116, 115, 44, 32, 108, 105, 115, -116, 101, 100, 32, 98, 101, 108, 111, 119, 58, 34, 44, 32, 102, 97, 105, 108, 101, 100, 41, 41, 10, 102, 111, 114, 32, 105, 110, 100, 101, 120, 44, - 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 41, - 32, 100, 111, 10, 95, 46, 108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 82, 101, 100, 44, 32, 34, 91, 32, 32, 70, 65, 73, - 76, 69, 68, 32, 32, 93, 34, 44, 32, 34, 32, 34, 32, 46, 46, 32, 116, 101, 115, 116, 78, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 40, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 32, 45, 32, 102, 97, 105, 108, 101, -100, 41, 44, 32, 102, 97, 105, 108, 101, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 114, 117, 110, 84, 101, 115, -116, 83, 117, 105, 116, 101, 40, 116, 101, 115, 116, 44, 32, 107, 101, 121, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 97, 105, 108, 101, 100, 32, - 61, 32, 48, 10, 108, 111, 99, 97, 108, 32, 102, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 32, 61, 32, 123, 125, 10, 95, 46, 108, 111, 103, - 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 101, 101, 110, 44, 32, 34, 91, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 93, 34, - 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 32, 37, 100, 32, 116, 101, 115, 116, 115, 32, 102, 114, 111, 109, 32, - 37, 115, 34, 44, 32, 35, 107, 101, 121, 115, 44, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 41, 41, 10, 108, 111, 99, - 97, 108, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 32, 61, 32, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 10, 105, 102, 32, 116, 101, 115, -116, 46, 115, 117, 105, 116, 101, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 105, 110, 100, 101, 120, 44, 32, 116, -101, 115, 116, 78, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 107, 101, 121, 115, 41, 32, 100, 111, 10, 116, 101, 115, 116, 70, -117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 91, 116, 101, 115, 116, 78, 97, 109, 101, 93, 10, 116, -101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 116, 101, 115, 116, 78, 97, 109, 101, 10, 116, 101, 115, 116, 46, 116, 101, 115, -116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 10, 105, 102, 32, 109, 46, 105, 115, - 86, 97, 108, 105, 100, 40, 116, 101, 115, 116, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 109, 46, 105, 115, 83, 117, 112, 112, 114, 101, 115, 115, -101, 100, 40, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 46, 46, 32, 34, 46, 34, 32, 46, 46, 32, 116, 101, 115, 116, - 46, 116, 101, 115, 116, 78, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 114, 114, 32, 61, 32, 95, 46, 114, 117, -110, 84, 101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 102, 97, 105, 108, 101, 100, 32, 61, - 32, 102, 97, 105, 108, 101, 100, 32, 43, 32, 49, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 97, 105, 108, 101, 100, 84, -101, 115, 116, 115, 44, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 46, 46, 32, 34, 46, 34, 32, 46, 46, 32, 116, -101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 32, 46, 46, 32, 34, 92, 110, 34, 32, 46, 46, 32, 101, 114, 114, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 46, 108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 101, -101, 110, 44, 32, 34, 91, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 93, 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, -116, 40, 34, 32, 37, 100, 32, 116, 101, 115, 116, 115, 32, 102, 114, 111, 109, 32, 37, 115, 32, 40, 37, 46, 48, 102, 32, 109, 115, 32, 116, 111, -116, 97, 108, 41, 92, 110, 34, 44, 32, 35, 107, 101, 121, 115, 44, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, - 40, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 32, 45, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 41, 32, 42, 32, 49, 48, 48, 48, 41, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 105, 108, 101, 100, 44, 32, 102, 97, 105, 108, 101, 100, 84, 101, 115, 116, 115, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 114, 117, 110, 84, 101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 95, 46, 108, 111, 103, 40, -116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 101, 101, 110, 44, 32, 34, 91, 32, 82, 85, 78, 32, 32, 32, 32, 32, 32, 93, 34, 44, - 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 32, 37, 115, 46, 37, 115, 34, 44, 32, 116, 101, 115, 116, 46, 115, 117, -105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 41, 41, 10, 108, 111, 99, 97, 108, 32, 115, -116, 97, 114, 116, 84, 105, 109, 101, 32, 61, 32, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 10, 108, 111, 99, 97, 108, 32, 99, 119, 100, 32, - 61, 32, 111, 115, 46, 103, 101, 116, 99, 119, 100, 40, 41, 10, 108, 111, 99, 97, 108, 32, 104, 111, 111, 107, 115, 32, 61, 32, 95, 46, 105, 110, -115, 116, 97, 108, 108, 84, 101, 115, 116, 105, 110, 103, 72, 111, 111, 107, 115, 40, 41, 10, 95, 84, 69, 83, 84, 83, 95, 68, 73, 82, 32, 61, - 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 46, 95, 84, 69, 83, 84, 83, 95, 68, 73, 82, 10, 95, 83, 67, 82, 73, 80, 84, 95, 68, - 73, 82, 32, 61, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 46, 95, 83, 67, 82, 73, 80, 84, 95, 68, 73, 82, 10, 109, 46, 115, 117, -105, 116, 101, 78, 97, 109, 101, 32, 61, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 10, 109, 46, 116, 101, 115, 116, 78, - 97, 109, 101, 32, 61, 32, 116, 101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 10, 108, 111, 99, 97, 108, 32, 111, 107, 44, 32, 101, 114, -114, 32, 61, 32, 95, 46, 115, 101, 116, 117, 112, 84, 101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 105, 102, 32, 111, 107, 32, 116, 104, 101, 110, - 10, 111, 107, 44, 32, 101, 114, 114, 32, 61, 32, 95, 46, 101, 120, 101, 99, 117, 116, 101, 84, 101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 101, -110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 111, 107, 44, 32, 116, 101, 114, 114, 32, 61, 32, 95, 46, 116, 101, 97, 114, 100, 111, 119, 110, 84, -101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 111, 107, 32, 61, 32, 111, 107, 32, 97, 110, 100, 32, 116, 111, 107, 10, 101, 114, 114, 32, 61, 32, -101, 114, 114, 32, 111, 114, 32, 116, 101, 114, 114, 10, 95, 46, 114, 101, 109, 111, 118, 101, 84, 101, 115, 116, 105, 110, 103, 72, 111, 111, 107, 115, - 40, 104, 111, 111, 107, 115, 41, 10, 111, 115, 46, 99, 104, 100, 105, 114, 40, 99, 119, 100, 41, 10, 105, 102, 32, 111, 107, 32, 116, 104, 101, 110, - 10, 95, 46, 108, 111, 103, 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 71, 114, 101, 101, 110, 44, 32, 34, 91, 32, 32, 32, 32, 32, 32, - 32, 79, 75, 32, 93, 34, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 32, 37, 115, 46, 37, 115, 32, 40, 37, - 46, 48, 102, 32, 109, 115, 41, 34, 44, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 46, 116, -101, 115, 116, 78, 97, 109, 101, 44, 32, 40, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 32, 45, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, - 41, 32, 42, 32, 49, 48, 48, 48, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 108, 115, 101, 10, 95, 46, 108, 111, 103, - 40, 116, 101, 114, 109, 46, 108, 105, 103, 104, 116, 82, 101, 100, 44, 32, 34, 91, 32, 32, 70, 65, 73, 76, 69, 68, 32, 32, 93, 34, 44, 32, -115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 32, 37, 115, 46, 37, 115, 32, 40, 37, 46, 48, 102, 32, 109, 115, 41, 34, - 44, 32, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 116, 101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 44, - 32, 40, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 32, 45, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 41, 32, 42, 32, 49, 48, 48, 48, - 41, 41, 10, 109, 46, 112, 114, 105, 110, 116, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 115, 34, 44, 32, 101, -114, 114, 41, 41, 10, 114, 101, 116, 117, 114, 110, 32, 101, 114, 114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 95, 46, 108, 111, 103, 40, 99, 111, 108, 111, 114, 44, 32, 108, 101, 102, 116, 44, 32, 114, 105, 103, 104, 116, 41, 10, 116, 101, 114, 109, 46, -112, 117, 115, 104, 67, 111, 108, 111, 114, 40, 99, 111, 108, 111, 114, 41, 10, 105, 111, 46, 119, 114, 105, 116, 101, 40, 108, 101, 102, 116, 41, 10, -116, 101, 114, 109, 46, 112, 111, 112, 67, 111, 108, 111, 114, 40, 41, 10, 109, 46, 112, 114, 105, 110, 116, 40, 114, 105, 103, 104, 116, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 84, 101, 115, 116, 115, 40, 115, 117, -105, 116, 101, 115, 44, 32, 102, 105, 108, 116, 101, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 32, - 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, 121, 115, 32, 61, 32, 123, 125, 10, 108, -111, 99, 97, 108, 32, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 32, 61, 32, 48, 10, 102, 111, 114, 32, 105, 44, 32, 102, -105, 108, 116, 101, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 116, 101, 114, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, -115, 117, 105, 116, 101, 78, 97, 109, 101, 44, 32, 115, 117, 105, 116, 101, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 115, 117, 105, 116, 101, 115, - 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 109, 46, 105, 115, 83, 117, 112, 112, 114, 101, 115, 115, 101, 100, 40, 115, 117, 105, 116, 101, - 78, 97, 109, 101, 41, 32, 97, 110, 100, 32, 115, 117, 105, 116, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 40, 110, 111, 116, 32, -102, 105, 108, 116, 101, 114, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 111, 114, 32, 102, 105, 108, 116, 101, 114, 46, 115, 117, 105, 116, 101, - 78, 97, 109, 101, 32, 61, 61, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 101, -115, 116, 32, 61, 32, 123, 125, 10, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 61, 32, 115, 117, 105, 116, 101, 78, 97, -109, 101, 10, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 32, 61, 32, 115, 117, 105, 116, 101, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 44, 32, 115, 117, 105, 116, 101, 78, 97, 109, -101, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 115, 111, 114, 116, 101, 100, 40, 115, 117, 105, 116, 101, -115, 75, 101, 121, 115, 44, 32, 115, 117, 105, 116, 101, 78, 97, 109, 101, 41, 10, 115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, 121, 115, - 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 32, 61, 32, 123, 125, 10, 101, 110, 100, 10, 102, 111, 114, 32, 116, 101, 115, 116, 78, 97, 109, -101, 44, 32, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 115, 117, 105, 116, 101, 41, 32, -100, 111, 10, 116, 101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 116, 101, 115, 116, 78, 97, 109, 101, 10, 116, 101, 115, 116, - 46, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 32, 61, 32, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 10, 105, 102, 32, -109, 46, 105, 115, 86, 97, 108, 105, 100, 40, 116, 101, 115, 116, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 109, 46, 105, 115, 83, 117, 112, 112, -114, 101, 115, 115, 101, 100, 40, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 78, 97, 109, 101, 32, 46, 46, 32, 34, 46, 34, 32, 46, 46, 32, -116, 101, 115, 116, 46, 116, 101, 115, 116, 78, 97, 109, 101, 41, 32, 97, 110, 100, 32, 40, 110, 111, 116, 32, 102, 105, 108, 116, 101, 114, 46, 116, -101, 115, 116, 78, 97, 109, 101, 32, 111, 114, 32, 102, 105, 108, 116, 101, 114, 46, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 61, 32, 116, 101, -115, 116, 78, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, -110, 115, 40, 115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, 121, 115, 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 44, 32, 116, 101, -115, 116, 78, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 115, 111, 114, 116, 101, 100, 40, -115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, 121, 115, 91, 115, 117, 105, 116, 101, 78, 97, 109, 101, 93, 44, 32, 116, 101, 115, 116, 78, - 97, 109, 101, 41, 10, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 32, 61, 32, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, -111, 117, 110, 116, 32, 43, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 114, 101, 116, 117, 114, 110, 32, 115, 117, 105, 116, 101, 115, 75, 101, 121, 115, 44, 32, 115, 117, 105, 116, 101, 84, 101, 115, 116, 115, 75, 101, -121, 115, 44, 32, 116, 111, 116, 97, 108, 84, 101, 115, 116, 67, 111, 117, 110, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 95, 46, 105, 110, 115, 116, 97, 108, 108, 84, 101, 115, 116, 105, 110, 103, 72, 111, 111, 107, 115, 40, 41, 10, 108, 111, 99, 97, 108, 32, 104, 111, -111, 107, 115, 32, 61, 32, 123, 125, 10, 104, 111, 111, 107, 115, 46, 97, 99, 116, 105, 111, 110, 32, 61, 32, 95, 65, 67, 84, 73, 79, 78, 10, -104, 111, 111, 107, 115, 46, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 95, 79, 80, 84, 73, 79, 78, 83, 10, 104, 111, 111, 107, 115, 46, 116, - 97, 114, 103, 101, 116, 79, 115, 32, 61, 32, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 10, 104, 111, 111, 107, 115, 46, 105, 111, 95, 111, 112, -101, 110, 32, 61, 32, 105, 111, 46, 111, 112, 101, 110, 10, 104, 111, 111, 107, 115, 46, 105, 111, 95, 111, 117, 116, 112, 117, 116, 32, 61, 32, 105, -111, 46, 111, 117, 116, 112, 117, 116, 10, 104, 111, 111, 107, 115, 46, 111, 115, 95, 119, 114, 105, 116, 101, 102, 105, 108, 101, 95, 105, 102, 110, 111, -116, 101, 113, 117, 97, 108, 32, 61, 32, 111, 115, 46, 119, 114, 105, 116, 101, 102, 105, 108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, - 10, 104, 111, 111, 107, 115, 46, 112, 95, 117, 116, 102, 56, 32, 61, 32, 112, 46, 117, 116, 102, 56, 10, 104, 111, 111, 107, 115, 46, 112, 114, 105, -110, 116, 32, 61, 32, 112, 114, 105, 110, 116, 10, 104, 111, 111, 107, 115, 46, 115, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 32, 61, 32, -116, 101, 114, 109, 46, 115, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 10, 108, 111, 99, 97, 108, 32, 109, 116, 32, 61, 32, 103, 101, 116, -109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 105, 111, 46, 115, 116, 100, 101, 114, 114, 41, 10, 95, 46, 98, 117, 105, 108, 116, 105, 110, 95, 119, -114, 105, 116, 101, 32, 61, 32, 109, 116, 46, 119, 114, 105, 116, 101, 10, 109, 116, 46, 119, 114, 105, 116, 101, 32, 61, 32, 95, 46, 115, 116, 117, - 98, 95, 115, 116, 100, 101, 114, 114, 95, 119, 114, 105, 116, 101, 10, 95, 79, 80, 84, 73, 79, 78, 83, 32, 61, 32, 116, 97, 98, 108, 101, 46, -115, 104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 95, 79, 80, 84, 73, 79, 78, 83, 41, 32, 111, 114, 32, 123, 125, 10, 115, 101, 116, 109, -101, 116, 97, 116, 97, 98, 108, 101, 40, 95, 79, 80, 84, 73, 79, 78, 83, 44, 32, 103, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, -104, 111, 111, 107, 115, 46, 111, 112, 116, 105, 111, 110, 115, 41, 41, 10, 105, 111, 46, 111, 112, 101, 110, 32, 61, 32, 95, 46, 115, 116, 117, 98, - 95, 105, 111, 95, 111, 112, 101, 110, 10, 105, 111, 46, 111, 117, 116, 112, 117, 116, 32, 61, 32, 95, 46, 115, 116, 117, 98, 95, 105, 111, 95, 111, -117, 116, 112, 117, 116, 10, 111, 115, 46, 119, 114, 105, 116, 101, 102, 105, 108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, 32, 61, 32, - 95, 46, 115, 116, 117, 98, 95, 111, 115, 95, 119, 114, 105, 116, 101, 102, 105, 108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, 10, 112, -114, 105, 110, 116, 32, 61, 32, 95, 46, 115, 116, 117, 98, 95, 112, 114, 105, 110, 116, 10, 112, 46, 117, 116, 102, 56, 32, 61, 32, 95, 46, 115, -116, 117, 98, 95, 117, 116, 102, 56, 10, 116, 101, 114, 109, 46, 115, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 32, 61, 32, 95, 46, 115, -116, 117, 98, 95, 115, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 10, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 32, - 61, 32, 110, 105, 108, 10, 112, 46, 99, 108, 101, 97, 114, 87, 97, 114, 110, 105, 110, 103, 115, 40, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, -110, 34, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 110, 105, 108, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 92, 116, 34, - 41, 10, 112, 46, 97, 112, 105, 46, 114, 101, 115, 101, 116, 40, 41, 10, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, - 32, 61, 32, 110, 105, 108, 10, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 110, 97, 109, 101, 32, 61, 32, -110, 105, 108, 10, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 109, 111, 100, 101, 32, 61, 32, 110, 105, 108, - 10, 109, 46, 118, 97, 108, 117, 101, 95, 99, 108, 111, 115, 101, 100, 102, 105, 108, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 114, 101, 116, 117, -114, 110, 32, 104, 111, 111, 107, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 114, 101, 109, 111, 118, 101, 84, 101, -115, 116, 105, 110, 103, 72, 111, 111, 107, 115, 40, 104, 111, 111, 107, 115, 41, 10, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, 101, 116, 40, 104, -111, 111, 107, 115, 46, 97, 99, 116, 105, 111, 110, 41, 10, 95, 79, 80, 84, 73, 79, 78, 83, 32, 61, 32, 104, 111, 111, 107, 115, 46, 111, 112, -116, 105, 111, 110, 115, 10, 95, 84, 65, 82, 71, 69, 84, 95, 79, 83, 32, 61, 32, 104, 111, 111, 107, 115, 46, 116, 97, 114, 103, 101, 116, 79, -115, 10, 105, 111, 46, 111, 112, 101, 110, 32, 61, 32, 104, 111, 111, 107, 115, 46, 105, 111, 95, 111, 112, 101, 110, 10, 105, 111, 46, 111, 117, 116, -112, 117, 116, 32, 61, 32, 104, 111, 111, 107, 115, 46, 105, 111, 95, 111, 117, 116, 112, 117, 116, 10, 111, 115, 46, 119, 114, 105, 116, 101, 102, 105, -108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, 32, 61, 32, 104, 111, 111, 107, 115, 46, 111, 115, 95, 119, 114, 105, 116, 101, 102, 105, -108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, 10, 112, 46, 117, 116, 102, 56, 32, 61, 32, 104, 111, 111, 107, 115, 46, 112, 95, 117, -116, 102, 56, 10, 112, 114, 105, 110, 116, 32, 61, 32, 104, 111, 111, 107, 115, 46, 112, 114, 105, 110, 116, 10, 116, 101, 114, 109, 46, 115, 101, 116, - 84, 101, 120, 116, 67, 111, 108, 111, 114, 32, 61, 32, 104, 111, 111, 107, 115, 46, 115, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 10, 108, -111, 99, 97, 108, 32, 109, 116, 32, 61, 32, 103, 101, 116, 109, 101, 116, 97, 116, 97, 98, 108, 101, 40, 105, 111, 46, 115, 116, 100, 101, 114, 114, - 41, 10, 109, 116, 46, 119, 114, 105, 116, 101, 32, 61, 32, 95, 46, 98, 117, 105, 108, 116, 105, 110, 95, 119, 114, 105, 116, 101, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 115, 101, 116, 117, 112, 84, 101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 105, 102, 32, 116, -121, 112, 101, 40, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 46, 115, 101, 116, 117, 112, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, -111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 120, 112, 99, 97, 108, 108, 40, 116, 101, 115, 116, 46, 115, 117, 105, 116, -101, 46, 115, 101, 116, 117, 112, 44, 32, 95, 46, 101, 114, 114, 111, 114, 72, 97, 110, 100, 108, 101, 114, 41, 10, 101, 108, 115, 101, 10, 114, 101, -116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 101, 120, 101, - 99, 117, 116, 101, 84, 101, 115, 116, 40, 116, 101, 115, 116, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 44, 32, 101, 114, 114, - 10, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 114, 101, 115, 117, 108, 116, 44, 32, 101, 114, -114, 32, 61, 32, 120, 112, 99, 97, 108, 108, 40, 116, 101, 115, 116, 46, 116, 101, 115, 116, 70, 117, 110, 99, 116, 105, 111, 110, 44, 32, 95, 46, -101, 114, 114, 111, 114, 72, 97, 110, 100, 108, 101, 114, 41, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, - 44, 32, 101, 114, 114, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 116, 101, 97, 114, 100, 111, 119, 110, 84, 101, 115, -116, 40, 116, 101, 115, 116, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 46, 116, 101, 97, 114, 100, -111, 119, 110, 41, 32, 61, 61, 32, 34, 102, 117, 110, 99, 116, 105, 111, 110, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 120, -112, 99, 97, 108, 108, 40, 116, 101, 115, 116, 46, 115, 117, 105, 116, 101, 46, 116, 101, 97, 114, 100, 111, 119, 110, 44, 32, 95, 46, 101, 114, 114, -111, 114, 72, 97, 110, 100, 108, 101, 114, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 101, 114, 114, 111, 114, 72, 97, 110, 100, 108, 101, 114, 40, 101, 114, 114, 41, - 10, 108, 111, 99, 97, 108, 32, 109, 115, 103, 32, 61, 32, 101, 114, 114, 10, 105, 102, 32, 110, 111, 116, 32, 109, 115, 103, 58, 102, 105, 110, 100, - 40, 34, 115, 116, 97, 99, 107, 32, 116, 114, 97, 99, 101, 98, 97, 99, 107, 58, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, -101, 110, 10, 109, 115, 103, 32, 61, 32, 100, 101, 98, 117, 103, 46, 116, 114, 97, 99, 101, 98, 97, 99, 107, 40, 101, 114, 114, 44, 32, 50, 41, - 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 109, 115, 103, 58, 102, 105, 110, 100, 40, 34, 91, 67, 93, 58, 32, 105, 110, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 39, 120, 112, 99, 97, 108, 108, 39, 34, 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, - 32, 105, 32, 116, 104, 101, 110, 10, 109, 115, 103, 32, 61, 32, 109, 115, 103, 58, 115, 117, 98, 40, 49, 44, 32, 105, 32, 45, 32, 51, 41, 10, -101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 110, 32, 61, 32, 115, 101, 108, 101, 99, 116, 40, 50, 44, 32, 109, 115, 103, 58, 103, 115, 117, 98, - 40, 39, 92, 110, 39, 44, 32, 39, 92, 110, 39, 41, 41, 10, 105, 102, 32, 110, 32, 61, 61, 32, 50, 32, 116, 104, 101, 110, 10, 109, 115, 103, - 32, 61, 32, 109, 115, 103, 58, 115, 117, 98, 40, 49, 44, 32, 109, 115, 103, 58, 102, 105, 110, 100, 40, 39, 92, 110, 39, 44, 32, 49, 44, 32, -116, 114, 117, 101, 41, 32, 45, 32, 49, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 109, 115, 103, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 95, 46, 115, 116, 117, 98, 95, 105, 111, 95, 111, 112, 101, 110, 40, 102, 110, 97, 109, 101, 44, 32, 109, 111, 100, -101, 41, 10, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, 109, -101, 10, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, 108, 101, 109, 111, 100, 101, 32, 61, 32, 109, 111, 100, 101, 10, -114, 101, 116, 117, 114, 110, 32, 123, 10, 114, 101, 97, 100, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 101, 110, 100, 44, 10, - 99, 108, 111, 115, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 109, 46, 118, 97, 108, 117, 101, 95, 99, 108, 111, 115, 101, -100, 102, 105, 108, 101, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 95, 46, 115, 116, 117, 98, 95, 105, 111, 95, 111, 117, 116, 112, 117, 116, 40, 102, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 95, 46, 115, 116, 117, 98, 95, 111, 115, 95, 119, 114, 105, 116, 101, 102, 105, 108, 101, 95, 105, 102, 110, 111, 116, 101, 113, 117, 97, 108, 40, - 99, 111, 110, 116, 101, 110, 116, 44, 32, 102, 110, 97, 109, 101, 41, 10, 109, 46, 118, 97, 108, 117, 101, 95, 111, 112, 101, 110, 101, 100, 102, 105, -108, 101, 110, 97, 109, 101, 32, 61, 32, 102, 110, 97, 109, 101, 10, 109, 46, 118, 97, 108, 117, 101, 95, 99, 108, 111, 115, 101, 100, 102, 105, 108, -101, 32, 61, 32, 116, 114, 117, 101, 10, 114, 101, 116, 117, 114, 110, 32, 48, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, - 46, 115, 116, 117, 98, 95, 112, 114, 105, 110, 116, 40, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 115, 116, -117, 98, 95, 115, 116, 100, 101, 114, 114, 95, 119, 114, 105, 116, 101, 40, 46, 46, 46, 41, 10, 105, 102, 32, 115, 101, 108, 101, 99, 116, 40, 49, - 44, 32, 46, 46, 46, 41, 32, 61, 61, 32, 105, 111, 46, 115, 116, 100, 101, 114, 114, 32, 116, 104, 101, 110, 10, 109, 46, 115, 116, 100, 101, 114, -114, 95, 99, 97, 112, 116, 117, 114, 101, 32, 61, 32, 40, 109, 46, 115, 116, 100, 101, 114, 114, 95, 99, 97, 112, 116, 117, 114, 101, 32, 111, 114, - 32, 34, 34, 41, 32, 46, 46, 32, 115, 101, 108, 101, 99, 116, 40, 50, 44, 32, 46, 46, 46, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, -114, 110, 32, 95, 46, 98, 117, 105, 108, 116, 105, 110, 95, 119, 114, 105, 116, 101, 40, 46, 46, 46, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 46, 115, 116, 117, 98, 95, 117, 116, 102, 56, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 95, 46, 115, 116, 117, 98, 95, 115, 101, 116, 84, 101, 120, 116, 67, 111, 108, 111, 114, 40, 41, 10, 101, 110, 100, 10, }; - -// codelite/_preload.lua -static const unsigned char builtin_script_63[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 10, 123, 10, 116, 114, -105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 99, 111, 100, 101, 108, 105, 116, 101, 34, 44, 10, 115, 104, 111, 114, -116, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 67, 111, 100, 101, 76, 105, 116, 101, 34, 44, 10, 100, 101, 115, 99, 114, 105, -112, 116, 105, 111, 110, 32, 32, 32, 32, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 67, 111, 100, 101, 76, 105, 116, 101, 32, 112, -114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, - 32, 34, 99, 108, 97, 110, 103, 34, 44, 10, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, -111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 77, 97, 107, 101, -102, 105, 108, 101, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, - 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, -123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, - 61, 32, 123, 10, 99, 99, 32, 61, 32, 123, 32, 34, 103, 99, 99, 34, 44, 32, 34, 99, 108, 97, 110, 103, 34, 44, 32, 34, 109, 115, 99, 34, - 32, 125, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, - 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 87, 111, 114, -107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 46, 103, 101, -110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, -111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 109, 111, 100, 117, 108, -101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, -101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, -114, 106, 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, -101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, -108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, - 99, 111, 100, 101, 108, 105, 116, 101, 34, 41, 10, 101, 110, 100, 10, }; - -// codelite/codelite.lua -static const unsigned char builtin_script_64[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, -108, 105, 116, 101, 32, 61, 32, 123, 125, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 46, 95, 86, 69, - 82, 83, 73, 79, 78, 32, 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, 10, 108, 111, 99, 97, 108, 32, 99, 111, 100, 101, 108, 105, 116, -101, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, -106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, -116, 101, 46, 99, 102, 103, 110, 97, 109, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 110, 97, 109, 101, 32, 61, 32, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 10, 105, 102, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 46, 109, 117, 108, 116, 105, 112, 108, 101, 80, 108, 97, 116, 102, 111, 114, 109, 115, 32, 116, 104, 101, 110, 10, 99, 102, 103, 110, 97, 109, -101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 115, 45, 37, 115, 34, 44, 32, 99, 102, 103, 46, 112, -108, 97, 116, 102, 111, 114, 109, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 99, 102, 103, 110, 97, 109, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, -101, 115, 99, 69, 108, 101, 109, 101, 110, 116, 84, 101, 120, 116, 40, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, -108, 116, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 38, 39, 44, 32, 39, 38, 97, 109, 112, 59, 39, 41, 10, 114, 101, -115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 39, 60, 39, 44, 32, 39, 38, 108, 116, 59, 39, 41, 10, -114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 39, 62, 39, 44, 32, 39, 38, 103, 116, 59, 39, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, -101, 108, 105, 116, 101, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, -118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 38, 39, 44, 32, 39, 38, 97, 109, 112, 59, 39, 41, 10, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 39, 60, 39, 44, 32, 39, 38, 108, 116, 59, 39, 41, 10, 114, 101, 115, 117, 108, -116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 39, 62, 39, 44, 32, 39, 38, 103, 116, 59, 39, 41, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 39, 34, 39, 44, 32, 39, 92, 92, 38, 113, 117, 111, 116, 59, - 39, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, -100, 101, 108, 105, 116, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 112, 46, -101, 111, 108, 40, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 32, 32, 34, 41, 10, 112, 46, 101, 115, 99, - 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 119, 107, -115, 44, 32, 34, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 119, 111, 114, 107, 115, 112, - 97, 99, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, -105, 116, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, 40, 34, - 92, 114, 92, 110, 34, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 32, 32, 34, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, - 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 41, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, - 41, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, -101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 112, 114, 111, 106, 101, 99, 116, 34, 44, 32, 99, 111, 100, 101, 108, 105, 116, -101, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, - 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 119, 107, 115, 44, 32, 119, 107, 115, 46, 110, 97, 109, 101, 32, 46, 46, 32, - 34, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 119, 107, 115, 44, 32, -119, 107, 115, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 95, 119, 115, 112, 46, 109, 107, 34, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, -105, 108, 101, 40, 119, 107, 115, 44, 32, 119, 107, 115, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 116, 97, 103, 115, 34, 41, 10, 112, 46, - 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 119, 107, 115, 44, 32, 34, 46, 99, 108, 97, 110, 103, 34, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, - 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 32, 46, 46, 32, - 34, 46, 112, 114, 111, 106, 101, 99, 116, 34, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 114, -106, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 109, 107, 34, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 112, 114, -106, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 108, 105, 115, 116, 34, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, -102, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 111, 117, 116, 34, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 40, -112, 114, 106, 41, 10, 101, 110, 100, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 99, 111, 100, 101, 108, 105, 116, 101, 95, 119, 111, 114, 107, 115, -112, 97, 99, 101, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 99, 111, 100, 101, 108, 105, 116, 101, 95, 112, 114, 111, -106, 101, 99, 116, 46, 108, 117, 97, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 10, }; - -// codelite/codelite_workspace.lua -static const unsigned char builtin_script_65[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 112, 46, -119, 111, 114, 107, 115, 112, 97, 99, 101, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, 108, 111, - 99, 97, 108, 32, 99, 111, 100, 101, 108, 105, 116, 101, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, -101, 10, 99, 111, 100, 101, 108, 105, 116, 101, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, -109, 32, 61, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 119, 107, 115, 41, 10, 112, 46, 117, 116, 102, 56, 40, 41, 10, 112, 46, 119, 40, 39, 60, 63, -120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, - 56, 34, 63, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 103, 115, 100, 98, 32, 61, 32, 34, 34, 10, 112, 46, 112, 117, 115, 104, 40, - 39, 60, 67, 111, 100, 101, 76, 105, 116, 101, 95, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 32, 68, - 97, 116, 97, 98, 97, 115, 101, 61, 34, 37, 115, 34, 32, 83, 87, 84, 76, 87, 61, 34, 78, 111, 34, 62, 39, 44, 32, 119, 107, 115, 46, 110, - 97, 109, 101, 44, 32, 116, 97, 103, 115, 100, 98, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 119, 111, 114, 107, 115, 112, 97, 99, -101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, -114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, -112, 114, 106, 32, 61, 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 112, 97, 116, 104, 32, 61, 32, -112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 34, 46, 112, 114, 111, 106, 101, 99, 116, 34, 41, 10, 112, 114, 106, 112, - 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 112, 114, 106, 112, 97, 116, 104, 41, 10, 105, 102, 32, 40, 112, 114, 106, 46, -110, 97, 109, 101, 32, 61, 61, 32, 119, 107, 115, 46, 115, 116, 97, 114, 116, 112, 114, 111, 106, 101, 99, 116, 41, 32, 116, 104, 101, 110, 10, 112, - 46, 119, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 32, 80, 97, 116, 104, 61, 34, 37, 115, 34, - 32, 65, 99, 116, 105, 118, 101, 61, 34, 89, 101, 115, 34, 47, 62, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 44, 32, 112, 114, 106, 112, - 97, 116, 104, 41, 10, 101, 108, 115, 101, 10, 112, 46, 119, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 78, 97, 109, 101, 61, 34, 37, 115, - 34, 32, 80, 97, 116, 104, 61, 34, 37, 115, 34, 47, 62, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 44, 32, 112, 114, 106, 112, 97, 116, -104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, 97, 110, 99, 104, 101, 110, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 110, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 86, 105, 114, 116, 117, 97, 108, 68, 105, 114, 101, 99, 116, 111, 114, -121, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 110, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, - 97, 110, 99, 104, 101, 120, 105, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, - 86, 105, 114, 116, 117, 97, 108, 68, 105, 114, 101, 99, 116, 111, 114, 121, 62, 39, 41, 10, 101, 110, 100, 44, 10, 125, 41, 10, 108, 111, 99, 97, -108, 32, 112, 108, 97, 116, 102, 111, 114, 109, 115, 80, 114, 101, 115, 101, 110, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 110, 117, -109, 80, 108, 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 48, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 119, 111, 114, 107, 115, 112, - 97, 99, 101, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, -116, 102, 111, 114, 109, 32, 61, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 10, 105, 102, 32, 112, 108, 97, 116, 102, 111, 114, 109, - 32, 97, 110, 100, 32, 110, 111, 116, 32, 112, 108, 97, 116, 102, 111, 114, 109, 115, 80, 114, 101, 115, 101, 110, 116, 91, 112, 108, 97, 116, 102, 111, -114, 109, 93, 32, 116, 104, 101, 110, 10, 110, 117, 109, 80, 108, 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 110, 117, 109, 80, 108, 97, 116, 102, -111, 114, 109, 115, 32, 43, 32, 49, 10, 112, 108, 97, 116, 102, 111, 114, 109, 115, 80, 114, 101, 115, 101, 110, 116, 91, 112, 108, 97, 116, 102, 111, -114, 109, 93, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 117, 109, 80, 108, 97, 116, 102, 111, 114, -109, 115, 32, 62, 61, 32, 50, 32, 116, 104, 101, 110, 10, 99, 111, 100, 101, 108, 105, 116, 101, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, -109, 117, 108, 116, 105, 112, 108, 101, 80, 108, 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 112, 46, 112, -117, 115, 104, 40, 39, 60, 66, 117, 105, 108, 100, 77, 97, 116, 114, 105, 120, 62, 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, -119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, - 97, 108, 32, 99, 102, 103, 110, 97, 109, 101, 32, 61, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 102, 103, 110, 97, 109, 101, 40, 99, 102, -103, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 87, 111, 114, 107, 115, 112, 97, 99, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 32, 83, 101, 108, 101, 99, 116, 101, 100, 61, 34, 121, 101, 115, 34, 62, 39, 44, 32, 99, -102, 103, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, -117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, -111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, - 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 10, 112, 46, 119, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 78, 97, 109, 101, 61, 34, 37, -115, 34, 32, 67, 111, 110, 102, 105, 103, 78, 97, 109, 101, 61, 34, 37, 115, 34, 47, 62, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 44, - 32, 99, 102, 103, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 87, 111, 114, 107, 115, 112, - 97, 99, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, - 47, 66, 117, 105, 108, 100, 77, 97, 116, 114, 105, 120, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 111, 100, 101, 76, 105, 116, -101, 95, 87, 111, 114, 107, 115, 112, 97, 99, 101, 62, 39, 41, 10, 101, 110, 100, 10, }; - -// codelite/codelite_project.lua -static const unsigned char builtin_script_66[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, - 46, 116, 114, 101, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, -108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 99, 111, -100, 101, 108, 105, 116, 101, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 99, 111, 100, 101, 108, 105, 116, 101, 10, 99, 111, 100, 101, -108, 105, 116, 101, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 99, 111, 100, 101, -108, 105, 116, 101, 46, 112, 114, 111, 106, 101, 99, 116, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 103, -101, 116, 76, 105, 110, 107, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, -110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 103, 101, 116, 83, 105, 98, 108, 105, 110, 103, 76, -105, 110, 107, 115, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, - 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 10, 101, 110, -100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 99, 116, 111, 111, 108, 115, 32, 61, 32, 123, 10, 103, - 99, 99, 32, 61, 32, 34, 103, 110, 117, 32, 103, 99, 99, 34, 44, 10, 99, 108, 97, 110, 103, 32, 61, 32, 34, 99, 108, 97, 110, 103, 34, 44, - 10, 109, 115, 99, 32, 61, 32, 34, 86, 105, 115, 117, 97, 108, 32, 67, 43, 43, 34, 44, 10, 125, 10, 109, 46, 99, 120, 120, 116, 111, 111, 108, -115, 32, 61, 32, 123, 10, 103, 99, 99, 32, 61, 32, 34, 103, 110, 117, 32, 103, 43, 43, 34, 44, 10, 99, 108, 97, 110, 103, 32, 61, 32, 34, - 99, 108, 97, 110, 103, 43, 43, 34, 44, 10, 109, 115, 99, 32, 61, 32, 34, 86, 105, 115, 117, 97, 108, 32, 67, 43, 43, 34, 44, 10, 125, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 99, 111, 109, 112, 105, 108, 101, 114, 110, 97, 109, 101, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 32, 61, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 99, 99, 32, 111, 114, 32, 99, 102, 103, 46, -116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 112, 46, 67, 76, 65, 78, 71, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, - 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 91, 116, 111, 111, 108, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, -116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, 111, 108, 115, 101, 116, 32, 39, 34, 32, 43, - 32, 40, 95, 79, 80, 84, 73, 79, 78, 83, 46, 99, 99, 32, 111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 41, 32, 43, 32, - 34, 39, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, 99, 102, 103, 46, -108, 97, 110, 103, 117, 97, 103, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 109, 46, 99, 116, 111, 111, 108, 115, 91, 116, -111, 111, 108, 93, 10, 101, 108, 115, 101, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 99, 102, -103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 109, 46, 99, 120, 120, 116, 111, 111, -108, 115, 91, 116, 111, 111, 108, 93, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 99, -111, 109, 112, 105, 108, 101, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, -111, 111, 108, 115, 91, 95, 79, 80, 84, 73, 79, 78, 83, 46, 99, 99, 32, 111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, -111, 114, 32, 112, 46, 67, 76, 65, 78, 71, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, -101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, 111, 108, 115, 101, 116, 32, 39, 34, 32, 43, 32, 40, 95, 79, 80, - 84, 73, 79, 78, 83, 46, 99, 99, 32, 111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 41, 32, 43, 32, 34, 39, 34, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 111, 111, 108, 115, 101, 116, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 99, 117, 115, 116, 111, 109, 98, 117, 105, 108, -100, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 32, 97, 110, 100, 32, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, - 61, 61, 32, 112, 46, 77, 65, 75, 69, 70, 73, 76, 69, 41, 32, 97, 110, 100, 32, 40, 35, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, -109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 102, 105, 108, 101, 108, 105, 115, 116, 40, 99, 102, 103, 41, 10, 114, 101, 116, -117, 114, 110, 32, 99, 102, 103, 32, 97, 110, 100, 32, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, - 34, 78, 111, 110, 101, 34, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, - 99, 117, 115, 116, 111, 109, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, -105, 111, 110, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 110, 101, 101, 100, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, - 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 32, 97, 110, 100, 32, 99, 111, 110, 102, 105, 103, 46, 102, 105, 110, 100, -102, 105, 108, 101, 40, 99, 102, 103, 44, 32, 34, 46, 114, 99, 34, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 117, -114, 97, 116, 105, 111, 110, 95, 105, 115, 99, 117, 115, 116, 111, 109, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, -105, 110, 116, 101, 114, 110, 97, 108, 84, 121, 112, 101, 77, 97, 112, 32, 61, 32, 123, 10, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 32, 61, - 32, 34, 67, 111, 110, 115, 111, 108, 101, 34, 44, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 32, 61, 32, 34, 67, 111, 110, 115, 111, -108, 101, 34, 44, 10, 77, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 34, 34, 44, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, - 34, 76, 105, 98, 114, 97, 114, 121, 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 61, 32, 34, 76, 105, 98, 114, 97, 114, 121, 34, - 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 104, 101, 97, 100, 101, 114, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 60, 63, -120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, - 56, 34, 63, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 32, 61, 32, 109, 46, 105, 110, 116, 101, 114, 110, 97, 108, 84, 121, -112, 101, 77, 97, 112, 91, 112, 114, 106, 46, 107, 105, 110, 100, 93, 32, 111, 114, 32, 34, 34, 10, 95, 120, 40, 39, 60, 67, 111, 100, 101, 76, -105, 116, 101, 95, 80, 114, 111, 106, 101, 99, 116, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 32, 73, 110, 116, 101, 114, 110, 97, 108, 84, 121, -112, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 44, 32, 116, 121, 112, 101, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 108, 117, 103, 105, 110, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 32, 39, 60, 80, -108, 117, 103, 105, 110, 115, 47, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 115, 99, 114, 105, -112, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 32, 39, 60, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 47, 62, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, - 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, -106, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 101, -110, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 95, 112, 40, -100, 101, 112, 116, 104, 44, 32, 39, 60, 86, 105, 114, 116, 117, 97, 108, 68, 105, 114, 101, 99, 116, 111, 114, 121, 32, 78, 97, 109, 101, 61, 34, - 37, 115, 34, 62, 39, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, 97, 110, 99, 104, 101, -120, 105, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 95, 112, 40, 100, -101, 112, 116, 104, 44, 32, 39, 60, 47, 86, 105, 114, 116, 117, 97, 108, 68, 105, 114, 101, 99, 116, 111, 114, 121, 62, 39, 41, 10, 101, 110, 100, - 44, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, - 10, 108, 111, 99, 97, 108, 32, 101, 120, 99, 108, 117, 100, 101, 115, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 61, 32, 123, 125, 10, 102, 111, -114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, - 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 110, 97, 109, 101, 32, 61, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 102, 103, -110, 97, 109, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, -102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, -102, 99, 102, 103, 32, 111, 114, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, -105, 108, 100, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 101, 120, 99, 108, 117, 100, 101, 115, 70, 114, -111, 109, 66, 117, 105, 108, 100, 44, 32, 99, 102, 103, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 101, 120, - 99, 108, 117, 100, 101, 115, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 100, 101, 112, 116, -104, 44, 32, 39, 60, 70, 105, 108, 101, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 32, 69, 120, 99, 108, 117, 100, 101, 80, 114, 111, 106, 67, -111, 110, 102, 105, 103, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, 32, 116, 97, - 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 101, 120, 99, 108, 117, 100, 101, 115, 70, 114, 111, 109, 66, 117, 105, 108, 100, 44, 32, 39, 59, - 39, 41, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 100, 101, 112, 116, 104, 44, 32, 39, 60, 70, 105, 108, 101, 32, 78, 97, 109, 101, 61, 34, - 37, 115, 34, 47, 62, 39, 44, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 44, 10, 125, - 44, 32, 116, 114, 117, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, -105, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 61, 32, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, -102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, - 10, 99, 102, 103, 110, 97, 109, 101, 32, 61, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 102, 103, 110, 97, 109, 101, 40, 99, 102, 103, 41, - 10, 105, 102, 32, 35, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 49, 44, - 32, 39, 60, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 99, 102, 103, -110, 97, 109, 101, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 32, 100, 111, 10, 95, 112, 40, 50, 44, 32, 39, 60, 80, 114, 111, 106, 101, - 99, 116, 32, 78, 97, 109, 101, 61, 34, 37, 115, 34, 47, 62, 39, 44, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 121, 46, 110, 97, 109, 101, - 41, 10, 101, 110, 100, 10, 95, 112, 40, 49, 44, 32, 39, 60, 47, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 62, 39, 41, 10, 101, -108, 115, 101, 10, 95, 112, 40, 49, 44, 32, 39, 60, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 78, 97, 109, 101, 61, 34, 37, -115, 34, 47, 62, 39, 44, 32, 99, 102, 103, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 103, 108, 111, 98, 97, 108, 95, 99, 111, 109, 112, 105, 108, 101, 114, 40, 112, 114, 106, 41, 10, 95, 112, 40, 51, - 44, 32, 39, 60, 67, 111, 109, 112, 105, 108, 101, 114, 32, 79, 112, 116, 105, 111, 110, 115, 61, 34, 34, 32, 67, 95, 79, 112, 116, 105, 111, 110, -115, 61, 34, 34, 32, 65, 115, 115, 101, 109, 98, 108, 101, 114, 61, 34, 34, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 73, 110, 99, -108, 117, 100, 101, 80, 97, 116, 104, 32, 86, 97, 108, 117, 101, 61, 34, 46, 34, 47, 62, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, - 67, 111, 109, 112, 105, 108, 101, 114, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 108, 111, 98, 97, -108, 95, 108, 105, 110, 107, 101, 114, 40, 112, 114, 106, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 76, 105, 110, 107, 101, 114, 32, 79, 112, 116, -105, 111, 110, 115, 61, 34, 34, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 76, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 32, 86, - 97, 108, 117, 101, 61, 34, 46, 34, 47, 62, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 76, 105, 110, 107, 101, 114, 62, 39, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 108, 111, 98, 97, 108, 95, 114, 101, 115, 111, 117, 114, 99, 101, 67, 111, -109, 112, 105, 108, 101, 114, 40, 112, 114, 106, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, -105, 108, 101, 114, 32, 79, 112, 116, 105, 111, 110, 115, 61, 34, 34, 47, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 103, 108, 111, 98, 97, 108, 83, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 103, 108, 111, 98, 97, 108, 95, 99, 111, 109, 112, 105, 108, 101, 114, 44, 10, 109, 46, -103, 108, 111, 98, 97, 108, 95, 108, 105, 110, 107, 101, 114, 44, 10, 109, 46, 103, 108, 111, 98, 97, 108, 95, 114, 101, 115, 111, 117, 114, 99, 101, - 67, 111, 109, 112, 105, 108, 101, 114, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 105, -108, 101, 114, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 99, 117, 115, 116, -111, 109, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 111, 114, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, -102, 105, 108, 101, 108, 105, 115, 116, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 67, 111, 109, 112, 105, -108, 101, 114, 32, 82, 101, 113, 117, 105, 114, 101, 100, 61, 34, 110, 111, 34, 47, 62, 39, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 109, 46, 103, 101, 116, 99, 111, 109, 112, 105, 108, 101, 114, 40, 99, -102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, -116, 46, 103, 101, 116, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 120, -120, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, - 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, 32, 102, 111, 114, 99, 101, -105, 110, 99, 108, 117, 100, 101, 115, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 44, 32, 34, 59, 34, - 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 108, 97, 103, 115, 32, 32, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, -116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 40, 99, 102, 103, - 41, 44, 32, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, -110, 115, 41, 44, 32, 34, 59, 34, 41, 10, 108, 111, 99, 97, 108, 32, 97, 115, 109, 102, 108, 97, 103, 115, 32, 61, 32, 34, 34, 10, 108, 111, - 99, 97, 108, 32, 112, 99, 104, 32, 32, 32, 32, 32, 32, 61, 32, 34, 34, 10, 95, 120, 40, 51, 44, 32, 39, 60, 67, 111, 109, 112, 105, 108, -101, 114, 32, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 32, 67, 95, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 32, 65, -115, 115, 101, 109, 98, 108, 101, 114, 61, 34, 37, 115, 34, 32, 82, 101, 113, 117, 105, 114, 101, 100, 61, 34, 121, 101, 115, 34, 32, 80, 114, 101, - 67, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 61, 34, 37, 115, 34, 32, 80, 67, 72, 73, 110, 67, 111, 109, 109, 97, 110, 100, - 76, 105, 110, 101, 61, 34, 110, 111, 34, 32, 85, 115, 101, 68, 105, 102, 102, 101, 114, 101, 110, 116, 80, 67, 72, 70, 108, 97, 103, 115, 61, 34, -110, 111, 34, 32, 80, 67, 72, 70, 108, 97, 103, 115, 61, 34, 34, 62, 39, 44, 32, 99, 120, 120, 102, 108, 97, 103, 115, 44, 32, 99, 102, 108, - 97, 103, 115, 44, 32, 97, 115, 109, 102, 108, 97, 103, 115, 44, 32, 112, 99, 104, 41, 10, 102, 111, 114, 32, 95, 44, 32, 105, 110, 99, 108, 117, -100, 101, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, - 32, 100, 111, 10, 95, 120, 40, 52, 44, 32, 39, 60, 73, 110, 99, 108, 117, 100, 101, 80, 97, 116, 104, 32, 86, 97, 108, 117, 101, 61, 34, 37, -115, 34, 47, 62, 39, 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 44, 32, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, -100, 101, 102, 105, 110, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 41, 32, 100, 111, - 10, 95, 112, 40, 52, 44, 32, 39, 60, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 32, 86, 97, 108, 117, 101, 61, 34, 37, 115, 34, - 47, 62, 39, 44, 32, 112, 46, 101, 115, 99, 40, 100, 101, 102, 105, 110, 101, 41, 58, 103, 115, 117, 98, 40, 39, 32, 39, 44, 32, 39, 92, 92, - 32, 39, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 67, 111, 109, 112, 105, 108, 101, 114, 62, 39, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 105, 110, 107, 101, 114, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, -105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 99, 117, 115, 116, 111, 109, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 111, 114, 32, - 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 102, 105, 108, 101, 108, 105, 115, 116, 40, 99, 102, 103, 41, 32, 116, 104, -101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 76, 105, 110, 107, 101, 114, 32, 82, 101, 113, 117, 105, 114, 101, 100, 61, 34, 110, 111, 34, 47, - 62, 39, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 109, - 46, 103, 101, 116, 99, 111, 109, 112, 105, 108, 101, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 32, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, - 99, 102, 103, 41, 44, 32, 99, 102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, -101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 41, 41, 10, 95, 120, 40, 51, 44, 32, 39, 60, 76, 105, 110, 107, 101, 114, 32, 82, 101, 113, -117, 105, 114, 101, 100, 61, 34, 121, 101, 115, 34, 32, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 62, 39, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 59, 34, 41, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 98, -100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 41, 32, 100, 111, 10, 95, 112, - 40, 52, 44, 32, 39, 60, 76, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 32, 86, 97, 108, 117, 101, 61, 34, 37, 115, 34, 47, 62, 39, 44, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 108, 105, 98, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 76, 105, 110, 107, 101, 114, 62, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, -114, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 110, 101, 101, 100, -114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 82, 101, 115, -111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 32, 79, 112, 116, 105, 111, 110, 115, 61, 34, 34, 32, 82, 101, 113, 117, 105, 114, 101, -100, 61, 34, 110, 111, 34, 47, 62, 39, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, -115, 101, 116, 32, 61, 32, 109, 46, 103, 101, 116, 99, 111, 109, 112, 105, 108, 101, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, -101, 102, 105, 110, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, -101, 116, 100, 101, 102, 105, 110, 101, 115, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, - 44, 32, 99, 102, 103, 46, 114, 101, 115, 100, 101, 102, 105, 110, 101, 115, 41, 41, 44, 32, 34, 34, 44, 32, 34, 59, 34, 44, 32, 34, 34, 41, - 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, -103, 46, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 59, 34, 41, 10, 95, 120, 40, 51, 44, 32, 39, 60, 82, 101, 115, 111, 117, -114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 32, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 37, 115, 34, 32, 82, 101, 113, 117, 105, -114, 101, 100, 61, 34, 121, 101, 115, 34, 62, 39, 44, 32, 100, 101, 102, 105, 110, 101, 115, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 102, -111, 114, 32, 95, 44, 32, 105, 110, 99, 108, 117, 100, 101, 112, 97, 116, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, 97, 98, 108, -101, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 44, 32, 99, 102, 103, 46, 114, 101, 115, 105, -110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 41, 32, 100, 111, 10, 95, 120, 40, 52, 44, 32, 39, 60, 73, 110, 99, 108, 117, 100, 101, 80, - 97, 116, 104, 32, 86, 97, 108, 117, 101, 61, 34, 37, 115, 34, 47, 62, 39, 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 105, 110, 99, 108, 117, 100, 101, 112, 97, 116, 104, 41, - 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 62, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 108, 40, 99, 102, 103, 41, 10, 105, -102, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 102, 105, 108, 101, 108, 105, 115, 116, 40, 99, 102, 103, 41, 32, -116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 71, 101, 110, 101, 114, 97, 108, 32, 73, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, -101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, 46, 34, 32, 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, - 34, 46, 34, 32, 80, 97, 117, 115, 101, 69, 120, 101, 99, 87, 104, 101, 110, 80, 114, 111, 99, 84, 101, 114, 109, 105, 110, 97, 116, 101, 115, 61, - 34, 110, 111, 34, 47, 62, 39, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 105, 115, 69, 120, 101, 32, 61, 32, 112, 114, 106, 46, 107, 105, -110, 100, 32, 61, 61, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 32, 111, 114, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, - 61, 61, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 112, 97, 116, 104, - 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, - 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 41, 10, 108, 111, 99, 97, 108, 32, 111, 98, 106, -100, 105, 114, 32, 32, 32, 32, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, -106, 44, 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 110, 97, 109, 101, 32, - 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, 98, -117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 107, 105, 110, -103, 100, 105, 114, 32, 61, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 100, 105, 114, 32, 111, 114, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, -105, 111, 110, 10, 108, 111, 99, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 32, 32, 32, 32, 61, 32, 105, 105, 102, 40, 105, 115, 69, 120, 101, - 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 119, 111, 114, 107, 105, 110, 103, 100, 105, 114, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 41, 44, 32, 34, 34, 41, 10, 108, 111, 99, - 97, 108, 32, 99, 109, 100, 97, 114, 103, 115, 32, 32, 32, 32, 61, 32, 105, 105, 102, 40, 105, 115, 69, 120, 101, 44, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, 34, 32, 34, 41, 44, 32, 34, 34, 41, - 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 115, 104, 111, 117, 108, 100, 32, 116, 104, 105, 115, 32, 98, 101, 32, 100, 101, 98, 117, 103, 97, 114, -103, 115, 32, 105, 110, 115, 116, 101, 97, 100, 63, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 115, 101, 112, 97, 114, 97, 116, 101, 100, 101, 98, -117, 103, 97, 114, 103, 115, 32, 61, 32, 34, 110, 111, 34, 10, 108, 111, 99, 97, 108, 32, 100, 101, 98, 117, 103, 97, 114, 103, 115, 32, 32, 61, - 32, 34, 34, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 107, 105, 110, 103, 100, 105, 114, 32, 61, 32, 105, 105, 102, 40, 105, 115, 69, 120, 101, - 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, 100, -101, 98, 117, 103, 100, 105, 114, 41, 44, 32, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 117, 115, 101, 101, 120, 101, 99, 32, 32, 61, - 32, 105, 105, 102, 40, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, -121, 101, 115, 34, 44, 32, 34, 110, 111, 34, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 103, 117, 105, 112, 114, 111, 103, 114, 97, 109, 32, 61, - 32, 105, 105, 102, 40, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, - 34, 121, 101, 115, 34, 44, 32, 34, 110, 111, 34, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 101, 110, 97, 98, 108, 101, 100, 32, 32, 61, 32, -105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 44, 32, - 34, 110, 111, 34, 44, 32, 34, 121, 101, 115, 34, 41, 10, 108, 111, 99, 97, 108, 32, 108, 100, 80, 97, 116, 104, 32, 61, 32, 39, 39, 10, 102, -111, 114, 32, 95, 44, 32, 108, 105, 98, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 108, 105, 98, 100, 105, -114, 115, 41, 32, 100, 111, 10, 108, 100, 80, 97, 116, 104, 32, 61, 32, 108, 100, 80, 97, 116, 104, 32, 46, 46, 32, 34, 58, 34, 32, 46, 46, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 108, 105, 98, 100, 105, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 100, 80, 97, 116, 104, 32, 61, 61, 32, 110, 105, 108, 32, 111, -114, 32, 108, 100, 80, 97, 116, 104, 32, 61, 61, 32, 39, 39, 32, 116, 104, 101, 110, 10, 95, 120, 40, 51, 44, 32, 39, 60, 71, 101, 110, 101, -114, 97, 108, 32, 79, 117, 116, 112, 117, 116, 70, 105, 108, 101, 61, 34, 37, 115, 34, 32, 73, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, - 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, 37, 115, 34, 32, 67, 111, 109, 109, 97, 110, 100, 61, 34, 37, 115, 34, 32, 67, 111, 109, 109, - 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 61, 34, 37, 115, 34, 32, 85, 115, 101, 83, 101, 112, 97, 114, 97, 116, 101, 68, 101, 98, -117, 103, 65, 114, 103, 115, 61, 34, 37, 115, 34, 32, 68, 101, 98, 117, 103, 65, 114, 103, 117, 109, 101, 110, 116, 115, 61, 34, 37, 115, 34, 32, - 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, 37, 115, 34, 32, 80, 97, 117, 115, 101, 69, 120, 101, 99, 87, -104, 101, 110, 80, 114, 111, 99, 84, 101, 114, 109, 105, 110, 97, 116, 101, 115, 61, 34, 37, 115, 34, 32, 73, 115, 71, 85, 73, 80, 114, 111, 103, -114, 97, 109, 61, 34, 37, 115, 34, 32, 73, 115, 69, 110, 97, 98, 108, 101, 100, 61, 34, 37, 115, 34, 47, 62, 39, 44, 10, 116, 97, 114, 103, -101, 116, 110, 97, 109, 101, 44, 32, 111, 98, 106, 100, 105, 114, 44, 32, 99, 111, 109, 109, 97, 110, 100, 44, 32, 99, 109, 100, 97, 114, 103, 115, - 44, 32, 117, 115, 101, 115, 101, 112, 97, 114, 97, 116, 101, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, 100, 101, 98, 117, 103, 97, 114, 103, -115, 44, 32, 119, 111, 114, 107, 105, 110, 103, 100, 105, 114, 44, 32, 112, 97, 117, 115, 101, 101, 120, 101, 99, 44, 32, 105, 115, 103, 117, 105, 112, -114, 111, 103, 114, 97, 109, 44, 32, 105, 115, 101, 110, 97, 98, 108, 101, 100, 41, 10, 101, 108, 115, 101, 10, 108, 100, 80, 97, 116, 104, 32, 61, - 32, 115, 116, 114, 105, 110, 103, 46, 115, 117, 98, 40, 108, 100, 80, 97, 116, 104, 44, 32, 50, 41, 10, 95, 120, 40, 51, 44, 32, 39, 60, 71, -101, 110, 101, 114, 97, 108, 32, 79, 117, 116, 112, 117, 116, 70, 105, 108, 101, 61, 34, 37, 115, 34, 32, 73, 110, 116, 101, 114, 109, 101, 100, 105, - 97, 116, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, 37, 115, 34, 32, 67, 111, 109, 109, 97, 110, 100, 61, 34, 76, 68, 95, 76, 73, - 66, 82, 65, 82, 89, 95, 80, 65, 84, 72, 61, 37, 115, 32, 37, 115, 34, 32, 67, 111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, -116, 115, 61, 34, 37, 115, 34, 32, 85, 115, 101, 83, 101, 112, 97, 114, 97, 116, 101, 68, 101, 98, 117, 103, 65, 114, 103, 115, 61, 34, 37, 115, - 34, 32, 68, 101, 98, 117, 103, 65, 114, 103, 117, 109, 101, 110, 116, 115, 61, 34, 37, 115, 34, 32, 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, -101, 99, 116, 111, 114, 121, 61, 34, 37, 115, 34, 32, 80, 97, 117, 115, 101, 69, 120, 101, 99, 87, 104, 101, 110, 80, 114, 111, 99, 84, 101, 114, -109, 105, 110, 97, 116, 101, 115, 61, 34, 37, 115, 34, 32, 73, 115, 71, 85, 73, 80, 114, 111, 103, 114, 97, 109, 61, 34, 37, 115, 34, 32, 73, -115, 69, 110, 97, 98, 108, 101, 100, 61, 34, 37, 115, 34, 47, 62, 39, 44, 10, 32, 116, 97, 114, 103, 101, 116, 110, 97, 109, 101, 44, 32, 111, - 98, 106, 100, 105, 114, 44, 32, 108, 100, 80, 97, 116, 104, 44, 32, 99, 111, 109, 109, 97, 110, 100, 44, 32, 99, 109, 100, 97, 114, 103, 115, 44, - 32, 117, 115, 101, 115, 101, 112, 97, 114, 97, 116, 101, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, 100, 101, 98, 117, 103, 97, 114, 103, 115, - 44, 32, 119, 111, 114, 107, 105, 110, 103, 100, 105, 114, 44, 32, 112, 97, 117, 115, 101, 101, 120, 101, 99, 44, 32, 105, 115, 103, 117, 105, 112, 114, -111, 103, 114, 97, 109, 44, 32, 105, 115, 101, 110, 97, 98, 108, 101, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 101, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 115, - 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 101, 110, 118, 115, 44, 32, 34, - 92, 110, 34, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 32, 69, 110, 118, 86, 97, 114, 83, -101, 116, 78, 97, 109, 101, 61, 34, 38, 108, 116, 59, 85, 115, 101, 32, 68, 101, 102, 97, 117, 108, 116, 115, 38, 103, 116, 59, 34, 32, 68, 98, -103, 83, 101, 116, 78, 97, 109, 101, 61, 34, 38, 108, 116, 59, 85, 115, 101, 32, 68, 101, 102, 97, 117, 108, 116, 115, 38, 103, 116, 59, 34, 62, - 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 33, 91, 67, 68, 65, 84, 65, 91, 37, 115, 93, 93, 62, 39, 44, 32, 101, 110, 118, 115, 41, - 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 103, 101, 114, 40, 99, 102, 103, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 68, 101, - 98, 117, 103, 103, 101, 114, 32, 73, 115, 82, 101, 109, 111, 116, 101, 61, 34, 37, 115, 34, 32, 82, 101, 109, 111, 116, 101, 72, 111, 115, 116, 78, - 97, 109, 101, 61, 34, 37, 115, 34, 32, 82, 101, 109, 111, 116, 101, 72, 111, 115, 116, 80, 111, 114, 116, 61, 34, 37, 115, 34, 32, 68, 101, 98, -117, 103, 103, 101, 114, 80, 97, 116, 104, 61, 34, 34, 32, 73, 115, 69, 120, 116, 101, 110, 100, 101, 100, 61, 34, 37, 115, 34, 62, 39, 44, 32, -105, 105, 102, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 114, 101, 109, 111, 116, 101, 104, 111, 115, 116, 44, 32, 34, 121, 101, 115, 34, 44, 32, - 34, 110, 111, 34, 41, 44, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 114, 101, 109, 111, 116, 101, 104, 111, 115, 116, 32, 111, 114, 32, 34, 34, - 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 112, 111, 114, 116, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 99, 102, -103, 46, 100, 101, 98, 117, 103, 112, 111, 114, 116, 41, 44, 32, 34, 34, 41, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, -101, 120, 116, 101, 110, 100, 101, 100, 112, 114, 111, 116, 111, 99, 111, 108, 44, 32, 34, 121, 101, 115, 34, 44, 32, 34, 110, 111, 34, 41, 41, 10, -105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 115, 101, 97, 114, 99, 104, 112, 97, 116, 104, 115, 32, 62, 32, 48, 32, 116, 104, 101, -110, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 69, 108, 101, 109, 101, 110, 116, 84, -101, 120, 116, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 68, 101, 98, 117, 103, 103, 101, 114, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 115, - 62, 37, 115, 60, 47, 68, 101, 98, 117, 103, 103, 101, 114, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 115, 62, 39, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, 99, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, -118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 115, 101, 97, 114, 99, 104, 112, - 97, 116, 104, 115, 41, 41, 44, 32, 34, 92, 110, 34, 41, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, -101, 46, 101, 115, 99, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 52, 44, 32, 39, 60, 68, 101, 98, 117, 103, 103, 101, 114, 83, 101, 97, 114, - 99, 104, 80, 97, 116, 104, 115, 47, 62, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 110, -110, 101, 99, 116, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, - 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 69, 108, 101, 109, 101, 110, 116, 84, 101, 120, 116, 41, 10, 95, 112, 40, 52, 44, 32, 39, - 60, 80, 111, 115, 116, 67, 111, 110, 110, 101, 99, 116, 67, 111, 109, 109, 97, 110, 100, 115, 62, 37, 115, 60, 47, 80, 111, 115, 116, 67, 111, 110, -110, 101, 99, 116, 67, 111, 109, 109, 97, 110, 100, 115, 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, -115, 99, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 110, 110, 101, 99, 116, 99, 111, 109, 109, 97, 110, 100, 115, 41, 44, 32, 34, 92, -110, 34, 41, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 41, 10, 101, 108, 115, -101, 10, 95, 112, 40, 52, 44, 32, 39, 60, 80, 111, 115, 116, 67, 111, 110, 110, 101, 99, 116, 67, 111, 109, 109, 97, 110, 100, 115, 47, 62, 39, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 115, 116, 97, 114, 116, 117, 112, 99, 111, 109, 109, 97, 110, -100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, -115, 99, 69, 108, 101, 109, 101, 110, 116, 84, 101, 120, 116, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 83, 116, 97, 114, 116, 117, 112, 67, 111, -109, 109, 97, 110, 100, 115, 62, 37, 115, 60, 47, 83, 116, 97, 114, 116, 117, 112, 67, 111, 109, 109, 97, 110, 100, 115, 62, 39, 44, 32, 116, 97, - 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, 99, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 115, 116, 97, 114, 116, 117, -112, 99, 111, 109, 109, 97, 110, 100, 115, 41, 44, 32, 34, 92, 110, 34, 41, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, -101, 108, 105, 116, 101, 46, 101, 115, 99, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 52, 44, 32, 39, 60, 83, 116, 97, 114, 116, 117, 112, 67, -111, 109, 109, 97, 110, 100, 115, 47, 62, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 68, 101, 98, 117, 103, 103, 101, -114, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 66, 117, 105, 108, 100, 40, 99, 102, 103, - 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 112, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, -104, 101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 80, 114, 101, 66, 117, 105, 108, 100, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, -109, 109, 97, 110, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, - 80, 97, 116, 104, 115, 40, 99, 102, 103, 46, 112, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, - 97, 116, 105, 111, 110, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 69, 108, 101, -109, 101, 110, 116, 84, 101, 120, 116, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 111, 109, 109, 97, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 99, 111, 109, 109, 97, 110, 100, 115, 41, 32, 100, 111, 10, 95, 120, 40, 52, 44, 32, 39, 60, 67, 111, 109, 109, 97, 110, 100, 32, - 69, 110, 97, 98, 108, 101, 100, 61, 34, 121, 101, 115, 34, 62, 37, 115, 60, 47, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 32, 99, 111, 109, -109, 97, 110, 100, 41, 10, 101, 110, 100, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, - 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 80, 114, 101, 66, 117, 105, 108, 100, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, - 46, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, - 44, 32, 39, 60, 80, 111, 115, 116, 66, 117, 105, 108, 100, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 115, 32, - 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 99, -102, 103, 46, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, - 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 69, 108, 101, 109, 101, 110, 116, 84, 101, -120, 116, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 111, 109, 109, 97, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 109, -109, 97, 110, 100, 115, 41, 32, 100, 111, 10, 95, 120, 40, 52, 44, 32, 39, 60, 67, 111, 109, 109, 97, 110, 100, 32, 69, 110, 97, 98, 108, 101, -100, 61, 34, 121, 101, 115, 34, 62, 37, 115, 60, 47, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 32, 99, 111, 109, 109, 97, 110, 100, 41, 10, -101, 110, 100, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 99, 111, 100, 101, 108, 105, 116, 101, 46, 101, 115, 99, 41, 10, 95, 112, 40, 51, - 44, 32, 39, 60, 47, 80, 111, 115, 116, 66, 117, 105, 108, 100, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 99, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 99, 117, 115, 116, 111, 109, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, -101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 32, 69, 110, 97, 98, 108, 101, 100, 61, 34, -110, 111, 34, 47, 62, 39, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 32, 32, - 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, -100, 115, 44, 34, 34, 44, 34, 34, 44, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 99, 108, 101, 97, 110, 32, 32, 32, 61, 32, 116, 97, 98, -108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 99, 102, 103, 46, 99, 108, 101, 97, 110, 99, 111, 109, 109, 97, 110, 100, 115, 44, 34, 34, 44, - 34, 34, 44, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 98, 117, 105, 108, 100, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, -108, 111, 100, 101, 40, 99, 102, 103, 46, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 34, 34, 44, 34, 34, 44, 34, - 34, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 32, 69, 110, 97, 98, 108, 101, 100, 61, 34, -121, 101, 115, 34, 62, 39, 41, 10, 95, 120, 40, 52, 44, 32, 39, 60, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 62, 37, 115, 60, - 47, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 32, 98, 117, 105, 108, 100, 41, 10, 95, 120, 40, 52, 44, 32, 39, 60, - 67, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 62, 37, 115, 60, 47, 67, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, - 32, 99, 108, 101, 97, 110, 41, 10, 95, 120, 40, 52, 44, 32, 39, 60, 82, 101, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 62, 37, -115, 60, 47, 82, 101, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 32, 114, 101, 98, 117, 105, 108, 100, 41, 10, 95, 112, - 40, 52, 44, 32, 39, 60, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 70, 105, 108, 101, 67, 111, 109, 109, 97, 110, 100, 62, 60, 47, 80, 114, -101, 112, 114, 111, 99, 101, 115, 115, 70, 105, 108, 101, 67, 111, 109, 109, 97, 110, 100, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 83, -105, 110, 103, 108, 101, 70, 105, 108, 101, 67, 111, 109, 109, 97, 110, 100, 62, 60, 47, 83, 105, 110, 103, 108, 101, 70, 105, 108, 101, 67, 111, 109, -109, 97, 110, 100, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 77, 97, 107, 101, 102, 105, 108, 101, 71, 101, 110, 101, 114, 97, 116, 105, -111, 110, 67, 111, 109, 109, 97, 110, 100, 62, 60, 47, 77, 97, 107, 101, 102, 105, 108, 101, 71, 101, 110, 101, 114, 97, 116, 105, 111, 110, 67, 111, -109, 109, 97, 110, 100, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 84, 104, 105, 114, 100, 80, 97, 114, 116, 121, 84, 111, 111, 108, 78, - 97, 109, 101, 62, 60, 47, 84, 104, 105, 114, 100, 80, 97, 114, 116, 121, 84, 111, 111, 108, 78, 97, 109, 101, 62, 39, 41, 10, 95, 112, 40, 52, - 44, 32, 39, 60, 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 62, 60, 47, 87, 111, 114, 107, 105, 110, 103, 68, 105, -114, 101, 99, 116, 111, 114, 121, 62, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 62, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 82, 117, 108, 101, -115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 95, 105, 115, 99, 117, 115, 116, 111, 109, - 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 65, 100, 100, 105, 116, 105, 111, 110, - 97, 108, 82, 117, 108, 101, 115, 47, 62, 39, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 95, 112, 40, 51, 44, 32, 39, 60, 65, -100, 100, 105, 116, 105, 111, 110, 97, 108, 82, 117, 108, 101, 115, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 67, 117, 115, 116, 111, 109, - 80, 111, 115, 116, 66, 117, 105, 108, 100, 47, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 67, 117, 115, 116, 111, 109, 80, 114, 101, 66, -117, 105, 108, 100, 47, 62, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 82, 117, 108, 101, -115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 67, 112, 112, 49, 49, 40, 99, 102, 103, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 103, 110, 117, 43, - 43, 49, 49, 39, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 67, 43, 43, - 49, 49, 39, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 103, 110, 117, 43, - 43, 48, 120, 39, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 67, 43, 43, - 48, 120, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 67, 112, 112, 49, 52, 40, 99, 102, 103, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 103, 110, 117, 43, - 43, 49, 52, 39, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 67, 43, 43, - 49, 52, 39, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 103, 110, 117, 43, - 43, 49, 121, 39, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 39, 67, 43, 43, - 49, 121, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 108, 101, 116, 105, 111, 110, 40, 99, -102, 103, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 67, 111, 109, 112, 108, 101, 116, 105, 111, 110, 32, 69, 110, 97, 98, 108, 101, 67, 112, 112, - 49, 49, 61, 34, 37, 115, 34, 32, 69, 110, 97, 98, 108, 101, 67, 112, 112, 49, 52, 61, 34, 37, 115, 34, 62, 39, 44, 10, 105, 105, 102, 40, -109, 46, 105, 115, 67, 112, 112, 49, 49, 40, 99, 102, 103, 41, 44, 32, 34, 121, 101, 115, 34, 44, 32, 34, 110, 111, 34, 41, 44, 10, 105, 105, -102, 40, 109, 46, 105, 115, 67, 112, 112, 49, 52, 40, 99, 102, 103, 41, 44, 32, 34, 121, 101, 115, 34, 44, 32, 34, 110, 111, 34, 41, 10, 41, - 10, 95, 112, 40, 52, 44, 32, 39, 60, 67, 108, 97, 110, 103, 67, 109, 112, 70, 108, 97, 103, 115, 67, 47, 62, 39, 41, 10, 95, 112, 40, 52, - 44, 32, 39, 60, 67, 108, 97, 110, 103, 67, 109, 112, 70, 108, 97, 103, 115, 47, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 67, 108, - 97, 110, 103, 80, 80, 47, 62, 39, 41, 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 119, 101, 32, 109, 105, 103, 104, 116, 32, 119, 97, 110, 116, - 32, 116, 111, 32, 115, 101, 116, 32, 115, 112, 101, 99, 105, 97, 108, 32, 99, 111, 100, 101, 32, 99, 111, 109, 112, 108, 101, 116, 105, 111, 110, 32, -109, 97, 99, 114, 111, 115, 46, 46, 46, 63, 10, 95, 112, 40, 52, 44, 32, 39, 60, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 115, 47, 62, - 39, 41, 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 115, 101, 97, 114, 99, 104, 32, 112, 97, 116, 104, 115, 32, 102, 111, 114, 32, 99, 111, 100, -101, 32, 99, 111, 109, 112, 108, 101, 116, 105, 111, 110, 63, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 67, 111, 109, 112, 108, 101, 116, 105, 111, -110, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 99, 111, 109, 112, 105, 108, 101, 114, - 44, 10, 109, 46, 108, 105, 110, 107, 101, 114, 44, 10, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 44, 10, -109, 46, 103, 101, 110, 101, 114, 97, 108, 44, 10, 109, 46, 101, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 44, 10, 109, 46, 100, 101, 98, 117, -103, 103, 101, 114, 44, 10, 109, 46, 112, 114, 101, 66, 117, 105, 108, 100, 44, 10, 109, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 44, 10, 109, - 46, 99, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 82, 117, 108, 101, 115, 44, - 10, 109, 46, 99, 111, 109, 112, 108, 101, 116, 105, 111, 110, 44, 10, 125, 10, 101, 110, 100, 10, 109, 46, 116, 121, 112, 101, 115, 32, 61, 10, 123, - 10, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 32, 32, 61, 32, 34, 69, 120, 101, 99, 117, 116, 97, 98, 108, 101, 34, 44, 10, 77, 97, 107, -101, 102, 105, 108, 101, 32, 32, 32, 32, 61, 32, 34, 34, 44, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 32, 32, 61, 32, 34, 68, 121, -110, 97, 109, 105, 99, 32, 76, 105, 98, 114, 97, 114, 121, 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 32, 32, 61, 32, 34, 83, -116, 97, 116, 105, 99, 32, 76, 105, 98, 114, 97, 114, 121, 34, 44, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 32, 61, 32, 34, 69, -120, 101, 99, 117, 116, 97, 98, 108, 101, 34, 44, 10, 85, 116, 105, 108, 105, 116, 121, 32, 32, 32, 32, 32, 61, 32, 34, 34, 44, 10, 125, 10, -109, 46, 100, 101, 98, 117, 103, 103, 101, 114, 115, 32, 61, 10, 123, 10, 68, 101, 102, 97, 117, 108, 116, 32, 61, 32, 34, 71, 78, 85, 32, 103, -100, 98, 32, 100, 101, 98, 117, 103, 103, 101, 114, 34, 44, 10, 71, 68, 66, 32, 61, 32, 34, 71, 78, 85, 32, 103, 100, 98, 32, 100, 101, 98, -117, 103, 103, 101, 114, 34, 44, 10, 76, 76, 68, 66, 32, 61, 32, 34, 76, 76, 68, 66, 32, 68, 101, 98, 117, 103, 103, 101, 114, 34, 44, 10, -125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 101, 116, 116, 105, 110, 103, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, - 32, 39, 60, 83, 101, 116, 116, 105, 110, 103, 115, 32, 84, 121, 112, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 109, 46, 116, 121, 112, 101, 115, - 91, 112, 114, 106, 46, 107, 105, 110, 100, 93, 32, 111, 114, 32, 34, 34, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, 71, 108, 111, 98, 97, 108, - 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 103, 108, 111, 98, 97, 108, 83, 101, 116, 116, 105, 110, 103, 115, 44, 32, 112, 114, 106, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, - 47, 71, 108, 111, 98, 97, 108, 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, -111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, -102, 103, 110, 97, 109, 101, 32, 32, 61, 32, 99, 111, 100, 101, 108, 105, 116, 101, 46, 99, 102, 103, 110, 97, 109, 101, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 99, 111, 109, 112, 105, 108, 101, 114, 32, 61, 32, 109, 46, 103, 101, 116, 99, 111, 109, 112, 105, 108, 101, 114, 110, 97, -109, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 98, 117, 103, 103, 101, 114, 32, 61, 32, 109, 46, 100, 101, 98, 117, 103, -103, 101, 114, 115, 91, 99, 102, 103, 46, 100, 101, 98, 117, 103, 103, 101, 114, 93, 32, 111, 114, 32, 109, 46, 100, 101, 98, 117, 103, 103, 101, 114, -115, 46, 68, 101, 102, 97, 117, 108, 116, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 32, 61, 32, 109, 46, 116, 121, 112, 101, 115, 91, 99, -102, 103, 46, 107, 105, 110, 100, 93, 10, 95, 120, 40, 50, 44, 32, 39, 60, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 78, - 97, 109, 101, 61, 34, 37, 115, 34, 32, 67, 111, 109, 112, 105, 108, 101, 114, 84, 121, 112, 101, 61, 34, 37, 115, 34, 32, 68, 101, 98, 117, 103, -103, 101, 114, 84, 121, 112, 101, 61, 34, 37, 115, 34, 32, 84, 121, 112, 101, 61, 34, 37, 115, 34, 32, 66, 117, 105, 108, 100, 67, 109, 112, 87, -105, 116, 104, 71, 108, 111, 98, 97, 108, 83, 101, 116, 116, 105, 110, 103, 115, 61, 34, 97, 112, 112, 101, 110, 100, 34, 32, 66, 117, 105, 108, 100, - 76, 110, 107, 87, 105, 116, 104, 71, 108, 111, 98, 97, 108, 83, 101, 116, 116, 105, 110, 103, 115, 61, 34, 97, 112, 112, 101, 110, 100, 34, 32, 66, -117, 105, 108, 100, 82, 101, 115, 87, 105, 116, 104, 71, 108, 111, 98, 97, 108, 83, 101, 116, 116, 105, 110, 103, 115, 61, 34, 97, 112, 112, 101, 110, -100, 34, 62, 39, 44, 32, 99, 102, 103, 110, 97, 109, 101, 44, 32, 99, 111, 109, 112, 105, 108, 101, 114, 44, 32, 100, 101, 98, 117, 103, 103, 101, -114, 44, 32, 116, 121, 112, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, 47, 67, 111, 110, 102, 105, 103, 117, 114, - 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 49, 44, 32, 39, 60, 47, 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, - 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 104, 101, 97, 100, 101, 114, 44, 10, 109, 46, 112, 108, -117, 103, 105, 110, 115, 44, 10, 109, 46, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 44, 10, 109, 46, 102, 105, 108, 101, 115, 44, 10, 109, - 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 109, 46, 115, 101, 116, 116, 105, 110, 103, 115, 44, 10, 125, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 117, 116, 102, 56, - 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 112, 114, 106, 41, 10, 95, 112, 40, 39, 60, 47, 67, 111, 100, 101, 76, 105, 116, 101, 95, 80, 114, 111, 106, 101, 99, 116, 62, 39, - 41, 10, 101, 110, 100, 10, }; - -// gmake/_preload.lua -static const unsigned char builtin_script_67[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 103, 109, 97, 107, 101, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 34, 71, 78, 85, 32, 77, 97, 107, 101, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 32, 32, 32, - 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 71, 78, 85, 32, 109, 97, 107, 101, 102, 105, 108, 101, 115, 32, 102, 111, 114, 32, 80, - 79, 83, 73, 88, 44, 32, 77, 105, 110, 71, 87, 44, 32, 97, 110, 100, 32, 67, 121, 103, 119, 105, 110, 34, 44, 10, 116, 111, 111, 108, 115, 101, -116, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 103, 99, 99, 34, 44, 10, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 32, - 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, -112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 85, -116, 105, 108, 105, 116, 121, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, -103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 32, 125, 44, 10, 118, - 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 99, -108, 97, 110, 103, 34, 44, 32, 34, 103, 99, 99, 34, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 111, 110, 111, - 34, 44, 32, 34, 109, 115, 110, 101, 116, 34, 44, 32, 34, 112, 110, 101, 116, 34, 32, 125, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, - 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 112, 46, -109, 97, 107, 101, 46, 101, 115, 99, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 119, 107, 115, 44, 32, 112, 46, 109, 97, 107, 101, - 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 119, 107, 115, 44, 32, 102, 97, 108, 115, 101, 41, 44, 32, 112, 46, -109, 97, 107, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 95, 119, 111, 114, 107, 115, 112, 97, 99, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, - 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, -114, 40, 112, 46, 109, 97, 107, 101, 46, 101, 115, 99, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 112, - 46, 109, 97, 107, 101, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, - 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, 89, 32, 116, 104, 101, 110, 10, 112, - 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 97, 107, 101, 46, -117, 116, 105, 108, 105, 116, 121, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, -100, 32, 61, 61, 32, 112, 46, 77, 65, 75, 69, 70, 73, 76, 69, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, -112, 114, 106, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 97, 107, 101, 46, 109, 97, 107, 101, 102, 105, 108, 101, 46, 103, -101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 108, 115, 101, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, -116, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, -102, 105, 108, 101, 44, 32, 112, 46, 109, 97, 107, 101, 46, 99, 115, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 108, 115, 101, 105, 102, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, 41, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, -112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, -101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 97, 107, 101, 46, 99, 112, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 119, 107, 115, 44, 32, 112, 46, 109, 97, -107, 101, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 119, 107, 115, 44, 32, 102, 97, 108, 115, 101, 41, 41, 10, -101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, -114, 106, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 46, 109, 97, 107, 101, 46, 103, 101, 116, -109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 41, 10, 101, 110, 100, 10, 125, 10, 114, -101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 95, 65, 67, 84, - 73, 79, 78, 32, 61, 61, 32, 34, 103, 109, 97, 107, 101, 34, 41, 10, 101, 110, 100, 10, }; - -// gmake/gmake.lua -static const unsigned char builtin_script_68[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, -101, 32, 61, 32, 123, 125, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, - 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, 10, 112, 46, 109, 97, 107, 101, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, -103, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 32, 61, 32, 112, 46, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, -112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, -101, 46, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 101, 97, - 99, 104, 99, 111, 110, 102, 105, 103, 32, 61, 32, 105, 105, 102, 40, 116, 97, 114, 103, 101, 116, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 112, -114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 44, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 61, - 32, 110, 105, 108, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 46, 100, 101, 102, 97, 117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, -104, 101, 110, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, - 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 61, 32, 116, 97, 114, 103, 101, 116, 46, 100, -101, 102, 97, 117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, -103, 32, 61, 32, 99, 102, 103, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, - 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 116, 101, 114, 32, 61, - 32, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 10, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, -103, 32, 61, 32, 105, 116, 101, 114, 40, 41, 10, 101, 110, 100, 10, 105, 102, 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, -116, 104, 101, 110, 10, 95, 112, 40, 39, 105, 102, 110, 100, 101, 102, 32, 99, 111, 110, 102, 105, 103, 39, 41, 10, 95, 120, 40, 39, 32, 32, 99, -111, 110, 102, 105, 103, 61, 37, 115, 39, 44, 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 46, 115, 104, 111, 114, 116, 110, 97, -109, 101, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 34, 92, 92, 34, 44, 32, 34, 92, 92, 92, 92, 34, 41, 10, 114, 101, 115, 117, 108, 116, - 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 92, 34, 34, 44, 32, 34, 92, 92, 92, 34, 34, 41, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 32, 34, 44, 32, 34, 92, 92, 32, 34, 41, 10, 114, 101, -115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 37, 40, 34, 44, 32, 34, 92, 92, 40, 34, 41, 10, -114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 37, 41, 34, 44, 32, 34, 92, 92, 41, 34, - 41, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 36, 92, 92, 37, 40, 40, 46, 45, - 41, 92, 92, 37, 41, 34, 44, 32, 34, 36, 40, 37, 49, 41, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, - 40, 116, 104, 105, 115, 44, 32, 115, 101, 97, 114, 99, 104, 112, 114, 106, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 117, 110, 116, 32, 61, - 32, 48, 10, 102, 111, 114, 32, 119, 107, 115, 32, 105, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 101, 97, 99, 104, 87, 111, 114, 107, 115, -112, 97, 99, 101, 40, 41, 32, 100, 111, 10, 105, 102, 32, 119, 107, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 61, 32, 116, 104, 105, -115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 99, 111, 117, 110, 116, 32, 61, 32, 99, 111, 117, 110, 116, 32, 43, 32, - 49, 10, 101, 110, 100, 10, 105, 102, 32, 115, 101, 97, 114, 99, 104, 112, 114, 106, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, -112, 114, 106, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 119, 107, 115, 46, 112, 114, 111, 106, 101, 99, 116, 115, 41, 32, 100, 111, 10, 105, -102, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 61, 32, 116, 104, 105, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, -116, 104, 101, 110, 10, 99, 111, 117, 110, 116, 32, 61, 32, 99, 111, 117, 110, 116, 32, 43, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 111, 117, 110, 116, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 46, 109, 97, 107, 101, 34, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 104, 101, 97, 100, 101, 114, 40, 116, 97, 114, -103, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 61, 32, 105, 105, 102, 40, 116, 97, 114, 103, 101, 116, 46, 112, 114, 111, -106, 101, 99, 116, 44, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 41, 10, 95, 112, - 40, 39, 35, 32, 37, 115, 32, 37, 115, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 97, 117, 116, 111, 103, 101, 110, 101, 114, 97, 116, 101, 100, - 32, 98, 121, 32, 80, 114, 101, 109, 97, 107, 101, 39, 44, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, - 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 44, 32, 107, 105, 110, 100, 41, 10, 95, 112, 40, 39, 39, 41, 10, 105, 102, 32, 107, 105, 110, 100, - 32, 61, 61, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 112, 99, -104, 32, 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 95, 44, 32, 112, 114, 106, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 116, - 97, 114, 103, 101, 116, 46, 112, 114, 111, 106, 101, 99, 116, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, -111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, -112, 99, 104, 104, 101, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 104, 97, 115, 112, 99, 104, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 104, 97, 115, 112, 99, 104, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 46, 78, 79, 84, - 80, 65, 82, 65, 76, 76, 69, 76, 58, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 97, 107, 101, 46, -100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 10, 95, 112, 40, 39, 105, 102, 110, 100, 101, 102, - 32, 118, 101, 114, 98, 111, 115, 101, 39, 41, 10, 95, 112, 40, 39, 32, 32, 83, 73, 76, 69, 78, 84, 32, 61, 32, 64, 39, 41, 10, 95, 112, - 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, -107, 101, 46, 109, 107, 100, 105, 114, 40, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 112, 111, 115, 105, -120, 44, 36, 40, 83, 72, 69, 76, 76, 84, 89, 80, 69, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, - 41, 32, 109, 107, 100, 105, 114, 32, 45, 112, 32, 37, 115, 39, 44, 32, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 101, 108, 115, -101, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 109, 107, 100, 105, 114, 32, 36, 40, 115, 117, 98, 115, -116, 32, 47, 44, 92, 92, 92, 92, 44, 37, 115, 41, 39, 44, 32, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, -102, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 109, 107, 100, 105, 114, 82, 117, 108, 101, 115, - 40, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 37, 115, 58, 39, 44, 32, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, - 39, 92, 116, 64, 101, 99, 104, 111, 32, 67, 114, 101, 97, 116, 105, 110, 103, 32, 37, 115, 39, 44, 32, 100, 105, 114, 110, 97, 109, 101, 41, 10, -109, 97, 107, 101, 46, 109, 107, 100, 105, 114, 40, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 118, 97, 108, 117, 101, 44, 32, 113, 117, 111, 116, 101, 100, 41, - 10, 113, 117, 111, 116, 101, 100, 32, 61, 32, 102, 97, 108, 115, 101, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 105, 102, 32, 113, 117, 111, 116, 101, 100, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 34, 34, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 32, 40, 118, 97, 108, 117, 101, 41, 32, 100, -111, 10, 105, 102, 32, 35, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, -116, 32, 46, 46, 32, 34, 32, 34, 10, 101, 110, 100, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 32, 46, 46, 32, -112, 46, 113, 117, 111, 116, 101, 100, 40, 118, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 108, -115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 118, 97, -108, 117, 101, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 34, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 116, 111, 118, 97, 114, 40, 118, 97, 108, 117, 101, 41, 10, -118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 34, 91, 32, 45, 93, 34, 44, 32, 34, 95, 34, 41, 10, -118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 34, 91, 40, 41, 93, 34, 44, 32, 34, 34, 41, 10, 114, -101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 111, 98, -106, 100, 105, 114, 40, 99, 102, 103, 41, 10, 95, 120, 40, 39, 32, 32, 79, 66, 74, 68, 73, 82, 32, 61, 32, 37, 115, 39, 44, 32, 112, 46, -101, 115, 99, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 44, 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 97, 107, 101, 46, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 109, 97, 107, 101, 46, 109, 107, 100, 105, 114, - 82, 117, 108, 101, 115, 40, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 97, 107, 101, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 46, 80, 72, 79, 78, 89, 58, - 32, 99, 108, 101, 97, 110, 32, 112, 114, 101, 98, 117, 105, 108, 100, 32, 112, 114, 101, 108, 105, 110, 107, 39, 41, 10, 95, 112, 40, 39, 39, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, - 44, 32, 101, 118, 101, 110, 116, 41, 10, 95, 112, 40, 39, 32, 32, 100, 101, 102, 105, 110, 101, 32, 37, 115, 67, 77, 68, 83, 39, 44, 32, 101, -118, 101, 110, 116, 58, 117, 112, 112, 101, 114, 40, 41, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 91, -101, 118, 101, 110, 116, 32, 46, 46, 32, 34, 99, 111, 109, 109, 97, 110, 100, 115, 34, 93, 10, 108, 111, 99, 97, 108, 32, 109, 115, 103, 32, 61, - 32, 99, 102, 103, 91, 101, 118, 101, 110, 116, 32, 46, 46, 32, 34, 109, 101, 115, 115, 97, 103, 101, 34, 93, 10, 105, 102, 32, 35, 115, 116, 101, -112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, - 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, -110, 41, 10, 109, 115, 103, 32, 61, 32, 109, 115, 103, 32, 111, 114, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 82, -117, 110, 110, 105, 110, 103, 32, 37, 115, 32, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 32, 101, 118, 101, 110, 116, 41, 10, 95, 112, 40, 39, - 92, 116, 64, 101, 99, 104, 111, 32, 37, 115, 39, 44, 32, 109, 115, 103, 41, 10, 95, 112, 40, 39, 92, 116, 37, 115, 39, 44, 32, 116, 97, 98, -108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 110, 92, 116, 34, - 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 32, 32, 101, 110, 100, 101, 102, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 109, 97, 107, 101, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 34, 112, 114, 101, 98, 117, 105, 108, 100, 34, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, 108, 100, 82, 117, 108, 101, -115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 112, 114, 101, 98, 117, 105, 108, 100, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, - 82, 69, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 97, 107, 101, 46, 112, 114, 101, 76, 105, 110, 107, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 109, 97, 107, 101, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 34, 112, 114, 101, 108, 105, 110, 107, 34, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 112, 114, 101, 76, 105, 110, 107, 82, 117, 108, 101, 115, 40, -112, 114, 106, 41, 10, 95, 112, 40, 39, 112, 114, 101, 108, 105, 110, 107, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 82, 69, 76, - 73, 78, 75, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 97, 107, 101, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, -109, 97, 107, 101, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 34, 112, 111, 115, 116, 98, 117, 105, 108, 100, 34, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 32, 62, - 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, -102, 103, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 100, 111, 10, 95, 112, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 109, - 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 95, -112, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 115, -104, 101, 108, 108, 84, 121, 112, 101, 40, 41, 10, 95, 112, 40, 39, 83, 72, 69, 76, 76, 84, 89, 80, 69, 32, 58, 61, 32, 112, 111, 115, 105, -120, 39, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 46, 101, 120, 101, 44, 36, 40, 102, 105, 110, 100, 115, 116, 114, 105, 110, 103, 32, - 46, 101, 120, 101, 44, 36, 40, 67, 111, 109, 83, 112, 101, 99, 41, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 83, 72, 69, 76, 76, 84, - 89, 80, 69, 32, 58, 61, 32, 109, 115, 100, 111, 115, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 40, 99, 102, 103, 41, 10, - 95, 120, 40, 39, 32, 32, 84, 65, 82, 71, 69, 84, 68, 73, 82, 32, 61, 32, 37, 115, 39, 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, -101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, -100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 41, 41, 10, 95, 120, 40, 39, 32, 32, 84, 65, 82, 71, 69, 84, - 32, 61, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 47, 37, 115, 39, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, -114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 116, 97, 114, -103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 109, 97, 107, 101, 46, 109, 107, 100, 105, 114, 82, 117, 108, 101, 115, - 40, 34, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 34, 41, 10, 101, 110, 100, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, - 97, 107, 101, 95, 99, 112, 112, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 95, 99, 115, 104, - 97, 114, 112, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 95, 109, 97, 107, 101, 102, 105, 108, -101, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 95, 117, 116, 105, 108, 105, 116, 121, 46, 108, -117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 95, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 108, 117, - 97, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 10, }; - -// gmake/gmake_cpp.lua -static const unsigned char builtin_script_69[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 97, 107, 101, 46, 99, 112, 112, 32, 61, 32, 123, -125, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 32, 61, 32, 112, 46, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 99, 112, 112, 32, - 61, 32, 112, 46, 109, 97, 107, 101, 46, 99, 112, 112, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, -111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 99, -112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, -107, 101, 102, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, -109, 97, 107, 101, 46, 104, 101, 97, 100, 101, 114, 44, 10, 109, 97, 107, 101, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 44, 10, 109, 97, -107, 101, 46, 99, 112, 112, 67, 111, 110, 102, 105, 103, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 79, 98, 106, 101, 99, 116, 115, 44, 10, -109, 97, 107, 101, 46, 115, 104, 101, 108, 108, 84, 121, 112, 101, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 84, 97, 114, 103, 101, 116, 82, 117, -108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 67, 117, 115, 116, 111, 109, 70, 105, 108, 101, 115, 82, 117, 108, 101, 115, 44, 10, 109, - 97, 107, 101, 46, 99, 112, 112, 84, 97, 114, 103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 79, - 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 67, 108, 101, 97, 110, 82, 117, 108, 101, 115, 44, 10, -109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, 108, 100, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 76, 105, 110, 107, - 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 112, 99, 104, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 70, 105, -108, 101, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 125, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 69, 120, 116, 101, 110, -115, 105, 111, 110, 115, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 91, 34, 111, 98, 106, 101, 99, 116, 115, 34, 93, 32, 61, 32, 34, -111, 34, 44, 10, 91, 34, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 93, 32, 61, 32, 34, 114, 101, 115, 34, 44, 10, 125, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 40, 110, 111, 100, 101, 41, 10, 108, 111, - 99, 97, 108, 32, 107, 105, 110, 100, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, 40, 110, 111, 100, 101, 46, - 97, 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 111, 98, 106, 101, 99, 116, 115, 34, 10, 101, -108, 115, 101, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 40, 110, 111, 100, 101, 46, 97, - 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 107, 105, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, -101, 46, 102, 105, 108, 101, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, -108, 32, 102, 105, 108, 101, 116, 121, 112, 101, 32, 61, 32, 109, 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 40, 110, 111, 100, 101, 41, - 10, 95, 120, 40, 39, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 37, 115, 46, 37, 115, 58, 32, 37, 115, 39, 44, 32, 110, 111, 100, 101, 46, -111, 98, 106, 110, 97, 109, 101, 44, 32, 109, 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, - 40, 41, 91, 102, 105, 108, 101, 116, 121, 112, 101, 93, 44, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 95, 112, 40, 39, - 92, 116, 64, 101, 99, 104, 111, 32, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 60, 41, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, - 40, 34, 92, 110, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 101, 110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -115, 116, 97, 110, 100, 97, 114, 100, 70, 105, 108, 101, 82, 117, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, - 44, 32, 110, 111, 100, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 97, 107, 101, 46, 102, 105, 108, 101, 68, 101, 112, 101, 110, 100, -101, 110, 99, 121, 44, 10, 99, 112, 112, 46, 115, 116, 97, 110, 100, 97, 114, 100, 70, 105, 108, 101, 82, 117, 108, 101, 115, 44, 10, 125, 10, 101, -110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 117, 115, 116, 111, 109, 70, 105, 108, 101, 82, 117, 108, 101, 115, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, - 97, 107, 101, 46, 102, 105, 108, 101, 68, 101, 112, 101, 110, 100, 101, 110, 99, 121, 44, 10, 99, 112, 112, 46, 99, 117, 115, 116, 111, 109, 70, 105, -108, 101, 82, 117, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 117, 115, 116, -111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 110, 111, 100, -101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 99, 112, 112, 46, 99, 117, 115, 116, 111, 109, 70, 105, 108, 101, 82, 117, 108, 101, 115, 10, -125, 10, 101, 110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 66, 101, 103, 105, 110, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 84, 111, 111, -108, 115, 44, 10, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 44, 10, 109, 97, 107, 101, 46, 111, 98, 106, 100, 105, 114, 44, 10, 109, 97, -107, 101, 46, 112, 99, 104, 44, 10, 109, 97, 107, 101, 46, 100, 101, 102, 105, 110, 101, 115, 44, 10, 109, 97, 107, 101, 46, 105, 110, 99, 108, 117, -100, 101, 115, 44, 10, 109, 97, 107, 101, 46, 102, 111, 114, 99, 101, 73, 110, 99, 108, 117, 100, 101, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, - 70, 108, 97, 103, 115, 44, 10, 109, 97, 107, 101, 46, 99, 70, 108, 97, 103, 115, 44, 10, 109, 97, 107, 101, 46, 99, 120, 120, 70, 108, 97, 103, -115, 44, 10, 109, 97, 107, 101, 46, 114, 101, 115, 70, 108, 97, 103, 115, 44, 10, 109, 97, 107, 101, 46, 108, 105, 98, 115, 44, 10, 109, 97, 107, -101, 46, 108, 100, 68, 101, 112, 115, 44, 10, 109, 97, 107, 101, 46, 108, 100, 70, 108, 97, 103, 115, 44, 10, 109, 97, 107, 101, 46, 108, 105, 110, -107, 67, 109, 100, 44, 10, 109, 97, 107, 101, 46, 101, 120, 101, 80, 97, 116, 104, 115, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, -108, 100, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 76, 105, 110, 107, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 112, -111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 65, 108, 108, 82, 117, 108, 101, 115, 44, 10, -109, 97, 107, 101, 46, 115, 101, 116, 116, 105, 110, 103, 115, 44, 10, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 69, 110, 100, 44, 10, 125, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 67, 111, 110, 102, 105, 103, 115, 40, 112, 114, -106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, - 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, - 91, 95, 79, 80, 84, 73, 79, 78, 83, 46, 99, 99, 32, 111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 34, -103, 99, 99, 34, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, - 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, 111, 108, 115, 101, 116, 32, 39, 34, 32, 46, 46, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, -101, 116, 32, 46, 46, 32, 34, 39, 34, 41, 10, 101, 110, 100, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 112, 112, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, -115, 101, 116, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, -101, 46, 101, 120, 101, 80, 97, 116, 104, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, -103, 46, 98, 105, 110, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, - 39, 32, 32, 69, 88, 69, 67, 85, 84, 65, 66, 76, 69, 95, 80, 65, 84, 72, 83, 32, 61, 32, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 58, 34, 41, 41, 10, 95, 112, 40, 39, 32, 32, 69, 88, 69, 95, - 80, 65, 84, 72, 83, 32, 61, 32, 101, 120, 112, 111, 114, 116, 32, 80, 65, 84, 72, 61, 36, 40, 69, 88, 69, 67, 85, 84, 65, 66, 76, 69, - 95, 80, 65, 84, 72, 83, 41, 58, 36, 36, 80, 65, 84, 72, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 112, 112, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, -108, 32, 114, 101, 115, 117, 108, 116, 10, 105, 102, 32, 110, 111, 100, 101, 91, 34, 99, 111, 109, 112, 105, 108, 101, 97, 115, 34, 93, 32, 116, 104, -101, 110, 10, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, 110, 111, 100, 101, 46, 99, 111, 109, 112, 105, -108, 101, 97, 115, 41, 32, 111, 114, 32, 110, 111, 100, 101, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 32, 61, 61, 32, 112, 46, 79, 66, 74, - 69, 67, 84, 73, 86, 69, 67, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 39, 36, 40, 67, 67, 41, 32, 36, 40, 65, - 76, 76, 95, 67, 70, 76, 65, 71, 83, 41, 39, 10, 101, 108, 115, 101, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, -115, 99, 112, 112, 40, 110, 111, 100, 101, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 41, 32, 111, 114, 32, 110, 111, 100, 101, 46, 99, 111, 109, -112, 105, 108, 101, 97, 115, 32, 61, 61, 32, 112, 46, 79, 66, 74, 69, 67, 84, 73, 86, 69, 67, 80, 80, 32, 116, 104, 101, 110, 10, 114, 101, -115, 117, 108, 116, 32, 61, 32, 39, 36, 40, 67, 88, 88, 41, 32, 36, 40, 65, 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 41, 39, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 112, 112, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 40, 112, 114, 106, 44, 32, 111, 98, 106, 101, 120, 116, 44, - 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 112, 112, 46, 99, 111, 109, 112, 105, 108, 101, - 97, 115, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 108, 97, 103, 115, 32, 116, 104, 101, 110, 10, -108, 111, 99, 97, 108, 32, 105, 115, 99, 102, 105, 108, 101, 32, 61, 32, 110, 111, 100, 101, 32, 97, 110, 100, 32, 112, 97, 116, 104, 46, 105, 115, - 99, 102, 105, 108, 101, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 111, 114, 32, 102, 97, 108, 115, 101, 10, 102, 108, 97, -103, 115, 32, 61, 32, 105, 105, 102, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 61, 32, 34, 67, 34, 32, 111, 114, 32, -105, 115, 99, 102, 105, 108, 101, 44, 32, 39, 36, 40, 67, 67, 41, 32, 36, 40, 65, 76, 76, 95, 67, 70, 76, 65, 71, 83, 41, 39, 44, 32, - 39, 36, 40, 67, 88, 88, 41, 32, 36, 40, 65, 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 41, 39, 41, 10, 101, 110, 100, 10, 95, 112, - 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 37, 115, 32, 36, 40, 70, 79, 82, 67, 69, 95, 73, 78, 67, 76, 85, 68, 69, - 41, 32, 45, 111, 32, 34, 36, 64, 34, 32, 45, 77, 70, 32, 34, 36, 40, 64, 58, 37, 37, 46, 37, 115, 61, 37, 37, 46, 100, 41, 34, 32, - 45, 99, 32, 34, 36, 60, 34, 39, 44, 32, 102, 108, 97, 103, 115, 44, 32, 111, 98, 106, 101, 120, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, - 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, -106, 41, 10, 112, 46, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 114, 117, -108, 101, 115, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, -103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, -110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, -101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, -102, 103, 41, 32, 116, 104, 101, 110, 10, 114, 117, 108, 101, 115, 32, 61, 32, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 117, -115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 98, 114, 101, 97, 107, 10, -101, 110, 100, 10, 105, 102, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 83, 101, 116, 116, 105, 110, 103, -115, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 114, 117, 108, 101, 115, 32, 61, 32, 99, 112, 112, 46, 101, 108, 101, 109, -101, 110, 116, 115, 46, 99, 117, 115, 116, 111, 109, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, - 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 117, 108, 101, 115, 32, 97, 110, 100, 32, 109, - 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 40, 110, 111, 100, 101, 41, 32, 116, 104, 101, 110, 10, 114, 117, 108, 101, 115, 32, 61, 32, - 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 115, 116, 97, 110, 100, 97, 114, 100, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, -114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 114, 117, 108, 101, 115, 32, 116, 104, 101, 110, 10, 112, 46, 99, 97, -108, 108, 65, 114, 114, 97, 121, 40, 114, 117, 108, 101, 115, 44, 32, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 125, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 115, 116, 97, -110, 100, 97, 114, 100, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, -107, 105, 110, 100, 32, 61, 32, 109, 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 107, 105, -110, 100, 32, 61, 61, 32, 34, 111, 98, 106, 101, 99, 116, 115, 34, 32, 116, 104, 101, 110, 10, 99, 112, 112, 46, 98, 117, 105, 108, 100, 99, 111, -109, 109, 97, 110, 100, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, 46, 102, 105, 108, 101, 84, 121, 112, 101, 69, 120, 116, 101, 110, 115, 105, 111, -110, 115, 40, 41, 91, 107, 105, 110, 100, 93, 44, 32, 110, 111, 100, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 107, 105, 110, 100, 32, 61, 61, - 32, 34, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, - 41, 32, 36, 40, 82, 69, 83, 67, 79, 77, 80, 41, 32, 36, 60, 32, 45, 79, 32, 99, 111, 102, 102, 32, 45, 111, 32, 34, 36, 64, 34, 32, - 36, 40, 65, 76, 76, 95, 82, 69, 83, 70, 76, 65, 71, 83, 41, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 112, 112, 46, 99, 117, 115, 116, 111, 109, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, - 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, -112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, -102, 103, 32, 116, 104, 101, 110, 10, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 66, 101, 103, 105, 110, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, -105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 112, 117, 116, 32, 61, 32, 112, 114, 111, 106, -101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, -108, 100, 111, 117, 116, 112, 117, 116, 115, 91, 49, 93, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, - 32, 61, 32, 102, 105, 108, 101, 99, 102, 103, 46, 114, 101, 108, 112, 97, 116, 104, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, -105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, -116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 110, 112, 117, 116, 115, 32, 61, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, -100, 105, 110, 112, 117, 116, 115, 41, 10, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 61, 32, 100, 101, 112, 101, 110, 100, 101, 110, - 99, 105, 101, 115, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, - 99, 40, 105, 110, 112, 117, 116, 115, 41, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 37, 115, 58, 32, 37, 115, 39, 44, - 32, 111, 117, 116, 112, 117, 116, 44, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, -104, 111, 32, 34, 37, 115, 34, 39, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 111, -114, 32, 40, 34, 66, 117, 105, 108, 100, 105, 110, 103, 32, 34, 32, 46, 46, 32, 102, 105, 108, 101, 99, 102, 103, 46, 114, 101, 108, 112, 97, 116, -104, 41, 41, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, -109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, -110, 100, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, -111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 109, 100, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 99, 109, 100, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 32, 97, 110, 100, - 32, 35, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, - 73, 76, 69, 78, 84, 41, 32, 36, 40, 69, 88, 69, 95, 80, 65, 84, 72, 83, 41, 32, 37, 115, 39, 44, 32, 99, 109, 100, 41, 10, 101, 108, -115, 101, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 37, 115, 39, 44, 32, 99, 109, 100, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 99, 112, 112, 46, 115, 116, 97, 110, 100, 97, 114, 100, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, -112, 114, 106, 44, 32, 102, 105, 108, 101, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 69, 110, 100, - 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, - 99, 112, 112, 79, 98, 106, 101, 99, 116, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 114, 111, 111, 116, 32, 61, 32, 123, 32, 111, - 98, 106, 101, 99, 116, 115, 61, 123, 125, 44, 32, 114, 101, 115, 111, 117, 114, 99, 101, 115, 61, 123, 125, 44, 32, 99, 117, 115, 116, 111, 109, 102, -105, 108, 101, 115, 61, 123, 125, 32, 125, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, - 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, -100, 111, 10, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, 32, 61, 32, 123, 32, 111, 98, 106, 101, 99, 116, 115, 61, 123, 125, 44, 32, -114, 101, 115, 111, 117, 114, 99, 101, 115, 61, 123, 125, 44, 32, 99, 117, 115, 116, 111, 109, 102, 105, 108, 101, 115, 61, 123, 125, 32, 125, 10, 101, -110, 100, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, -114, 101, 101, 40, 112, 114, 106, 41, 10, 112, 46, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, -110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 108, 111, - 99, 97, 108, 32, 105, 110, 99, 102, 103, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 105, 110, 97, 108, 108, 32, 61, 32, 116, 114, 117, -101, 10, 108, 111, 99, 97, 108, 32, 99, 117, 115, 116, 111, 109, 32, 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, -110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, - 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, -103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 97, 110, 100, 32, 110, 111, 116, 32, -102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, -104, 101, 110, 10, 105, 110, 99, 102, 103, 91, 99, 102, 103, 93, 32, 61, 32, 102, 105, 108, 101, 99, 102, 103, 10, 99, 117, 115, 116, 111, 109, 32, - 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, -102, 105, 108, 101, 99, 102, 103, 41, 10, 101, 108, 115, 101, 10, 105, 110, 97, 108, 108, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, -101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 99, 117, 115, 116, 111, 109, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, -100, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, - 41, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 111, 98, 106, 101, 99, 116, 115, 34, 10, 101, 108, 115, 101, 105, 102, 32, 112, - 97, 116, 104, 46, 105, 115, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, - 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 10, 101, 110, 100, 10, 105, 102, 32, -110, 111, 116, 32, 99, 117, 115, 116, 111, 109, 32, 97, 110, 100, 32, 110, 111, 116, 32, 107, 105, 110, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 10, 101, 110, 100, 10, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 32, 61, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, - 34, 32, 46, 46, 32, 110, 111, 100, 101, 46, 111, 98, 106, 110, 97, 109, 101, 32, 46, 46, 32, 105, 105, 102, 40, 107, 105, 110, 100, 32, 61, 61, - 32, 34, 111, 98, 106, 101, 99, 116, 115, 34, 44, 32, 34, 46, 111, 34, 44, 32, 34, 46, 114, 101, 115, 34, 41, 10, 105, 102, 32, 105, 110, 97, -108, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 111, 111, 116, 91, 107, 105, 110, 100, 93, 44, - 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, -106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 105, 110, 99, 102, 103, - 91, 99, 102, 103, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 115, 91, - 99, 102, 103, 93, 91, 107, 105, 110, 100, 93, 44, 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, - 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 105, -110, 99, 102, 103, 91, 99, 102, 103, 93, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -111, 117, 116, 112, 117, 116, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, - 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 91, 49, 93, 41, 10, 105, 102, 32, 112, 97, -116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 111, 117, 116, 112, 117, 116, 41, 32, 97, 110, 100, 32, 40, 102, 105, 108, -101, 99, 102, 103, 46, 108, 105, 110, 107, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 61, 32, 116, 114, 117, 101, 32, 111, 114, - 32, 102, 105, 108, 101, 99, 102, 103, 46, 108, 105, 110, 107, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 61, 32, 110, 105, 108, - 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, - 46, 111, 98, 106, 101, 99, 116, 115, 44, 32, 111, 117, 116, 112, 117, 116, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, -101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, 46, 99, 117, 115, 116, 111, 109, 102, 105, 108, 101, 115, 44, 32, 111, 117, -116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 118, 97, 114, 44, 32, 108, 105, 115, 116, 41, 10, 95, 112, 40, - 39, 37, 115, 32, 92, 92, 39, 44, 32, 118, 97, 114, 41, 10, 102, 111, 114, 32, 95, 44, 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 32, -105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 115, 116, 41, 32, 100, 111, 10, 95, 120, 40, 39, 92, 116, 37, 115, 32, 92, 92, 39, 44, - 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 108, 105, 115, 116, -111, 98, 106, 101, 99, 116, 115, 40, 39, 79, 66, 74, 69, 67, 84, 83, 32, 58, 61, 39, 44, 32, 114, 111, 111, 116, 46, 111, 98, 106, 101, 99, -116, 115, 44, 32, 39, 111, 39, 41, 10, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 39, 82, 69, 83, 79, 85, 82, 67, 69, 83, 32, - 58, 61, 39, 44, 32, 114, 111, 111, 116, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 44, 32, 39, 114, 101, 115, 39, 41, 10, 108, 105, 115, 116, -111, 98, 106, 101, 99, 116, 115, 40, 39, 67, 85, 83, 84, 79, 77, 70, 73, 76, 69, 83, 32, 58, 61, 39, 44, 32, 114, 111, 111, 116, 46, 99, -117, 115, 116, 111, 109, 102, 105, 108, 101, 115, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, - 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, 10, 105, 102, 32, 35, 102, 105, 108, 101, 115, 46, 111, 98, 106, 101, 99, 116, 115, 32, 62, - 32, 48, 32, 111, 114, 32, 35, 102, 105, 108, 101, 115, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 32, 62, 32, 48, 32, 111, 114, 32, 35, 102, -105, 108, 101, 115, 46, 99, 117, 115, 116, 111, 109, 102, 105, 108, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 97, 107, 101, 46, 99, -111, 110, 102, 105, 103, 66, 101, 103, 105, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 35, 102, 105, 108, -101, 115, 46, 111, 98, 106, 101, 99, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, - 39, 32, 32, 79, 66, 74, 69, 67, 84, 83, 32, 43, 61, 39, 44, 32, 102, 105, 108, 101, 115, 46, 111, 98, 106, 101, 99, 116, 115, 41, 10, 101, -110, 100, 10, 105, 102, 32, 35, 102, 105, 108, 101, 115, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 39, 32, 32, 82, 69, 83, 79, 85, 82, 67, 69, 83, 32, 43, 61, 39, 44, 32, 102, 105, -108, 101, 115, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 102, 105, 108, 101, 115, 46, 99, 117, 115, -116, 111, 109, 102, 105, 108, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 39, 32, - 32, 67, 85, 83, 84, 79, 77, 70, 73, 76, 69, 83, 32, 43, 61, 39, 44, 32, 102, 105, 108, 101, 115, 46, 99, 117, 115, 116, 111, 109, 102, 105, -108, 101, 115, 41, 10, 101, 110, 100, 10, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 69, 110, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 66, 101, 103, 105, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, - 10, 105, 102, 32, 99, 102, 103, 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, - 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 69, 110, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, -101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 65, 76, 76, 95, 67, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 67, 70, 76, - 65, 71, 83, 41, 32, 36, 40, 65, 76, 76, 95, 67, 80, 80, 70, 76, 65, 71, 83, 41, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, -115, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 40, - 99, 102, 103, 41, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 65, 108, 108, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 77, 65, 67, 79, 83, 88, 32, - 97, 110, 100, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 69, 68, 65, 80, 80, 32, 116, 104, -101, 110, 10, 95, 112, 40, 39, 97, 108, 108, 58, 32, 112, 114, 101, 98, 117, 105, 108, 100, 32, 112, 114, 101, 108, 105, 110, 107, 32, 36, 40, 84, - 65, 82, 71, 69, 84, 41, 32, 36, 40, 100, 105, 114, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 41, 80, 107, 103, 73, 110, 102, -111, 32, 36, 40, 100, 105, 114, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 41, 73, 110, 102, 111, 46, 112, 108, 105, 115, 116, 39, - 41, 10, 95, 112, 40, 39, 92, 116, 64, 58, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 95, 112, 40, 39, 36, 40, 100, 105, 114, 32, 36, 40, - 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 41, 80, 107, 103, 73, 110, 102, 111, 58, 39, 41, 10, 95, 112, 40, 39, 36, 40, 100, 105, 114, 32, - 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 41, 73, 110, 102, 111, 46, 112, 108, 105, 115, 116, 58, 39, 41, 10, 101, 108, 115, 101, 10, - 95, 112, 40, 39, 97, 108, 108, 58, 32, 112, 114, 101, 98, 117, 105, 108, 100, 32, 112, 114, 101, 108, 105, 110, 107, 32, 36, 40, 84, 65, 82, 71, - 69, 84, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 58, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, - 40, 39, 32, 32, 65, 76, 76, 95, 67, 80, 80, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 67, 80, 80, 70, 76, 65, 71, 83, 41, 37, -115, 32, 36, 40, 68, 69, 70, 73, 78, 69, 83, 41, 32, 36, 40, 73, 78, 67, 76, 85, 68, 69, 83, 41, 39, 44, 32, 109, 97, 107, 101, 46, -108, 105, 115, 116, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 112, 112, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 41, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 120, 120, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, -116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 65, 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, - 40, 67, 88, 88, 70, 76, 65, 71, 83, 41, 32, 36, 40, 65, 76, 76, 95, 67, 80, 80, 70, 76, 65, 71, 83, 41, 37, 115, 39, 44, 32, 109, - 97, 107, 101, 46, 108, 105, 115, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, -120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 41, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 67, 108, 101, 97, 110, 82, 117, 108, 101, -115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, - 67, 108, 101, 97, 110, 105, 110, 103, 32, 37, 115, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, - 32, 40, 112, 111, 115, 105, 120, 44, 36, 40, 83, 72, 69, 76, 76, 84, 89, 80, 69, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, - 83, 73, 76, 69, 78, 84, 41, 32, 114, 109, 32, 45, 102, 32, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, 41, 10, 95, 112, 40, 39, 92, -116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 114, 109, 32, 45, 114, 102, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, - 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 105, 102, 32, 101, 120, 105, 115, -116, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 36, 40, 84, 65, 82, 71, 69, 84, 41, 41, 32, 100, 101, 108, 32, - 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 36, 40, 84, 65, 82, 71, 69, 84, 41, 41, 39, 41, 10, 95, 112, 40, 39, - 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 105, 102, 32, 101, 120, 105, 115, 116, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, - 92, 92, 92, 44, 36, 40, 79, 66, 74, 68, 73, 82, 41, 41, 32, 114, 109, 100, 105, 114, 32, 47, 115, 32, 47, 113, 32, 36, 40, 115, 117, 98, -115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 36, 40, 79, 66, 74, 68, 73, 82, 41, 41, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, - 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 68, -101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 45, 105, 110, 99, 108, 117, 100, 101, 32, 36, 40, - 79, 66, 74, 69, 67, 84, 83, 58, 37, 37, 46, 111, 61, 37, 37, 46, 100, 41, 39, 41, 10, 95, 112, 40, 39, 105, 102, 110, 101, 113, 32, 40, - 44, 36, 40, 80, 67, 72, 41, 41, 39, 41, 10, 95, 112, 40, 39, 32, 32, 45, 105, 110, 99, 108, 117, 100, 101, 32, 36, 40, 79, 66, 74, 68, - 73, 82, 41, 47, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 40, 80, 67, 72, 41, 41, 46, 100, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, -105, 102, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 84, 97, 114, 103, 101, 116, - 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 32, 36, 40, 71, 67, 72, 41, - 32, 36, 123, 67, 85, 83, 84, 79, 77, 70, 73, 76, 69, 83, 125, 32, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 32, 36, 40, 76, 68, 68, - 69, 80, 83, 41, 32, 36, 40, 82, 69, 83, 79, 85, 82, 67, 69, 83, 41, 32, 124, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, - 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 76, 105, 110, 107, 105, 110, 103, 32, 37, 115, 39, 44, 32, 112, 114, 106, 46, -110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 76, 73, 78, 75, 67, 77, 68, 41, - 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 67, 117, 115, 116, 111, 109, 70, 105, -108, 101, 115, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 67, 85, 83, 84, 79, 77, 70, 73, 76, 69, 83, 41, - 58, 32, 124, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 84, 97, 114, 103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, - 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, - 67, 114, 101, 97, 116, 105, 110, 103, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 39, 41, 10, 109, 97, 107, 101, 46, 109, 107, 100, -105, 114, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 112, 112, 79, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, - 95, 112, 40, 39, 36, 40, 79, 66, 74, 68, 73, 82, 41, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 67, 114, 101, - 97, 116, 105, 110, 103, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 109, 97, 107, 101, 46, 109, 107, 100, 105, 114, 40, 39, 36, 40, - 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, -107, 101, 46, 99, 112, 112, 84, 111, 111, 108, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, -116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, - 34, 99, 99, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 105, 102, 101, 113, 32, 40, 36, - 40, 111, 114, 105, 103, 105, 110, 32, 67, 67, 41, 44, 32, 100, 101, 102, 97, 117, 108, 116, 41, 39, 41, 10, 95, 112, 40, 39, 32, 32, 32, 32, - 67, 67, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 95, 112, 40, 39, 32, 32, 101, 110, 100, 105, 102, 39, 32, 41, 10, 101, -110, 100, 10, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, -103, 44, 32, 34, 99, 120, 120, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 105, 102, 101, -113, 32, 40, 36, 40, 111, 114, 105, 103, 105, 110, 32, 67, 88, 88, 41, 44, 32, 100, 101, 102, 97, 117, 108, 116, 41, 39, 41, 10, 95, 112, 40, - 39, 32, 32, 32, 32, 67, 88, 88, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 95, 112, 40, 39, 32, 32, 101, 110, 100, 105, -102, 39, 32, 41, 10, 101, 110, 100, 10, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, - 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 97, 114, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, - 32, 32, 105, 102, 101, 113, 32, 40, 36, 40, 111, 114, 105, 103, 105, 110, 32, 65, 82, 41, 44, 32, 100, 101, 102, 97, 117, 108, 116, 41, 39, 41, - 10, 95, 112, 40, 39, 32, 32, 32, 32, 65, 82, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 95, 112, 40, 39, 32, 32, 101, -110, 100, 105, 102, 39, 32, 41, 10, 101, 110, 100, 10, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, -111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 114, 99, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, -112, 40, 39, 32, 32, 82, 69, 83, 67, 79, 77, 80, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 100, 101, 102, 105, 110, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 68, 69, 70, 73, 78, 69, 83, 32, 43, 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, -108, 105, 115, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 100, 101, 102, 105, 110, -101, 115, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 44, 32, 99, 102, 103, 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, -116, 117, 110, 100, 101, 102, 105, 110, 101, 115, 40, 99, 102, 103, 46, 117, 110, 100, 101, 102, 105, 110, 101, 115, 41, 41, 41, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 102, 111, 114, 99, 101, 73, 110, 99, 108, 117, 100, 101, 40, 99, 102, 103, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, 117, 100, 101, 115, 32, 61, 32, 116, 111, 111, 108, 115, -101, 116, 46, 103, 101, 116, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, - 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 97, 110, 100, 32, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, -114, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 105, 110, 99, 108, 117, 100, 101, 115, 44, 32, 49, 44, - 32, 34, 45, 105, 110, 99, 108, 117, 100, 101, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 40, - 80, 67, 72, 41, 41, 34, 41, 10, 101, 110, 100, 10, 95, 120, 40, 39, 32, 32, 70, 79, 82, 67, 69, 95, 73, 78, 67, 76, 85, 68, 69, 32, - 43, 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 105, 110, 99, 108, 117, 100, 101, 115, 41, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, -115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, 117, 100, 101, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, -116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, -115, 44, 32, 99, 102, 103, 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 95, 112, 40, 39, 32, 32, 73, 78, 67, - 76, 85, 68, 69, 83, 32, 43, 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 105, 110, 99, 108, 117, 100, 101, 115, 41, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 108, 100, 68, 101, 112, 115, 40, 99, 102, 103, 44, 32, -116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, -108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, - 34, 41, 10, 95, 112, 40, 39, 32, 32, 76, 68, 68, 69, 80, 83, 32, 43, 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, - 40, 112, 46, 101, 115, 99, 40, 100, 101, 112, 115, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, - 46, 108, 100, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, -103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 76, 105, 98, 114, 97, -114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 114, -117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 41, - 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, 32, 99, 102, 103, 46, 108, -105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 41, 10, 95, 112, 40, 39, 32, 32, 65, 76, 76, 95, 76, 68, 70, 76, 65, 71, 83, 32, 43, 61, - 32, 36, 40, 76, 68, 70, 76, 65, 71, 83, 41, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 102, 108, 97, 103, 115, 41, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 108, 105, 98, 115, 40, 99, 102, 103, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, -108, 105, 110, 107, 115, 40, 99, 102, 103, 41, 10, 95, 112, 40, 39, 32, 32, 76, 73, 66, 83, 32, 43, 61, 37, 115, 39, 44, 32, 109, 97, 107, -101, 46, 108, 105, 115, 116, 40, 102, 108, 97, 103, 115, 44, 32, 116, 114, 117, 101, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 97, 107, 101, 46, 108, 105, 110, 107, 67, 109, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 105, 102, 32, - 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 112, 46, 85, 78, 73, 86, 69, 82, 83, 65, 76, 32, -116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 76, 73, 78, 75, 67, 77, 68, 32, 61, 32, 108, 105, 98, 116, 111, 111, 108, 32, 45, 111, 32, - 34, 36, 64, 34, 32, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 39, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 32, 32, 76, 73, 78, - 75, 67, 77, 68, 32, 61, 32, 36, 40, 65, 82, 41, 32, 39, 32, 46, 46, 32, 40, 116, 111, 111, 108, 115, 101, 116, 46, 97, 114, 97, 114, 103, -115, 32, 111, 114, 32, 39, 45, 114, 99, 115, 39, 41, 32, 46, 46, 39, 32, 34, 36, 64, 34, 32, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, - 39, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 85, 84, 73, 76, - 73, 84, 89, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 76, 73, 78, 75, 67, 77, 68, 32, 61, 39, 41, 10, 101, 108, 115, 101, 10, -108, 111, 99, 97, 108, 32, 99, 99, 32, 61, 32, 105, 105, 102, 40, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, 99, -102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 44, 32, 34, 67, 67, 34, 44, 32, 34, 67, 88, 88, 34, 41, 10, 95, 112, 40, 39, 32, - 32, 76, 73, 78, 75, 67, 77, 68, 32, 61, 32, 36, 40, 37, 115, 41, 32, 45, 111, 32, 34, 36, 64, 34, 32, 36, 40, 79, 66, 74, 69, 67, - 84, 83, 41, 32, 36, 40, 82, 69, 83, 79, 85, 82, 67, 69, 83, 41, 32, 36, 40, 65, 76, 76, 95, 76, 68, 70, 76, 65, 71, 83, 41, 32, - 36, 40, 76, 73, 66, 83, 41, 39, 44, 32, 99, 99, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 97, 107, 101, 46, 112, 99, 104, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, - 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 99, 104, 32, 61, 32, 99, 102, 103, 46, 112, 99, -104, 104, 101, 97, 100, 101, 114, 10, 108, 111, 99, 97, 108, 32, 102, 111, 117, 110, 100, 32, 61, 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, 97, -108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, - 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 112, 99, 104, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 116, 101, -115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 112, 99, 104, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 10, 102, 111, -117, 110, 100, 32, 61, 32, 116, 114, 117, 101, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 95, 44, 32, 105, 110, 99, 100, 105, 114, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 32, 100, 111, 10, 116, 101, 115, 116, -110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 105, 110, 99, 100, 105, 114, 44, 32, 112, 99, 104, 41, 10, 105, 102, - 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 112, 99, 104, 32, 61, 32, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, - 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 10, 102, 111, 117, 110, 100, 32, 61, 32, 116, 114, 117, 101, 10, 98, 114, 101, 97, 107, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 32, 116, 104, 101, 110, 10, 112, 99, 104, 32, - 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 112, 99, 104, 41, 41, 10, 101, 110, 100, 10, 95, 120, - 40, 39, 32, 32, 80, 67, 72, 32, 61, 32, 37, 115, 39, 44, 32, 112, 99, 104, 41, 10, 95, 112, 40, 39, 32, 32, 71, 67, 72, 32, 61, 32, - 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 40, 80, 67, 72, 41, 41, 46, 103, 99, 104, 39, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 112, 99, 104, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, - 10, 95, 112, 40, 39, 105, 102, 110, 101, 113, 32, 40, 44, 36, 40, 80, 67, 72, 41, 41, 39, 41, 10, 95, 112, 40, 39, 36, 40, 79, 66, 74, - 69, 67, 84, 83, 41, 58, 32, 36, 40, 71, 67, 72, 41, 32, 36, 40, 80, 67, 72, 41, 32, 124, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, - 39, 41, 10, 95, 112, 40, 39, 36, 40, 71, 67, 72, 41, 58, 32, 36, 40, 80, 67, 72, 41, 32, 124, 32, 36, 40, 79, 66, 74, 68, 73, 82, - 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 60, 41, 39, 41, 10, 108, -111, 99, 97, 108, 32, 99, 109, 100, 32, 61, 32, 105, 105, 102, 40, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 61, 32, 34, - 67, 34, 44, 32, 34, 36, 40, 67, 67, 41, 32, 45, 120, 32, 99, 45, 104, 101, 97, 100, 101, 114, 32, 36, 40, 65, 76, 76, 95, 67, 70, 76, - 65, 71, 83, 41, 34, 44, 32, 34, 36, 40, 67, 88, 88, 41, 32, 45, 120, 32, 99, 43, 43, 45, 104, 101, 97, 100, 101, 114, 32, 36, 40, 65, - 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 41, 34, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 37, -115, 32, 45, 111, 32, 34, 36, 64, 34, 32, 45, 77, 70, 32, 34, 36, 40, 64, 58, 37, 37, 46, 103, 99, 104, 61, 37, 37, 46, 100, 41, 34, - 32, 45, 99, 32, 34, 36, 60, 34, 39, 44, 32, 99, 109, 100, 41, 10, 95, 112, 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, 39, 36, - 40, 79, 66, 74, 69, 67, 84, 83, 41, 58, 32, 124, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, -105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 114, 101, -115, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 102, 108, - 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 100, 101, 102, 105, -110, 101, 115, 40, 99, 102, 103, 46, 114, 101, 115, 100, 101, 102, 105, 110, 101, 115, 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, -105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 114, 101, 115, 105, 110, 99, 108, 117, 100, 101, 100, -105, 114, 115, 41, 44, 32, 99, 102, 103, 46, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 41, 10, 95, 112, 40, 39, 32, 32, 65, 76, 76, 95, - 82, 69, 83, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 82, 69, 83, 70, 76, 65, 71, 83, 41, 32, 36, 40, 68, 69, 70, 73, 78, 69, - 83, 41, 32, 36, 40, 73, 78, 67, 76, 85, 68, 69, 83, 41, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 114, 101, 115, -102, 108, 97, 103, 115, 41, 41, 10, 101, 110, 100, 10, }; - -// gmake/gmake_csharp.lua -static const unsigned char builtin_script_70[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 97, 107, 101, 46, 99, 115, 32, 61, 32, 123, 125, - 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 32, 61, 32, 112, 46, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 99, 115, 32, 61, 32, -112, 46, 109, 97, 107, 101, 46, 99, 115, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, -101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 99, 115, 46, 101, -108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, -101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 97, 107, 101, 46, -104, 101, 97, 100, 101, 114, 44, 10, 109, 97, 107, 101, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, - 67, 111, 110, 102, 105, 103, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 80, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 44, 10, 109, - 97, 107, 101, 46, 99, 115, 83, 111, 117, 114, 99, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 69, 109, 98, 101, 100, 70, 105, 108, 101, 115, - 44, 10, 109, 97, 107, 101, 46, 99, 115, 67, 111, 112, 121, 70, 105, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 82, 101, 115, 112, 111, -110, 115, 101, 70, 105, 108, 101, 44, 10, 109, 97, 107, 101, 46, 115, 104, 101, 108, 108, 84, 121, 112, 101, 44, 10, 109, 97, 107, 101, 46, 99, 115, - 65, 108, 108, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 84, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 44, 10, 109, 97, -107, 101, 46, 116, 97, 114, 103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 82, 101, 115, 112, 111, 110, -115, 101, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, - 99, 115, 67, 108, 101, 97, 110, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, 108, 100, 82, 117, 108, 101, 115, - 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 76, 105, 110, 107, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 70, 105, 108, 101, - 82, 117, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 46, 103, 101, -110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 110, 34, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, -111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, 101, 116, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, - 97, 121, 40, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 97, -107, 101, 46, 99, 115, 84, 111, 111, 108, 115, 44, 10, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 44, 10, 109, 97, 107, 101, 46, 111, 98, -106, 100, 105, 114, 44, 10, 109, 97, 107, 101, 46, 99, 115, 70, 108, 97, 103, 115, 44, 10, 109, 97, 107, 101, 46, 99, 115, 76, 105, 110, 107, 67, -109, 100, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 76, -105, 110, 107, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 109, 97, 107, -101, 46, 115, 101, 116, 116, 105, 110, 103, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, - 99, 115, 67, 111, 110, 102, 105, 103, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, -105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 95, 120, - 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, -116, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, -101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 115, 46, 103, 101, 116, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 102, 110, 97, 109, -101, 41, 10, 105, 102, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 41, 32, 61, - 61, 32, 34, 46, 114, 101, 115, 120, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 99, 102, 103, 46, - 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 34, 10, 108, 111, 99, 97, -108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 110, 97, 109, 101, 41, - 10, 105, 102, 32, 100, 105, 114, 32, 126, 61, 32, 34, 46, 34, 32, 116, 104, 101, 110, 10, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 32, - 46, 46, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 100, 105, 114, 44, 32, 34, 46, 34, 41, 32, 46, 46, 32, 34, - 46, 34, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 34, 32, 46, 46, 32, 112, 46, -101, 115, 99, 40, 110, 97, 109, 101, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 102, 110, 97, -109, 101, 41, 41, 32, 46, 46, 32, 34, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, - 32, 102, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 115, 46, 108, 105, 115, 116, 115, -111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 44, 32, 115, 101, 108, 101, 99, 116, 111, 114, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 112, 46, 116, 114, -101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 115, -101, 108, 101, 99, 116, 111, 114, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, - 92, 116, 37, 115, 32, 92, 92, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 65, 108, 108, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 97, 108, 108, 58, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 32, 36, 40, 79, - 66, 74, 68, 73, 82, 41, 32, 112, 114, 101, 98, 117, 105, 108, 100, 32, 36, 40, 69, 77, 66, 69, 68, 70, 73, 76, 69, 83, 41, 32, 36, 40, - 67, 79, 80, 89, 70, 73, 76, 69, 83, 41, 32, 112, 114, 101, 108, 105, 110, 107, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, 41, 10, 95, -112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 67, 108, 101, 97, 110, 82, -117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 97, 107, 101, 46, 99, 115, 67, 111, 112, 121, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 46, 103, 101, 116, 114, 101, 115, 112, 111, 110, 115, 101, 102, -105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 39, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 39, - 32, 46, 46, 32, 112, 114, 106, 46, 102, 105, 108, 101, 110, 97, 109, 101, 32, 46, 46, 32, 39, 46, 114, 115, 112, 39, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 82, 101, 115, 112, 111, 110, 115, 101, 70, 105, 108, 101, 40, 112, 114, 106, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 120, 40, 39, 82, 69, 83, 80, 79, 78, 83, 69, 32, 43, 61, 32, 39, 32, 46, 46, 32, 109, - 97, 107, 101, 46, 99, 115, 46, 103, 101, 116, 114, 101, 115, 112, 111, 110, 115, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 41, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 82, 101, 115, 112, 111, 110, 115, 101, 82, 117, 108, -101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, -100, 111, 116, 110, 101, 116, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 32, 61, 32, 109, 97, 107, 101, 46, 103, 101, 116, 109, 97, 107, 101, 102, -105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 102, 105, 108, -101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, - 32, 101, 120, 116, 41, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 61, 32, 109, 97, 107, 101, 46, 99, 115, 46, -103, 101, 116, 114, 101, 115, 112, 111, 110, 115, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 82, - 69, 83, 80, 79, 78, 83, 69, 41, 58, 32, 37, 115, 39, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 41, 10, 95, 112, 40, 39, 92, 116, 64, -101, 99, 104, 111, 32, 71, 101, 110, 101, 114, 97, 116, 105, 110, 103, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 102, 105, 108, 101, 39, 44, 32, -112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 112, 111, 115, 105, 120, 44, 36, 40, 83, 72, 69, 76, - 76, 84, 89, 80, 69, 41, 41, 39, 41, 10, 95, 120, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 114, 109, 32, 45, 102, 32, - 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 39, 41, 10, 95, 112, 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 120, 40, 39, 92, 116, 36, - 40, 83, 73, 76, 69, 78, 84, 41, 32, 105, 102, 32, 101, 120, 105, 115, 116, 32, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 32, 100, 101, -108, 32, 37, 115, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 114, 101, 115, 112, 111, 110, 115, 101, 44, 32, - 39, 92, 92, 39, 41, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 112, 32, 61, 32, 111, -115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 119, 105, 110, 100, 111, 119, 115, 34, 41, 32, 97, 110, 100, 32, 34, 92, 92, 34, 32, 111, -114, 32, 34, 47, 34, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, - 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 112, 46, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, -123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, - 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, 40, 110, 111, 100, 101, 41, 46, 97, 99, 116, 105, 111, -110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, 34, 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, - 37, 115, 32, 62, 62, 32, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, -116, 101, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, 32, 115, 101, 112, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, - 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 69, 109, 98, -101, 100, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, - 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 95, 112, - 40, 39, 69, 77, 66, 69, 68, 70, 73, 76, 69, 83, 32, 43, 61, 32, 92, 92, 39, 41, 10, 99, 115, 46, 108, 105, 115, 116, 115, 111, 117, 114, - 99, 101, 115, 40, 112, 114, 106, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, -102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 102, 111, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 102, 105, 108, 101, 105, 110, -102, 111, 40, 102, 99, 102, 103, 41, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 69, 109, 98, 101, -100, 100, 101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 99, 115, 46, 103, 101, 116, -114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, -116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 97, 107, 101, 46, 99, 115, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, -111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 70, 76, 65, 71, 83, 32, 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, -105, 115, 116, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 41, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 76, 105, 110, 107, 67, 109, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 46, 101, 115, 99, 40, 99, 111, 110, 102, 105, 103, 46, -103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 34, 102, -117, 108, 108, 112, 97, 116, 104, 34, 41, 41, 10, 95, 112, 40, 39, 32, 32, 68, 69, 80, 69, 78, 68, 83, 32, 61, 37, 115, 39, 44, 32, 109, - 97, 107, 101, 46, 108, 105, 115, 116, 40, 100, 101, 112, 115, 41, 41, 10, 95, 112, 40, 39, 32, 32, 82, 69, 70, 69, 82, 69, 78, 67, 69, 83, - 32, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 100, 101, 112, 115, 44, 32, 34, 47, 114, 58, - 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, -115, 80, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, - 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, -112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 102, 108, 97, 103, 32, 61, 32, 34, 47, 116, 58, 34, 32, 46, 46, 32, 116, -111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 107, 105, 110, 100, 40, 99, 102, 103, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 108, 111, 99, 97, -108, 32, 108, 105, 98, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 112, 46, 101, 115, 99, 40, - 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 41, 44, 32, 34, 47, 108, 105, 98, 58, 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 10, - 95, 112, 40, 39, 70, 76, 65, 71, 83, 32, 43, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 116, - 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 107, 105, 110, 100, 102, 108, 97, 103, 44, 32, 108, 105, 98, 100, 105, 114, 115, 41, 44, 32, 34, 32, - 34, 41, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 102, 115, 32, 61, 32, 112, 46, 101, 115, 99, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, -116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, - 41, 41, 10, 95, 112, 40, 39, 82, 69, 70, 69, 82, 69, 78, 67, 69, 83, 32, 43, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, -105, 109, 112, 108, 111, 100, 101, 40, 114, 101, 102, 115, 44, 32, 34, 47, 114, 58, 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 41, 10, 95, -112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 83, 111, 117, 114, 99, 101, -115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, -101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 83, 79, 85, 82, - 67, 69, 83, 32, 43, 61, 32, 92, 92, 39, 41, 10, 99, 115, 46, 108, 105, 115, 116, 115, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, - 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 105, 110, 102, 111, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, 40, 102, 99, 102, 103, 41, 10, -105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, 34, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 95, 112, - 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 84, 97, 114, 103, 101, 116, 82, -117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, - 58, 32, 36, 40, 83, 79, 85, 82, 67, 69, 83, 41, 32, 36, 40, 69, 77, 66, 69, 68, 70, 73, 76, 69, 83, 41, 32, 36, 40, 68, 69, 80, - 69, 78, 68, 83, 41, 32, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, - 78, 84, 41, 32, 36, 40, 67, 83, 67, 41, 32, 47, 110, 111, 108, 111, 103, 111, 32, 47, 111, 117, 116, 58, 36, 64, 32, 36, 40, 70, 76, 65, - 71, 83, 41, 32, 36, 40, 82, 69, 70, 69, 82, 69, 78, 67, 69, 83, 41, 32, 64, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 32, 36, - 40, 112, 97, 116, 115, 117, 98, 115, 116, 32, 37, 37, 44, 47, 114, 101, 115, 111, 117, 114, 99, 101, 58, 37, 37, 44, 36, 40, 69, 77, 66, 69, - 68, 70, 73, 76, 69, 83, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, - 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 115, 84, -111, 111, 108, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 67, 83, 67, 32, 61, 32, 37, -115, 39, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 99, 115, - 99, 34, 41, 41, 10, 95, 112, 40, 39, 32, 32, 82, 69, 83, 71, 69, 78, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 114, 101, 115, 103, 101, 110, 34, 41, 41, 10, 101, 110, 100, - 10, }; - -// gmake/gmake_makefile.lua -static const unsigned char builtin_script_71[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 97, 107, 101, 46, 109, 97, 107, 101, 102, 105, 108, -101, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 112, 46, 109, 97, 107, 101, - 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 32, 32, 61, 32, 112, 46, 109, 97, 107, 101, 46, 109, 97, 107, 101, 102, -105, 108, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, - 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 32, 32, 32, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, - 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 109, 97, 107, -101, 102, 105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 97, 107, 101, 102, 105, 108, 101, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 123, 10, 34, 104, 101, 97, 100, 101, 114, 34, 44, 10, 34, 112, 104, -111, 110, 121, 82, 117, 108, 101, 115, 34, 44, 10, 34, 109, 97, 107, 101, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 115, 34, 44, 10, 34, 109, - 97, 107, 101, 102, 105, 108, 101, 84, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 97, 107, 101, 46, 109, 97, 107, 101, 102, 105, 108, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, - 40, 34, 92, 110, 34, 41, 10, 112, 46, 99, 97, 108, 108, 97, 114, 114, 97, 121, 40, 109, 97, 107, 101, 44, 32, 109, 97, 107, 101, 102, 105, 108, -101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 101, 110, 100, 10, 109, 97, -107, 101, 102, 105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, -123, 10, 34, 116, 97, 114, 103, 101, 116, 34, 44, 10, 34, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 34, 99, 108, -101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 115, 34, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 109, 97, -107, 101, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, -111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, -111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 91, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, - 34, 103, 99, 99, 34, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, - 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, 111, 108, 115, 101, 116, 32, 39, 34, 32, 46, 46, 32, 99, 102, 103, 46, 116, 111, 111, 108, -115, 101, 116, 32, 46, 46, 32, 34, 39, 34, 41, 10, 101, 110, 100, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, -105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 97, -114, 114, 97, 121, 40, 109, 97, 107, 101, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 101, 110, -100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, -107, 101, 46, 109, 97, 107, 101, 102, 105, 108, 101, 84, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, - 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, - 41, 10, 95, 112, 40, 39, 39, 41, 10, 95, 112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 67, 76, - 69, 65, 78, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 97, 107, 101, 46, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 102, 103, 41, 10, 95, 112, 40, 39, 32, 32, 100, 101, 102, -105, 110, 101, 32, 66, 85, 73, 76, 68, 67, 77, 68, 83, 39, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, -103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 10, 105, 102, 32, 35, 115, 116, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, -110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, -105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 95, 112, 40, 39, 92, 116, - 64, 101, 99, 104, 111, 32, 82, 117, 110, 110, 105, 110, 103, 32, 98, 117, 105, 108, 100, 32, 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 10, 95, -112, 40, 39, 92, 116, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, - 34, 44, 32, 34, 34, 44, 32, 34, 92, 110, 92, 116, 34, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 32, 32, 101, 110, 100, 101, 102, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, -115, 40, 99, 102, 103, 41, 10, 95, 112, 40, 39, 32, 32, 100, 101, 102, 105, 110, 101, 32, 67, 76, 69, 65, 78, 67, 77, 68, 83, 39, 41, 10, -108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 46, 99, 108, 101, 97, 110, 99, 111, 109, 109, 97, 110, 100, 115, 10, -105, 102, 32, 35, 115, 116, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, - 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, -108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 82, 117, 110, 110, 105, 110, 103, 32, 99, 108, -101, 97, 110, 32, 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 10, 95, 112, 40, 39, 92, 116, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, -105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 110, 92, 116, 34, 41, 41, 10, -101, 110, 100, 10, 95, 112, 40, 39, 32, 32, 101, 110, 100, 101, 102, 39, 41, 10, 101, 110, 100, 10, }; - -// gmake/gmake_utility.lua -static const unsigned char builtin_script_72[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 97, 107, 101, 46, 117, 116, 105, 108, 105, 116, 121, - 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 112, 46, 109, 97, 107, 101, 10, -108, 111, 99, 97, 108, 32, 117, 116, 105, 108, 105, 116, 121, 32, 32, 32, 32, 61, 32, 112, 46, 109, 97, 107, 101, 46, 117, 116, 105, 108, 105, 116, -121, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, -111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 32, 32, 32, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, - 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 117, 116, 105, 108, 105, -116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, -115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 123, 10, 34, 104, 101, 97, 100, 101, 114, 34, 44, 10, 34, 112, 104, 111, 110, 121, 82, -117, 108, 101, 115, 34, 44, 10, 34, 117, 116, 105, 108, 105, 116, 121, 67, 111, 110, 102, 105, 103, 115, 34, 44, 10, 34, 117, 116, 105, 108, 105, 116, -121, 84, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 34, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 117, 116, -105, 108, 105, 116, 121, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 110, 34, 41, 10, -112, 46, 99, 97, 108, 108, 97, 114, 114, 97, 121, 40, 109, 97, 107, 101, 44, 32, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 101, 110, 100, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, -101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 123, 10, 34, 116, 97, 114, 103, 101, 116, - 34, 44, 10, 34, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 34, 44, 10, 34, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, -115, 34, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 117, 116, 105, 108, 105, 116, 121, 67, 111, 110, 102, 105, -103, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, -111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, -116, 111, 111, 108, 115, 91, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 34, 103, 99, 99, 34, 93, 10, 105, 102, 32, 110, -111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, -111, 111, 108, 115, 101, 116, 32, 39, 34, 32, 46, 46, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 46, 46, 32, 34, 39, 34, 41, - 10, 101, 110, 100, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, -102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 97, 114, 114, 97, 121, 40, 109, 97, 107, 101, 44, 32, -117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, - 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 117, 116, 105, 108, 105, 116, 121, 84, 97, -114, 103, 101, 116, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 39, 41, 10, - 95, 112, 40, 39, 92, 116, 36, 40, 80, 82, 69, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, - 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, }; - -// gmake/gmake_workspace.lua -static const unsigned char builtin_script_73[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 32, 61, 32, 112, - 46, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, 108, 111, 99, 97, 108, 32, -112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, -101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 95, 119, 111, 114, 107, 115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 112, 46, 101, 111, 108, 40, - 34, 92, 110, 34, 41, 10, 109, 97, 107, 101, 46, 104, 101, 97, 100, 101, 114, 40, 119, 107, 115, 41, 10, 109, 97, 107, 101, 46, 99, 111, 110, 102, -105, 103, 109, 97, 112, 40, 119, 107, 115, 41, 10, 109, 97, 107, 101, 46, 112, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 109, 97, -107, 101, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 80, 104, 111, 110, 121, 82, 117, 108, 101, 40, 119, 107, 115, 41, 10, 109, 97, 107, 101, 46, -103, 114, 111, 117, 112, 82, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 109, 97, 107, 101, 46, 112, 114, 111, 106, 101, 99, 116, 114, 117, 108, 101, -115, 40, 119, 107, 115, 41, 10, 109, 97, 107, 101, 46, 99, 108, 101, 97, 110, 114, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 109, 97, 107, 101, - 46, 104, 101, 108, 112, 114, 117, 108, 101, 40, 119, 107, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, - 46, 99, 111, 110, 102, 105, 103, 109, 97, 112, 40, 119, 107, 115, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, 111, 10, 95, 112, 40, 39, 105, 102, -101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, -101, 41, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, -111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 32, 61, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, - 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 105, 102, 32, 112, 114, 106, 99, 102, 103, 32, 116, 104, 101, 110, 10, 95, -112, 40, 39, 32, 32, 37, 115, 95, 99, 111, 110, 102, 105, 103, 32, 61, 32, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 116, 111, 118, 97, 114, - 40, 112, 114, 106, 46, 110, 97, 109, 101, 41, 44, 32, 112, 114, 106, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 99, 108, 101, 97, 110, 114, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 95, -112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, -112, 97, 116, 104, 32, 61, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, 46, 103, 101, 116, 109, - 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, -106, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 112, 97, 116, 104, 46, 103, 101, -116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 119, 107, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 112, 114, 106, 112, 97, 116, 104, 41, - 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, -114, 106, 112, 97, 116, 104, 41, 10, 95, 120, 40, 49, 44, 39, 64, 36, 123, 77, 65, 75, 69, 125, 32, 45, 45, 110, 111, 45, 112, 114, 105, 110, -116, 45, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 45, 67, 32, 37, 115, 32, 45, 102, 32, 37, 115, 32, 99, 108, 101, 97, 110, 39, 44, 32, -112, 114, 106, 100, 105, 114, 44, 32, 112, 114, 106, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 104, 101, 108, 112, 114, 117, 108, 101, 40, 119, 107, 115, 41, 10, 95, 112, 40, 39, -104, 101, 108, 112, 58, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 85, 115, 97, 103, 101, 58, 32, 109, 97, 107, 101, - 32, 91, 99, 111, 110, 102, 105, 103, 61, 110, 97, 109, 101, 93, 32, 91, 116, 97, 114, 103, 101, 116, 93, 34, 39, 41, 10, 95, 112, 40, 49, 44, - 39, 64, 101, 99, 104, 111, 32, 34, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 67, 79, 78, 70, 73, 71, 85, - 82, 65, 84, 73, 79, 78, 83, 58, 34, 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, 111, 10, 95, 120, 40, 49, 44, 32, 39, 64, 101, 99, -104, 111, 32, 34, 32, 32, 37, 115, 34, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, -112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 84, 65, 82, - 71, 69, 84, 83, 58, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 32, 32, 32, 97, 108, 108, 32, 40, 100, 101, -102, 97, 117, 108, 116, 41, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 32, 32, 32, 99, 108, 101, 97, 110, 34, - 39, 41, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, -111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 32, 32, 32, 37, 115, - 34, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 34, - 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 70, 111, 114, 32, 109, 111, 114, 101, 32, 105, 110, 102, 111, 114, 109, 97, -116, 105, 111, 110, 44, 32, 115, 101, 101, 32, 104, 116, 116, 112, 115, 58, 47, 47, 103, 105, 116, 104, 117, 98, 46, 99, 111, 109, 47, 112, 114, 101, -109, 97, 107, 101, 47, 112, 114, 101, 109, 97, 107, 101, 45, 99, 111, 114, 101, 47, 119, 105, 107, 105, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 112, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 95, 112, 40, 39, 80, 82, - 79, 74, 69, 67, 84, 83, 32, 58, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, - 99, 40, 116, 97, 98, 108, 101, 46, 101, 120, 116, 114, 97, 99, 116, 40, 119, 107, 115, 46, 112, 114, 111, 106, 101, 99, 116, 115, 44, 32, 34, 110, - 97, 109, 101, 34, 41, 41, 44, 32, 34, 32, 34, 41, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 97, 107, 101, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 80, 104, 111, 110, 121, 82, 117, 108, 101, 40, 119, 107, 115, 41, 10, 108, -111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 119, 111, -114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, -101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, - 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 103, 114, 111, 117, 112, 115, 44, 32, 110, 46, 112, 97, 116, 104, 41, 10, 101, -110, 100, 10, 125, 41, 10, 95, 112, 40, 39, 46, 80, 72, 79, 78, 89, 58, 32, 97, 108, 108, 32, 99, 108, 101, 97, 110, 32, 104, 101, 108, 112, - 32, 36, 40, 80, 82, 79, 74, 69, 67, 84, 83, 41, 32, 39, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, -103, 114, 111, 117, 112, 115, 44, 32, 39, 39, 44, 32, 39, 39, 44, 32, 39, 32, 39, 41, 41, 10, 95, 112, 40, 39, 39, 41, 10, 95, 112, 40, - 39, 97, 108, 108, 58, 32, 36, 40, 80, 82, 79, 74, 69, 67, 84, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 103, 114, 111, 117, 112, 82, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, - 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, -115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 110, 46, 112, 97, 116, -104, 32, 46, 46, 32, 34, 58, 34, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, - 44, 32, 99, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 110, 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 10, 100, 111, 10, 105, 102, 32, 116, -121, 112, 101, 40, 105, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 10, 116, 104, 101, 110, 10, 105, 102, 32, 99, 46, 112, 114, 111, -106, 101, 99, 116, 10, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 114, 111, 106, 101, 99, 116, 84, 97, -114, 103, 101, 116, 115, 44, 32, 99, 46, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 103, 114, 111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 44, 32, 99, 46, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 105, 102, 32, 35, 103, 114, 111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 115, 111, 114, 116, 40, 103, 114, 111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 41, 10, 114, 117, 108, 101, 32, 61, 32, 114, 117, 108, -101, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 103, 114, 111, 117, 112, 84, 97, -114, 103, 101, 116, 115, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, -116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 112, 114, 111, 106, 101, 99, 116, 84, 97, -114, 103, 101, 116, 115, 41, 10, 114, 117, 108, 101, 32, 61, 32, 114, 117, 108, 101, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 44, 32, 34, 32, 34, 41, 10, 101, -110, 100, 10, 95, 112, 40, 114, 117, 108, 101, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 125, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 46, 112, 114, 111, 106, 101, 99, 116, 114, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 102, 111, -114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, - 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, -116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 100, 101, 112, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, -101, 120, 116, 114, 97, 99, 116, 40, 100, 101, 112, 115, 44, 32, 34, 110, 97, 109, 101, 34, 41, 10, 95, 112, 40, 39, 37, 115, 58, 37, 115, 39, - 44, 32, 112, 46, 101, 115, 99, 40, 112, 114, 106, 46, 110, 97, 109, 101, 41, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 100, 101, 112, -115, 41, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 118, 97, 114, 32, 61, 32, 109, 97, 107, 101, 46, 116, 111, 118, 97, 114, 40, 112, 114, -106, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 110, 101, 113, 32, 40, 44, 36, 40, 37, 115, 95, 99, 111, 110, 102, 105, 103, 41, - 41, 39, 44, 32, 99, 102, 103, 118, 97, 114, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 61, 61, 61, 61, 32, 66, 117, -105, 108, 100, 105, 110, 103, 32, 37, 115, 32, 40, 36, 40, 37, 115, 95, 99, 111, 110, 102, 105, 103, 41, 41, 32, 61, 61, 61, 61, 34, 39, 44, - 32, 112, 114, 106, 46, 110, 97, 109, 101, 44, 32, 99, 102, 103, 118, 97, 114, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 112, 97, 116, 104, - 32, 61, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, 46, 103, 101, 116, 109, 97, 107, 101, 102, -105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 100, 105, 114, - 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, - 97, 116, 105, 118, 101, 40, 119, 107, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 112, 114, 106, 112, 97, 116, 104, 41, 41, 10, 108, 111, - 99, 97, 108, 32, 112, 114, 106, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 114, 106, 112, 97, -116, 104, 41, 10, 95, 120, 40, 49, 44, 39, 64, 36, 123, 77, 65, 75, 69, 125, 32, 45, 45, 110, 111, 45, 112, 114, 105, 110, 116, 45, 100, 105, -114, 101, 99, 116, 111, 114, 121, 32, 45, 67, 32, 37, 115, 32, 45, 102, 32, 37, 115, 32, 99, 111, 110, 102, 105, 103, 61, 36, 40, 37, 115, 95, - 99, 111, 110, 102, 105, 103, 41, 39, 44, 32, 112, 114, 106, 100, 105, 114, 44, 32, 112, 114, 106, 110, 97, 109, 101, 44, 32, 99, 102, 103, 118, 97, -114, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// d/_preload.lua -static const unsigned char builtin_script_74[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 97, 112, 105, 32, 61, 32, 112, 46, - 97, 112, 105, 10, 112, 46, 68, 32, 61, 32, 34, 68, 34, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 108, 97, -110, 103, 117, 97, 103, 101, 34, 44, 32, 112, 46, 68, 41, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 102, 108, -111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 34, 44, 32, 34, 78, 111, 110, 101, 34, 41, 10, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, -111, 119, 101, 100, 40, 34, 102, 108, 97, 103, 115, 34, 44, 32, 123, 10, 34, 67, 111, 100, 101, 67, 111, 118, 101, 114, 97, 103, 101, 34, 44, 10, - 34, 67, 111, 108, 111, 114, 34, 44, 10, 34, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 34, 44, 10, 34, 71, 101, 110, 101, 114, - 97, 116, 101, 72, 101, 97, 100, 101, 114, 34, 44, 10, 34, 71, 101, 110, 101, 114, 97, 116, 101, 74, 83, 79, 78, 34, 44, 10, 34, 71, 101, 110, -101, 114, 97, 116, 101, 77, 97, 112, 34, 44, 10, 34, 76, 111, 119, 77, 101, 109, 34, 44, 10, 34, 80, 114, 111, 102, 105, 108, 101, 34, 44, 10, - 34, 81, 117, 105, 101, 116, 34, 44, 10, 34, 82, 101, 116, 97, 105, 110, 80, 97, 116, 104, 115, 34, 44, 10, 34, 83, 121, 109, 98, 111, 108, 115, - 76, 105, 107, 101, 67, 34, 44, 10, 34, 85, 110, 105, 116, 84, 101, 115, 116, 34, 44, 10, 34, 85, 115, 101, 76, 68, 67, 34, 44, 10, 34, 80, -114, 111, 102, 105, 108, 101, 71, 67, 34, 44, 10, 34, 83, 116, 97, 99, 107, 70, 114, 97, 109, 101, 34, 44, 10, 34, 83, 116, 97, 99, 107, 83, -116, 111, 109, 112, 34, 44, 10, 34, 65, 108, 108, 73, 110, 115, 116, 97, 110, 116, 105, 97, 116, 101, 34, 44, 10, 34, 66, 101, 116, 116, 101, 114, - 67, 34, 44, 10, 34, 77, 97, 105, 110, 34, 44, 10, 34, 80, 101, 114, 102, 111, 114, 109, 83, 121, 110, 116, 97, 120, 67, 104, 101, 99, 107, 79, -110, 108, 121, 34, 44, 10, 34, 83, 104, 111, 119, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 34, 44, 10, 34, 86, 101, 114, 98, 111, 115, -101, 34, 44, 10, 34, 83, 104, 111, 119, 84, 76, 83, 34, 44, 10, 34, 83, 104, 111, 119, 71, 67, 34, 44, 10, 34, 73, 103, 110, 111, 114, 101, - 80, 114, 97, 103, 109, 97, 34, 44, 10, 34, 83, 104, 111, 119, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 10, 125, 41, 10, - 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 98, 111, 117, 110, 100, 115, 99, 104, 101, - 99, 107, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, -116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, - 79, 102, 102, 34, 44, 10, 34, 79, 110, 34, 44, 10, 34, 83, 97, 102, 101, 79, 110, 108, 121, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, - 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, -111, 100, 101, 108, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, - 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, - 10, 34, 70, 105, 108, 101, 34, 44, 10, 34, 80, 97, 99, 107, 97, 103, 101, 34, 44, 45, 45, 32, 84, 79, 68, 79, 58, 32, 116, 104, 105, 115, - 32, 100, 111, 101, 115, 110, 39, 116, 32, 119, 111, 114, 107, 32, 119, 105, 116, 104, 32, 103, 109, 97, 107, 101, 33, 33, 10, 34, 80, 114, 111, 106, -101, 99, 116, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, - 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 68, 34, 44, 10, 34, 67, 34, 44, 10, 34, 72, 97, 108, 116, 34, 44, 10, 34, 67, 111, 110, -116, 101, 120, 116, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 99, 111, 109, 112, 117, 116, 101, 116, 97, 114, 103, 101, 116, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, -110, 116, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, -108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, -112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, 117, 103, 108, 101, 118, 101, 108, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 105, 110, 116, -101, 103, 101, 114, 34, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, -100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 102, 105, 108, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, -105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 112, 114, -101, 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, - 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 34, 65, 108, 108, 111, 119, 34, 44, 10, 34, 87, 97, 114, 110, 34, 44, 10, 34, 69, 114, 114, -111, 114, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, - 34, 100, 111, 99, 100, 105, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, -114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 111, 99, 110, 97, 109, 101, 34, 44, 10, 115, 99, 111, -112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, -116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, -110, 97, 109, 101, 32, 61, 32, 34, 104, 101, 97, 100, 101, 114, 100, 105, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, -102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, -117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 104, 101, 97, -100, 101, 114, 110, 97, 109, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, -105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 106, 115, 111, 110, 102, 105, 108, 101, 34, 44, 10, -115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 112, 97, 116, 104, 34, 44, - 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, -110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, - 32, 61, 32, 34, 112, 114, 101, 118, 105, 101, 119, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, -123, 10, 34, 100, 105, 112, 50, 53, 34, 44, 10, 34, 100, 105, 112, 49, 48, 48, 48, 34, 44, 10, 34, 100, 105, 112, 49, 48, 48, 56, 34, 44, - 10, 34, 102, 105, 101, 108, 100, 119, 105, 115, 101, 34, 44, 10, 34, 109, 97, 114, 107, 100, 111, 119, 110, 34, 44, 10, 34, 102, 105, 120, 65, 108, -105, 97, 115, 84, 104, 105, 115, 34, 44, 10, 34, 105, 110, 116, 112, 114, 111, 109, 111, 116, 101, 34, 44, 10, 34, 100, 116, 111, 114, 102, 105, 101, -108, 100, 115, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, - 32, 34, 114, 101, 118, 101, 114, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, -100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, -100, 105, 112, 50, 53, 34, 44, 10, 34, 105, 109, 112, 111, 114, 116, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, -116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 34, 44, - 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, -112, 97, 116, 104, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 34, 44, 10, 115, 99, 111, 112, -101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, -103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 102, 105, 101, 108, 100, 34, 44, 10, 34, 99, 104, 101, 99, 107, 105, -109, 112, 111, 114, 116, 115, 34, 44, 10, 34, 99, 111, 109, 112, 108, 101, 120, 34, 44, 10, 34, 116, 108, 115, 34, 44, 10, 34, 118, 109, 97, 114, -107, 100, 111, 119, 110, 34, 44, 10, 125, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, - 32, 61, 32, 34, 118, 101, 114, 115, 105, 111, 110, 99, 111, 110, 115, 116, 97, 110, 116, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, - 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, -111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, - 97, 109, 101, 32, 61, 32, 34, 118, 101, 114, 115, 105, 111, 110, 108, 101, 118, 101, 108, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 105, 110, 116, 101, 103, 101, 114, 34, 44, 10, 125, 10, 110, 101, 119, 111, -112, 116, 105, 111, 110, 10, 123, 10, 99, 97, 116, 101, 103, 111, 114, 121, 61, 32, 34, 99, 111, 109, 112, 105, 108, 101, 114, 115, 34, 44, 10, 116, -114, 105, 103, 103, 101, 114, 61, 32, 34, 100, 99, 34, 44, 10, 118, 97, 108, 117, 101, 61, 32, 34, 86, 65, 76, 85, 69, 34, 44, 10, 100, 101, -115, 99, 114, 105, 112, 116, 105, 111, 110, 61, 32, 34, 67, 104, 111, 111, 115, 101, 32, 97, 32, 68, 32, 99, 111, 109, 112, 105, 108, 101, 114, 34, - 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 123, 32, 34, 100, 109, 100, 34, 44, 32, 34, 68, 105, 103, 105, 116, 97, 108, 32, - 77, 97, 114, 115, 32, 40, 100, 109, 100, 41, 34, 32, 125, 44, 10, 123, 32, 34, 103, 100, 99, 34, 44, 32, 34, 71, 78, 85, 32, 71, 68, 67, - 32, 40, 103, 100, 99, 41, 34, 32, 125, 44, 10, 123, 32, 34, 108, 100, 99, 34, 44, 32, 34, 76, 76, 86, 77, 32, 76, 68, 67, 32, 40, 108, -100, 99, 50, 41, 34, 32, 125, 44, 10, 125, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, -103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 61, 32, 112, 46, 68, 32, 111, -114, 32, 99, 102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 61, 32, 34, 67, 34, 32, 111, 114, 32, 99, 102, 103, 46, 108, 97, 110, -103, 117, 97, 103, 101, 32, 61, 61, 32, 34, 67, 43, 43, 34, 41, 10, 101, 110, 100, 10, }; - -// d/d.lua -static const unsigned char builtin_script_75[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 100, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 100, 10, 109, 46, 95, 86, 69, 82, 83, - 73, 79, 78, 32, 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, - 10, 108, 111, 99, 97, 108, 32, 97, 112, 105, 32, 61, 32, 112, 46, 97, 112, 105, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 46, 112, 114, -111, 106, 101, 99, 116, 46, 105, 115, 100, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, -103, 101, 32, 61, 61, 32, 112, 46, 68, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 112, 97, 116, 104, 46, 105, 115, 100, 102, -105, 108, 101, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, -105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, 34, 46, 100, 34, 32, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 112, 97, 116, 104, 46, 105, 115, 100, 104, 101, 97, 100, 101, 114, 40, 102, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, - 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 44, 32, 123, 32, 34, 46, 100, 105, 34, 32, -125, 41, 10, 101, 110, 100, 10, 105, 110, 99, 108, 117, 100, 101, 40, 32, 34, 116, 111, 111, 108, 115, 47, 100, 109, 100, 46, 108, 117, 97, 34, 32, - 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 32, 34, 116, 111, 111, 108, 115, 47, 103, 100, 99, 46, 108, 117, 97, 34, 32, 41, 10, 105, 110, 99, -108, 117, 100, 101, 40, 32, 34, 116, 111, 111, 108, 115, 47, 108, 100, 99, 46, 108, 117, 97, 34, 32, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, - 32, 34, 97, 99, 116, 105, 111, 110, 115, 47, 103, 109, 97, 107, 101, 46, 108, 117, 97, 34, 32, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 32, - 34, 97, 99, 116, 105, 111, 110, 115, 47, 118, 99, 120, 112, 114, 111, 106, 46, 108, 117, 97, 34, 32, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, - 32, 34, 97, 99, 116, 105, 111, 110, 115, 47, 118, 105, 115, 117, 97, 108, 100, 46, 108, 117, 97, 34, 32, 41, 10, 114, 101, 116, 117, 114, 110, 32, -109, 10, }; - -// d/actions/gmake.lua -static const unsigned char builtin_script_76[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 100, 10, 109, 46, 109, 97, 107, 101, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 100, 109, 97, 107, 101, 32, - 61, 32, 109, 46, 109, 97, 107, 101, 10, 114, 101, 113, 117, 105, 114, 101, 32, 40, 34, 103, 109, 97, 107, 101, 34, 41, 10, 108, 111, 99, 97, 108, - 32, 109, 97, 107, 101, 32, 61, 32, 112, 46, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 99, 112, 112, 32, 61, 32, 112, 46, 109, 97, 107, -101, 46, 99, 112, 112, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, -108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, -108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 103, 109, - 97, 107, 101, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 103, 101, 116, 40, 32, 39, 103, 109, 97, 107, 101, 39, 32, 41, 10, 105, 102, - 32, 103, 109, 97, 107, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 32, 34, 70, 97, 105, 108, 101, -100, 32, 116, 111, 32, 108, 111, 99, 97, 116, 101, 32, 112, 114, 101, 113, 117, 105, 115, 105, 116, 101, 32, 97, 99, 116, 105, 111, 110, 32, 39, 103, -109, 97, 107, 101, 39, 34, 32, 41, 10, 101, 110, 100, 10, 103, 109, 97, 107, 101, 46, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, -101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 103, 109, 97, 107, 101, 46, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, -117, 97, 103, 101, 115, 44, 32, 123, 32, 112, 46, 68, 32, 125, 32, 41, 10, 103, 109, 97, 107, 101, 46, 118, 97, 108, 105, 100, 95, 116, 111, 111, -108, 115, 46, 100, 99, 32, 61, 32, 123, 32, 34, 100, 109, 100, 34, 44, 32, 34, 103, 100, 99, 34, 44, 32, 34, 108, 100, 99, 34, 32, 125, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, -105, 111, 110, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 115, 111, 109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, 97, -108, 32, 97, 108, 108, 32, 61, 32, 116, 114, 117, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, -101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, - 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 61, 61, 32, 34, 70, 105, 108, 101, 34, 32, 116, 104, 101, 110, 10, 115, 111, 109, 101, 32, 61, - 32, 116, 114, 117, 101, 10, 101, 108, 115, 101, 10, 97, 108, 108, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, -101, 116, 117, 114, 110, 32, 105, 105, 102, 40, 97, 108, 108, 44, 32, 34, 97, 108, 108, 34, 44, 32, 105, 105, 102, 40, 115, 111, 109, 101, 44, 32, - 34, 115, 111, 109, 101, 34, 44, 32, 34, 110, 111, 110, 101, 34, 41, 41, 10, 101, 110, 100, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, - 32, 103, 109, 97, 107, 101, 44, 32, 34, 111, 110, 80, 114, 111, 106, 101, 99, 116, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, -100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 109, 97, 107, 101, 46, 101, 115, 99, 41, 10, 105, 102, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, -101, 102, 105, 108, 101, 32, 61, 32, 109, 97, 107, 101, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, - 44, 32, 116, 114, 117, 101, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, - 44, 32, 109, 46, 109, 97, 107, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 111, 108, -100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 41, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 32, 109, 97, 107, 101, 44, 32, - 34, 111, 98, 106, 100, 105, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 105, -102, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 126, 61, 32, 34, 68, 34, 32, 111, 114, - 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 61, 61, 32, 34, 70, 105, 108, 101, 34, 32, -116, 104, 101, 110, 10, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 46, 111, 118, 101, 114, 114, -105, 100, 101, 40, 32, 109, 97, 107, 101, 44, 32, 34, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 126, - 61, 32, 34, 68, 34, 32, 111, 114, 32, 109, 46, 109, 97, 107, 101, 46, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, -105, 111, 110, 40, 112, 114, 106, 41, 32, 126, 61, 32, 34, 110, 111, 110, 101, 34, 32, 116, 104, 101, 110, 10, 111, 108, 100, 102, 110, 40, 112, 114, -106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, -101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, -114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 97, 107, 101, 46, 104, 101, 97, 100, 101, 114, 44, 10, 109, 97, 107, 101, 46, 112, 104, 111, 110, 121, - 82, 117, 108, 101, 115, 44, 10, 109, 46, 109, 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 115, 44, 10, 109, 46, 109, 97, 107, 101, 46, 111, 98, -106, 101, 99, 116, 115, 44, 45, 45, 32, 84, 79, 68, 79, 58, 32, 84, 104, 105, 115, 32, 105, 115, 32, 98, 97, 115, 105, 99, 97, 108, 108, 121, - 32, 105, 100, 101, 110, 116, 105, 99, 97, 108, 32, 116, 111, 32, 109, 97, 107, 101, 46, 99, 112, 112, 79, 98, 106, 101, 99, 116, 115, 40, 41, 44, - 32, 97, 110, 100, 32, 115, 104, 111, 117, 108, 100, 32, 105, 100, 101, 97, 108, 108, 121, 32, 98, 101, 32, 109, 101, 114, 103, 101, 100, 47, 115, 104, - 97, 114, 101, 100, 10, 109, 97, 107, 101, 46, 115, 104, 101, 108, 108, 84, 121, 112, 101, 44, 10, 109, 46, 109, 97, 107, 101, 46, 116, 97, 114, 103, -101, 116, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 109, 97, -107, 101, 46, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 46, 99, 112, 112, 67, 108, 101, 97, 110, 82, 117, 108, -101, 115, 44, 45, 45, 32, 68, 32, 99, 108, 101, 97, 110, 32, 99, 111, 100, 101, 32, 105, 115, 32, 105, 100, 101, 110, 116, 105, 99, 97, 108, 32, -116, 111, 32, 67, 47, 67, 43, 43, 10, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, 108, 100, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, -101, 46, 112, 114, 101, 76, 105, 110, 107, 82, 117, 108, 101, 115, 44, 10, 109, 46, 109, 97, 107, 101, 46, 100, 70, 105, 108, 101, 82, 117, 108, 101, -115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 103, 101, 110, 101, 114, 97, 116, -101, 40, 112, 114, 106, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, -107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, - 46, 98, 117, 105, 108, 100, 82, 117, 108, 101, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 32, 36, - 40, 83, 79, 85, 82, 67, 69, 70, 73, 76, 69, 83, 41, 32, 36, 40, 76, 68, 68, 69, 80, 83, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, - 64, 101, 99, 104, 111, 32, 66, 117, 105, 108, 100, 105, 110, 103, 32, 37, 115, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 95, 112, - 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 66, 85, 73, 76, 68, 67, 77, 68, 41, 39, 41, 10, 95, 112, 40, 39, - 92, 116, 36, 40, 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 109, 97, 107, 101, 46, 108, 105, 110, 107, 82, 117, 108, 101, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, - 71, 69, 84, 41, 58, 32, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 32, 36, 40, 76, 68, 68, 69, 80, 83, 41, 39, 41, 10, 95, 112, 40, - 39, 92, 116, 64, 101, 99, 104, 111, 32, 76, 105, 110, 107, 105, 110, 103, 32, 37, 115, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, - 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 76, 73, 78, 75, 67, 77, 68, 41, 39, 41, 10, 95, 112, 40, - 39, 92, 116, 36, 40, 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, - 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 61, 32, 109, 46, 109, 97, 107, 101, 46, 115, 101, -112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 105, 102, 32, 115, 101, 112, 97, 114, 97, -116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 61, 61, 32, 34, 97, 108, 108, 34, 32, 116, 104, 101, 110, 10, 109, 46, 109, 97, -107, 101, 46, 108, 105, 110, 107, 82, 117, 108, 101, 40, 112, 114, 106, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 101, 112, 97, 114, 97, 116, 101, - 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 61, 61, 32, 34, 110, 111, 110, 101, 34, 32, 116, 104, 101, 110, 10, 109, 46, 109, 97, 107, -101, 46, 98, 117, 105, 108, 100, 82, 117, 108, 101, 40, 112, 114, 106, 41, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 95, 120, 40, 39, -105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, - 97, 109, 101, 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 61, 61, 32, - 34, 70, 105, 108, 101, 34, 32, 116, 104, 101, 110, 10, 109, 46, 109, 97, 107, 101, 46, 108, 105, 110, 107, 82, 117, 108, 101, 40, 112, 114, 106, 41, - 10, 101, 108, 115, 101, 10, 109, 46, 109, 97, 107, 101, 46, 98, 117, 105, 108, 100, 82, 117, 108, 101, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, - 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 100, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, -111, 99, 97, 108, 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 61, 32, 109, 46, 109, 97, 107, -101, 46, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 105, 102, 32, 115, 101, -112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 126, 61, 32, 34, 110, 111, 110, 101, 34, 32, 116, 104, 101, 110, - 10, 109, 97, 107, 101, 46, 99, 112, 112, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 99, 112, 112, 44, 32, 34, 115, 116, 97, 110, 100, 97, 114, 100, 70, 105, 108, 101, 82, 117, 108, -101, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, -105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 100, 102, 105, 108, 101, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, -101, 110, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 68, 67, 41, 32, 36, 40, 65, 76, 76, 95, 68, - 70, 76, 65, 71, 83, 41, 32, 36, 40, 79, 85, 84, 80, 85, 84, 70, 76, 65, 71, 41, 32, 45, 99, 32, 36, 60, 39, 41, 10, 101, 108, 115, -101, 10, 111, 108, 100, 102, 110, 40, 112, 114, 106, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 46, 111, 118, -101, 114, 114, 105, 100, 101, 40, 109, 97, 107, 101, 44, 32, 34, 102, 105, 108, 101, 84, 121, 112, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 111, 108, 100, 102, 110, 44, 32, 110, 111, 100, 101, 41, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 100, 102, 105, 108, 101, 40, 110, -111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 111, 98, 106, 101, 99, 116, -115, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 101, -110, 100, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 109, 97, 107, 101, 46, 100, 84, 111, 111, 108, 115, - 44, 10, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 44, 10, 109, 46, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 44, 10, 109, 97, -107, 101, 46, 111, 98, 106, 100, 105, 114, 44, 10, 109, 46, 109, 97, 107, 101, 46, 118, 101, 114, 115, 105, 111, 110, 115, 44, 10, 109, 46, 109, 97, -107, 101, 46, 100, 101, 98, 117, 103, 44, 10, 109, 46, 109, 97, 107, 101, 46, 105, 109, 112, 111, 114, 116, 115, 44, 10, 109, 46, 109, 97, 107, 101, - 46, 115, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 115, 44, 10, 109, 46, 109, 97, 107, 101, 46, 100, 70, 108, 97, 103, 115, 44, 10, 109, - 97, 107, 101, 46, 108, 105, 98, 115, 44, 10, 109, 97, 107, 101, 46, 108, 100, 68, 101, 112, 115, 44, 10, 109, 97, 107, 101, 46, 108, 100, 70, 108, - 97, 103, 115, 44, 10, 109, 46, 109, 97, 107, 101, 46, 108, 105, 110, 107, 67, 109, 100, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 66, 117, 105, -108, 100, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 112, 114, 101, 76, 105, 110, 107, 67, 109, 100, 115, 44, 10, 109, 97, 107, 101, 46, 112, -111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 109, 46, 109, 97, 107, 101, 46, 97, 108, 108, 82, 117, 108, 101, 115, 44, 10, 109, - 97, 107, 101, 46, 115, 101, 116, 116, 105, 110, 103, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, - 97, 107, 101, 46, 99, 111, 110, 102, 105, 103, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, -101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, -108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 91, 95, 79, 80, 84, 73, 79, 78, 83, 46, 100, 99, 32, 111, 114, 32, 99, 102, -103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 34, 100, 109, 100, 34, 93, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, -101, 116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, 111, 108, 115, 101, 116, 32, 39, - 34, 32, 43, 32, 40, 95, 79, 80, 84, 73, 79, 78, 83, 46, 100, 99, 32, 111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 41, - 32, 43, 32, 34, 39, 34, 41, 10, 101, 110, 100, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, - 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, - 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 99, 111, 110, 102, 105, 103, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 100, 84, 111, 111, 108, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, -111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 100, 99, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, -112, 40, 39, 32, 32, 68, 67, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 116, 97, 114, 103, 101, 116, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 61, 61, 32, 34, 70, 105, -108, 101, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 79, 85, 84, 80, 85, 84, 70, 76, 65, 71, 32, 61, 32, 37, 115, 39, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 40, 39, 34, 36, 64, 34, 39, 41, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 118, 101, 114, 115, 105, 111, 110, 115, 40, 99, 102, 103, - 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 86, 69, 82, 83, 73, 79, 78, 83, 32, 43, 61, 37, 115, 39, 44, - 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 118, 101, 114, 115, 105, 111, 110, 115, 40, 99, -102, 103, 46, 118, 101, 114, 115, 105, 111, 110, 99, 111, 110, 115, 116, 97, 110, 116, 115, 44, 32, 99, 102, 103, 46, 118, 101, 114, 115, 105, 111, 110, -108, 101, 118, 101, 108, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 100, 101, 98, -117, 103, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 68, 69, 66, 85, 71, 32, 43, 61, 37, -115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 100, 101, 98, 117, 103, 40, 99, -102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 44, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 108, 101, 118, 101, -108, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 105, 109, 112, 111, 114, 116, 115, - 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 105, 109, 112, 111, 114, 116, 115, 32, 61, 32, 112, - 46, 101, 115, 99, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, - 99, 102, 103, 46, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 41, 41, 10, 95, 112, 40, 39, 32, 32, 73, 77, 80, 79, 82, 84, 83, 32, 43, - 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, 40, 105, 109, 112, 111, 114, 116, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 115, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 115, 40, 99, 102, 103, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 115, 32, 61, 32, -112, 46, 101, 115, 99, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, 100, 105, 114, -115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 41, 41, 10, 95, 112, - 40, 39, 32, 32, 83, 84, 82, 73, 78, 71, 73, 77, 80, 79, 82, 84, 83, 32, 43, 61, 37, 115, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, -115, 116, 40, 115, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 109, 97, 107, 101, 46, 100, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, - 32, 32, 65, 76, 76, 95, 68, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 68, 70, 76, 65, 71, 83, 41, 37, 115, 32, 36, 40, 86, 69, - 82, 83, 73, 79, 78, 83, 41, 32, 36, 40, 68, 69, 66, 85, 71, 41, 32, 36, 40, 73, 77, 80, 79, 82, 84, 83, 41, 32, 36, 40, 83, 84, - 82, 73, 78, 71, 73, 77, 80, 79, 82, 84, 83, 41, 32, 36, 40, 65, 82, 67, 72, 41, 39, 44, 32, 109, 97, 107, 101, 46, 108, 105, 115, 116, - 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 100, 102, 108, 97, 103, 115, 40, 99, 102, -103, 41, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 108, 105, 110, 107, 67, 109, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 61, 61, 32, 34, 70, 105, -108, 101, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 76, 73, 78, 75, 67, 77, 68, 32, 61, 32, 36, 40, 68, 67, 41, 32, 39, - 32, 46, 46, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 40, 34, 36, 40, 84, 65, 82, 71, 69, 84, 41, - 34, 41, 32, 46, 46, 32, 39, 32, 36, 40, 65, 76, 76, 95, 76, 68, 70, 76, 65, 71, 83, 41, 32, 36, 40, 76, 73, 66, 83, 41, 32, 36, - 40, 79, 66, 74, 69, 67, 84, 83, 41, 39, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 32, 32, 66, 85, 73, 76, 68, 67, 77, 68, 32, - 61, 32, 36, 40, 68, 67, 41, 32, 39, 32, 46, 46, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 40, 34, - 36, 40, 84, 65, 82, 71, 69, 84, 41, 34, 41, 32, 46, 46, 32, 39, 32, 36, 40, 65, 76, 76, 95, 68, 70, 76, 65, 71, 83, 41, 32, 36, - 40, 65, 76, 76, 95, 76, 68, 70, 76, 65, 71, 83, 41, 32, 36, 40, 76, 73, 66, 83, 41, 32, 36, 40, 83, 79, 85, 82, 67, 69, 70, 73, - 76, 69, 83, 41, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 97, -108, 108, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 111, 109, -112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 61, 61, 32, 34, 70, 105, 108, 101, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, - 39, 97, 108, 108, 58, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 32, 112, 114, 101, - 98, 117, 105, 108, 100, 32, 112, 114, 101, 108, 105, 110, 107, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, 41, 10, 101, 108, 115, 101, 10, 95, -112, 40, 39, 97, 108, 108, 58, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 32, 112, 114, 101, 98, 117, 105, 108, 100, 32, 112, 114, -101, 108, 105, 110, 107, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 92, 116, 64, 58, 39, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 46, 111, 98, 106, 101, 99, 116, 115, 40, 112, 114, 106, - 41, 10, 108, 111, 99, 97, 108, 32, 114, 111, 111, 116, 32, 61, 32, 123, 32, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 115, 61, 123, 125, 44, - 32, 111, 98, 106, 101, 99, 116, 115, 61, 123, 125, 32, 125, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 123, 125, - 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, -114, 106, 41, 32, 100, 111, 10, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, 32, 61, 32, 123, 32, 115, 111, 117, 114, 99, 101, 102, 105, -108, 101, 115, 61, 123, 125, 44, 32, 111, 98, 106, 101, 99, 116, 115, 61, 123, 125, 32, 125, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 116, -114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 112, - 46, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 102, 103, 32, - 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 105, 110, 97, 108, 108, 32, 61, 32, 116, 114, 117, 101, 10, 108, 111, 99, 97, 108, 32, 99, 117, -115, 116, 111, 109, 32, 61, 32, 102, 97, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, -101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, - 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, -103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 97, 110, 100, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, - 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 105, 110, 99, 102, 103, 91, - 99, 102, 103, 93, 32, 61, 32, 102, 105, 108, 101, 99, 102, 103, 10, 99, 117, 115, 116, 111, 109, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 10, 101, -108, 115, 101, 10, 105, 110, 97, 108, 108, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, - 32, 99, 117, 115, 116, 111, 109, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 116, 104, 46, 105, 115, 100, 102, 105, 108, 101, - 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, -111, 99, 97, 108, 32, 115, 111, 117, 114, 99, 101, 110, 97, 109, 101, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 10, 108, -111, 99, 97, 108, 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 32, 61, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 34, 32, 46, - 46, 32, 110, 111, 100, 101, 46, 111, 98, 106, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 111, 34, 10, 105, 102, 32, 105, 110, 97, 108, 108, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 111, 111, 116, 46, 115, 111, 117, 114, 99, 101, 102, 105, 108, -101, 115, 44, 32, 115, 111, 117, 114, 99, 101, 110, 97, 109, 101, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 111, 111, -116, 46, 111, 98, 106, 101, 99, 116, 115, 44, 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, - 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, -111, 10, 105, 102, 32, 105, 110, 99, 102, 103, 91, 99, 102, 103, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, 46, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 115, 44, 32, 115, 111, 117, 114, - 99, 101, 110, 97, 109, 101, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, - 93, 46, 111, 98, 106, 101, 99, 116, 115, 44, 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, -111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 105, 110, - 99, 102, 103, 91, 99, 102, 103, 93, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, -117, 116, 112, 117, 116, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 112, 114, 106, 44, - 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 91, 49, 93, 41, 10, 105, 102, 32, 112, 97, 116, -104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 111, 117, 116, 112, 117, 116, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 111, 110, 102, 105, 103, 115, 91, 99, 102, 103, 93, 46, 111, 98, 106, 101, 99, 116, 115, 44, 32, 111, -117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 108, 111, - 99, 97, 108, 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 61, 32, 109, 46, 109, 97, 107, 101, - 46, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 118, 97, 114, 44, 32, 108, 105, 115, 116, 41, 10, 95, 112, 40, 39, 37, 115, - 32, 92, 92, 39, 44, 32, 118, 97, 114, 41, 10, 102, 111, 114, 32, 95, 44, 32, 111, 98, 106, 101, 99, 116, 110, 97, 109, 101, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 108, 105, 115, 116, 41, 32, 100, 111, 10, 95, 120, 40, 39, 92, 116, 37, 115, 32, 92, 92, 39, 44, 32, 111, 98, -106, 101, 99, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 115, 101, 112, 97, -114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 126, 61, 32, 34, 97, 108, 108, 34, 32, 116, 104, 101, 110, 10, 108, 105, -115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 39, 83, 79, 85, 82, 67, 69, 70, 73, 76, 69, 83, 32, 58, 61, 39, 44, 32, 114, 111, 111, 116, - 46, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 115, 41, 10, 101, 110, 100, 10, 105, 102, 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, -112, 105, 108, 97, 116, 105, 111, 110, 32, 126, 61, 32, 34, 110, 111, 110, 101, 34, 32, 116, 104, 101, 110, 10, 108, 105, 115, 116, 111, 98, 106, 101, - 99, 116, 115, 40, 39, 79, 66, 74, 69, 67, 84, 83, 32, 58, 61, 39, 44, 32, 114, 111, 111, 116, 46, 111, 98, 106, 101, 99, 116, 115, 44, 32, - 39, 111, 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, - 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 99, 111, 110, -102, 105, 103, 115, 91, 99, 102, 103, 93, 10, 105, 102, 32, 40, 35, 102, 105, 108, 101, 115, 46, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 115, - 32, 62, 32, 48, 32, 97, 110, 100, 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 126, 61, 32, - 34, 97, 108, 108, 34, 41, 32, 111, 114, 32, 40, 35, 102, 105, 108, 101, 115, 46, 111, 98, 106, 101, 99, 116, 115, 32, 62, 32, 48, 32, 97, 110, -100, 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 126, 61, 32, 34, 110, 111, 110, 101, 34, 41, - 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, - 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 105, 102, 32, 35, 102, 105, 108, 101, 115, 46, 115, 111, 117, 114, 99, 101, 102, -105, 108, 101, 115, 32, 62, 32, 48, 32, 97, 110, 100, 32, 115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, - 32, 126, 61, 32, 34, 97, 108, 108, 34, 32, 116, 104, 101, 110, 10, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 39, 32, 32, 83, 79, - 85, 82, 67, 69, 70, 73, 76, 69, 83, 32, 43, 61, 39, 44, 32, 102, 105, 108, 101, 115, 46, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 115, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 102, 105, 108, 101, 115, 46, 111, 98, 106, 101, 99, 116, 115, 32, 62, 32, 48, 32, 97, 110, 100, 32, -115, 101, 112, 97, 114, 97, 116, 101, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 32, 126, 61, 32, 34, 110, 111, 110, 101, 34, 32, 116, 104, -101, 110, 10, 108, 105, 115, 116, 111, 98, 106, 101, 99, 116, 115, 40, 39, 32, 32, 79, 66, 74, 69, 67, 84, 83, 32, 43, 61, 39, 44, 32, 102, -105, 108, 101, 115, 46, 111, 98, 106, 101, 99, 116, 115, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, }; - -// d/actions/vcxproj.lua -static const unsigned char builtin_script_77[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 114, 101, 113, 117, 105, 114, 101, 32, 40, 34, 118, 115, 116, 117, -100, 105, 111, 34, 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 100, 46, 118, 99, 50, 48, 49, 48, 32, 61, 32, 123, 125, 10, 108, 111, - 99, 97, 108, 32, 118, 99, 50, 48, 49, 48, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 10, 108, 111, - 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 100, 46, 118, 99, 50, 48, 49, 48, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, -117, 100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 118, 99, 50, 48, 49, 48, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, - 50, 48, 49, 48, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 112, 46, 111, -118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 99, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, -102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 116, 101, 109, 115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, 89, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 105, 116, 101, 109, 115, 44, 32, 109, 46, 100, 67, 111, 109, 112, 105, 108, 101, 114, 41, - 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 105, 116, 101, 109, 115, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 100, 67, 111, 109, 112, 105, 108, 101, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 99, 32, 61, 32, 110, 105, 108, 10, -105, 102, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 100, 99, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 99, 77, 97, 112, 32, - 61, 32, 123, 10, 91, 34, 100, 109, 100, 34, 93, 32, 61, 32, 34, 68, 77, 68, 34, 44, 10, 91, 34, 108, 100, 99, 34, 93, 32, 61, 32, 34, - 76, 68, 67, 34, 44, 10, 125, 10, 100, 99, 32, 61, 32, 100, 99, 77, 97, 112, 91, 95, 79, 80, 84, 73, 79, 78, 83, 46, 100, 99, 93, 10, -101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 85, 115, 101, 76, 68, 67, 32, 116, 104, 101, 110, 10, 100, 99, 32, - 61, 32, 34, 76, 68, 67, 34, 10, 101, 110, 100, 10, 105, 102, 32, 100, 99, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, -110, 100, 32, 61, 61, 32, 112, 46, 78, 79, 78, 69, 32, 111, 114, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 77, 65, - 75, 69, 70, 73, 76, 69, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 40, - 99, 102, 103, 44, 32, 112, 97, 116, 104, 46, 105, 115, 100, 102, 105, 108, 101, 41, 32, 111, 114, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, - 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, - 67, 111, 109, 112, 105, 108, 101, 114, 34, 44, 32, 110, 105, 108, 44, 32, 100, 99, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 118, 99, 50, - 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 67, 111, 109, 112, 105, 108, 101, 114, 34, 44, 32, 110, 105, 108, 44, 32, 100, 99, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 34, 44, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 116, 101, 109, -115, 32, 61, 32, 111, 108, 100, 102, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, - 85, 84, 73, 76, 73, 84, 89, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 97, 102, 116, 101, 114, 40, 105, -116, 101, 109, 115, 44, 32, 118, 99, 50, 48, 49, 48, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 44, 32, 109, 46, 100, 67, 111, 109, 112, 105, -108, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 105, 116, 101, 109, 115, 10, 101, 110, 100, 41, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 115, 46, 100, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, -116, 117, 114, 110, 32, 123, 10, 109, 46, 100, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 44, 10, 109, 46, 100, 73, 109, 112, 111, 114, -116, 80, 97, 116, 104, 115, 44, 10, 109, 46, 100, 83, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 44, 10, 109, 46, -100, 86, 101, 114, 115, 105, 111, 110, 67, 111, 110, 115, 116, 97, 110, 116, 115, 44, 10, 109, 46, 100, 68, 101, 98, 117, 103, 67, 111, 110, 115, 116, - 97, 110, 116, 115, 44, 10, 109, 46, 100, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 77, 111, 100, 101, 108, 44, 10, 109, 46, 100, 80, 114, -101, 115, 101, 114, 118, 101, 83, 111, 117, 114, 99, 101, 80, 97, 116, 104, 44, 10, 109, 46, 100, 82, 117, 110, 116, 105, 109, 101, 44, 10, 109, 46, -100, 67, 111, 100, 101, 71, 101, 110, 101, 114, 97, 116, 105, 111, 110, 44, 10, 109, 46, 100, 76, 97, 110, 103, 117, 97, 103, 101, 44, 10, 109, 46, -100, 77, 101, 115, 115, 97, 103, 101, 115, 44, 10, 109, 46, 100, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 44, 10, 109, 46, 100, - 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 44, 10, 125, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 67, 111, 109, 112, 105, 108, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, -105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 112, 97, 116, 104, 46, 105, 115, 100, 102, 105, 108, 101, 41, 32, 116, 104, -101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 67, 111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, -114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 100, 67, 111, 109, 112, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 112, 46, -112, 111, 112, 40, 39, 60, 47, 68, 67, 111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 118, 99, 50, 48, 49, - 48, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 68, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 32, - 32, 32, 32, 32, 32, 61, 32, 34, 68, 67, 111, 109, 112, 105, 108, 101, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, -123, 32, 34, 46, 100, 34, 32, 125, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, 32, 51, 44, 10, 101, 109, 105, 116, 70, 105, -108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, - 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 118, - 99, 50, 48, 49, 48, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 44, 10, 109, 46, 100, 79, 112, 116, 105, -109, 105, 122, 97, 116, 105, 111, 110, 44, 10, 109, 46, 100, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 44, 10, 109, 46, 100, 83, 116, 114, -105, 110, 103, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 44, 10, 109, 46, 100, 86, 101, 114, 115, 105, 111, 110, 67, 111, 110, 115, 116, 97, -110, 116, 115, 44, 10, 109, 46, 100, 68, 101, 98, 117, 103, 67, 111, 110, 115, 116, 97, 110, 116, 115, 44, 10, 109, 46, 100, 67, 111, 109, 112, 105, -108, 97, 116, 105, 111, 110, 77, 111, 100, 101, 108, 44, 10, 109, 46, 100, 80, 114, 101, 115, 101, 114, 118, 101, 83, 111, 117, 114, 99, 101, 80, 97, -116, 104, 44, 10, 109, 46, 100, 82, 117, 110, 116, 105, 109, 101, 44, 10, 109, 46, 100, 67, 111, 100, 101, 71, 101, 110, 101, 114, 97, 116, 105, 111, -110, 44, 10, 109, 46, 100, 76, 97, 110, 103, 117, 97, 103, 101, 44, 10, 109, 46, 100, 77, 101, 115, 115, 97, 103, 101, 115, 44, 10, 109, 46, 100, - 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 44, 10, 109, 46, 100, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, -105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 118, 99, 50, 48, - 49, 48, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 118, - 99, 50, 48, 49, 48, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 68, 67, 111, -109, 112, 105, 108, 101, 34, 44, 32, 123, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 125, 44, 32, 102, 105, 108, 101, 67, -102, 103, 70, 117, 110, 99, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, -112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 68, 67, 111, 109, 112, 105, 108, 101, 34, 41, 10, 101, 110, 100, 10, 125, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 79, 102, 102, 61, 34, 102, 97, 108, 115, -101, 34, 44, 32, 79, 110, 61, 34, 116, 114, 117, 101, 34, 44, 32, 68, 101, 98, 117, 103, 61, 34, 102, 97, 108, 115, 101, 34, 44, 32, 70, 117, -108, 108, 61, 34, 116, 114, 117, 101, 34, 44, 32, 83, 105, 122, 101, 61, 34, 116, 114, 117, 101, 34, 44, 32, 83, 112, 101, 101, 100, 61, 34, 116, -114, 117, 101, 34, 32, 125, 10, 105, 102, 32, 99, 102, 103, 46, 111, 112, 116, 105, 109, 105, 122, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, - 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 79, 112, 116, 105, 109, 105, 122, 101, 114, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, -110, 44, 32, 109, 97, 112, 91, 99, 102, 103, 46, 111, 112, 116, 105, 109, 105, 122, 101, 93, 32, 111, 114, 32, 34, 102, 97, 108, 115, 101, 34, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, - 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 105, 109, 112, 111, 114, 116, 100, 105, -114, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, -102, 103, 46, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, - 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 37, 115, 59, 37, 37, 40, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 41, 34, 44, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 83, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 80, 97, 116, -104, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 116, 114, 105, 110, 103, -105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, -100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, -105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, 100, 105, 114, -115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 83, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 44, 32, 34, 37, 115, 59, 37, 37, 40, 83, 116, 114, 105, 110, 103, 73, 109, 112, 111, 114, 116, 80, 97, 116, 104, 115, 41, 34, 44, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 86, 101, 114, 115, 105, 111, 110, 67, 111, 110, 115, 116, 97, 110, 116, -115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 118, 101, 114, 115, 105, 111, 110, - 99, 111, 110, 115, 116, 97, 110, 116, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 118, 101, 114, 115, 105, 111, 110, 99, 111, 110, 115, 116, 97, -110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 99, 111, 110, 115, 116, 97, -110, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 118, 101, 114, 115, 105, 111, 110, 99, 111, -110, 115, 116, 97, 110, 116, 115, 44, 32, 34, 59, 34, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 86, 101, -114, 115, 105, 111, 110, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 118, 101, -114, 115, 105, 111, 110, 99, 111, 110, 115, 116, 97, 110, 116, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 100, 68, 101, 98, 117, 103, 67, 111, 110, 115, 116, 97, 110, 116, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, -110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 32, 97, 110, 100, 32, 35, 99, 102, -103, 46, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, -103, 46, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 44, 32, 34, 59, 34, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, -101, 109, 101, 110, 116, 40, 34, 68, 101, 98, 117, 103, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 44, 32, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 100, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 77, 111, 100, 101, 108, 40, 99, 102, 103, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, -108, 32, 97, 110, 100, 32, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 32, 126, 61, 32, 34, 68, -101, 102, 97, 117, 108, 116, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, 109, -112, 105, 108, 97, 116, 105, 111, 110, 77, 111, 100, 101, 108, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 99, -111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 109, 111, 100, 101, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 100, 80, 114, 101, 115, 101, 114, 118, 101, 83, 111, 117, 114, 99, 101, 80, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 82, 101, 116, 97, 105, 110, 80, 97, 116, 104, 115, - 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 115, 101, 114, 118, 101, 83, 111, -117, 114, 99, 101, 80, 97, 116, 104, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 82, 117, 110, 116, 105, 109, 101, 40, 99, 102, 103, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 79, 109, 105, 116, 68, 101, 102, 97, 117, -108, 116, 76, 105, 98, 114, 97, 114, 121, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, - 82, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 78, 111, 110, -101, 34, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, -110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 108, 111, 99, - 97, 108, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 116, 114, 117, 101, 10, 105, 102, 32, 99, 102, 103, 46, 115, -116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, 79, 102, 102, 34, 32, 116, 104, 101, 110, 10, 115, 116, 97, 116, 105, - 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 114, 117, 110, 116, -105, 109, 101, 32, 61, 61, 32, 34, 68, 101, 98, 117, 103, 34, 32, 116, 104, 101, 110, 10, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, -109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, - 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, - 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 40, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, - 97, 110, 100, 32, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, -116, 34, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 97, 110, 100, 32, 99, 102, 103, 46, 114, 117, 110, 116, -105, 109, 101, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 115, 116, 97, 116, 105, 99, -114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, -109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 67, 82, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 77, 117, -108, 116, 105, 84, 104, 114, 101, 97, 100, 101, 100, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, -109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, - 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 82, 117, 110, -116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 77, 117, 108, 116, 105, 84, -104, 114, 101, 97, 100, 101, 100, 68, 101, 98, 117, 103, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, -105, 109, 101, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, - 61, 61, 32, 116, 114, 117, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 82, 117, -110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 77, 117, 108, 116, 105, - 84, 104, 114, 101, 97, 100, 101, 100, 68, 108, 108, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, -109, 101, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, - 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 82, 117, -110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 77, 117, 108, 116, 105, - 84, 104, 114, 101, 97, 100, 101, 100, 68, 101, 98, 117, 103, 68, 108, 108, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 67, 111, 100, 101, 71, 101, 110, 101, 114, 97, 116, 105, 111, 110, 40, 99, 102, -103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 32, 61, 32, 34, 34, 10, -105, 102, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 112, 114, 101, 102, 105, 120, 32, 116, 104, 101, 110, 10, - 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, - 46, 112, 114, 101, 102, 105, 120, 10, 101, 110, 100, 10, 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 32, 61, 32, 79, 98, 106, -101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 32, 46, 46, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, - 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 111, 98, 106, 34, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 98, 117, 105, -108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 117, -116, 100, 105, 114, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 98, 117, 105, -108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 41, 10, 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, -109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 111, 117, 116, 100, 105, 114, 44, 32, 79, 98, 106, 101, 99, 116, 70, 105, 108, -101, 78, 97, 109, 101, 41, 10, 101, 110, 100, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 98, 106, 101, 99, -116, 70, 105, 108, 101, 78, 97, 109, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 79, 98, 106, 101, 99, 116, 70, 105, 108, -101, 78, 97, 109, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 80, 114, 111, 102, 105, 108, 101, 32, -116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 111, 102, 105, 108, 101, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, -103, 115, 46, 80, 114, 111, 102, 105, 108, 101, 71, 67, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 80, 114, 111, 102, 105, 108, 101, 71, 67, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 67, 111, 100, 101, 67, 111, 118, 101, 114, 97, 103, 101, 32, 116, -104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, 118, 101, 114, 97, 103, 101, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, -103, 115, 46, 85, 110, 105, 116, 84, 101, 115, 116, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, - 34, 85, 110, 105, 116, 116, 101, 115, 116, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, -110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 105, 110, 108, 105, 110, 105, 110, 103, 32, 97, 110, 100, 32, 99, 102, 103, 46, 105, 110, 108, 105, 110, -105, 110, 103, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, -115, 32, 61, 32, 123, 10, 68, 105, 115, 97, 98, 108, 101, 100, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 44, 10, 69, 120, 112, 108, 105, 99, -105, 116, 32, 61, 32, 34, 116, 114, 117, 101, 34, 44, 10, 65, 117, 116, 111, 32, 61, 32, 34, 116, 114, 117, 101, 34, 44, 10, 125, 10, 118, 99, - 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 108, 105, 110, 101, 114, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, -110, 44, 32, 116, 121, 112, 101, 115, 91, 99, 102, 103, 46, 105, 110, 108, 105, 110, 105, 110, 103, 93, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, -102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 116, 97, 99, 107, 70, 114, 97, 109, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 116, 97, 99, 107, 70, 114, 97, 109, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, - 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 116, 97, 99, 107, 83, -116, 111, 109, 112, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 116, 97, 99, 107, 83, -116, 111, 109, 112, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, - 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 65, 108, 108, 73, 110, 115, 116, 97, 110, 116, 105, 97, 116, 101, 32, 116, 104, 101, 110, 10, 118, - 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 108, 108, 73, 110, 115, 116, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, 97, 105, -110, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, 97, 105, 110, 34, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 95, 79, 80, 84, 73, 79, 78, 83, - 46, 100, 99, 32, 126, 61, 32, 34, 108, 100, 99, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 85, -115, 101, 76, 68, 67, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, -110, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 101, 120, 116, 77, 97, 112, 32, 61, 32, 123, 10, 65, 86, 88, 32, 61, 32, - 34, 97, 118, 120, 34, 44, 10, 65, 86, 88, 50, 32, 61, 32, 34, 97, 118, 120, 50, 34, 44, 10, 125, 10, 105, 102, 32, 118, 101, 120, 116, 77, - 97, 112, 91, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 93, 32, 126, 61, 32, 110, 105, 108, 32, -116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 80, 85, 65, 114, 99, 104, 105, 116, 101, 99, -116, 117, 114, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 118, 101, 120, 116, 77, 97, 112, 91, 99, 102, 103, 46, 118, 101, - 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, - 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 118, 99, - 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, 98, 117, 103, 67, 111, 100, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 44, 32, 34, 68, 101, 98, 117, 103, 34, 41, 10, 101, 108, 115, 101, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, -116, 40, 34, 68, 101, 98, 117, 103, 67, 111, 100, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 82, 101, 108, 101, 97, -115, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 116, 104, 101, 110, 10, 105, 102, 32, - 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 112, 46, 79, 102, 102, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, 98, 117, 103, 73, 110, 102, 111, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, - 32, 34, 78, 111, 110, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 126, 61, 32, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, - 98, 117, 103, 73, 110, 102, 111, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, -103, 115, 46, 83, 121, 109, 98, 111, 108, 115, 76, 105, 107, 101, 67, 44, 32, 34, 86, 83, 34, 44, 32, 34, 77, 97, 103, 111, 34, 41, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 32, 97, 110, 100, 32, 99, -102, 103, 46, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 32, 116, 104, 101, 110, - 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 79, 102, 102, 34, 44, 10, 83, 97, -102, 101, 79, 110, 108, 121, 32, 61, 32, 34, 83, 97, 102, 101, 79, 110, 108, 121, 34, 44, 10, 79, 110, 32, 61, 32, 34, 79, 110, 34, 44, 10, -125, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 66, 111, 117, 110, 100, 115, 67, 104, 101, 99, 107, 34, 44, 32, - 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 116, 121, 112, 101, 115, 91, 99, 102, 103, 46, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, - 93, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 80, 101, 114, 102, 111, 114, 109, 83, 121, 110, 116, 97, -120, 67, 104, 101, 99, 107, 79, 110, 108, 121, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 80, 101, 114, 102, 111, 114, 109, 83, 121, 110, 116, 97, 120, 67, 104, 101, 99, 107, 79, 110, 108, 121, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, - 76, 97, 110, 103, 117, 97, 103, 101, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, -102, 108, 97, 103, 115, 46, 66, 101, 116, 116, 101, 114, 67, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, -116, 40, 34, 66, 101, 116, 116, 101, 114, 67, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, -101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 112, 114, 101, 118, 105, 101, 119, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, - 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 112, 114, 101, 118, 105, 101, 119, 41, 32, 100, -111, 10, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 100, 105, 112, 50, 53, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 73, 80, 50, 53, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, -101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 100, 105, 112, 49, 48, 48, 48, 34, 32, 116, 104, 101, 110, - 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 73, 80, 49, 48, 48, 48, 34, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 100, 105, 112, - 49, 48, 48, 56, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 73, 80, 49, 48, - 48, 56, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, -112, 116, 32, 61, 61, 32, 34, 102, 105, 101, 108, 100, 119, 105, 115, 101, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, -101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 118, 105, 101, 119, 70, 105, 101, 108, 100, 119, 105, 115, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 100, 116, 111, 114, -102, 105, 101, 108, 100, 115, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, -118, 105, 101, 119, 68, 116, 111, 114, 70, 105, 101, 108, 100, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, -101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 105, 110, 116, 112, 114, 111, 109, 111, 116, 101, 34, 32, 116, -104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 118, 105, 101, 119, 73, 110, 116, 80, 114, -111, 109, 111, 116, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 105, -102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 102, 105, 120, 65, 108, 105, 97, 115, 84, 104, 105, 115, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, - 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 118, 105, 101, 119, 70, 105, 120, 65, 108, 105, 97, 115, 84, 104, 105, 115, - 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 114, 101, 118, 101, 114, 116, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, - 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 114, 101, 118, 101, 114, 116, 41, 32, 100, 111, 10, 105, 102, - 32, 111, 112, 116, 32, 61, 61, 32, 34, 105, 109, 112, 111, 114, 116, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 82, 101, 118, 101, 114, 116, 73, 109, 112, 111, 114, 116, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, - 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 100, 77, 101, 115, 115, 97, 103, 101, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, - 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, - 32, 34, 78, 111, 110, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 97, 110, 100, - 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 32, 116, 104, 101, 110, 10, -118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 70, 97, 116, 97, 108, 67, 111, 109, 112, 105, 108, 101, - 87, 97, 114, 110, 105, 110, 103, 115, 44, 32, 34, 69, 114, 114, 111, 114, 34, 44, 32, 34, 73, 110, 102, 111, 34, 41, 41, 10, 101, 110, 100, 10, -105, 102, 32, 99, 102, 103, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 32, 97, 110, 100, 32, 99, 102, -103, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, - 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, 32, 61, 32, 123, 10, 69, 114, 114, 111, 114, 32, 61, 32, 34, - 69, 114, 114, 111, 114, 34, 44, 10, 87, 97, 114, 110, 32, 61, 32, 34, 73, 110, 102, 111, 34, 44, 10, 65, 108, 108, 111, 119, 32, 61, 32, 34, - 65, 108, 108, 111, 119, 34, 44, 10, 125, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, 112, 114, 101, 99, - 97, 116, 105, 111, 110, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 116, 121, 112, 101, 115, 91, 99, 102, 103, 46, 100, 101, -112, 114, 101, 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 93, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, - 97, 103, 115, 46, 83, 104, 111, 119, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 104, 111, 119, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 34, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 86, -101, 114, 98, 111, 115, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 86, 101, 114, 98, -111, 115, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, - 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 104, 111, 119, 84, 76, 83, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, -101, 109, 101, 110, 116, 40, 34, 83, 104, 111, 119, 84, 76, 83, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, -101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 104, 111, 119, 71, 67, 32, 116, 104, 101, 110, - 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 104, 111, 119, 71, 67, 34, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 73, 103, -110, 111, 114, 101, 80, 114, 97, 103, 109, 97, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 73, 103, 110, 111, 114, 101, 80, 114, 97, 103, 109, 97, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 104, 111, 119, 68, 101, 112, 101, 110, 100, 101, 110, 99, -105, 101, 115, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 104, 111, 119, 68, 101, 112, -101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, -110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, -111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, 105, -111, 110, 41, 32, 100, 111, 10, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 102, 105, 101, 108, 100, 34, 32, 116, 104, 101, 110, 10, 118, 99, - 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 114, 97, 110, 115, 105, 116, 105, 111, 110, 70, 105, 101, 108, 100, 34, 44, 32, - 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 112, 116, 32, 61, 61, - 32, 34, 99, 104, 101, 99, 107, 105, 109, 112, 111, 114, 116, 115, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 84, 114, 97, 110, 115, 105, 116, 105, 111, 110, 67, 104, 101, 99, 107, 73, 109, 112, 111, 114, 116, 115, 34, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, - 99, 111, 109, 112, 108, 101, 120, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 114, - 97, 110, 115, 105, 116, 105, 111, 110, 67, 111, 109, 112, 108, 101, 120, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, -117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -100, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, -102, 32, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 68, 111, 99, 68, 105, 114, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 100, 111, 99, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 111, 99, 70, 105, 108, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, -102, 103, 46, 100, 111, 99, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 112, 114, 101, 118, 105, 101, 119, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, -103, 46, 112, 114, 101, 118, 105, 101, 119, 41, 32, 100, 111, 10, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 109, 97, 114, 107, 100, 111, 119, -110, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 118, 105, 101, 119, 77, - 97, 114, 107, 100, 111, 119, 110, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 116, 114, - 97, 110, 115, 105, 116, 105, 111, 110, 41, 32, 100, 111, 10, 105, 102, 32, 111, 112, 116, 32, 61, 61, 32, 34, 118, 109, 97, 114, 107, 100, 111, 119, -110, 34, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 114, 97, 110, 115, 105, 116, 105, -111, 110, 86, 77, 97, 114, 107, 100, 111, 119, 110, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, -102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, 112, 70, 105, 108, -101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 102, -105, 108, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 32, 116, 104, 101, 110, 10, 118, - 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 72, 101, 97, 100, 101, 114, 68, 105, 114, 34, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, -104, 101, 97, 100, 101, 114, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 72, 101, 97, 100, 101, 114, 70, 105, 108, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 104, 101, 97, 100, -101, 114, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 106, 115, 111, 110, 102, 105, 108, 101, 32, 116, 104, 101, 110, - 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 74, 83, 79, 78, 70, 105, 108, 101, 34, 44, 32, 99, 111, 110, 100, -105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 106, 115, 111, 110, 102, 105, 108, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 100, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, -115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 115, 32, 61, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 76, 111, 119, - 77, 101, 109, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 45, 108, 111, -119, 109, 101, 109, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 97, 110, 100, - 32, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 32, 116, 104, 101, -110, 10, 108, 111, 99, 97, 108, 32, 99, 112, 112, 77, 97, 112, 32, 61, 32, 123, 10, 91, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 93, - 32, 61, 32, 34, 99, 43, 43, 49, 55, 34, 44, 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 107, 101, 101, 112, 32, 116, 104, 105, 115, 32, 117, -112, 32, 116, 111, 32, 100, 97, 116, 101, 32, 62, 95, 60, 10, 91, 34, 67, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 99, 43, 43, 57, 56, - 34, 44, 10, 91, 34, 67, 43, 43, 48, 120, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 49, 34, - 93, 32, 61, 32, 34, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 121, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 52, 34, - 44, 10, 91, 34, 67, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 122, 34, 93, - 32, 61, 32, 34, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 67, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 55, 34, 44, - 10, 91, 34, 103, 110, 117, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 99, 43, 43, 57, 56, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 48, -120, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 99, 43, - 43, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 121, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 103, -110, 117, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 122, 34, 93, 32, - 61, 32, 34, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 99, 43, 43, 49, 55, 34, - 44, 10, 125, 10, 105, 102, 32, 99, 112, 112, 77, 97, 112, 91, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 93, 32, 126, 61, - 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 45, 101, -120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 34, 32, 46, 46, 32, 99, 112, 112, 77, 97, 112, 91, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, -108, 101, 99, 116, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 100, 99, 32, 61, 61, - 32, 34, 108, 100, 99, 34, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 85, 115, 101, 76, 68, 67, 32, 116, 104, 101, 110, 10, -105, 102, 32, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, - 97, 108, 32, 118, 101, 120, 116, 77, 97, 112, 32, 61, 32, 123, 10, 65, 86, 88, 32, 61, 32, 34, 97, 118, 120, 34, 44, 10, 65, 86, 88, 50, - 32, 61, 32, 34, 97, 118, 120, 50, 34, 44, 10, 83, 83, 69, 32, 61, 32, 34, 115, 115, 101, 34, 44, 10, 83, 83, 69, 50, 32, 61, 32, 34, -115, 115, 101, 50, 34, 44, 10, 83, 83, 69, 51, 32, 61, 32, 34, 115, 115, 101, 51, 34, 44, 10, 83, 83, 83, 69, 51, 32, 61, 32, 34, 115, -115, 115, 101, 51, 34, 44, 10, 91, 34, 83, 83, 69, 52, 46, 49, 34, 93, 32, 61, 32, 34, 115, 115, 101, 52, 46, 49, 34, 44, 10, 125, 10, -105, 102, 32, 118, 101, 120, 116, 77, 97, 112, 91, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 93, - 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, - 34, 45, 109, 97, 116, 116, 114, 61, 43, 34, 32, 46, 46, 32, 118, 101, 120, 116, 77, 97, 112, 91, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, -101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 105, 115, 97, -101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 115, 97, 77, 97, 112, - 32, 61, 32, 123, 10, 77, 79, 86, 66, 69, 32, 61, 32, 34, 109, 111, 118, 98, 101, 34, 44, 10, 80, 79, 80, 67, 78, 84, 32, 61, 32, 34, -112, 111, 112, 99, 110, 116, 34, 44, 10, 80, 67, 76, 77, 85, 76, 32, 61, 32, 34, 112, 99, 108, 109, 117, 108, 34, 44, 10, 76, 90, 67, 78, - 84, 32, 61, 32, 34, 108, 122, 99, 110, 116, 34, 44, 10, 66, 77, 73, 32, 61, 32, 34, 98, 109, 105, 34, 44, 10, 66, 77, 73, 50, 32, 61, - 32, 34, 98, 109, 105, 50, 34, 44, 10, 70, 49, 54, 67, 32, 61, 32, 34, 102, 49, 54, 99, 34, 44, 10, 65, 69, 83, 32, 61, 32, 34, 97, -101, 115, 34, 44, 10, 70, 77, 65, 32, 61, 32, 34, 102, 109, 97, 34, 44, 10, 70, 77, 65, 52, 32, 61, 32, 34, 102, 109, 97, 52, 34, 44, - 10, 82, 68, 82, 78, 68, 32, 61, 32, 34, 114, 100, 114, 110, 100, 34, 44, 10, 125, 10, 102, 111, 114, 32, 95, 44, 32, 101, 120, 116, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 105, 115, 97, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 41, 32, 100, 111, 10, 105, -102, 32, 105, 115, 97, 77, 97, 112, 91, 101, 120, 116, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 45, 109, 97, 116, 116, 114, 61, 43, 34, 32, 46, 46, 32, 105, 115, 97, 77, 97, -112, 91, 101, 120, 116, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 99, 111, 109, 112, -117, 116, 101, 116, 97, 114, 103, 101, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 111, 112, 116, 115, 44, 32, 34, 45, 109, 100, 99, 111, 109, 112, 117, 116, 101, 45, 116, 97, 114, 103, 101, 116, 115, 61, 34, 32, 46, 46, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 99, 111, 109, 112, 117, 116, 101, 116, 97, 114, 103, 101, 116, 115, 44, - 32, 39, 44, 39, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 111, 112, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, - 10, 111, 112, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 112, 116, 115, 44, 32, 34, 32, 34, 41, 10, -118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, -115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 32, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, - 79, 112, 116, 105, 111, 110, 115, 41, 39, 44, 32, 111, 112, 116, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// d/actions/visuald.lua -static const unsigned char builtin_script_78[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 109, 111, -100, 117, 108, 101, 115, 46, 100, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 32, 61, 32, 123, 125, 10, 114, 101, 113, 117, 105, 114, 101, 32, 40, - 34, 118, 115, 116, 117, 100, 105, 111, 34, 41, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, -117, 100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 119, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, - 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, - 61, 32, 112, 46, 116, 114, 101, 101, 10, 102, 111, 114, 32, 107, 44, 118, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 123, 32, 34, 118, 115, 50, - 48, 48, 53, 34, 44, 32, 34, 118, 115, 50, 48, 48, 56, 34, 44, 32, 34, 118, 115, 50, 48, 49, 48, 34, 44, 32, 34, 118, 115, 50, 48, 49, - 50, 34, 44, 32, 34, 118, 115, 50, 48, 49, 51, 34, 44, 32, 34, 118, 115, 50, 48, 49, 53, 34, 44, 32, 34, 118, 115, 50, 48, 49, 55, 34, - 44, 32, 34, 118, 115, 50, 48, 49, 57, 34, 32, 125, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 118, 115, 32, 61, 32, 112, 46, 97, 99, -116, 105, 111, 110, 46, 103, 101, 116, 40, 118, 41, 10, 105, 102, 32, 118, 115, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 32, 118, 115, 46, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 44, 32, -112, 46, 68, 32, 41, 10, 118, 115, 46, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 46, 100, 99, 32, 61, 32, 123, 32, 34, 100, 109, 100, - 34, 44, 32, 34, 103, 100, 99, 34, 44, 32, 34, 108, 100, 99, 34, 32, 125, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 115, 44, - 32, 34, 111, 110, 80, 114, 111, 106, 101, 99, 116, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, -106, 41, 10, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 40, 112, 114, 106, - 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 105, 115, 117, 97, 108, 100, -112, 114, 111, 106, 34, 44, 32, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, 100, 10, 101, -110, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 112, 114, 111, 106, 101, 99, 116, 44, 32, - 34, 105, 115, 110, 97, 116, 105, 118, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 40, 112, 114, 106, 41, 32, 111, 114, 32, 111, 108, 100, 102, -110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 41, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 115, 116, 117, 100, 105, 111, 44, 32, - 34, 112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, -114, 106, 41, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 105, 115, 117, 97, 108, 100, 112, 114, 111, -106, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 41, 10, 112, - 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 118, 115, 116, 117, 100, 105, 111, 44, 32, 34, 116, 111, 111, 108, 34, 44, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 40, 112, -114, 106, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 48, 48, 50, 65, 50, 68, 69, 57, 45, 56, 66, 66, 54, 45, 52, - 56, 52, 68, 45, 57, 56, 48, 50, 45, 55, 69, 52, 65, 68, 52, 48, 56, 52, 55, 49, 53, 34, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 101, 110, 100, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, -106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, -118, 105, 115, 117, 97, 108, 100, 46, 104, 101, 97, 100, 101, 114, 44, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 103, 108, 111, 98, 97, 108, -115, 44, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 115, 44, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 102, 105, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, -108, 40, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 32, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, -114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 112, 114, 106, 41, 10, 95, 112, 40, - 39, 60, 47, 68, 80, 114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 118, 105, -115, 117, 97, 108, 100, 46, 104, 101, 97, 100, 101, 114, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 60, 68, 80, 114, 111, 106, 101, 99, 116, 62, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 103, 108, 111, 98, 97, 108, -115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 39, 60, 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 62, 123, 37, 115, 125, 60, 47, - 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 62, 39, 44, 32, 112, 114, 106, 46, 117, 117, 105, 100, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, - 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 80, 108, 97, 116, 102, 111, -114, 109, 32, 61, 32, 112, 46, 101, 115, 99, 40, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 80, 108, 97, 116, 102, 111, -114, 109, 40, 99, 102, 103, 41, 41, 10, 108, 111, 99, 97, 108, 32, 115, 108, 110, 80, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 115, 111, 108, 117, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, - 32, 105, 115, 54, 52, 98, 105, 116, 32, 61, 32, 115, 108, 110, 80, 108, 97, 116, 102, 111, 114, 109, 32, 61, 61, 32, 34, 120, 54, 52, 34, 32, - 45, 45, 32, 84, 79, 68, 79, 58, 32, 116, 104, 105, 115, 32, 115, 101, 101, 109, 115, 32, 108, 105, 107, 101, 32, 97, 32, 104, 97, 99, 107, 10, - 95, 112, 40, 49, 44, 39, 60, 67, 111, 110, 102, 105, 103, 32, 110, 97, 109, 101, 61, 34, 37, 115, 34, 32, 112, 108, 97, 116, 102, 111, 114, 109, - 61, 34, 37, 115, 34, 62, 39, 44, 32, 112, 114, 106, 80, 108, 97, 116, 102, 111, 114, 109, 44, 32, 115, 108, 110, 80, 108, 97, 116, 102, 111, 114, -109, 41, 10, 95, 112, 40, 50, 44, 39, 60, 111, 98, 106, 62, 48, 60, 47, 111, 98, 106, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 108, -105, 110, 107, 62, 48, 60, 47, 108, 105, 110, 107, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 87, 105, 110, 100, 111, 119, 115, 32, 61, - 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 105, 115, 68, 101, 98, 117, 103, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 105, -110, 100, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 39, 68, 101, 98, 117, 103, 39, 41, 32, 126, 61, 32, 110, 105, 108, - 10, 108, 111, 99, 97, 108, 32, 105, 115, 79, 112, 116, 105, 109, 105, 115, 101, 100, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, -116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, - 32, 112, 46, 67, 79, 78, 83, 79, 76, 69, 65, 80, 80, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 108, 105, 98, 62, 48, 60, - 47, 108, 105, 98, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 115, 117, 98, 115, 121, 115, 116, 101, 109, 62, 49, 60, 47, 115, 117, 98, 115, -121, 115, 116, 101, 109, 62, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, - 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 108, 105, 98, 62, 49, 60, 47, 108, 105, 98, 62, 39, - 41, 10, 95, 112, 40, 50, 44, 39, 60, 115, 117, 98, 115, 121, 115, 116, 101, 109, 62, 48, 60, 47, 115, 117, 98, 115, 121, 115, 116, 101, 109, 62, - 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, - 66, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 108, 105, 98, 62, 50, 60, 47, 108, 105, 98, 62, 39, 41, 10, 95, 112, 40, 50, - 44, 39, 60, 115, 117, 98, 115, 121, 115, 116, 101, 109, 62, 48, 60, 47, 115, 117, 98, 115, 121, 115, 116, 101, 109, 62, 39, 41, 32, 45, 45, 32, - 83, 72, 79, 85, 76, 68, 32, 84, 72, 73, 83, 32, 66, 69, 32, 39, 50, 39, 32, 40, 119, 105, 110, 100, 111, 119, 115, 41, 63, 63, 10, 101, -108, 115, 101, 10, 95, 112, 40, 50, 44, 39, 60, 108, 105, 98, 62, 48, 60, 47, 108, 105, 98, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, -115, 117, 98, 115, 121, 115, 116, 101, 109, 62, 50, 60, 47, 115, 117, 98, 115, 121, 115, 116, 101, 109, 62, 39, 41, 10, 105, 115, 87, 105, 110, 100, -111, 119, 115, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 60, 109, 117, 108, 116, 105, 111, 98, 106, 62, 48, - 60, 47, 109, 117, 108, 116, 105, 111, 98, 106, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 115, 105, 110, 103, 108, 101, 70, 105, 108, 101, 67, -111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 62, 48, 60, 47, 115, 105, 110, 103, 108, 101, 70, 105, 108, 101, 67, 111, 109, 112, 105, 108, 97, 116, -105, 111, 110, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 111, 110, 101, 111, 98, 106, 62, 48, 60, 47, 111, 110, 101, 111, 98, 106, 62, 39, - 41, 10, 95, 112, 40, 50, 44, 39, 60, 116, 114, 97, 99, 101, 62, 37, 115, 60, 47, 116, 114, 97, 99, 101, 62, 39, 44, 32, 105, 105, 102, 40, - 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 80, 114, 111, 102, 105, 108, 101, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, - 40, 50, 44, 39, 60, 113, 117, 105, 101, 116, 62, 37, 115, 60, 47, 113, 117, 105, 101, 116, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, -102, 108, 97, 103, 115, 46, 81, 117, 105, 101, 116, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 118, -101, 114, 98, 111, 115, 101, 62, 37, 115, 60, 47, 118, 101, 114, 98, 111, 115, 101, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, - 97, 103, 115, 46, 86, 101, 114, 98, 111, 115, 101, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 118, -116, 108, 115, 62, 48, 60, 47, 118, 116, 108, 115, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 115, 121, 109, 100, 101, 98, 117, 103, 62, 37, -115, 60, 47, 115, 121, 109, 100, 101, 98, 117, 103, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, - 61, 32, 112, 46, 79, 78, 32, 111, 114, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 34, 70, 97, 115, 116, 76, 105, -110, 107, 34, 32, 111, 114, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 34, 70, 117, 108, 108, 34, 44, 32, 105, 105, -102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 121, 109, 98, 111, 108, 115, 76, 105, 107, 101, 67, 44, 32, 39, 50, 39, 44, 32, 39, - 49, 39, 41, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 111, 112, 116, 105, 109, 105, 122, 101, 62, 37, 115, 60, 47, 111, -112, 116, 105, 109, 105, 122, 101, 62, 39, 44, 32, 105, 105, 102, 40, 105, 115, 79, 112, 116, 105, 109, 105, 115, 101, 100, 44, 32, 39, 49, 39, 44, - 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 99, 112, 117, 62, 48, 60, 47, 99, 112, 117, 62, 39, 41, 10, 95, 112, 40, 50, - 44, 39, 60, 105, 115, 88, 56, 54, 95, 54, 52, 62, 37, 115, 60, 47, 105, 115, 88, 56, 54, 95, 54, 52, 62, 39, 44, 32, 105, 105, 102, 40, -105, 115, 54, 52, 98, 105, 116, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 105, 115, 76, 105, 110, -117, 120, 62, 48, 60, 47, 105, 115, 76, 105, 110, 117, 120, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 105, 115, 79, 83, 88, 62, 48, 60, - 47, 105, 115, 79, 83, 88, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 105, 115, 87, 105, 110, 100, 111, 119, 115, 62, 37, 115, 60, 47, 105, -115, 87, 105, 110, 100, 111, 119, 115, 62, 39, 44, 32, 105, 105, 102, 40, 105, 115, 87, 105, 110, 100, 111, 119, 115, 44, 32, 39, 49, 39, 44, 32, - 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 105, 115, 70, 114, 101, 101, 66, 83, 68, 62, 48, 60, 47, 105, 115, 70, 114, 101, 101, - 66, 83, 68, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 105, 115, 83, 111, 108, 97, 114, 105, 115, 62, 48, 60, 47, 105, 115, 83, 111, 108, - 97, 114, 105, 115, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 115, 99, 104, 101, 100, 117, 108, 101, 114, 62, 48, 60, 47, 115, 99, 104, 101, -100, 117, 108, 101, 114, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 68, 101, 112, 114, 101, 99, 97, 116, 101, 100, 62, 37, 115, - 60, 47, 117, 115, 101, 68, 101, 112, 114, 101, 99, 97, 116, 101, 100, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 100, 101, 112, 114, 101, - 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 32, 61, 61, 32, 34, 65, 108, 108, 111, 119, 34, 44, 32, 39, 49, 39, 44, 32, 39, - 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 101, 114, 114, 68, 101, 112, 114, 101, 99, 97, 116, 101, 100, 62, 48, 60, 47, 101, 114, 114, - 68, 101, 112, 114, 101, 99, 97, 116, 101, 100, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 65, 115, 115, 101, 114, 116, 62, 48, - 60, 47, 117, 115, 101, 65, 115, 115, 101, 114, 116, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 73, 110, 118, 97, 114, 105, 97, -110, 116, 115, 62, 48, 60, 47, 117, 115, 101, 73, 110, 118, 97, 114, 105, 97, 110, 116, 115, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, -115, 101, 73, 110, 62, 48, 60, 47, 117, 115, 101, 73, 110, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 79, 117, 116, 62, 48, - 60, 47, 117, 115, 101, 79, 117, 116, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 65, 114, 114, 97, 121, 66, 111, 117, 110, 100, -115, 62, 48, 60, 47, 117, 115, 101, 65, 114, 114, 97, 121, 66, 111, 117, 110, 100, 115, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 110, 111, - 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 62, 37, 115, 60, 47, 110, 111, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 62, 39, 44, - 32, 105, 105, 102, 40, 99, 102, 103, 46, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 32, 61, 61, 32, 34, 79, 102, 102, 34, 44, 32, 39, - 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 83, 119, 105, 116, 99, 104, 69, 114, 114, 111, 114, 62, - 48, 60, 47, 117, 115, 101, 83, 119, 105, 116, 99, 104, 69, 114, 114, 111, 114, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 85, -110, 105, 116, 84, 101, 115, 116, 115, 62, 37, 115, 60, 47, 117, 115, 101, 85, 110, 105, 116, 84, 101, 115, 116, 115, 62, 39, 44, 32, 105, 105, 102, - 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 85, 110, 105, 116, 84, 101, 115, 116, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, - 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 73, 110, 108, 105, 110, 101, 62, 37, 115, 60, 47, 117, 115, 101, 73, 110, 108, 105, 110, 101, 62, 39, - 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 73, 110, 108, 105, 110, 101, 32, 111, 114, 32, 105, 115, 79, 112, 116, 105, -109, 105, 115, 101, 100, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 114, 101, 108, 101, 97, 115, 101, - 62, 37, 115, 60, 47, 114, 101, 108, 101, 97, 115, 101, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 82, 101, -108, 101, 97, 115, 101, 32, 111, 114, 32, 110, 111, 116, 32, 105, 115, 68, 101, 98, 117, 103, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, - 10, 95, 112, 40, 50, 44, 39, 60, 112, 114, 101, 115, 101, 114, 118, 101, 80, 97, 116, 104, 115, 62, 48, 60, 47, 112, 114, 101, 115, 101, 114, 118, -101, 80, 97, 116, 104, 115, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 119, 97, 114, 110, 105, 110, 103, 115, 62, 37, 115, 60, 47, 119, 97, -114, 110, 105, 110, 103, 115, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 70, 97, 116, 97, 108, 67, 111, 109, -112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, -105, 110, 102, 111, 119, 97, 114, 110, 105, 110, 103, 115, 62, 37, 115, 60, 47, 105, 110, 102, 111, 119, 97, 114, 110, 105, 110, 103, 115, 62, 39, 44, - 32, 105, 105, 102, 40, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 97, 110, 100, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, -103, 115, 32, 126, 61, 32, 34, 79, 102, 102, 34, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 99, -104, 101, 99, 107, 80, 114, 111, 112, 101, 114, 116, 121, 62, 48, 60, 47, 99, 104, 101, 99, 107, 80, 114, 111, 112, 101, 114, 116, 121, 62, 39, 41, - 10, 95, 112, 40, 50, 44, 39, 60, 103, 101, 110, 83, 116, 97, 99, 107, 70, 114, 97, 109, 101, 62, 48, 60, 47, 103, 101, 110, 83, 116, 97, 99, -107, 70, 114, 97, 109, 101, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 112, 105, 99, 62, 37, 115, 60, 47, 112, 105, 99, 62, 39, 44, 32, -105, 105, 102, 40, 99, 102, 103, 46, 112, 105, 99, 32, 61, 61, 32, 34, 79, 110, 34, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, - 95, 112, 40, 50, 44, 39, 60, 99, 111, 118, 62, 37, 115, 60, 47, 99, 111, 118, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, - 97, 103, 115, 46, 67, 111, 100, 101, 67, 111, 118, 101, 114, 97, 103, 101, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, - 50, 44, 39, 60, 110, 111, 102, 108, 111, 97, 116, 62, 37, 115, 60, 47, 110, 111, 102, 108, 111, 97, 116, 62, 39, 44, 32, 105, 105, 102, 40, 99, -102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 97, 110, 100, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, 110, -103, 112, 111, 105, 110, 116, 32, 61, 61, 32, 34, 78, 111, 110, 101, 34, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 95, 112, 40, - 50, 44, 39, 60, 68, 118, 101, 114, 115, 105, 111, 110, 62, 50, 60, 47, 68, 118, 101, 114, 115, 105, 111, 110, 62, 39, 41, 10, 95, 112, 40, 50, - 44, 39, 60, 105, 103, 110, 111, 114, 101, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 80, 114, 97, 103, 109, 97, 115, 62, 48, 60, 47, 105, -103, 110, 111, 114, 101, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 80, 114, 97, 103, 109, 97, 115, 62, 39, 41, 10, 108, 111, 99, 97, 108, - 32, 99, 111, 109, 112, 105, 108, 101, 114, 32, 61, 32, 123, 32, 100, 109, 100, 61, 34, 48, 34, 44, 32, 103, 100, 99, 61, 34, 49, 34, 44, 32, -108, 100, 99, 61, 34, 50, 34, 32, 125, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, - 99, 111, 109, 112, 105, 108, 101, 114, 34, 44, 32, 99, 111, 109, 112, 105, 108, 101, 114, 91, 95, 79, 80, 84, 73, 79, 78, 83, 46, 100, 99, 32, -111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 34, 100, 109, 100, 34, 93, 41, 10, 109, 46, 118, 105, 115, 117, - 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 111, 116, 104, 101, 114, 68, 77, 68, 34, 44, 32, 39, 48, 39, 41, 10, -109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 112, 114, 111, 103, 114, 97, 109, 34, 44, 32, - 39, 36, 40, 68, 77, 68, 73, 110, 115, 116, 97, 108, 108, 68, 105, 114, 41, 119, 105, 110, 100, 111, 119, 115, 92, 92, 98, 105, 110, 92, 92, 100, -109, 100, 46, 101, 120, 101, 39, 41, 10, 108, 111, 99, 97, 108, 32, 105, 109, 112, 100, 105, 114, 115, 10, 105, 102, 32, 35, 99, 102, 103, 46, 105, -109, 112, 111, 114, 116, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 105, 109, 112, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 41, 10, 101, -110, 100, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 105, 109, 112, 112, 97, 116, 104, - 34, 44, 32, 105, 109, 112, 100, 105, 114, 115, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, - 32, 34, 102, 105, 108, 101, 73, 109, 112, 112, 97, 116, 104, 34, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, -116, 40, 50, 44, 32, 34, 111, 117, 116, 100, 105, 114, 34, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 41, 41, 41, 10, 109, 46, 118, 105, -115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 111, 98, 106, 100, 105, 114, 34, 44, 32, 112, 97, 116, 104, 46, -116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, -103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 41, 41, 41, 10, 109, 46, 118, 105, 115, 117, 97, -108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 111, 98, 106, 110, 97, 109, 101, 34, 41, 10, 109, 46, 118, 105, 115, 117, 97, -108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 108, 105, 98, 110, 97, 109, 101, 34, 41, 10, 109, 46, 118, 105, 115, 117, 97, -108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 111, 68, 111, 99, 67, 111, 109, 109, 101, 110, 116, 115, 34, 44, 32, 105, -105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 44, 32, 39, 49, 39, 44, - 32, 39, 48, 39, 41, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 111, 99, -100, 105, 114, 34, 44, 32, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, -101, 110, 116, 40, 50, 44, 32, 34, 100, 111, 99, 110, 97, 109, 101, 34, 44, 32, 99, 102, 103, 46, 100, 111, 99, 110, 97, 109, 101, 41, 10, 109, - 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 109, 111, 100, 117, 108, 101, 115, 95, 100, 100, 111, - 99, 34, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 100, 111, 99, 102, 105, -108, 101, 115, 34, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 111, 72, 100, -114, 71, 101, 110, 101, 114, 97, 116, 105, 111, 110, 34, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 71, 101, 110, 101, -114, 97, 116, 101, 72, 101, 97, 100, 101, 114, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 104, 100, 114, 100, 105, 114, 34, 44, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, -100, 105, 114, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 104, 100, 114, 110, 97, -109, 101, 34, 44, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 110, 97, 109, 101, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, -108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 111, 88, 71, 101, 110, 101, 114, 97, 116, 105, 111, 110, 34, 44, 32, 105, 105, 102, 40, 99, -102, 103, 46, 102, 108, 97, 103, 115, 46, 71, 101, 110, 101, 114, 97, 116, 101, 74, 83, 79, 78, 44, 32, 39, 49, 39, 44, 32, 39, 48, 39, 41, - 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 120, 102, 105, 108, 101, 110, 97, 109, -101, 34, 44, 32, 39, 36, 40, 73, 110, 116, 68, 105, 114, 41, 92, 92, 36, 40, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 46, 106, 115, -111, 110, 39, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 101, 98, 117, 103, -108, 101, 118, 101, 108, 34, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 108, 101, 118, 101, 108, 44, 32, 116, 111, 115, 116, -114, 105, 110, 103, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 108, 101, 118, 101, 108, 41, 44, 32, 39, 48, 39, 41, 41, 10, 109, 46, 118, 105, -115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 100, 101, 98, 117, 103, 105, 100, 115, 34, 44, 32, 99, 102, 103, - 46, 100, 101, 98, 117, 103, 99, 111, 110, 115, 116, 97, 110, 116, 115, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, -110, 116, 40, 50, 44, 32, 34, 118, 101, 114, 115, 105, 111, 110, 108, 101, 118, 101, 108, 34, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 118, 101, -114, 115, 105, 111, 110, 108, 101, 118, 101, 108, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 99, 102, 103, 46, 118, 101, 114, 115, 105, 111, 110, -108, 101, 118, 101, 108, 41, 44, 32, 39, 48, 39, 41, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, - 50, 44, 32, 34, 118, 101, 114, 115, 105, 111, 110, 105, 100, 115, 34, 44, 32, 99, 102, 103, 46, 118, 101, 114, 115, 105, 111, 110, 99, 111, 110, 115, -116, 97, 110, 116, 115, 41, 10, 95, 112, 40, 50, 44, 39, 60, 100, 117, 109, 112, 95, 115, 111, 117, 114, 99, 101, 62, 48, 60, 47, 100, 117, 109, -112, 95, 115, 111, 117, 114, 99, 101, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 109, 97, 112, 118, 101, 114, 98, 111, 115, 105, 116, 121, 62, - 48, 60, 47, 109, 97, 112, 118, 101, 114, 98, 111, 115, 105, 116, 121, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 99, 114, 101, 97, 116, 101, - 73, 109, 112, 108, 105, 98, 62, 37, 115, 60, 47, 99, 114, 101, 97, 116, 101, 73, 109, 112, 108, 105, 98, 62, 39, 44, 32, 105, 105, 102, 40, 99, -102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, - 97, 103, 115, 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 44, 32, 39, 48, 39, 44, 32, 39, 49, 39, 41, 41, 10, 95, 112, 40, 50, - 44, 39, 60, 100, 101, 102, 97, 117, 108, 116, 108, 105, 98, 110, 97, 109, 101, 32, 47, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 100, 101, - 98, 117, 103, 108, 105, 98, 110, 97, 109, 101, 32, 47, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 109, 111, 100, 117, 108, 101, 68, 101, 112, -115, 70, 105, 108, 101, 32, 47, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 114, 117, 110, 62, 48, 60, 47, 114, 117, 110, 62, 39, 41, 10, - 95, 112, 40, 50, 44, 39, 60, 114, 117, 110, 97, 114, 103, 115, 32, 47, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 114, 117, 110, 67, 118, - 50, 112, 100, 98, 62, 49, 60, 47, 114, 117, 110, 67, 118, 50, 112, 100, 98, 62, 39, 41, 32, 45, 45, 32, 119, 101, 32, 119, 105, 108, 108, 32, -106, 117, 115, 116, 32, 108, 101, 97, 118, 101, 32, 116, 104, 105, 115, 32, 97, 108, 119, 97, 121, 115, 32, 101, 110, 97, 98, 108, 101, 100, 44, 32, -115, 105, 110, 99, 101, 32, 105, 116, 39, 115, 32, 105, 103, 110, 111, 114, 101, 100, 32, 105, 102, 32, 110, 111, 32, 100, 101, 98, 117, 103, 105, 110, -102, 111, 32, 105, 115, 32, 119, 114, 105, 116, 116, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 112, 97, 116, 104, 67, 118, 50, 112, 100, 98, 62, - 36, 40, 86, 105, 115, 117, 97, 108, 68, 73, 110, 115, 116, 97, 108, 108, 68, 105, 114, 41, 99, 118, 50, 112, 100, 98, 92, 92, 99, 118, 50, 112, -100, 98, 46, 101, 120, 101, 60, 47, 112, 97, 116, 104, 67, 118, 50, 112, 100, 98, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 99, 118, 50, -112, 100, 98, 80, 114, 101, 50, 48, 52, 51, 62, 48, 60, 47, 99, 118, 50, 112, 100, 98, 80, 114, 101, 50, 48, 52, 51, 62, 39, 41, 10, 95, -112, 40, 50, 44, 39, 60, 99, 118, 50, 112, 100, 98, 78, 111, 68, 101, 109, 97, 110, 103, 108, 101, 62, 48, 60, 47, 99, 118, 50, 112, 100, 98, - 78, 111, 68, 101, 109, 97, 110, 103, 108, 101, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 99, 118, 50, 112, 100, 98, 69, 110, 117, 109, 84, -121, 112, 101, 62, 48, 60, 47, 99, 118, 50, 112, 100, 98, 69, 110, 117, 109, 84, 121, 112, 101, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, - 99, 118, 50, 112, 100, 98, 79, 112, 116, 105, 111, 110, 115, 32, 47, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 111, 98, 106, 102, 105, 108, -101, 115, 32, 47, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 108, 105, 110, 107, 115, 119, 105, 116, 99, 104, 101, 115, 32, 47, 62, 39, 41, - 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 10, 108, 111, 99, 97, 108, 32, 101, 120, 112, 108, 105, 99, 105, 116, 32, 61, 32, 118, 115, -116, 117, 100, 105, 111, 46, 110, 101, 101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, 105, 110, 107, 40, 99, 102, 103, 41, 10, 108, 111, 99, - 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 116, 111, 111, 108, 115, 101, 116, 40, 99, 102, 103, 41, - 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, - 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 110, 111, 116, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 101, 108, 115, -101, 10, 108, 111, 99, 97, 108, 32, 115, 99, 111, 112, 101, 32, 61, 32, 105, 105, 102, 40, 101, 120, 112, 108, 105, 99, 105, 116, 44, 32, 34, 97, -108, 108, 34, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 41, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, -116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 99, 111, 112, 101, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 10, 101, -110, 100, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 108, 105, 98, 102, 105, 108, 101, -115, 34, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 108, 105, 110, 107, 115, 44, 32, 34, 32, 34, 41, 41, 10, 109, 46, -118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 108, 105, 98, 112, 97, 116, 104, 115, 34, 44, 32, 99, -102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 41, 10, 95, 112, 40, 50, 44, 39, 60, 100, 101, 102, 102, 105, 108, 101, 32, 47, 62, 39, 41, 10, - 95, 112, 40, 50, 44, 39, 60, 114, 101, 115, 102, 105, 108, 101, 32, 47, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, - 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 105, 110, 102, 111, 40, 99, 102, 103, 41, 10, 95, 112, 40, - 50, 44, 39, 60, 101, 120, 101, 102, 105, 108, 101, 62, 36, 40, 79, 117, 116, 68, 105, 114, 41, 92, 92, 37, 115, 60, 47, 101, 120, 101, 102, 105, -108, 101, 62, 39, 44, 32, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 50, 44, 39, 60, 117, 115, 101, 83, 116, 100, - 76, 105, 98, 80, 97, 116, 104, 62, 49, 60, 47, 117, 115, 101, 83, 116, 100, 76, 105, 98, 80, 97, 116, 104, 62, 39, 41, 10, 108, 111, 99, 97, -108, 32, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 48, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 79, -109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, 121, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, - 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 114, 117, 110, 116, 105, 109, 101, 32, - 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 83, 116, 97, 116, 105, 99, 82, 117, 110, 116, 105, 109, 101, 44, 32, 34, - 50, 34, 44, 32, 34, 52, 34, 41, 10, 101, 108, 115, 101, 10, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, -102, 108, 97, 103, 115, 46, 83, 116, 97, 116, 105, 99, 82, 117, 110, 116, 105, 109, 101, 44, 32, 34, 49, 34, 44, 32, 34, 51, 34, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 99, 82, 117, -110, 116, 105, 109, 101, 34, 44, 32, 114, 117, 110, 116, 105, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 79, 112, 116, 105, 111, 110, 115, 10, 105, 102, 32, 35, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 32, 62, 32, - 48, 32, 116, 104, 101, 110, 10, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 32, 61, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 32, 34, 41, 10, 101, -110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 79, 112, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 99, -102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 45, 76, 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 10, 105, -102, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 32, 116, 104, 101, 110, 10, 97, 100, 100, 105, 116, 105, 111, -110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 32, 61, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 32, 46, - 46, 32, 34, 32, 34, 32, 46, 46, 32, 108, 105, 110, 107, 79, 112, 116, 115, 10, 101, 108, 115, 101, 10, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 79, 112, 116, 105, 111, 110, 115, 32, 61, 32, 108, 105, 110, 107, 79, 112, 116, 115, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 118, 105, -115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 50, 44, 32, 34, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, -111, 110, 115, 34, 44, 32, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 41, 10, 105, 102, 32, 35, 99, 102, 103, - 46, 112, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, - 39, 60, 112, 114, 101, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 62, 37, 115, 60, 47, 112, 114, 101, 66, 117, 105, 108, 100, 67, 111, -109, 109, 97, 110, 100, 62, 39, 44, 112, 46, 101, 115, 99, 40, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 99, 102, 103, 46, -112, 114, 101, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 114, 92, 110, 34, - 41, 41, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 50, 44, 39, 60, 112, 114, 101, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 32, - 47, 62, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, -100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 111, 109, 109, - 97, 110, 100, 62, 37, 115, 60, 47, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 112, 46, 101, 115, 99, - 40, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 99, 102, 103, 46, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, - 97, 110, 100, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 114, 92, 110, 34, 41, 41, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, - 50, 44, 39, 60, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 95, 112, - 40, 50, 44, 39, 60, 102, 105, 108, 101, 115, 84, 111, 67, 108, 101, 97, 110, 62, 42, 46, 111, 98, 106, 59, 42, 46, 99, 109, 100, 59, 42, 46, - 98, 117, 105, 108, 100, 59, 42, 46, 106, 115, 111, 110, 59, 42, 46, 100, 101, 112, 59, 42, 46, 111, 60, 47, 102, 105, 108, 101, 115, 84, 111, 67, -108, 101, 97, 110, 62, 39, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 67, 111, 110, 102, 105, 103, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 102, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, - 95, 112, 40, 49, 44, 39, 60, 70, 111, 108, 100, 101, 114, 32, 110, 97, 109, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 112, 114, 106, 46, 110, - 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, -101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, -110, 98, 114, 97, 110, 99, 104, 101, 110, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, -112, 116, 104, 41, 10, 95, 112, 40, 100, 101, 112, 116, 104, 44, 32, 39, 60, 70, 111, 108, 100, 101, 114, 32, 110, 97, 109, 101, 61, 34, 37, 115, - 34, 62, 39, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, 97, 110, 99, 104, 101, 120, 105, -116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 95, 112, 40, 100, 101, 112, -116, 104, 44, 32, 39, 60, 47, 70, 111, 108, 100, 101, 114, 62, 39, 41, 10, 101, 110, 100, 44, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 95, 112, 40, 100, 101, 112, 116, 104, 44, 32, 39, - 60, 70, 105, 108, 101, 32, 112, 97, 116, 104, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, - 97, 116, 101, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 41, 10, 101, 110, 100, 10, 125, 44, 32, 102, 97, 108, 115, 101, 44, - 32, 50, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 70, 111, 108, 100, 101, 114, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 118, 105, 115, 117, 97, 108, 100, 46, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 112, -114, 106, 44, 32, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -118, 105, 115, 117, 97, 108, 100, 46, 101, 108, 101, 109, 101, 110, 116, 40, 100, 101, 112, 116, 104, 44, 32, 110, 97, 109, 101, 44, 32, 118, 97, 108, -117, 101, 44, 32, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 84, 97, 98, 108, 101, 32, 61, 32, 116, 121, 112, 101, 40, 118, 97, -108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 10, 105, 102, 32, 110, 111, 116, 32, 118, 97, 108, 117, 101, 32, 111, 114, 32, - 40, 105, 115, 84, 97, 98, 108, 101, 32, 97, 110, 100, 32, 35, 118, 97, 108, 117, 101, 32, 61, 61, 32, 48, 41, 32, 116, 104, 101, 110, 10, 95, -112, 40, 100, 101, 112, 116, 104, 44, 32, 39, 60, 37, 115, 32, 47, 62, 39, 44, 32, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 105, 102, - 32, 105, 115, 84, 97, 98, 108, 101, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, 101, 115, 99, 40, 116, 97, 98, 108, -101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 118, 97, 108, 117, 101, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 59, 34, 41, 41, 10, 95, -112, 40, 100, 101, 112, 116, 104, 44, 32, 39, 60, 37, 115, 62, 37, 115, 60, 47, 37, 115, 62, 39, 44, 32, 110, 97, 109, 101, 44, 32, 118, 97, -108, 117, 101, 44, 32, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, 105, 102, 32, 115, 101, 108, 101, 99, 116, 40, 39, 35, 39, 44, 46, 46, - 46, 41, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, - 41, 10, 101, 110, 100, 10, 95, 120, 40, 100, 101, 112, 116, 104, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 60, - 37, 115, 62, 37, 115, 60, 47, 37, 115, 62, 39, 44, 32, 110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 44, 32, 110, 97, 109, 101, 41, 44, - 32, 46, 46, 46, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// d/tools/dmd.lua -static const unsigned char builtin_script_79[] = { -108, 111, 99, 97, 108, 32, 116, 100, 109, 100, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, -101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, -108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 100, 32, 61, 32, 112, 46, -109, 111, 100, 117, 108, 101, 115, 46, 100, 10, 116, 100, 109, 100, 46, 103, 99, 99, 32, 61, 32, 123, 125, 10, 116, 100, 109, 100, 46, 103, 99, 99, - 46, 100, 99, 32, 61, 32, 34, 100, 109, 100, 34, 10, 116, 100, 109, 100, 46, 111, 112, 116, 108, 105, 110, 107, 32, 61, 32, 123, 125, 10, 116, 100, -109, 100, 46, 111, 112, 116, 108, 105, 110, 107, 46, 100, 99, 32, 61, 32, 34, 100, 109, 100, 34, 10, 116, 100, 109, 100, 46, 103, 99, 99, 46, 108, -100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, - 61, 32, 123, 32, 34, 45, 109, 51, 50, 34, 32, 125, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 123, 32, 34, 45, 109, 54, 52, 34, 32, -125, 44, 10, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 123, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 34, 45, 115, 104, 97, -114, 101, 100, 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 61, 32, 34, 45, 108, 105, 98, 34, 44, 10, 125, 10, 125, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 116, 100, 109, 100, 46, 103, 99, 99, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, -103, 44, 32, 116, 100, 109, 100, 46, 103, 99, 99, 46, 108, 100, 102, 108, 97, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, -115, 10, 101, 110, 100, 10, 116, 100, 109, 100, 46, 103, 99, 99, 46, 108, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, -115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 76, - 45, 76, 47, 117, 115, 114, 47, 108, 105, 98, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 76, 45, 76, 47, 117, 115, 114, 47, -108, 105, 98, 54, 52, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 100, 109, 100, 46, 103, 99, 99, 46, 103, 101, -116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, -108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 100, 109, 100, - 46, 103, 99, 99, 46, 108, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, -100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, -103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 41, 41, 32, 100, 111, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 45, 76, 45, 76, 39, 32, 46, 46, 32, 112, 114, 111, 106, -101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, - 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 116, 100, 109, 100, 46, 103, 99, 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, -108, 121, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, -115, 10, 105, 102, 32, 110, 111, 116, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, - 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, - 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 108, 105, 110, 107, 46, 112, 114, 111, 106, 101, 99, 116, 46, -101, 120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, 110, 10, 105, 102, 32, 108, 105, 110, 107, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, - 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, -108, 116, 44, 32, 34, 45, 76, 34, 32, 46, 46, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 108, 105, 110, 107, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, -112, 97, 116, 104, 41, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, - 32, 34, 45, 76, 45, 108, 34, 32, 46, 46, 32, 108, 105, 110, 107, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, - 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, -102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, -108, 112, 97, 116, 104, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, -110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, 107, 40, 108, 105, 110, 107, - 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 102, 114, - 97, 109, 101, 119, 111, 114, 107, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 108, 105, -110, 107, 41, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 108, 105, -110, 107, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, - 76, 34, 32, 46, 46, 32, 108, 105, 110, 107, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, -115, 117, 108, 116, 44, 32, 34, 45, 76, 45, 108, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, - 40, 108, 105, 110, 107, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, -100, 10, 116, 100, 109, 100, 46, 111, 112, 116, 108, 105, 110, 107, 46, 108, 100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, -116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 123, 32, 34, 45, 109, 51, 50, 34, 32, 125, 44, 10, 120, 56, - 54, 95, 54, 52, 32, 61, 32, 123, 32, 34, 45, 109, 54, 52, 34, 32, 125, 44, 10, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 123, 10, 83, -104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 34, 45, 115, 104, 97, 114, 101, 100, 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, - 61, 32, 34, 45, 108, 105, 98, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 100, 109, 100, 46, 111, 112, 116, 108, -105, 110, 107, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, - 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 100, 109, 100, 46, 111, 112, 116, 108, -105, 110, 107, 46, 108, 100, 102, 108, 97, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 116, 100, 109, 100, 46, 111, 112, 116, 108, 105, 110, 107, 46, 103, 101, 116, 76, 105, 98, 114, 97, 114, 121, 68, 105, -114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 123, 125, 10, -102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, -105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 41, - 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 45, 76, 108, 105, 98, 32, - 34, 39, 32, 46, 46, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, -111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, -108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 116, 100, 109, 100, 46, 111, 112, 116, 108, 105, 110, 107, 46, 103, -101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, -111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, - 44, 32, 34, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 10, 102, 111, 114, 32, - 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, -111, 116, 32, 108, 105, 110, 107, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 120, 116, 101, 114, 110, 97, 108, 110, 97, 109, 101, 32, 116, 104, 101, -110, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 105, 110, 102, 111, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, -107, 105, 110, 102, 111, 40, 108, 105, 110, 107, 41, 10, 105, 102, 32, 108, 105, 110, 107, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, - 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, - 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 108, 105, 110, 107, 105, 110, 102, 111, 46, 97, 98, 115, 112, 97, 116, 104, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, -115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 98, 97, 115, 101, 110, 97, 109, 101, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 111, - 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 108, 105, 110, 107, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 108, 105, 110, 107, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, -120, 116, 101, 110, 115, 105, 111, 110, 40, 108, 105, 110, 107, 44, 32, 112, 46, 115, 121, 115, 116, 101, 109, 115, 91, 99, 102, 103, 46, 115, 121, 115, -116, 101, 109, 93, 46, 115, 116, 97, 116, 105, 99, 108, 105, 98, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 41, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 108, 105, 110, 107, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 105, 102, 32, 115, 116, 114, 105, 110, 103, 46, 109, 97, -116, 99, 104, 40, 32, 111, 115, 46, 103, 101, 116, 118, 101, 114, 115, 105, 111, 110, 40, 41, 46, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, - 44, 32, 34, 87, 105, 110, 100, 111, 119, 115, 34, 32, 41, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 112, 46, 116, 111, 111, 108, -115, 46, 100, 109, 100, 32, 61, 32, 116, 100, 109, 100, 46, 111, 112, 116, 108, 105, 110, 107, 10, 101, 108, 115, 101, 10, 112, 46, 116, 111, 111, 108, -115, 46, 100, 109, 100, 32, 61, 32, 116, 100, 109, 100, 46, 103, 99, 99, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 100, 109, 100, 32, 61, - 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 109, 100, 10, 100, 109, 100, 46, 100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, -105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 109, 51, 50, 109, 115, 99, 111, 102, 102, 34, 44, - 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 109, 54, 52, 34, 44, 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 79, -109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, 121, 61, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 34, 44, - 10, 67, 111, 100, 101, 67, 111, 118, 101, 114, 97, 103, 101, 61, 32, 34, 45, 99, 111, 118, 34, 44, 10, 67, 111, 108, 111, 114, 61, 32, 34, 45, - 99, 111, 108, 111, 114, 34, 44, 10, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 61, 32, 34, 45, 68, 34, 44, 10, 70, 97, 116, - 97, 108, 87, 97, 114, 110, 105, 110, 103, 115, 61, 32, 34, 45, 119, 34, 44, 10, 71, 101, 110, 101, 114, 97, 116, 101, 72, 101, 97, 100, 101, 114, - 61, 32, 34, 45, 72, 34, 44, 10, 71, 101, 110, 101, 114, 97, 116, 101, 74, 83, 79, 78, 61, 32, 34, 45, 88, 34, 44, 10, 71, 101, 110, 101, -114, 97, 116, 101, 77, 97, 112, 61, 32, 34, 45, 109, 97, 112, 34, 44, 10, 76, 111, 119, 77, 101, 109, 61, 32, 34, 45, 108, 111, 119, 109, 101, -109, 34, 44, 10, 80, 114, 111, 102, 105, 108, 101, 61, 32, 34, 45, 112, 114, 111, 102, 105, 108, 101, 34, 44, 10, 81, 117, 105, 101, 116, 61, 32, - 34, 45, 113, 117, 105, 101, 116, 34, 44, 10, 82, 101, 116, 97, 105, 110, 80, 97, 116, 104, 115, 61, 32, 34, 45, 111, 112, 34, 44, 10, 83, 121, -109, 98, 111, 108, 115, 76, 105, 107, 101, 67, 61, 32, 34, 45, 103, 99, 34, 44, 10, 85, 110, 105, 116, 84, 101, 115, 116, 61, 32, 34, 45, 117, -110, 105, 116, 116, 101, 115, 116, 34, 44, 10, 86, 101, 114, 98, 111, 115, 101, 61, 32, 34, 45, 118, 34, 44, 10, 80, 114, 111, 102, 105, 108, 101, - 71, 67, 61, 32, 34, 45, 112, 114, 111, 102, 105, 108, 101, 61, 103, 99, 34, 44, 10, 83, 116, 97, 99, 107, 70, 114, 97, 109, 101, 61, 32, 34, - 45, 103, 115, 34, 44, 10, 83, 116, 97, 99, 107, 83, 116, 111, 109, 112, 61, 32, 34, 45, 103, 120, 34, 44, 10, 65, 108, 108, 73, 110, 115, 116, - 97, 110, 116, 105, 97, 116, 101, 61, 32, 34, 45, 97, 108, 108, 105, 110, 115, 116, 34, 44, 10, 66, 101, 116, 116, 101, 114, 67, 61, 32, 34, 45, - 98, 101, 116, 116, 101, 114, 67, 34, 44, 10, 77, 97, 105, 110, 61, 32, 34, 45, 109, 97, 105, 110, 34, 44, 10, 80, 101, 114, 102, 111, 114, 109, - 83, 121, 110, 116, 97, 120, 67, 104, 101, 99, 107, 79, 110, 108, 121, 61, 32, 34, 45, 111, 45, 34, 44, 10, 83, 104, 111, 119, 84, 76, 83, 61, - 32, 34, 45, 118, 116, 108, 115, 34, 44, 10, 83, 104, 111, 119, 71, 67, 61, 32, 34, 45, 118, 103, 99, 34, 44, 10, 73, 103, 110, 111, 114, 101, - 80, 114, 97, 103, 109, 97, 61, 32, 34, 45, 105, 103, 110, 111, 114, 101, 34, 44, 10, 83, 104, 111, 119, 68, 101, 112, 101, 110, 100, 101, 110, 99, -105, 101, 115, 61, 32, 34, 45, 100, 101, 112, 115, 34, 44, 10, 125, 44, 10, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 32, 61, 32, 123, - 10, 79, 102, 102, 32, 61, 32, 34, 45, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 61, 111, 102, 102, 34, 44, 10, 79, 110, 32, 61, 32, - 34, 45, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 61, 111, 110, 34, 44, 10, 83, 97, 102, 101, 79, 110, 108, 121, 32, 61, 32, 34, 45, - 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 61, 115, 97, 102, 101, 111, 110, 108, 121, 34, 44, 10, 125, 44, 10, 99, 104, 101, 99, 107, 97, - 99, 116, 105, 111, 110, 32, 61, 32, 123, 10, 68, 32, 61, 32, 34, 45, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 68, 34, 44, 10, - 67, 32, 61, 32, 34, 45, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 67, 34, 44, 10, 72, 97, 108, 116, 32, 61, 32, 34, 45, 99, -104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 104, 97, 108, 116, 34, 44, 10, 67, 111, 110, 116, 101, 120, 116, 32, 61, 32, 34, 45, 99, 104, -101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 99, 111, 110, 116, 101, 120, 116, 34, 44, 10, 125, 44, 10, 99, 112, 112, 100, 105, 97, 108, 101, 99, -116, 32, 61, 32, 123, 10, 91, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, -116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 107, 101, 101, 112, 32, 116, 104, 105, 115, 32, 117, 112, - 32, 116, 111, 32, 100, 97, 116, 101, 32, 62, 95, 60, 10, 91, 34, 67, 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, -110, 45, 115, 116, 100, 61, 99, 43, 43, 57, 56, 34, 44, 10, 91, 34, 67, 43, 43, 48, 120, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, -114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, -101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 121, 34, 93, 32, 61, 32, 34, 45, 101, 120, -116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 45, 101, -120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 122, 34, 93, 32, 61, 32, 34, 45, -101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 67, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, - 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 57, 56, 34, 93, 32, - 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 57, 56, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 48, 120, - 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 103, 110, 117, 43, - 43, 49, 49, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 103, -110, 117, 43, 43, 49, 121, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, 34, 44, 10, - 91, 34, 103, 110, 117, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, - 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 122, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, - 43, 49, 55, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, - 61, 99, 43, 43, 49, 55, 34, 44, 10, 125, 44, 10, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 32, 61, - 32, 123, 10, 65, 108, 108, 111, 119, 32, 61, 32, 34, 45, 100, 34, 44, 10, 87, 97, 114, 110, 32, 61, 32, 34, 45, 100, 119, 34, 44, 10, 69, -114, 114, 111, 114, 32, 61, 32, 34, 45, 100, 101, 34, 44, 10, 125, 44, 10, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 61, - 32, 123, 10, 78, 111, 110, 101, 32, 61, 32, 34, 45, 110, 111, 102, 108, 111, 97, 116, 34, 44, 10, 125, 44, 10, 111, 112, 116, 105, 109, 105, 122, -101, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 79, 32, 45, 105, 110, 108, 105, 110, 101, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, - 34, 45, 79, 32, 45, 105, 110, 108, 105, 110, 101, 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 45, 79, 32, 45, 105, 110, 108, 105, 110, 101, - 34, 44, 10, 83, 112, 101, 101, 100, 32, 61, 32, 34, 45, 79, 32, 45, 105, 110, 108, 105, 110, 101, 34, 44, 10, 125, 44, 10, 112, 105, 99, 32, - 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 102, 80, 73, 67, 34, 44, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, 32, 123, - 10, 79, 110, 32, 61, 32, 34, 45, 103, 34, 44, 10, 70, 97, 115, 116, 76, 105, 110, 107, 32, 61, 32, 34, 45, 103, 34, 44, 10, 70, 117, 108, -108, 32, 61, 32, 34, 45, 103, 34, 44, 10, 125, 44, 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, -123, 10, 65, 86, 88, 32, 61, 32, 34, 45, 109, 99, 112, 117, 61, 97, 118, 120, 34, 44, 10, 65, 86, 88, 50, 32, 61, 32, 34, 45, 109, 99, -112, 117, 61, 97, 118, 120, 50, 34, 44, 10, 125, 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 123, 10, 68, 101, 102, 97, 117, 108, -116, 32, 61, 32, 34, 45, 119, 105, 34, 44, 10, 72, 105, 103, 104, 32, 61, 32, 34, 45, 119, 105, 34, 44, 10, 69, 120, 116, 114, 97, 32, 61, - 32, 34, 45, 119, 105, 34, 44, 10, 125, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 100, 102, 108, - 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, -112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 100, 109, 100, 46, 100, 102, 108, 97, 103, 115, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, -103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 100, 101, 98, 117, 103, 34, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 114, 101, 108, 101, 97, 115, 101, 34, 41, 10, 101, 110, 100, 10, -105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, - 97, 114, 121, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, -110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 108, 111, 99, - 97, 108, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 116, 114, 117, 101, 10, 105, 102, 32, 99, 102, 103, 46, 115, -116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, 79, 102, 102, 34, 32, 116, 104, 101, 110, 10, 115, 116, 97, 116, 105, - 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 114, 117, 110, 116, -105, 109, 101, 32, 61, 61, 32, 34, 68, 101, 98, 117, 103, 34, 32, 116, 104, 101, 110, 10, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, -109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, - 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, - 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 40, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, - 97, 110, 100, 32, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, -116, 34, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 97, 110, 100, 32, 99, 102, 103, 46, 114, 117, 110, 116, -105, 109, 101, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 115, 116, 97, 116, 105, 99, -114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, -109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, -103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 108, 105, 98, 99, 109, 116, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, -116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, -114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, -114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 108, 105, 98, 99, 109, 116, 100, 34, 41, 10, 101, -108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 97, 110, 100, - 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 109, 115, 118, 99, -114, 116, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, 108, -115, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, -104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, -105, 98, 61, 109, 115, 118, 99, 114, 116, 100, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, -102, 108, 97, 103, 115, 46, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, -100, 111, 99, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, - 32, 34, 45, 68, 102, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 100, 111, 99, 110, 97, 109, 101, 41, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 68, 100, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, -103, 46, 100, 111, 99, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, - 71, 101, 110, 101, 114, 97, 116, 101, 72, 101, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, -114, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, - 45, 72, 102, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 110, 97, 109, 101, 41, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 72, 100, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, -100, 40, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, -103, 46, 112, 114, 101, 118, 105, 101, 119, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 112, 114, 101, 118, 105, 101, 119, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 112, 114, 101, 118, 105, 101, 119, 61, 34, 32, 46, 46, 32, 111, 112, 116, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 114, 101, 118, 101, 114, 116, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 114, 101, 118, 101, 114, 116, 41, - 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 114, 101, 118, 101, 114, 116, - 61, 34, 32, 46, 46, 32, 111, 112, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 116, 114, 97, 110, 115, -105, 116, 105, 111, 110, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, -105, 114, 115, 40, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, -101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 61, 34, 32, 46, 46, 32, 111, 112, 116, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 118, 101, 114, 115, 105, 111, 110, 115, 40, 118, 101, 114, 115, 105, 111, 110, 115, 44, 32, 108, 101, -118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 118, 101, -114, 115, 105, 111, 110, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 118, 101, 114, 115, 105, 111, 110, 115, 41, 32, 100, 111, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 118, 101, 114, 115, 105, 111, 110, 61, 39, 32, 46, 46, - 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, 118, 101, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 118, 101, 114, 115, 105, 111, 110, 61, 39, 32, 46, 46, 32, -108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 100, 101, 98, 117, 103, 40, 99, 111, 110, 115, 116, 97, 110, 116, 115, 44, 32, 108, 101, -118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 99, 111, -110, 115, 116, 97, 110, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 115, 116, 97, 110, 116, 115, 41, 32, 100, 111, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 100, 101, 98, 117, 103, 61, 39, 32, 46, 46, - 32, 99, 111, 110, 115, 116, 97, 110, 116, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, 118, 101, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 100, 101, 98, 117, 103, 61, 39, 32, 46, 46, 32, 108, -101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, - 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, -103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 73, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, -116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, - 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, -114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, 114, 32, - 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 74, - 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, -101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, - 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 111, 102, 34, 32, 46, 46, 32, 110, 97, 109, 101, 10, 101, 110, 100, 10, -100, 109, 100, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -100, 109, 100, 46, 103, 101, 116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, -101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 100, -109, 100, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 100, 109, 100, 46, 116, 111, 111, 108, 115, 32, 61, 32, 123, - 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 109, 100, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, - 32, 116, 111, 111, 108, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 115, 32, 61, 32, 100, 109, 100, 46, 116, 111, 111, 108, 115, 91, 99, -102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 93, 32, 111, 114, 32, 100, 109, 100, 46, 116, 111, 111, 108, 115, 91, 99, 102, -103, 46, 115, 121, 115, 116, 101, 109, 93, 32, 111, 114, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, -101, 115, 91, 116, 111, 111, 108, 93, 10, 114, 101, 116, 117, 114, 110, 32, 110, 97, 109, 101, 32, 111, 114, 32, 100, 109, 100, 91, 116, 111, 111, 108, - 93, 10, 101, 110, 100, 10, }; - -// d/tools/gdc.lua -static const unsigned char builtin_script_80[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 103, 100, 99, 32, 61, 32, -123, 32, 125, 10, 108, 111, 99, 97, 108, 32, 103, 100, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 103, 100, 99, 10, 108, 111, 99, 97, -108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, -105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 100, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, -115, 46, 100, 10, 103, 100, 99, 46, 100, 99, 32, 61, 32, 34, 103, 100, 99, 34, 10, 103, 100, 99, 46, 100, 102, 108, 97, 103, 115, 32, 61, 32, -123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 109, 51, 50, 34, 44, - 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 109, 54, 52, 34, 44, 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 68, -111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 61, 32, 34, 45, 102, 100, 111, 99, 34, 44, 10, 70, 97, 116, 97, 108, 87, 97, 114, 110, -105, 110, 103, 115, 61, 32, 34, 45, 87, 101, 114, 114, 111, 114, 34, 44, 10, 71, 101, 110, 101, 114, 97, 116, 101, 72, 101, 97, 100, 101, 114, 61, - 32, 34, 45, 102, 105, 110, 116, 102, 99, 34, 44, 10, 71, 101, 110, 101, 114, 97, 116, 101, 74, 83, 79, 78, 61, 32, 34, 45, 102, 88, 34, 44, - 10, 82, 101, 116, 97, 105, 110, 80, 97, 116, 104, 115, 61, 32, 34, 45, 111, 112, 34, 44, 10, 83, 121, 109, 98, 111, 108, 115, 76, 105, 107, 101, - 67, 61, 32, 34, 45, 102, 100, 101, 98, 117, 103, 45, 99, 34, 44, 10, 85, 110, 105, 116, 84, 101, 115, 116, 61, 32, 34, 45, 102, 117, 110, 105, -116, 116, 101, 115, 116, 34, 44, 10, 86, 101, 114, 98, 111, 115, 101, 61, 32, 34, 45, 102, 100, 45, 118, 101, 114, 98, 111, 115, 101, 34, 44, 10, - 83, 104, 111, 119, 84, 76, 83, 61, 32, 34, 45, 102, 100, 45, 118, 116, 108, 115, 34, 44, 10, 83, 104, 111, 119, 68, 101, 112, 101, 110, 100, 101, -110, 99, 105, 101, 115, 61, 32, 34, 45, 102, 100, 101, 112, 115, 34, 44, 10, 125, 44, 10, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 32, - 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 102, 110, 111, 45, 98, 111, 117, 110, 100, 115, 45, 99, 104, 101, 99, 107, 34, 44, 10, 125, - 44, 10, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 102, 101, 97, 116, 117, 114, 101, 115, 32, 61, 32, 123, 10, 65, 108, 108, 111, 119, 32, 61, - 32, 34, 45, 102, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 34, 44, 10, 125, 44, 10, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, -116, 32, 61, 32, 123, 10, 70, 97, 115, 116, 32, 61, 32, 34, 45, 102, 102, 97, 115, 116, 45, 109, 97, 116, 104, 34, 44, 10, 83, 116, 114, 105, - 99, 116, 32, 61, 32, 34, 45, 102, 102, 108, 111, 97, 116, 45, 115, 116, 111, 114, 101, 34, 44, 10, 125, 44, 10, 111, 112, 116, 105, 109, 105, 122, -101, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 79, 48, 34, 44, 10, 79, 110, 32, 61, 32, 34, 45, 79, 50, 32, 45, 102, 105, -110, 108, 105, 110, 101, 45, 102, 117, 110, 99, 116, 105, 111, 110, 115, 34, 44, 10, 68, 101, 98, 117, 103, 32, 61, 32, 34, 45, 79, 103, 34, 44, - 10, 70, 117, 108, 108, 32, 61, 32, 34, 45, 79, 51, 32, 45, 102, 105, 110, 108, 105, 110, 101, 45, 102, 117, 110, 99, 116, 105, 111, 110, 115, 34, - 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 45, 79, 115, 32, 45, 102, 105, 110, 108, 105, 110, 101, 45, 102, 117, 110, 99, 116, 105, 111, 110, 115, - 34, 44, 10, 83, 112, 101, 101, 100, 32, 61, 32, 34, 45, 79, 51, 32, 45, 102, 105, 110, 108, 105, 110, 101, 45, 102, 117, 110, 99, 116, 105, 111, -110, 115, 34, 44, 10, 125, 44, 10, 112, 105, 99, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 102, 80, 73, 67, 34, 44, 10, 125, 44, - 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 123, 10, 65, 86, 88, 32, 61, 32, 34, 45, 109, 97, -118, 120, 34, 44, 10, 83, 83, 69, 32, 61, 32, 34, 45, 109, 115, 115, 101, 34, 44, 10, 83, 83, 69, 50, 32, 61, 32, 34, 45, 109, 115, 115, -101, 50, 34, 44, 10, 125, 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 123, 10, 72, 105, 103, 104, 32, 61, 32, 34, 45, 87, 97, -108, 108, 34, 44, 10, 69, 120, 116, 114, 97, 32, 61, 32, 34, 45, 87, 97, 108, 108, 32, 45, 87, 101, 120, 116, 114, 97, 34, 44, 10, 125, 44, - 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 103, 34, 44, 10, 70, 97, 115, 116, 76, 105, 110, 107, - 32, 61, 32, 34, 45, 103, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, 34, 45, 103, 32, 45, 103, 102, 34, 44, 10, 125, 10, 125, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 103, 100, 99, 46, 103, 101, 116, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, -102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 100, 99, - 46, 100, 102, 108, 97, 103, 115, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, - 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, -102, 100, 101, 98, 117, 103, 34, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, - 44, 32, 34, 45, 102, 114, 101, 108, 101, 97, 115, 101, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, - 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 100, 111, 99, 110, 97, 109, -101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 102, 100, 111, - 99, 45, 102, 105, 108, 101, 61, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 100, 111, 99, 110, 97, 109, 101, - 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 102, 100, 111, 99, 45, 100, 105, 114, 61, 34, 32, 46, 46, 32, 112, 46, -113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, -102, 103, 46, 102, 108, 97, 103, 115, 46, 71, 101, 110, 101, 114, 97, 116, 101, 72, 101, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 105, 102, 32, - 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, - 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 102, 105, 110, 116, 102, 99, 45, 102, 105, 108, 101, 61, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, -116, 101, 100, 40, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, -104, 101, 97, 100, 101, 114, 100, 105, 114, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, -115, 44, 32, 34, 45, 102, 105, 110, 116, 102, 99, 45, 100, 105, 114, 61, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, -103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, -103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 100, 99, 46, 103, 101, 116, 118, 101, 114, 115, 105, 111, 110, 115, 40, -118, 101, 114, 115, 105, 111, 110, 115, 44, 32, 108, 101, 118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, -123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 118, 101, 114, 115, 105, 111, 110, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 118, 101, 114, 115, -105, 111, 110, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, -102, 118, 101, 114, 115, 105, 111, 110, 61, 39, 32, 46, 46, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, -118, 101, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, -102, 118, 101, 114, 115, 105, 111, 110, 61, 39, 32, 46, 46, 32, 108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, -114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 100, 99, 46, 103, 101, 116, 100, 101, 98, 117, 103, - 40, 99, 111, 110, 115, 116, 97, 110, 116, 115, 44, 32, 108, 101, 118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 99, 111, 110, 115, 116, 97, 110, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, -111, 110, 115, 116, 97, 110, 116, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, - 44, 32, 39, 45, 102, 100, 101, 98, 117, 103, 61, 39, 32, 46, 46, 32, 99, 111, 110, 115, 116, 97, 110, 116, 41, 10, 101, 110, 100, 10, 105, 102, - 32, 108, 101, 118, 101, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, - 32, 39, 45, 102, 100, 101, 98, 117, 103, 61, 39, 32, 46, 46, 32, 108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, - 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 100, 99, 46, 103, 101, 116, 105, 109, 112, 111, -114, 116, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, -111, 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, -116, 44, 32, 39, 45, 73, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 100, 99, 46, 103, 101, 116, -115, 116, 114, 105, 110, 103, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, -108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, - 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 74, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, -114, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 103, 100, 99, 46, 103, 101, 116, 116, 97, 114, 103, 101, 116, 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, -111, 32, 34, 32, 46, 46, 32, 110, 97, 109, 101, 10, 101, 110, 100, 10, 103, 100, 99, 46, 108, 100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, - 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 123, 32, 34, 45, 109, 51, 50, 34, 32, -125, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 123, 32, 34, 45, 109, 54, 52, 34, 32, 125, 44, 10, 125, 44, 10, 107, 105, 110, 100, 32, - 61, 32, 123, 10, 83, 104, 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, - 99, 97, 108, 32, 114, 32, 61, 32, 123, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 77, 65, - 67, 79, 83, 88, 44, 32, 34, 45, 100, 121, 110, 97, 109, 105, 99, 108, 105, 98, 34, 44, 32, 34, 45, 115, 104, 97, 114, 101, 100, 34, 41, 32, -125, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 34, 119, 105, 110, 100, 111, 119, 115, 34, 32, 97, 110, 100, - 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 44, 32, 39, 45, 87, 108, 44, 45, 45, 111, 117, 116, 45, 105, 109, 112, 108, 105, - 98, 61, 34, 39, 32, 46, 46, 32, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 114, 101, 108, 112, 97, 116, 104, 32, 46, - 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 10, 101, 110, 100, 44, 10, 87, 105, 110, 100, 111, 119, 101, -100, 65, 112, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, -101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, 34, 45, 109, 119, -105, 110, 100, 111, 119, 115, 34, 32, 101, 110, 100, 10, 101, 110, 100, 44, 10, 125, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, -100, 99, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, - 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 100, 99, 46, 108, 100, 102, 108, 97, 103, -115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 103, 100, 99, 46, 108, 105, 98, 114, 97, 114, 121, 68, -105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, -120, 56, 54, 32, 61, 32, 34, 45, 76, 47, 117, 115, 114, 47, 108, 105, 98, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 76, - 47, 117, 115, 114, 47, 108, 105, 98, 54, 52, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 100, 99, 46, 103, 101, -116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, -108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 103, 100, 99, 46, -108, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, -121, 115, 116, 101, 109, 34, 44, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 41, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 45, 87, 108, 44, 45, 76, 39, 32, 46, 46, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 100, - 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 41, 10, 108, 111, 99, 97, -108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 10, 105, 102, 32, 110, 111, 116, - 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, -103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, -116, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, - 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 108, 105, 110, 107, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 120, 116, 101, 114, 110, 97, 108, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 108, 105, 110, 107, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, - 66, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 87, 108, - 44, 34, 32, 46, 46, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, -111, 106, 101, 99, 116, 44, 32, 108, 105, 110, 107, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 41, 41, - 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 87, 108, 44, - 45, 108, 34, 32, 46, 46, 32, 108, 105, 110, 107, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, -103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, -104, 34, 41, 10, 102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, - 32, 100, 111, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, 107, 40, 108, 105, 110, 107, 41, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 102, 114, 97, 109, 101, 119, -111, 114, 107, 32, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 108, 105, 110, 107, 41, 41, - 10, 101, 108, 115, 101, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 108, 105, 110, 107, 41, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 87, 108, 44, 34, - 32, 46, 46, 32, 108, 105, 110, 107, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, -108, 116, 44, 32, 34, 45, 87, 108, 44, 45, 108, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, - 40, 108, 105, 110, 107, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, -100, 10, 103, 100, 99, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 103, 100, 99, 46, 103, 101, 116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, - 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, - 32, 103, 100, 99, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, - 99, 111, 110, 99, 97, 116, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 103, 100, 99, 46, 116, 111, 111, 108, 115, 32, 61, - 32, 123, 10, 112, 115, 51, 32, 61, 32, 123, 10, 100, 99, 32, 61, 32, 34, 112, 112, 117, 45, 108, 118, 50, 45, 103, 100, 99, 34, 44, 10, 97, -114, 32, 61, 32, 34, 112, 112, 117, 45, 108, 118, 50, 45, 97, 114, 34, 44, 10, 125, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -103, 100, 99, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 108, 111, 99, 97, 108, - 32, 110, 97, 109, 101, 115, 32, 61, 32, 103, 100, 99, 46, 116, 111, 111, 108, 115, 91, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, -117, 114, 101, 93, 32, 111, 114, 32, 103, 100, 99, 46, 116, 111, 111, 108, 115, 91, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 93, 32, 111, 114, - 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 115, 91, 116, 111, 111, 108, 93, 10, 114, 101, 116, -117, 114, 110, 32, 110, 97, 109, 101, 32, 111, 114, 32, 103, 100, 99, 91, 116, 111, 111, 108, 93, 10, 101, 110, 100, 10, }; - -// d/tools/ldc.lua -static const unsigned char builtin_script_81[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 116, 111, 111, 108, 115, 46, 108, 100, 99, 32, 61, 32, -123, 32, 125, 10, 108, 111, 99, 97, 108, 32, 108, 100, 99, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 108, 100, 99, 10, 108, 111, 99, 97, -108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, -105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 100, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, -115, 46, 100, 10, 108, 100, 99, 46, 110, 97, 109, 101, 115, 116, 121, 108, 101, 32, 61, 32, 34, 112, 111, 115, 105, 120, 34, 10, 108, 100, 99, 46, -100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, - 61, 32, 34, 45, 109, 51, 50, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 109, 54, 52, 34, 44, 10, 65, 82, 77, 32, 61, - 32, 34, 45, 109, 97, 114, 99, 104, 61, 97, 114, 109, 34, 44, 10, 65, 82, 77, 54, 52, 32, 61, 32, 34, 45, 109, 97, 114, 99, 104, 61, 97, - 97, 114, 99, 104, 54, 52, 34, 44, 10, 125, 44, 10, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, -116, 76, 105, 98, 114, 97, 114, 121, 61, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 34, 44, 10, 67, 111, 100, 101, 67, 111, 118, 101, -114, 97, 103, 101, 61, 32, 34, 45, 99, 111, 118, 34, 44, 10, 67, 111, 108, 111, 114, 61, 32, 34, 45, 101, 110, 97, 98, 108, 101, 45, 99, 111, -108, 111, 114, 34, 44, 10, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 61, 32, 34, 45, 68, 34, 44, 10, 70, 97, 116, 97, 108, - 87, 97, 114, 110, 105, 110, 103, 115, 61, 32, 34, 45, 119, 34, 44, 32, 45, 45, 32, 85, 115, 101, 32, 76, 76, 86, 77, 32, 102, 108, 97, 103, - 63, 32, 58, 32, 34, 45, 102, 97, 116, 97, 108, 45, 97, 115, 115, 101, 109, 98, 108, 101, 114, 45, 119, 97, 114, 110, 105, 110, 103, 115, 34, 44, - 10, 71, 101, 110, 101, 114, 97, 116, 101, 72, 101, 97, 100, 101, 114, 61, 32, 34, 45, 72, 34, 44, 10, 71, 101, 110, 101, 114, 97, 116, 101, 74, - 83, 79, 78, 61, 32, 34, 45, 88, 34, 44, 10, 76, 111, 119, 77, 101, 109, 61, 32, 34, 45, 108, 111, 119, 109, 101, 109, 34, 44, 10, 82, 101, -116, 97, 105, 110, 80, 97, 116, 104, 115, 61, 32, 34, 45, 111, 112, 34, 44, 10, 83, 121, 109, 98, 111, 108, 115, 76, 105, 107, 101, 67, 61, 32, - 34, 45, 103, 99, 34, 44, 10, 85, 110, 105, 116, 84, 101, 115, 116, 61, 32, 34, 45, 117, 110, 105, 116, 116, 101, 115, 116, 34, 44, 10, 86, 101, -114, 98, 111, 115, 101, 61, 32, 34, 45, 118, 34, 44, 10, 65, 108, 108, 73, 110, 115, 116, 97, 110, 116, 105, 97, 116, 101, 61, 32, 34, 45, 97, -108, 108, 105, 110, 115, 116, 34, 44, 10, 66, 101, 116, 116, 101, 114, 67, 61, 32, 34, 45, 98, 101, 116, 116, 101, 114, 67, 34, 44, 10, 77, 97, -105, 110, 61, 32, 34, 45, 109, 97, 105, 110, 34, 44, 10, 80, 101, 114, 102, 111, 114, 109, 83, 121, 110, 116, 97, 120, 67, 104, 101, 99, 107, 79, -110, 108, 121, 61, 32, 34, 45, 111, 45, 34, 44, 10, 83, 104, 111, 119, 71, 67, 61, 32, 34, 45, 118, 103, 99, 34, 44, 10, 73, 103, 110, 111, -114, 101, 80, 114, 97, 103, 109, 97, 61, 32, 34, 45, 105, 103, 110, 111, 114, 101, 34, 44, 10, 125, 44, 10, 98, 111, 117, 110, 100, 115, 99, 104, -101, 99, 107, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 61, 111, 102, 102, 34, - 44, 10, 79, 110, 32, 61, 32, 34, 45, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 61, 111, 110, 34, 44, 10, 83, 97, 102, 101, 79, 110, -108, 121, 32, 61, 32, 34, 45, 98, 111, 117, 110, 100, 115, 99, 104, 101, 99, 107, 61, 115, 97, 102, 101, 111, 110, 108, 121, 34, 44, 10, 125, 44, - 10, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 32, 61, 32, 123, 10, 68, 32, 61, 32, 34, 45, 99, 104, 101, 99, 107, 97, 99, 116, 105, -111, 110, 61, 68, 34, 44, 10, 67, 32, 61, 32, 34, 45, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 67, 34, 44, 10, 72, 97, 108, -116, 32, 61, 32, 34, 45, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 104, 97, 108, 116, 34, 44, 10, 67, 111, 110, 116, 101, 120, 116, - 32, 61, 32, 34, 45, 99, 104, 101, 99, 107, 97, 99, 116, 105, 111, 110, 61, 99, 111, 110, 116, 101, 120, 116, 34, 44, 10, 125, 44, 10, 99, 112, -112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 32, 123, 10, 91, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 93, 32, 61, 32, 34, 45, 101, -120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 32, 45, 45, 32, 84, 79, 68, 79, 58, 32, 107, 101, 101, 112, 32, -116, 104, 105, 115, 32, 117, 112, 32, 116, 111, 32, 100, 97, 116, 101, 32, 62, 95, 60, 10, 91, 34, 67, 43, 43, 57, 56, 34, 93, 32, 61, 32, - 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 57, 56, 34, 44, 10, 91, 34, 67, 43, 43, 48, 120, 34, 93, 32, 61, - 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 49, 34, 93, 32, - 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, 10, 91, 34, 67, 43, 43, 49, 121, 34, 93, - 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 52, 34, - 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 67, 43, 43, 49, 122, - 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 67, 43, 43, 49, - 55, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 103, 110, 117, - 43, 43, 57, 56, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 57, 56, 34, 44, 10, 91, 34, -103, 110, 117, 43, 43, 48, 120, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 49, 34, 44, - 10, 91, 34, 103, 110, 117, 43, 43, 49, 49, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, - 49, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 121, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, 100, 61, 99, - 43, 43, 49, 52, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 52, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, 45, 115, 116, -100, 61, 99, 43, 43, 49, 52, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 122, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, 101, 114, 110, - 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 10, 91, 34, 103, 110, 117, 43, 43, 49, 55, 34, 93, 32, 61, 32, 34, 45, 101, 120, 116, -101, 114, 110, 45, 115, 116, 100, 61, 99, 43, 43, 49, 55, 34, 44, 10, 125, 44, 10, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, 102, 101, 97, -116, 117, 114, 101, 115, 32, 61, 32, 123, 10, 65, 108, 108, 111, 119, 32, 61, 32, 34, 45, 100, 34, 44, 10, 87, 97, 114, 110, 32, 61, 32, 34, - 45, 100, 119, 34, 44, 10, 69, 114, 114, 111, 114, 32, 61, 32, 34, 45, 100, 101, 34, 44, 10, 125, 44, 10, 102, 108, 111, 97, 116, 105, 110, 103, -112, 111, 105, 110, 116, 32, 61, 32, 123, 10, 70, 97, 115, 116, 32, 61, 32, 34, 45, 102, 112, 45, 99, 111, 110, 116, 114, 97, 99, 116, 61, 102, - 97, 115, 116, 32, 45, 101, 110, 97, 98, 108, 101, 45, 117, 110, 115, 97, 102, 101, 45, 102, 112, 45, 109, 97, 116, 104, 34, 44, 10, 125, 44, 10, -111, 112, 116, 105, 109, 105, 122, 101, 32, 61, 32, 123, 10, 79, 102, 102, 32, 61, 32, 34, 45, 79, 48, 34, 44, 10, 79, 110, 32, 61, 32, 34, - 45, 79, 50, 34, 44, 10, 68, 101, 98, 117, 103, 32, 61, 32, 34, 45, 79, 48, 34, 44, 10, 70, 117, 108, 108, 32, 61, 32, 34, 45, 79, 51, - 34, 44, 10, 83, 105, 122, 101, 32, 61, 32, 34, 45, 79, 122, 34, 44, 10, 83, 112, 101, 101, 100, 32, 61, 32, 34, 45, 79, 51, 34, 44, 10, -125, 44, 10, 112, 105, 99, 32, 61, 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 114, 101, 108, 111, 99, 97, 116, 105, 111, 110, 45, 109, 111, 100, -101, 108, 61, 112, 105, 99, 34, 44, 10, 125, 44, 10, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 123, - 10, 65, 86, 88, 32, 61, 32, 34, 45, 109, 97, 116, 116, 114, 61, 43, 97, 118, 120, 34, 44, 10, 65, 86, 88, 50, 32, 61, 32, 34, 45, 109, - 97, 116, 116, 114, 61, 43, 97, 118, 120, 50, 34, 44, 10, 83, 83, 69, 32, 61, 32, 34, 45, 109, 97, 116, 116, 114, 61, 43, 115, 115, 101, 34, - 44, 10, 83, 83, 69, 50, 32, 61, 32, 34, 45, 109, 97, 116, 116, 114, 61, 43, 115, 115, 101, 50, 34, 44, 10, 83, 83, 69, 51, 32, 61, 32, - 34, 45, 109, 97, 116, 116, 114, 61, 43, 115, 115, 101, 51, 34, 44, 10, 83, 83, 83, 69, 51, 32, 61, 32, 34, 45, 109, 97, 116, 116, 114, 61, - 43, 115, 115, 115, 101, 51, 34, 44, 10, 91, 34, 83, 83, 69, 52, 46, 49, 34, 93, 32, 61, 32, 34, 45, 109, 97, 116, 116, 114, 61, 43, 115, -115, 101, 52, 46, 49, 34, 44, 10, 125, 44, 10, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 123, 10, 68, 101, 102, 97, 117, 108, 116, 32, - 61, 32, 34, 45, 119, 105, 34, 44, 10, 72, 105, 103, 104, 32, 61, 32, 34, 45, 119, 105, 34, 44, 10, 69, 120, 116, 114, 97, 32, 61, 32, 34, - 45, 119, 105, 34, 44, 45, 45, 32, 84, 79, 68, 79, 58, 32, 105, 115, 32, 116, 104, 101, 114, 101, 32, 97, 32, 119, 97, 121, 32, 116, 111, 32, -103, 101, 116, 32, 101, 120, 116, 114, 97, 32, 119, 97, 114, 110, 105, 110, 103, 115, 63, 10, 125, 44, 10, 115, 121, 109, 98, 111, 108, 115, 32, 61, - 32, 123, 10, 79, 110, 32, 61, 32, 34, 45, 103, 34, 44, 10, 70, 97, 115, 116, 76, 105, 110, 107, 32, 61, 32, 34, 45, 103, 34, 44, 10, 70, -117, 108, 108, 32, 61, 32, 34, 45, 103, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, 116, -100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, - 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 108, 100, 99, 46, 100, 102, 108, 97, 103, 115, 41, 10, 105, 102, 32, 99, 111, -110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 100, 45, 100, 101, 98, 117, 103, 34, 41, 10, 101, 108, 115, 101, - 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 114, 101, 108, 101, 97, 115, 101, 34, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, -116, 76, 105, 98, 114, 97, 114, 121, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, -109, 101, 32, 61, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, - 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 116, 114, 117, 101, 10, 105, 102, 32, - 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, 79, 102, 102, 34, 32, 116, 104, 101, 110, 10, -115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, - 46, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, 68, 101, 98, 117, 103, 34, 32, 116, 104, 101, 110, 10, 114, 101, 108, 101, 97, 115, 101, -114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 114, 117, 110, 116, 105, -109, 101, 32, 61, 61, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, -105, 109, 101, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 40, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, -116, 105, 109, 101, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 126, 61, 32, 34, 68, -101, 102, 97, 117, 108, 116, 34, 41, 32, 111, 114, 32, 40, 99, 102, 103, 46, 114, 117, 110, 116, 105, 109, 101, 32, 97, 110, 100, 32, 99, 102, 103, - 46, 114, 117, 110, 116, 105, 109, 101, 32, 126, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 115, -116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, -114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 108, 105, 98, 99, 109, 116, 34, 41, 10, 101, 108, 115, -101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 114, 101, -108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, 61, 108, 105, 98, 99, 109, 116, -100, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, 108, 115, -101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 116, 114, 117, 101, 32, 116, 104, 101, -110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 115, 99, 114, 116, 108, 105, 98, - 61, 109, 115, 118, 99, 114, 116, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, 109, 101, 32, 61, - 61, 32, 102, 97, 108, 115, 101, 32, 97, 110, 100, 32, 114, 101, 108, 101, 97, 115, 101, 114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 102, 97, -108, 115, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, -115, 99, 114, 116, 108, 105, 98, 61, 109, 115, 118, 99, 114, 116, 100, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, - 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 68, 111, 99, 117, 109, 101, 110, 116, 97, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 105, 102, - 32, 99, 102, 103, 46, 100, 111, 99, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, -108, 97, 103, 115, 44, 32, 34, 45, 68, 102, 61, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 100, 111, 99, -110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 32, 116, 104, 101, 110, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 68, 100, 61, 34, 32, 46, 46, 32, 112, 46, 113, 117, -111, 116, 101, 100, 40, 99, 102, 103, 46, 100, 111, 99, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, - 46, 102, 108, 97, 103, 115, 46, 71, 101, 110, 101, 114, 97, 116, 101, 72, 101, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, -103, 46, 104, 101, 97, 100, 101, 114, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, -108, 97, 103, 115, 44, 32, 34, 45, 72, 102, 61, 34, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 104, 101, 97, -100, 101, 114, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 32, 116, -104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 72, 100, 61, 34, 32, 46, - 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 99, 102, 103, 46, 104, 101, 97, 100, 101, 114, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 99, 111, 109, 112, 117, 116, 101, 116, 97, 114, 103, 101, 116, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 100, 99, 111, 109, 112, 117, -116, 101, 45, 116, 97, 114, 103, 101, 116, 115, 61, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, - 46, 99, 111, 109, 112, 117, 116, 101, 116, 97, 114, 103, 101, 116, 115, 44, 32, 39, 44, 39, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, -102, 103, 46, 105, 115, 97, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, -105, 115, 97, 77, 97, 112, 32, 61, 32, 123, 10, 77, 79, 86, 66, 69, 32, 61, 32, 34, 109, 111, 118, 98, 101, 34, 44, 10, 80, 79, 80, 67, - 78, 84, 32, 61, 32, 34, 112, 111, 112, 99, 110, 116, 34, 44, 10, 80, 67, 76, 77, 85, 76, 32, 61, 32, 34, 112, 99, 108, 109, 117, 108, 34, - 44, 10, 76, 90, 67, 78, 84, 32, 61, 32, 34, 108, 122, 99, 110, 116, 34, 44, 10, 66, 77, 73, 32, 61, 32, 34, 98, 109, 105, 34, 44, 10, - 66, 77, 73, 50, 32, 61, 32, 34, 98, 109, 105, 50, 34, 44, 10, 70, 49, 54, 67, 32, 61, 32, 34, 102, 49, 54, 99, 34, 44, 10, 65, 69, - 83, 32, 61, 32, 34, 97, 101, 115, 34, 44, 10, 70, 77, 65, 32, 61, 32, 34, 102, 109, 97, 34, 44, 10, 70, 77, 65, 52, 32, 61, 32, 34, -102, 109, 97, 52, 34, 44, 10, 82, 68, 82, 78, 68, 32, 61, 32, 34, 114, 100, 114, 110, 100, 34, 44, 10, 125, 10, 102, 111, 114, 32, 95, 44, - 32, 101, 120, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 41, 32, 100, -111, 10, 105, 102, 32, 105, 115, 97, 77, 97, 112, 91, 101, 120, 116, 93, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 109, 97, 116, 116, 114, 61, 43, 34, 32, 46, 46, 32, 105, -115, 97, 77, 97, 112, 91, 101, 120, 116, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, -112, 114, 101, 118, 105, 101, 119, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 112, 114, 101, 118, 105, 101, 119, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, -114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 112, 114, 101, 118, 105, 101, 119, 61, 34, 32, 46, 46, 32, 111, 112, 116, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 114, 101, 118, 101, 114, 116, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, -114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 114, 101, 118, 101, 114, 116, 41, 32, 100, -111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 114, 101, 118, 101, 114, 116, 61, 34, - 32, 46, 46, 32, 111, 112, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, -105, 111, 110, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 111, 112, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 99, 102, 103, 46, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, -116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 116, 114, 97, 110, 115, 105, 116, 105, 111, 110, 61, 34, 32, 46, 46, 32, 111, 112, 116, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 108, 100, 99, 46, 103, 101, 116, 118, 101, 114, 115, 105, 111, 110, 115, 40, 118, 101, 114, 115, 105, 111, 110, 115, 44, 32, 108, 101, 118, 101, -108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 118, 101, 114, 115, -105, 111, 110, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 118, 101, 114, 115, 105, 111, 110, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 100, 45, 118, 101, 114, 115, 105, 111, 110, 61, 39, 32, 46, 46, - 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, 118, 101, 108, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 100, 45, 118, 101, 114, 115, 105, 111, 110, 61, 39, 32, 46, - 46, 32, 108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, 116, 100, 101, 98, 117, 103, 40, 99, 111, 110, 115, 116, 97, 110, 116, 115, 44, 32, -108, 101, 118, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, - 99, 111, 110, 115, 116, 97, 110, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 115, 116, 97, 110, 116, 115, 41, 32, 100, 111, - 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 100, 45, 100, 101, 98, 117, 103, 61, - 39, 32, 46, 46, 32, 99, 111, 110, 115, 116, 97, 110, 116, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, 118, 101, 108, 32, 116, 104, 101, 110, - 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 100, 45, 100, 101, 98, 117, 103, 61, - 39, 32, 46, 46, 32, 108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, 116, 105, 109, 112, 111, 114, 116, 100, 105, 114, 115, 40, 99, 102, 103, - 44, 32, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, - 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, 100, 111, 10, 100, 105, 114, 32, 61, 32, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, -105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 39, 45, 73, 61, 39, 32, 46, - 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, -108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, 116, 115, 116, 114, 105, 110, 103, 105, 109, 112, -111, 114, 116, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 105, 114, 115, 41, 32, -100, 111, 10, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, - 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, -108, 116, 44, 32, 39, 45, 74, 61, 39, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, -101, 116, 116, 97, 114, 103, 101, 116, 40, 110, 97, 109, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 45, 111, 102, 61, 34, 32, 46, 46, 32, -110, 97, 109, 101, 10, 101, 110, 100, 10, 108, 100, 99, 46, 108, 100, 102, 108, 97, 103, 115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, - 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 123, 32, 34, 45, 109, 51, 50, 34, 32, 125, 44, 10, 120, 56, 54, 95, - 54, 52, 32, 61, 32, 123, 32, 34, 45, 109, 54, 52, 34, 32, 125, 44, 10, 125, 44, 10, 107, 105, 110, 100, 32, 61, 32, 123, 10, 83, 104, 97, -114, 101, 100, 76, 105, 98, 32, 61, 32, 34, 45, 115, 104, 97, 114, 101, 100, 34, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 61, 32, - 34, 45, 108, 105, 98, 34, 44, 10, 125, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, 116, 108, 100, 102, -108, 97, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, - 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 108, 100, 99, 46, 108, 100, 102, 108, 97, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, - 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 108, 100, 99, 46, 108, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, -115, 32, 61, 32, 123, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 45, 76, - 61, 45, 76, 47, 117, 115, 114, 47, 108, 105, 98, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 45, 76, 61, 45, 76, 47, 117, 115, -114, 47, 108, 105, 98, 54, 52, 34, 44, 10, 125, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, 116, 76, 105, - 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, -115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 108, 100, 99, 46, 108, 105, 98, -114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, 100, 105, 114, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, -101, 109, 34, 44, 32, 34, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 41, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, -114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 39, 45, 76, 61, 45, 76, 39, 32, 46, 46, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, -114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 102, 108, 97, 103, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, -116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 115, 121, 115, 116, 101, 109, 111, 110, 108, 121, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, -115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 10, 105, 102, 32, 110, 111, 116, 32, 115, 121, 115, -116, 101, 109, 111, 110, 108, 121, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, -105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 10, -102, 111, 114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, -105, 102, 32, 110, 111, 116, 32, 108, 105, 110, 107, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, -110, 10, 105, 102, 32, 108, 105, 110, 107, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, -101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 76, 61, 34, 32, 46, 46, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 108, 105, 110, 107, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 41, 41, 10, 101, 108, 115, 101, - 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 76, 61, 45, 108, 34, 32, 46, 46, - 32, 108, 105, 110, 107, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 105, 110, 107, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, -107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 10, 102, 111, -114, 32, 95, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, - 32, 112, 97, 116, 104, 46, 105, 115, 102, 114, 97, 109, 101, 119, 111, 114, 107, 40, 108, 105, 110, 107, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 34, 32, - 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 108, 105, 110, 107, 41, 41, 10, 101, 108, 115, 101, 105, -102, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 40, 108, 105, 110, 107, 41, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 76, 61, 34, 32, 46, 46, 32, 108, 105, 110, -107, 41, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 34, 45, 76, - 61, 45, 108, 34, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 108, 105, 110, 107, 41, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 108, 100, 99, 46, 109, 97, -107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, 99, 46, 103, 101, -116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, -115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 109, 97, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 108, 100, 99, 46, 109, 97, 107, -101, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 115, -101, 116, 116, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 108, 100, 99, 46, 116, 111, 111, 108, 115, 32, 61, 32, 123, 10, 100, 99, 32, 61, 32, - 34, 108, 100, 99, 50, 34, 44, 10, 97, 114, 32, 61, 32, 34, 97, 114, 34, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 108, 100, - 99, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 41, 10, 114, 101, 116, 117, 114, 110, 32, -108, 100, 99, 46, 116, 111, 111, 108, 115, 91, 116, 111, 111, 108, 93, 10, 101, 110, 100, 10, }; - -// gmake2/_preload.lua -static const unsigned char builtin_script_82[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 103, 109, 97, 107, 101, 50, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, - 32, 32, 32, 32, 61, 32, 34, 65, 108, 116, 101, 114, 110, 97, 116, 105, 118, 101, 32, 71, 78, 85, 32, 77, 97, 107, 101, 34, 44, 10, 100, 101, -115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 32, 32, 32, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 71, 78, 85, 32, 109, 97, -107, 101, 102, 105, 108, 101, 115, 32, 102, 111, 114, 32, 80, 79, 83, 73, 88, 44, 32, 77, 105, 110, 71, 87, 44, 32, 97, 110, 100, 32, 67, 121, -103, 119, 105, 110, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 103, 99, 99, 34, 44, 10, -118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, - 44, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, -104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, - 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, - 43, 34, 44, 32, 34, 67, 35, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, - 99, 99, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 99, 108, 97, 110, 103, 34, 44, 32, 34, 103, 99, 99, 34, 32, 125, 44, 10, 100, 111, 116, -110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 111, 110, 111, 34, 44, 32, 34, 109, 115, 110, 101, 116, 34, 44, 32, 34, 112, 110, 101, 116, 34, 32, -125, 10, 125, 44, 10, 111, 110, 73, 110, 105, 116, 105, 97, 108, 105, 122, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 114, -101, 113, 117, 105, 114, 101, 40, 34, 103, 109, 97, 107, 101, 50, 34, 41, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, - 50, 46, 99, 112, 112, 46, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 40, 41, 10, 101, 110, 100, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, - 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 112, 46, -109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 101, 115, 99, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 119, -107, 115, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, -110, 97, 109, 101, 40, 119, 107, 115, 44, 32, 102, 97, 108, 115, 101, 41, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, -101, 50, 46, 103, 101, 110, 101, 114, 97, 116, 101, 95, 119, 111, 114, 107, 115, 112, 97, 99, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, -111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, -112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 101, 115, 99, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, -102, 105, 108, 101, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, -105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, - 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, 89, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, - 32, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 117, 116, 105, 108, -105, 116, 121, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, - 32, 112, 46, 77, 65, 75, 69, 70, 73, 76, 69, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, - 32, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 109, 97, 107, 101, -102, 105, 108, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 108, 115, 101, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, -115, 100, 111, 116, 110, 101, 116, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, - 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 99, 115, 46, -103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, - 41, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, -101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, - 46, 103, 109, 97, 107, 101, 50, 46, 99, 112, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, -107, 115, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 119, 107, 115, 44, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, -103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 119, 107, 115, 44, 32, 102, 97, 108, 115, -101, 41, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 99, 108, 101, 97, 110, 46, 102, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 46, 109, 111, 100, 117, -108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, -116, 114, 117, 101, 41, 41, 10, 101, 110, 100, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, - 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 103, 109, 97, 107, 101, 50, 34, 41, 10, 101, -110, 100, 10, }; - -// gmake2/gmake2.lua -static const unsigned char builtin_script_83[] = { -108, 111, 99, 97, 108, 32, 112, 32, 32, 32, 32, 32, 32, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, -111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, -101, 50, 32, 61, 32, 123, 125, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 95, 86, 69, 82, 83, 73, 79, - 78, 32, 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, 10, 108, 111, 99, 97, 108, 32, 103, 109, 97, 107, 101, 50, 32, 61, 32, 112, 46, -109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 100, -101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 101, 97, 99, 104, 99, -111, 110, 102, 105, 103, 32, 61, 32, 105, 105, 102, 40, 116, 97, 114, 103, 101, 116, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 112, 114, 111, 106, -101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 44, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, - 99, 111, 110, 102, 105, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 61, 32, 110, 105, -108, 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 46, 100, 101, 102, 97, 117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, - 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 32, 100, -111, 10, 105, 102, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 61, 32, 116, 97, 114, 103, 101, 116, 46, 100, 101, 102, 97, -117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 61, - 32, 99, 102, 103, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 100, 101, -102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 116, 101, 114, 32, 61, 32, 101, 97, - 99, 104, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 10, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 61, - 32, 105, 116, 101, 114, 40, 41, 10, 101, 110, 100, 10, 105, 102, 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 32, 116, 104, 101, -110, 10, 95, 112, 40, 39, 105, 102, 110, 100, 101, 102, 32, 99, 111, 110, 102, 105, 103, 39, 41, 10, 95, 120, 40, 39, 32, 32, 99, 111, 110, 102, -105, 103, 61, 37, 115, 39, 44, 32, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, - 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, 41, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, -118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 34, 92, 92, 34, 44, 32, 34, 92, 92, 92, 92, 34, 41, 10, 114, 101, 115, 117, 108, 116, 32, - 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 92, 34, 34, 44, 32, 34, 92, 92, 92, 34, 34, 41, 10, 114, 101, 115, 117, -108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 32, 34, 44, 32, 34, 92, 92, 32, 34, 41, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 37, 40, 34, 44, 32, 34, 92, 92, 40, 34, 41, 10, 114, -101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 37, 41, 34, 44, 32, 34, 92, 92, 41, 34, 41, - 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 58, 103, 115, 117, 98, 40, 34, 36, 92, 92, 37, 40, 40, 46, 45, 41, - 92, 92, 37, 41, 34, 44, 32, 34, 36, 40, 37, 49, 41, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, -101, 40, 116, 104, 105, 115, 44, 32, 115, 101, 97, 114, 99, 104, 112, 114, 106, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 117, 110, 116, 32, - 61, 32, 48, 10, 102, 111, 114, 32, 119, 107, 115, 32, 105, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 101, 97, 99, 104, 87, 111, 114, 107, -115, 112, 97, 99, 101, 40, 41, 32, 100, 111, 10, 105, 102, 32, 119, 107, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 61, 32, 116, 104, -105, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 99, 111, 117, 110, 116, 32, 61, 32, 99, 111, 117, 110, 116, 32, 43, - 32, 49, 10, 101, 110, 100, 10, 105, 102, 32, 115, 101, 97, 114, 99, 104, 112, 114, 106, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, - 32, 112, 114, 106, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 119, 107, 115, 46, 112, 114, 111, 106, 101, 99, 116, 115, 41, 32, 100, 111, 10, -105, 102, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 32, 61, 61, 32, 116, 104, 105, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, - 32, 116, 104, 101, 110, 10, 99, 111, 117, 110, 116, 32, 61, 32, 99, 111, 117, 110, 116, 32, 43, 32, 49, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 111, 117, 110, 116, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 46, 109, 97, 107, 101, 34, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 104, 101, 97, 100, 101, 114, 40, -116, 97, 114, 103, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 61, 32, 105, 105, 102, 40, 116, 97, 114, 103, 101, 116, 46, -112, 114, 111, 106, 101, 99, 116, 44, 32, 34, 112, 114, 111, 106, 101, 99, 116, 34, 44, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 41, - 10, 95, 112, 40, 39, 35, 32, 37, 115, 32, 37, 115, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 97, 117, 116, 111, 103, 101, 110, 101, 114, 97, -116, 101, 100, 32, 98, 121, 32, 80, 114, 101, 109, 97, 107, 101, 39, 44, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, -116, 40, 41, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 44, 32, 107, 105, 110, 100, 41, 10, 95, 112, 40, 39, 39, 41, 10, 103, 109, 97, 107, -101, 50, 46, 100, 101, 102, 97, 117, 108, 116, 99, 111, 110, 102, 105, 103, 40, 116, 97, 114, 103, 101, 116, 41, 10, 95, 112, 40, 39, 105, 102, 110, -100, 101, 102, 32, 118, 101, 114, 98, 111, 115, 101, 39, 41, 10, 95, 112, 40, 39, 32, 32, 83, 73, 76, 69, 78, 84, 32, 61, 32, 64, 39, 41, - 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 103, 109, 97, 107, 101, 50, 46, 109, 107, 100, 105, 114, 40, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, - 40, 112, 111, 115, 105, 120, 44, 36, 40, 83, 72, 69, 76, 76, 84, 89, 80, 69, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, - 73, 76, 69, 78, 84, 41, 32, 109, 107, 100, 105, 114, 32, 45, 112, 32, 37, 115, 39, 44, 32, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, - 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 109, 107, 100, 105, 114, 32, 36, - 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 37, 115, 41, 39, 44, 32, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, - 39, 101, 110, 100, 105, 102, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 109, 107, 100, -105, 114, 82, 117, 108, 101, 115, 40, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 37, 115, 58, 39, 44, 32, 100, 105, 114, 110, 97, -109, 101, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 67, 114, 101, 97, 116, 105, 110, 103, 32, 37, 115, 39, 44, 32, 100, 105, -114, 110, 97, 109, 101, 41, 10, 103, 109, 97, 107, 101, 50, 46, 109, 107, 100, 105, 114, 40, 100, 105, 114, 110, 97, 109, 101, 41, 10, 95, 112, 40, - 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 118, 97, 108, -117, 101, 44, 32, 113, 117, 111, 116, 101, 100, 41, 10, 113, 117, 111, 116, 101, 100, 32, 61, 32, 102, 97, 108, 115, 101, 10, 105, 102, 32, 35, 118, - 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 105, 102, 32, 113, 117, 111, 116, 101, 100, 32, 116, 104, 101, 110, 10, 108, 111, 99, - 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 34, 34, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 32, 40, 118, 97, 108, 117, 101, 41, 32, 100, 111, 10, 105, 102, 32, 35, 114, 101, 115, 117, 108, 116, 32, 116, 104, 101, 110, 10, 114, 101, 115, -117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, 116, 32, 46, 46, 32, 34, 32, 34, 10, 101, 110, 100, 10, 114, 101, 115, 117, 108, 116, 32, 61, - 32, 114, 101, 115, 117, 108, 116, 32, 46, 46, 32, 112, 46, 113, 117, 111, 116, 101, 100, 40, 118, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, -110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 118, 97, 108, 117, 101, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 101, -116, 117, 114, 110, 32, 34, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, -116, 111, 118, 97, 114, 40, 118, 97, 108, 117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, - 34, 91, 32, 45, 93, 34, 44, 32, 34, 95, 34, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, - 34, 91, 40, 41, 93, 34, 44, 32, 34, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 10, 99, 102, -103, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 32, 111, 114, 32, 99, 102, 103, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, -115, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 100, 105, 114, 115, - 41, 32, 61, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 102, -105, 108, 116, 101, 114, 101, 109, 112, 116, 121, 40, 100, 105, 114, 115, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 100, 105, 114, 115, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 84, 111, 111, 108, 83, 101, 116, 40, - 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 121, 115, -116, 101, 109, 32, 61, 61, 32, 112, 46, 77, 65, 67, 79, 83, 88, 44, 32, 34, 99, 108, 97, 110, 103, 34, 44, 32, 34, 103, 99, 99, 34, 41, - 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 91, 95, 79, 80, 84, 73, 79, 78, - 83, 46, 99, 99, 32, 111, 114, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 100, 101, 102, 97, 117, 108, 116, 93, 10, -105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, -105, 100, 32, 116, 111, 111, 108, 115, 101, 116, 32, 39, 34, 32, 46, 46, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 46, 46, 32, - 34, 39, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 111, 111, 108, 115, 101, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 99, - 97, 108, 108, 98, 97, 99, 107, 41, 10, 108, 111, 99, 97, 108, 32, 114, 111, 111, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, - 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, -111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 84, 111, 111, 108, 83, 101, 116, - 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, -102, 117, 110, 99, 115, 32, 61, 32, 99, 97, 108, 108, 98, 97, 99, 107, 40, 99, 102, 103, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, - 32, 35, 102, 117, 110, 99, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, -117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 102, 117, 110, 99, 115, 91, 105, 93, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, -114, 116, 40, 115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, -111, 111, 116, 46, 115, 101, 116, 116, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, 114, 111, 111, 116, 46, 115, 101, 116, 116, 105, 110, 103, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 97, 114, 114, 97, 121, 99, 111, 112, 121, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 101, 108, 115, 101, - 10, 114, 111, 111, 116, 46, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 110, 116, 101, 114, 115, 101, 99, 116, - 40, 114, 111, 111, 116, 46, 115, 101, 116, 116, 105, 110, 103, 115, 44, 32, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 114, 111, -111, 116, 91, 99, 102, 103, 93, 32, 61, 32, 115, 101, 116, 116, 105, 110, 103, 115, 10, 101, 110, 100, 10, 105, 102, 32, 35, 114, 111, 111, 116, 46, -115, 101, 116, 116, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 114, 111, 111, 116, 46, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 100, 111, 10, 112, 46, 111, 117, 116, 108, 110, 40, 118, - 41, 10, 101, 110, 100, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 39, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, -116, 32, 61, 32, 116, 114, 117, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, - 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, -116, 97, 98, 108, 101, 46, 100, 105, 102, 102, 101, 114, 101, 110, 99, 101, 40, 114, 111, 111, 116, 91, 99, 102, 103, 93, 44, 32, 114, 111, 111, 116, - 46, 115, 101, 116, 116, 105, 110, 103, 115, 41, 10, 105, 102, 32, 35, 115, 101, 116, 116, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 102, 105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, -103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 102, 105, 114, 115, 116, 32, 61, 32, -102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 10, 95, 120, 40, 39, 101, 108, 115, 101, 32, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, -105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 111, 114, - 32, 107, 44, 32, 118, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 100, 111, 10, 112, 46, 111, -117, 116, 108, 110, 40, 118, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, -116, 32, 102, 105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 112, 46, -111, 117, 116, 108, 110, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, - 50, 46, 101, 120, 112, 97, 110, 100, 82, 117, 108, 101, 83, 116, 114, 105, 110, 103, 40, 114, 117, 108, 101, 44, 32, 112, 114, 111, 112, 44, 32, 118, - 97, 108, 117, 101, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, -116, 104, 101, 110, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 111, 112, 46, -115, 119, 105, 116, 99, 104, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 112, 46, 115, 119, 105, 116, 99, 104, 32, 46, - 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 118, 97, 108, 117, 101, 44, 32, 34, 32, 34, 32, 46, 46, 32, 112, 114, 111, -112, 46, 115, 119, 105, 116, 99, 104, 41, 10, 101, 108, 115, 101, 10, 112, 114, 111, 112, 46, 115, 101, 112, 97, 114, 97, 116, 111, 114, 32, 61, 32, -112, 114, 111, 112, 46, 115, 101, 112, 97, 114, 97, 116, 111, 114, 32, 111, 114, 32, 34, 32, 34, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 118, 97, 108, 117, 101, 44, 32, 112, 114, 111, 112, 46, 115, 101, 112, 97, 114, 97, 116, 111, 114, 41, - 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, -112, 114, 111, 112, 46, 115, 119, 105, 116, 99, 104, 32, 97, 110, 100, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, - 98, 111, 111, 108, 101, 97, 110, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 112, 114, 111, 112, 46, 115, 119, 105, 116, 99, 104, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, -110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 119, 105, 116, 99, 104, 32, 61, 32, 112, 114, 111, 112, 46, 115, 119, 105, 116, 99, -104, 32, 111, 114, 32, 34, 34, 10, 105, 102, 32, 112, 114, 111, 112, 46, 118, 97, 108, 117, 101, 115, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, -101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 102, 105, 110, 100, 75, 101, 121, 66, 121, 86, 97, 108, 117, 101, 40, 112, 114, 111, 112, 46, 118, 97, -108, 117, 101, 115, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, -110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 118, 97, 108, 117, 101, 32, 61, 32, 116, 111, 115, -116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 115, 119, 105, 116, 99, 104, 32, 46, 46, 32, 118, 97, 108, 117, 101, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, -114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 112, -114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 114, 117, 108, 101, 44, 32, 101, 110, 118, 105, 114, 111, 110, 44, - 32, 99, 102, 103, 41, 10, 102, 111, 114, 32, 95, 44, 32, 112, 114, 111, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 114, 117, 108, 101, - 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 108, -100, 32, 61, 32, 112, 46, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, 112, 101, 114, 116, 121, 70, 105, 101, 108, 100, 40, 114, 117, 108, 101, - 44, 32, 112, 114, 111, 112, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 99, 102, 103, 91, 102, 108, 100, 46, 110, 97, -109, 101, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 108, 100, 46, -107, 105, 110, 100, 32, 61, 61, 32, 34, 112, 97, 116, 104, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 103, 109, 97, 107, -101, 50, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 102, 108, 100, 46, 107, -105, 110, 100, 32, 61, 61, 32, 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, -103, 109, 97, 107, 101, 50, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 118, 97, 108, 117, -101, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 101, 120, 112, 97, 110, 100, 82, 117, 108, 101, 83, 116, 114, 105, 110, 103, 40, 114, 117, 108, 101, - 44, 32, 112, 114, 111, 112, 44, 32, 118, 97, 108, 117, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, -110, 100, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 101, 110, 118, 105, 114, 111, 110, 91, 112, 114, 111, 112, 46, -110, 97, 109, 101, 93, 32, 61, 32, 112, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 40, -112, 114, 106, 41, 10, 95, 112, 40, 39, 46, 80, 72, 79, 78, 89, 58, 32, 99, 108, 101, 97, 110, 32, 112, 114, 101, 98, 117, 105, 108, 100, 39, - 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 115, 104, 101, -108, 108, 84, 121, 112, 101, 40, 41, 10, 95, 112, 40, 39, 83, 72, 69, 76, 76, 84, 89, 80, 69, 32, 58, 61, 32, 112, 111, 115, 105, 120, 39, - 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 46, 101, 120, 101, 44, 36, 40, 102, 105, 110, 100, 115, 116, 114, 105, 110, 103, 32, 46, 101, -120, 101, 44, 36, 40, 67, 111, 109, 83, 112, 101, 99, 41, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 83, 72, 69, 76, 76, 84, 89, 80, - 69, 32, 58, 61, 32, 109, 115, 100, 111, 115, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 116, 97, 114, 103, 101, 116, 40, 99, 102, 103, 44, 32, -116, 111, 111, 108, 115, 101, 116, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 84, 65, 82, 71, 69, 84, 68, 73, 82, 32, 61, 32, 39, 32, - 46, 46, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, - 99, 116, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 41, 41, 10, -112, 46, 111, 117, 116, 108, 110, 40, 39, 84, 65, 82, 71, 69, 84, 32, 61, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 47, 39, - 32, 46, 46, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 111, 98, 106, 100, 105, 114, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, -116, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 79, 66, 74, 68, 73, 82, 32, 61, 32, 39, 32, 46, 46, 32, 112, 114, 111, 106, 101, 99, -116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 111, - 98, 106, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 115, 101, 116, 116, -105, 110, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 109, 97, 107, 101, 115, -101, 116, 116, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 41, 32, 100, 111, 10, 112, 46, 111, -117, 116, 108, 110, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, - 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 109, 97, 107, 101, 115, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 105, -102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, -103, 44, 32, 101, 118, 101, 110, 116, 41, 10, 95, 112, 40, 39, 100, 101, 102, 105, 110, 101, 32, 37, 115, 67, 77, 68, 83, 39, 44, 32, 101, 118, -101, 110, 116, 58, 117, 112, 112, 101, 114, 40, 41, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 91, 101, -118, 101, 110, 116, 32, 46, 46, 32, 34, 99, 111, 109, 109, 97, 110, 100, 115, 34, 93, 10, 108, 111, 99, 97, 108, 32, 109, 115, 103, 32, 61, 32, - 99, 102, 103, 91, 101, 118, 101, 110, 116, 32, 46, 46, 32, 34, 109, 101, 115, 115, 97, 103, 101, 34, 93, 10, 105, 102, 32, 35, 115, 116, 101, 112, -115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, -111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, - 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, - 41, 10, 109, 115, 103, 32, 61, 32, 109, 115, 103, 32, 111, 114, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 82, 117, -110, 110, 105, 110, 103, 32, 37, 115, 32, 99, 111, 109, 109, 97, 110, 100, 115, 34, 44, 32, 101, 118, 101, 110, 116, 41, 10, 95, 112, 40, 39, 92, -116, 64, 101, 99, 104, 111, 32, 37, 115, 39, 44, 32, 109, 115, 103, 41, 10, 95, 112, 40, 39, 92, 116, 37, 115, 39, 44, 32, 116, 97, 98, 108, -101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 110, 92, 116, 34, 41, - 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 101, 110, 100, 101, 102, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, -109, 97, 107, 101, 50, 46, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, - 10, 103, 109, 97, 107, 101, 50, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 34, 112, 114, 101, 98, 117, 105, 108, 100, - 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 76, 105, 110, 107, 67, 109, -100, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 103, 109, 97, 107, 101, 50, 46, 98, 117, 105, 108, 100, 67, 109, 100, -115, 40, 99, 102, 103, 44, 32, 34, 112, 114, 101, 108, 105, 110, 107, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, -109, 97, 107, 101, 50, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 103, 109, 97, 107, 101, 50, 46, 98, 117, 105, 108, 100, 67, 109, 100, 115, 40, 99, 102, 103, 44, 32, 34, 112, 111, 115, 116, 98, 117, 105, -108, 100, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 116, 97, 114, 103, 101, 116, 68, -105, 114, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 103, 109, 97, 107, 101, 50, 46, 109, 107, 100, -105, 114, 82, 117, 108, 101, 115, 40, 34, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 103, 109, 97, 107, 101, 50, 46, 109, 107, 100, 105, 114, 82, 117, 108, 101, 115, 40, 34, 36, 40, 79, 66, 74, 68, 73, - 82, 41, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 66, 117, 105, 108, -100, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 112, 114, 101, 98, 117, 105, 108, -100, 58, 32, 124, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 82, 69, 66, 85, 73, 76, - 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, -107, 101, 50, 95, 99, 112, 112, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 50, 95, 99, 115, -104, 97, 114, 112, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 50, 95, 109, 97, 107, 101, 102, -105, 108, 101, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 50, 95, 117, 116, 105, 108, 105, 116, -121, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 103, 109, 97, 107, 101, 50, 95, 119, 111, 114, 107, 115, 112, 97, 99, -101, 46, 108, 117, 97, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 103, 109, 97, 107, 101, 50, 10, }; - -// gmake2/gmake2_cpp.lua -static const unsigned char builtin_script_84[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 103, 109, 97, 107, 101, 50, 32, 61, - 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 10, 103, 109, 97, 107, 101, 50, 46, 99, 112, 112, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 99, 112, 112, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 103, 109, 97, 107, 101, - 50, 46, 99, 112, 112, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, - 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 32, 32, 32, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, -111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 99, -112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, -107, 101, 102, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, -103, 109, 97, 107, 101, 50, 46, 104, 101, 97, 100, 101, 114, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, - 44, 10, 103, 109, 97, 107, 101, 50, 46, 115, 104, 101, 108, 108, 84, 121, 112, 101, 44, 10, 99, 112, 112, 46, 99, 114, 101, 97, 116, 101, 82, 117, -108, 101, 84, 97, 98, 108, 101, 44, 10, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, - 83, 101, 99, 116, 105, 111, 110, 44, 10, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 80, 101, 114, 70, 105, 108, 101, 67, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 83, 101, 99, 116, 105, 111, 110, 44, 10, 99, 112, 112, 46, 99, 114, 101, 97, 116, 101, 70, 105, 108, 101, 84, 97, - 98, 108, 101, 44, 10, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 115, 83, 101, 99, 116, 105, 111, 110, 44, 10, 99, 112, 112, - 46, 111, 117, 116, 112, 117, 116, 82, 117, 108, 101, 115, 83, 101, 99, 116, 105, 111, 110, 44, 10, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 70, -105, 108, 101, 82, 117, 108, 101, 83, 101, 99, 116, 105, 111, 110, 44, 10, 99, 112, 112, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, - 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, -106, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 110, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 112, 112, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, -110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 102, 103, - 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 110, -105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 40, 41, - 10, 114, 117, 108, 101, 32, 39, 99, 112, 112, 39, 10, 102, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 32, 123, 32, 34, 46, 99, 99, - 34, 44, 32, 34, 46, 99, 112, 112, 34, 44, 32, 34, 46, 99, 120, 120, 34, 44, 32, 34, 46, 109, 109, 34, 32, 125, 10, 98, 117, 105, 108, 100, -111, 117, 116, 112, 117, 116, 115, 32, 32, 123, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 37, 123, 102, 105, 108, 101, 46, 111, 98, 106, -110, 97, 109, 101, 125, 46, 111, 34, 32, 125, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 32, 39, 36, 40, 110, 111, 116, 100, -105, 114, 32, 36, 60, 41, 39, 10, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 123, 39, 36, 40, 67, 88, 88, 41, 32, 37, -123, 112, 114, 101, 109, 97, 107, 101, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 99, 112, 112, 46, 102, 105, 108, 101, - 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 125, 32, 36, 40, 70, 79, 82, 67, 69, 95, 73, 78, 67, 76, 85, 68, - 69, 41, 32, 45, 111, 32, 34, 36, 64, 34, 32, 45, 77, 70, 32, 34, 36, 40, 64, 58, 37, 46, 111, 61, 37, 46, 100, 41, 34, 32, 45, 99, - 32, 34, 36, 60, 34, 39, 125, 10, 114, 117, 108, 101, 32, 39, 99, 99, 39, 10, 102, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 32, -123, 34, 46, 99, 34, 44, 32, 34, 46, 115, 34, 44, 32, 34, 46, 109, 34, 125, 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, - 32, 123, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 37, 123, 102, 105, 108, 101, 46, 111, 98, 106, 110, 97, 109, 101, 125, 46, 111, 34, - 32, 125, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 32, 39, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 60, 41, 39, 10, - 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 123, 39, 36, 40, 67, 67, 41, 32, 37, 123, 112, 114, 101, 109, 97, 107, 101, 46, -109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 46, 99, 112, 112, 46, 102, 105, 108, 101, 70, 108, 97, 103, 115, 40, 99, 102, 103, - 44, 32, 102, 105, 108, 101, 41, 125, 32, 36, 40, 70, 79, 82, 67, 69, 95, 73, 78, 67, 76, 85, 68, 69, 41, 32, 45, 111, 32, 34, 36, 64, - 34, 32, 45, 77, 70, 32, 34, 36, 40, 64, 58, 37, 46, 111, 61, 37, 46, 100, 41, 34, 32, 45, 99, 32, 34, 36, 60, 34, 39, 125, 10, 114, -117, 108, 101, 32, 39, 114, 101, 115, 111, 117, 114, 99, 101, 39, 10, 102, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 32, 34, 46, 114, - 99, 34, 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 32, 123, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 37, 123, -102, 105, 108, 101, 46, 111, 98, 106, 110, 97, 109, 101, 125, 46, 114, 101, 115, 34, 32, 125, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, -101, 32, 32, 39, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 60, 41, 39, 10, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, -123, 39, 36, 40, 82, 69, 83, 67, 79, 77, 80, 41, 32, 36, 60, 32, 45, 79, 32, 99, 111, 102, 102, 32, 45, 111, 32, 34, 36, 64, 34, 32, - 36, 40, 65, 76, 76, 95, 82, 69, 83, 70, 76, 65, 71, 83, 41, 39, 125, 10, 103, 108, 111, 98, 97, 108, 40, 110, 105, 108, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 99, 114, 101, 97, 116, 101, 82, 117, 108, 101, 84, 97, 98, 108, 101, 40, 112, -114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, -105, 111, 110, 32, 97, 100, 100, 82, 117, 108, 101, 40, 101, 120, 116, 101, 110, 115, 105, 111, 110, 44, 32, 114, 117, 108, 101, 41, 10, 105, 102, 32, -116, 121, 112, 101, 40, 101, 120, 116, 101, 110, 115, 105, 111, 110, 41, 32, 61, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, -102, 111, 114, 32, 95, 44, 32, 118, 97, 108, 117, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 101, 120, 116, 101, 110, 115, 105, 111, 110, - 41, 32, 100, 111, 10, 97, 100, 100, 82, 117, 108, 101, 40, 118, 97, 108, 117, 101, 44, 32, 114, 117, 108, 101, 41, 10, 101, 110, 100, 10, 101, 108, -115, 101, 10, 114, 117, 108, 101, 115, 91, 101, 120, 116, 101, 110, 115, 105, 111, 110, 93, 32, 61, 32, 114, 117, 108, 101, 10, 101, 110, 100, 10, 101, -110, 100, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 100, 82, 117, 108, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, -123, 39, 99, 112, 112, 39, 44, 32, 39, 99, 99, 39, 44, 32, 39, 114, 101, 115, 111, 117, 114, 99, 101, 39, 125, 44, 32, 112, 114, 106, 46, 114, -117, 108, 101, 115, 41, 10, 102, 111, 114, 32, 95, 44, 32, 110, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 117, 115, 101, 100, - 82, 117, 108, 101, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, -103, 101, 116, 82, 117, 108, 101, 40, 110, 97, 109, 101, 41, 10, 97, 100, 100, 82, 117, 108, 101, 40, 114, 117, 108, 101, 46, 102, 105, 108, 101, 69, -120, 116, 101, 110, 115, 105, 111, 110, 44, 32, 114, 117, 108, 101, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 101, -116, 115, 32, 61, 32, 123, 10, 91, 39, 46, 111, 39, 93, 32, 32, 32, 61, 32, 39, 79, 66, 74, 69, 67, 84, 83, 39, 44, 10, 91, 39, 46, -111, 98, 106, 39, 93, 32, 61, 32, 39, 79, 66, 74, 69, 67, 84, 83, 39, 44, 10, 91, 39, 46, 99, 99, 39, 93, 32, 32, 61, 32, 39, 83, - 79, 85, 82, 67, 69, 83, 39, 44, 10, 91, 39, 46, 99, 112, 112, 39, 93, 32, 61, 32, 39, 83, 79, 85, 82, 67, 69, 83, 39, 44, 10, 91, - 39, 46, 99, 120, 120, 39, 93, 32, 61, 32, 39, 83, 79, 85, 82, 67, 69, 83, 39, 44, 10, 91, 39, 46, 109, 109, 39, 93, 32, 32, 61, 32, - 39, 83, 79, 85, 82, 67, 69, 83, 39, 44, 10, 91, 39, 46, 99, 39, 93, 32, 32, 32, 61, 32, 39, 83, 79, 85, 82, 67, 69, 83, 39, 44, - 10, 91, 39, 46, 115, 39, 93, 32, 32, 32, 61, 32, 39, 83, 79, 85, 82, 67, 69, 83, 39, 44, 10, 91, 39, 46, 109, 39, 93, 32, 32, 32, - 61, 32, 39, 83, 79, 85, 82, 67, 69, 83, 39, 44, 10, 91, 39, 46, 114, 99, 39, 93, 32, 32, 61, 32, 39, 82, 69, 83, 79, 85, 82, 67, - 69, 83, 39, 44, 10, 125, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 111, -114, 32, 123, 125, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 114, 117, 108, 101, 115, 32, 61, 32, 114, 117, 108, 101, 115, 10, 112, 114, -106, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 32, 61, 32, 102, 105, 108, 101, 115, 101, 116, 115, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 99, 114, 101, 97, 116, 101, 70, 105, 108, 101, 84, 97, 98, 108, 101, 40, 112, 114, -106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, - 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, - 32, 111, 114, 32, 123, 125, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 32, 61, 32, 123, 125, 10, - 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, -102, 105, 108, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 115, 104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 112, 114, 106, 46, 95, 46, -102, 105, 108, 101, 115, 41, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 99, 112, 112, 46, 97, 100, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, -101, 41, 10, 101, 110, 100, 41, 10, 102, 111, 114, 32, 95, 44, 32, 102, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, -109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 102, 41, 10, -101, 110, 100, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, 121, -115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, -116, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 107, -105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, -100, 115, 32, 111, 114, 32, 123, 125, 44, 32, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 101, 110, 100, 10, -105, 102, 32, 112, 114, 106, 46, 104, 97, 115, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 32, 97, 110, 100, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 111, 118, 101, 110, 46, 97, 115, -115, 105, 103, 110, 79, 98, 106, 101, 99, 116, 83, 101, 113, 117, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 112, 114, 106, - 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 117, 110, 105, 113, 117, 101, 40, 112, 114, 106, - 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 112, 114, 106, 46, 95, 103, -109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 97, 100, 100, - 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, -102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, -105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 111, 114, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, - 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, - 10, 105, 102, 32, 110, 111, 100, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, -110, 100, 10, 105, 102, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, -117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 32, 61, 32, 116, 97, - 98, 108, 101, 46, 115, 104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 102, 105, 108, 101, 99, 102, 103, 46, 101, 110, 118, 105, 114, 111, 110, 41, - 10, 101, 110, 118, 46, 80, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 123, 10, 91, 34, 102, 105, 108, 101, 46, 98, 97, 115, 101, 110, 97, 109, -101, 34, 93, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, -107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 97, 98, -115, 112, 97, 116, 104, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, - 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 32, 125, 44, 10, 91, 34, 102, 105, 108, -101, 46, 114, 101, 108, 112, 97, 116, 104, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, -102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 32, 125, 44, 10, 91, - 34, 102, 105, 108, 101, 46, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, -101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 125, 44, 10, - 91, 34, 102, 105, 108, 101, 46, 111, 98, 106, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, -116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 111, 98, 106, 110, 97, 109, 101, - 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 112, 97, 116, 104, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, -115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 116, -104, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 93, 32, 32, 32, 32, 61, 32, 123, 32, 97, - 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, -116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 125, 44, 10, 91, 34, 102, 105, -108, 101, 46, 114, 101, 108, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 93, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, - 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, -121, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 32, 125, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 100, 111, -119, 67, 111, 110, 116, 101, 120, 116, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 102, 105, 108, 101, - 99, 102, 103, 44, 32, 101, 110, 118, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 112, - 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 10, 105, 102, - 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 32, 61, 32, 123, 10, 98, 117, 105, 108, 100, 111, 117, 116, -112, 117, 116, 115, 32, 32, 61, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 44, 10, 115, 111, 117, 114, 99, 101, 32, 32, 32, 32, - 32, 32, 32, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, - 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 44, 10, - 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, -105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 10, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 32, 32, 61, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, -115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 10, 125, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 44, 32, -102, 105, 108, 101, 41, 10, 102, 111, 114, 32, 95, 44, 32, 111, 117, 116, 112, 117, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, 117, -105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 32, 100, 111, 10, 99, 112, 112, 46, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, -105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 44, 32, 111, 117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, -108, 115, 101, 10, 99, 112, 112, 46, 97, 100, 100, 82, 117, 108, 101, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 100, 101, 116, 101, 114, 109, 105, 110, 101, 70, 105, 108, -101, 116, 121, 112, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, - 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, - 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 101, 120, 116, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, -111, 110, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 105, 102, 32, 102, 105, 108, 101, - 99, 102, 103, 32, 97, 110, 100, 32, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 32, 116, 104, 101, 110, 10, 105, -102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, -101, 97, 115, 41, 32, 116, 104, 101, 110, 10, 102, 105, 108, 101, 101, 120, 116, 32, 61, 32, 34, 46, 99, 34, 10, 101, 108, 115, 101, 105, 102, 32, -112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, -101, 97, 115, 41, 32, 116, 104, 101, 110, 10, 102, 105, 108, 101, 101, 120, 116, 32, 61, 32, 34, 46, 99, 112, 112, 34, 10, 101, 110, 100, 10, 101, -110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 108, 101, 101, 120, 116, 59, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 112, 112, 46, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 115, 111, 117, 114, 99, 101, - 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 71, 101, 110, 101, 114, - 97, 116, 101, 100, 70, 105, 108, 101, 115, 32, 61, 32, 116, 114, 117, 101, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 95, 46, 102, 105, 108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, -102, 105, 108, 101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 110, 111, 100, 101, 32, 116, 104, 101, 110, - 10, 110, 111, 100, 101, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 110, 101, 119, 40, 102, 105, 108, 101, 110, 97, 109, 101, 44, - 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 10, 102, 105, 108, 101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 32, 61, 32, -110, 111, 100, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, 108, 101, 115, 44, 32, 110, 111, 100, 101, 41, 10, 101, -110, 100, 10, 110, 111, 100, 101, 46, 100, 101, 112, 101, 110, 100, 115, 79, 110, 32, 61, 32, 115, 111, 117, 114, 99, 101, 10, 110, 111, 100, 101, 46, -103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 102, 105, 108, -101, 99, 111, 110, 102, 105, 103, 46, 97, 100, 100, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 101, 120, 116, 32, 61, 32, 99, 112, 112, 46, 100, 101, 116, 101, 114, 109, 105, 110, 101, 70, 105, -108, 101, 116, 121, 112, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 101, 116, 115, - 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 10, 108, -111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 32, 32, 32, 32, 61, 32, 102, 105, 108, 101, 115, 101, 116, 115, 91, 102, 105, 108, 101, 101, 120, 116, - 93, 32, 111, 114, 32, 34, 67, 85, 83, 84, 79, 77, 34, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 111, 98, 106, 101, 99, 116, 102, 105, -108, 101, 40, 102, 105, 108, 101, 110, 97, 109, 101, 41, 32, 97, 110, 100, 32, 115, 111, 117, 114, 99, 101, 46, 108, 105, 110, 107, 98, 117, 105, 108, -100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 107, 105, 110, 100, 32, 61, 32, 34, 67, - 85, 83, 84, 79, 77, 34, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 101, 116, 32, 61, 32, 99, 102, 103, 46, 95, -103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 91, 107, 105, 110, 100, 93, 32, 111, 114, 32, 123, 125, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, 108, 101, 115, 101, 116, 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 99, 102, 103, 46, 95, -103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 91, 107, 105, 110, 100, 93, 32, 61, 32, 102, 105, 108, 101, 115, 101, 116, 10, 108, -111, 99, 97, 108, 32, 103, 101, 110, 101, 114, 97, 116, 101, 100, 75, 105, 110, 100, 32, 61, 32, 34, 71, 69, 78, 69, 82, 65, 84, 69, 68, 34, - 10, 108, 111, 99, 97, 108, 32, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 101, 116, 32, 61, 32, 99, 102, 103, 46, 95, 103, -109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 91, 103, 101, 110, 101, 114, 97, 116, 101, 100, 75, 105, 110, 100, 93, 32, 111, 114, 32, -123, 125, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 101, 116, - 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 91, -103, 101, 110, 101, 114, 97, 116, 101, 100, 75, 105, 110, 100, 93, 32, 61, 32, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 115, 101, -116, 10, 99, 112, 112, 46, 97, 100, 100, 82, 117, 108, 101, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 97, 100, 100, 82, 117, 108, 101, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, -111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 115, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 95, -103, 109, 97, 107, 101, 46, 114, 117, 108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 101, 120, 116, 32, 61, 32, 99, 112, 112, 46, -100, 101, 116, 101, 114, 109, 105, 110, 101, 70, 105, 108, 101, 116, 121, 112, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, - 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 114, 117, 108, 101, 115, 91, 102, 105, 108, 101, 101, 120, 116, 93, 10, 105, 102, 32, 114, 117, 108, 101, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, - 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 105, -114, 111, 110, 32, 61, 32, 116, 97, 98, 108, 101, 46, 115, 104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 102, 105, 108, 101, 99, 102, 103, 46, -101, 110, 118, 105, 114, 111, 110, 41, 10, 105, 102, 32, 114, 117, 108, 101, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, -105, 111, 110, 32, 116, 104, 101, 110, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, -110, 116, 40, 114, 117, 108, 101, 44, 32, 101, 110, 118, 105, 114, 111, 110, 44, 32, 99, 102, 103, 41, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, -101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 114, 117, 108, 101, 44, 32, 101, 110, 118, 105, 114, 111, 110, 44, 32, -102, 105, 108, 101, 99, 102, 103, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, - 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 114, 117, 108, 101, 44, 32, 101, 110, 118, 105, 114, 111, -110, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, -111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 109, -101, 115, 115, 97, 103, 101, 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 109, 101, 115, -115, 97, 103, 101, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 115, 104, 97, 100, 111, -119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, -108, 100, 105, 110, 112, 117, 116, 115, 32, 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, -105, 110, 112, 117, 116, 115, 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, -103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 98, 117, 105, 108, 100, 111, 117, -116, 112, 117, 116, 115, 41, 10, 105, 102, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, -100, 111, 117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 32, 61, 32, 123, - 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 32, 61, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 44, 10, 115, -111, 117, 114, 99, 101, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, 10, 98, 117, 105, -108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 32, 61, 32, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 44, 10, 98, 117, 105, 108, 100, - 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 10, 98, 117, 105, 108, 100, 105, -110, 112, 117, 116, 115, 32, 32, 32, 61, 32, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 10, 125, 10, 116, 97, 98, 108, 101, 46, 105, 110, -115, 101, 114, 116, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 44, 32, 102, 105, 108, 101, 41, - 10, 102, 111, 114, 32, 95, 44, 32, 111, 117, 116, 112, 117, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, 117, 105, 108, 100, 111, 117, -116, 112, 117, 116, 115, 41, 32, 100, 111, 10, 99, 112, 112, 46, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, -102, 103, 44, 32, 110, 111, 100, 101, 44, 32, 111, 117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 99, 112, 112, 46, 116, 111, 111, 108, 115, 44, - 10, 103, 109, 97, 107, 101, 50, 46, 116, 97, 114, 103, 101, 116, 44, 10, 103, 109, 97, 107, 101, 50, 46, 111, 98, 106, 100, 105, 114, 44, 10, 99, -112, 112, 46, 112, 99, 104, 44, 10, 99, 112, 112, 46, 100, 101, 102, 105, 110, 101, 115, 44, 10, 99, 112, 112, 46, 105, 110, 99, 108, 117, 100, 101, -115, 44, 10, 99, 112, 112, 46, 102, 111, 114, 99, 101, 73, 110, 99, 108, 117, 100, 101, 44, 10, 99, 112, 112, 46, 99, 112, 112, 70, 108, 97, 103, -115, 44, 10, 99, 112, 112, 46, 99, 70, 108, 97, 103, 115, 44, 10, 99, 112, 112, 46, 99, 120, 120, 70, 108, 97, 103, 115, 44, 10, 99, 112, 112, - 46, 114, 101, 115, 70, 108, 97, 103, 115, 44, 10, 99, 112, 112, 46, 108, 105, 98, 115, 44, 10, 99, 112, 112, 46, 108, 100, 68, 101, 112, 115, 44, - 10, 99, 112, 112, 46, 108, 100, 70, 108, 97, 103, 115, 44, 10, 99, 112, 112, 46, 108, 105, 110, 107, 67, 109, 100, 44, 10, 99, 112, 112, 46, 98, -105, 110, 100, 105, 114, 115, 44, 10, 99, 112, 112, 46, 101, 120, 101, 112, 97, 116, 104, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 115, 101, 116, -116, 105, 110, 103, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 103, 109, 97, 107, -101, 50, 46, 112, 114, 101, 76, 105, 110, 107, 67, 109, 100, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, - 67, 109, 100, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 67, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 67, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, -110, 40, 112, 114, 106, 44, 32, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 116, 111, 111, 108, 115, 40, 99, 102, 103, 44, 32, 116, -111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, -116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 99, 99, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, - 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 111, 114, 105, 103, 105, 110, 32, 67, 67, 41, 44, 32, 100, 101, 102, 97, 117, 108, 116, - 41, 39, 41, 10, 95, 112, 40, 39, 32, 32, 67, 67, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 95, 112, 40, 39, 101, 110, -100, 105, 102, 39, 32, 41, 10, 101, 110, 100, 10, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, -108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 99, 120, 120, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, -112, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 111, 114, 105, 103, 105, 110, 32, 67, 88, 88, 41, 44, 32, 100, 101, 102, 97, 117, 108, 116, 41, - 39, 41, 10, 95, 112, 40, 39, 32, 32, 67, 88, 88, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 95, 112, 40, 39, 101, 110, -100, 105, 102, 39, 32, 41, 10, 101, 110, 100, 10, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, -108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 97, 114, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, 112, - 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 111, 114, 105, 103, 105, 110, 32, 65, 82, 41, 44, 32, 100, 101, 102, 97, 117, 108, 116, 41, 39, 41, - 10, 95, 112, 40, 39, 32, 32, 65, 82, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, - 39, 32, 41, 10, 101, 110, 100, 10, 116, 111, 111, 108, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, -109, 101, 40, 99, 102, 103, 44, 32, 34, 114, 99, 34, 41, 10, 105, 102, 32, 116, 111, 111, 108, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 82, - 69, 83, 67, 79, 77, 80, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 99, 112, 112, 46, 112, 99, 104, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, -116, 32, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 32, 111, 114, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, - 67, 72, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 99, 104, 32, 61, 32, 99, -102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 10, 108, 111, 99, 97, 108, 32, 102, 111, 117, 110, 100, 32, 61, 32, 102, 97, 108, 115, 101, - 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 112, 99, 104, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, -108, 101, 40, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 112, 99, 104, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, -103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, -101, 41, 10, 102, 111, 117, 110, 100, 32, 61, 32, 116, 114, 117, 101, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 95, 44, 32, 105, 110, 99, 100, -105, 114, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 32, 100, 111, - 10, 116, 101, 115, 116, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 105, 110, 99, 100, 105, 114, 44, 32, 112, 99, -104, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 116, 101, 115, 116, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 112, - 99, 104, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, -106, 101, 99, 116, 44, 32, 116, 101, 115, 116, 110, 97, 109, 101, 41, 10, 102, 111, 117, 110, 100, 32, 61, 32, 116, 114, 117, 101, 10, 98, 114, 101, - 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 32, 116, 104, 101, 110, - 10, 112, 99, 104, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, 98, 115, 111, 108, 117, 116, 101, 40, 112, 99, 104, 41, 41, 10, 101, -110, 100, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 80, 67, 72, 32, 61, 32, 39, 32, 46, 46, 32, 112, 99, 104, 41, 10, 112, 46, 111, 117, -116, 108, 110, 40, 39, 80, 67, 72, 95, 80, 76, 65, 67, 69, 72, 79, 76, 68, 69, 82, 32, 61, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, - 47, 36, 40, 110, 111, 116, 100, 105, 114, 32, 36, 40, 80, 67, 72, 41, 41, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 71, 67, 72, - 32, 61, 32, 36, 40, 80, 67, 72, 95, 80, 76, 65, 67, 69, 72, 79, 76, 68, 69, 82, 41, 46, 103, 99, 104, 39, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 100, 101, 102, 105, 110, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, -116, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 68, 69, 70, 73, 78, 69, 83, 32, 43, 61, 39, 32, 46, 46, 32, 103, 109, 97, 107, 101, - 50, 46, 108, 105, 115, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 100, 101, 102, -105, 110, 101, 115, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 44, 32, 99, 102, 103, 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, -103, 101, 116, 117, 110, 100, 101, 102, 105, 110, 101, 115, 40, 99, 102, 103, 46, 117, 110, 100, 101, 102, 105, 110, 101, 115, 41, 41, 41, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, 117, 100, 101, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, -103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, -105, 114, 115, 44, 32, 99, 102, 103, 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 112, 46, 111, 117, 116, 108, 110, - 40, 39, 73, 78, 67, 76, 85, 68, 69, 83, 32, 43, 61, 39, 32, 46, 46, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 105, 110, - 99, 108, 117, 100, 101, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 102, 111, 114, 99, 101, 73, -110, 99, 108, 117, 100, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, 117, -100, 101, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 40, 99, -102, 103, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 70, 79, 82, 67, 69, 95, 73, 78, 67, 76, 85, 68, 69, 32, 43, 61, 39, 32, 46, - 46, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 105, 110, 99, 108, 117, 100, 101, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 99, 112, 112, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, - 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 116, 111, 111, 108, 115, -101, 116, 46, 103, 101, 116, 99, 112, 112, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 65, 76, - 76, 95, 67, 80, 80, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 67, 80, 80, 70, 76, 65, 71, 83, 41, 39, 32, 46, 46, 32, 102, 108, - 97, 103, 115, 32, 46, 46, 32, 39, 32, 36, 40, 68, 69, 70, 73, 78, 69, 83, 41, 32, 36, 40, 73, 78, 67, 76, 85, 68, 69, 83, 41, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 99, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, -111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, -116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 40, 99, -102, 103, 41, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, - 39, 65, 76, 76, 95, 67, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 67, 70, 76, 65, 71, 83, 41, 32, 36, 40, 65, 76, 76, 95, 67, - 80, 80, 70, 76, 65, 71, 83, 41, 39, 32, 46, 46, 32, 102, 108, 97, 103, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 99, 112, 112, 46, 99, 120, 120, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, -108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, - 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, 32, 99, 102, 103, 46, 98, -117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 65, 76, 76, 95, 67, 88, 88, 70, 76, - 65, 71, 83, 32, 43, 61, 32, 36, 40, 67, 88, 88, 70, 76, 65, 71, 83, 41, 32, 36, 40, 65, 76, 76, 95, 67, 80, 80, 70, 76, 65, 71, - 83, 41, 39, 32, 46, 46, 32, 102, 108, 97, 103, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 114, -101, 115, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 102, -108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 100, 101, 102, -105, 110, 101, 115, 40, 99, 102, 103, 46, 114, 101, 115, 100, 101, 102, 105, 110, 101, 115, 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, -116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 114, 101, 115, 105, 110, 99, 108, 117, 100, 101, -100, 105, 114, 115, 41, 44, 32, 99, 102, 103, 46, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, - 65, 76, 76, 95, 82, 69, 83, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 82, 69, 83, 70, 76, 65, 71, 83, 41, 32, 36, 40, 68, 69, - 70, 73, 78, 69, 83, 41, 32, 36, 40, 73, 78, 67, 76, 85, 68, 69, 83, 41, 39, 32, 46, 46, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, -115, 116, 40, 114, 101, 115, 102, 108, 97, 103, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 108, -105, 98, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, -116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 76, - 73, 66, 83, 32, 43, 61, 39, 32, 46, 46, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 102, 108, 97, 103, 115, 44, 32, 116, 114, -117, 101, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 108, 100, 68, 101, 112, 115, 40, 99, 102, 103, - 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, -101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, -116, 104, 34, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 76, 68, 68, 69, 80, 83, 32, 43, 61, 39, 32, 46, 46, 32, 103, 109, 97, 107, -101, 50, 46, 108, 105, 115, 116, 40, 112, 46, 101, 115, 99, 40, 100, 101, 112, 115, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 112, 112, 46, 108, 100, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, - 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, -116, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 44, 32, 116, 111, 111, 108, 115, 101, -116, 46, 103, 101, 116, 114, 117, 110, 112, 97, 116, 104, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 114, 117, 110, 112, 97, 116, -104, 100, 105, 114, 115, 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, - 32, 99, 102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 65, 76, 76, 95, 76, - 68, 70, 76, 65, 71, 83, 32, 43, 61, 32, 36, 40, 76, 68, 70, 76, 65, 71, 83, 41, 39, 32, 46, 46, 32, 103, 109, 97, 107, 101, 50, 46, -108, 105, 115, 116, 40, 102, 108, 97, 103, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 108, 105, -110, 107, 67, 109, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, - 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, -116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 112, 46, 85, 78, 73, 86, 69, 82, 83, 65, 76, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, -116, 108, 110, 40, 39, 76, 73, 78, 75, 67, 77, 68, 32, 61, 32, 108, 105, 98, 116, 111, 111, 108, 32, 45, 111, 32, 34, 36, 64, 34, 32, 36, - 40, 79, 66, 74, 69, 67, 84, 83, 41, 39, 41, 10, 101, 108, 115, 101, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 76, 73, 78, 75, 67, 77, - 68, 32, 61, 32, 36, 40, 65, 82, 41, 32, 45, 114, 99, 115, 32, 34, 36, 64, 34, 32, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 39, 41, - 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, - 89, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 76, 73, 78, 75, 67, 77, 68, 32, 61, 39, 41, 10, 101, 108, 115, 101, - 10, 108, 111, 99, 97, 108, 32, 99, 99, 32, 61, 32, 105, 105, 102, 40, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, - 99, 102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 44, 32, 34, 67, 67, 34, 44, 32, 34, 67, 88, 88, 34, 41, 10, 112, 46, 111, 117, -116, 108, 110, 40, 39, 76, 73, 78, 75, 67, 77, 68, 32, 61, 32, 36, 40, 39, 32, 46, 46, 32, 99, 99, 32, 46, 46, 32, 39, 41, 32, 45, -111, 32, 34, 36, 64, 34, 32, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 32, 36, 40, 82, 69, 83, 79, 85, 82, 67, 69, 83, 41, 32, 36, - 40, 65, 76, 76, 95, 76, 68, 70, 76, 65, 71, 83, 41, 32, 36, 40, 76, 73, 66, 83, 41, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 98, 105, 110, 100, 105, 114, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, -116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, -105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 41, 10, 105, 102, - 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 69, 88, 69, 67, 85, 84, 65, - 66, 76, 69, 95, 80, 65, 84, 72, 83, 32, 61, 32, 34, 39, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, -105, 114, 115, 44, 32, 34, 58, 34, 41, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 112, 112, 46, 101, 120, 101, 112, 97, 116, 104, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, - 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, -115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, 69, 88, 69, 95, 80, 65, 84, 72, 83, 32, 61, 32, -101, 120, 112, 111, 114, 116, 32, 80, 65, 84, 72, 61, 36, 40, 69, 88, 69, 67, 85, 84, 65, 66, 76, 69, 95, 80, 65, 84, 72, 83, 41, 58, - 36, 36, 80, 65, 84, 72, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 111, -117, 116, 112, 117, 116, 80, 101, 114, 70, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 83, 101, 99, 116, 105, 111, 110, - 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 80, 101, 114, 32, 70, 105, 108, 101, 32, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, - 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, - 40, 112, 114, 106, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 112, 114, 106, 46, 95, 46, 102, 105, -108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, - 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, - 10, 105, 102, 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, 99, 112, 112, 46, 112, 101, 114, 70, 105, 108, 101, 70, 108, 97, 103, 115, 40, 99, -102, 103, 44, 32, 102, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 109, 97, 107, 101, 86, 97, 114, 78, 97, 109, 101, 40, 112, 114, 106, 44, 32, -118, 97, 108, 117, 101, 44, 32, 115, 97, 108, 116, 86, 97, 108, 117, 101, 41, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 112, -114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 111, 114, 32, 123, 125, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 118, 97, 114, 108, 105, -115, 116, 32, 61, 32, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 118, 97, 114, 108, 105, 115, 116, 32, 111, 114, 32, 123, 125, 10, 112, 114, -106, 46, 95, 103, 109, 97, 107, 101, 46, 118, 97, 114, 108, 105, 115, 116, 108, 101, 110, 103, 116, 104, 32, 61, 32, 112, 114, 106, 46, 95, 103, 109, - 97, 107, 101, 46, 118, 97, 114, 108, 105, 115, 116, 108, 101, 110, 103, 116, 104, 32, 111, 114, 32, 48, 10, 108, 111, 99, 97, 108, 32, 99, 97, 99, -104, 101, 32, 61, 32, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 118, 97, 114, 108, 105, 115, 116, 10, 108, 111, 99, 97, 108, 32, 108, 101, -110, 103, 116, 104, 32, 61, 32, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 118, 97, 114, 108, 105, 115, 116, 108, 101, 110, 103, 116, 104, 10, -108, 111, 99, 97, 108, 32, 107, 101, 121, 32, 61, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 115, 97, 108, 116, 86, 97, 108, 117, 101, 10, 105, -102, 32, 40, 99, 97, 99, 104, 101, 91, 107, 101, 121, 93, 32, 126, 61, 32, 110, 105, 108, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 99, 97, 99, 104, 101, 91, 107, 101, 121, 93, 44, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 97, -114, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 80, 69, 82, 70, 73, 76, 69, 95, 70, 76, 65, 71, 83, - 95, 37, 100, 34, 44, 32, 108, 101, 110, 103, 116, 104, 41, 10, 99, 97, 99, 104, 101, 91, 107, 101, 121, 93, 32, 61, 32, 118, 97, 114, 10, 112, -114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 118, 97, 114, 108, 105, 115, 116, 108, 101, 110, 103, 116, 104, 32, 61, 32, 108, 101, 110, 103, 116, 104, - 32, 43, 32, 49, 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 114, 44, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 99, 112, 112, 46, 112, 101, 114, 70, 105, 108, 101, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 102, 99, 102, 103, 41, 10, 108, -111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 84, 111, 111, 108, 83, 101, 116, - 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 67, 70, 105, 108, 101, 32, 61, 32, 112, 97, 116, 104, 46, 105, 115, 99, 102, 105, -108, 101, 40, 102, 99, 102, 103, 46, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 103, 101, 116, 102, 108, 97, 103, 115, 32, 61, 32, 105, -105, 102, 40, 105, 115, 67, 70, 105, 108, 101, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 102, 108, 97, 103, 115, 44, 32, 116, -111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, - 61, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 103, 101, 116, 102, 108, 97, 103, -115, 40, 102, 99, 102, 103, 41, 44, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 41, 10, 105, 102, 32, -102, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 32, 111, 114, 32, 102, 99, 102, 103, 46, 117, 110, 100, 101, 102, 105, 110, 101, 115, 32, 116, -104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, -115, 101, 116, 46, 103, 101, 116, 100, 101, 102, 105, 110, 101, 115, 40, 102, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 44, 32, 99, 102, 103, - 41, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 117, 110, 100, 101, 102, 105, 110, 101, 115, 40, 102, 99, 102, 103, 46, 117, 110, 100, -101, 102, 105, 110, 101, 115, 41, 41, 10, 105, 102, 32, 35, 100, 101, 102, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, - 32, 61, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 100, 101, 102, 115, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 105, 102, 32, 102, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 32, 111, 114, 32, 102, 99, 102, -103, 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, -117, 100, 101, 115, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 40, 99, 102, -103, 44, 32, 102, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 44, 32, 102, 99, 102, 103, 46, 115, 121, 115, 105, 110, 99, -108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 105, 110, 99, 108, 117, 100, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 105, 110, - 99, 108, 117, 100, 101, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 101, 119, 80, 101, 114, 70, 105, 108, 101, 70, 108, 97, 103, 32, 61, 32, 102, 97, 108, 115, 101, 10, -102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 86, 97, 114, 105, 97, 98, 108, 101, 44, 32, 110, 101, 119, 80, 101, 114, 70, 105, 108, 101, 70, 108, - 97, 103, 32, 61, 32, 99, 112, 112, 46, 109, 97, 107, 101, 86, 97, 114, 78, 97, 109, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 118, 97, 108, 117, 101, 44, 32, 105, 105, 102, 40, 105, 115, 67, 70, 105, 108, 101, 44, 32, 39, 95, 67, 39, 44, 32, 39, 95, 67, 80, - 80, 39, 41, 41, 10, 105, 102, 32, 110, 101, 119, 80, 101, 114, 70, 105, 108, 101, 70, 108, 97, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 105, -115, 67, 70, 105, 108, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 37, 115, 32, 61, 32, 36, 40, 65, 76, 76, 95, 67, 70, 76, 65, 71, - 83, 41, 37, 115, 39, 44, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 86, 97, 114, 105, 97, 98, 108, 101, 44, 32, 118, 97, 108, 117, 101, - 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 37, 115, 32, 61, 32, 36, 40, 65, 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 41, 37, -115, 39, 44, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 86, 97, 114, 105, 97, 98, 108, 101, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 102, 105, 108, 101, - 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, 105, -108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 102, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 108, 111, - 99, 97, 108, 32, 102, 108, 97, 103, 115, 32, 61, 32, 123, 125, 10, 105, 102, 32, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 32, - 97, 110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 97, 110, 100, 32, 40, 110, 111, 116, - 32, 102, 99, 102, 103, 32, 111, 114, 32, 110, 111, 116, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 41, 32, 116, -104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 45, 105, 110, 99, 108, 117, 100, -101, 32, 36, 40, 80, 67, 72, 95, 80, 76, 65, 67, 69, 72, 79, 76, 68, 69, 82, 41, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 102, 99, -102, 103, 32, 97, 110, 100, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 86, 97, 114, 105, 97, 98, 108, 101, 32, 116, 104, 101, 110, 10, 116, - 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, - 40, 34, 36, 40, 37, 115, 41, 34, 44, 32, 102, 99, 102, 103, 46, 102, 108, 97, 103, 115, 86, 97, 114, 105, 97, 98, 108, 101, 41, 41, 10, 101, -108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 69, 120, 116, 32, 61, 32, 99, 112, 112, 46, 100, 101, 116, 101, 114, 109, 105, 110, -101, 70, 105, 108, 101, 116, 121, 112, 101, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 99, -102, 105, 108, 101, 40, 102, 105, 108, 101, 69, 120, 116, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -102, 108, 97, 103, 115, 44, 32, 34, 36, 40, 65, 76, 76, 95, 67, 70, 76, 65, 71, 83, 41, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, - 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, 40, 102, 105, 108, 101, 69, 120, 116, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 36, 40, 65, 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 41, - 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 102, -108, 97, 103, 115, 44, 32, 39, 32, 39, 41, 10, 101, 110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, -115, 101, 116, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, -116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, - 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, 44, 32, 102, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 91, 107, 105, 110, 100, 93, 41, 32, -100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 115, 101, 116, - 40, 99, 102, 103, 44, 32, 107, 105, 110, 100, 44, 32, 102, 41, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 111, 117, 116, 112, 117, -116, 70, 105, 108, 101, 115, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 70, 105, 108, 101, 32, 115, 101, -116, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 95, 103, 109, 97, -107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 95, 120, 40, 39, 37, 115, 32, 58, 61, 39, 44, 32, 107, 105, 110, 100, 41, 10, 101, -110, 100, 10, 95, 120, 40, 39, 39, 41, 10, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, -114, 106, 44, 32, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 115, 101, 116, 115, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 115, 101, 116, 40, 99, 102, 103, 44, 32, 107, -105, 110, 100, 44, 32, 102, 105, 108, 101, 41, 10, 95, 120, 40, 39, 37, 115, 32, 43, 61, 32, 37, 115, 39, 44, 32, 107, 105, 110, 100, 44, 32, -102, 105, 108, 101, 41, 10, 101, 110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 99, 112, 112, 46, 97, 108, 108, 82, 117, 108, -101, 115, 44, 10, 99, 112, 112, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 116, 97, 114, 103, -101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, - 99, 112, 112, 46, 99, 108, 101, 97, 110, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 66, 117, 105, 108, 100, 82, -117, 108, 101, 115, 44, 10, 99, 112, 112, 46, 99, 117, 115, 116, 111, 109, 68, 101, 112, 115, 44, 10, 99, 112, 112, 46, 112, 99, 104, 82, 117, 108, -101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 82, 117, 108, -101, 115, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 82, 117, 108, 101, 115, 39, 41, 10, 95, 112, 40, - 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 103, 109, 97, 107, 101, 50, - 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 114, 117, 108, 101, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 97, 108, 108, 82, 117, 108, 101, -115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, - 32, 112, 46, 77, 65, 67, 79, 83, 88, 32, 97, 110, 100, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, - 79, 87, 69, 68, 65, 80, 80, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 97, 108, 108, 58, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 32, - 36, 40, 100, 105, 114, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 41, 80, 107, 103, 73, 110, 102, 111, 32, 36, 40, 100, 105, 114, - 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 41, 73, 110, 102, 111, 46, 112, 108, 105, 115, 116, 39, 41, 10, 95, 112, 40, 39, 92, -116, 64, 58, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 95, 112, 40, 39, 36, 40, 100, 105, 114, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, - 73, 82, 41, 41, 80, 107, 103, 73, 110, 102, 111, 58, 39, 41, 10, 95, 112, 40, 39, 36, 40, 100, 105, 114, 32, 36, 40, 84, 65, 82, 71, 69, - 84, 68, 73, 82, 41, 41, 73, 110, 102, 111, 46, 112, 108, 105, 115, 116, 58, 39, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 97, 108, 108, - 58, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 58, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, - 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, - 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 115, 32, 61, 32, 39, - 39, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, -107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 105, 102, 32, 107, 105, 110, 100, 32, 126, 61, 32, 39, 79, 66, 74, 69, 67, 84, 83, - 39, 32, 97, 110, 100, 32, 107, 105, 110, 100, 32, 126, 61, 32, 39, 82, 69, 83, 79, 85, 82, 67, 69, 83, 39, 32, 116, 104, 101, 110, 10, 116, - 97, 114, 103, 101, 116, 115, 32, 61, 32, 116, 97, 114, 103, 101, 116, 115, 32, 46, 46, 32, 39, 36, 40, 39, 32, 46, 46, 32, 107, 105, 110, 100, - 32, 46, 46, 32, 39, 41, 32, 39, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, 114, 103, 101, 116, 115, 32, 61, 32, 116, 97, 114, 103, 101, -116, 115, 32, 46, 46, 32, 39, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 32, 36, 40, 76, 68, 68, 69, 80, 83, 41, 39, 10, 105, 102, 32, - 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 91, 39, 82, 69, 83, 79, 85, 82, 67, 69, 83, 39, 93, - 32, 116, 104, 101, 110, 10, 116, 97, 114, 103, 101, 116, 115, 32, 61, 32, 116, 97, 114, 103, 101, 116, 115, 32, 46, 46, 32, 39, 32, 36, 40, 82, - 69, 83, 79, 85, 82, 67, 69, 83, 41, 39, 10, 101, 110, 100, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 32, 37, 115, - 32, 124, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 39, 44, 32, 116, 97, 114, 103, 101, 116, 115, 41, 10, 95, 112, 40, 39, 92, -116, 36, 40, 80, 82, 69, 76, 73, 78, 75, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 76, 105, -110, 107, 105, 110, 103, 32, 37, 115, 39, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, - 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 76, 73, 78, 75, 67, 77, 68, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, - 36, 40, 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 99, 117, 115, 116, 111, 109, 68, 101, 112, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, -101, 116, 41, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, -109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 105, 102, 32, 107, 105, 110, 100, 32, 61, 61, 32, 39, 67, 85, 83, 84, 79, - 77, 39, 32, 111, 114, 32, 107, 105, 110, 100, 32, 61, 61, 32, 39, 83, 79, 85, 82, 67, 69, 83, 39, 32, 116, 104, 101, 110, 10, 95, 112, 40, - 39, 36, 40, 37, 115, 41, 58, 32, 124, 32, 112, 114, 101, 98, 117, 105, 108, 100, 39, 44, 32, 107, 105, 110, 100, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 99, 108, 101, 97, 110, 82, 117, 108, 101, 115, 40, 99, -102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, - 64, 101, 99, 104, 111, 32, 67, 108, 101, 97, 110, 105, 110, 103, 32, 37, 115, 39, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, -110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 112, 111, 115, 105, 120, 44, 36, 40, 83, 72, 69, 76, 76, 84, 89, 80, - 69, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 114, 109, 32, 45, 102, 32, 32, 36, 40, 84, - 65, 82, 71, 69, 84, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 114, 109, 32, 45, 114, 102, 32, - 36, 40, 71, 69, 78, 69, 82, 65, 84, 69, 68, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 114, -109, 32, 45, 114, 102, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, - 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 105, 102, 32, 101, 120, 105, 115, 116, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, - 92, 92, 92, 92, 44, 36, 40, 84, 65, 82, 71, 69, 84, 41, 41, 32, 100, 101, 108, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, - 92, 92, 44, 36, 40, 84, 65, 82, 71, 69, 84, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, -105, 102, 32, 101, 120, 105, 115, 116, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 36, 40, 71, 69, 78, 69, 82, 65, - 84, 69, 68, 41, 41, 32, 114, 109, 100, 105, 114, 32, 47, 115, 32, 47, 113, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, - 44, 36, 40, 71, 69, 78, 69, 82, 65, 84, 69, 68, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, - 32, 105, 102, 32, 101, 120, 105, 115, 116, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 36, 40, 79, 66, 74, 68, 73, - 82, 41, 41, 32, 114, 109, 100, 105, 114, 32, 47, 115, 32, 47, 113, 32, 36, 40, 115, 117, 98, 115, 116, 32, 47, 44, 92, 92, 92, 92, 44, 36, - 40, 79, 66, 74, 68, 73, 82, 41, 41, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 112, 99, 104, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 105, 102, 110, 101, 113, 32, 40, 44, 36, 40, 80, 67, 72, 41, 41, 39, 41, 10, 95, 112, 40, - 39, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, 58, 32, 36, 40, 71, 67, 72, 41, 32, 124, 32, 36, 40, 80, 67, 72, 95, 80, 76, 65, 67, - 69, 72, 79, 76, 68, 69, 82, 41, 39, 41, 10, 95, 112, 40, 39, 36, 40, 71, 67, 72, 41, 58, 32, 36, 40, 80, 67, 72, 41, 32, 124, 32, -112, 114, 101, 98, 117, 105, 108, 100, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 36, 40, 110, 111, 116, 100, 105, 114, 32, - 36, 60, 41, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 32, 61, 32, 105, 105, 102, 40, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, -115, 46, 105, 115, 99, 40, 99, 102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, 44, 32, 34, 36, 40, 67, 67, 41, 32, 45, 120, 32, 99, - 45, 104, 101, 97, 100, 101, 114, 32, 36, 40, 65, 76, 76, 95, 67, 70, 76, 65, 71, 83, 41, 34, 44, 32, 34, 36, 40, 67, 88, 88, 41, 32, - 45, 120, 32, 99, 43, 43, 45, 104, 101, 97, 100, 101, 114, 32, 36, 40, 65, 76, 76, 95, 67, 88, 88, 70, 76, 65, 71, 83, 41, 34, 41, 10, - 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 37, 115, 32, 45, 111, 32, 34, 36, 64, 34, 32, 45, 77, 70, 32, 34, - 36, 40, 64, 58, 37, 37, 46, 103, 99, 104, 61, 37, 37, 46, 100, 41, 34, 32, 45, 99, 32, 34, 36, 60, 34, 39, 44, 32, 99, 109, 100, 41, - 10, 95, 112, 40, 39, 36, 40, 80, 67, 72, 95, 80, 76, 65, 67, 69, 72, 79, 76, 68, 69, 82, 41, 58, 32, 36, 40, 71, 67, 72, 41, 32, -124, 32, 36, 40, 79, 66, 74, 68, 73, 82, 41, 39, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, 112, 111, 115, 105, 120, 44, 36, 40, - 83, 72, 69, 76, 76, 84, 89, 80, 69, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 116, 111, -117, 99, 104, 32, 34, 36, 64, 34, 39, 41, 10, 95, 112, 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, - 76, 69, 78, 84, 41, 32, 101, 99, 104, 111, 32, 36, 110, 117, 108, 108, 32, 62, 62, 32, 34, 36, 64, 34, 39, 41, 10, 95, 112, 40, 39, 101, -110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, 39, 36, 40, 79, 66, 74, 69, 67, 84, 83, 41, - 58, 32, 124, 32, 112, 114, 101, 98, 117, 105, 108, 100, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 101, 110, 100, 10, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 115, 32, 61, 32, 123, 125, 10, 102, 111, -114, 32, 95, 44, 32, 102, 105, 108, 101, 82, 117, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, -107, 101, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 117, -110, 99, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 99, 112, 112, 46, -111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 82, 117, 108, 101, 41, 10, 101, -110, 100, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 82, 117, 108, 101, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, - 10, 95, 112, 40, 39, 35, 32, 70, 105, 108, 101, 32, 82, 117, 108, 101, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, - 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 99, 112, 112, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 82, 117, 108, 101, -115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 82, 117, -108, 101, 115, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, -115, 32, 61, 32, 112, 46, 101, 115, 99, 40, 102, 105, 108, 101, 46, 115, 111, 117, 114, 99, 101, 41, 10, 105, 102, 32, 102, 105, 108, 101, 46, 98, -117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 61, 32, 100, 101, 112, 101, 110, 100, 101, -110, 99, 105, 101, 115, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, -115, 99, 40, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 95, -112, 40, 39, 37, 115, 58, 32, 37, 115, 39, 44, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 91, 49, 93, - 44, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 10, 105, 102, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 109, 101, 115, -115, 97, 103, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 37, 115, 39, 44, 32, 102, 105, 108, 101, 46, - 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 99, -111, 109, 109, 97, 110, 100, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, -110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 102, 105, 108, 101, 46, 98, 117, 105, 108, -100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 109, 100, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 109, 100, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 98, 105, 110, 100, 105, -114, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, - 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 69, 88, 69, 95, 80, 65, 84, 72, 83, 41, 32, 37, 115, 39, 44, 32, 99, -109, 100, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 37, 115, 39, 44, 32, 99, 109, -100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 111, 117, 116, -112, 117, 116, 115, 32, 62, 32, 49, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 37, 115, 58, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 123, 32, 116, 97, 98, 108, 101, 46, 117, 110, 112, 97, 99, 107, 40, 102, 105, 108, 101, 46, 98, 117, 105, 108, -100, 111, 117, 116, 112, 117, 116, 115, 44, 32, 50, 41, 32, 125, 44, 32, 39, 32, 39, 41, 44, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, -111, 117, 116, 112, 117, 116, 115, 91, 49, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 112, 112, - 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 45, 105, 110, 99, 108, 117, 100, 101, 32, - 36, 40, 79, 66, 74, 69, 67, 84, 83, 58, 37, 37, 46, 111, 61, 37, 37, 46, 100, 41, 39, 41, 10, 95, 112, 40, 39, 105, 102, 110, 101, 113, - 32, 40, 44, 36, 40, 80, 67, 72, 41, 41, 39, 41, 10, 95, 112, 40, 39, 32, 32, 45, 105, 110, 99, 108, 117, 100, 101, 32, 36, 40, 80, 67, - 72, 95, 80, 76, 65, 67, 69, 72, 79, 76, 68, 69, 82, 41, 46, 100, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 101, -110, 100, 10, }; - -// gmake2/gmake2_csharp.lua -static const unsigned char builtin_script_85[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 103, 109, 97, 107, 101, 50, 32, 61, - 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 32, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 99, 115, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 103, 109, 97, 107, 101, - 50, 46, 99, 115, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, -116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 32, 32, 32, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, - 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 99, 115, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, -105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 103, 109, 97, -107, 101, 50, 46, 104, 101, 97, 100, 101, 114, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 44, 10, 103, -109, 97, 107, 101, 50, 46, 99, 115, 67, 111, 110, 102, 105, 103, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 80, 114, 111, 106, 101, 99, -116, 67, 111, 110, 102, 105, 103, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 83, 111, 117, 114, 99, 101, 115, 44, 10, 103, 109, 97, 107, 101, - 50, 46, 99, 115, 69, 109, 98, 101, 100, 70, 105, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 67, 111, 112, 121, 70, 105, 108, -101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 82, 101, 115, 112, 111, 110, 115, 101, 70, 105, 108, 101, 44, 10, 103, 109, 97, 107, 101, - 50, 46, 115, 104, 101, 108, 108, 84, 121, 112, 101, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 65, 108, 108, 82, 117, 108, 101, 115, 44, 10, -103, 109, 97, 107, 101, 50, 46, 99, 115, 84, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 116, 97, 114, -103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 82, 101, 115, 112, 111, 110, 115, 101, 82, 117, -108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 111, 98, 106, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, - 99, 115, 67, 108, 101, 97, 110, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 66, 117, 105, 108, 100, 82, 117, 108, -101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 70, 105, 108, 101, 82, 117, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 99, 115, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, -110, 34, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, -101, 116, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, -105, 108, 101, 44, 32, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 99, 115, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 84, 111, 111, 108, 115, 44, 10, 103, 109, 97, 107, 101, 50, - 46, 116, 97, 114, 103, 101, 116, 44, 10, 103, 109, 97, 107, 101, 50, 46, 111, 98, 106, 100, 105, 114, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, -115, 70, 108, 97, 103, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 99, 115, 76, 105, 110, 107, 67, 109, 100, 44, 10, 103, 109, 97, 107, 101, 50, - 46, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 76, 105, 110, 107, 67, 109, 100, -115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, -115, 101, 116, 116, 105, 110, 103, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, - 99, 115, 67, 111, 110, 102, 105, 103, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, -105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 95, 120, - 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, -116, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 115, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, -101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 99, 115, 46, 103, 101, 116, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 102, 110, 97, 109, -101, 41, 10, 105, 102, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 41, 32, 61, - 61, 32, 34, 46, 114, 101, 115, 120, 34, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 99, 102, 103, 46, - 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 46, 46, 32, 34, 46, 34, 10, 108, 111, 99, 97, -108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 102, 110, 97, 109, 101, 41, - 10, 105, 102, 32, 100, 105, 114, 32, 126, 61, 32, 34, 46, 34, 32, 116, 104, 101, 110, 10, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 32, - 46, 46, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 100, 105, 114, 44, 32, 34, 46, 34, 41, 32, 46, 46, 32, 34, - 46, 34, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 34, 36, 40, 79, 66, 74, 68, 73, 82, 41, 47, 34, 32, 46, 46, 32, 112, 46, -101, 115, 99, 40, 110, 97, 109, 101, 32, 46, 46, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 102, 110, 97, -109, 101, 41, 41, 32, 46, 46, 32, 34, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, - 32, 102, 110, 97, 109, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 115, 46, 108, 105, 115, 116, 115, -111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 44, 32, 115, 101, 108, 101, 99, 116, 111, 114, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 112, 46, 116, 114, -101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 115, -101, 108, 101, 99, 116, 111, 114, 40, 110, 111, 100, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, - 92, 116, 37, 115, 32, 92, 92, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 65, 108, 108, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, -116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 97, 108, 108, 58, 32, 112, 114, 101, 98, 117, 105, 108, 100, 32, 36, 40, 69, 77, 66, - 69, 68, 70, 73, 76, 69, 83, 41, 32, 36, 40, 67, 79, 80, 89, 70, 73, 76, 69, 83, 41, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, - 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 67, -108, 101, 97, 110, 82, 117, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 67, 111, 112, 121, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 115, 46, 103, 101, 116, 114, 101, 115, 112, 111, 110, 115, -101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 39, 36, 40, 79, 66, 74, 68, 73, 82, 41, - 47, 39, 32, 46, 46, 32, 112, 114, 106, 46, 102, 105, 108, 101, 110, 97, 109, 101, 32, 46, 46, 32, 39, 46, 114, 115, 112, 39, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 82, 101, 115, 112, 111, 110, 115, 101, 70, 105, 108, 101, 40, -112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 120, 40, 39, 82, 69, 83, 80, 79, 78, 83, 69, 32, 43, 61, 32, 39, 32, - 46, 46, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 46, 103, 101, 116, 114, 101, 115, 112, 111, 110, 115, 101, 102, 105, 108, 101, 110, 97, 109, 101, - 40, 112, 114, 106, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 82, 101, 115, -112, 111, 110, 115, 101, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, -112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, 101, 116, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 32, 61, 32, 103, 109, 97, 107, 101, - 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 10, 108, 111, 99, - 97, 108, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 46, 102, 105, 108, -101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 101, 120, 116, 41, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, - 61, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 46, 103, 101, 116, 114, 101, 115, 112, 111, 110, 115, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, -112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 58, 32, 37, 115, 39, 44, 32, 109, 97, 107, 101, 102, -105, 108, 101, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 71, 101, 110, 101, 114, 97, 116, 105, 110, 103, 32, 114, 101, 115, 112, -111, 110, 115, 101, 32, 102, 105, 108, 101, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 95, 112, 40, 39, 105, 102, 101, 113, 32, 40, -112, 111, 115, 105, 120, 44, 36, 40, 83, 72, 69, 76, 76, 84, 89, 80, 69, 41, 41, 39, 41, 10, 95, 120, 40, 39, 92, 116, 36, 40, 83, 73, - 76, 69, 78, 84, 41, 32, 114, 109, 32, 45, 102, 32, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 39, 41, 10, 95, 112, 40, 39, 101, 108, -115, 101, 39, 41, 10, 95, 120, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 105, 102, 32, 101, 120, 105, 115, 116, 32, 36, 40, - 82, 69, 83, 80, 79, 78, 83, 69, 41, 32, 100, 101, 108, 32, 37, 115, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, -101, 40, 114, 101, 115, 112, 111, 110, 115, 101, 44, 32, 39, 92, 92, 39, 41, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 108, -111, 99, 97, 108, 32, 115, 101, 112, 32, 61, 32, 111, 115, 46, 105, 115, 116, 97, 114, 103, 101, 116, 40, 34, 119, 105, 110, 100, 111, 119, 115, 34, - 41, 32, 97, 110, 100, 32, 34, 92, 92, 34, 32, 111, 114, 32, 34, 47, 34, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 112, 46, 116, 114, 101, 101, 46, 116, -114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, -110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, - 40, 110, 111, 100, 101, 41, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, 34, 32, 116, 104, 101, 110, 10, - 95, 120, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 37, 115, 32, 62, 62, 32, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 39, 44, 32, -112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, 32, 115, 101, 112, - 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 69, 109, 98, 101, 100, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, -101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, - 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 69, 77, 66, 69, 68, 70, 73, 76, 69, 83, 32, 43, 61, 32, 92, 92, - 39, 41, 10, 99, 115, 46, 108, 105, 115, 116, 115, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, -110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, -116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 102, 111, 32, 61, 32, -116, 111, 111, 108, 115, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, 40, 102, 99, 102, 103, 41, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, - 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 69, 109, 98, 101, 100, 100, 101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 34, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 99, 115, 46, 103, 101, 116, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 99, -102, 103, 44, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 70, 105, 108, 101, 82, 117, 108, 101, -115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, -107, 101, 50, 46, 99, 115, 70, 108, 97, 103, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, - 70, 76, 65, 71, 83, 32, 61, 37, 115, 39, 44, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 116, 111, 111, 108, 115, 101, 116, 46, -103, 101, 116, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, -107, 101, 50, 46, 99, 115, 76, 105, 110, 107, 67, 109, 100, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, -108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 46, 101, 115, 99, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, -102, 103, 44, 32, 34, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 41, - 10, 95, 112, 40, 39, 32, 32, 68, 69, 80, 69, 78, 68, 83, 32, 61, 37, 115, 39, 44, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, - 40, 100, 101, 112, 115, 41, 41, 10, 95, 112, 40, 39, 32, 32, 82, 69, 70, 69, 82, 69, 78, 67, 69, 83, 32, 61, 32, 37, 115, 39, 44, 32, -116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 100, 101, 112, 115, 44, 32, 34, 47, 114, 58, 34, 44, 32, 34, 34, 44, 32, 34, - 32, 34, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 80, 114, 111, 106, 101, - 99, 116, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, - 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, -111, 99, 97, 108, 32, 107, 105, 110, 100, 102, 108, 97, 103, 32, 61, 32, 34, 47, 116, 58, 34, 32, 46, 46, 32, 116, 111, 111, 108, 115, 101, 116, - 46, 103, 101, 116, 107, 105, 110, 100, 40, 99, 102, 103, 41, 58, 108, 111, 119, 101, 114, 40, 41, 10, 108, 111, 99, 97, 108, 32, 108, 105, 98, 100, -105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 112, 46, 101, 115, 99, 40, 99, 102, 103, 46, 108, 105, - 98, 100, 105, 114, 115, 41, 44, 32, 34, 47, 108, 105, 98, 58, 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 10, 95, 112, 40, 39, 70, 76, - 65, 71, 83, 32, 43, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 116, 97, 98, 108, 101, 46, 106, -111, 105, 110, 40, 107, 105, 110, 100, 102, 108, 97, 103, 44, 32, 108, 105, 98, 100, 105, 114, 115, 41, 44, 32, 34, 32, 34, 41, 41, 10, 108, 111, - 99, 97, 108, 32, 114, 101, 102, 115, 32, 61, 32, 112, 46, 101, 115, 99, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, - 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 41, 41, 10, 95, 112, 40, - 39, 82, 69, 70, 69, 82, 69, 78, 67, 69, 83, 32, 43, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, -101, 40, 114, 101, 102, 115, 44, 32, 34, 47, 114, 58, 34, 44, 32, 34, 34, 44, 32, 34, 32, 34, 41, 41, 10, 95, 112, 40, 39, 39, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 83, 111, 117, 114, 99, 101, 115, 40, 112, 114, -106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, -103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 83, 79, 85, 82, 67, 69, 83, 32, - 43, 61, 32, 92, 92, 39, 41, 10, 99, 115, 46, 108, 105, 115, 116, 115, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 44, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, -102, 111, 32, 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, 40, 102, 99, 102, 103, 41, 10, 105, 102, 32, 105, -110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 67, 111, 109, 112, 105, 108, 101, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 95, 112, 40, 39, 39, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 115, 84, 97, 114, 103, 101, 116, 82, 117, 108, -101, 115, 40, 112, 114, 106, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 32, - 36, 40, 83, 79, 85, 82, 67, 69, 83, 41, 32, 36, 40, 69, 77, 66, 69, 68, 70, 73, 76, 69, 83, 41, 32, 36, 40, 68, 69, 80, 69, 78, - 68, 83, 41, 32, 36, 40, 82, 69, 83, 80, 79, 78, 83, 69, 41, 32, 124, 32, 36, 40, 84, 65, 82, 71, 69, 84, 68, 73, 82, 41, 39, 41, - 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 82, 69, 76, 73, 78, 75, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, - 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 67, 83, 67, 41, 32, 47, 110, 111, 108, 111, 103, 111, 32, 47, 111, 117, 116, 58, 36, 64, 32, 36, - 40, 70, 76, 65, 71, 83, 41, 32, 36, 40, 82, 69, 70, 69, 82, 69, 78, 67, 69, 83, 41, 32, 64, 36, 40, 82, 69, 83, 80, 79, 78, 83, - 69, 41, 32, 36, 40, 112, 97, 116, 115, 117, 98, 115, 116, 32, 37, 37, 44, 47, 114, 101, 115, 111, 117, 114, 99, 101, 58, 37, 37, 44, 36, 40, - 69, 77, 66, 69, 68, 70, 73, 76, 69, 83, 41, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 79, 83, 84, 66, 85, 73, 76, 68, - 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, -101, 50, 46, 99, 115, 84, 111, 111, 108, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 32, 32, 67, - 83, 67, 32, 61, 32, 37, 115, 39, 44, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, -103, 44, 32, 34, 99, 115, 99, 34, 41, 41, 10, 95, 112, 40, 39, 32, 32, 82, 69, 83, 71, 69, 78, 32, 61, 32, 37, 115, 39, 44, 32, 116, -111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 116, 111, 111, 108, 110, 97, 109, 101, 40, 99, 102, 103, 44, 32, 34, 114, 101, 115, 103, 101, 110, 34, - 41, 41, 10, 101, 110, 100, 10, }; - -// gmake2/gmake2_makefile.lua -static const unsigned char builtin_script_86[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 103, 109, 97, 107, 101, 50, 32, 61, - 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 10, 103, 109, 97, 107, 101, 50, 46, 109, 97, 107, 101, 102, 105, 108, -101, 32, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 32, 32, 61, 32, 103, 109, 97, 107, 101, - 50, 46, 109, 97, 107, 101, 102, 105, 108, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 32, 61, 32, 112, 46, -112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 32, 32, 32, 32, 61, 32, 112, 46, 99, 111, 110, -102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, -102, 105, 103, 10, 109, 97, 107, 101, 102, 105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 97, 107, 101, 102, -105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 103, 109, 97, 107, 101, 50, 46, 104, 101, 97, 100, 101, 114, 44, 10, 103, 109, - 97, 107, 101, 50, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 44, 10, 109, 97, 107, 101, 102, 105, 108, 101, 46, 99, 111, 110, 102, 105, 103, -115, 44, 10, 109, 97, 107, 101, 102, 105, 108, 101, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 10, 125, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 102, 105, 108, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, -101, 111, 108, 40, 34, 92, 110, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 97, 107, 101, 102, 105, 108, 101, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 101, 110, 100, 10, 109, 97, 107, 101, 102, -105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 103, 109, 97, 107, 101, 50, 46, 116, 97, 114, 103, 101, -116, 44, 10, 103, 109, 97, 107, 101, 50, 46, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, - 99, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, -107, 101, 102, 105, 108, 101, 46, 99, 111, 110, 102, 105, 103, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, 116, 32, - 61, 32, 116, 114, 117, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, -110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 112, 46, 116, -111, 111, 108, 115, 91, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 111, 114, 32, 34, 103, 99, 99, 34, 93, 10, 105, 102, 32, 110, 111, -116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 101, 114, 114, 111, 114, 40, 34, 73, 110, 118, 97, 108, 105, 100, 32, 116, 111, -111, 108, 115, 101, 116, 32, 39, 34, 32, 46, 46, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 46, 46, 32, 34, 39, 34, 41, 10, -101, 110, 100, 10, 105, 102, 32, 102, 105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 95, 120, 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, -110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 102, 105, 114, 115, 116, - 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 10, 95, 120, 40, 39, 101, 108, 115, 101, 32, 105, 102, 101, 113, 32, 40, 36, 40, 99, -111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, -112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 97, 107, 101, 102, 105, 108, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 101, 108, 115, 101, - 39, 41, 10, 95, 112, 40, 39, 32, 32, 36, 40, 101, 114, 114, 111, 114, 32, 34, 105, 110, 118, 97, 108, 105, 100, 32, 99, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 32, 36, 40, 99, 111, 110, 102, 105, 103, 41, 34, 41, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, - 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 97, 107, 101, 102, 105, -108, 101, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, - 41, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, - 10, 95, 112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 67, 76, 69, 65, 78, 67, 77, 68, 83, 41, - 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 98, 117, -105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 102, 103, 41, 10, 95, 112, 40, 39, 32, 32, 100, 101, 102, 105, 110, 101, 32, 66, 85, - 73, 76, 68, 67, 77, 68, 83, 39, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, -100, 99, 111, 109, 109, 97, 110, 100, 115, 10, 105, 102, 32, 35, 115, 116, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, -112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, -115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, -103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, - 82, 117, 110, 110, 105, 110, 103, 32, 98, 117, 105, 108, 100, 32, 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 10, 95, 112, 40, 39, 92, 116, 37, -115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, - 32, 34, 92, 110, 92, 116, 34, 41, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 32, 32, 101, 110, 100, 101, 102, 39, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 102, -103, 41, 10, 95, 112, 40, 39, 32, 32, 100, 101, 102, 105, 110, 101, 32, 67, 76, 69, 65, 78, 67, 77, 68, 83, 39, 41, 10, 108, 111, 99, 97, -108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 46, 99, 108, 101, 97, 110, 99, 111, 109, 109, 97, 110, 100, 115, 10, 105, 102, 32, 35, -115, 116, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, - 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, -116, 105, 111, 110, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 82, 117, 110, 110, 105, 110, 103, 32, 99, 108, 101, 97, 110, 32, - 99, 111, 109, 109, 97, 110, 100, 115, 39, 41, 10, 95, 112, 40, 39, 92, 116, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, -111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 110, 92, 116, 34, 41, 41, 10, 101, 110, 100, 10, - 95, 112, 40, 39, 32, 32, 101, 110, 100, 101, 102, 39, 41, 10, 101, 110, 100, 10, }; - -// gmake2/gmake2_utility.lua -static const unsigned char builtin_script_87[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 103, 109, 97, 107, 101, 50, 32, 61, - 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 10, 103, 109, 97, 107, 101, 50, 46, 117, 116, 105, 108, 105, 116, 121, - 32, 32, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 117, 116, 105, 108, 105, 116, 121, 32, 32, 32, 32, 61, 32, 103, 109, 97, 107, 101, - 50, 46, 117, 116, 105, 108, 105, 116, 121, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 32, 32, 32, 61, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 32, 32, 32, 32, 61, 32, 112, 46, 99, 111, 110, 102, -105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 117, 116, 105, 108, 105, 116, 121, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, -106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 103, 109, 97, 107, 101, 50, 46, 104, 101, 97, 100, 101, 114, 44, 10, 103, 109, 97, 107, 101, - 50, 46, 112, 104, 111, 110, 121, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 115, 104, 101, 108, 108, 84, 121, 112, 101, 44, 10, -117, 116, 105, 108, 105, 116, 121, 46, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 99, 114, 101, 97, -116, 101, 70, 105, 108, 101, 84, 97, 98, 108, 101, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 67, 111, 110, 102, 105, -103, 117, 114, 97, 116, 105, 111, 110, 83, 101, 99, 116, 105, 111, 110, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, -105, 108, 101, 115, 83, 101, 99, 116, 105, 111, 110, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 82, 117, 108, 101, 115, - 83, 101, 99, 116, 105, 111, 110, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 82, 117, 108, 101, 83, -101, 99, 116, 105, 111, 110, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 103, -101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 110, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, -114, 114, 97, 121, 40, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 107, 101, 102, 105, 108, 101, 44, 32, -112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, -105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, -112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, -105, 108, 105, 116, 121, 46, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 40, 112, 114, 106, 41, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, - 32, 61, 32, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 32, 111, 114, 32, 123, 125, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 114, -117, 108, 101, 115, 32, 61, 32, 112, 114, 106, 46, 114, 117, 108, 101, 115, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, -115, 101, 116, 115, 32, 61, 32, 123, 32, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, - 99, 114, 101, 97, 116, 101, 70, 105, 108, 101, 84, 97, 98, 108, 101, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, -112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 102, 103, 46, 95, -103, 109, 97, 107, 101, 32, 61, 32, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 32, 111, 114, 32, 123, 125, 10, 99, 102, 103, 46, 95, 103, 109, - 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 32, 61, 32, 123, 125, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, -101, 82, 117, 108, 101, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, -115, 104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 41, 10, 116, 97, 98, 108, 101, 46, 102, -111, 114, 101, 97, 99, 104, 105, 40, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 117, 116, -105, 108, 105, 116, 121, 46, 97, 100, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 44, 32, 112, 114, 106, 41, 10, 101, 110, -100, 41, 10, 102, 111, 114, 32, 95, 44, 32, 102, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, -102, 105, 108, 101, 115, 101, 116, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 102, 41, 10, 101, 110, 100, 10, 99, -102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, 121, 115, 40, 99, 102, 103, - 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 99, 102, 103, - 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 32, 111, 114, - 32, 123, 125, 44, 32, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 101, 110, 100, 10, 112, 114, 106, 46, 95, -103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 117, 110, 105, 113, 117, 101, 40, 112, 114, 106, 46, 95, -103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 112, 114, 106, 46, 95, 103, 109, 97, -107, 101, 46, 107, 105, 110, 100, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 97, -100, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 44, 32, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, -101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, - 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 111, 114, 32, 102, 105, 108, 101, 99, 102, 103, - 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 100, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 116, 104, 101, 110, 10, 114, -101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, -109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, -110, 118, 32, 61, 32, 116, 97, 98, 108, 101, 46, 115, 104, 97, 108, 108, 111, 119, 99, 111, 112, 121, 40, 102, 105, 108, 101, 99, 102, 103, 46, 101, -110, 118, 105, 114, 111, 110, 41, 10, 101, 110, 118, 46, 80, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 123, 10, 91, 34, 102, 105, 108, 101, 46, - 98, 97, 115, 101, 110, 97, 109, 101, 34, 93, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, - 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, - 46, 97, 98, 115, 112, 97, 116, 104, 34, 93, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, - 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, - 46, 114, 101, 108, 112, 97, 116, 104, 34, 93, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, - 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, - 46, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, - 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 112, 97, -116, 104, 34, 93, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, -111, 107, 101, 110, 32, 61, 32, 110, 111, 100, 101, 46, 112, 97, 116, 104, 32, 125, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 100, -111, 119, 67, 111, 110, 116, 101, 120, 116, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 102, 105, 108, -101, 99, 102, 103, 44, 32, 101, 110, 118, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, -112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 10, 105, -102, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 32, 61, 32, 123, 10, 98, 117, 105, 108, 100, 111, 117, -116, 112, 117, 116, 115, 32, 32, 61, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 44, 10, 115, 111, 117, 114, 99, 101, 32, 32, 32, - 32, 32, 32, 32, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 44, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, -101, 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 44, - 10, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, -117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 10, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 32, 32, 61, 32, 112, 46, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, - 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 10, 125, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 44, - 32, 102, 105, 108, 101, 41, 10, 102, 111, 114, 32, 95, 44, 32, 111, 117, 116, 112, 117, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 98, -117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 32, 100, 111, 10, 117, 116, 105, 108, 105, 116, 121, 46, 97, 100, 100, 71, 101, 110, 101, 114, - 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 44, 32, 111, 117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 108, 115, 101, 10, 117, 116, 105, 108, 105, 116, 121, 46, 97, 100, 100, 82, 117, 108, 101, 70, 105, 108, 101, 40, 99, 102, 103, - 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, - 46, 97, 100, 100, 71, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 115, 111, 117, 114, 99, 101, 44, 32, 102, -105, 108, 101, 110, 97, 109, 101, 41, 10, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 71, 101, 110, 101, 114, 97, 116, 101, -100, 70, 105, 108, 101, 115, 32, 61, 32, 116, 114, 117, 101, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 46, 95, 46, 102, 105, 108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 110, 111, 100, 101, 32, 61, 32, 102, 105, 108, -101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 110, 111, 100, 101, 32, 116, 104, 101, 110, 10, 110, 111, -100, 101, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 110, 101, 119, 40, 102, 105, 108, 101, 110, 97, 109, 101, 44, 32, 99, 102, -103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 10, 102, 105, 108, 101, 115, 91, 102, 105, 108, 101, 110, 97, 109, 101, 93, 32, 61, 32, 110, 111, 100, -101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, 108, 101, 115, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, -110, 111, 100, 101, 46, 100, 101, 112, 101, 110, 100, 115, 79, 110, 32, 61, 32, 115, 111, 117, 114, 99, 101, 10, 110, 111, 100, 101, 46, 103, 101, 110, -101, 114, 97, 116, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, -103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 102, 105, 108, 101, 99, 111, -110, 102, 105, 103, 46, 97, 100, 100, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 102, 105, 108, 101, 115, 101, 116, 115, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 95, 103, 109, 97, 107, -101, 46, 102, 105, 108, 101, 115, 101, 116, 115, 10, 108, 111, 99, 97, 108, 32, 107, 105, 110, 100, 32, 61, 32, 34, 67, 85, 83, 84, 79, 77, 34, - 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 101, 116, 32, 61, 32, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, -115, 101, 116, 115, 91, 107, 105, 110, 100, 93, 32, 111, 114, 32, 123, 125, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 102, 105, -108, 101, 115, 101, 116, 44, 32, 102, 105, 108, 101, 110, 97, 109, 101, 41, 10, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, -115, 101, 116, 115, 91, 107, 105, 110, 100, 93, 32, 61, 32, 102, 105, 108, 101, 115, 101, 116, 10, 117, 116, 105, 108, 105, 116, 121, 46, 97, 100, 100, - 82, 117, 108, 101, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 117, 116, 105, 108, 105, 116, 121, 46, 97, 100, 100, 82, 117, 108, 101, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, -108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 115, 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 95, 103, 109, 97, 107, 101, - 46, 114, 117, 108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 114, 117, 108, 101, 115, 91, 112, 97, 116, 104, 46, 103, -101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 110, 111, 100, 101, 46, 97, 98, 115, 112, 97, 116, 104, 41, 58, 108, 111, 119, 101, 114, 40, - 41, 93, 10, 105, 102, 32, 114, 117, 108, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, -102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 101, 110, 118, 105, 114, 111, 110, 32, 61, 32, 116, 97, 98, 108, 101, 46, 115, 104, 97, 108, 108, 111, 119, 99, 111, 112, -121, 40, 102, 105, 108, 101, 99, 102, 103, 46, 101, 110, 118, 105, 114, 111, 110, 41, 10, 105, 102, 32, 114, 117, 108, 101, 46, 112, 114, 111, 112, 101, -114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 112, 97, 114, -101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 114, 117, 108, 101, 44, 32, 101, 110, 118, 105, 114, 111, 110, 44, 32, 99, 102, 103, 41, - 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 114, 117, 108, 101, 44, - 32, 101, 110, 118, 105, 114, 111, 110, 44, 32, 102, 105, 108, 101, 99, 102, 103, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, -100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 114, 117, -108, 101, 44, 32, 101, 110, 118, 105, 114, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, - 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 10, 108, 111, - 99, 97, 108, 32, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, -116, 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, -100, 115, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, 116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, - 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 32, 32, 61, 32, 115, 104, 97, 100, 111, 119, 67, 111, 110, -116, 101, 120, 116, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, -112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 10, 105, 102, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, - 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, -108, 32, 102, 105, 108, 101, 32, 61, 32, 123, 10, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 32, 61, 32, 98, 117, 105, 108, 100, -111, 117, 116, 112, 117, 116, 115, 44, 10, 115, 111, 117, 114, 99, 101, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, -108, 112, 97, 116, 104, 44, 10, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 32, 61, 32, 98, 117, 105, 108, 100, 109, 101, 115, 115, - 97, 103, 101, 44, 10, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, -100, 115, 44, 10, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 32, 32, 61, 32, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 10, -125, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 82, 117, -108, 101, 115, 44, 32, 102, 105, 108, 101, 41, 10, 102, 111, 114, 32, 95, 44, 32, 111, 117, 116, 112, 117, 116, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 32, 100, 111, 10, 117, 116, 105, 108, 105, 116, 121, 46, 97, 100, 100, 71, -101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 44, 32, 111, 117, 116, 112, 117, 116, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, -101, 116, 117, 114, 110, 32, 123, 10, 117, 116, 105, 108, 105, 116, 121, 46, 98, 105, 110, 100, 105, 114, 115, 44, 10, 117, 116, 105, 108, 105, 116, 121, - 46, 101, 120, 101, 112, 97, 116, 104, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 115, 101, 116, 116, 105, 110, 103, 115, 44, 10, 103, 109, 97, 107, -101, 50, 46, 112, 114, 101, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 101, 76, 105, 110, 107, 67, -109, 100, 115, 44, 10, 103, 109, 97, 107, 101, 50, 46, 112, 111, 115, 116, 66, 117, 105, 108, 100, 67, 109, 100, 115, 44, 10, 125, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 67, 111, 110, 102, 105, 103, 117, 114, - 97, 116, 105, 111, 110, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 67, 111, 110, 102, 105, 103, 117, 114, - 97, 116, 105, 111, 110, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, -112, 40, 39, 39, 41, 10, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, -117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 98, 105, 110, 100, 105, 114, 115, 40, 99, 102, 103, - 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, -103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 98, 105, 110, -100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, - 39, 69, 88, 69, 67, 85, 84, 65, 66, 76, 69, 95, 80, 65, 84, 72, 83, 32, 61, 32, 34, 39, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, - 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 58, 34, 41, 32, 46, 46, 32, 39, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 101, 120, 101, 112, 97, 116, 104, 115, 40, 99, 102, 103, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, -101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 98, 105, 110, 100, -105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 39, - 69, 88, 69, 95, 80, 65, 84, 72, 83, 32, 61, 32, 80, 65, 84, 72, 61, 36, 40, 69, 88, 69, 67, 85, 84, 65, 66, 76, 69, 95, 80, 65, - 84, 72, 83, 41, 58, 36, 36, 80, 65, 84, 72, 59, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 115, 101, 116, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, - 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 102, 111, -114, 32, 95, 44, 32, 102, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, -115, 101, 116, 115, 91, 107, 105, 110, 100, 93, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, -108, 116, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 117, 116, 105, 108, 105, -116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 115, 101, 116, 40, 99, 102, 103, 44, 32, 107, 105, 110, 100, 44, 32, 102, 41, 10, 101, -110, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 115, 83, 101, 99, 116, 105, 111, -110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 70, 105, 108, 101, 32, 115, 101, 116, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, -100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, - 10, 95, 120, 40, 39, 37, 115, 32, 58, 61, 39, 44, 32, 107, 105, 110, 100, 41, 10, 101, 110, 100, 10, 95, 120, 40, 39, 39, 41, 10, 103, 109, - 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 117, 116, 105, 108, 105, 116, 121, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 115, 101, 116, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 115, 101, 116, 40, 99, 102, 103, 44, 32, 107, 105, 110, 100, 44, - 32, 102, 105, 108, 101, 41, 10, 95, 120, 40, 39, 37, 115, 32, 43, 61, 32, 37, 115, 39, 44, 32, 107, 105, 110, 100, 44, 32, 102, 105, 108, 101, - 41, 10, 101, 110, 100, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 117, 116, 105, 108, 105, 116, 121, 46, 97, 108, -108, 82, 117, 108, 101, 115, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 44, 10, 103, 109, 97, -107, 101, 50, 46, 116, 97, 114, 103, 101, 116, 68, 105, 114, 82, 117, 108, 101, 115, 44, 10, 117, 116, 105, 108, 105, 116, 121, 46, 99, 108, 101, 97, -110, 82, 117, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 111, -117, 116, 112, 117, 116, 82, 117, 108, 101, 115, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 82, 117, 108, -101, 115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, - 41, 10, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 117, 116, 105, 108, -105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 117, 116, 105, 108, 105, 116, 121, 46, 97, 108, 108, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, -108, 111, 99, 97, 108, 32, 97, 108, 108, 84, 97, 114, 103, 101, 116, 115, 32, 61, 32, 39, 97, 108, 108, 58, 32, 36, 40, 84, 65, 82, 71, 69, - 84, 68, 73, 82, 41, 32, 36, 40, 84, 65, 82, 71, 69, 84, 41, 39, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 97, 108, 108, 84, - 97, 114, 103, 101, 116, 115, 32, 61, 32, 97, 108, 108, 84, 97, 114, 103, 101, 116, 115, 32, 46, 46, 32, 39, 32, 36, 40, 39, 32, 46, 46, 32, -107, 105, 110, 100, 32, 46, 46, 32, 39, 41, 39, 10, 101, 110, 100, 10, 95, 112, 40, 97, 108, 108, 84, 97, 114, 103, 101, 116, 115, 41, 10, 95, -112, 40, 39, 92, 116, 64, 58, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, -105, 108, 105, 116, 121, 46, 116, 97, 114, 103, 101, 116, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, -108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 115, 32, 61, 32, 39, 39, 10, 102, 111, 114, 32, 95, 44, 32, 107, 105, 110, 100, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 107, 105, 110, 100, 115, 41, 32, 100, 111, 10, 116, 97, -114, 103, 101, 116, 115, 32, 61, 32, 116, 97, 114, 103, 101, 116, 115, 32, 46, 46, 32, 39, 36, 40, 39, 32, 46, 46, 32, 107, 105, 110, 100, 32, - 46, 46, 32, 39, 41, 32, 39, 10, 101, 110, 100, 10, 95, 112, 40, 39, 36, 40, 84, 65, 82, 71, 69, 84, 41, 58, 32, 37, 115, 39, 44, 32, -116, 97, 114, 103, 101, 116, 115, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 82, 69, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, - 10, 95, 112, 40, 39, 92, 116, 36, 40, 80, 82, 69, 76, 73, 78, 75, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 92, 116, 36, 40, - 80, 79, 83, 84, 66, 85, 73, 76, 68, 67, 77, 68, 83, 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 99, 108, 101, 97, 110, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, -108, 115, 101, 116, 41, 10, 95, 112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 67, -108, 101, 97, 110, 105, 110, 103, 32, 37, 115, 39, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 41, 10, 95, -112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 117, 116, 105, 108, 105, 116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 82, -117, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 115, - 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 82, 117, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, - 99, 102, 103, 46, 95, 103, 109, 97, 107, 101, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 102, 117, 110, 99, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, -101, 116, 41, 10, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, - 32, 102, 105, 108, 101, 82, 117, 108, 101, 41, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 115, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, - 82, 117, 108, 101, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 95, 112, 40, 39, 35, 32, 70, 105, 108, 101, 32, 82, 117, 108, 101, -115, 39, 41, 10, 95, 112, 40, 39, 35, 32, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 39, 41, 10, 95, 112, 40, 39, 39, 41, - 10, 103, 109, 97, 107, 101, 50, 46, 111, 117, 116, 112, 117, 116, 83, 101, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 117, 116, 105, 108, 105, -116, 121, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 82, 117, 108, 101, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 117, 116, 105, 108, 105, 116, 121, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 82, 117, 108, 101, 115, 40, 99, 102, 103, 44, - 32, 102, 105, 108, 101, 41, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, - 99, 97, 116, 40, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 44, 32, 39, 32, 39, 41, 10, 108, 111, 99, 97, -108, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 61, 32, 112, 46, 101, 115, 99, 40, 102, 105, 108, 101, 46, 115, 111, 117, 114, - 99, 101, 41, 10, 105, 102, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 102, 105, 108, -101, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 100, 101, 112, 101, 110, 100, 101, 110, 99, -105, 101, 115, 32, 61, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, 99, 40, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, - 41, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 37, 115, 58, 32, 37, 115, 39, 44, 32, 111, 117, 116, 112, 117, 116, 115, - 44, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 10, 105, 102, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 109, 101, 115, -115, 97, 103, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 92, 116, 64, 101, 99, 104, 111, 32, 37, 115, 39, 44, 32, 102, 105, 108, 101, 46, - 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 108, 101, 46, 98, 117, 105, 108, 100, 99, -111, 109, 109, 97, 110, 100, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, -110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 102, 105, 108, 101, 46, 98, 117, 105, 108, -100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 102, 111, 114, 32, 95, 44, 32, 99, 109, 100, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 109, 100, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 98, 105, 110, 100, 105, -114, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, - 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 36, 40, 69, 88, 69, 95, 80, 65, 84, 72, 83, 41, 32, 37, 115, 39, 44, 32, 99, -109, 100, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 92, 116, 36, 40, 83, 73, 76, 69, 78, 84, 41, 32, 37, 115, 39, 44, 32, 99, 109, -100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// gmake2/gmake2_workspace.lua -static const unsigned char builtin_script_88[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 103, 109, 97, 107, 101, 50, 32, 61, - 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 103, 109, 97, 107, 101, 50, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 32, 32, 32, - 61, 32, 112, 46, 116, 114, 101, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, - 99, 116, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 103, 101, 110, 101, 114, 97, 116, 101, 95, 119, 111, 114, 107, -115, 112, 97, 99, 101, 40, 119, 107, 115, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 110, 34, 41, 10, 103, 109, 97, 107, 101, 50, 46, 104, 101, - 97, 100, 101, 114, 40, 119, 107, 115, 41, 10, 103, 109, 97, 107, 101, 50, 46, 99, 111, 110, 102, 105, 103, 109, 97, 112, 40, 119, 107, 115, 41, 10, -103, 109, 97, 107, 101, 50, 46, 112, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 103, 109, 97, 107, 101, 50, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 80, 104, 111, 110, 121, 82, 117, 108, 101, 40, 119, 107, 115, 41, 10, 103, 109, 97, 107, 101, 50, 46, 103, 114, 111, 117, 112, - 82, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 103, 109, 97, 107, 101, 50, 46, 112, 114, 111, 106, 101, 99, 116, 114, 117, 108, 101, 115, 40, 119, -107, 115, 41, 10, 103, 109, 97, 107, 101, 50, 46, 99, 108, 101, 97, 110, 114, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 103, 109, 97, 107, 101, - 50, 46, 104, 101, 108, 112, 114, 117, 108, 101, 40, 119, 107, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, -107, 101, 50, 46, 99, 111, 110, 102, 105, 103, 109, 97, 112, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, 116, 32, 61, - 32, 116, 114, 117, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, -104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 102, 105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 95, 112, - 40, 39, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, -116, 110, 97, 109, 101, 41, 10, 102, 105, 114, 115, 116, 32, 61, 32, 102, 97, 108, 115, 101, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 101, 108, -115, 101, 32, 105, 102, 101, 113, 32, 40, 36, 40, 99, 111, 110, 102, 105, 103, 41, 44, 37, 115, 41, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, -114, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, - 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, - 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 44, 32, 99, 102, 103, - 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 105, 102, 32, 112, 114, 106, 99, -102, 103, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 32, 32, 37, 115, 95, 99, 111, 110, 102, 105, 103, 32, 61, 32, 37, 115, 39, 44, 32, 103, -109, 97, 107, 101, 50, 46, 116, 111, 118, 97, 114, 40, 112, 114, 106, 46, 110, 97, 109, 101, 41, 44, 32, 112, 114, 106, 99, 102, 103, 46, 115, 104, -111, 114, 116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, -111, 116, 32, 102, 105, 114, 115, 116, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 101, 108, 115, 101, 39, 41, 10, 95, 112, 40, 39, 32, 32, 36, - 40, 101, 114, 114, 111, 114, 32, 34, 105, 110, 118, 97, 108, 105, 100, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 36, 40, - 99, 111, 110, 102, 105, 103, 41, 34, 41, 39, 41, 10, 95, 112, 40, 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 99, 108, 101, 97, 110, 114, 117, 108, 101, -115, 40, 119, 107, 115, 41, 10, 95, 112, 40, 39, 99, 108, 101, 97, 110, 58, 39, 41, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, - 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, -111, 99, 97, 108, 32, 112, 114, 106, 112, 97, 116, 104, 32, 61, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 103, -109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, - 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, -114, 121, 40, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 119, 107, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, - 44, 32, 112, 114, 106, 112, 97, 116, 104, 41, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 114, 106, 112, 97, 116, 104, 41, 10, 95, 120, 40, 49, 44, 39, 64, 36, 123, 77, 65, 75, 69, 125, - 32, 45, 45, 110, 111, 45, 112, 114, 105, 110, 116, 45, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 45, 67, 32, 37, 115, 32, 45, 102, 32, 37, -115, 32, 99, 108, 101, 97, 110, 39, 44, 32, 112, 114, 106, 100, 105, 114, 44, 32, 112, 114, 106, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, -112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 104, 101, 108, 112, 114, 117, -108, 101, 40, 119, 107, 115, 41, 10, 95, 112, 40, 39, 104, 101, 108, 112, 58, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, - 34, 85, 115, 97, 103, 101, 58, 32, 109, 97, 107, 101, 32, 91, 99, 111, 110, 102, 105, 103, 61, 110, 97, 109, 101, 93, 32, 91, 116, 97, 114, 103, -101, 116, 93, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, - 99, 104, 111, 32, 34, 67, 79, 78, 70, 73, 71, 85, 82, 65, 84, 73, 79, 78, 83, 58, 34, 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, -105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, -111, 10, 95, 120, 40, 49, 44, 32, 39, 64, 101, 99, 104, 111, 32, 34, 32, 32, 37, 115, 34, 39, 44, 32, 99, 102, 103, 46, 115, 104, 111, 114, -116, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 34, 39, 41, 10, 95, 112, 40, 49, - 44, 39, 64, 101, 99, 104, 111, 32, 34, 84, 65, 82, 71, 69, 84, 83, 58, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, - 32, 34, 32, 32, 32, 97, 108, 108, 32, 40, 100, 101, 102, 97, 117, 108, 116, 41, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, -111, 32, 34, 32, 32, 32, 99, 108, 101, 97, 110, 34, 39, 41, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 95, 112, 40, 49, 44, 39, - 64, 101, 99, 104, 111, 32, 34, 32, 32, 32, 37, 115, 34, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 95, 112, - 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 34, 39, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 70, 111, 114, 32, -109, 111, 114, 101, 32, 105, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 44, 32, 115, 101, 101, 32, 104, 116, 116, 112, 115, 58, 47, 47, 103, 105, -116, 104, 117, 98, 46, 99, 111, 109, 47, 112, 114, 101, 109, 97, 107, 101, 47, 112, 114, 101, 109, 97, 107, 101, 45, 99, 111, 114, 101, 47, 119, 105, -107, 105, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 112, 114, 111, 106, 101, 99, -116, 115, 40, 119, 107, 115, 41, 10, 95, 112, 40, 39, 80, 82, 79, 74, 69, 67, 84, 83, 32, 58, 61, 32, 37, 115, 39, 44, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, 99, 40, 116, 97, 98, 108, 101, 46, 101, 120, 116, 114, 97, 99, 116, 40, 119, 107, -115, 46, 112, 114, 111, 106, 101, 99, 116, 115, 44, 32, 34, 110, 97, 109, 101, 34, 41, 41, 44, 32, 34, 32, 34, 41, 41, 10, 95, 112, 40, 39, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, - 80, 104, 111, 110, 121, 82, 117, 108, 101, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, 123, 125, - 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, -101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, -110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 103, -114, 111, 117, 112, 115, 44, 32, 110, 46, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 125, 41, 10, 95, 112, 40, 39, 46, 80, 72, 79, 78, 89, - 58, 32, 97, 108, 108, 32, 99, 108, 101, 97, 110, 32, 104, 101, 108, 112, 32, 36, 40, 80, 82, 79, 74, 69, 67, 84, 83, 41, 32, 39, 32, 46, - 46, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 103, 114, 111, 117, 112, 115, 44, 32, 39, 39, 44, 32, 39, 39, 44, 32, - 39, 32, 39, 41, 41, 10, 95, 112, 40, 39, 39, 41, 10, 95, 112, 40, 39, 97, 108, 108, 58, 32, 36, 40, 80, 82, 79, 74, 69, 67, 84, 83, - 41, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, 103, -114, 111, 117, 112, 82, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, -115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, -108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 110, 46, 112, 97, 116, 104, 32, 46, 46, 32, 34, 58, 34, 10, 108, 111, 99, 97, 108, - 32, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, - 84, 97, 114, 103, 101, 116, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, 99, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 110, - 46, 99, 104, 105, 108, 100, 114, 101, 110, 41, 10, 100, 111, 10, 105, 102, 32, 116, 121, 112, 101, 40, 105, 41, 32, 61, 61, 32, 34, 115, 116, 114, -105, 110, 103, 34, 10, 116, 104, 101, 110, 10, 105, 102, 32, 99, 46, 112, 114, 111, 106, 101, 99, 116, 10, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 44, 32, 99, 46, 110, 97, 109, 101, 41, - 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 103, 114, 111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 44, - 32, 99, 46, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 103, 114, 111, 117, 112, 84, 97, -114, 103, 101, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 103, 114, 111, 117, 112, 84, - 97, 114, 103, 101, 116, 115, 41, 10, 114, 117, 108, 101, 32, 61, 32, 114, 117, 108, 101, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, - 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 103, 114, 111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 44, 32, 34, 32, 34, 41, 10, 101, 110, -100, 10, 105, 102, 32, 35, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 116, 97, - 98, 108, 101, 46, 115, 111, 114, 116, 40, 112, 114, 111, 106, 101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 41, 10, 114, 117, 108, 101, 32, 61, 32, -114, 117, 108, 101, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 114, 111, 106, -101, 99, 116, 84, 97, 114, 103, 101, 116, 115, 44, 32, 34, 32, 34, 41, 10, 101, 110, 100, 10, 95, 112, 40, 114, 117, 108, 101, 41, 10, 95, 112, - 40, 39, 39, 41, 10, 101, 110, 100, 10, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 109, 97, 107, 101, 50, 46, -112, 114, 111, 106, 101, 99, 116, 114, 117, 108, 101, 115, 40, 119, 107, 115, 41, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, -111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 108, 111, 99, - 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, -115, 40, 112, 114, 106, 41, 10, 100, 101, 112, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 101, 120, 116, 114, 97, 99, 116, 40, 100, 101, 112, 115, - 44, 32, 34, 110, 97, 109, 101, 34, 41, 10, 95, 112, 40, 39, 37, 115, 58, 37, 115, 39, 44, 32, 112, 46, 101, 115, 99, 40, 112, 114, 106, 46, -110, 97, 109, 101, 41, 44, 32, 103, 109, 97, 107, 101, 50, 46, 108, 105, 115, 116, 40, 100, 101, 112, 115, 41, 41, 10, 108, 111, 99, 97, 108, 32, - 99, 102, 103, 118, 97, 114, 32, 61, 32, 103, 109, 97, 107, 101, 50, 46, 116, 111, 118, 97, 114, 40, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, - 95, 112, 40, 39, 105, 102, 110, 101, 113, 32, 40, 44, 36, 40, 37, 115, 95, 99, 111, 110, 102, 105, 103, 41, 41, 39, 44, 32, 99, 102, 103, 118, - 97, 114, 41, 10, 95, 112, 40, 49, 44, 39, 64, 101, 99, 104, 111, 32, 34, 61, 61, 61, 61, 32, 66, 117, 105, 108, 100, 105, 110, 103, 32, 37, -115, 32, 40, 36, 40, 37, 115, 95, 99, 111, 110, 102, 105, 103, 41, 41, 32, 61, 61, 61, 61, 34, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, -101, 44, 32, 99, 102, 103, 118, 97, 114, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 112, 97, 116, 104, 32, 61, 32, 112, 46, 102, 105, 108, -101, 110, 97, 109, 101, 40, 112, 114, 106, 44, 32, 103, 109, 97, 107, 101, 50, 46, 103, 101, 116, 109, 97, 107, 101, 102, 105, 108, 101, 110, 97, 109, -101, 40, 112, 114, 106, 44, 32, 116, 114, 117, 101, 41, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 100, 105, 114, 32, 61, 32, 112, 97, 116, -104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, -119, 107, 115, 46, 108, 111, 99, 97, 116, 105, 111, 110, 44, 32, 112, 114, 106, 112, 97, 116, 104, 41, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, -106, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 112, 114, 106, 112, 97, 116, 104, 41, 10, 95, 120, - 40, 49, 44, 39, 64, 36, 123, 77, 65, 75, 69, 125, 32, 45, 45, 110, 111, 45, 112, 114, 105, 110, 116, 45, 100, 105, 114, 101, 99, 116, 111, 114, -121, 32, 45, 67, 32, 37, 115, 32, 45, 102, 32, 37, 115, 32, 99, 111, 110, 102, 105, 103, 61, 36, 40, 37, 115, 95, 99, 111, 110, 102, 105, 103, - 41, 39, 44, 32, 112, 114, 106, 100, 105, 114, 44, 32, 112, 114, 106, 110, 97, 109, 101, 44, 32, 99, 102, 103, 118, 97, 114, 41, 10, 95, 112, 40, - 39, 101, 110, 100, 105, 102, 39, 41, 10, 95, 112, 40, 39, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/_preload.lua -static const unsigned char builtin_script_89[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, -112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, 100, 105, 111, 32, 111, 114, 32, 123, 125, 10, 112, 46, 109, 111, 100, 117, 108, 101, -115, 46, 118, 115, 116, 117, 100, 105, 111, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 112, 46, 95, 86, 69, 82, 83, 73, 79, 78, 10, -112, 46, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, 100, 105, 111, 10, 105, 110, - 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 48, 53, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, - 48, 48, 56, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 48, 46, 108, 117, 97, 34, 41, 10, -105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 50, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, -115, 50, 48, 49, 51, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 53, 46, 108, 117, 97, 34, - 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 55, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, - 34, 118, 115, 50, 48, 49, 57, 46, 108, 117, 97, 34, 41, 10, 112, 46, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, -100, 101, 98, 117, 103, 103, 101, 114, 34, 44, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 76, 111, 99, 97, 108, 34, 41, 10, -112, 46, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 100, 101, 98, 117, 103, 103, 101, 114, 34, 44, 32, 34, 86, 105, -115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 82, 101, 109, 111, 116, 101, 34, 41, 10, 112, 46, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, -119, 101, 100, 40, 34, 100, 101, 98, 117, 103, 103, 101, 114, 34, 44, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 87, 101, 98, - 66, 114, 111, 119, 115, 101, 114, 34, 41, 10, 112, 46, 97, 112, 105, 46, 97, 100, 100, 65, 108, 108, 111, 119, 101, 100, 40, 34, 100, 101, 98, 117, -103, 103, 101, 114, 34, 44, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 87, 101, 98, 83, 101, 114, 118, 105, 99, 101, 34, 41, - 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, -111, 112, 116, 105, 111, 110, 115, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, - 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, - 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, -101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, 100, 101, 102, 105, 110, 101, 115, 34, 44, 10, 115, 99, 111, -112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, 116, 58, 115, 116, 114, 105, -110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, -115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, - 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 108, 105, 115, -116, 58, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 112, 97, 116, -104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, - 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, 116, 121, 112, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, -111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, - 32, 61, 32, 123, 10, 34, 69, 102, 102, 101, 99, 116, 34, 44, 10, 34, 86, 101, 114, 116, 101, 120, 34, 44, 10, 34, 80, 105, 120, 101, 108, 34, - 44, 10, 34, 71, 101, 111, 109, 101, 116, 114, 121, 34, 44, 10, 34, 72, 117, 108, 108, 34, 44, 10, 34, 68, 111, 109, 97, 105, 110, 34, 44, 10, - 34, 67, 111, 109, 112, 117, 116, 101, 34, 44, 10, 34, 84, 101, 120, 116, 117, 114, 101, 34, 44, 10, 34, 82, 111, 111, 116, 83, 105, 103, 110, 97, -116, 117, 114, 101, 34, 44, 10, 125, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, - 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, 109, 111, 100, 101, 108, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, -103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, - 10, 34, 50, 46, 48, 34, 44, 10, 34, 51, 46, 48, 34, 44, 10, 34, 52, 46, 48, 95, 108, 101, 118, 101, 108, 95, 57, 95, 49, 34, 44, 10, - 34, 52, 46, 48, 95, 108, 101, 118, 101, 108, 95, 57, 95, 51, 34, 44, 10, 34, 52, 46, 48, 34, 44, 10, 34, 52, 46, 49, 34, 44, 10, 34, - 53, 46, 48, 34, 44, 10, 34, 53, 46, 49, 34, 44, 10, 34, 114, 111, 111, 116, 115, 105, 103, 95, 49, 46, 48, 34, 44, 10, 34, 114, 111, 111, -116, 115, 105, 103, 95, 49, 46, 49, 34, 44, 10, 34, 54, 46, 48, 34, 44, 10, 34, 54, 46, 49, 34, 44, 10, 34, 54, 46, 50, 34, 44, 10, - 34, 54, 46, 51, 34, 10, 125, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, - 61, 32, 34, 115, 104, 97, 100, 101, 114, 101, 110, 116, 114, 121, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, - 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, -101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, - 97, 100, 101, 114, 118, 97, 114, 105, 97, 98, 108, 101, 110, 97, 109, 101, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, -105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, -114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, -115, 104, 97, 100, 101, 114, 104, 101, 97, 100, 101, 114, 102, 105, 108, 101, 111, 117, 116, 112, 117, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, - 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, -110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, -109, 101, 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 111, 117, 116, 112, 117, 116, 34, 44, 10, 115, - 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, - 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, -114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, 100, 101, 114, 97, 115, 115, 101, 109, 98, 108, 101, 114, 34, 44, 10, 115, 99, -111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, - 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 78, 111, 76, 105, 115, 116, 105, 110, 103, 34, 44, 10, 34, 65, 115, 115, 101, 109, - 98, 108, 121, 67, 111, 100, 101, 34, 44, 10, 34, 65, 115, 115, 101, 109, 98, 108, 121, 67, 111, 100, 101, 65, 110, 100, 72, 101, 120, 34, 44, 10, -125, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 115, 104, 97, -100, 101, 114, 97, 115, 115, 101, 109, 98, 108, 101, 114, 111, 117, 116, 112, 117, 116, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, -110, 102, 105, 103, 34, 44, 10, 107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 116, 111, 107, 101, 110, 115, 32, 61, - 32, 116, 114, 117, 101, 44, 10, 125, 10, 112, 46, 97, 112, 105, 46, 114, 101, 103, 105, 115, 116, 101, 114, 32, 123, 32, 32, 32, 45, 45, 32, 68, - 69, 80, 82, 69, 67, 65, 84, 69, 68, 32, 50, 48, 49, 57, 45, 49, 48, 45, 50, 49, 10, 110, 97, 109, 101, 32, 61, 32, 34, 100, 101, 98, -117, 103, 103, 101, 114, 102, 108, 97, 118, 111, 114, 34, 44, 10, 115, 99, 111, 112, 101, 32, 61, 32, 34, 99, 111, 110, 102, 105, 103, 34, 44, 10, -107, 105, 110, 100, 32, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 44, 10, 97, 108, 108, 111, 119, 101, 100, 32, 61, 32, 123, 10, 34, 76, 111, - 99, 97, 108, 34, 44, 10, 34, 82, 101, 109, 111, 116, 101, 34, 44, 10, 34, 87, 101, 98, 66, 114, 111, 119, 115, 101, 114, 34, 44, 10, 34, 87, -101, 98, 83, 101, 114, 118, 105, 99, 101, 34, 10, 125, 10, 125, 10, 112, 46, 97, 112, 105, 46, 100, 101, 112, 114, 101, 99, 97, 116, 101, 70, 105, -101, 108, 100, 40, 34, 100, 101, 98, 117, 103, 103, 101, 114, 102, 108, 97, 118, 111, 114, 34, 44, 32, 39, 85, 115, 101, 32, 96, 100, 101, 98, 117, -103, 103, 101, 114, 96, 32, 105, 110, 115, 116, 101, 97, 100, 46, 39, 44, 10, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, - 10, 100, 101, 98, 117, 103, 103, 101, 114, 40, 39, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 39, 32, 46, 46, 32, 118, 97, 108, 117, -101, 41, 10, 101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, -117, 114, 110, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 48, 53, 34, 32, 111, 114, 10, 95, 65, 67, 84, 73, - 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 48, 56, 34, 32, 111, 114, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, - 50, 48, 49, 48, 34, 32, 111, 114, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 50, 34, 32, 111, 114, 10, - 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 51, 34, 32, 111, 114, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, - 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 111, 114, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 55, - 34, 32, 111, 114, 10, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 57, 34, 32, 111, 114, 10, 102, 97, 108, 115, -101, 59, 10, 101, 110, 100, 10, }; - -// vstudio/vstudio.lua -static const unsigned char builtin_script_90[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, -100, 105, 111, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, 100, 105, 111, 32, 111, 114, 32, 123, 125, 10, 112, 46, -109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, 100, 105, 111, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 112, 46, 95, 86, 69, - 82, 83, 73, 79, 78, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, -100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 108, 111, - 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, -110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 120, 95, 97, -114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 32, 61, 10, 123, 10, 119, 105, 110, 51, 50, 32, 32, 32, 61, 32, 34, 120, 56, 54, 34, - 44, 10, 120, 56, 54, 32, 32, 32, 32, 32, 61, 32, 34, 120, 56, 54, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 32, 61, 32, 34, 120, 54, - 52, 34, 44, 10, 65, 82, 77, 32, 32, 32, 32, 32, 61, 32, 34, 65, 82, 77, 34, 44, 10, 65, 82, 77, 54, 52, 32, 32, 32, 61, 32, 34, - 65, 82, 77, 54, 52, 34, 44, 10, 125, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 95, 97, 114, 99, 104, 105, 116, 101, - 99, 116, 117, 114, 101, 115, 32, 61, 10, 123, 10, 119, 105, 110, 51, 50, 32, 32, 32, 61, 32, 34, 120, 56, 54, 34, 44, 10, 125, 10, 108, 111, - 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 40, 115, 121, 115, 116, 101, 109, - 44, 32, 97, 114, 99, 104, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, - 62, 61, 32, 34, 118, 115, 50, 48, 49, 48, 34, 32, 116, 104, 101, 110, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 118, 115, 116, 117, 100, 105, -111, 46, 118, 115, 50, 48, 49, 48, 95, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 91, 97, 114, 99, 104, 93, 32, 111, 114, 32, -118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 95, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 91, 115, 121, 115, -116, 101, 109, 93, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 32, 111, 114, 32, 118, 115, 116, 117, 100, 105, -111, 46, 118, 115, 50, 48, 48, 120, 95, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 91, 97, 114, 99, 104, 93, 32, 111, 114, 32, -118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 120, 95, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 91, 115, 121, 115, -116, 101, 109, 93, 10, 101, 110, 100, 10, 118, 115, 116, 117, 100, 105, 111, 46, 95, 99, 117, 108, 116, 117, 114, 101, 115, 32, 61, 32, 123, 10, 91, - 34, 97, 102, 34, 93, 32, 61, 32, 48, 120, 48, 48, 51, 54, 44, 10, 91, 34, 97, 102, 45, 90, 65, 34, 93, 32, 61, 32, 48, 120, 48, 52, - 51, 54, 44, 10, 91, 34, 115, 113, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 67, 44, 10, 91, 34, 115, 113, 45, 65, 76, 34, 93, 32, 61, - 32, 48, 120, 48, 52, 49, 67, 44, 10, 91, 34, 97, 114, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 49, 44, 10, 91, 34, 97, 114, 45, 68, - 90, 34, 93, 32, 61, 32, 48, 120, 49, 52, 48, 49, 44, 10, 91, 34, 97, 114, 45, 66, 72, 34, 93, 32, 61, 32, 48, 120, 51, 67, 48, 49, - 44, 10, 91, 34, 97, 114, 45, 69, 71, 34, 93, 32, 61, 32, 48, 120, 48, 67, 48, 49, 44, 10, 91, 34, 97, 114, 45, 73, 81, 34, 93, 32, - 61, 32, 48, 120, 48, 56, 48, 49, 44, 10, 91, 34, 97, 114, 45, 74, 79, 34, 93, 32, 61, 32, 48, 120, 50, 67, 48, 49, 44, 10, 91, 34, - 97, 114, 45, 75, 87, 34, 93, 32, 61, 32, 48, 120, 51, 52, 48, 49, 44, 10, 91, 34, 97, 114, 45, 76, 66, 34, 93, 32, 61, 32, 48, 120, - 51, 48, 48, 49, 44, 10, 91, 34, 97, 114, 45, 76, 89, 34, 93, 32, 61, 32, 48, 120, 49, 48, 48, 49, 44, 10, 91, 34, 97, 114, 45, 77, - 65, 34, 93, 32, 61, 32, 48, 120, 49, 56, 48, 49, 44, 10, 91, 34, 97, 114, 45, 79, 77, 34, 93, 32, 61, 32, 48, 120, 50, 48, 48, 49, - 44, 10, 91, 34, 97, 114, 45, 81, 65, 34, 93, 32, 61, 32, 48, 120, 52, 48, 48, 49, 44, 10, 91, 34, 97, 114, 45, 83, 65, 34, 93, 32, - 61, 32, 48, 120, 48, 52, 48, 49, 44, 10, 91, 34, 97, 114, 45, 83, 89, 34, 93, 32, 61, 32, 48, 120, 50, 56, 48, 49, 44, 10, 91, 34, - 97, 114, 45, 84, 78, 34, 93, 32, 61, 32, 48, 120, 49, 67, 48, 49, 44, 10, 91, 34, 97, 114, 45, 65, 69, 34, 93, 32, 61, 32, 48, 120, - 51, 56, 48, 49, 44, 10, 91, 34, 97, 114, 45, 89, 69, 34, 93, 32, 61, 32, 48, 120, 50, 52, 48, 49, 44, 10, 91, 34, 104, 121, 34, 93, - 32, 61, 32, 48, 120, 48, 48, 50, 66, 44, 10, 91, 34, 104, 121, 45, 65, 77, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 66, 44, 10, 91, - 34, 97, 122, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 67, 44, 10, 91, 34, 97, 122, 45, 67, 121, 114, 108, 45, 65, 90, 34, 93, 32, 61, - 32, 48, 120, 48, 56, 50, 67, 44, 10, 91, 34, 97, 122, 45, 76, 97, 116, 110, 45, 65, 90, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 67, - 44, 10, 91, 34, 101, 117, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 68, 44, 10, 91, 34, 101, 117, 45, 69, 83, 34, 93, 32, 61, 32, 48, -120, 48, 52, 50, 68, 44, 10, 91, 34, 98, 101, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 51, 44, 10, 91, 34, 98, 101, 45, 66, 89, 34, - 93, 32, 61, 32, 48, 120, 48, 52, 50, 51, 44, 10, 91, 34, 98, 103, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 50, 44, 10, 91, 34, 98, -103, 45, 66, 71, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 50, 44, 10, 91, 34, 99, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 51, - 44, 10, 91, 34, 99, 97, 45, 69, 83, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 51, 44, 10, 91, 34, 122, 104, 45, 72, 75, 34, 93, 32, - 61, 32, 48, 120, 48, 67, 48, 52, 44, 10, 91, 34, 122, 104, 45, 77, 79, 34, 93, 32, 61, 32, 48, 120, 49, 52, 48, 52, 44, 10, 91, 34, -122, 104, 45, 67, 78, 34, 93, 32, 61, 32, 48, 120, 48, 56, 48, 52, 44, 10, 91, 34, 122, 104, 45, 72, 97, 110, 115, 34, 93, 32, 61, 32, - 48, 120, 48, 48, 48, 52, 44, 10, 91, 34, 122, 104, 45, 83, 71, 34, 93, 32, 61, 32, 48, 120, 49, 48, 48, 52, 44, 10, 91, 34, 122, 104, - 45, 84, 87, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 52, 44, 10, 91, 34, 122, 104, 45, 72, 97, 110, 116, 34, 93, 32, 61, 32, 48, 120, - 55, 67, 48, 52, 44, 10, 91, 34, 104, 114, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 65, 44, 10, 91, 34, 104, 114, 45, 72, 82, 34, 93, - 32, 61, 32, 48, 120, 48, 52, 49, 65, 44, 10, 91, 34, 99, 115, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 53, 44, 10, 91, 34, 99, 115, - 45, 67, 90, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 53, 44, 10, 91, 34, 100, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 54, 44, - 10, 91, 34, 100, 97, 45, 68, 75, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 54, 44, 10, 91, 34, 100, 118, 34, 93, 32, 61, 32, 48, 120, - 48, 48, 54, 53, 44, 10, 91, 34, 100, 118, 45, 77, 86, 34, 93, 32, 61, 32, 48, 120, 48, 52, 54, 53, 44, 10, 91, 34, 110, 108, 34, 93, - 32, 61, 32, 48, 120, 48, 48, 49, 51, 44, 10, 91, 34, 110, 108, 45, 66, 69, 34, 93, 32, 61, 32, 48, 120, 48, 56, 49, 51, 44, 10, 91, - 34, 110, 108, 45, 78, 76, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 51, 44, 10, 91, 34, 101, 110, 34, 93, 32, 61, 32, 48, 120, 48, 48, - 48, 57, 44, 10, 91, 34, 101, 110, 45, 65, 85, 34, 93, 32, 61, 32, 48, 120, 48, 67, 48, 57, 44, 10, 91, 34, 101, 110, 45, 66, 90, 34, - 93, 32, 61, 32, 48, 120, 50, 56, 48, 57, 44, 10, 91, 34, 101, 110, 45, 67, 65, 34, 93, 32, 61, 32, 48, 120, 49, 48, 48, 57, 44, 10, - 91, 34, 101, 110, 45, 48, 50, 57, 34, 93, 32, 61, 32, 48, 120, 50, 52, 48, 57, 44, 10, 91, 34, 101, 110, 45, 73, 69, 34, 93, 32, 61, - 32, 48, 120, 49, 56, 48, 57, 44, 10, 91, 34, 101, 110, 45, 74, 77, 34, 93, 32, 61, 32, 48, 120, 50, 48, 48, 57, 44, 10, 91, 34, 101, -110, 45, 78, 90, 34, 93, 32, 61, 32, 48, 120, 49, 52, 48, 57, 44, 10, 91, 34, 101, 110, 45, 80, 72, 34, 93, 32, 61, 32, 48, 120, 51, - 52, 48, 57, 44, 10, 91, 34, 101, 110, 45, 90, 65, 34, 93, 32, 61, 32, 48, 120, 49, 67, 48, 57, 44, 10, 91, 34, 101, 110, 45, 84, 84, - 34, 93, 32, 61, 32, 48, 120, 50, 67, 48, 57, 44, 10, 91, 34, 101, 110, 45, 71, 66, 34, 93, 32, 61, 32, 48, 120, 48, 56, 48, 57, 44, - 10, 91, 34, 101, 110, 45, 85, 83, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 57, 44, 10, 91, 34, 101, 110, 45, 90, 87, 34, 93, 32, 61, - 32, 48, 120, 51, 48, 48, 57, 44, 10, 91, 34, 101, 116, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 53, 44, 10, 91, 34, 101, 116, 45, 69, - 69, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 53, 44, 10, 91, 34, 102, 111, 34, 93, 32, 61, 32, 48, 120, 48, 48, 51, 56, 44, 10, 91, - 34, 102, 111, 45, 70, 79, 34, 93, 32, 61, 32, 48, 120, 48, 52, 51, 56, 44, 10, 91, 34, 102, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, - 50, 57, 44, 10, 91, 34, 102, 97, 45, 73, 82, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 57, 44, 10, 91, 34, 102, 105, 34, 93, 32, 61, - 32, 48, 120, 48, 48, 48, 66, 44, 10, 91, 34, 102, 105, 45, 70, 73, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 66, 44, 10, 91, 34, 102, -114, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 67, 44, 10, 91, 34, 102, 114, 45, 66, 69, 34, 93, 32, 61, 32, 48, 120, 48, 56, 48, 67, - 44, 10, 91, 34, 102, 114, 45, 67, 65, 34, 93, 32, 61, 32, 48, 120, 48, 67, 48, 67, 44, 10, 91, 34, 102, 114, 45, 70, 82, 34, 93, 32, - 61, 32, 48, 120, 48, 52, 48, 67, 44, 10, 91, 34, 102, 114, 45, 76, 85, 34, 93, 32, 61, 32, 48, 120, 49, 52, 48, 67, 44, 10, 91, 34, -102, 114, 45, 77, 67, 34, 93, 32, 61, 32, 48, 120, 49, 56, 48, 67, 44, 10, 91, 34, 102, 114, 45, 67, 72, 34, 93, 32, 61, 32, 48, 120, - 49, 48, 48, 67, 44, 10, 91, 34, 103, 108, 34, 93, 32, 61, 32, 48, 120, 48, 48, 53, 54, 44, 10, 91, 34, 103, 108, 45, 69, 83, 34, 93, - 32, 61, 32, 48, 120, 48, 52, 53, 54, 44, 10, 91, 34, 107, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, 51, 55, 44, 10, 91, 34, 107, 97, - 45, 71, 69, 34, 93, 32, 61, 32, 48, 120, 48, 52, 51, 55, 44, 10, 91, 34, 100, 101, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 55, 44, - 10, 91, 34, 100, 101, 45, 65, 84, 34, 93, 32, 61, 32, 48, 120, 48, 67, 48, 55, 44, 10, 91, 34, 100, 101, 45, 68, 69, 34, 93, 32, 61, - 32, 48, 120, 48, 52, 48, 55, 44, 10, 91, 34, 100, 101, 45, 76, 73, 34, 93, 32, 61, 32, 48, 120, 49, 52, 48, 55, 44, 10, 91, 34, 100, -101, 45, 76, 85, 34, 93, 32, 61, 32, 48, 120, 49, 48, 48, 55, 44, 10, 91, 34, 100, 101, 45, 67, 72, 34, 93, 32, 61, 32, 48, 120, 48, - 56, 48, 55, 44, 10, 91, 34, 101, 108, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 56, 44, 10, 91, 34, 101, 108, 45, 71, 82, 34, 93, 32, - 61, 32, 48, 120, 48, 52, 48, 56, 44, 10, 91, 34, 103, 117, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 55, 44, 10, 91, 34, 103, 117, 45, - 73, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 55, 44, 10, 91, 34, 104, 101, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 68, 44, 10, - 91, 34, 104, 101, 45, 73, 76, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 68, 44, 10, 91, 34, 104, 105, 34, 93, 32, 61, 32, 48, 120, 48, - 48, 51, 57, 44, 10, 91, 34, 104, 105, 45, 73, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 51, 57, 44, 10, 91, 34, 104, 117, 34, 93, 32, - 61, 32, 48, 120, 48, 48, 48, 69, 44, 10, 91, 34, 104, 117, 45, 72, 85, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, 69, 44, 10, 91, 34, -105, 115, 34, 93, 32, 61, 32, 48, 120, 48, 48, 48, 70, 44, 10, 91, 34, 105, 115, 45, 73, 83, 34, 93, 32, 61, 32, 48, 120, 48, 52, 48, - 70, 44, 10, 91, 34, 105, 100, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 49, 44, 10, 91, 34, 105, 100, 45, 73, 68, 34, 93, 32, 61, 32, - 48, 120, 48, 52, 50, 49, 44, 10, 91, 34, 105, 116, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 48, 44, 10, 91, 34, 105, 116, 45, 73, 84, - 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 48, 44, 10, 91, 34, 105, 116, 45, 67, 72, 34, 93, 32, 61, 32, 48, 120, 48, 56, 49, 48, 44, - 10, 91, 34, 106, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 49, 44, 10, 91, 34, 106, 97, 45, 74, 80, 34, 93, 32, 61, 32, 48, 120, - 48, 52, 49, 49, 44, 10, 91, 34, 107, 110, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 66, 44, 10, 91, 34, 107, 110, 45, 73, 78, 34, 93, - 32, 61, 32, 48, 120, 48, 52, 52, 66, 44, 10, 91, 34, 107, 107, 34, 93, 32, 61, 32, 48, 120, 48, 48, 51, 70, 44, 10, 91, 34, 107, 107, - 45, 75, 90, 34, 93, 32, 61, 32, 48, 120, 48, 52, 51, 70, 44, 10, 91, 34, 107, 111, 107, 34, 93, 32, 61, 32, 48, 120, 48, 48, 53, 55, - 44, 10, 91, 34, 107, 111, 107, 45, 73, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 53, 55, 44, 10, 91, 34, 107, 111, 34, 93, 32, 61, 32, - 48, 120, 48, 48, 49, 50, 44, 10, 91, 34, 107, 111, 45, 75, 82, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 50, 44, 10, 91, 34, 107, 121, - 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 48, 44, 10, 91, 34, 107, 121, 45, 75, 71, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 48, 44, - 10, 91, 34, 108, 118, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 54, 44, 10, 91, 34, 108, 118, 45, 76, 86, 34, 93, 32, 61, 32, 48, 120, - 48, 52, 50, 54, 44, 10, 91, 34, 108, 116, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 55, 44, 10, 91, 34, 108, 116, 45, 76, 84, 34, 93, - 32, 61, 32, 48, 120, 48, 52, 50, 55, 44, 10, 91, 34, 109, 107, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 70, 44, 10, 91, 34, 109, 107, - 45, 77, 75, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 70, 44, 10, 91, 34, 109, 115, 34, 93, 32, 61, 32, 48, 120, 48, 48, 51, 69, 44, - 10, 91, 34, 109, 115, 45, 66, 78, 34, 93, 32, 61, 32, 48, 120, 48, 56, 51, 69, 44, 10, 91, 34, 109, 115, 45, 77, 89, 34, 93, 32, 61, - 32, 48, 120, 48, 52, 51, 69, 44, 10, 91, 34, 109, 114, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 69, 44, 10, 91, 34, 109, 114, 45, 73, - 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 69, 44, 10, 91, 34, 109, 110, 34, 93, 32, 61, 32, 48, 120, 48, 48, 53, 48, 44, 10, 91, - 34, 109, 110, 45, 77, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 53, 48, 44, 10, 91, 34, 110, 111, 34, 93, 32, 61, 32, 48, 120, 48, 48, - 49, 52, 44, 10, 91, 34, 110, 98, 45, 78, 79, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 52, 44, 10, 91, 34, 110, 110, 45, 78, 79, 34, - 93, 32, 61, 32, 48, 120, 48, 56, 49, 52, 44, 10, 91, 34, 112, 108, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 53, 44, 10, 91, 34, 112, -108, 45, 80, 76, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 53, 44, 10, 91, 34, 112, 116, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 54, - 44, 10, 91, 34, 112, 116, 45, 66, 82, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 54, 44, 10, 91, 34, 112, 116, 45, 80, 84, 34, 93, 32, - 61, 32, 48, 120, 48, 56, 49, 54, 44, 10, 91, 34, 112, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 54, 44, 10, 91, 34, 112, 97, 45, - 73, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 54, 44, 10, 91, 34, 114, 111, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 56, 44, 10, - 91, 34, 114, 111, 45, 82, 79, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 56, 44, 10, 91, 34, 114, 117, 34, 93, 32, 61, 32, 48, 120, 48, - 48, 49, 57, 44, 10, 91, 34, 114, 117, 45, 82, 85, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 57, 44, 10, 91, 34, 115, 97, 34, 93, 32, - 61, 32, 48, 120, 48, 48, 52, 70, 44, 10, 91, 34, 115, 97, 45, 73, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 70, 44, 10, 91, 34, -115, 114, 45, 67, 121, 114, 108, 45, 67, 83, 34, 93, 32, 61, 32, 48, 120, 48, 67, 49, 65, 44, 10, 91, 34, 115, 114, 45, 76, 97, 116, 110, - 45, 67, 83, 34, 93, 32, 61, 32, 48, 120, 48, 56, 49, 65, 44, 10, 91, 34, 115, 107, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 66, 44, - 10, 91, 34, 115, 107, 45, 83, 75, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 66, 44, 10, 91, 34, 115, 108, 34, 93, 32, 61, 32, 48, 120, - 48, 48, 50, 52, 44, 10, 91, 34, 115, 108, 45, 83, 73, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 52, 44, 10, 91, 34, 101, 115, 34, 93, - 32, 61, 32, 48, 120, 48, 48, 48, 65, 44, 10, 91, 34, 101, 115, 45, 65, 82, 34, 93, 32, 61, 32, 48, 120, 50, 67, 48, 65, 44, 10, 91, - 34, 101, 115, 45, 66, 79, 34, 93, 32, 61, 32, 48, 120, 52, 48, 48, 65, 44, 10, 91, 34, 101, 115, 45, 67, 76, 34, 93, 32, 61, 32, 48, -120, 51, 52, 48, 65, 44, 10, 91, 34, 101, 115, 45, 67, 79, 34, 93, 32, 61, 32, 48, 120, 50, 52, 48, 65, 44, 10, 91, 34, 101, 115, 45, - 67, 82, 34, 93, 32, 61, 32, 48, 120, 49, 52, 48, 65, 44, 10, 91, 34, 101, 115, 45, 68, 79, 34, 93, 32, 61, 32, 48, 120, 49, 67, 48, - 65, 44, 10, 91, 34, 101, 115, 45, 69, 67, 34, 93, 32, 61, 32, 48, 120, 51, 48, 48, 65, 44, 10, 91, 34, 101, 115, 45, 83, 86, 34, 93, - 32, 61, 32, 48, 120, 52, 52, 48, 65, 44, 10, 91, 34, 101, 115, 45, 71, 84, 34, 93, 32, 61, 32, 48, 120, 49, 48, 48, 65, 44, 10, 91, - 34, 101, 115, 45, 72, 78, 34, 93, 32, 61, 32, 48, 120, 52, 56, 48, 65, 44, 10, 91, 34, 101, 115, 45, 77, 88, 34, 93, 32, 61, 32, 48, -120, 48, 56, 48, 65, 44, 10, 91, 34, 101, 115, 45, 78, 73, 34, 93, 32, 61, 32, 48, 120, 52, 67, 48, 65, 44, 10, 91, 34, 101, 115, 45, - 80, 65, 34, 93, 32, 61, 32, 48, 120, 49, 56, 48, 65, 44, 10, 91, 34, 101, 115, 45, 80, 89, 34, 93, 32, 61, 32, 48, 120, 51, 67, 48, - 65, 44, 10, 91, 34, 101, 115, 45, 80, 69, 34, 93, 32, 61, 32, 48, 120, 50, 56, 48, 65, 44, 10, 91, 34, 101, 115, 45, 80, 82, 34, 93, - 32, 61, 32, 48, 120, 53, 48, 48, 65, 44, 10, 91, 34, 101, 115, 45, 69, 83, 34, 93, 32, 61, 32, 48, 120, 48, 67, 48, 65, 44, 10, 91, - 34, 101, 115, 45, 69, 83, 95, 116, 114, 97, 100, 110, 108, 34, 93, 61, 32, 48, 120, 48, 52, 48, 65, 44, 10, 91, 34, 101, 115, 45, 85, 89, - 34, 93, 32, 61, 32, 48, 120, 51, 56, 48, 65, 44, 10, 91, 34, 101, 115, 45, 86, 69, 34, 93, 32, 61, 32, 48, 120, 50, 48, 48, 65, 44, - 10, 91, 34, 115, 119, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 49, 44, 10, 91, 34, 115, 119, 45, 75, 69, 34, 93, 32, 61, 32, 48, 120, - 48, 52, 52, 49, 44, 10, 91, 34, 115, 118, 34, 93, 32, 61, 32, 48, 120, 48, 48, 49, 68, 44, 10, 91, 34, 115, 118, 45, 70, 73, 34, 93, - 32, 61, 32, 48, 120, 48, 56, 49, 68, 44, 10, 91, 34, 115, 118, 45, 83, 69, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 68, 44, 10, 91, - 34, 115, 121, 114, 34, 93, 32, 61, 32, 48, 120, 48, 48, 53, 65, 44, 10, 91, 34, 115, 121, 114, 45, 83, 89, 34, 93, 32, 61, 32, 48, 120, - 48, 52, 53, 65, 44, 10, 91, 34, 116, 97, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 57, 44, 10, 91, 34, 116, 97, 45, 73, 78, 34, 93, - 32, 61, 32, 48, 120, 48, 52, 52, 57, 44, 10, 91, 34, 116, 116, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 52, 44, 10, 91, 34, 116, 116, - 45, 82, 85, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 52, 44, 10, 91, 34, 116, 101, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 65, 44, - 10, 91, 34, 116, 101, 45, 73, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 52, 65, 44, 10, 91, 34, 116, 104, 34, 93, 32, 61, 32, 48, 120, - 48, 48, 49, 69, 44, 10, 91, 34, 116, 104, 45, 84, 72, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 69, 44, 10, 91, 34, 116, 114, 34, 93, - 32, 61, 32, 48, 120, 48, 48, 49, 70, 44, 10, 91, 34, 116, 114, 45, 84, 82, 34, 93, 32, 61, 32, 48, 120, 48, 52, 49, 70, 44, 10, 91, - 34, 117, 107, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 50, 44, 10, 91, 34, 117, 107, 45, 85, 65, 34, 93, 32, 61, 32, 48, 120, 48, 52, - 50, 50, 44, 10, 91, 34, 117, 114, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 48, 44, 10, 91, 34, 117, 114, 45, 80, 75, 34, 93, 32, 61, - 32, 48, 120, 48, 52, 50, 48, 44, 10, 91, 34, 117, 122, 34, 93, 32, 61, 32, 48, 120, 48, 48, 52, 51, 44, 10, 91, 34, 117, 122, 45, 67, -121, 114, 108, 45, 85, 90, 34, 93, 32, 61, 32, 48, 120, 48, 56, 52, 51, 44, 10, 91, 34, 117, 122, 45, 76, 97, 116, 110, 45, 85, 90, 34, - 93, 32, 61, 32, 48, 120, 48, 52, 52, 51, 44, 10, 91, 34, 118, 105, 34, 93, 32, 61, 32, 48, 120, 48, 48, 50, 65, 44, 10, 91, 34, 118, -105, 45, 86, 78, 34, 93, 32, 61, 32, 48, 120, 48, 52, 50, 65, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, -100, 105, 111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 119, 105, 110, 51, 50, 41, 10, 108, -111, 99, 97, 108, 32, 105, 115, 110, 97, 116, 105, 118, 101, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, 105, 118, 101, - 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 32, 61, 32, 97, 114, 99, 104, 105, -116, 101, 99, 116, 117, 114, 101, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 44, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, -116, 117, 114, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 97, 114, 99, 104, 32, 116, 104, 101, 110, 10, 97, 114, 99, 104, 32, 61, 32, 105, 105, -102, 40, 105, 115, 110, 97, 116, 105, 118, 101, 44, 32, 34, 120, 56, 54, 34, 44, 32, 34, 65, 110, 121, 32, 67, 80, 85, 34, 41, 10, 101, 110, -100, 10, 105, 102, 32, 119, 105, 110, 51, 50, 32, 97, 110, 100, 32, 105, 115, 110, 97, 116, 105, 118, 101, 32, 97, 110, 100, 32, 97, 114, 99, 104, - 32, 61, 61, 32, 34, 120, 56, 54, 34, 32, 116, 104, 101, 110, 10, 97, 114, 99, 104, 32, 61, 32, 34, 87, 105, 110, 51, 50, 34, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 97, 114, 99, 104, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, -105, 111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 80, 108, 97, 116, 102, 111, 114, 109, 40, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 108, 111, - 99, 97, 108, 32, 115, 121, 115, 116, 101, 109, 32, 61, 32, 112, 46, 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 112, 46, -102, 105, 101, 108, 100, 115, 46, 115, 121, 115, 116, 101, 109, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 108, 111, 99, 97, 108, 32, 97, -114, 99, 104, 32, 61, 32, 112, 46, 97, 112, 105, 46, 99, 104, 101, 99, 107, 86, 97, 108, 117, 101, 40, 112, 46, 102, 105, 101, 108, 100, 115, 46, - 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, -114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 40, 115, 121, 115, 116, 101, 109, 44, 32, 97, 114, 99, 104, 32, 111, 114, 32, 112, 108, 97, 116, -102, 111, 114, 109, 58, 108, 111, 119, 101, 114, 40, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, -105, 111, 46, 99, 117, 108, 116, 117, 114, 101, 70, 111, 114, 76, 111, 99, 97, 108, 101, 40, 108, 111, 99, 97, 108, 101, 41, 10, 105, 102, 32, 108, -111, 99, 97, 108, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 117, 108, 116, 117, 114, 101, 32, 61, 32, 118, 115, 116, 117, 100, -105, 111, 46, 95, 99, 117, 108, 116, 117, 114, 101, 115, 91, 108, 111, 99, 97, 108, 101, 93, 10, 105, 102, 32, 110, 111, 116, 32, 99, 117, 108, 116, -117, 114, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 34, 76, 111, 99, 97, 108, 101, 34, 32, 46, 46, 32, -108, 111, 99, 97, 108, 101, 44, 32, 39, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 108, 111, 99, 97, 108, 101, 32, 34, 37, 115, 34, - 39, 44, 32, 108, 111, 99, 97, 108, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 117, 108, 116, 117, 114, 101, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 103, 101, 116, 76, 105, 110, 107, 115, 40, - 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 116, 111, 111, 108, 115, 46, 109, 115, - 99, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 110, 111, 116, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, -103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 77, 65, 75, 69, 70, 73, 76, - 69, 32, 111, 114, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 78, 79, 78, 69, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 101, 101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, 105, 110, 107, 40, - 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 95, 110, 101, 101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, 105, -110, 107, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 120, 32, 61, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 73, -109, 112, 108, 105, 99, 105, 116, 76, 105, 110, 107, 10, 105, 102, 32, 110, 111, 116, 32, 101, 120, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 112, 114, 106, 100, 101, 112, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, -101, 115, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 34, 108, 105, 110, 107, 79, 110, 108, 121, 34, 41, 10, 108, 111, 99, 97, -108, 32, 99, 102, 103, 100, 101, 112, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, - 32, 34, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 10, 101, 120, 32, 61, 32, - 35, 112, 114, 106, 100, 101, 112, 115, 32, 126, 61, 32, 35, 99, 102, 103, 100, 101, 112, 115, 10, 101, 110, 100, 10, 99, 102, 103, 46, 95, 110, 101, -101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, 105, 110, 107, 32, 61, 32, 101, 120, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, - 99, 102, 103, 46, 95, 110, 101, 101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, 105, 110, 107, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 10, 99, 102, 103, - 32, 61, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 32, 111, 114, 32, 99, 102, 103, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, - 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, - 97, 116, 105, 118, 101, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 41, 10, 105, 102, 32, 116, 121, 112, 101, 40, 100, 105, 114, 115, 41, - 32, 61, 61, 32, 39, 116, 97, 98, 108, 101, 39, 32, 116, 104, 101, 110, 10, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 102, 105, -108, 116, 101, 114, 101, 109, 112, 116, 121, 40, 100, 105, 114, 115, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 100, 105, 114, 115, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, -105, 103, 40, 99, 102, 103, 44, 32, 97, 114, 99, 104, 41, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 118, -115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 97, 114, 99, 104, 32, 111, 114, 32, 118, 115, 116, 117, 100, 105, 111, - 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 116, 114, 117, 101, 41, 10, 114, 101, 116, 117, 114, -110, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 46, 46, 32, 34, 124, 34, 32, 46, 46, 32, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, -101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 69, 108, -101, 109, 101, 110, 116, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 120, 109, 108, 110, 115, 61, 34, -104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 100, 101, 118, -101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, 105, 108, 100, 47, 50, 48, 48, 51, 34, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 40, 112, 114, 106, 41, 10, 108, 111, - 99, 97, 108, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 10, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 115, 104, 97, 114, -112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, 34, 46, 99, 115, 112, 114, 111, 106, - 34, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 32, 116, -104, 101, 110, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, 34, 46, 102, 115, 112, 114, 111, 106, 34, 10, 101, 108, 115, 101, 105, 102, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, 41, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, -112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, - 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, 34, 46, 118, 99, 120, -105, 116, 101, 109, 115, 34, 10, 101, 108, 115, 101, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, 105, 105, 102, 40, 95, 65, 67, 84, - 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 48, 56, 34, 44, 32, 34, 46, 118, 99, 120, 112, 114, 111, 106, 34, 44, 32, 34, 46, 118, 99, -112, 114, 111, 106, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, - 40, 112, 114, 106, 44, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, -116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, - 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 10, 105, 102, 32, 112, 108, 97, 116, -102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 108, 116, 97, 114, 99, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, -111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 41, - 32, 111, 114, 32, 112, 108, 97, 116, 102, 111, 114, 109, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 97, 114, 99, 104, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 112, 108, 116, 97, -114, 99, 104, 32, 61, 61, 32, 99, 102, 103, 97, 114, 99, 104, 32, 116, 104, 101, 110, 10, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 110, -105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 112, 108, 97, 116, 102, 111, -114, 109, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 115, 111, 108, 117, 116, 105, 111, 110, 80, 108, 97, -116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 99, 102, 103, 46, -112, 108, 97, 116, 102, 111, 114, 109, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 97, 114, 99, 104, 10, 105, 102, 32, 112, 108, 97, 116, 102, -111, 114, 109, 32, 116, 104, 101, 110, 10, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 97, 114, 99, 104, - 70, 114, 111, 109, 80, 108, 97, 116, 102, 111, 114, 109, 40, 112, 108, 97, 116, 102, 111, 114, 109, 41, 32, 111, 114, 32, 112, 108, 97, 116, 102, 111, -114, 109, 10, 105, 102, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 126, 61, 32, 34, 120, 56, 54, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 112, 108, 97, 116, 102, 111, 114, 109, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 110, 97, -116, 105, 118, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 110, 101, 116, 32, 61, 32, 102, 97, 108, 115, -101, 10, 108, 111, 99, 97, 108, 32, 115, 108, 110, 97, 114, 99, 104, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, -107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, - 41, 32, 100, 111, 10, 104, 97, 115, 110, 97, 116, 105, 118, 101, 32, 61, 32, 104, 97, 115, 110, 97, 116, 105, 118, 101, 32, 111, 114, 32, 112, 114, -111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, 105, 118, 101, 40, 112, 114, 106, 41, 10, 104, 97, 115, 110, 101, 116, 32, 32, 32, 32, 61, 32, -104, 97, 115, 110, 101, 116, 32, 32, 32, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 112, 114, -106, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, -102, 105, 103, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, -111, 114, 109, 41, 10, 105, 102, 32, 112, 114, 106, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 97, 114, 99, -104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 99, 102, -103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 115, 108, 110, 97, 114, 99, 104, 32, 116, 104, 101, 110, 10, 115, 108, 110, 97, 114, 99, 104, 32, 61, - 32, 112, 114, 106, 97, 114, 99, 104, 10, 101, 108, 115, 101, 105, 102, 32, 115, 108, 110, 97, 114, 99, 104, 32, 126, 61, 32, 112, 114, 106, 97, 114, - 99, 104, 32, 116, 104, 101, 110, 10, 115, 108, 110, 97, 114, 99, 104, 32, 61, 32, 34, 77, 105, 120, 101, 100, 32, 80, 108, 97, 116, 102, 111, 114, -109, 115, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 105, 105, 102, 40, 104, 97, 115, 110, 101, 116, 44, 32, 34, 120, 56, 54, 34, 44, 32, 34, 87, 105, 110, 51, - 50, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 115, 108, 110, 97, 114, 99, 104, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 105, -105, 102, 40, 115, 108, 110, 97, 114, 99, 104, 32, 61, 61, 32, 34, 120, 56, 54, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 104, 97, 115, 110, -101, 116, 44, 32, 34, 87, 105, 110, 51, 50, 34, 44, 32, 115, 108, 110, 97, 114, 99, 104, 41, 10, 101, 108, 115, 101, 105, 102, 32, 104, 97, 115, -110, 101, 116, 32, 97, 110, 100, 32, 104, 97, 115, 110, 97, 116, 105, 118, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 77, -105, 120, 101, 100, 32, 80, 108, 97, 116, 102, 111, 114, 109, 115, 34, 10, 101, 108, 115, 101, 105, 102, 32, 104, 97, 115, 110, 101, 116, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 65, 110, 121, 32, 67, 80, 85, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, - 34, 87, 105, 110, 51, 50, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, - 46, 115, 111, 108, 117, 116, 105, 111, 110, 97, 114, 99, 104, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 110, 97, 116, 105, -118, 101, 32, 61, 32, 102, 97, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 100, 111, 116, 110, 101, 116, 32, 61, 32, 102, 97, 108, -115, 101, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 32, 61, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 10, 102, 111, 114, - 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, - 99, 102, 103, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 41, 32, 100, 111, 10, 104, 97, 115, 110, 97, 116, 105, 118, 101, 32, 61, 32, 104, 97, -115, 110, 97, 116, 105, 118, 101, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 110, 97, 116, 105, 118, 101, 40, 112, 114, 106, 41, - 10, 104, 97, 115, 110, 101, 116, 32, 32, 32, 32, 61, 32, 104, 97, 115, 110, 101, 116, 32, 32, 32, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, -116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 112, 114, 106, 41, 10, 105, 102, 32, 104, 97, 115, 110, 97, 116, 105, 118, 101, 32, 97, 110, 100, - 32, 104, 97, 115, 100, 111, 116, 110, 101, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 77, 105, 120, 101, 100, 32, 80, 108, - 97, 116, 102, 111, 114, 109, 115, 34, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 97, 114, 99, 104, 32, 116, 104, 101, 110, 10, 108, 111, - 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 112, -114, 106, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, -105, 102, 32, 112, 114, 106, 99, 102, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, - 99, 116, 117, 114, 101, 32, 116, 104, 101, 110, 10, 97, 114, 99, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 97, 114, 99, 104, 70, 114, -111, 109, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 97, 114, 99, 104, 32, 61, 32, 97, 114, 99, 104, 32, 111, 114, 32, 105, 105, 102, 40, 104, 97, 115, 110, 97, 116, 105, 118, 101, 44, 32, 34, - 87, 105, 110, 51, 50, 34, 44, 32, 34, 65, 110, 121, 32, 67, 80, 85, 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 114, 99, 104, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 115, 111, 108, 117, 116, 105, 111, 110, 99, 111, 110, 102, -105, 103, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 99, 102, 103, 46, 112, 108, 97, -116, 102, 111, 114, 109, 10, 105, 102, 32, 110, 111, 116, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 112, 108, 97, 116, 102, -111, 114, 109, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 115, 111, 108, 117, 116, 105, 111, 110, 97, 114, 99, 104, 40, 99, 102, 103, 41, 10, -101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 115, 124, 37, 115, 34, - 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, 40, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 111, 106, -101, 99, 116, 46, 105, 115, 99, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 70, - 65, 69, 48, 52, 69, 67, 48, 45, 51, 48, 49, 70, 45, 49, 49, 68, 51, 45, 66, 70, 52, 66, 45, 48, 48, 67, 48, 52, 70, 55, 57, 69, - 70, 66, 67, 34, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, 112, 114, 106, - 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 70, 50, 65, 55, 49, 70, 57, 66, 45, 53, 68, 51, 51, 45, 52, 54, 53, - 65, 45, 65, 55, 48, 50, 45, 57, 50, 48, 68, 55, 55, 50, 55, 57, 55, 56, 54, 34, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 111, 106, -101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, 41, 32, 111, 114, 32, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, -106, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 56, 66, 67, 57, 67, 69, 66, 56, 45, 56, 66, 52, 65, 45, 49, 49, - 68, 48, 45, 56, 68, 49, 49, 45, 48, 48, 65, 48, 67, 57, 49, 66, 67, 57, 52, 50, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 110, - 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 48, 120, 95, 118, 99, 112, 114, 111, 106, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, -100, 101, 40, 34, 118, 115, 50, 48, 48, 120, 95, 118, 99, 112, 114, 111, 106, 95, 117, 115, 101, 114, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, -108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 48, 53, 95, 115, 111, 108, 117, 116, 105, 111, 110, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, -117, 100, 101, 40, 34, 118, 115, 50, 48, 48, 53, 95, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, -108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 48, 53, 95, 99, 115, 112, 114, 111, 106, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, -101, 40, 34, 118, 115, 50, 48, 48, 53, 95, 99, 115, 112, 114, 111, 106, 95, 117, 115, 101, 114, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, -117, 100, 101, 40, 34, 118, 115, 50, 48, 48, 53, 95, 102, 115, 112, 114, 111, 106, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, - 40, 34, 118, 115, 50, 48, 48, 53, 95, 102, 115, 112, 114, 111, 106, 95, 117, 115, 101, 114, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, -100, 101, 40, 34, 118, 115, 50, 48, 49, 48, 95, 110, 117, 103, 101, 116, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, -118, 115, 50, 48, 49, 48, 95, 118, 99, 120, 112, 114, 111, 106, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, - 50, 48, 49, 48, 95, 118, 99, 120, 112, 114, 111, 106, 95, 117, 115, 101, 114, 46, 108, 117, 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, - 34, 118, 115, 50, 48, 49, 48, 95, 118, 99, 120, 112, 114, 111, 106, 95, 102, 105, 108, 116, 101, 114, 115, 46, 108, 117, 97, 34, 41, 10, 105, 110, - 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 48, 95, 114, 117, 108, 101, 115, 95, 112, 114, 111, 112, 115, 46, 108, 117, 97, 34, 41, 10, -105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 48, 95, 114, 117, 108, 101, 115, 95, 116, 97, 114, 103, 101, 116, 115, 46, 108, 117, - 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 48, 95, 114, 117, 108, 101, 115, 95, 120, 109, 108, 46, 108, 117, - 97, 34, 41, 10, 105, 110, 99, 108, 117, 100, 101, 40, 34, 118, 115, 50, 48, 49, 51, 95, 118, 99, 120, 105, 116, 101, 109, 115, 46, 108, 117, 97, - 34, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 109, 111, 100, 117, 108, 101, 115, 46, 118, 115, 116, 117, 100, 105, 111, 10, }; - -// vstudio/vs2005.lua -static const unsigned char builtin_script_91[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, - 48, 53, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 50, 48, 48, 53, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 118, 115, 50, 48, 48, 53, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, 105, -111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 92, 116, 34, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 114, - 92, 110, 34, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 118, 115, 50, 48, 48, 53, 46, 101, 115, 99, 41, 10, 112, 46, 103, 101, 110, -101, 114, 97, 116, 101, 40, 119, 107, 115, 44, 32, 34, 46, 115, 108, 110, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 115, 108, 110, 50, 48, - 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 50, 48, 48, 53, - 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, - 32, 32, 34, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 118, 115, 50, - 48, 48, 53, 46, 101, 115, 99, 41, 10, 105, 102, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 115, 104, 97, 114, 112, 40, 112, -114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 99, 115, 112, 114, 111, -106, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 108, 111, 99, - 97, 108, 32, 117, 115, 101, 114, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, -115, 116, 117, 100, 105, 111, 46, 99, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 32, -101, 110, 100, 41, 10, 105, 102, 32, 35, 117, 115, 101, 114, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, -101, 40, 112, 114, 106, 44, 32, 34, 46, 99, 115, 112, 114, 111, 106, 46, 117, 115, 101, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, - 41, 32, 112, 46, 111, 117, 116, 108, 110, 40, 117, 115, 101, 114, 41, 32, 101, 110, 100, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, -112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, -101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 102, 115, 112, 114, 111, 106, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, -102, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 32, 61, 32, 112, 46, - 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, 111, 46, 102, 115, 50, 48, 48, - 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, 32, 35, 117, 115, 101, -114, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 102, 115, 112, -114, 111, 106, 46, 117, 115, 101, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, 46, 111, 117, 116, 108, 110, 40, 117, 115, -101, 114, 41, 32, 101, 110, 100, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, - 44, 32, 34, 46, 118, 99, 112, 114, 111, 106, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 48, 120, 46, 103, 101, 110, 101, -114, 97, 116, 101, 41, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, - 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 48, 120, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, -115, 101, 114, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, 32, 35, 117, 115, 101, 114, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 99, 112, 114, 111, 106, 46, 117, 115, 101, 114, 34, 44, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, 46, 111, 117, 116, 108, 110, 40, 117, 115, 101, 114, 41, 32, 101, 110, 100, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 50, 48, 48, 53, 46, 101, 115, 99, 40, 118, 97, -108, 117, 101, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 103, 115, 117, 98, 40, 118, 97, 108, 117, 101, 44, 32, - 39, 38, 39, 44, 32, 32, 34, 38, 97, 109, 112, 59, 34, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, - 98, 40, 39, 34, 39, 44, 32, 32, 34, 38, 113, 117, 111, 116, 59, 34, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, -103, 115, 117, 98, 40, 34, 39, 34, 44, 32, 32, 34, 38, 97, 112, 111, 115, 59, 34, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, -117, 101, 58, 103, 115, 117, 98, 40, 39, 60, 39, 44, 32, 32, 34, 38, 108, 116, 59, 34, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, -108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 62, 39, 44, 32, 32, 34, 38, 103, 116, 59, 34, 41, 10, 118, 97, 108, 117, 101, 32, 61, 32, 118, - 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 92, 114, 39, 44, 32, 34, 38, 35, 120, 48, 68, 59, 34, 41, 10, 118, 97, 108, 117, 101, 32, - 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 92, 110, 39, 44, 32, 34, 38, 35, 120, 48, 65, 59, 34, 41, 10, 114, 101, 116, -117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, -114, 32, 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 48, 53, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, - 34, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 48, 53, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, -110, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 48, 53, - 32, 112, 114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, -100, 111, 119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 56, 48, 34, 44, 10, 118, 97, 108, -105, 100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, - 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, -101, 100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 32, 125, 44, 10, 118, 97, -108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, - 35, 34, 44, 32, 34, 70, 35, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, - 99, 99, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 109, 115, 99, 34, 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, - 32, 34, 109, 115, 110, 101, 116, 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, 105, 111, 110, 44, 10, 111, 110, - 80, 114, 111, 106, 101, 99, 116, 32, 32, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, - 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 118, -115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 83, 111, 108, 117, 116, 105, 111, 110, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, -106, 101, 99, 116, 32, 32, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 44, 10, 111, -110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 32, 32, 32, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 84, - 97, 114, 103, 101, 116, 44, 10, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 123, 10, 99, 115, 112, 114, 111, 106, 83, 99, 104, 101, 109, 97, 86, -101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 50, 46, 48, 34, 44, 10, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 32, 32, - 32, 32, 32, 32, 61, 32, 34, 56, 46, 48, 46, 53, 48, 55, 50, 55, 34, 44, 10, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, -111, 110, 32, 32, 32, 32, 32, 61, 32, 34, 57, 34, 44, 10, 118, 101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 61, 32, 34, 50, 48, 48, 53, 34, 44, 10, 125, 10, 125, 10, }; - -// vstudio/vs2008.lua -static const unsigned char builtin_script_92[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, - 48, 56, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 50, 48, 48, 56, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 118, 115, 50, 48, 48, 56, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, - 48, 48, 56, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, -105, 111, 32, 50, 48, 48, 56, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, -101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 48, 56, 32, 112, 114, 111, 106, 101, 99, 116, 32, 102, 105, 108, -101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, 100, 111, 119, 115, 34, 44, 10, 116, 111, 111, 108, 115, -101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 57, 48, 34, 44, 10, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, - 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, - 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, -101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, -115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, 34, 32, 125, 44, 10, -118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, -109, 115, 99, 34, 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, 34, 32, 125, 44, 10, -125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, -103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, 105, 111, 110, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 32, 32, 61, 32, -118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 44, 10, -111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, - 83, 111, 108, 117, 116, 105, 111, 110, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, 32, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 44, 10, 111, 110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, - 32, 32, 32, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 44, 10, 118, 115, 116, 117, 100, -105, 111, 32, 61, 32, 123, 10, 99, 115, 112, 114, 111, 106, 83, 99, 104, 101, 109, 97, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 50, 46, - 48, 34, 44, 10, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 32, 32, 61, 32, 34, 57, 46, 48, 46, 51, - 48, 55, 50, 57, 34, 44, 10, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 32, 61, 32, 34, 49, 48, - 34, 44, 10, 118, 101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 50, 48, 48, 56, 34, 44, - 10, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 51, 46, 53, 34, 44, 10, 125, 10, -125, 10, }; - -// vstudio/vs200x_vcproj.lua -static const unsigned char builtin_script_93[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 48, 120, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 48, 120, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 108, 111, 99, - 97, 108, 32, 99, 111, 110, 116, 101, 120, 116, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, -106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, -112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, -108, 101, 99, 111, 110, 102, 105, 103, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, -110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, -114, 110, 32, 123, 10, 109, 46, 120, 109, 108, 69, 108, 101, 109, 101, 110, 116, 44, 10, 109, 46, 118, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, -111, 80, 114, 111, 106, 101, 99, 116, 44, 10, 109, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 44, 10, 109, 46, 116, 111, 111, 108, 70, 105, 108, -101, 115, 44, 10, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 44, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, -101, 115, 44, 10, 109, 46, 102, 105, 108, 101, 115, 44, 10, 109, 46, 103, 108, 111, 98, 97, 108, 115, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, - 92, 116, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, -101, 99, 116, 44, 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 80, -114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 112, 46, 119, 40, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 118, -105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, -106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 44, 10, 109, 46, 118, 101, 114, -115, 105, 111, 110, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 78, 97, 109, 101, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 71, 85, - 73, 68, 44, 10, 109, 46, 114, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 44, 10, 109, 46, 107, 101, 121, 119, 111, 114, 100, 44, 10, -109, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 118, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, -106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 80, 114, 111, 106, 101, 99, 116, 39, - 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 118, 105, 115, 117, 97, 108, 83, -116, 117, 100, 105, 111, 80, 114, 111, 106, 101, 99, 116, 44, 32, 112, 114, 106, 41, 10, 112, 46, 119, 40, 39, 62, 39, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 40, 112, 114, 106, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 39, 60, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, -109, 97, 112, 112, 105, 110, 103, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, -101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, -118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 10, 109, 97, 112, 112, 105, -110, 103, 91, 99, 102, 103, 93, 32, 61, 32, 110, 97, 109, 101, 10, 109, 97, 112, 112, 105, 110, 103, 91, 110, 97, 109, 101, 93, 32, 61, 32, 99, -102, 103, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, -110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 102, 111, 114, 32, 105, 44, 32, 97, 114, 99, 104, 32, 105, 110, 32, 105, 112, 97, 105, -114, 115, 40, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, -116, 10, 108, 111, 99, 97, 108, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, - 99, 116, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 97, 114, 99, 104, 41, 10, 105, 102, 32, 116, 101, 115, 116, 78, 97, 109, 101, 32, - 61, 61, 32, 109, 97, 112, 112, 105, 110, 103, 91, 99, 102, 103, 93, 32, 116, 104, 101, 110, 10, 116, 97, 114, 103, 101, 116, 32, 61, 32, 99, 102, -103, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 109, 97, 112, 112, 105, 110, 103, 91, 116, 101, 115, 116, 78, 97, 109, 101, 93, 32, 116, -104, 101, 110, 10, 116, 97, 114, 103, 101, 116, 32, 61, 32, 123, 32, 102, 97, 107, 101, 32, 61, 32, 116, 114, 117, 101, 32, 125, 10, 101, 110, 100, - 10, 105, 102, 32, 116, 97, 114, 103, 101, 116, 32, 116, 104, 101, 110, 10, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, -116, 97, 114, 103, 101, 116, 44, 32, 116, 101, 115, 116, 78, 97, 109, 101, 41, 10, 109, 46, 116, 111, 111, 108, 115, 40, 116, 97, 114, 103, 101, 116, - 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 62, - 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 97, 107, 101, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 105, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, 68, 105, 114, 101, 99, 116, 111, 114, -121, 44, 10, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, -116, 117, 114, 110, 32, 123, 10, 109, 46, 111, 117, 116, 112, 117, 116, 68, 105, 114, 101, 99, 116, 111, 114, 121, 44, 10, 109, 46, 105, 110, 116, 101, -114, 109, 101, 100, 105, 97, 116, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 44, 10, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 84, 121, 112, 101, 44, 10, 109, 46, 117, 115, 101, 79, 102, 77, 70, 67, 44, 10, 109, 46, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, -101, 116, 44, 10, 109, 46, 109, 97, 110, 97, 103, 101, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 44, 10, 125, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 99, 102, 103, 44, - 32, 110, 97, 109, 101, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 39, 41, 10, -112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, - 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, - 41, 10, 112, 46, 119, 40, 39, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 116, 111, 111, 108, 115, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, -101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 97, 107, 101, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 86, 67, 78, 77, 97, 107, 101, 84, 111, 111, 108, 10, 125, 10, 101, 110, 100, 10, 114, 101, -116, 117, 114, 110, 32, 123, 10, 109, 46, 86, 67, 80, 114, 101, 66, 117, 105, 108, 100, 69, 118, 101, 110, 116, 84, 111, 111, 108, 44, 10, 109, 46, - 86, 67, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 88, 77, 76, 68, 97, 116, 97, 71, 101, -110, 101, 114, 97, 116, 111, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 87, 101, 98, 83, 101, 114, 118, 105, 99, 101, 80, 114, 111, 120, 121, - 71, 101, 110, 101, 114, 97, 116, 111, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 77, 73, 68, 76, 84, 111, 111, 108, 44, 10, 109, 46, 86, - 67, 67, 76, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 77, 97, 110, 97, 103, 101, 100, 82, 101, 115, 111, -117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, -109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 80, 114, 101, 76, 105, 110, 107, 69, 118, 101, 110, 116, 84, 111, 111, 108, - 44, 10, 109, 46, 86, 67, 76, 105, 110, 107, 101, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 65, 76, 105, 110, 107, 84, 111, 111, 108, 44, - 10, 109, 46, 86, 67, 77, 97, 110, 105, 102, 101, 115, 116, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 88, 68, 67, 77, 97, 107, 101, 84, 111, -111, 108, 44, 10, 109, 46, 86, 67, 66, 115, 99, 77, 97, 107, 101, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 70, 120, 67, 111, 112, 84, 111, -111, 108, 44, 10, 109, 46, 86, 67, 65, 112, 112, 86, 101, 114, 105, 102, 105, 101, 114, 84, 111, 111, 108, 44, 10, 109, 46, 86, 67, 80, 111, 115, -116, 66, 117, 105, 108, 100, 69, 118, 101, 110, 116, 84, 111, 111, 108, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 116, 111, 111, 108, 115, 40, 99, 102, 103, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, -110, 116, 115, 46, 116, 111, 111, 108, 115, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 102, 105, 103, 46, 116, 111, 111, 108, 115, 101, 116, 40, 99, -102, 103, 41, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 97, 115, 115, 101, 109, 98, -108, 121, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, -115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, -114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 62, 39, 41, 10, 112, 46, 99, 97, 108, -108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 32, 112, 114, -106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 109, - 46, 102, 105, 108, 101, 115, 83, 111, 114, 116, 101, 100, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 70, 105, 108, 101, 115, - 62, 39, 41, 10, 112, 46, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, - 99, 104, 101, 110, 116, 101, 114, 32, 61, 32, 109, 46, 102, 105, 108, 101, 115, 70, 105, 108, 116, 101, 114, 83, 116, 97, 114, 116, 44, 10, 111, 110, - 98, 114, 97, 110, 99, 104, 101, 120, 105, 116, 32, 61, 32, 109, 46, 102, 105, 108, 101, 115, 70, 105, 108, 116, 101, 114, 69, 110, 100, 44, 10, 111, -110, 108, 101, 97, 102, 32, 61, 32, 109, 46, 102, 105, 108, 101, 115, 70, 105, 108, 101, 44, 10, 125, 44, 32, 102, 97, 108, 115, 101, 41, 10, 112, - 46, 112, 111, 112, 40, 39, 60, 47, 70, 105, 108, 101, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -102, 105, 108, 101, 115, 83, 111, 114, 116, 101, 100, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, -103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 98, 41, - 10, 108, 111, 99, 97, 108, 32, 105, 115, 116, 111, 112, 32, 61, 32, 40, 97, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 114, 101, 110, 116, 32, - 61, 61, 32, 110, 105, 108, 41, 10, 108, 111, 99, 97, 108, 32, 97, 83, 111, 114, 116, 78, 97, 109, 101, 32, 61, 32, 97, 46, 110, 97, 109, 101, - 10, 108, 111, 99, 97, 108, 32, 98, 83, 111, 114, 116, 78, 97, 109, 101, 32, 61, 32, 98, 46, 110, 97, 109, 101, 10, 105, 102, 32, 97, 46, 114, -101, 108, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 98, 46, 114, 101, 108, 112, 97, 116, 104, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 110, 111, 116, 32, 105, 115, 116, 111, 112, 10, 101, 110, 100, 10, 97, 83, 111, 114, 116, 78, 97, 109, 101, - 32, 61, 32, 97, 46, 114, 101, 108, 112, 97, 116, 104, 58, 103, 115, 117, 98, 40, 34, 37, 46, 37, 46, 37, 47, 34, 44, 32, 34, 34, 41, 10, -101, 110, 100, 10, 105, 102, 32, 98, 46, 114, 101, 108, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 97, 46, 114, -101, 108, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 105, 115, 116, 111, 112, 10, 101, 110, 100, 10, 98, 83, 111, -114, 116, 78, 97, 109, 101, 32, 61, 32, 98, 46, 114, 101, 108, 112, 97, 116, 104, 58, 103, 115, 117, 98, 40, 34, 37, 46, 37, 46, 37, 47, 34, - 44, 32, 34, 34, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 97, 83, 111, 114, 116, 78, 97, 109, 101, 32, 60, 32, 98, 83, 111, -114, 116, 78, 97, 109, 101, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 115, - 70, 105, 108, 116, 101, 114, 83, 116, 97, 114, 116, 40, 110, 111, 100, 101, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 70, 105, 108, 116, 101, -114, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 110, 111, 100, 101, 46, 110, 97, 109, 101, 41, 10, -112, 46, 119, 40, 39, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 115, 70, 105, 108, -116, 101, 114, 69, 110, 100, 40, 110, 111, 100, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 70, 105, 108, 116, 101, 114, 62, 39, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 115, 70, 105, 108, 101, 40, 110, 111, 100, 101, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 39, 60, 70, 105, 108, 101, 39, 41, 10, 112, 46, 119, 40, 39, 82, 101, 108, 97, 116, 105, 118, 101, 80, 97, 116, 104, - 61, 34, 37, 115, 34, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, - 97, 116, 104, 41, 41, 10, 112, 46, 119, 40, 39, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 110, 111, 100, 101, 46, -112, 114, 111, 106, 101, 99, 116, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, -111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 109, 46, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 70, 105, 108, 101, 62, 39, - 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 108, 101, 99, 102, 103, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 44, 10, 125, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 40, 99, 102, 103, 44, 32, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, -101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 108, 111, 99, - 97, 108, 32, 99, 111, 110, 102, 105, 103, 65, 116, 116, 114, 105, 98, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 65, 116, 116, 114, 105, 98, -117, 116, 101, 115, 44, 32, 102, 105, 108, 101, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 108, 111, 99, 97, -108, 32, 99, 111, 109, 112, 105, 108, 101, 114, 65, 116, 116, 114, 105, 98, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, -110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 109, 46, 86, 67, 67, 76, 67, 111, 109, 112, 105, 108, 101, -114, 84, 111, 111, 108, 40, 102, 105, 108, 101, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, - 99, 111, 110, 102, 105, 103, 65, 116, 116, 114, 105, 98, 115, 32, 62, 32, 48, 32, 111, 114, 32, 99, 111, 109, 112, 105, 108, 101, 114, 65, 116, 116, -114, 105, 98, 115, 58, 108, 105, 110, 101, 115, 40, 41, 32, 62, 32, 51, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 70, -105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, - 34, 39, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 41, 10, -105, 102, 32, 35, 99, 111, 110, 102, 105, 103, 65, 116, 116, 114, 105, 98, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, -108, 110, 40, 99, 111, 110, 102, 105, 103, 65, 116, 116, 114, 105, 98, 115, 41, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 62, 39, 41, 10, 112, - 46, 111, 117, 116, 108, 110, 40, 99, 111, 109, 112, 105, 108, 101, 114, 65, 116, 116, 114, 105, 98, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, - 47, 70, 105, 108, 101, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 108, 111, 98, 97, 108, -115, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 71, 108, 111, 98, 97, 108, 115, 62, 39, 41, 10, 112, 46, 99, 97, 108, -108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, 44, 32, 112, 114, 106, 41, 10, -112, 46, 112, 111, 112, 40, 39, 60, 47, 71, 108, 111, 98, 97, 108, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 86, 67, 84, 111, 111, 108, 40, 110, 97, 109, 101, 44, 32, 99, 102, 103, 44, 32, 46, 46, 46, 41, 10, 112, 46, 112, 117, 115, 104, - 40, 39, 60, 84, 111, 111, 108, 39, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 70, 117, 110, 99, 32, 61, 32, 109, 91, 110, 97, 109, -101, 32, 46, 46, 32, 34, 78, 97, 109, 101, 34, 93, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 70, 117, 110, 99, 32, 61, 32, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 91, 110, 97, 109, 101, 93, 10, 105, 102, 32, 110, 97, 109, 101, 70, 117, 110, 99, 32, 116, 104, 101, 110, 10, -110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 70, 117, 110, 99, 40, 99, 102, 103, 44, 32, 46, 46, 46, 41, 10, 101, 110, 100, 10, 112, 46, -119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 110, 97, 109, 101, 41, 10, 105, 102, 32, 99, 102, 103, 32, 97, 110, 100, 32, -110, 111, 116, 32, 99, 102, 103, 46, 102, 97, 107, 101, 32, 116, 104, 101, 110, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 99, 97, -108, 108, 70, 117, 110, 99, 44, 32, 99, 102, 103, 44, 32, 46, 46, 46, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 47, 62, 39, - 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 68, 101, 98, 117, 103, 103, 101, 114, 84, 111, 111, 108, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 68, 101, 98, 117, 103, 103, 101, 114, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 112, 46, 112, 117, 115, 104, 40, - 39, 60, 68, 101, 98, 117, 103, 103, 101, 114, 84, 111, 111, 108, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 47, 62, 39, 41, 10, 101, 110, 100, - 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 65, 76, 105, 110, 107, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 86, 67, 65, 76, 105, 110, 107, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 65, 76, -105, 110, 107, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, - 65, 112, 112, 86, 101, 114, 105, 102, 105, 101, 114, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, -114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 65, 112, 112, 86, 101, -114, 105, 102, 105, 101, 114, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, - 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 65, 112, 112, 86, -101, 114, 105, 102, 105, 101, 114, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 86, 67, 66, 115, 99, 77, 97, 107, 101, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, -102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 66, -115, 99, 77, 97, 107, 101, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 66, 115, 99, 77, - 97, 107, 101, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, - 67, 76, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, -111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 123, 10, 109, 46, 99, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 44, 10, 109, 46, 111, 98, 106, 101, 99, 116, - 70, 105, 108, 101, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 114, 79, 112, 116, 105, 111, 110, -115, 44, 10, 109, 46, 111, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, -110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 119, 104, 111, 108, 101, 80, 114, 111, 103, 114, 97, -109, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 44, 10, 109, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, -105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 117, 110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, - 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 109, 105, 110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 44, 10, 109, - 46, 98, 97, 115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 44, 10, 109, 46, 98, 117, 102, 102, 101, 114, 83, 101, 99, -117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 44, 10, 109, 46, 115, 116, 114, 105, 110, 103, 80, 111, 111, 108, 105, 110, 103, 44, 10, 109, 46, 101, -120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 44, 10, 109, 46, 114, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, 97, -114, 121, 44, 10, 109, 46, 101, 110, 97, 98, 108, 101, 70, 117, 110, 99, 116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, - 44, 10, 109, 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, - 44, 10, 109, 46, 102, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, 110, 116, 77, 111, 100, 101, 108, 44, 10, 109, 46, 114, 117, 110, 116, 105, 109, -101, 84, 121, 112, 101, 73, 110, 102, 111, 44, 10, 109, 46, 116, 114, 101, 97, 116, 87, 67, 104, 97, 114, 95, 116, 65, 115, 66, 117, 105, 108, 116, - 73, 110, 84, 121, 112, 101, 44, 10, 109, 46, 117, 115, 101, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 44, 10, -109, 46, 112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 66, 97, 115, 101, 70, 105, 108, 101, 78, 97, 109, 101, 44, 10, 109, 46, 119, 97, 114, -110, 105, 110, 103, 76, 101, 118, 101, 108, 44, 10, 109, 46, 119, 97, 114, 110, 65, 115, 69, 114, 114, 111, 114, 44, 10, 109, 46, 100, 101, 116, 101, - 99, 116, 54, 52, 66, 105, 116, 80, 111, 114, 116, 97, 98, 105, 108, 105, 116, 121, 80, 114, 111, 98, 108, 101, 109, 115, 44, 10, 109, 46, 100, 101, - 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, 111, 114, 109, 97, 116, 44, 10, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, -115, 44, 10, 109, 46, 100, 105, 115, 97, 98, 108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 44, 10, 109, 46, -102, 111, 114, 99, 101, 100, 73, 110, 99, 108, 117, 100, 101, 70, 105, 108, 101, 115, 44, 10, 109, 46, 111, 109, 105, 116, 68, 101, 102, 97, 117, 108, -116, 76, 105, 98, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, - 97, 108, 69, 120, 116, 101, 114, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 114, 79, 112, 116, 105, 111, 110, 115, 44, 10, 109, 46, 97, 100, 100, -105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 112, 114, 101, -112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 117, 110, 100, 101, 102, 105, 110, 101, - 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 117, 115, 101, 80, 114, -101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 44, 10, 109, 46, 112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 66, 97, -115, 101, 70, 105, 108, 101, 78, 97, 109, 101, 44, 10, 109, 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, 111, -114, 109, 97, 116, 44, 10, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, 115, 44, 10, 109, 46, 102, 111, 114, 99, 101, 100, 73, 110, 99, 108, 117, -100, 101, 70, 105, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, - 67, 76, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 78, 97, 109, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, -106, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 97, 110, 100, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, -104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 34, 86, 67, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 34, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 34, 86, 67, 67, 76, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 34, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 67, 76, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 40, 99, -102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 67, 76, 67, 111, 109, 112, 105, -108, 101, 114, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, -101, 109, 101, 110, 116, 115, 46, 86, 67, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 86, 67, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, -108, 40, 34, 86, 67, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 70, 120, 67, 111, 112, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, - 86, 67, 70, 120, 67, 111, 112, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 70, 120, 67, -111, 112, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 76, -105, 110, 107, 101, 114, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, -116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 108, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, -110, 99, 105, 101, 115, 44, 10, 109, 46, 105, 103, 110, 111, 114, 101, 73, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 44, 10, 109, 46, - 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 110, 107, 101, 114, 79, 112, 116, 105, 111, 110, 115, 44, 10, 109, 46, 97, 100, 100, 105, 116, -105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 109, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 44, - 10, 109, 46, 108, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, - 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 109, 111, 100, 117, 108, 101, 68, 101, 102, 105, -110, 105, 116, 105, 111, 110, 70, 105, 108, 101, 44, 10, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 77, 97, 110, 105, 102, 101, 115, 116, 44, 10, -109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 44, 10, 109, 46, 112, 114, -111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 44, 10, 109, 46, 115, 117, 98, 83, 121, 115, 116, 101, 109, 44, 10, -109, 46, 108, 97, 114, 103, 101, 65, 100, 100, 114, 101, 115, 115, 65, 119, 97, 114, 101, 44, 10, 109, 46, 111, 112, 116, 105, 109, 105, 122, 101, 82, -101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 109, 46, 101, 110, 97, 98, 108, 101, 67, 79, 77, 68, 65, 84, 70, 111, 108, 100, 105, 110, 103, - 44, 10, 109, 46, 101, 110, 116, 114, 121, 80, 111, 105, 110, 116, 83, 121, 109, 98, 111, 108, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 76, 105, - 98, 114, 97, 114, 121, 44, 10, 109, 46, 116, 97, 114, 103, 101, 116, 77, 97, 99, 104, 105, 110, 101, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, -101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 110, 107, 101, 114, 79, 112, 116, 105, 111, 110, -115, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 109, 46, 111, -117, 116, 112, 117, 116, 70, 105, 108, 101, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, 121, 68, 105, -114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, - 86, 67, 76, 105, 110, 107, 101, 114, 84, 111, 111, 108, 78, 97, 109, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, -100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 34, 86, 67, - 76, 105, 98, 114, 97, 114, 105, 97, 110, 84, 111, 111, 108, 34, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 86, 67, 76, 105, -110, 107, 101, 114, 84, 111, 111, 108, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 76, -105, 110, 107, 101, 114, 84, 111, 111, 108, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, - 40, 34, 86, 67, 76, 105, 110, 107, 101, 114, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 101, -110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 77, 97, 110, 97, 103, 101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 67, -111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, -114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 77, 97, 110, 97, 103, 101, 100, 82, 101, -115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, - 40, 34, 86, 67, 77, 97, 110, 97, 103, 101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 34, - 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 77, 97, 110, 105, 102, 101, 115, 116, - 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, - 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 77, 97, 110, 105, 102, 101, 115, 116, 70, 105, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 77, 97, 110, 105, 102, 101, 115, 116, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 109, 46, - 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 77, 97, 110, 105, 102, 101, 115, 116, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 77, 73, 68, 76, 84, 111, 111, 108, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 116, 97, 114, 103, 101, 116, 69, 110, 118, -105, 114, 111, 110, 109, 101, 110, 116, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 77, 73, 68, 76, - 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 77, 73, 68, 76, 84, 111, 111, 108, 34, 44, - 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 78, 77, 97, 107, 101, 84, 111, 111, 108, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 98, 117, 105, 108, -100, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 44, 10, 109, 46, 114, 101, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 76, 105, -110, 101, 44, 10, 109, 46, 99, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 44, 10, 109, 46, 111, 117, 116, 112, 117, 116, - 44, 10, 109, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 117, -110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, -109, 46, 105, 110, 99, 108, 117, 100, 101, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 44, 10, 109, 46, 102, 111, 114, 99, 101, 100, 73, 110, 99, -108, 117, 100, 101, 115, 44, 10, 109, 46, 97, 115, 115, 101, 109, 98, 108, 121, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 44, 10, 109, 46, 102, -111, 114, 99, 101, 100, 85, 115, 105, 110, 103, 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 44, 10, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, -115, 77, 97, 110, 97, 103, 101, 100, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 78, 77, 97, -107, 101, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 78, 77, 97, 107, 101, 84, 111, 111, -108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 66, 117, 105, 108, 100, 84, -111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 115, 116, 97, 103, 101, 41, 10, 114, 101, 116, 117, 114, -110, 32, 123, 10, 109, 46, 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 86, 67, 66, 117, 105, 108, 100, 84, 111, 111, 108, 78, 97, 109, 101, 40, 99, 102, 103, 44, 32, 115, 116, 97, 103, 101, 41, 10, -114, 101, 116, 117, 114, 110, 32, 34, 86, 67, 34, 32, 46, 46, 32, 115, 116, 97, 103, 101, 32, 46, 46, 32, 34, 69, 118, 101, 110, 116, 84, 111, -111, 108, 34, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 80, 114, 101, 66, 117, 105, 108, 100, 69, 118, 101, -110, 116, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 66, 117, 105, 108, 100, 84, 111, 111, -108, 34, 44, 32, 99, 102, 103, 44, 32, 34, 80, 114, 101, 66, 117, 105, 108, 100, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 86, 67, 80, 114, 101, 76, 105, 110, 107, 69, 118, 101, 110, 116, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, - 84, 111, 111, 108, 40, 34, 86, 67, 66, 117, 105, 108, 100, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 44, 32, 34, 80, 114, 101, 76, 105, 110, -107, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 80, 111, 115, 116, 66, 117, 105, 108, 100, 69, 118, -101, 110, 116, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 66, 117, 105, 108, 100, 84, 111, -111, 108, 34, 44, 32, 99, 102, 103, 44, 32, 34, 80, 111, 115, 116, 66, 117, 105, 108, 100, 34, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 86, 67, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, - 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 79, 112, 116, 105, 111, 110, 115, 44, 10, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 80, 114, 101, -112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, - 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, - 99, 117, 108, 116, 117, 114, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 82, 101, 115, 111, -117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, - 86, 67, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 114, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, -100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 87, 101, 98, 83, 101, 114, 118, 105, 99, 101, 80, 114, 111, 120, 121, 71, 101, -110, 101, 114, 97, 116, 111, 114, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, -114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 87, 101, 98, 83, 101, 114, 118, 105, 99, -101, 80, 114, 111, 120, 121, 71, 101, 110, 101, 114, 97, 116, 111, 114, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, -108, 40, 34, 86, 67, 87, 101, 98, 83, 101, 114, 118, 105, 99, 101, 80, 114, 111, 120, 121, 71, 101, 110, 101, 114, 97, 116, 111, 114, 84, 111, 111, -108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 88, 68, 67, 77, 97, 107, -101, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 88, 68, 67, 77, 97, 107, 101, 84, 111, 111, 108, 40, 99, 102, 103, - 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 88, 68, 67, 77, 97, 107, 101, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, - 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 86, 67, 88, 77, 76, 68, 97, 116, 97, 71, 101, 110, 101, 114, 97, 116, -111, 114, 84, 111, 111, 108, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 86, 67, 88, 77, 76, 68, 97, 116, 97, 71, 101, 110, 101, 114, 97, 116, -111, 114, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 109, 46, 86, 67, 84, 111, 111, 108, 40, 34, 86, 67, 88, 77, 76, 68, 97, 116, 97, 71, -101, 110, 101, 114, 97, 116, 111, 114, 84, 111, 111, 108, 34, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 115, 121, 109, 98, 111, 108, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 40, 99, 102, 103, 46, 115, 121, 109, 98, -111, 108, 115, 32, 61, 61, 32, 112, 46, 79, 78, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 48, 10, 101, 108, 115, 101, 105, -102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 32, 61, 61, 32, 34, 99, 55, 34, 32, 116, 104, 101, 110, 10, 114, -101, 116, 117, 114, 110, 32, 49, 10, 101, 108, 115, 101, 10, 105, 102, 32, 99, 102, 103, 46, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, -110, 117, 101, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 111, 114, 10, 32, 32, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, -109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 111, 114, 10, 32, 32, 32, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, - 32, 112, 46, 79, 70, 70, 32, 111, 114, 10, 32, 32, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, - 32, 112, 46, 88, 56, 54, 95, 54, 52, 10, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 51, 10, 101, 108, 115, 101, 10, 114, 101, 116, -117, 114, 110, 32, 52, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, -105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 114, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 111, 112, 116, 115, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 10, 105, 102, 32, 99, 102, 103, - 46, 102, 108, 97, 103, 115, 46, 77, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 101, 32, 116, 104, 101, -110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 47, 77, 80, 34, 41, 10, 101, 110, 100, 10, -105, 102, 32, 35, 111, 112, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, -108, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 112, 116, -115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, -116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, - 10, 105, 102, 32, 35, 99, 102, 103, 46, 108, 105, 110, 107, 115, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 32, 114, 101, 116, 117, 114, 110, 32, -101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 101, 120, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 101, 101, 100, 115, 69, 120, 112, 108, -105, 99, 105, 116, 76, 105, 110, 107, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 115, 10, 105, 102, 32, 110, 111, 116, - 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 103, 101, -116, 76, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 101, 120, 41, 10, 102, 111, 114, 32, 105, 44, 32, 108, 105, 110, 107, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 108, 105, 110, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 108, 105, 110, 107, 58, 102, 105, 110, 100, 40, 34, 32, 34, - 44, 32, 49, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 32, 61, 32, 39, 34, 39, 32, 46, 46, 32, 108, 105, -110, 107, 32, 46, 46, 32, 39, 34, 39, 10, 101, 110, 100, 10, 108, 105, 110, 107, 115, 91, 105, 93, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, - 97, 110, 115, 108, 97, 116, 101, 40, 108, 105, 110, 107, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 108, 105, 110, 107, 115, 32, 61, 32, 112, - 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, -102, 103, 44, 32, 110, 111, 116, 32, 101, 120, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 108, 105, 110, 107, 115, 32, 62, 32, 48, 32, 116, -104, 101, 110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 61, - 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 108, 105, 110, 107, 115, 44, 32, 34, 32, 34, 41, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 69, 120, -116, 101, 114, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 114, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, -101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, -111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 99, 120, 120, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, 32, 99, 102, -103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, - 46, 78, 111, 80, 67, 72, 32, 97, 110, 100, 32, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 116, 97, - 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 39, 45, 45, 117, 115, 101, 95, -112, 99, 104, 61, 34, 36, 40, 73, 110, 116, 68, 105, 114, 41, 47, 36, 40, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 46, 112, 99, 104, - 34, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, -110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 32, 34, 41, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 109, - 97, 103, 101, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 105, 109, 97, 103, 101, 111, 112, 116, -105, 111, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, -105, 111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 105, 109, 97, -103, 101, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, - 44, 32, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, - 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, -114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, - 44, 32, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 41, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, - 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 110, 107, 101, 114, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, - 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 102, 108, 97, 103, 115, 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, - 32, 116, 104, 101, 110, 10, 102, 108, 97, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 116, 111, 111, 108, 115, 101, 116, - 46, 103, 101, 116, 108, 100, 102, 108, 97, 103, 115, 40, 99, 102, 103, 41, 44, 32, 99, 102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, -115, 41, 10, 101, 108, 115, 101, 10, 102, 108, 97, 103, 115, 32, 61, 32, 99, 102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 10, -101, 110, 100, 10, 105, 102, 32, 35, 102, 108, 97, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, -116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, -116, 40, 102, 108, 97, 103, 115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 77, 97, 110, 105, 102, 101, 115, 116, 70, 105, 108, 101, 115, 40, 99, 102, 103, 41, 10, 108, -111, 99, 97, 108, 32, 109, 97, 110, 105, 102, 101, 115, 116, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 105, 44, 32, 102, 110, 97, 109, 101, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 102, 105, 108, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 46, 109, 97, 110, 105, 102, 101, -115, 116, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 109, 97, 110, 105, 102, 101, 115, 116, 115, 44, - 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, - 44, 32, 102, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 109, 97, 110, 105, 102, 101, 115, 116, 115, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 77, 97, 110, 105, 102, 101, 115, 116, - 70, 105, 108, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 109, 97, 110, 105, 102, 101, -115, 116, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, -100, 105, 116, 105, 111, 110, 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, -101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, - 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 44, 32, 99, 102, 103, 46, 114, 101, 115, 105, 110, 99, 108, 117, 100, 101, 100, -105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 100, 105, 114, 115, 32, 61, 32, 118, 115, -116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 100, 105, 114, 115, 41, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, -105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, - 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 79, 112, 116, -105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 32, 62, 32, 48, - 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 115, - 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 114, 101, 115, 111, 112, 116, 105, 111, 110, 115, 44, - 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 115, 115, 101, 109, 98, -108, 121, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, -114, 101, 102, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, -116, 101, 109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 44, 32, 34, 109, 97, 110, 97, 103, 101, 100, 34, 41, 10, 116, 97, 98, -108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 114, 101, 102, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, - 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 65, 115, 115, 101, 109, 98, 108, 121, 82, 101, 102, 101, 114, 101, 110, 99, 101, 39, 41, 10, 112, - 46, 120, 40, 39, 82, 101, 108, 97, 116, 105, 118, 101, 80, 97, 116, 104, 61, 34, 37, 115, 34, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, -110, 115, 108, 97, 116, 101, 40, 118, 97, 108, 117, 101, 41, 41, 10, 112, 46, 112, 111, 112, 40, 39, 47, 62, 39, 41, 10, 101, 110, 100, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 115, 115, 101, 109, 98, 108, 121, 83, 101, 97, 114, 99, 104, 80, 97, 116, -104, 40, 99, 102, 103, 41, 10, 112, 46, 119, 40, 39, 65, 115, 115, 101, 109, 98, 108, 121, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 61, 34, - 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 97, 115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, -104, 101, 99, 107, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, - 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, -101, 99, 102, 103, 10, 97, 110, 100, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, -117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 97, 110, 100, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, 112, 46, 79, 70, 70, 10, 97, -110, 100, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, - 10, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 66, 97, 115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 61, 34, 51, - 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 102, 102, 101, 114, 83, 101, 99, -117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 66, -117, 102, 102, 101, 114, 83, 101, 99, 117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 66, 117, 102, -102, 101, 114, 83, 101, 99, 117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 61, 34, 102, 97, 108, 115, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 99, -102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, -109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, - 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, -116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 112, 46, 120, 40, 39, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, -101, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 109, 100, 115, 44, 32, 34, 92, 114, 92, -110, 34, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, 101, 116, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, - 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 67, 104, 97, 114, 97, 99, 116, 101, 114, 83, 101, 116, 61, 34, 37, 115, 34, - 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 99, 104, 97, 114, 97, 99, 116, 101, 114, 115, 101, 116, 32, 61, 61, 32, 112, 46, 77, 66, 67, - 83, 44, 32, 50, 44, 32, 49, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 108, 101, - 97, 110, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 115, 32, 61, 32, -111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 99, 102, 103, - 46, 99, 108, 101, 97, 110, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, -100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 99, 109, 100, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 109, 100, 115, 44, 32, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 120, - 40, 39, 67, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, 37, 115, 34, 39, 44, 32, 99, 109, 100, 115, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 44, 32, -115, 116, 97, 103, 101, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 115, 116, 97, 103, 101, 58, 108, 111, 119, 101, 114, - 40, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 32, 46, 46, 32, 34, 99, -111, 109, 109, 97, 110, 100, 115, 34, 93, 10, 108, 111, 99, 97, 108, 32, 109, 115, 103, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 32, - 46, 46, 32, 34, 109, 101, 115, 115, 97, 103, 101, 34, 93, 10, 105, 102, 32, 35, 115, 116, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 109, 115, 103, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 61, 34, 37, -115, 34, 39, 44, 32, 109, 115, 103, 41, 10, 101, 110, 100, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, -116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, 114, -111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, -105, 111, 110, 41, 10, 112, 46, 120, 40, 39, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, -108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 114, 92, 110, 34, - 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, 115, 40, - 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, - 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, - 32, 61, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 40, 99, 102, 103, 46, 108, 97, 110, 103, 117, 97, 103, 101, 41, - 10, 108, 111, 99, 97, 108, 32, 99, 111, 109, 112, 105, 108, 101, 65, 115, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 32, 116, 104, 101, 110, 10, 99, 111, 109, 112, 105, -108, 101, 65, 115, 32, 61, 32, 105, 105, 102, 40, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 102, 105, 108, -101, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 41, 44, 32, 50, 44, 32, 49, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 97, -116, 104, 46, 105, 115, 99, 102, 105, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 46, 110, 97, 109, 101, 41, 32, 126, 61, 32, 99, 32, 116, 104, -101, 110, 10, 105, 102, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 46, 110, 97, 109, -101, 41, 32, 116, 104, 101, 110, 10, 99, 111, 109, 112, 105, 108, 101, 65, 115, 32, 61, 32, 105, 105, 102, 40, 99, 44, 32, 50, 44, 32, 49, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 99, 111, -109, 112, 105, 108, 101, 65, 115, 32, 61, 32, 34, 48, 34, 10, 101, 108, 115, 101, 105, 102, 32, 99, 32, 116, 104, 101, 110, 10, 99, 111, 109, 112, -105, 108, 101, 65, 115, 32, 61, 32, 34, 49, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 111, 109, 112, 105, 108, 101, 65, 115, - 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 67, 111, 109, 112, 105, 108, 101, 65, 115, 61, 34, 37, 115, 34, 39, 44, 32, 99, 111, 109, 112, -105, 108, 101, 65, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 105, 115, 97, 98, 108, -101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, -105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 68, 105, 115, - 97, 98, 108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 44, 32, 34, 59, - 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, 115, - 77, 97, 110, 97, 103, 101, 100, 40, 99, 102, 103, 41, 10, 112, 46, 119, 40, 39, 67, 111, 109, 112, 105, 108, 101, 65, 115, 77, 97, 110, 97, 103, -101, 100, 61, 34, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 116, 121, 112, 101, 115, 32, 61, 32, 123, - 10, 77, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 48, 44, 10, 78, 111, 110, 101, 32, 61, 32, 48, 44, 10, 83, 104, 97, 114, 101, 100, 76, -105, 98, 32, 61, 32, 50, 44, 10, 83, 116, 97, 116, 105, 99, 76, 105, 98, 32, 61, 32, 52, 44, 10, 125, 10, 112, 46, 119, 40, 39, 67, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 61, 34, 37, 115, 34, 39, 44, 32, 99, 102, 103, 116, 121, 112, 101, 115, 91, - 99, 102, 103, 46, 107, 105, 110, 100, 93, 32, 111, 114, 32, 49, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, -117, 108, 116, 117, 114, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 118, 115, 116, 117, 100, 105, -111, 46, 99, 117, 108, 116, 117, 114, 101, 70, 111, 114, 76, 111, 99, 97, 108, 101, 40, 99, 102, 103, 46, 108, 111, 99, 97, 108, 101, 41, 10, 105, -102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 67, 117, 108, 116, 117, 114, 101, 61, 34, 37, 100, 34, 39, 44, - 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 117, 115, 116, 111, -109, 66, 117, 105, 108, 100, 84, 111, 111, 108, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, -102, 103, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, -108, 101, 99, 102, 103, 32, 97, 110, 100, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, -105, 108, 100, 82, 117, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 109, 100, 115, - 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, -102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, -108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 112, 46, 120, 40, 39, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, 37, 115, 34, 39, - 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 109, 100, 115, 44, 39, 92, 114, 92, 110, 39, 41, 41, 10, 108, 111, 99, - 97, 108, 32, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, - 40, 102, 105, 108, 101, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, -117, 116, 112, 117, 116, 115, 41, 10, 112, 46, 120, 40, 39, 79, 117, 116, 112, 117, 116, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 117, 116, 112, 117, 116, 115, 44, 32, 39, 59, 39, 41, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, -102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, -100, 105, 110, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 110, 112, 117, 116, 115, 32, 61, 32, -112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 102, 105, 108, 101, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 10, 112, 46, 120, 40, 39, 65, -100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 105, 110, 112, 117, 116, 115, 44, 32, 39, 59, 39, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, -111, 114, 109, 97, 116, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, - 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, - 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 109, 116, 32, - 61, 32, 105, 105, 102, 40, 116, 111, 111, 108, 115, 101, 116, 44, 32, 34, 48, 34, 44, 32, 109, 46, 115, 121, 109, 98, 111, 108, 115, 40, 99, 102, -103, 41, 41, 10, 112, 46, 119, 40, 39, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, 111, 114, 109, 97, 116, 61, - 34, 37, 115, 34, 39, 44, 32, 102, 109, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, -101, 116, 101, 99, 116, 54, 52, 66, 105, 116, 80, 111, 114, 116, 97, 98, 105, 108, 105, 116, 121, 80, 114, 111, 98, 108, 101, 109, 115, 40, 99, 102, -103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 99, 111, 110, 102, 105, -103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 60, 32, 34, 118, -115, 50, 48, 48, 56, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 97, 110, 100, 32, - 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 97, 110, 100, 32, 110, 111, 116, 32, 102, 105, -108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 68, 101, 116, 101, 99, 116, 54, 52, 66, 105, 116, 80, 111, 114, 116, 97, - 98, 105, 108, 105, 116, 121, 80, 114, 111, 98, 108, 101, 109, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 110, -111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 54, 52, 66, 105, 116, 67, 104, 101, 99, 107, 115, 41, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 97, 98, 108, 101, 67, 79, 77, 68, 65, 84, 70, 111, 108, 100, -105, 110, 103, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, -116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, -116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 69, 110, 97, 98, 108, 101, 67, 79, 77, 68, 65, 84, 70, 111, 108, 100, 105, 110, 103, 61, - 34, 50, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 97, 114, 103, 101, 65, 100, -100, 114, 101, 115, 115, 65, 119, 97, 114, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 40, 99, 102, 103, 46, 108, 97, 114, 103, 101, 97, 100, 100, -114, 101, 115, 115, 97, 119, 97, 114, 101, 32, 61, 61, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 76, 97, 114, -103, 101, 65, 100, 100, 114, 101, 115, 115, 65, 119, 97, 114, 101, 61, 34, 50, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, -110, 83, 101, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 83, 83, 69, 32, 61, 32, 34, 49, - 34, 44, 32, 83, 83, 69, 50, 32, 61, 32, 34, 50, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, -112, 91, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, - 32, 97, 110, 100, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 126, 61, 32, 34, 120, 56, 54, 95, 54, 52, - 34, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 69, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, - 99, 116, 105, 111, 110, 83, 101, 116, 61, 34, 37, 100, 34, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 97, 98, 108, 101, 70, 117, 110, 99, 116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, -107, 105, 110, 103, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 99, -111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, - 99, 102, 103, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 69, 110, 97, 98, 108, 101, 70, 117, 110, 99, 116, 105, 111, 110, 76, 101, 118, 101, -108, 76, 105, 110, 107, 105, 110, 103, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 101, 110, 116, 114, 121, 80, 111, 105, 110, 116, 83, 121, 109, 98, 111, 108, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, -101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 101, 110, 116, 114, 121, 112, 111, 105, 110, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, - 69, 110, 116, 114, 121, 80, 111, 105, 110, 116, 83, 121, 109, 98, 111, 108, 61, 34, 37, 115, 34, 39, 44, 32, 99, 102, 103, 46, 101, 110, 116, 114, -121, 112, 111, 105, 110, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 99, 101, 112, -116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, -111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 69, 120, - 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 61, 34, 37, 115, 34, 39, 44, 32, 105, 105, 102, 40, 95, 65, 67, 84, 73, - 79, 78, 32, 60, 32, 34, 118, 115, 50, 48, 48, 53, 34, 44, 32, 34, 70, 65, 76, 83, 69, 34, 44, 32, 48, 41, 41, 10, 101, 108, 115, 101, -105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 34, 83, 69, 72, - 34, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 48, 51, 34, 32, 116, 104, 101, 110, 10, 112, 46, -119, 40, 39, 69, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 61, 34, 50, 34, 39, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 40, -102, 105, 108, 101, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 111, 114, 32, 102, 105, 108, 101, 99, -102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 112, - 46, 119, 40, 39, 69, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, 110, 116, 77, -111, 100, 101, 108, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 83, 116, 114, 105, 99, 116, 32, 61, - 32, 34, 49, 34, 44, 32, 70, 97, 115, 116, 32, 61, 32, 34, 50, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, - 32, 109, 97, 112, 91, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, - 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 70, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, 110, 116, 77, 111, 100, 101, 108, 61, 34, 37, -100, 34, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, -111, 114, 99, 101, 100, 73, 110, 99, 108, 117, 100, 101, 70, 105, 108, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 102, -111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 110, 99, 108, -117, 100, 101, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 102, 111, 114, - 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 41, 10, 112, 46, 119, 40, 39, 70, 111, 114, 99, 101, 100, 73, 110, 99, 108, 117, 100, 101, 70, 105, -108, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 105, 110, 99, 108, 117, 100, 101, 115, - 44, 32, 39, 59, 39, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 102, 111, 114, 99, 101, 117, 115, 105, 110, 103, 115, 32, - 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 117, 115, 105, 110, 103, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, -112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 102, 111, 114, 99, 101, 117, 115, 105, 110, 103, 115, 41, 10, 112, 46, 119, 40, 39, - 70, 111, 114, 99, 101, 100, 85, 115, 105, 110, 103, 70, 105, 108, 101, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 117, 115, 105, 110, 103, 115, 44, 32, 39, 59, 39, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 102, 111, 114, 99, 101, 100, 73, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 41, 10, 112, 46, 119, 40, 39, 70, -111, 114, 99, 101, 100, 73, 110, 99, 108, 117, 100, 101, 115, 61, 34, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 102, 111, 114, 99, 101, 100, 85, 115, 105, 110, 103, 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 40, 99, 102, 103, 41, 10, 112, 46, 119, - 40, 39, 70, 111, 114, 99, 101, 100, 85, 115, 105, 110, 103, 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 61, 34, 34, 39, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 107, 101, 121, 119, 111, 114, 100, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 119, -105, 110, 100, 111, 119, 115, 44, 32, 109, 97, 110, 97, 103, 101, 100, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 10, 102, 111, 114, 32, 99, 102, -103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, -105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 32, 116, 104, 101, 110, 32, -119, 105, 110, 100, 111, 119, 115, 32, 61, 32, 116, 114, 117, 101, 32, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, - 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 32, 109, 97, 110, 97, 103, 101, 100, 32, 61, 32, 116, 114, 117, 101, 32, 101, 110, 100, 10, 105, -102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 32, 109, - 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 116, 114, 117, 101, 32, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 119, 105, 110, 100, 111, 119, -115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 119, 111, 114, 100, 32, 61, 32, 34, 87, 105, 110, 51, 50, 80, 114, 111, -106, 34, 10, 105, 102, 32, 109, 97, 110, 97, 103, 101, 100, 32, 116, 104, 101, 110, 10, 107, 101, 121, 119, 111, 114, 100, 32, 61, 32, 34, 77, 97, -110, 97, 103, 101, 100, 67, 80, 114, 111, 106, 34, 10, 101, 110, 100, 10, 105, 102, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 116, 104, 101, 110, - 10, 107, 101, 121, 119, 111, 114, 100, 32, 61, 32, 34, 77, 97, 107, 101, 70, 105, 108, 101, 80, 114, 111, 106, 34, 10, 101, 110, 100, 10, 112, 46, -119, 40, 39, 75, 101, 121, 119, 111, 114, 100, 61, 34, 37, 115, 34, 39, 44, 32, 107, 101, 121, 119, 111, 114, 100, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, -109, 97, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, -115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 71, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, -109, 97, 116, 105, 111, 110, 61, 34, 37, 115, 34, 39, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 109, 46, 115, 121, 109, 98, 111, 108, 115, - 40, 99, 102, 103, 41, 32, 126, 61, 32, 48, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -103, 101, 110, 101, 114, 97, 116, 101, 77, 97, 110, 105, 102, 101, 115, 116, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, -102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 77, 97, 110, 105, 102, 101, 115, 116, 32, 111, 114, 32, 116, 111, 111, 108, 115, 101, -116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 71, 101, 110, 101, 114, 97, 116, 101, 77, 97, 110, 105, 102, 101, 115, 116, 61, 34, 102, 97, -108, 115, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 103, 110, 111, 114, 101, - 73, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, -102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, 111, 111, -108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 73, 103, 110, 111, 114, 101, 73, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, -114, 121, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, -109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 102, -103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, 111, -111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 109, 112, 108, 105, 98, 100, 105, 114, 32, 61, 32, 99, 102, 103, - 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, 116, 46, 97, 98, 115, 112, 97, 116, 104, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, - 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 32, 116, 104, 101, 110, 10, 105, 109, 112, 108, 105, 98, 100, 105, 114, 32, 61, 32, 112, 97, -116, 104, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, - 40, 105, 109, 112, 108, 105, 98, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 105, 109, 112, 108, 105, 98, 100, 105, 114, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 105, 109, 112, 108, 105, 98, 100, 105, 114, 41, 10, 112, 46, 120, 40, 39, 73, -109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 61, 34, 37, 115, 34, 39, 44, 32, 105, 109, 112, 108, 105, 98, 100, 105, 114, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 110, 99, 108, 117, 100, 101, 83, 101, 97, 114, 99, 104, 80, - 97, 116, 104, 40, 99, 102, 103, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 61, - 34, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, - 68, 105, 114, 101, 99, 116, 111, 114, 121, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 111, 98, 106, 100, 105, 114, 10, 105, 102, 32, 110, -111, 116, 32, 99, 102, 103, 46, 102, 97, 107, 101, 32, 116, 104, 101, 110, 10, 111, 98, 106, 100, 105, 114, 32, 61, 32, 118, 115, 116, 117, 100, 105, -111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 41, 10, 101, 108, 115, 101, 10, 111, 98, 106, -100, 105, 114, 32, 61, 32, 34, 36, 40, 80, 108, 97, 116, 102, 111, 114, 109, 78, 97, 109, 101, 41, 92, 92, 36, 40, 67, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 78, 97, 109, 101, 41, 34, 10, 101, 110, 100, 10, 112, 46, 120, 40, 39, 73, 110, 116, 101, 114, 109, 101, 100, 105, - 97, 116, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, 37, 115, 34, 39, 44, 32, 111, 98, 106, 100, 105, 114, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 40, 99, 102, 103, 44, 32, -116, 111, 111, 108, 115, 101, 116, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, -115, 101, 116, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 99, 97, 110, 76, -105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 40, 99, 102, 103, 41, 32, 44, 32, 50, 44, 32, 49, 41, 10, 101, 108, 115, 101, - 10, 118, 97, 108, 117, 101, 32, 61, 32, 48, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 76, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, -116, 97, 108, 61, 34, 37, 115, 34, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 108, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, -111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 101, 101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, -105, 110, 107, 40, 99, 102, 103, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, -119, 40, 39, 76, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 61, 34, 102, 97, 108, 115, -101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 110, 97, 103, 101, 100, 69, -120, 116, 101, 110, 115, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, 32, 112, 46, 79, - 70, 70, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 77, 97, 110, 97, 103, 101, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 61, 34, - 49, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 105, 110, 105, 109, 97, 108, 82, -101, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, -108, 100, 40, 99, 102, 103, 41, 32, 97, 110, 100, 10, 32, 32, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 32, 126, - 61, 32, 34, 99, 55, 34, 32, 97, 110, 100, 10, 32, 32, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 77, 105, -110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 32, 97, 110, 100, 10, 32, 32, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, 112, - 46, 79, 70, 70, 32, 97, 110, 100, 10, 32, 32, 32, 110, 111, 116, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, 117, 108, 116, 105, 80, -114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 101, 10, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 77, 105, 110, 105, 109, 97, -108, 82, 101, 98, 117, 105, 108, 100, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 109, 111, 100, 117, 108, 101, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 116, -111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, -108, 32, 100, 101, 102, 102, 105, 108, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 102, 105, 110, 100, 102, 105, 108, 101, 40, 99, 102, 103, 44, - 32, 34, 46, 100, 101, 102, 34, 41, 10, 105, 102, 32, 100, 101, 102, 102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 77, 111, -100, 117, 108, 101, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 70, 105, 108, 101, 61, 34, 37, 115, 34, 39, 44, 32, 100, 101, 102, 102, 105, 108, -101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 98, 106, 101, 99, 116, - 70, 105, 108, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 99, -111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 32, - 97, 110, 100, 32, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, 40, 102, 105, 108, 101, 99, 102, 103, 46, 110, 97, 109, 101, 41, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 111, 98, 106, 110, 97, 109, 101, 32, 126, 61, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 102, 105, 108, 101, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 41, 32, 116, 104, -101, 110, 10, 112, 46, 120, 40, 39, 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 61, 34, 36, 40, 73, 110, 116, 68, 105, 114, 41, 92, 92, 37, -115, 46, 111, 98, 106, 34, 39, 44, 32, 102, 105, 108, 101, 99, 102, 103, 46, 111, 98, 106, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 40, - 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, -114, 97, 114, 121, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 78, 97, 109, -101, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 109, -105, 116, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, 114, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 111, 109, 105, 116, -102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 32, 61, 61, 32, 34, 79, 110, 34, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 79, -109, 105, 116, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, 114, 115, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, -111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 79, 102, 102, 61, 48, 44, 32, 79, 110, 61, 51, 44, 32, 68, 101, 98, 117, 103, 61, - 48, 44, 32, 70, 117, 108, 108, 61, 51, 44, 32, 83, 105, 122, 101, 61, 49, 44, 32, 83, 112, 101, 101, 100, 61, 50, 32, 125, 10, 108, 111, 99, - 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, 112, 91, 99, 102, 103, 46, 111, 112, 116, 105, 109, 105, 122, 101, 93, 10, 105, 102, 32, -118, 97, 108, 117, 101, 32, 111, 114, 32, 110, 111, 116, 32, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 112, 46, -119, 40, 39, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 61, 34, 37, 115, 34, 39, 44, 32, 118, 97, 108, 117, 101, 32, 111, 114, 32, - 48, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 112, 116, 105, 109, 105, 122, 101, 82, 101, -102, 101, 114, 101, 110, 99, 101, 115, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, - 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 116, -111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 79, 112, 116, 105, 109, 105, 122, 101, 82, 101, 102, 101, 114, 101, 110, - 99, 101, 115, 61, 34, 50, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 117, 116, -112, 117, 116, 40, 99, 102, 103, 41, 10, 112, 46, 119, 40, 39, 79, 117, 116, 112, 117, 116, 61, 34, 36, 40, 79, 117, 116, 68, 105, 114, 41, 37, -115, 34, 39, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 68, 105, 114, 101, 99, 116, 111, 114, 121, 40, 99, 102, 103, 41, 10, 108, -111, 99, 97, 108, 32, 111, 117, 116, 100, 105, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, -101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, -105, 114, 101, 99, 116, 111, 114, 121, 41, 10, 112, 46, 120, 40, 39, 79, 117, 116, 112, 117, 116, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, - 37, 115, 34, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 111, 117, 116, 100, 105, 114, 41, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 40, 99, 102, 103, 41, 10, 112, 46, 120, - 40, 39, 79, 117, 116, 112, 117, 116, 70, 105, 108, 101, 61, 34, 36, 40, 79, 117, 116, 68, 105, 114, 41, 92, 92, 37, 115, 34, 39, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 70, 105, 108, 101, 78, 97, 109, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 105, -109, 97, 103, 101, 112, 97, 116, 104, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 79, 117, 116, 112, 117, 116, - 70, 105, 108, 101, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 99, -102, 103, 46, 105, 109, 97, 103, 101, 112, 97, 116, 104, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 112, 108, 97, 116, 102, 111, 114, 109, 115, 40, 112, 114, 106, 41, 10, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 32, 61, - 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, -103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 97, -114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 115, 44, 32, 97, 114, - 99, 104, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, -114, 101, 115, 44, 32, 97, 114, 99, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 108, 97, 116, -102, 111, 114, 109, 115, 62, 39, 41, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 97, 114, 99, 104, 105, 116, 101, 99, -116, 117, 114, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 97, 114, 99, 104, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, -108, 97, 116, 102, 111, 114, 109, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 97, 114, 99, 104, 41, - 10, 112, 46, 112, 111, 112, 40, 39, 47, 62, 39, 41, 10, 101, 110, 100, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 108, 97, 116, 102, -111, 114, 109, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, -115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 102, 105, -110, 101, 115, 32, 62, 32, 48, 32, 111, 114, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, -103, 41, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, -105, 111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 102, -105, 110, 101, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, -110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, -102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 117, 110, 100, 101, 102, 105, 110, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, - 46, 120, 40, 39, 85, 110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, -111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 117, 110, 100, 101, -102, 105, 110, 101, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, - 41, 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 80, 114, 111, 103, 114, 97, 109, 68, 97, -116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 61, 34, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 66, 97, 115, 101, 70, 105, 108, 101, 78, 97, 109, 101, 40, 99, 102, 103, 44, 32, -116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 80, 114, -111, 103, 114, 97, 109, 68, 97, 116, 97, 66, 97, 115, 101, 70, 105, 108, 101, 78, 97, 109, 101, 61, 34, 34, 39, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 71, 85, 73, 68, 40, 112, 114, 106, 41, 10, 112, - 46, 119, 40, 39, 80, 114, 111, 106, 101, 99, 116, 71, 85, 73, 68, 61, 34, 123, 37, 115, 125, 34, 39, 44, 32, 112, 114, 106, 46, 117, 117, 105, -100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 78, 97, 109, 101, 40, 112, 114, -106, 41, 10, 112, 46, 120, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, -114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, -110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 35, 100, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -102, 111, 114, 32, 105, 44, 32, 100, 101, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 101, 112, 115, 41, 32, 100, 111, 10, 108, 111, - 99, 97, 108, 32, 114, 101, 108, 112, 97, 116, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 46, 119, -111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 40, 100, 101, -112, 41, 41, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 108, 112, 97, 116, 104, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 46, - 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, 108, 112, 97, 116, 104, 32, 61, 32, 34, 46, 92, 92, 34, 32, 46, 46, 32, 114, 101, 108, 112, 97, -116, 104, 10, 101, 110, 100, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, - 39, 41, 10, 112, 46, 119, 40, 39, 82, 101, 102, 101, 114, 101, 110, 99, 101, 100, 80, 114, 111, 106, 101, 99, 116, 73, 100, 101, 110, 116, 105, 102, -105, 101, 114, 61, 34, 123, 37, 115, 125, 34, 39, 44, 32, 100, 101, 112, 46, 117, 117, 105, 100, 41, 10, 112, 46, 119, 40, 39, 82, 101, 108, 97, -116, 105, 118, 101, 80, 97, 116, 104, 84, 111, 80, 114, 111, 106, 101, 99, 116, 61, 34, 37, 115, 34, 39, 44, 32, 114, 101, 108, 112, 97, 116, 104, - 41, 10, 112, 46, 112, 111, 112, 40, 39, 47, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 40, 112, 114, 106, 41, 10, 112, 46, 119, 40, 39, 80, 114, 111, 106, 101, - 99, 116, 84, 121, 112, 101, 61, 34, 86, 105, 115, 117, 97, 108, 32, 67, 43, 43, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 114, 101, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 41, 10, 99, 111, 109, -109, 97, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 114, 101, 98, 117, 105, 108, 100, - 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 120, 40, 39, 82, 101, 66, 117, 105, 108, 100, 67, 111, -109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, 37, 115, 34, 39, 44, 32, 99, 111, 109, 109, 97, 110, 100, 115, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, -102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 116, 97, 98, 108, -101, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 44, 32, 99, 102, 103, 46, 114, 101, 115, 100, 101, 102, 105, 110, -101, 115, 41, 10, 105, 102, 32, 35, 100, 101, 102, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 80, 114, 101, 112, 114, -111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, - 99, 111, 110, 99, 97, 116, 40, 100, 101, 102, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 114, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 104, - 97, 115, 87, 105, 110, 100, 111, 119, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 104, 97, 115, 67, 111, 110, 102, 105, 103, 40, 112, 114, -106, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 46, 115, 121, 115, 116, -101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 10, 101, 110, 100, 41, 10, 105, 102, 32, 104, 97, 115, 87, 105, 110, 100, 111, -119, 115, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 48, 51, 34, 32, 116, 104, 101, 110, 10, 112, - 46, 120, 40, 39, 82, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 61, 34, 37, 115, 34, 39, 44, 32, 112, 114, 106, 46, 110, 97, 109, -101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 110, 116, 105, 109, 101, 76, 105, 98, -114, 97, 114, 121, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 99, -111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, - 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 117, 110, 116, 105, 109, 101, 115, 32, 61, 32, 123, 10, 83, 116, 97, 116, -105, 99, 82, 101, 108, 101, 97, 115, 101, 32, 61, 32, 48, 44, 10, 83, 116, 97, 116, 105, 99, 68, 101, 98, 117, 103, 32, 61, 32, 49, 44, 10, - 83, 104, 97, 114, 101, 100, 82, 101, 108, 101, 97, 115, 101, 32, 61, 32, 50, 44, 10, 83, 104, 97, 114, 101, 100, 68, 101, 98, 117, 103, 32, 61, - 32, 51, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, -114, 117, 110, 116, 105, 109, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 114, 117, 110, 116, 105, 109, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, - 40, 39, 82, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 61, 34, 37, 115, 34, 39, 44, 32, 114, 117, 110, 116, 105, 109, 101, 115, - 91, 114, 117, 110, 116, 105, 109, 101, 93, 41, 10, 101, 108, 115, 101, 10, 112, 46, 119, 40, 39, 82, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, - 97, 114, 121, 61, 34, 37, 115, 34, 39, 44, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, -108, 100, 40, 99, 102, 103, 41, 44, 32, 51, 44, 32, 50, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 114, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, -102, 103, 46, 114, 116, 116, 105, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 97, 110, 100, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, -112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 82, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 61, - 34, 102, 97, 108, 115, 101, 34, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 114, 116, 116, 105, 32, 61, 61, 32, 112, 46, 79, - 78, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 82, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 61, 34, 116, 114, 117, -101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 116, 114, 105, 110, 103, 80, 111, -111, 108, 105, 110, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, - 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 83, 116, 114, 105, 110, 103, 80, 111, 111, 108, 105, -110, 103, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, -117, 98, 83, 121, 115, 116, 101, 109, 40, 99, 102, 103, 44, 32, 116, 111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, -111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 83, 117, 98, 83, 121, 115, 116, 101, 109, 61, 34, 37, 115, 34, 39, 44, - 32, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 49, - 44, 32, 50, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 69, -110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, -117, 114, 101, 32, 61, 61, 32, 34, 120, 56, 54, 95, 54, 52, 34, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 84, 97, 114, 103, 101, 116, - 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 61, 34, 51, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 40, 112, 114, 106, 41, - 10, 108, 111, 99, 97, 108, 32, 119, 105, 110, 100, 111, 119, 115, 44, 32, 109, 97, 107, 101, 102, 105, 108, 101, 10, 102, 111, 114, 32, 99, 102, 103, - 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, -102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 32, 116, 104, 101, 110, 32, 119, -105, 110, 100, 111, 119, 115, 32, 61, 32, 116, 114, 117, 101, 32, 101, 110, 100, 10, 105, 102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, - 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 32, 109, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 116, 114, 117, -101, 32, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 48, 10, 105, 102, 32, 109, - 97, 107, 101, 102, 105, 108, 101, 32, 111, 114, 32, 110, 111, 116, 32, 119, 105, 110, 100, 111, 119, 115, 32, 116, 104, 101, 110, 10, 118, 101, 114, 115, -105, 111, 110, 32, 61, 32, 49, 57, 54, 54, 49, 51, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, -101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 100, 34, 39, 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 77, 97, 99, 104, 105, 110, 101, 40, 99, 102, 103, 44, 32, 116, -111, 111, 108, 115, 101, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, - 39, 84, 97, 114, 103, 101, 116, 77, 97, 99, 104, 105, 110, 101, 61, 34, 37, 100, 34, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 97, 114, - 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 34, 120, 56, 54, 95, 54, 52, 34, 44, 32, 49, 55, 44, 32, 49, 41, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 111, 111, 108, 70, 105, 108, 101, 115, 40, 112, 114, 106, - 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 48, 51, 34, 32, 116, 104, 101, 110, 10, 112, 46, 119, - 40, 39, 60, 84, 111, 111, 108, 70, 105, 108, 101, 115, 62, 39, 41, 10, 112, 46, 119, 40, 39, 60, 47, 84, 111, 111, 108, 70, 105, 108, 101, 115, - 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 114, 101, 97, 116, 87, 67, 104, 97, -114, 95, 116, 65, 115, 66, 117, 105, 108, 116, 73, 110, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, - 61, 32, 123, 32, 79, 110, 32, 61, 32, 34, 116, 114, 117, 101, 34, 44, 32, 79, 102, 102, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 32, 125, - 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, 112, 91, 99, 102, 103, 46, 110, 97, 116, 105, 118, 101, 119, 99, 104, - 97, 114, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 84, 114, 101, 97, 116, 87, 67, 104, 97, -114, 95, 116, 65, 115, 66, 117, 105, 108, 116, 73, 110, 84, 121, 112, 101, 61, 34, 37, 115, 34, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 79, 102, 77, 70, 67, 40, 99, 102, 103, 41, 10, -105, 102, 32, 40, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, 70, 67, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 85, 115, 101, - 79, 102, 77, 70, 67, 61, 34, 37, 100, 34, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, 114, 117, 110, 116, 105, -109, 101, 32, 61, 61, 32, 34, 79, 110, 34, 44, 32, 49, 44, 32, 50, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 117, 115, 101, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 112, 114, 106, 44, 32, 102, 105, 108, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, -122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 46, 112, 99, 104, 115, -111, 117, 114, 99, 101, 32, 61, 61, 32, 102, 105, 108, 101, 46, 97, 98, 115, 112, 97, 116, 104, 32, 97, 110, 100, 10, 32, 32, 32, 110, 111, 116, - 32, 112, 114, 106, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 97, 110, 100, 10, 32, 32, 32, 112, 114, 106, 46, 115, 121, 115, 116, -101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 10, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 85, 115, 101, 80, 114, 101, - 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 61, 34, 49, 34, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 102, 105, 108, 101, - 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 85, 115, 101, 80, 114, 101, 99, 111, 109, -112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 61, 34, 48, 34, 39, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, 32, 110, 111, -116, 32, 112, 114, 106, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 97, 110, 100, 32, 112, 114, 106, 46, 112, 99, 104, 104, 101, 97, -100, 101, 114, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 85, 115, 101, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, -101, 114, 61, 34, 37, 115, 34, 39, 44, 32, 105, 105, 102, 40, 95, 65, 67, 84, 73, 79, 78, 32, 60, 32, 34, 118, 115, 50, 48, 48, 53, 34, - 44, 32, 51, 44, 32, 50, 41, 41, 10, 112, 46, 120, 40, 39, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 84, -104, 114, 111, 117, 103, 104, 61, 34, 37, 115, 34, 39, 44, 32, 112, 114, 106, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 41, 10, 101, 108, 115, -101, 10, 112, 46, 119, 40, 39, 85, 115, 101, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 61, 34, 37, 115, 34, - 39, 44, 32, 105, 105, 102, 40, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 48, 51, 34, 32, 111, 114, 32, 112, 114, 106, - 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 44, 32, 48, 44, 32, 50, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 118, 101, 114, 115, 105, 111, 110, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 109, - 97, 112, 32, 61, 32, 123, 10, 118, 115, 50, 48, 48, 50, 32, 61, 32, 39, 55, 46, 48, 39, 44, 10, 118, 115, 50, 48, 48, 51, 32, 61, 32, - 39, 55, 46, 49, 39, 44, 10, 118, 115, 50, 48, 48, 53, 32, 61, 32, 39, 56, 46, 48, 39, 44, 10, 118, 115, 50, 48, 48, 56, 32, 61, 32, - 39, 57, 46, 48, 39, 10, 125, 10, 112, 46, 119, 40, 39, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 48, 34, 39, 44, 32, 109, 97, 112, - 91, 95, 65, 67, 84, 73, 79, 78, 93, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 97, 114, 110, 65, 115, - 69, 114, 114, 111, 114, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 70, 97, 116, 97, 108, 67, 111, 109, -112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 32, 97, 110, 100, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 126, 61, - 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 87, 97, 114, 110, 65, 115, 69, 114, 114, 111, 114, 61, 34, 116, 114, -117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 97, 114, 110, 105, 110, 103, - 76, 101, 118, 101, 108, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, - 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 108, -101, 118, 101, 108, 10, 105, 102, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, -101, 110, 10, 108, 101, 118, 101, 108, 32, 61, 32, 34, 48, 34, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, -103, 115, 32, 61, 61, 32, 34, 69, 120, 116, 114, 97, 34, 32, 116, 104, 101, 110, 10, 108, 101, 118, 101, 108, 32, 61, 32, 34, 52, 34, 10, 101, -108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 101, 118, 101, 108, 32, 61, 32, 34, - 51, 34, 10, 101, 110, 100, 10, 105, 102, 32, 108, 101, 118, 101, 108, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 87, 97, 114, 110, 105, 110, -103, 76, 101, 118, 101, 108, 61, 34, 37, 115, 34, 39, 44, 32, 108, 101, 118, 101, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 119, 104, 111, 108, 101, 80, 114, 111, 103, 114, 97, 109, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 76, 105, 110, 107, 84, 105, 109, 101, 79, 112, 116, 105, 109, -105, 122, 97, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 87, 104, 111, 108, 101, 80, 114, 111, 103, 114, 97, 109, 79, 112, -116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 120, 109, 108, 69, 108, 101, 109, 101, 110, 116, 40, 41, 10, 112, 46, 119, 40, 39, 60, 63, 120, 109, 108, 32, 118, -101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 87, 105, 110, 100, 111, 119, 115, 45, 49, - 50, 53, 50, 34, 63, 62, 39, 41, 10, 101, 110, 100, 10, }; - -// vstudio/vs200x_vcproj_user.lua -static const unsigned char builtin_script_94[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, -116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 48, 120, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 100, 101, 98, 117, 103, 83, 101, 116, -116, 105, 110, 103, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, - 85, 115, 101, 114, 40, 112, 114, 106, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 92, 116, 34, 41, 10, 108, 111, 99, 97, 108, 32, 99, -111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 105, 122, 101, 32, 61, 32, 48, 10, 102, 111, 114, 32, - 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, - 32, 100, 111, 10, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, -110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 52, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 44, 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 52, 41, 10, 101, 110, -100, 41, 10, 115, 105, 122, 101, 32, 61, 32, 115, 105, 122, 101, 32, 43, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 10, -101, 110, 100, 10, 105, 102, 32, 115, 105, 122, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 120, 109, 108, 69, 108, 101, 109, 101, 110, -116, 40, 41, 10, 109, 46, 118, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 85, 115, 101, 114, 70, 105, 108, 101, 40, 41, 10, 112, 46, 112, -117, 115, 104, 40, 39, 60, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 62, 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, -105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, -109, 46, 117, 115, 101, 114, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 112, 46, 112, 117, 115, 104, 40, - 39, 60, 68, 101, 98, 117, 103, 83, 101, 116, 116, 105, 110, 103, 115, 39, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, -102, 103, 93, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, -103, 93, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 111, 110, -102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 111, 110, 102, 105, -103, 117, 114, 97, 116, 105, 111, 110, 115, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, -105, 111, 85, 115, 101, 114, 70, 105, 108, 101, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 118, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 85, 115, 101, 114, 70, 105, 108, 101, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, - 60, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 85, 115, 101, 114, 70, 105, 108, 101, 39, 41, 10, 112, 46, 119, 40, 39, 80, 114, 111, -106, 101, 99, 116, 84, 121, 112, 101, 61, 34, 86, 105, 115, 117, 97, 108, 32, 67, 43, 43, 34, 39, 41, 10, 109, 46, 118, 101, 114, 115, 105, 111, -110, 40, 41, 10, 112, 46, 119, 40, 39, 83, 104, 111, 119, 65, 108, 108, 70, 105, 108, 101, 115, 61, 34, 102, 97, 108, 115, 101, 34, 39, 41, 10, -112, 46, 119, 40, 39, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 114, 67, 111, 110, 102, -105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 111, 110, 102, 105, 103, 117, 114, - 97, 116, 105, 111, 110, 39, 41, 10, 112, 46, 120, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 112, 46, 118, 115, 116, 117, 100, -105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 41, 10, 112, 46, 119, 40, 39, 62, 39, 41, 10, -101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 100, 101, 98, 117, 103, 83, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 100, 101, 98, 117, 103, 67, 111, 109, -109, 97, 110, 100, 44, 10, 109, 46, 100, 101, 98, 117, 103, 68, 105, 114, 44, 10, 109, 46, 100, 101, 98, 117, 103, 65, 114, 103, 115, 44, 10, 109, - 46, 100, 101, 98, 117, 103, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 100, 101, 98, 117, 103, 83, 101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, - 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 100, 101, 98, 117, 103, 83, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 65, 114, 103, 115, 40, 99, 102, 103, 41, 10, -105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, - 67, 111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 61, 34, 37, 115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 67, 111, 109, 109, 97, 110, 100, 40, 99, 102, 103, 41, 10, 105, -102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 109, 109, 97, 110, 100, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 67, 111, 109, -109, 97, 110, 100, 61, 34, 37, 115, 34, 39, 44, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, - 99, 102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 109, 109, 97, 110, 100, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 68, 105, 114, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, -100, 105, 114, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 61, 34, - 37, 115, 34, 39, 44, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 100, 101, - 98, 117, 103, 100, 105, 114, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, -103, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 101, -110, 118, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 61, 34, 37, -115, 34, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 101, 110, 118, 115, 44, - 32, 34, 92, 110, 34, 41, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 68, 101, 98, 117, 103, 69, 110, 118, 115, 68, 111, -110, 116, 77, 101, 114, 103, 101, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 77, 101, 114, -103, 101, 61, 34, 102, 97, 108, 115, 101, 34, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/vs2005_solution.lua -static const unsigned char builtin_script_95[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 115, 108, 110, 50, - 48, 48, 53, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, -105, 111, 10, 108, 111, 99, 97, 108, 32, 115, 108, 110, 50, 48, 48, 53, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 115, 108, 110, - 50, 48, 48, 53, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, -111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, 115, 108, 110, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, -110, 116, 115, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 115, 111, 108, 117, 116, 105, -111, 110, 83, 101, 99, 116, 105, 111, 110, 115, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 34, 67, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 34, 44, 10, 34, 83, 111, 108, 117, 116, 105, 111, 110, 80, 114, 111, 112, -101, 114, 116, 105, 101, 115, 34, 44, 10, 34, 78, 101, 115, 116, 101, 100, 80, 114, 111, 106, 101, 99, 116, 115, 34, 44, 10, 34, 69, 120, 116, 101, -110, 115, 105, 98, 105, 108, 105, 116, 121, 71, 108, 111, 98, 97, 108, 115, 34, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 115, 108, 110, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 119, 107, 115, 41, 10, 112, 46, 117, 116, 102, 56, 40, 41, 10, -112, 46, 111, 117, 116, 108, 110, 40, 39, 39, 41, 10, 115, 108, 110, 50, 48, 48, 53, 46, 114, 101, 111, 114, 100, 101, 114, 80, 114, 111, 106, 101, - 99, 116, 115, 40, 119, 107, 115, 41, 10, 115, 108, 110, 50, 48, 48, 53, 46, 104, 101, 97, 100, 101, 114, 40, 41, 10, 115, 108, 110, 50, 48, 48, - 53, 46, 112, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, 108, 111, 98, 97, 108, 39, 41, - 10, 115, 108, 110, 50, 48, 48, 53, 46, 115, 101, 99, 116, 105, 111, 110, 115, 40, 119, 107, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, -100, 71, 108, 111, 98, 97, 108, 39, 41, 10, 112, 46, 119, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, - 50, 48, 48, 53, 46, 104, 101, 97, 100, 101, 114, 40, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, - 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 112, 46, 119, 40, 39, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, -105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 83, 111, 108, 117, 116, 105, 111, 110, 32, 70, 105, 108, 101, 44, 32, 70, 111, 114, 109, - 97, 116, 32, 86, 101, 114, 115, 105, 111, 110, 32, 37, 100, 46, 48, 48, 39, 44, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, -111, 46, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 41, 10, 112, 46, 119, 40, 39, 35, 32, 86, 105, 115, 117, 97, 108, - 32, 83, 116, 117, 100, 105, 111, 32, 37, 115, 39, 44, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 101, 114, 115, -105, 111, 110, 78, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 114, 101, -111, 114, 100, 101, 114, 80, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 105, 102, 32, 119, 107, 115, 46, 115, 116, 97, 114, 116, 112, -114, 111, 106, 101, 99, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 110, 112, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, -112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, -116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 110, 41, 10, 105, 102, 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 46, 110, 97, 109, 101, 32, 61, 61, 32, 119, 107, 115, 46, 115, 116, 97, -114, 116, 112, 114, 111, 106, 101, 99, 116, 32, 116, 104, 101, 110, 10, 110, 112, 32, 61, 32, 110, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, - 10, 119, 104, 105, 108, 101, 32, 110, 112, 32, 97, 110, 100, 32, 110, 112, 46, 112, 97, 114, 101, 110, 116, 32, 100, 111, 10, 108, 111, 99, 97, 108, - 32, 112, 32, 61, 32, 110, 112, 46, 112, 97, 114, 101, 110, 116, 10, 108, 111, 99, 97, 108, 32, 105, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, -110, 100, 101, 120, 111, 102, 40, 112, 46, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 110, 112, 41, 10, 116, 97, 98, 108, 101, 46, 114, 101, 109, -111, 118, 101, 40, 112, 46, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 105, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -112, 46, 99, 104, 105, 108, 100, 114, 101, 110, 44, 32, 49, 44, 32, 110, 112, 41, 10, 110, 112, 32, 61, 32, 112, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 98, 117, 105, 108, 100, 82, 101, 108, 97, -116, 105, 118, 101, 80, 97, 116, 104, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 112, 97, 116, 104, 32, 61, 32, 118, 115, -116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 40, 112, 114, 106, 41, 10, 112, 114, 106, 112, 97, 116, 104, 32, 61, - 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 112, 114, 106, -112, 97, 116, 104, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 112, 97, 116, 104, 58, 103, 115, 117, 98, 40, 34, 36, 37, 40, 40, 46, - 45, 41, 37, 41, 34, 44, 32, 34, 37, 37, 37, 49, 37, 37, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, -110, 50, 48, 48, 53, 46, 112, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, - 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, -114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, -110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 10, 112, 46, 120, 40, 39, 80, 114, -111, 106, 101, 99, 116, 40, 34, 123, 37, 115, 125, 34, 41, 32, 61, 32, 34, 37, 115, 34, 44, 32, 34, 37, 115, 34, 44, 32, 34, 123, 37, 115, -125, 34, 39, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, 40, 112, 114, 106, 41, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, - 44, 32, 115, 108, 110, 50, 48, 48, 53, 46, 98, 117, 105, 108, 100, 82, 101, 108, 97, 116, 105, 118, 101, 80, 97, 116, 104, 40, 112, 114, 106, 41, - 44, 32, 112, 114, 106, 46, 117, 117, 105, 100, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 115, 108, 110, 50, 48, 48, 53, 46, 112, 114, 111, -106, 101, 99, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, 100, - 80, 114, 111, 106, 101, 99, 116, 39, 41, 10, 101, 110, 100, 44, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 110, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 80, 114, 111, 106, 101, 99, 116, 40, 34, 123, 50, 49, 53, 48, 69, 51, 51, 51, - 45, 56, 70, 68, 67, 45, 52, 50, 65, 51, 45, 57, 52, 55, 52, 45, 49, 65, 51, 57, 53, 54, 68, 52, 54, 68, 69, 56, 125, 34, 41, 32, - 61, 32, 34, 37, 115, 34, 44, 32, 34, 37, 115, 34, 44, 32, 34, 123, 37, 115, 125, 34, 39, 44, 32, 110, 46, 110, 97, 109, 101, 44, 32, 110, - 46, 110, 97, 109, 101, 44, 32, 110, 46, 117, 117, 105, 100, 41, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, 100, 80, 114, 111, 106, 101, 99, 116, - 39, 41, 10, 101, 110, 100, 44, 10, 125, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, -112, 114, 111, 106, 101, 99, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 100, -101, 112, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, -106, 44, 32, 39, 100, 101, 112, 101, 110, 100, 79, 110, 108, 121, 39, 41, 10, 105, 102, 32, 35, 100, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 80, 114, 111, 106, 101, 99, 116, 83, 101, 99, 116, 105, 111, 110, 40, 80, 114, 111, 106, 101, 99, -116, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 32, 61, 32, 112, 111, 115, 116, 80, 114, 111, 106, 101, 99, 116, 39, 41, 10, 102, -111, 114, 32, 95, 44, 32, 100, 101, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 101, 112, 115, 41, 32, 100, 111, 10, 112, 46, 119, - 40, 39, 123, 37, 115, 125, 32, 61, 32, 123, 37, 115, 125, 39, 44, 32, 100, 101, 112, 46, 117, 117, 105, 100, 44, 32, 100, 101, 112, 46, 117, 117, -105, 100, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, 100, 80, 114, 111, 106, 101, 99, 116, 83, 101, 99, 116, 105, 111, 110, - 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 115, 104, 97, 114, -101, 100, 80, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, - 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, - 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 112, 46, 116, -114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 110, 46, 112, 114, 111, 106, 101, 99, 116, 10, 105, 102, - 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, -112, 46, 119, 40, 39, 37, 115, 42, 123, 37, 115, 125, 42, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 73, 109, 112, 111, 114, 116, 115, 32, - 61, 32, 37, 115, 39, 44, 32, 115, 108, 110, 50, 48, 48, 53, 46, 98, 117, 105, 108, 100, 82, 101, 108, 97, 116, 105, 118, 101, 80, 97, 116, 104, - 40, 112, 114, 106, 41, 44, 32, 112, 114, 106, 46, 117, 117, 105, 100, 58, 108, 111, 119, 101, 114, 40, 41, 44, 32, 34, 57, 34, 41, 10, 101, 108, -115, 101, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, -101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 44, 32, 39, 108, 105, 110, 107, 79, 110, 108, 121, 39, 41, 10, 102, 111, 114, 32, 95, - 44, 32, 100, 101, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 101, 112, 115, 41, 32, 100, 111, 10, 105, 102, 32, 100, 101, 112, 46, -107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, - 37, 115, 42, 123, 37, 115, 125, 42, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 73, 109, 112, 111, 114, 116, 115, 32, 61, 32, 37, 115, 39, - 44, 32, 115, 108, 110, 50, 48, 48, 53, 46, 98, 117, 105, 108, 100, 82, 101, 108, 97, 116, 105, 118, 101, 80, 97, 116, 104, 40, 100, 101, 112, 41, - 44, 32, 112, 114, 106, 46, 117, 117, 105, 100, 58, 108, 111, 119, 101, 114, 40, 41, 44, 32, 34, 52, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 44, 10, 125, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, - 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 83, 104, - 97, 114, 101, 100, 77, 83, 66, 117, 105, 108, 100, 80, 114, 111, 106, 101, 99, 116, 70, 105, 108, 101, 115, 41, 32, 61, 32, 112, 114, 101, 83, 111, -108, 117, 116, 105, 111, 110, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, - 40, 39, 69, 110, 100, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 115, 108, 110, - 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 116, -101, 120, 116, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 115, 108, 110, 50, 48, 48, 53, 46, 97, 99, 116, 105, 118, 101, 67, 102, 103, 44, - 10, 115, 108, 110, 50, 48, 48, 53, 46, 98, 117, 105, 108, 100, 48, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -115, 108, 110, 50, 48, 48, 53, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, -102, 111, 114, 109, 115, 40, 119, 107, 115, 44, 32, 115, 111, 114, 116, 101, 100, 44, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 41, 10, -112, 46, 119, 40, 34, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 80, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 41, 32, 61, 32, 112, 111, 115, 116, 83, 111, 108, 117, 116, 105, 111, 110, - 34, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, -114, 101, 101, 40, 119, 107, 115, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, -101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 32, 61, 32, 110, 46, -112, 114, 111, 106, 101, 99, 116, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, - 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, - 99, 104, 105, 40, 115, 111, 114, 116, 101, 100, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, - 99, 111, 110, 116, 101, 120, 116, 32, 61, 32, 123, 125, 10, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 32, 61, 32, 112, 114, 106, 10, 99, -111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 67, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 99, 111, 110, 102, 105, -103, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, -109, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 99, 108, 117, 100, 101, 100, 32, 61, 32, 40, 99, 111, 110, 116, 101, 120, 116, 46, 112, -114, 106, 67, 102, 103, 32, 61, 61, 32, 110, 105, 108, 32, 111, 114, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 67, 102, 103, 46, 102, -108, 97, 103, 115, 46, 69, 120, 99, 108, 117, 100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 41, 10, 105, 102, 32, 99, 111, 110, 116, 101, 120, -116, 46, 112, 114, 106, 67, 102, 103, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, - 67, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 102, 105, 110, 100, 67, 108, 111, 115, 101, 115, 116, 77, 97, 116, 99, 104, 40, 112, -114, 106, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 102, 103, 44, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, -101, 110, 100, 10, 99, 111, 110, 116, 101, 120, 116, 46, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 32, 61, 32, 100, 101, 115, 99, 114, 105, 112, -116, 111, 114, 115, 91, 99, 102, 103, 93, 10, 99, 111, 110, 116, 101, 120, 116, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, - 67, 102, 103, 41, 10, 99, 111, 110, 116, 101, 120, 116, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 32, 118, 115, 116, 117, -100, 105, 111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 67, 102, -103, 44, 32, 116, 114, 117, 101, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 115, 108, -110, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, -105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, 116, 101, 120, 116, 41, 10, 112, 46, 112, 111, -112, 40, 41, 10, 101, 110, 100, 41, 10, 101, 110, 100, 10, 125, 41, 10, 112, 46, 119, 40, 34, 69, 110, 100, 71, 108, 111, 98, 97, 108, 83, 101, - 99, 116, 105, 111, 110, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 97, 99, 116, -105, 118, 101, 67, 102, 103, 40, 99, 102, 103, 44, 32, 99, 111, 110, 116, 101, 120, 116, 41, 10, 112, 46, 119, 40, 39, 123, 37, 115, 125, 46, 37, -115, 46, 65, 99, 116, 105, 118, 101, 67, 102, 103, 32, 61, 32, 37, 115, 124, 37, 115, 39, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, -106, 46, 117, 117, 105, 100, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 44, 32, 99, 111, 110, 116, -101, 120, 116, 46, 112, 108, 97, 116, 102, 111, 114, 109, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, -114, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 98, 117, 105, 108, 100, 48, 40, - 99, 102, 103, 44, 32, 99, 111, 110, 116, 101, 120, 116, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 99, -108, 117, 100, 101, 100, 32, 97, 110, 100, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 67, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, - 32, 112, 46, 78, 79, 78, 69, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 123, 37, 115, 125, 46, 37, 115, 46, 66, 117, 105, 108, 100, 46, - 48, 32, 61, 32, 37, 115, 124, 37, 115, 39, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 114, 106, 46, 117, 117, 105, 100, 44, 32, 99, 111, -110, 116, 101, 120, 116, 46, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 112, 108, 97, 116, 102, 111, -114, 109, 44, 32, 99, 111, 110, 116, 101, 120, 116, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, - 80, 108, 97, 116, 102, 111, 114, 109, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, - 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 111, 114, 116, 101, 100, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, -105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 119, 107, 115, 41, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 115, 111, 108, 117, 116, -105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 10, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, - 93, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 115, 124, 37, 115, 34, 44, 32, 99, 102, 103, 46, 98, -117, 105, 108, 100, 99, 102, 103, 44, 32, 112, 108, 97, 116, 102, 111, 114, 109, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -115, 111, 114, 116, 101, 100, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 115, 111, 114, 116, -101, 100, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 48, 44, 32, 99, 102, 103, 49, 41, 10, 114, 101, 116, 117, 114, 110, 32, -100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, 48, 93, 58, 108, 111, 119, 101, 114, 40, 41, 32, 60, 32, 100, 101, 115, 99, -114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, 49, 93, 58, 108, 111, 119, 101, 114, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 119, 107, -115, 46, 100, 101, 102, 97, 117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, -108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 83, 111, 108, 117, 116, 105, 111, 110, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, -111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 41, 32, 61, 32, 112, 114, 101, 83, 111, 108, 117, 116, 105, 111, 110, 39, 41, 10, 116, 97, 98, -108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 115, 111, 114, 116, 101, 100, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, -103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, 61, 61, 32, 119, 107, 115, 46, 100, 101, 102, 97, 117, 108, -116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 37, 115, 32, 61, 32, 37, 115, 39, 44, 32, 100, 101, -115, 99, 114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, 93, 44, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, 93, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 46, 112, 111, 112, 40, 34, 69, 110, 100, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, -111, 110, 34, 41, 10, 101, 110, 100, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 83, -111, 108, 117, 116, 105, 111, 110, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 41, 32, 61, - 32, 112, 114, 101, 83, 111, 108, 117, 116, 105, 111, 110, 39, 41, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 115, 111, -114, 116, 101, 100, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 119, 107, 115, 46, -100, 101, 102, 97, 117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 111, 114, 32, 99, 102, 103, 46, 112, 108, 97, 116, 102, 111, 114, 109, 32, -126, 61, 32, 119, 107, 115, 46, 100, 101, 102, 97, 117, 108, 116, 112, 108, 97, 116, 102, 111, 114, 109, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, - 39, 37, 115, 32, 61, 32, 37, 115, 39, 44, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, 93, 44, 32, 100, 101, 115, - 99, 114, 105, 112, 116, 111, 114, 115, 91, 99, 102, 103, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 46, 112, 111, 112, 40, 34, 69, -110, 100, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 34, 41, 10, 115, 108, 110, 50, 48, 48, 53, 46, 112, 114, 111, 106, 101, 99, -116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 40, 119, 107, 115, 44, 32, 115, 111, 114, -116, 101, 100, 44, 32, 100, 101, 115, 99, 114, 105, 112, 116, 111, 114, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, -108, 110, 50, 48, 48, 53, 46, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 119, 107, 115, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, -108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 83, 111, 108, 117, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 41, - 32, 61, 32, 112, 114, 101, 83, 111, 108, 117, 116, 105, 111, 110, 39, 41, 10, 112, 46, 119, 40, 39, 72, 105, 100, 101, 83, 111, 108, 117, 116, 105, -111, 110, 78, 111, 100, 101, 32, 61, 32, 70, 65, 76, 83, 69, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, 100, 71, 108, 111, 98, 97, -108, 83, 101, 99, 116, 105, 111, 110, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, -110, 101, 115, 116, 101, 100, 80, 114, 111, 106, 101, 99, 116, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, - 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 103, 114, 111, 117, 112, 116, 114, 101, 101, 40, 119, 107, 115, 41, 10, 105, 102, 32, 116, 114, 101, -101, 46, 104, 97, 115, 98, 114, 97, 110, 99, 104, 101, 115, 40, 116, 114, 41, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, -108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 78, 101, 115, 116, 101, 100, 80, 114, 111, 106, 101, 99, 116, 115, 41, 32, 61, 32, 112, -114, 101, 83, 111, 108, 117, 116, 105, 111, 110, 39, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, - 10, 111, 110, 110, 111, 100, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 41, 10, 105, 102, 32, 110, 46, 112, 97, 114, 101, 110, -116, 46, 117, 117, 105, 100, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 123, 37, 115, 125, 32, 61, 32, 123, 37, 115, 125, 39, 44, 32, 40, -110, 46, 112, 114, 111, 106, 101, 99, 116, 32, 111, 114, 32, 110, 41, 46, 117, 117, 105, 100, 44, 32, 110, 46, 112, 97, 114, 101, 110, 116, 46, 117, -117, 105, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 125, 41, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, 100, 71, 108, 111, 98, 97, 108, - 83, 101, 99, 116, 105, 111, 110, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, - 48, 53, 46, 112, 114, 101, 109, 97, 107, 101, 69, 120, 116, 101, 110, 115, 105, 98, 105, 108, 105, 116, 121, 71, 108, 111, 98, 97, 108, 115, 40, 119, -107, 115, 41, 10, 105, 102, 32, 119, 107, 115, 46, 101, 100, 105, 116, 111, 114, 105, 110, 116, 101, 103, 114, 97, 116, 105, 111, 110, 32, 116, 104, 101, -110, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 97, 114, 103, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 95, 65, 82, 71, 86, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 40, 97, 114, 103, 58, 115, 116, 97, -114, 116, 115, 119, 105, 116, 104, 40, 34, 45, 45, 102, 105, 108, 101, 34, 41, 32, 111, 114, 32, 97, 114, 103, 58, 115, 116, 97, 114, 116, 115, 119, -105, 116, 104, 40, 34, 47, 102, 105, 108, 101, 34, 41, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, - 97, 114, 103, 115, 44, 32, 97, 114, 103, 41, 59, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 80, 114, 101, 109, 97, 107, 101, - 66, 105, 110, 97, 114, 121, 32, 61, 32, 37, 115, 39, 44, 32, 95, 80, 82, 69, 77, 65, 75, 69, 95, 67, 79, 77, 77, 65, 78, 68, 41, 10, -112, 46, 119, 40, 39, 80, 114, 101, 109, 97, 107, 101, 83, 99, 114, 105, 112, 116, 32, 61, 32, 37, 115, 39, 44, 32, 112, 46, 119, 111, 114, 107, -115, 112, 97, 99, 101, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 119, 107, 115, 44, 32, 95, 77, 65, 73, 78, 95, 83, 67, 82, - 73, 80, 84, 41, 41, 10, 112, 46, 119, 40, 39, 80, 114, 101, 109, 97, 107, 101, 65, 114, 103, 117, 109, 101, 110, 116, 115, 32, 61, 32, 37, 115, - 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 97, 114, 103, 115, 44, 32, 39, 32, 39, 41, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 115, 108, 110, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 101, 120, 116, 101, 110, 115, 105, 98, 105, 108, 105, -116, 121, 71, 108, 111, 98, 97, 108, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 115, 108, 110, 50, 48, 48, 53, 46, 112, 114, 101, 109, 97, 107, 101, 69, 120, 116, 101, 110, 115, 105, 98, 105, 108, 105, 116, 121, 71, -108, 111, 98, 97, 108, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, 46, 101, -120, 116, 101, 110, 115, 105, 98, 105, 108, 105, 116, 121, 71, 108, 111, 98, 97, 108, 115, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 99, -111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, -112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 115, 108, 110, 50, 48, 48, 53, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 101, 120, 116, 101, 110, 115, 105, 98, 105, 108, 105, 116, 121, 71, 108, 111, 98, 97, 108, 115, 44, 32, 119, 107, 115, 41, - 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, -104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 71, 108, 111, 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 40, 69, 120, 116, 101, 110, 115, -105, 98, 105, 108, 105, 116, 121, 71, 108, 111, 98, 97, 108, 115, 41, 32, 61, 32, 112, 111, 115, 116, 83, 111, 108, 117, 116, 105, 111, 110, 39, 41, - 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 69, 110, 100, 71, 108, 111, - 98, 97, 108, 83, 101, 99, 116, 105, 111, 110, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 115, 108, 110, 50, 48, 48, 53, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 115, 101, 99, 116, 105, 111, 110, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 114, -101, 116, 117, 114, 110, 32, 123, 10, 115, 108, 110, 50, 48, 48, 53, 46, 115, 104, 97, 114, 101, 100, 80, 114, 111, 106, 101, 99, 116, 115, 44, 10, -115, 108, 110, 50, 48, 48, 53, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 108, 97, 116, 102, 111, 114, 109, 115, 44, 10, -115, 108, 110, 50, 48, 48, 53, 46, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 115, 108, 110, 50, 48, 48, 53, 46, 110, 101, 115, 116, -101, 100, 80, 114, 111, 106, 101, 99, 116, 115, 44, 10, 115, 108, 110, 50, 48, 48, 53, 46, 101, 120, 116, 101, 110, 115, 105, 98, 105, 108, 105, 116, -121, 71, 108, 111, 98, 97, 108, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 108, 110, 50, 48, 48, 53, - 46, 115, 101, 99, 116, 105, 111, 110, 115, 40, 119, 107, 115, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 115, 108, 110, 50, 48, - 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 115, 101, 99, 116, 105, 111, 110, 115, 44, 32, 119, 107, 115, 41, 10, 101, 110, 100, 10, }; - -// vstudio/vs2005_dotnetbase.lua -static const unsigned char builtin_script_96[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, -116, 117, 100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 32, 32, 61, 32, 112, 46, 118, 115, 116, 117, -100, 105, 111, 46, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, - 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, - 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, - 10, 108, 111, 99, 97, 108, 32, 100, 111, 116, 110, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, 101, 116, 10, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 100, 111, 116, 110, 101, 116, 98, 97, -115, 101, 46, 108, 97, 110, 103, 79, 98, 106, 32, 61, 32, 123, 125, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 110, 101, 116, 99, 111, -114, 101, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 101, 112, - 97, 114, 101, 40, 108, 97, 110, 103, 79, 98, 106, 41, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 108, 97, 110, 103, 79, 98, 106, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, -101, 99, 116, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 80, -114, 111, 112, 101, 114, 116, 105, 101, 115, 32, 61, 32, 108, 97, 110, 103, 79, 98, 106, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, -106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 108, 97, 110, 103, 79, 98, 106, 46, 101, 108, 101, 109, 101, -110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 108, 97, 110, -103, 79, 98, 106, 32, 61, 32, 108, 97, 110, 103, 79, 98, 106, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 117, 116, 102, 56, 40, 41, 10, 112, 46, - 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, -111, 106, 101, 99, 116, 44, 32, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 102, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 73, 116, -101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 82, 101, 102, -101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 97, 99, 107, 97, 103, 101, 82, -101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 108, 97, 110, 103, 79, 98, -106, 46, 116, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 98, 117, 105, 108, 100, 69, -118, 101, 110, 116, 115, 40, 112, 114, 106, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 69, 108, -101, 109, 101, 110, 116, 40, 112, 114, 106, 41, 10, 105, 102, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, -114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 46, 102, 108, 97, -103, 115, 46, 87, 80, 70, 32, 116, 104, 101, 110, 10, 95, 112, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 83, 100, 107, 61, 34, 77, 105, - 99, 114, 111, 115, 111, 102, 116, 46, 78, 69, 84, 46, 83, 100, 107, 46, 87, 105, 110, 100, 111, 119, 115, 68, 101, 115, 107, 116, 111, 112, 34, 62, - 39, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 83, 100, 107, 61, 34, 77, 105, 99, 114, 111, 115, -111, 102, 116, 46, 78, 69, 84, 46, 83, 100, 107, 34, 62, 39, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 118, -101, 114, 32, 61, 32, 39, 39, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, - 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, -115, 86, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 118, 101, 114, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, -116, 40, 39, 32, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 34, 39, 44, 32, 97, 99, 116, 105, 111, 110, 46, 118, -115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 95, 112, 40, 39, 60, 80, 114, -111, 106, 101, 99, 116, 37, 115, 32, 68, 101, 102, 97, 117, 108, 116, 84, 97, 114, 103, 101, 116, 115, 61, 34, 66, 117, 105, 108, 100, 34, 32, 120, -109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, -111, 109, 47, 100, 101, 118, 101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, 105, 108, 100, 47, 50, 48, 48, 51, 34, 62, 39, 44, 32, 118, 101, -114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, -114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 39, 60, 80, 114, 111, -112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, -116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, -121, 40, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 80, 114, 111, -112, 101, 114, 116, 105, 101, 115, 44, 32, 99, 102, 103, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, -111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, -111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, -111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, - 40, 99, 102, 103, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 44, 32, 99, 102, 103, 41, 10, 95, 112, 40, 49, 44, 39, - 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 100, 111, 102, 105, 108, 101, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, -105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, 101, 99, -102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, -108, 97, 116, 101, 40, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, 107, 44, 32, 99, -111, 117, 110, 116, 32, 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 58, 103, 115, 117, 98, 40, 34, 37, 46, 37, 46, 37, 47, - 34, 44, 32, 34, 34, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 61, 32, 40, 99, 111, 117, 110, 116, 32, 62, - 32, 48, 41, 10, 105, 102, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 97, 110, 100, 32, 110, 111, 100, 101, 46, 118, 112, 97, 116, 104, 32, 126, - 61, 32, 110, 111, 100, 101, 46, 114, 101, 108, 112, 97, 116, 104, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 32, 61, 32, 110, 111, 100, 101, 46, -118, 112, 97, 116, 104, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 105, 110, 102, 111, 32, 61, 32, 100, 111, 116, 110, 101, 116, 46, 102, 105, -108, 101, 105, 110, 102, 111, 40, 102, 105, 108, 101, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, - 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, -109, 101, 110, 116, 115, 32, 61, 32, 123, 10, 34, 65, 117, 116, 111, 71, 101, 110, 34, 44, 10, 34, 67, 111, 112, 121, 84, 111, 79, 117, 116, 112, -117, 116, 68, 105, 114, 101, 99, 116, 111, 114, 121, 34, 44, 10, 34, 68, 101, 115, 105, 103, 110, 84, 105, 109, 101, 34, 44, 10, 34, 68, 101, 112, -101, 110, 100, 101, 110, 116, 85, 112, 111, 110, 34, 44, 10, 34, 68, 101, 115, 105, 103, 110, 84, 105, 109, 101, 83, 104, 97, 114, 101, 100, 73, 110, -112, 117, 116, 34, 44, 10, 34, 71, 101, 110, 101, 114, 97, 116, 111, 114, 34, 44, 10, 34, 76, 97, 115, 116, 71, 101, 110, 79, 117, 116, 112, 117, -116, 34, 44, 10, 34, 83, 117, 98, 84, 121, 112, 101, 34, 44, 10, 125, 10, 102, 111, 114, 32, 95, 44, 32, 101, 108, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 101, 108, 101, 109, 101, 110, 116, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, -105, 110, 102, 111, 91, 101, 108, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 34, 60, 37, 115, - 62, 37, 115, 60, 47, 37, 115, 62, 34, 44, 32, 101, 108, 44, 32, 118, 97, 108, 117, 101, 44, 32, 101, 108, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 105, 102, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 32, 61, 61, 32, 34, 69, 109, 98, 101, 100, 100, 101, 100, 82, 101, 115, -111, 117, 114, 99, 101, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 99, 117, 115, 116, 111, 109, 116, 111, 111, 108, 110, 97, 109, 101, 115, 112, 97, - 99, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 34, 60, 67, 117, 115, 116, 111, 109, 84, 111, 111, 108, 78, 97, 109, 101, 115, 112, 97, - 99, 101, 62, 37, 115, 60, 47, 67, 117, 115, 116, 111, 109, 84, 111, 111, 108, 78, 97, 109, 101, 115, 112, 97, 99, 101, 62, 34, 44, 32, 99, 102, -103, 46, 99, 117, 115, 116, 111, 109, 116, 111, 111, 108, 110, 97, 109, 101, 115, 112, 97, 99, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, -105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, -110, 10, 95, 112, 40, 50, 44, 39, 60, 37, 115, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 105, 110, -102, 111, 46, 97, 99, 116, 105, 111, 110, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 102, 110, 97, 109, 101, 41, 10, 105, 102, 32, -101, 120, 116, 101, 114, 110, 97, 108, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 39, 60, 76, 105, 110, 107, 62, 37, 115, 60, 47, 76, 105, -110, 107, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 108, 105, 110, 107, 41, 41, 10, 101, 110, 100, 10, -105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 34, 37, 115, 34, 44, 32, 99, -111, 110, 116, 101, 110, 116, 115, 41, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 60, 47, 37, 115, 62, 39, 44, 32, 105, 110, 102, 111, 46, - 97, 99, 116, 105, 111, 110, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 50, 44, 39, 60, 37, 115, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, - 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 105, 110, 102, 111, 46, 97, 99, 116, 105, 111, 110, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, -110, 44, 32, 102, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 102, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 114, 115, 116, - 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, - 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 99, 101, 115, 115, 102, 99, 102, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, -111, 100, 101, 41, 10, 108, 111, 99, 97, 108, 32, 97, 108, 108, 115, 97, 109, 101, 32, 61, 32, 116, 114, 117, 101, 10, 108, 111, 99, 97, 108, 32, -102, 105, 114, 115, 116, 32, 61, 32, 110, 105, 108, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 102, 103, 32, - 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 110, 111, 100, 101, 44, 32, 99, 102, 103, - 41, 10, 108, 111, 99, 97, 108, 32, 105, 110, 102, 111, 32, 61, 32, 100, 111, 116, 110, 101, 116, 46, 102, 105, 108, 101, 105, 110, 102, 111, 40, 102, -105, 108, 101, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 114, 115, 116, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 102, 105, 114, -115, 116, 32, 61, 32, 105, 110, 102, 111, 10, 101, 108, 115, 101, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 101, 113, 117, 97, 108, -115, 40, 102, 105, 114, 115, 116, 44, 32, 105, 110, 102, 111, 41, 32, 116, 104, 101, 110, 10, 97, 108, 108, 115, 97, 109, 101, 32, 61, 32, 102, 97, -108, 115, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 97, 108, 108, 115, 97, 109, 101, 32, 116, 104, 101, 110, 10, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 100, 111, 102, 105, 108, 101, 40, 110, 111, 100, 101, 44, 32, 102, 105, 114, 115, 116, 99, 102, 103, 44, 32, 39, 39, - 41, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, -110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 100, 111, 102, 105, 108, 101, 40, 110, -111, 100, 101, 44, 32, 99, 102, 103, 44, 32, 39, 32, 39, 32, 46, 46, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 100, -105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 115, 111, 114, 116, 101, 114, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 97, 44, 98, 41, 10, 118, 101, 114, 98, 111, 115, 101, 102, 40, 39, 83, 111, 114, 116, 105, 110, 103, 32, 70, - 35, 32, 112, 114, 111, 106, 32, 102, 105, 108, 101, 32, 40, 37, 115, 44, 32, 37, 115, 41, 44, 32, 105, 110, 100, 101, 120, 32, 37, 115, 32, 60, - 32, 37, 115, 39, 44, 32, 97, 46, 110, 97, 109, 101, 44, 32, 98, 46, 110, 97, 109, 101, 44, 32, 97, 46, 111, 114, 100, 101, 114, 44, 32, 98, - 46, 111, 114, 100, 101, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 46, 111, 114, 100, 101, 114, 32, 60, 32, 98, 46, 111, 114, 100, 101, 114, - 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 44, 32, 115, 111, 114, -116, 101, 114, 41, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, 115, 44, - 32, 112, 114, 111, 99, 101, 115, 115, 102, 99, 102, 103, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 112, 46, 116, 114, 101, 101, 46, -116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 112, 114, 111, 99, 101, 115, 115, 102, - 99, 102, 103, 10, 125, 44, 32, 102, 97, 108, 115, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 98, 117, 105, 108, 100, 69, 118, 101, 110, 116, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 111, 117, 116, 112, 117, 116, 40, 110, 97, 109, 101, 44, 32, 115, 116, 101, 112, 115, 41, 10, 105, 102, - 32, 35, 115, 116, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, -115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 112, 114, 106, - 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 115, 116, 101, 112, 115, 32, 61, 32, -116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, 115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 114, - 92, 110, 34, 41, 10, 95, 120, 40, 50, 44, 39, 60, 37, 115, 66, 117, 105, 108, 100, 69, 118, 101, 110, 116, 62, 37, 115, 60, 47, 37, 115, 66, -117, 105, 108, 100, 69, 118, 101, 110, 116, 62, 39, 44, 32, 110, 97, 109, 101, 44, 32, 115, 116, 101, 112, 115, 44, 32, 110, 97, 109, 101, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, -105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 112, 114, 101, 98, 117, 105, 108, 100, - 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 111, 114, 32, 35, 99, 102, 103, 46, 112, 111, 115, 116, 98, 117, 105, 108, 100, 99, 111, -109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 112, 40, 49, 44, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, -114, 111, 117, 112, 62, 39, 41, 10, 111, 117, 116, 112, 117, 116, 40, 34, 80, 114, 101, 34, 44, 32, 99, 102, 103, 46, 112, 114, 101, 98, 117, 105, -108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 41, 10, 111, 117, 116, 112, 117, 116, 40, 34, 80, 111, 115, 116, 34, 44, 32, 99, 102, 103, 46, 112, -111, 115, 116, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 80, 114, 111, 112, 101, 114, -116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 99, 111, 109, 112, 105, 108, 101, 114, 80, 114, 111, 112, 115, 40, 99, 102, 103, 41, 10, 95, 120, 40, 50, 44, 39, - 60, 68, 101, 102, 105, 110, 101, 67, 111, 110, 115, 116, 97, 110, 116, 115, 62, 37, 115, 60, 47, 68, 101, 102, 105, 110, 101, 67, 111, 110, 115, 116, - 97, 110, 116, 115, 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, - 44, 32, 34, 59, 34, 41, 41, 10, 95, 112, 40, 50, 44, 39, 60, 69, 114, 114, 111, 114, 82, 101, 112, 111, 114, 116, 62, 112, 114, 111, 109, 112, -116, 60, 47, 69, 114, 114, 111, 114, 82, 101, 112, 111, 114, 116, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 87, 97, 114, 110, 105, 110, 103, - 76, 101, 118, 101, 108, 62, 52, 60, 47, 87, 97, 114, 110, 105, 110, 103, 76, 101, 118, 101, 108, 62, 39, 41, 10, 105, 102, 32, 99, 102, 103, 46, - 99, 108, 114, 32, 61, 61, 32, 34, 85, 110, 115, 97, 102, 101, 34, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 65, 108, 108, 111, -119, 85, 110, 115, 97, 102, 101, 66, 108, 111, 99, 107, 115, 62, 116, 114, 117, 101, 60, 47, 65, 108, 108, 111, 119, 85, 110, 115, 97, 102, 101, 66, -108, 111, 99, 107, 115, 62, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 70, 97, 116, 97, 108, 67, -111, 109, 112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 84, 114, 101, 97, 116, - 87, 97, 114, 110, 105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, 62, 116, 114, 117, 101, 60, 47, 84, 114, 101, 97, 116, 87, 97, 114, 110, -105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, 62, 39, 41, 10, 101, 110, 100, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 100, -101, 98, 117, 103, 67, 111, 109, 109, 97, 110, 100, 80, 97, 114, 97, 109, 101, 116, 101, 114, 115, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 100, 101, 98, 117, 103, 67, 111, 109, 109, 97, 110, 100, 80, - 97, 114, 97, 109, 101, 116, 101, 114, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 95, 120, 40, 50, 44, 39, 60, 67, 111, 109, 109, 97, 110, 100, 108, 105, 110, 101, 112, 97, 114, 97, -109, 101, 116, 101, 114, 115, 62, 37, 115, 60, 47, 67, 111, 109, 109, 97, 110, 100, 108, 105, 110, 101, 112, 97, 114, 97, 109, 101, 116, 101, 114, 115, - 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, - 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, -101, 46, 100, 101, 98, 117, 103, 80, 114, 111, 112, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, - 32, 61, 61, 32, 112, 46, 79, 78, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 68, 101, 98, 117, 103, 83, 121, 109, 98, 111, 108, -115, 62, 116, 114, 117, 101, 60, 47, 68, 101, 98, 117, 103, 83, 121, 109, 98, 111, 108, 115, 62, 39, 41, 10, 95, 112, 40, 50, 44, 39, 60, 68, -101, 98, 117, 103, 84, 121, 112, 101, 62, 102, 117, 108, 108, 60, 47, 68, 101, 98, 117, 103, 84, 121, 112, 101, 62, 39, 41, 10, 101, 108, 115, 101, - 10, 95, 112, 40, 50, 44, 39, 60, 68, 101, 98, 117, 103, 84, 121, 112, 101, 62, 112, 100, 98, 111, 110, 108, 121, 60, 47, 68, 101, 98, 117, 103, - 84, 121, 112, 101, 62, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 60, 79, 112, 116, 105, 109, 105, 122, 101, 62, 37, 115, 60, 47, - 79, 112, 116, 105, 109, 105, 122, 101, 62, 39, 44, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, -101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 44, 32, 34, 116, 114, 117, 101, 34, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 41, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 111, 117, 116, 112, 117, 116, 80, 114, -111, 112, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 100, 105, 114, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, -112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, -111, 114, 121, 41, 10, 95, 120, 40, 50, 44, 39, 60, 79, 117, 116, 112, 117, 116, 80, 97, 116, 104, 62, 37, 115, 92, 92, 60, 47, 79, 117, 116, -112, 117, 116, 80, 97, 116, 104, 62, 39, 44, 32, 111, 117, 116, 100, 105, 114, 41, 10, 108, 111, 99, 97, 108, 32, 111, 98, 106, 100, 105, 114, 32, - 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 41, 10, -105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 48, 56, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, - 32, 116, 104, 101, 110, 10, 95, 120, 40, 50, 44, 39, 60, 66, 97, 115, 101, 73, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, 79, 117, 116, -112, 117, 116, 80, 97, 116, 104, 62, 37, 115, 92, 92, 60, 47, 66, 97, 115, 101, 73, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, 79, 117, -116, 112, 117, 116, 80, 97, 116, 104, 62, 39, 44, 32, 111, 98, 106, 100, 105, 114, 41, 10, 95, 112, 40, 50, 44, 39, 60, 73, 110, 116, 101, 114, -109, 101, 100, 105, 97, 116, 101, 79, 117, 116, 112, 117, 116, 80, 97, 116, 104, 62, 36, 40, 66, 97, 115, 101, 73, 110, 116, 101, 114, 109, 101, 100, -105, 97, 116, 101, 79, 117, 116, 112, 117, 116, 80, 97, 116, 104, 41, 60, 47, 73, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, 79, 117, 116, -112, 117, 116, 80, 97, 116, 104, 62, 39, 41, 10, 101, 108, 115, 101, 10, 95, 120, 40, 50, 44, 39, 60, 73, 110, 116, 101, 114, 109, 101, 100, 105, - 97, 116, 101, 79, 117, 116, 112, 117, 116, 80, 97, 116, 104, 62, 37, 115, 92, 92, 60, 47, 73, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, - 79, 117, 116, 112, 117, 116, 80, 97, 116, 104, 62, 39, 44, 32, 111, 98, 106, 100, 105, 114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, - 46, 97, 115, 115, 101, 109, 98, 108, 121, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, -110, 117, 71, 101, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, - 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 100, 111, 116, 110, 101, -116, 98, 97, 115, 101, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 32, 112, 114, 106, 41, 10, - 95, 112, 40, 49, 44, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 115, 115, 101, 109, 98, 108, 121, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, -112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, -116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, - 44, 32, 34, 115, 121, 115, 116, 101, 109, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 111, 114, 105, 103, 105, 110, 97, 108, 44, 32, 100, -101, 99, 111, 114, 97, 116, 101, 100, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 110, - 97, 109, 101, 40, 100, 101, 99, 111, 114, 97, 116, 101, 100, 41, 10, 105, 102, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, -105, 111, 110, 40, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 46, 100, 108, 108, 34, 32, 116, 104, 101, 110, 10, 110, 97, 109, 101, 32, 61, 32, -110, 97, 109, 101, 46, 115, 117, 98, 40, 110, 97, 109, 101, 44, 32, 49, 44, 32, 45, 53, 41, 10, 101, 110, 100, 10, 105, 102, 32, 100, 101, 99, -111, 114, 97, 116, 101, 100, 58, 102, 105, 110, 100, 40, 34, 47, 34, 44, 32, 110, 105, 108, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, - 10, 95, 120, 40, 50, 44, 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, - 44, 32, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 99, 80, 97, 116, 104, 44, 32, 100, 101, 99, 86, 97, 114, 115, 32, 61, - 32, 100, 101, 99, 111, 114, 97, 116, 101, 100, 58, 109, 97, 116, 99, 104, 40, 34, 40, 46, 45, 41, 44, 34, 41, 10, 105, 102, 32, 110, 111, 116, - 32, 100, 101, 99, 80, 97, 116, 104, 32, 116, 104, 101, 110, 10, 100, 101, 99, 80, 97, 116, 104, 32, 61, 32, 100, 101, 99, 111, 114, 97, 116, 101, -100, 10, 101, 110, 100, 10, 95, 120, 40, 51, 44, 39, 60, 72, 105, 110, 116, 80, 97, 116, 104, 62, 37, 115, 60, 47, 72, 105, 110, 116, 80, 97, -116, 104, 62, 39, 44, 32, 112, 97, 116, 104, 46, 97, 112, 112, 101, 110, 100, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 112, 97, 116, 104, 46, -116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 100, 101, 99, 80, 97, 116, 104, 41, 44, 32, 34, 46, 100, 108, 108, 34, 41, 41, 10, 105, 102, 32, -110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 67, 111, 112, 121, 76, 111, 99, 97, 108, 40, 112, 114, 106, 44, 32, 111, 114, 105, 103, -105, 110, 97, 108, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 34, 60, 80, 114, 105, 118, 97, 116, 101, 62, - 70, 97, 108, 115, 101, 60, 47, 80, 114, 105, 118, 97, 116, 101, 62, 34, 41, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 60, 47, 82, 101, -102, 101, 114, 101, 110, 99, 101, 62, 39, 41, 10, 101, 108, 115, 101, 10, 95, 120, 40, 50, 44, 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, - 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 109, 97, 107, 101, 86, 101, -114, 115, 105, 111, 110, 67, 111, 109, 112, 97, 114, 97, 98, 108, 101, 40, 118, 101, 114, 115, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 110, -117, 109, 98, 101, 114, 115, 32, 61, 32, 34, 34, 10, 102, 111, 114, 32, 110, 117, 109, 98, 101, 114, 32, 105, 110, 32, 118, 101, 114, 115, 105, 111, -110, 58, 103, 109, 97, 116, 99, 104, 40, 34, 37, 100, 34, 41, 32, 100, 111, 10, 110, 117, 109, 98, 101, 114, 115, 32, 61, 32, 110, 117, 109, 98, -101, 114, 115, 32, 46, 46, 32, 110, 117, 109, 98, 101, 114, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, -102, 111, 114, 109, 97, 116, 40, 34, 37, 45, 49, 48, 100, 34, 44, 32, 110, 117, 109, 98, 101, 114, 115, 41, 58, 103, 115, 117, 98, 40, 34, 32, - 34, 44, 32, 34, 48, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, -102, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 70, 111, 114, 70, 111, 108, 100, 101, 114, 40, 102, 111, 108, 100, 101, 114, - 41, 10, 105, 102, 32, 102, 111, 108, 100, 101, 114, 58, 109, 97, 116, 99, 104, 40, 34, 94, 110, 101, 116, 37, 100, 43, 36, 34, 41, 32, 111, 114, - 32, 102, 111, 108, 100, 101, 114, 58, 109, 97, 116, 99, 104, 40, 34, 94, 91, 48, 45, 57, 37, 46, 93, 43, 36, 34, 41, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 109, 97, 107, 101, 86, 101, 114, 115, 105, 111, 110, 67, 111, -109, 112, 97, 114, 97, 98, 108, 101, 40, 102, 111, 108, 100, 101, 114, 41, 10, 101, 108, 115, 101, 105, 102, 32, 102, 111, 108, 100, 101, 114, 32, 61, - 61, 32, 34, 110, 101, 116, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 109, - 97, 107, 101, 86, 101, 114, 115, 105, 111, 110, 67, 111, 109, 112, 97, 114, 97, 98, 108, 101, 40, 34, 48, 34, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 110, 117, 71, 101, 116, 82, 101, 102, 101, 114, -101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 48, - 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 115, 117, 112, 112, -111, 114, 116, 115, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, -102, 111, 114, 32, 95, 44, 32, 112, 97, 99, 107, 97, 103, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 110, 117, 103, -101, 116, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 105, 100, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, - 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, -107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, -112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 40, 112, 114, 106, 44, 32, 112, 97, 99, 107, 97, 103, 101, 41, 10, 108, 111, 99, - 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, -103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, -117, 114, 114, 101, 110, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, - 32, 99, 102, 103, 46, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 111, 114, 32, 97, 99, 116, 105, 111, 110, 46, 118, -115, 116, 117, 100, 105, 111, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, -103, 101, 116, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 109, 97, 107, 101, 86, 101, 114, 115, -105, 111, 110, 67, 111, 109, 112, 97, 114, 97, 98, 108, 101, 40, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 41, 10, 108, -111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 98, 101, 115, 116, 86, 101, 114, 115, 105, 111, -110, 44, 32, 98, 101, 115, 116, 70, 111, 108, 100, 101, 114, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 32, 105, 110, 32, 105, 112, 97, -105, 114, 115, 40, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, -115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 111, 108, 100, 101, 114, 32, 61, 32, 102, 105, 108, 101, 58, 109, 97, 116, 99, 104, 40, - 34, 94, 108, 105, 98, 91, 92, 92, 47, 93, 40, 46, 43, 41, 91, 92, 92, 47, 93, 34, 41, 10, 105, 102, 32, 102, 111, 108, 100, 101, 114, 32, - 97, 110, 100, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 102, 105, 108, 101, 44, 32, 34, 46, 100, 108, -108, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 70, 111, 114, 70, 111, 108, 100, 101, 114, 40, 102, 111, -108, 100, 101, 114, 41, 10, 105, 102, 32, 118, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 102, 105, 108, 101, 115, 91, 102, 111, 108, 100, -101, 114, 93, 32, 61, 32, 102, 105, 108, 101, 115, 91, 102, 111, 108, 100, 101, 114, 93, 32, 111, 114, 32, 123, 125, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 102, 105, 108, 101, 115, 91, 102, 111, 108, 100, 101, 114, 93, 44, 32, 102, 105, 108, 101, 41, 10, 105, 102, 32, 118, -101, 114, 115, 105, 111, 110, 32, 60, 61, 32, 116, 97, 114, 103, 101, 116, 86, 101, 114, 115, 105, 111, 110, 32, 97, 110, 100, 32, 40, 110, 111, 116, - 32, 98, 101, 115, 116, 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 118, 101, 114, 115, 105, 111, 110, 32, 62, 32, 98, 101, 115, 116, 86, 101, -114, 115, 105, 111, 110, 41, 32, 116, 104, 101, 110, 10, 98, 101, 115, 116, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 118, 101, 114, 115, 105, 111, -110, 10, 98, 101, 115, 116, 70, 111, 108, 100, 101, 114, 32, 61, 32, 102, 111, 108, 100, 101, 114, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 98, 101, 115, 116, 86, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 112, 46, -101, 114, 114, 111, 114, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 105, 115, 32, 110, 111, 116, - 32, 99, 111, 109, 112, 97, 116, 105, 98, 108, 101, 32, 119, 105, 116, 104, 32, 112, 114, 111, 106, 101, 99, 116, 32, 39, 37, 115, 39, 32, 46, 78, - 69, 84, 32, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 118, 101, 114, 115, 105, 111, 110, 32, 39, 37, 115, 39, 34, 44, 32, 105, 100, 44, 32, -112, 114, 106, 46, 110, 97, 109, 101, 44, 32, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 41, 10, 101, 110, 100, 10, 102, -111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 101, 115, 91, 98, 101, 115, 116, 70, -111, 108, 100, 101, 114, 93, 41, 32, 100, 111, 10, 95, 120, 40, 50, 44, 32, 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, -108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 102, 105, -108, 101, 41, 41, 10, 95, 120, 40, 51, 44, 32, 39, 60, 72, 105, 110, 116, 80, 97, 116, 104, 62, 37, 115, 60, 47, 72, 105, 110, 116, 80, 97, -116, 104, 62, 39, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 112, 46, 102, 105, 108, 101, 110, 97, -109, 101, 40, 112, 114, 106, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, - 34, 112, 97, 99, 107, 97, 103, 101, 115, 92, 92, 37, 115, 46, 37, 115, 92, 92, 37, 115, 34, 44, 32, 105, 100, 44, 32, 112, 97, 99, 107, 97, -103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 118, 101, 114, 98, 97, 116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 112, 97, 99, -107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 118, 101, 114, 115, 105, 111, 110, 44, 32, 102, 105, 108, 101, 41, 41, 41, 41, 10, 105, 102, - 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 67, 111, 112, 121, 76, 111, 99, 97, 108, 40, 112, 114, 106, 44, 32, 112, 97, 99, 107, 97, 103, 101, - 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 32, 39, 60, 80, 114, 105, 118, 97, 116, 101, 62, 84, 114, 117, -101, 60, 47, 80, 114, 105, 118, 97, 116, 101, 62, 39, 41, 10, 101, 108, 115, 101, 10, 95, 112, 40, 51, 44, 32, 39, 60, 80, 114, 105, 118, 97, -116, 101, 62, 70, 97, 108, 115, 101, 60, 47, 80, 114, 105, 118, 97, 116, 101, 62, 39, 41, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 32, 39, - 60, 47, 82, 101, 102, 101, 114, 101, 110, 99, 101, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, -110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, -119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 49, 44, 39, 60, - 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, 115, 32, 61, 32, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 44, 32, 39, 108, 105, 110, 107, - 79, 110, 108, 121, 39, 41, 10, 105, 102, 32, 35, 100, 101, 112, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 105, 102, 32, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, 116, -104, 101, 110, 10, 95, 112, 40, 49, 44, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, - 95, 44, 32, 100, 101, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 100, 101, 112, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, -114, 101, 108, 112, 97, 116, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 118, 115, 116, 117, -100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 40, 100, 101, 112, 41, 41, 10, 95, 120, 40, 50, 44, 39, 60, 80, 114, 111, -106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 114, 101, -108, 112, 97, 116, 104, 41, 10, 95, 112, 40, 51, 44, 39, 60, 80, 114, 111, 106, 101, 99, 116, 62, 123, 37, 115, 125, 60, 47, 80, 114, 111, 106, -101, 99, 116, 62, 39, 44, 32, 100, 101, 112, 46, 117, 117, 105, 100, 41, 10, 95, 120, 40, 51, 44, 39, 60, 78, 97, 109, 101, 62, 37, 115, 60, - 47, 78, 97, 109, 101, 62, 39, 44, 32, 100, 101, 112, 46, 110, 97, 109, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, - 46, 105, 115, 67, 111, 112, 121, 76, 111, 99, 97, 108, 40, 112, 114, 106, 44, 32, 100, 101, 112, 46, 110, 97, 109, 101, 44, 32, 116, 114, 117, 101, - 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 51, 44, 34, 60, 80, 114, 105, 118, 97, 116, 101, 62, 70, 97, 108, 115, 101, 60, 47, 80, 114, 105, -118, 97, 116, 101, 62, 34, 41, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, -101, 110, 99, 101, 62, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, -111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 49, 44, 39, 60, 47, 73, -116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, -116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, 116, 104, -101, 110, 10, 95, 112, 40, 49, 44, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, -101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, -115, 117, 112, 112, 111, 114, 116, 115, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 32, 116, -104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 104, 97, 115, 78, 117, 103, 101, 116, 32, 61, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 32, 97, -110, 100, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 62, 48, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, - 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 110, 117, 103, -101, 116, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 110, 117, 103, 101, 116, 62, 48, 32, 116, 104, 101, 110, 10, 104, 97, 115, 78, 117, 103, 101, -116, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 104, 97, 115, 78, 117, 103, 101, 116, 32, 116, 104, 101, -110, 10, 95, 112, 40, 49, 44, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 105, 102, 32, 112, 114, 106, 46, 110, 117, 103, -101, 116, 32, 97, 110, 100, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 62, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, -112, 97, 99, 107, 97, 103, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 110, 117, 103, 101, 116, 41, 32, 100, 111, 10, - 95, 112, 40, 50, 44, 39, 60, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, - 34, 37, 115, 34, 32, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 34, 47, 62, 39, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, -103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 44, 32, 118, 115, 116, 117, -100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 86, 101, 114, 115, 105, 111, 110, 40, 112, 97, 99, -107, 97, 103, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, -116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 110, 117, 103, 101, -116, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 110, 117, 103, 101, 116, 62, 48, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 112, - 97, 99, 107, 97, 103, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, 46, 110, 117, 103, 101, 116, 41, 32, 100, 111, 10, 105, -102, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 91, 112, 97, 99, 107, 97, 103, 101, 93, 61, 61, 110, 105, 108, 32, 116, 104, 101, 110, 10, 95, -112, 40, 50, 44, 39, 60, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, - 37, 115, 34, 32, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 34, 32, 37, 115, 47, 62, 39, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, -110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 44, 32, 118, 115, -116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 86, 101, 114, 115, 105, 111, 110, 40, 112, - 97, 99, 107, 97, 103, 101, 41, 44, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, -103, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 95, 112, 40, 49, 44, 39, 60, 47, 73, 116, 101, 109, - 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 114, 99, 104, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 32, 61, 32, -118, 115, 116, 117, 100, 105, 111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 97, -114, 99, 104, 32, 61, 61, 32, 34, 65, 110, 121, 32, 67, 80, 85, 34, 32, 116, 104, 101, 110, 10, 97, 114, 99, 104, 32, 61, 32, 34, 65, 110, -121, 67, 80, 85, 34, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 97, 114, 99, 104, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 99, 102, 103, 41, - 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 32, 37, 115, 62, 39, 44, 32, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 108, 111, 99, 97, 108, 32, 97, -114, 99, 104, 32, 61, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 114, 99, 104, 40, 99, 102, 103, 41, 10, 105, 102, 32, 97, 114, - 99, 104, 32, 126, 61, 32, 34, 65, 110, 121, 67, 80, 85, 34, 32, 111, 114, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, - 48, 48, 56, 34, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 60, 80, 108, 97, 116, 102, 111, 114, 109, 84, 97, 114, 103, 101, 116, 62, 37, -115, 60, 47, 80, 108, 97, 116, 102, 111, 114, 109, 84, 97, 114, 103, 101, 116, 62, 39, 44, 32, 97, 114, 99, 104, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 108, 105, 99, 97, 116, 105, -111, 110, 73, 99, 111, 110, 40, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 105, 99, 111, 110, 32, 116, 104, 101, 110, 10, 108, 111, 99, - 97, 108, 32, 105, 99, 111, 110, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 112, 114, 106, 46, -105, 99, 111, 110, 41, 10, 95, 112, 40, 49, 44, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 95, 120, - 40, 50, 44, 39, 60, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 73, 99, 111, 110, 62, 37, 115, 60, 47, 65, 112, 112, 108, 105, 99, 97, -116, 105, 111, 110, 73, 99, 111, 110, 62, 39, 44, 32, 105, 99, 111, 110, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 80, 114, 111, 112, 101, 114, -116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, -102, 111, 114, 109, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, -102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 32, 61, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 114, 99, 104, - 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 67, 111, 110, 100, -105, 116, 105, 111, 110, 61, 34, 32, 92, 39, 36, 40, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 41, 124, 36, 40, 80, 108, 97, -116, 102, 111, 114, 109, 41, 92, 39, 32, 61, 61, 32, 92, 39, 37, 115, 124, 37, 115, 92, 39, 32, 34, 39, 44, 32, 112, 108, 97, 116, 102, 111, -114, 109, 44, 32, 97, 114, 99, 104, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, -101, 46, 102, 111, 114, 109, 97, 116, 78, 117, 71, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 40, 102, 114, - 97, 109, 101, 119, 111, 114, 107, 41, 10, 114, 101, 116, 117, 114, 110, 32, 34, 110, 101, 116, 34, 32, 46, 46, 32, 102, 114, 97, 109, 101, 119, 111, -114, 107, 58, 103, 115, 117, 98, 40, 34, 37, 46, 34, 44, 32, 34, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 68, 101, 115, 105, 103, 110, 101, 114, 70, 111, 108, 100, 101, 114, 40, 99, 102, 103, 41, - 10, 95, 112, 40, 50, 44, 39, 60, 65, 112, 112, 68, 101, 115, 105, 103, 110, 101, 114, 70, 111, 108, 100, 101, 114, 62, 80, 114, 111, 112, 101, 114, -116, 105, 101, 115, 60, 47, 65, 112, 112, 68, 101, 115, 105, 103, 110, 101, 114, 70, 111, 108, 100, 101, 114, 62, 39, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 115, 115, 101, 109, 98, 108, 121, 78, 97, 109, 101, 40, - 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, - 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 65, 115, 115, 101, 109, - 98, 108, 121, 78, 97, 109, 101, 62, 37, 115, 60, 47, 65, 115, 115, 101, 109, 98, 108, 121, 78, 97, 109, 101, 62, 39, 44, 32, 99, 102, 103, 46, - 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 109, 109, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, -101, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 49, 48, 34, 32, 116, 104, -101, 110, 10, 95, 112, 40, 49, 44, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 77, 83, 66, 117, -105, 108, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 80, 97, 116, 104, 41, 92, 92, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 111, 111, -108, 115, 86, 101, 114, 115, 105, 111, 110, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 111, 109, 109, 111, 110, 46, 112, 114, 111, -112, 115, 34, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 69, 120, 105, 115, 116, 115, 40, 92, 39, 36, 40, 77, 83, 66, 117, 105, 108, -100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 80, 97, 116, 104, 41, 92, 92, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 111, 111, 108, 115, - 86, 101, 114, 115, 105, 111, 110, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 111, 109, 109, 111, 110, 46, 112, 114, 111, 112, 115, - 92, 39, 41, 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, -116, 98, 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 67, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, - 41, 10, 95, 120, 40, 50, 44, 39, 60, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, - 61, 34, 32, 92, 39, 36, 40, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 41, 92, 39, 32, 61, 61, 32, 92, 39, 92, 39, 32, - 34, 62, 37, 115, 60, 47, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, - 99, 102, 103, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 102, 105, 108, -101, 65, 108, 105, 103, 110, 109, 101, 110, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, -115, 50, 48, 49, 48, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, -111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 70, 105, -108, 101, 65, 108, 105, 103, 110, 109, 101, 110, 116, 62, 53, 49, 50, 60, 47, 70, 105, 108, 101, 65, 108, 105, 103, 110, 109, 101, 110, 116, 62, 39, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 98, 105, -110, 100, 105, 110, 103, 82, 101, 100, 105, 114, 101, 99, 116, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, - 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, - 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, - 32, 39, 60, 65, 117, 116, 111, 71, 101, 110, 101, 114, 97, 116, 101, 66, 105, 110, 100, 105, 110, 103, 82, 101, 100, 105, 114, 101, 99, 116, 115, 62, -116, 114, 117, 101, 60, 47, 65, 117, 116, 111, 71, 101, 110, 101, 114, 97, 116, 101, 66, 105, 110, 100, 105, 110, 103, 82, 101, 100, 105, 114, 101, 99, -116, 115, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, -101, 46, 111, 117, 116, 112, 117, 116, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 95, 112, 40, 50, 44, 39, 60, 79, 117, 116, 112, 117, 116, 84, -121, 112, 101, 62, 37, 115, 60, 47, 79, 117, 116, 112, 117, 116, 84, 121, 112, 101, 62, 39, 44, 32, 100, 111, 116, 110, 101, 116, 46, 103, 101, 116, -107, 105, 110, 100, 40, 99, 102, 103, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, -115, 101, 46, 112, 108, 97, 116, 102, 111, 114, 109, 67, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 95, 112, 40, 50, 44, 39, - 60, 80, 108, 97, 116, 102, 111, 114, 109, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 32, 92, 39, 36, 40, 80, 108, 97, 116, 102, 111, -114, 109, 41, 92, 39, 32, 61, 61, 32, 92, 39, 92, 39, 32, 34, 62, 37, 115, 60, 47, 80, 108, 97, 116, 102, 111, 114, 109, 62, 39, 44, 32, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 114, 99, 104, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, -115, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, -110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, -111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 80, 114, 111, 100, 117, 99, 116, - 86, 101, 114, 115, 105, 111, 110, 62, 37, 115, 60, 47, 80, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 62, 39, 44, 32, 97, 99, -116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, - 71, 117, 105, 100, 40, 99, 102, 103, 41, 10, 95, 112, 40, 50, 44, 39, 60, 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 62, 123, 37, 115, -125, 60, 47, 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 62, 39, 44, 32, 99, 102, 103, 46, 117, 117, 105, 100, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 71, -117, 105, 100, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 87, 80, 70, 32, 116, 104, 101, 110, 10, - 95, 112, 40, 50, 44, 39, 60, 80, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 71, 117, 105, 100, 115, 62, 123, 54, 48, 100, 99, 56, 49, 51, - 52, 45, 101, 98, 97, 53, 45, 52, 51, 98, 56, 45, 98, 99, 99, 57, 45, 98, 98, 52, 98, 99, 49, 54, 99, 50, 53, 52, 56, 125, 59, 123, - 70, 65, 69, 48, 52, 69, 67, 48, 45, 51, 48, 49, 70, 45, 49, 49, 68, 51, 45, 66, 70, 52, 66, 45, 48, 48, 67, 48, 52, 70, 55, 57, - 69, 70, 66, 67, 125, 60, 47, 80, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 71, 117, 105, 100, 115, 62, 39, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 111, 111, 116, 78, 97, 109, 101, 115, -112, 97, 99, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, -119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, 32, 111, 114, 32, 99, 102, 103, 46, 110, 97, 109, 101, 115, -112, 97, 99, 101, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 82, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 62, 37, -115, 60, 47, 82, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 62, 39, 44, 32, 99, 102, 103, 46, 110, 97, 109, 101, 115, 112, 97, 99, -101, 32, 111, 114, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 115, 99, 104, 101, 109, - 97, 86, 101, 114, 115, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, - 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, -111, 46, 99, 115, 112, 114, 111, 106, 83, 99, 104, 101, 109, 97, 86, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, - 39, 60, 83, 99, 104, 101, 109, 97, 86, 101, 114, 115, 105, 111, 110, 62, 37, 115, 60, 47, 83, 99, 104, 101, 109, 97, 86, 101, 114, 115, 105, 111, -110, 62, 39, 44, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 99, 115, 112, 114, 111, 106, 83, 99, 104, 101, 109, 97, - 86, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, - 98, 97, 115, 101, 46, 78, 111, 87, 97, 114, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, -119, 97, 114, 110, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 119, 97, 114, 110, 105, 110, 103, 115, - 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, -110, 103, 115, 44, 32, 34, 59, 34, 41, 10, 95, 112, 40, 50, 44, 39, 60, 78, 111, 87, 97, 114, 110, 62, 37, 115, 60, 47, 78, 111, 87, 97, -114, 110, 62, 39, 44, 32, 119, 97, 114, 110, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, -111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, - 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 99, 102, 103, 46, -100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 111, 114, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, -111, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 10, 105, 102, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 97, -110, 100, 32, 110, 111, 116, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, -106, 101, 99, 116, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, -101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 62, 118, 37, 115, 60, 47, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, -107, 86, 101, 114, 115, 105, 111, 110, 62, 39, 44, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 115, 118, 101, 114, 115, 105, 111, 110, 40, 99, 102, 103, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, 115, 118, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 76, - 97, 110, 103, 86, 101, 114, 115, 105, 111, 110, 62, 37, 115, 60, 47, 76, 97, 110, 103, 86, 101, 114, 115, 105, 111, 110, 62, 39, 44, 32, 99, 102, -103, 46, 99, 115, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 80, 114, 111, 102, 105, 108, 101, 40, - 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 48, 34, 32, 116, 104, 101, 110, - 10, 95, 112, 40, 50, 44, 39, 60, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 80, 114, 111, 102, 105, 108, 101, 62, 39, - 41, 10, 95, 112, 40, 50, 44, 39, 60, 47, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 80, 114, 111, 102, 105, 108, 101, - 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, -120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 40, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, -115, 50, 48, 48, 56, 34, 32, 116, 104, 101, 110, 10, 112, 46, 120, 109, 108, 85, 116, 102, 56, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, -114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 99, 102, -103, 46, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 10, 105, 102, 32, 110, 111, 116, 32, 102, 114, 97, 109, 101, 119, 111, -114, 107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, 10, 101, 110, 100, 10, 105, 102, 32, 102, 114, 97, 109, -101, 119, 111, 114, 107, 58, 102, 105, 110, 100, 40, 39, 94, 110, 101, 116, 99, 111, 114, 101, 97, 112, 112, 39, 41, 32, 126, 61, 32, 110, 105, 108, - 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 102, 114, 97, 109, 101, 119, 111, -114, 107, 58, 102, 105, 110, 100, 40, 39, 94, 110, 101, 116, 115, 116, 97, 110, 100, 97, 114, 100, 39, 41, 32, 126, 61, 32, 110, 105, 108, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 102, 97, 108, 115, 101, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 110, 101, 116, 99, 111, 114, 101, - 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, -111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 102, 114, - 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 99, 102, 103, 46, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 111, 114, - 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 10, -105, 102, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 97, 110, 100, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, -119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, - 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 62, 37, 115, 60, 47, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, -111, 114, 107, 62, 39, 44, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 110, 101, 116, 99, 111, 114, 101, 46, 101, 110, 97, 98, 108, 101, 68, 101, 102, 97, -117, 108, 116, 67, 111, 109, 112, 105, 108, 101, 73, 116, 101, 109, 115, 40, 99, 102, 103, 41, 10, 95, 112, 40, 50, 44, 39, 60, 69, 110, 97, 98, -108, 101, 68, 101, 102, 97, 117, 108, 116, 67, 111, 109, 112, 105, 108, 101, 73, 116, 101, 109, 115, 62, 37, 115, 60, 47, 69, 110, 97, 98, 108, 101, - 68, 101, 102, 97, 117, 108, 116, 67, 111, 109, 112, 105, 108, 101, 73, 116, 101, 109, 115, 62, 39, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 101, -110, 97, 98, 108, 101, 68, 101, 102, 97, 117, 108, 116, 67, 111, 109, 112, 105, 108, 101, 73, 116, 101, 109, 115, 44, 32, 34, 116, 114, 117, 101, 34, - 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 110, 101, 116, 99, 111, 114, 101, 46, 117, 115, 101, 87, 112, 102, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, -108, 97, 103, 115, 46, 87, 80, 70, 32, 116, 104, 101, 110, 10, 95, 112, 40, 50, 44, 39, 60, 85, 115, 101, 87, 112, 102, 62, 116, 114, 117, 101, - 60, 47, 85, 115, 101, 87, 112, 102, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, }; - -// vstudio/vs2005_csproj.lua -static const unsigned char builtin_script_97[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 99, 115, 50, 48, - 48, 53, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 108, 111, 99, 97, 108, 32, 99, 115, 50, 48, 48, 53, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 99, 115, 50, 48, 48, - 53, 10, 108, 111, 99, 97, 108, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, -101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 100, 111, 116, 110, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, 101, 116, 10, 99, 115, 50, 48, 48, 53, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 99, 115, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, -114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 112, 114, 106, 41, 10, 105, 102, 32, 100, 111, 116, 110, 101, -116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, 116, 104, -101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 69, 108, -101, 109, 101, 110, 116, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, -105, 101, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 44, 10, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 73, 99, 111, 110, 44, 10, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, -123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 44, 10, 100, 111, 116, -110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 69, 108, 101, 109, 101, 110, 116, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, -115, 101, 46, 99, 111, 109, 109, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, -112, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 108, 105, 99, 97, -116, 105, 111, 110, 73, 99, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 10, -125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 99, 115, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, -116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, 103, 41, 10, 105, 102, 32, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 99, 102, -103, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 111, 117, 116, 112, -117, 116, 84, 121, 112, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 68, 101, 115, 105, 103, 110, 101, 114, 70, 111, -108, 100, 101, 114, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 44, 10, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 115, 115, 101, 109, 98, 108, 121, 78, 97, 109, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 110, 101, 116, 99, 111, 114, 101, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 44, 10, 100, 111, 116, -110, 101, 116, 98, 97, 115, 101, 46, 102, 105, 108, 101, 65, 108, 105, 103, 110, 109, 101, 110, 116, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, -101, 46, 98, 105, 110, 100, 105, 110, 103, 82, 101, 100, 105, 114, 101, 99, 116, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 110, -101, 116, 99, 111, 114, 101, 46, 117, 115, 101, 87, 112, 102, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 115, 118, 101, 114, 115, -105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 110, 101, 116, 99, 111, 114, 101, 46, 101, 110, 97, 98, 108, 101, 68, 101, -102, 97, 117, 108, 116, 67, 111, 109, 112, 105, 108, 101, 73, 116, 101, 109, 115, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 67, 111, 110, 100, 105, -116, 105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 108, 97, 116, 102, 111, 114, 109, 67, 111, 110, 100, 105, 116, 105, -111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 44, 10, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 115, 99, 104, 101, 109, 97, 86, 101, 114, 115, 105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 111, 117, 116, 112, -117, 116, 84, 121, 112, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 68, 101, 115, 105, 103, 110, 101, 114, 70, 111, -108, 100, 101, 114, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 44, 10, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 115, 115, 101, 109, 98, 108, 121, 78, 97, 109, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 44, 10, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 80, 114, 111, 102, 105, 108, 101, 44, 10, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 102, 105, 108, 101, 65, 108, 105, 103, 110, 109, 101, 110, 116, 44, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 98, 105, 110, 100, 105, 110, 103, 82, 101, 100, 105, 114, 101, 99, 116, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, - 46, 112, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 71, 117, 105, 100, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 115, -118, 101, 114, 115, 105, 111, 110, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 99, 115, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 114, -101, 116, 117, 114, 110, 32, 123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, - 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 100, 101, 98, 117, 103, 80, 114, 111, 112, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 109, 112, -105, 108, 101, 114, 80, 114, 111, 112, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 78, 111, 87, 97, 114, 110, 10, 125, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 99, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, - 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 101, 112, 97, 114, 101, 40, 99, 115, 50, 48, 48, 53, 41, 10, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 99, 115, 50, 48, 48, 53, 46, 116, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 110, 111, 116, 32, 100, 111, 116, -110, 101, 116, 98, 97, 115, 101, 46, 105, 115, 78, 101, 119, 70, 111, 114, 109, 97, 116, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 98, 105, 110, 32, 61, 32, 105, 105, 102, 40, 95, 65, 67, 84, 73, 79, 78, 32, 60, 61, 32, - 34, 118, 115, 50, 48, 49, 48, 34, 44, 32, 34, 77, 83, 66, 117, 105, 108, 100, 66, 105, 110, 80, 97, 116, 104, 34, 44, 32, 34, 77, 83, 66, -117, 105, 108, 100, 84, 111, 111, 108, 115, 80, 97, 116, 104, 34, 41, 10, 95, 112, 40, 49, 44, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, -111, 106, 101, 99, 116, 61, 34, 36, 40, 37, 115, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 83, 104, 97, 114, 112, 46, 116, - 97, 114, 103, 101, 116, 115, 34, 32, 47, 62, 39, 44, 32, 98, 105, 110, 41, 10, 95, 112, 40, 49, 44, 39, 60, 33, 45, 45, 32, 84, 111, 32, -109, 111, 100, 105, 102, 121, 32, 121, 111, 117, 114, 32, 98, 117, 105, 108, 100, 32, 112, 114, 111, 99, 101, 115, 115, 44, 32, 97, 100, 100, 32, 121, -111, 117, 114, 32, 116, 97, 115, 107, 32, 105, 110, 115, 105, 100, 101, 32, 111, 110, 101, 32, 111, 102, 32, 116, 104, 101, 32, 116, 97, 114, 103, 101, -116, 115, 32, 98, 101, 108, 111, 119, 32, 97, 110, 100, 32, 117, 110, 99, 111, 109, 109, 101, 110, 116, 32, 105, 116, 46, 39, 41, 10, 95, 112, 40, - 49, 44, 39, 32, 32, 32, 32, 32, 79, 116, 104, 101, 114, 32, 115, 105, 109, 105, 108, 97, 114, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, -112, 111, 105, 110, 116, 115, 32, 101, 120, 105, 115, 116, 44, 32, 115, 101, 101, 32, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 111, 109, 109, -111, 110, 46, 116, 97, 114, 103, 101, 116, 115, 46, 39, 41, 10, 95, 112, 40, 49, 44, 39, 60, 84, 97, 114, 103, 101, 116, 32, 78, 97, 109, 101, - 61, 34, 66, 101, 102, 111, 114, 101, 66, 117, 105, 108, 100, 34, 62, 39, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 84, 97, 114, 103, 101, 116, - 62, 39, 41, 10, 95, 112, 40, 49, 44, 39, 60, 84, 97, 114, 103, 101, 116, 32, 78, 97, 109, 101, 61, 34, 65, 102, 116, 101, 114, 66, 117, 105, -108, 100, 34, 62, 39, 41, 10, 95, 112, 40, 49, 44, 39, 60, 47, 84, 97, 114, 103, 101, 116, 62, 39, 41, 10, 95, 112, 40, 49, 44, 39, 45, - 45, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/vs2005_csproj_user.lua -static const unsigned char builtin_script_98[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, -116, 117, 100, 105, 111, 46, 99, 115, 50, 48, 48, 53, 10, 108, 111, 99, 97, 108, 32, 100, 110, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 46, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 80, 114, 111, 106, -101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 114, 101, -116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 80, 97, 116, 104, 44, 10, 125, 10, 101, 110, 100, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 67, 111, 110, 102, 105, 103, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, - 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, - 32, 112, 114, 106, 71, 114, 111, 117, 112, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, - 10, 112, 46, 112, 117, 115, 104, 40, 50, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, -115, 46, 117, 115, 101, 114, 80, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 44, 32, 112, 114, 106, 41, - 10, 112, 46, 112, 111, 112, 40, 50, 41, 10, 101, 110, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 105, 122, 101, 32, 61, 32, 48, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 111, 110, 116, 101, 110, -116, 115, 91, 99, 102, 103, 93, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 50, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -117, 115, 101, 114, 67, 111, 110, 102, 105, 103, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 44, 32, 99, 102, 103, 41, 10, 112, 46, -112, 111, 112, 40, 50, 41, 10, 101, 110, 100, 41, 10, 115, 105, 122, 101, 32, 61, 32, 115, 105, 122, 101, 32, 43, 32, 35, 99, 111, 110, 116, 101, -110, 116, 115, 91, 99, 102, 103, 93, 10, 101, 110, 100, 10, 105, 102, 32, 35, 112, 114, 106, 71, 114, 111, 117, 112, 32, 62, 32, 48, 32, 111, 114, - 32, 115, 105, 122, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, - 69, 108, 101, 109, 101, 110, 116, 40, 41, 10, 105, 102, 32, 35, 112, 114, 106, 71, 114, 111, 117, 112, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, -110, 40, 112, 114, 106, 71, 114, 111, 117, 112, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, -117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, -102, 103, 93, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, -111, 117, 112, 32, 37, 115, 62, 39, 44, 32, 100, 110, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 112, 46, 111, -117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, -112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, -114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, -101, 114, 101, 110, 99, 101, 80, 97, 116, 104, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 46, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, -112, 97, 116, 104, 115, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, -108, 105, 98, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 112, 97, 116, 104, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, - 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 97, 116, 104, 62, 37, 115, 60, 47, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 97, 116, -104, 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 97, 116, 104, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, -111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, -117, 103, 97, 114, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 60, 83, 116, 97, 114, 116, 65, 114, 103, 117, 109, -101, 110, 116, 115, 62, 37, 115, 60, 47, 83, 116, 97, 114, 116, 65, 114, 103, 117, 109, 101, 110, 116, 115, 62, 39, 44, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, }; - -// vstudio/vs2005_fsproj.lua -static const unsigned char builtin_script_99[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 102, 115, 50, 48, - 48, 53, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 108, 111, 99, 97, 108, 32, 102, 115, 50, 48, 48, 53, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 102, 115, 50, 48, 48, - 53, 10, 108, 111, 99, 97, 108, 32, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, -101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, -108, 32, 100, 111, 116, 110, 101, 116, 32, 61, 32, 112, 46, 116, 111, 111, 108, 115, 46, 100, 111, 116, 110, 101, 116, 10, 102, 115, 50, 48, 48, 53, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 102, 115, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, -114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 112, 114, 111, 106, 101, 99, 116, 69, 108, 101, 109, 101, 110, 116, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, -111, 109, 109, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, -101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, - 73, 99, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 10, 125, 10, 101, 110, -100, 10, 102, 115, 50, 48, 48, 53, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, -105, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 100, 111, 116, 110, 101, -116, 98, 97, 115, 101, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 67, 111, 110, 100, 105, 116, 105, 111, 110, 44, 10, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 108, 97, 116, 102, 111, 114, 109, 67, 111, 110, 100, 105, 116, 105, 111, 110, 44, 10, 100, 111, 116, 110, -101, 116, 98, 97, 115, 101, 46, 115, 99, 104, 101, 109, 97, 86, 101, 114, 115, 105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, - 46, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 106, -101, 99, 116, 71, 117, 105, 100, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 111, 117, 116, 112, 117, 116, 84, 121, 112, 101, 44, 10, -100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 97, 112, 112, 68, 101, 115, 105, 103, 110, 101, 114, 70, 111, 108, 100, 101, 114, 44, 10, 100, 111, -116, 110, 101, 116, 98, 97, 115, 101, 46, 114, 111, 111, 116, 78, 97, 109, 101, 115, 112, 97, 99, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, -115, 101, 46, 97, 115, 115, 101, 109, 98, 108, 121, 78, 97, 109, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 116, 97, 114, 103, -101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, 110, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 116, - 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 80, 114, 111, 102, 105, 108, 101, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, -101, 46, 112, 114, 111, 106, 101, 99, 116, 84, 121, 112, 101, 71, 117, 105, 100, 115, 10, 125, 10, 101, 110, 100, 10, 102, 115, 50, 48, 48, 53, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 32, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 112, 114, 111, 112, 101, 114, 116, -121, 71, 114, 111, 117, 112, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 100, 101, 98, 117, 103, 80, 114, 111, 112, 115, 44, 10, 100, -111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, -101, 46, 99, 111, 109, 112, 105, 108, 101, 114, 80, 114, 111, 112, 115, 44, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 78, 111, 87, 97, -114, 110, 44, 10, 102, 115, 50, 48, 48, 53, 46, 116, 97, 105, 108, 67, 97, 108, 108, 115, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 102, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 100, 111, 116, 110, 101, 116, 98, - 97, 115, 101, 46, 112, 114, 101, 112, 97, 114, 101, 40, 102, 115, 50, 48, 48, 53, 41, 10, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 46, 103, -101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 115, 50, 48, 48, 53, - 46, 116, 97, 105, 108, 67, 97, 108, 108, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 116, 99, 10, 105, 102, 32, 99, 102, 103, 46, -116, 97, 105, 108, 99, 97, 108, 108, 115, 32, 61, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 116, 99, 32, 61, 32, 99, 111, 110, 102, 105, -103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 101, 108, 115, 101, 10, 116, 99, 32, 61, 32, 99, 102, -103, 46, 116, 97, 105, 108, 99, 97, 108, 108, 115, 10, 101, 110, 100, 10, 95, 112, 40, 50, 44, 32, 39, 60, 84, 97, 105, 108, 99, 97, 108, 108, -115, 62, 37, 115, 60, 47, 84, 97, 105, 108, 99, 97, 108, 108, 115, 62, 39, 44, 32, 105, 105, 102, 40, 116, 99, 44, 32, 34, 116, 114, 117, 101, - 34, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 115, 50, 48, 48, 53, - 46, 116, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 95, 112, 40, 49, 44, 32, 39, 60, 67, 104, 111, 111, 115, 101, 62, 39, 41, 10, - 95, 112, 40, 50, 44, 32, 39, 60, 87, 104, 101, 110, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 36, 40, 86, 105, 115, 117, - 97, 108, 83, 116, 117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 41, 92, 39, 32, 61, 61, 32, 92, 39, 49, 49, 46, 48, 92, 39, 34, 62, - 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 32, 67, 111, 110, 100, 105, 116, 105, -111, 110, 61, 34, 69, 120, 105, 115, 116, 115, 40, 92, 39, 36, 40, 77, 83, 66, 117, 105, 108, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, - 80, 97, 116, 104, 51, 50, 41, 92, 92, 46, 46, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 83, 68, 75, 115, 92, 92, 70, 35, 92, - 92, 51, 46, 48, 92, 92, 70, 114, 97, 109, 101, 119, 111, 114, 107, 92, 92, 118, 52, 46, 48, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, - 46, 70, 83, 104, 97, 114, 112, 46, 84, 97, 114, 103, 101, 116, 115, 92, 39, 41, 34, 62, 39, 41, 10, 95, 112, 40, 52, 44, 32, 39, 60, 70, - 83, 104, 97, 114, 112, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 62, 36, 40, 77, 83, 66, 117, 105, 108, 100, 69, 120, 116, 101, 110, 115, -105, 111, 110, 115, 80, 97, 116, 104, 51, 50, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 92, 92, 86, 105, 115, 117, 97, 108, 83, 116, -117, 100, 105, 111, 92, 92, 118, 36, 40, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 41, 92, 92, 70, - 83, 104, 97, 114, 112, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 70, 83, 104, 97, 114, 112, 46, 84, 97, 114, 103, 101, 116, 115, 60, - 47, 70, 83, 104, 97, 114, 112, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 62, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 47, 80, -114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, 47, 87, 104, 101, 110, 62, 39, 41, - 10, 95, 112, 40, 50, 44, 32, 39, 60, 79, 116, 104, 101, 114, 119, 105, 115, 101, 62, 39, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, 80, 114, -111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 69, 120, 105, 115, 116, 115, 40, 92, 39, - 36, 40, 77, 83, 66, 117, 105, 108, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 80, 97, 116, 104, 51, 50, 41, 92, 92, 77, 105, 99, 114, -111, 115, 111, 102, 116, 92, 92, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 92, 92, 118, 36, 40, 86, 105, 115, 117, 97, 108, 83, 116, -117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 41, 92, 92, 70, 83, 104, 97, 114, 112, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, - 70, 83, 104, 97, 114, 112, 46, 84, 97, 114, 103, 101, 116, 115, 92, 39, 41, 34, 62, 39, 41, 10, 95, 112, 40, 51, 44, 32, 39, 60, 70, 83, -104, 97, 114, 112, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 62, 36, 40, 77, 83, 66, 117, 105, 108, 100, 69, 120, 116, 101, 110, 115, 105, -111, 110, 115, 80, 97, 116, 104, 51, 50, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 92, 92, 86, 105, 115, 117, 97, 108, 83, 116, 117, -100, 105, 111, 92, 92, 118, 36, 40, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 86, 101, 114, 115, 105, 111, 110, 41, 92, 92, 70, 83, -104, 97, 114, 112, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 70, 83, 104, 97, 114, 112, 46, 84, 97, 114, 103, 101, 116, 115, 60, 47, - 70, 83, 104, 97, 114, 112, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 62, 39, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, 47, 80, 114, -111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 95, 112, 40, 50, 44, 32, 39, 60, 47, 79, 116, 104, 101, 114, 119, 105, 115, -101, 62, 39, 41, 10, 95, 112, 40, 49, 44, 32, 39, 60, 47, 67, 104, 111, 111, 115, 101, 62, 39, 41, 10, 95, 112, 40, 49, 44, 32, 39, 60, - 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 70, 83, 104, 97, 114, 112, 84, 97, 114, 103, 101, 116, 115, 80, - 97, 116, 104, 41, 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, }; - -// vstudio/vs2005_fsproj_user.lua -static const unsigned char builtin_script_100[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, -116, 117, 100, 105, 111, 46, 102, 115, 50, 48, 48, 53, 10, 108, 111, 99, 97, 108, 32, 100, 110, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 46, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 80, 114, 111, 106, -101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 114, 101, -116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 80, 97, 116, 104, 44, 10, 125, 10, 101, 110, 100, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 67, 111, 110, 102, 105, 103, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, - 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, - 32, 112, 114, 106, 71, 114, 111, 117, 112, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, - 10, 112, 46, 112, 117, 115, 104, 40, 50, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, -115, 46, 117, 115, 101, 114, 80, 114, 111, 106, 101, 99, 116, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 44, 32, 112, 114, 106, 41, - 10, 112, 46, 112, 111, 112, 40, 50, 41, 10, 101, 110, 100, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, -123, 125, 10, 108, 111, 99, 97, 108, 32, 115, 105, 122, 101, 32, 61, 32, 48, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 111, 110, 116, 101, 110, -116, 115, 91, 99, 102, 103, 93, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 50, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -117, 115, 101, 114, 67, 111, 110, 102, 105, 103, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 44, 32, 99, 102, 103, 41, 10, 112, 46, -112, 111, 112, 40, 50, 41, 10, 101, 110, 100, 41, 10, 115, 105, 122, 101, 32, 61, 32, 115, 105, 122, 101, 32, 43, 32, 35, 99, 111, 110, 116, 101, -110, 116, 115, 91, 99, 102, 103, 93, 10, 101, 110, 100, 10, 105, 102, 32, 35, 112, 114, 106, 71, 114, 111, 117, 112, 32, 62, 32, 48, 32, 111, 114, - 32, 115, 105, 122, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, - 69, 108, 101, 109, 101, 110, 116, 40, 41, 10, 105, 102, 32, 35, 112, 114, 106, 71, 114, 111, 117, 112, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, -112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, -110, 40, 112, 114, 106, 71, 114, 111, 117, 112, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, -117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, -102, 103, 93, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, -111, 117, 112, 32, 37, 115, 62, 39, 44, 32, 100, 110, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 112, 46, 111, -117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, -112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, -114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, -101, 114, 101, 110, 99, 101, 80, 97, 116, 104, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 46, 112, 114, -111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, -112, 97, 116, 104, 115, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 99, 102, 103, 46, -108, 105, 98, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 112, 97, 116, 104, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, - 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 97, 116, 104, 62, 37, 115, 60, 47, 82, 101, 102, 101, 114, 101, 110, 99, 101, 80, 97, 116, -104, 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 97, 116, 104, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, -111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, -117, 103, 97, 114, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 60, 83, 116, 97, 114, 116, 65, 114, 103, 117, 109, -101, 110, 116, 115, 62, 37, 115, 60, 47, 83, 116, 97, 114, 116, 65, 114, 103, 117, 109, 101, 110, 116, 115, 62, 39, 44, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, }; - -// vstudio/vs2010.lua -static const unsigned char builtin_script_101[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, - 49, 48, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 50, 48, 49, 48, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 118, 115, 50, 48, 49, 48, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, -108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, 118, 115, 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, 97, 114, 115, 32, - 61, 32, 123, 10, 91, 34, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, - 61, 32, 34, 36, 40, 73, 110, 116, 68, 105, 114, 41, 34, 32, 125, 44, 10, 91, 34, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 34, - 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, -116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 36, 40, 80, 114, 111, 106, 101, 99, 116, 68, 105, 114, 41, 34, 32, 125, - 44, 10, 91, 34, 112, 114, 106, 46, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, - 34, 36, 40, 80, 114, 111, 106, 101, 99, 116, 78, 97, 109, 101, 41, 34, 32, 125, 44, 10, 91, 34, 115, 108, 110, 46, 108, 111, 99, 97, 116, 105, -111, 110, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, - 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 36, 40, 83, 111, 108, 117, 116, 105, 111, 110, 68, 105, 114, - 41, 34, 32, 125, 44, 10, 91, 34, 115, 108, 110, 46, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, -110, 32, 61, 32, 34, 36, 40, 83, 111, 108, 117, 116, 105, 111, 110, 78, 97, 109, 101, 41, 34, 32, 125, 44, 10, 91, 34, 119, 107, 115, 46, 108, -111, 99, 97, 116, 105, 111, 110, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, -111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 36, 40, 83, 111, 108, 117, 116, 105, -111, 110, 68, 105, 114, 41, 34, 32, 125, 44, 10, 91, 34, 119, 107, 115, 46, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, - 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 36, 40, 83, 111, 108, 117, 116, 105, 111, 110, 78, 97, 109, 101, 41, 34, 32, 125, 44, 10, 91, 34, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 93, 32, 32, 32, 61, 32, -123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 36, 40, 84, - 97, 114, 103, 101, 116, 68, 105, 114, 41, 34, 32, 125, 44, 10, 91, 34, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, -110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, -115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 36, 40, 84, 97, 114, 103, 101, 116, 70, 105, 108, 101, 78, 97, 109, 101, 41, 34, 32, -125, 44, 10, 91, 34, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 34, 93, 32, - 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, - 32, 34, 36, 40, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 41, 34, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 98, 97, 115, 101, 110, - 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, - 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 37, 40, 70, 105, 108, 101, 110, 97, 109, 101, 41, 34, 32, -125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 97, 98, 115, 112, 97, 116, 104, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, 114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, - 32, 34, 37, 40, 70, 117, 108, 108, 80, 97, 116, 104, 41, 34, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 114, 101, 108, 112, 97, 116, 104, - 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, - 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 37, 40, 73, 100, 101, 110, 116, 105, 116, 121, 41, 34, 32, 125, 44, - 10, 91, 34, 102, 105, 108, 101, 46, 112, 97, 116, 104, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, - 37, 40, 73, 100, 101, 110, 116, 105, 116, 121, 41, 34, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, - 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 116, -114, 117, 101, 44, 32, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 37, 40, 82, 111, 111, 116, 68, 105, 114, 41, 37, 40, 68, 105, 114, 101, 99, -116, 111, 114, 121, 41, 34, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 114, 101, 108, 100, 105, 114, 101, 99, 116, 111, 114, 121, 34, 93, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, -116, 111, 107, 101, 110, 32, 61, 32, 34, 37, 40, 82, 101, 108, 97, 116, 105, 118, 101, 68, 105, 114, 41, 34, 32, 125, 44, 10, 91, 34, 102, 105, -108, 101, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 34, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, - 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 37, 40, 69, 120, 116, -101, 110, 115, 105, 111, 110, 41, 34, 32, 125, 44, 10, 91, 34, 102, 105, 108, 101, 46, 110, 97, 109, 101, 34, 93, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 123, 32, 97, 98, 115, 111, 108, 117, 116, 101, 32, 61, 32, 102, 97, 108, 115, 101, - 44, 32, 116, 111, 107, 101, 110, 32, 61, 32, 34, 37, 40, 70, 105, 108, 101, 110, 97, 109, 101, 41, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, -110, 41, 34, 32, 125, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, -101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 105, 110, -100, 101, 110, 116, 40, 34, 32, 32, 34, 41, 10, 112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 118, 115, 50, 48, 49, 48, 46, 101, 115, 99, 41, - 10, 105, 102, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, - 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 99, 115, 112, 114, 111, 106, 34, 44, 32, 118, 115, 116, 117, -100, 105, 111, 46, 99, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 32, - 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, -115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, 32, - 35, 117, 115, 101, 114, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, - 46, 99, 115, 112, 114, 111, 106, 46, 117, 115, 101, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, 46, 111, 117, 116, 108, -110, 40, 117, 115, 101, 114, 41, 32, 101, 110, 100, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 112, 46, 112, 114, 111, 106, 101, 99, -116, 46, 105, 115, 102, 115, 104, 97, 114, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, -112, 114, 106, 44, 32, 34, 46, 102, 115, 112, 114, 111, 106, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 102, 115, 50, 48, 48, 53, 46, 103, -101, 110, 101, 114, 97, 116, 101, 41, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, -102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, 111, 46, 102, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, -116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, 32, 35, 117, 115, 101, 114, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 102, 115, 112, 114, 111, 106, 46, 117, 115, 101, 114, - 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, 46, 111, 117, 116, 108, 110, 40, 117, 115, 101, 114, 41, 32, 101, 110, 100, 41, - 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 40, 112, 114, 106, 41, 32, 111, -114, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 99, 112, 112, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, -114, 106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 108, 111, - 99, 97, 108, 32, 112, 114, 111, 106, 70, 105, 108, 101, 77, 111, 100, 105, 102, 105, 101, 100, 32, 61, 32, 112, 46, 103, 101, 110, 101, 114, 97, 116, -101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 99, 120, 105, 116, 101, 109, 115, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 49, 51, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 105, 102, 32, 116, 114, 101, 101, 46, 104, 97, 115, 98, 114, 97, 110, 99, 104, 101, 115, - 40, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 41, 32, 116, 104, 101, -110, 10, 105, 102, 32, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 99, 120, 105, 116, 101, 109, 115, 46, -102, 105, 108, 116, 101, 114, 115, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, -101, 70, 105, 108, 116, 101, 114, 115, 41, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 112, 114, 111, 106, 70, 105, 108, 101, 77, 111, -100, 105, 102, 105, 101, 100, 32, 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 112, 46, 116, 111, 117, 99, 104, 40, 112, 114, 106, - 44, 32, 34, 46, 118, 99, 120, 105, 116, 101, 109, 115, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, -108, 32, 112, 114, 111, 106, 70, 105, 108, 101, 77, 111, 100, 105, 102, 105, 101, 100, 32, 61, 32, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, -112, 114, 106, 44, 32, 34, 46, 118, 99, 120, 112, 114, 111, 106, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 46, -103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 108, 111, 99, 97, 108, 32, 117, 115, 101, 114, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, - 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, - 97, 116, 101, 85, 115, 101, 114, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, 32, 35, 117, 115, 101, 114, 32, 62, 32, 48, 32, 116, -104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 99, 120, 112, 114, 111, 106, 46, 117, 115, -101, 114, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, 46, 111, 117, 116, 108, 110, 40, 117, 115, 101, 114, 41, 32, 101, 110, -100, 41, 10, 101, 110, 100, 10, 105, 102, 32, 116, 114, 101, 101, 46, 104, 97, 115, 98, 114, 97, 110, 99, 104, 101, 115, 40, 112, 114, 111, 106, 101, - 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, - 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 46, 118, 99, 120, 112, 114, 111, 106, 46, 102, 105, 108, 116, 101, 114, 115, - 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 70, 105, 108, 116, 101, 114, -115, 41, 32, 61, 61, 32, 116, 114, 117, 101, 32, 97, 110, 100, 32, 112, 114, 111, 106, 70, 105, 108, 101, 77, 111, 100, 105, 102, 105, 101, 100, 32, - 61, 61, 32, 102, 97, 108, 115, 101, 32, 116, 104, 101, 110, 10, 112, 46, 116, 111, 117, 99, 104, 40, 112, 114, 106, 44, 32, 34, 46, 118, 99, 120, -112, 114, 111, 106, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 118, 115, -116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 115, 117, 112, 112, 111, 114, 116, 115, 80, 97, 99, 107, 97, 103, 101, 82, -101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, -101, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, -111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 97, 99, 107, 97, 103, 101, 115, 67, 111, 110, 102, -105, 103, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, 105, 102, 32, 35, 112, 97, 99, 107, 97, 103, 101, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 44, 32, 34, 112, 97, 99, 107, 97, 103, 101, 115, 46, 99, 111, 110, -102, 105, 103, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, 46, 111, 117, 116, 108, 110, 40, 112, 97, 99, 107, 97, 103, 101, -115, 41, 32, 101, 110, 100, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 97, 112, -116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, - 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 78, 117, 71, 101, 116, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 101, 110, 100, 41, 10, -105, 102, 32, 35, 99, 111, 110, 102, 105, 103, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, -114, 106, 44, 32, 34, 78, 117, 71, 101, 116, 46, 67, 111, 110, 102, 105, 103, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 112, - 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 102, 105, 103, 41, 32, 101, 110, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 82, 117, 108, 101, 40, 114, 117, 108, -101, 41, 10, 112, 46, 101, 111, 108, 40, 34, 92, 114, 92, 110, 34, 41, 10, 112, 46, 105, 110, 100, 101, 110, 116, 40, 34, 32, 32, 34, 41, 10, -112, 46, 101, 115, 99, 97, 112, 101, 114, 40, 118, 115, 50, 48, 49, 48, 46, 101, 115, 99, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, - 40, 114, 117, 108, 101, 44, 32, 34, 46, 112, 114, 111, 112, 115, 34, 44, 32, 118, 115, 50, 48, 49, 48, 46, 114, 117, 108, 101, 115, 46, 112, 114, -111, 112, 115, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 114, 117, 108, 101, 44, 32, 34, - 46, 116, 97, 114, 103, 101, 116, 115, 34, 44, 32, 118, 115, 50, 48, 49, 48, 46, 114, 117, 108, 101, 115, 46, 116, 97, 114, 103, 101, 116, 115, 46, -103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 112, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 114, 117, 108, 101, 44, 32, 34, 46, 120, 109, 108, - 34, 44, 32, 118, 115, 50, 48, 49, 48, 46, 114, 117, 108, 101, 115, 46, 120, 109, 108, 46, 103, 101, 110, 101, 114, 97, 116, 101, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 118, 115, 50, 48, 49, 48, 46, 101, 115, 99, 40, 118, 97, 108, 117, 101, 41, 10, 118, 97, 108, -117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 38, 39, 44, 32, 32, 34, 38, 97, 109, 112, 59, 34, 41, 10, 118, - 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 60, 39, 44, 32, 32, 34, 38, 108, 116, 59, 34, 41, 10, -118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 58, 103, 115, 117, 98, 40, 39, 62, 39, 44, 32, 32, 34, 38, 103, 116, 59, 34, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 118, 97, 108, 117, 101, 10, 101, 110, 100, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, -105, 103, 103, 101, 114, 32, 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 49, 48, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, - 32, 32, 61, 32, 34, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 48, 34, 44, 10, 100, 101, 115, 99, 114, 105, -112, 116, 105, 111, 110, 32, 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, - 50, 48, 49, 48, 32, 112, 114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, - 34, 119, 105, 110, 100, 111, 119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 49, 48, 48, 34, - 44, 10, 118, 97, 108, 105, 100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, -112, 34, 44, 32, 34, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, - 34, 83, 104, 97, 114, 101, 100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 44, - 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, -123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, 34, 32, 125, 44, 10, 118, 97, 108, 105, -100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 109, 115, 99, 34, - 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, 34, 32, 125, 44, 10, 125, 44, 10, 111, -110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 118, 115, 116, 117, 100, -105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, -101, 110, 100, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, -115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, -106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 82, 117, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 117, 108, 101, 41, 10, -118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 82, 117, 108, 101, 40, 114, 117, 108, 101, - 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 119, 107, 115, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 83, 111, 108, 117, 116, 105, 111, 110, 40, 119, 107, -115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, - 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, -114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, - 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 118, 115, 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, - 97, 114, 115, 44, 10, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 123, 10, 99, 115, 112, 114, 111, 106, 83, 99, 104, 101, 109, 97, 86, 101, 114, -115, 105, 111, 110, 32, 61, 32, 34, 50, 46, 48, 34, 44, 10, 112, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, - 32, 32, 61, 32, 34, 56, 46, 48, 46, 51, 48, 55, 48, 51, 34, 44, 10, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, - 32, 32, 32, 32, 32, 61, 32, 34, 49, 49, 34, 44, 10, 118, 101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 61, 32, 34, 50, 48, 49, 48, 34, 44, 10, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 32, 32, 32, 32, 61, - 32, 34, 52, 46, 48, 34, 44, 10, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 52, - 46, 48, 34, 44, 10, 125, 10, 125, 10, }; - -// vstudio/vs2010_nuget.lua -static const unsigned char builtin_script_102[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, -116, 50, 48, 49, 48, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, -117, 100, 105, 111, 10, 108, 111, 99, 97, 108, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 10, 108, 111, 99, 97, 108, 32, 100, 110, 50, 48, 48, 53, 32, 61, 32, 112, 46, 118, 115, 116, 117, -100, 105, 111, 46, 100, 111, 116, 110, 101, 116, 98, 97, 115, 101, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, -110, 102, 111, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 73, 110, 102, -111, 115, 32, 61, 32, 123, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, -103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 99, 107, 97, 103, 101, 58, 115, 117, 98, - 40, 48, 44, 32, 112, 97, 99, 107, 97, 103, 101, 58, 102, 105, 110, 100, 40, 34, 58, 34, 41, 32, 45, 32, 49, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 86, 101, 114, 115, 105, 111, 110, - 40, 112, 97, 99, 107, 97, 103, 101, 41, 10, 114, 101, 116, 117, 114, 110, 32, 112, 97, 99, 107, 97, 103, 101, 58, 115, 117, 98, 40, 112, 97, 99, -107, 97, 103, 101, 58, 102, 105, 110, 100, 40, 34, 58, 34, 41, 32, 43, 32, 49, 44, 32, 45, 49, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 70, 114, 97, 109, 101, 119, 111, 114, 107, 40, -112, 114, 106, 41, 10, 105, 102, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 112, 114, 106, 41, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, -114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, - 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, - 32, 61, 32, 99, 102, 103, 46, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 111, 114, 32, 97, 99, 116, 105, 111, 110, - 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 10, 114, 101, 116, 117, 114, 110, 32, -100, 110, 50, 48, 48, 53, 46, 102, 111, 114, 109, 97, 116, 78, 117, 71, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, -111, 110, 40, 102, 114, 97, 109, 101, 119, 111, 114, 107, 41, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 34, 110, 97, 116, 105, 118, -101, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 115, 117, -112, 112, 111, 114, 116, 115, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 114, 101, 116, -117, 114, 110, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 55, 34, 32, 97, 110, 100, 32, 112, 46, 112, 114, -111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 40, 112, 114, 106, 44, 32, 112, - 97, 99, 107, 97, 103, 101, 41, 10, 108, 111, 99, 97, 108, 32, 105, 100, 32, 61, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, -107, 97, 103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, -110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 86, 101, 114, 115, 105, 111, 110, 40, 112, 97, 99, 107, 97, 103, 101, - 41, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 101, 120, 97, 109, 105, 110, 101, 80, 97, 99, 107, 97, 103, 101, 70, -114, 111, 109, 67, 97, 99, 104, 101, 40, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 34, 119, 105, 110, -100, 111, 119, 115, 34, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 97, 99, -104, 101, 80, 97, 116, 104, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 106, 111, 105, -110, 40, 111, 115, 46, 103, 101, 116, 101, 110, 118, 40, 34, 117, 115, 101, 114, 112, 114, 111, 102, 105, 108, 101, 34, 41, 44, 32, 34, 46, 110, 117, -103, 101, 116, 47, 112, 97, 99, 107, 97, 103, 101, 115, 34, 44, 32, 105, 100, 41, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 100, 105, 114, 40, - 99, 97, 99, 104, 101, 80, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, - 73, 110, 102, 111, 32, 61, 32, 123, 125, 10, 112, 114, 105, 110, 116, 102, 40, 34, 69, 120, 97, 109, 105, 110, 105, 110, 103, 32, 99, 97, 99, 104, -101, 100, 32, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 46, 46, 46, 34, 44, 32, 105, 100, 41, 10, 105, -111, 46, 102, 108, 117, 115, 104, 40, 41, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 80, 97, 116, 104, 32, 61, 32, 112, 97, -116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 99, 97, 99, 104, 101, 80, 97, 116, 104, - 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 41, 10, 108, 111, 99, 97, 108, 32, 110, 117, 115, 112, 101, 99, 80, 97, 116, 104, 32, 61, 32, 112, - 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, 97, 116, 104, 46, 106, 111, 105, 110, 40, 118, 101, 114, 115, 105, 111, 110, 80, - 97, 116, 104, 44, 32, 105, 100, 32, 46, 46, 32, 34, 46, 110, 117, 115, 112, 101, 99, 34, 41, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 115, - 46, 105, 115, 102, 105, 108, 101, 40, 110, 117, 115, 112, 101, 99, 80, 97, 116, 104, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, -101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 110, 117, 115, 112, 101, 99, 32, 61, 32, 105, 111, 46, 114, 101, 97, 100, 102, 105, 108, 101, 40, 110, -117, 115, 112, 101, 99, 80, 97, 116, 104, 41, 10, 105, 102, 32, 110, 111, 116, 32, 110, 117, 115, 112, 101, 99, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 10, 101, 110, 100, 10, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 118, 101, 114, 98, 97, 116, 105, 109, - 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 110, 117, 115, 112, 101, 99, 58, 109, 97, 116, 99, 104, 40, 34, 60, 118, 101, 114, 115, 105, 111, 110, - 62, 40, 46, 43, 41, 60, 47, 118, 101, 114, 115, 105, 111, 110, 62, 34, 41, 10, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, - 46, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 118, 101, 114, 115, 105, 111, 110, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 99, 107, 97, 103, -101, 65, 80, 73, 73, 110, 102, 111, 46, 118, 101, 114, 98, 97, 116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 114, 101, -116, 117, 114, 110, 10, 101, 110, 100, 10, 105, 102, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 105, 115, 100, 111, 116, 110, 101, 116, 40, 112, -114, 106, 41, 32, 116, 104, 101, 110, 10, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 112, 97, 99, 107, 97, 103, 101, 69, -110, 116, 114, 105, 101, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 111, 115, 46, 109, 97, 116, 99, 104, 102, 105, 108, 101, 115, 40, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 112, - 97, 116, 104, 46, 106, 111, 105, 110, 40, 118, 101, 114, 115, 105, 111, 110, 80, 97, 116, 104, 44, 32, 34, 42, 42, 34, 41, 41, 41, 41, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, -110, 115, 105, 111, 110, 40, 102, 105, 108, 101, 41, 10, 105, 102, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 126, 61, 32, 34, 46, 110, 117, -112, 107, 103, 34, 32, 97, 110, 100, 32, 101, 120, 116, 101, 110, 115, 105, 111, 110, 32, 126, 61, 32, 34, 46, 115, 104, 97, 53, 49, 50, 34, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, - 46, 112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, -112, 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 118, 101, 114, 115, 105, 111, 110, 80, 97, 116, 104, 44, 32, 102, 105, -108, 101, 41, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, - 46, 112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 10, 101, 110, 100, 10, 105, 102, 32, 110, 117, 115, 112, 101, 99, 58, 109, 97, 116, 99, 104, 40, 34, 60, 102, 114, 97, 109, 101, 119, 111, 114, 107, - 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 62, 40, 46, 43, 41, 60, 47, 102, 114, 97, 109, 101, 119, 111, 114, 107, 65, 115, 115, 101, 109, 98, -108, 105, 101, 115, 62, 34, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, -103, 101, 32, 39, 37, 115, 39, 32, 109, 97, 121, 32, 100, 101, 112, 101, 110, 100, 32, 111, 110, 32, 46, 78, 69, 84, 32, 70, 114, 97, 109, 101, -119, 111, 114, 107, 32, 97, 115, 115, 101, 109, 98, 108, 105, 101, 115, 32, 45, 32, 112, 97, 99, 107, 97, 103, 101, 32, 100, 101, 112, 101, 110, 100, -101, 110, 99, 105, 101, 115, 32, 97, 114, 101, 32, 99, 117, 114, 114, 101, 110, 116, 108, 121, 32, 117, 110, 105, 109, 112, 108, 101, 109, 101, 110, 116, -101, 100, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 117, 115, 112, 101, 99, 58, 109, 97, 116, 99, 104, - 40, 34, 60, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 62, 40, 46, 43, 41, 60, 47, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, -101, 115, 62, 34, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, - 32, 39, 37, 115, 39, 32, 109, 97, 121, 32, 100, 101, 112, 101, 110, 100, 32, 111, 110, 32, 111, 116, 104, 101, 114, 32, 112, 97, 99, 107, 97, 103, -101, 115, 32, 45, 32, 112, 97, 99, 107, 97, 103, 101, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 97, 114, 101, 32, 99, 117, -114, 114, 101, 110, 116, 108, 121, 32, 117, 110, 105, 109, 112, 108, 101, 109, 101, 110, 116, 101, 100, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, 10, -112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 115, 91, 112, 97, 99, 107, 97, 103, 101, 93, 32, 61, 32, 112, 97, 99, 107, 97, -103, 101, 65, 80, 73, 73, 110, 102, 111, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 99, 107, 97, 103, 101, - 65, 80, 73, 73, 110, 102, 111, 115, 91, 112, 97, 99, 107, 97, 103, 101, 93, 32, 116, 104, 101, 110, 10, 101, 120, 97, 109, 105, 110, 101, 80, 97, - 99, 107, 97, 103, 101, 70, 114, 111, 109, 67, 97, 99, 104, 101, 40, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 99, 107, - 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 115, 91, 112, 97, 99, 107, 97, 103, 101, 93, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, - 32, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 73, 110, 102, 111, 115, 91, 112, 114, 106, 46, 110, 117, 103, 101, 116, 115, 111, 117, -114, 99, 101, 93, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 73, 110, 102, -111, 32, 61, 32, 123, 125, 10, 112, 114, 105, 110, 116, 102, 40, 34, 69, 120, 97, 109, 105, 110, 105, 110, 103, 32, 78, 117, 71, 101, 116, 32, 112, - 97, 99, 107, 97, 103, 101, 32, 115, 111, 117, 114, 99, 101, 32, 39, 37, 115, 39, 46, 46, 46, 34, 44, 32, 112, 114, 106, 46, 110, 117, 103, 101, -116, 115, 111, 117, 114, 99, 101, 41, 10, 105, 111, 46, 102, 108, 117, 115, 104, 40, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 112, 111, 110, -115, 101, 44, 32, 101, 114, 114, 44, 32, 99, 111, 100, 101, 32, 61, 32, 104, 116, 116, 112, 46, 103, 101, 116, 40, 112, 114, 106, 46, 110, 117, 103, -101, 116, 115, 111, 117, 114, 99, 101, 41, 10, 105, 102, 32, 101, 114, 114, 32, 126, 61, 32, 34, 79, 75, 34, 32, 116, 104, 101, 110, 10, 112, 46, -101, 114, 114, 111, 114, 40, 34, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 101, 114, 114, 111, 114, 32, 40, 37, 100, 41, 92, 110, 37, 115, 34, - 44, 32, 99, 111, 100, 101, 44, 32, 101, 114, 114, 41, 10, 101, 110, 100, 10, 114, 101, 115, 112, 111, 110, 115, 101, 44, 32, 101, 114, 114, 32, 61, - 32, 106, 115, 111, 110, 46, 100, 101, 99, 111, 100, 101, 40, 114, 101, 115, 112, 111, 110, 115, 101, 41, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, -115, 112, 111, 110, 115, 101, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 100, -101, 99, 111, 100, 101, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 37, 115, 41, 34, 44, 32, -101, 114, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 114, 101, 115, 111, 117, 114, 99, -101, 115, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, -115, 116, 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 110, 111, 32, 114, 101, 115, -111, 117, 114, 99, 101, 115, 32, 105, 110, 32, 114, 101, 115, 112, 111, 110, 115, 101, 41, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, 10, 108, 111, - 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, 85, 114, 105, 84, 101, 109, -112, 108, 97, 116, 101, 44, 32, 99, 97, 116, 97, 108, 111, 103, 10, 102, 111, 114, 32, 95, 44, 32, 114, 101, 115, 111, 117, 114, 99, 101, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 114, 101, 115, 112, 111, 110, 115, 101, 46, 114, 101, 115, 111, 117, 114, 99, 101, 115, 41, 32, 100, 111, 10, -105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 111, 117, 114, 99, 101, 91, 34, 64, 105, 100, 34, 93, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, -114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, - 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 110, 111, 32, 114, 101, 115, 111, 117, 114, 99, 101, 91, 39, 64, 105, 100, 39, 93, - 41, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 111, 117, 114, 99, 101, 91, 34, 64, 116, 121, 112, 101, 34, 93, - 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, - 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 110, 111, 32, 114, 101, 115, 111, 117, -114, 99, 101, 91, 39, 64, 116, 121, 112, 101, 39, 93, 41, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 114, 101, 115, 111, 117, 114, 99, 101, 91, - 34, 64, 116, 121, 112, 101, 34, 93, 58, 102, 105, 110, 100, 40, 34, 80, 97, 99, 107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, - 97, 100, 97, 116, 97, 85, 114, 105, 84, 101, 109, 112, 108, 97, 116, 101, 34, 41, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 10, 112, 97, 99, -107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, 85, 114, 105, 84, 101, 109, 112, 108, 97, 116, 101, 32, 61, - 32, 114, 101, 115, 111, 117, 114, 99, 101, 10, 101, 110, 100, 10, 105, 102, 32, 114, 101, 115, 111, 117, 114, 99, 101, 91, 34, 64, 116, 121, 112, 101, - 34, 93, 58, 102, 105, 110, 100, 40, 34, 67, 97, 116, 97, 108, 111, 103, 34, 41, 32, 61, 61, 32, 49, 32, 116, 104, 101, 110, 10, 99, 97, 116, - 97, 108, 111, 103, 32, 61, 32, 114, 101, 115, 111, 117, 114, 99, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 112, - 97, 99, 107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, 85, 114, 105, 84, 101, 109, 112, 108, 97, 116, 101, - 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, - 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 110, 111, 32, 80, 97, 99, 107, 97, -103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, 85, 114, 105, 84, 101, 109, 112, 108, 97, 116, 101, 32, 114, 101, 115, -111, 117, 114, 99, 101, 41, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 99, 97, 116, 97, 108, 111, 103, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 115, 111, 117, 114, 99, 101, 32, 61, 61, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47, - 97, 112, 105, 46, 110, 117, 103, 101, 116, 46, 111, 114, 103, 47, 118, 51, 47, 105, 110, 100, 101, 120, 46, 106, 115, 111, 110, 34, 32, 116, 104, 101, -110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, - 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 110, 111, 32, 67, 97, 116, 97, 108, 111, 103, 32, 114, -101, 115, 111, 117, 114, 99, 101, 41, 34, 41, 10, 101, 108, 115, 101, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 80, 97, 99, 107, 97, 103, 101, - 32, 115, 111, 117, 114, 99, 101, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 78, 117, 71, 101, 116, 32, 103, 97, 108, 108, 101, 114, 121, 32, 45, - 32, 110, 111, 110, 45, 103, 97, 108, 108, 101, 114, 121, 32, 115, 111, 117, 114, 99, 101, 115, 32, 97, 114, 101, 32, 99, 117, 114, 114, 101, 110, 116, -108, 121, 32, 117, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 34, 44, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 115, 111, 117, 114, 99, 101, - 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, -101, 73, 110, 102, 111, 46, 112, 97, 99, 107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, 85, 114, 105, 84, -101, 109, 112, 108, 97, 116, 101, 32, 61, 32, 112, 97, 99, 107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, - 85, 114, 105, 84, 101, 109, 112, 108, 97, 116, 101, 10, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 73, 110, 102, 111, 46, 99, 97, -116, 97, 108, 111, 103, 32, 61, 32, 99, 97, 116, 97, 108, 111, 103, 10, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 73, 110, 102, -111, 115, 91, 112, 114, 106, 46, 110, 117, 103, 101, 116, 115, 111, 117, 114, 99, 101, 93, 32, 61, 32, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, -114, 99, 101, 73, 110, 102, 111, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, - 32, 61, 32, 123, 125, 10, 112, 114, 105, 110, 116, 102, 40, 34, 69, 120, 97, 109, 105, 110, 105, 110, 103, 32, 78, 117, 71, 101, 116, 32, 112, 97, - 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 46, 46, 46, 34, 44, 32, 105, 100, 41, 10, 105, 111, 46, 102, 108, 117, 115, 104, 40, 41, 10, 108, -111, 99, 97, 108, 32, 114, 101, 115, 112, 111, 110, 115, 101, 44, 32, 101, 114, 114, 44, 32, 99, 111, 100, 101, 32, 61, 32, 104, 116, 116, 112, 46, -103, 101, 116, 40, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 73, 110, 102, 111, 115, 91, 112, 114, 106, 46, 110, 117, 103, 101, 116, -115, 111, 117, 114, 99, 101, 93, 46, 112, 97, 99, 107, 97, 103, 101, 68, 105, 115, 112, 108, 97, 121, 77, 101, 116, 97, 100, 97, 116, 97, 85, 114, -105, 84, 101, 109, 112, 108, 97, 116, 101, 91, 34, 64, 105, 100, 34, 93, 58, 103, 115, 117, 98, 40, 34, 123, 105, 100, 37, 45, 108, 111, 119, 101, -114, 125, 34, 44, 32, 105, 100, 58, 108, 111, 119, 101, 114, 40, 41, 41, 41, 10, 105, 102, 32, 101, 114, 114, 32, 126, 61, 32, 34, 79, 75, 34, - 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 111, 100, 101, 32, 61, 61, 32, 52, 48, 52, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, -114, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 102, 111, 114, 32, 112, 114, 111, 106, 101, 99, -116, 32, 39, 37, 115, 39, 32, 99, 111, 117, 108, 100, 110, 39, 116, 32, 98, 101, 32, 102, 111, 117, 110, 100, 32, 105, 110, 32, 116, 104, 101, 32, -114, 101, 112, 111, 115, 105, 116, 111, 114, 121, 34, 44, 32, 105, 100, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 108, 115, 101, 10, -112, 46, 101, 114, 114, 111, 114, 40, 34, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 101, 114, 114, 111, 114, 32, 40, 37, 100, 41, 92, 110, 37, -115, 34, 44, 32, 99, 111, 100, 101, 44, 32, 101, 114, 114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 115, 112, 111, 110, 115, 101, 44, - 32, 101, 114, 114, 32, 61, 32, 106, 115, 111, 110, 46, 100, 101, 99, 111, 100, 101, 40, 114, 101, 115, 112, 111, 110, 115, 101, 41, 10, 105, 102, 32, -110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, -100, 32, 116, 111, 32, 100, 101, 99, 111, 100, 101, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, - 37, 115, 41, 34, 44, 32, 101, 114, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 105, -116, 101, 109, 115, 32, 111, 114, 32, 35, 114, 101, 115, 112, 111, 110, 115, 101, 46, 105, 116, 101, 109, 115, 32, 61, 61, 32, 48, 32, 116, 104, 101, -110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, - 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 110, 111, 32, 112, 97, 103, 101, 115, 32, 102, 111, 114, - 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 41, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 105, -116, 101, 109, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 112, 97, 103, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, -114, 101, 115, 112, 111, 110, 115, 101, 46, 105, 116, 101, 109, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 103, 101, 46, 105, -116, 101, 109, 115, 32, 111, 114, 32, 35, 112, 97, 103, 101, 46, 105, 116, 101, 109, 115, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, -101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, 78, 117, 71, 101, -116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 103, 111, 116, 32, 97, 32, 112, 97, 103, 101, 32, 119, 105, 116, 104, 32, -110, 111, 32, 105, 116, 101, 109, 115, 32, 102, 111, 114, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 41, 34, 44, 32, 105, 100, 41, - 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 97, 103, 101, 46, -105, 116, 101, 109, 115, 41, 32, 100, 111, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 105, 116, 101, 109, 115, 44, 32, 105, 116, -101, 109, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, 110, 115, 32, 61, 32, 123, 125, 10, -102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 105, 116, 101, 109, 115, 41, 32, 100, 111, 10, -105, 102, 32, 110, 111, 116, 32, 105, 116, 101, 109, 46, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 32, 116, 104, 101, 110, 10, 112, 46, -101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, 78, 117, 71, 101, -116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 115, 117, 98, 105, 116, 101, 109, 32, 111, 102, 32, 112, 97, 99, 107, 97, -103, 101, 32, 39, 37, 115, 39, 32, 104, 97, 115, 32, 110, 111, 32, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 41, 34, 44, 32, 105, -100, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 105, 116, 101, 109, 46, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 46, -118, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, -117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 115, -117, 98, 105, 116, 101, 109, 32, 111, 102, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 104, 97, 115, 32, 110, 111, 32, 99, 97, -116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 46, 118, 101, 114, 115, 105, 111, 110, 41, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, 10, 105, 102, - 32, 110, 111, 116, 32, 105, 116, 101, 109, 46, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 91, 34, 64, 105, 100, 34, 93, 32, 116, 104, -101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, - 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 115, 117, 98, 105, 116, 101, 109, 32, 111, 102, 32, -112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 104, 97, 115, 32, 110, 111, 32, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, - 91, 39, 64, 105, 100, 39, 93, 41, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -118, 101, 114, 115, 105, 111, 110, 115, 44, 32, 105, 116, 101, 109, 46, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 46, 118, 101, 114, 115, -105, 111, 110, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 118, -101, 114, 115, 105, 111, 110, 115, 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, -105, 111, 110, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 118, 101, 114, 115, 105, 111, 110, 115, 44, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 118, 97, 108, 117, 101, 41, 32, 114, 101, 116, 117, 114, 110, 32, 34, 39, 34, 32, 46, 46, 32, 118, - 97, 108, 117, 101, 32, 46, 46, 32, 34, 39, 34, 32, 101, 110, 100, 41, 10, 111, 112, 116, 105, 111, 110, 115, 32, 61, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 111, 112, 116, 105, 111, 110, 115, 44, 32, 34, 44, 32, 34, 41, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, - 39, 37, 115, 39, 32, 105, 115, 32, 110, 111, 116, 32, 97, 32, 118, 97, 108, 105, 100, 32, 118, 101, 114, 115, 105, 111, 110, 32, 102, 111, 114, 32, - 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 40, 111, 112, 116, 105, 111, 110, 115, 32, 97, 114, 101, 58, - 32, 37, 115, 41, 34, 44, 32, 118, 101, 114, 115, 105, 111, 110, 44, 32, 105, 100, 44, 32, 111, 112, 116, 105, 111, 110, 115, 41, 10, 101, 110, 100, - 10, 102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 105, 116, 101, 109, 115, 41, 32, 100, 111, - 10, 105, 102, 32, 105, 116, 101, 109, 46, 99, 97, 116, 97, 108, 111, 103, 69, 110, 116, 114, 121, 46, 118, 101, 114, 115, 105, 111, 110, 32, 61, 61, - 32, 118, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 112, 111, 110, 115, 101, 44, 32, 101, 114, -114, 44, 32, 99, 111, 100, 101, 32, 61, 32, 104, 116, 116, 112, 46, 103, 101, 116, 40, 105, 116, 101, 109, 46, 99, 97, 116, 97, 108, 111, 103, 69, -110, 116, 114, 121, 91, 34, 64, 105, 100, 34, 93, 41, 10, 105, 102, 32, 101, 114, 114, 32, 126, 61, 32, 34, 79, 75, 34, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 99, 111, 100, 101, 32, 61, 61, 32, 52, 48, 52, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 78, 117, - 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 118, 101, 114, 115, 105, 111, 110, 32, 39, 37, 115, 39, 32, 99, 111, -117, 108, 100, 110, 39, 116, 32, 98, 101, 32, 102, 111, 117, 110, 100, 32, 105, 110, 32, 116, 104, 101, 32, 114, 101, 112, 111, 115, 105, 116, 111, 114, -121, 32, 101, 118, 101, 110, 32, 116, 104, 111, 117, 103, 104, 32, 116, 104, 101, 32, 65, 80, 73, 32, 114, 101, 112, 111, 114, 116, 101, 100, 32, 116, -104, 97, 116, 32, 105, 116, 32, 101, 120, 105, 115, 116, 115, 34, 44, 32, 105, 100, 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 108, 115, -101, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 101, 114, 114, 111, 114, 32, 40, 37, 100, 41, 92, -110, 37, 115, 34, 44, 32, 99, 111, 100, 101, 44, 32, 101, 114, 114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 115, 112, 111, 110, 115, -101, 44, 32, 101, 114, 114, 32, 61, 32, 106, 115, 111, 110, 46, 100, 101, 99, 111, 100, 101, 40, 114, 101, 115, 112, 111, 110, 115, 101, 41, 10, 105, -102, 32, 110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, -108, 101, 100, 32, 116, 111, 32, 100, 101, 99, 111, 100, 101, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, - 32, 40, 37, 115, 41, 34, 44, 32, 101, 114, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, 101, - 46, 118, 101, 114, 98, 97, 116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 32, 97, 110, 100, 32, 110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, -101, 46, 118, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, -111, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, - 40, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 118, 101, 114, 115, 105, 111, 110, 32, 39, 37, 115, 39, 32, 104, 97, 115, 32, 110, -111, 32, 118, 101, 114, 98, 97, 116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 118, 101, 114, 115, 105, 111, 110, 41, 34, 44, 32, -105, 100, 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, -118, 101, 114, 98, 97, 116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 118, 101, 114, 98, 97, -116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 10, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 118, 101, 114, 115, 105, 111, -110, 32, 61, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 118, 101, 114, 115, 105, 111, 110, 10, 105, 102, 32, 112, 114, 106, 46, 108, 97, 110, 103, -117, 97, 103, 101, 32, 61, 61, 32, 34, 67, 35, 34, 32, 97, 110, 100, 32, 110, 111, 116, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 112, 97, - 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 78, 117, 71, 101, 116, - 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 118, 101, 114, 115, 105, 111, 110, 32, 39, 37, 115, 39, 32, 104, 97, 115, 32, 110, -111, 32, 102, 105, 108, 101, 32, 108, 105, 115, 116, 105, 110, 103, 46, 32, 84, 104, 105, 115, 32, 112, 97, 99, 107, 97, 103, 101, 32, 109, 105, 103, -104, 116, 32, 98, 101, 32, 116, 111, 111, 32, 111, 108, 100, 32, 116, 111, 32, 98, 101, 32, 117, 115, 105, 110, 103, 32, 116, 104, 105, 115, 32, 65, - 80, 73, 32, 111, 114, 32, 105, 116, 32, 109, 105, 103, 104, 116, 32, 98, 101, 32, 97, 32, 67, 43, 43, 32, 112, 97, 99, 107, 97, 103, 101, 32, -105, 110, 115, 116, 101, 97, 100, 32, 111, 102, 32, 97, 32, 46, 78, 69, 84, 32, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 112, 97, 99, 107, - 97, 103, 101, 46, 34, 44, 32, 105, 100, 44, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, - 10, 105, 102, 32, 112, 114, 106, 46, 108, 97, 110, 103, 117, 97, 103, 101, 32, 61, 61, 32, 34, 67, 35, 34, 32, 116, 104, 101, 110, 10, 112, 97, - 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 32, 61, 32, 123, 125, - 10, 102, 111, 114, 32, 95, 44, 32, 105, 116, 101, 109, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 114, 101, 115, 112, 111, 110, 115, 101, 46, -112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 105, 116, 101, 109, 46, 102, -117, 108, 108, 78, 97, 109, 101, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 70, 97, 105, 108, 101, 100, 32, 116, 111, 32, -117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 32, 78, 117, 71, 101, 116, 32, 65, 80, 73, 32, 114, 101, 115, 112, 111, 110, 115, 101, 32, 40, 112, - 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 118, 101, 114, 115, 105, 111, 110, 32, 39, 37, 115, 39, 32, 112, 97, 99, 107, 97, 103, 101, - 69, 110, 116, 114, 121, 32, 104, 97, 115, 32, 110, 111, 32, 102, 117, 108, 108, 78, 97, 109, 101, 41, 34, 44, 32, 105, 100, 44, 32, 118, 101, 114, -115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 97, 99, 107, 97, 103, 101, 65, 80, - 73, 73, 110, 102, 111, 46, 112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, -108, 97, 116, 101, 40, 105, 116, 101, 109, 46, 102, 117, 108, 108, 78, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 112, 97, 99, -107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 46, 112, 97, 99, 107, 97, 103, 101, 69, 110, 116, 114, 105, 101, 115, 32, 61, 61, 32, 48, 32, -116, 104, 101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, - 32, 102, 105, 108, 101, 32, 108, 105, 115, 116, 105, 110, 103, 32, 105, 115, 32, 101, 109, 112, 116, 121, 34, 44, 32, 105, 100, 41, 10, 101, 110, 100, - 10, 105, 102, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 102, 114, 97, 109, 101, 119, 111, 114, 107, 65, 115, 115, 101, 109, 98, 108, 121, 71, 114, -111, 117, 112, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, - 37, 115, 39, 32, 109, 97, 121, 32, 100, 101, 112, 101, 110, 100, 32, 111, 110, 32, 46, 78, 69, 84, 32, 70, 114, 97, 109, 101, 119, 111, 114, 107, - 32, 97, 115, 115, 101, 109, 98, 108, 105, 101, 115, 32, 45, 32, 112, 97, 99, 107, 97, 103, 101, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, -101, 115, 32, 97, 114, 101, 32, 99, 117, 114, 114, 101, 110, 116, 108, 121, 32, 117, 110, 105, 109, 112, 108, 101, 109, 101, 110, 116, 101, 100, 34, 44, - 32, 105, 100, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 114, 101, 115, 112, 111, 110, 115, 101, 46, 100, 101, 112, 101, 110, 100, 101, -110, 99, 121, 71, 114, 111, 117, 112, 115, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, -107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 109, 97, 121, 32, 100, 101, 112, 101, 110, 100, 32, 111, 110, 32, 111, 116, 104, 101, 114, 32, 112, 97, - 99, 107, 97, 103, 101, 115, 32, 45, 32, 112, 97, 99, 107, 97, 103, 101, 32, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 32, 97, 114, -101, 32, 99, 117, 114, 114, 101, 110, 116, 108, 121, 32, 117, 110, 105, 109, 112, 108, 101, 109, 101, 110, 116, 101, 100, 34, 44, 32, 105, 100, 41, 10, -101, 110, 100, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, -115, 91, 112, 97, 99, 107, 97, 103, 101, 93, 32, 61, 32, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 10, 101, 110, 100, 10, -114, 101, 116, 117, 114, 110, 32, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 115, 91, 112, 97, 99, 107, 97, 103, 101, 93, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, - 97, 99, 107, 97, 103, 101, 115, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 105, 102, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, - 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 117, 116, 102, 45, 56, 34, 63, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, - 60, 112, 97, 99, 107, 97, 103, 101, 115, 62, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 112, 97, 99, 107, 97, 103, 101, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 110, 117, 103, 101, 116, 41, 32, 100, 111, 10, 112, 46, 120, 40, 39, 60, 112, 97, 99, 107, 97, 103, -101, 32, 105, 100, 61, 34, 37, 115, 34, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 34, 32, 116, 97, 114, 103, 101, 116, 70, 114, 97, -109, 101, 119, 111, 114, 107, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, -103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 44, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, - 86, 101, 114, 115, 105, 111, 110, 40, 112, 97, 99, 107, 97, 103, 101, 41, 44, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 112, 97, 99, 107, - 97, 103, 101, 70, 114, 97, 109, 101, 119, 111, 114, 107, 40, 112, 114, 106, 41, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, -112, 97, 99, 107, 97, 103, 101, 115, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, -101, 116, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 78, 117, 71, 101, 116, 67, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, -105, 102, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, -110, 100, 10, 105, 102, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 115, 111, 117, 114, 99, 101, 32, 61, 61, 32, 34, 104, 116, 116, 112, 115, 58, - 47, 47, 97, 112, 105, 46, 110, 117, 103, 101, 116, 46, 111, 114, 103, 47, 118, 51, 47, 105, 110, 100, 101, 120, 46, 106, 115, 111, 110, 34, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, -110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 117, 116, 102, 45, 56, 34, 63, 62, 39, 41, 10, 112, 46, 112, -117, 115, 104, 40, 39, 60, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, -112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 115, 62, 39, 41, 10, 112, 46, 120, 40, 39, 60, 99, 108, 101, 97, 114, 32, 47, 62, - 39, 41, 10, 112, 46, 120, 40, 39, 60, 97, 100, 100, 32, 107, 101, 121, 61, 34, 37, 115, 34, 32, 118, 97, 108, 117, 101, 61, 34, 37, 115, 34, - 32, 47, 62, 39, 44, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 115, 111, 117, 114, 99, 101, 44, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, -115, 111, 117, 114, 99, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 112, 97, 99, 107, 97, 103, 101, 83, 111, 117, 114, 99, 101, 115, 62, - 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 117, 110, 105, 113, 117, 101, 80, 114, 111, 106, 101, 99, -116, 76, 111, 99, 97, 116, 105, 111, 110, 115, 87, 105, 116, 104, 78, 117, 71, 101, 116, 40, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 108, -111, 99, 97, 116, 105, 111, 110, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, -112, 97, 99, 101, 46, 101, 97, 99, 104, 112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, -110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 115, 117, 112, 112, 111, 114, 116, 115, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, - 99, 101, 115, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 102, 97, 105, -108, 40, 41, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 112, 114, 111, 106, 101, 99, 116, 115, 32, 39, 37, 115, 39, 32, 97, 110, 100, 32, 39, - 37, 115, 39, 32, 99, 97, 110, 110, 111, 116, 32, 104, 97, 118, 101, 32, 116, 104, 101, 32, 115, 97, 109, 101, 32, 108, 111, 99, 97, 116, 105, 111, -110, 32, 119, 104, 101, 110, 32, 117, 115, 105, 110, 103, 32, 78, 117, 71, 101, 116, 32, 119, 105, 116, 104, 32, 100, 105, 102, 102, 101, 114, 101, 110, -116, 32, 112, 97, 99, 107, 97, 103, 101, 115, 32, 40, 112, 97, 99, 107, 97, 103, 101, 115, 46, 99, 111, 110, 102, 105, 103, 32, 99, 111, 110, 102, -108, 105, 99, 116, 41, 34, 44, 32, 108, 111, 99, 97, 116, 105, 111, 110, 115, 91, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 93, 46, -110, 97, 109, 101, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 111, 99, 97, 116, 105, 111, 110, 115, - 91, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 93, 32, 97, 110, 100, 32, 35, 108, 111, 99, 97, 116, 105, 111, 110, 115, 91, 112, 114, -106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 93, 46, 110, 117, 103, 101, 116, 32, 62, 32, 48, 32, 97, 110, 100, 32, 35, 112, 114, 106, 46, 110, -117, 103, 101, 116, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 105, 102, 32, 35, 108, 111, 99, 97, 116, 105, 111, 110, 115, 91, 112, 114, 106, 46, -108, 111, 99, 97, 116, 105, 111, 110, 93, 46, 110, 117, 103, 101, 116, 32, 126, 61, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 32, 116, 104, -101, 110, 10, 102, 97, 105, 108, 40, 41, 10, 101, 110, 100, 10, 102, 111, 114, 32, 105, 44, 32, 112, 97, 99, 107, 97, 103, 101, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 108, 111, 99, 97, 116, 105, 111, 110, 115, 91, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 93, 46, 110, -117, 103, 101, 116, 41, 32, 100, 111, 10, 105, 102, 32, 112, 114, 106, 46, 110, 117, 103, 101, 116, 91, 105, 93, 32, 126, 61, 32, 112, 97, 99, 107, - 97, 103, 101, 32, 116, 104, 101, 110, 10, 102, 97, 105, 108, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, -116, 105, 111, 110, 115, 91, 112, 114, 106, 46, 108, 111, 99, 97, 116, 105, 111, 110, 93, 32, 61, 32, 112, 114, 106, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 112, 46, 111, 118, 101, 114, 114, 105, 100, 101, 40, 112, 46, 118, 97, 108, 105, 100, 97, 116, 105, 111, 110, 46, 101, 108, -101, 109, 101, 110, 116, 115, 44, 32, 34, 119, 111, 114, 107, 115, 112, 97, 99, 101, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, -108, 100, 102, 110, 44, 32, 119, 107, 115, 41, 10, 108, 111, 99, 97, 108, 32, 116, 32, 61, 32, 111, 108, 100, 102, 110, 40, 119, 107, 115, 41, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 44, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 117, 110, 105, 113, 117, 101, - 80, 114, 111, 106, 101, 99, 116, 76, 111, 99, 97, 116, 105, 111, 110, 115, 87, 105, 116, 104, 78, 117, 71, 101, 116, 41, 10, 114, 101, 116, 117, 114, -110, 32, 116, 10, 101, 110, 100, 41, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 78, 117, 71, 101, -116, 72, 97, 115, 72, 84, 84, 80, 40, 112, 114, 106, 41, 10, 105, 102, 32, 110, 111, 116, 32, 104, 116, 116, 112, 32, 97, 110, 100, 32, 35, 112, -114, 106, 46, 110, 117, 103, 101, 116, 32, 62, 32, 48, 32, 97, 110, 100, 32, 110, 111, 116, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 115, -117, 112, 112, 111, 114, 116, 115, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 32, 116, 104, -101, 110, 10, 112, 46, 101, 114, 114, 111, 114, 40, 34, 80, 114, 101, 109, 97, 107, 101, 32, 119, 97, 115, 32, 99, 111, 109, 112, 105, 108, 101, 100, - 32, 119, 105, 116, 104, 32, 45, 45, 110, 111, 45, 99, 117, 114, 108, 44, 32, 98, 117, 116, 32, 67, 117, 114, 108, 32, 105, 115, 32, 114, 101, 113, -117, 105, 114, 101, 100, 32, 102, 111, 114, 32, 78, 117, 71, 101, 116, 32, 115, 117, 112, 112, 111, 114, 116, 32, 40, 112, 114, 111, 106, 101, 99, 116, - 32, 39, 37, 115, 39, 32, 105, 115, 32, 114, 101, 102, 101, 114, 101, 110, 99, 105, 110, 103, 32, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, -103, 101, 115, 41, 34, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 78, 117, 71, 101, 116, 80, 97, 99, 107, 97, 103, 101, 83, 116, 114, 105, 110, 103, 115, 40, -112, 114, 106, 41, 10, 102, 111, 114, 32, 95, 44, 32, 112, 97, 99, 107, 97, 103, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, -106, 46, 110, 117, 103, 101, 116, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 111, 109, 112, 111, 110, 101, 110, 116, 115, 32, 61, 32, 112, - 97, 99, 107, 97, 103, 101, 58, 101, 120, 112, 108, 111, 100, 101, 40, 34, 58, 34, 41, 10, 105, 102, 32, 35, 99, 111, 109, 112, 111, 110, 101, 110, -116, 115, 32, 126, 61, 32, 50, 32, 111, 114, 32, 35, 99, 111, 109, 112, 111, 110, 101, 110, 116, 115, 91, 49, 93, 32, 61, 61, 32, 48, 32, 111, -114, 32, 35, 99, 111, 109, 112, 111, 110, 101, 110, 116, 115, 91, 50, 93, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 101, 114, 114, -111, 114, 40, 34, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 32, 39, 37, 115, 39, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, -116, 32, 39, 37, 115, 39, 32, 105, 115, 32, 105, 110, 118, 97, 108, 105, 100, 32, 45, 32, 112, 108, 101, 97, 115, 101, 32, 103, 105, 118, 101, 32, -112, 97, 99, 107, 97, 103, 101, 115, 32, 105, 110, 32, 116, 104, 101, 32, 102, 111, 114, 109, 97, 116, 32, 39, 105, 100, 58, 118, 101, 114, 115, 105, -111, 110, 39, 44, 32, 101, 46, 103, 46, 32, 39, 78, 85, 110, 105, 116, 58, 51, 46, 54, 46, 49, 39, 34, 44, 32, 112, 97, 99, 107, 97, 103, -101, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 111, 118, 101, 114, 114, -105, 100, 101, 40, 112, 46, 118, 97, 108, 105, 100, 97, 116, 105, 111, 110, 46, 101, 108, 101, 109, 101, 110, 116, 115, 44, 32, 34, 112, 114, 111, 106, -101, 99, 116, 34, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 111, 108, 100, 102, 110, 44, 32, 112, 114, 106, 41, 10, 108, 111, 99, 97, -108, 32, 116, 32, 61, 32, 111, 108, 100, 102, 110, 40, 112, 114, 106, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 116, 44, - 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 78, 117, 71, 101, 116, 72, 97, 115, 72, 84, 84, 80, 41, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 116, 44, 32, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 78, 117, 71, 101, 116, 80, 97, 99, 107, 97, 103, 101, 83, -116, 114, 105, 110, 103, 115, 41, 10, 114, 101, 116, 117, 114, 110, 32, 116, 10, 101, 110, 100, 41, 10, }; - -// vstudio/vs2010_vcxproj.lua -static const unsigned char builtin_script_103[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 49, 48, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, -108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, -110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, - 32, 112, 46, 116, 114, 101, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 49, 48, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, - 69, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 120, 109, 108, 68, -101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, - 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 44, 10, 109, 46, 103, 108, 111, 98, 97, 108, 115, 44, 10, 109, 46, 105, 109, 112, -111, 114, 116, 68, 101, 102, 97, 117, 108, 116, 80, 114, 111, 112, 115, 44, 10, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, - 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 71, 114, 111, 117, 112, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 76, 97, 110, 103, 117, 97, 103, -101, 83, 101, 116, 116, 105, 110, 103, 115, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 83, 101, 116, 116, -105, 110, 103, 115, 44, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 83, 104, 101, 101, 116, 71, 114, 111, 117, 112, 44, 10, 109, 46, 117, 115, -101, 114, 77, 97, 99, 114, 111, 115, 44, 10, 109, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 71, 114, 111, 117, -112, 44, 10, 109, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 115, 44, 10, 109, 46, 97, 115, 115, -101, 109, 98, 108, 121, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 109, 46, 102, 105, 108, 101, 115, 44, 10, 109, 46, 112, 114, 111, 106, -101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 76, 97, 110, 103, 117, 97, 103, 101, 84, - 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, 103, 101, 116, 115, - 44, 10, 109, 46, 101, 110, 115, 117, 114, 101, 78, 117, 71, 101, 116, 80, 97, 99, 107, 97, 103, 101, 66, 117, 105, 108, 100, 73, 109, 112, 111, 114, -116, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, -106, 41, 10, 112, 46, 117, 116, 102, 56, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 112, 114, 106, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, -116, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, - 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, - 40, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 57, 34, 32, 116, 104, 101, 110, 10, 112, - 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 68, 101, 102, 97, 117, 108, 116, 84, 97, 114, 103, 101, 116, 115, 61, 34, - 66, 117, 105, 108, 100, 34, 32, 120, 109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, -114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 100, 101, 118, 101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, 105, 108, 100, 47, 50, 48, 48, - 51, 34, 62, 39, 41, 10, 101, 108, 115, 101, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 68, 101, 102, 97, -117, 108, 116, 84, 97, 114, 103, 101, 116, 115, 61, 34, 66, 117, 105, 108, 100, 34, 32, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 61, - 34, 37, 115, 34, 32, 120, 109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, 114, 111, -115, 111, 102, 116, 46, 99, 111, 109, 47, 100, 101, 118, 101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, 105, 108, 100, 47, 50, 48, 48, 51, 34, - 62, 39, 44, 10, 32, 32, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, -111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 112, 108, 97, 116, 102, 111, 114, 109, -115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, -110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 97, 114, 99, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, -111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 116, 114, 117, 101, 41, 10, 105, 102, 32, 110, -111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 112, 108, 97, 116, 102, 111, 114, 109, 115, 44, 32, 97, 114, 99, -104, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 112, 108, 97, 116, 102, 111, 114, 109, 115, 44, 32, - 97, 114, 99, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 102, 105, 103, 115, 32, 61, 32, 123, 125, - 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 32, 76, 97, 98, 101, 108, 61, 34, 80, 114, 111, 106, 101, - 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 34, 62, 39, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, -112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 102, 111, 114, 32, 95, - 44, 32, 97, 114, 99, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 108, 97, 116, 102, 111, 114, 109, 115, 41, 32, 100, 111, 10, 108, -111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, -102, 105, 103, 40, 99, 102, 103, 44, 32, 97, 114, 99, 104, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 111, 110, 102, 105, 103, 115, 91, 112, 114, -106, 99, 102, 103, 93, 32, 116, 104, 101, 110, 10, 99, 111, 110, 102, 105, 103, 115, 91, 112, 114, 106, 99, 102, 103, 93, 32, 61, 32, 112, 114, 106, - 99, 102, 103, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, -110, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, -116, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 97, 114, 99, 104, 41, 41, 10, 112, 46, 120, 40, 39, 60, 67, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 62, 37, 115, 60, 47, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 44, 32, 118, 115, 116, -117, 100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 41, 10, 112, 46, 119, 40, 39, - 60, 80, 108, 97, 116, 102, 111, 114, 109, 62, 37, 115, 60, 47, 80, 108, 97, 116, 102, 111, 114, 109, 62, 39, 44, 32, 97, 114, 99, 104, 41, 10, -112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 62, 39, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, - 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, -107, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, -117, 114, 114, 101, 110, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, -114, 109, 97, 116, 40, 39, 32, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 34, 39, 44, 32, 97, 99, 116, 105, 111, -110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 102, 114, - 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 112, 114, 106, 46, 100, 111, 116, 110, 101, 116, 102, 114, 97, 109, 101, 119, 111, 114, 107, 32, 111, 114, - 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, -111, 114, 32, 34, 52, 46, 48, 34, 10, 112, 46, 119, 40, 39, 60, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, -114, 115, 105, 111, 110, 62, 118, 37, 115, 60, 47, 84, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 86, 101, 114, 115, 105, 111, -110, 62, 39, 44, 32, 102, 114, 97, 109, 101, 119, 111, 114, 107, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, -108, 111, 98, 97, 108, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, -109, 46, 112, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 44, 10, 109, 46, 105, 103, 110, 111, 114, 101, 87, 97, 114, 110, 68, 117, 112, 108, 105, - 99, 97, 116, 101, 70, 105, 108, 101, 110, 97, 109, 101, 44, 10, 109, 46, 107, 101, 121, 119, 111, 114, 100, 44, 10, 109, 46, 112, 114, 111, 106, 101, - 99, 116, 78, 97, 109, 101, 44, 10, 109, 46, 112, 114, 101, 102, 101, 114, 114, 101, 100, 84, 111, 111, 108, 65, 114, 99, 104, 105, 116, 101, 99, 116, -117, 114, 101, 44, 10, 109, 46, 108, 97, 116, 101, 115, 116, 84, 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, 111, 114, 109, 86, 101, 114, 115, 105, -111, 110, 44, 10, 109, 46, 119, 105, 110, 100, 111, 119, 115, 84, 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, 111, 114, 109, 86, 101, 114, 115, 105, -111, 110, 44, 10, 125, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, 67, 111, 110, 100, -105, 116, 105, 111, 110, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, -110, 32, 123, 10, 109, 46, 119, 105, 110, 100, 111, 119, 115, 84, 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, 111, 114, 109, 86, 101, 114, 115, 105, -111, 110, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 108, 111, 98, 97, 108, 115, 40, 112, 114, 106, - 41, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 110, 105, 108, 44, 32, 34, 71, 108, 111, 98, 97, 108, 115, 34, - 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, - 44, 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, - 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, -114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 97, 112, 116, 117, 114, 101, 100, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, -101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, -121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, 67, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 112, -114, 106, 44, 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 99, 97, 112, 116, 117, 114, 101, -100, 32, 126, 61, 32, 39, 39, 32, 116, 104, 101, 110, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 99, 102, 103, - 44, 32, 34, 71, 108, 111, 98, 97, 108, 115, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, -110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, 67, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 112, 114, 106, 44, 32, 99, 102, 103, 41, 10, -112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 114, -111, 112, 101, 114, 116, 105, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, -107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, 89, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, -109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 44, 10, 109, 46, 112, 108, 97, 116, 102, 111, 114, 109, 84, -111, 111, 108, 115, 101, 116, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 99, 111, 110, 102, 105, 103, -117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 44, 10, 109, 46, 117, 115, 101, 68, 101, 98, 117, 103, 76, 105, 98, 114, 97, 114, 105, 101, 115, - 44, 10, 109, 46, 117, 115, 101, 79, 102, 77, 102, 99, 44, 10, 109, 46, 117, 115, 101, 79, 102, 65, 116, 108, 44, 10, 109, 46, 99, 108, 114, 83, -117, 112, 112, 111, 114, 116, 44, 10, 109, 46, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, 101, 116, 44, 10, 109, 46, 112, 108, 97, 116, 102, 111, -114, 109, 84, 111, 111, 108, 115, 101, 116, 44, 10, 109, 46, 119, 104, 111, 108, 101, 80, 114, 111, 103, 114, 97, 109, 79, 112, 116, 105, 109, 105, 122, - 97, 116, 105, 111, 110, 44, 10, 109, 46, 110, 109, 97, 107, 101, 79, 117, 116, 68, 105, 114, 115, 44, 10, 109, 46, 119, 105, 110, 100, 111, 119, 115, - 83, 68, 75, 68, 101, 115, 107, 116, 111, 112, 65, 82, 77, 83, 117, 112, 112, 111, 114, 116, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, -101, 115, 40, 99, 102, 103, 41, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 99, 102, 103, 44, 32, 34, 67, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, -101, 110, 116, 115, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 32, 99, 102, -103, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 80, 114, 111, 112, 101, 114, 116, -105, 101, 115, 71, 114, 111, 117, 112, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, - 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, -105, 111, 110, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, 89, 32, -116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 111, 117, 116, 68, 105, 114, 44, 10, 109, 46, 105, 110, 116, 68, 105, 114, - 44, 10, 109, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 84, 111, 68, 101, 108, 101, 116, 101, 79, 110, 67, 108, 101, 97, 110, 44, 10, 109, - 46, 101, 120, 101, 99, 117, 116, 97, 98, 108, 101, 80, 97, 116, 104, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, - 10, 109, 46, 108, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 44, 10, 109, 46, 105, 103, 110, 111, 114, 101, 73, 109, 112, 111, -114, 116, 76, 105, 98, 114, 97, 114, 121, 44, 10, 109, 46, 111, 117, 116, 68, 105, 114, 44, 10, 109, 46, 105, 110, 116, 68, 105, 114, 44, 10, 109, - 46, 116, 97, 114, 103, 101, 116, 78, 97, 109, 101, 44, 10, 109, 46, 116, 97, 114, 103, 101, 116, 69, 120, 116, 44, 10, 109, 46, 105, 110, 99, 108, -117, 100, 101, 80, 97, 116, 104, 44, 10, 109, 46, 108, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 44, 10, 109, 46, 103, 101, 110, 101, 114, 97, -116, 101, 77, 97, 110, 105, 102, 101, 115, 116, 44, 10, 109, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 84, 111, 68, 101, 108, 101, 116, 101, - 79, 110, 67, 108, 101, 97, 110, 44, 10, 109, 46, 101, 120, 101, 99, 117, 116, 97, 98, 108, 101, 80, 97, 116, 104, 44, 10, 125, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, - 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 99, 102, 103, 41, 10, 112, - 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, -101, 114, 116, 105, 101, 115, 44, 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, -111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 110, 109, 97, 107, 101, 80, -114, 111, 112, 101, 114, 116, 105, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 109, 46, 101, 120, 101, 99, 117, 116, 97, 98, 108, 101, 80, 97, 116, 104, 44, 10, 109, 46, 105, 110, 99, 108, 117, 100, 101, 80, 97, -116, 104, 44, 10, 109, 46, 108, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 44, 10, 109, 46, 110, 109, 97, 107, 101, 79, 117, 116, 112, 117, 116, - 44, 10, 109, 46, 110, 109, 97, 107, 101, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 44, 10, 109, 46, 110, 109, 97, 107, 101, 82, -101, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 44, 10, 109, 46, 110, 109, 97, 107, 101, 67, 108, 101, 97, 110, 67, 111, 109, 109, - 97, 110, 100, 115, 44, 10, 109, 46, 110, 109, 97, 107, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, -105, 111, 110, 115, 44, 10, 109, 46, 110, 109, 97, 107, 101, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 115, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 110, 109, 97, 107, 101, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 99, 102, 103, 41, 10, 105, -102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, - 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 99, 102, 103, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, -109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 110, 109, 97, 107, 101, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 32, 99, 102, 103, 41, - 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 71, 114, -111, 117, 112, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, - 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 109, 46, 111, 117, 116, 112, 117, 116, 80, 114, 111, 112, 101, 114, 116, 105, 101, -115, 40, 99, 102, 103, 41, 10, 109, 46, 110, 109, 97, 107, 101, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 99, 102, 103, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, -114, 111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, - 32, 61, 61, 32, 112, 46, 85, 84, 73, 76, 73, 84, 89, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 117, -108, 101, 86, 97, 114, 115, 44, 10, 109, 46, 98, 117, 105, 108, 100, 69, 118, 101, 110, 116, 115, 44, 10, 109, 46, 98, 117, 105, 108, 100, 76, 111, -103, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 44, 10, -109, 46, 98, 117, 105, 108, 100, 83, 116, 101, 112, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 44, 10, 109, 46, 114, 101, 115, 111, -117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 44, 10, 109, 46, 108, 105, 110, 107, 101, 114, 44, 10, 109, 46, 109, 97, 110, 105, 102, 101, 115, -116, 44, 10, 109, 46, 98, 117, 105, 108, 100, 69, 118, 101, 110, 116, 115, 44, 10, 109, 46, 114, 117, 108, 101, 86, 97, 114, 115, 44, 10, 109, 46, - 98, 117, 105, 108, 100, 76, 111, 103, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, -116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 118, -115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, -115, 104, 40, 39, 60, 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 32, 37, 115, 62, 39, 44, 32, 109, - 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 44, 32, 99, 102, 103, - 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, 39, - 41, 10, 101, 108, 115, 101, 10, 105, 102, 32, 99, 102, 103, 32, 61, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, -116, 99, 111, 110, 102, 105, 103, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, - 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 119, 40, 39, 60, 47, 73, 116, -101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 115, - 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, -102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 109, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, -112, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 108, 67, 111, 109, 112, -105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 115, 32, - 61, 32, 123, 10, 109, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 44, 10, 109, 46, 119, 97, 114, 110, 105, -110, 103, 76, 101, 118, 101, 108, 44, 10, 109, 46, 116, 114, 101, 97, 116, 87, 97, 114, 110, 105, 110, 103, 65, 115, 69, 114, 114, 111, 114, 44, 10, -109, 46, 100, 105, 115, 97, 98, 108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 44, 10, 109, 46, 116, 114, 101, - 97, 116, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, 44, 10, 109, 46, 98, 97, -115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 44, 10, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 80, 114, 101, -112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, -101, 85, 110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, - 44, 10, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, -114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, - 85, 115, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 102, 111, 114, 99, 101, 73, 110, 99, 108, 117, 100, 101, -115, 44, 10, 109, 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, 111, 114, 109, 97, 116, 44, 10, 109, 46, 111, -112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 44, 10, 109, 46, 102, 117, 110, 99, 116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, 107, -105, 110, 103, 44, 10, 109, 46, 105, 110, 116, 114, 105, 110, 115, 105, 99, 70, 117, 110, 99, 116, 105, 111, 110, 115, 44, 10, 109, 46, 109, 105, 110, -105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 44, 10, 109, 46, 111, 109, 105, 116, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, 114, 115, - 44, 10, 109, 46, 115, 116, 114, 105, 110, 103, 80, 111, 111, 108, 105, 110, 103, 44, 10, 109, 46, 114, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, - 97, 114, 121, 44, 10, 109, 46, 111, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 44, 10, 109, 46, 101, 120, 99, 101, 112, 116, 105, -111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 44, 10, 109, 46, 114, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 44, 10, 109, - 46, 98, 117, 102, 102, 101, 114, 83, 101, 99, 117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 44, 10, 109, 46, 116, 114, 101, 97, 116, 87, 67, 104, - 97, 114, 95, 116, 65, 115, 66, 117, 105, 108, 116, 73, 110, 84, 121, 112, 101, 44, 10, 109, 46, 102, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, -110, 116, 77, 111, 100, 101, 108, 44, 10, 109, 46, 102, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, 110, 116, 69, 120, 99, 101, 112, 116, 105, 111, -110, 115, 44, 10, 109, 46, 105, 110, 108, 105, 110, 101, 70, 117, 110, 99, 116, 105, 111, 110, 69, 120, 112, 97, 110, 115, 105, 111, 110, 44, 10, 109, - 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, 44, 10, 109, - 46, 109, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 44, 10, 109, 46, 97, 100, -100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 44, 10, 109, 46, 99, 111, 109, 112, 105, 108, -101, 65, 115, 44, 10, 109, 46, 99, 97, 108, 108, 105, 110, 103, 67, 111, 110, 118, 101, 110, 116, 105, 111, 110, 44, 10, 109, 46, 108, 97, 110, 103, -117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 44, 10, 109, 46, 115, 116, 114, 117, 99, 116, 77, 101, 109, 98, 101, 114, 65, 108, 105, 103, -110, 109, 101, 110, 116, 44, 10, 125, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, - 76, 73, 66, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 97, 108, 108, 115, 44, 32, 109, 46, 112, -114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 78, 97, 109, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, -114, 110, 32, 99, 97, 108, 108, 115, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, -101, 40, 99, 102, 103, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 108, 67, 111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 112, 46, 99, - 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 44, 32, 99, -102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 108, 67, 111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 98, 117, 105, 108, 100, 83, 116, 101, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, -103, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 108, 108, 115, 32, 61, 32, 123, 10, 109, 46, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, -100, 115, 44, 10, 109, 46, 98, 117, 105, 108, 100, 77, 101, 115, 115, 97, 103, 101, 44, 10, 109, 46, 98, 117, 105, 108, 100, 79, 117, 116, 112, 117, -116, 115, 44, 10, 109, 46, 98, 117, 105, 108, 100, 73, 110, 112, 117, 116, 115, 10, 125, 10, 114, 101, 116, 117, 114, 110, 32, 99, 97, 108, 108, 115, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 105, 108, 100, 83, 116, 101, 112, 40, 99, 102, 103, 41, 10, 105, -102, 32, 35, 99, 102, 103, 46, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 111, 114, 32, 35, 99, 102, 103, - 46, 98, 117, 105, 108, 100, 79, 117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 32, 111, 114, 32, 35, 99, 102, 103, 46, 98, 117, 105, 108, 100, 73, -110, 112, 117, 116, 115, 32, 62, 32, 48, 32, 111, 114, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 77, 101, 115, 115, 97, 103, 101, 32, 116, 104, -101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 83, 116, 101, 112, 62, 39, 41, 10, 112, - 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 98, 117, 105, 108, 100, 83, 116, 101, 112, 44, - 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 83, 116, 101, 112, 62, 39, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 102, 120, 67, 111, 109, 112, -105, 108, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 44, 10, 109, 46, 102, 120, 67, -111, 109, 112, 105, 108, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 115, 44, 10, 109, 46, 102, -120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 84, 121, 112, 101, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, -104, 97, 100, 101, 114, 77, 111, 100, 101, 108, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 69, 110, 116, -114, 121, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 86, 97, 114, 105, 97, 98, 108, 101, 78, 97, 109, -101, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 72, 101, 97, 100, 101, 114, 79, 117, 116, 112, 117, 116, - 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 79, 98, 106, 101, 99, 116, 79, 117, 116, 112, 117, 116, 44, - 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 65, 115, 115, 101, 109, 98, 108, 101, 114, 44, 10, 109, 46, 102, -120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 65, 115, 115, 101, 109, 98, 108, 101, 114, 79, 117, 116, 112, 117, 116, 44, 10, 109, - 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, -115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 40, 99, 102, -103, 41, 10, 105, 102, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 112, 97, 116, 104, - 46, 105, 115, 104, 108, 115, 108, 102, 105, 108, 101, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, - 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, - 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 102, 120, 67, 111, 109, 112, 105, -108, 101, 44, 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, -116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 70, 120, 67, 111, 109, 112, 105, 108, 101, 62, 39, - 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 70, 120, 67, -111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 114, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, - 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, -108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 99, 117, 108, 116, 117, 114, 101, 44, 10, -125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 112, - 97, 116, 104, 46, 105, 115, 114, 101, 115, 111, 117, 114, 99, 101, 102, 105, 108, 101, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, -111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, -112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -114, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, -100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, - 39, 60, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, -116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 62, - 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 108, 105, 110, 107, 101, 114, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 114, 101, 116, 117, 114, -110, 32, 123, 10, 109, 46, 108, 105, 110, 107, 44, 10, 109, 46, 108, 105, 98, 44, 10, 109, 46, 108, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, - 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, -105, 110, 107, 101, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 112, 108, 105, 99, 105, 116, 32, 61, 32, 118, 115, 116, 117, -100, 105, 111, 46, 110, 101, 101, 100, 115, 69, 120, 112, 108, 105, 99, 105, 116, 76, 105, 110, 107, 40, 99, 102, 103, 41, 10, 112, 46, 99, 97, 108, -108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 108, 105, 110, 107, 101, 114, 44, 32, 99, 102, 103, 44, 32, 101, -120, 112, 108, 105, 99, 105, 116, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 108, 105, 110, 107, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, -110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, -109, 46, 115, 117, 98, 83, 121, 115, 116, 101, 109, 44, 10, 109, 46, 102, 117, 108, 108, 80, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, -115, 101, 70, 105, 108, 101, 44, 10, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, -111, 110, 44, 10, 109, 46, 111, 112, 116, 105, 109, 105, 122, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 10, 125, 10, 101, 108, 115, 101, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 115, 117, 98, 83, 121, 115, 116, 101, 109, 44, 10, 109, 46, 102, 117, 108, 108, 80, 114, 111, -103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 44, 10, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, -103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 44, 10, 109, 46, 111, 112, 116, 105, 109, 105, 122, 101, 82, 101, 102, 101, 114, 101, 110, 99, -101, 115, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 109, 46, - 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, -105, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 44, 10, 109, 46, 101, 110, 116, 114, 121, 80, 111, 105, 110, 116, 83, 121, 109, 98, 111, -108, 44, 10, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 77, 97, 112, 70, 105, 108, 101, 44, 10, 109, 46, 109, 111, 100, 117, 108, 101, 68, 101, -102, 105, 110, 105, 116, 105, 111, 110, 70, 105, 108, 101, 44, 10, 109, 46, 116, 114, 101, 97, 116, 76, 105, 110, 107, 101, 114, 87, 97, 114, 110, 105, -110, 103, 65, 115, 69, 114, 114, 111, 114, 115, 44, 10, 109, 46, 105, 103, 110, 111, 114, 101, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, -114, 105, 101, 115, 44, 10, 109, 46, 108, 97, 114, 103, 101, 65, 100, 100, 114, 101, 115, 115, 65, 119, 97, 114, 101, 44, 10, 109, 46, 116, 97, 114, -103, 101, 116, 77, 97, 99, 104, 105, 110, 101, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 110, 107, 79, 112, 116, 105, -111, 110, 115, 44, 10, 109, 46, 112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 44, 10, 109, 46, 97, 115, -115, 101, 109, 98, 108, 121, 68, 101, 98, 117, 103, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 108, 105, 110, 107, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, -101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, -117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 108, 105, 110, -107, 44, 32, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, -102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 76, 105, -110, 107, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, - 47, 76, 105, 110, 107, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 108, 105, 98, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 105, 102, 32, 99, 102, 103, - 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 109, 46, 97, -100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 109, 46, 116, -114, 101, 97, 116, 76, 105, 110, 107, 101, 114, 87, 97, 114, 110, 105, 110, 103, 65, 115, 69, 114, 114, 111, 114, 115, 44, 10, 109, 46, 116, 97, 114, -103, 101, 116, 77, 97, 99, 104, 105, 110, 101, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 110, 107, 79, 112, 116, 105, -111, 110, 115, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 105, 98, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 108, 111, 99, 97, -108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, - 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 108, 105, 98, 44, 32, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, -110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, - 40, 39, 60, 76, 105, 98, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, -112, 40, 39, 60, 47, 76, 105, 98, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, - 97, 110, 105, 102, 101, 115, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, - 10, 109, 46, 101, 110, 97, 98, 108, 101, 68, 112, 105, 65, 119, 97, 114, 101, 110, 101, 115, 115, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, -110, 97, 108, 77, 97, 110, 105, 102, 101, 115, 116, 70, 105, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 109, 97, 110, 105, 102, 101, 115, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, -112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, - 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, - 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 109, 97, 110, 105, 102, 101, 115, 116, - 44, 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 77, 97, 110, 105, 102, 101, 115, 116, 62, 39, 41, 10, 112, - 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 77, 97, 110, 105, 102, 101, -115, 116, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 105, -108, 100, 69, 118, 101, 110, 116, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 119, 114, 105, 116, 101, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 32, 40, 101, 118, 101, 110, 116, 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 101, 118, 101, 110, 116, 32, - 46, 46, 32, 34, 69, 118, 101, 110, 116, 34, 10, 108, 111, 99, 97, 108, 32, 102, 105, 101, 108, 100, 32, 61, 32, 101, 118, 101, 110, 116, 58, 108, -111, 119, 101, 114, 40, 41, 10, 108, 111, 99, 97, 108, 32, 115, 116, 101, 112, 115, 32, 61, 32, 99, 102, 103, 91, 102, 105, 101, 108, 100, 32, 46, - 46, 32, 34, 99, 111, 109, 109, 97, 110, 100, 115, 34, 93, 10, 108, 111, 99, 97, 108, 32, 109, 115, 103, 32, 61, 32, 99, 102, 103, 91, 102, 105, -101, 108, 100, 32, 46, 46, 32, 34, 109, 101, 115, 115, 97, 103, 101, 34, 93, 10, 105, 102, 32, 35, 115, 116, 101, 112, 115, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 115, 116, 101, 112, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, -115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 115, 116, 101, 112, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, -101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 112, 46, 112, 117, -115, 104, 40, 39, 60, 37, 115, 62, 39, 44, 32, 110, 97, 109, 101, 41, 10, 112, 46, 120, 40, 39, 60, 67, 111, 109, 109, 97, 110, 100, 62, 37, -115, 60, 47, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, 40, 115, 116, 101, 112, -115, 44, 32, 34, 34, 44, 32, 34, 34, 44, 32, 34, 92, 114, 92, 110, 34, 41, 41, 10, 105, 102, 32, 109, 115, 103, 32, 116, 104, 101, 110, 10, -112, 46, 120, 40, 39, 60, 77, 101, 115, 115, 97, 103, 101, 62, 37, 115, 60, 47, 77, 101, 115, 115, 97, 103, 101, 62, 39, 44, 32, 109, 115, 103, - 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 119, 114, 105, 116, 101, 40, 34, 80, 114, 101, 66, 117, 105, 108, 100, 34, 41, 10, 119, 114, 105, 116, 101, 40, 34, 80, 114, 101, 76, -105, 110, 107, 34, 41, 10, 119, 114, 105, 116, 101, 40, 34, 80, 111, 115, 116, 66, 117, 105, 108, 100, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 82, 117, 108, 101, 80, 114, 111, 112, 101, 114, 116, 121, 83, 116, 114, 105, 110, 103, 40, 114, 117, -108, 101, 44, 32, 112, 114, 111, 112, 44, 32, 118, 97, 108, 117, 101, 44, 32, 107, 105, 110, 100, 41, 10, 105, 102, 32, 107, 105, 110, 100, 32, 61, - 61, 32, 34, 108, 105, 115, 116, 58, 112, 97, 116, 104, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, - 99, 111, 110, 99, 97, 116, 40, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, 44, - 32, 39, 59, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 107, 105, 110, 100, 32, 61, 61, 32, 34, 112, 97, 116, 104, 34, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 118, 97, 108, 117, 101, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 116, 121, 112, 101, 40, 118, 97, 108, 117, 101, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 118, 97, 108, 117, 101, 44, 32, 34, - 59, 34, 41, 10, 101, 110, 100, 10, 105, 102, 32, 112, 114, 111, 112, 46, 118, 97, 108, 117, 101, 115, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, -101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 102, 105, 110, 100, 75, 101, 121, 66, 121, 86, 97, 108, 117, 101, 40, 112, 114, 111, 112, 46, 118, 97, -108, 117, 101, 115, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 116, 111, 115, 116, 114, 105, 110, 103, - 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 86, 97, 114, 115, 40, - 99, 102, 103, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 99, 102, 103, 46, 114, 117, 108, 101, 115, 32, 100, 111, 10, 108, 111, - 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 82, 117, 108, 101, 40, 99, 102, 103, 46, -114, 117, 108, 101, 115, 91, 105, 93, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, -116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 102, 111, 114, 32, 112, 114, -111, 112, 32, 105, 110, 32, 112, 46, 114, 117, 108, 101, 46, 101, 97, 99, 104, 80, 114, 111, 112, 101, 114, 116, 121, 40, 114, 117, 108, 101, 41, 32, -100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 108, 100, 32, 61, 32, 112, 46, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, 112, 101, 114, 116, -121, 70, 105, 101, 108, 100, 40, 114, 117, 108, 101, 44, 32, 112, 114, 111, 112, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, - 32, 99, 102, 103, 91, 102, 108, 100, 46, 110, 97, 109, 101, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 116, -104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 109, 46, 103, 101, 116, 82, 117, 108, 101, 80, 114, 111, 112, 101, 114, 116, 121, 83, 116, 114, -105, 110, 103, 40, 114, 117, 108, 101, 44, 32, 112, 114, 111, 112, 44, 32, 118, 97, 108, 117, 101, 44, 32, 102, 108, 100, 46, 107, 105, 110, 100, 41, - 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 126, 61, 32, 110, 105, 108, 32, 97, 110, 100, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 112, 114, 111, 112, 46, 110, 97, 109, 101, 44, 32, 110, 105, 108, 44, 32, 39, - 37, 115, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 41, 10, -101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, -104, 40, 39, 60, 37, 115, 62, 39, 44, 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, -116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 115, 115, 101, 109, 98, 108, 121, - 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 102, 103, 32, 61, 32, 112, 114, 111, 106, -101, 99, 116, 46, 103, 101, 116, 102, 105, 114, 115, 116, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, -102, 115, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 34, 115, 121, 115, 116, 101, -109, 34, 44, 32, 34, 102, 117, 108, 108, 112, 97, 116, 104, 34, 44, 32, 34, 109, 97, 110, 97, 103, 101, 100, 34, 41, 10, 105, 102, 32, 35, 114, -101, 102, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, - 39, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 114, 101, 102, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, -117, 101, 32, 61, 32, 114, 101, 102, 115, 91, 105, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 58, 102, 105, 110, 100, 40, 39, 47, 39, 44, 32, - 49, 44, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, - 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 112, 97, 116, 104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, -101, 40, 118, 97, 108, 117, 101, 41, 41, 10, 112, 46, 120, 40, 39, 60, 72, 105, 110, 116, 80, 97, 116, 104, 62, 37, 115, 60, 47, 72, 105, 110, -116, 80, 97, 116, 104, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 118, 97, 108, 117, 101, 41, 41, 10, -112, 46, 112, 111, 112, 40, 39, 60, 47, 82, 101, 102, 101, 114, 101, 110, 99, 101, 62, 39, 41, 10, 101, 108, 115, 101, 10, 112, 46, 120, 40, 39, - 60, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 112, 97, 116, -104, 46, 103, 101, 116, 98, 97, 115, 101, 110, 97, 109, 101, 40, 118, 97, 108, 117, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, -112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, -105, 102, 32, 102, 105, 108, 101, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, -104, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 105, 108, 101, 46, 100, 101, 112, 101, 110, 100, 115, 79, -110, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 117, 116, 111, 71, 101, 110, 34, 44, 32, -110, 105, 108, 44, 32, 39, 116, 114, 117, 101, 39, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, 112, 101, 110, 100, 101, 110, -116, 85, 112, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, -109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 122, 101, 83, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 95, 44, 32, -103, 114, 111, 117, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 103, 114, 111, 117, 112, 115, 41, 32, 100, 111, 10, 103, 114, 111, 117, 112, - 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 32, 61, 32, 123, 125, 10, 109, 46, 99, 97, 116, 101, -103, 111, 114, 105, 101, 115, 46, 67, 108, 73, 110, 99, 108, 117, 100, 101, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, - 61, 32, 34, 67, 108, 73, 110, 99, 108, 117, 100, 101, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 123, 32, 34, 46, -104, 34, 44, 32, 34, 46, 104, 104, 34, 44, 32, 34, 46, 104, 112, 112, 34, 44, 32, 34, 46, 104, 120, 120, 34, 44, 32, 34, 46, 105, 110, 108, - 34, 32, 125, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, 32, 49, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, -115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 108, 73, 110, 99, 108, 117, 100, 101, 34, 44, 32, 123, 109, 46, 103, 101, -110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 125, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, -117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 108, 73, 110, 99, 108, 117, 100, 101, 34, 41, 10, 101, 110, 100, 10, -125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 67, 108, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 123, 10, 110, 97, 109, -101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 67, 108, 67, 111, 109, 112, 105, 108, 101, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, -115, 32, 61, 32, 123, 32, 34, 46, 99, 99, 34, 44, 32, 34, 46, 99, 112, 112, 34, 44, 32, 34, 46, 99, 120, 120, 34, 44, 32, 34, 46, 99, - 43, 43, 34, 44, 32, 34, 46, 99, 34, 44, 32, 34, 46, 115, 34, 44, 32, 34, 46, 109, 34, 44, 32, 34, 46, 109, 109, 34, 32, 125, 44, 10, -112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, 32, 50, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, -110, 99, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, -102, 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, -114, 111, 109, 66, 117, 105, 108, 100, 44, 10, 109, 46, 111, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 44, 10, 109, 46, 99, 108, - 67, 111, 109, 112, 105, 108, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, -109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 85, 110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, -101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 111, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 44, 10, 109, 46, 102, 111, -114, 99, 101, 73, 110, 99, 108, 117, 100, 101, 115, 44, 10, 109, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, - 44, 10, 109, 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, - 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 44, 10, 109, 46, -100, 105, 115, 97, 98, 108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 44, 10, 109, 46, 116, 114, 101, 97, 116, - 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, 44, 10, 109, 46, 98, 97, 115, 105, - 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 44, 10, 109, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, -105, 110, 103, 44, 10, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, 115, 77, 97, 110, 97, 103, 101, 100, 44, 10, 109, 46, 99, 111, 109, 112, 105, -108, 101, 65, 115, 44, 10, 109, 46, 114, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 44, 10, 109, 46, 119, 97, 114, 110, 105, -110, 103, 76, 101, 118, 101, 108, 70, 105, 108, 101, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 101, -120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 109, 105, -116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 108, 67, 111, 109, 112, 105, 108, 101, 34, 44, 32, -123, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 125, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 41, 10, -101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, -103, 114, 111, 117, 112, 41, 10, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, - 32, 34, 67, 108, 67, 111, 109, 112, 105, 108, 101, 34, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, - 46, 70, 120, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 70, 120, 67, 111, 109, 112, 105, -108, 101, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 123, 32, 34, 46, 104, 108, 115, 108, 34, 32, 125, 44, 10, 112, -114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, 32, 52, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, - 99, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, - 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, -111, 109, 66, 117, 105, 108, 100, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, - 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, -108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 115, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 84, -121, 112, 101, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 77, 111, 100, 101, 108, 44, 10, 109, 46, 102, -120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 69, 110, 116, 114, 121, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, - 83, 104, 97, 100, 101, 114, 86, 97, 114, 105, 97, 98, 108, 101, 78, 97, 109, 101, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, -104, 97, 100, 101, 114, 72, 101, 97, 100, 101, 114, 79, 117, 116, 112, 117, 116, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, - 97, 100, 101, 114, 79, 98, 106, 101, 99, 116, 79, 117, 116, 112, 117, 116, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, -100, 101, 114, 65, 115, 115, 101, 109, 98, 108, 101, 114, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 65, -115, 115, 101, 109, 98, 108, 101, 114, 79, 117, 116, 112, 117, 116, 44, 10, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, -114, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 44, 10, 125, 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, -110, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 10, 125, 10, 101, 110, 100, 10, 101, 110, -100, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 70, 120, 67, 111, 109, -112, 105, 108, 101, 34, 44, 32, 110, 105, 108, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 41, 10, 101, 110, 100, 44, 10, 101, 109, -105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, -109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 70, 120, 67, 111, 109, -112, 105, 108, 101, 34, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 78, 111, 110, 101, 32, 61, - 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 78, 111, 110, 101, 34, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 61, 32, 53, 44, 10, -101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, - 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 78, 111, 110, 101, 34, 44, - 32, 123, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 125, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, -116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 102, 105, 108, -116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 78, 111, 110, 101, 34, 41, 10, 101, 110, 100, - 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 32, - 61, 32, 123, 10, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, -101, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 34, 46, 114, 99, 34, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, - 32, 32, 32, 61, 32, 54, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, - 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 32, 61, 32, 123, 10, 109, - 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 10, 125, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, - 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, 105, 108, 101, 34, 44, 32, -110, 105, 108, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, -114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 102, 105, 108, 116, 101, -114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 82, 101, 115, 111, 117, 114, 99, 101, 67, 111, 109, 112, -105, 108, 101, 34, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 67, 117, 115, 116, 111, 109, 66, -117, 105, 108, 100, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 61, 32, 34, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 34, 44, 10, 112, -114, 105, 111, 114, 105, 116, 121, 32, 61, 32, 55, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, -110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 70, 117, 110, 99, 32, 61, 32, 123, - 10, 109, 46, 102, 105, 108, 101, 84, 121, 112, 101, 10, 125, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 32, - 61, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 44, 10, 109, 46, 98, 117, 105, 108, 100, - 67, 111, 109, 109, 97, 110, 100, 115, 44, 10, 109, 46, 98, 117, 105, 108, 100, 79, 117, 116, 112, 117, 116, 115, 44, 10, 109, 46, 108, 105, 110, 107, - 79, 98, 106, 101, 99, 116, 115, 44, 10, 109, 46, 98, 117, 105, 108, 100, 77, 101, 115, 115, 97, 103, 101, 44, 10, 109, 46, 98, 117, 105, 108, 100, - 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 112, 117, 116, 115, 10, 125, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, -114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 34, 44, 32, 102, 105, 108, 101, 70, 117, -110, 99, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 99, 102, 103, 44, 32, -102, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, -109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 99, 102, 103, 41, 10, 101, 110, 100, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, -105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 102, -105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 67, 117, 115, 116, 111, 109, 66, 117, -105, 108, 100, 34, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 77, 105, 100, 108, 32, 61, 32, -123, 10, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 77, 105, 100, 108, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, -115, 32, 61, 32, 34, 46, 105, 100, 108, 34, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, 32, 56, 44, 10, 101, 109, 105, 116, - 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, - 97, 108, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 32, 61, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, -109, 66, 117, 105, 108, 100, 10, 125, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, - 32, 34, 77, 105, 100, 108, 34, 44, 32, 110, 105, 108, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 44, 32, 102, 117, 110, 99, 116, -105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, 46, - 87, 73, 78, 68, 79, 87, 83, 10, 101, 110, 100, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, -112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 77, 105, 100, 108, 34, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, -116, 101, 103, 111, 114, 105, 101, 115, 46, 77, 97, 115, 109, 32, 61, 32, 123, 10, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, - 77, 97, 115, 109, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 61, 32, 34, 46, 97, 115, 109, 34, 44, 10, 112, 114, 105, 111, -114, 105, 116, 121, 32, 32, 32, 61, 32, 57, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 32, 61, - 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 102, 99, -102, 103, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 77, 97, 115, 109, 80, 114, 101, 112, 114, 111, 99, 101, 115, -115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, -105, 108, 100, 44, 10, 109, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 83, 69, 72, 44, 10, 125, 10, 101, -108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, - 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, -112, 44, 32, 34, 77, 97, 115, 109, 34, 44, 32, 110, 105, 108, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 41, 10, 101, 110, 100, - 44, 10, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, -117, 112, 41, 10, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 77, - 97, 115, 109, 34, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 83, 101, 116, 116, 105, 110, 103, 115, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 112, 46, 119, 40, 39, 60, 73, 109, -112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 86, 67, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, - 66, 117, 105, 108, 100, 67, 117, 115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 92, 92, 109, 97, 115, 109, 46, 112, 114, 111, 112, 115, 34, - 32, 47, 62, 39, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, 103, 101, 116, 115, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, -111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 86, 67, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, 66, -117, 105, 108, 100, 67, 117, 115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 92, 92, 109, 97, 115, 109, 46, 116, 97, 114, 103, 101, 116, 115, - 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 73, 109, 97, 103, 101, 32, - 61, 32, 123, 10, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 73, 109, 97, 103, 101, 34, 44, 10, 101, 120, 116, 101, 110, 115, -105, 111, 110, 115, 32, 61, 32, 123, 32, 34, 46, 103, 105, 102, 34, 44, 32, 34, 46, 106, 112, 103, 34, 44, 32, 34, 46, 106, 112, 101, 34, 44, - 32, 34, 46, 112, 110, 103, 34, 44, 32, 34, 46, 98, 109, 112, 34, 44, 32, 34, 46, 100, 105, 98, 34, 44, 32, 34, 42, 46, 116, 105, 102, 34, - 44, 32, 34, 42, 46, 119, 109, 102, 34, 44, 32, 34, 42, 46, 114, 97, 115, 34, 44, 32, 34, 42, 46, 101, 112, 115, 34, 44, 32, 34, 42, 46, -112, 99, 120, 34, 44, 32, 34, 42, 46, 112, 99, 100, 34, 44, 32, 34, 42, 46, 116, 103, 97, 34, 44, 32, 34, 42, 46, 100, 100, 115, 34, 32, -125, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, 32, 49, 48, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 67, -102, 103, 70, 117, 110, 99, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, -110, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 10, -125, 10, 101, 110, 100, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 73, -109, 97, 103, 101, 34, 44, 32, 110, 105, 108, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 41, 10, 101, 110, 100, 44, 10, 101, 109, -105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, -109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 73, 109, 97, 103, 101, - 34, 41, 10, 101, 110, 100, 10, 125, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 78, 97, 116, 118, 105, 115, 32, 61, 32, 123, - 10, 110, 97, 109, 101, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 78, 97, 116, 118, 105, 115, 34, 44, 10, 101, 120, 116, 101, 110, 115, 105, 111, -110, 115, 32, 61, 32, 123, 32, 34, 46, 110, 97, 116, 118, 105, 115, 34, 32, 125, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 32, 61, - 32, 49, 49, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, -114, 111, 117, 112, 41, 10, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 78, - 97, 116, 118, 105, 115, 34, 44, 32, 123, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 100, 70, 105, 108, 101, 125, 41, 10, 101, 110, 100, 44, 10, -101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, - 41, 10, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 34, 78, 97, 116, -118, 105, 115, 34, 41, 10, 101, 110, 100, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 122, -101, 83, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 95, 118, 99, 50, 48, 49, 48, 95, 115, 111, 117, -114, 99, 101, 115, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 114, 106, 46, 95, 118, 99, 50, 48, 49, 48, 95, 115, 111, 117, -114, 99, 101, 115, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, - 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, 123, 125, 10, 112, 114, 106, 46, 95, 118, 99, 50, 48, 49, 48, 95, 115, 111, 117, 114, 99, 101, 115, - 32, 61, 32, 114, 101, 115, 117, 108, 116, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, -115, 111, 117, 114, 99, 101, 116, 114, 101, 101, 40, 112, 114, 106, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, 118, 101, 114, 115, 101, 40, 116, 114, - 44, 32, 123, 10, 111, 110, 108, 101, 97, 102, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 110, 111, 100, 101, 41, 10, 108, 111, 99, 97, -108, 32, 99, 97, 116, 32, 61, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 122, 101, 70, 105, 108, 101, 40, 112, 114, 106, 44, 32, 110, 111, -100, 101, 41, 10, 103, 114, 111, 117, 112, 115, 91, 99, 97, 116, 46, 110, 97, 109, 101, 93, 32, 61, 32, 103, 114, 111, 117, 112, 115, 91, 99, 97, -116, 46, 110, 97, 109, 101, 93, 32, 111, 114, 32, 123, 10, 99, 97, 116, 101, 103, 111, 114, 121, 32, 61, 32, 99, 97, 116, 44, 10, 102, 105, 108, -101, 115, 32, 61, 32, 123, 125, 10, 125, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 103, 114, 111, 117, 112, 115, 91, 99, 97, -116, 46, 110, 97, 109, 101, 93, 46, 102, 105, 108, 101, 115, 44, 32, 110, 111, 100, 101, 41, 10, 101, 110, 100, 10, 125, 41, 10, 102, 111, 114, 32, -110, 97, 109, 101, 44, 32, 103, 114, 111, 117, 112, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 103, 114, 111, 117, 112, 115, 41, 32, 100, 111, 10, -116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 103, 114, 111, 117, 112, 46, 102, 105, 108, 101, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 40, 97, 44, 32, 98, 41, 10, 114, 101, 116, 117, 114, 110, 32, 97, 46, 114, 101, 108, 112, 97, 116, 104, 32, 60, 32, 98, 46, 114, 101, 108, -112, 97, 116, 104, 10, 101, 110, 100, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 103, -114, 111, 117, 112, 41, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 114, 101, 115, 117, 108, 116, 44, 32, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 40, 97, 44, 32, 98, 41, 10, 105, 102, 32, 40, 97, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 112, 114, 105, 111, -114, 105, 116, 121, 32, 61, 61, 32, 98, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 112, 114, 105, 111, 114, 105, 116, 121, 41, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 97, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 110, 97, 109, 101, 32, 60, 32, 98, 46, 99, 97, 116, -101, 103, 111, 114, 121, 46, 110, 97, 109, 101, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 97, 46, 99, 97, 116, 101, 103, 111, 114, 121, - 46, 112, 114, 105, 111, 114, 105, 116, 121, 32, 60, 32, 98, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 112, 114, 105, 111, 114, 105, 116, 121, 10, -101, 110, 100, 41, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 122, 101, 70, 105, 108, 101, 40, 112, 114, 106, 44, 32, 102, 105, 108, 101, 41, 10, 102, 111, 114, 32, - 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, -102, 105, 103, 40, 102, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 99, 102, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, -105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 82, 117, 108, 101, 40, 102, 99, 102, -103, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 67, 117, 115, 116, -111, 109, 66, 117, 105, 108, 100, 10, 101, 110, 100, 10, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 97, 99, 116, 105, 111, 110, 32, -116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 91, 102, 99, 102, 103, 46, 98, 117, -105, 108, 100, 97, 99, 116, 105, 111, 110, 93, 32, 111, 114, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 46, 78, 111, 110, 101, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, 61, 32, 112, 46, 103, 108, 111, 98, 97, -108, 46, 103, 101, 116, 82, 117, 108, 101, 70, 111, 114, 70, 105, 108, 101, 40, 102, 105, 108, 101, 46, 110, 97, 109, 101, 44, 32, 112, 114, 106, 46, -114, 117, 108, 101, 115, 41, 10, 105, 102, 32, 114, 117, 108, 101, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 110, 97, 109, -101, 32, 32, 32, 32, 32, 32, 61, 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 44, 10, 112, 114, 105, 111, 114, 105, 116, 121, 32, 32, 61, 32, - 49, 48, 48, 44, 10, 114, 117, 108, 101, 32, 32, 32, 32, 32, 32, 61, 32, 114, 117, 108, 101, 44, 10, 101, 109, 105, 116, 70, 105, 108, 101, 115, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 101, 109, 105, 116, 82, 117, -108, 101, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 101, 110, 100, 44, 10, 101, 109, 105, 116, 70, 105, 108, -116, 101, 114, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 109, 46, 102, 105, 108, -116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 103, 114, 111, 117, 112, 46, 99, 97, 116, 101, 103, -111, 114, 121, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 125, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 99, 97, 116, 32, 105, -110, 32, 112, 97, 105, 114, 115, 40, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 99, 97, 116, 46, -101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 97, 110, 100, 32, 112, 97, 116, 104, 46, 104, 97, 115, 101, 120, 116, 101, 110, 115, 105, 111, 110, - 40, 102, 105, 108, 101, 46, 110, 97, 109, 101, 44, 32, 99, 97, 116, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 41, 32, 116, 104, 101, 110, - 10, 114, 101, 116, 117, 114, 110, 32, 99, 97, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 109, 46, 99, 97, 116, -101, 103, 111, 114, 105, 101, 115, 46, 78, 111, 110, 101, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, -105, 103, 80, 97, 105, 114, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, - 99, 116, 80, 108, 97, 116, 102, 111, 114, 109, 40, 99, 102, 103, 41, 32, 46, 46, 32, 34, 124, 34, 32, 46, 46, 32, 118, 115, 116, 117, 100, 105, -111, 46, 97, 114, 99, 104, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 44, 32, 116, 114, 117, 101, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 116, 84, 111, 116, 97, 108, 67, 102, 103, 67, 111, 117, 110, 116, 40, 112, 114, 106, 41, - 10, 105, 102, 32, 112, 114, 106, 46, 95, 116, 111, 116, 97, 108, 67, 102, 103, 67, 111, 117, 110, 116, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, -114, 110, 32, 112, 114, 106, 46, 95, 116, 111, 116, 97, 108, 67, 102, 103, 67, 111, 117, 110, 116, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, - 32, 114, 101, 115, 117, 108, 116, 32, 61, 32, 48, 10, 102, 111, 114, 32, 95, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 114, 101, 115, 117, 108, 116, 32, 61, 32, 114, 101, 115, 117, 108, -116, 32, 43, 32, 49, 10, 101, 110, 100, 10, 112, 114, 106, 46, 95, 116, 111, 116, 97, 108, 67, 102, 103, 67, 111, 117, 110, 116, 32, 61, 32, 114, -101, 115, 117, 108, 116, 10, 114, 101, 116, 117, 114, 110, 32, 114, 101, 115, 117, 108, 116, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 105, 110, 100, 101, 120, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 40, - 41, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 77, 97, 112, 44, 32, 110, 97, 109, 101, 76, 105, 115, 116, 44, 32, 115, 101, 116, 116, 105, -110, 103, 76, 105, 115, 116, 10, 110, 97, 109, 101, 77, 97, 112, 32, 61, 32, 123, 125, 10, 110, 97, 109, 101, 76, 105, 115, 116, 32, 61, 32, 123, -125, 32, 45, 45, 32, 116, 111, 32, 112, 114, 101, 115, 101, 114, 118, 101, 32, 111, 114, 100, 101, 114, 105, 110, 103, 10, 115, 101, 116, 116, 105, 110, -103, 76, 105, 115, 116, 32, 61, 32, 123, 125, 32, 45, 45, 32, 116, 111, 32, 112, 114, 101, 115, 101, 114, 118, 101, 32, 111, 114, 100, 101, 114, 105, -110, 103, 10, 102, 111, 114, 32, 95, 44, 32, 101, 108, 101, 109, 101, 110, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 109, 46, 99, 111, -110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, -105, 110, 103, 77, 97, 112, 32, 61, 32, 110, 97, 109, 101, 77, 97, 112, 91, 101, 108, 101, 109, 101, 110, 116, 46, 110, 97, 109, 101, 93, 10, 105, -102, 32, 110, 111, 116, 32, 115, 101, 116, 116, 105, 110, 103, 77, 97, 112, 32, 116, 104, 101, 110, 10, 115, 101, 116, 116, 105, 110, 103, 77, 97, 112, - 32, 61, 32, 123, 125, 10, 110, 97, 109, 101, 77, 97, 112, 91, 101, 108, 101, 109, 101, 110, 116, 46, 110, 97, 109, 101, 93, 32, 61, 32, 115, 101, -116, 116, 105, 110, 103, 77, 97, 112, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 110, - 97, 109, 101, 76, 105, 115, 116, 44, 32, 101, 108, 101, 109, 101, 110, 116, 46, 110, 97, 109, 101, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, -101, 46, 105, 110, 115, 101, 114, 116, 40, 110, 97, 109, 101, 76, 105, 115, 116, 44, 32, 101, 108, 101, 109, 101, 110, 116, 46, 110, 97, 109, 101, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 83, 101, 116, 32, 61, 32, 115, 101, 116, 116, -105, 110, 103, 77, 97, 112, 91, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, 116, 105, 110, 103, 93, 10, 105, 102, 32, 101, 108, 101, 109, 101, -110, 116, 83, 101, 116, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 101, 108, 101, 109, 101, 110, 116, 83, -101, 116, 44, 32, 101, 108, 101, 109, 101, 110, 116, 41, 10, 101, 108, 115, 101, 10, 101, 108, 101, 109, 101, 110, 116, 83, 101, 116, 32, 61, 32, 123, -101, 108, 101, 109, 101, 110, 116, 125, 10, 115, 101, 116, 116, 105, 110, 103, 77, 97, 112, 91, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, 116, -105, 110, 103, 93, 32, 61, 32, 101, 108, 101, 109, 101, 110, 116, 83, 101, 116, 10, 105, 102, 32, 110, 111, 116, 32, 116, 97, 98, 108, 101, 46, 99, -111, 110, 116, 97, 105, 110, 115, 40, 115, 101, 116, 116, 105, 110, 103, 76, 105, 115, 116, 44, 32, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, -116, 105, 110, 103, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 115, 101, 116, 116, 105, 110, 103, 76, -105, 115, 116, 44, 32, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, 116, 105, 110, 103, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 114, 101, 116, 117, 114, 110, 32, 110, 97, 109, 101, 77, 97, 112, 44, 32, 110, 97, 109, 101, 76, 105, 115, 116, 44, 32, 115, 101, 116, 116, -105, 110, 103, 76, 105, 115, 116, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 109, 105, 116, 67, 111, 110, 100, 105, -116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 67, 111, 117, -110, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 116, 98, 108, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 117, 110, 116, 32, 61, - 32, 48, 10, 102, 111, 114, 32, 95, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 116, 98, 108, 41, 32, 100, 111, 32, 99, 111, 117, 110, 116, 32, - 61, 32, 99, 111, 117, 110, 116, 32, 43, 32, 49, 32, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 99, 111, 117, 110, 116, 10, 101, 110, 100, - 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 77, 97, 112, 44, 32, 110, 97, 109, 101, 76, 105, 115, 116, 44, 32, 115, 101, 116, 116, 105, 110, -103, 76, 105, 115, 116, 10, 110, 97, 109, 101, 77, 97, 112, 44, 32, 110, 97, 109, 101, 76, 105, 115, 116, 44, 32, 115, 101, 116, 116, 105, 110, 103, - 76, 105, 115, 116, 32, 61, 32, 109, 46, 105, 110, 100, 101, 120, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, -115, 40, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 116, 97, 108, 67, 102, 103, 67, 111, 117, 110, 116, 32, 61, 32, 109, 46, 103, 101, 116, 84, -111, 116, 97, 108, 67, 102, 103, 67, 111, 117, 110, 116, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 95, 44, 32, 110, 97, 109, 101, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 110, 97, 109, 101, 76, 105, 115, 116, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 115, 101, 116, 116, 105, -110, 103, 77, 97, 112, 32, 61, 32, 110, 97, 109, 101, 77, 97, 112, 91, 110, 97, 109, 101, 93, 10, 108, 111, 99, 97, 108, 32, 100, 111, 110, 101, - 32, 61, 32, 102, 97, 108, 115, 101, 10, 105, 102, 32, 107, 101, 121, 67, 111, 117, 110, 116, 40, 115, 101, 116, 116, 105, 110, 103, 77, 97, 112, 41, - 61, 61, 49, 32, 116, 104, 101, 110, 10, 102, 111, 114, 32, 95, 44, 32, 115, 101, 116, 116, 105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, -115, 40, 115, 101, 116, 116, 105, 110, 103, 76, 105, 115, 116, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, - 32, 61, 32, 115, 101, 116, 116, 105, 110, 103, 77, 97, 112, 91, 115, 101, 116, 116, 105, 110, 103, 93, 10, 105, 102, 32, 101, 108, 101, 109, 101, 110, -116, 115, 126, 61, 110, 105, 108, 32, 97, 110, 100, 32, 35, 101, 108, 101, 109, 101, 110, 116, 115, 61, 61, 116, 111, 116, 97, 108, 67, 102, 103, 67, -111, 117, 110, 116, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 32, 61, 32, 101, 108, 101, 109, 101, 110, -116, 115, 91, 49, 93, 10, 108, 111, 99, 97, 108, 32, 102, 111, 114, 109, 97, 116, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, - 97, 116, 40, 39, 60, 37, 115, 62, 37, 115, 60, 47, 37, 115, 62, 39, 44, 32, 110, 97, 109, 101, 44, 32, 101, 108, 101, 109, 101, 110, 116, 46, -118, 97, 108, 117, 101, 44, 32, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 102, 111, 114, 109, 97, 116, 44, 32, 116, 97, 98, 108, 101, 46, 117, -110, 112, 97, 99, 107, 40, 101, 108, 101, 109, 101, 110, 116, 46, 97, 114, 103, 115, 41, 41, 10, 100, 111, 110, 101, 32, 61, 32, 116, 114, 117, 101, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, 100, 111, 110, 101, 32, 116, 104, 101, 110, 10, 102, 111, -114, 32, 95, 44, 32, 115, 101, 116, 116, 105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 115, 101, 116, 116, 105, 110, 103, 76, 105, -115, 116, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 115, 101, 116, 116, 105, 110, 103, 77, - 97, 112, 91, 115, 101, 116, 116, 105, 110, 103, 93, 10, 105, 102, 32, 101, 108, 101, 109, 101, 110, 116, 115, 32, 116, 104, 101, 110, 10, 102, 111, 114, - 32, 95, 44, 32, 101, 108, 101, 109, 101, 110, 116, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 101, 108, 101, 109, 101, 110, 116, 115, 41, 32, -100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 111, 114, 109, 97, 116, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, - 39, 60, 37, 115, 32, 37, 115, 62, 37, 115, 60, 47, 37, 115, 62, 39, 44, 32, 110, 97, 109, 101, 44, 32, 109, 46, 99, 111, 110, 100, 105, 116, -105, 111, 110, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 84, 101, 120, 116, 40, 101, 108, 101, 109, 101, 110, 116, 46, 99, 111, 110, 100, 105, 116, -105, 111, 110, 41, 44, 32, 101, 108, 101, 109, 101, 110, 116, 46, 118, 97, 108, 117, 101, 44, 32, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 102, -111, 114, 109, 97, 116, 44, 32, 116, 97, 98, 108, 101, 46, 117, 110, 112, 97, 99, 107, 40, 101, 108, 101, 109, 101, 110, 116, 46, 97, 114, 103, 115, - 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 101, 109, 105, 116, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, 116, 97, 103, 44, - 32, 102, 105, 108, 101, 70, 117, 110, 99, 44, 32, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 44, 32, 99, 104, 101, 99, 107, 70, 117, 110, - 99, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 103, 114, 111, 117, 112, 46, 102, 105, 108, 101, 115, 10, 105, 102, 32, -102, 105, 108, 101, 115, 32, 97, 110, 100, 32, 35, 102, 105, 108, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, - 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 32, 105, 110, 32, 105, -112, 97, 105, 114, 115, 40, 102, 105, 108, 101, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, - 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, -112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 102, 105, 108, 101, 70, 117, 110, 99, 44, 32, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, - 10, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, - 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, -111, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, -102, 105, 103, 40, 102, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 99, 104, 101, 99, 107, 70, 117, 110, 99, 32, -111, 114, 32, 99, 104, 101, 99, 107, 70, 117, 110, 99, 40, 99, 102, 103, 44, 32, 102, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 112, 46, 99, - 97, 108, 108, 65, 114, 114, 97, 121, 40, 102, 105, 108, 101, 67, 102, 103, 70, 117, 110, 99, 44, 32, 102, 99, 102, 103, 44, 32, 109, 46, 99, 111, -110, 102, 105, 103, 80, 97, 105, 114, 40, 99, 102, 103, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 109, 46, 99, 111, 110, -100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 101, 109, 105, 116, - 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, 112, 46, 112, -111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, -108, 97, 116, 101, 40, 102, 105, 108, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 105, 102, 32, 112, 114, 106, 46, 107, 105, 110, 100, 32, 61, - 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 114, 101, 108, 32, 61, 32, 34, 36, 40, 77, 83, - 66, 117, 105, 108, 100, 84, 104, 105, 115, 70, 105, 108, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 41, 34, 32, 46, 46, 32, 114, 101, 108, 10, -101, 110, 100, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, - 40, 39, 60, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 116, 97, 103, 44, 32, 114, 101, 108, 41, 10, -112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, - 32, 116, 97, 103, 41, 10, 101, 108, 115, 101, 10, 112, 46, 120, 40, 39, 60, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, - 32, 47, 62, 39, 44, 32, 116, 97, 103, 44, 32, 114, 101, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, - 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 101, 109, 105, 116, 82, 117, 108, 101, 70, 105, 108, 101, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 108, 111, 99, 97, 108, - 32, 102, 105, 108, 101, 115, 32, 61, 32, 103, 114, 111, 117, 112, 46, 102, 105, 108, 101, 115, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, 32, - 61, 32, 103, 114, 111, 117, 112, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 114, 117, 108, 101, 10, 105, 102, 32, 102, 105, 108, 101, 115, 32, 97, -110, 100, 32, 35, 102, 105, 108, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, - 71, 114, 111, 117, 112, 62, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 102, -105, 108, 101, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, -117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 102, 111, 114, 32, 112, 114, 111, 112, - 32, 105, 110, 32, 112, 46, 114, 117, 108, 101, 46, 101, 97, 99, 104, 80, 114, 111, 112, 101, 114, 116, 121, 40, 114, 117, 108, 101, 41, 32, 100, 111, - 10, 108, 111, 99, 97, 108, 32, 102, 108, 100, 32, 61, 32, 112, 46, 114, 117, 108, 101, 46, 103, 101, 116, 80, 114, 111, 112, 101, 114, 116, 121, 70, -105, 101, 108, 100, 40, 114, 117, 108, 101, 44, 32, 112, 114, 111, 112, 41, 10, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, -101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, - 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 99, 102, 103, 32, 61, 32, 102, -105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 102, 105, 108, 101, 44, 32, 99, 102, 103, 41, 10, 105, -102, 32, 102, 99, 102, 103, 32, 97, 110, 100, 32, 102, 99, 102, 103, 91, 102, 108, 100, 46, 110, 97, 109, 101, 93, 32, 116, 104, 101, 110, 10, 108, -111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 46, 103, 101, 116, 82, 117, 108, 101, 80, 114, 111, 112, 101, 114, 116, 121, 83, 116, -114, 105, 110, 103, 40, 114, 117, 108, 101, 44, 32, 112, 114, 111, 112, 44, 32, 102, 99, 102, 103, 91, 102, 108, 100, 46, 110, 97, 109, 101, 93, 41, - 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 97, 110, 100, 32, 35, 118, 97, 108, 117, 101, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 40, 112, 114, 111, 112, 46, 110, 97, 109, 101, 44, 32, 109, 46, 99, 111, 110, 102, 105, 103, 80, 97, 105, 114, 40, - 99, 102, 103, 41, 44, 32, 39, 37, 115, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, -102, 32, 35, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, -110, 10, 109, 46, 101, 109, 105, 116, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 69, 108, 101, 109, 101, 110, 116, 115, 40, 112, 114, 106, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, -116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, - 92, 34, 37, 115, 92, 34, 62, 39, 44, 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, - 97, 116, 101, 40, 102, 105, 108, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, -110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 41, 10, 101, -108, 115, 101, 10, 112, 46, 120, 40, 39, 60, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, 92, 34, 37, 115, 92, 34, 32, 47, 62, 39, 44, - 32, 114, 117, 108, 101, 46, 110, 97, 109, 101, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 105, 108, 101, 46, -114, 101, 108, 112, 97, 116, 104, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, -114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 115, 67, 108, 114, - 77, 105, 120, 101, 100, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 77, 105, 120, 101, 100, 32, 61, 32, 102, 97, 108, 115, 101, - 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 106, 46, 99, 108, 114, 32, 111, 114, 32, 112, 114, 106, 46, 99, 108, 114, 32, 61, 61, 32, 112, 46, - 79, 70, 70, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 46, 95, 105, 115, 67, 108, 114, 77, 105, 120, 101, 100, 32, 126, 61, 32, 110, -105, 108, 32, 116, 104, 101, 110, 10, 105, 115, 77, 105, 120, 101, 100, 32, 61, 32, 112, 114, 106, 46, 95, 105, 115, 67, 108, 114, 77, 105, 120, 101, -100, 10, 101, 108, 115, 101, 10, 116, 97, 98, 108, 101, 46, 102, 111, 114, 101, 97, 99, 104, 105, 40, 112, 114, 106, 46, 95, 46, 102, 105, 108, 101, -115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 102, 105, 108, 101, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, -114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, -102, 99, 102, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 99, 111, 110, 102, 105, 103, 40, 102, 105, -108, 101, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 102, 99, 102, 103, 32, 97, 110, 100, 32, 102, 99, 102, 103, 46, 99, 108, 114, 32, 97, 110, -100, 32, 102, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 105, 115, 77, 105, 120, 101, 100, - 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 112, 114, 106, 46, 95, 105, 115, 67, 108, 114, 77, -105, 120, 101, 100, 32, 61, 32, 105, 115, 77, 105, 120, 101, 100, 32, 45, 45, 32, 99, 97, 99, 104, 101, 32, 116, 104, 101, 32, 114, 101, 115, 117, -108, 116, 115, 10, 101, 110, 100, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 105, 115, 77, 105, 120, 101, 100, 10, 101, 110, 100, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 44, 32, 114, 101, 102, 41, 10, 105, 102, 32, 112, 114, 106, 46, 99, 108, 114, 32, 126, 61, 32, 112, - 46, 79, 70, 70, 32, 111, 114, 32, 40, 109, 46, 105, 115, 67, 108, 114, 77, 105, 120, 101, 100, 40, 112, 114, 106, 41, 32, 97, 110, 100, 32, 114, -101, 102, 32, 97, 110, 100, 32, 114, 101, 102, 46, 107, 105, 110, 100, 32, 126, 61, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 41, 32, 116, -104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 106, 101, 99, 116, 44, - 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 105, 118, 97, 116, 101, 44, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, - 79, 117, 116, 112, 117, 116, 65, 115, 115, 101, 109, 98, 108, 121, 44, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 67, 111, 112, 121, 76, -111, 99, 97, 108, 83, 97, 116, 101, 108, 108, 105, 116, 101, 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 44, 10, 109, 46, 114, 101, 102, 101, 114, -101, 110, 99, 101, 76, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 109, 46, 114, -101, 102, 101, 114, 101, 110, 99, 101, 85, 115, 101, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 101, 115, 44, 10, 125, - 10, 101, 108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 106, 101, 99, -116, 44, 10, 125, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 82, -101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 114, 101, 102, 115, 32, 61, 32, 112, 114, 111, 106, -101, 99, 116, 46, 103, 101, 116, 100, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 44, 32, 39, 108, 105, 110, 107, 79, 110, -108, 121, 39, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, -102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 102, 111, 114, 32, 95, 44, 32, 114, 101, 102, 32, 105, -110, 32, 105, 112, 97, 105, 114, 115, 40, 114, 101, 102, 115, 41, 32, 100, 111, 10, 105, 102, 32, 114, 101, 102, 46, 107, 105, 110, 100, 32, 61, 61, - 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 112, 97, 116, -104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, -111, 106, 101, 99, 116, 102, 105, 108, 101, 40, 114, 101, 102, 41, 41, 10, 112, 46, 120, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, -106, 101, 99, 116, 61, 34, 37, 115, 34, 32, 76, 97, 98, 101, 108, 61, 34, 83, 104, 97, 114, 101, 100, 34, 32, 47, 62, 39, 44, 32, 114, 101, -108, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, - 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 109, 112, 111, 114, -116, 71, 114, 111, 117, 112, 32, 76, 97, 98, 101, 108, 61, 34, 83, 104, 97, 114, 101, 100, 34, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, - 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 62, - 39, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, -101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 102, 111, 114, 32, 95, 44, 32, 114, 101, 102, - 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 114, 101, 102, 115, 41, 32, 100, 111, 10, 105, 102, 32, 114, 101, 102, 46, 107, 105, 110, 100, 32, -126, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 112, - 97, 116, 104, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, -112, 114, 111, 106, 101, 99, 116, 102, 105, 108, 101, 40, 114, 101, 102, 41, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, - 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, 92, 34, 37, 115, 92, 34, 62, 39, 44, 32, 114, 101, -108, 112, 97, 116, 104, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, -111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 44, 32, 112, 114, 106, 44, 32, 114, 101, 102, 41, 10, 112, 46, 112, 111, 112, - 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, - 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, -112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 108, 111, 99, 97, 108, 32, -108, 105, 110, 107, 115, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 115, 101, 116, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 116, 111, 111, -108, 115, 101, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 116, 111, 111, 108, 115, 101, 116, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, - 61, 32, 116, 111, 111, 108, 115, 101, 116, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, 103, 44, 32, 110, 111, 116, 32, 101, 120, 112, 108, -105, 99, 105, 116, 41, 10, 101, 108, 115, 101, 10, 108, 105, 110, 107, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 103, 101, 116, 76, 105, -110, 107, 115, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, 99, 105, 116, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 108, 105, 110, 107, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 115, 32, 61, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, - 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 108, 105, 110, 107, 115, 44, 32, 34, 59, 34, 41, 41, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 110, -105, 108, 44, 32, 34, 37, 115, 59, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, -115, 41, 34, 44, 32, 108, 105, 110, 107, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, -100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 44, - 32, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 32, 62, 32, - 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, - 40, 99, 102, 103, 44, 32, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, -101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 59, 37, 37, 40, 65, 100, 100, 105, 116, -105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 34, 44, 32, 116, 97, 98, 108, 101, - 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, - 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 32, 62, 32, 48, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, -118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 108, 105, 98, 100, 105, 114, 115, 41, 44, 32, - 34, 59, 34, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, -121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 59, 37, 37, 40, 65, 100, 100, 105, 116, -105, 111, 110, 97, 108, 76, 105, 98, 114, 97, 114, 121, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 34, 44, 32, 100, 105, 114, 115, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 77, 97, -110, 105, 102, 101, 115, 116, 70, 105, 108, 101, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 110, 105, 102, 101, 115, 116, 115, - 32, 61, 32, 123, 125, 10, 102, 111, 114, 32, 95, 44, 32, 102, 110, 97, 109, 101, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 102, 103, - 46, 102, 105, 108, 101, 115, 41, 32, 100, 111, 10, 105, 102, 32, 112, 97, 116, 104, 46, 103, 101, 116, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, -102, 110, 97, 109, 101, 41, 32, 61, 61, 32, 34, 46, 109, 97, 110, 105, 102, 101, 115, 116, 34, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, - 46, 105, 110, 115, 101, 114, 116, 40, 109, 97, 110, 105, 102, 101, 115, 116, 115, 44, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, -108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 102, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 105, 102, 32, 35, 109, 97, 110, 105, 102, 101, 115, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 77, 97, 110, 105, 102, 101, 115, 116, 70, 105, 108, 101, 115, 34, 44, 32, -110, 105, 108, 44, 32, 34, 37, 115, 59, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 77, 97, 110, 105, 102, 101, 115, 116, 70, 105, -108, 101, 115, 41, 34, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 109, 97, 110, 105, 102, 101, 115, 116, 115, 44, 32, 34, - 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, - 97, 108, 85, 115, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, -117, 115, 105, 110, 103, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, -118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 117, 115, 105, 110, 103, 100, 105, 114, 115, 41, - 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, -100, 105, 116, 105, 111, 110, 97, 108, 85, 115, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, - 34, 37, 115, 59, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 85, 115, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, -115, 41, 34, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 97, 114, 103, 101, 65, 100, 100, 114, 101, 115, -115, 65, 119, 97, 114, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 40, 99, 102, 103, 46, 108, 97, 114, 103, 101, 97, 100, 100, 114, 101, 115, 115, - 97, 119, 97, 114, 101, 32, 61, 61, 32, 116, 114, 117, 101, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, - 97, 114, 103, 101, 65, 100, 100, 114, 101, 115, 115, 65, 119, 97, 114, 101, 34, 44, 32, 110, 105, 108, 44, 32, 39, 116, 114, 117, 101, 39, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, - 97, 114, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 55, 34, 32, -116, 104, 101, 110, 10, 105, 102, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 34, 67, 43, 43, 49, - 52, 34, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, -100, 97, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 39, 115, 116, 100, 99, 112, 112, 49, 52, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 40, - 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 34, 67, 43, 43, 49, 55, 34, 41, 32, 116, 104, 101, 110, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 34, 44, 32, 110, 105, -108, 44, 32, 39, 115, 116, 100, 99, 112, 112, 49, 55, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, - 97, 108, 101, 99, 116, 32, 61, 61, 32, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 76, 97, 110, 103, 117, 97, 103, 101, 83, 116, 97, 110, 100, 97, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 39, 115, -116, 100, 99, 112, 112, 108, 97, 116, 101, 115, 116, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 115, 116, 114, 117, 99, 116, 77, 101, 109, 98, 101, 114, 65, 108, 105, 103, 110, 109, 101, 110, 116, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 10, 91, 49, 93, 32, 61, 32, 34, 49, 66, 121, 116, 101, 34, 44, 10, 91, 50, 93, - 32, 61, 32, 34, 50, 66, 121, 116, 101, 115, 34, 44, 10, 91, 52, 93, 32, 61, 32, 34, 52, 66, 121, 116, 101, 115, 34, 44, 10, 91, 56, 93, - 32, 61, 32, 34, 56, 66, 121, 116, 101, 115, 34, 44, 10, 91, 49, 54, 93, 32, 61, 32, 34, 49, 54, 66, 121, 116, 101, 115, 34, 10, 125, 10, -108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, 112, 91, 99, 102, 103, 46, 115, 116, 114, 117, 99, 116, 109, 101, 109, 98, -101, 114, 97, 108, 105, 103, 110, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 83, 116, 114, 117, 99, 116, 77, 101, 109, 98, 101, 114, 65, 108, 105, 103, 110, 109, 101, 110, 116, 34, 44, 32, 110, 105, 108, 44, 32, 118, - 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, -110, 97, 108, 67, 111, 109, 112, 105, 108, 101, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, - 41, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 115, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 112, 116, 105, 111, 110, 115, 10, -105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 40, - 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 34, 67, 43, 43, 49, 52, 34, 41, 32, 116, 104, 101, 110, 10, -116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 47, 115, 116, 100, 58, 99, 43, 43, 49, 52, 34, 41, - 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, 108, 101, 99, 116, 32, 61, 61, 32, 34, 67, 43, 43, 49, - 55, 34, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 47, 115, 116, -100, 58, 99, 43, 43, 108, 97, 116, 101, 115, 116, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 99, 112, 112, 100, 105, 97, -108, 101, 99, 116, 32, 61, 61, 32, 34, 67, 43, 43, 108, 97, 116, 101, 115, 116, 34, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, -105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, 32, 34, 47, 115, 116, 100, 58, 99, 43, 43, 108, 97, 116, 101, 115, 116, 34, 41, 10, 101, -110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 116, 111, 111, 108, 115, 101, 116, 32, 97, 110, 100, 32, 99, 102, 103, 46, 116, 111, -111, 108, 115, 101, 116, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 109, 115, 99, 34, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, - 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, 44, - 32, 34, 79, 110, 34, 44, 32, 34, 79, 102, 102, 34, 41, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 111, 112, 116, 115, 44, - 32, 112, 46, 116, 111, 111, 108, 115, 46, 109, 115, 99, 46, 115, 104, 97, 114, 101, 100, 46, 117, 110, 115, 105, 103, 110, 101, 100, 99, 104, 97, 114, - 91, 118, 97, 108, 117, 101, 93, 41, 10, 101, 110, 100, 10, 105, 102, 32, 35, 111, 112, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 111, -112, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 112, 116, 115, 44, 32, 34, 32, 34, 41, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 34, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 32, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, - 41, 39, 44, 32, 111, 112, 116, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, -105, 116, 105, 111, 110, 97, 108, 76, 105, 110, 107, 79, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, -108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 108, 105, 110, 107, 111, 112, 116, 105, 111, 110, 115, 44, 32, - 34, 32, 34, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, -115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 32, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, -115, 41, 34, 44, 32, 111, 112, 116, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, -109, 112, 105, 108, 101, 65, 115, 77, 97, 110, 97, 103, 101, 100, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, -105, 102, 32, 102, 99, 102, 103, 46, 99, 108, 114, 32, 97, 110, 100, 32, 102, 99, 102, 103, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, -101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, 109, 112, 105, 108, 101, 65, 115, 77, 97, 110, 97, 103, 101, 100, 34, 44, - 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 98, 97, 115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 40, 99, 102, 103, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, - 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, -114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 114, 117, 110, 116, 105, 109, 101, 40, 112, 114, 106, 99, -102, 103, 41, 32, 111, 114, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, 40, 99, -102, 103, 41, 44, 32, 34, 68, 101, 98, 117, 103, 34, 44, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 41, 10, 105, 102, 32, 102, 105, 108, 101, - 99, 102, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 82, 117, 110, 116, -105, 109, 101, 67, 104, 101, 99, 107, 115, 32, 111, 114, 32, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, - 66, 117, 105, 108, 100, 40, 102, 105, 108, 101, 99, 102, 103, 41, 32, 97, 110, 100, 32, 114, 117, 110, 116, 105, 109, 101, 58, 101, 110, 100, 115, 119, -105, 116, 104, 40, 34, 68, 101, 98, 117, 103, 34, 41, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 66, 97, -115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 68, -101, 102, 97, 117, 108, 116, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, 102, 32, 112, 114, 106, 99, 102, 103, 46, 102, 108, 97, 103, -115, 46, 78, 111, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 32, 111, 114, 32, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, -112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 112, 114, 106, 99, 102, 103, 41, 32, 97, 110, 100, 32, 114, 117, 110, 116, 105, 109, -101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 68, 101, 98, 117, 103, 34, 41, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 66, 97, 115, 105, 99, 82, 117, 110, 116, 105, 109, 101, 67, 104, 101, 99, 107, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, - 68, 101, 102, 97, 117, 108, 116, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 98, 117, 105, 108, 100, 73, 110, 112, 117, 116, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, -112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 110, 112, 117, 116, 115, 32, 61, 32, 112, 114, 111, -106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, -103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 112, 117, 116, 115, - 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, - 40, 105, 110, 112, 117, 116, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 98, 117, 105, 108, 100, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 112, 117, 116, 115, 40, 102, 99, 102, 103, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 97, 110, 100, - 32, 35, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, -108, 32, 105, 110, 112, 117, 116, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 102, - 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 105, 110, 112, 117, 116, 115, 41, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 112, 117, 116, 115, 34, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 105, 110, 112, 117, 116, -115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 105, 108, -100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 35, 102, - 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, - 65, 110, 100, 80, 97, 116, 104, 115, 40, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 102, 99, 102, -103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 102, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, -108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, 109, 109, 97, 110, 100, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 111, 109, -109, 97, 110, 100, 115, 44, 39, 92, 114, 92, 110, 39, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 98, 117, 105, 108, 100, 76, 111, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 108, 111, 103, 32, - 97, 110, 100, 32, 35, 99, 102, 103, 46, 98, 117, 105, 108, 100, 108, 111, 103, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, -104, 40, 39, 60, 66, 117, 105, 108, 100, 76, 111, 103, 62, 39, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 97, 116, 104, 34, - 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 108, 111, 103, 41, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 66, 117, 105, 108, 100, 76, 111, 103, 62, - 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 105, 108, 100, 77, 101, 115, 115, 97, -103, 101, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, -100, 109, 101, 115, 115, 97, 103, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, 101, 115, 115, 97, 103, 101, - 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 39, 44, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 109, 101, -115, 115, 97, 103, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 105, 108, 100, 79, -117, 116, 112, 117, 116, 115, 40, 102, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 35, 102, 99, 102, 103, - 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, -112, 117, 116, 115, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 102, 99, 102, 103, 46, -112, 114, 111, 106, 101, 99, 116, 44, 32, 102, 99, 102, 103, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 10, 109, 46, 101, 108, -101, 109, 101, 110, 116, 40, 34, 79, 117, 116, 112, 117, 116, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 39, - 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 117, 116, 112, 117, 116, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 105, 110, 107, 79, 98, 106, 101, 99, 116, 115, 40, 102, 99, 102, -103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 102, 99, 102, 103, 46, 108, 105, 110, 107, 98, 117, 105, 108, 100, 111, -117, 116, 112, 117, 116, 115, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, 105, -110, 107, 79, 98, 106, 101, 99, 116, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, -102, 99, 102, 103, 46, 108, 105, 110, 107, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, 101, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, -110, 111, 116, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, - 10, 108, 111, 99, 97, 108, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, 115, 101, 116, 115, 32, 61, 32, 123, 10, 65, 83, 67, 73, 73, 32, 61, - 32, 34, 78, 111, 116, 83, 101, 116, 34, 44, 10, 77, 66, 67, 83, 32, 61, 32, 34, 77, 117, 108, 116, 105, 66, 121, 116, 101, 34, 44, 10, 85, -110, 105, 99, 111, 100, 101, 32, 61, 32, 34, 85, 110, 105, 99, 111, 100, 101, 34, 44, 10, 68, 101, 102, 97, 117, 108, 116, 32, 61, 32, 34, 85, -110, 105, 99, 111, 100, 101, 34, 10, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 104, 97, 114, 97, 99, 116, 101, 114, 83, 101, -116, 34, 44, 32, 110, 105, 108, 44, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, 115, 101, 116, 115, 91, 99, 102, 103, 46, 99, 104, 97, 114, 97, - 99, 116, 101, 114, 115, 101, 116, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 104, 111, -108, 101, 80, 114, 111, 103, 114, 97, 109, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, -103, 46, 102, 108, 97, 103, 115, 46, 76, 105, 110, 107, 84, 105, 109, 101, 79, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 32, 116, 104, 101, -110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 87, 104, 111, 108, 101, 80, 114, 111, 103, 114, 97, 109, 79, 112, 116, 105, 109, 105, 122, - 97, 116, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, -100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, -110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 105, 110, 99, 108, 117, -100, 101, 100, 105, 114, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, - 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 85, 115, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, -109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 85, 115, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, - 44, 32, 99, 102, 103, 46, 117, 115, 105, 110, 103, 100, 105, 114, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, - 99, 108, 67, 111, 109, 112, 105, 108, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, - 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 105, 110, 101, 115, 32, 61, - 32, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 10, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, -100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 116, 97, - 98, 108, 101, 46, 106, 111, 105, 110, 40, 100, 101, 102, 105, 110, 101, 115, 44, 32, 34, 95, 72, 65, 83, 95, 69, 88, 67, 69, 80, 84, 73, 79, - 78, 83, 61, 48, 34, 41, 10, 101, 110, 100, 10, 109, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, -105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 100, 101, 102, 105, 110, 101, 115, 44, 32, 102, 97, 108, 115, 101, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 85, 110, 100, -101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, - 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 109, 46, 117, 110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, -115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 117, 110, 100, 101, 102, 105, 110, 101, -115, 44, 32, 102, 97, 108, 115, 101, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 99, 108, 114, 83, 117, 112, 112, 111, 114, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 10, -105, 102, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, 34, 79, 110, 34, 32, 111, 114, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, - 32, 34, 85, 110, 115, 97, 102, 101, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 101, 108, -115, 101, 105, 102, 32, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, - 32, 61, 32, 99, 102, 103, 46, 99, 108, 114, 10, 101, 110, 100, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 40, 34, 67, 76, 82, 83, 117, 112, 112, 111, 114, 116, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 105, 108, 101, 65, 115, 40, 99, 102, -103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, - 40, 99, 102, 103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 67, 111, 109, 112, 105, 108, 101, 65, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 67, 111, 109, 112, 105, 108, 101, 65, -115, 67, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 46, 108, 97, 110, 103, 117, 97, 103, 101, 115, 46, 105, 115, 99, 112, 112, 40, 99, 102, -103, 46, 99, 111, 109, 112, 105, 108, 101, 97, 115, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, 109, -112, 105, 108, 101, 65, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 67, 111, 109, 112, 105, 108, 101, 65, 115, 67, 112, -112, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 102, 105, 103, 117, 114, 97, -116, 105, 111, 110, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, 32, 61, 32, 123, 10, 83, 104, - 97, 114, 101, 100, 76, 105, 98, 32, 61, 32, 34, 68, 121, 110, 97, 109, 105, 99, 76, 105, 98, 114, 97, 114, 121, 34, 44, 10, 83, 116, 97, 116, -105, 99, 76, 105, 98, 32, 61, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 114, 97, 114, 121, 34, 44, 10, 67, 111, 110, 115, 111, 108, 101, - 65, 112, 112, 32, 61, 32, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 34, 44, 10, 87, 105, 110, 100, 111, 119, 101, 100, 65, 112, 112, - 32, 61, 32, 34, 65, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 34, 44, 10, 77, 97, 107, 101, 102, 105, 108, 101, 32, 61, 32, 34, 77, 97, -107, 101, 102, 105, 108, 101, 34, 44, 10, 78, 111, 110, 101, 32, 61, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 10, 85, 116, 105, 108, -105, 116, 121, 32, 61, 32, 34, 85, 116, 105, 108, 105, 116, 121, 34, 44, 10, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, -110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 34, 44, 32, 110, 105, 108, 44, 32, 116, 121, 112, 101, 115, 91, 99, 102, 103, - 46, 107, 105, 110, 100, 93, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 117, 108, 116, 117, 114, 101, 40, 99, -102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 99, 117, 108, 116, 117, 114, -101, 70, 111, 114, 76, 111, 99, 97, 108, 101, 40, 99, 102, 103, 46, 108, 111, 99, 97, 108, 101, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 117, 108, 116, 117, 114, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, - 48, 120, 37, 48, 52, 120, 34, 44, 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 118, 97, 108, 117, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, 111, 114, -109, 97, 116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 44, - 32, 116, 111, 111, 108, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 116, 111, 111, 108, 115, 101, 116, 40, - 99, 102, 103, 41, 10, 105, 102, 32, 40, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 112, 46, 79, 78, 41, 32, 111, 114, - 32, 40, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 34, 70, 97, 115, 116, 76, 105, 110, 107, 34, 41, 32, 111, 114, 32, - 40, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 34, 70, 117, 108, 108, 34, 41, 32, 116, 104, 101, 110, 10, 105, 102, 32, - 99, 102, 103, 46, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 32, 61, 61, 32, 34, 99, 55, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, -117, 101, 32, 61, 32, 34, 79, 108, 100, 83, 116, 121, 108, 101, 34, 10, 101, 108, 115, 101, 105, 102, 32, 40, 99, 102, 103, 46, 97, 114, 99, 104, -105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 34, 120, 56, 54, 95, 54, 52, 34, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, - 32, 60, 32, 34, 118, 115, 50, 48, 49, 53, 34, 41, 32, 111, 114, 10, 32, 32, 32, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, 32, 112, 46, - 79, 70, 70, 32, 111, 114, 10, 32, 32, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, -100, 40, 99, 102, 103, 41, 32, 111, 114, 10, 32, 32, 32, 99, 102, 103, 46, 101, 100, 105, 116, 97, 110, 100, 99, 111, 110, 116, 105, 110, 117, 101, - 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 111, 114, 10, 32, 32, 32, 40, 116, 111, 111, 108, 86, 101, 114, 115, 105, 111, 110, 32, 97, 110, 100, - 32, 116, 111, 111, 108, 86, 101, 114, 115, 105, 111, 110, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 76, 76, 86, 77, 45, 118, 115, - 34, 41, 41, 10, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 80, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, -101, 34, 10, 101, 108, 115, 101, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 69, 100, 105, 116, 65, 110, 100, 67, 111, 110, 116, 105, 110, 117, 101, - 34, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, -110, 70, 111, 114, 109, 97, 116, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, - 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, - 78, 32, 60, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 34, 10, 101, 108, 115, -101, 10, 118, 97, 108, 117, 101, 32, 61, 32, 34, 78, 111, 110, 101, 34, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 70, 111, 114, 109, 97, 116, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, -108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 97, 98, 108, 101, 68, 112, -105, 65, 119, 97, 114, 101, 110, 101, 115, 115, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 97, 119, 97, 114, 101, 110, 101, 115, 115, 32, - 61, 32, 123, 10, 78, 111, 110, 101, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 44, 10, 72, 105, 103, 104, 32, 61, 32, 34, 116, 114, 117, 101, - 34, 44, 10, 72, 105, 103, 104, 80, 101, 114, 77, 111, 110, 105, 116, 111, 114, 32, 61, 32, 34, 80, 101, 114, 77, 111, 110, 105, 116, 111, 114, 72, -105, 103, 104, 68, 80, 73, 65, 119, 97, 114, 101, 34, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 97, 119, - 97, 114, 101, 110, 101, 115, 115, 91, 99, 102, 103, 46, 100, 112, 105, 97, 119, 97, 114, 101, 110, 101, 115, 115, 93, 10, 105, 102, 32, 118, 97, 108, -117, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 110, 97, 98, 108, 101, 68, 112, 105, 65, 119, 97, 114, -101, 110, 101, 115, 115, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 101, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, 100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, - 83, 101, 116, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 118, 10, 108, 111, 99, 97, -108, 32, 120, 32, 61, 32, 99, 102, 103, 46, 118, 101, 99, 116, 111, 114, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 10, 105, 102, 32, 120, 32, - 61, 61, 32, 34, 65, 86, 88, 34, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 49, 48, 34, 32, -116, 104, 101, 110, 10, 118, 32, 61, 32, 34, 65, 100, 118, 97, 110, 99, 101, 100, 86, 101, 99, 116, 111, 114, 69, 120, 116, 101, 110, 115, 105, 111, -110, 115, 34, 10, 101, 108, 115, 101, 105, 102, 32, 120, 32, 61, 61, 32, 34, 65, 86, 88, 50, 34, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, - 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 49, 50, 34, 32, 116, 104, 101, 110, 10, 118, 32, 61, 32, 34, 65, 100, 118, 97, 110, 99, 101, 100, - 86, 101, 99, 116, 111, 114, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 50, 34, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 97, 114, - 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 126, 61, 32, 34, 120, 56, 54, 95, 54, 52, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 120, - 32, 61, 61, 32, 34, 83, 83, 69, 50, 34, 32, 111, 114, 32, 120, 32, 61, 61, 32, 34, 83, 83, 69, 51, 34, 32, 111, 114, 32, 120, 32, 61, - 61, 32, 34, 83, 83, 83, 69, 51, 34, 32, 111, 114, 32, 120, 32, 61, 61, 32, 34, 83, 83, 69, 52, 46, 49, 34, 32, 116, 104, 101, 110, 10, -118, 32, 61, 32, 34, 83, 116, 114, 101, 97, 109, 105, 110, 103, 83, 73, 77, 68, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 50, 34, 10, 101, -108, 115, 101, 105, 102, 32, 120, 32, 61, 61, 32, 34, 83, 83, 69, 34, 32, 116, 104, 101, 110, 10, 118, 32, 61, 32, 34, 83, 116, 114, 101, 97, -109, 105, 110, 103, 83, 73, 77, 68, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 34, 10, 101, 108, 115, 101, 105, 102, 32, 120, 32, 61, 61, 32, - 34, 73, 65, 51, 50, 34, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 49, 48, 34, 32, 116, 104, -101, 110, 10, 118, 32, 61, 32, 34, 78, 111, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, - 32, 118, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 69, 110, 97, 98, 108, 101, 69, 110, 104, 97, 110, 99, 101, -100, 73, 110, 115, 116, 114, 117, 99, 116, 105, 111, 110, 83, 101, 116, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 118, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 116, 114, 121, 80, 111, 105, 110, 116, 83, 121, 109, - 98, 111, 108, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 101, 110, 116, 114, 121, 112, 111, 105, 110, 116, 32, 116, 104, 101, 110, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 110, 116, 114, 121, 80, 111, 105, 110, 116, 83, 121, 109, 98, 111, 108, 34, 44, 32, 110, 105, -108, 44, 32, 99, 102, 103, 46, 101, 110, 116, 114, 121, 112, 111, 105, 110, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 40, 99, 102, 103, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, - 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 99, 101, 112, 116, -105, 111, 110, 72, 97, 110, 100, 108, 105, 110, 103, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 102, 97, 108, 115, 101, 34, - 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, - 61, 32, 34, 83, 69, 72, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 99, 101, 112, 116, 105, 111, -110, 72, 97, 110, 100, 108, 105, 110, 103, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 65, 115, 121, 110, 99, 34, 41, 10, -101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, - 34, 79, 110, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, -110, 100, 108, 105, 110, 103, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 83, 121, 110, 99, 34, 41, 10, 101, 108, 115, 101, -105, 102, 32, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 34, 67, 84, 104, -114, 111, 119, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, -110, 100, 108, 105, 110, 103, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 83, 121, 110, 99, 67, 84, 104, 114, 111, 119, 34, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, -109, 66, 117, 105, 108, 100, 40, 102, 105, 108, 101, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 110, 111, -116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 111, 114, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 69, 120, 99, 108, 117, -100, 101, 70, 114, 111, 109, 66, 117, 105, 108, 100, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 99, 108, -117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, - 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 99, 101, 112, 116, 105, 111, 110, 72, - 97, 110, 100, 108, 105, 110, 103, 83, 69, 72, 40, 102, 105, 108, 101, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, -102, 32, 110, 111, 116, 32, 102, 105, 108, 101, 99, 102, 103, 32, 111, 114, 32, 102, 105, 108, 101, 99, 102, 103, 46, 101, 120, 99, 101, 112, 116, 105, -111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 34, 83, 69, 72, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, -110, 116, 40, 34, 85, 115, 101, 83, 97, 102, 101, 69, 120, 99, 101, 112, 116, 105, 111, 110, 72, 97, 110, 100, 108, 101, 114, 115, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 84, 111, 68, 101, 108, 101, 116, 101, 79, 110, 67, 108, 101, 97, 110, 40, 99, -102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 99, 108, 101, 97, 110, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 116, 97, 98, 108, 101, 46, 105, 109, 112, 108, 111, 100, 101, - 40, 99, 102, 103, 46, 99, 108, 101, 97, 110, 101, 120, 116, 101, 110, 115, 105, 111, 110, 115, 44, 32, 34, 42, 34, 44, 32, 34, 59, 34, 44, 32, - 34, 34, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 84, 111, 68, 101, 108, 101, 116, -101, 79, 110, 67, 108, 101, 97, 110, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 32, 46, 46, 32, 34, 36, 40, 69, 120, 116, 101, -110, 115, 105, 111, 110, 115, 84, 111, 68, 101, 108, 101, 116, 101, 79, 110, 67, 108, 101, 97, 110, 41, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 101, 84, 121, 112, 101, 40, 99, 102, 103, 44, 32, 102, 105, 108, 101, 41, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 105, 108, 101, 84, 121, 112, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 68, 111, 99, 117, -109, 101, 110, 116, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 108, 111, 97, 116, 105, 110, 103, 80, 111, -105, 110, 116, 77, 111, 100, 101, 108, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, -110, 116, 32, 97, 110, 100, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 32, 126, 61, 32, 34, 68, 101, 102, - 97, 117, 108, 116, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 108, 111, 97, 116, 105, 110, 103, 80, 111, -105, 110, 116, 77, 111, 100, 101, 108, 34, 44, 32, 110, 105, 108, 44, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, -116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 108, 111, 97, 116, 105, 110, 103, 80, 111, -105, 110, 116, 69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, -110, 103, 112, 111, 105, 110, 116, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 105, 102, - 32, 99, 102, 103, 46, 102, 108, 111, 97, 116, 105, 110, 103, 112, 111, 105, 110, 116, 101, 120, 99, 101, 112, 116, 105, 111, 110, 115, 32, 116, 104, 101, -110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, 110, 116, 69, 120, 99, 101, 112, 116, -105, 111, 110, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 10, 109, 46, 101, 108, 101, 109, 101, -110, 116, 40, 34, 70, 108, 111, 97, 116, 105, 110, 103, 80, 111, 105, 110, 116, 69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 34, 44, 32, 110, 105, -108, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 105, 110, 108, 105, 110, 101, 70, 117, 110, 99, 116, 105, 111, 110, 69, 120, 112, 97, 110, 115, 105, 111, 110, 40, 99, 102, 103, 41, 10, -105, 102, 32, 99, 102, 103, 46, 105, 110, 108, 105, 110, 105, 110, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 116, 121, 112, 101, 115, - 32, 61, 32, 123, 10, 68, 101, 102, 97, 117, 108, 116, 32, 61, 32, 34, 68, 101, 102, 97, 117, 108, 116, 34, 44, 10, 68, 105, 115, 97, 98, 108, -101, 100, 32, 61, 32, 34, 68, 105, 115, 97, 98, 108, 101, 100, 34, 44, 10, 69, 120, 112, 108, 105, 99, 105, 116, 32, 61, 32, 34, 79, 110, 108, -121, 69, 120, 112, 108, 105, 99, 105, 116, 73, 110, 108, 105, 110, 101, 34, 44, 10, 65, 117, 116, 111, 32, 61, 32, 34, 65, 110, 121, 83, 117, 105, -116, 97, 98, 108, 101, 34, 44, 10, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 108, 105, 110, 101, 70, 117, 110, 99, 116, -105, 111, 110, 69, 120, 112, 97, 110, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 116, 121, 112, 101, 115, 91, 99, 102, 103, 46, 105, 110, -108, 105, 110, 105, 110, 103, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 111, 114, 99, -101, 73, 110, 99, 108, 117, 100, 101, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 35, 99, 102, -103, 46, 102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, -110, 99, 108, 117, 100, 101, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, -102, 111, 114, 99, 101, 105, 110, 99, 108, 117, 100, 101, 115, 41, 10, 105, 102, 32, 35, 105, 110, 99, 108, 117, 100, 101, 115, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 111, 114, 99, 101, 100, 73, 110, 99, 108, 117, 100, 101, 70, 105, 108, -101, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 105, 110, 99, -108, 117, 100, 101, 115, 44, 32, 39, 59, 39, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 35, 99, 102, 103, 46, 102, 111, 114, - 99, 101, 117, 115, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 117, 115, 105, 110, 103, 115, 32, 61, - 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 102, 111, 114, 99, 101, 117, 115, 105, 110, -103, 115, 41, 10, 105, 102, 32, 35, 117, 115, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, -116, 40, 34, 70, 111, 114, 99, 101, 100, 85, 115, 105, 110, 103, 70, 105, 108, 101, 115, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, - 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 117, 115, 105, 110, 103, 115, 44, 32, 39, 59, 39, 41, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 117, 108, 108, 80, 114, 111, 103, 114, 97, 109, 68, 97, -116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, -115, 50, 48, 49, 53, 34, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 61, 61, 32, 34, 70, 97, 115, 116, 76, -105, 110, 107, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 117, 108, 108, 80, 114, 111, 103, 114, 97, 109, - 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 115, 115, 101, 109, 98, 108, 121, 68, 101, 98, 117, 103, 40, 99, 102, 103, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 97, 115, 115, 101, 109, 98, 108, 121, 100, 101, 98, 117, 103, 32, 116, 104, 101, 110, 10, 32, 32, 32, 32, - 32, 32, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 115, 115, 101, 109, 98, 108, 121, 68, 101, 98, 117, 103, 34, 44, 32, 110, 105, 108, - 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 117, 110, - 99, 116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 117, -110, 99, 116, 105, 111, 110, 108, 101, 118, 101, 108, 108, 105, 110, 107, 105, 110, 103, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 105, -102, 32, 99, 102, 103, 46, 102, 117, 110, 99, 116, 105, 111, 110, 108, 101, 118, 101, 108, 108, 105, 110, 107, 105, 110, 103, 32, 116, 104, 101, 110, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 117, 110, 99, 116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 34, - 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, -117, 110, 99, 116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, 108, 115, -101, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, -100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 70, 117, 110, 99, -116, 105, 111, 110, 76, 101, 118, 101, 108, 76, 105, 110, 107, 105, 110, 103, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, - 73, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 108, 111, 111, 107, 117, 112, 32, 61, 32, -123, 125, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 55, 34, 32, 116, 104, 101, 110, 10, 108, -111, 111, 107, 117, 112, 91, 112, 46, 79, 78, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 108, 111, 111, 107, 117, -112, 91, 112, 46, 79, 70, 70, 93, 32, 32, 32, 32, 32, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 10, 108, 111, 111, 107, 117, 112, 91, 34, - 70, 97, 115, 116, 76, 105, 110, 107, 34, 93, 32, 61, 32, 34, 68, 101, 98, 117, 103, 70, 97, 115, 116, 76, 105, 110, 107, 34, 10, 108, 111, 111, -107, 117, 112, 91, 34, 70, 117, 108, 108, 34, 93, 32, 32, 32, 32, 32, 61, 32, 34, 68, 101, 98, 117, 103, 70, 117, 108, 108, 34, 10, 101, 108, -115, 101, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 108, 111, -111, 107, 117, 112, 91, 112, 46, 79, 78, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 108, 111, 111, 107, 117, 112, - 91, 112, 46, 79, 70, 70, 93, 32, 32, 32, 32, 32, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 10, 108, 111, 111, 107, 117, 112, 91, 34, 70, - 97, 115, 116, 76, 105, 110, 107, 34, 93, 32, 61, 32, 34, 68, 101, 98, 117, 103, 70, 97, 115, 116, 76, 105, 110, 107, 34, 10, 108, 111, 111, 107, -117, 112, 91, 34, 70, 117, 108, 108, 34, 93, 32, 32, 32, 32, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 101, 108, 115, 101, 10, 108, 111, 111, -107, 117, 112, 91, 112, 46, 79, 78, 93, 32, 32, 32, 32, 32, 32, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 108, 111, 111, 107, 117, 112, 91, -112, 46, 79, 70, 70, 93, 32, 32, 32, 32, 32, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 10, 108, 111, 111, 107, 117, 112, 91, 34, 70, 97, -115, 116, 76, 105, 110, 107, 34, 93, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 108, 111, 111, 107, 117, 112, 91, 34, 70, 117, 108, 108, 34, 93, - 32, 32, 32, 32, 32, 61, 32, 34, 116, 114, 117, 101, 34, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, -108, 111, 111, 107, 117, 112, 91, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, -110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 71, 101, 110, 101, 114, 97, 116, 101, 68, 101, 98, 117, 103, 73, 110, 102, 111, 114, 109, - 97, 116, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 77, 97, 110, 105, 102, 101, 115, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 77, 97, 110, 105, 102, 101, 115, 116, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 71, 101, 110, 101, 114, 97, 116, 101, 77, 97, 110, 105, 102, 101, 115, 116, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, -108, 115, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, -101, 77, 97, 112, 70, 105, 108, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, 97, 112, 115, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 71, 101, 110, 101, 114, 97, 116, 101, 77, 97, 112, 70, 105, 108, 101, 34, - 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 105, 103, 110, 111, 114, 101, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 35, 99, 102, 103, 46, 105, 103, 110, 111, 114, 101, 100, 101, 102, 97, 117, 108, 116, 108, 105, 98, 114, 97, 114, 105, 101, 115, 32, 62, 32, 48, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 105, 103, 110, 111, 114, 101, 100, 32, 61, 32, 99, 102, 103, 46, 105, 103, 110, 111, 114, 101, -100, 101, 102, 97, 117, 108, 116, 108, 105, 98, 114, 97, 114, 105, 101, 115, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 105, 103, 110, -111, 114, 101, 100, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 112, 46, 116, 111, 111, 108, 115, 46, 109, 115, 99, 46, 103, 101, 116, 76, 105, - 98, 114, 97, 114, 121, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 40, 41, 91, 105, 103, 110, 111, 114, 101, 100, 91, 105, 93, 58, 109, 97, 116, - 99, 104, 40, 34, 91, 94, 46, 93, 43, 36, 34, 41, 93, 32, 116, 104, 101, 110, 10, 105, 103, 110, 111, 114, 101, 100, 91, 105, 93, 32, 61, 32, -112, 97, 116, 104, 46, 97, 112, 112, 101, 110, 100, 101, 120, 116, 101, 110, 115, 105, 111, 110, 40, 105, 103, 110, 111, 114, 101, 100, 91, 105, 93, 44, - 32, 34, 46, 108, 105, 98, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 103, 110, 111, -114, 101, 83, 112, 101, 99, 105, 102, 105, 99, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 114, 97, 114, 105, 101, 115, 34, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 105, 103, 110, 111, 114, 101, 100, 44, 32, 39, 59, - 39, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 103, 110, 111, 114, 101, 87, 97, 114, -110, 68, 117, 112, 108, 105, 99, 97, 116, 101, 70, 105, 108, 101, 110, 97, 109, 101, 40, 112, 114, 106, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, - 79, 78, 32, 62, 32, 34, 118, 115, 50, 48, 49, 50, 34, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 103, -110, 111, 114, 101, 87, 97, 114, 110, 67, 111, 109, 112, 105, 108, 101, 68, 117, 112, 108, 105, 99, 97, 116, 101, 100, 70, 105, 108, 101, 110, 97, 109, -101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 105, 103, 110, 111, 114, 101, 73, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 40, 99, 102, 103, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 97, 110, 100, 32, 99, 102, 103, 46, -102, 108, 97, 103, 115, 46, 78, 111, 73, 109, 112, 111, 114, 116, 76, 105, 98, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 73, 103, 110, 111, 114, 101, 73, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, -117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 76, 97, -110, 103, 117, 97, 103, 101, 84, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, - 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 86, 67, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, 77, 105, 99, 114, 111, -115, 111, 102, 116, 46, 67, 112, 112, 46, 116, 97, 114, 103, 101, 116, 115, 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, 103, 101, 116, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 105, 109, 112, 111, 114, 116, 71, 114, -111, 117, 112, 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 82, 117, 108, 101, 84, 97, 114, 103, 101, 116, 115, 44, - 10, 109, 46, 105, 109, 112, 111, 114, 116, 78, 117, 71, 101, 116, 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 66, -117, 105, 108, 100, 67, 117, 115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 84, 97, 114, 103, 101, 116, 115, 10, 125, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, 103, 101, 116, -115, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 32, 76, 97, 98, 101, -108, 61, 34, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, 103, 101, 116, 115, 34, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, -114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, -114, 103, 101, 116, 115, 44, 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, - 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 84, 97, -114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, 109, 46, 99, 97, 116, 101, -103, 111, 114, 105, 122, 101, 83, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 95, 44, 32, 103, 114, 111, 117, 112, 32, -105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 103, 114, 111, 117, 112, 115, 41, 32, 100, 111, 10, 105, 102, 32, 103, 114, 111, 117, 112, 46, 99, 97, -116, 101, 103, 111, 114, 121, 46, 101, 109, 105, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, 103, 101, 116, 115, 32, 116, 104, 101, 110, - 10, 103, 114, 111, 117, 112, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 101, 109, 105, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 84, 97, 114, -103, 101, 116, 115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 82, 117, 108, 101, 84, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 102, -111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 112, 114, 106, 46, 114, 117, 108, 101, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 114, 117, -108, 101, 32, 61, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 82, 117, 108, 101, 40, 112, 114, 106, 46, 114, 117, 108, 101, 115, 91, -105, 93, 41, 10, 108, 111, 99, 97, 108, 32, 108, 111, 99, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, - 44, 32, 112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 114, 117, 108, 101, 44, 32, 34, 46, 116, 97, 114, 103, 101, 116, 115, 34, 41, 41, 10, -112, 46, 120, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 108, -111, 99, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 117, 71, 101, 116, - 84, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 97, 99, 107, 97, 103, 101, 41, 10, 108, 111, 99, 97, 108, 32, -112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, - 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 65, 80, 73, 73, 110, 102, 111, 40, 112, 114, 106, 44, 32, 112, 97, 99, 107, 97, 103, 101, 41, 10, -114, 101, 116, 117, 114, 110, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, 112, 46, 102, 105, 108, -101, 110, 97, 109, 101, 40, 112, 114, 106, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, - 97, 116, 40, 34, 112, 97, 99, 107, 97, 103, 101, 115, 92, 92, 37, 115, 46, 37, 115, 92, 92, 98, 117, 105, 108, 100, 92, 92, 110, 97, 116, 105, -118, 101, 92, 92, 37, 115, 46, 116, 97, 114, 103, 101, 116, 115, 34, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, - 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 44, 32, 112, 97, 99, 107, 97, 103, 101, 65, 80, - 73, 73, 110, 102, 111, 46, 118, 101, 114, 98, 97, 116, 105, 109, 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 112, 97, 99, 107, 97, 103, 101, - 65, 80, 73, 73, 110, 102, 111, 46, 118, 101, 114, 115, 105, 111, 110, 44, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, - 49, 48, 46, 112, 97, 99, 107, 97, 103, 101, 73, 100, 40, 112, 97, 99, 107, 97, 103, 101, 41, 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 78, 117, 71, 101, 116, 84, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, -105, 102, 32, 110, 111, 116, 32, 118, 115, 116, 117, 100, 105, 111, 46, 110, 117, 103, 101, 116, 50, 48, 49, 48, 46, 115, 117, 112, 112, 111, 114, 116, -115, 80, 97, 99, 107, 97, 103, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 112, 114, 106, 41, 32, 116, 104, 101, 110, 10, 102, 111, 114, - 32, 105, 32, 61, 32, 49, 44, 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, -101, 116, 115, 70, 105, 108, 101, 32, 61, 32, 110, 117, 71, 101, 116, 84, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, 40, 112, 114, 106, 44, 32, -112, 114, 106, 46, 110, 117, 103, 101, 116, 91, 105, 93, 41, 10, 112, 46, 120, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, - 99, 116, 61, 34, 37, 115, 34, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 69, 120, 105, 115, 116, 115, 40, 92, 39, 37, 115, 92, 39, - 41, 34, 32, 47, 62, 39, 44, 32, 116, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, 44, 32, 116, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 66, -117, 105, 108, 100, 67, 117, 115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 84, 97, 114, 103, 101, 116, 115, 40, 112, 114, 106, 41, 10, 102, -111, 114, 32, 105, 44, 32, 98, 117, 105, 108, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 98, 117, 105, 108, 100, 99, -117, 115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 41, 32, 100, 111, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, -114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 86, 67, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, 37, 115, 46, 116, 97, 114, -103, 101, 116, 115, 34, 32, 47, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 98, 117, 105, 108, 100, 41, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 115, 117, 114, 101, 78, 117, 71, 101, 116, - 80, 97, 99, 107, 97, 103, 101, 66, 117, 105, 108, 100, 73, 109, 112, 111, 114, 116, 115, 40, 112, 114, 106, 41, 10, 105, 102, 32, 35, 112, 114, 106, - 46, 110, 117, 103, 101, 116, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 84, 97, 114, 103, 101, 116, 32, - 78, 97, 109, 101, 61, 34, 69, 110, 115, 117, 114, 101, 78, 117, 71, 101, 116, 80, 97, 99, 107, 97, 103, 101, 66, 117, 105, 108, 100, 73, 109, 112, -111, 114, 116, 115, 34, 32, 66, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 61, 34, 80, 114, 101, 112, 97, 114, 101, 70, 111, 114, 66, -117, 105, 108, 100, 34, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, - 39, 41, 10, 112, 46, 120, 40, 39, 60, 69, 114, 114, 111, 114, 84, 101, 120, 116, 62, 84, 104, 105, 115, 32, 112, 114, 111, 106, 101, 99, 116, 32, -114, 101, 102, 101, 114, 101, 110, 99, 101, 115, 32, 78, 117, 71, 101, 116, 32, 112, 97, 99, 107, 97, 103, 101, 40, 115, 41, 32, 116, 104, 97, 116, - 32, 97, 114, 101, 32, 109, 105, 115, 115, 105, 110, 103, 32, 111, 110, 32, 116, 104, 105, 115, 32, 99, 111, 109, 112, 117, 116, 101, 114, 46, 32, 85, -115, 101, 32, 78, 117, 71, 101, 116, 32, 80, 97, 99, 107, 97, 103, 101, 32, 82, 101, 115, 116, 111, 114, 101, 32, 116, 111, 32, 100, 111, 119, 110, -108, 111, 97, 100, 32, 116, 104, 101, 109, 46, 32, 32, 70, 111, 114, 32, 109, 111, 114, 101, 32, 105, 110, 102, 111, 114, 109, 97, 116, 105, 111, 110, - 44, 32, 115, 101, 101, 32, 104, 116, 116, 112, 58, 47, 47, 103, 111, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 102, 119, -108, 105, 110, 107, 47, 63, 76, 105, 110, 107, 73, 68, 61, 51, 50, 50, 49, 48, 53, 46, 32, 84, 104, 101, 32, 109, 105, 115, 115, 105, 110, 103, - 32, 102, 105, 108, 101, 32, 105, 115, 32, 123, 48, 125, 46, 60, 47, 69, 114, 114, 111, 114, 84, 101, 120, 116, 62, 39, 41, 10, 112, 46, 112, 111, -112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, - 32, 35, 112, 114, 106, 46, 110, 117, 103, 101, 116, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 116, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, - 32, 61, 32, 110, 117, 71, 101, 116, 84, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, 40, 112, 114, 106, 44, 32, 112, 114, 106, 46, 110, 117, 103, -101, 116, 91, 105, 93, 41, 10, 112, 46, 120, 40, 39, 60, 69, 114, 114, 111, 114, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 33, 69, -120, 105, 115, 116, 115, 40, 92, 39, 37, 115, 92, 39, 41, 34, 32, 84, 101, 120, 116, 61, 34, 36, 40, 91, 83, 121, 115, 116, 101, 109, 46, 83, -116, 114, 105, 110, 103, 93, 58, 58, 70, 111, 114, 109, 97, 116, 40, 92, 39, 36, 40, 69, 114, 114, 111, 114, 84, 101, 120, 116, 41, 92, 39, 44, - 32, 92, 39, 37, 115, 92, 39, 41, 41, 34, 32, 47, 62, 39, 44, 32, 116, 97, 114, 103, 101, 116, 115, 70, 105, 108, 101, 44, 32, 116, 97, 114, -103, 101, 116, 115, 70, 105, 108, 101, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 84, 97, 114, 103, 101, 116, 62, 39, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 68, 101, 102, 97, 117, 108, -116, 80, 114, 111, 112, 115, 40, 112, 114, 106, 41, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, - 61, 34, 36, 40, 86, 67, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 112, -112, 46, 68, 101, 102, 97, 117, 108, 116, 46, 112, 114, 111, 112, 115, 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 76, 97, 110, 103, 117, 97, 103, 101, 83, 101, 116, 116, 105, 110, 103, 115, 40, 112, 114, 106, 41, - 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 36, 40, 86, 67, 84, 97, 114, 103, 101, -116, 115, 80, 97, 116, 104, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 112, 112, 46, 112, 114, 111, 112, 115, 34, 32, 47, 62, - 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, -110, 83, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 109, 46, 105, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 83, 101, 116, 116, 105, 110, 103, 115, 44, 10, 109, 46, 105, 109, 112, 111, -114, 116, 82, 117, 108, 101, 83, 101, 116, 116, 105, 110, 103, 115, 44, 10, 109, 46, 105, 109, 112, 111, 114, 116, 66, 117, 105, 108, 100, 67, 117, 115, -116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 80, 114, 111, 112, 115, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 83, 101, 116, 116, 105, 110, 103, 115, 40, 112, 114, 106, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 39, 60, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 32, 76, 97, 98, 101, 108, 61, 34, 69, 120, 116, 101, 110, -115, 105, 111, 110, 83, 101, 116, 116, 105, 110, 103, 115, 34, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, -108, 101, 109, 101, 110, 116, 115, 46, 105, 109, 112, 111, 114, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 83, 101, 116, 116, 105, 110, 103, 115, 44, - 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 83, 101, 116, 116, 105, 110, 103, 115, - 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 122, -101, 83, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 95, 44, 32, 103, 114, 111, 117, 112, 32, 105, 110, 32, 105, 112, - 97, 105, 114, 115, 40, 103, 114, 111, 117, 112, 115, 41, 32, 100, 111, 10, 105, 102, 32, 103, 114, 111, 117, 112, 46, 99, 97, 116, 101, 103, 111, 114, -121, 46, 101, 109, 105, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 83, 101, 116, 116, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, 103, 114, 111, -117, 112, 46, 99, 97, 116, 101, 103, 111, 114, 121, 46, 101, 109, 105, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 83, 101, 116, 116, 105, 110, 103, -115, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 82, 117, 108, 101, 83, 101, 116, 116, 105, 110, 103, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, - 32, 105, 32, 61, 32, 49, 44, 32, 35, 112, 114, 106, 46, 114, 117, 108, 101, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 114, 117, 108, 101, - 32, 61, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 103, 101, 116, 82, 117, 108, 101, 40, 112, 114, 106, 46, 114, 117, 108, 101, 115, 91, 105, 93, - 41, 10, 108, 111, 99, 97, 108, 32, 108, 111, 99, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 112, 114, 106, 44, 32, -112, 46, 102, 105, 108, 101, 110, 97, 109, 101, 40, 114, 117, 108, 101, 44, 32, 34, 46, 112, 114, 111, 112, 115, 34, 41, 41, 10, 112, 46, 120, 40, - 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 108, 111, 99, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 66, 117, 105, 108, 100, 67, 117, -115, 116, 111, 109, 105, 122, 97, 116, 105, 111, 110, 115, 80, 114, 111, 112, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 105, 44, 32, 98, 117, -105, 108, 100, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 114, 106, 46, 98, 117, 105, 108, 100, 99, 117, 115, 116, 111, 109, 105, 122, 97, -116, 105, 111, 110, 115, 41, 32, 100, 111, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, 61, 34, - 36, 40, 86, 67, 84, 97, 114, 103, 101, 116, 115, 80, 97, 116, 104, 41, 92, 92, 37, 115, 46, 112, 114, 111, 112, 115, 34, 32, 47, 62, 39, 44, - 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 98, 117, 105, 108, 100, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 32, 116, 104, 101, 110, 10, 109, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 109, 112, 111, 114, 116, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, -115, 34, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 99, 102, 103, 46, 108, 105, 110, 107, 116, 97, 114, 103, 101, -116, 46, 114, 101, 108, 112, 97, 116, 104, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, -110, 99, 108, 117, 100, 101, 80, 97, 116, 104, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, -117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 115, 121, 115, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, -115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 73, 110, 99, 108, 117, 100, 101, 80, 97, 116, 104, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 59, 36, 40, 73, 110, 99, 108, 117, 100, 101, - 80, 97, 116, 104, 41, 34, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 110, 116, 68, 105, 114, 40, 99, 102, 103, 41, 10, -108, 111, 99, 97, 108, 32, 111, 98, 106, 100, 105, 114, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, - 32, 99, 102, 103, 46, 111, 98, 106, 100, 105, 114, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 116, 68, 105, 114, 34, 44, - 32, 110, 105, 108, 44, 32, 34, 37, 115, 92, 92, 34, 44, 32, 111, 98, 106, 100, 105, 114, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 105, 110, 116, 114, 105, 110, 115, 105, 99, 70, 117, 110, 99, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 105, 110, 116, 114, 105, 110, 115, 105, 99, 115, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, -103, 46, 105, 110, 116, 114, 105, 110, 115, 105, 99, 115, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 116, -114, 105, 110, 115, 105, 99, 70, 117, 110, 99, 116, 105, 111, 110, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, -108, 115, 101, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 116, 114, 105, 110, 115, 105, 99, 70, 117, 110, 99, 116, 105, 111, 110, -115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 111, 110, -102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 110, 116, 114, 105, 110, 115, 105, 99, 70, 117, 110, 99, 116, 105, 111, 110, 115, 34, 44, 32, 110, -105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 107, -101, 121, 119, 111, 114, 100, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 105, 115, 87, 105, 110, 44, 32, 105, 115, 77, 97, 110, 97, 103, -101, 100, 44, 32, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, -116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, -101, 109, 32, 61, 61, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 32, 116, 104, 101, 110, 10, 105, 115, 87, 105, 110, 32, 61, 32, 116, 114, 117, -101, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, 103, 46, 99, 108, 114, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 105, -115, 77, 97, 110, 97, 103, 101, 100, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, -115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 32, 61, - 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 105, 115, 87, 105, 110, 32, 116, 104, 101, 110, 10, 105, 102, 32, 105, -115, 77, 97, 107, 101, 102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 75, 101, 121, 119, 111, 114, -100, 34, 44, 32, 110, 105, 108, 44, 32, 34, 77, 97, 107, 101, 70, 105, 108, 101, 80, 114, 111, 106, 34, 41, 10, 101, 108, 115, 101, 10, 105, 102, - 32, 105, 115, 77, 97, 110, 97, 103, 101, 100, 32, 111, 114, 32, 109, 46, 105, 115, 67, 108, 114, 77, 105, 120, 101, 100, 40, 112, 114, 106, 41, 32, -116, 104, 101, 110, 10, 109, 46, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 40, 112, 114, 106, 41, 10, 101, 110, 100, 10, -105, 102, 32, 105, 115, 77, 97, 110, 97, 103, 101, 100, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 75, 101, 121, -119, 111, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 34, 77, 97, 110, 97, 103, 101, 100, 67, 80, 114, 111, 106, 34, 41, 10, 101, 108, 115, 101, - 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 75, 101, 121, 119, 111, 114, 100, 34, 44, 32, 110, 105, 108, 44, 32, 34, 87, 105, 110, 51, - 50, 80, 114, 111, 106, 34, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 82, 111, 111, 116, 78, 97, 109, 101, 115, -112, 97, 99, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 40, 99, -102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, -103, 44, 32, 99, 102, 103, 46, 115, 121, 115, 108, 105, 98, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 34, 44, 32, 110, 105, -108, 44, 32, 34, 37, 115, 59, 36, 40, 76, 105, 98, 114, 97, 114, 121, 80, 97, 116, 104, 41, 34, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 108, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, -107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, -110, 116, 40, 34, 76, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, 116, 97, 108, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, - 32, 116, 111, 115, 116, 114, 105, 110, 103, 40, 99, 111, 110, 102, 105, 103, 46, 99, 97, 110, 76, 105, 110, 107, 73, 110, 99, 114, 101, 109, 101, 110, -116, 97, 108, 40, 99, 102, 103, 41, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 105, -110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 99, 102, 103, 44, 32, 101, 120, 112, 108, 105, - 99, 105, 116, 41, 10, 105, 102, 32, 101, 120, 112, 108, 105, 99, 105, 116, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, -114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 62, 39, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, 105, -110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, -108, 115, 101, 34, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 82, 101, 102, 101, 114, 101, 110, 99, 101, 62, - 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 77, 97, 115, 109, 80, 114, 101, 112, 114, 111, - 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 32, 116, 104, 101, 110, 10, 109, 46, 112, 114, 101, 112, 114, 111, 99, 101, -115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, - 44, 32, 102, 97, 108, 115, 101, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 109, 105, 110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, -110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 111, 114, 10, 32, 32, - 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 77, 105, 110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 32, 111, 114, 10, 32, - 32, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, -101, 32, 111, 114, 10, 32, 32, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 32, 61, 61, 32, 112, 46, 67, 55, 10, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, 105, 110, 105, 109, 97, 108, 82, 101, 98, 117, 105, 108, 100, 34, 44, - 32, 110, 105, 108, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 109, 111, 100, 117, 108, 101, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 70, 105, 108, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 100, 102, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 102, 105, 110, 100, 102, 105, 108, 101, 40, 99, 102, 103, 44, 32, 34, 46, 100, 101, -102, 34, 41, 10, 105, 102, 32, 100, 102, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, 111, 100, 117, 108, 101, - 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 70, 105, 108, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 100, 102, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, -114, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, -117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 77, 117, 108, 116, 105, 80, 114, 111, 99, 101, 115, 115, 111, 114, 67, 111, 109, 112, 105, 108, 97, 116, 105, 111, 110, 34, 44, - 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 110, 109, 97, 107, 101, 66, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 102, 103, 41, 10, 109, 46, 110, 109, 97, 107, 101, - 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, -100, 115, 44, 32, 34, 66, 117, 105, 108, 100, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 110, 109, 97, 107, -101, 67, 108, 101, 97, 110, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 102, 103, 41, 10, 109, 46, 110, 109, 97, 107, 101, 67, 111, 109, 109, 97, -110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 99, 108, 101, 97, 110, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 34, - 67, 108, 101, 97, 110, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 110, 109, 97, 107, 101, 67, 111, 109, 109, - 97, 110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 44, 32, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 112, 104, 97, 115, 101, 41, 10, 105, 102, - 32, 35, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 111, -115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 99, 111, 109, 109, - 97, 110, 100, 115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, -114, 111, 106, 101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 112, 46, 101, 115, 99, 40, 99, 111, 109, 109, 97, 110, 100, 115, 41, 44, 32, 112, 46, 101, 111, 108, 40, - 41, 41, 10, 112, 46, 119, 40, 39, 60, 78, 77, 97, 107, 101, 37, 115, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 62, 37, 115, 60, 47, - 78, 77, 97, 107, 101, 37, 115, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 62, 39, 44, 32, 112, 104, 97, 115, 101, 44, 32, 99, 111, 109, -109, 97, 110, 100, 115, 44, 32, 112, 104, 97, 115, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 110, 109, 97, 107, 101, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, -110, 100, 32, 126, 61, 32, 112, 46, 78, 79, 78, 69, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, -115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, -112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, 105, 102, 32, 35, 100, -105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 78, 77, 97, 107, 101, 73, 110, 99, -108, 117, 100, 101, 83, 101, 97, 114, 99, 104, 80, 97, 116, 104, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 110, 109, 97, 107, 101, 79, 117, 116, 68, 105, 114, 115, 40, 99, 102, 103, 41, 10, 105, 102, - 32, 118, 115, 116, 117, 100, 105, 111, 46, 105, 115, 77, 97, 107, 101, 102, 105, 108, 101, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, 46, -111, 117, 116, 68, 105, 114, 40, 99, 102, 103, 41, 10, 109, 46, 105, 110, 116, 68, 105, 114, 40, 99, 102, 103, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 105, 110, 100, 111, 119, 115, 83, 68, 75, 68, 101, 115, 107, 116, 111, 112, 65, 82, - 77, 83, 117, 112, 112, 111, 114, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 32, 61, 61, 32, 112, - 46, 87, 73, 78, 68, 79, 87, 83, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, -101, 32, 61, 61, 32, 112, 46, 65, 82, 77, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 87, 105, 110, 100, 111, 119, 115, 83, 68, 75, - 68, 101, 115, 107, 116, 111, 112, 65, 82, 77, 83, 117, 112, 112, 111, 114, 116, 62, 116, 114, 117, 101, 60, 47, 87, 105, 110, 100, 111, 119, 115, 83, - 68, 75, 68, 101, 115, 107, 116, 111, 112, 65, 82, 77, 83, 117, 112, 112, 111, 114, 116, 62, 39, 41, 10, 101, 110, 100, 10, 105, 102, 32, 99, 102, -103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 112, 46, 65, 82, 77, 54, 52, 32, 116, 104, 101, 110, 10, 112, - 46, 119, 40, 39, 60, 87, 105, 110, 100, 111, 119, 115, 83, 68, 75, 68, 101, 115, 107, 116, 111, 112, 65, 82, 77, 54, 52, 83, 117, 112, 112, 111, -114, 116, 62, 116, 114, 117, 101, 60, 47, 87, 105, 110, 100, 111, 119, 115, 83, 68, 75, 68, 101, 115, 107, 116, 111, 112, 65, 82, 77, 54, 52, 83, -117, 112, 112, 111, 114, 116, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 110, 109, 97, 107, 101, 79, 117, 116, 112, 117, 116, 40, 99, 102, 103, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 78, 77, 97, -107, 101, 79, 117, 116, 112, 117, 116, 34, 44, 32, 110, 105, 108, 44, 32, 34, 36, 40, 79, 117, 116, 68, 105, 114, 41, 37, 115, 34, 44, 32, 99, -102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 110, 109, 97, 107, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 126, 61, 32, 112, 46, 78, 79, 78, 69, 32, 97, 110, 100, 32, - 35, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 105, -110, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 101, 102, 105, 110, 101, 115, 44, 32, - 34, 59, 34, 41, 10, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 100, 101, 102, 105, 110, 101, 115, 32, 46, 46, 32, 34, 59, 36, 40, 78, 77, - 97, 107, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 41, 34, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 40, 39, 78, 77, 97, 107, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, -105, 111, 110, 115, 39, 44, 32, 110, 105, 108, 44, 32, 100, 101, 102, 105, 110, 101, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 110, 109, 97, 107, 101, 82, 101, 98, 117, 105, 108, 100, 67, 111, 109, 109, 97, 110, 100, 115, 40, 99, 102, 103, - 41, 10, 109, 46, 110, 109, 97, 107, 101, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 114, 101, - 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 34, 82, 101, 66, 117, 105, 108, 100, 34, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 40, 102, 99, 102, 103, 41, 10, 105, 102, - 32, 102, 99, 102, 103, 46, 111, 98, 106, 110, 97, 109, 101, 32, 126, 61, 32, 102, 99, 102, 103, 46, 98, 97, 115, 101, 110, 97, 109, 101, 32, 116, -104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 78, 97, 109, 101, 34, 44, 32, -109, 46, 99, 111, 110, 102, 105, 103, 80, 97, 105, 114, 40, 102, 99, 102, 103, 46, 99, 111, 110, 102, 105, 103, 41, 44, 32, 34, 36, 40, 73, 110, -116, 68, 105, 114, 41, 92, 92, 37, 115, 46, 111, 98, 106, 34, 44, 32, 102, 99, 102, 103, 46, 111, 98, 106, 110, 97, 109, 101, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, 40, - 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, 76, 105, 98, -114, 97, 114, 121, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 109, 105, 116, 68, 101, 102, 97, 117, 108, 116, - 76, 105, 98, 78, 97, 109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 109, 105, 116, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, 114, 115, 40, 99, 102, 103, 41, - 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 79, 102, 102, 32, 61, 32, 34, 102, 97, 108, 115, 101, 34, 44, 32, 79, 110, - 32, 61, 32, 34, 116, 114, 117, 101, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, 112, 91, 99, 102, -103, 46, 111, 109, 105, 116, 102, 114, 97, 109, 101, 112, 111, 105, 110, 116, 101, 114, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, -110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 109, 105, 116, 70, 114, 97, 109, 101, 80, 111, 105, 110, 116, 101, 114, 115, 34, 44, - 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -111, 112, 116, 105, 109, 105, 122, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 111, 110, 102, 105, -103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, 101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 40, 34, 69, 110, 97, 98, 108, 101, 67, 79, 77, 68, 65, 84, 70, 111, 108, 100, 105, 110, 103, 34, 44, 32, 110, 105, -108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 112, 116, 105, 109, 105, 122, 101, 82, 101, -102, 101, 114, 101, 110, 99, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 112, 116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 79, 102, 102, 61, 34, 68, 105, 115, 97, 98, -108, 101, 100, 34, 44, 32, 79, 110, 61, 34, 70, 117, 108, 108, 34, 44, 32, 68, 101, 98, 117, 103, 61, 34, 68, 105, 115, 97, 98, 108, 101, 100, - 34, 44, 32, 70, 117, 108, 108, 61, 34, 70, 117, 108, 108, 34, 44, 32, 83, 105, 122, 101, 61, 34, 77, 105, 110, 83, 112, 97, 99, 101, 34, 44, - 32, 83, 112, 101, 101, 100, 61, 34, 77, 97, 120, 83, 112, 101, 101, 100, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, - 61, 32, 109, 97, 112, 91, 99, 102, 103, 46, 111, 112, 116, 105, 109, 105, 122, 101, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 111, 114, 32, -110, 111, 116, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 79, 112, -116, 105, 109, 105, 122, 97, 116, 105, 111, 110, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 118, 97, 108, 117, 101, 32, 111, 114, - 32, 34, 68, 105, 115, 97, 98, 108, 101, 100, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -111, 117, 116, 68, 105, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 100, 105, 114, 32, 61, 32, 118, 115, 116, 117, 100, -105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, -101, 99, 116, 111, 114, 121, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 117, 116, 68, 105, 114, 34, 44, 32, 110, 105, 108, 44, - 32, 34, 37, 115, 92, 92, 34, 44, 32, 111, 117, 116, 100, 105, 114, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -101, 120, 101, 99, 117, 116, 97, 98, 108, 101, 80, 97, 116, 104, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, - 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 98, 105, 110, 100, 105, 114, 115, 41, 10, -105, 102, 32, 35, 100, 105, 114, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 100, 105, 114, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 116, -114, 97, 110, 115, 108, 97, 116, 101, 40, 100, 105, 114, 115, 44, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 100, 105, 114, 41, 10, 105, 102, 32, -112, 97, 116, 104, 46, 105, 115, 97, 98, 115, 111, 108, 117, 116, 101, 40, 100, 105, 114, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, - 32, 100, 105, 114, 10, 101, 110, 100, 10, 114, 101, 116, 117, 114, 110, 32, 34, 36, 40, 80, 114, 111, 106, 101, 99, 116, 68, 105, 114, 41, 34, 32, - 46, 46, 32, 100, 105, 114, 10, 101, 110, 100, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 120, 101, 99, 117, 116, 97, 98, 108, -101, 80, 97, 116, 104, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 59, 36, 40, 69, 120, 101, 99, 117, 116, 97, 98, 108, 101, 80, 97, 116, -104, 41, 34, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 108, 97, 116, 102, 111, 114, 109, 84, 111, 111, 108, 115, 101, 116, - 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 44, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 112, 46, 99, 111, -110, 102, 105, 103, 46, 116, 111, 111, 108, 115, 101, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 110, 111, 116, 32, 118, 101, 114, 115, 105, 111, 110, - 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, -114, 101, 110, 116, 40, 41, 46, 116, 111, 111, 108, 115, 101, 116, 10, 116, 111, 111, 108, 44, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 112, - 46, 116, 111, 111, 108, 115, 46, 99, 97, 110, 111, 110, 105, 99, 97, 108, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 105, 102, 32, 118, -101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 78, 79, 78, - 69, 32, 111, 114, 32, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 77, 65, 75, 69, 70, 73, 76, 69, 32, 116, 104, 101, 110, - 10, 105, 102, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 112, 97, 116, 104, 46, 105, -115, 99, 112, 112, 102, 105, 108, 101, 41, 32, 111, 114, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, - 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 108, 97, 116, 102, 111, 114, 109, 84, 111, 111, 108, 115, 101, 116, - 34, 44, 32, 110, 105, 108, 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 80, 108, 97, 116, 102, 111, 114, 109, 84, 111, 111, 108, 115, 101, 116, 34, 44, 32, 110, 105, 108, 44, 32, 118, 101, 114, 115, -105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 99, -111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 70, 105, 108, 101, 40, 102, 105, 108, 101, 78, 97, 109, 101, 44, 32, 99, 102, 103, 41, - 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 70, 105, 108, -101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 102, 105, 108, 101, 78, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 40, 99, 102, 103, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 99, 102, 103, 44, 32, 102, 105, 108, 101, 99, 102, 103, 32, - 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 110, 111, 114, 109, 97, 108, 105, 122, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 102, 105, 108, -101, 99, 102, 103, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 99, 102, 103, 46, 112, 99, 104, 115, 111, 117, 114, 99, 101, 32, 61, 61, - 32, 102, 105, 108, 101, 99, 102, 103, 46, 97, 98, 115, 112, 97, 116, 104, 32, 97, 110, 100, 32, 110, 111, 116, 32, 112, 114, 106, 99, 102, 103, 46, -102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 80, 114, 101, 99, -111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 67, 114, 101, 97, -116, 101, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 102, 105, 108, 101, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, -114, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 78, 111, 116, 85, 115, 105, 110, 103, 39, 41, 10, 101, 110, 100, 10, 101, -108, 115, 101, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 106, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 80, 67, 72, 32, 97, 110, -100, 32, 112, 114, 106, 99, 102, 103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, -116, 40, 34, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 34, 44, 32, 110, 105, 108, 44, 32, 34, 85, 115, 101, - 34, 41, 10, 109, 46, 112, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 70, 105, 108, 101, 40, 112, 114, 106, 99, 102, -103, 46, 112, 99, 104, 104, 101, 97, 100, 101, 114, 44, 32, 112, 114, 106, 99, 102, 103, 41, 10, 101, 108, 115, 101, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 80, 114, 101, 99, 111, 109, 112, 105, 108, 101, 100, 72, 101, 97, 100, 101, 114, 34, 44, 32, 110, 105, 108, 44, 32, 34, 78, -111, 116, 85, 115, 105, 110, 103, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 100, 101, -102, 105, 110, 101, 115, 44, 32, 101, 115, 99, 97, 112, 101, 81, 117, 111, 116, 101, 115, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, -105, 102, 32, 35, 100, 101, 102, 105, 110, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 116, - 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 101, 102, 105, 110, 101, 115, 44, 32, 34, 59, 34, 41, 10, 105, 102, 32, 101, 115, 99, - 97, 112, 101, 81, 117, 111, 116, 101, 115, 32, 116, 104, 101, 110, 10, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 100, 101, 102, 105, 110, 101, 115, - 58, 103, 115, 117, 98, 40, 39, 34, 39, 44, 32, 39, 92, 92, 34, 39, 41, 10, 101, 110, 100, 10, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, -100, 101, 102, 105, 110, 101, 115, 32, 46, 46, 32, 34, 59, 37, 37, 40, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, -110, 105, 116, 105, 111, 110, 115, 41, 34, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, -114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 100, 101, 102, 105, 110, 101, -115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 110, 100, 101, 102, 105, 110, 101, 80, 114, -101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 117, 110, 100, 101, 102, -105, 110, 101, 115, 44, 32, 101, 115, 99, 97, 112, 101, 81, 117, 111, 116, 101, 115, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, -102, 32, 35, 117, 110, 100, 101, 102, 105, 110, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 117, 110, 100, 101, 102, 105, 110, 101, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 117, 110, 100, 101, 102, 105, 110, 101, 115, 44, 32, 34, 59, 34, 41, 10, 105, -102, 32, 101, 115, 99, 97, 112, 101, 81, 117, 111, 116, 101, 115, 32, 116, 104, 101, 110, 10, 117, 110, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, -117, 110, 100, 101, 102, 105, 110, 101, 115, 58, 103, 115, 117, 98, 40, 39, 34, 39, 44, 32, 39, 92, 92, 34, 39, 41, 10, 101, 110, 100, 10, 117, -110, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 117, 110, 100, 101, 102, 105, 110, 101, 115, 32, 46, 46, 32, 34, 59, 37, 37, 40, 85, 110, 100, -101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 41, 34, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 85, 110, 100, 101, 102, 105, 110, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, -102, 105, 110, 105, 116, 105, 111, 110, 115, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 117, 110, 100, 101, 102, 105, 110, 101, 115, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 103, 101, 116, 83, 121, 109, 98, -111, 108, 115, 80, 97, 116, 104, 82, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 121, 109, 98, -111, 108, 115, 112, 97, 116, 104, 32, 97, 110, 100, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 32, 126, 61, 32, 112, 46, 79, 70, 70, - 32, 97, 110, 100, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 102, 111, 114, 109, 97, 116, 32, 126, 61, 32, 34, 99, 55, 34, 32, 116, 104, 101, -110, 10, 114, 101, 116, 117, 114, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, -102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 99, 102, 103, 46, 115, 121, 109, 98, 111, 108, 115, 112, 97, 116, 104, 41, 10, 101, 108, 115, -101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 118, - 97, 108, 117, 101, 32, 61, 32, 103, 101, 116, 83, 121, 109, 98, 111, 108, 115, 80, 97, 116, 104, 82, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, -103, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 111, 103, -114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, 70, 105, 108, 101, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 98, 97, 115, 101, - 70, 105, 108, 101, 78, 97, 109, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 103, 101, 116, 83, -121, 109, 98, 111, 108, 115, 80, 97, 116, 104, 82, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 118, 97, 108, 117, 101, - 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 111, 103, 114, 97, 109, 68, 97, 116, 97, 66, 97, 115, 101, - 70, 105, 108, 101, 78, 97, 109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 40, 112, 114, 106, 41, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 34, 44, 32, 110, 105, 108, 44, 32, 34, 123, 37, 115, 125, 34, 44, - 32, 112, 114, 106, 46, 117, 117, 105, 100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, -116, 78, 97, 109, 101, 40, 112, 114, 106, 41, 10, 105, 102, 32, 112, 114, 106, 46, 110, 97, 109, 101, 32, 126, 61, 32, 112, 114, 106, 46, 102, 105, -108, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 111, 106, 101, 99, 116, 78, 97, -109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 99, 102, 103, 44, 32, -108, 97, 98, 101, 108, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 100, 10, 105, 102, 32, 99, 102, 103, 32, 116, 104, 101, 110, 10, 99, 111, -110, 100, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 32, 37, 115, 39, 44, 32, 109, 46, 99, 111, 110, 100, -105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 101, 110, 100, 10, 105, 102, 32, 108, 97, 98, 101, 108, 32, 116, 104, 101, 110, 10, 108, 97, - 98, 101, 108, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 32, 76, 97, 98, 101, 108, 61, 34, 37, 115, 34, - 39, 44, 32, 108, 97, 98, 101, 108, 41, 10, 101, 110, 100, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, -114, 111, 117, 112, 37, 115, 37, 115, 62, 39, 44, 32, 99, 111, 110, 100, 32, 111, 114, 32, 34, 34, 44, 32, 108, 97, 98, 101, 108, 32, 111, 114, - 32, 34, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 83, 104, 101, 101, -116, 115, 40, 99, 102, 103, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 32, 76, 97, 98, -101, 108, 61, 34, 80, 114, 111, 112, 101, 114, 116, 121, 83, 104, 101, 101, 116, 115, 34, 32, 37, 115, 62, 39, 44, 32, 109, 46, 99, 111, 110, 100, -105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, 112, 46, 119, 40, 39, 60, 73, 109, 112, 111, 114, 116, 32, 80, 114, 111, 106, 101, 99, 116, - 61, 34, 36, 40, 85, 115, 101, 114, 82, 111, 111, 116, 68, 105, 114, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 67, 112, 112, 46, - 36, 40, 80, 108, 97, 116, 102, 111, 114, 109, 41, 46, 117, 115, 101, 114, 46, 112, 114, 111, 112, 115, 34, 32, 67, 111, 110, 100, 105, 116, 105, 111, -110, 61, 34, 101, 120, 105, 115, 116, 115, 40, 92, 39, 36, 40, 85, 115, 101, 114, 82, 111, 111, 116, 68, 105, 114, 41, 92, 92, 77, 105, 99, 114, -111, 115, 111, 102, 116, 46, 67, 112, 112, 46, 36, 40, 80, 108, 97, 116, 102, 111, 114, 109, 41, 46, 117, 115, 101, 114, 46, 112, 114, 111, 112, 115, - 92, 39, 41, 34, 32, 76, 97, 98, 101, 108, 61, 34, 76, 111, 99, 97, 108, 65, 112, 112, 68, 97, 116, 97, 80, 108, 97, 116, 102, 111, 114, 109, - 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 109, 112, 111, 114, 116, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 83, 104, 101, 101, 116, 71, 114, 111, 117, 112, - 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, -102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 83, 104, 101, 101, 116, 115, 40, 99, 102, 103, - 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 67, 111, -112, 121, 76, 111, 99, 97, 108, 83, 97, 116, 101, 108, 108, 105, 116, 101, 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 40, 112, 114, 106, 44, 32, -114, 101, 102, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 67, 111, 112, 121, 76, 111, 99, 97, 108, 83, 97, 116, 101, 108, 108, 105, -116, 101, 65, 115, 115, 101, 109, 98, 108, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 76, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, - 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 112, 114, 106, 44, 32, 114, 101, 102, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 76, 105, 110, 107, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, - 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, -101, 79, 117, 116, 112, 117, 116, 65, 115, 115, 101, 109, 98, 108, 121, 40, 112, 114, 106, 44, 32, 114, 101, 102, 41, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 82, 101, 102, 101, 114, 101, 110, 99, 101, 79, 117, 116, 112, 117, 116, 65, 115, 115, 101, 109, 98, 108, 121, 34, 44, 32, 110, -105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, 101, 114, -101, 110, 99, 101, 80, 114, 105, 118, 97, 116, 101, 40, 112, 114, 106, 44, 32, 114, 101, 102, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, - 34, 80, 114, 105, 118, 97, 116, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 114, 101, 102, 101, 114, 101, 110, 99, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 44, 32, 114, 101, 102, - 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 111, 106, 101, 99, 116, 34, 44, 32, 110, 105, 108, 44, 32, 34, 123, 37, 115, -125, 34, 44, 32, 114, 101, 102, 46, 117, 117, 105, 100, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 102, -101, 114, 101, 110, 99, 101, 85, 115, 101, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, 100, 101, 110, 99, 101, 115, 40, 112, 114, 106, 44, - 32, 114, 101, 102, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 85, 115, 101, 76, 105, 98, 114, 97, 114, 121, 68, 101, 112, 101, 110, -100, 101, 110, 99, 121, 73, 110, 112, 117, 116, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 115, 111, 117, 114, 99, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, -108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 99, 102, 103, 44, 32, 116, 97, 98, 108, 101, 46, 106, -111, 105, 110, 40, 99, 102, 103, 46, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 44, 32, 99, 102, 103, 46, 114, 101, 115, 105, 110, 99, 108, -117, 100, 101, 100, 105, 114, 115, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 101, 115, 111, 117, 114, 99, -101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 99, 102, 103, 41, 10, 108, 111, - 99, 97, 108, 32, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 106, 111, 105, 110, 40, 99, 102, 103, 46, 100, 101, 102, -105, 110, 101, 115, 44, 32, 99, 102, 103, 46, 114, 101, 115, 100, 101, 102, 105, 110, 101, 115, 41, 10, 105, 102, 32, 99, 102, 103, 46, 101, 120, 99, -101, 112, 116, 105, 111, 110, 104, 97, 110, 100, 108, 105, 110, 103, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 116, 97, 98, -108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 100, 101, 102, 105, 110, 101, 115, 44, 32, 34, 95, 72, 65, 83, 95, 69, 88, 67, 69, 80, 84, 73, - 79, 78, 83, 61, 48, 34, 41, 10, 101, 110, 100, 10, 109, 46, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, 102, 105, 110, 105, -116, 105, 111, 110, 115, 40, 99, 102, 103, 44, 32, 100, 101, 102, 105, 110, 101, 115, 44, 32, 116, 114, 117, 101, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 40, 99, 102, 103, 41, 10, 108, 111, 99, - 97, 108, 32, 114, 117, 110, 116, 105, 109, 101, 115, 32, 61, 32, 123, 10, 83, 116, 97, 116, 105, 99, 68, 101, 98, 117, 103, 32, 32, 32, 61, 32, - 34, 77, 117, 108, 116, 105, 84, 104, 114, 101, 97, 100, 101, 100, 68, 101, 98, 117, 103, 34, 44, 10, 83, 116, 97, 116, 105, 99, 82, 101, 108, 101, - 97, 115, 101, 32, 61, 32, 34, 77, 117, 108, 116, 105, 84, 104, 114, 101, 97, 100, 101, 100, 34, 44, 10, 83, 104, 97, 114, 101, 100, 68, 101, 98, -117, 103, 32, 61, 32, 34, 77, 117, 108, 116, 105, 84, 104, 114, 101, 97, 100, 101, 100, 68, 101, 98, 117, 103, 68, 76, 76, 34, 44, 10, 83, 104, - 97, 114, 101, 100, 82, 101, 108, 101, 97, 115, 101, 32, 61, 32, 34, 77, 117, 108, 116, 105, 84, 104, 114, 101, 97, 100, 101, 100, 68, 76, 76, 34, - 10, 125, 10, 108, 111, 99, 97, 108, 32, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 114, 117, 110, -116, 105, 109, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 114, 117, 110, 116, 105, 109, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, -101, 110, 116, 40, 34, 82, 117, 110, 116, 105, 109, 101, 76, 105, 98, 114, 97, 114, 121, 34, 44, 32, 110, 105, 108, 44, 32, 114, 117, 110, 116, 105, -109, 101, 115, 91, 114, 117, 110, 116, 105, 109, 101, 93, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 99, 97, 108, 108, 105, 110, 103, 67, 111, 110, 118, 101, 110, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 99, - 97, 108, 108, 105, 110, 103, 99, 111, 110, 118, 101, 110, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, - 34, 67, 97, 108, 108, 105, 110, 103, 67, 111, 110, 118, 101, 110, 116, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 99, 102, 103, 46, 99, 97, -108, 108, 105, 110, 103, 99, 111, 110, 118, 101, 110, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 114, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 114, 116, 116, 105, 32, 61, 61, 32, 112, 46, 79, 70, 70, 32, 97, 110, 100, 32, 40, 40, 110, -111, 116, 32, 99, 102, 103, 46, 99, 108, 114, 41, 32, 111, 114, 32, 99, 102, 103, 46, 99, 108, 114, 32, 61, 61, 32, 112, 46, 79, 70, 70, 41, - 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 82, 117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, - 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, -103, 46, 114, 116, 116, 105, 32, 61, 61, 32, 112, 46, 79, 78, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 82, -117, 110, 116, 105, 109, 101, 84, 121, 112, 101, 73, 110, 102, 111, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 116, 114, 117, -101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 117, 102, 102, 101, 114, 83, 101, 99, -117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 116, 111, 111, 108, 44, 32, 116, 111, 111, 108, - 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 46, 116, 111, 111, 108, 115, 101, 116, 40, 99, 102, 103, 41, 10, -105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 78, 111, 66, 117, 102, 102, 101, 114, 83, 101, 99, 117, 114, 105, 116, 121, 67, 104, 101, - 99, 107, 32, 111, 114, 32, 40, 116, 111, 111, 108, 86, 101, 114, 115, 105, 111, 110, 32, 97, 110, 100, 32, 116, 111, 111, 108, 86, 101, 114, 115, 105, -111, 110, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 76, 76, 86, 77, 45, 118, 115, 34, 41, 41, 32, 116, 104, 101, 110, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 66, 117, 102, 102, 101, 114, 83, 101, 99, 117, 114, 105, 116, 121, 67, 104, 101, 99, 107, 34, 44, 32, -110, 105, 108, 44, 32, 34, 102, 97, 108, 115, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 115, 116, 114, 105, 110, 103, 80, 111, 111, 108, 105, 110, 103, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 116, 114, 105, 110, -103, 112, 111, 111, 108, 105, 110, 103, 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 105, 102, 32, 99, 102, 103, 46, 115, 116, 114, 105, -110, 103, 112, 111, 111, 108, 105, 110, 103, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 116, 114, 105, 110, 103, - 80, 111, 111, 108, 105, 110, 103, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 108, 115, 101, 10, 109, 46, 101, 108, -101, 109, 101, 110, 116, 40, 34, 83, 116, 114, 105, 110, 103, 80, 111, 111, 108, 105, 110, 103, 34, 44, 32, 110, 105, 108, 44, 32, 34, 102, 97, 108, -115, 101, 34, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 105, 102, 32, 99, 111, 110, 102, 105, 103, 46, 105, 115, 79, 112, 116, 105, 109, 105, 122, -101, 100, 66, 117, 105, 108, 100, 40, 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 116, 114, -105, 110, 103, 80, 111, 111, 108, 105, 110, 103, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 117, 98, 83, 121, 115, 116, 101, 109, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, -108, 32, 115, 117, 98, 115, 121, 115, 116, 101, 109, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, - 67, 79, 78, 83, 79, 76, 69, 65, 80, 80, 44, 32, 34, 67, 111, 110, 115, 111, 108, 101, 34, 44, 32, 34, 87, 105, 110, 100, 111, 119, 115, 34, - 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 117, 98, 83, 121, 115, 116, 101, 109, 34, 44, 32, 110, 105, 108, 44, 32, 115, 117, - 98, 115, 121, 115, 116, 101, 109, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 69, 120, -116, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 32, 61, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, -101, 116, 46, 101, 120, 116, 101, 110, 115, 105, 111, 110, 10, 105, 102, 32, 101, 120, 116, 32, 126, 61, 32, 34, 34, 32, 116, 104, 101, 110, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 97, 114, 103, 101, 116, 69, 120, 116, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, - 32, 101, 120, 116, 41, 10, 101, 108, 115, 101, 10, 112, 46, 119, 40, 39, 60, 84, 97, 114, 103, 101, 116, 69, 120, 116, 62, 39, 41, 10, 112, 46, -119, 40, 39, 60, 47, 84, 97, 114, 103, 101, 116, 69, 120, 116, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 77, 97, 99, 104, 105, 110, 101, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 116, 97, -114, 103, 101, 116, 109, 97, 99, 104, 105, 110, 101, 32, 61, 32, 123, 10, 120, 56, 54, 32, 61, 32, 34, 77, 97, 99, 104, 105, 110, 101, 88, 56, - 54, 34, 44, 10, 120, 56, 54, 95, 54, 52, 32, 61, 32, 34, 77, 97, 99, 104, 105, 110, 101, 88, 54, 52, 34, 44, 10, 125, 10, 105, 102, 32, - 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, 66, 32, 97, 110, 100, 32, 99, 111, 110, 102, -105, 103, 46, 104, 97, 115, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 112, 97, 116, 104, 46, 105, 115, 114, 101, 115, 111, 117, 114, 99, 101, 102, -105, 108, 101, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 116, 97, 114, 103, 101, 116, 109, 97, - 99, 104, 105, 110, 101, 91, 99, 102, 103, 46, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, - 32, 126, 61, 32, 110, 105, 108, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 97, 114, 103, 101, 116, 77, 97, - 99, 104, 105, 110, 101, 34, 44, 32, 110, 105, 108, 44, 32, 39, 37, 115, 39, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 78, 97, 109, 101, 40, 99, 102, 103, 41, - 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, 97, 114, 103, 101, 116, 78, 97, 109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, -115, 37, 115, 34, 44, 32, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 112, 114, 101, 102, 105, 120, 44, 32, 99, 102, -103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 98, 97, 115, 101, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 108, 97, 116, 101, 115, 116, 84, 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, 111, 114, 109, 86, 101, 114, 115, 105, -111, 110, 40, 112, 114, 106, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 55, 34, 32, 116, -104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 76, 97, 116, 101, 115, 116, 84, 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, -111, 114, 109, 86, 101, 114, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 34, 36, 40, 91, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, - 66, 117, 105, 108, 100, 46, 85, 116, 105, 108, 105, 116, 105, 101, 115, 46, 84, 111, 111, 108, 76, 111, 99, 97, 116, 105, 111, 110, 72, 101, 108, 112, -101, 114, 93, 58, 58, 71, 101, 116, 76, 97, 116, 101, 115, 116, 83, 68, 75, 84, 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, 111, 114, 109, 86, -101, 114, 115, 105, 111, 110, 40, 39, 87, 105, 110, 100, 111, 119, 115, 39, 44, 32, 39, 49, 48, 46, 48, 39, 41, 41, 34, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 105, 110, 100, 111, 119, 115, 84, 97, 114, 103, 101, 116, 80, 108, 97, -116, 102, 111, 114, 109, 86, 101, 114, 115, 105, 111, 110, 40, 112, 114, 106, 44, 32, 99, 102, 103, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, - 78, 32, 60, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 116, 97, 114, 103, 101, 116, 32, 61, 32, 99, 102, 103, 32, 111, 114, 32, 112, 114, 106, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, -115, 105, 111, 110, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, 105, 111, 110, 40, 116, 97, 114, -103, 101, 116, 41, 10, 105, 102, 32, 99, 102, 103, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 112, 114, 106, 86, 101, 114, 115, 105, 111, -110, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 115, 121, 115, 116, 101, 109, 118, 101, 114, 115, 105, 111, 110, 40, 112, 114, 106, 41, 10, 105, -102, 32, 110, 111, 116, 32, 112, 114, 106, 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 61, 32, 112, -114, 106, 86, 101, 114, 115, 105, 111, 110, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, - 32, 118, 101, 114, 115, 105, 111, 110, 32, 61, 61, 32, 34, 108, 97, 116, 101, 115, 116, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 95, 65, 67, - 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 32, 116, 104, 101, 110, 10, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, -110, 105, 108, 32, 32, 32, 45, 45, 32, 83, 68, 75, 32, 118, 49, 48, 32, 105, 115, 32, 110, 111, 116, 32, 115, 117, 112, 112, 111, 114, 116, 101, -100, 32, 98, 121, 32, 86, 83, 50, 48, 49, 53, 10, 101, 108, 115, 101, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 61, 61, 32, 34, 118, -115, 50, 48, 49, 55, 34, 32, 116, 104, 101, 110, 10, 118, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 36, 40, 76, 97, 116, 101, 115, 116, 84, - 97, 114, 103, 101, 116, 80, 108, 97, 116, 102, 111, 114, 109, 86, 101, 114, 115, 105, 111, 110, 41, 34, 10, 101, 108, 115, 101, 10, 118, 101, 114, 115, -105, 111, 110, 32, 61, 32, 34, 49, 48, 46, 48, 34, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 118, 101, 114, 115, 105, 111, 110, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 87, 105, 110, 100, 111, 119, 115, 84, 97, 114, 103, 101, 116, 80, 108, 97, -116, 102, 111, 114, 109, 86, 101, 114, 115, 105, 111, 110, 34, 44, 32, 110, 105, 108, 44, 32, 118, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 102, 101, 114, 114, 101, 100, 84, 111, 111, 108, 65, 114, 99, -104, 105, 116, 101, 99, 116, 117, 114, 101, 40, 112, 114, 106, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 62, 61, 32, 34, 118, 115, - 50, 48, 49, 51, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 112, 114, 106, 46, 112, 114, 101, 102, 101, 114, 114, 101, 100, 116, 111, 111, 108, 97, -114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 112, 46, 88, 56, 54, 95, 54, 52, 32, 116, 104, 101, 110, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 102, 101, 114, 114, 101, 100, 84, 111, 111, 108, 65, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, -101, 34, 44, 32, 110, 105, 108, 44, 32, 39, 120, 54, 52, 39, 41, 10, 101, 108, 115, 101, 105, 102, 32, 112, 114, 106, 46, 112, 114, 101, 102, 101, -114, 114, 101, 100, 116, 111, 111, 108, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, 61, 61, 32, 112, 46, 88, 56, 54, 32, 116, 104, -101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 80, 114, 101, 102, 101, 114, 114, 101, 100, 84, 111, 111, 108, 65, 114, 99, 104, 105, -116, 101, 99, 116, 117, 114, 101, 34, 44, 32, 110, 105, 108, 44, 32, 39, 120, 56, 54, 39, 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 105, -102, 32, 112, 114, 106, 46, 112, 114, 101, 102, 101, 114, 114, 101, 100, 116, 111, 111, 108, 97, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 32, - 61, 61, 32, 112, 46, 88, 56, 54, 95, 54, 52, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 85, 115, 101, 78, - 97, 116, 105, 118, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 34, 44, 32, 110, 105, 108, 44, 32, 39, 116, 114, 117, 101, 39, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 114, 101, 97, 116, 76, 105, 110, 107, -101, 114, 87, 97, 114, 110, 105, 110, 103, 65, 115, 69, 114, 114, 111, 114, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, - 97, 103, 115, 46, 70, 97, 116, 97, 108, 76, 105, 110, 107, 87, 97, 114, 110, 105, 110, 103, 115, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 101, 108, 32, 61, 32, 105, 105, 102, 40, 99, 102, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 84, 65, 84, 73, 67, 76, 73, - 66, 44, 32, 34, 76, 105, 98, 34, 44, 32, 34, 76, 105, 110, 107, 101, 114, 34, 41, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 84, -114, 101, 97, 116, 34, 32, 46, 46, 32, 101, 108, 32, 46, 46, 32, 34, 87, 97, 114, 110, 105, 110, 103, 65, 115, 69, 114, 114, 111, 114, 115, 34, - 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 116, 114, 101, 97, 116, 87, 67, 104, 97, 114, 95, 116, 65, 115, 66, 117, 105, 108, 116, 73, 110, 84, 121, 112, 101, 40, 99, 102, 103, 41, - 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 79, 110, 32, 61, 32, 34, 116, 114, 117, 101, 34, 44, 32, 79, 102, 102, 32, - 61, 32, 34, 102, 97, 108, 115, 101, 34, 32, 125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, 112, 91, 99, 102, -103, 46, 110, 97, 116, 105, 118, 101, 119, 99, 104, 97, 114, 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 40, 34, 84, 114, 101, 97, 116, 87, 67, 104, 97, 114, 95, 116, 65, 115, 66, 117, 105, 108, 116, 73, 110, 84, 121, 112, -101, 34, 44, 32, 110, 105, 108, 44, 32, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 116, 114, 101, 97, 116, 87, 97, 114, 110, 105, 110, 103, 65, 115, 69, 114, 114, 111, 114, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, -102, 103, 46, 102, 108, 97, 103, 115, 46, 70, 97, 116, 97, 108, 67, 111, 109, 112, 105, 108, 101, 87, 97, 114, 110, 105, 110, 103, 115, 32, 97, 110, -100, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 32, 126, 61, 32, 112, 46, 79, 70, 70, 32, 116, 104, 101, 110, 10, 109, 46, 101, -108, 101, 109, 101, 110, 116, 40, 34, 84, 114, 101, 97, 116, 87, 97, 114, 110, 105, 110, 103, 65, 115, 69, 114, 114, 111, 114, 34, 44, 32, 110, 105, -108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 105, -115, 97, 98, 108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 32, 62, 32, - 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 119, 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, -110, 99, 97, 116, 40, 99, 102, 103, 46, 100, 105, 115, 97, 98, 108, 101, 119, 97, 114, 110, 105, 110, 103, 115, 44, 32, 34, 59, 34, 41, 10, 119, - 97, 114, 110, 105, 110, 103, 115, 32, 61, 32, 119, 97, 114, 110, 105, 110, 103, 115, 32, 46, 46, 32, 34, 59, 37, 37, 40, 68, 105, 115, 97, 98, -108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 41, 34, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, - 68, 105, 115, 97, 98, 108, 101, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 39, 44, 32, 99, 111, 110, 100, 105, 116, -105, 111, 110, 44, 32, 119, 97, 114, 110, 105, 110, 103, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 116, 114, 101, 97, 116, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, 40, - 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 102, 97, 116, 97, 108, 119, 97, 114, -110, 105, 110, 103, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 97, 116, 97, 108, 32, 61, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 102, 97, 116, 97, 108, 119, 97, 114, 110, 105, 110, 103, 115, 44, 32, 34, 59, 34, - 41, 10, 102, 97, 116, 97, 108, 32, 61, 32, 102, 97, 116, 97, 108, 32, 46, 46, 32, 34, 59, 37, 37, 40, 84, 114, 101, 97, 116, 83, 112, 101, - 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, 41, 34, 10, 109, 46, 101, 108, 101, 109, 101, 110, -116, 40, 39, 84, 114, 101, 97, 116, 83, 112, 101, 99, 105, 102, 105, 99, 87, 97, 114, 110, 105, 110, 103, 115, 65, 115, 69, 114, 114, 111, 114, 115, - 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 102, 97, 116, 97, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 68, 101, 98, 117, 103, 76, 105, 98, 114, 97, 114, 105, 101, 115, 40, 99, 102, 103, 41, 10, 108, -111, 99, 97, 108, 32, 114, 117, 110, 116, 105, 109, 101, 32, 61, 32, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 114, 117, 110, 116, 105, 109, 101, - 40, 99, 102, 103, 41, 32, 111, 114, 32, 105, 105, 102, 40, 99, 111, 110, 102, 105, 103, 46, 105, 115, 68, 101, 98, 117, 103, 66, 117, 105, 108, 100, - 40, 99, 102, 103, 41, 44, 32, 34, 68, 101, 98, 117, 103, 34, 44, 32, 34, 82, 101, 108, 101, 97, 115, 101, 34, 41, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 40, 34, 85, 115, 101, 68, 101, 98, 117, 103, 76, 105, 98, 114, 97, 114, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 116, -111, 115, 116, 114, 105, 110, 103, 40, 114, 117, 110, 116, 105, 109, 101, 58, 101, 110, 100, 115, 119, 105, 116, 104, 40, 34, 68, 101, 98, 117, 103, 34, - 41, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 79, 102, 77, 102, 99, 40, 99, 102, 103, 41, - 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 77, 70, 67, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, - 40, 34, 85, 115, 101, 79, 102, 77, 102, 99, 34, 44, 32, 110, 105, 108, 44, 32, 105, 105, 102, 40, 99, 102, 103, 46, 115, 116, 97, 116, 105, 99, -114, 117, 110, 116, 105, 109, 101, 32, 61, 61, 32, 34, 79, 110, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 34, 44, 32, 34, 68, 121, 110, 97, -109, 105, 99, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 79, 102, 65, -116, 108, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 97, 116, 108, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, -116, 40, 34, 85, 115, 101, 79, 102, 65, 84, 76, 34, 44, 32, 110, 105, 108, 44, 32, 99, 102, 103, 46, 97, 116, 108, 41, 10, 101, 110, 100, 10, -101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 114, 77, 97, 99, 114, 111, 115, 40, 99, 102, 103, 41, 10, 112, - 46, 119, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 32, 76, 97, 98, 101, 108, 61, 34, 85, 115, 101, 114, 77, 97, - 99, 114, 111, 115, 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 97, 114, 110, 105, 110, -103, 76, 101, 118, 101, 108, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, 32, 61, 32, 123, 32, 79, 102, 102, 32, 61, 32, - 34, 84, 117, 114, 110, 79, 102, 102, 65, 108, 108, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, 32, 69, 120, 116, 114, 97, 32, 61, 32, 34, 76, -101, 118, 101, 108, 52, 34, 32, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 87, 97, 114, 110, 105, 110, 103, 76, 101, 118, 101, 108, - 34, 44, 32, 110, 105, 108, 44, 32, 109, 97, 112, 91, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 93, 32, 111, 114, 32, 34, 76, 101, -118, 101, 108, 51, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 119, 97, 114, 110, 105, 110, 103, 76, 101, 118, -101, 108, 70, 105, 108, 101, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 112, - 32, 61, 32, 123, 32, 79, 102, 102, 32, 61, 32, 34, 84, 117, 114, 110, 79, 102, 102, 65, 108, 108, 87, 97, 114, 110, 105, 110, 103, 115, 34, 44, - 32, 69, 120, 116, 114, 97, 32, 61, 32, 34, 76, 101, 118, 101, 108, 52, 34, 32, 125, 10, 105, 102, 32, 99, 102, 103, 46, 119, 97, 114, 110, 105, -110, 103, 115, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 87, 97, 114, 110, 105, 110, 103, 76, 101, 118, 101, 108, - 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 109, 97, 112, 91, 99, 102, 103, 46, 119, 97, 114, 110, 105, 110, 103, 115, 93, 32, -111, 114, 32, 34, 76, 101, 118, 101, 108, 51, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 40, 41, 10, 112, 46, 120, 109, 108, 85, 116, 102, 56, 40, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, -114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, -102, 103, 46, 115, 104, 97, 100, 101, 114, 100, 101, 102, 105, 110, 101, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, -100, 101, 102, 105, 110, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 115, 104, 97, 100, 101, 114, 100, 101, 102, -105, 110, 101, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 100, 101, -102, 105, 110, 101, 115, 44, 32, 34, 59, 34, 41, 10, 115, 104, 97, 100, 101, 114, 100, 101, 102, 105, 110, 101, 115, 32, 61, 32, 115, 104, 97, 100, -101, 114, 100, 101, 102, 105, 110, 101, 115, 32, 46, 46, 32, 34, 59, 37, 37, 40, 80, 114, 101, 112, 114, 111, 99, 101, 115, 115, 111, 114, 68, 101, -102, 105, 110, 105, 116, 105, 111, 110, 115, 41, 34, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 80, 114, 101, 112, 114, 111, 99, 101, 115, -115, 111, 114, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 115, 104, 97, 100, -101, 114, 100, 101, 102, 105, 110, 101, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, - 67, 111, 109, 112, 105, 108, 101, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 115, 40, 99, 102, 103, - 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 105, 110, 99, 108, 117, 100, -101, 100, 105, 114, 115, 32, 97, 110, 100, 32, 35, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 112, - 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 105, 110, 99, 108, 117, 100, 101, 100, 105, 114, 115, 41, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 39, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, - 99, 116, 111, 114, 105, 101, 115, 39, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 34, 37, 115, 59, 37, 37, 40, 65, 100, 100, 105, -116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 34, 44, 32, 116, 97, 98, 108, -101, 46, 99, 111, 110, 99, 97, 116, 40, 100, 105, 114, 115, 44, 32, 34, 59, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 84, 121, 112, 101, 40, 99, 102, 103, 44, - 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 116, 121, 112, 101, 32, 116, 104, -101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 104, 97, 100, 101, 114, 84, 121, 112, 101, 34, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 116, 121, 112, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 77, 111, 100, 101, 108, 40, 99, 102, -103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 109, 111, 100, 101, 108, - 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 83, 104, 97, 100, 101, 114, 77, 111, 100, 101, 108, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 109, 111, 100, 101, 108, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 69, 110, 116, -114, 121, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, -101, 110, 116, 114, 121, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 69, 110, 116, 114, 121, 80, 111, 105, 110, 116, - 78, 97, 109, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 101, 110, 116, 114, -121, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, -104, 97, 100, 101, 114, 86, 97, 114, 105, 97, 98, 108, 101, 78, 97, 109, 101, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, - 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 118, 97, 114, 105, 97, 98, 108, 101, 110, 97, 109, 101, 32, 116, 104, 101, 110, - 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 86, 97, 114, 105, 97, 98, 108, 101, 78, 97, 109, 101, 34, 44, 32, 99, 111, 110, 100, 105, -116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 118, 97, 114, 105, 97, 98, 108, 101, 110, 97, 109, 101, 41, 10, 101, 110, -100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, - 72, 101, 97, 100, 101, 114, 79, 117, 116, 112, 117, 116, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, - 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 104, 101, 97, 100, 101, 114, 102, 105, 108, 101, 111, 117, 116, 112, 117, 116, 32, 116, 104, 101, 110, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 72, 101, 97, 100, 101, 114, 70, 105, 108, 101, 79, 117, 116, 112, 117, 116, 34, 44, 32, 99, 111, -110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 104, 101, 97, 100, 101, 114, 102, 105, 108, 101, 111, 117, 116, -112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, -101, 83, 104, 97, 100, 101, 114, 79, 98, 106, 101, 99, 116, 79, 117, 116, 112, 117, 116, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, -111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 111, 98, 106, 101, 99, 116, 102, 105, 108, 101, 111, 117, 116, 112, 117, -116, 32, 116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 79, 98, 106, 101, 99, 116, 70, 105, 108, 101, 79, 117, 116, 112, -117, 116, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 111, 98, 106, 101, 99, 116, -102, 105, 108, 101, 111, 117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, -120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 65, 115, 115, 101, 109, 98, 108, 101, 114, 40, 99, 102, 103, 44, 32, 99, 111, 110, -100, 105, 116, 105, 111, 110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 97, 115, 115, 101, 109, 98, 108, 101, 114, 32, 116, -104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 115, 115, 101, 109, 98, 108, 101, 114, 79, 117, 116, 112, 117, 116, 34, 44, - 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 97, 115, 115, 101, 109, 98, 108, 101, 114, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, -100, 101, 114, 65, 115, 115, 101, 109, 98, 108, 101, 114, 79, 117, 116, 112, 117, 116, 40, 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, -110, 41, 10, 105, 102, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 97, 115, 115, 101, 109, 98, 108, 101, 114, 111, 117, 116, 112, 117, 116, 32, -116, 104, 101, 110, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 115, 115, 101, 109, 98, 108, 101, 114, 79, 117, 116, 112, 117, 116, 70, -105, 108, 101, 34, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 99, 102, 103, 46, 115, 104, 97, 100, 101, 114, 97, 115, 115, 101, 109, - 98, 108, 101, 114, 111, 117, 116, 112, 117, 116, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, -120, 67, 111, 109, 112, 105, 108, 101, 83, 104, 97, 100, 101, 114, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 40, - 99, 102, 103, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 41, 10, 108, 111, 99, 97, 108, 32, 111, 112, 116, 115, 32, 61, 32, 99, 102, 103, - 46, 115, 104, 97, 100, 101, 114, 111, 112, 116, 105, 111, 110, 115, 10, 105, 102, 32, 35, 111, 112, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, - 10, 111, 112, 116, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 111, 112, 116, 115, 44, 32, 34, 32, 34, 41, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 34, 44, 32, 99, -111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 39, 37, 115, 32, 37, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, -110, 115, 41, 39, 44, 32, 111, 112, 116, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, -111, 110, 100, 105, 116, 105, 111, 110, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 84, 101, 120, 116, 40, 99, 102, 103, 84, 101, 120, 116, 41, 10, -114, 101, 116, 117, 114, 110, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, - 34, 92, 39, 36, 40, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 41, 124, 36, 40, 80, 108, 97, 116, 102, 111, 114, 109, 41, 92, - 39, 61, 61, 92, 39, 37, 115, 92, 39, 34, 39, 44, 32, 112, 46, 101, 115, 99, 40, 99, 102, 103, 84, 101, 120, 116, 41, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, -110, 32, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 70, 114, 111, 109, 67, 111, 110, 102, 105, 103, 84, 101, 120, 116, 40, 118, 115, 116, 117, -100, 105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 67, 111, 110, 102, 105, 103, 40, 99, 102, 103, 41, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 108, 97, 116, 101, 115, 116, 83, 68, 75, 49, 48, 86, 101, 114, 115, 105, 111, 110, 40, 41, 10, 108, 111, 99, 97, -108, 32, 97, 114, 99, 104, 32, 61, 32, 105, 105, 102, 40, 111, 115, 46, 105, 115, 54, 52, 98, 105, 116, 40, 41, 44, 32, 34, 92, 92, 87, 79, - 87, 54, 52, 51, 50, 78, 111, 100, 101, 92, 92, 34, 44, 32, 34, 92, 92, 34, 41, 10, 108, 111, 99, 97, 108, 32, 118, 101, 114, 115, 105, 111, -110, 32, 61, 32, 111, 115, 46, 103, 101, 116, 87, 105, 110, 100, 111, 119, 115, 82, 101, 103, 105, 115, 116, 114, 121, 40, 34, 72, 75, 76, 77, 58, - 83, 79, 70, 84, 87, 65, 82, 69, 34, 32, 46, 46, 32, 97, 114, 99, 104, 32, 46, 46, 34, 77, 105, 99, 114, 111, 115, 111, 102, 116, 92, 92, - 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 83, 68, 75, 115, 92, 92, 87, 105, 110, 100, 111, 119, 115, 92, 92, 118, 49, 48, 46, 48, 92, 92, - 80, 114, 111, 100, 117, 99, 116, 86, 101, 114, 115, 105, 111, 110, 34, 41, 10, 105, 102, 32, 118, 101, 114, 115, 105, 111, 110, 32, 126, 61, 32, 110, -105, 108, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 118, 101, 114, 115, 105, 111, 110, 32, 46, 46, 32, 34, 46, 48, 34, 10, 101, -108, 115, 101, 10, 114, 101, 116, 117, 114, 110, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 101, 108, 101, 109, 101, 110, 116, 40, 110, 97, 109, 101, 44, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 44, 32, 118, 97, 108, 117, 101, - 44, 32, 46, 46, 46, 41, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 32, 61, 32, 123, 46, 46, 46, 125, 10, 105, 102, 32, 115, 101, 108, 101, - 99, 116, 40, 39, 35, 39, 44, 46, 46, 46, 41, 32, 61, 61, 32, 48, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 46, -101, 115, 99, 40, 118, 97, 108, 117, 101, 41, 10, 101, 108, 115, 101, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 97, 114, 103, 32, -100, 111, 10, 97, 114, 103, 91, 105, 93, 32, 61, 32, 112, 46, 101, 115, 99, 40, 97, 114, 103, 91, 105, 93, 41, 10, 101, 110, 100, 10, 101, 110, -100, 10, 105, 102, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 108, 101, 109, 101, 110, -116, 32, 61, 32, 123, 125, 10, 101, 108, 101, 109, 101, 110, 116, 46, 110, 97, 109, 101, 32, 61, 32, 110, 97, 109, 101, 10, 101, 108, 101, 109, 101, -110, 116, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 32, 61, 32, 99, 111, 110, 100, 105, 116, 105, 111, 110, 10, 101, 108, 101, 109, 101, 110, 116, - 46, 118, 97, 108, 117, 101, 32, 61, 32, 118, 97, 108, 117, 101, 10, 101, 108, 101, 109, 101, 110, 116, 46, 97, 114, 103, 115, 32, 61, 32, 97, 114, -103, 10, 105, 102, 32, 46, 46, 46, 32, 116, 104, 101, 110, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 61, 61, 32, 39, 37, 115, 39, 32, 116, -104, 101, 110, 10, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, 116, 105, 110, 103, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, - 97, 116, 40, 97, 114, 103, 41, 10, 101, 108, 115, 101, 10, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, 116, 105, 110, 103, 32, 61, 32, 118, - 97, 108, 117, 101, 32, 46, 46, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 97, 114, 103, 41, 10, 101, 110, 100, 10, 101, 108, -115, 101, 10, 101, 108, 101, 109, 101, 110, 116, 46, 115, 101, 116, 116, 105, 110, 103, 32, 61, 32, 101, 108, 101, 109, 101, 110, 116, 46, 118, 97, 108, -117, 101, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 97, -108, 69, 108, 101, 109, 101, 110, 116, 115, 44, 32, 101, 108, 101, 109, 101, 110, 116, 41, 10, 101, 108, 115, 101, 10, 108, 111, 99, 97, 108, 32, 102, -111, 114, 109, 97, 116, 32, 61, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 39, 60, 37, 115, 62, 37, 115, 60, 47, 37, -115, 62, 39, 44, 32, 110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 44, 32, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 102, 111, 114, 109, - 97, 116, 44, 32, 116, 97, 98, 108, 101, 46, 117, 110, 112, 97, 99, 107, 40, 97, 114, 103, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/vs2010_vcxproj_user.lua -static const unsigned char builtin_script_104[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, -116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 100, 101, 98, 117, 103, 83, 101, 116, -116, 105, 110, 103, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, - 85, 115, 101, 114, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, - 99, 97, 108, 32, 115, 105, 122, 101, 32, 61, 32, 48, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, -116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, -103, 93, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, - 40, 50, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 117, 115, 101, 114, 44, - 32, 99, 102, 103, 41, 10, 112, 46, 112, 111, 112, 40, 50, 41, 10, 101, 110, 100, 41, 10, 115, 105, 122, 101, 32, 61, 32, 115, 105, 122, 101, 32, - 43, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 10, 101, 110, 100, 10, 105, 102, 32, 115, 105, 122, 101, 32, 62, 32, 48, - 32, 116, 104, 101, 110, 10, 109, 46, 120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 40, 41, 10, 109, 46, 117, 115, 101, 114, 80, -114, 111, 106, 101, 99, 116, 40, 41, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 46, 101, 97, - 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, -116, 121, 71, 114, 111, 117, 112, 32, 37, 115, 62, 39, 44, 32, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 40, 99, 102, 103, 41, 41, 10, -105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 111, 117, 116, -108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 91, 99, 102, 103, 93, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, -114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, -106, 101, 99, 116, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 101, 114, 80, -114, 111, 106, 101, 99, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, - 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 84, 111, 111, 108, -115, 86, 101, 114, 115, 105, 111, 110, 61, 34, 37, 115, 34, 32, 120, 109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, -109, 97, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 100, 101, 118, 101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, -105, 108, 100, 47, 50, 48, 48, 51, 34, 62, 39, 44, 10, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 117, 115, 101, 114, - 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, -111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 100, 101, 98, 117, -103, 83, 101, 116, 116, 105, 110, 103, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 99, 102, 103, 41, 10, 114, 101, 116, 117, 114, 110, - 32, 123, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 44, 10, 109, 46, 108, 111, 99, - 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 44, 10, 109, 46, 100, 101, - 98, 117, 103, 103, 101, 114, 70, 108, 97, 118, 111, 114, 44, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, 111, 109, -109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 44, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 68, 101, - 98, 117, 103, 103, 101, 114, 84, 121, 112, 101, 44, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 69, 110, 118, 105, 114, -111, 110, 109, 101, 110, 116, 44, 10, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 77, 101, 114, 103, 101, 69, 110, 118, 105, -114, 111, 110, 109, 101, 110, 116, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 83, -101, 116, 116, 105, 110, 103, 115, 40, 99, 102, 103, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, -110, 116, 115, 46, 100, 101, 98, 117, 103, 83, 101, 116, 116, 105, 110, 103, 115, 44, 32, 99, 102, 103, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 100, 101, 98, 117, 103, 103, 101, 114, 70, 108, 97, 118, 111, 114, 40, 99, 102, 103, 41, 10, 108, 111, 99, 97, 108, - 32, 109, 97, 112, 32, 61, 32, 123, 10, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 76, 111, 99, 97, 108, 32, 61, 32, 34, 87, 105, -110, 100, 111, 119, 115, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 34, 44, 10, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, -111, 82, 101, 109, 111, 116, 101, 32, 61, 32, 34, 87, 105, 110, 100, 111, 119, 115, 82, 101, 109, 111, 116, 101, 68, 101, 98, 117, 103, 103, 101, 114, - 34, 44, 10, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 87, 101, 98, 66, 114, 111, 119, 115, 101, 114, 32, 61, 32, 34, 87, 101, 98, - 66, 114, 111, 119, 115, 101, 114, 68, 101, 98, 117, 103, 103, 101, 114, 34, 44, 10, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 87, 101, - 98, 83, 101, 114, 118, 105, 99, 101, 32, 61, 32, 34, 87, 101, 98, 83, 101, 114, 118, 105, 99, 101, 68, 101, 98, 117, 103, 103, 101, 114, 34, 10, -125, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 32, 61, 32, 109, 97, 112, 91, 99, 102, 103, 46, 100, 101, 98, 117, 103, 103, 101, 114, - 93, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 68, 101, 98, 117, 103, 103, 101, 114, 70, 108, - 97, 118, 111, 114, 62, 37, 115, 60, 47, 68, 101, 98, 117, 103, 103, 101, 114, 70, 108, 97, 118, 111, 114, 62, 39, 44, 32, 118, 97, 108, 117, 101, - 41, 10, 101, 108, 115, 101, 105, 102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 100, 105, 114, 32, 111, 114, 32, 99, 102, 103, 46, 100, 101, 98, -117, 103, 99, 111, 109, 109, 97, 110, 100, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 68, 101, 98, 117, 103, 103, 101, 114, 70, 108, 97, -118, 111, 114, 62, 87, 105, 110, 100, 111, 119, 115, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 60, 47, 68, 101, 98, 117, 103, 103, -101, 114, 70, 108, 97, 118, 111, 114, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, -111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, -100, 101, 98, 117, 103, 99, 111, 109, 109, 97, 110, 100, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 32, 61, 32, 112, 97, -116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 99, 111, 109, 109, 97, 110, 100, 41, 10, 112, - 46, 119, 40, 39, 60, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 62, 37, 115, 60, 47, 76, 111, - 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 62, 39, 44, 32, 100, 105, 114, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 68, 101, 98, 117, 103, -103, 101, 114, 84, 121, 112, 101, 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 103, 101, 114, 116, 121, 112, 101, - 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 68, 101, 98, 117, 103, 103, 101, -114, 84, 121, 112, 101, 62, 37, 115, 60, 47, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 68, 101, 98, 117, 103, 103, 101, 114, 84, -121, 112, 101, 62, 39, 44, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 103, 101, 114, 116, 121, 112, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 67, 111, 109, 109, 97, 110, 100, - 65, 114, 103, 117, 109, 101, 110, 116, 115, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, 115, - 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 97, 114, 103, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, - 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, 65, 110, 100, 80, 97, 116, 104, 115, 40, 99, 102, 103, 46, 100, 101, 98, 117, 103, 97, 114, 103, -115, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, 101, 99, 116, 46, 98, 97, 115, 101, 100, 105, 114, 44, 32, 99, 102, 103, 46, 112, 114, 111, 106, -101, 99, 116, 46, 108, 111, 99, 97, 116, 105, 111, 110, 41, 10, 112, 46, 120, 40, 39, 60, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, -114, 67, 111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 62, 37, 115, 60, 47, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, -103, 101, 114, 67, 111, 109, 109, 97, 110, 100, 65, 114, 103, 117, 109, 101, 110, 116, 115, 62, 39, 44, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, - 99, 97, 116, 40, 97, 114, 103, 115, 44, 32, 34, 32, 34, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 87, 111, 114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, - 40, 99, 102, 103, 41, 10, 105, 102, 32, 99, 102, 103, 46, 100, 101, 98, 117, 103, 100, 105, 114, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, - 32, 100, 105, 114, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 97, 116, 104, 40, 99, 102, 103, 44, 32, 99, 102, 103, 46, 100, -101, 98, 117, 103, 100, 105, 114, 41, 10, 112, 46, 120, 40, 39, 60, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 87, 111, 114, 107, -105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 62, 37, 115, 60, 47, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 87, 111, -114, 107, 105, 110, 103, 68, 105, 114, 101, 99, 116, 111, 114, 121, 62, 39, 44, 32, 100, 105, 114, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 69, 110, 118, 105, 114, 111, 110, 109, 101, -110, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, 103, 46, 100, 101, 98, 117, 103, 101, 110, 118, 115, 32, 62, 32, 48, 32, 116, 104, -101, 110, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 102, 103, - 46, 100, 101, 98, 117, 103, 101, 110, 118, 115, 44, 32, 34, 92, 110, 34, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 68, -101, 98, 117, 103, 69, 110, 118, 115, 73, 110, 104, 101, 114, 105, 116, 32, 116, 104, 101, 110, 10, 101, 110, 118, 115, 32, 61, 32, 101, 110, 118, 115, - 32, 46, 46, 32, 34, 92, 110, 36, 40, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, -116, 41, 34, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 60, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 69, 110, 118, 105, 114, -111, 110, 109, 101, 110, 116, 62, 37, 115, 60, 47, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 69, 110, 118, 105, 114, 111, 110, 109, -101, 110, 116, 62, 39, 44, 32, 101, 110, 118, 115, 41, 10, 105, 102, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 68, 101, 98, 117, 103, 69, -110, 118, 115, 68, 111, 110, 116, 77, 101, 114, 103, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 50, 44, 39, 60, 76, 111, 99, 97, 108, 68, -101, 98, 117, 103, 103, 101, 114, 77, 101, 114, 103, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 62, 102, 97, 108, 115, 101, 60, 47, 76, -111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 77, 101, 114, 103, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 62, 39, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 108, 68, 101, 98, 117, -103, 103, 101, 114, 77, 101, 114, 103, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 99, 102, 103, 41, 10, 105, 102, 32, 35, 99, 102, -103, 46, 100, 101, 98, 117, 103, 101, 110, 118, 115, 32, 62, 32, 48, 32, 97, 110, 100, 32, 99, 102, 103, 46, 102, 108, 97, 103, 115, 46, 68, 101, - 98, 117, 103, 69, 110, 118, 115, 68, 111, 110, 116, 77, 101, 114, 103, 101, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 50, 44, 39, 60, 76, 111, - 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 77, 101, 114, 103, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 62, 102, 97, 108, 115, -101, 60, 47, 76, 111, 99, 97, 108, 68, 101, 98, 117, 103, 103, 101, 114, 77, 101, 114, 103, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, - 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/vs2010_vcxproj_filters.lua -static const unsigned char builtin_script_105[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, 32, 112, 46, 116, 114, 101, 101, 10, -108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, 49, 48, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 70, 105, 108, 116, 101, 114, 115, 40, 112, 114, 106, 41, 10, 109, 46, 120, 109, 108, - 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 40, 41, 10, 109, 46, 102, 105, 108, 116, 101, 114, 115, 80, 114, 111, 106, 101, 99, 116, 40, 41, - 10, 109, 46, 117, 110, 105, 113, 117, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 115, 40, 112, 114, 106, 41, 10, 109, 46, 102, 105, 108, 116, -101, 114, 71, 114, 111, 117, 112, 115, 40, 112, 114, 106, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 62, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 116, 101, 114, 115, 80, 114, 111, 106, 101, 99, 116, 40, - 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, -116, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 32, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, -110, 61, 34, 37, 115, 34, 32, 120, 109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, -114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 100, 101, 118, 101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, 105, 108, 100, 47, 50, 48, 48, - 51, 34, 62, 39, 44, 10, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 102, 105, 108, 116, 101, 114, 84, 111, 111, 108, 115, - 86, 101, 114, 115, 105, 111, 110, 32, 111, 114, 32, 97, 99, 116, 105, 111, 110, 46, 118, 115, 116, 117, 100, 105, 111, 46, 116, 111, 111, 108, 115, 86, -101, 114, 115, 105, 111, 110, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, -117, 112, 115, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 103, 114, 111, 117, 112, 115, 32, 61, 32, 109, 46, 99, 97, 116, 101, 103, 111, -114, 105, 122, 101, 83, 111, 117, 114, 99, 101, 115, 40, 112, 114, 106, 41, 10, 102, 111, 114, 32, 95, 44, 32, 103, 114, 111, 117, 112, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 103, 114, 111, 117, 112, 115, 41, 32, 100, 111, 10, 103, 114, 111, 117, 112, 46, 99, 97, 116, 101, 103, 111, 114, -121, 46, 101, 109, 105, 116, 70, 105, 108, 116, 101, 114, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 110, 105, 113, 117, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 115, 40, 112, 114, -106, 41, 10, 108, 111, 99, 97, 108, 32, 116, 114, 32, 61, 32, 112, 114, 111, 106, 101, 99, 116, 46, 103, 101, 116, 115, 111, 117, 114, 99, 101, 116, -114, 101, 101, 40, 112, 114, 106, 41, 10, 108, 111, 99, 97, 108, 32, 99, 111, 110, 116, 101, 110, 116, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, -117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 116, 114, 101, 101, 46, 116, 114, 97, -118, 101, 114, 115, 101, 40, 116, 114, 44, 32, 123, 10, 111, 110, 98, 114, 97, 110, 99, 104, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, -110, 111, 100, 101, 44, 32, 100, 101, 112, 116, 104, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 70, 105, 108, 116, 101, 114, 32, 73, 110, 99, -108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 110, 111, 100, 101, - 46, 112, 97, 116, 104, 44, 32, 39, 92, 92, 39, 41, 41, 10, 112, 46, 119, 40, 39, 60, 85, 110, 105, 113, 117, 101, 73, 100, 101, 110, 116, 105, -102, 105, 101, 114, 62, 123, 37, 115, 125, 60, 47, 85, 110, 105, 113, 117, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 62, 39, 44, 32, 111, -115, 46, 117, 117, 105, 100, 40, 110, 111, 100, 101, 46, 112, 97, 116, 104, 41, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 70, 105, 108, 116, -101, 114, 62, 39, 41, 10, 101, 110, 100, 10, 125, 44, 32, 102, 97, 108, 115, 101, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, - 10, 105, 102, 32, 35, 99, 111, 110, 116, 101, 110, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, - 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 99, 111, 110, 116, 101, 110, 116, 115, 41, 10, 112, - 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 102, 105, 108, 116, 101, 114, 71, 114, 111, 117, 112, 40, 112, 114, 106, 44, 32, 103, 114, 111, 117, 112, 44, 32, -116, 97, 103, 41, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 115, 32, 61, 32, 103, 114, 111, 117, 112, 46, 102, 105, 108, 101, 115, 10, 105, -102, 32, 102, 105, 108, 101, 115, 32, 97, 110, 100, 32, 35, 102, 105, 108, 101, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, -115, 104, 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 102, 111, 114, 32, 95, 44, 32, 102, 105, 108, 101, 32, 105, 110, - 32, 105, 112, 97, 105, 114, 115, 40, 102, 105, 108, 101, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 114, 101, 108, 32, 61, 32, 112, 97, -116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 105, 108, 101, 46, 114, 101, 108, 112, 97, 116, 104, 41, 10, 105, 102, 32, 112, 114, -106, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 73, 84, 69, 77, 83, 32, 116, 104, 101, 110, 10, 114, 101, 108, - 32, 61, 32, 34, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 104, 105, 115, 70, 105, 108, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 41, 34, - 32, 46, 46, 32, 114, 101, 108, 10, 101, 110, 100, 10, 105, 102, 32, 102, 105, 108, 101, 46, 112, 97, 114, 101, 110, 116, 46, 112, 97, 116, 104, 32, -116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, 92, 34, 37, 115, 92, 34, 62, - 39, 44, 32, 116, 97, 103, 44, 32, 114, 101, 108, 41, 10, 112, 46, 119, 40, 39, 60, 70, 105, 108, 116, 101, 114, 62, 37, 115, 60, 47, 70, 105, -108, 116, 101, 114, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 102, 105, 108, 101, 46, 112, 97, 114, 101, -110, 116, 46, 112, 97, 116, 104, 44, 32, 39, 92, 92, 39, 41, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, 32, 116, - 97, 103, 41, 10, 101, 108, 115, 101, 10, 112, 46, 119, 40, 39, 60, 37, 115, 32, 73, 110, 99, 108, 117, 100, 101, 61, 92, 34, 37, 115, 92, 34, - 32, 47, 62, 39, 44, 32, 116, 97, 103, 44, 32, 114, 101, 108, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, - 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/vs2010_rules_props.lua -static const unsigned char builtin_script_106[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, - 49, 48, 46, 114, 117, 108, 101, 115, 32, 61, 32, 123, 125, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 114, -117, 108, 101, 115, 46, 112, 114, 111, 112, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, 116, 117, -100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 114, 117, 108, 101, 115, 46, 112, 114, 111, 112, 115, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, -115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 112, 114, 111, 106, 101, - 99, 116, 69, 108, 101, 109, 101, 110, 116, 44, 10, 109, 46, 116, 97, 114, 103, 101, 116, 115, 71, 114, 111, 117, 112, 44, 10, 109, 46, 100, 101, 112, -101, 110, 100, 115, 79, 110, 71, 114, 111, 117, 112, 44, 10, 109, 46, 114, 117, 108, 101, 71, 114, 111, 117, 112, 44, 10, 125, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 114, 41, 10, 112, 46, 120, 109, 108, 85, 116, 102, 56, - 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, -116, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 62, 39, - 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 116, 97, 114, 103, 101, 116, 115, 71, 114, 111, 117, 112, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 98, 101, 102, 111, 114, 101, 84, 97, 114, -103, 101, 116, 115, 44, 10, 109, 46, 97, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 115, 71, 114, 111, 117, 112, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 80, 114, 111, -112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 32, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, - 61, 34, 92, 39, 36, 40, 37, 115, 66, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 41, 92, 39, 32, 61, 61, 32, 92, 39, 92, 39, - 32, 97, 110, 100, 32, 92, 39, 36, 40, 37, 115, 65, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 41, 92, 39, 32, 61, 61, 32, 92, 39, - 92, 39, 32, 97, 110, 100, 32, 92, 39, 36, 40, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 41, 92, 39, 32, - 33, 61, 32, 92, 39, 77, 97, 107, 101, 102, 105, 108, 101, 92, 39, 34, 62, 39, 44, 10, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, -109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 116, 97, 114, 103, 101, -116, 115, 71, 114, 111, 117, 112, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, -117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 100, 101, 112, 101, 110, 100, 115, 79, 110, 71, 114, -111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 100, 101, 112, -101, 110, 100, 115, 79, 110, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 112, 101, 110, 100, 115, - 79, 110, 71, 114, 111, 117, 112, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, -112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 100, 101, 112, 101, -110, 100, 115, 79, 110, 71, 114, 111, 117, 112, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, - 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 71, 114, 111, 117, -112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 112, 114, 111, 112, 101, -114, 116, 121, 68, 101, 102, 97, 117, 108, 116, 115, 44, 10, 109, 46, 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, -116, 101, 115, 44, 10, 109, 46, 101, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 44, 10, 109, 46, 97, -100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 71, 114, 111, 117, 112, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, -101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 37, 115, - 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 114, 117, 108, 101, 71, 114, 111, 117, 112, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, 32, -114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, -114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 68, -101, 102, 97, 117, 108, 116, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 114, 46, 112, 114, 111, 112, 101, 114, -116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 100, 101, 102, 115, 32, 100, 111, - 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 32, 61, 32, 100, 101, 102, 115, 91, 105, 93, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, - 32, 61, 32, 100, 101, 102, 46, 118, 97, 108, 117, 101, 10, 105, 102, 32, 118, 97, 108, 117, 101, 32, 116, 104, 101, 110, 10, 105, 102, 32, 100, 101, -102, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 112, 97, 116, 104, 34, 32, 116, 104, 101, 110, 10, 118, 97, 108, 117, 101, 32, 61, 32, 112, 97, -116, 104, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 40, 118, 97, 108, 117, 101, 41, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 60, 37, 115, - 62, 37, 115, 60, 47, 37, 115, 62, 39, 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 44, 32, 118, 97, 108, 117, 101, 44, 32, 100, 101, 102, 46, -110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, -105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 112, -115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 114, 46, 98, 117, 105, 108, 100, 100, 101, 112, 101, 110, 100, 101, 110, - 99, 105, 101, 115, 44, 32, 34, 59, 34, 41, 10, 112, 46, 120, 40, 39, 60, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, -100, 101, 110, 99, 105, 101, 115, 62, 37, 115, 60, 47, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, -101, 115, 62, 39, 44, 32, 100, 101, 112, 115, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 102, 116, 101, 114, - 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 37, 115, 65, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 62, - 67, 117, 115, 116, 111, 109, 66, 117, 105, 108, 100, 60, 47, 37, 115, 65, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 62, 39, 44, 32, 114, - 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 101, -102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 37, 115, 66, 101, 102, 111, 114, 101, 84, 97, 114, -103, 101, 116, 115, 62, 77, 105, 100, 108, 60, 47, 37, 115, 66, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 62, 39, 44, 32, 114, 46, -110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, -109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 101, 110, 118, 32, 61, - 32, 112, 46, 114, 117, 108, 101, 46, 99, 114, 101, 97, 116, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 114, 44, 32, 34, 91, 37, -115, 93, 34, 41, 10, 108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, -116, 40, 114, 44, 32, 101, 110, 118, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 61, 32, - 99, 116, 120, 46, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 10, 105, 102, 32, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, -100, 115, 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, -111, 99, 97, 108, 32, 99, 109, 100, 115, 32, 61, 32, 111, 115, 46, 116, 114, 97, 110, 115, 108, 97, 116, 101, 67, 111, 109, 109, 97, 110, 100, 115, - 40, 98, 117, 105, 108, 100, 99, 111, 109, 109, 97, 110, 100, 115, 44, 32, 112, 46, 87, 73, 78, 68, 79, 87, 83, 41, 10, 99, 109, 100, 115, 32, - 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 99, 109, 100, 115, 44, 32, 112, 46, 101, 111, 108, 40, 41, 41, 10, 112, 46, -120, 40, 39, 60, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 62, 37, 115, 60, 47, 67, 111, 109, 109, - 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 62, 39, 44, 32, 99, 109, 100, 115, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 112, 101, 110, 100, 115, 79, 110, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 37, -115, 68, 101, 112, 101, 110, 100, 115, 79, 110, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 32, 32, 67, 111, 110, 100, -105, 116, 105, 111, 110, 61, 34, 92, 39, 36, 40, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 84, 121, 112, 101, 41, 92, 39, 32, - 33, 61, 32, 92, 39, 77, 97, 107, 101, 102, 105, 108, 101, 92, 39, 34, 62, 95, 83, 101, 108, 101, 99, 116, 101, 100, 70, 105, 108, 101, 115, 59, - 36, 40, 37, 115, 68, 101, 112, 101, 110, 100, 115, 79, 110, 41, 60, 47, 37, 115, 68, 101, 112, 101, 110, 100, 115, 79, 110, 62, 39, 44, 10, 114, - 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 101, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 40, 114, 41, 10, 108, 111, - 99, 97, 108, 32, 101, 110, 118, 32, 61, 32, 112, 46, 114, 117, 108, 101, 46, 99, 114, 101, 97, 116, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, -110, 116, 40, 114, 44, 32, 34, 37, 37, 40, 37, 115, 41, 34, 41, 10, 108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 112, 46, 99, 111, -110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 114, 44, 32, 101, 110, 118, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, -109, 101, 115, 115, 97, 103, 101, 32, 61, 32, 99, 116, 120, 46, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 10, 105, 102, 32, 98, 117, -105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, 100, 109, 101, 115, 115, 97, 103, 101, 32, 62, 32, 48, - 32, 116, 104, 101, 110, 10, 112, 46, 120, 40, 39, 60, 69, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, - 62, 37, 115, 60, 47, 69, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 62, 39, 44, 32, 98, 117, 105, -108, 100, 109, 101, 115, 115, 97, 103, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, }; - -// vstudio/vs2010_rules_targets.lua -static const unsigned char builtin_script_107[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, - 49, 48, 46, 114, 117, 108, 101, 115, 46, 116, 97, 114, 103, 101, 116, 115, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, -112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 114, 117, 108, 101, 115, 46, 116, 97, 114, 103, 101, 116, 115, 10, 109, - 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, -116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 112, 46, 118, 115, 116, 117, 100, -105, 111, 46, 112, 114, 111, 106, 101, 99, 116, 69, 108, 101, 109, 101, 110, 116, 44, 10, 109, 46, 97, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, -101, 109, 71, 114, 111, 117, 112, 44, 10, 109, 46, 99, 111, 109, 112, 117, 116, 101, 100, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 109, - 46, 99, 111, 109, 112, 117, 116, 101, 73, 110, 112, 117, 116, 115, 71, 114, 111, 117, 112, 44, 10, 109, 46, 117, 115, 105, 110, 103, 84, 97, 115, 107, - 44, 10, 109, 46, 114, 117, 108, 101, 84, 97, 114, 103, 101, 116, 44, 10, 109, 46, 99, 111, 109, 112, 117, 116, 101, 79, 117, 116, 112, 117, 116, 84, - 97, 114, 103, 101, 116, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, - 40, 114, 41, 10, 112, 46, 120, 109, 108, 85, 116, 102, 56, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, -101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 112, 46, 111, 117, 116, - 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 97, 118, - 97, 105, 108, 97, 98, 108, 101, 73, 116, 101, 109, 71, 114, 111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, -101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 80, 97, 103, 101, 83, 99, 104, 101, 109, 97, 44, 10, 109, 46, - 97, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, 101, 109, 78, 97, 109, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 97, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, 101, 109, 71, 114, 111, 117, 112, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, - 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, -101, 109, 101, 110, 116, 115, 46, 97, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, 101, 109, 71, 114, 111, 117, 112, 44, 32, 114, 41, 10, 112, 46, -112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 99, 111, 109, 112, 117, 116, 101, 100, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 112, - 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 112, 46, 114, 117, 108, 101, 46, 99, 114, 101, 97, 116, 101, 80, 97, 116, 104, 86, 97, 114, 115, 40, -114, 44, 32, 34, 37, 37, 40, 37, 115, 41, 34, 41, 10, 108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, -120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 114, 44, 32, 123, 32, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 112, 97, 116, 104, 86, 97, -114, 115, 44, 32, 111, 118, 101, 114, 114, 105, 100, 101, 80, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 116, 114, 117, 101, 32, 125, 41, 10, 108, -111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, 99, 116, 120, 46, 98, 117, 105, 108, 100, 111, 117, 116, -112, 117, 116, 115, 10, 105, 102, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 97, 110, 100, 32, 35, 98, 117, 105, 108, 100, 111, -117, 116, 112, 117, 116, 115, 32, 62, 32, 48, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 111, 117, 116, 112, 117, 116, 115, 32, 61, 32, -116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 44, 32, 34, 59, 34, 41, 10, -112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, 39, 41, 10, -112, 46, 112, 117, 115, 104, 40, 39, 60, 37, 115, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 120, 40, 39, 60, 79, 117, 116, -112, 117, 116, 115, 62, 37, 115, 60, 47, 79, 117, 116, 112, 117, 116, 115, 62, 39, 44, 32, 112, 97, 116, 104, 46, 116, 114, 97, 110, 115, 108, 97, -116, 101, 40, 111, 117, 116, 112, 117, 116, 115, 41, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 62, 39, 44, 32, 114, 46, 110, 97, -109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, - 62, 39, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 109, 112, 117, 116, 101, 73, 110, -112, 117, 116, 115, 71, 114, 111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, - 10, 109, 46, 99, 111, 109, 112, 117, 116, 101, 67, 111, 109, 112, 105, 108, 101, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 44, 10, -109, 46, 99, 111, 109, 112, 117, 116, 101, 76, 105, 110, 107, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 99, 111, -109, 112, 117, 116, 101, 76, 105, 98, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, - 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 117, 116, 101, 73, 110, 112, 117, 116, 115, 71, 114, 111, 117, 112, 40, 114, 41, 10, 112, 46, -112, 117, 115, 104, 40, 39, 60, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, -114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 109, 112, 117, 116, 101, 73, 110, 112, 117, 116, 115, 71, 114, 111, 117, -112, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 62, 39, 41, 10, -101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 84, 97, 114, 103, 101, 116, 65, 116, 116, 114, 105, 98, 117, -116, 101, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 116, 97, 114, -103, 101, 116, 78, 97, 109, 101, 44, 10, 109, 46, 98, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 97, 102, 116, 101, -114, 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 116, 97, 114, 103, 101, 116, 67, 111, 110, 100, 105, 116, 105, 111, 110, 44, 10, 109, 46, 116, - 97, 114, 103, 101, 116, 79, 117, 116, 112, 117, 116, 115, 44, 10, 109, 46, 116, 97, 114, 103, 101, 116, 73, 110, 112, 117, 116, 115, 44, 10, 109, 46, -100, 101, 112, 101, 110, 100, 115, 79, 110, 84, 97, 114, 103, 101, 116, 115, 44, 10, 125, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, -116, 115, 46, 114, 117, 108, 101, 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, -114, 110, 32, 123, 10, 109, 46, 115, 101, 108, 101, 99, 116, 101, 100, 70, 105, 108, 101, 115, 44, 10, 109, 46, 116, 108, 111, 103, 44, 10, 109, 46, -109, 101, 115, 115, 97, 103, 101, 44, 10, 109, 46, 116, 108, 111, 103, 87, 114, 105, 116, 101, 44, 10, 109, 46, 116, 108, 111, 103, 82, 101, 97, 100, - 44, 10, 109, 46, 114, 117, 108, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 84, - 97, 114, 103, 101, 116, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 97, 116, 116, 114, 105, 98, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, -114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, - 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 84, 97, 114, 103, 101, 116, 65, 116, 116, 114, 105, 98, 117, 116, -101, 115, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 84, 97, 114, -103, 101, 116, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 97, 116, 116, 114, 105, 98, 115, 32, 46, 46, 32, 39, 62, 39, 41, 10, 112, 46, - 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 84, 97, 114, 103, 101, 116, 44, - 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 84, 97, 114, 103, 101, 116, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 116, 108, 111, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, -123, 10, 109, 46, 116, 108, 111, 103, 83, 111, 117, 114, 99, 101, 44, 10, 109, 46, 116, 108, 111, 103, 73, 110, 112, 117, 116, 115, 44, 10, 109, 46, -116, 108, 111, 103, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 116, 108, 111, 103, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 39, 60, 37, 115, 95, 116, 108, 111, 103, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 73, -110, 99, 108, 117, 100, 101, 61, 34, 37, 37, 40, 37, 115, 46, 79, 117, 116, 112, 117, 116, 115, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, - 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 37, 37, 40, 37, 115, 46, 79, 117, 116, 112, 117, 116, -115, 41, 92, 39, 32, 33, 61, 32, 92, 39, 92, 39, 32, 97, 110, 100, 32, 92, 39, 37, 37, 40, 37, 115, 46, 69, 120, 99, 108, 117, 100, 101, -100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 41, 92, 39, 32, 33, 61, 32, 92, 39, 116, 114, 117, 101, 92, 39, 34, 62, 39, 44, 32, 114, 46, -110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, -101, 110, 116, 115, 46, 116, 108, 111, 103, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 37, 115, 95, 116, 108, 111, 103, 62, 39, - 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, -101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 32, 61, 32, -102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 114, 117, 108, 101, 67, 111, 110, 100, 105, -116, 105, 111, 110, 44, 10, 109, 46, 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 44, 10, 109, 46, 112, -114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 44, 10, -109, 46, 105, 110, 112, 117, 116, 115, 44, 10, 109, 46, 115, 116, 97, 110, 100, 97, 114, 100, 79, 117, 116, 112, 117, 116, 73, 109, 112, 111, 114, 116, - 97, 110, 99, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 40, 114, 41, 10, 108, -111, 99, 97, 108, 32, 97, 116, 116, 114, 105, 98, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, -110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, -110, 116, 115, 46, 114, 117, 108, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, -110, 100, 41, 10, 112, 46, 119, 40, 39, 60, 37, 115, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 97, -116, 116, 114, 105, 98, 115, 32, 46, 46, 32, 39, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, - 99, 111, 109, 112, 117, 116, 101, 79, 117, 116, 112, 117, 116, 73, 116, 101, 109, 115, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, - 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 111, 117, 116, 112, 117, 116, 115, 44, 10, 109, 46, 108, 105, 110, 107, 76, 105, 98, 44, 10, -125, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 111, 109, 112, 117, 116, 101, 79, 117, 116, 112, 117, 116, 84, 97, -114, 103, 101, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 109, 97, -107, 101, 68, 105, 114, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 117, 116, 101, 79, -117, 116, 112, 117, 116, 84, 97, 114, 103, 101, 116, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 84, 97, 114, 103, 101, 116, 39, 41, - 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 67, 111, 109, 112, 117, 116, 101, 37, 115, 79, 117, 116, 112, 117, 116, 34, 39, 44, 32, 114, - 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 64, 40, 37, 115, 41, 92, 39, - 32, 33, 61, 32, 92, 39, 92, 39, 34, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, -101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, -115, 46, 99, 111, 109, 112, 117, 116, 101, 79, 117, 116, 112, 117, 116, 73, 116, 101, 109, 115, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, - 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 99, 111, 109, 112, 117, 116, 101, 79, 117, 116, 112, 117, 116, 84, 97, 114, 103, 101, 116, 44, 32, 114, 41, 10, 112, 46, -112, 111, 112, 40, 39, 60, 47, 84, 97, 114, 103, 101, 116, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, - 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 65, 100, 100, 105, 116, 105, -111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 61, 34, 37, 37, 40, 37, 115, 46, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, -105, 111, 110, 115, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, - 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 40, 114, 41, 10, 112, 46, 119, 40, 39, 67, 111, 109, 109, - 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 61, 34, 37, 37, 40, 37, 115, 46, 67, 111, 109, 109, 97, 110, 100, 76, 105, -110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 97, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 65, 102, 116, 101, 114, - 84, 97, 114, 103, 101, 116, 115, 61, 34, 36, 40, 37, 115, 65, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 41, 34, 39, 44, 32, 114, 46, -110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, -101, 109, 78, 97, 109, 101, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 65, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, 101, 109, - 78, 97, 109, 101, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 115, 34, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, - 40, 39, 60, 84, 97, 114, 103, 101, 116, 115, 62, 95, 37, 115, 60, 47, 84, 97, 114, 103, 101, 116, 115, 62, 39, 44, 32, 114, 46, 110, 97, 109, -101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 65, 118, 97, 105, 108, 97, 98, 108, 101, 73, 116, 101, 109, 78, 97, 109, 101, 62, 39, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, - 10, 112, 46, 119, 40, 39, 66, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 61, 34, 36, 40, 37, 115, 66, 101, 102, 111, 114, 101, 84, - 97, 114, 103, 101, 116, 115, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 99, 111, 109, 112, 117, 116, 101, 76, 105, 98, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 112, -117, 115, 104, 40, 39, 60, 67, 111, 109, 112, 117, 116, 101, 76, 105, 98, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 62, 39, 41, - 10, 112, 46, 119, 40, 39, 36, 40, 67, 111, 109, 112, 117, 116, 101, 76, 105, 98, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 41, - 59, 39, 41, 10, 112, 46, 119, 40, 39, 67, 111, 109, 112, 117, 116, 101, 37, 115, 79, 117, 116, 112, 117, 116, 59, 39, 44, 32, 114, 46, 110, 97, -109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 111, 109, 112, 117, 116, 101, 76, 105, 98, 73, 110, 112, 117, 116, 115, 84, 97, 114, -103, 101, 116, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 117, 116, 101, 76, 105, -110, 107, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 111, 109, 112, -117, 116, 101, 76, 105, 110, 107, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 62, 39, 41, 10, 112, 46, 119, 40, 39, 36, 40, 67, -111, 109, 112, 117, 116, 101, 76, 105, 110, 107, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 41, 59, 39, 41, 10, 112, 46, 119, 40, - 39, 67, 111, 109, 112, 117, 116, 101, 37, 115, 79, 117, 116, 112, 117, 116, 59, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 111, -112, 40, 39, 60, 47, 67, 111, 109, 112, 117, 116, 101, 76, 105, 110, 107, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 62, 39, 41, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 112, 117, 116, 101, 67, 111, 109, 112, 105, 108, 101, 73, 110, -112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 111, 109, 112, 117, 116, 101, 67, -111, 109, 112, 105, 108, 101, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 62, 39, 41, 10, 112, 46, 119, 40, 39, 36, 40, 67, 111, -109, 112, 117, 116, 101, 67, 111, 109, 112, 105, 108, 101, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, 116, 115, 41, 59, 39, 41, 10, 112, 46, -119, 40, 39, 67, 111, 109, 112, 117, 116, 101, 37, 115, 79, 117, 116, 112, 117, 116, 59, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, -112, 111, 112, 40, 39, 60, 47, 67, 111, 109, 112, 117, 116, 101, 67, 111, 109, 112, 105, 108, 101, 73, 110, 112, 117, 116, 115, 84, 97, 114, 103, 101, -116, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 101, 112, 101, 110, 100, 115, 79, 110, 84, 97, -114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 68, 101, 112, 101, 110, 100, 115, 79, 110, 84, 97, 114, 103, 101, 116, 115, 61, 34, - 36, 40, 37, 115, 68, 101, 112, 101, 110, 100, 115, 79, 110, 41, 59, 67, 111, 109, 112, 117, 116, 101, 37, 115, 79, 117, 116, 112, 117, 116, 34, 39, - 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 105, 110, 112, 117, 116, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 73, 110, 112, 117, 116, 115, 61, 34, 37, 37, 40, 37, 115, 46, 73, 100, -101, 110, 116, 105, 116, 121, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 108, 105, 110, 107, 76, 105, 98, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 112, 46, -114, 117, 108, 101, 46, 99, 114, 101, 97, 116, 101, 80, 97, 116, 104, 86, 97, 114, 115, 40, 114, 44, 32, 34, 37, 37, 40, 37, 115, 41, 34, 41, - 10, 108, 111, 99, 97, 108, 32, 99, 116, 120, 32, 61, 32, 112, 46, 99, 111, 110, 116, 101, 120, 116, 46, 101, 120, 116, 101, 110, 116, 40, 114, 44, - 32, 123, 32, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 112, 97, 116, 104, 86, 97, 114, 115, 44, 32, 111, 118, 101, 114, 114, 105, 100, 101, - 80, 97, 116, 104, 86, 97, 114, 115, 61, 116, 114, 117, 101, 32, 125, 41, 10, 108, 111, 99, 97, 108, 32, 98, 117, 105, 108, 100, 111, 117, 116, 112, -117, 116, 115, 32, 61, 32, 99, 116, 120, 46, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 10, 108, 111, 99, 97, 108, 32, 108, 105, 110, -107, 97, 98, 108, 101, 44, 32, 99, 111, 109, 112, 105, 108, 101, 97, 98, 108, 101, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 98, -117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 32, 100, 111, 10, 105, 102, 32, 40, 112, 97, 116, 104, 46, 105, 115, 108, 105, 110, 107, 97, 98, -108, 101, 40, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 91, 105, 93, 41, 41, 32, 116, 104, 101, 110, 10, 108, 105, 110, 107, 97, 98, -108, 101, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 105, 102, 32, 40, 112, 97, 116, 104, 46, 105, 115, 99, 112, 112, 102, 105, 108, 101, - 40, 98, 117, 105, 108, 100, 111, 117, 116, 112, 117, 116, 115, 91, 105, 93, 41, 41, 32, 116, 104, 101, 110, 10, 99, 111, 109, 112, 105, 108, 101, 97, - 98, 108, 101, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 108, 105, 110, 107, 97, 98, 108, 101, 32, 116, -104, 101, 110, 10, 102, 111, 114, 32, 105, 44, 32, 101, 108, 32, 105, 110, 32, 112, 97, 105, 114, 115, 32, 123, 32, 39, 76, 105, 110, 107, 39, 44, - 32, 39, 76, 105, 98, 39, 44, 32, 39, 73, 109, 112, 76, 105, 98, 39, 32, 125, 32, 100, 111, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 37, -115, 39, 44, 32, 101, 108, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 37, 40, 37, 115, 79, 117, 116, 112, 117, -116, 115, 46, 73, 100, 101, 110, 116, 105, 116, 121, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, -100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 111, 98, -106, 92, 39, 32, 111, 114, 32, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 114, 101, 115, - 92, 39, 32, 111, 114, 32, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 114, 115, 99, 92, - 39, 32, 111, 114, 32, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 108, 105, 98, 92, 39, - 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 99, 111, 109, 112, 105, 108, -101, 97, 98, 108, 101, 32, 116, 104, 101, 110, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 108, 67, 111, 109, 112, 105, 108, 101, 39, 44, 32, -101, 108, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 37, 40, 37, 115, 79, 117, 116, 112, 117, 116, 115, 46, 73, -100, 101, 110, 116, 105, 116, 121, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, 100, 105, 116, 105, -111, 110, 61, 34, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 99, 99, 92, 39, 32, 111, -114, 32, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 99, 112, 112, 92, 39, 32, 111, 114, - 32, 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 99, 120, 120, 92, 39, 32, 111, 114, 32, - 92, 39, 37, 37, 40, 69, 120, 116, 101, 110, 115, 105, 111, 110, 41, 92, 39, 61, 61, 92, 39, 46, 99, 92, 39, 34, 32, 47, 62, 39, 41, 10, -112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 97, 107, 101, 68, -105, 114, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 77, 97, 107, 101, 68, 105, 114, 32, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 61, - 34, 64, 40, 37, 115, 79, 117, 116, 112, 117, 116, 115, 45, 62, 92, 39, 37, 37, 40, 82, 111, 111, 116, 68, 105, 114, 41, 37, 37, 40, 68, 105, -114, 101, 99, 116, 111, 114, 121, 41, 92, 39, 41, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 101, 115, 115, 97, 103, 101, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 77, 101, 115, 115, 97, 103, -101, 39, 41, 10, 112, 46, 119, 40, 39, 32, 32, 73, 109, 112, 111, 114, 116, 97, 110, 99, 101, 61, 34, 72, 105, 103, 104, 34, 39, 41, 10, 112, - 46, 119, 40, 39, 32, 32, 84, 101, 120, 116, 61, 34, 37, 37, 40, 37, 115, 46, 69, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, -105, 112, 116, 105, 111, 110, 41, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 115, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, 37, 115, 79, 117, 116, 112, 117, 116, 115, 39, - 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 32, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 64, 40, - 37, 115, 41, 92, 39, 32, 33, 61, 32, 92, 39, 92, 39, 32, 97, 110, 100, 32, 92, 39, 37, 37, 40, 37, 115, 46, 69, 120, 99, 108, 117, 100, -101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 41, 92, 39, 32, 33, 61, 32, 92, 39, 116, 114, 117, 101, 92, 39, 34, 39, 44, 32, 114, 46, -110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 32, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 37, 37, - 40, 37, 115, 46, 79, 117, 116, 112, 117, 116, 115, 41, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, -102, 115, 32, 61, 32, 114, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, - 61, 32, 49, 44, 32, 35, 100, 101, 102, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 110, 97, 109, 101, 32, 61, 32, 100, 101, 102, 115, 91, -105, 93, 46, 110, 97, 109, 101, 10, 112, 46, 119, 40, 39, 37, 115, 61, 34, 37, 37, 40, 37, 115, 46, 37, 115, 41, 34, 39, 44, 32, 110, 97, -109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, -111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 121, 80, 97, 103, 101, 83, 99, 104, 101, 109, 97, 40, 114, 41, 10, 112, 46, 119, 40, 39, - 60, 80, 114, 111, 112, 101, 114, 116, 121, 80, 97, 103, 101, 83, 99, 104, 101, 109, 97, 39, 41, 10, 112, 46, 119, 40, 39, 32, 32, 73, 110, 99, -108, 117, 100, 101, 61, 34, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 104, 105, 115, 70, 105, 108, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, - 41, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 104, 105, 115, 70, 105, 108, 101, 78, 97, 109, 101, 41, 46, 120, 109, 108, 34, 32, 47, 62, 39, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 67, 111, 110, 100, 105, 116, 105, 111, 110, 40, 114, - 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 64, 40, 37, 115, 41, 92, 39, 32, 33, 61, 32, 92, - 39, 92, 39, 32, 97, 110, 100, 32, 92, 39, 37, 37, 40, 37, 115, 46, 69, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, -100, 41, 92, 39, 32, 33, 61, 32, 92, 39, 116, 114, 117, 101, 92, 39, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, -109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 101, 108, 101, 99, 116, 101, 100, 70, 105, 108, 101, 115, - 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, - 61, 34, 92, 39, 64, 40, 83, 101, 108, 101, 99, 116, 101, 100, 70, 105, 108, 101, 115, 41, 92, 39, 32, 33, 61, 32, 92, 39, 92, 39, 34, 62, - 39, 41, 10, 112, 46, 119, 40, 39, 60, 37, 115, 32, 82, 101, 109, 111, 118, 101, 61, 34, 64, 40, 37, 115, 41, 34, 32, 67, 111, 110, 100, 105, -116, 105, 111, 110, 61, 34, 92, 39, 37, 37, 40, 73, 100, 101, 110, 116, 105, 116, 121, 41, 92, 39, 32, 33, 61, 32, 92, 39, 64, 40, 83, 101, -108, 101, 99, 116, 101, 100, 70, 105, 108, 101, 115, 41, 92, 39, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, - 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 116, 97, 110, 100, 97, 114, 100, 79, 117, 116, 112, 117, 116, 73, 109, 112, 111, 114, 116, 97, 110, - 99, 101, 40, 114, 41, 10, 112, 46, 119, 40, 39, 83, 116, 97, 110, 100, 97, 114, 100, 79, 117, 116, 112, 117, 116, 73, 109, 112, 111, 114, 116, 97, -110, 99, 101, 61, 34, 72, 105, 103, 104, 34, 39, 41, 10, 112, 46, 119, 40, 39, 83, 116, 97, 110, 100, 97, 114, 100, 69, 114, 114, 111, 114, 73, -109, 112, 111, 114, 116, 97, 110, 99, 101, 61, 34, 72, 105, 103, 104, 34, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, -109, 46, 116, 97, 114, 103, 101, 116, 67, 111, 110, 100, 105, 116, 105, 111, 110, 40, 114, 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, 100, 105, 116, -105, 111, 110, 61, 34, 92, 39, 64, 40, 37, 115, 41, 92, 39, 32, 33, 61, 32, 92, 39, 92, 39, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, - 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 73, 110, 112, 117, 116, 115, 40, 114, 41, - 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 114, 97, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 114, - 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, -100, 101, 102, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 32, 61, 32, 100, 101, 102, 115, 91, 105, 93, 10, 105, 102, 32, 100, -101, 102, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, -101, 120, 116, 114, 97, 44, 32, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 37, 37, 40, 37, 115, 46, 37, 115, 41, 59, - 34, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 120, -116, 114, 97, 32, 61, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 101, 120, 116, 114, 97, 41, 10, 112, 46, 119, 40, 39, 73, -110, 112, 117, 116, 115, 61, 34, 37, 37, 40, 37, 115, 46, 73, 100, 101, 110, 116, 105, 116, 121, 41, 59, 37, 37, 40, 37, 115, 46, 65, 100, 100, -105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 41, 59, 37, 115, 36, 40, 77, 83, 66, 117, 105, 108, 100, - 80, 114, 111, 106, 101, 99, 116, 70, 105, 108, 101, 41, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, -101, 120, 116, 114, 97, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 78, 97, 109, 101, - 40, 114, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 95, 37, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 97, 114, 103, 101, 116, 79, 117, 116, 112, 117, 116, 115, 40, 114, 41, 10, 112, 46, -119, 40, 39, 79, 117, 116, 112, 117, 116, 115, 61, 34, 37, 37, 40, 37, 115, 46, 79, 117, 116, 112, 117, 116, 115, 41, 34, 39, 44, 32, 114, 46, -110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 108, 111, 103, 73, 110, 112, 117, 116, 115, 40, -114, 41, 10, 112, 46, 119, 40, 34, 60, 73, 110, 112, 117, 116, 115, 62, 64, 40, 37, 115, 44, 32, 39, 59, 39, 41, 60, 47, 73, 110, 112, 117, -116, 115, 62, 34, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 108, 111, -103, 80, 114, 111, 112, 101, 114, 116, 105, 101, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 114, 46, 112, 114, -111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 100, 101, 102, -115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 32, 61, 32, 100, 101, 102, 115, 91, 105, 93, 10, 105, 102, 32, 100, 101, 102, 46, -100, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 60, 37, 115, 62, 37, 37, 40, 37, 115, 46, 37, -115, 41, 60, 47, 37, 115, 62, 39, 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 100, 101, 102, 46, -110, 97, 109, 101, 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 116, 108, 111, 103, 82, 101, 97, 100, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 101, 120, 116, 114, 97, 32, 61, - 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 114, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, -105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 100, 101, 102, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, -100, 101, 102, 32, 61, 32, 100, 101, 102, 115, 91, 105, 93, 10, 105, 102, 32, 100, 101, 102, 46, 100, 101, 112, 101, 110, 100, 101, 110, 99, 121, 32, -116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 101, 120, 116, 114, 97, 44, 32, 115, 116, 114, 105, 110, 103, 46, -102, 111, 114, 109, 97, 116, 40, 34, 37, 37, 40, 37, 115, 95, 116, 108, 111, 103, 46, 37, 115, 41, 59, 34, 44, 32, 114, 46, 110, 97, 109, 101, - 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 120, 116, 114, 97, 32, 61, 32, 116, 97, 98, -108, 101, 46, 99, 111, 110, 99, 97, 116, 40, 101, 120, 116, 114, 97, 41, 10, 112, 46, 119, 40, 39, 60, 87, 114, 105, 116, 101, 76, 105, 110, 101, -115, 84, 111, 70, 105, 108, 101, 39, 41, 10, 112, 46, 119, 40, 39, 32, 32, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 92, 39, 64, 40, - 37, 115, 95, 116, 108, 111, 103, 41, 92, 39, 32, 33, 61, 32, 92, 39, 92, 39, 32, 97, 110, 100, 32, 92, 39, 37, 37, 40, 37, 115, 95, 116, -108, 111, 103, 46, 69, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 41, 92, 39, 32, 33, 61, 32, 92, 39, 116, 114, -117, 101, 92, 39, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 32, 32, 70, -105, 108, 101, 61, 34, 36, 40, 84, 76, 111, 103, 76, 111, 99, 97, 116, 105, 111, 110, 41, 37, 115, 46, 114, 101, 97, 100, 46, 49, 46, 116, 108, -111, 103, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 32, 32, 76, 105, 110, 101, 115, 61, 34, 94, 37, 37, 40, - 37, 115, 95, 116, 108, 111, 103, 46, 73, 110, 112, 117, 116, 115, 41, 59, 37, 115, 36, 40, 77, 83, 66, 117, 105, 108, 100, 80, 114, 111, 106, 101, - 99, 116, 70, 117, 108, 108, 80, 97, 116, 104, 41, 59, 37, 37, 40, 37, 115, 95, 116, 108, 111, 103, 46, 70, 117, 108, 108, 112, 97, 116, 104, 41, - 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 101, 120, 116, 114, 97, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 108, 111, 103, 87, 114, 105, 116, 101, 40, 114, 41, 10, 112, 46, 119, 40, 39, 60, - 87, 114, 105, 116, 101, 76, 105, 110, 101, 115, 84, 111, 70, 105, 108, 101, 39, 41, 10, 112, 46, 119, 40, 39, 32, 32, 67, 111, 110, 100, 105, 116, -105, 111, 110, 61, 34, 92, 39, 64, 40, 37, 115, 95, 116, 108, 111, 103, 41, 92, 39, 32, 33, 61, 32, 92, 39, 92, 39, 32, 97, 110, 100, 32, - 92, 39, 37, 37, 40, 37, 115, 95, 116, 108, 111, 103, 46, 69, 120, 99, 108, 117, 100, 101, 100, 70, 114, 111, 109, 66, 117, 105, 108, 100, 41, 92, - 39, 32, 33, 61, 32, 92, 39, 116, 114, 117, 101, 92, 39, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, 97, 109, 101, 41, - 10, 112, 46, 119, 40, 39, 32, 32, 70, 105, 108, 101, 61, 34, 36, 40, 84, 76, 111, 103, 76, 111, 99, 97, 116, 105, 111, 110, 41, 37, 115, 46, -119, 114, 105, 116, 101, 46, 49, 46, 116, 108, 111, 103, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 32, 32, 76, -105, 110, 101, 115, 61, 34, 94, 37, 37, 40, 37, 115, 95, 116, 108, 111, 103, 46, 83, 111, 117, 114, 99, 101, 41, 59, 37, 37, 40, 37, 115, 95, -116, 108, 111, 103, 46, 70, 117, 108, 108, 112, 97, 116, 104, 41, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 44, 32, 114, 46, 110, - 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 108, 111, 103, 83, 111, 117, 114, 99, 101, 40, 114, - 41, 10, 112, 46, 119, 40, 34, 60, 83, 111, 117, 114, 99, 101, 62, 64, 40, 37, 115, 44, 32, 39, 124, 39, 41, 60, 47, 83, 111, 117, 114, 99, -101, 62, 34, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 117, 115, 105, 110, -103, 84, 97, 115, 107, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 85, 115, 105, 110, 103, 84, 97, 115, 107, 39, 41, 10, 112, 46, -119, 40, 39, 84, 97, 115, 107, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, - 84, 97, 115, 107, 70, 97, 99, 116, 111, 114, 121, 61, 34, 88, 97, 109, 108, 84, 97, 115, 107, 70, 97, 99, 116, 111, 114, 121, 34, 39, 41, 10, -112, 46, 119, 40, 39, 65, 115, 115, 101, 109, 98, 108, 121, 78, 97, 109, 101, 61, 34, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 66, 117, 105, -108, 100, 46, 84, 97, 115, 107, 115, 46, 118, 52, 46, 48, 34, 62, 39, 41, 10, 112, 46, 119, 40, 39, 60, 84, 97, 115, 107, 62, 36, 40, 77, - 83, 66, 117, 105, 108, 100, 84, 104, 105, 115, 70, 105, 108, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 41, 36, 40, 77, 83, 66, 117, 105, 108, -100, 84, 104, 105, 115, 70, 105, 108, 101, 78, 97, 109, 101, 41, 46, 120, 109, 108, 60, 47, 84, 97, 115, 107, 62, 39, 41, 10, 112, 46, 112, 111, -112, 40, 39, 60, 47, 85, 115, 105, 110, 103, 84, 97, 115, 107, 62, 39, 41, 10, 101, 110, 100, 10, }; - -// vstudio/vs2010_rules_xml.lua -static const unsigned char builtin_script_108[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, - 49, 48, 46, 114, 117, 108, 101, 115, 46, 120, 109, 108, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, -116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 114, 117, 108, 101, 115, 46, 120, 109, 108, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, -115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 83, 99, 104, 101, 109, 97, - 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 44, 10, 109, 46, 114, 117, 108, 101, 44, 10, 109, 46, 114, 117, 108, 101, 73, 116, 101, 109, 44, - 10, 109, 46, 102, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 44, 10, 109, 46, 99, 111, 110, 116, 101, 110, 116, 84, 121, 112, 101, 44, - 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 114, 41, 10, 112, 46, -120, 109, 108, 85, 116, 102, 56, 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 112, 114, 111, 106, 101, 99, 116, 44, 32, 114, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 83, 99, 104, -101, 109, 97, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 114, 117, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 100, - 97, 116, 97, 83, 111, 117, 114, 99, 101, 44, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 44, 10, 109, 46, 105, 110, 112, 117, 116, -115, 44, 10, 109, 46, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 44, 10, 109, 46, 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, -109, 112, 108, 97, 116, 101, 44, 10, 109, 46, 98, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 97, 102, 116, 101, 114, - 84, 97, 114, 103, 101, 116, 115, 44, 10, 109, 46, 111, 117, 116, 112, 117, 116, 115, 44, 10, 109, 46, 101, 120, 101, 99, 117, 116, 105, 111, 110, 68, -101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, - 99, 105, 101, 115, 44, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 44, 10, 125, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 82, 117, 108, -101, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, - 40, 39, 80, 97, 103, 101, 84, 101, 109, 112, 108, 97, 116, 101, 61, 34, 116, 111, 111, 108, 34, 39, 41, 10, 112, 46, 119, 40, 39, 68, 105, 115, -112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 114, 46, 100, 105, 115, 112, 108, 97, 121, 32, 111, 114, 32, 114, 46, 110, - 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 79, 114, 100, 101, 114, 61, 34, 50, 48, 48, 34, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, -114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 114, 117, 108, 101, 44, 32, 114, 41, 10, 112, 46, 112, 111, 112, 40, 39, - 60, 47, 82, 117, 108, 101, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 97, 116, 101, 103, 111, 114, -105, 101, 115, 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 32, 61, 32, 123, 10, 91, 49, 93, 32, - 61, 32, 123, 32, 110, 97, 109, 101, 61, 34, 71, 101, 110, 101, 114, 97, 108, 34, 32, 125, 44, 10, 125, 10, 108, 111, 99, 97, 108, 32, 112, 114, -111, 112, 67, 97, 116, 101, 103, 111, 114, 121, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 114, 46, 112, -114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 100, 101, -102, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 32, 61, 32, 100, 101, 102, 115, 91, 105, 93, 10, 108, 111, 99, 97, 108, 32, - 99, 97, 116, 32, 61, 32, 100, 101, 102, 46, 99, 97, 116, 101, 103, 111, 114, 121, 10, 105, 102, 32, 99, 97, 116, 32, 116, 104, 101, 110, 10, 105, -102, 32, 116, 121, 112, 101, 40, 99, 97, 116, 41, 32, 61, 61, 32, 34, 115, 116, 114, 105, 110, 103, 34, 32, 97, 110, 100, 32, 99, 97, 116, 32, -126, 61, 32, 34, 67, 111, 109, 109, 97, 110, 100, 32, 76, 105, 110, 101, 34, 32, 97, 110, 100, 32, 99, 97, 116, 32, 126, 61, 32, 34, 71, 101, -110, 101, 114, 97, 108, 34, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, 32, 112, 114, 111, 112, 67, 97, 116, 101, 103, 111, 114, 121, 91, - 99, 97, 116, 93, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, 97, 116, 101, 103, 111, 114, 105, 101, -115, 44, 32, 123, 32, 110, 97, 109, 101, 61, 99, 97, 116, 32, 125, 41, 10, 112, 114, 111, 112, 67, 97, 116, 101, 103, 111, 114, 121, 91, 99, 97, -116, 93, 32, 61, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 100, 101, 102, 46, 99, 97, 116, 101, 103, 111, 114, 121, 32, - 61, 32, 110, 105, 108, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 99, - 97, 116, 101, 103, 111, 114, 105, 101, 115, 44, 32, 123, 32, 110, 97, 109, 101, 61, 34, 67, 111, 109, 109, 97, 110, 100, 32, 76, 105, 110, 101, 34, - 44, 32, 115, 117, 98, 116, 121, 112, 101, 61, 34, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 34, 32, 125, 41, 10, 112, 46, 112, 117, 115, -104, 40, 39, 60, 82, 117, 108, 101, 46, 67, 97, 116, 101, 103, 111, 114, 105, 101, 115, 62, 39, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, - 44, 32, 35, 99, 97, 116, 101, 103, 111, 114, 105, 101, 115, 32, 100, 111, 10, 109, 46, 99, 97, 116, 101, 103, 111, 114, 121, 40, 99, 97, 116, 101, -103, 111, 114, 105, 101, 115, 91, 105, 93, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 82, 117, 108, 101, 46, 67, 97, 116, -101, 103, 111, 114, 105, 101, 115, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 97, 116, 101, 103, 111, -114, 121, 40, 99, 97, 116, 41, 10, 108, 111, 99, 97, 108, 32, 97, 116, 116, 114, 105, 98, 115, 32, 61, 32, 112, 46, 99, 97, 112, 116, 117, 114, -101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 10, 112, 46, 112, 117, 115, 104, 40, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, - 34, 37, 115, 34, 39, 44, 32, 99, 97, 116, 46, 110, 97, 109, 101, 41, 10, 105, 102, 32, 99, 97, 116, 46, 115, 117, 98, 116, 121, 112, 101, 32, -116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 83, 117, 98, 116, 121, 112, 101, 61, 34, 37, 115, 34, 39, 44, 32, 99, 97, 116, 46, 115, 117, 98, -116, 121, 112, 101, 41, 10, 101, 110, 100, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, - 67, 97, 116, 101, 103, 111, 114, 121, 39, 41, 10, 112, 46, 111, 117, 116, 108, 110, 40, 97, 116, 116, 114, 105, 98, 115, 32, 46, 46, 32, 39, 62, - 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 97, 116, 101, 103, 111, 114, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, - 62, 39, 41, 10, 112, 46, 119, 40, 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 37, 115, 60, 47, 115, 121, 115, 58, 83, 116, 114, -105, 110, 103, 62, 39, 44, 32, 99, 97, 116, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 97, 116, 101, 103, 111, -114, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 97, 116, 101, 103, -111, 114, 121, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, - 40, 114, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 115, 32, 61, 32, 114, 46, 112, 114, 111, 112, 101, 114, 116, 121, 100, 101, 102, 105, 110, -105, 116, 105, 111, 110, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 100, 101, 102, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, -100, 101, 102, 32, 61, 32, 100, 101, 102, 115, 91, 105, 93, 10, 105, 102, 32, 100, 101, 102, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 98, 111, -111, 108, 101, 97, 110, 34, 32, 116, 104, 101, 110, 10, 109, 46, 98, 111, 111, 108, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, -101, 108, 115, 101, 105, 102, 32, 100, 101, 102, 46, 107, 105, 110, 100, 32, 61, 61, 32, 34, 108, 105, 115, 116, 34, 32, 116, 104, 101, 110, 10, 109, - 46, 115, 116, 114, 105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 101, 108, 115, 101, 105, 102, 32, -116, 121, 112, 101, 40, 100, 101, 102, 46, 118, 97, 108, 117, 101, 115, 41, 32, 61, 61, 32, 34, 116, 97, 98, 108, 101, 34, 32, 116, 104, 101, 110, - 10, 109, 46, 101, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 101, 108, 115, 101, 105, 102, 32, 100, 101, 102, 46, -107, 105, 110, 100, 32, 97, 110, 100, 32, 100, 101, 102, 46, 107, 105, 110, 100, 58, 115, 116, 97, 114, 116, 115, 119, 105, 116, 104, 40, 34, 108, 105, -115, 116, 58, 34, 41, 32, 116, 104, 101, 110, 10, 109, 46, 115, 116, 114, 105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 40, -100, 101, 102, 41, 10, 101, 108, 115, 101, 10, 109, 46, 115, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 97, 115, 101, 80, 114, 111, 112, 101, -114, 116, 121, 40, 100, 101, 102, 44, 32, 115, 117, 102, 102, 105, 120, 41, 10, 108, 111, 99, 97, 108, 32, 99, 32, 61, 32, 112, 46, 99, 97, 112, -116, 117, 114, 101, 40, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, - 44, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 72, 101, 108, 112, 67, 111, 110, 116, 101, 120, 116, 61, 34, 48, 34, - 39, 41, 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 100, 101, 102, 46, 100, -105, 115, 112, 108, 97, 121, 32, 111, 114, 32, 100, 101, 102, 46, 110, 97, 109, 101, 41, 10, 105, 102, 32, 100, 101, 102, 46, 100, 101, 115, 99, 114, -105, 112, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 61, 34, 37, 115, - 34, 39, 44, 32, 100, 101, 102, 46, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 105, 102, 32, 100, 101, 102, 46, - 99, 97, 116, 101, 103, 111, 114, 121, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 67, 97, 116, 101, 103, 111, 114, 121, 61, 34, 37, 115, 34, - 39, 44, 32, 100, 101, 102, 46, 99, 97, 116, 101, 103, 111, 114, 121, 41, 10, 101, 110, 100, 10, 101, 110, 100, 41, 10, 105, 102, 32, 115, 117, 102, -102, 105, 120, 32, 116, 104, 101, 110, 10, 99, 32, 61, 32, 99, 32, 46, 46, 32, 115, 117, 102, 102, 105, 120, 10, 101, 110, 100, 10, 112, 46, 111, -117, 116, 108, 110, 40, 99, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 111, 111, 108, 80, 114, 111, 112, 101, -114, 116, 121, 40, 100, 101, 102, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 66, 111, 111, 108, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, - 10, 109, 46, 98, 97, 115, 101, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 105, 102, 32, 100, 101, 102, 46, 115, 119, 105, 116, - 99, 104, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 83, 119, 105, 116, 99, 104, 61, 34, 37, 115, 34, 39, 44, 32, 100, 101, 102, 46, 115, -119, 105, 116, 99, 104, 41, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 112, 46, -112, 117, 115, 104, 40, 39, 60, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 109, 46, 98, 97, 115, 101, 80, 114, 111, 112, -101, 114, 116, 121, 40, 100, 101, 102, 44, 32, 39, 62, 39, 41, 10, 108, 111, 99, 97, 108, 32, 118, 97, 108, 117, 101, 115, 32, 61, 32, 100, 101, -102, 46, 118, 97, 108, 117, 101, 115, 10, 108, 111, 99, 97, 108, 32, 115, 119, 105, 116, 99, 104, 101, 115, 32, 61, 32, 100, 101, 102, 46, 115, 119, -105, 116, 99, 104, 32, 111, 114, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 107, 101, 121, 115, 32, 61, 32, 116, 97, 98, 108, 101, 46, 107, 101, -121, 115, 40, 100, 101, 102, 46, 118, 97, 108, 117, 101, 115, 41, 10, 116, 97, 98, 108, 101, 46, 115, 111, 114, 116, 40, 107, 101, 121, 115, 41, 10, -102, 111, 114, 32, 95, 44, 32, 107, 101, 121, 32, 105, 110, 32, 112, 97, 105, 114, 115, 40, 107, 101, 121, 115, 41, 32, 100, 111, 10, 112, 46, 112, -117, 115, 104, 40, 39, 60, 69, 110, 117, 109, 86, 97, 108, 117, 101, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 100, 34, - 39, 44, 32, 107, 101, 121, 41, 10, 105, 102, 32, 115, 119, 105, 116, 99, 104, 101, 115, 91, 107, 101, 121, 93, 32, 116, 104, 101, 110, 10, 112, 46, -119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 118, 97, 108, 117, 101, 115, 91, 107, 101, 121, - 93, 41, 10, 105, 102, 32, 115, 119, 105, 116, 99, 104, 101, 115, 91, 107, 101, 121, 93, 32, 116, 104, 101, 110, 10, 112, 46, 119, 40, 39, 83, 119, -105, 116, 99, 104, 61, 34, 37, 115, 34, 39, 44, 32, 115, 119, 105, 116, 99, 104, 101, 115, 91, 107, 101, 121, 93, 41, 10, 101, 110, 100, 10, 101, -108, 115, 101, 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 118, 97, 108, 117, -101, 115, 91, 107, 101, 121, 93, 41, 10, 101, 110, 100, 10, 112, 46, 119, 40, 39, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, -110, 100, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 62, 39, 41, 10, 101, 110, 100, 10, -102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 115, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 112, - 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 109, 46, 98, 97, 115, 101, 80, -114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 105, 102, 32, 100, 101, 102, 46, 115, 119, 105, 116, 99, 104, 32, 116, 104, 101, 110, 10, -112, 46, 119, 40, 39, 83, 119, 105, 116, 99, 104, 61, 34, 37, 115, 34, 39, 44, 32, 100, 101, 102, 46, 115, 119, 105, 116, 99, 104, 41, 10, 101, -110, 100, 10, 112, 46, 119, 40, 39, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 115, 116, 114, 105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 112, 46, 112, 117, -115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 109, 46, 98, 97, 115, 101, - 80, 114, 111, 112, 101, 114, 116, 121, 40, 100, 101, 102, 41, 10, 105, 102, 32, 100, 101, 102, 46, 115, 101, 112, 97, 114, 97, 116, 111, 114, 32, 116, -104, 101, 110, 10, 112, 46, 119, 40, 39, 83, 101, 112, 97, 114, 97, 116, 111, 114, 61, 34, 37, 115, 34, 39, 44, 32, 100, 101, 102, 46, 115, 101, -112, 97, 114, 97, 116, 111, 114, 41, 10, 101, 110, 100, 10, 105, 102, 32, 100, 101, 102, 46, 115, 119, 105, 116, 99, 104, 32, 116, 104, 101, 110, 10, -112, 46, 119, 40, 39, 83, 119, 105, 116, 99, 104, 61, 34, 37, 115, 34, 39, 44, 32, 100, 101, 102, 46, 115, 119, 105, 116, 99, 104, 41, 10, 101, -110, 100, 10, 112, 46, 119, 40, 39, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, -110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 40, 114, 41, 10, 112, 46, -112, 117, 115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, 119, 40, - 39, 78, 97, 109, 101, 61, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 68, 101, 112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 39, 41, - 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 32, 68, 101, -112, 101, 110, 100, 101, 110, 99, 105, 101, 115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 73, 110, 67, 111, 109, 109, - 97, 110, 100, 76, 105, 110, 101, 61, 34, 70, 97, 108, 115, 101, 34, 39, 41, 10, 112, 46, 119, 40, 39, 86, 105, 115, 105, 98, 108, 101, 61, 34, -102, 97, 108, 115, 101, 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, - 60, 83, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, 119, 40, 39, 83, 117, 98, 116, 121, 112, 101, 61, 34, - 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, - 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 79, 112, 116, 105, 111, 110, 115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 67, 97, 116, 101, 103, 111, -114, 121, 61, 34, 67, 111, 109, 109, 97, 110, 100, 32, 76, 105, 110, 101, 34, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, -114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, 119, 40, - 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 32, 79, 112, 116, 105, 111, 110, 115, 60, - 47, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 83, 116, 114, 105, 110, 103, 80, 114, -111, 112, 101, 114, 116, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, -116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 62, 39, 41, 10, 112, 46, 119, - 40, 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 32, 79, 112, 116, 105, 111, 110, 115, - 60, 47, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 83, 116, 114, 105, 110, 103, 80, -114, 111, 112, 101, 114, 116, 121, 46, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, - 83, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, - 46, 97, 102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, - 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 65, 102, 116, -101, 114, 84, 97, 114, 103, 101, 116, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 67, 97, 116, 101, 103, 111, -114, 121, 61, 34, 71, 101, 110, 101, 114, 97, 108, 34, 39, 41, 10, 112, 46, 119, 40, 39, 69, 110, 117, 109, 80, 114, 111, 118, 105, 100, 101, 114, - 61, 34, 84, 97, 114, 103, 101, 116, 115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 73, 110, 67, 111, 109, 109, 97, -110, 100, 76, 105, 110, 101, 61, 34, 70, 97, 108, 115, 101, 34, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, -105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, -119, 40, 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 69, 120, 101, 99, 117, 116, 101, 32, 65, 102, 116, 101, 114, 60, 47, 115, 121, -115, 58, 83, 116, 114, 105, 110, 103, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, - 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, - 60, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, - 62, 39, 41, 10, 112, 46, 119, 40, 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 83, 112, 101, 99, 105, 102, 105, 101, 115, 32, 116, -104, 101, 32, 116, 97, 114, 103, 101, 116, 115, 32, 102, 111, 114, 32, 116, 104, 101, 32, 98, 117, 105, 108, 100, 32, 99, 117, 115, 116, 111, 109, 105, -122, 97, 116, 105, 111, 110, 32, 116, 111, 32, 114, 117, 110, 32, 97, 102, 116, 101, 114, 46, 60, 47, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, - 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, - 46, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, 99, - 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 80, 114, 111, 118, 105, 100, 101, 114, 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, 41, - 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 78, 97, 109, 101, 86, 97, 108, 117, 101, 80, 97, 105, 114, 39, 41, 10, 112, 46, 119, 40, 39, 78, - 97, 109, 101, 61, 34, 69, 120, 99, 108, 117, 100, 101, 34, 39, 41, 10, 112, 46, 119, 40, 39, 86, 97, 108, 117, 101, 61, 34, 94, 37, 115, 65, -102, 116, 101, 114, 84, 97, 114, 103, 101, 116, 115, 124, 94, 67, 111, 109, 112, 117, 116, 101, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, -101, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, -114, 111, 112, 101, 114, 116, 121, 46, 80, 114, 111, 118, 105, 100, 101, 114, 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, 41, 10, 112, 46, 112, 117, -115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 97, 116, 97, 83, 111, 117, -114, 99, 101, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 39, 41, 10, 112, 46, 119, - 40, 39, 80, 101, 114, 115, 105, 115, 116, 101, 110, 99, 101, 61, 34, 80, 114, 111, 106, 101, 99, 116, 70, 105, 108, 101, 34, 39, 41, 10, 112, 46, -119, 40, 39, 73, 116, 101, 109, 84, 121, 112, 101, 61, 34, 34, 39, 41, 10, 112, 46, 119, 40, 39, 72, 97, 115, 67, 111, 110, 102, 105, 103, 117, -114, 97, 116, 105, 111, 110, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, 116, 114, 117, 101, 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, -112, 40, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, - 46, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, -110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 101, -102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, 99, 69, -110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 66, 101, 102, 111, 114, -101, 84, 97, 114, 103, 101, 116, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 67, 97, 116, 101, 103, 111, 114, -121, 61, 34, 71, 101, 110, 101, 114, 97, 108, 34, 39, 41, 10, 112, 46, 119, 40, 39, 69, 110, 117, 109, 80, 114, 111, 118, 105, 100, 101, 114, 61, - 34, 84, 97, 114, 103, 101, 116, 115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 73, 110, 67, 111, 109, 109, 97, 110, -100, 76, 105, 110, 101, 61, 34, 70, 97, 108, 115, 101, 34, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, - 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, 119, - 40, 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 69, 120, 101, 99, 117, 116, 101, 32, 66, 101, 102, 111, 114, 101, 60, 47, 115, 121, -115, 58, 83, 116, 114, 105, 110, 103, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, - 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, - 60, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, - 62, 39, 41, 10, 112, 46, 119, 40, 39, 60, 115, 121, 115, 58, 83, 116, 114, 105, 110, 103, 62, 83, 112, 101, 99, 105, 102, 105, 101, 115, 32, 116, -104, 101, 32, 116, 97, 114, 103, 101, 116, 115, 32, 102, 111, 114, 32, 116, 104, 101, 32, 98, 117, 105, 108, 100, 32, 99, 117, 115, 116, 111, 109, 105, -122, 97, 116, 105, 111, 110, 32, 116, 111, 32, 114, 117, 110, 32, 98, 101, 102, 111, 114, 101, 46, 60, 47, 115, 121, 115, 58, 83, 116, 114, 105, 110, -103, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, -121, 46, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, - 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 80, 114, 111, 118, 105, 100, 101, 114, 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, - 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 78, 97, 109, 101, 86, 97, 108, 117, 101, 80, 97, 105, 114, 39, 41, 10, 112, 46, 119, 40, 39, - 78, 97, 109, 101, 61, 34, 69, 120, 99, 108, 117, 100, 101, 34, 39, 41, 10, 112, 46, 119, 40, 39, 86, 97, 108, 117, 101, 61, 34, 94, 37, 115, - 66, 101, 102, 111, 114, 101, 84, 97, 114, 103, 101, 116, 115, 124, 94, 67, 111, 109, 112, 117, 116, 101, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, - 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, -109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 80, 114, 111, 118, 105, 100, 101, 114, 83, 101, 116, 116, 105, 110, 103, 115, 62, 39, 41, 10, 112, 46, -112, 117, 115, 104, 40, 39, 60, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 97, 116, 97, 83, -111, 117, 114, 99, 101, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 39, 41, 10, 112, - 46, 119, 40, 39, 80, 101, 114, 115, 105, 115, 116, 101, 110, 99, 101, 61, 34, 80, 114, 111, 106, 101, 99, 116, 70, 105, 108, 101, 34, 39, 41, 10, -112, 46, 119, 40, 39, 72, 97, 115, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 67, 111, 110, 100, 105, 116, 105, 111, 110, 61, 34, -116, 114, 117, 101, 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, -109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 62, 39, 41, 10, 112, 46, -112, 111, 112, 40, 39, 60, 47, 68, 121, 110, 97, 109, 105, 99, 69, 110, 117, 109, 80, 114, 111, 112, 101, 114, 116, 121, 62, 39, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, - 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, -119, 40, 39, 78, 97, 109, 101, 61, 34, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 84, 101, 109, 112, 108, 97, 116, 101, 34, 39, 41, 10, -112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 67, 111, 109, 109, 97, 110, 100, 32, 76, 105, 110, 101, 34, 39, - 41, 10, 112, 46, 119, 40, 39, 86, 105, 115, 105, 98, 108, 101, 61, 34, 70, 97, 108, 115, 101, 34, 39, 41, 10, 112, 46, 119, 40, 39, 73, 110, - 99, 108, 117, 100, 101, 73, 110, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, 70, 97, 108, 115, 101, 34, 32, 47, 62, 39, 41, 10, -112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 111, 110, 116, 101, 110, 116, 84, 121, -112, 101, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 111, 110, 116, 101, 110, 116, 84, 121, 112, 101, 39, 41, 10, 112, 46, 119, - 40, 39, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, - 97, 121, 78, 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 114, 46, 100, 105, 115, 112, 108, 97, 121, 32, 111, 114, 32, 114, 46, 110, 97, 109, -101, 41, 10, 112, 46, 119, 40, 39, 73, 116, 101, 109, 84, 121, 112, 101, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, -101, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 100, 97, 116, 97, 83, 111, -117, 114, 99, 101, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 82, 117, 108, 101, 46, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, - 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 39, 41, 10, 112, 46, 119, 40, 39, 80, -101, 114, 115, 105, 115, 116, 101, 110, 99, 101, 61, 34, 80, 114, 111, 106, 101, 99, 116, 70, 105, 108, 101, 34, 39, 41, 10, 112, 46, 119, 40, 39, - 73, 116, 101, 109, 84, 121, 112, 101, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, - 40, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 82, 117, 108, 101, 46, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 62, 39, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 101, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, 105, 112, 116, 105, -111, 110, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, -112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 69, 120, 101, 99, 117, 116, 105, 111, 110, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, - 39, 41, 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 69, 120, 101, 99, 117, 116, 105, 111, 110, 32, 68, -101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 39, 41, 10, 112, 46, 119, 40, 39, 86, 105, 115, 105, 98, 108, 101, 61, 34, 70, 97, 108, 115, -101, 34, 39, 41, 10, 112, 46, 119, 40, 39, 73, 110, 99, 108, 117, 100, 101, 73, 110, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, - 70, 97, 108, 115, 101, 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, - 32, 109, 46, 102, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 40, 114, 41, 10, 102, 111, 114, 32, 95, 44, 32, 118, 32, 105, 110, 32, -105, 112, 97, 105, 114, 115, 40, 114, 46, 102, 105, 108, 101, 101, 120, 116, 101, 110, 115, 105, 111, 110, 41, 32, 100, 111, 10, 112, 46, 112, 117, 115, -104, 40, 39, 60, 70, 105, 108, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 42, - 37, 115, 34, 39, 44, 32, 118, 41, 10, 112, 46, 119, 40, 39, 67, 111, 110, 116, 101, 110, 116, 84, 121, 112, 101, 61, 34, 37, 115, 34, 32, 47, - 62, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, -116, 105, 111, 110, 32, 109, 46, 105, 110, 112, 117, 116, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, - 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 73, 110, 112, 117, 116, 115, - 34, 39, 41, 10, 112, 46, 119, 40, 39, 67, 97, 116, 101, 103, 111, 114, 121, 61, 34, 67, 111, 109, 109, 97, 110, 100, 32, 76, 105, 110, 101, 34, - 39, 41, 10, 112, 46, 119, 40, 39, 73, 115, 82, 101, 113, 117, 105, 114, 101, 100, 61, 34, 116, 114, 117, 101, 34, 39, 41, 10, 112, 46, 119, 40, - 39, 83, 119, 105, 116, 99, 104, 61, 34, 32, 34, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, 114, 105, 110, 103, 76, 105, -115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 62, 39, 41, 10, 112, 46, 112, 117, 115, 104, 40, - 39, 60, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 39, 41, 10, 112, 46, 119, 40, 39, 80, 101, 114, 115, 105, 115, 116, 101, 110, 99, 101, 61, - 34, 80, 114, 111, 106, 101, 99, 116, 70, 105, 108, 101, 34, 39, 41, 10, 112, 46, 119, 40, 39, 73, 116, 101, 109, 84, 121, 112, 101, 61, 34, 37, -115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 83, 111, 117, 114, 99, 101, 84, 121, 112, 101, 61, 34, 73, 116, -101, 109, 34, 32, 47, 62, 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 83, 116, 114, 105, 110, 103, - 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 46, 68, 97, 116, 97, 83, 111, 117, 114, 99, 101, 62, 39, 41, 10, 112, 46, 112, 111, 112, - 40, 39, 60, 47, 83, 116, 114, 105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 111, 117, 116, 112, 117, 116, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 83, 116, 114, -105, 110, 103, 76, 105, 115, 116, 80, 114, 111, 112, 101, 114, 116, 121, 39, 41, 10, 112, 46, 119, 40, 39, 78, 97, 109, 101, 61, 34, 79, 117, 116, -112, 117, 116, 115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 61, 34, 79, 117, 116, 112, 117, 116, -115, 34, 39, 41, 10, 112, 46, 119, 40, 39, 86, 105, 115, 105, 98, 108, 101, 61, 34, 70, 97, 108, 115, 101, 34, 39, 41, 10, 112, 46, 119, 40, - 39, 73, 110, 99, 108, 117, 100, 101, 73, 110, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 61, 34, 70, 97, 108, 115, 101, 34, 32, 47, 62, - 39, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 108, 101, 73, 116, -101, 109, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 84, 121, 112, 101, 39, 41, 10, 112, 46, 119, 40, 39, 78, - 97, 109, 101, 61, 34, 37, 115, 34, 39, 44, 32, 114, 46, 110, 97, 109, 101, 41, 10, 112, 46, 119, 40, 39, 68, 105, 115, 112, 108, 97, 121, 78, - 97, 109, 101, 61, 34, 37, 115, 34, 32, 47, 62, 39, 44, 32, 114, 46, 100, 105, 115, 112, 108, 97, 121, 32, 111, 114, 32, 114, 46, 110, 97, 109, -101, 41, 10, 112, 46, 112, 111, 112, 40, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, -116, 83, 99, 104, 101, 109, 97, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 40, 114, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, -114, 111, 106, 101, 99, 116, 83, 99, 104, 101, 109, 97, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 32, 120, 109, 108, 110, 115, 61, 34, 104, -116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 98, 117, 105, 108, -100, 47, 50, 48, 48, 57, 47, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 32, 120, 109, 108, 110, 115, 58, 120, 61, 34, 104, 116, 116, 112, - 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 119, 105, 110, 102, 120, 47, 50, - 48, 48, 54, 47, 120, 97, 109, 108, 34, 32, 120, 109, 108, 110, 115, 58, 115, 121, 115, 61, 34, 99, 108, 114, 45, 110, 97, 109, 101, 115, 112, 97, - 99, 101, 58, 83, 121, 115, 116, 101, 109, 59, 97, 115, 115, 101, 109, 98, 108, 121, 61, 109, 115, 99, 111, 114, 108, 105, 98, 34, 62, 39, 41, 10, -101, 110, 100, 10, }; - -// vstudio/vs2012.lua -static const unsigned char builtin_script_109[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, - 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 49, 50, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 86, -105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 50, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, - 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 50, 32, 112, -114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, 100, 111, -119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 49, 49, 48, 34, 44, 10, 118, 97, 108, 105, -100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, -105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, -100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 44, 32, 34, 85, 116, 105, 108, -105, 116, 121, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, 103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, - 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, -115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 109, 115, 99, 34, 32, 32, 32, 125, 44, 10, -100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, -112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, - 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, -110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, - 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, - 44, 10, 111, 110, 82, 117, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 114, 117, 108, 101, 41, 10, 118, 115, 116, 117, 100, 105, -111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 10, 101, 110, 100, 44, - 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, - 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 83, 111, 108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, - 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, - 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, -111, 110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, 115, -116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 112, 97, 116, 104, - 86, 97, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, 97, 114, 115, 44, 10, -118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 123, 10, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 49, - 50, 34, 44, 10, 118, 101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, 32, 32, 32, 61, 32, 34, 50, 48, 49, 50, 34, 44, 10, 116, 97, -114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 34, 52, 46, 53, 34, 44, 10, 116, 111, 111, 108, 115, 86, 101, 114, 115, -105, 111, 110, 32, 32, 32, 32, 61, 32, 34, 52, 46, 48, 34, 44, 10, 125, 10, 125, 10, }; - -// vstudio/vs2013.lua -static const unsigned char builtin_script_110[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, - 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 49, 51, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 86, -105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 51, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, - 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 51, 32, 112, -114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, 100, 111, -119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 49, 50, 48, 34, 44, 10, 118, 97, 108, 105, -100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, -105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, -100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 44, 32, 34, 85, 116, 105, 108, -105, 116, 121, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, -103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, - 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, - 61, 32, 123, 32, 34, 109, 115, 99, 34, 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, - 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, -107, 115, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, -105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, -114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 82, 117, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 114, 117, 108, 101, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, - 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 83, 111, -108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 80, 114, 111, -106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, - 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, - 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, 97, 114, 115, 44, 10, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 123, 10, 115, 111, 108, 117, 116, -105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 49, 50, 34, 44, 10, 118, 101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, - 32, 32, 32, 61, 32, 34, 50, 48, 49, 51, 34, 44, 10, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 34, - 52, 46, 53, 34, 44, 10, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 61, 32, 34, 49, 50, 46, 48, 34, 44, 10, -102, 105, 108, 116, 101, 114, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 52, 46, 48, 34, 44, 10, 125, 10, 125, 10, -}; - -// vstudio/vs2013_vcxitems.lua -static const unsigned char builtin_script_111[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 49, 51, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, -111, 10, 108, 111, 99, 97, 108, 32, 112, 114, 111, 106, 101, 99, 116, 32, 61, 32, 112, 46, 112, 114, 111, 106, 101, 99, 116, 10, 108, 111, 99, 97, -108, 32, 99, 111, 110, 102, 105, 103, 32, 61, 32, 112, 46, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 99, 111, -110, 102, 105, 103, 32, 61, 32, 112, 46, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, 10, 108, 111, 99, 97, 108, 32, 116, 114, 101, 101, 32, 61, - 32, 112, 46, 116, 114, 101, 101, 10, 108, 111, 99, 97, 108, 32, 109, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 49, 51, 10, 108, 111, 99, 97, 108, 32, 118, 99, 50, 48, 49, 48, 32, 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 99, 50, 48, - 49, 48, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 99, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, - 69, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 125, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 118, 99, 50, 48, 49, 48, - 46, 120, 109, 108, 68, 101, 99, 108, 97, 114, 97, 116, 105, 111, 110, 44, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 44, 10, 109, 46, 103, 108, -111, 98, 97, 108, 115, 44, 10, 109, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 44, 10, 109, 46, -105, 116, 101, 109, 71, 114, 111, 117, 112, 44, 10, 118, 99, 50, 48, 49, 48, 46, 102, 105, 108, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 101, 110, 101, 114, 97, 116, 101, 40, 112, 114, 106, 41, 10, 112, 46, 117, 116, 102, 56, 40, 41, - 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 112, 114, 111, 106, 101, 99, 116, 44, - 32, 112, 114, 106, 41, 10, 112, 46, 111, 117, 116, 40, 39, 60, 47, 80, 114, 111, 106, 101, 99, 116, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 80, -114, 111, 106, 101, 99, 116, 32, 120, 109, 108, 110, 115, 61, 34, 104, 116, 116, 112, 58, 47, 47, 115, 99, 104, 101, 109, 97, 115, 46, 109, 105, 99, -114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 100, 101, 118, 101, 108, 111, 112, 101, 114, 47, 109, 115, 98, 117, 105, 108, 100, 47, 50, 48, 48, - 51, 34, 62, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 103, 108, 111, 98, 97, 108, 115, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 109, 115, 98, 117, 105, 108, 100, 65, -108, 108, 80, 114, 111, 106, 101, 99, 116, 115, 44, 10, 109, 46, 104, 97, 115, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 44, 10, 109, 46, -105, 116, 101, 109, 115, 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 44, 10, 109, 46, 105, 116, 101, 109, 115, 80, 114, 111, 106, 101, 99, 116, - 78, 97, 109, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 103, 108, 111, 98, 97, 108, 115, 40, 112, -114, 106, 41, 10, 118, 99, 50, 48, 49, 48, 46, 112, 114, 111, 112, 101, 114, 116, 121, 71, 114, 111, 117, 112, 40, 110, 105, 108, 44, 32, 34, 71, -108, 111, 98, 97, 108, 115, 34, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, -103, 108, 111, 98, 97, 108, 115, 44, 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 80, 114, 111, 112, 101, 114, 116, 121, 71, -114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 115, 98, 117, 105, 108, 100, 65, 108, -108, 80, 114, 111, 106, 101, 99, 116, 115, 40, 112, 114, 106, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 77, - 83, 66, 117, 105, 108, 100, 65, 108, 108, 80, 114, 111, 106, 101, 99, 116, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 36, 40, 77, 83, 66, 117, -105, 108, 100, 65, 108, 108, 80, 114, 111, 106, 101, 99, 116, 115, 41, 59, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 104, 105, 115, 70, 105, 108, -101, 70, 117, 108, 108, 80, 97, 116, 104, 41, 34, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 104, 97, 115, 83, -104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 40, 112, 114, 106, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, - 72, 97, 115, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 44, 32, 110, 105, 108, 44, 32, 34, 116, 114, 117, 101, 34, 41, 10, 101, 110, -100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 116, 101, 109, 115, 80, 114, 111, 106, 101, 99, 116, 71, 117, 105, 100, 40, 112, 114, -106, 41, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 116, 101, 109, 115, 80, 114, 111, 106, 101, 99, 116, 71, -117, 105, 100, 34, 44, 32, 110, 105, 108, 44, 32, 34, 123, 37, 115, 125, 34, 44, 32, 112, 114, 106, 46, 117, 117, 105, 100, 41, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 116, 101, 109, 115, 80, 114, 111, 106, 101, 99, 116, 78, 97, 109, 101, 40, 112, 114, 106, - 41, 10, 105, 102, 32, 112, 114, 106, 46, 110, 97, 109, 101, 32, 126, 61, 32, 112, 114, 106, 46, 102, 105, 108, 101, 110, 97, 109, 101, 32, 116, 104, -101, 110, 10, 118, 99, 50, 48, 49, 48, 46, 101, 108, 101, 109, 101, 110, 116, 40, 34, 73, 116, 101, 109, 115, 80, 114, 111, 106, 101, 99, 116, 78, - 97, 109, 101, 34, 44, 32, 110, 105, 108, 44, 32, 34, 37, 115, 34, 44, 32, 112, 114, 106, 46, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, -110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, -112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 99, 108, 67, -111, 109, 112, 105, 108, 101, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 116, 101, 109, 68, 101, 102, -105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 73, 116, 101, 109, 68, -101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, -101, 108, 101, 109, 101, 110, 116, 115, 46, 105, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 44, 32, 112, 114, -106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, 116, 101, 109, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 71, 114, 111, 117, 112, 62, - 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, 110, 32, 123, 10, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 44, 10, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, 39, 60, 67, 108, - 67, 111, 109, 112, 105, 108, 101, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, -115, 46, 99, 108, 67, 111, 109, 112, 105, 108, 101, 44, 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 67, 108, 67, 111, 109, -112, 105, 108, 101, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 97, 100, 100, 105, 116, 105, 111, 110, 97, -108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 40, 112, 114, 106, 41, 10, 118, 99, 50, 48, 49, 48, 46, -101, 108, 101, 109, 101, 110, 116, 40, 34, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, -111, 114, 105, 101, 115, 34, 44, 32, 110, 105, 108, 44, 32, 39, 37, 115, 39, 44, 32, 39, 37, 40, 65, 100, 100, 105, 116, 105, 111, 110, 97, 108, - 73, 110, 99, 108, 117, 100, 101, 68, 105, 114, 101, 99, 116, 111, 114, 105, 101, 115, 41, 59, 36, 40, 77, 83, 66, 117, 105, 108, 100, 84, 104, 105, -115, 70, 105, 108, 101, 68, 105, 114, 101, 99, 116, 111, 114, 121, 41, 39, 41, 10, 101, 110, 100, 10, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, - 46, 105, 116, 101, 109, 71, 114, 111, 117, 112, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 114, 101, 116, 117, 114, -110, 32, 123, 10, 109, 46, 112, 114, 111, 106, 101, 99, 116, 67, 97, 112, 97, 98, 105, 108, 105, 116, 121, 44, 10, 125, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 116, 101, 109, 71, 114, 111, 117, 112, 40, 112, 114, 106, 41, 10, 112, 46, 112, 117, 115, 104, 40, - 39, 60, 73, 116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, -109, 101, 110, 116, 115, 46, 105, 116, 101, 109, 71, 114, 111, 117, 112, 44, 32, 112, 114, 106, 41, 10, 112, 46, 112, 111, 112, 40, 39, 60, 47, 73, -116, 101, 109, 71, 114, 111, 117, 112, 62, 39, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 111, 106, 101, - 99, 116, 67, 97, 112, 97, 98, 105, 108, 105, 116, 121, 40, 112, 114, 106, 41, 10, 112, 46, 119, 40, 39, 60, 80, 114, 111, 106, 101, 99, 116, 67, - 97, 112, 97, 98, 105, 108, 105, 116, 121, 32, 73, 110, 99, 108, 117, 100, 101, 61, 34, 83, 111, 117, 114, 99, 101, 73, 116, 101, 109, 115, 70, 114, -111, 109, 73, 109, 112, 111, 114, 116, 115, 34, 32, 47, 62, 39, 41, 10, 101, 110, 100, 10, }; - -// vstudio/vs2015.lua -static const unsigned char builtin_script_112[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, - 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 49, 53, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 86, -105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 53, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, - 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 53, 32, 112, -114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, 100, 111, -119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 49, 52, 48, 34, 44, 10, 118, 97, 108, 105, -100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, -105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, -100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 44, 32, 34, 85, 116, 105, 108, -105, 116, 121, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, -103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, - 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, - 61, 32, 123, 32, 34, 109, 115, 99, 34, 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, - 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, -107, 115, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, 117, 116, -105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, 80, -114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 82, 117, 108, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, -111, 110, 40, 114, 117, 108, 101, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, 97, 116, 101, - 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, - 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 83, 111, -108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 32, - 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 80, 114, 111, -106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, -117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 118, 115, 116, 117, 100, 105, 111, 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, - 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, - 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, 97, 114, 115, 44, 10, 118, 115, 116, 117, 100, 105, 111, 32, 61, 32, 123, 10, 115, 111, 108, 117, 116, -105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 49, 50, 34, 44, 10, 118, 101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, - 32, 32, 32, 61, 32, 34, 49, 52, 34, 44, 10, 116, 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 34, 52, 46, - 53, 34, 44, 10, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 61, 32, 34, 49, 52, 46, 48, 34, 44, 10, 102, 105, -108, 116, 101, 114, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 52, 46, 48, 34, 44, 10, 125, 10, 125, 10, }; - -// vstudio/vs2017.lua -static const unsigned char builtin_script_113[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, - 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 49, 55, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 86, -105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 55, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, - 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 55, 32, 112, -114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, 100, 111, -119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 49, 52, 49, 34, 44, 10, 118, 97, 108, 105, -100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, -105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, -100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 44, 32, 34, 85, 116, 105, 108, -105, 116, 121, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, -103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, - 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, - 61, 32, 123, 32, 34, 109, 115, 99, 34, 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, - 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, -107, 115, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, -117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, - 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 82, 117, 108, 101, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 114, 117, 108, 101, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, -110, 101, 114, 97, 116, 101, 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, -107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 99, 108, 101, 97, 110, 83, 111, 108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, - 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, -111, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, - 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, - 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, 97, 114, 115, 44, 10, 118, 115, 116, 117, 100, -105, 111, 32, 61, 32, 123, 10, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 49, 50, 34, 44, 10, 118, -101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, 32, 32, 32, 61, 32, 34, 49, 53, 34, 44, 10, 116, 97, 114, 103, 101, 116, 70, 114, 97, -109, 101, 119, 111, 114, 107, 32, 61, 32, 34, 52, 46, 53, 46, 50, 34, 44, 10, 116, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 32, - 32, 32, 61, 32, 34, 49, 53, 46, 48, 34, 44, 10, 102, 105, 108, 116, 101, 114, 84, 111, 111, 108, 115, 86, 101, 114, 115, 105, 111, 110, 32, 61, - 32, 34, 52, 46, 48, 34, 44, 10, 125, 10, 125, 10, }; - -// vstudio/vs2019.lua -static const unsigned char builtin_script_114[] = { -108, 111, 99, 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 108, 111, 99, 97, 108, 32, 118, 115, 116, 117, 100, 105, 111, 32, - 61, 32, 112, 46, 118, 115, 116, 117, 100, 105, 111, 10, 110, 101, 119, 97, 99, 116, 105, 111, 110, 32, 123, 10, 116, 114, 105, 103, 103, 101, 114, 32, - 32, 32, 32, 32, 61, 32, 34, 118, 115, 50, 48, 49, 57, 34, 44, 10, 115, 104, 111, 114, 116, 110, 97, 109, 101, 32, 32, 32, 61, 32, 34, 86, -105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 57, 34, 44, 10, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 32, - 61, 32, 34, 71, 101, 110, 101, 114, 97, 116, 101, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 32, 50, 48, 49, 57, 32, 112, -114, 111, 106, 101, 99, 116, 32, 102, 105, 108, 101, 115, 34, 44, 10, 116, 97, 114, 103, 101, 116, 111, 115, 32, 61, 32, 34, 119, 105, 110, 100, 111, -119, 115, 34, 44, 10, 116, 111, 111, 108, 115, 101, 116, 32, 32, 61, 32, 34, 109, 115, 99, 45, 118, 49, 52, 50, 34, 44, 10, 118, 97, 108, 105, -100, 95, 107, 105, 110, 100, 115, 32, 32, 32, 32, 32, 61, 32, 123, 32, 34, 67, 111, 110, 115, 111, 108, 101, 65, 112, 112, 34, 44, 32, 34, 87, -105, 110, 100, 111, 119, 101, 100, 65, 112, 112, 34, 44, 32, 34, 83, 116, 97, 116, 105, 99, 76, 105, 98, 34, 44, 32, 34, 83, 104, 97, 114, 101, -100, 76, 105, 98, 34, 44, 32, 34, 77, 97, 107, 101, 102, 105, 108, 101, 34, 44, 32, 34, 78, 111, 110, 101, 34, 44, 32, 34, 85, 116, 105, 108, -105, 116, 121, 34, 44, 32, 34, 83, 104, 97, 114, 101, 100, 73, 116, 101, 109, 115, 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 108, 97, 110, -103, 117, 97, 103, 101, 115, 32, 61, 32, 123, 32, 34, 67, 34, 44, 32, 34, 67, 43, 43, 34, 44, 32, 34, 67, 35, 34, 44, 32, 34, 70, 35, - 34, 32, 125, 44, 10, 118, 97, 108, 105, 100, 95, 116, 111, 111, 108, 115, 32, 32, 32, 32, 32, 61, 32, 123, 10, 99, 99, 32, 32, 32, 32, 32, - 61, 32, 123, 32, 34, 109, 115, 99, 34, 32, 32, 32, 125, 44, 10, 100, 111, 116, 110, 101, 116, 32, 61, 32, 123, 32, 34, 109, 115, 110, 101, 116, - 34, 32, 125, 44, 10, 125, 44, 10, 111, 110, 87, 111, 114, 107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, -107, 115, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 48, 53, 46, 103, 101, 110, 101, 114, 97, 116, 101, 83, 111, 108, -117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, -116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, 110, 101, 114, - 97, 116, 101, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 82, 117, 108, 101, 32, 61, 32, 102, 117, -110, 99, 116, 105, 111, 110, 40, 114, 117, 108, 101, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 103, 101, -110, 101, 114, 97, 116, 101, 82, 117, 108, 101, 40, 114, 117, 108, 101, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, 87, 111, 114, -107, 115, 112, 97, 99, 101, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 99, 108, 101, 97, 110, 83, 111, 108, 117, 116, 105, 111, 110, 40, 119, 107, 115, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, - 80, 114, 111, 106, 101, 99, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, -111, 46, 99, 108, 101, 97, 110, 80, 114, 111, 106, 101, 99, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 111, 110, 67, 108, 101, 97, 110, - 84, 97, 114, 103, 101, 116, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 40, 112, 114, 106, 41, 10, 112, 46, 118, 115, 116, 117, 100, 105, 111, - 46, 99, 108, 101, 97, 110, 84, 97, 114, 103, 101, 116, 40, 112, 114, 106, 41, 10, 101, 110, 100, 44, 10, 112, 97, 116, 104, 86, 97, 114, 115, 32, - 61, 32, 118, 115, 116, 117, 100, 105, 111, 46, 118, 115, 50, 48, 49, 48, 46, 112, 97, 116, 104, 86, 97, 114, 115, 44, 10, 118, 115, 116, 117, 100, -105, 111, 32, 61, 32, 123, 10, 115, 111, 108, 117, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 32, 61, 32, 34, 49, 50, 34, 44, 10, 118, -101, 114, 115, 105, 111, 110, 78, 97, 109, 101, 32, 32, 32, 32, 32, 61, 32, 34, 86, 101, 114, 115, 105, 111, 110, 32, 49, 54, 34, 44, 10, 116, - 97, 114, 103, 101, 116, 70, 114, 97, 109, 101, 119, 111, 114, 107, 32, 61, 32, 34, 52, 46, 55, 46, 50, 34, 44, 10, 116, 111, 111, 108, 115, 86, -101, 114, 115, 105, 111, 110, 32, 32, 32, 32, 61, 32, 34, 49, 53, 46, 48, 34, 44, 10, 117, 115, 101, 114, 84, 111, 111, 108, 115, 86, 101, 114, -115, 105, 111, 110, 32, 61, 32, 34, 67, 117, 114, 114, 101, 110, 116, 34, 44, 10, 102, 105, 108, 116, 101, 114, 84, 111, 111, 108, 115, 86, 101, 114, -115, 105, 111, 110, 32, 61, 32, 34, 52, 46, 48, 34, 44, 10, 125, 10, 125, 10, }; - -// src/_premake_main.lua -static const unsigned char builtin_script_115[] = { -108, 111, 99, 97, 108, 32, 115, 104, 111, 114, 116, 104, 101, 108, 112, 32, 32, 32, 32, 32, 61, 32, 34, 84, 121, 112, 101, 32, 39, 112, 114, 101, -109, 97, 107, 101, 53, 32, 45, 45, 104, 101, 108, 112, 39, 32, 102, 111, 114, 32, 104, 101, 108, 112, 34, 10, 108, 111, 99, 97, 108, 32, 118, 101, -114, 115, 105, 111, 110, 104, 101, 108, 112, 32, 32, 32, 61, 32, 34, 112, 114, 101, 109, 97, 107, 101, 53, 32, 40, 80, 114, 101, 109, 97, 107, 101, - 32, 66, 117, 105, 108, 100, 32, 83, 99, 114, 105, 112, 116, 32, 71, 101, 110, 101, 114, 97, 116, 111, 114, 41, 32, 37, 115, 34, 10, 108, 111, 99, - 97, 108, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 32, 32, 32, 32, 32, 61, 32, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, 10, 95, 80, - 82, 69, 77, 65, 75, 69, 95, 83, 84, 65, 82, 84, 84, 73, 77, 69, 32, 61, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 10, 108, 111, 99, - 97, 108, 32, 109, 111, 100, 117, 108, 101, 115, 32, 61, 32, 100, 111, 102, 105, 108, 101, 40, 34, 95, 109, 111, 100, 117, 108, 101, 115, 46, 108, 117, - 97, 34, 41, 10, 108, 111, 99, 97, 108, 32, 109, 97, 110, 105, 102, 101, 115, 116, 32, 61, 32, 100, 111, 102, 105, 108, 101, 40, 34, 95, 109, 97, -110, 105, 102, 101, 115, 116, 46, 108, 117, 97, 34, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 109, 97, 110, 105, 102, 101, 115, -116, 32, 100, 111, 10, 100, 111, 102, 105, 108, 101, 40, 109, 97, 110, 105, 102, 101, 115, 116, 91, 105, 93, 41, 10, 101, 110, 100, 10, 108, 111, 99, - 97, 108, 32, 112, 32, 61, 32, 112, 114, 101, 109, 97, 107, 101, 10, 112, 46, 109, 97, 105, 110, 32, 61, 32, 123, 125, 10, 108, 111, 99, 97, 108, - 32, 109, 32, 61, 32, 112, 46, 109, 97, 105, 110, 10, 109, 46, 95, 112, 114, 101, 108, 111, 97, 100, 101, 100, 32, 61, 32, 123, 125, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 105, 110, 115, 116, 97, 108, 108, 77, 111, 100, 117, 108, 101, 76, 111, 97, 100, 101, 114, 40, 41, 10, 105, -102, 32, 110, 111, 116, 32, 111, 115, 46, 105, 115, 104, 111, 115, 116, 40, 39, 119, 105, 110, 100, 111, 119, 115, 39, 41, 32, 116, 104, 101, 110, 10, -108, 111, 99, 97, 108, 32, 112, 114, 101, 109, 97, 107, 101, 68, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, -116, 111, 114, 121, 40, 95, 80, 82, 69, 77, 65, 75, 69, 95, 67, 79, 77, 77, 65, 78, 68, 41, 10, 112, 97, 99, 107, 97, 103, 101, 46, 99, -112, 97, 116, 104, 32, 61, 32, 112, 97, 99, 107, 97, 103, 101, 46, 99, 112, 97, 116, 104, 32, 46, 46, 32, 39, 59, 39, 32, 46, 46, 32, 112, -114, 101, 109, 97, 107, 101, 68, 105, 114, 32, 46, 46, 32, 39, 47, 63, 46, 115, 111, 39, 10, 101, 110, 100, 10, 116, 97, 98, 108, 101, 46, 105, -110, 115, 101, 114, 116, 40, 112, 97, 99, 107, 97, 103, 101, 46, 115, 101, 97, 114, 99, 104, 101, 114, 115, 44, 32, 50, 44, 32, 109, 46, 109, 111, -100, 117, 108, 101, 76, 111, 97, 100, 101, 114, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 109, 111, 100, 117, 108, -101, 76, 111, 97, 100, 101, 114, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 100, 105, 114, 32, 61, 32, 112, 97, 116, 104, 46, 103, -101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 110, 97, 109, 101, 41, 10, 108, 111, 99, 97, 108, 32, 98, 97, 115, 101, 32, 61, 32, 112, - 97, 116, 104, 46, 103, 101, 116, 110, 97, 109, 101, 40, 110, 97, 109, 101, 41, 10, 105, 102, 32, 100, 105, 114, 32, 126, 61, 32, 34, 46, 34, 32, -116, 104, 101, 110, 10, 100, 105, 114, 32, 61, 32, 100, 105, 114, 32, 46, 46, 32, 34, 47, 34, 32, 46, 46, 32, 98, 97, 115, 101, 10, 101, 108, -115, 101, 10, 100, 105, 114, 32, 61, 32, 98, 97, 115, 101, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 102, 117, 108, 108, 32, 61, 32, 100, -105, 114, 32, 46, 46, 32, 34, 47, 34, 32, 46, 46, 32, 98, 97, 115, 101, 32, 46, 46, 32, 34, 46, 108, 117, 97, 34, 10, 108, 111, 99, 97, -108, 32, 112, 97, 116, 104, 115, 32, 61, 32, 123, 10, 34, 46, 109, 111, 100, 117, 108, 101, 115, 47, 34, 32, 46, 46, 32, 102, 117, 108, 108, 44, - 10, 34, 109, 111, 100, 117, 108, 101, 115, 47, 34, 32, 46, 46, 32, 102, 117, 108, 108, 44, 10, 102, 117, 108, 108, 44, 10, 110, 97, 109, 101, 32, - 46, 46, 32, 34, 46, 108, 117, 97, 34, 10, 125, 10, 102, 111, 114, 32, 95, 44, 32, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, - 97, 116, 104, 115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 102, 105, 108, 101, 32, 61, 32, 111, 115, 46, 108, 111, 99, 97, 116, 101, 40, -112, 41, 10, 105, 102, 32, 102, 105, 108, 101, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 99, 104, 117, 110, 107, 44, 32, 101, 114, 114, - 32, 61, 32, 108, 111, 97, 100, 102, 105, 108, 101, 40, 102, 105, 108, 101, 41, 10, 105, 102, 32, 99, 104, 117, 110, 107, 32, 116, 104, 101, 110, 10, -114, 101, 116, 117, 114, 110, 32, 99, 104, 117, 110, 107, 10, 101, 110, 100, 10, 105, 102, 32, 101, 114, 114, 32, 116, 104, 101, 110, 10, 114, 101, 116, -117, 114, 110, 32, 34, 92, 110, 92, 116, 108, 111, 97, 100, 32, 101, 114, 114, 111, 114, 32, 34, 32, 46, 46, 32, 101, 114, 114, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 112, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 112, 97, 116, 104, -115, 41, 32, 100, 111, 10, 108, 111, 99, 97, 108, 32, 99, 104, 117, 110, 107, 44, 32, 101, 114, 114, 32, 61, 32, 108, 111, 97, 100, 102, 105, 108, -101, 40, 34, 36, 47, 34, 32, 46, 46, 32, 112, 41, 10, 105, 102, 32, 99, 104, 117, 110, 107, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, -110, 32, 99, 104, 117, 110, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, -114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, 116, 40, 41, 10, 109, 97, 116, 104, 46, 114, 97, 110, 100, 111, 109, 115, -101, 101, 100, 40, 111, 115, 46, 116, 105, 109, 101, 40, 41, 41, 10, 95, 80, 82, 69, 77, 65, 75, 69, 95, 68, 73, 82, 32, 61, 32, 112, 97, -116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 95, 80, 82, 69, 77, 65, 75, 69, 95, 67, 79, 77, 77, 65, 78, 68, - 41, 10, 112, 46, 112, 97, 116, 104, 32, 61, 32, 112, 46, 112, 97, 116, 104, 32, 46, 46, 32, 34, 59, 34, 32, 46, 46, 32, 95, 80, 82, 69, - 77, 65, 75, 69, 95, 68, 73, 82, 32, 46, 46, 32, 34, 59, 34, 32, 46, 46, 32, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 95, - 68, 73, 82, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 108, 111, 97, 100, 77, 111, 100, 117, 108, 101, -115, 40, 41, 10, 102, 111, 114, 32, 105, 32, 61, 32, 49, 44, 32, 35, 109, 111, 100, 117, 108, 101, 115, 32, 100, 111, 10, 108, 111, 99, 97, 108, - 32, 110, 97, 109, 101, 32, 61, 32, 109, 111, 100, 117, 108, 101, 115, 91, 105, 93, 10, 108, 111, 99, 97, 108, 32, 112, 114, 101, 108, 111, 97, 100, -101, 114, 32, 61, 32, 110, 97, 109, 101, 32, 46, 46, 32, 34, 47, 95, 112, 114, 101, 108, 111, 97, 100, 46, 108, 117, 97, 34, 10, 112, 114, 101, -108, 111, 97, 100, 101, 114, 32, 61, 32, 111, 115, 46, 108, 111, 99, 97, 116, 101, 40, 34, 109, 111, 100, 117, 108, 101, 115, 47, 34, 32, 46, 46, - 32, 112, 114, 101, 108, 111, 97, 100, 101, 114, 41, 32, 111, 114, 32, 111, 115, 46, 108, 111, 99, 97, 116, 101, 40, 112, 114, 101, 108, 111, 97, 100, -101, 114, 41, 10, 105, 102, 32, 112, 114, 101, 108, 111, 97, 100, 101, 114, 32, 116, 104, 101, 110, 10, 109, 46, 95, 112, 114, 101, 108, 111, 97, 100, -101, 100, 91, 110, 97, 109, 101, 93, 32, 61, 32, 105, 110, 99, 108, 117, 100, 101, 40, 112, 114, 101, 108, 111, 97, 100, 101, 114, 41, 10, 105, 102, - 32, 110, 111, 116, 32, 109, 46, 95, 112, 114, 101, 108, 111, 97, 100, 101, 100, 91, 110, 97, 109, 101, 93, 32, 116, 104, 101, 110, 10, 112, 46, 119, - 97, 114, 110, 40, 34, 109, 111, 100, 117, 108, 101, 32, 39, 37, 115, 39, 32, 115, 104, 111, 117, 108, 100, 32, 114, 101, 116, 117, 114, 110, 32, 102, -117, 110, 99, 116, 105, 111, 110, 32, 102, 114, 111, 109, 32, 95, 112, 114, 101, 108, 111, 97, 100, 46, 108, 117, 97, 34, 44, 32, 110, 97, 109, 101, - 41, 10, 101, 110, 100, 10, 101, 108, 115, 101, 10, 114, 101, 113, 117, 105, 114, 101, 40, 110, 97, 109, 101, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 110, 83, 121, 115, 116, 101, 109, 83, 99, 114, 105, 112, 116, 40, - 41, 10, 100, 111, 102, 105, 108, 101, 111, 112, 116, 40, 95, 79, 80, 84, 73, 79, 78, 83, 91, 34, 115, 121, 115, 116, 101, 109, 115, 99, 114, 105, -112, 116, 34, 93, 32, 111, 114, 32, 123, 32, 34, 112, 114, 101, 109, 97, 107, 101, 53, 45, 115, 121, 115, 116, 101, 109, 46, 108, 117, 97, 34, 44, - 32, 34, 112, 114, 101, 109, 97, 107, 101, 45, 115, 121, 115, 116, 101, 109, 46, 108, 117, 97, 34, 32, 125, 41, 10, 102, 105, 108, 116, 101, 114, 32, -123, 125, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 108, 111, 99, 97, 116, 101, 85, 115, 101, 114, 83, 99, 114, 105, -112, 116, 40, 41, 10, 108, 111, 99, 97, 108, 32, 100, 101, 102, 97, 117, 108, 116, 115, 32, 61, 32, 123, 32, 34, 112, 114, 101, 109, 97, 107, 101, - 53, 46, 108, 117, 97, 34, 44, 32, 34, 112, 114, 101, 109, 97, 107, 101, 52, 46, 108, 117, 97, 34, 32, 125, 10, 102, 111, 114, 32, 105, 32, 61, - 32, 49, 44, 32, 35, 100, 101, 102, 97, 117, 108, 116, 115, 32, 100, 111, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 100, 101, -102, 97, 117, 108, 116, 115, 91, 105, 93, 41, 32, 116, 104, 101, 110, 10, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 32, 61, 32, 100, -101, 102, 97, 117, 108, 116, 115, 91, 105, 93, 10, 98, 114, 101, 97, 107, 10, 101, 110, 100, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, - 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 32, 116, 104, 101, 110, 10, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 32, 61, - 32, 100, 101, 102, 97, 117, 108, 116, 115, 91, 49, 93, 10, 101, 110, 100, 10, 105, 102, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 102, 105, 108, -101, 32, 116, 104, 101, 110, 10, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 32, 61, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 102, -105, 108, 101, 10, 101, 110, 100, 10, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 97, - 98, 115, 111, 108, 117, 116, 101, 40, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 41, 10, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, - 80, 84, 95, 68, 73, 82, 32, 61, 32, 112, 97, 116, 104, 46, 103, 101, 116, 100, 105, 114, 101, 99, 116, 111, 114, 121, 40, 95, 77, 65, 73, 78, - 95, 83, 67, 82, 73, 80, 84, 41, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, 101, 112, 97, 114, 101, 65, - 99, 116, 105, 111, 110, 40, 41, 10, 105, 102, 32, 95, 65, 67, 84, 73, 79, 78, 32, 97, 110, 100, 32, 95, 65, 67, 84, 73, 79, 78, 58, 101, -110, 100, 115, 119, 105, 116, 104, 40, 34, 110, 103, 34, 41, 32, 116, 104, 101, 110, 10, 112, 46, 119, 97, 114, 110, 79, 110, 99, 101, 40, 95, 65, - 67, 84, 73, 79, 78, 44, 32, 34, 39, 37, 115, 39, 32, 104, 97, 115, 32, 98, 101, 101, 110, 32, 100, 101, 112, 114, 101, 99, 97, 116, 101, 100, - 59, 32, 117, 115, 101, 32, 39, 37, 115, 39, 32, 105, 110, 115, 116, 101, 97, 100, 34, 44, 32, 95, 65, 67, 84, 73, 79, 78, 44, 32, 95, 65, - 67, 84, 73, 79, 78, 58, 115, 117, 98, 40, 49, 44, 32, 45, 51, 41, 41, 10, 101, 110, 100, 10, 112, 46, 97, 99, 116, 105, 111, 110, 46, 115, -101, 116, 40, 95, 65, 67, 84, 73, 79, 78, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, -105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 97, 99, 116, 105, 111, 110, 32, 116, 104, 101, 110, 10, 112, 46, 97, - 99, 116, 105, 111, 110, 46, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 40, 97, 99, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, 114, 41, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 114, 117, 110, 85, 115, 101, 114, 83, 99, 114, 105, 112, -116, 40, 41, 10, 105, 102, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 41, 32, 116, -104, 101, 110, 10, 100, 111, 102, 105, 108, 101, 40, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 41, 10, 101, 110, 100, 10, 101, 110, 100, - 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 104, 101, 99, 107, 73, 110, 116, 101, 114, 97, 99, 116, 105, 118, 101, 40, 41, 10, 105, -102, 32, 95, 79, 80, 84, 73, 79, 78, 83, 46, 105, 110, 116, 101, 114, 97, 99, 116, 105, 118, 101, 32, 116, 104, 101, 110, 10, 100, 101, 98, 117, -103, 46, 112, 114, 111, 109, 112, 116, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 114, -111, 99, 101, 115, 115, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 40, 41, 10, 105, 102, 32, 40, 95, 79, 80, 84, 73, 79, 78, 83, 91, - 34, 118, 101, 114, 115, 105, 111, 110, 34, 93, 41, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 102, 40, 118, 101, 114, 115, 105, 111, 110, 104, -101, 108, 112, 44, 32, 95, 80, 82, 69, 77, 65, 75, 69, 95, 86, 69, 82, 83, 73, 79, 78, 41, 10, 111, 115, 46, 101, 120, 105, 116, 40, 48, - 41, 10, 101, 110, 100, 10, 105, 102, 32, 40, 95, 79, 80, 84, 73, 79, 78, 83, 91, 34, 104, 101, 108, 112, 34, 93, 41, 32, 116, 104, 101, 110, - 10, 112, 46, 115, 104, 111, 119, 104, 101, 108, 112, 40, 41, 10, 111, 115, 46, 101, 120, 105, 116, 40, 49, 41, 10, 101, 110, 100, 10, 111, 107, 44, - 32, 101, 114, 114, 32, 61, 32, 112, 46, 111, 112, 116, 105, 111, 110, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 95, 79, 80, 84, 73, 79, 78, - 83, 41, 10, 105, 102, 32, 110, 111, 116, 32, 111, 107, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 40, 34, 69, 114, 114, 111, 114, 58, 32, - 34, 32, 46, 46, 32, 101, 114, 114, 41, 10, 111, 115, 46, 101, 120, 105, 116, 40, 49, 41, 10, 101, 110, 100, 10, 105, 102, 32, 110, 111, 116, 32, - 95, 79, 80, 84, 73, 79, 78, 83, 46, 105, 110, 116, 101, 114, 97, 99, 116, 105, 118, 101, 32, 116, 104, 101, 110, 10, 105, 102, 32, 110, 111, 116, - 32, 95, 65, 67, 84, 73, 79, 78, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 40, 115, 104, 111, 114, 116, 104, 101, 108, 112, 41, 10, 111, -115, 46, 101, 120, 105, 116, 40, 49, 41, 10, 101, 110, 100, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, - 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 105, 102, 32, 110, 111, 116, 32, 97, 99, 116, 105, 111, 110, 32, 116, 104, -101, 110, 10, 112, 114, 105, 110, 116, 40, 34, 69, 114, 114, 111, 114, 58, 32, 110, 111, 32, 115, 117, 99, 104, 32, 97, 99, 116, 105, 111, 110, 32, - 39, 34, 32, 46, 46, 32, 95, 65, 67, 84, 73, 79, 78, 32, 46, 46, 32, 34, 39, 34, 41, 10, 111, 115, 46, 101, 120, 105, 116, 40, 49, 41, - 10, 101, 110, 100, 10, 105, 102, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 105, 115, 67, 111, 110, 102, 105, 103, 117, 114, 97, 98, 108, 101, 40, - 41, 32, 97, 110, 100, 32, 110, 111, 116, 32, 111, 115, 46, 105, 115, 102, 105, 108, 101, 40, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, - 41, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 40, 115, 116, 114, 105, 110, 103, 46, 102, 111, 114, 109, 97, 116, 40, 34, 78, 111, 32, 80, -114, 101, 109, 97, 107, 101, 32, 115, 99, 114, 105, 112, 116, 32, 40, 37, 115, 41, 32, 102, 111, 117, 110, 100, 33, 34, 44, 32, 112, 97, 116, 104, - 46, 103, 101, 116, 110, 97, 109, 101, 40, 95, 77, 65, 73, 78, 95, 83, 67, 82, 73, 80, 84, 41, 41, 41, 10, 111, 115, 46, 101, 120, 105, 116, - 40, 49, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 116, 114, 121, 72, 111, -111, 107, 68, 101, 98, 117, 103, 103, 101, 114, 40, 41, 10, 105, 102, 32, 40, 95, 79, 80, 84, 73, 79, 78, 83, 91, 34, 100, 101, 98, 117, 103, -103, 101, 114, 34, 93, 41, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 40, 34, 76, 111, 97, 100, 105, 110, 103, 32, 108, 117, 97, 115, 111, - 99, 107, 101, 116, 46, 46, 46, 34, 41, 10, 114, 101, 113, 117, 105, 114, 101, 40, 39, 108, 117, 97, 115, 111, 99, 107, 101, 116, 39, 41, 10, 112, -114, 105, 110, 116, 40, 34, 83, 116, 97, 114, 116, 105, 110, 103, 32, 100, 101, 98, 117, 103, 103, 101, 114, 46, 46, 46, 34, 41, 10, 108, 111, 99, - 97, 108, 32, 109, 111, 98, 100, 101, 98, 117, 103, 32, 61, 32, 114, 101, 113, 117, 105, 114, 101, 40, 39, 109, 111, 98, 100, 101, 98, 117, 103, 39, - 41, 10, 109, 111, 98, 100, 101, 98, 117, 103, 46, 115, 116, 97, 114, 116, 40, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, -105, 111, 110, 32, 109, 46, 112, 114, 101, 66, 97, 107, 101, 40, 41, 10, 105, 102, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 105, 115, 67, 111, -110, 102, 105, 103, 117, 114, 97, 98, 108, 101, 40, 41, 32, 116, 104, 101, 110, 10, 112, 114, 105, 110, 116, 40, 34, 66, 117, 105, 108, 100, 105, 110, -103, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 115, 46, 46, 46, 34, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, -110, 99, 116, 105, 111, 110, 32, 109, 46, 98, 97, 107, 101, 40, 41, 10, 105, 102, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 105, 115, 67, 111, -110, 102, 105, 103, 117, 114, 97, 98, 108, 101, 40, 41, 32, 116, 104, 101, 110, 10, 112, 46, 111, 118, 101, 110, 46, 98, 97, 107, 101, 40, 41, 10, -101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 111, 115, 116, 66, 97, 107, 101, 40, 41, 10, 108, 111, - 99, 97, 108, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 115, 104, 111, 117, 108, 100, 76, 111, 97, 100, 40, 102, 117, 110, 99, 41, 10, 102, 111, -114, 32, 119, 107, 115, 32, 105, 110, 32, 112, 46, 103, 108, 111, 98, 97, 108, 46, 101, 97, 99, 104, 87, 111, 114, 107, 115, 112, 97, 99, 101, 40, - 41, 32, 100, 111, 10, 102, 111, 114, 32, 112, 114, 106, 32, 105, 110, 32, 112, 46, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 101, 97, 99, 104, -112, 114, 111, 106, 101, 99, 116, 40, 119, 107, 115, 41, 32, 100, 111, 10, 102, 111, 114, 32, 99, 102, 103, 32, 105, 110, 32, 112, 46, 112, 114, 111, -106, 101, 99, 116, 46, 101, 97, 99, 104, 99, 111, 110, 102, 105, 103, 40, 112, 114, 106, 41, 32, 100, 111, 10, 105, 102, 32, 102, 117, 110, 99, 40, - 99, 102, 103, 41, 32, 116, 104, 101, 110, 10, 114, 101, 116, 117, 114, 110, 32, 116, 114, 117, 101, 10, 101, 110, 100, 10, 101, 110, 100, 10, 101, 110, -100, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 109, 111, 100, 117, 108, 101, 44, 32, 102, 117, 110, 99, 32, 105, 110, 32, 112, 97, -105, 114, 115, 40, 109, 46, 95, 112, 114, 101, 108, 111, 97, 100, 101, 100, 41, 32, 100, 111, 10, 105, 102, 32, 110, 111, 116, 32, 112, 97, 99, 107, - 97, 103, 101, 46, 108, 111, 97, 100, 101, 100, 91, 109, 111, 100, 117, 108, 101, 93, 32, 97, 110, 100, 32, 115, 104, 111, 117, 108, 100, 76, 111, 97, -100, 40, 102, 117, 110, 99, 41, 32, 116, 104, 101, 110, 10, 114, 101, 113, 117, 105, 114, 101, 40, 109, 111, 100, 117, 108, 101, 41, 10, 101, 110, 100, - 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 41, 10, 105, -102, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 105, 115, 67, 111, 110, 102, 105, 103, 117, 114, 97, 98, 108, 101, 40, 41, 32, 116, 104, 101, 110, - 10, 112, 46, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 118, 97, 108, 105, 100, 97, 116, 101, 40, 112, 46, 97, 112, 105, 46, 114, 111, 111, 116, - 67, 111, 110, 116, 97, 105, 110, 101, 114, 40, 41, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, -112, 114, 101, 65, 99, 116, 105, 111, 110, 40, 41, 10, 108, 111, 99, 97, 108, 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, -105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 112, 114, 105, 110, 116, 102, 40, 34, 82, 117, 110, 110, 105, 110, 103, 32, 97, 99, -116, 105, 111, 110, 32, 39, 37, 115, 39, 46, 46, 46, 34, 44, 32, 97, 99, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, 114, 41, 10, 101, -110, 100, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 99, 97, 108, 108, 65, 99, 116, 105, 111, 110, 40, 41, 10, 108, 111, 99, 97, 108, - 32, 97, 99, 116, 105, 111, 110, 32, 61, 32, 112, 46, 97, 99, 116, 105, 111, 110, 46, 99, 117, 114, 114, 101, 110, 116, 40, 41, 10, 112, 46, 97, - 99, 116, 105, 111, 110, 46, 99, 97, 108, 108, 40, 97, 99, 116, 105, 111, 110, 46, 116, 114, 105, 103, 103, 101, 114, 41, 10, 101, 110, 100, 10, 102, -117, 110, 99, 116, 105, 111, 110, 32, 109, 46, 112, 111, 115, 116, 65, 99, 116, 105, 111, 110, 40, 41, 10, 105, 102, 32, 112, 46, 97, 99, 116, 105, -111, 110, 46, 105, 115, 67, 111, 110, 102, 105, 103, 117, 114, 97, 98, 108, 101, 40, 41, 32, 116, 104, 101, 110, 10, 108, 111, 99, 97, 108, 32, 100, -117, 114, 97, 116, 105, 111, 110, 32, 61, 32, 109, 97, 116, 104, 46, 102, 108, 111, 111, 114, 40, 40, 111, 115, 46, 99, 108, 111, 99, 107, 40, 41, - 32, 45, 32, 115, 116, 97, 114, 116, 84, 105, 109, 101, 41, 32, 42, 32, 49, 48, 48, 48, 41, 59, 10, 112, 114, 105, 110, 116, 102, 40, 34, 68, -111, 110, 101, 32, 40, 37, 100, 109, 115, 41, 46, 34, 44, 32, 100, 117, 114, 97, 116, 105, 111, 110, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, -109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 32, 61, 32, 123, 10, 109, 46, 116, 114, 121, 72, 111, 111, 107, 68, 101, 98, 117, 103, 103, 101, 114, - 44, 10, 109, 46, 105, 110, 115, 116, 97, 108, 108, 77, 111, 100, 117, 108, 101, 76, 111, 97, 100, 101, 114, 44, 10, 109, 46, 108, 111, 99, 97, 116, -101, 85, 115, 101, 114, 83, 99, 114, 105, 112, 116, 44, 10, 109, 46, 112, 114, 101, 112, 97, 114, 101, 69, 110, 118, 105, 114, 111, 110, 109, 101, 110, -116, 44, 10, 109, 46, 112, 114, 101, 108, 111, 97, 100, 77, 111, 100, 117, 108, 101, 115, 44, 10, 109, 46, 114, 117, 110, 83, 121, 115, 116, 101, 109, - 83, 99, 114, 105, 112, 116, 44, 10, 109, 46, 112, 114, 101, 112, 97, 114, 101, 65, 99, 116, 105, 111, 110, 44, 10, 109, 46, 114, 117, 110, 85, 115, -101, 114, 83, 99, 114, 105, 112, 116, 44, 10, 109, 46, 99, 104, 101, 99, 107, 73, 110, 116, 101, 114, 97, 99, 116, 105, 118, 101, 44, 10, 109, 46, -112, 114, 111, 99, 101, 115, 115, 67, 111, 109, 109, 97, 110, 100, 76, 105, 110, 101, 44, 10, 109, 46, 112, 114, 101, 66, 97, 107, 101, 44, 10, 109, - 46, 98, 97, 107, 101, 44, 10, 109, 46, 112, 111, 115, 116, 66, 97, 107, 101, 44, 10, 109, 46, 118, 97, 108, 105, 100, 97, 116, 101, 44, 10, 109, - 46, 112, 114, 101, 65, 99, 116, 105, 111, 110, 44, 10, 109, 46, 99, 97, 108, 108, 65, 99, 116, 105, 111, 110, 44, 10, 109, 46, 112, 111, 115, 116, - 65, 99, 116, 105, 111, 110, 44, 10, 125, 10, 102, 117, 110, 99, 116, 105, 111, 110, 32, 95, 112, 114, 101, 109, 97, 107, 101, 95, 109, 97, 105, 110, - 40, 41, 10, 112, 46, 99, 97, 108, 108, 65, 114, 114, 97, 121, 40, 109, 46, 101, 108, 101, 109, 101, 110, 116, 115, 41, 10, 114, 101, 116, 117, 114, -110, 32, 48, 10, 101, 110, 100, 10, }; - -// src/_manifest.lua -static const unsigned char builtin_script_116[] = { -114, 101, 116, 117, 114, 110, 10, 123, 10, 34, 98, 97, 115, 101, 47, 95, 102, 111, 117, 110, 100, 97, 116, 105, 111, 110, 46, 108, 117, 97, 34, 44, - 10, 34, 98, 97, 115, 101, 47, 115, 116, 114, 105, 110, 103, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 116, 97, 98, 108, 101, 46, -108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 112, 97, 116, 104, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 111, 115, 46, -108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 105, 111, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 116, 111, 111, 108, 115, - 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 116, 114, 101, 101, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 103, 108, -111, 98, 97, 108, 115, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 109, 111, 100, 117, 108, 101, 100, 111, 119, 110, 108, 111, 97, 100, -101, 114, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 115, 101, 109, 118, 101, 114, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, -101, 47, 104, 116, 116, 112, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 106, 115, 111, 110, 46, 108, 117, 97, 34, 44, 10, 34, 98, - 97, 115, 101, 47, 106, 115, 111, 110, 119, 114, 97, 112, 112, 101, 114, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 108, 97, 110, 103, -117, 97, 103, 101, 115, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 116, 101, 114, 109, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, -115, 101, 47, 102, 105, 101, 108, 100, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 99, 114, 105, 116, 101, 114, 105, 97, 46, 108, 117, - 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 100, 101, 116, 111, 107, 101, 110, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 99, 111, -110, 102, 105, 103, 115, 101, 116, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 99, 111, 110, 116, 101, 120, 116, 46, 108, 117, 97, 34, - 44, 10, 34, 98, 97, 115, 101, 47, 99, 111, 110, 116, 97, 105, 110, 101, 114, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 111, 112, -116, 105, 111, 110, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 97, 99, 116, 105, 111, 110, 46, 108, 117, 97, 34, 44, 10, 34, 98, - 97, 115, 101, 47, 97, 112, 105, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 103, 108, 111, 98, 97, 108, 46, 108, 117, 97, 34, 44, - 10, 34, 98, 97, 115, 101, 47, 119, 111, 114, 107, 115, 112, 97, 99, 101, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 103, 114, 111, -117, 112, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 112, 114, 111, 106, 101, 99, 116, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, -115, 101, 47, 99, 111, 110, 102, 105, 103, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 102, 105, 108, 101, 99, 111, 110, 102, 105, 103, - 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 114, 117, 108, 101, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 111, 118, -101, 110, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 118, 97, 108, 105, 100, 97, 116, 105, 111, 110, 46, 108, 117, 97, 34, 44, 10, - 34, 98, 97, 115, 101, 47, 112, 114, 101, 109, 97, 107, 101, 46, 108, 117, 97, 34, 44, 10, 34, 98, 97, 115, 101, 47, 104, 101, 108, 112, 46, 108, -117, 97, 34, 44, 10, 34, 116, 111, 111, 108, 115, 47, 100, 111, 116, 110, 101, 116, 46, 108, 117, 97, 34, 44, 10, 34, 116, 111, 111, 108, 115, 47, -103, 99, 99, 46, 108, 117, 97, 34, 44, 10, 34, 116, 111, 111, 108, 115, 47, 109, 115, 99, 46, 108, 117, 97, 34, 44, 10, 34, 116, 111, 111, 108, -115, 47, 115, 110, 99, 46, 108, 117, 97, 34, 44, 10, 34, 116, 111, 111, 108, 115, 47, 99, 108, 97, 110, 103, 46, 108, 117, 97, 34, 44, 10, 34, -116, 111, 111, 108, 115, 47, 109, 105, 110, 103, 119, 46, 108, 117, 97, 34, 44, 10, 34, 97, 99, 116, 105, 111, 110, 115, 47, 99, 108, 101, 97, 110, - 47, 95, 99, 108, 101, 97, 110, 46, 108, 117, 97, 34, 44, 10, 34, 95, 112, 114, 101, 109, 97, 107, 101, 95, 105, 110, 105, 116, 46, 108, 117, 97, - 34, 44, 10, 125, 10, }; - -// src/_modules.lua -static const unsigned char builtin_script_117[] = { -114, 101, 116, 117, 114, 110, 32, 123, 34, 103, 109, 97, 107, 101, 34, 44, 32, 34, 118, 115, 116, 117, 100, 105, 111, 34, 44, 32, 34, 120, 99, 111, -100, 101, 34, 44, 32, 34, 99, 111, 100, 101, 108, 105, 116, 101, 34, 44, 32, 34, 103, 109, 97, 107, 101, 50, 34, 44, 32, 34, 100, 34, 44, 32, - 34, 97, 110, 100, 114, 111, 105, 100, 34, 125, }; - -const buildin_mapping builtin_scripts[] = { - {"src/base/_foundation.lua", builtin_script_0, sizeof(builtin_script_0)}, - {"src/base/string.lua", builtin_script_1, sizeof(builtin_script_1)}, - {"src/base/table.lua", builtin_script_2, sizeof(builtin_script_2)}, - {"src/base/path.lua", builtin_script_3, sizeof(builtin_script_3)}, - {"src/base/os.lua", builtin_script_4, sizeof(builtin_script_4)}, - {"src/base/io.lua", builtin_script_5, sizeof(builtin_script_5)}, - {"src/base/tools.lua", builtin_script_6, sizeof(builtin_script_6)}, - {"src/base/tree.lua", builtin_script_7, sizeof(builtin_script_7)}, - {"src/base/globals.lua", builtin_script_8, sizeof(builtin_script_8)}, - {"src/base/moduledownloader.lua", builtin_script_9, sizeof(builtin_script_9)}, - {"src/base/semver.lua", builtin_script_10, sizeof(builtin_script_10)}, - {"src/base/http.lua", builtin_script_11, sizeof(builtin_script_11)}, - {"src/base/json.lua", builtin_script_12, sizeof(builtin_script_12)}, - {"src/base/jsonwrapper.lua", builtin_script_13, sizeof(builtin_script_13)}, - {"src/base/languages.lua", builtin_script_14, sizeof(builtin_script_14)}, - {"src/base/term.lua", builtin_script_15, sizeof(builtin_script_15)}, - {"src/base/field.lua", builtin_script_16, sizeof(builtin_script_16)}, - {"src/base/criteria.lua", builtin_script_17, sizeof(builtin_script_17)}, - {"src/base/detoken.lua", builtin_script_18, sizeof(builtin_script_18)}, - {"src/base/configset.lua", builtin_script_19, sizeof(builtin_script_19)}, - {"src/base/context.lua", builtin_script_20, sizeof(builtin_script_20)}, - {"src/base/container.lua", builtin_script_21, sizeof(builtin_script_21)}, - {"src/base/option.lua", builtin_script_22, sizeof(builtin_script_22)}, - {"src/base/action.lua", builtin_script_23, sizeof(builtin_script_23)}, - {"src/base/api.lua", builtin_script_24, sizeof(builtin_script_24)}, - {"src/base/global.lua", builtin_script_25, sizeof(builtin_script_25)}, - {"src/base/workspace.lua", builtin_script_26, sizeof(builtin_script_26)}, - {"src/base/group.lua", builtin_script_27, sizeof(builtin_script_27)}, - {"src/base/project.lua", builtin_script_28, sizeof(builtin_script_28)}, - {"src/base/config.lua", builtin_script_29, sizeof(builtin_script_29)}, - {"src/base/fileconfig.lua", builtin_script_30, sizeof(builtin_script_30)}, - {"src/base/rule.lua", builtin_script_31, sizeof(builtin_script_31)}, - {"src/base/oven.lua", builtin_script_32, sizeof(builtin_script_32)}, - {"src/base/validation.lua", builtin_script_33, sizeof(builtin_script_33)}, - {"src/base/premake.lua", builtin_script_34, sizeof(builtin_script_34)}, - {"src/base/help.lua", builtin_script_35, sizeof(builtin_script_35)}, - {"src/tools/dotnet.lua", builtin_script_36, sizeof(builtin_script_36)}, - {"src/tools/gcc.lua", builtin_script_37, sizeof(builtin_script_37)}, - {"src/tools/msc.lua", builtin_script_38, sizeof(builtin_script_38)}, - {"src/tools/snc.lua", builtin_script_39, sizeof(builtin_script_39)}, - {"src/tools/clang.lua", builtin_script_40, sizeof(builtin_script_40)}, - {"src/tools/mingw.lua", builtin_script_41, sizeof(builtin_script_41)}, - {"src/actions/clean/_clean.lua", builtin_script_42, sizeof(builtin_script_42)}, - {"src/_premake_init.lua", builtin_script_43, sizeof(builtin_script_43)}, - {"xcode/_preload.lua", builtin_script_44, sizeof(builtin_script_44)}, - {"xcode/xcode.lua", builtin_script_45, sizeof(builtin_script_45)}, - {"xcode/xcode4_workspace.lua", builtin_script_46, sizeof(builtin_script_46)}, - {"xcode/xcode_common.lua", builtin_script_47, sizeof(builtin_script_47)}, - {"xcode/xcode_project.lua", builtin_script_48, sizeof(builtin_script_48)}, - {"android/_preload.lua", builtin_script_49, sizeof(builtin_script_49)}, - {"android/android.lua", builtin_script_50, sizeof(builtin_script_50)}, - {"android/vsandroid_vcxproj.lua", builtin_script_51, sizeof(builtin_script_51)}, - {"android/vsandroid_sln2005.lua", builtin_script_52, sizeof(builtin_script_52)}, - {"android/vsandroid_vstudio.lua", builtin_script_53, sizeof(builtin_script_53)}, - {"android/vsandroid_androidproj.lua", builtin_script_54, sizeof(builtin_script_54)}, - {"raw/_preload.lua", builtin_script_55, sizeof(builtin_script_55)}, - {"raw/raw.lua", builtin_script_56, sizeof(builtin_script_56)}, - {"raw/raw_action.lua", builtin_script_57, sizeof(builtin_script_57)}, - {"self-test/self-test.lua", builtin_script_58, sizeof(builtin_script_58)}, - {"self-test/test_assertions.lua", builtin_script_59, sizeof(builtin_script_59)}, - {"self-test/test_declare.lua", builtin_script_60, sizeof(builtin_script_60)}, - {"self-test/test_helpers.lua", builtin_script_61, sizeof(builtin_script_61)}, - {"self-test/test_runner.lua", builtin_script_62, sizeof(builtin_script_62)}, - {"codelite/_preload.lua", builtin_script_63, sizeof(builtin_script_63)}, - {"codelite/codelite.lua", builtin_script_64, sizeof(builtin_script_64)}, - {"codelite/codelite_workspace.lua", builtin_script_65, sizeof(builtin_script_65)}, - {"codelite/codelite_project.lua", builtin_script_66, sizeof(builtin_script_66)}, - {"gmake/_preload.lua", builtin_script_67, sizeof(builtin_script_67)}, - {"gmake/gmake.lua", builtin_script_68, sizeof(builtin_script_68)}, - {"gmake/gmake_cpp.lua", builtin_script_69, sizeof(builtin_script_69)}, - {"gmake/gmake_csharp.lua", builtin_script_70, sizeof(builtin_script_70)}, - {"gmake/gmake_makefile.lua", builtin_script_71, sizeof(builtin_script_71)}, - {"gmake/gmake_utility.lua", builtin_script_72, sizeof(builtin_script_72)}, - {"gmake/gmake_workspace.lua", builtin_script_73, sizeof(builtin_script_73)}, - {"d/_preload.lua", builtin_script_74, sizeof(builtin_script_74)}, - {"d/d.lua", builtin_script_75, sizeof(builtin_script_75)}, - {"d/actions/gmake.lua", builtin_script_76, sizeof(builtin_script_76)}, - {"d/actions/vcxproj.lua", builtin_script_77, sizeof(builtin_script_77)}, - {"d/actions/visuald.lua", builtin_script_78, sizeof(builtin_script_78)}, - {"d/tools/dmd.lua", builtin_script_79, sizeof(builtin_script_79)}, - {"d/tools/gdc.lua", builtin_script_80, sizeof(builtin_script_80)}, - {"d/tools/ldc.lua", builtin_script_81, sizeof(builtin_script_81)}, - {"gmake2/_preload.lua", builtin_script_82, sizeof(builtin_script_82)}, - {"gmake2/gmake2.lua", builtin_script_83, sizeof(builtin_script_83)}, - {"gmake2/gmake2_cpp.lua", builtin_script_84, sizeof(builtin_script_84)}, - {"gmake2/gmake2_csharp.lua", builtin_script_85, sizeof(builtin_script_85)}, - {"gmake2/gmake2_makefile.lua", builtin_script_86, sizeof(builtin_script_86)}, - {"gmake2/gmake2_utility.lua", builtin_script_87, sizeof(builtin_script_87)}, - {"gmake2/gmake2_workspace.lua", builtin_script_88, sizeof(builtin_script_88)}, - {"vstudio/_preload.lua", builtin_script_89, sizeof(builtin_script_89)}, - {"vstudio/vstudio.lua", builtin_script_90, sizeof(builtin_script_90)}, - {"vstudio/vs2005.lua", builtin_script_91, sizeof(builtin_script_91)}, - {"vstudio/vs2008.lua", builtin_script_92, sizeof(builtin_script_92)}, - {"vstudio/vs200x_vcproj.lua", builtin_script_93, sizeof(builtin_script_93)}, - {"vstudio/vs200x_vcproj_user.lua", builtin_script_94, sizeof(builtin_script_94)}, - {"vstudio/vs2005_solution.lua", builtin_script_95, sizeof(builtin_script_95)}, - {"vstudio/vs2005_dotnetbase.lua", builtin_script_96, sizeof(builtin_script_96)}, - {"vstudio/vs2005_csproj.lua", builtin_script_97, sizeof(builtin_script_97)}, - {"vstudio/vs2005_csproj_user.lua", builtin_script_98, sizeof(builtin_script_98)}, - {"vstudio/vs2005_fsproj.lua", builtin_script_99, sizeof(builtin_script_99)}, - {"vstudio/vs2005_fsproj_user.lua", builtin_script_100, sizeof(builtin_script_100)}, - {"vstudio/vs2010.lua", builtin_script_101, sizeof(builtin_script_101)}, - {"vstudio/vs2010_nuget.lua", builtin_script_102, sizeof(builtin_script_102)}, - {"vstudio/vs2010_vcxproj.lua", builtin_script_103, sizeof(builtin_script_103)}, - {"vstudio/vs2010_vcxproj_user.lua", builtin_script_104, sizeof(builtin_script_104)}, - {"vstudio/vs2010_vcxproj_filters.lua", builtin_script_105, sizeof(builtin_script_105)}, - {"vstudio/vs2010_rules_props.lua", builtin_script_106, sizeof(builtin_script_106)}, - {"vstudio/vs2010_rules_targets.lua", builtin_script_107, sizeof(builtin_script_107)}, - {"vstudio/vs2010_rules_xml.lua", builtin_script_108, sizeof(builtin_script_108)}, - {"vstudio/vs2012.lua", builtin_script_109, sizeof(builtin_script_109)}, - {"vstudio/vs2013.lua", builtin_script_110, sizeof(builtin_script_110)}, - {"vstudio/vs2013_vcxitems.lua", builtin_script_111, sizeof(builtin_script_111)}, - {"vstudio/vs2015.lua", builtin_script_112, sizeof(builtin_script_112)}, - {"vstudio/vs2017.lua", builtin_script_113, sizeof(builtin_script_113)}, - {"vstudio/vs2019.lua", builtin_script_114, sizeof(builtin_script_114)}, - {"src/_premake_main.lua", builtin_script_115, sizeof(builtin_script_115)}, - {"src/_manifest.lua", builtin_script_116, sizeof(builtin_script_116)}, - {"src/_modules.lua", builtin_script_117, sizeof(builtin_script_117)}, - {NULL, NULL, 0} -}; - - -void registerModules(lua_State* L) -{ - (void)(L); -} diff --git a/build/premake/premake5/src/tools/clang.lua b/build/premake/premake5/src/tools/clang.lua deleted file mode 100644 index 032b7f30f4..0000000000 --- a/build/premake/premake5/src/tools/clang.lua +++ /dev/null @@ -1,315 +0,0 @@ --- --- clang.lua --- Clang toolset adapter for Premake --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - p.tools.clang = {} - local clang = p.tools.clang - local gcc = p.tools.gcc - local config = p.config - - - --- --- Build a list of flags for the C preprocessor corresponding to the --- settings in a particular project configuration. --- --- @param cfg --- The project configuration. --- @return --- An array of C preprocessor flags. --- - - function clang.getcppflags(cfg) - - -- Just pass through to GCC for now - local flags = gcc.getcppflags(cfg) - return flags - - end - - --- --- Build a list of C compiler flags corresponding to the settings in --- a particular project configuration. These flags are exclusive --- of the C++ compiler flags, there is no overlap. --- --- @param cfg --- The project configuration. --- @return --- An array of C compiler flags. --- - - clang.shared = { - architecture = gcc.shared.architecture, - flags = gcc.shared.flags, - floatingpoint = { - Fast = "-ffast-math", - }, - strictaliasing = gcc.shared.strictaliasing, - optimize = { - Off = "-O0", - On = "-O2", - Debug = "-O0", - Full = "-O3", - Size = "-Os", - Speed = "-O3", - }, - pic = gcc.shared.pic, - vectorextensions = gcc.shared.vectorextensions, - isaextensions = gcc.shared.isaextensions, - warnings = gcc.shared.warnings, - symbols = gcc.shared.symbols, - unsignedchar = gcc.shared.unsignedchar, - omitframepointer = gcc.shared.omitframepointer, - compileas = gcc.shared.compileas - } - - clang.cflags = table.merge(gcc.cflags, { - }) - - function clang.getcflags(cfg) - local shared = config.mapFlags(cfg, clang.shared) - local cflags = config.mapFlags(cfg, clang.cflags) - - local flags = table.join(shared, cflags) - flags = table.join(flags, clang.getwarnings(cfg)) - - return flags - end - - function clang.getwarnings(cfg) - return gcc.getwarnings(cfg) - end - - --- --- Build a list of C++ compiler flags corresponding to the settings --- in a particular project configuration. These flags are exclusive --- of the C compiler flags, there is no overlap. --- --- @param cfg --- The project configuration. --- @return --- An array of C++ compiler flags. --- - - clang.cxxflags = table.merge(gcc.cxxflags, { - }) - - function clang.getcxxflags(cfg) - local shared = config.mapFlags(cfg, clang.shared) - local cxxflags = config.mapFlags(cfg, clang.cxxflags) - local flags = table.join(shared, cxxflags) - flags = table.join(flags, clang.getwarnings(cfg)) - return flags - end - - --- --- Returns a list of defined preprocessor symbols, decorated for --- the compiler command line. --- --- @param defines --- An array of preprocessor symbols to define; as an array of --- string values. --- @return --- An array of symbols with the appropriate flag decorations. --- - - function clang.getdefines(defines) - - -- Just pass through to GCC for now - local flags = gcc.getdefines(defines) - return flags - - end - - function clang.getundefines(undefines) - - -- Just pass through to GCC for now - local flags = gcc.getundefines(undefines) - return flags - - end - - - --- --- Returns a list of forced include files, decorated for the compiler --- command line. --- --- @param cfg --- The project configuration. --- @return --- An array of force include files with the appropriate flags. --- - - function clang.getforceincludes(cfg) - - -- Just pass through to GCC for now - local flags = gcc.getforceincludes(cfg) - return flags - - end - - --- --- Returns a list of include file search directories, decorated for --- the compiler command line. --- --- @param cfg --- The project configuration. --- @param dirs --- An array of include file search directories; as an array of --- string values. --- @return --- An array of symbols with the appropriate flag decorations. --- - - function clang.getincludedirs(cfg, dirs, sysdirs) - - -- Just pass through to GCC for now - local flags = gcc.getincludedirs(cfg, dirs, sysdirs) - return flags - - end - - clang.getrunpathdirs = gcc.getrunpathdirs - --- --- get the right output flag. --- - function clang.getsharedlibarg(cfg) - return gcc.getsharedlibarg(cfg) - end - --- --- Build a list of linker flags corresponding to the settings in --- a particular project configuration. --- --- @param cfg --- The project configuration. --- @return --- An array of linker flags. --- - - clang.ldflags = { - architecture = { - x86 = "-m32", - x86_64 = "-m64", - }, - flags = { - LinkTimeOptimization = "-flto", - }, - kind = { - SharedLib = function(cfg) - local r = { clang.getsharedlibarg(cfg) } - if cfg.system == "windows" and not cfg.flags.NoImportLib then - table.insert(r, '-Wl,--out-implib="' .. cfg.linktarget.relpath .. '"') - elseif cfg.system == p.LINUX then - table.insert(r, '-Wl,-soname=' .. p.quoted(cfg.linktarget.name)) - elseif table.contains(os.getSystemTags(cfg.system), "darwin") then - table.insert(r, '-Wl,-install_name,' .. p.quoted('@rpath/' .. cfg.linktarget.name)) - end - return r - end, - WindowedApp = function(cfg) - if cfg.system == p.WINDOWS then return "-mwindows" end - end, - }, - system = { - wii = "$(MACHDEP)", - } - } - - function clang.getldflags(cfg) - local flags = config.mapFlags(cfg, clang.ldflags) - return flags - end - - - --- --- Build a list of additional library directories for a particular --- project configuration, decorated for the tool command line. --- --- @param cfg --- The project configuration. --- @return --- An array of decorated additional library directories. --- - - function clang.getLibraryDirectories(cfg) - - -- Just pass through to GCC for now - local flags = gcc.getLibraryDirectories(cfg) - return flags - - end - - --- --- Build a list of libraries to be linked for a particular project --- configuration, decorated for the linker command line. --- --- @param cfg --- The project configuration. --- @param systemOnly --- Boolean flag indicating whether to link only system libraries, --- or system libraries and sibling projects as well. --- @return --- A list of libraries to link, decorated for the linker. --- - - function clang.getlinks(cfg, systemonly, nogroups) - return gcc.getlinks(cfg, systemonly, nogroups) - end - - --- --- Return a list of makefile-specific configuration rules. This will --- be going away when I get a chance to overhaul these adapters. --- --- @param cfg --- The project configuration. --- @return --- A list of additional makefile rules. --- - - function clang.getmakesettings(cfg) - - -- Just pass through to GCC for now - local flags = gcc.getmakesettings(cfg) - return flags - - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. I will --- be moving these into global configuration blocks when I get --- the chance. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "cc" for the C compiler, "cxx" for --- the C++ compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - clang.tools = { - cc = "clang", - cxx = "clang++", - ar = "ar" - } - - function clang.gettoolname(cfg, tool) - return clang.tools[tool] - end diff --git a/build/premake/premake5/src/tools/dotnet.lua b/build/premake/premake5/src/tools/dotnet.lua deleted file mode 100644 index d16f54fa08..0000000000 --- a/build/premake/premake5/src/tools/dotnet.lua +++ /dev/null @@ -1,329 +0,0 @@ --- --- dotnet.lua --- Interface for the C# compilers, all of which are flag compatible. --- Copyright (c) 2002-2013 Jason Perkins and the Premake project --- - - - local p = premake - p.tools.dotnet = {} - local dotnet = p.tools.dotnet - local project = p.project - local config = p.config - - --- --- Examine the file and project configurations to glean additional --- information about a source code in a C# project. --- --- @param fcfg --- The file configuration to consider. --- @return --- A table containing the following keys: --- --- action: the build action for the file; one of "Compile", "Copy", --- "EmbeddedResource", or "None". --- subtype: an additional categorization of the file type, or nil if --- no subtype is required. --- dependency: a related file name, (i.e. *.Designer.cs) if appropriate --- for the file action and subtype. --- - - function dotnet.fileinfo(fcfg) - local info = {} - if (fcfg == nil) then - return info - end - - local fname = fcfg.abspath - local ext = path.getextension(fname):lower() - - -- Determine the build action for the file, falling back to the file - -- extension if no explicit action is available. - - if fcfg.buildaction == "Compile" or ext == ".cs" or ext == ".fs" then - info.action = "Compile" - elseif fcfg.buildaction == "Embed" or ext == ".resx" then - info.action = "EmbeddedResource" - elseif fcfg.buildaction == "Copy" or ext == ".asax" or ext == ".aspx" or ext == ".dll" or ext == ".tt" then - info.action = "Content" - elseif fcfg.buildaction == "Resource" then - info.action = "Resource" - elseif ext == ".xaml" then - if fcfg.buildaction == "Application" or path.getbasename(fname) == "App" then - if fcfg.project.kind == p.SHAREDLIB then - info.action = "None" - else - info.action = "ApplicationDefinition" - end - else - info.action = "Page" - end - else - info.action = "None" - end - - -- Try to work out any subtypes, based on the files in the project - - if info.action == "Compile" and fname:endswith(".cs") then - - if fname:endswith(".Designer.cs") then - local basename = fname:sub(1, -13) - - -- Look for associated files: .resx, .settings, .cs, .xsd - local testname = basename .. ".resx" - if project.hasfile(fcfg.project, testname) then - info.AutoGen = "True" - info.DependentUpon = testname - end - - testname = basename .. ".settings" - if project.hasfile(fcfg.project, testname) then - info.AutoGen = "True" - info.DependentUpon = testname - info.DesignTimeSharedInput = "True" - end - - testname = basename .. ".cs" - if project.hasfile(fcfg.project, testname) then - info.AutoGen = nil - info.SubType = "Dependency" - info.DependentUpon = testname - end - - testname = basename .. ".xsd" - if project.hasfile(fcfg.project, testname) then - info.AutoGen = "True" - info.DesignTime = "True" - info.DependentUpon = testname - end - - elseif fname:endswith(".xaml.cs") then - info.SubType = "Code" - info.DependentUpon = fname:sub(1, -4) - - else - local basename = fname:sub(1, -4) - - -- Is there a matching *.xsd? - testname = basename .. ".xsd" - if project.hasfile(fcfg.project, testname) then - info.DependentUpon = testname - end - - -- Is there a matching *.Designer.cs? - testname = basename .. ".Designer.cs" - if project.hasfile(fcfg.project, testname) then - info.SubType = "Form" - end - - testname = basename .. ".tt" - if project.hasfile(fcfg.project, testname) then - info.AutoGen = "True" - info.DesignTime = "True" - info.DependentUpon = testname - end - - end - - -- Allow C# object type build actions to override the default - if fcfg.buildaction == "Component" or - fcfg.buildaction == "Form" or - fcfg.buildaction == "UserControl" - then - info.SubType = fcfg.buildaction - end - - -- This flag is deprecated, will remove eventually - if fcfg.flags and fcfg.flags.Component then - info.SubType = "Component" - end - - end - - if info.action == "Content" then - info.CopyToOutputDirectory = "PreserveNewest" - end - - if info.action == "EmbeddedResource" and fname:endswith(".resx") then - local basename = fname:sub(1, -6) - - -- Is there a matching *.cs file? - local testname = basename .. ".cs" - if project.hasfile(fcfg.project, testname) then - info.DependentUpon = testname - if project.hasfile(fcfg.project, basename .. ".Designer.cs") then - info.SubType = "DesignerType" - end - else - -- Is there a matching *.Designer.cs? - testname = basename .. ".Designer.cs" - if project.hasfile(fcfg.project, testname) then - info.SubType = "Designer" - - local resourceAccessGenerator = "ResXFileCodeGenerator" - if fcfg.project.resourcegenerator then - if fcfg.project.resourcegenerator == "public" then - resourceAccessGenerator = "PublicResXFileCodeGenerator" - end - end - - info.Generator = resourceAccessGenerator - info.LastGenOutput = path.getname(testname) - end - end - - end - - if info.action == "None" and fname:endswith(".settings") then - local testname = fname:sub(1, -10) .. ".Designer.cs" - if project.hasfile(fcfg.project, testname) then - info.Generator = "SettingsSingleFileGenerator" - info.LastGenOutput = path.getname(testname) - end - end - - if info.action == "Content" and fname:endswith(".tt") then - local testname = fname:sub(1, -4) .. ".cs" - if project.hasfile(fcfg.project, testname) then - info.Generator = "TextTemplatingFileGenerator" - info.LastGenOutput = path.getname(testname) - info.CopyToOutputDirectory = nil - end - end - - if info.action == "None" and fname:endswith(".xsd") then - local testname = fname:sub(1, -5) .. ".Designer.cs" - if project.hasfile(fcfg.project, testname) then - info.SubType = "Designer" - info.Generator = "MSDataSetGenerator" - info.LastGenOutput = path.getname(testname) - end - end - - if info.action == "None" and (fname:endswith(".xsc") or fname:endswith(".xss")) then - local testname = fname:sub(1, -5) .. ".xsd" - if project.hasfile(fcfg.project, testname) then - info.DependentUpon = testname - end - end - - if fname:endswith(".xaml") then - local testname = fname .. ".cs" - if project.hasfile(fcfg.project, testname) then - info.SubType = "Designer" - info.Generator = "MSBuild:Compile" - end - end - - if info.DependentUpon then - info.DependentUpon = path.getname(info.DependentUpon) - end - - return info - end - - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "csc" for the C# compiler, or --- "resgen" for the resource compiler. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - function dotnet.gettoolname(cfg, tool) - local compilers = { - msnet = "csc", - mono = "mcs", - pnet = "cscc", - } - - if tool == "csc" then - local toolset = _OPTIONS.dotnet or "msnet" - return compilers[toolset] - else - return "resgen" - end - end - - - --- --- Returns a list of compiler flags, based on the supplied configuration. --- - - dotnet.flags = { - clr = { - Unsafe = "/unsafe", - }, - flags = { - FatalWarning = "/warnaserror", - }, - optimize = { - On = "/optimize", - Size = "/optimize", - Speed = "/optimize", - }, - symbols = { - On = "/debug", - } - } - - function dotnet.getflags(cfg) - local flags = config.mapFlags(cfg, dotnet.flags) - - -- Tells the compiler not to include the csc.rsp response file which - -- it does by default and references all the assemblies shipped with - -- the .NET Framework. VS sets this flag by default for C# projects. - table.insert(flags, '/noconfig') - - if cfg.project.icon then - local fn = project.getrelative(cfg.project, cfg.project.icon) - table.insert(flags, string.format('/win32icon:"%s"', fn)) - end - - if #cfg.defines > 0 then - table.insert(flags, table.implode(cfg.defines, "/d:", "", " ")) - end - - if cfg.csversion ~= nil then - table.insert(flags, '/langversion:' .. cfg.csversion) - end - - return table.join(flags, cfg.buildoptions) - end - - - --- --- Translates the Premake kind into the CSC kind string. --- - - function dotnet.getkind(cfg) - if (cfg.kind == "ConsoleApp") then - return "Exe" - elseif (cfg.kind == "WindowedApp") then - return "WinExe" - elseif (cfg.kind == "SharedLib") then - return "Library" - else - error("invalid dotnet kind " .. cfg.kind .. ". Valid kinds are ConsoleApp, WindowsApp, SharedLib") - end - end - - --- --- Returns makefile-specific configuration rules. --- - - function dotnet.getmakesettings(cfg) - return nil - end diff --git a/build/premake/premake5/src/tools/gcc.lua b/build/premake/premake5/src/tools/gcc.lua deleted file mode 100644 index abd4c5561d..0000000000 --- a/build/premake/premake5/src/tools/gcc.lua +++ /dev/null @@ -1,568 +0,0 @@ ---- --- gcc.lua --- Provides GCC-specific configuration strings. --- Copyright (c) 2002-2015 Jason Perkins and the Premake project ---- - - local p = premake - - p.tools.gcc = {} - local gcc = p.tools.gcc - - local project = p.project - local config = p.config - - --- --- Returns list of C preprocessor flags for a configuration. --- - - gcc.cppflags = { - system = { - haiku = "-MMD", - wii = { "-MMD", "-MP", "-I$(LIBOGC_INC)", "$(MACHDEP)" }, - _ = { "-MMD", "-MP" } - } - } - - function gcc.getcppflags(cfg) - local flags = config.mapFlags(cfg, gcc.cppflags) - return flags - end - - --- --- Returns string to be appended to -g --- - function gcc.getdebugformat(cfg) - local flags = { - Default = "", - Dwarf = "dwarf", - SplitDwarf = "split-dwarf", - } - return flags - end - --- --- Returns list of C compiler flags for a configuration. --- - gcc.shared = { - architecture = { - x86 = "-m32", - x86_64 = "-m64", - }, - flags = { - FatalCompileWarnings = "-Werror", - LinkTimeOptimization = "-flto", - ShadowedVariables = "-Wshadow", - UndefinedIdentifiers = "-Wundef", - }, - floatingpoint = { - Fast = "-ffast-math", - Strict = "-ffloat-store", - }, - strictaliasing = { - Off = "-fno-strict-aliasing", - Level1 = { "-fstrict-aliasing", "-Wstrict-aliasing=1" }, - Level2 = { "-fstrict-aliasing", "-Wstrict-aliasing=2" }, - Level3 = { "-fstrict-aliasing", "-Wstrict-aliasing=3" }, - }, - optimize = { - Off = "-O0", - On = "-O2", - Debug = "-Og", - Full = "-O3", - Size = "-Os", - Speed = "-O3", - }, - pic = { - On = "-fPIC", - }, - vectorextensions = { - AVX = "-mavx", - AVX2 = "-mavx2", - SSE = "-msse", - SSE2 = "-msse2", - SSE3 = "-msse3", - SSSE3 = "-mssse3", - ["SSE4.1"] = "-msse4.1", - }, - isaextensions = { - MOVBE = "-mmovbe", - POPCNT = "-mpopcnt", - PCLMUL = "-mpclmul", - LZCNT = "-mlzcnt", - BMI = "-mbmi", - BMI2 = "-mbmi2", - F16C = "-mf16c", - AES = "-maes", - FMA = "-mfma", - FMA4 = "-mfma4", - RDRND = "-mrdrnd", - }, - warnings = { - Extra = {"-Wall", "-Wextra"}, - High = "-Wall", - Off = "-w", - }, - symbols = function(cfg, mappings) - local values = gcc.getdebugformat(cfg) - local debugformat = values[cfg.debugformat] or "" - return { - On = "-g" .. debugformat, - FastLink = "-g" .. debugformat, - Full = "-g" .. debugformat, - } - end, - unsignedchar = { - On = "-funsigned-char", - Off = "-fno-unsigned-char" - }, - omitframepointer = { - On = "-fomit-frame-pointer", - Off = "-fno-omit-frame-pointer" - }, - compileas = { - ["Objective-C"] = "-x objective-c", - ["Objective-C++"] = "-x objective-c++", - } - } - - gcc.cflags = { - cdialect = { - ["C89"] = "-std=c89", - ["C90"] = "-std=c90", - ["C99"] = "-std=c99", - ["C11"] = "-std=c11", - ["gnu89"] = "-std=gnu89", - ["gnu90"] = "-std=gnu90", - ["gnu99"] = "-std=gnu99", - ["gnu11"] = "-std=gnu11", - } - } - - function gcc.getcflags(cfg) - local shared_flags = config.mapFlags(cfg, gcc.shared) - local cflags = config.mapFlags(cfg, gcc.cflags) - local flags = table.join(shared_flags, cflags) - flags = table.join(flags, gcc.getwarnings(cfg)) - return flags - end - - function gcc.getwarnings(cfg) - local result = {} - for _, enable in ipairs(cfg.enablewarnings) do - table.insert(result, '-W' .. enable) - end - for _, disable in ipairs(cfg.disablewarnings) do - table.insert(result, '-Wno-' .. disable) - end - for _, fatal in ipairs(cfg.fatalwarnings) do - table.insert(result, '-Werror=' .. fatal) - end - return result - end - - --- --- Returns list of C++ compiler flags for a configuration. --- - - gcc.cxxflags = { - exceptionhandling = { - Off = "-fno-exceptions" - }, - flags = { - NoBufferSecurityCheck = "-fno-stack-protector", - }, - cppdialect = { - ["C++98"] = "-std=c++98", - ["C++0x"] = "-std=c++0x", - ["C++11"] = "-std=c++11", - ["C++1y"] = "-std=c++1y", - ["C++14"] = "-std=c++14", - ["C++1z"] = "-std=c++1z", - ["C++17"] = "-std=c++17", - ["gnu++98"] = "-std=gnu++98", - ["gnu++0x"] = "-std=gnu++0x", - ["gnu++11"] = "-std=gnu++11", - ["gnu++1y"] = "-std=gnu++1y", - ["gnu++14"] = "-std=gnu++14", - ["gnu++1z"] = "-std=gnu++1z", - ["gnu++17"] = "-std=gnu++17", - }, - rtti = { - Off = "-fno-rtti" - }, - visibility = { - Default = "-fvisibility=default", - Hidden = "-fvisibility=hidden", - Internal = "-fvisibility=internal", - Protected = "-fvisibility=protected", - }, - inlinesvisibility = { - Hidden = "-fvisibility-inlines-hidden" - } - } - - function gcc.getcxxflags(cfg) - local shared_flags = config.mapFlags(cfg, gcc.shared) - local cxxflags = config.mapFlags(cfg, gcc.cxxflags) - local flags = table.join(shared_flags, cxxflags) - flags = table.join(flags, gcc.getwarnings(cfg)) - return flags - end - - --- --- Decorate defines for the GCC command line. --- - - function gcc.getdefines(defines) - local result = {} - for _, define in ipairs(defines) do - table.insert(result, '-D' .. p.esc(define)) - end - return result - end - - function gcc.getundefines(undefines) - local result = {} - for _, undefine in ipairs(undefines) do - table.insert(result, '-U' .. p.esc(undefine)) - end - return result - end - - --- --- Returns a list of forced include files, decorated for the compiler --- command line. --- --- @param cfg --- The project configuration. --- @return --- An array of force include files with the appropriate flags. --- - - function gcc.getforceincludes(cfg) - local result = {} - - table.foreachi(cfg.forceincludes, function(value) - local fn = project.getrelative(cfg.project, value) - table.insert(result, string.format('-include %s', p.quoted(fn))) - end) - - return result - end - - --- --- Decorate include file search paths for the GCC command line. --- - - function gcc.getincludedirs(cfg, dirs, sysdirs) - local result = {} - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-I' .. p.quoted(dir)) - end - for _, dir in ipairs(sysdirs or {}) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-isystem ' .. p.quoted(dir)) - end - return result - end - --- --- Return a list of decorated rpaths --- - - function gcc.getrunpathdirs(cfg, dirs) - local result = {} - - if not (table.contains(os.getSystemTags(cfg.system), "darwin") - or (cfg.system == p.LINUX)) then - return result - end - - local rpaths = {} - - -- User defined runpath search paths - for _, fullpath in ipairs(cfg.runpathdirs) do - local rpath = path.getrelative(cfg.buildtarget.directory, fullpath) - if not (table.contains(rpaths, rpath)) then - table.insert(rpaths, rpath) - end - end - - -- Automatically add linked shared libraries path relative to target directory - for _, sibling in ipairs(config.getlinks(cfg, "siblings", "object")) do - if (sibling.kind == p.SHAREDLIB) then - local fullpath = sibling.linktarget.directory - local rpath = path.getrelative(cfg.buildtarget.directory, fullpath) - if not (table.contains(rpaths, rpath)) then - table.insert(rpaths, rpath) - end - end - end - - for _, rpath in ipairs(rpaths) do - if table.contains(os.getSystemTags(cfg.system), "darwin") then - rpath = "@loader_path/" .. rpath - elseif (cfg.system == p.LINUX) then - rpath = iif(rpath == ".", "", "/" .. rpath) - rpath = "$$ORIGIN" .. rpath - end - - table.insert(result, "-Wl,-rpath,'" .. rpath .. "'") - end - - return result - end - --- --- get the right output flag. --- - function gcc.getsharedlibarg(cfg) - if table.contains(os.getSystemTags(cfg.system), "darwin") then - if cfg.sharedlibtype == "OSXBundle" then - return "-bundle" - elseif cfg.sharedlibtype == "XCTest" then - return "-bundle" - elseif cfg.sharedlibtype == "OSXFramework" then - return "-framework" - else - return "-dynamiclib" - end - else - return "-shared" - end - end - - --- --- Return a list of LDFLAGS for a specific configuration. --- - - function gcc.ldsymbols(cfg) - -- OS X has a bug, see http://lists.apple.com/archives/Darwin-dev/2006/Sep/msg00084.html - return iif(table.contains(os.getSystemTags(cfg.system), "darwin"), "-Wl,-x", "-s") - end - - gcc.ldflags = { - architecture = { - x86 = "-m32", - x86_64 = "-m64", - }, - flags = { - LinkTimeOptimization = "-flto", - }, - kind = { - SharedLib = function(cfg) - local r = { gcc.getsharedlibarg(cfg) } - if cfg.system == p.WINDOWS and not cfg.flags.NoImportLib then - table.insert(r, '-Wl,--out-implib="' .. cfg.linktarget.relpath .. '"') - elseif cfg.system == p.LINUX then - table.insert(r, '-Wl,-soname=' .. p.quoted(cfg.linktarget.name)) - elseif table.contains(os.getSystemTags(cfg.system), "darwin") then - table.insert(r, '-Wl,-install_name,' .. p.quoted('@rpath/' .. cfg.linktarget.name)) - end - return r - end, - WindowedApp = function(cfg) - if cfg.system == p.WINDOWS then return "-mwindows" end - end, - }, - system = { - wii = "$(MACHDEP)", - }, - symbols = { - Off = gcc.ldsymbols, - Default = gcc.ldsymbols, - } - } - - function gcc.getldflags(cfg) - local flags = config.mapFlags(cfg, gcc.ldflags) - return flags - end - - - --- --- Return a list of decorated additional libraries directories. --- - - gcc.libraryDirectories = { - architecture = { - x86 = function (cfg) - local r = {} - if not table.contains(os.getSystemTags(cfg.system), "darwin") then - table.insert (r, "-L/usr/lib32") - end - return r - end, - x86_64 = function (cfg) - local r = {} - if not table.contains(os.getSystemTags(cfg.system), "darwin") then - table.insert (r, "-L/usr/lib64") - end - return r - end, - }, - system = { - wii = "-L$(LIBOGC_LIB)", - } - } - - function gcc.getLibraryDirectories(cfg) - local flags = {} - - -- Scan the list of linked libraries. If any are referenced with - -- paths, add those to the list of library search paths. The call - -- config.getlinks() all includes cfg.libdirs. - for _, dir in ipairs(config.getlinks(cfg, "system", "directory")) do - table.insert(flags, '-L' .. p.quoted(dir)) - end - - if cfg.flags.RelativeLinks then - for _, dir in ipairs(config.getlinks(cfg, "siblings", "directory")) do - local libFlag = "-L" .. p.project.getrelative(cfg.project, dir) - if not table.contains(flags, libFlag) then - table.insert(flags, libFlag) - end - end - end - - for _, dir in ipairs(cfg.syslibdirs) do - table.insert(flags, '-L' .. p.quoted(dir)) - end - - local gccFlags = config.mapFlags(cfg, gcc.libraryDirectories) - flags = table.join(flags, gccFlags) - - return flags - end - - - --- --- Return the list of libraries to link, decorated with flags as needed. --- - - function gcc.getlinks(cfg, systemonly, nogroups) - local result = {} - - if not systemonly then - if cfg.flags.RelativeLinks then - local libFiles = config.getlinks(cfg, "siblings", "basename") - for _, link in ipairs(libFiles) do - if string.startswith(link, "lib") then - link = link:sub(4) - end - table.insert(result, "-l" .. link) - end - else - -- Don't use the -l form for sibling libraries, since they may have - -- custom prefixes or extensions that will confuse the linker. Instead - -- just list out the full relative path to the library. - result = config.getlinks(cfg, "siblings", "fullpath") - end - end - - -- The "-l" flag is fine for system libraries - local links = config.getlinks(cfg, "system", "fullpath") - local static_syslibs = {"-Wl,-Bstatic"} - local shared_syslibs = {} - - for _, link in ipairs(links) do - if path.isframework(link) then - table.insert(result, "-framework") - table.insert(result, path.getbasename(link)) - elseif path.isobjectfile(link) then - table.insert(result, link) - else - local endswith = function(s, ptrn) - return ptrn == string.sub(s, -string.len(ptrn)) - end - local name = path.getname(link) - -- Check whether link mode decorator is present - if endswith(name, ":static") then - name = string.sub(name, 0, -8) - table.insert(static_syslibs, "-l" .. name) - elseif endswith(name, ":shared") then - name = string.sub(name, 0, -8) - table.insert(shared_syslibs, "-l" .. name) - else - table.insert(shared_syslibs, "-l" .. name) - end - end - end - - local move = function(a1, a2) - local t = #a2 - for i = 1, #a1 do a2[t + i] = a1[i] end - end - if #static_syslibs > 1 then - table.insert(static_syslibs, "-Wl,-Bdynamic") - move(static_syslibs, result) - end - move(shared_syslibs, result) - - if not nogroups and #result > 1 and (cfg.linkgroups == p.ON) then - table.insert(result, 1, "-Wl,--start-group") - table.insert(result, "-Wl,--end-group") - end - - return result - end - - --- --- Returns makefile-specific configuration rules. --- - - gcc.makesettings = { - system = { - wii = [[ - ifeq ($(strip $(DEVKITPPC)),) - $(error "DEVKITPPC environment variable is not set")' - endif - include $(DEVKITPPC)/wii_rules']] - } - } - - function gcc.getmakesettings(cfg) - local settings = config.mapFlags(cfg, gcc.makesettings) - return table.concat(settings) - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "cc" for the C compiler, "cxx" for --- the C++ compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - gcc.tools = { - cc = "gcc", - cxx = "g++", - ar = "ar", - rc = "windres" - } - - function gcc.gettoolname(cfg, tool) - if (cfg.gccprefix and gcc.tools[tool]) or tool == "rc" then - return (cfg.gccprefix or "") .. gcc.tools[tool] - end - return nil - end diff --git a/build/premake/premake5/src/tools/mingw.lua b/build/premake/premake5/src/tools/mingw.lua deleted file mode 100644 index cb182d33bc..0000000000 --- a/build/premake/premake5/src/tools/mingw.lua +++ /dev/null @@ -1,8 +0,0 @@ --- --- mingw.lua --- MinGW toolset adapter for Premake --- Copyright (c) 2018 Jason Perkins and the Premake project --- - - local p = premake - p.tools.mingw = p.tools.gcc diff --git a/build/premake/premake5/src/tools/msc.lua b/build/premake/premake5/src/tools/msc.lua deleted file mode 100644 index 83a14f9af1..0000000000 --- a/build/premake/premake5/src/tools/msc.lua +++ /dev/null @@ -1,379 +0,0 @@ ---- --- msc.lua --- Interface for the MS C/C++ compiler. --- Author Jason Perkins --- Modified by Manu Evans --- Copyright (c) 2009-2015 Jason Perkins and the Premake project ---- - - - local p = premake - - p.tools.msc = {} - local msc = p.tools.msc - local project = p.project - local config = p.config - - --- --- Returns list of C preprocessor flags for a configuration. --- - - function msc.getcppflags(cfg) - return {} - end - - --- --- Returns list of C compiler flags for a configuration. --- - - msc.shared = { - clr = { - On = "/clr", - Unsafe = "/clr", - Pure = "/clr:pure", - Safe = "/clr:safe", - }, - flags = { - FatalCompileWarnings = "/WX", - MultiProcessorCompile = "/MP", - NoMinimalRebuild = "/Gm-", - OmitDefaultLibrary = "/Zl" - }, - floatingpoint = { - Fast = "/fp:fast", - Strict = "/fp:strict", - }, - floatingpointexceptions = { - On = "/fp:except", - Off = "/fp:except-", - }, - functionlevellinking = { - On = "/Gy", - Off = "/Gy-", - }, - callingconvention = { - Cdecl = "/Gd", - FastCall = "/Gr", - StdCall = "/Gz", - VectorCall = "/Gv", - }, - intrinsics = { - On = "/Oi", - }, - optimize = { - Off = "/Od", - On = "/Ot", - Debug = "/Od", - Full = "/Ox", - Size = "/O1", - Speed = "/O2", - }, - vectorextensions = { - AVX = "/arch:AVX", - AVX2 = "/arch:AVX2", - SSE = "/arch:SSE", - SSE2 = "/arch:SSE2", - SSE3 = "/arch:SSE2", - SSSE3 = "/arch:SSE2", - ["SSE4.1"] = "/arch:SSE2", - }, - warnings = { - Extra = "/W4", - High = "/W4", - Off = "/W0", - }, - staticruntime = { - -- this option must always be emit (does it??) - _ = function(cfg) return iif(config.isDebugBuild(cfg), "/MDd", "/MD") end, - -- runtime defaults to dynamic in VS - Default = function(cfg) return iif(config.isDebugBuild(cfg), "/MDd", "/MD") end, - On = function(cfg) return iif(config.isDebugBuild(cfg), "/MTd", "/MT") end, - Off = function(cfg) return iif(config.isDebugBuild(cfg), "/MDd", "/MD") end, - }, - stringpooling = { - On = "/GF", - Off = "/GF-", - }, - symbols = { - On = "/Z7" - }, - unsignedchar = { - On = "/J", - }, - omitframepointer = { - On = "/Oy" - } - - } - - msc.cflags = { - } - - function msc.getcflags(cfg) - local shared = config.mapFlags(cfg, msc.shared) - local cflags = config.mapFlags(cfg, msc.cflags) - local flags = table.join(shared, cflags, msc.getwarnings(cfg)) - return flags - end - - --- --- Returns list of C++ compiler flags for a configuration. --- - - msc.cxxflags = { - exceptionhandling = { - Default = "/EHsc", - On = "/EHsc", - SEH = "/EHa", - }, - rtti = { - Off = "/GR-" - } - } - - function msc.getcxxflags(cfg) - local shared = config.mapFlags(cfg, msc.shared) - local cxxflags = config.mapFlags(cfg, msc.cxxflags) - local flags = table.join(shared, cxxflags, msc.getwarnings(cfg)) - return flags - end - - --- --- Decorate defines for the MSVC command line. --- - - msc.defines = { - characterset = { - Default = { '/D"_UNICODE"', '/D"UNICODE"' }, - MBCS = '/D"_MBCS"', - Unicode = { '/D"_UNICODE"', '/D"UNICODE"' }, - ASCII = { }, - } - } - - function msc.getdefines(defines, cfg) - local result - - -- HACK: I need the cfg to tell what the character set defines should be. But - -- there's lots of legacy code using the old getdefines(defines) signature. - -- For now, detect one or two arguments and apply the right behavior; will fix - -- it properly when the I roll out the adapter overhaul - if cfg and defines then - result = config.mapFlags(cfg, msc.defines) - else - result = {} - end - - for _, define in ipairs(defines) do - table.insert(result, '/D"' .. define .. '"') - end - - if cfg and cfg.exceptionhandling == p.OFF then - table.insert(result, "/D_HAS_EXCEPTIONS=0") - end - - return result - end - - function msc.getundefines(undefines) - local result = {} - for _, undefine in ipairs(undefines) do - table.insert(result, '/U"' .. undefine .. '"') - end - return result - end - - --- --- Returns a list of forced include files, decorated for the compiler --- command line. --- --- @param cfg --- The project configuration. --- @return --- An array of force include files with the appropriate flags. --- - - function msc.getforceincludes(cfg) - local result = {} - - table.foreachi(cfg.forceincludes, function(value) - local fn = project.getrelative(cfg.project, value) - table.insert(result, "/FI" .. p.quoted(fn)) - end) - - return result - end - - function msc.getrunpathdirs() - return {} - end - --- --- Decorate include file search paths for the MSVC command line. --- - - function msc.getincludedirs(cfg, dirs, sysdirs) - local result = {} - dirs = table.join(dirs, sysdirs) - for _, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(result, '-I' .. p.quoted(dir)) - end - return result - end - - --- --- Return a list of linker flags for a specific configuration. --- - - msc.linkerFlags = { - flags = { - FatalLinkWarnings = "/WX", - LinkTimeOptimization = "/GL", - NoIncrementalLink = "/INCREMENTAL:NO", - NoManifest = "/MANIFEST:NO", - OmitDefaultLibrary = "/NODEFAULTLIB", - }, - kind = { - SharedLib = "/DLL", - }, - symbols = { - On = "/DEBUG" - } - } - - msc.librarianFlags = { - flags = { - FatalLinkWarnings = "/WX", - } - } - - function msc.getldflags(cfg) - local map = iif(cfg.kind ~= p.STATICLIB, msc.linkerFlags, msc.librarianFlags) - local flags = config.mapFlags(cfg, map) - table.insert(flags, 1, "/NOLOGO") - - -- Ignore default libraries - for i, ignore in ipairs(cfg.ignoredefaultlibraries) do - -- Add extension if required - if not msc.getLibraryExtensions()[ignore:match("[^.]+$")] then - ignore = path.appendextension(ignore, ".lib") - end - table.insert(flags, '/NODEFAULTLIB:' .. ignore) - end - - return flags - end - - --- --- Build a list of additional library directories for a particular --- project configuration, decorated for the tool command line. --- --- @param cfg --- The project configuration. --- @return --- An array of decorated additional library directories. --- - - function msc.getLibraryDirectories(cfg) - local flags = {} - local dirs = table.join(cfg.libdirs, cfg.syslibdirs) - for i, dir in ipairs(dirs) do - dir = project.getrelative(cfg.project, dir) - table.insert(flags, '/LIBPATH:"' .. dir .. '"') - end - return flags - end - - --- --- Return a list of valid library extensions --- - - function msc.getLibraryExtensions() - return { - ["lib"] = true, - ["obj"] = true, - } - end - --- --- Return the list of libraries to link, decorated with flags as needed. --- - - function msc.getlinks(cfg, systemonly, nogroups) - local links = {} - - -- If we need sibling projects to be listed explicitly, grab them first - if not systemonly then - links = config.getlinks(cfg, "siblings", "fullpath") - end - - -- Then the system libraries, which come undecorated - local system = config.getlinks(cfg, "system", "fullpath") - for i = 1, #system do - -- Add extension if required - local link = system[i] - if not p.tools.msc.getLibraryExtensions()[link:match("[^.]+$")] then - link = path.appendextension(link, ".lib") - end - - table.insert(links, link) - end - - return links - end - --- --- Returns makefile-specific configuration rules. --- - - function msc.getmakesettings(cfg) - return nil - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "cc" for the C compiler, "cxx" for --- the C++ compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - function msc.gettoolname(cfg, tool) - return nil - end - - - - function msc.getwarnings(cfg) - local result = {} - - for _, enable in ipairs(cfg.enablewarnings) do - table.insert(result, '/w1"' .. enable .. '"') - end - - for _, disable in ipairs(cfg.disablewarnings) do - table.insert(result, '/wd"' .. disable .. '"') - end - - for _, fatal in ipairs(cfg.fatalwarnings) do - table.insert(result, '/we"' .. fatal .. '"') - end - - return result - end diff --git a/build/premake/premake5/src/tools/snc.lua b/build/premake/premake5/src/tools/snc.lua deleted file mode 100644 index b1c8787a62..0000000000 --- a/build/premake/premake5/src/tools/snc.lua +++ /dev/null @@ -1,144 +0,0 @@ --- --- snc.lua --- Provides Sony SNC-specific configuration strings. --- Copyright (c) 2010-2016 Jason Perkins and the Premake project --- - - local p = premake - - p.tools.snc = {} - local snc = p.tools.snc - local gcc = p.tools.gcc - - --- --- Retrieve the CFLAGS for a specific configuration. --- - - snc.shared = { - flags = { - FatalCompileWarnings = "-Xquit=2", - }, - optimize = { - Off = "-O0", - On = "-O1", - Debug = "-Od", - Full = "-O3", - Size = "-Os", - Speed = "-O2", - }, - warnings = { - Extra = "-Xdiag=2", - } - } - - snc.cflags = { - } - - function snc.getcflags(cfg) - local shared = p.config.mapFlags(cfg, snc.shared) - local cflags = p.config.mapFlags(cfg, snc.cflags) - local flags = table.join(shared, cflags, snc.getwarnings(cfg)) - return flags - end - - --- --- Retrieve the CXXFLAGS for a specific configuration. --- - - snc.cxxflags = { - exceptionhandling = { - Default = "-Xc+=exceptions", - On = "-Xc+=exceptions", - SEH = "-Xc-=exceptions", - }, - rtti = { - Default = "-Xc+=rtti", - On = "-Xc+=rtti", - SEH = "-Xc-=rtti", - } - } - - function snc.getcxxflags(cfg) - local shared = config.mapFlags(cfg, snc.shared) - local cxxflags = config.mapFlags(cfg, snc.cxxflags) - local flags = table.join(shared, cxxflags, snc.getwarnings(cfg)) - return flags - end - - --- --- Returns a list of forced include files, decorated for the compiler --- command line. --- --- @param cfg --- The project configuration. --- @return --- An array of force include files with the appropriate flags. --- - - function snc.getforceincludes(cfg) - -- Just pass through to GCC for now - local flags = gcc.getforceincludes(cfg) - return flags - end - - --- --- Retrieve the LDFLAGS for a specific configuration. --- - - function snc.getldflags(cfg) - local flags = { } - - if not (cfg.symbols == p.ON) then - table.insert(flags, "-s") - end - - return flags - end - - --- --- These are the same as GCC --- - - snc.getcppflags = gcc.getcppflags - snc.getdefines = gcc.getdefines - snc.getincludedirs = gcc.getincludedirs - snc.getrunpathdirs = gcc.getrunpathdirs - snc.getLibraryDirectories = gcc.getLibraryDirectories - snc.getlinks = gcc.getlinks - - --- --- Returns makefile-specific configuration rules. --- - - function snc.getmakesettings(cfg) - return nil - end - - --- --- Retrieves the executable command name for a tool, based on the --- provided configuration and the operating environment. --- --- @param cfg --- The configuration to query. --- @param tool --- The tool to fetch, one of "cc" for the C compiler, "cxx" for --- the C++ compiler, or "ar" for the static linker. --- @return --- The executable command name for a tool, or nil if the system's --- default value should be used. --- - - snc.tools = { - } - - function snc.gettoolname(cfg, tool) - local names = snc.tools[cfg.architecture] or snc.tools[cfg.system] or {} - return names[tool] - end diff --git a/build/premake/premake5/tests/_tests.lua b/build/premake/premake5/tests/_tests.lua deleted file mode 100644 index 3b2e9d3efc..0000000000 --- a/build/premake/premake5/tests/_tests.lua +++ /dev/null @@ -1,65 +0,0 @@ -return { - -- Base API tests - "test_string.lua", - "base/test_aliasing.lua", - "base/test_binmodules.lua", - "base/test_configset.lua", - "base/test_context.lua", - "base/test_criteria.lua", - "base/test_detoken.lua", - "base/test_include.lua", - "base/test_module_loader.lua", - "base/test_option.lua", - "base/test_os.lua", - "base/test_override.lua", - "base/test_path.lua", - "base/test_premake_command.lua", - "base/test_table.lua", - "base/test_tree.lua", - "base/test_uuid.lua", - "base/test_versions.lua", - "base/test_http.lua", - "base/test_json.lua", - - -- Workspace object tests - "workspace/test_eachconfig.lua", - "workspace/test_location.lua", - "workspace/test_objdirs.lua", - - -- Project object tests - "project/test_config_maps.lua", - "project/test_eachconfig.lua", - "project/test_getconfig.lua", - "project/test_location.lua", - "project/test_sources.lua", - "project/test_vpaths.lua", - - -- Configuration object tests - "config/test_linkinfo.lua", - "config/test_links.lua", - "config/test_targetinfo.lua", - - -- Baking tests - "oven/test_filtering.lua", - "oven/test_objdirs.lua", - - -- API tests - "api/test_boolean_kind.lua", - "api/test_containers.lua", - "api/test_directory_kind.lua", - "api/test_list_kind.lua", - "api/test_path_kind.lua", - "api/test_register.lua", - "api/test_string_kind.lua", - "api/test_table_kind.lua", - "api/test_deprecations.lua", - - -- Control system tests - "test_premake.lua", - "base/test_validation.lua", - - -- -- Toolset tests - "tools/test_dotnet.lua", - "tools/test_gcc.lua", - "tools/test_msc.lua", -} diff --git a/build/premake/premake5/tests/api/test_boolean_kind.lua b/build/premake/premake5/tests/api/test_boolean_kind.lua deleted file mode 100644 index 7817876453..0000000000 --- a/build/premake/premake5/tests/api/test_boolean_kind.lua +++ /dev/null @@ -1,80 +0,0 @@ --- --- tests/api/test_boolean_kind.lua --- Tests the boolean API value type. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_boolean_kind") - local api = p.api - - --- --- Setup and teardown --- - - function suite.setup() - api.register { - name = "testapi", - kind = "boolean", - scope = "project", - } - test.createWorkspace() - end - - function suite.teardown() - testapi = nil - end - - - --- --- Check setting of true values. --- - - function suite.setsTrue_onYes() - testapi "yes" - test.istrue(api.scope.project.testapi) - end - - function suite.setsTrue_onBooleanTrue() - testapi (true) - test.istrue(api.scope.project.testapi) - end - - function suite.setsTrue_onNonZero() - testapi (1) - test.istrue(api.scope.project.testapi) - end - - --- --- Check setting of false values. --- - - function suite.setsFalse_onNo() - testapi "no" - test.isfalse(api.scope.project.testapi) - end - - function suite.setsFalse_onBooleanFalse() - testapi (false) - test.isfalse(api.scope.project.testapi) - end - - function suite.setsFalse_onZero() - testapi (0) - test.isfalse(api.scope.project.testapi) - end - - --- --- Raise an error on an invalid string value. --- - - function suite.raisesError_onDisallowedValue() - ok, err = pcall(function () - testapi "maybe" - end) - test.isfalse(ok) - end diff --git a/build/premake/premake5/tests/api/test_containers.lua b/build/premake/premake5/tests/api/test_containers.lua deleted file mode 100644 index eb500040b6..0000000000 --- a/build/premake/premake5/tests/api/test_containers.lua +++ /dev/null @@ -1,94 +0,0 @@ --- --- tests/api/test_containers.lua --- Tests the API's workspace() and project() container definitions. --- Copyright (c) 2013-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_containers") - local api = p.api - - --- --- Setup and teardown --- - - local wks - - function suite.setup() - wks = workspace("MyWorkspace") - end - - --- --- The first time a name is encountered, a new container should be created. --- - - function suite.workspace_createsOnFirstUse() - test.isnotnil(p.global.getWorkspace("MyWorkspace")) - end - - function suite.project_createsOnFirstUse() - project("MyProject") - test.isnotnil(test.getproject(wks, "MyProject")) - end - - --- --- When a container is created, it should become the active scope. --- - - function suite.workspace_setsActiveScope() - test.issame(api.scope.workspace, wks) - end - - function suite.project_setsActiveScope() - local prj = project("MyProject") - test.issame(api.scope.project, prj) - end - - --- --- When container function is called with no arguments, that should --- become the current scope. --- - - function suite.workspace_setsActiveScope_onNoArgs() - project("MyProject") - group("MyGroup") - workspace() - test.issame(wks, api.scope.workspace) - test.isnil(api.scope.project) - test.isnil(api.scope.group) - end - - function suite.project_setsActiveScope_onNoArgs() - local prj = project("MyProject") - group("MyGroup") - project() - test.issame(prj, api.scope.project) - end - - --- --- The "*" name should activate the parent scope. --- - - function suite.workspace_onStar() - project("MyProject") - group("MyGroup") - filter("Debug") - workspace("*") - test.isnil(api.scope.workspace) - test.isnil(api.scope.project) - test.isnil(api.scope.group) - end - - function suite.project_onStar() - project("MyProject") - group("MyGroup") - filter("Debug") - project "*" - test.issame(wks, api.scope.workspace) - test.isnil(api.scope.project) - end diff --git a/build/premake/premake5/tests/api/test_deprecations.lua b/build/premake/premake5/tests/api/test_deprecations.lua deleted file mode 100644 index 4a129e48c0..0000000000 --- a/build/premake/premake5/tests/api/test_deprecations.lua +++ /dev/null @@ -1,66 +0,0 @@ --- --- tests/api/test_table_kind.lua --- Tests the table API value type. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_deprecations") - local api = p.api - - - function suite.setup() - workspace("MyWorkspace") - configurations { "Debug", "Release" } - end - - function suite.setsNewValue_whenOldValueIsRemovedViaWildcard_inSubConfig() - local prj = project "MyProject" - filter { "configurations:Debug" } - flags { "Symbols" } - - filter { "*" } - removeflags { "*" } - - -- test output. - local cfg = test.getconfig(prj, "Debug", platform) - test.isequal("Default", cfg.Symbols) - end - - - function suite.setsNewValue_whenOldValueIsRemovedInOtherConfig_inSubConfig() - local prj = project "MyProject" - flags { "Symbols" } - - filter { "configurations:Release" } - removeflags { "*" } - - -- test output. - test.isequal("On", test.getconfig(prj, "Debug", platform).Symbols) - test.isequal("Default", test.getconfig(prj, "Release", platform).Symbols) - end - - - function suite.dontRemoveFlagIfSetThroughNewApi() - local prj = project "MyProject" - floatingpoint "Fast" - removeflags "*" - - -- test output. - local cfg = test.getconfig(prj, "Debug", platform) - test.isequal("Fast", cfg.floatingpoint) - end - - - function suite.setsNewValue_whenOldValueFromParentIsRemovedInOtherConfig_inSubConfig() - flags { "Symbols" } - - local prj = project "MyProject" - filter { "configurations:Release" } - removeflags { "*" } - - -- test output. - test.isequal("On", test.getconfig(prj, "Debug", platform).Symbols) - test.isequal("Default", test.getconfig(prj, "Release", platform).Symbols) - end - diff --git a/build/premake/premake5/tests/api/test_directory_kind.lua b/build/premake/premake5/tests/api/test_directory_kind.lua deleted file mode 100644 index 383ad0a17b..0000000000 --- a/build/premake/premake5/tests/api/test_directory_kind.lua +++ /dev/null @@ -1,49 +0,0 @@ --- --- tests/api/test_directory_kind.lua --- Tests the directory API value type. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_directory_kind") - local api = p.api - - --- --- Setup and teardown --- - - function suite.setup() - api.register { - name = "testapi", - kind = "directory", - list = true, - scope = "project" - } - test.createWorkspace() - end - - function suite.teardown() - testapi = nil - end - - --- --- Values should be converted to absolute paths, relative to --- the currently running script. --- - - function suite.convertsToAbsolute() - testapi "self/local" - test.isequal({os.getcwd() .. "/self/local"}, api.scope.project.testapi) - end - - --- --- Check expansion of wildcards. --- - - function suite.expandsWildcards() - testapi (_TESTS_DIR .. "/*") - test.istrue(table.contains(api.scope.project.testapi, _TESTS_DIR .. "/api")) - end diff --git a/build/premake/premake5/tests/api/test_list_kind.lua b/build/premake/premake5/tests/api/test_list_kind.lua deleted file mode 100644 index e60218cb95..0000000000 --- a/build/premake/premake5/tests/api/test_list_kind.lua +++ /dev/null @@ -1,86 +0,0 @@ --- --- tests/api/test_list_kind.lua --- Tests the list API value type. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_list_kind") - local api = p.api - - --- --- Setup and teardown --- - - function suite.setup() - api.register { - name = "testapi", - kind = "string", - list = true, - scope = "project", - allowed = { "first", "second", "third" } - } - test.createWorkspace() - end - - function suite.teardown() - testapi = nil - end - - --- --- Table values should be stored as-is. --- - - function suite.storesTable_onArrayValue() - testapi { "first", "second" } - test.isequal({ "first", "second" }, api.scope.project.testapi) - end - - --- --- String values should be converted into a table. --- - - function suite.storesTable_onStringValue() - testapi "first" - test.isequal({ "first" }, api.scope.project.testapi) - end - - --- --- New values should be appended to any previous values. --- - - function suite.overwrites_onNewValue() - testapi "first" - testapi "second" - test.isequal({ "first", "second" }, api.scope.project.testapi) - end - - --- --- Nested lists should be flattened. --- - - function suite.flattensValues_onNestedLists() - testapi { { "first" }, { "second" } } - test.isequal({ "first", "second" }, api.scope.project.testapi) - end - --- --- If an allowed values list is present, make sure it gets applied. --- - - function suite.raisesError_onDisallowedValue() - ok, err = pcall(function () - testapi "NotAllowed" - end) - test.isfalse(ok) - end - - function suite.convertsCase_onAllowedValue() - testapi "seCOnd" - test.isequal({ "second" }, api.scope.project.testapi) - end diff --git a/build/premake/premake5/tests/api/test_path_kind.lua b/build/premake/premake5/tests/api/test_path_kind.lua deleted file mode 100644 index 9d99c5cdf4..0000000000 --- a/build/premake/premake5/tests/api/test_path_kind.lua +++ /dev/null @@ -1,38 +0,0 @@ --- --- tests/api/test_path_kind.lua --- Tests the path API value type. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_path_kind") - local api = p.api - - --- --- Setup and teardown --- - - function suite.setup() - api.register { - name = "testapi", - kind = "path", - scope = "project" - } - test.createWorkspace() - end - - function suite.teardown() - testapi = nil - end - - --- --- Values should be converted to absolute paths, relative to --- the currently running script. --- - - function suite.convertsToAbsolute() - testapi "self/local.h" - test.isequal(os.getcwd() .. "/self/local.h", api.scope.project.testapi) - end diff --git a/build/premake/premake5/tests/api/test_register.lua b/build/premake/premake5/tests/api/test_register.lua deleted file mode 100644 index 28ac9c4cbf..0000000000 --- a/build/premake/premake5/tests/api/test_register.lua +++ /dev/null @@ -1,88 +0,0 @@ --- --- tests/api/test_register.lua --- Tests the new API registration function. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_register") - local api = p.api - - --- --- Setup and teardown --- - - function suite.teardown() - testapi = nil - end - - - --- --- Verify that the function exists. --- - - function suite.registerFunctionExists() - test.isequal("function", type(p.api.register)) - end - - --- --- When called, a new function with with provided name should --- added to the global namespace. --- - - function suite.createsNewGlobalFunction() - api.register { name = "testapi", kind = "string", scope = "project" } - test.isequal("function", type(testapi)); - end - - --- --- Verify that an error is raised if no name is provided. --- - - function suite.raisesError_onMissingName() - ok, err = pcall(function () - api.register { kind = "string", scope = "project" } - end) - test.isfalse(ok) - end - - --- --- Verify that an error is raised if the name is already in use. --- - - function suite.raisesError_onExistingGlobalName() - testapi = "testapi" - ok, err = pcall(function () - api.register { name = "testapi", kind = "string", scope = "project" } - end) - test.isfalse(ok) - end - - --- --- Verify that an error is raised if an invalid kind is used. --- - - function suite.raisesError_onInvalidKind() - ok, err = pcall(function () - api.register { name = "testapi", kind = "bogus", scope = "project" } - end) - test.isfalse(ok) - end - - --- --- Verify that key-value forms are accepted. --- - - function suite.succeeds_onKeyValueForm() - ok, err = pcall(function () - api.register { name = "testapi", kind = "string", keyed = true, scope = "project" } - end) - test.istrue(ok) - end diff --git a/build/premake/premake5/tests/api/test_string_kind.lua b/build/premake/premake5/tests/api/test_string_kind.lua deleted file mode 100644 index e6714fedb9..0000000000 --- a/build/premake/premake5/tests/api/test_string_kind.lua +++ /dev/null @@ -1,85 +0,0 @@ --- --- tests/api/test_string_kind.lua --- Tests the string API value type. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_string_kind") - local api = p.api - - --- --- Setup and teardown --- - - function suite.setup() - api.register { - name = "testapi", - kind = "string", - scope = "project", - allowed = { "One", "Two", "Three" }, - } - test.createWorkspace() - end - - function suite.teardown() - testapi = nil - end - - --- --- String values should be stored as-is. --- - - function suite.storesString_onStringValue() - testapi "One" - test.isequal("One", api.scope.project.testapi) - end - - --- --- New values should overwrite old ones. --- - - function suite.overwritesPreviousValues() - testapi "One" - testapi "Two" - test.isequal("Two", api.scope.project.testapi) - end - - --- --- An error occurs if a table value is assigned to a string field. --- - - function suite.raisesError_onTableValue() - ok, err = pcall(function () - testapi { "One", "Two" } - end) - test.isfalse(ok) - end - - --- --- Raises an error on a disallowed value. --- - - function suite.raisesError_onDisallowedValue() - ok, err = pcall(function () - testapi "NotAllowed" - end) - test.isfalse(ok) - end - - --- --- If allowed values present, converts to provided case. --- - - function suite.convertsCase_onAllowedValue() - testapi "oNe" - test.isequal("One", api.scope.project.testapi) - end - - diff --git a/build/premake/premake5/tests/api/test_table_kind.lua b/build/premake/premake5/tests/api/test_table_kind.lua deleted file mode 100644 index 8a4b30aa67..0000000000 --- a/build/premake/premake5/tests/api/test_table_kind.lua +++ /dev/null @@ -1,54 +0,0 @@ --- --- tests/api/test_table_kind.lua --- Tests the table API value type. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("api_table_kind") - local api = p.api - - --- --- Setup and teardown --- - - function suite.setup() - api.register { name = "testapi", kind = "table", scope = "project" } - test.createWorkspace() - end - - function suite.teardown() - testapi = nil - end - - --- --- Array values should be stored as-is. --- - - function suite.storesTable_onArrayValue() - testapi { "one", "two" } - test.isequal({ "one", "two" }, api.scope.project.testapi) - end - - --- --- String values should be converted into a table. --- - - function suite.storesTable_onStringValue() - testapi "myvalue" - test.isequal({ "myvalue" }, api.scope.project.testapi) - end - - --- --- New values should overwrite old. --- - - function suite.overwrites_onNewValue() - testapi "first" - testapi "second" - test.isequal({ "second" }, api.scope.project.testapi) - end diff --git a/build/premake/premake5/tests/base/.testDotFile b/build/premake/premake5/tests/base/.testDotFile deleted file mode 100644 index b9928548e5..0000000000 --- a/build/premake/premake5/tests/base/.testDotFile +++ /dev/null @@ -1 +0,0 @@ -This is a test file for os.matchfiles tests. diff --git a/build/premake/premake5/tests/base/test_aliasing.lua b/build/premake/premake5/tests/base/test_aliasing.lua deleted file mode 100644 index 712df9854a..0000000000 --- a/build/premake/premake5/tests/base/test_aliasing.lua +++ /dev/null @@ -1,65 +0,0 @@ --- --- tests/base/test_aliasing.lua --- Verify handling of function aliases. --- Copyright (c) 2015 Jason Perkins and the Premake project --- - - local suite = test.declare("premake_alias") - local m = {} - - local p = premake - - - function suite.setup() - m.testfunc = function() - return 48 - end - m.aliased = nil - m.aliased2 = nil - end - - - function suite.returnsOriginalFunction_onNoAlias() - local scope, f = p.resolveAlias(m, "testfunc") - test.isequal("testfunc", f) - end - - - function suite.pointsAliasToOriginalFunction() - p.alias(m, "testfunc", "aliased") - test.isequal(48, m.aliased()) - end - - - function suite.returnsOriginalFunction_onAlias() - p.alias(m, "testfunc", "aliased") - local scope, f = p.resolveAlias(m, "aliased") - test.isequal("testfunc", f) - end - - - function suite.returnsOriginalFunction_onChainedAliases() - p.alias(m, "testfunc", "aliased") - p.alias(m, "aliased", "aliased2") - local scope, f = p.resolveAlias(m, "aliased2") - test.isequal("testfunc", f) - end - - - function suite.overrideResolvesAliases() - p.alias(m, "testfunc", "aliased") - p.override(m, "aliased", function(base) - return base() + 1 - end) - test.isequal(49, m.testfunc()) - end - - - function suite.aliasTracksOverrides() - p.alias(m, "testfunc", "aliased") - p.override(m, "testfunc", function(base) - return base() + 1 - end) - test.isequal(49, m.aliased()) - end - diff --git a/build/premake/premake5/tests/base/test_binmodules.lua b/build/premake/premake5/tests/base/test_binmodules.lua deleted file mode 100644 index 04dcef5422..0000000000 --- a/build/premake/premake5/tests/base/test_binmodules.lua +++ /dev/null @@ -1,19 +0,0 @@ --- --- tests/base/test_binmodules.lua --- Verify handling of binary modules. --- Copyright (c) 2017 Tom van Dijck and the Premake project --- - - local suite = test.declare("premake_binmodules") - local p = premake - - - function suite.setup() - require("example") - end - - - function suite.testExample() - local result = example.test("world") - test.isequal("hello world", result) - end diff --git a/build/premake/premake5/tests/base/test_configset.lua b/build/premake/premake5/tests/base/test_configset.lua deleted file mode 100644 index 6c92c31dee..0000000000 --- a/build/premake/premake5/tests/base/test_configset.lua +++ /dev/null @@ -1,261 +0,0 @@ --- --- tests/base/test_configset.lua --- Test suite for the configset API. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("configset") - local configset = p.configset - local field = p.field - - --- --- Setup and teardown --- - - local cset, parentset - - function suite.setup() - local wks = test.createWorkspace() - parentset = configset.new() - cset = configset.new(parentset) - end - - - --- --- Make sure that new() returns a valid object. --- - - function suite.new_returnsValidObject() - test.isequal("table", type(cset)) - end - - - --- --- Check the default values for different field types. --- - - function suite.defaultValue_onString() - test.isnil(configset.fetch(cset, field.get("targetextension"))) - end - - function suite.defaultValue_onList() - test.isequal({}, configset.fetch(cset, field.get("defines"))) - end - - - --- --- Make sure that I can roundtrip a value stored into the --- initial, default configuration. --- - - function suite.canRoundtrip_onDefaultBlock() - local f = field.get("targetextension") - configset.store(cset, f, ".so") - test.isequal(".so", configset.fetch(cset, f, {})) - end - - - --- --- Make sure that I can roundtrip a value stored into a block --- with a simple matching term. --- - - function suite.canRoundtrip_onSimpleTermMatch() - local f = field.get("targetextension") - configset.addblock(cset, { "Windows" }) - configset.store(cset, f, ".dll") - test.isequal(".dll", configset.fetch(cset, f, { "windows" })) - end - - --- --- Make sure that blocks that do not match the context terms --- do not contribute to the result. --- - - function suite.skipsBlock_onTermMismatch() - local f = field.get("targetextension") - configset.store(cset, f, ".so") - configset.addblock(cset, { "Windows" }) - configset.store(cset, f, ".dll") - test.isequal(".so", configset.fetch(cset, f, { "linux" })) - end - - --- --- Values stored in a parent configuration set should propagate into child. --- - - function suite.canRoundtrip_fromParentToChild() - local f = field.get("targetextension") - configset.store(parentset, f, ".so") - test.isequal(".so", configset.fetch(cset, f, {})) - end - - --- --- Child should be able to override parent values. --- - - function suite.child_canOverrideStringValueFromParent() - local f = field.get("targetextension") - configset.store(parentset, f, ".so") - configset.store(cset, f, ".dll") - test.isequal(".dll", configset.fetch(cset, f, {})) - end - - --- --- If a base directory is set, filename tests should be performed --- relative to this path. --- - - function suite.filenameMadeRelative_onBaseDirSet() - local f = field.get("buildaction") - configset.addblock(cset, { "hello.c" }, os.getcwd()) - configset.store(cset, f, "Copy") - test.isequal("Copy", configset.fetch(cset, f, { files=path.join(os.getcwd(), "hello.c"):lower() })) - end - - --- --- List fields should return an empty list of not set. --- - - function suite.lists_returnsEmptyTable_onNotSet() - test.isequal({}, configset.fetch(cset, field.get("buildoptions"), {})) - end - - --- --- List fields should merge values fetched from different blocks. --- - - function suite.lists_mergeValues_onFetch() - local f = field.get("buildoptions") - configset.store(cset, f, "v1") - configset.addblock(cset, { "windows" }) - configset.store(cset, f, "v2") - test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"windows"})) - end - - --- --- Multiple adds to a list field in the same block should be merged together. --- - - function suite.lists_mergeValues_onAdd() - local f = field.get("buildoptions") - configset.store(cset, f, "v1") - configset.store(cset, f, "v2") - test.isequal({"v1", "v2"}, configset.fetch(cset, f, {"windows"})) - end - - --- --- Fetched lists should be both keyed and indexed. --- - - function suite.lists_includeValueKeys() - local f = field.get("buildoptions") - configset.store(cset, f, { "v1", "v2" }) - local x = configset.fetch(cset, f, {}) - test.isequal("v2", x.v2) - end - - --- --- Check removing a value with an exact match. --- - - function suite.remove_onExactValueMatch() - local f = field.get("flags") - - local r, err = configset.store(cset, f, { "Symbols", "WinMain", "MFC" }) - test.isnil(err) - - configset.remove(cset, f, { "WinMain" }) - - local result = configset.fetch(cset, f) - test.isequal({ "Symbols", "MFC" }, result) - end - - - function suite.remove_onMultipleValues() - local f = field.get("flags") - - local r, err = configset.store(cset, f, { "Symbols", "Maps", "WinMain", "MFC" }) - test.isnil(err) - - configset.remove(cset, f, { "Maps", "MFC" }) - - local result = configset.fetch(cset, f) - test.isequal({ "Symbols", "WinMain" }, result) - end - - --- --- Remove should also accept wildcards. --- - - function suite.remove_onWildcard() - local f = field.get("defines") - configset.store(cset, f, { "WIN32", "WIN64", "LINUX", "MACOSX" }) - configset.remove(cset, f, { "WIN*" }) - test.isequal({ "LINUX", "MACOSX" }, configset.fetch(cset, f, {})) - end - - --- --- Keyed values should merge keys fetched from different blocks. --- - - function suite.keyed_mergesKeys_onFetch() - local f = field.get("configmap") - configset.store(cset, f, { Debug="Debug", Release="Release" }) - configset.addblock(cset, { "windows" }) - configset.store(cset, f, { Profile="Profile" }) - local x = configset.fetch(cset, f, {"windows"}) - test.istrue(x[1].Debug and x[1].Release and x[2].Profile) - end - - --- --- Multiple adds to a keyed value field in the same block should be merged. --- - - function suite.keyed_mergesKeys_onAdd() - local f = field.get("configmap") - configset.store(cset, f, { Debug="Debug", Release="Release" }) - configset.store(cset, f, { Profile="Profile" }) - local x = configset.fetch(cset, f, {"windows"}) - test.istrue(x[1].Debug and x[1].Release and x[2].Profile) - end - - --- --- Keyed values should overwrite when non-merged fields are fetched. --- - - function suite.keyed_overwritesValues_onNonMergeFetch() - local f = field.get("configmap") - configset.store(cset, f, { Debug="Debug" }) - configset.addblock(cset, { "windows" }) - configset.store(cset, f, { Debug="Development" }) - local x = configset.fetch(cset, f, {"windows"}) - test.isequal({"Development"}, x[2].Debug) - end - - function suite.keyed_overwritesValues_onNonMergeAdd() - local f = field.get("configmap") - configset.store(cset, f, { Debug="Debug" }) - configset.store(cset, f, { Debug="Development" }) - local x = configset.fetch(cset, f, {"windows"}) - test.isequal({"Development"}, x[2].Debug) - end diff --git a/build/premake/premake5/tests/base/test_context.lua b/build/premake/premake5/tests/base/test_context.lua deleted file mode 100644 index 6e98ed42a0..0000000000 --- a/build/premake/premake5/tests/base/test_context.lua +++ /dev/null @@ -1,113 +0,0 @@ --- --- tests/base/test_context.lua --- Test suite for the configuration context API. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("context") - local context = p.context - local configset = p.configset - local field = p.field - - --- --- Setup and teardown --- - - local ctx, cset - - function suite.setup() - cset = configset.new() - ctx = context.new(cset) - end - - --- --- Make sure that new() returns a valid object. --- - - function suite.new_returnsValidObject() - test.isequal("table", type(ctx)) - end - - --- --- Context should be able to retrieve a default value from --- the configuration set, using the field name. --- - - function suite.returnsConfigValue_onExistingValue() - configset.store(cset, field.get("targetextension"), ".so") - test.isequal(".so", ctx.targetextension) - end - - --- --- Tokens encountered in enabled fields should be expanded. --- - - function suite.doesExpandTokens() - configset.store(cset, field.get("targetname"), "MyProject%{1 + 1}") - test.isequal("MyProject2", ctx.targetname) - end - - --- --- Token environment in extended context overrides context. --- - - function suite.extent() - -- set in toplevel context. - configset.store(cset, field.get("targetname"), "%{value}") - - -- detoken in toplevel context should result in empty string. - test.isequal("", ctx.targetname) - - -- create an extended context with a local environ. - local environ = { - value = "text" - } - local ext = context.extent(ctx, environ) - - -- detoken in extended context should result in value set in that environ. - test.isequal("text", ext.targetname) - end - --- --- mergeFilters should behave as expected for tags --- - - function suite.mergeFilters() - - ctx = { terms = { tags = { "ctxtags" } } } - src = { terms = { tags = { "srctags" } } } - - context.mergeFilters(ctx, src) - - result = { terms = { tags = { "ctxtags", "srctags" } } } - - test.isequal(result, ctx) - end - - function suite.mergeFilters_keeptype() - - ctx = { terms = { kind = "ConsoleApp" } } - src = { terms = { kind = "ConsoleApp" } } - - context.mergeFilters(ctx, src) - - test.isequal("string", type(ctx.terms.kind)) - end - - function suite.mergeFilters_createtable() - - ctx = { terms = { tags = "ctxtags" } } - src = { terms = { tags = "srctags" } } - - context.mergeFilters(ctx, src) - - result = { terms = { tags = { "ctxtags", "srctags" } } } - - test.isequal(result, ctx) - end diff --git a/build/premake/premake5/tests/base/test_criteria.lua b/build/premake/premake5/tests/base/test_criteria.lua deleted file mode 100644 index 2992b85e72..0000000000 --- a/build/premake/premake5/tests/base/test_criteria.lua +++ /dev/null @@ -1,362 +0,0 @@ --- --- tests/base/test_criteria.lua --- Test suite for the criteria matching API. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("criteria") - local criteria = p.criteria - - --- --- Setup and teardown --- - - local crit - - --- --- A criteria with no terms should satisfy any context. --- - - function suite.matches_alwaysTrue_onNoFilterTerms() - crit = criteria.new {} - test.istrue(criteria.matches(crit, { configurations="Debug", system="Windows" })) - end - - --- --- Should not match if any term is missing in the context. --- - - function suite.matches_fails_onMissingContext() - crit = criteria.new { "system:Windows", "architecture:x86" } - test.isfalse(criteria.matches(crit, { configurations="Debug", system="Windows" })) - end - - --- --- Context terms must match the entire criteria term. --- - - function suite.matches_fails_onIncompleteTermMatch() - crit = criteria.new { "platforms:win64" } - test.isfalse(criteria.matches(crit, { platforms="win64 dll dcrt" })) - end - - --- --- Wildcard matches should work. --- - - function suite.matches_passes_onPatternMatch() - crit = criteria.new { "action:vs*" } - test.istrue(criteria.matches(crit, { action="vs2005" })) - end - - --- --- The "not" modifier should fail the test if the term is matched. --- - - function suite.matches_fails_onMatchWithNotModifier_afterPrefix() - crit = criteria.new { "system:not windows" } - test.isfalse(criteria.matches(crit, { system="windows" })) - end - - function suite.matches_fails_onMatchWithNotModifier_beforePrefix() - crit = criteria.new { "not system:windows" } - test.isfalse(criteria.matches(crit, { system="windows" })) - end - - function suite.matches_passes_onMissWithNotModifier_afterPrefix() - crit = criteria.new { "system:not windows" } - test.istrue(criteria.matches(crit, { system="linux" })) - end - - function suite.matches_passes_onMissWithNotModifier_beforePrefix() - crit = criteria.new { "not system:windows" } - test.istrue(criteria.matches(crit, { system="linux" })) - end - - function suite.matches_passes_onMissWithNotModifier_noPrefix() - crit = criteria.new { "not debug" } - test.istrue(criteria.matches(crit, { configurations="release" })) - end - - --- --- The "or" modifier should pass if either term is present. --- - - function suite.matches_passes_onFirstOrTermMatched() - crit = criteria.new { "system:windows or linux" } - test.istrue(criteria.matches(crit, { system="windows" })) - end - - function suite.matches_passes_onSecondOrTermMatched() - crit = criteria.new { "system:windows or linux" } - test.istrue(criteria.matches(crit, { system="linux" })) - end - - function suite.matches_passes_onThirdOrTermMatched() - crit = criteria.new { "system:windows or linux or vs2005" } - test.istrue(criteria.matches(crit, { system="vs2005" })) - end - - function suite.matches_fails_onNoOrTermMatched() - crit = criteria.new { "system:windows or linux" } - test.isfalse(criteria.matches(crit, { system="vs2005" })) - end - - function suite.matches_passes_onMixedPrefixes_firstTermMatched_projectContext() - crit = criteria.new { "system:windows or files:core*" } - test.istrue(criteria.matches(crit, { system="windows" })) - end - - function suite.matches_fails_onMixedPrefixes_firstTermMatched_fileContext() - crit = criteria.new { "system:windows or files:core*" } - test.isfalse(criteria.matches(crit, { system="windows", files="hello.cpp" })) - end - - function suite.matches_passes_onMixedPrefixes_secondTermMatched() - crit = criteria.new { "system:windows or files:core*" } - test.istrue(criteria.matches(crit, { system="linux", files="coregraphics.cpp" })) - end - - function suite.matches_fails_onMixedPrefixes_noTermMatched() - crit = criteria.new { "system:windows or files:core*" } - test.isfalse(criteria.matches(crit, { system="linux", files="hello.cpp" })) - end - - --- --- The "not" modifier should fail on any match with an "or" modifier. --- - - function suite.matches_passes_onNotOrMatchesFirst() - crit = criteria.new { "system:not windows or linux" } - test.isfalse(criteria.matches(crit, { system="windows" })) - end - - function suite.matches_passes_onNotOrMatchesSecond() - crit = criteria.new { "system:windows or not linux" } - test.isfalse(criteria.matches(crit, { system="linux" })) - end - - --- --- The "not" modifier should succeed with "or" if there are no matches. --- - - function suite.matches_passes_onNoNotMatch() - crit = criteria.new { "system:not windows or linux" } - test.istrue(criteria.matches(crit, { system="macosx" })) - end - - --- --- If the context specifies a filename, the filter must match it explicitly. --- - - function suite.matches_passes_onFilenameAndMatchingPattern() - crit = criteria.new { "files:**.c", "system:windows" } - test.istrue(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - function suite.matches_fails_onFilenameAndNoMatchingPattern() - crit = criteria.new { "system:windows" } - test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - --- --- Test criteria creation through a table. --- - - function suite.createCriteriaWithTable() - crit = criteria.new { - files = { "**.c" }, - system = "windows" - } - test.istrue(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - function suite.createCriteriaWithTable2() - crit = criteria.new { - system = "not windows" - } - test.isfalse(criteria.matches(crit, { system="windows" })) - end - - function suite.createCriteriaWithTable3() - crit = criteria.new { - system = "not windows or linux" - } - test.istrue(criteria.matches(crit, { system="macosx" })) - end - - function suite.createCriteriaWithTable4() - crit = criteria.new { - system = "windows or linux" - } - test.istrue(criteria.matches(crit, { system="windows" })) - end - - --- --- "Not" modifiers can also be used on filenames. --- - - function suite.matches_passes_onFilenameMissAndNotModifier() - crit = criteria.new { "files:not **.c", "system:windows" } - test.istrue(criteria.matches(crit, { system="windows", files="hello.h" })) - end - - function suite.matches_fails_onFilenameHitAndNotModifier() - crit = criteria.new { "files:not **.c", "system:windows" } - test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - --- --- If context provides a list of values, match against them. --- - - function suite.matches_passes_termMatchesList() - crit = criteria.new { "options:debug" } - test.istrue(criteria.matches(crit, { options={ "debug", "logging" }})) - end - - --- --- If no prefix is specified, default to "configurations". --- - - function suite.matches_usesDefaultPrefix_onSingleTerm() - crit = criteria.new { "debug" } - test.istrue(criteria.matches(crit, { configurations="debug" })) - end - - - --- --- These tests use the older, unprefixed style of filter terms. This --- approach will get phased out eventually, but are still included here --- for backward compatibility testing. --- - - function suite.matches_onEmptyCriteria_Unprefixed() - crit = criteria.new({}, true) - test.istrue(criteria.matches(crit, { "apple", "orange" })) - end - - function suite.fails_onMissingContext_Unprefixed() - crit = criteria.new({ "orange", "pear" }, true) - test.isfalse(criteria.matches(crit, { "apple", "orange" })) - end - - function suite.fails_onIncompleteMatch_Unprefixed() - crit = criteria.new({ "win64" }, true) - test.isfalse(criteria.matches(crit, { "win64 dll dcrt" })) - end - - function suite.passes_onPatternMatch_Unprefixed() - crit = criteria.new({ "vs*" }, true) - test.istrue(criteria.matches(crit, { "vs2005" })) - end - - function suite.fails_onNotMatch_Unprefixed() - crit = criteria.new({ "not windows" }, true) - test.isfalse(criteria.matches(crit, { "windows" })) - end - - function suite.passes_onNotUnmatched_Unprefixed() - crit = criteria.new({ "not windows" }, true) - test.istrue(criteria.matches(crit, { "linux" })) - end - - function suite.passes_onFirstOrTermMatched_Unprefixed() - crit = criteria.new({ "windows or linux" }, true) - test.istrue(criteria.matches(crit, { "windows" })) - end - - function suite.passes_onSecondOrTermMatched_Unprefixed() - crit = criteria.new({ "windows or linux" }, true) - test.istrue(criteria.matches(crit, { "linux" })) - end - - function suite.passes_onThirdOrTermMatched_Unprefixed() - crit = criteria.new({ "windows or linux or vs2005" }, true) - test.istrue(criteria.matches(crit, { "vs2005" })) - end - - function suite.fails_onNoOrTermMatched_Unprefixed() - crit = criteria.new({ "windows or linux" }, true) - test.isfalse(criteria.matches(crit, { "vs2005" })) - end - - function suite.passes_onNotOrMatchesFirst_Unprefixed() - crit = criteria.new({ "not windows or linux" }, true) - test.isfalse(criteria.matches(crit, { "windows" })) - end - - function suite.passes_onNotOrMatchesSecond_Unprefixed() - crit = criteria.new({ "windows or not linux" }, true) - test.isfalse(criteria.matches(crit, { "linux" })) - end - - function suite.passes_onNoNotMatch_Unprefixed() - crit = criteria.new({ "not windows or linux" }, true) - test.istrue(criteria.matches(crit, { "macosx" })) - end - - function suite.passes_onFilenameAndMatchingPattern_Unprefixed() - crit = criteria.new({ "**.c", "windows" }, true) - test.istrue(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - function suite.fails_onFilenameAndNoMatchingPattern_Unprefixed() - crit = criteria.new({ "windows" }, true) - test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - function suite.fails_onFilenameAndNotModifier_Unprefixed() - crit = criteria.new({ "not linux" }, true) - test.isfalse(criteria.matches(crit, { system="windows", files="hello.c" })) - end - - function suite.matches_passes_termMatchesList_Unprefixed() - crit = criteria.new({ "debug" }, true) - test.istrue(criteria.matches(crit, { options={ "debug", "logging" }})) - end - - --- --- Should return nil and an error message on an invalid prefix. --- - - function suite.returnsNilAndError_onInvalidPrefix() - crit, err = criteria.new { "gibble:Debug" } - test.isnil(crit) - test.isnotnil(err) - end - - --- --- Should respect field value aliases, if present. --- - - function suite.passes_onAliasedValue() - p.api.addAliases("system", { ["gnu-linux"] = "linux" }) - crit = criteria.new { "system:gnu-linux" } - test.istrue(criteria.matches(crit, { system="linux" })) - end - - function suite.passes_onAliasedValue_withMixedCase() - p.api.addAliases("system", { ["gnu-linux"] = "linux" }) - crit = criteria.new { "System:GNU-Linux" } - test.istrue(criteria.matches(crit, { system="linux" })) - end - diff --git a/build/premake/premake5/tests/base/test_detoken.lua b/build/premake/premake5/tests/base/test_detoken.lua deleted file mode 100644 index ac641715dc..0000000000 --- a/build/premake/premake5/tests/base/test_detoken.lua +++ /dev/null @@ -1,170 +0,0 @@ --- --- tests/base/test_detoken.lua --- Test suite for the token expansion API. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("detoken") - local detoken = p.detoken - - --- --- Setup --- - - local x, action - local environ = {} - - function suite.setup() - action = p.action.get("test") - end - - function suite.teardown() - action.pathVars = nil - end - - - --- --- The contents of the token should be executed and the results returned. --- - - function suite.executesTokenContents() - x = detoken.expand("MyProject%{1+1}", environ) - test.isequal("MyProject2", x) - end - - --- --- If the value contains more than one token, then should all be expanded. --- - - function suite.expandsMultipleTokens() - x = detoken.expand("MyProject%{'X'}and%{'Y'}and%{'Z'}", environ) - test.isequal("MyProjectXandYandZ", x) - end - - --- --- If the token replacement values contain tokens themselves, those --- should also get expanded. --- - - function suite.expandsNestedTokens() - environ.wks = { name="MyWorkspace%{'X'}" } - x = detoken.expand("%{wks.name}", environ) - test.isequal("MyWorkspaceX", x) - end - - --- --- Verify that the global namespace is still accessible. --- - - function suite.canUseGlobalFunctions() - x = detoken.expand("%{iif(true, 'a', 'b')}", environ) - test.isequal("a", x) - end - - --- --- If a path field contains a token, and if that token expands to an --- absolute path itself, that should be returned as the new value. --- - - function suite.canExpandToAbsPath() - environ.cfg = { basedir = os.getcwd() } - x = detoken.expand("bin/debug/%{cfg.basedir}", environ, {paths=true}) - test.isequal(os.getcwd(), x) - end - - --- --- If a non-path field contains a token that expands to a path, that --- path should be converted to a relative value. --- - - function suite.canExpandToRelPath() - local cwd = os.getcwd() - environ.cfg = { basedir = path.getdirectory(cwd) } - x = detoken.expand("cd %{cfg.basedir}", environ, {}, cwd) - test.isequal("cd ..", x) - end - --- --- but not if it is prefixed with a ! --- - - function suite.canExpandWithExclamationMark() - local cwd = os.getcwd() - environ.cfg = { basedir = path.getdirectory(cwd) } - x = detoken.expand("%{!cfg.basedir}", environ, {}, cwd) - test.isequal(path.getdirectory(os.getcwd()), x) - end - - --- --- If a path field contains a token that expands to a deferred join, --- it should be resolved before performing detoken. --- - - function suite.canExpandWithDeferredJoin() - local cwd = os.getcwd() - x = detoken.expand(path.deferredjoin(os.getcwd(), "%{_ACTION}"), environ, {}, cwd) - test.isequal(os.getcwd() .. "/test", x) - end - - --- --- If the value being expanded is a table, iterate over all of its values. --- - - function suite.expandsAllItemsInList() - x = detoken.expand({ "A%{1}", "B%{2}", "C%{3}" }, environ) - test.isequal({ "A1", "B2", "C3" }, x) - end - - --- --- If the field being expanded supports path variable mapping, and the --- action provides a map, replace tokens with the mapped values. --- - - function suite.replacesToken_onSupportedAndMapped() - action.pathVars = { ["cfg.objdir"] = { absolute = true, token = "$(IntDir)" }, } - x = detoken.expand("cmd %{cfg.objdir}/file", environ, {pathVars=true}) - test.isequal("cmd $(IntDir)/file", x) - end - - function suite.replacesToken_onSupportedAndMapped_inAbsPath() - action.pathVars = { ["cfg.objdir"] = { absolute = true, token = "$(IntDir)" }, } - x = detoken.expand(os.getcwd() .. "/%{cfg.objdir}/file", environ, {paths=true,pathVars=true}) - test.isequal("$(IntDir)/file", x) - end - - function suite.replacesToken_onSupportedAndMapped_inRelPath() - action.pathVars = { ["cfg.objdir"] = { absolute = false, token = "$(IntDir)" }, } - x = detoken.expand(os.getcwd() .. "/%{cfg.objdir}/file", environ, {paths=true,pathVars=true}) - test.isequal(os.getcwd() .. "/$(IntDir)/file", x) - end - --- --- Escapes backslashes correctly. --- - - function suite.escapesBackslashes() - environ.foo = "some/path" - x = detoken.expand("%{foo:gsub('/', '\\')}", environ) - test.isequal("some\\path", x) - end - --- --- Escapes backslashes correctly, but not outside tokens. --- - - function suite.escapesBackslashes2() - environ.foo = "some/path" - x = detoken.expand("%{foo:gsub('/', '\\')}\\already\\escaped", environ) - test.isequal("some\\path\\already\\escaped", x) - end diff --git a/build/premake/premake5/tests/base/test_filename.lua b/build/premake/premake5/tests/base/test_filename.lua deleted file mode 100644 index f6009b7d23..0000000000 --- a/build/premake/premake5/tests/base/test_filename.lua +++ /dev/null @@ -1,99 +0,0 @@ --- --- tests/base/test_filename.lua --- Verify generation of project/workspace/rule filenames. --- Copyright (c) 2008-2014 Jason Perkins and the Premake project --- - - local suite = test.declare("project_filename") - - local p = premake - - - --- --- Setup --- - - local wks - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - end - - --- --- Should return name as an absolute path. --- - - function suite.isAbsolutePath() - prepare() - test.isequal(os.getcwd(), path.getdirectory(p.filename(prj))) - end - - --- --- Should use the project name, if no filename was specified. --- - - function suite.isProjectName_onNoFilename() - prepare() - test.isequal("MyProject", path.getname(p.filename(prj))) - end - - --- --- Should use filename, if set via API. --- - - function suite.doesUseFilename() - filename "Howdy" - prepare() - test.isequal("Howdy", path.getname(p.filename(prj))) - end - - --- --- Appends file extension, if supplied. --- - - function suite.doesUseExtension() - prepare() - test.isequal(".xc", path.getextension(p.filename(prj, ".xc"))) - end - - --- --- Should also work with workspaces. --- - - function suite.worksWithWorkspace() - prepare() - test.isequal("MyWorkspace", path.getname(p.filename(wks))) - end - - --- --- Value should not propagate down to projects. --- - - function suite.doesNotPropagate() - workspace ("MyWorkspace") - filename ("Howdy") - prepare() - test.isequal("MyProject", path.getname(p.filename(prj))) - end - - --- --- If extension is provided without a leading dot, it should override any --- project filename. --- - - function suite.canOverrideFilename() - prepare() - test.isequal("Makefile", path.getname(p.filename(prj, "Makefile"))) - end diff --git a/build/premake/premake5/tests/base/test_http.lua b/build/premake/premake5/tests/base/test_http.lua deleted file mode 100644 index e20580f03b..0000000000 --- a/build/premake/premake5/tests/base/test_http.lua +++ /dev/null @@ -1,80 +0,0 @@ --- --- tests/base/test_http.lua --- Tests the http API --- Copyright (c) 2016 Jason Perkins and the Premake project --- - - local p = premake - - -- only declare the suite as a test if http.get is an existing method. - local suite = {} - if http.get ~= nil then - suite = test.declare("premake_http") - end - - function suite.http_get() - local result, err = http.get("http://httpbin.org/user-agent") - if result then - p.out(result) - test.capture( - '{"user-agent": "Premake/' .. _PREMAKE_VERSION .. '"}' - ) - else - test.fail(err); - end - end - - function suite.https_get() - -- sslverifypeer = 0, so we can test from within companies like here at Blizzard where all HTTPS traffic goes through - -- some strange black box that re-signs all traffic with a custom ssl certificate. - local result, err = http.get("https://httpbin.org/user-agent", { sslverifypeer = 0 }) - if result then - p.out(result) - test.capture( - '{"user-agent": "Premake/' .. _PREMAKE_VERSION .. '"}' - ) - else - test.fail(err); - end - end - - function suite.https_get_verify_peer() - local result, err = http.get("https://httpbin.org/user-agent") - if result then - p.out(result) - test.capture( - '{"user-agent": "Premake/' .. _PREMAKE_VERSION .. '"}' - ) - else - test.fail(err); - end - end - - function suite.http_responsecode() - local result, err, responseCode = http.get("http://httpbin.org/status/418") - test.isequal(responseCode, 418) - end - - function suite.http_redirect() - local result, err, responseCode = http.get("http://httpbin.org/redirect/3") - if result then - test.isequal(responseCode, 200) - else - test.fail(err); - end - end - - function suite.http_headers() - local result, err, responseCode = http.get("http://httpbin.org/headers", { - headers = { 'X-Premake: premake' } - }) - - if result then - if (not result:find('X-Premake')) then - test.fail("response doens't contain header") - test.print(result) - end - else - test.fail(err); - end - end diff --git a/build/premake/premake5/tests/base/test_include.lua b/build/premake/premake5/tests/base/test_include.lua deleted file mode 100644 index 42b1ce6d85..0000000000 --- a/build/premake/premake5/tests/base/test_include.lua +++ /dev/null @@ -1,67 +0,0 @@ --- --- tests/base/test_include.lua --- Test the include() function, for including external scripts --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - - local p = premake - local suite = test.declare("include") - - --- --- Setup and teardown --- - - function suite.teardown() - -- clear the list of included files after each run - io._includedFiles = { } - end - - --- --- Tests --- - - function suite.include_findsPremakeFile_onFolderNameOnly() - include (_TESTS_DIR .. "/folder") - test.isequal("ok", p.captured()) - end - - - function suite.include_onExactFilename() - include (_TESTS_DIR .. "/folder/premake5.lua") - test.isequal("ok", p.captured()) - end - - - function suite.include_runsOnlyOnce_onMultipleIncludes() - include (_TESTS_DIR .. "/folder/premake5.lua") - include (_TESTS_DIR .. "/folder/premake5.lua") - test.isequal("ok", p.captured()) - end - - - function suite.include_runsOnlyOnce_onMultipleIncludesWithDifferentPaths() - include (_TESTS_DIR .. "/folder/premake5.lua") - include (_TESTS_DIR .. "/../tests/folder/premake5.lua") - test.isequal("ok", p.captured()) - end - - function suite.includeexternal_runs() - includeexternal (_TESTS_DIR .. "/folder/premake5.lua") - test.isequal("ok", p.captured()) - end - - function suite.includeexternal_runsAfterInclude() - include (_TESTS_DIR .. "/folder/premake5.lua") - includeexternal (_TESTS_DIR .. "/folder/premake5.lua") - test.isequal("okok", p.captured()) - end - - function suite.includeexternal_runsTwiceAfterInclude() - include (_TESTS_DIR .. "/folder/premake5.lua") - includeexternal (_TESTS_DIR .. "/folder/premake5.lua") - includeexternal (_TESTS_DIR .. "/folder/premake5.lua") - test.isequal("okokok", p.captured()) - end diff --git a/build/premake/premake5/tests/base/test_json.lua b/build/premake/premake5/tests/base/test_json.lua deleted file mode 100644 index abc71bdce1..0000000000 --- a/build/premake/premake5/tests/base/test_json.lua +++ /dev/null @@ -1,32 +0,0 @@ --- --- tests/base/test_json.lua --- Tests the json API --- Copyright (c) 2017 Jason Perkins and the Premake project --- - - local p = premake - - local suite = test.declare("premake_json") - - function suite.json_encode() - local result = json.encode({foo = "bar"}) - result = result:gsub('%s*', ''), - test.isequal(result, '{"foo":"bar"}') - end - - function suite.json_decode() - local result = json.decode('{ "foo": "bar" }') - test.isequal(result, { foo = "bar" }) - end - - function suite.json_encode_error() - local result, err = json.encode({ fubar = function() end }) - test.isnil(result) - test.isequal(type(err), "string") - end - - function suite.json_decode_error() - local result, err = json.decode("fubar string") - test.isnil(result) - test.isequal(type(err), "string") - end diff --git a/build/premake/premake5/tests/base/test_module_loader.lua b/build/premake/premake5/tests/base/test_module_loader.lua deleted file mode 100644 index db61fd640c..0000000000 --- a/build/premake/premake5/tests/base/test_module_loader.lua +++ /dev/null @@ -1,38 +0,0 @@ --- --- tests/base/test_module_loader.lua --- Test the custom module loader. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("module_loader") - --- --- Setup --- - - local loaderIndex - - function suite.setup() - table.insert(package.searchers, function (name) - p.out(name) - return load("") - end) - loaderIndex = #package.searchers - end - - function suite.teardown() - table.remove(package.searchers, loaderIndex) - end - --- --- Check that premake's module loader let other loaders try --- when it cannot find a module. --- - - function suite.letOtherLoadersTry() - require("foo") - test.capture [[ -foo - ]] - end diff --git a/build/premake/premake5/tests/base/test_option.lua b/build/premake/premake5/tests/base/test_option.lua deleted file mode 100644 index c3181839c2..0000000000 --- a/build/premake/premake5/tests/base/test_option.lua +++ /dev/null @@ -1,45 +0,0 @@ --- --- tests/base/test_option.lua --- Verify the handling of command line options and the _OPTIONS table. --- Copyright (c) 2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("base_option") - - --- --- Setup and teardown. --- - - function suite.setup() - _OPTIONS["testopt"] = "testopt" - end - - function suite.teardown() - _OPTIONS["testopt"] = nil - end - - --- --- Because we can't control how the user will type in options on the --- command line, all key lookups should be case insensitive. --- - - function suite.returnsCorrectOption_onMixedCase() - test.isnotnil(_OPTIONS["TestOpt"]) - end - --- --- Because we can't control how the user will type in options in the --- premake script, keys should be stored in lowercase. --- - - function suite.storesOptionCorrectly_onMixedCase() - newoption { - trigger = "TestOpt2", - description = "Testing", - } - - test.isnotnil(p.option.get("testopt2")) - end diff --git a/build/premake/premake5/tests/base/test_os.lua b/build/premake/premake5/tests/base/test_os.lua deleted file mode 100644 index 95502e8600..0000000000 --- a/build/premake/premake5/tests/base/test_os.lua +++ /dev/null @@ -1,452 +0,0 @@ ---- --- tests/base/test_os.lua --- Automated test suite for the new OS functions. --- Copyright (c) 2008-2017 Jason Perkins and the Premake project ---- - - local suite = test.declare("base_os") - - local cwd - - function suite.setup() - cwd = os.getcwd() - os.chdir(_TESTS_DIR) - end - - function suite.teardown() - os.chdir(cwd) - end - - --- --- os.findlib() tests --- - - function suite.findlib_FindSystemLib() - if os.istarget("windows") then - test.istrue(os.findlib("user32")) - elseif os.istarget("haiku") then - test.istrue(os.findlib("root")) - else - test.istrue(os.findlib("m")) - end - end - - function suite.findlib_FailsOnBadLibName() - test.isfalse(os.findlib("NoSuchLibraryAsThisOneHere")) - end - - function suite.findheader_stdheaders() - if not os.istarget("windows") and not os.istarget("macosx") then - test.istrue(os.findheader("stdlib.h")) - end - end - - function suite.findheader_failure() - test.isfalse(os.findheader("Knights/who/say/Ni.hpp")) - end - - --- --- os.isfile() tests --- - - function suite.isfile_ReturnsTrue_OnExistingFile() - test.istrue(os.isfile("_tests.lua")) - end - - function suite.isfile_ReturnsFalse_OnNonexistantFile() - test.isfalse(os.isfile("no_such_file.lua")) - end - - - --- --- os.matchdirs() tests --- - - function suite.matchdirs_skipsDottedDirs() - local result = os.matchdirs("*") - test.isfalse(table.contains(result, "..")) - end - - - --- --- os.matchfiles() tests --- - - function suite.matchfiles_OnNonRecursive() - local result = os.matchfiles("*.lua") - test.istrue(table.contains(result, "_tests.lua")) - test.isfalse(table.contains(result, "folder/ok.lua")) - end - - function suite.matchfiles_Recursive() - local result = os.matchfiles("**.lua") - test.istrue(table.contains(result, "folder/ok.lua")) - end - - function suite.matchfiles_SkipsDotDirs_OnRecursive() - local result = os.matchfiles("**.lua") - test.isfalse(table.contains(result, ".svn/text-base/testfx.lua.svn-base")) - end - - function suite.matchfiles_OnSubfolderMatch() - local result = os.matchfiles("**/subfolder/*") - test.istrue(table.contains(result, "folder/subfolder/hello.txt")) - test.isfalse(table.contains(result, "premake4.lua")) - end - - function suite.matchfiles_OnDotSlashPrefix() - local result = os.matchfiles("./**.lua") - test.istrue(table.contains(result, "folder/ok.lua")) - end - - function suite.matchfiles_OnImplicitEndOfString() - local result = os.matchfiles("folder/*.lua") - test.istrue(table.contains(result, "folder/ok.lua")) - test.isfalse(table.contains(result, "folder/ok.lua.2")) - end - - function suite.matchfiles_OnLeadingDotSlashWithPath() - local result = os.matchfiles("./folder/*.lua") - test.istrue(table.contains(result, "folder/ok.lua")) - end - - function suite.matchfiles_OnDottedFile() - local result = os.matchfiles("base/.*") - test.istrue(table.contains(result, "base/.testDotFile")) - end - - function suite.matchfiles_onComboSearch() - local result = os.matchfiles("folder/**/*.txt") - test.istrue(table.contains(result, "folder/subfolder/hello.txt")) - end - - --- --- os.pathsearch() tests --- - - function suite.pathsearch_ReturnsNil_OnNotFound() - test.istrue(os.pathsearch("nosuchfile", "aaa;bbb;ccc") == nil) - end - - function suite.pathsearch_ReturnsPath_OnFound() - test.isequal(_TESTS_DIR, os.pathsearch("_tests.lua", _TESTS_DIR)) - end - - function suite.pathsearch_FindsFile_OnComplexPath() - test.isequal(_TESTS_DIR, os.pathsearch("_tests.lua", "aaa;" .. _TESTS_DIR .. ";bbb")) - end - - function suite.pathsearch_NilPathsAllowed() - test.isequal(_TESTS_DIR, os.pathsearch("_tests.lua", nil, _TESTS_DIR, nil)) - end - - --- --- os.outputof() tests --- - - -- Check if outputof returns the command exit code - -- in addition of the command output - function suite.outputof_commandExitCode() - if os.istarget("macosx") - or os.istarget("linux") - or os.istarget("solaris") - or os.istarget("bsd") - then - -- Assumes 'true' and 'false' commands exist - -- which should be the case on all *nix platforms - for cmd, exitcode in pairs ({ - ["true"] = 0, - ["false"] = 1 - }) - do - local o, e = os.outputof(cmd) - test.isequal(e, exitcode) - end - end - end - - --- --- os.translateCommand() tests --- - - function suite.translateCommand_onNoToken() - test.isequal("cp a b", os.translateCommands("cp a b")) - end - - function suite.translateCommand_callsProcessor() - os.commandTokens.test = { - copy = function(value) return "test " .. value end - } - test.isequal("test a b", os.translateCommands("{COPY} a b", "test")) - end - - function suite.translateCommand_callsProcessor_multipleTokens() - os.commandTokens.test = { - copy = function(value) return "test " .. value end - } - test.isequal("test a b; test c d; test e f;", os.translateCommands("{COPY} a b; {COPY} c d; {COPY} e f;", "test")) - end - --- --- os.translateCommand() windows COPY tests --- - - function suite.translateCommand_windowsCopyNoDst() - test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a', "windows")) - end - - function suite.translateCommand_windowsCopyNoDst_ExtraSpace() - test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a > nul) ELSE (xcopy /Q /Y /I a > nul)', os.translateCommands('{COPY} a ', "windows")) - end - - function suite.translateCommand_windowsCopyNoQuotes() - test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b', "windows")) - end - - function suite.translateCommand_windowsCopyNoQuotes_ExtraSpace() - test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a b > nul) ELSE (xcopy /Q /Y /I a b > nul)', os.translateCommands('{COPY} a b ', "windows")) - end - - function suite.translateCommand_windowsCopyQuotes() - test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b"', "windows")) - end - - function suite.translateCommand_windowsCopyQuotes_ExtraSpace() - test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" "b" > nul) ELSE (xcopy /Q /Y /I "a a" "b" > nul)', os.translateCommands('{COPY} "a a" "b" ', "windows")) - end - - function suite.translateCommand_windowsCopyNoQuotesDst() - test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b', "windows")) - end - - function suite.translateCommand_windowsCopyNoQuotesDst_ExtraSpace() - test.isequal('IF EXIST "a a"\\ (xcopy /Q /E /Y /I "a a" b > nul) ELSE (xcopy /Q /Y /I "a a" b > nul)', os.translateCommands('{COPY} "a a" b ', "windows")) - end - - function suite.translateCommand_windowsCopyNoQuotesSrc() - test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b"', "windows")) - end - - function suite.translateCommand_windowsCopyNoQuotesSrc_ExtraSpace() - test.isequal('IF EXIST a\\ (xcopy /Q /E /Y /I a "b" > nul) ELSE (xcopy /Q /Y /I a "b" > nul)', os.translateCommands('{COPY} a "b" ', "windows")) - end - --- --- os.getWindowsRegistry windows tests --- - function suite.getreg_nonExistentValue() - if os.ishost("windows") then - local x = os.getWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All") - test.isequal(nil, x) - end - end - - function suite.getreg_nonExistentDefaultValue() - if os.ishost("windows") then - local x = os.getWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All\\") - test.isequal(nil, x) - end - end - - function suite.getreg_noSeparators() - if os.ishost("windows") then - local x = os.getWindowsRegistry("HKCU:ShouldNotExistAtAll") - test.isequal(nil, x) - end - end - - function suite.getreg_namedValue() - if os.ishost("windows") then - local x = os.getWindowsRegistry("HKCU:Environment\\TEMP") - test.istrue(x ~= nil) - end - end - - function suite.getreg_namedValueOptSeparator() - if os.ishost("windows") then - local x = os.getWindowsRegistry("HKCU:\\Environment\\TEMP") - test.istrue(x ~= nil) - end - end - - function suite.getreg_defaultValue() - if os.ishost("windows") then - local x = os.getWindowsRegistry("HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppInfo\\") - test.isequal("Service", x) - end - end - - --- --- os.listWindowsRegistry windows tests --- - function suite.listreg_nonExistentKey() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All") - test.isequal(nil, x) - end - end - - function suite.listreg_nonExistentKeyTrailingBackslash() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKCU:Should\\Not\\Exist\\At\\All\\") - test.isequal(nil, x) - end - end - - function suite.listreg_noSeparators() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKCU:ShouldNotExistAtAll") - test.isequal(nil, x) - end - end - - function suite.listreg_noSeparatorExistingPath() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKCU:Environment") - test.istrue(x ~= nil and x["TEMP"] ~= nil) - end - end - - function suite.listreg_optSeparators() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKCU:\\Environment\\") - test.istrue(x ~= nil and x["TEMP"] ~= nil) - end - end - - function suite.listreg_keyDefaultValueAndStringValueFormat() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKLM:SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppInfo") - test.isequal(x[""]["value"], "Service") - test.isequal(x[""]["type"], "REG_SZ") - end - end - - function suite.listreg_numericValueFormat() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKCU:Console") - test.isequal(type(x["FullScreen"]["value"]), "number") - test.isequal(x["FullScreen"]["type"], "REG_DWORD") - end - end - - function suite.listreg_subkeyFormat() - if os.ishost("windows") then - local x = os.listWindowsRegistry("HKLM:") - test.isequal(type(x["SOFTWARE"]), "table") - test.isequal(next(x["SOFTWARE"]), nil) - end - end - --- --- os.getversion tests. --- - - function suite.getversion() - local version = os.getversion(); - test.istrue(version ~= nil) - end - - - --- --- os.translateCommandsAndPaths. --- - - function suite.translateCommandsAndPaths() - test.isequal('cmdtool "../foo/path1"', os.translateCommandsAndPaths("cmdtool %[path1]", '../foo', '.', 'osx')) - end - - function suite.translateCommandsAndPaths_PreserveSlash() - test.isequal('cmdtool "../foo/path1/"', os.translateCommandsAndPaths("cmdtool %[path1/]", '../foo', '.', 'osx')) - end - - function suite.translateCommandsAndPaths_MultipleTokens() - test.isequal('cmdtool "../foo/path1" "../foo/path2/"', os.translateCommandsAndPaths("cmdtool %[path1] %[path2/]", '../foo', '.', 'osx')) - end - - --- --- Helpers --- - - local tmpname = function() - local p = os.tmpname() - os.remove(p) -- just needed on POSIX - return p - end - - local tmpfile = function() - local p = tmpname() - if os.ishost("windows") then - os.execute("type nul >" .. p) - else - os.execute("touch " .. p) - end - return p - end - - local tmpdir = function() - local p = tmpname() - os.mkdir(p) - return p - end - - --- --- os.remove() tests. --- - - function suite.remove_ReturnsError_OnNonExistingPath() - local ok, err, exitcode = os.remove(tmpname()) - test.isnil(ok) - test.isequal("string", type(err)) - test.isequal("number", type(exitcode)) - test.istrue(0 ~= exitcode) - end - - function suite.remove_ReturnsError_OnDirectory() - local ok, err, exitcode = os.remove(tmpdir()) - test.isnil(ok) - test.isequal("string", type(err)) - test.isequal("number", type(exitcode)) - test.istrue(0 ~= exitcode) - end - - function suite.remove_ReturnsTrue_OnFile() - local ok, err, exitcode = os.remove(tmpfile()) - test.isequal(true, ok) - test.isnil(err) - test.isnil(exitcode) - end - - --- --- os.rmdir() tests. --- - - function suite.rmdir_ReturnsError_OnNonExistingPath() - local ok, err = os.rmdir(tmpname()) - test.isnil(ok) - test.isequal("string", type(err)) - end - - function suite.rmdir_ReturnsError_OnFile() - local ok, err = os.rmdir(tmpfile()) - test.isnil(ok) - test.isequal("string", type(err)) - end - - function suite.rmdir_ReturnsTrue_OnDirectory() - local ok, err = os.rmdir(tmpdir()) - test.isequal(true, ok) - test.isnil(err) - end diff --git a/build/premake/premake5/tests/base/test_override.lua b/build/premake/premake5/tests/base/test_override.lua deleted file mode 100644 index 284af3301b..0000000000 --- a/build/premake/premake5/tests/base/test_override.lua +++ /dev/null @@ -1,75 +0,0 @@ --- --- tests/base/test_override.lua --- Verify function override support. --- Copyright (c) 2012 Jason Perkins and the Premake project --- - - - local p = premake - local suite = test.declare("base_override") - - --- --- Setup --- - - local X = {} - - function suite.setup() - X.testfunc = function(value) - return value or "testfunc" - end - end - - --- --- Should be able to completely replace the function with one of my own. --- - - function suite.canOverride() - p.override(X, "testfunc", function() - return "canOverride" - end) - test.isequal("canOverride", X.testfunc()) - end - - --- --- Should be able to reference the original implementation. --- - - function suite.canCallOriginal() - p.override(X, "testfunc", function(base) - return "canOverride > " .. base() - end) - test.isequal("canOverride > testfunc", X.testfunc()) - end - - --- --- Arguments should pass through. --- - - function suite.canPassThroughArguments() - p.override(X, "testfunc", function(base, value) - return value .. " > " .. base() - end) - test.isequal("testval > testfunc", X.testfunc("testval")) - end - - --- --- Can override the same function multiple times. --- - - function suite.canOverrideMultipleTimes() - p.override(X, "testfunc", function(base, value) - return string.format("[%s > %s]", value, base("base1")) - end) - - p.override(X, "testfunc", function(base, value) - return string.format("{%s > %s}", value, base("base2")) - end) - - test.isequal("{base3 > [base2 > base1]}", X.testfunc("base3")) - end diff --git a/build/premake/premake5/tests/base/test_path.lua b/build/premake/premake5/tests/base/test_path.lua deleted file mode 100755 index 123df4be70..0000000000 --- a/build/premake/premake5/tests/base/test_path.lua +++ /dev/null @@ -1,789 +0,0 @@ --- --- tests/base/test_path.lua --- Automated test suite for the action list. --- Copyright (c) 2008-2013 Jason Perkins and the Premake project --- - - local suite = test.declare("path") - - --- --- path.getabsolute() tests --- - - function suite.getabsolute_worksWithMissingSubdirs() - local expected = os.getcwd() .. "/a/b/c" - test.isequal(expected, path.getabsolute("a/b/c")) - end - - function suite.getabsolute_removesDotDots_onWindows() - test.isequal("c:/ProjectB/bin", path.getabsolute("c:/ProjectA/../ProjectB/bin")) - end - - function suite.getabsolute_removesDotDots_OnPosix() - test.isequal("/ProjectB/bin", path.getabsolute("/ProjectA/../ProjectB/bin")) - end - - function suite.getabsolute_limitsDotDots_onWindows() - test.isequal("c:/ProjectB/bin", path.getabsolute("c:/ProjectA/../../ProjectB/bin")) - end - - function suite.getabsolute_limitsDotDots_OnPosix() - test.isequal("/ProjectB/bin", path.getabsolute("/ProjectA/../../ProjectB/bin")) - end - - function suite.getabsolute_removesDot() - test.isequal("/ProjectA/ProjectB/bin", path.getabsolute("/ProjectA/./ProjectB/bin")) - end - - function suite.getabsolute_removesTrailingSlash() - test.isequal("/a/b/c", path.getabsolute("/a/b/c/")) - end - - function suite.getabsolute_onLeadingEnvVar() - test.isequal("$(HOME)/user", path.getabsolute("$(HOME)/user")) - end - - function suite.getabsolute_onLeadingEnvVar_dosStyle() - test.isequal("%HOME%/user", path.getabsolute("%HOME%/user")) - end - - function suite.getabsolute_onServerPath() - test.isequal("//Server/Volume", path.getabsolute("//Server/Volume")) - end - - function suite.getabsolute_onMultipleEnvVar() - test.isequal("$(HOME)/$(USER)", path.getabsolute("$(HOME)/$(USER)")) - end - - function suite.getabsolute_onTrailingEnvVar() - test.isequal("/home/$(USER)", path.getabsolute("/home/$(USER)")) - end - - function suite.getabsolute_onLeadingEnvVarQuoted() - test.isequal('"$(HOME)/user"', path.getabsolute('"$(HOME)/user"')) - end - - function suite.getabsolute_normalizesPaths() - test.isequal("c:/ProjectB/bin", path.getabsolute("c:\\ProjectB\\bin")) - end - - function suite.getabsolute_acceptsTables() - test.isequal({ "/a/b", "/c/d" }, path.getabsolute({ "/a/b", "/c/d" })) - end - - function suite.getabsolute_withRelativeTo() - local relto = path.getdirectory(os.getcwd()) - local expected = relto .. "/a/b/c" - test.isequal(expected, path.getabsolute("a/b/c", relto)) - end - - function suite.getabsolute_withRelativeTo_withTrailingSlashes() - local relto = path.getdirectory(os.getcwd()) - local expected = relto .. "/a/b/c" - test.isequal(expected, path.getabsolute("a/b/c", relto .. "/")) - end - - function suite.getabsolute_acceptsTables_withRelativeTo() - local relto = path.getdirectory(os.getcwd()) - test.isequal({ relto .. "/a/b", relto .. "/c/d" }, path.getabsolute({ "a/b", "c/d" }, relto)) - end - - function suite.getabsolute_leavesDotDot_onShellVar() - test.isequal("$ORIGIN/../libs", path.getabsolute("$ORIGIN/../libs")) - end - - function suite.getabsolute_leavesDotDot2_onShellVar() - test.isequal("$ORIGIN/../../libs", path.getabsolute("$ORIGIN/../../libs")) - end - --- --- path.deferred_join() tests --- - function suite.deferred_join_OnMaybeAbsolutePath() - test.isequal("p1\a%{foo}", path.deferredjoin("p1", "%{foo}")) - end - - function suite.deferred_join_OnValidParts() - test.isequal("p1/p2", path.deferredjoin("p1", "p2")) - end - - function suite.deferred_join_OnAbsoluteath() - test.isequal("/p2", path.deferredjoin("p1", "/p2")) - end - --- --- path.has_deferred_join() tests --- - - function suite.has_deferred_join_true() - test.istrue(path.hasdeferredjoin("p1\a%{foo}")) - end - - function suite.has_deferred_join_false() - test.isfalse(path.hasdeferredjoin("p1/p2")) - end - - function suite.has_deferred_join_true_OnPipe() - test.istrue(path.hasdeferredjoin("c1 p1\a%{foo} | c2")) - end - - function suite.has_deferred_join_false_OnPipe() - test.isfalse(path.hasdeferredjoin("c1 p1/p2 | c2")) - end - - function suite.has_deferred_join_true_OnOr() - test.istrue(path.hasdeferredjoin("c1 p1\a%{foo} || c2")) - end - - function suite.has_deferred_join_false_OnOr() - test.isfalse(path.hasdeferredjoin("c1 p1/p2 || c2")) - end - --- --- path.resolvedeferredjoin() tests --- - - function suite.resolve_deferred_join_OnNoDelimiter() - test.isequal("p1", path.resolvedeferredjoin("p1")) - end - - function suite.resolve_deferred_join_OnValidParts() - test.isequal("p1/p2", path.resolvedeferredjoin("p1\ap2")) - end - - function suite.resolve_deferred_join_OnAbsoluteWindowsPath() - test.isequal("C:/p2", path.resolvedeferredjoin("p1\aC:/p2")) - end - - function suite.resolve_deferred_join_OnCurrentDirectory() - test.isequal("p2", path.resolvedeferredjoin(".\ap2")) - end - - function suite.resolve_deferred_join_OnBackToBasePath() - test.isequal("", path.resolvedeferredjoin("p1/p2/\a../../")) - end - - function suite.resolve_deferred_join_OnBackToBasePathWithoutFinalSlash() - test.isequal("", path.resolvedeferredjoin("p1/p2/\a../..")) - end - - function suite.resolve_deferred_join_OnBothUpTwoFolders() - test.isequal("../../../../foo", path.resolvedeferredjoin("../../\a../../foo")) - end - - function suite.resolve_deferred_join_OnUptwoFolders() - test.isequal("p1/foo", path.resolvedeferredjoin("p1/p2/p3\a../../foo")) - end - - function suite.resolve_deferred_join_OnUptoBase() - test.isequal("foo", path.resolvedeferredjoin("p1/p2/p3\a../../../foo")) - end - - function suite.resolve_deferred_join_ignoreLeadingDots() - test.isequal("p1/p2/foo", path.resolvedeferredjoin("p1/p2\a././foo")) - end - - function suite.resolve_deferred_join_OnUptoParentOfBase() - test.isequal("../../p1", path.resolvedeferredjoin("p1/p2/p3/p4/p5/p6/p7/\a../../../../../../../../../p1")) - end - - function suite.resolve_deferred_join_onMoreThanTwoParts() - test.isequal("p1/p2/p3", path.resolvedeferredjoin("p1\ap2\ap3")) - end - - function suite.resolve_deferred_join_removesExtraInternalSlashes() - test.isequal("p1/p2", path.resolvedeferredjoin("p1/\ap2")) - end - - function suite.resolve_deferred_join_removesTrailingSlash() - test.isequal("p1/p2", path.resolvedeferredjoin("p1\ap2/")) - end - - function suite.resolve_deferred_join_ignoresEmptyParts() - test.isequal("p2", path.resolvedeferredjoin("\ap2\a")) - end - - function suite.resolve_deferred_join_canJoinBareSlash() - test.isequal("/Users", path.resolvedeferredjoin("/\aUsers")) - end - - function suite.resolve_deferred_join_keepsLeadingEnvVar() - test.isequal("$(ProjectDir)/../../Bin", path.resolvedeferredjoin("$(ProjectDir)\a../../Bin")) - end - - function suite.resolve_deferred_join_keepsInternalEnvVar() - test.isequal("$(ProjectDir)/$(TargetName)/../../Bin", path.resolvedeferredjoin("$(ProjectDir)/$(TargetName)\a../../Bin")) - end - - function suite.resolve_deferred_join_keepsComplexInternalEnvVar() - test.isequal("$(ProjectDir)/myobj_$(Arch)/../../Bin", path.resolvedeferredjoin("$(ProjectDir)/myobj_$(Arch)\a../../Bin")) - end - - function suite.resolve_deferred_join_keepsRecursivePattern() - test.isequal("p1/**.lproj/../p2", path.resolvedeferredjoin("p1/**.lproj\a../p2")) - end - - function suite.resolve_deferred_join_keepsVSMacros() - test.isequal("p1/%(Filename).ext", path.resolvedeferredjoin("p1\a%(Filename).ext")) - end - - function suite.resolve_deferred_join_noCombineSingleDot() - test.isequal("p1/./../p2", path.resolvedeferredjoin("p1/.\a../p2")) - end - - function suite.resolve_deferred_join_absolute_second_part() - test.isequal("$ORIGIN", path.resolvedeferredjoin("foo/bar\a$ORIGIN")) - end - - function suite.resolve_deferred_join_absolute_second_part1() - test.isequal("$(FOO)/bar", path.resolvedeferredjoin("foo/bar\a$(FOO)/bar")) - end - - function suite.resolve_deferred_join_absolute_second_part2() - test.isequal("%ROOT%/foo", path.resolvedeferredjoin("foo/bar\a%ROOT%/foo")) - end - - function suite.resolve_deferred_join_token_in_second_part() - test.isequal("foo/bar/%{test}/foo", path.resolvedeferredjoin("foo/bar\a%{test}/foo")) - end - - function suite.resolve_deferred_join_ignoresPipe() - test.isequal("c1 p1/p2 | c2", path.resolvedeferredjoin("c1 p1/p2 | c2")) - end - - function suite.resolve_deferred_join_OnPipe() - test.isequal("c1 p1/p2 | c2", path.resolvedeferredjoin("c1 p1\ap2 | c2")) - end - - function suite.resolve_deferred_join_ignoresOr() - test.isequal("c1 p1/p2 || c2", path.resolvedeferredjoin("c1 p1/p2 || c2")) - end - - function suite.resolve_deferred_join_OnOr() - test.isequal("c1 p1/p2 || c2", path.resolvedeferredjoin("c1 p1\ap2 || c2")) - end - --- --- path.getbasename() tests --- - - function suite.getbasename_ReturnsCorrectName_OnDirAndExtension() - test.isequal("filename", path.getbasename("folder/filename.ext")) - end - - --- --- path.getdirectory() tests --- - - function suite.getdirectory_ReturnsEmptyString_OnNoDirectory() - test.isequal(".", path.getdirectory("filename.ext")) - end - - function suite.getdirectory_ReturnsDirectory_OnSingleLevelPath() - test.isequal("dir0", path.getdirectory("dir0/filename.ext")) - end - - function suite.getdirectory_ReturnsDirectory_OnMultiLeveLPath() - test.isequal("dir0/dir1/dir2", path.getdirectory("dir0/dir1/dir2/filename.ext")) - end - - function suite.getdirectory_ReturnsRootPath_OnRootPathOnly() - test.isequal("/", path.getdirectory("/filename.ext")) - end - - - --- --- path.getdrive() tests --- - - function suite.getdrive_ReturnsNil_OnNotWindows() - test.isnil(path.getdrive("/hello")) - end - - function suite.getdrive_ReturnsLetter_OnWindowsAbsolute() - test.isequal("x", path.getdrive("x:/hello")) - end - - - --- --- path.getextension() tests --- - - function suite.getextension_ReturnsEmptyString_OnNoExtension() - test.isequal("", path.getextension("filename")) - end - - function suite.getextension_ReturnsEmptyString_OnPathWithDotAndNoExtension() - test.isequal("", path.getextension("/.premake/premake")) - end - - function suite.getextension_ReturnsExtension() - test.isequal(".txt", path.getextension("filename.txt")) - end - - function suite.getextension_ReturnsExtension_OnPathWithDot() - test.isequal(".lua", path.getextension("/.premake/premake.lua")) - end - - function suite.getextension_OnMultipleDots() - test.isequal(".txt", path.getextension("filename.mod.txt")) - end - - function suite.getextension_OnLeadingNumeric() - test.isequal(".7z", path.getextension("filename.7z")) - end - - function suite.getextension_OnUnderscore() - test.isequal(".a_c", path.getextension("filename.a_c")) - end - - function suite.getextension_OnHyphen() - test.isequal(".a-c", path.getextension("filename.a-c")) - end - - - --- --- path.getrelative() tests --- - - function suite.getrelative_ReturnsDot_OnMatchingPaths() - test.isequal(".", path.getrelative("/a/b/c", "/a/b/c")) - end - - function suite.getrelative_ReturnsDoubleDot_OnChildToParent() - test.isequal("..", path.getrelative("/a/b/c", "/a/b")) - end - - function suite.getrelative_ReturnsDoubleDot_OnSiblingToSibling() - test.isequal("../d", path.getrelative("/a/b/c", "/a/b/d")) - end - - function suite.getrelative_ReturnsChildPath_OnParentToChild() - test.isequal("d", path.getrelative("/a/b/c", "/a/b/c/d")) - end - - function suite.getrelative_ReturnsChildPath_OnWindowsAbsolute() - test.isequal("obj/debug", path.getrelative("C:/Code/Premake4", "C:/Code/Premake4/obj/debug")) - end - - function suite.getrelative_ReturnsChildPath_OnServerPath() - test.isequal("../Volume", path.getrelative("//Server/Shared", "//Server/Volume")) - end - - function suite.getrelative_ReturnsAbsPath_OnDifferentDriveLetters() - test.isequal("D:/Files", path.getrelative("C:/Code/Premake4", "D:/Files")) - end - - function suite.getrelative_ReturnsAbsPath_OnDollarMacro() - test.isequal("$(SDK_HOME)/include", path.getrelative("C:/Code/Premake4", "$(SDK_HOME)/include")) - end - - function suite.getrelative_ReturnsAbsPath_OnRootedPath() - test.isequal("/opt/include", path.getrelative("/home/me/src/project", "/opt/include")) - end - - function suite.getrelative_ReturnsAbsPath_OnServerPath() - test.isequal("//Server/Volume", path.getrelative("C:/Files", "//Server/Volume")) - end - - function suite.getrelative_ReturnsAbsPath_OnDifferentServers() - test.isequal("//Server/Volume", path.getrelative("//Computer/Users", "//Server/Volume")) - end - - function suite.getrelative_ignoresExtraSlashes2() - test.isequal("..", path.getrelative("/a//b/c","/a/b")) - end - - function suite.getrelative_ignoresExtraSlashes3() - test.isequal("..", path.getrelative("/a///b/c","/a/b")) - end - - function suite.getrelative_ignoresTrailingSlashes() - test.isequal("c", path.getrelative("/a/b/","/a/b/c")) - end - - function suite.getrelative_returnsAbsPath_onContactWithFileSysRoot() - test.isequal("C:/Boost/Include", path.getrelative("C:/Code/MyApp", "C:/Boost/Include")) - end - - --- --- path.isabsolute() tests --- - - function suite.isabsolute_ReturnsTrue_OnAbsolutePosixPath() - test.istrue(path.isabsolute("/a/b/c")) - end - - function suite.isabsolute_ReturnsTrue_OnAbsoluteWindowsPathWithDrive() - test.istrue(path.isabsolute("C:/a/b/c")) - end - - function suite.isabsolute_ReturnsFalse_OnRelativePath() - test.isfalse(path.isabsolute("a/b/c")) - end - - function suite.isabsolute_ReturnsTrue_OnDollarToken() - test.istrue(path.isabsolute("$(SDK_HOME)/include")) - end - - function suite.isabsolute_ReturnsTrue_OnDotInDollarToken() - test.istrue(path.isabsolute("$(configuration.libs)/include")) - end - - function suite.isabsolute_ReturnsTrue_OnJustADollarSign() - test.istrue(path.isabsolute("$foo/include")) - end - - function suite.isabsolute_ReturnsFalse_OnIncompleteDollarToken() - test.isfalse(path.isabsolute("$(foo/include")) - end - - function suite.isabsolute_ReturnsTrue_OnEnvVar() - test.istrue(path.isabsolute("%FOO%/include")) - end - - function suite.isabsolute_ReturnsFalse_OnEmptyEnvVar() - test.isfalse(path.isabsolute("%%/include")) - end - - function suite.isabsolute_ReturnsFalse_OnToken() - test.isfalse(path.isabsolute("%{foo}/include")) - end - - --- --- path.join() tests --- - - function suite.join_OnValidParts() - test.isequal("p1/p2", path.join("p1", "p2")) - end - - function suite.join_OnAbsoluteUnixPath() - test.isequal("/p2", path.join("p1", "/p2")) - end - - function suite.join_OnAbsoluteWindowsPath() - test.isequal("C:/p2", path.join("p1", "C:/p2")) - end - - function suite.join_OnCurrentDirectory() - test.isequal("p2", path.join(".", "p2")) - end - - function suite.join_OnBackToBasePath() - test.isequal("", path.join("p1/p2/", "../../")) - end - - function suite.join_OnBackToBasePathWithoutFinalSlash() - test.isequal("", path.join("p1/p2/", "../..")) - end - - function suite.join_OnBothUpTwoFolders() - test.isequal("../../../../foo", path.join("../../", "../../foo")) - end - - function suite.join_OnUptwoFolders() - test.isequal("p1/foo", path.join("p1/p2/p3", "../../foo")) - end - - function suite.join_OnUptoBase() - test.isequal("foo", path.join("p1/p2/p3", "../../../foo")) - end - - function suite.join_ignoreLeadingDots() - test.isequal("p1/p2/foo", path.join("p1/p2", "././foo")) - end - - function suite.join_OnUptoParentOfBase() - test.isequal("../../p1", path.join("p1/p2/p3/p4/p5/p6/p7/", "../../../../../../../../../p1")) - end - - function suite.join_OnNilSecondPart() - test.isequal("p1", path.join("p1", nil)) - end - - function suite.join_onMoreThanTwoParts() - test.isequal("p1/p2/p3", path.join("p1", "p2", "p3")) - end - - function suite.join_removesExtraInternalSlashes() - test.isequal("p1/p2", path.join("p1/", "p2")) - end - - function suite.join_removesTrailingSlash() - test.isequal("p1/p2", path.join("p1", "p2/")) - end - - function suite.join_ignoresNilParts() - test.isequal("p2", path.join(nil, "p2", nil)) - end - - function suite.join_ignoresEmptyParts() - test.isequal("p2", path.join("", "p2", "")) - end - - function suite.join_canJoinBareSlash() - test.isequal("/Users", path.join("/", "Users")) - end - - function suite.join_keepsLeadingEnvVar() - test.isequal("$(ProjectDir)/../../Bin", path.join("$(ProjectDir)", "../../Bin")) - end - - function suite.join_keepsInternalEnvVar() - test.isequal("$(ProjectDir)/$(TargetName)/../../Bin", path.join("$(ProjectDir)/$(TargetName)", "../../Bin")) - end - - function suite.join_keepsComplexInternalEnvVar() - test.isequal("$(ProjectDir)/myobj_$(Arch)/../../Bin", path.join("$(ProjectDir)/myobj_$(Arch)", "../../Bin")) - end - - function suite.join_keepsRecursivePattern() - test.isequal("p1/**.lproj/../p2", path.join("p1/**.lproj", "../p2")) - end - - function suite.join_noCombineSingleDot() - test.isequal("p1/./../p2", path.join("p1/.", "../p2")) - end - - function suite.join_absolute_second_part() - test.isequal("$ORIGIN", path.join("foo/bar", "$ORIGIN")) - end - - function suite.join_absolute_second_part1() - test.isequal("$(FOO)/bar", path.join("foo/bar", "$(FOO)/bar")) - end - - function suite.join_absolute_second_part2() - test.isequal("%ROOT%/foo", path.join("foo/bar", "%ROOT%/foo")) - end - - function suite.join_token_in_second_part() - test.isequal("foo/bar/%{test}/foo", path.join("foo/bar", "%{test}/foo")) - end - --- --- path.rebase() tests --- - - function suite.rebase_WithEndingSlashOnPath() - local cwd = os.getcwd() - test.isequal("src", path.rebase("../src/", cwd, path.getdirectory(cwd))) - end - - --- --- path.replaceextension() tests --- - - function suite.getabsolute_replaceExtension() - test.isequal("/AB.foo", path.replaceextension("/AB.exe","foo")) - end - - function suite.getabsolute_replaceExtensionWithDot() - test.isequal("/AB.foo", path.replaceextension("/AB.exe",".foo")) - end - - function suite.getabsolute_replaceExtensionWithDotMultipleDots() - test.isequal("/nunit.framework.foo", path.replaceextension("/nunit.framework.dll",".foo")) - end - - function suite.getabsolute_replaceExtensionCompletePath() - test.isequal("/nunit/framework/main.foo", path.replaceextension("/nunit/framework/main.cpp",".foo")) - end - - function suite.getabsolute_replaceExtensionWithoutExtension() - test.isequal("/nunit/framework/main.foo", path.replaceextension("/nunit/framework/main",".foo")) - end - - function suite.getabsolute_replaceExtensionWithEmptyString() - test.isequal("foo", path.replaceextension("foo.lua","")) - end - - - --- --- path.translate() tests --- - - function suite.translate_ReturnsTranslatedPath_OnValidPath() - test.isequal("dir/dir/file", path.translate("dir\\dir\\file", "/")) - end - - function suite.translate_returnsCorrectSeparator_onMixedPath() - local actual = path.translate("dir\\dir/file", "/") - test.isequal("dir/dir/file", actual) - end - - function suite.translate_ReturnsTargetOSSeparator_Windows() - _OPTIONS["os"] = "windows" - test.isequal("dir\\dir\\file", path.translate("dir/dir\\file")) - end - - function suite.translate_ReturnsTargetOSSeparator_Linux() - _OPTIONS["os"] = "linux" - test.isequal("dir/dir/file", path.translate("dir/dir\\file")) - end - - --- --- path.wildcards tests --- - - function suite.wildcards_MatchesTrailingStar() - local p = path.wildcards("**/xcode/*") - test.isequal(".*/xcode/[^/]*", p) - end - - function suite.wildcards_MatchPlusSign() - local patt = path.wildcards("file+name.*") - local name = "file+name.c" - test.isequal(name, name:match(patt)) - end - - function suite.wildcards_escapeSpecialChars() - test.isequal("%.%-", path.wildcards(".-")) - end - - function suite.wildcards_escapeStar() - test.isequal("vs[^/]*", path.wildcards("vs*")) - end - - function suite.wildcards_escapeStarStar() - test.isequal("Images/.*%.bmp", path.wildcards("Images/**.bmp")) - end - - - --- --- path.normalize tests --- - function suite.normalize_Test1() - local p = path.normalize("d:/game/../test") - test.isequal("d:/test", p) - end - - function suite.normalize_Test2() - local p = path.normalize("d:/game/../../test") - test.isequal("d:/../test", p) - end - - function suite.normalize_Test3() - local p = path.normalize("../../test") - test.isequal("../../test", p) - end - - function suite.normalize_Test4() - local p = path.normalize("../../../test/*.h") - test.isequal("../../../test/*.h", p) - end - - function suite.normalize_Test5() - test.isequal("test", path.normalize("./test")) - test.isequal("d:/", path.normalize("d:/")) - test.isequal("d:/", path.normalize("d:/./")) - local p = path.normalize("d:/game/..") - test.isequal("d:/", p) - end - - function suite.normalize_trailingDots1() - local p = path.normalize("../game/test/..") - test.isequal("../game", p) - end - - function suite.normalize_trailingDots2() - local p = path.normalize("../game/..") - test.isequal("..", p) - end - - function suite.normalize_singleDot() - local p = path.normalize("../../p1/p2/p3/p4/./a.pb.cc") - test.isequal("../../p1/p2/p3/p4/a.pb.cc", p) - end - - function suite.normalize_trailingSingleDot() - local p = path.normalize("../../p1/p2/p3/p4/./.") - test.isequal("../../p1/p2/p3/p4", p) - end - - function suite.normalize() - test.isequal("d:/ProjectB/bin", path.normalize("d:/ProjectA/../ProjectB/bin")) - test.isequal("/ProjectB/bin", path.normalize("/ProjectA/../ProjectB/bin")) - end - - function suite.normalize_leadingWhitespaces() - test.isequal("d:/game", path.normalize("\t\n d:/game")) - end - - function suite.normalize_multPath() - test.isequal("../a/b ../c/d", path.normalize("../a/b ../c/d")) - test.isequal("d:/test ../a/b", path.normalize("d:/game/../test ../a/b")) - test.isequal("d:/game/test ../a/b", path.normalize("d:/game/./test ../a/b")) - test.isequal("d:/test ../a/b", path.normalize(" d:/game/../test ../a/b")) - test.isequal("d:/game ../a/b", path.normalize(" d:/game ../a/./b")) - test.isequal("d:/game ../a/b", path.normalize("d:/game/ ../a/b")) - test.isequal("d:/game", path.normalize("d:/game/ ")) - end - - function suite.normalize_legitimateDots() - test.isequal("d:/test/test..test", path.normalize("d:/test/test..test")) - test.isequal("d:/test..test/test", path.normalize("d:/test..test/test")) - test.isequal("d:/test/.test", path.normalize("d:/test/.test")) - test.isequal("d:/.test", path.normalize("d:/test/../.test")) - test.isequal("d:/test", path.normalize("d:/test/.test/..")) - test.isequal("d:/test/..test", path.normalize("d:/test/..test")) - test.isequal("d:/..test", path.normalize("d:/test/../..test")) - test.isequal("d:/test", path.normalize("d:/test/..test/..")) - test.isequal("d:/test/.test", path.normalize("d:/test/..test/../.test")) - test.isequal("d:/test/..test/.test", path.normalize("d:/test/..test/test/../.test")) - test.isequal("d:/test", path.normalize("d:/test/..test/../.test/..")) - end - - function suite.normalize_serverpath() - test.isequal("//myawesomeserver/test", path.normalize("//myawesomeserver/test/")) - test.isequal("//myawesomeserver/test", path.normalize("///myawesomeserver/test/")) - end - - function suite.normalize_quotedpath() - test.isequal("\"../../test/test/\"", path.normalize("\"../../test/test/\"")) - test.isequal("\"../../test/\"", path.normalize("\"../../test/../test/\"")) - end - - function suite.normalize_withTokens() - -- Premake tokens - test.isequal("%{wks.location}../../test", path.normalize("%{wks.location}../../test")) - -- Visual Studio var - test.isequal("$(SolutionDir)../../test", path.normalize("$(SolutionDir)../../test")) - -- Windows env var - test.isequal("%APPDATA%../../test", path.normalize("%APPDATA%../../test")) - -- Unix env var - test.isequal("${HOME}../../test", path.normalize("${HOME}../../test")) - - -- Middle - test.isequal("../../${MYVAR}/../test", path.normalize("../../${MYVAR}/../test")) - -- End - test.isequal("../../test/${MYVAR}", path.normalize("../../test/${MYVAR}")) - end - - function suite.normalize_quotedpath_withTokens() - -- Premake tokens - test.isequal("\"%{wks.location}../../test\"", path.normalize("\"%{wks.location}../../test\"")) - -- Visual Studio var - test.isequal("\"$(SolutionDir)../../test\"", path.normalize("\"$(SolutionDir)../../test\"")) - -- Windows env var - test.isequal("\"%APPDATA%../../test\"", path.normalize("\"%APPDATA%../../test\"")) - -- Unix env var - test.isequal("\"${HOME}../../test\"", path.normalize("\"${HOME}../../test\"")) - - -- Middle - test.isequal("\"../../${MYVAR}/../test\"", path.normalize("\"../../${MYVAR}/../test\"")) - -- End - test.isequal("\"../../test/${MYVAR}\"", path.normalize("\"../../test/${MYVAR}\"")) - end diff --git a/build/premake/premake5/tests/base/test_premake_command.lua b/build/premake/premake5/tests/base/test_premake_command.lua deleted file mode 100644 index be78104c36..0000000000 --- a/build/premake/premake5/tests/base/test_premake_command.lua +++ /dev/null @@ -1,12 +0,0 @@ --- --- tests/base/test_premake_command.lua --- Test the initialization of the _PREMAKE_COMMAND global. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local suite = test.declare("premake_command") - - - function suite.valueIsSet() - test.istrue(os.isfile(_PREMAKE_COMMAND)) - end diff --git a/build/premake/premake5/tests/base/test_table.lua b/build/premake/premake5/tests/base/test_table.lua deleted file mode 100644 index 801e5ad50d..0000000000 --- a/build/premake/premake5/tests/base/test_table.lua +++ /dev/null @@ -1,97 +0,0 @@ --- --- tests/base/test_table.lua --- Automated test suite for the new table functions. --- Copyright (c) 2008-2013 Jason Perkins and the Premake project --- - - - local suite = test.declare("table") - - local t - - --- --- table.contains() tests --- - - function suite.contains_OnContained() - t = { "one", "two", "three" } - test.istrue( table.contains(t, "two") ) - end - - function suite.contains_OnNotContained() - t = { "one", "two", "three" } - test.isfalse( table.contains(t, "four") ) - end - - --- --- table.flatten() tests --- - - function suite.flatten_OnMixedValues() - t = { "a", { "b", "c" }, "d" } - test.isequal({ "a", "b", "c", "d" }, table.flatten(t)) - end - - --- --- table.implode() tests --- - - function suite.implode() - t = { "one", "two", "three", "four" } - test.isequal("[one], [two], [three], [four]", table.implode(t, "[", "]", ", ")) - end - - --- --- table.indexof() tests --- - - function suite.indexof_returnsIndexOfValueFound() - local idx = table.indexof({ "a", "b", "c" }, "b") - test.isequal(2, idx) - end - - --- --- table.isempty() tests --- - - function suite.isempty_ReturnsTrueOnEmpty() - test.istrue(table.isempty({})) - end - - function suite.isempty_ReturnsFalseOnNotEmpty() - test.isfalse(table.isempty({ 1 })) - end - - function suite.isempty_ReturnsFalseOnNotEmptyMap() - test.isfalse(table.isempty({ name = 'premake' })) - end - - function suite.isempty_ReturnsFalseOnNotEmptyMapWithFalseKey() - test.isfalse(table.isempty({ [false] = 0 })) - end - - --- --- table.insertsorted() tests --- - - function suite.insertsorted() - local t = {} - table.insertsorted(t, 5) - table.insertsorted(t, 2) - table.insertsorted(t, 8) - table.insertsorted(t, 4) - table.insertsorted(t, 1) - - test.istrue(#t == 5) - test.istrue(t[1] == 1) - test.istrue(t[2] == 2) - test.istrue(t[3] == 4) - test.istrue(t[4] == 5) - test.istrue(t[5] == 8) - end diff --git a/build/premake/premake5/tests/base/test_tree.lua b/build/premake/premake5/tests/base/test_tree.lua deleted file mode 100644 index 7591ef4388..0000000000 --- a/build/premake/premake5/tests/base/test_tree.lua +++ /dev/null @@ -1,286 +0,0 @@ --- --- tests/base/test_tree.lua --- Automated test suite source code tree handling. --- Copyright (c) 2009-2012 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("base_tree") - local tree = p.tree - - --- --- Setup/teardown --- - - local tr - - function suite.setup() - tr = tree.new() - end - - local function prepare() - tree.traverse(tr, { - onnode = function(node, depth) - _p(depth + 2, node.name) - end - }) - end - - --- --- Tests for tree.new() --- - - function suite.NewReturnsObject() - test.isnotnil(tr) - end - - --- --- Tests for tree.add() --- - - function suite.CanAddAtRoot() - tree.add(tr, "Root") - prepare() - test.capture [[ - Root - ]] - end - - function suite.CanAddAtChild() - tree.add(tr, "Root/Child") - prepare() - test.capture [[ - Root - Child - ]] - end - - function suite.CanAddAtGrandchild() - tree.add(tr, "Root/Child/Grandchild") - prepare() - test.capture [[ - Root - Child - Grandchild - ]] - end - - --- --- Tests for tree.getlocalpath() --- - - function suite.GetLocalPath_ReturnsPath_OnNoParentPath() - local c = tree.add(tr, "Root/Child") - c.parent.path = nil - test.isequal("Root/Child", tree.getlocalpath(c)) - end - - function suite.GetLocalPath_ReturnsName_OnParentPathSet() - local c = tree.add(tr, "Root/Child") - test.isequal("Child", tree.getlocalpath(c)) - end - - --- --- Tests for tree.remove() --- - - function suite.Remove_RemovesNodes() - local n1 = tree.add(tr, "1") - local n2 = tree.add(tr, "2") - local n3 = tree.add(tr, "3") - tree.remove(n2) - local r = "" - for _, n in ipairs(tr.children) do r = r .. n.name end - test.isequal("13", r) - end - - - function suite.Remove_WorksInTraversal() - tree.add(tr, "Root/1") - tree.add(tr, "Root/2") - tree.add(tr, "Root/3") - local r = "" - tree.traverse(tr, { - onleaf = function(node) - r = r .. node.name - tree.remove(node) - end - }) - test.isequal("123", r) - test.isequal(0, #tr.children[1]) - end - - --- --- Tests for tree.sort() --- - - function suite.Sort_SortsAllLevels() - tree.add(tr, "B/3") - tree.add(tr, "B/1") - tree.add(tr, "A/2") - tree.add(tr, "A/1") - tree.add(tr, "B/2") - tree.sort(tr) - prepare() - test.capture [[ - A - 1 - 2 - B - 1 - 2 - 3 - ]] - end - - --- --- If the root of the tree contains multiple items, it should not --- be removed by trimroot() --- - - function suite.trimroot_onItemsAtRoot() - tree.add(tr, "A/1") - tree.add(tr, "B/1") - tree.trimroot(tr) - prepare() - test.capture [[ - A - 1 - B - 1 - ]] - end - - --- --- Should trim to first level with multiple items. --- - - function suite.trimroot_onItemsInFirstNode() - tree.add(tr, "A/1") - tree.add(tr, "A/2") - tree.trimroot(tr) - prepare() - test.capture [[ - 1 - 2 - ]] - end - - --- --- If the tree contains only a single node, don't trim it. --- - - function suite.trimroot_onSingleNode() - tree.add(tr, "A") - tree.trimroot(tr) - prepare() - test.capture [[ - A - ]] - end - - --- --- If the tree contains only a single node, don't trim it. --- - - function suite.trimroot_onSingleLeafNode() - tree.add(tr, "A/1") - tree.trimroot(tr) - prepare() - test.capture [[ - 1 - ]] - end - - --- --- A ".." folder containing a single subfolder should never appear --- at the top of the source tree. --- - - function suite.trimroot_removesDotDot_onTopLevelSiblings() - tree.add(tr, "../../tests/test_hello.c") - tree.add(tr, "../src/test.c") - tree.trimroot(tr) - prepare() - test.capture [[ - tests - test_hello.c - src - test.c - ]] - end - - function suite.trimroot_removesDotDot_onTopLevel() - tree.add(tr, "../tests/test_hello.c") - tree.add(tr, "src/test.c") - tree.trimroot(tr) - prepare() - test.capture [[ - tests - test_hello.c - src - test.c - ]] - end - - function suite.trimroot_removesDotDot_onMultipleNestings() - tree.add(tr, "../../../tests/test_hello.c") - tree.add(tr, "../src/test.c") - tree.trimroot(tr) - prepare() - test.capture [[ - tests - test_hello.c - src - test.c - ]] - end - - --- --- When nodes are trimmed, the paths on the remaining nodes should --- be updated to reflect the new hierarchy. --- - - function suite.trimroot_updatesPaths_onNodesRemoved() - tree.add(tr, "A/1") - tree.add(tr, "A/2") - tree.trimroot(tr) - test.isequal("1", tr.children[1].path) - end - - - function suite.trimroot_updatesPaths_onDotDotRemoved() - tree.add(tr, "../../../tests/test_hello.c") - tree.add(tr, "../src/test.c") - tree.trimroot(tr) - test.isequal("tests", tr.children[1].path) - end - - --- --- Nodes with the key "trim" set to false should be removed. --- - - function suite.trimroot_respectsTrimFlag() - local n = tree.add(tr, "A") - tree.add(tr, "A/1") - n.trim = false - tree.trimroot(tr) - prepare() - test.capture [[ - A - 1 - ]] - end diff --git a/build/premake/premake5/tests/base/test_uuid.lua b/build/premake/premake5/tests/base/test_uuid.lua deleted file mode 100644 index d4fefb556b..0000000000 --- a/build/premake/premake5/tests/base/test_uuid.lua +++ /dev/null @@ -1,52 +0,0 @@ --- --- tests/base/test_uuid.lua --- Automated test suite for UUID generation. --- Copyright (c) 2008-2012 Jason Perkins and the Premake project --- - - local suite = test.declare("os_uuid") - - --- --- Setup and teardown --- - - local builtin_print, result - - function suite.setup() - builtin_print = print - print = function(value) - result = value - end - end - - function suite.teardown() - print = builtin_print - end - - --- --- Make sure the return value looks like a UUID. --- - - function suite.returnsValidUUID() - local g = os.uuid() - test.istrue(#g == 36) - for i=1,36 do - local ch = g:sub(i,i) - test.istrue(ch:find("[ABCDEF0123456789-]")) - end - test.isequal("-", g:sub(9,9)) - test.isequal("-", g:sub(14,14)) - test.isequal("-", g:sub(19,19)) - test.isequal("-", g:sub(24,24)) - end - - --- --- Make sure the value returned is deterministic if a name is provided. --- - - function suite.isDeterministic_onName() - test.isequal("885E8F4B-F43D-0EE7-FD55-99BD69B47448", os.uuid("MyValue")) - end diff --git a/build/premake/premake5/tests/base/test_validation.lua b/build/premake/premake5/tests/base/test_validation.lua deleted file mode 100644 index 509d942707..0000000000 --- a/build/premake/premake5/tests/base/test_validation.lua +++ /dev/null @@ -1,130 +0,0 @@ --- --- tests/base/test_validation.lua --- Verify the project information sanity checking. --- Copyright (c) 2013-20124 Jason Perkins and the Premake project --- - - local suite = test.declare("premake_validation") - - local p = premake - - --- --- Setup --- - - local function validate() - return pcall(function() p.container.validate(p.api.rootContainer()) end) - end - - --- --- Validate should pass if the minimum requirements are met. --- - - function suite.passes_onSane() - workspace("MyWorkspace") - configurations { "Debug", "Release" } - project "MyProject" - kind "ConsoleApp" - language "C++" - test.istrue(validate()) - end - - --- --- Fail if no configurations are present on the workspace. --- - - function suite.fails_onNoWorkspaceConfigs() - workspace "MyWorkspace" - project "MyProject" - kind "ConsoleApp" - language "C++" - test.isfalse(validate()) - end - - --- --- Fail on duplicate project UUIDs. --- - - function suite.fails_onDuplicateProjectIDs() - workspace "MyWorkspace" - configurations { "Debug", "Release" } - kind "ConsoleApp" - language "C++" - project "MyProject1" - uuid "D4110D7D-FB18-4A1C-A75B-CA432F4FE770" - project "MyProject2" - uuid "D4110D7D-FB18-4A1C-A75B-CA432F4FE770" - test.isfalse(validate()) - end - - --- --- Fail if no kind is set on the configuration. --- - - function suite.fails_onNoConfigKind() - workspace "MyWorkspace" - configurations { "Debug", "Release" } - project "MyProject" - language "C++" - test.isfalse(validate()) - end - - --- --- Warn if a configuration value is set in the wrong scope. --- - - function suite.warns_onWorkspaceStringField_inConfig() - workspace "MyWorkspace" - configurations { "Debug", "Release" } - filter "Debug" - startproject "MyProject" - project "MyProject" - kind "ConsoleApp" - language "C++" - validate() - test.stderr("'startproject' on config") - end - - function suite.warns_onProjectStringField_inConfig() - workspace "MyWorkspace" - configurations { "Debug", "Release" } - project "MyProject" - kind "ConsoleApp" - language "C++" - filter "Debug" - location "MyProject" - validate() - test.stderr("'location' on config") - end - - function suite.warns_onProjectListField_inConfig() - workspace "MyWorkspace" - configurations { "Debug", "Release" } - project "MyProject" - kind "ConsoleApp" - language "C++" - filter "Debug" - configurations "Deployment" - validate() - test.stderr("'configurations' on config") - end - - --- --- If a rule is specified for inclusion, it must have been defined. --- - - function suite.fails_onNoSuchRule() - workspace "MyWorkspace" - configurations { "Debug", "Release" } - project "MyProject" - rules { "NoSuchRule" } - test.isfalse(validate()) - end - diff --git a/build/premake/premake5/tests/base/test_versions.lua b/build/premake/premake5/tests/base/test_versions.lua deleted file mode 100644 index 1e9481eab7..0000000000 --- a/build/premake/premake5/tests/base/test_versions.lua +++ /dev/null @@ -1,187 +0,0 @@ --- --- tests/base/test_versions.lua --- Verify the version comparisons. --- Copyright (c) 2015 Jason Perkins and the Premake project --- - - local suite = test.declare("premake_versions") - - local p = premake - - --- --- If only major version is specified, anything after should pass. --- - - function suite.pass_majorOnly_sameMajor() - test.istrue(p.checkVersion("1.0.0", "1")) - end - - function suite.pass_majorOnly_laterMajor() - test.istrue(p.checkVersion("2.0.0", "1")) - end - - function suite.pass_majorOnly_laterMinor() - test.istrue(p.checkVersion("1.1.0", "1")) - end - - function suite.pass_majorOnly_laterPatch() - test.istrue(p.checkVersion("1.0.1", "1")) - end - --- --- prereleases should be fail against true release. --- - - function suite.fail_majorOnly_alpha() - test.isfalse(p.checkVersion("1.0.0-alpha1", "1")) - end - - function suite.fail_majorOnly_dev() - test.isfalse(p.checkVersion("1.0.0-dev", "1")) - end - --- --- ealier versions should be fail against major release. --- - - function suite.fail_earlierMajor() - test.isfalse(p.checkVersion("0.9.0", "1")) - end - --- --- If major and minor are specified, anything after should pass --- - - function suite.pass_majorMinor_sameMajorMinor() - test.istrue(p.checkVersion("1.1.0", "1.1")) - end - - function suite.pass_majorMinor_sameMajorLaterMinor() - test.istrue(p.checkVersion("1.2.0", "1.1")) - end - - function suite.pass_majorMinor_sameMajorLaterPath() - test.istrue(p.checkVersion("1.1.1", "1.1")) - end - - function suite.pass_majorMinor_laterMajorSameMinor() - test.istrue(p.checkVersion("2.0.0", "1.1")) - end - - function suite.pass_majorMinor_laterMajorEarlierMinor() - test.istrue(p.checkVersion("2.0.0", "1.1")) - end - - function suite.pass_majorMinor_laterMajorLaterMinor() - test.istrue(p.checkVersion("2.2.0", "1.1")) - end - - function suite.fail_majorMinor_sameMajorEarlierMinor() - test.isfalse(p.checkVersion("1.0.0", "1.1")) - end - - function suite.fail_majorMinor_earlierMajor() - test.isfalse(p.checkVersion("0.9.0", "1.1")) - end - - --- --- Alpha comes before beta comes before dev --- - - function suite.pass_alphaBeforeBeta() - test.istrue(p.checkVersion("1.0.0-beta1", "1.0.0-alpha1")) - end - - function suite.fail_alphaBeforeBeta() - test.isfalse(p.checkVersion("1.0.0-alpha1", "1.0.0-beta1")) - end - - function suite.pass_betaBeforeDev() - test.istrue(p.checkVersion("1.0.0-dev", "1.0.0-beta1")) - end - - function suite.fail_betaBeforeDev() - test.isfalse(p.checkVersion("1.0.0-beta1", "1.0.0-dev")) - end - - --- --- Check ">=" operator --- - - function suite.pass_ge_sameMajorMinorPatch() - test.istrue(p.checkVersion("1.1.0", ">=1.1")) - end - - function suite.pass_ge_sameMajorMinorLaterPatch() - test.istrue(p.checkVersion("1.1.1", ">=1.1")) - end - - function suite.pass_ge_laterMajorEarlierMinor() - test.istrue(p.checkVersion("2.0.1", ">=1.1")) - end - - function suite.pass_ge_sameMajorLaterMinor() - test.istrue(p.checkVersion("1.2.1", ">=1.1")) - end - - function suite.fail_ge_earlierMajor() - test.isfalse(p.checkVersion("0.1.1", ">=1.1")) - end - - function suite.fail_ge_earlierMinor() - test.isfalse(p.checkVersion("1.0.1", ">=1.1")) - end - - --- --- Check ">" operator --- - - function suite.pass_gt_sameMajorMinorLaterPatch() - test.istrue(p.checkVersion("1.1.1", ">1.1")) - end - - function suite.pass_gt_laterMajor() - test.istrue(p.checkVersion("2.0.1", ">1.1")) - end - - function suite.pass_gt_laterMinor() - test.istrue(p.checkVersion("1.2.1", ">1.1")) - end - - function suite.fail_gt_sameMajorMinorPatch() - test.isfalse(p.checkVersion("1.1.0", ">1.1")) - end - - function suite.fail_gt_earlierMajor() - test.isfalse(p.checkVersion("0.1.1", ">1.1")) - end - - function suite.fail_gt_earlierMinor() - test.isfalse(p.checkVersion("1.0.1", ">1.1")) - end - - --- --- Check multiple conditions --- - - function suite.pass_onMultipleConditions() - test.istrue(p.checkVersion("1.2.0", ">=1.0 <2.0")) - end - - function suite.fail_onMultipleConditions() - test.isfalse(p.checkVersion("2.2.0", ">=1.0 <2.0")) - end - - --- --- If there is no version information, fails. --- - - function suite.fail_onNoVersion() - test.isfalse(p.checkVersion(nil, "1.0")) - end diff --git a/build/premake/premake5/tests/config/test_linkinfo.lua b/build/premake/premake5/tests/config/test_linkinfo.lua deleted file mode 100755 index 79348646f0..0000000000 --- a/build/premake/premake5/tests/config/test_linkinfo.lua +++ /dev/null @@ -1,117 +0,0 @@ --- --- tests/config/test_linkinfo.lua --- Test the config object's link target accessor. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("config_linkinfo") - local config = p.config - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("test") - wks, prj = test.createWorkspace() - kind "StaticLib" - system "Windows" - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - return config.getlinkinfo(cfg) - end - - --- --- Directory should use targetdir() value if present. --- - - function suite.directoryIsTargetDir_onTargetDir() - targetdir "../bin" - i = prepare() - test.isequal("../bin", path.getrelative(os.getcwd(), i.directory)) - end - - --- --- Shared library should use implibdir() if present. --- - - function suite.directoryIsImpLibDir_onImpLibAndTargetDir() - kind "SharedLib" - targetdir "../bin" - implibdir "../lib" - i = prepare() - test.isequal("../lib", path.getrelative(os.getcwd(), i.directory)) - end - - --- --- Base name should use the project name by default. --- - - function suite.basenameIsProjectName_onNoTargetName() - i = prepare() - test.isequal("MyProject", i.basename) - end - - --- --- Base name should use targetname() if present. --- - - function suite.basenameIsTargetName_onTargetName() - targetname "MyTarget" - i = prepare() - test.isequal("MyTarget", i.basename) - end - - --- --- Shared library should use implibname() if present. --- - - function suite.basenameIsImplibName_onTargetName() - kind "SharedLib" - targetname "MyTarget" - implibname "MyTargetImports" - i = prepare() - test.isequal("MyTargetImports", i.basename) - end - - --- --- Test library name formatting. --- - - function suite.nameFormatting_onWindows() - system "Windows" - i = prepare() - test.isequal("MyProject.lib", i.name) - end - - function suite.nameFormatting_onLinux() - system "Linux" - i = prepare() - test.isequal("libMyProject.a", i.name) - end - - --- --- The import library extension should not change if the a --- custom target extension is set. --- - - function suite.impLibExtensionUnmodified_OnCustomTargetExt() - system "windows" - kind "SharedLib" - targetextension ".mil" - i = prepare() - test.isequal("MyProject.lib", i.name) - end diff --git a/build/premake/premake5/tests/config/test_links.lua b/build/premake/premake5/tests/config/test_links.lua deleted file mode 100755 index dadc45648d..0000000000 --- a/build/premake/premake5/tests/config/test_links.lua +++ /dev/null @@ -1,224 +0,0 @@ --- --- tests/config/test_links.lua --- Test the list of linked objects retrieval function. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("config_links") - local config = p.config - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("test") - _TARGET_OS = "windows" - wks, prj = test.createWorkspace() - end - - local function prepare(kind, part, linkage) - cfg = test.getconfig(prj, "Debug") - return config.getlinks(cfg, kind, part, linkage) - end - - --- --- If no links are present, should return an empty table. --- - - function suite.emptyResult_onNoLinks() - local r = prepare("all", "object") - test.isequal(0, #r) - end - - --- --- System libraries which include path information are made project relative. --- - - function suite.pathMadeRelative_onSystemLibWithPath() - location "build" - links { "../libs/z" } - local r = prepare("all", "fullpath") - test.isequal({ "../../libs/z" }, r) - end - - - --- --- Handle the case where the library extension has been explicitly --- included in the link statement. --- - - function suite.skipsExtension_onExplicitExtension() - system "windows" - links { "user32.lib" } - local r = prepare("all", "fullpath") - test.isequal({ "user32.lib" }, r) - end - - --- --- Check handling of shell variables in library paths. --- - - function suite.variableMaintained_onLeadingVariable() - system "windows" - location "build" - links { "$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI" } - local r = prepare("all", "fullpath") - test.isequal({ "$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI" }, r) - end - - function suite.variableMaintained_onQuotedVariable() - system "windows" - location "build" - links { '"$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI.lib"' } - local r = prepare("all", "fullpath") - test.isequal({ '"$(LOCAL_DEV_PATH)/sdk/lib/DEVMAPI.lib"' }, r) - end - - --- --- If fetching directories, the libdirs should be included in the result. --- - - function suite.includesLibDirs_onDirectories() - libdirs { "../libs" } - local r = prepare("all", "directory") - test.isequal({ "../libs" }, r) - end - - --- --- Managed C++ projects should ignore links to managed assemblies, which --- are designated with an explicit ".dll" extension. --- - - function suite.skipsAssemblies_onManagedCpp() - system "windows" - clr "On" - links { "user32", "System.dll" } - local r = prepare("all", "fullpath") - test.isequal({ "user32" }, r) - end - - --- --- When explicitly requesting managed links, any unmanaged items in the --- list should be ignored. --- - - function suite.skipsUnmanagedLibs_onManagedLinkage() - system "windows" - clr "On" - links { "user32", "System.dll" } - local r = prepare("all", "fullpath", "managed") - test.isequal({ "System.dll" }, r) - end - - --- --- Managed projects can link to other managed projects, and unmanaged --- projects can link to unmanaged projects. --- - - function suite.canLink_CppAndCpp() - links { "MyProject2" } - - project "MyProject2" - kind "StaticLib" - language "C++" - - local r = prepare("all", "fullpath") - test.isequal({ "bin/Debug/MyProject2.lib" }, r) - end - - function suite.canLink_CsAndCs() - language "C#" - links { "MyProject2" } - - project "MyProject2" - kind "SharedLib" - language "C#" - - local r = prepare("all", "fullpath") - test.isequal({ "bin/Debug/MyProject2.dll" }, r) - end - - function suite.canLink_ManagedCppAndManagedCpp() - clr "On" - links { "MyProject2" } - - project "MyProject2" - kind "StaticLib" - language "C++" - clr "On" - - local r = prepare("all", "fullpath") - test.isequal({ "bin/Debug/MyProject2.lib" }, r) - end - - function suite.canLink_ManagedCppAndCs() - clr "On" - links { "MyProject2" } - - project "MyProject2" - kind "SharedLib" - language "C#" - - local r = prepare("all", "fullpath") - test.isequal({ "bin/Debug/MyProject2.dll" }, r) - end - - --- --- Managed and unmanaged projects can not link to each other. --- - - - function suite.ignoreLink_CppAndCs() - links { "MyProject2" } - - project "MyProject2" - kind "SharedLib" - language "C#" - - local r = prepare("all", "fullpath") - test.isequal({}, r) - end - - --- --- Mixed and unmanaged projects can link to each other. --- - - - function suite.canLink_MixedAndNativeCpp() - clr "On" - links { "MyProject2" } - - project "MyProject2" - kind "SharedLib" - language "C++" - - local r = prepare("all", "fullpath") - test.isequal({ "bin/Debug/MyProject2.lib" }, r) - end - - function suite.canLink_NativeAndMixedCpp() - links { "MyProject2" } - - project "MyProject2" - kind "SharedLib" - language "C++" - clr "On" - - local r = prepare("all", "fullpath") - test.isequal({ "bin/Debug/MyProject2.lib" }, r) - end diff --git a/build/premake/premake5/tests/config/test_targetinfo.lua b/build/premake/premake5/tests/config/test_targetinfo.lua deleted file mode 100755 index 535c68d514..0000000000 --- a/build/premake/premake5/tests/config/test_targetinfo.lua +++ /dev/null @@ -1,296 +0,0 @@ --- --- tests/config/test_targetinfo.lua --- Test the config object's build target accessor. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("config_targetinfo") - local config = p.config - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - p.action.set("test") - wks, prj = test.createWorkspace() - system "macosx" - end - - local function prepare() - local cfg = test.getconfig(prj, "Debug") - return config.gettargetinfo(cfg) - end - - --- --- Directory uses targetdir() value if present. --- - - function suite.directoryIsTargetDir_onTargetDir() - targetdir "../bin" - i = prepare() - test.isequal("../bin", path.getrelative(os.getcwd(), i.directory)) - end - - --- --- Base name should use the project name by default. --- - - function suite.basenameIsProjectName_onNoTargetName() - i = prepare() - test.isequal("MyProject", i.basename) - end - - --- --- Base name should use targetname() if present. --- - - function suite.basenameIsTargetName_onTargetName() - targetname "MyTarget" - i = prepare() - test.isequal("MyTarget", i.basename) - end - - --- --- Base name should use suffix if present. --- - - function suite.basenameUsesSuffix_onTargetSuffix() - targetsuffix "-d" - i = prepare() - test.isequal("MyProject-d", i.basename) - end - - --- --- Name should not have an extension for Posix executables. --- - - function suite.nameHasNoExtension_onMacOSXConsoleApp() - system "MacOSX" - i = prepare() - test.isequal("MyProject", i.name) - end - - function suite.nameHasNoExtension_onLinuxConsoleApp() - system "Linux" - i = prepare() - test.isequal("MyProject", i.name) - end - - function suite.nameHasNoExtension_onBSDConsoleApp() - system "BSD" - i = prepare() - test.isequal("MyProject", i.name) - end - - --- --- Name should use ".exe" for Windows executables. --- - - function suite.nameUsesExe_onWindowsConsoleApp() - kind "ConsoleApp" - system "Windows" - i = prepare() - test.isequal("MyProject.exe", i.name) - end - - function suite.nameUsesExe_onWindowsWindowedApp() - kind "WindowedApp" - system "Windows" - i = prepare() - test.isequal("MyProject.exe", i.name) - end - - --- --- Name should use ".dll" for Windows shared libraries. --- - - function suite.nameUsesDll_onWindowsSharedLib() - kind "SharedLib" - system "Windows" - i = prepare() - test.isequal("MyProject.dll", i.name) - end - - --- --- Name should use ".lib" for Windows static libraries. --- - - function suite.nameUsesLib_onWindowsStaticLib() - kind "StaticLib" - system "Windows" - i = prepare() - test.isequal("MyProject.lib", i.name) - end - - --- --- Name should use "lib and ".dylib" for Mac shared libraries. --- - - function suite.nameUsesLib_onMacSharedLib() - kind "SharedLib" - system "MacOSX" - i = prepare() - test.isequal("libMyProject.dylib", i.name) - end - - --- --- Name should use "lib and ".a" for Mac static libraries. --- - - function suite.nameUsesLib_onMacStaticLib() - kind "StaticLib" - system "MacOSX" - i = prepare() - test.isequal("libMyProject.a", i.name) - end - - --- --- Name should use "lib" and ".so" for Linux shared libraries. --- - - function suite.nameUsesLib_onLinuxSharedLib() - kind "SharedLib" - system "Linux" - i = prepare() - test.isequal("libMyProject.so", i.name) - end - - --- --- Name should use "lib" and ".a" for Linux shared libraries. --- - - function suite.nameUsesLib_onLinuxStaticLib() - kind "StaticLib" - system "Linux" - i = prepare() - test.isequal("libMyProject.a", i.name) - end - - --- --- Name should use a prefix if set. --- - - function suite.nameUsesPrefix_onTargetPrefix() - targetprefix "sys" - i = prepare() - test.isequal("sysMyProject", i.name) - end - - --- --- Bundle name should be set and use ".app" for Mac windowed applications. --- - - function suite.bundlenameUsesApp_onMacWindowedApp() - kind "WindowedApp" - system "MacOSX" - i = prepare() - test.isequal("MyProject.app", i.bundlename) - end - - --- --- Bundle path should be set for Mac windowed applications. --- - - function suite.bundlepathSet_onMacWindowedApp() - kind "WindowedApp" - system "MacOSX" - i = prepare() - test.isequal("bin/Debug/MyProject.app/Contents/MacOS", path.getrelative(os.getcwd(), i.bundlepath)) - end - - --- --- Bundle path should be set for macOS/iOS cocoa bundle. --- - - function suite.bundlepathSet_onMacSharedLibOSXBundle() - kind "SharedLib" - sharedlibtype "OSXBundle" - system "macosx" - i = prepare() - test.isequal("bin/Debug/MyProject.bundle/Contents/MacOS", path.getrelative(os.getcwd(), i.bundlepath)) - end - --- --- Bundle path should be set for macOS/iOS cocoa unit test bundle. --- - - function suite.bundlepathSet_onMacSharedLibXCTest() - kind "SharedLib" - sharedlibtype "XCTest" - system "macosx" - i = prepare() - test.isequal("bin/Debug/MyProject.xctest/Contents/MacOS", path.getrelative(os.getcwd(), i.bundlepath)) - end - - --- --- Bundle path should be set for macOS/iOS framework. --- - - function suite.bundlepathSet_onMacSharedLibOSXFramework() - kind "SharedLib" - sharedlibtype "OSXFramework" - system "macosx" - i = prepare() - test.isequal("bin/Debug/MyProject.framework/Versions/A", path.getrelative(os.getcwd(), i.bundlepath)) - end - - --- --- Target extension is used if set. --- - - function suite.extensionSet_onTargetExtension() - targetextension ".self" - i = prepare() - test.isequal("MyProject.self", i.name) - end - - --- --- .NET executables should always default to ".exe" extensions. --- - - function suite.appUsesExe_onDotNet() - _TARGET_OS = "macosx" - language "C#" - i = prepare() - test.isequal("MyProject.exe", i.name) - end - - - --- --- .NET libraries should always default to ".dll" extensions. --- - - function suite.appUsesExe_onDotNetSharedLib() - _TARGET_OS = "macosx" - language "C#" - kind "SharedLib" - i = prepare() - test.isequal("MyProject.dll", i.name) - end - - diff --git a/build/premake/premake5/tests/folder/ok.lua b/build/premake/premake5/tests/folder/ok.lua deleted file mode 100644 index 517f338491..0000000000 --- a/build/premake/premake5/tests/folder/ok.lua +++ /dev/null @@ -1 +0,0 @@ -return "ok" diff --git a/build/premake/premake5/tests/folder/premake5.lua b/build/premake/premake5/tests/folder/premake5.lua deleted file mode 100644 index b225d4c15c..0000000000 --- a/build/premake/premake5/tests/folder/premake5.lua +++ /dev/null @@ -1 +0,0 @@ -premake.out("ok") diff --git a/build/premake/premake5/tests/folder/subfolder/hello.txt b/build/premake/premake5/tests/folder/subfolder/hello.txt deleted file mode 100644 index 137d409d7b..0000000000 --- a/build/premake/premake5/tests/folder/subfolder/hello.txt +++ /dev/null @@ -1 +0,0 @@ -Hi there! diff --git a/build/premake/premake5/tests/oven/test_filtering.lua b/build/premake/premake5/tests/oven/test_filtering.lua deleted file mode 100644 index 176b69cf7a..0000000000 --- a/build/premake/premake5/tests/oven/test_filtering.lua +++ /dev/null @@ -1,142 +0,0 @@ --- --- tests/oven/test_filtering.lua --- Test the project object configuration accessor. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("oven_filtering") - - --- --- Setup --- - - local wks, prj, cfg - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - wks = test.getWorkspace(wks) - prj = test.getproject(wks, 1) - cfg = test.getconfig(prj, "Debug") - end - - --- --- Test filtering by the selected action. --- - - function suite.onAction() - p.action.set("vs2012") - filter { "action:vs2012" } - defines { "USE_VS2012" } - prepare() - test.isequal({ "USE_VS2012" }, prj.defines) - end - - function suite.onActionMismatch() - p.action.set("vs2010") - filter { "action:vs2012" } - defines { "USE_VS2012" } - prepare() - test.isequal({}, prj.defines) - end - - --- --- Test filtering on command line options. --- - - function suite.onOptionNoValue() - _OPTIONS["release"] = "" - filter { "options:release" } - defines { "USE_RELEASE" } - prepare() - test.isequal({ "USE_RELEASE" }, prj.defines) - end - - function suite.onOptionNoValueUnset() - filter { "options:release" } - defines { "USE_RELEASE" } - prepare() - test.isequal({ }, prj.defines) - end - - function suite.onOptionWithValue() - _OPTIONS["renderer"] = "opengl" - filter { "options:renderer=opengl" } - defines { "USE_OPENGL" } - prepare() - test.isequal({ "USE_OPENGL" }, prj.defines) - end - - function suite.onOptionWithValueMismatch() - _OPTIONS["renderer"] = "direct3d" - filter { "options:renderer=opengl" } - defines { "USE_OPENGL" } - prepare() - test.isequal({ }, prj.defines) - end - - function suite.onOptionWithValueUnset() - filter { "options:renderer=opengl" } - defines { "USE_OPENGL" } - prepare() - test.isequal({ }, prj.defines) - end - --- --- Test filtering by the selected toolset. --- - - function suite.onFilterToolset() - toolset "msc" - filter { "toolset:msc" } - defines { "USE_MSC" } - prepare() - test.isequal({ "USE_MSC" }, cfg.defines) - end - - function suite.onFilterToolsetMismatch() - toolset "clang" - filter { "toolset:msc" } - defines { "USE_MSC" } - prepare() - test.isequal({}, cfg.defines) - end - - function suite.onFilterToolsetNormalization() - toolset "v140" - filter { "toolset:msc-v140" } - defines { "USE_MSC" } - prepare() - test.isequal({ "USE_MSC" }, cfg.defines) - end - - --- --- Test filtering on system. --- - - function suite.onFilterLinuxIsPosix() - system "linux" - filter { "system:posix" } - defines { "POSIX" } - filter { "system:not posix" } - defines { "NOTPOSIX" } - prepare() - test.isequal({ "POSIX" }, cfg.defines) - end - - function suite.onFilterWindowsIsNotPosix() - system "windows" - filter { "system:posix" } - defines { "POSIX" } - filter { "system:not posix" } - defines { "NOTPOSIX" } - prepare() - test.isequal({ "NOTPOSIX" }, cfg.defines) - end diff --git a/build/premake/premake5/tests/oven/test_objdirs.lua b/build/premake/premake5/tests/oven/test_objdirs.lua deleted file mode 100644 index ecb5019cfa..0000000000 --- a/build/premake/premake5/tests/oven/test_objdirs.lua +++ /dev/null @@ -1,84 +0,0 @@ ---- --- tests/oven/test_objdirs.lua --- Test the per-configuration object directory assignments. --- Copyright (c) 2014-2015 Jason Perkins and the Premake project ---- - - local p = premake - local suite = test.declare("oven_objdirs") - local oven = p.oven - ---- --- Setup ---- - - local wks, prj - - function suite.setup() - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - prj = project "MyProject" - end - - local function prepare(buildcfg, platform) - cfg = test.getconfig(prj, buildcfg, platform) - end - - function suite.singleProject_noPlatforms() - prepare("Debug") - test.isequal(path.getabsolute("obj/Debug"), cfg.objdir) - - prepare("Release") - test.isequal(path.getabsolute("obj/Release"), cfg.objdir) - end - - - function suite.multipleProjects_noPlatforms() - project "MyProject2" - prepare("Debug") - - test.createproject(wks) - test.isequal(path.getabsolute("obj/Debug/MyProject"), cfg.objdir) - end - - - function suite.singleProject_withPlatforms() - platforms { "x86", "x86_64" } - prepare("Debug", "x86") - - test.isequal(path.getabsolute("obj/x86/Debug"), cfg.objdir) - end - - - function suite.singleProject_uniqueByTokens_noPlatforms() - objdir "obj/%{cfg.buildcfg}" - prepare("Debug") - - test.isequal(path.getabsolute("obj/Debug"), cfg.objdir) - end - - - function suite.singleProject_uniqueByTokens_withPlatforms() - platforms { "x86", "x86_64" } - objdir "obj/%{cfg.buildcfg}_%{cfg.platform}" - prepare("Debug", "x86") - - test.isequal(path.getabsolute("obj/Debug_x86"), cfg.objdir) - end - - - function suite.allowOverlap_onPrefixCode() - platforms { "x86", "x86_64" } - objdir "!obj/%{cfg.buildcfg}" - prepare("Debug", "x86") - - test.isequal(path.getabsolute("obj/Debug"), cfg.objdir) - end - - function suite.allowOverlap_onPrefixCode_withEnvironmentVariable() - platforms { "x86", "x86_64" } - objdir "!$(SolutionDir)/%{cfg.buildcfg}" - prepare("Debug", "x86") - - test.isequal("$(SolutionDir)/Debug", cfg.objdir) - end diff --git a/build/premake/premake5/tests/pepperfish_profiler.lua b/build/premake/premake5/tests/pepperfish_profiler.lua deleted file mode 100644 index 2705ce3afb..0000000000 --- a/build/premake/premake5/tests/pepperfish_profiler.lua +++ /dev/null @@ -1,629 +0,0 @@ ---[[ - -== Introduction == - - Note that this requires os.clock(), debug.sethook(), - and debug.getinfo() or your equivalent replacements to - be available if this is an embedded application. - - Example usage: - - profiler = newProfiler() - profiler:start() - - < call some functions that take time > - - profiler:stop() - - local outfile = io.open( "profile.txt", "w+" ) - profiler:report( outfile ) - outfile:close() - -== Optionally choosing profiling method == - -The rest of this comment can be ignored if you merely want a good profiler. - - newProfiler(method, sampledelay): - -If method is omitted or "time", will profile based on real performance. -optionally, frequency can be provided to control the number of opcodes -per profiling tick. By default this is 100000, which (on my system) provides -one tick approximately every 2ms and reduces system performance by about 10%. -This can be reduced to increase accuracy at the cost of performance, or -increased for the opposite effect. - -If method is "call", will profile based on function calls. Frequency is -ignored. - - -"time" may bias profiling somewhat towards large areas with "simple opcodes", -as the profiling function (which introduces a certain amount of unavoidable -overhead) will be called more often. This can be minimized by using a larger -sample delay - the default should leave any error largely overshadowed by -statistical noise. With a delay of 1000 I was able to achieve inaccuray of -approximately 25%. Increasing the delay to 100000 left inaccuracy below my -testing error. - -"call" may bias profiling heavily towards areas with many function calls. -Testing found a degenerate case giving a figure inaccurate by approximately -20,000%. (Yes, a multiple of 200.) This is, however, more directly comparable -to common profilers (such as gprof) and also gives accurate function call -counts, which cannot be retrieved from "time". - -I strongly recommend "time" mode, and it is now the default. - -== History == - -2008-09-16 - Time-based profiling and conversion to Lua 5.1 - by Ben Wilhelm ( zorba-pepperfish@pavlovian.net ). - Added the ability to optionally choose profiling methods, along with a new - profiling method. - -Converted to Lua 5, a few improvements, and -additional documentation by Tom Spilman ( tom@sickheadgames.com ) - -Additional corrections and tidying by original author -Daniel Silverstone ( dsilvers@pepperfish.net ) - -== Status == - -Daniel Silverstone is no longer using this code, and judging by how long it's -been waiting for Lua 5.1 support, I don't think Tom Spilman is either. I'm -perfectly willing to take on maintenance, so if you have problems or -questions, go ahead and email me :) --- Ben Wilhelm ( zorba-pepperfish@pavlovian.net ) ' - -== Copyright == - -Lua profiler - Copyright Pepperfish 2002,2003,2004 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to -do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - ---]] - - --- --- All profiler related stuff is stored in the top level table '_profiler' --- -_profiler = {} - - --- --- newProfiler() creates a new profiler object for managing --- the profiler and storing state. Note that only one profiler --- object can be executing at one time. --- -function newProfiler(variant, sampledelay) - if _profiler.running then - print("Profiler already running.") - return - end - - variant = variant or "time" - - if variant ~= "time" and variant ~= "call" then - print("Profiler method must be 'time' or 'call'.") - return - end - - local newprof = {} - for k,v in pairs(_profiler) do - newprof[k] = v - end - newprof.variant = variant - newprof.sampledelay = sampledelay or 100000 - return newprof -end - - --- --- This function starts the profiler. It will do nothing --- if this (or any other) profiler is already running. --- -function _profiler.start(self) - if _profiler.running then - return - end - -- Start the profiler. This begins by setting up internal profiler state - _profiler.running = self - self.rawstats = {} - self.callstack = {} - if self.variant == "time" then - self.lastclock = os.clock() - debug.sethook( _profiler_hook_wrapper_by_time, "", self.sampledelay ) - elseif self.variant == "call" then - debug.sethook( _profiler_hook_wrapper_by_call, "cr" ) - else - print("Profiler method must be 'time' or 'call'.") - sys.exit(1) - end -end - - --- --- This function stops the profiler. It will do nothing --- if a profiler is not running, and nothing if it isn't --- the currently running profiler. --- -function _profiler.stop(self) - if _profiler.running ~= self then - return - end - -- Stop the profiler. - debug.sethook( nil ) - _profiler.running = nil -end - - --- --- Simple wrapper to handle the hook. You should not --- be calling this directly. Duplicated to reduce overhead. --- -function _profiler_hook_wrapper_by_call(action) - if _profiler.running == nil then - debug.sethook( nil ) - end - _profiler.running:_internal_profile_by_call(action) -end -function _profiler_hook_wrapper_by_time(action) - if _profiler.running == nil then - debug.sethook( nil ) - end - _profiler.running:_internal_profile_by_time(action) -end - - --- --- This is the main by-function-call function of the profiler and should not --- be called except by the hook wrapper --- -function _profiler._internal_profile_by_call(self,action) - -- Since we can obtain the 'function' for the item we've had call us, we - -- can use that... - local caller_info = debug.getinfo( 3 ) - if caller_info == nil then - print "No caller_info" - return - end - - --SHG_LOG("[_profiler._internal_profile] "..(caller_info.name or "")) - - -- Retrieve the most recent activation record... - local latest_ar = nil - local callstackLen = #self.callstack - if callstackLen > 0 then - latest_ar = self.callstack[callstackLen] - end - - -- Are we allowed to profile this function? - local should_not_profile = 0 - for k,v in pairs(self.prevented_functions) do - if k == caller_info.func then - should_not_profile = v - end - end - -- Also check the top activation record... - if latest_ar then - if latest_ar.should_not_profile == 2 then - should_not_profile = 2 - end - end - - -- Now then, are we in 'call' or 'return' ? - -- print("Profile:", caller_info.name, "SNP:", should_not_profile, - -- "Action:", action ) - if action == "call" then - -- Making a call... - local this_ar = {} - this_ar.should_not_profile = should_not_profile - this_ar.parent_ar = latest_ar - this_ar.anon_child = 0 - this_ar.name_child = 0 - this_ar.children = {} - this_ar.children_time = {} - this_ar.clock_start = os.clock() - -- Last thing to do on a call is to insert this onto the ar stack... - table.insert( self.callstack, this_ar ) - else - local this_ar = latest_ar - if this_ar == nil then - return -- No point in doing anything if no upper activation record - end - - -- Right, calculate the time in this function... - this_ar.clock_end = os.clock() - this_ar.this_time = this_ar.clock_end - this_ar.clock_start - - -- Now, if we have a parent, update its call info... - if this_ar.parent_ar then - this_ar.parent_ar.children[caller_info.func] = - (this_ar.parent_ar.children[caller_info.func] or 0) + 1 - this_ar.parent_ar.children_time[caller_info.func] = - (this_ar.parent_ar.children_time[caller_info.func] or 0 ) + - this_ar.this_time - if caller_info.name == nil then - this_ar.parent_ar.anon_child = - this_ar.parent_ar.anon_child + this_ar.this_time - else - this_ar.parent_ar.name_child = - this_ar.parent_ar.name_child + this_ar.this_time - end - end - -- Now if we're meant to record information about ourselves, do so... - if this_ar.should_not_profile == 0 then - local inforec = self:_get_func_rec(caller_info.func,1) - inforec.count = inforec.count + 1 - inforec.time = inforec.time + this_ar.this_time - inforec.anon_child_time = inforec.anon_child_time + this_ar.anon_child - inforec.name_child_time = inforec.name_child_time + this_ar.name_child - inforec.func_info = caller_info - for k,v in pairs(this_ar.children) do - inforec.children[k] = (inforec.children[k] or 0) + v - inforec.children_time[k] = - (inforec.children_time[k] or 0) + this_ar.children_time[k] - end - end - - -- Last thing to do on return is to drop the last activation record... - local callstackLen = #self.callstack - table.remove( self.callstack, callstackLen ) - end -end - - --- --- This is the main by-time internal function of the profiler and should not --- be called except by the hook wrapper --- -function _profiler._internal_profile_by_time(self,action) - -- we do this first so we add the minimum amount of extra time to this call - local timetaken = os.clock() - self.lastclock - - local depth = 3 - local at_top = true - local last_caller - local caller = debug.getinfo(depth) - while caller do - if not caller.func then caller.func = "(tail call)" end - if self.prevented_functions[caller.func] == nil then - local info = self:_get_func_rec(caller.func, 1, caller) - info.count = info.count + 1 - info.time = info.time + timetaken - if last_caller then - -- we're not the head, so update the "children" times also - if last_caller.name then - info.name_child_time = info.name_child_time + timetaken - else - info.anon_child_time = info.anon_child_time + timetaken - end - info.children[last_caller.func] = - (info.children[last_caller.func] or 0) + 1 - info.children_time[last_caller.func] = - (info.children_time[last_caller.func] or 0) + timetaken - end - end - depth = depth + 1 - last_caller = caller - caller = debug.getinfo(depth) - end - - self.lastclock = os.clock() -end - - --- --- This returns a (possibly empty) function record for --- the specified function. It is for internal profiler use. --- -function _profiler._get_func_rec(self,func,force,info) - -- Find the function ref for 'func' (if force and not present, create one) - local ret = self.rawstats[func] - if ret == nil and force ~= 1 then - return nil - end - if ret == nil then - -- Build a new function statistics table - ret = {} - ret.func = func - ret.count = 0 - ret.time = 0 - ret.anon_child_time = 0 - ret.name_child_time = 0 - ret.children = {} - ret.children_time = {} - ret.func_info = info - self.rawstats[func] = ret - end - return ret -end - - --- --- This writes a profile report to the output file object. If --- sort_by_total_time is nil or false the output is sorted by --- the function time minus the time in it's children. --- -function _profiler.report( self, outfile, sort_by_total_time ) - - outfile:write - [[Lua Profile output created by profiler.lua. Copyright Pepperfish 2002+ - -]] - - -- This is pretty awful. - local terms = {} - if self.variant == "time" then - terms.capitalized = "Sample" - terms.single = "sample" - terms.pastverb = "sampled" - elseif self.variant == "call" then - terms.capitalized = "Call" - terms.single = "call" - terms.pastverb = "called" - else - assert(false) - end - - local total_time = 0 - local ordering = {} - for func,record in pairs(self.rawstats) do - table.insert(ordering, func) - end - - if sort_by_total_time then - table.sort( ordering, - function(a,b) return self.rawstats[a].time > self.rawstats[b].time end - ) - else - table.sort( ordering, - function(a,b) - local arec = self.rawstats[a] - local brec = self.rawstats[b] - local atime = arec.time - (arec.anon_child_time + arec.name_child_time) - local btime = brec.time - (brec.anon_child_time + brec.name_child_time) - return atime > btime - end - ) - end - - local len = #ordering - for i=1,len do - local func = ordering[i] - local record = self.rawstats[func] - local thisfuncname = " " .. self:_pretty_name(func) .. " " - if string.len( thisfuncname ) < 42 then - local nameLen = math.ceil((42 - string.len(thisfuncname))/2) - thisfuncname = - string.rep( "-", nameLen) .. thisfuncname - thisfuncname = - thisfuncname .. string.rep( "-", 42 - string.len(thisfuncname) ) - end - - total_time = total_time + ( record.time - ( record.anon_child_time + - record.name_child_time ) ) - outfile:write( string.rep( "-", 19 ) .. thisfuncname .. - string.rep( "-", 19 ) .. "\n" ) - outfile:write( terms.capitalized.." count: " .. - string.format( "%4d", record.count ) .. "\n" ) - outfile:write( "Time spend total: " .. - string.format( "%4.3f", record.time ) .. "s\n" ) - outfile:write( "Time spent in children: " .. - string.format("%4.3f",record.anon_child_time+record.name_child_time) .. - "s\n" ) - local timeinself = - record.time - (record.anon_child_time + record.name_child_time) - outfile:write( "Time spent in self: " .. - string.format("%4.3f", timeinself) .. "s\n" ) - outfile:write( "Time spent per " .. terms.single .. ": " .. - string.format("%4.5f", record.time/record.count) .. - "s/" .. terms.single .. "\n" ) - outfile:write( "Time spent in self per "..terms.single..": " .. - string.format( "%4.5f", timeinself/record.count ) .. "s/" .. - terms.single.."\n" ) - - -- Report on each child in the form - -- Child called n times and took a.bs - local added_blank = 0 - for k,v in pairs(record.children) do - if self.prevented_functions[k] == nil or - self.prevented_functions[k] == 0 - then - if added_blank == 0 then - outfile:write( "\n" ) -- extra separation line - added_blank = 1 - end - outfile:write( "Child " .. self:_pretty_name(k) .. - string.rep( " ", 41-string.len(self:_pretty_name(k)) ) .. " " .. - terms.pastverb.." " .. string.format("%6d", v) ) - outfile:write( " times. Took " .. - string.format("%4.2f", record.children_time[k] ) .. "s\n" ) - end - end - - outfile:write( "\n" ) -- extra separation line - outfile:flush() - end - outfile:write( "\n\n" ) - outfile:write( "Total time spent in profiled functions: " .. - string.format("%5.3g",total_time) .. "s\n" ) - outfile:write( [[ - -END -]] ) - outfile:flush() -end - - --- --- This writes the profile to the output file object as --- loadable Lua source. --- -function _profiler.lua_report(self,outfile) - -- Purpose: Write out the entire raw state in a cross-referenceable form. - local ordering = {} - local functonum = {} - for func,record in pairs(self.rawstats) do - table.insert(ordering, func) - local len = #ordering - functonum[func] = len - end - - outfile:write( - "-- Profile generated by profiler.lua Copyright Pepperfish 2002+\n\n" ) - outfile:write( "-- Function names\nfuncnames = {}\n" ) - local len = #ordering - for i=1,len do - local thisfunc = ordering[i] - outfile:write( "funcnames[" .. i .. "] = " .. - string.format("%q", self:_pretty_name(thisfunc)) .. "\n" ) - end - outfile:write( "\n" ) - outfile:write( "-- Function times\nfunctimes = {}\n" ) - - local len = #ordering - for i=1,len do - local thisfunc = ordering[i] - local record = self.rawstats[thisfunc] - outfile:write( "functimes[" .. i .. "] = { " ) - outfile:write( "tot=" .. record.time .. ", " ) - outfile:write( "achild=" .. record.anon_child_time .. ", " ) - outfile:write( "nchild=" .. record.name_child_time .. ", " ) - outfile:write( "count=" .. record.count .. " }\n" ) - end - outfile:write( "\n" ) - outfile:write( "-- Child links\nchildren = {}\n" ) - - local len = #ordering - for i=1,len do - local thisfunc = ordering[i] - local record = self.rawstats[thisfunc] - outfile:write( "children[" .. i .. "] = { " ) - for k,v in pairs(record.children) do - if functonum[k] then -- non-recorded functions will be ignored now - outfile:write( functonum[k] .. ", " ) - end - end - outfile:write( "}\n" ) - end - outfile:write( "\n" ) - outfile:write( "-- Child call counts\nchildcounts = {}\n" ) - - local len = #ordering - for i=1,len do - local thisfunc = ordering[i] - local record = self.rawstats[thisfunc] - outfile:write( "children[" .. i .. "] = { " ) - for k,v in record.children do - if functonum[k] then -- non-recorded functions will be ignored now - outfile:write( v .. ", " ) - end - end - outfile:write( "}\n" ) - end - outfile:write( "\n" ) - outfile:write( "-- Child call time\nchildtimes = {}\n" ) - local len = #ordering - for i=1,len do - local thisfunc = ordering[i] - local record = self.rawstats[thisfunc]; - outfile:write( "children[" .. i .. "] = { " ) - for k,v in pairs(record.children) do - if functonum[k] then -- non-recorded functions will be ignored now - outfile:write( record.children_time[k] .. ", " ) - end - end - outfile:write( "}\n" ) - end - outfile:write( "\n\n-- That is all.\n\n" ) - outfile:flush() -end - --- Internal function to calculate a pretty name for the profile output -function _profiler._pretty_name(self,func) - - -- Only the data collected during the actual - -- run seems to be correct.... why? - local info = self.rawstats[ func ].func_info - -- local info = debug.getinfo( func ) - - local name = "" - if info.what == "Lua" then - name = "L:" - end - if info.what == "C" then - name = "C:" - end - if info.what == "main" then - name = " :" - end - - if info.name == nil then - name = name .. "<"..tostring(func) .. ">" - else - name = name .. info.name - end - - if info.source then - name = name .. "@" .. info.source - else - if info.what == "C" then - name = name .. "@?" - else - name = name .. "@" - end - end - name = name .. ":" - if info.what == "C" then - name = name .. "?" - else - name = name .. info.linedefined - end - - return name -end - - --- --- This allows you to specify functions which you do --- not want profiled. Setting level to 1 keeps the --- function from being profiled. Setting level to 2 --- keeps both the function and its children from --- being profiled. --- --- BUG: 2 will probably act exactly like 1 in "time" mode. --- If anyone cares, let me (zorba) know and it can be fixed. --- -function _profiler.prevent(self, func, level) - self.prevented_functions[func] = (level or 1) -end - - -_profiler.prevented_functions = { - [_profiler.start] = 2, - [_profiler.stop] = 2, - [_profiler._internal_profile_by_time] = 2, - [_profiler._internal_profile_by_call] = 2, - [_profiler_hook_wrapper_by_time] = 2, - [_profiler_hook_wrapper_by_call] = 2, - [_profiler.prevent] = 2, - [_profiler._get_func_rec] = 2, - [_profiler.report] = 2, - [_profiler.lua_report] = 2, - [_profiler._pretty_name] = 2 -} diff --git a/build/premake/premake5/tests/project/test_config_maps.lua b/build/premake/premake5/tests/project/test_config_maps.lua deleted file mode 100644 index d8a963bd3e..0000000000 --- a/build/premake/premake5/tests/project/test_config_maps.lua +++ /dev/null @@ -1,165 +0,0 @@ --- --- tests/project/test_config_maps.lua --- Test mapping from workspace to project configurations. --- Copyright (c) 2012-2014 Jason Perkins and the Premake project --- - - local suite = test.declare("project_config_maps") - - --- --- Setup and teardown --- - - local wks, prj, cfg - - function suite.setup() - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - end - - local function prepare(buildcfg, platform) - prj = wks.projects[1] - cfg = test.getconfig(prj, buildcfg or "Debug", platform) - end - - --- --- When no configuration is specified in the project, the workspace --- settings should map directly to a configuration object. --- - - function suite.workspaceConfig_onNoProjectConfigs() - project ("MyProject") - prepare() - test.isequal("Debug", cfg.buildcfg) - end - - --- --- If a project configuration mapping exists, it should be taken into --- account when fetching the configuration object. --- - - function suite.appliesCfgMapping_onBuildCfgMap() - project ("MyProject") - configmap { ["Debug"] = "Development" } - prepare() - test.isequal("Development", cfg.buildcfg) - end - - function suite.appliesCfgMapping_onPlatformMap() - platforms { "Shared", "Static" } - project ("MyProject") - configmap { ["Shared"] = "DLL" } - prepare("Debug", "Shared") - test.isequal("DLL", cfg.platform) - end - - - --- --- If a configuration mapping exists, can also use the mapped value --- to fetch the configuration. --- - - function suite.fetchesMappedCfg_onBuildCfgMap() - project ("MyProject") - configmap { ["Debug"] = "Development" } - prepare("Development") - test.isequal("Development", cfg.buildcfg) - end - - function suite.fetchesMappedCfg_onPlatformMap() - platforms { "Shared", "Static" } - project ("MyProject") - configmap { ["Shared"] = "DLL" } - prepare("Debug", "DLL") - test.isequal("DLL", cfg.platform) - end - - --- --- If the specified configuration has been removed from the project, --- then nil should be returned. --- - - function suite.returnsNil_onRemovedBuildCfg() - project ("MyProject") - removeconfigurations { "Debug" } - prepare() - test.isnil(cfg) - end - - function suite.returnsNil_onRemovedPlatform() - platforms { "Shared", "Static" } - project ("MyProject") - removeplatforms { "Shared" } - prepare("Debug", "Shared") - test.isnil(cfg) - end - - --- --- Check mapping from a buildcfg-platform tuple to a simple single --- value platform configuration. --- - - function suite.canMap_tupleToSingle() - platforms { "Win32", "Linux" } - project ("MyProject") - removeconfigurations "*" - removeplatforms "*" - configurations { "Debug Win32", "Release Win32", "Debug Linux", "Release Linux" } - configmap { - [{"Debug", "Win32"}] = "Debug Win32", - [{"Debug", "Linux"}] = "Debug Linux", - [{"Release", "Win32"}] = "Release Win32", - [{"Release", "Linux"}] = "Release Linux" - } - prepare("Debug", "Linux") - test.isequal("Debug Linux", cfg.buildcfg) - end - - --- --- Check mapping from a buildcfg-platform tuple to new project --- configuration tuple. --- - - function suite.canMap_tupleToTuple() - platforms { "Win32", "Linux" } - project ("MyProject") - removeconfigurations "*" - removeplatforms "*" - configurations { "Development", "Production" } - platforms { "x86", "x86_64" } - - configmap { - [{"Debug", "Win32"}] = { "Development", "x86" }, - [{"Debug", "Linux"}] = { "Development", "x86_64" }, - [{"Release", "Win32"}] = { "Production", "x86" }, - [{"Release", "Linux"}] = { "Production", "x86_64" }, - } - prepare("Debug", "Linux") - test.isequal({ "Development", "x86_64" }, { cfg.buildcfg, cfg.platform }) - end - - --- --- To allow some measure of global configuration, config maps that are contained --- in configuration blocks are allowed to bubble up to the project level. --- - - function suite.canBubbleUp_onConfiguration() - platforms { "XCUA", "XCUB" } - - filter { "platforms:CCU" } - configmap { XCUA = "CCU", XCUB = "CCU" } - - project "MyProject" - platforms { "CCU" } - - prepare("Debug", "XCUA") - test.isequal({"Debug", "CCU"}, {cfg.buildcfg, cfg.platform}) - end diff --git a/build/premake/premake5/tests/project/test_eachconfig.lua b/build/premake/premake5/tests/project/test_eachconfig.lua deleted file mode 100755 index 08bb354b15..0000000000 --- a/build/premake/premake5/tests/project/test_eachconfig.lua +++ /dev/null @@ -1,173 +0,0 @@ --- --- tests/project/test_eachconfig.lua --- Test the project object configuration iterator function. --- Copyright (c) 2011-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("project_eachconfig") - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - wks = workspace("MyWorkspace") - end - - local function prepare(buildcfgs) - project("MyProject") - if buildcfgs then - configurations ( buildcfgs ) - end - prj = test.getproject(wks, 1) - for cfg in p.project.eachconfig(prj) do - _p(2,'%s:%s', cfg.buildcfg or "", cfg.platform or "") - end - end - - --- --- If no configurations have been defined, the iterator --- should not return any values. --- - - function suite.returnsNoValues_onNoConfigurationsAndNoPlatforms() - prepare() - test.isemptycapture() - end - - --- --- If platforms have been defined, but no configurations, the --- iterator should still not return any values. --- - - function suite.returnsNoValues_onNoConfigurationsButPlatforms() - platforms { "x86", "x86_64" } - prepare() - test.isemptycapture() - end - - --- --- Configurations should be iterated in the order in which they --- appear in the script. --- - - function suite.iteratesConfigsInOrder() - configurations { "Debug", "Profile", "Release", "Deploy" } - prepare() - test.capture [[ - Debug: - Profile: - Release: - Deploy: - ]] - end - - --- --- If platforms are supplied, they should be paired with build --- configurations, with the order of both maintained. --- - - function suite.pairsConfigsAndPlatformsInOrder() - configurations { "Debug", "Release" } - platforms { "x86", "x86_64" } - prepare() - test.capture [[ - Debug:x86 - Debug:x86_64 - Release:x86 - Release:x86_64 - ]] - end - - --- --- Test the mapping of a build configuration from workspace to project. --- - - function suite.mapsBuildCfg_toBuildCfg() - configurations { "Debug", "Release" } - configmap { ["Debug"] = "ProjectDebug" } - prepare() - test.capture [[ - ProjectDebug: - Release: - ]] - end - - --- --- Test mapping a platform from workspace to project. --- - - function suite.mapsPlatform_toPlatform() - configurations { "Debug", "Release" } - platforms { "Win32" } - configmap { ["Win32"] = "x86_64" } - prepare() - test.capture [[ - Debug:x86_64 - Release:x86_64 - ]] - end - - --- --- Test mapping a build configuration to a build config/platform pair. --- This will cause a second platform to appear in the project, alongside --- the one defined by the workspace. --- - - function suite.mapsBuildCfg_toBuildCfgAndPlatform() - configurations { "Debug", "Release" } - platforms { "Win32" } - configmap { ["Debug"] = { "ProjectDebug", "x86_64" } } - prepare() - test.capture [[ - ProjectDebug:x86_64 - ProjectDebug:Win32 - Release:x86_64 - Release:Win32 - ]] - end - - --- --- Any duplicate configurations created by the mapping should be removed. --- - - function suite.removesDups_onConfigMapping() - configurations { "Debug", "Development", "Release" } - configmap { ["Development"] = "Debug" } - prepare() - test.capture [[ - Debug: - Release: - ]] - end - - --- --- If there is overlap in the workspace and project configuration lists, --- the ordering at the project level should be maintained to avoid --- unnecessarily dirtying the project file. --- - - function suite.maintainsProjectOrdering_onWorkspaceOverlap() - configurations { "Debug", "Release" } - prepare { "Debug", "Development", "Profile", "Release" } - test.capture [[ - Debug: - Development: - Profile: - Release: - ]] - end - diff --git a/build/premake/premake5/tests/project/test_getconfig.lua b/build/premake/premake5/tests/project/test_getconfig.lua deleted file mode 100755 index 732b7df764..0000000000 --- a/build/premake/premake5/tests/project/test_getconfig.lua +++ /dev/null @@ -1,114 +0,0 @@ --- --- tests/project/test_getconfig.lua --- Test the project object configuration accessor. --- Copyright (c) 2011-2014 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("project_getconfig") - --- --- Setup and teardown --- - - local wks, prj, cfg - - function suite.setup() - wks = workspace("MyWorkspace") - configurations { "Debug", "Release" } - end - - local function prepare(buildcfg, platform) - prj = wks.projects[1] - cfg = test.getconfig(prj, buildcfg or "Debug", platform) - end - - --- --- If the target system is not specified, the current operating environment --- should be used as the default. --- - - function suite.usesCurrentOS_onNoSystemSpecified() - _TARGET_OS = "linux" - project ("MyProject") - filter { "system:linux" } - defines { "correct" } - prepare() - test.isequal("correct", cfg.defines[1]) - end - - --- --- If the current action specifies a target operating environment (i.e. --- Visual Studio targets Windows), that should override the current --- operating environment. --- - - function suite.actionOverridesOS() - _TARGET_OS = "linux" - p.action.set("vs2005") - project ("MyProject") - filter { "system:windows" } - defines { "correct" } - prepare() - test.isequal("correct", cfg.defines[1]) - end - - --- --- If a target system is specified in a configuration, it should override --- the current operating environment, as well as the tool's target OS. --- - - function suite.usesCfgSystem() - _TARGET_OS = "linux" - p.action.set("vs2005") - project ("MyProject") - system "macosx" - filter { "system:macosx" } - defines { "correct" } - prepare() - test.isequal("correct", cfg.defines[1]) - end - - --- --- The current action should be taken into account. --- - - function suite.appliesActionToFilters() - p.action.set("vs2005") - project ("MyProject") - filter { "action:vs2005" } - defines { "correct" } - prepare() - test.isequal("correct", cfg.defines[1]) - end - - --- --- If the platform matches an architecture identifier, and none was set, --- the configuration's architecture should be set to match. --- - - function suite.setsArchitecture_onMatchingPlatform() - platforms { "x86", "x86_64" } - project ("MyProject") - prepare("Debug", "x86") - test.isequal("x86", cfg.architecture) - end - - --- --- If the platform matches an architecture, it should not modify any --- currently set value. --- - - function suite.doesNotOverride_onMatchingPlatform() - platforms { "x86", "x64" } - project ("MyProject") - architecture "x86_64" - prepare("Debug", "x86") - test.isequal("x86_64", cfg.architecture) - end diff --git a/build/premake/premake5/tests/project/test_location.lua b/build/premake/premake5/tests/project/test_location.lua deleted file mode 100644 index fb531ebaf4..0000000000 --- a/build/premake/premake5/tests/project/test_location.lua +++ /dev/null @@ -1,57 +0,0 @@ --- --- tests/project/test_location.lua --- Test handling of the projects's location field. --- Copyright (c) 2013 Jason Perkins and the Premake project --- - - local suite = test.declare("project_location") - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - wks = test.createWorkspace() - end - - local function prepare() - prj = test.getproject(wks, 1) - end - - --- --- If no explicit location is set, the location should be set to the --- directory containing the script which defined the project. --- - - function suite.usesScriptLocation_onNoLocation() - prepare() - test.isequal(os.getcwd(), prj.location) - end - - --- --- If an explicit location has been set, use it. --- - - function suite.usesLocation_onLocationSet() - location "build" - prepare() - test.isequal(path.join(os.getcwd(), "build"), prj.location) - end - - --- --- If the workspace sets a location, and the project does not, it should --- inherit the value from the workspace. --- - - function suite.inheritsWorkspaceLocation_onNoProjectLocation() - workspace () - location "build" - prepare() - test.isequal(path.join(os.getcwd(), "build"), prj.location) - end diff --git a/build/premake/premake5/tests/project/test_sources.lua b/build/premake/premake5/tests/project/test_sources.lua deleted file mode 100644 index 84f5ee57ff..0000000000 --- a/build/premake/premake5/tests/project/test_sources.lua +++ /dev/null @@ -1,94 +0,0 @@ --- --- tests/project/test_sources.lua --- Automated test suite for the source tree, including tokens and wildcards. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("project_sources") - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - local cwd = os.getcwd() - local oldcwd - - function suite.setup() - wks, prj = test.createWorkspace() - - -- We change the directory to get nice relative paths - oldcwd = os.getcwd() - os.chdir(cwd) - - -- Create a token to be used in search paths - p.api.register { name = "mytoken", kind = "string", scope = "config" } - mytoken "test" - end - - function suite.teardown() - mytoken = nil - os.chdir(oldcwd) - end - - local function run() - local cfg = test.getconfig(prj, "Debug") - - local files = {} - for _, file in ipairs(cfg.files) do - table.insert(files, path.getrelative(cwd, file)) - end - - return files - end - - --- --- Test single file --- - - function suite.SingleFile() - files { "test_sources.lua" } - test.isequal({"test_sources.lua"}, run()) - end - --- --- Test tokens --- - - function suite.SingleFileWithToken() - files { "%{cfg.mytoken}_sources.lua" } - test.isequal({"test_sources.lua"}, run()) - end - --- --- Test wildcards --- - - function suite.FilesWithWildcard() - files { "test_*.lua" } - test.contains("test_sources.lua", run()) - end - - function suite.FilesWithRecursiveWildcard() - files { "../**_sources.lua" } - test.contains("test_sources.lua", run()) - end - --- --- Test wildcards and tokens combined --- - - function suite.FilesWithWildcardAndToken() - files { "%{cfg.mytoken}_*.lua" } - test.contains("test_sources.lua", run()) - end - - function suite.FilesWithRecursiveWildcardAndToken() - files { "../**/%{cfg.mytoken}_sources.lua" } - test.contains("test_sources.lua", run()) - end diff --git a/build/premake/premake5/tests/project/test_vpaths.lua b/build/premake/premake5/tests/project/test_vpaths.lua deleted file mode 100644 index f8db598ba6..0000000000 --- a/build/premake/premake5/tests/project/test_vpaths.lua +++ /dev/null @@ -1,151 +0,0 @@ --- --- tests/project/test_vpaths.lua --- Automated test suite for the project support functions. --- Copyright (c) 2011-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("project_vpaths") - local project = p.project - - --- --- Setup and teardown --- - - local wks, prj - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function run() - local cfg = test.getconfig(prj, "Debug") - return project.getvpath(prj, cfg.files[1]) - end - - --- --- Test simple replacements --- - - function suite.ReturnsOriginalPath_OnNoVpaths() - files { "hello.c" } - test.isequal(path.join(os.getcwd(), "hello.c"), run()) - end - - function suite.ReturnsOriginalPath_OnNoMatches() - files { "hello.c" } - vpaths { ["Headers"] = "**.h" } - test.isequal(path.join(os.getcwd(), "hello.c"), run()) - end - - function suite.CanStripPaths() - files { "src/myproject/hello.c" } - vpaths { [""] = "src" } - run() - test.isequal("hello.c", run()) - end - - function suite.CanTrimLeadingPaths() - files { "src/myproject/hello.c" } - vpaths { ["*"] = "src" } - test.isequal("myproject/hello.c", run()) - end - - function suite.PatternMayIncludeTrailingSlash() - files { "src/myproject/hello.c" } - vpaths { [""] = "src/myproject/" } - test.isequal("hello.c", run()) - end - - function suite.SimpleReplacementPatterns() - files { "src/myproject/hello.c" } - vpaths { ["sources"] = "src/myproject" } - test.isequal("sources/hello.c", run()) - end - - function suite.ExactFilenameMatch() - files { "src/hello.c" } - vpaths { ["sources"] = "src/hello.c" } - test.isequal("sources/hello.c", run()) - end - - --- --- Test wildcard patterns --- - - function suite.MatchFilePattern_ToGroup_Flat() - files { "src/myproject/hello.h" } - vpaths { ["Headers"] = "**.h" } - test.isequal("Headers/hello.h", run()) - end - - function suite.MatchFilePattern_ToNone_Flat() - files { "src/myproject/hello.h" } - vpaths { [""] = "**.h" } - test.isequal("hello.h", run()) - end - - function suite.MatchFilePattern_ToNestedGroup_Flat() - files { "src/myproject/hello.h" } - vpaths { ["Source/Headers"] = "**.h" } - test.isequal("Source/Headers/hello.h", run()) - end - - function suite.MatchFilePattern_ToGroup_WithTrailingSlash() - files { "src/myproject/hello.h" } - vpaths { ["Headers/"] = "**.h" } - test.isequal("Headers/hello.h", run()) - end - - function suite.MatchFilePattern_ToGroup_Nested() - files { "src/myproject/hello.h" } - vpaths { ["Headers/*"] = "**.h" } - test.isequal("Headers/src/myproject/hello.h", run()) - end - - function suite.MatchFilePattern_ToGroup_Nested_OneStar() - files { "src/myproject/hello.h" } - vpaths { ["Headers/*"] = "**.h" } - test.isequal("Headers/src/myproject/hello.h", run()) - end - - function suite.MatchFilePatternWithPath_ToGroup_Nested() - files { "src/myproject/hello.h" } - vpaths { ["Headers/*"] = "src/**.h" } - test.isequal("Headers/myproject/hello.h", run()) - end - - function suite.matchBaseFileName_onWildcardExtension() - files { "hello.cpp" } - vpaths { ["Sources"] = "hello.*" } - test.isequal("Sources/hello.cpp", run()) - end - - --- --- Test with project locations --- - - function suite.MatchPath_OnProjectLocationSet() - location "build" - files "src/hello.h" - vpaths { [""] = "src" } - test.isequal("hello.h", run()) - end - - function suite.MatchFilePattern_OnProjectLocationSet() - location "build" - files "src/hello.h" - vpaths { ["Headers"] = "**.h" } - test.isequal("Headers/hello.h", run()) - end - - function suite.MatchFilePatternWithPath_OnProjectLocationSet() - location "build" - files "src/hello.h" - vpaths { ["Headers"] = "src/**.h" } - test.isequal("Headers/hello.h", run()) - end diff --git a/build/premake/premake5/tests/test b/build/premake/premake5/tests/test deleted file mode 100755 index 2dce734f40..0000000000 --- a/build/premake/premake5/tests/test +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cd `dirname $0` && ../bin/debug/premake5 /file=../premake5.lua /scripts=.. $1 $2 $3 test diff --git a/build/premake/premake5/tests/test.bat b/build/premake/premake5/tests/test.bat deleted file mode 100644 index f80ac6ea2a..0000000000 --- a/build/premake/premake5/tests/test.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -pushd "%~dp0" -..\bin\debug\premake5.exe /scripts=.. /file=..\premake5.lua %* test -popd diff --git a/build/premake/premake5/tests/test_premake.lua b/build/premake/premake5/tests/test_premake.lua deleted file mode 100644 index 5eec58a07d..0000000000 --- a/build/premake/premake5/tests/test_premake.lua +++ /dev/null @@ -1,37 +0,0 @@ --- --- tests/test_premake.lua --- Automated test suite for the Premake support functions. --- Copyright (c) 2008-2015 Jason Perkins and the Premake project --- - - - local suite = test.declare("premake") - - local p = premake - - --- --- Setup --- - - local wks, prj - function suite.setup() - wks = test.createWorkspace() - location "MyLocation" - prj = p.workspace.getproject(wks, 1) - end - - --- --- generate() tests --- - - function suite.generate_OpensCorrectFile() - p.generate(prj, ".prj", function () end) - test.openedfile(path.join(os.getcwd(), "MyLocation/MyProject.prj")) - end - - function suite.generate_ClosesFile() - p.generate(prj, ".prj", function () end) - test.closedfile(true) - end diff --git a/build/premake/premake5/tests/test_stress.lua b/build/premake/premake5/tests/test_stress.lua deleted file mode 100644 index 2f1fa98dd7..0000000000 --- a/build/premake/premake5/tests/test_stress.lua +++ /dev/null @@ -1,72 +0,0 @@ ---- --- tests/tests_stress.lua --- --- Stress test for Premake. Creates a large (tunable, see local variables --- at start of file) number of projects, files, and configurations. Then --- generates them all while profiling the result. --- --- Run it like normal, i.e. `premake5 --file=test_stress.lua gmake`. The --- profile results will be placed at `build/profile.txt`. --- --- Copyright (c) 2009-2015 Jason Perkins and the Premake project ---- - --- --- Test parameters --- - - local numProjects = 15 - local numFiles = 100 - local numBuildCfgs = 6 - local numPlatforms = 6 - - local prjKind = "ConsoleApp" - local prjLanguage = "C++" - - --- --- Generate the workspace and projects --- - - workspace "MyWorkspace" - location "build" - - for i = 1, numBuildCfgs do - configurations ( "BuildCfg" .. i ) - end - - for i = 1, numPlatforms do - platforms ( "Platform" .. i ) - end - - for i = 1, numProjects do - project ("Project" .. i) - location "build" - kind ( prjKind ) - language ( prjLanguage ) - - for j = 1, numFiles do - files { "file" .. j .. ".cpp" } - end - end - - --- --- Install profiling extensions --- TODO: would be nice to build these into the core exe, and could be --- triggered with a flag, i.e. `premake5 --profile gmake` --- - - dofile("pepperfish_profiler.lua") - profiler = newProfiler() - profiler:start() - - premake.override(premake.main, "postAction", function(base) - base() - - profiler:stop() - - local outfile = io.open("build/profile.txt", "w+" ) - profiler:report(outfile) - outfile:close() - end) diff --git a/build/premake/premake5/tests/test_string.lua b/build/premake/premake5/tests/test_string.lua deleted file mode 100644 index 08a931f3ef..0000000000 --- a/build/premake/premake5/tests/test_string.lua +++ /dev/null @@ -1,100 +0,0 @@ --- --- tests/test_string.lua --- Automated test suite for the new string functions. --- Copyright (c) 2008 Jason Perkins and the Premake project --- - - local suite = test.declare("string") - - --- --- string.endswith() tests --- - - function suite.endswith_ReturnsTrue_OnMatch() - test.istrue(string.endswith("Abcdef", "def")) - end - - function suite.endswith_ReturnsFalse_OnMismatch() - test.isfalse(string.endswith("Abcedf", "efg")) - end - - function suite.endswith_ReturnsFalse_OnLongerNeedle() - test.isfalse(string.endswith("Abc", "Abcdef")) - end - - function suite.endswith_ReturnsFalse_OnNilHaystack() - test.isfalse(string.endswith(nil, "ghi")) - end - - function suite.endswith_ReturnsFalse_OnNilNeedle() - test.isfalse(string.endswith("Abc", nil)) - end - - function suite.endswith_ReturnsTrue_OnExactMatch() - test.istrue(string.endswith("/", "/")) - end - - - --- --- string.explode() tests --- - - function suite.explode_ReturnsParts_OnValidCall() - test.isequal({"aaa","bbb","ccc"}, string.explode("aaa/bbb/ccc", "/", true)) - end - - - --- --- string.startswith() tests --- - - function suite.startswith_OnMatch() - test.istrue(string.startswith("Abcdef", "Abc")) - end - - function suite.startswith_OnMismatch() - test.isfalse(string.startswith("Abcdef", "ghi")) - end - - function suite.startswith_OnLongerNeedle() - test.isfalse(string.startswith("Abc", "Abcdef")) - end - - function suite.startswith_OnEmptyHaystack() - test.isfalse(string.startswith("", "Abc")) - end - - function suite.startswith_OnEmptyNeedle() - test.istrue(string.startswith("Abcdef", "")) - end - - - --- --- string.escapepattern() tests --- - - function suite.escapepattern_escapes() - test.isequal("boost_filesystem%-vc140%.1%.61%.0%.0", string.escapepattern("boost_filesystem-vc140.1.61.0.0")) - test.isequal("footage/down/temp/cars_%[100%]_upper/cars_%[100%]_upper%.exr", string.escapepattern("footage/down/temp/cars_[100]_upper/cars_[100]_upper.exr")) - end - - function suite.escapepattern_doesntEscape() - local s = '' - test.isequal(s, s:escapepattern()) - - s = 'lorem ipsum dolor sit amet' - test.isequal(s, s:escapepattern()) - - s = 'forward/slashes/foo/bar' - test.isequal(s, s:escapepattern()) - - s = '\\back\\slashes' - test.isequal(s, s:escapepattern()) - - s = 'new\nlines' - test.isequal(s, s:escapepattern()) - end diff --git a/build/premake/premake5/tests/tools/test_dotnet.lua b/build/premake/premake5/tests/tools/test_dotnet.lua deleted file mode 100644 index 362a0b7473..0000000000 --- a/build/premake/premake5/tests/tools/test_dotnet.lua +++ /dev/null @@ -1,57 +0,0 @@ --- --- tests/tools/test_dotnet.lua --- Automated test suite for the .NET toolset interface. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("tools_dotnet") - local dotnet = p.tools.dotnet - - --- --- Setup/teardown --- - - local wks, prj, cfg - - function suite.setup() - wks, prj = test.createWorkspace() - end - - local function prepare() - cfg = test.getconfig(prj, "Debug") - end - - --- --- On Windows, use Microsoft's CSC compiler by default. --- - - function suite.defaultCompiler_onWindows() - _TARGET_OS = "windows" - prepare() - test.isequal("csc", dotnet.gettoolname(cfg, "csc")) - end - - --- --- Everywhere other than Windows, use Mono by default. --- - - function suite.defaultCompiler_onMacOSX() - _TARGET_OS = "macosx" - prepare() - test.isequal("csc", dotnet.gettoolname(cfg, "csc")) - end - - --- --- Check support for the `csversion` API --- - -function suite.flags_csversion() - prepare() - csversion "7.2" - test.contains({ "/langversion:7.2" }, dotnet.getflags(cfg)) -end diff --git a/build/premake/premake5/tests/tools/test_gcc.lua b/build/premake/premake5/tests/tools/test_gcc.lua deleted file mode 100644 index dfab6d2b88..0000000000 --- a/build/premake/premake5/tests/tools/test_gcc.lua +++ /dev/null @@ -1,913 +0,0 @@ --- --- tests/test_gcc.lua --- Automated test suite for the GCC toolset interface. --- Copyright (c) 2009-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("tools_gcc") - - local gcc = p.tools.gcc - local project = p.project - - --- --- Setup/teardown --- - - local wks, prj, cfg - - function suite.setup() - wks, prj = test.createWorkspace() - system "Linux" - end - - local function prepare() - cfg = test.getconfig(prj, "Debug") - end - - --- --- Check the selection of tools based on the target system. --- - - function suite.tools_onDefaults() - prepare() - test.isnil(gcc.gettoolname(cfg, "cc")) - test.isnil(gcc.gettoolname(cfg, "cxx")) - test.isnil(gcc.gettoolname(cfg, "ar")) - test.isequal("windres", gcc.gettoolname(cfg, "rc")) - end - - function suite.tools_withPrefix() - gccprefix "test-prefix-" - prepare() - test.isequal("test-prefix-gcc", gcc.gettoolname(cfg, "cc")) - test.isequal("test-prefix-g++", gcc.gettoolname(cfg, "cxx")) - test.isequal("test-prefix-ar", gcc.gettoolname(cfg, "ar")) - test.isequal("test-prefix-windres", gcc.gettoolname(cfg, "rc")) - end - - --- --- By default, the -MMD -MP are used to generate dependencies. --- - - function suite.cppflags_defaultWithMMD() - prepare() - test.contains({"-MMD", "-MP"}, gcc.getcppflags(cfg)) - end - - --- --- Haiku OS doesn't support the -MP flag yet (that's weird, isn't it?) --- - - function suite.cppflagsExcludeMP_onHaiku() - system "Haiku" - prepare() - test.excludes({ "-MP" }, gcc.getcppflags(cfg)) - end - - --- --- Check the translation of CFLAGS. --- - - function suite.cflags_onExtraWarnings() - warnings "extra" - prepare() - test.contains({ "-Wall", "-Wextra" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onHighWarnings() - warnings "high" - prepare() - test.contains({ "-Wall" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onFatalWarnings() - flags { "FatalWarnings" } - prepare() - test.contains({ "-Werror" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onSpecificWarnings() - enablewarnings { "enable" } - disablewarnings { "disable" } - fatalwarnings { "fatal" } - prepare() - test.contains({ "-Wenable", "-Wno-disable", "-Werror=fatal" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onFloastFast() - floatingpoint "Fast" - prepare() - test.contains({ "-ffast-math" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onFloastStrict() - floatingpoint "Strict" - prepare() - test.contains({ "-ffloat-store" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onNoWarnings() - warnings "Off" - prepare() - test.contains({ "-w" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onSSE() - vectorextensions "SSE" - prepare() - test.contains({ "-msse" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onSSE2() - vectorextensions "SSE2" - prepare() - test.contains({ "-msse2" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onAVX() - vectorextensions "AVX" - prepare() - test.contains({ "-mavx" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onAVX2() - vectorextensions "AVX2" - prepare() - test.contains({ "-mavx2" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onMOVBE() - isaextensions "MOVBE" - prepare() - test.contains({ "-mmovbe" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onPOPCNT() - isaextensions "POPCNT" - prepare() - test.contains({ "-mpopcnt" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onPCLMUL() - isaextensions "PCLMUL" - prepare() - test.contains({ "-mpclmul" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onLZCNT() - isaextensions "LZCNT" - prepare() - test.contains({ "-mlzcnt" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onBMI() - isaextensions "BMI" - prepare() - test.contains({ "-mbmi" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onBMI2() - isaextensions "BMI2" - prepare() - test.contains({ "-mbmi2" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onF16C() - isaextensions "F16C" - prepare() - test.contains({ "-mf16c" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onAES() - isaextensions "AES" - prepare() - test.contains({ "-maes" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onFMA() - isaextensions "FMA" - prepare() - test.contains({ "-mfma" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onFMA4() - isaextensions "FMA4" - prepare() - test.contains({ "-mfma4" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onRDRND() - isaextensions "RDRND" - prepare() - test.contains({ "-mrdrnd" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onMultipleISA() - isaextensions { - "RDRND", - "FMA4" - } - prepare() - test.contains({ "-mrdrnd", "-mfma4" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onAdditionalISA() - isaextensions "RDRND" - isaextensions "FMA4" - prepare() - test.contains({ "-mrdrnd", "-mfma4" }, gcc.getcflags(cfg)) - end - --- --- Check the defines and undefines. --- - - function suite.defines() - defines "DEF" - prepare() - test.contains({ "-DDEF" }, gcc.getdefines(cfg.defines)) - end - - function suite.undefines() - undefines "UNDEF" - prepare() - test.contains({ "-UUNDEF" }, gcc.getundefines(cfg.undefines)) - end - - --- --- Check the optimization flags. --- - - function suite.cflags_onNoOptimize() - optimize "Off" - prepare() - test.contains({ "-O0" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onOptimize() - optimize "On" - prepare() - test.contains({ "-O2" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeSize() - optimize "Size" - prepare() - test.contains({ "-Os" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeSpeed() - optimize "Speed" - prepare() - test.contains({ "-O3" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeFull() - optimize "Full" - prepare() - test.contains({ "-O3" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeDebug() - optimize "Debug" - prepare() - test.contains({ "-Og" }, gcc.getcflags(cfg)) - end - - --- --- Check the translation of symbols. --- - - function suite.cflags_onDefaultSymbols() - prepare() - test.excludes({ "-g" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onNoSymbols() - symbols "Off" - prepare() - test.excludes({ "-g" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onSymbols() - symbols "On" - prepare() - test.contains({ "-g" }, gcc.getcflags(cfg)) - end - - --- --- Check the translation of CXXFLAGS. --- - - function suite.cflags_onNoExceptions() - exceptionhandling "Off" - prepare() - test.contains({ "-fno-exceptions" }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_onNoBufferSecurityCheck() - flags { "NoBufferSecurityCheck" } - prepare() - test.contains({ "-fno-stack-protector" }, gcc.getcxxflags(cfg)) - end - --- --- Check the basic translation of LDFLAGS for a Posix system. --- - - function suite.ldflags_onNoSymbols() - prepare() - test.contains({ "-s" }, gcc.getldflags(cfg)) - end - - function suite.ldflags_onSymbols() - symbols "On" - prepare() - test.excludes("-s", gcc.getldflags(cfg)) - end - - function suite.ldflags_onSharedLib() - kind "SharedLib" - prepare() - test.contains({ "-shared" }, gcc.getldflags(cfg)) - end - --- --- Check Mac OS X variants on LDFLAGS. --- - - function suite.ldflags_onMacOSXBundle() - system "MacOSX" - kind "SharedLib" - sharedlibtype "OSXBundle" - prepare() - test.contains({ "-Wl,-x", "-bundle" }, gcc.getldflags(cfg)) - end - - function suite.ldflags_onMacOSXXCTest() - system "MacOSX" - kind "SharedLib" - sharedlibtype "XCTest" - prepare() - test.contains({ "-Wl,-x", "-bundle" }, gcc.getldflags(cfg)) - end - - function suite.ldflags_onMacOSXFramework() - system "MacOSX" - kind "SharedLib" - sharedlibtype "OSXFramework" - prepare() - test.contains({ "-Wl,-x", "-framework" }, gcc.getldflags(cfg)) - end - - function suite.ldflags_onMacOSXNoSymbols() - system "MacOSX" - prepare() - test.contains({ "-Wl,-x" }, gcc.getldflags(cfg)) - end - - function suite.ldflags_onMacOSXSharedLib() - system "MacOSX" - kind "SharedLib" - prepare() - test.contains({ "-dynamiclib" }, gcc.getldflags(cfg)) - end - - --- --- Check Windows variants on LDFLAGS. --- - - function suite.ldflags_onWindowsharedLib() - system "Windows" - kind "SharedLib" - prepare() - test.contains({ "-shared", '-Wl,--out-implib="bin/Debug/MyProject.lib"' }, gcc.getldflags(cfg)) - end - - function suite.ldflags_onWindowsApp() - system "Windows" - kind "WindowedApp" - prepare() - test.contains({ "-mwindows" }, gcc.getldflags(cfg)) - end - - - --- --- Make sure system or architecture flags are added properly. --- - - function suite.cflags_onX86() - architecture "x86" - prepare() - test.contains({ "-m32" }, gcc.getcflags(cfg)) - end - - function suite.ldflags_onX86() - architecture "x86" - prepare() - test.contains({ "-m32" }, gcc.getldflags(cfg)) - end - - function suite.cflags_onX86_64() - architecture "x86_64" - prepare() - test.contains({ "-m64" }, gcc.getcflags(cfg)) - end - - function suite.ldflags_onX86_64() - architecture "x86_64" - prepare() - test.contains({ "-m64" }, gcc.getldflags(cfg)) - end - - --- --- Non-Windows shared libraries should marked as position independent. --- - - function suite.cflags_onWindowsSharedLib() - system "MacOSX" - kind "SharedLib" - prepare() - test.contains({ "-fPIC" }, gcc.getcflags(cfg)) - end - - --- --- Check the formatting of linked system libraries. --- - - function suite.links_onSystemLibs() - links { "fs_stub", "net_stub" } - prepare() - test.contains({ "-lfs_stub", "-lnet_stub" }, gcc.getlinks(cfg)) - end - - function suite.links_onFramework() - links { "Cocoa.framework" } - prepare() - test.contains({ "-framework Cocoa" }, {table.implode (gcc.getlinks(cfg), '', '', ' ')}) - end - - function suite.links_onSystemLibs_onWindows() - system "windows" - links { "ole32" } - prepare() - test.contains({ "-lole32" }, gcc.getlinks(cfg)) - end - - --- --- When linking to a static sibling library, the relative path to the library --- should be used instead of the "-l" flag. This prevents linking against a --- shared library of the same name, should one be present. --- - - function suite.links_onStaticSiblingLibrary() - links { "MyProject2" } - - test.createproject(wks) - system "Linux" - kind "StaticLib" - targetdir "lib" - - prepare() - test.isequal({ "lib/libMyProject2.a" }, gcc.getlinks(cfg)) - end - - --- --- Use the -lname format when linking to sibling shared libraries. --- - - function suite.links_onSharedSiblingLibrary() - links { "MyProject2" } - - test.createproject(wks) - system "Linux" - kind "SharedLib" - targetdir "lib" - - prepare() - test.isequal({ "lib/libMyProject2.so" }, gcc.getlinks(cfg)) - end - - --- --- Test that sibling and external links are grouped when required --- - - function suite.linkgroups_onSiblingAndExternalLibrary() - links { "MyProject2", "ExternalProj" } - linkgroups "On" - - test.createproject(wks) - system "Linux" - kind "StaticLib" - targetdir "lib" - - prepare() - test.isequal({ "-Wl,--start-group", "lib/libMyProject2.a", "-lExternalProj", "-Wl,--end-group" }, gcc.getlinks(cfg)) - end - - --- --- When linking object files, leave off the "-l". --- - - function suite.links_onObjectFile() - links { "generated.o" } - prepare() - test.isequal({ "generated.o" }, gcc.getlinks(cfg)) - end - - --- --- If the object file is referenced with a path, it should be --- made relative to the project. --- - - function suite.links_onObjectFileOutsideProject() - location "MyProject" - links { "obj/Debug/generated.o" } - prepare() - test.isequal({ "../obj/Debug/generated.o" }, gcc.getlinks(cfg)) - end - - --- --- Make sure shell variables are kept intact for object file paths. --- - - function suite.links_onObjectFileWithShellVar() - location "MyProject" - links { "$(IntDir)/generated.o" } - prepare() - test.isequal({ "$(IntDir)/generated.o" }, gcc.getlinks(cfg)) - end - - --- --- Include directories should be made project relative. --- - - function suite.includeDirsAreRelative() - includedirs { "../include", "src/include" } - prepare() - test.isequal({ '-I../include', '-Isrc/include' }, gcc.getincludedirs(cfg, cfg.includedirs)) - end - - --- --- Check handling of forced includes. --- - - function suite.forcedIncludeFiles() - forceincludes { "stdafx.h", "include/sys.h" } - prepare() - test.isequal({'-include stdafx.h', '-include include/sys.h'}, gcc.getforceincludes(cfg)) - end - - --- --- Include directories containing spaces (or which could contain spaces) --- should be wrapped in quotes. --- - - function suite.includeDirs_onSpaces() - includedirs { "include files" } - prepare() - test.isequal({ '-I"include files"' }, gcc.getincludedirs(cfg, cfg.includedirs)) - end - - function suite.includeDirs_onEnvVars() - includedirs { "$(IntDir)/includes" } - prepare() - test.isequal({ '-I"$(IntDir)/includes"' }, gcc.getincludedirs(cfg, cfg.includedirs)) - end - - - --- --- Check handling of strict aliasing flags. --- - - function suite.cflags_onNoStrictAliasing() - strictaliasing "Off" - prepare() - test.contains("-fno-strict-aliasing", gcc.getcflags(cfg)) - end - - function suite.cflags_onLevel1Aliasing() - strictaliasing "Level1" - prepare() - test.contains({ "-fstrict-aliasing", "-Wstrict-aliasing=1" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onLevel2Aliasing() - strictaliasing "Level2" - prepare() - test.contains({ "-fstrict-aliasing", "-Wstrict-aliasing=2" }, gcc.getcflags(cfg)) - end - - function suite.cflags_onLevel3Aliasing() - strictaliasing "Level3" - prepare() - test.contains({ "-fstrict-aliasing", "-Wstrict-aliasing=3" }, gcc.getcflags(cfg)) - end - - --- --- Check handling of system search paths. --- - - function suite.includeDirs_onSysIncludeDirs() - sysincludedirs { "/usr/local/include" } - prepare() - test.contains("-isystem /usr/local/include", gcc.getincludedirs(cfg, cfg.includedirs, cfg.sysincludedirs)) - end - - function suite.libDirs_onSysLibDirs() - syslibdirs { "/usr/local/lib" } - prepare() - test.contains("-L/usr/local/lib", gcc.getLibraryDirectories(cfg)) - end - - --- --- Check handling of link time optimization flag. --- - - function suite.cflags_onLinkTimeOptimization() - flags "LinkTimeOptimization" - prepare() - test.contains("-flto", gcc.getcflags(cfg)) - end - - function suite.ldflags_onLinkTimeOptimization() - flags "LinkTimeOptimization" - prepare() - test.contains("-flto", gcc.getldflags(cfg)) - end - - --- --- Check link mode preference for system libraries. --- - function suite.linksModePreference_onAllStatic() - links { "fs_stub:static", "net_stub:static" } - prepare() - test.contains({ "-Wl,-Bstatic", "-lfs_stub", "-Wl,-Bdynamic", "-lnet_stub"}, gcc.getlinks(cfg)) - end - - function suite.linksModePreference_onStaticAndShared() - links { "fs_stub:static", "net_stub" } - prepare() - test.contains({ "-Wl,-Bstatic", "-lfs_stub", "-Wl,-Bdynamic", "-lnet_stub"}, gcc.getlinks(cfg)) - end - - function suite.linksModePreference_onAllShared() - links { "fs_stub:shared", "net_stub:shared" } - prepare() - test.excludes({ "-Wl,-Bstatic" }, gcc.getlinks(cfg)) - end - - --- --- Test language flags are added properly. --- - - function suite.cflags_onCDefault() - cdialect "Default" - prepare() - test.contains({ }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_onC89() - cdialect "C89" - prepare() - test.contains({ "-std=c89" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_onC90() - cdialect "C90" - prepare() - test.contains({ "-std=c90" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_onC99() - cdialect "C99" - prepare() - test.contains({ "-std=c99" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_onC11() - cdialect "C11" - prepare() - test.contains({ "-std=c11" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_ongnu89() - cdialect "gnu89" - prepare() - test.contains({ "-std=gnu89" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_ongnu90() - cdialect "gnu90" - prepare() - test.contains({ "-std=gnu90" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_ongnu99() - cdialect "gnu99" - prepare() - test.contains({ "-std=gnu99" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cflags_ongnu11() - cdialect "gnu11" - prepare() - test.contains({ "-std=gnu11" }, gcc.getcflags(cfg)) - test.contains({ }, gcc.getcxxflags(cfg)) - end - - function suite.cxxflags_onCppDefault() - cppdialect "Default" - prepare() - test.contains({ }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCpp98() - cppdialect "C++98" - prepare() - test.contains({ "-std=c++98" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCpp11() - cppdialect "C++11" - prepare() - test.contains({ "-std=c++11" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCpp14() - cppdialect "C++14" - prepare() - test.contains({ "-std=c++14" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCpp17() - cppdialect "C++17" - prepare() - test.contains({ "-std=c++17" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCppGnu98() - cppdialect "gnu++98" - prepare() - test.contains({ "-std=gnu++98" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCppGnu11() - cppdialect "gnu++11" - prepare() - test.contains({ "-std=gnu++11" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCppGnu14() - cppdialect "gnu++14" - prepare() - test.contains({ "-std=gnu++14" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - - function suite.cxxflags_onCppGnu17() - cppdialect "gnu++17" - prepare() - test.contains({ "-std=gnu++17" }, gcc.getcxxflags(cfg)) - test.contains({ }, gcc.getcflags(cfg)) - end - --- --- Test unsigned-char flags. --- - - function suite.sharedflags_onUnsignedChar() - unsignedchar "On" - - prepare() - test.contains({ "-funsigned-char" }, gcc.getcxxflags(cfg)) - test.contains({ "-funsigned-char" }, gcc.getcflags(cfg)) - end - - function suite.sharedflags_onNoUnsignedChar() - unsignedchar "Off" - - prepare() - test.contains({ "-fno-unsigned-char" }, gcc.getcxxflags(cfg)) - test.contains({ "-fno-unsigned-char" }, gcc.getcflags(cfg)) - end - --- --- Test omit-frame-pointer flags. --- - - function suite.sharedflags_onOmitFramePointerDefault() - omitframepointer "Default" - - prepare() - test.excludes({ "-fomit-frame-pointer", "-fno-omit-frame-pointer" }, gcc.getcxxflags(cfg)) - test.excludes({ "-fomit-frame-pointer", "-fno-omit-frame-pointer" }, gcc.getcflags(cfg)) - end - - function suite.sharedflags_onOmitFramePointer() - omitframepointer "On" - - prepare() - test.contains({ "-fomit-frame-pointer" }, gcc.getcxxflags(cfg)) - test.contains({ "-fomit-frame-pointer" }, gcc.getcflags(cfg)) - end - - function suite.sharedflags_onNoOmitFramePointer() - omitframepointer "Off" - - prepare() - test.contains({ "-fno-omit-frame-pointer" }, gcc.getcxxflags(cfg)) - test.contains({ "-fno-omit-frame-pointer" }, gcc.getcflags(cfg)) - end - --- --- Test visibility. --- - - function suite.cxxflags_onVisibilityDefault() - visibility "Default" - prepare() - test.excludes({ "-fvisibility=default" }, gcc.getcflags(cfg)) - test.contains({ "-fvisibility=default" }, gcc.getcxxflags(cfg)) - end - - function suite.cxxflags_onVisibilityHidden() - visibility "Hidden" - prepare() - test.excludes({ "-fvisibility=hidden" }, gcc.getcflags(cfg)) - test.contains({ "-fvisibility=hidden" }, gcc.getcxxflags(cfg)) - end - - function suite.cxxflags_onVisibilityInternal() - visibility "Internal" - prepare() - test.excludes({ "-fvisibility=internal" }, gcc.getcflags(cfg)) - test.contains({ "-fvisibility=internal" }, gcc.getcxxflags(cfg)) - end - - function suite.cxxflags_onVisibilityProtected() - visibility "Protected" - prepare() - test.excludes({ "-fvisibility=protected" }, gcc.getcflags(cfg)) - test.contains({ "-fvisibility=protected" }, gcc.getcxxflags(cfg)) - end - --- --- Test inlines visibility flags. --- - - function suite.cxxflags_onInlinesVisibilityDefault() - inlinesvisibility "Default" - prepare() - test.excludes({ "-fvisibility-inlines-hidden" }, gcc.getcflags(cfg)) - test.excludes({ "-fvisibility-inlines-hidden" }, gcc.getcxxflags(cfg)) - end - - function suite.cxxflags_onInlinesVisibilityHidden() - inlinesvisibility "Hidden" - prepare() - test.excludes({ "-fvisibility-inlines-hidden" }, gcc.getcflags(cfg)) - test.contains({ "-fvisibility-inlines-hidden" }, gcc.getcxxflags(cfg)) - end diff --git a/build/premake/premake5/tests/tools/test_msc.lua b/build/premake/premake5/tests/tools/test_msc.lua deleted file mode 100644 index 341e0afb0e..0000000000 --- a/build/premake/premake5/tests/tools/test_msc.lua +++ /dev/null @@ -1,508 +0,0 @@ --- --- tests/test_msc.lua --- Automated test suite for the Microsoft C toolset interface. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("tools_msc") - - local msc = p.tools.msc - - --- --- Setup/teardown --- - - local wks, prj, cfg - - function suite.setup() - wks, prj = test.createWorkspace() - kind "SharedLib" - end - - local function prepare() - cfg = test.getconfig(prj, "Debug") - end - - --- --- Check the optimization flags. --- - - function suite.cflags_onNoOptimize() - optimize "Off" - prepare() - test.contains("/Od", msc.getcflags(cfg)) - end - - function suite.cflags_onOptimize() - optimize "On" - prepare() - test.contains("/Ot", msc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeSize() - optimize "Size" - prepare() - test.contains("/O1", msc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeSpeed() - optimize "Speed" - prepare() - test.contains("/O2", msc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeFull() - optimize "Full" - prepare() - test.contains("/Ox", msc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeDebug() - optimize "Debug" - prepare() - test.contains("/Od", msc.getcflags(cfg)) - end - - function suite.cflags_onNoFramePointers() - flags "NoFramePointer" - prepare() - test.contains("/Oy", msc.getcflags(cfg)) - end - - function suite.cflags_onOmitFramePointer() - omitframepointer "On" - prepare() - test.contains("/Oy", msc.getcflags(cfg)) - end - - function suite.cflags_onNoOmitFramePointers() - omitframepointer "Off" - prepare() - test.excludes("/Oy", msc.getcflags(cfg)) - end - - function suite.ldflags_onLinkTimeOptimizations() - flags "LinkTimeOptimization" - prepare() - test.contains("/GL", msc.getldflags(cfg)) - end - - function suite.cflags_onStringPoolingOn() - stringpooling "On" - prepare() - test.contains("/GF", msc.getcflags(cfg)) - end - - function suite.cflags_onStringPoolingOff() - stringpooling "Off" - prepare() - test.contains("/GF-", msc.getcflags(cfg)) - end - - function suite.cflags_onStringPoolingNotSpecified() - prepare() - test.excludes("/GF", msc.getcflags(cfg)) - test.excludes("/GF-", msc.getcflags(cfg)) - end - - function suite.cflags_onFloatingPointExceptionsOn() - floatingpointexceptions "On" - prepare() - test.contains("/fp:except", msc.getcflags(cfg)) - end - - function suite.cflags_onFloatingPointExceptionsOff() - floatingpointexceptions "Off" - prepare() - test.contains("/fp:except-", msc.getcflags(cfg)) - end - - function suite.cflags_onFloatingPointExceptionsNotSpecified() - prepare() - test.excludes("/fp:except", msc.getcflags(cfg)) - test.excludes("/fp:except-", msc.getcflags(cfg)) - end - - function suite.cflags_onFunctionLevelLinkingOn() - functionlevellinking "On" - prepare() - test.contains("/Gy", msc.getcflags(cfg)) - end - - function suite.cflags_onFunctionLevelLinkingOff() - functionlevellinking "Off" - prepare() - test.contains("/Gy-", msc.getcflags(cfg)) - end - - function suite.cflags_onFunctionLevelLinkingNotSpecified() - prepare() - test.excludes("/Gy", msc.getcflags(cfg)) - test.excludes("/Gy-", msc.getcflags(cfg)) - end - - function suite.cflags_onIntrinsicsOn() - intrinsics "On" - prepare() - test.contains("/Oi", msc.getcflags(cfg)) - end - --- --- Check the translation of symbols. --- - - function suite.cflags_onDefaultSymbols() - prepare() - test.excludes({ "/Z7" }, msc.getcflags(cfg)) - end - - function suite.cflags_onNoSymbols() - symbols "Off" - prepare() - test.excludes({ "/Z7" }, msc.getcflags(cfg)) - end - - function suite.cflags_onSymbols() - symbols "On" - prepare() - test.contains({ "/Z7" }, msc.getcflags(cfg)) - end - - --- --- Check the translation of unsignedchar. --- - - function suite.sharedflags_onUnsignedCharOn() - unsignedchar "On" - prepare() - test.contains({ "/J" }, msc.getcflags(cfg)) - test.contains({ "/J" }, msc.getcxxflags(cfg)) - end - - function suite.sharedflags_onUnsignedCharOff() - unsignedchar "Off" - prepare() - test.excludes({ "/J" }, msc.getcflags(cfg)) - test.excludes({ "/J" }, msc.getcxxflags(cfg)) - end - - --- --- Check handling of debugging support. --- - - function suite.ldflags_onSymbols() - symbols "On" - prepare() - test.contains("/DEBUG", msc.getldflags(cfg)) - end - - --- --- Check handling warnings and errors. --- - - function suite.cflags_OnNoWarnings() - warnings "Off" - prepare() - test.contains("/W0", msc.getcflags(cfg)) - end - - function suite.cflags_OnHighWarnings() - warnings "High" - prepare() - test.contains("/W4", msc.getcflags(cfg)) - end - - function suite.cflags_OnExtraWarnings() - warnings "Extra" - prepare() - test.contains("/W4", msc.getcflags(cfg)) - end - - function suite.cflags_OnFatalWarnings() - flags "FatalWarnings" - prepare() - test.contains("/WX", msc.getcflags(cfg)) - end - - function suite.cflags_onSpecificWarnings() - enablewarnings { "enable" } - disablewarnings { "disable" } - fatalwarnings { "fatal" } - prepare() - test.contains({ '/w1"enable"', '/wd"disable"', '/we"fatal"' }, msc.getcflags(cfg)) - end - - function suite.ldflags_OnFatalWarnings() - flags "FatalWarnings" - prepare() - test.contains("/WX", msc.getldflags(cfg)) - end - - --- --- Check handling of library search paths. --- - - function suite.libdirs_onLibdirs() - libdirs { "../libs" } - prepare() - test.contains('/LIBPATH:"../libs"', msc.getLibraryDirectories(cfg)) - end - - --- --- Check handling of forced includes. --- - - function suite.forcedIncludeFiles() - forceincludes { "include/sys.h" } - prepare() - test.contains('/FIinclude/sys.h', msc.getforceincludes(cfg)) - end - - --- --- Check handling of floating point modifiers. --- - - function suite.cflags_onFloatingPointFast() - floatingpoint "Fast" - prepare() - test.contains("/fp:fast", msc.getcflags(cfg)) - end - - function suite.cflags_onFloatingPointStrict() - floatingpoint "Strict" - prepare() - test.contains("/fp:strict", msc.getcflags(cfg)) - end - - function suite.cflags_onSSE() - vectorextensions "SSE" - prepare() - test.contains("/arch:SSE", msc.getcflags(cfg)) - end - - function suite.cflags_onSSE2() - vectorextensions "SSE2" - prepare() - test.contains("/arch:SSE2", msc.getcflags(cfg)) - end - - function suite.cflags_onAVX() - vectorextensions "AVX" - prepare() - test.contains("/arch:AVX", msc.getcflags(cfg)) - end - - function suite.cflags_onAVX2() - vectorextensions "AVX2" - prepare() - test.contains("/arch:AVX2", msc.getcflags(cfg)) - end - - --- --- Check the defines and undefines. --- - - function suite.defines() - defines "DEF" - prepare() - test.contains({ '/D"DEF"' }, msc.getdefines(cfg.defines, cfg)) - end - - function suite.undefines() - undefines "UNDEF" - prepare() - test.contains({ '/U"UNDEF"' }, msc.getundefines(cfg.undefines)) - end - - --- --- Check compilation options. --- - - function suite.cflags_onNoMinimalRebuild() - flags "NoMinimalRebuild" - prepare() - test.contains("/Gm-", msc.getcflags(cfg)) - end - - function suite.cflags_onMultiProcessorCompile() - flags "MultiProcessorCompile" - prepare() - test.contains("/MP", msc.getcflags(cfg)) - end - - --- --- Check handling of C++ language features. --- - - function suite.cxxflags_onExceptions() - exceptionhandling "on" - prepare() - test.contains("/EHsc", msc.getcxxflags(cfg)) - end - - function suite.cxxflags_onSEH() - exceptionhandling "SEH" - prepare() - test.contains("/EHa", msc.getcxxflags(cfg)) - end - - function suite.cxxflags_onNoExceptions() - exceptionhandling "Off" - prepare() - test.missing("/EHsc", msc.getcxxflags(cfg)) - end - - function suite.cxxflags_onNoRTTI() - rtti "Off" - prepare() - test.contains("/GR-", msc.getcxxflags(cfg)) - end - - --- --- Check handling of additional linker options. --- - - function suite.ldflags_onOmitDefaultLibrary() - flags "OmitDefaultLibrary" - prepare() - test.contains("/NODEFAULTLIB", msc.getldflags(cfg)) - end - - function suite.ldflags_onNoIncrementalLink() - flags "NoIncrementalLink" - prepare() - test.contains("/INCREMENTAL:NO", msc.getldflags(cfg)) - end - - function suite.ldflags_onNoManifest() - flags "NoManifest" - prepare() - test.contains("/MANIFEST:NO", msc.getldflags(cfg)) - end - - function suite.ldflags_onDLL() - kind "SharedLib" - prepare() - test.contains("/DLL", msc.getldflags(cfg)) - end - - - --- --- Check handling of CLR settings. --- - - function suite.cflags_onClrOn() - clr "On" - prepare() - test.contains("/clr", msc.getcflags(cfg)) - end - - function suite.cflags_onClrUnsafe() - clr "Unsafe" - prepare() - test.contains("/clr", msc.getcflags(cfg)) - end - - function suite.cflags_onClrSafe() - clr "Safe" - prepare() - test.contains("/clr:safe", msc.getcflags(cfg)) - end - - function suite.cflags_onClrPure() - clr "Pure" - prepare() - test.contains("/clr:pure", msc.getcflags(cfg)) - end - - --- --- Check handling of character set switches --- - - function suite.cflags_onCharSetDefault() - prepare() - test.contains('/D"_UNICODE"', msc.getdefines(cfg.defines, cfg)) - end - - function suite.cflags_onCharSetUnicode() - characterset "Unicode" - prepare() - test.contains('/D"_UNICODE"', msc.getdefines(cfg.defines, cfg)) - end - - function suite.cflags_onCharSetMBCS() - characterset "MBCS" - prepare() - test.contains('/D"_MBCS"', msc.getdefines(cfg.defines, cfg)) - end - - function suite.cflags_onCharSetASCII() - characterset "ASCII" - prepare() - test.excludes({'/D"_MBCS"', '/D"_UNICODE"'}, msc.getdefines(cfg.defines, cfg)) - end - - --- --- Check handling of system search paths. --- - - function suite.includeDirs_onSysIncludeDirs() - sysincludedirs { "/usr/local/include" } - prepare() - test.contains("-I/usr/local/include", msc.getincludedirs(cfg, cfg.includedirs, cfg.sysincludedirs)) - end - - function suite.libDirs_onSysLibDirs() - syslibdirs { "/usr/local/lib" } - prepare() - test.contains('/LIBPATH:"/usr/local/lib"', msc.getLibraryDirectories(cfg)) - end - --- --- Check handling of ignore default libraries --- - - function suite.ignoreDefaultLibraries_WithExtensions() - ignoredefaultlibraries { "lib1.lib" } - prepare() - test.contains('/NODEFAULTLIB:lib1.lib', msc.getldflags(cfg)) - end - - function suite.ignoreDefaultLibraries_WithoutExtensions() - ignoredefaultlibraries { "lib1" } - prepare() - test.contains('/NODEFAULTLIB:lib1.lib', msc.getldflags(cfg)) - end - - --- --- Check handling of shared C/C++ flags. --- - - function suite.mixedToolFlags_onCFlags() - flags { "FatalCompileWarnings" } - prepare() - test.isequal({ "/WX", "/MD" }, msc.getcflags(cfg)) - end - - function suite.mixedToolFlags_onCxxFlags() - flags { "FatalCompileWarnings" } - prepare() - test.isequal({ "/WX", "/MD", "/EHsc" }, msc.getcxxflags(cfg)) - end diff --git a/build/premake/premake5/tests/tools/test_snc.lua b/build/premake/premake5/tests/tools/test_snc.lua deleted file mode 100644 index fefc6e8f1c..0000000000 --- a/build/premake/premake5/tests/tools/test_snc.lua +++ /dev/null @@ -1,182 +0,0 @@ --- --- tests/test_snc.lua --- Automated test suite for the SNC toolset interface. --- Copyright (c) 2012-2013 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("tools_snc") - - local snc = p.tools.snc - - --- --- Setup/teardown --- - - local wks, prj, cfg - - function suite.setup() - wks, prj = test.createWorkspace() - system "PS3" - end - - local function prepare() - cfg = test.getconfig(prj, "Debug") - end - - --- --- Check the selection of tools based on the target system. --- - - function suite.tools_onDefaults() - prepare() - test.isnil(snc.gettoolname(cfg, "cc")) - test.isnil(snc.gettoolname(cfg, "cxx")) - test.isnil(snc.gettoolname(cfg, "ar")) - end - - function suite.tools_onPS3() - system "PS3" - prepare() - test.isnil(snc.gettoolname(cfg, "cc")) - test.isnil(snc.gettoolname(cfg, "cxx")) - test.isnil(snc.gettoolname(cfg, "ar")) - end - - --- --- By default, the -MMD -MP are used to generate dependencies. --- - - function suite.cppflags_defaultWithMMD() - prepare() - test.isequal({ "-MMD", "-MP" }, snc.getcppflags(cfg)) - end - - --- --- Check the translation of CFLAGS. --- - - function suite.cflags_onFatalWarnings() - flags { "FatalWarnings" } - prepare() - test.isequal({ "-Xquit=2" }, snc.getcflags(cfg)) - end - - --- --- Check the optimization flags. --- - - function suite.cflags_onNoOptimize() - optimize "Off" - prepare() - test.isequal({ "-O0" }, snc.getcflags(cfg)) - end - - function suite.cflags_onOptimize() - optimize "On" - prepare() - test.isequal({ "-O1" }, snc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeSize() - optimize "Size" - prepare() - test.isequal({ "-Os" }, snc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeSpeed() - optimize "Speed" - prepare() - test.isequal({ "-O2" }, snc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeFull() - optimize "Full" - prepare() - test.isequal({ "-O3" }, snc.getcflags(cfg)) - end - - function suite.cflags_onOptimizeDebug() - optimize "Debug" - prepare() - test.isequal({ "-Od" }, snc.getcflags(cfg)) - end - - --- --- Turn on exceptions and RTTI by default, to match the other Premake supported toolsets. --- - - function suite.cxxflags_onDefault() - prepare() - test.isequal({ "-Xc+=exceptions", "-Xc+=rtti" }, snc.getcxxflags(cfg)) - end - - --- --- Check the translation of LDFLAGS. --- - - function suite.cflags_onDefaults() - prepare() - test.isequal({ "-s" }, snc.getldflags(cfg)) - end - - --- --- Check the formatting of linked libraries. --- - - function suite.links_onSystemLibs() - links { "fs_stub", "net_stub" } - prepare() - test.isequal({ "-lfs_stub", "-lnet_stub" }, snc.getlinks(cfg)) - end - - --- --- When linking to a static sibling library, the relative path to the library --- should be used instead of the "-l" flag. This prevents linking against a --- shared library of the same name, should one be present. --- - - function suite.links_onStaticSiblingLibrary() - links { "MyProject2" } - - test.createproject(wks) - system "Linux" - kind "StaticLib" - location "MyProject2" - targetdir "lib" - - prepare() - test.isequal({ "lib/libMyProject2.a" }, snc.getlinks(cfg)) - end - - - --- --- When linking object files, leave off the "-l". --- - - function suite.links_onObjectFile() - links { "generated.o" } - prepare() - test.isequal({ "generated.o" }, snc.getlinks(cfg)) - end - - --- --- Check handling of forced includes. --- - - function suite.forcedIncludeFiles() - forceincludes { "stdafx.h", "include/sys.h" } - prepare() - test.isequal({'-include stdafx.h', '-include include/sys.h'}, snc.getforceincludes(cfg)) - end diff --git a/build/premake/premake5/tests/workspace/test_eachconfig.lua b/build/premake/premake5/tests/workspace/test_eachconfig.lua deleted file mode 100644 index c193608937..0000000000 --- a/build/premake/premake5/tests/workspace/test_eachconfig.lua +++ /dev/null @@ -1,85 +0,0 @@ --- --- tests/workspace/test_eachconfig.lua --- Automated test suite for the workspace-level configuration iterator. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local suite = test.declare("workspace_eachconfig") - - local p = premake - - --- --- Setup and teardown --- - - local wks - - function suite.setup() - wks = workspace("MyWorkspace") - end - - local function prepare() - p.w("-") - for cfg in p.workspace.eachconfig(wks) do - p.w("%s:%s", cfg.buildcfg or "", cfg.platform or "") - end - p.w("-") - end - - --- --- All configurations listed at the workspace level should be enumerated. --- - - function suite.listsBuildConfigurations_onWorkspaceLevel() - configurations { "Debug", "Release" } - project("MyProject") - prepare() - test.capture [[ -- -Debug: -Release: -- - ]] - end - - --- --- Iteration order should be build configurations, then platforms. --- - - function suite.listsInOrder_onBuildConfigsAndPlatforms() - configurations { "Debug", "Release" } - platforms { "x86", "x86_64" } - project("MyProject") - prepare() - test.capture [[ -- -Debug:x86 -Debug:x86_64 -Release:x86 -Release:x86_64 -- - ]] - end - - --- --- Configurations listed at the project level should *not* be included --- in the workspace-level lists. --- - - function suite.excludesProjectLevelConfigs() - configurations { "Debug", "Release" } - project ("MyProject") - configurations { "PrjDebug", "PrjRelease" } - platforms { "x86", "x86_64" } - prepare() - test.capture [[ -- -Debug: -Release: -- - ]] - end diff --git a/build/premake/premake5/tests/workspace/test_location.lua b/build/premake/premake5/tests/workspace/test_location.lua deleted file mode 100644 index 6d658310ef..0000000000 --- a/build/premake/premake5/tests/workspace/test_location.lua +++ /dev/null @@ -1,44 +0,0 @@ --- --- tests/workspace/test_location.lua --- Test handling of the workspace's location field. --- Copyright (c) 2013-2015 Jason Perkins and the Premake project --- - - local suite = test.declare("workspace_location") - - --- --- Setup and teardown --- - - local wks - - function suite.setup() - wks = workspace("MyWorkspace") - end - - local function prepare() - wks = test.getWorkspace(wks) - end - - --- --- If no explicit location is set, the location should be set to the --- directory containing the script which defined the workspace. --- - - function suite.usesScriptLocation_onNoLocation() - prepare() - test.isequal(os.getcwd(), wks.location) - end - - --- --- If an explicit location has been set, use it. --- - - function suite.usesLocation_onLocationSet() - location "build" - prepare() - test.isequal(path.join(os.getcwd(), "build"), wks.location) - end diff --git a/build/premake/premake5/tests/workspace/test_objdirs.lua b/build/premake/premake5/tests/workspace/test_objdirs.lua deleted file mode 100644 index ad74c9f79f..0000000000 --- a/build/premake/premake5/tests/workspace/test_objdirs.lua +++ /dev/null @@ -1,86 +0,0 @@ --- --- tests/workspace/test_objdirs.lua --- Test the workspace unique objects directory building. --- Copyright (c) 2012-2015 Jason Perkins and the Premake project --- - - local p = premake - local suite = test.declare("workspace_objdir") - - --- --- Setup and teardown --- - - local wks - - function suite.setup() - p.action.set("test") - wks = workspace("MyWorkspace") - system "macosx" - end - - local function result() - local platforms = wks.platforms or {} - local prj = project("MyProject") - local cfg = test.getconfig(prj, "Debug", platforms[1]) - return p.project.getrelative(cfg.project, cfg.objdir) - end - - --- --- Objects directory should "obj" by default. --- - - function suite.directoryIsObj_onNoValueSet() - configurations { "Debug" } - test.isequal("obj", result()) - end - - --- --- If a conflict occurs between platforms, the platform names should --- be used to make unique. --- - - function suite.directoryIncludesPlatform_onPlatformConflict() - configurations { "Debug" } - platforms { "x86", "x86_64" } - test.isequal("obj/x86", result()) - end - - --- --- If a conflict occurs between build configurations, the build --- configuration names should be used to make unique. --- - - function suite.directoryIncludesBuildCfg_onBuildCfgConflict() - configurations { "Debug", "Release" } - test.isequal("obj/Debug", result()) - end - - --- --- If a conflict occurs between both build configurations and platforms, --- both should be used to make unique. --- - - function suite.directoryIncludesBuildCfg_onPlatformAndBuildCfgConflict() - configurations { "Debug", "Release" } - platforms { "x86", "x86_64" } - test.isequal("obj/x86/Debug", result()) - end - - --- --- If a conflict occurs between projects, the project name should be --- used to make unique. --- - - function suite.directoryIncludesBuildCfg_onProjectConflict() - configurations { "Debug", "Release" } - project "MyProject2" - test.isequal("obj/Debug/MyProject", result()) - end -